@ai-matrx/vault 0.1.0 → 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 +20 -0
- package/dist/index.cjs +32 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +43 -23
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
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
|
+
|
|
14
|
+
## 0.1.1 — 2026-10-16
|
|
15
|
+
|
|
16
|
+
- zip.js is imported one way only (static). A static and a dynamic import of it in one bundle made
|
|
17
|
+
Next 16 Turbopack fail the host build (`ModuleId not found for ident … @zip.js/zip.js/lib/core/util/default-mime-type.js`).
|
|
18
|
+
|
|
19
|
+
### Consumer action
|
|
20
|
+
|
|
21
|
+
- None; update to latest.
|
|
22
|
+
|
|
3
23
|
## 0.1.0 — 2026-10-16
|
|
4
24
|
|
|
5
25
|
First release: the full Vault workspace replacing the web app's `features/secrets` screens, the
|
package/dist/index.cjs
CHANGED
|
@@ -3835,6 +3835,7 @@ function countLines(lines, selected) {
|
|
|
3835
3835
|
}
|
|
3836
3836
|
|
|
3837
3837
|
// src/io/import-source.ts
|
|
3838
|
+
var import_zip = require("@zip.js/zip.js");
|
|
3838
3839
|
var STRUCTURED = ["bitwarden_json", "1password_1pux", "proton_pass", "keepass_xml"];
|
|
3839
3840
|
var isStructuredSource = (s) => STRUCTURED.includes(s);
|
|
3840
3841
|
var SOURCE_OPTIONS = [
|
|
@@ -3905,8 +3906,7 @@ function sniffZip(names) {
|
|
|
3905
3906
|
return names.some((n) => !n.includes("/") && n.toLowerCase().endsWith(".csv")) ? "dashlane" : "proton_pass";
|
|
3906
3907
|
}
|
|
3907
3908
|
async function zipNames(file) {
|
|
3908
|
-
const
|
|
3909
|
-
const reader = new ZipReader2(new BlobReader2(file));
|
|
3909
|
+
const reader = new import_zip.ZipReader(new import_zip.BlobReader(file));
|
|
3910
3910
|
try {
|
|
3911
3911
|
return (await reader.getEntries()).map((e) => e.filename);
|
|
3912
3912
|
} finally {
|
|
@@ -3956,7 +3956,7 @@ function closesQuote(rest, quote) {
|
|
|
3956
3956
|
}
|
|
3957
3957
|
|
|
3958
3958
|
// src/io/bounded-zip.ts
|
|
3959
|
-
var
|
|
3959
|
+
var import_zip2 = require("@zip.js/zip.js");
|
|
3960
3960
|
var safe = (value) => Number.isSafeInteger(value) && value >= 0;
|
|
3961
3961
|
var unsafeName = (name) => /[\\\0-\x1F\x7F-\x9F]/.test(name);
|
|
3962
3962
|
function stopIfCancelled(signal) {
|
|
@@ -4000,7 +4000,7 @@ async function directoryRange(entry, signal) {
|
|
|
4000
4000
|
async function openBoundedZip(file, limits, signal) {
|
|
4001
4001
|
if (file.size > limits.maxFileBytes)
|
|
4002
4002
|
throw new Error("The archive exceeds the organization size limit.");
|
|
4003
|
-
const reader = new
|
|
4003
|
+
const reader = new import_zip2.ZipReader(new import_zip2.BlobReader(file), {
|
|
4004
4004
|
strictness: "strict",
|
|
4005
4005
|
filenameValidation: "strict",
|
|
4006
4006
|
checkAmbiguity: true
|
|
@@ -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
|
}
|