@dxos/plugin-help 0.8.4-main.a4bbb77 → 0.8.4-main.abd8ff62ef

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 (141) hide show
  1. package/dist/lib/browser/chunk-53QC3FTJ.mjs +34 -0
  2. package/dist/lib/browser/chunk-53QC3FTJ.mjs.map +7 -0
  3. package/dist/lib/browser/chunk-EEXGETLQ.mjs +16 -0
  4. package/dist/lib/browser/chunk-EEXGETLQ.mjs.map +7 -0
  5. package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
  6. package/dist/lib/browser/chunk-J5LGTIGS.mjs.map +7 -0
  7. package/dist/lib/browser/chunk-RWK34XL5.mjs +31 -0
  8. package/dist/lib/browser/chunk-RWK34XL5.mjs.map +7 -0
  9. package/dist/lib/browser/index.mjs +13 -97
  10. package/dist/lib/browser/index.mjs.map +4 -4
  11. package/dist/lib/browser/meta.json +1 -1
  12. package/dist/lib/browser/meta.mjs +2 -1
  13. package/dist/lib/browser/operations/index.mjs +13 -0
  14. package/dist/lib/browser/operations/index.mjs.map +7 -0
  15. package/dist/lib/browser/start-JQ2LLVCT.mjs +23 -0
  16. package/dist/lib/browser/start-JQ2LLVCT.mjs.map +7 -0
  17. package/dist/lib/browser/translations.mjs +20 -0
  18. package/dist/lib/browser/translations.mjs.map +7 -0
  19. package/dist/lib/browser/types/index.mjs +4 -4
  20. package/dist/types/src/HelpPlugin.d.ts +4 -2
  21. package/dist/types/src/HelpPlugin.d.ts.map +1 -1
  22. package/dist/types/src/HelpPlugin.test.d.ts +2 -0
  23. package/dist/types/src/HelpPlugin.test.d.ts.map +1 -0
  24. package/dist/types/src/capabilities/app-graph-builder.d.ts +4 -2
  25. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
  26. package/dist/types/src/capabilities/index.d.ts +16 -6
  27. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  28. package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
  29. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
  30. package/dist/types/src/capabilities/react-root.d.ts +5 -3
  31. package/dist/types/src/capabilities/react-root.d.ts.map +1 -1
  32. package/dist/types/src/capabilities/react-surface.d.ts +3 -2
  33. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
  34. package/dist/types/src/capabilities/state.d.ts +11 -2
  35. package/dist/types/src/capabilities/state.d.ts.map +1 -1
  36. package/dist/types/src/components/Shortcuts/Key.d.ts.map +1 -1
  37. package/dist/types/src/components/Shortcuts/ShortcutsHints.d.ts.map +1 -1
  38. package/dist/types/src/components/Shortcuts/ShortcutsSection.d.ts.map +1 -1
  39. package/dist/types/src/components/Shortcuts/index.d.ts +0 -1
  40. package/dist/types/src/components/Shortcuts/index.d.ts.map +1 -1
  41. package/dist/types/src/components/Tooltip/Tooltip.d.ts +9 -9
  42. package/dist/types/src/components/Tooltip/Tooltip.d.ts.map +1 -1
  43. package/dist/types/src/components/WelcomeTour/WelcomeTour.d.ts +1 -1
  44. package/dist/types/src/components/WelcomeTour/WelcomeTour.d.ts.map +1 -1
  45. package/dist/types/src/components/WelcomeTour/WelcomeTour.stories.d.ts.map +1 -1
  46. package/dist/types/src/constants.d.ts +2 -0
  47. package/dist/types/src/constants.d.ts.map +1 -0
  48. package/dist/types/src/{components/Shortcuts/ShortcutsDialog.d.ts → containers/ShortcutsDialogContent/ShortcutsDialogContent.d.ts} +1 -2
  49. package/dist/types/src/containers/ShortcutsDialogContent/ShortcutsDialogContent.d.ts.map +1 -0
  50. package/dist/types/src/containers/ShortcutsDialogContent/ShortcutsDialogContent.stories.d.ts +25 -0
  51. package/dist/types/src/containers/ShortcutsDialogContent/ShortcutsDialogContent.stories.d.ts.map +1 -0
  52. package/dist/types/src/containers/ShortcutsDialogContent/index.d.ts +2 -0
  53. package/dist/types/src/containers/ShortcutsDialogContent/index.d.ts.map +1 -0
  54. package/dist/types/src/containers/ShortcutsHints/ShortcutsHints.d.ts +2 -0
  55. package/dist/types/src/containers/ShortcutsHints/ShortcutsHints.d.ts.map +1 -0
  56. package/dist/types/src/containers/ShortcutsHints/index.d.ts +2 -0
  57. package/dist/types/src/containers/ShortcutsHints/index.d.ts.map +1 -0
  58. package/dist/types/src/containers/ShortcutsList/ShortcutsList.d.ts +2 -0
  59. package/dist/types/src/containers/ShortcutsList/ShortcutsList.d.ts.map +1 -0
  60. package/dist/types/src/containers/ShortcutsList/index.d.ts +2 -0
  61. package/dist/types/src/containers/ShortcutsList/index.d.ts.map +1 -0
  62. package/dist/types/src/containers/index.d.ts +5 -0
  63. package/dist/types/src/containers/index.d.ts.map +1 -0
  64. package/dist/types/src/hooks/useHelp.d.ts +1 -1
  65. package/dist/types/src/hooks/useHelp.d.ts.map +1 -1
  66. package/dist/types/src/index.d.ts +5 -4
  67. package/dist/types/src/index.d.ts.map +1 -1
  68. package/dist/types/src/meta.d.ts +2 -2
  69. package/dist/types/src/meta.d.ts.map +1 -1
  70. package/dist/types/src/operations/definitions.d.ts +4 -0
  71. package/dist/types/src/operations/definitions.d.ts.map +1 -0
  72. package/dist/types/src/operations/index.d.ts +4 -0
  73. package/dist/types/src/operations/index.d.ts.map +1 -0
  74. package/dist/types/src/operations/start.d.ts +5 -0
  75. package/dist/types/src/operations/start.d.ts.map +1 -0
  76. package/dist/types/src/translations.d.ts +5 -6
  77. package/dist/types/src/translations.d.ts.map +1 -1
  78. package/dist/types/src/types/capabilities.d.ts +21 -0
  79. package/dist/types/src/types/capabilities.d.ts.map +1 -0
  80. package/dist/types/src/types/index.d.ts +1 -0
  81. package/dist/types/src/types/index.d.ts.map +1 -1
  82. package/dist/types/src/types/schema.d.ts +2 -14
  83. package/dist/types/src/types/schema.d.ts.map +1 -1
  84. package/dist/types/tsconfig.tsbuildinfo +1 -1
  85. package/package.json +62 -45
  86. package/src/HelpPlugin.test.ts +30 -0
  87. package/src/HelpPlugin.tsx +21 -44
  88. package/src/capabilities/app-graph-builder.ts +53 -67
  89. package/src/capabilities/index.ts +10 -7
  90. package/src/capabilities/operation-handler.ts +16 -0
  91. package/src/capabilities/react-root.tsx +28 -25
  92. package/src/capabilities/react-surface.tsx +28 -22
  93. package/src/capabilities/state.ts +19 -16
  94. package/src/components/Shortcuts/ShortcutsHints.tsx +13 -5
  95. package/src/components/Shortcuts/ShortcutsList.tsx +4 -4
  96. package/src/components/Shortcuts/ShortcutsSection.tsx +1 -3
  97. package/src/components/Shortcuts/index.ts +0 -1
  98. package/src/components/Shortcuts/styles.ts +3 -3
  99. package/src/components/Tooltip/Tooltip.tsx +4 -5
  100. package/src/components/WelcomeTour/WelcomeTour.stories.tsx +17 -13
  101. package/src/components/WelcomeTour/WelcomeTour.tsx +6 -3
  102. package/src/constants.ts +7 -0
  103. package/src/containers/ShortcutsDialogContent/ShortcutsDialogContent.stories.tsx +39 -0
  104. package/src/containers/ShortcutsDialogContent/ShortcutsDialogContent.tsx +28 -0
  105. package/src/containers/ShortcutsDialogContent/index.ts +5 -0
  106. package/src/containers/ShortcutsHints/ShortcutsHints.tsx +5 -0
  107. package/src/containers/ShortcutsHints/index.ts +5 -0
  108. package/src/containers/ShortcutsList/ShortcutsList.tsx +5 -0
  109. package/src/containers/ShortcutsList/index.ts +5 -0
  110. package/src/containers/index.ts +9 -0
  111. package/src/hooks/useHelp.tsx +1 -1
  112. package/src/index.ts +9 -4
  113. package/src/meta.ts +8 -3
  114. package/src/operations/definitions.ts +19 -0
  115. package/src/operations/index.ts +9 -0
  116. package/src/operations/start.ts +21 -0
  117. package/src/translations.ts +5 -5
  118. package/src/types/capabilities.ts +24 -0
  119. package/src/types/index.ts +1 -0
  120. package/src/types/schema.ts +2 -12
  121. package/dist/lib/browser/app-graph-builder-AR2S4WLE.mjs +0 -79
  122. package/dist/lib/browser/app-graph-builder-AR2S4WLE.mjs.map +0 -7
  123. package/dist/lib/browser/chunk-3WYHGOGD.mjs +0 -16
  124. package/dist/lib/browser/chunk-3WYHGOGD.mjs.map +0 -7
  125. package/dist/lib/browser/chunk-4KB36WUN.mjs +0 -34
  126. package/dist/lib/browser/chunk-4KB36WUN.mjs.map +0 -7
  127. package/dist/lib/browser/chunk-HUJHLAHD.mjs +0 -11
  128. package/dist/lib/browser/chunk-HUJHLAHD.mjs.map +0 -7
  129. package/dist/lib/browser/chunk-RZFM47PY.mjs +0 -407
  130. package/dist/lib/browser/chunk-RZFM47PY.mjs.map +0 -7
  131. package/dist/lib/browser/react-root-WTD4XPY6.mjs +0 -34
  132. package/dist/lib/browser/react-root-WTD4XPY6.mjs.map +0 -7
  133. package/dist/lib/browser/react-surface-ZFAK7QKZ.mjs +0 -36
  134. package/dist/lib/browser/react-surface-ZFAK7QKZ.mjs.map +0 -7
  135. package/dist/lib/browser/state-Y7EYMGFM.mjs +0 -29
  136. package/dist/lib/browser/state-Y7EYMGFM.mjs.map +0 -7
  137. package/dist/types/src/capabilities/capabilities.d.ts +0 -10
  138. package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
  139. package/dist/types/src/components/Shortcuts/ShortcutsDialog.d.ts.map +0 -1
  140. package/src/capabilities/capabilities.ts +0 -13
  141. package/src/components/Shortcuts/ShortcutsDialog.tsx +0 -35
