@dxos/plugin-help 0.8.4-main.dedc0f3 → 0.8.4-main.e8ec1fe
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-F62C67SH.mjs → app-graph-builder-L6GUMAIH.mjs} +16 -15
- package/dist/lib/browser/app-graph-builder-L6GUMAIH.mjs.map +7 -0
- package/dist/lib/browser/chunk-AZJJLAG7.mjs +16 -0
- package/dist/lib/browser/chunk-AZJJLAG7.mjs.map +7 -0
- package/dist/lib/browser/chunk-BCYK4LXW.mjs +16 -0
- package/dist/lib/browser/chunk-BCYK4LXW.mjs.map +7 -0
- package/dist/lib/browser/{chunk-J2SJSGSX.mjs → chunk-I7FKM6VC.mjs} +3 -3
- package/dist/lib/browser/chunk-I7FKM6VC.mjs.map +7 -0
- package/dist/lib/browser/{chunk-4CVVSQQC.mjs → chunk-W4AUSEGO.mjs} +30 -29
- package/dist/lib/browser/chunk-W4AUSEGO.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +9 -11
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/meta.mjs +1 -3
- package/dist/lib/browser/{react-root-2LE42L5M.mjs → react-root-QJH33RNI.mjs} +11 -10
- package/dist/lib/browser/react-root-QJH33RNI.mjs.map +7 -0
- package/dist/lib/browser/{react-surface-XKJRPX3R.mjs → react-surface-OTMERRAV.mjs} +9 -9
- package/dist/lib/browser/react-surface-OTMERRAV.mjs.map +7 -0
- package/dist/lib/browser/{state-IXBTB3WH.mjs → state-5PVJCYWJ.mjs} +7 -7
- package/dist/lib/browser/state-5PVJCYWJ.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +2 -2
- package/dist/types/src/HelpPlugin.d.ts +1 -1
- package/dist/types/src/HelpPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-root.d.ts.map +1 -1
- 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/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/types/src/components/WelcomeTour/WelcomeTour.stories.d.ts +0 -1
- package/dist/types/src/components/WelcomeTour/WelcomeTour.stories.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +0 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +1 -1
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +31 -30
- package/src/HelpPlugin.tsx +43 -45
- package/src/capabilities/app-graph-builder.ts +10 -9
- package/src/capabilities/capabilities.ts +3 -3
- package/src/capabilities/react-root.tsx +4 -3
- package/src/capabilities/react-surface.tsx +3 -3
- package/src/capabilities/state.ts +2 -2
- package/src/components/Shortcuts/ShortcutsDialog.tsx +5 -8
- package/src/components/Shortcuts/ShortcutsHints.tsx +12 -5
- package/src/components/Shortcuts/ShortcutsList.tsx +2 -2
- package/src/components/Tooltip/Tooltip.tsx +0 -1
- package/src/components/WelcomeTour/WelcomeTour.stories.tsx +9 -8
- package/src/components/WelcomeTour/WelcomeTour.tsx +1 -1
- package/src/meta.ts +6 -4
- package/src/types/schema.ts +1 -1
- package/dist/lib/browser/app-graph-builder-F62C67SH.mjs.map +0 -7
- package/dist/lib/browser/chunk-3Y4CMOZP.mjs +0 -13
- package/dist/lib/browser/chunk-3Y4CMOZP.mjs.map +0 -7
- package/dist/lib/browser/chunk-4CVVSQQC.mjs.map +0 -7
- 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/react-root-2LE42L5M.mjs.map +0 -7
- package/dist/lib/browser/react-surface-XKJRPX3R.mjs.map +0 -7
- package/dist/lib/browser/state-IXBTB3WH.mjs.map +0 -7
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SHORTCUTS_DIALOG
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-W4AUSEGO.mjs";
|
|
4
4
|
import {
|
|
5
5
|
HelpAction
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-I7FKM6VC.mjs";
|
|
7
7
|
import {
|
|
8
8
|
HelpCapabilities
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-AZJJLAG7.mjs";
|
|
10
10
|
import {
|
|
11
|
-
|
|
12
|
-
} from "./chunk-
|
|
11
|
+
meta
|
|
12
|
+
} from "./chunk-BCYK4LXW.mjs";
|
|
13
13
|
|
|
14
14
|
// src/capabilities/app-graph-builder.ts
|
|
15
|
-
import {
|
|
16
|
-
import
|
|
15
|
+
import { Atom } from "@effect-atom/atom-react";
|
|
16
|
+
import * as Function from "effect/Function";
|
|
17
|
+
import * as Option from "effect/Option";
|
|
17
18
|
import { Capabilities, LayoutAction, contributes, createIntent } from "@dxos/app-framework";
|
|
18
19
|
import { createExtension } from "@dxos/app-graph";
|
|
19
|
-
var app_graph_builder_default = (context) => contributes(Capabilities.AppGraphBuilder, createExtension({
|
|
20
|
-
id:
|
|
21
|
-
actions: (node) =>
|
|
20
|
+
var app_graph_builder_default = ((context) => contributes(Capabilities.AppGraphBuilder, createExtension({
|
|
21
|
+
id: meta.id,
|
|
22
|
+
actions: (node) => Atom.make((get) => Function.pipe(get(node), Option.flatMap((node2) => node2.id === "root" ? Option.some(node2) : Option.none()), Option.map(() => [
|
|
22
23
|
{
|
|
23
24
|
id: HelpAction.Start._tag,
|
|
24
25
|
data: async () => {
|
|
@@ -31,7 +32,7 @@ var app_graph_builder_default = (context) => contributes(Capabilities.AppGraphBu
|
|
|
31
32
|
label: [
|
|
32
33
|
"open help tour",
|
|
33
34
|
{
|
|
34
|
-
ns:
|
|
35
|
+
ns: meta.id
|
|
35
36
|
}
|
|
36
37
|
],
|
|
37
38
|
icon: "ph--info--regular",
|
|
@@ -45,7 +46,7 @@ var app_graph_builder_default = (context) => contributes(Capabilities.AppGraphBu
|
|
|
45
46
|
}
|
|
46
47
|
},
|
|
47
48
|
{
|
|
48
|
-
id:
|
|
49
|
+
id: `${meta.id}/open-shortcuts`,
|
|
49
50
|
data: async () => {
|
|
50
51
|
const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
|
|
51
52
|
const state = context.getCapability(HelpCapabilities.MutableState);
|
|
@@ -62,7 +63,7 @@ var app_graph_builder_default = (context) => contributes(Capabilities.AppGraphBu
|
|
|
62
63
|
label: [
|
|
63
64
|
"open shortcuts label",
|
|
64
65
|
{
|
|
65
|
-
ns:
|
|
66
|
+
ns: meta.id
|
|
66
67
|
}
|
|
67
68
|
],
|
|
68
69
|
icon: "ph--keyboard--regular",
|
|
@@ -72,8 +73,8 @@ var app_graph_builder_default = (context) => contributes(Capabilities.AppGraphBu
|
|
|
72
73
|
}
|
|
73
74
|
}
|
|
74
75
|
]), Option.getOrElse(() => [])))
|
|
75
|
-
}));
|
|
76
|
+
})));
|
|
76
77
|
export {
|
|
77
78
|
app_graph_builder_default as default
|
|
78
79
|
};
|
|
79
|
-
//# sourceMappingURL=app-graph-builder-
|
|
80
|
+
//# sourceMappingURL=app-graph-builder-L6GUMAIH.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/app-graph-builder.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Atom } from '@effect-atom/atom-react';\nimport * as Function from 'effect/Function';\nimport * as Option from 'effect/Option';\n\nimport { Capabilities, LayoutAction, type PluginContext, contributes, createIntent } from '@dxos/app-framework';\nimport { createExtension } from '@dxos/app-graph';\n\nimport { SHORTCUTS_DIALOG } from '../components';\nimport { meta } from '../meta';\nimport { HelpAction } from '../types';\n\nimport { HelpCapabilities } from './capabilities';\n\nexport default (context: PluginContext) =>\n contributes(\n Capabilities.AppGraphBuilder,\n createExtension({\n id: meta.id,\n actions: (node) =>\n Atom.make((get) =>\n Function.pipe(\n get(node),\n Option.flatMap((node) => (node.id === 'root' ? Option.some(node) : Option.none())),\n Option.map(() => [\n {\n id: HelpAction.Start._tag,\n data: async () => {\n const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);\n const state = context.getCapability(HelpCapabilities.MutableState);\n state.showHints = true;\n await dispatch(createIntent(HelpAction.Start));\n },\n properties: {\n label: ['open help tour', { ns: meta.id }],\n icon: 'ph--info--regular',\n keyBinding: {\n macos: 'shift+meta+/',\n // TODO(wittjosiah): Test on windows to see if it behaves the same as linux.\n windows: 'shift+ctrl+/',\n linux: 'shift+ctrl+?',\n },\n testId: 'helpPlugin.openHelp',\n },\n },\n {\n id: `${meta.id}/open-shortcuts`,\n data: async () => {\n const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);\n const state = context.getCapability(HelpCapabilities.MutableState);\n state.showHints = true;\n await dispatch(\n createIntent(LayoutAction.UpdateDialog, {\n part: 'dialog',\n subject: SHORTCUTS_DIALOG,\n options: {\n blockAlign: 'center',\n },\n }),\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 Option.getOrElse(() => []),\n ),\n ),\n }),\n );\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;AAIA,SAASA,YAAY;AACrB,YAAYC,cAAc;AAC1B,YAAYC,YAAY;AAExB,SAASC,cAAcC,cAAkCC,aAAaC,oBAAoB;AAC1F,SAASC,uBAAuB;AAQhC,IAAA,6BAAe,CAACC,YACdC,YACEC,aAAaC,iBACbC,gBAAgB;EACdC,IAAIC,KAAKD;EACTE,SAAS,CAACC,SACRC,KAAKC,KAAK,CAACC,QACAC,cACPD,IAAIH,IAAAA,GACGK,eAAQ,CAACL,UAAUA,MAAKH,OAAO,SAAgBS,YAAKN,KAAAA,IAAeO,YAAI,CAAA,GACvEC,WAAI,MAAM;IACf;MACEX,IAAIY,WAAWC,MAAMC;MACrBC,MAAM,YAAA;AACJ,cAAM,EAAEC,iBAAiBC,SAAQ,IAAKtB,QAAQuB,cAAcrB,aAAasB,gBAAgB;AACzF,cAAMC,QAAQzB,QAAQuB,cAAcG,iBAAiBC,YAAY;AACjEF,cAAMG,YAAY;AAClB,cAAMN,SAASO,aAAaZ,WAAWC,KAAK,CAAA;MAC9C;MACAY,YAAY;QACVC,OAAO;UAAC;UAAkB;YAAEC,IAAI1B,KAAKD;UAAG;;QACxC4B,MAAM;QACNC,YAAY;UACVC,OAAO;;UAEPC,SAAS;UACTC,OAAO;QACT;QACAC,QAAQ;MACV;IACF;IACA;MACEjC,IAAI,GAAGC,KAAKD,EAAE;MACde,MAAM,YAAA;AACJ,cAAM,EAAEC,iBAAiBC,SAAQ,IAAKtB,QAAQuB,cAAcrB,aAAasB,gBAAgB;AACzF,cAAMC,QAAQzB,QAAQuB,cAAcG,iBAAiBC,YAAY;AACjEF,cAAMG,YAAY;AAClB,cAAMN,SACJO,aAAaU,aAAaC,cAAc;UACtCC,MAAM;UACNC,SAASC;UACTC,SAAS;YACPC,YAAY;UACd;QACF,CAAA,CAAA;MAEJ;MACAf,YAAY;QACVC,OAAO;UAAC;UAAwB;YAAEC,IAAI1B,KAAKD;UAAG;;QAC9C4B,MAAM;QACNC,YAAY;UACVC,OAAO;QACT;MACF;IACF;GACD,GACMW,iBAAU,MAAM,CAAA,CAAE,CAAA,CAAA;AAGjC,CAAA,CAAA;",
|
|
6
|
+
"names": ["Atom", "Function", "Option", "Capabilities", "LayoutAction", "contributes", "createIntent", "createExtension", "context", "contributes", "Capabilities", "AppGraphBuilder", "createExtension", "id", "meta", "actions", "node", "Atom", "make", "get", "pipe", "flatMap", "some", "none", "map", "HelpAction", "Start", "_tag", "data", "dispatchPromise", "dispatch", "getCapability", "IntentDispatcher", "state", "HelpCapabilities", "MutableState", "showHints", "createIntent", "properties", "label", "ns", "icon", "keyBinding", "macos", "windows", "linux", "testId", "LayoutAction", "UpdateDialog", "part", "subject", "SHORTCUTS_DIALOG", "options", "blockAlign", "getOrElse"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
meta
|
|
3
|
+
} from "./chunk-BCYK4LXW.mjs";
|
|
4
|
+
|
|
5
|
+
// src/capabilities/capabilities.ts
|
|
6
|
+
import { defineCapability } from "@dxos/app-framework";
|
|
7
|
+
(function(HelpCapabilities2) {
|
|
8
|
+
HelpCapabilities2.State = defineCapability(`${meta.id}/capability/state`);
|
|
9
|
+
HelpCapabilities2.MutableState = defineCapability(`${meta.id}/capability/state`);
|
|
10
|
+
})(HelpCapabilities || (HelpCapabilities = {}));
|
|
11
|
+
var HelpCapabilities;
|
|
12
|
+
|
|
13
|
+
export {
|
|
14
|
+
HelpCapabilities
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=chunk-AZJJLAG7.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/capabilities.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { defineCapability } from '@dxos/app-framework';\n\nimport { meta } from '../meta';\n\nexport namespace HelpCapabilities {\n export type State = { running: boolean; showHints: boolean; showWelcome: boolean };\n export const State = defineCapability<Readonly<State>>(`${meta.id}/capability/state`);\n export const MutableState = defineCapability<State>(`${meta.id}/capability/state`);\n}\n"],
|
|
5
|
+
"mappings": ";;;;;AAIA,SAASA,wBAAwB;UAIhBC,mBAAAA;oBAEFC,QAAQC,iBAAkC,GAAGC,KAAKC,EAAE,mBAAmB;oBACvEC,eAAeH,iBAAwB,GAAGC,KAAKC,EAAE,mBAAmB;AACnF,GAJiBJ,qBAAAA,mBAAAA,CAAAA,EAAAA;;",
|
|
6
|
+
"names": ["defineCapability", "HelpCapabilities", "State", "defineCapability", "meta", "id", "MutableState"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// src/meta.ts
|
|
2
|
+
import { trim } from "@dxos/util";
|
|
3
|
+
var meta = {
|
|
4
|
+
id: "dxos.org/plugin/help",
|
|
5
|
+
name: "Help",
|
|
6
|
+
description: trim`
|
|
7
|
+
Built-in help system with documentation, tutorials, and contextual assistance.
|
|
8
|
+
Access keyboard shortcuts, feature guides, and support resources.
|
|
9
|
+
`,
|
|
10
|
+
icon: "ph--info--regular"
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export {
|
|
14
|
+
meta
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=chunk-BCYK4LXW.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/meta.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: PluginMeta = {\n id: 'dxos.org/plugin/help',\n name: 'Help',\n description: trim`\n Built-in help system with documentation, tutorials, and contextual assistance.\n Access keyboard shortcuts, feature guides, and support resources.\n `,\n icon: 'ph--info--regular',\n};\n"],
|
|
5
|
+
"mappings": ";AAKA,SAASA,YAAY;AAEd,IAAMC,OAAmB;EAC9BC,IAAI;EACJC,MAAM;EACNC,aAAaC;;;;EAIbC,MAAM;AACR;",
|
|
6
|
+
"names": ["trim", "meta", "id", "name", "description", "trim", "icon"]
|
|
7
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
meta
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BCYK4LXW.mjs";
|
|
4
4
|
|
|
5
5
|
// src/types/schema.ts
|
|
6
|
-
import
|
|
6
|
+
import * as Schema from "effect/Schema";
|
|
7
7
|
import { createContext } from "react";
|
|
8
8
|
var HelpContext = createContext({
|
|
9
9
|
running: false,
|
|
@@ -31,4 +31,4 @@ export {
|
|
|
31
31
|
HelpContext,
|
|
32
32
|
HelpAction
|
|
33
33
|
};
|
|
34
|
-
//# sourceMappingURL=chunk-
|
|
34
|
+
//# sourceMappingURL=chunk-I7FKM6VC.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/types/schema.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\nimport { type Context, createContext } from 'react';\nimport { type Step as BaseStep } from 'react-joyride';\n\nimport { type PluginContext } from '@dxos/app-framework';\n\nimport { meta } from '../meta';\n\nexport type Step = BaseStep & {\n before?: (context: PluginContext) => void;\n};\n\nexport type HelpContextType = {\n running: boolean;\n steps: Step[];\n setSteps: (steps: Step[]) => void;\n setIndex: (index: number) => void;\n start: () => void;\n stop: () => void;\n};\n\nexport const HelpContext: Context<HelpContextType> = createContext<HelpContextType>({\n running: false,\n steps: [],\n setSteps: () => {},\n setIndex: () => {},\n start: () => {},\n stop: () => {},\n});\n\nexport namespace HelpAction {\n export class Start extends Schema.TaggedClass<Start>()(`${meta.id}/action/start`, {\n input: Schema.Void,\n output: Schema.Void,\n }) {}\n}\n"],
|
|
5
|
+
"mappings": ";;;;;AAIA,YAAYA,YAAY;AACxB,SAAuBC,qBAAqB;AAoBrC,IAAMC,cAAwCC,cAA+B;EAClFC,SAAS;EACTC,OAAO,CAAA;EACPC,UAAU,MAAA;EAAO;EACjBC,UAAU,MAAA;EAAO;EACjBC,OAAO,MAAA;EAAO;EACdC,MAAM,MAAA;EAAO;AACf,CAAA;UAEiBC,aAAAA;EACR,MAAMC,cAAqBC,mBAAW,EAAU,GAAGC,KAAKC,EAAE,iBAAiB;IAChFC,OAAcC;IACdC,QAAeD;EACjB,CAAA,EAAA;EAAI;cAHSL,QAAAA;AAIf,GALiBD,eAAAA,aAAAA,CAAAA,EAAAA;;",
|
|
6
|
+
"names": ["Schema", "createContext", "HelpContext", "createContext", "running", "steps", "setSteps", "setIndex", "start", "stop", "HelpAction", "Start", "TaggedClass", "meta", "id", "input", "Void", "output"]
|
|
7
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
HelpContext
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-I7FKM6VC.mjs";
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
} from "./chunk-
|
|
5
|
+
meta
|
|
6
|
+
} from "./chunk-BCYK4LXW.mjs";
|
|
7
7
|
|
|
8
8
|
// src/components/Shortcuts/Key.tsx
|
|
9
9
|
import { useSignals as _useSignals } from "@preact-signals/safe-react/tracking";
|
|
@@ -41,7 +41,7 @@ import { mx as mx2 } from "@dxos/react-ui-theme";
|
|
|
41
41
|
var ShortcutsList = () => {
|
|
42
42
|
var _effect = _useSignals2();
|
|
43
43
|
try {
|
|
44
|
-
const { t } = useTranslation(
|
|
44
|
+
const { t } = useTranslation(meta.id);
|
|
45
45
|
const bindings = Keyboard.singleton.getBindings();
|
|
46
46
|
bindings.sort((a, b) => {
|
|
47
47
|
return toLocalizedString(a.data, t)?.toLowerCase().localeCompare(toLocalizedString(b.data, t)?.toLowerCase());
|
|
@@ -65,12 +65,12 @@ var ShortcutsList = () => {
|
|
|
65
65
|
// src/components/Shortcuts/ShortcutsDialog.tsx
|
|
66
66
|
import { useSignals as _useSignals3 } from "@preact-signals/safe-react/tracking";
|
|
67
67
|
import React3 from "react";
|
|
68
|
-
import {
|
|
69
|
-
var SHORTCUTS_DIALOG = `${
|
|
68
|
+
import { Dialog, IconButton, useTranslation as useTranslation2 } from "@dxos/react-ui";
|
|
69
|
+
var SHORTCUTS_DIALOG = `${meta.id}/ShortcutsDialog`;
|
|
70
70
|
var ShortcutsDialogContent = () => {
|
|
71
71
|
var _effect = _useSignals3();
|
|
72
72
|
try {
|
|
73
|
-
const { t } = useTranslation2(
|
|
73
|
+
const { t } = useTranslation2(meta.id);
|
|
74
74
|
return /* @__PURE__ */ React3.createElement(Dialog.Content, {
|
|
75
75
|
classNames: "p-0 bs-content max-bs-full md:max-is-[25rem] overflow-hidden"
|
|
76
76
|
}, /* @__PURE__ */ React3.createElement("div", {
|
|
@@ -78,14 +78,14 @@ var ShortcutsDialogContent = () => {
|
|
|
78
78
|
className: "flex justify-between mbe-1 pbs-3 pis-2 pie-3 @md:pbs-4 @md:pis-4 @md:pie-5"
|
|
79
79
|
}, /* @__PURE__ */ React3.createElement(Dialog.Title, null, t("shortcuts dialog title")), /* @__PURE__ */ React3.createElement(Dialog.Close, {
|
|
80
80
|
asChild: true
|
|
81
|
-
}, /* @__PURE__ */ React3.createElement(
|
|
82
|
-
|
|
81
|
+
}, /* @__PURE__ */ React3.createElement(IconButton, {
|
|
82
|
+
icon: "ph--x--bold",
|
|
83
|
+
iconOnly: true,
|
|
84
|
+
size: 3,
|
|
85
|
+
label: "Close",
|
|
83
86
|
variant: "ghost",
|
|
84
87
|
autoFocus: true
|
|
85
|
-
}, /* @__PURE__ */ React3.createElement(
|
|
86
|
-
icon: "ph--x--bold",
|
|
87
|
-
size: 3
|
|
88
|
-
})))), /* @__PURE__ */ React3.createElement("div", {
|
|
88
|
+
}))), /* @__PURE__ */ React3.createElement("div", {
|
|
89
89
|
className: "flex items-center justify-center"
|
|
90
90
|
}, /* @__PURE__ */ React3.createElement(ShortcutsList, null)));
|
|
91
91
|
} finally {
|
|
@@ -97,7 +97,7 @@ var ShortcutsDialogContent = () => {
|
|
|
97
97
|
import { useSignals as _useSignals4 } from "@preact-signals/safe-react/tracking";
|
|
98
98
|
import React4 from "react";
|
|
99
99
|
import { Keyboard as Keyboard2 } from "@dxos/keyboard";
|
|
100
|
-
import {
|
|
100
|
+
import { IconButton as IconButton2, toLocalizedString as toLocalizedString2, useTranslation as useTranslation3 } from "@dxos/react-ui";
|
|
101
101
|
var Shortcut = ({ binding }) => {
|
|
102
102
|
var _effect = _useSignals4();
|
|
103
103
|
try {
|
|
@@ -126,18 +126,20 @@ var ShortcutsHints = ({ onClose }) => {
|
|
|
126
126
|
const hints = bindings.filter((binding) => defaults.includes(binding.shortcut));
|
|
127
127
|
return /* @__PURE__ */ React4.createElement("div", {
|
|
128
128
|
role: "none",
|
|
129
|
-
className: "flex overflow-hidden
|
|
129
|
+
className: "flex overflow-hidden pli-2 gap-4"
|
|
130
130
|
}, hints.map((binding) => /* @__PURE__ */ React4.createElement(Shortcut, {
|
|
131
131
|
key: binding.shortcut,
|
|
132
132
|
binding
|
|
133
|
-
})), onClose && /* @__PURE__ */ React4.createElement(
|
|
133
|
+
})), onClose && /* @__PURE__ */ React4.createElement(IconButton2, {
|
|
134
|
+
icon: "ph--x--regular",
|
|
135
|
+
size: 4,
|
|
136
|
+
label: "Close",
|
|
137
|
+
iconOnly: true,
|
|
138
|
+
noTooltip: true,
|
|
134
139
|
variant: "ghost",
|
|
135
140
|
classNames: "p-0 cursor-pointer",
|
|
136
141
|
onClick: onClose
|
|
137
|
-
}
|
|
138
|
-
icon: "ph--x--regular",
|
|
139
|
-
size: 4
|
|
140
|
-
})));
|
|
142
|
+
}));
|
|
141
143
|
} finally {
|
|
142
144
|
_effect.f();
|
|
143
145
|
}
|
|
@@ -162,7 +164,7 @@ var ShortcutsSection = () => {
|
|
|
162
164
|
import { useSignals as _useSignals6 } from "@preact-signals/safe-react/tracking";
|
|
163
165
|
import { useArrowNavigationGroup, useFocusableGroup } from "@fluentui/react-tabster";
|
|
164
166
|
import React6, { forwardRef } from "react";
|
|
165
|
-
import { Button
|
|
167
|
+
import { Button, Icon, IconButton as IconButton3 } from "@dxos/react-ui";
|
|
166
168
|
var floaterProps = {
|
|
167
169
|
styles: {
|
|
168
170
|
// Arrow color is set by joyride.
|
|
@@ -196,7 +198,7 @@ var Tooltip = /* @__PURE__ */ forwardRef(({ step: { title, content }, index, siz
|
|
|
196
198
|
className: "flex p-2"
|
|
197
199
|
}, /* @__PURE__ */ React6.createElement("h2", {
|
|
198
200
|
className: "grow pli-2 plb-1 text-lg font-medium text-accentSurfaceText"
|
|
199
|
-
}, title), /* @__PURE__ */ React6.createElement(
|
|
201
|
+
}, title), /* @__PURE__ */ React6.createElement(IconButton3, {
|
|
200
202
|
density: "fine",
|
|
201
203
|
icon: "ph--x--bold",
|
|
202
204
|
iconOnly: true,
|
|
@@ -210,7 +212,7 @@ var Tooltip = /* @__PURE__ */ forwardRef(({ step: { title, content }, index, siz
|
|
|
210
212
|
}, content), /* @__PURE__ */ React6.createElement("div", {
|
|
211
213
|
className: "flex p-2 items-center justify-between",
|
|
212
214
|
...arrowNavigationAttrs
|
|
213
|
-
}, /* @__PURE__ */ React6.createElement(
|
|
215
|
+
}, /* @__PURE__ */ React6.createElement(IconButton3, {
|
|
214
216
|
classNames: [
|
|
215
217
|
!(index > 0 && backProps) && "invisible"
|
|
216
218
|
],
|
|
@@ -218,7 +220,6 @@ var Tooltip = /* @__PURE__ */ forwardRef(({ step: { title, content }, index, siz
|
|
|
218
220
|
iconOnly: true,
|
|
219
221
|
label: backProps["aria-label"],
|
|
220
222
|
onClick: backProps.onClick,
|
|
221
|
-
size: 5,
|
|
222
223
|
variant: "primary",
|
|
223
224
|
"data-testid": "helpPlugin.tooltip.back"
|
|
224
225
|
}), /* @__PURE__ */ React6.createElement("div", {
|
|
@@ -227,18 +228,18 @@ var Tooltip = /* @__PURE__ */ forwardRef(({ step: { title, content }, index, siz
|
|
|
227
228
|
className: "flex"
|
|
228
229
|
}, Array.from({
|
|
229
230
|
length: size
|
|
230
|
-
}).map((_, i) => /* @__PURE__ */ React6.createElement(
|
|
231
|
+
}).map((_, i) => /* @__PURE__ */ React6.createElement(Icon, {
|
|
231
232
|
key: i,
|
|
232
233
|
icon: index === i ? "ph--circle--fill" : "ph--circle--regular",
|
|
233
234
|
size: 2,
|
|
234
235
|
classNames: "mli-1 cursor-pointer"
|
|
235
|
-
})))), isLastStep ? /* @__PURE__ */ React6.createElement(
|
|
236
|
+
})))), isLastStep ? /* @__PURE__ */ React6.createElement(Button, {
|
|
236
237
|
variant: "primary",
|
|
237
238
|
onClick: closeProps.onClick,
|
|
238
239
|
title: closeProps["aria-label"],
|
|
239
240
|
autoFocus: true,
|
|
240
241
|
"data-testid": "helpPlugin.tooltip.finish"
|
|
241
|
-
}, "Done") : /* @__PURE__ */ React6.createElement(
|
|
242
|
+
}, "Done") : /* @__PURE__ */ React6.createElement(IconButton3, {
|
|
242
243
|
autoFocus: true,
|
|
243
244
|
icon: "ph--caret-right--regular",
|
|
244
245
|
iconOnly: true,
|
|
@@ -257,7 +258,7 @@ var Tooltip = /* @__PURE__ */ forwardRef(({ step: { title, content }, index, siz
|
|
|
257
258
|
import { useSignals as _useSignals7 } from "@preact-signals/safe-react/tracking";
|
|
258
259
|
import React7, { useState } from "react";
|
|
259
260
|
import Joyride, { ACTIONS, EVENTS } from "react-joyride";
|
|
260
|
-
import { useLayout, usePluginManager } from "@dxos/app-framework";
|
|
261
|
+
import { useLayout, usePluginManager } from "@dxos/app-framework/react";
|
|
261
262
|
import { useAsyncEffect } from "@dxos/react-ui";
|
|
262
263
|
var addStepClass = (target) => {
|
|
263
264
|
const element = typeof target === "string" ? document.querySelector(target) : target;
|
|
@@ -404,4 +405,4 @@ export {
|
|
|
404
405
|
Tooltip,
|
|
405
406
|
WelcomeTour
|
|
406
407
|
};
|
|
407
|
-
//# sourceMappingURL=chunk-
|
|
408
|
+
//# sourceMappingURL=chunk-W4AUSEGO.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
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/react-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/react-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 classNames='p-0 bs-content max-bs-full md:max-is-[25rem] overflow-hidden'>\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';\n\nimport { Key } from './Key';\n\nconst Shortcut = ({ binding }: { binding: KeyBinding }) => {\n const { t } = useTranslation('os');\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/react-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.context);\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,WACE,sBAAA,cAACC,QAAAA;MAAKC,MAAK;MAAOC,WAAU;MAAoBC,cAAYJ;MAASK,IAAIL;OACtEM,WAAWN,OAAAA,EAASO,IAAI,CAACC,GAAGC,MAC3B,sBAAA,cAACR,QAAAA;MAAKS,KAAKD;MAAGN,WAAWQ;OACtBH,CAAAA,CAAAA,CAAAA;;;;AAKX;;;;AEhBA,OAAOI,UAASC,gBAAgB;AAEhC,SAASC,gBAAgB;AACzB,SAASC,mBAAmBC,sBAAsB;AAClD,SAASC,MAAAA,WAAU;AAMZ,IAAMC,gBAAgB,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YAAA;AACb,UAAInB,aAAa;AAGf,cAAMnB,cAAcgB,MAAMW,SAAAA,CAAU;AACpCK,qBAAa,CAAA;AACbP,mBAAW,IAAA;MACb,WAAW,OAAON,gBAAgB,aAAa;AAC7CM,mBAAW,KAAA;MACb;IACF,GAAG;MAACN;KAAY;AAGhB,UAAMoB,WAAgC,OAAOC,YAAAA;AAC3C,YAAM,EAAEC,MAAMC,QAAQT,OAAOU,KAAI,IAAKH;AACtC,cAAQC,MAAAA;QACN,KAAKG,OAAOC;AACVxD,uBAAamD,QAAQzC,KAAKT,MAAM;AAChC;QACF,KAAKsD,OAAOE;AACV;QACF,KAAKF,OAAOG;AACVnD,4BAAkB4C,QAAQzC,KAAKT,MAAM;AACrC,kBAAQoD,QAAAA;YACN,KAAKM,QAAQC;AACX,kBAAIhB,QAAQU,OAAO,GAAG;AACpBX,6BAAaC,QAAQ,CAAA;cACvB;AACA;YACF,KAAKe,QAAQE;AACX,kBAAIjB,QAAQ,GAAG;AACbD,6BAAaC,QAAQ,CAAA;cACvB;AACA;YACF,KAAKe,QAAQG;AACXf,gCAAkB,KAAA;AAClBJ,2BAAa,CAAA;AACb;UACJ;AACA;MACJ;IACF;AAEA,WACE,gBAAAoB,OAAA,cAACC,YAAYC,UAAQ;MACnBC,OAAO;QACLrC,SAASA,WAAW,CAACY;QACrBd;QACAa;QACA2B,UAAUxB;QACVyB,OAAO,MAAMrB,kBAAkB,IAAA;QAC/BsB,MAAM,MAAMtB,kBAAkB,KAAA;MAChC;OAEA,gBAAAgB,OAAA,cAACO,SAAAA,MACE;;UAEC,GAEJ,gBAAAP,OAAA,cAACQ,SAAAA;MACCC,YAAY;MACZ7C;MACAW;MACAmC,KAAK5C,WAAW,CAACY;MACjBS;MACAwB;MACAC,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", "classNames", "div", "role", "className", "Title", "Close", "asChild", "IconButton", "icon", "iconOnly", "size", "label", "variant", "autoFocus", "ShortcutsList", "React", "Keyboard", "IconButton", "toLocalizedString", "useTranslation", "Shortcut", "binding", "t", "useTranslation", "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", "context", "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
|
+
}
|
|
@@ -8,25 +8,24 @@ import {
|
|
|
8
8
|
Tooltip,
|
|
9
9
|
WelcomeTour,
|
|
10
10
|
floaterProps
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-W4AUSEGO.mjs";
|
|
12
12
|
import {
|
|
13
13
|
HelpAction,
|
|
14
14
|
HelpContext
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-I7FKM6VC.mjs";
|
|
16
16
|
import {
|
|
17
17
|
HelpCapabilities
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-AZJJLAG7.mjs";
|
|
19
19
|
import {
|
|
20
|
-
HELP_PLUGIN,
|
|
21
20
|
meta
|
|
22
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-BCYK4LXW.mjs";
|
|
23
22
|
|
|
24
23
|
// src/capabilities/index.ts
|
|
25
24
|
import { lazy } from "@dxos/app-framework";
|
|
26
|
-
var AppGraphBuilder = lazy(() => import("./app-graph-builder-
|
|
27
|
-
var ReactRoot = lazy(() => import("./react-root-
|
|
28
|
-
var ReactSurface = lazy(() => import("./react-surface-
|
|
29
|
-
var HelpState = lazy(() => import("./state-
|
|
25
|
+
var AppGraphBuilder = lazy(() => import("./app-graph-builder-L6GUMAIH.mjs"));
|
|
26
|
+
var ReactRoot = lazy(() => import("./react-root-QJH33RNI.mjs"));
|
|
27
|
+
var ReactSurface = lazy(() => import("./react-surface-OTMERRAV.mjs"));
|
|
28
|
+
var HelpState = lazy(() => import("./state-5PVJCYWJ.mjs"));
|
|
30
29
|
|
|
31
30
|
// src/HelpPlugin.tsx
|
|
32
31
|
import { Capabilities, Events, contributes, createResolver, defineModule, definePlugin } from "@dxos/app-framework";
|
|
@@ -46,7 +45,7 @@ var translations = [
|
|
|
46
45
|
];
|
|
47
46
|
|
|
48
47
|
// src/HelpPlugin.tsx
|
|
49
|
-
var HelpPlugin = ({ steps = [] }) =>
|
|
48
|
+
var HelpPlugin = definePlugin(meta, ({ steps = [] }) => [
|
|
50
49
|
defineModule({
|
|
51
50
|
id: `${meta.id}/module/state`,
|
|
52
51
|
activatesOn: Events.Startup,
|
|
@@ -92,7 +91,6 @@ var useHelp = () => {
|
|
|
92
91
|
return useContext(HelpContext) ?? raise(new Error("Missing HelpContext"));
|
|
93
92
|
};
|
|
94
93
|
export {
|
|
95
|
-
HELP_PLUGIN,
|
|
96
94
|
HelpAction,
|
|
97
95
|
HelpCapabilities,
|
|
98
96
|
HelpContext,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/capabilities/index.ts", "../../../src/HelpPlugin.tsx", "../../../src/translations.ts", "../../../src/hooks/useHelp.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { lazy } from '@dxos/app-framework';\n\nexport const AppGraphBuilder = lazy(() => import('./app-graph-builder'));\nexport const ReactRoot = lazy(() => import('./react-root'));\nexport const ReactSurface = lazy(() => import('./react-surface'));\nexport const HelpState = lazy(() => import('./state'));\n\nexport * from './capabilities';\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { Capabilities, Events, contributes, createResolver, defineModule, definePlugin } from '@dxos/app-framework';\n\nimport { AppGraphBuilder, HelpState, ReactRoot, ReactSurface } from './capabilities';\nimport {
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["lazy", "AppGraphBuilder", "lazy", "ReactRoot", "ReactSurface", "HelpState", "Capabilities", "Events", "contributes", "createResolver", "defineModule", "definePlugin", "translations", "meta", "id", "HelpPlugin", "
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { lazy } from '@dxos/app-framework';\n\nexport const AppGraphBuilder = lazy(() => import('./app-graph-builder'));\nexport const ReactRoot = lazy(() => import('./react-root'));\nexport const ReactSurface = lazy(() => import('./react-surface'));\nexport const HelpState = lazy(() => import('./state'));\n\nexport * from './capabilities';\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { Capabilities, Events, contributes, createResolver, defineModule, definePlugin } from '@dxos/app-framework';\n\nimport { AppGraphBuilder, HelpCapabilities, HelpState, ReactRoot, ReactSurface } from './capabilities';\nimport { meta } from './meta';\nimport { translations } from './translations';\nimport { HelpAction, type Step } from './types';\n\nexport type HelpPluginOptions = { steps?: Step[] };\n\nexport const HelpPlugin = definePlugin<HelpPluginOptions>(meta, ({ steps = [] }) => [\n defineModule({\n id: `${meta.id}/module/state`,\n activatesOn: Events.Startup,\n activate: HelpState,\n }),\n defineModule({\n id: `${meta.id}/module/translations`,\n activatesOn: Events.SetupTranslations,\n activate: () => contributes(Capabilities.Translations, translations),\n }),\n defineModule({\n id: `${meta.id}/module/react-root`,\n activatesOn: Events.Startup,\n activate: () => ReactRoot(steps),\n }),\n defineModule({\n id: `${meta.id}/module/react-surface`,\n activatesOn: Events.SetupReactSurface,\n activate: ReactSurface,\n }),\n defineModule({\n id: `${meta.id}/module/intent-resolver`,\n activatesOn: Events.SetupIntentResolver,\n activate: (context) =>\n contributes(\n Capabilities.IntentResolver,\n createResolver({\n intent: HelpAction.Start,\n resolve: () => {\n const state = context.getCapability(HelpCapabilities.MutableState);\n state.running = true;\n },\n }),\n ),\n }),\n defineModule({\n id: `${meta.id}/module/app-graph-builder`,\n activatesOn: Events.SetupAppGraph,\n activate: AppGraphBuilder,\n }),\n]);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Resource } from '@dxos/react-ui';\n\nimport { meta } from './meta';\n\nexport const translations = [\n {\n 'en-US': {\n [meta.id]: {\n 'plugin name': 'Help',\n 'open help tour': 'Show welcome tour',\n 'open shortcuts label': 'Show shortcuts',\n 'shortcuts dialog title': 'Shortcuts',\n },\n },\n },\n] as const satisfies Resource[];\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { useContext } from 'react';\n\nimport { raise } from '@dxos/debug';\n\nimport { HelpContext } from '../types';\n\nexport const useHelp = () => {\n return useContext(HelpContext) ?? raise(new Error('Missing HelpContext'));\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAIA,SAASA,YAAY;AAEd,IAAMC,kBAAkBC,KAAK,MAAM,OAAO,kCAAA,CAAA;AAC1C,IAAMC,YAAYD,KAAK,MAAM,OAAO,2BAAA,CAAA;AACpC,IAAME,eAAeF,KAAK,MAAM,OAAO,8BAAA,CAAA;AACvC,IAAMG,YAAYH,KAAK,MAAM,OAAO,sBAAA,CAAA;;;ACL3C,SAASI,cAAcC,QAAQC,aAAaC,gBAAgBC,cAAcC,oBAAoB;;;ACIvF,IAAMC,eAAe;EAC1B;IACE,SAAS;MACP,CAACC,KAAKC,EAAE,GAAG;QACT,eAAe;QACf,kBAAkB;QAClB,wBAAwB;QACxB,0BAA0B;MAC5B;IACF;EACF;;;;ADLK,IAAMC,aAAaC,aAAgCC,MAAM,CAAC,EAAEC,QAAQ,CAAA,EAAE,MAAO;EAClFC,aAAa;IACXC,IAAI,GAAGH,KAAKG,EAAE;IACdC,aAAaC,OAAOC;IACpBC,UAAUC;EACZ,CAAA;EACAN,aAAa;IACXC,IAAI,GAAGH,KAAKG,EAAE;IACdC,aAAaC,OAAOI;IACpBF,UAAU,MAAMG,YAAYC,aAAaC,cAAcC,YAAAA;EACzD,CAAA;EACAX,aAAa;IACXC,IAAI,GAAGH,KAAKG,EAAE;IACdC,aAAaC,OAAOC;IACpBC,UAAU,MAAMO,UAAUb,KAAAA;EAC5B,CAAA;EACAC,aAAa;IACXC,IAAI,GAAGH,KAAKG,EAAE;IACdC,aAAaC,OAAOU;IACpBR,UAAUS;EACZ,CAAA;EACAd,aAAa;IACXC,IAAI,GAAGH,KAAKG,EAAE;IACdC,aAAaC,OAAOY;IACpBV,UAAU,CAACW,YACTR,YACEC,aAAaQ,gBACbC,eAAe;MACbC,QAAQC,WAAWC;MACnBC,SAAS,MAAA;AACP,cAAMC,QAAQP,QAAQQ,cAAcC,iBAAiBC,YAAY;AACjEH,cAAMI,UAAU;MAClB;IACF,CAAA,CAAA;EAEN,CAAA;EACA3B,aAAa;IACXC,IAAI,GAAGH,KAAKG,EAAE;IACdC,aAAaC,OAAOyB;IACpBvB,UAAUwB;EACZ,CAAA;CACD;;;AElDD,SAASC,kBAAkB;AAE3B,SAASC,aAAa;AAIf,IAAMC,UAAU,MAAA;AACrB,SAAOC,WAAWC,WAAAA,KAAgBC,MAAM,IAAIC,MAAM,qBAAA,CAAA;AACpD;",
|
|
6
|
+
"names": ["lazy", "AppGraphBuilder", "lazy", "ReactRoot", "ReactSurface", "HelpState", "Capabilities", "Events", "contributes", "createResolver", "defineModule", "definePlugin", "translations", "meta", "id", "HelpPlugin", "definePlugin", "meta", "steps", "defineModule", "id", "activatesOn", "Events", "Startup", "activate", "HelpState", "SetupTranslations", "contributes", "Capabilities", "Translations", "translations", "ReactRoot", "SetupReactSurface", "ReactSurface", "SetupIntentResolver", "context", "IntentResolver", "createResolver", "intent", "HelpAction", "Start", "resolve", "state", "getCapability", "HelpCapabilities", "MutableState", "running", "SetupAppGraph", "AppGraphBuilder", "useContext", "raise", "useHelp", "useContext", "HelpContext", "raise", "Error"]
|
|
7
7
|
}
|