@dxos/plugin-navtree 0.8.4-main.67995b8 → 0.8.4-main.6fa680abb7
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/CommandsDialogContent-2DKIOLJL.mjs +113 -0
- package/dist/lib/browser/CommandsDialogContent-2DKIOLJL.mjs.map +7 -0
- package/dist/lib/browser/CommandsTrigger-ABODVVMP.mjs +33 -0
- package/dist/lib/browser/CommandsTrigger-ABODVVMP.mjs.map +7 -0
- package/dist/lib/browser/NavTreeContainer-TLSYS4KK.mjs +12 -0
- package/dist/lib/browser/NavTreeContainer-TLSYS4KK.mjs.map +7 -0
- package/dist/lib/browser/NavTreeDocumentTitle-L6NLLWLD.mjs +26 -0
- package/dist/lib/browser/NavTreeDocumentTitle-L6NLLWLD.mjs.map +7 -0
- package/dist/lib/browser/app-graph-builder-Z43OTNI2.mjs +44 -0
- package/dist/lib/browser/app-graph-builder-Z43OTNI2.mjs.map +7 -0
- package/dist/lib/browser/chunk-A4VDCIJC.mjs +19 -0
- package/dist/lib/browser/chunk-A4VDCIJC.mjs.map +7 -0
- package/dist/lib/browser/chunk-AYF2TX65.mjs +14 -0
- package/dist/lib/browser/chunk-AYF2TX65.mjs.map +7 -0
- package/dist/lib/browser/chunk-JT37R5HS.mjs +1468 -0
- package/dist/lib/browser/chunk-JT37R5HS.mjs.map +7 -0
- package/dist/lib/browser/chunk-KF26WA4O.mjs +23 -0
- package/dist/lib/browser/chunk-KF26WA4O.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +86 -95
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/{keyboard-QRS6WOQH.mjs → keyboard-HYGFQO7T.mjs} +25 -19
- package/dist/lib/browser/keyboard-HYGFQO7T.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operation-resolver-VDWVUII5.mjs +49 -0
- package/dist/lib/browser/operation-resolver-VDWVUII5.mjs.map +7 -0
- package/dist/lib/browser/react-surface-D2RLMV4Z.mjs +59 -0
- package/dist/lib/browser/react-surface-D2RLMV4Z.mjs.map +7 -0
- package/dist/lib/browser/state-CWMNNF7K.mjs +131 -0
- package/dist/lib/browser/state-CWMNNF7K.mjs.map +7 -0
- package/dist/types/src/NavTreePlugin.d.ts +2 -1
- package/dist/types/src/NavTreePlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +5 -105
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/keyboard/index.d.ts +3 -0
- package/dist/types/src/capabilities/keyboard/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/keyboard/keyboard.d.ts +5 -0
- package/dist/types/src/capabilities/keyboard/keyboard.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +3 -0
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +5 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/state/index.d.ts +3 -0
- package/dist/types/src/capabilities/state/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/state/state.d.ts +6 -0
- package/dist/types/src/capabilities/state/state.d.ts.map +1 -0
- package/dist/types/src/components/NavTree/NavTree.d.ts +11 -4
- package/dist/types/src/components/NavTree/NavTree.d.ts.map +1 -1
- package/dist/types/src/components/NavTree/NavTree.stories.d.ts +27 -5
- 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 +10 -8
- package/dist/types/src/components/NavTreeItem/NavTreeItemAction.d.ts.map +1 -1
- package/dist/types/src/components/NavTreeItem/NavTreeItemAction.stories.d.ts +33 -4
- package/dist/types/src/components/NavTreeItem/NavTreeItemAction.stories.d.ts.map +1 -1
- package/dist/types/src/components/NavTreeItem/NavTreeItemColumns.d.ts +1 -1
- package/dist/types/src/components/NavTreeItem/NavTreeItemColumns.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/L0Menu.d.ts +10 -5
- package/dist/types/src/components/Sidebar/L0Menu.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/L1Panel.d.ts +4 -7
- package/dist/types/src/components/Sidebar/L1Panel.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/L1Tabs.d.ts +5 -4
- 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 +8 -5
- 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 +8 -16
- package/dist/types/src/components/types.d.ts.map +1 -1
- package/dist/types/src/containers/CommandsDialogContent/CommandsDialogContent.d.ts +6 -0
- package/dist/types/src/containers/CommandsDialogContent/CommandsDialogContent.d.ts.map +1 -0
- package/dist/types/src/containers/CommandsDialogContent/index.d.ts +3 -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 +3 -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/{components → containers/NavTreeDocumentTitle}/NavTreeDocumentTitle.d.ts +1 -1
- package/dist/types/src/containers/NavTreeDocumentTitle/NavTreeDocumentTitle.d.ts.map +1 -0
- package/dist/types/src/containers/NavTreeDocumentTitle/index.d.ts +3 -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 +1 -2
- package/dist/types/src/experimental/Tree.d.ts.map +1 -1
- package/dist/types/src/experimental/Tree.stories.d.ts +23 -6
- 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 +22 -0
- package/dist/types/src/hooks/useNavTreeState.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +1 -2
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +3 -4
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/testing/app-graph-builder.d.ts +2 -3
- package/dist/types/src/testing/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/testing/generator.d.ts +5 -6
- package/dist/types/src/testing/generator.d.ts.map +1 -1
- package/dist/types/src/testing/update-state.d.ts +2 -2
- package/dist/types/src/testing/update-state.d.ts.map +1 -1
- package/dist/types/src/types/capabilities.d.ts +16 -0
- package/dist/types/src/types/capabilities.d.ts.map +1 -0
- package/dist/types/src/types/events.d.ts +5 -0
- package/dist/types/src/types/events.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +4 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/src/{types.d.ts → types/schema.d.ts} +10 -9
- package/dist/types/src/types/schema.d.ts.map +1 -0
- package/dist/types/src/util.d.ts +12 -9
- package/dist/types/src/util.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +57 -55
- package/src/NavTreePlugin.tsx +64 -84
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +42 -0
- package/src/capabilities/app-graph-builder/index.ts +7 -0
- package/src/capabilities/index.ts +5 -9
- package/src/capabilities/keyboard/index.ts +7 -0
- package/src/capabilities/keyboard/keyboard.ts +66 -0
- package/src/capabilities/operation-resolver/index.ts +7 -0
- package/src/capabilities/operation-resolver/operation-resolver.ts +45 -0
- package/src/capabilities/react-surface/index.ts +7 -0
- package/src/capabilities/react-surface/react-surface.tsx +53 -0
- package/src/capabilities/state/index.ts +7 -0
- package/src/capabilities/state/state.ts +149 -0
- package/src/components/NavTree/NavTree.stories.tsx +105 -98
- package/src/components/NavTree/NavTree.tsx +67 -32
- 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 +21 -13
- package/src/components/NavTreeItem/NavTreeItemAction.tsx +61 -37
- package/src/components/NavTreeItem/NavTreeItemColumns.tsx +68 -35
- package/src/components/Sidebar/L0Menu.tsx +170 -179
- package/src/components/Sidebar/L1Panel.tsx +252 -101
- package/src/components/Sidebar/L1Tabs.tsx +19 -33
- package/src/components/UserAccountAvatar/UserAccountAvatar.stories.tsx +9 -9
- package/src/components/UserAccountAvatar/UserAccountAvatar.tsx +20 -12
- package/src/components/index.ts +1 -3
- package/src/components/types.ts +15 -19
- package/src/containers/CommandsDialogContent/CommandsDialogContent.tsx +135 -0
- package/src/containers/CommandsDialogContent/index.ts +7 -0
- package/src/containers/CommandsTrigger/CommandsTrigger.tsx +26 -0
- package/src/containers/CommandsTrigger/index.ts +7 -0
- package/src/containers/NavTreeContainer/NavTreeContainer.tsx +271 -0
- package/src/containers/NavTreeContainer/index.ts +6 -0
- package/src/{components → containers/NavTreeDocumentTitle}/NavTreeDocumentTitle.tsx +5 -4
- package/src/containers/NavTreeDocumentTitle/index.ts +7 -0
- package/src/containers/index.ts +12 -0
- package/src/experimental/Tree.stories.tsx +78 -83
- package/src/experimental/Tree.tsx +6 -23
- 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 +42 -0
- package/src/index.ts +1 -2
- package/src/meta.ts +11 -8
- package/src/testing/app-graph-builder.ts +159 -234
- package/src/testing/generator.ts +20 -18
- package/src/testing/update-state.ts +6 -6
- package/src/types/capabilities.ts +21 -0
- package/src/types/events.ts +12 -0
- package/src/types/index.ts +7 -0
- package/src/{types.ts → types/schema.ts} +9 -8
- package/src/util.ts +26 -33
- package/dist/lib/browser/app-graph-builder-5J4LRWDX.mjs +0 -45
- package/dist/lib/browser/app-graph-builder-5J4LRWDX.mjs.map +0 -7
- package/dist/lib/browser/chunk-ERDGQTH5.mjs +0 -16
- package/dist/lib/browser/chunk-ERDGQTH5.mjs.map +0 -7
- package/dist/lib/browser/chunk-WCARAZ7J.mjs +0 -15
- package/dist/lib/browser/chunk-WCARAZ7J.mjs.map +0 -7
- package/dist/lib/browser/chunk-WEMCSQI7.mjs +0 -1469
- package/dist/lib/browser/chunk-WEMCSQI7.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-3XYN2CBU.mjs +0 -47
- package/dist/lib/browser/intent-resolver-3XYN2CBU.mjs.map +0 -7
- package/dist/lib/browser/keyboard-QRS6WOQH.mjs.map +0 -7
- package/dist/lib/browser/react-surface-JSJ5SQX5.mjs +0 -51
- package/dist/lib/browser/react-surface-JSJ5SQX5.mjs.map +0 -7
- package/dist/lib/browser/state-54DY3DOY.mjs +0 -117
- package/dist/lib/browser/state-54DY3DOY.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/capabilities.d.ts +0 -21
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/keyboard.d.ts +0 -4
- package/dist/types/src/capabilities/keyboard.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface.d.ts +0 -4
- package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/state.d.ts +0 -20
- package/dist/types/src/capabilities/state.d.ts.map +0 -1
- package/dist/types/src/components/CommandsDialog/CommandsDialog.d.ts +0 -5
- 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 -9
- 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/events.d.ts +0 -4
- package/dist/types/src/events.d.ts.map +0 -1
- package/dist/types/src/hooks.d.ts +0 -3
- package/dist/types/src/hooks.d.ts.map +0 -1
- package/dist/types/src/types.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder.ts +0 -52
- package/src/capabilities/capabilities.ts +0 -20
- package/src/capabilities/intent-resolver.ts +0 -37
- package/src/capabilities/keyboard.ts +0 -59
- package/src/capabilities/react-surface.tsx +0 -45
- package/src/capabilities/state.ts +0 -104
- package/src/components/CommandsDialog/CommandsDialog.tsx +0 -118
- package/src/components/CommandsDialog/CommandsTrigger.tsx +0 -35
- package/src/components/CommandsDialog/index.ts +0 -6
- package/src/components/NavTreeContainer.tsx +0 -313
- package/src/events.ts +0 -11
- package/src/hooks.ts +0 -21
- /package/dist/types/src/{components/CommandsDialog → containers/CommandsTrigger}/CommandsTrigger.d.ts +0 -0
package/package.json
CHANGED
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-navtree",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.6fa680abb7",
|
|
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",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/dxos/dxos"
|
|
10
|
+
},
|
|
7
11
|
"license": "MIT",
|
|
8
12
|
"author": "DXOS.org",
|
|
9
13
|
"sideEffects": true,
|
|
10
14
|
"type": "module",
|
|
11
15
|
"exports": {
|
|
12
16
|
".": {
|
|
17
|
+
"source": "./src/index.ts",
|
|
13
18
|
"types": "./dist/types/src/index.d.ts",
|
|
14
|
-
"browser": "./dist/lib/browser/index.mjs"
|
|
15
|
-
"source": "./src/index.ts"
|
|
19
|
+
"browser": "./dist/lib/browser/index.mjs"
|
|
16
20
|
}
|
|
17
21
|
},
|
|
18
22
|
"types": "dist/types/src/index.d.ts",
|
|
@@ -24,65 +28,63 @@
|
|
|
24
28
|
"src"
|
|
25
29
|
],
|
|
26
30
|
"dependencies": {
|
|
27
|
-
"@atlaskit/pragmatic-drag-and-drop": "
|
|
28
|
-
"@atlaskit/pragmatic-drag-and-drop-hitbox": "
|
|
29
|
-
"@preact-signals/safe-react": "^0.9.0",
|
|
30
|
-
"@preact/signals-core": "^1.9.0",
|
|
31
|
+
"@atlaskit/pragmatic-drag-and-drop": "1.7.7",
|
|
32
|
+
"@atlaskit/pragmatic-drag-and-drop-hitbox": "1.1.0",
|
|
31
33
|
"@radix-ui/react-dismissable-layer": "1.1.5",
|
|
32
34
|
"@radix-ui/react-use-controllable-state": "1.1.0",
|
|
33
35
|
"date-fns": "^3.3.1",
|
|
34
|
-
"
|
|
35
|
-
"@dxos/
|
|
36
|
-
"@dxos/app-graph": "0.8.4-main.
|
|
37
|
-
"@dxos/
|
|
38
|
-
"@dxos/debug": "0.8.4-main.
|
|
39
|
-
"@dxos/echo": "0.8.4-main.
|
|
40
|
-
"@dxos/
|
|
41
|
-
"@dxos/
|
|
42
|
-
"@dxos/
|
|
43
|
-
"@dxos/
|
|
44
|
-
"@dxos/
|
|
45
|
-
"@dxos/log": "0.8.4-main.
|
|
46
|
-
"@dxos/plugin-
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/react-ui-
|
|
51
|
-
"@dxos/react-ui-list": "0.8.4-main.
|
|
52
|
-
"@dxos/react-
|
|
53
|
-
"@dxos/react-ui-
|
|
54
|
-
"@dxos/react-ui-
|
|
55
|
-
"@dxos/react-ui-
|
|
56
|
-
"@dxos/
|
|
57
|
-
"@dxos/util": "0.8.4-main.
|
|
36
|
+
"@dxos/app-framework": "0.8.4-main.6fa680abb7",
|
|
37
|
+
"@dxos/async": "0.8.4-main.6fa680abb7",
|
|
38
|
+
"@dxos/app-graph": "0.8.4-main.6fa680abb7",
|
|
39
|
+
"@dxos/app-toolkit": "0.8.4-main.6fa680abb7",
|
|
40
|
+
"@dxos/debug": "0.8.4-main.6fa680abb7",
|
|
41
|
+
"@dxos/echo": "0.8.4-main.6fa680abb7",
|
|
42
|
+
"@dxos/keyboard": "0.8.4-main.6fa680abb7",
|
|
43
|
+
"@dxos/lit-ui": "0.8.4-main.6fa680abb7",
|
|
44
|
+
"@dxos/invariant": "0.8.4-main.6fa680abb7",
|
|
45
|
+
"@dxos/operation": "0.8.4-main.6fa680abb7",
|
|
46
|
+
"@dxos/plugin-deck": "0.8.4-main.6fa680abb7",
|
|
47
|
+
"@dxos/log": "0.8.4-main.6fa680abb7",
|
|
48
|
+
"@dxos/plugin-graph": "0.8.4-main.6fa680abb7",
|
|
49
|
+
"@dxos/react-client": "0.8.4-main.6fa680abb7",
|
|
50
|
+
"@dxos/protocols": "0.8.4-main.6fa680abb7",
|
|
51
|
+
"@dxos/react-ui-attention": "0.8.4-main.6fa680abb7",
|
|
52
|
+
"@dxos/react-ui-menu": "0.8.4-main.6fa680abb7",
|
|
53
|
+
"@dxos/react-ui-list": "0.8.4-main.6fa680abb7",
|
|
54
|
+
"@dxos/react-ui-mosaic": "0.8.4-main.6fa680abb7",
|
|
55
|
+
"@dxos/react-ui-searchlist": "0.8.4-main.6fa680abb7",
|
|
56
|
+
"@dxos/react-ui-stack": "0.8.4-main.6fa680abb7",
|
|
57
|
+
"@dxos/react-ui-tabs": "0.8.4-main.6fa680abb7",
|
|
58
|
+
"@dxos/plugin-observability": "0.8.4-main.6fa680abb7",
|
|
59
|
+
"@dxos/util": "0.8.4-main.6fa680abb7"
|
|
58
60
|
},
|
|
59
61
|
"devDependencies": {
|
|
60
|
-
"@effect-
|
|
61
|
-
"@effect/platform": "0.
|
|
62
|
-
"@types/react": "~
|
|
63
|
-
"@types/react-dom": "~
|
|
64
|
-
"
|
|
65
|
-
"react
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"@dxos/plugin-client": "0.8.4-main.
|
|
69
|
-
"@dxos/plugin-attention": "0.8.4-main.
|
|
70
|
-
"@dxos/plugin-
|
|
71
|
-
"@dxos/plugin-
|
|
72
|
-
"@dxos/
|
|
73
|
-
"@dxos/
|
|
74
|
-
"@dxos/
|
|
75
|
-
"@dxos/
|
|
76
|
-
"@dxos/
|
|
62
|
+
"@effect-atom/atom-react": "^0.5.0",
|
|
63
|
+
"@effect/platform": "0.94.4",
|
|
64
|
+
"@types/react": "~19.2.7",
|
|
65
|
+
"@types/react-dom": "~19.2.3",
|
|
66
|
+
"effect": "3.19.16",
|
|
67
|
+
"react": "~19.2.3",
|
|
68
|
+
"react-dom": "~19.2.3",
|
|
69
|
+
"vite": "^7.1.11",
|
|
70
|
+
"@dxos/plugin-client": "0.8.4-main.6fa680abb7",
|
|
71
|
+
"@dxos/plugin-attention": "0.8.4-main.6fa680abb7",
|
|
72
|
+
"@dxos/plugin-testing": "0.8.4-main.6fa680abb7",
|
|
73
|
+
"@dxos/plugin-space": "0.8.4-main.6fa680abb7",
|
|
74
|
+
"@dxos/plugin-theme": "0.8.4-main.6fa680abb7",
|
|
75
|
+
"@dxos/random": "0.8.4-main.6fa680abb7",
|
|
76
|
+
"@dxos/storybook-utils": "0.8.4-main.6fa680abb7",
|
|
77
|
+
"@dxos/ui-theme": "0.8.4-main.6fa680abb7",
|
|
78
|
+
"@dxos/react-ui": "0.8.4-main.6fa680abb7"
|
|
77
79
|
},
|
|
78
80
|
"peerDependencies": {
|
|
79
|
-
"@effect-
|
|
80
|
-
"@effect/platform": "
|
|
81
|
-
"effect": "
|
|
82
|
-
"react": "~
|
|
83
|
-
"react-dom": "~
|
|
84
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
85
|
-
"@dxos/
|
|
81
|
+
"@effect-atom/atom-react": "^0.5.0",
|
|
82
|
+
"@effect/platform": "0.94.4",
|
|
83
|
+
"effect": "3.19.16",
|
|
84
|
+
"react": "~19.2.3",
|
|
85
|
+
"react-dom": "~19.2.3",
|
|
86
|
+
"@dxos/react-ui": "0.8.4-main.6fa680abb7",
|
|
87
|
+
"@dxos/ui-theme": "0.8.4-main.6fa680abb7"
|
|
86
88
|
},
|
|
87
89
|
"publishConfig": {
|
|
88
90
|
"access": "public"
|
package/src/NavTreePlugin.tsx
CHANGED
|
@@ -2,94 +2,74 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
Capabilities,
|
|
11
|
-
allOf,
|
|
12
|
-
createIntent,
|
|
13
|
-
LayoutAction,
|
|
14
|
-
} from '@dxos/app-framework';
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { ActivationEvent, ActivationEvents, Capabilities, Capability, Plugin } from '@dxos/app-framework';
|
|
8
|
+
import { AppActivationEvents, AppCapabilities, AppPlugin, LayoutOperation } from '@dxos/app-toolkit';
|
|
9
|
+
import { Graph } from '@dxos/plugin-graph';
|
|
15
10
|
import { type TreeData } from '@dxos/react-ui-list';
|
|
16
11
|
|
|
17
|
-
import { AppGraphBuilder,
|
|
18
|
-
import { NODE_TYPE } from './
|
|
19
|
-
import { NavTreeEvents } from './events';
|
|
12
|
+
import { AppGraphBuilder, Keyboard, OperationResolver, ReactSurface, State } from './capabilities';
|
|
13
|
+
import { NODE_TYPE } from './containers';
|
|
20
14
|
import { meta } from './meta';
|
|
21
15
|
import { translations } from './translations';
|
|
16
|
+
import { NavTreeEvents } from './types';
|
|
22
17
|
|
|
23
|
-
export const NavTreePlugin = ()
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
activate: () =>
|
|
40
|
-
contributes(Capabilities.Metadata, {
|
|
41
|
-
id: NODE_TYPE,
|
|
42
|
-
metadata: {
|
|
43
|
-
parse: ({ item }: TreeData, type: string) => {
|
|
44
|
-
switch (type) {
|
|
45
|
-
case 'node':
|
|
46
|
-
return item;
|
|
47
|
-
case 'object':
|
|
48
|
-
return item.data;
|
|
49
|
-
case 'view-object':
|
|
50
|
-
return { id: `${item.id}-view`, object: item.data };
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
}),
|
|
55
|
-
}),
|
|
56
|
-
defineModule({
|
|
57
|
-
id: `${meta.id}/module/expose`,
|
|
58
|
-
activatesOn: allOf(Events.DispatcherReady, Events.AppGraphReady, Events.LayoutReady, NavTreeEvents.StateReady),
|
|
59
|
-
activate: async (context) => {
|
|
60
|
-
const layout = context.getCapability(Capabilities.Layout);
|
|
61
|
-
const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
62
|
-
const { graph } = context.getCapability(Capabilities.AppGraph);
|
|
63
|
-
if (dispatch && layout.active.length === 1) {
|
|
64
|
-
// TODO(wittjosiah): This should really be fired once the navtree renders for the first time.
|
|
65
|
-
// That is the point at which the graph is expanded and the path should be available.
|
|
66
|
-
void graph
|
|
67
|
-
.waitForPath({ target: layout.active[0] }, { timeout: 30_000 })
|
|
68
|
-
.then(() => dispatch(createIntent(LayoutAction.Expose, { part: 'navigation', subject: layout.active[0] })))
|
|
69
|
-
.catch(() => {});
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
return [];
|
|
18
|
+
export const NavTreePlugin = Plugin.define(meta).pipe(
|
|
19
|
+
AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),
|
|
20
|
+
AppPlugin.addMetadataModule({
|
|
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
|
+
},
|
|
73
34
|
},
|
|
35
|
+
},
|
|
36
|
+
}),
|
|
37
|
+
AppPlugin.addOperationResolverModule({ activate: OperationResolver }),
|
|
38
|
+
AppPlugin.addSurfaceModule({ activate: ReactSurface }),
|
|
39
|
+
AppPlugin.addTranslationsModule({ translations }),
|
|
40
|
+
Plugin.addModule({
|
|
41
|
+
id: 'state',
|
|
42
|
+
activatesOn: AppActivationEvents.LayoutReady,
|
|
43
|
+
activatesAfter: [NavTreeEvents.StateReady],
|
|
44
|
+
activate: State,
|
|
45
|
+
}),
|
|
46
|
+
Plugin.addModule({
|
|
47
|
+
id: 'expose',
|
|
48
|
+
activatesOn: ActivationEvent.allOf(
|
|
49
|
+
ActivationEvents.OperationInvokerReady,
|
|
50
|
+
AppActivationEvents.AppGraphReady,
|
|
51
|
+
AppActivationEvents.LayoutReady,
|
|
52
|
+
NavTreeEvents.StateReady,
|
|
53
|
+
),
|
|
54
|
+
activate: Effect.fnUntraced(function* () {
|
|
55
|
+
const layout = yield* Capabilities.getAtomValue(AppCapabilities.Layout);
|
|
56
|
+
const { invokePromise } = yield* Capability.get(Capabilities.OperationInvoker);
|
|
57
|
+
const { graph } = yield* Capability.get(AppCapabilities.AppGraph);
|
|
58
|
+
if (invokePromise && layout.active.length === 1) {
|
|
59
|
+
// TODO(wittjosiah): This should really be fired once the navtree renders for the first time.
|
|
60
|
+
// That is the point at which the graph is expanded and the path should be available.
|
|
61
|
+
void Graph.waitForPath(graph, { target: layout.active[0] }, { timeout: 30_000 })
|
|
62
|
+
.then(() => invokePromise(LayoutOperation.Expose, { subject: layout.active[0] }))
|
|
63
|
+
.catch(() => {});
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
return [];
|
|
74
67
|
}),
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
activate: ReactSurface,
|
|
84
|
-
}),
|
|
85
|
-
defineModule({
|
|
86
|
-
id: `${meta.id}/module/intent-resolver`,
|
|
87
|
-
activatesOn: Events.SetupIntentResolver,
|
|
88
|
-
activate: IntentResolver,
|
|
89
|
-
}),
|
|
90
|
-
defineModule({
|
|
91
|
-
id: `${meta.id}/module/app-graph-builder`,
|
|
92
|
-
activatesOn: Events.SetupAppGraph,
|
|
93
|
-
activate: AppGraphBuilder,
|
|
94
|
-
}),
|
|
95
|
-
]);
|
|
68
|
+
}),
|
|
69
|
+
Plugin.addModule({
|
|
70
|
+
id: 'keyboard',
|
|
71
|
+
activatesOn: ActivationEvent.allOf(AppActivationEvents.AppGraphReady, ActivationEvents.OperationInvokerReady),
|
|
72
|
+
activate: Keyboard,
|
|
73
|
+
}),
|
|
74
|
+
Plugin.make,
|
|
75
|
+
);
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { AppCapabilities, LayoutOperation } from '@dxos/app-toolkit';
|
|
9
|
+
import { Operation } from '@dxos/operation';
|
|
10
|
+
import { GraphBuilder, NodeMatcher } from '@dxos/plugin-graph';
|
|
11
|
+
|
|
12
|
+
import { COMMANDS_DIALOG, meta } from '../../meta';
|
|
13
|
+
|
|
14
|
+
export default Capability.makeModule(
|
|
15
|
+
Effect.fnUntraced(function* () {
|
|
16
|
+
const extensions = yield* GraphBuilder.createExtension({
|
|
17
|
+
id: meta.id,
|
|
18
|
+
match: NodeMatcher.whenRoot,
|
|
19
|
+
actions: () =>
|
|
20
|
+
Effect.succeed([
|
|
21
|
+
{
|
|
22
|
+
id: COMMANDS_DIALOG,
|
|
23
|
+
data: () =>
|
|
24
|
+
Operation.invoke(LayoutOperation.UpdateDialog, {
|
|
25
|
+
subject: COMMANDS_DIALOG,
|
|
26
|
+
blockAlign: 'start',
|
|
27
|
+
}),
|
|
28
|
+
properties: {
|
|
29
|
+
label: ['open commands label', { ns: meta.id }],
|
|
30
|
+
icon: 'ph--magnifying-glass--regular',
|
|
31
|
+
keyBinding: {
|
|
32
|
+
macos: 'meta+k',
|
|
33
|
+
windows: 'ctrl+k',
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
]),
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
|
|
41
|
+
}),
|
|
42
|
+
);
|
|
@@ -2,12 +2,8 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export const ReactSurface = lazy(() => import('./react-surface'));
|
|
11
|
-
export const State = lazy(() => import('./state'));
|
|
12
|
-
|
|
13
|
-
export * from './capabilities';
|
|
5
|
+
export * from './app-graph-builder';
|
|
6
|
+
export * from './keyboard';
|
|
7
|
+
export * from './operation-resolver';
|
|
8
|
+
export * from './react-surface';
|
|
9
|
+
export * from './state';
|
|
@@ -0,0 +1,66 @@
|
|
|
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 { AppCapabilities } from '@dxos/app-toolkit';
|
|
9
|
+
import { debounce } from '@dxos/async';
|
|
10
|
+
import { Keyboard } from '@dxos/keyboard';
|
|
11
|
+
import { Graph, Node, runAction } from '@dxos/plugin-graph';
|
|
12
|
+
import { getHostPlatform } from '@dxos/util';
|
|
13
|
+
|
|
14
|
+
import { KEY_BINDING } from '../../meta';
|
|
15
|
+
|
|
16
|
+
export default Capability.makeModule(
|
|
17
|
+
Effect.fnUntraced(function* () {
|
|
18
|
+
const { graph } = yield* Capability.get(AppCapabilities.AppGraph);
|
|
19
|
+
const invoker = yield* Capability.get(Capabilities.OperationInvoker);
|
|
20
|
+
const pluginContext = yield* Capability.Service;
|
|
21
|
+
|
|
22
|
+
// TODO(wittjosiah): Factor out.
|
|
23
|
+
// TODO(wittjosiah): Handle removal of actions.
|
|
24
|
+
const visitor = (node: Node.Node, path: string[]) => {
|
|
25
|
+
let shortcut: string | undefined;
|
|
26
|
+
if (typeof node.properties.keyBinding === 'object') {
|
|
27
|
+
const availablePlatforms = Object.keys(node.properties.keyBinding);
|
|
28
|
+
const platform = getHostPlatform();
|
|
29
|
+
shortcut = availablePlatforms.includes(platform)
|
|
30
|
+
? node.properties.keyBinding[platform]
|
|
31
|
+
: platform === 'ios'
|
|
32
|
+
? node.properties.keyBinding.macos // Fallback to macos if ios-specific bindings not provided.
|
|
33
|
+
: platform === 'linux' || platform === 'unknown'
|
|
34
|
+
? node.properties.keyBinding.windows // Fallback to windows if platform-specific bindings not provided.
|
|
35
|
+
: undefined;
|
|
36
|
+
} else {
|
|
37
|
+
shortcut = node.properties.keyBinding;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (shortcut && Node.isAction(node)) {
|
|
41
|
+
Keyboard.singleton.getContext(path.slice(0, -1).join('/')).bind({
|
|
42
|
+
shortcut,
|
|
43
|
+
handler: () => void runAction(invoker, pluginContext, node, { parent: node, caller: KEY_BINDING }),
|
|
44
|
+
data: node.properties.label,
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const eventHandler = debounce(() => {
|
|
50
|
+
Graph.traverse(graph, { relation: ['child', 'action'], visitor });
|
|
51
|
+
}, 500);
|
|
52
|
+
|
|
53
|
+
const unsubscribe = graph.onNodeChanged.on(eventHandler);
|
|
54
|
+
|
|
55
|
+
// TODO(burdon): Create context and plugin.
|
|
56
|
+
Keyboard.singleton.initialize();
|
|
57
|
+
Keyboard.singleton.setCurrentContext(Node.RootId);
|
|
58
|
+
|
|
59
|
+
return Capability.contributes(Capabilities.Null, null, () =>
|
|
60
|
+
Effect.sync(() => {
|
|
61
|
+
unsubscribe();
|
|
62
|
+
Keyboard.singleton.destroy();
|
|
63
|
+
}),
|
|
64
|
+
);
|
|
65
|
+
}),
|
|
66
|
+
);
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
import * as Option from 'effect/Option';
|
|
7
|
+
|
|
8
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
|
+
import { AppCapabilities, LayoutOperation } from '@dxos/app-toolkit';
|
|
10
|
+
import { expandAttendableId } from '@dxos/react-ui-attention';
|
|
11
|
+
import { log } from '@dxos/log';
|
|
12
|
+
import { OperationResolver } from '@dxos/operation';
|
|
13
|
+
import { Graph } from '@dxos/plugin-graph';
|
|
14
|
+
|
|
15
|
+
import { NavTreeCapabilities } from '../../types';
|
|
16
|
+
|
|
17
|
+
export default Capability.makeModule(
|
|
18
|
+
Effect.fnUntraced(function* () {
|
|
19
|
+
return Capability.contributes(Capabilities.OperationResolver, [
|
|
20
|
+
OperationResolver.make({
|
|
21
|
+
operation: LayoutOperation.Expose,
|
|
22
|
+
handler: Effect.fnUntraced(function* ({ subject }) {
|
|
23
|
+
const { graph } = yield* Capability.get(AppCapabilities.AppGraph);
|
|
24
|
+
const { getItem, setItem } = yield* Capability.get(NavTreeCapabilities.State);
|
|
25
|
+
|
|
26
|
+
const prefixes = expandAttendableId(subject);
|
|
27
|
+
|
|
28
|
+
for (const qualifiedId of prefixes) {
|
|
29
|
+
Graph.expand(graph, qualifiedId, 'child');
|
|
30
|
+
|
|
31
|
+
const treePath = prefixes.slice(0, prefixes.indexOf(qualifiedId) + 1);
|
|
32
|
+
const state = getItem(treePath);
|
|
33
|
+
if (!state.open) {
|
|
34
|
+
setItem(treePath, 'open', true);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (Option.isNone(Graph.getNode(graph, subject))) {
|
|
39
|
+
log('Node not found after expansion', { subject });
|
|
40
|
+
}
|
|
41
|
+
}),
|
|
42
|
+
}),
|
|
43
|
+
]);
|
|
44
|
+
}),
|
|
45
|
+
);
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
|
|
8
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
|
+
import { Surface } from '@dxos/app-framework/ui';
|
|
10
|
+
import { Node } from '@dxos/plugin-graph';
|
|
11
|
+
|
|
12
|
+
import { CommandsDialogContent, CommandsTrigger, NavTreeContainer, NavTreeDocumentTitle } from '../../containers';
|
|
13
|
+
import { COMMANDS_DIALOG, meta } from '../../meta';
|
|
14
|
+
|
|
15
|
+
export default Capability.makeModule(() =>
|
|
16
|
+
Effect.succeed(
|
|
17
|
+
Capability.contributes(Capabilities.ReactSurface, [
|
|
18
|
+
Surface.create({
|
|
19
|
+
id: COMMANDS_DIALOG,
|
|
20
|
+
role: 'dialog',
|
|
21
|
+
filter: (data): data is { props: { selected?: string } } => data.component === COMMANDS_DIALOG,
|
|
22
|
+
component: ({ data, ref }) => <CommandsDialogContent {...data.props} ref={ref} />,
|
|
23
|
+
}),
|
|
24
|
+
Surface.create({
|
|
25
|
+
id: `${meta.id}.navigation`,
|
|
26
|
+
role: 'navigation',
|
|
27
|
+
filter: (data): data is { popoverAnchorId?: string; current: string } => typeof data.current === 'string',
|
|
28
|
+
component: ({ data, ref }) => {
|
|
29
|
+
return (
|
|
30
|
+
<NavTreeContainer
|
|
31
|
+
tab={data.current}
|
|
32
|
+
popoverAnchorId={data.popoverAnchorId as string | undefined}
|
|
33
|
+
ref={ref}
|
|
34
|
+
/>
|
|
35
|
+
);
|
|
36
|
+
},
|
|
37
|
+
}),
|
|
38
|
+
Surface.create({
|
|
39
|
+
id: `${meta.id}.document-title`,
|
|
40
|
+
role: 'document-title',
|
|
41
|
+
component: ({ data }) => (
|
|
42
|
+
<NavTreeDocumentTitle node={Node.isGraphNode(data.subject) ? data.subject : undefined} />
|
|
43
|
+
),
|
|
44
|
+
}),
|
|
45
|
+
Surface.create({
|
|
46
|
+
id: `${meta.id}.search-input`,
|
|
47
|
+
role: 'search-input',
|
|
48
|
+
position: 'fallback',
|
|
49
|
+
component: () => <CommandsTrigger />,
|
|
50
|
+
}),
|
|
51
|
+
]),
|
|
52
|
+
),
|
|
53
|
+
);
|