@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/dist/react.js CHANGED
@@ -2,7 +2,8 @@
2
2
 
3
3
  // src/react/sheet/host.tsx
4
4
  import { useCallback, useEffect, useMemo, useState, useSyncExternalStore } from "react";
5
- import { Button, Input } from "@ai-matrx/design-system";
5
+ import { Input } from "@ai-matrx/design-system";
6
+ import { Button } from "@ai-matrx/design-system/controls";
6
7
  import { copyText } from "@ai-matrx/kit/clipboard";
7
8
  import { confirm as kitConfirm } from "@ai-matrx/kit/confirm-opener";
8
9
  import { readOrganizationMemberRows } from "@ai-matrx/sharing/core";
@@ -22,8 +23,7 @@ function DefaultCopyButtons(props) {
22
23
  Button,
23
24
  {
24
25
  type: "button",
25
- variant: "ghost",
26
- size: "sm",
26
+ variant: "quiet",
27
27
  className: props.className,
28
28
  onClick: () => {
29
29
  void copyText(text()).then(() => {
@@ -375,7 +375,7 @@ var ShareTabsTrigger = React.forwardRef(
375
375
  ShareTabsTrigger.displayName = "ShareTabsTrigger";
376
376
 
377
377
  // src/react/sheet/ShareModal.tsx
378
- import { Button as Button10 } from "@ai-matrx/design-system";
378
+ import { Button as Button10 } from "@ai-matrx/design-system/controls";
379
379
  import {
380
380
  Users as Users5,
381
381
  Globe as Globe5,
@@ -879,7 +879,7 @@ import { AlertTriangle as AlertTriangle4, Lock as Lock3 } from "lucide-react";
879
879
 
880
880
  // src/react/sheet/PermissionsList.tsx
881
881
  import { useState as useState4 } from "react";
882
- import { Button as Button2 } from "@ai-matrx/design-system";
882
+ import { Button as Button2 } from "@ai-matrx/design-system/controls";
883
883
  import { Card } from "@ai-matrx/design-system";
884
884
  import { cn } from "@ai-matrx/design-system/cn";
885
885
  import { Select, SelectContent, SelectItem, SelectValue } from "@ai-matrx/design-system";
@@ -1316,14 +1316,12 @@ function PermissionsList({
1316
1316
  /* @__PURE__ */ jsx4(
1317
1317
  Button2,
1318
1318
  {
1319
- variant: "ghost",
1320
- size: "icon",
1321
- className: "h-7 w-7",
1319
+ icon: isRevoking ? /* @__PURE__ */ jsx4(Loader2, { className: "animate-spin" }) : /* @__PURE__ */ jsx4(X, {}),
1320
+ variant: "quiet",
1322
1321
  "aria-label": `Revoke access for ${getPermissionLabel(permission)}`,
1323
1322
  title: `Revoke access for ${getPermissionLabel(permission)}`,
1324
1323
  onClick: () => setConfirmRevoke({ open: true, permission }),
1325
- disabled: isUpdating || isRevoking,
1326
- children: isRevoking ? /* @__PURE__ */ jsx4(Loader2, { className: "w-3 h-3 animate-spin" }) : /* @__PURE__ */ jsx4(X, { className: "w-3 h-3" })
1324
+ disabled: isUpdating || isRevoking
1327
1325
  }
1328
1326
  )
1329
1327
  ] }) : /* @__PURE__ */ jsx4(Fragment, { children: permission.isPublic ? /* @__PURE__ */ jsx4(PublicBadge, { variant: "compact" }) : /* @__PURE__ */ jsx4(
@@ -1660,7 +1658,7 @@ function ReasonRow({
1660
1658
 
1661
1659
  // src/react/sheet/ShareWithUserTab.tsx
1662
1660
  import { useState as useState6, useMemo as useMemo2, useEffect as useEffect6 } from "react";
1663
- import { Button as Button4 } from "@ai-matrx/design-system";
1661
+ import { Button as Button4 } from "@ai-matrx/design-system/controls";
1664
1662
  import { Label as Label2 } from "@ai-matrx/design-system";
1665
1663
  import { Select as Select3, SelectContent as SelectContent3, SelectItem as SelectItem3, SelectValue as SelectValue3 } from "@ai-matrx/design-system";
1666
1664
  import { SelectTrigger as SelectTrigger3 } from "@ai-matrx/design-system/controls";
@@ -1699,7 +1697,7 @@ import { readOrganizationMemberRows as readOrganizationMemberRows2 } from "@ai-m
1699
1697
  import { listTeamMembers, listTeams } from "@ai-matrx/sharing/core";
1700
1698
  import { useEffect as useEffect5, useState as useState5 } from "react";
1701
1699
  import { Building2 as Building22, CheckCircle, Loader2 as Loader23, Users as Users3, XCircle } from "lucide-react";
1702
- import { Button as Button3 } from "@ai-matrx/design-system";
1700
+ import { Button as Button3 } from "@ai-matrx/design-system/controls";
1703
1701
  import { Checkbox } from "@ai-matrx/design-system";
1704
1702
  import { Label } from "@ai-matrx/design-system";
1705
1703
  import { Select as Select2, SelectContent as SelectContent2, SelectItem as SelectItem2, SelectValue as SelectValue2 } from "@ai-matrx/design-system";
@@ -1819,21 +1817,19 @@ function AddEveryoneInOrg({
1819
1817
  };
1820
1818
  if (orgs.length === 0) return null;
1821
1819
  if (!open) {
1822
- return /* @__PURE__ */ jsxs5(
1820
+ return /* @__PURE__ */ jsx6(
1823
1821
  Button3,
1824
1822
  {
1823
+ icon: /* @__PURE__ */ jsx6(Users3, {}),
1825
1824
  type: "button",
1826
1825
  variant: "outline",
1827
- className: "w-full h-9",
1826
+ className: "w-full",
1828
1827
  onClick: () => {
1829
1828
  if (!orgId && defaultOrgId && orgs.some((o) => o.id === defaultOrgId))
1830
1829
  setOrgId(defaultOrgId);
1831
1830
  setOpen(true);
1832
1831
  },
1833
- children: [
1834
- /* @__PURE__ */ jsx6(Users3, { className: "w-4 h-4 mr-2" }),
1835
- "Add everyone in an organization or team"
1836
- ]
1832
+ children: "Add everyone in an organization or team"
1837
1833
  }
1838
1834
  );
1839
1835
  }
@@ -1971,10 +1967,11 @@ function AddEveryoneInOrg({
1971
1967
  members && members.length > 0 && (chosen.length > 0 || running) ? /* @__PURE__ */ jsx6(
1972
1968
  Button3,
1973
1969
  {
1970
+ variant: "primary",
1974
1971
  type: "button",
1975
1972
  onClick: run,
1976
1973
  disabled: running || chosen.length === 0,
1977
- className: "w-full h-9",
1974
+ className: "w-full",
1978
1975
  children: running ? /* @__PURE__ */ jsxs5(Fragment2, { children: [
1979
1976
  /* @__PURE__ */ jsx6(Loader23, { className: "w-4 h-4 mr-2 animate-spin" }),
1980
1977
  "Sharing\u2026"
@@ -2418,9 +2415,10 @@ function ShareWithUserTab({
2418
2415
  /* @__PURE__ */ jsx7(
2419
2416
  Button4,
2420
2417
  {
2418
+ variant: "primary",
2421
2419
  onClick: handleShare,
2422
2420
  disabled: isLoading || !email.trim() || chosenWhy !== null,
2423
- className: "w-full h-9",
2421
+ className: "w-full",
2424
2422
  children: isLoading ? /* @__PURE__ */ jsxs6(Fragment3, { children: [
2425
2423
  /* @__PURE__ */ jsx7(Loader24, { className: "w-4 h-4 mr-2 animate-spin" }),
2426
2424
  status.message || "Processing..."
@@ -2458,7 +2456,7 @@ import {
2458
2456
  Send,
2459
2457
  Trash2
2460
2458
  } from "lucide-react";
2461
- import { Button as Button5 } from "@ai-matrx/design-system";
2459
+ import { Button as Button5 } from "@ai-matrx/design-system/controls";
2462
2460
  import { Input as Input2 } from "@ai-matrx/design-system/controls";
2463
2461
  import { Label as Label3 } from "@ai-matrx/design-system";
2464
2462
  import { Select as Select4, SelectContent as SelectContent4, SelectItem as SelectItem4, SelectValue as SelectValue4 } from "@ai-matrx/design-system";
@@ -2550,7 +2548,7 @@ function OutsideSharePanel({
2550
2548
  /* @__PURE__ */ jsx8("p", { className: "mt-1 break-words text-xs text-muted-foreground", children: loadError })
2551
2549
  ] })
2552
2550
  ] }),
2553
- /* @__PURE__ */ jsx8(Button5, { size: "sm", variant: "outline", className: "mt-2", onClick: () => void refresh(), children: "Try again" })
2551
+ /* @__PURE__ */ jsx8(Button5, { variant: "outline", className: "mt-2", onClick: () => void refresh(), children: "Try again" })
2554
2552
  ] });
2555
2553
  }
2556
2554
  if (!state2) {
@@ -2596,10 +2594,11 @@ function OutsideSharePanel({
2596
2594
  /* @__PURE__ */ jsx8(SelectContent4, { children: state2.levels.map((l) => /* @__PURE__ */ jsx8(SelectItem4, { value: l.level, children: l.means }, l.level)) })
2597
2595
  ] })
2598
2596
  ] }),
2599
- /* @__PURE__ */ jsxs7(
2597
+ /* @__PURE__ */ jsx8(
2600
2598
  Button5,
2601
2599
  {
2602
- size: "sm",
2600
+ icon: busy === "invite" ? /* @__PURE__ */ jsx8(Loader25, { className: "animate-spin" }) : /* @__PURE__ */ jsx8(Send, {}),
2601
+ variant: "primary",
2603
2602
  disabled: !email.trim() || busy === "invite",
2604
2603
  onClick: () => void run("invite", async () => {
2605
2604
  const answer = await shareWithOutsidePerson(organizationId, tableId, email.trim(), level);
@@ -2607,10 +2606,7 @@ function OutsideSharePanel({
2607
2606
  if (answer.granted) onGranted?.();
2608
2607
  return answer;
2609
2608
  }),
2610
- children: [
2611
- busy === "invite" ? /* @__PURE__ */ jsx8(Loader25, { className: "mr-1.5 h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsx8(Send, { className: "mr-1.5 h-4 w-4" }),
2612
- "Share"
2613
- ]
2609
+ children: "Share"
2614
2610
  }
2615
2611
  )
2616
2612
  ] }) : null,
@@ -2629,42 +2625,40 @@ function OutsideSharePanel({
2629
2625
  /* @__PURE__ */ jsx8("p", { className: "mt-0.5 text-xs text-muted-foreground", children: row.say })
2630
2626
  ] }),
2631
2627
  state2.may_invite ? /* @__PURE__ */ jsxs7("div", { className: "flex flex-shrink-0 gap-1", children: [
2632
- row.accept_path ? /* @__PURE__ */ jsxs7(
2628
+ row.accept_path ? /* @__PURE__ */ jsx8(
2633
2629
  Button5,
2634
2630
  {
2635
- size: "sm",
2636
- variant: "ghost",
2631
+ icon: copied === row.invitation_id ? /* @__PURE__ */ jsx8(Check, {}) : /* @__PURE__ */ jsx8(Link2, {}),
2632
+ variant: "quiet",
2637
2633
  title: "Copy invitation link",
2638
2634
  onClick: () => void copyLink(
2639
2635
  row.invitation_id,
2640
2636
  row.accept_path,
2641
2637
  row.email
2642
2638
  ),
2643
- children: [
2644
- copied === row.invitation_id ? /* @__PURE__ */ jsx8(Check, { className: "mr-1.5 h-4 w-4" }) : /* @__PURE__ */ jsx8(Link2, { className: "mr-1.5 h-4 w-4" }),
2645
- /* @__PURE__ */ jsx8("span", { className: "text-xs", children: copied === row.invitation_id ? "Copied" : "Copy link" })
2646
- ]
2639
+ children: /* @__PURE__ */ jsx8("span", { className: "text-xs", children: copied === row.invitation_id ? "Copied" : "Copy link" })
2647
2640
  }
2648
2641
  ) : null,
2649
2642
  !row.joined ? /* @__PURE__ */ jsx8(
2650
2643
  Button5,
2651
2644
  {
2652
- size: "sm",
2653
- variant: "ghost",
2645
+ icon: busy === `resend:${row.invitation_id}` ? /* @__PURE__ */ jsx8(Loader25, { className: "animate-spin" }) : /* @__PURE__ */ jsx8(RotateCw, {}),
2646
+ "aria-label": "Send a fresh link",
2647
+ variant: "quiet",
2654
2648
  title: "Send a fresh link",
2655
2649
  disabled: busy === `resend:${row.invitation_id}`,
2656
2650
  onClick: () => void run(
2657
2651
  `resend:${row.invitation_id}`,
2658
2652
  () => resendOutside(organizationId, row.invitation_id)
2659
- ),
2660
- children: busy === `resend:${row.invitation_id}` ? /* @__PURE__ */ jsx8(Loader25, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsx8(RotateCw, { className: "h-4 w-4" })
2653
+ )
2661
2654
  }
2662
2655
  ) : null,
2663
2656
  /* @__PURE__ */ jsx8(
2664
2657
  Button5,
2665
2658
  {
2666
- size: "sm",
2667
- variant: "ghost",
2659
+ icon: busy === `revoke:${row.invitation_id}` ? /* @__PURE__ */ jsx8(Loader25, { className: "animate-spin" }) : /* @__PURE__ */ jsx8(Trash2, {}),
2660
+ "aria-label": row.joined ? "Take their access away" : "Withdraw the invitation",
2661
+ variant: "quiet",
2668
2662
  title: row.joined ? "Take their access away" : "Withdraw the invitation",
2669
2663
  disabled: busy === `revoke:${row.invitation_id}`,
2670
2664
  onClick: () => void (async () => {
@@ -2679,8 +2673,7 @@ function OutsideSharePanel({
2679
2673
  `revoke:${row.invitation_id}`,
2680
2674
  () => revokeOutside(organizationId, row.invitation_id)
2681
2675
  );
2682
- })(),
2683
- children: busy === `revoke:${row.invitation_id}` ? /* @__PURE__ */ jsx8(Loader25, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsx8(Trash2, { className: "h-4 w-4" })
2676
+ })()
2684
2677
  }
2685
2678
  )
2686
2679
  ] }) : null
@@ -2694,7 +2687,7 @@ import { shareWithOutsidePerson as shareWithOutsidePerson2 } from "@ai-matrx/sha
2694
2687
  // src/react/sheet/WhoCouldSeeOn.tsx
2695
2688
  import { useState as useState8 } from "react";
2696
2689
  import { History, Loader2 as Loader26 } from "lucide-react";
2697
- import { Button as Button6 } from "@ai-matrx/design-system";
2690
+ import { Button as Button6 } from "@ai-matrx/design-system/controls";
2698
2691
  import { DateTimeField } from "@ai-matrx/design-system/controls";
2699
2692
  import { createClient as createClient3, PERMISSION_LEVEL_SHORT_LABELS as PERMISSION_LEVEL_SHORT_LABELS4 } from "@ai-matrx/sharing/core";
2700
2693
  import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
@@ -2734,10 +2727,7 @@ function WhoCouldSeeOn({ recordId }) {
2734
2727
  className: "min-w-0 flex-1"
2735
2728
  }
2736
2729
  ),
2737
- /* @__PURE__ */ jsxs8(Button6, { size: "sm", variant: "outline", className: "h-7 px-2 text-xs", disabled: busy || at === "", onClick: () => void ask(), "data-who-could-see-ask": "", children: [
2738
- busy ? /* @__PURE__ */ jsx9(Loader26, { className: "mr-1 h-3.5 w-3.5 animate-spin" }) : null,
2739
- "Ask"
2740
- ] })
2730
+ /* @__PURE__ */ jsx9(Button6, { icon: busy ? /* @__PURE__ */ jsx9(Loader26, { className: "animate-spin" }) : null, variant: "outline", disabled: busy || at === "", onClick: () => void ask(), "data-who-could-see-ask": "", children: "Ask" })
2741
2731
  ] }),
2742
2732
  people ? people.length === 0 ? /* @__PURE__ */ jsx9("p", { className: "text-xs text-muted-foreground", children: "Nobody could see it then." }) : /* @__PURE__ */ jsx9("ul", { className: "flex flex-col gap-0.5", "data-who-could-see-list": "", children: people.map((p) => /* @__PURE__ */ jsxs8("li", { className: "flex items-center justify-between gap-2 text-xs", "data-who-could-see-person": p.id ?? "", children: [
2743
2733
  /* @__PURE__ */ jsxs8("span", { className: "min-w-0 truncate", children: [
@@ -2834,7 +2824,7 @@ var SwitchLegacy = React6.forwardRef(({ size = "sm", ...props }, ref) => /* @__P
2834
2824
  SwitchLegacy.displayName = "SwitchLegacy";
2835
2825
 
2836
2826
  // src/react/sheet/RowControls.tsx
2837
- import { Button as Button8 } from "@ai-matrx/design-system";
2827
+ import { Button as Button8 } from "@ai-matrx/design-system/controls";
2838
2828
 
2839
2829
  // src/react/sheet/ui/toggle-group.tsx
2840
2830
  import {
@@ -2867,8 +2857,7 @@ import { AlertTriangle as AlertTriangle3 } from "lucide-react";
2867
2857
 
2868
2858
  // src/react/sheet/ShareLinkPanel.tsx
2869
2859
  import { useCallback as useCallback5, useEffect as useEffect8, useRef as useRef2, useState as useState10 } from "react";
2870
- import { Button as Button7 } from "@ai-matrx/design-system";
2871
- import { DateTimeField as DateTimeField2, Input as Input3, Select as Select5 } from "@ai-matrx/design-system/controls";
2860
+ import { Button as Button7, DateTimeField as DateTimeField2, Input as Input3, Select as Select5 } from "@ai-matrx/design-system/controls";
2872
2861
  import { OutboundLink } from "@ai-matrx/kit/outbound-react";
2873
2862
  import { formatAbsoluteDate } from "@ai-matrx/kit/format";
2874
2863
  import {
@@ -3383,17 +3372,15 @@ function ShareLinkPanel({
3383
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" })
3384
3373
  ] })
3385
3374
  ] }),
3386
- /* @__PURE__ */ jsxs10(
3375
+ /* @__PURE__ */ jsx14(
3387
3376
  Button7,
3388
3377
  {
3389
- size: "sm",
3378
+ icon: creating ? /* @__PURE__ */ jsx14(Loader27, { className: "animate-spin" }) : /* @__PURE__ */ jsx14(Plus, {}),
3379
+ variant: "primary",
3390
3380
  onClick: handleCreate,
3391
3381
  disabled: creating,
3392
3382
  className: "flex-shrink-0",
3393
- children: [
3394
- creating ? /* @__PURE__ */ jsx14(Loader27, { className: "w-4 h-4 animate-spin" }) : /* @__PURE__ */ jsx14(Plus, { className: "w-4 h-4" }),
3395
- /* @__PURE__ */ jsx14("span", { className: "ml-1 hidden sm:inline", children: hasLink ? "New link" : "Create link" })
3396
- ]
3383
+ children: /* @__PURE__ */ jsx14("span", { className: "ml-1 hidden sm:inline", children: hasLink ? "New link" : "Create link" })
3397
3384
  }
3398
3385
  )
3399
3386
  ] }),
@@ -3469,14 +3456,13 @@ function ShareLinkPanel({
3469
3456
  /* @__PURE__ */ jsx14(
3470
3457
  Button7,
3471
3458
  {
3472
- variant: "ghost",
3473
- size: "icon",
3474
- className: "h-11 w-11 flex-shrink-0 sm:h-8 sm:w-8",
3459
+ icon: copiedId === `${link.id}:${extra.key}` ? /* @__PURE__ */ jsx14(Check2, { className: "text-green-500" }) : /* @__PURE__ */ jsx14(Copy, {}),
3460
+ variant: "quiet",
3461
+ className: "flex-shrink-0",
3475
3462
  onClick: () => copyExtraUrl(`${link.id}:${extra.key}`, extra.url),
3476
3463
  disabled: !!unavailableReason,
3477
3464
  title: unavailableReason ?? "Copy",
3478
- "aria-label": `Copy ${extra.label}`,
3479
- children: copiedId === `${link.id}:${extra.key}` ? /* @__PURE__ */ jsx14(Check2, { className: "w-4 h-4 text-green-500" }) : /* @__PURE__ */ jsx14(Copy, { className: "w-4 h-4" })
3465
+ "aria-label": `Copy ${extra.label}`
3480
3466
  }
3481
3467
  )
3482
3468
  ]
@@ -3518,39 +3504,37 @@ function ShareLinkPanel({
3518
3504
  /* @__PURE__ */ jsx14(
3519
3505
  Button7,
3520
3506
  {
3521
- variant: "ghost",
3522
- size: "icon",
3523
- className: "h-11 w-11 flex-shrink-0 sm:h-8 sm:w-8",
3507
+ icon: copiedId === link.id ? /* @__PURE__ */ jsx14(Check2, { className: "text-green-500" }) : /* @__PURE__ */ jsx14(Copy, {}),
3508
+ variant: "quiet",
3509
+ className: "flex-shrink-0",
3524
3510
  onClick: () => copyLink(link),
3525
3511
  disabled: !!unavailableReason,
3526
3512
  title: unavailableReason ?? "Copy link",
3527
- "aria-label": "Copy share link",
3528
- children: copiedId === link.id ? /* @__PURE__ */ jsx14(Check2, { className: "w-4 h-4 text-green-500" }) : /* @__PURE__ */ jsx14(Copy, { className: "w-4 h-4" })
3513
+ "aria-label": "Copy share link"
3529
3514
  }
3530
3515
  ),
3531
3516
  /* @__PURE__ */ jsx14(
3532
3517
  Button7,
3533
3518
  {
3534
- variant: "ghost",
3535
- size: "icon",
3536
- className: "h-11 w-11 flex-shrink-0 sm:h-8 sm:w-8",
3519
+ icon: refreshing ? /* @__PURE__ */ jsx14(Loader27, { className: "animate-spin" }) : /* @__PURE__ */ jsx14(MessageSquareText, {}),
3520
+ variant: "quiet",
3521
+ className: "flex-shrink-0",
3537
3522
  onClick: () => prepareTextShare(link.id),
3538
3523
  disabled: !!unavailableReason || refreshing,
3539
3524
  title: unavailableReason ?? "Review before sharing by text",
3540
- "aria-label": "Share by text",
3541
- children: refreshing ? /* @__PURE__ */ jsx14(Loader27, { className: "w-4 h-4 animate-spin" }) : /* @__PURE__ */ jsx14(MessageSquareText, { className: "w-4 h-4" })
3525
+ "aria-label": "Share by text"
3542
3526
  }
3543
3527
  ),
3544
3528
  /* @__PURE__ */ jsx14(
3545
3529
  Button7,
3546
3530
  {
3547
- variant: "ghost",
3548
- size: "icon",
3549
- className: "h-11 w-11 flex-shrink-0 text-destructive sm:h-8 sm:w-8",
3531
+ icon: /* @__PURE__ */ jsx14(Trash22, {}),
3532
+ removes: true,
3533
+ variant: "quiet",
3534
+ className: "flex-shrink-0",
3550
3535
  onClick: () => setRevokeTarget(link),
3551
3536
  title: "Turn off link",
3552
- "aria-label": "Turn off share link",
3553
- children: /* @__PURE__ */ jsx14(Trash22, { className: "w-4 h-4" })
3537
+ "aria-label": "Turn off share link"
3554
3538
  }
3555
3539
  )
3556
3540
  ] })
@@ -3563,18 +3547,15 @@ function ShareLinkPanel({
3563
3547
  className: "flex items-center justify-between gap-2 text-xs text-destructive",
3564
3548
  children: [
3565
3549
  /* @__PURE__ */ jsx14("span", { children: shareError }),
3566
- /* @__PURE__ */ jsxs10(
3550
+ /* @__PURE__ */ jsx14(
3567
3551
  Button7,
3568
3552
  {
3553
+ icon: /* @__PURE__ */ jsx14(RefreshCw, {}),
3569
3554
  type: "button",
3570
3555
  variant: "outline",
3571
- size: "sm",
3572
3556
  disabled: isLoading,
3573
3557
  onClick: () => refresh(),
3574
- children: [
3575
- /* @__PURE__ */ jsx14(RefreshCw, { className: "mr-1 h-3.5 w-3.5" }),
3576
- "Refresh"
3577
- ]
3558
+ children: "Refresh"
3578
3559
  }
3579
3560
  ),
3580
3561
  /* @__PURE__ */ jsx14(ShareErrorAlchemyMenu, { className: "ml-auto" })
@@ -3608,18 +3589,16 @@ function ShareLinkPanel({
3608
3589
  /* @__PURE__ */ jsx14("p", { className: "text-xs font-medium", children: "Message preview" }),
3609
3590
  /* @__PURE__ */ jsx14("p", { className: "rounded-md border bg-muted/30 p-3 break-words", children: createSafeShareMessage(urlFor(shareTarget)) })
3610
3591
  ] }),
3611
- /* @__PURE__ */ jsxs10(
3592
+ /* @__PURE__ */ jsx14(
3612
3593
  Button7,
3613
3594
  {
3595
+ icon: /* @__PURE__ */ jsx14(Copy, {}),
3614
3596
  type: "button",
3615
3597
  variant: "outline",
3616
- className: "min-h-11 w-full sm:min-h-0",
3598
+ className: "w-full",
3617
3599
  disabled: handoffBusy,
3618
3600
  onClick: handleCopyReviewedMessage,
3619
- children: [
3620
- /* @__PURE__ */ jsx14(Copy, { className: "mr-2 h-4 w-4" }),
3621
- "Copy message"
3622
- ]
3601
+ children: "Copy message"
3623
3602
  }
3624
3603
  ),
3625
3604
  /* @__PURE__ */ jsx14("p", { className: "text-xs text-muted-foreground", children: "You can turn this link off from the share panel at any time." })
@@ -3996,12 +3975,12 @@ function RowControls({
3996
3975
  /* @__PURE__ */ jsx17(
3997
3976
  Button8,
3998
3977
  {
3999
- variant: "ghost",
4000
- size: "icon",
4001
- className: "h-7 w-7 flex-shrink-0",
3978
+ icon: copied ? /* @__PURE__ */ jsx17(Check3, {}) : /* @__PURE__ */ jsx17(Copy2, {}),
3979
+ "aria-label": "Copy web address",
3980
+ variant: "quiet",
3981
+ className: "flex-shrink-0",
4002
3982
  onClick: () => void copyAddress(),
4003
- title: "Copy web address",
4004
- children: copied ? /* @__PURE__ */ jsx17(Check3, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ jsx17(Copy2, { className: "h-3.5 w-3.5" })
3983
+ title: "Copy web address"
4005
3984
  }
4006
3985
  )
4007
3986
  ] })
@@ -4162,7 +4141,7 @@ function WhoCanSeeThis({
4162
4141
  // src/react/sheet/SecureLinkPanel.tsx
4163
4142
  import { useCallback as useCallback8, useEffect as useEffect12, useRef as useRef3, useState as useState15 } from "react";
4164
4143
  import { Loader2 as Loader210, Mail as Mail3, MessageSquare as MessageSquare3, ShieldCheck } from "lucide-react";
4165
- import { Button as Button9 } from "@ai-matrx/design-system";
4144
+ import { Button as Button9 } from "@ai-matrx/design-system/controls";
4166
4145
  import { Checkbox as Checkbox2 } from "@ai-matrx/design-system";
4167
4146
  import { Input as Input4 } from "@ai-matrx/design-system/controls";
4168
4147
  import { Label as Label4 } from "@ai-matrx/design-system";
@@ -4416,10 +4395,7 @@ function SecureLinkForm({ resourceType, resourceId, resourceName }) {
4416
4395
  }
4417
4396
  )
4418
4397
  ] }),
4419
- /* @__PURE__ */ jsxs15(Button9, { className: "w-full", onClick: send, disabled: !canSend, children: [
4420
- sending ? /* @__PURE__ */ jsx19(Loader210, { className: "mr-2 h-4 w-4 animate-spin" }) : null,
4421
- "Send secure link"
4422
- ] }),
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" }),
4423
4399
  result ? /* @__PURE__ */ jsxs15(
4424
4400
  "div",
4425
4401
  {
@@ -4442,7 +4418,7 @@ function SecureLinkForm({ resourceType, resourceId, resourceName }) {
4442
4418
  row.field_keys.length > 0 ? ` \xB7 with ${row.field_keys.join(", ")}` : ""
4443
4419
  ] })
4444
4420
  ] }),
4445
- row.status === "pending" ? /* @__PURE__ */ jsx19(Button9, { size: "sm", variant: "outline", onClick: () => void turnOff(row), children: "Turn off" }) : null
4421
+ row.status === "pending" ? /* @__PURE__ */ jsx19(Button9, { variant: "outline", onClick: () => void turnOff(row), children: "Turn off" }) : null
4446
4422
  ] }, row.id)) })
4447
4423
  ] }) : null
4448
4424
  ] });
@@ -4638,18 +4614,15 @@ function ShareModal({
4638
4614
  }
4639
4615
  ) }) })
4640
4616
  ] }),
4641
- /* @__PURE__ */ jsxs16(
4617
+ /* @__PURE__ */ jsx20(
4642
4618
  Button10,
4643
4619
  {
4620
+ icon: emailingLink ? /* @__PURE__ */ jsx20(Loader211, { className: "animate-spin" }) : emailSent ? /* @__PURE__ */ jsx20(CheckCircle3, { className: "text-green-500" }) : /* @__PURE__ */ jsx20(Mail4, {}),
4644
4621
  variant: "outline",
4645
- size: "sm",
4646
4622
  onClick: handleEmailLink,
4647
4623
  disabled: emailingLink,
4648
4624
  className: "flex-shrink-0",
4649
- children: [
4650
- emailingLink ? /* @__PURE__ */ jsx20(Loader211, { className: "h-4 w-4 animate-spin" }) : emailSent ? /* @__PURE__ */ jsx20(CheckCircle3, { className: "h-4 w-4 text-green-500" }) : /* @__PURE__ */ jsx20(Mail4, { className: "h-4 w-4" }),
4651
- /* @__PURE__ */ jsx20("span", { className: "ml-1.5 hidden sm:inline", children: emailSent ? "Sent!" : "Email link" })
4652
- ]
4625
+ children: /* @__PURE__ */ jsx20("span", { className: "ml-1.5 hidden sm:inline", children: emailSent ? "Sent!" : "Email link" })
4653
4626
  }
4654
4627
  )
4655
4628
  ] }) }),