package/package.json CHANGED
@@ -1,13 +1,28 @@
1
1
  {
2
2
  "name": "@dxos/plugin-help",
3
- "version": "0.8.4-main.a4bbb77",
3
+ "version": "0.8.4-main.abd8ff62ef",
4
4
  "description": "Help plugin.",
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
+ "#plugin": "./src/HelpPlugin.tsx",
17
+ "#capabilities": "./src/capabilities/index.ts",
18
+ "#components": "./src/components/index.ts",
19
+ "#containers": "./src/containers/index.ts",
20
+ "#hooks": "./src/hooks/index.ts",
21
+ "#meta": "./src/meta.ts",
22
+ "#operations": "./src/operations/index.ts",
23
+ "#translations": "./src/translations.ts",
24
+ "#types": "./src/types/index.ts"
25
+ },
11
26
  "exports": {
12
27
  ".": {
13
28
  "source": "./src/index.ts",
@@ -19,6 +34,17 @@
19
34
  "types": "./dist/types/src/meta.d.ts",
20
35
  "browser": "./dist/lib/browser/meta.mjs"
21
36
  },
37
+ "./operations": {
38
+ "source": "./src/operations/index.ts",
39
+ "types": "./dist/types/src/operations/index.d.ts",
40
+ "browser": "./dist/lib/browser/operations/index.mjs"
41
+ },
42
+ "./translations": {
43
+ "source": "./src/translations.ts",
44
+ "types": "./dist/types/src/translations.d.ts",
45
+ "browser": "./dist/lib/browser/translations.mjs",
46
+ "node": "./dist/lib/node-esm/translations.mjs"
47
+ },
22
48
  "./types": {
23
49
  "source": "./src/types/index.ts",
24
50
  "types": "./dist/types/src/types/index.d.ts",
@@ -26,62 +52,53 @@
26
52
  }
27
53
  },
