boltdocs 2.4.1 → 2.5.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/CHANGELOG.md +16 -0
  2. package/dist/cache-3FOEPC2P.mjs +1 -0
  3. package/dist/chunk-ITFGVXPE.mjs +1 -0
  4. package/dist/chunk-TP5KMRD3.mjs +1 -0
  5. package/dist/chunk-UD2LQG2M.mjs +75 -0
  6. package/dist/chunk-Y4RE5KI7.mjs +1 -0
  7. package/dist/client/index.d.mts +1225 -14
  8. package/dist/client/index.d.ts +1225 -14
  9. package/dist/client/index.js +1 -1
  10. package/dist/client/index.mjs +1 -1
  11. package/dist/client/ssr.js +1 -1
  12. package/dist/client/ssr.mjs +1 -1
  13. package/dist/node/cli-entry.js +37 -35
  14. package/dist/node/cli-entry.mjs +1 -1
  15. package/dist/node/index.d.mts +263 -1
  16. package/dist/node/index.d.ts +263 -1
  17. package/dist/node/index.js +34 -32
  18. package/dist/node/index.mjs +1 -1
  19. package/dist/package-TWC3BMZ7.mjs +1 -0
  20. package/dist/search-dialog-YBM4GYDR.mjs +1 -0
  21. package/package.json +46 -76
  22. package/src/client/components/primitives/breadcrumbs.tsx +10 -10
  23. package/src/client/components/primitives/index.ts +17 -16
  24. package/src/client/components/primitives/menu.tsx +11 -14
  25. package/src/client/components/primitives/navbar.tsx +29 -29
  26. package/src/client/components/primitives/navigation-menu.tsx +7 -9
  27. package/src/client/components/primitives/on-this-page.tsx +16 -18
  28. package/src/client/components/primitives/page-nav.tsx +10 -13
  29. package/src/client/components/primitives/search-dialog.tsx +17 -19
  30. package/src/client/components/primitives/sidebar.tsx +8 -10
  31. package/src/client/components/primitives/tabs.tsx +10 -12
  32. package/src/client/components/primitives/tooltip.tsx +3 -5
  33. package/src/client/components/ui-base/breadcrumbs.tsx +12 -15
  34. package/src/client/components/ui-base/copy-markdown.tsx +8 -10
  35. package/src/client/components/ui-base/navbar.tsx +10 -10
  36. package/src/client/components/ui-base/on-this-page.tsx +13 -12
  37. package/src/client/components/ui-base/page-nav.tsx +15 -15
  38. package/src/client/components/ui-base/search-dialog.tsx +13 -20
  39. package/src/client/components/ui-base/sidebar.tsx +9 -9
  40. package/src/client/components/ui-base/tabs.tsx +6 -7
  41. package/src/client/components/ui-base/theme-toggle.tsx +11 -11
  42. package/src/client/hooks/index.ts +12 -12
  43. package/src/client/index.ts +34 -11
  44. package/src/node/config.ts +48 -6
  45. package/src/node/errors.ts +44 -0
  46. package/src/node/index.ts +29 -2
  47. package/src/node/mdx/index.ts +9 -2
  48. package/src/node/plugin/index.ts +72 -4
  49. package/src/node/plugins/index.ts +17 -0
  50. package/src/node/plugins/plugin-errors.ts +62 -0
  51. package/src/node/plugins/plugin-lifecycle.ts +117 -0
  52. package/src/node/plugins/plugin-sandbox.ts +59 -0
  53. package/src/node/plugins/plugin-store.ts +54 -0
  54. package/src/node/plugins/plugin-types.ts +107 -0
  55. package/src/node/plugins/plugin-validator.ts +105 -0
  56. package/src/node/routes/parser.ts +35 -5
  57. package/src/node/schema/config.ts +208 -0
  58. package/src/node/schema/frontmatter.ts +17 -0
  59. package/src/node/security/constants/index.ts +10 -0
  60. package/src/node/security/csp.ts +31 -0
  61. package/src/node/security/headers.ts +27 -0
  62. package/src/node/utils.ts +153 -5
  63. package/tsup.config.ts +0 -6
  64. package/dist/base-ui/index.d.mts +0 -25
  65. package/dist/base-ui/index.d.ts +0 -25
  66. package/dist/base-ui/index.js +0 -1
  67. package/dist/base-ui/index.mjs +0 -1
  68. package/dist/cache-P6WK424C.mjs +0 -1
  69. package/dist/chunk-2DI3OGHV.mjs +0 -1
  70. package/dist/chunk-2Z5T6EAU.mjs +0 -1
  71. package/dist/chunk-64AJ5QLT.mjs +0 -1
  72. package/dist/chunk-DDX52BX4.mjs +0 -1
  73. package/dist/chunk-HRZDSFR5.mjs +0 -1
  74. package/dist/chunk-JD3RSDE4.mjs +0 -1
  75. package/dist/chunk-JZXLCA2E.mjs +0 -1
  76. package/dist/chunk-NBCYHLAA.mjs +0 -1
  77. package/dist/chunk-PPVDMDEL.mjs +0 -1
  78. package/dist/chunk-T3W44KWY.mjs +0 -1
  79. package/dist/chunk-UBE4CKOA.mjs +0 -1
  80. package/dist/chunk-UWT4AJTH.mjs +0 -73
  81. package/dist/chunk-WWJ7WKDI.mjs +0 -1
  82. package/dist/chunk-Y4RRHPXC.mjs +0 -1
  83. package/dist/client/types.d.mts +0 -3
  84. package/dist/client/types.d.ts +0 -3
  85. package/dist/client/types.js +0 -1
  86. package/dist/client/types.mjs +0 -0
  87. package/dist/copy-markdown--9yjpbyy.d.mts +0 -15
  88. package/dist/copy-markdown-l2MYkcG7.d.ts +0 -15
  89. package/dist/hooks/index.d.mts +0 -137
  90. package/dist/hooks/index.d.ts +0 -137
  91. package/dist/hooks/index.js +0 -1
  92. package/dist/hooks/index.mjs +0 -1
  93. package/dist/integrations/index.d.mts +0 -48
  94. package/dist/integrations/index.d.ts +0 -48
  95. package/dist/integrations/index.js +0 -1
  96. package/dist/integrations/index.mjs +0 -1
  97. package/dist/link-DfBwCeZc.d.mts +0 -68
  98. package/dist/link-DfBwCeZc.d.ts +0 -68
  99. package/dist/loading-BwUos0wZ.d.mts +0 -57
  100. package/dist/loading-nlnUD01v.d.ts +0 -57
  101. package/dist/mdx/index.d.mts +0 -178
  102. package/dist/mdx/index.d.ts +0 -178
  103. package/dist/mdx/index.js +0 -1
  104. package/dist/mdx/index.mjs +0 -1
  105. package/dist/primitives/index.d.mts +0 -292
  106. package/dist/primitives/index.d.ts +0 -292
  107. package/dist/primitives/index.js +0 -1
  108. package/dist/primitives/index.mjs +0 -1
  109. package/dist/search-dialog-OONKKC5H.mjs +0 -1
  110. package/dist/types-opDA2E9-.d.mts +0 -394
  111. package/dist/types-opDA2E9-.d.ts +0 -394
  112. package/dist/use-routes-DNwgTRpU.d.ts +0 -29
  113. package/dist/use-routes-DrT80Eom.d.mts +0 -29
