@dxos/plugin-navtree 0.8.4-main.84f28bd → 0.8.4-main.a4bbb77

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.
Files changed (129) hide show
  1. package/dist/lib/browser/{app-graph-builder-5J4LRWDX.mjs → app-graph-builder-BCXDEDN7.mjs} +9 -9
  2. package/dist/lib/browser/app-graph-builder-BCXDEDN7.mjs.map +7 -0
  3. package/dist/lib/browser/{chunk-TZA65AKW.mjs → chunk-6AZKY5WZ.mjs} +279 -237
  4. package/dist/lib/browser/chunk-6AZKY5WZ.mjs.map +7 -0
  5. package/dist/lib/browser/{chunk-WCARAZ7J.mjs → chunk-LPAREX6J.mjs} +4 -4
  6. package/dist/lib/browser/chunk-LPAREX6J.mjs.map +7 -0
  7. package/dist/lib/browser/chunk-ZENLR72O.mjs +14 -0
  8. package/dist/lib/browser/chunk-ZENLR72O.mjs.map +7 -0
  9. package/dist/lib/browser/index.mjs +8 -11
  10. package/dist/lib/browser/index.mjs.map +3 -3
  11. package/dist/lib/browser/{intent-resolver-3XYN2CBU.mjs → intent-resolver-G6COWRWW.mjs} +6 -6
  12. package/dist/lib/browser/{intent-resolver-3XYN2CBU.mjs.map → intent-resolver-G6COWRWW.mjs.map} +3 -3
  13. package/dist/lib/browser/{keyboard-QRS6WOQH.mjs → keyboard-AHSAWKXA.mjs} +4 -4
  14. package/dist/lib/{node-esm/keyboard-MOZWHFUM.mjs.map → browser/keyboard-AHSAWKXA.mjs.map} +2 -2
  15. package/dist/lib/browser/meta.json +1 -1
  16. package/dist/lib/browser/{react-surface-N2HPMYCU.mjs → react-surface-FOCB4Y5R.mjs} +10 -10
  17. package/dist/lib/browser/react-surface-FOCB4Y5R.mjs.map +7 -0
  18. package/dist/lib/browser/{state-54DY3DOY.mjs → state-2Q623V7U.mjs} +7 -7
  19. package/dist/lib/browser/state-2Q623V7U.mjs.map +7 -0
  20. package/dist/types/src/NavTreePlugin.d.ts +1 -1
  21. package/dist/types/src/NavTreePlugin.d.ts.map +1 -1
  22. package/dist/types/src/capabilities/app-graph-builder.d.ts +1 -1
  23. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  24. package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
  25. package/dist/types/src/capabilities/index.d.ts +6 -6
  26. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  27. package/dist/types/src/capabilities/intent-resolver.d.ts +2 -2
  28. package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
  29. package/dist/types/src/capabilities/keyboard.d.ts +1 -1
  30. package/dist/types/src/capabilities/keyboard.d.ts.map +1 -1
  31. package/dist/types/src/capabilities/react-surface.d.ts +1 -1
  32. package/dist/types/src/capabilities/state.d.ts +2 -2
  33. package/dist/types/src/capabilities/state.d.ts.map +1 -1
  34. package/dist/types/src/components/CommandsDialog/CommandsTrigger.d.ts.map +1 -1
  35. package/dist/types/src/components/NavTree/NavTree.d.ts +2 -2
  36. package/dist/types/src/components/NavTree/NavTree.d.ts.map +1 -1
  37. package/dist/types/src/components/NavTree/NavTree.stories.d.ts +26 -3
  38. package/dist/types/src/components/NavTree/NavTree.stories.d.ts.map +1 -1
  39. package/dist/types/src/components/NavTreeContainer.d.ts.map +1 -1
  40. package/dist/types/src/components/NavTreeItem/NavTreeItemAction.stories.d.ts +32 -4
  41. package/dist/types/src/components/NavTreeItem/NavTreeItemAction.stories.d.ts.map +1 -1
  42. package/dist/types/src/components/NavTreeItem/NavTreeItemColumns.d.ts +1 -1
  43. package/dist/types/src/components/NavTreeItem/NavTreeItemColumns.d.ts.map +1 -1
  44. package/dist/types/src/components/Sidebar/L0Menu.d.ts +2 -0
  45. package/dist/types/src/components/Sidebar/L0Menu.d.ts.map +1 -1
  46. package/dist/types/src/components/Sidebar/L1Panel.d.ts +5 -6
  47. package/dist/types/src/components/Sidebar/L1Panel.d.ts.map +1 -1
  48. package/dist/types/src/components/Sidebar/L1Tabs.d.ts +12 -0
  49. package/dist/types/src/components/Sidebar/L1Tabs.d.ts.map +1 -0
  50. package/dist/types/src/components/Sidebar/index.d.ts +1 -0
  51. package/dist/types/src/components/Sidebar/index.d.ts.map +1 -1
  52. package/dist/types/src/components/UserAccountAvatar/UserAccountAvatar.d.ts.map +1 -1
  53. package/dist/types/src/components/UserAccountAvatar/UserAccountAvatar.stories.d.ts +8 -5
  54. package/dist/types/src/components/UserAccountAvatar/UserAccountAvatar.stories.d.ts.map +1 -1
  55. package/dist/types/src/components/index.d.ts +1 -1
  56. package/dist/types/src/components/index.d.ts.map +1 -1
  57. package/dist/types/src/components/types.d.ts +2 -2
  58. package/dist/types/src/components/types.d.ts.map +1 -1
  59. package/dist/types/src/events.d.ts.map +1 -1
  60. package/dist/types/src/experimental/Tree.d.ts +4 -5
  61. package/dist/types/src/experimental/Tree.d.ts.map +1 -1
  62. package/dist/types/src/experimental/Tree.stories.d.ts +10 -4
  63. package/dist/types/src/experimental/Tree.stories.d.ts.map +1 -1
  64. package/dist/types/src/meta.d.ts +2 -3
  65. package/dist/types/src/meta.d.ts.map +1 -1
  66. package/dist/types/src/testing/app-graph-builder.d.ts.map +1 -1
  67. package/dist/types/src/translations.d.ts +1 -0
  68. package/dist/types/src/translations.d.ts.map +1 -1
  69. package/dist/types/src/util.d.ts +1 -2
  70. package/dist/types/src/util.d.ts.map +1 -1
  71. package/dist/types/tsconfig.tsbuildinfo +1 -1
  72. package/package.json +49 -49
  73. package/src/NavTreePlugin.tsx +75 -76
  74. package/src/capabilities/app-graph-builder.ts +5 -5
  75. package/src/capabilities/capabilities.ts +2 -2
  76. package/src/capabilities/intent-resolver.ts +1 -1
  77. package/src/capabilities/keyboard.ts +2 -2
  78. package/src/capabilities/react-surface.tsx +5 -5
  79. package/src/capabilities/state.ts +4 -3
  80. package/src/components/CommandsDialog/CommandsDialog.tsx +5 -5
  81. package/src/components/CommandsDialog/CommandsTrigger.tsx +5 -7
  82. package/src/components/NavTree/NavTree.stories.tsx +21 -18
  83. package/src/components/NavTree/NavTree.tsx +7 -3
  84. package/src/components/NavTreeContainer.tsx +43 -18
  85. package/src/components/NavTreeDocumentTitle.tsx +2 -2
  86. package/src/components/NavTreeItem/NavTreeItemAction.stories.tsx +4 -6
  87. package/src/components/NavTreeItem/NavTreeItemAction.tsx +9 -9
  88. package/src/components/NavTreeItem/NavTreeItemColumns.tsx +9 -9
  89. package/src/components/Sidebar/L0Menu.tsx +51 -50
  90. package/src/components/Sidebar/L1Panel.tsx +71 -93
  91. package/src/components/Sidebar/L1Tabs.tsx +58 -0
  92. package/src/components/Sidebar/index.ts +1 -0
  93. package/src/components/UserAccountAvatar/UserAccountAvatar.stories.tsx +9 -8
  94. package/src/components/UserAccountAvatar/UserAccountAvatar.tsx +20 -12
  95. package/src/components/index.ts +1 -1
  96. package/src/components/types.ts +3 -2
  97. package/src/events.ts +2 -2
  98. package/src/experimental/Tree.stories.tsx +37 -36
  99. package/src/experimental/Tree.tsx +16 -34
  100. package/src/meta.ts +5 -7
  101. package/src/testing/app-graph-builder.ts +1 -1
  102. package/src/translations.ts +1 -0
  103. package/src/util.ts +2 -20
  104. package/dist/lib/browser/app-graph-builder-5J4LRWDX.mjs.map +0 -7
  105. package/dist/lib/browser/chunk-ERDGQTH5.mjs +0 -16
  106. package/dist/lib/browser/chunk-ERDGQTH5.mjs.map +0 -7
  107. package/dist/lib/browser/chunk-TZA65AKW.mjs.map +0 -7
  108. package/dist/lib/browser/chunk-WCARAZ7J.mjs.map +0 -7
  109. package/dist/lib/browser/keyboard-QRS6WOQH.mjs.map +0 -7
  110. package/dist/lib/browser/react-surface-N2HPMYCU.mjs.map +0 -7
  111. package/dist/lib/browser/state-54DY3DOY.mjs.map +0 -7
  112. package/dist/lib/node-esm/app-graph-builder-GY7GCTGU.mjs +0 -46
  113. package/dist/lib/node-esm/app-graph-builder-GY7GCTGU.mjs.map +0 -7
  114. package/dist/lib/node-esm/chunk-CY7QWR4R.mjs +0 -1429
  115. package/dist/lib/node-esm/chunk-CY7QWR4R.mjs.map +0 -7
  116. package/dist/lib/node-esm/chunk-P2JGW3WR.mjs +0 -18
  117. package/dist/lib/node-esm/chunk-P2JGW3WR.mjs.map +0 -7
  118. package/dist/lib/node-esm/chunk-V3QXFDDP.mjs +0 -16
  119. package/dist/lib/node-esm/chunk-V3QXFDDP.mjs.map +0 -7
  120. package/dist/lib/node-esm/index.mjs +0 -150
  121. package/dist/lib/node-esm/index.mjs.map +0 -7
  122. package/dist/lib/node-esm/intent-resolver-R7UNPSZY.mjs +0 -48
  123. package/dist/lib/node-esm/intent-resolver-R7UNPSZY.mjs.map +0 -7
  124. package/dist/lib/node-esm/keyboard-MOZWHFUM.mjs +0 -52
  125. package/dist/lib/node-esm/meta.json +0 -1
  126. package/dist/lib/node-esm/react-surface-EW5FDMW4.mjs +0 -52
  127. package/dist/lib/node-esm/react-surface-EW5FDMW4.mjs.map +0 -7
  128. package/dist/lib/node-esm/state-Z3OTRC2I.mjs +0 -118
  129. package/dist/lib/node-esm/state-Z3OTRC2I.mjs.map +0 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/plugin-navtree",
