@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
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SHORTCUTS_DIALOG
|
|
3
|
+
} from "./chunk-VNAN5GRY.mjs";
|
|
4
|
+
import {
|
|
5
|
+
HelpAction
|
|
6
|
+
} from "./chunk-24E4WRKH.mjs";
|
|
7
|
+
import {
|
|
8
|
+
HelpCapabilities
|
|
9
|
+
} from "./chunk-GJTAQWB6.mjs";
|
|
10
|
+
import {
|
|
11
|
+
HELP_PLUGIN
|
|
12
|
+
} from "./chunk-76XWX6N3.mjs";
|
|
13
|
+
|
|
14
|
+
// packages/plugins/plugin-help/src/capabilities/app-graph-builder.ts
|
|
15
|
+
import { Capabilities, contributes, createIntent, LayoutAction } from "@dxos/app-framework";
|
|
16
|
+
import { createExtension } from "@dxos/app-graph";
|
|
17
|
+
var app_graph_builder_default = (context) => contributes(Capabilities.AppGraphBuilder, createExtension({
|
|
18
|
+
id: HELP_PLUGIN,
|
|
19
|
+
filter: (node) => node.id === "root",
|
|
20
|
+
actions: () => [
|
|
21
|
+
{
|
|
22
|
+
id: HelpAction.Start._tag,
|
|
23
|
+
data: async () => {
|
|
24
|
+
const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);
|
|
25
|
+
const state = context.requestCapability(HelpCapabilities.MutableState);
|
|
26
|
+
state.showHints = true;
|
|
27
|
+
await dispatch(createIntent(HelpAction.Start));
|
|
28
|
+
},
|
|
29
|
+
properties: {
|
|
30
|
+
label: [
|
|
31
|
+
"open help tour",
|
|
32
|
+
{
|
|
33
|
+
ns: HELP_PLUGIN
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
icon: "ph--info--regular",
|
|
37
|
+
keyBinding: {
|
|
38
|
+
macos: "shift+meta+/",
|
|
39
|
+
// TODO(wittjosiah): Test on windows to see if it behaves the same as linux.
|
|
40
|
+
windows: "shift+ctrl+/",
|
|
41
|
+
linux: "shift+ctrl+?"
|
|
42
|
+
},
|
|
43
|
+
testId: "helpPlugin.openHelp"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
id: "dxos.org/plugin/help/open-shortcuts",
|
|
48
|
+
data: async () => {
|
|
49
|
+
const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);
|
|
50
|
+
const state = context.requestCapability(HelpCapabilities.MutableState);
|
|
51
|
+
state.showHints = true;
|
|
52
|
+
await dispatch?.(createIntent(LayoutAction.SetLayout, {
|
|
53
|
+
element: "dialog",
|
|
54
|
+
component: SHORTCUTS_DIALOG
|
|
55
|
+
}));
|
|
56
|
+
},
|
|
57
|
+
properties: {
|
|
58
|
+
label: [
|
|
59
|
+
"open shortcuts label",
|
|
60
|
+
{
|
|
61
|
+
ns: HELP_PLUGIN
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
icon: "ph--keyboard--regular",
|
|
65
|
+
keyBinding: {
|
|
66
|
+
macos: "meta+ctrl+/"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
}));
|
|
72
|
+
export {
|
|
73
|
+
app_graph_builder_default as default
|
|
74
|
+
};
|
|
75
|
+
//# sourceMappingURL=app-graph-builder-G3FCDRBG.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/app-graph-builder.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capabilities, contributes, createIntent, LayoutAction, type PluginsContext } from '@dxos/app-framework';\nimport { createExtension, type Node } from '@dxos/app-graph';\n\nimport { HelpCapabilities } from './capabilities';\nimport { SHORTCUTS_DIALOG } from '../components';\nimport { HELP_PLUGIN } from '../meta';\nimport { HelpAction } from '../types';\n\nexport default (context: PluginsContext) =>\n contributes(\n Capabilities.AppGraphBuilder,\n 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 const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);\n const state = context.requestCapability(HelpCapabilities.MutableState);\n state.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 const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);\n const state = context.requestCapability(HelpCapabilities.MutableState);\n state.showHints = true;\n await dispatch?.(createIntent(LayoutAction.SetLayout, { element: 'dialog', component: SHORTCUTS_DIALOG }));\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"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;AAIA,SAASA,cAAcC,aAAaC,cAAcC,oBAAyC;AAC3F,SAASC,uBAAkC;AAO3C,IAAA,4BAAe,CAACC,YACdC,YACEC,aAAaC,iBACbC,gBAAgB;EACdC,IAAIC;EACJC,QAAQ,CAACC,SAA6BA,KAAKH,OAAO;EAClDI,SAAS,MAAM;IACb;MACEJ,IAAIK,WAAWC,MAAMC;MACrBC,MAAM,YAAA;AACJ,cAAM,EAAEC,iBAAiBC,SAAQ,IAAKf,QAAQgB,kBAAkBd,aAAae,gBAAgB;AAC7F,cAAMC,QAAQlB,QAAQgB,kBAAkBG,iBAAiBC,YAAY;AACrEF,cAAMG,YAAY;AAClB,cAAMN,SAASO,aAAaZ,WAAWC,KAAK,CAAA;MAC9C;MACAY,YAAY;QACVC,OAAO;UAAC;UAAkB;YAAEC,IAAInB;UAAY;;QAC5CoB,MAAM;QACNC,YAAY;UACVC,OAAO;;UAEPC,SAAS;UACTC,OAAO;QACT;QACAC,QAAQ;MACV;IACF;IACA;MACE1B,IAAI;MACJQ,MAAM,YAAA;AACJ,cAAM,EAAEC,iBAAiBC,SAAQ,IAAKf,QAAQgB,kBAAkBd,aAAae,gBAAgB;AAC7F,cAAMC,QAAQlB,QAAQgB,kBAAkBG,iBAAiBC,YAAY;AACrEF,cAAMG,YAAY;AAClB,cAAMN,WAAWO,aAAaU,aAAaC,WAAW;UAAEC,SAAS;UAAUC,WAAWC;QAAiB,CAAA,CAAA;MACzG;MACAb,YAAY;QACVC,OAAO;UAAC;UAAwB;YAAEC,IAAInB;UAAY;;QAClDoB,MAAM;QACNC,YAAY;UACVC,OAAO;QACT;MACF;IACF;;AAEJ,CAAA,CAAA;",
|
|
6
|
+
"names": ["Capabilities", "contributes", "createIntent", "LayoutAction", "createExtension", "context", "contributes", "Capabilities", "AppGraphBuilder", "createExtension", "id", "HELP_PLUGIN", "filter", "node", "actions", "HelpAction", "Start", "_tag", "data", "dispatchPromise", "dispatch", "requestCapability", "IntentDispatcher", "state", "HelpCapabilities", "MutableState", "showHints", "createIntent", "properties", "label", "ns", "icon", "keyBinding", "macos", "windows", "linux", "testId", "LayoutAction", "SetLayout", "element", "component", "SHORTCUTS_DIALOG"]
|
|
7
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
HELP_PLUGIN
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-76XWX6N3.mjs";
|
|
4
4
|
|
|
5
5
|
// packages/plugins/plugin-help/src/types.ts
|
|
6
6
|
import { createContext } from "react";
|
|
@@ -33,4 +33,4 @@ export {
|
|
|
33
33
|
HELP_ACTION,
|
|
34
34
|
HelpAction
|
|
35
35
|
};
|
|
36
|
-
//# sourceMappingURL=chunk-
|
|
36
|
+
//# sourceMappingURL=chunk-24E4WRKH.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/types.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Context, createContext } from 'react';\nimport { type Step as BaseStep } from 'react-joyride';\n\nimport { type PluginsContext } from '@dxos/app-framework';\nimport { S } from '@dxos/echo-schema';\n\nimport { HELP_PLUGIN } from './meta';\n\nexport type Step = BaseStep & {\n before?: (context: PluginsContext) => 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 const HELP_ACTION = `${HELP_PLUGIN}/action`;\nexport namespace HelpAction {\n export class Start extends S.TaggedClass<Start>()(`${HELP_ACTION}/start`, {\n input: S.Void,\n output: S.Void,\n }) {}\n}\n"],
|
|
5
|
+
"mappings": ";;;;;AAIA,SAAuBA,qBAAqB;AAI5C,SAASC,SAAS;AAiBX,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;AAEO,IAAMC,cAAc,GAAGC,WAAAA;;UACbC,aAAAA;EACR,MAAMC,cAAcC,EAAEC,YAAW,EAAU,GAAGL,WAAAA,UAAqB;IACxEM,OAAOF,EAAEG;IACTC,QAAQJ,EAAEG;EACZ,CAAA,EAAA;EAAI;cAHSJ,QAAAA;AAIf,GALiBD,eAAAA,aAAAA,CAAAA,EAAAA;",
|
|
6
|
+
"names": ["createContext", "S", "HelpContext", "createContext", "running", "steps", "setSteps", "setIndex", "start", "stop", "HELP_ACTION", "HELP_PLUGIN", "HelpAction", "Start", "S", "TaggedClass", "input", "Void", "output"]
|
|
7
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// packages/plugins/plugin-help/src/meta.ts
|
|
2
2
|
var HELP_PLUGIN = "dxos.org/plugin/help";
|
|
3
|
-
var
|
|
3
|
+
var meta = {
|
|
4
4
|
id: HELP_PLUGIN,
|
|
5
5
|
name: "Help",
|
|
6
6
|
icon: "ph--info--regular"
|
|
@@ -8,6 +8,6 @@ var meta_default = {
|
|
|
8
8
|
|
|
9
9
|
export {
|
|
10
10
|
HELP_PLUGIN,
|
|
11
|
-
|
|
11
|
+
meta
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=chunk-
|
|
13
|
+
//# sourceMappingURL=chunk-76XWX6N3.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/meta.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\n\n// TODO(burdon): Rename Guide? Help?\nexport const HELP_PLUGIN = 'dxos.org/plugin/help';\n\nexport const meta = {\n id: HELP_PLUGIN,\n name: 'Help',\n icon: 'ph--info--regular',\n} satisfies PluginMeta;\n"],
|
|
5
|
+
"mappings": ";AAOO,IAAMA,cAAc;AAEpB,IAAMC,OAAO;EAClBC,IAAIF;EACJG,MAAM;EACNC,MAAM;AACR;",
|
|
6
|
+
"names": ["HELP_PLUGIN", "meta", "id", "name", "icon"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import {
|
|
2
|
+
HELP_PLUGIN
|
|
3
|
+
} from "./chunk-76XWX6N3.mjs";
|
|
4
|
+
|
|
5
|
+
// packages/plugins/plugin-help/src/capabilities/capabilities.ts
|
|
6
|
+
import { defineCapability } from "@dxos/app-framework";
|
|
7
|
+
var HelpCapabilities;
|
|
8
|
+
(function(HelpCapabilities2) {
|
|
9
|
+
HelpCapabilities2.State = defineCapability(`${HELP_PLUGIN}/capability/state`);
|
|
10
|
+
HelpCapabilities2.MutableState = defineCapability(`${HELP_PLUGIN}/capability/state`);
|
|
11
|
+
})(HelpCapabilities || (HelpCapabilities = {}));
|
|
12
|
+
|
|
13
|
+
export {
|
|
14
|
+
HelpCapabilities
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=chunk-GJTAQWB6.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/capabilities.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { defineCapability } from '@dxos/app-framework';\n\nimport { HELP_PLUGIN } from '../meta';\n\nexport namespace HelpCapabilities {\n export type State = { running: boolean; showHints: boolean; showWelcome: boolean };\n export const State = defineCapability<Readonly<State>>(`${HELP_PLUGIN}/capability/state`);\n export const MutableState = defineCapability<State>(`${HELP_PLUGIN}/capability/state`);\n}\n"],
|
|
5
|
+
"mappings": ";;;;;AAIA,SAASA,wBAAwB;;UAIhBC,mBAAAA;oBAEFC,QAAQC,iBAAkC,GAAGC,WAAAA,mBAA8B;oBAC3EC,eAAeF,iBAAwB,GAAGC,WAAAA,mBAA8B;AACvF,GAJiBH,qBAAAA,mBAAAA,CAAAA,EAAAA;",
|
|
6
|
+
"names": ["defineCapability", "HelpCapabilities", "State", "defineCapability", "HELP_PLUGIN", "MutableState"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
import {
|
|
2
|
+
HelpContext
|
|
3
|
+
} from "./chunk-24E4WRKH.mjs";
|
|
4
|
+
import {
|
|
5
|
+
HELP_PLUGIN
|
|
6
|
+
} from "./chunk-76XWX6N3.mjs";
|
|
7
|
+
|
|
8
|
+
// packages/plugins/plugin-help/src/components/Tooltip/Tooltip.tsx
|
|
9
|
+
import { useArrowNavigationGroup, useFocusableGroup } from "@fluentui/react-tabster";
|
|
10
|
+
import { CaretLeft, CaretRight, Circle, X } from "@phosphor-icons/react";
|
|
11
|
+
import React, { forwardRef } from "react";
|
|
12
|
+
import { Button } from "@dxos/react-ui";
|
|
13
|
+
import { getSize, mx } from "@dxos/react-ui-theme";
|
|
14
|
+
var floaterProps = {
|
|
15
|
+
styles: {
|
|
16
|
+
// Arrow color is set by joyride.
|
|
17
|
+
arrow: {
|
|
18
|
+
length: 8,
|
|
19
|
+
spread: 16
|
|
20
|
+
},
|
|
21
|
+
floater: {
|
|
22
|
+
// TODO(burdon): Get tokens from theme.
|
|
23
|
+
filter: "drop-shadow(0 0 0.75rem rgba(0, 0, 0, 0.2))"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
var Tooltip = /* @__PURE__ */ forwardRef(({ step: { title, content }, index, size, isLastStep, backProps, closeProps, primaryProps }, forwardedRef) => {
|
|
28
|
+
const arrowGroup = useArrowNavigationGroup({
|
|
29
|
+
axis: "horizontal"
|
|
30
|
+
});
|
|
31
|
+
const trapFocus = useFocusableGroup({
|
|
32
|
+
tabBehavior: "limited-trap-focus"
|
|
33
|
+
});
|
|
34
|
+
return /* @__PURE__ */ React.createElement("div", {
|
|
35
|
+
className: "flex flex-col is-[15rem] min-bs-[10rem] overflow-hidden rounded-md shadow-xl bg-accentSurface text-inverse",
|
|
36
|
+
role: "tooltip",
|
|
37
|
+
"data-testid": "helpPlugin.tooltip",
|
|
38
|
+
"data-step": index + 1,
|
|
39
|
+
...trapFocus,
|
|
40
|
+
ref: forwardedRef
|
|
41
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
42
|
+
className: "flex p-2"
|
|
43
|
+
}, /* @__PURE__ */ React.createElement("h2", {
|
|
44
|
+
className: "grow pli-2 plb-1 text-lg font-medium text-inverse"
|
|
45
|
+
}, title), /* @__PURE__ */ React.createElement(Button, {
|
|
46
|
+
density: "fine",
|
|
47
|
+
variant: "primary",
|
|
48
|
+
onClick: closeProps.onClick,
|
|
49
|
+
title: closeProps["aria-label"],
|
|
50
|
+
"data-testid": "helpPlugin.tooltip.close"
|
|
51
|
+
}, /* @__PURE__ */ React.createElement(X, {
|
|
52
|
+
weight: "bold",
|
|
53
|
+
className: getSize(4)
|
|
54
|
+
}))), /* @__PURE__ */ React.createElement("div", {
|
|
55
|
+
className: "flex grow pli-4 mlb-2"
|
|
56
|
+
}, content), /* @__PURE__ */ React.createElement("div", {
|
|
57
|
+
className: "flex p-2 items-center justify-between",
|
|
58
|
+
...arrowGroup
|
|
59
|
+
}, /* @__PURE__ */ React.createElement(Button, {
|
|
60
|
+
variant: "primary",
|
|
61
|
+
onClick: backProps.onClick,
|
|
62
|
+
title: backProps["aria-label"],
|
|
63
|
+
classNames: [
|
|
64
|
+
!(index > 0 && backProps) && "invisible"
|
|
65
|
+
],
|
|
66
|
+
"data-testid": "helpPlugin.tooltip.back"
|
|
67
|
+
}, /* @__PURE__ */ React.createElement(CaretLeft, {
|
|
68
|
+
className: getSize(5)
|
|
69
|
+
})), /* @__PURE__ */ React.createElement("div", {
|
|
70
|
+
className: "flex grow gap-2 justify-center"
|
|
71
|
+
}, /* @__PURE__ */ React.createElement("div", {
|
|
72
|
+
className: "flex"
|
|
73
|
+
}, Array.from({
|
|
74
|
+
length: size
|
|
75
|
+
}).map((_, i) => /* @__PURE__ */ React.createElement(Circle, {
|
|
76
|
+
key: i,
|
|
77
|
+
weight: index === i ? "fill" : "regular",
|
|
78
|
+
className: mx(getSize(2), "mli-1 cursor-pointer")
|
|
79
|
+
})))), isLastStep ? /* @__PURE__ */ React.createElement(Button, {
|
|
80
|
+
variant: "primary",
|
|
81
|
+
onClick: closeProps.onClick,
|
|
82
|
+
title: closeProps["aria-label"],
|
|
83
|
+
autoFocus: true,
|
|
84
|
+
"data-testid": "helpPlugin.tooltip.finish"
|
|
85
|
+
}, "Done") : /* @__PURE__ */ React.createElement(Button, {
|
|
86
|
+
variant: "primary",
|
|
87
|
+
onClick: primaryProps.onClick,
|
|
88
|
+
title: primaryProps["aria-label"],
|
|
89
|
+
autoFocus: true,
|
|
90
|
+
"data-testid": "helpPlugin.tooltip.next"
|
|
91
|
+
}, /* @__PURE__ */ React.createElement(CaretRight, {
|
|
92
|
+
className: getSize(6)
|
|
93
|
+
}))));
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
// packages/plugins/plugin-help/src/components/HelpContextProvider/HelpContextProvider.tsx
|
|
97
|
+
import React2, { useState, useEffect } from "react";
|
|
98
|
+
import Joyride, { ACTIONS, EVENTS } from "react-joyride";
|
|
99
|
+
import { usePluginManager, useCapability, Capabilities } from "@dxos/app-framework";
|
|
100
|
+
var addStepClass = (target) => {
|
|
101
|
+
const element = typeof target === "string" ? document.querySelector(target) : target;
|
|
102
|
+
if (element) {
|
|
103
|
+
element.classList.add("joyride-target");
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
var removeTargetClass = (target) => {
|
|
107
|
+
const element = typeof target === "string" ? document.querySelector(target) : target;
|
|
108
|
+
if (element) {
|
|
109
|
+
element.classList.remove("joyride-target");
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
var getTarget = (step) => {
|
|
113
|
+
return typeof step.target === "string" ? document.querySelector(step.target) : step.target;
|
|
114
|
+
};
|
|
115
|
+
var waitForTarget = async (step) => {
|
|
116
|
+
if (typeof step.target === "string") {
|
|
117
|
+
const target = step.target;
|
|
118
|
+
const element = document.querySelector(target);
|
|
119
|
+
if (element) {
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
await new Promise((resolve) => {
|
|
123
|
+
const observer = new MutationObserver((mutations) => {
|
|
124
|
+
mutations.forEach((mutation) => {
|
|
125
|
+
if (mutation.addedNodes.length > 0) {
|
|
126
|
+
const element2 = document.querySelector(target);
|
|
127
|
+
if (element2) {
|
|
128
|
+
observer.disconnect();
|
|
129
|
+
resolve();
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
observer.observe(document.body, {
|
|
135
|
+
childList: true,
|
|
136
|
+
subtree: true
|
|
137
|
+
});
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
var HelpContextProvider = ({ children, steps: initialSteps, running: runningProp, onRunningChanged }) => {
|
|
142
|
+
const manager = usePluginManager();
|
|
143
|
+
const layout = useCapability(Capabilities.Layout);
|
|
144
|
+
const [running, setRunning] = useState(!!runningProp && !!getTarget(initialSteps[0]));
|
|
145
|
+
const [stepIndex, _setStepIndex] = useState(0);
|
|
146
|
+
const [steps, setSteps] = useState(initialSteps);
|
|
147
|
+
const paused = layout.dialogOpen;
|
|
148
|
+
const setStepIndex = (index) => {
|
|
149
|
+
if (runningProp) {
|
|
150
|
+
const step = steps[index];
|
|
151
|
+
step?.before?.(manager.context);
|
|
152
|
+
}
|
|
153
|
+
_setStepIndex(index);
|
|
154
|
+
};
|
|
155
|
+
const setRunningChanged = (state) => {
|
|
156
|
+
if (typeof runningProp !== "undefined") {
|
|
157
|
+
onRunningChanged?.(state);
|
|
158
|
+
} else {
|
|
159
|
+
if (state) {
|
|
160
|
+
setStepIndex(0);
|
|
161
|
+
setRunning(true);
|
|
162
|
+
} else {
|
|
163
|
+
setRunning(false);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
useEffect(() => {
|
|
168
|
+
const timeout = setTimeout(async () => {
|
|
169
|
+
if (runningProp) {
|
|
170
|
+
await waitForTarget(steps[stepIndex]);
|
|
171
|
+
setStepIndex(0);
|
|
172
|
+
setRunning(true);
|
|
173
|
+
} else if (typeof runningProp !== "undefined") {
|
|
174
|
+
setRunning(false);
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
return () => clearTimeout(timeout);
|
|
178
|
+
}, [
|
|
179
|
+
runningProp
|
|
180
|
+
]);
|
|
181
|
+
const callback = async (options) => {
|
|
182
|
+
const { type, action, index, size } = options;
|
|
183
|
+
switch (type) {
|
|
184
|
+
case EVENTS.STEP_BEFORE:
|
|
185
|
+
addStepClass(options.step.target);
|
|
186
|
+
break;
|
|
187
|
+
case EVENTS.TOUR_END:
|
|
188
|
+
break;
|
|
189
|
+
case EVENTS.STEP_AFTER:
|
|
190
|
+
removeTargetClass(options.step.target);
|
|
191
|
+
switch (action) {
|
|
192
|
+
case ACTIONS.NEXT:
|
|
193
|
+
if (index < size - 1) {
|
|
194
|
+
setStepIndex(index + 1);
|
|
195
|
+
}
|
|
196
|
+
break;
|
|
197
|
+
case ACTIONS.PREV:
|
|
198
|
+
if (index > 0) {
|
|
199
|
+
setStepIndex(index - 1);
|
|
200
|
+
}
|
|
201
|
+
break;
|
|
202
|
+
case ACTIONS.CLOSE:
|
|
203
|
+
setRunningChanged(false);
|
|
204
|
+
setStepIndex(0);
|
|
205
|
+
break;
|
|
206
|
+
}
|
|
207
|
+
break;
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
return /* @__PURE__ */ React2.createElement(HelpContext.Provider, {
|
|
211
|
+
value: {
|
|
212
|
+
running: running && !paused,
|
|
213
|
+
steps,
|
|
214
|
+
setSteps,
|
|
215
|
+
setIndex: setStepIndex,
|
|
216
|
+
start: () => setRunningChanged(true),
|
|
217
|
+
stop: () => setRunningChanged(false)
|
|
218
|
+
}
|
|
219
|
+
}, /* @__PURE__ */ React2.createElement("style", null, `.joyride-target {
|
|
220
|
+
--controls-opacity: 1;
|
|
221
|
+
}`), /* @__PURE__ */ React2.createElement(Joyride, {
|
|
222
|
+
continuous: true,
|
|
223
|
+
steps,
|
|
224
|
+
stepIndex,
|
|
225
|
+
run: running && !paused,
|
|
226
|
+
callback,
|
|
227
|
+
floaterProps,
|
|
228
|
+
tooltipComponent: Tooltip
|
|
229
|
+
}), children);
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
// packages/plugins/plugin-help/src/components/Shortcuts/Key.tsx
|
|
233
|
+
import React3 from "react";
|
|
234
|
+
import { keySymbols } from "@dxos/keyboard";
|
|
235
|
+
|
|
236
|
+
// packages/plugins/plugin-help/src/components/Shortcuts/styles.ts
|
|
237
|
+
import { mx as mx2 } from "@dxos/react-ui-theme";
|
|
238
|
+
var shortcutKey = mx2("inline-flex min-is-[24px] bs-[24px] pli-0.5 justify-center items-center text-xs", "rounded bg-neutral-100 dark:bg-neutral-900");
|
|
239
|
+
|
|
240
|
+
// packages/plugins/plugin-help/src/components/Shortcuts/Key.tsx
|
|
241
|
+
var Key = ({ binding }) => {
|
|
242
|
+
return /* @__PURE__ */ React3.createElement("span", {
|
|
243
|
+
role: "term",
|
|
244
|
+
className: "inline-flex gap-1",
|
|
245
|
+
"aria-label": binding,
|
|
246
|
+
id: binding
|
|
247
|
+
}, keySymbols(binding).map((c, i) => /* @__PURE__ */ React3.createElement("span", {
|
|
248
|
+
key: i,
|
|
249
|
+
className: shortcutKey
|
|
250
|
+
}, c)));
|
|
251
|
+
};
|
|
252
|
+
|
|
253
|
+
// packages/plugins/plugin-help/src/components/Shortcuts/ShortcutsList.tsx
|
|
254
|
+
import React4, { Fragment } from "react";
|
|
255
|
+
import { Keyboard } from "@dxos/keyboard";
|
|
256
|
+
import { toLocalizedString, useTranslation } from "@dxos/react-ui";
|
|
257
|
+
import { mx as mx3 } from "@dxos/react-ui-theme";
|
|
258
|
+
var ShortcutsList = () => {
|
|
259
|
+
const { t } = useTranslation(HELP_PLUGIN);
|
|
260
|
+
const bindings = Keyboard.singleton.getBindings();
|
|
261
|
+
bindings.sort((a, b) => {
|
|
262
|
+
return toLocalizedString(a.data, t)?.toLowerCase().localeCompare(toLocalizedString(b.data, t)?.toLowerCase());
|
|
263
|
+
});
|
|
264
|
+
return /* @__PURE__ */ React4.createElement("dl", {
|
|
265
|
+
className: mx3("is-fit grid grid-cols-[min-content_minmax(12rem,1fr)] gap-2 mlb-4 text-subdued")
|
|
266
|
+
}, bindings.map((binding, i) => /* @__PURE__ */ React4.createElement(Fragment, {
|
|
267
|
+
key: i
|
|
268
|
+
}, /* @__PURE__ */ React4.createElement(Key, {
|
|
269
|
+
binding: binding.shortcut
|
|
270
|
+
}), /* @__PURE__ */ React4.createElement("span", {
|
|
271
|
+
role: "definition",
|
|
272
|
+
className: "mis-4",
|
|
273
|
+
"aria-labelledby": binding.shortcut
|
|
274
|
+
}, toLocalizedString(binding.data, t)))));
|
|
275
|
+
};
|
|
276
|
+
|
|
277
|
+
// packages/plugins/plugin-help/src/components/Shortcuts/ShortcutsDialog.tsx
|
|
278
|
+
import React5 from "react";
|
|
279
|
+
import { Button as Button2, Dialog, Icon, useTranslation as useTranslation2 } from "@dxos/react-ui";
|
|
280
|
+
var SHORTCUTS_DIALOG = `${HELP_PLUGIN}/ShortcutsDialog`;
|
|
281
|
+
var ShortcutsDialogContent = () => {
|
|
282
|
+
const { t } = useTranslation2(HELP_PLUGIN);
|
|
283
|
+
return /* @__PURE__ */ React5.createElement(Dialog.Content, {
|
|
284
|
+
classNames: "p-0 bs-content max-bs-full md:max-is-[25rem] overflow-hidden"
|
|
285
|
+
}, /* @__PURE__ */ React5.createElement("div", {
|
|
286
|
+
role: "none",
|
|
287
|
+
className: "flex justify-between mbe-1 pbs-3 pis-2 pie-3 @md:pbs-4 @md:pis-4 @md:pie-5"
|
|
288
|
+
}, /* @__PURE__ */ React5.createElement(Dialog.Title, null, t("shortcuts dialog title")), /* @__PURE__ */ React5.createElement(Dialog.Close, {
|
|
289
|
+
asChild: true
|
|
290
|
+
}, /* @__PURE__ */ React5.createElement(Button2, {
|
|
291
|
+
density: "fine",
|
|
292
|
+
variant: "ghost",
|
|
293
|
+
autoFocus: true
|
|
294
|
+
}, /* @__PURE__ */ React5.createElement(Icon, {
|
|
295
|
+
icon: "ph--x--regular",
|
|
296
|
+
size: 3
|
|
297
|
+
})))), /* @__PURE__ */ React5.createElement("div", {
|
|
298
|
+
className: "flex items-center justify-center"
|
|
299
|
+
}, /* @__PURE__ */ React5.createElement(ShortcutsList, null)));
|
|
300
|
+
};
|
|
301
|
+
|
|
302
|
+
// packages/plugins/plugin-help/src/components/Shortcuts/ShortcutsHints.tsx
|
|
303
|
+
import React6 from "react";
|
|
304
|
+
import { Keyboard as Keyboard2 } from "@dxos/keyboard";
|
|
305
|
+
import { Button as Button3, Icon as Icon2, toLocalizedString as toLocalizedString2, useTranslation as useTranslation3 } from "@dxos/react-ui";
|
|
306
|
+
var Shortcut = ({ binding }) => {
|
|
307
|
+
const { t } = useTranslation3("os");
|
|
308
|
+
return /* @__PURE__ */ React6.createElement("div", {
|
|
309
|
+
role: "none",
|
|
310
|
+
className: "flex items-center gap-2 whitespace-nowrap"
|
|
311
|
+
}, /* @__PURE__ */ React6.createElement(Key, {
|
|
312
|
+
binding: binding.shortcut
|
|
313
|
+
}), /* @__PURE__ */ React6.createElement("span", {
|
|
314
|
+
className: "text-sm"
|
|
315
|
+
}, toLocalizedString2(binding.data, t)));
|
|
316
|
+
};
|
|
317
|
+
var ShortcutsHints = ({ onClose }) => {
|
|
318
|
+
const defaults = [
|
|
319
|
+
"meta+k",
|
|
320
|
+
"meta+/",
|
|
321
|
+
"meta+,"
|
|
322
|
+
];
|
|
323
|
+
const bindings = Keyboard2.singleton.getBindings();
|
|
324
|
+
const hints = bindings.filter((binding) => defaults.includes(binding.shortcut));
|
|
325
|
+
return /* @__PURE__ */ React6.createElement("div", {
|
|
326
|
+
role: "none",
|
|
327
|
+
className: "flex overflow-hidden px-2 gap-4"
|
|
328
|
+
}, hints.map((binding) => /* @__PURE__ */ React6.createElement(Shortcut, {
|
|
329
|
+
key: binding.shortcut,
|
|
330
|
+
binding
|
|
331
|
+
})), onClose && /* @__PURE__ */ React6.createElement(Button3, {
|
|
332
|
+
variant: "ghost",
|
|
333
|
+
classNames: "p-0 cursor-pointer",
|
|
334
|
+
onClick: onClose
|
|
335
|
+
}, /* @__PURE__ */ React6.createElement(Icon2, {
|
|
336
|
+
icon: "ph--x--regular",
|
|
337
|
+
size: 4
|
|
338
|
+
})));
|
|
339
|
+
};
|
|
340
|
+
|
|
341
|
+
// packages/plugins/plugin-help/src/components/Shortcuts/ShortcutsSection.tsx
|
|
342
|
+
import React7 from "react";
|
|
343
|
+
import { descriptionText } from "@dxos/react-ui-theme";
|
|
344
|
+
var ShortcutsSection = () => {
|
|
345
|
+
return /* @__PURE__ */ React7.createElement("section", {
|
|
346
|
+
className: descriptionText
|
|
347
|
+
}, /* @__PURE__ */ React7.createElement(ShortcutsList, null));
|
|
348
|
+
};
|
|
349
|
+
|
|
350
|
+
export {
|
|
351
|
+
floaterProps,
|
|
352
|
+
Tooltip,
|
|
353
|
+
HelpContextProvider,
|
|
354
|
+
Key,
|
|
355
|
+
ShortcutsList,
|
|
356
|
+
SHORTCUTS_DIALOG,
|
|
357
|
+
ShortcutsDialogContent,
|
|
358
|
+
ShortcutsHints,
|
|
359
|
+
ShortcutsSection
|
|
360
|
+
};
|
|
361
|
+
//# sourceMappingURL=chunk-VNAN5GRY.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/Tooltip/Tooltip.tsx", "../../../src/components/HelpContextProvider/HelpContextProvider.tsx", "../../../src/components/Shortcuts/Key.tsx", "../../../src/components/Shortcuts/styles.ts", "../../../src/components/Shortcuts/ShortcutsList.tsx", "../../../src/components/Shortcuts/ShortcutsDialog.tsx", "../../../src/components/Shortcuts/ShortcutsHints.tsx", "../../../src/components/Shortcuts/ShortcutsSection.tsx"],
|
|
4
|
+
"sourcesContent": ["//\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, { type PropsWithChildren, useState, useEffect } from 'react';\nimport Joyride, { ACTIONS, EVENTS } from 'react-joyride';\n\nimport { usePluginManager, useCapability, Capabilities } 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 manager = usePluginManager();\n const layout = useCapability(Capabilities.Layout);\n const [running, setRunning] = useState(!!runningProp && !!getTarget(initialSteps[0]));\n const [stepIndex, _setStepIndex] = useState(0);\n const [steps, setSteps] = useState(initialSteps);\n\n const paused = layout.dialogOpen;\n\n const setStepIndex = (index: number) => {\n if (runningProp) {\n const step = steps[index];\n step?.before?.(manager.context);\n }\n _setStepIndex(index);\n };\n\n const setRunningChanged = (state: boolean) => {\n if (typeof runningProp !== 'undefined') {\n onRunningChanged?.(state);\n } else {\n if (state) {\n setStepIndex(0);\n setRunning(true);\n } else {\n setRunning(false);\n }\n }\n };\n\n 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 2024 DXOS.org\n//\n\nimport React from 'react';\n\nimport { keySymbols } from '@dxos/keyboard';\n\nimport { shortcutKey } from './styles';\n\nexport const Key = ({ binding }: { binding: string }) => {\n return (\n <span role='term' className='inline-flex gap-1' aria-label={binding} id={binding}>\n {keySymbols(binding).map((c, i) => (\n <span key={i} className={shortcutKey}>\n {c}\n </span>\n ))}\n </span>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { mx } from '@dxos/react-ui-theme';\n\nexport const shortcutKey = mx(\n 'inline-flex min-is-[24px] bs-[24px] pli-0.5 justify-center items-center text-xs',\n 'rounded bg-neutral-100 dark:bg-neutral-900',\n);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React, { Fragment } from 'react';\n\nimport { Keyboard } from '@dxos/keyboard';\nimport { toLocalizedString, useTranslation } from '@dxos/react-ui';\nimport { mx } from '@dxos/react-ui-theme';\n\nimport { 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 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 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"],
|
|
5
|
+
"mappings": ";;;;;;;;AAIA,SAASA,yBAAyBC,yBAAyB;AAC3D,SAASC,WAAWC,YAAYC,QAAQC,SAAS;AACjD,OAAOC,SAASC,kBAAkB;AASlC,SAASC,cAAc;AACvB,SAASC,SAASC,UAAU;A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G,IAAI,CAACtB,YACV,gBAAAG,OAAA,cAACJ,UAAAA;IAASwB,KAAKvB,QAAQQ;IAAUR;OAElCa,WACC,gBAAAV,OAAA,cAACqB,SAAAA;IAAOC,SAAQ;IAAQC,YAAW;IAAqBC,SAASd;KAC/D,gBAAAV,OAAA,cAACyB,OAAAA;IAAKC,MAAK;IAAiBC,MAAM;;AAK5C;;;ACnCA,OAAOC,YAAW;AAElB,SAASC,uBAAuB;AAIzB,IAAMC,mBAAmB,MAAA;AAC9B,SACE,gBAAAC,OAAA,cAACC,WAAAA;IAAQC,WAAWC;KAClB,gBAAAH,OAAA,cAACI,eAAAA,IAAAA,CAAAA;AAGP;",
|
|
6
|
+
"names": ["useArrowNavigationGroup", "useFocusableGroup", "CaretLeft", "CaretRight", "Circle", "X", "React", "forwardRef", "Button", "getSize", "mx", "floaterProps", "styles", "arrow", "length", "spread", "floater", "filter", "Tooltip", "forwardRef", "step", "title", "content", "index", "size", "isLastStep", "backProps", "closeProps", "primaryProps", "forwardedRef", "arrowGroup", "useArrowNavigationGroup", "axis", "trapFocus", "useFocusableGroup", "tabBehavior", "div", "className", "role", "data-testid", "data-step", "ref", "h2", "Button", "density", "variant", "onClick", "X", "weight", "getSize", "classNames", "CaretLeft", "Array", "from", "map", "_", "i", "Circle", "key", "mx", "autoFocus", "CaretRight", "React", "useState", "useEffect", "Joyride", "ACTIONS", "EVENTS", "usePluginManager", "useCapability", "Capabilities", "addStepClass", "target", "element", "document", "querySelector", "classList", "add", "removeTargetClass", "remove", "getTarget", "step", "waitForTarget", "Promise", "resolve", "observer", "MutationObserver", "mutations", "forEach", "mutation", "addedNodes", "length", "disconnect", "observe", "body", "childList", "subtree", "HelpContextProvider", "children", "steps", "initialSteps", "running", "runningProp", "onRunningChanged", "manager", "usePluginManager", "layout", "useCapability", "Capabilities", "Layout", "setRunning", "useState", "stepIndex", "_setStepIndex", "setSteps", "paused", "dialogOpen", "setStepIndex", "index", "before", "context", "setRunningChanged", "state", "useEffect", "timeout", "setTimeout", "clearTimeout", "callback", "options", "type", "action", "size", "EVENTS", "STEP_BEFORE", "TOUR_END", "STEP_AFTER", "ACTIONS", "NEXT", "PREV", "CLOSE", "React", "HelpContext", "Provider", "value", "setIndex", "start", "stop", "style", "Joyride", "continuous", "run", "floaterProps", "tooltipComponent", "Tooltip", "React", "keySymbols", "mx", "shortcutKey", "mx", "Key", "binding", "React", "span", "role", "className", "aria-label", "id", "keySymbols", "map", "c", "i", "key", "shortcutKey", "React", "Fragment", "Keyboard", "toLocalizedString", "useTranslation", "mx", "ShortcutsList", "t", "useTranslation", "HELP_PLUGIN", "bindings", "Keyboard", "singleton", "getBindings", "sort", "a", "b", "toLocalizedString", "data", "toLowerCase", "localeCompare", "React", "dl", "className", "mx", "map", "binding", "i", "Fragment", "key", "Key", "shortcut", "span", "role", "aria-labelledby", "React", "Button", "Dialog", "Icon", "useTranslation", "SHORTCUTS_DIALOG", "HELP_PLUGIN", "ShortcutsDialogContent", "t", "useTranslation", "React", "Dialog", "Content", "classNames", "div", "role", "className", "Title", "Close", "asChild", "Button", "density", "variant", "autoFocus", "Icon", "icon", "size", "ShortcutsList", "React", "Keyboard", "Button", "Icon", "toLocalizedString", "useTranslation", "Shortcut", "binding", "t", "useTranslation", "React", "div", "role", "className", "Key", "shortcut", "span", "toLocalizedString", "data", "ShortcutsHints", "onClose", "defaults", "bindings", "Keyboard", "singleton", "getBindings", "hints", "filter", "includes", "map", "key", "Button", "variant", "classNames", "onClick", "Icon", "icon", "size", "React", "descriptionText", "ShortcutsSection", "React", "section", "className", "descriptionText", "ShortcutsList"]
|
|
7
|
+
}
|