28
54
  "types": "dist/types/src/index.d.ts",
29
- "typesVersions": {
30
- "*": {
31
- "meta": [
32
- "dist/types/src/meta.d.ts"
33
- ],
34
- "types": [
35
- "dist/types/src/types/index.d.ts"
36
- ]
37
- }
38
- },
39
55
  "files": [
40
56
  "dist",
41
57
  "src"
42
58
  ],
43
59
  "dependencies": {
44
- "@fluentui/react-tabster": "^9.24.2",
45
- "@preact-signals/safe-react": "^0.9.0",
60
+ "@effect-atom/atom": "^0.5.1",
61
+ "@fluentui/react-tabster": "9.26.11",
46
62
  "react-joyride": "^2.7.2",
47
- "@dxos/app-framework": "0.8.4-main.a4bbb77",
48
- "@dxos/debug": "0.8.4-main.a4bbb77",
49
- "@dxos/echo-schema": "0.8.4-main.a4bbb77",
50
- "@dxos/app-graph": "0.8.4-main.a4bbb77",
51
- "@dxos/keyboard": "0.8.4-main.a4bbb77",
52
- "@dxos/live-object": "0.8.4-main.a4bbb77",
53
- "@dxos/echo": "0.8.4-main.a4bbb77",
54
- "@dxos/plugin-client": "0.8.4-main.a4bbb77",
55
- "@dxos/local-storage": "0.8.4-main.a4bbb77",
56
- "@dxos/plugin-graph": "0.8.4-main.a4bbb77",
57
- "@dxos/react-client": "0.8.4-main.a4bbb77",
58
- "@dxos/plugin-space": "0.8.4-main.a4bbb77"
63
+ "@dxos/app-framework": "0.8.4-main.abd8ff62ef",
64
+ "@dxos/app-toolkit": "0.8.4-main.abd8ff62ef",
65
+ "@dxos/app-graph": "0.8.4-main.abd8ff62ef",
66
+ "@dxos/compute": "0.8.4-main.abd8ff62ef",
67
+ "@dxos/echo": "0.8.4-main.abd8ff62ef",
68
+ "@dxos/debug": "0.8.4-main.abd8ff62ef",
69
+ "@dxos/effect": "0.8.4-main.abd8ff62ef",
70
+ "@dxos/keyboard": "0.8.4-main.abd8ff62ef",
71
+ "@dxos/plugin-client": "0.8.4-main.abd8ff62ef",
72
+ "@dxos/util": "0.8.4-main.abd8ff62ef",
73
+ "@dxos/plugin-space": "0.8.4-main.abd8ff62ef",
74
+ "@dxos/plugin-graph": "0.8.4-main.abd8ff62ef",
75
+ "@dxos/react-client": "0.8.4-main.abd8ff62ef"
59
76
  },
