@ai-matrx/vault 0.1.43 → 0.1.45
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 +2 -3
- package/dist/index.cjs +116 -105
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +96 -85
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1112,7 +1112,7 @@ function HistoryRow({ item, port, page, entry, label, onRestored, onConflict, on
|
|
|
1112
1112
|
import { useEffect as useEffect9, useState as useState11 } from "react";
|
|
1113
1113
|
import { Button as Button8, Tile as Tile2 } from "@ai-matrx/design-system/controls";
|
|
1114
1114
|
import { DropdownMenu as DropdownMenu2, DropdownMenuContent as DropdownMenuContent2, DropdownMenuItem as DropdownMenuItem2, DropdownMenuSeparator as DropdownMenuSeparator2, DropdownMenuTrigger as DropdownMenuTrigger2, TextInputDialog } from "@ai-matrx/design-system";
|
|
1115
|
-
import { CopyIcon as
|
|
1115
|
+
import { CopyIcon as CopyIcon5 } from "@ai-matrx/design-system/icons";
|
|
1116
1116
|
|
|
1117
1117
|
// src/ItemIcon.tsx
|
|
1118
1118
|
import { cn as cn4 } from "@ai-matrx/design-system";
|
|
@@ -1447,7 +1447,7 @@ function useCanScan() {
|
|
|
1447
1447
|
}, []);
|
|
1448
1448
|
return ok;
|
|
1449
1449
|
}
|
|
1450
|
-
var SETUP_KEY_PLACEHOLDER = "Setup key or
|
|
1450
|
+
var SETUP_KEY_PLACEHOLDER = "Setup key or link";
|
|
1451
1451
|
var CAMERA_NOTES = {
|
|
1452
1452
|
blocked: "Camera blocked. Paste the key or choose a QR image.",
|
|
1453
1453
|
missing: "No camera. Paste the key or choose a QR image.",
|
|
@@ -1660,6 +1660,7 @@ import { useState as useState9 } from "react";
|
|
|
1660
1660
|
import { Button as Button6, Select } from "@ai-matrx/design-system/controls";
|
|
1661
1661
|
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger } from "@ai-matrx/design-system";
|
|
1662
1662
|
import { confirm as confirm2 } from "@ai-matrx/kit/confirm-opener";
|
|
1663
|
+
import { CopyIcon as CopyIcon4 } from "@ai-matrx/design-system/icons";
|
|
1663
1664
|
|
|
1664
1665
|
// src/authenticator/port.ts
|
|
1665
1666
|
var OTP_SEED_KEY = "totp_seed";
|
|
@@ -1724,11 +1725,16 @@ function useOtpActions(port, item, onChanged) {
|
|
|
1724
1725
|
function TotpRow({ port, item, onChanged }) {
|
|
1725
1726
|
const a = useOtpActions(port, item, onChanged);
|
|
1726
1727
|
const live = useLiveCode(port, item, a.enabled && !a.removed);
|
|
1728
|
+
const { copy } = useCopied();
|
|
1727
1729
|
const canManage = item.capabilities.canManage || item.capabilities.canEdit;
|
|
1728
1730
|
if (a.removed || !item.authenticator) return null;
|
|
1729
1731
|
const menu = canManage ? /* @__PURE__ */ jsxs7(DropdownMenu, { children: [
|
|
1730
1732
|
/* @__PURE__ */ jsx8(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx8(Button6, { variant: "quiet", icon: /* @__PURE__ */ jsx8(MoreGlyph, {}), "aria-label": "Authenticator options", disabled: a.busy }) }),
|
|
1731
1733
|
/* @__PURE__ */ jsxs7(DropdownMenuContent, { align: "end", className: "min-w-44", children: [
|
|
1734
|
+
a.enabled && live.code ? /* @__PURE__ */ jsxs7(DropdownMenuItem, { onSelect: () => live.code && void copy(live.code), children: [
|
|
1735
|
+
/* @__PURE__ */ jsx8(CopyIcon4, { className: "size-4" }),
|
|
1736
|
+
"Copy code"
|
|
1737
|
+
] }) : null,
|
|
1732
1738
|
/* @__PURE__ */ jsxs7(DropdownMenuItem, { onSelect: () => void a.setEnabled(!a.enabled), children: [
|
|
1733
1739
|
/* @__PURE__ */ jsx8(PowerGlyph, { className: "size-4" }),
|
|
1734
1740
|
a.enabled ? "Turn off" : "Turn on"
|
|
@@ -1740,12 +1746,12 @@ function TotpRow({ port, item, onChanged }) {
|
|
|
1740
1746
|
] })
|
|
1741
1747
|
] })
|
|
1742
1748
|
] }) : null;
|
|
1743
|
-
return /* @__PURE__ */ jsx8(
|
|
1749
|
+
return /* @__PURE__ */ jsx8("div", { className: "@container/otprow", children: /* @__PURE__ */ jsx8(
|
|
1744
1750
|
VaultRow,
|
|
1745
1751
|
{
|
|
1746
1752
|
label: "Authenticator",
|
|
1747
1753
|
actions: /* @__PURE__ */ jsxs7(Fragment5, { children: [
|
|
1748
|
-
a.enabled ? /* @__PURE__ */ jsx8(CopyCodeButton, { live, label: item.name }) : null,
|
|
1754
|
+
a.enabled ? /* @__PURE__ */ jsx8("span", { className: "hidden @[24rem]/otprow:contents", "data-copy-code-button": "", children: /* @__PURE__ */ jsx8(CopyCodeButton, { live, label: item.name }) }) : null,
|
|
1749
1755
|
menu
|
|
1750
1756
|
] }),
|
|
1751
1757
|
children: a.error ? /* @__PURE__ */ jsxs7("span", { className: "flex items-center gap-2", children: [
|
|
@@ -1759,7 +1765,7 @@ function TotpRow({ port, item, onChanged }) {
|
|
|
1759
1765
|
/* @__PURE__ */ jsx8(Button6, { variant: "quiet", onClick: live.retry, children: "Retry" })
|
|
1760
1766
|
] }) : /* @__PURE__ */ jsx8(CodeButton, { live, digits: item.authenticator.digits, label: item.name })
|
|
1761
1767
|
}
|
|
1762
|
-
);
|
|
1768
|
+
) });
|
|
1763
1769
|
}
|
|
1764
1770
|
function TotpEditRow({ value, onChange, hasExisting, item, port, onEnrolled, onRecognized }) {
|
|
1765
1771
|
const confirmed = useConfirmed();
|
|
@@ -2128,71 +2134,76 @@ function OtpListRow({ port, item, family, entry, onOpen, onOpenInNewTab, onRenam
|
|
|
2128
2134
|
const canManage = item.capabilities.canManage || item.capabilities.canEdit;
|
|
2129
2135
|
if (a.removed) return null;
|
|
2130
2136
|
const sub = a.error ?? [entry?.account, loginSiteOf(item) || entry?.issuer].filter((v, i, all) => Boolean(v) && all.indexOf(v) === i).join(" \xB7 ");
|
|
2131
|
-
return
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
/* @__PURE__ */ jsx10("
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
] }) : null,
|
|
2174
|
-
live.code ? /* @__PURE__ */ jsxs9(DropdownMenuItem2, { onSelect: () => live.code && void copy(live.code), children: [
|
|
2175
|
-
/* @__PURE__ */ jsx10(CopyIcon4, { className: "size-4" }),
|
|
2176
|
-
"Copy code"
|
|
2177
|
-
] }) : null,
|
|
2178
|
-
canManage ? /* @__PURE__ */ jsxs9(Fragment7, { children: [
|
|
2179
|
-
/* @__PURE__ */ jsxs9(DropdownMenuItem2, { onSelect: onRename, children: [
|
|
2180
|
-
/* @__PURE__ */ jsx10(PencilGlyph, { className: "size-4" }),
|
|
2181
|
-
"Rename"
|
|
2182
|
-
] }),
|
|
2183
|
-
/* @__PURE__ */ jsxs9(DropdownMenuItem2, { onSelect: () => void a.setEnabled(!a.enabled), children: [
|
|
2184
|
-
/* @__PURE__ */ jsx10(PowerGlyph, { className: "size-4" }),
|
|
2185
|
-
a.enabled ? "Turn off" : "Turn on"
|
|
2137
|
+
return (
|
|
2138
|
+
// A container, not the window, decides: below 26rem of row width the code drops onto its own line
|
|
2139
|
+
// under the name (the name keeps the whole row's width, the code is never squeezed); above it
|
|
2140
|
+
// everything sits on one line. The side panel and the 22.5rem frame are narrow at any window size.
|
|
2141
|
+
/* @__PURE__ */ jsx10("div", { className: "@container/otp", children: /* @__PURE__ */ jsxs9("div", { className: "grid min-h-14 grid-cols-[2rem_minmax(0,1fr)_auto] items-center gap-x-1 gap-y-0.5 rounded-lg px-2 py-1.5 transition-colors hover:bg-accent/50 @[26rem]/otp:grid-cols-[2rem_minmax(0,1fr)_auto_auto]", children: [
|
|
2142
|
+
/* @__PURE__ */ jsx10(
|
|
2143
|
+
Button8,
|
|
2144
|
+
{
|
|
2145
|
+
type: "button",
|
|
2146
|
+
variant: "quiet",
|
|
2147
|
+
icon: /* @__PURE__ */ jsx10(ItemIcon, { definitionKey: item.definitionKey, family, site: loginSiteOf(item) || (entry?.issuer ?? "") }),
|
|
2148
|
+
"aria-label": `Open ${item.name}`,
|
|
2149
|
+
tabIndex: -1,
|
|
2150
|
+
className: "col-start-1 row-start-1 shrink-0",
|
|
2151
|
+
onClick: onOpen
|
|
2152
|
+
}
|
|
2153
|
+
),
|
|
2154
|
+
/* @__PURE__ */ jsx10(
|
|
2155
|
+
Tile2,
|
|
2156
|
+
{
|
|
2157
|
+
type: "button",
|
|
2158
|
+
variant: "quiet",
|
|
2159
|
+
onClick: onOpen,
|
|
2160
|
+
title: /* @__PURE__ */ jsx10("span", { className: a.enabled ? "text-foreground" : "text-muted-foreground", children: item.name }),
|
|
2161
|
+
line: sub ? /* @__PURE__ */ jsx10("span", { className: a.error ? "text-destructive" : "text-muted-foreground", title: sub, children: sub }) : void 0,
|
|
2162
|
+
oneLine: true,
|
|
2163
|
+
className: "col-start-2 row-start-1 min-w-0"
|
|
2164
|
+
}
|
|
2165
|
+
),
|
|
2166
|
+
/* @__PURE__ */ jsx10("div", { className: "col-start-2 row-start-2 flex min-w-0 justify-start @[26rem]/otp:col-start-3 @[26rem]/otp:row-start-1 @[26rem]/otp:shrink-0 @[26rem]/otp:justify-end", children: !a.enabled ? /* @__PURE__ */ jsxs9("span", { className: "flex items-center gap-1.5", children: [
|
|
2167
|
+
/* @__PURE__ */ jsx10("span", { className: "text-sm text-disabled-foreground", children: "Off" }),
|
|
2168
|
+
canManage ? /* @__PURE__ */ jsx10(Button8, { variant: "quiet", disabled: a.busy, onClick: () => void a.setEnabled(true), children: "Turn on" }) : null
|
|
2169
|
+
] }) : live.error ? /* @__PURE__ */ jsxs9("span", { className: "flex items-center gap-1.5", children: [
|
|
2170
|
+
/* @__PURE__ */ jsx10("span", { className: "max-w-40 truncate text-xs text-destructive", title: live.error, children: live.error }),
|
|
2171
|
+
/* @__PURE__ */ jsx10(Button8, { variant: "quiet", onClick: live.retry, children: "Retry" })
|
|
2172
|
+
] }) : /* @__PURE__ */ jsx10(CodeButton, { live, digits: item.authenticator?.digits ?? 6, label: item.name }) }),
|
|
2173
|
+
/* @__PURE__ */ jsxs9(DropdownMenu2, { children: [
|
|
2174
|
+
/* @__PURE__ */ jsx10(DropdownMenuTrigger2, { asChild: true, children: /* @__PURE__ */ jsx10(Button8, { variant: "quiet", icon: /* @__PURE__ */ jsx10(MoreGlyph, {}), "aria-label": `${item.name} options`, disabled: a.busy, className: "col-start-3 row-start-1 @[26rem]/otp:col-start-4" }) }),
|
|
2175
|
+
/* @__PURE__ */ jsxs9(DropdownMenuContent2, { align: "end", className: "min-w-44", children: [
|
|
2176
|
+
/* @__PURE__ */ jsxs9(DropdownMenuItem2, { onSelect: onOpen, children: [
|
|
2177
|
+
/* @__PURE__ */ jsx10(ExternalGlyph, { className: "size-4" }),
|
|
2178
|
+
"Open login"
|
|
2186
2179
|
] }),
|
|
2187
|
-
/* @__PURE__ */
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2180
|
+
onOpenInNewTab ? /* @__PURE__ */ jsxs9(DropdownMenuItem2, { onSelect: onOpenInNewTab, children: [
|
|
2181
|
+
/* @__PURE__ */ jsx10(ExternalGlyph, { className: "size-4" }),
|
|
2182
|
+
"Open in new tab"
|
|
2183
|
+
] }) : null,
|
|
2184
|
+
live.code ? /* @__PURE__ */ jsxs9(DropdownMenuItem2, { onSelect: () => live.code && void copy(live.code), children: [
|
|
2185
|
+
/* @__PURE__ */ jsx10(CopyIcon5, { className: "size-4" }),
|
|
2186
|
+
"Copy code"
|
|
2187
|
+
] }) : null,
|
|
2188
|
+
canManage ? /* @__PURE__ */ jsxs9(Fragment7, { children: [
|
|
2189
|
+
/* @__PURE__ */ jsxs9(DropdownMenuItem2, { onSelect: onRename, children: [
|
|
2190
|
+
/* @__PURE__ */ jsx10(PencilGlyph, { className: "size-4" }),
|
|
2191
|
+
"Rename"
|
|
2192
|
+
] }),
|
|
2193
|
+
/* @__PURE__ */ jsxs9(DropdownMenuItem2, { onSelect: () => void a.setEnabled(!a.enabled), children: [
|
|
2194
|
+
/* @__PURE__ */ jsx10(PowerGlyph, { className: "size-4" }),
|
|
2195
|
+
a.enabled ? "Turn off" : "Turn on"
|
|
2196
|
+
] }),
|
|
2197
|
+
/* @__PURE__ */ jsx10(DropdownMenuSeparator2, {}),
|
|
2198
|
+
/* @__PURE__ */ jsxs9(DropdownMenuItem2, { className: "text-destructive focus:text-destructive", onSelect: () => void a.remove(), children: [
|
|
2199
|
+
/* @__PURE__ */ jsx10(TrashGlyph, { className: "size-4" }),
|
|
2200
|
+
"Remove"
|
|
2201
|
+
] })
|
|
2202
|
+
] }) : null
|
|
2203
|
+
] })
|
|
2193
2204
|
] })
|
|
2194
|
-
] })
|
|
2195
|
-
|
|
2205
|
+
] }) })
|
|
2206
|
+
);
|
|
2196
2207
|
}
|
|
2197
2208
|
|
|
2198
2209
|
// src/fields/SettingsPanels.tsx
|
|
@@ -2496,7 +2507,7 @@ function ItemSettingsPanel({ item, port, onClose, onChanged, onPanel }) {
|
|
|
2496
2507
|
import { createContext as createContext3, useContext as useContext3, useEffect as useEffect10, useRef as useRef8, useState as useState13 } from "react";
|
|
2497
2508
|
import { Popover, PopoverContent, PopoverTrigger, cn as cn6 } from "@ai-matrx/design-system";
|
|
2498
2509
|
import { Button as Button10, NumberStepper, SegmentedControl as SegmentedControl2, Select as Select4, Switch as Switch2 } from "@ai-matrx/design-system/controls";
|
|
2499
|
-
import { CopyIcon as
|
|
2510
|
+
import { CopyIcon as CopyIcon6 } from "@ai-matrx/design-system/icons";
|
|
2500
2511
|
|
|
2501
2512
|
// src/generator/generate.ts
|
|
2502
2513
|
import {
|
|
@@ -2654,7 +2665,7 @@ function PasswordGenerator({ limits: source, onUse, useLabel = "Use" }) {
|
|
|
2654
2665
|
/* @__PURE__ */ jsxs11("div", { className: "flex min-h-7 items-start gap-1", children: [
|
|
2655
2666
|
/* @__PURE__ */ jsx12("code", { className: cn6("min-w-0 flex-1 break-all py-1 font-mono text-sm", candidate ? "text-foreground" : "text-muted-foreground"), "data-testid": "generated-value", children: candidate ? revealed ? candidate.value : MASK3 : "\u2014" }),
|
|
2656
2667
|
/* @__PURE__ */ jsx12(Button10, { variant: "quiet", icon: revealed ? /* @__PURE__ */ jsx12(EyeOffGlyph, {}) : /* @__PURE__ */ jsx12(EyeGlyph, {}), "aria-label": revealed ? "Hide" : "Reveal", disabled: !candidate, onClick: () => setRevealed((r) => !r) }),
|
|
2657
|
-
/* @__PURE__ */ jsx12(Button10, { variant: "quiet", icon: /* @__PURE__ */ jsx12(
|
|
2668
|
+
/* @__PURE__ */ jsx12(Button10, { variant: "quiet", icon: /* @__PURE__ */ jsx12(CopyIcon6, {}), "aria-label": "Copy", disabled: !candidate, onClick: () => void copy() }),
|
|
2658
2669
|
/* @__PURE__ */ jsx12(Button10, { variant: "quiet", icon: /* @__PURE__ */ jsx12(RefreshGlyph, {}), "aria-label": "Generate another", onClick: () => change(settings) })
|
|
2659
2670
|
] }),
|
|
2660
2671
|
strength && candidate ? /* @__PURE__ */ jsxs11("p", { className: "text-xs", children: [
|
|
@@ -4540,7 +4551,7 @@ import { useEffect as useEffect16, useRef as useRef14, useState as useState27 }
|
|
|
4540
4551
|
import { DropdownMenu as DropdownMenu4, DropdownMenuContent as DropdownMenuContent4, DropdownMenuItem as DropdownMenuItem4, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator as DropdownMenuSeparator4, DropdownMenuTrigger as DropdownMenuTrigger4 } from "@ai-matrx/design-system";
|
|
4541
4552
|
import { cn as cn11 } from "@ai-matrx/design-system";
|
|
4542
4553
|
import { Button as Button22, SearchField, Tile as Tile3 } from "@ai-matrx/design-system/controls";
|
|
4543
|
-
import { CopyIcon as
|
|
4554
|
+
import { CopyIcon as CopyIcon8 } from "@ai-matrx/design-system/icons";
|
|
4544
4555
|
|
|
4545
4556
|
// src/ItemPane.tsx
|
|
4546
4557
|
import { Fragment as Fragment16, useEffect as useEffect15, useMemo as useMemo3, useRef as useRef13, useState as useState26 } from "react";
|
|
@@ -4814,7 +4825,7 @@ function DraftFilesSection({ files, onFiles }) {
|
|
|
4814
4825
|
// src/fields/RecoveryCodesRow.tsx
|
|
4815
4826
|
import { useState as useState20 } from "react";
|
|
4816
4827
|
import { Badge as Badge6, Button as Button16, Textarea as Textarea3 } from "@ai-matrx/design-system/controls";
|
|
4817
|
-
import { CopyIcon as
|
|
4828
|
+
import { CopyIcon as CopyIcon7 } from "@ai-matrx/design-system/icons";
|
|
4818
4829
|
import { Fragment as Fragment13, jsx as jsx18, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
4819
4830
|
var MASK4 = "\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022";
|
|
4820
4831
|
var say2 = (e, fallback) => e instanceof Error && e.message ? e.message : fallback;
|
|
@@ -4909,7 +4920,7 @@ function RecoveryCodesRow({ item, field, port, onChanged }) {
|
|
|
4909
4920
|
children: sealed ? /* @__PURE__ */ jsx18(Badge6, { icon: /* @__PURE__ */ jsx18(LockGlyph, {}), children: "Never shown" }) : codes ? /* @__PURE__ */ jsxs17("ul", { className: "flex flex-col gap-0.5", "aria-label": "Recovery codes", children: [
|
|
4910
4921
|
codes.map((code, i) => /* @__PURE__ */ jsxs17("li", { className: "flex min-h-7 items-center gap-1", children: [
|
|
4911
4922
|
/* @__PURE__ */ jsx18("code", { className: "min-w-0 flex-1 break-all font-mono text-sm text-foreground", children: code }),
|
|
4912
|
-
/* @__PURE__ */ jsx18(Button16, { variant: "quiet", icon: /* @__PURE__ */ jsx18(
|
|
4923
|
+
/* @__PURE__ */ jsx18(Button16, { variant: "quiet", icon: /* @__PURE__ */ jsx18(CopyIcon7, {}), "aria-label": `Copy code ${i + 1}`, onClick: () => void copyValue2(code, "Recovery code") }),
|
|
4913
4924
|
canEdit ? /* @__PURE__ */ jsx18(Button16, { variant: "quiet", icon: /* @__PURE__ */ jsx18(CheckGlyph, {}), disabled: busy, onClick: () => void markUsed(i), children: "Mark used" }) : null
|
|
4914
4925
|
] }, `${i}-${code}`)),
|
|
4915
4926
|
error ? /* @__PURE__ */ jsx18("li", { role: "alert", className: "text-xs text-destructive", children: error }) : null
|
|
@@ -5900,20 +5911,20 @@ function ItemPane(props) {
|
|
|
5900
5911
|
};
|
|
5901
5912
|
const tagsVisible = showTags || draft.tags.length > 0 || tagsText !== "";
|
|
5902
5913
|
const descriptionVisible = showDescription || draft.description !== "";
|
|
5903
|
-
const header = /* @__PURE__ */ jsxs22("header", { className: "flex min-h-14 items-center gap-2 border-b border-border px-3 py-2
|
|
5914
|
+
const header = /* @__PURE__ */ jsx24("div", { className: "@container/vhead", children: /* @__PURE__ */ jsxs22("header", { className: "flex min-h-14 items-center gap-2 border-b border-border px-3 py-2 @[30rem]/vhead:gap-3 @[30rem]/vhead:px-5", children: [
|
|
5904
5915
|
onBack ? /* @__PURE__ */ jsx24(Button21, { variant: "quiet", icon: /* @__PURE__ */ jsx24(ChevronLeftGlyph, {}), "aria-label": "Back", onClick: mode === "new" ? onCancelNew : onBack }) : null,
|
|
5905
5916
|
/* @__PURE__ */ jsx24(ItemIcon, { definitionKey: definition?.key ?? item?.definitionKey ?? "custom", family: definition?.family ?? "generic", site: item ? loginSiteOf(item) : loginSiteOf({ loginUrls: draft.loginUrls }), size: "lg" }),
|
|
5906
5917
|
/* @__PURE__ */ jsxs22("div", { className: "flex min-w-0 flex-1 flex-col", children: [
|
|
5907
|
-
/* @__PURE__ */ jsx24("h2", { className: "
|
|
5908
|
-
/* @__PURE__ */ jsxs22("span", { className: "flex min-w-0 items-center gap-1 text-xs text-muted-foreground", children: [
|
|
5909
|
-
typeLabel ? /* @__PURE__ */ jsx24("span", { className: "
|
|
5918
|
+
/* @__PURE__ */ jsx24("h2", { className: "line-clamp-2 break-words text-base font-semibold leading-tight", children: editing ? draft.name || (mode === "new" ? `New ${typeLabel.toLowerCase()}` : item?.name) : item?.name }),
|
|
5919
|
+
/* @__PURE__ */ jsxs22("span", { className: "flex min-w-0 flex-wrap items-center gap-x-1 text-xs text-muted-foreground", children: [
|
|
5920
|
+
typeLabel ? /* @__PURE__ */ jsx24("span", { className: "break-words", children: typeLabel }) : null,
|
|
5910
5921
|
shownOwner ? /* @__PURE__ */ jsx24(Badge7, { className: "shrink-0", icon: shownOwner.glyph, "aria-label": `Saved in ${shownOwner.label}`, title: item && mode !== "new" ? ownerDetail(item.owner) : void 0, children: shownOwner.label }) : null,
|
|
5911
5922
|
item && mode !== "new" && item.owner.memberShared ? /* @__PURE__ */ jsx24("span", { className: "shrink-0", "data-member-shared": "", children: "\xB7 A member\u2019s own" }) : null,
|
|
5912
|
-
item && !editing ? /* @__PURE__ */ jsx24(SharingSummary, { item, port, className: "hidden truncate before:mr-1 before:content-['\xB7']
|
|
5923
|
+
item && !editing ? /* @__PURE__ */ jsx24(SharingSummary, { item, port, className: "hidden truncate before:mr-1 before:content-['\xB7'] @[30rem]/vhead:inline" }, `${item.updatedAt}-${refreshKey ?? ""}`) : null
|
|
5913
5924
|
] })
|
|
5914
5925
|
] }),
|
|
5915
5926
|
editing ? /* @__PURE__ */ jsxs22("div", { className: "flex shrink-0 items-center gap-2", children: [
|
|
5916
|
-
dirty ? /* @__PURE__ */ jsxs22("span", { className: "hidden items-center gap-1.5 text-xs text-muted-foreground
|
|
5927
|
+
dirty ? /* @__PURE__ */ jsxs22("span", { className: "hidden items-center gap-1.5 text-xs text-muted-foreground @[30rem]/vhead:flex", role: "status", children: [
|
|
5917
5928
|
/* @__PURE__ */ jsx24("span", { className: "size-1.5 rounded-full bg-warning", "aria-hidden": true }),
|
|
5918
5929
|
"Unsaved"
|
|
5919
5930
|
] }) : null,
|
|
@@ -5932,8 +5943,8 @@ function ItemPane(props) {
|
|
|
5932
5943
|
children: "Fill"
|
|
5933
5944
|
}
|
|
5934
5945
|
) : null,
|
|
5935
|
-
favorite ? /* @__PURE__ */ jsx24("span", { className: "hidden
|
|
5936
|
-
canManage ? /* @__PURE__ */ jsx24("span", { className: "hidden
|
|
5946
|
+
favorite ? /* @__PURE__ */ jsx24("span", { className: "hidden @[30rem]/vhead:contents", children: /* @__PURE__ */ jsx24(Button21, { variant: "quiet", icon: /* @__PURE__ */ jsx24(StarGlyph, { className: favorite.on ? "fill-current text-warning" : "size-4" }), "aria-label": favorite.on ? "Remove from favorites" : "Add to favorites", pressed: favorite.on, onClick: favorite.toggle }) }) : null,
|
|
5947
|
+
canManage ? /* @__PURE__ */ jsx24("span", { className: "hidden @[30rem]/vhead:contents", children: /* @__PURE__ */ jsx24(Button21, { variant: "quiet", icon: /* @__PURE__ */ jsx24(ShareGlyph, {}), "aria-label": "Share", onClick: () => onPanel("share") }) }) : null,
|
|
5937
5948
|
canEdit ? /* @__PURE__ */ jsx24(Button21, { variant: "outline", icon: /* @__PURE__ */ jsx24(PencilGlyph, {}), collapse: "container", "aria-label": "Edit", onClick: () => onMode("edit"), children: "Edit" }) : null,
|
|
5938
5949
|
/* @__PURE__ */ jsxs22(DropdownMenu3, { children: [
|
|
5939
5950
|
/* @__PURE__ */ jsx24(DropdownMenuTrigger3, { asChild: true, children: /* @__PURE__ */ jsx24(Button21, { variant: "quiet", icon: /* @__PURE__ */ jsx24(MoreGlyph, {}), "aria-label": "More actions" }) }),
|
|
@@ -5987,7 +5998,7 @@ function ItemPane(props) {
|
|
|
5987
5998
|
] })
|
|
5988
5999
|
] })
|
|
5989
6000
|
] }) : null
|
|
5990
|
-
] });
|
|
6001
|
+
] }) });
|
|
5991
6002
|
const filesProps = item ? { item, port, host, definition, organizations, arg: null, onClose: () => void 0, onChanged, onPanel } : null;
|
|
5992
6003
|
return /* @__PURE__ */ jsx24(RoomProvider, { value: room, children: /* @__PURE__ */ jsxs22("article", { ref: paneRef, "aria-label": item?.name ?? "New item", className: cn10(CONTROLS_CONTAINER_CLASS, "flex h-full min-h-0 flex-col bg-background"), children: [
|
|
5993
6004
|
header,
|
|
@@ -6357,7 +6368,7 @@ function ListRow({ item, family, port, on, onSelect, withOwner, ownContextMenu,
|
|
|
6357
6368
|
];
|
|
6358
6369
|
const entriesRef = useRef14(entries);
|
|
6359
6370
|
entriesRef.current = entries;
|
|
6360
|
-
const glyphOf = (e) => e.id === "copy:username" ? /* @__PURE__ */ jsx25(UserGlyph, { className: "size-4" }) : e.id === "copy:password" ? /* @__PURE__ */ jsx25(KeyGlyph, { className: "size-4" }) : e.id === "copy:code" ? /* @__PURE__ */ jsx25(ClockGlyph, { className: "size-4" }) : e.kind === "favorite" ? /* @__PURE__ */ jsx25(StarGlyph, { className: cn11("size-4", favorite?.on && "fill-current text-warning") }) : e.kind === "open" ? /* @__PURE__ */ jsx25(ChevronRightGlyph, { className: "size-4" }) : e.kind === "host" || e.kind === "manage" ? null : /* @__PURE__ */ jsx25(
|
|
6371
|
+
const glyphOf = (e) => e.id === "copy:username" ? /* @__PURE__ */ jsx25(UserGlyph, { className: "size-4" }) : e.id === "copy:password" ? /* @__PURE__ */ jsx25(KeyGlyph, { className: "size-4" }) : e.id === "copy:code" ? /* @__PURE__ */ jsx25(ClockGlyph, { className: "size-4" }) : e.kind === "favorite" ? /* @__PURE__ */ jsx25(StarGlyph, { className: cn11("size-4", favorite?.on && "fill-current text-warning") }) : e.kind === "open" ? /* @__PURE__ */ jsx25(ChevronRightGlyph, { className: "size-4" }) : e.kind === "host" || e.kind === "manage" ? null : /* @__PURE__ */ jsx25(CopyIcon8, { className: "size-4" });
|
|
6361
6372
|
const menuItem = (e) => /* @__PURE__ */ jsxs23(DropdownMenuItem4, { disabled: e.disabled ?? false, onSelect: e.onSelect, children: [
|
|
6362
6373
|
glyphOf(e),
|
|
6363
6374
|
e.label
|
|
@@ -7793,7 +7804,7 @@ function FillSetupCard({ fillSetup }) {
|
|
|
7793
7804
|
import { useState as useState37 } from "react";
|
|
7794
7805
|
import { Popover as Popover2, PopoverContent as PopoverContent2, PopoverTrigger as PopoverTrigger2 } from "@ai-matrx/design-system";
|
|
7795
7806
|
import { Button as Button31 } from "@ai-matrx/design-system/controls";
|
|
7796
|
-
import { CopyIcon as
|
|
7807
|
+
import { CopyIcon as CopyIcon9 } from "@ai-matrx/design-system/icons";
|
|
7797
7808
|
import { Fragment as Fragment22, jsx as jsx34, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
7798
7809
|
var HOLD_MS = 6e4;
|
|
7799
7810
|
function PageGenerator({ fields }) {
|
|
@@ -7851,7 +7862,7 @@ function PageGenerator({ fields }) {
|
|
|
7851
7862
|
{
|
|
7852
7863
|
label: "New password",
|
|
7853
7864
|
actions: /* @__PURE__ */ jsxs32(Fragment22, { children: [
|
|
7854
|
-
value ? /* @__PURE__ */ jsx34(Button31, { variant: "quiet", icon: /* @__PURE__ */ jsx34(
|
|
7865
|
+
value ? /* @__PURE__ */ jsx34(Button31, { variant: "quiet", icon: /* @__PURE__ */ jsx34(CopyIcon9, {}), "aria-label": "Copy password", onClick: () => void copy(value, "Password") }) : null,
|
|
7855
7866
|
/* @__PURE__ */ jsxs32(Popover2, { open, onOpenChange: setOpen, children: [
|
|
7856
7867
|
/* @__PURE__ */ jsx34(PopoverTrigger2, { asChild: true, children: /* @__PURE__ */ jsx34(Button31, { variant: "outline", icon: /* @__PURE__ */ jsx34(KeyGlyph, {}), disabled: busy, children: "Generate" }) }),
|
|
7857
7868
|
/* @__PURE__ */ jsx34(PopoverContent2, { sizing: "content", align: "end", children: open ? /* @__PURE__ */ jsx34(PasswordGenerator, { limits, useLabel: "Fill page", onUse: (v) => void onUse(v) }) : null })
|