@dxos/plugin-navtree 0.8.4-main.1068cf700f → 0.8.4-main.1c7ec43d41
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/NavTreePlugin-3KLPENH6.mjs +54 -0
- package/dist/lib/browser/NavTreePlugin-3KLPENH6.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +98 -114
- 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/NavTreePlugin.d.ts +1 -0
- package/dist/types/src/NavTreePlugin.d.ts.map +1 -1
- package/dist/types/src/NavTreePlugin.node.d.ts +4 -0
- package/dist/types/src/NavTreePlugin.node.d.ts.map +1 -0
- package/dist/types/src/NavTreePlugin.test.d.ts +2 -0
- package/dist/types/src/NavTreePlugin.test.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts +6 -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 +5 -0
- 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 +5 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/state.d.ts +6 -0
- package/dist/types/src/capabilities/state.d.ts.map +1 -0
- package/dist/types/src/components/NavTree/NavTree.d.ts +10 -32
- package/dist/types/src/components/NavTree/NavTree.d.ts.map +1 -1
- package/dist/types/src/components/NavTree/NavTree.stories.d.ts +10 -15
- 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 +4 -1
- package/dist/types/src/components/Sidebar/L0Menu.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/L1Panel.d.ts +2 -5
- package/dist/types/src/components/Sidebar/L1Panel.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/L1Tabs.d.ts +3 -2
- 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/index.d.ts +0 -3
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/components/types.d.ts +5 -14
- package/dist/types/src/components/types.d.ts.map +1 -1
- package/dist/types/src/{components/CommandsDialog/CommandsDialog.d.ts → containers/CommandsDialogContent/CommandsDialogContent.d.ts} +1 -1
- package/dist/types/src/containers/CommandsDialogContent/CommandsDialogContent.d.ts.map +1 -0
- 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 +2 -0
- package/dist/types/src/containers/CommandsDialogContent/index.d.ts.map +1 -0
- package/dist/types/src/containers/CommandsTrigger/CommandsTrigger.d.ts.map +1 -0
- package/dist/types/src/containers/CommandsTrigger/index.d.ts +2 -0
- package/dist/types/src/containers/CommandsTrigger/index.d.ts.map +1 -0
- package/dist/types/src/containers/NavTreeContainer/NavTreeContainer.d.ts +9 -0
- package/dist/types/src/containers/NavTreeContainer/NavTreeContainer.d.ts.map +1 -0
- package/dist/types/src/containers/NavTreeContainer/index.d.ts +3 -0
- package/dist/types/src/containers/NavTreeContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/NavTreeDocumentTitle/NavTreeDocumentTitle.d.ts.map +1 -0
- package/dist/types/src/containers/NavTreeDocumentTitle/index.d.ts +2 -0
- package/dist/types/src/containers/NavTreeDocumentTitle/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +7 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- 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/index.d.ts +5 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -0
- package/dist/types/src/hooks/useActions.d.ts +5 -0
- package/dist/types/src/hooks/useActions.d.ts.map +1 -0
- package/dist/types/src/hooks/useLoadDescendents.d.ts +6 -0
- package/dist/types/src/hooks/useLoadDescendents.d.ts.map +1 -0
- package/dist/types/src/hooks/useNavTreeModel.d.ts +7 -0
- package/dist/types/src/hooks/useNavTreeModel.d.ts.map +1 -0
- package/dist/types/src/hooks/useNavTreeState.d.ts +18 -0
- package/dist/types/src/hooks/useNavTreeState.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +3 -2
- package/dist/types/src/index.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 +3 -3
- 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 +7 -3
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +62 -43
- package/src/NavTreePlugin.node.ts +17 -0
- package/src/NavTreePlugin.test.ts +27 -0
- package/src/NavTreePlugin.tsx +8 -25
- 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} +9 -11
- package/src/capabilities/{state/state.ts → state.ts} +41 -14
- package/src/components/NavTree/NavTree.stories.tsx +26 -24
- package/src/components/NavTree/NavTree.tsx +64 -22
- 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 +7 -9
- package/src/components/NavTreeItem/NavTreeItemAction.tsx +56 -40
- package/src/components/NavTreeItem/NavTreeItemColumns.tsx +43 -17
- package/src/components/Sidebar/L0Menu.tsx +104 -110
- package/src/components/Sidebar/L1Panel.tsx +163 -142
- package/src/components/Sidebar/L1Tabs.tsx +13 -4
- package/src/components/UserAccountAvatar/UserAccountAvatar.stories.tsx +1 -2
- package/src/components/UserAccountAvatar/UserAccountAvatar.tsx +1 -1
- package/src/components/index.ts +0 -3
- package/src/components/types.ts +11 -17
- package/src/containers/CommandsDialogContent/CommandsDialogContent.stories.tsx +46 -0
- package/src/{components/CommandsDialog/CommandsDialog.tsx → containers/CommandsDialogContent/CommandsDialogContent.tsx} +52 -53
- package/src/containers/CommandsDialogContent/index.ts +5 -0
- package/src/{components/CommandsDialog → containers/CommandsTrigger}/CommandsTrigger.tsx +8 -6
- package/src/containers/CommandsTrigger/index.ts +5 -0
- package/src/{components → containers/NavTreeContainer}/NavTreeContainer.tsx +78 -145
- package/src/containers/NavTreeContainer/index.ts +6 -0
- package/src/{components → containers/NavTreeDocumentTitle}/NavTreeDocumentTitle.tsx +2 -2
- package/src/containers/NavTreeDocumentTitle/index.ts +5 -0
- package/src/containers/index.ts +12 -0
- package/src/experimental/Tree.stories.tsx +64 -61
- package/src/experimental/Tree.tsx +3 -3
- package/src/hooks/index.ts +8 -0
- package/src/hooks/useActions.ts +34 -0
- package/src/hooks/useLoadDescendents.ts +23 -0
- package/src/hooks/useNavTreeModel.ts +118 -0
- package/src/hooks/useNavTreeState.ts +35 -0
- package/src/index.ts +8 -2
- package/src/meta.ts +3 -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 +25 -25
- package/src/translations.ts +8 -10
- package/src/types/capabilities.ts +4 -4
- package/src/types/events.ts +2 -2
- package/src/util.ts +19 -5
- 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-63YLDLLE.mjs +0 -1373
- package/dist/lib/browser/chunk-63YLDLLE.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-46XQHY2O.mjs +0 -53
- package/dist/lib/browser/keyboard-46XQHY2O.mjs.map +0 -7
- package/dist/lib/browser/operation-resolver-NNNDII45.mjs +0 -53
- package/dist/lib/browser/operation-resolver-NNNDII45.mjs.map +0 -7
- package/dist/lib/browser/react-surface-APSEG23H.mjs +0 -59
- package/dist/lib/browser/react-surface-APSEG23H.mjs.map +0 -7
- package/dist/lib/browser/state-M5YUCIQU.mjs +0 -121
- package/dist/lib/browser/state-M5YUCIQU.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +0 -6
- 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 +0 -5
- 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 +0 -5
- 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 +0 -6
- package/dist/types/src/capabilities/state/state.d.ts.map +0 -1
- package/dist/types/src/components/CommandsDialog/CommandsDialog.d.ts.map +0 -1
- package/dist/types/src/components/CommandsDialog/CommandsTrigger.d.ts.map +0 -1
- package/dist/types/src/components/CommandsDialog/index.d.ts +0 -3
- package/dist/types/src/components/CommandsDialog/index.d.ts.map +0 -1
- package/dist/types/src/components/NavTreeContainer.d.ts +0 -16
- package/dist/types/src/components/NavTreeContainer.d.ts.map +0 -1
- package/dist/types/src/components/NavTreeContext.d.ts.map +0 -1
- package/dist/types/src/components/NavTreeDocumentTitle.d.ts.map +0 -1
- package/dist/types/src/hooks.d.ts +0 -34
- package/dist/types/src/hooks.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 -42
- package/src/capabilities/react-surface/index.ts +0 -7
- package/src/capabilities/state/index.ts +0 -7
- package/src/components/CommandsDialog/index.ts +0 -6
- package/src/hooks.ts +0 -73
- /package/dist/types/src/{components/CommandsDialog → containers/CommandsTrigger}/CommandsTrigger.d.ts +0 -0
- /package/dist/types/src/{components → containers/NavTreeDocumentTitle}/NavTreeDocumentTitle.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.1c7ec43d41",
|
|
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,36 @@
|
|
|
12
12
|
"author": "DXOS.org",
|
|
13
13
|
"sideEffects": true,
|
|
14
14
|
"type": "module",
|
|
15
|
+
"imports": {
|
|
16
|
+
"#plugin": {
|
|
17
|
+
"browser": "./src/NavTreePlugin.tsx",
|
|
18
|
+
"node": "./src/NavTreePlugin.node.ts",
|
|
19
|
+
"default": "./src/NavTreePlugin.tsx"
|
|
20
|
+
},
|
|
21
|
+
"#capabilities": "./src/capabilities/index.ts",
|
|
22
|
+
"#components": "./src/components/index.ts",
|
|
23
|
+
"#containers": "./src/containers/index.ts",
|
|
24
|
+
"#hooks": "./src/hooks/index.ts",
|
|
25
|
+
"#meta": "./src/meta.ts",
|
|
26
|
+
"#operations": "./src/operations/index.ts",
|
|
27
|
+
"#testing": "./src/testing/index.ts",
|
|
28
|
+
"#translations": "./src/translations.ts",
|
|
29
|
+
"#types": "./src/types/index.ts"
|
|
30
|
+
},
|
|
15
31
|
"exports": {
|
|
16
32
|
".": {
|
|
17
33
|
"source": "./src/index.ts",
|
|
18
34
|
"types": "./dist/types/src/index.d.ts",
|
|
19
35
|
"browser": "./dist/lib/browser/index.mjs"
|
|
36
|
+
},
|
|
37
|
+
"./translations": {
|
|
38
|
+
"source": "./src/translations.ts",
|
|
39
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
40
|
+
"browser": "./dist/lib/browser/translations.mjs",
|
|
41
|
+
"node": "./dist/lib/node-esm/translations.mjs"
|
|
20
42
|
}
|
|
21
43
|
},
|
|
22
44
|
"types": "dist/types/src/index.d.ts",
|
|
23
|
-
"typesVersions": {
|
|
24
|
-
"*": {}
|
|
25
|
-
},
|
|
26
45
|
"files": [
|
|
27
46
|
"dist",
|
|
28
47
|
"src"
|
|
@@ -32,59 +51,59 @@
|
|
|
32
51
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "1.1.0",
|
|
33
52
|
"@radix-ui/react-dismissable-layer": "1.1.5",
|
|
34
53
|
"@radix-ui/react-use-controllable-state": "1.1.0",
|
|
35
|
-
"date-fns": "^3.
|
|
36
|
-
"@dxos/app-
|
|
37
|
-
"@dxos/
|
|
38
|
-
"@dxos/
|
|
39
|
-
"@dxos/app-
|
|
40
|
-
"@dxos/
|
|
41
|
-
"@dxos/
|
|
42
|
-
"@dxos/
|
|
43
|
-
"@dxos/
|
|
44
|
-
"@dxos/
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/plugin-
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/plugin-observability": "0.8.4-main.
|
|
50
|
-
"@dxos/react-client": "0.8.4-main.
|
|
51
|
-
"@dxos/protocols": "0.8.4-main.
|
|
52
|
-
"@dxos/react-ui-attention": "0.8.4-main.
|
|
53
|
-
"@dxos/react-ui-list": "0.8.4-main.
|
|
54
|
-
"@dxos/react-ui-mosaic": "0.8.4-main.
|
|
55
|
-
"@dxos/react-ui-
|
|
56
|
-
"@dxos/react-ui-
|
|
57
|
-
"@dxos/react-ui-
|
|
58
|
-
"@dxos/react-ui-tabs": "0.8.4-main.
|
|
59
|
-
"@dxos/util": "0.8.4-main.
|
|
54
|
+
"date-fns": "^3.6.0",
|
|
55
|
+
"@dxos/app-graph": "0.8.4-main.1c7ec43d41",
|
|
56
|
+
"@dxos/async": "0.8.4-main.1c7ec43d41",
|
|
57
|
+
"@dxos/compute": "0.8.4-main.1c7ec43d41",
|
|
58
|
+
"@dxos/app-framework": "0.8.4-main.1c7ec43d41",
|
|
59
|
+
"@dxos/echo": "0.8.4-main.1c7ec43d41",
|
|
60
|
+
"@dxos/keyboard": "0.8.4-main.1c7ec43d41",
|
|
61
|
+
"@dxos/invariant": "0.8.4-main.1c7ec43d41",
|
|
62
|
+
"@dxos/debug": "0.8.4-main.1c7ec43d41",
|
|
63
|
+
"@dxos/lit-ui": "0.8.4-main.1c7ec43d41",
|
|
64
|
+
"@dxos/app-toolkit": "0.8.4-main.1c7ec43d41",
|
|
65
|
+
"@dxos/plugin-deck": "0.8.4-main.1c7ec43d41",
|
|
66
|
+
"@dxos/plugin-graph": "0.8.4-main.1c7ec43d41",
|
|
67
|
+
"@dxos/log": "0.8.4-main.1c7ec43d41",
|
|
68
|
+
"@dxos/plugin-observability": "0.8.4-main.1c7ec43d41",
|
|
69
|
+
"@dxos/react-client": "0.8.4-main.1c7ec43d41",
|
|
70
|
+
"@dxos/protocols": "0.8.4-main.1c7ec43d41",
|
|
71
|
+
"@dxos/react-ui-attention": "0.8.4-main.1c7ec43d41",
|
|
72
|
+
"@dxos/react-ui-list": "0.8.4-main.1c7ec43d41",
|
|
73
|
+
"@dxos/react-ui-mosaic": "0.8.4-main.1c7ec43d41",
|
|
74
|
+
"@dxos/react-ui-stack": "0.8.4-main.1c7ec43d41",
|
|
75
|
+
"@dxos/react-ui-search": "0.8.4-main.1c7ec43d41",
|
|
76
|
+
"@dxos/react-ui-menu": "0.8.4-main.1c7ec43d41",
|
|
77
|
+
"@dxos/react-ui-tabs": "0.8.4-main.1c7ec43d41",
|
|
78
|
+
"@dxos/util": "0.8.4-main.1c7ec43d41"
|
|
60
79
|
},
|
|
61
80
|
"devDependencies": {
|
|
62
81
|
"@effect-atom/atom-react": "^0.5.0",
|
|
63
82
|
"@effect/platform": "0.94.4",
|
|
64
83
|
"@types/react": "~19.2.7",
|
|
65
84
|
"@types/react-dom": "~19.2.3",
|
|
66
|
-
"effect": "3.
|
|
85
|
+
"effect": "3.20.0",
|
|
67
86
|
"react": "~19.2.3",
|
|
68
87
|
"react-dom": "~19.2.3",
|
|
69
|
-
"vite": "
|
|
70
|
-
"@dxos/plugin-
|
|
71
|
-
"@dxos/plugin-
|
|
72
|
-
"@dxos/plugin-
|
|
73
|
-
"@dxos/plugin-
|
|
74
|
-
"@dxos/plugin-theme": "0.8.4-main.
|
|
75
|
-
"@dxos/
|
|
76
|
-
"@dxos/
|
|
77
|
-
"@dxos/random": "0.8.4-main.
|
|
78
|
-
"@dxos/
|
|
88
|
+
"vite": "^8.0.10",
|
|
89
|
+
"@dxos/plugin-client": "0.8.4-main.1c7ec43d41",
|
|
90
|
+
"@dxos/plugin-attention": "0.8.4-main.1c7ec43d41",
|
|
91
|
+
"@dxos/plugin-testing": "0.8.4-main.1c7ec43d41",
|
|
92
|
+
"@dxos/plugin-space": "0.8.4-main.1c7ec43d41",
|
|
93
|
+
"@dxos/plugin-theme": "0.8.4-main.1c7ec43d41",
|
|
94
|
+
"@dxos/ui-theme": "0.8.4-main.1c7ec43d41",
|
|
95
|
+
"@dxos/react-ui": "0.8.4-main.1c7ec43d41",
|
|
96
|
+
"@dxos/random": "0.8.4-main.1c7ec43d41",
|
|
97
|
+
"@dxos/storybook-utils": "0.8.4-main.1c7ec43d41"
|
|
79
98
|
},
|
|
80
99
|
"peerDependencies": {
|
|
81
100
|
"@effect-atom/atom-react": "^0.5.0",
|
|
82
101
|
"@effect/platform": "0.94.4",
|
|
83
|
-
"effect": "3.
|
|
102
|
+
"effect": "3.20.0",
|
|
84
103
|
"react": "~19.2.3",
|
|
85
104
|
"react-dom": "~19.2.3",
|
|
86
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
87
|
-
"@dxos/ui-theme": "0.8.4-main.
|
|
105
|
+
"@dxos/react-ui": "0.8.4-main.1c7ec43d41",
|
|
106
|
+
"@dxos/ui-theme": "0.8.4-main.1c7ec43d41"
|
|
88
107
|
},
|
|
89
108
|
"publishConfig": {
|
|
90
109
|
"access": "public"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Plugin } from '@dxos/app-framework';
|
|
6
|
+
import { AppPlugin } from '@dxos/app-toolkit';
|
|
7
|
+
|
|
8
|
+
import { AppGraphBuilder, OperationHandler } from '#capabilities';
|
|
9
|
+
import { meta } from '#meta';
|
|
10
|
+
|
|
11
|
+
export const NavTreePlugin = Plugin.define(meta).pipe(
|
|
12
|
+
AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),
|
|
13
|
+
AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
|
|
14
|
+
Plugin.make,
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
export default NavTreePlugin;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { describe, test } from 'vitest';
|
|
6
|
+
|
|
7
|
+
import { ActivationEvents } from '@dxos/app-framework';
|
|
8
|
+
import { createComposerTestApp } from '@dxos/plugin-testing/harness';
|
|
9
|
+
|
|
10
|
+
import { NavTreePlugin } from '#plugin';
|
|
11
|
+
|
|
12
|
+
import { meta } from './meta';
|
|
13
|
+
|
|
14
|
+
const moduleId = (name: string) => `${meta.id}.module.${name}`;
|
|
15
|
+
|
|
16
|
+
describe('NavTreePlugin', () => {
|
|
17
|
+
test('modules activate on the expected events', async ({ expect }) => {
|
|
18
|
+
await using harness = await createComposerTestApp({
|
|
19
|
+
plugins: [NavTreePlugin()],
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
expect(harness.manager.getActive()).toEqual(expect.arrayContaining([moduleId('AppGraphBuilder')]));
|
|
23
|
+
|
|
24
|
+
await harness.fire(ActivationEvents.SetupOperationHandler);
|
|
25
|
+
expect(harness.manager.getActive()).toContain(moduleId('OperationHandler'));
|
|
26
|
+
});
|
|
27
|
+
});
|
package/src/NavTreePlugin.tsx
CHANGED
|
@@ -7,40 +7,21 @@ import * as Effect from 'effect/Effect';
|
|
|
7
7
|
import { ActivationEvent, ActivationEvents, Capabilities, Capability, Plugin } from '@dxos/app-framework';
|
|
8
8
|
import { AppActivationEvents, AppCapabilities, AppPlugin, LayoutOperation } from '@dxos/app-toolkit';
|
|
9
9
|
import { Graph } from '@dxos/plugin-graph';
|
|
10
|
-
import { type TreeData } from '@dxos/react-ui-list';
|
|
11
10
|
|
|
12
|
-
import { AppGraphBuilder, Keyboard,
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { NavTreeEvents } from './types';
|
|
11
|
+
import { AppGraphBuilder, Keyboard, OperationHandler, ReactSurface, State } from '#capabilities';
|
|
12
|
+
import { meta } from '#meta';
|
|
13
|
+
import { translations } from '#translations';
|
|
14
|
+
import { NavTreeEvents } from '#types';
|
|
17
15
|
|
|
18
16
|
export const NavTreePlugin = Plugin.define(meta).pipe(
|
|
19
17
|
AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),
|
|
20
|
-
AppPlugin.
|
|
21
|
-
metadata: {
|
|
22
|
-
id: NODE_TYPE,
|
|
23
|
-
metadata: {
|
|
24
|
-
parse: ({ item }: TreeData, type: string) => {
|
|
25
|
-
switch (type) {
|
|
26
|
-
case 'node':
|
|
27
|
-
return item;
|
|
28
|
-
case 'object':
|
|
29
|
-
return item.data;
|
|
30
|
-
case 'view-object':
|
|
31
|
-
return { id: `${item.id}-view`, object: item.data };
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
}),
|
|
37
|
-
AppPlugin.addOperationResolverModule({ activate: OperationResolver }),
|
|
18
|
+
AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
|
|
38
19
|
AppPlugin.addSurfaceModule({ activate: ReactSurface }),
|
|
39
20
|
AppPlugin.addTranslationsModule({ translations }),
|
|
40
21
|
Plugin.addModule({
|
|
41
22
|
id: 'state',
|
|
42
23
|
activatesOn: AppActivationEvents.LayoutReady,
|
|
43
|
-
|
|
24
|
+
firesAfterActivation: [NavTreeEvents.StateReady],
|
|
44
25
|
activate: State,
|
|
45
26
|
}),
|
|
46
27
|
Plugin.addModule({
|
|
@@ -73,3 +54,5 @@ export const NavTreePlugin = Plugin.define(meta).pipe(
|
|
|
73
54
|
}),
|
|
74
55
|
Plugin.make,
|
|
75
56
|
);
|
|
57
|
+
|
|
58
|
+
export default NavTreePlugin;
|
|
@@ -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, { 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,49 +3,47 @@
|
|
|
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
|
-
filter: (data): data is { popoverAnchorId?: string;
|
|
28
|
-
typeof data.current === 'string',
|
|
27
|
+
filter: (data): data is { popoverAnchorId?: string; current: string } => typeof data.current === 'string',
|
|
29
28
|
component: ({ data, ref }) => {
|
|
30
29
|
return (
|
|
31
30
|
<NavTreeContainer
|
|
32
31
|
tab={data.current}
|
|
33
32
|
popoverAnchorId={data.popoverAnchorId as string | undefined}
|
|
34
|
-
topbar={data.topbar as boolean}
|
|
35
33
|
ref={ref}
|
|
36
34
|
/>
|
|
37
35
|
);
|
|
38
36
|
},
|
|
39
37
|
}),
|
|
40
38
|
Surface.create({
|
|
41
|
-
id:
|
|
39
|
+
id: 'document-title',
|
|
42
40
|
role: 'document-title',
|
|
43
41
|
component: ({ data }) => (
|
|
44
42
|
<NavTreeDocumentTitle node={Node.isGraphNode(data.subject) ? data.subject : undefined} />
|
|
45
43
|
),
|
|
46
44
|
}),
|
|
47
45
|
Surface.create({
|
|
48
|
-
id:
|
|
46
|
+
id: 'search-input',
|
|
49
47
|
role: 'search-input',
|
|
50
48
|
position: 'fallback',
|
|
51
49
|
component: () => <CommandsTrigger />,
|
|
@@ -7,23 +7,23 @@ import * as Effect from 'effect/Effect';
|
|
|
7
7
|
|
|
8
8
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
9
|
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
10
|
+
import { Graph, Node } from '@dxos/plugin-graph';
|
|
10
11
|
import { Path } from '@dxos/react-ui-list';
|
|
11
12
|
|
|
12
|
-
import { meta } from '
|
|
13
|
-
import { type NavTreeCapabilities as NC, NavTreeCapabilities } from '
|
|
13
|
+
import { meta } from '#meta';
|
|
14
|
+
import { type NavTreeCapabilities as NC, NavTreeCapabilities } from '#types';
|
|
14
15
|
|
|
15
|
-
const KEY = `${meta.id}
|
|
16
|
+
const KEY = `${meta.id}.state.v1`;
|
|
16
17
|
|
|
17
18
|
/** Default item state for new entries. */
|
|
18
|
-
const defaultItemState: NC.NavTreeItemState = { open: false, current: false
|
|
19
|
+
const defaultItemState: NC.NavTreeItemState = { open: false, current: false };
|
|
20
|
+
|
|
21
|
+
/** L0 (top-level workspace) paths are direct children of root — not part of the expandable tree model. */
|
|
22
|
+
const isTopLevelPath = (path: string[]): boolean => path.length === 2 && path[0] === Node.RootId;
|
|
19
23
|
|
|
20
24
|
/** Default state entries for initial tree structure. */
|
|
21
25
|
// TODO(thure): Initialize these dynamically.
|
|
22
|
-
const defaultStateEntries: [string, NC.NavTreeItemState][] = [
|
|
23
|
-
['root', { open: true, current: false }],
|
|
24
|
-
['root~dxos.org/plugin/space-spaces', { open: true, current: false }],
|
|
25
|
-
['root~dxos.org/plugin/files', { open: true, current: false }],
|
|
26
|
-
];
|
|
26
|
+
const defaultStateEntries: [string, NC.NavTreeItemState][] = [['root', { open: true, current: false }]];
|
|
27
27
|
|
|
28
28
|
const getInitialState = (): Map<string, NC.NavTreeItemState> => {
|
|
29
29
|
const stringified = localStorage.getItem(KEY);
|
|
@@ -56,6 +56,9 @@ export default Capability.makeModule(
|
|
|
56
56
|
|
|
57
57
|
const getItemAtom = (path: string[]): Atom.Atom<NC.NavTreeItemState> => {
|
|
58
58
|
const pathString = Path.create(...path);
|
|
59
|
+
if (!backingState.has(pathString)) {
|
|
60
|
+
backingState.set(pathString, { ...defaultItemState });
|
|
61
|
+
}
|
|
59
62
|
return itemAtomFamily(pathString);
|
|
60
63
|
};
|
|
61
64
|
|
|
@@ -63,18 +66,18 @@ export default Capability.makeModule(
|
|
|
63
66
|
return registry.get(getItemAtom(path));
|
|
64
67
|
};
|
|
65
68
|
|
|
66
|
-
const setItem = (path: string[], key: 'open' | 'current'
|
|
69
|
+
const setItem = (path: string[], key: 'open' | 'current', next: boolean) => {
|
|
67
70
|
const pathString = Path.create(...path);
|
|
68
71
|
const atom = itemAtomFamily(pathString);
|
|
69
72
|
const currentValue = registry.get(atom);
|
|
70
73
|
const newValue = { ...currentValue, [key]: next };
|
|
71
74
|
|
|
72
|
-
// Update the atom.
|
|
73
75
|
registry.set(atom, newValue);
|
|
74
76
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
77
|
+
if (!(key === 'open' && isTopLevelPath(path))) {
|
|
78
|
+
backingState.set(pathString, newValue);
|
|
79
|
+
localStorage.setItem(KEY, JSON.stringify(Array.from(backingState.entries())));
|
|
80
|
+
}
|
|
78
81
|
};
|
|
79
82
|
|
|
80
83
|
// Subscribe to layout changes to update current state.
|
|
@@ -109,6 +112,30 @@ export default Capability.makeModule(
|
|
|
109
112
|
return () => clearTimeout(timeout);
|
|
110
113
|
});
|
|
111
114
|
|
|
115
|
+
// Once graph is ready, expand every node marked open in state so the graph has children loaded for rendering.
|
|
116
|
+
yield* Effect.gen(function* () {
|
|
117
|
+
const { graph } = yield* Capability.waitFor(AppCapabilities.AppGraph);
|
|
118
|
+
|
|
119
|
+
// Always expand the active workspace so its subtree is initialized.
|
|
120
|
+
const layout = registry.get(layoutAtom);
|
|
121
|
+
if (layout.workspace) {
|
|
122
|
+
Graph.expand(graph, layout.workspace, 'child');
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// Expand persisted open nodes, skipping inactive workspace tabs.
|
|
126
|
+
const openPaths = Array.from(backingState.entries())
|
|
127
|
+
.filter(([, state]) => state.open)
|
|
128
|
+
.map(([pathString]) => Path.parts(pathString))
|
|
129
|
+
.filter((path) => !isTopLevelPath(path));
|
|
130
|
+
for (const path of openPaths) {
|
|
131
|
+
const nodeId = path[path.length - 1];
|
|
132
|
+
if (!nodeId) {
|
|
133
|
+
continue;
|
|
134
|
+
}
|
|
135
|
+
Graph.expand(graph, nodeId, 'child');
|
|
136
|
+
}
|
|
137
|
+
}).pipe(Effect.forkDaemon);
|
|
138
|
+
|
|
112
139
|
return Capability.contributes(
|
|
113
140
|
NavTreeCapabilities.State,
|
|
114
141
|
{
|
|
@@ -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 { 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 '#containers';
|
|
25
|
+
import { storybookGraphBuilders } from '#testing';
|
|
26
|
+
import { translations } from '#translations';
|
|
27
|
+
|
|
24
28
|
import { NavTreePlugin } from '../../NavTreePlugin';
|
|
25
|
-
import { storybookGraphBuilders } from '../../testing';
|
|
26
|
-
import { translations } from '../../translations';
|
|
27
|
-
import { NavTreeContainer } from '../NavTreeContainer';
|
|
28
29
|
|
|
29
|
-
|
|
30
|
+
random.seed(1234);
|
|
30
31
|
|
|
31
32
|
const StoryState = Capability.make<Atom.Atom<{ tab: string }>>('story-state');
|
|
32
33
|
|
|
@@ -40,14 +41,14 @@ const StoryPlankHeading = ({ attendableId }: { attendableId: string }) => {
|
|
|
40
41
|
const { hasAttention } = useAttention(attendableId);
|
|
41
42
|
console.log('hasAttention', hasAttention);
|
|
42
43
|
return (
|
|
43
|
-
<div className='flex p-1 items-center border-
|
|
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'}
|
|
50
|
-
classNames='
|
|
51
|
+
classNames='w-(--dx-rail-action) h-(--dx-rail-action)'
|
|
51
52
|
/>
|
|
52
53
|
<StackItem.ResizeHandle />
|
|
53
54
|
</div>
|
|
@@ -70,22 +71,22 @@ const StoryPlank = ({ attendableId }: { attendableId: string }) => {
|
|
|
70
71
|
<StackItem.Root
|
|
71
72
|
item={{ id: attendableId }}
|
|
72
73
|
{...attentionAttrs}
|
|
73
|
-
classNames='bg-
|
|
74
|
+
classNames='bg-base-surface border-e border-separator'
|
|
74
75
|
size={30}
|
|
75
76
|
onKeyDown={handleKeyDown}
|
|
76
77
|
ref={rootElement}
|
|
77
78
|
>
|
|
78
79
|
<StoryPlankHeading attendableId={attendableId} />
|
|
79
80
|
<StackItem.Content toolbar>
|
|
80
|
-
<Toolbar.Root classNames='border-
|
|
81
|
+
<Toolbar.Root classNames='border-b border-subdued-separator'>
|
|
81
82
|
<Toolbar.Button>Test</Toolbar.Button>
|
|
82
83
|
</Toolbar.Root>
|
|
83
84
|
|
|
84
|
-
<div className={mx(container, 'm-2 bg-
|
|
85
|
+
<div className={mx(container, 'm-2 bg-active-surface')}>
|
|
85
86
|
<Input.Root>
|
|
86
87
|
<Input.Label>Level 1 (group)</Input.Label>
|
|
87
88
|
</Input.Root>
|
|
88
|
-
<div className={mx(container, 'bg-
|
|
89
|
+
<div className={mx(container, 'bg-base-surface')}>
|
|
89
90
|
<Input.Root>
|
|
90
91
|
<Input.Label>Level 2 (base)</Input.Label>
|
|
91
92
|
<Input.TextArea placeholder='Enter text' />
|
|
@@ -116,11 +117,11 @@ const DefaultStory = () => {
|
|
|
116
117
|
};
|
|
117
118
|
|
|
118
119
|
const meta = {
|
|
119
|
-
title: 'plugins/plugin-navtree/NavTree',
|
|
120
|
+
title: 'plugins/plugin-navtree/components/NavTree',
|
|
120
121
|
component: NavTreeContainer,
|
|
121
122
|
render: DefaultStory,
|
|
122
123
|
decorators: [
|
|
123
|
-
|
|
124
|
+
withLayout({ layout: 'fullscreen' }),
|
|
124
125
|
withPluginManager({
|
|
125
126
|
plugins: [
|
|
126
127
|
...corePlugins(),
|
|
@@ -131,20 +132,21 @@ const meta = {
|
|
|
131
132
|
NavTreePlugin(),
|
|
132
133
|
],
|
|
133
134
|
capabilities: () => {
|
|
134
|
-
const storyStateAtom = Atom.make({ tab: 'space-0' }).pipe(Atom.keepAlive);
|
|
135
|
+
const storyStateAtom = Atom.make({ tab: 'root/space-0' }).pipe(Atom.keepAlive);
|
|
135
136
|
return [
|
|
136
137
|
Capability.contributes(StoryState, storyStateAtom),
|
|
137
138
|
Capability.contributes(AppCapabilities.AppGraphBuilder, storybookGraphBuilders()),
|
|
138
|
-
Capability.contributes(
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
139
|
+
Capability.contributes(
|
|
140
|
+
Capabilities.OperationHandler,
|
|
141
|
+
OperationHandlerSet.make(
|
|
142
|
+
Operation.withHandler(LayoutOperation.SwitchWorkspace, ({ subject }) =>
|
|
142
143
|
Effect.gen(function* () {
|
|
143
144
|
const registry: Registry.Registry = yield* Capability.get(Capabilities.AtomRegistry);
|
|
144
145
|
registry.set(storyStateAtom, { tab: subject });
|
|
145
146
|
}),
|
|
146
|
-
|
|
147
|
-
|
|
147
|
+
),
|
|
148
|
+
),
|
|
149
|
+
),
|
|
148
150
|
];
|
|
149
151
|
},
|
|
150
152
|
}),
|
|
@@ -160,7 +162,7 @@ export default meta;
|
|
|
160
162
|
type Story = StoryObj<typeof NavTreeContainer>;
|
|
161
163
|
|
|
162
164
|
export const Default: Story = {
|
|
163
|
-
play: async ({ canvasElement }) => {
|
|
165
|
+
play: async ({ canvasElement }: { canvasElement: HTMLElement }) => {
|
|
164
166
|
const canvas = within(canvasElement);
|
|
165
167
|
|
|
166
168
|
// Find the element with treegrid role and click on its parent
|