@ai-matrx/sharing 0.1.9 → 0.1.11

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/dist/react.js CHANGED
@@ -6,6 +6,7 @@ import { Input } from "@ai-matrx/design-system";
6
6
  import { Button } from "@ai-matrx/design-system/controls";
7
7
  import { copyText } from "@ai-matrx/kit/clipboard";
8
8
  import { confirm as kitConfirm } from "@ai-matrx/kit/confirm-opener";
9
+ import { openClipboardFallback } from "@ai-matrx/kit/clipboard-fallback-opener";
9
10
  import { readOrganizationMemberRows } from "@ai-matrx/sharing/core";
10
11
  import { shareClient as shareClientForIdentity } from "@ai-matrx/sharing/core";
11
12
  import { createSupabaseIdentity } from "@ai-matrx/vault";
@@ -163,6 +164,7 @@ var DEFAULTS = {
163
164
  useOrganizations: useDefaultOrganizations,
164
165
  useUserConnections: useDefaultConnections,
165
166
  confirm: (o) => kitConfirm(o),
167
+ manualCopy: (text, options) => openClipboardFallback(text, options),
166
168
  CopyButtons: DefaultCopyButtons,
167
169
  csvExportItem: () => {
168
170
  announceStandIn("csvExportItem");
@@ -203,6 +205,7 @@ function shareCopyNotify(message, kind) {
203
205
  ui.toast({ title: message, ...kind === "error" ? { variant: "destructive" } : {} });
204
206
  }
205
207
  var confirm = (options) => ui.confirm(options);
208
+ var manualCopy = (text, options = {}) => ui.manualCopy(text, options);
206
209
  var useCurrentUserId = () => ui.useCurrentUserId();
207
210
  var useNavTree = () => ({ orgs: ui.useOrganizations() });
208
211
  var useOrganizationsToCreateIn = () => ({ orgs: ui.useOrganizations() });
@@ -2890,29 +2893,22 @@ function PortalConfirmDialog(props) {
2890
2893
  // src/react/sheet/useShare.tsx
2891
2894
  import { useClipboard } from "@ai-matrx/kit/clipboard";
2892
2895
  import { useCallback as useCallback4, useState as useState9 } from "react";
2893
- import { ClipboardFallbackDialog } from "@ai-matrx/design-system";
2894
- import { jsx as jsx13 } from "react/jsx-runtime";
2896
+ var MANUAL_TITLE = "Copy link";
2897
+ var MANUAL_DESCRIPTION = "Press Cmd/Ctrl+C to copy, or use the Copy button below.";
2895
2898
  function useShare() {
2896
2899
  const { copyText: copyTextKit } = useClipboard({
2897
2900
  notify: shareCopyNotify
2898
2901
  });
2899
2902
  const [copied, setCopied] = useState9(false);
2900
- const [fallbackUrl, setFallbackUrl] = useState9(null);
2901
- const [fallbackTitle, setFallbackTitle] = useState9("Copy link");
2902
- const [fallbackDescription, setFallbackDescription] = useState9(
2903
- "Press Cmd/Ctrl+C to copy, or use the Copy button below."
2904
- );
2905
2903
  const copy = useCallback4(
2906
2904
  async (text, fallback) => {
2907
- const showManualFallback = () => {
2908
- setFallbackTitle(fallback?.title ?? "Copy link");
2909
- setFallbackDescription(
2910
- fallback?.description ?? "Press Cmd/Ctrl+C to copy, or use the Copy button below."
2911
- );
2912
- setFallbackUrl(text);
2905
+ if (!await copyTextKit(text)) {
2906
+ void manualCopy(text, {
2907
+ title: fallback?.title ?? MANUAL_TITLE,
2908
+ description: fallback?.description ?? MANUAL_DESCRIPTION
2909
+ });
2913
2910
  return "manual";
2914
- };
2915
- if (!await copyTextKit(text)) return showManualFallback();
2911
+ }
2916
2912
  setCopied(true);
2917
2913
  window.setTimeout(() => setCopied(false), 2e3);
2918
2914
  return "copied";
@@ -2945,21 +2941,7 @@ function useShare() {
2945
2941
  },
2946
2942
  [copy]
2947
2943
  );
2948
- return {
2949
- share,
2950
- copy,
2951
- copied,
2952
- fallbackDialog: /* @__PURE__ */ jsx13(
2953
- ClipboardFallbackDialog,
2954
- {
2955
- open: fallbackUrl !== null,
2956
- onOpenChange: (open) => !open && setFallbackUrl(null),
2957
- url: fallbackUrl ?? "",
2958
- title: fallbackTitle,
2959
- description: fallbackDescription
2960
- }
2961
- )
2962
- };
2944
+ return { share, copy, copied, fallbackDialog: null };
2963
2945
  }
2964
2946
 
2965
2947
  // src/react/sheet/ShareLinkPanel.tsx
@@ -2970,7 +2952,7 @@ import {
2970
2952
  evaluateShareLinkHandoff,
2971
2953
  shareLinkUnavailableReason
2972
2954
  } from "@ai-matrx/sharing/core";
2973
- import { jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
2955
+ import { jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
2974
2956
  function linkListErrorMessage(error) {
2975
2957
  return error instanceof Error ? error.message : "We couldn't load this item's share links.";
2976
2958
  }
@@ -3008,7 +2990,7 @@ function ShareLinkPanel({
3008
2990
  const [shareError, setShareError] = useState10(null);
3009
2991
  const [refreshing, setRefreshing] = useState10(false);
3010
2992
  const [handoffBusy, setHandoffBusy] = useState10(false);
3011
- const { share, copy: copyMessage, fallbackDialog } = useShare();
2993
+ const { share, copy: copyMessage } = useShare();
3012
2994
  const resourceKey = `${resourceType}\0${resourceId}`;
3013
2995
  const fetchLinks = useCallback5(async () => {
3014
2996
  const fresh = await listShareLinks(resourceType, resourceId);
@@ -3356,38 +3338,38 @@ function ShareLinkPanel({
3356
3338
  if (!isOwner) return null;
3357
3339
  if (!enabled) {
3358
3340
  return /* @__PURE__ */ jsxs10("div", { className: "flex items-start gap-2 p-3 bg-muted/30 rounded-lg border", children: [
3359
- /* @__PURE__ */ jsx14(Link22, { className: "w-4 h-4 text-muted-foreground flex-shrink-0 mt-0.5" }),
3341
+ /* @__PURE__ */ jsx13(Link22, { className: "w-4 h-4 text-muted-foreground flex-shrink-0 mt-0.5" }),
3360
3342
  /* @__PURE__ */ jsxs10("div", { className: "min-w-0", children: [
3361
- /* @__PURE__ */ jsx14("h3", { className: "text-sm font-medium", children: "No-login links aren\u2019t on for this item type" }),
3362
- /* @__PURE__ */ jsx14("p", { className: "text-xs text-muted-foreground", children: "Share it with specific people or an organization instead \u2014 they open it signed in." })
3343
+ /* @__PURE__ */ jsx13("h3", { className: "text-sm font-medium", children: "No-login links aren\u2019t on for this item type" }),
3344
+ /* @__PURE__ */ jsx13("p", { className: "text-xs text-muted-foreground", children: "Share it with specific people or an organization instead \u2014 they open it signed in." })
3363
3345
  ] })
3364
3346
  ] });
3365
3347
  }
3366
3348
  return /* @__PURE__ */ jsxs10("div", { className: "space-y-2.5 p-3 bg-muted/30 rounded-lg border", children: [
3367
3349
  /* @__PURE__ */ jsxs10("div", { className: "flex items-center justify-between gap-2", children: [
3368
3350
  /* @__PURE__ */ jsxs10("div", { className: "flex items-center gap-2 min-w-0", children: [
3369
- /* @__PURE__ */ jsx14(Link22, { className: "w-4 h-4 text-primary flex-shrink-0" }),
3351
+ /* @__PURE__ */ jsx13(Link22, { className: "w-4 h-4 text-primary flex-shrink-0" }),
3370
3352
  /* @__PURE__ */ jsxs10("div", { className: "min-w-0", children: [
3371
- /* @__PURE__ */ jsx14("h3", { className: "text-sm font-medium", children: "Anyone with the link" }),
3372
- /* @__PURE__ */ jsx14("p", { className: "text-xs text-muted-foreground", children: hasLink ? `Link is on \xB7 ${activeLinks.length} active` : "Create a link that opens with no sign-in required" })
3353
+ /* @__PURE__ */ jsx13("h3", { className: "text-sm font-medium", children: "Anyone with the link" }),
3354
+ /* @__PURE__ */ jsx13("p", { className: "text-xs text-muted-foreground", children: hasLink ? `Link is on \xB7 ${activeLinks.length} active` : "Create a link that opens with no sign-in required" })
3373
3355
  ] })
3374
3356
  ] }),
3375
- /* @__PURE__ */ jsx14(
3357
+ /* @__PURE__ */ jsx13(
3376
3358
  Button7,
3377
3359
  {
3378
- icon: creating ? /* @__PURE__ */ jsx14(Loader27, { className: "animate-spin" }) : /* @__PURE__ */ jsx14(Plus, {}),
3360
+ icon: creating ? /* @__PURE__ */ jsx13(Loader27, { className: "animate-spin" }) : /* @__PURE__ */ jsx13(Plus, {}),
3379
3361
  variant: "primary",
3380
3362
  onClick: handleCreate,
3381
3363
  disabled: creating,
3382
3364
  className: "flex-shrink-0",
3383
- children: /* @__PURE__ */ jsx14("span", { className: "ml-1 hidden sm:inline", children: hasLink ? "New link" : "Create link" })
3365
+ children: /* @__PURE__ */ jsx13("span", { className: "ml-1 hidden sm:inline", children: hasLink ? "New link" : "Create link" })
3384
3366
  }
3385
3367
  )
3386
3368
  ] }),
3387
3369
  linkSettings ? /* @__PURE__ */ jsxs10("div", { className: "grid grid-cols-1 gap-2 sm:grid-cols-3", children: [
3388
3370
  /* @__PURE__ */ jsxs10("label", { className: "flex flex-col gap-1 text-xs", children: [
3389
- /* @__PURE__ */ jsx14("span", { className: "text-muted-foreground", children: "Permission" }),
3390
- /* @__PURE__ */ jsx14(
3371
+ /* @__PURE__ */ jsx13("span", { className: "text-muted-foreground", children: "Permission" }),
3372
+ /* @__PURE__ */ jsx13(
3391
3373
  Select5,
3392
3374
  {
3393
3375
  value: permissionLevel,
@@ -3401,12 +3383,12 @@ function ShareLinkPanel({
3401
3383
  )
3402
3384
  ] }),
3403
3385
  /* @__PURE__ */ jsxs10("label", { className: "flex flex-col gap-1 text-xs", children: [
3404
- /* @__PURE__ */ jsx14("span", { className: "text-muted-foreground", children: "Expires" }),
3405
- /* @__PURE__ */ jsx14(DateTimeField2, { value: expiresAt, onValueChange: (v) => setExpiresAt(v ?? "") })
3386
+ /* @__PURE__ */ jsx13("span", { className: "text-muted-foreground", children: "Expires" }),
3387
+ /* @__PURE__ */ jsx13(DateTimeField2, { value: expiresAt, onValueChange: (v) => setExpiresAt(v ?? "") })
3406
3388
  ] }),
3407
3389
  /* @__PURE__ */ jsxs10("label", { className: "flex flex-col gap-1 text-xs", children: [
3408
- /* @__PURE__ */ jsx14("span", { className: "text-muted-foreground", children: "Max uses" }),
3409
- /* @__PURE__ */ jsx14(
3390
+ /* @__PURE__ */ jsx13("span", { className: "text-muted-foreground", children: "Max uses" }),
3391
+ /* @__PURE__ */ jsx13(
3410
3392
  Input3,
3411
3393
  {
3412
3394
  type: "number",
@@ -3419,17 +3401,17 @@ function ShareLinkPanel({
3419
3401
  ] })
3420
3402
  ] }) : null,
3421
3403
  isLoading ? /* @__PURE__ */ jsxs10("div", { className: "flex items-center justify-center py-3 text-xs text-muted-foreground", children: [
3422
- /* @__PURE__ */ jsx14(Loader27, { className: "w-3.5 h-3.5 animate-spin mr-2" }),
3404
+ /* @__PURE__ */ jsx13(Loader27, { className: "w-3.5 h-3.5 animate-spin mr-2" }),
3423
3405
  "Loading links\u2026"
3424
- ] }) : activeLinks.length === 0 && !shareError ? /* @__PURE__ */ jsx14("p", { className: "text-xs text-muted-foreground py-1", children: "No share links yet. Create one to share this with anyone." }) : /* @__PURE__ */ jsx14("div", { className: "space-y-1.5", children: activeLinks.map((link) => {
3406
+ ] }) : activeLinks.length === 0 && !shareError ? /* @__PURE__ */ jsx13("p", { className: "text-xs text-muted-foreground py-1", children: "No share links yet. Create one to share this with anyone." }) : /* @__PURE__ */ jsx13("div", { className: "space-y-1.5", children: activeLinks.map((link) => {
3425
3407
  const unavailableReason = shareLinkUnavailableReason(link);
3426
3408
  const linkUrl = urlFor(link);
3427
3409
  const extras = extraUrls?.(link) ?? [];
3428
3410
  return /* @__PURE__ */ jsxs10("div", { className: "space-y-1", children: [
3429
3411
  showLinkDetails ? /* @__PURE__ */ jsxs10("div", { className: "flex flex-wrap items-center gap-1.5 px-0.5 text-[11px] text-muted-foreground", children: [
3430
- /* @__PURE__ */ jsx14("span", { className: "rounded bg-muted px-1.5 py-0.5 font-medium text-foreground", children: link.permissionLevel === "viewer" ? "Read only" : "Read + write" }),
3431
- /* @__PURE__ */ jsx14("span", { children: link.expiresAt ? `Expires ${formatAbsoluteDate(link.expiresAt)}` : "No expiry" }),
3432
- link.maxUses ? /* @__PURE__ */ jsx14("span", { children: `${link.useCount}/${link.maxUses} uses` }) : null
3412
+ /* @__PURE__ */ jsx13("span", { className: "rounded bg-muted px-1.5 py-0.5 font-medium text-foreground", children: link.permissionLevel === "viewer" ? "Read only" : "Read + write" }),
3413
+ /* @__PURE__ */ jsx13("span", { children: link.expiresAt ? `Expires ${formatAbsoluteDate(link.expiresAt)}` : "No expiry" }),
3414
+ link.maxUses ? /* @__PURE__ */ jsx13("span", { children: `${link.useCount}/${link.maxUses} uses` }) : null
3433
3415
  ] }) : null,
3434
3416
  extras.map((extra) => /* @__PURE__ */ jsxs10(
3435
3417
  "div",
@@ -3441,22 +3423,22 @@ function ShareLinkPanel({
3441
3423
  extra.label,
3442
3424
  extra.sublabel ? ` \xB7 ${extra.sublabel}` : ""
3443
3425
  ] }),
3444
- /* @__PURE__ */ jsx14("span", { className: "truncate font-mono text-xs", title: extra.url, children: extra.url })
3426
+ /* @__PURE__ */ jsx13("span", { className: "truncate font-mono text-xs", title: extra.url, children: extra.url })
3445
3427
  ] }),
3446
- /* @__PURE__ */ jsx14(
3428
+ /* @__PURE__ */ jsx13(
3447
3429
  OutboundLink,
3448
3430
  {
3449
3431
  href: extra.url,
3450
3432
  "aria-label": `Open ${extra.label}`,
3451
3433
  title: "Open in new tab",
3452
3434
  className: "flex h-11 w-11 flex-shrink-0 items-center justify-center rounded text-muted-foreground hover:bg-accent hover:text-foreground sm:h-8 sm:w-8",
3453
- children: /* @__PURE__ */ jsx14(ExternalLink, { className: "w-4 h-4" })
3435
+ children: /* @__PURE__ */ jsx13(ExternalLink, { className: "w-4 h-4" })
3454
3436
  }
3455
3437
  ),
3456
- /* @__PURE__ */ jsx14(
3438
+ /* @__PURE__ */ jsx13(
3457
3439
  Button7,
3458
3440
  {
3459
- icon: copiedId === `${link.id}:${extra.key}` ? /* @__PURE__ */ jsx14(Check2, { className: "text-green-500" }) : /* @__PURE__ */ jsx14(Copy, {}),
3441
+ icon: copiedId === `${link.id}:${extra.key}` ? /* @__PURE__ */ jsx13(Check2, { className: "text-green-500" }) : /* @__PURE__ */ jsx13(Copy, {}),
3460
3442
  variant: "quiet",
3461
3443
  className: "flex-shrink-0",
3462
3444
  onClick: () => copyExtraUrl(`${link.id}:${extra.key}`, extra.url),
@@ -3470,7 +3452,7 @@ function ShareLinkPanel({
3470
3452
  extra.key
3471
3453
  )),
3472
3454
  /* @__PURE__ */ jsxs10("div", { className: "flex items-center gap-1.5 rounded-md border bg-background p-1.5", children: [
3473
- /* @__PURE__ */ jsx14(
3455
+ /* @__PURE__ */ jsx13(
3474
3456
  Input3,
3475
3457
  {
3476
3458
  mono: true,
@@ -3486,25 +3468,25 @@ function ShareLinkPanel({
3486
3468
  className: "flex items-center gap-1 text-[10px] text-muted-foreground px-1",
3487
3469
  title: `${link.useCount} view${link.useCount === 1 ? "" : "s"}`,
3488
3470
  children: [
3489
- /* @__PURE__ */ jsx14(Eye2, { className: "w-3 h-3" }),
3471
+ /* @__PURE__ */ jsx13(Eye2, { className: "w-3 h-3" }),
3490
3472
  link.useCount
3491
3473
  ]
3492
3474
  }
3493
3475
  ),
3494
- showOpenLink ? /* @__PURE__ */ jsx14(
3476
+ showOpenLink ? /* @__PURE__ */ jsx13(
3495
3477
  OutboundLink,
3496
3478
  {
3497
3479
  href: linkUrl,
3498
3480
  "aria-label": "Open share link",
3499
3481
  title: "Open in new tab",
3500
3482
  className: "flex h-11 w-11 flex-shrink-0 items-center justify-center rounded text-muted-foreground hover:bg-accent hover:text-foreground sm:h-8 sm:w-8",
3501
- children: /* @__PURE__ */ jsx14(ExternalLink, { className: "w-4 h-4" })
3483
+ children: /* @__PURE__ */ jsx13(ExternalLink, { className: "w-4 h-4" })
3502
3484
  }
3503
3485
  ) : null,
3504
- /* @__PURE__ */ jsx14(
3486
+ /* @__PURE__ */ jsx13(
3505
3487
  Button7,
3506
3488
  {
3507
- icon: copiedId === link.id ? /* @__PURE__ */ jsx14(Check2, { className: "text-green-500" }) : /* @__PURE__ */ jsx14(Copy, {}),
3489
+ icon: copiedId === link.id ? /* @__PURE__ */ jsx13(Check2, { className: "text-green-500" }) : /* @__PURE__ */ jsx13(Copy, {}),
3508
3490
  variant: "quiet",
3509
3491
  className: "flex-shrink-0",
3510
3492
  onClick: () => copyLink(link),
@@ -3513,10 +3495,10 @@ function ShareLinkPanel({
3513
3495
  "aria-label": "Copy share link"
3514
3496
  }
3515
3497
  ),
3516
- /* @__PURE__ */ jsx14(
3498
+ /* @__PURE__ */ jsx13(
3517
3499
  Button7,
3518
3500
  {
3519
- icon: refreshing ? /* @__PURE__ */ jsx14(Loader27, { className: "animate-spin" }) : /* @__PURE__ */ jsx14(MessageSquareText, {}),
3501
+ icon: refreshing ? /* @__PURE__ */ jsx13(Loader27, { className: "animate-spin" }) : /* @__PURE__ */ jsx13(MessageSquareText, {}),
3520
3502
  variant: "quiet",
3521
3503
  className: "flex-shrink-0",
3522
3504
  onClick: () => prepareTextShare(link.id),
@@ -3525,10 +3507,10 @@ function ShareLinkPanel({
3525
3507
  "aria-label": "Share by text"
3526
3508
  }
3527
3509
  ),
3528
- /* @__PURE__ */ jsx14(
3510
+ /* @__PURE__ */ jsx13(
3529
3511
  Button7,
3530
3512
  {
3531
- icon: /* @__PURE__ */ jsx14(Trash22, {}),
3513
+ icon: /* @__PURE__ */ jsx13(Trash22, {}),
3532
3514
  removes: true,
3533
3515
  variant: "quiet",
3534
3516
  className: "flex-shrink-0",
@@ -3546,11 +3528,11 @@ function ShareLinkPanel({
3546
3528
  role: "alert",
3547
3529
  className: "flex items-center justify-between gap-2 text-xs text-destructive",
3548
3530
  children: [
3549
- /* @__PURE__ */ jsx14("span", { children: shareError }),
3550
- /* @__PURE__ */ jsx14(
3531
+ /* @__PURE__ */ jsx13("span", { children: shareError }),
3532
+ /* @__PURE__ */ jsx13(
3551
3533
  Button7,
3552
3534
  {
3553
- icon: /* @__PURE__ */ jsx14(RefreshCw, {}),
3535
+ icon: /* @__PURE__ */ jsx13(RefreshCw, {}),
3554
3536
  type: "button",
3555
3537
  variant: "outline",
3556
3538
  disabled: isLoading,
@@ -3558,12 +3540,12 @@ function ShareLinkPanel({
3558
3540
  children: "Refresh"
3559
3541
  }
3560
3542
  ),
3561
- /* @__PURE__ */ jsx14(ShareErrorAlchemyMenu, { className: "ml-auto" })
3543
+ /* @__PURE__ */ jsx13(ShareErrorAlchemyMenu, { className: "ml-auto" })
3562
3544
  ]
3563
3545
  }
3564
3546
  ) : null,
3565
- refreshing && !loading ? /* @__PURE__ */ jsx14("span", { className: "sr-only", role: "status", children: "Checking current link access" }) : null,
3566
- /* @__PURE__ */ jsx14(
3547
+ refreshing && !loading ? /* @__PURE__ */ jsx13("span", { className: "sr-only", role: "status", children: "Checking current link access" }) : null,
3548
+ /* @__PURE__ */ jsx13(
3567
3549
  PortalConfirmDialog,
3568
3550
  {
3569
3551
  open: shareTarget !== null,
@@ -3573,26 +3555,26 @@ function ShareLinkPanel({
3573
3555
  content: shareTarget ? /* @__PURE__ */ jsxs10("div", { className: "space-y-3 text-sm", children: [
3574
3556
  /* @__PURE__ */ jsxs10("dl", { className: "space-y-1.5 text-xs", children: [
3575
3557
  /* @__PURE__ */ jsxs10("div", { className: "flex justify-between gap-3", children: [
3576
- /* @__PURE__ */ jsx14("dt", { className: "text-muted-foreground", children: "Access" }),
3577
- /* @__PURE__ */ jsx14("dd", { className: "text-right", children: describeShareLinkAccess(shareTarget.permissionLevel) })
3558
+ /* @__PURE__ */ jsx13("dt", { className: "text-muted-foreground", children: "Access" }),
3559
+ /* @__PURE__ */ jsx13("dd", { className: "text-right", children: describeShareLinkAccess(shareTarget.permissionLevel) })
3578
3560
  ] }),
3579
3561
  /* @__PURE__ */ jsxs10("div", { className: "flex justify-between gap-3", children: [
3580
- /* @__PURE__ */ jsx14("dt", { className: "text-muted-foreground", children: "Expiry" }),
3581
- /* @__PURE__ */ jsx14("dd", { className: "text-right", children: describeShareLinkExpiry(shareTarget.expiresAt) })
3562
+ /* @__PURE__ */ jsx13("dt", { className: "text-muted-foreground", children: "Expiry" }),
3563
+ /* @__PURE__ */ jsx13("dd", { className: "text-right", children: describeShareLinkExpiry(shareTarget.expiresAt) })
3582
3564
  ] }),
3583
3565
  /* @__PURE__ */ jsxs10("div", { className: "flex justify-between gap-3", children: [
3584
- /* @__PURE__ */ jsx14("dt", { className: "text-muted-foreground", children: "Views" }),
3585
- /* @__PURE__ */ jsx14("dd", { className: "text-right", children: shareTarget.maxUses === null ? `${shareTarget.useCount} used \xB7 no limit` : `${shareTarget.useCount} of ${shareTarget.maxUses} used` })
3566
+ /* @__PURE__ */ jsx13("dt", { className: "text-muted-foreground", children: "Views" }),
3567
+ /* @__PURE__ */ jsx13("dd", { className: "text-right", children: shareTarget.maxUses === null ? `${shareTarget.useCount} used \xB7 no limit` : `${shareTarget.useCount} of ${shareTarget.maxUses} used` })
3586
3568
  ] })
3587
3569
  ] }),
3588
3570
  /* @__PURE__ */ jsxs10("div", { className: "space-y-1", children: [
3589
- /* @__PURE__ */ jsx14("p", { className: "text-xs font-medium", children: "Message preview" }),
3590
- /* @__PURE__ */ jsx14("p", { className: "rounded-md border bg-muted/30 p-3 break-words", children: createSafeShareMessage(urlFor(shareTarget)) })
3571
+ /* @__PURE__ */ jsx13("p", { className: "text-xs font-medium", children: "Message preview" }),
3572
+ /* @__PURE__ */ jsx13("p", { className: "rounded-md border bg-muted/30 p-3 break-words", children: createSafeShareMessage(urlFor(shareTarget)) })
3591
3573
  ] }),
3592
- /* @__PURE__ */ jsx14(
3574
+ /* @__PURE__ */ jsx13(
3593
3575
  Button7,
3594
3576
  {
3595
- icon: /* @__PURE__ */ jsx14(Copy, {}),
3577
+ icon: /* @__PURE__ */ jsx13(Copy, {}),
3596
3578
  type: "button",
3597
3579
  variant: "outline",
3598
3580
  className: "w-full",
@@ -3601,7 +3583,7 @@ function ShareLinkPanel({
3601
3583
  children: "Copy message"
3602
3584
  }
3603
3585
  ),
3604
- /* @__PURE__ */ jsx14("p", { className: "text-xs text-muted-foreground", children: "You can turn this link off from the share panel at any time." })
3586
+ /* @__PURE__ */ jsx13("p", { className: "text-xs text-muted-foreground", children: "You can turn this link off from the share panel at any time." })
3605
3587
  ] }) : null,
3606
3588
  confirmLabel: typeof navigator !== "undefined" && typeof navigator.share === "function" ? "Open share options" : "Copy message",
3607
3589
  cancelLabel: "Not now",
@@ -3610,7 +3592,7 @@ function ShareLinkPanel({
3610
3592
  onConfirm: handleNativeHandoff
3611
3593
  }
3612
3594
  ),
3613
- /* @__PURE__ */ jsx14(
3595
+ /* @__PURE__ */ jsx13(
3614
3596
  PortalConfirmDialog,
3615
3597
  {
3616
3598
  open: !!revokeTarget,
@@ -3621,8 +3603,7 @@ function ShareLinkPanel({
3621
3603
  variant: "destructive",
3622
3604
  onConfirm: handleRevoke
3623
3605
  }
3624
- ),
3625
- fallbackDialog
3606
+ )
3626
3607
  ] });
3627
3608
  }
3628
3609
 
@@ -3631,7 +3612,7 @@ import { Skeleton } from "@ai-matrx/design-system";
3631
3612
  import { extractErrorMessage as extractErrorMessage2 } from "@ai-matrx/sharing/core";
3632
3613
  import { getShareCapabilities } from "@ai-matrx/sharing/core";
3633
3614
  import { sharingLocation as sharingLocation4 } from "@ai-matrx/sharing/core";
3634
- import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
3615
+ import { jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
3635
3616
  function anyoneReachWords(typeLabel, reach) {
3636
3617
  if (reach.publicPage) return `Anyone, signed in or not, opens this ${typeLabel} at its address as a viewer.`;
3637
3618
  return `Everyone signed in to AI Matrx can find and view this ${typeLabel}.` + (reach.noLoginLink ? " People without an account need a no-login link." : " People without an account cannot open it.");
@@ -3662,13 +3643,13 @@ function PublicAccessTab({
3662
3643
  };
3663
3644
  }, [resourceType]);
3664
3645
  const location = sharingLocation4(copy?.surface ?? "Anyone link");
3665
- if (loading) return /* @__PURE__ */ jsx15(Skeleton, { className: "h-20 w-full" });
3646
+ if (loading) return /* @__PURE__ */ jsx14(Skeleton, { className: "h-20 w-full" });
3666
3647
  if (capabilitiesError) {
3667
3648
  return /* @__PURE__ */ jsxs11(Alert, { variant: "destructive", className: "group", children: [
3668
- /* @__PURE__ */ jsx15(AlertTriangle3, { className: "h-4 w-4" }),
3649
+ /* @__PURE__ */ jsx14(AlertTriangle3, { className: "h-4 w-4" }),
3669
3650
  /* @__PURE__ */ jsxs11(AlertDescription, { className: "flex items-start gap-2", children: [
3670
- /* @__PURE__ */ jsx15("span", { className: "flex-1", children: capabilitiesError }),
3671
- /* @__PURE__ */ jsx15("span", { className: "shrink-0 opacity-0 transition-opacity focus-within:opacity-100 group-hover:opacity-100", children: /* @__PURE__ */ jsx15(
3651
+ /* @__PURE__ */ jsx14("span", { className: "flex-1", children: capabilitiesError }),
3652
+ /* @__PURE__ */ jsx14("span", { className: "shrink-0 opacity-0 transition-opacity focus-within:opacity-100 group-hover:opacity-100", children: /* @__PURE__ */ jsx14(
3672
3653
  CopyButtons,
3673
3654
  {
3674
3655
  size: "xs",
@@ -3701,7 +3682,7 @@ function PublicAccessTab({
3701
3682
  ] })
3702
3683
  ] });
3703
3684
  }
3704
- return /* @__PURE__ */ jsx15("div", { className: "space-y-3", children: /* @__PURE__ */ jsx15(
3685
+ return /* @__PURE__ */ jsx14("div", { className: "space-y-3", children: /* @__PURE__ */ jsx14(
3705
3686
  ShareLinkPanel,
3706
3687
  {
3707
3688
  resourceType,
@@ -3719,7 +3700,7 @@ import { SHOWN_TO_ORDER, SHOWN_TO_WORDS } from "@ai-matrx/sharing/core";
3719
3700
  import { useCallback as useCallback6, useEffect as useEffect10, useState as useState12 } from "react";
3720
3701
  import { cn as cn3 } from "@ai-matrx/design-system/cn";
3721
3702
  import { getSearchEngineIndexedState, setSearchEngineIndexed } from "@ai-matrx/sharing/core";
3722
- import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
3703
+ import { jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
3723
3704
  function SearchEngineIndexedSwitch({
3724
3705
  resourceType,
3725
3706
  resourceId,
@@ -3768,8 +3749,8 @@ function SearchEngineIndexedSwitch({
3768
3749
  className: cn3("inline-flex shrink-0 items-center gap-1.5", className),
3769
3750
  title: followsDefault ? `Following the default for this type (${state2.type_default ? "indexed" : "not indexed"}).` : "Set for this item.",
3770
3751
  children: [
3771
- /* @__PURE__ */ jsx16("label", { htmlFor: id, className: "cursor-pointer text-xs text-muted-foreground", children: "Indexed by search engines" }),
3772
- /* @__PURE__ */ jsx16(
3752
+ /* @__PURE__ */ jsx15("label", { htmlFor: id, className: "cursor-pointer text-xs text-muted-foreground", children: "Indexed by search engines" }),
3753
+ /* @__PURE__ */ jsx15(
3773
3754
  Switch,
3774
3755
  {
3775
3756
  id,
@@ -3785,7 +3766,7 @@ function SearchEngineIndexedSwitch({
3785
3766
  }
3786
3767
 
3787
3768
  // src/react/sheet/RowControls.tsx
3788
- import { jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
3769
+ import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
3789
3770
  var SAYS_SLOT_KEYS = [...SHOWN_TO_ORDER, "default"];
3790
3771
  function RowControls({
3791
3772
  resourceType,
@@ -3826,12 +3807,12 @@ function RowControls({
3826
3807
  return /* @__PURE__ */ jsxs13("p", { className: "rounded-lg border border-destructive/20 bg-destructive/10 p-3 text-xs text-destructive-ink", children: [
3827
3808
  "Couldn't read this item's sharing options: ",
3828
3809
  capsError,
3829
- /* @__PURE__ */ jsx17(ShareErrorAlchemyMenu, { error: capsError })
3810
+ /* @__PURE__ */ jsx16(ShareErrorAlchemyMenu, { error: capsError })
3830
3811
  ] });
3831
3812
  }
3832
3813
  if (childRecord) return null;
3833
3814
  if (!caps) {
3834
- return /* @__PURE__ */ jsx17("section", { "aria-hidden": "true", className: "invisible space-y-2 rounded-lg border p-3", "data-row-controls-reserved": "", children: /* @__PURE__ */ jsx17("div", { className: "flex h-8 items-center" }) });
3815
+ return /* @__PURE__ */ jsx16("section", { "aria-hidden": "true", className: "invisible space-y-2 rounded-lg border p-3", "data-row-controls-reserved": "", children: /* @__PURE__ */ jsx16("div", { className: "flex h-8 items-center" }) });
3835
3816
  }
3836
3817
  const showShownTo = caps.shownToOffered && shownTo !== void 0;
3837
3818
  const showPublish = publishable && caps.publishLane !== null;
@@ -3889,8 +3870,8 @@ function RowControls({
3889
3870
  "data-published": isPublic ? "true" : "false",
3890
3871
  children: [
3891
3872
  showShownTo && /* @__PURE__ */ jsxs13("div", { className: "flex flex-wrap items-center justify-between gap-2", "data-shown-to": shownTo ?? "default", children: [
3892
- /* @__PURE__ */ jsx17("span", { className: "text-xs font-medium", children: "Shown to" }),
3893
- canChange ? /* @__PURE__ */ jsx17(
3873
+ /* @__PURE__ */ jsx16("span", { className: "text-xs font-medium", children: "Shown to" }),
3874
+ canChange ? /* @__PURE__ */ jsx16(
3894
3875
  ToggleGroup,
3895
3876
  {
3896
3877
  type: "single",
@@ -3900,7 +3881,7 @@ function RowControls({
3900
3881
  onValueChange: (v) => v && void chooseShownTo(v),
3901
3882
  "aria-label": "Shown to",
3902
3883
  className: "flex-wrap justify-end",
3903
- children: shownChoices.map((v) => /* @__PURE__ */ jsx17(
3884
+ children: shownChoices.map((v) => /* @__PURE__ */ jsx16(
3904
3885
  ToggleGroupItem,
3905
3886
  {
3906
3887
  value: v,
@@ -3912,14 +3893,14 @@ function RowControls({
3912
3893
  v
3913
3894
  ))
3914
3895
  }
3915
- ) : /* @__PURE__ */ jsx17("span", { className: "text-xs text-muted-foreground", children: shownTo ? SHOWN_TO_WORDS[shownTo].label : "The default for this type" })
3896
+ ) : /* @__PURE__ */ jsx16("span", { className: "text-xs text-muted-foreground", children: shownTo ? SHOWN_TO_WORDS[shownTo].label : "The default for this type" })
3916
3897
  ] }),
3917
3898
  showShownTo && // ZERO LAYOUT SHIFT (Arman 2026-10-07): the sentence under "Shown to" changes with every
3918
3899
  // choice and each one wraps to a different number of lines on a phone. The slot is a
3919
3900
  // one-cell grid holding EVERY sentence, only the current one visible, so its height is the
3920
3901
  // tallest one's at any width and nothing below it ever moves. The spinner's place is held
3921
3902
  // too (invisible, never removed).
3922
- /* @__PURE__ */ jsx17("div", { className: "grid text-xs text-muted-foreground", "data-shown-to-says-slot": "", children: SAYS_SLOT_KEYS.map((v) => {
3903
+ /* @__PURE__ */ jsx16("div", { className: "grid text-xs text-muted-foreground", "data-shown-to-says-slot": "", children: SAYS_SLOT_KEYS.map((v) => {
3923
3904
  const current = (shownTo ?? "default") === v;
3924
3905
  return /* @__PURE__ */ jsxs13(
3925
3906
  "p",
@@ -3931,7 +3912,7 @@ function RowControls({
3931
3912
  v === "default" ? "Not set \u2014 the default for this type applies." : SHOWN_TO_WORDS[v].says,
3932
3913
  " ",
3933
3914
  "A list setting, never who may open it.",
3934
- /* @__PURE__ */ jsx17(
3915
+ /* @__PURE__ */ jsx16(
3935
3916
  Loader28,
3936
3917
  {
3937
3918
  className: cn4(
@@ -3947,9 +3928,9 @@ function RowControls({
3947
3928
  }) }),
3948
3929
  showPublish && /* @__PURE__ */ jsxs13("div", { className: cn4("space-y-1.5", showShownTo && "border-t pt-2"), children: [
3949
3930
  /* @__PURE__ */ jsxs13("div", { className: "flex items-center justify-between gap-2", children: [
3950
- /* @__PURE__ */ jsx17("span", { className: "text-xs font-medium", children: "Published to the web" }),
3931
+ /* @__PURE__ */ jsx16("span", { className: "text-xs font-medium", children: "Published to the web" }),
3951
3932
  /* @__PURE__ */ jsxs13("span", { className: "flex items-center gap-3", children: [
3952
- /* @__PURE__ */ jsx17(
3933
+ /* @__PURE__ */ jsx16(
3953
3934
  SearchEngineIndexedSwitch,
3954
3935
  {
3955
3936
  resourceType,
@@ -3957,8 +3938,8 @@ function RowControls({
3957
3938
  publishedHint: isPublic
3958
3939
  }
3959
3940
  ),
3960
- busy === "publish" && /* @__PURE__ */ jsx17(Loader28, { className: "h-3.5 w-3.5 animate-spin text-muted-foreground" }),
3961
- canChange ? /* @__PURE__ */ jsx17(
3941
+ busy === "publish" && /* @__PURE__ */ jsx16(Loader28, { className: "h-3.5 w-3.5 animate-spin text-muted-foreground" }),
3942
+ canChange ? /* @__PURE__ */ jsx16(
3962
3943
  Switch,
3963
3944
  {
3964
3945
  checked: isPublic,
@@ -3966,16 +3947,16 @@ function RowControls({
3966
3947
  disabled: busy === "publish",
3967
3948
  "aria-label": "Published to the web"
3968
3949
  }
3969
- ) : /* @__PURE__ */ jsx17("span", { className: "text-xs text-muted-foreground", children: isPublic ? "On" : "Off" })
3950
+ ) : /* @__PURE__ */ jsx16("span", { className: "text-xs text-muted-foreground", children: isPublic ? "On" : "Off" })
3970
3951
  ] })
3971
3952
  ] }),
3972
- /* @__PURE__ */ jsx17("p", { className: "text-xs text-muted-foreground", children: isPublic ? publishSays : `When on: ${publishSays}` }),
3953
+ /* @__PURE__ */ jsx16("p", { className: "text-xs text-muted-foreground", children: isPublic ? publishSays : `When on: ${publishSays}` }),
3973
3954
  isPublic && publicUrl && /* @__PURE__ */ jsxs13("div", { className: "flex items-center gap-1.5 rounded-md border bg-background p-1.5", children: [
3974
- /* @__PURE__ */ jsx17("span", { className: "min-w-0 flex-1 truncate px-1 font-mono text-xs", children: publicUrl }),
3975
- /* @__PURE__ */ jsx17(
3955
+ /* @__PURE__ */ jsx16("span", { className: "min-w-0 flex-1 truncate px-1 font-mono text-xs", children: publicUrl }),
3956
+ /* @__PURE__ */ jsx16(
3976
3957
  Button8,
3977
3958
  {
3978
- icon: copied ? /* @__PURE__ */ jsx17(Check3, {}) : /* @__PURE__ */ jsx17(Copy2, {}),
3959
+ icon: copied ? /* @__PURE__ */ jsx16(Check3, {}) : /* @__PURE__ */ jsx16(Copy2, {}),
3979
3960
  "aria-label": "Copy web address",
3980
3961
  variant: "quiet",
3981
3962
  className: "flex-shrink-0",
@@ -3991,7 +3972,7 @@ function RowControls({
3991
3972
  }
3992
3973
 
3993
3974
  // src/react/sheet/WhoCanSeeThis.tsx
3994
- import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
3975
+ import { jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
3995
3976
  var LEVEL_WORD = {
3996
3977
  viewer: "Viewer",
3997
3978
  commenter: "Commenter",
@@ -4008,7 +3989,7 @@ function WhoCanSeeThis({
4008
3989
  const { orgs } = useNavTree();
4009
3990
  const [pending, setPending] = useState14(null);
4010
3991
  const [said, setSaid] = useState14(null);
4011
- if (!whoCanSee) return row ? /* @__PURE__ */ jsx18(RowControls, { ...row, canChange }) : null;
3992
+ if (!whoCanSee) return row ? /* @__PURE__ */ jsx17(RowControls, { ...row, canChange }) : null;
4012
3993
  const orgName = whoCanSee.organizationName ?? (whoCanSee.organizationId ? orgs.find((o) => o.id === whoCanSee.organizationId)?.name : void 0) ?? "this organization";
4013
3994
  const level = whoCanSee.memberDefaultLevel ? LEVEL_WORD[whoCanSee.memberDefaultLevel] ?? whoCanSee.memberDefaultLevel : null;
4014
3995
  const options = [
@@ -4058,8 +4039,8 @@ function WhoCanSeeThis({
4058
4039
  "data-who-can-see": true,
4059
4040
  "data-lane": whoCanSee.choice,
4060
4041
  children: [
4061
- /* @__PURE__ */ jsx18("p", { className: "text-xs font-medium", children: "Who can see this" }),
4062
- canChange ? /* @__PURE__ */ jsx18(
4042
+ /* @__PURE__ */ jsx17("p", { className: "text-xs font-medium", children: "Who can see this" }),
4043
+ canChange ? /* @__PURE__ */ jsx17(
4063
4044
  "div",
4064
4045
  {
4065
4046
  role: "radiogroup",
@@ -4083,7 +4064,7 @@ function WhoCanSeeThis({
4083
4064
  selected ? "border-primary bg-background" : "border-transparent hover:bg-background/60"
4084
4065
  ),
4085
4066
  children: [
4086
- pending === o.choice ? /* @__PURE__ */ jsx18(Loader29, { className: "mt-0.5 h-4 w-4 flex-shrink-0 animate-spin text-primary" }) : /* @__PURE__ */ jsx18(
4067
+ pending === o.choice ? /* @__PURE__ */ jsx17(Loader29, { className: "mt-0.5 h-4 w-4 flex-shrink-0 animate-spin text-primary" }) : /* @__PURE__ */ jsx17(
4087
4068
  Icon,
4088
4069
  {
4089
4070
  className: cn5(
@@ -4094,15 +4075,15 @@ function WhoCanSeeThis({
4094
4075
  ),
4095
4076
  /* @__PURE__ */ jsxs14("span", { className: "min-w-0 flex-1", children: [
4096
4077
  /* @__PURE__ */ jsxs14("span", { className: "flex items-center gap-1 text-sm font-medium", children: [
4097
- /* @__PURE__ */ jsx18("span", { className: "min-w-0 break-words", children: o.label }),
4098
- selected && /* @__PURE__ */ jsx18(Check4, { className: "h-3.5 w-3.5 flex-shrink-0 text-primary" })
4078
+ /* @__PURE__ */ jsx17("span", { className: "min-w-0 break-words", children: o.label }),
4079
+ selected && /* @__PURE__ */ jsx17(Check4, { className: "h-3.5 w-3.5 flex-shrink-0 text-primary" })
4099
4080
  ] }),
4100
- /* @__PURE__ */ jsx18("span", { className: "block text-xs text-muted-foreground", children: o.says })
4081
+ /* @__PURE__ */ jsx17("span", { className: "block text-xs text-muted-foreground", children: o.says })
4101
4082
  ] })
4102
4083
  ]
4103
4084
  }
4104
4085
  ),
4105
- o.hint && /* @__PURE__ */ jsx18(
4086
+ o.hint && /* @__PURE__ */ jsx17(
4106
4087
  InfoHint,
4107
4088
  {
4108
4089
  text: o.hint,
@@ -4119,10 +4100,10 @@ function WhoCanSeeThis({
4119
4100
  "."
4120
4101
  ] }),
4121
4102
  " ",
4122
- /* @__PURE__ */ jsx18("span", { className: "text-xs text-muted-foreground", children: current.says }),
4123
- current.hint && /* @__PURE__ */ jsx18(InfoHint, { text: current.hint, label: `About ${current.label}` })
4103
+ /* @__PURE__ */ jsx17("span", { className: "text-xs text-muted-foreground", children: current.says }),
4104
+ current.hint && /* @__PURE__ */ jsx17(InfoHint, { text: current.hint, label: `About ${current.label}` })
4124
4105
  ] }),
4125
- said && /* @__PURE__ */ jsx18(
4106
+ said && /* @__PURE__ */ jsx17(
4126
4107
  "p",
4127
4108
  {
4128
4109
  className: cn5(
@@ -4156,7 +4137,7 @@ import {
4156
4137
  sendSecureDelivery
4157
4138
  } from "@ai-matrx/sharing/core";
4158
4139
  import { formatDurationMinutes } from "@ai-matrx/kit/format";
4159
- import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
4140
+ import { jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
4160
4141
  var STATUS_WORDS = {
4161
4142
  pending: "Waiting to be opened",
4162
4143
  viewed: "Opened",
@@ -4171,7 +4152,7 @@ function when(iso) {
4171
4152
  return Number.isNaN(d.getTime()) ? "" : d.toLocaleString(void 0, { dateStyle: "medium", timeStyle: "short" });
4172
4153
  }
4173
4154
  function SecureLinkPanel(props) {
4174
- return /* @__PURE__ */ jsx19(IdentityGate, { identity: vaultIdentity(), children: /* @__PURE__ */ jsx19(SecureLinkForm, { ...props }) });
4155
+ return /* @__PURE__ */ jsx18(IdentityGate, { identity: vaultIdentity(), children: /* @__PURE__ */ jsx18(SecureLinkForm, { ...props }) });
4175
4156
  }
4176
4157
  function SecureLinkForm({ resourceType, resourceId, resourceName }) {
4177
4158
  const dispatch = useAppDispatch();
@@ -4286,7 +4267,7 @@ function SecureLinkForm({ resourceType, resourceId, resourceName }) {
4286
4267
  const protectedFields = options?.protected_fields ?? [];
4287
4268
  return /* @__PURE__ */ jsxs15("div", { className: "space-y-4", children: [
4288
4269
  /* @__PURE__ */ jsxs15("div", { className: "flex items-start gap-2 rounded-lg border border-border bg-muted/30 p-3", children: [
4289
- /* @__PURE__ */ jsx19(ShieldCheck, { className: "mt-0.5 h-4 w-4 flex-shrink-0 text-primary" }),
4270
+ /* @__PURE__ */ jsx18(ShieldCheck, { className: "mt-0.5 h-4 w-4 flex-shrink-0 text-primary" }),
4290
4271
  /* @__PURE__ */ jsxs15("p", { className: "text-xs text-muted-foreground", children: [
4291
4272
  "They get a link that opens once, and a code on a separate channel. No account needed.",
4292
4273
  options ? ` The link works for ${formatDurationMinutes(options.link_ttl_minutes, { style: "long" })}.` : ""
@@ -4294,8 +4275,8 @@ function SecureLinkForm({ resourceType, resourceId, resourceName }) {
4294
4275
  ] }),
4295
4276
  /* @__PURE__ */ jsxs15("div", { className: "grid gap-3 sm:grid-cols-2", children: [
4296
4277
  /* @__PURE__ */ jsxs15("div", { className: "space-y-1", children: [
4297
- /* @__PURE__ */ jsx19(Label4, { htmlFor: "secure-email", className: "text-xs", children: "Their email" }),
4298
- /* @__PURE__ */ jsx19(
4278
+ /* @__PURE__ */ jsx18(Label4, { htmlFor: "secure-email", className: "text-xs", children: "Their email" }),
4279
+ /* @__PURE__ */ jsx18(
4299
4280
  Input4,
4300
4281
  {
4301
4282
  id: "secure-email",
@@ -4308,8 +4289,8 @@ function SecureLinkForm({ resourceType, resourceId, resourceName }) {
4308
4289
  )
4309
4290
  ] }),
4310
4291
  /* @__PURE__ */ jsxs15("div", { className: "space-y-1", children: [
4311
- /* @__PURE__ */ jsx19(Label4, { htmlFor: "secure-phone", className: "text-xs", children: "Their mobile, for the code" }),
4312
- /* @__PURE__ */ jsx19(
4292
+ /* @__PURE__ */ jsx18(Label4, { htmlFor: "secure-phone", className: "text-xs", children: "Their mobile, for the code" }),
4293
+ /* @__PURE__ */ jsx18(
4313
4294
  Input4,
4314
4295
  {
4315
4296
  id: "secure-phone",
@@ -4327,7 +4308,7 @@ function SecureLinkForm({ resourceType, resourceId, resourceName }) {
4327
4308
  ] })
4328
4309
  ] }),
4329
4310
  hasBoth ? /* @__PURE__ */ jsxs15("div", { className: "flex flex-wrap items-center gap-2 text-xs text-muted-foreground", children: [
4330
- /* @__PURE__ */ jsx19("span", { children: "Send the link by" }),
4311
+ /* @__PURE__ */ jsx18("span", { children: "Send the link by" }),
4331
4312
  /* @__PURE__ */ jsxs15(
4332
4313
  ToggleGroup,
4333
4314
  {
@@ -4338,11 +4319,11 @@ function SecureLinkForm({ resourceType, resourceId, resourceName }) {
4338
4319
  onValueChange: (v) => v && setLinkChannel(v),
4339
4320
  children: [
4340
4321
  /* @__PURE__ */ jsxs15(ToggleGroupItem, { value: "email", "aria-label": "Link by email", children: [
4341
- /* @__PURE__ */ jsx19(Mail3, { className: "mr-1 h-3.5 w-3.5" }),
4322
+ /* @__PURE__ */ jsx18(Mail3, { className: "mr-1 h-3.5 w-3.5" }),
4342
4323
  " Email"
4343
4324
  ] }),
4344
4325
  /* @__PURE__ */ jsxs15(ToggleGroupItem, { value: "sms", "aria-label": "Link by text", children: [
4345
- /* @__PURE__ */ jsx19(MessageSquare3, { className: "mr-1 h-3.5 w-3.5" }),
4326
+ /* @__PURE__ */ jsx18(MessageSquare3, { className: "mr-1 h-3.5 w-3.5" }),
4346
4327
  " Text"
4347
4328
  ] })
4348
4329
  ]
@@ -4353,10 +4334,10 @@ function SecureLinkForm({ resourceType, resourceId, resourceName }) {
4353
4334
  linkChannel === "email" ? "text" : "email",
4354
4335
  "."
4355
4336
  ] })
4356
- ] }) : email.trim() !== "" ? /* @__PURE__ */ jsx19("p", { className: "text-xs text-amber-700 dark:text-amber-400", children: "Without a mobile number, the link and the code both go by email \u2014 anyone who can read that inbox could open it." }) : null,
4337
+ ] }) : email.trim() !== "" ? /* @__PURE__ */ jsx18("p", { className: "text-xs text-amber-700 dark:text-amber-400", children: "Without a mobile number, the link and the code both go by email \u2014 anyone who can read that inbox could open it." }) : null,
4357
4338
  optionsError ? /* @__PURE__ */ jsxs15("p", { className: "text-xs text-destructive", children: [
4358
4339
  optionsError,
4359
- /* @__PURE__ */ jsx19(ShareErrorAlchemyMenu, { error: optionsError, operation: "Load the secure-link options" })
4340
+ /* @__PURE__ */ jsx18(ShareErrorAlchemyMenu, { error: optionsError, operation: "Load the secure-link options" })
4360
4341
  ] }) : null,
4361
4342
  protectedFields.length > 0 ? /* @__PURE__ */ jsxs15("fieldset", { className: "space-y-2", children: [
4362
4343
  /* @__PURE__ */ jsxs15("legend", { className: "text-xs font-medium", children: [
@@ -4364,7 +4345,7 @@ function SecureLinkForm({ resourceType, resourceId, resourceName }) {
4364
4345
  resourceName
4365
4346
  ] }),
4366
4347
  protectedFields.map((f) => /* @__PURE__ */ jsxs15("div", { className: "flex items-start gap-2", children: [
4367
- /* @__PURE__ */ jsx19(
4348
+ /* @__PURE__ */ jsx18(
4368
4349
  Checkbox2,
4369
4350
  {
4370
4351
  size: "sm",
@@ -4377,14 +4358,14 @@ function SecureLinkForm({ resourceType, resourceId, resourceName }) {
4377
4358
  }
4378
4359
  ),
4379
4360
  /* @__PURE__ */ jsxs15("div", { children: [
4380
- /* @__PURE__ */ jsx19(Label4, { htmlFor: `secure-field-${f.key}`, className: "text-sm", children: f.label }),
4381
- !f.available && f.reason ? /* @__PURE__ */ jsx19("p", { className: "text-xs text-muted-foreground", children: f.reason }) : null
4361
+ /* @__PURE__ */ jsx18(Label4, { htmlFor: `secure-field-${f.key}`, className: "text-sm", children: f.label }),
4362
+ !f.available && f.reason ? /* @__PURE__ */ jsx18("p", { className: "text-xs text-muted-foreground", children: f.reason }) : null
4382
4363
  ] })
4383
4364
  ] }, f.key))
4384
4365
  ] }) : null,
4385
4366
  /* @__PURE__ */ jsxs15("div", { className: "space-y-1", children: [
4386
- /* @__PURE__ */ jsx19(Label4, { htmlFor: "secure-note", className: "text-xs", children: "Message (optional, shown once with it)" }),
4387
- /* @__PURE__ */ jsx19(
4367
+ /* @__PURE__ */ jsx18(Label4, { htmlFor: "secure-note", className: "text-xs", children: "Message (optional, shown once with it)" }),
4368
+ /* @__PURE__ */ jsx18(
4388
4369
  Textarea,
4389
4370
  {
4390
4371
  id: "secure-note",
@@ -4395,22 +4376,22 @@ function SecureLinkForm({ resourceType, resourceId, resourceName }) {
4395
4376
  }
4396
4377
  )
4397
4378
  ] }),
4398
- /* @__PURE__ */ jsx19(Button9, { icon: sending ? /* @__PURE__ */ jsx19(Loader210, { className: "animate-spin" }) : null, variant: "primary", className: "w-full", onClick: send, disabled: !canSend, children: "Send secure link" }),
4379
+ /* @__PURE__ */ jsx18(Button9, { icon: sending ? /* @__PURE__ */ jsx18(Loader210, { className: "animate-spin" }) : null, variant: "primary", className: "w-full", onClick: send, disabled: !canSend, children: "Send secure link" }),
4399
4380
  result ? /* @__PURE__ */ jsxs15(
4400
4381
  "div",
4401
4382
  {
4402
4383
  className: result.tone === "error" ? "rounded-md border border-destructive/30 bg-destructive/10 p-2.5 text-sm text-destructive-ink" : result.tone === "warn" ? "rounded-md border border-amber-500/30 bg-amber-500/10 p-2.5 text-sm" : "rounded-md border border-border bg-muted/40 p-2.5 text-sm",
4403
4384
  children: [
4404
- /* @__PURE__ */ jsx19("p", { children: result.text }),
4405
- result.remedy ? /* @__PURE__ */ jsx19("p", { className: "mt-1 text-xs opacity-80", children: result.remedy }) : null
4385
+ /* @__PURE__ */ jsx18("p", { children: result.text }),
4386
+ result.remedy ? /* @__PURE__ */ jsx18("p", { className: "mt-1 text-xs opacity-80", children: result.remedy }) : null
4406
4387
  ]
4407
4388
  }
4408
4389
  ) : null,
4409
4390
  sent && sent.length > 0 ? /* @__PURE__ */ jsxs15("div", { children: [
4410
- /* @__PURE__ */ jsx19("h3", { className: "mb-2 text-sm font-medium", children: "Sent securely" }),
4411
- /* @__PURE__ */ jsx19("ul", { className: "divide-y divide-border rounded-lg border border-border", children: sent.map((row) => /* @__PURE__ */ jsxs15("li", { className: "flex items-center justify-between gap-2 p-2.5 text-sm", children: [
4391
+ /* @__PURE__ */ jsx18("h3", { className: "mb-2 text-sm font-medium", children: "Sent securely" }),
4392
+ /* @__PURE__ */ jsx18("ul", { className: "divide-y divide-border rounded-lg border border-border", children: sent.map((row) => /* @__PURE__ */ jsxs15("li", { className: "flex items-center justify-between gap-2 p-2.5 text-sm", children: [
4412
4393
  /* @__PURE__ */ jsxs15("div", { className: "min-w-0", children: [
4413
- /* @__PURE__ */ jsx19("p", { className: "truncate", children: row.recipient_email ?? row.recipient_phone }),
4394
+ /* @__PURE__ */ jsx18("p", { className: "truncate", children: row.recipient_email ?? row.recipient_phone }),
4414
4395
  /* @__PURE__ */ jsxs15("p", { className: "text-xs text-muted-foreground", children: [
4415
4396
  STATUS_WORDS[row.status] ?? row.status,
4416
4397
  row.status === "viewed" && row.viewed_at ? ` ${when(row.viewed_at)}` : "",
@@ -4418,7 +4399,7 @@ function SecureLinkForm({ resourceType, resourceId, resourceName }) {
4418
4399
  row.field_keys.length > 0 ? ` \xB7 with ${row.field_keys.join(", ")}` : ""
4419
4400
  ] })
4420
4401
  ] }),
4421
- row.status === "pending" ? /* @__PURE__ */ jsx19(Button9, { variant: "outline", onClick: () => void turnOff(row), children: "Turn off" }) : null
4402
+ row.status === "pending" ? /* @__PURE__ */ jsx18(Button9, { variant: "outline", onClick: () => void turnOff(row), children: "Turn off" }) : null
4422
4403
  ] }, row.id)) })
4423
4404
  ] }) : null
4424
4405
  ] });
@@ -4454,7 +4435,7 @@ function useKeepFocusInDialog() {
4454
4435
  }
4455
4436
 
4456
4437
  // src/react/sheet/ShareModal.tsx
4457
- import { jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
4438
+ import { jsx as jsx19, jsxs as jsxs16 } from "react/jsx-runtime";
4458
4439
  function ShareModal({
4459
4440
  levelWording = "roles",
4460
4441
  isOpen,
@@ -4597,7 +4578,7 @@ function ShareModal({
4597
4578
  const publicPermission = permissions.find((p) => p.isPublic);
4598
4579
  const resourceLabel = resourceNoun ?? getResourceTypeLabel(resourceType);
4599
4580
  const manageBlockedNotice = ownerUnknown ? /* @__PURE__ */ jsxs16("div", { className: "p-3 rounded-lg border border-destructive/20 bg-destructive/10 flex items-start gap-2", children: [
4600
- /* @__PURE__ */ jsx20(AlertTriangle4, { className: "h-4 w-4 text-destructive flex-shrink-0 mt-0.5" }),
4581
+ /* @__PURE__ */ jsx19(AlertTriangle4, { className: "h-4 w-4 text-destructive flex-shrink-0 mt-0.5" }),
4601
4582
  /* @__PURE__ */ jsxs16("div", { children: [
4602
4583
  /* @__PURE__ */ jsxs16("p", { className: "text-sm font-medium text-destructive", children: [
4603
4584
  "Couldn't confirm whether you may change sharing on this",
@@ -4607,33 +4588,33 @@ function ShareModal({
4607
4588
  /* @__PURE__ */ jsxs16("p", { className: "text-xs text-destructive/80 mt-0.5", children: [
4608
4589
  ownerError,
4609
4590
  " ",
4610
- /* @__PURE__ */ jsx20(ShareErrorAlchemyMenu, { error: ownerError })
4591
+ /* @__PURE__ */ jsx19(ShareErrorAlchemyMenu, { error: ownerError })
4611
4592
  ] })
4612
4593
  ] })
4613
4594
  ] }) : /* @__PURE__ */ jsxs16("div", { className: "p-3 rounded-lg border bg-muted/30 flex items-start gap-2", children: [
4614
- /* @__PURE__ */ jsx20(Lock3, { className: "h-4 w-4 text-muted-foreground flex-shrink-0 mt-0.5" }),
4595
+ /* @__PURE__ */ jsx19(Lock3, { className: "h-4 w-4 text-muted-foreground flex-shrink-0 mt-0.5" }),
4615
4596
  /* @__PURE__ */ jsxs16("div", { children: [
4616
4597
  /* @__PURE__ */ jsxs16("p", { className: "text-sm font-medium", children: [
4617
4598
  "You need Full access on this ",
4618
4599
  resourceLabel.toLowerCase(),
4619
4600
  " to change who can see it"
4620
4601
  ] }),
4621
- /* @__PURE__ */ jsx20("p", { className: "text-xs text-muted-foreground mt-0.5", children: "Deciding who else may is what Full access means (View < Comment < Edit < Full access). Ask whoever has it, or an owner of the organization. The Access tab still shows you everyone who can reach this and why." })
4602
+ /* @__PURE__ */ jsx19("p", { className: "text-xs text-muted-foreground mt-0.5", children: "Deciding who else may is what Full access means (View < Comment < Edit < Full access). Ask whoever has it, or an owner of the organization. The Access tab still shows you everyone who can reach this and why." })
4622
4603
  ] })
4623
4604
  ] });
4624
4605
  const shareBlockedNotice = grantable.loading ? null : /* @__PURE__ */ jsxs16("div", { className: "p-3 rounded-lg border bg-muted/30 flex items-start gap-2", children: [
4625
- /* @__PURE__ */ jsx20(Lock3, { className: "h-4 w-4 text-muted-foreground flex-shrink-0 mt-0.5" }),
4626
- /* @__PURE__ */ jsx20("p", { className: "text-sm", children: grantable.error ?? grantable.levels.viewer ?? "You need Edit or Full access on this to share it." })
4606
+ /* @__PURE__ */ jsx19(Lock3, { className: "h-4 w-4 text-muted-foreground flex-shrink-0 mt-0.5" }),
4607
+ /* @__PURE__ */ jsx19("p", { className: "text-sm", children: grantable.error ?? grantable.levels.viewer ?? "You need Edit or Full access on this to share it." })
4627
4608
  ] });
4628
- return /* @__PURE__ */ jsx20(Dialog, { open: isOpen, onOpenChange: onClose, children: /* @__PURE__ */ jsxs16(DialogContent, { ref: keepFocusInside, className: "max-w-2xl max-h-[90dvh] flex flex-col", children: [
4629
- /* @__PURE__ */ jsx20(DialogHeader, { className: "flex-shrink-0", children: /* @__PURE__ */ jsxs16("div", { className: "flex items-start justify-between gap-2 pr-10", children: [
4609
+ return /* @__PURE__ */ jsx19(Dialog, { open: isOpen, onOpenChange: onClose, children: /* @__PURE__ */ jsxs16(DialogContent, { ref: keepFocusInside, className: "max-w-2xl max-h-[90dvh] flex flex-col", children: [
4610
+ /* @__PURE__ */ jsx19(DialogHeader, { className: "flex-shrink-0", children: /* @__PURE__ */ jsxs16("div", { className: "flex items-start justify-between gap-2 pr-10", children: [
4630
4611
  /* @__PURE__ */ jsxs16("div", { className: "flex-1 min-w-0", children: [
4631
4612
  /* @__PURE__ */ jsxs16(DialogTitle, { className: "flex items-center gap-1.5", children: [
4632
4613
  "Share ",
4633
4614
  resourceLabel,
4634
- /* @__PURE__ */ jsx20(PageCaptureButton, { size: "xs" })
4615
+ /* @__PURE__ */ jsx19(PageCaptureButton, { size: "xs" })
4635
4616
  ] }),
4636
- /* @__PURE__ */ jsx20(DialogDescription, { asChild: true, children: /* @__PURE__ */ jsx20("div", { className: "text-sm text-muted-foreground", children: /* @__PURE__ */ jsx20(
4617
+ /* @__PURE__ */ jsx19(DialogDescription, { asChild: true, children: /* @__PURE__ */ jsx19("div", { className: "text-sm text-muted-foreground", children: /* @__PURE__ */ jsx19(
4637
4618
  ShareEntityRef,
4638
4619
  {
4639
4620
  token: resourceType,
@@ -4644,30 +4625,30 @@ function ShareModal({
4644
4625
  }
4645
4626
  ) }) })
4646
4627
  ] }),
4647
- /* @__PURE__ */ jsx20(
4628
+ /* @__PURE__ */ jsx19(
4648
4629
  Button10,
4649
4630
  {
4650
- icon: emailingLink ? /* @__PURE__ */ jsx20(Loader211, { className: "animate-spin" }) : emailSent ? /* @__PURE__ */ jsx20(CheckCircle3, { className: "text-green-500" }) : /* @__PURE__ */ jsx20(Mail4, {}),
4631
+ icon: emailingLink ? /* @__PURE__ */ jsx19(Loader211, { className: "animate-spin" }) : emailSent ? /* @__PURE__ */ jsx19(CheckCircle3, { className: "text-green-500" }) : /* @__PURE__ */ jsx19(Mail4, {}),
4651
4632
  variant: "outline",
4652
4633
  onClick: handleEmailLink,
4653
4634
  disabled: emailingLink,
4654
4635
  className: "flex-shrink-0",
4655
- children: /* @__PURE__ */ jsx20("span", { className: "ml-1.5 hidden sm:inline", children: emailSent ? "Sent!" : "Email link" })
4636
+ children: /* @__PURE__ */ jsx19("span", { className: "ml-1.5 hidden sm:inline", children: emailSent ? "Sent!" : "Email link" })
4656
4637
  }
4657
4638
  )
4658
4639
  ] }) }),
4659
4640
  configError && /* @__PURE__ */ jsxs16("div", { className: "flex-1 flex flex-col items-center justify-center gap-2 py-10 px-6 text-center", children: [
4660
- /* @__PURE__ */ jsx20(AlertTriangle4, { className: "h-8 w-8 text-destructive" }),
4661
- /* @__PURE__ */ jsx20("p", { className: "text-sm font-medium", children: "Sharing is unavailable" }),
4641
+ /* @__PURE__ */ jsx19(AlertTriangle4, { className: "h-8 w-8 text-destructive" }),
4642
+ /* @__PURE__ */ jsx19("p", { className: "text-sm font-medium", children: "Sharing is unavailable" }),
4662
4643
  /* @__PURE__ */ jsxs16("p", { className: "text-xs text-muted-foreground max-w-sm", children: [
4663
4644
  configError,
4664
- /* @__PURE__ */ jsx20(ShareErrorAlchemyMenu, { error: configError })
4645
+ /* @__PURE__ */ jsx19(ShareErrorAlchemyMenu, { error: configError })
4665
4646
  ] })
4666
4647
  ] }),
4667
4648
  !configError && resolvingOwner && /* @__PURE__ */ jsxs16("div", { className: "flex-1 space-y-3 py-4", "aria-busy": "true", children: [
4668
- /* @__PURE__ */ jsx20(Skeleton2, { className: "h-9 w-full" }),
4669
- /* @__PURE__ */ jsx20(Skeleton2, { className: "h-24 w-full" }),
4670
- /* @__PURE__ */ jsx20(Skeleton2, { className: "h-32 w-full" })
4649
+ /* @__PURE__ */ jsx19(Skeleton2, { className: "h-9 w-full" }),
4650
+ /* @__PURE__ */ jsx19(Skeleton2, { className: "h-24 w-full" }),
4651
+ /* @__PURE__ */ jsx19(Skeleton2, { className: "h-32 w-full" })
4671
4652
  ] }),
4672
4653
  !configError && !resolvingOwner && /* @__PURE__ */ jsxs16(
4673
4654
  Tabs,
@@ -4678,27 +4659,27 @@ function ShareModal({
4678
4659
  children: [
4679
4660
  /* @__PURE__ */ jsxs16(TabsList, { fill: true, className: "flex-shrink-0", children: [
4680
4661
  /* @__PURE__ */ jsxs16(ShareTabsTrigger, { value: "users", children: [
4681
- /* @__PURE__ */ jsx20(Users5, { className: "w-4 h-4" }),
4682
- /* @__PURE__ */ jsx20("span", { className: "hidden sm:inline", children: "Users" }),
4683
- userPermissions.length > 0 && /* @__PURE__ */ jsx20("span", { className: "ml-1 px-1.5 py-0.5 text-xs bg-primary/10 rounded-full", children: userPermissions.length })
4662
+ /* @__PURE__ */ jsx19(Users5, { className: "w-4 h-4" }),
4663
+ /* @__PURE__ */ jsx19("span", { className: "hidden sm:inline", children: "Users" }),
4664
+ userPermissions.length > 0 && /* @__PURE__ */ jsx19("span", { className: "ml-1 px-1.5 py-0.5 text-xs bg-primary/10 rounded-full", children: userPermissions.length })
4684
4665
  ] }),
4685
4666
  /* @__PURE__ */ jsxs16(ShareTabsTrigger, { value: "public", children: [
4686
- /* @__PURE__ */ jsx20(Globe5, { className: "w-4 h-4" }),
4687
- /* @__PURE__ */ jsx20("span", { className: "hidden sm:inline", children: "Anyone link" }),
4688
- publicPermission && /* @__PURE__ */ jsx20("span", { className: "ml-1 px-1.5 py-0.5 text-xs bg-green-500/10 rounded-full", children: "\u2022" })
4667
+ /* @__PURE__ */ jsx19(Globe5, { className: "w-4 h-4" }),
4668
+ /* @__PURE__ */ jsx19("span", { className: "hidden sm:inline", children: "Anyone link" }),
4669
+ publicPermission && /* @__PURE__ */ jsx19("span", { className: "ml-1 px-1.5 py-0.5 text-xs bg-green-500/10 rounded-full", children: "\u2022" })
4689
4670
  ] }),
4690
4671
  /* @__PURE__ */ jsxs16(ShareTabsTrigger, { value: "secure", children: [
4691
- /* @__PURE__ */ jsx20(ShieldCheck2, { className: "w-4 h-4" }),
4692
- /* @__PURE__ */ jsx20("span", { className: "hidden sm:inline", children: "Secure link" })
4672
+ /* @__PURE__ */ jsx19(ShieldCheck2, { className: "w-4 h-4" }),
4673
+ /* @__PURE__ */ jsx19("span", { className: "hidden sm:inline", children: "Secure link" })
4693
4674
  ] }),
4694
4675
  /* @__PURE__ */ jsxs16(ShareTabsTrigger, { value: "access", children: [
4695
- /* @__PURE__ */ jsx20(KeyRound, { className: "w-4 h-4" }),
4696
- /* @__PURE__ */ jsx20("span", { className: "hidden sm:inline", children: "Access" })
4676
+ /* @__PURE__ */ jsx19(KeyRound, { className: "w-4 h-4" }),
4677
+ /* @__PURE__ */ jsx19("span", { className: "hidden sm:inline", children: "Access" })
4697
4678
  ] })
4698
4679
  ] }),
4699
4680
  /* @__PURE__ */ jsxs16("div", { className: "dialog-scroll-clear-floating flex-1 mt-3 min-h-0 overflow-y-auto", children: [
4700
4681
  /* @__PURE__ */ jsxs16(TabsContent, { value: "users", className: "mt-0 space-y-3", children: [
4701
- /* @__PURE__ */ jsx20(
4682
+ /* @__PURE__ */ jsx19(
4702
4683
  WhoCanSeeThis,
4703
4684
  {
4704
4685
  whoCanSee,
@@ -4720,8 +4701,8 @@ function ShareModal({
4720
4701
  }
4721
4702
  ),
4722
4703
  /* @__PURE__ */ jsxs16("div", { children: [
4723
- /* @__PURE__ */ jsx20("h3", { className: "text-sm font-medium mb-2", children: "Current Access" }),
4724
- !isOwner && !loading && userPermissions.length === 0 ? /* @__PURE__ */ jsx20("p", { className: "rounded-lg border bg-muted/30 p-3 text-xs text-muted-foreground", children: "The list of people with access is visible to the owner and Admins." }) : /* @__PURE__ */ jsx20(
4704
+ /* @__PURE__ */ jsx19("h3", { className: "text-sm font-medium mb-2", children: "Current Access" }),
4705
+ !isOwner && !loading && userPermissions.length === 0 ? /* @__PURE__ */ jsx19("p", { className: "rounded-lg border bg-muted/30 p-3 text-xs text-muted-foreground", children: "The list of people with access is visible to the owner and Admins." }) : /* @__PURE__ */ jsx19(
4725
4706
  PermissionsList,
4726
4707
  {
4727
4708
  permissions: userPermissions,
@@ -4736,7 +4717,7 @@ function ShareModal({
4736
4717
  }
4737
4718
  }
4738
4719
  ),
4739
- /* @__PURE__ */ jsx20(
4720
+ /* @__PURE__ */ jsx19(
4740
4721
  OrgAvailabilityNote,
4741
4722
  {
4742
4723
  permissions: permissions.filter(
@@ -4746,7 +4727,7 @@ function ShareModal({
4746
4727
  }
4747
4728
  )
4748
4729
  ] }),
4749
- canShare ? /* @__PURE__ */ jsx20(
4730
+ canShare ? /* @__PURE__ */ jsx19(
4750
4731
  ShareWithUserTab,
4751
4732
  {
4752
4733
  levelWording,
@@ -4780,7 +4761,7 @@ function ShareModal({
4780
4761
  } : {}
4781
4762
  }
4782
4763
  ) : shareBlockedNotice,
4783
- outsideShare ? /* @__PURE__ */ jsx20(
4764
+ outsideShare ? /* @__PURE__ */ jsx19(
4784
4765
  OutsideSharePanel,
4785
4766
  {
4786
4767
  organizationId: outsideShare.organizationId,
@@ -4792,7 +4773,7 @@ function ShareModal({
4792
4773
  ) : null
4793
4774
  ] }),
4794
4775
  /* @__PURE__ */ jsxs16(TabsContent, { value: "access", className: "mt-0", children: [
4795
- /* @__PURE__ */ jsx20(
4776
+ /* @__PURE__ */ jsx19(
4796
4777
  AccessSummaryPanel,
4797
4778
  {
4798
4779
  entityType: resourceType,
@@ -4801,9 +4782,9 @@ function ShareModal({
4801
4782
  refreshToken: permissions.map((p) => `${p.id}:${p.permissionLevel}`).join("|")
4802
4783
  }
4803
4784
  ),
4804
- resourceType === "record" && isOwner ? /* @__PURE__ */ jsx20(WhoCouldSeeOn, { recordId: resourceId }) : null
4785
+ resourceType === "record" && isOwner ? /* @__PURE__ */ jsx19(WhoCouldSeeOn, { recordId: resourceId }) : null
4805
4786
  ] }),
4806
- /* @__PURE__ */ jsx20(TabsContent, { value: "secure", className: "mt-0", children: isOwner ? /* @__PURE__ */ jsx20(
4787
+ /* @__PURE__ */ jsx19(TabsContent, { value: "secure", className: "mt-0", children: isOwner ? /* @__PURE__ */ jsx19(
4807
4788
  SecureLinkPanel,
4808
4789
  {
4809
4790
  resourceType,
@@ -4811,7 +4792,7 @@ function ShareModal({
4811
4792
  resourceName
4812
4793
  }
4813
4794
  ) : manageBlockedNotice }),
4814
- /* @__PURE__ */ jsx20(TabsContent, { value: "public", className: "mt-0", children: /* @__PURE__ */ jsx20(
4795
+ /* @__PURE__ */ jsx19(TabsContent, { value: "public", className: "mt-0", children: /* @__PURE__ */ jsx19(
4815
4796
  PublicAccessTab,
4816
4797
  {
4817
4798
  publicPermission,
@@ -4826,8 +4807,8 @@ function ShareModal({
4826
4807
  }
4827
4808
  ),
4828
4809
  error && /* @__PURE__ */ jsxs16("div", { className: "mt-3 p-2.5 bg-destructive/10 border border-destructive/20 rounded-md flex-shrink-0", children: [
4829
- /* @__PURE__ */ jsx20("p", { className: "text-sm text-destructive", children: error }),
4830
- /* @__PURE__ */ jsx20(ShareErrorAlchemyMenu, { error })
4810
+ /* @__PURE__ */ jsx19("p", { className: "text-sm text-destructive", children: error }),
4811
+ /* @__PURE__ */ jsx19(ShareErrorAlchemyMenu, { error })
4831
4812
  ] })
4832
4813
  ] }) });
4833
4814
  }