/**
* A plugin that lets users override TutorialKit's components.
*
* The virtual module can be imported as:
*
* ```ts
* import { TopBar } from 'tutorialkit:override-components';
*
*
* ```
*
* User can override the components in `astro.config.ts`:
*
* ```ts
* export default defineConfig({
* integrations: [
* tutorialkit({
* components: {
* TopBar: './CustomTopBar.astro',
* Dialog: './CustomDialog.tsx',
* HeadTags: './CustomHeadLinks.astro',
* },
* }),
* ],
* });
* ```
*/
import type { VitePlugin } from '../types.js';
export interface OverrideComponentsOptions {
/**
* Component for overriding the top bar.
*
* This component has slots that are used to pass TutorialKit's default components:
* - `logo`: Logo of the application
* - `open-in-stackblitz-link`: Link for opening current lesson in StackBlitz
* - `theme-switch`: Switch for changing the theme
* - `login-button`: For StackBlitz Enterprise user, the login button
*
* Usage:
*
* ```jsx
*
*
*
*
* ```
*/
TopBar?: string;
/**
* Component for overriding confirmation dialogs.
*
* This component has to be a React component and be the default export of that module.
* It will receive same props that `@tutorialkit/react/dialog` supports.
*/
Dialog?: string;
/**
* Component for overriding title, links and metadata in the `
` tag.
*
* This component has slots that are used to pass TutorialKit's default tags:
*
* - `title`: The page title
* - `links`: Links for the favicon, fonts and other assets
* - `meta`: Metadata and Open Graph tags
*
* ```jsx
*
*
*
* ```
*/
HeadTags?: string;
}
interface Options {
components?: OverrideComponentsOptions;
defaultRoutes: boolean;
}
export declare function overrideComponents({ components, defaultRoutes }: Options): VitePlugin;
export {};