boltdocs 1.11.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/LICENSE +21 -0
- package/bin/boltdocs.js +12 -0
- package/dist/cache-Q4T6VAUL.mjs +1 -0
- package/dist/chunk-52MVMZWS.mjs +1 -0
- package/dist/chunk-BVWWKXJH.mjs +1 -0
- package/dist/chunk-DVY3RDXD.mjs +1 -0
- package/dist/chunk-FUVYCYWC.mjs +1 -0
- package/dist/chunk-GBLMDJ2B.mjs +1 -0
- package/dist/chunk-ISPX45DF.mjs +1 -0
- package/dist/chunk-PNXZMUCO.mjs +1 -0
- package/dist/chunk-V2ZHKQSP.mjs +74 -0
- package/dist/client/components/mdx/index.d.mts +208 -0
- package/dist/client/components/mdx/index.d.ts +208 -0
- package/dist/client/components/mdx/index.js +1 -0
- package/dist/client/components/mdx/index.mjs +1 -0
- package/dist/client/hooks/index.d.mts +132 -0
- package/dist/client/hooks/index.d.ts +132 -0
- package/dist/client/hooks/index.js +1 -0
- package/dist/client/hooks/index.mjs +1 -0
- package/dist/client/index.d.mts +210 -0
- package/dist/client/index.d.ts +210 -0
- package/dist/client/index.js +1 -0
- package/dist/client/index.mjs +1 -0
- package/dist/client/ssr.d.mts +78 -0
- package/dist/client/ssr.d.ts +78 -0
- package/dist/client/ssr.js +1 -0
- package/dist/client/ssr.mjs +1 -0
- package/dist/node/cli-entry.d.mts +1 -0
- package/dist/node/cli-entry.d.ts +1 -0
- package/dist/node/cli-entry.js +75 -0
- package/dist/node/cli-entry.mjs +2 -0
- package/dist/node/index.d.mts +298 -0
- package/dist/node/index.d.ts +298 -0
- package/dist/node/index.js +74 -0
- package/dist/node/index.mjs +1 -0
- package/dist/search-dialog-TWGYKF2D.mjs +1 -0
- package/dist/types-Cp21DHI6.d.mts +355 -0
- package/dist/types-Cp21DHI6.d.ts +355 -0
- package/dist/use-routes-8Iei6jTp.d.mts +29 -0
- package/dist/use-routes-xLhumjbV.d.ts +29 -0
- package/package.json +16 -10
- package/src/client/app/index.tsx +9 -6
- package/src/client/components/ui-base/breadcrumbs.tsx +2 -1
- package/src/client/components/ui-base/navbar.tsx +3 -3
- package/src/client/components/ui-base/sidebar.tsx +2 -1
- package/src/client/hooks/use-navbar.ts +1 -1
- package/src/client/types.ts +1 -1
- package/src/node/cli-entry.ts +24 -0
- package/src/node/cli.ts +59 -0
- package/src/node/config.ts +63 -11
- package/src/node/index.ts +39 -3
- package/src/node/plugin/entry.ts +7 -0
- package/src/node/plugin/html.ts +49 -9
- package/src/node/plugin/index.ts +42 -4
- package/src/node/routes/parser.ts +27 -32
- package/src/node/ssg/index.ts +35 -4
- package/src/node/ssg/robots.ts +50 -0
- package/src/node/utils.ts +23 -0
- package/tsup.config.ts +36 -10
|
@@ -0,0 +1,208 @@
|
|
|
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$2 } from 'react-aria-components';
|
|
5
|
+
import { VariantProps } from 'class-variance-authority';
|
|
6
|
+
import { ComponentPropsWithoutRef, ReactNode, ImgHTMLAttributes } from 'react';
|
|
7
|
+
import { C as ComponentRoute, S as SandboxOptions } from '../../../types-Cp21DHI6.js';
|
|
8
|
+
import 'vite';
|
|
9
|
+
|
|
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
|
+
interface CodeBlockProps {
|
|
22
|
+
children?: React.ReactNode;
|
|
23
|
+
className?: string;
|
|
24
|
+
sandbox?: boolean | any;
|
|
25
|
+
hideCopy?: boolean;
|
|
26
|
+
hideSandbox?: boolean;
|
|
27
|
+
title?: string;
|
|
28
|
+
lang?: string;
|
|
29
|
+
highlightedHtml?: string;
|
|
30
|
+
[key: string]: any;
|
|
31
|
+
}
|
|
32
|
+
declare function CodeBlock(props: CodeBlockProps): react_jsx_runtime.JSX.Element;
|
|
33
|
+
|
|
34
|
+
interface VideoProps {
|
|
35
|
+
src?: string;
|
|
36
|
+
poster?: string;
|
|
37
|
+
alt?: string;
|
|
38
|
+
controls?: boolean;
|
|
39
|
+
preload?: string;
|
|
40
|
+
children?: React.ReactNode;
|
|
41
|
+
[key: string]: any;
|
|
42
|
+
}
|
|
43
|
+
declare function Video({ src, poster, alt, children, controls, preload, ...rest }: VideoProps): react_jsx_runtime.JSX.Element;
|
|
44
|
+
|
|
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
|
+
declare const Button: ({ className, variant, size, rounded, iconSize, disabled, ...props }: ButtonProps) => react_jsx_runtime.JSX.Element;
|
|
63
|
+
|
|
64
|
+
interface TabProps {
|
|
65
|
+
label: string;
|
|
66
|
+
icon?: React.ReactNode;
|
|
67
|
+
disabled?: boolean;
|
|
68
|
+
children: React.ReactNode;
|
|
69
|
+
}
|
|
70
|
+
declare function Tab({ children }: TabProps): react_jsx_runtime.JSX.Element;
|
|
71
|
+
interface TabsProps {
|
|
72
|
+
defaultIndex?: number;
|
|
73
|
+
children: React.ReactNode;
|
|
74
|
+
}
|
|
75
|
+
declare function Tabs({ defaultIndex, children }: TabsProps): react_jsx_runtime.JSX.Element;
|
|
76
|
+
|
|
77
|
+
declare const badgeVariants: (props?: ({
|
|
78
|
+
variant?: "default" | "primary" | "danger" | "success" | "warning" | "info" | null | undefined;
|
|
79
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
80
|
+
interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof badgeVariants> {
|
|
81
|
+
children: React.ReactNode;
|
|
82
|
+
}
|
|
83
|
+
declare function Badge({ variant, children, className, ...rest }: BadgeProps): react_jsx_runtime.JSX.Element;
|
|
84
|
+
|
|
85
|
+
declare const cardsVariants: (props?: ({
|
|
86
|
+
cols?: 1 | 2 | 3 | 4 | null | undefined;
|
|
87
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
88
|
+
type CardsVariants = VariantProps<typeof cardsVariants>;
|
|
89
|
+
interface CardsProps extends React.HTMLAttributes<HTMLDivElement>, CardsVariants {
|
|
90
|
+
}
|
|
91
|
+
declare function Cards({ cols, children, className, ...rest }: CardsProps): react_jsx_runtime.JSX.Element;
|
|
92
|
+
interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
93
|
+
title?: string;
|
|
94
|
+
icon?: React.ReactNode;
|
|
95
|
+
href?: string;
|
|
96
|
+
children?: React.ReactNode;
|
|
97
|
+
}
|
|
98
|
+
declare function Card({ title, icon, href, children, className, ...rest }: CardProps): react_jsx_runtime.JSX.Element;
|
|
99
|
+
|
|
100
|
+
declare const admonitionVariants: (props?: ({
|
|
101
|
+
type?: "note" | "danger" | "warning" | "info" | "tip" | "important" | "caution" | null | undefined;
|
|
102
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
103
|
+
type AdmonitionVariants = VariantProps<typeof admonitionVariants>;
|
|
104
|
+
interface AdmonitionProps extends React.HTMLAttributes<HTMLDivElement>, AdmonitionVariants {
|
|
105
|
+
title?: string;
|
|
106
|
+
children: React.ReactNode;
|
|
107
|
+
}
|
|
108
|
+
declare function Admonition({ type, title, children, className, ...rest }: AdmonitionProps): react_jsx_runtime.JSX.Element;
|
|
109
|
+
declare const Note: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
|
|
110
|
+
declare const Tip: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
|
|
111
|
+
declare const Warning: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
|
|
112
|
+
declare const Danger: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
|
|
113
|
+
declare const InfoBox: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
|
|
114
|
+
declare const Important: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
|
|
115
|
+
declare const Caution: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
|
|
116
|
+
|
|
117
|
+
declare const listVariants: (props?: ({
|
|
118
|
+
variant?: "number" | "default" | "checked" | "arrow" | "bubble" | null | undefined;
|
|
119
|
+
cols?: 1 | 2 | 3 | 4 | null | undefined;
|
|
120
|
+
isGrid?: boolean | null | undefined;
|
|
121
|
+
dense?: boolean | null | undefined;
|
|
122
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
123
|
+
type ListVariantProps = VariantProps<typeof listVariants>;
|
|
124
|
+
interface ListProps extends ComponentPropsWithoutRef<'ul'>, Omit<ListVariantProps, 'variant'> {
|
|
125
|
+
variant?: 'checked' | 'arrow' | 'default' | 'bubble' | 'number';
|
|
126
|
+
children: ReactNode;
|
|
127
|
+
}
|
|
128
|
+
declare function List({ variant, cols, dense, children, className, ...props }: ListProps): react_jsx_runtime.JSX.Element;
|
|
129
|
+
|
|
130
|
+
interface FileTreeProps {
|
|
131
|
+
children: React.ReactNode;
|
|
132
|
+
}
|
|
133
|
+
declare function FileTree({ children }: FileTreeProps): react_jsx_runtime.JSX.Element;
|
|
134
|
+
|
|
135
|
+
interface TableProps {
|
|
136
|
+
headers?: string[];
|
|
137
|
+
data?: (string | React.ReactNode)[][];
|
|
138
|
+
children?: React.ReactNode;
|
|
139
|
+
className?: string;
|
|
140
|
+
sortable?: boolean;
|
|
141
|
+
paginated?: boolean;
|
|
142
|
+
pageSize?: number;
|
|
143
|
+
}
|
|
144
|
+
declare function Table({ headers, data, children, className, sortable, paginated, pageSize, }: TableProps): react_jsx_runtime.JSX.Element;
|
|
145
|
+
|
|
146
|
+
interface FieldProps {
|
|
147
|
+
name: string;
|
|
148
|
+
type?: string;
|
|
149
|
+
defaultValue?: string;
|
|
150
|
+
required?: boolean;
|
|
151
|
+
children: React.ReactNode;
|
|
152
|
+
id?: string;
|
|
153
|
+
className?: string;
|
|
154
|
+
}
|
|
155
|
+
declare function Field({ name, type, defaultValue, required, children, id, className, }: FieldProps): react_jsx_runtime.JSX.Element;
|
|
156
|
+
|
|
157
|
+
interface LinkProps$1 extends LinkProps$2 {
|
|
158
|
+
/** Should prefetch the page on hover? Default 'hover' */
|
|
159
|
+
prefetch?: 'hover' | 'none';
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
type LinkProps = LinkProps$1 & {
|
|
163
|
+
to: string;
|
|
164
|
+
children?: React.ReactNode;
|
|
165
|
+
};
|
|
166
|
+
/**
|
|
167
|
+
* A premium Link component for Boltdocs that handles internal and external routing.
|
|
168
|
+
*/
|
|
169
|
+
declare function Link({ to, children, className, ...props }: LinkProps): react_jsx_runtime.JSX.Element;
|
|
170
|
+
|
|
171
|
+
interface ImageProps extends ImgHTMLAttributes<HTMLImageElement> {
|
|
172
|
+
src: string;
|
|
173
|
+
darkSrc?: string;
|
|
174
|
+
theme?: 'light' | 'dark';
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* A themed Image component for Boltdocs.
|
|
178
|
+
* It supports rendering based on the current active theme.
|
|
179
|
+
*/
|
|
180
|
+
declare function Image({ src, alt, theme: imageTheme, ...props }: ImageProps): react_jsx_runtime.JSX.Element | null;
|
|
181
|
+
|
|
182
|
+
interface PropItem {
|
|
183
|
+
name: string;
|
|
184
|
+
type: string;
|
|
185
|
+
defaultValue?: string;
|
|
186
|
+
required?: boolean;
|
|
187
|
+
description: React.ReactNode;
|
|
188
|
+
}
|
|
189
|
+
interface ComponentPropsProps {
|
|
190
|
+
title?: string;
|
|
191
|
+
props: PropItem[];
|
|
192
|
+
className?: string;
|
|
193
|
+
}
|
|
194
|
+
declare function ComponentProps({ title, props, className, }: ComponentPropsProps): react_jsx_runtime.JSX.Element;
|
|
195
|
+
|
|
196
|
+
interface ComponentPreviewProps {
|
|
197
|
+
code?: string;
|
|
198
|
+
highlightedHtml?: string;
|
|
199
|
+
children?: string;
|
|
200
|
+
preview?: React.ReactNode;
|
|
201
|
+
hideCode?: boolean;
|
|
202
|
+
hideSandbox?: boolean;
|
|
203
|
+
hideCopy?: boolean;
|
|
204
|
+
sandboxOptions?: SandboxOptions;
|
|
205
|
+
}
|
|
206
|
+
declare function ComponentPreview(props: ComponentPreviewProps): react_jsx_runtime.JSX.Element;
|
|
207
|
+
|
|
208
|
+
export { Admonition, type AdmonitionProps, Badge, type BadgeProps, Button, type ButtonProps, Card, type CardProps, Cards, type CardsProps, Caution, CodeBlock, ComponentPreview, type ComponentPreviewProps, ComponentProps, type ComponentPropsProps, CopyMarkdown, type CopyMarkdownProps, 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 Yt=Object.create;var ye=Object.defineProperty;var er=Object.getOwnPropertyDescriptor;var tr=Object.getOwnPropertyNames;var rr=Object.getPrototypeOf,or=Object.prototype.hasOwnProperty;var nr=(e,t)=>{for(var r in t)ye(e,r,{get:t[r],enumerable:!0})},Ue=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of tr(t))!or.call(e,n)&&n!==r&&ye(e,n,{get:()=>t[n],enumerable:!(o=er(t,n))||o.enumerable});return e};var w=(e,t,r)=>(r=e!=null?Yt(rr(e)):{},Ue(t||!e||!e.__esModule?ye(r,"default",{value:e,enumerable:!0}):r,e)),sr=e=>Ue(ye({},"__esModule",{value:!0}),e);var Yr={};nr(Yr,{Admonition:()=>j,Badge:()=>lt,Button:()=>Ze,Card:()=>ut,Cards:()=>mt,Caution:()=>Nt,CodeBlock:()=>Y,ComponentPreview:()=>Ft,ComponentProps:()=>zt,CopyMarkdown:()=>Qt,Danger:()=>vt,Field:()=>At,FileTree:()=>wt,Image:()=>Vt,Important:()=>Ct,InfoBox:()=>yt,Link:()=>Mt,List:()=>Rt,Note:()=>xt,Tab:()=>nt,Table:()=>Tt,Tabs:()=>st,Tip:()=>gt,Video:()=>at,Warning:()=>ht});module.exports=sr(Yr);var Ne=w(require("react-aria-components"));var qe=require("clsx"),Xe=require("tailwind-merge");function s(...e){return(0,Xe.twMerge)((0,qe.clsx)(e))}var Ke=require("class-variance-authority"),H=require("react/jsx-runtime"),Ce=(0,Ke.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"}}),Z=({href:e,icon:t,iconPosition:r="left",isIconOnly:o,children:n,className:a,variant:c,size:l,rounded:i,iconSize:d,disabled:p,...m})=>{let f=o||!n&&!!t,x=f?(0,H.jsx)("span",{className:"inline-flex items-center justify-center [&>svg]:w-[1.2rem] [&>svg]:h-[1.2rem]",children:t}):(0,H.jsxs)(H.Fragment,{children:[t&&r==="left"&&(0,H.jsx)("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t}),(0,H.jsx)("span",{className:"flex items-center",children:n}),t&&r==="right"&&(0,H.jsx)("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t})]});return e?(0,H.jsx)(Ne.Link,{href:e,className:s(Ce({variant:c,size:l,rounded:i,iconSize:f?d:void 0,disabled:p}),a),...m,children:x}):(0,H.jsx)(Ne.Button,{className:s(Ce({variant:c,size:l,rounded:i,iconSize:f?d:void 0,disabled:p}),a),...m,children:x})};var Je=require("react/jsx-runtime"),Ze=({className:e,variant:t,size:r,rounded:o,iconSize:n,disabled:a,...c})=>(0,Je.jsx)(Z,{className:s("group",Ce({variant:t,size:r,rounded:o,iconSize:n,disabled:a,className:e})),...c});var Pe=w(require("react-aria-components")),we=require("lucide-react");var Re=require("react"),ar=(0,Re.createContext)(null);function J(){let e=(0,Re.use)(ar);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e}var Se=require("codesandbox/lib/api/define.js");function Qe(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 ir(e){let t=Qe(e),r=(0,Se.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 Ye(e){if(typeof window>"u")return ir(e);let t=Qe(e),r=(0,Se.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 et=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 F=require("react");function tt(e){let{title:t,sandbox:r}=e,[o,n]=(0,F.useState)(!1),[a,c]=(0,F.useState)(!1),[l,i]=(0,F.useState)(!1),d=(0,F.useRef)(null),p=J(),m=(0,F.useCallback)(async()=>{let x=d.current?.textContent??"";et(x),n(!0),setTimeout(()=>n(!1),2e3)},[]),f=(0,F.useCallback)(()=>{let x=d.current?.textContent??"",P=p?.integrations?.sandbox?.config||{},g=typeof r=="object"?r:P,N=g.entry||"src/App.tsx";Ye({title:t??"Code Snippet",...g,files:{...g.files,[N]:{content:x}}})},[t,p,r]);return(0,F.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:m,handleSandbox:f,shouldTruncate:l&&!a}}var pe=require("react/jsx-runtime");function lr(e){let{size:t=20,...r}=e;return{...r,width:t,height:t}}var rt=e=>(0,pe.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...lr(e),children:[(0,pe.jsx)("title",{children:"CodeSandbox"}),(0,pe.jsx)("path",{d:"M0 24h24V0H0v2.455h21.546v19.09H2.454V0H0Z"})]});var Q=w(require("react-aria-components"));var V=require("react/jsx-runtime"),dr=({className:e,children:t,...r})=>(0,V.jsx)(Q.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)(Q.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]})}),Me=({content:e,children:t,delay:r=500,closeDelay:o=0,...n})=>(0,V.jsxs)(Q.TooltipTrigger,{delay:r,closeDelay:o,children:[t,(0,V.jsx)(dr,{...n,children:e})]});var T=require("react/jsx-runtime");function Y(e){let{children:t,sandbox:r,hideSandbox:o=!0,hideCopy:n=!1,highlightedHtml:a,...c}=e,d=!!J()?.integrations?.sandbox?.enable&&!o,{copied:p,isExpanded:m,setIsExpanded:f,isExpandable:x,preRef:P,handleCopy:g,handleSandbox:N,shouldTruncate:K}=tt(e);return(0,T.jsxs)("div",{className:s("group relative my-6 overflow-hidden rounded-lg border border-border-subtle bg-(--color-code-bg)",K&&"[&>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)(Me,{content:"Open in CodeSandbox",children:(0,T.jsx)(Pe.Button,{onPress:N,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)(rt,{size:20})})}),!n&&(0,T.jsx)(Me,{content:p?"Copied!":"Copy code",children:(0,T.jsx)(Pe.Button,{onPress:g,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",p?"text-emerald-400":"text-text-muted hover:text-text-main"),"aria-label":"Copy code",children:p?(0,T.jsx)(we.Check,{size:20}):(0,T.jsx)(we.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(K?"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)(Pe.Button,{onPress:()=>f(!m),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:m?"Show less":"Expand code"})})]})}var ee=require("react"),q=w(require("react-aria-components"));var _=require("react");function ot({initialIndex:e=0,tabs:t}){let r=t[e]?.props.disabled?t.findIndex(d=>!d.props.disabled):e,[o,n]=(0,_.useState)(r===-1?0:r),a=(0,_.useRef)([]),[c,l]=(0,_.useState)({opacity:0,transform:"translateX(0)",width:0});(0,_.useEffect)(()=>{let d=a.current[o];d&&l({opacity:1,width:d.offsetWidth,transform:`translateX(${d.offsetLeft}px)`})},[o,t]);let i=(0,_.useCallback)(d=>{let p=0;if(d.key==="ArrowRight"?p=1:d.key==="ArrowLeft"&&(p=-1),p!==0){let m=(o+p+t.length)%t.length;for(;t[m].props.disabled&&m!==o;)m=(m+p+t.length)%t.length;m!==o&&!t[m].props.disabled&&(n(m),a.current[m]?.focus())}},[o,t]);return{active:o,setActive:n,tabRefs:a,indicatorStyle:c,handleKeyDown:i}}var Ee=require("class-variance-authority"),L=require("react/jsx-runtime"),pr=(0,Ee.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"}}),mr=(0,Ee.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 nt({children:e}){let t=typeof e=="string"?(0,L.jsx)(Y,{className:"language-bash",children:(0,L.jsx)("code",{children:e.trim()})}):e;return(0,L.jsx)("div",{className:"py-4",children:t})}function st({defaultIndex:e=0,children:t}){let r=(0,ee.useMemo)(()=>ee.Children.toArray(t).filter(l=>(0,ee.isValidElement)(l)&&l.props?.label),[t]),{active:o,setActive:n,tabRefs:a,indicatorStyle:c}=ot({initialIndex:e,tabs:r});return(0,L.jsx)("div",{className:"my-8 w-full group/tabs",children:(0,L.jsxs)(q.Tabs,{selectedKey:o.toString(),onSelectionChange:l=>n(Number(l)),className:"w-full",children:[(0,L.jsxs)(q.TabList,{"aria-label":"Content Tabs",className:s(pr()),children:[r.map((l,i)=>{let{label:d,icon:p,disabled:m}=l.props,f=i.toString();return(0,L.jsxs)(q.Tab,{id:f,isDisabled:m,ref:x=>{a.current[i]=x},className:({isSelected:x,isDisabled:P})=>s(mr({isActive:x,isDisabled:P})),children:[!!p&&(0,L.jsx)("span",{className:"shrink-0 [&>svg]:w-4 [&>svg]:h-4",children:p}),(0,L.jsx)("span",{children:d})]},f)}),(0,L.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,L.jsx)(q.TabPanel,{id:i.toString(),children:r[i]},i))]})})}var te=require("react"),me=require("react/jsx-runtime");function at({src:e,poster:t,alt:r,children:o,controls:n,preload:a="metadata",...c}){let l=(0,te.useRef)(null),[i,d]=(0,te.useState)(!1);return(0,te.useEffect)(()=>{let p=l.current;if(!p)return;let m=new IntersectionObserver(([f])=>{f.isIntersecting&&(d(!0),m.disconnect())},{rootMargin:"200px"});return m.observe(p),()=>m.disconnect()},[]),(0,me.jsx)("div",{ref:l,className:"my-6 overflow-hidden rounded-lg border border-border-subtle",children:i?(0,me.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,me.jsx)("div",{className:"aspect-video bg-bg-surface animate-pulse",role:"img","aria-label":r||"Video"})})}var it=require("class-variance-authority"),ct=require("react/jsx-runtime"),ur=(0,it.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 lt({variant:e="default",children:t,className:r="",...o}){return(0,ct.jsx)("span",{className:s(ur({variant:e}),r),...o,children:t})}var ue=require("react"),dt=w(require("react-aria-components"));var pt=require("class-variance-authority"),S=require("react/jsx-runtime"),fr=(0,pt.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 mt({cols:e=3,children:t,className:r="",...o}){return(0,S.jsx)("div",{className:s(fr({cols:e}),r),...o,children:t})}function ut({title:e,icon:t,href:r,children:o,className:n="",...a}){let c=(0,ue.useRef)(null),l=(0,ue.useRef)(null),i=(0,ue.useCallback)(m=>{let f=c.current||l.current;if(!f)return;let{left:x,top:P}=f.getBoundingClientRect();f.style.setProperty("--x",`${m.clientX-x}px`),f.style.setProperty("--y",`${m.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})]})]}),p=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)(dt.Link,{ref:l,href:r,className:s(p,"no-underline cursor-pointer"),onMouseMove:i,...a,children:d}):(0,S.jsx)("div",{ref:c,role:"presentation",className:p,onMouseMove:i,...a,children:d})}var I=require("lucide-react");var bt=require("class-variance-authority"),y=require("react/jsx-runtime"),br={note:(0,y.jsx)(I.Bookmark,{size:18}),tip:(0,y.jsx)(I.Lightbulb,{size:18}),info:(0,y.jsx)(I.Info,{size:18}),warning:(0,y.jsx)(I.AlertTriangle,{size:18}),danger:(0,y.jsx)(I.ShieldAlert,{size:18}),important:(0,y.jsx)(I.Flame,{size:18}),caution:(0,y.jsx)(I.Zap,{size:18})},xr={note:"Note",tip:"Tip",info:"Info",warning:"Warning",danger:"Danger",important:"Important",caution:"Caution"},ft=(0,bt.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 j({type:e="note",title:t,children:r,className:o="",...n}){return(0,y.jsxs)("div",{className:s(ft({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",ft({type:e})),children:br[e]}),(0,y.jsx)("span",{className:"text-sm font-bold tracking-tight text-text-main",children:t||xr[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 xt=e=>(0,y.jsx)(j,{type:"note",...e}),gt=e=>(0,y.jsx)(j,{type:"tip",...e}),ht=e=>(0,y.jsx)(j,{type:"warning",...e}),vt=e=>(0,y.jsx)(j,{type:"danger",...e}),yt=e=>(0,y.jsx)(j,{type:"info",...e}),Ct=e=>(0,y.jsx)(j,{type:"important",...e}),Nt=e=>(0,y.jsx)(j,{type:"caution",...e});var ke=require("react"),re=require("lucide-react");var Te=require("class-variance-authority"),W=require("react/jsx-runtime"),gr=(0,Te.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}}),hr=(0,Te.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}}),vr=(0,Te.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 yr({icon:e,children:t,variant:r,dense:o}){return(0,W.jsxs)("li",{className:s(hr({variant:r,dense:o})),children:[e&&(0,W.jsx)("span",{className:s(vr({variant:r==="bubble"?"bubble":"default"})),children:e}),(0,W.jsx)("div",{className:"flex-1 text-text-muted group-hover:text-text-main transition-colors",children:t})]})}var Cr={checked:e=>(0,W.jsx)(re.Check,{size:14,className:s("text-emerald-500 shrink-0",e)}),arrow:e=>(0,W.jsx)(re.ChevronRight,{size:14,className:s("text-primary-400 shrink-0",e)}),bubble:e=>(0,W.jsx)(re.Circle,{size:6,fill:"currentColor",className:s("text-primary-500 shrink-0",e)}),default:()=>null,number:()=>null};function Rt({variant:e="default",cols:t=1,dense:r=!1,children:o,className:n,...a}){let c=t!==void 0&&Number(t)>1,l=Cr[e],i=gr({variant:e,cols:t,dense:r,isGrid:c,className:n}),d=e==="number"?"ol":"ul";return e==="default"||e==="number"?(0,W.jsx)(d,{className:i,...a,children:o}):(0,W.jsx)("ul",{className:i,...a,children:ke.Children.map(o,p=>{if(!(0,ke.isValidElement)(p))return p;let m=p,f=m.type==="li"?m.props.children:m.props.children||p;return(0,W.jsx)(yr,{icon:l(),variant:e,dense:r,children:f})})})}var $=require("react"),G=w(require("react-aria-components")),D=require("lucide-react");var C=require("react/jsx-runtime"),fe=16,be=2,Oe={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 De(e){return typeof e=="string"?e:typeof e=="number"?e.toString():Array.isArray(e)?e.map(De).join(""):(0,$.isValidElement)(e)&&e.props&&typeof e.props=="object"&&"children"in e.props?De(e.props.children):""}function Nr(e,t){let r=e.toLowerCase(),o="shrink-0 transition-colors duration-200";if(t)return(0,C.jsx)(D.Folder,{size:fe,strokeWidth:be,className:s(o,"text-primary-400"),fill:"currentColor",fillOpacity:.15});let n=s(o,"text-text-dim group-hover:text-text-main");return Oe.CODE.test(r)?(0,C.jsx)(D.FileCode,{size:fe,strokeWidth:be,className:n}):Oe.TEXT.test(r)?(0,C.jsx)(D.FileText,{size:fe,strokeWidth:be,className:n}):Oe.IMAGE.test(r)?(0,C.jsx)(D.FileImage,{size:fe,strokeWidth:be,className:n}):(0,C.jsx)(D.File,{size:fe,strokeWidth:be,className:n})}function Ve(e,t){if(!(0,$.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 Rr(e){let t=e.match(/\s+(\/\/|#)\s+(.*)$/);return t?{name:e.slice(0,t.index).trim(),comment:t[2]}:{name:e.trim()}}function Ae(e,t="root"){if(!(0,$.isValidElement)(e))return[];let r=[];if(Ve(e,"ul"))return $.Children.forEach(e.props.children,(o,n)=>{r.push(...Ae(o,`${t}-${n}`))}),r;if(Ve(e,"li")){let o=$.Children.toArray(e.props.children),n=o.findIndex(P=>Ve(P,"ul")),a=n!==-1,c=a?o.slice(0,n):o,l=a?o.slice(n):[],i=De(c),{name:d,comment:p}=Rr(i),m=d.endsWith("/"),f=m?d.slice(0,-1):d,x=a||m;return r.push({id:`${t}-${f}`,name:f,comment:p,isFolder:x,children:a?Ae(l[0],`${t}-${f}`):void 0}),r}return e.props&&typeof e.props=="object"&&"children"in e.props&&$.Children.forEach(e.props.children,(o,n)=>{r.push(...Ae(o,`${t}-${n}`))}),r}function Pt({item:e}){return(0,C.jsxs)(G.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)(G.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)(G.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]"}),Nr(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)(G.Collection,{items:e.children,children:t=>(0,C.jsx)(Pt,{item:t})})]})}function wt({children:e}){let t=(0,$.useMemo)(()=>Ae(e),[e]);return(0,C.jsx)("div",{className:"my-8",children:(0,C.jsx)(G.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)(Pt,{item:r})})})}var xe=w(require("react-aria-components"));var oe=require("react");function kt({data:e,sortable:t=!1,paginated:r=!1,pageSize:o=10}){let[n,a]=(0,oe.useState)(null),[c,l]=(0,oe.useState)(1),i=(0,oe.useMemo)(()=>{if(!e)return[];let f=[...e];return t&&n!==null&&f.sort((x,P)=>{let g=x[n.key],N=P[n.key],K=typeof g=="string"?g:"",ve=typeof N=="string"?N:"";return K<ve?n.direction==="asc"?-1:1:K>ve?n.direction==="asc"?1:-1:0}),f},[e,n,t]),d=Math.ceil(i.length/o),p=(0,oe.useMemo)(()=>{if(!r)return i;let f=(c-1)*o;return i.slice(f,f+o)},[i,r,c,o]);return{sortConfig:n,currentPage:c,setCurrentPage:l,totalPages:d,paginatedData:p,requestSort:f=>{if(!t)return;let x="asc";n&&n.key===f&&n.direction==="asc"&&(x="desc"),a({key:f,direction:x})}}}var M=require("lucide-react");var b=require("react/jsx-runtime");function Tt({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:p,paginatedData:m,requestSort:f}=kt({data:t,sortable:n,paginated:a,pageSize:c}),x=g=>n?l?.key!==g?(0,b.jsx)(M.ChevronDown,{size:14,className:"ml-1 opacity-30"}):l.direction==="asc"?(0,b.jsx)(M.ChevronUp,{size:14,className:"ml-1 text-primary-400"}):(0,b.jsx)(M.ChevronDown,{size:14,className:"ml-1 text-primary-400"}):null,P=r||(0,b.jsxs)(b.Fragment,{children:[e&&(0,b.jsx)("thead",{children:(0,b.jsx)("tr",{children:e.map((g,N)=>(0,b.jsx)("th",{onClick:()=>f(N),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,b.jsxs)("div",{className:"flex items-center",children:[g,x(N)]})},N))})}),m&&(0,b.jsx)("tbody",{children:m.map((g,N)=>(0,b.jsx)("tr",{className:"transition-colors hover:bg-bg-surface",children:g.map((K,ve)=>(0,b.jsx)("td",{className:"px-3 py-2 border-b border-border-subtle text-sm text-text-muted",children:K},ve))},N))})]});return(0,b.jsxs)("div",{className:s("my-6 rounded-lg border border-border-subtle overflow-hidden",o),children:[(0,b.jsx)("div",{className:"overflow-x-auto",children:(0,b.jsx)("table",{className:"w-full border-collapse text-sm",children:P})}),a&&p>1&&(0,b.jsxs)("div",{className:"flex items-center justify-between border-t border-border-subtle px-4 py-3",children:[(0,b.jsxs)("span",{className:"text-xs text-text-muted",children:["Page ",i," of ",p]}),(0,b.jsxs)("div",{className:"flex items-center gap-1",children:[(0,b.jsx)(xe.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,b.jsx)(M.ChevronsLeft,{size:16})}),(0,b.jsx)(xe.Button,{onPress:()=>d(g=>Math.max(g-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,b.jsx)(M.ChevronLeft,{size:16})}),(0,b.jsx)(xe.Button,{onPress:()=>d(g=>Math.min(g+1,p)),isDisabled:i===p,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,b.jsx)(M.ChevronRight,{size:16})}),(0,b.jsx)(xe.Button,{onPress:()=>d(p),isDisabled:i===p,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,b.jsx)(M.ChevronsRight,{size:16})})]})]})]})}var E=require("react/jsx-runtime");function At({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 He=w(require("react")),Lt=require("react-aria-components"),St=require("react-router-dom");var It=require("react-router-dom");function ze(e){let t=(0,It.useLocation)(),r=J();if(!r||typeof e!="string"||!r.i18n&&!r.versions)return e;let o="/docs";if(!e.startsWith(o))return e;let a=t.pathname.substring(o.length).split("/").filter(Boolean),c=r.versions?.defaultVersion,l=r.i18n?.defaultLocale,i=0;r.versions&&a.length>i&&r.versions.versions[a[i]]&&(c=a[i],i++),r.i18n&&a.length>i&&r.i18n.locales[a[i]]&&(l=a[i]);let p=e.substring(o.length).split("/").filter(Boolean),m=0,f=!1,x=!1;r.versions&&p.length>m&&r.versions.versions[p[m]]&&(f=!0,m++),r.i18n&&p.length>m&&r.i18n.locales[p[m]]&&(x=!0,m++);let P=p.slice(m),g=[];r.versions&&(f?g.push(p[0]):c&&g.push(c)),r.i18n&&(x?g.push(p[f?1:0]):l&&g.push(l)),g.push(...P);let N=`${o}/${g.join("/")}`;return N.endsWith("/")&&(N=N.slice(0,-1)),N===o?o:N}var ne=require("react"),wr=require("react/jsx-runtime"),Pr=(0,ne.createContext)({preload:()=>{},routes:[]});function Bt(){return(0,ne.use)(Pr)}var Fe=require("react/jsx-runtime"),se=He.default.forwardRef((e,t)=>{let{href:r,prefetch:o="hover",onMouseEnter:n,onFocus:a,...c}=e,l=ze(r??""),{preload:i}=Bt();return(0,Fe.jsx)(Lt.Link,{...c,ref:t,href:l,onMouseEnter:m=>{n?.(m),o==="hover"&&typeof l=="string"&&l.startsWith("/")&&i(l)},onFocus:m=>{a?.(m),o==="hover"&&typeof l=="string"&&l.startsWith("/")&&i(l)}})});se.displayName="Link";var kr=He.default.forwardRef((e,t)=>{let{href:r,end:o=!1,className:n,children:a,...c}=e,l=(0,St.useLocation)(),i=ze(r??""),d=o?l.pathname===i:l.pathname.startsWith(i),p=typeof n=="function"?n({isActive:d}):s(n,d&&"active"),m=typeof a=="function"?a({isActive:d}):a;return(0,Fe.jsx)(se,{...c,ref:t,href:r,className:p,children:m})});kr.displayName="NavLink";var Et=require("react/jsx-runtime");function Mt({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,Et.jsx)(se,{href:e,className:a,target:n?"_blank":void 0,rel:n?"noopener noreferrer":void 0,...o,children:t})}var ae=require("react"),Ar=require("react/jsx-runtime"),Tr=(0,ae.createContext)(void 0);function Ot(){let e=(0,ae.use)(Tr);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e}var Dt=require("react/jsx-runtime");function Vt({src:e,alt:t,theme:r,...o}){let{theme:n}=Ot();return r&&r!==n?null:(0,Dt.jsx)("img",{src:e,alt:t||"",...o})}var v=require("react/jsx-runtime");function zt({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 We=require("react");function Ht(e){let{code:t,children:r,preview:o}=e,n=(0,We.useMemo)(()=>(t??(typeof r=="string"?r:"")).trim(),[t,r]),a=(0,We.useMemo)(()=>o??(typeof r!="string"?r:null),[o,r]);return{initialCode:n,previewElement:a}}var ie=require("react/jsx-runtime");function Ft(e){let{highlightedHtml:t,hideCode:r=!1,hideSandbox:o=!1,hideCopy:n=!1,sandboxOptions:a={}}=e,{initialCode:c,previewElement:l}=Ht(e);return(0,ie.jsxs)("div",{className:"my-6 overflow-hidden rounded-xl border border-border-subtle",children:[(0,ie.jsx)("div",{className:"flex items-center justify-center p-8 bg-bg-surface",children:l}),!r&&(0,ie.jsx)("div",{className:"border-t border-border-subtle",children:(0,ie.jsx)(Y,{hideSandbox:o,hideCopy:n,title:a.title,lang:"tsx",highlightedHtml:t,children:c})})]})}var Jt=require("react"),U=require("lucide-react");var Wt=require("react");var Ir=require("react-aria-components"),ge=require("lucide-react");var $t=require("react/jsx-runtime");var he=w(require("react-aria-components")),Br=require("lucide-react");var _e=require("react/jsx-runtime");var k=w(require("react-aria-components")),X=require("lucide-react");var h=require("react/jsx-runtime"),Lr=({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})})}),Sr=({children:e,className:t,...r})=>(0,h.jsx)("div",{className:t,children:(0,h.jsx)(k.Autocomplete,{...r,className:"flex flex-col min-h-0",children:e})}),Mr=({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)(X.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"})})]}),Er=({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}),Or=({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)(X.CornerDownLeft,{size:10})]})]})}),Vr=({isHeading:e,className:t})=>(0,h.jsx)("div",{className:s("shrink-0",t),children:e?(0,h.jsx)(X.Hash,{size:18}):(0,h.jsx)(X.FileText,{size:18})}),Dr=({children:e,className:t})=>(0,h.jsx)("span",{className:s("block font-medium truncate flex-1 text-sm",t),children:e}),zr=({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}),Qn={Root:Lr,Autocomplete:Sr,Input:Mr,List:Er,Item:Object.assign(Or,{Icon:Vr,Title:Dr,Bio:zr})};var O=require("react"),Hr=w(require("scroll-into-view-if-needed"));var Gt=require("react");var _t=require("react/jsx-runtime"),ps=(0,O.createContext)(null),ms=(0,O.createContext)(null);function Fr(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 Wr=({children:e,className:t,ref:r,...o})=>{let n=(0,O.useRef)(null);(0,O.useImperativeHandle)(r,()=>n.current);let{isOverflowing:a,isAtBottom:c}=Fr(n);return(0,_t.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})};Wr.displayName="OnThisPageContent";var jt=w(require("react-aria-components")),Le=require("lucide-react");var z=require("react/jsx-runtime"),$r=({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}),Gr=({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)(Le.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)(Le.ChevronRight,{className:"ml-3 h-5 w-5 text-text-muted group-hover:text-primary-500 transition-transform group-hover:translate-x-1"})]})},_r=({children:e,className:t})=>(0,z.jsx)("span",{className:s("text-xs font-medium uppercase tracking-wider text-text-muted",t),children:e}),jr=({children:e,className:t})=>(0,z.jsx)("span",{className:s("text-base font-bold text-text-main truncate",t),children:e}),Ur=({children:e})=>(0,z.jsx)(z.Fragment,{children:e}),xs={PageNavRoot:$r,PageNavLink:Object.assign(Gr,{Title:_r,Description:jr,Icon:Ur})};var qr=require("react/jsx-runtime");var Xr=w(require("react-aria-components")),Kr=require("lucide-react");var Ut=require("react/jsx-runtime");var je=require("react-aria-components"),Zr=require("lucide-react");var Jr=require("react/jsx-runtime");var Xt=require("react/jsx-runtime"),qt=({children:e,className:t,vertical:r=!1})=>(0,Xt.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 de=require("lucide-react"),Zt=w(require("react")),A=w(require("react-aria-components"));var ce=w(require("react-aria-components"));var le=require("react/jsx-runtime"),Kt=({children:e,className:t,showArrow:r,...o})=>(0,le.jsxs)(ce.Popover,{offset:8,...o,className:ce.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,le.jsx)(ce.OverlayArrow,{className:"group",children:(0,le.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,le.jsx)("path",{d:"M0 0 L6 6 L12 0"})})}),e]});var B=require("react/jsx-runtime");function $e(e){let[t,r]=Zt.default.Children.toArray(e.children).slice(0,2);return(0,B.jsxs)(A.MenuTrigger,{...e,children:[t,(0,B.jsx)(Kt,{placement:e.placement,className:"min-w-[200px]",children:r})]})}function Ge(e){return(0,B.jsx)(A.Menu,{...e,className:A.composeRenderProps(e.className,t=>s("p-1.5 outline-none max-h-[inherit] overflow-auto",t))})}function Ie(e){let t=e.textValue||(typeof e.children=="string"?e.children:void 0);return(0,B.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,B.jsxs)(B.Fragment,{children:[o!=="none"&&(0,B.jsxs)("span",{className:"flex items-center w-4 h-4 shrink-0 justify-center",children:[n&&o==="multiple"&&(0,B.jsx)(de.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,B.jsx)(de.Dot,{className:"w-6 h-6 text-primary-500 animate-in zoom-in-50 duration-200"})]}),(0,B.jsx)("div",{className:"flex-1 flex flex-row items-center gap-2.5 truncate font-medium",children:r}),a&&(0,B.jsx)(de.ChevronRight,{className:"w-4 h-4 ml-auto text-text-muted group-focused:text-primary-500/70 transition-colors"})]}))})}var Be=require("react-aria-components");var R=require("react/jsx-runtime"),Qr=e=>{let[t,r]=(0,Jt.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 Qt({content:e,mdxRaw:t,config:r}){let o=t||e||"",{copied:n,handleCopy:a,handleOpenRaw:c}=Qr(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)(qt,{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)(Z,{variant:"ghost",onPress:a,icon:n?(0,R.jsx)(U.Check,{size:16}):(0,R.jsx)(U.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)($e,{placement:"bottom end",children:[(0,R.jsx)(Z,{variant:"ghost",isIconOnly:!0,icon:(0,R.jsx)(U.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)(Ge,{className:"w-52",children:[(0,R.jsxs)(Ie,{onAction:a,className:"flex flex-row items-start gap-2.5 group",children:[(0,R.jsx)(U.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)(Ie,{onAction:c,className:"flex flex-row items-start gap-2.5 group",children:[(0,R.jsx)(U.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 as x,B as y,a,e as b,f as c,g as d,h as e,i as f,j as g,k as h,l as i,m as j,n as k,o as l,p as m,q as n,r as o,s as p,t as q,u as r,v as s,w as t,x as u,y as v,z as w}from"../../../chunk-FUVYCYWC.mjs";import"../../../chunk-GBLMDJ2B.mjs";import"../../../chunk-BVWWKXJH.mjs";import"../../../chunk-52MVMZWS.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};
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { N as NavbarLink, a as BoltdocsSocialLink, B as BoltdocsConfig, C as ComponentRoute, b as BoltdocsTab } from '../../types-Cp21DHI6.mjs';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export { u as useRoutes } from '../../use-routes-8Iei6jTp.mjs';
|
|
4
|
+
import * as react_router_dom from 'react-router-dom';
|
|
5
|
+
import { LinkProps } from 'react-router-dom';
|
|
6
|
+
import 'vite';
|
|
7
|
+
|
|
8
|
+
declare function useNavbar(): {
|
|
9
|
+
links: NavbarLink[];
|
|
10
|
+
title: string;
|
|
11
|
+
logo: any;
|
|
12
|
+
logoProps: {
|
|
13
|
+
alt: any;
|
|
14
|
+
width: any;
|
|
15
|
+
height: any;
|
|
16
|
+
};
|
|
17
|
+
github: string | null;
|
|
18
|
+
social: BoltdocsSocialLink[];
|
|
19
|
+
config: BoltdocsConfig;
|
|
20
|
+
theme: "light" | "dark";
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
declare function useSidebar(routes: ComponentRoute[]): {
|
|
24
|
+
groups: {
|
|
25
|
+
slug: string;
|
|
26
|
+
title: string;
|
|
27
|
+
routes: ComponentRoute[];
|
|
28
|
+
icon?: string;
|
|
29
|
+
}[];
|
|
30
|
+
ungrouped: ComponentRoute[];
|
|
31
|
+
activeRoute: ComponentRoute | undefined;
|
|
32
|
+
activePath: string;
|
|
33
|
+
config: BoltdocsConfig;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
declare function useSearch(routes: ComponentRoute[]): {
|
|
37
|
+
isOpen: boolean;
|
|
38
|
+
setIsOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
39
|
+
query: string;
|
|
40
|
+
setQuery: React.Dispatch<React.SetStateAction<string>>;
|
|
41
|
+
list: any[];
|
|
42
|
+
input: {
|
|
43
|
+
value: string;
|
|
44
|
+
onChange: (e: any) => void;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
interface Heading {
|
|
49
|
+
id: string;
|
|
50
|
+
text: string;
|
|
51
|
+
level: number;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Hook to manage and provide current page headings for the OnThisPage component.
|
|
55
|
+
*/
|
|
56
|
+
declare function useOnThisPage(headings?: Heading[]): {
|
|
57
|
+
headings: Heading[];
|
|
58
|
+
activeId: string | null;
|
|
59
|
+
setActiveId: React.Dispatch<React.SetStateAction<string | null>>;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
declare function useTabs(tabs?: BoltdocsTab[], routes?: ComponentRoute[]): {
|
|
63
|
+
tabs: BoltdocsTab[];
|
|
64
|
+
activeIndex: number;
|
|
65
|
+
indicatorStyle: React.CSSProperties;
|
|
66
|
+
tabRefs: React.RefObject<(HTMLAnchorElement | null)[]>;
|
|
67
|
+
activeTabId: string | undefined;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
interface VersionOption {
|
|
71
|
+
key: string;
|
|
72
|
+
label: string;
|
|
73
|
+
value: string;
|
|
74
|
+
isCurrent: boolean;
|
|
75
|
+
}
|
|
76
|
+
interface UseVersionReturn {
|
|
77
|
+
currentVersion: string | undefined;
|
|
78
|
+
currentVersionLabel: string | undefined;
|
|
79
|
+
availableVersions: VersionOption[];
|
|
80
|
+
handleVersionChange: (version: string) => void;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Hook to manage and switch between different versions of the documentation.
|
|
84
|
+
*/
|
|
85
|
+
declare function useVersion(): UseVersionReturn;
|
|
86
|
+
|
|
87
|
+
interface LocaleOption {
|
|
88
|
+
key: string;
|
|
89
|
+
label: string;
|
|
90
|
+
value: string;
|
|
91
|
+
isCurrent: boolean;
|
|
92
|
+
}
|
|
93
|
+
interface UseI18nReturn {
|
|
94
|
+
currentLocale: string | undefined;
|
|
95
|
+
currentLocaleLabel: string | undefined;
|
|
96
|
+
availableLocales: LocaleOption[];
|
|
97
|
+
handleLocaleChange: (locale: string) => void;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Hook to manage and switch between different locales (languages) of the documentation.
|
|
101
|
+
*/
|
|
102
|
+
declare function useI18n(): UseI18nReturn;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Hook to manage the previous and next button functionality for documentation pages.
|
|
106
|
+
*/
|
|
107
|
+
declare function usePageNav(): {
|
|
108
|
+
prevPage: ComponentRoute | null;
|
|
109
|
+
nextPage: ComponentRoute | null;
|
|
110
|
+
currentRoute: ComponentRoute;
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Hook to generate breadcrumbs based on the current active route.
|
|
115
|
+
*/
|
|
116
|
+
declare function useBreadcrumbs(): {
|
|
117
|
+
crumbs: {
|
|
118
|
+
label: string;
|
|
119
|
+
href?: string;
|
|
120
|
+
}[];
|
|
121
|
+
activeRoute: ComponentRoute | undefined;
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Hook to automatically localize a path based on the current version and locale context.
|
|
126
|
+
* It ensures that navigation within the /docs path preserves the active version and language.
|
|
127
|
+
*/
|
|
128
|
+
declare function useLocalizedTo(to: LinkProps['to']): react_router_dom.To;
|
|
129
|
+
|
|
130
|
+
declare const useLocation: () => react_router_dom.Location<any>;
|
|
131
|
+
|
|
132
|
+
export { type LocaleOption, type UseI18nReturn, type UseVersionReturn, type VersionOption, useBreadcrumbs, useI18n, useLocalizedTo, useLocation, useNavbar, useOnThisPage, usePageNav, useSearch, useSidebar, useTabs, useVersion };
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { N as NavbarLink, a as BoltdocsSocialLink, B as BoltdocsConfig, C as ComponentRoute, b as BoltdocsTab } from '../../types-Cp21DHI6.js';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export { u as useRoutes } from '../../use-routes-xLhumjbV.js';
|
|
4
|
+
import * as react_router_dom from 'react-router-dom';
|
|
5
|
+
import { LinkProps } from 'react-router-dom';
|
|
6
|
+
import 'vite';
|
|
7
|
+
|
|
8
|
+
declare function useNavbar(): {
|
|
9
|
+
links: NavbarLink[];
|
|
10
|
+
title: string;
|
|
11
|
+
logo: any;
|
|
12
|
+
logoProps: {
|
|
13
|
+
alt: any;
|
|
14
|
+
width: any;
|
|
15
|
+
height: any;
|
|
16
|
+
};
|
|
17
|
+
github: string | null;
|
|
18
|
+
social: BoltdocsSocialLink[];
|
|
19
|
+
config: BoltdocsConfig;
|
|
20
|
+
theme: "light" | "dark";
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
declare function useSidebar(routes: ComponentRoute[]): {
|
|
24
|
+
groups: {
|
|
25
|
+
slug: string;
|
|
26
|
+
title: string;
|
|
27
|
+
routes: ComponentRoute[];
|
|
28
|
+
icon?: string;
|
|
29
|
+
}[];
|
|
30
|
+
ungrouped: ComponentRoute[];
|
|
31
|
+
activeRoute: ComponentRoute | undefined;
|
|
32
|
+
activePath: string;
|
|
33
|
+
config: BoltdocsConfig;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
declare function useSearch(routes: ComponentRoute[]): {
|
|
37
|
+
isOpen: boolean;
|
|
38
|
+
setIsOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
39
|
+
query: string;
|
|
40
|
+
setQuery: React.Dispatch<React.SetStateAction<string>>;
|
|
41
|
+
list: any[];
|
|
42
|
+
input: {
|
|
43
|
+
value: string;
|
|
44
|
+
onChange: (e: any) => void;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
interface Heading {
|
|
49
|
+
id: string;
|
|
50
|
+
text: string;
|
|
51
|
+
level: number;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Hook to manage and provide current page headings for the OnThisPage component.
|
|
55
|
+
*/
|
|
56
|
+
declare function useOnThisPage(headings?: Heading[]): {
|
|
57
|
+
headings: Heading[];
|
|
58
|
+
activeId: string | null;
|
|
59
|
+
setActiveId: React.Dispatch<React.SetStateAction<string | null>>;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
declare function useTabs(tabs?: BoltdocsTab[], routes?: ComponentRoute[]): {
|
|
63
|
+
tabs: BoltdocsTab[];
|
|
64
|
+
activeIndex: number;
|
|
65
|
+
indicatorStyle: React.CSSProperties;
|
|
66
|
+
tabRefs: React.RefObject<(HTMLAnchorElement | null)[]>;
|
|
67
|
+
activeTabId: string | undefined;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
interface VersionOption {
|
|
71
|
+
key: string;
|
|
72
|
+
label: string;
|
|
73
|
+
value: string;
|
|
74
|
+
isCurrent: boolean;
|
|
75
|
+
}
|
|
76
|
+
interface UseVersionReturn {
|
|
77
|
+
currentVersion: string | undefined;
|
|
78
|
+
currentVersionLabel: string | undefined;
|
|
79
|
+
availableVersions: VersionOption[];
|
|
80
|
+
handleVersionChange: (version: string) => void;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Hook to manage and switch between different versions of the documentation.
|
|
84
|
+
*/
|
|
85
|
+
declare function useVersion(): UseVersionReturn;
|
|
86
|
+
|
|
87
|
+
interface LocaleOption {
|
|
88
|
+
key: string;
|
|
89
|
+
label: string;
|
|
90
|
+
value: string;
|
|
91
|
+
isCurrent: boolean;
|
|
92
|
+
}
|
|
93
|
+
interface UseI18nReturn {
|
|
94
|
+
currentLocale: string | undefined;
|
|
95
|
+
currentLocaleLabel: string | undefined;
|
|
96
|
+
availableLocales: LocaleOption[];
|
|
97
|
+
handleLocaleChange: (locale: string) => void;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Hook to manage and switch between different locales (languages) of the documentation.
|
|
101
|
+
*/
|
|
102
|
+
declare function useI18n(): UseI18nReturn;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Hook to manage the previous and next button functionality for documentation pages.
|
|
106
|
+
*/
|
|
107
|
+
declare function usePageNav(): {
|
|
108
|
+
prevPage: ComponentRoute | null;
|
|
109
|
+
nextPage: ComponentRoute | null;
|
|
110
|
+
currentRoute: ComponentRoute;
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Hook to generate breadcrumbs based on the current active route.
|
|
115
|
+
*/
|
|
116
|
+
declare function useBreadcrumbs(): {
|
|
117
|
+
crumbs: {
|
|
118
|
+
label: string;
|
|
119
|
+
href?: string;
|
|
120
|
+
}[];
|
|
121
|
+
activeRoute: ComponentRoute | undefined;
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Hook to automatically localize a path based on the current version and locale context.
|
|
126
|
+
* It ensures that navigation within the /docs path preserves the active version and language.
|
|
127
|
+
*/
|
|
128
|
+
declare function useLocalizedTo(to: LinkProps['to']): react_router_dom.To;
|
|
129
|
+
|
|
130
|
+
declare const useLocation: () => react_router_dom.Location<any>;
|
|
131
|
+
|
|
132
|
+
export { type LocaleOption, type UseI18nReturn, type UseVersionReturn, type VersionOption, useBreadcrumbs, useI18n, useLocalizedTo, useLocation, useNavbar, useOnThisPage, usePageNav, useSearch, useSidebar, useTabs, useVersion };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var k=Object.defineProperty;var F=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames;var A=Object.prototype.hasOwnProperty;var H=(t,n)=>{for(var r in n)k(t,r,{get:n[r],enumerable:!0})},Q=(t,n,r,o)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of j(n))!A.call(t,i)&&i!==r&&k(t,i,{get:()=>n[i],enumerable:!(o=F(n,i))||o.enumerable});return t};var U=t=>Q(k({},"__esModule",{value:!0}),t);var ie={};H(ie,{useBreadcrumbs:()=>ne,useI18n:()=>te,useLocalizedTo:()=>re,useLocation:()=>se,useNavbar:()=>D,useOnThisPage:()=>J,usePageNav:()=>oe,useRoutes:()=>v,useSearch:()=>G,useSidebar:()=>K,useTabs:()=>Y,useVersion:()=>ee});module.exports=U(ie);var V=require("react-router-dom");var T=require("react"),X=(0,T.createContext)(null);function b(){let t=(0,T.use)(X);if(!t)throw new Error("useConfig must be used within a ConfigProvider");return t}var L=require("react"),z=require("react/jsx-runtime"),q=(0,L.createContext)(void 0);function w(){let t=(0,L.use)(q);if(t===void 0)throw new Error("useTheme must be used within a ThemeProvider");return t}function D(){let t=b(),{theme:n}=w(),r=(0,V.useLocation)(),o=t.theme||t.themeConfig||{},i=o.title||"Boltdocs",a=o.navbar||[],c=o.socialLinks||[],u=o.githubRepo,f=a.map(p=>{let d=p.href||p.to||p.link||"";return{label:p.label||p.text||"",href:d,active:r.pathname===d,to:d.startsWith("http")||d.startsWith("//")?"external":void 0}}),e=o.logo,s=e?typeof e=="string"?e:n==="dark"?e.dark:e.light:null,l={alt:(e&&typeof e=="object"?e.alt:void 0)||i,width:e&&typeof e=="object"?e.width:void 0,height:e&&typeof e=="object"?e.height:void 0},h=u?`https://github.com/${u}`:null;return{links:f,title:i,logo:s,logoProps:l,github:h,social:c,config:t,theme:n}}var I=require("react-router-dom");function K(t){let n=b(),r=(0,I.useLocation)(),o=t.find(e=>e.path===r.pathname),i=o?.tab?.toLowerCase(),a=i?t.filter(e=>!e.tab||e.tab.toLowerCase()===i):t,c=[],u=new Map;for(let e of a)e.group?(u.has(e.group)||u.set(e.group,{slug:e.group,title:e.groupTitle||e.group,routes:[],icon:e.groupIcon}),u.get(e.group).routes.push(e)):c.push(e);return{groups:Array.from(u.values()),ungrouped:c,activeRoute:o,activePath:r.pathname,config:n}}var P=require("react");function G(t){let[n,r]=(0,P.useState)(!1),[o,i]=(0,P.useState)(""),a=(0,P.useMemo)(()=>{if(!o)return t.slice(0,10).map(e=>({id:e.path,title:e.title,path:e.path,bio:e.description||"",groupTitle:e.groupTitle}));let c=[],u=o.toLowerCase();for(let e of t)if(e.title?.toLowerCase().includes(u)&&c.push({id:e.path,title:e.title,path:e.path,bio:e.description||"",groupTitle:e.groupTitle}),e.headings)for(let s of e.headings)s.text.toLowerCase().includes(u)&&c.push({id:`${e.path}#${s.id}`,title:s.text,path:`${e.path}#${s.id}`,bio:`Heading in ${e.title}`,groupTitle:e.title,isHeading:!0});let f=new Set;return c.filter(e=>f.has(e.path)?!1:(f.add(e.path),!0)).slice(0,10)},[t,o]);return{isOpen:n,setIsOpen:r,query:o,setQuery:i,list:a,input:{value:o,onChange:c=>i(c.target.value)}}}var S=require("react");function J(t=[]){let[n,r]=(0,S.useState)(null);return{headings:t,activeId:n,setActiveId:r}}var $=require("react-router-dom"),C=require("react");function Y(t=[],n=[]){let r=(0,$.useLocation)(),o=(0,C.useRef)([]),[i,a]=(0,C.useState)({opacity:0,transform:"translateX(0) scaleX(0)",width:0}),u=n.find(s=>s.path===r.pathname)?.tab?.toLowerCase(),f=t.findIndex(s=>s.id.toLowerCase()===u),e=f===-1?0:f;return(0,C.useEffect)(()=>{let s=o.current[e];s&&a({opacity:1,width:s.offsetWidth,transform:`translateX(${s.offsetLeft}px)`})},[e,t.length,r.pathname]),{tabs:t,activeIndex:e,indicatorStyle:i,tabRefs:o,activeTabId:u}}var O=require("react-router-dom");function x(t,n,r){let o=t;return n&&(o===n||o.startsWith(n+"/"))&&(o=o===n?"index.md":o.slice(n.length+1)),r&&(o===r||o.startsWith(r+"/"))&&(o=o===r?"index.md":o.slice(r.length+1)),o}var M=require("react-router-dom");var R=require("react"),_=require("react/jsx-runtime"),Z=(0,R.createContext)({preload:()=>{},routes:[]});function B(){return(0,R.use)(Z)}function v(){let{routes:t}=B(),n=b(),r=(0,M.useLocation)(),o=t.find(l=>l.path===r.pathname),i=n.i18n?o?.locale||n.i18n.defaultLocale:void 0,a=n.versions?o?.version||n.versions.defaultVersion:void 0,c=t.filter(l=>{let h=n.i18n?(l.locale||n.i18n.defaultLocale)===i:!0,p=n.versions?(l.version||n.versions.defaultVersion)===a:!0;return h&&p}),u=n.i18n?.locales[i]||i,f=n.versions?.versions[a]||a,e=n.i18n?Object.entries(n.i18n.locales).map(([l,h])=>({key:l,label:h,isCurrent:l===i})):[],s=n.versions?Object.entries(n.versions.versions).map(([l,h])=>({key:l,label:h,isCurrent:l===a})):[];return{routes:c,allRoutes:t,currentRoute:o,currentLocale:i,currentLocaleLabel:u,availableLocales:e,currentVersion:a,currentVersionLabel:f,availableVersions:s,config:n}}function ee(){let t=(0,O.useNavigate)(),n=v(),{allRoutes:r,currentRoute:o,currentVersion:i,currentLocale:a,config:c}=n,u=c.versions,f=s=>{if(!u||s===i)return;let l=`/docs/${s}`;if(o){let h=x(o.filePath,o.version,o.locale),p=r.find(d=>x(d.filePath,d.version,d.locale)===h&&(d.version||u.defaultVersion)===s&&(a?d.locale===a:!d.locale));if(p)l=p.path;else{let d=r.find(g=>x(g.filePath,g.version,g.locale)==="index.md"&&(g.version||u.defaultVersion)===s&&(a?g.locale===a:!g.locale));l=d?d.path:`/docs/${s}${a?`/${a}`:""}`}}t(l)},e=n.availableVersions.map(s=>({...s,label:s.label,value:s.key}));return{currentVersion:i,currentVersionLabel:n.currentVersionLabel,availableVersions:e,handleVersionChange:f}}var E=require("react-router-dom");function te(){let t=(0,E.useNavigate)(),n=v(),{allRoutes:r,currentRoute:o,currentLocale:i,config:a}=n,c=a.i18n,u=e=>{if(!c||e===i)return;let s="/";if(o){let l=x(o.filePath,o.version,o.locale),h=r.find(p=>x(p.filePath,p.version,p.locale)===l&&(p.locale||c.defaultLocale)===e&&p.version===o.version);if(h)s=h.path;else{let p=r.find(d=>x(d.filePath,d.version,d.locale)==="index.md"&&(d.locale||c.defaultLocale)===e&&d.version===o.version);s=p?p.path:e===c.defaultLocale?o.version?`/${o.version}`:"/":o.version?`/${o.version}/${e}`:`/${e}`}}else s=e===c.defaultLocale?"/":`/${e}`;t(s)},f=n.availableLocales.map(e=>({...e,label:e.label,value:e.key}));return{currentLocale:i,currentLocaleLabel:n.currentLocaleLabel,availableLocales:f,handleLocaleChange:u}}function oe(){let{routes:t}=v(),n=window.location.pathname,r=t.findIndex(c=>c.path===n),o=t[r],i=r>0?t[r-1]:null,a=r<t.length-1?t[r+1]:null;return{prevPage:i,nextPage:a,currentRoute:o}}function ne(){let{currentRoute:t}=v(),n=[];return t&&(t.groupTitle&&n.push({label:t.groupTitle}),n.push({label:t.title,href:t.path})),{crumbs:n,activeRoute:t}}var N=require("react-router-dom");function re(t){let n=(0,N.useLocation)(),r=b();if(!r||typeof t!="string"||!r.i18n&&!r.versions)return t;let o="/docs";if(!t.startsWith(o))return t;let a=n.pathname.substring(o.length).split("/").filter(Boolean),c=r.versions?.defaultVersion,u=r.i18n?.defaultLocale,f=0;r.versions&&a.length>f&&r.versions.versions[a[f]]&&(c=a[f],f++),r.i18n&&a.length>f&&r.i18n.locales[a[f]]&&(u=a[f]);let s=t.substring(o.length).split("/").filter(Boolean),l=0,h=!1,p=!1;r.versions&&s.length>l&&r.versions.versions[s[l]]&&(h=!0,l++),r.i18n&&s.length>l&&r.i18n.locales[s[l]]&&(p=!0,l++);let d=s.slice(l),g=[];r.versions&&(h?g.push(s[0]):c&&g.push(c)),r.i18n&&(p?g.push(s[h?1:0]):u&&g.push(u)),g.push(...d);let y=`${o}/${g.join("/")}`;return y.endsWith("/")&&(y=y.slice(0,-1)),y===o?o:y}var W=require("react-router-dom"),se=()=>(0,W.useLocation)();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as t,b as e,c as m,d as p,e as f,f as a,g as c,h as n,i as s}from"../../chunk-DVY3RDXD.mjs";import"../../chunk-GBLMDJ2B.mjs";import{a as x}from"../../chunk-ISPX45DF.mjs";import{d as r}from"../../chunk-52MVMZWS.mjs";import{useLocation as o}from"react-router-dom";var u=()=>o();export{n as useBreadcrumbs,p as useI18n,r as useLocalizedTo,u as useLocation,e as useNavbar,c as useOnThisPage,s as usePageNav,t as useRoutes,x as useSearch,a as useSidebar,f as useTabs,m as useVersion};
|