@dxos/plugin-help 0.8.4-main.bc674ce → 0.8.4-main.c351d160a8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/ShortcutsDialogContent-SFEN5YKG.mjs +36 -0
- package/dist/lib/browser/ShortcutsDialogContent-SFEN5YKG.mjs.map +7 -0
- package/dist/lib/browser/ShortcutsHints-SUH2FE3T.mjs +12 -0
- package/dist/lib/browser/ShortcutsHints-SUH2FE3T.mjs.map +7 -0
- package/dist/lib/browser/ShortcutsList-4YPEJM33.mjs +12 -0
- package/dist/lib/browser/ShortcutsList-4YPEJM33.mjs.map +7 -0
- package/dist/lib/browser/{app-graph-builder-DX3VXARQ.mjs → app-graph-builder-5RXPFQPI.mjs} +12 -12
- package/dist/lib/browser/app-graph-builder-5RXPFQPI.mjs.map +7 -0
- package/dist/lib/browser/{chunk-TS66J4C6.mjs → chunk-HMLZFBYY.mjs} +5 -5
- package/dist/lib/browser/{chunk-TS66J4C6.mjs.map → chunk-HMLZFBYY.mjs.map} +1 -1
- package/dist/lib/browser/chunk-P34WCEMS.mjs +11 -0
- package/dist/lib/browser/chunk-P34WCEMS.mjs.map +7 -0
- package/dist/lib/browser/{chunk-IM2QVQOH.mjs → chunk-TEXIV2IJ.mjs} +2 -2
- package/dist/lib/browser/{chunk-IM2QVQOH.mjs.map → chunk-TEXIV2IJ.mjs.map} +1 -1
- package/dist/lib/browser/{chunk-W5XAZM46.mjs → chunk-VGW5FGD7.mjs} +70 -95
- package/dist/lib/browser/chunk-VGW5FGD7.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +27 -26
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/meta.mjs +1 -1
- package/dist/lib/browser/{react-root-SZRF6EXG.mjs → react-root-JBHEZA5U.mjs} +7 -7
- package/dist/lib/browser/react-root-JBHEZA5U.mjs.map +7 -0
- package/dist/lib/browser/react-surface-W5S45O6Y.mjs +42 -0
- package/dist/lib/browser/react-surface-W5S45O6Y.mjs.map +7 -0
- package/dist/lib/browser/{state-VRPLKT3F.mjs → state-SEPP77HO.mjs} +3 -3
- package/dist/lib/browser/types/index.mjs +2 -2
- package/dist/types/src/HelpPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +1 -1
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +2 -2
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-root/index.d.ts +1 -1
- package/dist/types/src/capabilities/react-root/react-root.d.ts +1 -1
- package/dist/types/src/capabilities/react-root/react-root.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts +1 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +2 -2
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/state/state.d.ts +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/WelcomeTour/WelcomeTour.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/{components/Shortcuts/ShortcutsDialog.d.ts → containers/ShortcutsDialogContent/ShortcutsDialogContent.d.ts} +1 -2
- package/dist/types/src/containers/ShortcutsDialogContent/ShortcutsDialogContent.d.ts.map +1 -0
- package/dist/types/src/containers/ShortcutsDialogContent/index.d.ts +3 -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 +3 -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 +3 -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/index.d.ts +1 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +29 -28
- package/src/HelpPlugin.tsx +8 -7
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +8 -8
- package/src/capabilities/operation-resolver/operation-resolver.ts +3 -3
- package/src/capabilities/react-root/react-root.tsx +3 -3
- package/src/capabilities/react-surface/react-surface.tsx +10 -8
- package/src/components/Shortcuts/ShortcutsHints.tsx +1 -1
- package/src/components/Shortcuts/ShortcutsList.tsx +2 -2
- package/src/components/Shortcuts/ShortcutsSection.tsx +1 -3
- package/src/components/Shortcuts/index.ts +0 -1
- package/src/components/Shortcuts/styles.ts +2 -2
- package/src/components/Tooltip/Tooltip.tsx +4 -4
- package/src/components/WelcomeTour/WelcomeTour.stories.tsx +6 -6
- package/src/components/WelcomeTour/WelcomeTour.tsx +2 -1
- package/src/constants.ts +7 -0
- package/src/{components/Shortcuts/ShortcutsDialog.tsx → containers/ShortcutsDialogContent/ShortcutsDialogContent.tsx} +2 -5
- package/src/containers/ShortcutsDialogContent/index.ts +7 -0
- package/src/containers/ShortcutsHints/ShortcutsHints.tsx +5 -0
- package/src/containers/ShortcutsHints/index.ts +7 -0
- package/src/containers/ShortcutsList/ShortcutsList.tsx +5 -0
- package/src/containers/ShortcutsList/index.ts +7 -0
- package/src/containers/index.ts +9 -0
- package/src/index.ts +1 -0
- package/src/meta.ts +1 -1
- package/src/types/capabilities.ts +1 -1
- package/src/types/schema.ts +2 -2
- package/dist/lib/browser/app-graph-builder-DX3VXARQ.mjs.map +0 -7
- package/dist/lib/browser/chunk-W5XAZM46.mjs.map +0 -7
- package/dist/lib/browser/react-root-SZRF6EXG.mjs.map +0 -7
- package/dist/lib/browser/react-surface-DWNTJBVM.mjs +0 -37
- package/dist/lib/browser/react-surface-DWNTJBVM.mjs.map +0 -7
- package/dist/types/src/components/Shortcuts/ShortcutsDialog.d.ts.map +0 -1
- /package/dist/lib/browser/{state-VRPLKT3F.mjs.map → state-SEPP77HO.mjs.map} +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.c351d160a8",
|
|
4
4
|
"description": "Help plugin.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -45,47 +45,48 @@
|
|
|
45
45
|
"src"
|
|
46
46
|
],
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@effect-atom/atom": "^0.
|
|
48
|
+
"@effect-atom/atom": "^0.5.1",
|
|
49
49
|
"@fluentui/react-tabster": "9.26.11",
|
|
50
50
|
"react-joyride": "^2.7.2",
|
|
51
|
-
"@dxos/app-framework": "0.8.4-main.
|
|
52
|
-
"@dxos/app-graph": "0.8.4-main.
|
|
53
|
-
"@dxos/debug": "0.8.4-main.
|
|
54
|
-
"@dxos/
|
|
55
|
-
"@dxos/
|
|
56
|
-
"@dxos/
|
|
57
|
-
"@dxos/
|
|
58
|
-
"@dxos/
|
|
59
|
-
"@dxos/
|
|
60
|
-
"@dxos/
|
|
61
|
-
"@dxos/util": "0.8.4-main.
|
|
62
|
-
"@dxos/
|
|
51
|
+
"@dxos/app-framework": "0.8.4-main.c351d160a8",
|
|
52
|
+
"@dxos/app-graph": "0.8.4-main.c351d160a8",
|
|
53
|
+
"@dxos/debug": "0.8.4-main.c351d160a8",
|
|
54
|
+
"@dxos/app-toolkit": "0.8.4-main.c351d160a8",
|
|
55
|
+
"@dxos/echo": "0.8.4-main.c351d160a8",
|
|
56
|
+
"@dxos/effect": "0.8.4-main.c351d160a8",
|
|
57
|
+
"@dxos/keyboard": "0.8.4-main.c351d160a8",
|
|
58
|
+
"@dxos/operation": "0.8.4-main.c351d160a8",
|
|
59
|
+
"@dxos/plugin-client": "0.8.4-main.c351d160a8",
|
|
60
|
+
"@dxos/react-client": "0.8.4-main.c351d160a8",
|
|
61
|
+
"@dxos/util": "0.8.4-main.c351d160a8",
|
|
62
|
+
"@dxos/plugin-graph": "0.8.4-main.c351d160a8",
|
|
63
|
+
"@dxos/plugin-space": "0.8.4-main.c351d160a8"
|
|
63
64
|
},
|
|
64
65
|
"devDependencies": {
|
|
65
|
-
"@effect-atom/atom-react": "^0.
|
|
66
|
-
"@effect/platform": "0.
|
|
66
|
+
"@effect-atom/atom-react": "^0.5.0",
|
|
67
|
+
"@effect/platform": "0.94.4",
|
|
67
68
|
"@types/react": "~19.2.7",
|
|
68
69
|
"@types/react-dom": "~19.2.3",
|
|
69
|
-
"effect": "3.19.
|
|
70
|
+
"effect": "3.19.16",
|
|
70
71
|
"react": "~19.2.3",
|
|
71
72
|
"react-dom": "~19.2.3",
|
|
72
73
|
"react-floater": "0.7.9",
|
|
73
74
|
"type-fest": "4.10.1",
|
|
74
|
-
"vite": "7.1.
|
|
75
|
-
"@dxos/
|
|
76
|
-
"@dxos/
|
|
77
|
-
"@dxos/
|
|
78
|
-
"@dxos/
|
|
79
|
-
"@dxos/ui-theme": "0.8.4-main.
|
|
75
|
+
"vite": "^7.1.11",
|
|
76
|
+
"@dxos/plugin-testing": "0.8.4-main.c351d160a8",
|
|
77
|
+
"@dxos/random": "0.8.4-main.c351d160a8",
|
|
78
|
+
"@dxos/react-ui": "0.8.4-main.c351d160a8",
|
|
79
|
+
"@dxos/storybook-utils": "0.8.4-main.c351d160a8",
|
|
80
|
+
"@dxos/ui-theme": "0.8.4-main.c351d160a8"
|
|
80
81
|
},
|
|
81
82
|
"peerDependencies": {
|
|
82
|
-
"@effect-atom/atom-react": "^0.
|
|
83
|
-
"@effect/platform": "0.
|
|
84
|
-
"effect": "3.19.
|
|
83
|
+
"@effect-atom/atom-react": "^0.5.0",
|
|
84
|
+
"@effect/platform": "0.94.4",
|
|
85
|
+
"effect": "3.19.16",
|
|
85
86
|
"react": "~19.2.3",
|
|
86
87
|
"react-dom": "~19.2.3",
|
|
87
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
88
|
-
"@dxos/ui-theme": "0.8.4-main.
|
|
88
|
+
"@dxos/react-ui": "0.8.4-main.c351d160a8",
|
|
89
|
+
"@dxos/ui-theme": "0.8.4-main.c351d160a8"
|
|
89
90
|
},
|
|
90
91
|
"publishConfig": {
|
|
91
92
|
"access": "public"
|
package/src/HelpPlugin.tsx
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
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
8
|
import { AppGraphBuilder, HelpState, OperationResolver, ReactRoot, ReactSurface } from './capabilities';
|
|
8
9
|
import { meta } from './meta';
|
|
@@ -12,18 +13,18 @@ import { type Step } from './types';
|
|
|
12
13
|
export type HelpPluginOptions = { steps?: Step[] };
|
|
13
14
|
|
|
14
15
|
export const HelpPlugin = Plugin.define<HelpPluginOptions>(meta).pipe(
|
|
16
|
+
AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),
|
|
17
|
+
AppPlugin.addOperationResolverModule({ activate: OperationResolver }),
|
|
18
|
+
AppPlugin.addSurfaceModule({ activate: ReactSurface }),
|
|
19
|
+
AppPlugin.addTranslationsModule({ translations }),
|
|
15
20
|
Plugin.addModule({
|
|
16
|
-
activatesOn:
|
|
21
|
+
activatesOn: ActivationEvents.Startup,
|
|
17
22
|
activate: HelpState,
|
|
18
23
|
}),
|
|
19
|
-
Common.Plugin.addTranslationsModule({ translations }),
|
|
20
24
|
Plugin.addModule(({ steps = [] }) => ({
|
|
21
25
|
id: 'react-root',
|
|
22
|
-
activatesOn:
|
|
26
|
+
activatesOn: ActivationEvents.Startup,
|
|
23
27
|
activate: () => ReactRoot(steps),
|
|
24
28
|
})),
|
|
25
|
-
Common.Plugin.addSurfaceModule({ activate: ReactSurface }),
|
|
26
|
-
Common.Plugin.addOperationResolverModule({ activate: OperationResolver }),
|
|
27
|
-
Common.Plugin.addAppGraphModule({ activate: AppGraphBuilder }),
|
|
28
29
|
Plugin.make,
|
|
29
30
|
);
|
|
@@ -4,11 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
8
|
import { GraphBuilder, NodeMatcher } from '@dxos/app-graph';
|
|
9
|
+
import { AppCapabilities, LayoutOperation } from '@dxos/app-toolkit';
|
|
9
10
|
import { Operation } from '@dxos/operation';
|
|
10
11
|
|
|
11
|
-
import { SHORTCUTS_DIALOG } from '../../
|
|
12
|
+
import { SHORTCUTS_DIALOG } from '../../constants';
|
|
12
13
|
import { meta } from '../../meta';
|
|
13
14
|
import { HelpCapabilities, HelpOperation } from '../../types';
|
|
14
15
|
|
|
@@ -22,7 +23,7 @@ export default Capability.makeModule(
|
|
|
22
23
|
{
|
|
23
24
|
id: HelpOperation.Start.meta.key,
|
|
24
25
|
data: Effect.fnUntraced(function* () {
|
|
25
|
-
yield*
|
|
26
|
+
yield* Capabilities.updateAtomValue(HelpCapabilities.State, (s) => ({ ...s, showHints: true }));
|
|
26
27
|
yield* Operation.invoke(HelpOperation.Start);
|
|
27
28
|
}),
|
|
28
29
|
properties: {
|
|
@@ -37,12 +38,11 @@ export default Capability.makeModule(
|
|
|
37
38
|
},
|
|
38
39
|
},
|
|
39
40
|
{
|
|
40
|
-
id: `${meta.id}
|
|
41
|
+
id: `${meta.id}.open-shortcuts`,
|
|
41
42
|
data: Effect.fnUntraced(function* () {
|
|
42
|
-
yield*
|
|
43
|
-
yield* Operation.invoke(
|
|
43
|
+
yield* Capabilities.updateAtomValue(HelpCapabilities.State, (s) => ({ ...s, showHints: true }));
|
|
44
|
+
yield* Operation.invoke(LayoutOperation.UpdateDialog, {
|
|
44
45
|
subject: SHORTCUTS_DIALOG,
|
|
45
|
-
blockAlign: 'center',
|
|
46
46
|
});
|
|
47
47
|
}),
|
|
48
48
|
properties: {
|
|
@@ -56,6 +56,6 @@ export default Capability.makeModule(
|
|
|
56
56
|
]),
|
|
57
57
|
});
|
|
58
58
|
|
|
59
|
-
return Capability.contributes(
|
|
59
|
+
return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
|
|
60
60
|
}),
|
|
61
61
|
);
|
|
@@ -4,18 +4,18 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
|
-
import {
|
|
7
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
8
|
import { OperationResolver } from '@dxos/operation';
|
|
9
9
|
|
|
10
10
|
import { HelpCapabilities, HelpOperation } from '../../types';
|
|
11
11
|
|
|
12
12
|
export default Capability.makeModule(
|
|
13
13
|
Effect.fnUntraced(function* () {
|
|
14
|
-
return Capability.contributes(
|
|
14
|
+
return Capability.contributes(Capabilities.OperationResolver, [
|
|
15
15
|
OperationResolver.make({
|
|
16
16
|
operation: HelpOperation.Start,
|
|
17
17
|
handler: Effect.fnUntraced(function* () {
|
|
18
|
-
yield*
|
|
18
|
+
yield* Capabilities.updateAtomValue(HelpCapabilities.State, (state) => ({ ...state, running: true }));
|
|
19
19
|
}),
|
|
20
20
|
}),
|
|
21
21
|
]);
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
import React from 'react';
|
|
7
7
|
|
|
8
|
-
import {
|
|
9
|
-
import { useAtomCapabilityState } from '@dxos/app-framework/
|
|
8
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
|
+
import { useAtomCapabilityState } from '@dxos/app-framework/ui';
|
|
10
10
|
|
|
11
11
|
import { WelcomeTour } from '../../components';
|
|
12
12
|
import { meta } from '../../meta';
|
|
@@ -14,7 +14,7 @@ import { HelpCapabilities, type Step } from '../../types';
|
|
|
14
14
|
|
|
15
15
|
export default Capability.makeModule(
|
|
16
16
|
Effect.fnUntraced(function* (steps?: Step[]) {
|
|
17
|
-
return Capability.contributes(
|
|
17
|
+
return Capability.contributes(Capabilities.ReactRoot, {
|
|
18
18
|
id: meta.id,
|
|
19
19
|
root: () => {
|
|
20
20
|
const [state, updateState] = useAtomCapabilityState(HelpCapabilities.State);
|
|
@@ -5,25 +5,27 @@
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
import React from 'react';
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
|
+
import { Surface } from '@dxos/app-framework/ui';
|
|
9
10
|
|
|
10
|
-
import { SHORTCUTS_DIALOG
|
|
11
|
+
import { SHORTCUTS_DIALOG } from '../../constants';
|
|
12
|
+
import { ShortcutsDialogContent, ShortcutsHints, ShortcutsList } from '../../containers';
|
|
11
13
|
import { meta } from '../../meta';
|
|
12
14
|
|
|
13
15
|
export default Capability.makeModule(() =>
|
|
14
16
|
Effect.succeed(
|
|
15
|
-
Capability.contributes(
|
|
16
|
-
|
|
17
|
-
id: `${meta.id}
|
|
17
|
+
Capability.contributes(Capabilities.ReactSurface, [
|
|
18
|
+
Surface.create({
|
|
19
|
+
id: `${meta.id}.hints`,
|
|
18
20
|
role: 'hints',
|
|
19
21
|
component: () => <ShortcutsHints />,
|
|
20
22
|
}),
|
|
21
|
-
|
|
22
|
-
id: `${meta.id}
|
|
23
|
+
Surface.create({
|
|
24
|
+
id: `${meta.id}.keyshortcuts`,
|
|
23
25
|
role: 'keyshortcuts',
|
|
24
26
|
component: () => <ShortcutsList />,
|
|
25
27
|
}),
|
|
26
|
-
|
|
28
|
+
Surface.create({
|
|
27
29
|
id: SHORTCUTS_DIALOG,
|
|
28
30
|
role: 'dialog',
|
|
29
31
|
filter: (data): data is { component: string } => data.component === SHORTCUTS_DIALOG,
|
|
@@ -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 role='none' className='flex overflow-hidden
|
|
30
|
+
<div role='none' className='flex overflow-hidden px-2 gap-4'>
|
|
31
31
|
{hints.map((binding) => (
|
|
32
32
|
<Shortcut key={binding.shortcut} binding={binding} />
|
|
33
33
|
))}
|
|
@@ -22,11 +22,11 @@ export const ShortcutsList = () => {
|
|
|
22
22
|
});
|
|
23
23
|
|
|
24
24
|
return (
|
|
25
|
-
<dl className={mx('
|
|
25
|
+
<dl className={mx('w-fit grid grid-cols-[min-content_minmax(12rem,1fr)] gap-2 my-4 text-subdued select-none')}>
|
|
26
26
|
{bindings.map((binding, i) => (
|
|
27
27
|
<Fragment key={i}>
|
|
28
28
|
<Key binding={binding.shortcut} />
|
|
29
|
-
<span role='definition' className='
|
|
29
|
+
<span role='definition' className='ms-4' aria-labelledby={binding.shortcut}>
|
|
30
30
|
{toLocalizedString(binding.data, t)}
|
|
31
31
|
</span>
|
|
32
32
|
</Fragment>
|
|
@@ -4,13 +4,11 @@
|
|
|
4
4
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
|
-
import { descriptionText } from '@dxos/ui-theme';
|
|
8
|
-
|
|
9
7
|
import { ShortcutsList } from './ShortcutsList';
|
|
10
8
|
|
|
11
9
|
export const ShortcutsSection = () => {
|
|
12
10
|
return (
|
|
13
|
-
<section className=
|
|
11
|
+
<section className='text-description'>
|
|
14
12
|
<ShortcutsList />
|
|
15
13
|
</section>
|
|
16
14
|
);
|
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
import { mx } from '@dxos/ui-theme';
|
|
6
6
|
|
|
7
7
|
export const shortcutKey = mx(
|
|
8
|
-
'inline-flex min-
|
|
9
|
-
'rounded bg-neutral-100 dark:bg-neutral-900',
|
|
8
|
+
'inline-flex min-w-[24px] h-[24px] px-0.5 justify-center items-center text-xs',
|
|
9
|
+
'rounded-sm bg-neutral-100 dark:bg-neutral-900',
|
|
10
10
|
);
|
|
@@ -38,7 +38,7 @@ export const Tooltip = forwardRef<HTMLDivElement, TooltipRenderProps>(
|
|
|
38
38
|
|
|
39
39
|
return (
|
|
40
40
|
<div
|
|
41
|
-
className='flex flex-col
|
|
41
|
+
className='flex flex-col w-[15rem] min-h-[10rem] overflow-hidden rounded-md shadow-xl bg-accent-surface text-accent-surface-text'
|
|
42
42
|
role='tooltip'
|
|
43
43
|
data-testid='helpPlugin.tooltip'
|
|
44
44
|
data-step={index + 1}
|
|
@@ -46,7 +46,7 @@ export const Tooltip = forwardRef<HTMLDivElement, TooltipRenderProps>(
|
|
|
46
46
|
ref={forwardedRef}
|
|
47
47
|
>
|
|
48
48
|
<div className='flex p-2'>
|
|
49
|
-
<h2 className='grow
|
|
49
|
+
<h2 className='grow px-2 py-1 text-lg font-medium text-accent-surface-text'>{title}</h2>
|
|
50
50
|
<IconButton
|
|
51
51
|
density='fine'
|
|
52
52
|
icon='ph--x--bold'
|
|
@@ -58,7 +58,7 @@ export const Tooltip = forwardRef<HTMLDivElement, TooltipRenderProps>(
|
|
|
58
58
|
data-testid='helpPlugin.tooltip.close'
|
|
59
59
|
/>
|
|
60
60
|
</div>
|
|
61
|
-
<div className='flex grow
|
|
61
|
+
<div className='flex grow px-4 my-2'>{content}</div>
|
|
62
62
|
<div className='flex p-2 items-center justify-between' {...arrowNavigationAttrs}>
|
|
63
63
|
{
|
|
64
64
|
<IconButton
|
|
@@ -78,7 +78,7 @@ export const Tooltip = forwardRef<HTMLDivElement, TooltipRenderProps>(
|
|
|
78
78
|
key={i}
|
|
79
79
|
icon={index === i ? 'ph--circle--fill' : 'ph--circle--regular'}
|
|
80
80
|
size={2}
|
|
81
|
-
classNames='
|
|
81
|
+
classNames='mx-1 cursor-pointer'
|
|
82
82
|
/>
|
|
83
83
|
))}
|
|
84
84
|
</div>
|
|
@@ -23,8 +23,8 @@ const App = () => {
|
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
return (
|
|
26
|
-
<div className='flex flex-col
|
|
27
|
-
<div className='flex items-center gap-2
|
|
26
|
+
<div className='flex flex-col h-full p-4 space-y-8'>
|
|
27
|
+
<div className='flex items-center gap-2 py-2'>
|
|
28
28
|
<Button data-joyride='basic/1' onClick={() => start()}>
|
|
29
29
|
Start
|
|
30
30
|
</Button>
|
|
@@ -41,13 +41,13 @@ const App = () => {
|
|
|
41
41
|
))}
|
|
42
42
|
</ul>
|
|
43
43
|
</div>
|
|
44
|
-
<div className='flex items-center gap-2
|
|
44
|
+
<div className='flex items-center gap-2 py-2'>
|
|
45
45
|
<Button data-joyride='basic/3' onClick={handleAdd}>
|
|
46
46
|
Add
|
|
47
47
|
</Button>
|
|
48
48
|
</div>
|
|
49
49
|
<div className='flex grow' />
|
|
50
|
-
<div className='flex items-center
|
|
50
|
+
<div className='flex items-center py-2'>
|
|
51
51
|
<div className='grow' />
|
|
52
52
|
<Icon icon='ph--circle--regular' data-joyride='basic/4' />
|
|
53
53
|
<Icon icon='ph--circle--regular' />
|
|
@@ -105,11 +105,11 @@ export const Default: StoryObj<typeof WelcomeTour> = {
|
|
|
105
105
|
* IMPORTANT: Run in separate tab.
|
|
106
106
|
*/
|
|
107
107
|
const meta = {
|
|
108
|
-
title: 'plugins/plugin-help/WelcomeTour',
|
|
108
|
+
title: 'plugins/plugin-help/components/WelcomeTour',
|
|
109
109
|
component: WelcomeTour,
|
|
110
110
|
render: DefaultStory,
|
|
111
111
|
decorators: [
|
|
112
|
-
withTheme,
|
|
112
|
+
withTheme(),
|
|
113
113
|
withPluginManager({
|
|
114
114
|
plugins: [StorybookPlugin({})],
|
|
115
115
|
}),
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
import React, { useState } from 'react';
|
|
6
6
|
import Joyride, { ACTIONS, EVENTS } from 'react-joyride';
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { usePluginManager } from '@dxos/app-framework/ui';
|
|
9
|
+
import { useLayout } from '@dxos/app-toolkit/ui';
|
|
9
10
|
import { useAsyncEffect } from '@dxos/react-ui';
|
|
10
11
|
|
|
11
12
|
import { HelpContext, type Step } from '../../types';
|
package/src/constants.ts
ADDED
|
@@ -6,18 +6,15 @@ import React from 'react';
|
|
|
6
6
|
|
|
7
7
|
import { Dialog, IconButton, useTranslation } from '@dxos/react-ui';
|
|
8
8
|
|
|
9
|
+
import { ShortcutsList } from '../../components';
|
|
9
10
|
import { meta } from '../../meta';
|
|
10
11
|
|
|
11
|
-
import { ShortcutsList } from './ShortcutsList';
|
|
12
|
-
|
|
13
|
-
export const SHORTCUTS_DIALOG = `${meta.id}/ShortcutsDialog`;
|
|
14
|
-
|
|
15
12
|
export const ShortcutsDialogContent = () => {
|
|
16
13
|
const { t } = useTranslation(meta.id);
|
|
17
14
|
|
|
18
15
|
return (
|
|
19
16
|
<Dialog.Content>
|
|
20
|
-
<div role='none' className='flex justify-between
|
|
17
|
+
<div role='none' className='flex justify-between mb-1 pt-3 ps-2 pe-3 @md:pt-4 @md:ps-4 @md:pe-5'>
|
|
21
18
|
<Dialog.Title>{t('shortcuts dialog title')}</Dialog.Title>
|
|
22
19
|
<Dialog.Close asChild>
|
|
23
20
|
<IconButton icon='ph--x--bold' iconOnly size={3} label='Close' variant='ghost' autoFocus />
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type ComponentType, lazy } from 'react';
|
|
6
|
+
|
|
7
|
+
export const ShortcutsDialogContent: ComponentType<any> = lazy(() => import('./ShortcutsDialogContent'));
|
|
8
|
+
export const ShortcutsHints: ComponentType<any> = lazy(() => import('./ShortcutsHints'));
|
|
9
|
+
export const ShortcutsList: ComponentType<any> = lazy(() => import('./ShortcutsList'));
|
package/src/index.ts
CHANGED
package/src/meta.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { type Plugin } from '@dxos/app-framework';
|
|
|
6
6
|
import { trim } from '@dxos/util';
|
|
7
7
|
|
|
8
8
|
export const meta: Plugin.Meta = {
|
|
9
|
-
id: 'dxos.
|
|
9
|
+
id: 'org.dxos.plugin.help',
|
|
10
10
|
name: 'Help',
|
|
11
11
|
description: trim`
|
|
12
12
|
Built-in help system with documentation, tutorials, and contextual assistance.
|
|
@@ -20,5 +20,5 @@ export namespace HelpCapabilities {
|
|
|
20
20
|
|
|
21
21
|
export type State = Schema.Schema.Type<typeof StateSchema>;
|
|
22
22
|
|
|
23
|
-
export const State = Capability.make<Atom.Writable<State>>(`${meta.id}
|
|
23
|
+
export const State = Capability.make<Atom.Writable<State>>(`${meta.id}.capability.state`);
|
|
24
24
|
}
|
package/src/types/schema.ts
CHANGED
|
@@ -33,11 +33,11 @@ export const HelpContext: Context<HelpContextType> = createContext<HelpContextTy
|
|
|
33
33
|
stop: () => {},
|
|
34
34
|
});
|
|
35
35
|
|
|
36
|
-
const HELP_OPERATION = `${meta.id}
|
|
36
|
+
const HELP_OPERATION = `${meta.id}.operation`;
|
|
37
37
|
|
|
38
38
|
export namespace HelpOperation {
|
|
39
39
|
export const Start = Operation.make({
|
|
40
|
-
meta: { key: `${HELP_OPERATION}
|
|
40
|
+
meta: { key: `${HELP_OPERATION}.start`, name: 'Start Help' },
|
|
41
41
|
services: [Capability.Service],
|
|
42
42
|
schema: { input: Schema.Void, output: Schema.Void },
|
|
43
43
|
});
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/app-graph-builder/app-graph-builder.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability, Common } from '@dxos/app-framework';\nimport { GraphBuilder, NodeMatcher } from '@dxos/app-graph';\nimport { Operation } from '@dxos/operation';\n\nimport { SHORTCUTS_DIALOG } from '../../components';\nimport { meta } from '../../meta';\nimport { HelpCapabilities, HelpOperation } from '../../types';\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n const extensions = yield* GraphBuilder.createExtension({\n id: meta.id,\n match: NodeMatcher.whenRoot,\n actions: () =>\n Effect.succeed([\n {\n id: HelpOperation.Start.meta.key,\n data: Effect.fnUntraced(function* () {\n yield* Common.Capability.updateAtomValue(HelpCapabilities.State, (s) => ({ ...s, showHints: true }));\n yield* Operation.invoke(HelpOperation.Start);\n }),\n properties: {\n label: ['open help tour', { ns: meta.id }],\n icon: 'ph--info--regular',\n keyBinding: {\n macos: 'shift+meta+/',\n windows: 'shift+ctrl+/',\n linux: 'shift+ctrl+?',\n },\n testId: 'helpPlugin.openHelp',\n },\n },\n {\n id: `${meta.id}/open-shortcuts`,\n data: Effect.fnUntraced(function* () {\n yield* Common.Capability.updateAtomValue(HelpCapabilities.State, (s) => ({ ...s, showHints: true }));\n yield* Operation.invoke(Common.LayoutOperation.UpdateDialog, {\n subject: SHORTCUTS_DIALOG,\n blockAlign: 'center',\n });\n }),\n properties: {\n label: ['open shortcuts label', { ns: meta.id }],\n icon: 'ph--keyboard--regular',\n keyBinding: {\n macos: 'meta+ctrl+/',\n },\n },\n },\n ]),\n });\n\n return Capability.contributes(Common.Capability.AppGraphBuilder, extensions);\n }),\n);\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,YAAYC,cAAc;AACnC,SAASC,cAAcC,mBAAmB;AAC1C,SAASC,iBAAiB;AAM1B,IAAA,4BAAeC,WAAWC,WACjBC,kBAAW,aAAA;AAChB,QAAMC,aAAa,OAAOC,aAAaC,gBAAgB;IACrDC,IAAIC,KAAKD;IACTE,OAAOC,YAAYC;IACnBC,SAAS,MACAC,eAAQ;MACb;QACEN,IAAIO,cAAcC,MAAMP,KAAKQ;QAC7BC,MAAad,kBAAW,aAAA;AACtB,iBAAOe,OAAOjB,WAAWkB,gBAAgBC,iBAAiBC,OAAO,CAACC,OAAO;YAAE,GAAGA;YAAGC,WAAW;UAAK,EAAA;AACjG,iBAAOC,UAAUC,OAAOX,cAAcC,KAAK;QAC7C,CAAA;QACAW,YAAY;UACVC,OAAO;YAAC;YAAkB;cAAEC,IAAIpB,KAAKD;YAAG;;UACxCsB,MAAM;UACNC,YAAY;YACVC,OAAO;YACPC,SAAS;YACTC,OAAO;UACT;UACAC,QAAQ;QACV;MACF;MACA;QACE3B,IAAI,GAAGC,KAAKD,EAAE;QACdU,MAAad,kBAAW,aAAA;AACtB,iBAAOe,OAAOjB,WAAWkB,gBAAgBC,iBAAiBC,OAAO,CAACC,OAAO;YAAE,GAAGA;YAAGC,WAAW;UAAK,EAAA;AACjG,iBAAOC,UAAUC,OAAOP,OAAOiB,gBAAgBC,cAAc;YAC3DC,SAASC;YACTC,YAAY;UACd,CAAA;QACF,CAAA;QACAb,YAAY;UACVC,OAAO;YAAC;YAAwB;cAAEC,IAAIpB,KAAKD;YAAG;;UAC9CsB,MAAM;UACNC,YAAY;YACVC,OAAO;UACT;QACF;MACF;KACD;EACL,CAAA;AAEA,SAAO9B,WAAWuC,YAAYtB,OAAOjB,WAAWwC,iBAAiBrC,UAAAA;AACnE,CAAA,CAAA;",
|
|
6
|
-
"names": ["Effect", "Capability", "Common", "GraphBuilder", "NodeMatcher", "Operation", "Capability", "makeModule", "fnUntraced", "extensions", "GraphBuilder", "createExtension", "id", "meta", "match", "NodeMatcher", "whenRoot", "actions", "succeed", "HelpOperation", "Start", "key", "data", "Common", "updateAtomValue", "HelpCapabilities", "State", "s", "showHints", "Operation", "invoke", "properties", "label", "ns", "icon", "keyBinding", "macos", "windows", "linux", "testId", "LayoutOperation", "UpdateDialog", "subject", "SHORTCUTS_DIALOG", "blockAlign", "contributes", "AppGraphBuilder"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/Shortcuts/Key.tsx", "../../../src/components/Shortcuts/styles.ts", "../../../src/components/Shortcuts/ShortcutsList.tsx", "../../../src/components/Shortcuts/ShortcutsDialog.tsx", "../../../src/components/Shortcuts/ShortcutsHints.tsx", "../../../src/components/Shortcuts/ShortcutsSection.tsx", "../../../src/components/Tooltip/Tooltip.tsx", "../../../src/components/WelcomeTour/WelcomeTour.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\n\nimport { keySymbols } from '@dxos/keyboard';\n\nimport { shortcutKey } from './styles';\n\nexport const Key = ({ binding }: { binding: string }) => {\n return (\n <span role='term' className='inline-flex gap-1' aria-label={binding} id={binding}>\n {keySymbols(binding).map((c, i) => (\n <span key={i} className={shortcutKey}>\n {c}\n </span>\n ))}\n </span>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { mx } from '@dxos/ui-theme';\n\nexport const shortcutKey = mx(\n 'inline-flex min-is-[24px] bs-[24px] pli-0.5 justify-center items-center text-xs',\n 'rounded bg-neutral-100 dark:bg-neutral-900',\n);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { Fragment } from 'react';\n\nimport { Keyboard } from '@dxos/keyboard';\nimport { toLocalizedString, useTranslation } from '@dxos/react-ui';\nimport { mx } from '@dxos/ui-theme';\n\nimport { meta } from '../../meta';\n\nimport { Key } from './Key';\n\nexport const ShortcutsList = () => {\n const { t } = useTranslation(meta.id);\n const bindings = Keyboard.singleton.getBindings();\n\n // TODO(burdon): Get shortcuts from TextEditor.\n bindings.sort((a, b) => {\n return toLocalizedString(a.data, t)?.toLowerCase().localeCompare(toLocalizedString(b.data, t)?.toLowerCase());\n });\n\n return (\n <dl className={mx('is-fit grid grid-cols-[min-content_minmax(12rem,1fr)] gap-2 mlb-4 text-subdued select-none')}>\n {bindings.map((binding, i) => (\n <Fragment key={i}>\n <Key binding={binding.shortcut} />\n <span role='definition' className='mis-4' aria-labelledby={binding.shortcut}>\n {toLocalizedString(binding.data, t)}\n </span>\n </Fragment>\n ))}\n </dl>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Dialog, IconButton, useTranslation } from '@dxos/react-ui';\n\nimport { meta } from '../../meta';\n\nimport { ShortcutsList } from './ShortcutsList';\n\nexport const SHORTCUTS_DIALOG = `${meta.id}/ShortcutsDialog`;\n\nexport const ShortcutsDialogContent = () => {\n const { t } = useTranslation(meta.id);\n\n return (\n <Dialog.Content>\n <div role='none' className='flex justify-between mbe-1 pbs-3 pis-2 pie-3 @md:pbs-4 @md:pis-4 @md:pie-5'>\n <Dialog.Title>{t('shortcuts dialog title')}</Dialog.Title>\n <Dialog.Close asChild>\n <IconButton icon='ph--x--bold' iconOnly size={3} label='Close' variant='ghost' autoFocus />\n </Dialog.Close>\n </div>\n\n <div className='flex items-center justify-center'>\n <ShortcutsList />\n </div>\n </Dialog.Content>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type KeyBinding, Keyboard } from '@dxos/keyboard';\nimport { IconButton, toLocalizedString, useTranslation } from '@dxos/react-ui';\nimport { osTranslations } from '@dxos/ui-theme';\n\nimport { Key } from './Key';\n\nconst Shortcut = ({ binding }: { binding: KeyBinding }) => {\n const { t } = useTranslation(osTranslations);\n return (\n <div role='none' className='flex items-center gap-2 whitespace-nowrap'>\n <Key binding={binding.shortcut} />\n <span className='text-sm'>{toLocalizedString(binding.data, t)}</span>\n </div>\n );\n};\n\nexport const ShortcutsHints = ({ onClose }: { onClose?: () => void }) => {\n // TODO(burdon): Display by context/weight/cycle.\n const defaults = ['meta+k', 'meta+/', 'meta+,'];\n const bindings = Keyboard.singleton.getBindings();\n const hints = bindings.filter((binding) => defaults.includes(binding.shortcut));\n\n return (\n <div role='none' className='flex overflow-hidden pli-2 gap-4'>\n {hints.map((binding) => (\n <Shortcut key={binding.shortcut} binding={binding} />\n ))}\n {onClose && (\n <IconButton\n icon='ph--x--regular'\n size={4}\n label='Close'\n iconOnly\n noTooltip\n variant='ghost'\n classNames='p-0 cursor-pointer'\n onClick={onClose}\n />\n )}\n </div>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\n\nimport { descriptionText } from '@dxos/ui-theme';\n\nimport { ShortcutsList } from './ShortcutsList';\n\nexport const ShortcutsSection = () => {\n return (\n <section className={descriptionText}>\n <ShortcutsList />\n </section>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { useArrowNavigationGroup, useFocusableGroup } from '@fluentui/react-tabster';\nimport React, { forwardRef } from 'react';\n// TODO(thure): This needed to be imported in the package.json specifically to pacify TS2742. See if this is resolved with typescript@5.5.x.\n// eslint-disable-next-line unused-imports/no-unused-imports\nimport _floater from 'react-floater';\nimport { type Props, type TooltipRenderProps } from 'react-joyride';\n// TODO(thure): This needed to be imported in the package.json specifically to pacify TS2742. See if this is resolved with typescript@5.5.x.\n// eslint-disable-next-line unused-imports/no-unused-imports\nimport _typefest from 'type-fest';\n\nimport { Button, Icon, IconButton } from '@dxos/react-ui';\n\n// https://docs.react-joyride.com/styling\n// https://github.com/gilbarbara/react-floater\nexport const floaterProps: Props['floaterProps'] = {\n styles: {\n // Arrow color is set by joyride.\n arrow: {\n length: 8,\n spread: 16,\n },\n floater: {\n // TODO(burdon): Get tokens from theme.\n filter: 'drop-shadow(0 0 0.75rem rgba(0, 0, 0, 0.2))',\n },\n },\n};\n\n// TODO(burdon): Add info link to docs.\nexport const Tooltip = forwardRef<HTMLDivElement, TooltipRenderProps>(\n ({ step: { title, content }, index, size, isLastStep, backProps, closeProps, primaryProps }, forwardedRef) => {\n const arrowNavigationAttrs = useArrowNavigationGroup({ axis: 'horizontal' });\n const focusableGroupAttrs = useFocusableGroup({ tabBehavior: 'limited-trap-focus' });\n\n return (\n <div\n className='flex flex-col is-[15rem] min-bs-[10rem] overflow-hidden rounded-md shadow-xl bg-accentSurface text-accentSurfaceText'\n role='tooltip'\n data-testid='helpPlugin.tooltip'\n data-step={index + 1}\n {...focusableGroupAttrs}\n ref={forwardedRef}\n >\n <div className='flex p-2'>\n <h2 className='grow pli-2 plb-1 text-lg font-medium text-accentSurfaceText'>{title}</h2>\n <IconButton\n density='fine'\n icon='ph--x--bold'\n iconOnly\n label={closeProps['aria-label']}\n onClick={closeProps.onClick}\n size={4}\n variant='primary'\n data-testid='helpPlugin.tooltip.close'\n />\n </div>\n <div className='flex grow pli-4 mlb-2'>{content}</div>\n <div className='flex p-2 items-center justify-between' {...arrowNavigationAttrs}>\n {\n <IconButton\n classNames={[!(index > 0 && backProps) && 'invisible']}\n icon='ph--caret-left--regular'\n iconOnly\n label={backProps['aria-label']}\n onClick={backProps.onClick}\n variant='primary'\n data-testid='helpPlugin.tooltip.back'\n />\n }\n <div className='flex grow gap-2 justify-center'>\n <div className='flex'>\n {Array.from({ length: size }).map((_, i) => (\n <Icon\n key={i}\n icon={index === i ? 'ph--circle--fill' : 'ph--circle--regular'}\n size={2}\n classNames='mli-1 cursor-pointer'\n />\n ))}\n </div>\n </div>\n {isLastStep ? (\n <Button\n variant='primary'\n onClick={closeProps.onClick}\n title={closeProps['aria-label']}\n autoFocus\n data-testid='helpPlugin.tooltip.finish'\n >\n Done\n </Button>\n ) : (\n <IconButton\n autoFocus\n icon='ph--caret-right--regular'\n iconOnly\n label={primaryProps['aria-label']}\n onClick={primaryProps.onClick}\n size={6}\n variant='primary'\n data-testid='helpPlugin.tooltip.next'\n />\n )}\n </div>\n </div>\n );\n },\n);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { useState } from 'react';\nimport Joyride, { ACTIONS, EVENTS } from 'react-joyride';\n\nimport { useLayout, usePluginManager } from '@dxos/app-framework/react';\nimport { useAsyncEffect } from '@dxos/react-ui';\n\nimport { HelpContext, type Step } from '../../types';\nimport { Tooltip, floaterProps } from '../Tooltip';\n\nconst addStepClass = (target: string | HTMLElement) => {\n const element = typeof target === 'string' ? document.querySelector(target) : target;\n if (element) {\n element.classList.add('joyride-target');\n }\n};\n\nconst removeTargetClass = (target: string | HTMLElement) => {\n const element = typeof target === 'string' ? document.querySelector(target) : target;\n if (element) {\n element.classList.remove('joyride-target');\n }\n};\n\nconst getTarget = (step: Step) => {\n return typeof step.target === 'string' ? document.querySelector(step.target) : step.target;\n};\n\n/**\n * Wait for the target element to be in the document.\n */\nconst waitForTarget = async (step: Step) => {\n if (typeof step.target === 'string') {\n const target = step.target;\n const element = document.querySelector(target);\n if (element) {\n return;\n }\n\n await new Promise<void>((resolve) => {\n const observer = new MutationObserver((mutations) => {\n mutations.forEach((mutation) => {\n if (mutation.addedNodes.length > 0) {\n const element = document.querySelector(target);\n if (element) {\n observer.disconnect();\n resolve();\n }\n }\n });\n });\n\n observer.observe(document.body, { childList: true, subtree: true });\n });\n }\n};\n\nexport type WelcomeTourProps = {\n steps: Step[];\n running?: boolean;\n onRunningChanged?: (state: boolean) => any;\n};\n\nexport const WelcomeTour = ({ steps: initialSteps, running: runningProp, onRunningChanged }: WelcomeTourProps) => {\n const manager = usePluginManager();\n const layout = useLayout();\n const [running, setRunning] = useState(!!runningProp && !!getTarget(initialSteps[0]));\n const [stepIndex, _setStepIndex] = useState(0);\n const [steps, setSteps] = useState(initialSteps);\n\n const paused = layout.dialogOpen;\n\n const setStepIndex = (index: number) => {\n if (runningProp) {\n const step = steps[index];\n step?.before?.(manager.capabilities);\n }\n _setStepIndex(index);\n };\n\n const setRunningChanged = (state: boolean) => {\n if (typeof runningProp !== 'undefined') {\n onRunningChanged?.(state);\n } else {\n if (state) {\n setStepIndex(0);\n setRunning(true);\n } else {\n setRunning(false);\n }\n }\n };\n\n useAsyncEffect(async () => {\n if (runningProp) {\n // This handles the case when the target is not yet in the document.\n // If the target is not in the document, when the joyride is turned on, it will not show the tooltip.\n await waitForTarget(steps[stepIndex]);\n setStepIndex(0);\n setRunning(true);\n } else if (typeof runningProp !== 'undefined') {\n setRunning(false);\n }\n }, [runningProp]);\n\n // https://docs.react-joyride.com/callback\n const callback: Joyride['callback'] = async (options) => {\n const { type, action, index, size } = options;\n switch (type) {\n case EVENTS.STEP_BEFORE:\n addStepClass(options.step.target);\n break;\n case EVENTS.TOUR_END:\n break;\n case EVENTS.STEP_AFTER:\n removeTargetClass(options.step.target);\n switch (action) {\n case ACTIONS.NEXT:\n if (index < size - 1) {\n setStepIndex(index + 1);\n }\n break;\n case ACTIONS.PREV:\n if (index > 0) {\n setStepIndex(index - 1);\n }\n break;\n case ACTIONS.CLOSE:\n setRunningChanged(false);\n setStepIndex(0);\n break;\n }\n break;\n }\n };\n\n return (\n <HelpContext.Provider\n value={{\n running: running && !paused,\n steps,\n setSteps,\n setIndex: setStepIndex,\n start: () => setRunningChanged(true),\n stop: () => setRunningChanged(false),\n }}\n >\n <style>\n {`.joyride-target {\n --controls-opacity: 1;\n }`}\n </style>\n <Joyride\n continuous={true}\n steps={steps}\n stepIndex={stepIndex}\n run={running && !paused}\n callback={callback}\n floaterProps={floaterProps}\n tooltipComponent={Tooltip}\n />\n </HelpContext.Provider>\n );\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;AAIA,OAAOA,WAAW;AAElB,SAASC,kBAAkB;;;ACF3B,SAASC,UAAU;AAEZ,IAAMC,cAAcC,GACzB,mFACA,4CAAA;;;ADEK,IAAMC,MAAM,CAAC,EAAEC,QAAO,MAAuB;AAClD,SACE,sBAAA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;KAEA,gBAAAgB,OAAA,cAACO,SAAAA,MACE;;UAEC,GAEJ,gBAAAP,OAAA,cAACQ,SAAAA;IACCC,YAAY;IACZ7C;IACAW;IACAmC,KAAK5C,WAAW,CAACY;IACjBS;IACAwB;IACAC,kBAAkBC;;AAI1B;",
|
|
6
|
-
"names": ["React", "keySymbols", "mx", "shortcutKey", "mx", "Key", "binding", "span", "role", "className", "aria-label", "id", "keySymbols", "map", "c", "i", "key", "shortcutKey", "React", "Fragment", "Keyboard", "toLocalizedString", "useTranslation", "mx", "ShortcutsList", "t", "useTranslation", "meta", "id", "bindings", "Keyboard", "singleton", "getBindings", "sort", "a", "b", "toLocalizedString", "data", "toLowerCase", "localeCompare", "React", "dl", "className", "mx", "map", "binding", "i", "Fragment", "key", "Key", "shortcut", "span", "role", "aria-labelledby", "React", "Dialog", "IconButton", "useTranslation", "SHORTCUTS_DIALOG", "meta", "id", "ShortcutsDialogContent", "t", "useTranslation", "React", "Dialog", "Content", "div", "role", "className", "Title", "Close", "asChild", "IconButton", "icon", "iconOnly", "size", "label", "variant", "autoFocus", "ShortcutsList", "React", "Keyboard", "IconButton", "toLocalizedString", "useTranslation", "osTranslations", "Shortcut", "binding", "t", "useTranslation", "osTranslations", "React", "div", "role", "className", "Key", "shortcut", "span", "toLocalizedString", "data", "ShortcutsHints", "onClose", "defaults", "bindings", "Keyboard", "singleton", "getBindings", "hints", "filter", "includes", "map", "key", "IconButton", "icon", "size", "label", "iconOnly", "noTooltip", "variant", "classNames", "onClick", "React", "descriptionText", "ShortcutsSection", "React", "section", "className", "descriptionText", "ShortcutsList", "useArrowNavigationGroup", "useFocusableGroup", "React", "forwardRef", "Button", "Icon", "IconButton", "floaterProps", "styles", "arrow", "length", "spread", "floater", "filter", "Tooltip", "forwardRef", "step", "title", "content", "index", "size", "isLastStep", "backProps", "closeProps", "primaryProps", "forwardedRef", "arrowNavigationAttrs", "useArrowNavigationGroup", "axis", "focusableGroupAttrs", "useFocusableGroup", "tabBehavior", "React", "div", "className", "role", "data-testid", "data-step", "ref", "h2", "IconButton", "density", "icon", "iconOnly", "label", "onClick", "variant", "classNames", "Array", "from", "map", "_", "i", "Icon", "key", "Button", "autoFocus", "React", "useState", "Joyride", "ACTIONS", "EVENTS", "useLayout", "usePluginManager", "useAsyncEffect", "addStepClass", "target", "element", "document", "querySelector", "classList", "add", "removeTargetClass", "remove", "getTarget", "step", "waitForTarget", "Promise", "resolve", "observer", "MutationObserver", "mutations", "forEach", "mutation", "addedNodes", "length", "disconnect", "observe", "body", "childList", "subtree", "WelcomeTour", "steps", "initialSteps", "running", "runningProp", "onRunningChanged", "manager", "usePluginManager", "layout", "useLayout", "setRunning", "useState", "stepIndex", "_setStepIndex", "setSteps", "paused", "dialogOpen", "setStepIndex", "index", "before", "capabilities", "setRunningChanged", "state", "useAsyncEffect", "callback", "options", "type", "action", "size", "EVENTS", "STEP_BEFORE", "TOUR_END", "STEP_AFTER", "ACTIONS", "NEXT", "PREV", "CLOSE", "React", "HelpContext", "Provider", "value", "setIndex", "start", "stop", "style", "Joyride", "continuous", "run", "floaterProps", "tooltipComponent", "Tooltip"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/react-root/react-root.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport React from 'react';\n\nimport { Capability, Common } from '@dxos/app-framework';\nimport { useAtomCapabilityState } from '@dxos/app-framework/react';\n\nimport { WelcomeTour } from '../../components';\nimport { meta } from '../../meta';\nimport { HelpCapabilities, type Step } from '../../types';\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* (steps?: Step[]) {\n return Capability.contributes(Common.Capability.ReactRoot, {\n id: meta.id,\n root: () => {\n const [state, updateState] = useAtomCapabilityState(HelpCapabilities.State);\n return (\n <WelcomeTour\n steps={steps ?? []}\n running={state.running}\n onRunningChanged={(newState) => {\n updateState((s) => ({ ...s, running: newState }));\n if (!newState) {\n updateState((s) => ({ ...s, showHints: false }));\n }\n }}\n />\n );\n },\n });\n }),\n);\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;AAIA,YAAYA,YAAY;AACxB,OAAOC,WAAW;AAElB,SAASC,YAAYC,cAAc;AACnC,SAASC,8BAA8B;AAMvC,IAAA,qBAAeC,WAAWC,WACjBC,kBAAW,WAAWC,OAAc;AACzC,SAAOH,WAAWI,YAAYC,OAAOL,WAAWM,WAAW;IACzDC,IAAIC,KAAKD;IACTE,MAAM,MAAA;AACJ,YAAM,CAACC,OAAOC,WAAAA,IAAeC,uBAAuBC,iBAAiBC,KAAK;AAC1E,aACE,sBAAA,cAACC,aAAAA;QACCZ,OAAOA,SAAS,CAAA;QAChBa,SAASN,MAAMM;QACfC,kBAAkB,CAACC,aAAAA;AACjBP,sBAAY,CAACQ,OAAO;YAAE,GAAGA;YAAGH,SAASE;UAAS,EAAA;AAC9C,cAAI,CAACA,UAAU;AACbP,wBAAY,CAACQ,OAAO;cAAE,GAAGA;cAAGC,WAAW;YAAM,EAAA;UAC/C;QACF;;IAGN;EACF,CAAA;AACF,CAAA,CAAA;",
|
|
6
|
-
"names": ["Effect", "React", "Capability", "Common", "useAtomCapabilityState", "Capability", "makeModule", "fnUntraced", "steps", "contributes", "Common", "ReactRoot", "id", "meta", "root", "state", "updateState", "useAtomCapabilityState", "HelpCapabilities", "State", "WelcomeTour", "running", "onRunningChanged", "newState", "s", "showHints"]
|
|
7
|
-
}
|