@dxos/plugin-help 0.8.4-main.c1de068 → 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-5RXPFQPI.mjs +79 -0
- package/dist/lib/browser/app-graph-builder-5RXPFQPI.mjs.map +7 -0
- package/dist/lib/browser/chunk-HMLZFBYY.mjs +58 -0
- package/dist/lib/browser/chunk-HMLZFBYY.mjs.map +7 -0
- package/dist/lib/browser/chunk-P34WCEMS.mjs +11 -0
- package/dist/lib/browser/chunk-P34WCEMS.mjs.map +7 -0
- package/dist/lib/browser/chunk-TEXIV2IJ.mjs +16 -0
- package/dist/lib/browser/chunk-TEXIV2IJ.mjs.map +7 -0
- package/dist/lib/browser/chunk-VGW5FGD7.mjs +335 -0
- package/dist/lib/browser/chunk-VGW5FGD7.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +62 -60
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/meta.mjs +1 -3
- package/dist/lib/browser/react-root-JBHEZA5U.mjs +43 -0
- 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-SEPP77HO.mjs +27 -0
- package/dist/lib/browser/state-SEPP77HO.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +8 -6
- package/dist/types/src/HelpPlugin.d.ts +2 -1
- package/dist/types/src/HelpPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +5 -8
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +2 -0
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +5 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-root/index.d.ts +6 -0
- package/dist/types/src/capabilities/react-root/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-root/react-root.d.ts +10 -0
- package/dist/types/src/capabilities/react-root/react-root.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/state/index.d.ts +11 -0
- package/dist/types/src/capabilities/state/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/state/state.d.ts +13 -0
- package/dist/types/src/capabilities/state/state.d.ts.map +1 -0
- package/dist/types/src/components/Shortcuts/ShortcutsHints.d.ts.map +1 -1
- package/dist/types/src/components/Shortcuts/ShortcutsList.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.map +1 -1
- package/dist/types/src/components/WelcomeTour/WelcomeTour.d.ts.map +1 -1
- package/dist/types/src/components/WelcomeTour/WelcomeTour.stories.d.ts +9 -4
- 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/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 +2 -1
- 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/types/capabilities.d.ts +21 -0
- package/dist/types/src/types/capabilities.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +1 -0
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +17 -13
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +43 -34
- package/src/HelpPlugin.tsx +20 -47
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +61 -0
- package/src/capabilities/app-graph-builder/index.ts +7 -0
- package/src/capabilities/index.ts +5 -8
- package/src/capabilities/operation-resolver/index.ts +5 -0
- package/src/capabilities/operation-resolver/operation-resolver.ts +23 -0
- package/src/capabilities/react-root/index.ts +7 -0
- package/src/capabilities/react-root/react-root.tsx +36 -0
- package/src/capabilities/react-surface/index.ts +7 -0
- package/src/capabilities/react-surface/react-surface.tsx +36 -0
- package/src/capabilities/state/index.ts +7 -0
- package/src/capabilities/state/state.ts +27 -0
- package/src/components/Shortcuts/ShortcutsHints.tsx +13 -5
- package/src/components/Shortcuts/ShortcutsList.tsx +6 -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 +5 -6
- package/src/components/WelcomeTour/WelcomeTour.stories.tsx +15 -9
- package/src/components/WelcomeTour/WelcomeTour.tsx +17 -19
- package/src/constants.ts +7 -0
- package/src/containers/ShortcutsDialogContent/ShortcutsDialogContent.tsx +29 -0
- 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 +2 -1
- package/src/meta.ts +8 -6
- package/src/types/capabilities.ts +24 -0
- package/src/types/index.ts +1 -0
- package/src/types/schema.ts +12 -8
- package/dist/lib/browser/app-graph-builder-BYCMEBNG.mjs +0 -79
- package/dist/lib/browser/app-graph-builder-BYCMEBNG.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-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/chunk-MNETJXKS.mjs +0 -409
- package/dist/lib/browser/chunk-MNETJXKS.mjs.map +0 -7
- package/dist/lib/browser/react-root-W6ZDEGBU.mjs +0 -34
- package/dist/lib/browser/react-root-W6ZDEGBU.mjs.map +0 -7
- package/dist/lib/browser/react-surface-SATVEWS5.mjs +0 -36
- package/dist/lib/browser/react-surface-SATVEWS5.mjs.map +0 -7
- package/dist/lib/browser/state-FWUZG6NL.mjs +0 -29
- package/dist/lib/browser/state-FWUZG6NL.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
- 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/capabilities/react-root.d.ts +0 -8
- package/dist/types/src/capabilities/react-root.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface.d.ts +0 -4
- package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/state.d.ts +0 -4
- package/dist/types/src/capabilities/state.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/app-graph-builder.ts +0 -76
- package/src/capabilities/capabilities.ts +0 -13
- package/src/capabilities/react-root.tsx +0 -32
- package/src/capabilities/react-surface.tsx +0 -30
- package/src/capabilities/state.ts +0 -23
- package/src/components/Shortcuts/ShortcutsDialog.tsx +0 -34
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/state.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;;AAGlD,wBAYE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ShortcutsDialog.d.ts","sourceRoot":"","sources":["../../../../../src/components/Shortcuts/ShortcutsDialog.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,eAAO,MAAM,gBAAgB,yCAAmC,CAAC;AAEjE,eAAO,MAAM,sBAAsB,yBAoBlC,CAAC"}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { Rx } from '@effect-rx/rx-react';
|
|
6
|
-
import { Option, pipe } from 'effect';
|
|
7
|
-
|
|
8
|
-
import { Capabilities, contributes, createIntent, LayoutAction, type PluginContext } from '@dxos/app-framework';
|
|
9
|
-
import { createExtension } from '@dxos/app-graph';
|
|
10
|
-
|
|
11
|
-
import { HelpCapabilities } from './capabilities';
|
|
12
|
-
import { SHORTCUTS_DIALOG } from '../components';
|
|
13
|
-
import { HELP_PLUGIN } from '../meta';
|
|
14
|
-
import { HelpAction } from '../types';
|
|
15
|
-
|
|
16
|
-
export default (context: PluginContext) =>
|
|
17
|
-
contributes(
|
|
18
|
-
Capabilities.AppGraphBuilder,
|
|
19
|
-
createExtension({
|
|
20
|
-
id: HELP_PLUGIN,
|
|
21
|
-
actions: (node) =>
|
|
22
|
-
Rx.make((get) =>
|
|
23
|
-
pipe(
|
|
24
|
-
get(node),
|
|
25
|
-
Option.flatMap((node) => (node.id === 'root' ? Option.some(node) : Option.none())),
|
|
26
|
-
Option.map(() => [
|
|
27
|
-
{
|
|
28
|
-
id: HelpAction.Start._tag,
|
|
29
|
-
data: async () => {
|
|
30
|
-
const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
31
|
-
const state = context.getCapability(HelpCapabilities.MutableState);
|
|
32
|
-
state.showHints = true;
|
|
33
|
-
await dispatch(createIntent(HelpAction.Start));
|
|
34
|
-
},
|
|
35
|
-
properties: {
|
|
36
|
-
label: ['open help tour', { ns: HELP_PLUGIN }],
|
|
37
|
-
icon: 'ph--info--regular',
|
|
38
|
-
keyBinding: {
|
|
39
|
-
macos: 'shift+meta+/',
|
|
40
|
-
// TODO(wittjosiah): Test on windows to see if it behaves the same as linux.
|
|
41
|
-
windows: 'shift+ctrl+/',
|
|
42
|
-
linux: 'shift+ctrl+?',
|
|
43
|
-
},
|
|
44
|
-
testId: 'helpPlugin.openHelp',
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
id: 'dxos.org/plugin/help/open-shortcuts',
|
|
49
|
-
data: async () => {
|
|
50
|
-
const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
51
|
-
const state = context.getCapability(HelpCapabilities.MutableState);
|
|
52
|
-
state.showHints = true;
|
|
53
|
-
await dispatch(
|
|
54
|
-
createIntent(LayoutAction.UpdateDialog, {
|
|
55
|
-
part: 'dialog',
|
|
56
|
-
subject: SHORTCUTS_DIALOG,
|
|
57
|
-
options: {
|
|
58
|
-
blockAlign: 'center',
|
|
59
|
-
},
|
|
60
|
-
}),
|
|
61
|
-
);
|
|
62
|
-
},
|
|
63
|
-
properties: {
|
|
64
|
-
label: ['open shortcuts label', { ns: HELP_PLUGIN }],
|
|
65
|
-
icon: 'ph--keyboard--regular',
|
|
66
|
-
keyBinding: {
|
|
67
|
-
macos: 'meta+ctrl+/',
|
|
68
|
-
},
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
]),
|
|
72
|
-
Option.getOrElse(() => []),
|
|
73
|
-
),
|
|
74
|
-
),
|
|
75
|
-
}),
|
|
76
|
-
);
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { defineCapability } from '@dxos/app-framework';
|
|
6
|
-
|
|
7
|
-
import { HELP_PLUGIN } from '../meta';
|
|
8
|
-
|
|
9
|
-
export namespace HelpCapabilities {
|
|
10
|
-
export type State = { running: boolean; showHints: boolean; showWelcome: boolean };
|
|
11
|
-
export const State = defineCapability<Readonly<State>>(`${HELP_PLUGIN}/capability/state`);
|
|
12
|
-
export const MutableState = defineCapability<State>(`${HELP_PLUGIN}/capability/state`);
|
|
13
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import React from 'react';
|
|
6
|
-
|
|
7
|
-
import { Capabilities, contributes, useCapability } from '@dxos/app-framework';
|
|
8
|
-
|
|
9
|
-
import { HelpCapabilities } from './capabilities';
|
|
10
|
-
import { WelcomeTour } from '../components';
|
|
11
|
-
import { HELP_PLUGIN } from '../meta';
|
|
12
|
-
import { type Step } from '../types';
|
|
13
|
-
|
|
14
|
-
export default (steps: Step[]) =>
|
|
15
|
-
contributes(Capabilities.ReactRoot, {
|
|
16
|
-
id: HELP_PLUGIN,
|
|
17
|
-
root: () => {
|
|
18
|
-
const state = useCapability(HelpCapabilities.MutableState);
|
|
19
|
-
return (
|
|
20
|
-
<WelcomeTour
|
|
21
|
-
steps={steps}
|
|
22
|
-
running={state.running}
|
|
23
|
-
onRunningChanged={(newState) => {
|
|
24
|
-
state.running = newState;
|
|
25
|
-
if (!newState) {
|
|
26
|
-
state.showHints = false;
|
|
27
|
-
}
|
|
28
|
-
}}
|
|
29
|
-
/>
|
|
30
|
-
);
|
|
31
|
-
},
|
|
32
|
-
});
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import React from 'react';
|
|
6
|
-
|
|
7
|
-
import { Capabilities, contributes, createSurface } from '@dxos/app-framework';
|
|
8
|
-
|
|
9
|
-
import { SHORTCUTS_DIALOG, ShortcutsDialogContent, ShortcutsHints, ShortcutsList } from '../components';
|
|
10
|
-
import { HELP_PLUGIN } from '../meta';
|
|
11
|
-
|
|
12
|
-
export default () =>
|
|
13
|
-
contributes(Capabilities.ReactSurface, [
|
|
14
|
-
createSurface({
|
|
15
|
-
id: `${HELP_PLUGIN}/hints`,
|
|
16
|
-
role: 'hints',
|
|
17
|
-
component: () => <ShortcutsHints />,
|
|
18
|
-
}),
|
|
19
|
-
createSurface({
|
|
20
|
-
id: `${HELP_PLUGIN}/keyshortcuts`,
|
|
21
|
-
role: 'keyshortcuts',
|
|
22
|
-
component: () => <ShortcutsList />,
|
|
23
|
-
}),
|
|
24
|
-
createSurface({
|
|
25
|
-
id: SHORTCUTS_DIALOG,
|
|
26
|
-
role: 'dialog',
|
|
27
|
-
filter: (data): data is any => data.component === SHORTCUTS_DIALOG,
|
|
28
|
-
component: () => <ShortcutsDialogContent />,
|
|
29
|
-
}),
|
|
30
|
-
]);
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { contributes } from '@dxos/app-framework';
|
|
6
|
-
import { LocalStorageStore } from '@dxos/local-storage';
|
|
7
|
-
|
|
8
|
-
import { HelpCapabilities } from './capabilities';
|
|
9
|
-
import { HELP_PLUGIN } from '../meta';
|
|
10
|
-
|
|
11
|
-
export default () => {
|
|
12
|
-
const state = new LocalStorageStore<HelpCapabilities.State>(HELP_PLUGIN, {
|
|
13
|
-
running: false,
|
|
14
|
-
showHints: true,
|
|
15
|
-
showWelcome: true,
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
state
|
|
19
|
-
.prop({ key: 'showHints', type: LocalStorageStore.bool() })
|
|
20
|
-
.prop({ key: 'showWelcome', type: LocalStorageStore.bool() });
|
|
21
|
-
|
|
22
|
-
return contributes(HelpCapabilities.State, state.values);
|
|
23
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2023 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import React from 'react';
|
|
6
|
-
|
|
7
|
-
import { Button, Dialog, Icon, useTranslation } from '@dxos/react-ui';
|
|
8
|
-
|
|
9
|
-
import { ShortcutsList } from './ShortcutsList';
|
|
10
|
-
import { HELP_PLUGIN } from '../../meta';
|
|
11
|
-
|
|
12
|
-
export const SHORTCUTS_DIALOG = `${HELP_PLUGIN}/ShortcutsDialog`;
|
|
13
|
-
|
|
14
|
-
export const ShortcutsDialogContent = () => {
|
|
15
|
-
const { t } = useTranslation(HELP_PLUGIN);
|
|
16
|
-
|
|
17
|
-
return (
|
|
18
|
-
<Dialog.Content classNames='p-0 bs-content max-bs-full md:max-is-[25rem] overflow-hidden'>
|
|
19
|
-
<div role='none' className='flex justify-between mbe-1 pbs-3 pis-2 pie-3 @md:pbs-4 @md:pis-4 @md:pie-5'>
|
|
20
|
-
<Dialog.Title>{t('shortcuts dialog title')}</Dialog.Title>
|
|
21
|
-
|
|
22
|
-
<Dialog.Close asChild>
|
|
23
|
-
<Button density='fine' variant='ghost' autoFocus>
|
|
24
|
-
<Icon icon='ph--x--bold' size={3} />
|
|
25
|
-
</Button>
|
|
26
|
-
</Dialog.Close>
|
|
27
|
-
</div>
|
|
28
|
-
|
|
29
|
-
<div className='flex items-center justify-center'>
|
|
30
|
-
<ShortcutsList />
|
|
31
|
-
</div>
|
|
32
|
-
</Dialog.Content>
|
|
33
|
-
);
|
|
34
|
-
};
|