@dxos/plugin-navtree 0.8.4-main.f9ba587 → 0.8.4-main.fcc0d83b33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/index.mjs +157 -124
- 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 +2 -1
- package/dist/types/src/NavTreePlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +4 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +7 -105
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/keyboard.d.ts +3 -2
- package/dist/types/src/capabilities/keyboard.d.ts.map +1 -1
- 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 +3 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/state.d.ts +4 -18
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/components/NavTree/NavTree.d.ts +12 -5
- package/dist/types/src/components/NavTree/NavTree.d.ts.map +1 -1
- package/dist/types/src/components/NavTree/NavTree.stories.d.ts +25 -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 +13 -9
- package/dist/types/src/components/NavTreeItem/NavTreeItemAction.d.ts.map +1 -1
- package/dist/types/src/components/NavTreeItem/NavTreeItemAction.stories.d.ts +33 -4
- package/dist/types/src/components/NavTreeItem/NavTreeItemAction.stories.d.ts.map +1 -1
- package/dist/types/src/components/NavTreeItem/NavTreeItemColumns.d.ts +2 -2
- package/dist/types/src/components/NavTreeItem/NavTreeItemColumns.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/L0Menu.d.ts +10 -5
- package/dist/types/src/components/Sidebar/L0Menu.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/L1Panel.d.ts +4 -8
- package/dist/types/src/components/Sidebar/L1Panel.d.ts.map +1 -1
- package/dist/types/src/components/Sidebar/L1Tabs.d.ts +13 -0
- package/dist/types/src/components/Sidebar/L1Tabs.d.ts.map +1 -0
- package/dist/types/src/components/Sidebar/index.d.ts +1 -0
- package/dist/types/src/components/Sidebar/index.d.ts.map +1 -1
- package/dist/types/src/components/UserAccountAvatar/UserAccountAvatar.d.ts.map +1 -1
- package/dist/types/src/components/UserAccountAvatar/UserAccountAvatar.stories.d.ts +8 -5
- package/dist/types/src/components/UserAccountAvatar/UserAccountAvatar.stories.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +1 -4
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/components/types.d.ts +8 -17
- 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/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/{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 +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 +5 -6
- 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 +18 -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/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 +2 -3
- package/dist/types/src/testing/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/testing/generator.d.ts +5 -6
- package/dist/types/src/testing/generator.d.ts.map +1 -1
- package/dist/types/src/testing/update-state.d.ts +2 -2
- package/dist/types/src/testing/update-state.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +8 -10
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/capabilities.d.ts +15 -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 +74 -59
- package/src/NavTreePlugin.tsx +66 -86
- package/src/capabilities/app-graph-builder.ts +34 -44
- package/src/capabilities/index.ts +10 -8
- package/src/capabilities/keyboard.ts +58 -51
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-surface.tsx +46 -38
- package/src/capabilities/state.ts +129 -84
- package/src/components/NavTree/NavTree.stories.tsx +111 -103
- package/src/components/NavTree/NavTree.tsx +71 -35
- 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 +25 -19
- package/src/components/NavTreeItem/NavTreeItemAction.tsx +73 -50
- package/src/components/NavTreeItem/NavTreeItemColumns.tsx +70 -38
- package/src/components/Sidebar/L0Menu.tsx +176 -210
- package/src/components/Sidebar/L1Panel.tsx +212 -135
- package/src/components/Sidebar/L1Tabs.tsx +42 -0
- package/src/components/Sidebar/index.ts +1 -0
- package/src/components/UserAccountAvatar/UserAccountAvatar.stories.tsx +9 -9
- package/src/components/UserAccountAvatar/UserAccountAvatar.tsx +20 -12
- package/src/components/index.ts +2 -4
- package/src/components/types.ts +14 -19
- package/src/containers/CommandsDialogContent/CommandsDialogContent.stories.tsx +46 -0
- package/src/containers/CommandsDialogContent/CommandsDialogContent.tsx +127 -0
- package/src/containers/CommandsDialogContent/index.ts +5 -0
- package/src/containers/CommandsTrigger/CommandsTrigger.tsx +28 -0
- package/src/containers/CommandsTrigger/index.ts +5 -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 +5 -0
- package/src/containers/index.ts +12 -0
- package/src/experimental/Tree.stories.tsx +110 -115
- package/src/experimental/Tree.tsx +16 -34
- 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 +1 -2
- package/src/meta.ts +11 -8
- package/src/operations/expose.ts +42 -0
- package/src/operations/index.ts +7 -0
- package/src/testing/app-graph-builder.ts +167 -238
- package/src/testing/generator.ts +41 -39
- package/src/testing/update-state.ts +6 -6
- package/src/translations.ts +8 -9
- 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-TZA65AKW.mjs +0 -1428
- package/dist/lib/browser/chunk-TZA65AKW.mjs.map +0 -7
- package/dist/lib/browser/chunk-WCARAZ7J.mjs +0 -15
- package/dist/lib/browser/chunk-WCARAZ7J.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-3XYN2CBU.mjs +0 -47
- package/dist/lib/browser/intent-resolver-3XYN2CBU.mjs.map +0 -7
- package/dist/lib/browser/keyboard-QRS6WOQH.mjs +0 -51
- package/dist/lib/browser/keyboard-QRS6WOQH.mjs.map +0 -7
- package/dist/lib/browser/react-surface-N2HPMYCU.mjs +0 -51
- package/dist/lib/browser/react-surface-N2HPMYCU.mjs.map +0 -7
- package/dist/lib/browser/state-54DY3DOY.mjs +0 -117
- package/dist/lib/browser/state-54DY3DOY.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-GY7GCTGU.mjs +0 -46
- package/dist/lib/node-esm/app-graph-builder-GY7GCTGU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-CY7QWR4R.mjs +0 -1429
- package/dist/lib/node-esm/chunk-CY7QWR4R.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-P2JGW3WR.mjs +0 -18
- package/dist/lib/node-esm/chunk-P2JGW3WR.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-V3QXFDDP.mjs +0 -16
- package/dist/lib/node-esm/chunk-V3QXFDDP.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -150
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-R7UNPSZY.mjs +0 -48
- package/dist/lib/node-esm/intent-resolver-R7UNPSZY.mjs.map +0 -7
- package/dist/lib/node-esm/keyboard-MOZWHFUM.mjs +0 -52
- package/dist/lib/node-esm/keyboard-MOZWHFUM.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/react-surface-EW5FDMW4.mjs +0 -52
- package/dist/lib/node-esm/react-surface-EW5FDMW4.mjs.map +0 -7
- package/dist/lib/node-esm/state-Z3OTRC2I.mjs +0 -118
- package/dist/lib/node-esm/state-Z3OTRC2I.mjs.map +0 -7
- package/dist/types/src/capabilities/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/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/capabilities.ts +0 -20
- package/src/capabilities/intent-resolver.ts +0 -37
- package/src/components/CommandsDialog/CommandsDialog.tsx +0 -118
- package/src/components/CommandsDialog/CommandsTrigger.tsx +0 -37
- package/src/components/CommandsDialog/index.ts +0 -6
- package/src/components/NavTreeContainer.tsx +0 -314
- 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,89 +1,104 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-navtree",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.fcc0d83b33",
|
|
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",
|
|
15
|
+
"imports": {
|
|
16
|
+
"#capabilities": "./src/capabilities/index.ts",
|
|
17
|
+
"#components": "./src/components/index.ts",
|
|
18
|
+
"#containers": "./src/containers/index.ts",
|
|
19
|
+
"#hooks": "./src/hooks/index.ts",
|
|
20
|
+
"#meta": "./src/meta.ts",
|
|
21
|
+
"#operations": "./src/operations/index.ts",
|
|
22
|
+
"#testing": "./src/testing/index.ts",
|
|
23
|
+
"#translations": "./src/translations.ts",
|
|
24
|
+
"#types": "./src/types/index.ts"
|
|
25
|
+
},
|
|
11
26
|
"exports": {
|
|
12
27
|
".": {
|
|
28
|
+
"source": "./src/index.ts",
|
|
13
29
|
"types": "./dist/types/src/index.d.ts",
|
|
14
30
|
"browser": "./dist/lib/browser/index.mjs"
|
|
31
|
+
},
|
|
32
|
+
"./translations": {
|
|
33
|
+
"source": "./src/translations.ts",
|
|
34
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
35
|
+
"browser": "./dist/lib/browser/translations.mjs",
|
|
36
|
+
"node": "./dist/lib/node-esm/translations.mjs"
|
|
15
37
|
}
|
|
16
38
|
},
|
|
17
39
|
"types": "dist/types/src/index.d.ts",
|
|
18
|
-
"typesVersions": {
|
|
19
|
-
"*": {}
|
|
20
|
-
},
|
|
21
40
|
"files": [
|
|
22
41
|
"dist",
|
|
23
42
|
"src"
|
|
24
43
|
],
|
|
25
44
|
"dependencies": {
|
|
26
|
-
"@atlaskit/pragmatic-drag-and-drop": "
|
|
27
|
-
"@atlaskit/pragmatic-drag-and-drop-hitbox": "
|
|
28
|
-
"@preact-signals/safe-react": "^0.9.0",
|
|
29
|
-
"@preact/signals-core": "^1.9.0",
|
|
45
|
+
"@atlaskit/pragmatic-drag-and-drop": "1.7.7",
|
|
46
|
+
"@atlaskit/pragmatic-drag-and-drop-hitbox": "1.1.0",
|
|
30
47
|
"@radix-ui/react-dismissable-layer": "1.1.5",
|
|
31
48
|
"@radix-ui/react-use-controllable-state": "1.1.0",
|
|
32
|
-
"date-fns": "^3.
|
|
33
|
-
"
|
|
34
|
-
"@dxos/
|
|
35
|
-
"@dxos/app-
|
|
36
|
-
"@dxos/
|
|
37
|
-
"@dxos/
|
|
38
|
-
"@dxos/
|
|
39
|
-
"@dxos/echo
|
|
40
|
-
"@dxos/invariant": "0.8.4-main.
|
|
41
|
-
"@dxos/keyboard": "0.8.4-main.
|
|
42
|
-
"@dxos/
|
|
43
|
-
"@dxos/
|
|
44
|
-
"@dxos/
|
|
45
|
-
"@dxos/plugin-
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/react-
|
|
50
|
-
"@dxos/react-ui-
|
|
51
|
-
"@dxos/
|
|
52
|
-
"@dxos/react-ui-
|
|
53
|
-
"@dxos/react-ui-
|
|
54
|
-
"@dxos/react-ui-
|
|
55
|
-
"@dxos/react-ui-
|
|
56
|
-
"@dxos/util": "0.8.4-main.
|
|
49
|
+
"date-fns": "^3.6.0",
|
|
50
|
+
"@dxos/app-framework": "0.8.4-main.fcc0d83b33",
|
|
51
|
+
"@dxos/async": "0.8.4-main.fcc0d83b33",
|
|
52
|
+
"@dxos/app-toolkit": "0.8.4-main.fcc0d83b33",
|
|
53
|
+
"@dxos/app-graph": "0.8.4-main.fcc0d83b33",
|
|
54
|
+
"@dxos/debug": "0.8.4-main.fcc0d83b33",
|
|
55
|
+
"@dxos/compute": "0.8.4-main.fcc0d83b33",
|
|
56
|
+
"@dxos/echo": "0.8.4-main.fcc0d83b33",
|
|
57
|
+
"@dxos/invariant": "0.8.4-main.fcc0d83b33",
|
|
58
|
+
"@dxos/keyboard": "0.8.4-main.fcc0d83b33",
|
|
59
|
+
"@dxos/lit-ui": "0.8.4-main.fcc0d83b33",
|
|
60
|
+
"@dxos/plugin-deck": "0.8.4-main.fcc0d83b33",
|
|
61
|
+
"@dxos/plugin-observability": "0.8.4-main.fcc0d83b33",
|
|
62
|
+
"@dxos/plugin-graph": "0.8.4-main.fcc0d83b33",
|
|
63
|
+
"@dxos/protocols": "0.8.4-main.fcc0d83b33",
|
|
64
|
+
"@dxos/react-client": "0.8.4-main.fcc0d83b33",
|
|
65
|
+
"@dxos/react-ui-list": "0.8.4-main.fcc0d83b33",
|
|
66
|
+
"@dxos/react-ui-menu": "0.8.4-main.fcc0d83b33",
|
|
67
|
+
"@dxos/react-ui-mosaic": "0.8.4-main.fcc0d83b33",
|
|
68
|
+
"@dxos/log": "0.8.4-main.fcc0d83b33",
|
|
69
|
+
"@dxos/react-ui-attention": "0.8.4-main.fcc0d83b33",
|
|
70
|
+
"@dxos/react-ui-search": "0.8.4-main.fcc0d83b33",
|
|
71
|
+
"@dxos/react-ui-tabs": "0.8.4-main.fcc0d83b33",
|
|
72
|
+
"@dxos/react-ui-stack": "0.8.4-main.fcc0d83b33",
|
|
73
|
+
"@dxos/util": "0.8.4-main.fcc0d83b33"
|
|
57
74
|
},
|
|
58
75
|
"devDependencies": {
|
|
59
|
-
"@effect-
|
|
60
|
-
"@effect/platform": "0.
|
|
61
|
-
"@
|
|
62
|
-
"@types/react": "~
|
|
63
|
-
"
|
|
64
|
-
"react": "~
|
|
65
|
-
"react-dom": "~
|
|
66
|
-
"vite": "
|
|
67
|
-
"@dxos/
|
|
68
|
-
"@dxos/plugin-
|
|
69
|
-
"@dxos/plugin-
|
|
70
|
-
"@dxos/plugin-
|
|
71
|
-
"@dxos/plugin-
|
|
72
|
-
"@dxos/
|
|
73
|
-
"@dxos/
|
|
74
|
-
"@dxos/
|
|
75
|
-
"@dxos/
|
|
76
|
-
"@dxos/storybook-utils": "0.8.4-main.f9ba587"
|
|
76
|
+
"@effect-atom/atom-react": "^0.5.0",
|
|
77
|
+
"@effect/platform": "0.94.4",
|
|
78
|
+
"@types/react": "~19.2.7",
|
|
79
|
+
"@types/react-dom": "~19.2.3",
|
|
80
|
+
"effect": "3.20.0",
|
|
81
|
+
"react": "~19.2.3",
|
|
82
|
+
"react-dom": "~19.2.3",
|
|
83
|
+
"vite": "^8.0.10",
|
|
84
|
+
"@dxos/plugin-attention": "0.8.4-main.fcc0d83b33",
|
|
85
|
+
"@dxos/plugin-client": "0.8.4-main.fcc0d83b33",
|
|
86
|
+
"@dxos/plugin-testing": "0.8.4-main.fcc0d83b33",
|
|
87
|
+
"@dxos/plugin-theme": "0.8.4-main.fcc0d83b33",
|
|
88
|
+
"@dxos/plugin-space": "0.8.4-main.fcc0d83b33",
|
|
89
|
+
"@dxos/random": "0.8.4-main.fcc0d83b33",
|
|
90
|
+
"@dxos/react-ui": "0.8.4-main.fcc0d83b33",
|
|
91
|
+
"@dxos/ui-theme": "0.8.4-main.fcc0d83b33",
|
|
92
|
+
"@dxos/storybook-utils": "0.8.4-main.fcc0d83b33"
|
|
77
93
|
},
|
|
78
94
|
"peerDependencies": {
|
|
79
|
-
"@effect-
|
|
80
|
-
"@effect/platform": "
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"react": "~
|
|
84
|
-
"react-
|
|
85
|
-
"@dxos/
|
|
86
|
-
"@dxos/react-ui-theme": "0.8.4-main.f9ba587"
|
|
95
|
+
"@effect-atom/atom-react": "^0.5.0",
|
|
96
|
+
"@effect/platform": "0.94.4",
|
|
97
|
+
"effect": "3.20.0",
|
|
98
|
+
"react": "~19.2.3",
|
|
99
|
+
"react-dom": "~19.2.3",
|
|
100
|
+
"@dxos/react-ui": "0.8.4-main.fcc0d83b33",
|
|
101
|
+
"@dxos/ui-theme": "0.8.4-main.fcc0d83b33"
|
|
87
102
|
},
|
|
88
103
|
"publishConfig": {
|
|
89
104
|
"access": "public"
|
package/src/NavTreePlugin.tsx
CHANGED
|
@@ -2,94 +2,74 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
definePlugin,
|
|
7
|
-
defineModule,
|
|
8
|
-
Events,
|
|
9
|
-
contributes,
|
|
10
|
-
Capabilities,
|
|
11
|
-
allOf,
|
|
12
|
-
createIntent,
|
|
13
|
-
LayoutAction,
|
|
14
|
-
} from '@dxos/app-framework';
|
|
15
|
-
import { type TreeData } from '@dxos/react-ui-list';
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
16
6
|
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import { translations } from './translations';
|
|
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';
|
|
10
|
+
import { type TreeData } from '@dxos/react-ui-list';
|
|
22
11
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
activatesAfter: [NavTreeEvents.StateReady],
|
|
29
|
-
activate: State,
|
|
30
|
-
}),
|
|
31
|
-
defineModule({
|
|
32
|
-
id: `${meta.id}/module/translations`,
|
|
33
|
-
activatesOn: Events.SetupTranslations,
|
|
34
|
-
activate: () => contributes(Capabilities.Translations, translations),
|
|
35
|
-
}),
|
|
36
|
-
defineModule({
|
|
37
|
-
id: `${meta.id}/module/metadata`,
|
|
38
|
-
activatesOn: Events.SetupMetadata,
|
|
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
|
-
}
|
|
12
|
+
import { AppGraphBuilder, Keyboard, OperationHandler, ReactSurface, State } from '#capabilities';
|
|
13
|
+
import { NODE_TYPE } from '#containers';
|
|
14
|
+
import { meta } from '#meta';
|
|
15
|
+
import { translations } from '#translations';
|
|
16
|
+
import { NavTreeEvents } from '#types';
|
|
71
17
|
|
|
72
|
-
|
|
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.addOperationHandlerModule({ activate: OperationHandler }),
|
|
38
|
+
AppPlugin.addSurfaceModule({ activate: ReactSurface }),
|
|
39
|
+
AppPlugin.addTranslationsModule({ translations }),
|
|
40
|
+
Plugin.addModule({
|
|
41
|
+
id: 'state',
|
|
42
|
+
activatesOn: AppActivationEvents.LayoutReady,
|
|
43
|
+
firesAfterActivation: [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
|
+
);
|
|
@@ -2,51 +2,41 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
import { Option, pipe } from 'effect';
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
7
6
|
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { AppCapabilities, LayoutOperation } from '@dxos/app-toolkit';
|
|
9
|
+
import { Operation } from '@dxos/compute';
|
|
10
|
+
import { GraphBuilder, Node, NodeMatcher } from '@dxos/plugin-graph';
|
|
10
11
|
|
|
11
|
-
import { COMMANDS_DIALOG,
|
|
12
|
+
import { COMMANDS_DIALOG, meta } from '#meta';
|
|
12
13
|
|
|
13
|
-
export default (
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
actions: (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
blockAlign: 'start',
|
|
34
|
-
},
|
|
35
|
-
}),
|
|
36
|
-
);
|
|
37
|
-
},
|
|
38
|
-
properties: {
|
|
39
|
-
label: ['open commands label', { ns: NAVTREE_PLUGIN }],
|
|
40
|
-
icon: 'ph--magnifying-glass--regular',
|
|
41
|
-
keyBinding: {
|
|
42
|
-
macos: 'meta+k',
|
|
43
|
-
windows: 'ctrl+k',
|
|
44
|
-
},
|
|
45
|
-
},
|
|
14
|
+
export default Capability.makeModule(
|
|
15
|
+
Effect.fnUntraced(function* () {
|
|
16
|
+
const extensions = yield* GraphBuilder.createExtension({
|
|
17
|
+
id: 'root',
|
|
18
|
+
match: NodeMatcher.whenRoot,
|
|
19
|
+
actions: () =>
|
|
20
|
+
Effect.succeed([
|
|
21
|
+
Node.makeAction({
|
|
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',
|
|
46
34
|
},
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
35
|
+
},
|
|
36
|
+
}),
|
|
37
|
+
]),
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
|
|
41
|
+
}),
|
|
42
|
+
);
|
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { Capability } from '@dxos/app-framework';
|
|
6
|
+
import { OperationHandlerSet } from '@dxos/compute';
|
|
6
7
|
|
|
7
|
-
export const AppGraphBuilder = lazy(() => import('./app-graph-builder'));
|
|
8
|
-
export const
|
|
9
|
-
export const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export
|
|
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'));
|
|
@@ -2,58 +2,65 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
|
+
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
6
9
|
import { debounce } from '@dxos/async';
|
|
7
10
|
import { Keyboard } from '@dxos/keyboard';
|
|
8
|
-
import {
|
|
11
|
+
import { Graph, Node, runAction } from '@dxos/plugin-graph';
|
|
9
12
|
import { getHostPlatform } from '@dxos/util';
|
|
10
13
|
|
|
11
|
-
import { KEY_BINDING } from '
|
|
12
|
-
|
|
13
|
-
export default (
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
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,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
|
+
);
|