@ai-matrx/vault 0.1.35 → 0.1.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,9 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.36
4
+
5
+ - **0.1.33 migration regressions fixed** (2026-10-23): the selected list row is readable again (primary fill, `selectedStyle="primary"`, no `data-surface` on a quiet Tile) and keeps room for its More button with a one-line subtitle; every Authenticator code shows the code as its label with "Copy code" as the tooltip and never squeezes (`fit`), and the list row's name keeps its width; type families nested under a sidebar category are indented again (`level`); the desktop look's selected sidebar row is the soft fill; "Sign me in" no longer makes Fill say "Filling…" (it says "Signing in…" itself); with a passphrase minimum the backup hint keeps "It can't be recovered." Proof: `src/review-0-1-36.test.tsx`. Consumer action: needs `@ai-matrx/design-system` with the Tile options above (the release train publishes both); nothing else.
6
+
3
7
  ## 0.1.35
4
8
 
5
- UNVERIFIED: this release has no Unreleased entry and the source comparison could not be made (the caller supplied no source comparison). Whether source changed is unknown; consumer action is unknown.
6
- Check the package's gitHead on npm against this version's gitHead: `git diff <previous gitHead> <this gitHead> -- apps/shared/vault/src`.
9
+ SOURCE CHANGED WITH NO RELEASE NOTE. This release shipped source changes that nobody described in an Unreleased entry,
10
+ so they may include breaking API changes. Consumer action is UNKNOWN: read the diff before upgrading.
11
+ Diff: `git diff aea0aaaeaf 0a2b8c9356 -- apps/shared/vault/src`
12
+
13
+ Changed shipped source files (2):
14
+ - `apps/shared/vault/src/identity.ts`
15
+ - `apps/shared/vault/src/index.ts`
7
16
 
8
17
  ## 0.1.34
9
18
 
package/dist/index.cjs CHANGED
@@ -1774,14 +1774,12 @@ function CodeButton({ live, digits, size = "md", label }) {
1774
1774
  disabled: !live.code,
1775
1775
  onClick: () => live.code && void copy(live.code),
1776
1776
  "aria-label": live.code ? `Copy ${label} code` : `Getting ${label} code`,
1777
+ ...live.code ? { tooltip: "Copy code" } : {},
1777
1778
  variant: "quiet",
1778
1779
  layout: "row",
1779
- title: "Copy code",
1780
- end: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("span", { className: (0, import_design_system8.cn)("inline-flex shrink-0 items-center", size === "lg" ? "gap-4" : "gap-3"), children: [
1781
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: (0, import_design_system8.cn)("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 }),
1782
- copied ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "inline-flex size-6 items-center justify-center text-success", role: "status", "aria-label": "Copied", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(CheckGlyph, { className: "size-4" }) }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(CountdownRing, { remaining: live.remaining, period: live.period, loading: !live.code })
1783
- ] }),
1784
- className: "max-w-full shrink-0"
1780
+ fit: true,
1781
+ title: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: (0, import_design_system8.cn)("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 }),
1782
+ end: copied ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "inline-flex size-6 items-center justify-center text-success", role: "status", "aria-label": "Copied", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(CheckGlyph, { className: "size-4" }) }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(CountdownRing, { remaining: live.remaining, period: live.period, loading: !live.code })
1785
1783
  }
1786
1784
  );
1787
1785
  }
@@ -2583,7 +2581,7 @@ function OtpListRow({ port, item, family, entry, onOpen, onOpenInNewTab, onRenam
2583
2581
  const canManage = item.capabilities.canManage || item.capabilities.canEdit;
2584
2582
  if (a.removed) return null;
2585
2583
  const sub = a.error ?? [entry?.account, loginSiteOf(item) || entry?.issuer].filter((v, i, all) => Boolean(v) && all.indexOf(v) === i).join(" \xB7 ");
2586
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("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: [
2584
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "grid min-h-14 grid-cols-[2rem_minmax(0,1fr)_auto_auto] items-center gap-x-1 rounded-lg px-2 py-1.5 transition-colors hover:bg-accent/50", children: [
2587
2585
  /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2588
2586
  import_controls9.Button,
2589
2587
  {
@@ -2604,6 +2602,7 @@ function OtpListRow({ port, item, family, entry, onOpen, onOpenInNewTab, onRenam
2604
2602
  onClick: onOpen,
2605
2603
  title: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: a.enabled ? "text-foreground" : "text-muted-foreground", children: item.name }),
2606
2604
  line: sub ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: a.error ? "text-destructive" : "text-muted-foreground", title: sub, children: sub }) : void 0,
2605
+ oneLine: true,
2607
2606
  className: "min-w-0"
2608
2607
  }
2609
2608
  ),
@@ -3562,7 +3561,7 @@ function BackupPanel({ port, host, items, onClose, onChanged }) {
3562
3561
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Summary, { value: backup }),
3563
3562
  /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Omissions, { omissions: backup.omissions, accepted, onAccepted: setAccepted, verb: "Back up" }),
