import type { AstroIntegration } from 'astro'; import type { ExpressiveCodePlugin, ThemeObjectOrShikiThemeName } from 'astro-expressive-code'; import { type OverrideComponentsOptions } from './vite-plugins/override-components.js'; export interface Options { /** * Whether or not default routes are injected. * * Set this to false to customize the pages. * * Use 'tutorial-only' to only inject the tutorial routes. This is useful * if you want to have a different landing page. * * @default true */ defaultRoutes?: boolean | 'tutorial-only'; /** * Override components of TutorialKit. */ components?: OverrideComponentsOptions; /** * The value of the Cross-Origin-Embedder-Policy header for the dev server. * This is required for webcontainer to works. * * Using credentialless lets you embed images from third party more easily. * However only Firefox and Chrome supports credentialless. * * @see https://webcontainers.io/guides/configuring-headers * * @default 'require-corp' */ isolation?: 'require-corp' | 'credentialless'; /** * Configuration options when using the Enterprise * version of WebContainer API. */ enterprise?: { /** * The StackBlitz editor origin. */ editorOrigin: string; /** * The client id. */ clientId: string; /** * The OAuth scope. */ scope: string; }; /** * Expressive code plugins. * * @default [] */ expressiveCodePlugins?: ExpressiveCodePlugin[]; /** * Themes for expressive code. * Make sure to provide a light and a dark theme if you want support for both light and dark modes. * Default values are ['light-plus', 'dark-plus'] * * @default ['light-plus', 'dark-plus'] */ expressiveCodeThemes?: [ThemeObjectOrShikiThemeName, ThemeObjectOrShikiThemeName]; } export default function createPlugin({ defaultRoutes, components, isolation, enterprise, expressiveCodePlugins, expressiveCodeThemes, }?: Options): AstroIntegration;