@dxos/plugin-help 0.8.4-main.d05673bc65 → 0.8.4-main.dfabb4ec29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/neutral/HelpPlugin.mjs +30 -0
- package/dist/lib/neutral/HelpPlugin.mjs.map +7 -0
- package/dist/lib/neutral/ShortcutsDialogContent-TB5PZWVY.mjs +17 -0
- package/dist/lib/neutral/ShortcutsDialogContent-TB5PZWVY.mjs.map +7 -0
- package/dist/lib/neutral/ShortcutsHints-P4SUBCY7.mjs +8 -0
- package/dist/lib/neutral/ShortcutsList-MZHWIVDH.mjs +8 -0
- package/dist/lib/{browser/app-graph-builder-5RXPFQPI.mjs → neutral/app-graph-builder-BJYIYNMN.mjs} +16 -20
- package/dist/lib/neutral/app-graph-builder-BJYIYNMN.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +17 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/chunk-BI3HKFKB.mjs +63 -0
- package/dist/lib/neutral/chunk-BI3HKFKB.mjs.map +7 -0
- package/dist/lib/neutral/chunk-GZL2J55W.mjs +8 -0
- package/dist/lib/neutral/chunk-GZL2J55W.mjs.map +7 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/{browser/chunk-P34WCEMS.mjs → neutral/chunk-MQQNHGDV.mjs} +2 -5
- package/dist/lib/neutral/chunk-MQQNHGDV.mjs.map +7 -0
- package/dist/lib/{browser/chunk-TEXIV2IJ.mjs → neutral/chunk-NHTI7NEQ.mjs} +5 -2
- package/dist/lib/{browser/chunk-TEXIV2IJ.mjs.map → neutral/chunk-NHTI7NEQ.mjs.map} +3 -3
- package/dist/lib/{browser/chunk-VGW5FGD7.mjs → neutral/chunk-NJCLRR5U.mjs} +10 -14
- package/dist/lib/neutral/chunk-NJCLRR5U.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +20 -0
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +13 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/neutral/hooks/index.mjs +13 -0
- package/dist/lib/neutral/hooks/index.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +24 -0
- package/dist/lib/neutral/index.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/{browser → neutral}/meta.mjs +2 -1
- package/dist/lib/neutral/meta.mjs.map +7 -0
- package/dist/lib/neutral/operation-handler-F2JU4V62.mjs +13 -0
- package/dist/lib/neutral/operation-handler-F2JU4V62.mjs.map +7 -0
- package/dist/lib/neutral/operations/index.mjs +8 -0
- package/dist/lib/neutral/operations/index.mjs.map +7 -0
- package/dist/lib/neutral/plugin.mjs +16 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/{browser/react-root-JBHEZA5U.mjs → neutral/react-root-PYPAXETF.mjs} +6 -11
- package/dist/lib/neutral/react-root-PYPAXETF.mjs.map +7 -0
- package/dist/lib/{browser/react-surface-W5S45O6Y.mjs → neutral/react-surface-SNS4QQMR.mjs} +9 -18
- package/dist/lib/neutral/react-surface-SNS4QQMR.mjs.map +7 -0
- package/dist/lib/neutral/start-XYUDZGXJ.mjs +21 -0
- package/dist/lib/neutral/start-XYUDZGXJ.mjs.map +7 -0
- package/dist/lib/{browser/state-SEPP77HO.mjs → neutral/state-5HQJG3KW.mjs} +5 -8
- package/dist/lib/neutral/state-5HQJG3KW.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +20 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +12 -0
- package/dist/lib/neutral/types/index.mjs.map +7 -0
- package/dist/types/src/HelpPlugin.d.ts +2 -1
- package/dist/types/src/HelpPlugin.d.ts.map +1 -1
- package/dist/types/src/HelpPlugin.test.d.ts +2 -0
- package/dist/types/src/HelpPlugin.test.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +18 -5
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/{react-root/react-root.d.ts → react-root.d.ts} +1 -1
- package/dist/types/src/capabilities/react-root.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/state.d.ts.map +1 -0
- package/dist/types/src/components/Shortcuts/Key.d.ts.map +1 -1
- package/dist/types/src/components/Shortcuts/ShortcutsHints.d.ts.map +1 -1
- package/dist/types/src/components/Tooltip/Tooltip.d.ts +9 -9
- package/dist/types/src/components/WelcomeTour/WelcomeTour.d.ts +1 -1
- package/dist/types/src/components/WelcomeTour/WelcomeTour.d.ts.map +1 -1
- package/dist/types/src/components/WelcomeTour/WelcomeTour.stories.d.ts.map +1 -1
- package/dist/types/src/containers/ShortcutsDialogContent/ShortcutsDialogContent.d.ts.map +1 -1
- package/dist/types/src/containers/ShortcutsDialogContent/ShortcutsDialogContent.stories.d.ts +25 -0
- package/dist/types/src/containers/ShortcutsDialogContent/ShortcutsDialogContent.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ShortcutsDialogContent/index.d.ts +1 -2
- package/dist/types/src/containers/ShortcutsDialogContent/index.d.ts.map +1 -1
- package/dist/types/src/containers/ShortcutsHints/index.d.ts +1 -2
- package/dist/types/src/containers/ShortcutsHints/index.d.ts.map +1 -1
- package/dist/types/src/containers/ShortcutsList/index.d.ts +1 -2
- package/dist/types/src/containers/ShortcutsList/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useHelp.d.ts +1 -1
- package/dist/types/src/hooks/useHelp.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -4
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/index.d.ts +3 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/operations/start.d.ts +5 -0
- package/dist/types/src/operations/start.d.ts.map +1 -0
- package/dist/types/src/plugin.d.ts +5 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +5 -6
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/HelpCapabilities.d.ts +19 -0
- package/dist/types/src/types/HelpCapabilities.d.ts.map +1 -0
- package/dist/types/src/types/HelpOperation.d.ts +4 -0
- package/dist/types/src/types/HelpOperation.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +2 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +1 -17
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +79 -42
- package/src/HelpPlugin.test.ts +30 -0
- package/src/HelpPlugin.tsx +7 -5
- package/src/capabilities/{app-graph-builder/app-graph-builder.ts → app-graph-builder.ts} +14 -13
- package/src/capabilities/index.ts +11 -5
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/{react-root/react-root.tsx → react-root.tsx} +3 -3
- package/src/capabilities/{react-surface/react-surface.tsx → react-surface.tsx} +7 -7
- package/src/capabilities/{state/state.ts → state.ts} +2 -2
- package/src/components/Shortcuts/ShortcutsHints.tsx +2 -2
- package/src/components/Shortcuts/ShortcutsList.tsx +1 -1
- package/src/components/WelcomeTour/WelcomeTour.stories.tsx +8 -8
- package/src/components/WelcomeTour/WelcomeTour.tsx +3 -1
- package/src/constants.ts +1 -1
- package/src/containers/ShortcutsDialogContent/ShortcutsDialogContent.stories.tsx +39 -0
- package/src/containers/ShortcutsDialogContent/ShortcutsDialogContent.tsx +9 -10
- package/src/containers/ShortcutsDialogContent/index.ts +1 -3
- package/src/containers/ShortcutsHints/index.ts +1 -3
- package/src/containers/ShortcutsList/index.ts +1 -3
- package/src/hooks/useHelp.tsx +1 -1
- package/src/index.ts +1 -4
- package/src/meta.ts +1 -0
- package/src/operations/index.ts +7 -0
- package/src/operations/start.ts +20 -0
- package/src/plugin.ts +12 -0
- package/src/translations.ts +5 -5
- package/src/types/HelpCapabilities.ts +24 -0
- package/src/types/HelpOperation.ts +21 -0
- package/src/types/index.ts +2 -1
- package/src/types/schema.ts +1 -15
- package/dist/lib/browser/ShortcutsDialogContent-SFEN5YKG.mjs +0 -36
- package/dist/lib/browser/ShortcutsDialogContent-SFEN5YKG.mjs.map +0 -7
- package/dist/lib/browser/ShortcutsHints-SUH2FE3T.mjs +0 -12
- package/dist/lib/browser/ShortcutsHints-SUH2FE3T.mjs.map +0 -7
- package/dist/lib/browser/ShortcutsList-4YPEJM33.mjs +0 -12
- package/dist/lib/browser/ShortcutsList-4YPEJM33.mjs.map +0 -7
- package/dist/lib/browser/app-graph-builder-5RXPFQPI.mjs.map +0 -7
- package/dist/lib/browser/chunk-HMLZFBYY.mjs +0 -58
- package/dist/lib/browser/chunk-HMLZFBYY.mjs.map +0 -7
- package/dist/lib/browser/chunk-P34WCEMS.mjs.map +0 -7
- package/dist/lib/browser/chunk-VGW5FGD7.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -114
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/react-root-JBHEZA5U.mjs.map +0 -7
- package/dist/lib/browser/react-surface-W5S45O6Y.mjs.map +0 -7
- package/dist/lib/browser/state-SEPP77HO.mjs.map +0 -7
- package/dist/lib/browser/types/index.mjs +0 -12
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +0 -3
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -2
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -5
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-root/index.d.ts +0 -6
- package/dist/types/src/capabilities/react-root/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-root/react-root.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/state/index.d.ts +0 -11
- package/dist/types/src/capabilities/state/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/state/state.d.ts.map +0 -1
- package/dist/types/src/types/capabilities.d.ts +0 -21
- package/dist/types/src/types/capabilities.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder/index.ts +0 -7
- package/src/capabilities/operation-resolver/index.ts +0 -5
- package/src/capabilities/operation-resolver/operation-resolver.ts +0 -23
- package/src/capabilities/react-root/index.ts +0 -7
- package/src/capabilities/react-surface/index.ts +0 -7
- package/src/capabilities/state/index.ts +0 -7
- package/src/types/capabilities.ts +0 -24
- /package/dist/lib/{browser/meta.mjs.map → neutral/ShortcutsHints-P4SUBCY7.mjs.map} +0 -0
- /package/dist/lib/{browser/types/index.mjs.map → neutral/ShortcutsList-MZHWIVDH.mjs.map} +0 -0
- /package/dist/types/src/capabilities/{app-graph-builder/app-graph-builder.d.ts → app-graph-builder.d.ts} +0 -0
- /package/dist/types/src/capabilities/{react-surface/react-surface.d.ts → react-surface.d.ts} +0 -0
- /package/dist/types/src/capabilities/{state/state.d.ts → state.d.ts} +0 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
2
|
+
|
|
3
|
+
// src/HelpPlugin.tsx
|
|
4
|
+
import { ActivationEvents, Plugin } from "@dxos/app-framework";
|
|
5
|
+
import { AppPlugin } from "@dxos/app-toolkit";
|
|
6
|
+
import { AppGraphBuilder, HelpState, OperationHandler, ReactRoot, ReactSurface } from "#capabilities";
|
|
7
|
+
import { meta } from "#meta";
|
|
8
|
+
import { translations } from "#translations";
|
|
9
|
+
var HelpPlugin = Plugin.define(meta).pipe(AppPlugin.addAppGraphModule({
|
|
10
|
+
activate: AppGraphBuilder
|
|
11
|
+
}), AppPlugin.addOperationHandlerModule({
|
|
12
|
+
activate: OperationHandler
|
|
13
|
+
}), AppPlugin.addSurfaceModule({
|
|
14
|
+
activate: ReactSurface
|
|
15
|
+
}), AppPlugin.addTranslationsModule({
|
|
16
|
+
translations
|
|
17
|
+
}), Plugin.addModule({
|
|
18
|
+
activatesOn: ActivationEvents.Startup,
|
|
19
|
+
activate: HelpState
|
|
20
|
+
}), Plugin.addModule(({ steps = [] }) => ({
|
|
21
|
+
id: "react-root",
|
|
22
|
+
activatesOn: ActivationEvents.Startup,
|
|
23
|
+
activate: () => ReactRoot(steps)
|
|
24
|
+
})), Plugin.make);
|
|
25
|
+
var HelpPlugin_default = HelpPlugin;
|
|
26
|
+
export {
|
|
27
|
+
HelpPlugin,
|
|
28
|
+
HelpPlugin_default as default
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=HelpPlugin.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/HelpPlugin.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { ActivationEvents, Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\n\nimport { AppGraphBuilder, HelpState, OperationHandler, ReactRoot, ReactSurface } from '#capabilities';\nimport { meta } from '#meta';\nimport { translations } from '#translations';\nimport { type Step } from '#types';\n\nexport type HelpPluginOptions = { steps?: Step[] };\n\nexport const HelpPlugin = Plugin.define<HelpPluginOptions>(meta).pipe(\n AppPlugin.addAppGraphModule({ activate: AppGraphBuilder }),\n AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.addModule({\n activatesOn: ActivationEvents.Startup,\n activate: HelpState,\n }),\n Plugin.addModule(({ steps = [] }) => ({\n id: 'react-root',\n activatesOn: ActivationEvents.Startup,\n activate: () => ReactRoot(steps),\n })),\n Plugin.make,\n);\n\nexport default HelpPlugin;\n"],
|
|
5
|
+
"mappings": ";;;AAIA,SAASA,kBAAkBC,cAAc;AACzC,SAASC,iBAAiB;AAE1B,SAASC,iBAAiBC,WAAWC,kBAAkBC,WAAWC,oBAAoB;AACtF,SAASC,YAAY;AACrB,SAASC,oBAAoB;AAKtB,IAAMC,aAAaT,OAAOU,OAA0BH,IAAAA,EAAMI,KAC/DV,UAAUW,kBAAkB;EAAEC,UAAUX;AAAgB,CAAA,GACxDD,UAAUa,0BAA0B;EAAED,UAAUT;AAAiB,CAAA,GACjEH,UAAUc,iBAAiB;EAAEF,UAAUP;AAAa,CAAA,GACpDL,UAAUe,sBAAsB;EAAER;AAAa,CAAA,GAC/CR,OAAOiB,UAAU;EACfC,aAAanB,iBAAiBoB;EAC9BN,UAAUV;AACZ,CAAA,GACAH,OAAOiB,UAAU,CAAC,EAAEG,QAAQ,CAAA,EAAE,OAAQ;EACpCC,IAAI;EACJH,aAAanB,iBAAiBoB;EAC9BN,UAAU,MAAMR,UAAUe,KAAAA;AAC5B,EAAA,GACApB,OAAOsB,IAAI;AAGb,IAAA,qBAAeb;",
|
|
6
|
+
"names": ["ActivationEvents", "Plugin", "AppPlugin", "AppGraphBuilder", "HelpState", "OperationHandler", "ReactRoot", "ReactSurface", "meta", "translations", "HelpPlugin", "define", "pipe", "addAppGraphModule", "activate", "addOperationHandlerModule", "addSurfaceModule", "addTranslationsModule", "addModule", "activatesOn", "Startup", "steps", "id", "make"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
2
|
+
|
|
3
|
+
// src/containers/ShortcutsDialogContent/ShortcutsDialogContent.tsx
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { Dialog, useTranslation } from "@dxos/react-ui";
|
|
6
|
+
import { ShortcutsList } from "#components";
|
|
7
|
+
import { meta } from "#meta";
|
|
8
|
+
var ShortcutsDialogContent = () => {
|
|
9
|
+
const { t } = useTranslation(meta.id);
|
|
10
|
+
return /* @__PURE__ */ React.createElement(Dialog.Content, null, /* @__PURE__ */ React.createElement(Dialog.Header, null, /* @__PURE__ */ React.createElement(Dialog.Title, null, t("shortcuts-dialog.title")), /* @__PURE__ */ React.createElement(Dialog.Close, {
|
|
11
|
+
asChild: true
|
|
12
|
+
}, /* @__PURE__ */ React.createElement(Dialog.CloseIconButton, null))), /* @__PURE__ */ React.createElement(Dialog.Body, null, /* @__PURE__ */ React.createElement(ShortcutsList, null)));
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
ShortcutsDialogContent as default
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=ShortcutsDialogContent-TB5PZWVY.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/containers/ShortcutsDialogContent/ShortcutsDialogContent.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Dialog, useTranslation } from '@dxos/react-ui';\n\nimport { ShortcutsList } from '#components';\nimport { meta } from '#meta';\n\nexport const ShortcutsDialogContent = () => {\n const { t } = useTranslation(meta.id);\n\n return (\n <Dialog.Content>\n <Dialog.Header>\n <Dialog.Title>{t('shortcuts-dialog.title')}</Dialog.Title>\n <Dialog.Close asChild>\n <Dialog.CloseIconButton />\n </Dialog.Close>\n </Dialog.Header>\n <Dialog.Body>\n <ShortcutsList />\n </Dialog.Body>\n </Dialog.Content>\n );\n};\n"],
|
|
5
|
+
"mappings": ";;;AAIA,OAAOA,WAAW;AAElB,SAASC,QAAQC,sBAAsB;AAEvC,SAASC,qBAAqB;AAC9B,SAASC,YAAY;AAEd,IAAMC,yBAAyB,MAAA;AACpC,QAAM,EAAEC,EAAC,IAAKJ,eAAeE,KAAKG,EAAE;AAEpC,SACE,sBAAA,cAACN,OAAOO,SAAO,MACb,sBAAA,cAACP,OAAOQ,QAAM,MACZ,sBAAA,cAACR,OAAOS,OAAK,MAAEJ,EAAE,wBAAA,CAAA,GACjB,sBAAA,cAACL,OAAOU,OAAK;IAACC,SAAAA;KACZ,sBAAA,cAACX,OAAOY,iBAAe,IAAA,CAAA,CAAA,GAG3B,sBAAA,cAACZ,OAAOa,MAAI,MACV,sBAAA,cAACX,eAAAA,IAAAA,CAAAA,CAAAA;AAIT;",
|
|
6
|
+
"names": ["React", "Dialog", "useTranslation", "ShortcutsList", "meta", "ShortcutsDialogContent", "t", "id", "Content", "Header", "Title", "Close", "asChild", "CloseIconButton", "Body"]
|
|
7
|
+
}
|
package/dist/lib/{browser/app-graph-builder-5RXPFQPI.mjs → neutral/app-graph-builder-BJYIYNMN.mjs}
RENAMED
|
@@ -1,26 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SHORTCUTS_DIALOG
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import
|
|
5
|
-
HelpCapabilities,
|
|
6
|
-
HelpOperation
|
|
7
|
-
} from "./chunk-HMLZFBYY.mjs";
|
|
8
|
-
import {
|
|
9
|
-
meta
|
|
10
|
-
} from "./chunk-TEXIV2IJ.mjs";
|
|
3
|
+
} from "./chunk-MQQNHGDV.mjs";
|
|
4
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
11
5
|
|
|
12
|
-
// src/capabilities/app-graph-builder
|
|
6
|
+
// src/capabilities/app-graph-builder.ts
|
|
13
7
|
import * as Effect from "effect/Effect";
|
|
14
8
|
import { Capabilities, Capability } from "@dxos/app-framework";
|
|
15
|
-
import { GraphBuilder, NodeMatcher } from "@dxos/app-graph";
|
|
9
|
+
import { GraphBuilder, Node, NodeMatcher } from "@dxos/app-graph";
|
|
16
10
|
import { AppCapabilities, LayoutOperation } from "@dxos/app-toolkit";
|
|
17
|
-
import { Operation } from "@dxos/
|
|
11
|
+
import { Operation } from "@dxos/compute";
|
|
12
|
+
import { meta } from "#meta";
|
|
13
|
+
import { HelpCapabilities, HelpOperation } from "#types";
|
|
18
14
|
var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function* () {
|
|
19
15
|
const extensions = yield* GraphBuilder.createExtension({
|
|
20
|
-
id:
|
|
16
|
+
id: "root",
|
|
21
17
|
match: NodeMatcher.whenRoot,
|
|
22
18
|
actions: () => Effect.succeed([
|
|
23
|
-
{
|
|
19
|
+
Node.makeAction({
|
|
24
20
|
id: HelpOperation.Start.meta.key,
|
|
25
21
|
data: Effect.fnUntraced(function* () {
|
|
26
22
|
yield* Capabilities.updateAtomValue(HelpCapabilities.State, (s) => ({
|
|
@@ -31,7 +27,7 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
|
|
|
31
27
|
}),
|
|
32
28
|
properties: {
|
|
33
29
|
label: [
|
|
34
|
-
"open
|
|
30
|
+
"open-help-tour.message",
|
|
35
31
|
{
|
|
36
32
|
ns: meta.id
|
|
37
33
|
}
|
|
@@ -44,9 +40,9 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
|
|
|
44
40
|
},
|
|
45
41
|
testId: "helpPlugin.openHelp"
|
|
46
42
|
}
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
id:
|
|
43
|
+
}),
|
|
44
|
+
Node.makeAction({
|
|
45
|
+
id: "open-shortcuts",
|
|
50
46
|
data: Effect.fnUntraced(function* () {
|
|
51
47
|
yield* Capabilities.updateAtomValue(HelpCapabilities.State, (s) => ({
|
|
52
48
|
...s,
|
|
@@ -58,7 +54,7 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
|
|
|
58
54
|
}),
|
|
59
55
|
properties: {
|
|
60
56
|
label: [
|
|
61
|
-
"open
|
|
57
|
+
"open-shortcuts.label",
|
|
62
58
|
{
|
|
63
59
|
ns: meta.id
|
|
64
60
|
}
|
|
@@ -68,7 +64,7 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
|
|
|
68
64
|
macos: "meta+ctrl+/"
|
|
69
65
|
}
|
|
70
66
|
}
|
|
71
|
-
}
|
|
67
|
+
})
|
|
72
68
|
])
|
|
73
69
|
});
|
|
74
70
|
return Capability.contributes(AppCapabilities.AppGraphBuilder, extensions);
|
|
@@ -76,4 +72,4 @@ var app_graph_builder_default = Capability.makeModule(Effect.fnUntraced(function
|
|
|
76
72
|
export {
|
|
77
73
|
app_graph_builder_default as default
|
|
78
74
|
};
|
|
79
|
-
//# sourceMappingURL=app-graph-builder-
|
|
75
|
+
//# sourceMappingURL=app-graph-builder-BJYIYNMN.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 * as Effect from 'effect/Effect';\n\nimport { Capabilities, Capability } from '@dxos/app-framework';\nimport { GraphBuilder, Node, NodeMatcher } from '@dxos/app-graph';\nimport { AppCapabilities, LayoutOperation } from '@dxos/app-toolkit';\nimport { Operation } from '@dxos/compute';\n\nimport { meta } from '#meta';\nimport { HelpCapabilities, HelpOperation } from '#types';\n\nimport { SHORTCUTS_DIALOG } from '../constants';\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* () {\n const extensions = yield* GraphBuilder.createExtension({\n id: 'root',\n match: NodeMatcher.whenRoot,\n actions: () =>\n Effect.succeed([\n Node.makeAction({\n id: HelpOperation.Start.meta.key,\n data: Effect.fnUntraced(function* () {\n yield* Capabilities.updateAtomValue(HelpCapabilities.State, (s) => ({ ...s, showHints: true }));\n yield* Operation.invoke(HelpOperation.Start);\n }),\n properties: {\n label: ['open-help-tour.message', { 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 Node.makeAction({\n id: 'open-shortcuts',\n data: Effect.fnUntraced(function* () {\n yield* Capabilities.updateAtomValue(HelpCapabilities.State, (s) => ({ ...s, showHints: true }));\n yield* Operation.invoke(LayoutOperation.UpdateDialog, {\n subject: SHORTCUTS_DIALOG,\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(AppCapabilities.AppGraphBuilder, extensions);\n }),\n);\n"],
|
|
5
|
+
"mappings": ";;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,cAAcC,kBAAkB;AACzC,SAASC,cAAcC,MAAMC,mBAAmB;AAChD,SAASC,iBAAiBC,uBAAuB;AACjD,SAASC,iBAAiB;AAE1B,SAASC,YAAY;AACrB,SAASC,kBAAkBC,qBAAqB;AAIhD,IAAA,4BAAeC,WAAWC,WACjBC,kBAAW,aAAA;AAChB,QAAMC,aAAa,OAAOC,aAAaC,gBAAgB;IACrDC,IAAI;IACJC,OAAOC,YAAYC;IACnBC,SAAS,MACAC,eAAQ;MACbC,KAAKC,WAAW;QACdP,IAAIQ,cAAcC,MAAMC,KAAKC;QAC7BC,MAAahB,kBAAW,aAAA;AACtB,iBAAOiB,aAAaC,gBAAgBC,iBAAiBC,OAAO,CAACC,OAAO;YAAE,GAAGA;YAAGC,WAAW;UAAK,EAAA;AAC5F,iBAAOC,UAAUC,OAAOZ,cAAcC,KAAK;QAC7C,CAAA;QACAY,YAAY;UACVC,OAAO;YAAC;YAA0B;cAAEC,IAAIb,KAAKV;YAAG;;UAChDwB,MAAM;UACNC,YAAY;YACVC,OAAO;YACPC,SAAS;YACTC,OAAO;UACT;UACAC,QAAQ;QACV;MACF,CAAA;MACAvB,KAAKC,WAAW;QACdP,IAAI;QACJY,MAAahB,kBAAW,aAAA;AACtB,iBAAOiB,aAAaC,gBAAgBC,iBAAiBC,OAAO,CAACC,OAAO;YAAE,GAAGA;YAAGC,WAAW;UAAK,EAAA;AAC5F,iBAAOC,UAAUC,OAAOU,gBAAgBC,cAAc;YACpDC,SAASC;UACX,CAAA;QACF,CAAA;QACAZ,YAAY;UACVC,OAAO;YAAC;YAAwB;cAAEC,IAAIb,KAAKV;YAAG;;UAC9CwB,MAAM;UACNC,YAAY;YACVC,OAAO;UACT;QACF;MACF,CAAA;KACD;EACL,CAAA;AAEA,SAAOhC,WAAWwC,YAAYC,gBAAgBC,iBAAiBvC,UAAAA;AACjE,CAAA,CAAA;",
|
|
6
|
+
"names": ["Effect", "Capabilities", "Capability", "GraphBuilder", "Node", "NodeMatcher", "AppCapabilities", "LayoutOperation", "Operation", "meta", "HelpCapabilities", "HelpOperation", "Capability", "makeModule", "fnUntraced", "extensions", "GraphBuilder", "createExtension", "id", "match", "NodeMatcher", "whenRoot", "actions", "succeed", "Node", "makeAction", "HelpOperation", "Start", "meta", "key", "data", "Capabilities", "updateAtomValue", "HelpCapabilities", "State", "s", "showHints", "Operation", "invoke", "properties", "label", "ns", "icon", "keyBinding", "macos", "windows", "linux", "testId", "LayoutOperation", "UpdateDialog", "subject", "SHORTCUTS_DIALOG", "contributes", "AppCapabilities", "AppGraphBuilder"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import "../chunk-J5LGTIGS.mjs";
|
|
2
|
+
|
|
3
|
+
// src/capabilities/index.ts
|
|
4
|
+
import { Capability } from "@dxos/app-framework";
|
|
5
|
+
var AppGraphBuilder = Capability.lazy("AppGraphBuilder", () => import("../app-graph-builder-BJYIYNMN.mjs"));
|
|
6
|
+
var OperationHandler = Capability.lazy("OperationHandler", () => import("../operation-handler-F2JU4V62.mjs"));
|
|
7
|
+
var ReactRoot = Capability.lazy("ReactRoot", () => import("../react-root-PYPAXETF.mjs"));
|
|
8
|
+
var ReactSurface = Capability.lazy("ReactSurface", () => import("../react-surface-SNS4QQMR.mjs"));
|
|
9
|
+
var HelpState = Capability.lazy("HelpState", () => import("../state-5HQJG3KW.mjs"));
|
|
10
|
+
export {
|
|
11
|
+
AppGraphBuilder,
|
|
12
|
+
HelpState,
|
|
13
|
+
OperationHandler,
|
|
14
|
+
ReactRoot,
|
|
15
|
+
ReactSurface
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/capabilities/index.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\nimport { OperationHandlerSet } from '@dxos/compute';\n\nexport const AppGraphBuilder = Capability.lazy('AppGraphBuilder', () => import('./app-graph-builder'));\nexport const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(\n 'OperationHandler',\n () => import('./operation-handler'),\n);\nexport const ReactRoot = Capability.lazy('ReactRoot', () => import('./react-root'));\nexport const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));\nexport const HelpState = Capability.lazy('HelpState', () => import('./state'));\n"],
|
|
5
|
+
"mappings": ";;;AAIA,SAASA,kBAAkB;AAGpB,IAAMC,kBAAkBD,WAAWE,KAAK,mBAAmB,MAAM,OAAO,mCAAA,CAAA;AACxE,IAAMC,mBAAmBH,WAAWE,KACzC,oBACA,MAAM,OAAO,mCAAA,CAAA;AAER,IAAME,YAAYJ,WAAWE,KAAK,aAAa,MAAM,OAAO,4BAAA,CAAA;AAC5D,IAAMG,eAAeL,WAAWE,KAAK,gBAAgB,MAAM,OAAO,+BAAA,CAAA;AAClE,IAAMI,YAAYN,WAAWE,KAAK,aAAa,MAAM,OAAO,uBAAA,CAAA;",
|
|
6
|
+
"names": ["Capability", "AppGraphBuilder", "lazy", "OperationHandler", "ReactRoot", "ReactSurface", "HelpState"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__export
|
|
3
|
+
} from "./chunk-J5LGTIGS.mjs";
|
|
4
|
+
|
|
5
|
+
// src/types/HelpCapabilities.ts
|
|
6
|
+
var HelpCapabilities_exports = {};
|
|
7
|
+
__export(HelpCapabilities_exports, {
|
|
8
|
+
State: () => State,
|
|
9
|
+
StateSchema: () => StateSchema
|
|
10
|
+
});
|
|
11
|
+
import * as Schema from "effect/Schema";
|
|
12
|
+
import { Capability } from "@dxos/app-framework";
|
|
13
|
+
import { meta } from "#meta";
|
|
14
|
+
var StateSchema = Schema.mutable(Schema.Struct({
|
|
15
|
+
running: Schema.Boolean,
|
|
16
|
+
showHints: Schema.Boolean,
|
|
17
|
+
showWelcome: Schema.Boolean
|
|
18
|
+
}));
|
|
19
|
+
var State = Capability.make(`${meta.id}.capability.state`);
|
|
20
|
+
|
|
21
|
+
// src/types/HelpOperation.ts
|
|
22
|
+
var HelpOperation_exports = {};
|
|
23
|
+
__export(HelpOperation_exports, {
|
|
24
|
+
Start: () => Start
|
|
25
|
+
});
|
|
26
|
+
import * as Schema2 from "effect/Schema";
|
|
27
|
+
import { Capability as Capability2 } from "@dxos/app-framework";
|
|
28
|
+
import { Operation } from "@dxos/compute";
|
|
29
|
+
import { meta as meta2 } from "#meta";
|
|
30
|
+
var HELP_OPERATION = `${meta2.id}.operation`;
|
|
31
|
+
var Start = Operation.make({
|
|
32
|
+
meta: {
|
|
33
|
+
key: `${HELP_OPERATION}.start`,
|
|
34
|
+
name: "Start Help"
|
|
35
|
+
},
|
|
36
|
+
services: [
|
|
37
|
+
Capability2.Service
|
|
38
|
+
],
|
|
39
|
+
input: Schema2.Void,
|
|
40
|
+
output: Schema2.Void
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
// src/types/schema.ts
|
|
44
|
+
import { createContext } from "react";
|
|
45
|
+
var HelpContext = createContext({
|
|
46
|
+
running: false,
|
|
47
|
+
steps: [],
|
|
48
|
+
setSteps: () => {
|
|
49
|
+
},
|
|
50
|
+
setIndex: () => {
|
|
51
|
+
},
|
|
52
|
+
start: () => {
|
|
53
|
+
},
|
|
54
|
+
stop: () => {
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
export {
|
|
59
|
+
HelpCapabilities_exports,
|
|
60
|
+
HelpOperation_exports,
|
|
61
|
+
HelpContext
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=chunk-BI3HKFKB.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/types/HelpCapabilities.ts", "../../../src/types/HelpOperation.ts", "../../../src/types/schema.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\n// @import-as-namespace\n\nimport { type Atom } from '@effect-atom/atom-react';\nimport * as Schema from 'effect/Schema';\n\nimport { Capability } from '@dxos/app-framework';\n\nimport { meta } from '#meta';\n\nexport const StateSchema = Schema.mutable(\n Schema.Struct({\n running: Schema.Boolean,\n showHints: Schema.Boolean,\n showWelcome: Schema.Boolean,\n }),\n);\n\nexport type State = Schema.Schema.Type<typeof StateSchema>;\n\nexport const State = Capability.make<Atom.Writable<State>>(`${meta.id}.capability.state`);\n", "//\n// Copyright 2025 DXOS.org\n//\n\n// @import-as-namespace\n\nimport * as Schema from 'effect/Schema';\n\nimport { Capability } from '@dxos/app-framework';\nimport { Operation } from '@dxos/compute';\n\nimport { meta } from '#meta';\n\nconst HELP_OPERATION = `${meta.id}.operation`;\n\nexport const Start = Operation.make({\n meta: { key: `${HELP_OPERATION}.start`, name: 'Start Help' },\n services: [Capability.Service],\n input: Schema.Void,\n output: Schema.Void,\n});\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Context, createContext } from 'react';\nimport { type Step as BaseStep } from 'react-joyride';\n\nimport { type CapabilityManager } from '@dxos/app-framework';\n\nexport type Step = BaseStep & {\n before?: (capabilities: CapabilityManager.CapabilityManager) => 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"],
|
|
5
|
+
"mappings": ";;;;;AAAA;;;;;AAOA,YAAYA,YAAY;AAExB,SAASC,kBAAkB;AAE3B,SAASC,YAAY;AAEd,IAAMC,cAAqBC,eACzBC,cAAO;EACZC,SAAgBC;EAChBC,WAAkBD;EAClBE,aAAoBF;AACtB,CAAA,CAAA;AAKK,IAAMG,QAAQT,WAAWU,KAA2B,GAAGT,KAAKU,EAAE,mBAAmB;;;ACvBxF;;;;AAMA,YAAYC,aAAY;AAExB,SAASC,cAAAA,mBAAkB;AAC3B,SAASC,iBAAiB;AAE1B,SAASC,QAAAA,aAAY;AAErB,IAAMC,iBAAiB,GAAGD,MAAKE,EAAE;AAE1B,IAAMC,QAAQJ,UAAUK,KAAK;EAClCJ,MAAM;IAAEK,KAAK,GAAGJ,cAAAA;IAAwBK,MAAM;EAAa;EAC3DC,UAAU;IAACT,YAAWU;;EACtBC,OAAcC;EACdC,QAAeD;AACjB,CAAA;;;AChBA,SAAuBE,qBAAqB;AAkBrC,IAAMC,cAAwCD,cAA+B;EAClFE,SAAS;EACTC,OAAO,CAAA;EACPC,UAAU,MAAA;EAAO;EACjBC,UAAU,MAAA;EAAO;EACjBC,OAAO,MAAA;EAAO;EACdC,MAAM,MAAA;EAAO;AACf,CAAA;",
|
|
6
|
+
"names": ["Schema", "Capability", "meta", "StateSchema", "mutable", "Struct", "running", "Boolean", "showHints", "showWelcome", "State", "make", "id", "Schema", "Capability", "Operation", "meta", "HELP_OPERATION", "id", "Start", "make", "key", "name", "services", "Service", "input", "Void", "output", "createContext", "HelpContext", "running", "steps", "setSteps", "setIndex", "start", "stop"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// src/operations/index.ts
|
|
2
|
+
import { OperationHandlerSet } from "@dxos/compute";
|
|
3
|
+
var HelpOperationHandlerSet = OperationHandlerSet.lazy(() => import("./start-XYUDZGXJ.mjs"));
|
|
4
|
+
|
|
5
|
+
export {
|
|
6
|
+
HelpOperationHandlerSet
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=chunk-GZL2J55W.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/operations/index.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { OperationHandlerSet } from '@dxos/compute';\n\nexport const HelpOperationHandlerSet = OperationHandlerSet.lazy(() => import('./start'));\n"],
|
|
5
|
+
"mappings": ";AAIA,SAASA,2BAA2B;AAE7B,IAAMC,0BAA0BD,oBAAoBE,KAAK,MAAM,OAAO,sBAAA,CAAA;",
|
|
6
|
+
"names": ["OperationHandlerSet", "HelpOperationHandlerSet", "lazy"]
|
|
7
|
+
}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
meta
|
|
3
|
-
} from "./chunk-TEXIV2IJ.mjs";
|
|
4
|
-
|
|
5
1
|
// src/constants.ts
|
|
2
|
+
import { meta } from "#meta";
|
|
6
3
|
var SHORTCUTS_DIALOG = `${meta.id}.ShortcutsDialog`;
|
|
7
4
|
|
|
8
5
|
export {
|
|
9
6
|
SHORTCUTS_DIALOG
|
|
10
7
|
};
|
|
11
|
-
//# sourceMappingURL=chunk-
|
|
8
|
+
//# sourceMappingURL=chunk-MQQNHGDV.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/constants.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { meta } from '#meta';\n\nexport const SHORTCUTS_DIALOG = `${meta.id}.ShortcutsDialog`;\n"],
|
|
5
|
+
"mappings": ";AAIA,SAASA,YAAY;AAEd,IAAMC,mBAAmB,GAAGD,KAAKE,EAAE;",
|
|
6
|
+
"names": ["meta", "SHORTCUTS_DIALOG", "id"]
|
|
7
|
+
}
|
|
@@ -7,10 +7,13 @@ var meta = {
|
|
|
7
7
|
Built-in help system with documentation, tutorials, and contextual assistance.
|
|
8
8
|
Access keyboard shortcuts, feature guides, and support resources.
|
|
9
9
|
`,
|
|
10
|
-
icon: "ph--info--regular"
|
|
10
|
+
icon: "ph--info--regular",
|
|
11
|
+
tags: [
|
|
12
|
+
"system"
|
|
13
|
+
]
|
|
11
14
|
};
|
|
12
15
|
|
|
13
16
|
export {
|
|
14
17
|
meta
|
|
15
18
|
};
|
|
16
|
-
//# sourceMappingURL=chunk-
|
|
19
|
+
//# sourceMappingURL=chunk-NHTI7NEQ.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/meta.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: Plugin.Meta = {\n id: 'org.dxos.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,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,
|
|
6
|
-
"names": ["trim", "meta", "id", "name", "description", "
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: Plugin.Meta = {\n id: 'org.dxos.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 tags: ['system'],\n};\n"],
|
|
5
|
+
"mappings": ";AAKA,SAASA,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaJ;;;;EAIbK,MAAM;EACNC,MAAM;IAAC;;AACT;",
|
|
6
|
+
"names": ["trim", "meta", "id", "name", "description", "icon", "tags"]
|
|
7
7
|
}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
} from "
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
} from "./chunk-TEXIV2IJ.mjs";
|
|
1
|
+
// src/components/Shortcuts/ShortcutsHints.tsx
|
|
2
|
+
import React2 from "react";
|
|
3
|
+
import { Keyboard } from "@dxos/keyboard";
|
|
4
|
+
import { IconButton, toLocalizedString, useTranslation } from "@dxos/react-ui";
|
|
5
|
+
import { osTranslations } from "@dxos/ui-theme";
|
|
7
6
|
|
|
8
7
|
// src/components/Shortcuts/Key.tsx
|
|
9
8
|
import React from "react";
|
|
@@ -27,14 +26,9 @@ var Key = ({ binding }) => {
|
|
|
27
26
|
};
|
|
28
27
|
|
|
29
28
|
// src/components/Shortcuts/ShortcutsHints.tsx
|
|
30
|
-
import React2 from "react";
|
|
31
|
-
import { Keyboard } from "@dxos/keyboard";
|
|
32
|
-
import { IconButton, toLocalizedString, useTranslation } from "@dxos/react-ui";
|
|
33
|
-
import { osTranslations } from "@dxos/ui-theme";
|
|
34
29
|
var Shortcut = ({ binding }) => {
|
|
35
30
|
const { t } = useTranslation(osTranslations);
|
|
36
31
|
return /* @__PURE__ */ React2.createElement("div", {
|
|
37
|
-
role: "none",
|
|
38
32
|
className: "flex items-center gap-2 whitespace-nowrap"
|
|
39
33
|
}, /* @__PURE__ */ React2.createElement(Key, {
|
|
40
34
|
binding: binding.shortcut
|
|
@@ -51,7 +45,6 @@ var ShortcutsHints = ({ onClose }) => {
|
|
|
51
45
|
const bindings = Keyboard.singleton.getBindings();
|
|
52
46
|
const hints = bindings.filter((binding) => defaults.includes(binding.shortcut));
|
|
53
47
|
return /* @__PURE__ */ React2.createElement("div", {
|
|
54
|
-
role: "none",
|
|
55
48
|
className: "flex overflow-hidden px-2 gap-4"
|
|
56
49
|
}, hints.map((binding) => /* @__PURE__ */ React2.createElement(Shortcut, {
|
|
57
50
|
key: binding.shortcut,
|
|
@@ -73,6 +66,7 @@ import React3, { Fragment } from "react";
|
|
|
73
66
|
import { Keyboard as Keyboard2 } from "@dxos/keyboard";
|
|
74
67
|
import { toLocalizedString as toLocalizedString2, useTranslation as useTranslation2 } from "@dxos/react-ui";
|
|
75
68
|
import { mx as mx2 } from "@dxos/ui-theme";
|
|
69
|
+
import { meta } from "#meta";
|
|
76
70
|
var ShortcutsList = () => {
|
|
77
71
|
const { t } = useTranslation2(meta.id);
|
|
78
72
|
const bindings = Keyboard2.singleton.getBindings();
|
|
@@ -194,6 +188,7 @@ import Joyride, { ACTIONS, EVENTS } from "react-joyride";
|
|
|
194
188
|
import { usePluginManager } from "@dxos/app-framework/ui";
|
|
195
189
|
import { useLayout } from "@dxos/app-toolkit/ui";
|
|
196
190
|
import { useAsyncEffect } from "@dxos/react-ui";
|
|
191
|
+
import { HelpContext } from "#types";
|
|
197
192
|
var addStepClass = (target) => {
|
|
198
193
|
const element = typeof target === "string" ? document.querySelector(target) : target;
|
|
199
194
|
if (element) {
|
|
@@ -319,7 +314,8 @@ var WelcomeTour = ({ steps: initialSteps, running: runningProp, onRunningChanged
|
|
|
319
314
|
run: running && !paused,
|
|
320
315
|
callback,
|
|
321
316
|
floaterProps,
|
|
322
|
-
tooltipComponent: Tooltip
|
|
317
|
+
tooltipComponent: Tooltip,
|
|
318
|
+
spotlightPadding: 0
|
|
323
319
|
}));
|
|
324
320
|
};
|
|
325
321
|
|
|
@@ -332,4 +328,4 @@ export {
|
|
|
332
328
|
Tooltip,
|
|
333
329
|
WelcomeTour
|
|
334
330
|
};
|
|
335
|
-
//# sourceMappingURL=chunk-
|
|
331
|
+
//# sourceMappingURL=chunk-NJCLRR5U.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/Shortcuts/ShortcutsHints.tsx", "../../../src/components/Shortcuts/Key.tsx", "../../../src/components/Shortcuts/styles.ts", "../../../src/components/Shortcuts/ShortcutsList.tsx", "../../../src/components/Shortcuts/ShortcutsSection.tsx", "../../../src/components/Tooltip/Tooltip.tsx", "../../../src/components/WelcomeTour/WelcomeTour.tsx"],
|
|
4
|
+
"sourcesContent": ["//\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 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 className='flex overflow-hidden px-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 { 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-w-[24px] h-[24px] px-0.5 justify-center items-center text-xs',\n 'rounded-sm 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('w-fit grid grid-cols-[min-content_minmax(12rem,1fr)] gap-2 my-4 text-subdued select-none')}>\n {bindings.map((binding, i) => (\n <Fragment key={i}>\n <Key binding={binding.shortcut} />\n <span role='definition' className='ms-4' aria-labelledby={binding.shortcut}>\n {toLocalizedString(binding.data, t)}\n </span>\n </Fragment>\n ))}\n </dl>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\n\nimport { ShortcutsList } from './ShortcutsList';\n\nexport const ShortcutsSection = () => {\n return (\n <section className='text-description'>\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 w-[15rem] min-h-[10rem] overflow-hidden rounded-md shadow-xl bg-accent-surface text-accent-surface-text'\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 px-2 py-1 text-lg font-medium text-accent-surface-text'>{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 px-4 my-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='mx-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 { usePluginManager } from '@dxos/app-framework/ui';\nimport { useLayout } from '@dxos/app-toolkit/ui';\nimport { useAsyncEffect } from '@dxos/react-ui';\n\nimport { HelpContext, type Step } from '#types';\n\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 spotlightPadding={0}\n />\n </HelpContext.Provider>\n );\n};\n"],
|
|
5
|
+
"mappings": ";AAIA,OAAOA,YAAW;AAElB,SAA0BC,gBAAgB;AAC1C,SAASC,YAAYC,mBAAmBC,sBAAsB;AAC9D,SAASC,sBAAsB;;;ACJ/B,OAAOC,WAAW;AAElB,SAASC,kBAAkB;;;ACF3B,SAASC,UAAU;AAEZ,IAAMC,cAAcD,GACzB,gFACA,+CAAA;;;ADEK,IAAME,MAAM,CAAC,EAAEC,QAAO,MAAuB;AAClD,SACE,sBAAA,cAACC,QAAAA;IAAKC,MAAK;IAAOC,WAAU;IAAoBC,cAAYJ;IAASK,IAAIL;KACtEM,WAAWN,OAAAA,EAASO,IAAI,CAACC,GAAGC,MAC3B,sBAAA,cAACR,QAAAA;IAAKS,KAAKD;IAAGN,WAAWQ;KACtBH,CAAAA,CAAAA,CAAAA;AAKX;;;ADRA,IAAMI,WAAW,CAAC,EAAEC,QAAO,MAA2B;AACpD,QAAM,EAAEC,EAAC,IAAKC,eAAeC,cAAAA;AAC7B,SACE,gBAAAC,OAAA,cAACC,OAAAA;IAAIC,WAAU;KACb,gBAAAF,OAAA,cAACG,KAAAA;IAAIP,SAASA,QAAQQ;MACtB,gBAAAJ,OAAA,cAACK,QAAAA;IAAKH,WAAU;KAAWI,kBAAkBV,QAAQW,MAAMV,CAAAA,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AkB,KAAA;IAChC;KAEA,gBAAAgB,OAAA,cAACO,SAAAA,MACE;;UAEC,GAEJ,gBAAAP,OAAA,cAACQ,SAAAA;IACCC,YAAY;IACZ7C;IACAW;IACAmC,KAAK5C,WAAW,CAACY;IACjBS;IACAwB;IACAC,kBAAkBC;IAClBC,kBAAkB;;AAI1B;",
|
|
6
|
+
"names": ["React", "Keyboard", "IconButton", "toLocalizedString", "useTranslation", "osTranslations", "React", "keySymbols", "mx", "shortcutKey", "Key", "binding", "span", "role", "className", "aria-label", "id", "keySymbols", "map", "c", "i", "key", "shortcutKey", "Shortcut", "binding", "t", "useTranslation", "osTranslations", "React", "div", "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", "Fragment", "Keyboard", "toLocalizedString", "useTranslation", "mx", "meta", "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", "ShortcutsSection", "React", "section", "className", "ShortcutsList", "useArrowNavigationGroup", "useFocusableGroup", "React", "forwardRef", "Button", "Icon", "IconButton", "floaterProps", "styles", "arrow", "length", "spread", "floater", "filter", "Tooltip", "step", "title", "content", "index", "size", "isLastStep", "backProps", "closeProps", "primaryProps", "forwardedRef", "arrowNavigationAttrs", "axis", "focusableGroupAttrs", "tabBehavior", "div", "className", "role", "data-testid", "data-step", "ref", "h2", "density", "icon", "iconOnly", "label", "onClick", "variant", "classNames", "Array", "from", "map", "_", "i", "key", "autoFocus", "React", "useState", "Joyride", "ACTIONS", "EVENTS", "usePluginManager", "useLayout", "useAsyncEffect", "HelpContext", "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", "spotlightPadding"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Key,
|
|
3
|
+
ShortcutsHints,
|
|
4
|
+
ShortcutsList,
|
|
5
|
+
ShortcutsSection,
|
|
6
|
+
Tooltip,
|
|
7
|
+
WelcomeTour,
|
|
8
|
+
floaterProps
|
|
9
|
+
} from "../chunk-NJCLRR5U.mjs";
|
|
10
|
+
import "../chunk-J5LGTIGS.mjs";
|
|
11
|
+
export {
|
|
12
|
+
Key,
|
|
13
|
+
ShortcutsHints,
|
|
14
|
+
ShortcutsList,
|
|
15
|
+
ShortcutsSection,
|
|
16
|
+
Tooltip,
|
|
17
|
+
WelcomeTour,
|
|
18
|
+
floaterProps
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "../chunk-J5LGTIGS.mjs";
|
|
2
|
+
|
|
3
|
+
// src/containers/index.ts
|
|
4
|
+
import { lazy } from "react";
|
|
5
|
+
var ShortcutsDialogContent = lazy(() => import("../ShortcutsDialogContent-TB5PZWVY.mjs"));
|
|
6
|
+
var ShortcutsHints = lazy(() => import("../ShortcutsHints-P4SUBCY7.mjs"));
|
|
7
|
+
var ShortcutsList = lazy(() => import("../ShortcutsList-MZHWIVDH.mjs"));
|
|
8
|
+
export {
|
|
9
|
+
ShortcutsDialogContent,
|
|
10
|
+
ShortcutsHints,
|
|
11
|
+
ShortcutsList
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/containers/index.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type ComponentType, lazy } from 'react';\n\nexport const ShortcutsDialogContent: ComponentType<any> = lazy(() => import('./ShortcutsDialogContent'));\nexport const ShortcutsHints: ComponentType<any> = lazy(() => import('./ShortcutsHints'));\nexport const ShortcutsList: ComponentType<any> = lazy(() => import('./ShortcutsList'));\n"],
|
|
5
|
+
"mappings": ";;;AAIA,SAA6BA,YAAY;AAElC,IAAMC,yBAA6CD,KAAK,MAAM,OAAO,wCAAA,CAAA;AACrE,IAAME,iBAAqCF,KAAK,MAAM,OAAO,gCAAA,CAAA;AAC7D,IAAMG,gBAAoCH,KAAK,MAAM,OAAO,+BAAA,CAAA;",
|
|
6
|
+
"names": ["lazy", "ShortcutsDialogContent", "ShortcutsHints", "ShortcutsList"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "../chunk-J5LGTIGS.mjs";
|
|
2
|
+
|
|
3
|
+
// src/hooks/useHelp.tsx
|
|
4
|
+
import { useContext } from "react";
|
|
5
|
+
import { raise } from "@dxos/debug";
|
|
6
|
+
import { HelpContext } from "#types";
|
|
7
|
+
var useHelp = () => {
|
|
8
|
+
return useContext(HelpContext) ?? raise(new Error("Missing HelpContext"));
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
useHelp
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/hooks/useHelp.tsx"],
|
|
4
|
+
"sourcesContent": ["//\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,kBAAkB;AAE3B,SAASC,aAAa;AAEtB,SAASC,mBAAmB;AAErB,IAAMC,UAAU,MAAA;AACrB,SAAOH,WAAWE,WAAAA,KAAgBD,MAAM,IAAIG,MAAM,qBAAA,CAAA;AACpD;",
|
|
6
|
+
"names": ["useContext", "raise", "HelpContext", "useHelp", "Error"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import {
|
|
2
|
+
HelpCapabilities_exports,
|
|
3
|
+
HelpContext,
|
|
4
|
+
HelpOperation_exports
|
|
5
|
+
} from "./chunk-BI3HKFKB.mjs";
|
|
6
|
+
import {
|
|
7
|
+
SHORTCUTS_DIALOG
|
|
8
|
+
} from "./chunk-MQQNHGDV.mjs";
|
|
9
|
+
import {
|
|
10
|
+
meta
|
|
11
|
+
} from "./chunk-NHTI7NEQ.mjs";
|
|
12
|
+
import {
|
|
13
|
+
HelpOperationHandlerSet
|
|
14
|
+
} from "./chunk-GZL2J55W.mjs";
|
|
15
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
16
|
+
export {
|
|
17
|
+
HelpCapabilities_exports as HelpCapabilities,
|
|
18
|
+
HelpContext,
|
|
19
|
+
HelpOperation_exports as HelpOperation,
|
|
20
|
+
HelpOperationHandlerSet,
|
|
21
|
+
SHORTCUTS_DIALOG,
|
|
22
|
+
meta
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=index.mjs.map
|