@dxos/plugin-navtree 0.8.4-main.422d1c7879 → 0.8.4-main.4668b7de9b
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/LICENSE +102 -5
- package/PLUGIN.mdl +376 -0
- package/README.md +1 -1
- package/dist/lib/neutral/CommandsDialogContent-UBGIQ5FI.mjs +112 -0
- package/dist/lib/neutral/CommandsDialogContent-UBGIQ5FI.mjs.map +7 -0
- package/dist/lib/neutral/CommandsTrigger-BH5WLMHK.mjs +27 -0
- package/dist/lib/neutral/CommandsTrigger-BH5WLMHK.mjs.map +7 -0
- package/dist/lib/neutral/NavTreeContainer-6AR4BFDD.mjs +12 -0
- package/dist/lib/neutral/NavTreeContainer-6AR4BFDD.mjs.map +7 -0
- package/dist/lib/neutral/NavTreeDocumentTitle-H3E6ZLYE.mjs +22 -0
- package/dist/lib/neutral/NavTreeDocumentTitle-H3E6ZLYE.mjs.map +7 -0
- package/dist/lib/neutral/NavTreePlugin.mjs +68 -0
- package/dist/lib/neutral/NavTreePlugin.mjs.map +7 -0
- package/dist/lib/neutral/NavTreePlugin.node.mjs +18 -0
- package/dist/lib/neutral/NavTreePlugin.node.mjs.map +7 -0
- package/dist/lib/neutral/NavTreePlugin.workerd.mjs +16 -0
- package/dist/lib/neutral/NavTreePlugin.workerd.mjs.map +7 -0
- package/dist/lib/neutral/app-graph-builder-Z347LKSF.mjs +42 -0
- package/dist/lib/neutral/app-graph-builder-Z347LKSF.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +17 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/chunk-5OPDKH6B.mjs +273 -0
- package/dist/lib/neutral/chunk-5OPDKH6B.mjs.map +7 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/neutral/chunk-JOSNCOV4.mjs +79 -0
- package/dist/lib/neutral/chunk-JOSNCOV4.mjs.map +7 -0
- package/dist/lib/neutral/chunk-MDGKDQMZ.mjs +37 -0
- package/dist/lib/neutral/chunk-MDGKDQMZ.mjs.map +7 -0
- package/dist/lib/neutral/chunk-T7QS2EFI.mjs +8 -0
- package/dist/lib/neutral/chunk-T7QS2EFI.mjs.map +7 -0
- package/dist/lib/neutral/chunk-ZSWYB7JW.mjs +27 -0
- package/dist/lib/neutral/chunk-ZSWYB7JW.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +807 -0
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +20 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/neutral/expose-26FV4W5D.mjs +38 -0
- package/dist/lib/neutral/expose-26FV4W5D.mjs.map +7 -0
- package/dist/lib/neutral/hooks/index.mjs +178 -0
- package/dist/lib/neutral/hooks/index.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +34 -0
- package/dist/lib/neutral/index.mjs.map +7 -0
- package/dist/lib/neutral/keyboard-EJ65BVTC.mjs +56 -0
- package/dist/lib/neutral/keyboard-EJ65BVTC.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +12 -0
- package/dist/lib/neutral/meta.mjs.map +7 -0
- package/dist/lib/neutral/operation-handler-ORDOJUL2.mjs +13 -0
- package/dist/lib/neutral/operation-handler-ORDOJUL2.mjs.map +7 -0
- package/dist/lib/neutral/operations/index.mjs +8 -0
- package/dist/lib/neutral/operations/index.mjs.map +7 -0
- package/dist/lib/neutral/plugin.mjs +16 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/react-surface-Q5XMAG7Z.mjs +50 -0
- package/dist/lib/neutral/react-surface-Q5XMAG7Z.mjs.map +7 -0
- package/dist/lib/neutral/state-VVITVXWM.mjs +127 -0
- package/dist/lib/neutral/state-VVITVXWM.mjs.map +7 -0
- package/dist/lib/neutral/testing/index.mjs +439 -0
- package/dist/lib/neutral/testing/index.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +23 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +10 -0
- package/dist/lib/neutral/types/index.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/NavTreePlugin.workerd.d.ts +4 -0
- package/dist/types/src/NavTreePlugin.workerd.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +2 -2
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/keyboard.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/state.d.ts +2 -2
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/components/NavTree/NavTree.stories.d.ts +8 -9
- package/dist/types/src/components/NavTree/NavTree.stories.d.ts.map +1 -1
- package/dist/types/src/components/NavTreeItem/NavTreeItemAction.d.ts +2 -2
- 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 +0 -1
- package/dist/types/src/components/types.d.ts.map +1 -1
- package/dist/types/src/containers/CommandsDialogContent/CommandsDialogContent.stories.d.ts +8 -9
- package/dist/types/src/containers/CommandsDialogContent/CommandsDialogContent.stories.d.ts.map +1 -1
- package/dist/types/src/containers/NavTreeContainer/NavTreeContainer.d.ts.map +1 -1
- package/dist/types/src/containers/NavTreeDocumentTitle/NavTreeDocumentTitle.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 +6 -0
- 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.map +1 -1
- package/dist/types/src/hooks/useNavTreeState.d.ts +1 -5
- package/dist/types/src/hooks/useNavTreeState.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 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/expose.d.ts +1 -1
- package/dist/types/src/operations/expose.d.ts.map +1 -1
- package/dist/types/src/operations/index.d.ts +1 -1
- package/dist/types/src/operations/index.d.ts.map +1 -1
- package/dist/types/src/plugin.d.ts +4 -0
- package/dist/types/src/plugin.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 -10
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/NavTreeCapabilities.d.ts +13 -0
- package/dist/types/src/types/NavTreeCapabilities.d.ts.map +1 -0
- package/dist/types/src/types/NavTreeEvents.d.ts +3 -0
- package/dist/types/src/types/NavTreeEvents.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +2 -2
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +4 -0
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/src/util.d.ts +1 -1
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +104 -51
- package/src/NavTreePlugin.node.ts +17 -0
- package/src/NavTreePlugin.test.ts +27 -0
- package/src/NavTreePlugin.tsx +10 -22
- package/src/NavTreePlugin.workerd.ts +16 -0
- package/src/capabilities/app-graph-builder.ts +1 -1
- package/src/capabilities/index.ts +1 -1
- package/src/capabilities/operation-handler.ts +1 -1
- package/src/capabilities/react-surface.tsx +3 -3
- package/src/capabilities/state.ts +12 -8
- package/src/components/NavTree/NavTree.stories.tsx +8 -10
- package/src/components/NavTree/NavTree.tsx +2 -2
- package/src/components/NavTreeItem/NavTreeItemAction.stories.tsx +2 -2
- package/src/components/NavTreeItem/NavTreeItemAction.tsx +12 -12
- package/src/components/NavTreeItem/NavTreeItemColumns.tsx +17 -60
- package/src/components/Sidebar/L0Menu.tsx +17 -11
- package/src/components/Sidebar/L1Panel.tsx +87 -168
- package/src/components/types.ts +0 -1
- package/src/containers/CommandsDialogContent/CommandsDialogContent.stories.tsx +2 -1
- package/src/containers/NavTreeContainer/NavTreeContainer.tsx +0 -9
- package/src/experimental/Tree.tsx +2 -2
- package/src/hooks/useActions.ts +10 -0
- package/src/hooks/useNavTreeModel.ts +3 -1
- package/src/hooks/useNavTreeState.ts +1 -8
- package/src/index.ts +1 -2
- package/src/meta.ts +22 -7
- package/src/operations/expose.ts +1 -1
- package/src/operations/index.ts +1 -1
- package/src/plugin.ts +11 -0
- package/src/testing/app-graph-builder.ts +7 -5
- package/src/testing/generator.ts +2 -7
- package/src/translations.ts +0 -1
- package/src/types/NavTreeCapabilities.ts +21 -0
- package/src/types/{events.ts → NavTreeEvents.ts} +3 -3
- package/src/types/index.ts +3 -2
- package/src/types/schema.ts +4 -0
- package/src/util.ts +1 -1
- package/src/vite-env.d.ts +10 -0
- package/dist/lib/browser/index.mjs +0 -202
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/types/src/types/capabilities.d.ts +0 -16
- package/dist/types/src/types/capabilities.d.ts.map +0 -1
- package/dist/types/src/types/events.d.ts +0 -5
- package/dist/types/src/types/events.d.ts.map +0 -1
- package/src/types/capabilities.ts +0 -21
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.4668b7de9b",
|
|
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",
|
|
@@ -8,62 +8,116 @@
|
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "https://github.com/dxos/dxos"
|
|
10
10
|
},
|
|
11
|
-
"license": "
|
|
11
|
+
"license": "FSL-1.1-Apache-2.0",
|
|
12
12
|
"author": "DXOS.org",
|
|
13
13
|
"sideEffects": true,
|
|
14
14
|
"type": "module",
|
|
15
15
|
"imports": {
|
|
16
|
-
"#capabilities":
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
"#
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
"#capabilities": {
|
|
17
|
+
"source": "./src/capabilities/index.ts",
|
|
18
|
+
"types": "./dist/types/src/capabilities/index.d.ts",
|
|
19
|
+
"default": "./dist/lib/neutral/capabilities/index.mjs"
|
|
20
|
+
},
|
|
21
|
+
"#components": {
|
|
22
|
+
"source": "./src/components/index.ts",
|
|
23
|
+
"types": "./dist/types/src/components/index.d.ts",
|
|
24
|
+
"default": "./dist/lib/neutral/components/index.mjs"
|
|
25
|
+
},
|
|
26
|
+
"#containers": {
|
|
27
|
+
"source": "./src/containers/index.ts",
|
|
28
|
+
"types": "./dist/types/src/containers/index.d.ts",
|
|
29
|
+
"default": "./dist/lib/neutral/containers/index.mjs"
|
|
30
|
+
},
|
|
31
|
+
"#hooks": {
|
|
32
|
+
"source": "./src/hooks/index.ts",
|
|
33
|
+
"types": "./dist/types/src/hooks/index.d.ts",
|
|
34
|
+
"default": "./dist/lib/neutral/hooks/index.mjs"
|
|
35
|
+
},
|
|
36
|
+
"#meta": {
|
|
37
|
+
"source": "./src/meta.ts",
|
|
38
|
+
"types": "./dist/types/src/meta.d.ts",
|
|
39
|
+
"default": "./dist/lib/neutral/meta.mjs"
|
|
40
|
+
},
|
|
41
|
+
"#operations": {
|
|
42
|
+
"source": "./src/operations/index.ts",
|
|
43
|
+
"types": "./dist/types/src/operations/index.d.ts",
|
|
44
|
+
"default": "./dist/lib/neutral/operations/index.mjs"
|
|
45
|
+
},
|
|
46
|
+
"#plugin": {
|
|
47
|
+
"source": {
|
|
48
|
+
"workerd": "./src/NavTreePlugin.workerd.ts",
|
|
49
|
+
"node": "./src/NavTreePlugin.node.ts",
|
|
50
|
+
"default": "./src/NavTreePlugin.tsx"
|
|
51
|
+
},
|
|
52
|
+
"types": "./dist/types/src/NavTreePlugin.d.ts",
|
|
53
|
+
"workerd": "./dist/lib/neutral/NavTreePlugin.workerd.mjs",
|
|
54
|
+
"node": "./dist/lib/neutral/NavTreePlugin.node.mjs",
|
|
55
|
+
"default": "./dist/lib/neutral/NavTreePlugin.mjs"
|
|
56
|
+
},
|
|
57
|
+
"#testing": {
|
|
58
|
+
"source": "./src/testing/index.ts",
|
|
59
|
+
"types": "./dist/types/src/testing/index.d.ts",
|
|
60
|
+
"default": "./dist/lib/neutral/testing/index.mjs"
|
|
61
|
+
},
|
|
62
|
+
"#translations": {
|
|
63
|
+
"source": "./src/translations.ts",
|
|
64
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
65
|
+
"default": "./dist/lib/neutral/translations.mjs"
|
|
66
|
+
},
|
|
67
|
+
"#types": {
|
|
68
|
+
"source": "./src/types/index.ts",
|
|
69
|
+
"types": "./dist/types/src/types/index.d.ts",
|
|
70
|
+
"default": "./dist/lib/neutral/types/index.mjs"
|
|
71
|
+
}
|
|
24
72
|
},
|
|
25
73
|
"exports": {
|
|
26
74
|
".": {
|
|
27
75
|
"source": "./src/index.ts",
|
|
28
76
|
"types": "./dist/types/src/index.d.ts",
|
|
29
|
-
"
|
|
77
|
+
"default": "./dist/lib/neutral/index.mjs"
|
|
78
|
+
},
|
|
79
|
+
"./assets/PLUGIN.mdl": "./PLUGIN.mdl",
|
|
80
|
+
"./plugin": {
|
|
81
|
+
"source": "./src/plugin.ts",
|
|
82
|
+
"types": "./dist/types/src/plugin.d.ts",
|
|
83
|
+
"default": "./dist/lib/neutral/plugin.mjs"
|
|
84
|
+
},
|
|
85
|
+
"./translations": {
|
|
86
|
+
"source": "./src/translations.ts",
|
|
87
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
88
|
+
"default": "./dist/lib/neutral/translations.mjs"
|
|
30
89
|
}
|
|
31
90
|
},
|
|
32
91
|
"types": "dist/types/src/index.d.ts",
|
|
33
92
|
"files": [
|
|
34
93
|
"dist",
|
|
35
|
-
"src"
|
|
94
|
+
"src",
|
|
95
|
+
"PLUGIN.mdl"
|
|
36
96
|
],
|
|
37
97
|
"dependencies": {
|
|
38
98
|
"@atlaskit/pragmatic-drag-and-drop": "1.7.7",
|
|
39
99
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "1.1.0",
|
|
40
|
-
"@
|
|
41
|
-
"@
|
|
42
|
-
"
|
|
43
|
-
"@dxos/
|
|
44
|
-
"@dxos/
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/
|
|
51
|
-
"@dxos/
|
|
52
|
-
"@dxos/
|
|
53
|
-
"@dxos/
|
|
54
|
-
"@dxos/
|
|
55
|
-
"@dxos/
|
|
56
|
-
"@dxos/
|
|
57
|
-
"@dxos/react-
|
|
58
|
-
"@dxos/
|
|
59
|
-
"@dxos/
|
|
60
|
-
"@dxos/react-ui-
|
|
61
|
-
"@dxos/react-ui-list": "0.8.4-main.422d1c7879",
|
|
62
|
-
"@dxos/react-ui-search": "0.8.4-main.422d1c7879",
|
|
63
|
-
"@dxos/react-ui-tabs": "0.8.4-main.422d1c7879",
|
|
64
|
-
"@dxos/react-ui-stack": "0.8.4-main.422d1c7879",
|
|
65
|
-
"@dxos/util": "0.8.4-main.422d1c7879",
|
|
66
|
-
"@dxos/react-ui-mosaic": "0.8.4-main.422d1c7879"
|
|
100
|
+
"@dxos/app-framework": "0.8.4-main.4668b7de9b",
|
|
101
|
+
"@dxos/app-graph": "0.8.4-main.4668b7de9b",
|
|
102
|
+
"@dxos/app-toolkit": "0.8.4-main.4668b7de9b",
|
|
103
|
+
"@dxos/compute": "0.8.4-main.4668b7de9b",
|
|
104
|
+
"@dxos/async": "0.8.4-main.4668b7de9b",
|
|
105
|
+
"@dxos/debug": "0.8.4-main.4668b7de9b",
|
|
106
|
+
"@dxos/echo": "0.8.4-main.4668b7de9b",
|
|
107
|
+
"@dxos/keyboard": "0.8.4-main.4668b7de9b",
|
|
108
|
+
"@dxos/keys": "0.8.4-main.4668b7de9b",
|
|
109
|
+
"@dxos/lit-ui": "0.8.4-main.4668b7de9b",
|
|
110
|
+
"@dxos/log": "0.8.4-main.4668b7de9b",
|
|
111
|
+
"@dxos/plugin-deck": "0.8.4-main.4668b7de9b",
|
|
112
|
+
"@dxos/plugin-graph": "0.8.4-main.4668b7de9b",
|
|
113
|
+
"@dxos/random": "0.8.4-main.4668b7de9b",
|
|
114
|
+
"@dxos/react-ui-search": "0.8.4-main.4668b7de9b",
|
|
115
|
+
"@dxos/react-ui-menu": "0.8.4-main.4668b7de9b",
|
|
116
|
+
"@dxos/react-ui-stack": "0.8.4-main.4668b7de9b",
|
|
117
|
+
"@dxos/react-ui-tabs": "0.8.4-main.4668b7de9b",
|
|
118
|
+
"@dxos/util": "0.8.4-main.4668b7de9b",
|
|
119
|
+
"@dxos/react-ui-list": "0.8.4-main.4668b7de9b",
|
|
120
|
+
"@dxos/react-ui-attention": "0.8.4-main.4668b7de9b"
|
|
67
121
|
},
|
|
68
122
|
"devDependencies": {
|
|
69
123
|
"@effect-atom/atom-react": "^0.5.0",
|
|
@@ -73,16 +127,15 @@
|
|
|
73
127
|
"effect": "3.20.0",
|
|
74
128
|
"react": "~19.2.3",
|
|
75
129
|
"react-dom": "~19.2.3",
|
|
76
|
-
"vite": "^
|
|
77
|
-
"@dxos/plugin-attention": "0.8.4-main.
|
|
78
|
-
"@dxos/plugin-
|
|
79
|
-
"@dxos/plugin-
|
|
80
|
-
"@dxos/
|
|
81
|
-
"@dxos/
|
|
82
|
-
"@dxos/
|
|
83
|
-
"@dxos/
|
|
84
|
-
"@dxos/storybook-utils": "0.8.4-main.
|
|
85
|
-
"@dxos/ui-theme": "0.8.4-main.422d1c7879"
|
|
130
|
+
"vite": "^8.0.14",
|
|
131
|
+
"@dxos/plugin-attention": "0.8.4-main.4668b7de9b",
|
|
132
|
+
"@dxos/plugin-testing": "0.8.4-main.4668b7de9b",
|
|
133
|
+
"@dxos/plugin-client": "0.8.4-main.4668b7de9b",
|
|
134
|
+
"@dxos/plugin-theme": "0.8.4-main.4668b7de9b",
|
|
135
|
+
"@dxos/react-ui": "0.8.4-main.4668b7de9b",
|
|
136
|
+
"@dxos/plugin-space": "0.8.4-main.4668b7de9b",
|
|
137
|
+
"@dxos/ui-theme": "0.8.4-main.4668b7de9b",
|
|
138
|
+
"@dxos/storybook-utils": "0.8.4-main.4668b7de9b"
|
|
86
139
|
},
|
|
87
140
|
"peerDependencies": {
|
|
88
141
|
"@effect-atom/atom-react": "^0.5.0",
|
|
@@ -90,8 +143,8 @@
|
|
|
90
143
|
"effect": "3.20.0",
|
|
91
144
|
"react": "~19.2.3",
|
|
92
145
|
"react-dom": "~19.2.3",
|
|
93
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
94
|
-
"@dxos/ui-theme": "0.8.4-main.
|
|
146
|
+
"@dxos/react-ui": "0.8.4-main.4668b7de9b",
|
|
147
|
+
"@dxos/ui-theme": "0.8.4-main.4668b7de9b"
|
|
95
148
|
},
|
|
96
149
|
"publishConfig": {
|
|
97
150
|
"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.SetupProcessManager);
|
|
25
|
+
expect(harness.manager.getActive()).toContain(moduleId('OperationHandler'));
|
|
26
|
+
});
|
|
27
|
+
});
|
package/src/NavTreePlugin.tsx
CHANGED
|
@@ -7,34 +7,17 @@ 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
11
|
import { AppGraphBuilder, Keyboard, OperationHandler, ReactSurface, State } from '#capabilities';
|
|
13
|
-
import { NODE_TYPE } from '#containers';
|
|
14
12
|
import { meta } from '#meta';
|
|
13
|
+
import { translations } from '#translations';
|
|
15
14
|
import { NavTreeEvents } from '#types';
|
|
16
15
|
|
|
17
|
-
|
|
16
|
+
// eslint-disable-next-line import/no-relative-packages
|
|
17
|
+
import pluginSpec from '../PLUGIN.mdl?raw';
|
|
18
18
|
|
|
19
19
|
export const NavTreePlugin = Plugin.define(meta).pipe(
|
|
20
20
|
AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),
|
|
21
|
-
AppPlugin.addMetadataModule({
|
|
22
|
-
metadata: {
|
|
23
|
-
id: NODE_TYPE,
|
|
24
|
-
metadata: {
|
|
25
|
-
parse: ({ item }: TreeData, type: string) => {
|
|
26
|
-
switch (type) {
|
|
27
|
-
case 'node':
|
|
28
|
-
return item;
|
|
29
|
-
case 'object':
|
|
30
|
-
return item.data;
|
|
31
|
-
case 'view-object':
|
|
32
|
-
return { id: `${item.id}-view`, object: item.data };
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
}),
|
|
38
21
|
AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
|
|
39
22
|
AppPlugin.addSurfaceModule({ activate: ReactSurface }),
|
|
40
23
|
AppPlugin.addTranslationsModule({ translations }),
|
|
@@ -47,7 +30,7 @@ export const NavTreePlugin = Plugin.define(meta).pipe(
|
|
|
47
30
|
Plugin.addModule({
|
|
48
31
|
id: 'expose',
|
|
49
32
|
activatesOn: ActivationEvent.allOf(
|
|
50
|
-
ActivationEvents.
|
|
33
|
+
ActivationEvents.ProcessManagerReady,
|
|
51
34
|
AppActivationEvents.AppGraphReady,
|
|
52
35
|
AppActivationEvents.LayoutReady,
|
|
53
36
|
NavTreeEvents.StateReady,
|
|
@@ -69,8 +52,13 @@ export const NavTreePlugin = Plugin.define(meta).pipe(
|
|
|
69
52
|
}),
|
|
70
53
|
Plugin.addModule({
|
|
71
54
|
id: 'keyboard',
|
|
72
|
-
activatesOn: ActivationEvent.allOf(AppActivationEvents.AppGraphReady, ActivationEvents.
|
|
55
|
+
activatesOn: ActivationEvent.allOf(AppActivationEvents.AppGraphReady, ActivationEvents.ProcessManagerReady),
|
|
73
56
|
activate: Keyboard,
|
|
74
57
|
}),
|
|
58
|
+
AppPlugin.addPluginAssetModule({
|
|
59
|
+
asset: { pluginId: meta.id, path: 'PLUGIN.mdl', content: pluginSpec, mimeType: 'application/x-mdl' },
|
|
60
|
+
}),
|
|
75
61
|
Plugin.make,
|
|
76
62
|
);
|
|
63
|
+
|
|
64
|
+
export default NavTreePlugin;
|
|
@@ -0,0 +1,16 @@
|
|
|
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 { OperationHandler } from '#capabilities';
|
|
9
|
+
import { meta } from '#meta';
|
|
10
|
+
|
|
11
|
+
export const NavTreePlugin = Plugin.define(meta).pipe(
|
|
12
|
+
AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
|
|
13
|
+
Plugin.make,
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
export default NavTreePlugin;
|
|
@@ -6,7 +6,7 @@ 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/
|
|
9
|
+
import { Operation } from '@dxos/compute';
|
|
10
10
|
import { GraphBuilder, Node, NodeMatcher } from '@dxos/plugin-graph';
|
|
11
11
|
|
|
12
12
|
import { COMMANDS_DIALOG, meta } from '#meta';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Capability } from '@dxos/app-framework';
|
|
6
|
-
import { OperationHandlerSet } from '@dxos/
|
|
6
|
+
import { OperationHandlerSet } from '@dxos/compute';
|
|
7
7
|
|
|
8
8
|
export const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));
|
|
9
9
|
export const Keyboard = Capability.lazy('Keyboard', () => import('./keyboard'));
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
7
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
|
-
import type { OperationHandlerSet } from '@dxos/
|
|
8
|
+
import type { OperationHandlerSet } from '@dxos/compute';
|
|
9
9
|
|
|
10
10
|
import { NavTreeOperationHandlerSet } from '#operations';
|
|
11
11
|
|
|
@@ -36,16 +36,16 @@ export default Capability.makeModule(() =>
|
|
|
36
36
|
},
|
|
37
37
|
}),
|
|
38
38
|
Surface.create({
|
|
39
|
-
id: '
|
|
39
|
+
id: 'documentTitle',
|
|
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: 'searchInput',
|
|
47
47
|
role: 'search-input',
|
|
48
|
-
position: '
|
|
48
|
+
position: 'last',
|
|
49
49
|
component: () => <CommandsTrigger />,
|
|
50
50
|
}),
|
|
51
51
|
]),
|
|
@@ -11,21 +11,23 @@ import { Graph, Node } from '@dxos/plugin-graph';
|
|
|
11
11
|
import { Path } from '@dxos/react-ui-list';
|
|
12
12
|
|
|
13
13
|
import { meta } from '#meta';
|
|
14
|
-
import {
|
|
14
|
+
import { NavTreeCapabilities } from '#types';
|
|
15
15
|
|
|
16
16
|
const KEY = `${meta.id}.state.v1`;
|
|
17
17
|
|
|
18
18
|
/** Default item state for new entries. */
|
|
19
|
-
const defaultItemState:
|
|
19
|
+
const defaultItemState: NavTreeCapabilities.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;
|
|
23
23
|
|
|
24
24
|
/** Default state entries for initial tree structure. */
|
|
25
25
|
// TODO(thure): Initialize these dynamically.
|
|
26
|
-
const defaultStateEntries: [string,
|
|
26
|
+
const defaultStateEntries: [string, NavTreeCapabilities.NavTreeItemState][] = [
|
|
27
|
+
['root', { open: true, current: false }],
|
|
28
|
+
];
|
|
27
29
|
|
|
28
|
-
const getInitialState = (): Map<string,
|
|
30
|
+
const getInitialState = (): Map<string, NavTreeCapabilities.NavTreeItemState> => {
|
|
29
31
|
const stringified = localStorage.getItem(KEY);
|
|
30
32
|
if (!stringified) {
|
|
31
33
|
return new Map(defaultStateEntries);
|
|
@@ -51,10 +53,12 @@ export default Capability.makeModule(
|
|
|
51
53
|
// keepAlive prevents atoms from being garbage collected when components unmount,
|
|
52
54
|
// ensuring state is preserved across deletion/restoration cycles.
|
|
53
55
|
const itemAtomFamily = Atom.family((pathString: string) =>
|
|
54
|
-
Atom.make<
|
|
56
|
+
Atom.make<NavTreeCapabilities.NavTreeItemState>(backingState.get(pathString) ?? { ...defaultItemState }).pipe(
|
|
57
|
+
Atom.keepAlive,
|
|
58
|
+
),
|
|
55
59
|
);
|
|
56
60
|
|
|
57
|
-
const getItemAtom = (path: string[]): Atom.Atom<
|
|
61
|
+
const getItemAtom = (path: string[]): Atom.Atom<NavTreeCapabilities.NavTreeItemState> => {
|
|
58
62
|
const pathString = Path.create(...path);
|
|
59
63
|
if (!backingState.has(pathString)) {
|
|
60
64
|
backingState.set(pathString, { ...defaultItemState });
|
|
@@ -62,11 +66,11 @@ export default Capability.makeModule(
|
|
|
62
66
|
return itemAtomFamily(pathString);
|
|
63
67
|
};
|
|
64
68
|
|
|
65
|
-
const getItem = (path: string[]):
|
|
69
|
+
const getItem = (path: string[]): NavTreeCapabilities.NavTreeItemState => {
|
|
66
70
|
return registry.get(getItemAtom(path));
|
|
67
71
|
};
|
|
68
72
|
|
|
69
|
-
const setItem = (path: string[], key: 'open' | 'current'
|
|
73
|
+
const setItem = (path: string[], key: 'open' | 'current', next: boolean) => {
|
|
70
74
|
const pathString = Path.create(...path);
|
|
71
75
|
const atom = itemAtomFamily(pathString);
|
|
72
76
|
const currentValue = registry.get(atom);
|
|
@@ -12,7 +12,7 @@ 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 { Operation, OperationHandlerSet } from '@dxos/
|
|
15
|
+
import { Operation, OperationHandlerSet } from '@dxos/compute';
|
|
16
16
|
import { StorybookPlugin, corePlugins } from '@dxos/plugin-testing';
|
|
17
17
|
import { random } from '@dxos/random';
|
|
18
18
|
import { IconButton, Input, Main, Toolbar } from '@dxos/react-ui';
|
|
@@ -23,27 +23,23 @@ import { mx } from '@dxos/ui-theme';
|
|
|
23
23
|
|
|
24
24
|
import { NavTreeContainer } from '#containers';
|
|
25
25
|
import { storybookGraphBuilders } from '#testing';
|
|
26
|
+
import { translations } from '#translations';
|
|
26
27
|
|
|
27
28
|
import { NavTreePlugin } from '../../NavTreePlugin';
|
|
28
|
-
import { translations } from '../../translations';
|
|
29
29
|
|
|
30
30
|
random.seed(1234);
|
|
31
31
|
|
|
32
32
|
const StoryState = Capability.make<Atom.Atom<{ tab: string }>>('story-state');
|
|
33
33
|
|
|
34
|
-
// TODO(burdon): Fix outline (e.g., button in sidebar nav is clipped when focused).
|
|
35
|
-
// TODO(burdon): Consider similar containment of: Table, Sheet, Kanban Column, Form, etc.
|
|
36
|
-
|
|
37
34
|
const container = 'flex flex-col grow gap-2 p-4 rounded-md';
|
|
38
35
|
|
|
39
|
-
// TODO(burdon): Factor out PlankHeader.
|
|
40
36
|
const StoryPlankHeading = ({ attendableId }: { attendableId: string }) => {
|
|
41
37
|
const { hasAttention } = useAttention(attendableId);
|
|
42
38
|
console.log('hasAttention', hasAttention);
|
|
43
39
|
return (
|
|
44
40
|
<div className='flex p-1 items-center border-b border-separator'>
|
|
45
41
|
<IconButton
|
|
46
|
-
density='
|
|
42
|
+
density='lg'
|
|
47
43
|
icon='ph--circle--regular'
|
|
48
44
|
label='Test'
|
|
49
45
|
iconOnly
|
|
@@ -82,7 +78,7 @@ const StoryPlank = ({ attendableId }: { attendableId: string }) => {
|
|
|
82
78
|
<Toolbar.Button>Test</Toolbar.Button>
|
|
83
79
|
</Toolbar.Root>
|
|
84
80
|
|
|
85
|
-
<div className={mx(container, 'm-2 bg-
|
|
81
|
+
<div className={mx(container, 'm-2 bg-current-surface')}>
|
|
86
82
|
<Input.Root>
|
|
87
83
|
<Input.Label>Level 1 (group)</Input.Label>
|
|
88
84
|
</Input.Root>
|
|
@@ -165,8 +161,10 @@ export const Default: Story = {
|
|
|
165
161
|
play: async ({ canvasElement }: { canvasElement: HTMLElement }) => {
|
|
166
162
|
const canvas = within(canvasElement);
|
|
167
163
|
|
|
168
|
-
//
|
|
169
|
-
|
|
164
|
+
// Plugin startup is async; the treegrid only appears after the Startup event
|
|
165
|
+
// fires and the graph is built. Use a generous timeout so slower CI runners
|
|
166
|
+
// don't race the default 1 s limit.
|
|
167
|
+
const treegridElement = await canvas.findByRole('treegrid', {}, { timeout: 10000 });
|
|
170
168
|
const treegridParent = treegridElement.parentElement;
|
|
171
169
|
if (treegridParent) {
|
|
172
170
|
await userEvent.click(treegridParent);
|
|
@@ -82,10 +82,10 @@ const useTopLevelNavItems = (root?: Node.Node) => {
|
|
|
82
82
|
].toSorted((a, b) => byPosition(a.properties, b.properties));
|
|
83
83
|
|
|
84
84
|
return {
|
|
85
|
-
topLevelActions,
|
|
86
|
-
l0Items: topLevelWorkspaces,
|
|
87
85
|
pinnedItems,
|
|
86
|
+
topLevelActions,
|
|
88
87
|
userAccountItem,
|
|
88
|
+
l0Items: topLevelWorkspaces,
|
|
89
89
|
};
|
|
90
90
|
}, [rootActions, rootOutboundItems]);
|
|
91
91
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
6
|
import * as Effect from 'effect/Effect';
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { ProcessManagerPlugin } 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';
|
|
@@ -52,7 +52,7 @@ const meta = {
|
|
|
52
52
|
} satisfies Partial<NavTreeItemActionMenuProps>,
|
|
53
53
|
decorators: [
|
|
54
54
|
withPluginManager({
|
|
55
|
-
plugins: [...corePlugins(),
|
|
55
|
+
plugins: [...corePlugins(), ProcessManagerPlugin()],
|
|
56
56
|
}),
|
|
57
57
|
],
|
|
58
58
|
parameters: {
|
|
@@ -7,22 +7,23 @@ import React, { useCallback } from 'react';
|
|
|
7
7
|
import { type Node } from '@dxos/app-graph';
|
|
8
8
|
import { useActionRunner } from '@dxos/plugin-graph';
|
|
9
9
|
import { IconButton, toLocalizedString, useDensityContext, useTranslation } from '@dxos/react-ui';
|
|
10
|
+
import { composable, composableProps } from '@dxos/react-ui';
|
|
10
11
|
import { Menu, type MenuItem } from '@dxos/react-ui-menu';
|
|
11
|
-
import {
|
|
12
|
+
import { hoverableControlItem, hoverableOpenControlItem } from '@dxos/ui-theme';
|
|
12
13
|
|
|
13
14
|
import { meta } from '#meta';
|
|
14
15
|
import { type ActionProperties } from '#types';
|
|
15
16
|
|
|
16
|
-
const fallbackIcon = 'ph--
|
|
17
|
+
const fallbackIcon = 'ph--circle-dashed--regular';
|
|
17
18
|
|
|
18
|
-
const
|
|
19
|
+
const mdActionButtonProps = {
|
|
19
20
|
size: 4 as const,
|
|
20
|
-
density: '
|
|
21
|
+
density: 'md' as const,
|
|
21
22
|
};
|
|
22
23
|
|
|
23
|
-
const
|
|
24
|
+
const lgActionButtonProps = {
|
|
24
25
|
size: 5 as const,
|
|
25
|
-
density: '
|
|
26
|
+
density: 'lg' as const,
|
|
26
27
|
};
|
|
27
28
|
|
|
28
29
|
export type NavTreeItemActionMenuProps = ActionProperties & {
|
|
@@ -47,7 +48,7 @@ export const NavTreeItemActionDropdownMenu = composable<HTMLButtonElement, NavTr
|
|
|
47
48
|
<Menu.Root caller={caller} onAction={handleAction}>
|
|
48
49
|
<Menu.Trigger asChild>
|
|
49
50
|
<IconButton
|
|
50
|
-
{...(density === '
|
|
51
|
+
{...(density === 'lg' ? lgActionButtonProps : mdActionButtonProps)}
|
|
51
52
|
{...composableProps(props)}
|
|
52
53
|
classNames={['shrink-0 px-2 pointer-fine:px-1', hoverableControlItem, hoverableOpenControlItem]}
|
|
53
54
|
variant='ghost'
|
|
@@ -84,7 +85,7 @@ export const NavTreeItemMonolithicAction = (
|
|
|
84
85
|
const runAction = useActionRunner();
|
|
85
86
|
return (
|
|
86
87
|
<IconButton
|
|
87
|
-
{...(density === '
|
|
88
|
+
{...(density === 'lg' ? lgActionButtonProps : mdActionButtonProps)}
|
|
88
89
|
variant={variant}
|
|
89
90
|
classNames={[
|
|
90
91
|
'shrink-0',
|
|
@@ -113,7 +114,7 @@ export const NavTreeItemAction = ({
|
|
|
113
114
|
monolithic,
|
|
114
115
|
menuActions,
|
|
115
116
|
menuType,
|
|
116
|
-
parent
|
|
117
|
+
parent,
|
|
117
118
|
path,
|
|
118
119
|
...props
|
|
119
120
|
}: NavTreeItemActionMenuProps) => {
|
|
@@ -121,10 +122,9 @@ export const NavTreeItemAction = ({
|
|
|
121
122
|
|
|
122
123
|
const monolithicAction = menuActions?.length === 1 && menuActions[0];
|
|
123
124
|
const baseLabel = toLocalizedString(monolithicAction ? monolithicAction.properties!.label : props.label, t);
|
|
124
|
-
|
|
125
125
|
return monolithic && menuActions?.length === 1 ? (
|
|
126
|
-
<NavTreeItemMonolithicAction baseLabel={baseLabel} parent={
|
|
126
|
+
<NavTreeItemMonolithicAction baseLabel={baseLabel} parent={parent} path={path} {...menuActions[0]} />
|
|
127
127
|
) : (
|
|
128
|
-
<NavTreeItemActionDropdownMenu {...props} label={baseLabel} parent={
|
|
128
|
+
<NavTreeItemActionDropdownMenu {...props} label={baseLabel} parent={parent} path={path} menuActions={menuActions} />
|
|
129
129
|
);
|
|
130
130
|
};
|