boltdocs 3.0.2 → 3.1.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.
Files changed (113) hide show
  1. package/README.md +2 -18
  2. package/dist/{adapters-C5AWWGfb.cjs → adapters-uGz-UKQa.cjs} +1 -1
  3. package/dist/{banner-DNSkgUsO.d.cts → banner-DdSgCs4G.d.cts} +1 -1
  4. package/dist/{banner-CfdalYLL.d.ts → banner-DjujkctF.d.ts} +1 -1
  5. package/dist/cache-B0C2i0yP.mjs +6 -0
  6. package/dist/cache-CfRTUzWC.cjs +6 -0
  7. package/dist/chunk-hT5z_Zn9-DsJawvsz.mjs +6 -0
  8. package/dist/chunk-hT5z_Zn9-SKz6VFXu.cjs +6 -0
  9. package/dist/client/index.cjs +227 -113
  10. package/dist/client/index.d.cts +57 -12
  11. package/dist/client/index.d.ts +57 -12
  12. package/dist/client/index.js +227 -114
  13. package/dist/client/mdx.cjs +1 -1
  14. package/dist/client/mdx.js +1 -1
  15. package/dist/client/primitives.cjs +4 -4
  16. package/dist/client/primitives.d.cts +1 -1
  17. package/dist/client/primitives.d.ts +1 -1
  18. package/dist/client/primitives.js +4 -4
  19. package/dist/client/theme/neutral.css +1 -3
  20. package/dist/{config-JGkMJoJQ.cjs → config-BxsogK5A.cjs} +1 -1
  21. package/dist/config-DAgpZyh6.mjs +7 -0
  22. package/dist/config-DrRQYDCI.cjs +7 -0
  23. package/dist/{docs-layout-3TpAt6MB.cjs → docs-layout-D1buSdua.cjs} +1 -1
  24. package/dist/{docs-layout-6FQ8__ok.js → docs-layout-DyLDBwS6.js} +1 -1
  25. package/dist/{doctor-DQxLM202.cjs → doctor-BadGEhXv.cjs} +1 -1
  26. package/dist/{doctor-BR1B2Mkz.cjs → doctor-DPDcRKM1.cjs} +1 -1
  27. package/dist/{doctor-3MheVMwd.mjs → doctor-vDsUDgqp.mjs} +1 -1
  28. package/dist/escape-string-regexp-AG8q1e25-9Un9V90q.mjs +6 -0
  29. package/dist/escape-string-regexp-AG8q1e25-bJ9Ixe7c.cjs +6 -0
  30. package/dist/esm-shims-DSep1HcR.mjs +6 -0
  31. package/dist/{icons-dev-kJyGWNeg.js → icons-dev-CHZOwhQA.js} +8 -3
  32. package/dist/{icons-dev-BryEFkJu.cjs → icons-dev-YtDoLUsb.cjs} +8 -3
  33. package/dist/{image-C9md50h2.js → image-5WsgWYTh.js} +2 -2
  34. package/dist/{image-CR6UlaI5.cjs → image-Hb105Gu6.cjs} +2 -2
  35. package/dist/lib-BR0SoanK-CLswltLI.cjs +6 -0
  36. package/dist/lib-BR0SoanK-DcYeDrE6.mjs +6 -0
  37. package/dist/lib-DPoCz1YB-CLYXwKST.cjs +6 -0
  38. package/dist/lib-DPoCz1YB-CyGOqgSO.mjs +6 -0
  39. package/dist/{mdx-DhyMkc35.js → mdx-Bv-pS6-O.js} +6 -2
  40. package/dist/{mdx-DJBg5DuL.cjs → mdx-CDUcJmye.cjs} +6 -2
  41. package/dist/micromark-util-character-5KqJafVT-C6gnc770.cjs +6 -0
  42. package/dist/micromark-util-character-5KqJafVT-DkPKsbgn.mjs +6 -0
  43. package/dist/node/cache.cjs +6 -0
  44. package/dist/node/cache.d.cts +83 -0
  45. package/dist/node/cache.d.mts +83 -0
  46. package/dist/node/cache.mjs +6 -0
  47. package/dist/node/cli-entry.cjs +3 -3
  48. package/dist/node/cli-entry.mjs +3 -3
  49. package/dist/node/index.cjs +1 -1
  50. package/dist/node/index.d.cts +10 -467
  51. package/dist/node/index.d.mts +12 -468
  52. package/dist/node/index.mjs +1 -1
  53. package/dist/node/mdx/shiki-adapter.cjs +6 -0
  54. package/dist/node/mdx/shiki-adapter.d.cts +3 -0
  55. package/dist/node/mdx/shiki-adapter.d.mts +3 -0
  56. package/dist/node/mdx/shiki-adapter.mjs +6 -0
  57. package/dist/node-BDBv8CT6.mjs +104 -0
  58. package/dist/node-DFV_FV0y.mjs +6 -0
  59. package/dist/node-DqsP7kXz.cjs +6 -0
  60. package/dist/node-yFmAavND.cjs +104 -0
  61. package/dist/{package-_dCCKVvG.mjs → package-CoHWTf0N.mjs} +1 -1
  62. package/dist/{package-CEDhVAfO.cjs → package-_-Oa8-qN.cjs} +1 -1
  63. package/dist/{parser-D0QHIQsi.mjs → parser-BZJgAa9E.mjs} +1 -1
  64. package/dist/{parser-CNIPHx4s.cjs → parser-DlanzESE.cjs} +1 -1
  65. package/dist/plugin-BVuwx5D9.cjs +73 -0
  66. package/dist/plugin-BoxD91Yh.mjs +73 -0
  67. package/dist/rehype-slug--ZOxZ-_K-BNeYC4aT.cjs +6 -0
  68. package/dist/rehype-slug--ZOxZ-_K-CjIQEJCs.mjs +6 -0
  69. package/dist/remark-frontmatter-wFYRLcCt-CutW0gA3.mjs +8 -0
  70. package/dist/remark-frontmatter-wFYRLcCt-ENB5qG3y.cjs +8 -0
  71. package/dist/remark-gfm-B8TMkQbX-CjUJo8Rd.cjs +21 -0
  72. package/dist/remark-gfm-B8TMkQbX-Ctu0VV1_.mjs +21 -0
  73. package/dist/rollup-DMqoG11U-CKcJ37u_.mjs +59 -0
  74. package/dist/rollup-DMqoG11U-DKdxvZIj.cjs +59 -0
  75. package/dist/routes-BN2XbGcT.mjs +6 -0
  76. package/dist/routes-Cnq8xTCv.cjs +6 -0
  77. package/dist/{routes-BajCwrvX.cjs → routes-D_S9kjkS.cjs} +1 -1
  78. package/dist/{search-dialog-CW1f6dn6.cjs → search-dialog-BIuxGQsg.cjs} +1 -1
  79. package/dist/{search-dialog-Cx7aGW3U.cjs → search-dialog-BbtxA1uT.cjs} +2 -2
  80. package/dist/{search-dialog-D4rplZMv.cjs → search-dialog-BpNULmrl.cjs} +1 -1
  81. package/dist/{search-dialog-DDopgbKM.js → search-dialog-DC7oXU-5.js} +2 -2
  82. package/dist/{search-dialog-DaeSPvEo.js → search-dialog-PJrFRU5G.js} +1 -1
  83. package/dist/{search-dialog-BNdRV60O.js → search-dialog-gp9lrJXm.js} +1 -1
  84. package/dist/server/index.cjs +1 -1
  85. package/dist/server/index.d.mts +1 -1
  86. package/dist/shiki-adapter-CK3llqw2.mjs +6 -0
  87. package/dist/shiki-adapter-fS94vy-z.d.mts +534 -0
  88. package/dist/shiki-adapter-l2kEP5rn.d.cts +534 -0
  89. package/dist/{sidebar-BAKgJ-Er.d.ts → sidebar-DH2iPKXM.d.cts} +187 -10
  90. package/dist/{sidebar-7gIifpBX.d.cts → sidebar-DknLUI1R.d.ts} +187 -10
  91. package/package.json +16 -5
  92. package/src/shared/types.ts +177 -10
  93. package/dist/cache-DETwlACe.cjs +0 -6
  94. package/dist/cache-SF59enb3.mjs +0 -6
  95. package/dist/config-B5uVv5q4.cjs +0 -7
  96. package/dist/config-D3_zDkHh.mjs +0 -7
  97. package/dist/node-B9JSyEIU.mjs +0 -105
  98. package/dist/node-Cedquois.cjs +0 -105
  99. package/dist/plugin-WYNORxp1.cjs +0 -68
  100. package/dist/plugin-YWNVRpws.mjs +0 -68
  101. package/dist/routes-CyrnmVuG.mjs +0 -6
  102. package/dist/routes-D6Tuu7Fs.cjs +0 -6
  103. package/dist/shiki-adapter-CXEGRnjr.mjs +0 -6
  104. package/dist/shiki-adapter-Mr8_oT_9.cjs +0 -6
  105. /package/dist/{csp-CBysWlAf.cjs → csp-BX06rvdg.cjs} +0 -0
  106. /package/dist/{csp-gaZ51xzq.mjs → csp-z2D0FuRW.mjs} +0 -0
  107. /package/dist/{generator-DtUU3Cfk.cjs → generator-BN75lJOv.cjs} +0 -0
  108. /package/dist/{handler-Dzf4dSnV.cjs → handler-1LRMYeI4.cjs} +0 -0
  109. /package/dist/{headers-CXyf0auY.mjs → headers-CL0pMcwm.mjs} +0 -0
  110. /package/dist/{headers-BXKxiPUv.cjs → headers-YpD10rDb.cjs} +0 -0
  111. /package/dist/{index-CdJv4ocW.d.mts → index-DJYJzs-Z.d.mts} +0 -0
  112. /package/dist/{meta-loader-C4Hu9RN9.mjs → meta-loader-Bq-MjTXB.mjs} +0 -0
  113. /package/dist/{meta-loader-C9MKjAs0.cjs → meta-loader-CTB62-Mo.cjs} +0 -0
