@ai-matrx/vault 0.1.7 → 0.1.9

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 CHANGED
@@ -1,5 +1,26 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.9
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
+
8
+ ## 0.1.8
9
+
10
+ SOURCE CHANGED WITH NO RELEASE NOTE. This release shipped source changes that nobody described in an Unreleased entry,
11
+ so they may include breaking API changes. Consumer action is UNKNOWN: read the diff before upgrading.
12
+ Diff: `git diff 6fa7cb3c19 d5c0f6daba -- apps/shared/vault/src`
13
+
14
+ Changed shipped source files (8):
15
+ - `apps/shared/vault/src/io/bitwarden-json.ts`
16
+ - `apps/shared/vault/src/io/onepux.ts`
17
+ - `apps/shared/vault/src/io/proton-pass.ts`
18
+ - `apps/shared/vault/src/io/strict-json.ts`
19
+ - `apps/shared/vault/src/sharing/MovePanel.tsx`
20
+ - `apps/shared/vault/src/sharing/SecureLinkPanel.tsx`
21
+ - `apps/shared/vault/src/sharing/SharePanel.tsx`
22
+ - `apps/shared/vault/src/sharing/parts.tsx`
23
+
3
24
  ## 0.1.7
4
25
  ### Unreleased
5
26
 
package/dist/index.cjs CHANGED
@@ -639,12 +639,13 @@ function useRoomOf(ref) {
639
639
  var RoomProvider = Room.Provider;
640
640
  function Section({ title, actions, children, className }) {
641
641
  const flat = (0, import_react4.useContext)(InPanel);
642
+ const desktop = (0, import_design_system4.useLook)() === "desktop";
642
643
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("section", { className: (0, import_design_system4.cn)("flex flex-col gap-1.5", className), children: [
643
644
  title || actions ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex min-h-7 items-center justify-between gap-2 px-1", children: [
644
- title ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("h3", { className: "text-xs font-medium text-muted-foreground", children: title }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", {}),
645
+ title ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("h3", { className: desktop ? "text-sm font-semibold text-foreground" : "text-xs font-medium text-muted-foreground", children: title }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", {}),
645
646
  actions ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "flex items-center gap-1", children: actions }) : null
646
647
  ] }) : null,
647
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: flat ? "-mx-3 flex flex-col sm:-mx-4" : "flex flex-col rounded-xl border border-border bg-card py-1", children })
648
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: flat ? "-mx-3 flex flex-col sm:-mx-4" : desktop ? "flex flex-col divide-y divide-border rounded-xl bg-card" : "flex flex-col rounded-xl border border-border bg-card py-1", children })
648
649
  ] });
649
650
  }
