boltdocs 2.1.1 → 2.3.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 +19 -0
- package/bin/boltdocs.js +2 -2
- package/dist/base-ui/index.d.mts +25 -0
- package/dist/base-ui/index.d.ts +25 -0
- package/dist/base-ui/index.js +1 -0
- package/dist/base-ui/index.mjs +1 -0
- package/dist/{cache-Q4T6VAUL.mjs → cache-P6WK424C.mjs} +1 -1
- package/dist/chunk-22NXDNP4.mjs +74 -0
- package/dist/chunk-2HUVMMJU.mjs +1 -0
- package/dist/chunk-2Z5T6EAU.mjs +1 -0
- package/dist/chunk-CRZGOE32.mjs +1 -0
- package/dist/chunk-HA6543SL.mjs +1 -0
- package/dist/chunk-JD3RSDE4.mjs +1 -0
- package/dist/chunk-JZXLCA2E.mjs +1 -0
- package/dist/chunk-NBCYHLAA.mjs +1 -0
- package/dist/chunk-RPUERTVC.mjs +1 -0
- package/dist/chunk-T3W44KWY.mjs +1 -0
- package/dist/chunk-URTD6E6S.mjs +1 -0
- package/dist/chunk-W2NB4T6V.mjs +1 -0
- package/dist/chunk-Y4RRHPXC.mjs +1 -0
- package/dist/client/index.d.mts +13 -115
- package/dist/client/index.d.ts +13 -115
- package/dist/client/index.js +1 -1
- package/dist/client/index.mjs +1 -1
- package/dist/client/ssr.js +1 -1
- package/dist/client/ssr.mjs +1 -1
- package/dist/client/types.d.mts +3 -0
- package/dist/client/types.d.ts +3 -0
- package/dist/client/types.js +1 -0
- package/dist/client/types.mjs +0 -0
- package/dist/copy-markdown-C-90ixSe.d.ts +15 -0
- package/dist/copy-markdown-CbS8X-qe.d.mts +15 -0
- package/dist/{client/hooks → hooks}/index.d.mts +16 -11
- package/dist/{client/hooks → hooks}/index.d.ts +16 -11
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/index.mjs +1 -0
- package/dist/integrations/index.d.mts +48 -0
- package/dist/integrations/index.d.ts +48 -0
- package/dist/integrations/index.js +1 -0
- package/dist/integrations/index.mjs +1 -0
- package/dist/link-DfBwCeZc.d.mts +68 -0
- package/dist/link-DfBwCeZc.d.ts +68 -0
- package/dist/loading-B7X5Wchs.d.ts +66 -0
- package/dist/loading-WuaQbsKb.d.mts +66 -0
- package/dist/{client/components/mdx → mdx}/index.d.mts +6 -38
- package/dist/{client/components/mdx → mdx}/index.d.ts +6 -38
- package/dist/mdx/index.js +1 -0
- package/dist/mdx/index.mjs +1 -0
- package/dist/node/cli-entry.js +31 -27
- package/dist/node/cli-entry.mjs +5 -1
- package/dist/node/index.d.mts +44 -14
- package/dist/node/index.d.ts +44 -14
- package/dist/node/index.js +24 -24
- package/dist/node/index.mjs +1 -1
- package/dist/primitives/index.d.mts +301 -0
- package/dist/primitives/index.d.ts +301 -0
- package/dist/primitives/index.js +1 -0
- package/dist/primitives/index.mjs +1 -0
- package/dist/search-dialog-ZRXBAQJ5.mjs +1 -0
- package/dist/{types-Cp21DHI6.d.mts → types-j7jvWsJj.d.mts} +63 -17
- package/dist/{types-Cp21DHI6.d.ts → types-j7jvWsJj.d.ts} +63 -17
- package/dist/{use-routes-xLhumjbV.d.ts → use-routes-Cd806kGw.d.ts} +1 -1
- package/dist/{use-routes-8Iei6jTp.d.mts → use-routes-DDL0_jkQ.d.mts} +1 -1
- package/package.json +35 -8
- package/src/client/app/index.tsx +155 -35
- package/src/client/app/mdx-component.tsx +7 -3
- package/src/client/app/theme-context.tsx +47 -23
- package/src/client/components/default-layout.tsx +16 -6
- package/src/client/components/primitives/breadcrumbs.tsx +1 -1
- package/src/client/components/primitives/navbar.tsx +8 -5
- package/src/client/components/primitives/search-dialog.tsx +15 -6
- package/src/client/components/primitives/sidebar.tsx +3 -2
- package/src/client/components/primitives/skeleton.tsx +26 -0
- package/src/client/components/ui-base/breadcrumbs.tsx +1 -1
- package/src/client/components/ui-base/index.ts +17 -0
- package/src/client/components/ui-base/loading.tsx +43 -73
- package/src/client/components/ui-base/navbar.tsx +74 -39
- package/src/client/components/ui-base/page-nav.tsx +2 -1
- package/src/client/components/ui-base/powered-by.tsx +11 -5
- package/src/client/components/ui-base/search-dialog.tsx +16 -5
- package/src/client/components/ui-base/sidebar.tsx +33 -22
- package/src/client/components/ui-base/tabs.tsx +4 -1
- package/src/client/components/ui-base/theme-toggle.tsx +35 -15
- package/src/client/hooks/use-i18n.ts +38 -7
- package/src/client/hooks/use-localized-to.ts +51 -73
- package/src/client/hooks/use-navbar.ts +10 -3
- package/src/client/hooks/use-page-nav.ts +27 -6
- package/src/client/hooks/use-routes.ts +62 -17
- package/src/client/hooks/use-search.ts +84 -46
- package/src/client/hooks/use-sidebar.ts +6 -2
- package/src/client/hooks/use-version.ts +5 -0
- package/src/client/integrations/index.ts +1 -0
- package/src/client/store/use-boltdocs-store.ts +44 -0
- package/src/client/theme/neutral.css +29 -0
- package/src/client/types.ts +4 -2
- package/src/client/utils/i18n.ts +23 -0
- package/src/node/{cli.ts → cli/build.ts} +17 -23
- package/src/node/cli/dev.ts +22 -0
- package/src/node/cli/doctor.ts +243 -0
- package/src/node/cli/index.ts +9 -0
- package/src/node/cli/ui.ts +54 -0
- package/src/node/cli-entry.ts +16 -16
- package/src/node/config.ts +54 -17
- package/src/node/index.ts +1 -1
- package/src/node/mdx/cache.ts +12 -0
- package/src/node/mdx/highlighter.ts +47 -0
- package/src/node/mdx/index.ts +114 -0
- package/src/node/mdx/rehype-shiki.ts +53 -0
- package/src/node/mdx/remark-shiki.ts +61 -0
- package/src/node/plugin/entry.ts +1 -1
- package/src/node/plugin/html.ts +8 -4
- package/src/node/plugin/index.ts +135 -72
- package/src/node/routes/index.ts +34 -13
- package/src/node/routes/parser.ts +13 -5
- package/src/node/search/index.ts +55 -0
- package/src/node/ssg/index.ts +15 -7
- package/src/node/ssg/robots.ts +7 -4
- package/src/node/utils.ts +32 -2
- package/tsup.config.ts +7 -2
- package/dist/chunk-52MVMZWS.mjs +0 -1
- package/dist/chunk-BVWWKXJH.mjs +0 -1
- package/dist/chunk-DVY3RDXD.mjs +0 -1
- package/dist/chunk-FUVYCYWC.mjs +0 -1
- package/dist/chunk-GBLMDJ2B.mjs +0 -1
- package/dist/chunk-ISPX45DF.mjs +0 -1
- package/dist/chunk-PNXZMUCO.mjs +0 -1
- package/dist/chunk-V2ZHKQSP.mjs +0 -74
- package/dist/client/components/mdx/index.js +0 -1
- package/dist/client/components/mdx/index.mjs +0 -1
- package/dist/client/hooks/index.js +0 -1
- package/dist/client/hooks/index.mjs +0 -1
- package/dist/search-dialog-TWGYKF2D.mjs +0 -1
- package/src/node/mdx.ts +0 -279
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { f as SandboxOptions } from '../types-j7jvWsJj.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 };
|
|
@@ -0,0 +1 @@
|
|
|
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}}
|
|
@@ -0,0 +1 @@
|
|
|
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};
|
|
@@ -0,0 +1,68 @@
|
|
|
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 };
|
|
@@ -0,0 +1,68 @@
|
|
|
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 };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { C as ComponentRoute, B as BoltdocsConfig, O as OnThisPageProps } from './types-j7jvWsJj.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
|
+
/**
|
|
35
|
+
* A reading progress bar component that tracks the scroll position
|
|
36
|
+
* within the Boltdocs content area.
|
|
37
|
+
*
|
|
38
|
+
* It utilizes react-aria-components for accessibility and is fixed
|
|
39
|
+
* to the top of the viewport for a premium, non-intrusive UI experience.
|
|
40
|
+
*/
|
|
41
|
+
declare function ProgressBar(): react_jsx_runtime.JSX.Element;
|
|
42
|
+
|
|
43
|
+
interface Props {
|
|
44
|
+
children?: ReactNode;
|
|
45
|
+
fallback?: ReactNode;
|
|
46
|
+
}
|
|
47
|
+
interface State {
|
|
48
|
+
hasError: boolean;
|
|
49
|
+
error?: Error;
|
|
50
|
+
}
|
|
51
|
+
declare class ErrorBoundary extends Component<Props, State> {
|
|
52
|
+
state: State;
|
|
53
|
+
static getDerivedStateFromError(error: Error): State;
|
|
54
|
+
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
55
|
+
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;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
declare function NotFound(): react_jsx_runtime.JSX.Element;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* A premium loading component that only skeletons the markdown content area.
|
|
62
|
+
* Designed to be used as a Suspense fallback within a persistent layout.
|
|
63
|
+
*/
|
|
64
|
+
declare function Loading(): react_jsx_runtime.JSX.Element;
|
|
65
|
+
|
|
66
|
+
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, ProgressBar as b };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { C as ComponentRoute, B as BoltdocsConfig, O as OnThisPageProps } from './types-j7jvWsJj.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
|
+
/**
|
|
35
|
+
* A reading progress bar component that tracks the scroll position
|
|
36
|
+
* within the Boltdocs content area.
|
|
37
|
+
*
|
|
38
|
+
* It utilizes react-aria-components for accessibility and is fixed
|
|
39
|
+
* to the top of the viewport for a premium, non-intrusive UI experience.
|
|
40
|
+
*/
|
|
41
|
+
declare function ProgressBar(): react_jsx_runtime.JSX.Element;
|
|
42
|
+
|
|
43
|
+
interface Props {
|
|
44
|
+
children?: ReactNode;
|
|
45
|
+
fallback?: ReactNode;
|
|
46
|
+
}
|
|
47
|
+
interface State {
|
|
48
|
+
hasError: boolean;
|
|
49
|
+
error?: Error;
|
|
50
|
+
}
|
|
51
|
+
declare class ErrorBoundary extends Component<Props, State> {
|
|
52
|
+
state: State;
|
|
53
|
+
static getDerivedStateFromError(error: Error): State;
|
|
54
|
+
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
55
|
+
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;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
declare function NotFound(): react_jsx_runtime.JSX.Element;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* A premium loading component that only skeletons the markdown content area.
|
|
62
|
+
* Designed to be used as a Suspense fallback within a persistent layout.
|
|
63
|
+
*/
|
|
64
|
+
declare function Loading(): react_jsx_runtime.JSX.Element;
|
|
65
|
+
|
|
66
|
+
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, ProgressBar as b };
|
|
@@ -1,23 +1,13 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { B as ButtonProps, b as LinkProps$1 } from '../link-DfBwCeZc.mjs';
|
|
2
3
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
|
-
import * as RAC from 'react-aria-components';
|
|
4
|
-
import { LinkProps as LinkProps$2 } from 'react-aria-components';
|
|
5
4
|
import { VariantProps } from 'class-variance-authority';
|
|
6
5
|
import { ComponentPropsWithoutRef, ReactNode, ImgHTMLAttributes } from 'react';
|
|
7
|
-
import {
|
|
6
|
+
import { f as SandboxOptions } from '../types-j7jvWsJj.mjs';
|
|
7
|
+
export { C as CopyMarkdown, a as CopyMarkdownProps } from '../copy-markdown-CbS8X-qe.mjs';
|
|
8
|
+
import 'react-aria-components';
|
|
8
9
|
import 'vite';
|
|
9
10
|
|
|
10
|
-
interface CopyMarkdownProps {
|
|
11
|
-
content?: string;
|
|
12
|
-
mdxRaw?: string;
|
|
13
|
-
route?: ComponentRoute;
|
|
14
|
-
config?: boolean | {
|
|
15
|
-
text?: string;
|
|
16
|
-
icon?: string;
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
declare function CopyMarkdown({ content, mdxRaw, config }: CopyMarkdownProps): react_jsx_runtime.JSX.Element | null;
|
|
20
|
-
|
|
21
11
|
interface CodeBlockProps {
|
|
22
12
|
children?: React.ReactNode;
|
|
23
13
|
className?: string;
|
|
@@ -42,23 +32,6 @@ interface VideoProps {
|
|
|
42
32
|
}
|
|
43
33
|
declare function Video({ src, poster, alt, children, controls, preload, ...rest }: VideoProps): react_jsx_runtime.JSX.Element;
|
|
44
34
|
|
|
45
|
-
declare const buttonVariants: (props?: ({
|
|
46
|
-
variant?: "link" | "primary" | "secondary" | "outline" | "ghost" | "danger" | "success" | "warning" | "info" | "subtle" | null | undefined;
|
|
47
|
-
size?: "sm" | "md" | "lg" | null | undefined;
|
|
48
|
-
rounded?: "none" | "sm" | "md" | "lg" | "full" | null | undefined;
|
|
49
|
-
iconSize?: "sm" | "md" | "lg" | null | undefined;
|
|
50
|
-
disabled?: boolean | null | undefined;
|
|
51
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
52
|
-
type ButtonVariantType = VariantProps<typeof buttonVariants>;
|
|
53
|
-
interface ButtonProps extends Omit<RAC.ButtonProps, 'children' | 'className'>, ButtonVariantType {
|
|
54
|
-
icon?: React.ReactNode;
|
|
55
|
-
iconPosition?: 'left' | 'right';
|
|
56
|
-
href?: string;
|
|
57
|
-
children?: React.ReactNode;
|
|
58
|
-
className?: string;
|
|
59
|
-
isIconOnly?: boolean;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
35
|
declare const Button: ({ className, variant, size, rounded, iconSize, disabled, ...props }: ButtonProps) => react_jsx_runtime.JSX.Element;
|
|
63
36
|
|
|
64
37
|
interface TabProps {
|
|
@@ -98,7 +71,7 @@ interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
98
71
|
declare function Card({ title, icon, href, children, className, ...rest }: CardProps): react_jsx_runtime.JSX.Element;
|
|
99
72
|
|
|
100
73
|
declare const admonitionVariants: (props?: ({
|
|
101
|
-
type?: "
|
|
74
|
+
type?: "danger" | "warning" | "info" | "note" | "tip" | "important" | "caution" | null | undefined;
|
|
102
75
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
103
76
|
type AdmonitionVariants = VariantProps<typeof admonitionVariants>;
|
|
104
77
|
interface AdmonitionProps extends React.HTMLAttributes<HTMLDivElement>, AdmonitionVariants {
|
|
@@ -154,11 +127,6 @@ interface FieldProps {
|
|
|
154
127
|
}
|
|
155
128
|
declare function Field({ name, type, defaultValue, required, children, id, className, }: FieldProps): react_jsx_runtime.JSX.Element;
|
|
156
129
|
|
|
157
|
-
interface LinkProps$1 extends LinkProps$2 {
|
|
158
|
-
/** Should prefetch the page on hover? Default 'hover' */
|
|
159
|
-
prefetch?: 'hover' | 'none';
|
|
160
|
-
}
|
|
161
|
-
|
|
162
130
|
type LinkProps = LinkProps$1 & {
|
|
163
131
|
to: string;
|
|
164
132
|
children?: React.ReactNode;
|
|
@@ -205,4 +173,4 @@ interface ComponentPreviewProps {
|
|
|
205
173
|
}
|
|
206
174
|
declare function ComponentPreview(props: ComponentPreviewProps): react_jsx_runtime.JSX.Element;
|
|
207
175
|
|
|
208
|
-
export { Admonition, type AdmonitionProps, Badge, type BadgeProps, Button,
|
|
176
|
+
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 };
|
|
@@ -1,23 +1,13 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { B as ButtonProps, b as LinkProps$1 } from '../link-DfBwCeZc.js';
|
|
2
3
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
3
|
-
import * as RAC from 'react-aria-components';
|
|
4
|
-
import { LinkProps as LinkProps$2 } from 'react-aria-components';
|
|
5
4
|
import { VariantProps } from 'class-variance-authority';
|
|
6
5
|
import { ComponentPropsWithoutRef, ReactNode, ImgHTMLAttributes } from 'react';
|
|
7
|
-
import {
|
|
6
|
+
import { f as SandboxOptions } from '../types-j7jvWsJj.js';
|
|
7
|
+
export { C as CopyMarkdown, a as CopyMarkdownProps } from '../copy-markdown-C-90ixSe.js';
|
|
8
|
+
import 'react-aria-components';
|
|
8
9
|
import 'vite';
|
|
9
10
|
|
|
10
|
-
interface CopyMarkdownProps {
|
|
11
|
-
content?: string;
|
|
12
|
-
mdxRaw?: string;
|
|
13
|
-
route?: ComponentRoute;
|
|
14
|
-
config?: boolean | {
|
|
15
|
-
text?: string;
|
|
16
|
-
icon?: string;
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
declare function CopyMarkdown({ content, mdxRaw, config }: CopyMarkdownProps): react_jsx_runtime.JSX.Element | null;
|
|
20
|
-
|
|
21
11
|
interface CodeBlockProps {
|
|
22
12
|
children?: React.ReactNode;
|
|
23
13
|
className?: string;
|
|
@@ -42,23 +32,6 @@ interface VideoProps {
|
|
|
42
32
|
}
|
|
43
33
|
declare function Video({ src, poster, alt, children, controls, preload, ...rest }: VideoProps): react_jsx_runtime.JSX.Element;
|
|
44
34
|
|
|
45
|
-
declare const buttonVariants: (props?: ({
|
|
46
|
-
variant?: "link" | "primary" | "secondary" | "outline" | "ghost" | "danger" | "success" | "warning" | "info" | "subtle" | null | undefined;
|
|
47
|
-
size?: "sm" | "md" | "lg" | null | undefined;
|
|
48
|
-
rounded?: "none" | "sm" | "md" | "lg" | "full" | null | undefined;
|
|
49
|
-
iconSize?: "sm" | "md" | "lg" | null | undefined;
|
|
50
|
-
disabled?: boolean | null | undefined;
|
|
51
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
52
|
-
type ButtonVariantType = VariantProps<typeof buttonVariants>;
|
|
53
|
-
interface ButtonProps extends Omit<RAC.ButtonProps, 'children' | 'className'>, ButtonVariantType {
|
|
54
|
-
icon?: React.ReactNode;
|
|
55
|
-
iconPosition?: 'left' | 'right';
|
|
56
|
-
href?: string;
|
|
57
|
-
children?: React.ReactNode;
|
|
58
|
-
className?: string;
|
|
59
|
-
isIconOnly?: boolean;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
35
|
declare const Button: ({ className, variant, size, rounded, iconSize, disabled, ...props }: ButtonProps) => react_jsx_runtime.JSX.Element;
|
|
63
36
|
|
|
64
37
|
interface TabProps {
|
|
@@ -98,7 +71,7 @@ interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
98
71
|
declare function Card({ title, icon, href, children, className, ...rest }: CardProps): react_jsx_runtime.JSX.Element;
|
|
99
72
|
|
|
100
73
|
declare const admonitionVariants: (props?: ({
|
|
101
|
-
type?: "
|
|
74
|
+
type?: "danger" | "warning" | "info" | "note" | "tip" | "important" | "caution" | null | undefined;
|
|
102
75
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
103
76
|
type AdmonitionVariants = VariantProps<typeof admonitionVariants>;
|
|
104
77
|
interface AdmonitionProps extends React.HTMLAttributes<HTMLDivElement>, AdmonitionVariants {
|
|
@@ -154,11 +127,6 @@ interface FieldProps {
|
|
|
154
127
|
}
|
|
155
128
|
declare function Field({ name, type, defaultValue, required, children, id, className, }: FieldProps): react_jsx_runtime.JSX.Element;
|
|
156
129
|
|
|
157
|
-
interface LinkProps$1 extends LinkProps$2 {
|
|
158
|
-
/** Should prefetch the page on hover? Default 'hover' */
|
|
159
|
-
prefetch?: 'hover' | 'none';
|
|
160
|
-
}
|
|
161
|
-
|
|
162
130
|
type LinkProps = LinkProps$1 & {
|
|
163
131
|
to: string;
|
|
164
132
|
children?: React.ReactNode;
|
|
@@ -205,4 +173,4 @@ interface ComponentPreviewProps {
|
|
|
205
173
|
}
|
|
206
174
|
declare function ComponentPreview(props: ComponentPreviewProps): react_jsx_runtime.JSX.Element;
|
|
207
175
|
|
|
208
|
-
export { Admonition, type AdmonitionProps, Badge, type BadgeProps, Button,
|
|
176
|
+
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 };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var ir=Object.create;var Ce=Object.defineProperty;var lr=Object.getOwnPropertyDescriptor;var cr=Object.getOwnPropertyNames;var dr=Object.getPrototypeOf,mr=Object.prototype.hasOwnProperty;var pr=(e,t)=>{for(var r in t)Ce(e,r,{get:t[r],enumerable:!0})},Je=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of cr(t))!mr.call(e,n)&&n!==r&&Ce(e,n,{get:()=>t[n],enumerable:!(o=lr(t,n))||o.enumerable});return e};var w=(e,t,r)=>(r=e!=null?ir(dr(e)):{},Je(t||!e||!e.__esModule?Ce(r,"default",{value:e,enumerable:!0}):r,e)),ur=e=>Je(Ce({},"__esModule",{value:!0}),e);var io={};pr(io,{Admonition:()=>U,Badge:()=>ut,Button:()=>tt,Card:()=>ht,Cards:()=>gt,Caution:()=>Tt,CodeBlock:()=>ee,ComponentPreview:()=>Ut,ComponentProps:()=>_t,CopyMarkdown:()=>nr,Danger:()=>Pt,Field:()=>Mt,FileTree:()=>It,Image:()=>$t,Important:()=>kt,InfoBox:()=>wt,Link:()=>Ht,List:()=>At,Note:()=>Ct,Tab:()=>ct,Table:()=>St,Tabs:()=>dt,Tip:()=>Nt,Video:()=>mt,Warning:()=>Rt});module.exports=ur(io);var Re=w(require("react-aria-components"));var Qe=require("clsx"),Ye=require("tailwind-merge");function s(...e){return(0,Ye.twMerge)((0,Qe.clsx)(e))}var et=require("class-variance-authority"),F=require("react/jsx-runtime"),Ne=(0,et.cva)("flex flex-row items-center justify-center w-auto font-semibold tracking-tight no-underline whitespace-nowrap select-none outline-none transition-all duration-200 cursor-pointer pressed:scale-[0.97] hover:-translate-y-px leading-none",{variants:{variant:{primary:"bg-primary-500 text-white shadow-md hover:brightness-110 hover:shadow-lg",secondary:"bg-bg-surface text-text-main border border-border-subtle hover:bg-bg-muted hover:border-border-strong",outline:"bg-transparent text-text-main border border-border-strong hover:bg-bg-surface hover:border-primary-500",ghost:"bg-transparent text-text-muted hover:bg-bg-surface hover:text-text-main",danger:"bg-[var(--color-danger-500)]/10 text-[var(--color-danger-500)] border border-[var(--color-danger-500)]/20 hover:bg-[var(--color-danger-500)]/15",success:"bg-[var(--color-success-500)]/10 text-[var(--color-success-500)] border border-[var(--color-success-500)]/20 hover:bg-[var(--color-success-500)]/15",warning:"bg-[var(--color-warning-500)]/10 text-[var(--color-warning-500)] border border-[var(--color-warning-500)]/20 hover:bg-[var(--color-warning-500)]/15",info:"bg-[var(--color-info-500)]/10 text-[var(--color-info-500)] border border-[var(--color-info-500)]/20 hover:bg-[var(--color-info-500)]/15",subtle:"bg-primary-500/10 text-primary-500 hover:bg-primary-500/20",link:"bg-transparent text-primary-500 !p-0 !min-h-0 hover:underline"},size:{sm:"min-h-8 px-3.5 text-[0.8125rem] gap-1.5",md:"min-h-10 px-5 text-[0.9375rem] gap-2",lg:"min-h-12 px-7 text-[1.05rem] gap-2.5"},rounded:{none:"rounded-none",sm:"rounded-sm",md:"rounded-md",lg:"rounded-lg",full:"rounded-full"},iconSize:{sm:"w-8 h-8 p-0",md:"w-10 h-10 p-0",lg:"w-12 h-12 p-0"},disabled:{true:"opacity-50 cursor-not-allowed pointer-events-none",false:null}},defaultVariants:{variant:"primary",size:"md",rounded:"md"}}),Q=({href:e,icon:t,iconPosition:r="left",isIconOnly:o,children:n,className:a,variant:c,size:l,rounded:i,iconSize:d,disabled:m,...p})=>{let b=o||!n&&!!t,x=b?(0,F.jsx)("span",{className:"inline-flex items-center justify-center [&>svg]:w-[1.2rem] [&>svg]:h-[1.2rem]",children:t}):(0,F.jsxs)(F.Fragment,{children:[t&&r==="left"&&(0,F.jsx)("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t}),(0,F.jsx)("span",{className:"flex items-center",children:n}),t&&r==="right"&&(0,F.jsx)("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t})]});return e?(0,F.jsx)(Re.Link,{href:e,className:s(Ne({variant:c,size:l,rounded:i,iconSize:b?d:void 0,disabled:m}),a),...p,children:x}):(0,F.jsx)(Re.Button,{className:s(Ne({variant:c,size:l,rounded:i,iconSize:b?d:void 0,disabled:m}),a),...p,children:x})};var rt=require("react/jsx-runtime"),tt=({className:e,variant:t,size:r,rounded:o,iconSize:n,disabled:a,...c})=>(0,rt.jsx)(Q,{className:s("group",Ne({variant:t,size:r,rounded:o,iconSize:n,disabled:a,className:e})),...c});var we=w(require("react-aria-components")),ke=require("lucide-react");var Pe=require("react"),fr=(0,Pe.createContext)(null);function K(){let e=(0,Pe.use)(fr);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e}var De=require("codesandbox/lib/api/define.js");function ot(e){let t=e.files||{},r=e.dependencies||{},o=e.devDependencies||{},n=e.title||"codesandbox-project",a=e.description||"Generic Sandbox",c={};for(let[l,i]of Object.entries(t)){let d=typeof i.content=="object"?JSON.stringify(i.content,null,2):i.content;c[l]={content:d,isBinary:i.isBinary??!1}}if(!c["package.json"]){let i=e.template==="vite"||!!o.vite||!!o["@vitejs/plugin-react"]?{dev:"vite",build:"vite build",preview:"vite preview"}:{start:"node index.js"};c["package.json"]={content:JSON.stringify({private:!0,name:n,description:a,type:"module",version:"1.0.0",scripts:e.scripts||i,dependencies:r,devDependencies:o},null,2),isBinary:!1}}return c}function br(e){let t=ot(e),r=(0,De.getParameters)({files:t}),o=new URLSearchParams({parameters:r,installDependencies:"true"});return e.entry&&o.set("file",`/${e.entry}`),{parameters:r,url:`https://codesandbox.io/api/v1/sandboxes/define?${o.toString()}`,options:e}}function nt(e){if(typeof window>"u")return br(e);let t=ot(e),r=(0,De.getParameters)({files:t}),o=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 a=(l,i)=>{let d=document.createElement("input");d.type="hidden",d.name=l,d.value=i,n.appendChild(d)},c=new URLSearchParams({file:`/${o}`,eslint:"0",codemirror:"1",installDependencies:"true"});return a("query",c.toString()),a("parameters",r),document.body.appendChild(n),n.submit(),document.body.removeChild(n),{parameters:r,url:`https://codesandbox.io/api/v1/sandboxes/define?parameters=${r}`,options:e}}var st=async e=>{try{return await navigator.clipboard.writeText(e),!0}catch{let t=document.createElement("textarea");return t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t),!0}};var W=require("react");function at(e){let{title:t,sandbox:r}=e,[o,n]=(0,W.useState)(!1),[a,c]=(0,W.useState)(!1),[l,i]=(0,W.useState)(!1),d=(0,W.useRef)(null),m=K(),p=(0,W.useCallback)(async()=>{let x=d.current?.textContent??"";st(x),n(!0),setTimeout(()=>n(!1),2e3)},[]),b=(0,W.useCallback)(()=>{let x=d.current?.textContent??"",P=m?.integrations?.sandbox?.config||{},N=typeof r=="object"?r:P,f=N.entry||"src/App.tsx";nt({title:t??"Code Snippet",...N,files:{...N.files,[f]:{content:x}}})},[t,m,r]);return(0,W.useEffect)(()=>{let x=d.current?.textContent?.length??0;i(x>120)},[e.children,e.highlightedHtml]),{copied:o,isExpanded:a,setIsExpanded:c,isExpandable:l,preRef:d,handleCopy:p,handleSandbox:b,shouldTruncate:l&&!a}}var pe=require("react/jsx-runtime");function xr(e){let{size:t=20,...r}=e;return{...r,width:t,height:t}}var it=e=>(0,pe.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...xr(e),children:[(0,pe.jsx)("title",{children:"CodeSandbox"}),(0,pe.jsx)("path",{d:"M0 24h24V0H0v2.455h21.546v19.09H2.454V0H0Z"})]});var Y=w(require("react-aria-components"));var V=require("react/jsx-runtime"),hr=({className:e,children:t,...r})=>(0,V.jsx)(Y.Tooltip,{...r,offset:8,className:o=>s("group z-50 overflow-visible rounded-md bg-bg-surface/90 px-2.5 py-1.5 text-xs font-medium text-text-main shadow-lg backdrop-blur-md ring-1 ring-border-subtle outline-hidden select-none","data-entering:animate-in data-entering:fade-in data-entering:zoom-in-95 data-entering:duration-100","data-exiting:animate-out data-exiting:fade-out data-exiting:zoom-out-95 data-exiting:duration-75","data-[placement=top]:slide-in-from-bottom-1","data-[placement=bottom]:slide-in-from-top-1","data-[placement=left]:slide-in-from-right-1","data-[placement=right]:slide-in-from-left-1",typeof e=="function"?e(o):e),children:o=>(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(Y.OverlayArrow,{children:(0,V.jsxs)("svg",{width:8,height:8,viewBox:"0 0 8 8",className:"fill-bg-surface/90 stroke-border-subtle group-data-[placement=bottom]:rotate-180 group-data-[placement=left]:-rotate-90 group-data-[placement=right]:rotate-90",children:[(0,V.jsx)("title",{children:"Arrow"}),(0,V.jsx)("path",{d:"M0 0 L4 4 L8 0"})]})}),typeof t=="function"?t(o):t]})}),ze=({content:e,children:t,delay:r=500,closeDelay:o=0,...n})=>(0,V.jsxs)(Y.TooltipTrigger,{delay:r,closeDelay:o,children:[t,(0,V.jsx)(hr,{...n,children:e})]});var T=require("react/jsx-runtime");function ee(e){let{children:t,sandbox:r,hideSandbox:o=!0,hideCopy:n=!1,highlightedHtml:a,...c}=e,d=!!K()?.integrations?.sandbox?.enable&&!o,{copied:m,isExpanded:p,setIsExpanded:b,isExpandable:x,preRef:P,handleCopy:N,handleSandbox:f,shouldTruncate:H}=at(e);return(0,T.jsxs)("div",{className:s("group relative my-6 overflow-hidden rounded-lg border border-border-subtle bg-(--color-code-bg)",H&&"[&>pre]:max-h-[250px] [&>pre]:overflow-hidden"),children:[(0,T.jsxs)("div",{className:"absolute top-3 right-4 z-50 flex items-center gap-2 transition-all duration-300 opacity-0 group-hover:opacity-100",children:[d&&(0,T.jsx)(ze,{content:"Open in CodeSandbox",children:(0,T.jsx)(we.Button,{onPress:f,className:"grid place-items-center w-8 h-8 bg-transparent text-text-muted outline-none cursor-pointer transition-all duration-200 hover:scale-115 hover:text-sky-400 active:scale-95 [&>svg]:w-5 [&>svg]:h-5 [&>svg]:stroke-2","aria-label":"Open in CodeSandbox",children:(0,T.jsx)(it,{size:20})})}),!n&&(0,T.jsx)(ze,{content:m?"Copied!":"Copy code",children:(0,T.jsx)(we.Button,{onPress:N,className:s("grid place-items-center w-8 h-8 bg-transparent outline-none cursor-pointer transition-all duration-200 hover:scale-115 active:scale-95 [&>svg]:w-5 [&>svg]:h-5 [&>svg]:stroke-2",m?"text-emerald-400":"text-text-muted hover:text-text-main"),"aria-label":"Copy code",children:m?(0,T.jsx)(ke.Check,{size:20}):(0,T.jsx)(ke.Copy,{size:20})})})]}),a?(0,T.jsx)("div",{ref:P,className:"shiki-wrapper [&>pre]:m-0! [&>pre]:rounded-none! [&>pre]:border-none! [&>pre]:bg-inherit! [&>pre>code]:grid! [&>pre>code]:p-5! [&>.shiki.shiki-themes]:bg-transparent!",dangerouslySetInnerHTML:{__html:a}}):(0,T.jsx)("pre",{ref:P,className:"m-0! rounded-none! border-none! bg-inherit! font-mono text-[0.8125rem] leading-[1.7]",...c,children:t}),x&&(0,T.jsx)("div",{className:s(H?"absolute bottom-0 inset-x-0 h-24 bg-linear-to-t from-(--color-code-bg) to-transparent flex items-end justify-center pb-4 z-10":"relative flex justify-center py-4"),children:(0,T.jsx)(we.Button,{onPress:()=>b(!p),className:"rounded-full bg-bg-surface border border-border-subtle px-5 py-2 text-[0.8125rem] font-medium text-text-main outline-none cursor-pointer transition-all hover:bg-border-subtle hover:-translate-y-px backdrop-blur-md",children:p?"Show less":"Expand code"})})]})}var te=require("react"),Z=w(require("react-aria-components"));var j=require("react");function lt({initialIndex:e=0,tabs:t}){let r=t[e]?.props.disabled?t.findIndex(d=>!d.props.disabled):e,[o,n]=(0,j.useState)(r===-1?0:r),a=(0,j.useRef)([]),[c,l]=(0,j.useState)({opacity:0,transform:"translateX(0)",width:0});(0,j.useEffect)(()=>{let d=a.current[o];d&&l({opacity:1,width:d.offsetWidth,transform:`translateX(${d.offsetLeft}px)`})},[o,t]);let i=(0,j.useCallback)(d=>{let m=0;if(d.key==="ArrowRight"?m=1:d.key==="ArrowLeft"&&(m=-1),m!==0){let p=(o+m+t.length)%t.length;for(;t[p].props.disabled&&p!==o;)p=(p+m+t.length)%t.length;p!==o&&!t[p].props.disabled&&(n(p),a.current[p]?.focus())}},[o,t]);return{active:o,setActive:n,tabRefs:a,indicatorStyle:c,handleKeyDown:i}}var He=require("class-variance-authority"),B=require("react/jsx-runtime"),vr=(0,He.cva)("relative flex items-center border-b border-border-subtle gap-1 overflow-x-auto no-scrollbar",{variants:{size:{default:"px-0",compact:"px-2"}},defaultVariants:{size:"default"}}),yr=(0,He.cva)("flex items-center gap-2 px-4 py-2.5 text-sm font-medium outline-none transition-all duration-200 cursor-pointer bg-transparent border-none select-none whitespace-nowrap",{variants:{isActive:{true:"text-primary-500",false:"text-text-muted hover:text-text-main"},isDisabled:{true:"opacity-40 pointer-events-none",false:""}},defaultVariants:{isActive:!1,isDisabled:!1}});function ct({children:e}){let t=typeof e=="string"?(0,B.jsx)(ee,{className:"language-bash",children:(0,B.jsx)("code",{children:e.trim()})}):e;return(0,B.jsx)("div",{className:"py-4",children:t})}function dt({defaultIndex:e=0,children:t}){let r=(0,te.useMemo)(()=>te.Children.toArray(t).filter(l=>(0,te.isValidElement)(l)&&l.props?.label),[t]),{active:o,setActive:n,tabRefs:a,indicatorStyle:c}=lt({initialIndex:e,tabs:r});return(0,B.jsx)("div",{className:"my-8 w-full group/tabs",children:(0,B.jsxs)(Z.Tabs,{selectedKey:o.toString(),onSelectionChange:l=>n(Number(l)),className:"w-full",children:[(0,B.jsxs)(Z.TabList,{"aria-label":"Content Tabs",className:s(vr()),children:[r.map((l,i)=>{let{label:d,icon:m,disabled:p}=l.props,b=i.toString();return(0,B.jsxs)(Z.Tab,{id:b,isDisabled:p,ref:x=>{a.current[i]=x},className:({isSelected:x,isDisabled:P})=>s(yr({isActive:x,isDisabled:P})),children:[!!m&&(0,B.jsx)("span",{className:"shrink-0 [&>svg]:w-4 [&>svg]:h-4",children:m}),(0,B.jsx)("span",{children:d})]},b)}),(0,B.jsx)("div",{className:"absolute bottom-0 h-0.5 bg-primary-500 transition-all duration-300 ease-in-out pointer-events-none",style:c,"aria-hidden":"true"})]}),r.map((l,i)=>(0,B.jsx)(Z.TabPanel,{id:i.toString(),children:r[i]},i))]})})}var re=require("react"),ue=require("react/jsx-runtime");function mt({src:e,poster:t,alt:r,children:o,controls:n,preload:a="metadata",...c}){let l=(0,re.useRef)(null),[i,d]=(0,re.useState)(!1);return(0,re.useEffect)(()=>{let m=l.current;if(!m)return;let p=new IntersectionObserver(([b])=>{b.isIntersecting&&(d(!0),p.disconnect())},{rootMargin:"200px"});return p.observe(m),()=>p.disconnect()},[]),(0,ue.jsx)("div",{ref:l,className:"my-6 overflow-hidden rounded-lg border border-border-subtle",children:i?(0,ue.jsxs)("video",{className:"block w-full h-auto",src:e,poster:t,controls:!0,preload:a,playsInline:!0,...c,children:[o,"Your browser does not support the video tag."]}):(0,ue.jsx)("div",{className:"aspect-video bg-bg-surface animate-pulse",role:"img","aria-label":r||"Video"})})}var pt=require("class-variance-authority"),ft=require("react/jsx-runtime"),Cr=(0,pt.cva)("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold tracking-tight",{variants:{variant:{default:"bg-bg-surface text-text-muted border-border-subtle",primary:"bg-primary-500/15 text-primary-400 border-primary-500/20",success:"bg-emerald-500/15 text-emerald-400 border-emerald-500/20",warning:"bg-amber-500/15 text-amber-400 border-amber-500/20",danger:"bg-red-500/15 text-red-400 border-red-500/20",info:"bg-sky-500/15 text-sky-400 border-sky-500/20"}},defaultVariants:{variant:"default"}});function ut({variant:e="default",children:t,className:r="",...o}){return(0,ft.jsx)("span",{className:s(Cr({variant:e}),r),...o,children:t})}var fe=require("react"),bt=w(require("react-aria-components"));var xt=require("class-variance-authority"),S=require("react/jsx-runtime"),Nr=(0,xt.cva)("grid gap-4 my-6",{variants:{cols:{1:"grid-cols-1",2:"grid-cols-1 sm:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"}},defaultVariants:{cols:3}});function gt({cols:e=3,children:t,className:r="",...o}){return(0,S.jsx)("div",{className:s(Nr({cols:e}),r),...o,children:t})}function ht({title:e,icon:t,href:r,children:o,className:n="",...a}){let c=(0,fe.useRef)(null),l=(0,fe.useRef)(null),i=(0,fe.useCallback)(p=>{let b=c.current||l.current;if(!b)return;let{left:x,top:P}=b.getBoundingClientRect();b.style.setProperty("--x",`${p.clientX-x}px`),b.style.setProperty("--y",`${p.clientY-P}px`)},[]),d=(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)("div",{className:"pointer-events-none absolute -inset-px rounded-xl opacity-0 transition-opacity duration-300 group-hover:opacity-100",style:{background:"radial-gradient(400px circle at var(--x) var(--y), color-mix(in oklch, var(--color-primary-500), transparent 90%), transparent 80%)"}}),t&&(0,S.jsx)("div",{className:"mb-3 flex h-10 w-10 items-center justify-center rounded-lg bg-primary-500/10 text-primary-400 text-lg transition-transform duration-300 group-hover:scale-105 group-hover:-rotate-3",children:t}),(0,S.jsxs)("div",{className:"space-y-1.5",children:[e&&(0,S.jsx)("h3",{className:"text-sm font-bold text-text-main",children:e}),o&&(0,S.jsx)("div",{className:"text-sm text-text-muted leading-relaxed",children:o})]})]}),m=s("group relative block rounded-xl border border-border-subtle bg-bg-surface p-5 outline-none overflow-hidden","transition-all duration-200 hover:border-primary-500/40 hover:shadow-lg hover:shadow-primary-500/5","focus-visible:ring-2 focus-visible:ring-primary-500/30",n);return r?(0,S.jsx)(bt.Link,{ref:l,href:r,className:s(m,"no-underline cursor-pointer"),onMouseMove:i,...a,children:d}):(0,S.jsx)("div",{ref:c,role:"presentation",className:m,onMouseMove:i,...a,children:d})}var L=require("lucide-react");var yt=require("class-variance-authority"),y=require("react/jsx-runtime"),Rr={note:(0,y.jsx)(L.Bookmark,{size:18}),tip:(0,y.jsx)(L.Lightbulb,{size:18}),info:(0,y.jsx)(L.Info,{size:18}),warning:(0,y.jsx)(L.AlertTriangle,{size:18}),danger:(0,y.jsx)(L.ShieldAlert,{size:18}),important:(0,y.jsx)(L.Flame,{size:18}),caution:(0,y.jsx)(L.Zap,{size:18})},Pr={note:"Note",tip:"Tip",info:"Info",warning:"Warning",danger:"Danger",important:"Important",caution:"Caution"},vt=(0,yt.cva)("py-4 px-4 rounded-lg",{variants:{type:{note:"border-primary-400 bg-primary-500/5 text-primary-400",tip:"border-emerald-500 bg-emerald-500/5 text-emerald-500",info:"border-sky-500 bg-sky-500/5 text-sky-500",warning:"border-amber-500 bg-amber-500/5 text-amber-500",danger:"border-red-500 bg-red-500/5 text-red-500",important:"border-orange-500 bg-orange-500/5 text-orange-500",caution:"border-yellow-500 bg-yellow-500/5 text-yellow-500"}},defaultVariants:{type:"note"}});function U({type:e="note",title:t,children:r,className:o="",...n}){return(0,y.jsxs)("div",{className:s(vt({type:e}),o),role:e==="warning"||e==="danger"?"alert":"note",...n,children:[(0,y.jsxs)("div",{className:"flex items-center flex-row gap-2 mb-2",children:[(0,y.jsx)("span",{className:s("shrink-0",vt({type:e})),children:Rr[e]}),(0,y.jsx)("span",{className:"text-sm font-bold tracking-tight text-text-main",children:t||Pr[e]})]}),(0,y.jsx)("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 [&>p]:mb-2 [&>p:last-child]:mb-0",children:r})]})}var Ct=e=>(0,y.jsx)(U,{type:"note",...e}),Nt=e=>(0,y.jsx)(U,{type:"tip",...e}),Rt=e=>(0,y.jsx)(U,{type:"warning",...e}),Pt=e=>(0,y.jsx)(U,{type:"danger",...e}),wt=e=>(0,y.jsx)(U,{type:"info",...e}),kt=e=>(0,y.jsx)(U,{type:"important",...e}),Tt=e=>(0,y.jsx)(U,{type:"caution",...e});var Te=require("react"),oe=require("lucide-react");var Ae=require("class-variance-authority"),$=require("react/jsx-runtime"),wr=(0,Ae.cva)("my-6 transition-all duration-200",{variants:{variant:{default:"list-disc pl-5 text-text-muted marker:text-primary-500/50",number:"list-decimal pl-5 text-text-muted marker:text-primary-500/50 marker:font-bold",checked:"list-none p-0",arrow:"list-none p-0",bubble:"list-none p-0"},cols:{1:"grid-cols-1",2:"grid-cols-1 sm:grid-cols-2",3:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",4:"grid-cols-1 sm:grid-cols-2 lg:grid-cols-4"},isGrid:{true:"grid gap-x-8 gap-y-3",false:"space-y-2"},dense:{true:"space-y-1",false:"space-y-2"}},compoundVariants:[{variant:"default",dense:!0,className:"space-y-0.5"}],defaultVariants:{variant:"default",cols:1,isGrid:!1,dense:!1}}),kr=(0,Ae.cva)("group flex items-start gap-3 text-sm leading-relaxed transition-all duration-200",{variants:{variant:{default:"",number:"",checked:"hover:translate-x-0.5",arrow:"hover:translate-x-0.5",bubble:"hover:translate-x-0.5"},dense:{true:"py-0",false:"py-0.5"}},defaultVariants:{variant:"default",dense:!1}}),Tr=(0,Ae.cva)("mt-1 shrink-0 flex items-center justify-center transition-transform group-hover:scale-110",{variants:{variant:{bubble:"h-5 w-5 rounded-full bg-primary-500/10 text-primary-500 text-[10px] font-bold",default:""}},defaultVariants:{variant:"default"}});function Ar({icon:e,children:t,variant:r,dense:o}){return(0,$.jsxs)("li",{className:s(kr({variant:r,dense:o})),children:[e&&(0,$.jsx)("span",{className:s(Tr({variant:r==="bubble"?"bubble":"default"})),children:e}),(0,$.jsx)("div",{className:"flex-1 text-text-muted group-hover:text-text-main transition-colors",children:t})]})}var Lr={checked:e=>(0,$.jsx)(oe.Check,{size:14,className:s("text-emerald-500 shrink-0",e)}),arrow:e=>(0,$.jsx)(oe.ChevronRight,{size:14,className:s("text-primary-400 shrink-0",e)}),bubble:e=>(0,$.jsx)(oe.Circle,{size:6,fill:"currentColor",className:s("text-primary-500 shrink-0",e)}),default:()=>null,number:()=>null};function At({variant:e="default",cols:t=1,dense:r=!1,children:o,className:n,...a}){let c=t!==void 0&&Number(t)>1,l=Lr[e],i=wr({variant:e,cols:t,dense:r,isGrid:c,className:n}),d=e==="number"?"ol":"ul";return e==="default"||e==="number"?(0,$.jsx)(d,{className:i,...a,children:o}):(0,$.jsx)("ul",{className:i,...a,children:Te.Children.map(o,m=>{if(!(0,Te.isValidElement)(m))return m;let p=m,b=p.type==="li"?p.props.children:p.props.children||m;return(0,$.jsx)(Ar,{icon:l(),variant:e,dense:r,children:b})})})}var G=require("react"),_=w(require("react-aria-components")),D=require("lucide-react");var C=require("react/jsx-runtime"),be=16,xe=2,Fe={CODE:/\.(ts|tsx|js|jsx|json|mjs|cjs|astro|vue|svelte)$/i,TEXT:/\.(md|mdx|txt)$/i,IMAGE:/\.(png|jpg|jpeg|svg|gif)$/i};function $e(e){return typeof e=="string"?e:typeof e=="number"?e.toString():Array.isArray(e)?e.map($e).join(""):(0,G.isValidElement)(e)&&e.props&&typeof e.props=="object"&&"children"in e.props?$e(e.props.children):""}function Ir(e,t){let r=e.toLowerCase(),o="shrink-0 transition-colors duration-200";if(t)return(0,C.jsx)(D.Folder,{size:be,strokeWidth:xe,className:s(o,"text-primary-400"),fill:"currentColor",fillOpacity:.15});let n=s(o,"text-text-dim group-hover:text-text-main");return Fe.CODE.test(r)?(0,C.jsx)(D.FileCode,{size:be,strokeWidth:xe,className:n}):Fe.TEXT.test(r)?(0,C.jsx)(D.FileText,{size:be,strokeWidth:xe,className:n}):Fe.IMAGE.test(r)?(0,C.jsx)(D.FileImage,{size:be,strokeWidth:xe,className:n}):(0,C.jsx)(D.File,{size:be,strokeWidth:xe,className:n})}function We(e,t){if(!(0,G.isValidElement)(e))return!1;let r=e.type;if(typeof r=="string")return r===t;if(typeof r=="function")return r.name===t||r.name?.toLowerCase()===t;let o=e.props;return o?.originalType===t||o?.mdxType===t}function Br(e){let t=e.match(/\s+(\/\/|#)\s+(.*)$/);return t?{name:e.slice(0,t.index).trim(),comment:t[2]}:{name:e.trim()}}function Le(e,t="root"){if(!(0,G.isValidElement)(e))return[];let r=[];if(We(e,"ul"))return G.Children.forEach(e.props.children,(o,n)=>{r.push(...Le(o,`${t}-${n}`))}),r;if(We(e,"li")){let o=G.Children.toArray(e.props.children),n=o.findIndex(P=>We(P,"ul")),a=n!==-1,c=a?o.slice(0,n):o,l=a?o.slice(n):[],i=$e(c),{name:d,comment:m}=Br(i),p=d.endsWith("/"),b=p?d.slice(0,-1):d,x=a||p;return r.push({id:`${t}-${b}`,name:b,comment:m,isFolder:x,children:a?Le(l[0],`${t}-${b}`):void 0}),r}return e.props&&typeof e.props=="object"&&"children"in e.props&&G.Children.forEach(e.props.children,(o,n)=>{r.push(...Le(o,`${t}-${n}`))}),r}function Lt({item:e}){return(0,C.jsxs)(_.TreeItem,{id:e.id,textValue:e.name,className:"outline-none group focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-md",children:[(0,C.jsx)(_.TreeItemContent,{children:({isExpanded:t,hasChildItems:r})=>(0,C.jsxs)("div",{className:"flex items-center gap-2 py-1 px-1.5 rounded-md transition-colors hover:bg-primary-500/5 cursor-pointer",children:[(0,C.jsx)("div",{style:{width:"calc((var(--tree-item-level) - 1) * 1rem)"},className:"shrink-0"}),r?(0,C.jsx)(_.Button,{slot:"chevron",className:"outline-none text-text-dim hover:text-primary-400 p-0.5 rounded transition-colors",children:(0,C.jsx)(D.ChevronRight,{size:14,strokeWidth:3,className:s("transition-transform duration-200",t&&"rotate-90")})}):(0,C.jsx)("div",{className:"w-[18px]"}),Ir(e.name,e.isFolder),(0,C.jsx)("span",{className:s("text-sm transition-colors truncate select-none",e.isFolder?"font-semibold text-text-main":"text-text-muted group-hover:text-text-main"),children:e.name}),e.comment&&(0,C.jsxs)("span",{className:"ml-2 text-xs italic text-text-dim opacity-70 group-hover:opacity-100 transition-opacity whitespace-nowrap overflow-hidden text-ellipsis font-sans",children:["//"," ",e.comment]})]})}),e.children&&(0,C.jsx)(_.Collection,{items:e.children,children:t=>(0,C.jsx)(Lt,{item:t})})]})}function It({children:e}){let t=(0,G.useMemo)(()=>Le(e),[e]);return(0,C.jsx)("div",{className:"my-8",children:(0,C.jsx)(_.Tree,{items:t,"aria-label":"File Tree",className:s("rounded-xl border border-border-subtle bg-bg-surface/50 p-4 font-mono text-sm shadow-sm backdrop-blur-sm outline-none","max-h-[500px] overflow-y-auto scrollbar-thin scrollbar-thumb-border-subtle","focus-visible:ring-2 focus-visible:ring-primary-500/20"),children:r=>(0,C.jsx)(Lt,{item:r})})})}var ge=w(require("react-aria-components"));var ne=require("react");function Bt({data:e,sortable:t=!1,paginated:r=!1,pageSize:o=10}){let[n,a]=(0,ne.useState)(null),[c,l]=(0,ne.useState)(1),i=(0,ne.useMemo)(()=>{if(!e)return[];let b=[...e];return t&&n!==null&&b.sort((x,P)=>{let N=x[n.key],f=P[n.key],H=typeof N=="string"?N:"",X=typeof f=="string"?f:"";return H<X?n.direction==="asc"?-1:1:H>X?n.direction==="asc"?1:-1:0}),b},[e,n,t]),d=Math.ceil(i.length/o),m=(0,ne.useMemo)(()=>{if(!r)return i;let b=(c-1)*o;return i.slice(b,b+o)},[i,r,c,o]);return{sortConfig:n,currentPage:c,setCurrentPage:l,totalPages:d,paginatedData:m,requestSort:b=>{if(!t)return;let x="asc";n&&n.key===b&&n.direction==="asc"&&(x="desc"),a({key:b,direction:x})}}}var M=require("lucide-react");var g=require("react/jsx-runtime");function St({headers:e,data:t,children:r,className:o="",sortable:n=!1,paginated:a=!1,pageSize:c=10}){let{sortConfig:l,currentPage:i,setCurrentPage:d,totalPages:m,paginatedData:p,requestSort:b}=Bt({data:t,sortable:n,paginated:a,pageSize:c}),x=N=>n?l?.key!==N?(0,g.jsx)(M.ChevronDown,{size:14,className:"ml-1 opacity-30"}):l.direction==="asc"?(0,g.jsx)(M.ChevronUp,{size:14,className:"ml-1 text-primary-400"}):(0,g.jsx)(M.ChevronDown,{size:14,className:"ml-1 text-primary-400"}):null,P=r||(0,g.jsxs)(g.Fragment,{children:[e&&(0,g.jsx)("thead",{children:(0,g.jsx)("tr",{children:e.map((N,f)=>(0,g.jsx)("th",{onClick:()=>b(f),className:s("text-left px-3 py-2.5 border-b-2 border-border-subtle text-text-main font-semibold text-sm",n&&"cursor-pointer select-none hover:text-primary-400 transition-colors"),children:(0,g.jsxs)("div",{className:"flex items-center",children:[N,x(f)]})},f))})}),p&&(0,g.jsx)("tbody",{children:p.map((N,f)=>(0,g.jsx)("tr",{className:"transition-colors hover:bg-bg-surface",children:N.map((H,X)=>(0,g.jsx)("td",{className:"px-3 py-2 border-b border-border-subtle text-sm text-text-muted",children:H},X))},f))})]});return(0,g.jsxs)("div",{className:s("my-6 rounded-lg border border-border-subtle overflow-hidden",o),children:[(0,g.jsx)("div",{className:"overflow-x-auto",children:(0,g.jsx)("table",{className:"w-full border-collapse text-sm",children:P})}),a&&m>1&&(0,g.jsxs)("div",{className:"flex items-center justify-between border-t border-border-subtle px-4 py-3",children:[(0,g.jsxs)("span",{className:"text-xs text-text-muted",children:["Page ",i," of ",m]}),(0,g.jsxs)("div",{className:"flex items-center gap-1",children:[(0,g.jsx)(ge.Button,{onPress:()=>d(1),isDisabled:i===1,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:(0,g.jsx)(M.ChevronsLeft,{size:16})}),(0,g.jsx)(ge.Button,{onPress:()=>d(N=>Math.max(N-1,1)),isDisabled:i===1,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:(0,g.jsx)(M.ChevronLeft,{size:16})}),(0,g.jsx)(ge.Button,{onPress:()=>d(N=>Math.min(N+1,m)),isDisabled:i===m,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:(0,g.jsx)(M.ChevronRight,{size:16})}),(0,g.jsx)(ge.Button,{onPress:()=>d(m),isDisabled:i===m,className:"grid place-items-center h-7 w-7 rounded-md text-text-muted outline-none transition-colors hover:bg-bg-surface disabled:opacity-30 disabled:pointer-events-none cursor-pointer",children:(0,g.jsx)(M.ChevronsRight,{size:16})})]})]})]})}var E=require("react/jsx-runtime");function Mt({name:e,type:t,defaultValue:r,required:o=!1,children:n,id:a,className:c=""}){return(0,E.jsxs)("article",{className:s("group relative my-6 rounded-xl border border-border-subtle bg-bg-surface p-5 transition-all duration-300","hover:border-primary-500/30 hover:shadow-lg hover:shadow-primary-500/5",c),id:a,children:[(0,E.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-4",children:[(0,E.jsxs)("div",{className:"flex flex-wrap items-center gap-2.5",children:[(0,E.jsx)("code",{className:"inline-flex items-center rounded-md bg-primary-500/10 px-2.5 py-1 font-mono text-sm font-bold text-primary-400 border border-primary-500/20 shadow-sm transition-colors group-hover:bg-primary-500/15",children:e}),t&&(0,E.jsx)("span",{className:"rounded-md bg-bg-muted/80 border border-border-subtle px-2 py-0.5 text-[11px] font-semibold text-text-muted uppercase tracking-wider shadow-sm",children:t}),o&&(0,E.jsxs)("div",{className:"flex items-center gap-1.5 rounded-full bg-red-500/10 px-2.5 py-0.5 text-[10px] font-bold uppercase tracking-wider text-red-400 border border-red-500/20 shadow-sm",children:[(0,E.jsx)("span",{className:"h-1 w-1 rounded-full bg-red-400 animate-pulse"}),"Required"]})]}),r&&(0,E.jsxs)("div",{className:"flex items-center gap-2 text-[11px] text-text-muted bg-bg-muted/30 px-2.5 py-1 rounded-md border border-border-subtle/50",children:[(0,E.jsx)("span",{className:"font-semibold opacity-60 uppercase tracking-tighter",children:"Default"}),(0,E.jsx)("code",{className:"font-mono text-text-main font-medium",children:r})]})]}),(0,E.jsx)("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 selection:bg-primary-500/30",children:n})]})}var _e=w(require("react")),Dt=require("react-aria-components"),zt=require("react-router-dom");var Ot=require("react-router-dom");var se=require("react"),Mr=require("react/jsx-runtime"),Sr=(0,se.createContext)({preload:()=>{},routes:[]});function Ie(){return(0,se.use)(Sr)}var Et=require("zustand"),Be=require("zustand/middleware"),Se=(0,Et.create)()((0,Be.persist)(e=>({currentLocale:void 0,currentVersion:void 0,hasHydrated:!1,setLocale:t=>e({currentLocale:t}),setVersion:t=>e({currentVersion:t}),setHasHydrated:t=>e({hasHydrated:t})}),{name:"boltdocs-storage",storage:(0,Be.createJSONStorage)(()=>localStorage),partialize:e=>({currentLocale:e.currentLocale,currentVersion:e.currentVersion}),onRehydrateStorage:()=>e=>{e?.setHasHydrated(!0)}}));function Vt(){let{routes:e}=Ie(),t=K(),r=(0,Ot.useLocation)(),o=Se(f=>f.currentLocale),n=Se(f=>f.currentVersion),a=Se(f=>f.hasHydrated),c=e.find(f=>f.path===r.pathname),l=t.i18n?c?.locale||(a?o:void 0)||t.i18n.defaultLocale:void 0,i=t.versions?c?.version||(a?n:void 0)||t.versions.defaultVersion:void 0,d=e.filter(f=>{let H=t.i18n?(f.locale||t.i18n.defaultLocale)===l:!0,X=t.versions?(f.version||t.versions.defaultVersion)===i:!0;if(!(H&&X))return!1;let Ve=t.i18n;if(Ve){let sr=!!c?.locale,ar=!!f.locale;if(e.some(ye=>ye!==f&&ye.filePath===f.filePath&&ye.version===f.version&&(ye.locale||Ve.defaultLocale)===(f.locale||Ve.defaultLocale))&&sr!==ar)return!1}return!0}),p=t.i18n?.localeConfigs?.[l]?.label||t.i18n?.locales[l]||l,x=t.versions?.versions.find(f=>f.path===i)?.label||i,P=t.i18n?Object.entries(t.i18n.locales).map(([f,H])=>{let X=t.i18n?.localeConfigs?.[f];return{key:f,label:X?.label||H,isCurrent:f===l}}):[],N=t.versions?t.versions.versions.map(f=>({key:f.path,label:f.label,isCurrent:f.path===i})):[];return{routes:d,allRoutes:e,currentRoute:c,currentLocale:l,currentLocaleLabel:p,availableLocales:P,currentVersion:i,currentVersionLabel:x,availableVersions:N,config:t}}function Ge(e){let t=K(),{currentLocale:r,currentVersion:o}=Vt();if(!t||typeof e!="string"||e.startsWith("http")||e.startsWith("//"))return e;let n=t.i18n,a=t.versions;if(!n&&!a)return e;let c=e.startsWith("/docs"),l=e.split("/").filter(Boolean),i=0;l[i]==="docs"&&i++,a&&l.length>i&&a.versions.find(x=>x.path===l[i])&&i++,n&&l.length>i&&n.locales[l[i]]&&i++;let d=l.slice(i),m=[];c&&(m.push("docs"),a&&o&&m.push(o)),n&&r&&r!==n.defaultLocale&&m.push(r),m.push(...d);let p=`/${m.join("/")}`;return p.length>1&&p.endsWith("/")?p.slice(0,-1):p||"/"}var je=require("react/jsx-runtime"),ae=_e.default.forwardRef((e,t)=>{let{href:r,prefetch:o="hover",onMouseEnter:n,onFocus:a,...c}=e,l=Ge(r??""),{preload:i}=Ie();return(0,je.jsx)(Dt.Link,{...c,ref:t,href:l,onMouseEnter:p=>{n?.(p),o==="hover"&&typeof l=="string"&&l.startsWith("/")&&i(l)},onFocus:p=>{a?.(p),o==="hover"&&typeof l=="string"&&l.startsWith("/")&&i(l)}})});ae.displayName="Link";var Er=_e.default.forwardRef((e,t)=>{let{href:r,end:o=!1,className:n,children:a,...c}=e,l=(0,zt.useLocation)(),i=Ge(r??""),d=o?l.pathname===i:l.pathname.startsWith(i),m=typeof n=="function"?n({isActive:d}):s(n,d&&"active"),p=typeof a=="function"?a({isActive:d}):a;return(0,je.jsx)(ae,{...c,ref:t,href:r,className:m,children:p})});Er.displayName="NavLink";var Ft=require("react/jsx-runtime");function Ht({to:e,children:t,className:r="",...o}){let n=e&&(e.startsWith("http://")||e.startsWith("https://")||e.startsWith("//")),a=s("text-blue-600 hover:text-blue-800 hover:underline cursor-pointer",r);return(0,Ft.jsx)(ae,{href:e,className:a,target:n?"_blank":void 0,rel:n?"noopener noreferrer":void 0,...o,children:t})}var ie=require("react"),Vr=require("react/jsx-runtime"),Or=(0,ie.createContext)(void 0);function Wt(){let e=(0,ie.use)(Or);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e}var Gt=require("react/jsx-runtime");function $t({src:e,alt:t,theme:r,...o}){let{theme:n}=Wt();return r&&r!==n?null:(0,Gt.jsx)("img",{src:e,alt:t||"",...o})}var v=require("react/jsx-runtime");function _t({title:e,props:t,className:r=""}){return(0,v.jsxs)("div",{className:s("my-6",r),children:[e&&(0,v.jsx)("h3",{className:"text-base font-bold text-text-main mb-3",children:e}),(0,v.jsx)("div",{className:"overflow-x-auto rounded-lg border border-border-subtle",children:(0,v.jsxs)("table",{className:"w-full border-collapse text-sm",children:[(0,v.jsx)("thead",{children:(0,v.jsxs)("tr",{children:[(0,v.jsx)("th",{className:"text-left px-4 py-3 border-b-2 border-border-subtle text-xs font-bold uppercase tracking-wider text-text-muted",children:"Property"}),(0,v.jsx)("th",{className:"text-left px-4 py-3 border-b-2 border-border-subtle text-xs font-bold uppercase tracking-wider text-text-muted",children:"Type"}),(0,v.jsx)("th",{className:"text-left px-4 py-3 border-b-2 border-border-subtle text-xs font-bold uppercase tracking-wider text-text-muted",children:"Default"}),(0,v.jsx)("th",{className:"text-left px-4 py-3 border-b-2 border-border-subtle text-xs font-bold uppercase tracking-wider text-text-muted",children:"Description"})]})}),(0,v.jsx)("tbody",{children:t.map((o,n)=>(0,v.jsxs)("tr",{className:"transition-colors hover:bg-bg-surface",children:[(0,v.jsxs)("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:[(0,v.jsx)("code",{className:"rounded bg-bg-surface px-1.5 py-0.5 font-mono text-xs font-bold text-primary-400",children:o.name}),o.required&&(0,v.jsx)("span",{className:"ml-1 text-red-400 font-bold",children:"*"})]}),(0,v.jsx)("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:(0,v.jsx)("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-text-muted",children:o.type})}),(0,v.jsx)("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:o.defaultValue?(0,v.jsx)("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-primary-400",children:o.defaultValue}):(0,v.jsx)("span",{className:"text-text-dim",children:"\u2014"})}),(0,v.jsx)("td",{className:"px-4 py-2.5 border-b border-border-subtle text-text-muted",children:o.description})]},`${o.name}-${n}`))})]})})]})}var Ue=require("react");function jt(e){let{code:t,children:r,preview:o}=e,n=(0,Ue.useMemo)(()=>(t??(typeof r=="string"?r:"")).trim(),[t,r]),a=(0,Ue.useMemo)(()=>o??(typeof r!="string"?r:null),[o,r]);return{initialCode:n,previewElement:a}}var le=require("react/jsx-runtime");function Ut(e){let{highlightedHtml:t,hideCode:r=!1,hideSandbox:o=!1,hideCopy:n=!1,sandboxOptions:a={}}=e,{initialCode:c,previewElement:l}=jt(e);return(0,le.jsxs)("div",{className:"my-6 overflow-hidden rounded-xl border border-border-subtle",children:[(0,le.jsx)("div",{className:"flex items-center justify-center p-8 bg-bg-surface",children:l}),!r&&(0,le.jsx)("div",{className:"border-t border-border-subtle",children:(0,le.jsx)(ee,{hideSandbox:o,hideCopy:n,title:a.title,lang:"tsx",highlightedHtml:t,children:c})})]})}var or=require("react"),q=require("lucide-react");var qt=require("react");var Dr=require("react-aria-components"),he=require("lucide-react");var Xt=require("react/jsx-runtime");var ve=w(require("react-aria-components")),zr=require("lucide-react");var Ke=require("react/jsx-runtime");var k=w(require("react-aria-components")),J=require("lucide-react");var h=require("react/jsx-runtime"),Hr=({children:e,isOpen:t,onOpenChange:r,className:o})=>(0,h.jsx)(k.ModalOverlay,{isOpen:t,onOpenChange:r,isDismissable:!0,className:s("fixed inset-0 z-100 bg-black/40 backdrop-blur-sm px-4 py-4 sm:py-20","entering:animate-in entering:fade-in exiting:animate-out exiting:fade-out"),children:(0,h.jsx)(k.Modal,{className:s("mx-auto w-full max-w-2xl overflow-hidden rounded-xl border border-border-subtle bg-bg-surface shadow-2xl ring-1 ring-black/5 outline-none","entering:animate-in entering:fade-in entering:zoom-in-95 exiting:animate-out exiting:fade-out exiting:zoom-out-95",o),children:(0,h.jsx)(k.Dialog,{className:"flex flex-col max-h-[70vh] focus:outline-none",children:e})})}),Fr=({children:e,className:t,onSelectionChange:r,...o})=>(0,h.jsx)("div",{className:t,children:(0,h.jsx)(k.Autocomplete,{...o,onSelectionChange:r,className:"flex flex-col min-h-0",children:e})}),Wr=({className:e,...t})=>(0,h.jsxs)(k.SearchField,{className:"flex items-center gap-3 border-b border-border-subtle px-4 py-4",autoFocus:!0,children:[(0,h.jsx)(J.Search,{className:"h-5 w-5 text-text-muted"}),(0,h.jsx)(k.Input,{...t,className:s("w-full bg-transparent text-lg text-text-main placeholder-text-muted outline-none",e),placeholder:"Search documentation..."}),(0,h.jsx)("div",{className:"flex items-center gap-1.5 rounded-md border border-border-subtle bg-bg-main px-1.5 py-1 text-[10px] font-medium text-text-muted",children:(0,h.jsx)("kbd",{className:"font-sans",children:"ESC"})})]}),$r=({children:e,className:t,...r})=>(0,h.jsx)(k.ListBox,{...r,className:s("flex-1 overflow-y-auto p-2 outline-none",t),children:e}),Gr=({children:e,className:t,...r})=>(0,h.jsx)(k.ListBoxItem,{...r,className:s("group flex items-center gap-3 rounded-lg p-3 text-left outline-none cursor-pointer transition-colors","text-text-muted hover:bg-bg-main hover:text-text-main focus:bg-primary-500 focus:text-white selected:bg-primary-500 selected:text-white",t),children:o=>(0,h.jsxs)(h.Fragment,{children:[e,(o.isFocused||o.isSelected)&&(0,h.jsxs)("div",{className:"ml-auto opacity-50 flex items-center gap-1",children:[(0,h.jsx)("span",{className:"text-[10px]",children:"Select"}),(0,h.jsx)(J.CornerDownLeft,{size:10})]})]})}),_r=({isHeading:e,className:t})=>(0,h.jsx)("div",{className:s("shrink-0",t),children:e?(0,h.jsx)(J.Hash,{size:18}):(0,h.jsx)(J.FileText,{size:18})}),jr=({children:e,className:t})=>(0,h.jsx)("span",{className:s("block font-medium truncate flex-1 text-sm",t),children:e}),Ur=({children:e,className:t})=>(0,h.jsx)("span",{className:s("ml-2 text-xs opacity-70 truncate hidden sm:inline group-focus:opacity-100",t),children:e}),bs={Root:Hr,Autocomplete:Fr,Input:Wr,List:$r,Item:Object.assign(Gr,{Icon:_r,Title:jr,Bio:Ur})};var O=require("react"),qr=w(require("scroll-into-view-if-needed"));var Kt=require("react");var Zt=require("react/jsx-runtime"),As=(0,O.createContext)(null),Ls=(0,O.createContext)(null);function Xr(e){let[t,r]=(0,O.useState)({isOverflowing:!1,isAtBottom:!1});return(0,O.useEffect)(()=>{let o=e.current;if(!o)return;let n=()=>{let c=o.scrollHeight>o.clientHeight,l=o.scrollHeight-o.scrollTop<=o.clientHeight+2;r({isOverflowing:c,isAtBottom:l})};n(),o.addEventListener("scroll",n,{passive:!0}),window.addEventListener("resize",n);let a=new MutationObserver(n);return a.observe(o,{childList:!0,subtree:!0}),()=>{o.removeEventListener("scroll",n),window.removeEventListener("resize",n),a.disconnect()}},[e]),t}var Kr=({children:e,className:t,ref:r,...o})=>{let n=(0,O.useRef)(null);(0,O.useImperativeHandle)(r,()=>n.current);let{isOverflowing:a,isAtBottom:c}=Xr(n);return(0,Zt.jsx)("div",{ref:n,className:s("relative overflow-y-auto boltdocs-otp-content",a&&!c&&"mask-[linear-gradient(to_bottom,black_85%,transparent_100%)]",t),...o,children:e})};Kr.displayName="OnThisPageContent";var Jt=w(require("react-aria-components")),Oe=require("lucide-react");var z=require("react/jsx-runtime"),Zr=({children:e,className:t})=>(0,z.jsx)("nav",{className:s("grid grid-cols-1 sm:grid-cols-2 gap-4 mt-12 pt-8 border-t border-border-subtle",t),children:e}),Jr=({children:e,to:t,direction:r,className:o})=>{let n=r==="next";return(0,z.jsxs)(Jt.Link,{href:t,className:s("flex group items-center p-4 rounded-xl border border-border-subtle bg-bg-surface outline-none","transition-all hover:bg-bg-main hover:border-primary-500 hover:shadow-lg","focus-visible:ring-2 focus-visible:ring-primary-500/30",n?"text-right justify-end":"text-left justify-start",o),children:[!n&&(0,z.jsx)(Oe.ChevronLeft,{className:"mr-3 h-5 w-5 text-text-muted group-hover:text-primary-500 transition-transform group-hover:-translate-x-1"}),(0,z.jsx)("div",{className:"flex flex-col gap-1 flex-1",children:e}),n&&(0,z.jsx)(Oe.ChevronRight,{className:"ml-3 h-5 w-5 text-text-muted group-hover:text-primary-500 transition-transform group-hover:translate-x-1"})]})},Qr=({children:e,className:t})=>(0,z.jsx)("span",{className:s("text-xs font-medium uppercase tracking-wider text-text-muted",t),children:e}),Yr=({children:e,className:t})=>(0,z.jsx)("span",{className:s("text-base font-bold text-text-main truncate",t),children:e}),eo=({children:e})=>(0,z.jsx)(z.Fragment,{children:e}),Ms={PageNavRoot:Zr,PageNavLink:Object.assign(Jr,{Title:Qr,Description:Yr,Icon:eo})};var to=require("react/jsx-runtime");var ro=w(require("react-aria-components")),oo=require("lucide-react");var Qt=require("react/jsx-runtime");var Ze=require("react-aria-components"),no=require("lucide-react");var so=require("react/jsx-runtime");var er=require("react/jsx-runtime"),Yt=({children:e,className:t,vertical:r=!1})=>(0,er.jsx)("div",{className:s("inline-flex",r?"flex-col":"flex-row",!r&&["[&>*:not(:first-child)]:-ml-px","[&>*:first-child]:rounded-r-none","[&>*:last-child]:rounded-l-none","[&>*:not(:first-child):not(:last-child)]:rounded-none",t?.includes("rounded-full")&&["[&>*:first-child]:rounded-l-full","[&>*:last-child]:rounded-r-full"],t?.includes("rounded-xl")&&["[&>*:first-child]:rounded-l-xl","[&>*:last-child]:rounded-r-xl"],t?.includes("rounded-lg")&&["[&>*:first-child]:rounded-l-lg","[&>*:last-child]:rounded-r-lg"]],r&&["[&>*:not(:first-child)]:-mt-px","[&>*:first-child]:rounded-b-none","[&>*:last-child]:rounded-t-none","[&>*:not(:first-child):not(:last-child)]:rounded-none",t?.includes("rounded-full")&&["[&>*:first-child]:rounded-t-full","[&>*:last-child]:rounded-b-full"]],t),children:e});var me=require("lucide-react"),rr=w(require("react")),A=w(require("react-aria-components"));var de=w(require("react-aria-components"));var ce=require("react/jsx-runtime"),tr=({children:e,className:t,showArrow:r,...o})=>(0,ce.jsxs)(de.Popover,{offset:8,...o,className:de.composeRenderProps(t,n=>s("z-50 overflow-auto rounded-xl border border-border-subtle bg-bg-surface/80 shadow-xl backdrop-blur-md outline-none","entering:animate-in entering:fade-in entering:zoom-in-95 exiting:animate-out exiting:fade-out exiting:zoom-out-95 fill-mode-forwards",n)),children:[r&&(0,ce.jsx)(de.OverlayArrow,{className:"group",children:(0,ce.jsx)("svg",{viewBox:"0 0 12 12",className:"block h-3 w-3 fill-bg-surface/80 stroke-border-subtle group-placement-bottom:rotate-180 group-placement-left:-rotate-90 group-placement-right:rotate-90","aria-hidden":"true",children:(0,ce.jsx)("path",{d:"M0 0 L6 6 L12 0"})})}),e]});var I=require("react/jsx-runtime");function qe(e){let[t,r]=rr.default.Children.toArray(e.children).slice(0,2);return(0,I.jsxs)(A.MenuTrigger,{...e,children:[t,(0,I.jsx)(tr,{placement:e.placement,className:"min-w-[200px]",children:r})]})}function Xe(e){return(0,I.jsx)(A.Menu,{...e,className:A.composeRenderProps(e.className,t=>s("p-1.5 outline-none max-h-[inherit] overflow-auto",t))})}function Me(e){let t=e.textValue||(typeof e.children=="string"?e.children:void 0);return(0,I.jsx)(A.MenuItem,{...e,textValue:t,className:A.composeRenderProps(e.className,(r,{isFocused:o,isPressed:n,isDisabled:a})=>s("group relative flex flex-row items-center gap-2.5 px-3 py-1.5 rounded-lg outline-none cursor-default transition-all duration-200","text-text-main text-[0.8125rem]",o&&"bg-primary-500/10 text-primary-600 shadow-sm",n&&"scale-[0.98] bg-primary-500/15",a&&"opacity-40 grayscale pointer-events-none",r)),children:A.composeRenderProps(e.children,(r,{selectionMode:o,isSelected:n,hasSubmenu:a})=>(0,I.jsxs)(I.Fragment,{children:[o!=="none"&&(0,I.jsxs)("span",{className:"flex items-center w-4 h-4 shrink-0 justify-center",children:[n&&o==="multiple"&&(0,I.jsx)(me.Check,{className:"w-3.5 h-3.5 stroke-[2.5px] text-primary-500 animate-in zoom-in-50 duration-200"}),n&&o==="single"&&(0,I.jsx)(me.Dot,{className:"w-6 h-6 text-primary-500 animate-in zoom-in-50 duration-200"})]}),(0,I.jsx)("div",{className:"flex-1 flex flex-row items-center gap-2.5 truncate font-medium",children:r}),a&&(0,I.jsx)(me.ChevronRight,{className:"w-4 h-4 ml-auto text-text-muted group-focused:text-primary-500/70 transition-colors"})]}))})}var Ee=require("react-aria-components");var R=require("react/jsx-runtime"),ao=e=>{let[t,r]=(0,or.useState)(!1);return{copied:t,handleCopy:()=>{navigator.clipboard.writeText(e),r(!0),setTimeout(()=>r(!1),2e3)},handleOpenRaw:()=>{let a=new Blob([e],{type:"text/plain;charset=utf-8"}),c=URL.createObjectURL(a);window.open(c,"_blank")}}};function nr({content:e,mdxRaw:t,config:r}){let o=t||e||"",{copied:n,handleCopy:a,handleOpenRaw:c}=ao(o),l=r!==!1,i=typeof r=="object"&&r.text||"Copy Markdown";return!l||!o?null:(0,R.jsx)("div",{className:"relative inline-flex z-100 flex-shrink-0 w-max translate-y-0 active:translate-y-px transition-transform duration-200",children:(0,R.jsxs)(Yt,{className:"rounded-xl border border-border-subtle bg-bg-surface/40 backdrop-blur-md transition-all duration-300 hover:border-primary-500/50 hover:shadow-lg hover:shadow-primary-500/5 group overflow-hidden",children:[(0,R.jsx)(Q,{variant:"ghost",onPress:a,icon:n?(0,R.jsx)(q.Check,{size:16}):(0,R.jsx)(q.Copy,{size:16}),iconPosition:"left",className:s("px-5 py-2 bg-transparent text-[0.8125rem] font-semibold h-9 border-none shrink-0","text-text-main transition-all duration-300 hover:bg-primary-500/5",n&&"text-emerald-500 hover:bg-emerald-500/5"),children:n?"Copied!":i}),(0,R.jsxs)(qe,{placement:"bottom end",children:[(0,R.jsx)(Q,{variant:"ghost",isIconOnly:!0,icon:(0,R.jsx)(q.ChevronDown,{size:14}),className:s("px-3.5 h-9 border-l border-border-subtle/50 text-text-muted rounded-none bg-transparent shrink-0","transition-all duration-300 hover:bg-primary-500/5 hover:text-primary-500")}),(0,R.jsxs)(Xe,{className:"w-52",children:[(0,R.jsxs)(Me,{onAction:a,className:"flex flex-row items-start gap-2.5 group",children:[(0,R.jsx)(q.Copy,{size:16,className:"w-4 h-4 shrink-0 mt-0.5 transition-transform duration-200 group-hover:-translate-y-0.5 text-text-muted group-hover:text-primary-500"}),(0,R.jsx)("span",{className:"font-medium text-[0.8125rem]",children:"Copy Markdown"})]}),(0,R.jsxs)(Me,{onAction:c,className:"flex flex-row items-start gap-2.5 group",children:[(0,R.jsx)(q.ExternalLink,{size:16,className:"w-4 h-4 shrink-0 mt-0.5 transition-transform duration-200 group-hover:-translate-y-0.5 text-text-muted group-hover:text-primary-500"}),(0,R.jsx)("span",{className:"font-medium text-[0.8125rem]",children:"View as Markdown"})]})]})]})]})})}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x}from"../chunk-URTD6E6S.mjs";import{a as y}from"../chunk-RPUERTVC.mjs";import"../chunk-JD3RSDE4.mjs";import"../chunk-T3W44KWY.mjs";import"../chunk-W2NB4T6V.mjs";import"../chunk-NBCYHLAA.mjs";import"../chunk-JZXLCA2E.mjs";export{i as Admonition,f as Badge,a as Button,h as Card,g as Cards,p as Caution,b as CodeBlock,x as ComponentPreview,w as ComponentProps,y as CopyMarkdown,m as Danger,t as Field,r as FileTree,v as Image,o as Important,n as InfoBox,u as Link,q as List,j as Note,c as Tab,s as Table,d as Tabs,k as Tip,e as Video,l as Warning};
|