@dxos/plugin-help 0.8.4-main.70d3990 → 0.8.4-main.7996785055

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.
Files changed (172) hide show
  1. package/dist/lib/browser/ShortcutsDialogContent-RI3YOW54.mjs +24 -0
  2. package/dist/lib/browser/ShortcutsDialogContent-RI3YOW54.mjs.map +7 -0
  3. package/dist/lib/browser/ShortcutsHints-HSVYDHWG.mjs +12 -0
  4. package/dist/lib/browser/ShortcutsHints-HSVYDHWG.mjs.map +7 -0
  5. package/dist/lib/browser/ShortcutsList-U6G236UM.mjs +12 -0
  6. package/dist/lib/browser/ShortcutsList-U6G236UM.mjs.map +7 -0
  7. package/dist/lib/browser/app-graph-builder-QUTWMQYP.mjs +82 -0
  8. package/dist/lib/browser/app-graph-builder-QUTWMQYP.mjs.map +7 -0
  9. package/dist/lib/browser/chunk-2XOKPYGX.mjs +31 -0
  10. package/dist/lib/browser/chunk-2XOKPYGX.mjs.map +7 -0
  11. package/dist/lib/browser/chunk-DZKLU3W7.mjs +335 -0
  12. package/dist/lib/browser/chunk-DZKLU3W7.mjs.map +7 -0
  13. package/dist/lib/browser/chunk-GB56M4NZ.mjs +11 -0
  14. package/dist/lib/browser/chunk-GB56M4NZ.mjs.map +7 -0
  15. package/dist/lib/browser/chunk-GJZB55DV.mjs +8 -0
  16. package/dist/lib/browser/chunk-GJZB55DV.mjs.map +7 -0
  17. package/dist/lib/browser/chunk-N2ZFAB4D.mjs +37 -0
  18. package/dist/lib/browser/chunk-N2ZFAB4D.mjs.map +7 -0
  19. package/dist/lib/browser/{chunk-BCYK4LXW.mjs → chunk-W4ZZ52LP.mjs} +9 -2
  20. package/dist/lib/browser/chunk-W4ZZ52LP.mjs.map +7 -0
  21. package/dist/lib/browser/index.mjs +45 -57
  22. package/dist/lib/browser/index.mjs.map +4 -4
  23. package/dist/lib/browser/meta.json +1 -1
  24. package/dist/lib/browser/meta.mjs +1 -1
  25. package/dist/lib/browser/operation-handler-YYBFFJUF.mjs +16 -0
  26. package/dist/lib/browser/operation-handler-YYBFFJUF.mjs.map +7 -0
  27. package/dist/lib/browser/operations/index.mjs +12 -0
  28. package/dist/lib/browser/operations/index.mjs.map +7 -0
  29. package/dist/lib/browser/react-root-NUWHII7F.mjs +43 -0
  30. package/dist/lib/browser/react-root-NUWHII7F.mjs.map +7 -0
  31. package/dist/lib/browser/react-surface-TT5TZP6Z.mjs +42 -0
  32. package/dist/lib/browser/react-surface-TT5TZP6Z.mjs.map +7 -0
  33. package/dist/lib/browser/start-CWVIDVPK.mjs +23 -0
  34. package/dist/lib/browser/start-CWVIDVPK.mjs.map +7 -0
  35. package/dist/lib/browser/state-H4S5TWSP.mjs +27 -0
  36. package/dist/lib/browser/state-H4S5TWSP.mjs.map +7 -0
  37. package/dist/lib/browser/types/index.mjs +4 -4
  38. package/dist/types/src/HelpPlugin.d.ts +2 -1
  39. package/dist/types/src/HelpPlugin.d.ts.map +1 -1
  40. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +6 -0
  41. package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +1 -0
  42. package/dist/types/src/capabilities/app-graph-builder/index.d.ts +3 -0
  43. package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +1 -0
  44. package/dist/types/src/capabilities/index.d.ts +5 -8
  45. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  46. package/dist/types/src/capabilities/operation-handler/index.d.ts +4 -0
  47. package/dist/types/src/capabilities/operation-handler/index.d.ts.map +1 -0
  48. package/dist/types/src/capabilities/operation-handler/operation-handler.d.ts +6 -0
  49. package/dist/types/src/capabilities/operation-handler/operation-handler.d.ts.map +1 -0
  50. package/dist/types/src/capabilities/react-root/index.d.ts +6 -0
  51. package/dist/types/src/capabilities/react-root/index.d.ts.map +1 -0
  52. package/dist/types/src/capabilities/react-root/react-root.d.ts +10 -0
  53. package/dist/types/src/capabilities/react-root/react-root.d.ts.map +1 -0
  54. package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
  55. package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
  56. package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
  57. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
  58. package/dist/types/src/capabilities/state/index.d.ts +11 -0
  59. package/dist/types/src/capabilities/state/index.d.ts.map +1 -0
  60. package/dist/types/src/capabilities/state/state.d.ts +13 -0
  61. package/dist/types/src/capabilities/state/state.d.ts.map +1 -0
  62. package/dist/types/src/components/Shortcuts/ShortcutsHints.d.ts.map +1 -1
  63. package/dist/types/src/components/Shortcuts/ShortcutsSection.d.ts.map +1 -1
  64. package/dist/types/src/components/Shortcuts/index.d.ts +0 -1
  65. package/dist/types/src/components/Shortcuts/index.d.ts.map +1 -1
  66. package/dist/types/src/components/WelcomeTour/WelcomeTour.d.ts.map +1 -1
  67. package/dist/types/src/components/WelcomeTour/WelcomeTour.stories.d.ts.map +1 -1
  68. package/dist/types/src/constants.d.ts +2 -0
  69. package/dist/types/src/constants.d.ts.map +1 -0
  70. package/dist/types/src/{components/Shortcuts/ShortcutsDialog.d.ts → containers/ShortcutsDialogContent/ShortcutsDialogContent.d.ts} +1 -2
  71. package/dist/types/src/containers/ShortcutsDialogContent/ShortcutsDialogContent.d.ts.map +1 -0
  72. package/dist/types/src/containers/ShortcutsDialogContent/ShortcutsDialogContent.stories.d.ts +25 -0
  73. package/dist/types/src/containers/ShortcutsDialogContent/ShortcutsDialogContent.stories.d.ts.map +1 -0
  74. package/dist/types/src/containers/ShortcutsDialogContent/index.d.ts +3 -0
  75. package/dist/types/src/containers/ShortcutsDialogContent/index.d.ts.map +1 -0
  76. package/dist/types/src/containers/ShortcutsHints/ShortcutsHints.d.ts +2 -0
  77. package/dist/types/src/containers/ShortcutsHints/ShortcutsHints.d.ts.map +1 -0
  78. package/dist/types/src/containers/ShortcutsHints/index.d.ts +3 -0
  79. package/dist/types/src/containers/ShortcutsHints/index.d.ts.map +1 -0
  80. package/dist/types/src/containers/ShortcutsList/ShortcutsList.d.ts +2 -0
  81. package/dist/types/src/containers/ShortcutsList/ShortcutsList.d.ts.map +1 -0
  82. package/dist/types/src/containers/ShortcutsList/index.d.ts +3 -0
  83. package/dist/types/src/containers/ShortcutsList/index.d.ts.map +1 -0
  84. package/dist/types/src/containers/index.d.ts +5 -0
  85. package/dist/types/src/containers/index.d.ts.map +1 -0
  86. package/dist/types/src/index.d.ts +2 -1
  87. package/dist/types/src/index.d.ts.map +1 -1
  88. package/dist/types/src/meta.d.ts +2 -2
  89. package/dist/types/src/meta.d.ts.map +1 -1
  90. package/dist/types/src/operations/definitions.d.ts +4 -0
  91. package/dist/types/src/operations/definitions.d.ts.map +1 -0
  92. package/dist/types/src/operations/index.d.ts +4 -0
  93. package/dist/types/src/operations/index.d.ts.map +1 -0
  94. package/dist/types/src/operations/start.d.ts +5 -0
  95. package/dist/types/src/operations/start.d.ts.map +1 -0
  96. package/dist/types/src/types/capabilities.d.ts +21 -0
  97. package/dist/types/src/types/capabilities.d.ts.map +1 -0
  98. package/dist/types/src/types/index.d.ts +1 -0
  99. package/dist/types/src/types/index.d.ts.map +1 -1
  100. package/dist/types/src/types/schema.d.ts +2 -14
  101. package/dist/types/src/types/schema.d.ts.map +1 -1
  102. package/dist/types/tsconfig.tsbuildinfo +1 -1
  103. package/package.json +48 -35
  104. package/src/HelpPlugin.tsx +17 -42
  105. package/src/capabilities/app-graph-builder/app-graph-builder.ts +62 -0
  106. package/src/capabilities/app-graph-builder/index.ts +7 -0
  107. package/src/capabilities/index.ts +5 -8
  108. package/src/capabilities/operation-handler/index.ts +11 -0
  109. package/src/capabilities/operation-handler/operation-handler.ts +16 -0
  110. package/src/capabilities/react-root/index.ts +7 -0
  111. package/src/capabilities/react-root/react-root.tsx +36 -0
  112. package/src/capabilities/react-surface/index.ts +7 -0
  113. package/src/capabilities/react-surface/react-surface.tsx +36 -0
  114. package/src/capabilities/state/index.ts +7 -0
  115. package/src/capabilities/state/state.ts +27 -0
  116. package/src/components/Shortcuts/ShortcutsHints.tsx +3 -2
  117. package/src/components/Shortcuts/ShortcutsList.tsx +3 -3
  118. package/src/components/Shortcuts/ShortcutsSection.tsx +1 -3
  119. package/src/components/Shortcuts/index.ts +0 -1
  120. package/src/components/Shortcuts/styles.ts +3 -3
  121. package/src/components/Tooltip/Tooltip.tsx +4 -4
  122. package/src/components/WelcomeTour/WelcomeTour.stories.tsx +13 -9
  123. package/src/components/WelcomeTour/WelcomeTour.tsx +3 -2
  124. package/src/constants.ts +7 -0
  125. package/src/containers/ShortcutsDialogContent/ShortcutsDialogContent.stories.tsx +39 -0
  126. package/src/containers/ShortcutsDialogContent/ShortcutsDialogContent.tsx +28 -0
  127. package/src/containers/ShortcutsDialogContent/index.ts +7 -0
  128. package/src/containers/ShortcutsHints/ShortcutsHints.tsx +5 -0
  129. package/src/containers/ShortcutsHints/index.ts +7 -0
  130. package/src/containers/ShortcutsList/ShortcutsList.tsx +5 -0
  131. package/src/containers/ShortcutsList/index.ts +7 -0
  132. package/src/containers/index.ts +9 -0
  133. package/src/index.ts +2 -1
  134. package/src/meta.ts +3 -3
  135. package/src/operations/definitions.ts +19 -0
  136. package/src/operations/index.ts +9 -0
  137. package/src/operations/start.ts +21 -0
  138. package/src/types/capabilities.ts +24 -0
  139. package/src/types/index.ts +1 -0
  140. package/src/types/schema.ts +2 -12
  141. package/dist/lib/browser/app-graph-builder-L6GUMAIH.mjs +0 -80
  142. package/dist/lib/browser/app-graph-builder-L6GUMAIH.mjs.map +0 -7
  143. package/dist/lib/browser/chunk-AZJJLAG7.mjs +0 -16
  144. package/dist/lib/browser/chunk-AZJJLAG7.mjs.map +0 -7
  145. package/dist/lib/browser/chunk-BCYK4LXW.mjs.map +0 -7
  146. package/dist/lib/browser/chunk-I7FKM6VC.mjs +0 -34
  147. package/dist/lib/browser/chunk-I7FKM6VC.mjs.map +0 -7
  148. package/dist/lib/browser/chunk-W4AUSEGO.mjs +0 -408
  149. package/dist/lib/browser/chunk-W4AUSEGO.mjs.map +0 -7
  150. package/dist/lib/browser/react-root-QJH33RNI.mjs +0 -35
  151. package/dist/lib/browser/react-root-QJH33RNI.mjs.map +0 -7
  152. package/dist/lib/browser/react-surface-OTMERRAV.mjs +0 -36
  153. package/dist/lib/browser/react-surface-OTMERRAV.mjs.map +0 -7
  154. package/dist/lib/browser/state-5PVJCYWJ.mjs +0 -29
  155. package/dist/lib/browser/state-5PVJCYWJ.mjs.map +0 -7
  156. package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -4
  157. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
  158. package/dist/types/src/capabilities/capabilities.d.ts +0 -10
  159. package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
  160. package/dist/types/src/capabilities/react-root.d.ts +0 -8
  161. package/dist/types/src/capabilities/react-root.d.ts.map +0 -1
  162. package/dist/types/src/capabilities/react-surface.d.ts +0 -4
  163. package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
  164. package/dist/types/src/capabilities/state.d.ts +0 -4
  165. package/dist/types/src/capabilities/state.d.ts.map +0 -1
  166. package/dist/types/src/components/Shortcuts/ShortcutsDialog.d.ts.map +0 -1
  167. package/src/capabilities/app-graph-builder.ts +0 -78
  168. package/src/capabilities/capabilities.ts +0 -13
  169. package/src/capabilities/react-root.tsx +0 -34
  170. package/src/capabilities/react-surface.tsx +0 -30
  171. package/src/capabilities/state.ts +0 -24
  172. package/src/components/Shortcuts/ShortcutsDialog.tsx +0 -32