3564
3563
  /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(VaultSection, { children: [
3565
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(VaultRow, { label: "Passphrase", hint: minLength ? `At least ${minLength} characters. Not saved.` : "Not saved. It can't be recovered.", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_controls13.Field, { type: "password", value: passphrase, autoComplete: "new-password", "aria-label": "Backup passphrase", "aria-invalid": short || void 0, onChange: (e) => setPassphrase(e.target.value) }) }),
3564
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(VaultRow, { label: "Passphrase", hint: minLength ? `At least ${minLength} characters. Not saved. It can't be recovered.` : "Not saved. It can't be recovered.", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_controls13.Field, { type: "password", value: passphrase, autoComplete: "new-password", "aria-label": "Backup passphrase", "aria-invalid": short || void 0, onChange: (e) => setPassphrase(e.target.value) }) }),
3566
3565
  short ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("p", { role: "alert", className: "px-1 text-xs text-destructive", "data-passphrase-too-short": "", children: [
3567
3566
  "Use at least ",
3568
3567
  minLength,
@@ -6763,14 +6762,17 @@ function ListRow({ item, family, port, on, onSelect, withOwner, ownContextMenu,
6763
6762
  {
6764
6763
  type: "button",
6765
6764
  "aria-current": on ? "true" : void 0,
6766
- "data-surface": on ? "primary" : void 0,
6765
+ selected: on,
6766
+ selectedStyle: "primary",
6767
6767
  onClick: () => onSelect(item.id),
6768
6768
  layout: "row",
6769
6769
  variant: "quiet",
6770
+ endInset: "control",
6771
+ oneLine: true,
6770
6772
  icon: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ItemIcon, { definitionKey: item.definitionKey, family, site: loginSiteOf(item), inverted: on }),
6771
6773
  title: item.name,
6772
6774
  line: subtitleOf(item, withOwner),
6773
- className: "w-full pr-10"
6775
+ className: "w-full"
6774
6776
  }
6775
6777
  ),
6776
6778
  /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("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: [
@@ -8258,8 +8260,8 @@ function PageView({ port, page, fill, capture, fillSetup, newPasswordFields, ite
8258
8260
  const familyOf2 = (key) => definitions.find((d) => d.key === key)?.family ?? "generic";
8259
8261
  const canSave = isFillablePage(page.url);
8260
8262
  const signIn = page.signIn;
8261
- const act = async (itemId, run, failed) => {
8262
- setRunning(itemId);
8263
+ const act = async (itemId, action, run, failed) => {
8264
+ setRunning({ itemId, action });
8263
8265
  setSaid(null);
8264
8266
  try {
8265
8267
  setSaid(await run());
@@ -8292,10 +8294,10 @@ function PageView({ port, page, fill, capture, fillSetup, newPasswordFields, ite
8292
8294
  family: item ? familyOf2(item.definitionKey) : "generic",
8293
8295
  port,
8294
8296
  busy: running !== null,
8295
- running: running === itemId,
8297
+ running: running?.itemId === itemId ? running.action : null,
8296
8298
  onOpen,
8297
- onFill: fill && !page.blocked && fillable.has(itemId) && item?.capabilities.canUse !== false ? () => void act(itemId, async () => FILL_WORDS[await fill(itemId)], FILL_WORDS.unavailable) : null,
8298
- onSignIn: signIn ? () => void act(itemId, async () => SIGN_IN_WORDS[await signIn(itemId)], SIGN_IN_WORDS.unknown) : null
8299
+ onFill: fill && !page.blocked && fillable.has(itemId) && item?.capabilities.canUse !== false ? () => void act(itemId, "fill", async () => FILL_WORDS[await fill(itemId)], FILL_WORDS.unavailable) : null,
8300
+ onSignIn: signIn ? () => void act(itemId, "signIn", async () => SIGN_IN_WORDS[await signIn(itemId)], SIGN_IN_WORDS.unknown) : null
8299
8301
  },
8300
8302
  itemId
8301
8303
  )) });
@@ -8362,8 +8364,8 @@ function MatchRow({ itemId, item, tag, family, port, busy, running, onOpen, onFi
8362
8364
  className: "min-w-0 flex-1"
8363
8365
  }
8364
8366
  ),
8365
- onFill ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_controls33.Button, { variant: "primary", disabled: busy, "aria-busy": running || void 0, onClick: onFill, "aria-label": `Fill ${item?.name ?? "this login"}`, children: running ? "Filling\u2026" : "Fill" }) : null,
8366
- onSignIn ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_controls33.Button, { variant: onFill ? "outline" : "primary", icon: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ShieldGlyph, {}), disabled: busy, onClick: onSignIn, "aria-label": `Sign me in with ${item?.name ?? "this login"}`, title: "Sign me in", children: "Sign me in" }) : null,
8367
+ onFill ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_controls33.Button, { variant: "primary", disabled: busy, "aria-busy": running === "fill" || void 0, onClick: onFill, "aria-label": `Fill ${item?.name ?? "this login"}`, children: running === "fill" ? "Filling\u2026" : "Fill" }) : null,
8368
+ onSignIn ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_controls33.Button, { variant: onFill ? "outline" : "primary", icon: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ShieldGlyph, {}), disabled: busy, "aria-busy": running === "signIn" || void 0, onClick: onSignIn, "aria-label": `Sign me in with ${item?.name ?? "this login"}`, title: "Sign me in", children: running === "signIn" ? "Signing in\u2026" : "Sign me in" }) : null,
8367
8369
  user && item ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_controls33.Button, { variant: "quiet", icon: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(UserGlyph, {}), "aria-label": `Copy ${user.label}`, title: `Copy ${user.label}`, disabled: reading, onClick: () => void read(user.label, () => port.reveal(item, user.key)) }) : null,
