@ai-matrx/design-system 0.86.332 → 0.86.334
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 +28 -2
- package/dist/auth-gate-dialog.js +4 -4
- package/dist/carousel.js +18 -18
- package/dist/{chunk-MVGMI6UZ.js → chunk-3MQMVPKO.js} +5 -5
- package/dist/{chunk-2WL2SGKL.js → chunk-677JS6TX.js} +24 -10
- package/dist/chunk-677JS6TX.js.map +1 -0
- package/dist/{chunk-TBDMTCRW.js → chunk-6YZMGSQY.js} +10 -10
- package/dist/{chunk-OFJ5LGBU.js → chunk-7NEVJKDZ.js} +8 -8
- package/dist/{chunk-XTNAKJSH.js → chunk-B3LDW3IQ.js} +2 -2
- package/dist/{chunk-VTJWQPYR.js → chunk-BM2YYBUO.js} +5 -5
- package/dist/{chunk-FTZCPGTH.js → chunk-CFCWQDGC.js} +4 -4
- package/dist/{chunk-CN7C4KQB.js → chunk-CH2NWSES.js} +2 -2
- package/dist/{chunk-CJCUD62M.js → chunk-CSSD6NS4.js} +5 -5
- package/dist/{chunk-W3QSRJ3O.js → chunk-E4GS5QH7.js} +7 -7
- package/dist/{chunk-O4KANICE.js → chunk-FRJ4PPA2.js} +5 -5
- package/dist/{chunk-4PCLJAW2.js → chunk-FXT7PZAF.js} +5 -14
- package/dist/chunk-FXT7PZAF.js.map +1 -0
- package/dist/{chunk-D45XDOJS.js → chunk-GHPUO3O7.js} +2 -2
- package/dist/{chunk-RPUC5MNH.js → chunk-GLZJ7WZK.js} +3 -3
- package/dist/{chunk-VKWQTSB6.js → chunk-HEFTQUJ5.js} +6 -6
- package/dist/{chunk-KWBYKUKP.js → chunk-J6637L6D.js} +4 -4
- package/dist/chunk-KGW373MK.js +21 -0
- package/dist/chunk-KGW373MK.js.map +1 -0
- package/dist/{chunk-5LT34PFX.js → chunk-MEJVHDYJ.js} +18 -18
- package/dist/{chunk-PPB52S7F.js → chunk-MFUNGDHO.js} +7 -7
- package/dist/{chunk-LCPHFONA.js → chunk-MIJMP4WI.js} +5 -5
- package/dist/{chunk-XREKZXAL.js → chunk-SMJGESH7.js} +6 -6
- package/dist/{chunk-SNHCBHBE.js → chunk-U24MOJWK.js} +4 -4
- package/dist/{chunk-DO6G4EKJ.js → chunk-UWTODOMD.js} +2 -2
- package/dist/{chunk-BQR4N24F.js → chunk-VLLUUOYJ.js} +4 -4
- package/dist/{chunk-FD6V6JBN.js → chunk-VV6WZTH5.js} +8 -8
- package/dist/{chunk-LVM7XZRJ.js → chunk-WQ2QCMMA.js} +4 -4
- package/dist/{chunk-57OD2WTY.js → chunk-X6ZRHJQP.js} +6 -6
- package/dist/{chunk-PLFWDUJW.js → chunk-XEXSZBXV.js} +3 -3
- package/dist/{chunk-JSXNITMG.js → chunk-YC5GAO35.js} +2 -2
- package/dist/{chunk-5TF2AFDM.js → chunk-ZCRPESQX.js} +4 -4
- package/dist/{chunk-5IKQ6RU4.js → chunk-ZOQ2XKXF.js} +9 -9
- package/dist/clipboard-fallback-dialog.js +10 -10
- package/dist/controls.js +15 -15
- package/dist/data-table/data-row-inspector.js +15 -14
- package/dist/data-table/data-row-window.js +20 -19
- package/dist/data-table/index.cjs +16 -12
- package/dist/data-table/index.cjs.map +1 -1
- package/dist/data-table/index.js +37 -36
- package/dist/data-table/index.js.map +1 -1
- package/dist/data-table/layered-filter-builder.js +4 -4
- package/dist/data-table/pagination.js +8 -8
- package/dist/data-table/uuid-cell.js +8 -8
- package/dist/desktop.js +22 -22
- package/dist/email-input-dialog.js +7 -7
- package/dist/index.cjs +590 -397
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +120 -10
- package/dist/index.d.ts +120 -10
- package/dist/index.js +519 -348
- package/dist/index.js.map +1 -1
- package/dist/intro-stage.js +3 -3
- package/dist/item.cjs +33 -17
- package/dist/item.cjs.map +1 -1
- package/dist/item.d.cts +7 -1
- package/dist/item.d.ts +7 -1
- package/dist/item.js +32 -30
- package/dist/item.js.map +1 -1
- package/dist/lite-table.js +10 -10
- package/dist/menu-look.js +3 -3
- package/dist/record-list.cjs +16 -2
- package/dist/record-list.cjs.map +1 -1
- package/dist/record-list.d.cts +7 -1
- package/dist/record-list.d.ts +7 -1
- package/dist/record-list.js +13 -13
- package/dist/sandbox-gate-dialog.js +8 -8
- package/dist/scope-mismatch-dialog.js +7 -7
- package/dist/settings.cjs +16 -12
- package/dist/settings.cjs.map +1 -1
- package/dist/settings.js +20 -19
- package/dist/settings.js.map +1 -1
- package/dist/site-icon.js +2 -2
- package/dist/swipe-deck.js +1 -1
- package/dist/tap-shortcut.cjs +40 -0
- package/dist/tap-shortcut.cjs.map +1 -0
- package/dist/tap-shortcut.d.cts +13 -0
- package/dist/tap-shortcut.d.ts +13 -0
- package/dist/tap-shortcut.js +10 -0
- package/dist/tap-shortcut.js.map +1 -0
- package/dist/tap-target/ai-buttons.cjs +16 -12
- package/dist/tap-target/ai-buttons.cjs.map +1 -1
- package/dist/tap-target/ai-buttons.js +4 -3
- package/dist/tap-target/ai-buttons.js.map +1 -1
- package/dist/tap-target/buttons.cjs +16 -12
- package/dist/tap-target/buttons.cjs.map +1 -1
- package/dist/tap-target/buttons.d.cts +3 -5
- package/dist/tap-target/buttons.d.ts +3 -5
- package/dist/tap-target/buttons.js +4 -3
- package/dist/tap-target.cjs +16 -12
- package/dist/tap-target.cjs.map +1 -1
- package/dist/tap-target.d.cts +5 -7
- package/dist/tap-target.d.ts +5 -7
- package/dist/tap-target.js +6 -4
- package/dist/text-input-dialog.js +10 -10
- package/dist/thumbnail-grid.js +2 -2
- package/dist/transcript-scroll-nav.cjs +16 -12
- package/dist/transcript-scroll-nav.cjs.map +1 -1
- package/dist/transcript-scroll-nav.js +2 -1
- package/dist/transcript-scroll-nav.js.map +1 -1
- package/dist/value-prompts-dialog.js +5 -5
- package/dist/writing-field.cjs +16 -12
- package/dist/writing-field.cjs.map +1 -1
- package/dist/writing-field.js +21 -20
- package/dist/writing-field.js.map +1 -1
- package/package.json +12 -2
- package/dist/chunk-2WL2SGKL.js.map +0 -1
- package/dist/chunk-4PCLJAW2.js.map +0 -1
- /package/dist/{chunk-MVGMI6UZ.js.map → chunk-3MQMVPKO.js.map} +0 -0
- /package/dist/{chunk-TBDMTCRW.js.map → chunk-6YZMGSQY.js.map} +0 -0
- /package/dist/{chunk-OFJ5LGBU.js.map → chunk-7NEVJKDZ.js.map} +0 -0
- /package/dist/{chunk-XTNAKJSH.js.map → chunk-B3LDW3IQ.js.map} +0 -0
- /package/dist/{chunk-VTJWQPYR.js.map → chunk-BM2YYBUO.js.map} +0 -0
- /package/dist/{chunk-FTZCPGTH.js.map → chunk-CFCWQDGC.js.map} +0 -0
- /package/dist/{chunk-CN7C4KQB.js.map → chunk-CH2NWSES.js.map} +0 -0
- /package/dist/{chunk-CJCUD62M.js.map → chunk-CSSD6NS4.js.map} +0 -0
- /package/dist/{chunk-W3QSRJ3O.js.map → chunk-E4GS5QH7.js.map} +0 -0
- /package/dist/{chunk-O4KANICE.js.map → chunk-FRJ4PPA2.js.map} +0 -0
- /package/dist/{chunk-D45XDOJS.js.map → chunk-GHPUO3O7.js.map} +0 -0
- /package/dist/{chunk-RPUC5MNH.js.map → chunk-GLZJ7WZK.js.map} +0 -0
- /package/dist/{chunk-VKWQTSB6.js.map → chunk-HEFTQUJ5.js.map} +0 -0
- /package/dist/{chunk-KWBYKUKP.js.map → chunk-J6637L6D.js.map} +0 -0
- /package/dist/{chunk-5LT34PFX.js.map → chunk-MEJVHDYJ.js.map} +0 -0
- /package/dist/{chunk-PPB52S7F.js.map → chunk-MFUNGDHO.js.map} +0 -0
- /package/dist/{chunk-LCPHFONA.js.map → chunk-MIJMP4WI.js.map} +0 -0
- /package/dist/{chunk-XREKZXAL.js.map → chunk-SMJGESH7.js.map} +0 -0
- /package/dist/{chunk-SNHCBHBE.js.map → chunk-U24MOJWK.js.map} +0 -0
- /package/dist/{chunk-DO6G4EKJ.js.map → chunk-UWTODOMD.js.map} +0 -0
- /package/dist/{chunk-BQR4N24F.js.map → chunk-VLLUUOYJ.js.map} +0 -0
- /package/dist/{chunk-FD6V6JBN.js.map → chunk-VV6WZTH5.js.map} +0 -0
- /package/dist/{chunk-LVM7XZRJ.js.map → chunk-WQ2QCMMA.js.map} +0 -0
- /package/dist/{chunk-57OD2WTY.js.map → chunk-X6ZRHJQP.js.map} +0 -0
- /package/dist/{chunk-PLFWDUJW.js.map → chunk-XEXSZBXV.js.map} +0 -0
- /package/dist/{chunk-JSXNITMG.js.map → chunk-YC5GAO35.js.map} +0 -0
- /package/dist/{chunk-5TF2AFDM.js.map → chunk-ZCRPESQX.js.map} +0 -0
- /package/dist/{chunk-5IKQ6RU4.js.map → chunk-ZOQ2XKXF.js.map} +0 -0
package/dist/index.cjs
CHANGED
|
@@ -255,6 +255,12 @@ function GlobeIcon(props) {
|
|
|
255
255
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M2 12h20" })
|
|
256
256
|
] });
|
|
257
257
|
}
|
|
258
|
+
function ClockIcon(props) {
|
|
259
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { ...lucideProps("clock", props), children: [
|
|
260
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "12", cy: "12", r: "10" }),
|
|
261
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("polyline", { points: "12 6 12 12 16 14" })
|
|
262
|
+
] });
|
|
263
|
+
}
|
|
258
264
|
function RefreshCwIcon(props) {
|
|
259
265
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { ...lucideProps("refresh-cw", props), children: [
|
|
260
266
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" }),
|
|
@@ -334,6 +340,12 @@ function WorkflowIcon(props) {
|
|
|
334
340
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", { width: "8", height: "8", x: "13", y: "13", rx: "2" })
|
|
335
341
|
] });
|
|
336
342
|
}
|
|
343
|
+
function CornerDownRightIcon(props) {
|
|
344
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { ...lucideProps("corner-down-right", props), children: [
|
|
345
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("polyline", { points: "15 10 20 15 15 20" }),
|
|
346
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M4 4v7a4 4 0 0 0 4 4h12" })
|
|
347
|
+
] });
|
|
348
|
+
}
|
|
337
349
|
function BadgeCheckIcon(props) {
|
|
338
350
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { ...lucideProps("badge-check", props), children: [
|
|
339
351
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z" }),
|
|
@@ -354,6 +366,14 @@ function GemIcon(props) {
|
|
|
354
366
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M2 9h20" })
|
|
355
367
|
] });
|
|
356
368
|
}
|
|
369
|
+
function BellOffIcon(props) {
|
|
370
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { ...lucideProps("bell-off", props), children: [
|
|
371
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M10.268 21a2 2 0 0 0 3.464 0" }),
|
|
372
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742" }),
|
|
373
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "m2 2 20 20" }),
|
|
374
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05" })
|
|
375
|
+
] });
|
|
376
|
+
}
|
|
357
377
|
function MailIcon(props) {
|
|
358
378
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", { ...lucideProps("mail", props), children: [
|
|
359
379
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7" }),
|
|
@@ -3433,53 +3453,53 @@ function WritingBoxProvider({
|
|
|
3433
3453
|
Box,
|
|
3434
3454
|
children
|
|
3435
3455
|
}) {
|
|
3436
|
-
return /* @__PURE__ */ (0,
|
|
3456
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(WritingBoxContext.Provider, { value: Box, children });
|
|
3437
3457
|
}
|
|
3438
3458
|
function useWritingBox() {
|
|
3439
|
-
return
|
|
3459
|
+
return React67.useContext(WritingBoxContext) ?? StandInBox;
|
|
3440
3460
|
}
|
|
3441
3461
|
function WritingInputProvider({
|
|
3442
3462
|
Box,
|
|
3443
3463
|
children
|
|
3444
3464
|
}) {
|
|
3445
|
-
return /* @__PURE__ */ (0,
|
|
3465
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(WritingInputContext.Provider, { value: Box, children });
|
|
3446
3466
|
}
|
|
3447
3467
|
function useWritingInput() {
|
|
3448
|
-
return
|
|
3468
|
+
return React67.useContext(WritingInputContext) ?? StandInInput;
|
|
3449
3469
|
}
|
|
3450
|
-
var
|
|
3470
|
+
var React67, import_jsx_runtime98, KEY, registry4, WritingBoxContext, StandInBox, INPUT_KEY, inputRegistry, WritingInputContext, StandInInput;
|
|
3451
3471
|
var init_writing_box = __esm({
|
|
3452
3472
|
"src/writing-box.tsx"() {
|
|
3453
3473
|
"use strict";
|
|
3454
3474
|
"use client";
|
|
3455
|
-
|
|
3475
|
+
React67 = __toESM(require("react"), 1);
|
|
3456
3476
|
init_input();
|
|
3457
3477
|
init_textarea();
|
|
3458
3478
|
init_stand_in_notice();
|
|
3459
|
-
|
|
3479
|
+
import_jsx_runtime98 = require("react/jsx-runtime");
|
|
3460
3480
|
KEY = /* @__PURE__ */ Symbol.for("@ai-matrx/design-system/writing-box");
|
|
3461
3481
|
registry4 = globalThis;
|
|
3462
|
-
WritingBoxContext = registry4[KEY] ?? (registry4[KEY] =
|
|
3482
|
+
WritingBoxContext = registry4[KEY] ?? (registry4[KEY] = React67.createContext(null));
|
|
3463
3483
|
StandInBox = (props) => {
|
|
3464
|
-
|
|
3484
|
+
React67.useEffect(() => {
|
|
3465
3485
|
announceStandIn(
|
|
3466
3486
|
"writing-box",
|
|
3467
3487
|
"A multi-line writing box drew as a plain Textarea (no mic, no read-aloud): the host did not mount <WritingBoxProvider Box={...}>."
|
|
3468
3488
|
);
|
|
3469
3489
|
}, []);
|
|
3470
|
-
return /* @__PURE__ */ (0,
|
|
3490
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Textarea, { ...props, "data-writing-box-host": UNCONFIGURED });
|
|
3471
3491
|
};
|
|
3472
3492
|
INPUT_KEY = /* @__PURE__ */ Symbol.for("@ai-matrx/design-system/writing-input");
|
|
3473
3493
|
inputRegistry = globalThis;
|
|
3474
|
-
WritingInputContext = inputRegistry[INPUT_KEY] ?? (inputRegistry[INPUT_KEY] =
|
|
3494
|
+
WritingInputContext = inputRegistry[INPUT_KEY] ?? (inputRegistry[INPUT_KEY] = React67.createContext(null));
|
|
3475
3495
|
StandInInput = (props) => {
|
|
3476
|
-
|
|
3496
|
+
React67.useEffect(() => {
|
|
3477
3497
|
announceStandIn(
|
|
3478
3498
|
"writing-input",
|
|
3479
3499
|
"A one-line writing input drew as a plain Input (no mic, no read-aloud): the host did not mount <WritingInputProvider Box={...}>."
|
|
3480
3500
|
);
|
|
3481
3501
|
}, []);
|
|
3482
|
-
return /* @__PURE__ */ (0,
|
|
3502
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Input, { ...props, "data-writing-box-host": UNCONFIGURED });
|
|
3483
3503
|
};
|
|
3484
3504
|
}
|
|
3485
3505
|
});
|
|
@@ -3497,12 +3517,12 @@ function ClipboardFallbackDialog({
|
|
|
3497
3517
|
description = "Press Cmd/Ctrl+C to copy, or use the Copy button below."
|
|
3498
3518
|
}) {
|
|
3499
3519
|
const multiline = url.includes("\n") || url.length > 120;
|
|
3500
|
-
const inputRef =
|
|
3501
|
-
const [copied, setCopied] =
|
|
3502
|
-
const [blocked, setBlocked] =
|
|
3503
|
-
const copiedTimer =
|
|
3504
|
-
|
|
3505
|
-
|
|
3520
|
+
const inputRef = React69.useRef(null);
|
|
3521
|
+
const [copied, setCopied] = React69.useState(false);
|
|
3522
|
+
const [blocked, setBlocked] = React69.useState(false);
|
|
3523
|
+
const copiedTimer = React69.useRef(void 0);
|
|
3524
|
+
React69.useEffect(() => () => window.clearTimeout(copiedTimer.current), []);
|
|
3525
|
+
React69.useEffect(() => {
|
|
3506
3526
|
if (!open) {
|
|
3507
3527
|
setCopied(false);
|
|
3508
3528
|
setBlocked(false);
|
|
@@ -3527,12 +3547,12 @@ function ClipboardFallbackDialog({
|
|
|
3527
3547
|
inputRef.current?.focus();
|
|
3528
3548
|
inputRef.current?.select();
|
|
3529
3549
|
};
|
|
3530
|
-
return /* @__PURE__ */ (0,
|
|
3531
|
-
/* @__PURE__ */ (0,
|
|
3532
|
-
/* @__PURE__ */ (0,
|
|
3533
|
-
/* @__PURE__ */ (0,
|
|
3550
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Dialog, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(DialogContent, { size: "sm", children: [
|
|
3551
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(DialogHeader, { children: [
|
|
3552
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(DialogTitle, { children: title }),
|
|
3553
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(DialogDescription, { children: description })
|
|
3534
3554
|
] }),
|
|
3535
|
-
multiline ? /* @__PURE__ */ (0,
|
|
3555
|
+
multiline ? /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
3536
3556
|
Textarea2,
|
|
3537
3557
|
{
|
|
3538
3558
|
mono: true,
|
|
@@ -3542,7 +3562,7 @@ function ClipboardFallbackDialog({
|
|
|
3542
3562
|
rows: 8,
|
|
3543
3563
|
onFocus: (event) => event.currentTarget.select()
|
|
3544
3564
|
}
|
|
3545
|
-
) : /* @__PURE__ */ (0,
|
|
3565
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
3546
3566
|
Input2,
|
|
3547
3567
|
{
|
|
3548
3568
|
mono: true,
|
|
@@ -3552,29 +3572,29 @@ function ClipboardFallbackDialog({
|
|
|
3552
3572
|
onFocus: (event) => event.currentTarget.select()
|
|
3553
3573
|
}
|
|
3554
3574
|
),
|
|
3555
|
-
blocked ? /* @__PURE__ */ (0,
|
|
3556
|
-
/* @__PURE__ */ (0,
|
|
3557
|
-
/* @__PURE__ */ (0,
|
|
3558
|
-
/* @__PURE__ */ (0,
|
|
3559
|
-
copied ? /* @__PURE__ */ (0,
|
|
3575
|
+
blocked ? /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("p", { role: "status", className: "text-sm text-destructive", children: "Still blocked. Press Cmd/Ctrl+C to copy." }) : null,
|
|
3576
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(DialogFooter, { children: [
|
|
3577
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(Button, { type: "button", variant: "outline", onClick: () => onOpenChange(false), children: "Close" }),
|
|
3578
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(Button, { type: "button", onClick: handleCopy, children: [
|
|
3579
|
+
copied ? /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(CheckIcon, { className: "mr-2 h-4 w-4" }) : /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(CopyIcon, { className: "mr-2 h-4 w-4" }),
|
|
3560
3580
|
copied ? "Copied" : "Copy"
|
|
3561
3581
|
] })
|
|
3562
3582
|
] })
|
|
3563
3583
|
] }) });
|
|
3564
3584
|
}
|
|
3565
|
-
var
|
|
3585
|
+
var React69, import_clipboard5, import_jsx_runtime100;
|
|
3566
3586
|
var init_clipboard_fallback_dialog = __esm({
|
|
3567
3587
|
"src/clipboard-fallback-dialog.tsx"() {
|
|
3568
3588
|
"use strict";
|
|
3569
3589
|
"use client";
|
|
3570
|
-
|
|
3590
|
+
React69 = __toESM(require("react"), 1);
|
|
3571
3591
|
import_clipboard5 = require("@ai-matrx/kit/clipboard");
|
|
3572
3592
|
init_button();
|
|
3573
3593
|
init_controls();
|
|
3574
3594
|
init_doors();
|
|
3575
3595
|
init_dialog();
|
|
3576
3596
|
init_icons();
|
|
3577
|
-
|
|
3597
|
+
import_jsx_runtime100 = require("react/jsx-runtime");
|
|
3578
3598
|
}
|
|
3579
3599
|
});
|
|
3580
3600
|
|
|
@@ -3605,52 +3625,52 @@ function AuthGateDialog({
|
|
|
3605
3625
|
onNavigate
|
|
3606
3626
|
}) {
|
|
3607
3627
|
const unconfigured = signInHref === void 0 || signUpHref === void 0;
|
|
3608
|
-
|
|
3628
|
+
React70.useEffect(() => {
|
|
3609
3629
|
if (isOpen && unconfigured) announceDefaultsOnce();
|
|
3610
3630
|
}, [isOpen, unconfigured]);
|
|
3611
3631
|
const go = (href) => {
|
|
3612
3632
|
if (onNavigate) onNavigate(href);
|
|
3613
3633
|
else window.location.assign(href);
|
|
3614
3634
|
};
|
|
3615
|
-
return /* @__PURE__ */ (0,
|
|
3635
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
3616
3636
|
Dialog,
|
|
3617
3637
|
{
|
|
3618
3638
|
open: isOpen,
|
|
3619
3639
|
onOpenChange: (open) => {
|
|
3620
3640
|
if (!open) onClose();
|
|
3621
3641
|
},
|
|
3622
|
-
children: /* @__PURE__ */ (0,
|
|
3623
|
-
/* @__PURE__ */ (0,
|
|
3624
|
-
/* @__PURE__ */ (0,
|
|
3625
|
-
/* @__PURE__ */ (0,
|
|
3642
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(DialogContent, { size: "sm", children: [
|
|
3643
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(DialogHeader, { children: [
|
|
3644
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(DialogTitle, { children: "Sign in required" }),
|
|
3645
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(DialogDescription, { children: [
|
|
3626
3646
|
featureName,
|
|
3627
3647
|
" requires an account"
|
|
3628
3648
|
] })
|
|
3629
3649
|
] }),
|
|
3630
|
-
/* @__PURE__ */ (0,
|
|
3631
|
-
/* @__PURE__ */ (0,
|
|
3632
|
-
/* @__PURE__ */ (0,
|
|
3633
|
-
/* @__PURE__ */ (0,
|
|
3634
|
-
/* @__PURE__ */ (0,
|
|
3650
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: "flex flex-col items-center gap-5 pb-4 pt-2 text-center", children: [
|
|
3651
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)("div", { className: "flex h-14 w-14 items-center justify-center rounded-full bg-primary/10", children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(LockIcon, { className: "h-7 w-7 text-primary" }) }),
|
|
3652
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.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.` }),
|
|
3653
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsxs)("div", { className: "flex w-full max-w-[260px] flex-col gap-2.5", children: [
|
|
3654
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(
|
|
3635
3655
|
Button,
|
|
3636
3656
|
{
|
|
3637
3657
|
variant: "primary",
|
|
3638
3658
|
className: "w-full",
|
|
3639
3659
|
onClick: () => go(signInHref ?? DEFAULT_SIGN_IN),
|
|
3640
3660
|
children: [
|
|
3641
|
-
/* @__PURE__ */ (0,
|
|
3661
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(LogInIcon, { className: "mr-2 h-4 w-4" }),
|
|
3642
3662
|
"Sign In"
|
|
3643
3663
|
]
|
|
3644
3664
|
}
|
|
3645
3665
|
),
|
|
3646
|
-
/* @__PURE__ */ (0,
|
|
3666
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(
|
|
3647
3667
|
Button,
|
|
3648
3668
|
{
|
|
3649
3669
|
variant: "outline",
|
|
3650
3670
|
className: "w-full",
|
|
3651
3671
|
onClick: () => go(signUpHref ?? DEFAULT_SIGN_UP),
|
|
3652
3672
|
children: [
|
|
3653
|
-
/* @__PURE__ */ (0,
|
|
3673
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(GemIcon, { className: "mr-2 h-4 w-4" }),
|
|
3654
3674
|
"Create Free Account"
|
|
3655
3675
|
]
|
|
3656
3676
|
}
|
|
@@ -3661,16 +3681,16 @@ function AuthGateDialog({
|
|
|
3661
3681
|
}
|
|
3662
3682
|
);
|
|
3663
3683
|
}
|
|
3664
|
-
var
|
|
3684
|
+
var React70, import_jsx_runtime101, DEFAULT_SIGN_IN, DEFAULT_SIGN_UP, announced2, auth_gate_dialog_default;
|
|
3665
3685
|
var init_auth_gate_dialog = __esm({
|
|
3666
3686
|
"src/auth-gate-dialog.tsx"() {
|
|
3667
3687
|
"use strict";
|
|
3668
3688
|
"use client";
|
|
3669
|
-
|
|
3689
|
+
React70 = __toESM(require("react"), 1);
|
|
3670
3690
|
init_button();
|
|
3671
3691
|
init_dialog();
|
|
3672
3692
|
init_icons();
|
|
3673
|
-
|
|
3693
|
+
import_jsx_runtime101 = require("react/jsx-runtime");
|
|
3674
3694
|
DEFAULT_SIGN_IN = "/login";
|
|
3675
3695
|
DEFAULT_SIGN_UP = "/sign-up";
|
|
3676
3696
|
announced2 = false;
|
|
@@ -3692,9 +3712,9 @@ function EmailInputDialog({
|
|
|
3692
3712
|
description = "Enter your email address to receive the content.",
|
|
3693
3713
|
submitLabel = "Send Email"
|
|
3694
3714
|
}) {
|
|
3695
|
-
const [email, setEmail] =
|
|
3696
|
-
const [loading, setLoading] =
|
|
3697
|
-
const [error, setError] =
|
|
3715
|
+
const [email, setEmail] = React71.useState("");
|
|
3716
|
+
const [loading, setLoading] = React71.useState(false);
|
|
3717
|
+
const [error, setError] = React71.useState(null);
|
|
3698
3718
|
const handleSubmit = async (e) => {
|
|
3699
3719
|
e.preventDefault();
|
|
3700
3720
|
if (!email.trim()) {
|
|
@@ -3723,17 +3743,17 @@ function EmailInputDialog({
|
|
|
3723
3743
|
setError(null);
|
|
3724
3744
|
onClose();
|
|
3725
3745
|
};
|
|
3726
|
-
return /* @__PURE__ */ (0,
|
|
3727
|
-
/* @__PURE__ */ (0,
|
|
3728
|
-
/* @__PURE__ */ (0,
|
|
3729
|
-
/* @__PURE__ */ (0,
|
|
3746
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(Dialog, { open: isOpen, onOpenChange: handleClose, children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(DialogContent, { size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("form", { onSubmit: handleSubmit, noValidate: true, className: "flex flex-col gap-4", children: [
|
|
3747
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(DialogHeader, { children: [
|
|
3748
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(DialogTitle, { className: "flex items-center gap-2", children: [
|
|
3749
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(MailIcon, { className: "h-5 w-5 text-primary" }),
|
|
3730
3750
|
title
|
|
3731
3751
|
] }),
|
|
3732
|
-
/* @__PURE__ */ (0,
|
|
3752
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(DialogDescription, { children: description })
|
|
3733
3753
|
] }),
|
|
3734
|
-
/* @__PURE__ */ (0,
|
|
3735
|
-
/* @__PURE__ */ (0,
|
|
3736
|
-
/* @__PURE__ */ (0,
|
|
3754
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: "space-y-2", children: [
|
|
3755
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(Label4, { htmlFor: "email-input-dialog-email", children: "Email address" }),
|
|
3756
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
3737
3757
|
Input2,
|
|
3738
3758
|
{
|
|
3739
3759
|
id: "email-input-dialog-email",
|
|
@@ -3748,9 +3768,9 @@ function EmailInputDialog({
|
|
|
3748
3768
|
autoFocus: true
|
|
3749
3769
|
}
|
|
3750
3770
|
),
|
|
3751
|
-
error ? /* @__PURE__ */ (0,
|
|
3771
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("p", { className: "text-sm text-destructive", children: [
|
|
3752
3772
|
error,
|
|
3753
|
-
/* @__PURE__ */ (0,
|
|
3773
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
3754
3774
|
ErrorActions,
|
|
3755
3775
|
{
|
|
3756
3776
|
message: error,
|
|
@@ -3761,34 +3781,34 @@ function EmailInputDialog({
|
|
|
3761
3781
|
)
|
|
3762
3782
|
] }) : email.trim() && !isValidEmail(email.trim()) ? (
|
|
3763
3783
|
// An offer, never a block: Send stays enabled; pressing it names the problem.
|
|
3764
|
-
/* @__PURE__ */ (0,
|
|
3784
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)("p", { className: "text-sm text-muted-foreground", "data-email-hint": true, children: "Not a full address yet, like you@example.com" })
|
|
3765
3785
|
) : null
|
|
3766
3786
|
] }),
|
|
3767
|
-
/* @__PURE__ */ (0,
|
|
3768
|
-
/* @__PURE__ */ (0,
|
|
3769
|
-
/* @__PURE__ */ (0,
|
|
3770
|
-
/* @__PURE__ */ (0,
|
|
3787
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(DialogFooter, { children: [
|
|
3788
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(Button, { type: "button", variant: "outline", onClick: handleClose, disabled: loading, children: "Cancel" }),
|
|
3789
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(Button, { variant: "primary", type: "submit", disabled: loading || !email.trim(), children: loading ? /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(import_jsx_runtime102.Fragment, { children: [
|
|
3790
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(Loader2Icon, { className: "mr-2 h-4 w-4 matrx-spin" }),
|
|
3771
3791
|
"Sending..."
|
|
3772
|
-
] }) : /* @__PURE__ */ (0,
|
|
3773
|
-
/* @__PURE__ */ (0,
|
|
3792
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(import_jsx_runtime102.Fragment, { children: [
|
|
3793
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(MailIcon, { className: "mr-2 h-4 w-4" }),
|
|
3774
3794
|
submitLabel
|
|
3775
3795
|
] }) })
|
|
3776
3796
|
] })
|
|
3777
3797
|
] }) }) });
|
|
3778
3798
|
}
|
|
3779
|
-
var
|
|
3799
|
+
var React71, import_jsx_runtime102, isValidEmail, email_input_dialog_default;
|
|
3780
3800
|
var init_email_input_dialog = __esm({
|
|
3781
3801
|
"src/email-input-dialog.tsx"() {
|
|
3782
3802
|
"use strict";
|
|
3783
3803
|
"use client";
|
|
3784
|
-
|
|
3804
|
+
React71 = __toESM(require("react"), 1);
|
|
3785
3805
|
init_button();
|
|
3786
3806
|
init_doors();
|
|
3787
3807
|
init_dialog();
|
|
3788
3808
|
init_error_box();
|
|
3789
3809
|
init_icons();
|
|
3790
3810
|
init_label();
|
|
3791
|
-
|
|
3811
|
+
import_jsx_runtime102 = require("react/jsx-runtime");
|
|
3792
3812
|
isValidEmail = (email) => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email);
|
|
3793
3813
|
email_input_dialog_default = EmailInputDialog;
|
|
3794
3814
|
}
|
|
@@ -3801,7 +3821,7 @@ __export(sandbox_gate_dialog_exports, {
|
|
|
3801
3821
|
});
|
|
3802
3822
|
function SandboxGateDialog({ open, onChoose, children }) {
|
|
3803
3823
|
const noPanel = !children;
|
|
3804
|
-
|
|
3824
|
+
React72.useEffect(() => {
|
|
3805
3825
|
if (open && noPanel) {
|
|
3806
3826
|
announceStandIn(
|
|
3807
3827
|
"sandbox-gate-panel",
|
|
@@ -3809,44 +3829,44 @@ function SandboxGateDialog({ open, onChoose, children }) {
|
|
|
3809
3829
|
);
|
|
3810
3830
|
}
|
|
3811
3831
|
}, [open, noPanel]);
|
|
3812
|
-
return /* @__PURE__ */ (0,
|
|
3832
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
3813
3833
|
Dialog,
|
|
3814
3834
|
{
|
|
3815
3835
|
open,
|
|
3816
3836
|
onOpenChange: (next) => {
|
|
3817
3837
|
if (!next) onChoose("cancel");
|
|
3818
3838
|
},
|
|
3819
|
-
children: /* @__PURE__ */ (0,
|
|
3820
|
-
/* @__PURE__ */ (0,
|
|
3821
|
-
/* @__PURE__ */ (0,
|
|
3822
|
-
/* @__PURE__ */ (0,
|
|
3839
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(DialogContent, { size: "md", className: "gap-4", ...noPanel ? { "data-sandbox-gate-panel": UNCONFIGURED } : {}, children: [
|
|
3840
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(DialogHeader, { children: [
|
|
3841
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(DialogTitle, { className: "flex items-center gap-2", children: [
|
|
3842
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(AlertTriangleIcon, { className: "h-4 w-4 text-warning" }),
|
|
3823
3843
|
"Sandbox unavailable"
|
|
3824
3844
|
] }),
|
|
3825
|
-
/* @__PURE__ */ (0,
|
|
3845
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.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." })
|
|
3826
3846
|
] }),
|
|
3827
|
-
children ? /* @__PURE__ */ (0,
|
|
3828
|
-
/* @__PURE__ */ (0,
|
|
3829
|
-
/* @__PURE__ */ (0,
|
|
3830
|
-
/* @__PURE__ */ (0,
|
|
3831
|
-
/* @__PURE__ */ (0,
|
|
3832
|
-
/* @__PURE__ */ (0,
|
|
3847
|
+
children ? /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { className: "max-h-[50dvh] overflow-y-auto rounded-md border border-border", children }) : null,
|
|
3848
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(DialogFooter, { className: "gap-2 sm:justify-between", children: [
|
|
3849
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(Button, { variant: "ghost", onClick: () => onChoose("cancel"), children: "Cancel" }),
|
|
3850
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: "flex gap-2", children: [
|
|
3851
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(Button, { variant: "outline", onClick: () => onChoose("detach"), children: "Send without sandbox" }),
|
|
3852
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(Button, { variant: "primary", onClick: () => onChoose("attach"), children: "Retry with sandbox" })
|
|
3833
3853
|
] })
|
|
3834
3854
|
] })
|
|
3835
3855
|
] })
|
|
3836
3856
|
}
|
|
3837
3857
|
);
|
|
3838
3858
|
}
|
|
3839
|
-
var
|
|
3859
|
+
var React72, import_jsx_runtime103;
|
|
3840
3860
|
var init_sandbox_gate_dialog = __esm({
|
|
3841
3861
|
"src/sandbox-gate-dialog.tsx"() {
|
|
3842
3862
|
"use strict";
|
|
3843
3863
|
"use client";
|
|
3844
|
-
|
|
3864
|
+
React72 = __toESM(require("react"), 1);
|
|
3845
3865
|
init_button();
|
|
3846
3866
|
init_stand_in_notice();
|
|
3847
3867
|
init_dialog();
|
|
3848
3868
|
init_icons();
|
|
3849
|
-
|
|
3869
|
+
import_jsx_runtime103 = require("react/jsx-runtime");
|
|
3850
3870
|
}
|
|
3851
3871
|
});
|
|
3852
3872
|
|
|
@@ -3860,10 +3880,10 @@ function ScopeSetList({
|
|
|
3860
3880
|
items,
|
|
3861
3881
|
renderScope
|
|
3862
3882
|
}) {
|
|
3863
|
-
return /* @__PURE__ */ (0,
|
|
3864
|
-
/* @__PURE__ */ (0,
|
|
3865
|
-
items.length === 0 ? /* @__PURE__ */ (0,
|
|
3866
|
-
/* @__PURE__ */ (0,
|
|
3883
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: "flex flex-col gap-1", children: [
|
|
3884
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: "text-xs font-medium uppercase tracking-wide text-muted-foreground", children: heading }),
|
|
3885
|
+
items.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: "text-sm text-muted-foreground", children: "None" }) : /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("ul", { className: "flex flex-col gap-0.5", children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("li", { className: "flex min-w-0 items-center gap-1 text-sm text-foreground", children: [
|
|
3886
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("span", { className: "shrink-0 text-muted-foreground", children: [
|
|
3867
3887
|
item.typeLabel,
|
|
3868
3888
|
":"
|
|
3869
3889
|
] }),
|
|
@@ -3879,7 +3899,7 @@ function ScopeMismatchDialog({
|
|
|
3879
3899
|
renderScope = plainScope
|
|
3880
3900
|
}) {
|
|
3881
3901
|
const plain = renderScope === plainScope;
|
|
3882
|
-
|
|
3902
|
+
React73.useEffect(() => {
|
|
3883
3903
|
if (open && plain) {
|
|
3884
3904
|
announceStandIn(
|
|
3885
3905
|
"scope-mismatch-render",
|
|
@@ -3887,42 +3907,42 @@ function ScopeMismatchDialog({
|
|
|
3887
3907
|
);
|
|
3888
3908
|
}
|
|
3889
3909
|
}, [open, plain]);
|
|
3890
|
-
return /* @__PURE__ */ (0,
|
|
3910
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
3891
3911
|
Dialog,
|
|
3892
3912
|
{
|
|
3893
3913
|
open,
|
|
3894
3914
|
onOpenChange: (next) => {
|
|
3895
3915
|
if (!next) onChoose("cancel");
|
|
3896
3916
|
},
|
|
3897
|
-
children: /* @__PURE__ */ (0,
|
|
3898
|
-
/* @__PURE__ */ (0,
|
|
3899
|
-
/* @__PURE__ */ (0,
|
|
3900
|
-
/* @__PURE__ */ (0,
|
|
3917
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(DialogContent, { size: "md", children: [
|
|
3918
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(DialogHeader, { children: [
|
|
3919
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(DialogTitle, { children: "This chat's scopes differ from your current selection" }),
|
|
3920
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(DialogDescription, { children: "Choose which scopes this chat should run under. Dismissing cancels the send \u2014 your message stays in the composer." })
|
|
3901
3921
|
] }),
|
|
3902
|
-
/* @__PURE__ */ (0,
|
|
3903
|
-
/* @__PURE__ */ (0,
|
|
3904
|
-
/* @__PURE__ */ (0,
|
|
3922
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: "grid gap-4 py-1 sm:grid-cols-2", children: [
|
|
3923
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(ScopeSetList, { heading: "Current selection", items: current, renderScope }),
|
|
3924
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(ScopeSetList, { heading: "This chat's scopes", items: chat, renderScope })
|
|
3905
3925
|
] }),
|
|
3906
|
-
/* @__PURE__ */ (0,
|
|
3907
|
-
/* @__PURE__ */ (0,
|
|
3908
|
-
/* @__PURE__ */ (0,
|
|
3909
|
-
/* @__PURE__ */ (0,
|
|
3926
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(DialogFooter, { className: "flex-col gap-2 sm:flex-row sm:justify-end", children: [
|
|
3927
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Button, { type: "button", variant: "outline", onClick: () => onChoose("keep"), children: "Keep chat's scopes" }),
|
|
3928
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Button, { type: "button", variant: "outline", onClick: () => onChoose("combine"), children: "Combine both" }),
|
|
3929
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Button, { variant: "primary", type: "button", onClick: () => onChoose("update"), children: "Use current selection" })
|
|
3910
3930
|
] })
|
|
3911
3931
|
] })
|
|
3912
3932
|
}
|
|
3913
3933
|
);
|
|
3914
3934
|
}
|
|
3915
|
-
var
|
|
3935
|
+
var React73, import_jsx_runtime104, plainScope;
|
|
3916
3936
|
var init_scope_mismatch_dialog = __esm({
|
|
3917
3937
|
"src/scope-mismatch-dialog.tsx"() {
|
|
3918
3938
|
"use strict";
|
|
3919
3939
|
"use client";
|
|
3920
|
-
|
|
3940
|
+
React73 = __toESM(require("react"), 1);
|
|
3921
3941
|
init_button();
|
|
3922
3942
|
init_stand_in_notice();
|
|
3923
3943
|
init_dialog();
|
|
3924
|
-
|
|
3925
|
-
plainScope = (item) => /* @__PURE__ */ (0,
|
|
3944
|
+
import_jsx_runtime104 = require("react/jsx-runtime");
|
|
3945
|
+
plainScope = (item) => /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("span", { className: "truncate", "data-scope-mismatch-host": UNCONFIGURED, children: item.name });
|
|
3926
3946
|
}
|
|
3927
3947
|
});
|
|
3928
3948
|
|
|
@@ -3941,32 +3961,32 @@ function initialAnswers(req) {
|
|
|
3941
3961
|
function ValuePromptsDialog({ request, open, onSettle: settle }) {
|
|
3942
3962
|
const WritingBox = useWritingBox();
|
|
3943
3963
|
const WritingInput = useWritingInput();
|
|
3944
|
-
const [answers, setAnswers] =
|
|
3964
|
+
const [answers, setAnswers] = React74.useState(
|
|
3945
3965
|
() => request ? initialAnswers(request) : {}
|
|
3946
3966
|
);
|
|
3947
|
-
const [seen, setSeen] =
|
|
3967
|
+
const [seen, setSeen] = React74.useState(request);
|
|
3948
3968
|
if (request !== seen) {
|
|
3949
3969
|
setSeen(request);
|
|
3950
3970
|
setAnswers(request ? initialAnswers(request) : {});
|
|
3951
3971
|
}
|
|
3952
3972
|
const missingRequired = !!request?.fields.some((f) => f.required && !(answers[f.name] ?? "").trim());
|
|
3953
|
-
const submit =
|
|
3973
|
+
const submit = React74.useCallback(() => {
|
|
3954
3974
|
if (!request || missingRequired) return;
|
|
3955
3975
|
settle(answers);
|
|
3956
3976
|
}, [request, answers, missingRequired, settle]);
|
|
3957
3977
|
const only = request?.fields.length === 1 ? request.fields[0] : void 0;
|
|
3958
3978
|
const single = only && !(answers[only.name] ?? "").includes("\n") ? only : null;
|
|
3959
|
-
return /* @__PURE__ */ (0,
|
|
3960
|
-
/* @__PURE__ */ (0,
|
|
3961
|
-
/* @__PURE__ */ (0,
|
|
3962
|
-
/* @__PURE__ */ (0,
|
|
3979
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Dialog, { open, onOpenChange: (next) => !next && request && settle(null), children: /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(DialogContent, { size: "sm", children: [
|
|
3980
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(DialogHeader, { children: [
|
|
3981
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(DialogTitle, { children: request?.title ?? "" }),
|
|
3982
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(DialogDescription, { className: request?.description ? void 0 : "sr-only", children: request?.description ?? request?.title ?? "" })
|
|
3963
3983
|
] }),
|
|
3964
|
-
/* @__PURE__ */ (0,
|
|
3965
|
-
/* @__PURE__ */ (0,
|
|
3984
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "flex flex-col gap-4 py-1", children: request?.fields.map((field) => /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
|
|
3985
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(Label4, { htmlFor: `value-prompt-${field.name}`, className: "text-sm text-foreground", children: [
|
|
3966
3986
|
field.prompt,
|
|
3967
|
-
field.required ? /* @__PURE__ */ (0,
|
|
3987
|
+
field.required ? /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("span", { className: "ml-1 text-destructive", children: "*" }) : null
|
|
3968
3988
|
] }),
|
|
3969
|
-
single?.name === field.name ? /* @__PURE__ */ (0,
|
|
3989
|
+
single?.name === field.name ? /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
3970
3990
|
WritingInput,
|
|
3971
3991
|
{
|
|
3972
3992
|
id: `value-prompt-${field.name}`,
|
|
@@ -3984,7 +4004,7 @@ function ValuePromptsDialog({ request, open, onSettle: settle }) {
|
|
|
3984
4004
|
}
|
|
3985
4005
|
}
|
|
3986
4006
|
}
|
|
3987
|
-
) : /* @__PURE__ */ (0,
|
|
4007
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
3988
4008
|
WritingBox,
|
|
3989
4009
|
{
|
|
3990
4010
|
id: `value-prompt-${field.name}`,
|
|
@@ -3997,23 +4017,23 @@ function ValuePromptsDialog({ request, open, onSettle: settle }) {
|
|
|
3997
4017
|
}
|
|
3998
4018
|
)
|
|
3999
4019
|
] }, field.name)) }),
|
|
4000
|
-
/* @__PURE__ */ (0,
|
|
4001
|
-
/* @__PURE__ */ (0,
|
|
4002
|
-
/* @__PURE__ */ (0,
|
|
4020
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(DialogFooter, { children: [
|
|
4021
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Button, { type: "button", variant: "outline", onClick: () => settle(null), children: "Cancel" }),
|
|
4022
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Button, { type: "button", variant: "primary", onClick: submit, disabled: missingRequired, children: request?.submitLabel ?? "Continue" })
|
|
4003
4023
|
] })
|
|
4004
4024
|
] }) });
|
|
4005
4025
|
}
|
|
4006
|
-
var
|
|
4026
|
+
var React74, import_jsx_runtime105;
|
|
4007
4027
|
var init_value_prompts_dialog = __esm({
|
|
4008
4028
|
"src/value-prompts-dialog.tsx"() {
|
|
4009
4029
|
"use strict";
|
|
4010
4030
|
"use client";
|
|
4011
|
-
|
|
4031
|
+
React74 = __toESM(require("react"), 1);
|
|
4012
4032
|
init_button();
|
|
4013
4033
|
init_dialog();
|
|
4014
4034
|
init_label();
|
|
4015
4035
|
init_writing_box();
|
|
4016
|
-
|
|
4036
|
+
import_jsx_runtime105 = require("react/jsx-runtime");
|
|
4017
4037
|
}
|
|
4018
4038
|
});
|
|
4019
4039
|
|
|
@@ -4056,11 +4076,11 @@ function TextInputDialog({
|
|
|
4056
4076
|
}) {
|
|
4057
4077
|
const isMobile = (0, import_media_query.useIsMobile)();
|
|
4058
4078
|
const ProTextarea = useWritingBox();
|
|
4059
|
-
const [value, setValue] =
|
|
4060
|
-
const [error, setError] =
|
|
4061
|
-
const openerRef =
|
|
4062
|
-
const lastPointerTargetRef =
|
|
4063
|
-
|
|
4079
|
+
const [value, setValue] = React75.useState(defaultValue);
|
|
4080
|
+
const [error, setError] = React75.useState(null);
|
|
4081
|
+
const openerRef = React75.useRef(null);
|
|
4082
|
+
const lastPointerTargetRef = React75.useRef(null);
|
|
4083
|
+
React75.useEffect(() => {
|
|
4064
4084
|
const remember = (event) => {
|
|
4065
4085
|
const target = event.target;
|
|
4066
4086
|
lastPointerTargetRef.current = target instanceof HTMLElement ? target.closest("button") ?? target : null;
|
|
@@ -4068,20 +4088,20 @@ function TextInputDialog({
|
|
|
4068
4088
|
document.addEventListener("pointerdown", remember, true);
|
|
4069
4089
|
return () => document.removeEventListener("pointerdown", remember, true);
|
|
4070
4090
|
}, []);
|
|
4071
|
-
|
|
4091
|
+
React75.useEffect(() => {
|
|
4072
4092
|
if (open) openerRef.current = lastPointerTargetRef.current;
|
|
4073
4093
|
}, [open]);
|
|
4074
|
-
const pointIsOnOpener =
|
|
4094
|
+
const pointIsOnOpener = React75.useCallback(
|
|
4075
4095
|
(event) => isPointOnOpener(openerRef.current, event),
|
|
4076
4096
|
[]
|
|
4077
4097
|
);
|
|
4078
|
-
|
|
4098
|
+
React75.useEffect(() => {
|
|
4079
4099
|
if (open) {
|
|
4080
4100
|
setValue(defaultValue);
|
|
4081
4101
|
setError(null);
|
|
4082
4102
|
}
|
|
4083
4103
|
}, [open, defaultValue]);
|
|
4084
|
-
const submit =
|
|
4104
|
+
const submit = React75.useCallback(() => {
|
|
4085
4105
|
const trimmed = value.trim();
|
|
4086
4106
|
if (!trimmed && !allowEmpty) {
|
|
4087
4107
|
setError("Required");
|
|
@@ -4101,8 +4121,8 @@ function TextInputDialog({
|
|
|
4101
4121
|
if (busy) return;
|
|
4102
4122
|
submit();
|
|
4103
4123
|
};
|
|
4104
|
-
const body = /* @__PURE__ */ (0,
|
|
4105
|
-
multiline ? /* @__PURE__ */ (0,
|
|
4124
|
+
const body = /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("form", { onSubmit: handleFormSubmit, className: "space-y-2", children: [
|
|
4125
|
+
multiline ? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
4106
4126
|
ProTextarea,
|
|
4107
4127
|
{
|
|
4108
4128
|
autoFocus: true,
|
|
@@ -4122,7 +4142,7 @@ function TextInputDialog({
|
|
|
4122
4142
|
"aria-invalid": !!error,
|
|
4123
4143
|
"aria-describedby": error ? "text-input-dialog-error" : void 0
|
|
4124
4144
|
}
|
|
4125
|
-
) : /* @__PURE__ */ (0,
|
|
4145
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
4126
4146
|
Input2,
|
|
4127
4147
|
{
|
|
4128
4148
|
autoFocus: true,
|
|
@@ -4138,14 +4158,14 @@ function TextInputDialog({
|
|
|
4138
4158
|
"aria-describedby": error ? "text-input-dialog-error" : void 0
|
|
4139
4159
|
}
|
|
4140
4160
|
),
|
|
4141
|
-
error ? /* @__PURE__ */ (0,
|
|
4161
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("p", { id: "text-input-dialog-error", className: "text-sm text-destructive", children: [
|
|
4142
4162
|
error,
|
|
4143
|
-
/* @__PURE__ */ (0,
|
|
4163
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(ErrorActions, { message: error, operation: "Enter a value", source: "inline", origin: "design-system/TextInputDialog" })
|
|
4144
4164
|
] }) : null,
|
|
4145
|
-
/* @__PURE__ */ (0,
|
|
4165
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)("button", { type: "submit", className: "hidden", tabIndex: -1, "aria-hidden": true })
|
|
4146
4166
|
] });
|
|
4147
|
-
const buttons = /* @__PURE__ */ (0,
|
|
4148
|
-
/* @__PURE__ */ (0,
|
|
4167
|
+
const buttons = /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(import_jsx_runtime106.Fragment, { children: [
|
|
4168
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
4149
4169
|
Button,
|
|
4150
4170
|
{
|
|
4151
4171
|
type: "button",
|
|
@@ -4155,22 +4175,22 @@ function TextInputDialog({
|
|
|
4155
4175
|
children: cancelLabel
|
|
4156
4176
|
}
|
|
4157
4177
|
),
|
|
4158
|
-
/* @__PURE__ */ (0,
|
|
4159
|
-
busy ? /* @__PURE__ */ (0,
|
|
4178
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(Button, { type: "button", onClick: submit, disabled: busy || !allowEmpty && !value.trim(), children: [
|
|
4179
|
+
busy ? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Loader2Icon, { className: "mr-2 h-4 w-4 matrx-spin" }) : null,
|
|
4160
4180
|
confirmLabel
|
|
4161
4181
|
] })
|
|
4162
4182
|
] });
|
|
4163
4183
|
if (isMobile) {
|
|
4164
|
-
return /* @__PURE__ */ (0,
|
|
4165
|
-
/* @__PURE__ */ (0,
|
|
4166
|
-
/* @__PURE__ */ (0,
|
|
4167
|
-
description ? /* @__PURE__ */ (0,
|
|
4184
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Drawer, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(DrawerContent, { children: [
|
|
4185
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(DrawerHeader, { children: [
|
|
4186
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(DrawerTitle, { children: title }),
|
|
4187
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(DrawerDescription, { children: description }) : null
|
|
4168
4188
|
] }),
|
|
4169
|
-
/* @__PURE__ */ (0,
|
|
4170
|
-
/* @__PURE__ */ (0,
|
|
4189
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "px-4 pb-2", children: body }),
|
|
4190
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(DrawerFooter, { className: "flex-row justify-end gap-2", children: buttons })
|
|
4171
4191
|
] }) });
|
|
4172
4192
|
}
|
|
4173
|
-
return /* @__PURE__ */ (0,
|
|
4193
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(Dialog, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(
|
|
4174
4194
|
DialogContent,
|
|
4175
4195
|
{
|
|
4176
4196
|
className: "sm:max-w-md",
|
|
@@ -4180,22 +4200,22 @@ function TextInputDialog({
|
|
|
4180
4200
|
}
|
|
4181
4201
|
},
|
|
4182
4202
|
children: [
|
|
4183
|
-
/* @__PURE__ */ (0,
|
|
4184
|
-
/* @__PURE__ */ (0,
|
|
4185
|
-
description ? /* @__PURE__ */ (0,
|
|
4203
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(DialogHeader, { children: [
|
|
4204
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(DialogTitle, { children: title }),
|
|
4205
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(DialogDescription, { children: description }) : null
|
|
4186
4206
|
] }),
|
|
4187
4207
|
body,
|
|
4188
|
-
/* @__PURE__ */ (0,
|
|
4208
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(DialogFooter, { children: buttons })
|
|
4189
4209
|
]
|
|
4190
4210
|
}
|
|
4191
4211
|
) });
|
|
4192
4212
|
}
|
|
4193
|
-
var
|
|
4213
|
+
var React75, import_jsx_runtime106;
|
|
4194
4214
|
var init_text_input_dialog = __esm({
|
|
4195
4215
|
"src/text-input-dialog.tsx"() {
|
|
4196
4216
|
"use strict";
|
|
4197
4217
|
"use client";
|
|
4198
|
-
|
|
4218
|
+
React75 = __toESM(require("react"), 1);
|
|
4199
4219
|
init_icons();
|
|
4200
4220
|
init_cn();
|
|
4201
4221
|
init_button();
|
|
@@ -4206,7 +4226,7 @@ var init_text_input_dialog = __esm({
|
|
|
4206
4226
|
init_writing_box();
|
|
4207
4227
|
init_opener_reclick();
|
|
4208
4228
|
init_error_box();
|
|
4209
|
-
|
|
4229
|
+
import_jsx_runtime106 = require("react/jsx-runtime");
|
|
4210
4230
|
}
|
|
4211
4231
|
});
|
|
4212
4232
|
|
|
@@ -4247,6 +4267,8 @@ __export(src_exports, {
|
|
|
4247
4267
|
AppRailSpacer: () => AppRailSpacer,
|
|
4248
4268
|
ArchiveFilter: () => ArchiveFilter,
|
|
4249
4269
|
ArchivedDisclosure: () => ArchivedDisclosure,
|
|
4270
|
+
AssistPeekCard: () => AssistPeekCard,
|
|
4271
|
+
AssistPeekHover: () => AssistPeekHover,
|
|
4250
4272
|
AuthGateDialog: () => AuthGateDialog2,
|
|
4251
4273
|
Avatar: () => Avatar,
|
|
4252
4274
|
AvatarFallback: () => AvatarFallback,
|
|
@@ -11472,6 +11494,22 @@ function useTapSurface(explicit) {
|
|
|
11472
11494
|
// src/tap-target/tap-features.tsx
|
|
11473
11495
|
var import_react15 = require("react");
|
|
11474
11496
|
init_motion();
|
|
11497
|
+
|
|
11498
|
+
// src/tap-shortcut.ts
|
|
11499
|
+
var IS_APPLE = typeof navigator !== "undefined" && /Mac|iPhone|iPad|iPod/.test(navigator.platform || navigator.userAgent);
|
|
11500
|
+
function parseShortcut(shortcut) {
|
|
11501
|
+
const parts = shortcut.toLowerCase().split("+");
|
|
11502
|
+
const key = parts.pop() ?? "";
|
|
11503
|
+
return { mod: parts.includes("mod"), shift: parts.includes("shift"), alt: parts.includes("alt"), key };
|
|
11504
|
+
}
|
|
11505
|
+
function formatTapShortcut(shortcut) {
|
|
11506
|
+
const p = parseShortcut(shortcut);
|
|
11507
|
+
const key = p.key.length === 1 ? p.key.toUpperCase() : p.key[0].toUpperCase() + p.key.slice(1);
|
|
11508
|
+
if (IS_APPLE) return `${p.alt ? "\u2325" : ""}${p.shift ? "\u21E7" : ""}${p.mod ? "\u2318" : ""}${key}`;
|
|
11509
|
+
return [p.mod && "Ctrl", p.alt && "Alt", p.shift && "Shift", key].filter(Boolean).join("+");
|
|
11510
|
+
}
|
|
11511
|
+
|
|
11512
|
+
// src/tap-target/tap-features.tsx
|
|
11475
11513
|
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
11476
11514
|
var TAP_TONE_CLASS = {
|
|
11477
11515
|
default: "text-foreground",
|
|
@@ -11489,18 +11527,6 @@ var TAP_SOLID_TONE = {
|
|
|
11489
11527
|
warning: { fill: "bg-warning group-hover/tap:bg-warning/85", glyph: "text-warning-foreground" },
|
|
11490
11528
|
neutral: { fill: "bg-foreground group-hover/tap:bg-foreground/85", glyph: "text-background" }
|
|
11491
11529
|
};
|
|
11492
|
-
var IS_APPLE = typeof navigator !== "undefined" && /Mac|iPhone|iPad|iPod/.test(navigator.platform || navigator.userAgent);
|
|
11493
|
-
function parseShortcut(shortcut) {
|
|
11494
|
-
const parts = shortcut.toLowerCase().split("+");
|
|
11495
|
-
const key = parts.pop() ?? "";
|
|
11496
|
-
return { mod: parts.includes("mod"), shift: parts.includes("shift"), alt: parts.includes("alt"), key };
|
|
11497
|
-
}
|
|
11498
|
-
function formatTapShortcut(shortcut) {
|
|
11499
|
-
const p = parseShortcut(shortcut);
|
|
11500
|
-
const key = p.key.length === 1 ? p.key.toUpperCase() : p.key[0].toUpperCase() + p.key.slice(1);
|
|
11501
|
-
if (IS_APPLE) return `${p.alt ? "\u2325" : ""}${p.shift ? "\u21E7" : ""}${p.mod ? "\u2318" : ""}${key}`;
|
|
11502
|
-
return [p.mod && "Ctrl", p.alt && "Alt", p.shift && "Shift", key].filter(Boolean).join("+");
|
|
11503
|
-
}
|
|
11504
11530
|
function isTyping(target) {
|
|
11505
11531
|
const el = target;
|
|
11506
11532
|
return !!el && (el.isContentEditable || /^(INPUT|TEXTAREA|SELECT)$/.test(el.tagName));
|
|
@@ -12606,7 +12632,7 @@ var PeekCard = React58.forwardRef((allProps, ref) => {
|
|
|
12606
12632
|
// Every height is capped by the room the host left (`--matrx-peek-room`, set by the hover
|
|
12607
12633
|
// and click hosts from the popper's available height), so a card that cannot fit above or
|
|
12608
12634
|
// below its trigger shrinks and scrolls inside instead of leaving the screen.
|
|
12609
|
-
...height === "fixed" || loading ? { height: `min(${box.height}px, var(${PEEK_ROOM_VAR}, 100vh))` } : {
|
|
12635
|
+
...height === "content" ? { maxHeight: `min(${box.height}px, var(${PEEK_ROOM_VAR}, 100vh))` } : height === "fixed" || loading ? { height: `min(${box.height}px, var(${PEEK_ROOM_VAR}, 100vh))` } : {
|
|
12610
12636
|
minHeight: `min(${box.minHeight}px, var(${PEEK_ROOM_VAR}, 100vh))`,
|
|
12611
12637
|
maxHeight: `min(${box.height}px, var(${PEEK_ROOM_VAR}, 100vh))`
|
|
12612
12638
|
}
|
|
@@ -12923,16 +12949,44 @@ function recordDoors(doors) {
|
|
|
12923
12949
|
href: door.href,
|
|
12924
12950
|
newTab: door.newTab,
|
|
12925
12951
|
inMenu: known.inMenu,
|
|
12926
|
-
busy: door.busy
|
|
12952
|
+
busy: door.busy,
|
|
12953
|
+
menu: door.kind === "action" && door.menu?.length ? door.menu : void 0
|
|
12927
12954
|
});
|
|
12928
12955
|
}
|
|
12929
12956
|
return out;
|
|
12930
12957
|
}
|
|
12931
12958
|
var PEEK_SHEET_FOOTER_SLOTS = 4;
|
|
12932
12959
|
var PEEK_DOOR = "flex shrink-0 items-center justify-center rounded-md text-foreground transition-colors hover:bg-accent hover:text-primary disabled:text-disabled-foreground disabled:hover:bg-transparent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary";
|
|
12960
|
+
function MenuDoor({ action, menu, disabled }) {
|
|
12961
|
+
const { sheet } = usePeekCard();
|
|
12962
|
+
const [open, setOpen] = React58.useState(false);
|
|
12963
|
+
usePeekHoldWhile(open);
|
|
12964
|
+
const glyph = sheet ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(action.icon, { className: "size-5" }) : /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(action.icon, { className: "size-3.5" });
|
|
12965
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(DropdownMenu, { modal: false, open, onOpenChange: setOpen, children: [
|
|
12966
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
12967
|
+
Button2,
|
|
12968
|
+
{
|
|
12969
|
+
type: "button",
|
|
12970
|
+
variant: "quiet",
|
|
12971
|
+
"aria-label": action.label,
|
|
12972
|
+
title: action.label,
|
|
12973
|
+
icon: action.busy ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Loader2Icon, { className: "animate-spin" }) : glyph,
|
|
12974
|
+
className: "shrink-0",
|
|
12975
|
+
disabled: disabled || action.busy,
|
|
12976
|
+
onClick: (event) => event.stopPropagation()
|
|
12977
|
+
}
|
|
12978
|
+
) }),
|
|
12979
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(DropdownMenuContent, { align: "end", "data-peek-no-drag": "", children: menu.map((group, i) => /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(React58.Fragment, { children: [
|
|
12980
|
+
i > 0 ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(DropdownMenuSeparator, {}) : null,
|
|
12981
|
+
group.label ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(DropdownMenuLabel, { children: group.label }) : null,
|
|
12982
|
+
group.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(DropdownMenuItem, { ...item.tone ? { tone: item.tone } : {}, onSelect: () => item.onSelect(), children: item.label }, item.key))
|
|
12983
|
+
] }, `${group.label ?? ""}-${i}`)) })
|
|
12984
|
+
] });
|
|
12985
|
+
}
|
|
12933
12986
|
function FooterDoor({ action, disabled = false }) {
|
|
12934
12987
|
const { sheet } = usePeekCard();
|
|
12935
12988
|
const { Link } = useMatrxDataTableHost();
|
|
12989
|
+
if (action.menu) return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(MenuDoor, { action, menu: action.menu, disabled });
|
|
12936
12990
|
const box = sheet ? "size-11" : "size-7";
|
|
12937
12991
|
const glyph = /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(action.icon, { className: sheet ? "size-5" : "size-3.5" });
|
|
12938
12992
|
if (action.href && !disabled && !action.newTab && Link) {
|
|
@@ -13109,7 +13163,7 @@ function useDoorsThatFit(row, primaryRef, opts) {
|
|
|
13109
13163
|
}, [row, primaryRef, doorPx, fixedDoors, fills, hasPrimary, sheet, actionCount]);
|
|
13110
13164
|
return fit;
|
|
13111
13165
|
}
|
|
13112
|
-
function PeekCardFooter({ primary, onSettings, doors = [], copy, openHref }) {
|
|
13166
|
+
function PeekCardFooter({ primary, primaryAt, onSettings, doors = [], copy, openHref }) {
|
|
13113
13167
|
const { density, size, orientation, loading, sheet } = usePeekCard();
|
|
13114
13168
|
const row = React58.useRef(null);
|
|
13115
13169
|
const primaryRef = React58.useRef(null);
|
|
@@ -13117,8 +13171,8 @@ function PeekCardFooter({ primary, onSettings, doors = [], copy, openHref }) {
|
|
|
13117
13171
|
const [moreOpen, setMoreOpen] = React58.useState(false);
|
|
13118
13172
|
const actions2 = recordDoors(doors);
|
|
13119
13173
|
const open = openHref ? { icon: ExternalLinkIcon, label: "Open in new tab", href: openHref, newTab: true } : null;
|
|
13120
|
-
const fixedDoors = [settings, copy, open].filter(Boolean).length;
|
|
13121
|
-
const fills = Boolean(sheet) || orientation === "portrait";
|
|
13174
|
+
const fixedDoors = [settings, copy, open].filter(Boolean).length + actions2.filter((action) => action.menu).length;
|
|
13175
|
+
const fills = Boolean(sheet) || (primaryAt ?? (orientation === "portrait" ? "fill" : "end")) === "fill";
|
|
13122
13176
|
const measured = useDoorsThatFit(row, primaryRef, {
|
|
13123
13177
|
doorPx: sheet ? 44 : 28,
|
|
13124
13178
|
fixedDoors,
|
|
@@ -13128,8 +13182,9 @@ function PeekCardFooter({ primary, onSettings, doors = [], copy, openHref }) {
|
|
|
13128
13182
|
actionCount: actions2.length
|
|
13129
13183
|
});
|
|
13130
13184
|
const room = measured ?? (sheet ? PEEK_SHEET_FOOTER_SLOTS : PEEK_CARD_FOOTER_SLOTS[size]) - fixedDoors;
|
|
13131
|
-
const inline = actions2.filter((action) => !action.inMenu);
|
|
13185
|
+
const inline = actions2.filter((action) => !action.inMenu && !action.menu);
|
|
13132
13186
|
const menuOnly = actions2.filter((action) => action.inMenu);
|
|
13187
|
+
const menuDoors = actions2.filter((action) => action.menu);
|
|
13133
13188
|
const inlineRoom = menuOnly.length ? Math.max(0, room - 1) : room;
|
|
13134
13189
|
const shown = inline.length <= inlineRoom ? inline : inline.slice(0, Math.max(0, inlineRoom - (menuOnly.length ? 0 : 1)));
|
|
13135
13190
|
const overflow = [...inline.slice(shown.length), ...menuOnly];
|
|
@@ -13142,7 +13197,9 @@ function PeekCardFooter({ primary, onSettings, doors = [], copy, openHref }) {
|
|
|
13142
13197
|
variant: "primary",
|
|
13143
13198
|
className: cn("mx-1", fills && "flex-1"),
|
|
13144
13199
|
style: fills ? { minWidth: PEEK_PRIMARY_MIN_PX[sheet ? "sheet" : "card"] } : void 0,
|
|
13145
|
-
disabled: loading,
|
|
13200
|
+
disabled: loading || primary.disabled || primary.busy,
|
|
13201
|
+
title: primary.title,
|
|
13202
|
+
icon: primary.busy ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Loader2Icon, { className: "animate-spin" }) : void 0,
|
|
13146
13203
|
onClick: primary.onClick,
|
|
13147
13204
|
children: primary.label
|
|
13148
13205
|
}
|
|
@@ -13170,6 +13227,7 @@ function PeekCardFooter({ primary, onSettings, doors = [], copy, openHref }) {
|
|
|
13170
13227
|
settings ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(FooterDoor, { action: settings, disabled: loading }) : null,
|
|
13171
13228
|
fills && primaryButton ? primaryButton : /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("span", { className: "flex-1" }),
|
|
13172
13229
|
more,
|
|
13230
|
+
menuDoors.map((action, i) => /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(FooterDoor, { action, disabled: loading }, `menu-${action.label}-${i}`)),
|
|
13173
13231
|
shown.map((action, i) => /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(FooterDoor, { action, disabled: loading }, `${action.label}-${i}`)),
|
|
13174
13232
|
copy ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(PeekCopyDoor, { copy, disabled: loading }) : null,
|
|
13175
13233
|
open ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(FooterDoor, { action: open, disabled: loading }) : null,
|
|
@@ -13227,7 +13285,7 @@ function PeekHoverCard(props) {
|
|
|
13227
13285
|
{
|
|
13228
13286
|
openDelay: Math.max(HOVER_CARD_OPEN_DELAY_MS, HOVER_CARD_OPEN_DELAY_FLOOR_MS),
|
|
13229
13287
|
closeDelay: HOVER_CARD_CLOSE_DELAY_MS,
|
|
13230
|
-
open: open ??
|
|
13288
|
+
open: (open ?? hovered) || held,
|
|
13231
13289
|
onOpenChange: (next) => {
|
|
13232
13290
|
setHovered(next);
|
|
13233
13291
|
onOpenChange?.(next);
|
|
@@ -14463,12 +14521,147 @@ var AddTile = React62.forwardRef(function AddTile2({ icon, className, children,
|
|
|
14463
14521
|
);
|
|
14464
14522
|
});
|
|
14465
14523
|
|
|
14524
|
+
// src/assist-peek.tsx
|
|
14525
|
+
var React63 = __toESM(require("react"), 1);
|
|
14526
|
+
var import_react_slot7 = require("@radix-ui/react-slot");
|
|
14527
|
+
init_controls();
|
|
14528
|
+
init_icons();
|
|
14529
|
+
init_use_is_mobile();
|
|
14530
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
14531
|
+
function AssistPeekCard({
|
|
14532
|
+
title,
|
|
14533
|
+
icon: Icon3,
|
|
14534
|
+
subtitle,
|
|
14535
|
+
children,
|
|
14536
|
+
why,
|
|
14537
|
+
evidence,
|
|
14538
|
+
yourNote,
|
|
14539
|
+
explainer,
|
|
14540
|
+
primary,
|
|
14541
|
+
later,
|
|
14542
|
+
stopShowing,
|
|
14543
|
+
deciding = false,
|
|
14544
|
+
onNotNow,
|
|
14545
|
+
step
|
|
14546
|
+
}) {
|
|
14547
|
+
const laterDoor = later?.length ? { kind: "action", id: "later", label: "Later", icon: ClockIcon, menu: later, busy: deciding } : null;
|
|
14548
|
+
const stopDoor = stopShowing?.length ? { kind: "action", id: "stop", label: "Stop showing", icon: BellOffIcon, menu: stopShowing, busy: deciding } : null;
|
|
14549
|
+
const doors = laterDoor && stopDoor ? [laterDoor, stopDoor] : laterDoor ? [laterDoor] : stopDoor ? [stopDoor] : [];
|
|
14550
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(PeekCard, { size: "xl", height: "content", "data-matrx-assist-peek": "", "data-matrx-notice-surface": "", children: [
|
|
14551
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
14552
|
+
PeekCardHeader,
|
|
14553
|
+
{
|
|
14554
|
+
title,
|
|
14555
|
+
leading: Icon3 ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Icon3, {}) : void 0,
|
|
14556
|
+
subtitle,
|
|
14557
|
+
trailing: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Button2, { type: "button", variant: "quiet", "aria-label": "Not now", title: "Not now", icon: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(XIcon, {}), disabled: Boolean(primary.busy) || deciding, onClick: onNotNow })
|
|
14558
|
+
}
|
|
14559
|
+
),
|
|
14560
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(PeekCardBody, { children: [
|
|
14561
|
+
children ? (
|
|
14562
|
+
// The explanation is what the person came to read: 14px (the size the host's markdown
|
|
14563
|
+
// paragraphs draw at), one step above the card's secondary sections.
|
|
14564
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { "data-matrx-assist-body": "", className: "type-value min-w-0 break-words text-foreground", children: typeof children === "string" ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("p", { className: "whitespace-pre-wrap", children }) : children })
|
|
14565
|
+
) : null,
|
|
14566
|
+
why ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(PeekCardSection, { label: "Why", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(PeekCardText, { children: why }) }) : null,
|
|
14567
|
+
evidence ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(EvidenceSection, { evidence }) : null,
|
|
14568
|
+
yourNote ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(PeekCardSection, { label: "Your note", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(PeekCardText, { children: yourNote }) }) : null,
|
|
14569
|
+
explainer ? (
|
|
14570
|
+
// What pressing the verb will do, hung off a return arrow like a consequence.
|
|
14571
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(PeekCardRow, { icon: CornerDownRightIcon, tone: "muted", wrap: true, children: explainer })
|
|
14572
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(PeekCardSection, { label: "Not available here", tone: "danger", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(PeekCardText, { children: "This version of the app does not know how to do this." }) }),
|
|
14573
|
+
step
|
|
14574
|
+
] }),
|
|
14575
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
14576
|
+
PeekCardFooter,
|
|
14577
|
+
{
|
|
14578
|
+
primaryAt: "end",
|
|
14579
|
+
primary: { ...primary, disabled: Boolean(primary.disabled) || explainer === null || deciding },
|
|
14580
|
+
doors
|
|
14581
|
+
}
|
|
14582
|
+
)
|
|
14583
|
+
] });
|
|
14584
|
+
}
|
|
14585
|
+
function EvidenceSection({ evidence }) {
|
|
14586
|
+
const items = evidence.items ?? [];
|
|
14587
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(PeekCardSection, { label: "What we saw", children: [
|
|
14588
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
14589
|
+
PeekCardRows,
|
|
14590
|
+
{
|
|
14591
|
+
rows: [{ key: "evidence", text: evidence.label, title: evidence.label, href: evidence.href }]
|
|
14592
|
+
}
|
|
14593
|
+
),
|
|
14594
|
+
evidence.snippet ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(PeekCardText, { clamp: 4, breaks: true, children: evidence.snippet }) : null,
|
|
14595
|
+
items.length ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(PeekCardRows, { limit: 6, rows: items.map((item, i) => ({ key: `${i}-${item}`, text: item, title: item })) }) : null
|
|
14596
|
+
] });
|
|
14597
|
+
}
|
|
14598
|
+
function inCardMenu(target) {
|
|
14599
|
+
return target instanceof Element && target.closest("[data-radix-menu-content]") !== null;
|
|
14600
|
+
}
|
|
14601
|
+
function AssistPeekHover({ trigger, label, side = "top", align = "end", presentation, children }) {
|
|
14602
|
+
const [hovered, setHovered] = React63.useState(false);
|
|
14603
|
+
const [kept, setKept] = React63.useState(false);
|
|
14604
|
+
const isMobile = (0, import_media_query.useIsMobile)();
|
|
14605
|
+
const sheet = presentation === "sheet" || presentation !== "float" && isMobile;
|
|
14606
|
+
const card = React63.useRef(null);
|
|
14607
|
+
const close = React63.useCallback(() => {
|
|
14608
|
+
setHovered(false);
|
|
14609
|
+
setKept(false);
|
|
14610
|
+
}, []);
|
|
14611
|
+
React63.useEffect(() => {
|
|
14612
|
+
if (!kept) return;
|
|
14613
|
+
const onPress = (event) => {
|
|
14614
|
+
if (card.current?.contains(event.target) || inCardMenu(event.target)) return;
|
|
14615
|
+
close();
|
|
14616
|
+
};
|
|
14617
|
+
const onKey = (event) => {
|
|
14618
|
+
if (event.key !== "Escape" || document.querySelector("[data-radix-menu-content]")) return;
|
|
14619
|
+
close();
|
|
14620
|
+
};
|
|
14621
|
+
document.addEventListener("pointerdown", onPress, true);
|
|
14622
|
+
document.addEventListener("keydown", onKey);
|
|
14623
|
+
return () => {
|
|
14624
|
+
document.removeEventListener("pointerdown", onPress, true);
|
|
14625
|
+
document.removeEventListener("keydown", onKey);
|
|
14626
|
+
};
|
|
14627
|
+
}, [kept, close]);
|
|
14628
|
+
const keep = () => {
|
|
14629
|
+
setHovered(true);
|
|
14630
|
+
setKept(true);
|
|
14631
|
+
};
|
|
14632
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
14633
|
+
PeekHoverCard,
|
|
14634
|
+
{
|
|
14635
|
+
trigger: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
14636
|
+
import_react_slot7.Slot,
|
|
14637
|
+
{
|
|
14638
|
+
onClick: (event) => {
|
|
14639
|
+
event.stopPropagation();
|
|
14640
|
+
keep();
|
|
14641
|
+
},
|
|
14642
|
+
children: trigger
|
|
14643
|
+
}
|
|
14644
|
+
),
|
|
14645
|
+
label,
|
|
14646
|
+
side,
|
|
14647
|
+
align,
|
|
14648
|
+
open: hovered || kept,
|
|
14649
|
+
onOpenChange: (next) => {
|
|
14650
|
+
setHovered(next);
|
|
14651
|
+
if (!next && (sheet || !kept)) close();
|
|
14652
|
+
},
|
|
14653
|
+
...presentation ? { presentation } : {},
|
|
14654
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { ref: card, onPointerDownCapture: keep, onFocusCapture: keep, children: children(close) })
|
|
14655
|
+
}
|
|
14656
|
+
);
|
|
14657
|
+
}
|
|
14658
|
+
|
|
14466
14659
|
// src/radio-group.tsx
|
|
14467
14660
|
var RadioGroupPrimitive = __toESM(require("@radix-ui/react-radio-group"), 1);
|
|
14468
|
-
var
|
|
14661
|
+
var React64 = __toESM(require("react"), 1);
|
|
14469
14662
|
init_cn();
|
|
14470
|
-
var
|
|
14471
|
-
var RadioGroupSizeContext =
|
|
14663
|
+
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
14664
|
+
var RadioGroupSizeContext = React64.createContext("md");
|
|
14472
14665
|
var CONTROL_CLASSES = {
|
|
14473
14666
|
sm: "h-3.5 w-3.5",
|
|
14474
14667
|
md: "h-4 w-4",
|
|
@@ -14479,7 +14672,7 @@ var DOT_CLASSES = {
|
|
|
14479
14672
|
md: "h-1.5 w-1.5",
|
|
14480
14673
|
lg: "h-2 w-2"
|
|
14481
14674
|
};
|
|
14482
|
-
var RadioGroup3 =
|
|
14675
|
+
var RadioGroup3 = React64.forwardRef(({ className, size = "md", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(RadioGroupSizeContext.Provider, { value: size, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
14483
14676
|
RadioGroupPrimitive.Root,
|
|
14484
14677
|
{
|
|
14485
14678
|
ref,
|
|
@@ -14489,10 +14682,10 @@ var RadioGroup3 = React63.forwardRef(({ className, size = "md", ...props }, ref)
|
|
|
14489
14682
|
}
|
|
14490
14683
|
) }));
|
|
14491
14684
|
RadioGroup3.displayName = RadioGroupPrimitive.Root.displayName;
|
|
14492
|
-
var RadioGroupItem =
|
|
14493
|
-
const groupSize =
|
|
14685
|
+
var RadioGroupItem = React64.forwardRef(({ className, size, ...props }, ref) => {
|
|
14686
|
+
const groupSize = React64.useContext(RadioGroupSizeContext);
|
|
14494
14687
|
const resolved = size ?? groupSize;
|
|
14495
|
-
return /* @__PURE__ */ (0,
|
|
14688
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
14496
14689
|
RadioGroupPrimitive.Item,
|
|
14497
14690
|
{
|
|
14498
14691
|
ref,
|
|
@@ -14509,7 +14702,7 @@ var RadioGroupItem = React63.forwardRef(({ className, size, ...props }, ref) =>
|
|
|
14509
14702
|
className
|
|
14510
14703
|
),
|
|
14511
14704
|
...props,
|
|
14512
|
-
children: /* @__PURE__ */ (0,
|
|
14705
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(RadioGroupPrimitive.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
14513
14706
|
"div",
|
|
14514
14707
|
{
|
|
14515
14708
|
className: cn("rounded-full bg-primary-foreground", DOT_CLASSES[resolved])
|
|
@@ -14527,8 +14720,8 @@ function RadioList({
|
|
|
14527
14720
|
className,
|
|
14528
14721
|
"aria-label": ariaLabel
|
|
14529
14722
|
}) {
|
|
14530
|
-
const baseId =
|
|
14531
|
-
return /* @__PURE__ */ (0,
|
|
14723
|
+
const baseId = React64.useId();
|
|
14724
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
14532
14725
|
RadioGroup3,
|
|
14533
14726
|
{
|
|
14534
14727
|
value,
|
|
@@ -14539,7 +14732,7 @@ function RadioList({
|
|
|
14539
14732
|
children: options.map((opt, i) => {
|
|
14540
14733
|
const selected = value === opt.value;
|
|
14541
14734
|
const id = `${baseId}-${i}`;
|
|
14542
|
-
return /* @__PURE__ */ (0,
|
|
14735
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)(
|
|
14543
14736
|
"label",
|
|
14544
14737
|
{
|
|
14545
14738
|
htmlFor: id,
|
|
@@ -14550,9 +14743,9 @@ function RadioList({
|
|
|
14550
14743
|
opt.disabled && "cursor-not-allowed text-disabled-foreground"
|
|
14551
14744
|
),
|
|
14552
14745
|
children: [
|
|
14553
|
-
/* @__PURE__ */ (0,
|
|
14554
|
-
/* @__PURE__ */ (0,
|
|
14555
|
-
opt.hint != null && opt.hint !== "" ? /* @__PURE__ */ (0,
|
|
14746
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(RadioGroupItem, { id, value: opt.value, disabled: opt.disabled }),
|
|
14747
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "flex-1 truncate", children: opt.label }),
|
|
14748
|
+
opt.hint != null && opt.hint !== "" ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "shrink-0 text-xs tabular-nums text-muted-foreground", children: opt.hint }) : null
|
|
14556
14749
|
]
|
|
14557
14750
|
},
|
|
14558
14751
|
opt.value
|
|
@@ -14566,9 +14759,9 @@ function RadioList({
|
|
|
14566
14759
|
var ToggleGroupPrimitive = __toESM(require("@radix-ui/react-toggle-group"), 1);
|
|
14567
14760
|
var TogglePrimitive = __toESM(require("@radix-ui/react-toggle"), 1);
|
|
14568
14761
|
var import_class_variance_authority7 = require("class-variance-authority");
|
|
14569
|
-
var
|
|
14762
|
+
var React65 = __toESM(require("react"), 1);
|
|
14570
14763
|
init_cn();
|
|
14571
|
-
var
|
|
14764
|
+
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
14572
14765
|
var toggleVariants = (0, import_class_variance_authority7.cva)(
|
|
14573
14766
|
"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",
|
|
14574
14767
|
{
|
|
@@ -14594,7 +14787,7 @@ var toggleVariants = (0, import_class_variance_authority7.cva)(
|
|
|
14594
14787
|
}
|
|
14595
14788
|
}
|
|
14596
14789
|
);
|
|
14597
|
-
var Toggle =
|
|
14790
|
+
var Toggle = React65.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
14598
14791
|
TogglePrimitive.Root,
|
|
14599
14792
|
{
|
|
14600
14793
|
ref,
|
|
@@ -14604,21 +14797,21 @@ var Toggle = React64.forwardRef(({ className, variant, size, ...props }, ref) =>
|
|
|
14604
14797
|
}
|
|
14605
14798
|
));
|
|
14606
14799
|
Toggle.displayName = TogglePrimitive.Root.displayName;
|
|
14607
|
-
var ToggleGroupContext =
|
|
14608
|
-
var ToggleGroup =
|
|
14800
|
+
var ToggleGroupContext = React65.createContext({ size: "default", variant: "default" });
|
|
14801
|
+
var ToggleGroup = React65.forwardRef(({ className, variant, size, children, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
14609
14802
|
ToggleGroupPrimitive.Root,
|
|
14610
14803
|
{
|
|
14611
14804
|
ref,
|
|
14612
14805
|
"data-slot": "toggle-group",
|
|
14613
14806
|
className: cn("flex items-center justify-center gap-1", className),
|
|
14614
14807
|
...props,
|
|
14615
|
-
children: /* @__PURE__ */ (0,
|
|
14808
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ToggleGroupContext.Provider, { value: { variant, size }, children })
|
|
14616
14809
|
}
|
|
14617
14810
|
));
|
|
14618
14811
|
ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
|
|
14619
|
-
var ToggleGroupItem =
|
|
14620
|
-
const context =
|
|
14621
|
-
return /* @__PURE__ */ (0,
|
|
14812
|
+
var ToggleGroupItem = React65.forwardRef(({ className, children, variant, size, ...props }, ref) => {
|
|
14813
|
+
const context = React65.useContext(ToggleGroupContext);
|
|
14814
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
14622
14815
|
ToggleGroupPrimitive.Item,
|
|
14623
14816
|
{
|
|
14624
14817
|
ref,
|
|
@@ -14638,12 +14831,12 @@ var ToggleGroupItem = React64.forwardRef(({ className, children, variant, size,
|
|
|
14638
14831
|
ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
|
|
14639
14832
|
|
|
14640
14833
|
// src/floating-dock.tsx
|
|
14641
|
-
var
|
|
14834
|
+
var React66 = __toESM(require("react"), 1);
|
|
14642
14835
|
init_cn();
|
|
14643
14836
|
init_icons();
|
|
14644
14837
|
init_controls();
|
|
14645
14838
|
init_motion();
|
|
14646
|
-
var
|
|
14839
|
+
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
14647
14840
|
var BASE_SIZE = 40;
|
|
14648
14841
|
var BASE_ICON = 20;
|
|
14649
14842
|
var REACH = 150;
|
|
@@ -14663,29 +14856,29 @@ function FloatingDock({
|
|
|
14663
14856
|
growthFactor = 2,
|
|
14664
14857
|
labelPosition = "top"
|
|
14665
14858
|
}) {
|
|
14666
|
-
return /* @__PURE__ */ (0,
|
|
14667
|
-
/* @__PURE__ */ (0,
|
|
14668
|
-
/* @__PURE__ */ (0,
|
|
14859
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: cn("flex w-auto items-center justify-center bg-background", className), children: [
|
|
14860
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(FloatingDockPhone, { items }),
|
|
14861
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(FloatingDockDesktop, { items, growthFactor, labelPosition })
|
|
14669
14862
|
] });
|
|
14670
14863
|
}
|
|
14671
14864
|
function BalancedFloatingDock(props) {
|
|
14672
|
-
return /* @__PURE__ */ (0,
|
|
14865
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(FloatingDock, { growthFactor: 1.8, labelPosition: "side", ...props });
|
|
14673
14866
|
}
|
|
14674
14867
|
function FloatingDockPhone({ items }) {
|
|
14675
|
-
const [open, setOpen] =
|
|
14676
|
-
return /* @__PURE__ */ (0,
|
|
14677
|
-
/* @__PURE__ */ (0,
|
|
14868
|
+
const [open, setOpen] = React66.useState(false);
|
|
14869
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "relative block md:hidden", children: [
|
|
14870
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
14678
14871
|
Button2,
|
|
14679
14872
|
{
|
|
14680
14873
|
type: "button",
|
|
14681
14874
|
variant: "quiet",
|
|
14682
14875
|
"aria-label": open ? "Close menu" : "Open menu",
|
|
14683
|
-
icon: open ? /* @__PURE__ */ (0,
|
|
14876
|
+
icon: open ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(PanelTopCloseIcon, { className: "h-5 w-5" }) : /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(PanelTopOpenIcon, { className: "h-5 w-5" }),
|
|
14684
14877
|
"aria-expanded": open,
|
|
14685
14878
|
onClick: () => setOpen(!open)
|
|
14686
14879
|
}
|
|
14687
14880
|
),
|
|
14688
|
-
/* @__PURE__ */ (0,
|
|
14881
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
14689
14882
|
"div",
|
|
14690
14883
|
{
|
|
14691
14884
|
"data-open": open,
|
|
@@ -14695,32 +14888,32 @@ function FloatingDockPhone({ items }) {
|
|
|
14695
14888
|
PANEL_MOTION_CLASS,
|
|
14696
14889
|
open ? "translate-y-0" : "pointer-events-none -translate-y-full"
|
|
14697
14890
|
),
|
|
14698
|
-
children: /* @__PURE__ */ (0,
|
|
14699
|
-
/* @__PURE__ */ (0,
|
|
14700
|
-
/* @__PURE__ */ (0,
|
|
14701
|
-
/* @__PURE__ */ (0,
|
|
14891
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex h-full flex-col", children: [
|
|
14892
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex items-center justify-between border-b border-border p-4", children: [
|
|
14893
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("h2", { className: "text-lg font-medium", children: "Menu" }),
|
|
14894
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
14702
14895
|
Button2,
|
|
14703
14896
|
{
|
|
14704
14897
|
type: "button",
|
|
14705
14898
|
variant: "quiet",
|
|
14706
14899
|
"aria-label": "Close menu",
|
|
14707
|
-
icon: /* @__PURE__ */ (0,
|
|
14900
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(XIcon, { className: "h-6 w-6" }),
|
|
14708
14901
|
onClick: () => setOpen(false)
|
|
14709
14902
|
}
|
|
14710
14903
|
)
|
|
14711
14904
|
] }),
|
|
14712
|
-
/* @__PURE__ */ (0,
|
|
14905
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "flex-1 overflow-y-auto", children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
14713
14906
|
HostLink,
|
|
14714
14907
|
{
|
|
14715
14908
|
href: item.href,
|
|
14716
14909
|
className: "flex items-center justify-between border-b border-border p-4",
|
|
14717
14910
|
onClick: () => setOpen(false),
|
|
14718
14911
|
children: [
|
|
14719
|
-
/* @__PURE__ */ (0,
|
|
14720
|
-
/* @__PURE__ */ (0,
|
|
14721
|
-
/* @__PURE__ */ (0,
|
|
14912
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex items-center space-x-4", children: [
|
|
14913
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "flex h-10 w-10 items-center justify-center rounded-full bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "h-5 w-5 [&>svg]:h-full [&>svg]:w-full", children: item.icon }) }),
|
|
14914
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "font-medium", children: item.label })
|
|
14722
14915
|
] }),
|
|
14723
|
-
/* @__PURE__ */ (0,
|
|
14916
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(ChevronRightIcon, { className: "h-5 w-5 text-muted-foreground" })
|
|
14724
14917
|
]
|
|
14725
14918
|
},
|
|
14726
14919
|
item.label
|
|
@@ -14735,9 +14928,9 @@ function FloatingDockDesktop({
|
|
|
14735
14928
|
growthFactor,
|
|
14736
14929
|
labelPosition
|
|
14737
14930
|
}) {
|
|
14738
|
-
const circles =
|
|
14739
|
-
const [pointerX, setPointerX] =
|
|
14740
|
-
const [centers, setCenters] =
|
|
14931
|
+
const circles = React66.useRef([]);
|
|
14932
|
+
const [pointerX, setPointerX] = React66.useState(null);
|
|
14933
|
+
const [centers, setCenters] = React66.useState([]);
|
|
14741
14934
|
const measure = (x) => {
|
|
14742
14935
|
setPointerX(x);
|
|
14743
14936
|
setCenters(
|
|
@@ -14747,7 +14940,7 @@ function FloatingDockDesktop({
|
|
|
14747
14940
|
})
|
|
14748
14941
|
);
|
|
14749
14942
|
};
|
|
14750
|
-
return /* @__PURE__ */ (0,
|
|
14943
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
14751
14944
|
"div",
|
|
14752
14945
|
{
|
|
14753
14946
|
onMouseMove: (e) => measure(e.clientX),
|
|
@@ -14761,8 +14954,8 @@ function FloatingDockDesktop({
|
|
|
14761
14954
|
const size = dockSize(BASE_SIZE, growthFactor, distance);
|
|
14762
14955
|
const icon = dockSize(BASE_ICON, growthFactor, distance);
|
|
14763
14956
|
const under = Number.isFinite(distance) && Math.abs(distance) < BASE_SIZE / 2;
|
|
14764
|
-
return /* @__PURE__ */ (0,
|
|
14765
|
-
/* @__PURE__ */ (0,
|
|
14957
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(HostLink, { href: item.href, "aria-label": item.label, children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "relative", children: [
|
|
14958
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
14766
14959
|
"div",
|
|
14767
14960
|
{
|
|
14768
14961
|
ref: (el) => {
|
|
@@ -14773,7 +14966,7 @@ function FloatingDockDesktop({
|
|
|
14773
14966
|
"relative flex aspect-square items-center justify-center rounded-full bg-muted transition-[width,height]",
|
|
14774
14967
|
MAGNIFY_MOTION
|
|
14775
14968
|
),
|
|
14776
|
-
children: /* @__PURE__ */ (0,
|
|
14969
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
14777
14970
|
"div",
|
|
14778
14971
|
{
|
|
14779
14972
|
style: { width: icon, height: icon },
|
|
@@ -14786,7 +14979,7 @@ function FloatingDockDesktop({
|
|
|
14786
14979
|
)
|
|
14787
14980
|
}
|
|
14788
14981
|
),
|
|
14789
|
-
/* @__PURE__ */ (0,
|
|
14982
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
14790
14983
|
"div",
|
|
14791
14984
|
{
|
|
14792
14985
|
"data-shown": under,
|
|
@@ -14811,18 +15004,18 @@ init_motion();
|
|
|
14811
15004
|
init_writing_box();
|
|
14812
15005
|
|
|
14813
15006
|
// src/deferred-dialog.tsx
|
|
14814
|
-
var
|
|
14815
|
-
var
|
|
15007
|
+
var React68 = __toESM(require("react"), 1);
|
|
15008
|
+
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
14816
15009
|
function deferredDialog(name, load, isOpen) {
|
|
14817
15010
|
let pending = null;
|
|
14818
15011
|
const preload = () => pending ??= load().then((component) => ({ default: component }));
|
|
14819
|
-
const Body =
|
|
15012
|
+
const Body = React68.lazy(preload);
|
|
14820
15013
|
function Deferred(props) {
|
|
14821
15014
|
const open = isOpen(props);
|
|
14822
|
-
const [opened, setOpened] =
|
|
15015
|
+
const [opened, setOpened] = React68.useState(open);
|
|
14823
15016
|
if (open && !opened) setOpened(true);
|
|
14824
15017
|
if (!open && !opened) return null;
|
|
14825
|
-
return /* @__PURE__ */ (0,
|
|
15018
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(React68.Suspense, { fallback: null, children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Body, { ...props }) });
|
|
14826
15019
|
}
|
|
14827
15020
|
Deferred.displayName = name;
|
|
14828
15021
|
return Object.assign(Deferred, { preload });
|
|
@@ -14868,10 +15061,10 @@ var TextInputDialog2 = deferredDialog(
|
|
|
14868
15061
|
// src/clipboard-fallback-host.tsx
|
|
14869
15062
|
var import_clipboard_fallback_opener = require("@ai-matrx/kit/clipboard-fallback-opener");
|
|
14870
15063
|
var import_opener_react2 = require("@ai-matrx/kit/opener-react");
|
|
14871
|
-
var
|
|
15064
|
+
var import_jsx_runtime107 = require("react/jsx-runtime");
|
|
14872
15065
|
function ClipboardFallbackHost() {
|
|
14873
15066
|
const { open, shown, settle } = (0, import_opener_react2.useOpenerHost)(import_clipboard_fallback_opener.clipboardFallbackOpener);
|
|
14874
|
-
return /* @__PURE__ */ (0,
|
|
15067
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
14875
15068
|
ClipboardFallbackDialog2,
|
|
14876
15069
|
{
|
|
14877
15070
|
open,
|
|
@@ -14888,7 +15081,7 @@ function ClipboardFallbackHost() {
|
|
|
14888
15081
|
// src/floating-sheet.tsx
|
|
14889
15082
|
var import_react21 = require("react");
|
|
14890
15083
|
init_motion();
|
|
14891
|
-
var
|
|
15084
|
+
var import_jsx_runtime108 = require("react/jsx-runtime");
|
|
14892
15085
|
var FloatingSheet = ({
|
|
14893
15086
|
children,
|
|
14894
15087
|
isOpen,
|
|
@@ -15194,8 +15387,8 @@ var FloatingSheet = ({
|
|
|
15194
15387
|
const bottomPadding = showFooter ? "" : "pb-safe";
|
|
15195
15388
|
return `${basePadding} ${bottomPadding}`.trim();
|
|
15196
15389
|
};
|
|
15197
|
-
return /* @__PURE__ */ (0,
|
|
15198
|
-
isOpen && hasBackdrop && /* @__PURE__ */ (0,
|
|
15390
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(import_jsx_runtime108.Fragment, { children: [
|
|
15391
|
+
isOpen && hasBackdrop && /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
15199
15392
|
"div",
|
|
15200
15393
|
{
|
|
15201
15394
|
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}`,
|
|
@@ -15204,7 +15397,7 @@ var FloatingSheet = ({
|
|
|
15204
15397
|
"data-testid": "floating-sheet-backdrop"
|
|
15205
15398
|
}
|
|
15206
15399
|
),
|
|
15207
|
-
/* @__PURE__ */ (0,
|
|
15400
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
15208
15401
|
"div",
|
|
15209
15402
|
{
|
|
15210
15403
|
ref: sheetRef,
|
|
@@ -15216,25 +15409,25 @@ var FloatingSheet = ({
|
|
|
15216
15409
|
"aria-labelledby": "sheet-title",
|
|
15217
15410
|
tabIndex: -1,
|
|
15218
15411
|
"data-testid": "floating-sheet",
|
|
15219
|
-
children: /* @__PURE__ */ (0,
|
|
15220
|
-
showHeader && /* @__PURE__ */ (0,
|
|
15412
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { className: "flex flex-col h-full overflow-hidden", children: [
|
|
15413
|
+
showHeader && /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(
|
|
15221
15414
|
"div",
|
|
15222
15415
|
{
|
|
15223
15416
|
className: `flex items-center justify-between border-b border-border ${getMobileHeaderClass()} ${headerClassName}`,
|
|
15224
15417
|
children: [
|
|
15225
|
-
/* @__PURE__ */ (0,
|
|
15226
|
-
typeof title === "string" ? /* @__PURE__ */ (0,
|
|
15227
|
-
description && (typeof description === "string" ? /* @__PURE__ */ (0,
|
|
15418
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { className: "flex-1 min-w-0", children: [
|
|
15419
|
+
typeof title === "string" ? /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("h2", { id: "sheet-title", className: `${isMobile ? "text-xl" : "text-lg"} font-semibold text-foreground`, children: title }) : /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("div", { id: "sheet-title", children: title }),
|
|
15420
|
+
description && (typeof description === "string" ? /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("p", { className: "type-body text-muted-foreground mt-1", children: description }) : /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("div", { className: "mt-1", children: description }))
|
|
15228
15421
|
] }),
|
|
15229
|
-
headerContent && /* @__PURE__ */ (0,
|
|
15230
|
-
showCloseButton && /* @__PURE__ */ (0,
|
|
15422
|
+
headerContent && /* @__PURE__ */ (0, import_jsx_runtime108.jsx)("div", { className: "ml-4 flex items-center", children: headerContent }),
|
|
15423
|
+
showCloseButton && /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
15231
15424
|
"button",
|
|
15232
15425
|
{
|
|
15233
15426
|
onClick: onClose,
|
|
15234
15427
|
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`,
|
|
15235
15428
|
"aria-label": "Close",
|
|
15236
15429
|
"data-testid": "floating-sheet-close",
|
|
15237
|
-
children: closeButton || /* @__PURE__ */ (0,
|
|
15430
|
+
children: closeButton || /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(
|
|
15238
15431
|
"svg",
|
|
15239
15432
|
{
|
|
15240
15433
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -15246,8 +15439,8 @@ var FloatingSheet = ({
|
|
|
15246
15439
|
strokeLinecap: "round",
|
|
15247
15440
|
strokeLinejoin: "round",
|
|
15248
15441
|
children: [
|
|
15249
|
-
/* @__PURE__ */ (0,
|
|
15250
|
-
/* @__PURE__ */ (0,
|
|
15442
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
15443
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
15251
15444
|
]
|
|
15252
15445
|
}
|
|
15253
15446
|
)
|
|
@@ -15256,7 +15449,7 @@ var FloatingSheet = ({
|
|
|
15256
15449
|
]
|
|
15257
15450
|
}
|
|
15258
15451
|
),
|
|
15259
|
-
/* @__PURE__ */ (0,
|
|
15452
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
15260
15453
|
"div",
|
|
15261
15454
|
{
|
|
15262
15455
|
ref: contentRef,
|
|
@@ -15265,7 +15458,7 @@ var FloatingSheet = ({
|
|
|
15265
15458
|
children
|
|
15266
15459
|
}
|
|
15267
15460
|
),
|
|
15268
|
-
showFooter && /* @__PURE__ */ (0,
|
|
15461
|
+
showFooter && /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
15269
15462
|
"div",
|
|
15270
15463
|
{
|
|
15271
15464
|
className: `border-t border-border ${getMobileFooterClass()} ${footerClassName}`,
|
|
@@ -15280,12 +15473,12 @@ var FloatingSheet = ({
|
|
|
15280
15473
|
};
|
|
15281
15474
|
|
|
15282
15475
|
// src/simple-tooltip.tsx
|
|
15283
|
-
var
|
|
15476
|
+
var import_jsx_runtime109 = require("react/jsx-runtime");
|
|
15284
15477
|
var SimpleTooltip = ({ children, text }) => {
|
|
15285
15478
|
if (!text) return children;
|
|
15286
|
-
return /* @__PURE__ */ (0,
|
|
15287
|
-
/* @__PURE__ */ (0,
|
|
15288
|
-
/* @__PURE__ */ (0,
|
|
15479
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(Tooltip, { children: [
|
|
15480
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)(TooltipTrigger, { asChild: true, children }),
|
|
15481
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)(TooltipContent, { children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("p", { children: text }) })
|
|
15289
15482
|
] });
|
|
15290
15483
|
};
|
|
15291
15484
|
var AdvancedTooltip = ({
|
|
@@ -15308,16 +15501,16 @@ var AdvancedTooltip = ({
|
|
|
15308
15501
|
success: "bg-success text-success-foreground"
|
|
15309
15502
|
};
|
|
15310
15503
|
const baseContentClasses = "rounded-md px-3 py-1.5 text-sm shadow-md";
|
|
15311
|
-
return /* @__PURE__ */ (0,
|
|
15312
|
-
/* @__PURE__ */ (0,
|
|
15313
|
-
/* @__PURE__ */ (0,
|
|
15504
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(Tooltip, { delayDuration, children: [
|
|
15505
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)(TooltipTrigger, { asChild: true, className, children }),
|
|
15506
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
15314
15507
|
TooltipContent,
|
|
15315
15508
|
{
|
|
15316
15509
|
side,
|
|
15317
15510
|
align,
|
|
15318
15511
|
sideOffset,
|
|
15319
15512
|
className: `${baseContentClasses} ${variantStyles[variant]} ${contentClassName}`,
|
|
15320
|
-
children: /* @__PURE__ */ (0,
|
|
15513
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("p", { className: "leading-none whitespace-pre-wrap", children: text })
|
|
15321
15514
|
}
|
|
15322
15515
|
)
|
|
15323
15516
|
] });
|
|
@@ -15327,7 +15520,7 @@ var AdvancedTooltip = ({
|
|
|
15327
15520
|
var import_react22 = __toESM(require("react"), 1);
|
|
15328
15521
|
init_cn();
|
|
15329
15522
|
init_icons();
|
|
15330
|
-
var
|
|
15523
|
+
var import_jsx_runtime110 = require("react/jsx-runtime");
|
|
15331
15524
|
var animationStyles = `
|
|
15332
15525
|
@keyframes pulseWave {
|
|
15333
15526
|
0% { opacity: 0.3; transform: scale(0.8); }
|
|
@@ -15404,19 +15597,19 @@ var LoadingSpinner = ({
|
|
|
15404
15597
|
}
|
|
15405
15598
|
};
|
|
15406
15599
|
const sizeClasses2 = getSizeClasses();
|
|
15407
|
-
const renderDots = () => /* @__PURE__ */ (0,
|
|
15408
|
-
/* @__PURE__ */ (0,
|
|
15409
|
-
/* @__PURE__ */ (0,
|
|
15410
|
-
/* @__PURE__ */ (0,
|
|
15600
|
+
const renderDots = () => /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("div", { className: cn("flex items-center", sizeClasses2.container), children: [
|
|
15601
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("div", { className: cn(sizeClasses2.dot, "bg-primary dark:bg-primary-foreground rounded-full loading-pulse-1") }),
|
|
15602
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("div", { className: cn(sizeClasses2.dot, "bg-primary dark:bg-primary-foreground rounded-full loading-pulse-2") }),
|
|
15603
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("div", { className: cn(sizeClasses2.dot, "bg-primary dark:bg-primary-foreground rounded-full loading-pulse-3") })
|
|
15411
15604
|
] });
|
|
15412
|
-
const renderBars = () => /* @__PURE__ */ (0,
|
|
15413
|
-
/* @__PURE__ */ (0,
|
|
15414
|
-
/* @__PURE__ */ (0,
|
|
15415
|
-
/* @__PURE__ */ (0,
|
|
15416
|
-
/* @__PURE__ */ (0,
|
|
15605
|
+
const renderBars = () => /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("div", { className: cn("flex items-center", sizeClasses2.container), children: [
|
|
15606
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("div", { className: cn(sizeClasses2.bar, "bg-primary dark:bg-primary-foreground rounded-sm loading-bounce-1") }),
|
|
15607
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("div", { className: cn(sizeClasses2.bar, "bg-primary dark:bg-primary-foreground rounded-sm loading-bounce-2") }),
|
|
15608
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("div", { className: cn(sizeClasses2.bar, "bg-primary dark:bg-primary-foreground rounded-sm loading-bounce-3") }),
|
|
15609
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("div", { className: cn(sizeClasses2.bar, "bg-primary dark:bg-primary-foreground rounded-sm loading-bounce-4") })
|
|
15417
15610
|
] });
|
|
15418
|
-
const renderBrain = () => /* @__PURE__ */ (0,
|
|
15419
|
-
/* @__PURE__ */ (0,
|
|
15611
|
+
const renderBrain = () => /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("div", { className: "relative w-6 h-6 flex items-center justify-center", children: [
|
|
15612
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("div", { className: "absolute", children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
15420
15613
|
"svg",
|
|
15421
15614
|
{
|
|
15422
15615
|
width: "24",
|
|
@@ -15424,7 +15617,7 @@ var LoadingSpinner = ({
|
|
|
15424
15617
|
viewBox: "0 0 24 24",
|
|
15425
15618
|
fill: "none",
|
|
15426
15619
|
className: "w-5 h-5 text-primary dark:text-primary-foreground",
|
|
15427
|
-
children: /* @__PURE__ */ (0,
|
|
15620
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
15428
15621
|
"path",
|
|
15429
15622
|
{
|
|
15430
15623
|
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",
|
|
@@ -15435,44 +15628,44 @@ var LoadingSpinner = ({
|
|
|
15435
15628
|
)
|
|
15436
15629
|
}
|
|
15437
15630
|
) }),
|
|
15438
|
-
/* @__PURE__ */ (0,
|
|
15439
|
-
/* @__PURE__ */ (0,
|
|
15440
|
-
/* @__PURE__ */ (0,
|
|
15441
|
-
/* @__PURE__ */ (0,
|
|
15442
|
-
/* @__PURE__ */ (0,
|
|
15443
|
-
/* @__PURE__ */ (0,
|
|
15631
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("div", { className: "absolute inset-0", children: [
|
|
15632
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.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" }),
|
|
15633
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.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" }),
|
|
15634
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.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" }),
|
|
15635
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.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" }),
|
|
15636
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.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" })
|
|
15444
15637
|
] }),
|
|
15445
|
-
/* @__PURE__ */ (0,
|
|
15446
|
-
/* @__PURE__ */ (0,
|
|
15638
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("div", { className: "absolute w-full h-full rounded-full border border-primary/30 dark:border-primary-foreground/30 loading-brain-pulse-1" }),
|
|
15639
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("div", { className: "absolute w-full h-full rounded-full border border-primary/30 dark:border-primary-foreground/30 loading-brain-pulse-2" })
|
|
15447
15640
|
] });
|
|
15448
|
-
const renderMinimal = () => /* @__PURE__ */ (0,
|
|
15449
|
-
const renderWorkflow = () => /* @__PURE__ */ (0,
|
|
15450
|
-
/* @__PURE__ */ (0,
|
|
15451
|
-
/* @__PURE__ */ (0,
|
|
15452
|
-
/* @__PURE__ */ (0,
|
|
15453
|
-
/* @__PURE__ */ (0,
|
|
15641
|
+
const renderMinimal = () => /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("div", { className: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("div", { className: cn(sizeClasses2.dot, "bg-primary dark:bg-primary-foreground rounded-full loading-pulse-1") }) });
|
|
15642
|
+
const renderWorkflow = () => /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("div", { className: "flex flex-col items-center justify-center space-y-6", children: [
|
|
15643
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("div", { className: "relative", children: [
|
|
15644
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.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_runtime110.jsx)(WorkflowIcon, { className: "w-8 h-8 text-primary dark:text-primary-foreground" }) }),
|
|
15645
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.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_runtime110.jsx)(PlusIcon, { className: "w-3 h-3 text-primary-foreground dark:text-primary" }) }),
|
|
15646
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("div", { className: "absolute inset-0 border-2 border-transparent border-t-primary dark:border-t-primary-foreground rounded-full matrx-spin" })
|
|
15454
15647
|
] }),
|
|
15455
|
-
/* @__PURE__ */ (0,
|
|
15456
|
-
/* @__PURE__ */ (0,
|
|
15457
|
-
/* @__PURE__ */ (0,
|
|
15648
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("div", { className: "text-center space-y-2", children: [
|
|
15649
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("h2", { className: "text-lg font-semibold text-foreground flex items-center gap-2 justify-center", children: [
|
|
15650
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(Loader2Icon, { className: "w-4 h-4 matrx-spin" }),
|
|
15458
15651
|
title || "Loading Workflow"
|
|
15459
15652
|
] }),
|
|
15460
|
-
/* @__PURE__ */ (0,
|
|
15653
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("p", { className: "type-body text-muted-foreground max-w-sm", children: subtitle || message || "Setting up your workflow..." })
|
|
15461
15654
|
] }),
|
|
15462
|
-
showProgressSteps && /* @__PURE__ */ (0,
|
|
15463
|
-
/* @__PURE__ */ (0,
|
|
15464
|
-
/* @__PURE__ */ (0,
|
|
15465
|
-
/* @__PURE__ */ (0,
|
|
15655
|
+
showProgressSteps && /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("div", { className: "flex items-center gap-2 type-secondary text-muted-foreground", children: [
|
|
15656
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
15657
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("div", { className: "w-2 h-2 bg-primary dark:bg-primary-foreground rounded-full matrx-pulse" }),
|
|
15658
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("span", { children: "Loading" })
|
|
15466
15659
|
] }),
|
|
15467
|
-
/* @__PURE__ */ (0,
|
|
15468
|
-
/* @__PURE__ */ (0,
|
|
15469
|
-
/* @__PURE__ */ (0,
|
|
15470
|
-
/* @__PURE__ */ (0,
|
|
15660
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("div", { className: "w-4 h-px bg-muted-foreground/30" }),
|
|
15661
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
15662
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("div", { className: "w-2 h-2 bg-muted-foreground/30 rounded-full" }),
|
|
15663
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("span", { children: "Initializing" })
|
|
15471
15664
|
] }),
|
|
15472
|
-
/* @__PURE__ */ (0,
|
|
15473
|
-
/* @__PURE__ */ (0,
|
|
15474
|
-
/* @__PURE__ */ (0,
|
|
15475
|
-
/* @__PURE__ */ (0,
|
|
15665
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("div", { className: "w-4 h-px bg-muted-foreground/30" }),
|
|
15666
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("div", { className: "flex items-center gap-1", children: [
|
|
15667
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("div", { className: "w-2 h-2 bg-muted-foreground/30 rounded-full" }),
|
|
15668
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("span", { children: "Ready" })
|
|
15476
15669
|
] })
|
|
15477
15670
|
] })
|
|
15478
15671
|
] });
|
|
@@ -15501,33 +15694,33 @@ var LoadingSpinner = ({
|
|
|
15501
15694
|
}
|
|
15502
15695
|
};
|
|
15503
15696
|
if (variant === "workflow" && (fullscreen || overlay)) {
|
|
15504
|
-
return /* @__PURE__ */ (0,
|
|
15697
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("div", { className: cn(
|
|
15505
15698
|
"flex items-center justify-center bg-background",
|
|
15506
15699
|
fullscreen && "h-dvh w-full",
|
|
15507
15700
|
className
|
|
15508
15701
|
), children: [
|
|
15509
|
-
overlay && /* @__PURE__ */ (0,
|
|
15510
|
-
/* @__PURE__ */ (0,
|
|
15702
|
+
overlay && /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("div", { className: "absolute inset-0 bg-background/80 backdrop-blur-sm z-50" }),
|
|
15703
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)("div", { className: cn(
|
|
15511
15704
|
"flex flex-col items-center justify-center",
|
|
15512
15705
|
overlay && "relative z-50"
|
|
15513
15706
|
), children: renderWorkflow() })
|
|
15514
15707
|
] });
|
|
15515
15708
|
}
|
|
15516
|
-
return /* @__PURE__ */ (0,
|
|
15709
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("div", { className: cn("flex items-center", className), children: variant === "workflow" ? renderWorkflow() : /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(import_jsx_runtime110.Fragment, { children: [
|
|
15517
15710
|
renderSpinner(),
|
|
15518
|
-
showMessage && /* @__PURE__ */ (0,
|
|
15711
|
+
showMessage && /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("span", { className: cn("ml-3 text-muted-foreground", sizeClasses2.text), children: message || getDefaultMessage() })
|
|
15519
15712
|
] }) });
|
|
15520
15713
|
};
|
|
15521
15714
|
|
|
15522
15715
|
// src/mini-loader.tsx
|
|
15523
|
-
var
|
|
15716
|
+
var import_jsx_runtime111 = require("react/jsx-runtime");
|
|
15524
15717
|
function MatrxMiniLoader() {
|
|
15525
|
-
return /* @__PURE__ */ (0,
|
|
15718
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(LoadingSpinner, { variant: "dots", message: "Initializing Matrx...", size: "md" });
|
|
15526
15719
|
}
|
|
15527
15720
|
|
|
15528
15721
|
// src/suspense-loader.tsx
|
|
15529
15722
|
init_icons();
|
|
15530
|
-
var
|
|
15723
|
+
var import_jsx_runtime112 = require("react/jsx-runtime");
|
|
15531
15724
|
var sizeClasses = {
|
|
15532
15725
|
xs: "h-3 w-3",
|
|
15533
15726
|
sm: "h-4 w-4",
|
|
@@ -15540,7 +15733,7 @@ function SuspenseLoader({
|
|
|
15540
15733
|
message,
|
|
15541
15734
|
className = ""
|
|
15542
15735
|
}) {
|
|
15543
|
-
const spinner = /* @__PURE__ */ (0,
|
|
15736
|
+
const spinner = /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
15544
15737
|
Loader2Icon,
|
|
15545
15738
|
{
|
|
15546
15739
|
className: `${sizeClasses[size]} matrx-spin text-disabled-foreground ${className}`,
|
|
@@ -15548,7 +15741,7 @@ function SuspenseLoader({
|
|
|
15548
15741
|
"aria-label": message ? void 0 : "Loading"
|
|
15549
15742
|
}
|
|
15550
15743
|
);
|
|
15551
|
-
const content = message ? /* @__PURE__ */ (0,
|
|
15744
|
+
const content = message ? /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)(
|
|
15552
15745
|
"span",
|
|
15553
15746
|
{
|
|
15554
15747
|
className: "inline-flex items-center gap-2",
|
|
@@ -15556,12 +15749,12 @@ function SuspenseLoader({
|
|
|
15556
15749
|
"aria-live": "polite",
|
|
15557
15750
|
children: [
|
|
15558
15751
|
spinner,
|
|
15559
|
-
/* @__PURE__ */ (0,
|
|
15752
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)("span", { children: message })
|
|
15560
15753
|
]
|
|
15561
15754
|
}
|
|
15562
15755
|
) : spinner;
|
|
15563
15756
|
if (centered) {
|
|
15564
|
-
return /* @__PURE__ */ (0,
|
|
15757
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)("div", { className: "flex items-center justify-center w-full h-full min-h-[2rem]", children: content });
|
|
15565
15758
|
}
|
|
15566
15759
|
return content;
|
|
15567
15760
|
}
|
|
@@ -15569,7 +15762,7 @@ function SuspenseLoader({
|
|
|
15569
15762
|
// src/shimmer-text.tsx
|
|
15570
15763
|
init_cn();
|
|
15571
15764
|
var import_react23 = require("react");
|
|
15572
|
-
var
|
|
15765
|
+
var import_jsx_runtime113 = require("react/jsx-runtime");
|
|
15573
15766
|
var SHIMMER_STYLE = {
|
|
15574
15767
|
backgroundImage: "linear-gradient(90deg, color-mix(in srgb, currentColor 18%, transparent) 0%, currentColor 50%, color-mix(in srgb, currentColor 18%, transparent) 100%)",
|
|
15575
15768
|
backgroundSize: "200% 100%",
|
|
@@ -15597,7 +15790,7 @@ function useShimmerSweep(durationMs = 2e3) {
|
|
|
15597
15790
|
}
|
|
15598
15791
|
function ShimmerText({ text, className }) {
|
|
15599
15792
|
const ref = useShimmerSweep();
|
|
15600
|
-
return /* @__PURE__ */ (0,
|
|
15793
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
15601
15794
|
"span",
|
|
15602
15795
|
{
|
|
15603
15796
|
ref,
|
|
@@ -15657,26 +15850,26 @@ function formThemeClasses(theme) {
|
|
|
15657
15850
|
|
|
15658
15851
|
// src/first-use-hint.tsx
|
|
15659
15852
|
var PopoverPrimitive3 = __toESM(require("@radix-ui/react-popover"), 1);
|
|
15660
|
-
var
|
|
15661
|
-
var
|
|
15853
|
+
var import_react_slot8 = require("@radix-ui/react-slot");
|
|
15854
|
+
var React78 = __toESM(require("react"), 1);
|
|
15662
15855
|
init_icons();
|
|
15663
15856
|
init_motion();
|
|
15664
|
-
var
|
|
15857
|
+
var import_jsx_runtime114 = require("react/jsx-runtime");
|
|
15665
15858
|
var FIRST_USE_HINT_TITLE_MAX = 32;
|
|
15666
15859
|
var FIRST_USE_HINT_DETAIL_MAX = 60;
|
|
15667
|
-
var FirstUseHintContext =
|
|
15860
|
+
var FirstUseHintContext = React78.createContext(null);
|
|
15668
15861
|
function FirstUseHintProvider({
|
|
15669
15862
|
store,
|
|
15670
15863
|
children
|
|
15671
15864
|
}) {
|
|
15672
|
-
return /* @__PURE__ */ (0,
|
|
15865
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(FirstUseHintContext.Provider, { value: store, children });
|
|
15673
15866
|
}
|
|
15674
15867
|
var sessionLearned = /* @__PURE__ */ new Set();
|
|
15675
15868
|
var warnedNoProvider = false;
|
|
15676
15869
|
function useFirstUseHint(id) {
|
|
15677
|
-
const store =
|
|
15678
|
-
const [, rerender] =
|
|
15679
|
-
const [dismissed, setDismissed] =
|
|
15870
|
+
const store = React78.useContext(FirstUseHintContext);
|
|
15871
|
+
const [, rerender] = React78.useReducer((n) => n + 1, 0);
|
|
15872
|
+
const [dismissed, setDismissed] = React78.useState(false);
|
|
15680
15873
|
if (!store && !warnedNoProvider) {
|
|
15681
15874
|
warnedNoProvider = true;
|
|
15682
15875
|
console.warn(
|
|
@@ -15685,7 +15878,7 @@ function useFirstUseHint(id) {
|
|
|
15685
15878
|
}
|
|
15686
15879
|
const learned = store ? store.learned.includes(id) : sessionLearned.has(id);
|
|
15687
15880
|
const ready = store ? store.ready : true;
|
|
15688
|
-
const learn =
|
|
15881
|
+
const learn = React78.useCallback(() => {
|
|
15689
15882
|
setDismissed(true);
|
|
15690
15883
|
if (store) {
|
|
15691
15884
|
if (!store.learned.includes(id)) store.learn(id);
|
|
@@ -15708,11 +15901,11 @@ function FirstUseHint({
|
|
|
15708
15901
|
pulse,
|
|
15709
15902
|
children
|
|
15710
15903
|
}) {
|
|
15711
|
-
const hostRef =
|
|
15904
|
+
const hostRef = React78.useRef(null);
|
|
15712
15905
|
const { visible: visible2, learn } = useFirstUseHint(id);
|
|
15713
15906
|
const eligible = visible2 && when;
|
|
15714
|
-
const [shown, setShown] =
|
|
15715
|
-
|
|
15907
|
+
const [shown, setShown] = React78.useState(false);
|
|
15908
|
+
React78.useEffect(() => {
|
|
15716
15909
|
if (!eligible) {
|
|
15717
15910
|
setShown(false);
|
|
15718
15911
|
return void 0;
|
|
@@ -15729,11 +15922,11 @@ function FirstUseHint({
|
|
|
15729
15922
|
}
|
|
15730
15923
|
const open = eligible && shown;
|
|
15731
15924
|
const beaconOn = open && beacon !== "none";
|
|
15732
|
-
const target =
|
|
15925
|
+
const target = React78.useCallback(
|
|
15733
15926
|
() => pulse ? hostRef.current?.querySelector(pulse) ?? hostRef.current : hostRef.current,
|
|
15734
15927
|
[pulse]
|
|
15735
15928
|
);
|
|
15736
|
-
|
|
15929
|
+
React78.useEffect(() => {
|
|
15737
15930
|
if (!pulse || !beaconOn) return void 0;
|
|
15738
15931
|
const el = target();
|
|
15739
15932
|
if (!el || el === hostRef.current) return void 0;
|
|
@@ -15744,7 +15937,7 @@ function FirstUseHint({
|
|
|
15744
15937
|
el.removeAttribute("data-matrx-hint-beacon");
|
|
15745
15938
|
};
|
|
15746
15939
|
}, [pulse, beaconOn, beacon, target]);
|
|
15747
|
-
const virtualRef =
|
|
15940
|
+
const virtualRef = React78.useMemo(
|
|
15748
15941
|
() => ({
|
|
15749
15942
|
current: {
|
|
15750
15943
|
getBoundingClientRect: () => target()?.getBoundingClientRect() ?? new DOMRect()
|
|
@@ -15752,10 +15945,10 @@ function FirstUseHint({
|
|
|
15752
15945
|
}),
|
|
15753
15946
|
[target]
|
|
15754
15947
|
);
|
|
15755
|
-
return /* @__PURE__ */ (0,
|
|
15756
|
-
pulse ? /* @__PURE__ */ (0,
|
|
15757
|
-
/* @__PURE__ */ (0,
|
|
15758
|
-
|
|
15948
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(Popover, { open, children: [
|
|
15949
|
+
pulse ? /* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(import_jsx_runtime114.Fragment, { children: [
|
|
15950
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
15951
|
+
import_react_slot8.Slot,
|
|
15759
15952
|
{
|
|
15760
15953
|
ref: hostRef,
|
|
15761
15954
|
"data-matrx-first-use-hint": open ? id : void 0,
|
|
@@ -15763,8 +15956,8 @@ function FirstUseHint({
|
|
|
15763
15956
|
children
|
|
15764
15957
|
}
|
|
15765
15958
|
),
|
|
15766
|
-
/* @__PURE__ */ (0,
|
|
15767
|
-
] }) : /* @__PURE__ */ (0,
|
|
15959
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(PopoverAnchor, { virtualRef })
|
|
15960
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
15768
15961
|
PopoverAnchor,
|
|
15769
15962
|
{
|
|
15770
15963
|
asChild: true,
|
|
@@ -15776,7 +15969,7 @@ function FirstUseHint({
|
|
|
15776
15969
|
children
|
|
15777
15970
|
}
|
|
15778
15971
|
),
|
|
15779
|
-
/* @__PURE__ */ (0,
|
|
15972
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsxs)(
|
|
15780
15973
|
PopoverContent,
|
|
15781
15974
|
{
|
|
15782
15975
|
side,
|
|
@@ -15793,17 +15986,17 @@ function FirstUseHint({
|
|
|
15793
15986
|
onInteractOutside: (e) => e.preventDefault(),
|
|
15794
15987
|
onEscapeKeyDown: learn,
|
|
15795
15988
|
children: [
|
|
15796
|
-
/* @__PURE__ */ (0,
|
|
15797
|
-
/* @__PURE__ */ (0,
|
|
15798
|
-
/* @__PURE__ */ (0,
|
|
15989
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsxs)("div", { className: "flex items-center gap-1 py-0.5 pl-3 pr-0.5", children: [
|
|
15990
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsxs)("div", { className: "flex min-w-0 flex-col py-1", children: [
|
|
15991
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)("span", { className: "type-secondary truncate font-medium text-foreground", children: title }),
|
|
15799
15992
|
detail ? (
|
|
15800
15993
|
// Two lines at most: on a 375px phone a full 60-character line can wrap once.
|
|
15801
|
-
/* @__PURE__ */ (0,
|
|
15994
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)("span", { className: "type-secondary line-clamp-2 text-muted-foreground", children: detail })
|
|
15802
15995
|
) : null
|
|
15803
15996
|
] }),
|
|
15804
|
-
/* @__PURE__ */ (0,
|
|
15997
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(IconButton, { icon: XIcon, "aria-label": "Dismiss tip", className: "shrink-0", onClick: learn })
|
|
15805
15998
|
] }),
|
|
15806
|
-
/* @__PURE__ */ (0,
|
|
15999
|
+
/* @__PURE__ */ (0, import_jsx_runtime114.jsx)(PopoverPrimitive3.Arrow, { className: "fill-popover", width: 10, height: 5 })
|
|
15807
16000
|
]
|
|
15808
16001
|
}
|
|
15809
16002
|
)
|
|
@@ -15811,11 +16004,11 @@ function FirstUseHint({
|
|
|
15811
16004
|
}
|
|
15812
16005
|
|
|
15813
16006
|
// src/review-changes.tsx
|
|
15814
|
-
var
|
|
16007
|
+
var React79 = __toESM(require("react"), 1);
|
|
15815
16008
|
init_cn();
|
|
15816
16009
|
init_controls();
|
|
15817
16010
|
init_icons();
|
|
15818
|
-
var
|
|
16011
|
+
var import_jsx_runtime115 = require("react/jsx-runtime");
|
|
15819
16012
|
var SKIP = "skip";
|
|
15820
16013
|
function unansweredQuestions(preview, answers) {
|
|
15821
16014
|
return preview.questions.filter((q) => !answers[q.id]);
|
|
@@ -15828,16 +16021,16 @@ function acceptSuggestions(preview, answers) {
|
|
|
15828
16021
|
for (const q of preview.questions) if (!next[q.id] && q.suggested) next[q.id] = q.suggested;
|
|
15829
16022
|
return next;
|
|
15830
16023
|
}
|
|
15831
|
-
var RenderItemContext =
|
|
16024
|
+
var RenderItemContext = React79.createContext(void 0);
|
|
15832
16025
|
function ItemDoor({ item, onOpenItem }) {
|
|
15833
|
-
const renderItem =
|
|
16026
|
+
const renderItem = React79.useContext(RenderItemContext);
|
|
15834
16027
|
const hosted = renderItem ? renderItem(item) : null;
|
|
15835
16028
|
if (hosted != null) {
|
|
15836
|
-
return /* @__PURE__ */ (0,
|
|
16029
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("span", { "data-change-item": item.id, className: "inline-flex max-w-full items-center", children: hosted });
|
|
15837
16030
|
}
|
|
15838
16031
|
const title = item.title?.trim() || "Untitled";
|
|
15839
|
-
return /* @__PURE__ */ (0,
|
|
15840
|
-
/* @__PURE__ */ (0,
|
|
16032
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("span", { "data-change-item": item.id, className: "inline-flex max-w-full items-center gap-0.5", children: [
|
|
16033
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
15841
16034
|
Button2,
|
|
15842
16035
|
{
|
|
15843
16036
|
type: "button",
|
|
@@ -15848,12 +16041,12 @@ function ItemDoor({ item, onOpenItem }) {
|
|
|
15848
16041
|
children: title
|
|
15849
16042
|
}
|
|
15850
16043
|
),
|
|
15851
|
-
/* @__PURE__ */ (0,
|
|
16044
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
15852
16045
|
Button2,
|
|
15853
16046
|
{
|
|
15854
16047
|
type: "button",
|
|
15855
16048
|
variant: "quiet",
|
|
15856
|
-
icon: /* @__PURE__ */ (0,
|
|
16049
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(ExternalLinkIcon, {}),
|
|
15857
16050
|
"data-clickable": "",
|
|
15858
16051
|
"aria-label": `Open ${title} in a new tab`,
|
|
15859
16052
|
className: "shrink-0",
|
|
@@ -15865,9 +16058,9 @@ function ItemDoor({ item, onOpenItem }) {
|
|
|
15865
16058
|
function Doors({ items, total, onOpenItem }) {
|
|
15866
16059
|
if (!items.length) return null;
|
|
15867
16060
|
const more = (total ?? items.length) - items.length;
|
|
15868
|
-
return /* @__PURE__ */ (0,
|
|
15869
|
-
items.map((item) => /* @__PURE__ */ (0,
|
|
15870
|
-
more > 0 ? /* @__PURE__ */ (0,
|
|
16061
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("span", { className: "flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1", children: [
|
|
16062
|
+
items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(ItemDoor, { item, onOpenItem }, `${item.table ?? item.type}:${item.id}`)),
|
|
16063
|
+
more > 0 ? /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("span", { className: "text-xs text-muted-foreground", children: [
|
|
15871
16064
|
"+",
|
|
15872
16065
|
more,
|
|
15873
16066
|
" more"
|
|
@@ -15875,17 +16068,17 @@ function Doors({ items, total, onOpenItem }) {
|
|
|
15875
16068
|
] });
|
|
15876
16069
|
}
|
|
15877
16070
|
function Row({ title, meta, children }) {
|
|
15878
|
-
return /* @__PURE__ */ (0,
|
|
15879
|
-
/* @__PURE__ */ (0,
|
|
15880
|
-
/* @__PURE__ */ (0,
|
|
15881
|
-
meta ? /* @__PURE__ */ (0,
|
|
16071
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("div", { "data-change-row": "", className: "flex flex-col gap-1 px-3 py-2", children: [
|
|
16072
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("div", { className: "flex items-baseline justify-between gap-3", children: [
|
|
16073
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)("span", { className: "min-w-0 text-sm text-foreground", children: title }),
|
|
16074
|
+
meta ? /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("span", { className: "shrink-0 text-xs text-muted-foreground", children: meta }) : null
|
|
15882
16075
|
] }),
|
|
15883
16076
|
children
|
|
15884
16077
|
] });
|
|
15885
16078
|
}
|
|
15886
16079
|
function Alarm({ warning, onOpenItem }) {
|
|
15887
16080
|
const items = [...warning.items ?? [], ...warning.users ?? []];
|
|
15888
|
-
return /* @__PURE__ */ (0,
|
|
16081
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(
|
|
15889
16082
|
"div",
|
|
15890
16083
|
{
|
|
15891
16084
|
role: "alert",
|
|
@@ -15893,8 +16086,8 @@ function Alarm({ warning, onOpenItem }) {
|
|
|
15893
16086
|
"data-severity": warning.severity,
|
|
15894
16087
|
className: "flex flex-col gap-1.5 rounded-group border border-destructive bg-destructive/10 px-3 py-2",
|
|
15895
16088
|
children: [
|
|
15896
|
-
/* @__PURE__ */ (0,
|
|
15897
|
-
/* @__PURE__ */ (0,
|
|
16089
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)("span", { className: "text-sm font-medium text-foreground", children: warning.message }),
|
|
16090
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Doors, { items, total: warning.count ?? items.length, onOpenItem })
|
|
15898
16091
|
]
|
|
15899
16092
|
}
|
|
15900
16093
|
);
|
|
@@ -15911,10 +16104,10 @@ function Question({ question, answer, onAnswer, onOpenItem, disabled }) {
|
|
|
15911
16104
|
const suggested = !question.suggested ? null : yes && question.suggested === yes.value ? "yes" : noOption && question.suggested === noOption.value ? "no" : "other";
|
|
15912
16105
|
const wayOut = rest.map((o) => ({ value: o.value, label: o.label }));
|
|
15913
16106
|
const chosen = [...question.options, ...question.way_out].find((o) => o.value === answer);
|
|
15914
|
-
return /* @__PURE__ */ (0,
|
|
15915
|
-
/* @__PURE__ */ (0,
|
|
15916
|
-
/* @__PURE__ */ (0,
|
|
15917
|
-
/* @__PURE__ */ (0,
|
|
16107
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("div", { "data-change-question": question.id, "data-kind": question.kind, className: "flex flex-col gap-1.5 px-3 py-2", children: [
|
|
16108
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)("span", { className: "text-sm text-foreground", children: question.prompt }),
|
|
16109
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Doors, { items: question.items.sample, total: question.items.count, onOpenItem }),
|
|
16110
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
15918
16111
|
DecisionControl,
|
|
15919
16112
|
{
|
|
15920
16113
|
value,
|
|
@@ -15936,7 +16129,7 @@ function Question({ question, answer, onAnswer, onOpenItem, disabled }) {
|
|
|
15936
16129
|
"aria-label": question.prompt
|
|
15937
16130
|
}
|
|
15938
16131
|
),
|
|
15939
|
-
chosen?.consequence ? /* @__PURE__ */ (0,
|
|
16132
|
+
chosen?.consequence ? /* @__PURE__ */ (0, import_jsx_runtime115.jsx)("span", { className: "text-xs text-muted-foreground", children: chosen.consequence }) : null
|
|
15940
16133
|
] });
|
|
15941
16134
|
}
|
|
15942
16135
|
var VERB_WORDS = {
|
|
@@ -15945,7 +16138,7 @@ var VERB_WORDS = {
|
|
|
15945
16138
|
move: { goes: "Moves with it", commit: "Move" }
|
|
15946
16139
|
};
|
|
15947
16140
|
function ReviewChanges({ renderItem, ...props }) {
|
|
15948
|
-
return /* @__PURE__ */ (0,
|
|
16141
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(RenderItemContext.Provider, { value: renderItem, children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(ReviewChangesBody, { ...props }) });
|
|
15949
16142
|
}
|
|
15950
16143
|
function ReviewChangesBody({ preview, answers, onAnswer, onOpenItem, onCommit, onCancel, busy, commitLabel, className }) {
|
|
15951
16144
|
const words = VERB_WORDS[preview.verb] ?? { goes: "Changes with it", commit: "Apply" };
|
|
@@ -15959,23 +16152,23 @@ function ReviewChangesBody({ preview, answers, onAnswer, onOpenItem, onCommit, o
|
|
|
15959
16152
|
const suggestible = pending.filter((q) => q.suggested);
|
|
15960
16153
|
const ready = canCommitChanges(preview, answers);
|
|
15961
16154
|
const target = preview.target_organization?.name;
|
|
15962
|
-
return /* @__PURE__ */ (0,
|
|
15963
|
-
alarms.map((w, i) => /* @__PURE__ */ (0,
|
|
15964
|
-
/* @__PURE__ */ (0,
|
|
15965
|
-
moving.length ? /* @__PURE__ */ (0,
|
|
15966
|
-
kept.length || staying.length ? /* @__PURE__ */ (0,
|
|
15967
|
-
kept.map((w, i) => /* @__PURE__ */ (0,
|
|
15968
|
-
staying.map((g) => /* @__PURE__ */ (0,
|
|
16155
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("div", { "data-review-changes": "", "data-verb": preview.verb, className: cn("flex min-h-0 flex-col gap-3", className), children: [
|
|
16156
|
+
alarms.map((w, i) => /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Alarm, { warning: w, onOpenItem }, `${w.kind}:${i}`)),
|
|
16157
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(RowGroup, { title: preview.verb === "move" && target ? `Moving to ${target}` : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Row, { title: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Doors, { items: preview.roots, onOpenItem }) }) }),
|
|
16158
|
+
moving.length ? /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(RowGroup, { title: words.goes, children: moving.map((g) => /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Row, { title: g.noun, meta: `${g.count_is_estimate ? "about " : ""}${g.count}`, children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Doors, { items: g.sample, total: g.count, onOpenItem }) }, `${g.rule_id ?? "root"}:${g.table ?? g.type}`)) }) : null,
|
|
16159
|
+
kept.length || staying.length ? /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(RowGroup, { title: "Stays where it is", children: [
|
|
16160
|
+
kept.map((w, i) => /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Row, { title: w.message ?? w.noun ?? "Used elsewhere", meta: w.count ?? void 0, children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Doors, { items: w.items ?? [], total: w.count, onOpenItem }) }, `kept:${i}`)),
|
|
16161
|
+
staying.map((g) => /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Row, { title: g.noun, meta: g.count, children: /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Doors, { items: g.sample, total: g.count, onOpenItem }) }, `stay:${g.table ?? g.type}`))
|
|
15969
16162
|
] }) : null,
|
|
15970
|
-
preview.questions.length ? /* @__PURE__ */ (0,
|
|
15971
|
-
auto || unchecked ? /* @__PURE__ */ (0,
|
|
15972
|
-
auto ? /* @__PURE__ */ (0,
|
|
15973
|
-
unchecked ? /* @__PURE__ */ (0,
|
|
16163
|
+
preview.questions.length ? /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(RowGroup, { title: "Decide", children: preview.questions.map((q) => /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Question, { question: q, answer: answers[q.id], onAnswer, onOpenItem, disabled: busy }, q.id)) }) : null,
|
|
16164
|
+
auto || unchecked ? /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("div", { className: "flex flex-wrap gap-2 px-1", children: [
|
|
16165
|
+
auto ? /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Badge2, { tone: "neutral", children: `${auto.count ?? ""} decided automatically`.trim() }) : null,
|
|
16166
|
+
unchecked ? /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Badge2, { tone: "neutral", children: "Links inside text not checked" }) : null
|
|
15974
16167
|
] }) : null,
|
|
15975
|
-
/* @__PURE__ */ (0,
|
|
15976
|
-
suggestible.length ? /* @__PURE__ */ (0,
|
|
15977
|
-
/* @__PURE__ */ (0,
|
|
15978
|
-
/* @__PURE__ */ (0,
|
|
16168
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsxs)("div", { "data-review-changes-actions": "", className: "flex flex-wrap items-center justify-end gap-2", children: [
|
|
16169
|
+
suggestible.length ? /* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Button2, { variant: "quiet", disabled: busy, onClick: () => suggestible.forEach((q) => onAnswer(q.id, q.suggested)), children: "Accept suggestions" }) : null,
|
|
16170
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Button2, { variant: "outline", disabled: busy, onClick: onCancel, children: "Cancel" }),
|
|
16171
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(Button2, { variant: preview.verb === "delete" ? "danger" : "primary", disabled: busy || !ready, onClick: onCommit, children: commitLabel ?? words.commit })
|
|
15979
16172
|
] })
|
|
15980
16173
|
] });
|
|
15981
16174
|
}
|
|
@@ -16143,7 +16336,7 @@ function insertLines(boxes, id, line, col, cols) {
|
|
|
16143
16336
|
}
|
|
16144
16337
|
|
|
16145
16338
|
// src/grid-canvas/grid-canvas.tsx
|
|
16146
|
-
var
|
|
16339
|
+
var import_jsx_runtime116 = require("react/jsx-runtime");
|
|
16147
16340
|
var GRID_CANVAS_COLUMNS = { lg: 12, sm: 4 };
|
|
16148
16341
|
var GRID_CANVAS_PHONE_MAX_PX = 640;
|
|
16149
16342
|
var GRID_CANVAS_ROW_PX = 24;
|
|
@@ -16318,7 +16511,7 @@ function GridCanvas({
|
|
|
16318
16511
|
};
|
|
16319
16512
|
const rows = { lg: gridRows(grids.lg), sm: gridRows(grids.sm) };
|
|
16320
16513
|
const active = preview ? preview.boxes.find((b) => b.id === preview.id) : void 0;
|
|
16321
|
-
return /* @__PURE__ */ (0,
|
|
16514
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(
|
|
16322
16515
|
"div",
|
|
16323
16516
|
{
|
|
16324
16517
|
ref: rootRef,
|
|
@@ -16338,8 +16531,8 @@ function GridCanvas({
|
|
|
16338
16531
|
"--grid-rows-sm": preview?.breakpoint === "sm" ? rows.sm + 1 : rows.sm
|
|
16339
16532
|
},
|
|
16340
16533
|
children: [
|
|
16341
|
-
/* @__PURE__ */ (0,
|
|
16342
|
-
active && preview ? /* @__PURE__ */ (0,
|
|
16534
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("div", { className: "matrx-grid-canvas-field", children: [
|
|
16535
|
+
active && preview ? /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("div", { className: "matrx-grid-canvas-placeholder", "aria-hidden": true, style: placementVars(active, active) }) : null,
|
|
16343
16536
|
items.map((item, n) => {
|
|
16344
16537
|
const lg = grids.lg[n];
|
|
16345
16538
|
const sm = grids.sm[n];
|
|
@@ -16348,7 +16541,7 @@ function GridCanvas({
|
|
|
16348
16541
|
const drawLg = moving && preview.breakpoint === "lg" ? startBox : lg;
|
|
16349
16542
|
const drawSm = moving && preview.breakpoint === "sm" ? startBox : sm;
|
|
16350
16543
|
const label = itemLabel?.(item.id);
|
|
16351
|
-
return /* @__PURE__ */ (0,
|
|
16544
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(
|
|
16352
16545
|
"div",
|
|
16353
16546
|
{
|
|
16354
16547
|
ref: (el) => {
|
|
@@ -16364,8 +16557,8 @@ function GridCanvas({
|
|
|
16364
16557
|
onPointerDown: editable ? (e) => onItemPointerDown(e, item.id) : void 0,
|
|
16365
16558
|
onKeyDown: editable ? (e) => onItemKeyDown(e, item.id) : void 0,
|
|
16366
16559
|
children: [
|
|
16367
|
-
/* @__PURE__ */ (0,
|
|
16368
|
-
editable ? /* @__PURE__ */ (0,
|
|
16560
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)("div", { className: "matrx-grid-canvas-content", children: renderItem(item.id, { breakpoint, editing: editable }) }),
|
|
16561
|
+
editable ? /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
16369
16562
|
"span",
|
|
16370
16563
|
{
|
|
16371
16564
|
className: "matrx-grid-canvas-resize",
|
|
@@ -16380,7 +16573,7 @@ function GridCanvas({
|
|
|
16380
16573
|
);
|
|
16381
16574
|
})
|
|
16382
16575
|
] }),
|
|
16383
|
-
/* @__PURE__ */ (0,
|
|
16576
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)("span", { className: "matrx-grid-canvas-live", "aria-live": "polite", children: announcement })
|
|
16384
16577
|
]
|
|
16385
16578
|
}
|
|
16386
16579
|
);
|