@ai-matrx/vault 0.1.32 → 0.1.33
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 +5 -0
- package/dist/{chunk-IJVSAR5M.js → chunk-B5TOAIY6.js} +1 -2
- package/dist/identity.js +1 -1
- package/dist/index.cjs +123 -78
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +128 -84
- package/dist/index.js.map +1 -1
- package/knob-declaration.json +31 -0
- package/package.json +6 -5
- /package/dist/{chunk-IJVSAR5M.js.map → chunk-B5TOAIY6.js.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.33
|
|
4
|
+
|
|
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`.
|
|
7
|
+
|
|
3
8
|
## 0.1.32
|
|
4
9
|
|
|
5
10
|
- **New entry `@ai-matrx/vault/identity`** (build-cost lane, 2026-10-22): `createSupabaseIdentity`, `needsRecentSignIn`, `CONFIRM_RETURN_KEY`, `IdentityGate`, `useConfirmed`, `wasCancelled` and their types, without the Vault workspace. A host that only needs "Confirm it's you" (the share sheet) imported them from the root and so compiled every Vault screen plus `@zip.js/zip.js`, `lossless-json` and `saxes`; `/identity` reaches only the gate (~20 kB, no third-party deps). The ESM build is now one code-split pass, so the gate ships once for both entries (`check-ships-once` + `check-reexport-order` now run in `build`); the root still exports every name. Guard: `scripts/verify-tarball.mjs` walks `dist/identity.js` and fails if it reaches any importer dependency. Consumer action: import the identity names from `@ai-matrx/vault/identity` when you do not render the Vault.
|
|
@@ -443,7 +443,6 @@ export {
|
|
|
443
443
|
ListGlyph,
|
|
444
444
|
ImportGlyph,
|
|
445
445
|
ExportGlyph,
|
|
446
|
-
ChevronDownGlyph,
|
|
447
446
|
ChevronRightGlyph,
|
|
448
447
|
SortGlyph,
|
|
449
448
|
UserGlyph,
|
|
@@ -466,4 +465,4 @@ export {
|
|
|
466
465
|
IdentityGate,
|
|
467
466
|
wasCancelled
|
|
468
467
|
};
|
|
469
|
-
//# sourceMappingURL=chunk-
|
|
468
|
+
//# sourceMappingURL=chunk-B5TOAIY6.js.map
|
package/dist/identity.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -180,7 +180,7 @@ module.exports = __toCommonJS(src_exports);
|
|
|
180
180
|
|
|
181
181
|
// src/VaultApp.tsx
|
|
182
182
|
var import_react42 = require("react");
|
|
183
|
-
var
|
|
183
|
+
var import_design_system25 = require("@ai-matrx/design-system");
|
|
184
184
|
var import_controls35 = require("@ai-matrx/design-system/controls");
|
|
185
185
|
var import_confirm_opener14 = require("@ai-matrx/kit/confirm-opener");
|
|
186
186
|
|
|
@@ -824,7 +824,7 @@ function PlainRow({ label, value, hint: hint2, openUrl, extra, multiline = false
|
|
|
824
824
|
);
|
|
825
825
|
}
|
|
826
826
|
function AddRow({ label, onAdd, children = "Add" }) {
|
|
827
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(VaultRow, { label, children: onAdd ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
827
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(VaultRow, { label, children: onAdd ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_controls2.Button, { type: "button", variant: "quiet", onClick: onAdd, children }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "text-disabled-foreground", children: "\u2014" }) });
|
|
828
828
|
}
|
|
829
829
|
function EditRow({ label, hint: hint2, value, onChange, placeholder, secret = false, multiline = false, onRemove, removeLabel, actions, autoFocus, onBlur, inputMode }) {
|
|
830
830
|
const [shown, setShown] = (0, import_react5.useState)(false);
|
|
@@ -1767,19 +1767,21 @@ function useCopied() {
|
|
|
1767
1767
|
function CodeButton({ live, digits, size = "md", label }) {
|
|
1768
1768
|
const { copied, copy } = useCopied();
|
|
1769
1769
|
const shown = live.code ? (0, import_format5.groupCode)(live.code) : maskedCode(digits);
|
|
1770
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.
|
|
1771
|
-
|
|
1770
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1771
|
+
import_controls5.Tile,
|
|
1772
1772
|
{
|
|
1773
1773
|
type: "button",
|
|
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
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1777
|
+
variant: "quiet",
|
|
1778
|
+
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: [
|
|
1780
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 }),
|
|
1781
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 })
|
|
1782
|
-
]
|
|
1783
|
+
] }),
|
|
1784
|
+
className: "max-w-full shrink-0"
|
|
1783
1785
|
}
|
|
1784
1786
|
);
|
|
1785
1787
|
}
|
|
@@ -2582,11 +2584,29 @@ function OtpListRow({ port, item, family, entry, onOpen, onOpenInNewTab, onRenam
|
|
|
2582
2584
|
if (a.removed) return null;
|
|
2583
2585
|
const sub = a.error ?? [entry?.account, loginSiteOf(item) || entry?.issuer].filter((v, i, all) => Boolean(v) && all.indexOf(v) === i).join(" \xB7 ");
|
|
2584
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: [
|
|
2585
|
-
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2587
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2588
|
+
import_controls9.Button,
|
|
2589
|
+
{
|
|
2590
|
+
type: "button",
|
|
2591
|
+
variant: "quiet",
|
|
2592
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ItemIcon, { definitionKey: item.definitionKey, family, site: loginSiteOf(item) || (entry?.issuer ?? "") }),
|
|
2593
|
+
"aria-label": `Open ${item.name}`,
|
|
2594
|
+
tabIndex: -1,
|
|
2595
|
+
className: "shrink-0",
|
|
2596
|
+
onClick: onOpen
|
|
2597
|
+
}
|
|
2598
|
+
),
|
|
2599
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
2600
|
+
import_controls9.Tile,
|
|
2601
|
+
{
|
|
2602
|
+
type: "button",
|
|
2603
|
+
variant: "quiet",
|
|
2604
|
+
onClick: onOpen,
|
|
2605
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: a.enabled ? "text-foreground" : "text-muted-foreground", children: item.name }),
|
|
2606
|
+
line: sub ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: a.error ? "text-destructive" : "text-muted-foreground", title: sub, children: sub }) : void 0,
|
|
2607
|
+
className: "min-w-0"
|
|
2608
|
+
}
|
|
2609
|
+
),
|
|
2590
2610
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "flex shrink-0 justify-end", children: !a.enabled ? /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "flex items-center gap-1.5", children: [
|
|
2591
2611
|
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "text-sm text-disabled-foreground", children: "Off" }),
|
|
2592
2612
|
canManage ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_controls9.Button, { variant: "quiet", disabled: a.busy, onClick: () => void a.setEnabled(true), children: "Turn on" }) : null
|
|
@@ -4858,7 +4878,7 @@ function ImportPanel({ port, host, items, definitions, organizations, onClose, o
|
|
|
4858
4878
|
done.needOtp.map((made) => {
|
|
4859
4879
|
const now = items.find((i) => i.id === made.id);
|
|
4860
4880
|
if (now?.authenticator) return null;
|
|
4861
|
-
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(VaultRow, { label: "Authenticator", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
4881
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(VaultRow, { label: "Authenticator", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_controls15.Button, { type: "button", variant: "link", className: "truncate", onClick: () => setOtpFor(made.id), children: [
|
|
4862
4882
|
"Set up authenticator for ",
|
|
4863
4883
|
made.name
|
|
4864
4884
|
] }) }, `otp:${made.id}`);
|
|
@@ -6738,21 +6758,19 @@ function ListRow({ item, family, port, on, onSelect, withOwner, ownContextMenu,
|
|
|
6738
6758
|
setMenuOpen(true);
|
|
6739
6759
|
} : void 0,
|
|
6740
6760
|
children: [
|
|
6741
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.
|
|
6742
|
-
|
|
6761
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
6762
|
+
import_controls23.Tile,
|
|
6743
6763
|
{
|
|
6744
6764
|
type: "button",
|
|
6745
6765
|
"aria-current": on ? "true" : void 0,
|
|
6746
6766
|
"data-surface": on ? "primary" : void 0,
|
|
6747
6767
|
onClick: () => onSelect(item.id),
|
|
6748
|
-
|
|
6749
|
-
|
|
6750
|
-
|
|
6751
|
-
|
|
6752
|
-
|
|
6753
|
-
|
|
6754
|
-
] })
|
|
6755
|
-
]
|
|
6768
|
+
layout: "row",
|
|
6769
|
+
variant: "quiet",
|
|
6770
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ItemIcon, { definitionKey: item.definitionKey, family, site: loginSiteOf(item), inverted: on }),
|
|
6771
|
+
title: item.name,
|
|
6772
|
+
line: subtitleOf(item, withOwner),
|
|
6773
|
+
className: "w-full pr-10"
|
|
6756
6774
|
}
|
|
6757
6775
|
),
|
|
6758
6776
|
/* @__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: [
|
|
@@ -7047,7 +7065,6 @@ function TrashView({ port, deleted, query, header, onChanged }) {
|
|
|
7047
7065
|
|
|
7048
7066
|
// src/NewItemFlow.tsx
|
|
7049
7067
|
var import_react32 = require("react");
|
|
7050
|
-
var import_design_system21 = require("@ai-matrx/design-system");
|
|
7051
7068
|
var import_controls26 = require("@ai-matrx/design-system/controls");
|
|
7052
7069
|
var import_icons13 = require("@ai-matrx/design-system/icons");
|
|
7053
7070
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
@@ -7106,10 +7123,17 @@ function NewItemFlow({ definitions, url, onUrl, onChoose, onCancel }) {
|
|
|
7106
7123
|
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "flex items-center justify-between gap-3", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("h3", { className: "text-xs font-medium text-muted-foreground", children: search.trim() ? "Matching types" : "Or choose a type" }) }),
|
|
7107
7124
|
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("ul", { className: "grid grid-cols-1 gap-2 sm:grid-cols-2", children: shown.map((d) => {
|
|
7108
7125
|
const Icon = definitionGlyph(d.key, d.family);
|
|
7109
|
-
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime31.
|
|
7110
|
-
|
|
7111
|
-
|
|
7112
|
-
|
|
7126
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
7127
|
+
import_controls26.Tile,
|
|
7128
|
+
{
|
|
7129
|
+
type: "button",
|
|
7130
|
+
onClick: () => use(d),
|
|
7131
|
+
variant: "outline",
|
|
7132
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Icon, { className: "size-4" }),
|
|
7133
|
+
title: d.label,
|
|
7134
|
+
className: "w-full"
|
|
7135
|
+
}
|
|
7136
|
+
) }, d.key);
|
|
7113
7137
|
}) }),
|
|
7114
7138
|
search.trim() && matches.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("p", { className: "px-1 text-sm text-muted-foreground", children: "No type matches." }) : null,
|
|
7115
7139
|
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_controls26.SearchField, { value: search, onChange: (e) => setSearch(e.target.value), placeholder: `Search all ${definitions.length} types`, "aria-label": "Search types" })
|
|
@@ -7121,7 +7145,7 @@ function NewItemFlow({ definitions, url, onUrl, onChoose, onCancel }) {
|
|
|
7121
7145
|
// src/sharing/SecureLinkPanel.tsx
|
|
7122
7146
|
var import_react33 = require("react");
|
|
7123
7147
|
var import_confirm_opener11 = require("@ai-matrx/kit/confirm-opener");
|
|
7124
|
-
var
|
|
7148
|
+
var import_design_system21 = require("@ai-matrx/design-system");
|
|
7125
7149
|
var import_controls27 = require("@ai-matrx/design-system/controls");
|
|
7126
7150
|
var import_format11 = require("@ai-matrx/kit/format");
|
|
7127
7151
|
|
|
@@ -7367,7 +7391,7 @@ function SecureLinkPanel({ item, port, onClose }) {
|
|
|
7367
7391
|
email.trim() ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(VaultRow, { label: "Delivery", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: plan?.same ? "text-warning" : "text-foreground", children: planWords(plan) }) }) : null
|
|
7368
7392
|
] }),
|
|
7369
7393
|
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(VaultSection, { title: "Include", children: optionsError ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Empty, { children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-destructive", children: optionsError }) }) : !options ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_controls27.RegionSkeleton, { shape: "rows", count: 2, "aria-label": "Loading what can be sent", className: "px-3 sm:px-4" }) : options.fields.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Empty, { children: "Name and details only" }) : options.fields.map((f) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("label", { className: "flex min-h-11 items-center gap-3 px-3 py-1 sm:px-4", "data-clickable": f.available ? "" : void 0, children: [
|
|
7370
|
-
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
7394
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_design_system21.Checkbox, { checked: fields.includes(f.key), disabled: !f.available, onCheckedChange: (v) => toggle2(f.key, v === true), "aria-label": f.label }),
|
|
7371
7395
|
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "min-w-0 flex-1 truncate text-sm text-foreground", children: f.label }),
|
|
7372
7396
|
!f.available && f.reason ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "min-w-0 max-w-[55%] truncate text-xs text-muted-foreground", title: f.reason, children: f.reason }) : null
|
|
7373
7397
|
] }, f.key)) }),
|
|
@@ -8005,7 +8029,7 @@ function Importer({ bridge, readLimits, activeOrganizationId, organizations, onC
|
|
|
8005
8029
|
|
|
8006
8030
|
// src/extension/PageView.tsx
|
|
8007
8031
|
var import_react40 = require("react");
|
|
8008
|
-
var
|
|
8032
|
+
var import_design_system23 = require("@ai-matrx/design-system");
|
|
8009
8033
|
var import_controls33 = require("@ai-matrx/design-system/controls");
|
|
8010
8034
|
var import_icons15 = require("@ai-matrx/design-system/icons");
|
|
8011
8035
|
|
|
@@ -8148,7 +8172,7 @@ function FillSetupCard({ fillSetup }) {
|
|
|
8148
8172
|
|
|
8149
8173
|
// src/extension/PageGenerator.tsx
|
|
8150
8174
|
var import_react39 = require("react");
|
|
8151
|
-
var
|
|
8175
|
+
var import_design_system22 = require("@ai-matrx/design-system");
|
|
8152
8176
|
var import_controls32 = require("@ai-matrx/design-system/controls");
|
|
8153
8177
|
var import_icons14 = require("@ai-matrx/design-system/icons");
|
|
8154
8178
|
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
@@ -8209,9 +8233,9 @@ function PageGenerator({ fields }) {
|
|
|
8209
8233
|
label: "New password",
|
|
8210
8234
|
actions: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_jsx_runtime37.Fragment, { children: [
|
|
8211
8235
|
value ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_controls32.Button, { variant: "quiet", icon: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_icons14.CopyIcon, {}), "aria-label": "Copy password", onClick: () => void copy(value, "Password") }) : null,
|
|
8212
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
8213
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
8214
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
8236
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_design_system22.Popover, { open, onOpenChange: setOpen, children: [
|
|
8237
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_design_system22.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_controls32.Button, { variant: "outline", icon: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(KeyGlyph, {}), disabled: busy, children: "Generate" }) }),
|
|
8238
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_design_system22.PopoverContent, { sizing: "content", align: "end", children: open ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(PasswordGenerator, { limits, useLabel: "Fill page", onUse: (v) => void onUse(v) }) : null })
|
|
8215
8239
|
] })
|
|
8216
8240
|
] }),
|
|
8217
8241
|
children: said ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { role: "status", className: said.tone === "success" ? "line-clamp-2 text-xs text-foreground" : "line-clamp-2 text-xs text-muted-foreground", children: said.text }) : targets.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "text-xs text-muted-foreground", children: "Choose the boxes to fill." }) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "text-xs text-disabled-foreground", children: "Fills the page\u2019s new-password box" })
|
|
@@ -8279,7 +8303,7 @@ function PageView({ port, page, fill, capture, fillSetup, newPasswordFields, ite
|
|
|
8279
8303
|
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "flex h-full min-h-0 flex-col overflow-y-auto bg-background text-foreground", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex flex-col gap-3 px-3 pb-4 pt-3", children: [
|
|
8280
8304
|
header,
|
|
8281
8305
|
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex min-h-7 items-center gap-2 px-1", children: [
|
|
8282
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
8306
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_design_system23.SiteIcon, { site: page.url, fallback: import_icons15.GlobeIcon, className: "size-4" }),
|
|
8283
8307
|
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "min-w-0 flex-1 truncate text-sm font-medium", title: page.url, children: site || "No page open" }),
|
|
8284
8308
|
page.refresh ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_controls33.Button, { variant: "quiet", icon: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(RefreshGlyph, {}), "aria-label": "Check again", onClick: page.refresh }) : null,
|
|
8285
8309
|
onBrowse ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_controls33.Button, { variant: "quiet", icon: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ListGlyph, {}), onClick: onBrowse, children: "All items" }) : null
|
|
@@ -8326,13 +8350,18 @@ function MatchRow({ itemId, item, tag, family, port, busy, running, onOpen, onFi
|
|
|
8326
8350
|
};
|
|
8327
8351
|
const subtitle = [item ? loginSiteOf(item) || item.definitionLabel : "", tag].filter(Boolean).join(" \xB7 ");
|
|
8328
8352
|
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("li", { className: "flex h-12 items-center gap-1 pl-1 pr-2", "data-item": itemId, children: [
|
|
8329
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.
|
|
8330
|
-
|
|
8331
|
-
|
|
8332
|
-
|
|
8333
|
-
|
|
8334
|
-
|
|
8335
|
-
|
|
8353
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
8354
|
+
import_controls33.Tile,
|
|
8355
|
+
{
|
|
8356
|
+
type: "button",
|
|
8357
|
+
variant: "quiet",
|
|
8358
|
+
onClick: () => onOpen(itemId),
|
|
8359
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(ItemIcon, { definitionKey: item?.definitionKey ?? "website_login", family, site: item ? loginSiteOf(item) : "" }),
|
|
8360
|
+
title: item?.name ?? "Saved login",
|
|
8361
|
+
line: subtitle || void 0,
|
|
8362
|
+
className: "min-w-0 flex-1"
|
|
8363
|
+
}
|
|
8364
|
+
),
|
|
8336
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,
|
|
8337
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,
|
|
8338
8367
|
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,
|
|
@@ -8343,7 +8372,7 @@ function MatchRow({ itemId, item, tag, family, port, busy, running, onOpen, onFi
|
|
|
8343
8372
|
|
|
8344
8373
|
// src/Sidebar.tsx
|
|
8345
8374
|
var import_react41 = require("react");
|
|
8346
|
-
var
|
|
8375
|
+
var import_design_system24 = require("@ai-matrx/design-system");
|
|
8347
8376
|
var import_controls34 = require("@ai-matrx/design-system/controls");
|
|
8348
8377
|
var import_icons16 = require("@ai-matrx/design-system/icons");
|
|
8349
8378
|
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
@@ -8426,20 +8455,21 @@ function viewOptions(views, allCount, deletedCount, hasFavorites, hasRecents, ha
|
|
|
8426
8455
|
];
|
|
8427
8456
|
}
|
|
8428
8457
|
function Entry({ on, glyph: Icon, label, count: count2, onClick, nested = false }) {
|
|
8429
|
-
|
|
8430
|
-
|
|
8431
|
-
"button",
|
|
8458
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
8459
|
+
import_controls34.Tile,
|
|
8432
8460
|
{
|
|
8433
8461
|
type: "button",
|
|
8434
8462
|
"aria-current": on ? "page" : void 0,
|
|
8463
|
+
selected: on,
|
|
8435
8464
|
onClick,
|
|
8465
|
+
layout: "row",
|
|
8466
|
+
variant: "quiet",
|
|
8467
|
+
dense: true,
|
|
8468
|
+
icon: nested ? void 0 : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Icon, { className: "size-4 shrink-0" }),
|
|
8469
|
+
title: label,
|
|
8470
|
+
...count2 !== void 0 ? { end: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "text-xs tabular-nums text-muted-foreground", children: count2 }) } : {},
|
|
8436
8471
|
"data-nested": nested ? "" : void 0,
|
|
8437
|
-
className: (0,
|
|
8438
|
-
children: [
|
|
8439
|
-
nested ? null : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Icon, { className: "size-4 shrink-0" }),
|
|
8440
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "min-w-0 flex-1 truncate", children: label }),
|
|
8441
|
-
count2 !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "text-xs tabular-nums text-muted-foreground", children: count2 }) : null
|
|
8442
|
-
]
|
|
8472
|
+
className: (0, import_design_system24.cn)("w-full", nested && "pl-9")
|
|
8443
8473
|
}
|
|
8444
8474
|
);
|
|
8445
8475
|
}
|
|
@@ -8469,11 +8499,18 @@ function VaultSidebar({ vault, choices, onVault, view, allCount, deletedCount, v
|
|
|
8469
8499
|
e === openCategory(view, views) ? e.families?.map((f) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Entry, { nested: true, on: view === f.view, glyph: f.glyph, label: f.label, count: f.count, onClick: () => onView(f.view) }, f.view)) : null
|
|
8470
8500
|
] }, e.view)) }) : null,
|
|
8471
8501
|
views.tags.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex flex-col gap-0.5", children: [
|
|
8472
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.
|
|
8473
|
-
|
|
8474
|
-
|
|
8475
|
-
|
|
8476
|
-
|
|
8502
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
8503
|
+
import_controls34.DisclosureHeader,
|
|
8504
|
+
{
|
|
8505
|
+
type: "button",
|
|
8506
|
+
variant: "label",
|
|
8507
|
+
open: tagsOpen,
|
|
8508
|
+
onClick: () => setTagsOpen((o) => !o),
|
|
8509
|
+
title: "Tags",
|
|
8510
|
+
meta: views.tags.length,
|
|
8511
|
+
className: "w-full px-2.5"
|
|
8512
|
+
}
|
|
8513
|
+
),
|
|
8477
8514
|
tagsOpen ? views.tags.map((e) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Entry, { on: view === e.view, glyph: e.glyph, label: e.label, count: e.count, onClick: () => onView(e.view) }, e.view)) : null
|
|
8478
8515
|
] }) : null
|
|
8479
8516
|
] }),
|
|
@@ -8484,11 +8521,19 @@ function VaultSidebar({ vault, choices, onVault, view, allCount, deletedCount, v
|
|
|
8484
8521
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Entry, { on: false, glyph: SafeGlyph, label: "Backup", onClick: () => onPanel("backup") }),
|
|
8485
8522
|
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Entry, { on: false, glyph: ShieldGlyph, label: "Browsers that fill", onClick: () => onPanel("devices") }),
|
|
8486
8523
|
hasNativeImport ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Entry, { on: false, glyph: ImportGlyph, label: "Import passkeys", onClick: () => onPanel("import-passkeys") }) : null,
|
|
8487
|
-
nativeProvider && nativeProvider.status !== "unavailable" ? /* @__PURE__ */ (0, import_jsx_runtime39.
|
|
8488
|
-
|
|
8489
|
-
|
|
8490
|
-
|
|
8491
|
-
|
|
8524
|
+
nativeProvider && nativeProvider.status !== "unavailable" ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
8525
|
+
import_controls34.Tile,
|
|
8526
|
+
{
|
|
8527
|
+
type: "button",
|
|
8528
|
+
variant: "quiet",
|
|
8529
|
+
dense: true,
|
|
8530
|
+
onClick: nativeProvider.openSetup,
|
|
8531
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ShieldGlyph, { className: "size-4 shrink-0" }),
|
|
8532
|
+
title: "System AutoFill",
|
|
8533
|
+
end: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: (0, import_design_system24.cn)("text-xs", nativeProvider.status === "ready" ? "text-success" : "text-warning"), children: nativeProvider.status === "ready" ? "On" : "Set up" }),
|
|
8534
|
+
className: "w-full"
|
|
8535
|
+
}
|
|
8536
|
+
) : null,
|
|
8492
8537
|
onOpenWeb ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Entry, { on: false, glyph: ExternalGlyph, label: "Open on the web", onClick: onOpenWeb }) : null,
|
|
8493
8538
|
onLock ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Entry, { on: false, glyph: LockGlyph, label: "Lock", onClick: onLock }) : null
|
|
8494
8539
|
] })
|
|
@@ -8538,7 +8583,7 @@ function VaultApp(given) {
|
|
|
8538
8583
|
const lock = props.host?.lock;
|
|
8539
8584
|
const locked = useLocked(lock);
|
|
8540
8585
|
const port = (0, import_react42.useMemo)(() => lock ? guardPort(props.port, () => lock.locked()) : props.port, [props.port, lock]);
|
|
8541
|
-
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
8586
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_design_system25.LookScope, { look: props.look ?? "web", className: "h-full min-h-0 w-full", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "relative h-full min-h-0 w-full", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(NoticeProvider, { notify: props.notify, children: lock && locked ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(LockedScreen, { lock }) : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ClipboardProvider, { clipboard: props.host?.clipboard, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(RevealSecondsProvider, { seconds: props.host?.revealSeconds, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(IdentityGate, { identity: props.host?.identity, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(GeneratorLimitsProvider, { resolve: generatorLimitsFrom(props.host?.knobs), children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Workspace, { ...props, port }) }) }) }) }) }) }) });
|
|
8542
8587
|
}
|
|
8543
8588
|
function useOrganizationSettings(host) {
|
|
8544
8589
|
const knobs = host.knobs;
|
|
@@ -8865,38 +8910,38 @@ function Workspace({ port, host = NO_HOST, layout = "auto", location, onLocation
|
|
|
8865
8910
|
onClick: () => go({ view: loc.view === "authenticator" ? "all" : "authenticator", itemId: null, mode: "view", panel: null })
|
|
8866
8911
|
}
|
|
8867
8912
|
),
|
|
8868
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
8869
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
8870
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
8871
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
8913
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_design_system25.DropdownMenu, { children: [
|
|
8914
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_design_system25.DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_controls35.Button, { variant: "quiet", icon: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(MoreGlyph, {}), "aria-label": "Vault actions" }) }),
|
|
8915
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_design_system25.DropdownMenuContent, { align: "end", children: [
|
|
8916
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_design_system25.DropdownMenuItem, { onSelect: () => go({ panel: "import" }), children: [
|
|
8872
8917
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ImportGlyph, { className: "size-4" }),
|
|
8873
8918
|
"Import"
|
|
8874
8919
|
] }),
|
|
8875
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
8920
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_design_system25.DropdownMenuItem, { onSelect: () => go({ panel: "export" }), children: [
|
|
8876
8921
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ExportGlyph, { className: "size-4" }),
|
|
8877
8922
|
"Export"
|
|
8878
8923
|
] }),
|
|
8879
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
8924
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_design_system25.DropdownMenuItem, { onSelect: () => go({ panel: "backup" }), children: [
|
|
8880
8925
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(SafeGlyph, { className: "size-4" }),
|
|
8881
8926
|
"Backup"
|
|
8882
8927
|
] }),
|
|
8883
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
8928
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_design_system25.DropdownMenuItem, { onSelect: () => go({ panel: "devices" }), children: [
|
|
8884
8929
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ShieldGlyph, { className: "size-4" }),
|
|
8885
8930
|
"Browsers that fill"
|
|
8886
8931
|
] }),
|
|
8887
|
-
host.nativeImport ? /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
8932
|
+
host.nativeImport ? /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_design_system25.DropdownMenuItem, { onSelect: () => go({ panel: "import-passkeys" }), children: [
|
|
8888
8933
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ImportGlyph, { className: "size-4" }),
|
|
8889
8934
|
"Import passkeys"
|
|
8890
8935
|
] }) : null,
|
|
8891
|
-
host.nativeProvider && host.nativeProvider.status !== "unavailable" ? /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
8936
|
+
host.nativeProvider && host.nativeProvider.status !== "unavailable" ? /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_design_system25.DropdownMenuItem, { onSelect: host.nativeProvider.openSetup, children: [
|
|
8892
8937
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ShieldGlyph, { className: "size-4" }),
|
|
8893
8938
|
"System AutoFill"
|
|
8894
8939
|
] }) : null,
|
|
8895
|
-
host.lock?.lock ? /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
8940
|
+
host.lock?.lock ? /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_design_system25.DropdownMenuItem, { onSelect: () => void host.lock?.lock?.(), children: [
|
|
8896
8941
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(LockGlyph, { className: "size-4" }),
|
|
8897
8942
|
"Lock"
|
|
8898
8943
|
] }) : null,
|
|
8899
|
-
host.openWebVault ? /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
8944
|
+
host.openWebVault ? /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_design_system25.DropdownMenuItem, { onSelect: host.openWebVault, children: [
|
|
8900
8945
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(ExternalGlyph, { className: "size-4" }),
|
|
8901
8946
|
"Open on the web"
|
|
8902
8947
|
] }) : null
|
|
@@ -9102,7 +9147,7 @@ function Workspace({ port, host = NO_HOST, layout = "auto", location, onLocation
|
|
|
9102
9147
|
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { ref: rootRef, className: "flex h-full min-h-0 w-full flex-col bg-background text-foreground", children: [
|
|
9103
9148
|
refreshError ? /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { role: "status", className: "flex items-center gap-3 border-b border-border bg-muted px-4 py-2 text-sm", children: [
|
|
9104
9149
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "min-w-0 flex-1 truncate text-warning", title: refreshError, children: "Couldn\u2019t refresh. Showing what was loaded." }),
|
|
9105
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
9150
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_controls35.Button, { type: "button", variant: "link", className: "shrink-0", onClick: refresh, children: "Try again" })
|
|
9106
9151
|
] }) : null,
|
|
9107
9152
|
hasPrompts ? (
|
|
9108
9153
|
// "Save this login?" and "Turn on filling" show above the list in every view, not only "This page".
|
|
@@ -9117,7 +9162,7 @@ function Workspace({ port, host = NO_HOST, layout = "auto", location, onLocation
|
|
|
9117
9162
|
snap.unavailable.join(", "),
|
|
9118
9163
|
". Showing the rest."
|
|
9119
9164
|
] }),
|
|
9120
|
-
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
9165
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_controls35.Button, { type: "button", variant: "link", className: "shrink-0", onClick: refresh, children: "Try again" })
|
|
9121
9166
|
] }) : null,
|
|
9122
9167
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: `grid min-h-0 w-full flex-1 ${grid} overflow-hidden`, children: [
|
|
9123
9168
|
mode === "full" ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|