3
- "version": "0.8.4-main.84f28bd",
3
+ "version": "0.8.4-main.a4bbb77",
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",
@@ -10,6 +10,7 @@
10
10
  "type": "module",
11
11
  "exports": {
12
12
  ".": {
13
+ "source": "./src/index.ts",
13
14
  "types": "./dist/types/src/index.d.ts",
14
15
  "browser": "./dist/lib/browser/index.mjs"
15
16
  }
@@ -26,64 +27,63 @@
26
27
  "@atlaskit/pragmatic-drag-and-drop": "^1.4.0",
27
28
  "@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.0.3",
28
29
  "@preact-signals/safe-react": "^0.9.0",
29
- "@preact/signals-core": "^1.9.0",
30
+ "@preact/signals-core": "^1.12.1",
30
31
  "@radix-ui/react-dismissable-layer": "1.1.5",
31
32
  "@radix-ui/react-use-controllable-state": "1.1.0",
32
33
  "date-fns": "^3.3.1",
33
- "effect": "3.16.13",
34
- "@dxos/app-framework": "0.8.4-main.84f28bd",
35
- "@dxos/app-graph": "0.8.4-main.84f28bd",
36
- "@dxos/async": "0.8.4-main.84f28bd",
37
- "@dxos/debug": "0.8.4-main.84f28bd",
38
- "@dxos/echo": "0.8.4-main.84f28bd",
39
- "@dxos/echo-schema": "0.8.4-main.84f28bd",
40
- "@dxos/invariant": "0.8.4-main.84f28bd",
41
- "@dxos/keyboard": "0.8.4-main.84f28bd",
42
- "@dxos/live-object": "0.8.4-main.84f28bd",
43
- "@dxos/local-storage": "0.8.4-main.84f28bd",
44
- "@dxos/log": "0.8.4-main.84f28bd",
45
- "@dxos/plugin-deck": "0.8.4-main.84f28bd",
46
- "@dxos/plugin-graph": "0.8.4-main.84f28bd",
47
- "@dxos/plugin-observability": "0.8.4-main.84f28bd",
48
- "@dxos/protocols": "0.8.4-main.84f28bd",
49
- "@dxos/react-client": "0.8.4-main.84f28bd",
50
- "@dxos/react-ui-attention": "0.8.4-main.84f28bd",
51
- "@dxos/react-ui-list": "0.8.4-main.84f28bd",
52
- "@dxos/react-ui-menu": "0.8.4-main.84f28bd",
53
- "@dxos/react-ui-searchlist": "0.8.4-main.84f28bd",
54
- "@dxos/react-ui-stack": "0.8.4-main.84f28bd",
55
- "@dxos/react-ui-tabs": "0.8.4-main.84f28bd",
56
- "@dxos/util": "0.8.4-main.84f28bd"
34
+ "@dxos/app-framework": "0.8.4-main.a4bbb77",
35
+ "@dxos/app-graph": "0.8.4-main.a4bbb77",
36
+ "@dxos/async": "0.8.4-main.a4bbb77",
37
+ "@dxos/echo": "0.8.4-main.a4bbb77",
38
+ "@dxos/debug": "0.8.4-main.a4bbb77",
39
+ "@dxos/echo-schema": "0.8.4-main.a4bbb77",
40
+ "@dxos/invariant": "0.8.4-main.a4bbb77",
41
+ "@dxos/keyboard": "0.8.4-main.a4bbb77",
42
+ "@dxos/lit-ui": "0.8.4-main.a4bbb77",
43
+ "@dxos/live-object": "0.8.4-main.a4bbb77",
44
+ "@dxos/local-storage": "0.8.4-main.a4bbb77",
45
+ "@dxos/log": "0.8.4-main.a4bbb77",
46
+ "@dxos/plugin-deck": "0.8.4-main.a4bbb77",
47
+ "@dxos/plugin-graph": "0.8.4-main.a4bbb77",
48
+ "@dxos/plugin-observability": "0.8.4-main.a4bbb77",
49
+ "@dxos/protocols": "0.8.4-main.a4bbb77",
50
+ "@dxos/react-client": "0.8.4-main.a4bbb77",
51
+ "@dxos/react-ui-attention": "0.8.4-main.a4bbb77",
52
+ "@dxos/react-ui-list": "0.8.4-main.a4bbb77",
53
+ "@dxos/react-ui-menu": "0.8.4-main.a4bbb77",
54
+ "@dxos/react-ui-searchlist": "0.8.4-main.a4bbb77",
55
+ "@dxos/react-ui-stack": "0.8.4-main.a4bbb77",
56
+ "@dxos/react-ui-tabs": "0.8.4-main.a4bbb77",
57
+ "@dxos/util": "0.8.4-main.a4bbb77"
57
58
  },
