@dxos/plugin-help 0.8.4-main.dedc0f3 → 0.8.4-main.dfabb4ec29
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/neutral/HelpPlugin.mjs +30 -0
- package/dist/lib/neutral/HelpPlugin.mjs.map +7 -0
- package/dist/lib/neutral/ShortcutsDialogContent-TB5PZWVY.mjs +17 -0
- package/dist/lib/neutral/ShortcutsDialogContent-TB5PZWVY.mjs.map +7 -0
- package/dist/lib/neutral/ShortcutsHints-P4SUBCY7.mjs +8 -0
- package/dist/lib/neutral/ShortcutsList-MZHWIVDH.mjs +8 -0
- package/dist/lib/neutral/app-graph-builder-BJYIYNMN.mjs +75 -0
- package/dist/lib/neutral/app-graph-builder-BJYIYNMN.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +17 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/chunk-BI3HKFKB.mjs +63 -0
- package/dist/lib/neutral/chunk-BI3HKFKB.mjs.map +7 -0
- package/dist/lib/neutral/chunk-GZL2J55W.mjs +8 -0
- package/dist/lib/neutral/chunk-GZL2J55W.mjs.map +7 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/neutral/chunk-MQQNHGDV.mjs +8 -0
- package/dist/lib/neutral/chunk-MQQNHGDV.mjs.map +7 -0
- package/dist/lib/neutral/chunk-NHTI7NEQ.mjs +19 -0
- package/dist/lib/neutral/chunk-NHTI7NEQ.mjs.map +7 -0
- package/dist/lib/neutral/chunk-NJCLRR5U.mjs +331 -0
- package/dist/lib/neutral/chunk-NJCLRR5U.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +20 -0
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +13 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/neutral/hooks/index.mjs +13 -0
- package/dist/lib/neutral/hooks/index.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +24 -0
- package/dist/lib/neutral/index.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/{browser → neutral}/meta.mjs +2 -3
- package/dist/lib/neutral/meta.mjs.map +7 -0
- package/dist/lib/neutral/operation-handler-F2JU4V62.mjs +13 -0
- package/dist/lib/neutral/operation-handler-F2JU4V62.mjs.map +7 -0
- package/dist/lib/neutral/operations/index.mjs +8 -0
- package/dist/lib/neutral/operations/index.mjs.map +7 -0
- package/dist/lib/neutral/plugin.mjs +16 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/react-root-PYPAXETF.mjs +38 -0
- package/dist/lib/neutral/react-root-PYPAXETF.mjs.map +7 -0
- package/dist/lib/neutral/react-surface-SNS4QQMR.mjs +33 -0
- package/dist/lib/neutral/react-surface-SNS4QQMR.mjs.map +7 -0
- package/dist/lib/neutral/start-XYUDZGXJ.mjs +21 -0
- package/dist/lib/neutral/start-XYUDZGXJ.mjs.map +7 -0
- package/dist/lib/neutral/state-5HQJG3KW.mjs +24 -0
- package/dist/lib/neutral/state-5HQJG3KW.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +20 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +12 -0
- package/dist/lib/neutral/types/index.mjs.map +7 -0
- package/dist/types/src/HelpPlugin.d.ts +4 -2
- package/dist/types/src/HelpPlugin.d.ts.map +1 -1
- package/dist/types/src/HelpPlugin.test.d.ts +2 -0
- package/dist/types/src/HelpPlugin.test.d.ts.map +1 -0
- 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 +16 -6
- package/dist/types/src/capabilities/index.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-root.d.ts +5 -3
- package/dist/types/src/capabilities/react-root.d.ts.map +1 -1
- 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 +11 -2
- package/dist/types/src/capabilities/state.d.ts.map +1 -1
- package/dist/types/src/components/Shortcuts/Key.d.ts.map +1 -1
- package/dist/types/src/components/Shortcuts/ShortcutsHints.d.ts.map +1 -1
- package/dist/types/src/components/Shortcuts/ShortcutsSection.d.ts.map +1 -1
- package/dist/types/src/components/Shortcuts/index.d.ts +0 -1
- package/dist/types/src/components/Shortcuts/index.d.ts.map +1 -1
- package/dist/types/src/components/Tooltip/Tooltip.d.ts +9 -9
- package/dist/types/src/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/types/src/components/WelcomeTour/WelcomeTour.d.ts +1 -1
- package/dist/types/src/components/WelcomeTour/WelcomeTour.d.ts.map +1 -1
- package/dist/types/src/components/WelcomeTour/WelcomeTour.stories.d.ts +0 -1
- package/dist/types/src/components/WelcomeTour/WelcomeTour.stories.d.ts.map +1 -1
- package/dist/types/src/constants.d.ts +2 -0
- package/dist/types/src/constants.d.ts.map +1 -0
- package/dist/types/src/containers/ShortcutsDialogContent/ShortcutsDialogContent.d.ts +3 -0
- package/dist/types/src/containers/ShortcutsDialogContent/ShortcutsDialogContent.d.ts.map +1 -0
- package/dist/types/src/containers/ShortcutsDialogContent/ShortcutsDialogContent.stories.d.ts +25 -0
- package/dist/types/src/containers/ShortcutsDialogContent/ShortcutsDialogContent.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ShortcutsDialogContent/index.d.ts +2 -0
- package/dist/types/src/containers/ShortcutsDialogContent/index.d.ts.map +1 -0
- package/dist/types/src/containers/ShortcutsHints/ShortcutsHints.d.ts +2 -0
- package/dist/types/src/containers/ShortcutsHints/ShortcutsHints.d.ts.map +1 -0
- package/dist/types/src/containers/ShortcutsHints/index.d.ts +2 -0
- package/dist/types/src/containers/ShortcutsHints/index.d.ts.map +1 -0
- package/dist/types/src/containers/ShortcutsList/ShortcutsList.d.ts +2 -0
- package/dist/types/src/containers/ShortcutsList/ShortcutsList.d.ts.map +1 -0
- package/dist/types/src/containers/ShortcutsList/index.d.ts +2 -0
- package/dist/types/src/containers/ShortcutsList/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +5 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/hooks/useHelp.d.ts +1 -1
- package/dist/types/src/hooks/useHelp.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +2 -4
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -3
- package/dist/types/src/meta.d.ts.map +1 -1
- 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/operations/start.d.ts +5 -0
- package/dist/types/src/operations/start.d.ts.map +1 -0
- package/dist/types/src/plugin.d.ts +5 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +5 -6
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/HelpCapabilities.d.ts +19 -0
- package/dist/types/src/types/HelpCapabilities.d.ts.map +1 -0
- package/dist/types/src/types/HelpOperation.d.ts +4 -0
- package/dist/types/src/types/HelpOperation.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +2 -0
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +2 -14
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +95 -52
- package/src/HelpPlugin.test.ts +30 -0
- package/src/HelpPlugin.tsx +24 -49
- package/src/capabilities/app-graph-builder.ts +52 -67
- package/src/capabilities/index.ts +10 -7
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-root.tsx +28 -25
- package/src/capabilities/react-surface.tsx +28 -22
- package/src/capabilities/state.ts +19 -16
- package/src/components/Shortcuts/ShortcutsHints.tsx +15 -7
- package/src/components/Shortcuts/ShortcutsList.tsx +5 -5
- package/src/components/Shortcuts/ShortcutsSection.tsx +1 -3
- package/src/components/Shortcuts/index.ts +0 -1
- package/src/components/Shortcuts/styles.ts +3 -3
- package/src/components/Tooltip/Tooltip.tsx +4 -5
- package/src/components/WelcomeTour/WelcomeTour.stories.tsx +19 -14
- package/src/components/WelcomeTour/WelcomeTour.tsx +6 -3
- package/src/constants.ts +7 -0
- package/src/containers/ShortcutsDialogContent/ShortcutsDialogContent.stories.tsx +39 -0
- package/src/containers/ShortcutsDialogContent/ShortcutsDialogContent.tsx +28 -0
- package/src/containers/ShortcutsDialogContent/index.ts +5 -0
- package/src/containers/ShortcutsHints/ShortcutsHints.tsx +5 -0
- package/src/containers/ShortcutsHints/index.ts +5 -0
- package/src/containers/ShortcutsList/ShortcutsList.tsx +5 -0
- package/src/containers/ShortcutsList/index.ts +5 -0
- package/src/containers/index.ts +9 -0
- package/src/hooks/useHelp.tsx +1 -1
- package/src/index.ts +2 -4
- package/src/meta.ts +9 -6
- package/src/operations/index.ts +7 -0
- package/src/operations/start.ts +20 -0
- package/src/plugin.ts +12 -0
- package/src/translations.ts +5 -5
- package/src/types/HelpCapabilities.ts +24 -0
- package/src/types/HelpOperation.ts +21 -0
- package/src/types/index.ts +2 -0
- package/src/types/schema.ts +2 -12
- package/dist/lib/browser/app-graph-builder-F62C67SH.mjs +0 -79
- package/dist/lib/browser/app-graph-builder-F62C67SH.mjs.map +0 -7
- package/dist/lib/browser/chunk-3Y4CMOZP.mjs +0 -13
- package/dist/lib/browser/chunk-3Y4CMOZP.mjs.map +0 -7
- package/dist/lib/browser/chunk-4CVVSQQC.mjs +0 -407
- package/dist/lib/browser/chunk-4CVVSQQC.mjs.map +0 -7
- package/dist/lib/browser/chunk-J2SJSGSX.mjs +0 -34
- package/dist/lib/browser/chunk-J2SJSGSX.mjs.map +0 -7
- package/dist/lib/browser/chunk-LDRUZNSN.mjs +0 -16
- package/dist/lib/browser/chunk-LDRUZNSN.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -112
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/react-root-2LE42L5M.mjs +0 -34
- package/dist/lib/browser/react-root-2LE42L5M.mjs.map +0 -7
- package/dist/lib/browser/react-surface-XKJRPX3R.mjs +0 -36
- package/dist/lib/browser/react-surface-XKJRPX3R.mjs.map +0 -7
- package/dist/lib/browser/state-IXBTB3WH.mjs +0 -29
- package/dist/lib/browser/state-IXBTB3WH.mjs.map +0 -7
- package/dist/lib/browser/types/index.mjs +0 -10
- package/dist/types/src/capabilities/capabilities.d.ts +0 -10
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/components/Shortcuts/ShortcutsDialog.d.ts +0 -4
- package/dist/types/src/components/Shortcuts/ShortcutsDialog.d.ts.map +0 -1
- package/src/capabilities/capabilities.ts +0 -13
- package/src/components/Shortcuts/ShortcutsDialog.tsx +0 -35
- /package/dist/lib/{browser/meta.mjs.map → neutral/ShortcutsHints-P4SUBCY7.mjs.map} +0 -0
- /package/dist/lib/{browser/types/index.mjs.map → neutral/ShortcutsList-MZHWIVDH.mjs.map} +0 -0
package/package.json
CHANGED
|
@@ -1,86 +1,129 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-help",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.dfabb4ec29",
|
|
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",
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"source": "./src/index.ts",
|
|
14
|
-
"types": "./dist/types/src/index.d.ts",
|
|
15
|
-
"
|
|
15
|
+
"imports": {
|
|
16
|
+
"#capabilities": {
|
|
17
|
+
"source": "./src/capabilities/index.ts",
|
|
18
|
+
"types": "./dist/types/src/capabilities/index.d.ts",
|
|
19
|
+
"default": "./dist/lib/neutral/capabilities/index.mjs"
|
|
16
20
|
},
|
|
17
|
-
"
|
|
21
|
+
"#components": {
|
|
22
|
+
"source": "./src/components/index.ts",
|
|
23
|
+
"types": "./dist/types/src/components/index.d.ts",
|
|
24
|
+
"default": "./dist/lib/neutral/components/index.mjs"
|
|
25
|
+
},
|
|
26
|
+
"#containers": {
|
|
27
|
+
"source": "./src/containers/index.ts",
|
|
28
|
+
"types": "./dist/types/src/containers/index.d.ts",
|
|
29
|
+
"default": "./dist/lib/neutral/containers/index.mjs"
|
|
30
|
+
},
|
|
31
|
+
"#hooks": {
|
|
32
|
+
"source": "./src/hooks/index.ts",
|
|
33
|
+
"types": "./dist/types/src/hooks/index.d.ts",
|
|
34
|
+
"default": "./dist/lib/neutral/hooks/index.mjs"
|
|
35
|
+
},
|
|
36
|
+
"#meta": {
|
|
18
37
|
"source": "./src/meta.ts",
|
|
19
38
|
"types": "./dist/types/src/meta.d.ts",
|
|
20
|
-
"
|
|
39
|
+
"default": "./dist/lib/neutral/meta.mjs"
|
|
40
|
+
},
|
|
41
|
+
"#operations": {
|
|
42
|
+
"source": "./src/operations/index.ts",
|
|
43
|
+
"types": "./dist/types/src/operations/index.d.ts",
|
|
44
|
+
"default": "./dist/lib/neutral/operations/index.mjs"
|
|
45
|
+
},
|
|
46
|
+
"#plugin": {
|
|
47
|
+
"source": "./src/HelpPlugin.tsx",
|
|
48
|
+
"types": "./dist/types/src/HelpPlugin.d.ts",
|
|
49
|
+
"default": "./dist/lib/neutral/HelpPlugin.mjs"
|
|
21
50
|
},
|
|
22
|
-
"
|
|
51
|
+
"#translations": {
|
|
52
|
+
"source": "./src/translations.ts",
|
|
53
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
54
|
+
"default": "./dist/lib/neutral/translations.mjs"
|
|
55
|
+
},
|
|
56
|
+
"#types": {
|
|
23
57
|
"source": "./src/types/index.ts",
|
|
24
58
|
"types": "./dist/types/src/types/index.d.ts",
|
|
25
|
-
"
|
|
59
|
+
"default": "./dist/lib/neutral/types/index.mjs"
|
|
26
60
|
}
|
|
27
61
|
},
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
62
|
+
"exports": {
|
|
63
|
+
".": {
|
|
64
|
+
"source": "./src/index.ts",
|
|
65
|
+
"types": "./dist/types/src/index.d.ts",
|
|
66
|
+
"default": "./dist/lib/neutral/index.mjs"
|
|
67
|
+
},
|
|
68
|
+
"./plugin": {
|
|
69
|
+
"source": "./src/plugin.ts",
|
|
70
|
+
"types": "./dist/types/src/plugin.d.ts",
|
|
71
|
+
"default": "./dist/lib/neutral/plugin.mjs"
|
|
72
|
+
},
|
|
73
|
+
"./translations": {
|
|
74
|
+
"source": "./src/translations.ts",
|
|
75
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
76
|
+
"default": "./dist/lib/neutral/translations.mjs"
|
|
37
77
|
}
|
|
38
78
|
},
|
|
79
|
+
"types": "dist/types/src/index.d.ts",
|
|
39
80
|
"files": [
|
|
40
81
|
"dist",
|
|
41
82
|
"src"
|
|
42
83
|
],
|
|
43
84
|
"dependencies": {
|
|
44
|
-
"@
|
|
45
|
-
"@
|
|
85
|
+
"@effect-atom/atom": "^0.5.1",
|
|
86
|
+
"@fluentui/react-tabster": "9.26.11",
|
|
46
87
|
"react-joyride": "^2.7.2",
|
|
47
|
-
"@dxos/app-
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/
|
|
51
|
-
"@dxos/
|
|
52
|
-
"@dxos/
|
|
53
|
-
"@dxos/
|
|
54
|
-
"@dxos/
|
|
55
|
-
"@dxos/plugin-graph": "0.8.4-main.
|
|
56
|
-
"@dxos/
|
|
57
|
-
"@dxos/
|
|
58
|
-
"@dxos/
|
|
88
|
+
"@dxos/app-framework": "0.8.4-main.dfabb4ec29",
|
|
89
|
+
"@dxos/app-graph": "0.8.4-main.dfabb4ec29",
|
|
90
|
+
"@dxos/debug": "0.8.4-main.dfabb4ec29",
|
|
91
|
+
"@dxos/app-toolkit": "0.8.4-main.dfabb4ec29",
|
|
92
|
+
"@dxos/echo": "0.8.4-main.dfabb4ec29",
|
|
93
|
+
"@dxos/effect": "0.8.4-main.dfabb4ec29",
|
|
94
|
+
"@dxos/keyboard": "0.8.4-main.dfabb4ec29",
|
|
95
|
+
"@dxos/plugin-client": "0.8.4-main.dfabb4ec29",
|
|
96
|
+
"@dxos/plugin-graph": "0.8.4-main.dfabb4ec29",
|
|
97
|
+
"@dxos/react-client": "0.8.4-main.dfabb4ec29",
|
|
98
|
+
"@dxos/plugin-space": "0.8.4-main.dfabb4ec29",
|
|
99
|
+
"@dxos/util": "0.8.4-main.dfabb4ec29",
|
|
100
|
+
"@dxos/compute": "0.8.4-main.dfabb4ec29"
|
|
59
101
|
},
|
|
60
102
|
"devDependencies": {
|
|
61
|
-
"@effect-
|
|
62
|
-
"@effect/platform": "0.
|
|
63
|
-
"@types/react": "~
|
|
64
|
-
"@types/react-dom": "~
|
|
65
|
-
"effect": "3.
|
|
66
|
-
"react": "~
|
|
67
|
-
"react-dom": "~
|
|
103
|
+
"@effect-atom/atom-react": "^0.5.0",
|
|
104
|
+
"@effect/platform": "0.94.4",
|
|
105
|
+
"@types/react": "~19.2.7",
|
|
106
|
+
"@types/react-dom": "~19.2.3",
|
|
107
|
+
"effect": "3.20.0",
|
|
108
|
+
"react": "~19.2.3",
|
|
109
|
+
"react-dom": "~19.2.3",
|
|
68
110
|
"react-floater": "0.7.9",
|
|
69
111
|
"type-fest": "4.10.1",
|
|
70
|
-
"vite": "
|
|
71
|
-
"@dxos/
|
|
72
|
-
"@dxos/
|
|
73
|
-
"@dxos/react-ui
|
|
74
|
-
"@dxos/
|
|
112
|
+
"vite": "^8.0.10",
|
|
113
|
+
"@dxos/plugin-testing": "0.8.4-main.dfabb4ec29",
|
|
114
|
+
"@dxos/random": "0.8.4-main.dfabb4ec29",
|
|
115
|
+
"@dxos/react-ui": "0.8.4-main.dfabb4ec29",
|
|
116
|
+
"@dxos/ui-theme": "0.8.4-main.dfabb4ec29",
|
|
117
|
+
"@dxos/storybook-utils": "0.8.4-main.dfabb4ec29"
|
|
75
118
|
},
|
|
76
119
|
"peerDependencies": {
|
|
77
|
-
"@effect-
|
|
78
|
-
"@effect/platform": "
|
|
79
|
-
"effect": "
|
|
80
|
-
"react": "~
|
|
81
|
-
"react-dom": "~
|
|
82
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
83
|
-
"@dxos/
|
|
120
|
+
"@effect-atom/atom-react": "^0.5.0",
|
|
121
|
+
"@effect/platform": "0.94.4",
|
|
122
|
+
"effect": "3.20.0",
|
|
123
|
+
"react": "~19.2.3",
|
|
124
|
+
"react-dom": "~19.2.3",
|
|
125
|
+
"@dxos/react-ui": "0.8.4-main.dfabb4ec29",
|
|
126
|
+
"@dxos/ui-theme": "0.8.4-main.dfabb4ec29"
|
|
84
127
|
},
|
|
85
128
|
"publishConfig": {
|
|
86
129
|
"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
|
+
});
|
package/src/HelpPlugin.tsx
CHANGED
|
@@ -2,56 +2,31 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { ActivationEvents, Plugin } from '@dxos/app-framework';
|
|
6
|
+
import { AppPlugin } from '@dxos/app-toolkit';
|
|
6
7
|
|
|
7
|
-
import { AppGraphBuilder, HelpState, ReactRoot, ReactSurface } from '
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
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';
|
|
12
12
|
|
|
13
13
|
export type HelpPluginOptions = { steps?: Step[] };
|
|
14
14
|
|
|
15
|
-
export const HelpPlugin = (
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
id: `${meta.id}/module/react-surface`,
|
|
34
|
-
activatesOn: Events.SetupReactSurface,
|
|
35
|
-
activate: ReactSurface,
|
|
36
|
-
}),
|
|
37
|
-
defineModule({
|
|
38
|
-
id: `${meta.id}/module/intent-resolver`,
|
|
39
|
-
activatesOn: Events.SetupIntentResolver,
|
|
40
|
-
activate: (context) =>
|
|
41
|
-
contributes(
|
|
42
|
-
Capabilities.IntentResolver,
|
|
43
|
-
createResolver({
|
|
44
|
-
intent: HelpAction.Start,
|
|
45
|
-
resolve: () => {
|
|
46
|
-
const state = context.getCapability(HelpCapabilities.MutableState);
|
|
47
|
-
state.running = true;
|
|
48
|
-
},
|
|
49
|
-
}),
|
|
50
|
-
),
|
|
51
|
-
}),
|
|
52
|
-
defineModule({
|
|
53
|
-
id: `${meta.id}/module/app-graph-builder`,
|
|
54
|
-
activatesOn: Events.SetupAppGraph,
|
|
55
|
-
activate: AppGraphBuilder,
|
|
56
|
-
}),
|
|
57
|
-
]);
|
|
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,
|
|
22
|
+
activate: HelpState,
|
|
23
|
+
}),
|
|
24
|
+
Plugin.addModule(({ steps = [] }) => ({
|
|
25
|
+
id: 'react-root',
|
|
26
|
+
activatesOn: ActivationEvents.Startup,
|
|
27
|
+
activate: () => ReactRoot(steps),
|
|
28
|
+
})),
|
|
29
|
+
Plugin.make,
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
export default HelpPlugin;
|
|
@@ -2,76 +2,61 @@
|
|
|
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 { Capabilities,
|
|
9
|
-
import {
|
|
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 {
|
|
12
|
-
import {
|
|
13
|
-
import { HelpAction } from '../types';
|
|
12
|
+
import { meta } from '#meta';
|
|
13
|
+
import { HelpCapabilities, HelpOperation } from '#types';
|
|
14
14
|
|
|
15
|
-
import {
|
|
15
|
+
import { SHORTCUTS_DIALOG } from '../constants';
|
|
16
16
|
|
|
17
|
-
export default (
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
actions: (
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
label: ['open help tour', { ns: HELP_PLUGIN }],
|
|
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
|
-
},
|
|
17
|
+
export default Capability.makeModule(
|
|
18
|
+
Effect.fnUntraced(function* () {
|
|
19
|
+
const extensions = yield* GraphBuilder.createExtension({
|
|
20
|
+
id: 'root',
|
|
21
|
+
match: NodeMatcher.whenRoot,
|
|
22
|
+
actions: () =>
|
|
23
|
+
Effect.succeed([
|
|
24
|
+
Node.makeAction({
|
|
25
|
+
id: HelpOperation.Start.meta.key,
|
|
26
|
+
data: Effect.fnUntraced(function* () {
|
|
27
|
+
yield* Capabilities.updateAtomValue(HelpCapabilities.State, (s) => ({ ...s, showHints: true }));
|
|
28
|
+
yield* Operation.invoke(HelpOperation.Start);
|
|
29
|
+
}),
|
|
30
|
+
properties: {
|
|
31
|
+
label: ['open-help-tour.message', { ns: meta.id }],
|
|
32
|
+
icon: 'ph--info--regular',
|
|
33
|
+
keyBinding: {
|
|
34
|
+
macos: 'shift+meta+/',
|
|
35
|
+
windows: 'shift+ctrl+/',
|
|
36
|
+
linux: 'shift+ctrl+?',
|
|
47
37
|
},
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
properties: {
|
|
65
|
-
label: ['open shortcuts label', { ns: HELP_PLUGIN }],
|
|
66
|
-
icon: 'ph--keyboard--regular',
|
|
67
|
-
keyBinding: {
|
|
68
|
-
macos: 'meta+ctrl+/',
|
|
69
|
-
},
|
|
70
|
-
},
|
|
38
|
+
testId: 'helpPlugin.openHelp',
|
|
39
|
+
},
|
|
40
|
+
}),
|
|
41
|
+
Node.makeAction({
|
|
42
|
+
id: 'open-shortcuts',
|
|
43
|
+
data: Effect.fnUntraced(function* () {
|
|
44
|
+
yield* Capabilities.updateAtomValue(HelpCapabilities.State, (s) => ({ ...s, showHints: true }));
|
|
45
|
+
yield* Operation.invoke(LayoutOperation.UpdateDialog, {
|
|
46
|
+
subject: SHORTCUTS_DIALOG,
|
|
47
|
+
});
|
|
48
|
+
}),
|
|
49
|
+
properties: {
|
|
50
|
+
label: ['open-shortcuts.label', { ns: meta.id }],
|
|
51
|
+
icon: 'ph--keyboard--regular',
|
|
52
|
+
keyBinding: {
|
|
53
|
+
macos: 'meta+ctrl+/',
|
|
71
54
|
},
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
55
|
+
},
|
|
56
|
+
}),
|
|
57
|
+
]),
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
|
|
61
|
+
}),
|
|
62
|
+
);
|
|
@@ -2,11 +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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export
|
|
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,
|
|
8
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
|
+
import { useAtomCapabilityState } from '@dxos/app-framework/ui';
|
|
8
10
|
|
|
9
|
-
import { WelcomeTour } from '
|
|
10
|
-
import {
|
|
11
|
-
import { type Step } from '
|
|
11
|
+
import { WelcomeTour } from '#components';
|
|
12
|
+
import { meta } from '#meta';
|
|
13
|
+
import { HelpCapabilities, type Step } from '#types';
|
|
12
14
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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,
|
|
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 {
|
|
10
|
-
import { HELP_PLUGIN } from '../meta';
|
|
12
|
+
import { ShortcutsDialogContent, ShortcutsHints, ShortcutsList } from '#containers';
|
|
11
13
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
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
|
|
6
|
-
import { LocalStorageStore } from '@dxos/local-storage';
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
7
6
|
|
|
8
|
-
import {
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { createKvsStore } from '@dxos/effect';
|
|
9
9
|
|
|
10
|
-
import {
|
|
10
|
+
import { meta } from '#meta';
|
|
11
|
+
import { HelpCapabilities } from '#types';
|
|
11
12
|
|
|
12
|
-
export default () =>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
return contributes(HelpCapabilities.State, state.values);
|
|
24
|
-
};
|
|
25
|
+
return Capability.contributes(HelpCapabilities.State, stateAtom);
|
|
26
|
+
}),
|
|
27
|
+
);
|