boltdocs 3.3.5 → 3.4.0
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-BKzKe2mO.mjs → adapters-BXiBWAKs.mjs} +1 -1
- package/dist/{adapters-DwDTQoCG.cjs → adapters-Czl3WtQt.cjs} +1 -1
- package/dist/{build-B672n0hL.cjs → build-CNkXRdk8.cjs} +1 -1
- package/dist/{build-BVoMHMhw.mjs → build-CqUBsXVC.mjs} +1 -1
- package/dist/client/index.cjs +245 -56
- package/dist/client/index.d.cts +3 -3
- package/dist/client/index.d.ts +3 -3
- package/dist/client/index.js +246 -60
- package/dist/client/mdx.cjs +1 -1
- package/dist/client/mdx.js +1 -1
- package/dist/client/primitives.cjs +5 -5
- package/dist/client/primitives.d.cts +92 -42
- package/dist/client/primitives.d.ts +101 -51
- package/dist/client/primitives.js +4 -4
- package/dist/client/router.cjs +1 -1
- package/dist/client/router.d.cts +1 -1
- package/dist/client/router.d.ts +1 -1
- package/dist/client/router.js +1 -1
- package/dist/client/theme/reset.css +41 -0
- package/dist/config-B3SEoVjG.cjs +7 -0
- package/dist/{config-PLvresCv.cjs → config-Bfakeadu.cjs} +1 -1
- package/dist/config-CTcfF-0c.mjs +7 -0
- package/dist/dev-D1DmOSjn.mjs +6 -0
- package/dist/dev-DH6cSge8.cjs +6 -0
- package/dist/{docs-layout-CbZ7LDRe.js → docs-layout-CmntYM6p.js} +46 -147
- package/dist/{docs-layout-vzfXed1Q.cjs → docs-layout-DIgxJ5c7.cjs} +23 -130
- package/dist/{doctor-DMECtdK6.cjs → doctor-BLxm2alc.cjs} +1 -1
- package/dist/{doctor-FuFY1jBz.cjs → doctor-Dd-JMTRo.cjs} +1 -1
- package/dist/{doctor-i8Qmd8DJ.mjs → doctor-DogHujrP.mjs} +1 -1
- package/dist/{image-Hnaa2bJd.cjs → image-Bke2ojW1.cjs} +3 -3
- package/dist/{image-B-NDSDuY.js → image-CaY2w0ua.js} +2 -1
- package/dist/index--xbYbT8N.d.ts +343 -0
- package/dist/{index-Bg-JtZeK.d.cts → index-B_o5y34l.d.cts} +112 -13
- package/dist/{index-B3o307nd.d.ts → index-Bx0CUd7Q.d.ts} +112 -13
- package/dist/index-RK7W_Fxy.d.cts +343 -0
- package/dist/{link-CgdI6O2o.js → link-CSe_oD8Y.js} +137 -139
- package/dist/{link-vZjmD-es.cjs → link-Xb69Oy2F.cjs} +144 -169
- package/dist/{mdx-D0Absdq5.cjs → mdx-BCOrMd-P.cjs} +68 -16
- package/dist/{mdx-BRT71V5Q.js → mdx-BijiEbkp.js} +62 -15
- package/dist/{native-nLA4Jr0T.cjs → native-BbtRkce5.cjs} +1 -1
- package/dist/node/cli-entry.cjs +1 -1
- package/dist/node/cli-entry.mjs +1 -1
- package/dist/node/highlight.d.cts +2 -2
- package/dist/node/highlight.d.mts +2 -2
- package/dist/node/index.cjs +1 -1
- package/dist/node/index.d.cts +19 -37
- package/dist/node/index.d.mts +20 -38
- package/dist/node/index.mjs +1 -1
- package/dist/node/mdx/shiki-adapter.cjs +1 -1
- package/dist/node/mdx/shiki-adapter.d.cts +7 -2
- package/dist/node/mdx/shiki-adapter.d.mts +7 -2
- package/dist/node/mdx/shiki-adapter.mjs +1 -1
- package/dist/node-BgiLCa0I.cjs +39 -0
- package/dist/node-Da3tYBHo.mjs +39 -0
- package/dist/{package-CNqjEYE1.cjs → package-D1gVs5gQ.cjs} +1 -1
- package/dist/{package-sdcKhDhe.mjs → package-YgQJn3Yh.mjs} +1 -1
- package/dist/pages-external-B_r6gvqP.cjs +6 -0
- package/dist/pages-external-jmK7AHaO.mjs +6 -0
- package/dist/{parser-CD8Oo8qh.mjs → parser-CvNZc5s3.mjs} +1 -1
- package/dist/{parser-vPaKvzLp.cjs → parser-DJLWTiO-.cjs} +1 -1
- package/dist/plugin-DW9K2fW5.mjs +69 -0
- package/dist/plugin-NwGKyTJX.cjs +69 -0
- package/dist/{plugin-context-DuSg-Hax.mjs → plugin-context-COh-cbsW.mjs} +1 -1
- package/dist/{plugin-context-CscLcXjH.cjs → plugin-context-FIHaWn6r.cjs} +2 -2
- package/dist/{plugin-lifecycle-BywrEoWK.cjs → plugin-lifecycle-D9fTRaWY.cjs} +1 -1
- package/dist/{registry-BbB6NqSv.d.cts → registry-BFmzj1yg.d.mts} +1 -1
- package/dist/{registry-sJqDv0kE.d.mts → registry-BoswPzYV.d.cts} +1 -1
- package/dist/{resolve-C5rT6B21.mjs → resolve-5puUe7eS.mjs} +1 -1
- package/dist/{resolve-BelytNYR.cjs → resolve-CF4ZLfqx.cjs} +1 -1
- package/dist/route-paths-B6ocUfNY.cjs +6 -0
- package/dist/route-paths-DyDji4bX.mjs +6 -0
- package/dist/{router-CZBxMRAH.js → router-B5e8k4qK.js} +175 -10
- package/dist/{router-C3kygdRK.cjs → router-DKC0Lu0n.cjs} +204 -9
- package/dist/{routes-C3_w9fLX.cjs → routes-D55M8UrH.cjs} +1 -1
- package/dist/routes-DdE6Lfcl.cjs +6 -0
- package/dist/routes-_I_8PQYF.mjs +6 -0
- package/dist/{search-dialog-x_qHU8ty.cjs → search-dialog-BOQRHKTb.cjs} +197 -24
- package/dist/{search-dialog-BqkzDTq2.js → search-dialog-BXil4_7P.js} +190 -29
- package/dist/search-dialog-CwlBd-Mu.cjs +747 -0
- package/dist/{search-dialog-B9mdxsUC.js → search-dialog-D3Obh3eA.js} +1 -1
- package/dist/search-dialog-DeplpVEB.js +717 -0
- package/dist/{search-dialog-DCtm2dyR.cjs → search-dialog-cHXR5zhL.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/ssg-static-options-Br1_u9qp.mjs +6 -0
- package/dist/ssg-static-options-CVvGKM8i.cjs +6 -0
- package/dist/types-58Ac3UGI.d.cts +114 -0
- package/dist/types-BwnGf-1E.d.mts +114 -0
- package/dist/virtual-modules-C4-qxFlL.cjs +40 -0
- package/dist/virtual-modules-DiWUKJGP.mjs +40 -0
- package/package.json +8 -5
- package/src/shared/types.ts +133 -987
- package/dist/config-CrsQJHQz.cjs +0 -7
- package/dist/config-DC0nMMk7.mjs +0 -7
- package/dist/dev-B49V6O6p.mjs +0 -6
- package/dist/dev-DbuhNcF5.cjs +0 -6
- package/dist/index-CgWkOCCn.d.cts +0 -1193
- package/dist/index-CuNSD3E2.d.ts +0 -1193
- package/dist/node-BljvHMpS.cjs +0 -23
- package/dist/node-CWxGw4H4.mjs +0 -23
- package/dist/pages-external-BBw8ObVK.mjs +0 -6
- package/dist/pages-external-DPiPFxxP.cjs +0 -6
- package/dist/plugin-BPcm1cU0.mjs +0 -69
- package/dist/plugin-WUhxnpko.cjs +0 -69
- package/dist/routes-C0kb4ue6.cjs +0 -6
- package/dist/routes-C4wrLWwu.mjs +0 -6
- package/dist/search-dialog-Bp_ouN1c.cjs +0 -550
- package/dist/search-dialog-an2BNMj6.js +0 -526
- package/dist/types-Db6zToZH.d.mts +0 -975
- package/dist/types-o7iZ2BAR.d.cts +0 -975
- package/dist/virtual-modules-B2X4Ht2r.mjs +0 -39
- package/dist/virtual-modules-DPsdHKcu.cjs +0 -39
- /package/dist/{audit-CMc_ydRr.mjs → audit-CYAkXXvP.mjs} +0 -0
- /package/dist/{audit-CHkGiV3c.cjs → audit-DxCZZTuX.cjs} +0 -0
- /package/dist/{csp-BiGAG8aF.cjs → csp-B-gc2Iha.cjs} +0 -0
- /package/dist/{csp-D0BOH8ae.mjs → csp-f8DOcI_7.mjs} +0 -0
- /package/dist/{generator-BCrZL53x.cjs → generator-CBAPKY6r.cjs} +0 -0
- /package/dist/{generator-CFukoGa0.mjs → generator-MRpn-yp6.mjs} +0 -0
- /package/dist/{handler-Lex5DbvG.mjs → handler-DBZqoWt2.mjs} +0 -0
- /package/dist/{handler-Ch-Q9NAB.cjs → handler-ryZR9Q41.cjs} +0 -0
- /package/dist/{index-HAwIo4nZ.d.mts → index-CPr34I2C.d.mts} +0 -0
- /package/dist/{native-BYKMke79.mjs → native-DZ6WMwjG.mjs} +0 -0
- /package/dist/{native-BOet8hpE.cjs → native-DeKxny_T.cjs} +0 -0
- /package/dist/{update-check-BXD1atVv.mjs → update-check-BXx8te9F.mjs} +0 -0
- /package/dist/{update-check-DFQZyoSU.cjs → update-check-CiIeC7CX.cjs} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { Q as CreateRoutesResult,
|
|
2
|
+
import { Q as CreateRoutesResult, ct as BoltdocsIntegrationsConfig, ft as BoltdocsRoutePathWithFallback, gt as JsonLdObject, ht as BoltdocsVersion, lt as BoltdocsLocale, ot as BadgeValue, pt as BoltdocsSocialLink, st as BoltdocsConfig, ut as BoltdocsMdxComponents, yt as StructuredData$1 } from "./index-RK7W_Fxy.cjs";
|
|
3
3
|
import * as React$2 from "react";
|
|
4
4
|
import React$1, { ComponentType, JSXElementConstructor, ReactNode, SVGProps } from "react";
|
|
5
5
|
import { ViteReactSSG } from "@bdocs/ssg";
|
|
@@ -272,19 +272,45 @@ type MdxPageProps = {
|
|
|
272
272
|
MDXComponent: React.ComponentType<React.PropsWithChildren<unknown>>;
|
|
273
273
|
mdxComponents: Record<string, React.ComponentType<HTMLElement>>;
|
|
274
274
|
collectionPostComponent?: React.ComponentType<any>;
|
|
275
|
+
/**
|
|
276
|
+
* Name of the collection this route belongs to, when it has one.
|
|
277
|
+
*
|
|
278
|
+
* The layout must not depend on data that arrives asynchronously. Route
|
|
279
|
+
* metadata is known synchronously from the route table, whereas the loader
|
|
280
|
+
* data is not: on the client the first render happens with no loader data,
|
|
281
|
+
* because the generated entry declares `hasLoaderData={false}`. Deciding the
|
|
282
|
+
* layout from the loader therefore picked the documentation layout for a
|
|
283
|
+
* collection post, while the server had rendered the collection layout. React
|
|
284
|
+
* saw two different first children and discarded the whole page (error #418).
|
|
285
|
+
*
|
|
286
|
+
* A project that declares a collection should not have to know this, so the
|
|
287
|
+
* route table supplies the answer directly and the loader is only a fallback
|
|
288
|
+
* for callers that render `MdxPage` directly.
|
|
289
|
+
*/
|
|
290
|
+
collection?: string;
|
|
291
|
+
/**
|
|
292
|
+
* Route metadata for the current page, when known synchronously.
|
|
293
|
+
*
|
|
294
|
+
* `usePost()` reads from `CurrentPostProvider`, and a collection layout calls
|
|
295
|
+
* it on its first render. Passing the route keeps that first render complete
|
|
296
|
+
* instead of rendering a header with no title and then filling it in.
|
|
297
|
+
*/
|
|
298
|
+
route?: ComponentRoute;
|
|
275
299
|
};
|
|
276
300
|
/**
|
|
277
301
|
* Renders an MDX page by consuming pre-loaded route data.
|
|
278
302
|
*
|
|
279
|
-
* - If the route belongs to a collection
|
|
280
|
-
*
|
|
281
|
-
*
|
|
303
|
+
* - If the route belongs to a collection, wraps the content with
|
|
304
|
+
* `CurrentPostProvider` so that `usePost()` (called without a slug) can read
|
|
305
|
+
* the current post's data from context.
|
|
282
306
|
* - Otherwise, renders the standard `DocPage` layout.
|
|
283
307
|
*/
|
|
284
308
|
declare function MdxPage({
|
|
285
309
|
MDXComponent,
|
|
286
310
|
mdxComponents: propComponents,
|
|
287
|
-
collectionPostComponent: CollectionPost
|
|
311
|
+
collectionPostComponent: CollectionPost,
|
|
312
|
+
collection,
|
|
313
|
+
route: routeProp
|
|
288
314
|
}: MdxPageProps): _$react_jsx_runtime0.JSX.Element | null;
|
|
289
315
|
//#endregion
|
|
290
316
|
//#region src/client/ssg/boltdocs-shell.d.ts
|
|
@@ -302,6 +328,50 @@ declare function BoltdocsShell({
|
|
|
302
328
|
contentClassName?: string;
|
|
303
329
|
}): _$react_jsx_runtime0.JSX.Element;
|
|
304
330
|
//#endregion
|
|
331
|
+
//#region src/client/collections/utils.d.ts
|
|
332
|
+
/**
|
|
333
|
+
* Formats a date to a human-readable string.
|
|
334
|
+
*
|
|
335
|
+
* Locale and time zone are pinned so the server and the browser produce
|
|
336
|
+
* identical text during hydration. See `formatDeterministicDate`.
|
|
337
|
+
*/
|
|
338
|
+
declare function formatDate(date: string | Date | undefined | null, options?: {
|
|
339
|
+
month?: 'numeric' | '2-digit' | 'long' | 'short';
|
|
340
|
+
day?: 'numeric' | '2-digit';
|
|
341
|
+
}): string;
|
|
342
|
+
//#endregion
|
|
343
|
+
//#region src/client/utils/date.d.ts
|
|
344
|
+
/**
|
|
345
|
+
* Deterministic date formatting for server-rendered output.
|
|
346
|
+
*
|
|
347
|
+
* `toLocaleDateString` with no locale resolves against the *runtime* default,
|
|
348
|
+
* which is not the same in Node and in a browser: the server rendered
|
|
349
|
+
* "26 de septiembre de 2026" from an `es` system locale while the client
|
|
350
|
+
* produced "September 26, 2026". That is a text mismatch during hydration and
|
|
351
|
+
* React throws away the server HTML and re-renders the whole page.
|
|
352
|
+
*
|
|
353
|
+
* The time zone has to be pinned for the same reason. A frontmatter date such
|
|
354
|
+
* as `2026-09-27` parses as UTC midnight, so any zone behind UTC renders the
|
|
355
|
+
* previous day and any zone ahead renders the correct one, which is a second,
|
|
356
|
+
* environment-dependent mismatch.
|
|
357
|
+
*
|
|
358
|
+
* Both are therefore explicit here. Callers that genuinely want a different
|
|
359
|
+
* locale can pass one, and it is still deterministic because it is fixed in
|
|
360
|
+
* the markup rather than inferred.
|
|
361
|
+
*/
|
|
362
|
+
/**
|
|
363
|
+
* Formats a date as a stable, locale- and zone-pinned string.
|
|
364
|
+
*
|
|
365
|
+
* Returns an empty string for values that are not real dates so callers can
|
|
366
|
+
* render nothing rather than "Invalid Date".
|
|
367
|
+
*/
|
|
368
|
+
declare function formatDeterministicDate(date: string | number | Date | undefined | null, options?: {
|
|
369
|
+
locale?: string;
|
|
370
|
+
timeZone?: string;
|
|
371
|
+
month?: 'numeric' | '2-digit' | 'long' | 'short' | 'narrow';
|
|
372
|
+
day?: 'numeric' | '2-digit';
|
|
373
|
+
}): string;
|
|
374
|
+
//#endregion
|
|
305
375
|
//#region src/client/app/config-context.d.ts
|
|
306
376
|
/**
|
|
307
377
|
* Hook to access the Boltdocs configuration.
|
|
@@ -339,7 +409,13 @@ declare function useUI(): {
|
|
|
339
409
|
declare function useNavbar(): {
|
|
340
410
|
links: NavbarLink[];
|
|
341
411
|
title: string;
|
|
342
|
-
logo:
|
|
412
|
+
logo: {
|
|
413
|
+
light: string;
|
|
414
|
+
dark: null;
|
|
415
|
+
} | {
|
|
416
|
+
light: string;
|
|
417
|
+
dark: string;
|
|
418
|
+
} | null;
|
|
343
419
|
logoProps: {
|
|
344
420
|
alt: string;
|
|
345
421
|
width: number | undefined;
|
|
@@ -395,7 +471,14 @@ declare function useSidebar(routes: ComponentRoute[]): {
|
|
|
395
471
|
};
|
|
396
472
|
//#endregion
|
|
397
473
|
//#region src/client/hooks/use-search.d.ts
|
|
398
|
-
|
|
474
|
+
type SearchStatus = 'idle' | 'loading' | 'indexing' | 'ready' | 'searching' | 'error';
|
|
475
|
+
interface SearchHotContext {
|
|
476
|
+
on: (event: string, callback: (payload?: unknown) => void) => void;
|
|
477
|
+
off?: (event: string, callback: (payload?: unknown) => void) => void;
|
|
478
|
+
}
|
|
479
|
+
declare function useSearch(routes: ComponentRoute[], options?: {
|
|
480
|
+
hot?: SearchHotContext;
|
|
481
|
+
}): {
|
|
399
482
|
isOpen: boolean;
|
|
400
483
|
setIsOpen: React$2.Dispatch<React$2.SetStateAction<boolean>>;
|
|
401
484
|
query: string;
|
|
@@ -407,12 +490,17 @@ declare function useSearch(routes: ComponentRoute[]): {
|
|
|
407
490
|
bio: string;
|
|
408
491
|
groupTitle: string | undefined;
|
|
409
492
|
}[];
|
|
493
|
+
status: SearchStatus;
|
|
494
|
+
isLoading: boolean;
|
|
495
|
+
isIndexing: boolean;
|
|
496
|
+
error: Error | null;
|
|
410
497
|
searchDataLoading: boolean;
|
|
411
498
|
searchDataError: Error | null;
|
|
499
|
+
searchError: Error | null;
|
|
412
500
|
handleSelect: (key: React.Key) => void;
|
|
413
501
|
input: {
|
|
414
502
|
value: string;
|
|
415
|
-
onChange: (
|
|
503
|
+
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
416
504
|
};
|
|
417
505
|
};
|
|
418
506
|
//#endregion
|
|
@@ -667,8 +755,16 @@ declare function SidebarHeader({
|
|
|
667
755
|
*/
|
|
668
756
|
declare function SidebarContent({
|
|
669
757
|
children,
|
|
670
|
-
className
|
|
671
|
-
|
|
758
|
+
className,
|
|
759
|
+
label
|
|
760
|
+
}: ComponentBase & {
|
|
761
|
+
/**
|
|
762
|
+
* Accessible name for the nav landmark. Pages render multiple navs
|
|
763
|
+
* (navbar links, sidebar); unlabeled landmarks fail axe's
|
|
764
|
+
* `landmark-unique` rule.
|
|
765
|
+
*/
|
|
766
|
+
label?: string;
|
|
767
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
672
768
|
/**
|
|
673
769
|
* Navigation Group
|
|
674
770
|
*/
|
|
@@ -1200,10 +1296,13 @@ interface ViewTransitionRunner {
|
|
|
1200
1296
|
enabled: boolean;
|
|
1201
1297
|
/** Whether the current browser exposes the native API. */
|
|
1202
1298
|
supported: boolean;
|
|
1299
|
+
/** Whether the visitor asked the OS to reduce motion. */
|
|
1300
|
+
reducedMotion: boolean;
|
|
1203
1301
|
}
|
|
1204
1302
|
/**
|
|
1205
|
-
* Starts a native document transition when the browser supports it
|
|
1206
|
-
*
|
|
1303
|
+
* Starts a native document transition when the browser supports it and the
|
|
1304
|
+
* visitor has not asked for reduced motion. Otherwise the update still runs
|
|
1305
|
+
* normally and the function returns null.
|
|
1207
1306
|
*/
|
|
1208
1307
|
declare function startViewTransition(update: ViewTransitionUpdate, options?: ViewTransitionOptions): ViewTransitionHandle | null;
|
|
1209
1308
|
/**
|
|
@@ -1351,4 +1450,4 @@ declare function useCodeBlockFeedback(options?: UseCodeBlockFeedbackOptions): {
|
|
|
1351
1450
|
enabled: boolean;
|
|
1352
1451
|
};
|
|
1353
1452
|
//#endregion
|
|
1354
|
-
export { SidebarItem as $, cn as A, useUI as At, NotFound as B,
|
|
1453
|
+
export { SidebarItem as $, TabsProps as $t, cn as A, useUI as At, NotFound as B, CollectionPost$1 as Bt, createArticleStructuredData as C, usePageNav as Ct, defineStructuredData as D, useSearch as Dt, createWebSiteStructuredData as E, useTabs as Et, TimelineVariant as F, formatDate as Ft, Breadcrumbs as G, CollectionListLoaderData as Gt, CopyMarkdown as H, CollectionsData as Ht, usePost as I, ViteReactSSG as It, Sidebar$1 as J, LayoutProps as Jt, OnThisPage as K, CollectionPostLoaderData as Kt, usePosts as L, BoltdocsShell as Lt, TimelineBadgeConfig as M, useTheme as Mt, TimelineItemProps as N, useConfig as Nt, getTranslated as O, useSidebar as Ot, TimelineProps as P, formatDeterministicDate as Pt, SidebarHeader as Q, SiteConfig as Qt, useRecentPosts as R, MdxPage as Rt, WebSiteStructuredDataOptions as S, useBreadcrumbs as St, createStructuredData as T, useVersion as Tt, ErrorBoundary as U, CurrentPostProvider as Ut, SearchDialog as V, CollectionsContext as Vt, PageNav as W, BoltdocsTab as Wt, SidebarGroup as X, OnThisPageProps as Xt, SidebarContent as Y, NavbarLink as Yt, SidebarGroupRenderProps as Z, SidebarProps$1 as Zt, StructuredData as _, useTrackEvent as _t, useExpandable as a, SidebarLinkProps as at, BreadcrumbStructuredDataItem as b, useLocalizedTo as bt, getStarsRepo as c, SidebarSlots as ct, ViewTransitionHandle as d, Navbar as dt, SidebarItemProps as et, ViewTransitionOptions as f, DocsLayoutComponent as ft, useViewTransition as g, useAnalytics as gt, startViewTransition as h, useHeadings as ht, UseExpandableOptions as i, SidebarLink as it, Timeline as j, useMdxComponents as jt, resolvePublicAssetUrl as k, useNavbar as kt, copyToClipboard as l, SidebarSubGroup as lt, ViewTransitionUpdate as m, useMergedComponents as mt, UseCodeBlockFeedbackOptions as n, SidebarItems$1 as nt, useCopyButton as o, SidebarMobile as ot, ViewTransitionRunner as p, useFeedback as pt, Sidebar as q, ComponentRoute as qt, useCodeBlockFeedback as r, SidebarItemsProps as rt, useCodeBlock as s, SidebarRoot as st, CodeBlockFeedbackPayload as t, SidebarItemRenderProps as tt, reactToText as u, ComponentBase as ut, StructuredDataProps as v, useTrackPageView as vt, createBreadcrumbStructuredData as w, useI18n as wt, StructuredDataFactoryOptions as x, useRoutes as xt, ArticleStructuredDataOptions as y, useSearchHighlight as yt, Banner as z, createRoutes as zt };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { Q as CreateRoutesResult,
|
|
2
|
+
import { Q as CreateRoutesResult, ct as BoltdocsIntegrationsConfig, ft as BoltdocsRoutePathWithFallback, gt as JsonLdObject, ht as BoltdocsVersion, lt as BoltdocsLocale, ot as BadgeValue, pt as BoltdocsSocialLink, st as BoltdocsConfig, ut as BoltdocsMdxComponents, yt as StructuredData$1 } from "./index--xbYbT8N.js";
|
|
3
3
|
import { ViteReactSSG } from "@bdocs/ssg";
|
|
4
4
|
import * as React$2 from "react";
|
|
5
5
|
import React$1, { ComponentType, JSXElementConstructor, ReactNode, SVGProps } from "react";
|
|
@@ -272,19 +272,45 @@ type MdxPageProps = {
|
|
|
272
272
|
MDXComponent: React.ComponentType<React.PropsWithChildren<unknown>>;
|
|
273
273
|
mdxComponents: Record<string, React.ComponentType<HTMLElement>>;
|
|
274
274
|
collectionPostComponent?: React.ComponentType<any>;
|
|
275
|
+
/**
|
|
276
|
+
* Name of the collection this route belongs to, when it has one.
|
|
277
|
+
*
|
|
278
|
+
* The layout must not depend on data that arrives asynchronously. Route
|
|
279
|
+
* metadata is known synchronously from the route table, whereas the loader
|
|
280
|
+
* data is not: on the client the first render happens with no loader data,
|
|
281
|
+
* because the generated entry declares `hasLoaderData={false}`. Deciding the
|
|
282
|
+
* layout from the loader therefore picked the documentation layout for a
|
|
283
|
+
* collection post, while the server had rendered the collection layout. React
|
|
284
|
+
* saw two different first children and discarded the whole page (error #418).
|
|
285
|
+
*
|
|
286
|
+
* A project that declares a collection should not have to know this, so the
|
|
287
|
+
* route table supplies the answer directly and the loader is only a fallback
|
|
288
|
+
* for callers that render `MdxPage` directly.
|
|
289
|
+
*/
|
|
290
|
+
collection?: string;
|
|
291
|
+
/**
|
|
292
|
+
* Route metadata for the current page, when known synchronously.
|
|
293
|
+
*
|
|
294
|
+
* `usePost()` reads from `CurrentPostProvider`, and a collection layout calls
|
|
295
|
+
* it on its first render. Passing the route keeps that first render complete
|
|
296
|
+
* instead of rendering a header with no title and then filling it in.
|
|
297
|
+
*/
|
|
298
|
+
route?: ComponentRoute;
|
|
275
299
|
};
|
|
276
300
|
/**
|
|
277
301
|
* Renders an MDX page by consuming pre-loaded route data.
|
|
278
302
|
*
|
|
279
|
-
* - If the route belongs to a collection
|
|
280
|
-
*
|
|
281
|
-
*
|
|
303
|
+
* - If the route belongs to a collection, wraps the content with
|
|
304
|
+
* `CurrentPostProvider` so that `usePost()` (called without a slug) can read
|
|
305
|
+
* the current post's data from context.
|
|
282
306
|
* - Otherwise, renders the standard `DocPage` layout.
|
|
283
307
|
*/
|
|
284
308
|
declare function MdxPage({
|
|
285
309
|
MDXComponent,
|
|
286
310
|
mdxComponents: propComponents,
|
|
287
|
-
collectionPostComponent: CollectionPost
|
|
311
|
+
collectionPostComponent: CollectionPost,
|
|
312
|
+
collection,
|
|
313
|
+
route: routeProp
|
|
288
314
|
}: MdxPageProps): _$react_jsx_runtime0.JSX.Element | null;
|
|
289
315
|
//#endregion
|
|
290
316
|
//#region src/client/ssg/boltdocs-shell.d.ts
|
|
@@ -302,6 +328,50 @@ declare function BoltdocsShell({
|
|
|
302
328
|
contentClassName?: string;
|
|
303
329
|
}): _$react_jsx_runtime0.JSX.Element;
|
|
304
330
|
//#endregion
|
|
331
|
+
//#region src/client/collections/utils.d.ts
|
|
332
|
+
/**
|
|
333
|
+
* Formats a date to a human-readable string.
|
|
334
|
+
*
|
|
335
|
+
* Locale and time zone are pinned so the server and the browser produce
|
|
336
|
+
* identical text during hydration. See `formatDeterministicDate`.
|
|
337
|
+
*/
|
|
338
|
+
declare function formatDate(date: string | Date | undefined | null, options?: {
|
|
339
|
+
month?: 'numeric' | '2-digit' | 'long' | 'short';
|
|
340
|
+
day?: 'numeric' | '2-digit';
|
|
341
|
+
}): string;
|
|
342
|
+
//#endregion
|
|
343
|
+
//#region src/client/utils/date.d.ts
|
|
344
|
+
/**
|
|
345
|
+
* Deterministic date formatting for server-rendered output.
|
|
346
|
+
*
|
|
347
|
+
* `toLocaleDateString` with no locale resolves against the *runtime* default,
|
|
348
|
+
* which is not the same in Node and in a browser: the server rendered
|
|
349
|
+
* "26 de septiembre de 2026" from an `es` system locale while the client
|
|
350
|
+
* produced "September 26, 2026". That is a text mismatch during hydration and
|
|
351
|
+
* React throws away the server HTML and re-renders the whole page.
|
|
352
|
+
*
|
|
353
|
+
* The time zone has to be pinned for the same reason. A frontmatter date such
|
|
354
|
+
* as `2026-09-27` parses as UTC midnight, so any zone behind UTC renders the
|
|
355
|
+
* previous day and any zone ahead renders the correct one, which is a second,
|
|
356
|
+
* environment-dependent mismatch.
|
|
357
|
+
*
|
|
358
|
+
* Both are therefore explicit here. Callers that genuinely want a different
|
|
359
|
+
* locale can pass one, and it is still deterministic because it is fixed in
|
|
360
|
+
* the markup rather than inferred.
|
|
361
|
+
*/
|
|
362
|
+
/**
|
|
363
|
+
* Formats a date as a stable, locale- and zone-pinned string.
|
|
364
|
+
*
|
|
365
|
+
* Returns an empty string for values that are not real dates so callers can
|
|
366
|
+
* render nothing rather than "Invalid Date".
|
|
367
|
+
*/
|
|
368
|
+
declare function formatDeterministicDate(date: string | number | Date | undefined | null, options?: {
|
|
369
|
+
locale?: string;
|
|
370
|
+
timeZone?: string;
|
|
371
|
+
month?: 'numeric' | '2-digit' | 'long' | 'short' | 'narrow';
|
|
372
|
+
day?: 'numeric' | '2-digit';
|
|
373
|
+
}): string;
|
|
374
|
+
//#endregion
|
|
305
375
|
//#region src/client/app/config-context.d.ts
|
|
306
376
|
/**
|
|
307
377
|
* Hook to access the Boltdocs configuration.
|
|
@@ -339,7 +409,13 @@ declare function useUI(): {
|
|
|
339
409
|
declare function useNavbar(): {
|
|
340
410
|
links: NavbarLink[];
|
|
341
411
|
title: string;
|
|
342
|
-
logo:
|
|
412
|
+
logo: {
|
|
413
|
+
light: string;
|
|
414
|
+
dark: null;
|
|
415
|
+
} | {
|
|
416
|
+
light: string;
|
|
417
|
+
dark: string;
|
|
418
|
+
} | null;
|
|
343
419
|
logoProps: {
|
|
344
420
|
alt: string;
|
|
345
421
|
width: number | undefined;
|
|
@@ -395,7 +471,14 @@ declare function useSidebar(routes: ComponentRoute[]): {
|
|
|
395
471
|
};
|
|
396
472
|
//#endregion
|
|
397
473
|
//#region src/client/hooks/use-search.d.ts
|
|
398
|
-
|
|
474
|
+
type SearchStatus = 'idle' | 'loading' | 'indexing' | 'ready' | 'searching' | 'error';
|
|
475
|
+
interface SearchHotContext {
|
|
476
|
+
on: (event: string, callback: (payload?: unknown) => void) => void;
|
|
477
|
+
off?: (event: string, callback: (payload?: unknown) => void) => void;
|
|
478
|
+
}
|
|
479
|
+
declare function useSearch(routes: ComponentRoute[], options?: {
|
|
480
|
+
hot?: SearchHotContext;
|
|
481
|
+
}): {
|
|
399
482
|
isOpen: boolean;
|
|
400
483
|
setIsOpen: React$2.Dispatch<React$2.SetStateAction<boolean>>;
|
|
401
484
|
query: string;
|
|
@@ -407,12 +490,17 @@ declare function useSearch(routes: ComponentRoute[]): {
|
|
|
407
490
|
bio: string;
|
|
408
491
|
groupTitle: string | undefined;
|
|
409
492
|
}[];
|
|
493
|
+
status: SearchStatus;
|
|
494
|
+
isLoading: boolean;
|
|
495
|
+
isIndexing: boolean;
|
|
496
|
+
error: Error | null;
|
|
410
497
|
searchDataLoading: boolean;
|
|
411
498
|
searchDataError: Error | null;
|
|
499
|
+
searchError: Error | null;
|
|
412
500
|
handleSelect: (key: React.Key) => void;
|
|
413
501
|
input: {
|
|
414
502
|
value: string;
|
|
415
|
-
onChange: (
|
|
503
|
+
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
416
504
|
};
|
|
417
505
|
};
|
|
418
506
|
//#endregion
|
|
@@ -667,8 +755,16 @@ declare function SidebarHeader({
|
|
|
667
755
|
*/
|
|
668
756
|
declare function SidebarContent({
|
|
669
757
|
children,
|
|
670
|
-
className
|
|
671
|
-
|
|
758
|
+
className,
|
|
759
|
+
label
|
|
760
|
+
}: ComponentBase & {
|
|
761
|
+
/**
|
|
762
|
+
* Accessible name for the nav landmark. Pages render multiple navs
|
|
763
|
+
* (navbar links, sidebar); unlabeled landmarks fail axe's
|
|
764
|
+
* `landmark-unique` rule.
|
|
765
|
+
*/
|
|
766
|
+
label?: string;
|
|
767
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
672
768
|
/**
|
|
673
769
|
* Navigation Group
|
|
674
770
|
*/
|
|
@@ -1200,10 +1296,13 @@ interface ViewTransitionRunner {
|
|
|
1200
1296
|
enabled: boolean;
|
|
1201
1297
|
/** Whether the current browser exposes the native API. */
|
|
1202
1298
|
supported: boolean;
|
|
1299
|
+
/** Whether the visitor asked the OS to reduce motion. */
|
|
1300
|
+
reducedMotion: boolean;
|
|
1203
1301
|
}
|
|
1204
1302
|
/**
|
|
1205
|
-
* Starts a native document transition when the browser supports it
|
|
1206
|
-
*
|
|
1303
|
+
* Starts a native document transition when the browser supports it and the
|
|
1304
|
+
* visitor has not asked for reduced motion. Otherwise the update still runs
|
|
1305
|
+
* normally and the function returns null.
|
|
1207
1306
|
*/
|
|
1208
1307
|
declare function startViewTransition(update: ViewTransitionUpdate, options?: ViewTransitionOptions): ViewTransitionHandle | null;
|
|
1209
1308
|
/**
|
|
@@ -1351,4 +1450,4 @@ declare function useCodeBlockFeedback(options?: UseCodeBlockFeedbackOptions): {
|
|
|
1351
1450
|
enabled: boolean;
|
|
1352
1451
|
};
|
|
1353
1452
|
//#endregion
|
|
1354
|
-
export { SidebarItem as $, cn as A, useUI as At, NotFound as B,
|
|
1453
|
+
export { SidebarItem as $, TabsProps as $t, cn as A, useUI as At, NotFound as B, CollectionPost$1 as Bt, createArticleStructuredData as C, usePageNav as Ct, defineStructuredData as D, useSearch as Dt, createWebSiteStructuredData as E, useTabs as Et, TimelineVariant as F, formatDate as Ft, Breadcrumbs as G, CollectionListLoaderData as Gt, CopyMarkdown as H, CollectionsData as Ht, usePost as I, ViteReactSSG as It, Sidebar$1 as J, LayoutProps as Jt, OnThisPage as K, CollectionPostLoaderData as Kt, usePosts as L, BoltdocsShell as Lt, TimelineBadgeConfig as M, useTheme as Mt, TimelineItemProps as N, useConfig as Nt, getTranslated as O, useSidebar as Ot, TimelineProps as P, formatDeterministicDate as Pt, SidebarHeader as Q, SiteConfig as Qt, useRecentPosts as R, MdxPage as Rt, WebSiteStructuredDataOptions as S, useBreadcrumbs as St, createStructuredData as T, useVersion as Tt, ErrorBoundary as U, CurrentPostProvider as Ut, SearchDialog as V, CollectionsContext as Vt, PageNav as W, BoltdocsTab as Wt, SidebarGroup as X, OnThisPageProps as Xt, SidebarContent as Y, NavbarLink as Yt, SidebarGroupRenderProps as Z, SidebarProps$1 as Zt, StructuredData as _, useTrackEvent as _t, useExpandable as a, SidebarLinkProps as at, BreadcrumbStructuredDataItem as b, useLocalizedTo as bt, getStarsRepo as c, SidebarSlots as ct, ViewTransitionHandle as d, Navbar as dt, SidebarItemProps as et, ViewTransitionOptions as f, DocsLayoutComponent as ft, useViewTransition as g, useAnalytics as gt, startViewTransition as h, useHeadings as ht, UseExpandableOptions as i, SidebarLink as it, Timeline as j, useMdxComponents as jt, resolvePublicAssetUrl as k, useNavbar as kt, copyToClipboard as l, SidebarSubGroup as lt, ViewTransitionUpdate as m, useMergedComponents as mt, UseCodeBlockFeedbackOptions as n, SidebarItems$1 as nt, useCopyButton as o, SidebarMobile as ot, ViewTransitionRunner as p, useFeedback as pt, Sidebar as q, ComponentRoute as qt, useCodeBlockFeedback as r, SidebarItemsProps as rt, useCodeBlock as s, SidebarRoot as st, CodeBlockFeedbackPayload as t, SidebarItemRenderProps as tt, reactToText as u, ComponentBase as ut, StructuredDataProps as v, useTrackPageView as vt, createBreadcrumbStructuredData as w, useI18n as wt, StructuredDataFactoryOptions as x, useRoutes as xt, ArticleStructuredDataOptions as y, useSearchHighlight as yt, Banner as z, createRoutes as zt };
|