boltdocs 3.1.0 → 3.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{adapters-DEXNIv3x.mjs → adapters-ByYY44Zy.mjs} +1 -1
- package/dist/{adapters-uGz-UKQa.cjs → adapters-DvmtpdSF.cjs} +1 -1
- package/dist/{banner-DjujkctF.d.ts → banner-BMop1KLF.d.ts} +2 -2
- package/dist/{banner-DdSgCs4G.d.cts → banner-CVD0GugR.d.cts} +2 -2
- package/dist/{cache-CfRTUzWC.cjs → cache-CO4Dy2uQ.cjs} +1 -1
- package/dist/{cache-B0C2i0yP.mjs → cache-Dk53iOo6.mjs} +1 -1
- package/dist/chunk-BFSpntXv.mjs +6 -0
- package/dist/{chunk-Ds5LZdWN.cjs → chunk-D1Md3oWO.cjs} +1 -1
- package/dist/client/index.cjs +219 -172
- package/dist/client/index.d.cts +75 -9
- package/dist/client/index.d.ts +75 -9
- package/dist/client/index.js +119 -73
- package/dist/client/mdx.cjs +1 -1
- package/dist/client/mdx.d.cts +1 -1
- package/dist/client/mdx.d.ts +1 -1
- package/dist/client/mdx.js +1 -1
- package/dist/client/primitives.cjs +7 -7
- package/dist/client/primitives.d.cts +5 -22
- package/dist/client/primitives.d.ts +5 -22
- package/dist/client/primitives.js +4 -4
- package/dist/client/theme/reset.css +31 -4
- package/dist/{shiki-adapter-fS94vy-z.d.mts → config-BpzaPsJj.d.cts} +325 -78
- package/dist/config-CCXp3aXO.mjs +7 -0
- package/dist/{config-BxsogK5A.cjs → config-CMd4XoFq.cjs} +1 -1
- package/dist/config-DlGoEM9D.cjs +7 -0
- package/dist/{shiki-adapter-l2kEP5rn.d.cts → config-xtS0ZkMm.d.mts} +325 -78
- package/dist/{csp-BX06rvdg.cjs → csp-CRp_3U7a.cjs} +1 -1
- package/dist/csp-oTC2ygvF.mjs +6 -0
- package/dist/{docs-layout-DyLDBwS6.js → docs-layout-BdtZ9z6s.js} +9 -28
- package/dist/{docs-layout-D1buSdua.cjs → docs-layout-CFWI15Id.cjs} +69 -88
- package/dist/{doctor-DPDcRKM1.cjs → doctor-BBtmNJE0.cjs} +1 -1
- package/dist/doctor-Bv16QSrI.cjs +7 -0
- package/dist/doctor-DOAbSaiL.mjs +7 -0
- package/dist/{generator-BN75lJOv.cjs → generator-COepVWGi.cjs} +1 -1
- package/dist/{handler-Btd4t_67.mjs → handler-DzQae4eA.mjs} +1 -1
- package/dist/{handler-1LRMYeI4.cjs → handler-XX7cLTqe.cjs} +1 -1
- package/dist/headers-Ddwek8K7.mjs +6 -0
- package/dist/{headers-YpD10rDb.cjs → headers-dg4SDrjY.cjs} +1 -1
- package/dist/{image-5WsgWYTh.js → image-Bz87fCla.js} +1 -1
- package/dist/{image-Hb105Gu6.cjs → image-C4TlpMHn.cjs} +18 -18
- package/dist/link-2PzgTnaP.js +673 -0
- package/dist/{icons-dev-YtDoLUsb.cjs → link-D1Gjkb-2.cjs} +0 -350
- package/dist/{mdx-Bv-pS6-O.js → mdx-BuO6a1f7.js} +195 -40
- package/dist/{mdx-CDUcJmye.cjs → mdx-CD-tSjRG.cjs} +234 -73
- package/dist/{meta-loader-CTB62-Mo.cjs → meta-loader-Dq1zcFnh.cjs} +1 -1
- package/dist/node/cache.cjs +1 -1
- package/dist/node/cache.d.cts +2 -1
- package/dist/node/cache.d.mts +2 -1
- package/dist/node/cache.mjs +1 -1
- package/dist/node/cli-entry.cjs +6 -6
- package/dist/node/cli-entry.mjs +9 -9
- package/dist/node/index.cjs +1 -1
- package/dist/node/index.d.cts +20 -174
- package/dist/node/index.d.mts +18 -175
- package/dist/node/index.mjs +1 -1
- package/dist/node/mdx/shiki-adapter.cjs +1 -1
- package/dist/node/mdx/shiki-adapter.d.cts +49 -1
- package/dist/node/mdx/shiki-adapter.d.mts +49 -1
- package/dist/node/mdx/shiki-adapter.mjs +1 -1
- package/dist/node-B5hu_6qj.cjs +104 -0
- package/dist/node-BXtqM1uH.mjs +6 -0
- package/dist/node-C8725aw7.mjs +104 -0
- package/dist/node-aD1eisrR.cjs +6 -0
- package/dist/{package-_-Oa8-qN.cjs → package-CH2ChQqw.cjs} +1 -1
- package/dist/{package-CoHWTf0N.mjs → package-DSSB8B5L.mjs} +1 -1
- package/dist/{pages-external-CX2uyW95.cjs → pages-external-XkYIs-d5.cjs} +1 -1
- package/dist/parser-DCiEWkSk.cjs +8 -0
- package/dist/parser-qk9FIHJ7.mjs +8 -0
- package/dist/plugin-CX1OZ6jB.cjs +73 -0
- package/dist/plugin-CgfiWaFZ.mjs +73 -0
- package/dist/routes-BW6zsk7Z.mjs +6 -0
- package/dist/routes-BgoIB5wb.cjs +6 -0
- package/dist/{routes-D_S9kjkS.cjs → routes-CORVxc02.cjs} +1 -1
- package/dist/{search-dialog-BpNULmrl.cjs → search-dialog-B1NERUNx.cjs} +101 -55
- package/dist/{search-dialog-BbtxA1uT.cjs → search-dialog-BRFno7HD.cjs} +8 -8
- package/dist/{search-dialog-DC7oXU-5.js → search-dialog-BmxHiKwt.js} +2 -2
- package/dist/{search-dialog-gp9lrJXm.js → search-dialog-D6TvjcuV.js} +1 -1
- package/dist/{search-dialog-PJrFRU5G.js → search-dialog-DFnlx8LO.js} +44 -4
- package/dist/{search-dialog-BIuxGQsg.cjs → search-dialog-DHqwjJuG.cjs} +1 -1
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.d.mts +1 -1
- package/dist/server/index.mjs +1 -1
- package/dist/shiki-adapter-CoQ6jyJ4.cjs +6 -0
- package/dist/shiki-adapter-D-aKw7PP.mjs +6 -0
- package/dist/{sidebar-DknLUI1R.d.ts → sidebar-COTaMHR-.d.ts} +349 -41
- package/dist/{sidebar-DH2iPKXM.d.cts → sidebar-CrEdJuHX.d.cts} +349 -41
- package/dist/{types-generator-CYcHkDzZ.cjs → types-generator-BXhv7Ill.cjs} +1 -1
- package/dist/types-generator-bDPvUztF.mjs +26 -0
- package/dist/utils-Crm9oPcV.mjs +7 -0
- package/dist/utils-D6Xtj0FZ.cjs +7 -0
- package/package.json +13 -10
- package/src/shared/types.ts +361 -19
- package/dist/chunk-hT5z_Zn9-DsJawvsz.mjs +0 -6
- package/dist/chunk-hT5z_Zn9-SKz6VFXu.cjs +0 -6
- package/dist/config-DAgpZyh6.mjs +0 -7
- package/dist/config-DrRQYDCI.cjs +0 -7
- package/dist/csp-z2D0FuRW.mjs +0 -6
- package/dist/doctor-BadGEhXv.cjs +0 -7
- package/dist/doctor-vDsUDgqp.mjs +0 -7
- package/dist/escape-string-regexp-AG8q1e25-9Un9V90q.mjs +0 -6
- package/dist/escape-string-regexp-AG8q1e25-bJ9Ixe7c.cjs +0 -6
- package/dist/esm-shims-DSep1HcR.mjs +0 -6
- package/dist/headers-CL0pMcwm.mjs +0 -6
- package/dist/icons-dev-CHZOwhQA.js +0 -921
- package/dist/lib-BR0SoanK-CLswltLI.cjs +0 -6
- package/dist/lib-BR0SoanK-DcYeDrE6.mjs +0 -6
- package/dist/lib-DPoCz1YB-CLYXwKST.cjs +0 -6
- package/dist/lib-DPoCz1YB-CyGOqgSO.mjs +0 -6
- package/dist/micromark-util-character-5KqJafVT-C6gnc770.cjs +0 -6
- package/dist/micromark-util-character-5KqJafVT-DkPKsbgn.mjs +0 -6
- package/dist/node-BDBv8CT6.mjs +0 -104
- package/dist/node-DFV_FV0y.mjs +0 -6
- package/dist/node-DqsP7kXz.cjs +0 -6
- package/dist/node-yFmAavND.cjs +0 -104
- package/dist/parser-BZJgAa9E.mjs +0 -8
- package/dist/parser-DlanzESE.cjs +0 -8
- package/dist/plugin-BVuwx5D9.cjs +0 -73
- package/dist/plugin-BoxD91Yh.mjs +0 -73
- package/dist/rehype-slug--ZOxZ-_K-BNeYC4aT.cjs +0 -6
- package/dist/rehype-slug--ZOxZ-_K-CjIQEJCs.mjs +0 -6
- package/dist/remark-frontmatter-wFYRLcCt-CutW0gA3.mjs +0 -8
- package/dist/remark-frontmatter-wFYRLcCt-ENB5qG3y.cjs +0 -8
- package/dist/remark-gfm-B8TMkQbX-CjUJo8Rd.cjs +0 -21
- package/dist/remark-gfm-B8TMkQbX-Ctu0VV1_.mjs +0 -21
- package/dist/rolldown-runtime-fkIsjY3S.mjs +0 -6
- package/dist/rollup-DMqoG11U-CKcJ37u_.mjs +0 -59
- package/dist/rollup-DMqoG11U-DKdxvZIj.cjs +0 -59
- package/dist/routes-BN2XbGcT.mjs +0 -6
- package/dist/routes-Cnq8xTCv.cjs +0 -6
- package/dist/shiki-adapter-CGTmrR6S.cjs +0 -6
- package/dist/shiki-adapter-CK3llqw2.mjs +0 -6
- package/dist/types-generator-DVOnRVKU.mjs +0 -26
- package/dist/utils-B3xYMrpK.mjs +0 -7
- package/dist/utils-Bz1tG9Dg.cjs +0 -7
- /package/dist/{errors-C0Hx15Ag.mjs → errors-0zGHRLue.mjs} +0 -0
- /package/dist/{errors-Dx6JHoKE.cjs → errors-vKw8CkiX.cjs} +0 -0
- /package/dist/{index-DJYJzs-Z.d.mts → index-1KsTDq4o.d.mts} +0 -0
- /package/dist/{meta-loader-Bq-MjTXB.mjs → meta-loader-C4Hu9RN9.mjs} +0 -0
package/dist/client/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
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-
|
|
3
|
-
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-
|
|
2
|
+
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-CrEdJuHX.cjs";
|
|
3
|
+
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-CVD0GugR.cjs";
|
|
4
4
|
import * as _$react from "react";
|
|
5
5
|
import React$1, { ComponentType, JSXElementConstructor, ReactNode } from "react";
|
|
6
6
|
import { RouteRecord, ViteReactSSG } from "@bdocs/ssg";
|
|
@@ -119,9 +119,9 @@ declare function useTheme(): ThemeContextType;
|
|
|
119
119
|
//#endregion
|
|
120
120
|
//#region src/client/app/mdx-components-context.d.ts
|
|
121
121
|
type MdxComponentsType = {
|
|
122
|
-
[key: string]:
|
|
122
|
+
[key: string]: ComponentType<any>;
|
|
123
123
|
} & {
|
|
124
|
-
Frontmatter?: Record<string,
|
|
124
|
+
Frontmatter?: Record<string, ComponentType<{
|
|
125
125
|
value: unknown;
|
|
126
126
|
}>>;
|
|
127
127
|
};
|
|
@@ -359,8 +359,16 @@ declare function useFeedback(options?: UseFeedbackOptions): {
|
|
|
359
359
|
//#endregion
|
|
360
360
|
//#region src/client/components/docs-layout-default.d.ts
|
|
361
361
|
interface DocsLayoutThemeProps {
|
|
362
|
-
children?:
|
|
362
|
+
children?: ReactNode;
|
|
363
363
|
}
|
|
364
|
+
/**
|
|
365
|
+
* Default docs layout — composes the visual primitives and delegates
|
|
366
|
+
* sub-area routing to them. Slot rendering (plugin injections at
|
|
367
|
+
* `navbar:end`, `sidebar:bottom`, `docs-content:top`, etc.) is handled
|
|
368
|
+
* internally by each primitive so the layout itself does no slot "magic".
|
|
369
|
+
*
|
|
370
|
+
* A custom layout can reuse any primitive and the slot wiring just works.
|
|
371
|
+
*/
|
|
364
372
|
declare function DocsLayoutComponent({
|
|
365
373
|
children
|
|
366
374
|
}: DocsLayoutThemeProps): _$react_jsx_runtime0.JSX.Element;
|
|
@@ -395,6 +403,67 @@ declare function usePost(collection: string, slug: string): CollectionPost$1 | u
|
|
|
395
403
|
*/
|
|
396
404
|
declare function useRecentPosts(collection?: string, count?: number): CollectionPost$1[];
|
|
397
405
|
//#endregion
|
|
406
|
+
//#region src/client/components/mdx/timeline.d.ts
|
|
407
|
+
/**
|
|
408
|
+
* Variants for both dots and badges.
|
|
409
|
+
*
|
|
410
|
+
* - Semantic: `primary`, `success`, `info`, `warning`, `danger` map directly
|
|
411
|
+
* to the dot accent color and the badge pill background.
|
|
412
|
+
* - Lifecycle (alias for semantic but convenient for changelogs):
|
|
413
|
+
* `major` → primary, `minor` → success, `patch` → info,
|
|
414
|
+
* `new` → primary, `deprecated` → warning, `breaking` → danger.
|
|
415
|
+
*/
|
|
416
|
+
type TimelineVariant = 'primary' | 'success' | 'info' | 'warning' | 'danger' | 'major' | 'minor' | 'patch' | 'new' | 'deprecated' | 'breaking';
|
|
417
|
+
interface TimelineBadgeConfig {
|
|
418
|
+
text: ReactNode;
|
|
419
|
+
variant?: TimelineVariant;
|
|
420
|
+
}
|
|
421
|
+
interface TimelineProps extends Omit<React.HTMLAttributes<HTMLOListElement>, 'children'> {
|
|
422
|
+
children?: ReactNode;
|
|
423
|
+
/** Reduce vertical padding between items. */
|
|
424
|
+
compact?: boolean;
|
|
425
|
+
}
|
|
426
|
+
interface TimelineItemProps extends Omit<React.HTMLAttributes<HTMLLIElement>, 'title' | 'children'> {
|
|
427
|
+
/** Date the entry happened. Accepts ISO string, epoch ms, or `Date` instance. */
|
|
428
|
+
date?: string | number | Date;
|
|
429
|
+
/** Headline shown beside the date. */
|
|
430
|
+
title: ReactNode;
|
|
431
|
+
/** Inline badge to the right of the title (e.g. "Major", "Breaking"). */
|
|
432
|
+
badge?: string | TimelineBadgeConfig;
|
|
433
|
+
/** Icon to render inside the dot. Falls back to a coloured filled circle. */
|
|
434
|
+
icon?: ReactNode;
|
|
435
|
+
/** Dot / badge accent colour. Defaults to `primary`. */
|
|
436
|
+
variant?: TimelineVariant;
|
|
437
|
+
/**
|
|
438
|
+
* BCP-47 locale tag used by `toLocaleDateString` for the rendered
|
|
439
|
+
* date. Defaults to `'en-US'` so server and client produce identical
|
|
440
|
+
* markup on hydration. Pass `'es'`, `'fr'`, etc. to localize.
|
|
441
|
+
*/
|
|
442
|
+
locale?: string;
|
|
443
|
+
/** Body content for the entry. Accepts Markdown/markup from MDX. */
|
|
444
|
+
children?: ReactNode;
|
|
445
|
+
}
|
|
446
|
+
declare function TimelineRoot({
|
|
447
|
+
children,
|
|
448
|
+
className,
|
|
449
|
+
compact,
|
|
450
|
+
...props
|
|
451
|
+
}: TimelineProps): _$react_jsx_runtime0.JSX.Element;
|
|
452
|
+
declare function TimelineItem({
|
|
453
|
+
date,
|
|
454
|
+
title,
|
|
455
|
+
badge,
|
|
456
|
+
icon,
|
|
457
|
+
variant,
|
|
458
|
+
locale,
|
|
459
|
+
className,
|
|
460
|
+
children,
|
|
461
|
+
...props
|
|
462
|
+
}: TimelineItemProps): _$react_jsx_runtime0.JSX.Element;
|
|
463
|
+
declare const Timeline: typeof TimelineRoot & {
|
|
464
|
+
Item: typeof TimelineItem;
|
|
465
|
+
};
|
|
466
|
+
//#endregion
|
|
398
467
|
//#region src/client/utils/cn.d.ts
|
|
399
468
|
declare function cn(...inputs: ClassValue[]): string;
|
|
400
469
|
//#endregion
|
|
@@ -469,9 +538,6 @@ declare function useCodeBlock(props: CodeBlockProps): {
|
|
|
469
538
|
showCodeBlockFeedback: boolean;
|
|
470
539
|
rated: "up" | "down" | null;
|
|
471
540
|
handleRate: (type: "up" | "down") => Promise<void>;
|
|
472
|
-
LangIcon: _$react.ComponentType<{
|
|
473
|
-
size?: number;
|
|
474
|
-
}>;
|
|
475
541
|
};
|
|
476
542
|
//#endregion
|
|
477
|
-
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, ComponentRoute, CopyMarkdown, CurrentPostProvider, DocsLayoutComponent as DocsLayout, ErrorBoundary, LayoutProps, MdxPage, Navbar, NavbarLink, NotFound, OnThisPage, OnThisPageProps, PageNav, SearchDialog, Sidebar, SidebarProps, SiteConfig, TabsProps, 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 };
|
|
543
|
+
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 };
|
package/dist/client/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
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-
|
|
3
|
-
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-
|
|
2
|
+
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";
|
|
3
|
+
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";
|
|
4
4
|
import { RouteRecord, ViteReactSSG } from "@bdocs/ssg";
|
|
5
5
|
import * as _$react from "react";
|
|
6
6
|
import React$1, { ComponentType, JSXElementConstructor, ReactNode } from "react";
|
|
@@ -119,9 +119,9 @@ declare function useTheme(): ThemeContextType;
|
|
|
119
119
|
//#endregion
|
|
120
120
|
//#region src/client/app/mdx-components-context.d.ts
|
|
121
121
|
type MdxComponentsType = {
|
|
122
|
-
[key: string]:
|
|
122
|
+
[key: string]: ComponentType<any>;
|
|
123
123
|
} & {
|
|
124
|
-
Frontmatter?: Record<string,
|
|
124
|
+
Frontmatter?: Record<string, ComponentType<{
|
|
125
125
|
value: unknown;
|
|
126
126
|
}>>;
|
|
127
127
|
};
|
|
@@ -359,8 +359,16 @@ declare function useFeedback(options?: UseFeedbackOptions): {
|
|
|
359
359
|
//#endregion
|
|
360
360
|
//#region src/client/components/docs-layout-default.d.ts
|
|
361
361
|
interface DocsLayoutThemeProps {
|
|
362
|
-
children?:
|
|
362
|
+
children?: ReactNode;
|
|
363
363
|
}
|
|
364
|
+
/**
|
|
365
|
+
* Default docs layout — composes the visual primitives and delegates
|
|
366
|
+
* sub-area routing to them. Slot rendering (plugin injections at
|
|
367
|
+
* `navbar:end`, `sidebar:bottom`, `docs-content:top`, etc.) is handled
|
|
368
|
+
* internally by each primitive so the layout itself does no slot "magic".
|
|
369
|
+
*
|
|
370
|
+
* A custom layout can reuse any primitive and the slot wiring just works.
|
|
371
|
+
*/
|
|
364
372
|
declare function DocsLayoutComponent({
|
|
365
373
|
children
|
|
366
374
|
}: DocsLayoutThemeProps): _$react_jsx_runtime0.JSX.Element;
|
|
@@ -395,6 +403,67 @@ declare function usePost(collection: string, slug: string): CollectionPost$1 | u
|
|
|
395
403
|
*/
|
|
396
404
|
declare function useRecentPosts(collection?: string, count?: number): CollectionPost$1[];
|
|
397
405
|
//#endregion
|
|
406
|
+
//#region src/client/components/mdx/timeline.d.ts
|
|
407
|
+
/**
|
|
408
|
+
* Variants for both dots and badges.
|
|
409
|
+
*
|
|
410
|
+
* - Semantic: `primary`, `success`, `info`, `warning`, `danger` map directly
|
|
411
|
+
* to the dot accent color and the badge pill background.
|
|
412
|
+
* - Lifecycle (alias for semantic but convenient for changelogs):
|
|
413
|
+
* `major` → primary, `minor` → success, `patch` → info,
|
|
414
|
+
* `new` → primary, `deprecated` → warning, `breaking` → danger.
|
|
415
|
+
*/
|
|
416
|
+
type TimelineVariant = 'primary' | 'success' | 'info' | 'warning' | 'danger' | 'major' | 'minor' | 'patch' | 'new' | 'deprecated' | 'breaking';
|
|
417
|
+
interface TimelineBadgeConfig {
|
|
418
|
+
text: ReactNode;
|
|
419
|
+
variant?: TimelineVariant;
|
|
420
|
+
}
|
|
421
|
+
interface TimelineProps extends Omit<React.HTMLAttributes<HTMLOListElement>, 'children'> {
|
|
422
|
+
children?: ReactNode;
|
|
423
|
+
/** Reduce vertical padding between items. */
|
|
424
|
+
compact?: boolean;
|
|
425
|
+
}
|
|
426
|
+
interface TimelineItemProps extends Omit<React.HTMLAttributes<HTMLLIElement>, 'title' | 'children'> {
|
|
427
|
+
/** Date the entry happened. Accepts ISO string, epoch ms, or `Date` instance. */
|
|
428
|
+
date?: string | number | Date;
|
|
429
|
+
/** Headline shown beside the date. */
|
|
430
|
+
title: ReactNode;
|
|
431
|
+
/** Inline badge to the right of the title (e.g. "Major", "Breaking"). */
|
|
432
|
+
badge?: string | TimelineBadgeConfig;
|
|
433
|
+
/** Icon to render inside the dot. Falls back to a coloured filled circle. */
|
|
434
|
+
icon?: ReactNode;
|
|
435
|
+
/** Dot / badge accent colour. Defaults to `primary`. */
|
|
436
|
+
variant?: TimelineVariant;
|
|
437
|
+
/**
|
|
438
|
+
* BCP-47 locale tag used by `toLocaleDateString` for the rendered
|
|
439
|
+
* date. Defaults to `'en-US'` so server and client produce identical
|
|
440
|
+
* markup on hydration. Pass `'es'`, `'fr'`, etc. to localize.
|
|
441
|
+
*/
|
|
442
|
+
locale?: string;
|
|
443
|
+
/** Body content for the entry. Accepts Markdown/markup from MDX. */
|
|
444
|
+
children?: ReactNode;
|
|
445
|
+
}
|
|
446
|
+
declare function TimelineRoot({
|
|
447
|
+
children,
|
|
448
|
+
className,
|
|
449
|
+
compact,
|
|
450
|
+
...props
|
|
451
|
+
}: TimelineProps): _$react_jsx_runtime0.JSX.Element;
|
|
452
|
+
declare function TimelineItem({
|
|
453
|
+
date,
|
|
454
|
+
title,
|
|
455
|
+
badge,
|
|
456
|
+
icon,
|
|
457
|
+
variant,
|
|
458
|
+
locale,
|
|
459
|
+
className,
|
|
460
|
+
children,
|
|
461
|
+
...props
|
|
462
|
+
}: TimelineItemProps): _$react_jsx_runtime0.JSX.Element;
|
|
463
|
+
declare const Timeline: typeof TimelineRoot & {
|
|
464
|
+
Item: typeof TimelineItem;
|
|
465
|
+
};
|
|
466
|
+
//#endregion
|
|
398
467
|
//#region src/client/utils/cn.d.ts
|
|
399
468
|
declare function cn(...inputs: ClassValue[]): string;
|
|
400
469
|
//#endregion
|
|
@@ -469,9 +538,6 @@ declare function useCodeBlock(props: CodeBlockProps): {
|
|
|
469
538
|
showCodeBlockFeedback: boolean;
|
|
470
539
|
rated: "up" | "down" | null;
|
|
471
540
|
handleRate: (type: "up" | "down") => Promise<void>;
|
|
472
|
-
LangIcon: _$react.ComponentType<{
|
|
473
|
-
size?: number;
|
|
474
|
-
}>;
|
|
475
541
|
};
|
|
476
542
|
//#endregion
|
|
477
|
-
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, ComponentRoute, CopyMarkdown, CurrentPostProvider, DocsLayoutComponent as DocsLayout, ErrorBoundary, LayoutProps, MdxPage, Navbar, NavbarLink, NotFound, OnThisPage, OnThisPageProps, PageNav, SearchDialog, Sidebar, SidebarProps, SiteConfig, TabsProps, 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 };
|
|
543
|
+
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 };
|
package/dist/client/index.js
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
* Copyright (c) 2026 Jesus Alcala
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import {
|
|
7
|
-
import { c as ThemeProvider, l as useTheme } from "../image-
|
|
8
|
-
import { n as
|
|
9
|
-
import { A as useUI, C as useSidebar, D as ButtonGroup, O as Breadcrumbs$2, S as useLocation, T as Menu$1, f as PageNav$1, k as UIProvider, m as OnThisPage$1, n as Sidebar$1, t as DocsLayout$1, w as Tabs$1, x as useSearchHighlight } from "../docs-layout-
|
|
10
|
-
import {
|
|
11
|
-
import { n as useSearch, r as InternalErrorBoundary, t as SearchDialog } from "../search-dialog-
|
|
6
|
+
import { A as Monitor, B as useConfig, E as Languages, F as Sun, H as useBoltdocsContext, I as TextAlignStart, L as X, N as Pencil, R as icons_exports, V as BoltdocsProvider, a as useRoutes, b as FaceGood, d as Check, f as ChevronDown, g as Copy, h as CircleHelp, i as useLocalizedTo, j as Moon, k as Menu, o as normalizePath, r as cn, s as RoutesProvider, t as Link$1, u as ArrowLeft, v as ExternalLink, w as Home, x as FaceRegular, y as FaceBad, z as ConfigContext } from "../link-2PzgTnaP.js";
|
|
7
|
+
import { c as ThemeProvider, l as useTheme } from "../image-Bz87fCla.js";
|
|
8
|
+
import { i as copyToClipboard, n as Timeline, r as useCodeBlock, t as mdx_components_default } from "../mdx-BuO6a1f7.js";
|
|
9
|
+
import { A as useUI, C as useSidebar, D as ButtonGroup, O as Breadcrumbs$2, S as useLocation, T as Menu$1, f as PageNav$1, k as UIProvider, m as OnThisPage$1, n as Sidebar$1, t as DocsLayout$1, w as Tabs$1, x as useSearchHighlight } from "../docs-layout-BdtZ9z6s.js";
|
|
10
|
+
import { i as ErrorBoundary$1, n as Navbar$1, o as Button$1, r as Github } from "../search-dialog-DFnlx8LO.js";
|
|
11
|
+
import { n as useSearch, r as InternalErrorBoundary, t as SearchDialog } from "../search-dialog-BmxHiKwt.js";
|
|
12
12
|
import { ViteReactSSG } from "@bdocs/ssg";
|
|
13
13
|
import { Suspense, createContext, isValidElement, lazy, use, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
14
14
|
import { Link, Outlet, useLoaderData, useLocation as useLocation$1, useMatches, useNavigate } from "react-router-dom";
|
|
@@ -59,7 +59,7 @@ function MdxComponentsProvider({ components, children }) {
|
|
|
59
59
|
function ScrollHandler() {
|
|
60
60
|
const { pathname, hash } = useLocation$1();
|
|
61
61
|
const handleScroll = (behavior = "auto") => {
|
|
62
|
-
const container = document.querySelector(".boltdocs-content") || window;
|
|
62
|
+
const container = document.querySelector(".boltdocs-content") || document.querySelector(".boltdocs-external-content") || document.querySelector(".boltdocs-shell-content") || window;
|
|
63
63
|
const getScrollTop = () => {
|
|
64
64
|
if (container === window) return window.scrollY;
|
|
65
65
|
return container.scrollTop;
|
|
@@ -92,11 +92,6 @@ function ScrollHandler() {
|
|
|
92
92
|
}, [pathname, hash]);
|
|
93
93
|
useEffect(() => {
|
|
94
94
|
handleScroll("auto");
|
|
95
|
-
const rafId = requestAnimationFrame(() => {
|
|
96
|
-
handleScroll("auto");
|
|
97
|
-
window.dispatchEvent(new Event("resize"));
|
|
98
|
-
});
|
|
99
|
-
return () => cancelAnimationFrame(rafId);
|
|
100
95
|
}, [pathname, hash]);
|
|
101
96
|
return null;
|
|
102
97
|
}
|
|
@@ -280,12 +275,14 @@ function Head({ siteTitle, siteDescription, routes }) {
|
|
|
280
275
|
content: config.seo.verification.facebook
|
|
281
276
|
}),
|
|
282
277
|
Object.entries(globalMetatags).map(([key, value]) => {
|
|
283
|
-
|
|
278
|
+
const isProperty = key.startsWith("og:") || key.startsWith("music:") || key.startsWith("video:") || key.startsWith("article:") || key.startsWith("book:") || key.startsWith("profile:");
|
|
279
|
+
const strVal = String(value ?? "");
|
|
280
|
+
return isProperty ? /* @__PURE__ */ jsx("meta", {
|
|
284
281
|
property: key,
|
|
285
|
-
content:
|
|
282
|
+
content: strVal
|
|
286
283
|
}, key) : /* @__PURE__ */ jsx("meta", {
|
|
287
284
|
name: key,
|
|
288
|
-
content:
|
|
285
|
+
content: strVal
|
|
289
286
|
}, key);
|
|
290
287
|
}),
|
|
291
288
|
Object.entries(seo).map(([key, value]) => {
|
|
@@ -295,15 +292,17 @@ function Head({ siteTitle, siteDescription, routes }) {
|
|
|
295
292
|
}, "noindex");
|
|
296
293
|
if (key === "robots") return /* @__PURE__ */ jsx("meta", {
|
|
297
294
|
name: "robots",
|
|
298
|
-
content: value
|
|
295
|
+
content: String(value)
|
|
299
296
|
}, "robots");
|
|
300
297
|
if (key === "canonical" || key === "og:url" || key === "og:image" || key === "twitter:image") return null;
|
|
301
|
-
|
|
298
|
+
const isProperty = key.startsWith("og:") || key.startsWith("music:") || key.startsWith("video:") || key.startsWith("article:") || key.startsWith("book:") || key.startsWith("profile:");
|
|
299
|
+
const strVal = String(value ?? "");
|
|
300
|
+
return isProperty ? /* @__PURE__ */ jsx("meta", {
|
|
302
301
|
property: key,
|
|
303
|
-
content:
|
|
302
|
+
content: strVal
|
|
304
303
|
}, key) : /* @__PURE__ */ jsx("meta", {
|
|
305
304
|
name: key,
|
|
306
|
-
content:
|
|
305
|
+
content: strVal
|
|
307
306
|
}, key);
|
|
308
307
|
})
|
|
309
308
|
] });
|
|
@@ -416,7 +415,10 @@ function BoltdocsShell({ config, routes, components = {}, collectionsData }) {
|
|
|
416
415
|
siteDescription: config.theme?.description,
|
|
417
416
|
routes
|
|
418
417
|
}),
|
|
419
|
-
/* @__PURE__ */ jsx(InternalErrorBoundary, { children: /* @__PURE__ */ jsx(
|
|
418
|
+
/* @__PURE__ */ jsx(InternalErrorBoundary, { children: /* @__PURE__ */ jsx("div", {
|
|
419
|
+
className: "boltdocs-shell-content h-screen overflow-hidden",
|
|
420
|
+
children: /* @__PURE__ */ jsx(Outlet, {})
|
|
421
|
+
}) })
|
|
420
422
|
]
|
|
421
423
|
})]
|
|
422
424
|
})
|
|
@@ -561,7 +563,7 @@ function Breadcrumbs() {
|
|
|
561
563
|
return /* @__PURE__ */ jsxs(Breadcrumbs$2.Item, {
|
|
562
564
|
className: "gap-2",
|
|
563
565
|
children: [/* @__PURE__ */ jsx(Breadcrumbs$2.Separator, { className: "text-muted/40" }), /* @__PURE__ */ jsx(Breadcrumbs$2.Link, {
|
|
564
|
-
href: crumb.href,
|
|
566
|
+
href: crumb.href ?? "",
|
|
565
567
|
className: cn("transition-colors", isActive ? "text-body font-semibold cursor-default pointer-events-none" : "text-muted hover:text-body"),
|
|
566
568
|
children: crumb.label
|
|
567
569
|
})]
|
|
@@ -736,7 +738,7 @@ function useNavbar() {
|
|
|
736
738
|
const cleanPathParts = (p) => {
|
|
737
739
|
const parts = p.split("/").filter(Boolean);
|
|
738
740
|
let i = 0;
|
|
739
|
-
if (config.i18n?.locales && parts[i] && config.i18n.locales[parts[i]]) i++;
|
|
741
|
+
if (config.i18n?.locales && parts[i] && !Array.isArray(config.i18n.locales) && config.i18n.locales[parts[i]]) i++;
|
|
740
742
|
if (config.versions?.versions && parts[i]) {
|
|
741
743
|
if (config.versions.versions.some((v) => v.path === parts[i])) i++;
|
|
742
744
|
}
|
|
@@ -1513,7 +1515,7 @@ function I18nSelector({ className }) {
|
|
|
1513
1515
|
|
|
1514
1516
|
//#endregion
|
|
1515
1517
|
//#region src/client/components/ui-base/navbar.tsx
|
|
1516
|
-
const SearchDialog$1 = lazy(() => import("../search-dialog-
|
|
1518
|
+
const SearchDialog$1 = lazy(() => import("../search-dialog-D6TvjcuV.js").then((m) => ({ default: m.SearchDialog })));
|
|
1517
1519
|
function Navbar() {
|
|
1518
1520
|
const { links, title, logo, logoProps, github, social, config } = useNavbar();
|
|
1519
1521
|
const { routes, currentRoute, isCollectionPage, currentVersion, currentLocale } = useRoutes();
|
|
@@ -1684,13 +1686,19 @@ function NavbarMobileLinkItem({ link, onClose }) {
|
|
|
1684
1686
|
//#endregion
|
|
1685
1687
|
//#region src/client/components/ui-base/on-this-page.tsx
|
|
1686
1688
|
function OnThisPage({ headings = [], editLink, communityHelp, filePath }) {
|
|
1687
|
-
if (headings.length === 0) return
|
|
1689
|
+
if (headings.length === 0) return /* @__PURE__ */ jsx("nav", {
|
|
1690
|
+
className: "w-toc shrink-0 hidden xl:block",
|
|
1691
|
+
"aria-hidden": "true"
|
|
1692
|
+
});
|
|
1688
1693
|
return /* @__PURE__ */ jsxs(OnThisPage$1.Root, { children: [
|
|
1689
1694
|
/* @__PURE__ */ jsxs(OnThisPage$1.Header, {
|
|
1690
1695
|
className: "flex flex-row gap-x-2",
|
|
1691
1696
|
children: [/* @__PURE__ */ jsx(TextAlignStart, { size: 16 }), "On this page"]
|
|
1692
1697
|
}),
|
|
1693
|
-
/* @__PURE__ */ jsx(OnThisPage$1.Tree, {
|
|
1698
|
+
/* @__PURE__ */ jsx(OnThisPage$1.Tree, {
|
|
1699
|
+
className: "max-h-[300px]",
|
|
1700
|
+
headings
|
|
1701
|
+
}),
|
|
1694
1702
|
(editLink || communityHelp) && /* @__PURE__ */ jsxs("div", {
|
|
1695
1703
|
className: "mt-8 pt-8 border-t border-subtle space-y-4",
|
|
1696
1704
|
children: [/* @__PURE__ */ jsx("p", {
|
|
@@ -2007,7 +2015,7 @@ const EagerMdxElement = ({ moduleLoader, moduleKey, route, components, collectio
|
|
|
2007
2015
|
if (!MDXComponent) return /* @__PURE__ */ jsx(Loading, {});
|
|
2008
2016
|
return /* @__PURE__ */ jsx(MdxPage, {
|
|
2009
2017
|
MDXComponent,
|
|
2010
|
-
mdxComponents: components,
|
|
2018
|
+
mdxComponents: components ?? {},
|
|
2011
2019
|
collectionPostComponent
|
|
2012
2020
|
});
|
|
2013
2021
|
};
|
|
@@ -2016,14 +2024,36 @@ const NotFoundWrapper = () => {
|
|
|
2016
2024
|
return /* @__PURE__ */ jsx(components.NotFound || components["404"] || NotFound, {});
|
|
2017
2025
|
};
|
|
2018
2026
|
|
|
2027
|
+
//#endregion
|
|
2028
|
+
//#region src/client/app/doc-route-context.tsx
|
|
2029
|
+
/**
|
|
2030
|
+
* Context that exposes the currently active route to every primitive in the
|
|
2031
|
+
* tree. Slot renderers and other primitives consume it via `useDocRoute()`
|
|
2032
|
+
* instead of calling `useRoutes()` directly so a single computation is shared
|
|
2033
|
+
* across the whole layout.
|
|
2034
|
+
*
|
|
2035
|
+
* `undefined` means "no active route" (e.g. on a not-found page or before the
|
|
2036
|
+
* routes context has hydrated).
|
|
2037
|
+
*/
|
|
2038
|
+
const DocRouteContext = createContext(void 0);
|
|
2039
|
+
function DocRouteProvider({ value, children }) {
|
|
2040
|
+
return /* @__PURE__ */ jsx(DocRouteContext.Provider, {
|
|
2041
|
+
value,
|
|
2042
|
+
children
|
|
2043
|
+
});
|
|
2044
|
+
}
|
|
2045
|
+
|
|
2019
2046
|
//#endregion
|
|
2020
2047
|
//#region src/client/app/docs-layout.tsx
|
|
2021
2048
|
function DocsLayout({ collectionsData }) {
|
|
2022
2049
|
const { currentRoute } = useRoutes();
|
|
2023
|
-
const content = /* @__PURE__ */ jsx(
|
|
2024
|
-
|
|
2025
|
-
children: /* @__PURE__ */ jsx(
|
|
2026
|
-
|
|
2050
|
+
const content = /* @__PURE__ */ jsx(DocRouteProvider, {
|
|
2051
|
+
value: currentRoute,
|
|
2052
|
+
children: /* @__PURE__ */ jsx(InternalErrorBoundary, { children: /* @__PURE__ */ jsx(UserLayout, {
|
|
2053
|
+
route: currentRoute,
|
|
2054
|
+
children: /* @__PURE__ */ jsx(Outlet, {})
|
|
2055
|
+
}) })
|
|
2056
|
+
});
|
|
2027
2057
|
if (collectionsData) return /* @__PURE__ */ jsx(CollectionsContext.Provider, {
|
|
2028
2058
|
value: collectionsData,
|
|
2029
2059
|
children: content
|
|
@@ -2116,15 +2146,15 @@ function buildDocRoutes(options) {
|
|
|
2116
2146
|
moduleKey,
|
|
2117
2147
|
moduleLoader: mod,
|
|
2118
2148
|
route,
|
|
2119
|
-
components
|
|
2149
|
+
components: components ?? {}
|
|
2120
2150
|
}, moduleKey || path);
|
|
2121
2151
|
} };
|
|
2122
2152
|
};
|
|
2123
2153
|
else routeRecord.element = /* @__PURE__ */ jsx(EagerMdxElement, {
|
|
2124
2154
|
moduleKey,
|
|
2125
|
-
moduleLoader,
|
|
2155
|
+
moduleLoader: moduleLoader ?? {},
|
|
2126
2156
|
route,
|
|
2127
|
-
components
|
|
2157
|
+
components: components ?? {}
|
|
2128
2158
|
}, moduleKey || path);
|
|
2129
2159
|
return routeRecord;
|
|
2130
2160
|
});
|
|
@@ -2223,6 +2253,15 @@ function buildDocRoutes(options) {
|
|
|
2223
2253
|
};
|
|
2224
2254
|
}
|
|
2225
2255
|
|
|
2256
|
+
//#endregion
|
|
2257
|
+
//#region src/client/ssg/external-page-wrapper.tsx
|
|
2258
|
+
function ExternalPageWrapper({ children }) {
|
|
2259
|
+
return /* @__PURE__ */ jsx("div", {
|
|
2260
|
+
className: "boltdocs-external-content h-screen overflow-y-auto",
|
|
2261
|
+
children
|
|
2262
|
+
});
|
|
2263
|
+
}
|
|
2264
|
+
|
|
2226
2265
|
//#endregion
|
|
2227
2266
|
//#region src/client/ssg/create-routes.external.tsx
|
|
2228
2267
|
function buildExternalRoutes(options) {
|
|
@@ -2241,11 +2280,12 @@ function buildExternalRoutes(options) {
|
|
|
2241
2280
|
locale: config.i18n?.defaultLocale,
|
|
2242
2281
|
title: rawPath === "/" ? "Home" : rawPath.replace(/^\//, "").split("/").pop() || "Page",
|
|
2243
2282
|
filePath: "",
|
|
2283
|
+
componentPath: "",
|
|
2244
2284
|
headings: []
|
|
2245
2285
|
});
|
|
2246
2286
|
children.push({
|
|
2247
2287
|
path,
|
|
2248
|
-
element: /* @__PURE__ */ jsx(EffectiveExternalLayout, { children: /* @__PURE__ */ jsx(ExtComponent, {}) }),
|
|
2288
|
+
element: /* @__PURE__ */ jsx(ExternalPageWrapper, { children: /* @__PURE__ */ jsx(EffectiveExternalLayout, { children: /* @__PURE__ */ jsx(ExtComponent, {}) }) }),
|
|
2249
2289
|
loader: async () => ({
|
|
2250
2290
|
path,
|
|
2251
2291
|
locale: config.i18n?.defaultLocale
|
|
@@ -2259,11 +2299,12 @@ function buildExternalRoutes(options) {
|
|
|
2259
2299
|
locale,
|
|
2260
2300
|
title: rawPath,
|
|
2261
2301
|
filePath: "",
|
|
2302
|
+
componentPath: "",
|
|
2262
2303
|
headings: []
|
|
2263
2304
|
});
|
|
2264
2305
|
children.push({
|
|
2265
2306
|
path: localePath,
|
|
2266
|
-
element: /* @__PURE__ */ jsx(EffectiveExternalLayout, { children: /* @__PURE__ */ jsx(ExtComponent, {}) }),
|
|
2307
|
+
element: /* @__PURE__ */ jsx(ExternalPageWrapper, { children: /* @__PURE__ */ jsx(EffectiveExternalLayout, { children: /* @__PURE__ */ jsx(ExtComponent, {}) }) }),
|
|
2267
2308
|
loader: async () => ({
|
|
2268
2309
|
path: localePath,
|
|
2269
2310
|
locale
|
|
@@ -2566,7 +2607,7 @@ function createRoutes(options) {
|
|
|
2566
2607
|
...collectionRoutes.children,
|
|
2567
2608
|
{
|
|
2568
2609
|
path: "*",
|
|
2569
|
-
element: /* @__PURE__ */ jsx(EffectiveExternalLayout, { children: /* @__PURE__ */ jsx(NotFoundWrapper, {}) })
|
|
2610
|
+
element: /* @__PURE__ */ jsx(ExternalPageWrapper, { children: /* @__PURE__ */ jsx(EffectiveExternalLayout, { children: /* @__PURE__ */ jsx(NotFoundWrapper, {}) }) })
|
|
2570
2611
|
}
|
|
2571
2612
|
];
|
|
2572
2613
|
return [{
|
|
@@ -2586,6 +2627,14 @@ function createRoutes(options) {
|
|
|
2586
2627
|
|
|
2587
2628
|
//#endregion
|
|
2588
2629
|
//#region src/client/components/docs-layout-default.tsx
|
|
2630
|
+
/**
|
|
2631
|
+
* Default docs layout — composes the visual primitives and delegates
|
|
2632
|
+
* sub-area routing to them. Slot rendering (plugin injections at
|
|
2633
|
+
* `navbar:end`, `sidebar:bottom`, `docs-content:top`, etc.) is handled
|
|
2634
|
+
* internally by each primitive so the layout itself does no slot "magic".
|
|
2635
|
+
*
|
|
2636
|
+
* A custom layout can reuse any primitive and the slot wiring just works.
|
|
2637
|
+
*/
|
|
2589
2638
|
function DocsLayoutComponent({ children }) {
|
|
2590
2639
|
const { routes: filteredRoutes, currentRoute, isCollectionPage } = useRoutes();
|
|
2591
2640
|
const config = useConfig();
|
|
@@ -2598,43 +2647,40 @@ function DocsLayoutComponent({ children }) {
|
|
|
2598
2647
|
routes: filteredRoutes || [],
|
|
2599
2648
|
config
|
|
2600
2649
|
}),
|
|
2601
|
-
/* @__PURE__ */ jsx(DocsLayout$1.Content, {
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2650
|
+
/* @__PURE__ */ jsx(DocsLayout$1.Content, { children: /* @__PURE__ */ jsxs(DocsLayout$1.ContentMdx, { children: [
|
|
2651
|
+
!isCollectionPage && /* @__PURE__ */ jsxs(DocsLayout$1.Header, { children: [
|
|
2652
|
+
/* @__PURE__ */ jsxs("div", {
|
|
2653
|
+
className: "mb-4 border-b border-subtle pb-4 flex flex-wrap items-center justify-between gap-3",
|
|
2654
|
+
children: [/* @__PURE__ */ jsx(Breadcrumbs, {}), /* @__PURE__ */ jsx(CopyMarkdown, {
|
|
2655
|
+
mdxRaw: currentRoute?._rawContent,
|
|
2656
|
+
route: currentRoute
|
|
2657
|
+
})]
|
|
2658
|
+
}),
|
|
2659
|
+
currentRoute?.title && /* @__PURE__ */ jsx("h1", {
|
|
2660
|
+
className: "text-4xl font-bold tracking-tight text-default mb-3",
|
|
2661
|
+
children: currentRoute.title
|
|
2662
|
+
}),
|
|
2663
|
+
currentRoute?.description && /* @__PURE__ */ jsx("p", {
|
|
2664
|
+
className: "text-lg text-muted-foreground mb-6 leading-relaxed",
|
|
2665
|
+
children: currentRoute.description
|
|
2666
|
+
})
|
|
2667
|
+
] }),
|
|
2668
|
+
/* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsx("div", {
|
|
2669
|
+
className: "prose prose-neutral dark:prose-invert max-w-none",
|
|
2670
|
+
children
|
|
2671
|
+
}) }),
|
|
2672
|
+
!isCollectionPage && /* @__PURE__ */ jsx(Feedback, {}),
|
|
2673
|
+
!isCollectionPage && /* @__PURE__ */ jsx(Giscus, {}),
|
|
2674
|
+
/* @__PURE__ */ jsx(DocsLayout$1.Footer, { children: !isCollectionPage && /* @__PURE__ */ jsx(PageNav, {}) })
|
|
2675
|
+
] }) }),
|
|
2676
|
+
/* @__PURE__ */ jsx("div", {
|
|
2677
|
+
className: "overflow-y-auto sticky",
|
|
2678
|
+
children: /* @__PURE__ */ jsx(OnThisPage, {
|
|
2679
|
+
headings: currentRoute?.headings,
|
|
2680
|
+
filePath: currentRoute?.filePath,
|
|
2681
|
+
communityHelp: config.theme?.communityHelp,
|
|
2682
|
+
editLink: config.theme?.editLink
|
|
2631
2683
|
})
|
|
2632
|
-
}),
|
|
2633
|
-
/* @__PURE__ */ jsx(OnThisPage, {
|
|
2634
|
-
headings: currentRoute?.headings,
|
|
2635
|
-
filePath: currentRoute?.filePath,
|
|
2636
|
-
communityHelp: config.theme?.communityHelp,
|
|
2637
|
-
editLink: config.theme?.editLink
|
|
2638
2684
|
})
|
|
2639
2685
|
]
|
|
2640
2686
|
})]
|
|
@@ -2656,4 +2702,4 @@ const reactToText = (node, resolvers) => {
|
|
|
2656
2702
|
};
|
|
2657
2703
|
|
|
2658
2704
|
//#endregion
|
|
2659
|
-
export { Banner, BoltdocsShell, Breadcrumbs, CollectionsContext, CopyMarkdown, CurrentPostProvider, DocsLayoutComponent as DocsLayout, ErrorBoundary, MdxPage, Navbar, NotFound, OnThisPage, PageNav, SearchDialog, Sidebar, 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 };
|
|
2705
|
+
export { Banner, BoltdocsShell, Breadcrumbs, CollectionsContext, CopyMarkdown, CurrentPostProvider, DocsLayoutComponent as DocsLayout, ErrorBoundary, MdxPage, Navbar, NotFound, OnThisPage, PageNav, SearchDialog, Sidebar, Timeline, 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 };
|
package/dist/client/mdx.cjs
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
7
|
-
const require_mdx = require('../mdx-
|
|
7
|
+
const require_mdx = require('../mdx-CD-tSjRG.cjs');
|
|
8
8
|
|
|
9
9
|
//#region src/client/mdx.ts
|
|
10
10
|
const { Card, Cards, Callout, Field, Image } = require_mdx.mdx_components_default;
|
package/dist/client/mdx.d.cts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/client/components/mdx/card.d.ts
|
|
5
|
-
interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
interface CardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
6
6
|
title?: React.ReactNode;
|
|
7
7
|
icon?: React.ReactNode;
|
|
8
8
|
href?: string;
|
package/dist/client/mdx.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/client/components/mdx/card.d.ts
|
|
5
|
-
interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
interface CardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> {
|
|
6
6
|
title?: React.ReactNode;
|
|
7
7
|
icon?: React.ReactNode;
|
|
8
8
|
href?: string;
|
package/dist/client/mdx.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Copyright (c) 2026 Jesus Alcala
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
import { t as mdx_components_default } from "../mdx-
|
|
6
|
+
import { t as mdx_components_default } from "../mdx-BuO6a1f7.js";
|
|
7
7
|
|
|
8
8
|
//#region src/client/mdx.ts
|
|
9
9
|
const { Card, Cards, Callout, Field, Image } = mdx_components_default;
|