@@ -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-7gIifpBX.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-DNSkgUsO.cjs";
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-DH2iPKXM.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-DdSgCs4G.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";
@@ -22,9 +22,32 @@ interface CollectionPost$1 {
22
22
  locale?: string;
23
23
  version?: string;
24
24
  frontmatter?: Record<string, any>;
25
+ lastUpdated?: string | number | Date;
26
+ headings?: {
27
+ level: number;
28
+ text: string;
29
+ id: string;
30
+ }[];
31
+ draft?: boolean;
25
32
  }
26
33
  type CollectionsData = Record<string, CollectionPost$1[]>;
27
34
  declare const CollectionsContext: _$react.Context<CollectionsData>;
35
+ interface CurrentPostContextValue {
36
+ route: ComponentRoute;
37
+ headings: {
38
+ level: number;
39
+ text: string;
40
+ id: string;
41
+ }[];
42
+ collection: string;
43
+ }
44
+ declare function CurrentPostProvider({
45
+ value,
46
+ children
47
+ }: {
48
+ value: CurrentPostContextValue;
49
+ children: React.ReactNode;
50
+ }): _$react_jsx_runtime0.JSX.Element;
28
51
  //#endregion
29
52
  //#region src/client/ssg/create-routes.d.ts
30
53
  interface CreateRoutesOptions {
@@ -54,8 +77,9 @@ type MdxPageProps = {
54
77
  /**
55
78
  * Renders an MDX page by consuming pre-loaded route data.
56
79
  *
57
- * - If the route belongs to a collection (`data.collection` is set), renders
58
- * the custom post component if provided, else falls back to the standard DocPage.
80
+ * - If the route belongs to a collection (`data.collection` is set), wraps
81
+ * the content with `CurrentPostProvider` so that `usePost()` (called without
82
+ * a slug) can read the current post's data from context.
59
83
  * - Otherwise, renders the standard `DocPage` layout.
60
84
  */
61
85
  declare function MdxPage({
@@ -255,6 +279,13 @@ declare global {
255
279
  gtag?: (...args: unknown[]) => void;
256
280
  dataLayer?: unknown[];
257
281
  gtag_report_conversion?: (url?: string) => boolean;
282
+ posthog?: {
283
+ capture: (event: string, properties?: Record<string, unknown>) => void;
284
+ identify: (distinctId: string) => void;
285
+ reset: () => void;
286
+ opt_out_capturing: () => void;
287
+ opt_in_capturing: () => void;
288
+ };
258
289
  }
259
290
  }
260
291
  interface AnalyticsEvent {
@@ -335,20 +366,34 @@ declare function DocsLayoutComponent({
335
366
  }: DocsLayoutThemeProps): _$react_jsx_runtime0.JSX.Element;
336
367
  //#endregion
337
368
  //#region src/client/collections/hooks.d.ts
369
+ interface UsePostsOptions {
370
+ includeDrafts?: boolean;
371
+ }
338
372
  /**
339
- * Returns the posts of a collection.
340
- * @param collection - The name of the collection.
341
- * @returns The posts of the collection.
373
+ * Returns the posts of a collection, filtered by the current locale and version.
374
+ * Defaults to "blog" if no collection is specified.
375
+ * @param collection - The name of the collection. Defaults to "blog".
376
+ * @param options - Options to customize the query.
377
+ * @param options.includeDrafts - If true, includes draft posts in the results.
378
+ * @returns The filtered posts of the collection.
379
+ */
380
+ declare function usePosts(collection?: string, options?: UsePostsOptions): CollectionPost$1[];
381
+ /**
382
+ * Returns a single post from a collection.
383
+ *
384
+ * @param collection - The name of the collection (optional inside post routes).
385
+ * @param slug - The post slug (optional inside post routes).
386
+ * @returns The matching post, or undefined if not found.
342
387
  */
343
- declare function usePosts(collection: string): CollectionPost$1[];
388
+ declare function usePost(): CollectionPost$1 | undefined;
344
389
  declare function usePost(collection: string, slug: string): CollectionPost$1 | undefined;
345
390
  /**
346
- * Returns the recent posts of a collection.
347
- * @param collection - The name of the collection.
391
+ * Returns the recent posts of a collection. Defaults to "blog".
392
+ * @param collection - The name of the collection. Defaults to "blog".
348
393
  * @param count - The number of recent posts to return.
349
394
  * @returns The recent posts of the collection.
350
395
  */
351
- declare function useRecentPosts(collection: string, count?: number): CollectionPost$1[];
396
+ declare function useRecentPosts(collection?: string, count?: number): CollectionPost$1[];
352
397
  //#endregion
353
398
  //#region src/client/utils/cn.d.ts
354
399
  declare function cn(...inputs: ClassValue[]): string;
@@ -429,4 +474,4 @@ declare function useCodeBlock(props: CodeBlockProps): {
429
474
  }>;
430
475
  };
431
476
  //#endregion
432
- 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, 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 };
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 };
@@ -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-BAKgJ-Er.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-CfdalYLL.js";
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-DknLUI1R.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-DjujkctF.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";
@@ -22,9 +22,32 @@ interface CollectionPost$1 {
22
22
  locale?: string;
23
23
  version?: string;
24
24
  frontmatter?: Record<string, any>;
25
+ lastUpdated?: string | number | Date;
26
+ headings?: {
27
+ level: number;
28
+ text: string;
29
+ id: string;
30
+ }[];
31
+ draft?: boolean;
25
32
  }
26
33
  type CollectionsData = Record<string, CollectionPost$1[]>;
27
34
  declare const CollectionsContext: _$react.Context<CollectionsData>;
35
+ interface CurrentPostContextValue {
36
+ route: ComponentRoute;
37
+ headings: {
38
+ level: number;
39
+ text: string;
40
+ id: string;
41
+ }[];
42
+ collection: string;
43
+ }
44
+ declare function CurrentPostProvider({
45
+ value,
46
+ children
47
+ }: {
48
+ value: CurrentPostContextValue;
49
+ children: React.ReactNode;
50
+ }): _$react_jsx_runtime0.JSX.Element;
28
51
  //#endregion
29
52
  //#region src/client/ssg/create-routes.d.ts
30
53
  interface CreateRoutesOptions {
@@ -54,8 +77,9 @@ type MdxPageProps = {
54
77
  /**
55
78
  * Renders an MDX page by consuming pre-loaded route data.
56
79
  *
57
- * - If the route belongs to a collection (`data.collection` is set), renders
58
- * the custom post component if provided, else falls back to the standard DocPage.
80
+ * - If the route belongs to a collection (`data.collection` is set), wraps
81
+ * the content with `CurrentPostProvider` so that `usePost()` (called without
82
+ * a slug) can read the current post's data from context.
59
83
  * - Otherwise, renders the standard `DocPage` layout.
60
84
  */
61
85
  declare function MdxPage({
@@ -255,6 +279,13 @@ declare global {
255
279
  gtag?: (...args: unknown[]) => void;
256
280
  dataLayer?: unknown[];
257
281
  gtag_report_conversion?: (url?: string) => boolean;
282
+ posthog?: {
283
+ capture: (event: string, properties?: Record<string, unknown>) => void;
284
+ identify: (distinctId: string) => void;
285
+ reset: () => void;
286
+ opt_out_capturing: () => void;
287
+ opt_in_capturing: () => void;
288
+ };
258
289
  }
259
290
  }
260
291
  interface AnalyticsEvent {
@@ -335,20 +366,34 @@ declare function DocsLayoutComponent({
335
366
  }: DocsLayoutThemeProps): _$react_jsx_runtime0.JSX.Element;
336
367
  //#endregion
337
368
  //#region src/client/collections/hooks.d.ts
369
+ interface UsePostsOptions {
370
+ includeDrafts?: boolean;
371
+ }
338
372
  /**
339
- * Returns the posts of a collection.
340
- * @param collection - The name of the collection.
341
- * @returns The posts of the collection.
373
+ * Returns the posts of a collection, filtered by the current locale and version.
374
+ * Defaults to "blog" if no collection is specified.
375
+ * @param collection - The name of the collection. Defaults to "blog".
376
+ * @param options - Options to customize the query.
377
+ * @param options.includeDrafts - If true, includes draft posts in the results.
378
+ * @returns The filtered posts of the collection.
379
+ */
380
+ declare function usePosts(collection?: string, options?: UsePostsOptions): CollectionPost$1[];
381
+ /**
382
+ * Returns a single post from a collection.
383
+ *
384
+ * @param collection - The name of the collection (optional inside post routes).
385
+ * @param slug - The post slug (optional inside post routes).
386
+ * @returns The matching post, or undefined if not found.
342
387
  */
343
- declare function usePosts(collection: string): CollectionPost$1[];
388
+ declare function usePost(): CollectionPost$1 | undefined;
344
389
  declare function usePost(collection: string, slug: string): CollectionPost$1 | undefined;
345
390
  /**
346
- * Returns the recent posts of a collection.
347
- * @param collection - The name of the collection.
391
+ * Returns the recent posts of a collection. Defaults to "blog".
392
+ * @param collection - The name of the collection. Defaults to "blog".
348
393
  * @param count - The number of recent posts to return.
349
394
  * @returns The recent posts of the collection.
350
395
  */
351
- declare function useRecentPosts(collection: string, count?: number): CollectionPost$1[];
396
+ declare function useRecentPosts(collection?: string, count?: number): CollectionPost$1[];
352
397
  //#endregion
353
398
  //#region src/client/utils/cn.d.ts
354
399
  declare function cn(...inputs: ClassValue[]): string;
@@ -429,4 +474,4 @@ declare function useCodeBlock(props: CodeBlockProps): {
429
474
  }>;
430
475
  };
431
476
  //#endregion
432
- 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, 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 };
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 };