@ai-matrx/vault 0.1.22 → 0.1.23
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 +4 -0
- package/dist/index.cjs +64 -58
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +64 -58
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -6489,7 +6489,7 @@ function subtitleOf(item, withOwner) {
|
|
|
6489
6489
|
const what = loginSiteOf(item) || item.definitionLabel;
|
|
6490
6490
|
return withOwner ? `${what} \xB7 ${item.owner.label}` : what;
|
|
6491
6491
|
}
|
|
6492
|
-
function ItemList({ title, items, definitions, port, selectedId, onSelect, query, onQuery, sort, onSort, onNew, matchingIds, header, showOwner, canSortViewed = false, onRefresh, refreshing = false, rowContextMenu = "package", rowMenuItems, stillLoading, favorites, onToggleFavorite }) {
|
|
6492
|
+
function ItemList({ title, items, definitions, port, selectedId, onSelect, query, onQuery, sort, onSort, onNew, matchingIds, header, actions, showOwner, canSortViewed = false, onRefresh, refreshing = false, rowContextMenu = "package", rowMenuItems, stillLoading, favorites, onToggleFavorite }) {
|
|
6493
6493
|
const sorts = SORTS2.filter((s) => canSortViewed || s.value !== "viewed");
|
|
6494
6494
|
const pinned = matchingIds ? items.filter((i) => matchingIds.has(i.id)) : [];
|
|
6495
6495
|
const rest = matchingIds ? items.filter((i) => !matchingIds.has(i.id)) : items;
|
|
@@ -6517,6 +6517,7 @@ function ItemList({ title, items, definitions, port, selectedId, onSelect, query
|
|
|
6517
6517
|
header,
|
|
6518
6518
|
/* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-2", children: [
|
|
6519
6519
|
/* @__PURE__ */ jsx28(SearchField, { value: query, onChange: (e) => onQuery(e.target.value), onKeyDown, placeholder: `Search ${title}`, className: "min-w-0 flex-1", "aria-label": "Search the vault" }),
|
|
6520
|
+
actions,
|
|
6520
6521
|
/* @__PURE__ */ jsx28(Button23, { variant: "primary", icon: /* @__PURE__ */ jsx28(PlusGlyph, {}), "aria-label": "New item", onClick: onNew })
|
|
6521
6522
|
] }),
|
|
6522
6523
|
/* @__PURE__ */ jsxs26("div", { className: "flex items-center justify-between gap-2 px-1", children: [
|
|
@@ -8577,65 +8578,66 @@ function Workspace({ port, host = NO_HOST, layout = "auto", location, onLocation
|
|
|
8577
8578
|
}
|
|
8578
8579
|
const hasFavorites = port.lists.favorites !== void 0;
|
|
8579
8580
|
const title = loc.vault === "all" && loc.view === "all" ? "All items" : viewLabel(loc.view, views);
|
|
8580
|
-
const compactHeader = mode === "full" ? void 0 : (
|
|
8581
|
-
|
|
8582
|
-
|
|
8583
|
-
|
|
8584
|
-
|
|
8585
|
-
|
|
8586
|
-
|
|
8587
|
-
|
|
8588
|
-
|
|
8589
|
-
|
|
8590
|
-
|
|
8591
|
-
|
|
8592
|
-
|
|
8593
|
-
|
|
8594
|
-
|
|
8595
|
-
|
|
8596
|
-
|
|
8597
|
-
/* @__PURE__ */
|
|
8598
|
-
|
|
8599
|
-
/* @__PURE__ */ jsxs38(
|
|
8600
|
-
/* @__PURE__ */
|
|
8601
|
-
|
|
8602
|
-
|
|
8603
|
-
|
|
8604
|
-
/* @__PURE__ */
|
|
8605
|
-
|
|
8606
|
-
|
|
8607
|
-
|
|
8608
|
-
/* @__PURE__ */
|
|
8609
|
-
|
|
8610
|
-
|
|
8611
|
-
|
|
8612
|
-
/* @__PURE__ */
|
|
8613
|
-
|
|
8614
|
-
|
|
8615
|
-
|
|
8616
|
-
|
|
8617
|
-
|
|
8618
|
-
|
|
8619
|
-
|
|
8620
|
-
|
|
8621
|
-
|
|
8622
|
-
|
|
8623
|
-
|
|
8624
|
-
|
|
8625
|
-
|
|
8626
|
-
|
|
8627
|
-
|
|
8628
|
-
|
|
8629
|
-
|
|
8630
|
-
|
|
8631
|
-
] }) : null
|
|
8632
|
-
] })
|
|
8581
|
+
const compactHeader = mode === "full" ? void 0 : /* @__PURE__ */ jsxs38("div", { className: "grid grid-cols-[repeat(auto-fit,minmax(11rem,1fr))] gap-2", "data-vault-compact-header": "", children: [
|
|
8582
|
+
/* @__PURE__ */ jsx40(VaultSelect, { value: loc.vault, choices, onChange: (vault) => go({ vault, itemId: null, panel: null }) }),
|
|
8583
|
+
/* @__PURE__ */ jsx40(Select12, { value: loc.view, onValueChange: (view) => go({ view, itemId: null, panel: null }), options: viewOptions(views, inThisVault.length, deleted.length, hasFavorites, port.lists.recents !== void 0, host.page !== void 0), "aria-label": "Show" })
|
|
8584
|
+
] });
|
|
8585
|
+
const compactActions = mode === "full" ? void 0 : /* @__PURE__ */ jsxs38("div", { className: "flex shrink-0 items-center gap-2", "data-vault-compact-actions": "", children: [
|
|
8586
|
+
/* @__PURE__ */ jsx40(
|
|
8587
|
+
Button34,
|
|
8588
|
+
{
|
|
8589
|
+
variant: loc.view === "authenticator" ? "outline" : "quiet",
|
|
8590
|
+
icon: /* @__PURE__ */ jsx40(LockGlyph, {}),
|
|
8591
|
+
"aria-label": AUTHENTICATOR_LABEL,
|
|
8592
|
+
"aria-pressed": loc.view === "authenticator",
|
|
8593
|
+
title: AUTHENTICATOR_LABEL,
|
|
8594
|
+
onClick: () => go({ view: loc.view === "authenticator" ? "all" : "authenticator", itemId: null, mode: "view", panel: null })
|
|
8595
|
+
}
|
|
8596
|
+
),
|
|
8597
|
+
/* @__PURE__ */ jsxs38(DropdownMenu6, { children: [
|
|
8598
|
+
/* @__PURE__ */ jsx40(DropdownMenuTrigger6, { asChild: true, children: /* @__PURE__ */ jsx40(Button34, { variant: "quiet", icon: /* @__PURE__ */ jsx40(MoreGlyph, {}), "aria-label": "Vault actions" }) }),
|
|
8599
|
+
/* @__PURE__ */ jsxs38(DropdownMenuContent6, { align: "end", children: [
|
|
8600
|
+
/* @__PURE__ */ jsxs38(DropdownMenuItem6, { onSelect: () => go({ panel: "import" }), children: [
|
|
8601
|
+
/* @__PURE__ */ jsx40(ImportGlyph, { className: "size-4" }),
|
|
8602
|
+
"Import"
|
|
8603
|
+
] }),
|
|
8604
|
+
/* @__PURE__ */ jsxs38(DropdownMenuItem6, { onSelect: () => go({ panel: "export" }), children: [
|
|
8605
|
+
/* @__PURE__ */ jsx40(ExportGlyph, { className: "size-4" }),
|
|
8606
|
+
"Export"
|
|
8607
|
+
] }),
|
|
8608
|
+
/* @__PURE__ */ jsxs38(DropdownMenuItem6, { onSelect: () => go({ panel: "backup" }), children: [
|
|
8609
|
+
/* @__PURE__ */ jsx40(SafeGlyph, { className: "size-4" }),
|
|
8610
|
+
"Backup"
|
|
8611
|
+
] }),
|
|
8612
|
+
/* @__PURE__ */ jsxs38(DropdownMenuItem6, { onSelect: () => go({ panel: "devices" }), children: [
|
|
8613
|
+
/* @__PURE__ */ jsx40(ShieldGlyph, { className: "size-4" }),
|
|
8614
|
+
"Browsers that fill"
|
|
8615
|
+
] }),
|
|
8616
|
+
host.nativeImport ? /* @__PURE__ */ jsxs38(DropdownMenuItem6, { onSelect: () => go({ panel: "import-passkeys" }), children: [
|
|
8617
|
+
/* @__PURE__ */ jsx40(ImportGlyph, { className: "size-4" }),
|
|
8618
|
+
"Import passkeys"
|
|
8619
|
+
] }) : null,
|
|
8620
|
+
host.nativeProvider && host.nativeProvider.status !== "unavailable" ? /* @__PURE__ */ jsxs38(DropdownMenuItem6, { onSelect: host.nativeProvider.openSetup, children: [
|
|
8621
|
+
/* @__PURE__ */ jsx40(ShieldGlyph, { className: "size-4" }),
|
|
8622
|
+
"System AutoFill"
|
|
8623
|
+
] }) : null,
|
|
8624
|
+
host.lock?.lock ? /* @__PURE__ */ jsxs38(DropdownMenuItem6, { onSelect: () => void host.lock?.lock?.(), children: [
|
|
8625
|
+
/* @__PURE__ */ jsx40(LockGlyph, { className: "size-4" }),
|
|
8626
|
+
"Lock"
|
|
8627
|
+
] }) : null,
|
|
8628
|
+
host.openWebVault ? /* @__PURE__ */ jsxs38(DropdownMenuItem6, { onSelect: host.openWebVault, children: [
|
|
8629
|
+
/* @__PURE__ */ jsx40(ExternalGlyph, { className: "size-4" }),
|
|
8630
|
+
"Open on the web"
|
|
8631
|
+
] }) : null
|
|
8633
8632
|
] })
|
|
8634
8633
|
] })
|
|
8635
|
-
);
|
|
8634
|
+
] });
|
|
8636
8635
|
const viewHeader = /* @__PURE__ */ jsxs38("div", { className: "flex flex-col gap-2", children: [
|
|
8637
8636
|
compactHeader,
|
|
8638
|
-
/* @__PURE__ */
|
|
8637
|
+
/* @__PURE__ */ jsxs38("div", { className: "flex items-center gap-2", children: [
|
|
8638
|
+
/* @__PURE__ */ jsx40(SearchField4, { value: loc.q, onChange: (e) => go({ q: e.target.value }, "replace"), placeholder: `Search ${viewLabel(loc.view, views)}`, "aria-label": `Search ${viewLabel(loc.view, views)}`, className: "min-w-0 flex-1" }),
|
|
8639
|
+
compactActions
|
|
8640
|
+
] })
|
|
8639
8641
|
] });
|
|
8640
8642
|
const viewProps = { port, host, items: inThisVault, deleted, definitions, query: loc.q, onOpen: (id) => go({ view: "all", itemId: id, mode: "view", panel: null }), onChanged: load, header: viewHeader };
|
|
8641
8643
|
const pageView = loc.view === "page" && host.page && !loc.q ? /* @__PURE__ */ jsx40(
|
|
@@ -8653,7 +8655,10 @@ function Workspace({ port, host = NO_HOST, layout = "auto", location, onLocation
|
|
|
8653
8655
|
onNewForPage: (url) => go({ mode: "new", kind: null, url, itemId: null, panel: null }),
|
|
8654
8656
|
onBrowse: () => go({ view: "all", itemId: null }),
|
|
8655
8657
|
onChanged: load,
|
|
8656
|
-
...compactHeader ? { header:
|
|
8658
|
+
...compactHeader ? { header: /* @__PURE__ */ jsxs38("div", { className: "flex flex-col gap-2", children: [
|
|
8659
|
+
compactHeader,
|
|
8660
|
+
/* @__PURE__ */ jsx40("div", { className: "flex justify-end", children: compactActions })
|
|
8661
|
+
] }) } : {}
|
|
8657
8662
|
}
|
|
8658
8663
|
) : null;
|
|
8659
8664
|
const specialView = pageView ?? (loc.view === "authenticator" ? /* @__PURE__ */ jsx40(AuthenticatorView, { ...viewProps }) : loc.view === "trash" ? /* @__PURE__ */ jsx40(TrashView, { ...viewProps }) : null);
|
|
@@ -8680,7 +8685,8 @@ function Workspace({ port, host = NO_HOST, layout = "auto", location, onLocation
|
|
|
8680
8685
|
rowContextMenu: host.rowContextMenu ?? "package",
|
|
8681
8686
|
...host.rowMenuItems ? { rowMenuItems: host.rowMenuItems } : {},
|
|
8682
8687
|
...matchingIds ? { matchingIds } : {},
|
|
8683
|
-
...compactHeader ? { header: compactHeader } : {}
|
|
8688
|
+
...compactHeader ? { header: compactHeader } : {},
|
|
8689
|
+
...compactActions ? { actions: compactActions } : {}
|
|
8684
8690
|
}
|
|
8685
8691
|
);
|
|
8686
8692
|
const showingDetail = loc.mode === "new" || loc.itemId !== null;
|