@ai-matrx/sharing 0.1.4 → 0.1.6
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 +51 -1
- package/dist/access-react.cjs +113 -137
- package/dist/access-react.cjs.map +1 -1
- package/dist/access-react.js +30 -54
- package/dist/access-react.js.map +1 -1
- package/dist/core.cjs +5 -204
- package/dist/core.cjs.map +1 -1
- package/dist/core.js +5 -194
- package/dist/core.js.map +1 -1
- package/dist/react.cjs +207 -234
- package/dist/react.cjs.map +1 -1
- package/dist/react.js +79 -106
- package/dist/react.js.map +1 -1
- package/package.json +5 -5
package/dist/access-react.cjs
CHANGED
|
@@ -221,12 +221,13 @@ function useAccessUi() {
|
|
|
221
221
|
// src/access/react/AccessDenied.tsx
|
|
222
222
|
var import_react5 = require("react");
|
|
223
223
|
var import_lucide_react3 = require("lucide-react");
|
|
224
|
-
var
|
|
224
|
+
var import_design_system2 = require("@ai-matrx/design-system");
|
|
225
|
+
var import_controls3 = require("@ai-matrx/design-system/controls");
|
|
225
226
|
|
|
226
227
|
// src/access/react/RequestAccessPanel.tsx
|
|
227
228
|
var import_react2 = require("react");
|
|
228
229
|
var import_lucide_react = require("lucide-react");
|
|
229
|
-
var
|
|
230
|
+
var import_controls = require("@ai-matrx/design-system/controls");
|
|
230
231
|
var import_access = require("@ai-matrx/data/access");
|
|
231
232
|
var import_access2 = require("@ai-matrx/data/access");
|
|
232
233
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
@@ -319,18 +320,15 @@ function RequestAccessPanel({
|
|
|
319
320
|
cmsToken ? "Your request is saved. Once an owner adds you to the organization, this site will open." : delivered === 0 ? "We couldn't reach them with a message, but your request is saved and they'll see it." : "They\u2019ve been messaged. You\u2019ll get a message back the moment they answer, and this page will open.",
|
|
320
321
|
ui.renderErrorMenu({})
|
|
321
322
|
] }),
|
|
322
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.
|
|
323
|
-
|
|
323
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
324
|
+
import_controls.Button,
|
|
324
325
|
{
|
|
325
|
-
className: "mt-3
|
|
326
|
-
|
|
326
|
+
className: "mt-3",
|
|
327
|
+
icon: busy ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react.Loader2, { className: "animate-spin", "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react.Undo2, { "aria-hidden": true }),
|
|
327
328
|
variant: "outline",
|
|
328
329
|
disabled: busy,
|
|
329
330
|
onClick: () => void withdraw(),
|
|
330
|
-
children:
|
|
331
|
-
busy ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react.Loader2, { className: "mr-1.5 h-3.5 w-3.5 animate-spin", "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react.Undo2, { className: "mr-1.5 h-3.5 w-3.5", "aria-hidden": true }),
|
|
332
|
-
"Withdraw request"
|
|
333
|
-
]
|
|
331
|
+
children: "Withdraw request"
|
|
334
332
|
}
|
|
335
333
|
)
|
|
336
334
|
] });
|
|
@@ -346,17 +344,14 @@ function RequestAccessPanel({
|
|
|
346
344
|
request.decisionNote,
|
|
347
345
|
"\u201D"
|
|
348
346
|
] }) : null,
|
|
349
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.
|
|
350
|
-
|
|
347
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
348
|
+
import_controls.Button,
|
|
351
349
|
{
|
|
352
|
-
className: "mt-3
|
|
353
|
-
|
|
350
|
+
className: "mt-3",
|
|
351
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react.Send, { "aria-hidden": true }),
|
|
354
352
|
variant: "outline",
|
|
355
353
|
onClick: () => setReasking(true),
|
|
356
|
-
children:
|
|
357
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react.Send, { className: "mr-1.5 h-3.5 w-3.5", "aria-hidden": true }),
|
|
358
|
-
"Ask again"
|
|
359
|
-
]
|
|
354
|
+
children: "Ask again"
|
|
360
355
|
}
|
|
361
356
|
)
|
|
362
357
|
] });
|
|
@@ -398,17 +393,15 @@ function RequestAccessPanel({
|
|
|
398
393
|
onChange: (event) => setNote(event.target.value)
|
|
399
394
|
}
|
|
400
395
|
),
|
|
401
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.
|
|
402
|
-
|
|
396
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
397
|
+
import_controls.Button,
|
|
403
398
|
{
|
|
404
399
|
className: "mt-3",
|
|
405
|
-
|
|
400
|
+
icon: busy ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react.Loader2, { className: "animate-spin", "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react.Send, { "aria-hidden": true }),
|
|
401
|
+
variant: "primary",
|
|
406
402
|
disabled: busy,
|
|
407
403
|
onClick: () => void send(),
|
|
408
|
-
children:
|
|
409
|
-
busy ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react.Loader2, { className: "mr-1.5 h-4 w-4 animate-spin", "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react.Send, { className: "mr-1.5 h-4 w-4", "aria-hidden": true }),
|
|
410
|
-
"Request access"
|
|
411
|
-
]
|
|
404
|
+
children: "Request access"
|
|
412
405
|
}
|
|
413
406
|
)
|
|
414
407
|
] });
|
|
@@ -436,7 +429,7 @@ function LevelChoice({
|
|
|
436
429
|
// src/access/react/BlindAccessAsk.tsx
|
|
437
430
|
var import_react3 = require("react");
|
|
438
431
|
var import_lucide_react2 = require("lucide-react");
|
|
439
|
-
var
|
|
432
|
+
var import_controls2 = require("@ai-matrx/design-system/controls");
|
|
440
433
|
var import_access3 = require("@ai-matrx/data/access");
|
|
441
434
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
442
435
|
function BlindAccessAsk({
|
|
@@ -450,10 +443,11 @@ function BlindAccessAsk({
|
|
|
450
443
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "text-sm text-foreground", role: "status", "data-blind-ask": "asked", children: state.says || import_access3.BLIND_ASK_ANSWER });
|
|
451
444
|
}
|
|
452
445
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex flex-col items-start gap-2", "data-blind-ask": state.kind, children: [
|
|
453
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.
|
|
454
|
-
|
|
446
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
447
|
+
import_controls2.Button,
|
|
455
448
|
{
|
|
456
|
-
|
|
449
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react2.KeyRound, { "aria-hidden": true }),
|
|
450
|
+
variant: "primary",
|
|
457
451
|
disabled: state.kind === "asking",
|
|
458
452
|
"aria-busy": state.kind === "asking",
|
|
459
453
|
onClick: () => {
|
|
@@ -471,10 +465,7 @@ function BlindAccessAsk({
|
|
|
471
465
|
);
|
|
472
466
|
},
|
|
473
467
|
"data-tap-target": true,
|
|
474
|
-
children:
|
|
475
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react2.KeyRound, { className: "mr-1.5 h-4 w-4", "aria-hidden": true }),
|
|
476
|
-
state.kind === "asking" ? "Asking\u2026" : "Ask for access"
|
|
477
|
-
]
|
|
468
|
+
children: state.kind === "asking" ? "Asking\u2026" : "Ask for access"
|
|
478
469
|
}
|
|
479
470
|
),
|
|
480
471
|
state.kind === "failed" ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("p", { className: "text-xs text-destructive", role: "alert", children: [
|
|
@@ -524,7 +515,7 @@ function useAccessGate(token, id, options = {}) {
|
|
|
524
515
|
|
|
525
516
|
// src/access/react/AccessDenied.tsx
|
|
526
517
|
var import_format2 = require("@ai-matrx/kit/format");
|
|
527
|
-
var
|
|
518
|
+
var import_design_system3 = require("@ai-matrx/design-system");
|
|
528
519
|
var import_access6 = require("@ai-matrx/data/access");
|
|
529
520
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
530
521
|
function RestoreArchived({
|
|
@@ -537,10 +528,11 @@ function RestoreArchived({
|
|
|
537
528
|
const [busy, setBusy] = (0, import_react5.useState)(false);
|
|
538
529
|
const [failure, setFailure] = (0, import_react5.useState)(null);
|
|
539
530
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
540
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.
|
|
541
|
-
|
|
531
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
532
|
+
import_controls3.Button,
|
|
542
533
|
{
|
|
543
|
-
|
|
534
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react3.RotateCcw, { "aria-hidden": true }),
|
|
535
|
+
variant: "primary",
|
|
544
536
|
disabled: busy,
|
|
545
537
|
onClick: async () => {
|
|
546
538
|
setBusy(true);
|
|
@@ -555,14 +547,11 @@ function RestoreArchived({
|
|
|
555
547
|
setBusy(false);
|
|
556
548
|
}
|
|
557
549
|
},
|
|
558
|
-
children:
|
|
559
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react3.RotateCcw, { className: "mr-1.5 h-4 w-4", "aria-hidden": true }),
|
|
560
|
-
busy ? "Restoring\u2026" : "Restore"
|
|
561
|
-
]
|
|
550
|
+
children: busy ? "Restoring\u2026" : "Restore"
|
|
562
551
|
}
|
|
563
552
|
),
|
|
564
553
|
failure ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
565
|
-
|
|
554
|
+
import_design_system3.ErrorNotice,
|
|
566
555
|
{
|
|
567
556
|
size: "inline",
|
|
568
557
|
className: "basis-full text-sm",
|
|
@@ -676,7 +665,7 @@ function AccessDeniedView({
|
|
|
676
665
|
const absolute = requestability === "absolute" && context.status === "denied";
|
|
677
666
|
const title = headlineOverride?.trim() || (absolute ? "You can't open this here" : headline(context));
|
|
678
667
|
const body = reason?.trim() || (absolute ? "" : explanation(context));
|
|
679
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "matrx-touch-targets flex h-full min-h-64 w-full items-center justify-center p-6", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "w-full max-w-xl", children: [
|
|
668
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { "data-matrx-access-refused": "", className: "matrx-touch-targets flex h-full min-h-64 w-full items-center justify-center p-6", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "w-full max-w-xl", children: [
|
|
680
669
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex items-start gap-4", children: [
|
|
681
670
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "flex h-14 w-14 shrink-0 items-center justify-center rounded-2xl border border-border bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(StatusIcon, { status: context.status }) }),
|
|
682
671
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
@@ -710,15 +699,15 @@ function AccessDeniedView({
|
|
|
710
699
|
label: "Owner",
|
|
711
700
|
name: context.owner.displayName ?? "Someone else",
|
|
712
701
|
href: context.owner.creatorHandle ? `/c/${context.owner.creatorHandle}` : null,
|
|
713
|
-
avatar: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
702
|
+
avatar: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_design_system2.Avatar, { className: "h-7 w-7", children: [
|
|
714
703
|
context.owner.avatarUrl ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
715
|
-
|
|
704
|
+
import_design_system2.AvatarImage,
|
|
716
705
|
{
|
|
717
706
|
src: context.owner.avatarUrl,
|
|
718
707
|
alt: context.owner.displayName ?? "Owner"
|
|
719
708
|
}
|
|
720
709
|
) : null,
|
|
721
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
710
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_design_system2.AvatarFallback, { className: "text-[11px]", children: (0, import_format2.getInitials)(context.owner.displayName) })
|
|
722
711
|
] })
|
|
723
712
|
}
|
|
724
713
|
) : null,
|
|
@@ -769,10 +758,7 @@ function AccessDeniedView({
|
|
|
769
758
|
}) }) : null,
|
|
770
759
|
footer ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "mt-4", children: footer }) : null,
|
|
771
760
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "mt-5 flex flex-wrap items-center gap-2", children: [
|
|
772
|
-
context.status === "anonymous" ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
773
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react3.LogIn, { className: "mr-1.5 h-4 w-4", "aria-hidden": true }),
|
|
774
|
-
"Sign in"
|
|
775
|
-
] }) }) : null,
|
|
761
|
+
context.status === "anonymous" ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_controls3.Button, { asChild: true, icon: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react3.LogIn, { "aria-hidden": true }), variant: "primary", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(AccessLink, { href: signInHref, "data-tap-target": true, children: "Sign in" }) }) : null,
|
|
776
762
|
(0, import_access6.mayRestoreArchived)(context) ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
777
763
|
RestoreArchived,
|
|
778
764
|
{
|
|
@@ -786,21 +772,11 @@ function AccessDeniedView({
|
|
|
786
772
|
}
|
|
787
773
|
}
|
|
788
774
|
) : null,
|
|
789
|
-
(context.status === "ok" || context.status === "error") && onRetry ? /* @__PURE__ */ (0, import_jsx_runtime4.
|
|
790
|
-
|
|
791
|
-
"Try again"
|
|
792
|
-
] }) : null,
|
|
793
|
-
ancestor && ancestorHref ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_design_system4.Button, { asChild: true, size: "sm", variant: "outline", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(AccessLink, { href: ancestorHref, "data-tap-target": true, children: [
|
|
794
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react3.ArrowLeft, { className: "mr-1.5 h-4 w-4", "aria-hidden": true }),
|
|
775
|
+
(context.status === "ok" || context.status === "error") && onRetry ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_controls3.Button, { icon: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react3.RefreshCw, { "aria-hidden": true }), variant: "primary", onClick: onRetry, children: "Try again" }) : null,
|
|
776
|
+
ancestor && ancestorHref ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_controls3.Button, { asChild: true, icon: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react3.ArrowLeft, { "aria-hidden": true }), variant: "outline", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(AccessLink, { href: ancestorHref, "data-tap-target": true, children: [
|
|
795
777
|
"Open ",
|
|
796
778
|
ancestor.title ?? ancestor.label.toLowerCase()
|
|
797
|
-
] }) }) : fallbackHref ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
798
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react3.ArrowLeft, { className: "mr-1.5 h-4 w-4", "aria-hidden": true }),
|
|
799
|
-
fallbackLabel ?? "Back to what you can see"
|
|
800
|
-
] }) }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_design_system4.Button, { size: "sm", variant: "outline", onClick: () => router.back(), children: [
|
|
801
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react3.ArrowLeft, { className: "mr-1.5 h-4 w-4", "aria-hidden": true }),
|
|
802
|
-
"Go back"
|
|
803
|
-
] })
|
|
779
|
+
] }) }) : fallbackHref ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_controls3.Button, { asChild: true, icon: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react3.ArrowLeft, { "aria-hidden": true }), variant: "outline", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(AccessLink, { href: fallbackHref, "data-tap-target": true, children: fallbackLabel ?? "Back to what you can see" }) }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_controls3.Button, { icon: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react3.ArrowLeft, { "aria-hidden": true }), variant: "outline", onClick: () => router.back(), children: "Go back" })
|
|
804
780
|
] })
|
|
805
781
|
] }) });
|
|
806
782
|
}
|
|
@@ -918,7 +894,7 @@ function ServerRefusalCode({
|
|
|
918
894
|
var import_react6 = require("react");
|
|
919
895
|
var import_lucide_react4 = require("lucide-react");
|
|
920
896
|
var import_uuid = require("@ai-matrx/kit/uuid");
|
|
921
|
-
var
|
|
897
|
+
var import_controls4 = require("@ai-matrx/design-system/controls");
|
|
922
898
|
var import_access9 = require("@ai-matrx/data/access");
|
|
923
899
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
924
900
|
function SlugAccessGate({
|
|
@@ -1002,7 +978,7 @@ function Notice({
|
|
|
1002
978
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "mt-2 text-sm text-muted-foreground", children: body })
|
|
1003
979
|
] })
|
|
1004
980
|
] }),
|
|
1005
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "mt-5", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
981
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "mt-5", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_controls4.Button, { asChild: true, variant: "outline", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(AccessLink, { href: fallbackHref, children: [
|
|
1006
982
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react4.ArrowLeft, { className: "mr-1.5 h-4 w-4", "aria-hidden": true }),
|
|
1007
983
|
fallbackLabel
|
|
1008
984
|
] }) }) })
|
|
@@ -1012,7 +988,7 @@ function Notice({
|
|
|
1012
988
|
// src/access/react/SettingAccessGate.tsx
|
|
1013
989
|
var import_react7 = require("react");
|
|
1014
990
|
var import_lucide_react5 = require("lucide-react");
|
|
1015
|
-
var
|
|
991
|
+
var import_controls5 = require("@ai-matrx/design-system/controls");
|
|
1016
992
|
var import_access10 = require("@ai-matrx/data/access");
|
|
1017
993
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
1018
994
|
function SettingAccessGate({
|
|
@@ -1091,7 +1067,7 @@ function SettingAccessGate({
|
|
|
1091
1067
|
}
|
|
1092
1068
|
),
|
|
1093
1069
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1094
|
-
|
|
1070
|
+
import_controls5.Button,
|
|
1095
1071
|
{
|
|
1096
1072
|
icon: busy ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.Loader2, { className: "animate-spin", "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react5.Send, { "aria-hidden": true }),
|
|
1097
1073
|
variant: "primary",
|
|
@@ -1106,7 +1082,7 @@ function SettingAccessGate({
|
|
|
1106
1082
|
|
|
1107
1083
|
// src/access/react/ForbiddenSurface.tsx
|
|
1108
1084
|
var import_lucide_react6 = require("lucide-react");
|
|
1109
|
-
var
|
|
1085
|
+
var import_controls6 = require("@ai-matrx/design-system/controls");
|
|
1110
1086
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1111
1087
|
function ForbiddenSurfaceView({
|
|
1112
1088
|
state,
|
|
@@ -1117,7 +1093,7 @@ function ForbiddenSurfaceView({
|
|
|
1117
1093
|
homeHref = "/dashboard"
|
|
1118
1094
|
}) {
|
|
1119
1095
|
const unverified = state === "unverified";
|
|
1120
|
-
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex h-full min-h-64 w-full items-center justify-center p-6", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "w-full max-w-lg", children: [
|
|
1096
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { "data-matrx-access-refused": "", className: "flex h-full min-h-64 w-full items-center justify-center p-6", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "w-full max-w-lg", children: [
|
|
1121
1097
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex items-start gap-4", children: [
|
|
1122
1098
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex h-12 w-12 shrink-0 items-center justify-center rounded-full bg-muted", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.Lock, { className: "h-6 w-6 text-muted-foreground", "aria-hidden": true }) }),
|
|
1123
1099
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
@@ -1126,14 +1102,14 @@ function ForbiddenSurfaceView({
|
|
|
1126
1102
|
] })
|
|
1127
1103
|
] }),
|
|
1128
1104
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "mt-5 flex flex-wrap items-center gap-2", children: [
|
|
1129
|
-
unverified ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1105
|
+
unverified ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_controls6.Button, { variant: "primary", asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(AccessLink, { href: `${pathname}${search}`, children: [
|
|
1130
1106
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.RotateCw, { className: "mr-1.5 h-4 w-4", "aria-hidden": true }),
|
|
1131
1107
|
"Open it again"
|
|
1132
|
-
] }) }) : isAuthenticated ? null : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1108
|
+
] }) }) : isAuthenticated ? null : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_controls6.Button, { variant: "primary", asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(AccessLink, { href: signInHref, children: [
|
|
1133
1109
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.LogIn, { className: "mr-1.5 h-4 w-4", "aria-hidden": true }),
|
|
1134
1110
|
"Sign in"
|
|
1135
1111
|
] }) }),
|
|
1136
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1112
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_controls6.Button, { asChild: true, variant: "outline", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(AccessLink, { href: homeHref, children: [
|
|
1137
1113
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react6.ArrowLeft, { className: "mr-1.5 h-4 w-4", "aria-hidden": true }),
|
|
1138
1114
|
"Back to what you can see"
|
|
1139
1115
|
] }) })
|
|
@@ -1144,9 +1120,9 @@ function ForbiddenSurfaceView({
|
|
|
1144
1120
|
// src/access/react/RequestAccess.tsx
|
|
1145
1121
|
var import_react9 = require("react");
|
|
1146
1122
|
var import_lucide_react7 = require("lucide-react");
|
|
1147
|
-
var
|
|
1148
|
-
var
|
|
1149
|
-
var
|
|
1123
|
+
var import_controls7 = require("@ai-matrx/design-system/controls");
|
|
1124
|
+
var import_design_system4 = require("@ai-matrx/design-system");
|
|
1125
|
+
var import_design_system5 = require("@ai-matrx/design-system");
|
|
1150
1126
|
|
|
1151
1127
|
// src/access/react/useRequestAccess.ts
|
|
1152
1128
|
var import_react8 = require("react");
|
|
@@ -1256,7 +1232,7 @@ function RequestAccess({
|
|
|
1256
1232
|
"aria-label": label,
|
|
1257
1233
|
title: label,
|
|
1258
1234
|
onClick: () => setOpen(true),
|
|
1259
|
-
className: (0,
|
|
1235
|
+
className: (0, import_design_system5.cn)(
|
|
1260
1236
|
"inline-flex size-7 shrink-0 items-center justify-center rounded-md text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
1261
1237
|
className
|
|
1262
1238
|
),
|
|
@@ -1265,14 +1241,14 @@ function RequestAccess({
|
|
|
1265
1241
|
) : /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
1266
1242
|
"div",
|
|
1267
1243
|
{
|
|
1268
|
-
className: (0,
|
|
1244
|
+
className: (0, import_design_system5.cn)(
|
|
1269
1245
|
"flex flex-wrap items-center gap-x-2 gap-y-1 text-xs text-muted-foreground",
|
|
1270
1246
|
className
|
|
1271
1247
|
),
|
|
1272
1248
|
children: [
|
|
1273
1249
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { children: request.sent ? "Request sent." : why }),
|
|
1274
1250
|
request.sent ? null : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1275
|
-
|
|
1251
|
+
import_controls7.Button,
|
|
1276
1252
|
{
|
|
1277
1253
|
icon: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react7.KeyRound, { "aria-hidden": "true" }),
|
|
1278
1254
|
variant: "outline",
|
|
@@ -1316,10 +1292,10 @@ function RequestAccessDialog({
|
|
|
1316
1292
|
);
|
|
1317
1293
|
}
|
|
1318
1294
|
}
|
|
1319
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1320
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
1321
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1322
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
1295
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_design_system4.Dialog, { open: true, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_design_system4.DialogContent, { className: "matrx-touch-targets sm:max-w-md", children: [
|
|
1296
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_design_system4.DialogHeader, { children: [
|
|
1297
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_design_system4.DialogTitle, { children: "Ask for access" }),
|
|
1298
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_design_system4.DialogDescription, { children: [
|
|
1323
1299
|
"Goes to ",
|
|
1324
1300
|
request.destination,
|
|
1325
1301
|
"."
|
|
@@ -1341,9 +1317,9 @@ function RequestAccessDialog({
|
|
|
1341
1317
|
onChange: (event) => setNote(event.target.value)
|
|
1342
1318
|
}
|
|
1343
1319
|
),
|
|
1344
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
1345
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1346
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1320
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_design_system4.DialogFooter, { children: [
|
|
1321
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_controls7.Button, { variant: "outline", onClick: () => onOpenChange(false), children: "Cancel" }),
|
|
1322
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_controls7.Button, { icon: request.sending ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react7.Loader2, { className: "animate-spin", "aria-hidden": "true" }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react7.Send, { "aria-hidden": "true" }), variant: "primary", disabled: request.sending, onClick: () => void send(), children: "Send request" })
|
|
1347
1323
|
] })
|
|
1348
1324
|
] }) });
|
|
1349
1325
|
}
|
|
@@ -1351,9 +1327,9 @@ function RequestAccessDialog({
|
|
|
1351
1327
|
// src/access/react/UnresolvedEntityRef.tsx
|
|
1352
1328
|
var import_react10 = require("react");
|
|
1353
1329
|
var import_lucide_react8 = require("lucide-react");
|
|
1354
|
-
var
|
|
1355
|
-
var
|
|
1356
|
-
var
|
|
1330
|
+
var import_design_system6 = require("@ai-matrx/design-system");
|
|
1331
|
+
var import_controls8 = require("@ai-matrx/design-system/controls");
|
|
1332
|
+
var import_design_system7 = require("@ai-matrx/design-system");
|
|
1357
1333
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1358
1334
|
function chipLabel(context) {
|
|
1359
1335
|
const kind = context.entity.label.toLowerCase();
|
|
@@ -1421,7 +1397,7 @@ function UnresolvedEntityRef({
|
|
|
1421
1397
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
1422
1398
|
"span",
|
|
1423
1399
|
{
|
|
1424
|
-
className: (0,
|
|
1400
|
+
className: (0, import_design_system7.cn)(
|
|
1425
1401
|
"inline-flex items-center gap-1.5 text-sm text-muted-foreground",
|
|
1426
1402
|
className
|
|
1427
1403
|
),
|
|
@@ -1435,13 +1411,13 @@ function UnresolvedEntityRef({
|
|
|
1435
1411
|
const label = chipLabel(context);
|
|
1436
1412
|
const tone = context.status === "error" || context.status === "missing" ? "text-amber-700 dark:text-amber-400" : "text-muted-foreground";
|
|
1437
1413
|
const showOrg = Boolean(context.organization);
|
|
1438
|
-
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
1439
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1414
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_design_system6.Popover, { open, onOpenChange: setOpen, children: [
|
|
1415
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_design_system6.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
1440
1416
|
"button",
|
|
1441
1417
|
{
|
|
1442
1418
|
type: "button",
|
|
1443
1419
|
onClick: (e) => e.stopPropagation(),
|
|
1444
|
-
className: (0,
|
|
1420
|
+
className: (0, import_design_system7.cn)(
|
|
1445
1421
|
"inline-flex min-w-0 items-center gap-1.5 rounded-md border border-dashed border-border px-1.5 py-0.5 text-sm italic transition-colors hover:bg-muted",
|
|
1446
1422
|
tone,
|
|
1447
1423
|
className
|
|
@@ -1454,7 +1430,7 @@ function UnresolvedEntityRef({
|
|
|
1454
1430
|
}
|
|
1455
1431
|
) }),
|
|
1456
1432
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
1457
|
-
|
|
1433
|
+
import_design_system6.PopoverContent,
|
|
1458
1434
|
{
|
|
1459
1435
|
sizing: "content",
|
|
1460
1436
|
align: "start",
|
|
@@ -1495,12 +1471,12 @@ function UnresolvedEntityRef({
|
|
|
1495
1471
|
onChanged: () => onChanged?.()
|
|
1496
1472
|
}
|
|
1497
1473
|
) }) : null,
|
|
1498
|
-
context.status === "anonymous" ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1474
|
+
context.status === "anonymous" ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_controls8.Button, { variant: "primary", asChild: true, className: "mt-2 w-full", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(AccessLink, { href: signInHref, children: [
|
|
1499
1475
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react8.LogIn, { className: "mr-1.5 h-3.5 w-3.5", "aria-hidden": true }),
|
|
1500
1476
|
"Sign in"
|
|
1501
1477
|
] }) }) : null,
|
|
1502
1478
|
(context.status === "ok" || context.status === "error") && onChanged ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1503
|
-
|
|
1479
|
+
import_controls8.Button,
|
|
1504
1480
|
{
|
|
1505
1481
|
icon: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react8.RefreshCw, { "aria-hidden": true }),
|
|
1506
1482
|
variant: "primary",
|
|
@@ -1577,8 +1553,8 @@ function ServerReadRecheck({
|
|
|
1577
1553
|
// src/access/react/GovernedActionDialog.tsx
|
|
1578
1554
|
var import_react13 = require("react");
|
|
1579
1555
|
var import_lucide_react9 = require("lucide-react");
|
|
1580
|
-
var
|
|
1581
|
-
var
|
|
1556
|
+
var import_controls9 = require("@ai-matrx/design-system/controls");
|
|
1557
|
+
var import_design_system8 = require("@ai-matrx/design-system");
|
|
1582
1558
|
var import_access19 = require("@ai-matrx/data/access");
|
|
1583
1559
|
|
|
1584
1560
|
// src/access/react/useHiddenByMe.ts
|
|
@@ -1804,10 +1780,10 @@ function GovernedActionDialog({
|
|
|
1804
1780
|
setBusy(false);
|
|
1805
1781
|
}
|
|
1806
1782
|
}
|
|
1807
|
-
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1808
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
1783
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_design_system8.Dialog, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_design_system8.DialogContent, { className: "matrx-touch-targets sm:max-w-xl", children: [
|
|
1784
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_design_system8.DialogHeader, { children: [
|
|
1809
1785
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "mb-2 flex h-11 w-11 items-center justify-center rounded-full bg-destructive/10", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ActionIcon, { className: "h-5 w-5 text-destructive", "aria-hidden": true }) }),
|
|
1810
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
1786
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_design_system8.DialogTitle, { children: [
|
|
1811
1787
|
"Ask ",
|
|
1812
1788
|
ownerName2,
|
|
1813
1789
|
" to ",
|
|
@@ -1815,7 +1791,7 @@ function GovernedActionDialog({
|
|
|
1815
1791
|
" this ",
|
|
1816
1792
|
itemLabel
|
|
1817
1793
|
] }),
|
|
1818
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
1794
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_design_system8.DialogDescription, { children: [
|
|
1819
1795
|
"You can work on",
|
|
1820
1796
|
" ",
|
|
1821
1797
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "font-medium text-foreground", children: itemName }),
|
|
@@ -1882,10 +1858,10 @@ function GovernedActionDialog({
|
|
|
1882
1858
|
}
|
|
1883
1859
|
)
|
|
1884
1860
|
] }),
|
|
1885
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
1886
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1861
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_design_system8.DialogFooter, { children: [
|
|
1862
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_controls9.Button, { variant: "outline", onClick: () => onOpenChange(false), children: sent ? "Done" : "Cancel" }),
|
|
1887
1863
|
!sent && context?.status !== "error" && context?.status !== "anonymous" ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1888
|
-
|
|
1864
|
+
import_controls9.Button,
|
|
1889
1865
|
{
|
|
1890
1866
|
icon: busy ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react9.Loader2, { className: "animate-spin", "aria-hidden": true }) : choice === "hide" ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react9.EyeOff, { "aria-hidden": true }) : choice === "delete" ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react9.Send, { "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_lucide_react9.KeyRound, { "aria-hidden": true }),
|
|
1891
1867
|
variant: "primary",
|
|
@@ -1925,8 +1901,8 @@ function RequestChoiceButton({
|
|
|
1925
1901
|
// src/access/react/HiddenByMeButton.tsx
|
|
1926
1902
|
var import_react14 = require("react");
|
|
1927
1903
|
var import_lucide_react10 = require("lucide-react");
|
|
1928
|
-
var
|
|
1929
|
-
var
|
|
1904
|
+
var import_controls10 = require("@ai-matrx/design-system/controls");
|
|
1905
|
+
var import_design_system9 = require("@ai-matrx/design-system");
|
|
1930
1906
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1931
1907
|
function HiddenByMeButton({
|
|
1932
1908
|
token,
|
|
@@ -1951,7 +1927,7 @@ function HiddenByMeButton({
|
|
|
1951
1927
|
};
|
|
1952
1928
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
|
|
1953
1929
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1954
|
-
|
|
1930
|
+
import_controls10.Button,
|
|
1955
1931
|
{
|
|
1956
1932
|
type: "button",
|
|
1957
1933
|
variant: "quiet",
|
|
@@ -1961,10 +1937,10 @@ function HiddenByMeButton({
|
|
|
1961
1937
|
children: `Hidden ${count}`
|
|
1962
1938
|
}
|
|
1963
1939
|
),
|
|
1964
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1965
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
1966
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1967
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
1940
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_design_system9.Dialog, { open, onOpenChange: setOpen, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_design_system9.DialogContent, { className: "matrx-touch-targets sm:max-w-lg", children: [
|
|
1941
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_design_system9.DialogHeader, { children: [
|
|
1942
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_design_system9.DialogTitle, { children: "Hidden by me" }),
|
|
1943
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_design_system9.DialogDescription, { children: [
|
|
1968
1944
|
"Only you stopped seeing these ",
|
|
1969
1945
|
pluralLabel,
|
|
1970
1946
|
"."
|
|
@@ -1975,7 +1951,7 @@ function HiddenByMeButton({
|
|
|
1975
1951
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("li", { className: "flex items-center gap-2 py-2", children: [
|
|
1976
1952
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "min-w-0 flex-1", children: ui.renderEntityRef({ token: item.token, id: item.id, name }) }),
|
|
1977
1953
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1978
|
-
|
|
1954
|
+
import_controls10.Button,
|
|
1979
1955
|
{
|
|
1980
1956
|
type: "button",
|
|
1981
1957
|
variant: "outline",
|
|
@@ -1993,7 +1969,7 @@ function HiddenByMeButton({
|
|
|
1993
1969
|
|
|
1994
1970
|
// src/access/react/HiddenFilter.tsx
|
|
1995
1971
|
var import_lucide_react11 = require("lucide-react");
|
|
1996
|
-
var
|
|
1972
|
+
var import_controls11 = require("@ai-matrx/design-system/controls");
|
|
1997
1973
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1998
1974
|
function HiddenFilter({
|
|
1999
1975
|
count,
|
|
@@ -2003,7 +1979,7 @@ function HiddenFilter({
|
|
|
2003
1979
|
if (count === 0 && value === "visible") return null;
|
|
2004
1980
|
const showing = value === "hidden";
|
|
2005
1981
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
2006
|
-
|
|
1982
|
+
import_controls11.Button,
|
|
2007
1983
|
{
|
|
2008
1984
|
type: "button",
|
|
2009
1985
|
variant: showing ? "outline" : "quiet",
|
|
@@ -2019,7 +1995,7 @@ function HiddenFilter({
|
|
|
2019
1995
|
// src/access/react/ResourceActionRequestButtons.tsx
|
|
2020
1996
|
var import_react15 = require("react");
|
|
2021
1997
|
var import_lucide_react12 = require("lucide-react");
|
|
2022
|
-
var
|
|
1998
|
+
var import_controls12 = require("@ai-matrx/design-system/controls");
|
|
2023
1999
|
var import_access20 = require("@ai-matrx/data/access");
|
|
2024
2000
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
2025
2001
|
function ResourceActionRequestButtons({
|
|
@@ -2157,7 +2133,7 @@ function ResourceActionRequestButtons({
|
|
|
2157
2133
|
}
|
|
2158
2134
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex flex-wrap gap-2", children: [
|
|
2159
2135
|
action ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2160
|
-
|
|
2136
|
+
import_controls12.Button,
|
|
2161
2137
|
{
|
|
2162
2138
|
icon: busy ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react12.Loader2, { className: "animate-spin", "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react12.Trash2, { "aria-hidden": true }),
|
|
2163
2139
|
variant: "primary",
|
|
@@ -2168,7 +2144,7 @@ function ResourceActionRequestButtons({
|
|
|
2168
2144
|
}
|
|
2169
2145
|
) : null,
|
|
2170
2146
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2171
|
-
|
|
2147
|
+
import_controls12.Button,
|
|
2172
2148
|
{
|
|
2173
2149
|
icon: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react12.KeyRound, { "aria-hidden": true }),
|
|
2174
2150
|
className: size,
|
|
@@ -2178,12 +2154,12 @@ function ResourceActionRequestButtons({
|
|
|
2178
2154
|
children: "Give full access"
|
|
2179
2155
|
}
|
|
2180
2156
|
),
|
|
2181
|
-
safeHref ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2157
|
+
safeHref ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_controls12.Button, { asChild: true, className: size, variant: "outline", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(AccessLink, { href: safeHref, target: "_blank", rel: "noopener noreferrer", children: [
|
|
2182
2158
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react12.ExternalLink, { className: "h-3.5 w-3.5", "aria-hidden": true }),
|
|
2183
2159
|
"Open item"
|
|
2184
2160
|
] }) }) : null,
|
|
2185
2161
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2186
|
-
|
|
2162
|
+
import_controls12.Button,
|
|
2187
2163
|
{
|
|
2188
2164
|
icon: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react12.CircleSlash, { "aria-hidden": true }),
|
|
2189
2165
|
className: size,
|
|
@@ -2194,7 +2170,7 @@ function ResourceActionRequestButtons({
|
|
|
2194
2170
|
}
|
|
2195
2171
|
),
|
|
2196
2172
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2197
|
-
|
|
2173
|
+
import_controls12.Button,
|
|
2198
2174
|
{
|
|
2199
2175
|
icon: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_lucide_react12.Flag, { "aria-hidden": true }),
|
|
2200
2176
|
className: size,
|
|
@@ -2210,7 +2186,7 @@ function ResourceActionRequestButtons({
|
|
|
2210
2186
|
// src/access/react/SettingRequestActionButtons.tsx
|
|
2211
2187
|
var import_react16 = require("react");
|
|
2212
2188
|
var import_lucide_react13 = require("lucide-react");
|
|
2213
|
-
var
|
|
2189
|
+
var import_controls13 = require("@ai-matrx/design-system/controls");
|
|
2214
2190
|
var import_access21 = require("@ai-matrx/data/access");
|
|
2215
2191
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
2216
2192
|
function SettingRequestActionButtons({
|
|
@@ -2295,7 +2271,7 @@ function SettingRequestActionButtons({
|
|
|
2295
2271
|
const size = compact ? "h-7 px-2 text-[11px]" : "h-11 sm:h-8";
|
|
2296
2272
|
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex flex-wrap gap-2", children: [
|
|
2297
2273
|
action ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2298
|
-
|
|
2274
|
+
import_controls13.Button,
|
|
2299
2275
|
{
|
|
2300
2276
|
icon: busy ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react13.Loader2, { className: "animate-spin", "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react13.Check, { "aria-hidden": true }),
|
|
2301
2277
|
variant: "primary",
|
|
@@ -2305,12 +2281,12 @@ function SettingRequestActionButtons({
|
|
|
2305
2281
|
children: action.label
|
|
2306
2282
|
}
|
|
2307
2283
|
) : null,
|
|
2308
|
-
safeHref ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2284
|
+
safeHref ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_controls13.Button, { asChild: true, className: size, variant: "outline", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(AccessLink, { href: safeHref, target: "_blank", rel: "noopener noreferrer", children: [
|
|
2309
2285
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react13.ExternalLink, { className: "h-3.5 w-3.5", "aria-hidden": true }),
|
|
2310
2286
|
"Open setting"
|
|
2311
2287
|
] }) }) : null,
|
|
2312
2288
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2313
|
-
|
|
2289
|
+
import_controls13.Button,
|
|
2314
2290
|
{
|
|
2315
2291
|
icon: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_lucide_react13.CircleSlash, { "aria-hidden": true }),
|
|
2316
2292
|
className: size,
|
|
@@ -2326,8 +2302,8 @@ function SettingRequestActionButtons({
|
|
|
2326
2302
|
// src/access/react/AccessRequestsSurface.tsx
|
|
2327
2303
|
var import_react17 = require("react");
|
|
2328
2304
|
var import_lucide_react14 = require("lucide-react");
|
|
2329
|
-
var
|
|
2330
|
-
var
|
|
2305
|
+
var import_design_system10 = require("@ai-matrx/design-system");
|
|
2306
|
+
var import_controls14 = require("@ai-matrx/design-system/controls");
|
|
2331
2307
|
var import_buttons = require("@ai-matrx/design-system/tap-target/buttons");
|
|
2332
2308
|
var import_format3 = require("@ai-matrx/kit/format");
|
|
2333
2309
|
var import_access22 = require("@ai-matrx/data/access");
|
|
@@ -2405,10 +2381,10 @@ function RowShell({ children }) {
|
|
|
2405
2381
|
}
|
|
2406
2382
|
function LoadingRows() {
|
|
2407
2383
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("ul", { className: "space-y-2", children: [0, 1, 2].map((i) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(RowShell, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex items-start gap-3", children: [
|
|
2408
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2384
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_design_system10.Skeleton, { className: "h-8 w-8 shrink-0 rounded-full" }),
|
|
2409
2385
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "min-w-0 flex-1 space-y-2", children: [
|
|
2410
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2411
|
-
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2386
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_design_system10.Skeleton, { className: "h-4 w-1/3" }),
|
|
2387
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_design_system10.Skeleton, { className: "h-3 w-2/3" })
|
|
2412
2388
|
] })
|
|
2413
2389
|
] }) }, i)) });
|
|
2414
2390
|
}
|
|
@@ -2542,7 +2518,7 @@ function AccessRequestsSurface() {
|
|
|
2542
2518
|
] }),
|
|
2543
2519
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "ml-auto flex shrink-0 items-center gap-2", children: [
|
|
2544
2520
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2545
|
-
|
|
2521
|
+
import_controls14.SegmentedControl,
|
|
2546
2522
|
{
|
|
2547
2523
|
"aria-label": "Request box",
|
|
2548
2524
|
value: box,
|
|
@@ -2594,7 +2570,7 @@ function AccessRequestsSurface() {
|
|
|
2594
2570
|
box === "sent" && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2595
2571
|
"span",
|
|
2596
2572
|
{
|
|
2597
|
-
className: (0,
|
|
2573
|
+
className: (0, import_design_system10.cn)(
|
|
2598
2574
|
"rounded-full px-2 py-0.5 text-[11px] font-medium",
|
|
2599
2575
|
STATUS_TONE[row.status]
|
|
2600
2576
|
),
|
|
@@ -2635,7 +2611,7 @@ function AccessRequestsSurface() {
|
|
|
2635
2611
|
}
|
|
2636
2612
|
) : box === "inbox" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex flex-wrap gap-2", children: [
|
|
2637
2613
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2638
|
-
|
|
2614
|
+
import_controls14.Button,
|
|
2639
2615
|
{
|
|
2640
2616
|
icon: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react14.CircleCheck, { "aria-hidden": true }),
|
|
2641
2617
|
variant: "primary",
|
|
@@ -2645,7 +2621,7 @@ function AccessRequestsSurface() {
|
|
|
2645
2621
|
}
|
|
2646
2622
|
),
|
|
2647
2623
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2648
|
-
|
|
2624
|
+
import_controls14.Button,
|
|
2649
2625
|
{
|
|
2650
2626
|
icon: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react14.PenLine, { "aria-hidden": true }),
|
|
2651
2627
|
variant: "outline",
|
|
@@ -2655,7 +2631,7 @@ function AccessRequestsSurface() {
|
|
|
2655
2631
|
}
|
|
2656
2632
|
),
|
|
2657
2633
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2658
|
-
|
|
2634
|
+
import_controls14.Button,
|
|
2659
2635
|
{
|
|
2660
2636
|
icon: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react14.KeyRound, { "aria-hidden": true }),
|
|
2661
2637
|
variant: "outline",
|
|
@@ -2665,7 +2641,7 @@ function AccessRequestsSurface() {
|
|
|
2665
2641
|
}
|
|
2666
2642
|
),
|
|
2667
2643
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2668
|
-
|
|
2644
|
+
import_controls14.Button,
|
|
2669
2645
|
{
|
|
2670
2646
|
icon: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react14.CircleSlash, { "aria-hidden": true }),
|
|
2671
2647
|
variant: "outline",
|
|
@@ -2675,7 +2651,7 @@ function AccessRequestsSurface() {
|
|
|
2675
2651
|
}
|
|
2676
2652
|
),
|
|
2677
2653
|
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2678
|
-
|
|
2654
|
+
import_controls14.Button,
|
|
2679
2655
|
{
|
|
2680
2656
|
icon: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react14.Flag, { "aria-hidden": true }),
|
|
2681
2657
|
variant: "quiet",
|
|
@@ -2685,7 +2661,7 @@ function AccessRequestsSurface() {
|
|
|
2685
2661
|
}
|
|
2686
2662
|
)
|
|
2687
2663
|
] }) : row.status === "pending" && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "flex flex-wrap gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2688
|
-
|
|
2664
|
+
import_controls14.Button,
|
|
2689
2665
|
{
|
|
2690
2666
|
icon: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_lucide_react14.Undo2, { "aria-hidden": true }),
|
|
2691
2667
|
variant: "outline",
|