@@ -0,0 +1,39 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { type Meta, type StoryObj } from '@storybook/react-vite';
6
+ import React from 'react';
7
+
8
+ import { withPluginManager } from '@dxos/app-framework/testing';
9
+ import { Dialog } from '@dxos/react-ui';
10
+ import { withTheme } from '@dxos/react-ui/testing';
11
+
12
+ import { translations } from '../../translations';
13
+
14
+ import { ShortcutsDialogContent } from './ShortcutsDialogContent';
15
+
16
+ const DefaultStory = () => (
17
+ <Dialog.Root defaultOpen>
18
+ <Dialog.Overlay>
19
+ <ShortcutsDialogContent />
20
+ </Dialog.Overlay>
21
+ </Dialog.Root>
22
+ );
23
+
24
+ const meta = {
25
+ title: 'plugins/plugin-help/containers/ShortcutsDialogContent',
26
+ component: ShortcutsDialogContent,
27
+ render: DefaultStory,
28
+ decorators: [withTheme(), withPluginManager()],
29
+ parameters: {
30
+ layout: 'fullscreen',
31
+ translations,
32
+ },
33
+ } satisfies Meta<typeof ShortcutsDialogContent>;
34
+
35
+ export default meta;
36
+
37
+ type Story = StoryObj<typeof meta>;
38
+
39
+ export const Default: Story = {};
@@ -0,0 +1,28 @@
1
+ //
2
+ // Copyright 2023 DXOS.org
3
+ //
4
+
5
+ import React from 'react';
6
+
7
+ import { Dialog, useTranslation } from '@dxos/react-ui';
8
+
9
+ import { ShortcutsList } from '../../components';
10
+ import { meta } from '../../meta';
11
+
12
+ export const ShortcutsDialogContent = () => {
13
+ const { t } = useTranslation(meta.id);
14
+
15
+ return (
16
+ <Dialog.Content>
17
+ <Dialog.Header>
18
+ <Dialog.Title>{t('shortcuts dialog title')}</Dialog.Title>
19
+ <Dialog.Close asChild>
20
+ <Dialog.CloseIconButton />
21
+ </Dialog.Close>
22
+ </Dialog.Header>
23
+ <Dialog.Body>
24
+ <ShortcutsList />
25
+ </Dialog.Body>
26
+ </Dialog.Content>
27
+ );
28
+ };
@@ -0,0 +1,7 @@
1
+ //
2
+ // Copyright 2023 DXOS.org
3
+ //
4
+
5
+ import { ShortcutsDialogContent } from './ShortcutsDialogContent';
6
+
7
+ export default ShortcutsDialogContent;
@@ -0,0 +1,5 @@
1
+ //
2
+ // Copyright 2023 DXOS.org
3
+ //
4
+
5
+ export { ShortcutsHints } from '../../components';
@@ -0,0 +1,7 @@
1
+ //
2
+ // Copyright 2023 DXOS.org
3
+ //
4
+
5
+ import { ShortcutsHints } from './ShortcutsHints';
6
+
7
+ export default ShortcutsHints;
@@ -0,0 +1,5 @@
1
+ //
2
+ // Copyright 2024 DXOS.org
3
+ //
4
+
5
+ export { ShortcutsList } from '../../components';
@@ -0,0 +1,7 @@
1
+ //
2
+ // Copyright 2024 DXOS.org
3
+ //
4
+
5
+ import { ShortcutsList } from './ShortcutsList';
6
+
7
+ export default ShortcutsList;
@@ -0,0 +1,9 @@
1
+ //
2
+ // Copyright 2023 DXOS.org
3
+ //
4
+
5
+ import { type ComponentType, lazy } from 'react';
6
+
7
+ export const ShortcutsDialogContent: ComponentType<any> = lazy(() => import('./ShortcutsDialogContent'));
8
+ export const ShortcutsHints: ComponentType<any> = lazy(() => import('./ShortcutsHints'));
9
+ export const ShortcutsList: ComponentType<any> = lazy(() => import('./ShortcutsList'));
package/src/index.ts CHANGED
@@ -2,8 +2,9 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- export { HelpCapabilities } from './capabilities';
5
+ export { HelpCapabilities } from './types';
6
6
  export * from './components';
