@ai-matrx/vault 0.1.1 → 0.1.2
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 -0
- package/dist/index.cjs +28 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +39 -19
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.2 — 2026-10-16
|
|
4
|
+
|
|
5
|
+
- Whose an item is is always shown: a badge in the item header reads Personal, the organization's
|
|
6
|
+
name, or Shared with me; list rows add it whenever a list mixes owners.
|
|
7
|
+
- A new item's first choice is Save to — Personal, each organization (searchable past six), or
|
|
8
|
+
someone else — and the header badge follows the choice.
|
|
9
|
+
|
|
10
|
+
### Consumer action
|
|
11
|
+
|
|
12
|
+
- None; update to latest.
|
|
13
|
+
|
|
3
14
|
## 0.1.1 — 2026-10-16
|
|
4
15
|
|
|
5
16
|
- zip.js is imported one way only (static). A static and a dynamic import of it in one bundle made
|
package/dist/index.cjs
CHANGED
|
@@ -5663,7 +5663,7 @@ function ItemPane(props) {
|
|
|
5663
5663
|
const viewCustom = (item?.custom ?? []).filter((c) => !declaredKeys.has(c.key) && c.key !== MFA_METHOD_KEY && !isAuthenticatorStorage(c.key));
|
|
5664
5664
|
const isLogin = (item?.definitionKey ?? definition?.key) === "website_login" || (item?.definitionKey ?? definition?.key) === "username_password";
|
|
5665
5665
|
const typeLabel = definition?.label ?? item?.definitionLabel ?? "";
|
|
5666
|
-
const
|
|
5666
|
+
const shownOwner = mode === "new" ? owner === "me" ? { label: "Personal", glyph: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(PersonGlyph, {}) } : owner === "person" ? { label: "Someone else", glyph: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SendGlyph, {}) } : { label: organizations.find((o) => o.id === owner)?.name ?? "Organization", glyph: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(BuildingGlyph, {}) } : item ? { label: item.owner.label, glyph: item.owner.kind === "me" ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(PersonGlyph, {}) : item.owner.kind === "organization" ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(BuildingGlyph, {}) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(UsersGlyph, {}) } : null;
|
|
5667
5667
|
const tagsVisible = showTags || draft.tags.length > 0 || tagsText !== "";
|
|
5668
5668
|
const descriptionVisible = showDescription || draft.description !== "";
|
|
5669
5669
|
const header = /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("header", { className: "flex min-h-14 items-center gap-2 border-b border-border px-3 py-2 sm:gap-3 sm:px-5", children: [
|
|
@@ -5672,7 +5672,8 @@ function ItemPane(props) {
|
|
|
5672
5672
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col", children: [
|
|
5673
5673
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("h2", { className: "truncate text-base font-semibold leading-tight", children: editing ? draft.name || (mode === "new" ? `New ${typeLabel.toLowerCase()}` : item?.name) : item?.name }),
|
|
5674
5674
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("span", { className: "flex min-w-0 items-center gap-1 text-xs text-muted-foreground", children: [
|
|
5675
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "truncate", children:
|
|
5675
|
+
typeLabel ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "truncate", children: typeLabel }) : null,
|
|
5676
|
+
shownOwner ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_controls21.Badge, { className: "shrink-0", icon: shownOwner.glyph, "aria-label": `Saved in ${shownOwner.label}`, children: shownOwner.label }) : null,
|
|
5676
5677
|
item && !editing ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SharingSummary, { item, port, className: "hidden truncate before:mr-1 before:content-['\xB7'] sm:inline" }, `${item.updatedAt}-${refreshKey ?? ""}`) : null
|
|
5677
5678
|
] })
|
|
5678
5679
|
] }),
|
|
@@ -5748,8 +5749,25 @@ function ItemPane(props) {
|
|
|
5748
5749
|
notice && !editing ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { role: "status", className: "border-b border-border bg-muted px-5 py-2 text-sm text-warning", children: notice }) : null,
|
|
5749
5750
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "min-h-0 flex-1 overflow-y-auto", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "mx-auto flex w-full max-w-3xl flex-col gap-5 px-3 py-4 sm:px-6 sm:py-6", children: editing ? /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
|
|
5750
5751
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Section, { children: [
|
|
5752
|
+
mode === "new" ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Row, { label: "Save to", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
5753
|
+
import_controls21.OptionCombobox,
|
|
5754
|
+
{
|
|
5755
|
+
value: owner,
|
|
5756
|
+
onChange: setOwner,
|
|
5757
|
+
ariaLabel: "Save to",
|
|
5758
|
+
searchable: organizations.length > 6,
|
|
5759
|
+
searchPlaceholder: "Find an organization",
|
|
5760
|
+
groups: [
|
|
5761
|
+
{ heading: "Just you", options: ["me"] },
|
|
5762
|
+
...organizations.length > 0 ? [{ heading: "Organizations", options: organizations.map((o) => o.id) }] : [],
|
|
5763
|
+
{ heading: "Send", options: ["person"] }
|
|
5764
|
+
],
|
|
5765
|
+
getLabel: (v) => v === "me" ? "Personal" : v === "person" ? "Someone else" : organizations.find((o) => o.id === v)?.name ?? v,
|
|
5766
|
+
getHint: (v) => v === "me" ? "Only you" : v === "person" ? "Sent by email" : null,
|
|
5767
|
+
renderIcon: (v) => v === "me" ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(PersonGlyph, { className: "size-4" }) : v === "person" ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(SendGlyph, { className: "size-4" }) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(BuildingGlyph, { className: "size-4" })
|
|
5768
|
+
}
|
|
5769
|
+
) }) : null,
|
|
5751
5770
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(EditRow, { label: "Name", value: draft.name, onChange: (v) => patch({ name: v }), placeholder: "Name", autoFocus: mode === "new" }),
|
|
5752
|
-
mode === "new" ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Row, { label: "Save to", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_controls21.Select, { value: owner, onValueChange: setOwner, "aria-label": "Save to", options: [{ value: "me", label: "Personal" }, ...organizations.map((o) => ({ value: o.id, label: o.name })), { value: "person", label: "Someone else" }] }) }) : null,
|
|
5753
5771
|
mode === "new" && owner === "person" ? /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
|
|
5754
5772
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(EditRow, { label: "Their email", value: recipient, placeholder: "name@company.com", inputMode: "email", onChange: setRecipient }),
|
|
5755
5773
|
declared.some((f) => f.storage === "encrypted" && f.kind === "secret") ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Row, { label: "Password", hint: "You never see it", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_controls21.Switch, { checked: generatePrivately, onCheckedChange: setGeneratePrivately, "aria-label": "Generate the password privately" }) }) : null
|
|
@@ -5899,8 +5917,9 @@ var SORTS2 = [
|
|
|
5899
5917
|
{ value: "updated", label: "Recently changed" },
|
|
5900
5918
|
{ value: "created", label: "Recently added" }
|
|
5901
5919
|
];
|
|
5902
|
-
function subtitleOf(item) {
|
|
5903
|
-
|
|
5920
|
+
function subtitleOf(item, withOwner) {
|
|
5921
|
+
const what = siteOf(item) || item.definitionLabel;
|
|
5922
|
+
return withOwner ? `${what} \xB7 ${item.owner.label}` : what;
|
|
5904
5923
|
}
|
|
5905
5924
|
function ItemList({ title, items, definitions, port, selectedId, onSelect, query, onQuery, sort, onSort, onNew, matchingIds, header }) {
|
|
5906
5925
|
const pinned = matchingIds ? items.filter((i) => matchingIds.has(i.id)) : [];
|
|
@@ -5921,7 +5940,8 @@ function ItemList({ title, items, definitions, port, selectedId, onSelect, query
|
|
|
5921
5940
|
listRef.current?.querySelector(`[data-item="${next.id}"]`)?.scrollIntoView({ block: "nearest" });
|
|
5922
5941
|
}
|
|
5923
5942
|
};
|
|
5924
|
-
const
|
|
5943
|
+
const mixedOwners = new Set(items.map((i) => i.owner.organizationId ?? i.owner.kind)).size > 1;
|
|
5944
|
+
const row = (i) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ListRow, { item: i, family: familyOf2(i.definitionKey), port, on: i.id === selectedId, onSelect, withOwner: mixedOwners }, i.id);
|
|
5925
5945
|
const sortLabel = SORTS2.find((s) => s.value === sort)?.label ?? "Name";
|
|
5926
5946
|
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("section", { "aria-label": title, className: "flex h-full min-h-0 flex-col border-r border-border bg-background", children: [
|
|
5927
5947
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex flex-col gap-2 px-3 pb-2 pt-3", children: [
|
|
@@ -5953,7 +5973,7 @@ function ItemList({ title, items, definitions, port, selectedId, onSelect, query
|
|
|
5953
5973
|
] }) })
|
|
5954
5974
|
] });
|
|
5955
5975
|
}
|
|
5956
|
-
function ListRow({ item, family, port, on, onSelect }) {
|
|
5976
|
+
function ListRow({ item, family, port, on, onSelect, withOwner }) {
|
|
5957
5977
|
const confirmed = useConfirmed();
|
|
5958
5978
|
const copy = useCopy();
|
|
5959
5979
|
const notify = useNotify();
|
|
@@ -5984,7 +6004,7 @@ function ListRow({ item, family, port, on, onSelect }) {
|
|
|
5984
6004
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ItemIcon, { definitionKey: item.definitionKey, family, site: siteOf(item), inverted: on }),
|
|
5985
6005
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("span", { className: "flex min-w-0 flex-1 flex-col leading-tight", children: [
|
|
5986
6006
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "truncate text-sm font-medium", children: item.name }),
|
|
5987
|
-
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "truncate text-xs text-muted-foreground", children: subtitleOf(item) })
|
|
6007
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "truncate text-xs text-muted-foreground", children: subtitleOf(item, withOwner) })
|
|
5988
6008
|
] })
|
|
5989
6009
|
]
|
|
5990
6010
|
}
|