@dxos/plugin-navtree 0.8.4-main.4a85c3132b → 0.8.4-main.51f1e5ca51
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/index.mjs +115 -74
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/translations.mjs +21 -0
- package/dist/lib/browser/translations.mjs.map +7 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +7 -5
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/keyboard.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/{state/state.d.ts → state.d.ts} +1 -1
- package/dist/types/src/capabilities/state.d.ts.map +1 -0
- package/dist/types/src/components/NavTree/NavTree.d.ts.map +1 -1
- package/dist/types/src/components/NavTree/NavTree.stories.d.ts +9 -11
- package/dist/types/src/components/NavTree/NavTree.stories.d.ts.map +1 -1
- package/dist/types/src/components/{NavTreeContext.d.ts → NavTreeContext/NavTreeContext.d.ts} +1 -1
- package/dist/types/src/components/NavTreeContext/NavTreeContext.d.ts.map +1 -0
- package/dist/types/src/components/NavTreeContext/index.d.ts +2 -0
- package/dist/types/src/components/NavTreeContext/index.d.ts.map +1 -0
- package/dist/types/src/components/NavTreeItem/NavTreeItemAction.d.ts +7 -3
- package/dist/types/src/components/NavTreeItem/NavTreeItemAction.d.ts.map +1 -1
- package/dist/types/src/components/NavTreeItem/NavTreeItemAction.stories.d.ts +1 -1
- package/dist/types/src/components/NavTreeItem/NavTreeItemAction.stories.d.ts.map +1 -1
- package/dist/types/src/components/NavTreeItem/NavTreeItemColumns.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/L0Menu.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/L1Panel.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/L1Tabs.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.map +1 -1
- package/dist/types/src/components/types.d.ts +1 -2
- package/dist/types/src/components/types.d.ts.map +1 -1
- package/dist/types/src/containers/CommandsDialogContent/CommandsDialogContent.d.ts.map +1 -1
- package/dist/types/src/containers/CommandsDialogContent/CommandsDialogContent.stories.d.ts +28 -0
- package/dist/types/src/containers/CommandsDialogContent/CommandsDialogContent.stories.d.ts.map +1 -0
- package/dist/types/src/containers/CommandsDialogContent/index.d.ts +1 -2
- package/dist/types/src/containers/CommandsDialogContent/index.d.ts.map +1 -1
- package/dist/types/src/containers/CommandsTrigger/CommandsTrigger.d.ts.map +1 -1
- package/dist/types/src/containers/CommandsTrigger/index.d.ts +1 -2
- package/dist/types/src/containers/CommandsTrigger/index.d.ts.map +1 -1
- package/dist/types/src/containers/NavTreeContainer/NavTreeContainer.d.ts.map +1 -1
- package/dist/types/src/containers/NavTreeContainer/index.d.ts +2 -2
- package/dist/types/src/containers/NavTreeContainer/index.d.ts.map +1 -1
- package/dist/types/src/containers/NavTreeDocumentTitle/NavTreeDocumentTitle.d.ts.map +1 -1
- package/dist/types/src/containers/NavTreeDocumentTitle/index.d.ts +1 -2
- package/dist/types/src/containers/NavTreeDocumentTitle/index.d.ts.map +1 -1
- package/dist/types/src/containers/index.d.ts +1 -1
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/experimental/Tree.d.ts +2 -2
- package/dist/types/src/experimental/Tree.d.ts.map +1 -1
- package/dist/types/src/experimental/Tree.stories.d.ts.map +1 -1
- package/dist/types/src/hooks/useActions.d.ts +2 -4
- package/dist/types/src/hooks/useActions.d.ts.map +1 -1
- package/dist/types/src/hooks/useLoadDescendents.d.ts.map +1 -1
- package/dist/types/src/hooks/useNavTreeModel.d.ts +1 -1
- package/dist/types/src/hooks/useNavTreeModel.d.ts.map +1 -1
- package/dist/types/src/hooks/useNavTreeState.d.ts +2 -6
- package/dist/types/src/hooks/useNavTreeState.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/expose.d.ts +5 -0
- package/dist/types/src/operations/expose.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +3 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/testing/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/testing/generator.d.ts.map +1 -1
- package/dist/types/src/testing/update-state.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +8 -11
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/capabilities.d.ts +1 -2
- package/dist/types/src/types/capabilities.d.ts.map +1 -1
- package/dist/types/src/types/events.d.ts.map +1 -1
- package/dist/types/src/util.d.ts +2 -2
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +57 -43
- package/src/NavTreePlugin.tsx +7 -7
- package/src/capabilities/{app-graph-builder/app-graph-builder.ts → app-graph-builder.ts} +7 -7
- package/src/capabilities/index.ts +11 -5
- package/src/capabilities/{keyboard/keyboard.ts → keyboard.ts} +2 -2
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/{react-surface/react-surface.tsx → react-surface.tsx} +8 -8
- package/src/capabilities/{state/state.ts → state.ts} +5 -5
- package/src/components/NavTree/NavTree.stories.tsx +17 -16
- package/src/components/NavTree/NavTree.tsx +3 -2
- package/src/components/{NavTreeContext.tsx → NavTreeContext/NavTreeContext.tsx} +1 -1
- package/src/components/NavTreeContext/index.ts +5 -0
- package/src/components/NavTreeItem/NavTreeItemAction.stories.tsx +6 -8
- package/src/components/NavTreeItem/NavTreeItemAction.tsx +62 -45
- package/src/components/NavTreeItem/NavTreeItemColumns.tsx +7 -5
- package/src/components/Sidebar/L0Menu.tsx +49 -74
- package/src/components/Sidebar/L1Panel.tsx +97 -134
- package/src/components/Sidebar/L1Tabs.tsx +0 -1
- package/src/components/types.ts +1 -2
- package/src/containers/CommandsDialogContent/CommandsDialogContent.stories.tsx +46 -0
- package/src/containers/CommandsDialogContent/CommandsDialogContent.tsx +52 -58
- package/src/containers/CommandsDialogContent/index.ts +1 -3
- package/src/containers/CommandsTrigger/CommandsTrigger.tsx +7 -5
- package/src/containers/CommandsTrigger/index.ts +1 -3
- package/src/containers/NavTreeContainer/NavTreeContainer.tsx +28 -27
- package/src/containers/NavTreeContainer/index.ts +2 -3
- package/src/containers/NavTreeDocumentTitle/NavTreeDocumentTitle.tsx +2 -2
- package/src/containers/NavTreeDocumentTitle/index.ts +1 -3
- package/src/containers/index.ts +1 -1
- package/src/experimental/Tree.stories.tsx +27 -27
- package/src/hooks/useActions.ts +18 -22
- package/src/hooks/useNavTreeModel.ts +10 -4
- package/src/hooks/useNavTreeState.ts +2 -9
- package/src/meta.ts +2 -2
- package/src/operations/expose.ts +42 -0
- package/src/operations/index.ts +7 -0
- package/src/testing/app-graph-builder.ts +40 -36
- package/src/testing/generator.ts +22 -22
- package/src/translations.ts +8 -10
- package/src/types/capabilities.ts +4 -4
- package/src/types/events.ts +1 -1
- package/src/util.ts +2 -2
- package/dist/lib/browser/CommandsDialogContent-A27AKTHH.mjs +0 -111
- package/dist/lib/browser/CommandsDialogContent-A27AKTHH.mjs.map +0 -7
- package/dist/lib/browser/CommandsTrigger-HBZYQCGV.mjs +0 -33
- package/dist/lib/browser/CommandsTrigger-HBZYQCGV.mjs.map +0 -7
- package/dist/lib/browser/NavTreeContainer-B5K4FUJS.mjs +0 -12
- package/dist/lib/browser/NavTreeContainer-B5K4FUJS.mjs.map +0 -7
- package/dist/lib/browser/NavTreeDocumentTitle-GEE3URWH.mjs +0 -26
- package/dist/lib/browser/NavTreeDocumentTitle-GEE3URWH.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-XGA4GPGL.mjs +0 -44
- package/dist/lib/browser/app-graph-builder-XGA4GPGL.mjs.map +0 -7
- package/dist/lib/browser/chunk-DQCYMXEU.mjs +0 -1426
- package/dist/lib/browser/chunk-DQCYMXEU.mjs.map +0 -7
- package/dist/lib/browser/chunk-H3OJ4WLF.mjs +0 -14
- package/dist/lib/browser/chunk-H3OJ4WLF.mjs.map +0 -7
- package/dist/lib/browser/chunk-X2HDG62A.mjs +0 -23
- package/dist/lib/browser/chunk-X2HDG62A.mjs.map +0 -7
- package/dist/lib/browser/chunk-YKTYPINZ.mjs +0 -19
- package/dist/lib/browser/chunk-YKTYPINZ.mjs.map +0 -7
- package/dist/lib/browser/keyboard-OJZC54PK.mjs +0 -54
- package/dist/lib/browser/keyboard-OJZC54PK.mjs.map +0 -7
- package/dist/lib/browser/operation-resolver-BNAMYOHF.mjs +0 -53
- package/dist/lib/browser/operation-resolver-BNAMYOHF.mjs.map +0 -7
- package/dist/lib/browser/react-surface-AYHOAJ4I.mjs +0 -59
- package/dist/lib/browser/react-surface-AYHOAJ4I.mjs.map +0 -7
- package/dist/lib/browser/state-AC3EETN7.mjs +0 -131
- package/dist/lib/browser/state-AC3EETN7.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +0 -3
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/keyboard/index.d.ts +0 -3
- package/dist/types/src/capabilities/keyboard/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/keyboard/keyboard.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -3
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -5
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/state/index.d.ts +0 -3
- package/dist/types/src/capabilities/state/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/state/state.d.ts.map +0 -1
- package/dist/types/src/components/NavTreeContext.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder/index.ts +0 -7
- package/src/capabilities/keyboard/index.ts +0 -7
- package/src/capabilities/operation-resolver/index.ts +0 -7
- package/src/capabilities/operation-resolver/operation-resolver.ts +0 -44
- package/src/capabilities/react-surface/index.ts +0 -7
- package/src/capabilities/state/index.ts +0 -7
- /package/dist/types/src/capabilities/{app-graph-builder/app-graph-builder.d.ts → app-graph-builder.d.ts} +0 -0
- /package/dist/types/src/capabilities/{keyboard/keyboard.d.ts → keyboard.d.ts} +0 -0
- /package/dist/types/src/capabilities/{react-surface/react-surface.d.ts → react-surface.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-navtree",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.51f1e5ca51",
|
|
4
4
|
"description": "DXOS Surface plugin for a tree view visualization of the graph.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -12,17 +12,31 @@
|
|
|
12
12
|
"author": "DXOS.org",
|
|
13
13
|
"sideEffects": true,
|
|
14
14
|
"type": "module",
|
|
15
|
+
"imports": {
|
|
16
|
+
"#capabilities": "./src/capabilities/index.ts",
|
|
17
|
+
"#components": "./src/components/index.ts",
|
|
18
|
+
"#containers": "./src/containers/index.ts",
|
|
19
|
+
"#hooks": "./src/hooks/index.ts",
|
|
20
|
+
"#meta": "./src/meta.ts",
|
|
21
|
+
"#operations": "./src/operations/index.ts",
|
|
22
|
+
"#testing": "./src/testing/index.ts",
|
|
23
|
+
"#translations": "./src/translations.ts",
|
|
24
|
+
"#types": "./src/types/index.ts"
|
|
25
|
+
},
|
|
15
26
|
"exports": {
|
|
16
27
|
".": {
|
|
17
28
|
"source": "./src/index.ts",
|
|
18
29
|
"types": "./dist/types/src/index.d.ts",
|
|
19
30
|
"browser": "./dist/lib/browser/index.mjs"
|
|
31
|
+
},
|
|
32
|
+
"./translations": {
|
|
33
|
+
"source": "./src/translations.ts",
|
|
34
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
35
|
+
"browser": "./dist/lib/browser/translations.mjs",
|
|
36
|
+
"node": "./dist/lib/node-esm/translations.mjs"
|
|
20
37
|
}
|
|
21
38
|
},
|
|
22
39
|
"types": "dist/types/src/index.d.ts",
|
|
23
|
-
"typesVersions": {
|
|
24
|
-
"*": {}
|
|
25
|
-
},
|
|
26
40
|
"files": [
|
|
27
41
|
"dist",
|
|
28
42
|
"src"
|
|
@@ -32,59 +46,59 @@
|
|
|
32
46
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "1.1.0",
|
|
33
47
|
"@radix-ui/react-dismissable-layer": "1.1.5",
|
|
34
48
|
"@radix-ui/react-use-controllable-state": "1.1.0",
|
|
35
|
-
"date-fns": "^3.
|
|
36
|
-
"@dxos/app-
|
|
37
|
-
"@dxos/app-
|
|
38
|
-
"@dxos/
|
|
39
|
-
"@dxos/
|
|
40
|
-
"@dxos/
|
|
41
|
-
"@dxos/
|
|
42
|
-
"@dxos/
|
|
43
|
-
"@dxos/
|
|
44
|
-
"@dxos/
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/plugin-graph": "0.8.4-main.
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/
|
|
51
|
-
"@dxos/react-ui-
|
|
52
|
-
"@dxos/react-ui-
|
|
53
|
-
"@dxos/react-ui-
|
|
54
|
-
"@dxos/react-ui-
|
|
55
|
-
"@dxos/react-ui-
|
|
56
|
-
"@dxos/react-ui-
|
|
57
|
-
"@dxos/
|
|
58
|
-
"@dxos/
|
|
59
|
-
"@dxos/util": "0.8.4-main.
|
|
49
|
+
"date-fns": "^3.6.0",
|
|
50
|
+
"@dxos/app-graph": "0.8.4-main.51f1e5ca51",
|
|
51
|
+
"@dxos/app-framework": "0.8.4-main.51f1e5ca51",
|
|
52
|
+
"@dxos/app-toolkit": "0.8.4-main.51f1e5ca51",
|
|
53
|
+
"@dxos/async": "0.8.4-main.51f1e5ca51",
|
|
54
|
+
"@dxos/compute": "0.8.4-main.51f1e5ca51",
|
|
55
|
+
"@dxos/debug": "0.8.4-main.51f1e5ca51",
|
|
56
|
+
"@dxos/echo": "0.8.4-main.51f1e5ca51",
|
|
57
|
+
"@dxos/invariant": "0.8.4-main.51f1e5ca51",
|
|
58
|
+
"@dxos/keyboard": "0.8.4-main.51f1e5ca51",
|
|
59
|
+
"@dxos/lit-ui": "0.8.4-main.51f1e5ca51",
|
|
60
|
+
"@dxos/plugin-graph": "0.8.4-main.51f1e5ca51",
|
|
61
|
+
"@dxos/log": "0.8.4-main.51f1e5ca51",
|
|
62
|
+
"@dxos/protocols": "0.8.4-main.51f1e5ca51",
|
|
63
|
+
"@dxos/react-client": "0.8.4-main.51f1e5ca51",
|
|
64
|
+
"@dxos/plugin-observability": "0.8.4-main.51f1e5ca51",
|
|
65
|
+
"@dxos/react-ui-list": "0.8.4-main.51f1e5ca51",
|
|
66
|
+
"@dxos/react-ui-menu": "0.8.4-main.51f1e5ca51",
|
|
67
|
+
"@dxos/react-ui-attention": "0.8.4-main.51f1e5ca51",
|
|
68
|
+
"@dxos/react-ui-search": "0.8.4-main.51f1e5ca51",
|
|
69
|
+
"@dxos/react-ui-mosaic": "0.8.4-main.51f1e5ca51",
|
|
70
|
+
"@dxos/react-ui-stack": "0.8.4-main.51f1e5ca51",
|
|
71
|
+
"@dxos/react-ui-tabs": "0.8.4-main.51f1e5ca51",
|
|
72
|
+
"@dxos/plugin-deck": "0.8.4-main.51f1e5ca51",
|
|
73
|
+
"@dxos/util": "0.8.4-main.51f1e5ca51"
|
|
60
74
|
},
|
|
61
75
|
"devDependencies": {
|
|
62
76
|
"@effect-atom/atom-react": "^0.5.0",
|
|
63
77
|
"@effect/platform": "0.94.4",
|
|
64
78
|
"@types/react": "~19.2.7",
|
|
65
79
|
"@types/react-dom": "~19.2.3",
|
|
66
|
-
"effect": "3.
|
|
80
|
+
"effect": "3.20.0",
|
|
67
81
|
"react": "~19.2.3",
|
|
68
82
|
"react-dom": "~19.2.3",
|
|
69
|
-
"vite": "^
|
|
70
|
-
"@dxos/plugin-attention": "0.8.4-main.
|
|
71
|
-
"@dxos/plugin-space": "0.8.4-main.
|
|
72
|
-
"@dxos/plugin-
|
|
73
|
-
"@dxos/random": "0.8.4-main.
|
|
74
|
-
"@dxos/plugin-
|
|
75
|
-
"@dxos/plugin-theme": "0.8.4-main.
|
|
76
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
77
|
-
"@dxos/
|
|
78
|
-
"@dxos/
|
|
83
|
+
"vite": "^8.0.10",
|
|
84
|
+
"@dxos/plugin-attention": "0.8.4-main.51f1e5ca51",
|
|
85
|
+
"@dxos/plugin-space": "0.8.4-main.51f1e5ca51",
|
|
86
|
+
"@dxos/plugin-testing": "0.8.4-main.51f1e5ca51",
|
|
87
|
+
"@dxos/random": "0.8.4-main.51f1e5ca51",
|
|
88
|
+
"@dxos/plugin-client": "0.8.4-main.51f1e5ca51",
|
|
89
|
+
"@dxos/plugin-theme": "0.8.4-main.51f1e5ca51",
|
|
90
|
+
"@dxos/react-ui": "0.8.4-main.51f1e5ca51",
|
|
91
|
+
"@dxos/storybook-utils": "0.8.4-main.51f1e5ca51",
|
|
92
|
+
"@dxos/ui-theme": "0.8.4-main.51f1e5ca51"
|
|
79
93
|
},
|
|
80
94
|
"peerDependencies": {
|
|
81
95
|
"@effect-atom/atom-react": "^0.5.0",
|
|
82
96
|
"@effect/platform": "0.94.4",
|
|
83
|
-
"effect": "3.
|
|
97
|
+
"effect": "3.20.0",
|
|
84
98
|
"react": "~19.2.3",
|
|
85
99
|
"react-dom": "~19.2.3",
|
|
86
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
87
|
-
"@dxos/ui-theme": "0.8.4-main.
|
|
100
|
+
"@dxos/react-ui": "0.8.4-main.51f1e5ca51",
|
|
101
|
+
"@dxos/ui-theme": "0.8.4-main.51f1e5ca51"
|
|
88
102
|
},
|
|
89
103
|
"publishConfig": {
|
|
90
104
|
"access": "public"
|
package/src/NavTreePlugin.tsx
CHANGED
|
@@ -9,11 +9,11 @@ import { AppActivationEvents, AppCapabilities, AppPlugin, LayoutOperation } from
|
|
|
9
9
|
import { Graph } from '@dxos/plugin-graph';
|
|
10
10
|
import { type TreeData } from '@dxos/react-ui-list';
|
|
11
11
|
|
|
12
|
-
import { AppGraphBuilder, Keyboard,
|
|
13
|
-
import { NODE_TYPE } from '
|
|
14
|
-
import { meta } from '
|
|
15
|
-
import { translations } from '
|
|
16
|
-
import { NavTreeEvents } from '
|
|
12
|
+
import { AppGraphBuilder, Keyboard, OperationHandler, ReactSurface, State } from '#capabilities';
|
|
13
|
+
import { NODE_TYPE } from '#containers';
|
|
14
|
+
import { meta } from '#meta';
|
|
15
|
+
import { translations } from '#translations';
|
|
16
|
+
import { NavTreeEvents } from '#types';
|
|
17
17
|
|
|
18
18
|
export const NavTreePlugin = Plugin.define(meta).pipe(
|
|
19
19
|
AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),
|
|
@@ -34,13 +34,13 @@ export const NavTreePlugin = Plugin.define(meta).pipe(
|
|
|
34
34
|
},
|
|
35
35
|
},
|
|
36
36
|
}),
|
|
37
|
-
AppPlugin.
|
|
37
|
+
AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
|
|
38
38
|
AppPlugin.addSurfaceModule({ activate: ReactSurface }),
|
|
39
39
|
AppPlugin.addTranslationsModule({ translations }),
|
|
40
40
|
Plugin.addModule({
|
|
41
41
|
id: 'state',
|
|
42
42
|
activatesOn: AppActivationEvents.LayoutReady,
|
|
43
|
-
|
|
43
|
+
firesAfterActivation: [NavTreeEvents.StateReady],
|
|
44
44
|
activate: State,
|
|
45
45
|
}),
|
|
46
46
|
Plugin.addModule({
|
|
@@ -6,19 +6,19 @@ import * as Effect from 'effect/Effect';
|
|
|
6
6
|
|
|
7
7
|
import { Capability } from '@dxos/app-framework';
|
|
8
8
|
import { AppCapabilities, LayoutOperation } from '@dxos/app-toolkit';
|
|
9
|
-
import { Operation } from '@dxos/
|
|
10
|
-
import { GraphBuilder, NodeMatcher } from '@dxos/plugin-graph';
|
|
9
|
+
import { Operation } from '@dxos/compute';
|
|
10
|
+
import { GraphBuilder, Node, NodeMatcher } from '@dxos/plugin-graph';
|
|
11
11
|
|
|
12
|
-
import { COMMANDS_DIALOG, meta } from '
|
|
12
|
+
import { COMMANDS_DIALOG, meta } from '#meta';
|
|
13
13
|
|
|
14
14
|
export default Capability.makeModule(
|
|
15
15
|
Effect.fnUntraced(function* () {
|
|
16
16
|
const extensions = yield* GraphBuilder.createExtension({
|
|
17
|
-
id:
|
|
17
|
+
id: 'root',
|
|
18
18
|
match: NodeMatcher.whenRoot,
|
|
19
19
|
actions: () =>
|
|
20
20
|
Effect.succeed([
|
|
21
|
-
{
|
|
21
|
+
Node.makeAction({
|
|
22
22
|
id: COMMANDS_DIALOG,
|
|
23
23
|
data: () =>
|
|
24
24
|
Operation.invoke(LayoutOperation.UpdateDialog, {
|
|
@@ -26,14 +26,14 @@ export default Capability.makeModule(
|
|
|
26
26
|
blockAlign: 'start',
|
|
27
27
|
}),
|
|
28
28
|
properties: {
|
|
29
|
-
label: ['open
|
|
29
|
+
label: ['open-commands.label', { ns: meta.id }],
|
|
30
30
|
icon: 'ph--magnifying-glass--regular',
|
|
31
31
|
keyBinding: {
|
|
32
32
|
macos: 'meta+k',
|
|
33
33
|
windows: 'ctrl+k',
|
|
34
34
|
},
|
|
35
35
|
},
|
|
36
|
-
},
|
|
36
|
+
}),
|
|
37
37
|
]),
|
|
38
38
|
});
|
|
39
39
|
|
|
@@ -2,8 +2,14 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export
|
|
9
|
-
export
|
|
5
|
+
import { Capability } from '@dxos/app-framework';
|
|
6
|
+
import { OperationHandlerSet } from '@dxos/compute';
|
|
7
|
+
|
|
8
|
+
export const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));
|
|
9
|
+
export const Keyboard = Capability.lazy('Keyboard', () => import('./keyboard'));
|
|
10
|
+
export const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(
|
|
11
|
+
'OperationHandler',
|
|
12
|
+
() => import('./operation-handler'),
|
|
13
|
+
);
|
|
14
|
+
export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));
|
|
15
|
+
export const State = Capability.lazy('State', () => import('./state'));
|
|
@@ -11,7 +11,7 @@ import { Keyboard } from '@dxos/keyboard';
|
|
|
11
11
|
import { Graph, Node, runAction } from '@dxos/plugin-graph';
|
|
12
12
|
import { getHostPlatform } from '@dxos/util';
|
|
13
13
|
|
|
14
|
-
import { KEY_BINDING } from '
|
|
14
|
+
import { KEY_BINDING } from '#meta';
|
|
15
15
|
|
|
16
16
|
export default Capability.makeModule(
|
|
17
17
|
Effect.fnUntraced(function* () {
|
|
@@ -47,7 +47,7 @@ export default Capability.makeModule(
|
|
|
47
47
|
};
|
|
48
48
|
|
|
49
49
|
const eventHandler = debounce(() => {
|
|
50
|
-
Graph.traverse(graph, { relation: 'child', visitor });
|
|
50
|
+
Graph.traverse(graph, { relation: ['child', 'action'], visitor });
|
|
51
51
|
}, 500);
|
|
52
52
|
|
|
53
53
|
const unsubscribe = graph.onNodeChanged.on(eventHandler);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
|
+
import type { OperationHandlerSet } from '@dxos/compute';
|
|
9
|
+
|
|
10
|
+
import { NavTreeOperationHandlerSet } from '#operations';
|
|
11
|
+
|
|
12
|
+
export default Capability.makeModule<OperationHandlerSet.OperationHandlerSet>(
|
|
13
|
+
Effect.fnUntraced(function* () {
|
|
14
|
+
return Capability.contributes(Capabilities.OperationHandler, NavTreeOperationHandlerSet);
|
|
15
|
+
}),
|
|
16
|
+
);
|
|
@@ -3,26 +3,26 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
|
-
import React from 'react';
|
|
6
|
+
import React, { type ComponentProps } from 'react';
|
|
7
7
|
|
|
8
8
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
9
|
import { Surface } from '@dxos/app-framework/ui';
|
|
10
|
+
import { AppSurface } from '@dxos/app-toolkit/ui';
|
|
10
11
|
import { Node } from '@dxos/plugin-graph';
|
|
11
12
|
|
|
12
|
-
import { CommandsDialogContent, CommandsTrigger, NavTreeContainer, NavTreeDocumentTitle } from '
|
|
13
|
-
import { COMMANDS_DIALOG
|
|
13
|
+
import { CommandsDialogContent, CommandsTrigger, NavTreeContainer, NavTreeDocumentTitle } from '#containers';
|
|
14
|
+
import { COMMANDS_DIALOG } from '#meta';
|
|
14
15
|
|
|
15
16
|
export default Capability.makeModule(() =>
|
|
16
17
|
Effect.succeed(
|
|
17
18
|
Capability.contributes(Capabilities.ReactSurface, [
|
|
18
19
|
Surface.create({
|
|
19
20
|
id: COMMANDS_DIALOG,
|
|
20
|
-
|
|
21
|
-
filter: (data): data is { props: { selected?: string } } => data.component === COMMANDS_DIALOG,
|
|
21
|
+
filter: AppSurface.component<ComponentProps<typeof CommandsDialogContent>>(AppSurface.Dialog, COMMANDS_DIALOG),
|
|
22
22
|
component: ({ data, ref }) => <CommandsDialogContent {...data.props} ref={ref} />,
|
|
23
23
|
}),
|
|
24
24
|
Surface.create({
|
|
25
|
-
id:
|
|
25
|
+
id: 'navigation',
|
|
26
26
|
role: 'navigation',
|
|
27
27
|
filter: (data): data is { popoverAnchorId?: string; current: string } => typeof data.current === 'string',
|
|
28
28
|
component: ({ data, ref }) => {
|
|
@@ -36,14 +36,14 @@ export default Capability.makeModule(() =>
|
|
|
36
36
|
},
|
|
37
37
|
}),
|
|
38
38
|
Surface.create({
|
|
39
|
-
id:
|
|
39
|
+
id: 'document-title',
|
|
40
40
|
role: 'document-title',
|
|
41
41
|
component: ({ data }) => (
|
|
42
42
|
<NavTreeDocumentTitle node={Node.isGraphNode(data.subject) ? data.subject : undefined} />
|
|
43
43
|
),
|
|
44
44
|
}),
|
|
45
45
|
Surface.create({
|
|
46
|
-
id:
|
|
46
|
+
id: 'search-input',
|
|
47
47
|
role: 'search-input',
|
|
48
48
|
position: 'fallback',
|
|
49
49
|
component: () => <CommandsTrigger />,
|
|
@@ -10,13 +10,13 @@ import { AppCapabilities } from '@dxos/app-toolkit';
|
|
|
10
10
|
import { Graph, Node } from '@dxos/plugin-graph';
|
|
11
11
|
import { Path } from '@dxos/react-ui-list';
|
|
12
12
|
|
|
13
|
-
import { meta } from '
|
|
14
|
-
import { type NavTreeCapabilities as NC, NavTreeCapabilities } from '
|
|
13
|
+
import { meta } from '#meta';
|
|
14
|
+
import { type NavTreeCapabilities as NC, NavTreeCapabilities } from '#types';
|
|
15
15
|
|
|
16
|
-
const KEY = `${meta.id}
|
|
16
|
+
const KEY = `${meta.id}.state.v1`;
|
|
17
17
|
|
|
18
18
|
/** Default item state for new entries. */
|
|
19
|
-
const defaultItemState: NC.NavTreeItemState = { open: false, current: false
|
|
19
|
+
const defaultItemState: NC.NavTreeItemState = { open: false, current: false };
|
|
20
20
|
|
|
21
21
|
/** L0 (top-level workspace) paths are direct children of root — not part of the expandable tree model. */
|
|
22
22
|
const isTopLevelPath = (path: string[]): boolean => path.length === 2 && path[0] === Node.RootId;
|
|
@@ -66,7 +66,7 @@ export default Capability.makeModule(
|
|
|
66
66
|
return registry.get(getItemAtom(path));
|
|
67
67
|
};
|
|
68
68
|
|
|
69
|
-
const setItem = (path: string[], key: 'open' | 'current'
|
|
69
|
+
const setItem = (path: string[], key: 'open' | 'current', next: boolean) => {
|
|
70
70
|
const pathString = Path.create(...path);
|
|
71
71
|
const atom = itemAtomFamily(pathString);
|
|
72
72
|
const currentValue = registry.get(atom);
|
|
@@ -12,21 +12,22 @@ import { Capabilities, Capability } from '@dxos/app-framework';
|
|
|
12
12
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
13
13
|
import { useAtomCapability } from '@dxos/app-framework/ui';
|
|
14
14
|
import { AppCapabilities, LayoutOperation } from '@dxos/app-toolkit';
|
|
15
|
-
import {
|
|
15
|
+
import { Operation, OperationHandlerSet } from '@dxos/compute';
|
|
16
16
|
import { StorybookPlugin, corePlugins } from '@dxos/plugin-testing';
|
|
17
|
-
import {
|
|
17
|
+
import { random } from '@dxos/random';
|
|
18
18
|
import { IconButton, Input, Main, Toolbar } from '@dxos/react-ui';
|
|
19
|
-
import { withLayout, withTheme } from '@dxos/react-ui/testing';
|
|
20
19
|
import { useAttention, useAttentionAttributes } from '@dxos/react-ui-attention';
|
|
21
20
|
import { Stack, StackItem } from '@dxos/react-ui-stack';
|
|
21
|
+
import { withLayout } from '@dxos/react-ui/testing';
|
|
22
22
|
import { mx } from '@dxos/ui-theme';
|
|
23
23
|
|
|
24
|
-
import { NavTreeContainer } from '
|
|
24
|
+
import { NavTreeContainer } from '#containers';
|
|
25
|
+
import { storybookGraphBuilders } from '#testing';
|
|
26
|
+
import { translations } from '#translations';
|
|
27
|
+
|
|
25
28
|
import { NavTreePlugin } from '../../NavTreePlugin';
|
|
26
|
-
import { storybookGraphBuilders } from '../../testing';
|
|
27
|
-
import { translations } from '../../translations';
|
|
28
29
|
|
|
29
|
-
|
|
30
|
+
random.seed(1234);
|
|
30
31
|
|
|
31
32
|
const StoryState = Capability.make<Atom.Atom<{ tab: string }>>('story-state');
|
|
32
33
|
|
|
@@ -43,7 +44,7 @@ const StoryPlankHeading = ({ attendableId }: { attendableId: string }) => {
|
|
|
43
44
|
<div className='flex p-1 items-center border-b border-separator'>
|
|
44
45
|
<IconButton
|
|
45
46
|
density='coarse'
|
|
46
|
-
icon='ph--
|
|
47
|
+
icon='ph--circle--regular'
|
|
47
48
|
label='Test'
|
|
48
49
|
iconOnly
|
|
49
50
|
variant={hasAttention ? 'primary' : 'ghost'}
|
|
@@ -120,7 +121,6 @@ const meta = {
|
|
|
120
121
|
component: NavTreeContainer,
|
|
121
122
|
render: DefaultStory,
|
|
122
123
|
decorators: [
|
|
123
|
-
withTheme(),
|
|
124
124
|
withLayout({ layout: 'fullscreen' }),
|
|
125
125
|
withPluginManager({
|
|
126
126
|
plugins: [
|
|
@@ -132,20 +132,21 @@ const meta = {
|
|
|
132
132
|
NavTreePlugin(),
|
|
133
133
|
],
|
|
134
134
|
capabilities: () => {
|
|
135
|
-
const storyStateAtom = Atom.make({ tab: 'space-0' }).pipe(Atom.keepAlive);
|
|
135
|
+
const storyStateAtom = Atom.make({ tab: 'root/space-0' }).pipe(Atom.keepAlive);
|
|
136
136
|
return [
|
|
137
137
|
Capability.contributes(StoryState, storyStateAtom),
|
|
138
138
|
Capability.contributes(AppCapabilities.AppGraphBuilder, storybookGraphBuilders()),
|
|
139
|
-
Capability.contributes(
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
139
|
+
Capability.contributes(
|
|
140
|
+
Capabilities.OperationHandler,
|
|
141
|
+
OperationHandlerSet.make(
|
|
142
|
+
Operation.withHandler(LayoutOperation.SwitchWorkspace, ({ subject }) =>
|
|
143
143
|
Effect.gen(function* () {
|
|
144
144
|
const registry: Registry.Registry = yield* Capability.get(Capabilities.AtomRegistry);
|
|
145
145
|
registry.set(storyStateAtom, { tab: subject });
|
|
146
146
|
}),
|
|
147
|
-
|
|
148
|
-
|
|
147
|
+
),
|
|
148
|
+
),
|
|
149
|
+
),
|
|
149
150
|
];
|
|
150
151
|
},
|
|
151
152
|
}),
|
|
@@ -9,7 +9,8 @@ import { Node, useConnections, useActions as useGraphActions } from '@dxos/plugi
|
|
|
9
9
|
import { Tabs } from '@dxos/react-ui-tabs';
|
|
10
10
|
import { byPosition } from '@dxos/util';
|
|
11
11
|
|
|
12
|
-
import { useLoadDescendents } from '
|
|
12
|
+
import { useLoadDescendents } from '#hooks';
|
|
13
|
+
|
|
13
14
|
import { useNavTreeContext } from '../NavTreeContext';
|
|
14
15
|
import { L0Menu, L1Tabs, type L1TabsProps } from '../Sidebar';
|
|
15
16
|
|
|
@@ -30,7 +31,7 @@ export const NavTree = forwardRef<HTMLDivElement, NavTreeProps>(({ id, root, tab
|
|
|
30
31
|
// it uses RovingFocus and doesn't support moving focus to an item that is not a tab. Assess whether this situation
|
|
31
32
|
// should change including whether it should motivate a change in the design/taxonomy, or if this means this should
|
|
32
33
|
// not use `react-ui-tabs` at all.
|
|
33
|
-
<Tabs.Root value={tab} orientation='vertical'
|
|
34
|
+
<Tabs.Root value={tab} orientation='vertical' classNames='relative' ref={forwardedRef}>
|
|
34
35
|
<L0Menu
|
|
35
36
|
menuActions={topLevelActions}
|
|
36
37
|
topLevelItems={l0Items}
|
|
@@ -6,7 +6,7 @@ import { createContext, useContext } from 'react';
|
|
|
6
6
|
|
|
7
7
|
import { raise } from '@dxos/debug';
|
|
8
8
|
|
|
9
|
-
import { type NavTreeContextValue } from '
|
|
9
|
+
import { type NavTreeContextValue } from '../types';
|
|
10
10
|
|
|
11
11
|
export const NavTreeContext = createContext<NavTreeContextValue | null>(null);
|
|
12
12
|
|
|
@@ -9,33 +9,32 @@ import { RuntimePlugin } from '@dxos/app-framework';
|
|
|
9
9
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
10
10
|
import { type Node } from '@dxos/app-graph';
|
|
11
11
|
import { corePlugins } from '@dxos/plugin-testing';
|
|
12
|
-
import {
|
|
13
|
-
import { withTheme } from '@dxos/react-ui/testing';
|
|
12
|
+
import { random } from '@dxos/random';
|
|
14
13
|
|
|
15
14
|
import { NavTreeItemAction, type NavTreeItemActionMenuProps } from './NavTreeItemAction';
|
|
16
15
|
|
|
17
16
|
const parent = {
|
|
18
|
-
id:
|
|
17
|
+
id: random.string.uuid(),
|
|
19
18
|
type: 'node',
|
|
20
19
|
data: null,
|
|
21
20
|
properties: {
|
|
22
|
-
label:
|
|
21
|
+
label: random.lorem.words(2),
|
|
23
22
|
icon: 'ph--circle--regular',
|
|
24
23
|
},
|
|
25
24
|
} satisfies Node.NodeArg<any>;
|
|
26
25
|
|
|
27
26
|
// TODO(burdon): Factor out across tests.
|
|
28
|
-
const menuActions =
|
|
27
|
+
const menuActions = random.helpers.multiple(
|
|
29
28
|
() =>
|
|
30
29
|
({
|
|
31
|
-
id:
|
|
30
|
+
id: random.string.uuid(),
|
|
32
31
|
type: 'action',
|
|
33
32
|
data: () =>
|
|
34
33
|
Effect.sync(() => {
|
|
35
34
|
console.log('invoke');
|
|
36
35
|
}),
|
|
37
36
|
properties: {
|
|
38
|
-
label:
|
|
37
|
+
label: random.lorem.words(2),
|
|
39
38
|
icon: 'ph--circle--regular',
|
|
40
39
|
},
|
|
41
40
|
}) satisfies Node.NodeArg<any>,
|
|
@@ -52,7 +51,6 @@ const meta = {
|
|
|
52
51
|
label: 'Select action',
|
|
53
52
|
} satisfies Partial<NavTreeItemActionMenuProps>,
|
|
54
53
|
decorators: [
|
|
55
|
-
withTheme(),
|
|
56
54
|
withPluginManager({
|
|
57
55
|
plugins: [...corePlugins(), RuntimePlugin()],
|
|
58
56
|
}),
|