58
59
  "devDependencies": {
59
- "@effect-rx/rx-react": "0.38.0",
60
- "@effect/platform": "0.88.0",
61
- "@phosphor-icons/react": "^2.1.5",
62
- "@types/react": "~18.2.0",
63
- "@types/react-dom": "~18.2.0",
64
- "react": "~18.2.0",
65
- "react-dom": "~18.2.0",
66
- "vite": "5.4.7",
67
- "@dxos/echo-signals": "0.8.4-main.84f28bd",
68
- "@dxos/plugin-attention": "0.8.4-main.84f28bd",
69
- "@dxos/plugin-space": "0.8.4-main.84f28bd",
70
- "@dxos/plugin-client": "0.8.4-main.84f28bd",
71
- "@dxos/plugin-storybook-layout": "0.8.4-main.84f28bd",
72
- "@dxos/plugin-theme": "0.8.4-main.84f28bd",
73
- "@dxos/random": "0.8.4-main.84f28bd",
74
- "@dxos/react-ui": "0.8.4-main.84f28bd",
75
- "@dxos/react-ui-theme": "0.8.4-main.84f28bd",
76
- "@dxos/storybook-utils": "0.8.4-main.84f28bd"
60
+ "@effect-rx/rx-react": "0.42.4",
61
+ "@effect/platform": "0.92.1",
62
+ "@types/react": "~19.2.0",
63
+ "@types/react-dom": "~19.2.0",
64
+ "effect": "3.18.3",
65
+ "react": "~19.2.0",
66
+ "react-dom": "~19.2.0",
67
+ "vite": "7.1.9",
68
+ "@dxos/echo-signals": "0.8.4-main.a4bbb77",
69
+ "@dxos/plugin-attention": "0.8.4-main.a4bbb77",
70
+ "@dxos/plugin-client": "0.8.4-main.a4bbb77",
71
+ "@dxos/plugin-space": "0.8.4-main.a4bbb77",
72
+ "@dxos/plugin-storybook-layout": "0.8.4-main.a4bbb77",
73
+ "@dxos/plugin-theme": "0.8.4-main.a4bbb77",
74
+ "@dxos/random": "0.8.4-main.a4bbb77",
75
+ "@dxos/react-ui": "0.8.4-main.a4bbb77",
76
+ "@dxos/react-ui-theme": "0.8.4-main.a4bbb77",
77
+ "@dxos/storybook-utils": "0.8.4-main.a4bbb77"
77
78
  },
