boltdocs 1.10.2 → 2.0.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/CHANGELOG.md +7 -0
- package/LICENSE +21 -0
- package/dist/cache-7G6D532T.mjs +1 -0
- package/dist/chunk-A4HQPEPU.mjs +1 -0
- package/dist/chunk-BA5NH5HU.mjs +1 -0
- package/dist/chunk-BQCD3DWG.mjs +1 -0
- package/dist/chunk-H63UMKYF.mjs +1 -0
- package/dist/chunk-IWHRQHS7.mjs +1 -0
- package/dist/chunk-JZXLCA2E.mjs +1 -0
- package/dist/chunk-MFU7Q6WF.mjs +1 -0
- package/dist/chunk-QYPNX5UN.mjs +1 -0
- package/dist/chunk-XEAPSFMB.mjs +1 -0
- package/dist/client/components/mdx/index.d.mts +209 -0
- package/dist/client/components/mdx/index.d.ts +209 -0
- package/dist/client/components/mdx/index.js +1 -0
- package/dist/client/components/mdx/index.mjs +1 -0
- package/dist/client/hooks/index.d.mts +133 -0
- package/dist/client/hooks/index.d.ts +133 -0
- package/dist/client/hooks/index.js +1 -0
- package/dist/client/hooks/index.mjs +1 -0
- package/dist/client/index.d.mts +138 -298
- package/dist/client/index.d.ts +138 -298
- package/dist/client/index.js +1 -3630
- package/dist/client/index.mjs +1 -697
- package/dist/client/ssr.d.mts +7 -3
- package/dist/client/ssr.d.ts +7 -3
- package/dist/client/ssr.js +1 -2928
- package/dist/client/ssr.mjs +1 -33
- package/dist/{config-BsFQ-ErD.d.ts → config-CX4l-ZNp.d.mts} +42 -35
- package/dist/{config-BsFQ-ErD.d.mts → config-CX4l-ZNp.d.ts} +42 -35
- package/dist/node/index.d.mts +2 -4
- package/dist/node/index.d.ts +2 -4
- package/dist/node/index.js +31 -1161
- package/dist/node/index.mjs +31 -736
- package/dist/search-dialog-EB3N4TYM.mjs +1 -0
- package/dist/types-BuZWFT7r.d.ts +159 -0
- package/dist/types-CvT-SGbK.d.mts +159 -0
- package/dist/use-routes-5bAtAAYX.d.mts +30 -0
- package/dist/use-routes-BefRXY3v.d.ts +30 -0
- package/package.json +34 -12
- package/src/client/app/config-context.tsx +18 -0
- package/src/client/app/docs-layout.tsx +14 -0
- package/src/client/app/index.tsx +137 -262
- package/src/client/app/mdx-component.tsx +52 -0
- package/src/client/app/mdx-components-context.tsx +23 -0
- package/src/client/app/mdx-page.tsx +20 -0
- package/src/client/app/preload.tsx +38 -30
- package/src/client/app/router.tsx +30 -0
- package/src/client/app/scroll-handler.tsx +40 -0
- package/src/client/app/theme-context.tsx +75 -0
- package/src/client/components/default-layout.tsx +80 -0
- package/src/client/components/docs-layout.tsx +105 -0
- package/src/client/components/icons-dev.tsx +74 -0
- package/src/client/components/mdx/admonition.tsx +107 -0
- package/src/client/components/mdx/badge.tsx +41 -0
- package/src/client/components/mdx/button.tsx +35 -0
- package/src/client/components/mdx/card.tsx +124 -0
- package/src/client/components/mdx/code-block.tsx +119 -0
- package/src/client/components/mdx/component-preview.tsx +47 -0
- package/src/client/components/mdx/component-props.tsx +83 -0
- package/src/client/components/mdx/field.tsx +66 -0
- package/src/client/components/mdx/file-tree.tsx +287 -0
- package/src/client/components/mdx/hooks/use-code-block.ts +56 -0
- package/src/client/components/mdx/hooks/use-component-preview.ts +16 -0
- package/src/client/components/mdx/hooks/useTable.ts +74 -0
- package/src/client/components/mdx/hooks/useTabs.ts +68 -0
- package/src/client/components/mdx/image.tsx +23 -0
- package/src/client/components/mdx/index.ts +53 -0
- package/src/client/components/mdx/link.tsx +38 -0
- package/src/client/components/mdx/list.tsx +192 -0
- package/src/client/components/mdx/table.tsx +156 -0
- package/src/client/components/mdx/tabs.tsx +135 -0
- package/src/client/components/mdx/video.tsx +68 -0
- package/src/client/components/primitives/breadcrumbs.tsx +79 -0
- package/src/client/components/primitives/button-group.tsx +54 -0
- package/src/client/components/primitives/button.tsx +145 -0
- package/src/client/components/primitives/helpers/observer.ts +120 -0
- package/src/client/components/primitives/index.ts +17 -0
- package/src/client/components/primitives/link.tsx +122 -0
- package/src/client/components/primitives/menu.tsx +159 -0
- package/src/client/components/primitives/navbar.tsx +359 -0
- package/src/client/components/primitives/navigation-menu.tsx +116 -0
- package/src/client/components/primitives/on-this-page.tsx +461 -0
- package/src/client/components/primitives/page-nav.tsx +87 -0
- package/src/client/components/primitives/popover.tsx +47 -0
- package/src/client/components/primitives/search-dialog.tsx +183 -0
- package/src/client/components/primitives/sidebar.tsx +154 -0
- package/src/client/components/primitives/tabs.tsx +90 -0
- package/src/client/components/primitives/tooltip.tsx +83 -0
- package/src/client/components/primitives/types.ts +11 -0
- package/src/client/components/ui-base/breadcrumbs.tsx +42 -0
- package/src/client/components/ui-base/copy-markdown.tsx +112 -0
- package/src/client/components/ui-base/error-boundary.tsx +52 -0
- package/src/client/components/ui-base/github-stars.tsx +27 -0
- package/src/client/components/ui-base/head.tsx +69 -0
- package/src/client/components/ui-base/loading.tsx +87 -0
- package/src/client/components/ui-base/navbar.tsx +138 -0
- package/src/client/components/ui-base/not-found.tsx +24 -0
- package/src/client/components/ui-base/on-this-page.tsx +152 -0
- package/src/client/components/ui-base/page-nav.tsx +39 -0
- package/src/client/components/ui-base/powered-by.tsx +19 -0
- package/src/client/components/ui-base/progress-bar.tsx +67 -0
- package/src/client/components/ui-base/search-dialog.tsx +82 -0
- package/src/client/components/ui-base/sidebar.tsx +104 -0
- package/src/client/components/ui-base/tabs.tsx +65 -0
- package/src/client/components/ui-base/theme-toggle.tsx +32 -0
- package/src/client/hooks/index.ts +12 -0
- package/src/client/hooks/use-breadcrumbs.ts +22 -0
- package/src/client/hooks/use-i18n.ts +84 -0
- package/src/client/hooks/use-localized-to.ts +95 -0
- package/src/client/hooks/use-location.ts +5 -0
- package/src/client/hooks/use-navbar.ts +60 -0
- package/src/client/hooks/use-onthispage.ts +23 -0
- package/src/client/hooks/use-page-nav.ts +22 -0
- package/src/client/hooks/use-routes.ts +72 -0
- package/src/client/hooks/use-search.ts +71 -0
- package/src/client/hooks/use-sidebar.ts +49 -0
- package/src/client/hooks/use-tabs.ts +43 -0
- package/src/client/hooks/use-version.ts +78 -0
- package/src/client/index.ts +55 -17
- package/src/client/integrations/codesandbox.ts +179 -0
- package/src/client/ssr.tsx +27 -16
- package/src/client/theme/neutral.css +360 -0
- package/src/client/types.ts +131 -27
- package/src/client/utils/cn.ts +6 -0
- package/src/client/utils/copy-clipboard.ts +22 -0
- package/src/client/utils/get-base-file-path.ts +21 -0
- package/src/client/utils/github.ts +121 -0
- package/src/client/utils/use-on-change.ts +15 -0
- package/src/client/virtual.d.ts +24 -0
- package/src/node/cache.ts +156 -156
- package/src/node/config.ts +159 -103
- package/src/node/index.ts +13 -13
- package/src/node/mdx.ts +213 -61
- package/src/node/plugin/entry.ts +29 -18
- package/src/node/plugin/html.ts +11 -11
- package/src/node/plugin/index.ts +161 -84
- package/src/node/plugin/types.ts +2 -4
- package/src/node/routes/cache.ts +6 -6
- package/src/node/routes/index.ts +206 -113
- package/src/node/routes/parser.ts +102 -82
- package/src/node/routes/sorter.ts +15 -15
- package/src/node/routes/types.ts +24 -24
- package/src/node/ssg/index.ts +73 -47
- package/src/node/ssg/meta.ts +4 -4
- package/src/node/ssg/options.ts +5 -5
- package/src/node/ssg/sitemap.ts +14 -14
- package/src/node/utils.ts +54 -31
- package/tsconfig.json +25 -20
- package/tsup.config.ts +23 -14
- package/dist/PackageManagerTabs-NVT7G625.mjs +0 -99
- package/dist/SearchDialog-AGVF6JBO.mjs +0 -194
- package/dist/SearchDialog-YPDOM7Q6.css +0 -2847
- package/dist/Video-KNTY5BNO.mjs +0 -6
- package/dist/cache-KNL5B4EE.mjs +0 -12
- package/dist/chunk-7SFUJWTB.mjs +0 -211
- package/dist/chunk-FFBNU6IJ.mjs +0 -386
- package/dist/chunk-FMTOYQLO.mjs +0 -37
- package/dist/chunk-TKLQWU7H.mjs +0 -1920
- package/dist/chunk-Z7JHYNAS.mjs +0 -57
- package/dist/client/index.css +0 -2847
- package/dist/client/ssr.css +0 -2847
- package/dist/types-Dj-bfnC3.d.mts +0 -74
- package/dist/types-Dj-bfnC3.d.ts +0 -74
- package/src/client/theme/components/CodeBlock/CodeBlock.tsx +0 -61
- package/src/client/theme/components/CodeBlock/index.ts +0 -1
- package/src/client/theme/components/PackageManagerTabs/PackageManagerTabs.tsx +0 -131
- package/src/client/theme/components/PackageManagerTabs/index.ts +0 -1
- package/src/client/theme/components/PackageManagerTabs/pkg-tabs.css +0 -64
- package/src/client/theme/components/Playground/Playground.tsx +0 -180
- package/src/client/theme/components/Playground/index.ts +0 -1
- package/src/client/theme/components/Playground/playground.css +0 -238
- package/src/client/theme/components/Video/Video.tsx +0 -84
- package/src/client/theme/components/Video/index.ts +0 -1
- package/src/client/theme/components/Video/video.css +0 -41
- package/src/client/theme/components/mdx/Admonition.tsx +0 -80
- package/src/client/theme/components/mdx/Badge.tsx +0 -31
- package/src/client/theme/components/mdx/Button.tsx +0 -50
- package/src/client/theme/components/mdx/Card.tsx +0 -80
- package/src/client/theme/components/mdx/Field.tsx +0 -60
- package/src/client/theme/components/mdx/FileTree.tsx +0 -229
- package/src/client/theme/components/mdx/List.tsx +0 -57
- package/src/client/theme/components/mdx/Table.tsx +0 -151
- package/src/client/theme/components/mdx/Tabs.tsx +0 -123
- package/src/client/theme/components/mdx/index.ts +0 -27
- package/src/client/theme/components/mdx/mdx-components.css +0 -764
- package/src/client/theme/icons/bun.tsx +0 -62
- package/src/client/theme/icons/deno.tsx +0 -20
- package/src/client/theme/icons/discord.tsx +0 -12
- package/src/client/theme/icons/github.tsx +0 -15
- package/src/client/theme/icons/npm.tsx +0 -13
- package/src/client/theme/icons/pnpm.tsx +0 -72
- package/src/client/theme/icons/twitter.tsx +0 -12
- package/src/client/theme/styles/markdown.css +0 -394
- package/src/client/theme/styles/variables.css +0 -175
- package/src/client/theme/styles.css +0 -39
- package/src/client/theme/ui/Breadcrumbs/Breadcrumbs.tsx +0 -68
- package/src/client/theme/ui/Breadcrumbs/index.ts +0 -1
- package/src/client/theme/ui/CopyMarkdown/CopyMarkdown.tsx +0 -82
- package/src/client/theme/ui/CopyMarkdown/copy-markdown.css +0 -112
- package/src/client/theme/ui/CopyMarkdown/index.ts +0 -1
- package/src/client/theme/ui/ErrorBoundary/ErrorBoundary.tsx +0 -50
- package/src/client/theme/ui/ErrorBoundary/error-boundary.css +0 -55
- package/src/client/theme/ui/ErrorBoundary/index.ts +0 -1
- package/src/client/theme/ui/Footer/footer.css +0 -32
- package/src/client/theme/ui/Head/Head.tsx +0 -69
- package/src/client/theme/ui/Head/index.ts +0 -1
- package/src/client/theme/ui/LanguageSwitcher/LanguageSwitcher.tsx +0 -125
- package/src/client/theme/ui/LanguageSwitcher/index.ts +0 -1
- package/src/client/theme/ui/LanguageSwitcher/language-switcher.css +0 -98
- package/src/client/theme/ui/Layout/Layout.tsx +0 -203
- package/src/client/theme/ui/Layout/base.css +0 -106
- package/src/client/theme/ui/Layout/index.ts +0 -2
- package/src/client/theme/ui/Layout/pagination.css +0 -72
- package/src/client/theme/ui/Layout/responsive.css +0 -47
- package/src/client/theme/ui/Link/Link.tsx +0 -392
- package/src/client/theme/ui/Link/LinkPreview.tsx +0 -59
- package/src/client/theme/ui/Link/index.ts +0 -2
- package/src/client/theme/ui/Link/link-preview.css +0 -48
- package/src/client/theme/ui/Loading/Loading.tsx +0 -10
- package/src/client/theme/ui/Loading/index.ts +0 -1
- package/src/client/theme/ui/Loading/loading.css +0 -30
- package/src/client/theme/ui/Navbar/GithubStars.tsx +0 -27
- package/src/client/theme/ui/Navbar/Navbar.tsx +0 -193
- package/src/client/theme/ui/Navbar/Tabs.tsx +0 -99
- package/src/client/theme/ui/Navbar/index.ts +0 -2
- package/src/client/theme/ui/Navbar/navbar.css +0 -347
- package/src/client/theme/ui/NotFound/NotFound.tsx +0 -19
- package/src/client/theme/ui/NotFound/index.ts +0 -1
- package/src/client/theme/ui/NotFound/not-found.css +0 -64
- package/src/client/theme/ui/OnThisPage/OnThisPage.tsx +0 -244
- package/src/client/theme/ui/OnThisPage/index.ts +0 -1
- package/src/client/theme/ui/OnThisPage/toc.css +0 -152
- package/src/client/theme/ui/PoweredBy/PoweredBy.tsx +0 -18
- package/src/client/theme/ui/PoweredBy/index.ts +0 -1
- package/src/client/theme/ui/PoweredBy/powered-by.css +0 -76
- package/src/client/theme/ui/ProgressBar/ProgressBar.css +0 -17
- package/src/client/theme/ui/ProgressBar/ProgressBar.tsx +0 -51
- package/src/client/theme/ui/ProgressBar/index.ts +0 -1
- package/src/client/theme/ui/SearchDialog/SearchDialog.tsx +0 -209
- package/src/client/theme/ui/SearchDialog/index.ts +0 -1
- package/src/client/theme/ui/SearchDialog/search.css +0 -152
- package/src/client/theme/ui/Sidebar/Sidebar.tsx +0 -244
- package/src/client/theme/ui/Sidebar/index.ts +0 -1
- package/src/client/theme/ui/Sidebar/sidebar.css +0 -230
- package/src/client/theme/ui/ThemeToggle/ThemeToggle.tsx +0 -69
- package/src/client/theme/ui/ThemeToggle/index.ts +0 -1
- package/src/client/theme/ui/VersionSwitcher/VersionSwitcher.tsx +0 -136
- package/src/client/theme/ui/VersionSwitcher/index.ts +0 -1
- package/src/client/utils.ts +0 -49
package/dist/client/ssr.mjs
CHANGED
|
@@ -1,33 +1 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AppShell
|
|
3
|
-
} from "../chunk-TKLQWU7H.mjs";
|
|
4
|
-
import "../chunk-FMTOYQLO.mjs";
|
|
5
|
-
|
|
6
|
-
// src/client/ssr.tsx
|
|
7
|
-
import React from "react";
|
|
8
|
-
import ReactDOMServer from "react-dom/server";
|
|
9
|
-
import { StaticRouter } from "react-router-dom/server";
|
|
10
|
-
import { jsx } from "react/jsx-runtime";
|
|
11
|
-
async function render(options) {
|
|
12
|
-
const { path, routes, config, modules, homePage, docsDirName } = options;
|
|
13
|
-
const resolvedModules = {};
|
|
14
|
-
for (const [key, mod] of Object.entries(modules)) {
|
|
15
|
-
resolvedModules[key] = () => Promise.resolve(mod);
|
|
16
|
-
}
|
|
17
|
-
const html = ReactDOMServer.renderToString(
|
|
18
|
-
/* @__PURE__ */ jsx(React.StrictMode, { children: /* @__PURE__ */ jsx(StaticRouter, { location: path, children: /* @__PURE__ */ jsx(
|
|
19
|
-
AppShell,
|
|
20
|
-
{
|
|
21
|
-
initialRoutes: routes,
|
|
22
|
-
initialConfig: config,
|
|
23
|
-
docsDirName,
|
|
24
|
-
modules: resolvedModules,
|
|
25
|
-
homePage
|
|
26
|
-
}
|
|
27
|
-
) }) })
|
|
28
|
-
);
|
|
29
|
-
return html;
|
|
30
|
-
}
|
|
31
|
-
export {
|
|
32
|
-
render
|
|
33
|
-
};
|
|
1
|
+
import{d as t}from"../chunk-QYPNX5UN.mjs";import"../chunk-A4HQPEPU.mjs";import"../chunk-BA5NH5HU.mjs";import"../chunk-BQCD3DWG.mjs";import"../chunk-XEAPSFMB.mjs";import"../chunk-JZXLCA2E.mjs";import l from"react";import R from"react-dom/server";import{StaticRouter as f}from"react-router-dom/server";import{jsx as e}from"react/jsx-runtime";async function D(r){let{path:n,routes:i,config:s,modules:a,homePage:m,externalPages:c,docsDirName:p}=r,o={};for(let[d,g]of Object.entries(a))o[d]=()=>Promise.resolve(g);return R.renderToString(e(l.StrictMode,{children:e(f,{location:n,children:e(t,{initialRoutes:i,initialConfig:s,docsDirName:p,modules:o,homePage:m,externalPages:c})})}))}export{D as render};
|
|
@@ -4,8 +4,8 @@ import { Plugin } from 'vite';
|
|
|
4
4
|
* Represents a single social link in the configuration.
|
|
5
5
|
*/
|
|
6
6
|
interface BoltdocsSocialLink {
|
|
7
|
-
/** Identifier for the icon (e.g., 'github'
|
|
8
|
-
icon:
|
|
7
|
+
/** Identifier for the icon (e.g., 'github') */
|
|
8
|
+
icon: 'discord' | 'x' | 'github' | 'bluesky' | string;
|
|
9
9
|
/** The URL the social link points to */
|
|
10
10
|
link: string;
|
|
11
11
|
}
|
|
@@ -24,22 +24,25 @@ interface BoltdocsThemeConfig {
|
|
|
24
24
|
title?: string;
|
|
25
25
|
/** The global description of the site (used for SEO) */
|
|
26
26
|
description?: string;
|
|
27
|
-
/** URL path to the site logo */
|
|
28
|
-
logo?: string
|
|
27
|
+
/** URL path to the site logo or an object for light/dark versions */
|
|
28
|
+
logo?: string | {
|
|
29
|
+
dark: string;
|
|
30
|
+
light: string;
|
|
31
|
+
alt?: string;
|
|
32
|
+
width?: number;
|
|
33
|
+
height?: number;
|
|
34
|
+
};
|
|
29
35
|
/** Items to display in the top navigation bar */
|
|
30
36
|
navbar?: Array<{
|
|
31
|
-
/** Text to display (alias for text) */
|
|
32
|
-
label?: string;
|
|
33
37
|
/** Text to display */
|
|
34
|
-
|
|
35
|
-
/** URL path or external link (alias for link) */
|
|
36
|
-
to?: string;
|
|
37
|
-
/** URL path or external link (alias for link) */
|
|
38
|
-
href?: string;
|
|
38
|
+
label: string;
|
|
39
39
|
/** URL path or external link */
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
|
|
40
|
+
href: string;
|
|
41
|
+
/** Nested items for NavigationMenu */
|
|
42
|
+
items?: Array<{
|
|
43
|
+
label: string;
|
|
44
|
+
href: string;
|
|
45
|
+
}>;
|
|
43
46
|
}>;
|
|
44
47
|
/** Items to display in the sidebar, organized optionally by group URLs */
|
|
45
48
|
sidebar?: Record<string, Array<{
|
|
@@ -52,8 +55,6 @@ interface BoltdocsThemeConfig {
|
|
|
52
55
|
footer?: BoltdocsFooterConfig;
|
|
53
56
|
/** Whether to show breadcrumbs navigation (default: true) */
|
|
54
57
|
breadcrumbs?: boolean;
|
|
55
|
-
/** Path to a custom CSS file that overrides theme variables */
|
|
56
|
-
customCss?: string;
|
|
57
58
|
/** URL template for 'Edit this page'. Use :path as a placeholder. */
|
|
58
59
|
editLink?: string;
|
|
59
60
|
/** URL for the 'Community help' link. */
|
|
@@ -64,19 +65,6 @@ interface BoltdocsThemeConfig {
|
|
|
64
65
|
githubRepo?: string;
|
|
65
66
|
/** Whether to show the 'Powered by LiteDocs' badge in the sidebar (default: true) */
|
|
66
67
|
poweredBy?: boolean;
|
|
67
|
-
/** Whether to show a preview tooltip on internal links hover (default: true) */
|
|
68
|
-
linkPreview?: boolean;
|
|
69
|
-
/** Granular layout customization props */
|
|
70
|
-
layoutProps?: {
|
|
71
|
-
navbar?: any;
|
|
72
|
-
sidebar?: any;
|
|
73
|
-
toc?: any;
|
|
74
|
-
background?: any;
|
|
75
|
-
head?: any;
|
|
76
|
-
breadcrumbs?: any;
|
|
77
|
-
className?: string;
|
|
78
|
-
style?: any;
|
|
79
|
-
};
|
|
80
68
|
/**
|
|
81
69
|
* Top-level tabs for organizing documentation groups.
|
|
82
70
|
* Tab discovery uses the (tab-id) directory syntax.
|
|
@@ -90,9 +78,12 @@ interface BoltdocsThemeConfig {
|
|
|
90
78
|
* The syntax highlighting theme for code blocks.
|
|
91
79
|
* Supports any Shiki theme name (e.g., 'github-dark', 'one-dark-pro', 'aurora-x').
|
|
92
80
|
* Can also be an object for multiple themes (e.g., { light: 'github-light', dark: 'github-dark' }).
|
|
93
|
-
* Default: 'one-dark-pro'
|
|
81
|
+
* Default: { light: 'github-light', dark: 'one-dark-pro' }
|
|
94
82
|
*/
|
|
95
|
-
codeTheme?: string |
|
|
83
|
+
codeTheme?: string | {
|
|
84
|
+
light: string;
|
|
85
|
+
dark: string;
|
|
86
|
+
};
|
|
96
87
|
/**
|
|
97
88
|
* Configuration for the 'Copy Markdown' button.
|
|
98
89
|
* Can be a boolean or an object with text and icon.
|
|
@@ -128,16 +119,28 @@ interface BoltdocsPlugin {
|
|
|
128
119
|
/** A unique name for the plugin */
|
|
129
120
|
name: string;
|
|
130
121
|
/** Whether to run this plugin before or after default ones (optional) */
|
|
131
|
-
enforce?:
|
|
122
|
+
enforce?: 'pre' | 'post';
|
|
132
123
|
/** Optional remark plugins to add to the MDX pipeline */
|
|
133
|
-
remarkPlugins?:
|
|
124
|
+
remarkPlugins?: unknown[];
|
|
134
125
|
/** Optional rehype plugins to add to the MDX pipeline */
|
|
135
|
-
rehypePlugins?:
|
|
126
|
+
rehypePlugins?: unknown[];
|
|
136
127
|
/** Optional Vite plugins to inject into the build process */
|
|
137
128
|
vitePlugins?: Plugin[];
|
|
138
129
|
/** Optional custom React components to register in MDX. Map of Name -> Module Path. */
|
|
139
130
|
components?: Record<string, string>;
|
|
140
131
|
}
|
|
132
|
+
/**
|
|
133
|
+
* Configuration for external integrations (e.g., CodeSandbox).
|
|
134
|
+
*/
|
|
135
|
+
interface BoltdocsIntegrationsConfig {
|
|
136
|
+
/** CodeSandbox integration settings */
|
|
137
|
+
sandbox?: {
|
|
138
|
+
/** Whether to enable the "Open in Sandbox" button in CodeBlocks */
|
|
139
|
+
enable?: boolean;
|
|
140
|
+
/** Default options for the sandbox (files, dependencies, etc.) */
|
|
141
|
+
config?: Record<string, unknown>;
|
|
142
|
+
};
|
|
143
|
+
}
|
|
141
144
|
/**
|
|
142
145
|
* The root configuration object for Boltdocs.
|
|
143
146
|
*/
|
|
@@ -154,6 +157,10 @@ interface BoltdocsConfig {
|
|
|
154
157
|
versions?: BoltdocsVersionsConfig;
|
|
155
158
|
/** Custom plugins for extending functionality */
|
|
156
159
|
plugins?: BoltdocsPlugin[];
|
|
160
|
+
/** Map of custom external route paths to component file paths */
|
|
161
|
+
external?: Record<string, string>;
|
|
162
|
+
/** External integrations configuration */
|
|
163
|
+
integrations?: BoltdocsIntegrationsConfig;
|
|
157
164
|
}
|
|
158
165
|
|
|
159
|
-
export type { BoltdocsConfig as B, BoltdocsThemeConfig as a };
|
|
166
|
+
export type { BoltdocsConfig as B, BoltdocsThemeConfig as a, BoltdocsSocialLink as b };
|
|
@@ -4,8 +4,8 @@ import { Plugin } from 'vite';
|
|
|
4
4
|
* Represents a single social link in the configuration.
|
|
5
5
|
*/
|
|
6
6
|
interface BoltdocsSocialLink {
|
|
7
|
-
/** Identifier for the icon (e.g., 'github'
|
|
8
|
-
icon:
|
|
7
|
+
/** Identifier for the icon (e.g., 'github') */
|
|
8
|
+
icon: 'discord' | 'x' | 'github' | 'bluesky' | string;
|
|
9
9
|
/** The URL the social link points to */
|
|
10
10
|
link: string;
|
|
11
11
|
}
|
|
@@ -24,22 +24,25 @@ interface BoltdocsThemeConfig {
|
|
|
24
24
|
title?: string;
|
|
25
25
|
/** The global description of the site (used for SEO) */
|
|
26
26
|
description?: string;
|
|
27
|
-
/** URL path to the site logo */
|
|
28
|
-
logo?: string
|
|
27
|
+
/** URL path to the site logo or an object for light/dark versions */
|
|
28
|
+
logo?: string | {
|
|
29
|
+
dark: string;
|
|
30
|
+
light: string;
|
|
31
|
+
alt?: string;
|
|
32
|
+
width?: number;
|
|
33
|
+
height?: number;
|
|
34
|
+
};
|
|
29
35
|
/** Items to display in the top navigation bar */
|
|
30
36
|
navbar?: Array<{
|
|
31
|
-
/** Text to display (alias for text) */
|
|
32
|
-
label?: string;
|
|
33
37
|
/** Text to display */
|
|
34
|
-
|
|
35
|
-
/** URL path or external link (alias for link) */
|
|
36
|
-
to?: string;
|
|
37
|
-
/** URL path or external link (alias for link) */
|
|
38
|
-
href?: string;
|
|
38
|
+
label: string;
|
|
39
39
|
/** URL path or external link */
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
|
|
40
|
+
href: string;
|
|
41
|
+
/** Nested items for NavigationMenu */
|
|
42
|
+
items?: Array<{
|
|
43
|
+
label: string;
|
|
44
|
+
href: string;
|
|
45
|
+
}>;
|
|
43
46
|
}>;
|
|
44
47
|
/** Items to display in the sidebar, organized optionally by group URLs */
|
|
45
48
|
sidebar?: Record<string, Array<{
|
|
@@ -52,8 +55,6 @@ interface BoltdocsThemeConfig {
|
|
|
52
55
|
footer?: BoltdocsFooterConfig;
|
|
53
56
|
/** Whether to show breadcrumbs navigation (default: true) */
|
|
54
57
|
breadcrumbs?: boolean;
|
|
55
|
-
/** Path to a custom CSS file that overrides theme variables */
|
|
56
|
-
customCss?: string;
|
|
57
58
|
/** URL template for 'Edit this page'. Use :path as a placeholder. */
|
|
58
59
|
editLink?: string;
|
|
59
60
|
/** URL for the 'Community help' link. */
|
|
@@ -64,19 +65,6 @@ interface BoltdocsThemeConfig {
|
|
|
64
65
|
githubRepo?: string;
|
|
65
66
|
/** Whether to show the 'Powered by LiteDocs' badge in the sidebar (default: true) */
|
|
66
67
|
poweredBy?: boolean;
|
|
67
|
-
/** Whether to show a preview tooltip on internal links hover (default: true) */
|
|
68
|
-
linkPreview?: boolean;
|
|
69
|
-
/** Granular layout customization props */
|
|
70
|
-
layoutProps?: {
|
|
71
|
-
navbar?: any;
|
|
72
|
-
sidebar?: any;
|
|
73
|
-
toc?: any;
|
|
74
|
-
background?: any;
|
|
75
|
-
head?: any;
|
|
76
|
-
breadcrumbs?: any;
|
|
77
|
-
className?: string;
|
|
78
|
-
style?: any;
|
|
79
|
-
};
|
|
80
68
|
/**
|
|
81
69
|
* Top-level tabs for organizing documentation groups.
|
|
82
70
|
* Tab discovery uses the (tab-id) directory syntax.
|
|
@@ -90,9 +78,12 @@ interface BoltdocsThemeConfig {
|
|
|
90
78
|
* The syntax highlighting theme for code blocks.
|
|
91
79
|
* Supports any Shiki theme name (e.g., 'github-dark', 'one-dark-pro', 'aurora-x').
|
|
92
80
|
* Can also be an object for multiple themes (e.g., { light: 'github-light', dark: 'github-dark' }).
|
|
93
|
-
* Default: 'one-dark-pro'
|
|
81
|
+
* Default: { light: 'github-light', dark: 'one-dark-pro' }
|
|
94
82
|
*/
|
|
95
|
-
codeTheme?: string |
|
|
83
|
+
codeTheme?: string | {
|
|
84
|
+
light: string;
|
|
85
|
+
dark: string;
|
|
86
|
+
};
|
|
96
87
|
/**
|
|
97
88
|
* Configuration for the 'Copy Markdown' button.
|
|
98
89
|
* Can be a boolean or an object with text and icon.
|
|
@@ -128,16 +119,28 @@ interface BoltdocsPlugin {
|
|
|
128
119
|
/** A unique name for the plugin */
|
|
129
120
|
name: string;
|
|
130
121
|
/** Whether to run this plugin before or after default ones (optional) */
|
|
131
|
-
enforce?:
|
|
122
|
+
enforce?: 'pre' | 'post';
|
|
132
123
|
/** Optional remark plugins to add to the MDX pipeline */
|
|
133
|
-
remarkPlugins?:
|
|
124
|
+
remarkPlugins?: unknown[];
|
|
134
125
|
/** Optional rehype plugins to add to the MDX pipeline */
|
|
135
|
-
rehypePlugins?:
|
|
126
|
+
rehypePlugins?: unknown[];
|
|
136
127
|
/** Optional Vite plugins to inject into the build process */
|
|
137
128
|
vitePlugins?: Plugin[];
|
|
138
129
|
/** Optional custom React components to register in MDX. Map of Name -> Module Path. */
|
|
139
130
|
components?: Record<string, string>;
|
|
140
131
|
}
|
|
132
|
+
/**
|
|
133
|
+
* Configuration for external integrations (e.g., CodeSandbox).
|
|
134
|
+
*/
|
|
135
|
+
interface BoltdocsIntegrationsConfig {
|
|
136
|
+
/** CodeSandbox integration settings */
|
|
137
|
+
sandbox?: {
|
|
138
|
+
/** Whether to enable the "Open in Sandbox" button in CodeBlocks */
|
|
139
|
+
enable?: boolean;
|
|
140
|
+
/** Default options for the sandbox (files, dependencies, etc.) */
|
|
141
|
+
config?: Record<string, unknown>;
|
|
142
|
+
};
|
|
143
|
+
}
|
|
141
144
|
/**
|
|
142
145
|
* The root configuration object for Boltdocs.
|
|
143
146
|
*/
|
|
@@ -154,6 +157,10 @@ interface BoltdocsConfig {
|
|
|
154
157
|
versions?: BoltdocsVersionsConfig;
|
|
155
158
|
/** Custom plugins for extending functionality */
|
|
156
159
|
plugins?: BoltdocsPlugin[];
|
|
160
|
+
/** Map of custom external route paths to component file paths */
|
|
161
|
+
external?: Record<string, string>;
|
|
162
|
+
/** External integrations configuration */
|
|
163
|
+
integrations?: BoltdocsIntegrationsConfig;
|
|
157
164
|
}
|
|
158
165
|
|
|
159
|
-
export type { BoltdocsConfig as B, BoltdocsThemeConfig as a };
|
|
166
|
+
export type { BoltdocsConfig as B, BoltdocsThemeConfig as a, BoltdocsSocialLink as b };
|
package/dist/node/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Plugin } from 'vite';
|
|
2
|
-
import { B as BoltdocsConfig } from '../config-
|
|
3
|
-
export { a as BoltdocsThemeConfig } from '../config-
|
|
2
|
+
import { B as BoltdocsConfig } from '../config-CX4l-ZNp.mjs';
|
|
3
|
+
export { a as BoltdocsThemeConfig } from '../config-CX4l-ZNp.mjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Configuration options specifically for the Boltdocs Vite plugin.
|
|
@@ -10,8 +10,6 @@ interface BoltdocsPluginOptions {
|
|
|
10
10
|
docsDir?: string;
|
|
11
11
|
/** Path to a custom home page component (relative to project root) to render at '/' */
|
|
12
12
|
homePage?: string;
|
|
13
|
-
/** Path to a custom CSS file to override theme variables. Can also be set in boltdocs.config.js */
|
|
14
|
-
customCss?: string;
|
|
15
13
|
}
|
|
16
14
|
|
|
17
15
|
/**
|
package/dist/node/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Plugin } from 'vite';
|
|
2
|
-
import { B as BoltdocsConfig } from '../config-
|
|
3
|
-
export { a as BoltdocsThemeConfig } from '../config-
|
|
2
|
+
import { B as BoltdocsConfig } from '../config-CX4l-ZNp.js';
|
|
3
|
+
export { a as BoltdocsThemeConfig } from '../config-CX4l-ZNp.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Configuration options specifically for the Boltdocs Vite plugin.
|
|
@@ -10,8 +10,6 @@ interface BoltdocsPluginOptions {
|
|
|
10
10
|
docsDir?: string;
|
|
11
11
|
/** Path to a custom home page component (relative to project root) to render at '/' */
|
|
12
12
|
homePage?: string;
|
|
13
|
-
/** Path to a custom CSS file to override theme variables. Can also be set in boltdocs.config.js */
|
|
14
|
-
customCss?: string;
|
|
15
13
|
}
|
|
16
14
|
|
|
17
15
|
/**
|