60
77
  "devDependencies": {
61
- "@effect-rx/rx-react": "0.42.4",
62
- "@effect/platform": "0.92.1",
63
- "@types/react": "~19.2.0",
64
- "@types/react-dom": "~19.2.0",
65
- "effect": "3.18.3",
66
- "react": "~19.2.0",
67
- "react-dom": "~19.2.0",
78
+ "@effect-atom/atom-react": "^0.5.0",
79
+ "@effect/platform": "0.94.4",
80
+ "@types/react": "~19.2.7",
81
+ "@types/react-dom": "~19.2.3",
82
+ "effect": "3.20.0",
83
+ "react": "~19.2.3",
84
+ "react-dom": "~19.2.3",
68
85
  "react-floater": "0.7.9",
69
86
  "type-fest": "4.10.1",
70
- "vite": "7.1.9",
71
- "@dxos/plugin-storybook-layout": "0.8.4-main.a4bbb77",
72
- "@dxos/random": "0.8.4-main.a4bbb77",
73
- "@dxos/react-ui": "0.8.4-main.a4bbb77",
74
- "@dxos/react-ui-theme": "0.8.4-main.a4bbb77",
75
- "@dxos/storybook-utils": "0.8.4-main.a4bbb77"
87
+ "vite": "^8.0.10",
88
+ "@dxos/plugin-testing": "0.8.4-main.abd8ff62ef",
89
+ "@dxos/random": "0.8.4-main.abd8ff62ef",
90
+ "@dxos/react-ui": "0.8.4-main.abd8ff62ef",
91
+ "@dxos/storybook-utils": "0.8.4-main.abd8ff62ef",
92
+ "@dxos/ui-theme": "0.8.4-main.abd8ff62ef"
76
93
  },
77
94
  "peerDependencies": {
78
- "@effect-rx/rx-react": "^0.34.1",
79
- "@effect/platform": "^0.80.12",
80
- "effect": "^3.13.3",
81
- "react": "^19.0.0",
82
- "react-dom": "^19.0.0",
83
- "@dxos/react-ui": "0.8.4-main.a4bbb77",
84
- "@dxos/react-ui-theme": "0.8.4-main.a4bbb77"
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.abd8ff62ef",
101
+ "@dxos/ui-theme": "0.8.4-main.abd8ff62ef"
85
102
  },