8368
8370
  secret && item ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_controls33.Button, { variant: "quiet", icon: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(KeyGlyph, {}), "aria-label": "Copy password", title: "Copy password", disabled: reading, onClick: () => void read("Password", () => port.reveal(item, secret.key)) }) : null,
8369
8371
  otp ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_controls33.Button, { variant: "quiet", icon: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ClockGlyph, {}), "aria-label": "Copy one-time code", title: "Copy one-time code", disabled: reading, onClick: () => void read("One-time code", async () => (await port.authenticator.code(otp)).code) }) : null
@@ -8455,12 +8457,14 @@ function viewOptions(views, allCount, deletedCount, hasFavorites, hasRecents, ha
8455
8457
  ];
8456
8458
  }
8457
8459
  function Entry({ on, glyph: Icon, label, count: count2, onClick, nested = false }) {
8460
+ const desktop = (0, import_design_system24.useLook)() === "desktop";
8458
8461
  return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
8459
8462
  import_controls34.Tile,
8460
8463
  {
8461
8464
  type: "button",
8462
8465
  "aria-current": on ? "page" : void 0,
8463
8466
  selected: on,
8467
+ ...desktop ? { selectedStyle: "fill" } : {},
8464
8468
  onClick,
8465
8469
  layout: "row",
8466
8470
  variant: "quiet",
@@ -8468,8 +8472,9 @@ function Entry({ on, glyph: Icon, label, count: count2, onClick, nested = false
8468
8472
  icon: nested ? void 0 : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Icon, { className: "size-4 shrink-0" }),
8469
8473
  title: label,
8470
8474
  ...count2 !== void 0 ? { end: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "text-xs tabular-nums text-muted-foreground", children: count2 }) } : {},
8475
+ ...nested ? { level: 1 } : {},
8471
8476
  "data-nested": nested ? "" : void 0,
8472
- className: (0, import_design_system24.cn)("w-full", nested && "pl-9")
8477
+ className: "w-full"
8473
8478
  }
8474
8479
  );
8475
8480
  }