@dxos/plugin-help 0.7.5-main.9cb18ac → 0.7.5-main.9d2a38b
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-G3FCDRBG.mjs +75 -0
- package/dist/lib/browser/app-graph-builder-G3FCDRBG.mjs.map +7 -0
- package/dist/lib/browser/{chunk-RHSC3EWO.mjs → chunk-24E4WRKH.mjs} +2 -2
- package/dist/lib/browser/chunk-24E4WRKH.mjs.map +7 -0
- package/dist/lib/browser/{chunk-STC3ORFI.mjs → chunk-76XWX6N3.mjs} +3 -3
- package/dist/lib/browser/chunk-76XWX6N3.mjs.map +7 -0
- package/dist/lib/browser/chunk-GJTAQWB6.mjs +16 -0
- package/dist/lib/browser/chunk-GJTAQWB6.mjs.map +7 -0
- package/dist/lib/browser/chunk-VNAN5GRY.mjs +361 -0
- package/dist/lib/browser/chunk-VNAN5GRY.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +67 -484
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/meta.mjs +3 -3
- package/dist/lib/browser/react-context-SIW6XKOC.mjs +34 -0
- package/dist/lib/browser/react-context-SIW6XKOC.mjs.map +7 -0
- package/dist/lib/browser/react-surface-TZZUXIVX.mjs +36 -0
- package/dist/lib/browser/react-surface-TZZUXIVX.mjs.map +7 -0
- package/dist/lib/browser/state-SLKOTRHH.mjs +29 -0
- package/dist/lib/browser/state-SLKOTRHH.mjs.map +7 -0
- package/dist/lib/browser/types.mjs +2 -2
- package/dist/types/src/HelpPlugin.d.ts +2 -7
- package/dist/types/src/HelpPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +181 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/capabilities.d.ts +10 -0
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +186 -0
- package/dist/types/src/capabilities/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-context.d.ts +9 -0
- package/dist/types/src/capabilities/react-context.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +4 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/state.d.ts +4 -0
- package/dist/types/src/capabilities/state.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +4 -5
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +1 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/types.d.ts +2 -6
- package/dist/types/src/types.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +18 -25
- package/src/HelpPlugin.tsx +42 -125
- package/src/capabilities/app-graph-builder.ts +58 -0
- package/src/capabilities/capabilities.ts +13 -0
- package/src/capabilities/index.ts +12 -0
- package/src/capabilities/react-context.tsx +34 -0
- package/src/capabilities/react-surface.tsx +30 -0
- package/src/capabilities/state.ts +23 -0
- package/src/components/HelpContextProvider/HelpContextProvider.tsx +5 -5
- package/src/index.ts +4 -9
- package/src/meta.ts +1 -1
- package/src/types.ts +2 -10
- package/dist/lib/browser/chunk-RHSC3EWO.mjs.map +0 -7
- package/dist/lib/browser/chunk-STC3ORFI.mjs.map +0 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../../src/
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport {\n resolvePlugin,\n type PluginDefinition,\n parseIntentPlugin,\n LayoutAction,\n createSurface,\n createResolver,\n createIntent,\n} from '@dxos/app-framework';\nimport { createExtension, type Node } from '@dxos/app-graph';\nimport { create } from '@dxos/live-object';\nimport { LocalStorageStore } from '@dxos/local-storage';\n\nimport {\n HelpContextProvider,\n SHORTCUTS_DIALOG,\n ShortcutsDialogContent,\n ShortcutsHints,\n ShortcutsList,\n} from './components';\nimport meta, { HELP_PLUGIN } from './meta';\nimport translations from './translations';\nimport { type Step, type HelpPluginProvides, HelpAction } from './types';\n\nexport type HelpSettingsProps = { showHints?: boolean; showWelcome?: boolean };\n\nexport type HelpPluginOptions = { steps?: Step[] };\n\nexport const HelpPlugin = ({ steps = [] }: HelpPluginOptions): PluginDefinition<HelpPluginProvides> => {\n const settings = new LocalStorageStore<HelpSettingsProps>(HELP_PLUGIN, { showHints: true, showWelcome: true });\n const state = create<{ running: boolean }>({ running: false });\n return {\n meta,\n ready: async () => {\n settings\n .prop({ key: 'showHints', type: LocalStorageStore.bool({ allowUndefined: true }) })\n .prop({ key: 'showWelcome', type: LocalStorageStore.bool({ allowUndefined: true }) });\n },\n provides: {\n context: ({ children }) => {\n return (\n <HelpContextProvider\n steps={steps}\n running={state.running}\n onRunningChanged={(newState) => {\n state.running = newState;\n if (!newState) {\n settings.values.showHints = false;\n }\n }}\n >\n {children}\n </HelpContextProvider>\n );\n },\n translations,\n graph: {\n builder: (plugins) => {\n const dispatch = resolvePlugin(plugins, parseIntentPlugin)?.provides.intent.dispatchPromise;\n\n return createExtension({\n id: HELP_PLUGIN,\n filter: (node): node is Node<null> => node.id === 'root',\n actions: () => [\n {\n id: HelpAction.Start._tag,\n data: async () => {\n settings.values.showHints = true;\n await dispatch?.(createIntent(HelpAction.Start));\n },\n properties: {\n label: ['open help tour', { ns: HELP_PLUGIN }],\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: 'dxos.org/plugin/help/open-shortcuts',\n data: async () => {\n settings.values.showHints = true;\n await dispatch?.(\n createIntent(LayoutAction.SetLayout, { element: 'dialog', component: SHORTCUTS_DIALOG }),\n );\n },\n properties: {\n label: ['open shortcuts label', { ns: HELP_PLUGIN }],\n icon: 'ph--keyboard--regular',\n keyBinding: {\n macos: 'meta+ctrl+/',\n },\n },\n },\n ],\n });\n },\n },\n surface: {\n definitions: () => [\n createSurface({\n id: `${HELP_PLUGIN}/hints`,\n role: 'hints',\n component: () => <ShortcutsHints />,\n }),\n createSurface({\n id: `${HELP_PLUGIN}/keyshortcuts`,\n role: 'keyshortcuts',\n component: () => <ShortcutsList />,\n }),\n createSurface({\n id: SHORTCUTS_DIALOG,\n role: 'dialog',\n filter: (data): data is any => data.component === SHORTCUTS_DIALOG,\n component: () => <ShortcutsDialogContent />,\n }),\n ],\n },\n intent: {\n resolvers: () =>\n createResolver(HelpAction.Start, () => {\n state.running = true;\n }),\n },\n },\n };\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { type PropsWithChildren, useState, useEffect } from 'react';\nimport Joyride, { ACTIONS, EVENTS } from 'react-joyride';\n\nimport { usePlugins, resolvePlugin, parseLayoutPlugin } from '@dxos/app-framework';\n\nimport { type Step, HelpContext } from '../../types';\nimport { floaterProps, Tooltip } 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 HelpContextProviderProps = PropsWithChildren<{\n steps: Step[];\n running?: boolean;\n onRunningChanged?: (state: boolean) => any;\n}>;\n\nexport const HelpContextProvider = ({\n children,\n steps: initialSteps,\n running: runningProp,\n onRunningChanged,\n}: HelpContextProviderProps) => {\n const { plugins } = usePlugins();\n const layoutPlugin = resolvePlugin(plugins, parseLayoutPlugin);\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 = layoutPlugin?.provides.layout.dialogOpen;\n\n const setStepIndex = (index: number) => {\n if (runningProp) {\n const step = steps[index];\n step?.before?.({ plugins, step });\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 useEffect(() => {\n const timeout = setTimeout(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 });\n\n return () => clearTimeout(timeout);\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 {children}\n </HelpContext.Provider>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { useArrowNavigationGroup, useFocusableGroup } from '@fluentui/react-tabster';\nimport { CaretLeft, CaretRight, Circle, X } from '@phosphor-icons/react';\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 TooltipRenderProps, type Props } 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 } from '@dxos/react-ui';\nimport { getSize, mx } from '@dxos/react-ui-theme';\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 arrowGroup = useArrowNavigationGroup({ axis: 'horizontal' });\n const trapFocus = 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-inverse'\n role='tooltip'\n data-testid='helpPlugin.tooltip'\n data-step={index + 1}\n {...trapFocus}\n ref={forwardedRef}\n >\n <div className='flex p-2'>\n <h2 className='grow pli-2 plb-1 text-lg font-medium text-inverse'>{title}</h2>\n <Button\n density='fine'\n variant='primary'\n onClick={closeProps.onClick}\n title={closeProps['aria-label']}\n data-testid='helpPlugin.tooltip.close'\n >\n <X weight='bold' className={getSize(4)} />\n </Button>\n </div>\n <div className='flex grow pli-4 mlb-2'>{content}</div>\n <div className='flex p-2 items-center justify-between' {...arrowGroup}>\n {\n <Button\n variant='primary'\n onClick={backProps.onClick}\n title={backProps['aria-label']}\n classNames={[!(index > 0 && backProps) && 'invisible']}\n data-testid='helpPlugin.tooltip.back'\n >\n <CaretLeft className={getSize(5)} />\n </Button>\n }\n <div className='flex grow gap-2 justify-center'>\n <div className='flex'>\n {Array.from({ length: size }).map((_, i) => (\n <Circle\n key={i}\n weight={index === i ? 'fill' : 'regular'}\n className={mx(getSize(2), '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 <Button\n variant='primary'\n onClick={primaryProps.onClick}\n title={primaryProps['aria-label']}\n autoFocus\n data-testid='helpPlugin.tooltip.next'\n >\n <CaretRight className={getSize(6)} />\n </Button>\n )}\n </div>\n </div>\n );\n },\n);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Button, Dialog, Icon, useTranslation } from '@dxos/react-ui';\n\nimport { ShortcutsList } from './ShortcutsList';\nimport { HELP_PLUGIN } from '../../meta';\n\nexport const SHORTCUTS_DIALOG = `${HELP_PLUGIN}/ShortcutsDialog`;\n\nexport const ShortcutsDialogContent = () => {\n const { t } = useTranslation(HELP_PLUGIN);\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\n <Dialog.Close asChild>\n <Button density='fine' variant='ghost' autoFocus>\n <Icon icon='ph--x--regular' size={3} />\n </Button>\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 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 { Key } from './Key';\nimport { HELP_PLUGIN } from '../../meta';\n\nexport const ShortcutsList = () => {\n const { t } = useTranslation(HELP_PLUGIN);\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')}>\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 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 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type KeyBinding, Keyboard } from '@dxos/keyboard';\nimport { Button, Icon, 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 px-2 gap-4'>\n {hints.map((binding) => (\n <Shortcut key={binding.shortcut} binding={binding} />\n ))}\n {onClose && (\n <Button variant='ghost' classNames='p-0 cursor-pointer' onClick={onClose}>\n <Icon icon='ph--x--regular' size={4} />\n </Button>\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 { HELP_PLUGIN } from './meta';\n\nexport default [\n {\n 'en-US': {\n [HELP_PLUGIN]: {\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];\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", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { HelpPlugin } from './HelpPlugin';\nimport { type Step } from './types';\n\nexport type { Step };\n\nexport * from './components';\nexport * from './hooks';\n\nexport * from './HelpPlugin';\n\nexport default HelpPlugin;\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["
|
|
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 ReactContext = lazy(() => import('./react-context'));\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 { createResolver, defineModule, definePlugin, Events, contributes, Capabilities } from '@dxos/app-framework';\n\nimport { AppGraphBuilder, HelpState, ReactContext, ReactSurface } from './capabilities';\nimport { HelpCapabilities } from './capabilities/capabilities';\nimport { meta } from './meta';\nimport translations from './translations';\nimport { type Step, HelpAction } from './types';\n\nexport type HelpPluginOptions = { steps?: Step[] };\n\nexport const HelpPlugin = ({ steps = [] }: HelpPluginOptions) =>\n definePlugin(meta, [\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-context`,\n activatesOn: Events.Startup,\n activate: () => ReactContext(steps),\n }),\n defineModule({\n id: `${meta.id}/module/react-surface`,\n activatesOn: Events.Startup,\n activate: ReactSurface,\n }),\n defineModule({\n id: `${meta.id}/module/intent-resolver`,\n activatesOn: Events.SetupIntents,\n activate: (context) =>\n contributes(\n Capabilities.IntentResolver,\n createResolver(HelpAction.Start, () => {\n const state = context.requestCapability(HelpCapabilities.MutableState);\n state.running = true;\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 { HELP_PLUGIN } from './meta';\n\nexport default [\n {\n 'en-US': {\n [HELP_PLUGIN]: {\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];\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,eAAeD,KAAK,MAAM,OAAO,8BAAA,CAAA;AACvC,IAAME,eAAeF,KAAK,MAAM,OAAO,8BAAA,CAAA;AACvC,IAAMG,YAAYH,KAAK,MAAM,OAAO,sBAAA,CAAA;;;ACL3C,SAASI,gBAAgBC,cAAcC,cAAcC,QAAQC,aAAaC,oBAAoB;;;ACE9F,IAAA,uBAAe;EACb;IACE,SAAS;MACP,CAACC,WAAAA,GAAc;QACb,eAAe;QACf,kBAAkB;QAClB,wBAAwB;QACxB,0BAA0B;MAC5B;IACF;EACF;;;;ADFK,IAAMC,aAAa,CAAC,EAAEC,QAAQ,CAAA,EAAE,MACrCC,aAAaC,MAAM;EACjBC,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOC;IACpBC,UAAUC;EACZ,CAAA;EACAN,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOI;IACpBF,UAAU,MAAMG,YAAYC,aAAaC,cAAcC,oBAAAA;EACzD,CAAA;EACAX,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOC;IACpBC,UAAU,MAAMO,aAAaf,KAAAA;EAC/B,CAAA;EACAG,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOC;IACpBC,UAAUQ;EACZ,CAAA;EACAb,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOW;IACpBT,UAAU,CAACU,YACTP,YACEC,aAAaO,gBACbC,eAAeC,WAAWC,OAAO,MAAA;AAC/B,YAAMC,QAAQL,QAAQM,kBAAkBC,iBAAiBC,YAAY;AACrEH,YAAMI,UAAU;IAClB,CAAA,CAAA;EAEN,CAAA;EACAxB,aAAa;IACXC,IAAI,GAAGF,KAAKE,EAAE;IACdC,aAAaC,OAAOsB;IACpBpB,UAAUqB;EACZ,CAAA;CACD;;;AEjDH,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", "ReactContext", "ReactSurface", "HelpState", "createResolver", "defineModule", "definePlugin", "Events", "contributes", "Capabilities", "HELP_PLUGIN", "HelpPlugin", "steps", "definePlugin", "meta", "defineModule", "id", "activatesOn", "Events", "Startup", "activate", "HelpState", "SetupTranslations", "contributes", "Capabilities", "Translations", "translations", "ReactContext", "ReactSurface", "SetupIntents", "context", "IntentResolver", "createResolver", "HelpAction", "Start", "state", "requestCapability", "HelpCapabilities", "MutableState", "running", "SetupAppGraph", "AppGraphBuilder", "useContext", "raise", "useHelp", "useContext", "HelpContext", "raise", "Error"]
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/plugins/plugin-help/src/meta.ts":{"bytes":1116,"imports":[],"format":"esm"},"packages/plugins/plugin-help/src/types.ts":{"bytes":3447,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-help/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-help/src/components/Tooltip/Tooltip.tsx":{"bytes":12449,"imports":[{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-help/src/components/Tooltip/index.ts":{"bytes":518,"imports":[{"path":"packages/plugins/plugin-help/src/components/Tooltip/Tooltip.tsx","kind":"import-statement","original":"./Tooltip"}],"format":"esm"},"packages/plugins/plugin-help/src/components/HelpContextProvider/HelpContextProvider.tsx":{"bytes":17572,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"react-joyride","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-help/src/types.ts","kind":"import-statement","original":"../../types"},{"path":"packages/plugins/plugin-help/src/components/Tooltip/index.ts","kind":"import-statement","original":"../Tooltip"}],"format":"esm"},"packages/plugins/plugin-help/src/components/HelpContextProvider/index.ts":{"bytes":558,"imports":[{"path":"packages/plugins/plugin-help/src/components/HelpContextProvider/HelpContextProvider.tsx","kind":"import-statement","original":"./HelpContextProvider"}],"format":"esm"},"packages/plugins/plugin-help/src/components/Shortcuts/styles.ts":{"bytes":1045,"imports":[{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-help/src/components/Shortcuts/Key.tsx":{"bytes":2038,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/keyboard","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-help/src/components/Shortcuts/styles.ts","kind":"import-statement","original":"./styles"}],"format":"esm"},"packages/plugins/plugin-help/src/components/Shortcuts/ShortcutsList.tsx":{"bytes":4360,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/keyboard","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-help/src/components/Shortcuts/Key.tsx","kind":"import-statement","original":"./Key"},{"path":"packages/plugins/plugin-help/src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"packages/plugins/plugin-help/src/components/Shortcuts/ShortcutsDialog.tsx":{"bytes":4094,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-help/src/components/Shortcuts/ShortcutsList.tsx","kind":"import-statement","original":"./ShortcutsList"},{"path":"packages/plugins/plugin-help/src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"packages/plugins/plugin-help/src/components/Shortcuts/ShortcutsHints.tsx":{"bytes":5128,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/keyboard","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-help/src/components/Shortcuts/Key.tsx","kind":"import-statement","original":"./Key"}],"format":"esm"},"packages/plugins/plugin-help/src/components/Shortcuts/ShortcutsSection.tsx":{"bytes":1507,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-help/src/components/Shortcuts/ShortcutsList.tsx","kind":"import-statement","original":"./ShortcutsList"}],"format":"esm"},"packages/plugins/plugin-help/src/components/Shortcuts/index.ts":{"bytes":938,"imports":[{"path":"packages/plugins/plugin-help/src/components/Shortcuts/ShortcutsDialog.tsx","kind":"import-statement","original":"./ShortcutsDialog"},{"path":"packages/plugins/plugin-help/src/components/Shortcuts/ShortcutsHints.tsx","kind":"import-statement","original":"./ShortcutsHints"},{"path":"packages/plugins/plugin-help/src/components/Shortcuts/ShortcutsList.tsx","kind":"import-statement","original":"./ShortcutsList"},{"path":"packages/plugins/plugin-help/src/components/Shortcuts/ShortcutsSection.tsx","kind":"import-statement","original":"./ShortcutsSection"},{"path":"packages/plugins/plugin-help/src/components/Shortcuts/Key.tsx","kind":"import-statement","original":"./Key"}],"format":"esm"},"packages/plugins/plugin-help/src/components/index.ts":{"bytes":718,"imports":[{"path":"packages/plugins/plugin-help/src/components/HelpContextProvider/index.ts","kind":"import-statement","original":"./HelpContextProvider"},{"path":"packages/plugins/plugin-help/src/components/Shortcuts/index.ts","kind":"import-statement","original":"./Shortcuts"},{"path":"packages/plugins/plugin-help/src/components/Tooltip/index.ts","kind":"import-statement","original":"./Tooltip"}],"format":"esm"},"packages/plugins/plugin-help/src/translations.ts":{"bytes":1427,"imports":[{"path":"packages/plugins/plugin-help/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-help/src/HelpPlugin.tsx":{"bytes":16482,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-help/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/plugin-help/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-help/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/plugin-help/src/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-help/src/hooks/useHelp.tsx":{"bytes":1249,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-help/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-help/src/hooks/index.ts":{"bytes":505,"imports":[{"path":"packages/plugins/plugin-help/src/hooks/useHelp.tsx","kind":"import-statement","original":"./useHelp"}],"format":"esm"},"packages/plugins/plugin-help/src/index.ts":{"bytes":1015,"imports":[{"path":"packages/plugins/plugin-help/src/HelpPlugin.tsx","kind":"import-statement","original":"./HelpPlugin"},{"path":"packages/plugins/plugin-help/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/plugin-help/src/hooks/index.ts","kind":"import-statement","original":"./hooks"},{"path":"packages/plugins/plugin-help/src/HelpPlugin.tsx","kind":"import-statement","original":"./HelpPlugin"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-help/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":33225},"packages/plugins/plugin-help/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-help/dist/lib/browser/chunk-RHSC3EWO.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-help/dist/lib/browser/chunk-STC3ORFI.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"@dxos/live-object","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-joyride","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/keyboard","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/keyboard","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/keyboard","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"exports":["HelpContextProvider","HelpPlugin","Key","SHORTCUTS_DIALOG","ShortcutsDialogContent","ShortcutsHints","ShortcutsList","ShortcutsSection","Tooltip","default","floaterProps","useHelp"],"entryPoint":"packages/plugins/plugin-help/src/index.ts","inputs":{"packages/plugins/plugin-help/src/HelpPlugin.tsx":{"bytesInOutput":4096},"packages/plugins/plugin-help/src/components/HelpContextProvider/HelpContextProvider.tsx":{"bytesInOutput":4044},"packages/plugins/plugin-help/src/components/Tooltip/Tooltip.tsx":{"bytesInOutput":3180},"packages/plugins/plugin-help/src/components/Tooltip/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-help/src/components/HelpContextProvider/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-help/src/components/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-help/src/components/Shortcuts/ShortcutsDialog.tsx":{"bytesInOutput":1116},"packages/plugins/plugin-help/src/components/Shortcuts/ShortcutsList.tsx":{"bytesInOutput":995},"packages/plugins/plugin-help/src/components/Shortcuts/Key.tsx":{"bytesInOutput":394},"packages/plugins/plugin-help/src/components/Shortcuts/styles.ts":{"bytesInOutput":202},"packages/plugins/plugin-help/src/components/Shortcuts/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-help/src/components/Shortcuts/ShortcutsHints.tsx":{"bytesInOutput":1367},"packages/plugins/plugin-help/src/components/Shortcuts/ShortcutsSection.tsx":{"bytesInOutput":273},"packages/plugins/plugin-help/src/translations.ts":{"bytesInOutput":266},"packages/plugins/plugin-help/src/index.ts":{"bytesInOutput":30},"packages/plugins/plugin-help/src/hooks/useHelp.tsx":{"bytesInOutput":175},"packages/plugins/plugin-help/src/hooks/index.ts":{"bytesInOutput":0}},"bytes":17705},"packages/plugins/plugin-help/dist/lib/browser/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-help/dist/lib/browser/meta.mjs":{"imports":[{"path":"packages/plugins/plugin-help/dist/lib/browser/chunk-STC3ORFI.mjs","kind":"import-statement"}],"exports":["HELP_PLUGIN","default"],"entryPoint":"packages/plugins/plugin-help/src/meta.ts","inputs":{},"bytes":157},"packages/plugins/plugin-help/dist/lib/browser/types.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-help/dist/lib/browser/types.mjs":{"imports":[{"path":"packages/plugins/plugin-help/dist/lib/browser/chunk-RHSC3EWO.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-help/dist/lib/browser/chunk-STC3ORFI.mjs","kind":"import-statement"}],"exports":["HELP_ACTION","HelpAction","HelpContext"],"entryPoint":"packages/plugins/plugin-help/src/types.ts","inputs":{},"bytes":204},"packages/plugins/plugin-help/dist/lib/browser/chunk-RHSC3EWO.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1979},"packages/plugins/plugin-help/dist/lib/browser/chunk-RHSC3EWO.mjs":{"imports":[{"path":"packages/plugins/plugin-help/dist/lib/browser/chunk-STC3ORFI.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["HELP_ACTION","HelpAction","HelpContext"],"inputs":{"packages/plugins/plugin-help/src/types.ts":{"bytesInOutput":502}},"bytes":702},"packages/plugins/plugin-help/dist/lib/browser/chunk-STC3ORFI.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":522},"packages/plugins/plugin-help/dist/lib/browser/chunk-STC3ORFI.mjs":{"imports":[],"exports":["HELP_PLUGIN","meta_default"],"inputs":{"packages/plugins/plugin-help/src/meta.ts":{"bytesInOutput":129}},"bytes":260}}}
|
|
1
|
+
{"inputs":{"packages/plugins/plugin-help/src/meta.ts":{"bytes":1153,"imports":[],"format":"esm"},"packages/plugins/plugin-help/src/capabilities/capabilities.ts":{"bytes":1718,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-help/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-help/src/types.ts":{"bytes":3103,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-help/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-help/src/components/Tooltip/Tooltip.tsx":{"bytes":12449,"imports":[{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-help/src/components/Tooltip/index.ts":{"bytes":518,"imports":[{"path":"packages/plugins/plugin-help/src/components/Tooltip/Tooltip.tsx","kind":"import-statement","original":"./Tooltip"}],"format":"esm"},"packages/plugins/plugin-help/src/components/HelpContextProvider/HelpContextProvider.tsx":{"bytes":17397,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"react-joyride","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-help/src/types.ts","kind":"import-statement","original":"../../types"},{"path":"packages/plugins/plugin-help/src/components/Tooltip/index.ts","kind":"import-statement","original":"../Tooltip"}],"format":"esm"},"packages/plugins/plugin-help/src/components/HelpContextProvider/index.ts":{"bytes":558,"imports":[{"path":"packages/plugins/plugin-help/src/components/HelpContextProvider/HelpContextProvider.tsx","kind":"import-statement","original":"./HelpContextProvider"}],"format":"esm"},"packages/plugins/plugin-help/src/components/Shortcuts/styles.ts":{"bytes":1045,"imports":[{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"format":"esm"},"packages/plugins/plugin-help/src/components/Shortcuts/Key.tsx":{"bytes":2038,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/keyboard","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-help/src/components/Shortcuts/styles.ts","kind":"import-statement","original":"./styles"}],"format":"esm"},"packages/plugins/plugin-help/src/components/Shortcuts/ShortcutsList.tsx":{"bytes":4360,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/keyboard","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-help/src/components/Shortcuts/Key.tsx","kind":"import-statement","original":"./Key"},{"path":"packages/plugins/plugin-help/src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"packages/plugins/plugin-help/src/components/Shortcuts/ShortcutsDialog.tsx":{"bytes":4094,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-help/src/components/Shortcuts/ShortcutsList.tsx","kind":"import-statement","original":"./ShortcutsList"},{"path":"packages/plugins/plugin-help/src/meta.ts","kind":"import-statement","original":"../../meta"}],"format":"esm"},"packages/plugins/plugin-help/src/components/Shortcuts/ShortcutsHints.tsx":{"bytes":5128,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/keyboard","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-help/src/components/Shortcuts/Key.tsx","kind":"import-statement","original":"./Key"}],"format":"esm"},"packages/plugins/plugin-help/src/components/Shortcuts/ShortcutsSection.tsx":{"bytes":1507,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-help/src/components/Shortcuts/ShortcutsList.tsx","kind":"import-statement","original":"./ShortcutsList"}],"format":"esm"},"packages/plugins/plugin-help/src/components/Shortcuts/index.ts":{"bytes":938,"imports":[{"path":"packages/plugins/plugin-help/src/components/Shortcuts/ShortcutsDialog.tsx","kind":"import-statement","original":"./ShortcutsDialog"},{"path":"packages/plugins/plugin-help/src/components/Shortcuts/ShortcutsHints.tsx","kind":"import-statement","original":"./ShortcutsHints"},{"path":"packages/plugins/plugin-help/src/components/Shortcuts/ShortcutsList.tsx","kind":"import-statement","original":"./ShortcutsList"},{"path":"packages/plugins/plugin-help/src/components/Shortcuts/ShortcutsSection.tsx","kind":"import-statement","original":"./ShortcutsSection"},{"path":"packages/plugins/plugin-help/src/components/Shortcuts/Key.tsx","kind":"import-statement","original":"./Key"}],"format":"esm"},"packages/plugins/plugin-help/src/components/index.ts":{"bytes":718,"imports":[{"path":"packages/plugins/plugin-help/src/components/HelpContextProvider/index.ts","kind":"import-statement","original":"./HelpContextProvider"},{"path":"packages/plugins/plugin-help/src/components/Shortcuts/index.ts","kind":"import-statement","original":"./Shortcuts"},{"path":"packages/plugins/plugin-help/src/components/Tooltip/index.ts","kind":"import-statement","original":"./Tooltip"}],"format":"esm"},"packages/plugins/plugin-help/src/capabilities/app-graph-builder.ts":{"bytes":8331,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-help/src/capabilities/capabilities.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-help/src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"packages/plugins/plugin-help/src/meta.ts","kind":"import-statement","original":"../meta"},{"path":"packages/plugins/plugin-help/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-help/src/capabilities/react-context.tsx":{"bytes":3457,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-help/src/capabilities/capabilities.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-help/src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"packages/plugins/plugin-help/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-help/src/capabilities/react-surface.tsx":{"bytes":3469,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-help/src/components/index.ts","kind":"import-statement","original":"../components"},{"path":"packages/plugins/plugin-help/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-help/src/capabilities/state.ts":{"bytes":2564,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-help/src/capabilities/capabilities.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-help/src/meta.ts","kind":"import-statement","original":"../meta"}],"format":"esm"},"packages/plugins/plugin-help/src/capabilities/index.ts":{"bytes":1649,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-help/src/capabilities/capabilities.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-help/src/capabilities/app-graph-builder.ts","kind":"dynamic-import","original":"./app-graph-builder"},{"path":"packages/plugins/plugin-help/src/capabilities/react-context.tsx","kind":"dynamic-import","original":"./react-context"},{"path":"packages/plugins/plugin-help/src/capabilities/react-surface.tsx","kind":"dynamic-import","original":"./react-surface"},{"path":"packages/plugins/plugin-help/src/capabilities/state.ts","kind":"dynamic-import","original":"./state"}],"format":"esm"},"packages/plugins/plugin-help/src/translations.ts":{"bytes":1427,"imports":[{"path":"packages/plugins/plugin-help/src/meta.ts","kind":"import-statement","original":"./meta"}],"format":"esm"},"packages/plugins/plugin-help/src/HelpPlugin.tsx":{"bytes":6613,"imports":[{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-help/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-help/src/capabilities/capabilities.ts","kind":"import-statement","original":"./capabilities/capabilities"},{"path":"packages/plugins/plugin-help/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-help/src/translations.ts","kind":"import-statement","original":"./translations"},{"path":"packages/plugins/plugin-help/src/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/plugins/plugin-help/src/hooks/useHelp.tsx":{"bytes":1249,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-help/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/plugins/plugin-help/src/hooks/index.ts":{"bytes":505,"imports":[{"path":"packages/plugins/plugin-help/src/hooks/useHelp.tsx","kind":"import-statement","original":"./useHelp"}],"format":"esm"},"packages/plugins/plugin-help/src/index.ts":{"bytes":1029,"imports":[{"path":"packages/plugins/plugin-help/src/capabilities/index.ts","kind":"import-statement","original":"./capabilities"},{"path":"packages/plugins/plugin-help/src/components/index.ts","kind":"import-statement","original":"./components"},{"path":"packages/plugins/plugin-help/src/meta.ts","kind":"import-statement","original":"./meta"},{"path":"packages/plugins/plugin-help/src/HelpPlugin.tsx","kind":"import-statement","original":"./HelpPlugin"},{"path":"packages/plugins/plugin-help/src/hooks/index.ts","kind":"import-statement","original":"./hooks"},{"path":"packages/plugins/plugin-help/src/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"}},"outputs":{"packages/plugins/plugin-help/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":4990},"packages/plugins/plugin-help/dist/lib/browser/index.mjs":{"imports":[{"path":"packages/plugins/plugin-help/dist/lib/browser/chunk-VNAN5GRY.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-help/dist/lib/browser/chunk-24E4WRKH.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-help/dist/lib/browser/chunk-GJTAQWB6.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-help/dist/lib/browser/chunk-76XWX6N3.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"packages/plugins/plugin-help/dist/lib/browser/app-graph-builder-G3FCDRBG.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-help/dist/lib/browser/react-context-SIW6XKOC.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-help/dist/lib/browser/react-surface-TZZUXIVX.mjs","kind":"dynamic-import"},{"path":"packages/plugins/plugin-help/dist/lib/browser/state-SLKOTRHH.mjs","kind":"dynamic-import"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true}],"exports":["HELP_ACTION","HELP_PLUGIN","HelpAction","HelpCapabilities","HelpContext","HelpContextProvider","HelpPlugin","Key","SHORTCUTS_DIALOG","ShortcutsDialogContent","ShortcutsHints","ShortcutsList","ShortcutsSection","Tooltip","floaterProps","meta","useHelp"],"entryPoint":"packages/plugins/plugin-help/src/index.ts","inputs":{"packages/plugins/plugin-help/src/capabilities/index.ts":{"bytesInOutput":324},"packages/plugins/plugin-help/src/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-help/src/HelpPlugin.tsx":{"bytesInOutput":1215},"packages/plugins/plugin-help/src/translations.ts":{"bytesInOutput":266},"packages/plugins/plugin-help/src/hooks/useHelp.tsx":{"bytesInOutput":175},"packages/plugins/plugin-help/src/hooks/index.ts":{"bytesInOutput":0}},"bytes":2968},"packages/plugins/plugin-help/dist/lib/browser/meta.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-help/dist/lib/browser/meta.mjs":{"imports":[{"path":"packages/plugins/plugin-help/dist/lib/browser/chunk-76XWX6N3.mjs","kind":"import-statement"}],"exports":["HELP_PLUGIN","meta"],"entryPoint":"packages/plugins/plugin-help/src/meta.ts","inputs":{},"bytes":130},"packages/plugins/plugin-help/dist/lib/browser/types.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/plugins/plugin-help/dist/lib/browser/types.mjs":{"imports":[{"path":"packages/plugins/plugin-help/dist/lib/browser/chunk-24E4WRKH.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-help/dist/lib/browser/chunk-76XWX6N3.mjs","kind":"import-statement"}],"exports":["HELP_ACTION","HelpAction","HelpContext"],"entryPoint":"packages/plugins/plugin-help/src/types.ts","inputs":{},"bytes":204},"packages/plugins/plugin-help/dist/lib/browser/app-graph-builder-G3FCDRBG.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3801},"packages/plugins/plugin-help/dist/lib/browser/app-graph-builder-G3FCDRBG.mjs":{"imports":[{"path":"packages/plugins/plugin-help/dist/lib/browser/chunk-VNAN5GRY.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-help/dist/lib/browser/chunk-24E4WRKH.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-help/dist/lib/browser/chunk-GJTAQWB6.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-help/dist/lib/browser/chunk-76XWX6N3.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/app-graph","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-help/src/capabilities/app-graph-builder.ts","inputs":{"packages/plugins/plugin-help/src/capabilities/app-graph-builder.ts":{"bytesInOutput":1818}},"bytes":2221},"packages/plugins/plugin-help/dist/lib/browser/react-context-SIW6XKOC.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1718},"packages/plugins/plugin-help/dist/lib/browser/react-context-SIW6XKOC.mjs":{"imports":[{"path":"packages/plugins/plugin-help/dist/lib/browser/chunk-VNAN5GRY.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-help/dist/lib/browser/chunk-24E4WRKH.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-help/dist/lib/browser/chunk-GJTAQWB6.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-help/dist/lib/browser/chunk-76XWX6N3.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-help/src/capabilities/react-context.tsx","inputs":{"packages/plugins/plugin-help/src/capabilities/react-context.tsx":{"bytesInOutput":592}},"bytes":965},"packages/plugins/plugin-help/dist/lib/browser/react-surface-TZZUXIVX.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1677},"packages/plugins/plugin-help/dist/lib/browser/react-surface-TZZUXIVX.mjs":{"imports":[{"path":"packages/plugins/plugin-help/dist/lib/browser/chunk-VNAN5GRY.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-help/dist/lib/browser/chunk-24E4WRKH.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-help/dist/lib/browser/chunk-76XWX6N3.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-help/src/capabilities/react-surface.tsx","inputs":{"packages/plugins/plugin-help/src/capabilities/react-surface.tsx":{"bytesInOutput":722}},"bytes":1094},"packages/plugins/plugin-help/dist/lib/browser/chunk-VNAN5GRY.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":24280},"packages/plugins/plugin-help/dist/lib/browser/chunk-VNAN5GRY.mjs":{"imports":[{"path":"packages/plugins/plugin-help/dist/lib/browser/chunk-24E4WRKH.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-help/dist/lib/browser/chunk-76XWX6N3.mjs","kind":"import-statement"},{"path":"@fluentui/react-tabster","kind":"import-statement","external":true},{"path":"@phosphor-icons/react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react-joyride","kind":"import-statement","external":true},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/keyboard","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/keyboard","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/keyboard","kind":"import-statement","external":true},{"path":"@dxos/react-ui","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/react-ui-theme","kind":"import-statement","external":true}],"exports":["HelpContextProvider","Key","SHORTCUTS_DIALOG","ShortcutsDialogContent","ShortcutsHints","ShortcutsList","ShortcutsSection","Tooltip","floaterProps"],"inputs":{"packages/plugins/plugin-help/src/components/Tooltip/Tooltip.tsx":{"bytesInOutput":3180},"packages/plugins/plugin-help/src/components/HelpContextProvider/HelpContextProvider.tsx":{"bytesInOutput":3987},"packages/plugins/plugin-help/src/components/Tooltip/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-help/src/components/Shortcuts/Key.tsx":{"bytesInOutput":394},"packages/plugins/plugin-help/src/components/Shortcuts/styles.ts":{"bytesInOutput":202},"packages/plugins/plugin-help/src/components/Shortcuts/ShortcutsList.tsx":{"bytesInOutput":995},"packages/plugins/plugin-help/src/components/Shortcuts/ShortcutsDialog.tsx":{"bytesInOutput":1116},"packages/plugins/plugin-help/src/components/Shortcuts/ShortcutsHints.tsx":{"bytesInOutput":1367},"packages/plugins/plugin-help/src/components/Shortcuts/ShortcutsSection.tsx":{"bytesInOutput":273},"packages/plugins/plugin-help/src/components/HelpContextProvider/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-help/src/components/index.ts":{"bytesInOutput":0},"packages/plugins/plugin-help/src/components/Shortcuts/index.ts":{"bytesInOutput":0}},"bytes":12506},"packages/plugins/plugin-help/dist/lib/browser/chunk-24E4WRKH.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1722},"packages/plugins/plugin-help/dist/lib/browser/chunk-24E4WRKH.mjs":{"imports":[{"path":"packages/plugins/plugin-help/dist/lib/browser/chunk-76XWX6N3.mjs","kind":"import-statement"},{"path":"react","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["HELP_ACTION","HelpAction","HelpContext"],"inputs":{"packages/plugins/plugin-help/src/types.ts":{"bytesInOutput":502}},"bytes":702},"packages/plugins/plugin-help/dist/lib/browser/state-SLKOTRHH.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":1281},"packages/plugins/plugin-help/dist/lib/browser/state-SLKOTRHH.mjs":{"imports":[{"path":"packages/plugins/plugin-help/dist/lib/browser/chunk-GJTAQWB6.mjs","kind":"import-statement"},{"path":"packages/plugins/plugin-help/dist/lib/browser/chunk-76XWX6N3.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true},{"path":"@dxos/local-storage","kind":"import-statement","external":true}],"exports":["default"],"entryPoint":"packages/plugins/plugin-help/src/capabilities/state.ts","inputs":{"packages/plugins/plugin-help/src/capabilities/state.ts":{"bytesInOutput":470}},"bytes":725},"packages/plugins/plugin-help/dist/lib/browser/chunk-GJTAQWB6.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":843},"packages/plugins/plugin-help/dist/lib/browser/chunk-GJTAQWB6.mjs":{"imports":[{"path":"packages/plugins/plugin-help/dist/lib/browser/chunk-76XWX6N3.mjs","kind":"import-statement"},{"path":"@dxos/app-framework","kind":"import-statement","external":true}],"exports":["HelpCapabilities"],"inputs":{"packages/plugins/plugin-help/src/capabilities/capabilities.ts":{"bytesInOutput":327}},"bytes":523},"packages/plugins/plugin-help/dist/lib/browser/chunk-76XWX6N3.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":537},"packages/plugins/plugin-help/dist/lib/browser/chunk-76XWX6N3.mjs":{"imports":[],"exports":["HELP_PLUGIN","meta"],"inputs":{"packages/plugins/plugin-help/src/meta.ts":{"bytesInOutput":121}},"bytes":244}}}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {
|
|
2
|
+
HelpContextProvider
|
|
3
|
+
} from "./chunk-VNAN5GRY.mjs";
|
|
4
|
+
import "./chunk-24E4WRKH.mjs";
|
|
5
|
+
import {
|
|
6
|
+
HelpCapabilities
|
|
7
|
+
} from "./chunk-GJTAQWB6.mjs";
|
|
8
|
+
import {
|
|
9
|
+
HELP_PLUGIN
|
|
10
|
+
} from "./chunk-76XWX6N3.mjs";
|
|
11
|
+
|
|
12
|
+
// packages/plugins/plugin-help/src/capabilities/react-context.tsx
|
|
13
|
+
import React from "react";
|
|
14
|
+
import { Capabilities, contributes, useCapability } from "@dxos/app-framework";
|
|
15
|
+
var react_context_default = (steps) => contributes(Capabilities.ReactContext, {
|
|
16
|
+
id: HELP_PLUGIN,
|
|
17
|
+
context: ({ children }) => {
|
|
18
|
+
const state = useCapability(HelpCapabilities.MutableState);
|
|
19
|
+
return /* @__PURE__ */ React.createElement(HelpContextProvider, {
|
|
20
|
+
steps,
|
|
21
|
+
running: state.running,
|
|
22
|
+
onRunningChanged: (newState) => {
|
|
23
|
+
state.running = newState;
|
|
24
|
+
if (!newState) {
|
|
25
|
+
state.showHints = false;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}, children);
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
export {
|
|
32
|
+
react_context_default as default
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=react-context-SIW6XKOC.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/react-context.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Capabilities, contributes, useCapability } from '@dxos/app-framework';\n\nimport { HelpCapabilities } from './capabilities';\nimport { HelpContextProvider } from '../components';\nimport { HELP_PLUGIN } from '../meta';\nimport { type Step } from '../types';\n\nexport default (steps: Step[]) =>\n contributes(Capabilities.ReactContext, {\n id: HELP_PLUGIN,\n context: ({ children }) => {\n const state = useCapability(HelpCapabilities.MutableState);\n return (\n <HelpContextProvider\n steps={steps}\n running={state.running}\n onRunningChanged={(newState) => {\n state.running = newState;\n if (!newState) {\n state.showHints = false;\n }\n }}\n >\n {children}\n </HelpContextProvider>\n );\n },\n });\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;AAIA,OAAOA,WAAW;AAElB,SAASC,cAAcC,aAAaC,qBAAqB;AAOzD,IAAA,wBAAe,CAACC,UACdC,YAAYC,aAAaC,cAAc;EACrCC,IAAIC;EACJC,SAAS,CAAC,EAAEC,SAAQ,MAAE;AACpB,UAAMC,QAAQC,cAAcC,iBAAiBC,YAAY;AACzD,WACE,sBAAA,cAACC,qBAAAA;MACCZ;MACAa,SAASL,MAAMK;MACfC,kBAAkB,CAACC,aAAAA;AACjBP,cAAMK,UAAUE;AAChB,YAAI,CAACA,UAAU;AACbP,gBAAMQ,YAAY;QACpB;MACF;OAECT,QAAAA;EAGP;AACF,CAAA;",
|
|
6
|
+
"names": ["React", "Capabilities", "contributes", "useCapability", "steps", "contributes", "Capabilities", "ReactContext", "id", "HELP_PLUGIN", "context", "children", "state", "useCapability", "HelpCapabilities", "MutableState", "HelpContextProvider", "running", "onRunningChanged", "newState", "showHints"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SHORTCUTS_DIALOG,
|
|
3
|
+
ShortcutsDialogContent,
|
|
4
|
+
ShortcutsHints,
|
|
5
|
+
ShortcutsList
|
|
6
|
+
} from "./chunk-VNAN5GRY.mjs";
|
|
7
|
+
import "./chunk-24E4WRKH.mjs";
|
|
8
|
+
import {
|
|
9
|
+
HELP_PLUGIN
|
|
10
|
+
} from "./chunk-76XWX6N3.mjs";
|
|
11
|
+
|
|
12
|
+
// packages/plugins/plugin-help/src/capabilities/react-surface.tsx
|
|
13
|
+
import React from "react";
|
|
14
|
+
import { Capabilities, contributes, createSurface } from "@dxos/app-framework";
|
|
15
|
+
var react_surface_default = () => contributes(Capabilities.ReactSurface, [
|
|
16
|
+
createSurface({
|
|
17
|
+
id: `${HELP_PLUGIN}/hints`,
|
|
18
|
+
role: "hints",
|
|
19
|
+
component: () => /* @__PURE__ */ React.createElement(ShortcutsHints, null)
|
|
20
|
+
}),
|
|
21
|
+
createSurface({
|
|
22
|
+
id: `${HELP_PLUGIN}/keyshortcuts`,
|
|
23
|
+
role: "keyshortcuts",
|
|
24
|
+
component: () => /* @__PURE__ */ React.createElement(ShortcutsList, null)
|
|
25
|
+
}),
|
|
26
|
+
createSurface({
|
|
27
|
+
id: SHORTCUTS_DIALOG,
|
|
28
|
+
role: "dialog",
|
|
29
|
+
filter: (data) => data.component === SHORTCUTS_DIALOG,
|
|
30
|
+
component: () => /* @__PURE__ */ React.createElement(ShortcutsDialogContent, null)
|
|
31
|
+
})
|
|
32
|
+
]);
|
|
33
|
+
export {
|
|
34
|
+
react_surface_default as default
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=react-surface-TZZUXIVX.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/react-surface.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Capabilities, contributes, createSurface } from '@dxos/app-framework';\n\nimport { SHORTCUTS_DIALOG, ShortcutsDialogContent, ShortcutsHints, ShortcutsList } from '../components';\nimport { HELP_PLUGIN } from '../meta';\n\nexport default () =>\n contributes(Capabilities.ReactSurface, [\n createSurface({\n id: `${HELP_PLUGIN}/hints`,\n role: 'hints',\n component: () => <ShortcutsHints />,\n }),\n createSurface({\n id: `${HELP_PLUGIN}/keyshortcuts`,\n role: 'keyshortcuts',\n component: () => <ShortcutsList />,\n }),\n createSurface({\n id: SHORTCUTS_DIALOG,\n role: 'dialog',\n filter: (data): data is any => data.component === SHORTCUTS_DIALOG,\n component: () => <ShortcutsDialogContent />,\n }),\n ]);\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;AAIA,OAAOA,WAAW;AAElB,SAASC,cAAcC,aAAaC,qBAAqB;AAKzD,IAAA,wBAAe,MACbC,YAAYC,aAAaC,cAAc;EACrCC,cAAc;IACZC,IAAI,GAAGC,WAAAA;IACPC,MAAM;IACNC,WAAW,MAAM,sBAAA,cAACC,gBAAAA,IAAAA;EACpB,CAAA;EACAL,cAAc;IACZC,IAAI,GAAGC,WAAAA;IACPC,MAAM;IACNC,WAAW,MAAM,sBAAA,cAACE,eAAAA,IAAAA;EACpB,CAAA;EACAN,cAAc;IACZC,IAAIM;IACJJ,MAAM;IACNK,QAAQ,CAACC,SAAsBA,KAAKL,cAAcG;IAClDH,WAAW,MAAM,sBAAA,cAACM,wBAAAA,IAAAA;EACpB,CAAA;CACD;",
|
|
6
|
+
"names": ["React", "Capabilities", "contributes", "createSurface", "contributes", "Capabilities", "ReactSurface", "createSurface", "id", "HELP_PLUGIN", "role", "component", "ShortcutsHints", "ShortcutsList", "SHORTCUTS_DIALOG", "filter", "data", "ShortcutsDialogContent"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import {
|
|
2
|
+
HelpCapabilities
|
|
3
|
+
} from "./chunk-GJTAQWB6.mjs";
|
|
4
|
+
import {
|
|
5
|
+
HELP_PLUGIN
|
|
6
|
+
} from "./chunk-76XWX6N3.mjs";
|
|
7
|
+
|
|
8
|
+
// packages/plugins/plugin-help/src/capabilities/state.ts
|
|
9
|
+
import { contributes } from "@dxos/app-framework";
|
|
10
|
+
import { LocalStorageStore } from "@dxos/local-storage";
|
|
11
|
+
var state_default = () => {
|
|
12
|
+
const state = new LocalStorageStore(HELP_PLUGIN, {
|
|
13
|
+
running: false,
|
|
14
|
+
showHints: true,
|
|
15
|
+
showWelcome: true
|
|
16
|
+
});
|
|
17
|
+
state.prop({
|
|
18
|
+
key: "showHints",
|
|
19
|
+
type: LocalStorageStore.bool()
|
|
20
|
+
}).prop({
|
|
21
|
+
key: "showWelcome",
|
|
22
|
+
type: LocalStorageStore.bool()
|
|
23
|
+
});
|
|
24
|
+
return contributes(HelpCapabilities.State, state.values);
|
|
25
|
+
};
|
|
26
|
+
export {
|
|
27
|
+
state_default as default
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=state-SLKOTRHH.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/state.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { contributes } from '@dxos/app-framework';\nimport { LocalStorageStore } from '@dxos/local-storage';\n\nimport { HelpCapabilities } from './capabilities';\nimport { HELP_PLUGIN } from '../meta';\n\nexport default () => {\n const state = new LocalStorageStore<HelpCapabilities.State>(HELP_PLUGIN, {\n running: false,\n showHints: true,\n showWelcome: true,\n });\n\n state\n .prop({ key: 'showHints', type: LocalStorageStore.bool() })\n .prop({ key: 'showWelcome', type: LocalStorageStore.bool() });\n\n return contributes(HelpCapabilities.State, state.values);\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;AAIA,SAASA,mBAAmB;AAC5B,SAASC,yBAAyB;AAKlC,IAAA,gBAAe,MAAA;AACb,QAAMC,QAAQ,IAAIC,kBAA0CC,aAAa;IACvEC,SAAS;IACTC,WAAW;IACXC,aAAa;EACf,CAAA;AAEAL,QACGM,KAAK;IAAEC,KAAK;IAAaC,MAAMP,kBAAkBQ,KAAI;EAAG,CAAA,EACxDH,KAAK;IAAEC,KAAK;IAAeC,MAAMP,kBAAkBQ,KAAI;EAAG,CAAA;AAE7D,SAAOC,YAAYC,iBAAiBC,OAAOZ,MAAMa,MAAM;AACzD;",
|
|
6
|
+
"names": ["contributes", "LocalStorageStore", "state", "LocalStorageStore", "HELP_PLUGIN", "running", "showHints", "showWelcome", "prop", "key", "type", "bool", "contributes", "HelpCapabilities", "State", "values"]
|
|
7
|
+
}
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
import { type Step, type HelpPluginProvides } from './types';
|
|
3
|
-
export type HelpSettingsProps = {
|
|
4
|
-
showHints?: boolean;
|
|
5
|
-
showWelcome?: boolean;
|
|
6
|
-
};
|
|
1
|
+
import { type Step } from './types';
|
|
7
2
|
export type HelpPluginOptions = {
|
|
8
3
|
steps?: Step[];
|
|
9
4
|
};
|
|
10
|
-
export declare const HelpPlugin: ({ steps }: HelpPluginOptions) =>
|
|
5
|
+
export declare const HelpPlugin: ({ steps }: HelpPluginOptions) => import("@dxos/app-framework").Plugin;
|
|
11
6
|
//# sourceMappingURL=HelpPlugin.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HelpPlugin.d.ts","sourceRoot":"","sources":["../../../src/HelpPlugin.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"HelpPlugin.d.ts","sourceRoot":"","sources":["../../../src/HelpPlugin.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,IAAI,EAAc,MAAM,SAAS,CAAC;AAEhD,MAAM,MAAM,iBAAiB,GAAG;IAAE,KAAK,CAAC,EAAE,IAAI,EAAE,CAAA;CAAE,CAAC;AAEnD,eAAO,MAAM,UAAU,cAAoB,iBAAiB,yCAuCxD,CAAC"}
|