@ai-matrx/vault 0.1.32 → 0.1.34

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/index.js CHANGED
@@ -4,7 +4,6 @@ import {
4
4
  CONFIRM_RETURN_KEY,
5
5
  CameraGlyph,
6
6
  CheckGlyph,
7
- ChevronDownGlyph,
8
7
  ChevronLeftGlyph,
9
8
  ChevronRightGlyph,
10
9
  ClipboardProvider,
@@ -56,7 +55,7 @@ import {
56
55
  useCopy,
57
56
  useNotify,
58
57
  wasCancelled
59
- } from "./chunk-IJVSAR5M.js";
58
+ } from "./chunk-B5TOAIY6.js";
60
59
 
61
60
  // src/VaultApp.tsx
62
61
  import { useCallback as useCallback4, useEffect as useEffect21, useMemo as useMemo6, useRef as useRef17, useState as useState39, useSyncExternalStore as useSyncExternalStore5 } from "react";
@@ -344,7 +343,7 @@ function PlainRow({ label, value, hint: hint2, openUrl, extra, multiline = false
344
343
  );
345
344
  }
346
345
  function AddRow({ label, onAdd, children = "Add" }) {
347
- return /* @__PURE__ */ jsx2(VaultRow, { label, children: onAdd ? /* @__PURE__ */ jsx2("button", { type: "button", className: "text-sm text-muted-foreground hover:text-primary", onClick: onAdd, children }) : /* @__PURE__ */ jsx2("span", { className: "text-disabled-foreground", children: "\u2014" }) });
346
+ return /* @__PURE__ */ jsx2(VaultRow, { label, children: onAdd ? /* @__PURE__ */ jsx2(Button, { type: "button", variant: "quiet", onClick: onAdd, children }) : /* @__PURE__ */ jsx2("span", { className: "text-disabled-foreground", children: "\u2014" }) });
348
347
  }
