import { A as BoltdocsRoutePathWithFallback, C as SiteConfig, D as BoltdocsLocale, E as BoltdocsIntegrationsConfig, M as BoltdocsTypes, N as BoltdocsVersion, O as BoltdocsMdxComponents, S as SidebarProps, T as BoltdocsConfig, _ as CollectionPostLoaderData, b as NavbarLink, g as CollectionListLoaderData, h as BoltdocsTab, j as BoltdocsSocialLink, k as BoltdocsRoutePath, v as ComponentRoute, w as TabsProps, x as OnThisPageProps, y as LayoutProps } from "../sidebar-COTaMHR-.js"; import { a as ErrorBoundary, c as OnThisPage, i as CopyMarkdown, l as Sidebar, n as NotFound, o as PageNav, r as SearchDialog, s as Breadcrumbs, t as Banner, u as Navbar } from "../banner-BMop1KLF.js"; import { RouteRecord, ViteReactSSG } from "@bdocs/ssg"; import * as _$react from "react"; import React$1, { ComponentType, JSXElementConstructor, ReactNode } from "react"; import * as _$react_router_dom0 from "react-router-dom"; import { LinkProps } from "react-router-dom"; import * as _$react_jsx_runtime0 from "react/jsx-runtime"; import { ClassValue } from "clsx"; //#region src/client/collections/collections-context.d.ts interface CollectionPost$1 { path: string; title: string; date?: string | Date; excerpt?: string; tags?: string[]; author?: string; coverImage?: string; filePath: string; locale?: string; version?: string; frontmatter?: Record; lastUpdated?: string | number | Date; headings?: { level: number; text: string; id: string; }[]; draft?: boolean; } type CollectionsData = Record; declare const CollectionsContext: _$react.Context; interface CurrentPostContextValue { route: ComponentRoute; headings: { level: number; text: string; id: string; }[]; collection: string; } declare function CurrentPostProvider({ value, children }: { value: CurrentPostContextValue; children: React.ReactNode; }): _$react_jsx_runtime0.JSX.Element; //#endregion //#region src/client/ssg/create-routes.d.ts interface CreateRoutesOptions { routesData: ComponentRoute[]; collectionsData?: CollectionsData; collectionLayouts?: Record>; collectionLists?: Record; collectionPosts?: Record>; config: BoltdocsConfig; mdxModules: Record; externalPages?: Record; externalLayout?: React$1.ComponentType<{ children: React$1.ReactNode; }>; components?: Record; } declare function createRoutes(options: CreateRoutesOptions): RouteRecord[]; //#endregion //#region src/client/ssg/mdx-page.d.ts type MdxPageProps = { MDXComponent: React.ComponentType>; mdxComponents: Record>; collectionPostComponent?: React.ComponentType; }; /** * Renders an MDX page by consuming pre-loaded route data. * * - If the route belongs to a collection (`data.collection` is set), wraps * the content with `CurrentPostProvider` so that `usePost()` (called without * a slug) can read the current post's data from context. * - Otherwise, renders the standard `DocPage` layout. */ declare function MdxPage({ MDXComponent, mdxComponents: propComponents, collectionPostComponent: CollectionPost }: MdxPageProps): _$react_jsx_runtime0.JSX.Element | null; //#endregion //#region src/client/ssg/boltdocs-shell.d.ts declare function BoltdocsShell({ config, routes, components, collectionsData }: { config: BoltdocsConfig; routes: ComponentRoute[]; components?: Record; collectionsData?: CollectionsData; }): _$react_jsx_runtime0.JSX.Element; //#endregion //#region src/client/app/config-context.d.ts /** * Hook to access the Boltdocs configuration. */ declare function useConfig(): BoltdocsConfig; //#endregion //#region src/client/app/theme-context.d.ts type Theme = 'light' | 'dark' | 'system'; type ResolvedTheme = 'light' | 'dark'; interface ThemeContextType { theme: Theme; resolvedTheme: ResolvedTheme; setTheme: (theme: Theme) => void; } declare function useTheme(): ThemeContextType; //#endregion //#region src/client/app/mdx-components-context.d.ts type MdxComponentsType = { [key: string]: ComponentType; } & { Frontmatter?: Record>; }; declare function useMdxComponents(): BoltdocsMdxComponents; //#endregion //#region src/client/app/ui-context.d.ts declare function useUI(): { isSidebarOpen: boolean; toggleSidebar: () => void; closeSidebar: () => void; }; //#endregion //#region src/client/hooks/use-navbar.d.ts declare function useNavbar(): { links: NavbarLink[]; title: string; logo: any; logoProps: { alt: any; width: any; height: any; }; github: string | null; social: BoltdocsSocialLink[]; config: BoltdocsConfig; theme: Theme; }; //#endregion //#region src/client/hooks/use-sidebar.d.ts declare function useSidebar(routes: ComponentRoute[]): { groups: any[]; ungrouped: ComponentRoute[]; activeRoute: ComponentRoute | undefined; activePath: string; config: BoltdocsConfig; }; //#endregion //#region src/client/hooks/use-search.d.ts declare function useSearch(routes: ComponentRoute[]): { isOpen: boolean; setIsOpen: _$react.Dispatch<_$react.SetStateAction>; query: string; setQuery: _$react.Dispatch<_$react.SetStateAction>; list: any[]; handleSelect: (key: React.Key) => void; input: { value: string; onChange: (e: React.ChangeEvent) => void; }; }; //#endregion //#region src/client/hooks/use-tabs.d.ts declare function useTabs(tabs?: BoltdocsTab[], routes?: ComponentRoute[]): { tabs: BoltdocsTab[]; activeIndex: number; indicatorStyle: _$react.CSSProperties; tabRefs: _$react.RefObject<(HTMLAnchorElement | null)[]>; activeTabId: string | undefined; }; //#endregion //#region src/client/hooks/use-version.d.ts interface VersionOption { key: BoltdocsVersion; label: string; value: string; isCurrent: boolean; } interface UseVersionReturn { currentVersion: BoltdocsVersion | undefined; currentVersionLabel: string | undefined; availableVersions: VersionOption[]; handleVersionChange: (version: BoltdocsVersion) => void; } /** * Hook to manage and switch between different versions of the documentation. */ declare function useVersion(): UseVersionReturn; //#endregion //#region src/client/hooks/use-i18n.d.ts interface LocaleOption { key: BoltdocsLocale; label: string; value: string; isCurrent: boolean; } interface UseI18nReturn { currentLocale: BoltdocsLocale | undefined; currentLocaleLabel: string | undefined; availableLocales: LocaleOption[]; handleLocaleChange: (locale: BoltdocsLocale) => void; } /** * Hook to manage and switch between different locales (languages) of the documentation. */ declare function useI18n(): UseI18nReturn; //#endregion //#region src/client/hooks/use-page-nav.d.ts declare function usePageNav(): { prevPage: null; nextPage: null; currentRoute: null; } | { prevPage: ComponentRoute | null; nextPage: ComponentRoute | null; currentRoute: ComponentRoute; }; //#endregion //#region src/client/hooks/use-breadcrumbs.d.ts /** * Hook to generate breadcrumbs based on the current active route. */ declare function useBreadcrumbs(): { crumbs: { label: string; href?: string; }[]; activeRoute: ComponentRoute | undefined; }; //#endregion //#region src/client/hooks/use-routes.d.ts /** * Hook to access the framework's routing state. * Returns both the complete set of routes and a filtered list based on the current * version and locale. */ declare function useRoutes(): { routes: ComponentRoute[]; allRoutes: ComponentRoute[]; currentRoute: ComponentRoute | undefined; isCollectionPage: boolean; currentLocale: BoltdocsLocale; currentVersion: BoltdocsVersion; }; //#endregion //#region src/client/hooks/use-localized-to.d.ts /** * Hook to automatically localize a path based on the current version and locale context. * It ensures that navigation preserves the active version and language across the entire site. */ declare function useLocalizedTo(to: BoltdocsRoutePathWithFallback): string; declare function useLocalizedTo(to: LinkProps['to']): LinkProps['to']; //#endregion //#region src/client/hooks/use-location.d.ts declare const useLocation: () => _$react_router_dom0.Location; //#endregion //#region src/client/hooks/use-search-highlight.d.ts /** * Hook to highlight search terms based on the 'hl' query parameter. */ declare function useSearchHighlight(containerSelector?: string): void; //#endregion //#region src/client/hooks/use-analytics.d.ts declare global { interface Window { gtag?: (...args: unknown[]) => void; dataLayer?: unknown[]; gtag_report_conversion?: (url?: string) => boolean; posthog?: { capture: (event: string, properties?: Record) => void; identify: (distinctId: string) => void; reset: () => void; opt_out_capturing: () => void; opt_in_capturing: () => void; }; } } interface AnalyticsEvent { action: string; category?: string; label?: string; value?: number; params?: Record; } interface AnalyticsInstance { trackPageView: (path: string, title?: string) => void; trackEvent: (event: AnalyticsEvent) => void; trackSearch: (query: string, resultsCount?: number) => void; trackDownload: (file: string, type?: string) => void; trackExternalLink: (url: string) => void; isEnabled: boolean; } interface UseAnalyticsOptions { config?: BoltdocsIntegrationsConfig; autoTrackPageViews?: boolean; autoTrackDownloads?: boolean; autoTrackExternalLinks?: boolean; excludePatterns?: RegExp[]; } declare function useAnalytics(options?: UseAnalyticsOptions): AnalyticsInstance; declare function useTrackPageView(): (path: string, title?: string) => void; declare function useTrackEvent(): (event: AnalyticsEvent) => void; //#endregion //#region src/client/hooks/use-headings.d.ts /** * Returns the headings of the current page, extracted from the route loader data. * Useful for building custom Tables of Contents or jumping to sections. * * @returns An array of heading objects with level, text, and id. */ declare function useHeadings(): { level: number; text: string; id: string; }[]; //#endregion //#region src/client/hooks/use-merged-components.d.ts declare function useMergedComponents(propComponents?: Record>): MdxComponentsType; //#endregion //#region src/client/hooks/use-feedback.d.ts interface FeedbackData { rating: 'good' | 'neutral' | 'bad'; comment?: string; path: string; title: string; blockId?: string; } interface UseFeedbackOptions { endpoint?: string; onSubmit?: (data: FeedbackData) => void | Promise; } /** * Hook for managing the feedback rating form state and submission. * Resets automatically when navigating to a new page. */ declare function useFeedback(options?: UseFeedbackOptions): { rating: "good" | "neutral" | "bad" | null; setRating: _$react.Dispatch<_$react.SetStateAction<"good" | "neutral" | "bad" | null>>; comment: string; setComment: _$react.Dispatch<_$react.SetStateAction>; loading: boolean; submitted: boolean; error: string | null; submit: (commentOverride?: string, blockId?: string) => Promise; }; //#endregion //#region src/client/components/docs-layout-default.d.ts interface DocsLayoutThemeProps { children?: ReactNode; } /** * Default docs layout — composes the visual primitives and delegates * sub-area routing to them. Slot rendering (plugin injections at * `navbar:end`, `sidebar:bottom`, `docs-content:top`, etc.) is handled * internally by each primitive so the layout itself does no slot "magic". * * A custom layout can reuse any primitive and the slot wiring just works. */ declare function DocsLayoutComponent({ children }: DocsLayoutThemeProps): _$react_jsx_runtime0.JSX.Element; //#endregion //#region src/client/collections/hooks.d.ts interface UsePostsOptions { includeDrafts?: boolean; } /** * Returns the posts of a collection, filtered by the current locale and version. * Defaults to "blog" if no collection is specified. * @param collection - The name of the collection. Defaults to "blog". * @param options - Options to customize the query. * @param options.includeDrafts - If true, includes draft posts in the results. * @returns The filtered posts of the collection. */ declare function usePosts(collection?: string, options?: UsePostsOptions): CollectionPost$1[]; /** * Returns a single post from a collection. * * @param collection - The name of the collection (optional inside post routes). * @param slug - The post slug (optional inside post routes). * @returns The matching post, or undefined if not found. */ declare function usePost(): CollectionPost$1 | undefined; declare function usePost(collection: string, slug: string): CollectionPost$1 | undefined; /** * Returns the recent posts of a collection. Defaults to "blog". * @param collection - The name of the collection. Defaults to "blog". * @param count - The number of recent posts to return. * @returns The recent posts of the collection. */ declare function useRecentPosts(collection?: string, count?: number): CollectionPost$1[]; //#endregion //#region src/client/components/mdx/timeline.d.ts /** * Variants for both dots and badges. * * - Semantic: `primary`, `success`, `info`, `warning`, `danger` map directly * to the dot accent color and the badge pill background. * - Lifecycle (alias for semantic but convenient for changelogs): * `major` → primary, `minor` → success, `patch` → info, * `new` → primary, `deprecated` → warning, `breaking` → danger. */ type TimelineVariant = 'primary' | 'success' | 'info' | 'warning' | 'danger' | 'major' | 'minor' | 'patch' | 'new' | 'deprecated' | 'breaking'; interface TimelineBadgeConfig { text: ReactNode; variant?: TimelineVariant; } interface TimelineProps extends Omit, 'children'> { children?: ReactNode; /** Reduce vertical padding between items. */ compact?: boolean; } interface TimelineItemProps extends Omit, 'title' | 'children'> { /** Date the entry happened. Accepts ISO string, epoch ms, or `Date` instance. */ date?: string | number | Date; /** Headline shown beside the date. */ title: ReactNode; /** Inline badge to the right of the title (e.g. "Major", "Breaking"). */ badge?: string | TimelineBadgeConfig; /** Icon to render inside the dot. Falls back to a coloured filled circle. */ icon?: ReactNode; /** Dot / badge accent colour. Defaults to `primary`. */ variant?: TimelineVariant; /** * BCP-47 locale tag used by `toLocaleDateString` for the rendered * date. Defaults to `'en-US'` so server and client produce identical * markup on hydration. Pass `'es'`, `'fr'`, etc. to localize. */ locale?: string; /** Body content for the entry. Accepts Markdown/markup from MDX. */ children?: ReactNode; } declare function TimelineRoot({ children, className, compact, ...props }: TimelineProps): _$react_jsx_runtime0.JSX.Element; declare function TimelineItem({ date, title, badge, icon, variant, locale, className, children, ...props }: TimelineItemProps): _$react_jsx_runtime0.JSX.Element; declare const Timeline: typeof TimelineRoot & { Item: typeof TimelineItem; }; //#endregion //#region src/client/utils/cn.d.ts declare function cn(...inputs: ClassValue[]): string; //#endregion //#region src/client/utils/i18n.d.ts /** * Retrieves the correct translation from a value that can be either * a simple string or a map of locale-specific strings. * * @param value - The text to translate * @param locale - The current active locale (e.g., 'en', 'es') * @returns The translated string */ declare function getTranslated(value: string | Record | undefined, locale?: string): string; //#endregion //#region src/client/utils/react-to-text.d.ts type ResolverMap = Map, (props: object) => string>; declare const reactToText: (node: ReactNode, resolvers?: ResolverMap) => string; //#endregion //#region src/client/utils/copy-clipboard.d.ts /** * Copy text to clipboard. * @param text - The text to copy. * @returns True if the text was copied successfully. */ declare const copyToClipboard: (text: string) => Promise; //#endregion //#region src/client/utils/github.d.ts /** * Get the number of stars for a GitHub repository. * @param repo - owner/repo * @param token - The GitHub token. * @param baseUrl - The GitHub API base URL. * @returns The number of stars for the repository. * @example * getStarsRepo('owner/repo') // 100k */ declare function getStarsRepo(repo: string, token?: string, baseUrl?: string): Promise; //#endregion //#region src/client/components/mdx/code-block.d.ts interface CodeBlockProps { children?: React.ReactNode; className?: string; hideCopy?: boolean; title?: string; lang?: string; highlightedHtml?: string; 'data-lang'?: string; 'data-title'?: string; 'data-highlighted'?: string; 'data-highlighted-html'?: string; plain?: boolean; lineNumbers?: boolean | string; showLineNumbers?: boolean | string; wordWrap?: boolean | string; 'word-wrap'?: boolean | string; metastring?: string; } //#endregion //#region src/client/components/mdx/use-code-block.d.ts declare function useCodeBlock(props: CodeBlockProps): { copied: boolean; isExpanded: boolean; setIsExpanded: _$react.Dispatch<_$react.SetStateAction>; isExpandable: boolean; preRef: _$react.RefObject; handleCopy: () => Promise; shouldTruncate: boolean; isHighlighted: boolean; effectiveHighlightedHtml: string | undefined; effectiveTitle: string | undefined; lang: string; showCodeBlockFeedback: boolean; rated: "up" | "down" | null; handleRate: (type: "up" | "down") => Promise; }; //#endregion export { Banner, BoltdocsConfig, type BoltdocsLocale, BoltdocsRoutePath, BoltdocsRoutePathWithFallback, BoltdocsShell, BoltdocsTab, type BoltdocsTypes, type BoltdocsVersion, Breadcrumbs, type CollectionListLoaderData, type CollectionPost$1 as CollectionPost, type CollectionPostLoaderData, CollectionsContext, type CollectionsData, type ComponentRoute, CopyMarkdown, CurrentPostProvider, DocsLayoutComponent as DocsLayout, ErrorBoundary, LayoutProps, MdxPage, Navbar, NavbarLink, NotFound, OnThisPage, OnThisPageProps, PageNav, SearchDialog, Sidebar, SidebarProps, SiteConfig, TabsProps, Timeline, type TimelineBadgeConfig, type TimelineItemProps, type TimelineProps, type TimelineVariant, ViteReactSSG, cn, copyToClipboard, createRoutes, getStarsRepo, getTranslated, reactToText, useAnalytics, useBreadcrumbs, useCodeBlock, useConfig, useFeedback, useHeadings, useI18n, useLocalizedTo, useLocation, useMdxComponents, useMergedComponents, useNavbar, usePageNav, usePost, usePosts, useRecentPosts, useRoutes, useSearch, useSearchHighlight, useSidebar, useTabs, useTheme, useTrackEvent, useTrackPageView, useUI, useVersion };