boltdocs 2.4.1 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/cache-3FOEPC2P.mjs +1 -0
- package/dist/chunk-ITFGVXPE.mjs +1 -0
- package/dist/chunk-TP5KMRD3.mjs +1 -0
- package/dist/chunk-UD2LQG2M.mjs +75 -0
- package/dist/chunk-Y4RE5KI7.mjs +1 -0
- package/dist/client/index.d.mts +1225 -14
- package/dist/client/index.d.ts +1225 -14
- 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/node/cli-entry.js +37 -35
- package/dist/node/cli-entry.mjs +1 -1
- package/dist/node/index.d.mts +263 -1
- package/dist/node/index.d.ts +263 -1
- package/dist/node/index.js +34 -32
- package/dist/node/index.mjs +1 -1
- package/dist/package-TWC3BMZ7.mjs +1 -0
- package/dist/search-dialog-YBM4GYDR.mjs +1 -0
- package/package.json +46 -76
- package/src/client/components/primitives/breadcrumbs.tsx +10 -10
- package/src/client/components/primitives/index.ts +17 -16
- package/src/client/components/primitives/menu.tsx +11 -14
- package/src/client/components/primitives/navbar.tsx +29 -29
- package/src/client/components/primitives/navigation-menu.tsx +7 -9
- package/src/client/components/primitives/on-this-page.tsx +16 -18
- package/src/client/components/primitives/page-nav.tsx +10 -13
- package/src/client/components/primitives/search-dialog.tsx +17 -19
- package/src/client/components/primitives/sidebar.tsx +8 -10
- package/src/client/components/primitives/tabs.tsx +10 -12
- package/src/client/components/primitives/tooltip.tsx +3 -5
- package/src/client/components/ui-base/breadcrumbs.tsx +12 -15
- package/src/client/components/ui-base/copy-markdown.tsx +8 -10
- package/src/client/components/ui-base/navbar.tsx +10 -10
- package/src/client/components/ui-base/on-this-page.tsx +13 -12
- package/src/client/components/ui-base/page-nav.tsx +15 -15
- package/src/client/components/ui-base/search-dialog.tsx +13 -20
- package/src/client/components/ui-base/sidebar.tsx +9 -9
- package/src/client/components/ui-base/tabs.tsx +6 -7
- package/src/client/components/ui-base/theme-toggle.tsx +11 -11
- package/src/client/hooks/index.ts +12 -12
- package/src/client/index.ts +34 -11
- package/src/node/config.ts +48 -6
- package/src/node/errors.ts +44 -0
- package/src/node/index.ts +29 -2
- package/src/node/mdx/index.ts +9 -2
- package/src/node/plugin/index.ts +72 -4
- package/src/node/plugins/index.ts +17 -0
- package/src/node/plugins/plugin-errors.ts +62 -0
- package/src/node/plugins/plugin-lifecycle.ts +117 -0
- package/src/node/plugins/plugin-sandbox.ts +59 -0
- package/src/node/plugins/plugin-store.ts +54 -0
- package/src/node/plugins/plugin-types.ts +107 -0
- package/src/node/plugins/plugin-validator.ts +105 -0
- package/src/node/routes/parser.ts +35 -5
- package/src/node/schema/config.ts +208 -0
- package/src/node/schema/frontmatter.ts +17 -0
- package/src/node/security/constants/index.ts +10 -0
- package/src/node/security/csp.ts +31 -0
- package/src/node/security/headers.ts +27 -0
- package/src/node/utils.ts +153 -5
- package/tsup.config.ts +0 -6
- package/dist/base-ui/index.d.mts +0 -25
- package/dist/base-ui/index.d.ts +0 -25
- package/dist/base-ui/index.js +0 -1
- package/dist/base-ui/index.mjs +0 -1
- package/dist/cache-P6WK424C.mjs +0 -1
- package/dist/chunk-2DI3OGHV.mjs +0 -1
- package/dist/chunk-2Z5T6EAU.mjs +0 -1
- package/dist/chunk-64AJ5QLT.mjs +0 -1
- package/dist/chunk-DDX52BX4.mjs +0 -1
- package/dist/chunk-HRZDSFR5.mjs +0 -1
- package/dist/chunk-JD3RSDE4.mjs +0 -1
- package/dist/chunk-JZXLCA2E.mjs +0 -1
- package/dist/chunk-NBCYHLAA.mjs +0 -1
- package/dist/chunk-PPVDMDEL.mjs +0 -1
- package/dist/chunk-T3W44KWY.mjs +0 -1
- package/dist/chunk-UBE4CKOA.mjs +0 -1
- package/dist/chunk-UWT4AJTH.mjs +0 -73
- package/dist/chunk-WWJ7WKDI.mjs +0 -1
- package/dist/chunk-Y4RRHPXC.mjs +0 -1
- package/dist/client/types.d.mts +0 -3
- package/dist/client/types.d.ts +0 -3
- package/dist/client/types.js +0 -1
- package/dist/client/types.mjs +0 -0
- package/dist/copy-markdown--9yjpbyy.d.mts +0 -15
- package/dist/copy-markdown-l2MYkcG7.d.ts +0 -15
- package/dist/hooks/index.d.mts +0 -137
- package/dist/hooks/index.d.ts +0 -137
- package/dist/hooks/index.js +0 -1
- package/dist/hooks/index.mjs +0 -1
- package/dist/integrations/index.d.mts +0 -48
- package/dist/integrations/index.d.ts +0 -48
- package/dist/integrations/index.js +0 -1
- package/dist/integrations/index.mjs +0 -1
- package/dist/link-DfBwCeZc.d.mts +0 -68
- package/dist/link-DfBwCeZc.d.ts +0 -68
- package/dist/loading-BwUos0wZ.d.mts +0 -57
- package/dist/loading-nlnUD01v.d.ts +0 -57
- package/dist/mdx/index.d.mts +0 -178
- package/dist/mdx/index.d.ts +0 -178
- package/dist/mdx/index.js +0 -1
- package/dist/mdx/index.mjs +0 -1
- package/dist/primitives/index.d.mts +0 -292
- package/dist/primitives/index.d.ts +0 -292
- package/dist/primitives/index.js +0 -1
- package/dist/primitives/index.mjs +0 -1
- package/dist/search-dialog-OONKKC5H.mjs +0 -1
- package/dist/types-opDA2E9-.d.mts +0 -394
- package/dist/types-opDA2E9-.d.ts +0 -394
- package/dist/use-routes-DNwgTRpU.d.ts +0 -29
- package/dist/use-routes-DrT80Eom.d.mts +0 -29
package/dist/mdx/index.d.ts
DELETED
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { B as ButtonProps, b as LinkProps$1 } from '../link-DfBwCeZc.js';
|
|
3
|
-
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
4
|
-
import { VariantProps } from 'class-variance-authority';
|
|
5
|
-
import { ComponentPropsWithoutRef, ReactNode, ImgHTMLAttributes } from 'react';
|
|
6
|
-
import { f as SandboxOptions } from '../types-opDA2E9-.js';
|
|
7
|
-
export { C as CopyMarkdown, a as CopyMarkdownProps } from '../copy-markdown-l2MYkcG7.js';
|
|
8
|
-
import 'react-aria-components';
|
|
9
|
-
import 'vite';
|
|
10
|
-
|
|
11
|
-
interface CodeBlockProps {
|
|
12
|
-
children?: React.ReactNode;
|
|
13
|
-
className?: string;
|
|
14
|
-
sandbox?: boolean | any;
|
|
15
|
-
hideCopy?: boolean;
|
|
16
|
-
hideSandbox?: boolean;
|
|
17
|
-
title?: string;
|
|
18
|
-
lang?: string;
|
|
19
|
-
highlightedHtml?: string;
|
|
20
|
-
'data-lang'?: string;
|
|
21
|
-
plain?: boolean;
|
|
22
|
-
[key: string]: any;
|
|
23
|
-
}
|
|
24
|
-
declare function CodeBlock(props: CodeBlockProps): react_jsx_runtime.JSX.Element;
|
|
25
|
-
|
|
26
|
-
interface VideoProps {
|
|
27
|
-
src?: string;
|
|
28
|
-
poster?: string;
|
|
29
|
-
alt?: string;
|
|
30
|
-
controls?: boolean;
|
|
31
|
-
preload?: string;
|
|
32
|
-
children?: React.ReactNode;
|
|
33
|
-
[key: string]: any;
|
|
34
|
-
}
|
|
35
|
-
declare function Video({ src, poster, alt, children, controls, preload, ...rest }: VideoProps): react_jsx_runtime.JSX.Element;
|
|
36
|
-
|
|
37
|
-
declare const Button: ({ className, variant, size, rounded, iconSize, disabled, ...props }: ButtonProps) => react_jsx_runtime.JSX.Element;
|
|
38
|
-
|
|
39
|
-
interface TabProps {
|
|
40
|
-
label: string;
|
|
41
|
-
icon?: React.ReactNode;
|
|
42
|
-
disabled?: boolean;
|
|
43
|
-
children: React.ReactNode;
|
|
44
|
-
}
|
|
45
|
-
declare function Tab({ children }: TabProps): react_jsx_runtime.JSX.Element;
|
|
46
|
-
interface TabsProps {
|
|
47
|
-
defaultIndex?: number;
|
|
48
|
-
children: React.ReactNode;
|
|
49
|
-
}
|
|
50
|
-
declare function Tabs({ defaultIndex, children }: TabsProps): react_jsx_runtime.JSX.Element;
|
|
51
|
-
|
|
52
|
-
declare const badgeVariants: (props?: ({
|
|
53
|
-
variant?: "default" | "primary" | "danger" | "success" | "warning" | "info" | null | undefined;
|
|
54
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
55
|
-
interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement>, VariantProps<typeof badgeVariants> {
|
|
56
|
-
children: React.ReactNode;
|
|
57
|
-
}
|
|
58
|
-
declare function Badge({ variant, children, className, ...rest }: BadgeProps): react_jsx_runtime.JSX.Element;
|
|
59
|
-
|
|
60
|
-
declare const cardsVariants: (props?: ({
|
|
61
|
-
cols?: 1 | 2 | 3 | 4 | null | undefined;
|
|
62
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
63
|
-
type CardsVariants = VariantProps<typeof cardsVariants>;
|
|
64
|
-
interface CardsProps extends React.HTMLAttributes<HTMLDivElement>, CardsVariants {
|
|
65
|
-
}
|
|
66
|
-
declare function Cards({ cols, children, className, ...rest }: CardsProps): react_jsx_runtime.JSX.Element;
|
|
67
|
-
interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
68
|
-
title?: string;
|
|
69
|
-
icon?: React.ReactNode;
|
|
70
|
-
href?: string;
|
|
71
|
-
children?: React.ReactNode;
|
|
72
|
-
}
|
|
73
|
-
declare function Card({ title, icon, href, children, className, ...rest }: CardProps): react_jsx_runtime.JSX.Element;
|
|
74
|
-
|
|
75
|
-
declare const admonitionVariants: (props?: ({
|
|
76
|
-
type?: "danger" | "warning" | "info" | "note" | "tip" | "important" | "caution" | null | undefined;
|
|
77
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
78
|
-
type AdmonitionVariants = VariantProps<typeof admonitionVariants>;
|
|
79
|
-
interface AdmonitionProps extends React.HTMLAttributes<HTMLDivElement>, AdmonitionVariants {
|
|
80
|
-
title?: string;
|
|
81
|
-
children: React.ReactNode;
|
|
82
|
-
}
|
|
83
|
-
declare function Admonition({ type, title, children, className, ...rest }: AdmonitionProps): react_jsx_runtime.JSX.Element;
|
|
84
|
-
declare const Note: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
|
|
85
|
-
declare const Tip: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
|
|
86
|
-
declare const Warning: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
|
|
87
|
-
declare const Danger: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
|
|
88
|
-
declare const InfoBox: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
|
|
89
|
-
declare const Important: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
|
|
90
|
-
declare const Caution: (props: Omit<AdmonitionProps, "type">) => react_jsx_runtime.JSX.Element;
|
|
91
|
-
|
|
92
|
-
declare const listVariants: (props?: ({
|
|
93
|
-
variant?: "number" | "default" | "checked" | "arrow" | "bubble" | null | undefined;
|
|
94
|
-
cols?: 1 | 2 | 3 | 4 | null | undefined;
|
|
95
|
-
isGrid?: boolean | null | undefined;
|
|
96
|
-
dense?: boolean | null | undefined;
|
|
97
|
-
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
98
|
-
type ListVariantProps = VariantProps<typeof listVariants>;
|
|
99
|
-
interface ListProps extends ComponentPropsWithoutRef<'ul'>, Omit<ListVariantProps, 'variant'> {
|
|
100
|
-
variant?: 'checked' | 'arrow' | 'default' | 'bubble' | 'number';
|
|
101
|
-
children: ReactNode;
|
|
102
|
-
}
|
|
103
|
-
declare function List({ variant, cols, dense, children, className, ...props }: ListProps): react_jsx_runtime.JSX.Element;
|
|
104
|
-
|
|
105
|
-
interface FileTreeProps {
|
|
106
|
-
children: React.ReactNode;
|
|
107
|
-
}
|
|
108
|
-
declare function FileTree({ children }: FileTreeProps): react_jsx_runtime.JSX.Element;
|
|
109
|
-
|
|
110
|
-
interface TableProps {
|
|
111
|
-
headers?: string[];
|
|
112
|
-
data?: (string | React.ReactNode)[][];
|
|
113
|
-
children?: React.ReactNode;
|
|
114
|
-
className?: string;
|
|
115
|
-
sortable?: boolean;
|
|
116
|
-
paginated?: boolean;
|
|
117
|
-
pageSize?: number;
|
|
118
|
-
}
|
|
119
|
-
declare function Table({ headers, data, children, className, sortable, paginated, pageSize, }: TableProps): react_jsx_runtime.JSX.Element;
|
|
120
|
-
|
|
121
|
-
interface FieldProps {
|
|
122
|
-
name: string;
|
|
123
|
-
type?: string;
|
|
124
|
-
defaultValue?: string;
|
|
125
|
-
required?: boolean;
|
|
126
|
-
children: React.ReactNode;
|
|
127
|
-
id?: string;
|
|
128
|
-
className?: string;
|
|
129
|
-
}
|
|
130
|
-
declare function Field({ name, type, defaultValue, required, children, id, className, }: FieldProps): react_jsx_runtime.JSX.Element;
|
|
131
|
-
|
|
132
|
-
type LinkProps = LinkProps$1 & {
|
|
133
|
-
to: string;
|
|
134
|
-
children?: React.ReactNode;
|
|
135
|
-
};
|
|
136
|
-
/**
|
|
137
|
-
* A premium Link component for Boltdocs that handles internal and external routing.
|
|
138
|
-
*/
|
|
139
|
-
declare function Link({ to, children, className, ...props }: LinkProps): react_jsx_runtime.JSX.Element;
|
|
140
|
-
|
|
141
|
-
interface ImageProps extends ImgHTMLAttributes<HTMLImageElement> {
|
|
142
|
-
src: string;
|
|
143
|
-
darkSrc?: string;
|
|
144
|
-
theme?: 'light' | 'dark';
|
|
145
|
-
}
|
|
146
|
-
/**
|
|
147
|
-
* A themed Image component for Boltdocs.
|
|
148
|
-
* It supports rendering based on the current active theme.
|
|
149
|
-
*/
|
|
150
|
-
declare function Image({ src, alt, theme: imageTheme, ...props }: ImageProps): react_jsx_runtime.JSX.Element | null;
|
|
151
|
-
|
|
152
|
-
interface PropItem {
|
|
153
|
-
name: string;
|
|
154
|
-
type: string;
|
|
155
|
-
defaultValue?: string;
|
|
156
|
-
required?: boolean;
|
|
157
|
-
description: React.ReactNode;
|
|
158
|
-
}
|
|
159
|
-
interface ComponentPropsProps {
|
|
160
|
-
title?: string;
|
|
161
|
-
props: PropItem[];
|
|
162
|
-
className?: string;
|
|
163
|
-
}
|
|
164
|
-
declare function ComponentProps({ title, props, className, }: ComponentPropsProps): react_jsx_runtime.JSX.Element;
|
|
165
|
-
|
|
166
|
-
interface ComponentPreviewProps {
|
|
167
|
-
code?: string;
|
|
168
|
-
highlightedHtml?: string;
|
|
169
|
-
children?: string;
|
|
170
|
-
preview?: React.ReactNode;
|
|
171
|
-
hideCode?: boolean;
|
|
172
|
-
hideSandbox?: boolean;
|
|
173
|
-
hideCopy?: boolean;
|
|
174
|
-
sandboxOptions?: SandboxOptions;
|
|
175
|
-
}
|
|
176
|
-
declare function ComponentPreview(props: ComponentPreviewProps): react_jsx_runtime.JSX.Element;
|
|
177
|
-
|
|
178
|
-
export { Admonition, type AdmonitionProps, Badge, type BadgeProps, Button, ButtonProps, Card, type CardProps, Cards, type CardsProps, Caution, CodeBlock, ComponentPreview, type ComponentPreviewProps, ComponentProps, type ComponentPropsProps, Danger, Field, type FieldProps, FileTree, type FileTreeProps, Image, type ImageProps, Important, InfoBox, Link, type LinkProps, List, type ListProps, Note, Tab, type TabProps, Table, type TableProps, Tabs, type TabsProps, Tip, Video, Warning };
|
package/dist/mdx/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var hr=Object.create;var Ae=Object.defineProperty;var vr=Object.getOwnPropertyDescriptor;var yr=Object.getOwnPropertyNames;var Cr=Object.getPrototypeOf,Rr=Object.prototype.hasOwnProperty;var Nr=(e,t)=>{for(var r in t)Ae(e,r,{get:t[r],enumerable:!0})},lt=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of yr(t))!Rr.call(e,n)&&n!==r&&Ae(e,n,{get:()=>t[n],enumerable:!(o=vr(t,n))||o.enumerable});return e};var T=(e,t,r)=>(r=e!=null?hr(Cr(e)):{},lt(t||!e||!e.__esModule?Ae(r,"default",{value:e,enumerable:!0}):r,e)),Pr=e=>lt(Ae({},"__esModule",{value:!0}),e);var yo={};Nr(yo,{Admonition:()=>U,Badge:()=>Pt,Button:()=>mt,Card:()=>Lt,Cards:()=>At,Caution:()=>Dt,CodeBlock:()=>ae,ComponentPreview:()=>or,ComponentProps:()=>tr,CopyMarkdown:()=>gr,Danger:()=>Ot,Field:()=>Gt,FileTree:()=>Wt,Image:()=>Qt,Important:()=>zt,InfoBox:()=>Vt,Link:()=>Xt,List:()=>Ht,Note:()=>It,Tab:()=>yt,Table:()=>$t,Tabs:()=>Ct,Tip:()=>Mt,Video:()=>Rt,Warning:()=>Et});module.exports=Pr(yo);var Se=T(require("react-aria-components"));var ct=require("clsx"),dt=require("tailwind-merge");function s(...e){return(0,dt.twMerge)((0,ct.clsx)(e))}var pt=require("class-variance-authority"),F=require("react/jsx-runtime"),Le=(0,pt.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"}}),ye=({href:e,icon:t,iconPosition:r="left",isIconOnly:o,children:n,className:a,variant:c,size:l,rounded:i,iconSize:d,disabled:m,...u})=>{let x=o||!n&&!!t,g=x?(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)(Se.Link,{href:e,className:s(Le({variant:c,size:l,rounded:i,iconSize:x?d:void 0,disabled:m}),a),...u,children:g}):(0,F.jsx)(Se.Button,{className:s(Le({variant:c,size:l,rounded:i,iconSize:x?d:void 0,disabled:m}),a),...u,children:g})};var ut=require("react/jsx-runtime"),mt=({className:e,variant:t,size:r,rounded:o,iconSize:n,disabled:a,...c})=>(0,ut.jsx)(ye,{className:s("group",Le({variant:t,size:r,rounded:o,iconSize:n,disabled:a,className:e})),...c});var ze=T(require("react-aria-components")),se=require("lucide-react");var Be=require("react"),wr=(0,Be.createContext)(null);function Y(){let e=(0,Be.use)(wr);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e}var Ue=require("codesandbox/lib/api/define.js");function ft(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 kr(e){let t=ft(e),r=(0,Ue.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 xt(e){if(typeof window>"u")return kr(e);let t=ft(e),r=(0,Ue.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 bt=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 gt(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=Y(),u=(0,W.useCallback)(async()=>{let g=d.current?.textContent??"";bt(g),n(!0),setTimeout(()=>n(!1),2e3)},[]),x=(0,W.useCallback)(()=>{let g=d.current?.textContent??"",w=m?.integrations?.sandbox?.config||{},R=typeof r=="object"?r:w,f=R.entry||"src/App.tsx";xt({title:t??"Code Snippet",...R,files:{...R.files,[f]:{content:g}}})},[t,m,r]);return(0,W.useEffect)(()=>{let g=d.current?.textContent?.length??0;i(g>120)},[e.children,e.highlightedHtml]),{copied:o,isExpanded:a,setIsExpanded:c,isExpandable:l,preRef:d,handleCopy:u,handleSandbox:x,shouldTruncate:l&&!a}}var b=require("react/jsx-runtime");function _(e){let{size:t=20,...r}=e;return{...r,width:t,height:t}}var ht=e=>(0,b.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",..._(e),children:[(0,b.jsx)("title",{children:"CodeSandbox"}),(0,b.jsx)("path",{d:"M0 24h24V0H0v2.455h21.546v19.09H2.454V0H0Z"})]});var Ie=e=>(0,b.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",..._(e),children:[(0,b.jsx)("title",{children:"TypeScript"}),(0,b.jsx)("path",{fill:"#2563EB",d:"M3.234 9.093V7.318h8.363v1.775H8.479V17.5H6.352V9.093H3.234zm15.263 1.153c-.04-.4-.21-.712-.512-.934-.301-.222-.71-.333-1.228-.333-.351 0-.648.05-.89.149-.242.096-.427.23-.557.403a.969.969 0 0 0-.189.586.838.838 0 0 0 .115.477c.086.136.204.254.353.353.149.097.321.181.517.254.195.07.404.13.626.179l.915.219c.444.1.852.232 1.223.397.371.166.693.37.965.612.271.242.482.527.631.855.152.328.23.704.234 1.129-.004.623-.163 1.163-.478 1.62-.311.454-.762.807-1.352 1.06-.587.248-1.294.372-2.123.372-.822 0-1.538-.126-2.147-.378-.607-.252-1.081-.624-1.422-1.118-.338-.497-.516-1.112-.532-1.845h2.083c.023.342.12.627.293.855.176.226.41.397.701.513a2.8 2.8 0 0 0 1 .168c.364 0 .68-.053.949-.159a1.45 1.45 0 0 0 .631-.442c.15-.189.224-.406.224-.651a.846.846 0 0 0-.204-.577c-.132-.156-.328-.288-.586-.398a5.964 5.964 0 0 0-.94-.298l-1.109-.278c-.858-.21-1.536-.536-2.033-.98-.497-.444-.744-1.042-.74-1.795-.004-.616.16-1.155.491-1.615.335-.461.794-.82 1.377-1.08.584-.258 1.247-.387 1.99-.387.755 0 1.414.13 1.978.388.567.258 1.007.618 1.322 1.079.315.46.477.994.488 1.6h-2.064z"})]}),Me=e=>(0,b.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",..._(e),children:[(0,b.jsx)("title",{children:"JavaScript"}),(0,b.jsx)("path",{fill:"#F59E0B",d:"M8.383 7.318h2.127v7.1c0 .656-.147 1.226-.442 1.71a2.924 2.924 0 01-1.218 1.118c-.52.262-1.125.393-1.815.393-.613 0-1.17-.107-1.67-.323a2.67 2.67 0 01-1.183-.994c-.292-.448-.436-1.01-.433-1.686h2.143c.006.269.061.5.164.691.106.19.25.335.432.438.186.1.405.15.657.15.265 0 .488-.057.67-.17.186-.116.327-.285.423-.507.096-.222.145-.496.145-.82v-7.1zm9.43 2.928c-.04-.4-.21-.712-.511-.934-.302-.222-.711-.333-1.228-.333-.352 0-.648.05-.89.149-.242.096-.428.23-.557.403a.969.969 0 00-.19.586.838.838 0 00.115.477c.087.136.204.254.353.353.15.097.322.181.517.254.196.07.405.13.627.179l.915.219c.444.1.851.232 1.223.397.37.166.692.37.964.612s.482.527.631.855a2.7 2.7 0 01.234 1.129c-.003.623-.162 1.163-.477 1.62-.312.454-.763.807-1.353 1.06-.586.248-1.294.372-2.122.372-.822 0-1.538-.126-2.148-.378-.607-.252-1.08-.624-1.422-1.118-.338-.497-.515-1.112-.532-1.845h2.083c.023.342.121.627.293.855.176.226.41.397.702.513.295.112.628.168.999.168.364 0 .68-.053.95-.159.271-.106.482-.253.63-.442.15-.189.224-.406.224-.651a.846.846 0 00-.203-.577c-.133-.156-.329-.288-.587-.398a5.964 5.964 0 00-.94-.298l-1.108-.278c-.859-.21-1.537-.536-2.034-.98-.497-.444-.744-1.042-.74-1.795-.004-.616.16-1.155.492-1.615.334-.461.793-.82 1.377-1.08.583-.258 1.246-.387 1.989-.387.755 0 1.415.13 1.978.388.567.258 1.008.618 1.323 1.079.314.46.477.994.487 1.6h-2.063z"})]}),Ee=e=>(0,b.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",..._(e),children:[(0,b.jsx)("title",{children:"JSON"}),(0,b.jsx)("path",{fill:"#F59E0B",d:"M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z"})]}),Oe=e=>(0,b.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",..._(e),children:[(0,b.jsx)("title",{children:"CSS"}),(0,b.jsx)("path",{fill:"#0EA5E9",d:"M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z"})]}),Ve=e=>(0,b.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",..._(e),children:[(0,b.jsx)("title",{children:"HTML"}),(0,b.jsx)("path",{fill:"#EA580C",d:"M4.778 6.667A2.667 2.667 0 017.444 4a.889.889 0 010 1.778.889.889 0 00-.888.889v3.5c0 .701-.273 1.35-.73 1.833.457.483.73 1.132.73 1.832v3.501c0 .491.398.89.888.89a.889.889 0 010 1.777 2.667 2.667 0 01-2.666-2.667v-3.5a.889.889 0 00-.674-.863l-.43-.108a.889.889 0 010-1.724l.43-.108a.889.889 0 00.674-.862V6.667zm14.222 0A2.667 2.667 0 0016.333 4a.889.889 0 000 1.778c.491 0 .89.398.89.889v3.5c0 .701.272 1.35.729 1.833a2.664 2.664 0 00-.73 1.832v3.501a.889.889 0 01-.889.89.889.889 0 000 1.777A2.667 2.667 0 0019 17.333v-3.5c0-.408.278-.764.673-.863l.431-.108a.889.889 0 000-1.724l-.43-.108a.889.889 0 01-.674-.862V6.667z"})]});var ee=e=>(0,b.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",..._(e),children:[(0,b.jsx)("title",{children:"React"}),(0,b.jsx)("path",{fill:"#0E8ADC",d:"M12 13.677a1.677 1.677 0 100-3.354 1.677 1.677 0 000 3.354z"}),(0,b.jsx)("path",{stroke:"#0E8ADC",d:"M12 15.436c4.97 0 9-1.538 9-3.436s-4.03-3.436-9-3.436S3 10.102 3 12s4.03 3.436 9 3.436z"}),(0,b.jsx)("path",{stroke:"#0E8ADC",d:"M9.024 13.718c2.485 4.305 5.832 7.025 7.476 6.076 1.644-.949.961-5.208-1.524-9.512C12.491 5.977 9.144 3.257 7.5 4.206c-1.644.949-.961 5.208 1.524 9.512z"}),(0,b.jsx)("path",{stroke:"#0E8ADC",d:"M9.024 10.282c-2.485 4.304-3.168 8.563-1.524 9.512 1.644.95 4.99-1.771 7.476-6.076 2.485-4.304 3.168-8.563 1.524-9.512-1.644-.95-4.99 1.771-7.476 6.076z"})]}),te=e=>(0,b.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",..._(e),children:[(0,b.jsx)("title",{children:"Markdown"}),(0,b.jsx)("path",{fill:"#60A5FA",d:"M3 15.714V8h2.323l2.322 2.836L9.968 8h2.322v7.714H9.968V11.29l-2.323 2.836-2.322-2.836v4.424H3zm14.516 0l-3.484-3.743h2.323V8h2.322v3.97H21l-3.484 3.744z"})]}),re=e=>(0,b.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 25 24",..._(e),children:[(0,b.jsx)("title",{children:"Shell"}),(0,b.jsx)("path",{stroke:"#14B8A6",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M4.336 17l6-6-6-6M12.336 19h8"})]}),oe=e=>(0,b.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",..._(e),children:[(0,b.jsx)("title",{children:"YAML"}),(0,b.jsx)("path",{fill:"#A78BFA",d:"M6.533 5.864h2.755l2.654 5.011h.113l2.654-5.011h2.756l-4.245 7.522V17.5h-2.443v-4.114L6.533 5.864z"})]});var ne=T(require("react-aria-components"));var V=require("react/jsx-runtime"),Ar=({className:e,children:t,...r})=>(0,V.jsx)(ne.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)(ne.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]})}),Xe=({content:e,children:t,delay:r=500,closeDelay:o=0,...n})=>(0,V.jsxs)(ne.TooltipTrigger,{delay:r,closeDelay:o,children:[t,(0,V.jsx)(Ar,{...n,children:e})]});var P=require("react/jsx-runtime"),Lr={ts:Ie,tsx:ee,js:Me,jsx:ee,json:Ee,css:Oe,html:Ve,md:te,mdx:te,bash:re,sh:re,yaml:oe,yml:oe};function ae(e){let{children:t,sandbox:r,hideSandbox:o=!0,hideCopy:n=!1,highlightedHtml:a,title:c,"data-lang":l,plain:i=!1,...d}=e,x=!!Y()?.integrations?.sandbox?.enable&&!o,g=e.lang||l||"",{copied:w,isExpanded:R,setIsExpanded:f,isExpandable:G,preRef:H,handleCopy:ve,handleSandbox:Je,shouldTruncate:ke}=gt(e),Ke=Lr[g];return(0,P.jsxs)("div",{className:s("group relative overflow-hidden bg-(--color-code-bg)","contain-layout contain-paint",{"my-6 rounded-lg border border-border-subtle":!i,"[&>pre]:max-h-62.5 [&>pre]:overflow-hidden":ke},e.className),children:[c&&(0,P.jsxs)("div",{className:"flex items-center gap-2 border-b border-border-subtle bg-bg-surface/50 px-4 py-2 text-[13px] font-medium text-text-muted",children:[Ke?(0,P.jsx)(Ke,{size:14}):(0,P.jsx)(se.File,{size:14,className:"opacity-60"}),(0,P.jsx)("span",{children:c})]}),(0,P.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:[x&&(0,P.jsx)(Xe,{content:"Open in CodeSandbox",children:(0,P.jsx)(ze.Button,{onPress:Je,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,P.jsx)(ht,{size:20})})}),!n&&(0,P.jsx)(Xe,{content:w?"Copied!":"Copy code",children:(0,P.jsx)(ze.Button,{onPress:ve,className:s("grid place-items-center size-8 bg-transparent outline-none cursor-pointer transition-all duration-200 hover:scale-110 active:scale-95 [&>svg]:size-4 [&>svg]:stroke-2",w?"text-emerald-400":"text-text-muted hover:text-text-main"),"aria-label":"Copy code",children:w?(0,P.jsx)(se.Check,{size:20}):(0,P.jsx)(se.Copy,{size:20})})})]}),a?(0,P.jsx)("div",{ref:H,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,P.jsx)("pre",{ref:H,className:"m-0! rounded-none! border-none! bg-inherit! font-mono text-[0.8125rem] leading-[1.7]",...d,children:t}),G&&(0,P.jsx)("div",{className:s(ke?"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,P.jsx)(ze.Button,{onPress:()=>f(!R),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:R?"Show less":"Expand code"})})]})}var ie=require("react"),Z=T(require("react-aria-components"));var K=require("react");function vt({initialIndex:e=0,tabs:t}){let r=t[e]?.props.disabled?t.findIndex(d=>!d.props.disabled):e,[o,n]=(0,K.useState)(r===-1?0:r),a=(0,K.useRef)([]),[c,l]=(0,K.useState)({opacity:0,transform:"translateX(0)",width:0});(0,K.useEffect)(()=>{let d=a.current[o];d&&l({opacity:1,width:d.offsetWidth,transform:`translateX(${d.offsetLeft}px)`})},[o,t]);let i=(0,K.useCallback)(d=>{let m=0;if(d.key==="ArrowRight"?m=1:d.key==="ArrowLeft"&&(m=-1),m!==0){let u=(o+m+t.length)%t.length;for(;t[u].props.disabled&&u!==o;)u=(u+m+t.length)%t.length;u!==o&&!t[u].props.disabled&&(n(u),a.current[u]?.focus())}},[o,t]);return{active:o,setActive:n,tabRefs:a,indicatorStyle:c,handleKeyDown:i}}var Ye=require("class-variance-authority"),I=require("react/jsx-runtime"),Sr=(0,Ye.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"}}),Br=(0,Ye.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 yt({children:e}){let t=typeof e=="string"?(0,I.jsx)(ae,{className:"language-bash",children:(0,I.jsx)("code",{children:e.trim()})}):e;return(0,I.jsx)("div",{className:"py-4",children:t})}function Ct({defaultIndex:e=0,children:t}){let r=(0,ie.useMemo)(()=>ie.Children.toArray(t).filter(l=>(0,ie.isValidElement)(l)&&l.props?.label),[t]),{active:o,setActive:n,tabRefs:a,indicatorStyle:c}=vt({initialIndex:e,tabs:r});return(0,I.jsx)("div",{className:"my-8 w-full group/tabs",children:(0,I.jsxs)(Z.Tabs,{selectedKey:o.toString(),onSelectionChange:l=>n(Number(l)),className:"w-full",children:[(0,I.jsxs)(Z.TabList,{"aria-label":"Content Tabs",className:s(Sr()),children:[r.map((l,i)=>{let{label:d,icon:m,disabled:u}=l.props,x=i.toString();return(0,I.jsxs)(Z.Tab,{id:x,isDisabled:u,ref:g=>{a.current[i]=g},className:({isSelected:g,isDisabled:w})=>s(Br({isActive:g,isDisabled:w})),children:[!!m&&(0,I.jsx)("span",{className:"shrink-0 [&>svg]:w-4 [&>svg]:h-4",children:m}),(0,I.jsx)("span",{children:d})]},x)}),(0,I.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,I.jsx)(Z.TabPanel,{id:i.toString(),children:r[i]},i))]})})}var le=require("react"),Ce=require("react/jsx-runtime");function Rt({src:e,poster:t,alt:r,children:o,controls:n,preload:a="metadata",...c}){let l=(0,le.useRef)(null),[i,d]=(0,le.useState)(!1);return(0,le.useEffect)(()=>{let m=l.current;if(!m)return;let u=new IntersectionObserver(([x])=>{x.isIntersecting&&(d(!0),u.disconnect())},{rootMargin:"200px"});return u.observe(m),()=>u.disconnect()},[]),(0,Ce.jsx)("div",{ref:l,className:"my-6 overflow-hidden rounded-lg border border-border-subtle",children:i?(0,Ce.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,Ce.jsx)("div",{className:"aspect-video bg-bg-surface animate-pulse",role:"img","aria-label":r||"Video"})})}var Nt=require("class-variance-authority"),wt=require("react/jsx-runtime"),Ir=(0,Nt.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 Pt({variant:e="default",children:t,className:r="",...o}){return(0,wt.jsx)("span",{className:s(Ir({variant:e}),r),...o,children:t})}var Re=require("react"),kt=T(require("react-aria-components"));var Tt=require("class-variance-authority"),M=require("react/jsx-runtime"),Mr=(0,Tt.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 At({cols:e=3,children:t,className:r="",...o}){return(0,M.jsx)("div",{className:s(Mr({cols:e}),r),...o,children:t})}function Lt({title:e,icon:t,href:r,children:o,className:n="",...a}){let c=(0,Re.useRef)(null),l=(0,Re.useRef)(null),i=(0,Re.useCallback)(u=>{let x=c.current||l.current;if(!x)return;let{left:g,top:w}=x.getBoundingClientRect();x.style.setProperty("--x",`${u.clientX-g}px`),x.style.setProperty("--y",`${u.clientY-w}px`)},[]),d=(0,M.jsxs)(M.Fragment,{children:[(0,M.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,M.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,M.jsxs)("div",{className:"space-y-1.5",children:[e&&(0,M.jsx)("h3",{className:"text-sm font-bold text-text-main",children:e}),o&&(0,M.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,M.jsx)(kt.Link,{ref:l,href:r,className:s(m,"no-underline cursor-pointer"),onMouseMove:i,...a,children:d}):(0,M.jsx)("div",{ref:c,role:"presentation",className:m,onMouseMove:i,...a,children:d})}var S=require("lucide-react");var Bt=require("class-variance-authority"),N=require("react/jsx-runtime"),Er={note:(0,N.jsx)(S.Bookmark,{size:18}),tip:(0,N.jsx)(S.Lightbulb,{size:18}),info:(0,N.jsx)(S.Info,{size:18}),warning:(0,N.jsx)(S.AlertTriangle,{size:18}),danger:(0,N.jsx)(S.ShieldAlert,{size:18}),important:(0,N.jsx)(S.Flame,{size:18}),caution:(0,N.jsx)(S.Zap,{size:18})},Or={note:"Note",tip:"Tip",info:"Info",warning:"Warning",danger:"Danger",important:"Important",caution:"Caution"},St=(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 U({type:e="note",title:t,children:r,className:o="",...n}){return(0,N.jsxs)("div",{className:s(St({type:e}),o),role:e==="warning"||e==="danger"?"alert":"note",...n,children:[(0,N.jsxs)("div",{className:"flex items-center flex-row gap-2 mb-2",children:[(0,N.jsx)("span",{className:s("shrink-0",St({type:e})),children:Er[e]}),(0,N.jsx)("span",{className:"text-sm font-bold tracking-tight text-text-main",children:t||Or[e]})]}),(0,N.jsx)("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 [&>p]:mb-2 [&>p:last-child]:mb-0",children:r})]})}var It=e=>(0,N.jsx)(U,{type:"note",...e}),Mt=e=>(0,N.jsx)(U,{type:"tip",...e}),Et=e=>(0,N.jsx)(U,{type:"warning",...e}),Ot=e=>(0,N.jsx)(U,{type:"danger",...e}),Vt=e=>(0,N.jsx)(U,{type:"info",...e}),zt=e=>(0,N.jsx)(U,{type:"important",...e}),Dt=e=>(0,N.jsx)(U,{type:"caution",...e});var De=require("react"),ce=require("lucide-react");var He=require("class-variance-authority"),j=require("react/jsx-runtime"),Vr=(0,He.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}}),zr=(0,He.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}}),Dr=(0,He.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 Hr({icon:e,children:t,variant:r,dense:o}){return(0,j.jsxs)("li",{className:s(zr({variant:r,dense:o})),children:[e&&(0,j.jsx)("span",{className:s(Dr({variant:r==="bubble"?"bubble":"default"})),children:e}),(0,j.jsx)("div",{className:"flex-1 text-text-muted group-hover:text-text-main transition-colors",children:t})]})}var Fr={checked:e=>(0,j.jsx)(ce.Check,{size:14,className:s("text-emerald-500 shrink-0",e)}),arrow:e=>(0,j.jsx)(ce.ChevronRight,{size:14,className:s("text-primary-400 shrink-0",e)}),bubble:e=>(0,j.jsx)(ce.Circle,{size:6,fill:"currentColor",className:s("text-primary-500 shrink-0",e)}),default:()=>null,number:()=>null};function Ht({variant:e="default",cols:t=1,dense:r=!1,children:o,className:n,...a}){let c=t!==void 0&&Number(t)>1,l=Fr[e],i=Vr({variant:e,cols:t,dense:r,isGrid:c,className:n}),d=e==="number"?"ol":"ul";return e==="default"||e==="number"?(0,j.jsx)(d,{className:i,...a,children:o}):(0,j.jsx)("ul",{className:i,...a,children:De.Children.map(o,m=>{if(!(0,De.isValidElement)(m))return m;let u=m,x=u.type==="li"?u.props.children:u.props.children||m;return(0,j.jsx)(Hr,{icon:l(),variant:e,dense:r,children:x})})})}var q=require("react"),J=T(require("react-aria-components")),z=require("lucide-react");var C=require("react/jsx-runtime"),de=16,Ne=2,Wr={ts:Ie,tsx:ee,js:Me,jsx:ee,json:Ee,css:Oe,html:Ve,md:te,mdx:te,bash:re,sh:re,yaml:oe,yml:oe},Ze={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 et(e){return typeof e=="string"?e:typeof e=="number"?e.toString():Array.isArray(e)?e.map(et).join(""):(0,q.isValidElement)(e)&&e.props&&typeof e.props=="object"&&"children"in e.props?et(e.props.children):""}function jr(e,t){let r=e.toLowerCase(),o="shrink-0 transition-colors duration-200";if(t)return(0,C.jsx)(z.Folder,{size:de,strokeWidth:Ne,className:s(o,"text-primary-400"),fill:"currentColor",fillOpacity:.15});let n=r.split(".").pop()||"",a=Wr[n];if(a)return(0,C.jsx)(a,{size:de});let c=s(o,"text-text-dim group-hover:text-text-main");return Ze.CODE.test(r)?(0,C.jsx)(z.FileCode,{size:de,strokeWidth:Ne,className:c}):Ze.TEXT.test(r)?(0,C.jsx)(z.FileText,{size:de,strokeWidth:Ne,className:c}):Ze.IMAGE.test(r)?(0,C.jsx)(z.FileImage,{size:de,strokeWidth:Ne,className:c}):(0,C.jsx)(z.File,{size:de,strokeWidth:Ne,className:c})}function Qe(e,t){if(!(0,q.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 $r(e){let t=e.match(/\s+(\/\/|#)\s+(.*)$/);return t?{name:e.slice(0,t.index).trim(),comment:t[2]}:{name:e.trim()}}function Fe(e,t="root"){if(!(0,q.isValidElement)(e))return[];let r=[];if(Qe(e,"ul"))return q.Children.forEach(e.props.children,(o,n)=>{r.push(...Fe(o,`${t}-${n}`))}),r;if(Qe(e,"li")){let o=q.Children.toArray(e.props.children),n=o.findIndex(w=>Qe(w,"ul")),a=n!==-1,c=a?o.slice(0,n):o,l=a?o.slice(n):[],i=et(c),{name:d,comment:m}=$r(i),u=d.endsWith("/"),x=u?d.slice(0,-1):d,g=a||u;return r.push({id:`${t}-${x}`,name:x,comment:m,isFolder:g,children:a?Fe(l[0],`${t}-${x}`):void 0}),r}return e.props&&typeof e.props=="object"&&"children"in e.props&&q.Children.forEach(e.props.children,(o,n)=>{r.push(...Fe(o,`${t}-${n}`))}),r}function Ft({item:e}){return(0,C.jsxs)(J.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)(J.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)(J.Button,{slot:"chevron",className:"outline-none text-text-dim hover:text-primary-400 p-0.5 rounded transition-colors",children:(0,C.jsx)(z.ChevronRight,{size:14,strokeWidth:3,className:s("transition-transform duration-200",t&&"rotate-90")})}):(0,C.jsx)("div",{className:"w-[18px]"}),jr(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)(J.Collection,{items:e.children,children:t=>(0,C.jsx)(Ft,{item:t})})]})}function Wt({children:e}){let t=(0,q.useMemo)(()=>Fe(e),[e]);return(0,C.jsx)("div",{className:"my-8",children:(0,C.jsx)(J.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)(Ft,{item:r})})})}var Pe=T(require("react-aria-components"));var pe=require("react");function jt({data:e,sortable:t=!1,paginated:r=!1,pageSize:o=10}){let[n,a]=(0,pe.useState)(null),[c,l]=(0,pe.useState)(1),i=(0,pe.useMemo)(()=>{if(!e)return[];let x=[...e];return t&&n!==null&&x.sort((g,w)=>{let R=g[n.key],f=w[n.key],G=typeof R=="string"?R:"",H=typeof f=="string"?f:"";return G<H?n.direction==="asc"?-1:1:G>H?n.direction==="asc"?1:-1:0}),x},[e,n,t]),d=Math.ceil(i.length/o),m=(0,pe.useMemo)(()=>{if(!r)return i;let x=(c-1)*o;return i.slice(x,x+o)},[i,r,c,o]);return{sortConfig:n,currentPage:c,setCurrentPage:l,totalPages:d,paginatedData:m,requestSort:x=>{if(!t)return;let g="asc";n&&n.key===x&&n.direction==="asc"&&(g="desc"),a({key:x,direction:g})}}}var E=require("lucide-react");var h=require("react/jsx-runtime");function $t({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:u,requestSort:x}=jt({data:t,sortable:n,paginated:a,pageSize:c}),g=R=>n?l?.key!==R?(0,h.jsx)(E.ChevronDown,{size:14,className:"ml-1 opacity-30"}):l.direction==="asc"?(0,h.jsx)(E.ChevronUp,{size:14,className:"ml-1 text-primary-400"}):(0,h.jsx)(E.ChevronDown,{size:14,className:"ml-1 text-primary-400"}):null,w=r||(0,h.jsxs)(h.Fragment,{children:[e&&(0,h.jsx)("thead",{children:(0,h.jsx)("tr",{children:e.map((R,f)=>(0,h.jsx)("th",{onClick:()=>x(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,h.jsxs)("div",{className:"flex items-center",children:[R,g(f)]})},f))})}),u&&(0,h.jsx)("tbody",{children:u.map((R,f)=>(0,h.jsx)("tr",{className:"transition-colors hover:bg-bg-surface",children:R.map((G,H)=>(0,h.jsx)("td",{className:"px-3 py-2 border-b border-border-subtle text-sm text-text-muted",children:G},H))},f))})]});return(0,h.jsxs)("div",{className:s("my-6 rounded-lg border border-border-subtle overflow-hidden",o),children:[(0,h.jsx)("div",{className:"overflow-x-auto",children:(0,h.jsx)("table",{className:"w-full border-collapse text-sm",children:w})}),a&&m>1&&(0,h.jsxs)("div",{className:"flex items-center justify-between border-t border-border-subtle px-4 py-3",children:[(0,h.jsxs)("span",{className:"text-xs text-text-muted",children:["Page ",i," of ",m]}),(0,h.jsxs)("div",{className:"flex items-center gap-1",children:[(0,h.jsx)(Pe.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,h.jsx)(E.ChevronsLeft,{size:16})}),(0,h.jsx)(Pe.Button,{onPress:()=>d(R=>Math.max(R-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,h.jsx)(E.ChevronLeft,{size:16})}),(0,h.jsx)(Pe.Button,{onPress:()=>d(R=>Math.min(R+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,h.jsx)(E.ChevronRight,{size:16})}),(0,h.jsx)(Pe.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,h.jsx)(E.ChevronsRight,{size:16})})]})]})]})}var O=require("react/jsx-runtime");function Gt({name:e,type:t,defaultValue:r,required:o=!1,children:n,id:a,className:c=""}){return(0,O.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,O.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-4",children:[(0,O.jsxs)("div",{className:"flex flex-wrap items-center gap-2.5",children:[(0,O.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,O.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,O.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,O.jsx)("span",{className:"h-1 w-1 rounded-full bg-red-400 animate-pulse"}),"Required"]})]}),r&&(0,O.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,O.jsx)("span",{className:"font-semibold opacity-60 uppercase tracking-tighter",children:"Default"}),(0,O.jsx)("code",{className:"font-mono text-text-main font-medium",children:r})]})]}),(0,O.jsx)("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 selection:bg-primary-500/30",children:n})]})}var rt=T(require("react")),Kt=require("react-aria-components"),Ut=require("react-router-dom");var qt=require("react-router-dom");var me=require("react"),_r=require("react/jsx-runtime"),Gr=(0,me.createContext)({preload:()=>{},routes:[]});function We(){return(0,me.use)(Gr)}var _t=require("zustand"),je=require("zustand/middleware"),$e=(0,_t.create)()((0,je.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,je.createJSONStorage)(()=>localStorage),partialize:e=>({currentLocale:e.currentLocale,currentVersion:e.currentVersion}),onRehydrateStorage:()=>e=>{e?.setHasHydrated(!0)}}));function Jt(){let{routes:e}=We(),t=Y(),r=(0,qt.useLocation)(),o=$e(f=>f.currentLocale),n=$e(f=>f.currentVersion),a=$e(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 G=t.i18n?(f.locale||t.i18n.defaultLocale)===l:!0,H=t.versions?(f.version||t.versions.defaultVersion)===i:!0;if(!(G&&H))return!1;let ve=t.i18n;if(ve){let Je=!!c?.locale,ke=!!f.locale;if(e.some(Te=>Te!==f&&Te.filePath===f.filePath&&Te.version===f.version&&(Te.locale||ve.defaultLocale)===(f.locale||ve.defaultLocale))&&Je!==ke)return!1}return!0}),u=t.i18n?.localeConfigs?.[l]?.label||t.i18n?.locales[l]||l,g=t.versions?.versions.find(f=>f.path===i)?.label||i,w=t.i18n?Object.entries(t.i18n.locales).map(([f,G])=>{let H=t.i18n?.localeConfigs?.[f];return{key:f,label:H?.label||G,isCurrent:f===l}}):[],R=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:u,availableLocales:w,currentVersion:i,currentVersionLabel:g,availableVersions:R,config:t}}function tt(e){let t=Y(),{currentLocale:r,currentVersion:o}=Jt();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(g=>g.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 u=`/${m.join("/")}`;return u.length>1&&u.endsWith("/")?u.slice(0,-1):u||"/"}var ot=require("react/jsx-runtime"),ue=rt.default.forwardRef((e,t)=>{let{href:r,prefetch:o="hover",onMouseEnter:n,onFocus:a,...c}=e,l=tt(r??""),{preload:i}=We();return(0,ot.jsx)(Kt.Link,{...c,ref:t,href:l,onMouseEnter:u=>{n?.(u),o==="hover"&&typeof l=="string"&&l.startsWith("/")&&i(l)},onFocus:u=>{a?.(u),o==="hover"&&typeof l=="string"&&l.startsWith("/")&&i(l)}})});ue.displayName="Link";var qr=rt.default.forwardRef((e,t)=>{let{href:r,end:o=!1,className:n,children:a,...c}=e,l=(0,Ut.useLocation)(),i=tt(r??""),d=o?l.pathname===i:l.pathname.startsWith(i),m=typeof n=="function"?n({isActive:d}):s(n,d&&"active"),u=typeof a=="function"?a({isActive:d}):a;return(0,ot.jsx)(ue,{...c,ref:t,href:r,className:m,children:u})});qr.displayName="NavLink";var Yt=require("react/jsx-runtime");function Xt({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,Yt.jsx)(ue,{href:e,className:a,target:n?"_blank":void 0,rel:n?"noopener noreferrer":void 0,...o,children:t})}var fe=require("react"),Kr=require("react/jsx-runtime"),Jr=(0,fe.createContext)(void 0);function Zt(){let e=(0,fe.use)(Jr);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e}var er=require("react/jsx-runtime");function Qt({src:e,alt:t,theme:r,...o}){let{theme:n}=Zt();return r&&r!==n?null:(0,er.jsx)("img",{src:e,alt:t||"",...o})}var y=require("react/jsx-runtime");function tr({title:e,props:t,className:r=""}){return(0,y.jsxs)("div",{className:s("my-6",r),children:[e&&(0,y.jsx)("h3",{className:"text-base font-bold text-text-main mb-3",children:e}),(0,y.jsx)("div",{className:"overflow-x-auto rounded-lg border border-border-subtle",children:(0,y.jsxs)("table",{className:"w-full border-collapse text-sm",children:[(0,y.jsx)("thead",{children:(0,y.jsxs)("tr",{children:[(0,y.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,y.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,y.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,y.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,y.jsx)("tbody",{children:t.map((o,n)=>(0,y.jsxs)("tr",{className:"transition-colors hover:bg-bg-surface",children:[(0,y.jsxs)("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:[(0,y.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,y.jsx)("span",{className:"ml-1 text-red-400 font-bold",children:"*"})]}),(0,y.jsx)("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:(0,y.jsx)("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-text-muted",children:o.type})}),(0,y.jsx)("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:o.defaultValue?(0,y.jsx)("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-primary-400",children:o.defaultValue}):(0,y.jsx)("span",{className:"text-text-dim",children:"\u2014"})}),(0,y.jsx)("td",{className:"px-4 py-2.5 border-b border-border-subtle text-text-muted",children:o.description})]},`${o.name}-${n}`))})]})})]})}var nt=require("react");function rr(e){let{code:t,children:r,preview:o}=e,n=(0,nt.useMemo)(()=>(t??(typeof r=="string"?r:"")).trim(),[t,r]),a=(0,nt.useMemo)(()=>o??(typeof r!="string"?r:null),[o,r]);return{initialCode:n,previewElement:a}}var xe=require("react/jsx-runtime");function or(e){let{highlightedHtml:t,hideCode:r=!1,hideSandbox:o=!1,hideCopy:n=!1,sandboxOptions:a={}}=e,{initialCode:c,previewElement:l}=rr(e);return(0,xe.jsxs)("div",{className:"my-6 overflow-hidden rounded-xl border border-border-subtle",children:[(0,xe.jsx)("div",{className:"flex items-center justify-center p-8 bg-bg-surface",children:l}),!r&&(0,xe.jsx)("div",{className:"border-t border-border-subtle",children:(0,xe.jsx)(ae,{hideSandbox:o,hideCopy:n,title:a.title,lang:"tsx",highlightedHtml:t,plain:!0,children:c})})]})}var br=require("react"),X=require("lucide-react");var nr=require("react");var Ur=require("react-aria-components"),Ge=require("lucide-react");var sr=require("react/jsx-runtime");var we=T(require("react-aria-components")),Xr=require("lucide-react");var st=require("react/jsx-runtime");var A=T(require("react-aria-components")),Q=require("lucide-react");var v=require("react/jsx-runtime"),Yr=({children:e,isOpen:t,onOpenChange:r,className:o})=>(0,v.jsx)(A.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,v.jsx)(A.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,v.jsx)(A.Dialog,{className:"flex flex-col max-h-[70vh] focus:outline-none",children:e})})}),Zr=({children:e,className:t,onSelectionChange:r,...o})=>(0,v.jsx)("div",{className:t,children:(0,v.jsx)(A.Autocomplete,{...o,onSelectionChange:r,className:"flex flex-col min-h-0",children:e})}),Qr=({className:e,...t})=>(0,v.jsxs)(A.SearchField,{className:"flex items-center gap-3 border-b border-border-subtle px-4 py-4",autoFocus:!0,children:[(0,v.jsx)(Q.Search,{className:"h-5 w-5 text-text-muted"}),(0,v.jsx)(A.Input,{...t,className:s("w-full bg-transparent text-lg text-text-main placeholder-text-muted outline-none",e),placeholder:"Search documentation..."}),(0,v.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,v.jsx)("kbd",{className:"font-sans",children:"ESC"})})]}),eo=({children:e,className:t,...r})=>(0,v.jsx)(A.ListBox,{...r,className:s("flex-1 overflow-y-auto p-2 outline-none",t),children:e}),to=({children:e,className:t,...r})=>(0,v.jsx)(A.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,v.jsxs)(v.Fragment,{children:[e,(o.isFocused||o.isSelected)&&(0,v.jsxs)("div",{className:"ml-auto opacity-50 flex items-center gap-1",children:[(0,v.jsx)("span",{className:"text-[10px]",children:"Select"}),(0,v.jsx)(Q.CornerDownLeft,{size:10})]})]})}),ro=({isHeading:e,className:t})=>(0,v.jsx)("div",{className:s("shrink-0",t),children:e?(0,v.jsx)(Q.Hash,{size:18}):(0,v.jsx)(Q.FileText,{size:18})}),oo=({children:e,className:t})=>(0,v.jsx)("span",{className:s("block font-medium truncate flex-1 text-sm",t),children:e}),no=({children:e,className:t})=>(0,v.jsx)("span",{className:s("ml-2 text-xs opacity-70 truncate hidden sm:inline group-focus:opacity-100",t),children:e}),Ts={Root:Yr,Autocomplete:Zr,Input:Qr,List:eo,Item:Object.assign(to,{Icon:ro,Title:oo,Bio:no})};var $=require("react"),so=T(require("scroll-into-view-if-needed"));var ar=require("react");var ir=require("react/jsx-runtime"),Ws=(0,$.createContext)(null),js=(0,$.createContext)(null);var ao=({children:e,className:t,ref:r,...o})=>{let n=(0,$.useRef)(null);return(0,$.useImperativeHandle)(r,()=>n.current),(0,ir.jsx)("div",{ref:n,className:s("relative overflow-y-auto boltdocs-otp-content",t),...o,children:e})};ao.displayName="OnThisPageContent";var lr=T(require("react-aria-components")),qe=require("lucide-react");var D=require("react/jsx-runtime"),io=({children:e,className:t})=>(0,D.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}),lo=({children:e,to:t,direction:r,className:o})=>{let n=r==="next";return(0,D.jsxs)(lr.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,D.jsx)(qe.ChevronLeft,{className:"mr-3 h-5 w-5 text-text-muted group-hover:text-primary-500 transition-transform group-hover:-translate-x-1"}),(0,D.jsx)("div",{className:"flex flex-col gap-1 flex-1",children:e}),n&&(0,D.jsx)(qe.ChevronRight,{className:"ml-3 h-5 w-5 text-text-muted group-hover:text-primary-500 transition-transform group-hover:translate-x-1"})]})},co=({children:e,className:t})=>(0,D.jsx)("span",{className:s("text-xs font-medium uppercase tracking-wider text-text-muted",t),children:e}),po=({children:e,className:t})=>(0,D.jsx)("span",{className:s("text-base font-bold text-text-main truncate",t),children:e}),mo=({children:e})=>(0,D.jsx)(D.Fragment,{children:e}),qs={PageNavRoot:io,PageNavLink:Object.assign(lo,{Title:co,Description:po,Icon:mo})};var uo=require("react/jsx-runtime");var fo=T(require("react-aria-components")),xo=require("lucide-react");var cr=require("react/jsx-runtime");var at=require("react-aria-components"),bo=require("lucide-react");var go=require("react/jsx-runtime");var pr=require("react/jsx-runtime"),dr=({children:e,className:t,vertical:r=!1})=>(0,pr.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 he=require("lucide-react"),ur=T(require("react")),L=T(require("react-aria-components"));var ge=T(require("react-aria-components"));var be=require("react/jsx-runtime"),mr=({children:e,className:t,showArrow:r,...o})=>(0,be.jsxs)(ge.Popover,{offset:8,...o,className:ge.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 transition-none",n)),children:[r&&(0,be.jsx)(ge.OverlayArrow,{className:"group",children:(0,be.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,be.jsx)("path",{d:"M0 0 L6 6 L12 0"})})}),e]});var B=require("react/jsx-runtime");function fr(e){let[t,r]=ur.default.Children.toArray(e.children).slice(0,2);return(0,B.jsxs)(L.MenuTrigger,{...e,children:[t,(0,B.jsx)(mr,{placement:e.placement,className:"min-w-35",children:r})]})}function xr(e){return(0,B.jsx)(L.Menu,{...e,className:L.composeRenderProps(e.className,t=>s("p-1.5 outline-none max-h-[inherit] overflow-auto max-w-75",t))})}function it(e){let t=e.textValue||(typeof e.children=="string"?e.children:void 0);return(0,B.jsx)(L.MenuItem,{...e,textValue:t,className:L.composeRenderProps(e.className,(r,{isFocused:o,isPressed:n,isDisabled:a})=>s("group relative flex flex-row items-center gap-2 px-2 py-1 rounded-lg outline-none cursor-default hover:cursor-pointer transition-none","text-text-main text-[12px]",{"bg-bg-surface-elevated text-primary-600 ring-1 ring-border-strong/5":o,"bg-bg-surface-elevanted":n,"opacity-40 grayscale pointer-events-none":a},r)),children:L.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 size-4 shrink-0 justify-center",children:[n&&o==="multiple"&&(0,B.jsx)(he.Check,{className:"size-3.5 stroke-[2.5px] text-primary-500 animate-in zoom-in-50 duration-200"}),n&&o==="single"&&(0,B.jsx)(he.Dot,{className:"size-5 text-primary-500 animate-in zoom-in-50 duration-200"})]}),(0,B.jsx)("div",{className:"flex flex-row w-full transition-colors items-center gap-2 py-1 px-1",children:r}),a&&(0,B.jsx)(he.ChevronRight,{className:"size-4 ml-auto text-text-muted group-focused:text-primary-500/70 transition-colors"})]}))})}var ho=require("react/jsx-runtime");var _e=require("react-aria-components");var k=require("react/jsx-runtime"),vo=e=>{let[t,r]=(0,br.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 gr({content:e,mdxRaw:t,config:r}){let o=t||e||"",{copied:n,handleCopy:a,handleOpenRaw:c}=vo(o),l=r!==!1,i=typeof r=="object"&&r.text||"Copy Markdown";return!l||!o?null:(0,k.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,k.jsxs)(dr,{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,k.jsx)(ye,{variant:"ghost",onPress:a,icon:n?(0,k.jsx)(X.Check,{size:16}):(0,k.jsx)(X.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,k.jsxs)(fr,{placement:"bottom end",children:[(0,k.jsx)(ye,{variant:"ghost",isIconOnly:!0,icon:(0,k.jsx)(X.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,k.jsxs)(xr,{className:"w-52",children:[(0,k.jsxs)(it,{onAction:a,children:[(0,k.jsx)(X.Copy,{size:16,className:"size-4 mt-0.5 text-text-muted group-hover:text-primary-500"}),(0,k.jsx)("span",{className:"font-medium text-[0.8125rem]",children:"Copy Markdown"})]}),(0,k.jsxs)(it,{onAction:c,children:[(0,k.jsx)(X.ExternalLink,{size:16,className:"size-4 mt-0.5 text-text-muted group-hover:text-primary-500"}),(0,k.jsx)("span",{className:"font-medium text-[0.8125rem]",children:"View as Markdown"})]})]})]})]})})}
|
package/dist/mdx/index.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
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-2DI3OGHV.mjs";import{a as y}from"../chunk-64AJ5QLT.mjs";import"../chunk-JD3RSDE4.mjs";import"../chunk-T3W44KWY.mjs";import"../chunk-WWJ7WKDI.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};
|
|
@@ -1,292 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import React__default, { ReactNode, RefObject } from 'react';
|
|
3
|
-
import { g as BoltdocsSocialLink, C as ComponentRoute } from '../types-opDA2E9-.mjs';
|
|
4
|
-
import * as RAC from 'react-aria-components';
|
|
5
|
-
import { LinkProps } from 'react-aria-components';
|
|
6
|
-
export { Separator, ToggleButton } from 'react-aria-components';
|
|
7
|
-
export { a as Button, B as ButtonProps, L as Link, b as LinkProps, N as NavLink, c as NavLinkProps, d as buttonVariants } from '../link-DfBwCeZc.mjs';
|
|
8
|
-
import { ClassValue } from 'clsx';
|
|
9
|
-
import 'vite';
|
|
10
|
-
import 'class-variance-authority/types';
|
|
11
|
-
import 'class-variance-authority';
|
|
12
|
-
|
|
13
|
-
type ComponentBase = {
|
|
14
|
-
className?: string;
|
|
15
|
-
children?: ReactNode;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* Helper to type compound components (e.g. Navbar with Navbar.Link)
|
|
19
|
-
*/
|
|
20
|
-
type CompoundComponent<P, S> = React.FC<P> & S;
|
|
21
|
-
|
|
22
|
-
interface NavbarLinkProps extends Omit<ComponentBase, 'children'> {
|
|
23
|
-
label: ReactNode;
|
|
24
|
-
href: string;
|
|
25
|
-
active?: boolean;
|
|
26
|
-
to?: 'internal' | 'external';
|
|
27
|
-
}
|
|
28
|
-
interface NavbarLogoProps extends Omit<ComponentBase, 'children'> {
|
|
29
|
-
src: string;
|
|
30
|
-
alt: string;
|
|
31
|
-
width?: number;
|
|
32
|
-
height?: number;
|
|
33
|
-
}
|
|
34
|
-
interface NavbarSearchTriggerProps extends ComponentBase {
|
|
35
|
-
onPress: () => void;
|
|
36
|
-
}
|
|
37
|
-
interface NavbarThemeProps {
|
|
38
|
-
className?: string;
|
|
39
|
-
theme: 'dark' | 'light';
|
|
40
|
-
onThemeChange: (isSelected: boolean) => void;
|
|
41
|
-
}
|
|
42
|
-
interface NavbarSocialsProps extends ComponentBase {
|
|
43
|
-
icon: string;
|
|
44
|
-
link: string;
|
|
45
|
-
}
|
|
46
|
-
declare const NavbarRoot: ({ children, className, ...props }: ComponentBase) => react_jsx_runtime.JSX.Element;
|
|
47
|
-
declare const NavbarContent: ({ children, className }: ComponentBase) => react_jsx_runtime.JSX.Element;
|
|
48
|
-
declare const NavbarLeft: ({ children, className }: ComponentBase) => react_jsx_runtime.JSX.Element;
|
|
49
|
-
declare const NavbarRight: ({ children, className }: ComponentBase) => react_jsx_runtime.JSX.Element;
|
|
50
|
-
declare const NavbarCenter: ({ children, className }: ComponentBase) => react_jsx_runtime.JSX.Element;
|
|
51
|
-
declare const NavbarLogo: ({ src, alt, width, height, className, }: NavbarLogoProps) => react_jsx_runtime.JSX.Element;
|
|
52
|
-
declare const NavbarTitle: ({ children, className }: ComponentBase) => react_jsx_runtime.JSX.Element;
|
|
53
|
-
declare const NavbarLinks: ({ children, className }: ComponentBase) => react_jsx_runtime.JSX.Element;
|
|
54
|
-
declare const NavbarLink: ({ label, href, active, to, className, }: NavbarLinkProps) => react_jsx_runtime.JSX.Element;
|
|
55
|
-
declare const NavbarSearchTrigger: ({ className, onPress, }: NavbarSearchTriggerProps) => react_jsx_runtime.JSX.Element;
|
|
56
|
-
declare const NavbarTheme: ({ className, theme, onThemeChange, }: NavbarThemeProps) => react_jsx_runtime.JSX.Element;
|
|
57
|
-
declare const Icon: ({ name }: {
|
|
58
|
-
name: BoltdocsSocialLink["icon"];
|
|
59
|
-
}) => react_jsx_runtime.JSX.Element | undefined;
|
|
60
|
-
declare const NavbarSocials: ({ icon, link, className, }: NavbarSocialsProps) => react_jsx_runtime.JSX.Element;
|
|
61
|
-
declare const NavbarSplit: ({ className }: ComponentBase) => react_jsx_runtime.JSX.Element;
|
|
62
|
-
|
|
63
|
-
interface NavigationMenuItemProps extends ComponentBase {
|
|
64
|
-
label: string;
|
|
65
|
-
}
|
|
66
|
-
interface NavigationMenuLinkProps extends Omit<ComponentBase, 'children'> {
|
|
67
|
-
href: string;
|
|
68
|
-
label: string;
|
|
69
|
-
description?: string;
|
|
70
|
-
children?: React.ReactNode | ((opts: RAC.MenuItemRenderProps) => React.ReactNode);
|
|
71
|
-
}
|
|
72
|
-
type NavigationMenuComponent = CompoundComponent<ComponentBase, {
|
|
73
|
-
List: React.FC<ComponentBase>;
|
|
74
|
-
Item: React.FC<NavigationMenuItemProps>;
|
|
75
|
-
Link: React.FC<NavigationMenuLinkProps>;
|
|
76
|
-
}>;
|
|
77
|
-
|
|
78
|
-
interface SearchDialogProps extends ComponentBase {
|
|
79
|
-
isOpen?: boolean;
|
|
80
|
-
onOpenChange?: (isOpen: boolean) => void;
|
|
81
|
-
}
|
|
82
|
-
interface SearchDialogItemProps extends Omit<RAC.ListBoxItemProps, 'children'> {
|
|
83
|
-
className?: string;
|
|
84
|
-
children: React.ReactNode;
|
|
85
|
-
}
|
|
86
|
-
interface SearchDialogItemIconProps {
|
|
87
|
-
isHeading?: boolean;
|
|
88
|
-
className?: string;
|
|
89
|
-
}
|
|
90
|
-
declare const SearchDialogRoot: ({ children, isOpen, onOpenChange, className, }: SearchDialogProps) => react_jsx_runtime.JSX.Element;
|
|
91
|
-
declare const SearchDialogAutocomplete: <T extends object>({ children, className, onSelectionChange, ...props }: RAC.AutocompleteProps<T> & {
|
|
92
|
-
className?: string;
|
|
93
|
-
onSelectionChange?: (key: RAC.Key) => void;
|
|
94
|
-
}) => react_jsx_runtime.JSX.Element;
|
|
95
|
-
declare const SearchDialogInput: ({ className, ...props }: RAC.InputProps & {
|
|
96
|
-
className?: string;
|
|
97
|
-
}) => react_jsx_runtime.JSX.Element;
|
|
98
|
-
declare const SearchDialogList: <T extends object>({ children, className, ...props }: RAC.ListBoxProps<T> & {
|
|
99
|
-
className?: string;
|
|
100
|
-
}) => react_jsx_runtime.JSX.Element;
|
|
101
|
-
declare const SearchDialogItemRoot: ({ children, className, ...props }: SearchDialogItemProps) => react_jsx_runtime.JSX.Element;
|
|
102
|
-
declare const SearchDialogItemIcon: ({ isHeading, className, }: SearchDialogItemIconProps) => react_jsx_runtime.JSX.Element;
|
|
103
|
-
declare const SearchDialogItemTitle: ({ children, className, }: ComponentBase) => react_jsx_runtime.JSX.Element;
|
|
104
|
-
declare const SearchDialogItemBio: ({ children, className }: ComponentBase) => react_jsx_runtime.JSX.Element;
|
|
105
|
-
|
|
106
|
-
interface TOCItemType {
|
|
107
|
-
title: ReactNode;
|
|
108
|
-
url: string;
|
|
109
|
-
depth: number;
|
|
110
|
-
_step?: number;
|
|
111
|
-
}
|
|
112
|
-
type TableOfContents = TOCItemType[];
|
|
113
|
-
interface TOCItemInfo {
|
|
114
|
-
id: string;
|
|
115
|
-
active: boolean;
|
|
116
|
-
/** last time the item is updated */
|
|
117
|
-
t: number;
|
|
118
|
-
/** currently active but not intersecting in viewport */
|
|
119
|
-
fallback: boolean;
|
|
120
|
-
original?: TOCItemType;
|
|
121
|
-
}
|
|
122
|
-
interface AnchorProviderProps {
|
|
123
|
-
toc: TOCItemType[];
|
|
124
|
-
/**
|
|
125
|
-
* Only accept one active item at most
|
|
126
|
-
* @defaultValue false
|
|
127
|
-
*/
|
|
128
|
-
single?: boolean;
|
|
129
|
-
children?: ReactNode;
|
|
130
|
-
}
|
|
131
|
-
interface ScrollProviderProps {
|
|
132
|
-
/**
|
|
133
|
-
* Scroll into the view of container when active
|
|
134
|
-
*/
|
|
135
|
-
containerRef: RefObject<HTMLElement | null>;
|
|
136
|
-
children?: ReactNode;
|
|
137
|
-
}
|
|
138
|
-
interface OnThisPageContentProps extends ComponentBase {
|
|
139
|
-
ref?: React__default.Ref<HTMLDivElement>;
|
|
140
|
-
scrollRef?: RefObject<HTMLElement | null>;
|
|
141
|
-
}
|
|
142
|
-
interface OnThisPageItemProps extends ComponentBase {
|
|
143
|
-
level?: number;
|
|
144
|
-
}
|
|
145
|
-
interface OnThisPageLinkProps extends ComponentBase {
|
|
146
|
-
href?: string;
|
|
147
|
-
active?: boolean;
|
|
148
|
-
onClick?: (event: React__default.MouseEvent<HTMLAnchorElement>) => void;
|
|
149
|
-
}
|
|
150
|
-
interface OnThisPageIndicatorProps extends ComponentBase {
|
|
151
|
-
style?: React__default.CSSProperties;
|
|
152
|
-
}
|
|
153
|
-
declare function useItems(): TOCItemInfo[];
|
|
154
|
-
declare function useActiveAnchor(): string | undefined;
|
|
155
|
-
declare function useActiveAnchors(): string[];
|
|
156
|
-
/** Optional: add auto-scroll to TOC items. */
|
|
157
|
-
declare function ScrollProvider({ containerRef, children, }: ScrollProviderProps): react_jsx_runtime.JSX.Element;
|
|
158
|
-
declare function AnchorProvider({ toc, single, children, }: AnchorProviderProps): react_jsx_runtime.JSX.Element;
|
|
159
|
-
declare const OnThisPageRoot: ({ children, className }: ComponentBase) => react_jsx_runtime.JSX.Element;
|
|
160
|
-
declare const OnThisPageHeader: ({ children, className, ...props }: ComponentBase) => react_jsx_runtime.JSX.Element;
|
|
161
|
-
declare const OnThisPageContent: {
|
|
162
|
-
({ children, className, ref, ...props }: OnThisPageContentProps): react_jsx_runtime.JSX.Element;
|
|
163
|
-
displayName: string;
|
|
164
|
-
};
|
|
165
|
-
declare const OnThisPageList: ({ children, className }: ComponentBase) => react_jsx_runtime.JSX.Element;
|
|
166
|
-
declare const OnThisPageItem: ({ level, children, className, }: OnThisPageItemProps) => react_jsx_runtime.JSX.Element;
|
|
167
|
-
declare const OnThisPageLink: ({ children, href, active, onClick, className, }: OnThisPageLinkProps) => react_jsx_runtime.JSX.Element;
|
|
168
|
-
declare const OnThisPageIndicator: ({ style, className, }: OnThisPageIndicatorProps) => react_jsx_runtime.JSX.Element;
|
|
169
|
-
|
|
170
|
-
interface PageNavProps extends ComponentBase {
|
|
171
|
-
to: string;
|
|
172
|
-
direction: 'prev' | 'next';
|
|
173
|
-
}
|
|
174
|
-
declare const PageNavRoot: ({ children, className }: ComponentBase) => react_jsx_runtime.JSX.Element;
|
|
175
|
-
declare const PageNavLink: ({ children, to, direction, className, }: PageNavProps) => react_jsx_runtime.JSX.Element;
|
|
176
|
-
declare const PageNavTitle: ({ children, className }: ComponentBase) => react_jsx_runtime.JSX.Element;
|
|
177
|
-
declare const PageNavDescription: ({ children, className }: ComponentBase) => react_jsx_runtime.JSX.Element;
|
|
178
|
-
declare const PageNavIcon: ({ children }: ComponentBase) => react_jsx_runtime.JSX.Element;
|
|
179
|
-
|
|
180
|
-
interface TabsItemProps extends ComponentBase {
|
|
181
|
-
id: string;
|
|
182
|
-
selected?: boolean;
|
|
183
|
-
onClick?: () => void;
|
|
184
|
-
onKeyDown?: (event: React.KeyboardEvent) => void;
|
|
185
|
-
disabled?: boolean;
|
|
186
|
-
}
|
|
187
|
-
interface TabsIndicatorProps extends ComponentBase {
|
|
188
|
-
style?: React.CSSProperties;
|
|
189
|
-
}
|
|
190
|
-
declare const TabsRoot: ({ children, className, ...props }: ComponentBase) => react_jsx_runtime.JSX.Element;
|
|
191
|
-
declare const TabsList: ({ children, className }: ComponentBase) => react_jsx_runtime.JSX.Element;
|
|
192
|
-
declare const TabsItem: ({ children, id, selected, className, ...props }: TabsItemProps) => react_jsx_runtime.JSX.Element;
|
|
193
|
-
declare const TabsContent: ({ children, className }: ComponentBase) => react_jsx_runtime.JSX.Element;
|
|
194
|
-
declare const TabsIndicator: ({ className, style, }: TabsIndicatorProps) => react_jsx_runtime.JSX.Element;
|
|
195
|
-
|
|
196
|
-
interface SidebarGroupProps extends ComponentBase {
|
|
197
|
-
title?: string;
|
|
198
|
-
icon?: React.ElementType;
|
|
199
|
-
isOpen?: boolean;
|
|
200
|
-
onToggle?: () => void;
|
|
201
|
-
}
|
|
202
|
-
interface SidebarLinkProps extends ComponentBase {
|
|
203
|
-
label: string;
|
|
204
|
-
href: string;
|
|
205
|
-
active?: boolean;
|
|
206
|
-
icon?: React.ElementType;
|
|
207
|
-
badge?: ComponentRoute['badge'];
|
|
208
|
-
}
|
|
209
|
-
declare const SidebarRoot: ({ children, className }: ComponentBase) => react_jsx_runtime.JSX.Element;
|
|
210
|
-
declare const SidebarGroup: ({ children, title, icon: Icon, isOpen, onToggle, className, }: SidebarGroupProps) => react_jsx_runtime.JSX.Element;
|
|
211
|
-
declare const SidebarGroupItem: ({ children, className }: ComponentBase) => react_jsx_runtime.JSX.Element;
|
|
212
|
-
declare const SidebarLink: ({ label, href, active, icon: Icon, badge, className, }: SidebarLinkProps) => react_jsx_runtime.JSX.Element;
|
|
213
|
-
|
|
214
|
-
declare const BreadcrumbsRoot: ({ children, className, ...props }: ComponentBase) => react_jsx_runtime.JSX.Element;
|
|
215
|
-
declare const BreadcrumbsItem: ({ children, className, ...props }: ComponentBase) => react_jsx_runtime.JSX.Element;
|
|
216
|
-
declare const BreadcrumbsLink: ({ children, href, className, ...props }: LinkProps & {
|
|
217
|
-
className?: string;
|
|
218
|
-
}) => react_jsx_runtime.JSX.Element;
|
|
219
|
-
declare const BreadcrumbsSeparator: ({ className }: ComponentBase) => react_jsx_runtime.JSX.Element;
|
|
220
|
-
|
|
221
|
-
interface ButtonGroupProps extends ComponentBase {
|
|
222
|
-
vertical?: boolean;
|
|
223
|
-
}
|
|
224
|
-
declare const ButtonGroup: ({ children, className, vertical, }: ButtonGroupProps) => react_jsx_runtime.JSX.Element;
|
|
225
|
-
|
|
226
|
-
interface PopoverProps extends Omit<RAC.PopoverProps, 'children'> {
|
|
227
|
-
children: React.ReactNode;
|
|
228
|
-
className?: string;
|
|
229
|
-
showArrow?: boolean;
|
|
230
|
-
}
|
|
231
|
-
/**
|
|
232
|
-
* A reusable Popover primitive with premium glassmorphism styling and smooth animations.
|
|
233
|
-
*/
|
|
234
|
-
declare const Popover: ({ children, className, showArrow, ...props }: PopoverProps) => react_jsx_runtime.JSX.Element;
|
|
235
|
-
|
|
236
|
-
/**
|
|
237
|
-
* MenuTrigger wraps a trigger (usually a Button) and a Menu.
|
|
238
|
-
*/
|
|
239
|
-
interface MenuTriggerProps extends RAC.MenuTriggerProps {
|
|
240
|
-
placement?: PopoverProps['placement'];
|
|
241
|
-
}
|
|
242
|
-
declare function MenuTrigger(props: MenuTriggerProps): react_jsx_runtime.JSX.Element;
|
|
243
|
-
/**
|
|
244
|
-
* SubmenuTrigger for nested menus.
|
|
245
|
-
*/
|
|
246
|
-
declare function SubmenuTrigger(props: RAC.SubmenuTriggerProps): react_jsx_runtime.JSX.Element;
|
|
247
|
-
/**
|
|
248
|
-
* The Menu container.
|
|
249
|
-
*/
|
|
250
|
-
declare function Menu<T extends object>(props: RAC.MenuProps<T>): react_jsx_runtime.JSX.Element;
|
|
251
|
-
/**
|
|
252
|
-
* MenuItem with support for selection states and submenus.
|
|
253
|
-
*/
|
|
254
|
-
declare function MenuItem(props: RAC.MenuItemProps): react_jsx_runtime.JSX.Element;
|
|
255
|
-
/**
|
|
256
|
-
* MenuSection for grouping items with an optional header.
|
|
257
|
-
*/
|
|
258
|
-
interface MenuSectionProps<T> extends RAC.MenuSectionProps<T> {
|
|
259
|
-
title?: string;
|
|
260
|
-
}
|
|
261
|
-
declare function MenuSection<T extends object>({ title, ...props }: MenuSectionProps<T>): react_jsx_runtime.JSX.Element;
|
|
262
|
-
/**
|
|
263
|
-
* MenuSeparator for visual division.
|
|
264
|
-
*/
|
|
265
|
-
declare function MenuSeparator(props: RAC.SeparatorProps): react_jsx_runtime.JSX.Element;
|
|
266
|
-
|
|
267
|
-
interface TooltipProps extends Omit<RAC.TooltipProps, 'children'> {
|
|
268
|
-
/** The content to show inside the tooltip */
|
|
269
|
-
content: ReactNode;
|
|
270
|
-
/** The trigger element (usually a button or link) */
|
|
271
|
-
children: React.ReactElement;
|
|
272
|
-
/** Delay in milliseconds before showing the tooltip */
|
|
273
|
-
delay?: number;
|
|
274
|
-
/** Delay in milliseconds before hiding the tooltip */
|
|
275
|
-
closeDelay?: number;
|
|
276
|
-
}
|
|
277
|
-
interface TooltipContentProps extends RAC.TooltipProps {
|
|
278
|
-
}
|
|
279
|
-
declare const Tooltip: ({ content, children, delay, closeDelay, ...props }: TooltipProps) => react_jsx_runtime.JSX.Element;
|
|
280
|
-
|
|
281
|
-
interface SkeletonProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
282
|
-
variant?: 'rect' | 'circle';
|
|
283
|
-
}
|
|
284
|
-
/**
|
|
285
|
-
* A flexible skeleton component that mimics the shape of content
|
|
286
|
-
* while it is loading. Features a smooth pulse animation.
|
|
287
|
-
*/
|
|
288
|
-
declare function Skeleton({ className, variant, ...props }: SkeletonProps): react_jsx_runtime.JSX.Element;
|
|
289
|
-
|
|
290
|
-
declare function cn(...inputs: ClassValue[]): string;
|
|
291
|
-
|
|
292
|
-
export { AnchorProvider, type AnchorProviderProps, BreadcrumbsItem, BreadcrumbsLink, BreadcrumbsRoot, BreadcrumbsSeparator, ButtonGroup, type ButtonGroupProps, Icon, Menu, MenuItem, MenuSection, type MenuSectionProps, MenuSeparator, MenuTrigger, type MenuTriggerProps, NavbarCenter, NavbarContent, NavbarLeft, NavbarLink, type NavbarLinkProps, NavbarLinks, NavbarLogo, type NavbarLogoProps, NavbarRight, NavbarRoot, NavbarSearchTrigger, type NavbarSearchTriggerProps, NavbarSocials, type NavbarSocialsProps, NavbarSplit, NavbarTheme, type NavbarThemeProps, NavbarTitle, type NavigationMenuComponent, type NavigationMenuItemProps, type NavigationMenuLinkProps, OnThisPageContent, type OnThisPageContentProps, OnThisPageHeader, OnThisPageIndicator, type OnThisPageIndicatorProps, OnThisPageItem, type OnThisPageItemProps, OnThisPageLink, type OnThisPageLinkProps, OnThisPageList, OnThisPageRoot, PageNavDescription, PageNavIcon, PageNavLink, type PageNavProps, PageNavRoot, PageNavTitle, Popover, type PopoverProps, ScrollProvider, type ScrollProviderProps, SearchDialogAutocomplete, SearchDialogInput, SearchDialogItemBio, SearchDialogItemIcon, type SearchDialogItemIconProps, type SearchDialogItemProps, SearchDialogItemRoot, SearchDialogItemTitle, SearchDialogList, type SearchDialogProps, SearchDialogRoot, SidebarGroup, SidebarGroupItem, type SidebarGroupProps, SidebarLink, type SidebarLinkProps, SidebarRoot, Skeleton, SubmenuTrigger, type TOCItemInfo, type TOCItemType, type TableOfContents, TabsContent, TabsIndicator, type TabsIndicatorProps, TabsItem, type TabsItemProps, TabsList, TabsRoot, Tooltip, type TooltipContentProps, type TooltipProps, cn, useActiveAnchor, useActiveAnchors, useItems };
|