@krak-stack/registry 0.1.2 → 0.1.4
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/README.md +17 -1
- package/dist/components/ui/alert.d.ts +10 -0
- package/dist/components/ui/app-brand.js +20 -20
- package/dist/components/ui/bubble.d.ts +16 -0
- package/dist/components/ui/code-block.js +38 -38
- package/dist/components/ui/collapsible.d.ts +5 -0
- package/dist/components/ui/copy-button.js +16 -16
- package/dist/components/ui/data-table.js +687 -687
- package/dist/components/ui/editing-locale-switcher.js +54 -54
- package/dist/components/ui/effect-form.js +490 -490
- package/dist/components/ui/empty.d.ts +11 -0
- package/dist/components/ui/file-picker.js +96 -96
- package/dist/components/ui/form.js +418 -418
- package/dist/components/ui/google-map.js +27 -27
- package/dist/components/ui/icon-input.js +93 -93
- package/dist/components/ui/loading.js +5 -5
- package/dist/components/ui/locale-switcher.js +48 -48
- package/dist/components/ui/marker.d.ts +10 -0
- package/dist/components/ui/message-scroller.d.ts +10 -0
- package/dist/components/ui/message.d.ts +10 -0
- package/dist/components/ui/pagination.js +92 -92
- package/dist/components/ui/search-menu.js +93 -93
- package/dist/components/ui/sidebar-layout.js +156 -156
- package/dist/components/ui/stats-card.js +28 -28
- package/dist/components/ui/theme-switcher.js +64 -64
- package/dist/components/ui/virtualized-combobox.js +66 -66
- package/dist/lib/docs-ai.d.ts +136 -0
- package/dist/lib/docs-ai.js +310 -0
- package/dist/lib/docs-core.d.ts +681 -0
- package/dist/lib/docs-core.js +2571 -0
- package/dist/lib/httpapi-ai.d.ts +54 -0
- package/dist/lib/httpapi-ai.js +361 -0
- package/dist/lib/httpapi-cli.d.ts +22 -0
- package/dist/lib/httpapi-cli.js +412 -0
- package/dist/lib/httpapi-client.d.ts +20 -0
- package/dist/lib/httpapi-client.js +50 -0
- package/dist/lib/httpapi-helpers.d.ts +105 -0
- package/dist/lib/httpapi-helpers.js +237 -0
- package/dist/lib/httpapi-mcp.d.ts +20 -0
- package/dist/lib/httpapi-mcp.js +366 -0
- package/dist/lib/query.js +128 -0
- package/dist/services/agent/client/atom.d.ts +56 -0
- package/dist/services/agent/client/index.d.ts +2 -0
- package/dist/services/agent/client/index.js +2239 -0
- package/dist/services/agent/client/widget.d.ts +52 -0
- package/dist/services/agent/index.d.ts +111 -0
- package/dist/services/agent/index.js +190 -0
- package/dist/services/agent/schema.d.ts +161 -0
- package/dist/services/agent/schema.js +135 -0
- package/package.json +59 -3
|
@@ -438,7 +438,7 @@ function isCustomStrategy(strategy2) {
|
|
|
438
438
|
}
|
|
439
439
|
|
|
440
440
|
// ../../src/components/ui/google-map.tsx
|
|
441
|
-
import {
|
|
441
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
442
442
|
var googleMapsScriptId = "krak-stack-google-maps-script";
|
|
443
443
|
var googleMapsCallbackName = "__krakStackGoogleMapsInit";
|
|
444
444
|
var googleMapsPromise;
|
|
@@ -687,67 +687,67 @@ function GoogleMap({
|
|
|
687
687
|
map.setZoom(nextZoom);
|
|
688
688
|
setCurrentZoom(nextZoom);
|
|
689
689
|
};
|
|
690
|
-
return /* @__PURE__ */
|
|
690
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
691
691
|
className: cn("bg-muted relative min-h-64 overflow-hidden rounded-lg border", className),
|
|
692
692
|
children: [
|
|
693
|
-
/* @__PURE__ */
|
|
693
|
+
/* @__PURE__ */ jsx("div", {
|
|
694
694
|
ref: mapElementRef,
|
|
695
695
|
className: "h-full min-h-[inherit] w-full",
|
|
696
696
|
role: "region",
|
|
697
697
|
"aria-label": labels.mapLabel
|
|
698
|
-
}
|
|
699
|
-
loadState === "ready" && zoomControls ? /* @__PURE__ */
|
|
698
|
+
}),
|
|
699
|
+
loadState === "ready" && zoomControls ? /* @__PURE__ */ jsxs("div", {
|
|
700
700
|
className: "bg-background/95 absolute right-4 bottom-4 z-10 overflow-hidden rounded-md border shadow-sm backdrop-blur",
|
|
701
701
|
children: [
|
|
702
|
-
/* @__PURE__ */
|
|
702
|
+
/* @__PURE__ */ jsx("button", {
|
|
703
703
|
type: "button",
|
|
704
704
|
className: "text-muted-foreground hover:bg-accent hover:text-accent-foreground flex size-9 items-center justify-center transition-colors disabled:pointer-events-none disabled:opacity-50",
|
|
705
705
|
disabled: currentZoom >= normalizedMaxZoom,
|
|
706
706
|
onClick: () => changeZoom(1),
|
|
707
707
|
"aria-label": labels.zoomIn,
|
|
708
|
-
children: /* @__PURE__ */
|
|
708
|
+
children: /* @__PURE__ */ jsx(Plus, {
|
|
709
709
|
className: "size-4"
|
|
710
|
-
}
|
|
711
|
-
}
|
|
712
|
-
/* @__PURE__ */
|
|
710
|
+
})
|
|
711
|
+
}),
|
|
712
|
+
/* @__PURE__ */ jsx("div", {
|
|
713
713
|
className: "bg-border h-px"
|
|
714
|
-
}
|
|
715
|
-
/* @__PURE__ */
|
|
714
|
+
}),
|
|
715
|
+
/* @__PURE__ */ jsx("button", {
|
|
716
716
|
type: "button",
|
|
717
717
|
className: "text-muted-foreground hover:bg-accent hover:text-accent-foreground flex size-9 items-center justify-center transition-colors disabled:pointer-events-none disabled:opacity-50",
|
|
718
718
|
disabled: currentZoom <= normalizedMinZoom,
|
|
719
719
|
onClick: () => changeZoom(-1),
|
|
720
720
|
"aria-label": labels.zoomOut,
|
|
721
|
-
children: /* @__PURE__ */
|
|
721
|
+
children: /* @__PURE__ */ jsx(Minus, {
|
|
722
722
|
className: "size-4"
|
|
723
|
-
}
|
|
724
|
-
}
|
|
723
|
+
})
|
|
724
|
+
})
|
|
725
725
|
]
|
|
726
|
-
}
|
|
727
|
-
loadState === "loading" ? /* @__PURE__ */
|
|
726
|
+
}) : null,
|
|
727
|
+
loadState === "loading" ? /* @__PURE__ */ jsx("div", {
|
|
728
728
|
className: "bg-background/75 text-muted-foreground absolute inset-0 grid place-items-center text-sm font-medium backdrop-blur-sm",
|
|
729
729
|
role: "status",
|
|
730
730
|
children: labels.loading
|
|
731
|
-
}
|
|
732
|
-
loadState === "missing-key" || loadState === "error" ? /* @__PURE__ */
|
|
731
|
+
}) : null,
|
|
732
|
+
loadState === "missing-key" || loadState === "error" ? /* @__PURE__ */ jsx("div", {
|
|
733
733
|
className: "bg-background/85 absolute inset-0 grid place-items-center p-6 text-center backdrop-blur-sm",
|
|
734
|
-
children: /* @__PURE__ */
|
|
734
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
735
735
|
className: "bg-card text-card-foreground max-w-sm rounded-lg border p-5 shadow-sm",
|
|
736
736
|
role: "alert",
|
|
737
737
|
children: [
|
|
738
|
-
/* @__PURE__ */
|
|
738
|
+
/* @__PURE__ */ jsx("p", {
|
|
739
739
|
className: "text-sm font-semibold",
|
|
740
740
|
children: loadState === "missing-key" ? labels.missingKeyTitle : labels.errorTitle
|
|
741
|
-
}
|
|
742
|
-
/* @__PURE__ */
|
|
741
|
+
}),
|
|
742
|
+
/* @__PURE__ */ jsx("p", {
|
|
743
743
|
className: "text-muted-foreground mt-2 text-xs",
|
|
744
744
|
children: loadState === "missing-key" ? labels.missingKeyBody : labels.errorBody
|
|
745
|
-
}
|
|
745
|
+
})
|
|
746
746
|
]
|
|
747
|
-
}
|
|
748
|
-
}
|
|
747
|
+
})
|
|
748
|
+
}) : null
|
|
749
749
|
]
|
|
750
|
-
}
|
|
750
|
+
});
|
|
751
751
|
}
|
|
752
752
|
export {
|
|
753
753
|
GoogleMap
|
|
@@ -24,7 +24,7 @@ function cn(...inputs) {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
// ../../src/components/ui/button.tsx
|
|
27
|
-
import {
|
|
27
|
+
import { jsx } from "react/jsx-runtime";
|
|
28
28
|
var buttonVariants = cva("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", {
|
|
29
29
|
variants: {
|
|
30
30
|
variant: {
|
|
@@ -57,11 +57,11 @@ function Button({
|
|
|
57
57
|
size = "default",
|
|
58
58
|
...props
|
|
59
59
|
}) {
|
|
60
|
-
return /* @__PURE__ */
|
|
60
|
+
return /* @__PURE__ */ jsx(ButtonPrimitive, {
|
|
61
61
|
"data-slot": "button",
|
|
62
62
|
className: cn(buttonVariants({ variant, size, className })),
|
|
63
63
|
...props
|
|
64
|
-
}
|
|
64
|
+
});
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
// ../../src/components/ui/virtualized-combobox.tsx
|
|
@@ -79,28 +79,28 @@ import { cva as cva2 } from "class-variance-authority";
|
|
|
79
79
|
|
|
80
80
|
// ../../src/components/ui/input.tsx
|
|
81
81
|
import { Input as InputPrimitive } from "@base-ui/react/input";
|
|
82
|
-
import {
|
|
82
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
83
83
|
function Input({ className, type, ...props }) {
|
|
84
|
-
return /* @__PURE__ */
|
|
84
|
+
return /* @__PURE__ */ jsx2(InputPrimitive, {
|
|
85
85
|
type,
|
|
86
86
|
"data-slot": "input",
|
|
87
87
|
className: cn("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-2.5 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className),
|
|
88
88
|
...props
|
|
89
|
-
}
|
|
89
|
+
});
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
// ../../src/components/ui/textarea.tsx
|
|
93
|
-
import {
|
|
93
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
94
94
|
|
|
95
95
|
// ../../src/components/ui/input-group.tsx
|
|
96
|
-
import {
|
|
96
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
97
97
|
function InputGroup({ className, ...props }) {
|
|
98
|
-
return /* @__PURE__ */
|
|
98
|
+
return /* @__PURE__ */ jsx4("div", {
|
|
99
99
|
"data-slot": "input-group",
|
|
100
100
|
role: "group",
|
|
101
101
|
className: cn("group/input-group relative flex h-9 w-full min-w-0 items-center rounded-md border border-input shadow-xs transition-[color,box-shadow] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5", className),
|
|
102
102
|
...props
|
|
103
|
-
}
|
|
103
|
+
});
|
|
104
104
|
}
|
|
105
105
|
var inputGroupAddonVariants = cva2("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4", {
|
|
106
106
|
variants: {
|
|
@@ -128,11 +128,11 @@ function InputGroupInput({
|
|
|
128
128
|
className,
|
|
129
129
|
...props
|
|
130
130
|
}) {
|
|
131
|
-
return /* @__PURE__ */
|
|
131
|
+
return /* @__PURE__ */ jsx4(Input, {
|
|
132
132
|
"data-slot": "input-group-control",
|
|
133
133
|
className: cn("flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent", className),
|
|
134
134
|
...props
|
|
135
|
-
}
|
|
135
|
+
});
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
// ../../src/paraglide/runtime.js
|
|
@@ -564,7 +564,7 @@ function isCustomStrategy(strategy2) {
|
|
|
564
564
|
}
|
|
565
565
|
|
|
566
566
|
// ../../src/components/ui/virtualized-combobox.tsx
|
|
567
|
-
import {
|
|
567
|
+
import { jsx as jsx5, jsxs } from "react/jsx-runtime";
|
|
568
568
|
"use client";
|
|
569
569
|
var messages = {
|
|
570
570
|
en: {
|
|
@@ -627,19 +627,19 @@ var VirtualizedComboboxList = ({
|
|
|
627
627
|
virtualizer.measure();
|
|
628
628
|
}, [virtualizer]);
|
|
629
629
|
if (filteredItems.length === 0) {
|
|
630
|
-
return /* @__PURE__ */
|
|
630
|
+
return /* @__PURE__ */ jsx5("div", {
|
|
631
631
|
className: "text-muted-foreground py-6 text-center text-sm",
|
|
632
632
|
children: emptyLabel
|
|
633
|
-
}
|
|
633
|
+
});
|
|
634
634
|
}
|
|
635
|
-
return /* @__PURE__ */
|
|
635
|
+
return /* @__PURE__ */ jsx5(ComboboxPrimitive.List, {
|
|
636
636
|
className: "scroll-py-1 overflow-auto overscroll-contain p-1",
|
|
637
637
|
ref: handleScrollElementRef,
|
|
638
638
|
style: {
|
|
639
639
|
height: Math.min(virtualizer.getTotalSize() + 8, 288),
|
|
640
640
|
maxHeight: "var(--available-height)"
|
|
641
641
|
},
|
|
642
|
-
children: /* @__PURE__ */
|
|
642
|
+
children: /* @__PURE__ */ jsx5("div", {
|
|
643
643
|
className: "relative w-full",
|
|
644
644
|
role: "presentation",
|
|
645
645
|
style: { height: virtualizer.getTotalSize() },
|
|
@@ -652,18 +652,18 @@ var VirtualizedComboboxList = ({
|
|
|
652
652
|
transform: `translateY(${virtualItem.start}px)`
|
|
653
653
|
};
|
|
654
654
|
if (entry.kind === "group") {
|
|
655
|
-
return /* @__PURE__ */
|
|
655
|
+
return /* @__PURE__ */ jsx5(ComboboxPrimitive.Group, {
|
|
656
656
|
className: "contents",
|
|
657
|
-
children: /* @__PURE__ */
|
|
657
|
+
children: /* @__PURE__ */ jsx5(ComboboxPrimitive.GroupLabel, {
|
|
658
658
|
className: "text-muted-foreground absolute top-0 left-0 w-full px-2 pt-3 pb-1 text-xs",
|
|
659
659
|
"data-index": virtualItem.index,
|
|
660
660
|
ref: virtualizer.measureElement,
|
|
661
661
|
style,
|
|
662
662
|
children: entry.label
|
|
663
|
-
}
|
|
664
|
-
}, entry.key
|
|
663
|
+
})
|
|
664
|
+
}, entry.key);
|
|
665
665
|
}
|
|
666
|
-
return /* @__PURE__ */
|
|
666
|
+
return /* @__PURE__ */ jsxs(ComboboxPrimitive.Item, {
|
|
667
667
|
"aria-posinset": entry.index + 1,
|
|
668
668
|
"aria-setsize": filteredItems.length,
|
|
669
669
|
className: "data-highlighted:bg-accent data-highlighted:text-accent-foreground absolute top-0 left-0 flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
@@ -673,19 +673,19 @@ var VirtualizedComboboxList = ({
|
|
|
673
673
|
style,
|
|
674
674
|
value: entry.item,
|
|
675
675
|
children: [
|
|
676
|
-
renderItem?.(entry.item) ?? /* @__PURE__ */
|
|
676
|
+
renderItem?.(entry.item) ?? /* @__PURE__ */ jsx5("span", {
|
|
677
677
|
className: "min-w-0 truncate",
|
|
678
678
|
children: entry.item.label
|
|
679
|
-
}
|
|
680
|
-
/* @__PURE__ */
|
|
679
|
+
}),
|
|
680
|
+
/* @__PURE__ */ jsx5(ComboboxPrimitive.ItemIndicator, {
|
|
681
681
|
className: "absolute right-2 flex size-4 items-center justify-center",
|
|
682
|
-
children: /* @__PURE__ */
|
|
683
|
-
}
|
|
682
|
+
children: /* @__PURE__ */ jsx5(Check, {})
|
|
683
|
+
})
|
|
684
684
|
]
|
|
685
|
-
}, entry.item.value
|
|
685
|
+
}, entry.item.value);
|
|
686
686
|
})
|
|
687
|
-
}
|
|
688
|
-
}
|
|
687
|
+
})
|
|
688
|
+
});
|
|
689
689
|
};
|
|
690
690
|
var VirtualizedComboboxContent = ({
|
|
691
691
|
contentClassName,
|
|
@@ -697,39 +697,39 @@ var VirtualizedComboboxContent = ({
|
|
|
697
697
|
virtualizerRef
|
|
698
698
|
}) => {
|
|
699
699
|
const labels = virtualizedComboboxMessages(messageOverrides);
|
|
700
|
-
return /* @__PURE__ */
|
|
701
|
-
children: /* @__PURE__ */
|
|
700
|
+
return /* @__PURE__ */ jsx5(ComboboxPrimitive.Portal, {
|
|
701
|
+
children: /* @__PURE__ */ jsx5(ComboboxPrimitive.Positioner, {
|
|
702
702
|
align: "start",
|
|
703
703
|
className: "isolate z-50",
|
|
704
704
|
side: "bottom",
|
|
705
705
|
sideOffset: 6,
|
|
706
|
-
children: /* @__PURE__ */
|
|
706
|
+
children: /* @__PURE__ */ jsxs(ComboboxPrimitive.Popup, {
|
|
707
707
|
className: cn("relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-0 origin-(--transform-origin) overflow-hidden rounded-md bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2 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-in-95", contentClassName),
|
|
708
708
|
children: [
|
|
709
|
-
/* @__PURE__ */
|
|
709
|
+
/* @__PURE__ */ jsx5("div", {
|
|
710
710
|
className: "min-w-0 p-1 pb-0",
|
|
711
|
-
children: /* @__PURE__ */
|
|
711
|
+
children: /* @__PURE__ */ jsx5(InputGroup, {
|
|
712
712
|
className: "border-input/30 bg-input/30 h-8 w-full min-w-0 shadow-none",
|
|
713
|
-
children: /* @__PURE__ */
|
|
713
|
+
children: /* @__PURE__ */ jsx5(ComboboxPrimitive.Input, {
|
|
714
714
|
placeholder: labels.search,
|
|
715
|
-
render: /* @__PURE__ */
|
|
716
|
-
}
|
|
717
|
-
}
|
|
718
|
-
}
|
|
719
|
-
/* @__PURE__ */
|
|
715
|
+
render: /* @__PURE__ */ jsx5(InputGroupInput, {})
|
|
716
|
+
})
|
|
717
|
+
})
|
|
718
|
+
}),
|
|
719
|
+
/* @__PURE__ */ jsx5(VirtualizedComboboxList, {
|
|
720
720
|
emptyLabel,
|
|
721
721
|
groupSelections,
|
|
722
722
|
messages: messageOverrides,
|
|
723
723
|
renderItem,
|
|
724
724
|
selectedValues,
|
|
725
725
|
virtualizerRef
|
|
726
|
-
}
|
|
726
|
+
})
|
|
727
727
|
]
|
|
728
|
-
}
|
|
729
|
-
}
|
|
730
|
-
}
|
|
728
|
+
})
|
|
729
|
+
})
|
|
730
|
+
});
|
|
731
731
|
};
|
|
732
|
-
var defaultTrigger = (ariaLabel, ariaInvalid, disabled, label, triggerId) => /* @__PURE__ */
|
|
732
|
+
var defaultTrigger = (ariaLabel, ariaInvalid, disabled, label, triggerId) => /* @__PURE__ */ jsxs(Button, {
|
|
733
733
|
"aria-label": ariaLabel,
|
|
734
734
|
"aria-invalid": ariaInvalid,
|
|
735
735
|
className: "w-full max-w-full min-w-0 justify-between overflow-hidden",
|
|
@@ -738,15 +738,15 @@ var defaultTrigger = (ariaLabel, ariaInvalid, disabled, label, triggerId) => /*
|
|
|
738
738
|
type: "button",
|
|
739
739
|
variant: "outline",
|
|
740
740
|
children: [
|
|
741
|
-
/* @__PURE__ */
|
|
741
|
+
/* @__PURE__ */ jsx5("span", {
|
|
742
742
|
className: "min-w-0 truncate text-left",
|
|
743
743
|
children: label
|
|
744
|
-
}
|
|
745
|
-
/* @__PURE__ */
|
|
744
|
+
}),
|
|
745
|
+
/* @__PURE__ */ jsx5(ChevronsUpDown, {
|
|
746
746
|
className: "text-muted-foreground shrink-0 opacity-70"
|
|
747
|
-
}
|
|
747
|
+
})
|
|
748
748
|
]
|
|
749
|
-
}
|
|
749
|
+
});
|
|
750
750
|
var selectedLabel = (value, placeholder) => {
|
|
751
751
|
if (Array.isArray(value)) {
|
|
752
752
|
return value.length > 0 ? value.map(({ label }) => label).join(", ") : placeholder;
|
|
@@ -759,7 +759,7 @@ var useComboboxVirtualizerRef = (providedRef) => {
|
|
|
759
759
|
};
|
|
760
760
|
var VirtualizedComboboxSingle = (props) => {
|
|
761
761
|
const virtualizerRef = useComboboxVirtualizerRef(props.virtualizerRef);
|
|
762
|
-
return /* @__PURE__ */
|
|
762
|
+
return /* @__PURE__ */ jsxs(ComboboxPrimitive.Root, {
|
|
763
763
|
disabled: props.disabled,
|
|
764
764
|
inputValue: props.searchValue,
|
|
765
765
|
items: [...props.items],
|
|
@@ -777,21 +777,21 @@ var VirtualizedComboboxSingle = (props) => {
|
|
|
777
777
|
value: props.value,
|
|
778
778
|
virtualized: true,
|
|
779
779
|
children: [
|
|
780
|
-
/* @__PURE__ */
|
|
780
|
+
/* @__PURE__ */ jsx5(ComboboxPrimitive.Trigger, {
|
|
781
781
|
render: props.trigger ?? defaultTrigger(props.ariaLabel, props.ariaInvalid, props.disabled, selectedLabel(props.value, props.placeholder), props.triggerId)
|
|
782
|
-
}
|
|
783
|
-
/* @__PURE__ */
|
|
782
|
+
}),
|
|
783
|
+
/* @__PURE__ */ jsx5(VirtualizedComboboxContent, {
|
|
784
784
|
...props,
|
|
785
785
|
groupSelections: false,
|
|
786
786
|
selectedValues: new Set(props.value ? [props.value.value] : []),
|
|
787
787
|
virtualizerRef
|
|
788
|
-
}
|
|
788
|
+
})
|
|
789
789
|
]
|
|
790
|
-
}
|
|
790
|
+
});
|
|
791
791
|
};
|
|
792
792
|
var VirtualizedComboboxMultiple = (props) => {
|
|
793
793
|
const virtualizerRef = useComboboxVirtualizerRef(props.virtualizerRef);
|
|
794
|
-
return /* @__PURE__ */
|
|
794
|
+
return /* @__PURE__ */ jsxs(ComboboxPrimitive.Root, {
|
|
795
795
|
disabled: props.disabled,
|
|
796
796
|
inputValue: props.searchValue,
|
|
797
797
|
items: [...props.items],
|
|
@@ -810,28 +810,28 @@ var VirtualizedComboboxMultiple = (props) => {
|
|
|
810
810
|
value: [...props.value],
|
|
811
811
|
virtualized: true,
|
|
812
812
|
children: [
|
|
813
|
-
/* @__PURE__ */
|
|
813
|
+
/* @__PURE__ */ jsx5(ComboboxPrimitive.Trigger, {
|
|
814
814
|
render: props.trigger ?? defaultTrigger(props.ariaLabel, props.ariaInvalid, props.disabled, selectedLabel(props.value, props.placeholder), props.triggerId)
|
|
815
|
-
}
|
|
816
|
-
/* @__PURE__ */
|
|
815
|
+
}),
|
|
816
|
+
/* @__PURE__ */ jsx5(VirtualizedComboboxContent, {
|
|
817
817
|
...props,
|
|
818
818
|
groupSelections: true,
|
|
819
819
|
selectedValues: new Set(props.value.map(({ value }) => value)),
|
|
820
820
|
virtualizerRef
|
|
821
|
-
}
|
|
821
|
+
})
|
|
822
822
|
]
|
|
823
|
-
}
|
|
823
|
+
});
|
|
824
824
|
};
|
|
825
825
|
function VirtualizedCombobox(props) {
|
|
826
|
-
return props.multiple ? /* @__PURE__ */
|
|
826
|
+
return props.multiple ? /* @__PURE__ */ jsx5(VirtualizedComboboxMultiple, {
|
|
827
827
|
...props
|
|
828
|
-
}
|
|
828
|
+
}) : /* @__PURE__ */ jsx5(VirtualizedComboboxSingle, {
|
|
829
829
|
...props
|
|
830
|
-
}
|
|
830
|
+
});
|
|
831
831
|
}
|
|
832
832
|
|
|
833
833
|
// ../../src/components/ui/icon-input.tsx
|
|
834
|
-
import {
|
|
834
|
+
import { jsx as jsx6, jsxs as jsxs2, Fragment } from "react/jsx-runtime";
|
|
835
835
|
var IconifySearchResponse = Schema.Struct({
|
|
836
836
|
icons: Schema.Array(Schema.String)
|
|
837
837
|
}).pipe(Schema.annotate({ identifier: "IconifySearchResponse" }));
|
|
@@ -885,36 +885,36 @@ function IconInput({
|
|
|
885
885
|
const isWaiting = deferredQuery.trim() !== "" && AsyncResult.isWaiting(iconSearchResult);
|
|
886
886
|
const items = icons.map((icon) => ({ label: icon, value: icon }));
|
|
887
887
|
const selectedItem = value ? { label: value, value } : null;
|
|
888
|
-
return /* @__PURE__ */
|
|
888
|
+
return /* @__PURE__ */ jsx6(VirtualizedCombobox, {
|
|
889
889
|
ariaLabel: copy.select,
|
|
890
890
|
contentClassName: "w-80",
|
|
891
|
-
emptyLabel: isWaiting ? null : /* @__PURE__ */
|
|
891
|
+
emptyLabel: isWaiting ? null : /* @__PURE__ */ jsxs2("div", {
|
|
892
892
|
className: "text-muted-foreground flex flex-col items-center gap-2 px-3",
|
|
893
893
|
children: [
|
|
894
|
-
/* @__PURE__ */
|
|
894
|
+
/* @__PURE__ */ jsx6(Search, {
|
|
895
895
|
className: "size-5"
|
|
896
|
-
}
|
|
897
|
-
/* @__PURE__ */
|
|
896
|
+
}),
|
|
897
|
+
/* @__PURE__ */ jsx6("p", {
|
|
898
898
|
children: query ? copy.empty : copy.searchPrompt
|
|
899
|
-
}
|
|
900
|
-
/* @__PURE__ */
|
|
901
|
-
render: /* @__PURE__ */
|
|
899
|
+
}),
|
|
900
|
+
/* @__PURE__ */ jsxs2(Button, {
|
|
901
|
+
render: /* @__PURE__ */ jsx6("a", {
|
|
902
902
|
href: iconifyCollectionUrl(collection),
|
|
903
903
|
rel: "noreferrer",
|
|
904
904
|
target: "_blank"
|
|
905
|
-
}
|
|
905
|
+
}),
|
|
906
906
|
size: "sm",
|
|
907
907
|
variant: "link",
|
|
908
908
|
children: [
|
|
909
909
|
copy.browse,
|
|
910
910
|
" ",
|
|
911
|
-
/* @__PURE__ */
|
|
911
|
+
/* @__PURE__ */ jsx6(ExternalLink, {
|
|
912
912
|
className: "inline size-3"
|
|
913
|
-
}
|
|
913
|
+
})
|
|
914
914
|
]
|
|
915
|
-
}
|
|
915
|
+
})
|
|
916
916
|
]
|
|
917
|
-
}
|
|
917
|
+
}),
|
|
918
918
|
items,
|
|
919
919
|
messages: { search: copy.searchPlaceholder },
|
|
920
920
|
onOpenChange: (open) => {
|
|
@@ -932,24 +932,24 @@ function IconInput({
|
|
|
932
932
|
setIsOpen(false);
|
|
933
933
|
},
|
|
934
934
|
placeholder: copy.select,
|
|
935
|
-
renderItem: (item) => /* @__PURE__ */
|
|
935
|
+
renderItem: (item) => /* @__PURE__ */ jsxs2(Fragment, {
|
|
936
936
|
children: [
|
|
937
|
-
/* @__PURE__ */
|
|
937
|
+
/* @__PURE__ */ jsx6(Icon, {
|
|
938
938
|
className: "size-5 shrink-0",
|
|
939
939
|
icon: `${collection}:${item.value}`
|
|
940
|
-
}
|
|
941
|
-
/* @__PURE__ */
|
|
940
|
+
}),
|
|
941
|
+
/* @__PURE__ */ jsx6("span", {
|
|
942
942
|
className: "truncate",
|
|
943
943
|
children: item.label
|
|
944
|
-
}
|
|
945
|
-
/* @__PURE__ */
|
|
944
|
+
}),
|
|
945
|
+
/* @__PURE__ */ jsx6("span", {
|
|
946
946
|
className: "sr-only",
|
|
947
947
|
children: copy.select
|
|
948
|
-
}
|
|
948
|
+
})
|
|
949
949
|
]
|
|
950
|
-
}
|
|
950
|
+
}),
|
|
951
951
|
searchValue: query,
|
|
952
|
-
trigger: /* @__PURE__ */
|
|
952
|
+
trigger: /* @__PURE__ */ jsx6(Button, {
|
|
953
953
|
"aria-label": copy.select,
|
|
954
954
|
disabled,
|
|
955
955
|
id,
|
|
@@ -957,14 +957,14 @@ function IconInput({
|
|
|
957
957
|
title: value,
|
|
958
958
|
type: "button",
|
|
959
959
|
variant: "outline",
|
|
960
|
-
children: /* @__PURE__ */
|
|
960
|
+
children: /* @__PURE__ */ jsx6(Icon, {
|
|
961
961
|
className: "size-5",
|
|
962
962
|
icon: `${collection}:${value}`
|
|
963
|
-
}
|
|
964
|
-
}
|
|
963
|
+
})
|
|
964
|
+
}),
|
|
965
965
|
value: selectedItem,
|
|
966
966
|
...disabled === undefined ? {} : { disabled }
|
|
967
|
-
}
|
|
967
|
+
});
|
|
968
968
|
}
|
|
969
969
|
export {
|
|
970
970
|
IconInput
|
|
@@ -437,7 +437,7 @@ function isCustomStrategy(strategy2) {
|
|
|
437
437
|
}
|
|
438
438
|
|
|
439
439
|
// ../../src/components/ui/loading.tsx
|
|
440
|
-
import {
|
|
440
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
441
441
|
var labels = {
|
|
442
442
|
en: {
|
|
443
443
|
loading: "Loading..."
|
|
@@ -452,15 +452,15 @@ function Loading({
|
|
|
452
452
|
label,
|
|
453
453
|
variant = "inline"
|
|
454
454
|
}) {
|
|
455
|
-
return /* @__PURE__ */
|
|
455
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
456
456
|
className: cn("text-muted-foreground flex items-center justify-center gap-2 text-sm", variant === "centered" && "min-h-[50svh] w-full", className),
|
|
457
457
|
children: [
|
|
458
|
-
/* @__PURE__ */
|
|
458
|
+
/* @__PURE__ */ jsx(Loader2, {
|
|
459
459
|
className: "size-4 animate-spin"
|
|
460
|
-
}
|
|
460
|
+
}),
|
|
461
461
|
label ?? loadingLabel()
|
|
462
462
|
]
|
|
463
|
-
}
|
|
463
|
+
});
|
|
464
464
|
}
|
|
465
465
|
export {
|
|
466
466
|
Loading
|