78
79
  "peerDependencies": {
79
80
  "@effect-rx/rx-react": "^0.34.1",
80
81
  "@effect/platform": "^0.80.12",
81
- "@phosphor-icons/react": "^2.1.5",
82
82
  "effect": "^3.13.3",
83
- "react": "~18.2.0",
84
- "react-dom": "~18.2.0",
85
- "@dxos/react-ui": "0.8.4-main.84f28bd",
86
- "@dxos/react-ui-theme": "0.8.4-main.84f28bd"
83
+ "react": "^19.0.0",
84
+ "react-dom": "^19.0.0",
85
+ "@dxos/react-ui": "0.8.4-main.a4bbb77",
86
+ "@dxos/react-ui-theme": "0.8.4-main.a4bbb77"
87
87
  },
88
88
  "publishConfig": {
89
89
  "access": "public"
@@ -3,14 +3,14 @@
3
3
  //
4
4
 
5
5
  import {
6
- definePlugin,
7
- defineModule,
8
- Events,
9
- contributes,
10
6
  Capabilities,
7
+ Events,
8
+ LayoutAction,
11
9
  allOf,
10
+ contributes,
12
11
  createIntent,
13
- LayoutAction,
12
+ defineModule,
13
+ definePlugin,
14
14
  } from '@dxos/app-framework';
15
15
  import { type TreeData } from '@dxos/react-ui-list';
16
16
 
@@ -20,76 +20,75 @@ import { NavTreeEvents } from './events';
20
20
  import { meta } from './meta';
21
21
  import { translations } from './translations';
22
22
 
23
- export const NavTreePlugin = () =>
24
- definePlugin(meta, [
25
- defineModule({
26
- id: `${meta.id}/module/state`,
27
- activatesOn: Events.LayoutReady,
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
- },
23
+ export const NavTreePlugin = definePlugin(meta, () => [
24
+ defineModule({
25
+ id: `${meta.id}/module/state`,
26
+ activatesOn: Events.LayoutReady,
27
+ activatesAfter: [NavTreeEvents.StateReady],
28
+ activate: State,
29
+ }),
30
+ defineModule({
31
+ id: `${meta.id}/module/translations`,
32
+ activatesOn: Events.SetupTranslations,
33
+ activate: () => contributes(Capabilities.Translations, translations),
34
+ }),
35
+ defineModule({
36
+ id: `${meta.id}/module/metadata`,
37
+ activatesOn: Events.SetupMetadata,
38
+ activate: () =>
39
+ contributes(Capabilities.Metadata, {
40
+ id: NODE_TYPE,
41
+ metadata: {
42
+ parse: ({ item }: TreeData, type: string) => {
43
+ switch (type) {
44
+ case 'node':
45
+ return item;
46
+ case 'object':
47
+ return item.data;
48
+ case 'view-object':
49
+ return { id: `${item.id}-view`, object: item.data };
50
+ }
53
51
  },
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
- }
52
+ },
53
+ }),
54
+ }),
55
+ defineModule({
56
+ id: `${meta.id}/module/expose`,
57
+ activatesOn: allOf(Events.DispatcherReady, Events.AppGraphReady, Events.LayoutReady, NavTreeEvents.StateReady),
58
+ activate: async (context) => {
59
+ const layout = context.getCapability(Capabilities.Layout);
60
+ const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
61
+ const { graph } = context.getCapability(Capabilities.AppGraph);
62
+ if (dispatch && layout.active.length === 1) {
63
+ // TODO(wittjosiah): This should really be fired once the navtree renders for the first time.
64
+ // That is the point at which the graph is expanded and the path should be available.
65
+ void graph
66
+ .waitForPath({ target: layout.active[0] }, { timeout: 30_000 })
67
+ .then(() => dispatch(createIntent(LayoutAction.Expose, { part: 'navigation', subject: layout.active[0] })))
68
+ .catch(() => {});
69
+ }
71
70
 
72
- return [];
73
- },
74
- }),
75
- defineModule({
76
- id: `${meta.id}/module/keyboard`,
77
- activatesOn: Events.AppGraphReady,
78
- activate: Keyboard,
79
- }),
80
- defineModule({
81
- id: `${meta.id}/module/react-surface`,
82
- activatesOn: Events.SetupReactSurface,
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
- ]);
71
+ return [];
72
+ },
73
+ }),
74
+ defineModule({
75
+ id: `${meta.id}/module/keyboard`,
76
+ activatesOn: Events.AppGraphReady,
77
+ activate: Keyboard,
78
+ }),
79
+ defineModule({
80
+ id: `${meta.id}/module/react-surface`,
81
+ activatesOn: Events.SetupReactSurface,
82
+ activate: ReactSurface,
83
+ }),
84
+ defineModule({
85
+ id: `${meta.id}/module/intent-resolver`,
86
+ activatesOn: Events.SetupIntentResolver,
87
+ activate: IntentResolver,
88
+ }),
89
+ defineModule({
90
+ id: `${meta.id}/module/app-graph-builder`,
91
+ activatesOn: Events.SetupAppGraph,
92
+ activate: AppGraphBuilder,
93
+ }),
94
+ ]);
@@ -5,16 +5,16 @@
5
5
  import { Rx } from '@effect-rx/rx-react';
