@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
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
//#region src/configurator/inspector/token-classes.ts
|
|
2
|
+
/** Tailwind breakpoints from the Atlas base theme, in rem. */
|
|
3
|
+
const breakpoints = {
|
|
4
|
+
sm: 23.75,
|
|
5
|
+
md: 37.5,
|
|
6
|
+
lg: 80,
|
|
7
|
+
xl: 105
|
|
8
|
+
};
|
|
9
|
+
/** Utility prefix → the slots it sets, its specificity, and the theme namespace its value lives in. */
|
|
10
|
+
const utilities = [
|
|
11
|
+
[
|
|
12
|
+
"p",
|
|
13
|
+
[
|
|
14
|
+
"padding.top",
|
|
15
|
+
"padding.right",
|
|
16
|
+
"padding.bottom",
|
|
17
|
+
"padding.left"
|
|
18
|
+
],
|
|
19
|
+
0,
|
|
20
|
+
"spacing"
|
|
21
|
+
],
|
|
22
|
+
[
|
|
23
|
+
"px",
|
|
24
|
+
["padding.left", "padding.right"],
|
|
25
|
+
1,
|
|
26
|
+
"spacing"
|
|
27
|
+
],
|
|
28
|
+
[
|
|
29
|
+
"py",
|
|
30
|
+
["padding.top", "padding.bottom"],
|
|
31
|
+
1,
|
|
32
|
+
"spacing"
|
|
33
|
+
],
|
|
34
|
+
[
|
|
35
|
+
"pt",
|
|
36
|
+
["padding.top"],
|
|
37
|
+
2,
|
|
38
|
+
"spacing"
|
|
39
|
+
],
|
|
40
|
+
[
|
|
41
|
+
"pr",
|
|
42
|
+
["padding.right"],
|
|
43
|
+
2,
|
|
44
|
+
"spacing"
|
|
45
|
+
],
|
|
46
|
+
[
|
|
47
|
+
"pe",
|
|
48
|
+
["padding.right"],
|
|
49
|
+
2,
|
|
50
|
+
"spacing"
|
|
51
|
+
],
|
|
52
|
+
[
|
|
53
|
+
"pb",
|
|
54
|
+
["padding.bottom"],
|
|
55
|
+
2,
|
|
56
|
+
"spacing"
|
|
57
|
+
],
|
|
58
|
+
[
|
|
59
|
+
"pl",
|
|
60
|
+
["padding.left"],
|
|
61
|
+
2,
|
|
62
|
+
"spacing"
|
|
63
|
+
],
|
|
64
|
+
[
|
|
65
|
+
"ps",
|
|
66
|
+
["padding.left"],
|
|
67
|
+
2,
|
|
68
|
+
"spacing"
|
|
69
|
+
],
|
|
70
|
+
[
|
|
71
|
+
"gap",
|
|
72
|
+
["gap.row", "gap.column"],
|
|
73
|
+
0,
|
|
74
|
+
"spacing"
|
|
75
|
+
],
|
|
76
|
+
[
|
|
77
|
+
"gap-x",
|
|
78
|
+
["gap.column"],
|
|
79
|
+
1,
|
|
80
|
+
"spacing"
|
|
81
|
+
],
|
|
82
|
+
[
|
|
83
|
+
"gap-y",
|
|
84
|
+
["gap.row"],
|
|
85
|
+
1,
|
|
86
|
+
"spacing"
|
|
87
|
+
],
|
|
88
|
+
[
|
|
89
|
+
"rounded",
|
|
90
|
+
["radius"],
|
|
91
|
+
0,
|
|
92
|
+
"radius"
|
|
93
|
+
]
|
|
94
|
+
];
|
|
95
|
+
/** Splits `md:hover:px-4` into its variants and utility, ignoring colons inside `[...]` / `(...)`. */
|
|
96
|
+
function splitVariants(className) {
|
|
97
|
+
const parts = [];
|
|
98
|
+
let depth = 0;
|
|
99
|
+
let current = "";
|
|
100
|
+
for (const char of className) {
|
|
101
|
+
if (char === "[" || char === "(") depth++;
|
|
102
|
+
if (char === "]" || char === ")") depth--;
|
|
103
|
+
if (char === ":" && depth === 0) {
|
|
104
|
+
parts.push(current);
|
|
105
|
+
current = "";
|
|
106
|
+
} else current += char;
|
|
107
|
+
}
|
|
108
|
+
return {
|
|
109
|
+
variants: parts,
|
|
110
|
+
utility: current
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
/** Variants that style a pseudo-element or other elements, never the element's own value. */
|
|
114
|
+
const otherTargets = /* @__PURE__ */ new Set([
|
|
115
|
+
"placeholder",
|
|
116
|
+
"before",
|
|
117
|
+
"after",
|
|
118
|
+
"selection",
|
|
119
|
+
"marker",
|
|
120
|
+
"file",
|
|
121
|
+
"first-letter",
|
|
122
|
+
"first-line",
|
|
123
|
+
"backdrop",
|
|
124
|
+
"*",
|
|
125
|
+
"**"
|
|
126
|
+
]);
|
|
127
|
+
/** State variants, including the react-aria ones from tailwindcss-react-aria-components (`pressed`, `selected` …). */
|
|
128
|
+
const stateSelectors = {
|
|
129
|
+
hover: ":is(:hover, [data-hovered])",
|
|
130
|
+
hovered: "[data-hovered]",
|
|
131
|
+
focus: ":is(:focus, [data-focused])",
|
|
132
|
+
focused: "[data-focused]",
|
|
133
|
+
"focus-within": ":is(:focus-within, [data-focus-within])",
|
|
134
|
+
"focus-visible": ":is(:focus-visible, [data-focus-visible])",
|
|
135
|
+
active: ":active",
|
|
136
|
+
pressed: ":is([data-pressed], :active)",
|
|
137
|
+
disabled: ":is(:disabled, [data-disabled])",
|
|
138
|
+
enabled: ":enabled",
|
|
139
|
+
checked: ":checked",
|
|
140
|
+
selected: ":is([data-selected], [aria-selected=\"true\"])",
|
|
141
|
+
indeterminate: ":is(:indeterminate, [data-indeterminate])",
|
|
142
|
+
invalid: ":is(:invalid, [data-invalid], [aria-invalid=\"true\"])",
|
|
143
|
+
valid: ":valid",
|
|
144
|
+
required: ":is(:required, [data-required])",
|
|
145
|
+
optional: ":optional",
|
|
146
|
+
"read-only": ":is(:read-only, [data-readonly])",
|
|
147
|
+
readonly: "[data-readonly]",
|
|
148
|
+
"placeholder-shown": ":placeholder-shown",
|
|
149
|
+
expanded: ":is([data-expanded], [aria-expanded=\"true\"])",
|
|
150
|
+
pending: "[data-pending]",
|
|
151
|
+
entering: "[data-entering]",
|
|
152
|
+
exiting: "[data-exiting]",
|
|
153
|
+
empty: ":empty",
|
|
154
|
+
open: ":is([open], [data-open], :popover-open)",
|
|
155
|
+
first: ":first-child",
|
|
156
|
+
last: ":last-child",
|
|
157
|
+
only: ":only-child",
|
|
158
|
+
odd: ":nth-child(odd)",
|
|
159
|
+
even: ":nth-child(even)"
|
|
160
|
+
};
|
|
161
|
+
const unquote = (value) => value.replace(/^['"]|['"]$/g, "");
|
|
162
|
+
/** A CSS selector for one state variant, or `undefined` when its condition cannot be read from the element. */
|
|
163
|
+
function variantSelector(variant) {
|
|
164
|
+
if (variant.startsWith("not-")) {
|
|
165
|
+
const inner = variantSelector(variant.slice(4));
|
|
166
|
+
return inner && `:not(${inner})`;
|
|
167
|
+
}
|
|
168
|
+
if (variant.startsWith("has-")) {
|
|
169
|
+
const inner = variantSelector(variant.slice(4));
|
|
170
|
+
return inner && `:has(${inner})`;
|
|
171
|
+
}
|
|
172
|
+
if (stateSelectors[variant]) return stateSelectors[variant];
|
|
173
|
+
const attribute = variant.match(/^(data|aria)-\[([\w-]+)(?:=([^\]]+))?\]$/);
|
|
174
|
+
if (attribute) return attribute[3] ? `[${attribute[1]}-${attribute[2]}="${unquote(attribute[3])}"]` : `[${attribute[1]}-${attribute[2]}]`;
|
|
175
|
+
if (/^data-[\w-]+$/.test(variant)) return `[${variant}]`;
|
|
176
|
+
if (/^aria-[\w-]+$/.test(variant)) return `[${variant}="true"]`;
|
|
177
|
+
const arbitrary = variant.match(/^\[(&?)(:[^\s&>+~,]+)\]$/);
|
|
178
|
+
return arbitrary ? arbitrary[2].replaceAll("_", " ") : void 0;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* How a variant class relates to an element's current value: `other` styles a pseudo-element or descendants,
|
|
182
|
+
* `inactive` / `active` are state conditions read from the element, and `unknown` covers breakpoints, container
|
|
183
|
+
* queries, group/peer state and anything else that cannot be checked from the element alone.
|
|
184
|
+
*/
|
|
185
|
+
function variantState(variants, element) {
|
|
186
|
+
if (variants.some((variant) => otherTargets.has(variant))) return "other";
|
|
187
|
+
const selectors = variants.map(variantSelector);
|
|
188
|
+
if (selectors.some((selector) => selector === void 0) || typeof element.matches !== "function") return "unknown";
|
|
189
|
+
try {
|
|
190
|
+
return element.matches(`*${selectors.join("")}`) ? "active" : "inactive";
|
|
191
|
+
} catch {
|
|
192
|
+
return "unknown";
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
/** Breakpoint weight when every variant is an active breakpoint; `undefined` for state variants or inactive breakpoints. */
|
|
196
|
+
function variantWeight(variants, viewportWidth, rootFontSize) {
|
|
197
|
+
let weight = 0;
|
|
198
|
+
for (const variant of variants) {
|
|
199
|
+
const max = variant.startsWith("max-");
|
|
200
|
+
const size = breakpoints[max ? variant.slice(4) : variant];
|
|
201
|
+
if (size === void 0) return void 0;
|
|
202
|
+
if (!(max ? viewportWidth < size * rootFontSize : viewportWidth >= size * rootFontSize)) return void 0;
|
|
203
|
+
weight = Math.max(weight, size);
|
|
204
|
+
}
|
|
205
|
+
return weight;
|
|
206
|
+
}
|
|
207
|
+
function tokenFor(value, namespace, isKnown) {
|
|
208
|
+
const referenced = value.match(/^\[.*?var\((--[\w-]+)/)?.[1] ?? value.match(/^\((--[\w-]+)\)$/)?.[1];
|
|
209
|
+
if (referenced) return isKnown(referenced) ? referenced : void 0;
|
|
210
|
+
const name = `--${namespace}-${value}`;
|
|
211
|
+
return isKnown(name) ? name : void 0;
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Resolves which theme tokens drive an element's padding, gap and radius from its rendered Tailwind classes.
|
|
215
|
+
* Only tokens accepted by `isKnown` are returned, so every result can be opened in the editor.
|
|
216
|
+
*/
|
|
217
|
+
function inspectTokens(className, isKnown, viewportWidth = Infinity, rootFontSize = 16) {
|
|
218
|
+
const winners = /* @__PURE__ */ new Map();
|
|
219
|
+
for (const raw of className.split(/\s+/).filter(Boolean)) {
|
|
220
|
+
const { variants, utility } = splitVariants(raw);
|
|
221
|
+
const weight = variantWeight(variants, viewportWidth, rootFontSize);
|
|
222
|
+
if (weight === void 0) continue;
|
|
223
|
+
const clean = utility.replace(/^!|!$/g, "");
|
|
224
|
+
for (const [prefix, slots, specificity, namespace] of utilities) {
|
|
225
|
+
if (!clean.startsWith(`${prefix}-`)) continue;
|
|
226
|
+
const token = tokenFor(clean.slice(prefix.length + 1), namespace, isKnown);
|
|
227
|
+
if (!token) continue;
|
|
228
|
+
const rank = weight * 10 + specificity;
|
|
229
|
+
for (const slot of slots) if ((winners.get(slot)?.rank ?? -1) <= rank) winners.set(slot, {
|
|
230
|
+
token,
|
|
231
|
+
rank
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
const result = {
|
|
236
|
+
padding: {},
|
|
237
|
+
gap: {}
|
|
238
|
+
};
|
|
239
|
+
for (const [slot, { token }] of winners) if (slot === "radius") result.radius = token;
|
|
240
|
+
else if (slot.startsWith("gap.")) result.gap[slot.slice(4)] = token;
|
|
241
|
+
else result.padding[slot.slice(8)] = token;
|
|
242
|
+
return result;
|
|
243
|
+
}
|
|
244
|
+
//#endregion
|
|
245
|
+
export { splitVariants as n, variantState as r, inspectTokens as t };
|
|
@@ -6,7 +6,7 @@ import { t as Spinner } from "./Spinner-BeVTUzzx.js";
|
|
|
6
6
|
import { InlineIconButton } from "./components/inline-icon-button.js";
|
|
7
7
|
import { r as FormFieldLabel } from "./FormField-9h3JAhaY.js";
|
|
8
8
|
import { a as inputSizeDefinition, r as inputContentWrapperDefinition } from "./input.cva-CbMTwuQU.js";
|
|
9
|
-
import { n as InputClear } from "./TooltipWrapper-
|
|
9
|
+
import { n as InputClear } from "./TooltipWrapper-CSXs5-E3.js";
|
|
10
10
|
import { isValidElement, useId } from "react";
|
|
11
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
//#region src/components/inputs/Input/shared/InputContent.tsx
|
|
@@ -64,6 +64,7 @@ const InputContent = ({ leadingIcon: LeadingIcon, trailingIcon: TrailingIcon, un
|
|
|
64
64
|
children: /* @__PURE__ */ jsx(Spinner, {})
|
|
65
65
|
}),
|
|
66
66
|
!isLoading && action && /* @__PURE__ */ jsx(InlineIconButton, {
|
|
67
|
+
size: "none",
|
|
67
68
|
color: "secondary",
|
|
68
69
|
icon: action.icon,
|
|
69
70
|
isDisabled,
|
|
@@ -3,7 +3,7 @@ import { n as useForm } from "./form.binding-CG1RPv6o.js";
|
|
|
3
3
|
import { t as StringUtils } from "./string.utils-BPgv6QwA.js";
|
|
4
4
|
import { t as ZodUtils } from "./zod.utils-DrrPDT9v.js";
|
|
5
5
|
import { n as getDefaultInputComponentType } from "./dynamicInputs-CRMWIpHA.js";
|
|
6
|
-
import { t as InputItem } from "./InputItem-
|
|
6
|
+
import { t as InputItem } from "./InputItem-yC5oMyN-.js";
|
|
7
7
|
import { useCallback, useEffect, useMemo, useRef } from "react";
|
|
8
8
|
import { jsx } from "react/jsx-runtime";
|
|
9
9
|
import { z } from "zod";
|
|
@@ -7,7 +7,7 @@ import { t as Spinner } from "./Spinner-BeVTUzzx.js";
|
|
|
7
7
|
import { InlineIconButton } from "./components/inline-icon-button.js";
|
|
8
8
|
import { r as FormFieldLabel, t as FormField } from "./FormField-9h3JAhaY.js";
|
|
9
9
|
import { a as inputSizeDefinition, r as inputContentWrapperDefinition, t as inputBaseDefinition } from "./input.cva-CbMTwuQU.js";
|
|
10
|
-
import { n as InputClear, t as TooltipWrapper } from "./TooltipWrapper-
|
|
10
|
+
import { n as InputClear, t as TooltipWrapper } from "./TooltipWrapper-CSXs5-E3.js";
|
|
11
11
|
import { isValidElement, useId, useLayoutEffect, useRef, useState } from "react";
|
|
12
12
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
13
13
|
import { useFocusRing as $32daac5f69beb98a$re_export$useFocusRing } from "react-aria/useFocusRing";
|
|
@@ -141,6 +141,7 @@ const InputFrame = (props) => {
|
|
|
141
141
|
children: /* @__PURE__ */ jsx(Spinner, {})
|
|
142
142
|
}),
|
|
143
143
|
!isLoading && action && /* @__PURE__ */ jsx(InlineIconButton, {
|
|
144
|
+
size: "none",
|
|
144
145
|
color: "secondary",
|
|
145
146
|
icon: action.icon,
|
|
146
147
|
isDisabled,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as Table } from "./Table-
|
|
1
|
+
import { t as Table } from "./Table-CgG02oHQ.js";
|
|
2
2
|
import { t as Checkbox } from "./Checkbox-D3f2Plbc.js";
|
|
3
3
|
import { t as Typography } from "./Typography-LU4z2pR1.js";
|
|
4
4
|
import { t as Spinner } from "./Spinner-BeVTUzzx.js";
|
package/dist/utils/logger.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as logger } from "../logger-
|
|
1
|
+
import { t as logger } from "../logger-CW24po62.js";
|
|
2
2
|
export { logger };
|
package/package.json
CHANGED
|
@@ -38,6 +38,17 @@ For persistence, load a saved `UIConfiguration` and pass it as `initialValue` be
|
|
|
38
38
|
|
|
39
39
|
The exporter provides Tailwind CSS overrides and a separate `UIConfig.Provider` configuration. Import exported CSS **after** the app's existing theme. Light and dark colors retain separate selectors. The CSS export uses `@theme` for build-time Tailwind integration; the live provider emits ordinary CSS selectors.
|
|
40
40
|
|
|
41
|
+
## Developer toolbar
|
|
42
|
+
|
|
43
|
+
`UIDevToolbar` is a ready-made floating dock for a running app: **Configure UI** opens the compact, editor-only configurator; **Inspect** turns on the page inspector, a sidebar beside the page whose token links open the configurator on that token; and an optional **App canvas** button calls `onOpenCanvas`. The toolbar tucks into a tab on the window's left edge and remembers that across reloads. It renders the configurator and the inspector itself, so mount it once inside `UIConfigurationProvider` instead of `UIConfigurationModal`.
|
|
44
|
+
|
|
45
|
+
```tsx
|
|
46
|
+
import { UIDevToolbar } from "@povio/ui/ui-configurator";
|
|
47
|
+
import "@povio/ui/ui-configurator/styles";
|
|
48
|
+
|
|
49
|
+
<UIDevToolbar onOpenCanvas={import.meta.env.DEV ? () => navigate({ to: "/_canvas" }) : undefined} />;
|
|
50
|
+
```
|
|
51
|
+
|
|
41
52
|
## Save directly to your app's theme in Vite
|
|
42
53
|
|
|
43
54
|
The configurator and its stylesheet ship with `@povio/ui` as separate, optional subpath exports. The Node plugin ships in another entry, `@povio/ui/ui-configurator/vite`; neither the configurator nor Node code is exported from the regular component barrels.
|
package/dist/groups-oQmSeqXn.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
//#region src/configurator/gallery/groups.ts
|
|
2
|
-
/** Gallery sections, kept apart from the demos so a host can list them without loading every component. */
|
|
3
|
-
const galleryGroups = [
|
|
4
|
-
"Buttons",
|
|
5
|
-
"Inputs",
|
|
6
|
-
"Selection",
|
|
7
|
-
"Files",
|
|
8
|
-
"Feedback",
|
|
9
|
-
"Text",
|
|
10
|
-
"Navigation",
|
|
11
|
-
"Overlays",
|
|
12
|
-
"Data"
|
|
13
|
-
];
|
|
14
|
-
/** One App Canvas artboard per section, after the composed layouts. */
|
|
15
|
-
const layoutsArtboard = "Layouts";
|
|
16
|
-
const componentArtboards = [layoutsArtboard, ...galleryGroups];
|
|
17
|
-
//#endregion
|
|
18
|
-
export { galleryGroups as n, layoutsArtboard as r, componentArtboards as t };
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { t as createLucideIcon } from "./createLucideIcon-LcezOE4z.js";
|
|
2
|
-
//#region ../../node_modules/.bun/lucide-react@1.43.0+83d5fd7b249dbeef/node_modules/lucide-react/dist/esm/icons/bold.mjs
|
|
3
|
-
/**
|
|
4
|
-
* @license lucide-react v1.43.0 - ISC
|
|
5
|
-
*
|
|
6
|
-
* This source code is licensed under the ISC license.
|
|
7
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
8
|
-
*/
|
|
9
|
-
const __iconData$2 = {
|
|
10
|
-
name: "bold",
|
|
11
|
-
size: 24,
|
|
12
|
-
node: [["path", {
|
|
13
|
-
d: "M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",
|
|
14
|
-
key: "mg9rjx"
|
|
15
|
-
}]]
|
|
16
|
-
};
|
|
17
|
-
__iconData$2.node;
|
|
18
|
-
const Bold = createLucideIcon(__iconData$2);
|
|
19
|
-
//#endregion
|
|
20
|
-
//#region ../../node_modules/.bun/lucide-react@1.43.0+83d5fd7b249dbeef/node_modules/lucide-react/dist/esm/icons/italic.mjs
|
|
21
|
-
/**
|
|
22
|
-
* @license lucide-react v1.43.0 - ISC
|
|
23
|
-
*
|
|
24
|
-
* This source code is licensed under the ISC license.
|
|
25
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/
|
|
27
|
-
const __iconData$1 = {
|
|
28
|
-
name: "italic",
|
|
29
|
-
size: 24,
|
|
30
|
-
node: [
|
|
31
|
-
["line", {
|
|
32
|
-
x1: "19",
|
|
33
|
-
x2: "10",
|
|
34
|
-
y1: "4",
|
|
35
|
-
y2: "4",
|
|
36
|
-
key: "15jd3p"
|
|
37
|
-
}],
|
|
38
|
-
["line", {
|
|
39
|
-
x1: "14",
|
|
40
|
-
x2: "5",
|
|
41
|
-
y1: "20",
|
|
42
|
-
y2: "20",
|
|
43
|
-
key: "bu0au3"
|
|
44
|
-
}],
|
|
45
|
-
["line", {
|
|
46
|
-
x1: "15",
|
|
47
|
-
x2: "9",
|
|
48
|
-
y1: "4",
|
|
49
|
-
y2: "20",
|
|
50
|
-
key: "uljnxc"
|
|
51
|
-
}]
|
|
52
|
-
]
|
|
53
|
-
};
|
|
54
|
-
__iconData$1.node;
|
|
55
|
-
const Italic = createLucideIcon(__iconData$1);
|
|
56
|
-
//#endregion
|
|
57
|
-
//#region ../../node_modules/.bun/lucide-react@1.43.0+83d5fd7b249dbeef/node_modules/lucide-react/dist/esm/icons/underline.mjs
|
|
58
|
-
/**
|
|
59
|
-
* @license lucide-react v1.43.0 - ISC
|
|
60
|
-
*
|
|
61
|
-
* This source code is licensed under the ISC license.
|
|
62
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
63
|
-
*/
|
|
64
|
-
const __iconData = {
|
|
65
|
-
name: "underline",
|
|
66
|
-
size: 24,
|
|
67
|
-
node: [["path", {
|
|
68
|
-
d: "M6 4v6a6 6 0 0 0 12 0V4",
|
|
69
|
-
key: "9kb039"
|
|
70
|
-
}], ["line", {
|
|
71
|
-
x1: "4",
|
|
72
|
-
x2: "20",
|
|
73
|
-
y1: "20",
|
|
74
|
-
y2: "20",
|
|
75
|
-
key: "nun2al"
|
|
76
|
-
}]]
|
|
77
|
-
};
|
|
78
|
-
__iconData.node;
|
|
79
|
-
const Underline = createLucideIcon(__iconData);
|
|
80
|
-
//#endregion
|
|
81
|
-
export { Italic as n, Bold as r, Underline as t };
|