86
103
  "publishConfig": {
87
104
  "access": "public"
@@ -0,0 +1,30 @@
1
+ //
2
+ // Copyright 2026 DXOS.org
3
+ //
4
+
5
+ import { describe, test } from 'vitest';
6
+
7
+ import { ActivationEvents } from '@dxos/app-framework';
8
+ import { createComposerTestApp } from '@dxos/plugin-testing/harness';
9
+
10
+ import { HelpPlugin } from '#plugin';
11
+
12
+ import { meta } from './meta';
13
+
14
+ const moduleId = (name: string) => `${meta.id}.module.${name}`;
15
+
16
+ describe('HelpPlugin', () => {
17
+ test('modules activate on the expected events', async ({ expect }) => {
18
+ await using harness = await createComposerTestApp({
19
+ plugins: [HelpPlugin({})],
20
+ });
21
+
22
+ expect(harness.manager.getActive()).toEqual(
23
+ expect.arrayContaining([moduleId('AppGraphBuilder'), moduleId('ReactSurface')]),
24
+ );
25
+
26
+ // Operation handlers are not loaded on startup — SetupOperationHandler fires lazily when an operation is invoked.
27
+ await harness.fire(ActivationEvents.SetupOperationHandler);
28
+ expect(harness.manager.getActive()).toContain(moduleId('OperationHandler'));
29
+ });
30
+ });
@@ -2,54 +2,31 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { Capabilities, Events, contributes, createResolver, defineModule, definePlugin } from '@dxos/app-framework';
5
+ import { ActivationEvents, Plugin } from '@dxos/app-framework';
6
+ import { AppPlugin } from '@dxos/app-toolkit';
6
7
 
7
- import { AppGraphBuilder, HelpCapabilities, HelpState, ReactRoot, ReactSurface } from './capabilities';
8
- import { meta } from './meta';
9
- import { translations } from './translations';
10
- import { HelpAction, type Step } from './types';
8
+ import { AppGraphBuilder, HelpState, OperationHandler, ReactRoot, ReactSurface } from '#capabilities';
9
+ import { meta } from '#meta';
10
+ import { translations } from '#translations';
11
+ import { type Step } from '#types';
11
12
 
12
13
  export type HelpPluginOptions = { steps?: Step[] };
13
14
 
14
- export const HelpPlugin = definePlugin<HelpPluginOptions>(meta, ({ steps = [] }) => [
15
- defineModule({
16
- id: `${meta.id}/module/state`,
17
- activatesOn: Events.Startup,
15
+ export const HelpPlugin = Plugin.define<HelpPluginOptions>(meta).pipe(
16
+ AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),
17
+ AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
18
+ AppPlugin.addSurfaceModule({ activate: ReactSurface }),
19
+ AppPlugin.addTranslationsModule({ translations }),
20
+ Plugin.addModule({
21
+ activatesOn: ActivationEvents.Startup,
18
22
  activate: HelpState,
19
23
  }),
20
- defineModule({
21
- id: `${meta.id}/module/translations`,
22
- activatesOn: Events.SetupTranslations,
23
- activate: () => contributes(Capabilities.Translations, translations),
24
- }),
25
- defineModule({
26
- id: `${meta.id}/module/react-root`,
27
- activatesOn: Events.Startup,
24
+ Plugin.addModule(({ steps = [] }) => ({
25
+ id: 'react-root',
26
+ activatesOn: ActivationEvents.Startup,
28
27
  activate: () => ReactRoot(steps),
29
- }),
30
- defineModule({
31
- id: `${meta.id}/module/react-surface`,
32
- activatesOn: Events.SetupReactSurface,
33
- activate: ReactSurface,
34
- }),
35
- defineModule({
36
- id: `${meta.id}/module/intent-resolver`,
37
- activatesOn: Events.SetupIntentResolver,
38
- activate: (context) =>
39
- contributes(
40
- Capabilities.IntentResolver,
41
- createResolver({
42
- intent: HelpAction.Start,
43
- resolve: () => {
44
- const state = context.getCapability(HelpCapabilities.MutableState);
45
- state.running = true;
46
- },
47
- }),
48
- ),
49
- }),
50
- defineModule({
51
- id: `${meta.id}/module/app-graph-builder`,
52
- activatesOn: Events.SetupAppGraph,
53
- activate: AppGraphBuilder,
54
- }),
55
- ]);
28
+ })),
29
+ Plugin.make,
30
+ );
31
+
32
+ export default HelpPlugin;
@@ -2,76 +2,62 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { Rx } from '@effect-rx/rx-react';
6
- import { Option, pipe } from 'effect';
5
+ import * as Effect from 'effect/Effect';
7
6
 
8
- import { Capabilities, LayoutAction, type PluginContext, contributes, createIntent } from '@dxos/app-framework';
9
- import { createExtension } from '@dxos/app-graph';
7
+ import { Capabilities, Capability } from '@dxos/app-framework';
8
+ import { GraphBuilder, Node, NodeMatcher } from '@dxos/app-graph';
9
+ import { AppCapabilities, LayoutOperation } from '@dxos/app-toolkit';
10
+ import { Operation } from '@dxos/compute';
10
11
 
11
- import { SHORTCUTS_DIALOG } from '../components';
12
- import { meta } from '../meta';
13
- import { HelpAction } from '../types';
12
+ import { meta } from '#meta';
13
+ import { HelpOperation } from '#operations';
14
+ import { HelpCapabilities } from '#types';
14
15
 
15
- import { HelpCapabilities } from './capabilities';
16
+ import { SHORTCUTS_DIALOG } from '../constants';
16
17
 
17
- export default (context: PluginContext) =>
18
- contributes(
19
- Capabilities.AppGraphBuilder,
20
- createExtension({
21
- id: meta.id,
22
- actions: (node) =>
23
- Rx.make((get) =>
24
- pipe(
25
- get(node),
26
- Option.flatMap((node) => (node.id === 'root' ? Option.some(node) : Option.none())),
27
- Option.map(() => [
28
- {
29
- id: HelpAction.Start._tag,
30
- data: async () => {
31
- const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
32
- const state = context.getCapability(HelpCapabilities.MutableState);
33
- state.showHints = true;
34
- await dispatch(createIntent(HelpAction.Start));
35
- },
36
- properties: {
37
- label: ['open help tour', { ns: meta.id }],
38
- icon: 'ph--info--regular',
39
- keyBinding: {
40
- macos: 'shift+meta+/',
41
- // TODO(wittjosiah): Test on windows to see if it behaves the same as linux.
42
- windows: 'shift+ctrl+/',
43
- linux: 'shift+ctrl+?',
44
- },
45
- testId: 'helpPlugin.openHelp',
46
- },
18
+ export default Capability.makeModule(
19
+ Effect.fnUntraced(function* () {
20
+ const extensions = yield* GraphBuilder.createExtension({
21
+ id: 'root',
22
+ match: NodeMatcher.whenRoot,
23
+ actions: () =>
24
+ Effect.succeed([
25
+ Node.makeAction({
26
+ id: HelpOperation.Start.meta.key,
27
+ data: Effect.fnUntraced(function* () {
28
+ yield* Capabilities.updateAtomValue(HelpCapabilities.State, (s) => ({ ...s, showHints: true }));
29
+ yield* Operation.invoke(HelpOperation.Start);
30
+ }),
31
+ properties: {
32
+ label: ['open-help-tour.message', { ns: meta.id }],
33
+ icon: 'ph--info--regular',
34
+ keyBinding: {
35
+ macos: 'shift+meta+/',
36
+ windows: 'shift+ctrl+/',
37
+ linux: 'shift+ctrl+?',
47
38
  },
48
- {
49
- id: `${meta.id}/open-shortcuts`,
50
- data: async () => {
51
- const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
52
- const state = context.getCapability(HelpCapabilities.MutableState);
53
- state.showHints = true;
54
- await dispatch(
55
- createIntent(LayoutAction.UpdateDialog, {
56
- part: 'dialog',
57
- subject: SHORTCUTS_DIALOG,
58
- options: {
59
- blockAlign: 'center',
60
- },
61
- }),
62
- );
63
- },
64
- properties: {
65
- label: ['open shortcuts label', { ns: meta.id }],
66
- icon: 'ph--keyboard--regular',
67
- keyBinding: {
68
- macos: 'meta+ctrl+/',
69
- },
70
- },
39
+ testId: 'helpPlugin.openHelp',
40
+ },
41
+ }),
42
+ Node.makeAction({
43
+ id: 'open-shortcuts',
44
+ data: Effect.fnUntraced(function* () {
45
+ yield* Capabilities.updateAtomValue(HelpCapabilities.State, (s) => ({ ...s, showHints: true }));
46
+ yield* Operation.invoke(LayoutOperation.UpdateDialog, {
47
+ subject: SHORTCUTS_DIALOG,
48
+ });
49
+ }),
50
+ properties: {
51
+ label: ['open-shortcuts.label', { ns: meta.id }],
52
+ icon: 'ph--keyboard--regular',
53
+ keyBinding: {
54
+ macos: 'meta+ctrl+/',
71
55
  },
72
- ]),
73
- Option.getOrElse(() => []),
74
- ),
75
- ),
76
- }),
77
- );
56
+ },
57
+ }),
58
+ ]),
59
+ });
60
+
61
+ return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
62
+ }),
63
+ );
@@ -2,11 +2,14 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { lazy } from '@dxos/app-framework';
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 ReactRoot = lazy(() => import('./react-root'));
9
- export const ReactSurface = lazy(() => import('./react-surface'));
10
- export const HelpState = lazy(() => import('./state'));
11
-
12
- export * from './capabilities';
8
+ export const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));
9
+ export const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(
10
+ 'OperationHandler',
11
+ () => import('./operation-handler'),
12
+ );
13
+ export const ReactRoot = Capability.lazy('ReactRoot', () => import('./react-root'));
14
+ export const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));
15
+ export const HelpState = Capability.lazy('HelpState', () => import('./state'));
@@ -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 { HelpOperationHandlerSet } from '#operations';
11
+
12
+ export default Capability.makeModule<OperationHandlerSet.OperationHandlerSet>(
13
+ Effect.fnUntraced(function* () {
14
+ return Capability.contributes(Capabilities.OperationHandler, HelpOperationHandlerSet);
15
+ }),
16
+ );
@@ -2,32 +2,35 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
+ import * as Effect from 'effect/Effect';
5
6
  import React from 'react';