6
6
  import { Option, pipe } from 'effect';
7
7
 
8
- import { Capabilities, contributes, type PluginContext, createIntent, LayoutAction } from '@dxos/app-framework';
9
- import { createExtension, ROOT_ID } from '@dxos/plugin-graph';
8
+ import { Capabilities, LayoutAction, type PluginContext, contributes, createIntent } from '@dxos/app-framework';
9
+ import { ROOT_ID, createExtension } from '@dxos/plugin-graph';
10
10
 
11
- import { COMMANDS_DIALOG, NAVTREE_PLUGIN } from '../meta';
11
+ import { COMMANDS_DIALOG, meta } from '../meta';
12
12
 
13
13
  export default (context: PluginContext) =>
14
14
  contributes(
15
15
  Capabilities.AppGraphBuilder,
16
16
  createExtension({
17
- id: NAVTREE_PLUGIN,
17
+ id: meta.id,
18
18
  actions: (node) =>
19
19
  Rx.make((get) =>
20
20
  pipe(
@@ -36,7 +36,7 @@ export default (context: PluginContext) =>
36
36
  );
37
37
  },
38
38
  properties: {
39
- label: ['open commands label', { ns: NAVTREE_PLUGIN }],
39
+ label: ['open commands label', { ns: meta.id }],
40
40
  icon: 'ph--magnifying-glass--regular',
41
41
  keyBinding: {
42
42
  macos: 'meta+k',
@@ -5,7 +5,7 @@
5
5
  import { defineCapability } from '@dxos/app-framework';
6
6
  import { type Live } from '@dxos/live-object';
7
7
 
8
- import { NAVTREE_PLUGIN } from '../meta';
8
+ import { meta } from '../meta';
9
9
  import { type NavTreeItemGraphNode } from '../types';
10
10
 
11
11
  export namespace NavTreeCapabilities {
@@ -16,5 +16,5 @@ export namespace NavTreeCapabilities {
16
16
  isOpen: (path: string[], item: NavTreeItemGraphNode) => boolean;
17
17
  isCurrent: (path: string[], item: NavTreeItemGraphNode) => boolean;
18
18
  isAlternateTree: (path: string[], item: NavTreeItemGraphNode) => boolean;
19
- }>(`${NAVTREE_PLUGIN}/capability/state`);
19
+ }>(`${meta.id}/capability/state`);
20
20
  }
@@ -4,7 +4,7 @@
4
4
 
5
5
  import { Schema } from 'effect';
6
6
 
7
- import { contributes, type PluginContext, Capabilities, createResolver, LayoutAction } from '@dxos/app-framework';
7
+ import { Capabilities, LayoutAction, type PluginContext, contributes, createResolver } from '@dxos/app-framework';
8
8
  import { log } from '@dxos/log';
9
9
 
10
10
  import { NavTreeCapabilities } from './capabilities';
@@ -2,10 +2,10 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { Capabilities as AppCapabilities, contributes, type PluginContext } from '@dxos/app-framework';
5
+ import { Capabilities as AppCapabilities, type PluginContext, contributes } from '@dxos/app-framework';
6
6
  import { debounce } from '@dxos/async';
7
7
  import { Keyboard } from '@dxos/keyboard';
8
- import { isAction, type Node } from '@dxos/plugin-graph';
8
+ import { type Node, isAction } from '@dxos/plugin-graph';
9
9
  import { getHostPlatform } from '@dxos/util';
10
10
 
11
11
  import { KEY_BINDING } from '../meta';
@@ -7,8 +7,8 @@ import React from 'react';
7
7
  import { Capabilities, contributes, createSurface } from '@dxos/app-framework';
8
8
  import { isGraphNode } from '@dxos/plugin-graph';
9
9
 
10
- import { CommandsDialogContent, CommandsTrigger, NavTreeDocumentTitle, NavTreeContainer } from '../components';
11
- import { COMMANDS_DIALOG, NAVTREE_PLUGIN } from '../meta';
10
+ import { CommandsDialogContent, CommandsTrigger, NavTreeContainer, NavTreeDocumentTitle } from '../components';
11
+ import { COMMANDS_DIALOG, meta } from '../meta';
12
12
 
13
13
  export default () =>
14
14
  contributes(Capabilities.ReactSurface, [
@@ -19,7 +19,7 @@ export default () =>
19
19
  component: ({ data }) => <CommandsDialogContent {...data.props} />,
20
20
  }),
21
21
  createSurface({
22
- id: `${NAVTREE_PLUGIN}/navigation`,
22
+ id: `${meta.id}/navigation`,
23
23
  role: 'navigation',
24
24
  filter: (data): data is { popoverAnchorId?: string; topbar: boolean; current: string } =>
25
25
  typeof data.current === 'string',
@@ -32,12 +32,12 @@ export default () =>
32
32
  ),
33
33
  }),
34
34
  createSurface({
35
- id: `${NAVTREE_PLUGIN}/document-title`,
35
+ id: `${meta.id}/document-title`,
36
36
  role: 'document-title',
37
37
  component: ({ data }) => <NavTreeDocumentTitle node={isGraphNode(data.subject) ? data.subject : undefined} />,
38
38
  }),
39
39
  createSurface({
40
- id: `${NAVTREE_PLUGIN}/search-input`,
40
+ id: `${meta.id}/search-input`,
41
41
  role: 'search-input',
42
42
  position: 'fallback',
43
43
  component: () => <CommandsTrigger />,
@@ -4,15 +4,16 @@
4
4
 
5
5
  import { effect, untracked } from '@preact/signals-core';
6
6
 
7
- import { Capabilities, contributes, type PluginContext } from '@dxos/app-framework';
7
+ import { Capabilities, type PluginContext, contributes } from '@dxos/app-framework';
8
8
  import { type Live } from '@dxos/echo';
9
9
  import { live } from '@dxos/live-object';
10
10
  import { Path } from '@dxos/react-ui-list';
11
11
 
12
+ import { meta } from '../meta';
13
+
12
14
  import { NavTreeCapabilities } from './capabilities';
13
- import { NAVTREE_PLUGIN } from '../meta';
14
15
 
15
- const KEY = `${NAVTREE_PLUGIN}/state/v1`;
16
+ const KEY = `${meta.id}/state/v1`;
16
17
 
17
18
  const getInitialState = () => {
18
19
  const stringified = localStorage.getItem(KEY);
@@ -4,11 +4,11 @@
4
4
 
5
5
  import React, { useMemo, useState } from 'react';
6
6
 
7
- import { createIntent, LayoutAction, useAppGraph, useIntentDispatcher } from '@dxos/app-framework';
7
+ import { LayoutAction, createIntent, useAppGraph, useIntentDispatcher } from '@dxos/app-framework';
8
8
  import { type ActionLike, isAction, isActionGroup } from '@dxos/app-graph';
9
9
  import { Keyboard, keySymbols } from '@dxos/keyboard';
10
10
  import { useActions } from '@dxos/plugin-graph';
11
- import { Button, Dialog, Icon, useTranslation, toLocalizedString } from '@dxos/react-ui';
11
+ import { Button, Dialog, Icon, toLocalizedString, useTranslation } from '@dxos/react-ui';
12
12
  import { SearchList } from '@dxos/react-ui-searchlist';
13
13
  import {
14
14
  cardDialogContent,
@@ -19,11 +19,11 @@ import {
19
19
  import { descriptionText, mx } from '@dxos/react-ui-theme';
20
20
  import { getHostPlatform } from '@dxos/util';
21
21
 
22
- import { KEY_BINDING, NAVTREE_PLUGIN } from '../../meta';
22
+ import { KEY_BINDING, meta } from '../../meta';
23
23
 
24
24
  // TODO(wittjosiah): This probably deserves its own plugin but for now it lives here w/ other navigation UI.
25
25
  export const CommandsDialogContent = ({ selected: initial }: { selected?: string }) => {
26
- const { t } = useTranslation(NAVTREE_PLUGIN);
26
+ const { t } = useTranslation(meta.id);
27
27
  const [selected, setSelected] = useState<string | undefined>(initial);
28
28
  const { dispatchPromise: dispatch } = useIntentDispatcher();
29
29
  const { graph } = useAppGraph();
@@ -63,7 +63,7 @@ export const CommandsDialogContent = ({ selected: initial }: { selected?: string
63
63
 
64
64
  return (
65
65
  <Dialog.Content classNames={cardDialogContent}>
66
- <Dialog.Title classNames={cardDialogHeader}>{t('commands dialog title', { ns: NAVTREE_PLUGIN })}</Dialog.Title>
66
+ <Dialog.Title classNames={cardDialogHeader}>{t('commands dialog title', { ns: meta.id })}</Dialog.Title>
67
67
 
68
68
  {/* TODO(burdon): BUG: Overscrolls container. */}
69
69
  <SearchList.Root label={t('command list input placeholder')} classNames={cardDialogSearchListRoot}>
@@ -2,19 +2,17 @@
2
2
  // Copyright 2024 DXOS.org
3
3
  //
4
4
 
5
- import { MagnifyingGlass } from '@phosphor-icons/react';
6
5
  import React from 'react';
7
6
 
8
- import { createIntent, LayoutAction, useIntentDispatcher } from '@dxos/app-framework';
9
- import { Button, useTranslation } from '@dxos/react-ui';
10
- import { getSize } from '@dxos/react-ui-theme';
7
+ import { LayoutAction, createIntent, useIntentDispatcher } from '@dxos/app-framework';
8
+ import { Button, Icon, useTranslation } from '@dxos/react-ui';
11
9
 
12
- import { COMMANDS_DIALOG, NAVTREE_PLUGIN } from '../../meta';
10
+ import { COMMANDS_DIALOG, meta } from '../../meta';
13
11
 
14
12
  // TODO(thure): Refactor to be handled by a more appropriate plugin.
15
13
  export const CommandsTrigger = () => {
16
14
  const { dispatchPromise: dispatch } = useIntentDispatcher();
17
- const { t } = useTranslation(NAVTREE_PLUGIN);
15
+ const { t } = useTranslation(meta.id);
18
16
  return (
19
17
  <Button
20
18
  classNames='m-1 pli-1 lg:pli-2'
@@ -31,7 +29,7 @@ export const CommandsTrigger = () => {
31
29
  }
32
30
  >
33
31
  <span className='text-description font-normal grow text-start'>{t('command list input placeholder')}</span>
34
- <MagnifyingGlass className={getSize(5)} />
32
+ <Icon icon='ph--magnifying-glass--regular' size={5} />
35
33
  </Button>
36
34
  );
37
35
  };
@@ -2,9 +2,7 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import '@dxos-theme';
6
-
7
- import { type StoryObj, type Meta } from '@storybook/react-vite';
5
+ import { type Meta, type StoryObj } from '@storybook/react-vite';
8
6
  import { Schema } from 'effect';
9
7
  import React from 'react';
10
8
 
@@ -28,10 +26,10 @@ import { StorybookLayoutPlugin } from '@dxos/plugin-storybook-layout';
28
26
  import { ThemePlugin } from '@dxos/plugin-theme';
29
27
  import { faker } from '@dxos/random';
30
28
  import { IconButton, Input, Main, Toolbar } from '@dxos/react-ui';
31
- import { useAttentionAttributes, useAttention } from '@dxos/react-ui-attention';
29
+ import { withTheme } from '@dxos/react-ui/testing';
30
+ import { useAttention, useAttentionAttributes } from '@dxos/react-ui-attention';
32
31
  import { Stack, StackItem } from '@dxos/react-ui-stack';
33
32
  import { defaultTx, mx } from '@dxos/react-ui-theme';
34
- import { withLayout } from '@dxos/storybook-utils';
35
33
 
36
34
  import { NavTreePlugin } from '../../NavTreePlugin';
37
35
  import { storybookGraphBuilders } from '../../testing';
@@ -116,20 +114,21 @@ const DefaultStory = () => {
116
114
  );
117
115
  };
118
116
 
119
- const meta: Meta<typeof NavTreeContainer> = {
117
+ const meta = {
120
118
  title: 'plugins/plugin-navtree/NavTree',
121
119
  component: NavTreeContainer,
122
120
  render: DefaultStory,
123
121
  decorators: [
122
+ withTheme,
124
123
  withPluginManager({
125
124
  plugins: [
126
125
  ThemePlugin({ tx: defaultTx }),
127
- StorybookLayoutPlugin({ initialState: { sidebarState: 'expanded' } }),
128
126
  GraphPlugin(),
129
127
  IntentPlugin(),
130
128
  SettingsPlugin(),
131
129
  AttentionPlugin(),
132
130
  NavTreePlugin(),
131
+ StorybookLayoutPlugin({ initialState: { sidebarState: 'expanded' } }),
133
132
  ],
134
133
  capabilities: (context) => [
135
134
  contributes(StoryState, live({ tab: 'space-0' })),
@@ -147,12 +146,12 @@ const meta: Meta<typeof NavTreeContainer> = {
147
146
  ]),
148
147
  ],
149
148
  }),
150
- withLayout({ fullscreen: true }),
151
149
  ],
152
150
  parameters: {
151
+ layout: 'fullscreen',
153
152
  translations,
154
153
  },
155
- };
154
+ } satisfies Meta<typeof NavTreeContainer>;
156
155
 
157
156
  export default meta;
158
157
 
@@ -165,19 +164,20 @@ export const WithClient: Story = {
165
164
  decorators: [
166
165
  withPluginManager({
167
166
  plugins: [
168
- ThemePlugin({ tx: defaultTx }),
167
+ ClientPlugin({
168
+ onClientInitialized: async ({ client }) => {
169
+ await client.halo.createIdentity();
170
+ },
171
+ }),
172
+ SpacePlugin({}),
169
173
  GraphPlugin(),
170
174
  IntentPlugin(),
171
175
  SettingsPlugin(),
172
176
  AttentionPlugin(),
177
+
178
+ // UI
179
+ ThemePlugin({ tx: defaultTx }),
173
180
  NavTreePlugin(),
174
- ClientPlugin({
175
- onClientInitialized: async (_, client) => {
176
- await client.halo.createIdentity();
177
- },
178
- }),
179
- SpacePlugin(),
180
- // Needs to be last so that the dialog and popovers have access to all contexts.
181
181
  StorybookLayoutPlugin({ initialState: { sidebarState: 'expanded' } }),
182
182
  ],
183
183
  capabilities: (context) => [
@@ -195,6 +195,9 @@ export const WithClient: Story = {
195
195
  ]),
196
196
  ],
197
197
  }),
198
- withLayout({ fullscreen: true }),
199
198
  ],
199
+ parameters: {
200
+ layout: 'fullscreen',
201
+ translations,
202
+ },
200
203
  };
@@ -10,11 +10,11 @@ import { Tabs } from '@dxos/react-ui-tabs';
10
10
  import { useLoadDescendents } from '../../hooks';
11
11
  import { type NavTreeItemGraphNode } from '../../types';
12
12
  import { useNavTreeContext } from '../NavTreeContext';
13
- import { L0Menu, L1Panels, type L1PanelsProps } from '../Sidebar';
13
+ import { L0Menu, L1Tabs, type L1TabsProps } from '../Sidebar';
14
14
 
15
15
  export const NAV_TREE_ITEM = 'NavTreeItem';
16
16
 
17
- export type NavTreeProps = Pick<TreeProps<NavTreeItemGraphNode>, 'id' | 'root'> & Pick<L1PanelsProps, 'open'>;
17
+ export type NavTreeProps = Pick<TreeProps<NavTreeItemGraphNode>, 'id' | 'root'> & Pick<L1TabsProps, 'open'>;
18
18
 
19
19
  export const NavTree = ({ id, root, ...props }: NavTreeProps) => {
20
20
  const { tab, useItems, onBack } = useNavTreeContext();
@@ -47,6 +47,10 @@ export const NavTree = ({ id, root, ...props }: NavTreeProps) => {
47
47
  const path = useMemo(() => [id], [id]);
48
48
 
49
49
  return (
50
+ // TODO(thure): `Tabs.Root` forces all items that should be able to receive focus to use `Tabs.Tab(Primitive)` since
51
+ // it uses RovingFocus and doesn’t support moving focus to an item that is not a tab. Assess whether this situation
52
+ // should change including whether it should motivate a change in the design/taxonomy, or if this means this should
53
+ // not use `react-ui-tabs` at all.
50
54
  <Tabs.Root value={tab} orientation='vertical' verticalVariant='stateless' classNames='relative'>
51
55
  <L0Menu
52
56
  menuActions={topLevelActions}
@@ -56,7 +60,7 @@ export const NavTree = ({ id, root, ...props }: NavTreeProps) => {
56
60
  path={path}
57
61
  parent={root}
58
62
  />
59
- <L1Panels topLevelItems={topLevelItems} path={path} currentItemId={tab} onBack={onBack} {...props} />
63
+ <L1Tabs topLevelItems={topLevelItems} path={path} currentItemId={tab} onBack={onBack} {...props} />
60
64
  </Tabs.Root>
61
65
  );
62
66
  };