boltdocs 3.0.1 → 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.
- package/README.md +2 -18
- package/dist/{adapters-C5AWWGfb.cjs → adapters-uGz-UKQa.cjs} +1 -1
- package/dist/{banner-DNSkgUsO.d.cts → banner-DdSgCs4G.d.cts} +1 -1
- package/dist/{banner-CfdalYLL.d.ts → banner-DjujkctF.d.ts} +1 -1
- package/dist/cache-B0C2i0yP.mjs +6 -0
- package/dist/cache-CfRTUzWC.cjs +6 -0
- package/dist/chunk-hT5z_Zn9-DsJawvsz.mjs +6 -0
- package/dist/chunk-hT5z_Zn9-SKz6VFXu.cjs +6 -0
- package/dist/client/index.cjs +227 -101
- package/dist/client/index.d.cts +57 -16
- package/dist/client/index.d.ts +57 -16
- package/dist/client/index.js +227 -102
- package/dist/client/mdx.cjs +1 -1
- package/dist/client/mdx.js +1 -1
- package/dist/client/primitives.cjs +4 -4
- package/dist/client/primitives.d.cts +1 -1
- package/dist/client/primitives.d.ts +1 -1
- package/dist/client/primitives.js +4 -4
- package/dist/client/theme/neutral.css +1 -3
- package/dist/{config-JGkMJoJQ.cjs → config-BxsogK5A.cjs} +1 -1
- package/dist/config-DAgpZyh6.mjs +7 -0
- package/dist/config-DrRQYDCI.cjs +7 -0
- package/dist/{docs-layout-3TpAt6MB.cjs → docs-layout-D1buSdua.cjs} +1 -1
- package/dist/{docs-layout-6FQ8__ok.js → docs-layout-DyLDBwS6.js} +1 -1
- package/dist/{doctor-DQxLM202.cjs → doctor-BadGEhXv.cjs} +1 -1
- package/dist/{doctor-BR1B2Mkz.cjs → doctor-DPDcRKM1.cjs} +1 -1
- package/dist/{doctor-3MheVMwd.mjs → doctor-vDsUDgqp.mjs} +1 -1
- package/dist/escape-string-regexp-AG8q1e25-9Un9V90q.mjs +6 -0
- package/dist/escape-string-regexp-AG8q1e25-bJ9Ixe7c.cjs +6 -0
- package/dist/esm-shims-DSep1HcR.mjs +6 -0
- package/dist/{icons-dev-kJyGWNeg.js → icons-dev-CHZOwhQA.js} +8 -3
- package/dist/{icons-dev-BryEFkJu.cjs → icons-dev-YtDoLUsb.cjs} +8 -3
- package/dist/{image-C9md50h2.js → image-5WsgWYTh.js} +2 -2
- package/dist/{image-CR6UlaI5.cjs → image-Hb105Gu6.cjs} +2 -2
- package/dist/lib-BR0SoanK-CLswltLI.cjs +6 -0
- package/dist/lib-BR0SoanK-DcYeDrE6.mjs +6 -0
- package/dist/lib-DPoCz1YB-CLYXwKST.cjs +6 -0
- package/dist/lib-DPoCz1YB-CyGOqgSO.mjs +6 -0
- package/dist/{mdx-DhyMkc35.js → mdx-Bv-pS6-O.js} +6 -2
- package/dist/{mdx-DJBg5DuL.cjs → mdx-CDUcJmye.cjs} +6 -2
- package/dist/micromark-util-character-5KqJafVT-C6gnc770.cjs +6 -0
- package/dist/micromark-util-character-5KqJafVT-DkPKsbgn.mjs +6 -0
- package/dist/node/cache.cjs +6 -0
- package/dist/node/cache.d.cts +83 -0
- package/dist/node/cache.d.mts +83 -0
- package/dist/node/cache.mjs +6 -0
- package/dist/node/cli-entry.cjs +3 -3
- package/dist/node/cli-entry.mjs +3 -3
- package/dist/node/index.cjs +1 -1
- package/dist/node/index.d.cts +10 -467
- package/dist/node/index.d.mts +12 -468
- package/dist/node/index.mjs +1 -1
- package/dist/node/mdx/shiki-adapter.cjs +6 -0
- package/dist/node/mdx/shiki-adapter.d.cts +3 -0
- package/dist/node/mdx/shiki-adapter.d.mts +3 -0
- package/dist/node/mdx/shiki-adapter.mjs +6 -0
- package/dist/node-BDBv8CT6.mjs +104 -0
- package/dist/node-DFV_FV0y.mjs +6 -0
- package/dist/node-DqsP7kXz.cjs +6 -0
- package/dist/node-yFmAavND.cjs +104 -0
- package/dist/{package-BovY3RQH.mjs → package-CoHWTf0N.mjs} +1 -1
- package/dist/{package-DnyxhwD-.cjs → package-_-Oa8-qN.cjs} +1 -1
- package/dist/{parser-D0QHIQsi.mjs → parser-BZJgAa9E.mjs} +1 -1
- package/dist/{parser-CNIPHx4s.cjs → parser-DlanzESE.cjs} +1 -1
- package/dist/plugin-BVuwx5D9.cjs +73 -0
- package/dist/plugin-BoxD91Yh.mjs +73 -0
- package/dist/rehype-slug--ZOxZ-_K-BNeYC4aT.cjs +6 -0
- package/dist/rehype-slug--ZOxZ-_K-CjIQEJCs.mjs +6 -0
- package/dist/remark-frontmatter-wFYRLcCt-CutW0gA3.mjs +8 -0
- package/dist/remark-frontmatter-wFYRLcCt-ENB5qG3y.cjs +8 -0
- package/dist/remark-gfm-B8TMkQbX-CjUJo8Rd.cjs +21 -0
- package/dist/remark-gfm-B8TMkQbX-Ctu0VV1_.mjs +21 -0
- package/dist/rollup-DMqoG11U-CKcJ37u_.mjs +59 -0
- package/dist/rollup-DMqoG11U-DKdxvZIj.cjs +59 -0
- package/dist/routes-BN2XbGcT.mjs +6 -0
- package/dist/routes-Cnq8xTCv.cjs +6 -0
- package/dist/{routes-BajCwrvX.cjs → routes-D_S9kjkS.cjs} +1 -1
- package/dist/{search-dialog-cHJoKjts.cjs → search-dialog-BIuxGQsg.cjs} +1 -1
- package/dist/{search-dialog-CwNh8lIN.cjs → search-dialog-BbtxA1uT.cjs} +12 -10
- package/dist/{search-dialog-D4rplZMv.cjs → search-dialog-BpNULmrl.cjs} +1 -1
- package/dist/{search-dialog-DoGobmuG.js → search-dialog-DC7oXU-5.js} +12 -10
- package/dist/{search-dialog-DaeSPvEo.js → search-dialog-PJrFRU5G.js} +1 -1
- package/dist/{search-dialog-CQneRo8T.js → search-dialog-gp9lrJXm.js} +1 -1
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.d.mts +1 -1
- package/dist/shiki-adapter-CK3llqw2.mjs +6 -0
- package/dist/shiki-adapter-fS94vy-z.d.mts +534 -0
- package/dist/shiki-adapter-l2kEP5rn.d.cts +534 -0
- package/dist/{sidebar-BAKgJ-Er.d.ts → sidebar-DH2iPKXM.d.cts} +187 -10
- package/dist/{sidebar-7gIifpBX.d.cts → sidebar-DknLUI1R.d.ts} +187 -10
- package/package.json +15 -4
- package/src/shared/types.ts +177 -10
- package/dist/cache-DETwlACe.cjs +0 -6
- package/dist/cache-SF59enb3.mjs +0 -6
- package/dist/config-B5uVv5q4.cjs +0 -7
- package/dist/config-D3_zDkHh.mjs +0 -7
- package/dist/node-Ct4PB0S_.mjs +0 -105
- package/dist/node-joF9IMNr.cjs +0 -105
- package/dist/plugin-DeOYQvry.cjs +0 -68
- package/dist/plugin-IBKz7CRF.mjs +0 -68
- package/dist/routes-CyrnmVuG.mjs +0 -6
- package/dist/routes-D6Tuu7Fs.cjs +0 -6
- package/dist/shiki-adapter-CXEGRnjr.mjs +0 -6
- package/dist/shiki-adapter-Mr8_oT_9.cjs +0 -6
- /package/dist/{csp-CBysWlAf.cjs → csp-BX06rvdg.cjs} +0 -0
- /package/dist/{csp-gaZ51xzq.mjs → csp-z2D0FuRW.mjs} +0 -0
- /package/dist/{generator-DtUU3Cfk.cjs → generator-BN75lJOv.cjs} +0 -0
- /package/dist/{handler-Dzf4dSnV.cjs → handler-1LRMYeI4.cjs} +0 -0
- /package/dist/{headers-CXyf0auY.mjs → headers-CL0pMcwm.mjs} +0 -0
- /package/dist/{headers-BXKxiPUv.cjs → headers-YpD10rDb.cjs} +0 -0
- /package/dist/{index-CdJv4ocW.d.mts → index-DJYJzs-Z.d.mts} +0 -0
- /package/dist/{meta-loader-C4Hu9RN9.mjs → meta-loader-Bq-MjTXB.mjs} +0 -0
- /package/dist/{meta-loader-C9MKjAs0.cjs → meta-loader-CTB62-Mo.cjs} +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-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";
|
|
@@ -19,10 +19,35 @@ interface CollectionPost$1 {
|
|
|
19
19
|
author?: string;
|
|
20
20
|
coverImage?: string;
|
|
21
21
|
filePath: string;
|
|
22
|
+
locale?: string;
|
|
23
|
+
version?: string;
|
|
22
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;
|
|
23
32
|
}
|
|
24
33
|
type CollectionsData = Record<string, CollectionPost$1[]>;
|
|
25
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;
|
|
26
51
|
//#endregion
|
|
27
52
|
//#region src/client/ssg/create-routes.d.ts
|
|
28
53
|
interface CreateRoutesOptions {
|
|
@@ -52,8 +77,9 @@ type MdxPageProps = {
|
|
|
52
77
|
/**
|
|
53
78
|
* Renders an MDX page by consuming pre-loaded route data.
|
|
54
79
|
*
|
|
55
|
-
* - If the route belongs to a collection (`data.collection` is set),
|
|
56
|
-
* the
|
|
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.
|
|
57
83
|
* - Otherwise, renders the standard `DocPage` layout.
|
|
58
84
|
*/
|
|
59
85
|
declare function MdxPage({
|
|
@@ -253,6 +279,13 @@ declare global {
|
|
|
253
279
|
gtag?: (...args: unknown[]) => void;
|
|
254
280
|
dataLayer?: unknown[];
|
|
255
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
|
+
};
|
|
256
289
|
}
|
|
257
290
|
}
|
|
258
291
|
interface AnalyticsEvent {
|
|
@@ -333,26 +366,34 @@ declare function DocsLayoutComponent({
|
|
|
333
366
|
}: DocsLayoutThemeProps): _$react_jsx_runtime0.JSX.Element;
|
|
334
367
|
//#endregion
|
|
335
368
|
//#region src/client/collections/hooks.d.ts
|
|
369
|
+
interface UsePostsOptions {
|
|
370
|
+
includeDrafts?: boolean;
|
|
371
|
+
}
|
|
336
372
|
/**
|
|
337
|
-
* Returns the posts of a collection.
|
|
338
|
-
*
|
|
339
|
-
* @
|
|
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.
|
|
340
379
|
*/
|
|
341
|
-
declare function usePosts(collection
|
|
380
|
+
declare function usePosts(collection?: string, options?: UsePostsOptions): CollectionPost$1[];
|
|
342
381
|
/**
|
|
343
|
-
* Returns a post
|
|
344
|
-
*
|
|
345
|
-
* @param
|
|
346
|
-
* @
|
|
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.
|
|
347
387
|
*/
|
|
388
|
+
declare function usePost(): CollectionPost$1 | undefined;
|
|
348
389
|
declare function usePost(collection: string, slug: string): CollectionPost$1 | undefined;
|
|
349
390
|
/**
|
|
350
|
-
* Returns the recent posts of a collection.
|
|
351
|
-
* @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".
|
|
352
393
|
* @param count - The number of recent posts to return.
|
|
353
394
|
* @returns The recent posts of the collection.
|
|
354
395
|
*/
|
|
355
|
-
declare function useRecentPosts(collection
|
|
396
|
+
declare function useRecentPosts(collection?: string, count?: number): CollectionPost$1[];
|
|
356
397
|
//#endregion
|
|
357
398
|
//#region src/client/utils/cn.d.ts
|
|
358
399
|
declare function cn(...inputs: ClassValue[]): string;
|
|
@@ -433,4 +474,4 @@ declare function useCodeBlock(props: CodeBlockProps): {
|
|
|
433
474
|
}>;
|
|
434
475
|
};
|
|
435
476
|
//#endregion
|
|
436
|
-
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 };
|
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-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";
|
|
@@ -19,10 +19,35 @@ interface CollectionPost$1 {
|
|
|
19
19
|
author?: string;
|
|
20
20
|
coverImage?: string;
|
|
21
21
|
filePath: string;
|
|
22
|
+
locale?: string;
|
|
23
|
+
version?: string;
|
|
22
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;
|
|
23
32
|
}
|
|
24
33
|
type CollectionsData = Record<string, CollectionPost$1[]>;
|
|
25
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;
|
|
26
51
|
//#endregion
|
|
27
52
|
//#region src/client/ssg/create-routes.d.ts
|
|
28
53
|
interface CreateRoutesOptions {
|
|
@@ -52,8 +77,9 @@ type MdxPageProps = {
|
|
|
52
77
|
/**
|
|
53
78
|
* Renders an MDX page by consuming pre-loaded route data.
|
|
54
79
|
*
|
|
55
|
-
* - If the route belongs to a collection (`data.collection` is set),
|
|
56
|
-
* the
|
|
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.
|
|
57
83
|
* - Otherwise, renders the standard `DocPage` layout.
|
|
58
84
|
*/
|
|
59
85
|
declare function MdxPage({
|
|
@@ -253,6 +279,13 @@ declare global {
|
|
|
253
279
|
gtag?: (...args: unknown[]) => void;
|
|
254
280
|
dataLayer?: unknown[];
|
|
255
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
|
+
};
|
|
256
289
|
}
|
|
257
290
|
}
|
|
258
291
|
interface AnalyticsEvent {
|
|
@@ -333,26 +366,34 @@ declare function DocsLayoutComponent({
|
|
|
333
366
|
}: DocsLayoutThemeProps): _$react_jsx_runtime0.JSX.Element;
|
|
334
367
|
//#endregion
|
|
335
368
|
//#region src/client/collections/hooks.d.ts
|
|
369
|
+
interface UsePostsOptions {
|
|
370
|
+
includeDrafts?: boolean;
|
|
371
|
+
}
|
|
336
372
|
/**
|
|
337
|
-
* Returns the posts of a collection.
|
|
338
|
-
*
|
|
339
|
-
* @
|
|
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.
|
|
340
379
|
*/
|
|
341
|
-
declare function usePosts(collection
|
|
380
|
+
declare function usePosts(collection?: string, options?: UsePostsOptions): CollectionPost$1[];
|
|
342
381
|
/**
|
|
343
|
-
* Returns a post
|
|
344
|
-
*
|
|
345
|
-
* @param
|
|
346
|
-
* @
|
|
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.
|
|
347
387
|
*/
|
|
388
|
+
declare function usePost(): CollectionPost$1 | undefined;
|
|
348
389
|
declare function usePost(collection: string, slug: string): CollectionPost$1 | undefined;
|
|
349
390
|
/**
|
|
350
|
-
* Returns the recent posts of a collection.
|
|
351
|
-
* @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".
|
|
352
393
|
* @param count - The number of recent posts to return.
|
|
353
394
|
* @returns The recent posts of the collection.
|
|
354
395
|
*/
|
|
355
|
-
declare function useRecentPosts(collection
|
|
396
|
+
declare function useRecentPosts(collection?: string, count?: number): CollectionPost$1[];
|
|
356
397
|
//#endregion
|
|
357
398
|
//#region src/client/utils/cn.d.ts
|
|
358
399
|
declare function cn(...inputs: ClassValue[]): string;
|
|
@@ -433,4 +474,4 @@ declare function useCodeBlock(props: CodeBlockProps): {
|
|
|
433
474
|
}>;
|
|
434
475
|
};
|
|
435
476
|
//#endregion
|
|
436
|
-
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 };
|