@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 +11 -2
- package/dist/index.cjs +23 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +24 -19
- package/dist/index.js.map +1 -1
- package/package.json +10 -10
package/dist/index.js
CHANGED
|
@@ -1293,14 +1293,12 @@ function CodeButton({ live, digits, size = "md", label }) {
|
|
|
1293
1293
|
disabled: !live.code,
|
|
1294
1294
|
onClick: () => live.code && void copy(live.code),
|
|
1295
1295
|
"aria-label": live.code ? `Copy ${label} code` : `Getting ${label} code`,
|
|
1296
|
+
...live.code ? { tooltip: "Copy code" } : {},
|
|
1296
1297
|
variant: "quiet",
|
|
1297
1298
|
layout: "row",
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
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
|
-
] }),
|
|
1303
|
-
className: "max-w-full shrink-0"
|
|
1299
|
+
fit: true,
|
|
1300
|
+
title: /* @__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
|
+
end: 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 })
|
|
1304
1302
|
}
|
|
1305
1303
|
);
|
|
1306
1304
|
}
|
|
@@ -2102,7 +2100,7 @@ function OtpListRow({ port, item, family, entry, onOpen, onOpenInNewTab, onRenam
|
|
|
2102
2100
|
const canManage = item.capabilities.canManage || item.capabilities.canEdit;
|
|
2103
2101
|
if (a.removed) return null;
|
|
2104
2102
|
const sub = a.error ?? [entry?.account, loginSiteOf(item) || entry?.issuer].filter((v, i, all) => Boolean(v) && all.indexOf(v) === i).join(" \xB7 ");
|
|
2105
|
-
return /* @__PURE__ */ jsxs9("div", { className: "grid min-h-14 grid-cols-[2rem_minmax(0,1fr)_auto_auto] items-center gap-x-
|
|
2103
|
+
return /* @__PURE__ */ jsxs9("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: [
|
|
2106
2104
|
/* @__PURE__ */ jsx10(
|
|
2107
2105
|
Button8,
|
|
2108
2106
|
{
|
|
@@ -2123,6 +2121,7 @@ function OtpListRow({ port, item, family, entry, onOpen, onOpenInNewTab, onRenam
|
|
|
2123
2121
|
onClick: onOpen,
|
|
2124
2122
|
title: /* @__PURE__ */ jsx10("span", { className: a.enabled ? "text-foreground" : "text-muted-foreground", children: item.name }),
|
|
2125
2123
|
line: sub ? /* @__PURE__ */ jsx10("span", { className: a.error ? "text-destructive" : "text-muted-foreground", title: sub, children: sub }) : void 0,
|
|
2124
|
+
oneLine: true,
|
|
2126
2125
|
className: "min-w-0"
|
|
2127
2126
|
}
|
|
2128
2127
|
),
|
|
@@ -3084,7 +3083,7 @@ function BackupPanel({ port, host, items, onClose, onChanged }) {
|
|
|
3084
3083
|
/* @__PURE__ */ jsx14(Summary, { value: backup }),
|
|
3085
3084
|
/* @__PURE__ */ jsx14(Omissions, { omissions: backup.omissions, accepted, onAccepted: setAccepted, verb: "Back up" }),
|
|
3086
3085
|
/* @__PURE__ */ jsxs13(VaultSection, { children: [
|
|
3087
|
-
/* @__PURE__ */ jsx14(VaultRow, { label: "Passphrase", hint: minLength ? `At least ${minLength} characters. Not saved.` : "Not saved. It can't be recovered.", children: /* @__PURE__ */ jsx14(Field5, { type: "password", value: passphrase, autoComplete: "new-password", "aria-label": "Backup passphrase", "aria-invalid": short || void 0, onChange: (e) => setPassphrase(e.target.value) }) }),
|
|
3086
|
+
/* @__PURE__ */ jsx14(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__ */ jsx14(Field5, { type: "password", value: passphrase, autoComplete: "new-password", "aria-label": "Backup passphrase", "aria-invalid": short || void 0, onChange: (e) => setPassphrase(e.target.value) }) }),
|
|
3088
3087
|
short ? /* @__PURE__ */ jsxs13("p", { role: "alert", className: "px-1 text-xs text-destructive", "data-passphrase-too-short": "", children: [
|
|
3089
3088
|
"Use at least ",
|
|
3090
3089
|
minLength,
|
|
@@ -6285,14 +6284,17 @@ function ListRow({ item, family, port, on, onSelect, withOwner, ownContextMenu,
|
|
|
6285
6284
|
{
|
|
6286
6285
|
type: "button",
|
|
6287
6286
|
"aria-current": on ? "true" : void 0,
|
|
6288
|
-
|
|
6287
|
+
selected: on,
|
|
6288
|
+
selectedStyle: "primary",
|
|
6289
6289
|
onClick: () => onSelect(item.id),
|
|
6290
6290
|
layout: "row",
|
|
6291
6291
|
variant: "quiet",
|
|
6292
|
+
endInset: "control",
|
|
6293
|
+
oneLine: true,
|
|
6292
6294
|
icon: /* @__PURE__ */ jsx25(ItemIcon, { definitionKey: item.definitionKey, family, site: loginSiteOf(item), inverted: on }),
|
|
6293
6295
|
title: item.name,
|
|
6294
6296
|
line: subtitleOf(item, withOwner),
|
|
6295
|
-
className: "w-full
|
|
6297
|
+
className: "w-full"
|
|
6296
6298
|
}
|
|
6297
6299
|
),
|
|
6298
6300
|
/* @__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: [
|
|
@@ -7780,8 +7782,8 @@ function PageView({ port, page, fill, capture, fillSetup, newPasswordFields, ite
|
|
|
7780
7782
|
const familyOf2 = (key) => definitions.find((d) => d.key === key)?.family ?? "generic";
|
|
7781
7783
|
const canSave = isFillablePage(page.url);
|
|
7782
7784
|
const signIn = page.signIn;
|
|
7783
|
-
const act = async (itemId, run, failed) => {
|
|
7784
|
-
setRunning(itemId);
|
|
7785
|
+
const act = async (itemId, action, run, failed) => {
|
|
7786
|
+
setRunning({ itemId, action });
|
|
7785
7787
|
setSaid(null);
|
|
7786
7788
|
try {
|
|
7787
7789
|
setSaid(await run());
|
|
@@ -7814,10 +7816,10 @@ function PageView({ port, page, fill, capture, fillSetup, newPasswordFields, ite
|
|
|
7814
7816
|
family: item ? familyOf2(item.definitionKey) : "generic",
|
|
7815
7817
|
port,
|
|
7816
7818
|
busy: running !== null,
|
|
7817
|
-
running: running === itemId,
|
|
7819
|
+
running: running?.itemId === itemId ? running.action : null,
|
|
7818
7820
|
onOpen,
|
|
7819
|
-
onFill: fill && !page.blocked && fillable.has(itemId) && item?.capabilities.canUse !== false ? () => void act(itemId, async () => FILL_WORDS[await fill(itemId)], FILL_WORDS.unavailable) : null,
|
|
7820
|
-
onSignIn: signIn ? () => void act(itemId, async () => SIGN_IN_WORDS[await signIn(itemId)], SIGN_IN_WORDS.unknown) : null
|
|
7821
|
+
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,
|
|
7822
|
+
onSignIn: signIn ? () => void act(itemId, "signIn", async () => SIGN_IN_WORDS[await signIn(itemId)], SIGN_IN_WORDS.unknown) : null
|
|
7821
7823
|
},
|
|
7822
7824
|
itemId
|
|
7823
7825
|
)) });
|
|
@@ -7884,8 +7886,8 @@ function MatchRow({ itemId, item, tag, family, port, busy, running, onOpen, onFi
|
|
|
7884
7886
|
className: "min-w-0 flex-1"
|
|
7885
7887
|
}
|
|
7886
7888
|
),
|
|
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,
|
|
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,
|
|
7889
|
+
onFill ? /* @__PURE__ */ jsx35(Button32, { 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,
|
|
7890
|
+
onSignIn ? /* @__PURE__ */ jsx35(Button32, { variant: onFill ? "outline" : "primary", icon: /* @__PURE__ */ jsx35(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,
|
|
7889
7891
|
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,
|
|
7890
7892
|
secret && item ? /* @__PURE__ */ jsx35(Button32, { variant: "quiet", icon: /* @__PURE__ */ jsx35(KeyGlyph, {}), "aria-label": "Copy password", title: "Copy password", disabled: reading, onClick: () => void read("Password", () => port.reveal(item, secret.key)) }) : null,
|
|
7891
7893
|
otp ? /* @__PURE__ */ jsx35(Button32, { variant: "quiet", icon: /* @__PURE__ */ jsx35(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
|
|
@@ -7894,7 +7896,7 @@ function MatchRow({ itemId, item, tag, family, port, busy, running, onOpen, onFi
|
|
|
7894
7896
|
|
|
7895
7897
|
// src/Sidebar.tsx
|
|
7896
7898
|
import { useState as useState38 } from "react";
|
|
7897
|
-
import { cn as cn12 } from "@ai-matrx/design-system";
|
|
7899
|
+
import { cn as cn12, useLook as useLook2 } from "@ai-matrx/design-system";
|
|
7898
7900
|
import { DisclosureHeader as DisclosureHeader4, Select as Select11, Tile as Tile6 } from "@ai-matrx/design-system/controls";
|
|
7899
7901
|
import { GlobeIcon as GlobeIcon4 } from "@ai-matrx/design-system/icons";
|
|
7900
7902
|
import { jsx as jsx36, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
@@ -7977,12 +7979,14 @@ function viewOptions(views, allCount, deletedCount, hasFavorites, hasRecents, ha
|
|
|
7977
7979
|
];
|
|
7978
7980
|
}
|
|
7979
7981
|
function Entry({ on, glyph: Icon, label, count: count2, onClick, nested = false }) {
|
|
7982
|
+
const desktop = useLook2() === "desktop";
|
|
7980
7983
|
return /* @__PURE__ */ jsx36(
|
|
7981
7984
|
Tile6,
|
|
7982
7985
|
{
|
|
7983
7986
|
type: "button",
|
|
7984
7987
|
"aria-current": on ? "page" : void 0,
|
|
7985
7988
|
selected: on,
|
|
7989
|
+
...desktop ? { selectedStyle: "fill" } : {},
|
|
7986
7990
|
onClick,
|
|
7987
7991
|
layout: "row",
|
|
7988
7992
|
variant: "quiet",
|
|
@@ -7990,8 +7994,9 @@ function Entry({ on, glyph: Icon, label, count: count2, onClick, nested = false
|
|
|
7990
7994
|
icon: nested ? void 0 : /* @__PURE__ */ jsx36(Icon, { className: "size-4 shrink-0" }),
|
|
7991
7995
|
title: label,
|
|
7992
7996
|
...count2 !== void 0 ? { end: /* @__PURE__ */ jsx36("span", { className: "text-xs tabular-nums text-muted-foreground", children: count2 }) } : {},
|
|
7997
|
+
...nested ? { level: 1 } : {},
|
|
7993
7998
|
"data-nested": nested ? "" : void 0,
|
|
7994
|
-
className:
|
|
7999
|
+
className: "w-full"
|
|
7995
8000
|
}
|
|
7996
8001
|
);
|
|
7997
8002
|
}
|