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/src/node/utils.ts
CHANGED
|
@@ -1,6 +1,26 @@
|
|
|
1
1
|
import fs from 'fs'
|
|
2
2
|
import matter from 'gray-matter'
|
|
3
3
|
import DOMPurify from 'isomorphic-dompurify'
|
|
4
|
+
import {
|
|
5
|
+
MAX_PATH_LENGTH,
|
|
6
|
+
ALLOWED_PATH_CHARS,
|
|
7
|
+
MAX_FRONTMATTER_SIZE,
|
|
8
|
+
} from './security/constants'
|
|
9
|
+
import {
|
|
10
|
+
FrontmatterSchema,
|
|
11
|
+
type FrontmatterData,
|
|
12
|
+
} from './schema/frontmatter'
|
|
13
|
+
|
|
14
|
+
export {
|
|
15
|
+
MAX_PATH_LENGTH,
|
|
16
|
+
ALLOWED_PATH_CHARS,
|
|
17
|
+
MAX_FRONTMATTER_SIZE,
|
|
18
|
+
FrontmatterSchema,
|
|
19
|
+
type FrontmatterData,
|
|
20
|
+
}
|
|
21
|
+
import { ValidationError } from './errors'
|
|
22
|
+
|
|
23
|
+
// Removed centralized constants - now in security.config.ts
|
|
4
24
|
|
|
5
25
|
/**
|
|
6
26
|
* Normalizes a file path by replacing Windows backslashes with forward slashes.
|
|
@@ -73,9 +93,41 @@ export function parseFrontmatter(filePath: string): {
|
|
|
73
93
|
} {
|
|
74
94
|
const raw = fs.readFileSync(filePath, 'utf-8')
|
|
75
95
|
try {
|
|
76
|
-
const { data, content } = matter(raw)
|
|
77
|
-
|
|
96
|
+
const { data, content, matter: rawMatter } = matter(raw)
|
|
97
|
+
|
|
98
|
+
// Security: Check frontmatter size
|
|
99
|
+
if (rawMatter && rawMatter.length > MAX_FRONTMATTER_SIZE) {
|
|
100
|
+
logSecurityEvent('FRONTMATTER_TOO_LARGE', 'Frontmatter block exceeds size limit', {
|
|
101
|
+
size: rawMatter.length,
|
|
102
|
+
file: filePath,
|
|
103
|
+
})
|
|
104
|
+
throw new ValidationError(
|
|
105
|
+
`Security breach: Frontmatter size exceeds limit of ${MAX_FRONTMATTER_SIZE} bytes`,
|
|
106
|
+
)
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// Validation: Schema check
|
|
110
|
+
const result = FrontmatterSchema.safeParse(data)
|
|
111
|
+
if (!result.success) {
|
|
112
|
+
// We could log this or throw, but for metadata we'll just filter invalid fields
|
|
113
|
+
// or we can be strict as requested.
|
|
114
|
+
// The task says "Integrar validación de esquema con Zod".
|
|
115
|
+
// Let's log it.
|
|
116
|
+
console.warn(`[VALIDATION][${filePath}] Invalid frontmatter fields detected.`)
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// Explicitly allow only known fields from the schema for security (unless we use passthrough)
|
|
120
|
+
const validatedData = result.success ? result.data : {}
|
|
121
|
+
|
|
122
|
+
// Sanitization: Clean metadata fields
|
|
123
|
+
const sanitizedData: any = { ...validatedData }
|
|
124
|
+
if (sanitizedData.title) sanitizedData.title = stripHtmlTags(sanitizedData.title).trim()
|
|
125
|
+
if (sanitizedData.description)
|
|
126
|
+
sanitizedData.description = stripHtmlTags(sanitizedData.description).trim()
|
|
127
|
+
|
|
128
|
+
return { data: sanitizedData, content }
|
|
78
129
|
} catch (e) {
|
|
130
|
+
if (e instanceof ValidationError) throw e
|
|
79
131
|
// If frontmatter is malformed (e.g. while editing), return empty data and raw content
|
|
80
132
|
return { data: {}, content: raw }
|
|
81
133
|
}
|
|
@@ -116,8 +168,11 @@ export function escapeXml(str: string): string {
|
|
|
116
168
|
* @returns The corresponding route path (e.g., '/guide')
|
|
117
169
|
*/
|
|
118
170
|
export function fileToRoutePath(relativePath: string): string {
|
|
119
|
-
// Strip number prefixes
|
|
120
|
-
let cleanedPath = relativePath
|
|
171
|
+
// Strip number prefixes and sanitize each segment
|
|
172
|
+
let cleanedPath = relativePath
|
|
173
|
+
.split('/')
|
|
174
|
+
.map((p) => stripNumberPrefix(sanitizeFilename(p)))
|
|
175
|
+
.join('/')
|
|
121
176
|
|
|
122
177
|
// Remove trailing slash if present
|
|
123
178
|
let routePath = cleanedPath.replace(/\/$/, '')
|
|
@@ -150,9 +205,60 @@ export function fileToRoutePath(relativePath: string): string {
|
|
|
150
205
|
* @returns The sanitized HTML
|
|
151
206
|
*/
|
|
152
207
|
export function sanitizeHtml(html: string): string {
|
|
153
|
-
return DOMPurify.sanitize(html
|
|
208
|
+
return DOMPurify.sanitize(html, {
|
|
209
|
+
ALLOWED_TAGS: [
|
|
210
|
+
'b',
|
|
211
|
+
'i',
|
|
212
|
+
'em',
|
|
213
|
+
'strong',
|
|
214
|
+
'a',
|
|
215
|
+
'p',
|
|
216
|
+
'br',
|
|
217
|
+
'code',
|
|
218
|
+
'pre',
|
|
219
|
+
'span',
|
|
220
|
+
'div',
|
|
221
|
+
'h1',
|
|
222
|
+
'h2',
|
|
223
|
+
'h3',
|
|
224
|
+
'h4',
|
|
225
|
+
'h5',
|
|
226
|
+
'h6',
|
|
227
|
+
'ul',
|
|
228
|
+
'ol',
|
|
229
|
+
'li',
|
|
230
|
+
'table',
|
|
231
|
+
'thead',
|
|
232
|
+
'tbody',
|
|
233
|
+
'tr',
|
|
234
|
+
'th',
|
|
235
|
+
'td',
|
|
236
|
+
'blockquote',
|
|
237
|
+
'hr',
|
|
238
|
+
],
|
|
239
|
+
ALLOWED_ATTR: ['href', 'title', 'target', 'class', 'id', 'src', 'alt', 'width', 'height'],
|
|
240
|
+
FORCE_BODY: true,
|
|
241
|
+
})
|
|
154
242
|
}
|
|
155
243
|
|
|
244
|
+
// Security Hook: Validate URL protocols in href/src
|
|
245
|
+
DOMPurify.addHook('afterSanitizeAttributes', (node) => {
|
|
246
|
+
// Check for href
|
|
247
|
+
if (node.hasAttribute('href')) {
|
|
248
|
+
const href = node.getAttribute('href')?.toLowerCase() || ''
|
|
249
|
+
if (href.startsWith('javascript:') || href.startsWith('data:') || href.startsWith('vbscript:')) {
|
|
250
|
+
node.removeAttribute('href')
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
// Check for src
|
|
254
|
+
if (node.hasAttribute('src')) {
|
|
255
|
+
const src = node.getAttribute('src')?.toLowerCase() || ''
|
|
256
|
+
if (src.startsWith('javascript:') || src.startsWith('data:') || src.startsWith('vbscript:')) {
|
|
257
|
+
node.removeAttribute('src')
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
})
|
|
261
|
+
|
|
156
262
|
/**
|
|
157
263
|
* Strips all HTML tags from a string, returning only the text content.
|
|
158
264
|
* Uses DOMPurify for secure and complete tag removal.
|
|
@@ -199,3 +305,45 @@ export function getTranslated(
|
|
|
199
305
|
const firstValue = Object.values(value)[0]
|
|
200
306
|
return firstValue || ''
|
|
201
307
|
}
|
|
308
|
+
/**
|
|
309
|
+
* Sanitizes a filename or path component by removing dangerous characters.
|
|
310
|
+
* Prevents multiple dots to avoid path traversal tricks.
|
|
311
|
+
*
|
|
312
|
+
* @param name - The name to sanitize
|
|
313
|
+
* @returns The sanitized name
|
|
314
|
+
*/
|
|
315
|
+
export function sanitizeFilename(name: string): string {
|
|
316
|
+
return name
|
|
317
|
+
.replace(/[^a-zA-Z0-9\-_\/\.]/g, '') // Remove non-whitelisted characters
|
|
318
|
+
.split('/')
|
|
319
|
+
.filter((p) => p !== '..' && p !== '.') // Remove traversal and current dir indicators
|
|
320
|
+
.map((p) => p.replace(/\.\.+/g, '.')) // Prevent multiple dots in segments
|
|
321
|
+
.join('/')
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* Logs a security violation with relevant metadata.
|
|
326
|
+
* Redacts absolute paths to prevent information leakage.
|
|
327
|
+
*/
|
|
328
|
+
export function logSecurityEvent(
|
|
329
|
+
type: string,
|
|
330
|
+
message: string,
|
|
331
|
+
details: Record<string, any> = {},
|
|
332
|
+
): void {
|
|
333
|
+
const timestamp = new Date().toISOString()
|
|
334
|
+
const redactedDetails = { ...details }
|
|
335
|
+
|
|
336
|
+
// Simple redaction logic for potential system paths
|
|
337
|
+
for (const key in redactedDetails) {
|
|
338
|
+
if (typeof redactedDetails[key] === 'string' && redactedDetails[key].includes(':')) {
|
|
339
|
+
// Very basic redaction: just keep the filename part if it looks like a path
|
|
340
|
+
redactedDetails[key] = redactedDetails[key].split(/[\\/]/).pop() || redactedDetails[key]
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
console.error(
|
|
345
|
+
`[SECURITY][${timestamp}] TYPE: ${type} | MESSAGE: ${message} | DETAILS: ${JSON.stringify(
|
|
346
|
+
redactedDetails,
|
|
347
|
+
)}`,
|
|
348
|
+
)
|
|
349
|
+
}
|
package/tsup.config.ts
CHANGED
|
@@ -42,12 +42,6 @@ export default defineConfig([
|
|
|
42
42
|
platform: 'browser',
|
|
43
43
|
entry: {
|
|
44
44
|
'client/index': 'src/client/index.ts',
|
|
45
|
-
'client/types': 'src/client/types.ts',
|
|
46
|
-
'hooks/index': 'src/client/hooks/index.ts',
|
|
47
|
-
'primitives/index': 'src/client/components/primitives/index.ts',
|
|
48
|
-
'base-ui/index': 'src/client/components/ui-base/index.ts',
|
|
49
|
-
'mdx/index': 'src/client/components/mdx/index.ts',
|
|
50
|
-
'integrations/index': 'src/client/integrations/index.ts',
|
|
51
45
|
},
|
|
52
46
|
},
|
|
53
47
|
// SSR Build (Needs Node platform for Server-Side Rendering)
|
package/dist/base-ui/index.d.mts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export { B as Breadcrumbs, E as ErrorBoundary, H as Head, L as Loading, N as Navbar, a as NotFound, O as OnThisPage, P as PageNav, S as Sidebar } from '../loading-BwUos0wZ.mjs';
|
|
2
|
-
export { C as CopyMarkdown, a as CopyMarkdownProps } from '../copy-markdown--9yjpbyy.mjs';
|
|
3
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
-
import { C as ComponentRoute, a as BoltdocsTab } from '../types-opDA2E9-.mjs';
|
|
5
|
-
import 'react';
|
|
6
|
-
import 'vite';
|
|
7
|
-
|
|
8
|
-
declare function GithubStars({ repo }: {
|
|
9
|
-
repo: string;
|
|
10
|
-
}): react_jsx_runtime.JSX.Element;
|
|
11
|
-
|
|
12
|
-
declare function PoweredBy(): react_jsx_runtime.JSX.Element;
|
|
13
|
-
|
|
14
|
-
declare function SearchDialog({ routes }: {
|
|
15
|
-
routes: ComponentRoute[];
|
|
16
|
-
}): react_jsx_runtime.JSX.Element;
|
|
17
|
-
|
|
18
|
-
declare function Tabs({ tabs, routes, }: {
|
|
19
|
-
tabs: BoltdocsTab[];
|
|
20
|
-
routes: ComponentRoute[];
|
|
21
|
-
}): react_jsx_runtime.JSX.Element;
|
|
22
|
-
|
|
23
|
-
declare function ThemeToggle(): react_jsx_runtime.JSX.Element;
|
|
24
|
-
|
|
25
|
-
export { GithubStars, PoweredBy, SearchDialog, Tabs, ThemeToggle };
|
package/dist/base-ui/index.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export { B as Breadcrumbs, E as ErrorBoundary, H as Head, L as Loading, N as Navbar, a as NotFound, O as OnThisPage, P as PageNav, S as Sidebar } from '../loading-nlnUD01v.js';
|
|
2
|
-
export { C as CopyMarkdown, a as CopyMarkdownProps } from '../copy-markdown-l2MYkcG7.js';
|
|
3
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
-
import { C as ComponentRoute, a as BoltdocsTab } from '../types-opDA2E9-.js';
|
|
5
|
-
import 'react';
|
|
6
|
-
import 'vite';
|
|
7
|
-
|
|
8
|
-
declare function GithubStars({ repo }: {
|
|
9
|
-
repo: string;
|
|
10
|
-
}): react_jsx_runtime.JSX.Element;
|
|
11
|
-
|
|
12
|
-
declare function PoweredBy(): react_jsx_runtime.JSX.Element;
|
|
13
|
-
|
|
14
|
-
declare function SearchDialog({ routes }: {
|
|
15
|
-
routes: ComponentRoute[];
|
|
16
|
-
}): react_jsx_runtime.JSX.Element;
|
|
17
|
-
|
|
18
|
-
declare function Tabs({ tabs, routes, }: {
|
|
19
|
-
tabs: BoltdocsTab[];
|
|
20
|
-
routes: ComponentRoute[];
|
|
21
|
-
}): react_jsx_runtime.JSX.Element;
|
|
22
|
-
|
|
23
|
-
declare function ThemeToggle(): react_jsx_runtime.JSX.Element;
|
|
24
|
-
|
|
25
|
-
export { GithubStars, PoweredBy, SearchDialog, Tabs, ThemeToggle };
|
package/dist/base-ui/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var vr=Object.create;var Fe=Object.defineProperty;var br=Object.getOwnPropertyDescriptor;var yr=Object.getOwnPropertyNames;var Cr=Object.getPrototypeOf,Nr=Object.prototype.hasOwnProperty;var N=(e,t)=>()=>(e&&(t=e(e=0)),t);var Xt=(e,t)=>{for(var o in t)Fe(e,o,{get:t[o],enumerable:!0})},Jt=(e,t,o,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of yr(t))!Nr.call(e,n)&&n!==o&&Fe(e,n,{get:()=>t[n],enumerable:!(r=br(t,n))||r.enumerable});return e};var D=(e,t,o)=>(o=e!=null?vr(Cr(e)):{},Jt(t||!e||!e.__esModule?Fe(o,"default",{value:e,enumerable:!0}):o,e)),Pr=e=>Jt(Fe({},"__esModule",{value:!0}),e);var a=N(()=>{"use strict"});function _(){let e=(0,Ue.use)(wr);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e}var Ue,wr,xe=N(()=>{"use strict";a();Ue=require("react"),wr=(0,Ue.createContext)(null)});function je(){return(0,ve.use)(Rr)}var ve,Tr,Rr,ft=N(()=>{"use strict";a();ve=require("react"),Tr=require("react/jsx-runtime"),Rr=(0,ve.createContext)({preload:()=>{},routes:[]})});var Qt,_e,re,Ke=N(()=>{"use strict";a();Qt=require("zustand"),_e=require("zustand/middleware"),re=(0,Qt.create)()((0,_e.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,_e.createJSONStorage)(()=>localStorage),partialize:e=>({currentLocale:e.currentLocale,currentVersion:e.currentVersion}),onRehydrateStorage:()=>e=>{e?.setHasHydrated(!0)}}))});function S(){let{routes:e}=je(),t=_(),o=(0,Yt.useLocation)(),r=re(h=>h.currentLocale),n=re(h=>h.currentVersion),s=re(h=>h.hasHydrated),i=e.find(h=>h.path===o.pathname),l=t.i18n?i?.locale||(s?r:void 0)||t.i18n.defaultLocale:void 0,c=t.versions?i?.version||(s?n:void 0)||t.versions.defaultVersion:void 0,g=e.filter(h=>{let A=t.i18n?(h.locale||t.i18n.defaultLocale)===l:!0,pe=t.versions?(h.version||t.versions.defaultVersion)===c:!0;if(!(A&&pe))return!1;let he=t.i18n;if(he){let Be=!!i?.locale,Ae=!!h.locale;if(e.some(G=>G!==h&&G.filePath===h.filePath&&G.version===h.version&&(G.locale||he.defaultLocale)===(h.locale||he.defaultLocale))&&Be!==Ae)return!1}return!0}),p=t.i18n?.localeConfigs?.[l]?.label||t.i18n?.locales[l]||l,C=t.versions?.versions.find(h=>h.path===c)?.label||c,v=t.i18n?Object.entries(t.i18n.locales).map(([h,A])=>{let pe=t.i18n?.localeConfigs?.[h];return{key:h,label:pe?.label||A,isCurrent:h===l}}):[],b=t.versions?t.versions.versions.map(h=>({key:h.path,label:h.label,isCurrent:h.path===c})):[];return{routes:g,allRoutes:e,currentRoute:i,currentLocale:l,currentLocaleLabel:p,availableLocales:v,currentVersion:c,currentVersionLabel:C,availableVersions:b,config:t}}var Yt,K=N(()=>{"use strict";a();Yt=require("react-router-dom");xe();ft();Ke()});function m(...e){return(0,to.twMerge)((0,eo.clsx)(e))}var eo,to,I=N(()=>{"use strict";a();eo=require("clsx"),to=require("tailwind-merge")});var be,oo,Me,ro,gt,ht,no,xt=N(()=>{"use strict";a();be=require("react-aria-components"),oo=require("lucide-react");I();Me=require("react/jsx-runtime"),ro=({children:e,className:t,...o})=>(0,Me.jsx)(be.Breadcrumbs,{className:m("flex items-center gap-1.5 pl-0! mb-0 text-sm text-text-muted",t),...o,children:e}),gt=({children:e,className:t,...o})=>(0,Me.jsx)(be.Breadcrumb,{className:m("flex items-center mb-0 gap-1.5",t),...o,children:e}),ht=({children:e,href:t,className:o,...r})=>(0,Me.jsx)(be.Link,{href:t,className:m("transition-colors outline-none hover:text-text-main focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-sm","current:font-medium current:text-text-main current:pointer-events-none cursor-pointer",o),...r,children:e}),no=({className:e})=>(0,Me.jsx)(oo.ChevronRight,{size:14,className:m("shrink-0 text-text-dim",e)})});function qe(e){let{size:t=20,...o}=e;return{...o,width:t,height:t}}var $,Xe,io,lo,co,vt=N(()=>{"use strict";a();$=require("react/jsx-runtime");Xe=e=>(0,$.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...qe(e),children:[(0,$.jsx)("title",{children:"GitHub"}),(0,$.jsx)("path",{d:"M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"})]}),io=e=>(0,$.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...qe(e),children:[(0,$.jsx)("title",{children:"Discord"}),(0,$.jsx)("path",{d:"M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418Z"})]}),lo=e=>(0,$.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...qe(e),children:[(0,$.jsx)("title",{children:"X"}),(0,$.jsx)("path",{d:"M14.234 10.162 22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299-.929-1.329L3.076 1.56h3.182l5.965 8.532.929 1.329 7.754 11.09h-3.182z"})]}),co=e=>(0,$.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",...qe(e),children:[(0,$.jsx)("title",{children:"Bluesky"}),(0,$.jsx)("path",{d:"M5.202 2.857C7.954 4.922 10.913 9.11 12 11.358c1.087-2.247 4.046-6.436 6.798-8.501C20.783 1.366 24 .213 24 3.883c0 .732-.42 6.156-.667 7.037-.856 3.061-3.978 3.842-6.755 3.37 4.854.826 6.089 3.562 3.422 6.299-5.065 5.196-7.28-1.304-7.847-2.97-.104-.305-.152-.448-.153-.327 0-.121-.05.022-.153.327-.568 1.666-2.782 8.166-7.847 2.97-2.667-2.737-1.432-5.473 3.422-6.3-2.777.473-5.899-.308-6.755-3.369C.42 10.04 0 4.615 0 3.883c0-3.67 3.217-2.517 5.202-1.026"})]})});var Je,mo,ne,y,kr,Sr,Ir,Br,Ar,Mr,Or,Er,zr,Dr,Vr,Hr,$r,Wr,V,Qe=N(()=>{"use strict";a();Je=require("react");Ye();mo=require("react-aria-components"),ne=require("lucide-react");vt();y=require("react/jsx-runtime"),kr=({children:e,className:t,...o})=>(0,y.jsx)("header",{className:m("boltdocs-navbar sticky top-0 z-50 w-full border-b border-border-subtle bg-bg-main/80 backdrop-blur-md",t),...o,children:e}),Sr=({children:e,className:t})=>(0,y.jsx)("div",{className:m("mx-auto flex lg:h-navbar max-w-(--breakpoint-3xl) items-center justify-between px-4 md:px-6",t),children:e}),Ir=({children:e,className:t})=>(0,y.jsx)("div",{className:m("flex flex-1 items-center justify-start gap-4 min-w-0",t),children:e}),Br=({children:e,className:t})=>(0,y.jsx)("div",{className:m("flex flex-1 items-center justify-end gap-2 md:gap-4 min-w-0",t),children:e}),Ar=({children:e,className:t})=>(0,y.jsx)("div",{className:m("hidden lg:flex flex-1 justify-center items-center gap-4 px-4 min-w-0 w-full",t),children:e}),Mr=({src:e,alt:t,width:o=24,height:r=24,className:n})=>(0,y.jsx)(W,{href:"/",className:m("flex items-center gap-2 shrink-0 outline-none",n),children:e?(0,y.jsx)("img",{src:e,alt:t,width:o,height:r,className:"h-6 w-6 object-contain"}):null}),Or=({children:e,className:t})=>(0,y.jsx)(W,{href:"/",children:(0,y.jsx)("span",{className:m("text-lg font-bold tracking-tight hidden sm:inline-block",t),children:e})}),Er=({children:e,className:t})=>(0,y.jsx)("nav",{className:m("hidden md:flex items-center gap-6 text-sm font-medium",t),children:e}),zr=({label:e,href:t,active:o,to:r,className:n})=>(0,y.jsxs)(W,{href:t,target:r==="external"?"_blank":void 0,className:m("transition-colors outline-none font-medium focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-sm",{"text-primary-500":o,"text-text-muted hover:text-text-main":!o},n),children:[e,r==="external"&&(0,y.jsx)("span",{className:"ml-1 inline-block",children:(0,y.jsx)(ne.ExternalLink,{size:12})})]}),Dr=({className:e,onPress:t})=>{let[o,r]=(0,Je.useState)(!1),n=o&&/Mac|iPod|iPhone|iPad/.test(navigator.platform);return(0,Je.useEffect)(()=>{r(!0)},[]),(0,y.jsxs)(mo.Button,{onPress:t,className:m("flex items-center gap-2 rounded-full border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-muted outline-none cursor-pointer","transition-all duration-200 hover:border-border-strong hover:text-text-main hover:bg-bg-muted hover:shadow-sm active:scale-[0.98]","focus-visible:ring-2 focus-visible:ring-primary-500/30","w-full max-w-[720px] justify-between",e),children:[(0,y.jsxs)("div",{className:"flex items-center gap-2",children:[(0,y.jsx)(ne.Search,{size:16}),(0,y.jsx)("span",{className:"hidden sm:inline-block",children:"Search docs..."})]}),(0,y.jsxs)("div",{className:"hidden sm:flex items-center gap-1 pointer-events-none select-none",children:[(0,y.jsx)("kbd",{className:"flex h-5 items-center justify-center rounded border border-border-subtle bg-bg-main px-1.5 font-mono text-[10px] font-medium",children:n?"\u2318":"Ctrl"}),(0,y.jsx)("kbd",{className:"flex h-5 w-5 items-center justify-center rounded border border-border-subtle bg-bg-main font-mono text-[10px] font-medium",children:"K"})]})]})},Vr=({className:e,theme:t,onThemeChange:o})=>(0,y.jsx)(ye.ToggleButton,{isSelected:t==="dark",onChange:o,className:m("rounded-md p-2 text-text-muted outline-none cursor-pointer","transition-all duration-300 hover:bg-bg-surface hover:text-text-main hover:rotate-12 active:scale-90","focus-visible:ring-2 focus-visible:ring-primary-500/30",e),"aria-label":"Toggle theme",children:t==="dark"?(0,y.jsx)(ne.Sun,{size:20}):(0,y.jsx)(ne.Moon,{size:20})}),Hr=({name:e})=>{if(e==="github")return(0,y.jsx)(Xe,{});if(e==="discord")return(0,y.jsx)(io,{});if(e==="x")return(0,y.jsx)(lo,{});if(e==="bluesky")return(0,y.jsx)(co,{})},$r=({icon:e,link:t,className:o})=>(0,y.jsx)(W,{href:t,target:"_blank",rel:"noopener noreferrer",className:m("rounded-md p-2 text-text-muted outline-none transition-colors","hover:bg-bg-surface hover:text-text-main","focus-visible:ring-2 focus-visible:ring-primary-500/30",o),children:(0,y.jsx)(Hr,{name:e})}),Wr=({className:e})=>(0,y.jsx)(ye.Separator,{orientation:"vertical",className:m("h-6 w-px bg-border-subtle mx-1",e)}),V={NavbarRoot:kr,NavbarLeft:Ir,NavbarRight:Br,NavbarCenter:Ar,NavbarLogo:Mr,Title:Or,Links:Er,Link:zr,SearchTrigger:Dr,Theme:Vr,Socials:$r,Split:Wr,Content:Sr}});var Oe,Gr,bt,po=N(()=>{"use strict";a();Oe=D(require("react-aria-components")),Gr=require("lucide-react");I();bt=require("react/jsx-runtime")});var M,ae,P,yt,Ct,Nt,Pt,wt,Rt,Tt,Lt,pa,kt=N(()=>{"use strict";a();M=D(require("react-aria-components")),ae=require("lucide-react");I();P=require("react/jsx-runtime"),yt=({children:e,isOpen:t,onOpenChange:o,className:r})=>(0,P.jsx)(M.ModalOverlay,{isOpen:t,onOpenChange:o,isDismissable:!0,className:m("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,P.jsx)(M.Modal,{className:m("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",r),children:(0,P.jsx)(M.Dialog,{className:"flex flex-col max-h-[70vh] focus:outline-none",children:e})})}),Ct=({children:e,className:t,onSelectionChange:o,...r})=>(0,P.jsx)("div",{className:t,children:(0,P.jsx)(M.Autocomplete,{...r,onSelectionChange:o,className:"flex flex-col min-h-0",children:e})}),Nt=({className:e,...t})=>(0,P.jsxs)(M.SearchField,{className:"flex items-center gap-3 border-b border-border-subtle px-4 py-4",autoFocus:!0,children:[(0,P.jsx)(ae.Search,{className:"h-5 w-5 text-text-muted"}),(0,P.jsx)(M.Input,{...t,className:m("w-full bg-transparent text-lg text-text-main placeholder-text-muted outline-none",e),placeholder:"Search documentation..."}),(0,P.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,P.jsx)("kbd",{className:"font-sans",children:"ESC"})})]}),Pt=({children:e,className:t,...o})=>(0,P.jsx)(M.ListBox,{...o,className:m("flex-1 overflow-y-auto p-2 outline-none",t),children:e}),wt=({children:e,className:t,...o})=>(0,P.jsx)(M.ListBoxItem,{...o,className:m("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:r=>(0,P.jsxs)(P.Fragment,{children:[e,(r.isFocused||r.isSelected)&&(0,P.jsxs)("div",{className:"ml-auto opacity-50 flex items-center gap-1",children:[(0,P.jsx)("span",{className:"text-[10px]",children:"Select"}),(0,P.jsx)(ae.CornerDownLeft,{size:10})]})]})}),Rt=({isHeading:e,className:t})=>(0,P.jsx)("div",{className:m("shrink-0",t),children:e?(0,P.jsx)(ae.Hash,{size:18}):(0,P.jsx)(ae.FileText,{size:18})}),Tt=({children:e,className:t})=>(0,P.jsx)("span",{className:m("block font-medium truncate flex-1 text-sm",t),children:e}),Lt=({children:e,className:t})=>(0,P.jsx)("span",{className:m("ml-2 text-xs opacity-70 truncate hidden sm:inline group-focus:opacity-100",t),children:e}),pa={Root:yt,Autocomplete:Ct,Input:Nt,List:Pt,Item:Object.assign(wt,{Icon:Rt,Title:Tt,Bio:Lt})}});function uo(e,t){let o=(0,Ze.useRef)(e);(0,Ze.useEffect)(()=>{o.current!==e&&(t(e),o.current=e)},[e,t])}var Ze,fo=N(()=>{"use strict";a();Ze=require("react")});function St(e){return e.startsWith("#")?e.slice(1):null}var et,go=N(()=>{"use strict";a();et=class{items=[];single=!1;observer=null;onChange;callback(t){if(t.length===0)return;for(let r of t){let n=this.items.find(s=>s.id===r.target.id);if(n){n.active=r.isIntersecting;let s=100;n.fallback=!r.isIntersecting&&r.boundingClientRect.top<s}}let o=-1;for(let r=this.items.length-1;r>=0;r--)if(this.items[r].fallback){o=r;break}o===-1&&this.items.length>0&&(o=0),this.items=this.items.map((r,n)=>({...r,active:n===o,t:n===o?Date.now():r.t})),this.onChange?.()}setItems(t){let o=this.observer;if(o)for(let r of this.items){let n=document.getElementById(r.id);n&&o.unobserve(n)}this.items=[];for(let r of t){let n=St(r.url);n&&this.items.push({id:n,active:!1,fallback:!1,t:0,original:r})}this.watchItems(),typeof window<"u"&&(setTimeout(()=>this.watchItems(),100),setTimeout(()=>this.watchItems(),500),setTimeout(()=>this.watchItems(),1e3)),this.onChange?.()}watch(t){this.observer||(this.observer=new IntersectionObserver(this.callback.bind(this),t),this.watchItems())}watchItems(){if(this.observer)for(let t of this.items){let o=document.getElementById(t.id);o&&this.observer.observe(o)}}unwatch(){this.observer?.disconnect(),this.observer=null}}});function Fr(){let e=(0,R.use)(It);if(!e)throw new Error("Component must be used under the <AnchorProvider /> component.");return e}function vo(){let e=Fr();return(0,R.useMemo)(()=>{let t;for(let o of e)o.active&&(!t||o.t>t.t)&&(t=o);return t?.id},[e])}function bo({containerRef:e,children:t}){return(0,q.jsx)(xo.Provider,{value:e,children:t})}function yo({toc:e,single:t=!1,children:o}){let r=(0,R.useMemo)(()=>new et,[]),[n,s]=(0,R.useState)(r.items);return r.single=t,(0,R.useEffect)(()=>{r.setItems(e)},[r,e]),(0,R.useEffect)(()=>(r.watch({rootMargin:"-100px 0% 0% 0%",threshold:0}),r.onChange=()=>s([...r.items]),()=>{r.unwatch()}),[r]),(0,q.jsx)(It.Provider,{value:n,children:o})}var R,ho,q,It,xo,Ur,jr,Co,_r,Kr,qr,Xr,de,Bt=N(()=>{"use strict";a();R=require("react"),ho=D(require("scroll-into-view-if-needed"));I();fo();go();q=require("react/jsx-runtime"),It=(0,R.createContext)(null),xo=(0,R.createContext)(null);Ur=({children:e,className:t})=>(0,q.jsx)("nav",{className:m("sticky top-navbar hidden xl:flex flex-col shrink-0","w-toc","py-8 pl-6 pr-4",t),children:e}),jr=({children:e,className:t,...o})=>(0,q.jsx)("div",{className:m("mb-4 text-xs font-bold uppercase tracking-wider text-text-main",t),...o,children:e}),Co=({children:e,className:t,ref:o,...r})=>{let n=(0,R.useRef)(null);return(0,R.useImperativeHandle)(o,()=>n.current),(0,q.jsx)("div",{ref:n,className:m("relative overflow-y-auto boltdocs-otp-content",t),...r,children:e})};Co.displayName="OnThisPageContent";_r=({children:e,className:t})=>(0,q.jsx)("ul",{className:m("relative space-y-1 text-sm border-l border-border-subtle",t),children:e}),Kr=({level:e,children:t,className:o})=>(0,q.jsx)("li",{className:m(e===3&&"pl-3",o),children:t}),qr=({children:e,href:t,active:o,onClick:r,className:n})=>{let s=(0,R.use)(It),i=(0,R.use)(xo),l=t?St(t):null,c=(0,R.useRef)(null),[g,u]=(0,R.useState)(o);return uo(l&&s?s.find(p=>p.id===l)?.active:null,p=>{p!==null&&p!==g&&(u(!!p),p&&c.current&&i?.current&&(0,ho.default)(c.current,{behavior:"smooth",block:"center",inline:"center",scrollMode:"if-needed",boundary:i.current}))}),(0,R.useEffect)(()=>{o!==void 0&&u(o)},[o]),(0,q.jsx)("a",{ref:c,href:t,onClick:r,"data-active":g,className:m("block py-1 pl-4 text-[13px] outline-none transition-colors hover:text-text-main",g?"text-primary-500 font-medium":"text-text-muted",n),children:e})},Xr=({style:e,className:t})=>(0,q.jsx)("div",{className:m("absolute -left-px w-0.5 rounded-full bg-primary-500 transition-all duration-300",t),style:e}),de={OnThisPageRoot:Ur,OnThisPageHeader:jr,OnThisPageContent:Co,OnThisPageList:_r,OnThisPageItem:Kr,OnThisPageLink:qr,OnThisPageIndicator:Xr}});var No,tt,F,Jr,Qr,Yr,Zr,en,se,At=N(()=>{"use strict";a();No=D(require("react-aria-components")),tt=require("lucide-react");I();F=require("react/jsx-runtime"),Jr=({children:e,className:t})=>(0,F.jsx)("nav",{className:m("grid grid-cols-1 sm:grid-cols-2 gap-4 mt-12 pt-8 border-t border-border-subtle",t),children:e}),Qr=({children:e,to:t,direction:o,className:r})=>{let n=o==="next";return(0,F.jsxs)(No.Link,{href:t,className:m("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",r),children:[!n&&(0,F.jsx)(tt.ChevronLeft,{className:"mr-3 h-5 w-5 text-text-muted group-hover:text-primary-500 transition-transform group-hover:-translate-x-1"}),(0,F.jsx)("div",{className:"flex flex-col gap-1 flex-1",children:e}),n&&(0,F.jsx)(tt.ChevronRight,{className:"ml-3 h-5 w-5 text-text-muted group-hover:text-primary-500 transition-transform group-hover:translate-x-1"})]})},Yr=({children:e,className:t})=>(0,F.jsx)("span",{className:m("text-xs font-medium uppercase tracking-wider text-text-muted",t),children:e}),Zr=({children:e,className:t})=>(0,F.jsx)("span",{className:m("text-base font-bold text-text-main truncate",t),children:e}),en=({children:e})=>(0,F.jsx)(F.Fragment,{children:e}),se={PageNavRoot:Jr,PageNavLink:Object.assign(Qr,{Title:Yr,Description:Zr,Icon:en})}});var Ce,tn,on,rn,nn,an,Mt,Ot=N(()=>{"use strict";a();I();Ce=require("react/jsx-runtime"),tn=({children:e,className:t="",...o})=>(0,Ce.jsx)("div",{className:m("w-full",t),...o,children:e}),on=({children:e,className:t=""})=>(0,Ce.jsx)("div",{role:"tablist",className:m("relative flex flex-row items-center border-b border-border-subtle",t),children:e}),rn=({children:e,id:t,selected:o,className:r="",...n})=>(0,Ce.jsx)("button",{role:"tab","aria-selected":o,className:m("flex items-center gap-2 px-4 py-2 text-sm font-medium transition-colors outline-none cursor-pointer bg-transparent border-none",o?"text-primary-500":"text-text-muted hover:text-text-main",r),...n,children:e}),nn=({children:e,className:t=""})=>(0,Ce.jsx)("div",{className:m("p-4 outline-none",t),children:e}),an=({className:e="",style:t})=>(0,Ce.jsx)("div",{className:m("absolute bottom-0 h-0.5 bg-primary-500 transition-all duration-300",e),style:t}),Mt={TabsRoot:tn,TabsList:on,TabsItem:rn,TabsContent:nn,TabsIndicator:an}});function Ee(e){let t=_(),{currentLocale:o,currentVersion:r}=S();if(!t||typeof e!="string"||e.startsWith("http")||e.startsWith("//"))return e;let n=t.i18n,s=t.versions;if(!n&&!s)return e;let i=e.startsWith("/docs"),l=e.split("/").filter(Boolean),c=0;l[c]==="docs"&&c++,s&&l.length>c&&s.versions.find(C=>C.path===l[c])&&c++,n&&l.length>c&&n.locales[l[c]]&&c++;let g=l.slice(c),u=[];i&&(u.push("docs"),s&&r&&u.push(r)),n&&o&&o!==n.defaultLocale&&u.push(o),u.push(...g);let p=`/${u.join("/")}`;return p.length>1&&p.endsWith("/")?p.slice(0,-1):p||"/"}var Et=N(()=>{"use strict";a();xe();K()});var zt,Po,wo,Dt,W,sn,ze=N(()=>{"use strict";a();zt=D(require("react")),Po=require("react-aria-components"),wo=require("react-router-dom");Et();ft();I();Dt=require("react/jsx-runtime"),W=zt.default.forwardRef((e,t)=>{let{href:o,prefetch:r="hover",onMouseEnter:n,onFocus:s,...i}=e,l=Ee(o??""),{preload:c}=je();return(0,Dt.jsx)(Po.Link,{...i,ref:t,href:l,onMouseEnter:p=>{n?.(p),r==="hover"&&typeof l=="string"&&l.startsWith("/")&&c(l)},onFocus:p=>{s?.(p),r==="hover"&&typeof l=="string"&&l.startsWith("/")&&c(l)}})});W.displayName="Link";sn=zt.default.forwardRef((e,t)=>{let{href:o,end:r=!1,className:n,children:s,...i}=e,l=(0,wo.useLocation)(),c=Ee(o??""),g=r?l.pathname===c:l.pathname.startsWith(c),u=typeof n=="function"?n({isActive:g}):m(n,g&&"active"),p=typeof s=="function"?s({isActive:g}):s;return(0,Dt.jsx)(W,{...i,ref:t,href:o,className:u,children:p})});sn.displayName="NavLink"});var Ro,To,O,ln,cn,mn,pn,un,Ne,Vt=N(()=>{"use strict";a();ze();Ro=D(require("react-aria-components")),To=require("lucide-react");I();O=require("react/jsx-runtime"),ln=({badge:e})=>{let t={new:"bg-primary-500/20 text-primary-500",updated:"bg-gray-500/20 text-gray-500",deprecated:"bg-red-500/20 text-red-500"};if(typeof e=="object"&&e?.expires){let r=new Date(e.expires),n=new Date,s=r.getTime()-n.getTime();if(Math.ceil(s/(1e3*60*60*24))===0)return null}let o=typeof e=="string"?e:e?.text;return(0,O.jsx)("span",{className:m("ml-auto flex h-4.5 items-center rounded-full text-[9px] font-medium px-1.5 py-0.5 text-center whitespace-nowrap",t[o]||t.new),children:o})},cn=({children:e,className:t})=>(0,O.jsx)("aside",{className:m("boltdocs-sidebar sticky top-navbar hidden lg:flex flex-col shrink-0","w-sidebar h-full","overflow-y-auto border-r border-border-subtle bg-bg-main","py-6 px-4",t),children:(0,O.jsx)("nav",{className:"flex-1 space-y-6",children:e})}),mn=({children:e,title:t,icon:o,isOpen:r=!0,onToggle:n,className:s})=>(0,O.jsxs)("div",{className:m("space-y-1",s),children:[t&&(0,O.jsxs)(Ro.Button,{onPress:n,className:m("flex w-full items-center justify-between px-2 py-1.5 text-xs font-bold uppercase tracking-wider outline-none cursor-pointer","text-text-muted hover:text-text-main transition-colors","focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-md"),children:[(0,O.jsxs)("div",{className:"flex items-center gap-2",children:[o&&(0,O.jsx)(o,{size:14}),t]}),(0,O.jsx)(To.ChevronRight,{size:14,className:m("transition-transform duration-200",r&&"rotate-90")})]}),r&&(0,O.jsx)("div",{className:"space-y-0.5",children:e})]}),pn=({children:e,className:t})=>(0,O.jsx)("div",{className:m(t),children:e}),un=({label:e,href:t,active:o,icon:r,badge:n,className:s})=>(0,O.jsxs)(W,{href:t,className:m("group flex items-center gap-2.5 rounded-lg px-2.5 py-2 text-sm outline-none","transition-all duration-200 ease-in-out","focus-visible:ring-2 focus-visible:ring-primary-500/30",o?"bg-primary-500/10 text-primary-500 font-medium":"text-text-muted hover:bg-bg-surface hover:text-text-main hover:translate-x-1",s),children:[r&&(0,O.jsx)(r,{size:16,className:m(o?"text-primary-500":"text-text-muted group-hover:text-text-main")}),(0,O.jsx)("span",{className:"truncate",children:e}),n&&(0,O.jsx)(ln,{badge:n})]}),Ne={SidebarRoot:cn,SidebarGroup:mn,SidebarGroupItem:pn,SidebarLink:un}});var ot,ko,U,Lo,ie,Ht=N(()=>{"use strict";a();ot=D(require("react-aria-components"));I();ko=require("class-variance-authority"),U=require("react/jsx-runtime"),Lo=(0,ko.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"}}),ie=({href:e,icon:t,iconPosition:o="left",isIconOnly:r,children:n,className:s,variant:i,size:l,rounded:c,iconSize:g,disabled:u,...p})=>{let f=r||!n&&!!t,C=f?(0,U.jsx)("span",{className:"inline-flex items-center justify-center [&>svg]:w-[1.2rem] [&>svg]:h-[1.2rem]",children:t}):(0,U.jsxs)(U.Fragment,{children:[t&&o==="left"&&(0,U.jsx)("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t}),(0,U.jsx)("span",{className:"flex items-center",children:n}),t&&o==="right"&&(0,U.jsx)("span",{className:"inline-flex items-center shrink-0 [&>svg]:w-[1.1rem] [&>svg]:h-[1.1rem]",children:t})]});return e?(0,U.jsx)(ot.Link,{href:e,className:m(Lo({variant:i,size:l,rounded:c,iconSize:f?g:void 0,disabled:u}),s),...p,children:C}):(0,U.jsx)(ot.Button,{className:m(Lo({variant:i,size:l,rounded:c,iconSize:f?g:void 0,disabled:u}),s),...p,children:C})}});var Io,So,Bo=N(()=>{"use strict";a();I();Io=require("react/jsx-runtime"),So=({children:e,className:t,vertical:o=!1})=>(0,Io.jsx)("div",{className:m("inline-flex",o?"flex-col":"flex-row",!o&&["[&>*: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"]],o&&["[&>*: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 we,Pe,$t,Wt=N(()=>{"use strict";"use client";a();we=D(require("react-aria-components"));I();Pe=require("react/jsx-runtime"),$t=({children:e,className:t,showArrow:o,...r})=>(0,Pe.jsxs)(we.Popover,{offset:8,...r,className:we.composeRenderProps(t,n=>m("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:[o&&(0,Pe.jsx)(we.OverlayArrow,{className:"group",children:(0,Pe.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,Pe.jsx)("path",{d:"M0 0 L6 6 L12 0"})})}),e]})});function De(e){let[t,o]=Gt.default.Children.toArray(e.children).slice(0,2);return(0,L.jsxs)(k.MenuTrigger,{...e,children:[t,(0,L.jsx)($t,{placement:e.placement,className:"min-w-35",children:o})]})}function dn(e){let[t,o]=Gt.default.Children.toArray(e.children).slice(0,2);return(0,L.jsxs)(k.SubmenuTrigger,{...e,children:[t,(0,L.jsx)($t,{offset:-4,crossOffset:-4,children:o})]})}function Ve(e){return(0,L.jsx)(k.Menu,{...e,className:k.composeRenderProps(e.className,t=>m("p-1.5 outline-none max-h-[inherit] overflow-auto max-w-75",t))})}function le(e){let t=e.textValue||(typeof e.children=="string"?e.children:void 0);return(0,L.jsx)(k.MenuItem,{...e,textValue:t,className:k.composeRenderProps(e.className,(o,{isFocused:r,isPressed:n,isDisabled:s})=>m("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":r,"bg-bg-surface-elevanted":n,"opacity-40 grayscale pointer-events-none":s},o)),children:k.composeRenderProps(e.children,(o,{selectionMode:r,isSelected:n,hasSubmenu:s})=>(0,L.jsxs)(L.Fragment,{children:[r!=="none"&&(0,L.jsxs)("span",{className:"flex items-center size-4 shrink-0 justify-center",children:[n&&r==="multiple"&&(0,L.jsx)(Re.Check,{className:"size-3.5 stroke-[2.5px] text-primary-500 animate-in zoom-in-50 duration-200"}),n&&r==="single"&&(0,L.jsx)(Re.Dot,{className:"size-5 text-primary-500 animate-in zoom-in-50 duration-200"})]}),(0,L.jsx)("div",{className:"flex flex-row w-full transition-colors items-center gap-2 py-1 px-1",children:o}),s&&(0,L.jsx)(Re.ChevronRight,{className:"size-4 ml-auto text-text-muted group-focused:text-primary-500/70 transition-colors"})]}))})}function fn({title:e,...t}){return(0,L.jsxs)(k.MenuSection,{...t,className:m("flex flex-col gap-0.5",t.className),children:[e&&(0,L.jsx)(k.Header,{className:"px-3 py-2 text-[10px] font-bold uppercase tracking-[0.075em] text-text-muted/50 select-none",children:e}),(0,L.jsx)(k.Collection,{items:t.items,children:t.children})]})}function gn(e){return(0,L.jsx)(k.Separator,{...e,className:"mx-2 my-1.5 border-t border-border-subtle/50"})}var Re,Gt,k,L,Z,rt=N(()=>{"use strict";"use client";a();Re=require("lucide-react"),Gt=D(require("react")),k=D(require("react-aria-components"));Wt();I();L=require("react/jsx-runtime");Z={Root:Ve,Item:le,Trigger:De,SubTrigger:dn,Section:fn,Separator:gn}});var Ft,Ut,Ao=N(()=>{"use strict";a();Ft=D(require("react-aria-components"));I();Ut=require("react/jsx-runtime")});function E({className:e,variant:t="rect",...o}){return(0,Mo.jsx)("div",{className:m("animate-pulse bg-bg-muted",t==="circle"?"rounded-full":"rounded-md",e),...o})}var Mo,jt=N(()=>{"use strict";a();I();Mo=require("react/jsx-runtime")});var ye,Ye=N(()=>{"use strict";a();Qe();po();kt();Bt();At();Ot();Vt();xt();Ht();Bo();rt();Wt();Ao();ze();jt();ye=require("react-aria-components");I()});function Yo(e){let{currentLocale:t,currentVersion:o}=S(),[r,n]=(0,me.useState)(!1),[s,i]=(0,me.useState)(""),[l,c]=(0,me.useState)(null);(0,me.useEffect)(()=>{if(!r||l)return;let u=new Qo.Index({preset:"match",tokenize:"full",resolution:9,cache:!0});for(let p of _t.default)u.add(p.id,`${p.title} ${p.content}`);c(u)},[r,l]);let g=(0,me.useMemo)(()=>{if(!s)return e.filter(C=>{let v=!t||C.locale===t,b=!o||C.version===o;return v&&b}).slice(0,10).map(C=>({id:C.path,title:C.title,path:C.path,bio:C.description||"",groupTitle:C.groupTitle}));if(!l)return[];let u=l.search(s,{limit:20,suggest:!0}),p=[],f=new Set;for(let C of u){let v=_t.default.find(A=>A.id===C);if(!v)continue;let b=!t||v.locale===t,h=!o||v.version===o;!b||!h||f.has(v.url)||(f.add(v.url),p.push({id:v.url,title:v.title,path:v.url,bio:v.display,groupTitle:v.display.split(" > ")[0],isHeading:v.url.includes("#")}))}return p.slice(0,10)},[s,l,t,o,e]);return{isOpen:r,setIsOpen:n,query:s,setQuery:i,list:g,input:{value:s,onChange:u=>i(u.target.value)}}}var me,Qo,_t,Zo=N(()=>{"use strict";a();me=require("react"),Qo=require("flexsearch");K();_t=D(require("virtual:boltdocs-search"))});var tr={};Xt(tr,{SearchDialog:()=>Kt});function Kt({routes:e}){let{isOpen:t,setIsOpen:o,query:r,setQuery:n,list:s}=Yo(e),i=(0,er.useNavigate)();(0,pt.useEffect)(()=>{let c=g=>{(/Mac/.test(navigator.userAgent)?g.metaKey:g.ctrlKey)&&(g.key==="k"||g.key==="j")&&(g.preventDefault(),o(f=>!f))};return window.addEventListener("keydown",c),()=>window.removeEventListener("keydown",c)},[o]);let l=(0,pt.useCallback)(c=>{let g=String(c);if(o(!1),g.includes("#")){let[u,p]=g.split("#");i(u),setTimeout(()=>{let f=document.getElementById(p);f&&f.scrollIntoView({behavior:"smooth"})},100)}else i(g)},[i,o]);return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(V.SearchTrigger,{onPress:()=>o(!0)}),(0,H.jsx)(yt,{isOpen:t,onOpenChange:o,children:(0,H.jsxs)(Ct,{onSelectionChange:l,children:[(0,H.jsx)(Nt,{value:r,onChange:c=>n(c.target.value)}),(0,H.jsx)(Pt,{items:s,children:c=>(0,H.jsxs)(wt,{onPress:()=>l(c.id),textValue:c.title,children:[(0,H.jsx)(Rt,{isHeading:c.isHeading}),(0,H.jsxs)("div",{className:"flex flex-col justify-center gap-0.5",children:[(0,H.jsx)(Tt,{children:c.title}),(0,H.jsx)(Lt,{children:c.bio})]})]},c.id)})]})})]})}var pt,er,H,qt=N(()=>{"use strict";a();pt=require("react");Zo();kt();Qe();er=require("react-router-dom"),H=require("react/jsx-runtime")});var Sn={};Xt(Sn,{Breadcrumbs:()=>so,CopyMarkdown:()=>Eo,ErrorBoundary:()=>nt,GithubStars:()=>st,Head:()=>$o,Loading:()=>Wo,Navbar:()=>rr,NotFound:()=>ar,OnThisPage:()=>lr,PageNav:()=>pr,PoweredBy:()=>dt,SearchDialog:()=>Kt,Sidebar:()=>hr,Tabs:()=>mt,ThemeToggle:()=>ct});module.exports=Pr(Sn);a();a();a();K();function Zt(){let{currentRoute:e}=S(),t=[];return e&&(e.groupTitle&&t.push({label:e.groupTitle}),t.push({label:e.title,href:e.path})),{crumbs:t,activeRoute:e}}var ao=require("lucide-react");xt();I();xe();var Y=require("react/jsx-runtime");function so(){let{crumbs:e,activeRoute:t}=Zt(),r=_().theme||{};return e.length===0||!r?.breadcrumbs?null:(0,Y.jsxs)(ro,{children:[(0,Y.jsx)(gt,{children:(0,Y.jsx)(ht,{href:"/",children:(0,Y.jsx)(ao.Home,{size:14})})}),e.map((n,s)=>(0,Y.jsxs)(gt,{children:[(0,Y.jsx)(no,{}),(0,Y.jsx)(ht,{href:n.href,className:m({"font-medium text-text-main":n.href===t?.path}),children:n.label})]},`crumb-${n.href}-${n.label}-${s}`))]})}a();var Oo=require("react"),ee=require("lucide-react");Ye();var B=require("react/jsx-runtime"),hn=e=>{let[t,o]=(0,Oo.useState)(!1);return{copied:t,handleCopy:()=>{navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),2e3)},handleOpenRaw:()=>{let s=new Blob([e],{type:"text/plain;charset=utf-8"}),i=URL.createObjectURL(s);window.open(i,"_blank")}}};function Eo({content:e,mdxRaw:t,config:o}){let r=t||e||"",{copied:n,handleCopy:s,handleOpenRaw:i}=hn(r),l=o!==!1,c=typeof o=="object"&&o.text||"Copy Markdown";return!l||!r?null:(0,B.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,B.jsxs)(So,{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,B.jsx)(ie,{variant:"ghost",onPress:s,icon:n?(0,B.jsx)(ee.Check,{size:16}):(0,B.jsx)(ee.Copy,{size:16}),iconPosition:"left",className:m("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!":c}),(0,B.jsxs)(De,{placement:"bottom end",children:[(0,B.jsx)(ie,{variant:"ghost",isIconOnly:!0,icon:(0,B.jsx)(ee.ChevronDown,{size:14}),className:m("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,B.jsxs)(Ve,{className:"w-52",children:[(0,B.jsxs)(le,{onAction:s,children:[(0,B.jsx)(ee.Copy,{size:16,className:"size-4 mt-0.5 text-text-muted group-hover:text-primary-500"}),(0,B.jsx)("span",{className:"font-medium text-[0.8125rem]",children:"Copy Markdown"})]}),(0,B.jsxs)(le,{onAction:i,children:[(0,B.jsx)(ee.ExternalLink,{size:16,className:"size-4 mt-0.5 text-text-muted group-hover:text-primary-500"}),(0,B.jsx)("span",{className:"font-medium text-[0.8125rem]",children:"View as Markdown"})]})]})]})]})})}a();var zo=require("react");Ye();var Te=require("react/jsx-runtime"),nt=class extends zo.Component{state={hasError:!1};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,o){console.error("Uncaught error in Boltdocs Layout:",t,o)}render(){return this.state.hasError?this.props.fallback||(0,Te.jsxs)("div",{className:"flex flex-col items-center justify-center min-h-[40vh] text-center gap-4 px-4",children:[(0,Te.jsx)("div",{className:"text-lg font-bold text-red-400",children:"Something went wrong"}),(0,Te.jsx)("p",{className:"text-sm text-text-muted max-w-md",children:this.state.error?.message||"An unexpected error occurred while rendering this page."}),(0,Te.jsx)(ie,{className:"rounded-lg border border-border-subtle bg-bg-surface px-5 py-2 text-sm font-medium text-text-main transition-colors hover:bg-bg-muted cursor-pointer",onPress:()=>this.setState({hasError:!1}),children:"Try again"})]}):this.props.children}};a();var at=require("react");a();var xn="https://api.github.com";async function Do(e,t,o=xn){let r=new Headers;t&&r.append("authorization",t);let s=await(await fetch(`${o}/repos/${e}`,{headers:r})).json();return s.stargazers_count!==void 0?vn(s.stargazers_count):"0"}var vn=e=>Intl.NumberFormat("en",{notation:"compact",compactDisplay:"short"}).format(e);vt();var He=require("react/jsx-runtime");function st({repo:e}){let[t,o]=(0,at.useState)(null);return(0,at.useEffect)(()=>{e&&Do(e).then(r=>o(r)).catch(()=>o("0"))},[e]),(0,He.jsxs)("a",{href:`https://github.com/${e}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 rounded-md border border-border-subtle bg-bg-surface px-2.5 py-1.5 text-xs font-medium text-text-muted transition-all hover:bg-bg-main hover:border-border-strong hover:text-text-main",children:[(0,He.jsx)(Xe,{className:"h-4 w-4"}),t&&(0,He.jsx)("span",{className:"tabular-nums",children:t})]})}a();var Vo=require("react"),Ho=require("react-router-dom");function $o({siteTitle:e,siteDescription:t,routes:o}){let r=(0,Ho.useLocation)();return(0,Vo.useEffect)(()=>{let n=o.find(g=>g.path===r.pathname),s=n?.title,i=n?.description||t||"";document.title=s?`${s} | ${e}`:e;let l=document.querySelector('meta[name="description"]');l||(l=document.createElement("meta"),l.name="description",document.head.appendChild(l)),l.content=i,fe("property","og:title",document.title),fe("property","og:description",i),fe("property","og:type","article"),fe("property","og:url",window.location.href),fe("name","twitter:card","summary"),fe("name","twitter:title",document.title),fe("name","twitter:description",i);let c=document.querySelector('link[rel="canonical"]');c||(c=document.createElement("link"),c.rel="canonical",document.head.appendChild(c)),c.href=window.location.origin+r.pathname},[r.pathname,e,t,o]),null}function fe(e,t,o){let r=document.querySelector(`meta[${e}="${t}"]`);r||(r=document.createElement("meta"),r.setAttribute(e,t),document.head.appendChild(r)),r.content=o}a();I();jt();var w=require("react/jsx-runtime");function Wo(){return(0,w.jsx)("div",{className:m("w-full h-full relative overflow-y-auto transition-opacity duration-300 animate-fade-in"),children:(0,w.jsxs)("div",{className:"mx-auto max-w-(--spacing-content-max) px-4 py-8 space-y-10",children:[(0,w.jsxs)("div",{className:"flex gap-2",children:[(0,w.jsx)(E,{className:"h-3 w-16"}),(0,w.jsx)(E,{className:"h-3 w-24"})]}),(0,w.jsx)(E,{className:"h-10 w-[60%] sm:h-12"}),(0,w.jsxs)("div",{className:"space-y-3",children:[(0,w.jsx)(E,{className:"h-4 w-full"}),(0,w.jsx)(E,{className:"h-4 w-[95%]"}),(0,w.jsx)(E,{className:"h-4 w-[40%]"})]}),(0,w.jsxs)("div",{className:"space-y-6 pt-4",children:[(0,w.jsx)(E,{className:"h-7 w-32"}),(0,w.jsxs)("div",{className:"space-y-3",children:[(0,w.jsx)(E,{className:"h-4 w-full"}),(0,w.jsx)(E,{className:"h-4 w-[98%]"}),(0,w.jsx)(E,{className:"h-4 w-[92%]"}),(0,w.jsx)(E,{className:"h-4 w-[60%]"})]})]}),(0,w.jsx)(E,{className:"h-32 w-full rounded-lg bg-bg-muted/50"}),(0,w.jsxs)("div",{className:"space-y-6 pt-4",children:[(0,w.jsx)(E,{className:"h-7 w-48"}),(0,w.jsxs)("div",{className:"space-y-3",children:[(0,w.jsx)(E,{className:"h-4 w-full"}),(0,w.jsx)(E,{className:"h-4 w-[85%]"})]})]})]})})}a();var ut=require("react");a();var Go=require("react-router-dom");xe();a();var Le=require("react"),yn=require("react/jsx-runtime"),bn=(0,Le.createContext)(void 0);function it(){let e=(0,Le.use)(bn);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e}a();function $e(e,t){return e?typeof e=="string"?e:t&&e[t]?e[t]:Object.values(e)[0]||"":""}K();function Fo(){let e=_(),{theme:t}=it(),o=(0,Go.useLocation)(),{currentLocale:r}=S(),n=e.theme||{},s=$e(n.title,r)||"Boltdocs",i=n.navbar||[],l=n.socialLinks||[],c=n.githubRepo,g=i.map(v=>{let b=v.href||v.to||v.link||"",h=A=>{let pe=o.pathname;if(pe===A)return!0;if(!A||A==="/")return pe==="/";let he=Ge=>{let G=Ge.split("/").filter(Boolean),ue=0;return e.i18n?.locales&&G[ue]&&e.i18n.locales[G[ue]]&&ue++,e.versions?.versions&&G[ue]&&e.versions.versions.some(xr=>xr.path===G[ue])&&ue++,G.slice(ue)},Be=he(A),Ae=he(pe);return Be.length===0?Ae.length===0:Ae.length<Be.length?!1:Be.every((Ge,G)=>Ae[G]===Ge)};return{label:$e(v.label||v.text,r),href:b,active:h(b),to:b.startsWith("http")||b.startsWith("//")?"external":void 0}}),u=n.logo,p=u?typeof u=="string"?u:t==="dark"?u.dark:u.light:null,f={alt:(u&&typeof u=="object"?u.alt:void 0)||s,width:u&&typeof u=="object"?u.width:void 0,height:u&&typeof u=="object"?u.height:void 0},C=c?`https://github.com/${c}`:null;return{links:g,title:s,logo:p,logoProps:f,github:C,social:l,config:e,theme:t}}a();var Uo=require("react-router-dom");a();function ce(e,t,o){let r=e;return t&&(r===t||r.startsWith(t+"/"))&&(r=r===t?"index.md":r.slice(t.length+1)),o&&(r===o||r.startsWith(o+"/"))&&(r=r===o?"index.md":r.slice(o.length+1)),r}K();Ke();function jo(){let e=(0,Uo.useNavigate)(),t=S(),{allRoutes:o,currentRoute:r,currentVersion:n,currentLocale:s,config:i}=t,l=i.versions,c=re(p=>p.setVersion),g=p=>{if(!l||p===n)return;c(p);let f=`/docs/${p}`;if(r){let C=ce(r.filePath,r.version,r.locale),v=o.find(b=>ce(b.filePath,b.version,b.locale)===C&&(b.version||l.defaultVersion)===p&&(s?b.locale===s:!b.locale));if(v)f=v.path;else{let b=o.find(h=>ce(h.filePath,h.version,h.locale)==="index.md"&&(h.version||l.defaultVersion)===p&&(s?h.locale===s:!h.locale));f=b?b.path:`/docs/${p}${s?`/${s}`:""}`}}e(f)},u=t.availableVersions.map(p=>({...p,label:p.label,value:p.key}));return{currentVersion:n,currentVersionLabel:t.currentVersionLabel,availableVersions:u,handleVersionChange:g}}a();var _o=require("react-router-dom");K();Ke();function Ko(){let e=(0,_o.useNavigate)(),t=S(),{allRoutes:o,currentRoute:r,currentLocale:n,config:s}=t,i=s.i18n,l=re(f=>f.setLocale),c=f=>{if(!i||f===n)return;l(f);let C="/";if(r){let v=ce(r.filePath,r.version,r.locale),b=o.find(h=>ce(h.filePath,h.version,h.locale)===v&&(h.locale||i.defaultLocale)===f&&h.version===r.version);if(b)C=b.path;else{let h=o.find(A=>ce(A.filePath,A.version,A.locale)==="index.md"&&(A.locale||i.defaultLocale)===f&&A.version===r.version);C=h?h.path:f===i.defaultLocale?r.version?`/${r.version}`:"/":r.version?`/${r.version}/${f}`:`/${f}`}}else{let v=o.find(b=>(b.filePath==="index.mdx"||b.filePath==="index.md")&&(b.locale||i.defaultLocale)===f&&!b.version);v?C=v.path:C=f===i.defaultLocale?"/":`/${f}`}e(C)},u=s.i18n?.localeConfigs?.[n]?.label||s.i18n?.locales[n]||n,p=s.i18n?Object.entries(s.i18n.locales).map(([f,C])=>{let v=s.i18n?.localeConfigs?.[f];return{key:f,label:v?.label||C,value:f,isCurrent:f===n}}):[];return{currentLocale:n,currentLocaleLabel:u,availableLocales:p,handleLocaleChange:c}}K();Qe();a();var lt=require("react"),te=require("lucide-react");var qo=require("react-aria-components");rt();var z=require("react/jsx-runtime");function ct(){let{theme:e,setTheme:t}=it(),[o,r]=(0,lt.useState)(!1);return(0,lt.useEffect)(()=>{r(!0)},[]),o?(0,z.jsxs)(De,{placement:"bottom right",children:[(0,z.jsx)(qo.Button,{className:"flex h-9 w-9 items-center justify-center rounded-md text-text-muted transition-colors hover:bg-bg-surface hover:text-text-main outline-none focus-visible:ring-2 focus-visible:ring-primary-500","aria-label":"Selection theme",children:(0,z.jsx)(e==="system"?te.Monitor:e==="dark"?te.Moon:te.Sun,{size:20,className:"animate-in fade-in zoom-in duration-300"})}),(0,z.jsxs)(Ve,{selectionMode:"single",selectedKeys:[e],onSelectionChange:s=>{let i=Array.from(s)[0];t(i)},children:[(0,z.jsxs)(le,{id:"light",children:[(0,z.jsx)(te.Sun,{size:16}),(0,z.jsx)("span",{children:"Light"})]}),(0,z.jsxs)(le,{id:"dark",children:[(0,z.jsx)(te.Moon,{size:16}),(0,z.jsx)("span",{children:"Dark"})]}),(0,z.jsxs)(le,{id:"system",children:[(0,z.jsx)(te.Monitor,{size:16}),(0,z.jsx)("span",{children:"System"})]})]})]}):(0,z.jsx)("div",{className:"h-9 w-9"})}a();a();var Xo=require("react-router-dom"),ke=require("react");function Jo(e=[],t=[]){let o=(0,Xo.useLocation)(),r=(0,ke.useRef)([]),[n,s]=(0,ke.useState)({opacity:0,transform:"translateX(0) scaleX(0)",width:0}),l=t.find(u=>u.path===o.pathname)?.tab?.toLowerCase(),c=e.findIndex(u=>u.id.toLowerCase()===l),g=c===-1?0:c;return(0,ke.useEffect)(()=>{let u=r.current[g];u&&s({opacity:1,width:u.offsetWidth,transform:`translateX(${u.offsetLeft}px)`})},[g,e.length,o.pathname]),{tabs:e,activeIndex:g,indicatorStyle:n,tabRefs:r,activeTabId:l}}Ot();ze();var Cn=D(require("lucide-react"));K();var X=require("react/jsx-runtime");function mt({tabs:e,routes:t}){let{currentLocale:o}=S(),{indicatorStyle:r,tabRefs:n,activeIndex:s}=Jo(e,t),i=l=>{if(!l)return null;if(l.trim().startsWith("<svg"))return(0,X.jsx)("span",{className:"h-4 w-4",dangerouslySetInnerHTML:{__html:l}});let c=Cn[l];return c?(0,X.jsx)(c,{size:16}):(0,X.jsx)("img",{src:l,alt:"",className:"h-4 w-4 object-contain"})};return(0,X.jsx)("div",{className:"mx-auto max-w-(--breakpoint-3xl) px-4 md:px-6",children:(0,X.jsxs)(Mt.TabsList,{className:"border-none py-0",children:[e.map((l,c)=>{let g=c===s,u=t.find(f=>f.tab&&f.tab.toLowerCase()===l.id.toLowerCase()),p=u?u.path:"#";return(0,X.jsxs)(W,{href:p,ref:f=>{n.current[c]=f},className:`relative flex items-center gap-2 px-4 py-3 text-sm font-medium transition-colors outline-none ${g?"text-primary-500":"text-text-muted hover:text-text-main"}`,children:[i(l.icon),(0,X.jsx)("span",{children:$e(l.text,o)})]},l.id)}),(0,X.jsx)(Mt.TabsIndicator,{style:r})]})})}var or=require("react-router-dom");rt();Ht();var We=require("lucide-react");Et();var x=require("react/jsx-runtime"),Nn=(0,ut.lazy)(()=>Promise.resolve().then(()=>(qt(),tr)).then(e=>({default:e.SearchDialog})));function rr(){let{links:e,title:t,logo:o,logoProps:r,github:n,social:s,config:i}=Fo(),{routes:l,allRoutes:c,currentVersion:g,currentLocale:u}=S(),{pathname:p}=(0,or.useLocation)(),f=i.theme||{},C=p.startsWith("/docs"),v=f?.tabs&&f.tabs.length>0;return(0,x.jsxs)(V.NavbarRoot,{className:v?"border-b-0":"",children:[(0,x.jsxs)(V.Content,{children:[(0,x.jsxs)(V.NavbarLeft,{children:[o&&(0,x.jsx)(V.NavbarLogo,{src:o,alt:r?.alt||t,width:r?.width??24,height:r?.height??24}),(0,x.jsx)(V.Title,{children:t}),i.versions&&g&&(0,x.jsx)(wn,{})]}),(0,x.jsx)(V.NavbarCenter,{children:(0,x.jsx)(ut.Suspense,{fallback:(0,x.jsx)("div",{className:"h-9 w-32 animate-pulse rounded-md bg-bg-surface"}),children:(0,x.jsx)(Nn,{routes:l||[]})})}),(0,x.jsxs)(V.NavbarRight,{children:[(0,x.jsx)(V.Links,{children:e.map(b=>(0,x.jsx)(x.Fragment,{children:(0,x.jsx)(Pn,{link:b},b.href)}))}),i.i18n&&u&&(0,x.jsx)(Rn,{}),(0,x.jsx)(V.Split,{}),(0,x.jsx)(ct,{}),n&&(0,x.jsx)(st,{repo:f?.githubRepo??""}),s.length>0&&(0,x.jsx)(V.Split,{}),(0,x.jsx)("div",{className:"flex items-center gap-1",children:s.map(({icon:b,link:h})=>(0,x.jsx)(V.Socials,{icon:b,link:h,className:"p-1.5"},h))})]})]}),C&&v&&f?.tabs&&(0,x.jsx)("div",{className:"w-full border-b border-border-subtle bg-bg-main",children:(0,x.jsx)(mt,{tabs:f.tabs,routes:c||l||[]})})]})}function Pn({link:e}){let t=Ee(e.href||"");return(0,x.jsx)(V.Link,{...e,href:t})}function wn(){let{currentVersionLabel:e,availableVersions:t,handleVersionChange:o}=jo();return t.length===0?null:(0,x.jsxs)(Z.Trigger,{children:[(0,x.jsx)(ie,{variant:"outline",size:"sm",rounded:"lg",iconPosition:"right",icon:(0,x.jsx)(We.ChevronDown,{className:"w-3.5 h-3.5 text-text-muted/60"}),className:"h-8 border-border-subtle/60 bg-bg-surface/30 backdrop-blur-sm transition-all duration-200 hover:border-primary-500/50 hover:bg-primary-500/5",children:(0,x.jsx)("span",{className:"font-semibold text-[0.8125rem]",children:e})}),(0,x.jsx)(Z.Root,{children:(0,x.jsx)(Z.Section,{items:t,children:r=>(0,x.jsx)(Z.Item,{onPress:()=>o(r.value),children:r.label},`${r.value??""}`)})})]})}function Rn(){let{currentLocale:e,availableLocales:t,handleLocaleChange:o}=Ko();return t.length===0?null:(0,x.jsxs)(Z.Trigger,{children:[(0,x.jsx)(ie,{variant:"outline",size:"sm",rounded:"lg",iconPosition:"right",icon:(0,x.jsx)(We.ChevronDown,{className:"w-3.5 h-3.5 text-text-muted/60"}),className:"h-8 border-border-subtle/60 bg-bg-surface/30 backdrop-blur-sm transition-all duration-200 hover:border-primary-500/50 hover:bg-primary-500/5 px-2.5",children:(0,x.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,x.jsx)(We.Languages,{className:"w-3.5 h-3.5 text-primary-500"}),(0,x.jsx)("span",{className:"font-bold text-[0.75rem] tracking-wider uppercase opacity-90",children:e||"en"})]})}),(0,x.jsx)(Z.Root,{children:(0,x.jsx)(Z.Section,{items:t,children:r=>(0,x.jsx)(Z.Item,{onPress:()=>o(r.value),children:(0,x.jsxs)("div",{className:"flex items-center justify-between w-full gap-4",children:[(0,x.jsx)("span",{children:r.label}),(0,x.jsx)("span",{className:"text-[10px] font-bold opacity-40 uppercase tracking-tighter",children:r.value})]})},`${r.value??""}`)})})]})}a();var nr=require("lucide-react");ze();var oe=require("react/jsx-runtime");function ar(){return(0,oe.jsx)("div",{className:"flex items-center justify-center min-h-[60vh] text-center",children:(0,oe.jsxs)("div",{className:"space-y-4",children:[(0,oe.jsx)("span",{className:"text-8xl font-black tracking-tighter text-primary-500/20",children:"404"}),(0,oe.jsx)("h1",{className:"text-2xl font-bold text-text-main",children:"Page Not Found"}),(0,oe.jsx)("p",{className:"text-sm text-text-muted max-w-sm mx-auto",children:"The page you're looking for doesn't exist or has been moved."}),(0,oe.jsxs)(W,{href:"/",className:"inline-flex items-center gap-2 rounded-lg bg-primary-500 px-5 py-2.5 text-sm font-semibold text-white outline-none transition-all hover:brightness-110 hover:shadow-lg focus-visible:ring-2 focus-visible:ring-primary-500/30",children:[(0,oe.jsx)(nr.ArrowLeft,{size:16})," Go to Home"]})]})})}a();Bt();var j=D(require("react"));a();var sr=require("react");function ir(e=[]){let[t,o]=(0,sr.useState)(null);return{headings:e,activeId:t,setActiveId:o}}var Se=require("lucide-react"),T=require("react/jsx-runtime");function lr({headings:e=[],editLink:t,communityHelp:o,filePath:r}){let{headings:n}=ir(e),s=j.default.useMemo(()=>n.map(i=>({title:i.text,url:`#${i.id}`,depth:i.level})),[n]);return n.length===0?null:(0,T.jsx)(yo,{toc:s,children:(0,T.jsx)(Tn,{headings:n,editLink:t,communityHelp:o,filePath:r})})}function Tn({headings:e,editLink:t,communityHelp:o,filePath:r}){let n=vo(),[s,i]=(0,j.useState)({opacity:0}),l=(0,j.useRef)(null),c=(0,j.useRef)(null);(0,j.useEffect)(()=>{if(!n||!l.current)return;let u=l.current.querySelector(`a[href="#${n}"]`);u&&i({transform:`translateY(${u.offsetTop}px)`,height:`${u.offsetHeight}px`,opacity:1})},[n]);let g=(0,j.useCallback)((u,p)=>{u.preventDefault();let f=document.getElementById(p);f&&(f.scrollIntoView({behavior:"smooth"}),window.history.pushState(null,"",`#${p}`))},[]);return(0,T.jsxs)(de.OnThisPageRoot,{children:[(0,T.jsxs)(de.OnThisPageHeader,{className:"flex flex-row gap-x-2",children:[(0,T.jsx)(Se.TextAlignStart,{size:16}),"On this page"]}),(0,T.jsx)(bo,{containerRef:c,children:(0,T.jsxs)(de.OnThisPageContent,{className:"max-h-[450px] boltdocs-otp-scroll-area",ref:c,children:[(0,T.jsx)(de.OnThisPageIndicator,{style:s}),(0,T.jsx)("ul",{className:"relative space-y-2 border-l border-border-subtle",ref:l,children:e.map(u=>(0,T.jsx)(de.OnThisPageItem,{level:u.level,children:(0,T.jsx)(de.OnThisPageLink,{href:`#${u.id}`,active:n===u.id,onClick:p=>g(p,u.id),className:"pl-4",children:u.text})},u.id))})]})}),(t||o)&&(0,T.jsxs)("div",{className:"mt-8 pt-8 border-t border-border-subtle space-y-4",children:[(0,T.jsx)("p",{className:"text-xs font-bold uppercase tracking-wider text-text-main",children:"Need help?"}),(0,T.jsxs)("ul",{className:"space-y-3",children:[t&&r&&(0,T.jsx)("li",{children:(0,T.jsxs)("a",{href:t.replace(":path",r),target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-sm text-text-muted hover:text-text-main transition-colors",children:[(0,T.jsx)(Se.Pencil,{size:16}),"Edit this page"]})}),o&&(0,T.jsx)("li",{children:(0,T.jsxs)("a",{href:o,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-sm text-text-muted hover:text-text-main transition-colors",children:[(0,T.jsx)(Se.CircleHelp,{size:16}),"Community help"]})})]})]})]})}a();a();var cr=require("react-router-dom");K();function mr(){let{routes:e,currentRoute:t}=S(),o=(0,cr.useLocation)();if(!t)return{prevPage:null,nextPage:null,currentRoute:null};let r=t.tab?.toLowerCase(),n=r?e.filter(c=>c.tab?.toLowerCase()===r):e.filter(c=>!c.tab),s=n.findIndex(c=>c.path===o.pathname),i=s>0?n[s-1]:null,l=s!==-1&&s<n.length-1?n[s+1]:null;return{prevPage:i,nextPage:l,currentRoute:t}}At();var J=require("react/jsx-runtime");function pr(){let{prevPage:e,nextPage:t}=mr();return!e&&!t?null:(0,J.jsxs)(se.PageNavRoot,{className:"animate-in fade-in slide-in-from-bottom-4 duration-700",children:[e?(0,J.jsxs)(se.PageNavLink,{to:e.path,direction:"prev",children:[(0,J.jsx)(se.PageNavLink.Title,{children:"Previous"}),(0,J.jsx)(se.PageNavLink.Description,{children:e.title})]}):(0,J.jsx)("div",{}),t&&(0,J.jsxs)(se.PageNavLink,{to:t.path,direction:"next",children:[(0,J.jsx)(se.PageNavLink.Title,{children:"Next"}),(0,J.jsx)(se.PageNavLink.Description,{children:t.title})]})]})}a();var ur=require("lucide-react"),ge=require("react/jsx-runtime");function dt(){return(0,ge.jsx)("div",{className:"flex items-center justify-center mt-10 mb-4 px-4 w-full",children:(0,ge.jsxs)("a",{href:"https://github.com/jesusalcaladev/boltdocs",target:"_blank",rel:"noopener noreferrer",className:"group relative flex items-center gap-2 px-4 py-2 rounded-full border border-border-subtle bg-bg-surface/50 backdrop-blur-md transition-all duration-300 hover:border-primary-500/50 hover:bg-bg-surface hover:shadow-xl hover:shadow-primary-500/5 select-none",children:[(0,ge.jsx)(ur.Zap,{className:"w-3.5 h-3.5 text-text-muted group-hover:text-primary-500 transition-colors duration-300",fill:"currentColor"}),(0,ge.jsxs)("span",{className:"text-[11px] font-medium text-text-muted group-hover:text-text-main transition-colors duration-300 tracking-wide",children:["Powered by"," ",(0,ge.jsx)("strong",{className:"font-bold text-text-main/80 group-hover:text-text-main",children:"Boltdocs"})]})]})})}qt();a();var Ie=require("react");a();var dr=require("react-router-dom");xe();function fr(e){let t=_(),o=(0,dr.useLocation)(),r=p=>p.endsWith("/")&&p.length>1?p.slice(0,-1):p,n=r(o.pathname),s=e.find(p=>r(p.path)===n),i=s?.tab?.toLowerCase(),l=i?e.filter(p=>!p.tab||p.tab.toLowerCase()===i):e,c=[],g=new Map;for(let p of l)p.group?(g.has(p.group)||g.set(p.group,{slug:p.group,title:p.groupTitle||p.group,routes:[],icon:p.groupIcon}),g.get(p.group).routes.push(p)):c.push(p);return{groups:Array.from(g.values()),ungrouped:c,activeRoute:s,activePath:n,config:t}}Vt();var Ln=D(require("lucide-react")),Q=require("react/jsx-runtime");function gr(e){return e&&Ln[e]||void 0}function kn({group:e,activePath:t,getIcon:o}){let r=(0,Ie.useMemo)(()=>e.routes.some(i=>i.path===t),[e.routes,t]),[n,s]=(0,Ie.useState)(!0);return(0,Ie.useEffect)(()=>{r&&s(!0)},[r]),(0,Q.jsx)(Ne.SidebarGroup,{title:e.title,isOpen:n,onToggle:()=>s(!n),children:e.routes.map(i=>{let l=t===(i.path.endsWith("/")?i.path.slice(0,-1):i.path);return(0,Q.jsx)(Ne.SidebarLink,{label:i.title,href:i.path,active:l,icon:o(i.icon),badge:i.badge},i.path)})})}function hr({routes:e,config:t}){let{groups:o,ungrouped:r,activePath:n}=fr(e),s=t.theme||{};return(0,Q.jsxs)(Ne.SidebarRoot,{children:[r.length>0&&(0,Q.jsx)(Ne.SidebarGroup,{className:"mb-6",children:r.map(i=>{let l=n===(i.path.endsWith("/")?i.path.slice(0,-1):i.path);return(0,Q.jsx)(Ne.SidebarLink,{label:i.title,href:i.path,active:l,icon:gr(i.icon),badge:i.badge},i.path)})}),o.map(i=>(0,Q.jsx)(kn,{group:i,activePath:n,getIcon:gr},i.slug)),s?.poweredBy&&(0,Q.jsx)("div",{className:"mt-auto pt-8",children:(0,Q.jsx)(dt,{})})]})}
|
package/dist/base-ui/index.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as o,b as e,c as p,d as t,e as m,f,g as x,h as d,i as n,j as g,k as y,l as b,m as i}from"../chunk-PPVDMDEL.mjs";import"../chunk-HRZDSFR5.mjs";import{a as r}from"../chunk-64AJ5QLT.mjs";import"../chunk-JD3RSDE4.mjs";import{a}from"../chunk-UBE4CKOA.mjs";import"../chunk-2Z5T6EAU.mjs";import"../chunk-WWJ7WKDI.mjs";import"../chunk-NBCYHLAA.mjs";import"../chunk-JZXLCA2E.mjs";export{y as Breadcrumbs,r as CopyMarkdown,i as ErrorBoundary,t as GithubStars,g as Head,e as Loading,f as Navbar,o as NotFound,n as OnThisPage,b as PageNav,x as PoweredBy,a as SearchDialog,d as Sidebar,m as Tabs,p as ThemeToggle};
|
package/dist/cache-P6WK424C.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as a,s as b,t as c,u as d,v as e}from"./chunk-Y4RRHPXC.mjs";e();export{c as AssetCache,a as FileCache,b as TransformCache,d as flushCache};
|
package/dist/chunk-2DI3OGHV.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as ge}from"./chunk-64AJ5QLT.mjs";import{b as me}from"./chunk-JD3RSDE4.mjs";import{b as fe}from"./chunk-T3W44KWY.mjs";import{a,b as pe,d as ue,e as be,g as xe,h as j,i as q,j as X,k as G,l as K,m as E,n as S,o as V,p as M,q as Y}from"./chunk-WWJ7WKDI.mjs";import{b as _}from"./chunk-NBCYHLAA.mjs";import{a as it}from"./chunk-JZXLCA2E.mjs";var vr={};it(vr,{Admonition:()=>P,Badge:()=>Ie,Button:()=>ye,Card:()=>Me,Cards:()=>Ve,Caution:()=>_e,CodeBlock:()=>B,ComponentPreview:()=>nt,ComponentProps:()=>tt,CopyMarkdown:()=>ge,Danger:()=>He,Field:()=>Ze,FileTree:()=>Xe,Image:()=>et,Important:()=>$e,InfoBox:()=>We,Link:()=>Qe,List:()=>je,Note:()=>De,Tab:()=>ke,Table:()=>Ye,Tabs:()=>Te,Tip:()=>Oe,Video:()=>Ae,Warning:()=>Fe});import{jsx as lt}from"react/jsx-runtime";var ye=({className:e,variant:t,size:r,rounded:o,iconSize:n,disabled:s,...i})=>lt(be,{className:a("group",ue({variant:t,size:r,rounded:o,iconSize:n,disabled:s,className:e})),...i});import*as U from"react-aria-components";import{Copy as pt,Check as mt,File as ut}from"lucide-react";var he=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}};import{useCallback as ve,useEffect as dt,useRef as ct,useState as Z}from"react";function Ce(e){let{title:t,sandbox:r}=e,[o,n]=Z(!1),[s,i]=Z(!1),[p,c]=Z(!1),l=ct(null),d=_(),m=ve(async()=>{let b=l.current?.textContent??"";he(b),n(!0),setTimeout(()=>n(!1),2e3)},[]),u=ve(()=>{let b=l.current?.textContent??"",v=d?.integrations?.sandbox?.config||{},f=typeof r=="object"?r:v,N=f.entry||"src/App.tsx";fe({title:t??"Code Snippet",...f,files:{...f.files,[N]:{content:b}}})},[t,d,r]);return dt(()=>{let b=l.current?.textContent?.length??0;c(b>120)},[e.children,e.highlightedHtml]),{copied:o,isExpanded:s,setIsExpanded:i,isExpandable:p,preRef:l,handleCopy:m,handleSandbox:u,shouldTruncate:p&&!s}}import{jsx as C,jsxs as Q}from"react/jsx-runtime";var bt={ts:j,tsx:E,js:q,jsx:E,json:X,css:G,html:K,md:S,mdx:S,bash:V,sh:V,yaml:M,yml:M};function B(e){let{children:t,sandbox:r,hideSandbox:o=!0,hideCopy:n=!1,highlightedHtml:s,title:i,"data-lang":p,plain:c=!1,...l}=e,u=!!_()?.integrations?.sandbox?.enable&&!o,b=e.lang||p||"",{copied:v,isExpanded:f,setIsExpanded:N,isExpandable:L,preRef:A,handleCopy:st,handleSandbox:at,shouldTruncate:de}=Ce(e),ce=bt[b];return Q("div",{className:a("group relative overflow-hidden bg-(--color-code-bg)","contain-layout contain-paint",{"my-6 rounded-lg border border-border-subtle":!c,"[&>pre]:max-h-62.5 [&>pre]:overflow-hidden":de},e.className),children:[i&&Q("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:[ce?C(ce,{size:14}):C(ut,{size:14,className:"opacity-60"}),C("span",{children:i})]}),Q("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:[u&&C(Y,{content:"Open in CodeSandbox",children:C(U.Button,{onPress:at,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:C(xe,{size:20})})}),!n&&C(Y,{content:v?"Copied!":"Copy code",children:C(U.Button,{onPress:st,className:a("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",v?"text-emerald-400":"text-text-muted hover:text-text-main"),"aria-label":"Copy code",children:v?C(mt,{size:20}):C(pt,{size:20})})})]}),s?C("div",{ref:A,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:s}}):C("pre",{ref:A,className:"m-0! rounded-none! border-none! bg-inherit! font-mono text-[0.8125rem] leading-[1.7]",...l,children:t}),L&&C("div",{className:a(de?"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:C(U.Button,{onPress:()=>N(!f),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:f?"Show less":"Expand code"})})]})}import{Children as yt,isValidElement as ht,useMemo as vt}from"react";import*as T from"react-aria-components";import{useState as Ne,useRef as ft,useEffect as xt,useCallback as gt}from"react";function Re({initialIndex:e=0,tabs:t}){let r=t[e]?.props.disabled?t.findIndex(l=>!l.props.disabled):e,[o,n]=Ne(r===-1?0:r),s=ft([]),[i,p]=Ne({opacity:0,transform:"translateX(0)",width:0});xt(()=>{let l=s.current[o];l&&p({opacity:1,width:l.offsetWidth,transform:`translateX(${l.offsetLeft}px)`})},[o,t]);let c=gt(l=>{let d=0;if(l.key==="ArrowRight"?d=1:l.key==="ArrowLeft"&&(d=-1),d!==0){let m=(o+d+t.length)%t.length;for(;t[m].props.disabled&&m!==o;)m=(m+d+t.length)%t.length;m!==o&&!t[m].props.disabled&&(n(m),s.current[m]?.focus())}},[o,t]);return{active:o,setActive:n,tabRefs:s,indicatorStyle:i,handleKeyDown:c}}import{cva as Pe}from"class-variance-authority";import{jsx as k,jsxs as ee}from"react/jsx-runtime";var Ct=Pe("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"}}),Nt=Pe("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 ke({children:e}){let t=typeof e=="string"?k(B,{className:"language-bash",children:k("code",{children:e.trim()})}):e;return k("div",{className:"py-4",children:t})}function Te({defaultIndex:e=0,children:t}){let r=vt(()=>yt.toArray(t).filter(p=>ht(p)&&p.props?.label),[t]),{active:o,setActive:n,tabRefs:s,indicatorStyle:i}=Re({initialIndex:e,tabs:r});return k("div",{className:"my-8 w-full group/tabs",children:ee(T.Tabs,{selectedKey:o.toString(),onSelectionChange:p=>n(Number(p)),className:"w-full",children:[ee(T.TabList,{"aria-label":"Content Tabs",className:a(Ct()),children:[r.map((p,c)=>{let{label:l,icon:d,disabled:m}=p.props,u=c.toString();return ee(T.Tab,{id:u,isDisabled:m,ref:b=>{s.current[c]=b},className:({isSelected:b,isDisabled:v})=>a(Nt({isActive:b,isDisabled:v})),children:[!!d&&k("span",{className:"shrink-0 [&>svg]:w-4 [&>svg]:h-4",children:d}),k("span",{children:l})]},u)}),k("div",{className:"absolute bottom-0 h-0.5 bg-primary-500 transition-all duration-300 ease-in-out pointer-events-none",style:i,"aria-hidden":"true"})]}),r.map((p,c)=>k(T.TabPanel,{id:c.toString(),children:r[c]},c))]})})}import{useRef as Rt,useState as Pt,useEffect as kt}from"react";import{jsx as we,jsxs as Tt}from"react/jsx-runtime";function Ae({src:e,poster:t,alt:r,children:o,controls:n,preload:s="metadata",...i}){let p=Rt(null),[c,l]=Pt(!1);return kt(()=>{let d=p.current;if(!d)return;let m=new IntersectionObserver(([u])=>{u.isIntersecting&&(l(!0),m.disconnect())},{rootMargin:"200px"});return m.observe(d),()=>m.disconnect()},[]),we("div",{ref:p,className:"my-6 overflow-hidden rounded-lg border border-border-subtle",children:c?Tt("video",{className:"block w-full h-auto",src:e,poster:t,controls:!0,preload:s,playsInline:!0,...i,children:[o,"Your browser does not support the video tag."]}):we("div",{className:"aspect-video bg-bg-surface animate-pulse",role:"img","aria-label":r||"Video"})})}import{cva as wt}from"class-variance-authority";import{jsx as It}from"react/jsx-runtime";var At=wt("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 Ie({variant:e="default",children:t,className:r="",...o}){return It("span",{className:a(At({variant:e}),r),...o,children:t})}import{useCallback as Lt,useRef as Le}from"react";import*as Se from"react-aria-components";import{cva as Et}from"class-variance-authority";import{Fragment as Vt,jsx as I,jsxs as Ee}from"react/jsx-runtime";var St=Et("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 Ve({cols:e=3,children:t,className:r="",...o}){return I("div",{className:a(St({cols:e}),r),...o,children:t})}function Me({title:e,icon:t,href:r,children:o,className:n="",...s}){let i=Le(null),p=Le(null),c=Lt(m=>{let u=i.current||p.current;if(!u)return;let{left:b,top:v}=u.getBoundingClientRect();u.style.setProperty("--x",`${m.clientX-b}px`),u.style.setProperty("--y",`${m.clientY-v}px`)},[]),l=Ee(Vt,{children:[I("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&&I("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}),Ee("div",{className:"space-y-1.5",children:[e&&I("h3",{className:"text-sm font-bold text-text-main",children:e}),o&&I("div",{className:"text-sm text-text-muted leading-relaxed",children:o})]})]}),d=a("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?I(Se.Link,{ref:p,href:r,className:a(d,"no-underline cursor-pointer"),onMouseMove:c,...s,children:l}):I("div",{ref:i,role:"presentation",className:d,onMouseMove:c,...s,children:l})}import{Info as Mt,Lightbulb as Bt,AlertTriangle as zt,ShieldAlert as Dt,Bookmark as Ot,Zap as Ft,Flame as Ht}from"lucide-react";import{cva as Wt}from"class-variance-authority";import{jsx as g,jsxs as ze}from"react/jsx-runtime";var $t={note:g(Ot,{size:18}),tip:g(Bt,{size:18}),info:g(Mt,{size:18}),warning:g(zt,{size:18}),danger:g(Dt,{size:18}),important:g(Ht,{size:18}),caution:g(Ft,{size:18})},_t={note:"Note",tip:"Tip",info:"Info",warning:"Warning",danger:"Danger",important:"Important",caution:"Caution"},Be=Wt("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 P({type:e="note",title:t,children:r,className:o="",...n}){return ze("div",{className:a(Be({type:e}),o),role:e==="warning"||e==="danger"?"alert":"note",...n,children:[ze("div",{className:"flex items-center flex-row gap-2 mb-2",children:[g("span",{className:a("shrink-0",Be({type:e})),children:$t[e]}),g("span",{className:"text-sm font-bold tracking-tight text-text-main",children:t||_t[e]})]}),g("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 [&>p]:mb-2 [&>p:last-child]:mb-0",children:r})]})}var De=e=>g(P,{type:"note",...e}),Oe=e=>g(P,{type:"tip",...e}),Fe=e=>g(P,{type:"warning",...e}),He=e=>g(P,{type:"danger",...e}),We=e=>g(P,{type:"info",...e}),$e=e=>g(P,{type:"important",...e}),_e=e=>g(P,{type:"caution",...e});import{Children as jt,isValidElement as qt}from"react";import{Check as Xt,ChevronRight as Gt,Circle as Kt}from"lucide-react";import{cva as te}from"class-variance-authority";import{jsx as w,jsxs as er}from"react/jsx-runtime";var Ut=te("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}}),Jt=te("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}}),Yt=te("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 Zt({icon:e,children:t,variant:r,dense:o}){return er("li",{className:a(Jt({variant:r,dense:o})),children:[e&&w("span",{className:a(Yt({variant:r==="bubble"?"bubble":"default"})),children:e}),w("div",{className:"flex-1 text-text-muted group-hover:text-text-main transition-colors",children:t})]})}var Qt={checked:e=>w(Xt,{size:14,className:a("text-emerald-500 shrink-0",e)}),arrow:e=>w(Gt,{size:14,className:a("text-primary-400 shrink-0",e)}),bubble:e=>w(Kt,{size:6,fill:"currentColor",className:a("text-primary-500 shrink-0",e)}),default:()=>null,number:()=>null};function je({variant:e="default",cols:t=1,dense:r=!1,children:o,className:n,...s}){let i=t!==void 0&&Number(t)>1,p=Qt[e],c=Ut({variant:e,cols:t,dense:r,isGrid:i,className:n}),l=e==="number"?"ol":"ul";return e==="default"||e==="number"?w(l,{className:c,...s,children:o}):w("ul",{className:c,...s,children:jt.map(o,d=>{if(!qt(d))return d;let m=d,u=m.type==="li"?m.props.children:m.props.children||d;return w(Zt,{icon:p(),variant:e,dense:r,children:u})})})}import{Children as re,isValidElement as ie,useMemo as tr}from"react";import*as R from"react-aria-components";import{Folder as rr,FileText as or,File as nr,FileCode as sr,FileImage as ar,ChevronRight as ir}from"lucide-react";import{jsx as y,jsxs as se}from"react/jsx-runtime";var z=16,F=2,lr={ts:j,tsx:E,js:q,jsx:E,json:X,css:G,html:K,md:S,mdx:S,bash:V,sh:V,yaml:M,yml:M},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 ae(e){return typeof e=="string"?e:typeof e=="number"?e.toString():Array.isArray(e)?e.map(ae).join(""):ie(e)&&e.props&&typeof e.props=="object"&&"children"in e.props?ae(e.props.children):""}function dr(e,t){let r=e.toLowerCase(),o="shrink-0 transition-colors duration-200";if(t)return y(rr,{size:z,strokeWidth:F,className:a(o,"text-primary-400"),fill:"currentColor",fillOpacity:.15});let n=r.split(".").pop()||"",s=lr[n];if(s)return y(s,{size:z});let i=a(o,"text-text-dim group-hover:text-text-main");return oe.CODE.test(r)?y(sr,{size:z,strokeWidth:F,className:i}):oe.TEXT.test(r)?y(or,{size:z,strokeWidth:F,className:i}):oe.IMAGE.test(r)?y(ar,{size:z,strokeWidth:F,className:i}):y(nr,{size:z,strokeWidth:F,className:i})}function ne(e,t){if(!ie(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 cr(e){let t=e.match(/\s+(\/\/|#)\s+(.*)$/);return t?{name:e.slice(0,t.index).trim(),comment:t[2]}:{name:e.trim()}}function J(e,t="root"){if(!ie(e))return[];let r=[];if(ne(e,"ul"))return re.forEach(e.props.children,(o,n)=>{r.push(...J(o,`${t}-${n}`))}),r;if(ne(e,"li")){let o=re.toArray(e.props.children),n=o.findIndex(v=>ne(v,"ul")),s=n!==-1,i=s?o.slice(0,n):o,p=s?o.slice(n):[],c=ae(i),{name:l,comment:d}=cr(c),m=l.endsWith("/"),u=m?l.slice(0,-1):l,b=s||m;return r.push({id:`${t}-${u}`,name:u,comment:d,isFolder:b,children:s?J(p[0],`${t}-${u}`):void 0}),r}return e.props&&typeof e.props=="object"&&"children"in e.props&&re.forEach(e.props.children,(o,n)=>{r.push(...J(o,`${t}-${n}`))}),r}function qe({item:e}){return se(R.TreeItem,{id:e.id,textValue:e.name,className:"outline-none group focus-visible:ring-2 focus-visible:ring-primary-500/30 rounded-md",children:[y(R.TreeItemContent,{children:({isExpanded:t,hasChildItems:r})=>se("div",{className:"flex items-center gap-2 py-1 px-1.5 rounded-md transition-colors hover:bg-primary-500/5 cursor-pointer",children:[y("div",{style:{width:"calc((var(--tree-item-level) - 1) * 1rem)"},className:"shrink-0"}),r?y(R.Button,{slot:"chevron",className:"outline-none text-text-dim hover:text-primary-400 p-0.5 rounded transition-colors",children:y(ir,{size:14,strokeWidth:3,className:a("transition-transform duration-200",t&&"rotate-90")})}):y("div",{className:"w-[18px]"}),dr(e.name,e.isFolder),y("span",{className:a("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&&se("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&&y(R.Collection,{items:e.children,children:t=>y(qe,{item:t})})]})}function Xe({children:e}){let t=tr(()=>J(e),[e]);return y("div",{className:"my-8",children:y(R.Tree,{items:t,"aria-label":"File Tree",className:a("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=>y(qe,{item:r})})})}import*as H from"react-aria-components";import{useState as Ge,useMemo as Ke}from"react";function Ue({data:e,sortable:t=!1,paginated:r=!1,pageSize:o=10}){let[n,s]=Ge(null),[i,p]=Ge(1),c=Ke(()=>{if(!e)return[];let u=[...e];return t&&n!==null&&u.sort((b,v)=>{let f=b[n.key],N=v[n.key],L=typeof f=="string"?f:"",A=typeof N=="string"?N:"";return L<A?n.direction==="asc"?-1:1:L>A?n.direction==="asc"?1:-1:0}),u},[e,n,t]),l=Math.ceil(c.length/o),d=Ke(()=>{if(!r)return c;let u=(i-1)*o;return c.slice(u,u+o)},[c,r,i,o]);return{sortConfig:n,currentPage:i,setCurrentPage:p,totalPages:l,paginatedData:d,requestSort:u=>{if(!t)return;let b="asc";n&&n.key===u&&n.direction==="asc"&&(b="desc"),s({key:u,direction:b})}}}import{ChevronUp as pr,ChevronDown as Je,ChevronLeft as mr,ChevronRight as ur,ChevronsLeft as br,ChevronsRight as fr}from"lucide-react";import{Fragment as xr,jsx as x,jsxs as D}from"react/jsx-runtime";function Ye({headers:e,data:t,children:r,className:o="",sortable:n=!1,paginated:s=!1,pageSize:i=10}){let{sortConfig:p,currentPage:c,setCurrentPage:l,totalPages:d,paginatedData:m,requestSort:u}=Ue({data:t,sortable:n,paginated:s,pageSize:i}),b=f=>n?p?.key!==f?x(Je,{size:14,className:"ml-1 opacity-30"}):p.direction==="asc"?x(pr,{size:14,className:"ml-1 text-primary-400"}):x(Je,{size:14,className:"ml-1 text-primary-400"}):null,v=r||D(xr,{children:[e&&x("thead",{children:x("tr",{children:e.map((f,N)=>x("th",{onClick:()=>u(N),className:a("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:D("div",{className:"flex items-center",children:[f,b(N)]})},N))})}),m&&x("tbody",{children:m.map((f,N)=>x("tr",{className:"transition-colors hover:bg-bg-surface",children:f.map((L,A)=>x("td",{className:"px-3 py-2 border-b border-border-subtle text-sm text-text-muted",children:L},A))},N))})]});return D("div",{className:a("my-6 rounded-lg border border-border-subtle overflow-hidden",o),children:[x("div",{className:"overflow-x-auto",children:x("table",{className:"w-full border-collapse text-sm",children:v})}),s&&d>1&&D("div",{className:"flex items-center justify-between border-t border-border-subtle px-4 py-3",children:[D("span",{className:"text-xs text-text-muted",children:["Page ",c," of ",d]}),D("div",{className:"flex items-center gap-1",children:[x(H.Button,{onPress:()=>l(1),isDisabled:c===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:x(br,{size:16})}),x(H.Button,{onPress:()=>l(f=>Math.max(f-1,1)),isDisabled:c===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:x(mr,{size:16})}),x(H.Button,{onPress:()=>l(f=>Math.min(f+1,d)),isDisabled:c===d,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:x(ur,{size:16})}),x(H.Button,{onPress:()=>l(d),isDisabled:c===d,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:x(fr,{size:16})})]})]})]})}import{jsx as O,jsxs as W}from"react/jsx-runtime";function Ze({name:e,type:t,defaultValue:r,required:o=!1,children:n,id:s,className:i=""}){return W("article",{className:a("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",i),id:s,children:[W("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between mb-4",children:[W("div",{className:"flex flex-wrap items-center gap-2.5",children:[O("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&&O("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&&W("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:[O("span",{className:"h-1 w-1 rounded-full bg-red-400 animate-pulse"}),"Required"]})]}),r&&W("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:[O("span",{className:"font-semibold opacity-60 uppercase tracking-tighter",children:"Default"}),O("code",{className:"font-mono text-text-main font-medium",children:r})]})]}),O("div",{className:"text-sm text-text-muted leading-relaxed [&>p]:m-0 selection:bg-primary-500/30",children:n})]})}import{jsx as gr}from"react/jsx-runtime";function Qe({to:e,children:t,className:r="",...o}){let n=e&&(e.startsWith("http://")||e.startsWith("https://")||e.startsWith("//")),s=a("text-blue-600 hover:text-blue-800 hover:underline cursor-pointer",r);return gr(pe,{href:e,className:s,target:n?"_blank":void 0,rel:n?"noopener noreferrer":void 0,...o,children:t})}import{jsx as yr}from"react/jsx-runtime";function et({src:e,alt:t,theme:r,...o}){let{theme:n}=me();return r&&r!==n?null:yr("img",{src:e,alt:t||"",...o})}import{jsx as h,jsxs as $}from"react/jsx-runtime";function tt({title:e,props:t,className:r=""}){return $("div",{className:a("my-6",r),children:[e&&h("h3",{className:"text-base font-bold text-text-main mb-3",children:e}),h("div",{className:"overflow-x-auto rounded-lg border border-border-subtle",children:$("table",{className:"w-full border-collapse text-sm",children:[h("thead",{children:$("tr",{children:[h("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"}),h("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"}),h("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"}),h("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"})]})}),h("tbody",{children:t.map((o,n)=>$("tr",{className:"transition-colors hover:bg-bg-surface",children:[$("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:[h("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&&h("span",{className:"ml-1 text-red-400 font-bold",children:"*"})]}),h("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:h("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-text-muted",children:o.type})}),h("td",{className:"px-4 py-2.5 border-b border-border-subtle",children:o.defaultValue?h("code",{className:"rounded bg-bg-muted px-1.5 py-0.5 font-mono text-xs text-primary-400",children:o.defaultValue}):h("span",{className:"text-text-dim",children:"\u2014"})}),h("td",{className:"px-4 py-2.5 border-b border-border-subtle text-text-muted",children:o.description})]},`${o.name}-${n}`))})]})})]})}import{useMemo as rt}from"react";function ot(e){let{code:t,children:r,preview:o}=e,n=rt(()=>(t??(typeof r=="string"?r:"")).trim(),[t,r]),s=rt(()=>o??(typeof r!="string"?r:null),[o,r]);return{initialCode:n,previewElement:s}}import{jsx as le,jsxs as hr}from"react/jsx-runtime";function nt(e){let{highlightedHtml:t,hideCode:r=!1,hideSandbox:o=!1,hideCopy:n=!1,sandboxOptions:s={}}=e,{initialCode:i,previewElement:p}=ot(e);return hr("div",{className:"my-6 overflow-hidden rounded-xl border border-border-subtle",children:[le("div",{className:"flex items-center justify-center p-8 bg-bg-surface",children:p}),!r&&le("div",{className:"border-t border-border-subtle",children:le(B,{hideSandbox:o,hideCopy:n,title:s.title,lang:"tsx",highlightedHtml:t,plain:!0,children:i})})]})}export{ye as a,B as b,ke as c,Te as d,Ae as e,Ie as f,Ve as g,Me as h,P as i,De as j,Oe as k,Fe as l,He as m,We as n,$e as o,_e as p,je as q,Xe as r,Ye as s,Ze as t,Qe as u,et as v,tt as w,nt as x,vr as y};
|
package/dist/chunk-2Z5T6EAU.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f as h}from"./chunk-NBCYHLAA.mjs";import{useState as u,useMemo as M,useEffect as S}from"react";import{Index as R}from"flexsearch";import m from"virtual:boltdocs-search";function E(p){let{currentLocale:o,currentVersion:s}=h(),[a,g]=u(!1),[r,d]=u(""),[c,I]=u(null);S(()=>{if(!a||c)return;let n=new R({preset:"match",tokenize:"full",resolution:9,cache:!0});for(let i of m)n.add(i.id,`${i.title} ${i.content}`);I(n)},[a,c]);let v=M(()=>{if(!r)return p.filter(e=>{let t=!o||e.locale===o,l=!s||e.version===s;return t&&l}).slice(0,10).map(e=>({id:e.path,title:e.title,path:e.path,bio:e.description||"",groupTitle:e.groupTitle}));if(!c)return[];let n=c.search(r,{limit:20,suggest:!0}),i=[],f=new Set;for(let e of n){let t=m.find(x=>x.id===e);if(!t)continue;let l=!o||t.locale===o,y=!s||t.version===s;!l||!y||f.has(t.url)||(f.add(t.url),i.push({id:t.url,title:t.title,path:t.url,bio:t.display,groupTitle:t.display.split(" > ")[0],isHeading:t.url.includes("#")}))}return i.slice(0,10)},[r,c,o,s,p]);return{isOpen:a,setIsOpen:g,query:r,setQuery:d,list:v,input:{value:r,onChange:n=>d(n.target.value)}}}export{E as a};
|
package/dist/chunk-64AJ5QLT.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as d,e as l,ua as u,wa as c,ya as b,za as m}from"./chunk-WWJ7WKDI.mjs";import{useState as w}from"react";import{Copy as x,Check as g,ExternalLink as f,ChevronDown as v}from"lucide-react";import{jsx as e,jsxs as o}from"react/jsx-runtime";var C=n=>{let[s,t]=w(!1);return{copied:s,handleCopy:()=>{navigator.clipboard.writeText(n),t(!0),setTimeout(()=>t(!1),2e3)},handleOpenRaw:()=>{let a=new Blob([n],{type:"text/plain;charset=utf-8"}),p=URL.createObjectURL(a);window.open(p,"_blank")}}};function z({content:n,mdxRaw:s,config:t}){let i=s||n||"",{copied:r,handleCopy:a,handleOpenRaw:p}=C(i),h=t!==!1,y=typeof t=="object"&&t.text||"Copy Markdown";return!h||!i?null:e("div",{className:"relative inline-flex z-100 flex-shrink-0 w-max translate-y-0 active:translate-y-px transition-transform duration-200",children:o(u,{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:[e(l,{variant:"ghost",onPress:a,icon:r?e(g,{size:16}):e(x,{size:16}),iconPosition:"left",className:d("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",r&&"text-emerald-500 hover:bg-emerald-500/5"),children:r?"Copied!":y}),o(c,{placement:"bottom end",children:[e(l,{variant:"ghost",isIconOnly:!0,icon:e(v,{size:14}),className:d("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")}),o(b,{className:"w-52",children:[o(m,{onAction:a,children:[e(x,{size:16,className:"size-4 mt-0.5 text-text-muted group-hover:text-primary-500"}),e("span",{className:"font-medium text-[0.8125rem]",children:"Copy Markdown"})]}),o(m,{onAction:p,children:[e(f,{size:16,className:"size-4 mt-0.5 text-text-muted group-hover:text-primary-500"}),e("span",{className:"font-medium text-[0.8125rem]",children:"View as Markdown"})]})]})]})]})})}export{z as a};
|
package/dist/chunk-DDX52BX4.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useLocation as o}from"react-router-dom";var t=()=>o();export{t as a};
|
package/dist/chunk-HRZDSFR5.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as B}from"./chunk-JD3RSDE4.mjs";import{b as C,e as P,f as v}from"./chunk-NBCYHLAA.mjs";import{useLocation as k}from"react-router-dom";function w(t,o){return t?typeof t=="string"?t:o&&t[o]?t[o]:Object.values(t)[0]||"":""}function J(){let t=C(),{theme:o}=B(),a=k(),{currentLocale:e}=v(),i=t.theme||{},s=w(i.title,e)||"Boltdocs",g=i.navbar||[],d=i.socialLinks||[],u=i.githubRepo,h=g.map(p=>{let l=p.href||p.to||p.link||"",f=b=>{let y=a.pathname;if(y===b)return!0;if(!b||b==="/")return y==="/";let $=T=>{let R=T.split("/").filter(Boolean),x=0;return t.i18n?.locales&&R[x]&&t.i18n.locales[R[x]]&&x++,t.versions?.versions&&R[x]&&t.versions.versions.some(S=>S.path===R[x])&&x++,R.slice(x)},V=$(b),I=$(y);return V.length===0?I.length===0:I.length<V.length?!1:V.every((T,R)=>I[R]===T)};return{label:w(p.label||p.text,e),href:l,active:f(l),to:l.startsWith("http")||l.startsWith("//")?"external":void 0}}),r=i.logo,n=r?typeof r=="string"?r:o==="dark"?r.dark:r.light:null,c={alt:(r&&typeof r=="object"?r.alt:void 0)||s,width:r&&typeof r=="object"?r.width:void 0,height:r&&typeof r=="object"?r.height:void 0},m=u?`https://github.com/${u}`:null;return{links:h,title:s,logo:n,logoProps:c,github:m,social:d,config:t,theme:o}}import{useLocation as O}from"react-router-dom";function Z(t){let o=C(),a=O(),e=n=>n.endsWith("/")&&n.length>1?n.slice(0,-1):n,i=e(a.pathname),s=t.find(n=>e(n.path)===i),g=s?.tab?.toLowerCase(),d=g?t.filter(n=>!n.tab||n.tab.toLowerCase()===g):t,u=[],h=new Map;for(let n of d)n.group?(h.has(n.group)||h.set(n.group,{slug:n.group,title:n.groupTitle||n.group,routes:[],icon:n.groupIcon}),h.get(n.group).routes.push(n)):u.push(n);return{groups:Array.from(h.values()),ungrouped:u,activeRoute:s,activePath:i,config:o}}import{useState as A}from"react";function et(t=[]){let[o,a]=A(null);return{headings:t,activeId:o,setActiveId:a}}import{useLocation as N}from"react-router-dom";import{useEffect as W,useState as j,useRef as F}from"react";function rt(t=[],o=[]){let a=N(),e=F([]),[i,s]=j({opacity:0,transform:"translateX(0) scaleX(0)",width:0}),d=o.find(r=>r.path===a.pathname)?.tab?.toLowerCase(),u=t.findIndex(r=>r.id.toLowerCase()===d),h=u===-1?0:u;return W(()=>{let r=e.current[h];r&&s({opacity:1,width:r.offsetWidth,transform:`translateX(${r.offsetLeft}px)`})},[h,t.length,a.pathname]),{tabs:t,activeIndex:h,indicatorStyle:i,tabRefs:e,activeTabId:d}}import{useNavigate as U}from"react-router-dom";function L(t,o,a){let e=t;return o&&(e===o||e.startsWith(o+"/"))&&(e=e===o?"index.md":e.slice(o.length+1)),a&&(e===a||e.startsWith(a+"/"))&&(e=e===a?"index.md":e.slice(a.length+1)),e}function gt(){let t=U(),o=v(),{allRoutes:a,currentRoute:e,currentVersion:i,currentLocale:s,config:g}=o,d=g.versions,u=P(n=>n.setVersion),h=n=>{if(!d||n===i)return;u(n);let c=`/docs/${n}`;if(e){let m=L(e.filePath,e.version,e.locale),p=a.find(l=>L(l.filePath,l.version,l.locale)===m&&(l.version||d.defaultVersion)===n&&(s?l.locale===s:!l.locale));if(p)c=p.path;else{let l=a.find(f=>L(f.filePath,f.version,f.locale)==="index.md"&&(f.version||d.defaultVersion)===n&&(s?f.locale===s:!f.locale));c=l?l.path:`/docs/${n}${s?`/${s}`:""}`}}t(c)},r=o.availableVersions.map(n=>({...n,label:n.label,value:n.key}));return{currentVersion:i,currentVersionLabel:o.currentVersionLabel,availableVersions:r,handleVersionChange:h}}import{useNavigate as H}from"react-router-dom";function vt(){let t=H(),o=v(),{allRoutes:a,currentRoute:e,currentLocale:i,config:s}=o,g=s.i18n,d=P(c=>c.setLocale),u=c=>{if(!g||c===i)return;d(c);let m="/";if(e){let p=L(e.filePath,e.version,e.locale),l=a.find(f=>L(f.filePath,f.version,f.locale)===p&&(f.locale||g.defaultLocale)===c&&f.version===e.version);if(l)m=l.path;else{let f=a.find(b=>L(b.filePath,b.version,b.locale)==="index.md"&&(b.locale||g.defaultLocale)===c&&b.version===e.version);m=f?f.path:c===g.defaultLocale?e.version?`/${e.version}`:"/":e.version?`/${e.version}/${c}`:`/${c}`}}else{let p=a.find(l=>(l.filePath==="index.mdx"||l.filePath==="index.md")&&(l.locale||g.defaultLocale)===c&&!l.version);p?m=p.path:m=c===g.defaultLocale?"/":`/${c}`}t(m)},r=s.i18n?.localeConfigs?.[i]?.label||s.i18n?.locales[i]||i,n=s.i18n?Object.entries(s.i18n.locales).map(([c,m])=>{let p=s.i18n?.localeConfigs?.[c];return{key:c,label:p?.label||m,value:c,isCurrent:c===i}}):[];return{currentLocale:i,currentLocaleLabel:r,availableLocales:n,handleLocaleChange:u}}import{useLocation as M}from"react-router-dom";function Ct(){let{routes:t,currentRoute:o}=v(),a=M();if(!o)return{prevPage:null,nextPage:null,currentRoute:null};let e=o.tab?.toLowerCase(),i=e?t.filter(u=>u.tab?.toLowerCase()===e):t.filter(u=>!u.tab),s=i.findIndex(u=>u.path===a.pathname),g=s>0?i[s-1]:null,d=s!==-1&&s<i.length-1?i[s+1]:null;return{prevPage:g,nextPage:d,currentRoute:o}}function Vt(){let{currentRoute:t}=v(),o=[];return t&&(t.groupTitle&&o.push({label:t.groupTitle}),o.push({label:t.title,href:t.path})),{crumbs:o,activeRoute:t}}export{w as a,J as b,Z as c,et as d,rt as e,gt as f,vt as g,Ct as h,Vt as i};
|
package/dist/chunk-JD3RSDE4.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createContext as v,use as k,useEffect as l,useState as a}from"react";import{jsx as y}from"react/jsx-runtime";var u=v(void 0);function C({children:o}){let[r,d]=a("system"),[T,m]=a("dark"),[i,g]=a(!1);l(()=>{g(!0);let e=localStorage.getItem("boltdocs-theme"),s=e==="light"||e==="dark"||e==="system"?e:"system";d(s);let t=window.matchMedia("(prefers-color-scheme: dark)");((h,n)=>{m(h==="system"?n?"dark":"light":h)})(s,t.matches);let c=h=>{m(n=>(localStorage.getItem("boltdocs-theme")||"system")==="system"?h.matches?"dark":"light":n)};return t.addEventListener("change",c),()=>t.removeEventListener("change",c)},[]),l(()=>{if(!i)return;let e=window.matchMedia("(prefers-color-scheme: dark)").matches,s=r==="system"?e?"dark":"light":r;m(s);let t=document.documentElement;s==="light"?(t.classList.add("theme-light"),t.dataset.theme="light"):(t.classList.remove("theme-light"),t.dataset.theme="dark")},[r,i]);let f=e=>{d(e),localStorage.setItem("boltdocs-theme",e)};return y(u.Provider,{value:{theme:r,resolvedTheme:T,setTheme:f},children:o})}function E(){let o=k(u);if(o===void 0)throw new Error("useTheme must be used within a ThemeProvider");return o}export{C as a,E as b};
|
package/dist/chunk-JZXLCA2E.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var d=Object.defineProperty;var e=(c,a)=>{for(var b in a)d(c,b,{get:a[b],enumerable:!0})};export{e as a};
|
package/dist/chunk-NBCYHLAA.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{createContext as B,use as T}from"react";var k=B(null);function h(){let o=T(k);if(!o)throw new Error("useConfig must be used within a ConfigProvider");return o}import{useLocation as $}from"react-router-dom";import{createContext as w,use as W,useCallback as M,useRef as O}from"react";import{jsx as j}from"react/jsx-runtime";var P=w({preload:()=>{},routes:[]});function b(){return W(P)}function J({routes:o,modules:e,children:l}){let c=O(null),i=M(s=>{c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{let a=s.split("#")[0].split("?")[0],r=o.find(n=>n.path===a||a==="/"&&n.path==="");if(r?.filePath){let n=Object.keys(e).find(u=>u.endsWith("/"+r.filePath));n&&e[n]().catch(u=>{console.error(`[boltdocs] Failed to preload route ${s}:`,u)})}},100)},[o,e]);return j(P.Provider,{value:{preload:i,routes:o},children:l})}import{create as z}from"zustand";import{persist as A,createJSONStorage as N}from"zustand/middleware";var g=z()(A(o=>({currentLocale:void 0,currentVersion:void 0,hasHydrated:!1,setLocale:e=>o({currentLocale:e}),setVersion:e=>o({currentVersion:e}),setHasHydrated:e=>o({hasHydrated:e})}),{name:"boltdocs-storage",storage:N(()=>localStorage),partialize:o=>({currentLocale:o.currentLocale,currentVersion:o.currentVersion}),onRehydrateStorage:()=>o=>{o?.setHasHydrated(!0)}}));function y(){let{routes:o}=b(),e=h(),l=$(),c=g(t=>t.currentLocale),i=g(t=>t.currentVersion),s=g(t=>t.hasHydrated),a=o.find(t=>t.path===l.pathname),r=e.i18n?a?.locale||(s?c:void 0)||e.i18n.defaultLocale:void 0,n=e.versions?a?.version||(s?i:void 0)||e.versions.defaultVersion:void 0,u=o.filter(t=>{let v=e.i18n?(t.locale||e.i18n.defaultLocale)===r:!0,C=e.versions?(t.version||e.versions.defaultVersion)===n:!0;if(!(v&&C))return!1;let L=e.i18n;if(L){let S=!!a?.locale,H=!!t.locale;if(o.some(p=>p!==t&&p.filePath===t.filePath&&p.version===t.version&&(p.locale||L.defaultLocale)===(t.locale||L.defaultLocale))&&S!==H)return!1}return!0}),f=e.i18n?.localeConfigs?.[r]?.label||e.i18n?.locales[r]||r,m=e.versions?.versions.find(t=>t.path===n)?.label||n,V=e.i18n?Object.entries(e.i18n.locales).map(([t,v])=>{let C=e.i18n?.localeConfigs?.[t];return{key:t,label:C?.label||v,isCurrent:t===r}}):[],x=e.versions?e.versions.versions.map(t=>({key:t.path,label:t.label,isCurrent:t.path===n})):[];return{routes:u,allRoutes:o,currentRoute:a,currentLocale:r,currentLocaleLabel:f,availableLocales:V,currentVersion:n,currentVersionLabel:m,availableVersions:x,config:e}}function ne(o){let e=h(),{currentLocale:l,currentVersion:c}=y();if(!e||typeof o!="string"||o.startsWith("http")||o.startsWith("//"))return o;let i=e.i18n,s=e.versions;if(!i&&!s)return o;let a=o.startsWith("/docs"),r=o.split("/").filter(Boolean),n=0;r[n]==="docs"&&n++,s&&r.length>n&&s.versions.find(m=>m.path===r[n])&&n++,i&&r.length>n&&i.locales[r[n]]&&n++;let u=r.slice(n),d=[];a&&(d.push("docs"),s&&c&&d.push(c)),i&&l&&l!==i.defaultLocale&&d.push(l),d.push(...u);let f=`/${d.join("/")}`;return f.length>1&&f.endsWith("/")?f.slice(0,-1):f||"/"}export{k as a,h as b,b as c,J as d,g as e,y as f,ne as g};
|
package/dist/chunk-PPVDMDEL.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as oe,b as ne,c as ie,d as se,e as me,f as le,g as ce,h as pe,i as ue}from"./chunk-HRZDSFR5.mjs";import{b as Z}from"./chunk-JD3RSDE4.mjs";import{Ca as h,Da as p,F as g,P as Q,R as X,S as j,_ as P,a as H,b as z,e as C,ea as x,f as J,ka as A,pa as S,qa as ee,ra as G,sa as _,ta as te,wa as re,ya as ae,za as D}from"./chunk-WWJ7WKDI.mjs";import{b as K,f as $,g as Y}from"./chunk-NBCYHLAA.mjs";import{ArrowLeft as Me}from"lucide-react";import{jsx as I,jsxs as de}from"react/jsx-runtime";function vt(){return I("div",{className:"flex items-center justify-center min-h-[60vh] text-center",children:de("div",{className:"space-y-4",children:[I("span",{className:"text-8xl font-black tracking-tighter text-primary-500/20",children:"404"}),I("h1",{className:"text-2xl font-bold text-text-main",children:"Page Not Found"}),I("p",{className:"text-sm text-text-muted max-w-sm mx-auto",children:"The page you're looking for doesn't exist or has been moved."}),de(z,{href:"/",className:"inline-flex items-center gap-2 rounded-lg bg-primary-500 px-5 py-2.5 text-sm font-semibold text-white outline-none transition-all hover:brightness-110 hover:shadow-lg focus-visible:ring-2 focus-visible:ring-primary-500/30",children:[I(Me,{size:16})," Go to Home"]})]})})}import{jsx as u,jsxs as w}from"react/jsx-runtime";function wt(){return u("div",{className:H("w-full h-full relative overflow-y-auto transition-opacity duration-300 animate-fade-in"),children:w("div",{className:"mx-auto max-w-(--spacing-content-max) px-4 py-8 space-y-10",children:[w("div",{className:"flex gap-2",children:[u(p,{className:"h-3 w-16"}),u(p,{className:"h-3 w-24"})]}),u(p,{className:"h-10 w-[60%] sm:h-12"}),w("div",{className:"space-y-3",children:[u(p,{className:"h-4 w-full"}),u(p,{className:"h-4 w-[95%]"}),u(p,{className:"h-4 w-[40%]"})]}),w("div",{className:"space-y-6 pt-4",children:[u(p,{className:"h-7 w-32"}),w("div",{className:"space-y-3",children:[u(p,{className:"h-4 w-full"}),u(p,{className:"h-4 w-[98%]"}),u(p,{className:"h-4 w-[92%]"}),u(p,{className:"h-4 w-[60%]"})]})]}),u(p,{className:"h-32 w-full rounded-lg bg-bg-muted/50"}),w("div",{className:"space-y-6 pt-4",children:[u(p,{className:"h-7 w-48"}),w("div",{className:"space-y-3",children:[u(p,{className:"h-4 w-full"}),u(p,{className:"h-4 w-[85%]"})]})]})]})})}import{useEffect as Ee,useState as Be}from"react";import{Sun as ge,Moon as fe,Monitor as he}from"lucide-react";import{Button as Oe}from"react-aria-components";import{jsx as b,jsxs as M}from"react/jsx-runtime";function be(){let{theme:e,setTheme:t}=Z(),[n,r]=Be(!1);return Ee(()=>{r(!0)},[]),n?M(re,{placement:"bottom right",children:[b(Oe,{className:"flex h-9 w-9 items-center justify-center rounded-md text-text-muted transition-colors hover:bg-bg-surface hover:text-text-main outline-none focus-visible:ring-2 focus-visible:ring-primary-500","aria-label":"Selection theme",children:b(e==="system"?he:e==="dark"?fe:ge,{size:20,className:"animate-in fade-in zoom-in duration-300"})}),M(ae,{selectionMode:"single",selectedKeys:[e],onSelectionChange:m=>{let a=Array.from(m)[0];t(a)},children:[M(D,{id:"light",children:[b(ge,{size:16}),b("span",{children:"Light"})]}),M(D,{id:"dark",children:[b(fe,{size:16}),b("span",{children:"Dark"})]}),M(D,{id:"system",children:[b(he,{size:16}),b("span",{children:"System"})]})]})]}):b("div",{className:"h-9 w-9"})}import{useEffect as ze,useState as De}from"react";var $e="https://api.github.com";async function ve(e,t,n=$e){let r=new Headers;t&&r.append("authorization",t);let m=await(await fetch(`${n}/repos/${e}`,{headers:r})).json();return m.stargazers_count!==void 0?He(m.stargazers_count):"0"}var He=e=>Intl.NumberFormat("en",{notation:"compact",compactDisplay:"short"}).format(e);import{jsx as xe,jsxs as Ae}from"react/jsx-runtime";function Ne({repo:e}){let[t,n]=De(null);return ze(()=>{e&&ve(e).then(r=>n(r)).catch(()=>n("0"))},[e]),Ae("a",{href:`https://github.com/${e}`,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 rounded-md border border-border-subtle bg-bg-surface px-2.5 py-1.5 text-xs font-medium text-text-muted transition-all hover:bg-bg-main hover:border-border-strong hover:text-text-main",children:[xe(J,{className:"h-4 w-4"}),t&&xe("span",{className:"tabular-nums",children:t})]})}import*as Ge from"lucide-react";import{jsx as R,jsxs as ye}from"react/jsx-runtime";function Pe({tabs:e,routes:t}){let{currentLocale:n}=$(),{indicatorStyle:r,tabRefs:i,activeIndex:m}=me(e,t),a=s=>{if(!s)return null;if(s.trim().startsWith("<svg"))return R("span",{className:"h-4 w-4",dangerouslySetInnerHTML:{__html:s}});let c=Ge[s];return c?R(c,{size:16}):R("img",{src:s,alt:"",className:"h-4 w-4 object-contain"})};return R("div",{className:"mx-auto max-w-(--breakpoint-3xl) px-4 md:px-6",children:ye(A.TabsList,{className:"border-none py-0",children:[e.map((s,c)=>{let y=c===m,l=t.find(d=>d.tab&&d.tab.toLowerCase()===s.id.toLowerCase()),v=l?l.path:"#";return ye(z,{href:v,ref:d=>{i.current[c]=d},className:`relative flex items-center gap-2 px-4 py-3 text-sm font-medium transition-colors outline-none ${y?"text-primary-500":"text-text-muted hover:text-text-main"}`,children:[a(s.icon),R("span",{children:oe(s.text,n)})]},s.id)}),R(A.TabsIndicator,{style:r})]})})}import{Suspense as _e,lazy as Ve}from"react";import{useLocation as Ue}from"react-router-dom";import{ChevronDown as we,Languages as qe}from"lucide-react";import{Fragment as Ze,jsx as o,jsxs as N}from"react/jsx-runtime";var Fe=Ve(()=>import("./search-dialog-OONKKC5H.mjs").then(e=>({default:e.SearchDialog})));function ir(){let{links:e,title:t,logo:n,logoProps:r,github:i,social:m,config:a}=ne(),{routes:s,allRoutes:c,currentVersion:y,currentLocale:l}=$(),{pathname:v}=Ue(),d=a.theme||{},Ie=v.startsWith("/docs"),F=d?.tabs&&d.tabs.length>0;return N(g.NavbarRoot,{className:F?"border-b-0":"",children:[N(g.Content,{children:[N(g.NavbarLeft,{children:[n&&o(g.NavbarLogo,{src:n,alt:r?.alt||t,width:r?.width??24,height:r?.height??24}),o(g.Title,{children:t}),a.versions&&y&&o(Ke,{})]}),o(g.NavbarCenter,{children:o(_e,{fallback:o("div",{className:"h-9 w-32 animate-pulse rounded-md bg-bg-surface"}),children:o(Fe,{routes:s||[]})})}),N(g.NavbarRight,{children:[o(g.Links,{children:e.map(O=>o(Ze,{children:o(We,{link:O},O.href)}))}),a.i18n&&l&&o(Ye,{}),o(g.Split,{}),o(be,{}),i&&o(Ne,{repo:d?.githubRepo??""}),m.length>0&&o(g.Split,{}),o("div",{className:"flex items-center gap-1",children:m.map(({icon:O,link:W})=>o(g.Socials,{icon:O,link:W,className:"p-1.5"},W))})]})]}),Ie&&F&&d?.tabs&&o("div",{className:"w-full border-b border-border-subtle bg-bg-main",children:o(Pe,{tabs:d.tabs,routes:c||s||[]})})]})}function We({link:e}){let t=Y(e.href||"");return o(g.Link,{...e,href:t})}function Ke(){let{currentVersionLabel:e,availableVersions:t,handleVersionChange:n}=le();return t.length===0?null:N(h.Trigger,{children:[o(C,{variant:"outline",size:"sm",rounded:"lg",iconPosition:"right",icon:o(we,{className:"w-3.5 h-3.5 text-text-muted/60"}),className:"h-8 border-border-subtle/60 bg-bg-surface/30 backdrop-blur-sm transition-all duration-200 hover:border-primary-500/50 hover:bg-primary-500/5",children:o("span",{className:"font-semibold text-[0.8125rem]",children:e})}),o(h.Root,{children:o(h.Section,{items:t,children:r=>o(h.Item,{onPress:()=>n(r.value),children:r.label},`${r.value??""}`)})})]})}function Ye(){let{currentLocale:e,availableLocales:t,handleLocaleChange:n}=ce();return t.length===0?null:N(h.Trigger,{children:[o(C,{variant:"outline",size:"sm",rounded:"lg",iconPosition:"right",icon:o(we,{className:"w-3.5 h-3.5 text-text-muted/60"}),className:"h-8 border-border-subtle/60 bg-bg-surface/30 backdrop-blur-sm transition-all duration-200 hover:border-primary-500/50 hover:bg-primary-500/5 px-2.5",children:N("div",{className:"flex items-center gap-1.5",children:[o(qe,{className:"w-3.5 h-3.5 text-primary-500"}),o("span",{className:"font-bold text-[0.75rem] tracking-wider uppercase opacity-90",children:e||"en"})]})}),o(h.Root,{children:o(h.Section,{items:t,children:r=>o(h.Item,{onPress:()=>n(r.value),children:N("div",{className:"flex items-center justify-between w-full gap-4",children:[o("span",{children:r.label}),o("span",{className:"text-[10px] font-bold opacity-40 uppercase tracking-tighter",children:r.value})]})},`${r.value??""}`)})})]})}import{Zap as Je}from"lucide-react";import{jsx as V,jsxs as Te}from"react/jsx-runtime";function ke(){return V("div",{className:"flex items-center justify-center mt-10 mb-4 px-4 w-full",children:Te("a",{href:"https://github.com/jesusalcaladev/boltdocs",target:"_blank",rel:"noopener noreferrer",className:"group relative flex items-center gap-2 px-4 py-2 rounded-full border border-border-subtle bg-bg-surface/50 backdrop-blur-md transition-all duration-300 hover:border-primary-500/50 hover:bg-bg-surface hover:shadow-xl hover:shadow-primary-500/5 select-none",children:[V(Je,{className:"w-3.5 h-3.5 text-text-muted group-hover:text-primary-500 transition-colors duration-300",fill:"currentColor"}),Te("span",{className:"text-[11px] font-medium text-text-muted group-hover:text-text-main transition-colors duration-300 tracking-wide",children:["Powered by"," ",V("strong",{className:"font-bold text-text-main/80 group-hover:text-text-main",children:"Boltdocs"})]})]})})}import{useState as Qe,useEffect as Xe,useMemo as je}from"react";import*as et from"lucide-react";import{jsx as T,jsxs as rt}from"react/jsx-runtime";function Le(e){return e&&et[e]||void 0}function tt({group:e,activePath:t,getIcon:n}){let r=je(()=>e.routes.some(a=>a.path===t),[e.routes,t]),[i,m]=Qe(!0);return Xe(()=>{r&&m(!0)},[r]),T(S.SidebarGroup,{title:e.title,isOpen:i,onToggle:()=>m(!i),children:e.routes.map(a=>{let s=t===(a.path.endsWith("/")?a.path.slice(0,-1):a.path);return T(S.SidebarLink,{label:a.title,href:a.path,active:s,icon:n(a.icon),badge:a.badge},a.path)})})}function hr({routes:e,config:t}){let{groups:n,ungrouped:r,activePath:i}=ie(e),m=t.theme||{};return rt(S.SidebarRoot,{children:[r.length>0&&T(S.SidebarGroup,{className:"mb-6",children:r.map(a=>{let s=i===(a.path.endsWith("/")?a.path.slice(0,-1):a.path);return T(S.SidebarLink,{label:a.title,href:a.path,active:s,icon:Le(a.icon),badge:a.badge},a.path)})}),n.map(a=>T(tt,{group:a,activePath:i,getIcon:Le},a.slug)),m?.poweredBy&&T("div",{className:"mt-auto pt-8",children:T(ke,{})})]})}import at,{useRef as Se,useEffect as ot,useState as nt,useCallback as it}from"react";import{Pencil as st,CircleHelp as mt,TextAlignStart as lt}from"lucide-react";import{jsx as f,jsxs as k}from"react/jsx-runtime";function wr({headings:e=[],editLink:t,communityHelp:n,filePath:r}){let{headings:i}=se(e),m=at.useMemo(()=>i.map(a=>({title:a.text,url:`#${a.id}`,depth:a.level})),[i]);return i.length===0?null:f(j,{toc:m,children:f(ct,{headings:i,editLink:t,communityHelp:n,filePath:r})})}function ct({headings:e,editLink:t,communityHelp:n,filePath:r}){let i=Q(),[m,a]=nt({opacity:0}),s=Se(null),c=Se(null);ot(()=>{if(!i||!s.current)return;let l=s.current.querySelector(`a[href="#${i}"]`);l&&a({transform:`translateY(${l.offsetTop}px)`,height:`${l.offsetHeight}px`,opacity:1})},[i]);let y=it((l,v)=>{l.preventDefault();let d=document.getElementById(v);d&&(d.scrollIntoView({behavior:"smooth"}),window.history.pushState(null,"",`#${v}`))},[]);return k(P.OnThisPageRoot,{children:[k(P.OnThisPageHeader,{className:"flex flex-row gap-x-2",children:[f(lt,{size:16}),"On this page"]}),f(X,{containerRef:c,children:k(P.OnThisPageContent,{className:"max-h-[450px] boltdocs-otp-scroll-area",ref:c,children:[f(P.OnThisPageIndicator,{style:m}),f("ul",{className:"relative space-y-2 border-l border-border-subtle",ref:s,children:e.map(l=>f(P.OnThisPageItem,{level:l.level,children:f(P.OnThisPageLink,{href:`#${l.id}`,active:i===l.id,onClick:v=>y(v,l.id),className:"pl-4",children:l.text})},l.id))})]})}),(t||n)&&k("div",{className:"mt-8 pt-8 border-t border-border-subtle space-y-4",children:[f("p",{className:"text-xs font-bold uppercase tracking-wider text-text-main",children:"Need help?"}),k("ul",{className:"space-y-3",children:[t&&r&&f("li",{children:k("a",{href:t.replace(":path",r),target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-sm text-text-muted hover:text-text-main transition-colors",children:[f(st,{size:16}),"Edit this page"]})}),n&&f("li",{children:k("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-sm text-text-muted hover:text-text-main transition-colors",children:[f(mt,{size:16}),"Community help"]})})]})]})]})}import{useEffect as pt}from"react";import{useLocation as ut}from"react-router-dom";function Rr({siteTitle:e,siteDescription:t,routes:n}){let r=ut();return pt(()=>{let i=n.find(y=>y.path===r.pathname),m=i?.title,a=i?.description||t||"";document.title=m?`${m} | ${e}`:e;let s=document.querySelector('meta[name="description"]');s||(s=document.createElement("meta"),s.name="description",document.head.appendChild(s)),s.content=a,L("property","og:title",document.title),L("property","og:description",a),L("property","og:type","article"),L("property","og:url",window.location.href),L("name","twitter:card","summary"),L("name","twitter:title",document.title),L("name","twitter:description",a);let c=document.querySelector('link[rel="canonical"]');c||(c=document.createElement("link"),c.rel="canonical",document.head.appendChild(c)),c.href=window.location.origin+r.pathname},[r.pathname,e,t,n]),null}function L(e,t,n){let r=document.querySelector(`meta[${e}="${t}"]`);r||(r=document.createElement("meta"),r.setAttribute(e,t),document.head.appendChild(r)),r.content=n}import{Home as dt}from"lucide-react";import{jsx as E,jsxs as Re}from"react/jsx-runtime";function $r(){let{crumbs:e,activeRoute:t}=ue(),r=K().theme||{};return e.length===0||!r?.breadcrumbs?null:Re(ee,{children:[E(G,{children:E(_,{href:"/",children:E(dt,{size:14})})}),e.map((i,m)=>Re(G,{children:[E(te,{}),E(_,{href:i.href,className:H({"font-medium text-text-main":i.href===t?.path}),children:i.label})]},`crumb-${i.href}-${i.label}-${m}`))]})}import{jsx as B,jsxs as U}from"react/jsx-runtime";function Gr(){let{prevPage:e,nextPage:t}=pe();return!e&&!t?null:U(x.PageNavRoot,{className:"animate-in fade-in slide-in-from-bottom-4 duration-700",children:[e?U(x.PageNavLink,{to:e.path,direction:"prev",children:[B(x.PageNavLink.Title,{children:"Previous"}),B(x.PageNavLink.Description,{children:e.title})]}):B("div",{}),t&&U(x.PageNavLink,{to:t.path,direction:"next",children:[B(x.PageNavLink.Title,{children:"Next"}),B(x.PageNavLink.Description,{children:t.title})]})]})}import{Component as gt}from"react";import{jsx as q,jsxs as ft}from"react/jsx-runtime";var Ce=class extends gt{state={hasError:!1};static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){console.error("Uncaught error in Boltdocs Layout:",t,n)}render(){return this.state.hasError?this.props.fallback||ft("div",{className:"flex flex-col items-center justify-center min-h-[40vh] text-center gap-4 px-4",children:[q("div",{className:"text-lg font-bold text-red-400",children:"Something went wrong"}),q("p",{className:"text-sm text-text-muted max-w-md",children:this.state.error?.message||"An unexpected error occurred while rendering this page."}),q(C,{className:"rounded-lg border border-border-subtle bg-bg-surface px-5 py-2 text-sm font-medium text-text-main transition-colors hover:bg-bg-muted cursor-pointer",onPress:()=>this.setState({hasError:!1}),children:"Try again"})]}):this.props.children}};export{vt as a,wt as b,be as c,Ne as d,Pe as e,ir as f,ke as g,hr as h,wr as i,Rr as j,$r as k,Gr as l,Ce as m};
|
package/dist/chunk-T3W44KWY.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{getParameters as l}from"codesandbox/lib/api/define.js";function f(e){let r=e.files||{},i=e.dependencies||{},t=e.devDependencies||{},n=e.title||"codesandbox-project",d=e.description||"Generic Sandbox",a={};for(let[c,s]of Object.entries(r)){let o=typeof s.content=="object"?JSON.stringify(s.content,null,2):s.content;a[c]={content:o,isBinary:s.isBinary??!1}}if(!a["package.json"]){let s=e.template==="vite"||!!t.vite||!!t["@vitejs/plugin-react"]?{dev:"vite",build:"vite build",preview:"vite preview"}:{start:"node index.js"};a["package.json"]={content:JSON.stringify({private:!0,name:n,description:d,type:"module",version:"1.0.0",scripts:e.scripts||s,dependencies:i,devDependencies:t},null,2),isBinary:!1}}return a}function p(e){let r=f(e),i=l({files:r}),t=new URLSearchParams({parameters:i,installDependencies:"true"});return e.entry&&t.set("file",`/${e.entry}`),{parameters:i,url:`https://codesandbox.io/api/v1/sandboxes/define?${t.toString()}`,options:e}}function u(e){if(typeof window>"u")return p(e);let r=f(e),i=l({files:r}),t=e.entry||"src/App.tsx",n=document.createElement("form");n.method="POST",n.target="_blank",n.action="https://codesandbox.io/api/v1/sandboxes/define",n.style.display="none";let d=(c,s)=>{let o=document.createElement("input");o.type="hidden",o.name=c,o.value=s,n.appendChild(o)},a=new URLSearchParams({file:`/${t}`,eslint:"0",codemirror:"1",installDependencies:"true"});return d("query",a.toString()),d("parameters",i),document.body.appendChild(n),n.submit(),document.body.removeChild(n),{parameters:i,url:`https://codesandbox.io/api/v1/sandboxes/define?parameters=${i}`,options:e}}function b(e){let r=f(e),i=l({files:r}),t=e.embed||{},n=new URLSearchParams({parameters:i,embed:"1"});return t.view&&n.set("view",t.view),t.theme&&n.set("theme",t.theme),t.hideNavigation&&n.set("hidenavigation","1"),e.entry&&n.set("file",`/${e.entry}`),{parameters:i,url:`https://codesandbox.io/api/v1/sandboxes/define?${n.toString()}`,options:e}}export{p as a,u as b,b as c};
|
package/dist/chunk-UBE4CKOA.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as y}from"./chunk-2Z5T6EAU.mjs";import{F as g,G as h,H as u,I as m,J as p,K as S,L as d,M as f,N as D}from"./chunk-WWJ7WKDI.mjs";import{useEffect as k,useCallback as C}from"react";import{useNavigate as E}from"react-router-dom";import{Fragment as M,jsx as o,jsxs as n}from"react/jsx-runtime";function x({routes:v}){let{isOpen:I,setIsOpen:a,query:R,setQuery:w,list:b}=y(v),r=E();k(()=>{let e=t=>{(/Mac/.test(navigator.userAgent)?t.metaKey:t.ctrlKey)&&(t.key==="k"||t.key==="j")&&(t.preventDefault(),a(i=>!i))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[a]);let s=C(e=>{let t=String(e);if(a(!1),t.includes("#")){let[l,c]=t.split("#");r(l),setTimeout(()=>{let i=document.getElementById(c);i&&i.scrollIntoView({behavior:"smooth"})},100)}else r(t)},[r,a]);return n(M,{children:[o(g.SearchTrigger,{onPress:()=>a(!0)}),o(h,{isOpen:I,onOpenChange:a,children:n(u,{onSelectionChange:s,children:[o(m,{value:R,onChange:e=>w(e.target.value)}),o(p,{items:b,children:e=>n(S,{onPress:()=>s(e.id),textValue:e.title,children:[o(d,{isHeading:e.isHeading}),n("div",{className:"flex flex-col justify-center gap-0.5",children:[o(f,{children:e.title}),o(D,{children:e.bio})]})]},e.id)})]})})]})}export{x as a};
|