@ai-matrx/vault 0.1.45 → 0.1.47

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,33 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.47
4
+
5
+ - **A same-name organization hint is at most 8 id characters.** It is the id's start when that tells the group apart, else its end ("…" first), so five orgs whose ids share 32 characters no longer push the name out of the switcher and pickers. The authenticator code row's label column is 5.25rem, so "Authenticator" no longer wraps in a narrow pane. Guard: `src/organization-hints-distinct.test.ts`. Consumer action: none.
6
+
7
+ ## 0.1.46
8
+
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 98cd616344 d445d7108d -- apps/shared/vault/src`
12
+
13
+ Changed shipped source files (1):
14
+ - `apps/shared/vault/src/authenticator/TotpRows.tsx`
15
+
3
16
  ## 0.1.45
4
17
 
5
18
  - **Narrow-container fixes from the 360px / 22.5rem playground walk** (2026-10-23): an Authenticator list row measures its OWN width, so below 26rem the code drops onto a second line under the name (the name keeps the row, the code is never squeezed) and above it everything stays on one line; the camera notes in Add authenticator wrap to a second line instead of being cut by Dismiss, and the setup-key hint is "Setup key or link" (`SETUP_KEY_PLACEHOLDER`, measured to fit the box at 360px); same-named organizations get the shortest id fragment that differs inside their group (`organizationHints`, a suffix when whole ids collide) instead of an identical first 8 characters; the item header measures its pane, not the window (the star and Share step into the "..." menu, the title wraps to two lines, the owner badge wraps below instead of clipping), and the one-time password row hides its separate copy button below 24rem so the ring never sits on it ("Copy code" is in its menu; the code itself still copies). Proof: `src/container-responsive-layout.test.tsx`, `src/narrow-setup-notes.test.tsx`, `src/organization-hints-distinct.test.ts`. Consumer action: none.
6
19
 
20
+ ## 0.1.44
21
+
22
+ SOURCE CHANGED WITH NO RELEASE NOTE. This release shipped source changes that nobody described in an Unreleased entry,
23
+ so they may include breaking API changes. Consumer action is UNKNOWN: read the diff before upgrading.
24
+ Diff: `git diff df0b433d21 552fd6028c -- apps/shared/vault/src`
25
+
26
+ Changed shipped source files (3):
27
+ - `apps/shared/vault/src/ItemPane.tsx`
28
+ - `apps/shared/vault/src/authenticator/AuthenticatorView.tsx`
29
+ - `apps/shared/vault/src/authenticator/TotpRows.tsx`
30
+
7
31
  ## 0.1.41
8
32
 
9
33
  Automatic changed-only republish (docs/metadata drift since the last published version; verified: `git diff 7448cb2ff1 f1984cb2e2 -- apps/shared/vault/src`
package/dist/index.cjs CHANGED
@@ -2231,6 +2231,7 @@ function TotpRow({ port, item, onChanged }) {
2231
2231
  VaultRow,
2232
2232
  {
2233
2233
  label: "Authenticator",
2234
+ className: "@max-[24rem]/otprow:grid-cols-[5.25rem_minmax(0,1fr)_auto] @max-[24rem]/otprow:gap-x-1 @max-[24rem]/otprow:px-2",
2234
2235
  actions: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
2235
2236
  a.enabled ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "hidden @[24rem]/otprow:contents", "data-copy-code-button": "", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(CopyCodeButton, { live, label: item.name }) }) : null,
2236
2237
  menu
@@ -3266,6 +3267,7 @@ function orderOrganizations(orgs, items, recentItemIds) {
3266
3267
  const group = (o) => recent.has(o.id) ? 0 : (counts.get(o.id) ?? 0) > 0 ? 1 : 2;
3267
3268
  return [...orgs].sort((a, b) => group(a) - group(b) || (recent.get(a.id) ?? 0) - (recent.get(b.id) ?? 0) || a.name.localeCompare(b.name, void 0, { sensitivity: "base" }) || a.id.localeCompare(b.id));
3268
3269
  }
3270
+ var HINT_LENGTH = 8;
3269
3271
  function organizationHints(orgs) {
3270
3272
  const groups = /* @__PURE__ */ new Map();
3271
3273
  for (const o of orgs) {
@@ -3275,12 +3277,11 @@ function organizationHints(orgs) {
3275
3277
  const hints = /* @__PURE__ */ new Map();
3276
3278
  for (const group of groups.values()) {
3277
3279
  if (group.length < 2) continue;
3278
- const longest = Math.max(...group.map((o) => o.id.length));
3279
- const fragment = (o, n2) => o.id.slice(0, n2);
3280
- let n = 8;
3281
- while (n < longest && new Set(group.map((o) => fragment(o, n))).size < group.length) n += 1;
3282
- const useSuffix = new Set(group.map((o) => fragment(o, n))).size < group.length;
3283
- for (const o of group) hints.set(o.id, useSuffix ? o.id.slice(-8) : fragment(o, n));
3280
+ const distinct = (pick2) => new Set(group.map(pick2)).size === group.length;
3281
+ const head = (o) => o.id.slice(0, HINT_LENGTH);
3282
+ const tail = (o) => `\u2026${o.id.slice(-HINT_LENGTH)}`;
3283
+ const pick = distinct(head) || !distinct(tail) ? head : tail;
3284
+ for (const o of group) hints.set(o.id, pick(o));
3284
3285
  }
3285
3286
  return hints;
3286
3287
  }