650
651
  var ROW_GRID = {
@@ -5256,7 +5257,7 @@ var message = (e, fallback) => {
5256
5257
  const m = e instanceof Error && e.message ? e.message : fallback;
5257
5258
  return copyRefusal(m) ?? m;
5258
5259
  };
5259
- function useAction() {
5260
+ function useConfirmedChange() {
5260
5261
  const confirmed = useConfirmed();
5261
5262
  const [busy, setBusy] = (0, import_react24.useState)(null);
5262
5263
  const [error, setError] = (0, import_react24.useState)(null);
@@ -5300,7 +5301,7 @@ var import_controls19 = require("@ai-matrx/design-system/controls");
5300
5301
  var import_jsx_runtime24 = require("react/jsx-runtime");
5301
5302
  var NONE = "__none__";
5302
5303
  function MovePanel({ item, port, organizations, onClose, onChanged }) {
5303
- const { busy, error, notice, run, setNotice } = useAction();
5304
+ const { busy, error, notice, run, setNotice } = useConfirmedChange();
5304
5305
  const moves = moveDestinations(item, organizations);
5305
5306
  const copies = copyDestinations(organizations, item);
5306
5307
  const [moveTo, setMoveTo] = (0, import_react25.useState)("");
@@ -5406,7 +5407,7 @@ function useGrants(port, item) {
5406
5407
  }
5407
5408
  function SharePanel({ item, port, organizations, onClose, onChanged }) {
5408
5409
  const { grants, setGrants, loadError, reload } = useGrants(port, item);
5409
- const { busy, error, notice, run } = useAction();
5410
+ const { busy, error, notice, run } = useConfirmedChange();
5410
5411
  const [email, setEmail] = (0, import_react26.useState)("");
5411
5412
  const [level, setLevel] = (0, import_react26.useState)("use");
5412
5413
  const [more, setMore] = (0, import_react26.useState)(false);
@@ -5529,7 +5530,7 @@ function SharePanel({ item, port, organizations, onClose, onChanged }) {
5529
5530
  );
5530
5531
  }
5531
5532
  function IntoOrganization({ item, port, organizations, grants, onShared }) {
5532
- const { busy, error, notice, run } = useAction();
5533
+ const { busy, error, notice, run } = useConfirmedChange();
5533
5534
  const open = organizations.filter((o) => !grants.some((g) => g.organizationId === o.id));
5534
5535
  const [target, setTarget] = (0, import_react26.useState)("");
5535
5536
  const [level, setLevel] = (0, import_react26.useState)("use");
@@ -5569,7 +5570,7 @@ var CHOICES = [
5569
5570
  function MemberAccess({ port, organizationId, organizationName }) {
5570
5571
  const [list, setList] = (0, import_react26.useState)(null);
5571
5572
  const [loadError, setLoadError] = (0, import_react26.useState)(null);
5572
- const { busy, error, run } = useAction();
5573
+ const { busy, error, run } = useConfirmedChange();
5573
5574
  (0, import_react26.useEffect)(() => {
5574
5575
  let live = true;
5575
5576
  port.sharing.memberAccess(organizationId).then(
@@ -6452,7 +6453,7 @@ function sortSent(rows) {
6452
6453
  var import_jsx_runtime31 = require("react/jsx-runtime");
6453
6454
  function SecureLinkPanel({ item, port, onClose }) {
6454
6455
  const sharing = port.sharing;
6455
- const { busy, error, notice, run, setNotice } = useAction();
6456
+ const { busy, error, notice, run, setNotice } = useConfirmedChange();
6456
6457
  const [remedy, setRemedy] = (0, import_react32.useState)(null);
6457
6458
  const [options, setOptions] = (0, import_react32.useState)(null);
6458
6459
  const [optionsError, setOptionsError] = (0, import_react32.useState)(null);
@@ -7665,13 +7666,14 @@ function viewOptions(views, allCount, deletedCount, hasFavorites, hasRecents, ha
7665
7666
  ];
7666
7667
  }
7667
7668
  function Entry({ on, glyph: Icon, label, count: count2, onClick }) {
7669
+ const desktop = (0, import_design_system24.useLook)() === "desktop";
7668
7670
  return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
7669
7671
  "button",
7670
7672
  {
7671
7673
  type: "button",
7672
7674
  "aria-current": on ? "page" : void 0,
7673
7675
  onClick,
7674
- className: (0, import_design_system24.cn)("flex h-8 w-full items-center gap-2.5 rounded-lg px-2.5 text-left text-sm", on ? "bg-sidebar-accent font-medium text-sidebar-accent-foreground" : "text-sidebar-foreground hover:bg-sidebar-accent"),
7676
+ className: (0, import_design_system24.cn)("flex h-8 w-full items-center gap-2.5 rounded-lg px-2.5 text-left text-sm", on ? desktop ? "bg-sidebar-accent text-primary" : "bg-sidebar-accent font-medium text-sidebar-accent-foreground" : "text-sidebar-foreground hover:bg-sidebar-accent"),
7675
7677
  children: [
7676
7678
  /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Icon, { className: "size-4 shrink-0" }),
7677
7679
  /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "min-w-0 flex-1 truncate", children: label }),
@@ -7768,7 +7770,7 @@ function VaultApp(props) {
7768
7770
  const lock = props.host?.lock;
7769
7771
  const locked = useLocked(lock);
7770
7772
  const port = (0, import_react41.useMemo)(() => lock ? guardPort(props.port, () => lock.locked()) : props.port, [props.port, lock]);
7771
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "relative h-full min-h-0 w-full", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(NoticeProvider, { notify: props.notify, children: lock && locked ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(LockedScreen, { lock }) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ClipboardProvider, { clipboard: props.host?.clipboard, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(RevealSecondsProvider, { seconds: props.host?.revealSeconds, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(IdentityGate, { identity: props.host?.identity, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(GeneratorLimitsProvider, { resolve: generatorLimitsFrom(props.host?.knobs), children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Workspace, { ...props, port }) }) }) }) }) }) });
7773
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_design_system25.LookScope, { look: props.look ?? "web", className: "h-full min-h-0 w-full", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "relative h-full min-h-0 w-full", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(NoticeProvider, { notify: props.notify, children: lock && locked ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(LockedScreen, { lock }) : /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(ClipboardProvider, { clipboard: props.host?.clipboard, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(RevealSecondsProvider, { seconds: props.host?.revealSeconds, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(IdentityGate, { identity: props.host?.identity, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(GeneratorLimitsProvider, { resolve: generatorLimitsFrom(props.host?.knobs), children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Workspace, { ...props, port }) }) }) }) }) }) }) });
7772
7774
  }
7773
7775
  function LockedScreen({ lock }) {
7774
7776
  const [busy, setBusy] = (0, import_react41.useState)(false);