6
7
 
7
- import { Capabilities, contributes, useCapability } from '@dxos/app-framework';
8
+ import { Capabilities, Capability } from '@dxos/app-framework';
9
+ import { useAtomCapabilityState } from '@dxos/app-framework/ui';
8
10
 
9
- import { WelcomeTour } from '../components';
10
- import { meta } from '../meta';
11
- import { type Step } from '../types';
11
+ import { WelcomeTour } from '#components';
12
+ import { meta } from '#meta';
13
+ import { HelpCapabilities, type Step } from '#types';
12
14
 
13
- import { HelpCapabilities } from './capabilities';
14
-
15
- export default (steps: Step[]) =>
16
- contributes(Capabilities.ReactRoot, {
17
- id: meta.id,
18
- root: () => {
19
- const state = useCapability(HelpCapabilities.MutableState);
20
- return (
21
- <WelcomeTour
22
- steps={steps}
23
- running={state.running}
24
- onRunningChanged={(newState) => {
25
- state.running = newState;
26
- if (!newState) {
27
- state.showHints = false;
28
- }
29
- }}
30
- />
31
- );
32
- },
33
- });
15
+ export default Capability.makeModule(
16
+ Effect.fnUntraced(function* (steps?: Step[]) {
17
+ return Capability.contributes(Capabilities.ReactRoot, {
18
+ id: meta.id,
19
+ root: () => {
20
+ const [state, updateState] = useAtomCapabilityState(HelpCapabilities.State);
21
+ return (
22
+ <WelcomeTour
23
+ steps={steps ?? []}
24
+ running={state.running}
25
+ onRunningChanged={(newState) => {
26
+ updateState((s) => ({ ...s, running: newState }));
27
+ if (!newState) {
28
+ updateState((s) => ({ ...s, showHints: false }));
29
+ }
30
+ }}
31
+ />
32
+ );
33
+ },
34
+ });
35
+ }),
36
+ );
@@ -2,29 +2,35 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
+ import * as Effect from 'effect/Effect';
5
6
  import React from 'react';
