@ai-matrx/design-system 0.86.361 → 0.86.363
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 +13 -0
- package/dist/carousel.js +5 -5
- package/dist/{chunk-ZU2ZODDD.js → chunk-2QFA6CK4.js} +4 -4
- package/dist/{chunk-UCEKAKHP.js → chunk-3YTF4MH2.js} +2 -2
- package/dist/{chunk-T57DLONB.js → chunk-AKSKVT2M.js} +17 -9
- package/dist/chunk-AKSKVT2M.js.map +1 -0
- package/dist/{chunk-LU75R6YX.js → chunk-KOUHF4JC.js} +2 -2
- package/dist/{chunk-HISATFYI.js → chunk-LS3C7IUV.js} +2 -2
- package/dist/{chunk-QK7GPIEA.js → chunk-QJ6SQNXD.js} +4 -4
- package/dist/{chunk-TSETPQWU.js → chunk-RO5CRIOL.js} +2 -2
- package/dist/{chunk-WHERV3VC.js → chunk-SOCDBDFS.js} +4 -4
- package/dist/{chunk-C5HYUXR2.js → chunk-UGUVTE77.js} +2 -2
- package/dist/{chunk-FF524V6P.js → chunk-VOLSYNJY.js} +3 -3
- package/dist/{chunk-WOA6WHV2.js → chunk-WLKHQGX5.js} +2 -2
- package/dist/{chunk-42GFQMLA.js → chunk-WUI5OFCH.js} +2 -2
- package/dist/clipboard-fallback-dialog.js +2 -2
- package/dist/controls.cjs +16 -8
- package/dist/controls.cjs.map +1 -1
- package/dist/controls.js +5 -5
- package/dist/data-table/data-row-inspector.js +5 -5
- package/dist/data-table/data-row-window.js +6 -6
- package/dist/data-table/index.cjs +859 -772
- package/dist/data-table/index.cjs.map +1 -1
- package/dist/data-table/index.js +542 -461
- package/dist/data-table/index.js.map +1 -1
- package/dist/data-table/pagination.cjs +16 -8
- package/dist/data-table/pagination.cjs.map +1 -1
- package/dist/data-table/pagination.js +3 -3
- package/dist/data-table/uuid-cell.js +3 -3
- package/dist/desktop.cjs +16 -8
- package/dist/desktop.cjs.map +1 -1
- package/dist/desktop.js +5 -5
- package/dist/index.cjs +386 -317
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +34 -2
- package/dist/index.d.ts +34 -2
- package/dist/index.js +242 -193
- package/dist/index.js.map +1 -1
- package/dist/intro-stage.cjs +24 -3
- package/dist/intro-stage.cjs.map +1 -1
- package/dist/intro-stage.d.cts +9 -3
- package/dist/intro-stage.d.ts +9 -3
- package/dist/intro-stage.js +24 -3
- package/dist/intro-stage.js.map +1 -1
- package/dist/item.cjs +16 -8
- package/dist/item.cjs.map +1 -1
- package/dist/item.js +4 -4
- package/dist/lite-table.js +2 -2
- package/dist/menu-look.cjs +16 -8
- package/dist/menu-look.cjs.map +1 -1
- package/dist/menu-look.js +2 -2
- package/dist/record-list.cjs +16 -8
- package/dist/record-list.cjs.map +1 -1
- package/dist/record-list.js +4 -4
- package/dist/settings.js +3 -3
- package/dist/styles.css +31 -0
- package/dist/thumbnail-grid.cjs +27 -1
- package/dist/thumbnail-grid.cjs.map +1 -1
- package/dist/thumbnail-grid.d.cts +16 -2
- package/dist/thumbnail-grid.d.ts +16 -2
- package/dist/thumbnail-grid.js +27 -1
- package/dist/thumbnail-grid.js.map +1 -1
- package/dist/writing-field.cjs +3 -2
- package/dist/writing-field.cjs.map +1 -1
- package/dist/writing-field.js +6 -5
- package/dist/writing-field.js.map +1 -1
- package/package.json +2 -2
- package/dist/chunk-T57DLONB.js.map +0 -1
- /package/dist/{chunk-ZU2ZODDD.js.map → chunk-2QFA6CK4.js.map} +0 -0
- /package/dist/{chunk-UCEKAKHP.js.map → chunk-3YTF4MH2.js.map} +0 -0
- /package/dist/{chunk-LU75R6YX.js.map → chunk-KOUHF4JC.js.map} +0 -0
- /package/dist/{chunk-HISATFYI.js.map → chunk-LS3C7IUV.js.map} +0 -0
- /package/dist/{chunk-QK7GPIEA.js.map → chunk-QJ6SQNXD.js.map} +0 -0
- /package/dist/{chunk-TSETPQWU.js.map → chunk-RO5CRIOL.js.map} +0 -0
- /package/dist/{chunk-WHERV3VC.js.map → chunk-SOCDBDFS.js.map} +0 -0
- /package/dist/{chunk-C5HYUXR2.js.map → chunk-UGUVTE77.js.map} +0 -0
- /package/dist/{chunk-FF524V6P.js.map → chunk-VOLSYNJY.js.map} +0 -0
- /package/dist/{chunk-WOA6WHV2.js.map → chunk-WLKHQGX5.js.map} +0 -0
- /package/dist/{chunk-42GFQMLA.js.map → chunk-WUI5OFCH.js.map} +0 -0
package/dist/index.cjs
CHANGED
|
@@ -276,6 +276,12 @@ function AlertTriangleIcon(props) {
|
|
|
276
276
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M12 17h.01" })
|
|
277
277
|
] });
|
|
278
278
|
}
|
|
279
|
+
function CircleCheckIcon(props) {
|
|
280
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { ...lucideProps("circle-check", props), children: [
|
|
281
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
|
|
282
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "m16 9-5.5 5.5L8 12" })
|
|
283
|
+
] });
|
|
284
|
+
}
|
|
279
285
|
function CircleHelpIcon(props) {
|
|
280
286
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { ...lucideProps("circle-question-mark", props), children: [
|
|
281
287
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
|
|
@@ -283,6 +289,13 @@ function CircleHelpIcon(props) {
|
|
|
283
289
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M12 17h.01" })
|
|
284
290
|
] });
|
|
285
291
|
}
|
|
292
|
+
function CircleXIcon(props) {
|
|
293
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { ...lucideProps("circle-x", props), children: [
|
|
294
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
|
|
295
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "m15 9-6 6" }),
|
|
296
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "m9 9 6 6" })
|
|
297
|
+
] });
|
|
298
|
+
}
|
|
286
299
|
function InfoIcon(props) {
|
|
287
300
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { ...lucideProps("info", props), children: [
|
|
288
301
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
|
|
@@ -2765,7 +2778,7 @@ function measureClearance(height) {
|
|
|
2765
2778
|
probe2.remove();
|
|
2766
2779
|
return Number.isFinite(px3) ? Math.ceil(px3) : 0;
|
|
2767
2780
|
}
|
|
2768
|
-
var DropdownMenuPrimitive, React27, import_jsx_runtime36, DropdownMenu, DropdownMenuTrigger, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuRadioGroup, MENU_SURFACE_CLASS, MENU_ITEM_CLASS, MENU_INDICATOR_ITEM_CLASS, DropdownMenuSubTrigger, DropdownMenuSubContent, CLEARANCE_REUSE_MS, clearanceCache, clock, TOP_CLEARANCE, BOTTOM_CLEARANCE, sharedTopClearance, sharedBottomClearance, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut;
|
|
2781
|
+
var DropdownMenuPrimitive, React27, import_jsx_runtime36, DropdownMenu, DropdownMenuTrigger, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuRadioGroup, MENU_SURFACE_CLASS, MENU_ITEM_CLASS, MENU_INDICATOR_ITEM_CLASS, DropdownMenuSubTrigger, DropdownMenuSubContent, OpenDropdownMenuSubContent, CLEARANCE_REUSE_MS, clearanceCache, clock, TOP_CLEARANCE, BOTTOM_CLEARANCE, sharedTopClearance, sharedBottomClearance, DropdownMenuContent, OpenDropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut;
|
|
2769
2782
|
var init_dropdown_menu = __esm({
|
|
2770
2783
|
"src/dropdown-menu.tsx"() {
|
|
2771
2784
|
"use strict";
|
|
@@ -2809,14 +2822,18 @@ var init_dropdown_menu = __esm({
|
|
|
2809
2822
|
}
|
|
2810
2823
|
));
|
|
2811
2824
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
2812
|
-
DropdownMenuSubContent = React27.forwardRef(({
|
|
2825
|
+
DropdownMenuSubContent = React27.forwardRef(({ container, ...props }, ref) => {
|
|
2813
2826
|
const portalContainer = usePortalContainer(container);
|
|
2827
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(DropdownMenuPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(OpenDropdownMenuSubContent, { ref, ...props }) });
|
|
2828
|
+
});
|
|
2829
|
+
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
2830
|
+
OpenDropdownMenuSubContent = React27.forwardRef(({ className, surface = "default", sideOffset = 2, alignOffset = -4, collisionPadding, onFocusOutside, children, ...props }, ref) => {
|
|
2814
2831
|
const [bottomClearance] = React27.useState(sharedBottomClearance);
|
|
2815
2832
|
const padding = menuCollisionPadding(collisionPadding ?? 8, 0, bottomClearance);
|
|
2816
2833
|
const nested = useNestedSubmenuPlacement(ref, padding);
|
|
2817
2834
|
const keep = useSubmenuSurvivesParentPanelFocus(nested.ref, onFocusOutside);
|
|
2818
2835
|
const edges = useMenuScrollEdges(keep.ref);
|
|
2819
|
-
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2836
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2820
2837
|
DropdownMenuPrimitive.SubContent,
|
|
2821
2838
|
{
|
|
2822
2839
|
ref: edges.ref,
|
|
@@ -2830,9 +2847,9 @@ var init_dropdown_menu = __esm({
|
|
|
2830
2847
|
...props,
|
|
2831
2848
|
children: nested.wrap(edges.wrap(children))
|
|
2832
2849
|
}
|
|
2833
|
-
)
|
|
2850
|
+
);
|
|
2834
2851
|
});
|
|
2835
|
-
|
|
2852
|
+
OpenDropdownMenuSubContent.displayName = "OpenDropdownMenuSubContent";
|
|
2836
2853
|
CLEARANCE_REUSE_MS = 500;
|
|
2837
2854
|
clearanceCache = /* @__PURE__ */ new Map();
|
|
2838
2855
|
clock = () => typeof performance !== "undefined" ? performance.now() : Date.now();
|
|
@@ -2840,12 +2857,16 @@ var init_dropdown_menu = __esm({
|
|
|
2840
2857
|
BOTTOM_CLEARANCE = "var(--matrx-floating-clearance, 0px)";
|
|
2841
2858
|
sharedTopClearance = () => readClearance(TOP_CLEARANCE, true);
|
|
2842
2859
|
sharedBottomClearance = () => readClearance(BOTTOM_CLEARANCE, true);
|
|
2843
|
-
DropdownMenuContent = React27.forwardRef(({
|
|
2860
|
+
DropdownMenuContent = React27.forwardRef(({ container, ...props }, ref) => {
|
|
2844
2861
|
const portalContainer = usePortalContainer(container);
|
|
2862
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(DropdownMenuPrimitive.Portal, { container: portalContainer, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(OpenDropdownMenuContent, { ref, ...props }) });
|
|
2863
|
+
});
|
|
2864
|
+
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
2865
|
+
OpenDropdownMenuContent = React27.forwardRef(({ className, sideOffset = 4, surface = "default", children, onCloseAutoFocus, collisionPadding, ...props }, ref) => {
|
|
2845
2866
|
const [topClearance] = React27.useState(sharedTopClearance);
|
|
2846
2867
|
const [bottomClearance] = React27.useState(sharedBottomClearance);
|
|
2847
2868
|
const edges = useMenuScrollEdges(ref);
|
|
2848
|
-
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2869
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2849
2870
|
DropdownMenuPrimitive.Content,
|
|
2850
2871
|
{
|
|
2851
2872
|
ref: edges.ref,
|
|
@@ -2865,9 +2886,9 @@ var init_dropdown_menu = __esm({
|
|
|
2865
2886
|
onCloseAutoFocus: keepMovedFocus(onCloseAutoFocus),
|
|
2866
2887
|
children: edges.wrap(children)
|
|
2867
2888
|
}
|
|
2868
|
-
)
|
|
2889
|
+
);
|
|
2869
2890
|
});
|
|
2870
|
-
|
|
2891
|
+
OpenDropdownMenuContent.displayName = "OpenDropdownMenuContent";
|
|
2871
2892
|
DropdownMenuItem = React27.forwardRef(({ className, inset, tone, size, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
2872
2893
|
DropdownMenuPrimitive.Item,
|
|
2873
2894
|
{
|
|
@@ -3581,7 +3602,7 @@ function WritingBoxProvider({
|
|
|
3581
3602
|
Box,
|
|
3582
3603
|
children
|
|
3583
3604
|
}) {
|
|
3584
|
-
return /* @__PURE__ */ (0,
|
|
3605
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(WritingBoxContext.Provider, { value: Box, children });
|
|
3585
3606
|
}
|
|
3586
3607
|
function useWritingBox() {
|
|
3587
3608
|
return React68.useContext(WritingBoxContext) ?? StandInBox;
|
|
@@ -3590,12 +3611,12 @@ function WritingInputProvider({
|
|
|
3590
3611
|
Box,
|
|
3591
3612
|
children
|
|
3592
3613
|
}) {
|
|
3593
|
-
return /* @__PURE__ */ (0,
|
|
3614
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(WritingInputContext.Provider, { value: Box, children });
|
|
3594
3615
|
}
|
|
3595
3616
|
function useWritingInput() {
|
|
3596
3617
|
return React68.useContext(WritingInputContext) ?? StandInInput;
|
|
3597
3618
|
}
|
|
3598
|
-
var React68,
|
|
3619
|
+
var React68, import_jsx_runtime100, KEY, registry4, WritingBoxContext, StandInBox, INPUT_KEY, inputRegistry, WritingInputContext, StandInInput;
|
|
3599
3620
|
var init_writing_box = __esm({
|
|
3600
3621
|
"src/writing-box.tsx"() {
|
|
3601
3622
|
"use strict";
|
|
@@ -3604,7 +3625,7 @@ var init_writing_box = __esm({
|
|
|
3604
3625
|
init_input();
|
|
3605
3626
|
init_textarea();
|
|
3606
3627
|
init_stand_in_notice();
|
|
3607
|
-
|
|
3628
|
+
import_jsx_runtime100 = require("react/jsx-runtime");
|
|
3608
3629
|
KEY = /* @__PURE__ */ Symbol.for("@ai-matrx/design-system/writing-box");
|
|
3609
3630
|
registry4 = globalThis;
|
|
3610
3631
|
WritingBoxContext = registry4[KEY] ?? (registry4[KEY] = React68.createContext(null));
|
|
@@ -3615,7 +3636,7 @@ var init_writing_box = __esm({
|
|
|
3615
3636
|
"A multi-line writing box drew as a plain Textarea (no mic, no read-aloud): the host did not mount <WritingBoxProvider Box={...}>."
|
|
3616
3637
|
);
|
|
3617
3638
|
}, []);
|
|
3618
|
-
return /* @__PURE__ */ (0,
|
|
3639
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Textarea, { ...props, "data-writing-box-host": UNCONFIGURED });
|
|
3619
3640
|
};
|
|
3620
3641
|
INPUT_KEY = /* @__PURE__ */ Symbol.for("@ai-matrx/design-system/writing-input");
|
|
3621
3642
|
inputRegistry = globalThis;
|
|
@@ -3627,7 +3648,7 @@ var init_writing_box = __esm({
|
|
|
3627
3648
|
"A one-line writing input drew as a plain Input (no mic, no read-aloud): the host did not mount <WritingInputProvider Box={...}>."
|
|
3628
3649
|
);
|
|
3629
3650
|
}, []);
|
|
3630
|
-
return /* @__PURE__ */ (0,
|
|
3651
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Input, { ...props, "data-writing-box-host": UNCONFIGURED });
|
|
3631
3652
|
};
|
|
3632
3653
|
}
|
|
3633
3654
|
});
|
|
@@ -3675,12 +3696,12 @@ function ClipboardFallbackDialog({
|
|
|
3675
3696
|
inputRef.current?.focus();
|
|
3676
3697
|
inputRef.current?.select();
|
|
3677
3698
|
};
|
|
3678
|
-
return /* @__PURE__ */ (0,
|
|
3679
|
-
/* @__PURE__ */ (0,
|
|
3680
|
-
/* @__PURE__ */ (0,
|
|
3681
|
-
/* @__PURE__ */ (0,
|
|
3699
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(Dialog, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(DialogContent, { size: "sm", children: [
|
|
3700
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(DialogHeader, { children: [
|
|
3701
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(DialogTitle, { children: title }),
|
|
3702
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(DialogDescription, { children: description })
|
|
3682
3703
|
] }),
|
|
3683
|
-
multiline ? /* @__PURE__ */ (0,
|
|
3704
|
+
multiline ? /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
3684
3705
|
Textarea2,
|
|
3685
3706
|
{
|
|
3686
3707
|
mono: true,
|
|
@@ -3690,7 +3711,7 @@ function ClipboardFallbackDialog({
|
|
|
3690
3711
|
rows: 8,
|
|
3691
3712
|
onFocus: (event) => event.currentTarget.select()
|
|
3692
3713
|
}
|
|
3693
|
-
) : /* @__PURE__ */ (0,
|
|
3714
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
3694
3715
|
Input2,
|
|
3695
3716
|
{
|
|
3696
3717
|
mono: true,
|
|
@@ -3700,17 +3721,17 @@ function ClipboardFallbackDialog({
|
|
|
3700
3721
|
onFocus: (event) => event.currentTarget.select()
|
|
3701
3722
|
}
|
|
3702
3723
|
),
|
|
3703
|
-
blocked ? /* @__PURE__ */ (0,
|
|
3704
|
-
/* @__PURE__ */ (0,
|
|
3705
|
-
/* @__PURE__ */ (0,
|
|
3706
|
-
/* @__PURE__ */ (0,
|
|
3707
|
-
copied ? /* @__PURE__ */ (0,
|
|
3724
|
+
blocked ? /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("p", { role: "status", className: "text-sm text-destructive", children: "Still blocked. Press Cmd/Ctrl+C to copy." }) : null,
|
|
3725
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(DialogFooter, { children: [
|
|
3726
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(Button, { type: "button", variant: "outline", onClick: () => onOpenChange(false), children: "Close" }),
|
|
3727
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(Button, { type: "button", onClick: handleCopy, children: [
|
|
3728
|
+
copied ? /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(CheckIcon, { className: "mr-2 h-4 w-4" }) : /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(CopyIcon, { className: "mr-2 h-4 w-4" }),
|
|
3708
3729
|
copied ? "Copied" : "Copy"
|
|
3709
3730
|
] })
|
|
3710
3731
|
] })
|
|
3711
3732
|
] }) });
|
|
3712
3733
|
}
|
|
3713
|
-
var React70, import_clipboard5,
|
|
3734
|
+
var React70, import_clipboard5, import_jsx_runtime102;
|
|
3714
3735
|
var init_clipboard_fallback_dialog = __esm({
|
|
3715
3736
|
"src/clipboard-fallback-dialog.tsx"() {
|
|
3716
3737
|
"use strict";
|
|
@@ -3722,7 +3743,7 @@ var init_clipboard_fallback_dialog = __esm({
|
|
|
3722
3743
|
init_doors();
|
|
3723
3744
|
init_dialog();
|
|
3724
3745
|
init_icons();
|
|
3725
|
-
|
|
3746
|
+
import_jsx_runtime102 = require("react/jsx-runtime");
|
|
3726
3747
|
}
|
|
3727
3748
|
});
|
|
3728
3749
|
|
|
@@ -3760,45 +3781,45 @@ function AuthGateDialog({
|
|
|
3760
3781
|
if (onNavigate) onNavigate(href);
|
|
3761
3782
|
else window.location.assign(href);
|
|
3762
3783
|
};
|
|
3763
|
-
return /* @__PURE__ */ (0,
|
|
3784
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
3764
3785
|
Dialog,
|
|
3765
3786
|
{
|
|
3766
3787
|
open: isOpen,
|
|
3767
3788
|
onOpenChange: (open) => {
|
|
3768
3789
|
if (!open) onClose();
|
|
3769
3790
|
},
|
|
3770
|
-
children: /* @__PURE__ */ (0,
|
|
3771
|
-
/* @__PURE__ */ (0,
|
|
3772
|
-
/* @__PURE__ */ (0,
|
|
3773
|
-
/* @__PURE__ */ (0,
|
|
3791
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(DialogContent, { size: "sm", children: [
|
|
3792
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(DialogHeader, { children: [
|
|
3793
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(DialogTitle, { children: "Sign in required" }),
|
|
3794
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(DialogDescription, { children: [
|
|
3774
3795
|
featureName,
|
|
3775
3796
|
" requires an account"
|
|
3776
3797
|
] })
|
|
3777
3798
|
] }),
|
|
3778
|
-
/* @__PURE__ */ (0,
|
|
3779
|
-
/* @__PURE__ */ (0,
|
|
3780
|
-
/* @__PURE__ */ (0,
|
|
3781
|
-
/* @__PURE__ */ (0,
|
|
3782
|
-
/* @__PURE__ */ (0,
|
|
3799
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: "flex flex-col items-center gap-5 pb-4 pt-2 text-center", children: [
|
|
3800
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { className: "flex h-14 w-14 items-center justify-center rounded-full bg-primary/10", children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(LockIcon, { className: "h-7 w-7 text-primary" }) }),
|
|
3801
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)("p", { className: "max-w-[280px] text-sm leading-relaxed text-muted-foreground", children: featureDescription || `Sign in to use ${featureName}. Your current work will be right here when you get back.` }),
|
|
3802
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: "flex w-full max-w-[260px] flex-col gap-2.5", children: [
|
|
3803
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(
|
|
3783
3804
|
Button,
|
|
3784
3805
|
{
|
|
3785
3806
|
variant: "primary",
|
|
3786
3807
|
className: "w-full",
|
|
3787
3808
|
onClick: () => go(signInHref ?? DEFAULT_SIGN_IN),
|
|
3788
3809
|
children: [
|
|
3789
|
-
/* @__PURE__ */ (0,
|
|
3810
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(LogInIcon, { className: "mr-2 h-4 w-4" }),
|
|
3790
3811
|
"Sign In"
|
|
3791
3812
|
]
|
|
3792
3813
|
}
|
|
3793
3814
|
),
|
|
3794
|
-
/* @__PURE__ */ (0,
|
|
3815
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(
|
|
3795
3816
|
Button,
|
|
3796
3817
|
{
|
|
3797
3818
|
variant: "outline",
|
|
3798
3819
|
className: "w-full",
|
|
3799
3820
|
onClick: () => go(signUpHref ?? DEFAULT_SIGN_UP),
|
|
3800
3821
|
children: [
|
|
3801
|
-
/* @__PURE__ */ (0,
|
|
3822
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(GemIcon, { className: "mr-2 h-4 w-4" }),
|
|
3802
3823
|
"Create Free Account"
|
|
3803
3824
|
]
|
|
3804
3825
|
}
|
|
@@ -3809,7 +3830,7 @@ function AuthGateDialog({
|
|
|
3809
3830
|
}
|
|
3810
3831
|
);
|
|
3811
3832
|
}
|
|
3812
|
-
var React71,
|
|
3833
|
+
var React71, import_jsx_runtime103, DEFAULT_SIGN_IN, DEFAULT_SIGN_UP, announced2, auth_gate_dialog_default;
|
|
3813
3834
|
var init_auth_gate_dialog = __esm({
|
|
3814
3835
|
"src/auth-gate-dialog.tsx"() {
|
|
3815
3836
|
"use strict";
|
|
@@ -3818,7 +3839,7 @@ var init_auth_gate_dialog = __esm({
|
|
|
3818
3839
|
init_button();
|
|
3819
3840
|
init_dialog();
|
|
3820
3841
|
init_icons();
|
|
3821
|
-
|
|
3842
|
+
import_jsx_runtime103 = require("react/jsx-runtime");
|
|
3822
3843
|
DEFAULT_SIGN_IN = "/login";
|
|
3823
3844
|
DEFAULT_SIGN_UP = "/sign-up";
|
|
3824
3845
|
announced2 = false;
|
|
@@ -3871,17 +3892,17 @@ function EmailInputDialog({
|
|
|
3871
3892
|
setError(null);
|
|
3872
3893
|
onClose();
|
|
3873
3894
|
};
|
|
3874
|
-
return /* @__PURE__ */ (0,
|
|
3875
|
-
/* @__PURE__ */ (0,
|
|
3876
|
-
/* @__PURE__ */ (0,
|
|
3877
|
-
/* @__PURE__ */ (0,
|
|
3895
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Dialog, { open: isOpen, onOpenChange: handleClose, children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(DialogContent, { size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("form", { onSubmit: handleSubmit, noValidate: true, className: "flex flex-col gap-4", children: [
|
|
3896
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(DialogHeader, { children: [
|
|
3897
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(DialogTitle, { className: "flex items-center gap-2", children: [
|
|
3898
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(MailIcon, { className: "h-5 w-5 text-primary" }),
|
|
3878
3899
|
title
|
|
3879
3900
|
] }),
|
|
3880
|
-
/* @__PURE__ */ (0,
|
|
3901
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(DialogDescription, { children: description })
|
|
3881
3902
|
] }),
|
|
3882
|
-
/* @__PURE__ */ (0,
|
|
3883
|
-
/* @__PURE__ */ (0,
|
|
3884
|
-
/* @__PURE__ */ (0,
|
|
3903
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: "space-y-2", children: [
|
|
3904
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Label4, { htmlFor: "email-input-dialog-email", children: "Email address" }),
|
|
3905
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
3885
3906
|
Input2,
|
|
3886
3907
|
{
|
|
3887
3908
|
id: "email-input-dialog-email",
|
|
@@ -3896,9 +3917,9 @@ function EmailInputDialog({
|
|
|
3896
3917
|
autoFocus: true
|
|
3897
3918
|
}
|
|
3898
3919
|
),
|
|
3899
|
-
error ? /* @__PURE__ */ (0,
|
|
3920
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("p", { className: "text-sm text-destructive", children: [
|
|
3900
3921
|
error,
|
|
3901
|
-
/* @__PURE__ */ (0,
|
|
3922
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
3902
3923
|
ErrorActions,
|
|
3903
3924
|
{
|
|
3904
3925
|
message: error,
|
|
@@ -3909,22 +3930,22 @@ function EmailInputDialog({
|
|
|
3909
3930
|
)
|
|
3910
3931
|
] }) : email.trim() && !isValidEmail(email.trim()) ? (
|
|
3911
3932
|
// An offer, never a block: Send stays enabled; pressing it names the problem.
|
|
3912
|
-
/* @__PURE__ */ (0,
|
|
3933
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("p", { className: "text-sm text-muted-foreground", "data-email-hint": true, children: "Not a full address yet, like you@example.com" })
|
|
3913
3934
|
) : null
|
|
3914
3935
|
] }),
|
|
3915
|
-
/* @__PURE__ */ (0,
|
|
3916
|
-
/* @__PURE__ */ (0,
|
|
3917
|
-
/* @__PURE__ */ (0,
|
|
3918
|
-
/* @__PURE__ */ (0,
|
|
3936
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(DialogFooter, { children: [
|
|
3937
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Button, { type: "button", variant: "outline", onClick: handleClose, disabled: loading, children: "Cancel" }),
|
|
3938
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Button, { variant: "primary", type: "submit", disabled: loading || !email.trim(), children: loading ? /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(import_jsx_runtime104.Fragment, { children: [
|
|
3939
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Loader2Icon, { className: "mr-2 h-4 w-4 matrx-spin" }),
|
|
3919
3940
|
"Sending..."
|
|
3920
|
-
] }) : /* @__PURE__ */ (0,
|
|
3921
|
-
/* @__PURE__ */ (0,
|
|
3941
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(import_jsx_runtime104.Fragment, { children: [
|
|
3942
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(MailIcon, { className: "mr-2 h-4 w-4" }),
|
|
3922
3943
|
submitLabel
|
|
3923
3944
|
] }) })
|
|
3924
3945
|
] })
|
|
3925
3946
|
] }) }) });
|
|
3926
3947
|
}
|
|
3927
|
-
var React72,
|
|
3948
|
+
var React72, import_jsx_runtime104, isValidEmail, email_input_dialog_default;
|
|
3928
3949
|
var init_email_input_dialog = __esm({
|
|
3929
3950
|
"src/email-input-dialog.tsx"() {
|
|
3930
3951
|
"use strict";
|
|
@@ -3936,7 +3957,7 @@ var init_email_input_dialog = __esm({
|
|
|
3936
3957
|
init_error_box();
|
|
3937
3958
|
init_icons();
|
|
3938
3959
|
init_label();
|
|
3939
|
-
|
|
3960
|
+
import_jsx_runtime104 = require("react/jsx-runtime");
|
|
3940
3961
|
isValidEmail = (email) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email);
|
|
3941
3962
|
email_input_dialog_default = EmailInputDialog;
|
|
3942
3963
|
}
|
|
@@ -3957,34 +3978,34 @@ function SandboxGateDialog({ open, onChoose, children }) {
|
|
|
3957
3978
|
);
|
|
3958
3979
|
}
|
|
3959
3980
|
}, [open, noPanel]);
|
|
3960
|
-
return /* @__PURE__ */ (0,
|
|
3981
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
3961
3982
|
Dialog,
|
|
3962
3983
|
{
|
|
3963
3984
|
open,
|
|
3964
3985
|
onOpenChange: (next) => {
|
|
3965
3986
|
if (!next) onChoose("cancel");
|
|
3966
3987
|
},
|
|
3967
|
-
children: /* @__PURE__ */ (0,
|
|
3968
|
-
/* @__PURE__ */ (0,
|
|
3969
|
-
/* @__PURE__ */ (0,
|
|
3970
|
-
/* @__PURE__ */ (0,
|
|
3988
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(DialogContent, { size: "md", className: "gap-4", ...noPanel ? { "data-sandbox-gate-panel": UNCONFIGURED } : {}, children: [
|
|
3989
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(DialogHeader, { children: [
|
|
3990
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(DialogTitle, { className: "flex items-center gap-2", children: [
|
|
3991
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(AlertTriangleIcon, { className: "h-4 w-4 text-warning" }),
|
|
3971
3992
|
"Sandbox unavailable"
|
|
3972
3993
|
] }),
|
|
3973
|
-
/* @__PURE__ */ (0,
|
|
3994
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(DialogDescription, { children: "This conversation is bound to a sandbox, but it can't be reached right now (it may be stopped, expired, or still starting). Nothing was sent. Attach or start a sandbox and retry, or send this message without a sandbox." })
|
|
3974
3995
|
] }),
|
|
3975
|
-
children ? /* @__PURE__ */ (0,
|
|
3976
|
-
/* @__PURE__ */ (0,
|
|
3977
|
-
/* @__PURE__ */ (0,
|
|
3978
|
-
/* @__PURE__ */ (0,
|
|
3979
|
-
/* @__PURE__ */ (0,
|
|
3980
|
-
/* @__PURE__ */ (0,
|
|
3996
|
+
children ? /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "max-h-[50dvh] overflow-y-auto rounded-md border border-border", children }) : null,
|
|
3997
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(DialogFooter, { className: "gap-2 sm:justify-between", children: [
|
|
3998
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Button, { variant: "ghost", onClick: () => onChoose("cancel"), children: "Cancel" }),
|
|
3999
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: "flex gap-2", children: [
|
|
4000
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Button, { variant: "outline", onClick: () => onChoose("detach"), children: "Send without sandbox" }),
|
|
4001
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Button, { variant: "primary", onClick: () => onChoose("attach"), children: "Retry with sandbox" })
|
|
3981
4002
|
] })
|
|
3982
4003
|
] })
|
|
3983
4004
|
] })
|
|
3984
4005
|
}
|
|
3985
4006
|
);
|
|
3986
4007
|
}
|
|
3987
|
-
var React73,
|
|
4008
|
+
var React73, import_jsx_runtime105;
|
|
3988
4009
|
var init_sandbox_gate_dialog = __esm({
|
|
3989
4010
|
"src/sandbox-gate-dialog.tsx"() {
|
|
3990
4011
|
"use strict";
|
|
@@ -3994,7 +4015,7 @@ var init_sandbox_gate_dialog = __esm({
|
|
|
3994
4015
|
init_stand_in_notice();
|
|
3995
4016
|
init_dialog();
|
|
3996
4017
|
init_icons();
|
|
3997
|
-
|
|
4018
|
+
import_jsx_runtime105 = require("react/jsx-runtime");
|
|
3998
4019
|
}
|
|
3999
4020
|
});
|
|
4000
4021
|
|
|
@@ -4008,10 +4029,10 @@ function ScopeSetList({
|
|
|
4008
4029
|
items,
|
|
4009
4030
|
renderScope
|
|
4010
4031
|
}) {
|
|
4011
|
-
return /* @__PURE__ */ (0,
|
|
4012
|
-
/* @__PURE__ */ (0,
|
|
4013
|
-
items.length === 0 ? /* @__PURE__ */ (0,
|
|
4014
|
-
/* @__PURE__ */ (0,
|
|
4032
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
4033
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "text-xs font-medium uppercase tracking-wide text-muted-foreground", children: heading }),
|
|
4034
|
+
items.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "text-sm text-muted-foreground", children: "None" }) : /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("ul", { className: "flex flex-col gap-0.5", children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("li", { className: "flex min-w-0 items-center gap-1 text-sm text-foreground", children: [
|
|
4035
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("span", { className: "shrink-0 text-muted-foreground", children: [
|
|
4015
4036
|
item.typeLabel,
|
|
4016
4037
|
":"
|
|
4017
4038
|
] }),
|
|
@@ -4035,32 +4056,32 @@ function ScopeMismatchDialog({
|
|
|
4035
4056
|
);
|
|
4036
4057
|
}
|
|
4037
4058
|
}, [open, plain]);
|
|
4038
|
-
return /* @__PURE__ */ (0,
|
|
4059
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
4039
4060
|
Dialog,
|
|
4040
4061
|
{
|
|
4041
4062
|
open,
|
|
4042
4063
|
onOpenChange: (next) => {
|
|
4043
4064
|
if (!next) onChoose("cancel");
|
|
4044
4065
|
},
|
|
4045
|
-
children: /* @__PURE__ */ (0,
|
|
4046
|
-
/* @__PURE__ */ (0,
|
|
4047
|
-
/* @__PURE__ */ (0,
|
|
4048
|
-
/* @__PURE__ */ (0,
|
|
4066
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(DialogContent, { size: "md", children: [
|
|
4067
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(DialogHeader, { children: [
|
|
4068
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(DialogTitle, { children: "This chat's scopes differ from your current selection" }),
|
|
4069
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(DialogDescription, { children: "Choose which scopes this chat should run under. Dismissing cancels the send \u2014 your message stays in the composer." })
|
|
4049
4070
|
] }),
|
|
4050
|
-
/* @__PURE__ */ (0,
|
|
4051
|
-
/* @__PURE__ */ (0,
|
|
4052
|
-
/* @__PURE__ */ (0,
|
|
4071
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: "grid gap-4 py-1 sm:grid-cols-2", children: [
|
|
4072
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(ScopeSetList, { heading: "Current selection", items: current, renderScope }),
|
|
4073
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(ScopeSetList, { heading: "This chat's scopes", items: chat, renderScope })
|
|
4053
4074
|
] }),
|
|
4054
|
-
/* @__PURE__ */ (0,
|
|
4055
|
-
/* @__PURE__ */ (0,
|
|
4056
|
-
/* @__PURE__ */ (0,
|
|
4057
|
-
/* @__PURE__ */ (0,
|
|
4075
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(DialogFooter, { className: "flex-col gap-2 sm:flex-row sm:justify-end", children: [
|
|
4076
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Button, { type: "button", variant: "outline", onClick: () => onChoose("keep"), children: "Keep chat's scopes" }),
|
|
4077
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Button, { type: "button", variant: "outline", onClick: () => onChoose("combine"), children: "Combine both" }),
|
|
4078
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Button, { variant: "primary", type: "button", onClick: () => onChoose("update"), children: "Use current selection" })
|
|
4058
4079
|
] })
|
|
4059
4080
|
] })
|
|
4060
4081
|
}
|
|
4061
4082
|
);
|
|
4062
4083
|
}
|
|
4063
|
-
var React74,
|
|
4084
|
+
var React74, import_jsx_runtime106, plainScope;
|
|
4064
4085
|
var init_scope_mismatch_dialog = __esm({
|
|
4065
4086
|
"src/scope-mismatch-dialog.tsx"() {
|
|
4066
4087
|
"use strict";
|
|
@@ -4069,8 +4090,8 @@ var init_scope_mismatch_dialog = __esm({
|
|
|
4069
4090
|
init_button();
|
|
4070
4091
|
init_stand_in_notice();
|
|
4071
4092
|
init_dialog();
|
|
4072
|
-
|
|
4073
|
-
plainScope = (item) => /* @__PURE__ */ (0,
|
|
4093
|
+
import_jsx_runtime106 = require("react/jsx-runtime");
|
|
4094
|
+
plainScope = (item) => /* @__PURE__ */ (0, import_jsx_runtime106.jsx)("span", { className: "truncate", "data-scope-mismatch-host": UNCONFIGURED, children: item.name });
|
|
4074
4095
|
}
|
|
4075
4096
|
});
|
|
4076
4097
|
|
|
@@ -4104,17 +4125,17 @@ function ValuePromptsDialog({ request, open, onSettle: settle }) {
|
|
|
4104
4125
|
}, [request, answers, missingRequired, settle]);
|
|
4105
4126
|
const only = request?.fields.length === 1 ? request.fields[0] : void 0;
|
|
4106
4127
|
const single = only && !(answers[only.name] ?? "").includes("\n") ? only : null;
|
|
4107
|
-
return /* @__PURE__ */ (0,
|
|
4108
|
-
/* @__PURE__ */ (0,
|
|
4109
|
-
/* @__PURE__ */ (0,
|
|
4110
|
-
/* @__PURE__ */ (0,
|
|
4128
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Dialog, { open, onOpenChange: (next) => !next && request && settle(null), children: /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(DialogContent, { size: "sm", children: [
|
|
4129
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(DialogHeader, { children: [
|
|
4130
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(DialogTitle, { children: request?.title ?? "" }),
|
|
4131
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(DialogDescription, { className: request?.description ? void 0 : "sr-only", children: request?.description ?? request?.title ?? "" })
|
|
4111
4132
|
] }),
|
|
4112
|
-
/* @__PURE__ */ (0,
|
|
4113
|
-
/* @__PURE__ */ (0,
|
|
4133
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { className: "flex flex-col gap-4 py-1", children: request?.fields.map((field) => /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
|
|
4134
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(Label4, { htmlFor: `value-prompt-${field.name}`, className: "text-sm text-foreground", children: [
|
|
4114
4135
|
field.prompt,
|
|
4115
|
-
field.required ? /* @__PURE__ */ (0,
|
|
4136
|
+
field.required ? /* @__PURE__ */ (0, import_jsx_runtime107.jsx)("span", { className: "ml-1 text-destructive", children: "*" }) : null
|
|
4116
4137
|
] }),
|
|
4117
|
-
single?.name === field.name ? /* @__PURE__ */ (0,
|
|
4138
|
+
single?.name === field.name ? /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
4118
4139
|
WritingInput,
|
|
4119
4140
|
{
|
|
4120
4141
|
id: `value-prompt-${field.name}`,
|
|
@@ -4132,7 +4153,7 @@ function ValuePromptsDialog({ request, open, onSettle: settle }) {
|
|
|
4132
4153
|
}
|
|
4133
4154
|
}
|
|
4134
4155
|
}
|
|
4135
|
-
) : /* @__PURE__ */ (0,
|
|
4156
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
4136
4157
|
WritingBox,
|
|
4137
4158
|
{
|
|
4138
4159
|
id: `value-prompt-${field.name}`,
|
|
@@ -4145,13 +4166,13 @@ function ValuePromptsDialog({ request, open, onSettle: settle }) {
|
|
|
4145
4166
|
}
|
|
4146
4167
|
)
|
|
4147
4168
|
] }, field.name)) }),
|
|
4148
|
-
/* @__PURE__ */ (0,
|
|
4149
|
-
/* @__PURE__ */ (0,
|
|
4150
|
-
/* @__PURE__ */ (0,
|
|
4169
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(DialogFooter, { children: [
|
|
4170
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Button, { type: "button", variant: "outline", onClick: () => settle(null), children: "Cancel" }),
|
|
4171
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Button, { type: "button", variant: "primary", onClick: submit, disabled: missingRequired, children: request?.submitLabel ?? "Continue" })
|
|
4151
4172
|
] })
|
|
4152
4173
|
] }) });
|
|
4153
4174
|
}
|
|
4154
|
-
var React75,
|
|
4175
|
+
var React75, import_jsx_runtime107;
|
|
4155
4176
|
var init_value_prompts_dialog = __esm({
|
|
4156
4177
|
"src/value-prompts-dialog.tsx"() {
|
|
4157
4178
|
"use strict";
|
|
@@ -4161,7 +4182,7 @@ var init_value_prompts_dialog = __esm({
|
|
|
4161
4182
|
init_dialog();
|
|
4162
4183
|
init_label();
|
|
4163
4184
|
init_writing_box();
|
|
4164
|
-
|
|
4185
|
+
import_jsx_runtime107 = require("react/jsx-runtime");
|
|
4165
4186
|
}
|
|
4166
4187
|
});
|
|
4167
4188
|
|
|
@@ -4249,8 +4270,8 @@ function TextInputDialog({
|
|
|
4249
4270
|
if (busy) return;
|
|
4250
4271
|
submit();
|
|
4251
4272
|
};
|
|
4252
|
-
const body = /* @__PURE__ */ (0,
|
|
4253
|
-
multiline ? /* @__PURE__ */ (0,
|
|
4273
|
+
const body = /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("form", { onSubmit: handleFormSubmit, className: "space-y-2", children: [
|
|
4274
|
+
multiline ? /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
4254
4275
|
ProTextarea,
|
|
4255
4276
|
{
|
|
4256
4277
|
autoFocus: true,
|
|
@@ -4270,7 +4291,7 @@ function TextInputDialog({
|
|
|
4270
4291
|
"aria-invalid": !!error,
|
|
4271
4292
|
"aria-describedby": error ? "text-input-dialog-error" : void 0
|
|
4272
4293
|
}
|
|
4273
|
-
) : /* @__PURE__ */ (0,
|
|
4294
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
4274
4295
|
Input2,
|
|
4275
4296
|
{
|
|
4276
4297
|
autoFocus: true,
|
|
@@ -4286,14 +4307,14 @@ function TextInputDialog({
|
|
|
4286
4307
|
"aria-describedby": error ? "text-input-dialog-error" : void 0
|
|
4287
4308
|
}
|
|
4288
4309
|
),
|
|
4289
|
-
error ? /* @__PURE__ */ (0,
|
|
4310
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("p", { id: "text-input-dialog-error", className: "text-sm text-destructive", children: [
|
|
4290
4311
|
error,
|
|
4291
|
-
/* @__PURE__ */ (0,
|
|
4312
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(ErrorActions, { message: error, operation: "Enter a value", source: "inline", origin: "design-system/TextInputDialog" })
|
|
4292
4313
|
] }) : null,
|
|
4293
|
-
/* @__PURE__ */ (0,
|
|
4314
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)("button", { type: "submit", className: "hidden", tabIndex: -1, "aria-hidden": true })
|
|
4294
4315
|
] });
|
|
4295
|
-
const buttons = /* @__PURE__ */ (0,
|
|
4296
|
-
/* @__PURE__ */ (0,
|
|
4316
|
+
const buttons = /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(import_jsx_runtime108.Fragment, { children: [
|
|
4317
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
4297
4318
|
Button,
|
|
4298
4319
|
{
|
|
4299
4320
|
type: "button",
|
|
@@ -4303,22 +4324,22 @@ function TextInputDialog({
|
|
|
4303
4324
|
children: cancelLabel
|
|
4304
4325
|
}
|
|
4305
4326
|
),
|
|
4306
|
-
/* @__PURE__ */ (0,
|
|
4307
|
-
busy ? /* @__PURE__ */ (0,
|
|
4327
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(Button, { type: "button", onClick: submit, disabled: busy || !allowEmpty && !value.trim(), children: [
|
|
4328
|
+
busy ? /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Loader2Icon, { className: "mr-2 h-4 w-4 matrx-spin" }) : null,
|
|
4308
4329
|
confirmLabel
|
|
4309
4330
|
] })
|
|
4310
4331
|
] });
|
|
4311
4332
|
if (isMobile) {
|
|
4312
|
-
return /* @__PURE__ */ (0,
|
|
4313
|
-
/* @__PURE__ */ (0,
|
|
4314
|
-
/* @__PURE__ */ (0,
|
|
4315
|
-
description ? /* @__PURE__ */ (0,
|
|
4333
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Drawer, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(DrawerContent, { children: [
|
|
4334
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(DrawerHeader, { children: [
|
|
4335
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(DrawerTitle, { children: title }),
|
|
4336
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(DrawerDescription, { children: description }) : null
|
|
4316
4337
|
] }),
|
|
4317
|
-
/* @__PURE__ */ (0,
|
|
4318
|
-
/* @__PURE__ */ (0,
|
|
4338
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)("div", { className: "px-4 pb-2", children: body }),
|
|
4339
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(DrawerFooter, { className: "flex-row justify-end gap-2", children: buttons })
|
|
4319
4340
|
] }) });
|
|
4320
4341
|
}
|
|
4321
|
-
return /* @__PURE__ */ (0,
|
|
4342
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Dialog, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(
|
|
4322
4343
|
DialogContent,
|
|
4323
4344
|
{
|
|
4324
4345
|
className: "sm:max-w-md",
|
|
@@ -4328,17 +4349,17 @@ function TextInputDialog({
|
|
|
4328
4349
|
}
|
|
4329
4350
|
},
|
|
4330
4351
|
children: [
|
|
4331
|
-
/* @__PURE__ */ (0,
|
|
4332
|
-
/* @__PURE__ */ (0,
|
|
4333
|
-
description ? /* @__PURE__ */ (0,
|
|
4352
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(DialogHeader, { children: [
|
|
4353
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(DialogTitle, { children: title }),
|
|
4354
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(DialogDescription, { children: description }) : null
|
|
4334
4355
|
] }),
|
|
4335
4356
|
body,
|
|
4336
|
-
/* @__PURE__ */ (0,
|
|
4357
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(DialogFooter, { children: buttons })
|
|
4337
4358
|
]
|
|
4338
4359
|
}
|
|
4339
4360
|
) });
|
|
4340
4361
|
}
|
|
4341
|
-
var React76,
|
|
4362
|
+
var React76, import_jsx_runtime108;
|
|
4342
4363
|
var init_text_input_dialog = __esm({
|
|
4343
4364
|
"src/text-input-dialog.tsx"() {
|
|
4344
4365
|
"use strict";
|
|
@@ -4354,7 +4375,7 @@ var init_text_input_dialog = __esm({
|
|
|
4354
4375
|
init_writing_box();
|
|
4355
4376
|
init_opener_reclick();
|
|
4356
4377
|
init_error_box();
|
|
4357
|
-
|
|
4378
|
+
import_jsx_runtime108 = require("react/jsx-runtime");
|
|
4358
4379
|
}
|
|
4359
4380
|
});
|
|
4360
4381
|
|
|
@@ -4574,6 +4595,7 @@ __export(src_exports, {
|
|
|
4574
4595
|
Peek: () => Peek,
|
|
4575
4596
|
PeekEntityRendererProvider: () => PeekEntityRendererProvider,
|
|
4576
4597
|
PeekHoverCard: () => PeekHoverCard,
|
|
4598
|
+
PeekNotice: () => PeekNotice,
|
|
4577
4599
|
PeekPartRendererProvider: () => PeekPartRendererProvider,
|
|
4578
4600
|
PeekPopover: () => PeekPopover,
|
|
4579
4601
|
PeekWindow: () => PeekWindow,
|
|
@@ -13322,8 +13344,8 @@ function PeekCardRows({ rows, numbered = false, limit }) {
|
|
|
13322
13344
|
rest > 0 ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("li", { className: "type-meta text-muted-foreground", children: `+${rest} more` }) : null
|
|
13323
13345
|
] });
|
|
13324
13346
|
}
|
|
13325
|
-
function PeekCardCode({ text, language, caption }) {
|
|
13326
|
-
return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("figure", { "data-matrx-peek-code": "", className: "flex min-w-0 flex-col overflow-hidden rounded-md border border-border bg-muted", children: [
|
|
13347
|
+
function PeekCardCode({ text, language, caption, raw }) {
|
|
13348
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("figure", { "data-matrx-peek-code": "", "data-kind-source": raw ? "explicit" : void 0, className: "flex min-w-0 flex-col overflow-hidden rounded-md border border-border bg-muted", children: [
|
|
13327
13349
|
language || caption ? /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("figcaption", { className: "type-meta flex min-w-0 items-center gap-2 border-b border-border px-2 py-1 text-muted-foreground", children: [
|
|
13328
13350
|
caption ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { className: "min-w-0 flex-1 truncate font-mono", title: caption, children: caption }) : /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { className: "flex-1" }),
|
|
13329
13351
|
language ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { className: "shrink-0", children: language }) : null
|
|
@@ -14042,7 +14064,7 @@ function Block({ block }) {
|
|
|
14042
14064
|
}))
|
|
14043
14065
|
}
|
|
14044
14066
|
) : null,
|
|
14045
|
-
block.code ? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(PeekCardCode, { text: block.code.text, language: block.code.language, caption: block.code.caption }) : null,
|
|
14067
|
+
block.code ? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(PeekCardCode, { text: block.code.text, language: block.code.language, caption: block.code.caption, raw: block.code.raw }) : null,
|
|
14046
14068
|
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(InputPreview, { section: block }),
|
|
14047
14069
|
block.token ? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(TokenChip, { token: block.token }) : null,
|
|
14048
14070
|
block.links?.length ? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("ul", { className: "flex flex-col gap-0.5", children: block.links.map((link, i) => /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("li", { className: "type-secondary min-w-0 truncate", children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Outbound, { href: link.href, children: link.text }) }, `${i}:${link.href}`)) }) : null
|
|
@@ -15265,11 +15287,58 @@ function TrayMenu({ menu }) {
|
|
|
15265
15287
|
] });
|
|
15266
15288
|
}
|
|
15267
15289
|
|
|
15290
|
+
// src/peek-notice.tsx
|
|
15291
|
+
init_cn();
|
|
15292
|
+
init_controls();
|
|
15293
|
+
init_icons();
|
|
15294
|
+
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
15295
|
+
var LEVEL = {
|
|
15296
|
+
success: { icon: CircleCheckIcon, ink: "text-success-ink", label: "Done" },
|
|
15297
|
+
info: { icon: InfoIcon, ink: "text-info-ink", label: "Notice" },
|
|
15298
|
+
warning: { icon: AlertTriangleIcon, ink: "text-warning-ink", label: "Warning" },
|
|
15299
|
+
error: { icon: CircleXIcon, ink: "text-destructive-ink", label: "Error" }
|
|
15300
|
+
};
|
|
15301
|
+
function PeekNotice({ level, title, subtitle, items, limit = 5, onDismiss }) {
|
|
15302
|
+
const tone = LEVEL[level];
|
|
15303
|
+
const Icon3 = tone.icon;
|
|
15304
|
+
const rows = (items ?? []).map((item, i) => ({
|
|
15305
|
+
key: `${i}:${item.text}`,
|
|
15306
|
+
text: item.text,
|
|
15307
|
+
title: item.text,
|
|
15308
|
+
...item.detail ? { detail: item.detail } : {}
|
|
15309
|
+
}));
|
|
15310
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
|
|
15311
|
+
PeekCard,
|
|
15312
|
+
{
|
|
15313
|
+
size: "md",
|
|
15314
|
+
height: "content",
|
|
15315
|
+
density: "compact",
|
|
15316
|
+
role: level === "error" ? "alert" : "status",
|
|
15317
|
+
"aria-label": `${tone.label}: ${title}`,
|
|
15318
|
+
"data-matrx-peek-notice": level,
|
|
15319
|
+
children: [
|
|
15320
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
15321
|
+
PeekCardHeader,
|
|
15322
|
+
{
|
|
15323
|
+
title,
|
|
15324
|
+
leading: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Icon3, { className: cn("size-4", tone.ink) }),
|
|
15325
|
+
...subtitle ? { subtitle } : {},
|
|
15326
|
+
...onDismiss ? {
|
|
15327
|
+
trailing: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Button2, { type: "button", variant: "quiet", "aria-label": "Dismiss", title: "Dismiss", icon: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(XIcon, { className: "size-3.5" }), onClick: onDismiss })
|
|
15328
|
+
} : {}
|
|
15329
|
+
}
|
|
15330
|
+
),
|
|
15331
|
+
rows.length ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(PeekCardBody, { children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(PeekCardRows, { rows, limit }) }) : null
|
|
15332
|
+
]
|
|
15333
|
+
}
|
|
15334
|
+
);
|
|
15335
|
+
}
|
|
15336
|
+
|
|
15268
15337
|
// src/radio-group.tsx
|
|
15269
15338
|
var RadioGroupPrimitive = __toESM(require("@radix-ui/react-radio-group"), 1);
|
|
15270
15339
|
var React65 = __toESM(require("react"), 1);
|
|
15271
15340
|
init_cn();
|
|
15272
|
-
var
|
|
15341
|
+
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
15273
15342
|
var RadioGroupSizeContext = React65.createContext("md");
|
|
15274
15343
|
var CONTROL_CLASSES = {
|
|
15275
15344
|
sm: "h-3.5 w-3.5",
|
|
@@ -15281,7 +15350,7 @@ var DOT_CLASSES = {
|
|
|
15281
15350
|
md: "h-1.5 w-1.5",
|
|
15282
15351
|
lg: "h-2 w-2"
|
|
15283
15352
|
};
|
|
15284
|
-
var RadioGroup5 = React65.forwardRef(({ className, size = "md", ...props }, ref) => /* @__PURE__ */ (0,
|
|
15353
|
+
var RadioGroup5 = React65.forwardRef(({ className, size = "md", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(RadioGroupSizeContext.Provider, { value: size, children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
15285
15354
|
RadioGroupPrimitive.Root,
|
|
15286
15355
|
{
|
|
15287
15356
|
ref,
|
|
@@ -15294,7 +15363,7 @@ RadioGroup5.displayName = RadioGroupPrimitive.Root.displayName;
|
|
|
15294
15363
|
var RadioGroupItem = React65.forwardRef(({ className, size, ...props }, ref) => {
|
|
15295
15364
|
const groupSize = React65.useContext(RadioGroupSizeContext);
|
|
15296
15365
|
const resolved = size ?? groupSize;
|
|
15297
|
-
return /* @__PURE__ */ (0,
|
|
15366
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
15298
15367
|
RadioGroupPrimitive.Item,
|
|
15299
15368
|
{
|
|
15300
15369
|
ref,
|
|
@@ -15311,7 +15380,7 @@ var RadioGroupItem = React65.forwardRef(({ className, size, ...props }, ref) =>
|
|
|
15311
15380
|
className
|
|
15312
15381
|
),
|
|
15313
15382
|
...props,
|
|
15314
|
-
children: /* @__PURE__ */ (0,
|
|
15383
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
15315
15384
|
"div",
|
|
15316
15385
|
{
|
|
15317
15386
|
className: cn("rounded-full bg-primary-foreground", DOT_CLASSES[resolved])
|
|
@@ -15330,7 +15399,7 @@ function RadioList({
|
|
|
15330
15399
|
"aria-label": ariaLabel
|
|
15331
15400
|
}) {
|
|
15332
15401
|
const baseId = React65.useId();
|
|
15333
|
-
return /* @__PURE__ */ (0,
|
|
15402
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
15334
15403
|
RadioGroup5,
|
|
15335
15404
|
{
|
|
15336
15405
|
value,
|
|
@@ -15341,7 +15410,7 @@ function RadioList({
|
|
|
15341
15410
|
children: options.map((opt, i) => {
|
|
15342
15411
|
const selected = value === opt.value;
|
|
15343
15412
|
const id = `${baseId}-${i}`;
|
|
15344
|
-
return /* @__PURE__ */ (0,
|
|
15413
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
15345
15414
|
"label",
|
|
15346
15415
|
{
|
|
15347
15416
|
htmlFor: id,
|
|
@@ -15352,9 +15421,9 @@ function RadioList({
|
|
|
15352
15421
|
opt.disabled && "cursor-not-allowed text-disabled-foreground"
|
|
15353
15422
|
),
|
|
15354
15423
|
children: [
|
|
15355
|
-
/* @__PURE__ */ (0,
|
|
15356
|
-
/* @__PURE__ */ (0,
|
|
15357
|
-
opt.hint != null && opt.hint !== "" ? /* @__PURE__ */ (0,
|
|
15424
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(RadioGroupItem, { id, value: opt.value, disabled: opt.disabled }),
|
|
15425
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "flex-1 truncate", children: opt.label }),
|
|
15426
|
+
opt.hint != null && opt.hint !== "" ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "shrink-0 text-xs tabular-nums text-muted-foreground", children: opt.hint }) : null
|
|
15358
15427
|
]
|
|
15359
15428
|
},
|
|
15360
15429
|
opt.value
|
|
@@ -15370,7 +15439,7 @@ var TogglePrimitive = __toESM(require("@radix-ui/react-toggle"), 1);
|
|
|
15370
15439
|
var import_class_variance_authority7 = require("class-variance-authority");
|
|
15371
15440
|
var React66 = __toESM(require("react"), 1);
|
|
15372
15441
|
init_cn();
|
|
15373
|
-
var
|
|
15442
|
+
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
15374
15443
|
var toggleVariants = (0, import_class_variance_authority7.cva)(
|
|
15375
15444
|
"inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
15376
15445
|
{
|
|
@@ -15396,7 +15465,7 @@ var toggleVariants = (0, import_class_variance_authority7.cva)(
|
|
|
15396
15465
|
}
|
|
15397
15466
|
}
|
|
15398
15467
|
);
|
|
15399
|
-
var Toggle = React66.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ (0,
|
|
15468
|
+
var Toggle = React66.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
15400
15469
|
TogglePrimitive.Root,
|
|
15401
15470
|
{
|
|
15402
15471
|
ref,
|
|
@@ -15407,20 +15476,20 @@ var Toggle = React66.forwardRef(({ className, variant, size, ...props }, ref) =>
|
|
|
15407
15476
|
));
|
|
15408
15477
|
Toggle.displayName = TogglePrimitive.Root.displayName;
|
|
15409
15478
|
var ToggleGroupContext = React66.createContext({ size: "default", variant: "default" });
|
|
15410
|
-
var ToggleGroup = React66.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ (0,
|
|
15479
|
+
var ToggleGroup = React66.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
15411
15480
|
ToggleGroupPrimitive.Root,
|
|
15412
15481
|
{
|
|
15413
15482
|
ref,
|
|
15414
15483
|
"data-slot": "toggle-group",
|
|
15415
15484
|
className: cn("flex items-center justify-center gap-1", className),
|
|
15416
15485
|
...props,
|
|
15417
|
-
children: /* @__PURE__ */ (0,
|
|
15486
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(ToggleGroupContext.Provider, { value: { variant, size }, children })
|
|
15418
15487
|
}
|
|
15419
15488
|
));
|
|
15420
15489
|
ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
|
|
15421
15490
|
var ToggleGroupItem = React66.forwardRef(({ className, children, variant, size, ...props }, ref) => {
|
|
15422
15491
|
const context = React66.useContext(ToggleGroupContext);
|
|
15423
|
-
return /* @__PURE__ */ (0,
|
|
15492
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
15424
15493
|
ToggleGroupPrimitive.Item,
|
|
15425
15494
|
{
|
|
15426
15495
|
ref,
|
|
@@ -15445,7 +15514,7 @@ init_cn();
|
|
|
15445
15514
|
init_icons();
|
|
15446
15515
|
init_controls();
|
|
15447
15516
|
init_motion();
|
|
15448
|
-
var
|
|
15517
|
+
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
15449
15518
|
var BASE_SIZE = 40;
|
|
15450
15519
|
var BASE_ICON = 20;
|
|
15451
15520
|
var REACH = 150;
|
|
@@ -15465,29 +15534,29 @@ function FloatingDock({
|
|
|
15465
15534
|
growthFactor = 2,
|
|
15466
15535
|
labelPosition = "top"
|
|
15467
15536
|
}) {
|
|
15468
|
-
return /* @__PURE__ */ (0,
|
|
15469
|
-
/* @__PURE__ */ (0,
|
|
15470
|
-
/* @__PURE__ */ (0,
|
|
15537
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: cn("flex w-auto items-center justify-center bg-background", className), children: [
|
|
15538
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(FloatingDockPhone, { items }),
|
|
15539
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(FloatingDockDesktop, { items, growthFactor, labelPosition })
|
|
15471
15540
|
] });
|
|
15472
15541
|
}
|
|
15473
15542
|
function BalancedFloatingDock(props) {
|
|
15474
|
-
return /* @__PURE__ */ (0,
|
|
15543
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(FloatingDock, { growthFactor: 1.8, labelPosition: "side", ...props });
|
|
15475
15544
|
}
|
|
15476
15545
|
function FloatingDockPhone({ items }) {
|
|
15477
15546
|
const [open, setOpen] = React67.useState(false);
|
|
15478
|
-
return /* @__PURE__ */ (0,
|
|
15479
|
-
/* @__PURE__ */ (0,
|
|
15547
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "relative block md:hidden", children: [
|
|
15548
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
15480
15549
|
Button2,
|
|
15481
15550
|
{
|
|
15482
15551
|
type: "button",
|
|
15483
15552
|
variant: "quiet",
|
|
15484
15553
|
"aria-label": open ? "Close menu" : "Open menu",
|
|
15485
|
-
icon: open ? /* @__PURE__ */ (0,
|
|
15554
|
+
icon: open ? /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(PanelTopCloseIcon, { className: "h-5 w-5" }) : /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(PanelTopOpenIcon, { className: "h-5 w-5" }),
|
|
15486
15555
|
"aria-expanded": open,
|
|
15487
15556
|
onClick: () => setOpen(!open)
|
|
15488
15557
|
}
|
|
15489
15558
|
),
|
|
15490
|
-
/* @__PURE__ */ (0,
|
|
15559
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
15491
15560
|
"div",
|
|
15492
15561
|
{
|
|
15493
15562
|
"data-open": open,
|
|
@@ -15497,32 +15566,32 @@ function FloatingDockPhone({ items }) {
|
|
|
15497
15566
|
PANEL_MOTION_CLASS,
|
|
15498
15567
|
open ? "translate-y-0" : "pointer-events-none -translate-y-full"
|
|
15499
15568
|
),
|
|
15500
|
-
children: /* @__PURE__ */ (0,
|
|
15501
|
-
/* @__PURE__ */ (0,
|
|
15502
|
-
/* @__PURE__ */ (0,
|
|
15503
|
-
/* @__PURE__ */ (0,
|
|
15569
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "flex h-full flex-col", children: [
|
|
15570
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "flex items-center justify-between border-b border-border p-4", children: [
|
|
15571
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("h2", { className: "text-lg font-medium", children: "Menu" }),
|
|
15572
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
15504
15573
|
Button2,
|
|
15505
15574
|
{
|
|
15506
15575
|
type: "button",
|
|
15507
15576
|
variant: "quiet",
|
|
15508
15577
|
"aria-label": "Close menu",
|
|
15509
|
-
icon: /* @__PURE__ */ (0,
|
|
15578
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(XIcon, { className: "h-6 w-6" }),
|
|
15510
15579
|
onClick: () => setOpen(false)
|
|
15511
15580
|
}
|
|
15512
15581
|
)
|
|
15513
15582
|
] }),
|
|
15514
|
-
/* @__PURE__ */ (0,
|
|
15583
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "flex-1 overflow-y-auto", children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
|
|
15515
15584
|
HostLink,
|
|
15516
15585
|
{
|
|
15517
15586
|
href: item.href,
|
|
15518
15587
|
className: "flex items-center justify-between border-b border-border p-4",
|
|
15519
15588
|
onClick: () => setOpen(false),
|
|
15520
15589
|
children: [
|
|
15521
|
-
/* @__PURE__ */ (0,
|
|
15522
|
-
/* @__PURE__ */ (0,
|
|
15523
|
-
/* @__PURE__ */ (0,
|
|
15590
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "flex items-center space-x-4", children: [
|
|
15591
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "flex h-10 w-10 items-center justify-center rounded-full bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { className: "h-5 w-5 [&>svg]:h-full [&>svg]:w-full", children: item.icon }) }),
|
|
15592
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("span", { className: "font-medium", children: item.label })
|
|
15524
15593
|
] }),
|
|
15525
|
-
/* @__PURE__ */ (0,
|
|
15594
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(ChevronRightIcon, { className: "h-5 w-5 text-muted-foreground" })
|
|
15526
15595
|
]
|
|
15527
15596
|
},
|
|
15528
15597
|
item.label
|
|
@@ -15549,7 +15618,7 @@ function FloatingDockDesktop({
|
|
|
15549
15618
|
})
|
|
15550
15619
|
);
|
|
15551
15620
|
};
|
|
15552
|
-
return /* @__PURE__ */ (0,
|
|
15621
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
15553
15622
|
"div",
|
|
15554
15623
|
{
|
|
15555
15624
|
onMouseMove: (e) => measure(e.clientX),
|
|
@@ -15563,8 +15632,8 @@ function FloatingDockDesktop({
|
|
|
15563
15632
|
const size = dockSize(BASE_SIZE, growthFactor, distance);
|
|
15564
15633
|
const icon = dockSize(BASE_ICON, growthFactor, distance);
|
|
15565
15634
|
const under = Number.isFinite(distance) && Math.abs(distance) < BASE_SIZE / 2;
|
|
15566
|
-
return /* @__PURE__ */ (0,
|
|
15567
|
-
/* @__PURE__ */ (0,
|
|
15635
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(HostLink, { href: item.href, "aria-label": item.label, children: /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("div", { className: "relative", children: [
|
|
15636
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
15568
15637
|
"div",
|
|
15569
15638
|
{
|
|
15570
15639
|
ref: (el) => {
|
|
@@ -15575,7 +15644,7 @@ function FloatingDockDesktop({
|
|
|
15575
15644
|
"relative flex aspect-square items-center justify-center rounded-full bg-muted transition-[width,height]",
|
|
15576
15645
|
MAGNIFY_MOTION
|
|
15577
15646
|
),
|
|
15578
|
-
children: /* @__PURE__ */ (0,
|
|
15647
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
15579
15648
|
"div",
|
|
15580
15649
|
{
|
|
15581
15650
|
style: { width: icon, height: icon },
|
|
@@ -15588,7 +15657,7 @@ function FloatingDockDesktop({
|
|
|
15588
15657
|
)
|
|
15589
15658
|
}
|
|
15590
15659
|
),
|
|
15591
|
-
/* @__PURE__ */ (0,
|
|
15660
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
15592
15661
|
"div",
|
|
15593
15662
|
{
|
|
15594
15663
|
"data-shown": under,
|
|
@@ -15614,7 +15683,7 @@ init_writing_box();
|
|
|
15614
15683
|
|
|
15615
15684
|
// src/deferred-dialog.tsx
|
|
15616
15685
|
var React69 = __toESM(require("react"), 1);
|
|
15617
|
-
var
|
|
15686
|
+
var import_jsx_runtime101 = require("react/jsx-runtime");
|
|
15618
15687
|
function deferredDialog(name, load, isOpen) {
|
|
15619
15688
|
let pending = null;
|
|
15620
15689
|
const preload = () => pending ??= load().then((component) => ({ default: component }));
|
|
@@ -15624,7 +15693,7 @@ function deferredDialog(name, load, isOpen) {
|
|
|
15624
15693
|
const [opened, setOpened] = React69.useState(open);
|
|
15625
15694
|
if (open && !opened) setOpened(true);
|
|
15626
15695
|
if (!open && !opened) return null;
|
|
15627
|
-
return /* @__PURE__ */ (0,
|
|
15696
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(React69.Suspense, { fallback: null, children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(Body, { ...props }) });
|
|
15628
15697
|
}
|
|
15629
15698
|
Deferred.displayName = name;
|
|
15630
15699
|
return Object.assign(Deferred, { preload });
|
|
@@ -15670,10 +15739,10 @@ var TextInputDialog2 = deferredDialog(
|
|
|
15670
15739
|
// src/clipboard-fallback-host.tsx
|
|
15671
15740
|
var import_clipboard_fallback_opener = require("@ai-matrx/kit/clipboard-fallback-opener");
|
|
15672
15741
|
var import_opener_react2 = require("@ai-matrx/kit/opener-react");
|
|
15673
|
-
var
|
|
15742
|
+
var import_jsx_runtime109 = require("react/jsx-runtime");
|
|
15674
15743
|
function ClipboardFallbackHost() {
|
|
15675
15744
|
const { open, shown, settle } = (0, import_opener_react2.useOpenerHost)(import_clipboard_fallback_opener.clipboardFallbackOpener);
|
|
15676
|
-
return /* @__PURE__ */ (0,
|
|
15745
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
15677
15746
|
ClipboardFallbackDialog2,
|
|
15678
15747
|
{
|
|
15679
15748
|
open,
|
|
@@ -15690,7 +15759,7 @@ function ClipboardFallbackHost() {
|
|
|
15690
15759
|
// src/floating-sheet.tsx
|
|
15691
15760
|
var import_react21 = require("react");
|
|
15692
15761
|
init_motion();
|
|
15693
|
-
var
|
|
15762
|
+
var import_jsx_runtime110 = require("react/jsx-runtime");
|
|
15694
15763
|
var FloatingSheet = ({
|
|
15695
15764
|
children,
|
|
15696
15765
|
isOpen,
|
|
@@ -15996,8 +16065,8 @@ var FloatingSheet = ({
|
|
|
15996
16065
|
const bottomPadding = showFooter ? "" : "pb-safe";
|
|
15997
16066
|
return `${basePadding} ${bottomPadding}`.trim();
|
|
15998
16067
|
};
|
|
15999
|
-
return /* @__PURE__ */ (0,
|
|
16000
|
-
isOpen && hasBackdrop && /* @__PURE__ */ (0,
|
|
16068
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(import_jsx_runtime110.Fragment, { children: [
|
|
16069
|
+
isOpen && hasBackdrop && /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
16001
16070
|
"div",
|
|
16002
16071
|
{
|
|
16003
16072
|
className: `fixed ${respectHeader ? "left-0 right-0 top-10 bottom-0" : "inset-0"} bg-[var(--matrx-overlay-scrim-soft)] z-40 ${isMobile ? "backdrop-blur-sm" : ""} transition-opacity ${durationClass} ${backdropClassName}`,
|
|
@@ -16006,7 +16075,7 @@ var FloatingSheet = ({
|
|
|
16006
16075
|
"data-testid": "floating-sheet-backdrop"
|
|
16007
16076
|
}
|
|
16008
16077
|
),
|
|
16009
|
-
/* @__PURE__ */ (0,
|
|
16078
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
16010
16079
|
"div",
|
|
16011
16080
|
{
|
|
16012
16081
|
ref: sheetRef,
|
|
@@ -16018,25 +16087,25 @@ var FloatingSheet = ({
|
|
|
16018
16087
|
"aria-labelledby": "sheet-title",
|
|
16019
16088
|
tabIndex: -1,
|
|
16020
16089
|
"data-testid": "floating-sheet",
|
|
16021
|
-
children: /* @__PURE__ */ (0,
|
|
16022
|
-
showHeader && /* @__PURE__ */ (0,
|
|
16090
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("div", { className: "flex flex-col h-full overflow-hidden", children: [
|
|
16091
|
+
showHeader && /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(
|
|
16023
16092
|
"div",
|
|
16024
16093
|
{
|
|
16025
16094
|
className: `flex items-center justify-between border-b border-border ${getMobileHeaderClass()} ${headerClassName}`,
|
|
16026
16095
|
children: [
|
|
16027
|
-
/* @__PURE__ */ (0,
|
|
16028
|
-
typeof title === "string" ? /* @__PURE__ */ (0,
|
|
16029
|
-
description && (typeof description === "string" ? /* @__PURE__ */ (0,
|
|
16096
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("div", { className: "flex-1 min-w-0", children: [
|
|
16097
|
+
typeof title === "string" ? /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("h2", { id: "sheet-title", className: `${isMobile ? "text-xl" : "text-lg"} font-semibold text-foreground`, children: title }) : /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("div", { id: "sheet-title", children: title }),
|
|
16098
|
+
description && (typeof description === "string" ? /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("p", { className: "type-body text-muted-foreground mt-1", children: description }) : /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("div", { className: "mt-1", children: description }))
|
|
16030
16099
|
] }),
|
|
16031
|
-
headerContent && /* @__PURE__ */ (0,
|
|
16032
|
-
showCloseButton && /* @__PURE__ */ (0,
|
|
16100
|
+
headerContent && /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("div", { className: "ml-4 flex items-center", children: headerContent }),
|
|
16101
|
+
showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
16033
16102
|
"button",
|
|
16034
16103
|
{
|
|
16035
16104
|
onClick: onClose,
|
|
16036
16105
|
className: `ml-4 rounded-full ${isMobile ? "p-2" : "p-1.5"} text-muted-foreground hover:text-foreground bg-transparent hover:bg-accent focus:outline-none focus:ring-2 focus:ring-ring`,
|
|
16037
16106
|
"aria-label": "Close",
|
|
16038
16107
|
"data-testid": "floating-sheet-close",
|
|
16039
|
-
children: closeButton || /* @__PURE__ */ (0,
|
|
16108
|
+
children: closeButton || /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(
|
|
16040
16109
|
"svg",
|
|
16041
16110
|
{
|
|
16042
16111
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -16048,8 +16117,8 @@ var FloatingSheet = ({
|
|
|
16048
16117
|
strokeLinecap: "round",
|
|
16049
16118
|
strokeLinejoin: "round",
|
|
16050
16119
|
children: [
|
|
16051
|
-
/* @__PURE__ */ (0,
|
|
16052
|
-
/* @__PURE__ */ (0,
|
|
16120
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
16121
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
16053
16122
|
]
|
|
16054
16123
|
}
|
|
16055
16124
|
)
|
|
@@ -16058,7 +16127,7 @@ var FloatingSheet = ({
|
|
|
16058
16127
|
]
|
|
16059
16128
|
}
|
|
16060
16129
|
),
|
|
16061
|
-
/* @__PURE__ */ (0,
|
|
16130
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
16062
16131
|
"div",
|
|
16063
16132
|
{
|
|
16064
16133
|
ref: contentRef,
|
|
@@ -16067,7 +16136,7 @@ var FloatingSheet = ({
|
|
|
16067
16136
|
children
|
|
16068
16137
|
}
|
|
16069
16138
|
),
|
|
16070
|
-
showFooter && /* @__PURE__ */ (0,
|
|
16139
|
+
showFooter && /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
16071
16140
|
"div",
|
|
16072
16141
|
{
|
|
16073
16142
|
className: `border-t border-border ${getMobileFooterClass()} ${footerClassName}`,
|
|
@@ -16082,12 +16151,12 @@ var FloatingSheet = ({
|
|
|
16082
16151
|
};
|
|
16083
16152
|
|
|
16084
16153
|
// src/simple-tooltip.tsx
|
|
16085
|
-
var
|
|
16154
|
+
var import_jsx_runtime111 = require("react/jsx-runtime");
|
|
16086
16155
|
var SimpleTooltip = ({ children, text }) => {
|
|
16087
16156
|
if (!text) return children;
|
|
16088
|
-
return /* @__PURE__ */ (0,
|
|
16089
|
-
/* @__PURE__ */ (0,
|
|
16090
|
-
/* @__PURE__ */ (0,
|
|
16157
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(Tooltip, { children: [
|
|
16158
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(TooltipTrigger, { asChild: true, children }),
|
|
16159
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(TooltipContent, { children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("p", { children: text }) })
|
|
16091
16160
|
] });
|
|
16092
16161
|
};
|
|
16093
16162
|
var AdvancedTooltip = ({
|
|
@@ -16110,16 +16179,16 @@ var AdvancedTooltip = ({
|
|
|
16110
16179
|
success: "bg-success text-success-foreground"
|
|
16111
16180
|
};
|
|
16112
16181
|
const baseContentClasses = "rounded-md px-3 py-1.5 text-sm shadow-md";
|
|
16113
|
-
return /* @__PURE__ */ (0,
|
|
16114
|
-
/* @__PURE__ */ (0,
|
|
16115
|
-
/* @__PURE__ */ (0,
|
|
16182
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsxs)(Tooltip, { delayDuration, children: [
|
|
16183
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(TooltipTrigger, { asChild: true, className, children }),
|
|
16184
|
+
/* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
16116
16185
|
TooltipContent,
|
|
16117
16186
|
{
|
|
16118
16187
|
side,
|
|
16119
16188
|
align,
|
|
16120
16189
|
sideOffset,
|
|
16121
16190
|
className: `${baseContentClasses} ${variantStyles[variant]} ${contentClassName}`,
|
|
16122
|
-
children: /* @__PURE__ */ (0,
|
|
16191
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)("p", { className: "leading-none whitespace-pre-wrap", children: text })
|
|
16123
16192
|
}
|
|
16124
16193
|
)
|
|
16125
16194
|
] });
|
|
@@ -16129,7 +16198,7 @@ var AdvancedTooltip = ({
|
|
|
16129
16198
|
var import_react22 = __toESM(require("react"), 1);
|
|
16130
16199
|
init_cn();
|
|
16131
16200
|
init_icons();
|
|
16132
|
-
var
|
|
16201
|
+
var import_jsx_runtime112 = require("react/jsx-runtime");
|
|
16133
16202
|
var animationStyles = `
|
|
16134
16203
|
@keyframes pulseWave {
|
|
16135
16204
|
0% { opacity: 0.3; transform: scale(0.8); }
|
|
@@ -16206,19 +16275,19 @@ var LoadingSpinner = ({
|
|
|
16206
16275
|
}
|
|
16207
16276
|
};
|
|
16208
16277
|
const sizeClasses2 = getSizeClasses();
|
|
16209
|
-
const renderDots = () => /* @__PURE__ */ (0,
|
|
16210
|
-
/* @__PURE__ */ (0,
|
|
16211
|
-
/* @__PURE__ */ (0,
|
|
16212
|
-
/* @__PURE__ */ (0,
|
|
16278
|
+
const renderDots = () => /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("div", { className: cn("flex items-center", sizeClasses2.container), children: [
|
|
16279
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { className: cn(sizeClasses2.dot, "bg-primary dark:bg-primary-foreground rounded-full loading-pulse-1") }),
|
|
16280
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { className: cn(sizeClasses2.dot, "bg-primary dark:bg-primary-foreground rounded-full loading-pulse-2") }),
|
|
16281
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { className: cn(sizeClasses2.dot, "bg-primary dark:bg-primary-foreground rounded-full loading-pulse-3") })
|
|
16213
16282
|
] });
|
|
16214
|
-
const renderBars = () => /* @__PURE__ */ (0,
|
|
16215
|
-
/* @__PURE__ */ (0,
|
|
16216
|
-
/* @__PURE__ */ (0,
|
|
16217
|
-
/* @__PURE__ */ (0,
|
|
16218
|
-
/* @__PURE__ */ (0,
|
|
16283
|
+
const renderBars = () => /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("div", { className: cn("flex items-center", sizeClasses2.container), children: [
|
|
16284
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { className: cn(sizeClasses2.bar, "bg-primary dark:bg-primary-foreground rounded-sm loading-bounce-1") }),
|
|
16285
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { className: cn(sizeClasses2.bar, "bg-primary dark:bg-primary-foreground rounded-sm loading-bounce-2") }),
|
|
16286
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { className: cn(sizeClasses2.bar, "bg-primary dark:bg-primary-foreground rounded-sm loading-bounce-3") }),
|
|
16287
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { className: cn(sizeClasses2.bar, "bg-primary dark:bg-primary-foreground rounded-sm loading-bounce-4") })
|
|
16219
16288
|
] });
|
|
16220
|
-
const renderBrain = () => /* @__PURE__ */ (0,
|
|
16221
|
-
/* @__PURE__ */ (0,
|
|
16289
|
+
const renderBrain = () => /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("div", { className: "relative w-6 h-6 flex items-center justify-center", children: [
|
|
16290
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { className: "absolute", children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
16222
16291
|
"svg",
|
|
16223
16292
|
{
|
|
16224
16293
|
width: "24",
|
|
@@ -16226,7 +16295,7 @@ var LoadingSpinner = ({
|
|
|
16226
16295
|
viewBox: "0 0 24 24",
|
|
16227
16296
|
fill: "none",
|
|
16228
16297
|
className: "w-5 h-5 text-primary dark:text-primary-foreground",
|
|
16229
|
-
children: /* @__PURE__ */ (0,
|
|
16298
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
16230
16299
|
"path",
|
|
16231
16300
|
{
|
|
16232
16301
|
d: "M12 4C9.5 4 7.5 5.5 7.5 8C7.5 9 7.5 9.5 7 10.5C6.5 11.5 6 12 6 13.5C6 15.5 7.5 17 9.5 17C10.5 17 11 16.5 12 16.5C13 16.5 13.5 17 14.5 17C16.5 17 18 15.5 18 13.5C18 12 17.5 11.5 17 10.5C16.5 9.5 16.5 9 16.5 8C16.5 5.5 14.5 4 12 4Z",
|
|
@@ -16237,44 +16306,44 @@ var LoadingSpinner = ({
|
|
|
16237
16306
|
)
|
|
16238
16307
|
}
|
|
16239
16308
|
) }),
|
|
16240
|
-
/* @__PURE__ */ (0,
|
|
16241
|
-
/* @__PURE__ */ (0,
|
|
16242
|
-
/* @__PURE__ */ (0,
|
|
16243
|
-
/* @__PURE__ */ (0,
|
|
16244
|
-
/* @__PURE__ */ (0,
|
|
16245
|
-
/* @__PURE__ */ (0,
|
|
16309
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("div", { className: "absolute inset-0", children: [
|
|
16310
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { className: "absolute w-1 h-1 bg-primary/60 dark:bg-primary-foreground/60 rounded-full left-[8px] top-[10px] loading-neuron-1" }),
|
|
16311
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { className: "absolute w-1 h-1 bg-primary/60 dark:bg-primary-foreground/60 rounded-full left-[12px] top-[8px] loading-neuron-2" }),
|
|
16312
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { className: "absolute w-1 h-1 bg-primary/60 dark:bg-primary-foreground/60 rounded-full left-[16px] top-[10px] loading-neuron-3" }),
|
|
16313
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { className: "absolute w-1 h-1 bg-primary/60 dark:bg-primary-foreground/60 rounded-full left-[10px] top-[14px] loading-neuron-4" }),
|
|
16314
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { className: "absolute w-1 h-1 bg-primary/60 dark:bg-primary-foreground/60 rounded-full left-[14px] top-[14px] loading-neuron-5" })
|
|
16246
16315
|
] }),
|
|
16247
|
-
/* @__PURE__ */ (0,
|
|
16248
|
-
/* @__PURE__ */ (0,
|
|
16316
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { className: "absolute w-full h-full rounded-full border border-primary/30 dark:border-primary-foreground/30 loading-brain-pulse-1" }),
|
|
16317
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { className: "absolute w-full h-full rounded-full border border-primary/30 dark:border-primary-foreground/30 loading-brain-pulse-2" })
|
|
16249
16318
|
] });
|
|
16250
|
-
const renderMinimal = () => /* @__PURE__ */ (0,
|
|
16251
|
-
const renderWorkflow = () => /* @__PURE__ */ (0,
|
|
16252
|
-
/* @__PURE__ */ (0,
|
|
16253
|
-
/* @__PURE__ */ (0,
|
|
16254
|
-
/* @__PURE__ */ (0,
|
|
16255
|
-
/* @__PURE__ */ (0,
|
|
16319
|
+
const renderMinimal = () => /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { className: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { className: cn(sizeClasses2.dot, "bg-primary dark:bg-primary-foreground rounded-full loading-pulse-1") }) });
|
|
16320
|
+
const renderWorkflow = () => /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("div", { className: "flex flex-col items-center justify-center space-y-6", children: [
|
|
16321
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("div", { className: "relative", children: [
|
|
16322
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { className: "w-16 h-16 bg-primary/10 dark:bg-primary-foreground/10 rounded-full flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(WorkflowIcon, { className: "w-8 h-8 text-primary dark:text-primary-foreground" }) }),
|
|
16323
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { className: "absolute -top-1 -right-1 w-6 h-6 bg-primary dark:bg-primary-foreground rounded-full flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(PlusIcon, { className: "w-3 h-3 text-primary-foreground dark:text-primary" }) }),
|
|
16324
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { className: "absolute inset-0 border-2 border-transparent border-t-primary dark:border-t-primary-foreground rounded-full matrx-spin" })
|
|
16256
16325
|
] }),
|
|
16257
|
-
/* @__PURE__ */ (0,
|
|
16258
|
-
/* @__PURE__ */ (0,
|
|
16259
|
-
/* @__PURE__ */ (0,
|
|
16326
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("div", { className: "text-center space-y-2", children: [
|
|
16327
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("h2", { className: "text-lg font-semibold text-foreground flex items-center gap-2 justify-center", children: [
|
|
16328
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Loader2Icon, { className: "w-4 h-4 matrx-spin" }),
|
|
16260
16329
|
title || "Loading Workflow"
|
|
16261
16330
|
] }),
|
|
16262
|
-
/* @__PURE__ */ (0,
|
|
16331
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("p", { className: "type-body text-muted-foreground max-w-sm", children: subtitle || message || "Setting up your workflow..." })
|
|
16263
16332
|
] }),
|
|
16264
|
-
showProgressSteps && /* @__PURE__ */ (0,
|
|
16265
|
-
/* @__PURE__ */ (0,
|
|
16266
|
-
/* @__PURE__ */ (0,
|
|
16267
|
-
/* @__PURE__ */ (0,
|
|
16333
|
+
showProgressSteps && /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("div", { className: "flex items-center gap-2 type-secondary text-muted-foreground", children: [
|
|
16334
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
16335
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { className: "w-2 h-2 bg-primary dark:bg-primary-foreground rounded-full matrx-pulse" }),
|
|
16336
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("span", { children: "Loading" })
|
|
16268
16337
|
] }),
|
|
16269
|
-
/* @__PURE__ */ (0,
|
|
16270
|
-
/* @__PURE__ */ (0,
|
|
16271
|
-
/* @__PURE__ */ (0,
|
|
16272
|
-
/* @__PURE__ */ (0,
|
|
16338
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { className: "w-4 h-px bg-muted-foreground/30" }),
|
|
16339
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
16340
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { className: "w-2 h-2 bg-muted-foreground/30 rounded-full" }),
|
|
16341
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("span", { children: "Initializing" })
|
|
16273
16342
|
] }),
|
|
16274
|
-
/* @__PURE__ */ (0,
|
|
16275
|
-
/* @__PURE__ */ (0,
|
|
16276
|
-
/* @__PURE__ */ (0,
|
|
16277
|
-
/* @__PURE__ */ (0,
|
|
16343
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { className: "w-4 h-px bg-muted-foreground/30" }),
|
|
16344
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
16345
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { className: "w-2 h-2 bg-muted-foreground/30 rounded-full" }),
|
|
16346
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("span", { children: "Ready" })
|
|
16278
16347
|
] })
|
|
16279
16348
|
] })
|
|
16280
16349
|
] });
|
|
@@ -16303,13 +16372,13 @@ var LoadingSpinner = ({
|
|
|
16303
16372
|
}
|
|
16304
16373
|
};
|
|
16305
16374
|
if (variant === "workflow" && (fullscreen || overlay)) {
|
|
16306
|
-
return /* @__PURE__ */ (0,
|
|
16375
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("div", { className: cn(
|
|
16307
16376
|
"flex items-center justify-center bg-background",
|
|
16308
16377
|
fullscreen && "h-dvh w-full",
|
|
16309
16378
|
className
|
|
16310
16379
|
), "aria-busy": "true", children: [
|
|
16311
|
-
overlay && /* @__PURE__ */ (0,
|
|
16312
|
-
/* @__PURE__ */ (0,
|
|
16380
|
+
overlay && /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { className: "absolute inset-0 bg-background/80 backdrop-blur-sm z-50" }),
|
|
16381
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { className: cn(
|
|
16313
16382
|
"flex flex-col items-center justify-center",
|
|
16314
16383
|
overlay && "relative z-50"
|
|
16315
16384
|
), children: renderWorkflow() })
|
|
@@ -16317,22 +16386,22 @@ var LoadingSpinner = ({
|
|
|
16317
16386
|
}
|
|
16318
16387
|
return (
|
|
16319
16388
|
// aria-busy: a spinner is a stand-in, and whatever measures a settled layout waits for it.
|
|
16320
|
-
/* @__PURE__ */ (0,
|
|
16389
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { className: cn("flex items-center", className), "aria-busy": "true", children: variant === "workflow" ? renderWorkflow() : /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(import_jsx_runtime112.Fragment, { children: [
|
|
16321
16390
|
renderSpinner(),
|
|
16322
|
-
showMessage && /* @__PURE__ */ (0,
|
|
16391
|
+
showMessage && /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("span", { className: cn("ml-3 text-muted-foreground", sizeClasses2.text), children: message || getDefaultMessage() })
|
|
16323
16392
|
] }) })
|
|
16324
16393
|
);
|
|
16325
16394
|
};
|
|
16326
16395
|
|
|
16327
16396
|
// src/mini-loader.tsx
|
|
16328
|
-
var
|
|
16397
|
+
var import_jsx_runtime113 = require("react/jsx-runtime");
|
|
16329
16398
|
function MatrxMiniLoader() {
|
|
16330
|
-
return /* @__PURE__ */ (0,
|
|
16399
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(LoadingSpinner, { variant: "dots", message: "Initializing Matrx...", size: "md" });
|
|
16331
16400
|
}
|
|
16332
16401
|
|
|
16333
16402
|
// src/suspense-loader.tsx
|
|
16334
16403
|
init_icons();
|
|
16335
|
-
var
|
|
16404
|
+
var import_jsx_runtime114 = require("react/jsx-runtime");
|
|
16336
16405
|
var sizeClasses = {
|
|
16337
16406
|
xs: "h-3 w-3",
|
|
16338
16407
|
sm: "h-4 w-4",
|
|
@@ -16345,7 +16414,7 @@ function SuspenseLoader({
|
|
|
16345
16414
|
message,
|
|
16346
16415
|
className = ""
|
|
16347
16416
|
}) {
|
|
16348
|
-
const spinner = /* @__PURE__ */ (0,
|
|
16417
|
+
const spinner = /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
16349
16418
|
Loader2Icon,
|
|
16350
16419
|
{
|
|
16351
16420
|
className: `${sizeClasses[size]} matrx-spin text-disabled-foreground ${className}`,
|
|
@@ -16353,7 +16422,7 @@ function SuspenseLoader({
|
|
|
16353
16422
|
"aria-label": message ? void 0 : "Loading"
|
|
16354
16423
|
}
|
|
16355
16424
|
);
|
|
16356
|
-
const content = message ? /* @__PURE__ */ (0,
|
|
16425
|
+
const content = message ? /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(
|
|
16357
16426
|
"span",
|
|
16358
16427
|
{
|
|
16359
16428
|
className: "inline-flex items-center gap-2",
|
|
@@ -16361,12 +16430,12 @@ function SuspenseLoader({
|
|
|
16361
16430
|
"aria-live": "polite",
|
|
16362
16431
|
children: [
|
|
16363
16432
|
spinner,
|
|
16364
|
-
/* @__PURE__ */ (0,
|
|
16433
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)("span", { children: message })
|
|
16365
16434
|
]
|
|
16366
16435
|
}
|
|
16367
16436
|
) : spinner;
|
|
16368
16437
|
if (centered) {
|
|
16369
|
-
return /* @__PURE__ */ (0,
|
|
16438
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("div", { className: "flex items-center justify-center w-full h-full min-h-[2rem]", children: content });
|
|
16370
16439
|
}
|
|
16371
16440
|
return content;
|
|
16372
16441
|
}
|
|
@@ -16374,7 +16443,7 @@ function SuspenseLoader({
|
|
|
16374
16443
|
// src/shimmer-text.tsx
|
|
16375
16444
|
init_cn();
|
|
16376
16445
|
var import_react23 = require("react");
|
|
16377
|
-
var
|
|
16446
|
+
var import_jsx_runtime115 = require("react/jsx-runtime");
|
|
16378
16447
|
var SHIMMER_STYLE = {
|
|
16379
16448
|
backgroundImage: "linear-gradient(90deg, color-mix(in srgb, currentColor 18%, transparent) 0%, currentColor 50%, color-mix(in srgb, currentColor 18%, transparent) 100%)",
|
|
16380
16449
|
backgroundSize: "200% 100%",
|
|
@@ -16402,7 +16471,7 @@ function useShimmerSweep(durationMs = 2e3) {
|
|
|
16402
16471
|
}
|
|
16403
16472
|
function ShimmerText({ text, className }) {
|
|
16404
16473
|
const ref = useShimmerSweep();
|
|
16405
|
-
return /* @__PURE__ */ (0,
|
|
16474
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
16406
16475
|
"span",
|
|
16407
16476
|
{
|
|
16408
16477
|
ref,
|
|
@@ -16466,7 +16535,7 @@ var import_react_slot8 = require("@radix-ui/react-slot");
|
|
|
16466
16535
|
var React79 = __toESM(require("react"), 1);
|
|
16467
16536
|
init_icons();
|
|
16468
16537
|
init_motion();
|
|
16469
|
-
var
|
|
16538
|
+
var import_jsx_runtime116 = require("react/jsx-runtime");
|
|
16470
16539
|
var FIRST_USE_HINT_TITLE_MAX = 32;
|
|
16471
16540
|
var FIRST_USE_HINT_DETAIL_MAX = 60;
|
|
16472
16541
|
var FirstUseHintContext = React79.createContext(null);
|
|
@@ -16474,7 +16543,7 @@ function FirstUseHintProvider({
|
|
|
16474
16543
|
store,
|
|
16475
16544
|
children
|
|
16476
16545
|
}) {
|
|
16477
|
-
return /* @__PURE__ */ (0,
|
|
16546
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(FirstUseHintContext.Provider, { value: store, children });
|
|
16478
16547
|
}
|
|
16479
16548
|
var sessionLearned = /* @__PURE__ */ new Set();
|
|
16480
16549
|
var warnedNoProvider = false;
|
|
@@ -16557,9 +16626,9 @@ function FirstUseHint({
|
|
|
16557
16626
|
}),
|
|
16558
16627
|
[target]
|
|
16559
16628
|
);
|
|
16560
|
-
return /* @__PURE__ */ (0,
|
|
16561
|
-
pulse ? /* @__PURE__ */ (0,
|
|
16562
|
-
/* @__PURE__ */ (0,
|
|
16629
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(Popover, { open, children: [
|
|
16630
|
+
pulse ? /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(import_jsx_runtime116.Fragment, { children: [
|
|
16631
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
16563
16632
|
import_react_slot8.Slot,
|
|
16564
16633
|
{
|
|
16565
16634
|
ref: hostRef,
|
|
@@ -16568,8 +16637,8 @@ function FirstUseHint({
|
|
|
16568
16637
|
children
|
|
16569
16638
|
}
|
|
16570
16639
|
),
|
|
16571
|
-
/* @__PURE__ */ (0,
|
|
16572
|
-
] }) : /* @__PURE__ */ (0,
|
|
16640
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(PopoverAnchor, { virtualRef })
|
|
16641
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
16573
16642
|
PopoverAnchor,
|
|
16574
16643
|
{
|
|
16575
16644
|
asChild: true,
|
|
@@ -16581,7 +16650,7 @@ function FirstUseHint({
|
|
|
16581
16650
|
children
|
|
16582
16651
|
}
|
|
16583
16652
|
),
|
|
16584
|
-
/* @__PURE__ */ (0,
|
|
16653
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(
|
|
16585
16654
|
PopoverContent,
|
|
16586
16655
|
{
|
|
16587
16656
|
side,
|
|
@@ -16598,17 +16667,17 @@ function FirstUseHint({
|
|
|
16598
16667
|
onInteractOutside: (e) => e.preventDefault(),
|
|
16599
16668
|
onEscapeKeyDown: learn,
|
|
16600
16669
|
children: [
|
|
16601
|
-
/* @__PURE__ */ (0,
|
|
16602
|
-
/* @__PURE__ */ (0,
|
|
16603
|
-
/* @__PURE__ */ (0,
|
|
16670
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("div", { className: "flex items-center gap-1 py-0.5 pl-3 pr-0.5", children: [
|
|
16671
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("div", { className: "flex min-w-0 flex-col py-1", children: [
|
|
16672
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)("span", { className: "type-secondary truncate font-medium text-foreground", children: title }),
|
|
16604
16673
|
detail ? (
|
|
16605
16674
|
// Two lines at most: on a 375px phone a full 60-character line can wrap once.
|
|
16606
|
-
/* @__PURE__ */ (0,
|
|
16675
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)("span", { className: "type-secondary line-clamp-2 text-muted-foreground", children: detail })
|
|
16607
16676
|
) : null
|
|
16608
16677
|
] }),
|
|
16609
|
-
/* @__PURE__ */ (0,
|
|
16678
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(IconButton, { icon: XIcon, "aria-label": "Dismiss tip", className: "shrink-0", onClick: learn })
|
|
16610
16679
|
] }),
|
|
16611
|
-
/* @__PURE__ */ (0,
|
|
16680
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(PopoverPrimitive3.Arrow, { className: "fill-popover", width: 10, height: 5 })
|
|
16612
16681
|
]
|
|
16613
16682
|
}
|
|
16614
16683
|
)
|
|
@@ -16620,7 +16689,7 @@ var React80 = __toESM(require("react"), 1);
|
|
|
16620
16689
|
init_cn();
|
|
16621
16690
|
init_controls();
|
|
16622
16691
|
init_icons();
|
|
16623
|
-
var
|
|
16692
|
+
var import_jsx_runtime117 = require("react/jsx-runtime");
|
|
16624
16693
|
var SKIP = "skip";
|
|
16625
16694
|
function unansweredQuestions(preview, answers) {
|
|
16626
16695
|
return preview.questions.filter((q) => !answers[q.id]);
|
|
@@ -16638,11 +16707,11 @@ function ItemDoor({ item, onOpenItem }) {
|
|
|
16638
16707
|
const renderItem = React80.useContext(RenderItemContext);
|
|
16639
16708
|
const hosted = renderItem ? renderItem(item) : null;
|
|
16640
16709
|
if (hosted != null) {
|
|
16641
|
-
return /* @__PURE__ */ (0,
|
|
16710
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("span", { "data-change-item": item.id, className: "inline-flex max-w-full items-center", children: hosted });
|
|
16642
16711
|
}
|
|
16643
16712
|
const title = item.title?.trim() || "Untitled";
|
|
16644
|
-
return /* @__PURE__ */ (0,
|
|
16645
|
-
/* @__PURE__ */ (0,
|
|
16713
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)("span", { "data-change-item": item.id, className: "inline-flex max-w-full items-center gap-0.5", children: [
|
|
16714
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
16646
16715
|
Button2,
|
|
16647
16716
|
{
|
|
16648
16717
|
type: "button",
|
|
@@ -16653,12 +16722,12 @@ function ItemDoor({ item, onOpenItem }) {
|
|
|
16653
16722
|
children: title
|
|
16654
16723
|
}
|
|
16655
16724
|
),
|
|
16656
|
-
/* @__PURE__ */ (0,
|
|
16725
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
16657
16726
|
Button2,
|
|
16658
16727
|
{
|
|
16659
16728
|
type: "button",
|
|
16660
16729
|
variant: "quiet",
|
|
16661
|
-
icon: /* @__PURE__ */ (0,
|
|
16730
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(ExternalLinkIcon, {}),
|
|
16662
16731
|
"data-clickable": "",
|
|
16663
16732
|
"aria-label": `Open ${title} in a new tab`,
|
|
16664
16733
|
className: "shrink-0",
|
|
@@ -16670,9 +16739,9 @@ function ItemDoor({ item, onOpenItem }) {
|
|
|
16670
16739
|
function Doors({ items, total, onOpenItem }) {
|
|
16671
16740
|
if (!items.length) return null;
|
|
16672
16741
|
const more = (total ?? items.length) - items.length;
|
|
16673
|
-
return /* @__PURE__ */ (0,
|
|
16674
|
-
items.map((item) => /* @__PURE__ */ (0,
|
|
16675
|
-
more > 0 ? /* @__PURE__ */ (0,
|
|
16742
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)("span", { className: "flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1", children: [
|
|
16743
|
+
items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(ItemDoor, { item, onOpenItem }, `${item.table ?? item.type}:${item.id}`)),
|
|
16744
|
+
more > 0 ? /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)("span", { className: "text-xs text-muted-foreground", children: [
|
|
16676
16745
|
"+",
|
|
16677
16746
|
more,
|
|
16678
16747
|
" more"
|
|
@@ -16680,17 +16749,17 @@ function Doors({ items, total, onOpenItem }) {
|
|
|
16680
16749
|
] });
|
|
16681
16750
|
}
|
|
16682
16751
|
function Row({ title, meta, children }) {
|
|
16683
|
-
return /* @__PURE__ */ (0,
|
|
16684
|
-
/* @__PURE__ */ (0,
|
|
16685
|
-
/* @__PURE__ */ (0,
|
|
16686
|
-
meta ? /* @__PURE__ */ (0,
|
|
16752
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)("div", { "data-change-row": "", className: "flex flex-col gap-1 px-3 py-2", children: [
|
|
16753
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsxs)("div", { className: "flex items-baseline justify-between gap-3", children: [
|
|
16754
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)("span", { className: "min-w-0 text-sm text-foreground", children: title }),
|
|
16755
|
+
meta ? /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("span", { className: "shrink-0 text-xs text-muted-foreground", children: meta }) : null
|
|
16687
16756
|
] }),
|
|
16688
16757
|
children
|
|
16689
16758
|
] });
|
|
16690
16759
|
}
|
|
16691
16760
|
function Alarm({ warning, onOpenItem }) {
|
|
16692
16761
|
const items = [...warning.items ?? [], ...warning.users ?? []];
|
|
16693
|
-
return /* @__PURE__ */ (0,
|
|
16762
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(
|
|
16694
16763
|
"div",
|
|
16695
16764
|
{
|
|
16696
16765
|
role: "alert",
|
|
@@ -16698,8 +16767,8 @@ function Alarm({ warning, onOpenItem }) {
|
|
|
16698
16767
|
"data-severity": warning.severity,
|
|
16699
16768
|
className: "flex flex-col gap-1.5 rounded-group border border-destructive bg-destructive/10 px-3 py-2",
|
|
16700
16769
|
children: [
|
|
16701
|
-
/* @__PURE__ */ (0,
|
|
16702
|
-
/* @__PURE__ */ (0,
|
|
16770
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)("span", { className: "text-sm font-medium text-foreground", children: warning.message }),
|
|
16771
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Doors, { items, total: warning.count ?? items.length, onOpenItem })
|
|
16703
16772
|
]
|
|
16704
16773
|
}
|
|
16705
16774
|
);
|
|
@@ -16716,10 +16785,10 @@ function Question({ question, answer, onAnswer, onOpenItem, disabled }) {
|
|
|
16716
16785
|
const suggested = !question.suggested ? null : yes && question.suggested === yes.value ? "yes" : noOption && question.suggested === noOption.value ? "no" : "other";
|
|
16717
16786
|
const wayOut = rest.map((o) => ({ value: o.value, label: o.label }));
|
|
16718
16787
|
const chosen = [...question.options, ...question.way_out].find((o) => o.value === answer);
|
|
16719
|
-
return /* @__PURE__ */ (0,
|
|
16720
|
-
/* @__PURE__ */ (0,
|
|
16721
|
-
/* @__PURE__ */ (0,
|
|
16722
|
-
/* @__PURE__ */ (0,
|
|
16788
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)("div", { "data-change-question": question.id, "data-kind": question.kind, className: "flex flex-col gap-1.5 px-3 py-2", children: [
|
|
16789
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)("span", { className: "text-sm text-foreground", children: question.prompt }),
|
|
16790
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Doors, { items: question.items.sample, total: question.items.count, onOpenItem }),
|
|
16791
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
16723
16792
|
DecisionControl,
|
|
16724
16793
|
{
|
|
16725
16794
|
value,
|
|
@@ -16741,7 +16810,7 @@ function Question({ question, answer, onAnswer, onOpenItem, disabled }) {
|
|
|
16741
16810
|
"aria-label": question.prompt
|
|
16742
16811
|
}
|
|
16743
16812
|
),
|
|
16744
|
-
chosen?.consequence ? /* @__PURE__ */ (0,
|
|
16813
|
+
chosen?.consequence ? /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("span", { className: "text-xs text-muted-foreground", children: chosen.consequence }) : null
|
|
16745
16814
|
] });
|
|
16746
16815
|
}
|
|
16747
16816
|
var VERB_WORDS = {
|
|
@@ -16750,7 +16819,7 @@ var VERB_WORDS = {
|
|
|
16750
16819
|
move: { goes: "Moves with it", commit: "Move" }
|
|
16751
16820
|
};
|
|
16752
16821
|
function ReviewChanges({ renderItem, ...props }) {
|
|
16753
|
-
return /* @__PURE__ */ (0,
|
|
16822
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(RenderItemContext.Provider, { value: renderItem, children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(ReviewChangesBody, { ...props }) });
|
|
16754
16823
|
}
|
|
16755
16824
|
function ReviewChangesBody({ preview, answers, onAnswer, onOpenItem, onCommit, onCancel, busy, commitLabel, className }) {
|
|
16756
16825
|
const words = VERB_WORDS[preview.verb] ?? { goes: "Changes with it", commit: "Apply" };
|
|
@@ -16764,23 +16833,23 @@ function ReviewChangesBody({ preview, answers, onAnswer, onOpenItem, onCommit, o
|
|
|
16764
16833
|
const suggestible = pending.filter((q) => q.suggested);
|
|
16765
16834
|
const ready = canCommitChanges(preview, answers);
|
|
16766
16835
|
const target = preview.target_organization?.name;
|
|
16767
|
-
return /* @__PURE__ */ (0,
|
|
16768
|
-
alarms.map((w, i) => /* @__PURE__ */ (0,
|
|
16769
|
-
/* @__PURE__ */ (0,
|
|
16770
|
-
moving.length ? /* @__PURE__ */ (0,
|
|
16771
|
-
kept.length || staying.length ? /* @__PURE__ */ (0,
|
|
16772
|
-
kept.map((w, i) => /* @__PURE__ */ (0,
|
|
16773
|
-
staying.map((g) => /* @__PURE__ */ (0,
|
|
16836
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)("div", { "data-review-changes": "", "data-verb": preview.verb, className: cn("flex min-h-0 flex-col gap-3", className), children: [
|
|
16837
|
+
alarms.map((w, i) => /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Alarm, { warning: w, onOpenItem }, `${w.kind}:${i}`)),
|
|
16838
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(RowGroup, { title: preview.verb === "move" && target ? `Moving to ${target}` : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Row, { title: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Doors, { items: preview.roots, onOpenItem }) }) }),
|
|
16839
|
+
moving.length ? /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(RowGroup, { title: words.goes, children: moving.map((g) => /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Row, { title: g.noun, meta: `${g.count_is_estimate ? "about " : ""}${g.count}`, children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Doors, { items: g.sample, total: g.count, onOpenItem }) }, `${g.rule_id ?? "root"}:${g.table ?? g.type}`)) }) : null,
|
|
16840
|
+
kept.length || staying.length ? /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(RowGroup, { title: "Stays where it is", children: [
|
|
16841
|
+
kept.map((w, i) => /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Row, { title: w.message ?? w.noun ?? "Used elsewhere", meta: w.count ?? void 0, children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Doors, { items: w.items ?? [], total: w.count, onOpenItem }) }, `kept:${i}`)),
|
|
16842
|
+
staying.map((g) => /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Row, { title: g.noun, meta: g.count, children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Doors, { items: g.sample, total: g.count, onOpenItem }) }, `stay:${g.table ?? g.type}`))
|
|
16774
16843
|
] }) : null,
|
|
16775
|
-
preview.questions.length ? /* @__PURE__ */ (0,
|
|
16776
|
-
auto || unchecked ? /* @__PURE__ */ (0,
|
|
16777
|
-
auto ? /* @__PURE__ */ (0,
|
|
16778
|
-
unchecked ? /* @__PURE__ */ (0,
|
|
16844
|
+
preview.questions.length ? /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(RowGroup, { title: "Decide", children: preview.questions.map((q) => /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Question, { question: q, answer: answers[q.id], onAnswer, onOpenItem, disabled: busy }, q.id)) }) : null,
|
|
16845
|
+
auto || unchecked ? /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)("div", { className: "flex flex-wrap gap-2 px-1", children: [
|
|
16846
|
+
auto ? /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Badge2, { tone: "neutral", children: `${auto.count ?? ""} decided automatically`.trim() }) : null,
|
|
16847
|
+
unchecked ? /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Badge2, { tone: "neutral", children: "Links inside text not checked" }) : null
|
|
16779
16848
|
] }) : null,
|
|
16780
|
-
/* @__PURE__ */ (0,
|
|
16781
|
-
suggestible.length ? /* @__PURE__ */ (0,
|
|
16782
|
-
/* @__PURE__ */ (0,
|
|
16783
|
-
/* @__PURE__ */ (0,
|
|
16849
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsxs)("div", { "data-review-changes-actions": "", className: "flex flex-wrap items-center justify-end gap-2", children: [
|
|
16850
|
+
suggestible.length ? /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Button2, { variant: "quiet", disabled: busy, onClick: () => suggestible.forEach((q) => onAnswer(q.id, q.suggested)), children: "Accept suggestions" }) : null,
|
|
16851
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Button2, { variant: "outline", disabled: busy, onClick: onCancel, children: "Cancel" }),
|
|
16852
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Button2, { variant: preview.verb === "delete" ? "danger" : "primary", disabled: busy || !ready, onClick: onCommit, children: commitLabel ?? words.commit })
|
|
16784
16853
|
] })
|
|
16785
16854
|
] });
|
|
16786
16855
|
}
|
|
@@ -16948,7 +17017,7 @@ function insertLines(boxes, id, line, col, cols) {
|
|
|
16948
17017
|
}
|
|
16949
17018
|
|
|
16950
17019
|
// src/grid-canvas/grid-canvas.tsx
|
|
16951
|
-
var
|
|
17020
|
+
var import_jsx_runtime118 = require("react/jsx-runtime");
|
|
16952
17021
|
var GRID_CANVAS_COLUMNS = { lg: 12, sm: 4 };
|
|
16953
17022
|
var GRID_CANVAS_PHONE_MAX_PX = 640;
|
|
16954
17023
|
var GRID_CANVAS_ROW_PX = 24;
|
|
@@ -17123,7 +17192,7 @@ function GridCanvas({
|
|
|
17123
17192
|
};
|
|
17124
17193
|
const rows = { lg: gridRows(grids.lg), sm: gridRows(grids.sm) };
|
|
17125
17194
|
const active = preview ? preview.boxes.find((b) => b.id === preview.id) : void 0;
|
|
17126
|
-
return /* @__PURE__ */ (0,
|
|
17195
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(
|
|
17127
17196
|
"div",
|
|
17128
17197
|
{
|
|
17129
17198
|
ref: rootRef,
|
|
@@ -17143,8 +17212,8 @@ function GridCanvas({
|
|
|
17143
17212
|
"--grid-rows-sm": preview?.breakpoint === "sm" ? rows.sm + 1 : rows.sm
|
|
17144
17213
|
},
|
|
17145
17214
|
children: [
|
|
17146
|
-
/* @__PURE__ */ (0,
|
|
17147
|
-
active && preview ? /* @__PURE__ */ (0,
|
|
17215
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsxs)("div", { className: "matrx-grid-canvas-field", children: [
|
|
17216
|
+
active && preview ? /* @__PURE__ */ (0, import_jsx_runtime118.jsx)("div", { className: "matrx-grid-canvas-placeholder", "aria-hidden": true, style: placementVars(active, active) }) : null,
|
|
17148
17217
|
items.map((item, n) => {
|
|
17149
17218
|
const lg = grids.lg[n];
|
|
17150
17219
|
const sm = grids.sm[n];
|
|
@@ -17153,7 +17222,7 @@ function GridCanvas({
|
|
|
17153
17222
|
const drawLg = moving && preview.breakpoint === "lg" ? startBox : lg;
|
|
17154
17223
|
const drawSm = moving && preview.breakpoint === "sm" ? startBox : sm;
|
|
17155
17224
|
const label = itemLabel?.(item.id);
|
|
17156
|
-
return /* @__PURE__ */ (0,
|
|
17225
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)(
|
|
17157
17226
|
"div",
|
|
17158
17227
|
{
|
|
17159
17228
|
ref: (el) => {
|
|
@@ -17169,8 +17238,8 @@ function GridCanvas({
|
|
|
17169
17238
|
onPointerDown: editable ? (e) => onItemPointerDown(e, item.id) : void 0,
|
|
17170
17239
|
onKeyDown: editable ? (e) => onItemKeyDown(e, item.id) : void 0,
|
|
17171
17240
|
children: [
|
|
17172
|
-
/* @__PURE__ */ (0,
|
|
17173
|
-
editable ? /* @__PURE__ */ (0,
|
|
17241
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)("div", { className: "matrx-grid-canvas-content", children: renderItem(item.id, { breakpoint, editing: editable }) }),
|
|
17242
|
+
editable ? /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
17174
17243
|
"span",
|
|
17175
17244
|
{
|
|
17176
17245
|
className: "matrx-grid-canvas-resize",
|
|
@@ -17185,7 +17254,7 @@ function GridCanvas({
|
|
|
17185
17254
|
);
|
|
17186
17255
|
})
|
|
17187
17256
|
] }),
|
|
17188
|
-
/* @__PURE__ */ (0,
|
|
17257
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)("span", { className: "matrx-grid-canvas-live", "aria-live": "polite", children: announcement })
|
|
17189
17258
|
]
|
|
17190
17259
|
}
|
|
17191
17260
|
);
|