@dxos/plugin-navtree 0.8.4-main.84f28bd → 0.8.4-main.9735255
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/dist/lib/browser/app-graph-builder-RSMA6I22.mjs +43 -0
- package/dist/lib/browser/app-graph-builder-RSMA6I22.mjs.map +7 -0
- package/dist/lib/browser/chunk-6YPQ625I.mjs +1293 -0
- package/dist/lib/browser/chunk-6YPQ625I.mjs.map +7 -0
- package/dist/lib/browser/chunk-AGQDZBPL.mjs +23 -0
- package/dist/lib/browser/chunk-AGQDZBPL.mjs.map +7 -0
- package/dist/lib/browser/chunk-YKTYPINZ.mjs +19 -0
- package/dist/lib/browser/chunk-YKTYPINZ.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +84 -96
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/{node-esm/keyboard-MOZWHFUM.mjs → browser/keyboard-32EH3N4K.mjs} +20 -20
- package/dist/lib/browser/keyboard-32EH3N4K.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operation-resolver-IB75DC5O.mjs +52 -0
- package/dist/lib/browser/operation-resolver-IB75DC5O.mjs.map +7 -0
- package/dist/lib/browser/react-surface-F6CVMS3Y.mjs +58 -0
- package/dist/lib/browser/react-surface-F6CVMS3Y.mjs.map +7 -0
- package/dist/lib/browser/state-EVYQOUI3.mjs +120 -0
- package/dist/lib/browser/state-EVYQOUI3.mjs.map +7 -0
- package/dist/types/src/NavTreePlugin.d.ts +2 -1
- package/dist/types/src/NavTreePlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +5 -105
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/keyboard/index.d.ts +3 -0
- package/dist/types/src/capabilities/keyboard/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/keyboard/keyboard.d.ts +5 -0
- package/dist/types/src/capabilities/keyboard/keyboard.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +3 -0
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +5 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/state/index.d.ts +3 -0
- package/dist/types/src/capabilities/state/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/state/state.d.ts +6 -0
- package/dist/types/src/capabilities/state/state.d.ts.map +1 -0
- package/dist/types/src/components/CommandsDialog/CommandsDialog.d.ts +3 -2
- package/dist/types/src/components/CommandsDialog/CommandsDialog.d.ts.map +1 -1
- package/dist/types/src/components/CommandsDialog/CommandsTrigger.d.ts.map +1 -1
- package/dist/types/src/components/NavTree/NavTree.d.ts +32 -3
- package/dist/types/src/components/NavTree/NavTree.d.ts.map +1 -1
- package/dist/types/src/components/NavTree/NavTree.stories.d.ts +29 -4
- package/dist/types/src/components/NavTree/NavTree.stories.d.ts.map +1 -1
- package/dist/types/src/components/NavTreeContainer.d.ts +8 -1
- package/dist/types/src/components/NavTreeContainer.d.ts.map +1 -1
- package/dist/types/src/components/NavTreeDocumentTitle.d.ts +1 -1
- package/dist/types/src/components/NavTreeDocumentTitle.d.ts.map +1 -1
- package/dist/types/src/components/NavTreeItem/NavTreeItemAction.d.ts +6 -6
- package/dist/types/src/components/NavTreeItem/NavTreeItemAction.d.ts.map +1 -1
- package/dist/types/src/components/NavTreeItem/NavTreeItemAction.stories.d.ts +33 -4
- package/dist/types/src/components/NavTreeItem/NavTreeItemAction.stories.d.ts.map +1 -1
- package/dist/types/src/components/NavTreeItem/NavTreeItemColumns.d.ts +2 -2
- package/dist/types/src/components/NavTreeItem/NavTreeItemColumns.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/L0Menu.d.ts +6 -4
- package/dist/types/src/components/Sidebar/L0Menu.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/L1Panel.d.ts +5 -6
- package/dist/types/src/components/Sidebar/L1Panel.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/L1Tabs.d.ts +12 -0
- package/dist/types/src/components/Sidebar/L1Tabs.d.ts.map +1 -0
- package/dist/types/src/components/Sidebar/index.d.ts +1 -0
- package/dist/types/src/components/Sidebar/index.d.ts.map +1 -1
- package/dist/types/src/components/UserAccountAvatar/UserAccountAvatar.d.ts.map +1 -1
- package/dist/types/src/components/UserAccountAvatar/UserAccountAvatar.stories.d.ts +8 -5
- package/dist/types/src/components/UserAccountAvatar/UserAccountAvatar.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +1 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/components/types.d.ts +8 -8
- package/dist/types/src/components/types.d.ts.map +1 -1
- package/dist/types/src/experimental/Tree.d.ts +4 -5
- package/dist/types/src/experimental/Tree.d.ts.map +1 -1
- package/dist/types/src/experimental/Tree.stories.d.ts +7 -4
- package/dist/types/src/experimental/Tree.stories.d.ts.map +1 -1
- package/dist/types/src/hooks.d.ts +32 -1
- package/dist/types/src/hooks.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +3 -4
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/testing/app-graph-builder.d.ts +2 -3
- package/dist/types/src/testing/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/testing/generator.d.ts +5 -6
- package/dist/types/src/testing/generator.d.ts.map +1 -1
- package/dist/types/src/testing/update-state.d.ts +2 -2
- package/dist/types/src/testing/update-state.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +1 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/capabilities.d.ts +16 -0
- package/dist/types/src/types/capabilities.d.ts.map +1 -0
- package/dist/types/src/types/events.d.ts +5 -0
- package/dist/types/src/types/events.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +4 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/src/{types.d.ts → types/schema.d.ts} +10 -9
- package/dist/types/src/types/schema.d.ts.map +1 -0
- package/dist/types/src/util.d.ts +8 -9
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +55 -55
- package/src/NavTreePlugin.tsx +65 -83
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +41 -0
- package/src/capabilities/app-graph-builder/index.ts +7 -0
- package/src/capabilities/index.ts +5 -9
- package/src/capabilities/keyboard/index.ts +7 -0
- package/src/capabilities/keyboard/keyboard.ts +65 -0
- package/src/capabilities/operation-resolver/index.ts +7 -0
- package/src/capabilities/operation-resolver/operation-resolver.ts +41 -0
- package/src/capabilities/react-surface/index.ts +7 -0
- package/src/capabilities/react-surface/react-surface.tsx +54 -0
- package/src/capabilities/state/index.ts +7 -0
- package/src/capabilities/state/state.ts +121 -0
- package/src/components/CommandsDialog/CommandsDialog.tsx +109 -98
- package/src/components/CommandsDialog/CommandsTrigger.tsx +8 -19
- package/src/components/NavTree/NavTree.stories.tsx +98 -93
- package/src/components/NavTree/NavTree.tsx +12 -18
- package/src/components/NavTreeContainer.tsx +281 -258
- package/src/components/NavTreeDocumentTitle.tsx +5 -4
- package/src/components/NavTreeItem/NavTreeItemAction.stories.tsx +20 -12
- package/src/components/NavTreeItem/NavTreeItemAction.tsx +28 -21
- package/src/components/NavTreeItem/NavTreeItemColumns.tsx +38 -32
- package/src/components/Sidebar/L0Menu.tsx +114 -139
- package/src/components/Sidebar/L1Panel.tsx +76 -99
- package/src/components/Sidebar/L1Tabs.tsx +33 -0
- package/src/components/Sidebar/index.ts +1 -0
- package/src/components/UserAccountAvatar/UserAccountAvatar.stories.tsx +9 -8
- package/src/components/UserAccountAvatar/UserAccountAvatar.tsx +20 -12
- package/src/components/index.ts +2 -1
- package/src/components/types.ts +9 -8
- package/src/experimental/Tree.stories.tsx +36 -38
- package/src/experimental/Tree.tsx +17 -35
- package/src/hooks.ts +54 -2
- package/src/index.ts +1 -2
- package/src/meta.ts +11 -8
- package/src/testing/app-graph-builder.ts +159 -234
- package/src/testing/generator.ts +20 -18
- package/src/testing/update-state.ts +6 -6
- package/src/translations.ts +1 -0
- package/src/types/capabilities.ts +21 -0
- package/src/types/events.ts +11 -0
- package/src/types/index.ts +7 -0
- package/src/{types.ts → types/schema.ts} +9 -8
- package/src/util.ts +14 -35
- package/dist/lib/browser/app-graph-builder-5J4LRWDX.mjs +0 -45
- package/dist/lib/browser/app-graph-builder-5J4LRWDX.mjs.map +0 -7
- package/dist/lib/browser/chunk-ERDGQTH5.mjs +0 -16
- package/dist/lib/browser/chunk-ERDGQTH5.mjs.map +0 -7
- package/dist/lib/browser/chunk-TZA65AKW.mjs +0 -1428
- package/dist/lib/browser/chunk-TZA65AKW.mjs.map +0 -7
- package/dist/lib/browser/chunk-WCARAZ7J.mjs +0 -15
- package/dist/lib/browser/chunk-WCARAZ7J.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-3XYN2CBU.mjs +0 -47
- package/dist/lib/browser/intent-resolver-3XYN2CBU.mjs.map +0 -7
- package/dist/lib/browser/keyboard-QRS6WOQH.mjs +0 -51
- package/dist/lib/browser/keyboard-QRS6WOQH.mjs.map +0 -7
- package/dist/lib/browser/react-surface-N2HPMYCU.mjs +0 -51
- package/dist/lib/browser/react-surface-N2HPMYCU.mjs.map +0 -7
- package/dist/lib/browser/state-54DY3DOY.mjs +0 -117
- package/dist/lib/browser/state-54DY3DOY.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-GY7GCTGU.mjs +0 -46
- package/dist/lib/node-esm/app-graph-builder-GY7GCTGU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-CY7QWR4R.mjs +0 -1429
- package/dist/lib/node-esm/chunk-CY7QWR4R.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-P2JGW3WR.mjs +0 -18
- package/dist/lib/node-esm/chunk-P2JGW3WR.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-V3QXFDDP.mjs +0 -16
- package/dist/lib/node-esm/chunk-V3QXFDDP.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -150
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-R7UNPSZY.mjs +0 -48
- package/dist/lib/node-esm/intent-resolver-R7UNPSZY.mjs.map +0 -7
- package/dist/lib/node-esm/keyboard-MOZWHFUM.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/react-surface-EW5FDMW4.mjs +0 -52
- package/dist/lib/node-esm/react-surface-EW5FDMW4.mjs.map +0 -7
- package/dist/lib/node-esm/state-Z3OTRC2I.mjs +0 -118
- package/dist/lib/node-esm/state-Z3OTRC2I.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/capabilities.d.ts +0 -21
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/keyboard.d.ts +0 -4
- package/dist/types/src/capabilities/keyboard.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface.d.ts +0 -4
- package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/state.d.ts +0 -20
- package/dist/types/src/capabilities/state.d.ts.map +0 -1
- package/dist/types/src/events.d.ts +0 -4
- package/dist/types/src/events.d.ts.map +0 -1
- package/dist/types/src/types.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder.ts +0 -52
- package/src/capabilities/capabilities.ts +0 -20
- package/src/capabilities/intent-resolver.ts +0 -37
- package/src/capabilities/keyboard.ts +0 -59
- package/src/capabilities/react-surface.tsx +0 -45
- package/src/capabilities/state.ts +0 -104
- package/src/events.ts +0 -11
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import {
|
|
2
|
+
NavTreeCapabilities
|
|
3
|
+
} from "./chunk-AGQDZBPL.mjs";
|
|
4
|
+
import {
|
|
5
|
+
meta
|
|
6
|
+
} from "./chunk-YKTYPINZ.mjs";
|
|
7
|
+
|
|
8
|
+
// src/capabilities/state/state.ts
|
|
9
|
+
import { Atom } from "@effect-atom/atom-react";
|
|
10
|
+
import * as Effect from "effect/Effect";
|
|
11
|
+
import { Capability, Common } from "@dxos/app-framework";
|
|
12
|
+
import { Path } from "@dxos/react-ui-list";
|
|
13
|
+
var KEY = `${meta.id}/state/v1`;
|
|
14
|
+
var defaultItemState = {
|
|
15
|
+
open: false,
|
|
16
|
+
current: false,
|
|
17
|
+
alternateTree: false
|
|
18
|
+
};
|
|
19
|
+
var defaultStateEntries = [
|
|
20
|
+
[
|
|
21
|
+
"root",
|
|
22
|
+
{
|
|
23
|
+
open: true,
|
|
24
|
+
current: false
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
[
|
|
28
|
+
"root~dxos.org/plugin/space-spaces",
|
|
29
|
+
{
|
|
30
|
+
open: true,
|
|
31
|
+
current: false
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
[
|
|
35
|
+
"root~dxos.org/plugin/files",
|
|
36
|
+
{
|
|
37
|
+
open: true,
|
|
38
|
+
current: false
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
];
|
|
42
|
+
var getInitialState = () => {
|
|
43
|
+
const stringified = localStorage.getItem(KEY);
|
|
44
|
+
if (!stringified) {
|
|
45
|
+
return new Map(defaultStateEntries);
|
|
46
|
+
}
|
|
47
|
+
try {
|
|
48
|
+
const cached = JSON.parse(stringified);
|
|
49
|
+
return new Map(cached.map(([key, value]) => [
|
|
50
|
+
key,
|
|
51
|
+
{
|
|
52
|
+
open: value.open,
|
|
53
|
+
current: false
|
|
54
|
+
}
|
|
55
|
+
]));
|
|
56
|
+
} catch {
|
|
57
|
+
return new Map(defaultStateEntries);
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
var state_default = Capability.makeModule(Effect.fnUntraced(function* () {
|
|
61
|
+
const registry = yield* Capability.get(Common.Capability.AtomRegistry);
|
|
62
|
+
const layoutAtom = yield* Capability.get(Common.Capability.Layout);
|
|
63
|
+
const backingState = getInitialState();
|
|
64
|
+
const itemAtomFamily = Atom.family((pathString) => Atom.make(backingState.get(pathString) ?? {
|
|
65
|
+
...defaultItemState
|
|
66
|
+
}).pipe(Atom.keepAlive));
|
|
67
|
+
const getItemAtom = (path) => {
|
|
68
|
+
const pathString = Path.create(...path);
|
|
69
|
+
return itemAtomFamily(pathString);
|
|
70
|
+
};
|
|
71
|
+
const getItem = (path) => {
|
|
72
|
+
return registry.get(getItemAtom(path));
|
|
73
|
+
};
|
|
74
|
+
const setItem = (path, key, next) => {
|
|
75
|
+
const pathString = Path.create(...path);
|
|
76
|
+
const atom = itemAtomFamily(pathString);
|
|
77
|
+
const currentValue = registry.get(atom);
|
|
78
|
+
const newValue = {
|
|
79
|
+
...currentValue,
|
|
80
|
+
[key]: next
|
|
81
|
+
};
|
|
82
|
+
registry.set(atom, newValue);
|
|
83
|
+
backingState.set(pathString, newValue);
|
|
84
|
+
localStorage.setItem(KEY, JSON.stringify(Array.from(backingState.entries())));
|
|
85
|
+
};
|
|
86
|
+
let previous = [];
|
|
87
|
+
const unsubscribe = registry.subscribe(layoutAtom, (layout) => {
|
|
88
|
+
const removed = previous.filter((id) => !layout.active.includes(id));
|
|
89
|
+
previous = layout.active;
|
|
90
|
+
const handleUpdate = () => {
|
|
91
|
+
removed.forEach((id) => {
|
|
92
|
+
const keys = Array.from(backingState.keys()).filter((key) => Path.last(key) === id);
|
|
93
|
+
keys.forEach((key) => {
|
|
94
|
+
setItem(Path.parts(key), "current", false);
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
layout.active.forEach((id) => {
|
|
98
|
+
const keys = Array.from(/* @__PURE__ */ new Set([
|
|
99
|
+
...backingState.keys(),
|
|
100
|
+
id
|
|
101
|
+
])).filter((key) => Path.last(key) === id);
|
|
102
|
+
keys.forEach((key) => {
|
|
103
|
+
setItem(Path.parts(key), "current", true);
|
|
104
|
+
});
|
|
105
|
+
});
|
|
106
|
+
};
|
|
107
|
+
const timeout = setTimeout(handleUpdate, 500);
|
|
108
|
+
handleUpdate();
|
|
109
|
+
return () => clearTimeout(timeout);
|
|
110
|
+
});
|
|
111
|
+
return Capability.contributes(NavTreeCapabilities.State, {
|
|
112
|
+
getItem,
|
|
113
|
+
getItemAtom,
|
|
114
|
+
setItem
|
|
115
|
+
}, () => Effect.sync(() => unsubscribe()));
|
|
116
|
+
}));
|
|
117
|
+
export {
|
|
118
|
+
state_default as default
|
|
119
|
+
};
|
|
120
|
+
//# sourceMappingURL=state-EVYQOUI3.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/state/state.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Atom } from '@effect-atom/atom-react';\nimport * as Effect from 'effect/Effect';\n\nimport { Capability, Common } from '@dxos/app-framework';\nimport { Path } from '@dxos/react-ui-list';\n\nimport { meta } from '../../meta';\nimport { type NavTreeCapabilities as NC, NavTreeCapabilities } from '../../types';\n\nconst KEY = `${meta.id}/state/v1`;\n\n/** Default item state for new entries. */\nconst defaultItemState: NC.NavTreeItemState = { open: false, current: false, alternateTree: false };\n\n/** Default state entries for initial tree structure. */\n// TODO(thure): Initialize these dynamically.\nconst defaultStateEntries: [string, NC.NavTreeItemState][] = [\n ['root', { open: true, current: false }],\n ['root~dxos.org/plugin/space-spaces', { open: true, current: false }],\n ['root~dxos.org/plugin/files', { open: true, current: false }],\n];\n\nconst getInitialState = (): Map<string, NC.NavTreeItemState> => {\n const stringified = localStorage.getItem(KEY);\n if (!stringified) {\n return new Map(defaultStateEntries);\n }\n\n try {\n const cached: [string, { open: boolean; current: boolean }][] = JSON.parse(stringified);\n return new Map(cached.map(([key, value]) => [key, { open: value.open, current: false }]));\n } catch {\n return new Map(defaultStateEntries);\n }\n};\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n const registry = yield* Capability.get(Common.Capability.AtomRegistry);\n const layoutAtom = yield* Capability.get(Common.Capability.Layout);\n\n // Backing state for persistence (not reactive).\n const backingState = getInitialState();\n\n // Per-path atom family for fine-grained reactivity.\n // keepAlive prevents atoms from being garbage collected when components unmount,\n // ensuring state is preserved across deletion/restoration cycles.\n const itemAtomFamily = Atom.family((pathString: string) =>\n Atom.make<NC.NavTreeItemState>(backingState.get(pathString) ?? { ...defaultItemState }).pipe(Atom.keepAlive),\n );\n\n const getItemAtom = (path: string[]): Atom.Atom<NC.NavTreeItemState> => {\n const pathString = Path.create(...path);\n return itemAtomFamily(pathString);\n };\n\n const getItem = (path: string[]): NC.NavTreeItemState => {\n return registry.get(getItemAtom(path));\n };\n\n const setItem = (path: string[], key: 'open' | 'current' | 'alternateTree', next: boolean) => {\n const pathString = Path.create(...path);\n const atom = itemAtomFamily(pathString);\n const currentValue = registry.get(atom);\n const newValue = { ...currentValue, [key]: next };\n\n // Update the atom.\n registry.set(atom, newValue);\n\n // Update backing state and persist to localStorage.\n backingState.set(pathString, newValue);\n localStorage.setItem(KEY, JSON.stringify(Array.from(backingState.entries())));\n };\n\n // Subscribe to layout changes to update current state.\n let previous: string[] = [];\n const unsubscribe = registry.subscribe(layoutAtom, (layout) => {\n const removed = previous.filter((id) => !layout.active.includes(id));\n previous = layout.active;\n\n const handleUpdate = () => {\n // Mark removed items as not current.\n removed.forEach((id) => {\n const keys = Array.from(backingState.keys()).filter((key) => Path.last(key) === id);\n keys.forEach((key) => {\n setItem(Path.parts(key), 'current', false);\n });\n });\n\n // Mark active items as current.\n layout.active.forEach((id: string) => {\n const keys = Array.from(new Set([...backingState.keys(), id])).filter((key) => Path.last(key) === id);\n keys.forEach((key) => {\n setItem(Path.parts(key), 'current', true);\n });\n });\n };\n\n // TODO(wittjosiah): This is setTimeout because there's a race between the keys being initialized.\n // Keys are initialized on the first render of an item in the navtree.\n // This could be avoided if the location was a path as well and not just an id.\n const timeout = setTimeout(handleUpdate, 500);\n handleUpdate();\n return () => clearTimeout(timeout);\n });\n\n return Capability.contributes(\n NavTreeCapabilities.State,\n {\n getItem,\n getItemAtom,\n setItem,\n },\n () => Effect.sync(() => unsubscribe()),\n );\n }),\n);\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["Atom", "Effect", "Capability", "Common", "Path", "KEY", "meta", "id", "defaultItemState", "open", "current", "alternateTree", "defaultStateEntries", "getInitialState", "stringified", "localStorage", "getItem", "Map", "cached", "JSON", "parse", "map", "key", "value", "Capability", "makeModule", "fnUntraced", "registry", "get", "Common", "AtomRegistry", "layoutAtom", "Layout", "backingState", "itemAtomFamily", "Atom", "family", "pathString", "make", "pipe", "keepAlive", "getItemAtom", "path", "Path", "create", "setItem", "next", "atom", "currentValue", "newValue", "set", "stringify", "Array", "from", "entries", "previous", "unsubscribe", "subscribe", "layout", "removed", "filter", "active", "includes", "handleUpdate", "forEach", "keys", "last", "parts", "Set", "timeout", "setTimeout", "clearTimeout", "contributes", "NavTreeCapabilities", "State", "sync"]
|
|
7
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavTreePlugin.d.ts","sourceRoot":"","sources":["../../../src/NavTreePlugin.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NavTreePlugin.d.ts","sourceRoot":"","sources":["../../../src/NavTreePlugin.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAuC,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAUlF,eAAO,MAAM,aAAa,4BA4DzB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as Effect from 'effect/Effect';
|
|
2
|
+
import { Capability } from '@dxos/app-framework';
|
|
3
|
+
import { GraphBuilder } from '@dxos/plugin-graph';
|
|
4
|
+
declare const _default: (props?: void | undefined) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<GraphBuilder.BuilderExtensions>>, never, never>;
|
|
5
|
+
export default _default;
|
|
6
|
+
//# sourceMappingURL=app-graph-builder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-graph-builder.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/app-graph-builder/app-graph-builder.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,UAAU,EAAU,MAAM,qBAAqB,CAAC;AAEzD,OAAO,EAAE,YAAY,EAAe,MAAM,oBAAoB,CAAC;;AAI/D,wBA4BE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/app-graph-builder/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,eAAO,MAAM,eAAe,qIAA0E,CAAC"}
|
|
@@ -1,106 +1,6 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
state: Map<string, import("@dxos/live-object").Live<{
|
|
7
|
-
open: boolean;
|
|
8
|
-
current: boolean;
|
|
9
|
-
alternateTree?: boolean;
|
|
10
|
-
}>>;
|
|
11
|
-
getItem: (path: string[]) => import("@dxos/live-object").Live<{
|
|
12
|
-
open: boolean;
|
|
13
|
-
current: boolean;
|
|
14
|
-
alternateTree?: boolean;
|
|
15
|
-
}>;
|
|
16
|
-
setItem: (path: string[], key: "open" | "current" | "alternateTree", next: boolean) => void;
|
|
17
|
-
isOpen: (path: string[], item: Readonly<{
|
|
18
|
-
id: string;
|
|
19
|
-
type: string;
|
|
20
|
-
cacheable?: string[];
|
|
21
|
-
properties: Readonly<Partial<{
|
|
22
|
-
label: import("@dxos/react-ui").Label;
|
|
23
|
-
icon?: string;
|
|
24
|
-
disabled?: boolean;
|
|
25
|
-
position?: import("@dxos/util").Position;
|
|
26
|
-
testId?: string;
|
|
27
|
-
className?: string;
|
|
28
|
-
headingClassName?: string;
|
|
29
|
-
} & {
|
|
30
|
-
role?: string;
|
|
31
|
-
error?: string;
|
|
32
|
-
modified?: boolean;
|
|
33
|
-
palette?: string;
|
|
34
|
-
} & {
|
|
35
|
-
persistenceClass: string;
|
|
36
|
-
persistenceKey: string;
|
|
37
|
-
acceptPersistenceClass: Set<string>;
|
|
38
|
-
acceptPersistenceKey: Set<string>;
|
|
39
|
-
onRearrangeChildren: (nextOrder: Readonly</*elided*/ any>[]) => import("@dxos/util").MaybePromise<void>;
|
|
40
|
-
onCopy: (activeNode: Readonly</*elided*/ any>, index?: number) => import("@dxos/util").MaybePromise<void>;
|
|
41
|
-
onTransferStart: (activeNode: Readonly</*elided*/ any>, index?: number) => import("@dxos/util").MaybePromise<void>;
|
|
42
|
-
onTransferEnd: (activeNode: Readonly</*elided*/ any>, destinationParent: Readonly</*elided*/ any>) => import("@dxos/util").MaybePromise<void>;
|
|
43
|
-
}>>;
|
|
44
|
-
data: any;
|
|
45
|
-
}>) => boolean;
|
|
46
|
-
isCurrent: (path: string[], item: Readonly<{
|
|
47
|
-
id: string;
|
|
48
|
-
type: string;
|
|
49
|
-
cacheable?: string[];
|
|
50
|
-
properties: Readonly<Partial<{
|
|
51
|
-
label: import("@dxos/react-ui").Label;
|
|
52
|
-
icon?: string;
|
|
53
|
-
disabled?: boolean;
|
|
54
|
-
position?: import("@dxos/util").Position;
|
|
55
|
-
testId?: string;
|
|
56
|
-
className?: string;
|
|
57
|
-
headingClassName?: string;
|
|
58
|
-
} & {
|
|
59
|
-
role?: string;
|
|
60
|
-
error?: string;
|
|
61
|
-
modified?: boolean;
|
|
62
|
-
palette?: string;
|
|
63
|
-
} & {
|
|
64
|
-
persistenceClass: string;
|
|
65
|
-
persistenceKey: string;
|
|
66
|
-
acceptPersistenceClass: Set<string>;
|
|
67
|
-
acceptPersistenceKey: Set<string>;
|
|
68
|
-
onRearrangeChildren: (nextOrder: Readonly</*elided*/ any>[]) => import("@dxos/util").MaybePromise<void>;
|
|
69
|
-
onCopy: (activeNode: Readonly</*elided*/ any>, index?: number) => import("@dxos/util").MaybePromise<void>;
|
|
70
|
-
onTransferStart: (activeNode: Readonly</*elided*/ any>, index?: number) => import("@dxos/util").MaybePromise<void>;
|
|
71
|
-
onTransferEnd: (activeNode: Readonly</*elided*/ any>, destinationParent: Readonly</*elided*/ any>) => import("@dxos/util").MaybePromise<void>;
|
|
72
|
-
}>>;
|
|
73
|
-
data: any;
|
|
74
|
-
}>) => boolean;
|
|
75
|
-
isAlternateTree: (path: string[], item: Readonly<{
|
|
76
|
-
id: string;
|
|
77
|
-
type: string;
|
|
78
|
-
cacheable?: string[];
|
|
79
|
-
properties: Readonly<Partial<{
|
|
80
|
-
label: import("@dxos/react-ui").Label;
|
|
81
|
-
icon?: string;
|
|
82
|
-
disabled?: boolean;
|
|
83
|
-
position?: import("@dxos/util").Position;
|
|
84
|
-
testId?: string;
|
|
85
|
-
className?: string;
|
|
86
|
-
headingClassName?: string;
|
|
87
|
-
} & {
|
|
88
|
-
role?: string;
|
|
89
|
-
error?: string;
|
|
90
|
-
modified?: boolean;
|
|
91
|
-
palette?: string;
|
|
92
|
-
} & {
|
|
93
|
-
persistenceClass: string;
|
|
94
|
-
persistenceKey: string;
|
|
95
|
-
acceptPersistenceClass: Set<string>;
|
|
96
|
-
acceptPersistenceKey: Set<string>;
|
|
97
|
-
onRearrangeChildren: (nextOrder: Readonly</*elided*/ any>[]) => import("@dxos/util").MaybePromise<void>;
|
|
98
|
-
onCopy: (activeNode: Readonly</*elided*/ any>, index?: number) => import("@dxos/util").MaybePromise<void>;
|
|
99
|
-
onTransferStart: (activeNode: Readonly</*elided*/ any>, index?: number) => import("@dxos/util").MaybePromise<void>;
|
|
100
|
-
onTransferEnd: (activeNode: Readonly</*elided*/ any>, destinationParent: Readonly</*elided*/ any>) => import("@dxos/util").MaybePromise<void>;
|
|
101
|
-
}>>;
|
|
102
|
-
data: any;
|
|
103
|
-
}>) => boolean;
|
|
104
|
-
}> | import("@dxos/app-framework").AnyCapability[]>>;
|
|
105
|
-
export * from './capabilities';
|
|
1
|
+
export * from './app-graph-builder';
|
|
2
|
+
export * from './keyboard';
|
|
3
|
+
export * from './operation-resolver';
|
|
4
|
+
export * from './react-surface';
|
|
5
|
+
export * from './state';
|
|
106
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/index.ts"],"names":[],"mappings":"AAIA,cAAc,qBAAqB,CAAC;AACpC,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/keyboard/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,eAAO,MAAM,QAAQ,8FAA0D,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as Effect from 'effect/Effect';
|
|
2
|
+
import { Capability } from '@dxos/app-framework';
|
|
3
|
+
declare const _default: (props?: void | undefined) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<null>>, Error, Capability.Service>;
|
|
4
|
+
export default _default;
|
|
5
|
+
//# sourceMappingURL=keyboard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyboard.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/keyboard/keyboard.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,UAAU,EAAU,MAAM,qBAAqB,CAAC;;AAQzD,wBAkDE"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { Capability } from '@dxos/app-framework';
|
|
2
|
+
export declare const OperationResolver: Capability.LazyCapability<void, Capability.Capability<Capability.InterfaceDef<import("@dxos/app-framework/Common").Capability.OperationResolver[]>>, Error>;
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/operation-resolver/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,eAAO,MAAM,iBAAiB,6JAA6E,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as Effect from 'effect/Effect';
|
|
2
|
+
import { Capability, Common } from '@dxos/app-framework';
|
|
3
|
+
declare const _default: (props?: void | undefined) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<Common.Capability.OperationResolver[]>>, never, never>;
|
|
4
|
+
export default _default;
|
|
5
|
+
//# sourceMappingURL=operation-resolver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"operation-resolver.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/operation-resolver/operation-resolver.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;;AAOzD,wBA2BE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/react-surface/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,eAAO,MAAM,YAAY,sJAAmE,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as Effect from 'effect/Effect';
|
|
2
|
+
import { Capability, Common } from '@dxos/app-framework';
|
|
3
|
+
declare const _default: (props?: void | undefined) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<Common.Capability.ReactSurface>>, never, never>;
|
|
4
|
+
export default _default;
|
|
5
|
+
//# sourceMappingURL=react-surface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/react-surface/react-surface.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;;AAMzD,wBAwCE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/state/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,eAAO,MAAM,KAAK,+IAAoD,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as Effect from 'effect/Effect';
|
|
2
|
+
import { Capability } from '@dxos/app-framework';
|
|
3
|
+
import { type NavTreeCapabilities as NC } from '../../types';
|
|
4
|
+
declare const _default: (props?: void | undefined) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<NC.NavTreeStateStore>>, Error, Capability.Service>;
|
|
5
|
+
export default _default;
|
|
6
|
+
//# sourceMappingURL=state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/state/state.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,UAAU,EAAU,MAAM,qBAAqB,CAAC;AAIzD,OAAO,EAAE,KAAK,mBAAmB,IAAI,EAAE,EAAuB,MAAM,aAAa,CAAC;;AA6BlF,wBAgFE"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type CommandsDialogContentProps = {
|
|
3
3
|
selected?: string;
|
|
4
|
-
}
|
|
4
|
+
};
|
|
5
|
+
export declare const CommandsDialogContent: React.ForwardRefExoticComponent<CommandsDialogContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
6
|
//# sourceMappingURL=CommandsDialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandsDialog.d.ts","sourceRoot":"","sources":["../../../../../src/components/CommandsDialog/CommandsDialog.tsx"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"CommandsDialog.d.ts","sourceRoot":"","sources":["../../../../../src/components/CommandsDialog/CommandsDialog.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAc7D,MAAM,MAAM,0BAA0B,GAAG;IACvC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAGF,eAAO,MAAM,qBAAqB,mGAyGjC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommandsTrigger.d.ts","sourceRoot":"","sources":["../../../../../src/components/CommandsDialog/CommandsTrigger.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CommandsTrigger.d.ts","sourceRoot":"","sources":["../../../../../src/components/CommandsDialog/CommandsTrigger.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,eAAO,MAAM,eAAe,yBAY3B,CAAC"}
|
|
@@ -1,8 +1,37 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type TreeProps } from '@dxos/react-ui-list';
|
|
3
3
|
import { type NavTreeItemGraphNode } from '../../types';
|
|
4
|
-
import { type
|
|
4
|
+
import { type L1TabsProps } from '../Sidebar';
|
|
5
5
|
export declare const NAV_TREE_ITEM = "NavTreeItem";
|
|
6
|
-
export type NavTreeProps = Pick<TreeProps<NavTreeItemGraphNode>, 'id' | 'root'> & Pick<
|
|
7
|
-
export declare const NavTree:
|
|
6
|
+
export type NavTreeProps = Pick<TreeProps<NavTreeItemGraphNode>, 'id' | 'root'> & Pick<L1TabsProps, 'open'>;
|
|
7
|
+
export declare const NavTree: React.ForwardRefExoticComponent<Pick<TreeProps<Readonly<{
|
|
8
|
+
id: string;
|
|
9
|
+
type: string;
|
|
10
|
+
cacheable?: string[];
|
|
11
|
+
properties: Readonly<Partial<{
|
|
12
|
+
testId?: string;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
position?: import("@dxos/util").Position;
|
|
15
|
+
label: import("@dxos/ui-types").Label;
|
|
16
|
+
className?: string;
|
|
17
|
+
headingClassName?: string;
|
|
18
|
+
icon?: string;
|
|
19
|
+
iconHue?: string;
|
|
20
|
+
} & {
|
|
21
|
+
role?: string;
|
|
22
|
+
error?: string;
|
|
23
|
+
modified?: boolean;
|
|
24
|
+
palette?: string;
|
|
25
|
+
} & {
|
|
26
|
+
persistenceClass: string;
|
|
27
|
+
persistenceKey: string;
|
|
28
|
+
acceptPersistenceClass: Set<string>;
|
|
29
|
+
acceptPersistenceKey: Set<string>;
|
|
30
|
+
onRearrange: (nextOrder: unknown[]) => import("@dxos/util").MaybePromise<void>;
|
|
31
|
+
onCopy: (activeNode: NavTreeItemGraphNode, index?: number) => import("@dxos/util").MaybePromise<void>;
|
|
32
|
+
onTransferStart: (activeNode: NavTreeItemGraphNode, index?: number) => import("@dxos/util").MaybePromise<void>;
|
|
33
|
+
onTransferEnd: (activeNode: NavTreeItemGraphNode, destinationParent: NavTreeItemGraphNode) => import("@dxos/util").MaybePromise<void>;
|
|
34
|
+
}>>;
|
|
35
|
+
data: any;
|
|
36
|
+
}>>, "id" | "root"> & Pick<L1TabsProps, "open"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
37
|
//# sourceMappingURL=NavTree.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavTree.d.ts","sourceRoot":"","sources":["../../../../../src/components/NavTree/NavTree.tsx"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"NavTree.d.ts","sourceRoot":"","sources":["../../../../../src/components/NavTree/NavTree.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAIrD,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAExD,OAAO,EAAkB,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9D,eAAO,MAAM,aAAa,gBAAgB,CAAC;AAE3C,MAAM,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC,oBAAoB,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC,GAAG,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;AAE5G,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;wDAF+D,CAAC;iEAEb,CAAA;;;;sFAqCrE,CAAC"}
|
|
@@ -1,9 +1,34 @@
|
|
|
1
|
-
import '@
|
|
2
|
-
import
|
|
1
|
+
import { type StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import React from 'react';
|
|
3
3
|
import { NavTreeContainer } from '../NavTreeContainer';
|
|
4
|
-
declare const meta:
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: React.NamedExoticComponent<{
|
|
7
|
+
popoverAnchorId?: string;
|
|
8
|
+
topbar?: boolean;
|
|
9
|
+
} & Pick<import("..").NavTreeContextValue, "tab"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
render: () => React.JSX.Element;
|
|
11
|
+
decorators: import("@storybook/react").Decorator[];
|
|
12
|
+
parameters: {
|
|
13
|
+
layout: string;
|
|
14
|
+
translations: [{
|
|
15
|
+
readonly 'en-US': {
|
|
16
|
+
readonly [meta.id]: {
|
|
17
|
+
readonly 'app menu label': "App menu";
|
|
18
|
+
readonly 'open settings label': "Settings";
|
|
19
|
+
readonly 'open commands label': "Search commands";
|
|
20
|
+
readonly 'commands dialog title': "Commands";
|
|
21
|
+
readonly 'command list input placeholder': "Search for commands…";
|
|
22
|
+
readonly 'node actions menu invoker label': "More options";
|
|
23
|
+
readonly 'tree item actions label': "More actions";
|
|
24
|
+
readonly 'empty branch message': " ";
|
|
25
|
+
readonly 'button back': "Back to Space";
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
}];
|
|
29
|
+
};
|
|
30
|
+
};
|
|
5
31
|
export default meta;
|
|
6
32
|
type Story = StoryObj<typeof NavTreeContainer>;
|
|
7
33
|
export declare const Default: Story;
|
|
8
|
-
export declare const WithClient: Story;
|
|
9
34
|
//# sourceMappingURL=NavTree.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavTree.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/NavTree/NavTree.stories.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NavTree.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/NavTree/NavTree.stories.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjE,OAAO,KAAkD,MAAM,OAAO,CAAC;AAkBvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AA2FvD,QAAA,MAAM,IAAI;;;;;;;;;;;;yBA9GV,CAAS,IAAG,CAAC,EAAE,CAAC;;;;;;;;;;;;;;CAoJyB,CAAC;AAE1C,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE/C,eAAO,MAAM,OAAO,EAAE,KA4CrB,CAAC"}
|
|
@@ -5,5 +5,12 @@ export type NavTreeContainerProps = {
|
|
|
5
5
|
popoverAnchorId?: string;
|
|
6
6
|
topbar?: boolean;
|
|
7
7
|
} & Pick<NavTreeContextValue, 'tab'>;
|
|
8
|
-
export declare const NavTreeContainer
|
|
8
|
+
export declare const NavTreeContainer$: React.ForwardRefExoticComponent<{
|
|
9
|
+
popoverAnchorId?: string;
|
|
10
|
+
topbar?: boolean;
|
|
11
|
+
} & Pick<NavTreeContextValue, "tab"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
export declare const NavTreeContainer: React.NamedExoticComponent<{
|
|
13
|
+
popoverAnchorId?: string;
|
|
14
|
+
topbar?: boolean;
|
|
15
|
+
} & Pick<NavTreeContextValue, "tab"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
16
|
//# sourceMappingURL=NavTreeContainer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavTreeContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/NavTreeContainer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NavTreeContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/NavTreeContainer.tsx"],"names":[],"mappings":"AAMA,OAAO,KAA4D,MAAM,OAAO,CAAC;AAmBjF,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAGnD,eAAO,MAAM,SAAS,wBAAwB,CAAC;AA0D/C,MAAM,MAAM,qBAAqB,GAAG;IAClC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,GAAG,IAAI,CAAC,mBAAmB,EAAE,KAAK,CAAC,CAAC;AAErC,eAAO,MAAM,iBAAiB;sBAJV,MAAM;aACf,OAAO;2EAsPjB,CAAC;AAEF,eAAO,MAAM,gBAAgB;sBAzPT,MAAM;aACf,OAAO;2EAwPqC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavTreeDocumentTitle.d.ts","sourceRoot":"","sources":["../../../../src/components/NavTreeDocumentTitle.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"NavTreeDocumentTitle.d.ts","sourceRoot":"","sources":["../../../../src/components/NavTreeDocumentTitle.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAM5C,eAAO,MAAM,oBAAoB,GAAI,UAAU;IAAE,IAAI,CAAC,EAAE,IAAI,CAAC,IAAI,CAAA;CAAE,SAMlE,CAAC"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type
|
|
2
|
+
import { type Node } from '@dxos/app-graph';
|
|
3
3
|
import { type ActionProperties } from '../../types';
|
|
4
4
|
export type NavTreeItemActionMenuProps = ActionProperties & {
|
|
5
|
-
parent: Node;
|
|
5
|
+
parent: Node.Node;
|
|
6
6
|
caller?: string;
|
|
7
7
|
monolithic?: boolean;
|
|
8
|
-
menuActions?: Action[];
|
|
8
|
+
menuActions?: Node.Action[];
|
|
9
9
|
};
|
|
10
10
|
export declare const NavTreeItemActionDropdownMenu: ({ parent, label, icon, testId, menuActions, caller, }: NavTreeItemActionMenuProps) => React.JSX.Element;
|
|
11
|
-
export declare const NavTreeItemMonolithicAction: (
|
|
12
|
-
parent: Node;
|
|
13
|
-
onAction?: (action: Action) => void;
|
|
11
|
+
export declare const NavTreeItemMonolithicAction: (props: Node.Action & {
|
|
12
|
+
parent: Node.Node;
|
|
13
|
+
onAction?: (action: Node.Action) => void;
|
|
14
14
|
baseLabel: string;
|
|
15
15
|
}) => React.JSX.Element;
|
|
16
16
|
export declare const NavTreeItemAction: ({ monolithic, menuActions, parent: node, ...props }: NavTreeItemActionMenuProps) => React.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavTreeItemAction.d.ts","sourceRoot":"","sources":["../../../../../src/components/NavTreeItem/NavTreeItemAction.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"NavTreeItemAction.d.ts","sourceRoot":"","sources":["../../../../../src/components/NavTreeItem/NavTreeItemAction.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAO5C,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD,MAAM,MAAM,0BAA0B,GAAG,gBAAgB,GAAG;IAC1D,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC;CAC7B,CAAC;AAaF,eAAO,MAAM,6BAA6B,GAAI,uDAO3C,0BAA0B,sBAsB5B,CAAC;AAEF,eAAO,MAAM,2BAA2B,GACtC,OAAO,IAAI,CAAC,MAAM,GAAG;IAAE,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC;IAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,sBAkCxG,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,qDAAqD,0BAA0B,sBAWhH,CAAC"}
|
|
@@ -1,7 +1,36 @@
|
|
|
1
|
-
import '@
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
declare const meta:
|
|
1
|
+
import { type StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import * as Effect from 'effect/Effect';
|
|
3
|
+
import { type NavTreeItemActionMenuProps } from './NavTreeItemAction';
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: ({ monolithic, menuActions, parent: node, ...props }: NavTreeItemActionMenuProps) => import("react").JSX.Element;
|
|
7
|
+
args: {
|
|
8
|
+
icon: string;
|
|
9
|
+
parent: {
|
|
10
|
+
id: string;
|
|
11
|
+
type: string;
|
|
12
|
+
data: null;
|
|
13
|
+
properties: {
|
|
14
|
+
label: string;
|
|
15
|
+
icon: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
menuActions: {
|
|
19
|
+
id: string;
|
|
20
|
+
type: string;
|
|
21
|
+
data: () => Effect.Effect<void, never, never>;
|
|
22
|
+
properties: {
|
|
23
|
+
label: string;
|
|
24
|
+
icon: string;
|
|
25
|
+
};
|
|
26
|
+
}[];
|
|
27
|
+
label: string;
|
|
28
|
+
};
|
|
29
|
+
decorators: import("@storybook/react").Decorator[];
|
|
30
|
+
parameters: {
|
|
31
|
+
layout: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
5
34
|
export default meta;
|
|
6
35
|
type Story = StoryObj<typeof meta>;
|
|
7
36
|
export declare const Default: Story;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavTreeItemAction.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/NavTreeItem/NavTreeItemAction.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"NavTreeItemAction.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/NavTreeItem/NavTreeItemAction.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AASxC,OAAO,EAAqB,KAAK,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AA8BzF,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkBgC,CAAC;AAE3C,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type
|
|
3
|
-
export declare const NavTreeItemColumns: React.MemoExoticComponent<({ path, item, open
|
|
2
|
+
import { type NavTreeItemColumnsProps } from '../types';
|
|
3
|
+
export declare const NavTreeItemColumns: React.MemoExoticComponent<({ path, item, open }: NavTreeItemColumnsProps) => React.JSX.Element>;
|
|
4
4
|
//# sourceMappingURL=NavTreeItemColumns.d.ts.map
|