@dxos/plugin-help 0.8.4-main.9735255 → 0.8.4-main.9be5663bfe
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/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/browser/chunk-K4LQ2TR7.mjs +34 -0
- package/dist/lib/browser/chunk-K4LQ2TR7.mjs.map +7 -0
- package/dist/lib/browser/chunk-KUUIRJG5.mjs +31 -0
- package/dist/lib/browser/chunk-KUUIRJG5.mjs.map +7 -0
- package/dist/lib/browser/{chunk-IM2QVQOH.mjs → chunk-TEXIV2IJ.mjs} +2 -2
- package/dist/lib/browser/{chunk-IM2QVQOH.mjs.map → chunk-TEXIV2IJ.mjs.map} +1 -1
- package/dist/lib/browser/index.mjs +351 -67
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/meta.mjs +2 -1
- package/dist/lib/browser/operations/index.mjs +13 -0
- package/dist/lib/browser/operations/index.mjs.map +7 -0
- package/dist/lib/browser/start-YZBO346C.mjs +23 -0
- package/dist/lib/browser/start-YZBO346C.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +4 -6
- package/dist/types/src/HelpPlugin.d.ts +1 -1
- package/dist/types/src/HelpPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +6 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +18 -5
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/{react-root/react-root.d.ts → react-root.d.ts} +2 -2
- package/dist/types/src/capabilities/react-root.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/{state/state.d.ts → state.d.ts} +1 -1
- package/dist/types/src/capabilities/state.d.ts.map +1 -0
- package/dist/types/src/components/Shortcuts/ShortcutsSection.d.ts.map +1 -1
- package/dist/types/src/components/Shortcuts/index.d.ts +0 -1
- package/dist/types/src/components/Shortcuts/index.d.ts.map +1 -1
- package/dist/types/src/components/WelcomeTour/WelcomeTour.d.ts +1 -1
- package/dist/types/src/components/WelcomeTour/WelcomeTour.d.ts.map +1 -1
- package/dist/types/src/constants.d.ts +2 -0
- package/dist/types/src/constants.d.ts.map +1 -0
- package/dist/types/src/{components/Shortcuts/ShortcutsDialog.d.ts → containers/ShortcutsDialogContent/ShortcutsDialogContent.d.ts} +1 -2
- package/dist/types/src/containers/ShortcutsDialogContent/ShortcutsDialogContent.d.ts.map +1 -0
- package/dist/types/src/containers/ShortcutsDialogContent/ShortcutsDialogContent.stories.d.ts +25 -0
- package/dist/types/src/containers/ShortcutsDialogContent/ShortcutsDialogContent.stories.d.ts.map +1 -0
- package/dist/types/src/containers/ShortcutsDialogContent/index.d.ts +2 -0
- package/dist/types/src/containers/ShortcutsDialogContent/index.d.ts.map +1 -0
- package/dist/types/src/containers/ShortcutsHints/ShortcutsHints.d.ts +2 -0
- package/dist/types/src/containers/ShortcutsHints/ShortcutsHints.d.ts.map +1 -0
- package/dist/types/src/containers/ShortcutsHints/index.d.ts +2 -0
- package/dist/types/src/containers/ShortcutsHints/index.d.ts.map +1 -0
- package/dist/types/src/containers/ShortcutsList/ShortcutsList.d.ts +2 -0
- package/dist/types/src/containers/ShortcutsList/ShortcutsList.d.ts.map +1 -0
- package/dist/types/src/containers/ShortcutsList/index.d.ts +2 -0
- package/dist/types/src/containers/ShortcutsList/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +5 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/hooks/useHelp.d.ts +1 -1
- package/dist/types/src/hooks/useHelp.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/operations/definitions.d.ts +4 -0
- package/dist/types/src/operations/definitions.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +4 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/operations/start.d.ts +5 -0
- package/dist/types/src/operations/start.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +5 -5
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +1 -17
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +46 -28
- package/src/HelpPlugin.tsx +12 -10
- package/src/capabilities/{app-graph-builder/app-graph-builder.ts → app-graph-builder.ts} +20 -18
- package/src/capabilities/index.ts +11 -5
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/{react-root/react-root.tsx → react-root.tsx} +6 -6
- package/src/capabilities/react-surface.tsx +37 -0
- package/src/capabilities/{state/state.ts → state.ts} +2 -2
- package/src/components/Shortcuts/ShortcutsHints.tsx +1 -1
- package/src/components/Shortcuts/ShortcutsList.tsx +3 -3
- package/src/components/Shortcuts/ShortcutsSection.tsx +1 -3
- package/src/components/Shortcuts/index.ts +0 -1
- package/src/components/Shortcuts/styles.ts +2 -2
- package/src/components/Tooltip/Tooltip.tsx +4 -4
- package/src/components/WelcomeTour/WelcomeTour.stories.tsx +14 -14
- package/src/components/WelcomeTour/WelcomeTour.tsx +4 -2
- package/src/constants.ts +7 -0
- package/src/containers/ShortcutsDialogContent/ShortcutsDialogContent.stories.tsx +38 -0
- package/src/containers/ShortcutsDialogContent/ShortcutsDialogContent.tsx +28 -0
- package/src/containers/ShortcutsDialogContent/index.ts +5 -0
- package/src/containers/ShortcutsHints/ShortcutsHints.tsx +5 -0
- package/src/containers/ShortcutsHints/index.ts +5 -0
- package/src/containers/ShortcutsList/ShortcutsList.tsx +5 -0
- package/src/containers/ShortcutsList/index.ts +5 -0
- package/src/containers/index.ts +9 -0
- package/src/hooks/useHelp.tsx +1 -1
- package/src/index.ts +1 -0
- package/src/meta.ts +1 -1
- package/src/operations/definitions.ts +19 -0
- package/src/operations/index.ts +9 -0
- package/src/operations/start.ts +21 -0
- package/src/translations.ts +5 -5
- package/src/types/capabilities.ts +2 -2
- package/src/types/schema.ts +1 -15
- package/dist/lib/browser/app-graph-builder-DX3VXARQ.mjs +0 -79
- package/dist/lib/browser/app-graph-builder-DX3VXARQ.mjs.map +0 -7
- package/dist/lib/browser/chunk-TS66J4C6.mjs +0 -58
- package/dist/lib/browser/chunk-TS66J4C6.mjs.map +0 -7
- package/dist/lib/browser/chunk-W5XAZM46.mjs +0 -360
- package/dist/lib/browser/chunk-W5XAZM46.mjs.map +0 -7
- package/dist/lib/browser/react-root-SZRF6EXG.mjs +0 -43
- package/dist/lib/browser/react-root-SZRF6EXG.mjs.map +0 -7
- package/dist/lib/browser/react-surface-DWNTJBVM.mjs +0 -37
- package/dist/lib/browser/react-surface-DWNTJBVM.mjs.map +0 -7
- package/dist/lib/browser/state-VRPLKT3F.mjs +0 -27
- package/dist/lib/browser/state-VRPLKT3F.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts +0 -6
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +0 -3
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -2
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -5
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-root/index.d.ts +0 -6
- package/dist/types/src/capabilities/react-root/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-root/react-root.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +0 -5
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/state/index.d.ts +0 -11
- package/dist/types/src/capabilities/state/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/state/state.d.ts.map +0 -1
- package/dist/types/src/components/Shortcuts/ShortcutsDialog.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder/index.ts +0 -7
- package/src/capabilities/operation-resolver/index.ts +0 -5
- package/src/capabilities/operation-resolver/operation-resolver.ts +0 -23
- package/src/capabilities/react-root/index.ts +0 -7
- package/src/capabilities/react-surface/index.ts +0 -7
- package/src/capabilities/react-surface/react-surface.tsx +0 -34
- package/src/capabilities/state/index.ts +0 -7
- package/src/components/Shortcuts/ShortcutsDialog.tsx +0 -32
|
@@ -1,360 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
HelpContext
|
|
3
|
-
} from "./chunk-TS66J4C6.mjs";
|
|
4
|
-
import {
|
|
5
|
-
meta
|
|
6
|
-
} from "./chunk-IM2QVQOH.mjs";
|
|
7
|
-
|
|
8
|
-
// src/components/Shortcuts/Key.tsx
|
|
9
|
-
import React from "react";
|
|
10
|
-
import { keySymbols } from "@dxos/keyboard";
|
|
11
|
-
|
|
12
|
-
// src/components/Shortcuts/styles.ts
|
|
13
|
-
import { mx } from "@dxos/ui-theme";
|
|
14
|
-
var shortcutKey = mx("inline-flex min-is-[24px] bs-[24px] pli-0.5 justify-center items-center text-xs", "rounded bg-neutral-100 dark:bg-neutral-900");
|
|
15
|
-
|
|
16
|
-
// src/components/Shortcuts/Key.tsx
|
|
17
|
-
var Key = ({ binding }) => {
|
|
18
|
-
return /* @__PURE__ */ React.createElement("span", {
|
|
19
|
-
role: "term",
|
|
20
|
-
className: "inline-flex gap-1",
|
|
21
|
-
"aria-label": binding,
|
|
22
|
-
id: binding
|
|
23
|
-
}, keySymbols(binding).map((c, i) => /* @__PURE__ */ React.createElement("span", {
|
|
24
|
-
key: i,
|
|
25
|
-
className: shortcutKey
|
|
26
|
-
}, c)));
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
// src/components/Shortcuts/ShortcutsList.tsx
|
|
30
|
-
import React2, { Fragment } from "react";
|
|
31
|
-
import { Keyboard } from "@dxos/keyboard";
|
|
32
|
-
import { toLocalizedString, useTranslation } from "@dxos/react-ui";
|
|
33
|
-
import { mx as mx2 } from "@dxos/ui-theme";
|
|
34
|
-
var ShortcutsList = () => {
|
|
35
|
-
const { t } = useTranslation(meta.id);
|
|
36
|
-
const bindings = Keyboard.singleton.getBindings();
|
|
37
|
-
bindings.sort((a, b) => {
|
|
38
|
-
return toLocalizedString(a.data, t)?.toLowerCase().localeCompare(toLocalizedString(b.data, t)?.toLowerCase());
|
|
39
|
-
});
|
|
40
|
-
return /* @__PURE__ */ React2.createElement("dl", {
|
|
41
|
-
className: mx2("is-fit grid grid-cols-[min-content_minmax(12rem,1fr)] gap-2 mlb-4 text-subdued select-none")
|
|
42
|
-
}, bindings.map((binding, i) => /* @__PURE__ */ React2.createElement(Fragment, {
|
|
43
|
-
key: i
|
|
44
|
-
}, /* @__PURE__ */ React2.createElement(Key, {
|
|
45
|
-
binding: binding.shortcut
|
|
46
|
-
}), /* @__PURE__ */ React2.createElement("span", {
|
|
47
|
-
role: "definition",
|
|
48
|
-
className: "mis-4",
|
|
49
|
-
"aria-labelledby": binding.shortcut
|
|
50
|
-
}, toLocalizedString(binding.data, t)))));
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
// src/components/Shortcuts/ShortcutsDialog.tsx
|
|
54
|
-
import React3 from "react";
|
|
55
|
-
import { Dialog, IconButton, useTranslation as useTranslation2 } from "@dxos/react-ui";
|
|
56
|
-
var SHORTCUTS_DIALOG = `${meta.id}/ShortcutsDialog`;
|
|
57
|
-
var ShortcutsDialogContent = () => {
|
|
58
|
-
const { t } = useTranslation2(meta.id);
|
|
59
|
-
return /* @__PURE__ */ React3.createElement(Dialog.Content, null, /* @__PURE__ */ React3.createElement("div", {
|
|
60
|
-
role: "none",
|
|
61
|
-
className: "flex justify-between mbe-1 pbs-3 pis-2 pie-3 @md:pbs-4 @md:pis-4 @md:pie-5"
|
|
62
|
-
}, /* @__PURE__ */ React3.createElement(Dialog.Title, null, t("shortcuts dialog title")), /* @__PURE__ */ React3.createElement(Dialog.Close, {
|
|
63
|
-
asChild: true
|
|
64
|
-
}, /* @__PURE__ */ React3.createElement(IconButton, {
|
|
65
|
-
icon: "ph--x--bold",
|
|
66
|
-
iconOnly: true,
|
|
67
|
-
size: 3,
|
|
68
|
-
label: "Close",
|
|
69
|
-
variant: "ghost",
|
|
70
|
-
autoFocus: true
|
|
71
|
-
}))), /* @__PURE__ */ React3.createElement("div", {
|
|
72
|
-
className: "flex items-center justify-center"
|
|
73
|
-
}, /* @__PURE__ */ React3.createElement(ShortcutsList, null)));
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
// src/components/Shortcuts/ShortcutsHints.tsx
|
|
77
|
-
import React4 from "react";
|
|
78
|
-
import { Keyboard as Keyboard2 } from "@dxos/keyboard";
|
|
79
|
-
import { IconButton as IconButton2, toLocalizedString as toLocalizedString2, useTranslation as useTranslation3 } from "@dxos/react-ui";
|
|
80
|
-
import { osTranslations } from "@dxos/ui-theme";
|
|
81
|
-
var Shortcut = ({ binding }) => {
|
|
82
|
-
const { t } = useTranslation3(osTranslations);
|
|
83
|
-
return /* @__PURE__ */ React4.createElement("div", {
|
|
84
|
-
role: "none",
|
|
85
|
-
className: "flex items-center gap-2 whitespace-nowrap"
|
|
86
|
-
}, /* @__PURE__ */ React4.createElement(Key, {
|
|
87
|
-
binding: binding.shortcut
|
|
88
|
-
}), /* @__PURE__ */ React4.createElement("span", {
|
|
89
|
-
className: "text-sm"
|
|
90
|
-
}, toLocalizedString2(binding.data, t)));
|
|
91
|
-
};
|
|
92
|
-
var ShortcutsHints = ({ onClose }) => {
|
|
93
|
-
const defaults = [
|
|
94
|
-
"meta+k",
|
|
95
|
-
"meta+/",
|
|
96
|
-
"meta+,"
|
|
97
|
-
];
|
|
98
|
-
const bindings = Keyboard2.singleton.getBindings();
|
|
99
|
-
const hints = bindings.filter((binding) => defaults.includes(binding.shortcut));
|
|
100
|
-
return /* @__PURE__ */ React4.createElement("div", {
|
|
101
|
-
role: "none",
|
|
102
|
-
className: "flex overflow-hidden pli-2 gap-4"
|
|
103
|
-
}, hints.map((binding) => /* @__PURE__ */ React4.createElement(Shortcut, {
|
|
104
|
-
key: binding.shortcut,
|
|
105
|
-
binding
|
|
106
|
-
})), onClose && /* @__PURE__ */ React4.createElement(IconButton2, {
|
|
107
|
-
icon: "ph--x--regular",
|
|
108
|
-
size: 4,
|
|
109
|
-
label: "Close",
|
|
110
|
-
iconOnly: true,
|
|
111
|
-
noTooltip: true,
|
|
112
|
-
variant: "ghost",
|
|
113
|
-
classNames: "p-0 cursor-pointer",
|
|
114
|
-
onClick: onClose
|
|
115
|
-
}));
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
// src/components/Shortcuts/ShortcutsSection.tsx
|
|
119
|
-
import React5 from "react";
|
|
120
|
-
import { descriptionText } from "@dxos/ui-theme";
|
|
121
|
-
var ShortcutsSection = () => {
|
|
122
|
-
return /* @__PURE__ */ React5.createElement("section", {
|
|
123
|
-
className: descriptionText
|
|
124
|
-
}, /* @__PURE__ */ React5.createElement(ShortcutsList, null));
|
|
125
|
-
};
|
|
126
|
-
|
|
127
|
-
// src/components/Tooltip/Tooltip.tsx
|
|
128
|
-
import { useArrowNavigationGroup, useFocusableGroup } from "@fluentui/react-tabster";
|
|
129
|
-
import React6, { forwardRef } from "react";
|
|
130
|
-
import { Button, Icon, IconButton as IconButton3 } from "@dxos/react-ui";
|
|
131
|
-
var floaterProps = {
|
|
132
|
-
styles: {
|
|
133
|
-
// Arrow color is set by joyride.
|
|
134
|
-
arrow: {
|
|
135
|
-
length: 8,
|
|
136
|
-
spread: 16
|
|
137
|
-
},
|
|
138
|
-
floater: {
|
|
139
|
-
// TODO(burdon): Get tokens from theme.
|
|
140
|
-
filter: "drop-shadow(0 0 0.75rem rgba(0, 0, 0, 0.2))"
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
};
|
|
144
|
-
var Tooltip = /* @__PURE__ */ forwardRef(({ step: { title, content }, index, size, isLastStep, backProps, closeProps, primaryProps }, forwardedRef) => {
|
|
145
|
-
const arrowNavigationAttrs = useArrowNavigationGroup({
|
|
146
|
-
axis: "horizontal"
|
|
147
|
-
});
|
|
148
|
-
const focusableGroupAttrs = useFocusableGroup({
|
|
149
|
-
tabBehavior: "limited-trap-focus"
|
|
150
|
-
});
|
|
151
|
-
return /* @__PURE__ */ React6.createElement("div", {
|
|
152
|
-
className: "flex flex-col is-[15rem] min-bs-[10rem] overflow-hidden rounded-md shadow-xl bg-accentSurface text-accentSurfaceText",
|
|
153
|
-
role: "tooltip",
|
|
154
|
-
"data-testid": "helpPlugin.tooltip",
|
|
155
|
-
"data-step": index + 1,
|
|
156
|
-
...focusableGroupAttrs,
|
|
157
|
-
ref: forwardedRef
|
|
158
|
-
}, /* @__PURE__ */ React6.createElement("div", {
|
|
159
|
-
className: "flex p-2"
|
|
160
|
-
}, /* @__PURE__ */ React6.createElement("h2", {
|
|
161
|
-
className: "grow pli-2 plb-1 text-lg font-medium text-accentSurfaceText"
|
|
162
|
-
}, title), /* @__PURE__ */ React6.createElement(IconButton3, {
|
|
163
|
-
density: "fine",
|
|
164
|
-
icon: "ph--x--bold",
|
|
165
|
-
iconOnly: true,
|
|
166
|
-
label: closeProps["aria-label"],
|
|
167
|
-
onClick: closeProps.onClick,
|
|
168
|
-
size: 4,
|
|
169
|
-
variant: "primary",
|
|
170
|
-
"data-testid": "helpPlugin.tooltip.close"
|
|
171
|
-
})), /* @__PURE__ */ React6.createElement("div", {
|
|
172
|
-
className: "flex grow pli-4 mlb-2"
|
|
173
|
-
}, content), /* @__PURE__ */ React6.createElement("div", {
|
|
174
|
-
className: "flex p-2 items-center justify-between",
|
|
175
|
-
...arrowNavigationAttrs
|
|
176
|
-
}, /* @__PURE__ */ React6.createElement(IconButton3, {
|
|
177
|
-
classNames: [
|
|
178
|
-
!(index > 0 && backProps) && "invisible"
|
|
179
|
-
],
|
|
180
|
-
icon: "ph--caret-left--regular",
|
|
181
|
-
iconOnly: true,
|
|
182
|
-
label: backProps["aria-label"],
|
|
183
|
-
onClick: backProps.onClick,
|
|
184
|
-
variant: "primary",
|
|
185
|
-
"data-testid": "helpPlugin.tooltip.back"
|
|
186
|
-
}), /* @__PURE__ */ React6.createElement("div", {
|
|
187
|
-
className: "flex grow gap-2 justify-center"
|
|
188
|
-
}, /* @__PURE__ */ React6.createElement("div", {
|
|
189
|
-
className: "flex"
|
|
190
|
-
}, Array.from({
|
|
191
|
-
length: size
|
|
192
|
-
}).map((_, i) => /* @__PURE__ */ React6.createElement(Icon, {
|
|
193
|
-
key: i,
|
|
194
|
-
icon: index === i ? "ph--circle--fill" : "ph--circle--regular",
|
|
195
|
-
size: 2,
|
|
196
|
-
classNames: "mli-1 cursor-pointer"
|
|
197
|
-
})))), isLastStep ? /* @__PURE__ */ React6.createElement(Button, {
|
|
198
|
-
variant: "primary",
|
|
199
|
-
onClick: closeProps.onClick,
|
|
200
|
-
title: closeProps["aria-label"],
|
|
201
|
-
autoFocus: true,
|
|
202
|
-
"data-testid": "helpPlugin.tooltip.finish"
|
|
203
|
-
}, "Done") : /* @__PURE__ */ React6.createElement(IconButton3, {
|
|
204
|
-
autoFocus: true,
|
|
205
|
-
icon: "ph--caret-right--regular",
|
|
206
|
-
iconOnly: true,
|
|
207
|
-
label: primaryProps["aria-label"],
|
|
208
|
-
onClick: primaryProps.onClick,
|
|
209
|
-
size: 6,
|
|
210
|
-
variant: "primary",
|
|
211
|
-
"data-testid": "helpPlugin.tooltip.next"
|
|
212
|
-
})));
|
|
213
|
-
});
|
|
214
|
-
|
|
215
|
-
// src/components/WelcomeTour/WelcomeTour.tsx
|
|
216
|
-
import React7, { useState } from "react";
|
|
217
|
-
import Joyride, { ACTIONS, EVENTS } from "react-joyride";
|
|
218
|
-
import { useLayout, usePluginManager } from "@dxos/app-framework/react";
|
|
219
|
-
import { useAsyncEffect } from "@dxos/react-ui";
|
|
220
|
-
var addStepClass = (target) => {
|
|
221
|
-
const element = typeof target === "string" ? document.querySelector(target) : target;
|
|
222
|
-
if (element) {
|
|
223
|
-
element.classList.add("joyride-target");
|
|
224
|
-
}
|
|
225
|
-
};
|
|
226
|
-
var removeTargetClass = (target) => {
|
|
227
|
-
const element = typeof target === "string" ? document.querySelector(target) : target;
|
|
228
|
-
if (element) {
|
|
229
|
-
element.classList.remove("joyride-target");
|
|
230
|
-
}
|
|
231
|
-
};
|
|
232
|
-
var getTarget = (step) => {
|
|
233
|
-
return typeof step.target === "string" ? document.querySelector(step.target) : step.target;
|
|
234
|
-
};
|
|
235
|
-
var waitForTarget = async (step) => {
|
|
236
|
-
if (typeof step.target === "string") {
|
|
237
|
-
const target = step.target;
|
|
238
|
-
const element = document.querySelector(target);
|
|
239
|
-
if (element) {
|
|
240
|
-
return;
|
|
241
|
-
}
|
|
242
|
-
await new Promise((resolve) => {
|
|
243
|
-
const observer = new MutationObserver((mutations) => {
|
|
244
|
-
mutations.forEach((mutation) => {
|
|
245
|
-
if (mutation.addedNodes.length > 0) {
|
|
246
|
-
const element2 = document.querySelector(target);
|
|
247
|
-
if (element2) {
|
|
248
|
-
observer.disconnect();
|
|
249
|
-
resolve();
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
});
|
|
253
|
-
});
|
|
254
|
-
observer.observe(document.body, {
|
|
255
|
-
childList: true,
|
|
256
|
-
subtree: true
|
|
257
|
-
});
|
|
258
|
-
});
|
|
259
|
-
}
|
|
260
|
-
};
|
|
261
|
-
var WelcomeTour = ({ steps: initialSteps, running: runningProp, onRunningChanged }) => {
|
|
262
|
-
const manager = usePluginManager();
|
|
263
|
-
const layout = useLayout();
|
|
264
|
-
const [running, setRunning] = useState(!!runningProp && !!getTarget(initialSteps[0]));
|
|
265
|
-
const [stepIndex, _setStepIndex] = useState(0);
|
|
266
|
-
const [steps, setSteps] = useState(initialSteps);
|
|
267
|
-
const paused = layout.dialogOpen;
|
|
268
|
-
const setStepIndex = (index) => {
|
|
269
|
-
if (runningProp) {
|
|
270
|
-
const step = steps[index];
|
|
271
|
-
step?.before?.(manager.capabilities);
|
|
272
|
-
}
|
|
273
|
-
_setStepIndex(index);
|
|
274
|
-
};
|
|
275
|
-
const setRunningChanged = (state) => {
|
|
276
|
-
if (typeof runningProp !== "undefined") {
|
|
277
|
-
onRunningChanged?.(state);
|
|
278
|
-
} else {
|
|
279
|
-
if (state) {
|
|
280
|
-
setStepIndex(0);
|
|
281
|
-
setRunning(true);
|
|
282
|
-
} else {
|
|
283
|
-
setRunning(false);
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
};
|
|
287
|
-
useAsyncEffect(async () => {
|
|
288
|
-
if (runningProp) {
|
|
289
|
-
await waitForTarget(steps[stepIndex]);
|
|
290
|
-
setStepIndex(0);
|
|
291
|
-
setRunning(true);
|
|
292
|
-
} else if (typeof runningProp !== "undefined") {
|
|
293
|
-
setRunning(false);
|
|
294
|
-
}
|
|
295
|
-
}, [
|
|
296
|
-
runningProp
|
|
297
|
-
]);
|
|
298
|
-
const callback = async (options) => {
|
|
299
|
-
const { type, action, index, size } = options;
|
|
300
|
-
switch (type) {
|
|
301
|
-
case EVENTS.STEP_BEFORE:
|
|
302
|
-
addStepClass(options.step.target);
|
|
303
|
-
break;
|
|
304
|
-
case EVENTS.TOUR_END:
|
|
305
|
-
break;
|
|
306
|
-
case EVENTS.STEP_AFTER:
|
|
307
|
-
removeTargetClass(options.step.target);
|
|
308
|
-
switch (action) {
|
|
309
|
-
case ACTIONS.NEXT:
|
|
310
|
-
if (index < size - 1) {
|
|
311
|
-
setStepIndex(index + 1);
|
|
312
|
-
}
|
|
313
|
-
break;
|
|
314
|
-
case ACTIONS.PREV:
|
|
315
|
-
if (index > 0) {
|
|
316
|
-
setStepIndex(index - 1);
|
|
317
|
-
}
|
|
318
|
-
break;
|
|
319
|
-
case ACTIONS.CLOSE:
|
|
320
|
-
setRunningChanged(false);
|
|
321
|
-
setStepIndex(0);
|
|
322
|
-
break;
|
|
323
|
-
}
|
|
324
|
-
break;
|
|
325
|
-
}
|
|
326
|
-
};
|
|
327
|
-
return /* @__PURE__ */ React7.createElement(HelpContext.Provider, {
|
|
328
|
-
value: {
|
|
329
|
-
running: running && !paused,
|
|
330
|
-
steps,
|
|
331
|
-
setSteps,
|
|
332
|
-
setIndex: setStepIndex,
|
|
333
|
-
start: () => setRunningChanged(true),
|
|
334
|
-
stop: () => setRunningChanged(false)
|
|
335
|
-
}
|
|
336
|
-
}, /* @__PURE__ */ React7.createElement("style", null, `.joyride-target {
|
|
337
|
-
--controls-opacity: 1;
|
|
338
|
-
}`), /* @__PURE__ */ React7.createElement(Joyride, {
|
|
339
|
-
continuous: true,
|
|
340
|
-
steps,
|
|
341
|
-
stepIndex,
|
|
342
|
-
run: running && !paused,
|
|
343
|
-
callback,
|
|
344
|
-
floaterProps,
|
|
345
|
-
tooltipComponent: Tooltip
|
|
346
|
-
}));
|
|
347
|
-
};
|
|
348
|
-
|
|
349
|
-
export {
|
|
350
|
-
Key,
|
|
351
|
-
ShortcutsList,
|
|
352
|
-
SHORTCUTS_DIALOG,
|
|
353
|
-
ShortcutsDialogContent,
|
|
354
|
-
ShortcutsHints,
|
|
355
|
-
ShortcutsSection,
|
|
356
|
-
floaterProps,
|
|
357
|
-
Tooltip,
|
|
358
|
-
WelcomeTour
|
|
359
|
-
};
|
|
360
|
-
//# sourceMappingURL=chunk-W5XAZM46.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/components/Shortcuts/Key.tsx", "../../../src/components/Shortcuts/styles.ts", "../../../src/components/Shortcuts/ShortcutsList.tsx", "../../../src/components/Shortcuts/ShortcutsDialog.tsx", "../../../src/components/Shortcuts/ShortcutsHints.tsx", "../../../src/components/Shortcuts/ShortcutsSection.tsx", "../../../src/components/Tooltip/Tooltip.tsx", "../../../src/components/WelcomeTour/WelcomeTour.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\n\nimport { keySymbols } from '@dxos/keyboard';\n\nimport { shortcutKey } from './styles';\n\nexport const Key = ({ binding }: { binding: string }) => {\n return (\n <span role='term' className='inline-flex gap-1' aria-label={binding} id={binding}>\n {keySymbols(binding).map((c, i) => (\n <span key={i} className={shortcutKey}>\n {c}\n </span>\n ))}\n </span>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { mx } from '@dxos/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/ui-theme';\n\nimport { meta } from '../../meta';\n\nimport { Key } from './Key';\n\nexport const ShortcutsList = () => {\n const { t } = useTranslation(meta.id);\n const bindings = Keyboard.singleton.getBindings();\n\n // TODO(burdon): Get shortcuts from TextEditor.\n bindings.sort((a, b) => {\n return toLocalizedString(a.data, t)?.toLowerCase().localeCompare(toLocalizedString(b.data, t)?.toLowerCase());\n });\n\n return (\n <dl className={mx('is-fit grid grid-cols-[min-content_minmax(12rem,1fr)] gap-2 mlb-4 text-subdued select-none')}>\n {bindings.map((binding, i) => (\n <Fragment key={i}>\n <Key binding={binding.shortcut} />\n <span role='definition' className='mis-4' aria-labelledby={binding.shortcut}>\n {toLocalizedString(binding.data, t)}\n </span>\n </Fragment>\n ))}\n </dl>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Dialog, IconButton, useTranslation } from '@dxos/react-ui';\n\nimport { meta } from '../../meta';\n\nimport { ShortcutsList } from './ShortcutsList';\n\nexport const SHORTCUTS_DIALOG = `${meta.id}/ShortcutsDialog`;\n\nexport const ShortcutsDialogContent = () => {\n const { t } = useTranslation(meta.id);\n\n return (\n <Dialog.Content>\n <div role='none' className='flex justify-between mbe-1 pbs-3 pis-2 pie-3 @md:pbs-4 @md:pis-4 @md:pie-5'>\n <Dialog.Title>{t('shortcuts dialog title')}</Dialog.Title>\n <Dialog.Close asChild>\n <IconButton icon='ph--x--bold' iconOnly size={3} label='Close' variant='ghost' autoFocus />\n </Dialog.Close>\n </div>\n\n <div className='flex items-center justify-center'>\n <ShortcutsList />\n </div>\n </Dialog.Content>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type KeyBinding, Keyboard } from '@dxos/keyboard';\nimport { IconButton, toLocalizedString, useTranslation } from '@dxos/react-ui';\nimport { osTranslations } from '@dxos/ui-theme';\n\nimport { Key } from './Key';\n\nconst Shortcut = ({ binding }: { binding: KeyBinding }) => {\n const { t } = useTranslation(osTranslations);\n return (\n <div role='none' className='flex items-center gap-2 whitespace-nowrap'>\n <Key binding={binding.shortcut} />\n <span className='text-sm'>{toLocalizedString(binding.data, t)}</span>\n </div>\n );\n};\n\nexport const ShortcutsHints = ({ onClose }: { onClose?: () => void }) => {\n // TODO(burdon): Display by context/weight/cycle.\n const defaults = ['meta+k', 'meta+/', 'meta+,'];\n const bindings = Keyboard.singleton.getBindings();\n const hints = bindings.filter((binding) => defaults.includes(binding.shortcut));\n\n return (\n <div role='none' className='flex overflow-hidden pli-2 gap-4'>\n {hints.map((binding) => (\n <Shortcut key={binding.shortcut} binding={binding} />\n ))}\n {onClose && (\n <IconButton\n icon='ph--x--regular'\n size={4}\n label='Close'\n iconOnly\n noTooltip\n variant='ghost'\n classNames='p-0 cursor-pointer'\n onClick={onClose}\n />\n )}\n </div>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\n\nimport { descriptionText } from '@dxos/ui-theme';\n\nimport { ShortcutsList } from './ShortcutsList';\n\nexport const ShortcutsSection = () => {\n return (\n <section className={descriptionText}>\n <ShortcutsList />\n </section>\n );\n};\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport { useArrowNavigationGroup, useFocusableGroup } from '@fluentui/react-tabster';\nimport React, { forwardRef } from 'react';\n// TODO(thure): This needed to be imported in the package.json specifically to pacify TS2742. See if this is resolved with typescript@5.5.x.\n// eslint-disable-next-line unused-imports/no-unused-imports\nimport _floater from 'react-floater';\nimport { type Props, type TooltipRenderProps } from 'react-joyride';\n// TODO(thure): This needed to be imported in the package.json specifically to pacify TS2742. See if this is resolved with typescript@5.5.x.\n// eslint-disable-next-line unused-imports/no-unused-imports\nimport _typefest from 'type-fest';\n\nimport { Button, Icon, IconButton } from '@dxos/react-ui';\n\n// https://docs.react-joyride.com/styling\n// https://github.com/gilbarbara/react-floater\nexport const floaterProps: Props['floaterProps'] = {\n styles: {\n // Arrow color is set by joyride.\n arrow: {\n length: 8,\n spread: 16,\n },\n floater: {\n // TODO(burdon): Get tokens from theme.\n filter: 'drop-shadow(0 0 0.75rem rgba(0, 0, 0, 0.2))',\n },\n },\n};\n\n// TODO(burdon): Add info link to docs.\nexport const Tooltip = forwardRef<HTMLDivElement, TooltipRenderProps>(\n ({ step: { title, content }, index, size, isLastStep, backProps, closeProps, primaryProps }, forwardedRef) => {\n const arrowNavigationAttrs = useArrowNavigationGroup({ axis: 'horizontal' });\n const focusableGroupAttrs = useFocusableGroup({ tabBehavior: 'limited-trap-focus' });\n\n return (\n <div\n className='flex flex-col is-[15rem] min-bs-[10rem] overflow-hidden rounded-md shadow-xl bg-accentSurface text-accentSurfaceText'\n role='tooltip'\n data-testid='helpPlugin.tooltip'\n data-step={index + 1}\n {...focusableGroupAttrs}\n ref={forwardedRef}\n >\n <div className='flex p-2'>\n <h2 className='grow pli-2 plb-1 text-lg font-medium text-accentSurfaceText'>{title}</h2>\n <IconButton\n density='fine'\n icon='ph--x--bold'\n iconOnly\n label={closeProps['aria-label']}\n onClick={closeProps.onClick}\n size={4}\n variant='primary'\n data-testid='helpPlugin.tooltip.close'\n />\n </div>\n <div className='flex grow pli-4 mlb-2'>{content}</div>\n <div className='flex p-2 items-center justify-between' {...arrowNavigationAttrs}>\n {\n <IconButton\n classNames={[!(index > 0 && backProps) && 'invisible']}\n icon='ph--caret-left--regular'\n iconOnly\n label={backProps['aria-label']}\n onClick={backProps.onClick}\n variant='primary'\n data-testid='helpPlugin.tooltip.back'\n />\n }\n <div className='flex grow gap-2 justify-center'>\n <div className='flex'>\n {Array.from({ length: size }).map((_, i) => (\n <Icon\n key={i}\n icon={index === i ? 'ph--circle--fill' : 'ph--circle--regular'}\n size={2}\n classNames='mli-1 cursor-pointer'\n />\n ))}\n </div>\n </div>\n {isLastStep ? (\n <Button\n variant='primary'\n onClick={closeProps.onClick}\n title={closeProps['aria-label']}\n autoFocus\n data-testid='helpPlugin.tooltip.finish'\n >\n Done\n </Button>\n ) : (\n <IconButton\n autoFocus\n icon='ph--caret-right--regular'\n iconOnly\n label={primaryProps['aria-label']}\n onClick={primaryProps.onClick}\n size={6}\n variant='primary'\n data-testid='helpPlugin.tooltip.next'\n />\n )}\n </div>\n </div>\n );\n },\n);\n", "//\n// Copyright 2023 DXOS.org\n//\n\nimport React, { useState } from 'react';\nimport Joyride, { ACTIONS, EVENTS } from 'react-joyride';\n\nimport { useLayout, usePluginManager } from '@dxos/app-framework/react';\nimport { useAsyncEffect } from '@dxos/react-ui';\n\nimport { HelpContext, type Step } from '../../types';\nimport { Tooltip, floaterProps } from '../Tooltip';\n\nconst addStepClass = (target: string | HTMLElement) => {\n const element = typeof target === 'string' ? document.querySelector(target) : target;\n if (element) {\n element.classList.add('joyride-target');\n }\n};\n\nconst removeTargetClass = (target: string | HTMLElement) => {\n const element = typeof target === 'string' ? document.querySelector(target) : target;\n if (element) {\n element.classList.remove('joyride-target');\n }\n};\n\nconst getTarget = (step: Step) => {\n return typeof step.target === 'string' ? document.querySelector(step.target) : step.target;\n};\n\n/**\n * Wait for the target element to be in the document.\n */\nconst waitForTarget = async (step: Step) => {\n if (typeof step.target === 'string') {\n const target = step.target;\n const element = document.querySelector(target);\n if (element) {\n return;\n }\n\n await new Promise<void>((resolve) => {\n const observer = new MutationObserver((mutations) => {\n mutations.forEach((mutation) => {\n if (mutation.addedNodes.length > 0) {\n const element = document.querySelector(target);\n if (element) {\n observer.disconnect();\n resolve();\n }\n }\n });\n });\n\n observer.observe(document.body, { childList: true, subtree: true });\n });\n }\n};\n\nexport type WelcomeTourProps = {\n steps: Step[];\n running?: boolean;\n onRunningChanged?: (state: boolean) => any;\n};\n\nexport const WelcomeTour = ({ steps: initialSteps, running: runningProp, onRunningChanged }: WelcomeTourProps) => {\n const manager = usePluginManager();\n const layout = useLayout();\n const [running, setRunning] = useState(!!runningProp && !!getTarget(initialSteps[0]));\n const [stepIndex, _setStepIndex] = useState(0);\n const [steps, setSteps] = useState(initialSteps);\n\n const paused = layout.dialogOpen;\n\n const setStepIndex = (index: number) => {\n if (runningProp) {\n const step = steps[index];\n step?.before?.(manager.capabilities);\n }\n _setStepIndex(index);\n };\n\n const setRunningChanged = (state: boolean) => {\n if (typeof runningProp !== 'undefined') {\n onRunningChanged?.(state);\n } else {\n if (state) {\n setStepIndex(0);\n setRunning(true);\n } else {\n setRunning(false);\n }\n }\n };\n\n useAsyncEffect(async () => {\n if (runningProp) {\n // This handles the case when the target is not yet in the document.\n // If the target is not in the document, when the joyride is turned on, it will not show the tooltip.\n await waitForTarget(steps[stepIndex]);\n setStepIndex(0);\n setRunning(true);\n } else if (typeof runningProp !== 'undefined') {\n setRunning(false);\n }\n }, [runningProp]);\n\n // https://docs.react-joyride.com/callback\n const callback: Joyride['callback'] = async (options) => {\n const { type, action, index, size } = options;\n switch (type) {\n case EVENTS.STEP_BEFORE:\n addStepClass(options.step.target);\n break;\n case EVENTS.TOUR_END:\n break;\n case EVENTS.STEP_AFTER:\n removeTargetClass(options.step.target);\n switch (action) {\n case ACTIONS.NEXT:\n if (index < size - 1) {\n setStepIndex(index + 1);\n }\n break;\n case ACTIONS.PREV:\n if (index > 0) {\n setStepIndex(index - 1);\n }\n break;\n case ACTIONS.CLOSE:\n setRunningChanged(false);\n setStepIndex(0);\n break;\n }\n break;\n }\n };\n\n return (\n <HelpContext.Provider\n value={{\n running: running && !paused,\n steps,\n setSteps,\n setIndex: setStepIndex,\n start: () => setRunningChanged(true),\n stop: () => setRunningChanged(false),\n }}\n >\n <style>\n {`.joyride-target {\n --controls-opacity: 1;\n }`}\n </style>\n <Joyride\n continuous={true}\n steps={steps}\n stepIndex={stepIndex}\n run={running && !paused}\n callback={callback}\n floaterProps={floaterProps}\n tooltipComponent={Tooltip}\n />\n </HelpContext.Provider>\n );\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;AAIA,OAAOA,WAAW;AAElB,SAASC,kBAAkB;;;ACF3B,SAASC,UAAU;AAEZ,IAAMC,cAAcC,GACzB,mFACA,4CAAA;;;ADEK,IAAMC,MAAM,CAAC,EAAEC,QAAO,MAAuB;AAClD,SACE,sBAAA,cAACC,QAAAA;IAAKC,MAAK;IAAOC,WAAU;IAAoBC,cAAYJ;IAASK,IAAIL;KACtEM,WAAWN,OAAAA,EAASO,IAAI,CAACC,GAAGC,MAC3B,sBAAA,cAACR,QAAAA;IAAKS,KAAKD;IAAGN,WAAWQ;KACtBH,CAAAA,CAAAA,CAAAA;AAKX;;;AEhBA,OAAOI,UAASC,gBAAgB;AAEhC,SAASC,gBAAgB;AACzB,SAASC,mBAAmBC,sBAAsB;AAClD,SAASC,MAAAA,WAAU;AAMZ,IAAMC,gBAAgB,MAAA;AAC3B,QAAM,EAAEC,EAAC,IAA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BAAa,CAAA;AACbP,iBAAW,IAAA;IACb,WAAW,OAAON,gBAAgB,aAAa;AAC7CM,iBAAW,KAAA;IACb;EACF,GAAG;IAACN;GAAY;AAGhB,QAAMoB,WAAgC,OAAOC,YAAAA;AAC3C,UAAM,EAAEC,MAAMC,QAAQT,OAAOU,KAAI,IAAKH;AACtC,YAAQC,MAAAA;MACN,KAAKG,OAAOC;AACVxD,qBAAamD,QAAQzC,KAAKT,MAAM;AAChC;MACF,KAAKsD,OAAOE;AACV;MACF,KAAKF,OAAOG;AACVnD,0BAAkB4C,QAAQzC,KAAKT,MAAM;AACrC,gBAAQoD,QAAAA;UACN,KAAKM,QAAQC;AACX,gBAAIhB,QAAQU,OAAO,GAAG;AACpBX,2BAAaC,QAAQ,CAAA;YACvB;AACA;UACF,KAAKe,QAAQE;AACX,gBAAIjB,QAAQ,GAAG;AACbD,2BAAaC,QAAQ,CAAA;YACvB;AACA;UACF,KAAKe,QAAQG;AACXf,8BAAkB,KAAA;AAClBJ,yBAAa,CAAA;AACb;QACJ;AACA;IACJ;EACF;AAEA,SACE,gBAAAoB,OAAA,cAACC,YAAYC,UAAQ;IACnBC,OAAO;MACLrC,SAASA,WAAW,CAACY;MACrBd;MACAa;MACA2B,UAAUxB;MACVyB,OAAO,MAAMrB,kBAAkB,IAAA;MAC/BsB,MAAM,MAAMtB,kBAAkB,KAAA;IAChC;KAEA,gBAAAgB,OAAA,cAACO,SAAAA,MACE;;UAEC,GAEJ,gBAAAP,OAAA,cAACQ,SAAAA;IACCC,YAAY;IACZ7C;IACAW;IACAmC,KAAK5C,WAAW,CAACY;IACjBS;IACAwB;IACAC,kBAAkBC;;AAI1B;",
|
|
6
|
-
"names": ["React", "keySymbols", "mx", "shortcutKey", "mx", "Key", "binding", "span", "role", "className", "aria-label", "id", "keySymbols", "map", "c", "i", "key", "shortcutKey", "React", "Fragment", "Keyboard", "toLocalizedString", "useTranslation", "mx", "ShortcutsList", "t", "useTranslation", "meta", "id", "bindings", "Keyboard", "singleton", "getBindings", "sort", "a", "b", "toLocalizedString", "data", "toLowerCase", "localeCompare", "React", "dl", "className", "mx", "map", "binding", "i", "Fragment", "key", "Key", "shortcut", "span", "role", "aria-labelledby", "React", "Dialog", "IconButton", "useTranslation", "SHORTCUTS_DIALOG", "meta", "id", "ShortcutsDialogContent", "t", "useTranslation", "React", "Dialog", "Content", "div", "role", "className", "Title", "Close", "asChild", "IconButton", "icon", "iconOnly", "size", "label", "variant", "autoFocus", "ShortcutsList", "React", "Keyboard", "IconButton", "toLocalizedString", "useTranslation", "osTranslations", "Shortcut", "binding", "t", "useTranslation", "osTranslations", "React", "div", "role", "className", "Key", "shortcut", "span", "toLocalizedString", "data", "ShortcutsHints", "onClose", "defaults", "bindings", "Keyboard", "singleton", "getBindings", "hints", "filter", "includes", "map", "key", "IconButton", "icon", "size", "label", "iconOnly", "noTooltip", "variant", "classNames", "onClick", "React", "descriptionText", "ShortcutsSection", "React", "section", "className", "descriptionText", "ShortcutsList", "useArrowNavigationGroup", "useFocusableGroup", "React", "forwardRef", "Button", "Icon", "IconButton", "floaterProps", "styles", "arrow", "length", "spread", "floater", "filter", "Tooltip", "forwardRef", "step", "title", "content", "index", "size", "isLastStep", "backProps", "closeProps", "primaryProps", "forwardedRef", "arrowNavigationAttrs", "useArrowNavigationGroup", "axis", "focusableGroupAttrs", "useFocusableGroup", "tabBehavior", "React", "div", "className", "role", "data-testid", "data-step", "ref", "h2", "IconButton", "density", "icon", "iconOnly", "label", "onClick", "variant", "classNames", "Array", "from", "map", "_", "i", "Icon", "key", "Button", "autoFocus", "React", "useState", "Joyride", "ACTIONS", "EVENTS", "useLayout", "usePluginManager", "useAsyncEffect", "addStepClass", "target", "element", "document", "querySelector", "classList", "add", "removeTargetClass", "remove", "getTarget", "step", "waitForTarget", "Promise", "resolve", "observer", "MutationObserver", "mutations", "forEach", "mutation", "addedNodes", "length", "disconnect", "observe", "body", "childList", "subtree", "WelcomeTour", "steps", "initialSteps", "running", "runningProp", "onRunningChanged", "manager", "usePluginManager", "layout", "useLayout", "setRunning", "useState", "stepIndex", "_setStepIndex", "setSteps", "paused", "dialogOpen", "setStepIndex", "index", "before", "capabilities", "setRunningChanged", "state", "useAsyncEffect", "callback", "options", "type", "action", "size", "EVENTS", "STEP_BEFORE", "TOUR_END", "STEP_AFTER", "ACTIONS", "NEXT", "PREV", "CLOSE", "React", "HelpContext", "Provider", "value", "setIndex", "start", "stop", "style", "Joyride", "continuous", "run", "floaterProps", "tooltipComponent", "Tooltip"]
|
|
7
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
WelcomeTour
|
|
3
|
-
} from "./chunk-W5XAZM46.mjs";
|
|
4
|
-
import {
|
|
5
|
-
HelpCapabilities
|
|
6
|
-
} from "./chunk-TS66J4C6.mjs";
|
|
7
|
-
import {
|
|
8
|
-
meta
|
|
9
|
-
} from "./chunk-IM2QVQOH.mjs";
|
|
10
|
-
|
|
11
|
-
// src/capabilities/react-root/react-root.tsx
|
|
12
|
-
import * as Effect from "effect/Effect";
|
|
13
|
-
import React from "react";
|
|
14
|
-
import { Capability, Common } from "@dxos/app-framework";
|
|
15
|
-
import { useAtomCapabilityState } from "@dxos/app-framework/react";
|
|
16
|
-
var react_root_default = Capability.makeModule(Effect.fnUntraced(function* (steps) {
|
|
17
|
-
return Capability.contributes(Common.Capability.ReactRoot, {
|
|
18
|
-
id: meta.id,
|
|
19
|
-
root: () => {
|
|
20
|
-
const [state, updateState] = useAtomCapabilityState(HelpCapabilities.State);
|
|
21
|
-
return /* @__PURE__ */ React.createElement(WelcomeTour, {
|
|
22
|
-
steps: steps ?? [],
|
|
23
|
-
running: state.running,
|
|
24
|
-
onRunningChanged: (newState) => {
|
|
25
|
-
updateState((s) => ({
|
|
26
|
-
...s,
|
|
27
|
-
running: newState
|
|
28
|
-
}));
|
|
29
|
-
if (!newState) {
|
|
30
|
-
updateState((s) => ({
|
|
31
|
-
...s,
|
|
32
|
-
showHints: false
|
|
33
|
-
}));
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
}));
|
|
40
|
-
export {
|
|
41
|
-
react_root_default as default
|
|
42
|
-
};
|
|
43
|
-
//# sourceMappingURL=react-root-SZRF6EXG.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/react-root/react-root.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport React from 'react';\n\nimport { Capability, Common } from '@dxos/app-framework';\nimport { useAtomCapabilityState } from '@dxos/app-framework/react';\n\nimport { WelcomeTour } from '../../components';\nimport { meta } from '../../meta';\nimport { HelpCapabilities, type Step } from '../../types';\n\nexport default Capability.makeModule(\n Effect.fnUntraced(function* (steps?: Step[]) {\n return Capability.contributes(Common.Capability.ReactRoot, {\n id: meta.id,\n root: () => {\n const [state, updateState] = useAtomCapabilityState(HelpCapabilities.State);\n return (\n <WelcomeTour\n steps={steps ?? []}\n running={state.running}\n onRunningChanged={(newState) => {\n updateState((s) => ({ ...s, running: newState }));\n if (!newState) {\n updateState((s) => ({ ...s, showHints: false }));\n }\n }}\n />\n );\n },\n });\n }),\n);\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;AAIA,YAAYA,YAAY;AACxB,OAAOC,WAAW;AAElB,SAASC,YAAYC,cAAc;AACnC,SAASC,8BAA8B;AAMvC,IAAA,qBAAeC,WAAWC,WACjBC,kBAAW,WAAWC,OAAc;AACzC,SAAOH,WAAWI,YAAYC,OAAOL,WAAWM,WAAW;IACzDC,IAAIC,KAAKD;IACTE,MAAM,MAAA;AACJ,YAAM,CAACC,OAAOC,WAAAA,IAAeC,uBAAuBC,iBAAiBC,KAAK;AAC1E,aACE,sBAAA,cAACC,aAAAA;QACCZ,OAAOA,SAAS,CAAA;QAChBa,SAASN,MAAMM;QACfC,kBAAkB,CAACC,aAAAA;AACjBP,sBAAY,CAACQ,OAAO;YAAE,GAAGA;YAAGH,SAASE;UAAS,EAAA;AAC9C,cAAI,CAACA,UAAU;AACbP,wBAAY,CAACQ,OAAO;cAAE,GAAGA;cAAGC,WAAW;YAAM,EAAA;UAC/C;QACF;;IAGN;EACF,CAAA;AACF,CAAA,CAAA;",
|
|
6
|
-
"names": ["Effect", "React", "Capability", "Common", "useAtomCapabilityState", "Capability", "makeModule", "fnUntraced", "steps", "contributes", "Common", "ReactRoot", "id", "meta", "root", "state", "updateState", "useAtomCapabilityState", "HelpCapabilities", "State", "WelcomeTour", "running", "onRunningChanged", "newState", "s", "showHints"]
|
|
7
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
SHORTCUTS_DIALOG,
|
|
3
|
-
ShortcutsDialogContent,
|
|
4
|
-
ShortcutsHints,
|
|
5
|
-
ShortcutsList
|
|
6
|
-
} from "./chunk-W5XAZM46.mjs";
|
|
7
|
-
import "./chunk-TS66J4C6.mjs";
|
|
8
|
-
import {
|
|
9
|
-
meta
|
|
10
|
-
} from "./chunk-IM2QVQOH.mjs";
|
|
11
|
-
|
|
12
|
-
// src/capabilities/react-surface/react-surface.tsx
|
|
13
|
-
import * as Effect from "effect/Effect";
|
|
14
|
-
import React from "react";
|
|
15
|
-
import { Capability, Common } from "@dxos/app-framework";
|
|
16
|
-
var react_surface_default = Capability.makeModule(() => Effect.succeed(Capability.contributes(Common.Capability.ReactSurface, [
|
|
17
|
-
Common.createSurface({
|
|
18
|
-
id: `${meta.id}/hints`,
|
|
19
|
-
role: "hints",
|
|
20
|
-
component: () => /* @__PURE__ */ React.createElement(ShortcutsHints, null)
|
|
21
|
-
}),
|
|
22
|
-
Common.createSurface({
|
|
23
|
-
id: `${meta.id}/keyshortcuts`,
|
|
24
|
-
role: "keyshortcuts",
|
|
25
|
-
component: () => /* @__PURE__ */ React.createElement(ShortcutsList, null)
|
|
26
|
-
}),
|
|
27
|
-
Common.createSurface({
|
|
28
|
-
id: SHORTCUTS_DIALOG,
|
|
29
|
-
role: "dialog",
|
|
30
|
-
filter: (data) => data.component === SHORTCUTS_DIALOG,
|
|
31
|
-
component: () => /* @__PURE__ */ React.createElement(ShortcutsDialogContent, null)
|
|
32
|
-
})
|
|
33
|
-
])));
|
|
34
|
-
export {
|
|
35
|
-
react_surface_default as default
|
|
36
|
-
};
|
|
37
|
-
//# sourceMappingURL=react-surface-DWNTJBVM.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/react-surface/react-surface.tsx"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport React from 'react';\n\nimport { Capability, Common } from '@dxos/app-framework';\n\nimport { SHORTCUTS_DIALOG, ShortcutsDialogContent, ShortcutsHints, ShortcutsList } from '../../components';\nimport { meta } from '../../meta';\n\nexport default Capability.makeModule(() =>\n Effect.succeed(\n Capability.contributes(Common.Capability.ReactSurface, [\n Common.createSurface({\n id: `${meta.id}/hints`,\n role: 'hints',\n component: () => <ShortcutsHints />,\n }),\n Common.createSurface({\n id: `${meta.id}/keyshortcuts`,\n role: 'keyshortcuts',\n component: () => <ShortcutsList />,\n }),\n Common.createSurface({\n id: SHORTCUTS_DIALOG,\n role: 'dialog',\n filter: (data): data is { component: string } => data.component === SHORTCUTS_DIALOG,\n component: () => <ShortcutsDialogContent />,\n }),\n ]),\n ),\n);\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;AAIA,YAAYA,YAAY;AACxB,OAAOC,WAAW;AAElB,SAASC,YAAYC,cAAc;AAKnC,IAAA,wBAAeC,WAAWC,WAAW,MAC5BC,eACLF,WAAWG,YAAYC,OAAOJ,WAAWK,cAAc;EACrDD,OAAOE,cAAc;IACnBC,IAAI,GAAGC,KAAKD,EAAE;IACdE,MAAM;IACNC,WAAW,MAAM,sBAAA,cAACC,gBAAAA,IAAAA;EACpB,CAAA;EACAP,OAAOE,cAAc;IACnBC,IAAI,GAAGC,KAAKD,EAAE;IACdE,MAAM;IACNC,WAAW,MAAM,sBAAA,cAACE,eAAAA,IAAAA;EACpB,CAAA;EACAR,OAAOE,cAAc;IACnBC,IAAIM;IACJJ,MAAM;IACNK,QAAQ,CAACC,SAAwCA,KAAKL,cAAcG;IACpEH,WAAW,MAAM,sBAAA,cAACM,wBAAAA,IAAAA;EACpB,CAAA;CACD,CAAA,CAAA;",
|
|
6
|
-
"names": ["Effect", "React", "Capability", "Common", "Capability", "makeModule", "succeed", "contributes", "Common", "ReactSurface", "createSurface", "id", "meta", "role", "component", "ShortcutsHints", "ShortcutsList", "SHORTCUTS_DIALOG", "filter", "data", "ShortcutsDialogContent"]
|
|
7
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
HelpCapabilities
|
|
3
|
-
} from "./chunk-TS66J4C6.mjs";
|
|
4
|
-
import {
|
|
5
|
-
meta
|
|
6
|
-
} from "./chunk-IM2QVQOH.mjs";
|
|
7
|
-
|
|
8
|
-
// src/capabilities/state/state.ts
|
|
9
|
-
import * as Effect from "effect/Effect";
|
|
10
|
-
import { Capability } from "@dxos/app-framework";
|
|
11
|
-
import { createKvsStore } from "@dxos/effect";
|
|
12
|
-
var state_default = Capability.makeModule(() => Effect.sync(() => {
|
|
13
|
-
const stateAtom = createKvsStore({
|
|
14
|
-
key: meta.id,
|
|
15
|
-
schema: HelpCapabilities.StateSchema,
|
|
16
|
-
defaultValue: () => ({
|
|
17
|
-
running: false,
|
|
18
|
-
showHints: true,
|
|
19
|
-
showWelcome: true
|
|
20
|
-
})
|
|
21
|
-
});
|
|
22
|
-
return Capability.contributes(HelpCapabilities.State, stateAtom);
|
|
23
|
-
}));
|
|
24
|
-
export {
|
|
25
|
-
state_default as default
|
|
26
|
-
};
|
|
27
|
-
//# sourceMappingURL=state-VRPLKT3F.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/state/state.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability } from '@dxos/app-framework';\nimport { createKvsStore } from '@dxos/effect';\n\nimport { meta } from '../../meta';\nimport { HelpCapabilities } from '../../types';\n\nexport default Capability.makeModule(() =>\n Effect.sync(() => {\n const stateAtom = createKvsStore({\n key: meta.id,\n schema: HelpCapabilities.StateSchema,\n defaultValue: () => ({\n running: false,\n showHints: true,\n showWelcome: true,\n }),\n });\n\n return Capability.contributes(HelpCapabilities.State, stateAtom);\n }),\n);\n"],
|
|
5
|
-
"mappings": ";;;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,sBAAsB;AAK/B,IAAA,gBAAeC,WAAWC,WAAW,MAC5BC,YAAK,MAAA;AACV,QAAMC,YAAYC,eAAe;IAC/BC,KAAKC,KAAKC;IACVC,QAAQC,iBAAiBC;IACzBC,cAAc,OAAO;MACnBC,SAAS;MACTC,WAAW;MACXC,aAAa;IACf;EACF,CAAA;AAEA,SAAOd,WAAWe,YAAYN,iBAAiBO,OAAOb,SAAAA;AACxD,CAAA,CAAA;",
|
|
6
|
-
"names": ["Effect", "Capability", "createKvsStore", "Capability", "makeModule", "sync", "stateAtom", "createKvsStore", "key", "meta", "id", "schema", "HelpCapabilities", "StateSchema", "defaultValue", "running", "showHints", "showWelcome", "contributes", "State"]
|
|
7
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import * as Effect from 'effect/Effect';
|
|
2
|
-
import { Capability } from '@dxos/app-framework';
|
|
3
|
-
import { GraphBuilder } from '@dxos/app-graph';
|
|
4
|
-
declare const _default: (props?: void | undefined) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<GraphBuilder.BuilderExtensions>>, never, never>;
|
|
5
|
-
export default _default;
|
|
6
|
-
//# sourceMappingURL=app-graph-builder.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"app-graph-builder.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/app-graph-builder/app-graph-builder.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,UAAU,EAAU,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAe,MAAM,iBAAiB,CAAC;;AAO5D,wBA8CE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/app-graph-builder/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,eAAO,MAAM,eAAe,qIAA0E,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/operation-resolver/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import * as Effect from 'effect/Effect';
|
|
2
|
-
import { Capability, Common } from '@dxos/app-framework';
|
|
3
|
-
declare const _default: (props?: void | undefined) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<Common.Capability.OperationResolver[]>>, never, never>;
|
|
4
|
-
export default _default;
|
|
5
|
-
//# sourceMappingURL=operation-resolver.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"operation-resolver.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/operation-resolver/operation-resolver.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;;AAKzD,wBAWE"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Capability } from '@dxos/app-framework';
|
|
2
|
-
export declare const ReactRoot: Capability.LazyCapability<import("../..").Step[], Capability.Capability<Capability.InterfaceDef<Readonly<{
|
|
3
|
-
id: string;
|
|
4
|
-
root: import("react").FC<import("react").PropsWithChildren>;
|
|
5
|
-
}>>>, Error>;
|
|
6
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/react-root/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,eAAO,MAAM,SAAS;;;YAA6D,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"react-root.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/react-root/react-root.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,UAAU,EAAU,MAAM,qBAAqB,CAAC;AAKzD,OAAO,EAAoB,KAAK,IAAI,EAAE,MAAM,aAAa,CAAC;;;;;AAE1D,wBAqBE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/react-surface/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,eAAO,MAAM,YAAY,sJAAmE,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import * as Effect from 'effect/Effect';
|
|
2
|
-
import { Capability, Common } from '@dxos/app-framework';
|
|
3
|
-
declare const _default: (props?: void | undefined) => Effect.Effect<Capability.Capability<Capability.InterfaceDef<Common.Capability.ReactSurface>>, never, never>;
|
|
4
|
-
export default _default;
|
|
5
|
-
//# sourceMappingURL=react-surface.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"react-surface.d.ts","sourceRoot":"","sources":["../../../../../src/capabilities/react-surface/react-surface.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAGxC,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;;AAKzD,wBAqBE"}
|