349
348
  function EditRow({ label, hint: hint2, value, onChange, placeholder, secret = false, multiline = false, onRemove, removeLabel, actions, autoFocus, onBlur, inputMode }) {
350
349
  const [shown, setShown] = useState3(false);
@@ -1111,8 +1110,8 @@ function HistoryRow({ item, port, page, entry, label, onRestored, onConflict, on
1111
1110
 
1112
1111
  // src/authenticator/AuthenticatorView.tsx
1113
1112
  import { useEffect as useEffect9, useState as useState11 } from "react";
1114
- import { Button as Button8 } from "@ai-matrx/design-system/controls";
1115
- import { cn as cn6, DropdownMenu as DropdownMenu2, DropdownMenuContent as DropdownMenuContent2, DropdownMenuItem as DropdownMenuItem2, DropdownMenuSeparator as DropdownMenuSeparator2, DropdownMenuTrigger as DropdownMenuTrigger2, TextInputDialog } from "@ai-matrx/design-system";
1113
+ import { Button as Button8, Tile as Tile2 } from "@ai-matrx/design-system/controls";
1114
+ import { DropdownMenu as DropdownMenu2, DropdownMenuContent as DropdownMenuContent2, DropdownMenuItem as DropdownMenuItem2, DropdownMenuSeparator as DropdownMenuSeparator2, DropdownMenuTrigger as DropdownMenuTrigger2, TextInputDialog } from "@ai-matrx/design-system";
1116
1115
  import { CopyIcon as CopyIcon4 } from "@ai-matrx/design-system/icons";
1117
1116
 
1118
1117
  // src/ItemIcon.tsx
@@ -1135,7 +1134,7 @@ import { Button as Button7, Field as Field3, Select as Select2 } from "@ai-matrx
1135
1134
 
1136
1135
  // src/authenticator/CodeParts.tsx
1137
1136
  import { useEffect as useEffect6, useRef as useRef4, useState as useState6 } from "react";
1138
- import { Button as Button4 } from "@ai-matrx/design-system/controls";
1137
+ import { Button as Button4, Tile } from "@ai-matrx/design-system/controls";
1139
1138
  import { cn as cn5 } from "@ai-matrx/design-system";
1140
1139
  import { CopyIcon as CopyIcon3 } from "@ai-matrx/design-system/icons";
1141
1140
  import { groupCode as groupCode2 } from "@ai-matrx/kit/format";
@@ -1287,19 +1286,21 @@ function useCopied() {
1287
1286
  function CodeButton({ live, digits, size = "md", label }) {
1288
1287
  const { copied, copy } = useCopied();
1289
1288
  const shown = live.code ? groupCode2(live.code) : maskedCode(digits);
1290
- return /* @__PURE__ */ jsxs5(
1291
- "button",
1289
+ return /* @__PURE__ */ jsx6(
1290
+ Tile,
1292
1291
  {
1293
1292
  type: "button",
1294
1293
  disabled: !live.code,
1295
1294
  onClick: () => live.code && void copy(live.code),
1296
1295
  "aria-label": live.code ? `Copy ${label} code` : `Getting ${label} code`,
1297
- title: live.code ? "Copy" : void 0,
1298
- className: cn5("group -mx-1.5 inline-flex max-w-full shrink-0 items-center gap-3 rounded-md px-1.5 py-1 text-left transition-colors hover:bg-accent focus-visible:bg-accent focus-visible:outline-none", size === "lg" && "gap-4"),
1299
- children: [
1296
+ variant: "quiet",
1297
+ layout: "row",
1298
+ title: "Copy code",
1299
+ end: /* @__PURE__ */ jsxs5("span", { className: cn5("inline-flex shrink-0 items-center", size === "lg" ? "gap-4" : "gap-3"), children: [
1300
1300
  /* @__PURE__ */ jsx6("span", { className: cn5("whitespace-nowrap font-mono font-medium tabular-nums tracking-[0.08em]", size === "lg" ? "text-2xl" : "text-[1.0625rem]", live.code ? "text-foreground" : "text-disabled-foreground"), children: shown }),
1301
1301
  copied ? /* @__PURE__ */ jsx6("span", { className: "inline-flex size-6 items-center justify-center text-success", role: "status", "aria-label": "Copied", children: /* @__PURE__ */ jsx6(CheckGlyph, { className: "size-4" }) }) : /* @__PURE__ */ jsx6(CountdownRing, { remaining: live.remaining, period: live.period, loading: !live.code })
1302
- ]
1302
+ ] }),
1303
+ className: "max-w-full shrink-0"
1303
1304
  }
1304
1305
  );
1305
1306
  }
@@ -2102,11 +2103,29 @@ function OtpListRow({ port, item, family, entry, onOpen, onOpenInNewTab, onRenam
2102
2103
  if (a.removed) return null;
2103
2104
  const sub = a.error ?? [entry?.account, loginSiteOf(item) || entry?.issuer].filter((v, i, all) => Boolean(v) && all.indexOf(v) === i).join(" \xB7 ");
2104
2105
  return /* @__PURE__ */ jsxs9("div", { className: "grid min-h-14 grid-cols-[2rem_minmax(0,1fr)_auto_auto] items-center gap-x-3 rounded-lg px-2 py-1.5 transition-colors hover:bg-accent/50", children: [
2105
- /* @__PURE__ */ jsx10("button", { type: "button", onClick: onOpen, "aria-label": `Open ${item.name}`, tabIndex: -1, className: "flex size-8 items-center justify-center rounded-lg", children: /* @__PURE__ */ jsx10(ItemIcon, { definitionKey: item.definitionKey, family, site: loginSiteOf(item) || (entry?.issuer ?? "") }) }),
2106
- /* @__PURE__ */ jsxs9("button", { type: "button", onClick: onOpen, className: "flex min-w-0 flex-col items-start rounded-md text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", children: [
2107
- /* @__PURE__ */ jsx10("span", { className: cn6("max-w-full truncate text-sm font-medium", a.enabled ? "text-foreground" : "text-muted-foreground"), children: item.name }),
2108
- sub ? /* @__PURE__ */ jsx10("span", { className: cn6("max-w-full truncate text-xs", a.error ? "text-destructive" : "text-muted-foreground"), title: sub, children: sub }) : null
2109
- ] }),
2106
+ /* @__PURE__ */ jsx10(
2107
+ Button8,
2108
+ {
2109
+ type: "button",
2110
+ variant: "quiet",
2111
+ icon: /* @__PURE__ */ jsx10(ItemIcon, { definitionKey: item.definitionKey, family, site: loginSiteOf(item) || (entry?.issuer ?? "") }),
2112
+ "aria-label": `Open ${item.name}`,
2113
+ tabIndex: -1,
2114
+ className: "shrink-0",
2115
+ onClick: onOpen
2116
+ }
2117
+ ),
2118
+ /* @__PURE__ */ jsx10(
2119
+ Tile2,
2120
+ {
2121
+ type: "button",
2122
+ variant: "quiet",
2123
+ onClick: onOpen,
2124
+ title: /* @__PURE__ */ jsx10("span", { className: a.enabled ? "text-foreground" : "text-muted-foreground", children: item.name }),
2125
+ line: sub ? /* @__PURE__ */ jsx10("span", { className: a.error ? "text-destructive" : "text-muted-foreground", title: sub, children: sub }) : void 0,
2126
+ className: "min-w-0"
2127
+ }
2128
+ ),
2110
2129
  /* @__PURE__ */ jsx10("div", { className: "flex shrink-0 justify-end", children: !a.enabled ? /* @__PURE__ */ jsxs9("span", { className: "flex items-center gap-1.5", children: [
2111
2130
  /* @__PURE__ */ jsx10("span", { className: "text-sm text-disabled-foreground", children: "Off" }),
2112
2131
  canManage ? /* @__PURE__ */ jsx10(Button8, { variant: "quiet", disabled: a.busy, onClick: () => void a.setEnabled(true), children: "Turn on" }) : null
@@ -2448,7 +2467,7 @@ function ItemSettingsPanel({ item, port, onClose, onChanged, onPanel }) {
2448
2467
 
2449
2468
  // src/generator/PasswordGenerator.tsx
2450
2469
  import { createContext as createContext3, useContext as useContext3, useEffect as useEffect10, useRef as useRef8, useState as useState13 } from "react";
2451
- import { Popover, PopoverContent, PopoverTrigger, cn as cn7 } from "@ai-matrx/design-system";
2470
+ import { Popover, PopoverContent, PopoverTrigger, cn as cn6 } from "@ai-matrx/design-system";
2452
2471
  import { Button as Button10, NumberStepper, SegmentedControl as SegmentedControl2, Select as Select4, Switch as Switch2 } from "@ai-matrx/design-system/controls";
2453
2472
  import { CopyIcon as CopyIcon5 } from "@ai-matrx/design-system/icons";
2454
2473
 
@@ -2606,13 +2625,13 @@ function PasswordGenerator({ limits: source, onUse, useLabel = "Use" }) {
2606
2625
  ),
2607
2626
  /* @__PURE__ */ jsxs11("div", { className: "flex flex-col gap-1 rounded-lg bg-muted px-3 py-2", children: [
2608
2627
  /* @__PURE__ */ jsxs11("div", { className: "flex min-h-7 items-start gap-1", children: [
2609
- /* @__PURE__ */ jsx12("code", { className: cn7("min-w-0 flex-1 break-all py-1 font-mono text-sm", candidate ? "text-foreground" : "text-muted-foreground"), "data-testid": "generated-value", children: candidate ? revealed ? candidate.value : MASK3 : "\u2014" }),
2628
+ /* @__PURE__ */ jsx12("code", { className: cn6("min-w-0 flex-1 break-all py-1 font-mono text-sm", candidate ? "text-foreground" : "text-muted-foreground"), "data-testid": "generated-value", children: candidate ? revealed ? candidate.value : MASK3 : "\u2014" }),
2610
2629
  /* @__PURE__ */ jsx12(Button10, { variant: "quiet", icon: revealed ? /* @__PURE__ */ jsx12(EyeOffGlyph, {}) : /* @__PURE__ */ jsx12(EyeGlyph, {}), "aria-label": revealed ? "Hide" : "Reveal", disabled: !candidate, onClick: () => setRevealed((r) => !r) }),
2611
2630
  /* @__PURE__ */ jsx12(Button10, { variant: "quiet", icon: /* @__PURE__ */ jsx12(CopyIcon5, {}), "aria-label": "Copy", disabled: !candidate, onClick: () => void copy() }),
2612
2631
  /* @__PURE__ */ jsx12(Button10, { variant: "quiet", icon: /* @__PURE__ */ jsx12(RefreshGlyph, {}), "aria-label": "Generate another", onClick: () => change(settings) })
2613
2632
  ] }),
2614
2633
  strength && candidate ? /* @__PURE__ */ jsxs11("p", { className: "text-xs", children: [
2615
- /* @__PURE__ */ jsx12("span", { className: cn7(strength.tone === "success" && "text-success", strength.tone === "primary" && "text-primary", strength.tone === "warning" && "text-warning"), children: strength.label }),
2634
+ /* @__PURE__ */ jsx12("span", { className: cn6(strength.tone === "success" && "text-success", strength.tone === "primary" && "text-primary", strength.tone === "warning" && "text-warning"), children: strength.label }),
2616
2635
  /* @__PURE__ */ jsxs11("span", { className: "text-muted-foreground", children: [
2617
2636
  " \xB7 ",
2618
2637
  Math.floor(candidate.bits),
@@ -2639,7 +2658,7 @@ function PasswordGenerator({ limits: source, onUse, useLabel = "Use" }) {
2639
2658
  /* @__PURE__ */ jsx12(OptionLine, { label: "Capitalize", children: /* @__PURE__ */ jsx12(Switch2, { "aria-label": "Capitalize", checked: settings.passphrase.capitalize, onCheckedChange: (capitalize) => change({ ...settings, passphrase: { ...settings.passphrase, capitalize } }) }) }),
2640
2659
  /* @__PURE__ */ jsx12(OptionLine, { label: "Add a digit", children: /* @__PURE__ */ jsx12(Switch2, { "aria-label": "Add a digit", checked: settings.passphrase.appendDigit, onCheckedChange: (appendDigit) => change({ ...settings, passphrase: { ...settings.passphrase, appendDigit } }) }) })
2641
2660
  ] }),
2642
- note ? /* @__PURE__ */ jsx12("p", { "aria-live": "polite", className: cn7("text-xs", note.tone === "destructive" ? "text-destructive" : note.tone === "success" ? "text-success" : "text-muted-foreground"), children: note.text }) : null,
2661
+ note ? /* @__PURE__ */ jsx12("p", { "aria-live": "polite", className: cn6("text-xs", note.tone === "destructive" ? "text-destructive" : note.tone === "success" ? "text-success" : "text-muted-foreground"), children: note.text }) : null,
2643
2662
  /* @__PURE__ */ jsx12(Button10, { variant: "primary", disabled: !candidate, onClick: use, children: useLabel })
2644
2663
  ] });
2645
2664
  }
@@ -4381,7 +4400,7 @@ function ImportPanel({ port, host, items, definitions, organizations, onClose, o
4381
4400
  done.needOtp.map((made) => {
4382
4401
  const now = items.find((i) => i.id === made.id);
4383
4402
  if (now?.authenticator) return null;
4384
- return /* @__PURE__ */ jsx16(VaultRow, { label: "Authenticator", children: /* @__PURE__ */ jsxs15("button", { type: "button", className: "truncate text-left text-primary hover:underline", onClick: () => setOtpFor(made.id), children: [
4403
+ return /* @__PURE__ */ jsx16(VaultRow, { label: "Authenticator", children: /* @__PURE__ */ jsxs15(Button14, { type: "button", variant: "link", className: "truncate", onClick: () => setOtpFor(made.id), children: [
4385
4404
  "Set up authenticator for ",
4386
4405
  made.name
4387
4406
  ] }) }, `otp:${made.id}`);
@@ -4436,14 +4455,14 @@ function Notices({ draft }) {
4436
4455
  // src/ItemList.tsx
4437
4456
  import { useEffect as useEffect15, useRef as useRef13, useState as useState26 } from "react";
4438
4457
  import { DropdownMenu as DropdownMenu4, DropdownMenuContent as DropdownMenuContent4, DropdownMenuItem as DropdownMenuItem4, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator as DropdownMenuSeparator4, DropdownMenuTrigger as DropdownMenuTrigger4 } from "@ai-matrx/design-system";
4439
- import { cn as cn12 } from "@ai-matrx/design-system";
4440
- import { Button as Button22, SearchField } from "@ai-matrx/design-system/controls";
4458
+ import { cn as cn11 } from "@ai-matrx/design-system";
4459
+ import { Button as Button22, SearchField, Tile as Tile3 } from "@ai-matrx/design-system/controls";
4441
4460
  import { CopyIcon as CopyIcon7 } from "@ai-matrx/design-system/icons";
4442
4461
 
4443
4462
  // src/ItemPane.tsx
4444
4463
  import { Fragment as Fragment16, useEffect as useEffect14, useMemo as useMemo3, useRef as useRef12, useState as useState25 } from "react";
4445
4464
  import { DropdownMenu as DropdownMenu3, DropdownMenuContent as DropdownMenuContent3, DropdownMenuItem as DropdownMenuItem3, DropdownMenuSeparator as DropdownMenuSeparator3, DropdownMenuTrigger as DropdownMenuTrigger3 } from "@ai-matrx/design-system";
4446
- import { cn as cn11 } from "@ai-matrx/design-system";
4465
+ import { cn as cn10 } from "@ai-matrx/design-system";
4447
4466
  import { Badge as Badge7, Button as Button21, CONTROLS_CONTAINER_CLASS, OptionCombobox, Switch as Switch6 } from "@ai-matrx/design-system/controls";
4448
4467
  import { confirm as confirm10 } from "@ai-matrx/kit/confirm-opener";
4449
4468
 
@@ -4451,7 +4470,7 @@ import { confirm as confirm10 } from "@ai-matrx/kit/confirm-opener";
4451
4470
  import { formatFileSize as formatFileSize2 } from "@ai-matrx/kit/format";
4452
4471
  import { useRef as useRef11, useState as useState18 } from "react";
4453
4472
  import { Badge as Badge5, Button as Button15, Field as Field6, SegmentedControl as SegmentedControl4 } from "@ai-matrx/design-system/controls";
4454
- import { cn as cn8 } from "@ai-matrx/design-system";
4473
+ import { cn as cn7 } from "@ai-matrx/design-system";
4455
4474
  import { confirm as confirm6 } from "@ai-matrx/kit/confirm-opener";
4456
4475
  import { downloadFile as downloadFile3 } from "@ai-matrx/kit/download";
4457
4476
  import { DownloadIcon } from "@ai-matrx/design-system/icons";
@@ -4506,7 +4525,7 @@ function FilesSection({ item, port, editing, onChanged }) {
4506
4525
  return /* @__PURE__ */ jsx17(
4507
4526
  "div",
4508
4527
  {
4509
- className: cn8("rounded-xl", dragging && "outline outline-2 outline-primary"),
4528
+ className: cn7("rounded-xl", dragging && "outline outline-2 outline-primary"),
4510
4529
  onDragOver: canAdd ? (e) => {
4511
4530
  e.preventDefault();
4512
4531
  setDragging(true);
@@ -4671,7 +4690,7 @@ function DraftFilesSection({ files, onFiles }) {
4671
4690
  return /* @__PURE__ */ jsx17(
4672
4691
  "div",
4673
4692
  {
4674
- className: cn8("rounded-xl", dragging && "outline outline-2 outline-primary"),
4693
+ className: cn7("rounded-xl", dragging && "outline outline-2 outline-primary"),
4675
4694
  onDragOver: (e) => {
4676
4695
  e.preventDefault();
4677
4696
  setDragging(true);
@@ -5143,7 +5162,7 @@ function UseOnSiteButton({ port, item, pageUrl, onChanged }) {
5143
5162
  import { useEffect as useEffect13, useState as useState24 } from "react";
5144
5163
  import { confirm as confirm9 } from "@ai-matrx/kit/confirm-opener";
5145
5164
  import { Button as Button20, DisclosureHeader as DisclosureHeader3, Field as Field9, RegionSkeleton, Select as Select9 } from "@ai-matrx/design-system/controls";
5146
- import { cn as cn10 } from "@ai-matrx/design-system";
5165
+ import { cn as cn9 } from "@ai-matrx/design-system";
5147
5166
  import { UsersIcon } from "@ai-matrx/design-system/icons";
5148
5167
 
5149
5168
  // src/sharing/logic.ts
@@ -5199,7 +5218,7 @@ var MEMBER_CHOICE_DEFAULT = "default";
5199
5218
 
5200
5219
  // src/sharing/parts.tsx
5201
5220
  import { useState as useState22 } from "react";
5202
- import { cn as cn9 } from "@ai-matrx/design-system";
5221
+ import { cn as cn8 } from "@ai-matrx/design-system";
5203
5222
  import { jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
5204
5223
  var message = (e, fallback) => {
5205
5224
  const m = e instanceof Error && e.message ? e.message : fallback;
@@ -5239,7 +5258,7 @@ function AccessLine({ glyph: G, who, meta, children }) {
5239
5258
  }
5240
5259
  function StatusLine({ error, notice }) {
5241
5260
  if (!error && !notice) return null;
5242
- return /* @__PURE__ */ jsx21("p", { className: cn9("min-w-0 flex-1 line-clamp-2 text-sm", error ? "text-destructive" : "text-success"), title: error ?? notice ?? void 0, children: error ?? notice });
5261
+ return /* @__PURE__ */ jsx21("p", { className: cn8("min-w-0 flex-1 line-clamp-2 text-sm", error ? "text-destructive" : "text-success"), title: error ?? notice ?? void 0, children: error ?? notice });
5243
5262
  }
5244
5263
 
5245
5264
  // src/sharing/MovePanel.tsx
@@ -5559,7 +5578,7 @@ function SharingSummary({ item, port, className }) {
5559
5578
  };
5560
5579
  }, [port, item, allowed]);
5561
5580
  if (!allowed || !text) return null;
5562
- return /* @__PURE__ */ jsx23("span", { className: cn10("truncate text-xs text-muted-foreground", className), children: text });
5581
+ return /* @__PURE__ */ jsx23("span", { className: cn9("truncate text-xs text-muted-foreground", className), children: text });
5563
5582
  }
5564
5583
 
5565
5584
  // src/ItemPane.tsx
@@ -5877,7 +5896,7 @@ function ItemPane(props) {
5877
5896
  ] }) : null
5878
5897
  ] });
5879
5898
  const filesProps = item ? { item, port, host, definition, organizations, arg: null, onClose: () => void 0, onChanged, onPanel } : null;
5880
- return /* @__PURE__ */ jsx24(RoomProvider, { value: room, children: /* @__PURE__ */ jsxs22("article", { ref: paneRef, "aria-label": item?.name ?? "New item", className: cn11(CONTROLS_CONTAINER_CLASS, "flex h-full min-h-0 flex-col bg-background"), children: [
5899
+ return /* @__PURE__ */ jsx24(RoomProvider, { value: room, children: /* @__PURE__ */ jsxs22("article", { ref: paneRef, "aria-label": item?.name ?? "New item", className: cn10(CONTROLS_CONTAINER_CLASS, "flex h-full min-h-0 flex-col bg-background"), children: [
5881
5900
  header,
5882
5901
  error ? /* @__PURE__ */ jsx24("div", { role: "alert", className: "border-b border-border bg-muted px-5 py-2 text-sm text-destructive", children: error }) : null,
5883
5902
  notice && !editing ? /* @__PURE__ */ jsx24("div", { role: "status", className: "border-b border-border bg-muted px-5 py-2 text-sm text-warning", children: notice }) : null,
@@ -6077,7 +6096,7 @@ function ItemPane(props) {
6077
6096
  viewCustom.map((c) => /* @__PURE__ */ jsx24(PlainRow, { label: c.label, value: c.value, openUrl: host.openUrl }, c.key))
6078
6097
  ] }) : null,
6079
6098
  filesProps ? /* @__PURE__ */ jsx24(FilesSection, { ...filesProps, editing: false }) : null,
6080
- /* @__PURE__ */ jsxs22("p", { className: cn11("px-1 text-xs text-muted-foreground"), children: [
6099
+ /* @__PURE__ */ jsxs22("p", { className: cn10("px-1 text-xs text-muted-foreground"), children: [
6081
6100
  "Modified ",
6082
6101
  formatAbsoluteDate3(item.updatedAt, DAY_FORMAT, ""),
6083
6102
  " \xB7 Created ",
@@ -6245,7 +6264,7 @@ function ListRow({ item, family, port, on, onSelect, withOwner, ownContextMenu,
6245
6264
  ];
6246
6265
  const entriesRef = useRef13(entries);
6247
6266
  entriesRef.current = entries;
6248
- const glyphOf = (e) => e.id === "copy:username" ? /* @__PURE__ */ jsx25(UserGlyph, { className: "size-4" }) : e.id === "copy:password" ? /* @__PURE__ */ jsx25(KeyGlyph, { className: "size-4" }) : e.id === "copy:code" ? /* @__PURE__ */ jsx25(ClockGlyph, { className: "size-4" }) : e.kind === "favorite" ? /* @__PURE__ */ jsx25(StarGlyph, { className: cn12("size-4", favorite?.on && "fill-current text-warning") }) : e.kind === "open" ? /* @__PURE__ */ jsx25(ChevronRightGlyph, { className: "size-4" }) : e.kind === "host" || e.kind === "manage" ? null : /* @__PURE__ */ jsx25(CopyIcon7, { className: "size-4" });
6267
+ const glyphOf = (e) => e.id === "copy:username" ? /* @__PURE__ */ jsx25(UserGlyph, { className: "size-4" }) : e.id === "copy:password" ? /* @__PURE__ */ jsx25(KeyGlyph, { className: "size-4" }) : e.id === "copy:code" ? /* @__PURE__ */ jsx25(ClockGlyph, { className: "size-4" }) : e.kind === "favorite" ? /* @__PURE__ */ jsx25(StarGlyph, { className: cn11("size-4", favorite?.on && "fill-current text-warning") }) : e.kind === "open" ? /* @__PURE__ */ jsx25(ChevronRightGlyph, { className: "size-4" }) : e.kind === "host" || e.kind === "manage" ? null : /* @__PURE__ */ jsx25(CopyIcon7, { className: "size-4" });
6249
6268
  const menuItem = (e) => /* @__PURE__ */ jsxs23(DropdownMenuItem4, { disabled: e.disabled ?? false, onSelect: e.onSelect, children: [
6250
6269
  glyphOf(e),
6251
6270
  e.label
@@ -6261,25 +6280,23 @@ function ListRow({ item, family, port, on, onSelect, withOwner, ownContextMenu,
6261
6280
  setMenuOpen(true);
6262
6281
  } : void 0,
6263
6282
  children: [
6264
- /* @__PURE__ */ jsxs23(
6265
- "button",
6283
+ /* @__PURE__ */ jsx25(
6284
+ Tile3,
6266
6285
  {
6267
6286
  type: "button",
6268
6287
  "aria-current": on ? "true" : void 0,
6269
6288
  "data-surface": on ? "primary" : void 0,
6270
6289
  onClick: () => onSelect(item.id),
6271
- className: cn12("flex h-12 w-full items-center gap-3 rounded-lg px-2 pr-10 text-left", on ? "bg-primary text-primary-foreground" : "hover:bg-accent"),
6272
- children: [
6273
- /* @__PURE__ */ jsx25(ItemIcon, { definitionKey: item.definitionKey, family, site: loginSiteOf(item), inverted: on }),
6274
- /* @__PURE__ */ jsxs23("span", { className: "flex min-w-0 flex-1 flex-col leading-tight", children: [
6275
- /* @__PURE__ */ jsx25("span", { className: "truncate text-sm font-medium", children: item.name }),
6276
- /* @__PURE__ */ jsx25("span", { className: "truncate text-xs text-muted-foreground", children: subtitleOf(item, withOwner) })
6277
- ] })
6278
- ]
6290
+ layout: "row",
6291
+ variant: "quiet",
6292
+ icon: /* @__PURE__ */ jsx25(ItemIcon, { definitionKey: item.definitionKey, family, site: loginSiteOf(item), inverted: on }),
6293
+ title: item.name,
6294
+ line: subtitleOf(item, withOwner),
6295
+ className: "w-full pr-10"
6279
6296
  }
6280
6297
  ),
6281
6298
  /* @__PURE__ */ jsxs23("div", { className: "absolute right-1.5 top-1/2 flex -translate-y-1/2 items-center gap-0.5", "data-surface": on ? "primary" : void 0, children: [
6282
- user || secret || favorite ? /* @__PURE__ */ jsxs23("div", { className: cn12("hidden items-center gap-0.5 rounded-md pl-2 [@media(hover:hover)]:group-hover:flex [@media(hover:hover)]:group-focus-within:flex", on ? "bg-primary" : "bg-accent"), "data-row-quick": "", children: [
6299
+ user || secret || favorite ? /* @__PURE__ */ jsxs23("div", { className: cn11("hidden items-center gap-0.5 rounded-md pl-2 [@media(hover:hover)]:group-hover:flex [@media(hover:hover)]:group-focus-within:flex", on ? "bg-primary" : "bg-accent"), "data-row-quick": "", children: [
6283
6300
  favorite ? /* @__PURE__ */ jsx25(Button22, { variant: "quiet", icon: /* @__PURE__ */ jsx25(StarGlyph, { className: favorite.on ? "fill-current text-warning" : "" }), "aria-label": favorite.on ? "Remove from favorites" : "Add to favorites", "aria-pressed": favorite.on, onClick: favorite.toggle }) : null,
6284
6301
  user ? /* @__PURE__ */ jsx25(Button22, { variant: "quiet", icon: /* @__PURE__ */ jsx25(UserGlyph, {}), "aria-label": `Copy ${user.label}`, disabled: busy, onClick: copyUser }) : null,
6285
6302
  secret ? /* @__PURE__ */ jsx25(Button22, { variant: "quiet", icon: /* @__PURE__ */ jsx25(KeyGlyph, {}), "aria-label": "Copy password", disabled: busy, onClick: copyPassword }) : null
@@ -6292,7 +6309,7 @@ function ListRow({ item, family, port, on, onSelect, withOwner, ownContextMenu,
6292
6309
  icon: /* @__PURE__ */ jsx25(MoreGlyph, {}),
6293
6310
  "aria-label": `Actions for ${item.name}`,
6294
6311
  disabled: busy,
6295
- className: cn12("[@media(hover:hover)]:invisible [@media(hover:hover)]:group-hover:visible [@media(hover:hover)]:group-focus-within:visible", menuOpen && "[@media(hover:hover)]:visible")
6312
+ className: cn11("[@media(hover:hover)]:invisible [@media(hover:hover)]:group-hover:visible [@media(hover:hover)]:group-focus-within:visible", menuOpen && "[@media(hover:hover)]:visible")
6296
6313
  }
6297
6314
  ) }),
6298
6315
  /* @__PURE__ */ jsxs23(DropdownMenuContent4, { align: "end", children: [
@@ -6570,8 +6587,7 @@ function TrashView({ port, deleted, query, header, onChanged }) {
6570
6587
 
6571
6588
  // src/NewItemFlow.tsx
6572
6589
  import { useMemo as useMemo4, useState as useState29 } from "react";
6573
- import { cn as cn13 } from "@ai-matrx/design-system";
6574
- import { Button as Button25, Field as Field10, SearchField as SearchField2 } from "@ai-matrx/design-system/controls";
6590
+ import { Button as Button25, Field as Field10, SearchField as SearchField2, Tile as Tile4 } from "@ai-matrx/design-system/controls";
6575
6591
  import { GlobeIcon as GlobeIcon2 } from "@ai-matrx/design-system/icons";
6576
6592
  import { jsx as jsx28, jsxs as jsxs26 } from "react/jsx-runtime";
6577
6593
  function NewItemFlow({ definitions, url, onUrl, onChoose, onCancel }) {
@@ -6629,10 +6645,17 @@ function NewItemFlow({ definitions, url, onUrl, onChoose, onCancel }) {
6629
6645
  /* @__PURE__ */ jsx28("div", { className: "flex items-center justify-between gap-3", children: /* @__PURE__ */ jsx28("h3", { className: "text-xs font-medium text-muted-foreground", children: search.trim() ? "Matching types" : "Or choose a type" }) }),
6630
6646
  /* @__PURE__ */ jsx28("ul", { className: "grid grid-cols-1 gap-2 sm:grid-cols-2", children: shown.map((d) => {
6631
6647
  const Icon = definitionGlyph(d.key, d.family);
6632
- return /* @__PURE__ */ jsx28("li", { children: /* @__PURE__ */ jsxs26("button", { type: "button", onClick: () => use(d), className: cn13("flex h-12 w-full items-center gap-3 rounded-xl border border-border bg-card px-3 text-left hover:bg-accent"), children: [
6633
- /* @__PURE__ */ jsx28("span", { className: "flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted", children: /* @__PURE__ */ jsx28(Icon, { className: "size-4" }) }),
6634
- /* @__PURE__ */ jsx28("span", { className: "min-w-0 flex-1 truncate text-sm font-medium", children: d.label })
6635
- ] }) }, d.key);
6648
+ return /* @__PURE__ */ jsx28("li", { children: /* @__PURE__ */ jsx28(
6649
+ Tile4,
6650
+ {
6651
+ type: "button",
6652
+ onClick: () => use(d),
6653
+ variant: "outline",
6654
+ icon: /* @__PURE__ */ jsx28(Icon, { className: "size-4" }),
6655
+ title: d.label,
6656
+ className: "w-full"
6657
+ }
6658
+ ) }, d.key);
6636
6659
  }) }),
6637
6660
  search.trim() && matches.length === 0 ? /* @__PURE__ */ jsx28("p", { className: "px-1 text-sm text-muted-foreground", children: "No type matches." }) : null,
6638
6661
  /* @__PURE__ */ jsx28(SearchField2, { value: search, onChange: (e) => setSearch(e.target.value), placeholder: `Search all ${definitions.length} types`, "aria-label": "Search types" })
@@ -7529,7 +7552,7 @@ function Importer({ bridge, readLimits, activeOrganizationId, organizations, onC
7529
7552
  // src/extension/PageView.tsx
7530
7553
  import { useState as useState37 } from "react";
7531
7554
  import { SiteIcon } from "@ai-matrx/design-system";
7532
- import { Button as Button32 } from "@ai-matrx/design-system/controls";
7555
+ import { Button as Button32, Tile as Tile5 } from "@ai-matrx/design-system/controls";
7533
7556
  import { GlobeIcon as GlobeIcon3 } from "@ai-matrx/design-system/icons";
7534
7557
 
7535
7558
  // src/extension/CaptureCard.tsx
@@ -7849,13 +7872,18 @@ function MatchRow({ itemId, item, tag, family, port, busy, running, onOpen, onFi
7849
7872
  };
7850
7873
  const subtitle = [item ? loginSiteOf(item) || item.definitionLabel : "", tag].filter(Boolean).join(" \xB7 ");
7851
7874
  return /* @__PURE__ */ jsxs33("li", { className: "flex h-12 items-center gap-1 pl-1 pr-2", "data-item": itemId, children: [
7852
- /* @__PURE__ */ jsxs33("button", { type: "button", onClick: () => onOpen(itemId), className: "flex h-11 min-w-0 flex-1 items-center gap-3 rounded-lg px-2 text-left hover:bg-accent", children: [
7853
- /* @__PURE__ */ jsx35(ItemIcon, { definitionKey: item?.definitionKey ?? "website_login", family, site: item ? loginSiteOf(item) : "" }),
7854
- /* @__PURE__ */ jsxs33("span", { className: "flex min-w-0 flex-1 flex-col leading-tight", children: [
7855
- /* @__PURE__ */ jsx35("span", { className: "truncate text-sm font-medium", children: item?.name ?? "Saved login" }),
7856
- subtitle ? /* @__PURE__ */ jsx35("span", { className: "truncate text-xs text-muted-foreground", children: subtitle }) : null
7857
- ] })
7858
- ] }),
7875
+ /* @__PURE__ */ jsx35(
7876
+ Tile5,
7877
+ {
7878
+ type: "button",
7879
+ variant: "quiet",
7880
+ onClick: () => onOpen(itemId),
7881
+ icon: /* @__PURE__ */ jsx35(ItemIcon, { definitionKey: item?.definitionKey ?? "website_login", family, site: item ? loginSiteOf(item) : "" }),
7882
+ title: item?.name ?? "Saved login",
7883
+ line: subtitle || void 0,
7884
+ className: "min-w-0 flex-1"
7885
+ }
7886
+ ),
7859
7887
  onFill ? /* @__PURE__ */ jsx35(Button32, { variant: "primary", disabled: busy, "aria-busy": running || void 0, onClick: onFill, "aria-label": `Fill ${item?.name ?? "this login"}`, children: running ? "Filling\u2026" : "Fill" }) : null,
7860
7888
  onSignIn ? /* @__PURE__ */ jsx35(Button32, { variant: onFill ? "outline" : "primary", icon: /* @__PURE__ */ jsx35(ShieldGlyph, {}), disabled: busy, onClick: onSignIn, "aria-label": `Sign me in with ${item?.name ?? "this login"}`, title: "Sign me in", children: "Sign me in" }) : null,
7861
7889
  user && item ? /* @__PURE__ */ jsx35(Button32, { variant: "quiet", icon: /* @__PURE__ */ jsx35(UserGlyph, {}), "aria-label": `Copy ${user.label}`, title: `Copy ${user.label}`, disabled: reading, onClick: () => void read(user.label, () => port.reveal(item, user.key)) }) : null,
@@ -7866,8 +7894,8 @@ function MatchRow({ itemId, item, tag, family, port, busy, running, onOpen, onFi
7866
7894
 
7867
7895
  // src/Sidebar.tsx
7868
7896
  import { useState as useState38 } from "react";
7869
- import { cn as cn14, useLook as useLook2 } from "@ai-matrx/design-system";
7870
- import { Select as Select11 } from "@ai-matrx/design-system/controls";
7897
+ import { cn as cn12 } from "@ai-matrx/design-system";
7898
+ import { DisclosureHeader as DisclosureHeader4, Select as Select11, Tile as Tile6 } from "@ai-matrx/design-system/controls";
7871
7899
  import { GlobeIcon as GlobeIcon4 } from "@ai-matrx/design-system/icons";
7872
7900
  import { jsx as jsx36, jsxs as jsxs34 } from "react/jsx-runtime";
7873
7901
  var AUTHENTICATOR_LABEL = "Authenticator";
@@ -7949,20 +7977,21 @@ function viewOptions(views, allCount, deletedCount, hasFavorites, hasRecents, ha
7949
7977
  ];
7950
7978
  }
7951
7979
  function Entry({ on, glyph: Icon, label, count: count2, onClick, nested = false }) {
7952
- const desktop = useLook2() === "desktop";
7953
- return /* @__PURE__ */ jsxs34(
7954
- "button",
7980
+ return /* @__PURE__ */ jsx36(
7981
+ Tile6,
7955
7982
  {
7956
7983
  type: "button",
7957
7984
  "aria-current": on ? "page" : void 0,
7985
+ selected: on,
7958
7986
  onClick,
7987
+ layout: "row",
7988
+ variant: "quiet",
7989
+ dense: true,
7990
+ icon: nested ? void 0 : /* @__PURE__ */ jsx36(Icon, { className: "size-4 shrink-0" }),
7991
+ title: label,
7992
+ ...count2 !== void 0 ? { end: /* @__PURE__ */ jsx36("span", { className: "text-xs tabular-nums text-muted-foreground", children: count2 }) } : {},
7959
7993
  "data-nested": nested ? "" : void 0,
7960
- className: cn14("flex h-8 w-full items-center gap-2.5 rounded-lg px-2.5 text-left text-sm", nested && "pl-9", on ? desktop ? "bg-sidebar-accent text-primary" : "bg-sidebar-accent font-medium text-sidebar-accent-foreground" : "text-sidebar-foreground hover:bg-sidebar-accent"),
7961
- children: [
7962
- nested ? null : /* @__PURE__ */ jsx36(Icon, { className: "size-4 shrink-0" }),
7963
- /* @__PURE__ */ jsx36("span", { className: "min-w-0 flex-1 truncate", children: label }),
7964
- count2 !== void 0 ? /* @__PURE__ */ jsx36("span", { className: "text-xs tabular-nums text-muted-foreground", children: count2 }) : null
7965
- ]
7994
+ className: cn12("w-full", nested && "pl-9")
7966
7995
  }
7967
7996
  );
7968
7997
  }
@@ -7992,11 +8021,18 @@ function VaultSidebar({ vault, choices, onVault, view, allCount, deletedCount, v
7992
8021
  e === openCategory(view, views) ? e.families?.map((f) => /* @__PURE__ */ jsx36(Entry, { nested: true, on: view === f.view, glyph: f.glyph, label: f.label, count: f.count, onClick: () => onView(f.view) }, f.view)) : null
7993
8022
  ] }, e.view)) }) : null,
7994
8023
  views.tags.length > 0 ? /* @__PURE__ */ jsxs34("div", { className: "flex flex-col gap-0.5", children: [
7995
- /* @__PURE__ */ jsxs34("button", { type: "button", "aria-expanded": tagsOpen, onClick: () => setTagsOpen((o) => !o), className: "flex h-7 items-center gap-1 rounded-md px-2.5 text-left text-xs font-medium text-muted-foreground hover:text-foreground", children: [
7996
- tagsOpen ? /* @__PURE__ */ jsx36(ChevronDownGlyph, { className: "size-3.5" }) : /* @__PURE__ */ jsx36(ChevronRightGlyph, { className: "size-3.5" }),
7997
- "Tags",
7998
- /* @__PURE__ */ jsx36("span", { className: "ml-auto tabular-nums", children: views.tags.length })
7999
- ] }),
8024
+ /* @__PURE__ */ jsx36(
8025
+ DisclosureHeader4,
8026
+ {
8027
+ type: "button",
8028
+ variant: "label",
8029
+ open: tagsOpen,
8030
+ onClick: () => setTagsOpen((o) => !o),
8031
+ title: "Tags",
8032
+ meta: views.tags.length,
8033
+ className: "w-full px-2.5"
8034
+ }
8035
+ ),
8000
8036
  tagsOpen ? views.tags.map((e) => /* @__PURE__ */ jsx36(Entry, { on: view === e.view, glyph: e.glyph, label: e.label, count: e.count, onClick: () => onView(e.view) }, e.view)) : null
8001
8037
  ] }) : null
8002
8038
  ] }),
@@ -8007,11 +8043,19 @@ function VaultSidebar({ vault, choices, onVault, view, allCount, deletedCount, v
8007
8043
  /* @__PURE__ */ jsx36(Entry, { on: false, glyph: SafeGlyph, label: "Backup", onClick: () => onPanel("backup") }),
8008
8044
  /* @__PURE__ */ jsx36(Entry, { on: false, glyph: ShieldGlyph, label: "Browsers that fill", onClick: () => onPanel("devices") }),
8009
8045
  hasNativeImport ? /* @__PURE__ */ jsx36(Entry, { on: false, glyph: ImportGlyph, label: "Import passkeys", onClick: () => onPanel("import-passkeys") }) : null,
8010
- nativeProvider && nativeProvider.status !== "unavailable" ? /* @__PURE__ */ jsxs34("button", { type: "button", onClick: nativeProvider.openSetup, className: "flex h-8 w-full items-center gap-2.5 rounded-lg px-2.5 text-left text-sm hover:bg-sidebar-accent", children: [
8011
- /* @__PURE__ */ jsx36(ShieldGlyph, { className: "size-4 shrink-0" }),
8012
- /* @__PURE__ */ jsx36("span", { className: "min-w-0 flex-1 truncate", children: "System AutoFill" }),
8013
- /* @__PURE__ */ jsx36("span", { className: cn14("text-xs", nativeProvider.status === "ready" ? "text-success" : "text-warning"), children: nativeProvider.status === "ready" ? "On" : "Set up" })
8014
- ] }) : null,
8046
+ nativeProvider && nativeProvider.status !== "unavailable" ? /* @__PURE__ */ jsx36(
8047
+ Tile6,
8048
+ {
8049
+ type: "button",
8050
+ variant: "quiet",
8051
+ dense: true,
8052
+ onClick: nativeProvider.openSetup,
8053
+ icon: /* @__PURE__ */ jsx36(ShieldGlyph, { className: "size-4 shrink-0" }),
8054
+ title: "System AutoFill",
8055
+ end: /* @__PURE__ */ jsx36("span", { className: cn12("text-xs", nativeProvider.status === "ready" ? "text-success" : "text-warning"), children: nativeProvider.status === "ready" ? "On" : "Set up" }),
8056
+ className: "w-full"
8057
+ }
8058
+ ) : null,
8015
8059
  onOpenWeb ? /* @__PURE__ */ jsx36(Entry, { on: false, glyph: ExternalGlyph, label: "Open on the web", onClick: onOpenWeb }) : null,
8016
8060
  onLock ? /* @__PURE__ */ jsx36(Entry, { on: false, glyph: LockGlyph, label: "Lock", onClick: onLock }) : null
8017
8061
  ] })
@@ -8625,7 +8669,7 @@ function Workspace({ port, host = NO_HOST, layout = "auto", location, onLocation
8625
8669
  return /* @__PURE__ */ jsxs35("div", { ref: rootRef, className: "flex h-full min-h-0 w-full flex-col bg-background text-foreground", children: [
8626
8670
  refreshError ? /* @__PURE__ */ jsxs35("div", { role: "status", className: "flex items-center gap-3 border-b border-border bg-muted px-4 py-2 text-sm", children: [
8627
8671
  /* @__PURE__ */ jsx37("span", { className: "min-w-0 flex-1 truncate text-warning", title: refreshError, children: "Couldn\u2019t refresh. Showing what was loaded." }),
8628
- /* @__PURE__ */ jsx37("button", { type: "button", className: "shrink-0 text-primary hover:underline", onClick: refresh, children: "Try again" })
8672
+ /* @__PURE__ */ jsx37(Button33, { type: "button", variant: "link", className: "shrink-0", onClick: refresh, children: "Try again" })
8629
8673
  ] }) : null,
8630
8674
  hasPrompts ? (
8631
8675
  // "Save this login?" and "Turn on filling" show above the list in every view, not only "This page".
@@ -8640,7 +8684,7 @@ function Workspace({ port, host = NO_HOST, layout = "auto", location, onLocation
8640
8684
  snap.unavailable.join(", "),
8641
8685
  ". Showing the rest."
8642
8686
  ] }),
8643
- /* @__PURE__ */ jsx37("button", { type: "button", className: "shrink-0 text-primary hover:underline", onClick: refresh, children: "Try again" })
8687
+ /* @__PURE__ */ jsx37(Button33, { type: "button", variant: "link", className: "shrink-0", onClick: refresh, children: "Try again" })
8644
8688
  ] }) : null,
8645
8689
  /* @__PURE__ */ jsxs35("div", { className: `grid min-h-0 w-full flex-1 ${grid} overflow-hidden`, children: [
8646
8690
  mode === "full" ? /* @__PURE__ */ jsx37(