@dxos/plugin-help 0.8.3 → 0.8.4-main.1068cf700f
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/app-graph-builder-QSESB5XF.mjs +80 -0
- package/dist/lib/browser/app-graph-builder-QSESB5XF.mjs.map +7 -0
- package/dist/lib/browser/chunk-IM2QVQOH.mjs +16 -0
- package/dist/lib/browser/chunk-IM2QVQOH.mjs.map +7 -0
- package/dist/lib/browser/chunk-M5LBB7IY.mjs +361 -0
- package/dist/lib/browser/chunk-M5LBB7IY.mjs.map +7 -0
- package/dist/lib/browser/chunk-TS66J4C6.mjs +58 -0
- package/dist/lib/browser/chunk-TS66J4C6.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +64 -64
- 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-DTKS5AAE.mjs +43 -0
- package/dist/lib/browser/react-root-DTKS5AAE.mjs.map +7 -0
- package/dist/lib/browser/react-surface-2BPMM4KB.mjs +38 -0
- package/dist/lib/browser/react-surface-2BPMM4KB.mjs.map +7 -0
- package/dist/lib/browser/state-VRPLKT3F.mjs +27 -0
- package/dist/lib/browser/state-VRPLKT3F.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +12 -0
- 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/ShortcutsDialog.d.ts +1 -1
- package/dist/types/src/components/Shortcuts/ShortcutsDialog.d.ts.map +1 -1
- 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/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/index.d.ts +1 -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/translations.d.ts +9 -9
- package/dist/types/src/translations.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 +3 -0
- package/dist/types/src/types/index.d.ts.map +1 -0
- package/dist/types/src/types/schema.d.ts +32 -0
- package/dist/types/src/types/schema.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +53 -39
- package/src/HelpPlugin.tsx +21 -48
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +62 -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 +35 -0
- package/src/capabilities/state/index.ts +7 -0
- package/src/capabilities/state/state.ts +27 -0
- package/src/components/Shortcuts/ShortcutsDialog.tsx +7 -9
- package/src/components/Shortcuts/ShortcutsHints.tsx +14 -6
- package/src/components/Shortcuts/ShortcutsList.tsx +4 -3
- package/src/components/Shortcuts/ShortcutsSection.tsx +1 -1
- package/src/components/Shortcuts/styles.ts +1 -1
- package/src/components/Tooltip/Tooltip.tsx +28 -27
- package/src/components/WelcomeTour/WelcomeTour.stories.tsx +24 -19
- package/src/components/WelcomeTour/WelcomeTour.tsx +17 -19
- package/src/index.ts +1 -1
- package/src/meta.ts +8 -6
- package/src/translations.ts +6 -4
- package/src/types/capabilities.ts +24 -0
- package/src/types/index.ts +6 -0
- package/src/{types.ts → types/schema.ts} +13 -10
- package/dist/lib/browser/app-graph-builder-2TXP7S56.mjs +0 -79
- package/dist/lib/browser/app-graph-builder-2TXP7S56.mjs.map +0 -7
- package/dist/lib/browser/chunk-4KTRSNO5.mjs +0 -13
- package/dist/lib/browser/chunk-4KTRSNO5.mjs.map +0 -7
- package/dist/lib/browser/chunk-ACLT6V7I.mjs +0 -16
- package/dist/lib/browser/chunk-ACLT6V7I.mjs.map +0 -7
- package/dist/lib/browser/chunk-BZUIJQPN.mjs +0 -36
- package/dist/lib/browser/chunk-BZUIJQPN.mjs.map +0 -7
- package/dist/lib/browser/chunk-JNDWLTUJ.mjs +0 -408
- package/dist/lib/browser/chunk-JNDWLTUJ.mjs.map +0 -7
- package/dist/lib/browser/react-root-PRXEQ5QF.mjs +0 -34
- package/dist/lib/browser/react-root-PRXEQ5QF.mjs.map +0 -7
- package/dist/lib/browser/react-surface-IDR3XY36.mjs +0 -36
- package/dist/lib/browser/react-surface-IDR3XY36.mjs.map +0 -7
- package/dist/lib/browser/state-UOKD6P5V.mjs +0 -29
- package/dist/lib/browser/state-UOKD6P5V.mjs.map +0 -7
- package/dist/lib/browser/types.mjs +0 -12
- 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/types.d.ts +0 -29
- package/dist/types/src/types.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/dist/lib/browser/{types.mjs.map → types/index.mjs.map} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"react-root.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/react-root.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,UAAU,CAAC;yBAErB,OAAO,IAAI,EAAE;;;;AAA7B,wBAkBK"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/react-surface.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAA8B,MAAM,qBAAqB,CAAC;;AAK/E,wBAkBK"}
|
|
@@ -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,29 +0,0 @@
|
|
|
1
|
-
import { Schema } from 'effect';
|
|
2
|
-
import { type Context } from 'react';
|
|
3
|
-
import { type Step as BaseStep } from 'react-joyride';
|
|
4
|
-
import { type PluginContext } from '@dxos/app-framework';
|
|
5
|
-
export type Step = BaseStep & {
|
|
6
|
-
before?: (context: PluginContext) => void;
|
|
7
|
-
};
|
|
8
|
-
export type HelpContextType = {
|
|
9
|
-
running: boolean;
|
|
10
|
-
steps: Step[];
|
|
11
|
-
setSteps: (steps: Step[]) => void;
|
|
12
|
-
setIndex: (index: number) => void;
|
|
13
|
-
start: () => void;
|
|
14
|
-
stop: () => void;
|
|
15
|
-
};
|
|
16
|
-
export declare const HelpContext: Context<HelpContextType>;
|
|
17
|
-
export declare const HELP_ACTION = "dxos.org/plugin/help/action";
|
|
18
|
-
export declare namespace HelpAction {
|
|
19
|
-
const Start_base: Schema.TaggedClass<Start, "dxos.org/plugin/help/action/start", {
|
|
20
|
-
readonly _tag: Schema.tag<"dxos.org/plugin/help/action/start">;
|
|
21
|
-
} & {
|
|
22
|
-
input: typeof Schema.Void;
|
|
23
|
-
output: typeof Schema.Void;
|
|
24
|
-
}>;
|
|
25
|
-
export class Start extends Start_base {
|
|
26
|
-
}
|
|
27
|
-
export {};
|
|
28
|
-
}
|
|
29
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,KAAK,OAAO,EAAiB,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,KAAK,IAAI,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEtD,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAIzD,MAAM,MAAM,IAAI,GAAG,QAAQ,GAAG;IAC5B,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,IAAI,CAAC;CAC3C,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;IAClC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,IAAI,EAAE,MAAM,IAAI,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,OAAO,CAAC,eAAe,CAO/C,CAAC;AAEH,eAAO,MAAM,WAAW,gCAA0B,CAAC;AACnD,yBAAiB,UAAU,CAAC;;;;;;;IAC1B,MAAM,OAAO,KAAM,SAAQ,UAGzB;KAAG;;CACN"}
|
|
@@ -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
|
-
};
|
|
File without changes
|