@eifi1/ui-kit 0.50.0 → 0.51.0
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/README.md +14 -12
- package/dist/admin/user-roster.js +31 -12
- package/dist/admin/user-roster.js.map +1 -1
- package/dist/auth/verify-email.d.ts +4 -0
- package/dist/auth/verify-email.js.map +1 -1
- package/dist/components/alert-banner.d.ts +9 -0
- package/dist/components/alert-banner.js +9 -5
- package/dist/components/alert-banner.js.map +1 -1
- package/dist/components/autocomplete.js +13 -0
- package/dist/components/autocomplete.js.map +1 -1
- package/dist/components/button-look.d.ts +4 -19
- package/dist/components/button-look.js +3 -30
- package/dist/components/button-look.js.map +1 -1
- package/dist/components/combobox.js +3 -1
- package/dist/components/combobox.js.map +1 -1
- package/dist/components/data-table-fit.js.map +1 -1
- package/dist/components/data-table-virtual.js +1 -0
- package/dist/components/data-table-virtual.js.map +1 -1
- package/dist/components/field-base.d.ts +31 -1
- package/dist/components/field-base.js +28 -0
- package/dist/components/field-base.js.map +1 -1
- package/dist/components/floating-panel.d.ts +6 -13
- package/dist/components/floating-panel.js +2 -9
- package/dist/components/floating-panel.js.map +1 -1
- package/dist/components/icon-button.js +3 -5
- package/dist/components/icon-button.js.map +1 -1
- package/dist/components/inline-entity-combobox.js +12 -0
- package/dist/components/inline-entity-combobox.js.map +1 -1
- package/dist/components/select.js +3 -2
- package/dist/components/select.js.map +1 -1
- package/dist/components/stat-tile.d.ts +8 -1
- package/dist/components/stat-tile.js +7 -3
- package/dist/components/stat-tile.js.map +1 -1
- package/dist/eslint/index.js +1 -1
- package/dist/i18n/german.js +2 -0
- package/dist/i18n/german.js.map +1 -1
- package/dist/i18n/kit-labels.d.ts +2 -2
- package/dist/i18n/kit-labels.js.map +1 -1
- package/dist/i18n/locales/en.js +2 -0
- package/dist/i18n/locales/en.js.map +2 -2
- package/dist/i18n/locales/es.js +2 -0
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.js +2 -0
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hu.js +2 -0
- package/dist/i18n/locales/hu.js.map +1 -1
- package/dist/i18n/locales/it.js +2 -0
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/zh.js +2 -0
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/landing/page-seo.d.ts +19 -11
- package/dist/landing/page-seo.js +11 -7
- package/dist/landing/page-seo.js.map +1 -1
- package/dist/landing/public-page.d.ts +57 -0
- package/dist/landing/public-page.js +45 -0
- package/dist/landing/public-page.js.map +1 -0
- package/dist/lib/quiet-focus.d.ts +4 -0
- package/dist/lib/quiet-focus.js +19 -0
- package/dist/lib/quiet-focus.js.map +1 -0
- package/dist/lib/server-wake.d.ts +3 -2
- package/dist/lib/server-wake.js +19 -13
- package/dist/lib/server-wake.js.map +1 -1
- package/dist/shell/app-shell.d.ts +2 -15
- package/dist/shell/app-shell.js +7 -26
- package/dist/shell/app-shell.js.map +1 -1
- package/dist/shell/dev-menu.d.ts +98 -0
- package/dist/shell/dev-menu.js +133 -0
- package/dist/shell/dev-menu.js.map +1 -0
- package/dist/shell/dev-switchers.d.ts +6 -53
- package/dist/shell/dev-switchers.js +5 -100
- package/dist/shell/dev-switchers.js.map +1 -1
- package/dist/shell/top-bar-actions.d.ts +4 -1
- package/dist/shell/top-bar-actions.js.map +1 -1
- package/dist/shell/top-bar-parts-labels.d.ts +18 -9
- package/dist/shell/top-bar-parts-labels.js +2 -0
- package/dist/shell/top-bar-parts-labels.js.map +1 -1
- package/dist/shell/topbar-action-menu.d.ts +17 -2
- package/dist/shell/topbar-action-menu.js +3 -1
- package/dist/shell/topbar-action-menu.js.map +1 -1
- package/dist/shell.d.ts +3 -1
- package/dist/shell.js +3 -1
- package/dist/shell.js.map +1 -1
- package/dist/testing/index.d.ts +1 -0
- package/dist/testing/index.js +4 -0
- package/dist/testing/index.js.map +1 -1
- package/dist/testing/tour.d.ts +31 -0
- package/dist/testing/tour.js +12 -0
- package/dist/testing/tour.js.map +1 -0
- package/dist/theme/palette-presets.d.ts +0 -3
- package/dist/theme/palette-presets.js +0 -2
- package/dist/theme/palette-presets.js.map +1 -1
- package/dist/tour/tour-engine.d.ts +12 -0
- package/dist/tour/tour-engine.js +31 -0
- package/dist/tour/tour-engine.js.map +1 -0
- package/dist/tour/tour.d.ts +14 -3
- package/dist/tour/tour.js +60 -45
- package/dist/tour/tour.js.map +1 -1
- package/dist/tour/use-tour-url-sync.d.ts +5 -3
- package/dist/tour/use-tour-url-sync.js +21 -1
- package/dist/tour/use-tour-url-sync.js.map +1 -1
- package/package.json +1 -1
- package/src/admin/user-roster.tsx +30 -10
- package/src/auth/verify-email.tsx +4 -0
- package/src/components/alert-banner.tsx +37 -10
- package/src/components/autocomplete.tsx +18 -0
- package/src/components/button-look.ts +7 -57
- package/src/components/combobox.tsx +5 -1
- package/src/components/data-table-fit.ts +4 -1
- package/src/components/data-table-virtual.ts +14 -1
- package/src/components/field-base.tsx +53 -1
- package/src/components/floating-panel.tsx +6 -28
- package/src/components/icon-button.tsx +6 -8
- package/src/components/inline-entity-combobox.tsx +17 -0
- package/src/components/select.tsx +3 -6
- package/src/components/stat-tile.tsx +27 -9
- package/src/i18n/german.ts +2 -0
- package/src/i18n/kit-labels.tsx +2 -2
- package/src/i18n/locales/es.ts +2 -0
- package/src/i18n/locales/fr.ts +2 -0
- package/src/i18n/locales/hu.ts +2 -0
- package/src/i18n/locales/it.ts +2 -0
- package/src/i18n/locales/zh.ts +2 -0
- package/src/index.ts +4 -1
- package/src/landing/page-seo.ts +28 -16
- package/src/landing/public-page.tsx +106 -0
- package/src/lib/quiet-focus.ts +32 -0
- package/src/lib/server-wake.ts +41 -17
- package/src/shell/app-shell.tsx +11 -48
- package/src/shell/dev-menu.tsx +259 -0
- package/src/shell/dev-switchers.tsx +13 -174
- package/src/shell/top-bar-actions.tsx +4 -1
- package/src/shell/top-bar-parts-labels.ts +20 -9
- package/src/shell/topbar-action-menu.tsx +28 -2
- package/src/shell.ts +5 -1
- package/src/testing/index.ts +8 -0
- package/src/testing/tour.ts +41 -0
- package/src/theme/palette-presets.ts +0 -4
- package/src/tour/tour-engine.ts +41 -0
- package/src/tour/tour.tsx +64 -24
- package/src/tour/use-tour-url-sync.ts +33 -4
package/dist/tour/tour.js
CHANGED
|
@@ -21,11 +21,26 @@ import { useDismissLayer } from "../hooks/use-dismiss.js";
|
|
|
21
21
|
import { sameRect } from "../hooks/use-anchored-rect.js";
|
|
22
22
|
import { dirOf, horizontalStep } from "../lib/direction.js";
|
|
23
23
|
import { isComposing } from "../lib/ime.js";
|
|
24
|
+
import { focusQuietly } from "../lib/quiet-focus.js";
|
|
24
25
|
import { DEFAULT_TOUR_LABELS } from "./tour-labels.js";
|
|
25
26
|
import { completeStored, rememberAccount, rememberMigrate } from "./use-tour-progress.js";
|
|
26
27
|
import { createGateRegistry, devWarnings, TourInternalContext } from "./tour-gates.js";
|
|
28
|
+
import { liveEngine } from "./tour-engine.js";
|
|
27
29
|
import { DOCK_MAX_WIDTH, dockEdge, dockStyle, readBand, scrollIntoFreeHalf } from "./tour-dock.js";
|
|
28
30
|
import { useTourGate, useTourGateRelease } from "./tour-gates.js";
|
|
31
|
+
const ENGINE_KEYS = [
|
|
32
|
+
"active",
|
|
33
|
+
"activeId",
|
|
34
|
+
"start",
|
|
35
|
+
"stop",
|
|
36
|
+
"next",
|
|
37
|
+
"prev",
|
|
38
|
+
"goToStep",
|
|
39
|
+
"index",
|
|
40
|
+
"total",
|
|
41
|
+
"position",
|
|
42
|
+
"count"
|
|
43
|
+
];
|
|
29
44
|
const TourContext = createContext(null);
|
|
30
45
|
function useTour() {
|
|
31
46
|
const ctx = useContext(TourContext);
|
|
@@ -133,6 +148,8 @@ function TourProvider({
|
|
|
133
148
|
[arrive, forward, backward]
|
|
134
149
|
);
|
|
135
150
|
const ownStartRef = useRef(null);
|
|
151
|
+
const [live] = useState(() => liveEngine(ENGINE_KEYS));
|
|
152
|
+
const engine = live.engine;
|
|
136
153
|
const start = useCallback(
|
|
137
154
|
(what, opts) => {
|
|
138
155
|
if (typeof what !== "string") {
|
|
@@ -144,11 +161,11 @@ function TourProvider({
|
|
|
144
161
|
if (devWarnings()) console.warn(`[ui-kit] start("${what}") needs TourProvider's \`launch\` prop.`);
|
|
145
162
|
return;
|
|
146
163
|
}
|
|
147
|
-
void Promise.resolve(run(what, { at: opts?.at }, ownStartRef.current)).catch(
|
|
164
|
+
void Promise.resolve(run(what, { at: opts?.at }, ownStartRef.current, engine)).catch(
|
|
148
165
|
(error) => console.error(error)
|
|
149
166
|
);
|
|
150
167
|
},
|
|
151
|
-
[startSteps]
|
|
168
|
+
[startSteps, engine]
|
|
152
169
|
);
|
|
153
170
|
useLayoutEffect(() => {
|
|
154
171
|
ownStartRef.current = start;
|
|
@@ -228,46 +245,44 @@ function TourProvider({
|
|
|
228
245
|
else arrive(s, to, "next");
|
|
229
246
|
});
|
|
230
247
|
}, [active, gates, arrive, forward, finish]);
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
248
|
+
const value = {
|
|
249
|
+
active,
|
|
250
|
+
activeId,
|
|
251
|
+
start,
|
|
252
|
+
stop,
|
|
253
|
+
next,
|
|
254
|
+
prev,
|
|
255
|
+
goToStep,
|
|
256
|
+
index,
|
|
257
|
+
total,
|
|
258
|
+
position: active ? nav.position : 0,
|
|
259
|
+
count: active ? nav.count : 0
|
|
260
|
+
};
|
|
261
|
+
useLayoutEffect(() => {
|
|
262
|
+
live.set(value);
|
|
263
|
+
});
|
|
264
|
+
return /* @__PURE__ */ jsx(TourInternalContext.Provider, { value: internals, children: /* @__PURE__ */ jsxs(TourContext.Provider, { value, children: [
|
|
265
|
+
children,
|
|
266
|
+
active && /* @__PURE__ */ jsx(
|
|
267
|
+
TourOverlay,
|
|
268
|
+
{
|
|
269
|
+
steps,
|
|
242
270
|
index,
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
refusal: refusal?.step === steps[index] ? refusal : null,
|
|
259
|
-
onGoTo: goToStep,
|
|
260
|
-
labels: merged,
|
|
261
|
-
gates,
|
|
262
|
-
dockOnPhones,
|
|
263
|
-
onNext: next,
|
|
264
|
-
onPrev: prev,
|
|
265
|
-
onSkip: skip
|
|
266
|
-
}
|
|
267
|
-
)
|
|
268
|
-
]
|
|
269
|
-
}
|
|
270
|
-
) });
|
|
271
|
+
via: nav.via,
|
|
272
|
+
floor: nav.floor,
|
|
273
|
+
position: nav.position,
|
|
274
|
+
count: nav.count,
|
|
275
|
+
refusal: refusal?.step === steps[index] ? refusal : null,
|
|
276
|
+
onGoTo: goToStep,
|
|
277
|
+
labels: merged,
|
|
278
|
+
gates,
|
|
279
|
+
dockOnPhones,
|
|
280
|
+
onNext: next,
|
|
281
|
+
onPrev: prev,
|
|
282
|
+
onSkip: skip
|
|
283
|
+
}
|
|
284
|
+
)
|
|
285
|
+
] }) });
|
|
271
286
|
}
|
|
272
287
|
const NO_NAV = { index: 0, floor: 0, via: "start", position: 0, count: 0 };
|
|
273
288
|
const NOOP = () => {
|
|
@@ -558,11 +573,11 @@ function TourOverlay({
|
|
|
558
573
|
if (!ready || !guided || !step.target) return;
|
|
559
574
|
const el = queryVisibleTarget(step.target);
|
|
560
575
|
const control = el ? firstFocusable(el) : null;
|
|
576
|
+
const previous = control ? control.getAttribute("aria-describedby") : null;
|
|
577
|
+
if (control) control.setAttribute("aria-describedby", previous ? `${previous} ${bodyId}` : bodyId);
|
|
561
578
|
if (coarsePointer() || !control) cardRef.current?.focus();
|
|
562
|
-
else if (!el.contains(document.activeElement)) control
|
|
579
|
+
else if (!el.contains(document.activeElement)) focusQuietly(control);
|
|
563
580
|
if (!control) return;
|
|
564
|
-
const previous = control.getAttribute("aria-describedby");
|
|
565
|
-
control.setAttribute("aria-describedby", previous ? `${previous} ${bodyId}` : bodyId);
|
|
566
581
|
return () => {
|
|
567
582
|
if (previous === null) control.removeAttribute("aria-describedby");
|
|
568
583
|
else control.setAttribute("aria-describedby", previous);
|
|
@@ -672,7 +687,7 @@ function TourOverlay({
|
|
|
672
687
|
const lockedNext = useCallback(() => {
|
|
673
688
|
const el = step.target ? queryVisibleTarget(step.target) : null;
|
|
674
689
|
const control = el ? firstFocusable(el) : null;
|
|
675
|
-
control
|
|
690
|
+
if (control) focusQuietly(control);
|
|
676
691
|
announce(gateHint);
|
|
677
692
|
}, [step.target, announce, gateHint]);
|
|
678
693
|
const tryNext = awaitsRelease ? NOOP : locked ? lockedNext : onNext;
|