@krak-stack/registry 0.1.60 → 0.2.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 +15 -0
- package/dist/components/ui/app-brand.js +17 -17
- package/dist/components/ui/code-block.js +6 -6
- package/dist/components/ui/color-picker.d.ts +30 -0
- package/dist/components/ui/color-picker.js +386 -0
- package/dist/components/ui/copy-button.js +4 -4
- package/dist/components/ui/data-table.js +468 -455
- package/dist/components/ui/editing-locale-switcher.js +10 -10
- package/dist/components/ui/effect-form.js +186 -185
- package/dist/components/ui/error-component.js +10 -18
- package/dist/components/ui/file-picker.js +2 -2
- package/dist/components/ui/form.d.ts +131 -335
- package/dist/components/ui/form.js +137 -136
- package/dist/components/ui/google-map.js +38 -6
- package/dist/components/ui/icon-input.js +48 -45
- package/dist/components/ui/krakstack-provider.js +2 -2
- package/dist/components/ui/locale-switcher.js +4 -4
- package/dist/components/ui/pagination.js +2 -2
- package/dist/components/ui/search-menu.js +2 -2
- package/dist/components/ui/sidebar-layout.js +82 -80
- package/dist/components/ui/theme-switcher.js +6 -6
- package/dist/components/ui/virtualized-combobox.js +34 -31
- package/dist/lib/docs.d.ts +2 -2
- package/dist/lib/docs.js +187 -185
- package/dist/lib/docs.server.js +45 -23
- package/dist/lib/documentation-toolkit.d.ts +2 -2
- package/dist/lib/documentation-toolkit.js +45 -23
- package/dist/lib/httpapi-adapter.d.ts +11 -3
- package/dist/lib/httpapi-adapter.js +42 -15
- package/dist/lib/httpapi-cli.d.ts +13 -4
- package/dist/lib/httpapi-cli.js +70 -28
- package/dist/lib/httpapi-toolkit.js +40 -13
- package/dist/lib/query.d.ts +4 -4
- package/dist/lib/query.js +13 -13
- package/dist/lib/seo.js +2 -2
- package/dist/lib/webfetch-toolkit.js +7 -7
- package/dist/oxlint/anti-slop/index.js +2 -2
- package/dist/services/agent/client/index.js +155 -153
- package/dist/services/agent/index.js +3 -3
- package/dist/services/agent/schema.js +5 -5
- package/dist/services/events/browser.js +38 -23
- package/dist/services/events/client/audit-log-table.js +472 -459
- package/dist/services/events/client/tracking-notice.js +9 -4
- package/dist/services/events/index.d.ts +3 -1
- package/dist/services/events/index.js +79 -74
- package/dist/services/events/migrations.js +2 -2
- package/dist/services/events/record.js +2 -2
- package/dist/services/events/schema.d.ts +18 -10
- package/dist/services/events/schema.js +42 -42
- package/dist/services/file-extraction/index.js +4 -4
- package/dist/services/file-extraction/schema.d.ts +3 -1
- package/dist/services/file-extraction/schema.js +2 -2
- package/dist/services/health/api.builder.d.ts +8 -8
- package/dist/services/health/api.group.d.ts +8 -8
- package/dist/services/health/index.d.ts +10 -6
- package/dist/services/health/index.js +17 -13
- package/dist/services/health/schema.d.ts +7 -7
- 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 +3 -3
- 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 +8 -8
- package/dist/services/notification/schema.d.ts +3 -1
- package/dist/services/notification/schema.js +2 -2
- package/dist/services/opentelemetry/api.js +7 -5
- package/dist/services/opentelemetry/browser.js +9 -9
- package/dist/services/opentelemetry/index.js +2 -2
- package/dist/services/opentelemetry/processor.d.ts +3 -1
- package/dist/services/opentelemetry/web-vitals.js +12 -7
- package/dist/services/s3/index.js +2 -2
- package/dist/services/s3/schema.d.ts +3 -1
- package/dist/services/s3/schema.js +2 -2
- package/dist/services/speech/api.js +3 -1
- package/dist/services/speech/index.js +15 -8
- package/dist/services/speech/schema.d.ts +3 -1
- package/dist/services/speech/schema.js +12 -10
- package/dist/services/webhooks/client/delivery-table.d.ts +62 -0
- package/dist/services/webhooks/client/delivery-table.js +4711 -0
- package/dist/services/webhooks/http-client.d.ts +1 -0
- package/dist/services/webhooks/http-client.js +17 -5
- package/dist/services/webhooks/index.d.ts +2 -0
- package/dist/services/webhooks/index.js +249 -114
- package/dist/services/webhooks/migrations.d.ts +3 -0
- package/dist/services/webhooks/migrations.js +21 -2
- package/dist/services/webhooks/receiver.d.ts +45 -0
- package/dist/services/webhooks/schema.d.ts +15 -5
- package/dist/services/webhooks/schema.js +41 -21
- package/dist/services/webhooks/url.d.ts +5 -0
- package/dist/services/webhooks/url.js +18 -2
- package/package.json +10 -1
package/dist/lib/docs.js
CHANGED
|
@@ -6,8 +6,8 @@ import { Cookies as Cookies2 } from "effect/http";
|
|
|
6
6
|
import {
|
|
7
7
|
forwardRef,
|
|
8
8
|
useDeferredValue,
|
|
9
|
-
useEffect as
|
|
10
|
-
useState as
|
|
9
|
+
useEffect as useEffect4,
|
|
10
|
+
useState as useState5
|
|
11
11
|
} from "react";
|
|
12
12
|
|
|
13
13
|
// ../../src/components/ui/app-brand.tsx
|
|
@@ -65,38 +65,38 @@ function AppBrand(brandProps) {
|
|
|
65
65
|
].filter(Boolean).join(" ");
|
|
66
66
|
if (isStaticBrand(brandProps)) {
|
|
67
67
|
const {
|
|
68
|
-
className:
|
|
69
|
-
label:
|
|
70
|
-
subtitle:
|
|
71
|
-
icon:
|
|
72
|
-
imageSrc:
|
|
73
|
-
variant:
|
|
68
|
+
className: _className2,
|
|
69
|
+
label: _label2,
|
|
70
|
+
subtitle: _subtitle2,
|
|
71
|
+
icon: _icon2,
|
|
72
|
+
imageSrc: _imageSrc2,
|
|
73
|
+
variant: _variant2,
|
|
74
74
|
to: _to,
|
|
75
|
-
href:
|
|
76
|
-
...
|
|
75
|
+
href: _href2,
|
|
76
|
+
...props2
|
|
77
77
|
} = brandProps;
|
|
78
78
|
return /* @__PURE__ */ jsx("div", {
|
|
79
79
|
className: brandClassName,
|
|
80
|
-
...
|
|
80
|
+
...props2,
|
|
81
81
|
children: content
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
84
|
if (isAnchorBrand(brandProps)) {
|
|
85
85
|
const {
|
|
86
|
-
className:
|
|
87
|
-
label:
|
|
88
|
-
subtitle:
|
|
89
|
-
icon:
|
|
90
|
-
imageSrc:
|
|
91
|
-
variant:
|
|
86
|
+
className: _className2,
|
|
87
|
+
label: _label2,
|
|
88
|
+
subtitle: _subtitle2,
|
|
89
|
+
icon: _icon2,
|
|
90
|
+
imageSrc: _imageSrc2,
|
|
91
|
+
variant: _variant2,
|
|
92
92
|
to: _to,
|
|
93
93
|
href,
|
|
94
|
-
...
|
|
94
|
+
...props2
|
|
95
95
|
} = brandProps;
|
|
96
96
|
return /* @__PURE__ */ jsx("a", {
|
|
97
97
|
className: brandClassName,
|
|
98
98
|
href,
|
|
99
|
-
...
|
|
99
|
+
...props2,
|
|
100
100
|
children: content
|
|
101
101
|
});
|
|
102
102
|
}
|
|
@@ -224,7 +224,7 @@ function CopyButton({
|
|
|
224
224
|
valueDescription,
|
|
225
225
|
copyVariant = "default",
|
|
226
226
|
locale: localeOverride,
|
|
227
|
-
messages,
|
|
227
|
+
messages: messages2,
|
|
228
228
|
onCopied,
|
|
229
229
|
onCopyError,
|
|
230
230
|
resetDelay = 1500,
|
|
@@ -236,7 +236,7 @@ function CopyButton({
|
|
|
236
236
|
const locale = useKrakstackLocale(localeOverride);
|
|
237
237
|
const [copyState, setCopyState] = useState("idle");
|
|
238
238
|
const copyTimeout = useRef(undefined);
|
|
239
|
-
const labels = copyButtonMessages(locale,
|
|
239
|
+
const labels = copyButtonMessages(locale, messages2);
|
|
240
240
|
const accessibleLabel = ariaLabel ?? (valueDescription ? `${labels.copy} ${valueDescription}` : labels.copy);
|
|
241
241
|
const isLarge = copyVariant === "large";
|
|
242
242
|
const defaultSize = copyVariant === "sm" ? "icon-xs" : isLarge ? "sm" : "icon-sm";
|
|
@@ -338,12 +338,12 @@ function CodeBlock({
|
|
|
338
338
|
code,
|
|
339
339
|
language = "text",
|
|
340
340
|
locale: localeOverride,
|
|
341
|
-
messages
|
|
341
|
+
messages: messages3
|
|
342
342
|
}) {
|
|
343
343
|
const locale = useKrakstackLocale2(localeOverride);
|
|
344
344
|
const normalizedLanguage = language.toLowerCase() || "text";
|
|
345
345
|
const highlighted = highlight(code, { lang: normalizedLanguage });
|
|
346
|
-
const labels = codeBlockMessages(locale,
|
|
346
|
+
const labels = codeBlockMessages(locale, messages3);
|
|
347
347
|
return /* @__PURE__ */ jsxs3("div", {
|
|
348
348
|
className: "not-prose bg-muted overflow-hidden rounded-md border text-[var(--th-token)]",
|
|
349
349
|
"data-code-theme": true,
|
|
@@ -382,7 +382,7 @@ var MarkdownContent = ({
|
|
|
382
382
|
codeBlocks,
|
|
383
383
|
html,
|
|
384
384
|
locale,
|
|
385
|
-
messages
|
|
385
|
+
messages: messages3
|
|
386
386
|
}) => {
|
|
387
387
|
const content = [];
|
|
388
388
|
let remainingHtml = html;
|
|
@@ -401,7 +401,7 @@ var MarkdownContent = ({
|
|
|
401
401
|
code: block.code,
|
|
402
402
|
language: block.language,
|
|
403
403
|
locale,
|
|
404
|
-
messages
|
|
404
|
+
messages: messages3
|
|
405
405
|
})
|
|
406
406
|
}, `code-${index}`));
|
|
407
407
|
remainingHtml = remainingHtml.slice(markerIndex + marker.length);
|
|
@@ -675,7 +675,7 @@ function SearchMenu({
|
|
|
675
675
|
placeholder,
|
|
676
676
|
inputPlaceholder,
|
|
677
677
|
emptyMessage,
|
|
678
|
-
messages,
|
|
678
|
+
messages: messages4,
|
|
679
679
|
shortcutLabel = "⌘K",
|
|
680
680
|
className,
|
|
681
681
|
open,
|
|
@@ -686,7 +686,7 @@ function SearchMenu({
|
|
|
686
686
|
shouldFilter
|
|
687
687
|
}) {
|
|
688
688
|
const locale = useKrakstackLocale3(localeOverride);
|
|
689
|
-
const labels = searchMenuMessages(locale,
|
|
689
|
+
const labels = searchMenuMessages(locale, messages4);
|
|
690
690
|
const resolvedTitle = title ?? labels.title;
|
|
691
691
|
const resolvedDescription = description ?? labels.description;
|
|
692
692
|
const resolvedPlaceholder = placeholder ?? labels.placeholder;
|
|
@@ -802,7 +802,7 @@ function SearchMenu({
|
|
|
802
802
|
import { Link as Link2, Outlet } from "@tanstack/react-router";
|
|
803
803
|
import { Option, Schema as Schema2 } from "effect";
|
|
804
804
|
import { Cookies } from "effect/http";
|
|
805
|
-
import { useState as
|
|
805
|
+
import { useState as useState4 } from "react";
|
|
806
806
|
|
|
807
807
|
// ../../src/components/ui/sidebar.tsx
|
|
808
808
|
import * as React2 from "react";
|
|
@@ -813,45 +813,44 @@ import { cva as cva3 } from "class-variance-authority";
|
|
|
813
813
|
// ../../src/hooks/use-mobile.ts
|
|
814
814
|
import * as React from "react";
|
|
815
815
|
var MOBILE_BREAKPOINT = 768;
|
|
816
|
+
var subscribe = (onChange) => {
|
|
817
|
+
const query = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
818
|
+
query.addEventListener("change", onChange);
|
|
819
|
+
return () => query.removeEventListener("change", onChange);
|
|
820
|
+
};
|
|
821
|
+
var getSnapshot = () => window.innerWidth < MOBILE_BREAKPOINT;
|
|
822
|
+
var getServerSnapshot = () => false;
|
|
816
823
|
function useIsMobile() {
|
|
817
|
-
|
|
818
|
-
React.useEffect(() => {
|
|
819
|
-
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
820
|
-
const onChange = () => {
|
|
821
|
-
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
822
|
-
};
|
|
823
|
-
mql.addEventListener("change", onChange);
|
|
824
|
-
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
825
|
-
return () => mql.removeEventListener("change", onChange);
|
|
826
|
-
}, []);
|
|
827
|
-
return !!isMobile;
|
|
824
|
+
return React.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
|
828
825
|
}
|
|
829
826
|
|
|
830
827
|
// ../../src/components/ui/input.tsx
|
|
831
828
|
import { Input as InputPrimitive } from "@base-ui/react/input";
|
|
829
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
832
830
|
|
|
833
831
|
// ../../src/components/ui/separator.tsx
|
|
834
832
|
import { Separator as SeparatorPrimitive } from "@base-ui/react/separator";
|
|
833
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
835
834
|
|
|
836
835
|
// ../../src/components/ui/sheet.tsx
|
|
837
836
|
import { Dialog as SheetPrimitive } from "@base-ui/react/dialog";
|
|
838
837
|
import { XIcon as XIcon2 } from "lucide-react";
|
|
839
|
-
import { jsx as
|
|
838
|
+
import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
840
839
|
"use client";
|
|
841
840
|
function Sheet({ ...props }) {
|
|
842
|
-
return /* @__PURE__ */
|
|
841
|
+
return /* @__PURE__ */ jsx12(SheetPrimitive.Root, {
|
|
843
842
|
"data-slot": "sheet",
|
|
844
843
|
...props
|
|
845
844
|
});
|
|
846
845
|
}
|
|
847
846
|
function SheetPortal({ ...props }) {
|
|
848
|
-
return /* @__PURE__ */
|
|
847
|
+
return /* @__PURE__ */ jsx12(SheetPrimitive.Portal, {
|
|
849
848
|
"data-slot": "sheet-portal",
|
|
850
849
|
...props
|
|
851
850
|
});
|
|
852
851
|
}
|
|
853
852
|
function SheetOverlay({ className, ...props }) {
|
|
854
|
-
return /* @__PURE__ */
|
|
853
|
+
return /* @__PURE__ */ jsx12(SheetPrimitive.Backdrop, {
|
|
855
854
|
"data-slot": "sheet-overlay",
|
|
856
855
|
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),
|
|
857
856
|
...props
|
|
@@ -866,7 +865,7 @@ function SheetContent({
|
|
|
866
865
|
}) {
|
|
867
866
|
return /* @__PURE__ */ jsxs7(SheetPortal, {
|
|
868
867
|
children: [
|
|
869
|
-
/* @__PURE__ */
|
|
868
|
+
/* @__PURE__ */ jsx12(SheetOverlay, {}),
|
|
870
869
|
/* @__PURE__ */ jsxs7(SheetPrimitive.Popup, {
|
|
871
870
|
"data-slot": "sheet-content",
|
|
872
871
|
"data-side": side,
|
|
@@ -876,14 +875,14 @@ function SheetContent({
|
|
|
876
875
|
children,
|
|
877
876
|
showCloseButton && /* @__PURE__ */ jsxs7(SheetPrimitive.Close, {
|
|
878
877
|
"data-slot": "sheet-close",
|
|
879
|
-
render: /* @__PURE__ */
|
|
878
|
+
render: /* @__PURE__ */ jsx12(Button, {
|
|
880
879
|
variant: "ghost",
|
|
881
880
|
className: "absolute top-4 right-4",
|
|
882
881
|
size: "icon-sm"
|
|
883
882
|
}),
|
|
884
883
|
children: [
|
|
885
|
-
/* @__PURE__ */
|
|
886
|
-
/* @__PURE__ */
|
|
884
|
+
/* @__PURE__ */ jsx12(XIcon2, {}),
|
|
885
|
+
/* @__PURE__ */ jsx12("span", {
|
|
887
886
|
className: "sr-only",
|
|
888
887
|
children: "Close"
|
|
889
888
|
})
|
|
@@ -895,14 +894,14 @@ function SheetContent({
|
|
|
895
894
|
});
|
|
896
895
|
}
|
|
897
896
|
function SheetHeader({ className, ...props }) {
|
|
898
|
-
return /* @__PURE__ */
|
|
897
|
+
return /* @__PURE__ */ jsx12("div", {
|
|
899
898
|
"data-slot": "sheet-header",
|
|
900
899
|
className: cn("flex flex-col gap-1.5 p-4", className),
|
|
901
900
|
...props
|
|
902
901
|
});
|
|
903
902
|
}
|
|
904
903
|
function SheetTitle({ className, ...props }) {
|
|
905
|
-
return /* @__PURE__ */
|
|
904
|
+
return /* @__PURE__ */ jsx12(SheetPrimitive.Title, {
|
|
906
905
|
"data-slot": "sheet-title",
|
|
907
906
|
className: cn("font-medium text-foreground", className),
|
|
908
907
|
...props
|
|
@@ -912,25 +911,28 @@ function SheetDescription({
|
|
|
912
911
|
className,
|
|
913
912
|
...props
|
|
914
913
|
}) {
|
|
915
|
-
return /* @__PURE__ */
|
|
914
|
+
return /* @__PURE__ */ jsx12(SheetPrimitive.Description, {
|
|
916
915
|
"data-slot": "sheet-description",
|
|
917
916
|
className: cn("text-sm text-muted-foreground", className),
|
|
918
917
|
...props
|
|
919
918
|
});
|
|
920
919
|
}
|
|
921
920
|
|
|
921
|
+
// ../../src/components/ui/skeleton.tsx
|
|
922
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
923
|
+
|
|
922
924
|
// ../../src/components/ui/tooltip.tsx
|
|
923
925
|
import { Tooltip as TooltipPrimitive } from "@base-ui/react/tooltip";
|
|
924
|
-
import { jsx as
|
|
926
|
+
import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
925
927
|
"use client";
|
|
926
928
|
function Tooltip({ ...props }) {
|
|
927
|
-
return /* @__PURE__ */
|
|
929
|
+
return /* @__PURE__ */ jsx14(TooltipPrimitive.Root, {
|
|
928
930
|
"data-slot": "tooltip",
|
|
929
931
|
...props
|
|
930
932
|
});
|
|
931
933
|
}
|
|
932
934
|
function TooltipTrigger({ ...props }) {
|
|
933
|
-
return /* @__PURE__ */
|
|
935
|
+
return /* @__PURE__ */ jsx14(TooltipPrimitive.Trigger, {
|
|
934
936
|
"data-slot": "tooltip-trigger",
|
|
935
937
|
...props
|
|
936
938
|
});
|
|
@@ -944,8 +946,8 @@ function TooltipContent({
|
|
|
944
946
|
children,
|
|
945
947
|
...props
|
|
946
948
|
}) {
|
|
947
|
-
return /* @__PURE__ */
|
|
948
|
-
children: /* @__PURE__ */
|
|
949
|
+
return /* @__PURE__ */ jsx14(TooltipPrimitive.Portal, {
|
|
950
|
+
children: /* @__PURE__ */ jsx14(TooltipPrimitive.Positioner, {
|
|
949
951
|
align,
|
|
950
952
|
alignOffset,
|
|
951
953
|
side,
|
|
@@ -957,7 +959,7 @@ function TooltipContent({
|
|
|
957
959
|
...props,
|
|
958
960
|
children: [
|
|
959
961
|
children,
|
|
960
|
-
/* @__PURE__ */
|
|
962
|
+
/* @__PURE__ */ jsx14(TooltipPrimitive.Arrow, {
|
|
961
963
|
className: "bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"
|
|
962
964
|
})
|
|
963
965
|
]
|
|
@@ -969,7 +971,7 @@ function TooltipContent({
|
|
|
969
971
|
// ../../src/components/ui/sidebar.tsx
|
|
970
972
|
import { PanelLeftIcon } from "lucide-react";
|
|
971
973
|
import { Schema } from "effect";
|
|
972
|
-
import { jsx as
|
|
974
|
+
import { jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
973
975
|
var SIDEBAR_COOKIE_NAME = "sidebar_state";
|
|
974
976
|
var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
|
|
975
977
|
var SIDEBAR_WIDTH = "16rem";
|
|
@@ -1006,7 +1008,7 @@ function SidebarProvider({
|
|
|
1006
1008
|
document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
|
|
1007
1009
|
}, [setOpenProp]);
|
|
1008
1010
|
const toggleSidebar = React2.useCallback(() => {
|
|
1009
|
-
return isMobile ? setOpenMobile((
|
|
1011
|
+
return isMobile ? setOpenMobile((open2) => !open2) : setOpen(!open);
|
|
1010
1012
|
}, [isMobile, open, setOpen, setOpenMobile]);
|
|
1011
1013
|
React2.useEffect(() => {
|
|
1012
1014
|
const handleKeyDown = (event) => {
|
|
@@ -1033,9 +1035,9 @@ function SidebarProvider({
|
|
|
1033
1035
|
"--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
|
|
1034
1036
|
...style
|
|
1035
1037
|
};
|
|
1036
|
-
return /* @__PURE__ */
|
|
1038
|
+
return /* @__PURE__ */ jsx15(SidebarContext.Provider, {
|
|
1037
1039
|
value: contextValue,
|
|
1038
|
-
children: /* @__PURE__ */
|
|
1040
|
+
children: /* @__PURE__ */ jsx15("div", {
|
|
1039
1041
|
"data-slot": "sidebar-wrapper",
|
|
1040
1042
|
style: wrapperStyle,
|
|
1041
1043
|
className: cn("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar", className),
|
|
@@ -1055,7 +1057,7 @@ function Sidebar({
|
|
|
1055
1057
|
}) {
|
|
1056
1058
|
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
1057
1059
|
if (collapsible === "none") {
|
|
1058
|
-
return /* @__PURE__ */
|
|
1060
|
+
return /* @__PURE__ */ jsx15("div", {
|
|
1059
1061
|
"data-slot": "sidebar",
|
|
1060
1062
|
className: cn("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground", className),
|
|
1061
1063
|
...props,
|
|
@@ -1066,7 +1068,7 @@ function Sidebar({
|
|
|
1066
1068
|
const mobileStyle = {
|
|
1067
1069
|
"--sidebar-width": SIDEBAR_WIDTH_MOBILE
|
|
1068
1070
|
};
|
|
1069
|
-
return /* @__PURE__ */
|
|
1071
|
+
return /* @__PURE__ */ jsx15(Sheet, {
|
|
1070
1072
|
open: openMobile,
|
|
1071
1073
|
onOpenChange: setOpenMobile,
|
|
1072
1074
|
...props,
|
|
@@ -1082,15 +1084,15 @@ function Sidebar({
|
|
|
1082
1084
|
/* @__PURE__ */ jsxs9(SheetHeader, {
|
|
1083
1085
|
className: "sr-only",
|
|
1084
1086
|
children: [
|
|
1085
|
-
/* @__PURE__ */
|
|
1087
|
+
/* @__PURE__ */ jsx15(SheetTitle, {
|
|
1086
1088
|
children: "Sidebar"
|
|
1087
1089
|
}),
|
|
1088
|
-
/* @__PURE__ */
|
|
1090
|
+
/* @__PURE__ */ jsx15(SheetDescription, {
|
|
1089
1091
|
children: "Displays the mobile sidebar."
|
|
1090
1092
|
})
|
|
1091
1093
|
]
|
|
1092
1094
|
}),
|
|
1093
|
-
/* @__PURE__ */
|
|
1095
|
+
/* @__PURE__ */ jsx15("div", {
|
|
1094
1096
|
className: "flex h-full w-full flex-col",
|
|
1095
1097
|
children
|
|
1096
1098
|
})
|
|
@@ -1106,16 +1108,16 @@ function Sidebar({
|
|
|
1106
1108
|
"data-side": side,
|
|
1107
1109
|
"data-slot": "sidebar",
|
|
1108
1110
|
children: [
|
|
1109
|
-
/* @__PURE__ */
|
|
1111
|
+
/* @__PURE__ */ jsx15("div", {
|
|
1110
1112
|
"data-slot": "sidebar-gap",
|
|
1111
1113
|
className: cn("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear", "group-data-[collapsible=offcanvas]:w-0", "group-data-[side=right]:rotate-180", variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)")
|
|
1112
1114
|
}),
|
|
1113
|
-
/* @__PURE__ */
|
|
1115
|
+
/* @__PURE__ */ jsx15("div", {
|
|
1114
1116
|
"data-slot": "sidebar-container",
|
|
1115
1117
|
"data-side": side,
|
|
1116
1118
|
className: cn("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex", variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l", className),
|
|
1117
1119
|
...props,
|
|
1118
|
-
children: /* @__PURE__ */
|
|
1120
|
+
children: /* @__PURE__ */ jsx15("div", {
|
|
1119
1121
|
"data-sidebar": "sidebar",
|
|
1120
1122
|
"data-slot": "sidebar-inner",
|
|
1121
1123
|
className: "bg-sidebar group-data-[variant=floating]:ring-sidebar-border flex size-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1",
|
|
@@ -1143,8 +1145,8 @@ function SidebarTrigger({
|
|
|
1143
1145
|
},
|
|
1144
1146
|
...props,
|
|
1145
1147
|
children: [
|
|
1146
|
-
/* @__PURE__ */
|
|
1147
|
-
/* @__PURE__ */
|
|
1148
|
+
/* @__PURE__ */ jsx15(PanelLeftIcon, {}),
|
|
1149
|
+
/* @__PURE__ */ jsx15("span", {
|
|
1148
1150
|
className: "sr-only",
|
|
1149
1151
|
children: "Toggle Sidebar"
|
|
1150
1152
|
})
|
|
@@ -1153,7 +1155,7 @@ function SidebarTrigger({
|
|
|
1153
1155
|
}
|
|
1154
1156
|
function SidebarRail({ className, ...props }) {
|
|
1155
1157
|
const { toggleSidebar } = useSidebar();
|
|
1156
|
-
return /* @__PURE__ */
|
|
1158
|
+
return /* @__PURE__ */ jsx15("button", {
|
|
1157
1159
|
"data-sidebar": "rail",
|
|
1158
1160
|
"data-slot": "sidebar-rail",
|
|
1159
1161
|
"aria-label": "Toggle Sidebar",
|
|
@@ -1165,14 +1167,14 @@ function SidebarRail({ className, ...props }) {
|
|
|
1165
1167
|
});
|
|
1166
1168
|
}
|
|
1167
1169
|
function SidebarInset({ className, ...props }) {
|
|
1168
|
-
return /* @__PURE__ */
|
|
1170
|
+
return /* @__PURE__ */ jsx15("main", {
|
|
1169
1171
|
"data-slot": "sidebar-inset",
|
|
1170
1172
|
className: cn("relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2", className),
|
|
1171
1173
|
...props
|
|
1172
1174
|
});
|
|
1173
1175
|
}
|
|
1174
1176
|
function SidebarHeader({ className, ...props }) {
|
|
1175
|
-
return /* @__PURE__ */
|
|
1177
|
+
return /* @__PURE__ */ jsx15("div", {
|
|
1176
1178
|
"data-slot": "sidebar-header",
|
|
1177
1179
|
"data-sidebar": "header",
|
|
1178
1180
|
className: cn("flex flex-col gap-2 p-2", className),
|
|
@@ -1180,7 +1182,7 @@ function SidebarHeader({ className, ...props }) {
|
|
|
1180
1182
|
});
|
|
1181
1183
|
}
|
|
1182
1184
|
function SidebarFooter({ className, ...props }) {
|
|
1183
|
-
return /* @__PURE__ */
|
|
1185
|
+
return /* @__PURE__ */ jsx15("div", {
|
|
1184
1186
|
"data-slot": "sidebar-footer",
|
|
1185
1187
|
"data-sidebar": "footer",
|
|
1186
1188
|
className: cn("flex flex-col gap-2 p-2", className),
|
|
@@ -1188,7 +1190,7 @@ function SidebarFooter({ className, ...props }) {
|
|
|
1188
1190
|
});
|
|
1189
1191
|
}
|
|
1190
1192
|
function SidebarContent({ className, ...props }) {
|
|
1191
|
-
return /* @__PURE__ */
|
|
1193
|
+
return /* @__PURE__ */ jsx15("div", {
|
|
1192
1194
|
"data-slot": "sidebar-content",
|
|
1193
1195
|
"data-sidebar": "content",
|
|
1194
1196
|
className: cn("no-scrollbar flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden", className),
|
|
@@ -1196,7 +1198,7 @@ function SidebarContent({ className, ...props }) {
|
|
|
1196
1198
|
});
|
|
1197
1199
|
}
|
|
1198
1200
|
function SidebarGroup({ className, ...props }) {
|
|
1199
|
-
return /* @__PURE__ */
|
|
1201
|
+
return /* @__PURE__ */ jsx15("div", {
|
|
1200
1202
|
"data-slot": "sidebar-group",
|
|
1201
1203
|
"data-sidebar": "group",
|
|
1202
1204
|
className: cn("relative flex w-full min-w-0 flex-col p-2", className),
|
|
@@ -1224,7 +1226,7 @@ function SidebarGroupContent({
|
|
|
1224
1226
|
className,
|
|
1225
1227
|
...props
|
|
1226
1228
|
}) {
|
|
1227
|
-
return /* @__PURE__ */
|
|
1229
|
+
return /* @__PURE__ */ jsx15("div", {
|
|
1228
1230
|
"data-slot": "sidebar-group-content",
|
|
1229
1231
|
"data-sidebar": "group-content",
|
|
1230
1232
|
className: cn("w-full text-sm", className),
|
|
@@ -1232,7 +1234,7 @@ function SidebarGroupContent({
|
|
|
1232
1234
|
});
|
|
1233
1235
|
}
|
|
1234
1236
|
function SidebarMenu({ className, ...props }) {
|
|
1235
|
-
return /* @__PURE__ */
|
|
1237
|
+
return /* @__PURE__ */ jsx15("ul", {
|
|
1236
1238
|
"data-slot": "sidebar-menu",
|
|
1237
1239
|
"data-sidebar": "menu",
|
|
1238
1240
|
className: cn("flex w-full min-w-0 flex-col gap-1", className),
|
|
@@ -1240,7 +1242,7 @@ function SidebarMenu({ className, ...props }) {
|
|
|
1240
1242
|
});
|
|
1241
1243
|
}
|
|
1242
1244
|
function SidebarMenuItem({ className, ...props }) {
|
|
1243
|
-
return /* @__PURE__ */
|
|
1245
|
+
return /* @__PURE__ */ jsx15("li", {
|
|
1244
1246
|
"data-slot": "sidebar-menu-item",
|
|
1245
1247
|
"data-sidebar": "menu-item",
|
|
1246
1248
|
className: cn("group/menu-item relative", className),
|
|
@@ -1279,7 +1281,7 @@ function SidebarMenuButton({
|
|
|
1279
1281
|
props: mergeProps2({
|
|
1280
1282
|
className: cn(sidebarMenuButtonVariants({ variant, size }), className)
|
|
1281
1283
|
}, props),
|
|
1282
|
-
render: !tooltip ? render : /* @__PURE__ */
|
|
1284
|
+
render: !tooltip ? render : /* @__PURE__ */ jsx15(TooltipTrigger, {
|
|
1283
1285
|
render
|
|
1284
1286
|
}),
|
|
1285
1287
|
state: {
|
|
@@ -1296,7 +1298,7 @@ function SidebarMenuButton({
|
|
|
1296
1298
|
return /* @__PURE__ */ jsxs9(Tooltip, {
|
|
1297
1299
|
children: [
|
|
1298
1300
|
comp,
|
|
1299
|
-
/* @__PURE__ */
|
|
1301
|
+
/* @__PURE__ */ jsx15(TooltipContent, {
|
|
1300
1302
|
side: "right",
|
|
1301
1303
|
align: "center",
|
|
1302
1304
|
hidden: state !== "collapsed" || isMobile,
|
|
@@ -1307,7 +1309,7 @@ function SidebarMenuButton({
|
|
|
1307
1309
|
}
|
|
1308
1310
|
|
|
1309
1311
|
// ../../src/components/ui/sidebar-layout.tsx
|
|
1310
|
-
import { jsx as
|
|
1312
|
+
import { jsx as jsx16, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1311
1313
|
var SIDEBAR_COOKIE_NAME2 = "sidebar_state";
|
|
1312
1314
|
var SidebarOpenCookie = Schema2.Literals(["true", "false"]).annotate({
|
|
1313
1315
|
identifier: "SidebarOpenCookie"
|
|
@@ -1324,24 +1326,24 @@ function AppSidebar({ collapsible, footer, groups, header }) {
|
|
|
1324
1326
|
return /* @__PURE__ */ jsxs10(Sidebar, {
|
|
1325
1327
|
collapsible,
|
|
1326
1328
|
children: [
|
|
1327
|
-
header && /* @__PURE__ */
|
|
1329
|
+
header && /* @__PURE__ */ jsx16(SidebarHeader, {
|
|
1328
1330
|
children: header
|
|
1329
1331
|
}),
|
|
1330
|
-
/* @__PURE__ */
|
|
1332
|
+
/* @__PURE__ */ jsx16(SidebarContent, {
|
|
1331
1333
|
className: "group-data-[collapsible=icon]:overflow-x-hidden group-data-[collapsible=icon]:overflow-y-auto",
|
|
1332
1334
|
children: groups.map((group) => /* @__PURE__ */ jsxs10(SidebarGroup, {
|
|
1333
1335
|
children: [
|
|
1334
|
-
/* @__PURE__ */
|
|
1336
|
+
/* @__PURE__ */ jsx16(SidebarGroupLabel, {
|
|
1335
1337
|
children: group.label()
|
|
1336
1338
|
}),
|
|
1337
|
-
/* @__PURE__ */
|
|
1338
|
-
children: /* @__PURE__ */
|
|
1339
|
+
/* @__PURE__ */ jsx16(SidebarGroupContent, {
|
|
1340
|
+
children: /* @__PURE__ */ jsx16(SidebarMenu, {
|
|
1339
1341
|
children: group.items.map((item) => {
|
|
1340
|
-
const render = item.external ? /* @__PURE__ */
|
|
1342
|
+
const render = item.external ? /* @__PURE__ */ jsx16("a", {
|
|
1341
1343
|
href: item.href,
|
|
1342
1344
|
target: "_blank",
|
|
1343
1345
|
rel: "noreferrer"
|
|
1344
|
-
}) : /* @__PURE__ */
|
|
1346
|
+
}) : /* @__PURE__ */ jsx16(Link2, {
|
|
1345
1347
|
to: item.href,
|
|
1346
1348
|
activeOptions: {
|
|
1347
1349
|
exact: item.exact ?? false,
|
|
@@ -1349,17 +1351,17 @@ function AppSidebar({ collapsible, footer, groups, header }) {
|
|
|
1349
1351
|
},
|
|
1350
1352
|
activeProps: { "data-active": "" }
|
|
1351
1353
|
});
|
|
1352
|
-
return /* @__PURE__ */
|
|
1354
|
+
return /* @__PURE__ */ jsx16(SidebarMenuItem, {
|
|
1353
1355
|
children: /* @__PURE__ */ jsxs10(SidebarMenuButton, {
|
|
1354
1356
|
onClick: closeMobileSidebar,
|
|
1355
1357
|
render,
|
|
1356
1358
|
tooltip: item.label(),
|
|
1357
1359
|
children: [
|
|
1358
|
-
item.icon ? /* @__PURE__ */
|
|
1359
|
-
/* @__PURE__ */
|
|
1360
|
+
item.icon ? /* @__PURE__ */ jsx16(item.icon, {}) : null,
|
|
1361
|
+
/* @__PURE__ */ jsx16("span", {
|
|
1360
1362
|
children: item.label()
|
|
1361
1363
|
}),
|
|
1362
|
-
item.badge ? /* @__PURE__ */
|
|
1364
|
+
item.badge ? /* @__PURE__ */ jsx16(Badge, {
|
|
1363
1365
|
className: "ml-auto",
|
|
1364
1366
|
variant: "secondary",
|
|
1365
1367
|
children: item.badge()
|
|
@@ -1373,10 +1375,10 @@ function AppSidebar({ collapsible, footer, groups, header }) {
|
|
|
1373
1375
|
]
|
|
1374
1376
|
}, group.label()))
|
|
1375
1377
|
}),
|
|
1376
|
-
footer ? /* @__PURE__ */
|
|
1378
|
+
footer ? /* @__PURE__ */ jsx16(SidebarFooter, {
|
|
1377
1379
|
children: footer
|
|
1378
1380
|
}) : null,
|
|
1379
|
-
/* @__PURE__ */
|
|
1381
|
+
/* @__PURE__ */ jsx16(SidebarRail, {})
|
|
1380
1382
|
]
|
|
1381
1383
|
});
|
|
1382
1384
|
}
|
|
@@ -1391,13 +1393,13 @@ function SidebarLayout({
|
|
|
1391
1393
|
sidebarCollapsible = "icon",
|
|
1392
1394
|
defaultOpen = true
|
|
1393
1395
|
}) {
|
|
1394
|
-
const [sidebarOpen, setSidebarOpen] =
|
|
1396
|
+
const [sidebarOpen, setSidebarOpen] = useState4(() => getSidebarDefaultOpen(defaultOpen));
|
|
1395
1397
|
return /* @__PURE__ */ jsxs10(SidebarProvider, {
|
|
1396
1398
|
open: sidebarOpen,
|
|
1397
1399
|
onOpenChange: setSidebarOpen,
|
|
1398
1400
|
className: cn(fullPage && "xl:h-svh xl:min-h-0 xl:overflow-hidden"),
|
|
1399
1401
|
children: [
|
|
1400
|
-
/* @__PURE__ */
|
|
1402
|
+
/* @__PURE__ */ jsx16(AppSidebar, {
|
|
1401
1403
|
collapsible: sidebarCollapsible,
|
|
1402
1404
|
footer: sidebarFooter,
|
|
1403
1405
|
groups,
|
|
@@ -1409,16 +1411,16 @@ function SidebarLayout({
|
|
|
1409
1411
|
/* @__PURE__ */ jsxs10("header", {
|
|
1410
1412
|
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",
|
|
1411
1413
|
children: [
|
|
1412
|
-
/* @__PURE__ */
|
|
1413
|
-
/* @__PURE__ */
|
|
1414
|
+
/* @__PURE__ */ jsx16(SidebarTrigger, {}),
|
|
1415
|
+
/* @__PURE__ */ jsx16("div", {
|
|
1414
1416
|
className: "ml-auto flex items-center gap-2",
|
|
1415
1417
|
children: headerActions
|
|
1416
1418
|
})
|
|
1417
1419
|
]
|
|
1418
1420
|
}),
|
|
1419
|
-
/* @__PURE__ */
|
|
1421
|
+
/* @__PURE__ */ jsx16("div", {
|
|
1420
1422
|
className: cn("isolate", contentClassName ?? "flex flex-col gap-6 px-5 py-6 md:px-8"),
|
|
1421
|
-
children: children ?? /* @__PURE__ */
|
|
1423
|
+
children: children ?? /* @__PURE__ */ jsx16(Outlet, {})
|
|
1422
1424
|
})
|
|
1423
1425
|
]
|
|
1424
1426
|
})
|
|
@@ -1540,7 +1542,7 @@ var createSeo = (defaults) => (options) => seo({
|
|
|
1540
1542
|
});
|
|
1541
1543
|
|
|
1542
1544
|
// ../../src/lib/docs.tsx
|
|
1543
|
-
import { jsx as
|
|
1545
|
+
import { jsx as jsx17, jsxs as jsxs11, Fragment as Fragment3 } from "react/jsx-runtime";
|
|
1544
1546
|
var SIDEBAR_COOKIE_NAME3 = "sidebar_state";
|
|
1545
1547
|
var SidebarOpenCookie2 = Schema3.Literals(["true", "false"]).annotate({
|
|
1546
1548
|
identifier: "SidebarOpenCookie"
|
|
@@ -1548,7 +1550,7 @@ var SidebarOpenCookie2 = Schema3.Literals(["true", "false"]).annotate({
|
|
|
1548
1550
|
var getSidebarOpenCookie = createIsomorphicFn().server(() => getCookie(SIDEBAR_COOKIE_NAME3)).client(() => Cookies2.parseHeader(globalThis.document?.cookie ?? "")[SIDEBAR_COOKIE_NAME3]);
|
|
1549
1551
|
var getSidebarDefaultOpen2 = () => Schema3.decodeUnknownOption(SidebarOpenCookie2)(getSidebarOpenCookie()).pipe(Option2.map((value) => value === "true"), Option2.getOrElse(() => true));
|
|
1550
1552
|
var makeIcon = (name, paths) => {
|
|
1551
|
-
const Icon = forwardRef(({ absoluteStrokeWidth: _absoluteStrokeWidth, size = 24, ...props }, ref) => /* @__PURE__ */
|
|
1553
|
+
const Icon = forwardRef(({ absoluteStrokeWidth: _absoluteStrokeWidth, size = 24, ...props }, ref) => /* @__PURE__ */ jsx17("svg", {
|
|
1552
1554
|
"aria-hidden": "true",
|
|
1553
1555
|
fill: "none",
|
|
1554
1556
|
height: size,
|
|
@@ -1567,46 +1569,46 @@ var makeIcon = (name, paths) => {
|
|
|
1567
1569
|
};
|
|
1568
1570
|
var ArrowLeft = makeIcon("ArrowLeft", /* @__PURE__ */ jsxs11(Fragment3, {
|
|
1569
1571
|
children: [
|
|
1570
|
-
/* @__PURE__ */
|
|
1572
|
+
/* @__PURE__ */ jsx17("path", {
|
|
1571
1573
|
d: "m12 19-7-7 7-7"
|
|
1572
1574
|
}),
|
|
1573
|
-
/* @__PURE__ */
|
|
1575
|
+
/* @__PURE__ */ jsx17("path", {
|
|
1574
1576
|
d: "M19 12H5"
|
|
1575
1577
|
})
|
|
1576
1578
|
]
|
|
1577
1579
|
}));
|
|
1578
1580
|
var ArrowRight = makeIcon("ArrowRight", /* @__PURE__ */ jsxs11(Fragment3, {
|
|
1579
1581
|
children: [
|
|
1580
|
-
/* @__PURE__ */
|
|
1582
|
+
/* @__PURE__ */ jsx17("path", {
|
|
1581
1583
|
d: "M5 12h14"
|
|
1582
1584
|
}),
|
|
1583
|
-
/* @__PURE__ */
|
|
1585
|
+
/* @__PURE__ */ jsx17("path", {
|
|
1584
1586
|
d: "m12 5 7 7-7 7"
|
|
1585
1587
|
})
|
|
1586
1588
|
]
|
|
1587
1589
|
}));
|
|
1588
1590
|
var BookOpen = makeIcon("BookOpen", /* @__PURE__ */ jsxs11(Fragment3, {
|
|
1589
1591
|
children: [
|
|
1590
|
-
/* @__PURE__ */
|
|
1592
|
+
/* @__PURE__ */ jsx17("path", {
|
|
1591
1593
|
d: "M12 7v14"
|
|
1592
1594
|
}),
|
|
1593
|
-
/* @__PURE__ */
|
|
1595
|
+
/* @__PURE__ */ jsx17("path", {
|
|
1594
1596
|
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"
|
|
1595
1597
|
})
|
|
1596
1598
|
]
|
|
1597
1599
|
}));
|
|
1598
|
-
var ChevronDown = makeIcon("ChevronDown", /* @__PURE__ */
|
|
1600
|
+
var ChevronDown = makeIcon("ChevronDown", /* @__PURE__ */ jsx17("path", {
|
|
1599
1601
|
d: "m6 9 6 6 6-6"
|
|
1600
1602
|
}));
|
|
1601
1603
|
var ExternalLink = makeIcon("ExternalLink", /* @__PURE__ */ jsxs11(Fragment3, {
|
|
1602
1604
|
children: [
|
|
1603
|
-
/* @__PURE__ */
|
|
1605
|
+
/* @__PURE__ */ jsx17("path", {
|
|
1604
1606
|
d: "M15 3h6v6"
|
|
1605
1607
|
}),
|
|
1606
|
-
/* @__PURE__ */
|
|
1608
|
+
/* @__PURE__ */ jsx17("path", {
|
|
1607
1609
|
d: "M10 14 21 3"
|
|
1608
1610
|
}),
|
|
1609
|
-
/* @__PURE__ */
|
|
1611
|
+
/* @__PURE__ */ jsx17("path", {
|
|
1610
1612
|
d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"
|
|
1611
1613
|
})
|
|
1612
1614
|
]
|
|
@@ -1635,7 +1637,7 @@ var DocsFrontmatter = Schema3.Struct({
|
|
|
1635
1637
|
title: Schema3.String,
|
|
1636
1638
|
description: Schema3.String,
|
|
1637
1639
|
icon: Schema3.optional(Schema3.String),
|
|
1638
|
-
order: Schema3.
|
|
1640
|
+
order: Schema3.Finite,
|
|
1639
1641
|
locale: Schema3.String,
|
|
1640
1642
|
section: DocsSection,
|
|
1641
1643
|
type: DocsPageType,
|
|
@@ -1993,26 +1995,26 @@ var getDocsMessages = (locale, overrides) => ({
|
|
|
1993
1995
|
var iconFor = (icons, name) => name ? icons[name] : undefined;
|
|
1994
1996
|
var DocsArticle = ({
|
|
1995
1997
|
locale,
|
|
1996
|
-
messages,
|
|
1998
|
+
messages: messages5,
|
|
1997
1999
|
page
|
|
1998
2000
|
}) => {
|
|
1999
|
-
return /* @__PURE__ */
|
|
2001
|
+
return /* @__PURE__ */ jsx17(MarkdownContent, {
|
|
2000
2002
|
codeBlocks: page.codeBlocks,
|
|
2001
2003
|
html: page.html,
|
|
2002
2004
|
locale,
|
|
2003
2005
|
messages: {
|
|
2004
2006
|
[locale]: {
|
|
2005
|
-
codeDescription:
|
|
2006
|
-
copy:
|
|
2007
|
-
copied:
|
|
2008
|
-
copyFailed:
|
|
2007
|
+
codeDescription: messages5.copyCodeDescription,
|
|
2008
|
+
copy: messages5.copyCode,
|
|
2009
|
+
copied: messages5.copied,
|
|
2010
|
+
copyFailed: messages5.copyFailed
|
|
2009
2011
|
}
|
|
2010
2012
|
}
|
|
2011
2013
|
});
|
|
2012
2014
|
};
|
|
2013
2015
|
var useActiveDocsHeading = (headings) => {
|
|
2014
|
-
const [activeHeadingId, setActiveHeadingId] =
|
|
2015
|
-
|
|
2016
|
+
const [activeHeadingId, setActiveHeadingId] = useState5();
|
|
2017
|
+
useEffect4(() => {
|
|
2016
2018
|
const elements = headings.flatMap((heading) => {
|
|
2017
2019
|
const element = document.getElementById(heading.id);
|
|
2018
2020
|
return element ? [element] : [];
|
|
@@ -2051,12 +2053,12 @@ var DocsTableOfContentsItems = ({
|
|
|
2051
2053
|
headings
|
|
2052
2054
|
}) => {
|
|
2053
2055
|
const activeHeadingId = useActiveDocsHeading(headings);
|
|
2054
|
-
return /* @__PURE__ */
|
|
2056
|
+
return /* @__PURE__ */ jsx17("ol", {
|
|
2055
2057
|
className: "border-l",
|
|
2056
2058
|
children: headings.map((heading) => {
|
|
2057
2059
|
const isActive = heading.id === activeHeadingId;
|
|
2058
|
-
return /* @__PURE__ */
|
|
2059
|
-
children: /* @__PURE__ */
|
|
2060
|
+
return /* @__PURE__ */ jsx17("li", {
|
|
2061
|
+
children: /* @__PURE__ */ jsx17("a", {
|
|
2060
2062
|
"aria-current": isActive ? "location" : undefined,
|
|
2061
2063
|
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"}`,
|
|
2062
2064
|
href: `#${heading.id}`,
|
|
@@ -2076,11 +2078,11 @@ var DocsTableOfContents = ({
|
|
|
2076
2078
|
"aria-label": label,
|
|
2077
2079
|
className: "fixed top-20 max-h-[calc(100svh-6rem)] w-56 overflow-y-auto",
|
|
2078
2080
|
children: [
|
|
2079
|
-
/* @__PURE__ */
|
|
2081
|
+
/* @__PURE__ */ jsx17("p", {
|
|
2080
2082
|
className: "text-foreground mb-3 text-sm font-semibold",
|
|
2081
2083
|
children: label
|
|
2082
2084
|
}),
|
|
2083
|
-
/* @__PURE__ */
|
|
2085
|
+
/* @__PURE__ */ jsx17(DocsTableOfContentsItems, {
|
|
2084
2086
|
headings
|
|
2085
2087
|
})
|
|
2086
2088
|
]
|
|
@@ -2098,19 +2100,19 @@ var DocsMobileTableOfContents = ({
|
|
|
2098
2100
|
/* @__PURE__ */ jsxs11(CollapsibleTrigger, {
|
|
2099
2101
|
className: "group flex w-full cursor-pointer items-center justify-between p-4 text-left text-sm font-semibold",
|
|
2100
2102
|
children: [
|
|
2101
|
-
/* @__PURE__ */
|
|
2103
|
+
/* @__PURE__ */ jsx17("span", {
|
|
2102
2104
|
children: label
|
|
2103
2105
|
}),
|
|
2104
|
-
/* @__PURE__ */
|
|
2106
|
+
/* @__PURE__ */ jsx17(ChevronDown, {
|
|
2105
2107
|
className: "text-muted-foreground size-4 transition-transform group-data-[panel-open]:rotate-180"
|
|
2106
2108
|
})
|
|
2107
2109
|
]
|
|
2108
2110
|
}),
|
|
2109
|
-
/* @__PURE__ */
|
|
2111
|
+
/* @__PURE__ */ jsx17(CollapsibleContent, {
|
|
2110
2112
|
className: "px-4 pt-1 pb-4",
|
|
2111
|
-
children: /* @__PURE__ */
|
|
2113
|
+
children: /* @__PURE__ */ jsx17("nav", {
|
|
2112
2114
|
"aria-label": label,
|
|
2113
|
-
children: /* @__PURE__ */
|
|
2115
|
+
children: /* @__PURE__ */ jsx17(DocsTableOfContentsItems, {
|
|
2114
2116
|
headings
|
|
2115
2117
|
})
|
|
2116
2118
|
})
|
|
@@ -2121,9 +2123,9 @@ var DocsMobileTableOfContents = ({
|
|
|
2121
2123
|
var DocsSearch = ({
|
|
2122
2124
|
docs,
|
|
2123
2125
|
locale,
|
|
2124
|
-
messages
|
|
2126
|
+
messages: messages5
|
|
2125
2127
|
}) => {
|
|
2126
|
-
const [query, setQuery] =
|
|
2128
|
+
const [query, setQuery] = useState5("");
|
|
2127
2129
|
const deferredQuery = useDeferredValue(query);
|
|
2128
2130
|
const results = docs.search(deferredQuery, locale);
|
|
2129
2131
|
const isSearching = deferredQuery.trim().length > 0;
|
|
@@ -2134,7 +2136,7 @@ var DocsSearch = ({
|
|
|
2134
2136
|
sectionResults.sort((left, right) => left.page.order - right.page.order);
|
|
2135
2137
|
}
|
|
2136
2138
|
return {
|
|
2137
|
-
heading:
|
|
2139
|
+
heading: messages5.sectionLabel(section),
|
|
2138
2140
|
items: sectionResults.map(({ page }) => {
|
|
2139
2141
|
const item = {
|
|
2140
2142
|
id: page.path,
|
|
@@ -2145,7 +2147,7 @@ var DocsSearch = ({
|
|
|
2145
2147
|
if (page.icon) {
|
|
2146
2148
|
const PageIcon = iconFor(docs.icons, page.icon);
|
|
2147
2149
|
if (PageIcon)
|
|
2148
|
-
item.icon = /* @__PURE__ */
|
|
2150
|
+
item.icon = /* @__PURE__ */ jsx17(PageIcon, {
|
|
2149
2151
|
className: "size-4"
|
|
2150
2152
|
});
|
|
2151
2153
|
}
|
|
@@ -2153,16 +2155,16 @@ var DocsSearch = ({
|
|
|
2153
2155
|
})
|
|
2154
2156
|
};
|
|
2155
2157
|
});
|
|
2156
|
-
return /* @__PURE__ */
|
|
2158
|
+
return /* @__PURE__ */ jsx17(SearchMenu, {
|
|
2157
2159
|
groups,
|
|
2158
2160
|
locale,
|
|
2159
2161
|
messages: {
|
|
2160
2162
|
[locale]: {
|
|
2161
|
-
title:
|
|
2162
|
-
description:
|
|
2163
|
-
placeholder:
|
|
2164
|
-
inputPlaceholder:
|
|
2165
|
-
emptyMessage:
|
|
2163
|
+
title: messages5.searchTitle,
|
|
2164
|
+
description: messages5.searchDescription,
|
|
2165
|
+
placeholder: messages5.searchPlaceholder,
|
|
2166
|
+
inputPlaceholder: messages5.searchInputPlaceholder,
|
|
2167
|
+
emptyMessage: messages5.searchEmpty
|
|
2166
2168
|
}
|
|
2167
2169
|
},
|
|
2168
2170
|
query,
|
|
@@ -2227,11 +2229,11 @@ var DocsLayout = ({
|
|
|
2227
2229
|
]
|
|
2228
2230
|
});
|
|
2229
2231
|
}
|
|
2230
|
-
return /* @__PURE__ */
|
|
2232
|
+
return /* @__PURE__ */ jsx17(SidebarLayout, {
|
|
2231
2233
|
defaultOpen: getSidebarDefaultOpen2(),
|
|
2232
2234
|
groups,
|
|
2233
2235
|
sidebarCollapsible,
|
|
2234
|
-
sidebarHeader: /* @__PURE__ */
|
|
2236
|
+
sidebarHeader: /* @__PURE__ */ jsx17(AppBrand, {
|
|
2235
2237
|
label: brand.label,
|
|
2236
2238
|
subtitle: brand.subtitle(),
|
|
2237
2239
|
icon: brand.icon,
|
|
@@ -2247,12 +2249,12 @@ var DocsLayout = ({
|
|
|
2247
2249
|
rel: "noreferrer",
|
|
2248
2250
|
children: [
|
|
2249
2251
|
docs.githubLabel,
|
|
2250
|
-
/* @__PURE__ */
|
|
2252
|
+
/* @__PURE__ */ jsx17(ExternalLink, {
|
|
2251
2253
|
className: "size-3.5"
|
|
2252
2254
|
})
|
|
2253
2255
|
]
|
|
2254
2256
|
}) : null,
|
|
2255
|
-
/* @__PURE__ */
|
|
2257
|
+
/* @__PURE__ */ jsx17(DocsSearch, {
|
|
2256
2258
|
docs,
|
|
2257
2259
|
locale,
|
|
2258
2260
|
messages: resolvedMessages
|
|
@@ -2281,21 +2283,21 @@ var DocsHeader = ({ docs, resolution }) => {
|
|
|
2281
2283
|
/* @__PURE__ */ jsxs11("div", {
|
|
2282
2284
|
className: "flex flex-wrap items-center gap-3",
|
|
2283
2285
|
children: [
|
|
2284
|
-
/* @__PURE__ */
|
|
2286
|
+
/* @__PURE__ */ jsx17("h1", {
|
|
2285
2287
|
className: "text-3xl font-bold tracking-tight sm:text-4xl",
|
|
2286
2288
|
children: page.title
|
|
2287
2289
|
}),
|
|
2288
|
-
page.tags?.map((tag) => /* @__PURE__ */
|
|
2290
|
+
page.tags?.map((tag) => /* @__PURE__ */ jsx17(Badge, {
|
|
2289
2291
|
variant: "secondary",
|
|
2290
2292
|
children: tag
|
|
2291
2293
|
}, tag))
|
|
2292
2294
|
]
|
|
2293
2295
|
}),
|
|
2294
|
-
/* @__PURE__ */
|
|
2296
|
+
/* @__PURE__ */ jsx17("p", {
|
|
2295
2297
|
className: "text-muted-foreground mt-3 max-w-2xl text-base leading-7",
|
|
2296
2298
|
children: page.description
|
|
2297
2299
|
}),
|
|
2298
|
-
page.updatedAt ? /* @__PURE__ */
|
|
2300
|
+
page.updatedAt ? /* @__PURE__ */ jsx17("p", {
|
|
2299
2301
|
className: "text-muted-foreground mt-3 text-sm",
|
|
2300
2302
|
children: resolvedMessages.lastUpdated(new Date(page.updatedAt))
|
|
2301
2303
|
}) : null
|
|
@@ -2307,11 +2309,11 @@ var DocsContent = ({ docs, resolution }) => {
|
|
|
2307
2309
|
const resolvedMessages = docs.getMessages(page.locale);
|
|
2308
2310
|
return /* @__PURE__ */ jsxs11(Fragment3, {
|
|
2309
2311
|
children: [
|
|
2310
|
-
/* @__PURE__ */
|
|
2312
|
+
/* @__PURE__ */ jsx17(DocsMobileTableOfContents, {
|
|
2311
2313
|
headings: page.headings,
|
|
2312
2314
|
label: resolvedMessages.onThisPage
|
|
2313
2315
|
}),
|
|
2314
|
-
/* @__PURE__ */
|
|
2316
|
+
/* @__PURE__ */ jsx17(DocsArticle, {
|
|
2315
2317
|
locale: page.locale,
|
|
2316
2318
|
messages: resolvedMessages,
|
|
2317
2319
|
page
|
|
@@ -2336,12 +2338,12 @@ var DocsFooter = ({ docs, resolution }) => {
|
|
|
2336
2338
|
rel: "noreferrer",
|
|
2337
2339
|
children: [
|
|
2338
2340
|
resolvedMessages.editPage,
|
|
2339
|
-
/* @__PURE__ */
|
|
2341
|
+
/* @__PURE__ */ jsx17(ExternalLink, {
|
|
2340
2342
|
className: "size-3.5"
|
|
2341
2343
|
})
|
|
2342
2344
|
]
|
|
2343
2345
|
}) : null,
|
|
2344
|
-
/* @__PURE__ */
|
|
2346
|
+
/* @__PURE__ */ jsx17("span", {
|
|
2345
2347
|
className: "text-muted-foreground",
|
|
2346
2348
|
children: resolvedMessages.latestVersionNotice
|
|
2347
2349
|
})
|
|
@@ -2358,18 +2360,18 @@ var DocsFooter = ({ docs, resolution }) => {
|
|
|
2358
2360
|
/* @__PURE__ */ jsxs11("span", {
|
|
2359
2361
|
className: "text-muted-foreground flex items-center gap-1 text-xs font-medium uppercase",
|
|
2360
2362
|
children: [
|
|
2361
|
-
/* @__PURE__ */
|
|
2363
|
+
/* @__PURE__ */ jsx17(ArrowLeft, {
|
|
2362
2364
|
className: "size-3.5"
|
|
2363
2365
|
}),
|
|
2364
2366
|
resolvedMessages.previous
|
|
2365
2367
|
]
|
|
2366
2368
|
}),
|
|
2367
|
-
/* @__PURE__ */
|
|
2369
|
+
/* @__PURE__ */ jsx17("span", {
|
|
2368
2370
|
className: "mt-1 block font-semibold",
|
|
2369
2371
|
children: neighbors.previous.title
|
|
2370
2372
|
})
|
|
2371
2373
|
]
|
|
2372
|
-
}) : /* @__PURE__ */
|
|
2374
|
+
}) : /* @__PURE__ */ jsx17("span", {}),
|
|
2373
2375
|
neighbors.next ? /* @__PURE__ */ jsxs11("a", {
|
|
2374
2376
|
className: "hover:bg-muted/50 rounded-lg border p-4 text-right transition-colors",
|
|
2375
2377
|
href: neighbors.next.path,
|
|
@@ -2378,12 +2380,12 @@ var DocsFooter = ({ docs, resolution }) => {
|
|
|
2378
2380
|
className: "text-muted-foreground flex items-center justify-end gap-1 text-xs font-medium uppercase",
|
|
2379
2381
|
children: [
|
|
2380
2382
|
resolvedMessages.next,
|
|
2381
|
-
/* @__PURE__ */
|
|
2383
|
+
/* @__PURE__ */ jsx17(ArrowRight, {
|
|
2382
2384
|
className: "size-3.5"
|
|
2383
2385
|
})
|
|
2384
2386
|
]
|
|
2385
2387
|
}),
|
|
2386
|
-
/* @__PURE__ */
|
|
2388
|
+
/* @__PURE__ */ jsx17("span", {
|
|
2387
2389
|
className: "mt-1 block font-semibold",
|
|
2388
2390
|
children: neighbors.next.title
|
|
2389
2391
|
})
|
|
@@ -2399,15 +2401,15 @@ var DocsPage = ({ children, docs, resolution }) => {
|
|
|
2399
2401
|
const resolvedMessages = docs.getMessages(page.locale);
|
|
2400
2402
|
const content = children ?? /* @__PURE__ */ jsxs11(Fragment3, {
|
|
2401
2403
|
children: [
|
|
2402
|
-
/* @__PURE__ */
|
|
2404
|
+
/* @__PURE__ */ jsx17(DocsHeader, {
|
|
2403
2405
|
docs,
|
|
2404
2406
|
resolution
|
|
2405
2407
|
}),
|
|
2406
|
-
/* @__PURE__ */
|
|
2408
|
+
/* @__PURE__ */ jsx17(DocsContent, {
|
|
2407
2409
|
docs,
|
|
2408
2410
|
resolution
|
|
2409
2411
|
}),
|
|
2410
|
-
/* @__PURE__ */
|
|
2412
|
+
/* @__PURE__ */ jsx17(DocsFooter, {
|
|
2411
2413
|
docs,
|
|
2412
2414
|
resolution
|
|
2413
2415
|
})
|
|
@@ -2415,7 +2417,7 @@ var DocsPage = ({ children, docs, resolution }) => {
|
|
|
2415
2417
|
});
|
|
2416
2418
|
return /* @__PURE__ */ jsxs11(Fragment3, {
|
|
2417
2419
|
children: [
|
|
2418
|
-
/* @__PURE__ */
|
|
2420
|
+
/* @__PURE__ */ jsx17("a", {
|
|
2419
2421
|
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",
|
|
2420
2422
|
href: "#docs-content",
|
|
2421
2423
|
children: resolvedMessages.skipToContent
|
|
@@ -2423,15 +2425,15 @@ var DocsPage = ({ children, docs, resolution }) => {
|
|
|
2423
2425
|
/* @__PURE__ */ jsxs11("div", {
|
|
2424
2426
|
className: "mx-auto grid w-full max-w-6xl gap-10 xl:grid-cols-[minmax(0,48rem)_14rem]",
|
|
2425
2427
|
children: [
|
|
2426
|
-
/* @__PURE__ */
|
|
2428
|
+
/* @__PURE__ */ jsx17("article", {
|
|
2427
2429
|
id: "docs-content",
|
|
2428
2430
|
className: "min-w-0 pb-16",
|
|
2429
2431
|
tabIndex: -1,
|
|
2430
2432
|
children: content
|
|
2431
2433
|
}),
|
|
2432
|
-
/* @__PURE__ */
|
|
2434
|
+
/* @__PURE__ */ jsx17("aside", {
|
|
2433
2435
|
className: "hidden xl:block",
|
|
2434
|
-
children: /* @__PURE__ */
|
|
2436
|
+
children: /* @__PURE__ */ jsx17(DocsTableOfContents, {
|
|
2435
2437
|
headings: page.headings,
|
|
2436
2438
|
label: resolvedMessages.onThisPage
|
|
2437
2439
|
})
|
|
@@ -2450,18 +2452,18 @@ var DocsNotFound = ({
|
|
|
2450
2452
|
return /* @__PURE__ */ jsxs11("main", {
|
|
2451
2453
|
className: "mx-auto flex min-h-screen max-w-lg flex-col justify-center px-6 text-center",
|
|
2452
2454
|
children: [
|
|
2453
|
-
/* @__PURE__ */
|
|
2455
|
+
/* @__PURE__ */ jsx17(BrandIcon, {
|
|
2454
2456
|
className: "text-primary mx-auto size-10"
|
|
2455
2457
|
}),
|
|
2456
|
-
/* @__PURE__ */
|
|
2458
|
+
/* @__PURE__ */ jsx17("h1", {
|
|
2457
2459
|
className: "mt-6 text-3xl font-bold tracking-tight",
|
|
2458
2460
|
children: resolvedMessages.notFoundTitle
|
|
2459
2461
|
}),
|
|
2460
|
-
/* @__PURE__ */
|
|
2462
|
+
/* @__PURE__ */ jsx17("p", {
|
|
2461
2463
|
className: "text-muted-foreground mt-3 leading-7",
|
|
2462
2464
|
children: resolvedMessages.notFoundDescription
|
|
2463
2465
|
}),
|
|
2464
|
-
/* @__PURE__ */
|
|
2466
|
+
/* @__PURE__ */ jsx17("a", {
|
|
2465
2467
|
className: "text-primary mt-6 font-semibold underline underline-offset-4",
|
|
2466
2468
|
href: docs.basePath,
|
|
2467
2469
|
children: resolvedMessages.notFoundAction
|
|
@@ -2470,20 +2472,20 @@ var DocsNotFound = ({
|
|
|
2470
2472
|
});
|
|
2471
2473
|
};
|
|
2472
2474
|
export {
|
|
2473
|
-
|
|
2474
|
-
DocsContent,
|
|
2475
|
-
DocsFooter,
|
|
2476
|
-
DocsFrontmatter,
|
|
2477
|
-
DocsHeader,
|
|
2478
|
-
DocsHeadingSchema,
|
|
2479
|
-
DocsLayout,
|
|
2480
|
-
DocsNotFound,
|
|
2481
|
-
DocsPage,
|
|
2482
|
-
DocsPageSchema,
|
|
2483
|
-
DocsPageType,
|
|
2484
|
-
DocsSection,
|
|
2485
|
-
createDocsSource,
|
|
2486
|
-
getDocsMessages,
|
|
2475
|
+
slugifyDocsHeading,
|
|
2487
2476
|
makeDocs,
|
|
2488
|
-
|
|
2477
|
+
getDocsMessages,
|
|
2478
|
+
createDocsSource,
|
|
2479
|
+
DocsSection,
|
|
2480
|
+
DocsPageType,
|
|
2481
|
+
DocsPageSchema,
|
|
2482
|
+
DocsPage,
|
|
2483
|
+
DocsNotFound,
|
|
2484
|
+
DocsLayout,
|
|
2485
|
+
DocsHeadingSchema,
|
|
2486
|
+
DocsHeader,
|
|
2487
|
+
DocsFrontmatter,
|
|
2488
|
+
DocsFooter,
|
|
2489
|
+
DocsContent,
|
|
2490
|
+
DocsCodeBlockSchema
|
|
2489
2491
|
};
|