@ai-matrx/vault 0.1.8 → 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 +21 -0
- package/dist/index.cjs +6 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +9 -7
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
+
import { Look } from '@ai-matrx/design-system';
|
|
2
3
|
import { KnobClient } from '@ai-matrx/data/knobs';
|
|
3
4
|
import * as account from '@ai-matrx/api/account';
|
|
4
5
|
import { Api } from '@ai-matrx/api';
|
|
@@ -1192,6 +1193,12 @@ interface VaultAppProps {
|
|
|
1192
1193
|
onLocationChange?: (next: VaultLocation, how: "push" | "replace") => void;
|
|
1193
1194
|
/** The host's own toasts; without it the vault shows its own short notices. */
|
|
1194
1195
|
notify?: Notify;
|
|
1196
|
+
/**
|
|
1197
|
+
* The skin, never the screens: `"web"` (default) is the website's and the extension's look;
|
|
1198
|
+
* `"desktop"` draws the same workspace in the desktop standard (Matrx Desktop: the system font,
|
|
1199
|
+
* Apple's text styles, AppKit controls and grouped boxes, sheets for panels, light and dark).
|
|
1200
|
+
*/
|
|
1201
|
+
look?: Look;
|
|
1195
1202
|
}
|
|
1196
1203
|
/** THE VAULT WORKSPACE: one component for the web app, the extension side panel and the desktop app. */
|
|
1197
1204
|
declare function VaultApp(props: VaultAppProps): react.JSX.Element;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
+
import { Look } from '@ai-matrx/design-system';
|
|
2
3
|
import { KnobClient } from '@ai-matrx/data/knobs';
|
|
3
4
|
import * as account from '@ai-matrx/api/account';
|
|
4
5
|
import { Api } from '@ai-matrx/api';
|
|
@@ -1192,6 +1193,12 @@ interface VaultAppProps {
|
|
|
1192
1193
|
onLocationChange?: (next: VaultLocation, how: "push" | "replace") => void;
|
|
1193
1194
|
/** The host's own toasts; without it the vault shows its own short notices. */
|
|
1194
1195
|
notify?: Notify;
|
|
1196
|
+
/**
|
|
1197
|
+
* The skin, never the screens: `"web"` (default) is the website's and the extension's look;
|
|
1198
|
+
* `"desktop"` draws the same workspace in the desktop standard (Matrx Desktop: the system font,
|
|
1199
|
+
* Apple's text styles, AppKit controls and grouped boxes, sheets for panels, light and dark).
|
|
1200
|
+
*/
|
|
1201
|
+
look?: Look;
|
|
1195
1202
|
}
|
|
1196
1203
|
/** THE VAULT WORKSPACE: one component for the web app, the extension side panel and the desktop app. */
|
|
1197
1204
|
declare function VaultApp(props: VaultAppProps): react.JSX.Element;
|
package/dist/index.js
CHANGED
|
@@ -102,7 +102,7 @@ var init_keepass_xml_worker_client = __esm({
|
|
|
102
102
|
|
|
103
103
|
// src/VaultApp.tsx
|
|
104
104
|
import { useCallback as useCallback5, useEffect as useEffect23, useMemo as useMemo6, useRef as useRef19, useState as useState40 } from "react";
|
|
105
|
-
import { DropdownMenu as DropdownMenu6, DropdownMenuContent as DropdownMenuContent6, DropdownMenuItem as DropdownMenuItem5, DropdownMenuTrigger as DropdownMenuTrigger6 } from "@ai-matrx/design-system";
|
|
105
|
+
import { DropdownMenu as DropdownMenu6, DropdownMenuContent as DropdownMenuContent6, DropdownMenuItem as DropdownMenuItem5, DropdownMenuTrigger as DropdownMenuTrigger6, LookScope } from "@ai-matrx/design-system";
|
|
106
106
|
import { Button as Button33, SearchField as SearchField4, Select as Select11 } from "@ai-matrx/design-system/controls";
|
|
107
107
|
import { confirm as confirm13 } from "@ai-matrx/kit/confirm-opener";
|
|
108
108
|
|
|
@@ -560,7 +560,7 @@ function useElementWidth(ref) {
|
|
|
560
560
|
// src/ui.tsx
|
|
561
561
|
import { createContext as createContext4, useContext as useContext4, useEffect as useEffect4, useState as useState4 } from "react";
|
|
562
562
|
import { Dialog as Dialog2, DialogContent as DialogContent2, DialogFooter, DialogHeader as DialogHeader2, DialogTitle as DialogTitle2 } from "@ai-matrx/design-system";
|
|
563
|
-
import { cn as cn2 } from "@ai-matrx/design-system";
|
|
563
|
+
import { cn as cn2, useLook } from "@ai-matrx/design-system";
|
|
564
564
|
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
565
565
|
var InPanel = createContext4(false);
|
|
566
566
|
var Room = createContext4(null);
|
|
@@ -581,12 +581,13 @@ function useRoomOf(ref) {
|
|
|
581
581
|
var RoomProvider = Room.Provider;
|
|
582
582
|
function Section({ title, actions, children, className }) {
|
|
583
583
|
const flat = useContext4(InPanel);
|
|
584
|
+
const desktop = useLook() === "desktop";
|
|
584
585
|
return /* @__PURE__ */ jsxs4("section", { className: cn2("flex flex-col gap-1.5", className), children: [
|
|
585
586
|
title || actions ? /* @__PURE__ */ jsxs4("div", { className: "flex min-h-7 items-center justify-between gap-2 px-1", children: [
|
|
586
|
-
title ? /* @__PURE__ */ jsx4("h3", { className: "text-xs font-medium text-muted-foreground", children: title }) : /* @__PURE__ */ jsx4("span", {}),
|
|
587
|
+
title ? /* @__PURE__ */ jsx4("h3", { className: desktop ? "text-sm font-semibold text-foreground" : "text-xs font-medium text-muted-foreground", children: title }) : /* @__PURE__ */ jsx4("span", {}),
|
|
587
588
|
actions ? /* @__PURE__ */ jsx4("div", { className: "flex items-center gap-1", children: actions }) : null
|
|
588
589
|
] }) : null,
|
|
589
|
-
/* @__PURE__ */ jsx4("div", { className: flat ? "-mx-3 flex flex-col sm:-mx-4" : "flex flex-col rounded-xl border border-border bg-card py-1", children })
|
|
590
|
+
/* @__PURE__ */ jsx4("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 })
|
|
590
591
|
] });
|
|
591
592
|
}
|
|
592
593
|
var ROW_GRID = {
|
|
@@ -7550,7 +7551,7 @@ function MatchRow({ itemId, item, tag, family, port, busy, running, onOpen, onFi
|
|
|
7550
7551
|
|
|
7551
7552
|
// src/Sidebar.tsx
|
|
7552
7553
|
import { useState as useState39 } from "react";
|
|
7553
|
-
import { cn as cn15 } from "@ai-matrx/design-system";
|
|
7554
|
+
import { cn as cn15, useLook as useLook2 } from "@ai-matrx/design-system";
|
|
7554
7555
|
import { Select as Select10 } from "@ai-matrx/design-system/controls";
|
|
7555
7556
|
import { jsx as jsx38, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
7556
7557
|
function vaultChoices(items, organizations, current) {
|
|
@@ -7610,13 +7611,14 @@ function viewOptions(views, allCount, deletedCount, hasFavorites, hasRecents, ha
|
|
|
7610
7611
|
];
|
|
7611
7612
|
}
|
|
7612
7613
|
function Entry({ on, glyph: Icon, label, count: count2, onClick }) {
|
|
7614
|
+
const desktop = useLook2() === "desktop";
|
|
7613
7615
|
return /* @__PURE__ */ jsxs36(
|
|
7614
7616
|
"button",
|
|
7615
7617
|
{
|
|
7616
7618
|
type: "button",
|
|
7617
7619
|
"aria-current": on ? "page" : void 0,
|
|
7618
7620
|
onClick,
|
|
7619
|
-
className: cn15("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"),
|
|
7621
|
+
className: cn15("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"),
|
|
7620
7622
|
children: [
|
|
7621
7623
|
/* @__PURE__ */ jsx38(Icon, { className: "size-4 shrink-0" }),
|
|
7622
7624
|
/* @__PURE__ */ jsx38("span", { className: "min-w-0 flex-1 truncate", children: label }),
|
|
@@ -7713,7 +7715,7 @@ function VaultApp(props) {
|
|
|
7713
7715
|
const lock = props.host?.lock;
|
|
7714
7716
|
const locked = useLocked(lock);
|
|
7715
7717
|
const port = useMemo6(() => lock ? guardPort(props.port, () => lock.locked()) : props.port, [props.port, lock]);
|
|
7716
|
-
return /* @__PURE__ */ jsx39("div", { className: "relative h-full min-h-0 w-full", children: /* @__PURE__ */ jsx39(NoticeProvider, { notify: props.notify, children: lock && locked ? /* @__PURE__ */ jsx39(LockedScreen, { lock }) : /* @__PURE__ */ jsx39(ClipboardProvider, { clipboard: props.host?.clipboard, children: /* @__PURE__ */ jsx39(RevealSecondsProvider, { seconds: props.host?.revealSeconds, children: /* @__PURE__ */ jsx39(IdentityGate, { identity: props.host?.identity, children: /* @__PURE__ */ jsx39(GeneratorLimitsProvider, { resolve: generatorLimitsFrom(props.host?.knobs), children: /* @__PURE__ */ jsx39(Workspace, { ...props, port }) }) }) }) }) }) });
|
|
7718
|
+
return /* @__PURE__ */ jsx39(LookScope, { look: props.look ?? "web", className: "h-full min-h-0 w-full", children: /* @__PURE__ */ jsx39("div", { className: "relative h-full min-h-0 w-full", children: /* @__PURE__ */ jsx39(NoticeProvider, { notify: props.notify, children: lock && locked ? /* @__PURE__ */ jsx39(LockedScreen, { lock }) : /* @__PURE__ */ jsx39(ClipboardProvider, { clipboard: props.host?.clipboard, children: /* @__PURE__ */ jsx39(RevealSecondsProvider, { seconds: props.host?.revealSeconds, children: /* @__PURE__ */ jsx39(IdentityGate, { identity: props.host?.identity, children: /* @__PURE__ */ jsx39(GeneratorLimitsProvider, { resolve: generatorLimitsFrom(props.host?.knobs), children: /* @__PURE__ */ jsx39(Workspace, { ...props, port }) }) }) }) }) }) }) });
|
|
7717
7719
|
}
|
|
7718
7720
|
function LockedScreen({ lock }) {
|
|
7719
7721
|
const [busy, setBusy] = useState40(false);
|