@povio/ui 5.0.0-rc.14 → 5.0.0-rc.16
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/{AppCanvasPage-vta1j5YQ.js → AppCanvasPage-C3KN-Pwb.js} +156 -589
- package/dist/{AppCanvasPage-BZ2mrKY4.d.ts → AppCanvasPage-U9SxNwjS.d.ts} +1 -1
- package/dist/{BottomSheet-BXLE3161.js → BottomSheet-AqYVSMK9.js} +1 -75
- package/dist/BottomSheetHeader-Be6Elvs2.js +79 -0
- package/dist/{Calendar-DRHruqr_.js → Calendar-1p3VjSED.js} +3 -3
- package/dist/{CanvasComponentsFrame-D6Mh_G3q.js → CanvasComponentsFrame-Dp0oDDoH.js} +6 -6
- package/dist/{UIConfigurator-CjAW1SJY.js → CanvasInspector-TC9DOf5p.js} +1456 -500
- package/dist/{ComponentGallery-CzKU899_.js → ComponentGallery-C_rXFvUY.js} +250 -1797
- package/dist/{DatePicker-xDEqzNJv.js → DatePicker-CAzuZRmd.js} +6 -6
- package/dist/{DatePickerInput-B0fEeCOf.js → DatePickerInput-BeQOVCk0.js} +4 -3
- package/dist/{DateRangePicker-DxuVhRaf.js → DateRangePicker-X3mBhfmL.js} +5 -5
- package/dist/{DateTimePicker-4N1Pka07.js → DateTimePicker-EtmGtoRe.js} +6 -6
- package/dist/{InputItem-Cv19Hwnx.js → InputItem-yC5oMyN-.js} +7 -7
- package/dist/{Inputs-D1aE_J9f.js → Inputs-Bd2nRNqk.js} +1 -1
- package/dist/{NumberRangeInput-Bzfe-RlV.js → NumberRangeInput-TkPXiWV3.js} +2 -2
- package/dist/{RichTextEditor-Bd7F5D8f.js → RichTextEditor-DiaPcBUM.js} +110 -32
- package/dist/{Select-CgIhoWgk.js → Select-tNlFSbAC.js} +5 -5
- package/dist/{Table-piX1SWvN.js → Table-CgG02oHQ.js} +1 -1
- package/dist/{TextArea-uPffb457.js → TextArea-DuvFUjts.js} +1 -1
- package/dist/{TimePicker-DN-i98z5.js → TimePicker-CBkiE-Yq.js} +5 -4
- package/dist/{TooltipWrapper-CDHFaUKZ.js → TooltipWrapper-CSXs5-E3.js} +2 -2
- package/dist/components/autocomplete.js +3 -3
- package/dist/components/bottom-sheet.js +1 -1
- package/dist/components/date-picker.js +1 -1
- package/dist/components/date-range-picker.js +1 -1
- package/dist/components/date-time-picker.js +1 -1
- package/dist/components/input.js +3 -3
- package/dist/components/number-field.js +3 -3
- package/dist/components/number-range-input.js +1 -1
- package/dist/components/query-autocomplete.js +1 -1
- package/dist/components/query-select.js +2 -2
- package/dist/components/select.js +1 -1
- package/dist/components/text-area.js +1 -1
- package/dist/components/time-picker.js +1 -1
- package/dist/config/app-canvas-tanstack.d.ts +1 -1
- package/dist/config/app-canvas-tanstack.js +1 -1
- package/dist/config/app-canvas.d.ts +1 -1
- package/dist/config/app-canvas.js +1 -1
- package/dist/config/ui-configurator.d.ts +35 -2
- package/dist/config/ui-configurator.js +214 -3
- package/dist/{datePickerValue.utils-QWR2q5Vv.js → datePickerValue.utils-BDB6KM8q.js} +1 -1
- package/dist/demos-DIwj5vc0.js +2011 -0
- package/dist/index.js +7 -7
- package/dist/{logger-CqZjM-sn.js → logger-CW24po62.js} +10 -1
- package/dist/rhf/date-picker.js +1 -1
- package/dist/rhf/date-range-picker.js +1 -1
- package/dist/rhf/date-time-picker.js +1 -1
- package/dist/rhf/number-range-input.js +1 -1
- package/dist/rhf/rich-text-editor.js +1 -1
- package/dist/rhf/select.js +1 -1
- package/dist/rhf/text-area.js +1 -1
- package/dist/rhf/time-picker.js +1 -1
- package/dist/rhf.js +7 -7
- package/dist/rich-text-editor.js +1 -1
- package/dist/{staticDateTimeSegments-BWea3HAt.js → staticDateTimeSegments-Bs1_N5MR.js} +1 -1
- package/dist/{staticSelect.utils-BfTCi26B.js → staticSelect.utils-BgdYv2vP.js} +5 -4
- package/dist/styles/app-canvas.css +30 -24
- package/dist/styles/configurator.css +421 -34
- package/dist/tanstack/date-picker.js +1 -1
- package/dist/tanstack/date-range-picker.js +1 -1
- package/dist/tanstack/date-time-picker.js +1 -1
- package/dist/tanstack/form.js +1 -1
- package/dist/tanstack/inputs.js +1 -1
- package/dist/tanstack/number-range-input.js +1 -1
- package/dist/tanstack/rich-text-editor.js +1 -1
- package/dist/tanstack/select.js +1 -1
- package/dist/tanstack/table.js +2 -2
- package/dist/tanstack/text-area.js +1 -1
- package/dist/tanstack/time-picker.js +1 -1
- package/dist/tanstack.js +15 -15
- package/dist/token-classes-BqLWiy6O.js +245 -0
- package/dist/{useFieldAccessibility-B-bjtrNw.js → useFieldAccessibility-DnCdz938.js} +2 -1
- package/dist/{useFormAutosave-pmh35PXp.js → useFormAutosave-CxqZAJAB.js} +1 -1
- package/dist/{useStaticInputHandoff-B7DEm75m.js → useStaticInputHandoff-DKsxpVck.js} +2 -1
- package/dist/{useTableColumnConfig-CNJ_ZvIN.js → useTableColumnConfig-BnbKElno.js} +1 -1
- package/dist/utils/logger.js +1 -1
- package/package.json +1 -1
- package/src/configurator/README.md +11 -0
- package/dist/groups-oQmSeqXn.js +0 -18
- package/dist/underline-66hmELxa.js +0 -81
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { t as UIConfig } from "../uiConfig.context-BS3r_kTS.js";
|
|
2
2
|
import { r as $a8ea2faf2ebe4d2f$re_export$mergeRefs } from "../import-BE0r63d8.js";
|
|
3
3
|
import { t as FieldController } from "../form.binding-CG1RPv6o.js";
|
|
4
|
-
import { t as getStaticInputFocusTarget } from "../useStaticInputHandoff-
|
|
5
|
-
import { t as Select } from "../Select-
|
|
4
|
+
import { t as getStaticInputFocusTarget } from "../useStaticInputHandoff-DKsxpVck.js";
|
|
5
|
+
import { t as Select } from "../Select-tNlFSbAC.js";
|
|
6
6
|
import { n as getQueryItems, r as getSelectionIdsToResolve, t as useQueryAutocomplete } from "../useQueryAutocomplete-CraXvRm_.js";
|
|
7
7
|
import { memo, useCallback, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
8
8
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as Select } from "../Select-
|
|
1
|
+
import { t as Select } from "../Select-tNlFSbAC.js";
|
|
2
2
|
export { Select };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as TextArea } from "../TextArea-
|
|
1
|
+
import { t as TextArea } from "../TextArea-DuvFUjts.js";
|
|
2
2
|
export { TextArea };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as TimePicker } from "../TimePicker-
|
|
1
|
+
import { t as TimePicker } from "../TimePicker-CBkiE-Yq.js";
|
|
2
2
|
export { TimePicker };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as AppCanvasPage, r as AppCanvasPageProps, t as APP_CANVAS_PATH } from "../AppCanvasPage-
|
|
1
|
+
import { n as AppCanvasPage, r as AppCanvasPageProps, t as APP_CANVAS_PATH } from "../AppCanvasPage-U9SxNwjS.js";
|
|
2
2
|
import { AnyRoute } from "@tanstack/react-router";
|
|
3
3
|
//#region src/app-canvas/tanstack.d.ts
|
|
4
4
|
interface AppCanvasRouteOptions {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as AppCanvasPage, r as AppCanvasFrameBridge, t as APP_CANVAS_PATH } from "../AppCanvasPage-
|
|
1
|
+
import { n as AppCanvasPage, r as AppCanvasFrameBridge, t as APP_CANVAS_PATH } from "../AppCanvasPage-C3KN-Pwb.js";
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
4
|
import { createRoute, notFound, useRouter, useRouterState } from "@tanstack/react-router";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as AppCanvasProps, c as CanvasPage, d as CanvasRouter, f as discoverCanvasPages, i as AppCanvas, l as CanvasPosition, n as AppCanvasPage, o as CanvasBreakpoint, p as layoutCanvasPages, r as AppCanvasPageProps, s as defaultCanvasBreakpoints, t as APP_CANVAS_PATH, u as CanvasRouteExample } from "../AppCanvasPage-
|
|
1
|
+
import { a as AppCanvasProps, c as CanvasPage, d as CanvasRouter, f as discoverCanvasPages, i as AppCanvas, l as CanvasPosition, n as AppCanvasPage, o as CanvasBreakpoint, p as layoutCanvasPages, r as AppCanvasPageProps, s as defaultCanvasBreakpoints, t as APP_CANVAS_PATH, u as CanvasRouteExample } from "../AppCanvasPage-U9SxNwjS.js";
|
|
2
2
|
import "../configuration.context-3I7-wBII.js";
|
|
3
3
|
//#region src/app-canvas/AppCanvasFrameBridge.d.ts
|
|
4
4
|
/** Mount once inside the application's existing UIConfigurationProvider. No separate app copy or theme fork. */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as defaultCanvasBreakpoints, c as layoutCanvasPages, i as AppCanvas, n as AppCanvasPage, o as isAppCanvasFrame, r as AppCanvasFrameBridge, s as discoverCanvasPages, t as APP_CANVAS_PATH } from "../AppCanvasPage-
|
|
1
|
+
import { a as defaultCanvasBreakpoints, c as layoutCanvasPages, i as AppCanvas, n as AppCanvasPage, o as isAppCanvasFrame, r as AppCanvasFrameBridge, s as discoverCanvasPages, t as APP_CANVAS_PATH } from "../AppCanvasPage-C3KN-Pwb.js";
|
|
2
2
|
export { APP_CANVAS_PATH, AppCanvas, AppCanvasFrameBridge, AppCanvasPage, defaultCanvasBreakpoints, discoverCanvasPages, isAppCanvasFrame, layoutCanvasPages };
|
|
@@ -3,7 +3,40 @@ import { n as UIConfigOptions } from "../uiConfig.context-BksnNQyw.js";
|
|
|
3
3
|
import { a as CvaDefinition, i as useUIConfiguration, n as UIConfigurationProvider, o as CvaEdits, r as UIConfigurationProviderProps, t as UIConfiguration } from "../configuration.context-3I7-wBII.js";
|
|
4
4
|
import { a as parseThemeCss, i as exportCss, n as ThemeEdits, r as Tokens, t as Mode } from "../theme-model-T1zIdBg8.js";
|
|
5
5
|
//#region src/configurator/UIConfigurator.d.ts
|
|
6
|
-
|
|
6
|
+
interface UIConfigurationModalProps {
|
|
7
|
+
/**
|
|
8
|
+
* Show only the editor, in the compact window the App Canvas uses: no components preview, and a 360px floating
|
|
9
|
+
* window. Open it with `openFloating`. Hosts that show the components themselves get this automatically.
|
|
10
|
+
*/
|
|
11
|
+
editorOnly?: boolean;
|
|
12
|
+
}
|
|
13
|
+
declare function UIConfigurationModal({ editorOnly: editorOnlyProp }?: UIConfigurationModalProps): import("react").JSX.Element | null;
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/configurator/PageInspector.d.ts
|
|
16
|
+
interface PageInspectorProps {
|
|
17
|
+
/** While open, hovering the page inspects it and clicks pin elements instead of activating them. */
|
|
18
|
+
open: boolean;
|
|
19
|
+
onClose: () => void;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* The App Canvas inspector for the live page: a sidebar with the box model, typography and colors of the hovered or
|
|
23
|
+
* pinned element, whose token links open the configurator on that token.
|
|
24
|
+
*/
|
|
25
|
+
declare function PageInspector({ open, onClose }: PageInspectorProps): import("react").ReactPortal | null;
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region src/configurator/UIDevToolbar.d.ts
|
|
28
|
+
interface UIDevToolbarProps {
|
|
29
|
+
/** Opens the App Canvas; the toolbar shows its button only when provided (for example only in development). */
|
|
30
|
+
onOpenCanvas?: () => void;
|
|
31
|
+
/** Where the toolbar remembers being hidden. */
|
|
32
|
+
storageKey?: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* A floating developer dock for a running app: the compact configurator, the page inspector and, optionally, the App
|
|
36
|
+
* Canvas. It tucks into a tab on the window's left edge. Mount it once inside `UIConfigurationProvider`; it renders the
|
|
37
|
+
* configurator itself, so the app needs no separate `UIConfigurationModal`.
|
|
38
|
+
*/
|
|
39
|
+
declare function UIDevToolbar({ onOpenCanvas, storageKey }: UIDevToolbarProps): import("react").JSX.Element;
|
|
7
40
|
//#endregion
|
|
8
41
|
//#region src/configurator/component-configuration.d.ts
|
|
9
42
|
/**
|
|
@@ -24,4 +57,4 @@ interface ColorModeSwitchProps {
|
|
|
24
57
|
/** Controlled color-mode switch, shared by configurators and application settings. */
|
|
25
58
|
declare function ColorModeSwitch({ value, onChange, label }: ColorModeSwitchProps): import("react").JSX.Element;
|
|
26
59
|
//#endregion
|
|
27
|
-
export { ColorModeSwitch, type ColorModeSwitchProps, type CvaDefinition, type CvaEdits, type ThemeEdits, type Tokens, type UIConfiguration, UIConfigurationModal, UIConfigurationProvider, type UIConfigurationProviderProps, exportCss, parseThemeCss, resolveUIConfiguration, useUIConfiguration };
|
|
60
|
+
export { ColorModeSwitch, type ColorModeSwitchProps, type CvaDefinition, type CvaEdits, PageInspector, type PageInspectorProps, type ThemeEdits, type Tokens, type UIConfiguration, UIConfigurationModal, type UIConfigurationModalProps, UIConfigurationProvider, type UIConfigurationProviderProps, UIDevToolbar, type UIDevToolbarProps, exportCss, parseThemeCss, resolveUIConfiguration, useUIConfiguration };
|
|
@@ -1,3 +1,214 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { a as UIConfigurationModal, c as resolveUIConfiguration, i as useCanvasInspector, l as UIConfigurationProvider, m as ScanLine, n as CanvasInspectorPanel, o as ColorModeSwitch, p as Settings2, t as CanvasInspectionOverlay, u as useUIConfiguration, v as Frame } from "../CanvasInspector-TC9DOf5p.js";
|
|
2
|
+
import { t as ChevronLeft } from "../chevron-left-Dgo_b9wJ.js";
|
|
3
|
+
import { t as ChevronRight } from "../chevron-right-3nKJR5Bb.js";
|
|
4
|
+
import { c as isEditableToken, i as exportCss, v as parseThemeCss } from "../theme-model-DtTsIxou.js";
|
|
5
|
+
import { useEffect, useState } from "react";
|
|
6
|
+
import { c } from "react/compiler-runtime";
|
|
7
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { createPortal } from "react-dom";
|
|
9
|
+
//#region src/configurator/PageInspector.tsx
|
|
10
|
+
/** Inspector chrome, the configurator and anything a host marks are tools, never inspected or blocked. */
|
|
11
|
+
const toolSelector = "[data-povio-inspector-ignore], .studio-overlay, .studio-floating-launcher";
|
|
12
|
+
const isTool = (event) => event.target instanceof Element && !!event.target.closest(toolSelector);
|
|
13
|
+
/**
|
|
14
|
+
* The App Canvas inspector for the live page: a sidebar with the box model, typography and colors of the hovered or
|
|
15
|
+
* pinned element, whose token links open the configurator on that token.
|
|
16
|
+
*/
|
|
17
|
+
function PageInspector(t0) {
|
|
18
|
+
const $ = c(17);
|
|
19
|
+
const { open, onClose } = t0;
|
|
20
|
+
const { defaults, revealToken } = useUIConfiguration();
|
|
21
|
+
let t1;
|
|
22
|
+
if ($[0] !== defaults) {
|
|
23
|
+
t1 = (name) => isEditableToken(name, defaults);
|
|
24
|
+
$[0] = defaults;
|
|
25
|
+
$[1] = t1;
|
|
26
|
+
} else t1 = $[1];
|
|
27
|
+
const inspector = useCanvasInspector(open, void 0, t1);
|
|
28
|
+
const { hoverPoint, selectPoint, clear } = inspector;
|
|
29
|
+
let t2;
|
|
30
|
+
let t3;
|
|
31
|
+
if ($[2] !== clear || $[3] !== hoverPoint || $[4] !== open || $[5] !== selectPoint) {
|
|
32
|
+
t2 = () => {
|
|
33
|
+
if (!open) return;
|
|
34
|
+
const move = (event) => {
|
|
35
|
+
if (!isTool(event)) hoverPoint(document, event.clientX, event.clientY);
|
|
36
|
+
};
|
|
37
|
+
const block = _temp;
|
|
38
|
+
const click = (event_1) => {
|
|
39
|
+
if (isTool(event_1)) return;
|
|
40
|
+
block(event_1);
|
|
41
|
+
selectPoint(document, event_1.clientX, event_1.clientY);
|
|
42
|
+
};
|
|
43
|
+
const key = (event_2) => {
|
|
44
|
+
if (event_2.key === "Escape" && !isTool(event_2)) clear();
|
|
45
|
+
};
|
|
46
|
+
const pressEvents = [
|
|
47
|
+
"pointerdown",
|
|
48
|
+
"mousedown",
|
|
49
|
+
"pointerup",
|
|
50
|
+
"mouseup",
|
|
51
|
+
"auxclick"
|
|
52
|
+
];
|
|
53
|
+
window.addEventListener("pointermove", move, true);
|
|
54
|
+
for (const type of pressEvents) window.addEventListener(type, block, true);
|
|
55
|
+
window.addEventListener("click", click, true);
|
|
56
|
+
window.addEventListener("keydown", key, true);
|
|
57
|
+
document.documentElement.classList.add("studio-page-inspecting");
|
|
58
|
+
return () => {
|
|
59
|
+
window.removeEventListener("pointermove", move, true);
|
|
60
|
+
for (const type_0 of pressEvents) window.removeEventListener(type_0, block, true);
|
|
61
|
+
window.removeEventListener("click", click, true);
|
|
62
|
+
window.removeEventListener("keydown", key, true);
|
|
63
|
+
document.documentElement.classList.remove("studio-page-inspecting");
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
t3 = [
|
|
67
|
+
open,
|
|
68
|
+
hoverPoint,
|
|
69
|
+
selectPoint,
|
|
70
|
+
clear
|
|
71
|
+
];
|
|
72
|
+
$[2] = clear;
|
|
73
|
+
$[3] = hoverPoint;
|
|
74
|
+
$[4] = open;
|
|
75
|
+
$[5] = selectPoint;
|
|
76
|
+
$[6] = t2;
|
|
77
|
+
$[7] = t3;
|
|
78
|
+
} else {
|
|
79
|
+
t2 = $[6];
|
|
80
|
+
t3 = $[7];
|
|
81
|
+
}
|
|
82
|
+
useEffect(t2, t3);
|
|
83
|
+
if (!open) return null;
|
|
84
|
+
let t4;
|
|
85
|
+
if ($[8] !== inspector.measurement) {
|
|
86
|
+
t4 = inspector.measurement && /* @__PURE__ */ jsx(CanvasInspectionOverlay, {
|
|
87
|
+
className: "studio-page-inspection",
|
|
88
|
+
measurement: inspector.measurement,
|
|
89
|
+
width: window.innerWidth
|
|
90
|
+
});
|
|
91
|
+
$[8] = inspector.measurement;
|
|
92
|
+
$[9] = t4;
|
|
93
|
+
} else t4 = $[9];
|
|
94
|
+
let t5;
|
|
95
|
+
if ($[10] !== inspector || $[11] !== onClose || $[12] !== revealToken) {
|
|
96
|
+
t5 = /* @__PURE__ */ jsx(CanvasInspectorPanel, {
|
|
97
|
+
inspector,
|
|
98
|
+
onClose,
|
|
99
|
+
onSelectToken: revealToken,
|
|
100
|
+
className: "studio-page-inspector",
|
|
101
|
+
emptyHint: "Hover anything on the page to see its padding, margins, borders, radii and gaps."
|
|
102
|
+
});
|
|
103
|
+
$[10] = inspector;
|
|
104
|
+
$[11] = onClose;
|
|
105
|
+
$[12] = revealToken;
|
|
106
|
+
$[13] = t5;
|
|
107
|
+
} else t5 = $[13];
|
|
108
|
+
let t6;
|
|
109
|
+
if ($[14] !== t4 || $[15] !== t5) {
|
|
110
|
+
t6 = createPortal(/* @__PURE__ */ jsxs(Fragment$1, { children: [t4, t5] }), document.body);
|
|
111
|
+
$[14] = t4;
|
|
112
|
+
$[15] = t5;
|
|
113
|
+
$[16] = t6;
|
|
114
|
+
} else t6 = $[16];
|
|
115
|
+
return t6;
|
|
116
|
+
}
|
|
117
|
+
function _temp(event_0) {
|
|
118
|
+
if (isTool(event_0)) return;
|
|
119
|
+
event_0.preventDefault();
|
|
120
|
+
event_0.stopPropagation();
|
|
121
|
+
}
|
|
122
|
+
//#endregion
|
|
123
|
+
//#region src/configurator/UIDevToolbar.tsx
|
|
124
|
+
const readHidden = (key) => {
|
|
125
|
+
try {
|
|
126
|
+
return localStorage.getItem(key) === "1";
|
|
127
|
+
} catch {
|
|
128
|
+
return false;
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
* A floating developer dock for a running app: the compact configurator, the page inspector and, optionally, the App
|
|
133
|
+
* Canvas. It tucks into a tab on the window's left edge. Mount it once inside `UIConfigurationProvider`; it renders the
|
|
134
|
+
* configurator itself, so the app needs no separate `UIConfigurationModal`.
|
|
135
|
+
*/
|
|
136
|
+
function UIDevToolbar({ onOpenCanvas, storageKey = "povio-dev-toolbar-hidden" }) {
|
|
137
|
+
const { openFloating, isOpen } = useUIConfiguration();
|
|
138
|
+
const [hidden, setHidden] = useState(() => readHidden(storageKey));
|
|
139
|
+
const [inspecting, setInspecting] = useState(false);
|
|
140
|
+
const setVisibility = (next) => {
|
|
141
|
+
setHidden(next);
|
|
142
|
+
try {
|
|
143
|
+
localStorage.setItem(storageKey, next ? "1" : "0");
|
|
144
|
+
} catch {}
|
|
145
|
+
};
|
|
146
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
147
|
+
hidden ? /* @__PURE__ */ jsx("button", {
|
|
148
|
+
type: "button",
|
|
149
|
+
className: "studio-dev-toolbar-tab",
|
|
150
|
+
"data-povio-inspector-ignore": "",
|
|
151
|
+
"aria-label": "Show developer toolbar",
|
|
152
|
+
title: "Show developer toolbar",
|
|
153
|
+
onClick: () => setVisibility(false),
|
|
154
|
+
children: /* @__PURE__ */ jsx(ChevronRight, { size: 14 })
|
|
155
|
+
}) : /* @__PURE__ */ jsxs("div", {
|
|
156
|
+
className: "studio-dev-toolbar",
|
|
157
|
+
"data-povio-inspector-ignore": "",
|
|
158
|
+
role: "toolbar",
|
|
159
|
+
"aria-label": "Developer toolbar",
|
|
160
|
+
children: [
|
|
161
|
+
/* @__PURE__ */ jsxs("button", {
|
|
162
|
+
type: "button",
|
|
163
|
+
className: "studio-dev-toolbar-labelled",
|
|
164
|
+
"aria-label": "Configure Povio UI",
|
|
165
|
+
"aria-pressed": isOpen,
|
|
166
|
+
onClick: openFloating,
|
|
167
|
+
children: [/* @__PURE__ */ jsx(Settings2, { size: 14 }), /* @__PURE__ */ jsx("span", {
|
|
168
|
+
"aria-hidden": "true",
|
|
169
|
+
children: "Configure UI"
|
|
170
|
+
})]
|
|
171
|
+
}),
|
|
172
|
+
/* @__PURE__ */ jsxs("button", {
|
|
173
|
+
type: "button",
|
|
174
|
+
className: "studio-dev-toolbar-labelled",
|
|
175
|
+
"aria-label": "Inspect page",
|
|
176
|
+
"aria-pressed": inspecting,
|
|
177
|
+
onClick: () => setInspecting((value) => !value),
|
|
178
|
+
children: [/* @__PURE__ */ jsx(ScanLine, { size: 14 }), /* @__PURE__ */ jsx("span", {
|
|
179
|
+
"aria-hidden": "true",
|
|
180
|
+
children: "Inspect"
|
|
181
|
+
})]
|
|
182
|
+
}),
|
|
183
|
+
onOpenCanvas && /* @__PURE__ */ jsxs("button", {
|
|
184
|
+
type: "button",
|
|
185
|
+
className: "studio-dev-toolbar-labelled",
|
|
186
|
+
"aria-label": "Open App canvas",
|
|
187
|
+
onClick: onOpenCanvas,
|
|
188
|
+
children: [/* @__PURE__ */ jsx(Frame, { size: 14 }), /* @__PURE__ */ jsx("span", {
|
|
189
|
+
"aria-hidden": "true",
|
|
190
|
+
children: "App canvas"
|
|
191
|
+
})]
|
|
192
|
+
}),
|
|
193
|
+
/* @__PURE__ */ jsx("span", {
|
|
194
|
+
className: "studio-dev-toolbar-divider",
|
|
195
|
+
"aria-hidden": "true"
|
|
196
|
+
}),
|
|
197
|
+
/* @__PURE__ */ jsx("button", {
|
|
198
|
+
type: "button",
|
|
199
|
+
"aria-label": "Hide developer toolbar",
|
|
200
|
+
title: "Hide toolbar",
|
|
201
|
+
onClick: () => setVisibility(true),
|
|
202
|
+
children: /* @__PURE__ */ jsx(ChevronLeft, { size: 14 })
|
|
203
|
+
})
|
|
204
|
+
]
|
|
205
|
+
}),
|
|
206
|
+
/* @__PURE__ */ jsx(UIConfigurationModal, { editorOnly: true }),
|
|
207
|
+
/* @__PURE__ */ jsx(PageInspector, {
|
|
208
|
+
open: inspecting,
|
|
209
|
+
onClose: () => setInspecting(false)
|
|
210
|
+
})
|
|
211
|
+
] });
|
|
212
|
+
}
|
|
213
|
+
//#endregion
|
|
214
|
+
export { ColorModeSwitch, PageInspector, UIConfigurationModal, UIConfigurationProvider, UIDevToolbar, exportCss, parseThemeCss, resolveUIConfiguration, useUIConfiguration };
|
|
@@ -4,7 +4,7 @@ import { t as clsx } from "./clsx-CnD0nOiA.js";
|
|
|
4
4
|
import { t as Typography } from "./Typography-LU4z2pR1.js";
|
|
5
5
|
import { InlineIconButton } from "./components/inline-icon-button.js";
|
|
6
6
|
import { t as useBreakpoint } from "./useBreakpoint-DQoMN-BG.js";
|
|
7
|
-
import { u as getPlaceholder } from "./staticDateTimeSegments-
|
|
7
|
+
import { u as getPlaceholder } from "./staticDateTimeSegments-Bs1_N5MR.js";
|
|
8
8
|
import { useEffect, useRef } from "react";
|
|
9
9
|
import { c } from "react/compiler-runtime";
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|