7
+ export * from './constants';
7
8
  export * from './meta';
8
9
  export * from './HelpPlugin';
9
10
  export * from './hooks';
package/src/meta.ts CHANGED
@@ -2,11 +2,11 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import { type PluginMeta } from '@dxos/app-framework';
5
+ import { type Plugin } from '@dxos/app-framework';
6
6
  import { trim } from '@dxos/util';
7
7
 
8
- export const meta: PluginMeta = {
9
- id: 'dxos.org/plugin/help',
8
+ export const meta: Plugin.Meta = {
9
+ id: 'org.dxos.plugin.help',
10
10
  name: 'Help',
11
11
  description: trim`
12
12
  Built-in help system with documentation, tutorials, and contextual assistance.
@@ -0,0 +1,19 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Schema from 'effect/Schema';
6
+
7
+ import { Capability } from '@dxos/app-framework';
8
+ import { Operation } from '@dxos/operation';
9
+
10
+ import { meta } from '../meta';
11
+
12
+ const HELP_OPERATION = `${meta.id}.operation`;
13
+
14
+ export const Start = Operation.make({
15
+ meta: { key: `${HELP_OPERATION}.start`, name: 'Start Help' },
16
+ services: [Capability.Service],
17
+ input: Schema.Void,
18
+ output: Schema.Void,
19
+ });
@@ -0,0 +1,9 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { OperationHandlerSet } from '@dxos/operation';
6
+
7
+ export * as HelpOperation from './definitions';
8
+
9
+ export const HelpOperationHandlerSet = OperationHandlerSet.lazy(() => import('./start'));
@@ -0,0 +1,21 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import * as Effect from 'effect/Effect';
6
+
7
+ import { Capabilities } from '@dxos/app-framework';
8
+ import { Operation } from '@dxos/operation';
9
+
10
+ import { HelpCapabilities } from '../types';
11
+ import { Start } from './definitions';
12
+
13
+ const handler: Operation.WithHandler<typeof Start> = Start.pipe(
14
+ Operation.withHandler(
15
+ Effect.fnUntraced(function* () {
16
+ yield* Capabilities.updateAtomValue(HelpCapabilities.State, (state) => ({ ...state, running: true }));
17
+ }),
18
+ ),
19
+ );
20
+
21
+ export default handler;
@@ -0,0 +1,24 @@
1
+ //
2
+ // Copyright 2025 DXOS.org
3
+ //
4
+
5
+ import { type Atom } from '@effect-atom/atom-react';
6
+ import * as Schema from 'effect/Schema';
7
+
8
+ import { Capability } from '@dxos/app-framework';
9
+
10
+ import { meta } from '../meta';
11
+
12
+ export namespace HelpCapabilities {
13
+ export const StateSchema = Schema.mutable(
14
+ Schema.Struct({
15
+ running: Schema.Boolean,
16
+ showHints: Schema.Boolean,
17
+ showWelcome: Schema.Boolean,
18
+ }),
19
+ );
20
+
21
+ export type State = Schema.Schema.Type<typeof StateSchema>;
22
+
23
+ export const State = Capability.make<Atom.Writable<State>>(`${meta.id}.capability.state`);
24
+ }
@@ -2,4 +2,5 @@
2
2
  // Copyright 2025 DXOS.org
3
3
  //
4
4
 
5
+ export * from './capabilities';
5
6
  export * from './schema';
@@ -2,16 +2,13 @@
2
2
  // Copyright 2023 DXOS.org
3
3
  //
4
4
 
5
- import * as Schema from 'effect/Schema';
6
5
  import { type Context, createContext } from 'react';
7
6
  import { type Step as BaseStep } from 'react-joyride';
8
7
 
9
- import { type PluginContext } from '@dxos/app-framework';
10
-
11
- import { meta } from '../meta';
8
+ import { type CapabilityManager } from '@dxos/app-framework';
12
9
 
13
10
  export type Step = BaseStep & {
14
- before?: (context: PluginContext) => void;
11
+ before?: (capabilities: CapabilityManager.CapabilityManager) => void;
15
12
  };
16
13
 
17
14
  export type HelpContextType = {
@@ -31,10 +28,3 @@ export const HelpContext: Context<HelpContextType> = createContext<HelpContextTy
31
28
  start: () => {},
32
29
  stop: () => {},
33
30
  });
34
-
35
- export namespace HelpAction {
36
- export class Start extends Schema.TaggedClass<Start>()(`${meta.id}/action/start`, {
37
- input: Schema.Void,
38
- output: Schema.Void,
39
- }) {}
40
- }
@@ -1,80 +0,0 @@
1
- import {
2
- SHORTCUTS_DIALOG
3
- } from "./chunk-W4AUSEGO.mjs";
4
- import {
5
- HelpAction
6
- } from "./chunk-I7FKM6VC.mjs";
7
- import {
8
- HelpCapabilities
9
- } from "./chunk-AZJJLAG7.mjs";
10
- import {
11
- meta
12
- } from "./chunk-BCYK4LXW.mjs";
13
-
14
- // src/capabilities/app-graph-builder.ts
15
- import { Atom } from "@effect-atom/atom-react";
16
- import * as Function from "effect/Function";
17
- import * as Option from "effect/Option";
18
- import { Capabilities, LayoutAction, contributes, createIntent } from "@dxos/app-framework";
19
- import { createExtension } from "@dxos/app-graph";
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(() => [
23
- {
24
- id: HelpAction.Start._tag,
25
- data: async () => {
26
- const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
27
- const state = context.getCapability(HelpCapabilities.MutableState);
28
- state.showHints = true;
29
- await dispatch(createIntent(HelpAction.Start));
30
- },
31
- properties: {
32
- label: [
33
- "open help tour",
34
- {
35
- ns: meta.id
36
- }
37
- ],
38
- icon: "ph--info--regular",
39
- keyBinding: {
40
- macos: "shift+meta+/",
41
- // TODO(wittjosiah): Test on windows to see if it behaves the same as linux.
42
- windows: "shift+ctrl+/",
43
- linux: "shift+ctrl+?"
44
- },
45
- testId: "helpPlugin.openHelp"
46
- }
47
- },
48
- {
49
- id: `${meta.id}/open-shortcuts`,
50
- data: async () => {
51
- const { dispatchPromise: dispatch } = context.getCapability(Capabilities.IntentDispatcher);
52
- const state = context.getCapability(HelpCapabilities.MutableState);
53
- state.showHints = true;
54
- await dispatch(createIntent(LayoutAction.UpdateDialog, {
55
- part: "dialog",
56
- subject: SHORTCUTS_DIALOG,
57
- options: {
58
- blockAlign: "center"
59
- }
60
- }));
61
- },
62
- properties: {
63
- label: [
64
- "open shortcuts label",
65
- {
66
- ns: meta.id
67
- }
68
- ],
69
- icon: "ph--keyboard--regular",
70
- keyBinding: {
71
- macos: "meta+ctrl+/"
72
- }
73
- }
74
- }
75
- ]), Option.getOrElse(() => [])))
76
- })));
77
- export {
78
- app_graph_builder_default as default
79
- };
80
- //# sourceMappingURL=app-graph-builder-L6GUMAIH.mjs.map
@@ -1,7 +0,0 @@
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
- }
@@ -1,16 +0,0 @@
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
@@ -1,7 +0,0 @@
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
- }
@@ -1,7 +0,0 @@
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,34 +0,0 @@
1
- import {
2
- meta
3
- } from "./chunk-BCYK4LXW.mjs";
4
-
5
- // src/types/schema.ts
6
- import * as Schema from "effect/Schema";
7
- import { createContext } from "react";
8
- var HelpContext = createContext({
9
- running: false,
10
- steps: [],
11
- setSteps: () => {
12
- },
13
- setIndex: () => {
14
- },
15
- start: () => {
16
- },
17
- stop: () => {
18
- }
19
- });
20
- (function(HelpAction2) {
21
- class Start extends Schema.TaggedClass()(`${meta.id}/action/start`, {
22
- input: Schema.Void,
23
- output: Schema.Void
24
- }) {
25
- }
26
- HelpAction2.Start = Start;
27
- })(HelpAction || (HelpAction = {}));
28
- var HelpAction;
29
-
30
- export {
31
- HelpContext,
32
- HelpAction
33
- };
34
- //# sourceMappingURL=chunk-I7FKM6VC.mjs.map
@@ -1,7 +0,0 @@
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
- }