6
7
 
7
- import { Capabilities, contributes, createSurface } from '@dxos/app-framework';
8
+ import { Capabilities, Capability } from '@dxos/app-framework';
9
+ import { Surface } from '@dxos/app-framework/ui';
10
+ import { AppSurface } from '@dxos/app-toolkit/ui';
8
11
 
9
- import { SHORTCUTS_DIALOG, ShortcutsDialogContent, ShortcutsHints, ShortcutsList } from '../components';
10
- import { meta } from '../meta';
12
+ import { ShortcutsDialogContent, ShortcutsHints, ShortcutsList } from '#containers';
11
13
 
12
- export default () =>
13
- contributes(Capabilities.ReactSurface, [
14
- createSurface({
15
- id: `${meta.id}/hints`,
16
- role: 'hints',
17
- component: () => <ShortcutsHints />,
18
- }),
19
- createSurface({
20
- id: `${meta.id}/keyshortcuts`,
21
- role: 'keyshortcuts',
22
- component: () => <ShortcutsList />,
23
- }),
24
- createSurface({
25
- id: SHORTCUTS_DIALOG,
26
- role: 'dialog',
27
- filter: (data): data is any => data.component === SHORTCUTS_DIALOG,
28
- component: () => <ShortcutsDialogContent />,
29
- }),
30
- ]);
14
+ import { SHORTCUTS_DIALOG } from '../constants';
15
+
16
+ export default Capability.makeModule(() =>
17
+ Effect.succeed(
18
+ Capability.contributes(Capabilities.ReactSurface, [
19
+ Surface.create({
20
+ id: 'hints',
21
+ role: 'hints',
22
+ component: () => <ShortcutsHints />,
23
+ }),
24
+ Surface.create({
25
+ id: 'keyshortcuts',
26
+ role: 'keyshortcuts',
27
+ component: () => <ShortcutsList />,
28
+ }),
29
+ Surface.create({
30
+ id: SHORTCUTS_DIALOG,
31
+ filter: AppSurface.component(AppSurface.Dialog, SHORTCUTS_DIALOG),
32
+ component: () => <ShortcutsDialogContent />,
33
+ }),
34
+ ]),
35
+ ),
36
+ );
@@ -2,23 +2,26 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
- import { contributes } from '@dxos/app-framework';
6
- import { LocalStorageStore } from '@dxos/local-storage';
5
+ import * as Effect from 'effect/Effect';
7
6
 