@@ -1,48 +0,0 @@
1
- import { f as SandboxOptions } from '../types-opDA2E9-.mjs';
2
- import 'react';
3
- import 'vite';
4
-
5
- /**
6
- * Helper to define a sandbox and get a URL for the CodeSandbox Define API.
7
- * Uses the official SDK `getParameters` for proper LZ-string compression.
8
- */
9
- declare function defineSandbox(options: SandboxOptions): {
10
- parameters: string;
11
- url: string;
12
- options: SandboxOptions;
13
- };
14
- /**
15
- * CORE API: Open a CodeSandbox using a form POST to the Define API.
16
- *
17
- * Uses a hidden form + POST which avoids URL length limits and is the
18
- * recommended approach from CodeSandbox documentation. The SDK's
19
- * `getParameters` handles LZ-string compression internally.
20
- */
21
- declare function openSandbox(options: SandboxOptions): {
22
- parameters: string;
23
- url: string;
24
- options: SandboxOptions;
25
- };
26
- /**
27
- * Generate an embeddable iframe URL for a CodeSandbox.
28
- *
29
- * This gives you more control than `openSandbox` — you can embed the sandbox
30
- * inline on the page rather than opening a new tab. The returned URL can be
31
- * used as the `src` of an `<iframe>`.
32
- *
33
- * @example
34
- * ```tsx
35
- * const url = embedSandbox({
36
- * files: { "index.js": { content: "console.log('hello')" } },
37
- * embed: { view: "editor", theme: "dark" },
38
- * }).url;
39
- * // url → "https://codesandbox.io/api/v1/sandboxes/define?parameters=…&embed=1&view=editor&theme=dark"
40
- * ```
41
- */
42
- declare function embedSandbox(options: SandboxOptions): {
43
- parameters: string;
44
- url: string;
45
- options: SandboxOptions;
46
- };
47
-
48
- export { defineSandbox, embedSandbox, openSandbox };
@@ -1,48 +0,0 @@
1
- import { f as SandboxOptions } from '../types-opDA2E9-.js';
2
- import 'react';
3
- import 'vite';
4
-
5
- /**
6
- * Helper to define a sandbox and get a URL for the CodeSandbox Define API.
7
- * Uses the official SDK `getParameters` for proper LZ-string compression.
8
- */
9
- declare function defineSandbox(options: SandboxOptions): {
10
- parameters: string;
11
- url: string;
12
- options: SandboxOptions;
13
- };
14
- /**
15
- * CORE API: Open a CodeSandbox using a form POST to the Define API.
16
- *
17
- * Uses a hidden form + POST which avoids URL length limits and is the
18
- * recommended approach from CodeSandbox documentation. The SDK's
19
- * `getParameters` handles LZ-string compression internally.
20
- */
21
- declare function openSandbox(options: SandboxOptions): {
22
- parameters: string;
23
- url: string;
24
- options: SandboxOptions;
25
- };
26
- /**
27
- * Generate an embeddable iframe URL for a CodeSandbox.
28
- *
29
- * This gives you more control than `openSandbox` — you can embed the sandbox
30
- * inline on the page rather than opening a new tab. The returned URL can be
31
- * used as the `src` of an `<iframe>`.
32
- *
33
- * @example
34
- * ```tsx
35
- * const url = embedSandbox({
36
- * files: { "index.js": { content: "console.log('hello')" } },
37
- * embed: { view: "editor", theme: "dark" },
38
- * }).url;
39
- * // url → "https://codesandbox.io/api/v1/sandboxes/define?parameters=…&embed=1&view=editor&theme=dark"
40
- * ```
41
- */
42
- declare function embedSandbox(options: SandboxOptions): {
43
- parameters: string;
44
- url: string;
45
- options: SandboxOptions;
46
- };
47
-
48
- export { defineSandbox, embedSandbox, openSandbox };
@@ -1 +0,0 @@
1
- "use strict";var f=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var x=Object.prototype.hasOwnProperty;var v=(e,t)=>{for(var s in t)f(e,s,{get:t[s],enumerable:!0})},y=(e,t,s,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of b(t))!x.call(e,n)&&n!==s&&f(e,n,{get:()=>t[n],enumerable:!(i=u(t,n))||i.enumerable});return e};var S=e=>y(f({},"__esModule",{value:!0}),e);var O={};v(O,{defineSandbox:()=>m,embedSandbox:()=>w,openSandbox:()=>g});module.exports=S(O);var l=require("codesandbox/lib/api/define.js");function p(e){let t=e.files||{},s=e.dependencies||{},i=e.devDependencies||{},n=e.title||"codesandbox-project",d=e.description||"Generic Sandbox",a={};for(let[c,r]of Object.entries(t)){let o=typeof r.content=="object"?JSON.stringify(r.content,null,2):r.content;a[c]={content:o,isBinary:r.isBinary??!1}}if(!a["package.json"]){let r=e.template==="vite"||!!i.vite||!!i["@vitejs/plugin-react"]?{dev:"vite",build:"vite build",preview:"vite preview"}:{start:"node index.js"};a["package.json"]={content:JSON.stringify({private:!0,name:n,description:d,type:"module",version:"1.0.0",scripts:e.scripts||r,dependencies:s,devDependencies:i},null,2),isBinary:!1}}return a}function m(e){let t=p(e),s=(0,l.getParameters)({files:t}),i=new URLSearchParams({parameters:s,installDependencies:"true"});return e.entry&&i.set("file",`/${e.entry}`),{parameters:s,url:`https://codesandbox.io/api/v1/sandboxes/define?${i.toString()}`,options:e}}function g(e){if(typeof window>"u")return m(e);let t=p(e),s=(0,l.getParameters)({files:t}),i=e.entry||"src/App.tsx",n=document.createElement("form");n.method="POST",n.target="_blank",n.action="https://codesandbox.io/api/v1/sandboxes/define",n.style.display="none";let d=(c,r)=>{let o=document.createElement("input");o.type="hidden",o.name=c,o.value=r,n.appendChild(o)},a=new URLSearchParams({file:`/${i}`,eslint:"0",codemirror:"1",installDependencies:"true"});return d("query",a.toString()),d("parameters",s),document.body.appendChild(n),n.submit(),document.body.removeChild(n),{parameters:s,url:`https://codesandbox.io/api/v1/sandboxes/define?parameters=${s}`,options:e}}function w(e){let t=p(e),s=(0,l.getParameters)({files:t}),i=e.embed||{},n=new URLSearchParams({parameters:s,embed:"1"});return i.view&&n.set("view",i.view),i.theme&&n.set("theme",i.theme),i.hideNavigation&&n.set("hidenavigation","1"),e.entry&&n.set("file",`/${e.entry}`),{parameters:s,url:`https://codesandbox.io/api/v1/sandboxes/define?${n.toString()}`,options:e}}
@@ -1 +0,0 @@
1
- import{a as o,b as r,c as e}from"../chunk-T3W44KWY.mjs";import"../chunk-JZXLCA2E.mjs";export{o as defineSandbox,e as embedSandbox,r as openSandbox};
@@ -1,68 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as class_variance_authority_types from 'class-variance-authority/types';
3
- import * as RAC from 'react-aria-components';
4
- import { LinkProps as LinkProps$1 } from 'react-aria-components';
5
- import { VariantProps } from 'class-variance-authority';
6
- import React__default from 'react';
7
-
8
- declare const buttonVariants: (props?: ({
9
- variant?: "link" | "primary" | "secondary" | "outline" | "ghost" | "danger" | "success" | "warning" | "info" | "subtle" | null | undefined;
10
- size?: "sm" | "md" | "lg" | null | undefined;
11
- rounded?: "none" | "sm" | "md" | "lg" | "full" | null | undefined;
12
- iconSize?: "sm" | "md" | "lg" | null | undefined;
13
- disabled?: boolean | null | undefined;
14
- } & class_variance_authority_types.ClassProp) | undefined) => string;
15
- type ButtonVariantType = VariantProps<typeof buttonVariants>;
16
- interface ButtonProps extends Omit<RAC.ButtonProps, 'children' | 'className'>, ButtonVariantType {
17
- icon?: React.ReactNode;
18
- iconPosition?: 'left' | 'right';
19
- href?: string;
20
- children?: React.ReactNode;
21
- className?: string;
22
- isIconOnly?: boolean;
23
- }
24
- declare const Button: ({ href, icon, iconPosition, isIconOnly, children, className, variant, size, rounded, iconSize, disabled, ...props }: ButtonProps) => react_jsx_runtime.JSX.Element;
25
-
26
- interface LinkProps extends LinkProps$1 {
27
- /** Should prefetch the page on hover? Default 'hover' */
28
- prefetch?: 'hover' | 'none';
29
- }
30
- /**
31
- * A primitive Link component that wraps React Aria Components' Link
32
- * and adds framework-specific logic for path localization and preloading.
33
- *
34
- * It uses the global navigation configuration from BoltdocsRouterProvider
35
- * to handle seamless client-side transitions.
36
- */
37
- declare const Link: React__default.ForwardRefExoticComponent<LinkProps & React__default.RefAttributes<HTMLAnchorElement>>;
38
- /**
39
- * Props for the NavLink component, extending standard Link props.
40
- */
41
- interface NavLinkProps extends Omit<LinkProps, 'className' | 'children'> {
42
- /**
43
- * When true, the active state will only be applied if the paths match exactly.
44
- * Default is false.
45
- */
46
- end?: boolean;
47
- /**
48
- * Provides access to the active state for conditional children rendering.
49
- */
50
- children?: React__default.ReactNode | ((props: {
51
- isActive: boolean;
52
- }) => React__default.ReactNode);
53
- /**
54
- * Provides access to the active state for conditional styling.
55
- */
56
- className?: string | ((props: {
57
- isActive: boolean;
58
- }) => string);
59
- }
60
- /**
61
- * A primitive NavLink component that provides active state detection.
62
- *
63
- * It combines the Link primitive with path matching logic to determine
64
- * if the link is currently active based on the browser's location.
65
- */
66
- declare const NavLink: React__default.ForwardRefExoticComponent<NavLinkProps & React__default.RefAttributes<HTMLAnchorElement>>;
67
-
68
- export { type ButtonProps as B, Link as L, NavLink as N, Button as a, type LinkProps as b, type NavLinkProps as c, buttonVariants as d };
@@ -1,68 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as class_variance_authority_types from 'class-variance-authority/types';
3
- import * as RAC from 'react-aria-components';
4
- import { LinkProps as LinkProps$1 } from 'react-aria-components';
5
- import { VariantProps } from 'class-variance-authority';
6
- import React__default from 'react';
7
-
8
- declare const buttonVariants: (props?: ({
9
- variant?: "link" | "primary" | "secondary" | "outline" | "ghost" | "danger" | "success" | "warning" | "info" | "subtle" | null | undefined;
10
- size?: "sm" | "md" | "lg" | null | undefined;
11
- rounded?: "none" | "sm" | "md" | "lg" | "full" | null | undefined;
12
- iconSize?: "sm" | "md" | "lg" | null | undefined;
13
- disabled?: boolean | null | undefined;
14
- } & class_variance_authority_types.ClassProp) | undefined) => string;
15
- type ButtonVariantType = VariantProps<typeof buttonVariants>;
16
- interface ButtonProps extends Omit<RAC.ButtonProps, 'children' | 'className'>, ButtonVariantType {
17
- icon?: React.ReactNode;
18
- iconPosition?: 'left' | 'right';
19
- href?: string;
20
- children?: React.ReactNode;
21
- className?: string;
22
- isIconOnly?: boolean;
23
- }
24
- declare const Button: ({ href, icon, iconPosition, isIconOnly, children, className, variant, size, rounded, iconSize, disabled, ...props }: ButtonProps) => react_jsx_runtime.JSX.Element;
25
-
26
- interface LinkProps extends LinkProps$1 {
27
- /** Should prefetch the page on hover? Default 'hover' */
28
- prefetch?: 'hover' | 'none';
29
- }
30
- /**
31
- * A primitive Link component that wraps React Aria Components' Link
32
- * and adds framework-specific logic for path localization and preloading.
33
- *
34
- * It uses the global navigation configuration from BoltdocsRouterProvider
35
- * to handle seamless client-side transitions.
36
- */
37
- declare const Link: React__default.ForwardRefExoticComponent<LinkProps & React__default.RefAttributes<HTMLAnchorElement>>;
38
- /**
39
- * Props for the NavLink component, extending standard Link props.
40
- */
41
- interface NavLinkProps extends Omit<LinkProps, 'className' | 'children'> {
42
- /**
43
- * When true, the active state will only be applied if the paths match exactly.
44
- * Default is false.
45
- */
46
- end?: boolean;
47
- /**
48
- * Provides access to the active state for conditional children rendering.
49
- */
50
- children?: React__default.ReactNode | ((props: {
51
- isActive: boolean;
52
- }) => React__default.ReactNode);
53
- /**
54
- * Provides access to the active state for conditional styling.
55
- */
56
- className?: string | ((props: {
57
- isActive: boolean;
58
- }) => string);
59
- }
60
- /**
61
- * A primitive NavLink component that provides active state detection.
62
- *
63
- * It combines the Link primitive with path matching logic to determine
64
- * if the link is currently active based on the browser's location.
65
- */
66
- declare const NavLink: React__default.ForwardRefExoticComponent<NavLinkProps & React__default.RefAttributes<HTMLAnchorElement>>;
67
-
68
- export { type ButtonProps as B, Link as L, NavLink as N, Button as a, type LinkProps as b, type NavLinkProps as c, buttonVariants as d };
@@ -1,57 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { C as ComponentRoute, B as BoltdocsConfig, O as OnThisPageProps } from './types-opDA2E9-.mjs';
3
- import * as React from 'react';
4
- import { Component, ReactNode, ErrorInfo } from 'react';
5
-
6
- declare function Navbar(): react_jsx_runtime.JSX.Element;
7
-
8
- declare function Sidebar({ routes, config, }: {
9
- routes: ComponentRoute[];
10
- config: BoltdocsConfig;
11
- }): react_jsx_runtime.JSX.Element;
12
-
13
- declare function OnThisPage({ headings: rawHeadings, editLink, communityHelp, filePath, }: OnThisPageProps): react_jsx_runtime.JSX.Element | null;
14
-
15
- interface HeadProps {
16
- siteTitle: string;
17
- siteDescription?: string;
18
- routes: Array<{
19
- path: string;
20
- title: string;
21
- description?: string;
22
- }>;
23
- }
24
- declare function Head({ siteTitle, siteDescription, routes }: HeadProps): null;
25
-
26
- declare function Breadcrumbs(): react_jsx_runtime.JSX.Element | null;
27
-
28
- /**
29
- * Component to display the previous and next page navigation buttons.
30
- * Enhanced with subtle entrance animations and a modern card layout.
31
- */
32
- declare function PageNav(): react_jsx_runtime.JSX.Element | null;
33
-
34
- interface Props {
35
- children?: ReactNode;
36
- fallback?: ReactNode;
37
- }
38
- interface State {
39
- hasError: boolean;
40
- error?: Error;
41
- }
42
- declare class ErrorBoundary extends Component<Props, State> {
43
- state: State;
44
- static getDerivedStateFromError(error: Error): State;
45
- componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
46
- render(): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element | null | undefined;
47
- }
48
-
49
- declare function NotFound(): react_jsx_runtime.JSX.Element;
50
-
51
- /**
52
- * A premium loading component that only skeletons the markdown content area.
53
- * Designed to be used as a Suspense fallback within a persistent layout.
54
- */
55
- declare function Loading(): react_jsx_runtime.JSX.Element;
56
-
57
- export { Breadcrumbs as B, ErrorBoundary as E, Head as H, Loading as L, Navbar as N, OnThisPage as O, PageNav as P, Sidebar as S, NotFound as a };
@@ -1,57 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { C as ComponentRoute, B as BoltdocsConfig, O as OnThisPageProps } from './types-opDA2E9-.js';
3
- import * as React from 'react';
4
- import { Component, ReactNode, ErrorInfo } from 'react';
5
-
6
- declare function Navbar(): react_jsx_runtime.JSX.Element;
7
-
8
- declare function Sidebar({ routes, config, }: {
9
- routes: ComponentRoute[];
10
- config: BoltdocsConfig;
11
- }): react_jsx_runtime.JSX.Element;
12
-
13
- declare function OnThisPage({ headings: rawHeadings, editLink, communityHelp, filePath, }: OnThisPageProps): react_jsx_runtime.JSX.Element | null;
14
-
15
- interface HeadProps {
16
- siteTitle: string;
17
- siteDescription?: string;
18
- routes: Array<{
19
- path: string;
20
- title: string;
21
- description?: string;
22
- }>;
23
- }
24
- declare function Head({ siteTitle, siteDescription, routes }: HeadProps): null;
25
-
26
- declare function Breadcrumbs(): react_jsx_runtime.JSX.Element | null;
27
-
28
- /**
29
- * Component to display the previous and next page navigation buttons.
30
- * Enhanced with subtle entrance animations and a modern card layout.
31
- */
32
- declare function PageNav(): react_jsx_runtime.JSX.Element | null;
33
-
34
- interface Props {
35
- children?: ReactNode;
36
- fallback?: ReactNode;
37
- }
38
- interface State {
39
- hasError: boolean;
40
- error?: Error;
41
- }
42
- declare class ErrorBoundary extends Component<Props, State> {
43
- state: State;
44
- static getDerivedStateFromError(error: Error): State;
45
- componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
46
- render(): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element | null | undefined;
47
- }
48
-
49
- declare function NotFound(): react_jsx_runtime.JSX.Element;
50
-
51
- /**
52
- * A premium loading component that only skeletons the markdown content area.
53
- * Designed to be used as a Suspense fallback within a persistent layout.
54
- */
55
- declare function Loading(): react_jsx_runtime.JSX.Element;
56
-
57
- export { Breadcrumbs as B, ErrorBoundary as E, Head as H, Loading as L, Navbar as N, OnThisPage as O, PageNav as P, Sidebar as S, NotFound as a };
@@ -1,178 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { B as ButtonProps, b as LinkProps$1 } from '../link-DfBwCeZc.mjs';
3
- import * as class_variance_authority_types from 'class-variance-authority/types';
4
- import { VariantProps } from 'class-variance-authority';
5
- import { ComponentPropsWithoutRef, ReactNode, ImgHTMLAttributes } from 'react';
6
- import { f as SandboxOptions } from '../types-opDA2E9-.mjs';
7
- export { C as CopyMarkdown, a as CopyMarkdownProps } from '../copy-markdown--9yjpbyy.mjs';
8
- import 'react-aria-components';
9
- import 'vite';
10
-
11
- interface CodeBlockProps {
12
- children?: React.ReactNode;
13
- className?: string;
14
- sandbox?: boolean | any;
15
- hideCopy?: boolean;
16
- hideSandbox?: boolean;
17
- title?: string;
18
- lang?: string;
19
- highlightedHtml?: string;
20
- 'data-lang'?: string;
21
- plain?: boolean;
22
- [key: string]: any;
23
- }
24
- declare function CodeBlock(props: CodeBlockProps): react_jsx_runtime.JSX.Element;
25
-
26
- interface VideoProps {
27
- src?: string;
28
- poster?: string;
29
- alt?: string;
30
- controls?: boolean;
31
- preload?: string;
32
- children?: React.ReactNode;
33
- [key: string]: any;
34
- }
35
- declare function Video({ src, poster, alt, children, controls, preload, ...rest }: VideoProps): react_jsx_runtime.JSX.Element;
36
-
37
- declare const Button: ({ className, variant, size, rounded, iconSize, disabled, ...props }: ButtonProps) => react_jsx_runtime.JSX.Element;
38
-
39
- interface TabProps {
40
- label: string;
41
- icon?: React.ReactNode;
42
- disabled?: boolean;
43
- children: React.ReactNode;
44
- }
45
- declare function Tab({ children }: TabProps): react_jsx_runtime.JSX.Element;
46
- interface TabsProps {
47
- defaultIndex?: number;
48
- children: React.ReactNode;
49
- }
50
- declare function Tabs({ defaultIndex, children }: TabsProps): react_jsx_runtime.JSX.Element;
51
-
52
- declare const badgeVariants: (props?: ({
53
- variant?: "default" | "primary" | "danger" | "success" | "warning" | "info" | null | undefined;
54
- } & class_variance_authority_types.ClassProp) | undefined) => string;
55
- interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof badgeVariants> {
56
- children: React.ReactNode;
57
- }
58
- declare function Badge({ variant, children, className, ...rest }: BadgeProps): react_jsx_runtime.JSX.Element;
59
-
60
- declare const cardsVariants: (props?: ({
61
- cols?: 1 | 2 | 3 | 4 | null | undefined;
62
- } & class_variance_authority_types.ClassProp) | undefined) => string;
63
- type CardsVariants = VariantProps<typeof cardsVariants>;
64
- interface CardsProps extends React.HTMLAttributes<HTMLDivElement>, CardsVariants {
65
- }
66
- declare function Cards({ cols, children, className, ...rest }: CardsProps): react_jsx_runtime.JSX.Element;
67
- interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
68
- title?: string;
69
- icon?: React.ReactNode;
70
- href?: string;
71
- children?: React.ReactNode;
72
- }
73
- declare function Card({ title, icon, href, children, className, ...rest }: CardProps): react_jsx_runtime.JSX.Element;
74
-
75
- declare const admonitionVariants: (props?: ({
76
- type?: "danger" | "warning" | "info" | "note" | "tip" | "important" | "caution" | null | undefined;
77
- } & class_variance_authority_types.ClassProp) | undefined) => string;
78
- type AdmonitionVariants = VariantProps<typeof admonitionVariants>;
79
- interface AdmonitionProps extends React.HTMLAttributes<HTMLDivElement>, AdmonitionVariants {
80
- title?: string;
81
- children: React.ReactNode;
82
- }
83
- declare function Admonition({ type, title, children, className, ...rest }: AdmonitionProps): react_jsx_runtime.JSX.Element;
84
- declare const Note: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
85
- declare const Tip: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
86
- declare const Warning: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
87
- declare const Danger: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
88
- declare const InfoBox: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
89
- declare const Important: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
90
- declare const Caution: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
91
-
92
- declare const listVariants: (props?: ({
93
- variant?: "number" | "default" | "checked" | "arrow" | "bubble" | null | undefined;
94
- cols?: 1 | 2 | 3 | 4 | null | undefined;
95
- isGrid?: boolean | null | undefined;
96
- dense?: boolean | null | undefined;
97
- } & class_variance_authority_types.ClassProp) | undefined) => string;
98
- type ListVariantProps = VariantProps<typeof listVariants>;
99
- interface ListProps extends ComponentPropsWithoutRef<'ul'>, Omit<ListVariantProps, 'variant'> {
100
- variant?: 'checked' | 'arrow' | 'default' | 'bubble' | 'number';
101
- children: ReactNode;
102
- }
103
- declare function List({ variant, cols, dense, children, className, ...props }: ListProps): react_jsx_runtime.JSX.Element;
104
-
105
- interface FileTreeProps {
106
- children: React.ReactNode;
107
- }
108
- declare function FileTree({ children }: FileTreeProps): react_jsx_runtime.JSX.Element;
109
-
110
- interface TableProps {
111
- headers?: string[];
112
- data?: (string | React.ReactNode)[][];
113
- children?: React.ReactNode;
114
- className?: string;
115
- sortable?: boolean;
116
- paginated?: boolean;
117
- pageSize?: number;
118
- }
119
- declare function Table({ headers, data, children, className, sortable, paginated, pageSize, }: TableProps): react_jsx_runtime.JSX.Element;
120
-
121
- interface FieldProps {
122
- name: string;
123
- type?: string;
124
- defaultValue?: string;
125
- required?: boolean;
126
- children: React.ReactNode;
127
- id?: string;
128
- className?: string;
129
- }
130
- declare function Field({ name, type, defaultValue, required, children, id, className, }: FieldProps): react_jsx_runtime.JSX.Element;
131
-
132
- type LinkProps = LinkProps$1 & {
133
- to: string;
134
- children?: React.ReactNode;
135
- };
136
- /**
137
- * A premium Link component for Boltdocs that handles internal and external routing.
138
- */
139
- declare function Link({ to, children, className, ...props }: LinkProps): react_jsx_runtime.JSX.Element;
140
-
141
- interface ImageProps extends ImgHTMLAttributes<HTMLImageElement> {
142
- src: string;
143
- darkSrc?: string;
144
- theme?: 'light' | 'dark';
145
- }
146
- /**
147
- * A themed Image component for Boltdocs.
148
- * It supports rendering based on the current active theme.
149
- */
150
- declare function Image({ src, alt, theme: imageTheme, ...props }: ImageProps): react_jsx_runtime.JSX.Element | null;
151
-
152
- interface PropItem {
153
- name: string;
154
- type: string;
155
- defaultValue?: string;
156
- required?: boolean;
157
- description: React.ReactNode;
158
- }
159
- interface ComponentPropsProps {
160
- title?: string;
161
- props: PropItem[];
162
- className?: string;
163
- }
164
- declare function ComponentProps({ title, props, className, }: ComponentPropsProps): react_jsx_runtime.JSX.Element;
165
-
166
- interface ComponentPreviewProps {
167
- code?: string;
168
- highlightedHtml?: string;
169
- children?: string;
170
- preview?: React.ReactNode;
171
- hideCode?: boolean;
172
- hideSandbox?: boolean;
173
- hideCopy?: boolean;
174
- sandboxOptions?: SandboxOptions;
175
- }
176
- declare function ComponentPreview(props: ComponentPreviewProps): react_jsx_runtime.JSX.Element;
177
-
178
- export { Admonition, type AdmonitionProps, Badge, type BadgeProps, Button, ButtonProps, Card, type CardProps, Cards, type CardsProps, Caution, CodeBlock, ComponentPreview, type ComponentPreviewProps, ComponentProps, type ComponentPropsProps, Danger, Field, type FieldProps, FileTree, type FileTreeProps, Image, type ImageProps, Important, InfoBox, Link, type LinkProps, List, type ListProps, Note, Tab, type TabProps, Table, type TableProps, Tabs, type TabsProps, Tip, Video, Warning };