@krak-stack/registry 0.1.19 → 0.1.20
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/dist/components/ui/code-block.d.ts +1 -3
- package/dist/components/ui/code-block.js +32 -60
- package/dist/components/ui/data-table.d.ts +202 -273
- package/dist/components/ui/data-table.js +1810 -2115
- package/dist/components/ui/effect-form.js +169 -170
- package/dist/components/ui/form.js +112 -113
- package/dist/components/ui/icon-input.js +40 -43
- package/dist/components/ui/menubar.d.ts +29 -0
- package/dist/components/ui/pagination.js +2 -2
- package/dist/components/ui/sidebar-layout.js +67 -72
- package/dist/components/ui/theme-switcher.js +3 -3
- package/dist/components/ui/virtualized-combobox.js +31 -34
- package/dist/lib/{docs-core.d.ts → docs.d.ts} +135 -144
- package/dist/lib/{docs-core.js → docs.js} +597 -440
- package/dist/lib/documentation-toolkit.d.ts +19 -1
- package/dist/lib/documentation-toolkit.js +164 -66
- package/dist/lib/httpapi-cli.d.ts +5 -4
- package/dist/lib/httpapi-cli.js +256 -34
- package/dist/lib/httpapi-client.js +3 -3
- package/dist/lib/httpapi-helpers.d.ts +8 -6
- package/dist/lib/httpapi-helpers.js +12 -12
- package/dist/lib/httpapi-mcp.js +3 -3
- package/dist/lib/httpapi-toolkit.js +3 -3
- package/dist/lib/markdown/content.d.ts +13 -0
- package/dist/lib/markdown/server.d.ts +19 -0
- package/dist/lib/query.js +6 -6
- package/dist/lib/seo.js +2 -2
- package/dist/lib/webfetch-toolkit.js +6 -6
- package/dist/services/agent/client/atom.d.ts +7 -0
- package/dist/services/agent/client/index.js +481 -304
- package/dist/services/agent/index.d.ts +16 -0
- package/dist/services/agent/index.js +102 -1
- package/dist/services/agent/schema.d.ts +28 -0
- package/dist/services/agent/schema.js +15 -4
- package/dist/services/file-extraction/index.js +4 -4
- package/dist/services/file-extraction/schema.js +2 -2
- package/dist/services/health/index.js +9 -9
- package/dist/services/notification/channels/ses/index.js +2 -2
- package/dist/services/notification/channels/ses/schema.js +2 -2
- package/dist/services/notification/client/index.js +5 -5
- package/dist/services/notification/index.js +2 -2
- package/dist/services/notification/persistence/drizzle.js +2 -2
- package/dist/services/notification/persistence/index.js +15 -15
- package/dist/services/notification/persistence/schema.js +12 -12
- package/dist/services/notification/public.js +7 -7
- package/dist/services/notification/schema.js +2 -2
- package/dist/services/s3/index.js +2 -2
- package/dist/services/s3/schema.js +2 -2
- package/package.json +6 -38
|
@@ -1,17 +1,11 @@
|
|
|
1
|
-
// ../../src/lib/docs
|
|
2
|
-
import { icons as lucideIcons } from "@iconify-json/lucide";
|
|
3
|
-
import { Icon, addCollection } from "@iconify/react";
|
|
4
|
-
import { code } from "@streamdown/code";
|
|
5
|
-
import { Link as Link3, useNavigate } from "@tanstack/react-router";
|
|
1
|
+
// ../../src/lib/docs.tsx
|
|
6
2
|
import { Schema as Schema3 } from "effect";
|
|
7
3
|
import {
|
|
8
|
-
Children,
|
|
9
4
|
forwardRef,
|
|
10
5
|
useDeferredValue,
|
|
11
|
-
|
|
6
|
+
useEffect as useEffect5,
|
|
7
|
+
useState as useState5
|
|
12
8
|
} from "react";
|
|
13
|
-
import { Streamdown } from "streamdown";
|
|
14
|
-
import { parse } from "yaml";
|
|
15
9
|
|
|
16
10
|
// ../../src/components/ui/app-brand.tsx
|
|
17
11
|
import { Link } from "@tanstack/react-router";
|
|
@@ -122,34 +116,9 @@ function AppBrand(brandProps) {
|
|
|
122
116
|
});
|
|
123
117
|
}
|
|
124
118
|
|
|
125
|
-
// ../../src/components/ui/
|
|
126
|
-
import {
|
|
127
|
-
import {
|
|
128
|
-
function Collapsible({ ...props }) {
|
|
129
|
-
return /* @__PURE__ */ jsx2(CollapsiblePrimitive.Root, {
|
|
130
|
-
"data-slot": "collapsible",
|
|
131
|
-
...props
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
function CollapsibleTrigger({ ...props }) {
|
|
135
|
-
return /* @__PURE__ */ jsx2(CollapsiblePrimitive.Trigger, {
|
|
136
|
-
"data-slot": "collapsible-trigger",
|
|
137
|
-
...props
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
function CollapsibleContent({ ...props }) {
|
|
141
|
-
return /* @__PURE__ */ jsx2(CollapsiblePrimitive.Panel, {
|
|
142
|
-
"data-slot": "collapsible-content",
|
|
143
|
-
...props
|
|
144
|
-
});
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
// ../../src/components/ui/search-menu.tsx
|
|
148
|
-
import { SearchIcon as SearchIcon2 } from "lucide-react";
|
|
149
|
-
import { useCallback, useEffect, useState } from "react";
|
|
150
|
-
|
|
151
|
-
// ../../src/components/ui/button.tsx
|
|
152
|
-
import { Button as ButtonPrimitive } from "@base-ui/react/button";
|
|
119
|
+
// ../../src/components/ui/badge.tsx
|
|
120
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
121
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
153
122
|
import { cva } from "class-variance-authority";
|
|
154
123
|
|
|
155
124
|
// ../../src/lib/utils.ts
|
|
@@ -159,9 +128,46 @@ function cn(...inputs) {
|
|
|
159
128
|
return twMerge(clsx(inputs));
|
|
160
129
|
}
|
|
161
130
|
|
|
131
|
+
// ../../src/components/ui/badge.tsx
|
|
132
|
+
var badgeVariants = cva("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!", {
|
|
133
|
+
variants: {
|
|
134
|
+
variant: {
|
|
135
|
+
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
|
|
136
|
+
secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
|
|
137
|
+
destructive: "bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",
|
|
138
|
+
outline: "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
|
|
139
|
+
ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
|
|
140
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
defaultVariants: {
|
|
144
|
+
variant: "default"
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
function Badge({
|
|
148
|
+
className,
|
|
149
|
+
variant = "default",
|
|
150
|
+
render,
|
|
151
|
+
...props
|
|
152
|
+
}) {
|
|
153
|
+
return useRender({
|
|
154
|
+
defaultTagName: "span",
|
|
155
|
+
props: mergeProps({
|
|
156
|
+
className: cn(badgeVariants({ variant }), className)
|
|
157
|
+
}, props),
|
|
158
|
+
render,
|
|
159
|
+
state: {
|
|
160
|
+
slot: "badge",
|
|
161
|
+
variant
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
|
|
162
166
|
// ../../src/components/ui/button.tsx
|
|
163
|
-
import {
|
|
164
|
-
|
|
167
|
+
import { Button as ButtonPrimitive } from "@base-ui/react/button";
|
|
168
|
+
import { cva as cva2 } from "class-variance-authority";
|
|
169
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
170
|
+
var buttonVariants = cva2("group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
165
171
|
variants: {
|
|
166
172
|
variant: {
|
|
167
173
|
default: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
@@ -193,13 +199,223 @@ function Button({
|
|
|
193
199
|
size = "default",
|
|
194
200
|
...props
|
|
195
201
|
}) {
|
|
196
|
-
return /* @__PURE__ */
|
|
202
|
+
return /* @__PURE__ */ jsx2(ButtonPrimitive, {
|
|
197
203
|
"data-slot": "button",
|
|
198
204
|
className: cn(buttonVariants({ variant, size, className })),
|
|
199
205
|
...props
|
|
200
206
|
});
|
|
201
207
|
}
|
|
202
208
|
|
|
209
|
+
// ../../src/components/ui/copy-button.tsx
|
|
210
|
+
import { Check, Copy, TriangleAlert } from "lucide-react";
|
|
211
|
+
import { useEffect, useRef, useState } from "react";
|
|
212
|
+
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
213
|
+
function CopyButton({
|
|
214
|
+
value,
|
|
215
|
+
valueDescription,
|
|
216
|
+
copyVariant = "default",
|
|
217
|
+
messages,
|
|
218
|
+
onCopied,
|
|
219
|
+
onCopyError,
|
|
220
|
+
resetDelay = 1500,
|
|
221
|
+
disabled,
|
|
222
|
+
size,
|
|
223
|
+
"aria-label": ariaLabel,
|
|
224
|
+
...props
|
|
225
|
+
}) {
|
|
226
|
+
const [copyState, setCopyState] = useState("idle");
|
|
227
|
+
const copyTimeout = useRef(undefined);
|
|
228
|
+
const labels = {
|
|
229
|
+
copy: messages?.copy ?? "Copy",
|
|
230
|
+
copied: messages?.copied ?? "Copied",
|
|
231
|
+
copyFailed: messages?.copyFailed ?? "Copy failed"
|
|
232
|
+
};
|
|
233
|
+
const accessibleLabel = ariaLabel ?? (valueDescription ? `${labels.copy} ${valueDescription}` : labels.copy);
|
|
234
|
+
const isLarge = copyVariant === "large";
|
|
235
|
+
const defaultSize = copyVariant === "sm" ? "icon-xs" : isLarge ? "sm" : "icon-sm";
|
|
236
|
+
useEffect(() => {
|
|
237
|
+
return () => {
|
|
238
|
+
if (copyTimeout.current)
|
|
239
|
+
clearTimeout(copyTimeout.current);
|
|
240
|
+
};
|
|
241
|
+
}, []);
|
|
242
|
+
const resetCopyState = () => {
|
|
243
|
+
if (copyTimeout.current)
|
|
244
|
+
clearTimeout(copyTimeout.current);
|
|
245
|
+
copyTimeout.current = setTimeout(() => setCopyState("idle"), resetDelay);
|
|
246
|
+
};
|
|
247
|
+
const copy = async () => {
|
|
248
|
+
try {
|
|
249
|
+
await navigator.clipboard.writeText(value);
|
|
250
|
+
setCopyState("copied");
|
|
251
|
+
onCopied?.();
|
|
252
|
+
} catch (error) {
|
|
253
|
+
setCopyState("failed");
|
|
254
|
+
onCopyError?.(error instanceof Error ? error : new Error("Copy failed", { cause: error }));
|
|
255
|
+
}
|
|
256
|
+
resetCopyState();
|
|
257
|
+
};
|
|
258
|
+
const status = copyState === "copied" ? valueDescription ? `${labels.copied}: ${valueDescription}` : labels.copied : copyState === "failed" ? valueDescription ? `${labels.copyFailed}: ${valueDescription}` : labels.copyFailed : "";
|
|
259
|
+
return /* @__PURE__ */ jsxs2(Button, {
|
|
260
|
+
"aria-label": accessibleLabel,
|
|
261
|
+
disabled,
|
|
262
|
+
onClick: copy,
|
|
263
|
+
size: size ?? defaultSize,
|
|
264
|
+
...props,
|
|
265
|
+
children: [
|
|
266
|
+
/* @__PURE__ */ jsx3("span", {
|
|
267
|
+
"aria-live": "polite",
|
|
268
|
+
className: "sr-only",
|
|
269
|
+
role: "status",
|
|
270
|
+
children: status
|
|
271
|
+
}),
|
|
272
|
+
copyState === "copied" ? /* @__PURE__ */ jsx3(Check, {
|
|
273
|
+
"aria-hidden": "true"
|
|
274
|
+
}) : null,
|
|
275
|
+
copyState === "failed" ? /* @__PURE__ */ jsx3(TriangleAlert, {
|
|
276
|
+
"aria-hidden": "true"
|
|
277
|
+
}) : null,
|
|
278
|
+
copyState === "idle" ? /* @__PURE__ */ jsx3(Copy, {
|
|
279
|
+
"aria-hidden": "true"
|
|
280
|
+
}) : null,
|
|
281
|
+
isLarge ? /* @__PURE__ */ jsx3("span", {
|
|
282
|
+
children: labels.copy
|
|
283
|
+
}) : null
|
|
284
|
+
]
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
// ../../src/components/ui/code-block.tsx
|
|
289
|
+
import { highlight } from "@tanstack/highlight";
|
|
290
|
+
import { createThemeCss } from "@tanstack/highlight/theme";
|
|
291
|
+
import { githubDarkTheme } from "@tanstack/highlight/themes/github-dark";
|
|
292
|
+
import { githubLightTheme } from "@tanstack/highlight/themes/github-light";
|
|
293
|
+
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
294
|
+
var themeCss = `${createThemeCss({
|
|
295
|
+
light: githubLightTheme,
|
|
296
|
+
dark: githubDarkTheme,
|
|
297
|
+
lightSelector: "[data-code-theme]",
|
|
298
|
+
darkSelector: ".dark [data-code-theme]",
|
|
299
|
+
codeBlockSelector: "[data-code-theme] pre.th-code",
|
|
300
|
+
lineNumbersSelector: "[data-code-theme] .th-code--line-numbers"
|
|
301
|
+
})}
|
|
302
|
+
[data-code-theme] pre.th-code {
|
|
303
|
+
margin: 0;
|
|
304
|
+
overflow: visible;
|
|
305
|
+
background: transparent;
|
|
306
|
+
font: inherit;
|
|
307
|
+
color: inherit;
|
|
308
|
+
}
|
|
309
|
+
[data-code-theme] pre.th-code code { font: inherit; }`;
|
|
310
|
+
function CodeBlock({
|
|
311
|
+
code,
|
|
312
|
+
language = "text",
|
|
313
|
+
messages
|
|
314
|
+
}) {
|
|
315
|
+
const normalizedLanguage = language.toLowerCase() || "text";
|
|
316
|
+
const highlighted = highlight(code, { lang: normalizedLanguage });
|
|
317
|
+
const copyMessages = {};
|
|
318
|
+
if (messages?.copy !== undefined)
|
|
319
|
+
copyMessages.copy = messages.copy;
|
|
320
|
+
if (messages?.copied !== undefined)
|
|
321
|
+
copyMessages.copied = messages.copied;
|
|
322
|
+
if (messages?.copyFailed !== undefined) {
|
|
323
|
+
copyMessages.copyFailed = messages.copyFailed;
|
|
324
|
+
}
|
|
325
|
+
return /* @__PURE__ */ jsxs3("div", {
|
|
326
|
+
className: "not-prose bg-muted overflow-hidden rounded-md border text-[var(--th-token)]",
|
|
327
|
+
"data-code-theme": true,
|
|
328
|
+
children: [
|
|
329
|
+
/* @__PURE__ */ jsx4("style", {
|
|
330
|
+
children: themeCss
|
|
331
|
+
}),
|
|
332
|
+
/* @__PURE__ */ jsxs3("div", {
|
|
333
|
+
className: "bg-background border-border/60 flex items-center justify-between border-b px-3 py-2",
|
|
334
|
+
children: [
|
|
335
|
+
/* @__PURE__ */ jsx4("span", {
|
|
336
|
+
className: "text-muted-foreground font-mono text-xs",
|
|
337
|
+
children: highlighted.lang
|
|
338
|
+
}),
|
|
339
|
+
/* @__PURE__ */ jsx4(CopyButton, {
|
|
340
|
+
value: code,
|
|
341
|
+
valueDescription: `${highlighted.lang} code`,
|
|
342
|
+
variant: "secondary",
|
|
343
|
+
messages: copyMessages
|
|
344
|
+
})
|
|
345
|
+
]
|
|
346
|
+
}),
|
|
347
|
+
/* @__PURE__ */ jsx4("div", {
|
|
348
|
+
className: "max-h-full overflow-auto font-mono text-[0.875rem] leading-[1.625]",
|
|
349
|
+
dangerouslySetInnerHTML: { __html: highlighted.html }
|
|
350
|
+
})
|
|
351
|
+
]
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
// ../../src/lib/markdown/content.tsx
|
|
356
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
357
|
+
var MarkdownContent = ({
|
|
358
|
+
className,
|
|
359
|
+
codeBlocks,
|
|
360
|
+
html,
|
|
361
|
+
messages
|
|
362
|
+
}) => {
|
|
363
|
+
const content = [];
|
|
364
|
+
let remainingHtml = html;
|
|
365
|
+
codeBlocks.forEach((block, index) => {
|
|
366
|
+
const marker = `<markdown-code-block data-index="${index}"></markdown-code-block>`;
|
|
367
|
+
const markerIndex = remainingHtml.indexOf(marker);
|
|
368
|
+
if (markerIndex === -1)
|
|
369
|
+
return;
|
|
370
|
+
content.push(/* @__PURE__ */ jsx5("div", {
|
|
371
|
+
dangerouslySetInnerHTML: {
|
|
372
|
+
__html: remainingHtml.slice(0, markerIndex)
|
|
373
|
+
}
|
|
374
|
+
}, `html-${index}`), /* @__PURE__ */ jsx5("div", {
|
|
375
|
+
className: "my-5",
|
|
376
|
+
children: /* @__PURE__ */ jsx5(CodeBlock, {
|
|
377
|
+
code: block.code,
|
|
378
|
+
language: block.language,
|
|
379
|
+
messages: { copy: messages?.copy, copied: messages?.copied }
|
|
380
|
+
})
|
|
381
|
+
}, `code-${index}`));
|
|
382
|
+
remainingHtml = remainingHtml.slice(markerIndex + marker.length);
|
|
383
|
+
});
|
|
384
|
+
content.push(/* @__PURE__ */ jsx5("div", {
|
|
385
|
+
dangerouslySetInnerHTML: { __html: remainingHtml }
|
|
386
|
+
}, "html-final"));
|
|
387
|
+
return /* @__PURE__ */ jsx5("div", {
|
|
388
|
+
className: cn("[&_a:hover]:text-primary [&_a]:decoration-border [&_blockquote]:border-primary/40 [&_blockquote]:bg-muted/40 [&_h2_a]:text-muted-foreground [&_h3_a]:text-muted-foreground [&_[data-inline-code]]:bg-muted text-[0.98rem] leading-7 [&_[data-markdown-table]]:overflow-x-auto [&_[data-inline-code]]:rounded [&_[data-inline-code]]:px-1.5 [&_[data-inline-code]]:py-0.5 [&_[data-inline-code]]:font-mono [&_[data-inline-code]]:text-[0.875em] [&_a]:font-medium [&_a]:underline [&_a]:decoration-1 [&_a]:underline-offset-4 [&_a]:transition-colors [&_blockquote]:rounded-r-lg [&_blockquote]:border-l-4 [&_blockquote]:px-5 [&_blockquote]:py-1 [&_h2]:mt-12 [&_h2]:scroll-mt-20 [&_h2]:border-t [&_h2]:pt-8 [&_h2]:text-2xl [&_h2]:font-bold [&_h2]:tracking-tight [&_h2_a]:ml-2 [&_h2_a]:no-underline [&_h2:first-of-type]:mt-0 [&_h2:first-of-type]:border-t-0 [&_h2:first-of-type]:pt-0 [&_h3]:mt-8 [&_h3]:scroll-mt-20 [&_h3]:text-xl [&_h3]:font-semibold [&_h3]:tracking-tight [&_h3_a]:ml-2 [&_h3_a]:no-underline [&_ol]:my-5 [&_p]:my-5 [&_table]:w-full [&_table]:text-sm [&_td]:border-b [&_td]:p-2 [&_th]:border-b [&_th]:p-2 [&_th]:text-left [&_ul]:my-5", className),
|
|
389
|
+
children: content
|
|
390
|
+
});
|
|
391
|
+
};
|
|
392
|
+
|
|
393
|
+
// ../../src/components/ui/collapsible.tsx
|
|
394
|
+
import { Collapsible as CollapsiblePrimitive } from "@base-ui/react/collapsible";
|
|
395
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
396
|
+
function Collapsible({ ...props }) {
|
|
397
|
+
return /* @__PURE__ */ jsx6(CollapsiblePrimitive.Root, {
|
|
398
|
+
"data-slot": "collapsible",
|
|
399
|
+
...props
|
|
400
|
+
});
|
|
401
|
+
}
|
|
402
|
+
function CollapsibleTrigger({ ...props }) {
|
|
403
|
+
return /* @__PURE__ */ jsx6(CollapsiblePrimitive.Trigger, {
|
|
404
|
+
"data-slot": "collapsible-trigger",
|
|
405
|
+
...props
|
|
406
|
+
});
|
|
407
|
+
}
|
|
408
|
+
function CollapsibleContent({ ...props }) {
|
|
409
|
+
return /* @__PURE__ */ jsx6(CollapsiblePrimitive.Panel, {
|
|
410
|
+
"data-slot": "collapsible-content",
|
|
411
|
+
...props
|
|
412
|
+
});
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
// ../../src/components/ui/search-menu.tsx
|
|
416
|
+
import { SearchIcon as SearchIcon2 } from "lucide-react";
|
|
417
|
+
import { useCallback, useEffect as useEffect2, useState as useState2 } from "react";
|
|
418
|
+
|
|
203
419
|
// ../../src/components/ui/command.tsx
|
|
204
420
|
import { Command as CommandPrimitive } from "cmdk";
|
|
205
421
|
import { SearchIcon } from "lucide-react";
|
|
@@ -207,15 +423,15 @@ import { SearchIcon } from "lucide-react";
|
|
|
207
423
|
// ../../src/components/ui/dialog.tsx
|
|
208
424
|
import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
|
|
209
425
|
import { XIcon } from "lucide-react";
|
|
210
|
-
import { jsx as
|
|
426
|
+
import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
211
427
|
function Dialog({ ...props }) {
|
|
212
|
-
return /* @__PURE__ */
|
|
428
|
+
return /* @__PURE__ */ jsx7(DialogPrimitive.Root, {
|
|
213
429
|
"data-slot": "dialog",
|
|
214
430
|
...props
|
|
215
431
|
});
|
|
216
432
|
}
|
|
217
433
|
function DialogPortal({ ...props }) {
|
|
218
|
-
return /* @__PURE__ */
|
|
434
|
+
return /* @__PURE__ */ jsx7(DialogPrimitive.Portal, {
|
|
219
435
|
"data-slot": "dialog-portal",
|
|
220
436
|
...props
|
|
221
437
|
});
|
|
@@ -224,7 +440,7 @@ function DialogOverlay({
|
|
|
224
440
|
className,
|
|
225
441
|
...props
|
|
226
442
|
}) {
|
|
227
|
-
return /* @__PURE__ */
|
|
443
|
+
return /* @__PURE__ */ jsx7(DialogPrimitive.Backdrop, {
|
|
228
444
|
"data-slot": "dialog-overlay",
|
|
229
445
|
className: cn("fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", className),
|
|
230
446
|
...props
|
|
@@ -235,22 +451,22 @@ function DialogContent({
|
|
|
235
451
|
children,
|
|
236
452
|
...props
|
|
237
453
|
}) {
|
|
238
|
-
return /* @__PURE__ */
|
|
454
|
+
return /* @__PURE__ */ jsxs4(DialogPortal, {
|
|
239
455
|
children: [
|
|
240
|
-
/* @__PURE__ */
|
|
241
|
-
/* @__PURE__ */
|
|
456
|
+
/* @__PURE__ */ jsx7(DialogOverlay, {}),
|
|
457
|
+
/* @__PURE__ */ jsxs4(DialogPrimitive.Popup, {
|
|
242
458
|
"data-slot": "dialog-content",
|
|
243
459
|
className: cn("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-6 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-lg data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
|
|
244
460
|
...props,
|
|
245
461
|
children: [
|
|
246
462
|
children,
|
|
247
|
-
/* @__PURE__ */
|
|
463
|
+
/* @__PURE__ */ jsxs4(DialogPrimitive.Close, {
|
|
248
464
|
className: "focus-visible:ring-ring absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus-visible:ring-2 focus-visible:outline-none disabled:pointer-events-none",
|
|
249
465
|
children: [
|
|
250
|
-
/* @__PURE__ */
|
|
466
|
+
/* @__PURE__ */ jsx7(XIcon, {
|
|
251
467
|
className: "size-4"
|
|
252
468
|
}),
|
|
253
|
-
/* @__PURE__ */
|
|
469
|
+
/* @__PURE__ */ jsx7("span", {
|
|
254
470
|
className: "sr-only",
|
|
255
471
|
children: "Close"
|
|
256
472
|
})
|
|
@@ -262,7 +478,7 @@ function DialogContent({
|
|
|
262
478
|
});
|
|
263
479
|
}
|
|
264
480
|
function DialogHeader({ className, ...props }) {
|
|
265
|
-
return /* @__PURE__ */
|
|
481
|
+
return /* @__PURE__ */ jsx7("div", {
|
|
266
482
|
"data-slot": "dialog-header",
|
|
267
483
|
className: cn("grid gap-1.5", className),
|
|
268
484
|
...props
|
|
@@ -272,7 +488,7 @@ function DialogTitle({
|
|
|
272
488
|
className,
|
|
273
489
|
...props
|
|
274
490
|
}) {
|
|
275
|
-
return /* @__PURE__ */
|
|
491
|
+
return /* @__PURE__ */ jsx7(DialogPrimitive.Title, {
|
|
276
492
|
"data-slot": "dialog-title",
|
|
277
493
|
className: cn("text-lg font-medium", className),
|
|
278
494
|
...props
|
|
@@ -282,7 +498,7 @@ function DialogDescription({
|
|
|
282
498
|
className,
|
|
283
499
|
...props
|
|
284
500
|
}) {
|
|
285
|
-
return /* @__PURE__ */
|
|
501
|
+
return /* @__PURE__ */ jsx7(DialogPrimitive.Description, {
|
|
286
502
|
"data-slot": "dialog-description",
|
|
287
503
|
className: cn("text-sm text-muted-foreground", className),
|
|
288
504
|
...props
|
|
@@ -290,12 +506,12 @@ function DialogDescription({
|
|
|
290
506
|
}
|
|
291
507
|
|
|
292
508
|
// ../../src/components/ui/command.tsx
|
|
293
|
-
import { jsx as
|
|
509
|
+
import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
294
510
|
function Command({
|
|
295
511
|
className,
|
|
296
512
|
...props
|
|
297
513
|
}) {
|
|
298
|
-
return /* @__PURE__ */
|
|
514
|
+
return /* @__PURE__ */ jsx8(CommandPrimitive, {
|
|
299
515
|
"data-slot": "command",
|
|
300
516
|
className: cn("flex size-full flex-col overflow-hidden rounded-xl bg-popover p-1 text-popover-foreground", className),
|
|
301
517
|
...props
|
|
@@ -308,18 +524,18 @@ function CommandDialog({
|
|
|
308
524
|
className,
|
|
309
525
|
...props
|
|
310
526
|
}) {
|
|
311
|
-
return /* @__PURE__ */
|
|
527
|
+
return /* @__PURE__ */ jsx8(Dialog, {
|
|
312
528
|
...props,
|
|
313
|
-
children: /* @__PURE__ */
|
|
529
|
+
children: /* @__PURE__ */ jsxs5(DialogContent, {
|
|
314
530
|
className: cn("top-1/3 translate-y-0 overflow-hidden rounded-xl p-0", className),
|
|
315
531
|
children: [
|
|
316
|
-
/* @__PURE__ */
|
|
532
|
+
/* @__PURE__ */ jsxs5(DialogHeader, {
|
|
317
533
|
className: "sr-only",
|
|
318
534
|
children: [
|
|
319
|
-
/* @__PURE__ */
|
|
535
|
+
/* @__PURE__ */ jsx8(DialogTitle, {
|
|
320
536
|
children: title
|
|
321
537
|
}),
|
|
322
|
-
/* @__PURE__ */
|
|
538
|
+
/* @__PURE__ */ jsx8(DialogDescription, {
|
|
323
539
|
children: description
|
|
324
540
|
})
|
|
325
541
|
]
|
|
@@ -333,16 +549,16 @@ function CommandInput({
|
|
|
333
549
|
className,
|
|
334
550
|
...props
|
|
335
551
|
}) {
|
|
336
|
-
return /* @__PURE__ */
|
|
552
|
+
return /* @__PURE__ */ jsx8("div", {
|
|
337
553
|
"data-slot": "command-input-wrapper",
|
|
338
554
|
className: "p-1 pb-0",
|
|
339
|
-
children: /* @__PURE__ */
|
|
555
|
+
children: /* @__PURE__ */ jsxs5("div", {
|
|
340
556
|
className: "border-input/30 bg-input/30 flex h-9 items-center gap-2 rounded-lg border px-2 shadow-none",
|
|
341
557
|
children: [
|
|
342
|
-
/* @__PURE__ */
|
|
558
|
+
/* @__PURE__ */ jsx8(SearchIcon, {
|
|
343
559
|
className: "size-4 shrink-0 opacity-50"
|
|
344
560
|
}),
|
|
345
|
-
/* @__PURE__ */
|
|
561
|
+
/* @__PURE__ */ jsx8(CommandPrimitive.Input, {
|
|
346
562
|
"data-slot": "command-input",
|
|
347
563
|
className: cn("w-full bg-transparent text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50", className),
|
|
348
564
|
...props
|
|
@@ -355,7 +571,7 @@ function CommandList({
|
|
|
355
571
|
className,
|
|
356
572
|
...props
|
|
357
573
|
}) {
|
|
358
|
-
return /* @__PURE__ */
|
|
574
|
+
return /* @__PURE__ */ jsx8(CommandPrimitive.List, {
|
|
359
575
|
"data-slot": "command-list",
|
|
360
576
|
className: cn("max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none", className),
|
|
361
577
|
...props
|
|
@@ -365,7 +581,7 @@ function CommandEmpty({
|
|
|
365
581
|
className,
|
|
366
582
|
...props
|
|
367
583
|
}) {
|
|
368
|
-
return /* @__PURE__ */
|
|
584
|
+
return /* @__PURE__ */ jsx8(CommandPrimitive.Empty, {
|
|
369
585
|
"data-slot": "command-empty",
|
|
370
586
|
className: cn("py-6 text-center text-sm", className),
|
|
371
587
|
...props
|
|
@@ -375,7 +591,7 @@ function CommandGroup({
|
|
|
375
591
|
className,
|
|
376
592
|
...props
|
|
377
593
|
}) {
|
|
378
|
-
return /* @__PURE__ */
|
|
594
|
+
return /* @__PURE__ */ jsx8(CommandPrimitive.Group, {
|
|
379
595
|
"data-slot": "command-group",
|
|
380
596
|
className: cn("overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground", className),
|
|
381
597
|
...props
|
|
@@ -385,7 +601,7 @@ function CommandItem({
|
|
|
385
601
|
className,
|
|
386
602
|
...props
|
|
387
603
|
}) {
|
|
388
|
-
return /* @__PURE__ */
|
|
604
|
+
return /* @__PURE__ */ jsx8(CommandPrimitive.Item, {
|
|
389
605
|
"data-slot": "command-item",
|
|
390
606
|
className: cn("group/command-item relative flex cursor-default items-center gap-2 rounded-lg px-2 py-1.5 text-sm outline-none select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
391
607
|
...props
|
|
@@ -395,7 +611,7 @@ function CommandShortcut({
|
|
|
395
611
|
className,
|
|
396
612
|
...props
|
|
397
613
|
}) {
|
|
398
|
-
return /* @__PURE__ */
|
|
614
|
+
return /* @__PURE__ */ jsx8("span", {
|
|
399
615
|
"data-slot": "command-shortcut",
|
|
400
616
|
className: cn("ml-auto text-xs tracking-widest text-muted-foreground group-data-selected/command-item:text-foreground", className),
|
|
401
617
|
...props
|
|
@@ -839,7 +1055,7 @@ function isCustomStrategy(strategy2) {
|
|
|
839
1055
|
}
|
|
840
1056
|
|
|
841
1057
|
// ../../src/components/ui/search-menu.tsx
|
|
842
|
-
import { jsx as
|
|
1058
|
+
import { jsx as jsx9, jsxs as jsxs6, Fragment as Fragment2 } from "react/jsx-runtime";
|
|
843
1059
|
var messages = {
|
|
844
1060
|
en: {
|
|
845
1061
|
title: "Search",
|
|
@@ -883,7 +1099,7 @@ function SearchMenu({
|
|
|
883
1099
|
const resolvedPlaceholder = placeholder ?? labels.placeholder;
|
|
884
1100
|
const resolvedInputPlaceholder = inputPlaceholder ?? labels.inputPlaceholder;
|
|
885
1101
|
const resolvedEmptyMessage = emptyMessage ?? labels.emptyMessage;
|
|
886
|
-
const [uncontrolledOpen, setUncontrolledOpen] =
|
|
1102
|
+
const [uncontrolledOpen, setUncontrolledOpen] = useState2(false);
|
|
887
1103
|
const isControlled = open !== undefined;
|
|
888
1104
|
const isOpen = open ?? uncontrolledOpen;
|
|
889
1105
|
const setOpen = useCallback((value) => {
|
|
@@ -891,7 +1107,7 @@ function SearchMenu({
|
|
|
891
1107
|
setUncontrolledOpen(value);
|
|
892
1108
|
onOpenChange?.(value);
|
|
893
1109
|
}, [isControlled, onOpenChange]);
|
|
894
|
-
|
|
1110
|
+
useEffect2(() => {
|
|
895
1111
|
const onKeyDown = (event) => {
|
|
896
1112
|
if (event.key.toLowerCase() !== "k")
|
|
897
1113
|
return;
|
|
@@ -903,9 +1119,9 @@ function SearchMenu({
|
|
|
903
1119
|
document.addEventListener("keydown", onKeyDown);
|
|
904
1120
|
return () => document.removeEventListener("keydown", onKeyDown);
|
|
905
1121
|
}, [isOpen, setOpen]);
|
|
906
|
-
return /* @__PURE__ */
|
|
1122
|
+
return /* @__PURE__ */ jsxs6(Fragment2, {
|
|
907
1123
|
children: [
|
|
908
|
-
/* @__PURE__ */
|
|
1124
|
+
/* @__PURE__ */ jsxs6(Button, {
|
|
909
1125
|
"aria-label": resolvedPlaceholder,
|
|
910
1126
|
type: "button",
|
|
911
1127
|
variant: "outline",
|
|
@@ -913,40 +1129,40 @@ function SearchMenu({
|
|
|
913
1129
|
className: cn("sm:h-9 sm:w-64 sm:justify-start sm:gap-2.5 sm:px-2.5 sm:font-normal", className),
|
|
914
1130
|
onClick: () => setOpen(true),
|
|
915
1131
|
children: [
|
|
916
|
-
/* @__PURE__ */
|
|
1132
|
+
/* @__PURE__ */ jsx9(SearchIcon2, {
|
|
917
1133
|
className: "size-4 shrink-0"
|
|
918
1134
|
}),
|
|
919
|
-
/* @__PURE__ */
|
|
1135
|
+
/* @__PURE__ */ jsx9("span", {
|
|
920
1136
|
className: "text-muted-foreground hidden min-w-0 flex-1 truncate text-left font-normal sm:block",
|
|
921
1137
|
children: resolvedPlaceholder
|
|
922
1138
|
}),
|
|
923
|
-
/* @__PURE__ */
|
|
1139
|
+
/* @__PURE__ */ jsx9("kbd", {
|
|
924
1140
|
className: "bg-muted text-muted-foreground pointer-events-none hidden h-5 items-center rounded border px-1.5 font-mono text-[10px] font-medium sm:inline-flex",
|
|
925
1141
|
children: shortcutLabel
|
|
926
1142
|
})
|
|
927
1143
|
]
|
|
928
1144
|
}),
|
|
929
|
-
/* @__PURE__ */
|
|
1145
|
+
/* @__PURE__ */ jsx9(CommandDialog, {
|
|
930
1146
|
open: isOpen,
|
|
931
1147
|
onOpenChange: setOpen,
|
|
932
1148
|
title: resolvedTitle,
|
|
933
1149
|
description: resolvedDescription,
|
|
934
|
-
children: /* @__PURE__ */
|
|
1150
|
+
children: /* @__PURE__ */ jsxs6(Command, {
|
|
935
1151
|
...shouldFilter === undefined ? {} : { shouldFilter },
|
|
936
1152
|
children: [
|
|
937
|
-
/* @__PURE__ */
|
|
1153
|
+
/* @__PURE__ */ jsx9(CommandInput, {
|
|
938
1154
|
placeholder: resolvedInputPlaceholder,
|
|
939
1155
|
...query === undefined ? {} : { value: query },
|
|
940
1156
|
...onQueryChange ? { onValueChange: onQueryChange } : {}
|
|
941
1157
|
}),
|
|
942
|
-
/* @__PURE__ */
|
|
1158
|
+
/* @__PURE__ */ jsxs6(CommandList, {
|
|
943
1159
|
children: [
|
|
944
|
-
/* @__PURE__ */
|
|
1160
|
+
/* @__PURE__ */ jsx9(CommandEmpty, {
|
|
945
1161
|
children: resolvedEmptyMessage
|
|
946
1162
|
}),
|
|
947
|
-
groups.map((group) => /* @__PURE__ */
|
|
1163
|
+
groups.map((group) => /* @__PURE__ */ jsx9(CommandGroup, {
|
|
948
1164
|
heading: group.heading,
|
|
949
|
-
children: group.items.map((item) => /* @__PURE__ */
|
|
1165
|
+
children: group.items.map((item) => /* @__PURE__ */ jsxs6(CommandItem, {
|
|
950
1166
|
className: "data-[selected=false]:!text-foreground data-[selected=true]:bg-muted data-[selected=true]:text-foreground gap-3 py-2 data-[selected=false]:!bg-transparent",
|
|
951
1167
|
value: item.label,
|
|
952
1168
|
...item.keywords ? { keywords: item.keywords } : {},
|
|
@@ -957,24 +1173,24 @@ function SearchMenu({
|
|
|
957
1173
|
},
|
|
958
1174
|
...item.disabled === undefined ? {} : { disabled: item.disabled },
|
|
959
1175
|
children: [
|
|
960
|
-
item.icon ? /* @__PURE__ */
|
|
1176
|
+
item.icon ? /* @__PURE__ */ jsx9("div", {
|
|
961
1177
|
className: "text-muted-foreground bg-background group-data-[selected=true]/command-item:bg-background flex size-8 shrink-0 items-center justify-center rounded-md border",
|
|
962
1178
|
children: item.icon
|
|
963
1179
|
}) : null,
|
|
964
|
-
/* @__PURE__ */
|
|
1180
|
+
/* @__PURE__ */ jsxs6("div", {
|
|
965
1181
|
className: "flex min-w-0 flex-1 flex-col gap-0.5",
|
|
966
1182
|
children: [
|
|
967
|
-
/* @__PURE__ */
|
|
1183
|
+
/* @__PURE__ */ jsx9("span", {
|
|
968
1184
|
className: "truncate font-medium",
|
|
969
1185
|
children: item.label
|
|
970
1186
|
}),
|
|
971
|
-
item.description ? /* @__PURE__ */
|
|
1187
|
+
item.description ? /* @__PURE__ */ jsx9("span", {
|
|
972
1188
|
className: "text-muted-foreground truncate text-xs",
|
|
973
1189
|
children: item.description
|
|
974
1190
|
}) : null
|
|
975
1191
|
]
|
|
976
1192
|
}),
|
|
977
|
-
item.shortcut ? /* @__PURE__ */
|
|
1193
|
+
item.shortcut ? /* @__PURE__ */ jsx9(CommandShortcut, {
|
|
978
1194
|
children: item.shortcut
|
|
979
1195
|
}) : null
|
|
980
1196
|
]
|
|
@@ -996,44 +1212,6 @@ import { Link as Link2, Outlet, useRouterState } from "@tanstack/react-router";
|
|
|
996
1212
|
import { Schema as Schema2 } from "effect";
|
|
997
1213
|
import { Atom } from "effect/unstable/reactivity";
|
|
998
1214
|
|
|
999
|
-
// ../../src/components/ui/badge.tsx
|
|
1000
|
-
import { mergeProps } from "@base-ui/react/merge-props";
|
|
1001
|
-
import { useRender } from "@base-ui/react/use-render";
|
|
1002
|
-
import { cva as cva2 } from "class-variance-authority";
|
|
1003
|
-
var badgeVariants = cva2("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!", {
|
|
1004
|
-
variants: {
|
|
1005
|
-
variant: {
|
|
1006
|
-
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
|
|
1007
|
-
secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
|
|
1008
|
-
destructive: "bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",
|
|
1009
|
-
outline: "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
|
|
1010
|
-
ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
|
|
1011
|
-
link: "text-primary underline-offset-4 hover:underline"
|
|
1012
|
-
}
|
|
1013
|
-
},
|
|
1014
|
-
defaultVariants: {
|
|
1015
|
-
variant: "default"
|
|
1016
|
-
}
|
|
1017
|
-
});
|
|
1018
|
-
function Badge({
|
|
1019
|
-
className,
|
|
1020
|
-
variant = "default",
|
|
1021
|
-
render,
|
|
1022
|
-
...props
|
|
1023
|
-
}) {
|
|
1024
|
-
return useRender({
|
|
1025
|
-
defaultTagName: "span",
|
|
1026
|
-
props: mergeProps({
|
|
1027
|
-
className: cn(badgeVariants({ variant }), className)
|
|
1028
|
-
}, props),
|
|
1029
|
-
render,
|
|
1030
|
-
state: {
|
|
1031
|
-
slot: "badge",
|
|
1032
|
-
variant
|
|
1033
|
-
}
|
|
1034
|
-
});
|
|
1035
|
-
}
|
|
1036
|
-
|
|
1037
1215
|
// ../../src/components/ui/sidebar.tsx
|
|
1038
1216
|
import * as React2 from "react";
|
|
1039
1217
|
import { mergeProps as mergeProps2 } from "@base-ui/react/merge-props";
|
|
@@ -1059,31 +1237,29 @@ function useIsMobile() {
|
|
|
1059
1237
|
|
|
1060
1238
|
// ../../src/components/ui/input.tsx
|
|
1061
1239
|
import { Input as InputPrimitive } from "@base-ui/react/input";
|
|
1062
|
-
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
1063
1240
|
|
|
1064
1241
|
// ../../src/components/ui/separator.tsx
|
|
1065
1242
|
import { Separator as SeparatorPrimitive } from "@base-ui/react/separator";
|
|
1066
|
-
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
1067
1243
|
|
|
1068
1244
|
// ../../src/components/ui/sheet.tsx
|
|
1069
1245
|
import { Dialog as SheetPrimitive } from "@base-ui/react/dialog";
|
|
1070
1246
|
import { XIcon as XIcon2 } from "lucide-react";
|
|
1071
|
-
import { jsx as
|
|
1247
|
+
import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1072
1248
|
"use client";
|
|
1073
1249
|
function Sheet({ ...props }) {
|
|
1074
|
-
return /* @__PURE__ */
|
|
1250
|
+
return /* @__PURE__ */ jsx10(SheetPrimitive.Root, {
|
|
1075
1251
|
"data-slot": "sheet",
|
|
1076
1252
|
...props
|
|
1077
1253
|
});
|
|
1078
1254
|
}
|
|
1079
1255
|
function SheetPortal({ ...props }) {
|
|
1080
|
-
return /* @__PURE__ */
|
|
1256
|
+
return /* @__PURE__ */ jsx10(SheetPrimitive.Portal, {
|
|
1081
1257
|
"data-slot": "sheet-portal",
|
|
1082
1258
|
...props
|
|
1083
1259
|
});
|
|
1084
1260
|
}
|
|
1085
1261
|
function SheetOverlay({ className, ...props }) {
|
|
1086
|
-
return /* @__PURE__ */
|
|
1262
|
+
return /* @__PURE__ */ jsx10(SheetPrimitive.Backdrop, {
|
|
1087
1263
|
"data-slot": "sheet-overlay",
|
|
1088
1264
|
className: cn("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs", className),
|
|
1089
1265
|
...props
|
|
@@ -1096,26 +1272,26 @@ function SheetContent({
|
|
|
1096
1272
|
showCloseButton = true,
|
|
1097
1273
|
...props
|
|
1098
1274
|
}) {
|
|
1099
|
-
return /* @__PURE__ */
|
|
1275
|
+
return /* @__PURE__ */ jsxs7(SheetPortal, {
|
|
1100
1276
|
children: [
|
|
1101
|
-
/* @__PURE__ */
|
|
1102
|
-
/* @__PURE__ */
|
|
1277
|
+
/* @__PURE__ */ jsx10(SheetOverlay, {}),
|
|
1278
|
+
/* @__PURE__ */ jsxs7(SheetPrimitive.Popup, {
|
|
1103
1279
|
"data-slot": "sheet-content",
|
|
1104
1280
|
"data-side": side,
|
|
1105
1281
|
className: cn("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm", className),
|
|
1106
1282
|
...props,
|
|
1107
1283
|
children: [
|
|
1108
1284
|
children,
|
|
1109
|
-
showCloseButton && /* @__PURE__ */
|
|
1285
|
+
showCloseButton && /* @__PURE__ */ jsxs7(SheetPrimitive.Close, {
|
|
1110
1286
|
"data-slot": "sheet-close",
|
|
1111
|
-
render: /* @__PURE__ */
|
|
1287
|
+
render: /* @__PURE__ */ jsx10(Button, {
|
|
1112
1288
|
variant: "ghost",
|
|
1113
1289
|
className: "absolute top-4 right-4",
|
|
1114
1290
|
size: "icon-sm"
|
|
1115
1291
|
}),
|
|
1116
1292
|
children: [
|
|
1117
|
-
/* @__PURE__ */
|
|
1118
|
-
/* @__PURE__ */
|
|
1293
|
+
/* @__PURE__ */ jsx10(XIcon2, {}),
|
|
1294
|
+
/* @__PURE__ */ jsx10("span", {
|
|
1119
1295
|
className: "sr-only",
|
|
1120
1296
|
children: "Close"
|
|
1121
1297
|
})
|
|
@@ -1127,14 +1303,14 @@ function SheetContent({
|
|
|
1127
1303
|
});
|
|
1128
1304
|
}
|
|
1129
1305
|
function SheetHeader({ className, ...props }) {
|
|
1130
|
-
return /* @__PURE__ */
|
|
1306
|
+
return /* @__PURE__ */ jsx10("div", {
|
|
1131
1307
|
"data-slot": "sheet-header",
|
|
1132
1308
|
className: cn("flex flex-col gap-1.5 p-4", className),
|
|
1133
1309
|
...props
|
|
1134
1310
|
});
|
|
1135
1311
|
}
|
|
1136
1312
|
function SheetTitle({ className, ...props }) {
|
|
1137
|
-
return /* @__PURE__ */
|
|
1313
|
+
return /* @__PURE__ */ jsx10(SheetPrimitive.Title, {
|
|
1138
1314
|
"data-slot": "sheet-title",
|
|
1139
1315
|
className: cn("font-medium text-foreground", className),
|
|
1140
1316
|
...props
|
|
@@ -1144,19 +1320,16 @@ function SheetDescription({
|
|
|
1144
1320
|
className,
|
|
1145
1321
|
...props
|
|
1146
1322
|
}) {
|
|
1147
|
-
return /* @__PURE__ */
|
|
1323
|
+
return /* @__PURE__ */ jsx10(SheetPrimitive.Description, {
|
|
1148
1324
|
"data-slot": "sheet-description",
|
|
1149
1325
|
className: cn("text-sm text-muted-foreground", className),
|
|
1150
1326
|
...props
|
|
1151
1327
|
});
|
|
1152
1328
|
}
|
|
1153
1329
|
|
|
1154
|
-
// ../../src/components/ui/skeleton.tsx
|
|
1155
|
-
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
1156
|
-
|
|
1157
1330
|
// ../../src/components/ui/tooltip.tsx
|
|
1158
1331
|
import { Tooltip as TooltipPrimitive } from "@base-ui/react/tooltip";
|
|
1159
|
-
import { jsx as jsx11, jsxs as
|
|
1332
|
+
import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1160
1333
|
"use client";
|
|
1161
1334
|
function Tooltip({ ...props }) {
|
|
1162
1335
|
return /* @__PURE__ */ jsx11(TooltipPrimitive.Root, {
|
|
@@ -1186,7 +1359,7 @@ function TooltipContent({
|
|
|
1186
1359
|
side,
|
|
1187
1360
|
sideOffset,
|
|
1188
1361
|
className: "isolate z-50",
|
|
1189
|
-
children: /* @__PURE__ */
|
|
1362
|
+
children: /* @__PURE__ */ jsxs8(TooltipPrimitive.Popup, {
|
|
1190
1363
|
"data-slot": "tooltip-content",
|
|
1191
1364
|
className: cn("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className),
|
|
1192
1365
|
...props,
|
|
@@ -1204,7 +1377,7 @@ function TooltipContent({
|
|
|
1204
1377
|
// ../../src/components/ui/sidebar.tsx
|
|
1205
1378
|
import { PanelLeftIcon } from "lucide-react";
|
|
1206
1379
|
import { Schema } from "effect";
|
|
1207
|
-
import { jsx as jsx12, jsxs as
|
|
1380
|
+
import { jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1208
1381
|
var SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
1209
1382
|
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
1210
1383
|
var SIDEBAR_WIDTH = "16rem";
|
|
@@ -1305,7 +1478,7 @@ function Sidebar({
|
|
|
1305
1478
|
open: openMobile,
|
|
1306
1479
|
onOpenChange: setOpenMobile,
|
|
1307
1480
|
...props,
|
|
1308
|
-
children: /* @__PURE__ */
|
|
1481
|
+
children: /* @__PURE__ */ jsxs9(SheetContent, {
|
|
1309
1482
|
dir,
|
|
1310
1483
|
"data-sidebar": "sidebar",
|
|
1311
1484
|
"data-slot": "sidebar",
|
|
@@ -1314,7 +1487,7 @@ function Sidebar({
|
|
|
1314
1487
|
style: mobileStyle,
|
|
1315
1488
|
side,
|
|
1316
1489
|
children: [
|
|
1317
|
-
/* @__PURE__ */
|
|
1490
|
+
/* @__PURE__ */ jsxs9(SheetHeader, {
|
|
1318
1491
|
className: "sr-only",
|
|
1319
1492
|
children: [
|
|
1320
1493
|
/* @__PURE__ */ jsx12(SheetTitle, {
|
|
@@ -1333,7 +1506,7 @@ function Sidebar({
|
|
|
1333
1506
|
})
|
|
1334
1507
|
});
|
|
1335
1508
|
}
|
|
1336
|
-
return /* @__PURE__ */
|
|
1509
|
+
return /* @__PURE__ */ jsxs9("div", {
|
|
1337
1510
|
className: "group peer text-sidebar-foreground hidden md:block",
|
|
1338
1511
|
"data-state": state,
|
|
1339
1512
|
"data-collapsible": state === "collapsed" ? collapsible : "",
|
|
@@ -1366,7 +1539,7 @@ function SidebarTrigger({
|
|
|
1366
1539
|
...props
|
|
1367
1540
|
}) {
|
|
1368
1541
|
const { toggleSidebar } = useSidebar();
|
|
1369
|
-
return /* @__PURE__ */
|
|
1542
|
+
return /* @__PURE__ */ jsxs9(Button, {
|
|
1370
1543
|
"data-sidebar": "trigger",
|
|
1371
1544
|
"data-slot": "sidebar-trigger",
|
|
1372
1545
|
variant: "ghost",
|
|
@@ -1528,7 +1701,7 @@ function SidebarMenuButton({
|
|
|
1528
1701
|
return comp;
|
|
1529
1702
|
}
|
|
1530
1703
|
const tooltipProps = Schema.is(Schema.String)(tooltip) ? { children: tooltip } : tooltip;
|
|
1531
|
-
return /* @__PURE__ */
|
|
1704
|
+
return /* @__PURE__ */ jsxs9(Tooltip, {
|
|
1532
1705
|
children: [
|
|
1533
1706
|
comp,
|
|
1534
1707
|
/* @__PURE__ */ jsx12(TooltipContent, {
|
|
@@ -1542,7 +1715,7 @@ function SidebarMenuButton({
|
|
|
1542
1715
|
}
|
|
1543
1716
|
|
|
1544
1717
|
// ../../src/components/ui/sidebar-layout.tsx
|
|
1545
|
-
import { jsx as jsx13, jsxs as
|
|
1718
|
+
import { jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1546
1719
|
var sidebarStorageRuntime = Atom.runtime(BrowserKeyValueStore.layerLocalStorage);
|
|
1547
1720
|
var sidebarOpenAtom = Atom.kvs({
|
|
1548
1721
|
runtime: sidebarStorageRuntime,
|
|
@@ -1559,14 +1732,14 @@ function AppSidebar({ footer, groups, header }) {
|
|
|
1559
1732
|
if (isMobile)
|
|
1560
1733
|
setOpenMobile(false);
|
|
1561
1734
|
};
|
|
1562
|
-
return /* @__PURE__ */
|
|
1735
|
+
return /* @__PURE__ */ jsxs10(Sidebar, {
|
|
1563
1736
|
collapsible: "icon",
|
|
1564
1737
|
children: [
|
|
1565
1738
|
header && /* @__PURE__ */ jsx13(SidebarHeader, {
|
|
1566
1739
|
children: header
|
|
1567
1740
|
}),
|
|
1568
1741
|
/* @__PURE__ */ jsx13(SidebarContent, {
|
|
1569
|
-
children: groups.map((group) => /* @__PURE__ */
|
|
1742
|
+
children: groups.map((group) => /* @__PURE__ */ jsxs10(SidebarGroup, {
|
|
1570
1743
|
children: [
|
|
1571
1744
|
/* @__PURE__ */ jsx13(SidebarGroupLabel, {
|
|
1572
1745
|
children: group.label()
|
|
@@ -1582,7 +1755,7 @@ function AppSidebar({ footer, groups, header }) {
|
|
|
1582
1755
|
to: item.href
|
|
1583
1756
|
});
|
|
1584
1757
|
return /* @__PURE__ */ jsx13(SidebarMenuItem, {
|
|
1585
|
-
children: /* @__PURE__ */
|
|
1758
|
+
children: /* @__PURE__ */ jsxs10(SidebarMenuButton, {
|
|
1586
1759
|
isActive: !item.external && pathname === item.href,
|
|
1587
1760
|
onClick: closeMobileSidebar,
|
|
1588
1761
|
render,
|
|
@@ -1623,7 +1796,7 @@ function SidebarLayout({
|
|
|
1623
1796
|
fullPage = false
|
|
1624
1797
|
}) {
|
|
1625
1798
|
const [sidebarOpen, setSidebarOpen] = useAtom(sidebarOpenAtom);
|
|
1626
|
-
return /* @__PURE__ */
|
|
1799
|
+
return /* @__PURE__ */ jsxs10(SidebarProvider, {
|
|
1627
1800
|
open: sidebarOpen,
|
|
1628
1801
|
onOpenChange: setSidebarOpen,
|
|
1629
1802
|
className: cn(fullPage && "xl:h-svh xl:min-h-0 xl:overflow-hidden"),
|
|
@@ -1633,10 +1806,10 @@ function SidebarLayout({
|
|
|
1633
1806
|
groups,
|
|
1634
1807
|
header: sidebarHeader
|
|
1635
1808
|
}),
|
|
1636
|
-
/* @__PURE__ */
|
|
1637
|
-
className: cn("min-w-0 overflow-x-
|
|
1809
|
+
/* @__PURE__ */ jsxs10(SidebarInset, {
|
|
1810
|
+
className: cn("min-w-0 overflow-x-clip", fullPage && "xl:h-svh xl:min-h-0 xl:overflow-hidden"),
|
|
1638
1811
|
children: [
|
|
1639
|
-
/* @__PURE__ */
|
|
1812
|
+
/* @__PURE__ */ jsxs10("header", {
|
|
1640
1813
|
className: "bg-background/95 supports-[backdrop-filter]:bg-background/60 sticky top-0 z-10 flex h-14 shrink-0 items-center gap-2 border-b px-4 backdrop-blur",
|
|
1641
1814
|
children: [
|
|
1642
1815
|
/* @__PURE__ */ jsx13(SidebarTrigger, {}),
|
|
@@ -1769,9 +1942,100 @@ var createSeo = (defaults) => (options) => seo({
|
|
|
1769
1942
|
...options
|
|
1770
1943
|
});
|
|
1771
1944
|
|
|
1772
|
-
// ../../src/lib/docs
|
|
1773
|
-
import { jsx as jsx14, jsxs as
|
|
1774
|
-
|
|
1945
|
+
// ../../src/lib/docs.tsx
|
|
1946
|
+
import { jsx as jsx14, jsxs as jsxs11, Fragment as Fragment3 } from "react/jsx-runtime";
|
|
1947
|
+
var makeIcon = (name, paths) => {
|
|
1948
|
+
const Icon = forwardRef(({ absoluteStrokeWidth: _absoluteStrokeWidth, size = 24, ...props }, ref) => /* @__PURE__ */ jsx14("svg", {
|
|
1949
|
+
"aria-hidden": "true",
|
|
1950
|
+
fill: "none",
|
|
1951
|
+
height: size,
|
|
1952
|
+
ref,
|
|
1953
|
+
stroke: "currentColor",
|
|
1954
|
+
strokeLinecap: "round",
|
|
1955
|
+
strokeLinejoin: "round",
|
|
1956
|
+
strokeWidth: "2",
|
|
1957
|
+
viewBox: "0 0 24 24",
|
|
1958
|
+
width: size,
|
|
1959
|
+
...props,
|
|
1960
|
+
children: paths
|
|
1961
|
+
}));
|
|
1962
|
+
Icon.displayName = name;
|
|
1963
|
+
return Icon;
|
|
1964
|
+
};
|
|
1965
|
+
var ArrowLeft = makeIcon("ArrowLeft", /* @__PURE__ */ jsxs11(Fragment3, {
|
|
1966
|
+
children: [
|
|
1967
|
+
/* @__PURE__ */ jsx14("path", {
|
|
1968
|
+
d: "m12 19-7-7 7-7"
|
|
1969
|
+
}),
|
|
1970
|
+
/* @__PURE__ */ jsx14("path", {
|
|
1971
|
+
d: "M19 12H5"
|
|
1972
|
+
})
|
|
1973
|
+
]
|
|
1974
|
+
}));
|
|
1975
|
+
var ArrowRight = makeIcon("ArrowRight", /* @__PURE__ */ jsxs11(Fragment3, {
|
|
1976
|
+
children: [
|
|
1977
|
+
/* @__PURE__ */ jsx14("path", {
|
|
1978
|
+
d: "M5 12h14"
|
|
1979
|
+
}),
|
|
1980
|
+
/* @__PURE__ */ jsx14("path", {
|
|
1981
|
+
d: "m12 5 7 7-7 7"
|
|
1982
|
+
})
|
|
1983
|
+
]
|
|
1984
|
+
}));
|
|
1985
|
+
var BookOpen = makeIcon("BookOpen", /* @__PURE__ */ jsxs11(Fragment3, {
|
|
1986
|
+
children: [
|
|
1987
|
+
/* @__PURE__ */ jsx14("path", {
|
|
1988
|
+
d: "M12 7v14"
|
|
1989
|
+
}),
|
|
1990
|
+
/* @__PURE__ */ jsx14("path", {
|
|
1991
|
+
d: "M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-5a4 4 0 0 0-4 4 4 4 0 0 0-4-4Z"
|
|
1992
|
+
})
|
|
1993
|
+
]
|
|
1994
|
+
}));
|
|
1995
|
+
var ChevronDown = makeIcon("ChevronDown", /* @__PURE__ */ jsx14("path", {
|
|
1996
|
+
d: "m6 9 6 6 6-6"
|
|
1997
|
+
}));
|
|
1998
|
+
var ExternalLink = makeIcon("ExternalLink", /* @__PURE__ */ jsxs11(Fragment3, {
|
|
1999
|
+
children: [
|
|
2000
|
+
/* @__PURE__ */ jsx14("path", {
|
|
2001
|
+
d: "M15 3h6v6"
|
|
2002
|
+
}),
|
|
2003
|
+
/* @__PURE__ */ jsx14("path", {
|
|
2004
|
+
d: "M10 14 21 3"
|
|
2005
|
+
}),
|
|
2006
|
+
/* @__PURE__ */ jsx14("path", {
|
|
2007
|
+
d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"
|
|
2008
|
+
})
|
|
2009
|
+
]
|
|
2010
|
+
}));
|
|
2011
|
+
var Hash = makeIcon("Hash", /* @__PURE__ */ jsxs11(Fragment3, {
|
|
2012
|
+
children: [
|
|
2013
|
+
/* @__PURE__ */ jsx14("line", {
|
|
2014
|
+
x1: "4",
|
|
2015
|
+
x2: "20",
|
|
2016
|
+
y1: "9",
|
|
2017
|
+
y2: "9"
|
|
2018
|
+
}),
|
|
2019
|
+
/* @__PURE__ */ jsx14("line", {
|
|
2020
|
+
x1: "4",
|
|
2021
|
+
x2: "20",
|
|
2022
|
+
y1: "15",
|
|
2023
|
+
y2: "15"
|
|
2024
|
+
}),
|
|
2025
|
+
/* @__PURE__ */ jsx14("line", {
|
|
2026
|
+
x1: "10",
|
|
2027
|
+
x2: "8",
|
|
2028
|
+
y1: "3",
|
|
2029
|
+
y2: "21"
|
|
2030
|
+
}),
|
|
2031
|
+
/* @__PURE__ */ jsx14("line", {
|
|
2032
|
+
x1: "16",
|
|
2033
|
+
x2: "14",
|
|
2034
|
+
y1: "3",
|
|
2035
|
+
y2: "21"
|
|
2036
|
+
})
|
|
2037
|
+
]
|
|
2038
|
+
}));
|
|
1775
2039
|
var DocsSection = Schema3.String.annotate({
|
|
1776
2040
|
identifier: "DocsSection"
|
|
1777
2041
|
});
|
|
@@ -1802,76 +2066,28 @@ var DocsFrontmatter = Schema3.Struct({
|
|
|
1802
2066
|
type: DocsPageType,
|
|
1803
2067
|
createdAt: Schema3.optional(DocsDate),
|
|
1804
2068
|
updatedAt: Schema3.optional(DocsDate),
|
|
1805
|
-
legacySlugs: Schema3.optional(Schema3.Array(Schema3.String))
|
|
2069
|
+
legacySlugs: Schema3.optional(Schema3.Array(Schema3.String)),
|
|
2070
|
+
tags: Schema3.optional(Schema3.Array(Schema3.NonEmptyString))
|
|
1806
2071
|
}).annotate({ identifier: "DocsFrontmatter" });
|
|
1807
2072
|
var DocsHeadingSchema = Schema3.Struct({
|
|
1808
2073
|
depth: Schema3.Literals([2, 3]),
|
|
1809
2074
|
id: Schema3.String,
|
|
1810
2075
|
title: Schema3.String
|
|
1811
2076
|
}).annotate({ identifier: "DocsHeading" });
|
|
2077
|
+
var DocsCodeBlockSchema = Schema3.Struct({
|
|
2078
|
+
code: Schema3.String,
|
|
2079
|
+
language: Schema3.String
|
|
2080
|
+
}).annotate({ identifier: "DocsCodeBlock" });
|
|
1812
2081
|
var DocsPageSchema = Schema3.Struct({
|
|
1813
2082
|
...DocsFrontmatter.fields,
|
|
2083
|
+
codeBlocks: Schema3.Array(DocsCodeBlockSchema),
|
|
1814
2084
|
headings: Schema3.Array(DocsHeadingSchema),
|
|
2085
|
+
html: Schema3.String,
|
|
1815
2086
|
searchText: Schema3.String,
|
|
1816
2087
|
sourceFile: Schema3.String,
|
|
1817
2088
|
source: Schema3.String
|
|
1818
2089
|
}).annotate({ identifier: "DocsPage" });
|
|
1819
2090
|
var slugifyDocsHeading = (value) => value.normalize("NFKD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[`*_~]/g, "").replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
|
|
1820
|
-
var stripMarkdown = (source) => source.replace(/```[\s\S]*?```/g, " ").replace(/!?(?:\[([^\]]+)\])\([^)]*\)/g, "$1").replace(/<[^>]+>/g, " ").replace(/[`*_>#|~-]/g, " ").replace(/\s+/g, " ").trim();
|
|
1821
|
-
var parseHeadings = (source, file) => {
|
|
1822
|
-
const seen = new Set;
|
|
1823
|
-
const headings = [];
|
|
1824
|
-
let fence;
|
|
1825
|
-
for (const line of source.split(/\r?\n/)) {
|
|
1826
|
-
const fenceMatch = /^\s{0,3}(```|~~~)/.exec(line)?.[1];
|
|
1827
|
-
if (fenceMatch === "```" || fenceMatch === "~~~") {
|
|
1828
|
-
if (!fence)
|
|
1829
|
-
fence = fenceMatch;
|
|
1830
|
-
else if (fence === fenceMatch)
|
|
1831
|
-
fence = undefined;
|
|
1832
|
-
continue;
|
|
1833
|
-
}
|
|
1834
|
-
if (fence)
|
|
1835
|
-
continue;
|
|
1836
|
-
const match = /^\s{0,3}(##|###)\s+(.+?)\s*#*$/.exec(line);
|
|
1837
|
-
if (!match)
|
|
1838
|
-
continue;
|
|
1839
|
-
const title = stripMarkdown(match[2] ?? "");
|
|
1840
|
-
const baseId = slugifyDocsHeading(title);
|
|
1841
|
-
if (!baseId)
|
|
1842
|
-
continue;
|
|
1843
|
-
if (seen.has(baseId)) {
|
|
1844
|
-
throw new Error(`Duplicate heading ${baseId} in ${file}`);
|
|
1845
|
-
}
|
|
1846
|
-
seen.add(baseId);
|
|
1847
|
-
headings.push({
|
|
1848
|
-
depth: match[1] === "##" ? 2 : 3,
|
|
1849
|
-
id: baseId,
|
|
1850
|
-
title
|
|
1851
|
-
});
|
|
1852
|
-
}
|
|
1853
|
-
return headings;
|
|
1854
|
-
};
|
|
1855
|
-
var stripBodyTitle = (source) => source.replace(/^\s*#\s+.+?\r?\n+/, "");
|
|
1856
|
-
var parseDocsSource = (file, source) => {
|
|
1857
|
-
const match = /^---\r?\n([\s\S]*?)\r?\n---\r?\n([\s\S]*)$/.exec(source);
|
|
1858
|
-
if (!match)
|
|
1859
|
-
throw new Error(`Missing frontmatter in ${file}`);
|
|
1860
|
-
const frontmatter = Schema3.decodeUnknownSync(DocsFrontmatter)(parse(match[1] ?? ""));
|
|
1861
|
-
const bodySource = match[2] ?? "";
|
|
1862
|
-
const title = /^#\s+(.+?)\s*$/m.exec(bodySource)?.[1];
|
|
1863
|
-
if (!title || stripMarkdown(title) !== stripMarkdown(frontmatter.title)) {
|
|
1864
|
-
throw new Error(`Body title does not match frontmatter in ${file}`);
|
|
1865
|
-
}
|
|
1866
|
-
const body = stripBodyTitle(bodySource);
|
|
1867
|
-
return Schema3.decodeUnknownSync(DocsPageSchema)({
|
|
1868
|
-
...frontmatter,
|
|
1869
|
-
headings: parseHeadings(body, file),
|
|
1870
|
-
searchText: stripMarkdown(body),
|
|
1871
|
-
sourceFile: file.replace(/^\.\.\//, "src/"),
|
|
1872
|
-
source: body
|
|
1873
|
-
});
|
|
1874
|
-
};
|
|
1875
2091
|
var validateDocsPages = (pages, config) => {
|
|
1876
2092
|
const configuredLocales = new Set(config.locales);
|
|
1877
2093
|
for (const page of pages) {
|
|
@@ -1886,9 +2102,6 @@ var validateDocsPages = (pages, config) => {
|
|
|
1886
2102
|
const orders = new Set;
|
|
1887
2103
|
const routeSlugs = new Set;
|
|
1888
2104
|
for (const page of localized) {
|
|
1889
|
-
if (page.icon && !/^[a-z0-9-]+:[a-z0-9-]+$/.test(page.icon)) {
|
|
1890
|
-
throw new Error(`${page.sourceFile} must use an Iconify icon name`);
|
|
1891
|
-
}
|
|
1892
2105
|
if (config.matchesLocale && !config.matchesLocale(page.sourceFile, locale)) {
|
|
1893
2106
|
throw new Error(`${page.sourceFile} does not match locale ${locale}`);
|
|
1894
2107
|
}
|
|
@@ -1925,7 +2138,7 @@ var validateDocsPages = (pages, config) => {
|
|
|
1925
2138
|
if (!localized) {
|
|
1926
2139
|
throw new Error(`Missing ${locale} page for ${page.slug}`);
|
|
1927
2140
|
}
|
|
1928
|
-
if (page.path !== localized.path || page.order !== localized.order || page.section !== localized.section || page.type !== localized.type || page.icon !== localized.icon || page.createdAt !== localized.createdAt || page.updatedAt !== localized.updatedAt || JSON.stringify(page.legacySlugs ?? []) !== JSON.stringify(localized.legacySlugs ?? [])) {
|
|
2141
|
+
if (page.path !== localized.path || page.order !== localized.order || page.section !== localized.section || page.type !== localized.type || page.icon !== localized.icon || page.createdAt !== localized.createdAt || page.updatedAt !== localized.updatedAt || JSON.stringify(page.tags ?? []) !== JSON.stringify(localized.tags ?? []) || JSON.stringify(page.legacySlugs ?? []) !== JSON.stringify(localized.legacySlugs ?? [])) {
|
|
1929
2142
|
throw new Error(`Metadata differs between ${baseLocale2} and ${locale} for ${page.slug}`);
|
|
1930
2143
|
}
|
|
1931
2144
|
}
|
|
@@ -1964,11 +2177,6 @@ var createDocsSource = (config) => {
|
|
|
1964
2177
|
resolvePage
|
|
1965
2178
|
};
|
|
1966
2179
|
};
|
|
1967
|
-
var createMdxDocsSource = (config) => createDocsSource({
|
|
1968
|
-
...config,
|
|
1969
|
-
matchesLocale: config.matchesLocale ?? ((file, locale) => file.includes(`/${locale}/`)),
|
|
1970
|
-
pages: Object.entries(config.files).map(([file, source]) => parseDocsSource(file, source))
|
|
1971
|
-
});
|
|
1972
2180
|
var makeDocs = (config) => {
|
|
1973
2181
|
const { source } = config;
|
|
1974
2182
|
const basePath = config.basePath.replace(/\/$/, "");
|
|
@@ -1977,7 +2185,7 @@ var makeDocs = (config) => {
|
|
|
1977
2185
|
const brand = config.brand ?? {
|
|
1978
2186
|
label: config.siteName,
|
|
1979
2187
|
subtitle: () => "Documentation",
|
|
1980
|
-
icon:
|
|
2188
|
+
icon: BookOpen,
|
|
1981
2189
|
href: "/"
|
|
1982
2190
|
};
|
|
1983
2191
|
const seoDefaults = {
|
|
@@ -1989,9 +2197,10 @@ var makeDocs = (config) => {
|
|
|
1989
2197
|
seoDefaults.defaultLocale = config.defaultLocale;
|
|
1990
2198
|
const docsSeo = createSeo(seoDefaults);
|
|
1991
2199
|
const getMessages = (locale) => getDocsMessages(locale, config.messages?.(locale));
|
|
2200
|
+
const navigate = config.navigate ?? ((href) => window.location.assign(href));
|
|
1992
2201
|
const normalizeSearchText = (value) => value.normalize("NFKD").replace(/[\u0300-\u036f]/g, "").toLowerCase();
|
|
1993
2202
|
const searchIndex = source.pages.flatMap((page) => {
|
|
1994
|
-
const description = normalizeSearchText(page.description);
|
|
2203
|
+
const description = normalizeSearchText(`${page.description} ${(page.tags ?? []).join(" ")}`);
|
|
1995
2204
|
return [
|
|
1996
2205
|
{
|
|
1997
2206
|
page,
|
|
@@ -2013,10 +2222,13 @@ var makeDocs = (config) => {
|
|
|
2013
2222
|
if (page.path !== expectedPath) {
|
|
2014
2223
|
throw new Error(`${page.sourceFile} must use path ${expectedPath}`);
|
|
2015
2224
|
}
|
|
2225
|
+
if (page.icon && !config.icons?.[page.icon]) {
|
|
2226
|
+
throw new Error(`${page.sourceFile} uses unconfigured icon ${page.icon}`);
|
|
2227
|
+
}
|
|
2016
2228
|
}
|
|
2017
2229
|
const pages = (locale) => source.getPages(locale);
|
|
2018
2230
|
const sections = (locale) => {
|
|
2019
|
-
const localized = pages(locale);
|
|
2231
|
+
const localized = pages(locale).filter((page) => config.navigation?.(page) ?? true);
|
|
2020
2232
|
const ids = Array.from(new Set(localized.map((page) => page.section)));
|
|
2021
2233
|
const configuredOrder = config.sectionOrder ?? [];
|
|
2022
2234
|
const orderedIds = [
|
|
@@ -2098,10 +2310,13 @@ var makeDocs = (config) => {
|
|
|
2098
2310
|
editUrl,
|
|
2099
2311
|
githubUrl,
|
|
2100
2312
|
githubLabel: config.githubLabel ?? "GitHub",
|
|
2313
|
+
icons: config.icons ?? {},
|
|
2314
|
+
navigate,
|
|
2101
2315
|
getHead,
|
|
2102
2316
|
getMessages,
|
|
2103
2317
|
origin,
|
|
2104
2318
|
resources: config.resources,
|
|
2319
|
+
sidebarGroups: config.sidebarGroups,
|
|
2105
2320
|
source,
|
|
2106
2321
|
pages,
|
|
2107
2322
|
resolve,
|
|
@@ -2210,147 +2425,83 @@ var getDocsMessages = (locale, overrides) => ({
|
|
|
2210
2425
|
...locale.startsWith("fr") ? messages2.fr : messages2.en,
|
|
2211
2426
|
...overrides
|
|
2212
2427
|
});
|
|
2213
|
-
var iconComponents = new Map;
|
|
2214
2428
|
var EmptyIcon = forwardRef(() => null);
|
|
2215
|
-
var iconFor = (name) =>
|
|
2216
|
-
const existing = iconComponents.get(name);
|
|
2217
|
-
if (existing)
|
|
2218
|
-
return existing;
|
|
2219
|
-
const DocsIcon = forwardRef(({ className, color, size }, ref) => /* @__PURE__ */ jsx14(Icon, {
|
|
2220
|
-
icon: name,
|
|
2221
|
-
ref,
|
|
2222
|
-
ssr: true,
|
|
2223
|
-
className,
|
|
2224
|
-
color,
|
|
2225
|
-
height: size,
|
|
2226
|
-
width: size
|
|
2227
|
-
}));
|
|
2228
|
-
DocsIcon.displayName = `DocsIcon(${name})`;
|
|
2229
|
-
iconComponents.set(name, DocsIcon);
|
|
2230
|
-
return DocsIcon;
|
|
2231
|
-
};
|
|
2232
|
-
var headingText = (children) => Children.toArray(children).filter((child) => Schema3.is(Schema3.Union([Schema3.String, Schema3.Number]))(child)).join("");
|
|
2233
|
-
var makeDocsHeading = (level, copyLink) => {
|
|
2234
|
-
const Heading = ({
|
|
2235
|
-
children,
|
|
2236
|
-
node: _node,
|
|
2237
|
-
...props
|
|
2238
|
-
}) => {
|
|
2239
|
-
const text = headingText(children);
|
|
2240
|
-
const id = slugifyDocsHeading(text);
|
|
2241
|
-
const Component = level === 2 ? "h2" : "h3";
|
|
2242
|
-
return /* @__PURE__ */ jsxs9(Component, {
|
|
2243
|
-
id,
|
|
2244
|
-
className: "group scroll-mt-20",
|
|
2245
|
-
...props,
|
|
2246
|
-
children: [
|
|
2247
|
-
children,
|
|
2248
|
-
/* @__PURE__ */ jsx14("a", {
|
|
2249
|
-
className: "text-muted-foreground ml-2 opacity-0 transition-opacity group-focus-within:opacity-100 group-hover:opacity-100",
|
|
2250
|
-
href: `#${id}`,
|
|
2251
|
-
"aria-label": `${copyLink}: ${text}`,
|
|
2252
|
-
children: "#"
|
|
2253
|
-
})
|
|
2254
|
-
]
|
|
2255
|
-
});
|
|
2256
|
-
};
|
|
2257
|
-
return Heading;
|
|
2258
|
-
};
|
|
2429
|
+
var iconFor = (icons, name) => name ? icons[name] ?? EmptyIcon : EmptyIcon;
|
|
2259
2430
|
var DocsArticle = ({
|
|
2260
|
-
docs,
|
|
2261
2431
|
messages: messages3,
|
|
2262
2432
|
page
|
|
2263
2433
|
}) => {
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
...props
|
|
2269
|
-
}) => {
|
|
2270
|
-
if (!href)
|
|
2271
|
-
return /* @__PURE__ */ jsx14("span", {
|
|
2272
|
-
children
|
|
2273
|
-
});
|
|
2274
|
-
if (href === docs.basePath || href.startsWith(`${docs.basePath}/`)) {
|
|
2275
|
-
const [path, hash] = href.split("#", 2);
|
|
2276
|
-
return /* @__PURE__ */ jsx14(Link3, {
|
|
2277
|
-
to: path,
|
|
2278
|
-
...hash ? { hash } : {},
|
|
2279
|
-
children
|
|
2280
|
-
});
|
|
2281
|
-
}
|
|
2282
|
-
if (href.startsWith("#") || href.startsWith("/")) {
|
|
2283
|
-
return /* @__PURE__ */ jsx14("a", {
|
|
2284
|
-
href,
|
|
2285
|
-
...props,
|
|
2286
|
-
children
|
|
2287
|
-
});
|
|
2288
|
-
}
|
|
2289
|
-
return /* @__PURE__ */ jsx14("a", {
|
|
2290
|
-
href,
|
|
2291
|
-
target: "_blank",
|
|
2292
|
-
rel: "noreferrer",
|
|
2293
|
-
...props,
|
|
2294
|
-
children
|
|
2295
|
-
});
|
|
2296
|
-
};
|
|
2297
|
-
const components = {
|
|
2298
|
-
a: DocsLink,
|
|
2299
|
-
h2: makeDocsHeading(2, messages3.copyLink),
|
|
2300
|
-
h3: makeDocsHeading(3, messages3.copyLink),
|
|
2301
|
-
inlineCode: ({ children, node: _node, ...props }) => /* @__PURE__ */ jsx14("code", {
|
|
2302
|
-
className: "bg-muted rounded px-1.5 py-0.5 font-mono text-[0.875em]",
|
|
2303
|
-
...props,
|
|
2304
|
-
children
|
|
2305
|
-
}),
|
|
2306
|
-
blockquote: ({ children, node: _node, ...props }) => /* @__PURE__ */ jsx14("blockquote", {
|
|
2307
|
-
className: "border-primary/40 bg-muted/40 rounded-r-lg border-l-4 px-5 py-1",
|
|
2308
|
-
...props,
|
|
2309
|
-
children
|
|
2310
|
-
})
|
|
2311
|
-
};
|
|
2312
|
-
return /* @__PURE__ */ jsx14(Streamdown, {
|
|
2313
|
-
className: "[&_a:hover]:text-primary [&_a]:decoration-border text-[0.98rem] leading-7 [&_[data-streamdown=code-block-actions]]:pointer-events-auto [&_[data-streamdown=code-block-body]_code_span_span]:text-[var(--sdm-c,inherit)] dark:[&_[data-streamdown=code-block-body]_code_span_span]:text-[var(--shiki-dark,var(--sdm-c,inherit))] [&_[data-streamdown=code-block-body]_code>span]:block [&_[data-streamdown=code-block-body]_code>span]:min-w-max [&_[data-streamdown=code-block-copy-button]]:pointer-events-auto [&_[data-streamdown=code-block-header]+div]:-mt-10 [&_[data-streamdown=code-block-header]+div]:flex [&_[data-streamdown=code-block-header]+div]:h-8 [&_[data-streamdown=code-block-header]+div]:items-center [&_[data-streamdown=code-block-header]+div]:justify-end [&_a]:font-medium [&_a]:underline [&_a]:decoration-1 [&_a]:underline-offset-4 [&_a]:transition-colors [&_h2]:mt-12 [&_h2]:border-t [&_h2]:pt-8 [&_h2]:text-2xl [&_h2]:font-bold [&_h2]:tracking-tight [&_h2:first-of-type]:mt-0 [&_h2:first-of-type]:border-t-0 [&_h2:first-of-type]:pt-0 [&_h3]:mt-8 [&_h3]:text-xl [&_h3]:font-semibold [&_h3]:tracking-tight [&_ol]:my-5 [&_p]:my-5 [&_table]:text-sm [&_ul]:my-5",
|
|
2314
|
-
components,
|
|
2315
|
-
controls: {
|
|
2316
|
-
code: { copy: true, download: false },
|
|
2317
|
-
table: { copy: true, download: false, fullscreen: false }
|
|
2318
|
-
},
|
|
2319
|
-
lineNumbers: false,
|
|
2320
|
-
linkSafety: { enabled: false },
|
|
2321
|
-
mode: "static",
|
|
2322
|
-
plugins: { code },
|
|
2323
|
-
translations: {
|
|
2324
|
-
copied: messages3.copied,
|
|
2325
|
-
copyCode: messages3.copyCode,
|
|
2326
|
-
copyLink: messages3.copyLink,
|
|
2327
|
-
copyTable: messages3.copyTable,
|
|
2328
|
-
downloadTable: messages3.downloadTable
|
|
2329
|
-
},
|
|
2330
|
-
children: page.source
|
|
2434
|
+
return /* @__PURE__ */ jsx14(MarkdownContent, {
|
|
2435
|
+
codeBlocks: page.codeBlocks,
|
|
2436
|
+
html: page.html,
|
|
2437
|
+
messages: { copy: messages3.copyCode, copied: messages3.copied }
|
|
2331
2438
|
});
|
|
2332
2439
|
};
|
|
2440
|
+
var useActiveDocsHeading = (headings) => {
|
|
2441
|
+
const [activeHeadingId, setActiveHeadingId] = useState5(headings[0]?.id);
|
|
2442
|
+
useEffect5(() => {
|
|
2443
|
+
const elements = headings.flatMap((heading) => {
|
|
2444
|
+
const element = document.getElementById(heading.id);
|
|
2445
|
+
return element ? [element] : [];
|
|
2446
|
+
});
|
|
2447
|
+
if (elements.length === 0)
|
|
2448
|
+
return;
|
|
2449
|
+
let frame;
|
|
2450
|
+
const updateActiveHeading = () => {
|
|
2451
|
+
let activeId = elements[0].id;
|
|
2452
|
+
for (const element of elements) {
|
|
2453
|
+
if (element.getBoundingClientRect().top > 96)
|
|
2454
|
+
break;
|
|
2455
|
+
activeId = element.id;
|
|
2456
|
+
}
|
|
2457
|
+
const isAtPageEnd = window.innerHeight + window.scrollY >= document.documentElement.scrollHeight - 1;
|
|
2458
|
+
setActiveHeadingId(isAtPageEnd ? elements[elements.length - 1].id : activeId);
|
|
2459
|
+
};
|
|
2460
|
+
const scheduleUpdate = () => {
|
|
2461
|
+
if (frame !== undefined)
|
|
2462
|
+
cancelAnimationFrame(frame);
|
|
2463
|
+
frame = requestAnimationFrame(updateActiveHeading);
|
|
2464
|
+
};
|
|
2465
|
+
updateActiveHeading();
|
|
2466
|
+
window.addEventListener("scroll", scheduleUpdate, { passive: true });
|
|
2467
|
+
window.addEventListener("resize", scheduleUpdate);
|
|
2468
|
+
return () => {
|
|
2469
|
+
if (frame !== undefined)
|
|
2470
|
+
cancelAnimationFrame(frame);
|
|
2471
|
+
window.removeEventListener("scroll", scheduleUpdate);
|
|
2472
|
+
window.removeEventListener("resize", scheduleUpdate);
|
|
2473
|
+
};
|
|
2474
|
+
}, [headings]);
|
|
2475
|
+
return activeHeadingId;
|
|
2476
|
+
};
|
|
2333
2477
|
var DocsTableOfContentsItems = ({
|
|
2334
2478
|
headings
|
|
2335
|
-
}) =>
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2479
|
+
}) => {
|
|
2480
|
+
const activeHeadingId = useActiveDocsHeading(headings);
|
|
2481
|
+
return /* @__PURE__ */ jsx14("ol", {
|
|
2482
|
+
className: "border-l",
|
|
2483
|
+
children: headings.map((heading) => {
|
|
2484
|
+
const isActive = heading.id === activeHeadingId;
|
|
2485
|
+
return /* @__PURE__ */ jsx14("li", {
|
|
2486
|
+
children: /* @__PURE__ */ jsx14("a", {
|
|
2487
|
+
"aria-current": isActive ? "location" : undefined,
|
|
2488
|
+
className: `hover:text-foreground -ml-px block border-l py-1.5 text-sm leading-5 transition-colors ${isActive ? "border-primary text-foreground font-medium" : "text-muted-foreground border-transparent"} ${heading.depth === 3 ? "pl-6" : "pl-4"}`,
|
|
2489
|
+
href: `#${heading.id}`,
|
|
2490
|
+
children: heading.title
|
|
2491
|
+
})
|
|
2492
|
+
}, heading.id);
|
|
2342
2493
|
})
|
|
2343
|
-
}
|
|
2344
|
-
}
|
|
2494
|
+
});
|
|
2495
|
+
};
|
|
2345
2496
|
var DocsTableOfContents = ({
|
|
2346
2497
|
headings,
|
|
2347
2498
|
label
|
|
2348
2499
|
}) => {
|
|
2349
2500
|
if (headings.length === 0)
|
|
2350
2501
|
return null;
|
|
2351
|
-
return /* @__PURE__ */
|
|
2502
|
+
return /* @__PURE__ */ jsxs11("nav", {
|
|
2352
2503
|
"aria-label": label,
|
|
2353
|
-
className: "
|
|
2504
|
+
className: "fixed top-20 max-h-[calc(100svh-6rem)] w-56 overflow-y-auto",
|
|
2354
2505
|
children: [
|
|
2355
2506
|
/* @__PURE__ */ jsx14("p", {
|
|
2356
2507
|
className: "text-foreground mb-3 text-sm font-semibold",
|
|
@@ -2368,19 +2519,17 @@ var DocsMobileTableOfContents = ({
|
|
|
2368
2519
|
}) => {
|
|
2369
2520
|
if (headings.length === 0)
|
|
2370
2521
|
return null;
|
|
2371
|
-
return /* @__PURE__ */
|
|
2522
|
+
return /* @__PURE__ */ jsxs11(Collapsible, {
|
|
2372
2523
|
className: "mb-8 overflow-hidden rounded-lg border xl:hidden",
|
|
2373
2524
|
children: [
|
|
2374
|
-
/* @__PURE__ */
|
|
2525
|
+
/* @__PURE__ */ jsxs11(CollapsibleTrigger, {
|
|
2375
2526
|
className: "group flex w-full cursor-pointer items-center justify-between p-4 text-left text-sm font-semibold",
|
|
2376
2527
|
children: [
|
|
2377
2528
|
/* @__PURE__ */ jsx14("span", {
|
|
2378
2529
|
children: label
|
|
2379
2530
|
}),
|
|
2380
|
-
/* @__PURE__ */ jsx14(
|
|
2381
|
-
className: "text-muted-foreground size-4 transition-transform group-data-[panel-open]:rotate-180"
|
|
2382
|
-
icon: "lucide:chevron-down",
|
|
2383
|
-
ssr: true
|
|
2531
|
+
/* @__PURE__ */ jsx14(ChevronDown, {
|
|
2532
|
+
className: "text-muted-foreground size-4 transition-transform group-data-[panel-open]:rotate-180"
|
|
2384
2533
|
})
|
|
2385
2534
|
]
|
|
2386
2535
|
}),
|
|
@@ -2401,8 +2550,7 @@ var DocsSearch = ({
|
|
|
2401
2550
|
locale,
|
|
2402
2551
|
messages: messages3
|
|
2403
2552
|
}) => {
|
|
2404
|
-
const
|
|
2405
|
-
const [query, setQuery] = useState4("");
|
|
2553
|
+
const [query, setQuery] = useState5("");
|
|
2406
2554
|
const deferredQuery = useDeferredValue(query);
|
|
2407
2555
|
const results = docs.search(deferredQuery, locale);
|
|
2408
2556
|
const isSearching = deferredQuery.trim().length > 0;
|
|
@@ -2427,24 +2575,21 @@ var DocsSearch = ({
|
|
|
2427
2575
|
id: `${page.path}#${heading.id}`,
|
|
2428
2576
|
label: heading.title,
|
|
2429
2577
|
description: page.title,
|
|
2430
|
-
icon: /* @__PURE__ */ jsx14(
|
|
2431
|
-
className: "size-4"
|
|
2432
|
-
icon: "lucide:hash",
|
|
2433
|
-
ssr: true
|
|
2578
|
+
icon: /* @__PURE__ */ jsx14(Hash, {
|
|
2579
|
+
className: "size-4"
|
|
2434
2580
|
}),
|
|
2435
|
-
onSelect: () => navigate({
|
|
2581
|
+
onSelect: () => docs.navigate(`${page.path}#${heading.id}`)
|
|
2436
2582
|
} : (() => {
|
|
2437
2583
|
const item = {
|
|
2438
2584
|
id: page.path,
|
|
2439
2585
|
label: page.title,
|
|
2440
2586
|
description: page.description,
|
|
2441
|
-
onSelect: () => navigate(
|
|
2587
|
+
onSelect: () => docs.navigate(page.path)
|
|
2442
2588
|
};
|
|
2443
2589
|
if (page.icon) {
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
ssr: true
|
|
2590
|
+
const PageIcon = iconFor(docs.icons, page.icon);
|
|
2591
|
+
item.icon = /* @__PURE__ */ jsx14(PageIcon, {
|
|
2592
|
+
className: "size-4"
|
|
2448
2593
|
});
|
|
2449
2594
|
}
|
|
2450
2595
|
return item;
|
|
@@ -2471,7 +2616,7 @@ var DocsLayout = ({
|
|
|
2471
2616
|
headerActions,
|
|
2472
2617
|
locale
|
|
2473
2618
|
}) => {
|
|
2474
|
-
const { brand, resources } = docs;
|
|
2619
|
+
const { brand, resources, sidebarGroups } = docs;
|
|
2475
2620
|
const resolvedMessages = docs.getMessages(locale);
|
|
2476
2621
|
const groups = docs.sections(locale).map((section) => ({
|
|
2477
2622
|
label: () => resolvedMessages.sectionLabel(section.id),
|
|
@@ -2479,7 +2624,7 @@ var DocsLayout = ({
|
|
|
2479
2624
|
const navItem = {
|
|
2480
2625
|
label: () => item.title,
|
|
2481
2626
|
href: item.path,
|
|
2482
|
-
icon:
|
|
2627
|
+
icon: iconFor(docs.icons, item.icon)
|
|
2483
2628
|
};
|
|
2484
2629
|
if (isDocsPageNew(item.createdAt)) {
|
|
2485
2630
|
navItem.badge = () => resolvedMessages.newLabel;
|
|
@@ -2487,21 +2632,34 @@ var DocsLayout = ({
|
|
|
2487
2632
|
return navItem;
|
|
2488
2633
|
})
|
|
2489
2634
|
}));
|
|
2635
|
+
if (sidebarGroups) {
|
|
2636
|
+
groups.push(...sidebarGroups.map((group) => ({
|
|
2637
|
+
label: group.label,
|
|
2638
|
+
items: group.items.map((item) => ({
|
|
2639
|
+
badge: item.badge,
|
|
2640
|
+
label: item.label,
|
|
2641
|
+
href: item.href,
|
|
2642
|
+
icon: EmptyIcon,
|
|
2643
|
+
external: item.external
|
|
2644
|
+
}))
|
|
2645
|
+
})));
|
|
2646
|
+
}
|
|
2490
2647
|
if (resources) {
|
|
2491
2648
|
groups.push({
|
|
2492
2649
|
label: resources.label,
|
|
2493
2650
|
items: [
|
|
2494
2651
|
...resources.items.map((item) => ({
|
|
2652
|
+
badge: item.badge,
|
|
2495
2653
|
label: item.label,
|
|
2496
2654
|
href: item.href,
|
|
2497
|
-
icon:
|
|
2655
|
+
icon: EmptyIcon,
|
|
2498
2656
|
external: item.external
|
|
2499
2657
|
})),
|
|
2500
2658
|
...docs.githubUrl ? [
|
|
2501
2659
|
{
|
|
2502
2660
|
label: () => docs.githubLabel,
|
|
2503
2661
|
href: docs.githubUrl,
|
|
2504
|
-
icon:
|
|
2662
|
+
icon: EmptyIcon,
|
|
2505
2663
|
external: true
|
|
2506
2664
|
}
|
|
2507
2665
|
] : []
|
|
@@ -2513,23 +2671,21 @@ var DocsLayout = ({
|
|
|
2513
2671
|
sidebarHeader: /* @__PURE__ */ jsx14(AppBrand, {
|
|
2514
2672
|
label: brand.label,
|
|
2515
2673
|
subtitle: brand.subtitle(),
|
|
2516
|
-
icon:
|
|
2674
|
+
icon: brand.icon,
|
|
2517
2675
|
href: brand.href,
|
|
2518
2676
|
variant: "sidebar"
|
|
2519
2677
|
}),
|
|
2520
|
-
headerActions: /* @__PURE__ */
|
|
2678
|
+
headerActions: /* @__PURE__ */ jsxs11(Fragment3, {
|
|
2521
2679
|
children: [
|
|
2522
|
-
docs.githubUrl ? /* @__PURE__ */
|
|
2680
|
+
docs.githubUrl ? /* @__PURE__ */ jsxs11("a", {
|
|
2523
2681
|
className: "text-muted-foreground hover:text-foreground hidden items-center gap-1.5 text-sm lg:flex",
|
|
2524
2682
|
href: docs.githubUrl,
|
|
2525
2683
|
target: "_blank",
|
|
2526
2684
|
rel: "noreferrer",
|
|
2527
2685
|
children: [
|
|
2528
2686
|
docs.githubLabel,
|
|
2529
|
-
/* @__PURE__ */ jsx14(
|
|
2530
|
-
className: "size-3.5"
|
|
2531
|
-
icon: "lucide:external-link",
|
|
2532
|
-
ssr: true
|
|
2687
|
+
/* @__PURE__ */ jsx14(ExternalLink, {
|
|
2688
|
+
className: "size-3.5"
|
|
2533
2689
|
})
|
|
2534
2690
|
]
|
|
2535
2691
|
}) : null,
|
|
@@ -2547,10 +2703,10 @@ var DocsLayout = ({
|
|
|
2547
2703
|
var DocsHeader = ({ docs, resolution }) => {
|
|
2548
2704
|
const { page } = resolution;
|
|
2549
2705
|
const resolvedMessages = docs.getMessages(page.locale);
|
|
2550
|
-
return /* @__PURE__ */
|
|
2706
|
+
return /* @__PURE__ */ jsxs11("header", {
|
|
2551
2707
|
className: "mb-8 border-b pb-8",
|
|
2552
2708
|
children: [
|
|
2553
|
-
/* @__PURE__ */
|
|
2709
|
+
/* @__PURE__ */ jsxs11("p", {
|
|
2554
2710
|
className: "text-primary mb-3 font-mono text-xs font-semibold tracking-[0.18em] uppercase",
|
|
2555
2711
|
children: [
|
|
2556
2712
|
resolvedMessages.sectionLabel(page.section),
|
|
@@ -2559,9 +2715,18 @@ var DocsHeader = ({ docs, resolution }) => {
|
|
|
2559
2715
|
resolvedMessages.pageTypeLabel(page.type)
|
|
2560
2716
|
]
|
|
2561
2717
|
}),
|
|
2562
|
-
/* @__PURE__ */
|
|
2563
|
-
className: "
|
|
2564
|
-
children:
|
|
2718
|
+
/* @__PURE__ */ jsxs11("div", {
|
|
2719
|
+
className: "flex flex-wrap items-center gap-3",
|
|
2720
|
+
children: [
|
|
2721
|
+
/* @__PURE__ */ jsx14("h1", {
|
|
2722
|
+
className: "text-3xl font-bold tracking-tight sm:text-4xl",
|
|
2723
|
+
children: page.title
|
|
2724
|
+
}),
|
|
2725
|
+
page.tags?.map((tag) => /* @__PURE__ */ jsx14(Badge, {
|
|
2726
|
+
variant: "secondary",
|
|
2727
|
+
children: tag
|
|
2728
|
+
}, tag))
|
|
2729
|
+
]
|
|
2565
2730
|
}),
|
|
2566
2731
|
/* @__PURE__ */ jsx14("p", {
|
|
2567
2732
|
className: "text-muted-foreground mt-3 max-w-2xl text-base leading-7",
|
|
@@ -2577,14 +2742,13 @@ var DocsHeader = ({ docs, resolution }) => {
|
|
|
2577
2742
|
var DocsContent = ({ docs, resolution }) => {
|
|
2578
2743
|
const { page } = resolution;
|
|
2579
2744
|
const resolvedMessages = docs.getMessages(page.locale);
|
|
2580
|
-
return /* @__PURE__ */
|
|
2745
|
+
return /* @__PURE__ */ jsxs11(Fragment3, {
|
|
2581
2746
|
children: [
|
|
2582
2747
|
/* @__PURE__ */ jsx14(DocsMobileTableOfContents, {
|
|
2583
2748
|
headings: page.headings,
|
|
2584
2749
|
label: resolvedMessages.onThisPage
|
|
2585
2750
|
}),
|
|
2586
2751
|
/* @__PURE__ */ jsx14(DocsArticle, {
|
|
2587
|
-
docs,
|
|
2588
2752
|
messages: resolvedMessages,
|
|
2589
2753
|
page
|
|
2590
2754
|
})
|
|
@@ -2595,23 +2759,21 @@ var DocsFooter = ({ docs, resolution }) => {
|
|
|
2595
2759
|
const { page, neighbors } = resolution;
|
|
2596
2760
|
const resolvedMessages = docs.getMessages(page.locale);
|
|
2597
2761
|
const editUrl = docs.editUrl(page);
|
|
2598
|
-
return /* @__PURE__ */
|
|
2762
|
+
return /* @__PURE__ */ jsxs11("footer", {
|
|
2599
2763
|
className: "mt-14 border-t pt-8",
|
|
2600
2764
|
children: [
|
|
2601
|
-
/* @__PURE__ */
|
|
2765
|
+
/* @__PURE__ */ jsxs11("div", {
|
|
2602
2766
|
className: "mb-8 flex flex-wrap items-center justify-between gap-4 text-sm",
|
|
2603
2767
|
children: [
|
|
2604
|
-
editUrl ? /* @__PURE__ */
|
|
2768
|
+
editUrl ? /* @__PURE__ */ jsxs11("a", {
|
|
2605
2769
|
className: "text-muted-foreground hover:text-foreground inline-flex items-center gap-1.5",
|
|
2606
2770
|
href: editUrl,
|
|
2607
2771
|
target: "_blank",
|
|
2608
2772
|
rel: "noreferrer",
|
|
2609
2773
|
children: [
|
|
2610
2774
|
resolvedMessages.editPage,
|
|
2611
|
-
/* @__PURE__ */ jsx14(
|
|
2612
|
-
className: "size-3.5"
|
|
2613
|
-
icon: "lucide:external-link",
|
|
2614
|
-
ssr: true
|
|
2775
|
+
/* @__PURE__ */ jsx14(ExternalLink, {
|
|
2776
|
+
className: "size-3.5"
|
|
2615
2777
|
})
|
|
2616
2778
|
]
|
|
2617
2779
|
}) : null,
|
|
@@ -2621,21 +2783,19 @@ var DocsFooter = ({ docs, resolution }) => {
|
|
|
2621
2783
|
})
|
|
2622
2784
|
]
|
|
2623
2785
|
}),
|
|
2624
|
-
/* @__PURE__ */
|
|
2786
|
+
/* @__PURE__ */ jsxs11("nav", {
|
|
2625
2787
|
"aria-label": resolvedMessages.pageNavigation,
|
|
2626
2788
|
className: "grid gap-3 sm:grid-cols-2",
|
|
2627
2789
|
children: [
|
|
2628
|
-
neighbors.previous ? /* @__PURE__ */
|
|
2790
|
+
neighbors.previous ? /* @__PURE__ */ jsxs11("a", {
|
|
2629
2791
|
className: "hover:bg-muted/50 rounded-lg border p-4 transition-colors",
|
|
2630
|
-
|
|
2792
|
+
href: neighbors.previous.path,
|
|
2631
2793
|
children: [
|
|
2632
|
-
/* @__PURE__ */
|
|
2794
|
+
/* @__PURE__ */ jsxs11("span", {
|
|
2633
2795
|
className: "text-muted-foreground flex items-center gap-1 text-xs font-medium uppercase",
|
|
2634
2796
|
children: [
|
|
2635
|
-
/* @__PURE__ */ jsx14(
|
|
2636
|
-
className: "size-3.5"
|
|
2637
|
-
icon: "lucide:arrow-left",
|
|
2638
|
-
ssr: true
|
|
2797
|
+
/* @__PURE__ */ jsx14(ArrowLeft, {
|
|
2798
|
+
className: "size-3.5"
|
|
2639
2799
|
}),
|
|
2640
2800
|
resolvedMessages.previous
|
|
2641
2801
|
]
|
|
@@ -2646,18 +2806,16 @@ var DocsFooter = ({ docs, resolution }) => {
|
|
|
2646
2806
|
})
|
|
2647
2807
|
]
|
|
2648
2808
|
}) : /* @__PURE__ */ jsx14("span", {}),
|
|
2649
|
-
neighbors.next ? /* @__PURE__ */
|
|
2809
|
+
neighbors.next ? /* @__PURE__ */ jsxs11("a", {
|
|
2650
2810
|
className: "hover:bg-muted/50 rounded-lg border p-4 text-right transition-colors",
|
|
2651
|
-
|
|
2811
|
+
href: neighbors.next.path,
|
|
2652
2812
|
children: [
|
|
2653
|
-
/* @__PURE__ */
|
|
2813
|
+
/* @__PURE__ */ jsxs11("span", {
|
|
2654
2814
|
className: "text-muted-foreground flex items-center justify-end gap-1 text-xs font-medium uppercase",
|
|
2655
2815
|
children: [
|
|
2656
2816
|
resolvedMessages.next,
|
|
2657
|
-
/* @__PURE__ */ jsx14(
|
|
2658
|
-
className: "size-3.5"
|
|
2659
|
-
icon: "lucide:arrow-right",
|
|
2660
|
-
ssr: true
|
|
2817
|
+
/* @__PURE__ */ jsx14(ArrowRight, {
|
|
2818
|
+
className: "size-3.5"
|
|
2661
2819
|
})
|
|
2662
2820
|
]
|
|
2663
2821
|
}),
|
|
@@ -2675,7 +2833,7 @@ var DocsFooter = ({ docs, resolution }) => {
|
|
|
2675
2833
|
var DocsPage = ({ children, docs, resolution }) => {
|
|
2676
2834
|
const { page } = resolution;
|
|
2677
2835
|
const resolvedMessages = docs.getMessages(page.locale);
|
|
2678
|
-
const content = children ?? /* @__PURE__ */
|
|
2836
|
+
const content = children ?? /* @__PURE__ */ jsxs11(Fragment3, {
|
|
2679
2837
|
children: [
|
|
2680
2838
|
/* @__PURE__ */ jsx14(DocsHeader, {
|
|
2681
2839
|
docs,
|
|
@@ -2691,14 +2849,14 @@ var DocsPage = ({ children, docs, resolution }) => {
|
|
|
2691
2849
|
})
|
|
2692
2850
|
]
|
|
2693
2851
|
});
|
|
2694
|
-
return /* @__PURE__ */
|
|
2852
|
+
return /* @__PURE__ */ jsxs11(Fragment3, {
|
|
2695
2853
|
children: [
|
|
2696
2854
|
/* @__PURE__ */ jsx14("a", {
|
|
2697
2855
|
className: "bg-background focus:ring-ring fixed top-2 left-2 z-50 -translate-y-20 rounded-md border px-3 py-2 text-sm shadow-sm focus:translate-y-0 focus:ring-2",
|
|
2698
2856
|
href: "#docs-content",
|
|
2699
2857
|
children: resolvedMessages.skipToContent
|
|
2700
2858
|
}),
|
|
2701
|
-
/* @__PURE__ */
|
|
2859
|
+
/* @__PURE__ */ jsxs11("div", {
|
|
2702
2860
|
className: "mx-auto grid w-full max-w-6xl gap-10 xl:grid-cols-[minmax(0,48rem)_14rem]",
|
|
2703
2861
|
children: [
|
|
2704
2862
|
/* @__PURE__ */ jsx14("article", {
|
|
@@ -2724,13 +2882,12 @@ var DocsNotFound = ({
|
|
|
2724
2882
|
locale
|
|
2725
2883
|
}) => {
|
|
2726
2884
|
const resolvedMessages = docs.getMessages(locale);
|
|
2727
|
-
|
|
2885
|
+
const BrandIcon = docs.brand.icon;
|
|
2886
|
+
return /* @__PURE__ */ jsxs11("main", {
|
|
2728
2887
|
className: "mx-auto flex min-h-screen max-w-lg flex-col justify-center px-6 text-center",
|
|
2729
2888
|
children: [
|
|
2730
|
-
/* @__PURE__ */ jsx14(
|
|
2731
|
-
className: "text-primary mx-auto size-10"
|
|
2732
|
-
icon: docs.brand.icon,
|
|
2733
|
-
ssr: true
|
|
2889
|
+
/* @__PURE__ */ jsx14(BrandIcon, {
|
|
2890
|
+
className: "text-primary mx-auto size-10"
|
|
2734
2891
|
}),
|
|
2735
2892
|
/* @__PURE__ */ jsx14("h1", {
|
|
2736
2893
|
className: "mt-6 text-3xl font-bold tracking-tight",
|
|
@@ -2740,29 +2897,29 @@ var DocsNotFound = ({
|
|
|
2740
2897
|
className: "text-muted-foreground mt-3 leading-7",
|
|
2741
2898
|
children: resolvedMessages.notFoundDescription
|
|
2742
2899
|
}),
|
|
2743
|
-
/* @__PURE__ */ jsx14(
|
|
2900
|
+
/* @__PURE__ */ jsx14("a", {
|
|
2744
2901
|
className: "text-primary mt-6 font-semibold underline underline-offset-4",
|
|
2745
|
-
|
|
2902
|
+
href: docs.basePath,
|
|
2746
2903
|
children: resolvedMessages.notFoundAction
|
|
2747
2904
|
})
|
|
2748
2905
|
]
|
|
2749
2906
|
});
|
|
2750
2907
|
};
|
|
2751
2908
|
export {
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
getDocsMessages,
|
|
2755
|
-
createMdxDocsSource,
|
|
2756
|
-
createDocsSource,
|
|
2757
|
-
DocsSection,
|
|
2758
|
-
DocsPageType,
|
|
2759
|
-
DocsPageSchema,
|
|
2760
|
-
DocsPage,
|
|
2761
|
-
DocsNotFound,
|
|
2762
|
-
DocsLayout,
|
|
2763
|
-
DocsHeadingSchema,
|
|
2764
|
-
DocsHeader,
|
|
2765
|
-
DocsFrontmatter,
|
|
2909
|
+
DocsCodeBlockSchema,
|
|
2910
|
+
DocsContent,
|
|
2766
2911
|
DocsFooter,
|
|
2767
|
-
|
|
2912
|
+
DocsFrontmatter,
|
|
2913
|
+
DocsHeader,
|
|
2914
|
+
DocsHeadingSchema,
|
|
2915
|
+
DocsLayout,
|
|
2916
|
+
DocsNotFound,
|
|
2917
|
+
DocsPage,
|
|
2918
|
+
DocsPageSchema,
|
|
2919
|
+
DocsPageType,
|
|
2920
|
+
DocsSection,
|
|
2921
|
+
createDocsSource,
|
|
2922
|
+
getDocsMessages,
|
|
2923
|
+
makeDocs,
|
|
2924
|
+
slugifyDocsHeading
|
|
2768
2925
|
};
|