8
- import { meta } from '../meta';
7
+ import { Capability } from '@dxos/app-framework';
8
+ import { createKvsStore } from '@dxos/effect';
9
9
 
10
- import { HelpCapabilities } from './capabilities';
10
+ import { meta } from '#meta';
11
+ import { HelpCapabilities } from '#types';
11
12
 
12
- export default () => {
13
- const state = new LocalStorageStore<HelpCapabilities.State>(meta.id, {
14
- running: false,
15
- showHints: true,
16
- showWelcome: true,
17
- });
13
+ export default Capability.makeModule(() =>
14
+ Effect.sync(() => {
15
+ const stateAtom = createKvsStore({
16
+ key: meta.id,
17
+ schema: HelpCapabilities.StateSchema,
18
+ defaultValue: () => ({
19
+ running: false,
20
+ showHints: true,
21
+ showWelcome: true,
22
+ }),
23
+ });
18
24
 
19
- state
20
- .prop({ key: 'showHints', type: LocalStorageStore.bool() })
21
- .prop({ key: 'showWelcome', type: LocalStorageStore.bool() });
22
-
23
- return contributes(HelpCapabilities.State, state.values);
24
- };
25
+ return Capability.contributes(HelpCapabilities.State, stateAtom);
26
+ }),
27
+ );
@@ -5,12 +5,13 @@
5
5
  import React from 'react';
6
6
 
7
7
  import { type KeyBinding, Keyboard } from '@dxos/keyboard';
8
- import { Button, Icon, toLocalizedString, useTranslation } from '@dxos/react-ui';
8
+ import { IconButton, toLocalizedString, useTranslation } from '@dxos/react-ui';
9
+ import { osTranslations } from '@dxos/ui-theme';
9
10
 
10
11
  import { Key } from './Key';
11
12
 
12
13
  const Shortcut = ({ binding }: { binding: KeyBinding }) => {
13
- const { t } = useTranslation('os');
14
+ const { t } = useTranslation(osTranslations);
14
15
  return (
15
16
  <div role='none' className='flex items-center gap-2 whitespace-nowrap'>
16
17
  <Key binding={binding.shortcut} />
@@ -31,9 +32,16 @@ export const ShortcutsHints = ({ onClose }: { onClose?: () => void }) => {
31
32
  <Shortcut key={binding.shortcut} binding={binding} />
32
33
  ))}
33
34
  {onClose && (
34
- <Button variant='ghost' classNames='p-0 cursor-pointer' onClick={onClose}>
35
- <Icon icon='ph--x--regular' size={4} />
36
- </Button>
35
+ <IconButton
36
+ icon='ph--x--regular'
37
+ size={4}
38
+ label='Close'
39
+ iconOnly
40
+ noTooltip
41
+ variant='ghost'
42
+ classNames='p-0 cursor-pointer'
43
+ onClick={onClose}
44
+ />
37
45
  )}
38
46
  </div>
39
47
  );