@dxos/plugin-help 0.8.4-main.d05673bc65 → 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/{browser/app-graph-builder-5RXPFQPI.mjs → neutral/app-graph-builder-BJYIYNMN.mjs} +16 -20
- 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/{browser/chunk-P34WCEMS.mjs → neutral/chunk-MQQNHGDV.mjs} +2 -5
- package/dist/lib/neutral/chunk-MQQNHGDV.mjs.map +7 -0
- package/dist/lib/{browser/chunk-TEXIV2IJ.mjs → neutral/chunk-NHTI7NEQ.mjs} +5 -2
- package/dist/lib/{browser/chunk-TEXIV2IJ.mjs.map → neutral/chunk-NHTI7NEQ.mjs.map} +3 -3
- package/dist/lib/{browser/chunk-VGW5FGD7.mjs → neutral/chunk-NJCLRR5U.mjs} +10 -14
- 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 -1
- 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/{browser/react-root-JBHEZA5U.mjs → neutral/react-root-PYPAXETF.mjs} +6 -11
- package/dist/lib/neutral/react-root-PYPAXETF.mjs.map +7 -0
- package/dist/lib/{browser/react-surface-W5S45O6Y.mjs → neutral/react-surface-SNS4QQMR.mjs} +9 -18
- 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/{browser/state-SEPP77HO.mjs → neutral/state-5HQJG3KW.mjs} +5 -8
- 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 +2 -1
- 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.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +18 -5
- 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/react-root.d.ts → react-root.d.ts} +1 -1
- package/dist/types/src/capabilities/react-root.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/state.d.ts.map +1 -0
- 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/Tooltip/Tooltip.d.ts +9 -9
- 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.map +1 -1
- package/dist/types/src/containers/ShortcutsDialogContent/ShortcutsDialogContent.d.ts.map +1 -1
- 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 +1 -2
- package/dist/types/src/containers/ShortcutsDialogContent/index.d.ts.map +1 -1
- package/dist/types/src/containers/ShortcutsHints/index.d.ts +1 -2
- package/dist/types/src/containers/ShortcutsHints/index.d.ts.map +1 -1
- package/dist/types/src/containers/ShortcutsList/index.d.ts +1 -2
- package/dist/types/src/containers/ShortcutsList/index.d.ts.map +1 -1
- 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 +1 -4
- package/dist/types/src/index.d.ts.map +1 -1
- 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 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +1 -17
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +79 -42
- package/src/HelpPlugin.test.ts +30 -0
- package/src/HelpPlugin.tsx +7 -5
- package/src/capabilities/{app-graph-builder/app-graph-builder.ts → app-graph-builder.ts} +14 -13
- package/src/capabilities/index.ts +11 -5
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/{react-root/react-root.tsx → react-root.tsx} +3 -3
- package/src/capabilities/{react-surface/react-surface.tsx → react-surface.tsx} +7 -7
- package/src/capabilities/{state/state.ts → state.ts} +2 -2
- package/src/components/Shortcuts/ShortcutsHints.tsx +2 -2
- package/src/components/Shortcuts/ShortcutsList.tsx +1 -1
- package/src/components/WelcomeTour/WelcomeTour.stories.tsx +8 -8
- package/src/components/WelcomeTour/WelcomeTour.tsx +3 -1
- package/src/constants.ts +1 -1
- package/src/containers/ShortcutsDialogContent/ShortcutsDialogContent.stories.tsx +39 -0
- package/src/containers/ShortcutsDialogContent/ShortcutsDialogContent.tsx +9 -10
- package/src/containers/ShortcutsDialogContent/index.ts +1 -3
- package/src/containers/ShortcutsHints/index.ts +1 -3
- package/src/containers/ShortcutsList/index.ts +1 -3
- package/src/hooks/useHelp.tsx +1 -1
- package/src/index.ts +1 -4
- package/src/meta.ts +1 -0
- 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 -1
- package/src/types/schema.ts +1 -15
- package/dist/lib/browser/ShortcutsDialogContent-SFEN5YKG.mjs +0 -36
- package/dist/lib/browser/ShortcutsDialogContent-SFEN5YKG.mjs.map +0 -7
- package/dist/lib/browser/ShortcutsHints-SUH2FE3T.mjs +0 -12
- package/dist/lib/browser/ShortcutsHints-SUH2FE3T.mjs.map +0 -7
- package/dist/lib/browser/ShortcutsList-4YPEJM33.mjs +0 -12
- package/dist/lib/browser/ShortcutsList-4YPEJM33.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-5RXPFQPI.mjs.map +0 -7
- package/dist/lib/browser/chunk-HMLZFBYY.mjs +0 -58
- package/dist/lib/browser/chunk-HMLZFBYY.mjs.map +0 -7
- package/dist/lib/browser/chunk-P34WCEMS.mjs.map +0 -7
- package/dist/lib/browser/chunk-VGW5FGD7.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -114
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/react-root-JBHEZA5U.mjs.map +0 -7
- package/dist/lib/browser/react-surface-W5S45O6Y.mjs.map +0 -7
- package/dist/lib/browser/state-SEPP77HO.mjs.map +0 -7
- package/dist/lib/browser/types/index.mjs +0 -12
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +0 -3
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -2
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -5
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-root/index.d.ts +0 -6
- package/dist/types/src/capabilities/react-root/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-root/react-root.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/state/index.d.ts +0 -11
- package/dist/types/src/capabilities/state/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/state/state.d.ts.map +0 -1
- package/dist/types/src/types/capabilities.d.ts +0 -21
- package/dist/types/src/types/capabilities.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder/index.ts +0 -7
- package/src/capabilities/operation-resolver/index.ts +0 -5
- package/src/capabilities/operation-resolver/operation-resolver.ts +0 -23
- package/src/capabilities/react-root/index.ts +0 -7
- package/src/capabilities/react-surface/index.ts +0 -7
- package/src/capabilities/state/index.ts +0 -7
- package/src/types/capabilities.ts +0 -24
- /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/dist/types/src/capabilities/{app-graph-builder/app-graph-builder.d.ts → app-graph-builder.d.ts} +0 -0
- /package/dist/types/src/capabilities/{react-surface/react-surface.d.ts → react-surface.d.ts} +0 -0
- /package/dist/types/src/capabilities/{state/state.d.ts → state.d.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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",
|
|
@@ -12,34 +12,71 @@
|
|
|
12
12
|
"author": "DXOS.org",
|
|
13
13
|
"sideEffects": true,
|
|
14
14
|
"type": "module",
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"source": "./src/index.ts",
|
|
18
|
-
"types": "./dist/types/src/index.d.ts",
|
|
19
|
-
"
|
|
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"
|
|
20
|
+
},
|
|
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"
|
|
20
25
|
},
|
|
21
|
-
"
|
|
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": {
|
|
22
37
|
"source": "./src/meta.ts",
|
|
23
38
|
"types": "./dist/types/src/meta.d.ts",
|
|
24
|
-
"
|
|
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"
|
|
25
50
|
},
|
|
26
|
-
"
|
|
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": {
|
|
27
57
|
"source": "./src/types/index.ts",
|
|
28
58
|
"types": "./dist/types/src/types/index.d.ts",
|
|
29
|
-
"
|
|
59
|
+
"default": "./dist/lib/neutral/types/index.mjs"
|
|
30
60
|
}
|
|
31
61
|
},
|
|
32
|
-
"
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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"
|
|
41
77
|
}
|
|
42
78
|
},
|
|
79
|
+
"types": "dist/types/src/index.d.ts",
|
|
43
80
|
"files": [
|
|
44
81
|
"dist",
|
|
45
82
|
"src"
|
|
@@ -48,45 +85,45 @@
|
|
|
48
85
|
"@effect-atom/atom": "^0.5.1",
|
|
49
86
|
"@fluentui/react-tabster": "9.26.11",
|
|
50
87
|
"react-joyride": "^2.7.2",
|
|
51
|
-
"@dxos/app-
|
|
52
|
-
"@dxos/app-
|
|
53
|
-
"@dxos/debug": "0.8.4-main.
|
|
54
|
-
"@dxos/
|
|
55
|
-
"@dxos/
|
|
56
|
-
"@dxos/
|
|
57
|
-
"@dxos/
|
|
58
|
-
"@dxos/plugin-
|
|
59
|
-
"@dxos/plugin-
|
|
60
|
-
"@dxos/
|
|
61
|
-
"@dxos/
|
|
62
|
-
"@dxos/util": "0.8.4-main.
|
|
63
|
-
"@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"
|
|
64
101
|
},
|
|
65
102
|
"devDependencies": {
|
|
66
103
|
"@effect-atom/atom-react": "^0.5.0",
|
|
67
104
|
"@effect/platform": "0.94.4",
|
|
68
105
|
"@types/react": "~19.2.7",
|
|
69
106
|
"@types/react-dom": "~19.2.3",
|
|
70
|
-
"effect": "3.
|
|
107
|
+
"effect": "3.20.0",
|
|
71
108
|
"react": "~19.2.3",
|
|
72
109
|
"react-dom": "~19.2.3",
|
|
73
110
|
"react-floater": "0.7.9",
|
|
74
111
|
"type-fest": "4.10.1",
|
|
75
|
-
"vite": "^
|
|
76
|
-
"@dxos/
|
|
77
|
-
"@dxos/
|
|
78
|
-
"@dxos/
|
|
79
|
-
"@dxos/ui-theme": "0.8.4-main.
|
|
80
|
-
"@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"
|
|
81
118
|
},
|
|
82
119
|
"peerDependencies": {
|
|
83
120
|
"@effect-atom/atom-react": "^0.5.0",
|
|
84
121
|
"@effect/platform": "0.94.4",
|
|
85
|
-
"effect": "3.
|
|
122
|
+
"effect": "3.20.0",
|
|
86
123
|
"react": "~19.2.3",
|
|
87
124
|
"react-dom": "~19.2.3",
|
|
88
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
89
|
-
"@dxos/ui-theme": "0.8.4-main.
|
|
125
|
+
"@dxos/react-ui": "0.8.4-main.dfabb4ec29",
|
|
126
|
+
"@dxos/ui-theme": "0.8.4-main.dfabb4ec29"
|
|
90
127
|
},
|
|
91
128
|
"publishConfig": {
|
|
92
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
|
@@ -5,16 +5,16 @@
|
|
|
5
5
|
import { ActivationEvents, Plugin } from '@dxos/app-framework';
|
|
6
6
|
import { AppPlugin } from '@dxos/app-toolkit';
|
|
7
7
|
|
|
8
|
-
import { AppGraphBuilder, HelpState,
|
|
9
|
-
import { meta } from '
|
|
10
|
-
import { translations } from '
|
|
11
|
-
import { type Step } from '
|
|
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
15
|
export const HelpPlugin = Plugin.define<HelpPluginOptions>(meta).pipe(
|
|
16
16
|
AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),
|
|
17
|
-
AppPlugin.
|
|
17
|
+
AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
|
|
18
18
|
AppPlugin.addSurfaceModule({ activate: ReactSurface }),
|
|
19
19
|
AppPlugin.addTranslationsModule({ translations }),
|
|
20
20
|
Plugin.addModule({
|
|
@@ -28,3 +28,5 @@ export const HelpPlugin = Plugin.define<HelpPluginOptions>(meta).pipe(
|
|
|
28
28
|
})),
|
|
29
29
|
Plugin.make,
|
|
30
30
|
);
|
|
31
|
+
|
|
32
|
+
export default HelpPlugin;
|
|
@@ -5,29 +5,30 @@
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
7
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
|
-
import { GraphBuilder, NodeMatcher } from '@dxos/app-graph';
|
|
8
|
+
import { GraphBuilder, Node, NodeMatcher } from '@dxos/app-graph';
|
|
9
9
|
import { AppCapabilities, LayoutOperation } from '@dxos/app-toolkit';
|
|
10
|
-
import { Operation } from '@dxos/
|
|
10
|
+
import { Operation } from '@dxos/compute';
|
|
11
11
|
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
12
|
+
import { meta } from '#meta';
|
|
13
|
+
import { HelpCapabilities, HelpOperation } from '#types';
|
|
14
|
+
|
|
15
|
+
import { SHORTCUTS_DIALOG } from '../constants';
|
|
15
16
|
|
|
16
17
|
export default Capability.makeModule(
|
|
17
18
|
Effect.fnUntraced(function* () {
|
|
18
19
|
const extensions = yield* GraphBuilder.createExtension({
|
|
19
|
-
id:
|
|
20
|
+
id: 'root',
|
|
20
21
|
match: NodeMatcher.whenRoot,
|
|
21
22
|
actions: () =>
|
|
22
23
|
Effect.succeed([
|
|
23
|
-
{
|
|
24
|
+
Node.makeAction({
|
|
24
25
|
id: HelpOperation.Start.meta.key,
|
|
25
26
|
data: Effect.fnUntraced(function* () {
|
|
26
27
|
yield* Capabilities.updateAtomValue(HelpCapabilities.State, (s) => ({ ...s, showHints: true }));
|
|
27
28
|
yield* Operation.invoke(HelpOperation.Start);
|
|
28
29
|
}),
|
|
29
30
|
properties: {
|
|
30
|
-
label: ['open
|
|
31
|
+
label: ['open-help-tour.message', { ns: meta.id }],
|
|
31
32
|
icon: 'ph--info--regular',
|
|
32
33
|
keyBinding: {
|
|
33
34
|
macos: 'shift+meta+/',
|
|
@@ -36,9 +37,9 @@ export default Capability.makeModule(
|
|
|
36
37
|
},
|
|
37
38
|
testId: 'helpPlugin.openHelp',
|
|
38
39
|
},
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
id:
|
|
40
|
+
}),
|
|
41
|
+
Node.makeAction({
|
|
42
|
+
id: 'open-shortcuts',
|
|
42
43
|
data: Effect.fnUntraced(function* () {
|
|
43
44
|
yield* Capabilities.updateAtomValue(HelpCapabilities.State, (s) => ({ ...s, showHints: true }));
|
|
44
45
|
yield* Operation.invoke(LayoutOperation.UpdateDialog, {
|
|
@@ -46,13 +47,13 @@ export default Capability.makeModule(
|
|
|
46
47
|
});
|
|
47
48
|
}),
|
|
48
49
|
properties: {
|
|
49
|
-
label: ['open
|
|
50
|
+
label: ['open-shortcuts.label', { ns: meta.id }],
|
|
50
51
|
icon: 'ph--keyboard--regular',
|
|
51
52
|
keyBinding: {
|
|
52
53
|
macos: 'meta+ctrl+/',
|
|
53
54
|
},
|
|
54
55
|
},
|
|
55
|
-
},
|
|
56
|
+
}),
|
|
56
57
|
]),
|
|
57
58
|
});
|
|
58
59
|
|
|
@@ -2,8 +2,14 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export
|
|
9
|
-
export
|
|
5
|
+
import { Capability } from '@dxos/app-framework';
|
|
6
|
+
import { OperationHandlerSet } from '@dxos/compute';
|
|
7
|
+
|
|
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
|
+
);
|
|
@@ -8,9 +8,9 @@ import React from 'react';
|
|
|
8
8
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
9
|
import { useAtomCapabilityState } from '@dxos/app-framework/ui';
|
|
10
10
|
|
|
11
|
-
import { WelcomeTour } from '
|
|
12
|
-
import { meta } from '
|
|
13
|
-
import { HelpCapabilities, type Step } from '
|
|
11
|
+
import { WelcomeTour } from '#components';
|
|
12
|
+
import { meta } from '#meta';
|
|
13
|
+
import { HelpCapabilities, type Step } from '#types';
|
|
14
14
|
|
|
15
15
|
export default Capability.makeModule(
|
|
16
16
|
Effect.fnUntraced(function* (steps?: Step[]) {
|
|
@@ -7,28 +7,28 @@ import React from 'react';
|
|
|
7
7
|
|
|
8
8
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
9
|
import { Surface } from '@dxos/app-framework/ui';
|
|
10
|
+
import { AppSurface } from '@dxos/app-toolkit/ui';
|
|
10
11
|
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
import {
|
|
12
|
+
import { ShortcutsDialogContent, ShortcutsHints, ShortcutsList } from '#containers';
|
|
13
|
+
|
|
14
|
+
import { SHORTCUTS_DIALOG } from '../constants';
|
|
14
15
|
|
|
15
16
|
export default Capability.makeModule(() =>
|
|
16
17
|
Effect.succeed(
|
|
17
18
|
Capability.contributes(Capabilities.ReactSurface, [
|
|
18
19
|
Surface.create({
|
|
19
|
-
id:
|
|
20
|
+
id: 'hints',
|
|
20
21
|
role: 'hints',
|
|
21
22
|
component: () => <ShortcutsHints />,
|
|
22
23
|
}),
|
|
23
24
|
Surface.create({
|
|
24
|
-
id:
|
|
25
|
+
id: 'keyshortcuts',
|
|
25
26
|
role: 'keyshortcuts',
|
|
26
27
|
component: () => <ShortcutsList />,
|
|
27
28
|
}),
|
|
28
29
|
Surface.create({
|
|
29
30
|
id: SHORTCUTS_DIALOG,
|
|
30
|
-
|
|
31
|
-
filter: (data): data is { component: string } => data.component === SHORTCUTS_DIALOG,
|
|
31
|
+
filter: AppSurface.component(AppSurface.Dialog, SHORTCUTS_DIALOG),
|
|
32
32
|
component: () => <ShortcutsDialogContent />,
|
|
33
33
|
}),
|
|
34
34
|
]),
|
|
@@ -7,8 +7,8 @@ import * as Effect from 'effect/Effect';
|
|
|
7
7
|
import { Capability } from '@dxos/app-framework';
|
|
8
8
|
import { createKvsStore } from '@dxos/effect';
|
|
9
9
|
|
|
10
|
-
import { meta } from '
|
|
11
|
-
import { HelpCapabilities } from '
|
|
10
|
+
import { meta } from '#meta';
|
|
11
|
+
import { HelpCapabilities } from '#types';
|
|
12
12
|
|
|
13
13
|
export default Capability.makeModule(() =>
|
|
14
14
|
Effect.sync(() => {
|
|
@@ -13,7 +13,7 @@ import { Key } from './Key';
|
|
|
13
13
|
const Shortcut = ({ binding }: { binding: KeyBinding }) => {
|
|
14
14
|
const { t } = useTranslation(osTranslations);
|
|
15
15
|
return (
|
|
16
|
-
<div
|
|
16
|
+
<div className='flex items-center gap-2 whitespace-nowrap'>
|
|
17
17
|
<Key binding={binding.shortcut} />
|
|
18
18
|
<span className='text-sm'>{toLocalizedString(binding.data, t)}</span>
|
|
19
19
|
</div>
|
|
@@ -27,7 +27,7 @@ export const ShortcutsHints = ({ onClose }: { onClose?: () => void }) => {
|
|
|
27
27
|
const hints = bindings.filter((binding) => defaults.includes(binding.shortcut));
|
|
28
28
|
|
|
29
29
|
return (
|
|
30
|
-
<div
|
|
30
|
+
<div className='flex overflow-hidden px-2 gap-4'>
|
|
31
31
|
{hints.map((binding) => (
|
|
32
32
|
<Shortcut key={binding.shortcut} binding={binding} />
|
|
33
33
|
))}
|
|
@@ -7,19 +7,19 @@ import React, { useState } from 'react';
|
|
|
7
7
|
|
|
8
8
|
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
9
9
|
import { StorybookPlugin } from '@dxos/plugin-testing';
|
|
10
|
-
import {
|
|
10
|
+
import { random } from '@dxos/random';
|
|
11
11
|
import { Button, Icon } from '@dxos/react-ui';
|
|
12
12
|
import { withTheme } from '@dxos/react-ui/testing';
|
|
13
13
|
|
|
14
|
-
import { useHelp } from '
|
|
14
|
+
import { useHelp } from '#hooks';
|
|
15
15
|
|
|
16
16
|
import { WelcomeTour, type WelcomeTourProps } from './WelcomeTour';
|
|
17
17
|
|
|
18
18
|
const App = () => {
|
|
19
19
|
const { running, start } = useHelp();
|
|
20
|
-
const [items, setItems] = useState(() => Array.from({ length: 5 }).map(() =>
|
|
20
|
+
const [items, setItems] = useState(() => Array.from({ length: 5 }).map(() => random.lorem.sentence()));
|
|
21
21
|
const handleAdd = () => {
|
|
22
|
-
setItems((items) => [...items,
|
|
22
|
+
setItems((items) => [...items, random.lorem.sentence()]);
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
return (
|
|
@@ -76,25 +76,25 @@ export const Default: StoryObj<typeof WelcomeTour> = {
|
|
|
76
76
|
{
|
|
77
77
|
target: '[data-joyride="basic/1"]',
|
|
78
78
|
title: 'plugins/Step 1',
|
|
79
|
-
content:
|
|
79
|
+
content: random.lorem.paragraph(),
|
|
80
80
|
disableBeacon: true,
|
|
81
81
|
placement: 'right',
|
|
82
82
|
},
|
|
83
83
|
{
|
|
84
84
|
target: '[data-joyride="basic/2"]',
|
|
85
85
|
title: 'plugins/Step 2',
|
|
86
|
-
content:
|
|
86
|
+
content: random.lorem.paragraph(),
|
|
87
87
|
},
|
|
88
88
|
{
|
|
89
89
|
target: '[data-joyride="basic/3"]',
|
|
90
90
|
title: 'plugins/Step 3',
|
|
91
|
-
content:
|
|
91
|
+
content: random.lorem.paragraph(),
|
|
92
92
|
placement: 'right',
|
|
93
93
|
},
|
|
94
94
|
{
|
|
95
95
|
target: '[data-joyride="basic/4"]',
|
|
96
96
|
title: 'plugins/Step 4',
|
|
97
|
-
content:
|
|
97
|
+
content: random.lorem.paragraph(),
|
|
98
98
|
placement: 'top-end',
|
|
99
99
|
},
|
|
100
100
|
],
|
|
@@ -9,7 +9,8 @@ import { usePluginManager } from '@dxos/app-framework/ui';
|
|
|
9
9
|
import { useLayout } from '@dxos/app-toolkit/ui';
|
|
10
10
|
import { useAsyncEffect } from '@dxos/react-ui';
|
|
11
11
|
|
|
12
|
-
import { HelpContext, type Step } from '
|
|
12
|
+
import { HelpContext, type Step } from '#types';
|
|
13
|
+
|
|
13
14
|
import { Tooltip, floaterProps } from '../Tooltip';
|
|
14
15
|
|
|
15
16
|
const addStepClass = (target: string | HTMLElement) => {
|
|
@@ -162,6 +163,7 @@ export const WelcomeTour = ({ steps: initialSteps, running: runningProp, onRunni
|
|
|
162
163
|
callback={callback}
|
|
163
164
|
floaterProps={floaterProps}
|
|
164
165
|
tooltipComponent={Tooltip}
|
|
166
|
+
spotlightPadding={0}
|
|
165
167
|
/>
|
|
166
168
|
</HelpContext.Provider>
|
|
167
169
|
);
|
package/src/constants.ts
CHANGED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
|
|
8
|
+
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
9
|
+
import { Dialog } from '@dxos/react-ui';
|
|
10
|
+
import { withTheme } from '@dxos/react-ui/testing';
|
|
11
|
+
|
|
12
|
+
import { translations } from '#translations';
|
|
13
|
+
|
|
14
|
+
import { ShortcutsDialogContent } from './ShortcutsDialogContent';
|
|
15
|
+
|
|
16
|
+
const DefaultStory = () => (
|
|
17
|
+
<Dialog.Root defaultOpen>
|
|
18
|
+
<Dialog.Overlay>
|
|
19
|
+
<ShortcutsDialogContent />
|
|
20
|
+
</Dialog.Overlay>
|
|
21
|
+
</Dialog.Root>
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
const meta = {
|
|
25
|
+
title: 'plugins/plugin-help/containers/ShortcutsDialogContent',
|
|
26
|
+
component: ShortcutsDialogContent,
|
|
27
|
+
render: DefaultStory,
|
|
28
|
+
decorators: [withTheme(), withPluginManager()],
|
|
29
|
+
parameters: {
|
|
30
|
+
layout: 'fullscreen',
|
|
31
|
+
translations,
|
|
32
|
+
},
|
|
33
|
+
} satisfies Meta<typeof ShortcutsDialogContent>;
|
|
34
|
+
|
|
35
|
+
export default meta;
|
|
36
|
+
|
|
37
|
+
type Story = StoryObj<typeof meta>;
|
|
38
|
+
|
|
39
|
+
export const Default: Story = {};
|
|
@@ -4,26 +4,25 @@
|
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
|
-
import { Dialog,
|
|
7
|
+
import { Dialog, useTranslation } from '@dxos/react-ui';
|
|
8
8
|
|
|
9
|
-
import { ShortcutsList } from '
|
|
10
|
-
import { meta } from '
|
|
9
|
+
import { ShortcutsList } from '#components';
|
|
10
|
+
import { meta } from '#meta';
|
|
11
11
|
|
|
12
12
|
export const ShortcutsDialogContent = () => {
|
|
13
13
|
const { t } = useTranslation(meta.id);
|
|
14
14
|
|
|
15
15
|
return (
|
|
16
16
|
<Dialog.Content>
|
|
17
|
-
<
|
|
18
|
-
<Dialog.Title>{t('shortcuts
|
|
17
|
+
<Dialog.Header>
|
|
18
|
+
<Dialog.Title>{t('shortcuts-dialog.title')}</Dialog.Title>
|
|
19
19
|
<Dialog.Close asChild>
|
|
20
|
-
<
|
|
20
|
+
<Dialog.CloseIconButton />
|
|
21
21
|
</Dialog.Close>
|
|
22
|
-
</
|
|
23
|
-
|
|
24
|
-
<div className='flex items-center justify-center'>
|
|
22
|
+
</Dialog.Header>
|
|
23
|
+
<Dialog.Body>
|
|
25
24
|
<ShortcutsList />
|
|
26
|
-
</
|
|
25
|
+
</Dialog.Body>
|
|
27
26
|
</Dialog.Content>
|
|
28
27
|
);
|
|
29
28
|
};
|
package/src/hooks/useHelp.tsx
CHANGED
|
@@ -6,7 +6,7 @@ import { useContext } from 'react';
|
|
|
6
6
|
|
|
7
7
|
import { raise } from '@dxos/debug';
|
|
8
8
|
|
|
9
|
-
import { HelpContext } from '
|
|
9
|
+
import { HelpContext } from '#types';
|
|
10
10
|
|
|
11
11
|
export const useHelp = () => {
|
|
12
12
|
return useContext(HelpContext) ?? raise(new Error('Missing HelpContext'));
|
package/src/index.ts
CHANGED
|
@@ -2,10 +2,7 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
export { HelpCapabilities } from './types';
|
|
6
|
-
export * from './components';
|
|
7
5
|
export * from './constants';
|
|
8
6
|
export * from './meta';
|
|
9
|
-
export * from './
|
|
10
|
-
export * from './hooks';
|
|
7
|
+
export * from './operations';
|
|
11
8
|
export * from './types';
|