@povio/ui 5.0.0-rc.11 → 5.0.0-rc.13
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 +6 -0
- package/dist/{AppCanvasPage-BTmt8poT.d.ts → AppCanvasPage-BZ2mrKY4.d.ts} +3 -1
- package/dist/{AppCanvasPage-BsQrZ8q7.js → AppCanvasPage-DtWEvs_Y.js} +1065 -316
- package/dist/{CanvasComponentsFrame-C0Sf9RcC.js → CanvasComponentsFrame-CbgJJv-3.js} +1 -1
- package/dist/{ComponentGallery-DDSqnm9f.js → ComponentGallery-COqEqqN6.js} +2 -2
- package/dist/{Form-DmcByQts.d.ts → Form-DAtj2szV.d.ts} +1 -1
- package/dist/{Inputs-C0sUmuPv.d.ts → Inputs-C_6dVwC7.d.ts} +1 -1
- package/dist/{Table-BN2_J_Ne.js → Table-piX1SWvN.js} +54 -1
- package/dist/{UIConfigurator-C_2kgJtm.js → UIConfigurator-DekPXjv9.js} +1290 -406
- 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 +2 -2
- package/dist/config/app-canvas.js +1 -1
- package/dist/config/ui-config.d.ts +1 -1
- package/dist/config/ui-configurator-vite.d.ts +9 -0
- package/dist/config/ui-configurator-vite.js +449 -10
- package/dist/config/ui-configurator.d.ts +14 -2
- package/dist/config/ui-configurator.js +2 -2
- package/dist/{configuration.context-qdjDwQJj.d.ts → configuration.context-3I7-wBII.d.ts} +4 -1
- package/dist/{dynamicInputs-DdcsSoYu.d.ts → dynamicInputs-R5i7AT_C.d.ts} +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/rhf/inputs.d.ts +1 -1
- package/dist/rhf.d.ts +2 -2
- package/dist/rhf.js +3 -3
- package/dist/styles/app-canvas.css +402 -18
- package/dist/styles/configurator.css +251 -92
- package/dist/{table.cva-D5oQ-QvA.js → table.cva-DlMT-zLD.js} +1 -54
- package/dist/tanstack/form.d.ts +1 -1
- package/dist/tanstack/inputs.d.ts +2 -2
- package/dist/tanstack/table.js +2 -2
- package/dist/tanstack.d.ts +4 -4
- package/dist/tanstack.js +3 -3
- package/dist/{uiConfig.context-BqKWd_MO.d.ts → uiConfig.context-BksnNQyw.d.ts} +1 -1
- package/dist/{useTableColumnConfig-6zn3zKl3.js → useTableColumnConfig-CNJ_ZvIN.js} +1 -1
- package/package.json +1 -1
- package/src/configurator/README.md +18 -1
|
@@ -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-BZ2mrKY4.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-DtWEvs_Y.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,5 +1,5 @@
|
|
|
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-
|
|
2
|
-
import "../configuration.context-
|
|
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-BZ2mrKY4.js";
|
|
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. */
|
|
5
5
|
declare function AppCanvasFrameBridge({ href }: {
|
|
@@ -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-DtWEvs_Y.js";
|
|
2
2
|
export { APP_CANVAS_PATH, AppCanvas, AppCanvasFrameBridge, AppCanvasPage, defaultCanvasBreakpoints, discoverCanvasPages, isAppCanvasFrame, layoutCanvasPages };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as UIConfig } from "../uiConfig.context-
|
|
1
|
+
import { t as UIConfig } from "../uiConfig.context-BksnNQyw.js";
|
|
2
2
|
import { a as DateRangeResolvedValue, i as DateRangeRelativeOption } from "../DateRangePicker-Dfptit_Z.js";
|
|
3
3
|
export { type DateRangeRelativeOption, type DateRangeResolvedValue, UIConfig };
|
|
@@ -3,6 +3,15 @@ import { Plugin } from "vite";
|
|
|
3
3
|
interface UIConfiguratorPluginOptions {
|
|
4
4
|
/** CSS file relative to this app's Vite root. Must exist inside that root. */
|
|
5
5
|
themeFile?: string;
|
|
6
|
+
/** Repository canvas JSON, relative to the Vite root. false disables storage. */
|
|
7
|
+
canvasFile?: string | false;
|
|
8
|
+
/** Repository theme versions JSON, relative to the Vite root. false disables storage. */
|
|
9
|
+
themeVersionsFile?: string | false;
|
|
10
|
+
/**
|
|
11
|
+
* Component settings JSON that Apply theme writes, relative to the Vite root; defaults to
|
|
12
|
+
* `ui-configuration.json` beside the theme file. Import it with `resolveUIConfiguration`. false disables it.
|
|
13
|
+
*/
|
|
14
|
+
configurationFile?: string | false;
|
|
6
15
|
}
|
|
7
16
|
/** Adds the configurator's Save theme action to this app's development server. */
|
|
8
17
|
declare function uiConfigurator(options?: UIConfiguratorPluginOptions): Plugin;
|
|
@@ -1,6 +1,396 @@
|
|
|
1
|
-
import { randomUUID } from "node:crypto";
|
|
2
|
-
import { readFile, realpath, writeFile } from "node:fs/promises";
|
|
3
|
-
import { isAbsolute, relative, resolve, sep } from "node:path";
|
|
1
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
2
|
+
import { lstat, readFile, realpath, rename, unlink, writeFile } from "node:fs/promises";
|
|
3
|
+
import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
4
|
+
//#region src/configurator/repository-storage-protocol.ts
|
|
5
|
+
const componentConfigurationMetaName = "povio-ui-component-configuration";
|
|
6
|
+
/** Dev-server event sent when a repository storage file changes, so other tabs reload it. */
|
|
7
|
+
const repositoryStorageChangedEvent = "povio-ui:repository-storage-changed";
|
|
8
|
+
//#endregion
|
|
9
|
+
//#region src/configurator/repository-storage-vite.ts
|
|
10
|
+
var StorageError = class extends Error {
|
|
11
|
+
constructor(message, status) {
|
|
12
|
+
super(message);
|
|
13
|
+
this.status = status;
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
const inside = (root, path) => {
|
|
17
|
+
const rel = relative(root, path);
|
|
18
|
+
return !!rel && !isAbsolute(rel) && rel !== ".." && !rel.startsWith(`..${sep}`);
|
|
19
|
+
};
|
|
20
|
+
const record$2 = (value) => !!value && typeof value === "object" && !Array.isArray(value);
|
|
21
|
+
const revisionOf = (text) => createHash("sha256").update(text).digest("hex");
|
|
22
|
+
const respond$1 = (res, status, body) => {
|
|
23
|
+
res.writeHead(status, {
|
|
24
|
+
"Content-Type": "application/json",
|
|
25
|
+
"Cache-Control": "no-store"
|
|
26
|
+
});
|
|
27
|
+
res.end(JSON.stringify(body));
|
|
28
|
+
};
|
|
29
|
+
async function readBody(req, label, maxBytes) {
|
|
30
|
+
let size = 0;
|
|
31
|
+
const chunks = [];
|
|
32
|
+
for await (const chunk of req) {
|
|
33
|
+
size += Buffer.byteLength(chunk);
|
|
34
|
+
if (size > maxBytes) throw new StorageError(`${label} file exceeds ${maxBytes / 1024} KB.`, 413);
|
|
35
|
+
chunks.push(Buffer.from(chunk));
|
|
36
|
+
}
|
|
37
|
+
try {
|
|
38
|
+
return JSON.parse(Buffer.concat(chunks).toString("utf8"));
|
|
39
|
+
} catch {
|
|
40
|
+
throw new StorageError(`Expected JSON ${label.toLowerCase()} data.`, 400);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
/** Fixed-path development persistence only. Never commits or pushes repository changes. */
|
|
44
|
+
async function configureRepositoryStorage(server, { filename, route, field, label, decode, maxBytes = 262144 }) {
|
|
45
|
+
const noun = label.toLowerCase();
|
|
46
|
+
const root = await realpath(server.config.root);
|
|
47
|
+
const filePath = resolve(root, filename);
|
|
48
|
+
const parent = dirname(filePath);
|
|
49
|
+
if (!inside(root, filePath) || !filePath.endsWith(".json")) throw new Error(`Povio UI ${noun} file must be a JSON file inside this app's Vite root.`);
|
|
50
|
+
const guard = async () => {
|
|
51
|
+
if (await realpath(parent) !== parent) throw new StorageError(`${label} file parent cannot be a symbolic link.`, 409);
|
|
52
|
+
try {
|
|
53
|
+
const stat = await lstat(filePath);
|
|
54
|
+
if (stat.isSymbolicLink() || !stat.isFile()) throw new StorageError(`${label} file must be a regular file, not a symbolic link.`, 409);
|
|
55
|
+
if (stat.size > maxBytes) throw new StorageError(`${label} file exceeds ${maxBytes / 1024} KB.`, 413);
|
|
56
|
+
} catch (error) {
|
|
57
|
+
if (error.code !== "ENOENT") throw error;
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
await guard();
|
|
61
|
+
const file = relative(root, filePath).split(sep).join("/");
|
|
62
|
+
const connection = {
|
|
63
|
+
endpoint: `${new URL(server.config.base, "http://localhost").pathname.replace(/\/?$/, "/")}__povio_ui/${route}`,
|
|
64
|
+
token: randomUUID(),
|
|
65
|
+
file
|
|
66
|
+
};
|
|
67
|
+
let pending = Promise.resolve();
|
|
68
|
+
const readCurrent = async () => {
|
|
69
|
+
await guard();
|
|
70
|
+
try {
|
|
71
|
+
const text = await readFile(filePath, "utf8");
|
|
72
|
+
return {
|
|
73
|
+
text,
|
|
74
|
+
revision: revisionOf(text)
|
|
75
|
+
};
|
|
76
|
+
} catch (error) {
|
|
77
|
+
if (error.code === "ENOENT") return {
|
|
78
|
+
text: null,
|
|
79
|
+
revision: null
|
|
80
|
+
};
|
|
81
|
+
throw error;
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
const handle = async (req, res) => {
|
|
85
|
+
if (req.headers["x-povio-ui-storage-token"] !== connection.token) throw new StorageError(`Invalid ${noun} storage token.`, 403);
|
|
86
|
+
const origin = req.headers.origin;
|
|
87
|
+
let validOrigin = true;
|
|
88
|
+
if (origin) try {
|
|
89
|
+
validOrigin = new URL(origin).origin === `${server.config.server.https ? "https" : "http"}://${req.headers.host}`;
|
|
90
|
+
} catch {
|
|
91
|
+
validOrigin = false;
|
|
92
|
+
}
|
|
93
|
+
if (!validOrigin || req.headers["sec-fetch-site"] === "cross-site") throw new StorageError(`${label} storage requires the app's origin.`, 403);
|
|
94
|
+
if (req.method === "GET") {
|
|
95
|
+
await pending;
|
|
96
|
+
const current = await readCurrent();
|
|
97
|
+
let value = null;
|
|
98
|
+
if (current.text !== null) try {
|
|
99
|
+
value = decode(JSON.parse(current.text));
|
|
100
|
+
} catch {
|
|
101
|
+
throw new StorageError(`Repository ${noun} file is invalid. Correct it before saving.`, 409);
|
|
102
|
+
}
|
|
103
|
+
return respond$1(res, 200, {
|
|
104
|
+
[field]: value,
|
|
105
|
+
revision: current.revision,
|
|
106
|
+
file
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
if (req.method !== "POST") {
|
|
110
|
+
res.setHeader("Allow", "GET, POST");
|
|
111
|
+
throw new StorageError("Use GET or POST.", 405);
|
|
112
|
+
}
|
|
113
|
+
if (!req.headers["content-type"]?.startsWith("application/json")) throw new StorageError("Expected application/json.", 415);
|
|
114
|
+
const body = await readBody(req, label, maxBytes);
|
|
115
|
+
if (!record$2(body) || !(body.revision === null || typeof body.revision === "string")) throw new StorageError(`Expected ${field} and revision.`, 400);
|
|
116
|
+
const value = decode(body[field]);
|
|
117
|
+
const text = `${JSON.stringify(value, null, 2)}\n`;
|
|
118
|
+
if (Buffer.byteLength(text) > maxBytes) throw new StorageError(`${label} file exceeds ${maxBytes / 1024} KB.`, 413);
|
|
119
|
+
const write = pending.then(async () => {
|
|
120
|
+
if ((await readCurrent()).revision !== body.revision) throw new StorageError(`${label} file changed. Reload it before saving again.`, 409);
|
|
121
|
+
const temporary = `${filePath}.povio-${randomUUID()}.tmp`;
|
|
122
|
+
try {
|
|
123
|
+
await writeFile(temporary, text, {
|
|
124
|
+
encoding: "utf8",
|
|
125
|
+
flag: "wx",
|
|
126
|
+
mode: 384
|
|
127
|
+
});
|
|
128
|
+
await guard();
|
|
129
|
+
await rename(temporary, filePath);
|
|
130
|
+
} finally {
|
|
131
|
+
await unlink(temporary).catch(() => {});
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
pending = write.catch(() => {});
|
|
135
|
+
await write;
|
|
136
|
+
return respond$1(res, 200, {
|
|
137
|
+
revision: revisionOf(text),
|
|
138
|
+
file
|
|
139
|
+
});
|
|
140
|
+
};
|
|
141
|
+
server.middlewares.use((req, res, next) => {
|
|
142
|
+
if (req.url?.split("?")[0] !== connection.endpoint) return next();
|
|
143
|
+
handle(req, res).catch((error) => respond$1(res, error instanceof StorageError ? error.status : 500, { error: error instanceof Error ? error.message : `Could not access ${noun} file.` }));
|
|
144
|
+
});
|
|
145
|
+
const isFile = (path) => resolve(path) === filePath;
|
|
146
|
+
return {
|
|
147
|
+
connection,
|
|
148
|
+
isFile,
|
|
149
|
+
isStorageFile: (path) => isFile(path) || resolve(path).startsWith(`${filePath}.povio-`),
|
|
150
|
+
revisionOf
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
//#endregion
|
|
154
|
+
//#region src/app-canvas/manifest.ts
|
|
155
|
+
function createCanvasWorkspace(name, id) {
|
|
156
|
+
return {
|
|
157
|
+
id,
|
|
158
|
+
name: name.trim() || "Workspace",
|
|
159
|
+
enabledPages: null,
|
|
160
|
+
positions: {}
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
function createCanvasManifest() {
|
|
164
|
+
return {
|
|
165
|
+
version: 2,
|
|
166
|
+
workspaces: [createCanvasWorkspace("All pages", "default")],
|
|
167
|
+
activeWorkspaceId: "default",
|
|
168
|
+
examples: {},
|
|
169
|
+
breakpoint: "desktop"
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
function isRecord$1(value) {
|
|
173
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
174
|
+
}
|
|
175
|
+
function isJSON(value, ancestors = /* @__PURE__ */ new Set(), depth = 0) {
|
|
176
|
+
if (value === null || typeof value === "string" || typeof value === "boolean") return true;
|
|
177
|
+
if (typeof value === "number") return Number.isFinite(value);
|
|
178
|
+
if (typeof value !== "object" || depth > 30 || ancestors.has(value)) return false;
|
|
179
|
+
ancestors.add(value);
|
|
180
|
+
const valid = Object.values(value).every((child) => isJSON(child, ancestors, depth + 1));
|
|
181
|
+
ancestors.delete(value);
|
|
182
|
+
return valid;
|
|
183
|
+
}
|
|
184
|
+
function parsePositions(input) {
|
|
185
|
+
return Object.fromEntries(Object.entries(isRecord$1(input) ? input : {}).flatMap(([breakpoint, entries]) => {
|
|
186
|
+
if (!isRecord$1(entries)) return [];
|
|
187
|
+
return [[breakpoint, Object.fromEntries(Object.entries(entries).flatMap(([id, point]) => isRecord$1(point) && typeof point.x === "number" && Number.isFinite(point.x) && typeof point.y === "number" && Number.isFinite(point.y) ? [[id, {
|
|
188
|
+
x: point.x,
|
|
189
|
+
y: point.y
|
|
190
|
+
}]] : []))]];
|
|
191
|
+
}));
|
|
192
|
+
}
|
|
193
|
+
/** Sanitize either stored JSON text or an imported value, migrating v1 positions into the default workspace. */
|
|
194
|
+
function parseCanvasManifest(input) {
|
|
195
|
+
const fallback = createCanvasManifest();
|
|
196
|
+
let value = input;
|
|
197
|
+
if (typeof value === "string") try {
|
|
198
|
+
value = JSON.parse(value);
|
|
199
|
+
} catch {
|
|
200
|
+
return fallback;
|
|
201
|
+
}
|
|
202
|
+
if (!isRecord$1(value) || value.version !== 1 && value.version !== 2) return fallback;
|
|
203
|
+
const examples = Object.fromEntries(Object.entries(isRecord$1(value.examples) ? value.examples : {}).flatMap(([id, example]) => {
|
|
204
|
+
if (!isRecord$1(example)) return [];
|
|
205
|
+
const clean = {};
|
|
206
|
+
if (typeof example.title === "string") clean.title = example.title;
|
|
207
|
+
if (isRecord$1(example.params)) clean.params = Object.fromEntries(Object.entries(example.params).filter((entry) => typeof entry[1] === "string"));
|
|
208
|
+
if (isRecord$1(example.search)) clean.search = Object.fromEntries(Object.entries(example.search).filter(([, item]) => isJSON(item)));
|
|
209
|
+
return [[id, clean]];
|
|
210
|
+
}));
|
|
211
|
+
const workspaces = [];
|
|
212
|
+
const ids = /* @__PURE__ */ new Set();
|
|
213
|
+
if (value.version === 1) workspaces.push({
|
|
214
|
+
...createCanvasWorkspace("All pages", "default"),
|
|
215
|
+
positions: parsePositions(value.positions)
|
|
216
|
+
});
|
|
217
|
+
else if (Array.isArray(value.workspaces)) for (const entry of value.workspaces) {
|
|
218
|
+
if (!isRecord$1(entry) || typeof entry.id !== "string" || !entry.id.trim() || ids.has(entry.id)) continue;
|
|
219
|
+
ids.add(entry.id);
|
|
220
|
+
workspaces.push({
|
|
221
|
+
id: entry.id,
|
|
222
|
+
name: typeof entry.name === "string" && entry.name.trim() ? entry.name.trim() : "Workspace",
|
|
223
|
+
enabledPages: Array.isArray(entry.enabledPages) ? [...new Set(entry.enabledPages.filter((id) => typeof id === "string" && id.length > 0))] : null,
|
|
224
|
+
positions: parsePositions(entry.positions)
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
if (!workspaces.length) workspaces.push(createCanvasWorkspace("All pages", "default"));
|
|
228
|
+
return {
|
|
229
|
+
version: 2,
|
|
230
|
+
workspaces,
|
|
231
|
+
activeWorkspaceId: typeof value.activeWorkspaceId === "string" && workspaces.some((workspace) => workspace.id === value.activeWorkspaceId) ? value.activeWorkspaceId : workspaces[0].id,
|
|
232
|
+
examples,
|
|
233
|
+
breakpoint: typeof value.breakpoint === "string" && value.breakpoint.length > 0 ? value.breakpoint : fallback.breakpoint
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
//#endregion
|
|
237
|
+
//#region src/app-canvas/storage-vite.ts
|
|
238
|
+
const record$1 = (value) => !!value && typeof value === "object" && !Array.isArray(value);
|
|
239
|
+
function validPositions(value) {
|
|
240
|
+
return record$1(value) && Object.values(value).every((entries) => record$1(entries) && Object.values(entries).every((position) => record$1(position) && typeof position.x === "number" && Number.isFinite(position.x) && typeof position.y === "number" && Number.isFinite(position.y)));
|
|
241
|
+
}
|
|
242
|
+
function decodeManifest(value) {
|
|
243
|
+
if (!record$1(value) || ![1, 2].includes(Number(value.version)) || typeof value.breakpoint !== "string" || !record$1(value.examples)) throw new StorageError("Invalid canvas manifest.", 400);
|
|
244
|
+
if (value.version === 1) {
|
|
245
|
+
if (!validPositions(value.positions)) throw new StorageError("Invalid canvas positions.", 400);
|
|
246
|
+
} else if (value.version !== 2 || !Array.isArray(value.workspaces) || !value.workspaces.length || typeof value.activeWorkspaceId !== "string" || !value.workspaces.every((workspace) => record$1(workspace) && typeof workspace.id === "string" && workspace.id.length > 0 && typeof workspace.name === "string" && (workspace.enabledPages === null || Array.isArray(workspace.enabledPages) && workspace.enabledPages.every((id) => typeof id === "string")) && validPositions(workspace.positions))) throw new StorageError("Invalid canvas workspaces.", 400);
|
|
247
|
+
if (!Object.values(value.examples).every((example) => record$1(example) && (example.title === void 0 || typeof example.title === "string") && (example.params === void 0 || record$1(example.params) && Object.values(example.params).every((param) => typeof param === "string")) && (example.search === void 0 || record$1(example.search)))) throw new StorageError("Invalid canvas examples.", 400);
|
|
248
|
+
if (value.version === 2) {
|
|
249
|
+
const workspaces = value.workspaces;
|
|
250
|
+
if (new Set(workspaces.map((workspace) => workspace.id)).size !== workspaces.length || !workspaces.some((workspace) => workspace.id === value.activeWorkspaceId)) throw new StorageError("Invalid canvas workspace identity.", 400);
|
|
251
|
+
}
|
|
252
|
+
return parseCanvasManifest(value);
|
|
253
|
+
}
|
|
254
|
+
/** Fixed-path development persistence for canvas workspaces. Never commits or pushes repository changes. */
|
|
255
|
+
function configureCanvasStorage(server, filename = "povio.canvas.json") {
|
|
256
|
+
return configureRepositoryStorage(server, {
|
|
257
|
+
filename,
|
|
258
|
+
route: "canvas",
|
|
259
|
+
field: "manifest",
|
|
260
|
+
label: "Canvas",
|
|
261
|
+
decode: decodeManifest
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
//#endregion
|
|
265
|
+
//#region src/app-canvas/storage-protocol.ts
|
|
266
|
+
const canvasStorageMetaName = "povio-ui-canvas-storage";
|
|
267
|
+
//#endregion
|
|
268
|
+
//#region src/configurator/theme-versions.ts
|
|
269
|
+
const themeVersionsMetaName = "povio-ui-theme-versions";
|
|
270
|
+
function createThemeVersion(name, id, configuration) {
|
|
271
|
+
return {
|
|
272
|
+
id,
|
|
273
|
+
name: name.trim() || "Theme",
|
|
274
|
+
...configuration ? { configuration: structuredClone(configuration) } : {}
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
function createThemeVersions() {
|
|
278
|
+
return {
|
|
279
|
+
version: 1,
|
|
280
|
+
versions: [createThemeVersion("Default", "default")],
|
|
281
|
+
activeVersionId: "default"
|
|
282
|
+
};
|
|
283
|
+
}
|
|
284
|
+
function isRecord(value) {
|
|
285
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
286
|
+
}
|
|
287
|
+
function safeJSON(value, ancestors = /* @__PURE__ */ new Set(), depth = 0) {
|
|
288
|
+
if (value === null || typeof value === "string" || typeof value === "boolean") return true;
|
|
289
|
+
if (typeof value === "number") return Number.isFinite(value);
|
|
290
|
+
if (typeof value !== "object" || depth > 30 || ancestors.has(value)) return false;
|
|
291
|
+
if (!Array.isArray(value) && Object.getPrototypeOf(value) !== Object.prototype && Object.getPrototypeOf(value) !== null) return false;
|
|
292
|
+
ancestors.add(value);
|
|
293
|
+
const valid = Object.entries(value).every(([key, child]) => ![
|
|
294
|
+
"__proto__",
|
|
295
|
+
"prototype",
|
|
296
|
+
"constructor"
|
|
297
|
+
].includes(key) && safeJSON(child, ancestors, depth + 1));
|
|
298
|
+
ancestors.delete(value);
|
|
299
|
+
return valid;
|
|
300
|
+
}
|
|
301
|
+
const stringMap = (value) => isRecord(value) && Object.values(value).every((item) => typeof item === "string");
|
|
302
|
+
const variantValue = (value) => value === null || typeof value === "string" || typeof value === "boolean";
|
|
303
|
+
function validCvaEdits(value) {
|
|
304
|
+
return isRecord(value) && Object.entries(value).every(([slot, definition]) => {
|
|
305
|
+
if (!/^[a-zA-Z][a-zA-Z0-9]*\.[a-zA-Z][a-zA-Z0-9]*$/.test(slot) || !isRecord(definition) || !Array.isArray(definition.base) || !definition.base.every((item) => typeof item === "string") || !isRecord(definition.config)) return false;
|
|
306
|
+
const config = definition.config;
|
|
307
|
+
return isRecord(config.variants) && Object.values(config.variants).every(stringMap) && isRecord(config.defaultVariants) && Object.values(config.defaultVariants).every(variantValue) && Array.isArray(config.compoundVariants) && config.compoundVariants.every((compound) => isRecord(compound) && Object.values(compound).every((item) => variantValue(item) || Array.isArray(item) && (item.every((part) => typeof part === "string") || item.every((part) => typeof part === "boolean"))));
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
/** Returns an independent JSON configuration, or undefined for invalid/unset overrides. */
|
|
311
|
+
function parseUIConfiguration(value) {
|
|
312
|
+
if (!isRecord(value) || !safeJSON(value) || !isRecord(value.theme) || ![
|
|
313
|
+
"light",
|
|
314
|
+
"dark",
|
|
315
|
+
"theme"
|
|
316
|
+
].every((key) => stringMap(value.theme && value.theme[key])) || !isRecord(value.config) || value.overrides !== void 0 && !validCvaEdits(value.overrides)) return void 0;
|
|
317
|
+
return JSON.parse(JSON.stringify(value));
|
|
318
|
+
}
|
|
319
|
+
/** Returns an independent component configuration, or undefined when invalid. */
|
|
320
|
+
function parseComponentConfiguration(value) {
|
|
321
|
+
if (!isRecord(value) || !safeJSON(value) || !isRecord(value.config) || value.overrides !== void 0 && !validCvaEdits(value.overrides)) return void 0;
|
|
322
|
+
const copy = JSON.parse(JSON.stringify(value));
|
|
323
|
+
return {
|
|
324
|
+
config: copy.config ?? {},
|
|
325
|
+
overrides: copy.overrides ?? {}
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
/** Sanitize stored JSON text or a repository value. */
|
|
329
|
+
function parseThemeVersions(input) {
|
|
330
|
+
const fallback = createThemeVersions();
|
|
331
|
+
let value = input;
|
|
332
|
+
if (typeof value === "string") try {
|
|
333
|
+
value = JSON.parse(value);
|
|
334
|
+
} catch {
|
|
335
|
+
return fallback;
|
|
336
|
+
}
|
|
337
|
+
if (!isRecord(value) || value.version !== 1 || !Array.isArray(value.versions)) return fallback;
|
|
338
|
+
const versions = [];
|
|
339
|
+
const ids = /* @__PURE__ */ new Set();
|
|
340
|
+
for (const entry of value.versions) {
|
|
341
|
+
if (!isRecord(entry) || typeof entry.id !== "string" || !entry.id.trim() || ids.has(entry.id)) continue;
|
|
342
|
+
ids.add(entry.id);
|
|
343
|
+
const configuration = parseUIConfiguration(entry.configuration);
|
|
344
|
+
versions.push({
|
|
345
|
+
id: entry.id,
|
|
346
|
+
name: typeof entry.name === "string" && entry.name.trim() ? entry.name.trim() : "Theme",
|
|
347
|
+
...configuration ? { configuration } : {}
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
if (!versions.length) return fallback;
|
|
351
|
+
return {
|
|
352
|
+
version: 1,
|
|
353
|
+
versions,
|
|
354
|
+
activeVersionId: typeof value.activeVersionId === "string" && versions.some((version) => version.id === value.activeVersionId) ? value.activeVersionId : versions[0].id
|
|
355
|
+
};
|
|
356
|
+
}
|
|
357
|
+
//#endregion
|
|
358
|
+
//#region src/configurator/theme-versions-vite.ts
|
|
359
|
+
const record = (value) => !!value && typeof value === "object" && !Array.isArray(value);
|
|
360
|
+
function decodeThemeVersions(value) {
|
|
361
|
+
if (!record(value) || value.version !== 1 || !Array.isArray(value.versions) || !value.versions.length || typeof value.activeVersionId !== "string" || !value.versions.every((version) => record(version) && typeof version.id === "string" && version.id.length > 0 && typeof version.name === "string" && (version.configuration === void 0 || parseUIConfiguration(version.configuration) !== void 0))) throw new StorageError("Invalid theme versions.", 400);
|
|
362
|
+
const ids = value.versions.map((version) => version.id);
|
|
363
|
+
if (new Set(ids).size !== ids.length || !ids.includes(value.activeVersionId)) throw new StorageError("Invalid theme version identity.", 400);
|
|
364
|
+
return parseThemeVersions(value);
|
|
365
|
+
}
|
|
366
|
+
/** Theme versions shared through the repository, separate from canvas layout. Never commits or pushes. */
|
|
367
|
+
function configureThemeVersionsStorage(server, filename = "povio.themes.json") {
|
|
368
|
+
return configureRepositoryStorage(server, {
|
|
369
|
+
filename,
|
|
370
|
+
route: "themes",
|
|
371
|
+
field: "themes",
|
|
372
|
+
label: "Theme versions",
|
|
373
|
+
decode: decodeThemeVersions,
|
|
374
|
+
maxBytes: 4194304
|
|
375
|
+
});
|
|
376
|
+
}
|
|
377
|
+
//#endregion
|
|
378
|
+
//#region src/configurator/component-configuration-vite.ts
|
|
379
|
+
/** The component settings Apply theme writes beside the theme CSS. Hot updates reach the app like the CSS. */
|
|
380
|
+
function configureComponentConfigurationStorage(server, filename) {
|
|
381
|
+
return configureRepositoryStorage(server, {
|
|
382
|
+
filename,
|
|
383
|
+
route: "configuration",
|
|
384
|
+
field: "configuration",
|
|
385
|
+
label: "UI configuration",
|
|
386
|
+
decode: (value) => {
|
|
387
|
+
const configuration = parseComponentConfiguration(value);
|
|
388
|
+
if (!configuration) throw new StorageError("Invalid UI configuration.", 400);
|
|
389
|
+
return configuration;
|
|
390
|
+
}
|
|
391
|
+
});
|
|
392
|
+
}
|
|
393
|
+
//#endregion
|
|
4
394
|
//#region src/configurator/theme-model.ts
|
|
5
395
|
const declarations = (source) => Object.fromEntries([...source.matchAll(/(--[\w-]+)\s*:\s*([^;]+);/g)].map(([, name, value]) => [name, value.trim()]));
|
|
6
396
|
const selectorDeclarations = (source, selector) => Object.assign({}, ...[...source.matchAll(selector)].map((match) => declarations(match[1])));
|
|
@@ -106,16 +496,22 @@ async function readCss(request) {
|
|
|
106
496
|
function uiConfigurator(options = {}) {
|
|
107
497
|
let connection;
|
|
108
498
|
let pendingWrite = Promise.resolve();
|
|
499
|
+
let canvasStorage;
|
|
500
|
+
let themeVersionsStorage;
|
|
501
|
+
let componentStorage;
|
|
109
502
|
return {
|
|
110
503
|
name: "vite-plugin-povio-ui-configurator",
|
|
111
504
|
apply: (_config, environment) => environment.command === "serve" && !environment.isPreview,
|
|
112
505
|
async configureServer(server) {
|
|
506
|
+
if (options.canvasFile !== false) canvasStorage = await configureCanvasStorage(server, options.canvasFile);
|
|
507
|
+
if (options.themeVersionsFile !== false) themeVersionsStorage = await configureThemeVersionsStorage(server, options.themeVersionsFile);
|
|
113
508
|
const root = await realpath(server.config.root);
|
|
114
509
|
const configuredFile = resolve(server.config.root, options.themeFile ?? "src/styles/theme.css");
|
|
115
510
|
const themeFile = await realpath(configuredFile);
|
|
116
511
|
const file = relative(root, themeFile);
|
|
117
512
|
if (!file || isAbsolute(file) || file === ".." || file.startsWith(`..${sep}`)) throw new Error("Povio UI themeFile must be inside this app's Vite root.");
|
|
118
513
|
if (!themeFile.endsWith(".css")) throw new Error("Povio UI themeFile must be a CSS file.");
|
|
514
|
+
if (options.configurationFile !== false) componentStorage = await configureComponentConfigurationStorage(server, options.configurationFile ?? join(dirname(file), "ui-configuration.json"));
|
|
119
515
|
const endpoint = `${new URL(server.config.base, "http://localhost").pathname.replace(/\/?$/, "/")}__povio_ui/theme`;
|
|
120
516
|
connection = {
|
|
121
517
|
endpoint,
|
|
@@ -157,16 +553,59 @@ function uiConfigurator(options = {}) {
|
|
|
157
553
|
});
|
|
158
554
|
});
|
|
159
555
|
},
|
|
556
|
+
async handleHotUpdate(context) {
|
|
557
|
+
const storage = [canvasStorage, themeVersionsStorage].find((item) => item?.isStorageFile(context.file));
|
|
558
|
+
if (!storage) return;
|
|
559
|
+
if (storage.isFile(context.file)) {
|
|
560
|
+
const text = await Promise.resolve(context.read()).catch(() => null);
|
|
561
|
+
const change = {
|
|
562
|
+
endpoint: storage.connection.endpoint,
|
|
563
|
+
revision: text ? storage.revisionOf(text) : null
|
|
564
|
+
};
|
|
565
|
+
context.server.ws.send({
|
|
566
|
+
type: "custom",
|
|
567
|
+
event: repositoryStorageChangedEvent,
|
|
568
|
+
data: change
|
|
569
|
+
});
|
|
570
|
+
}
|
|
571
|
+
return [];
|
|
572
|
+
},
|
|
160
573
|
transformIndexHtml() {
|
|
161
574
|
if (!connection) return;
|
|
162
|
-
return [
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
575
|
+
return [
|
|
576
|
+
{
|
|
577
|
+
tag: "meta",
|
|
578
|
+
attrs: {
|
|
579
|
+
name: themeWriterMetaName,
|
|
580
|
+
content: JSON.stringify(connection)
|
|
581
|
+
},
|
|
582
|
+
injectTo: "head"
|
|
167
583
|
},
|
|
168
|
-
|
|
169
|
-
|
|
584
|
+
...canvasStorage ? [{
|
|
585
|
+
tag: "meta",
|
|
586
|
+
attrs: {
|
|
587
|
+
name: canvasStorageMetaName,
|
|
588
|
+
content: JSON.stringify(canvasStorage.connection)
|
|
589
|
+
},
|
|
590
|
+
injectTo: "head"
|
|
591
|
+
}] : [],
|
|
592
|
+
...componentStorage ? [{
|
|
593
|
+
tag: "meta",
|
|
594
|
+
attrs: {
|
|
595
|
+
name: componentConfigurationMetaName,
|
|
596
|
+
content: JSON.stringify(componentStorage.connection)
|
|
597
|
+
},
|
|
598
|
+
injectTo: "head"
|
|
599
|
+
}] : [],
|
|
600
|
+
...themeVersionsStorage ? [{
|
|
601
|
+
tag: "meta",
|
|
602
|
+
attrs: {
|
|
603
|
+
name: themeVersionsMetaName,
|
|
604
|
+
content: JSON.stringify(themeVersionsStorage.connection)
|
|
605
|
+
},
|
|
606
|
+
injectTo: "head"
|
|
607
|
+
}] : []
|
|
608
|
+
];
|
|
170
609
|
}
|
|
171
610
|
};
|
|
172
611
|
}
|
|
@@ -1,8 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as UIOverrides } from "../uiOverrides.context-DEp139He.js";
|
|
2
|
+
import { n as UIConfigOptions } from "../uiConfig.context-BksnNQyw.js";
|
|
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";
|
|
2
4
|
import { a as parseThemeCss, i as exportCss, n as ThemeEdits, r as Tokens, t as Mode } from "../theme-model-T1zIdBg8.js";
|
|
3
5
|
//#region src/configurator/UIConfigurator.d.ts
|
|
4
6
|
declare function UIConfigurationModal(): import("react").JSX.Element | null;
|
|
5
7
|
//#endregion
|
|
8
|
+
//#region src/configurator/component-configuration.d.ts
|
|
9
|
+
/**
|
|
10
|
+
* The app's applied component settings: pass the JSON written by the configurator's Apply theme
|
|
11
|
+
* and the app's code-level overrides, which stay underneath the applied variant overrides.
|
|
12
|
+
*/
|
|
13
|
+
declare function resolveUIConfiguration(file: unknown, baseOverrides?: UIOverrides.Config | null): {
|
|
14
|
+
config: Partial<Pick<UIConfigOptions, "button" | "input" | "renderStaticInput">>;
|
|
15
|
+
overrides: Partial<UIOverrides.Options>;
|
|
16
|
+
};
|
|
17
|
+
//#endregion
|
|
6
18
|
//#region src/configurator/ColorModeSwitch.d.ts
|
|
7
19
|
interface ColorModeSwitchProps {
|
|
8
20
|
value: Mode;
|
|
@@ -12,4 +24,4 @@ interface ColorModeSwitchProps {
|
|
|
12
24
|
/** Controlled color-mode switch, shared by configurators and application settings. */
|
|
13
25
|
declare function ColorModeSwitch({ value, onChange, label }: ColorModeSwitchProps): import("react").JSX.Element;
|
|
14
26
|
//#endregion
|
|
15
|
-
export { ColorModeSwitch, type ColorModeSwitchProps, type CvaDefinition, type CvaEdits, type ThemeEdits, type Tokens, type UIConfiguration, UIConfigurationModal, UIConfigurationProvider, type UIConfigurationProviderProps, exportCss, parseThemeCss, useUIConfiguration };
|
|
27
|
+
export { ColorModeSwitch, type ColorModeSwitchProps, type CvaDefinition, type CvaEdits, type ThemeEdits, type Tokens, type UIConfiguration, UIConfigurationModal, UIConfigurationProvider, type UIConfigurationProviderProps, exportCss, parseThemeCss, resolveUIConfiguration, useUIConfiguration };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { d as useUIConfiguration, i as resolveUIConfiguration, n as ColorModeSwitch, t as UIConfigurationModal, u as UIConfigurationProvider } from "../UIConfigurator-DekPXjv9.js";
|
|
2
2
|
import { i as exportCss, v as parseThemeCss } from "../theme-model-DtTsIxou.js";
|
|
3
|
-
export { ColorModeSwitch, UIConfigurationModal, UIConfigurationProvider, exportCss, parseThemeCss, useUIConfiguration };
|
|
3
|
+
export { ColorModeSwitch, UIConfigurationModal, UIConfigurationProvider, exportCss, parseThemeCss, resolveUIConfiguration, useUIConfiguration };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as StyleMergeUtils } from "./style-merge.util-zLimKwt6.js";
|
|
2
2
|
import { t as UIOverrides } from "./uiOverrides.context-DEp139He.js";
|
|
3
|
-
import { t as UIConfig } from "./uiConfig.context-
|
|
3
|
+
import { t as UIConfig } from "./uiConfig.context-BksnNQyw.js";
|
|
4
4
|
import { n as ThemeEdits } from "./theme-model-T1zIdBg8.js";
|
|
5
5
|
import { PropsWithChildren } from "react";
|
|
6
6
|
//#region src/configurator/cva-definitions.d.ts
|
|
@@ -902,6 +902,9 @@ interface ConfigurationContextValue {
|
|
|
902
902
|
inheritedOverrides: UIOverrides.Config | null | undefined;
|
|
903
903
|
draft: UIConfiguration;
|
|
904
904
|
active: UIConfiguration;
|
|
905
|
+
currentConfiguration: UIConfiguration;
|
|
906
|
+
/** Replaces applied and draft values; `remount: false` keeps the open editor (and its state) mounted. */
|
|
907
|
+
replaceConfiguration: (value: UIConfiguration, closeEditor?: boolean, remount?: boolean) => void;
|
|
905
908
|
setPreviewConfiguration: React.Dispatch<React.SetStateAction<UIConfiguration | null>>;
|
|
906
909
|
setDraft: React.Dispatch<React.SetStateAction<UIConfiguration>>;
|
|
907
910
|
isOpen: boolean;
|
|
@@ -55,7 +55,7 @@ import "./useToast-yreVCUer.js";
|
|
|
55
55
|
import "./Badge-CBNpj823.js";
|
|
56
56
|
import "./Tag-AHfV_XSf.js";
|
|
57
57
|
import "./Accordion-Cup5eRZz.js";
|
|
58
|
-
import "./uiConfig.context-
|
|
58
|
+
import "./uiConfig.context-BksnNQyw.js";
|
|
59
59
|
import "./confirmation.context-BOeEVczb.js";
|
|
60
60
|
import { t as ControlledDatePickerProps } from "./DatePicker-1LJ2LqST.js";
|
|
61
61
|
import { t as ControlledDateRangePickerProps } from "./DateRangePicker-Dfptit_Z.js";
|
package/dist/index.d.ts
CHANGED
|
@@ -54,7 +54,7 @@ import { n as ToastParams, r as useToast, t as ToastOptions } from "./useToast-y
|
|
|
54
54
|
import { n as BadgeProps, t as Badge } from "./Badge-CBNpj823.js";
|
|
55
55
|
import { i as tagDefinition, n as TagProps, r as TagVariantProps, t as Tag } from "./Tag-AHfV_XSf.js";
|
|
56
56
|
import { i as AccordionProps, n as AccordionItem, r as AccordionItemProps, t as Accordion } from "./Accordion-Cup5eRZz.js";
|
|
57
|
-
import { t as UIConfig } from "./uiConfig.context-
|
|
57
|
+
import { t as UIConfig } from "./uiConfig.context-BksnNQyw.js";
|
|
58
58
|
import { t as Confirmation } from "./confirmation.context-BOeEVczb.js";
|
|
59
59
|
import { r as DatePickerProps } from "./DatePicker-1LJ2LqST.js";
|
|
60
60
|
import { r as DateRangePickerProps } from "./DateRangePicker-Dfptit_Z.js";
|
|
@@ -93,7 +93,7 @@ import { n as Input, t as ControlledInputProps } from "./input-CqNMORk8.js";
|
|
|
93
93
|
import { r as TimePickerProps } from "./TimePicker-Dex9aU7D.js";
|
|
94
94
|
import { n as TimePicker, t as ControlledTimePickerProps } from "./time-picker-DhnDKh97.js";
|
|
95
95
|
import { n as Switch, t as ControlledSwitchProps } from "./switch-C--iWnY8.js";
|
|
96
|
-
import { $ as LabelConfig, A as createKeyInteractionsHandler, At as breadcrumbSegmentDefinition, B as useDeepCompareLayoutEffect, C as useLongPressRepeat, Ct as BreadcrumbIconVariantProps, D as KeyInteractionGroup, Dt as breadcrumbChevronDefinition, E as KeyInteractionCallback, Et as BreadcrumbsVariantProps, F as useFormAutosave, Ft as InputsProps, G as useAutosave, H as useDebounceCallback, I as UseFormProps, J as popoverDefinition, K as statusIconDefinition, L as UseFormResolverProps, M as useKeyInteractions, Mt as Form, N as useIntersectionObserver, Nt as InputDef, O as KeyInteractions, Ot as breadcrumbIconDefinition, P as UseFormAutosaveProps, Pt as Inputs, Q as LabelBaseProps, R as useForm, S as useScrollableListBox, St as BreadcrumbChevronVariantProps, T as KeyInteractionAction, Tt as BreadcrumbSegmentVariantProps, U as useBreakpoint, V as useDeepCompareMemo, W as UseAutosaveProps, X as selectInputTagsContentWrapperDefinition, Y as selectListBoxItemDefinition, Z as selectPopoverDefinition, _ as ObjectUtils, _t as accordionTriggerDefinition, a as DynamicInputsObjectSchema, at as fileUploadDropZoneDefinition, b as ArrayUtils, bt as TooltipWrapperTriggerVariantProps, ct as accordionChevronDefinition, d as ServiceWorkerOptions, dt as accordionHeadingSubtitleDefinition, et as labelDefinition, f as installServiceWorker, ft as accordionHeadingTitleDefinition, g as QueriesUtils, gt as accordionPanelDefinition, h as RoutingUtils, ht as accordionPanelContentDefinition, it as formFieldHeaderDefinition, j as getKeyInteractionAction, jt as breadcrumbsDefinition, k as UseKeyInteractionsResult, kt as breadcrumbItemDefinition, lt as accordionDefinition, m as ZodUtils, mt as accordionItemDefinition, n as dynamicInputs, nt as formFieldHelperDefinition, ot as datePickerInputContentRowDefinition, p as CloseIcon, pt as accordionIconDefinition, q as statusSeparatorDefinition, rt as formFieldErrorDefinition, st as AccordionVariantProps, t as DynamicInputsOptions, tt as textAreaWrapperDefinition, ut as accordionHeadingDefinition, v as isEqual, vt as MenuPopover, w as KeyInteraction, wt as BreadcrumbItemVariantProps, x as useStateAndRef, xt as tooltipWrapperTriggerDefinition, y as DomUtils, yt as MenuPopoverProps, z as useDeepCompareEffect } from "./dynamicInputs-
|
|
96
|
+
import { $ as LabelConfig, A as createKeyInteractionsHandler, At as breadcrumbSegmentDefinition, B as useDeepCompareLayoutEffect, C as useLongPressRepeat, Ct as BreadcrumbIconVariantProps, D as KeyInteractionGroup, Dt as breadcrumbChevronDefinition, E as KeyInteractionCallback, Et as BreadcrumbsVariantProps, F as useFormAutosave, Ft as InputsProps, G as useAutosave, H as useDebounceCallback, I as UseFormProps, J as popoverDefinition, K as statusIconDefinition, L as UseFormResolverProps, M as useKeyInteractions, Mt as Form, N as useIntersectionObserver, Nt as InputDef, O as KeyInteractions, Ot as breadcrumbIconDefinition, P as UseFormAutosaveProps, Pt as Inputs, Q as LabelBaseProps, R as useForm, S as useScrollableListBox, St as BreadcrumbChevronVariantProps, T as KeyInteractionAction, Tt as BreadcrumbSegmentVariantProps, U as useBreakpoint, V as useDeepCompareMemo, W as UseAutosaveProps, X as selectInputTagsContentWrapperDefinition, Y as selectListBoxItemDefinition, Z as selectPopoverDefinition, _ as ObjectUtils, _t as accordionTriggerDefinition, a as DynamicInputsObjectSchema, at as fileUploadDropZoneDefinition, b as ArrayUtils, bt as TooltipWrapperTriggerVariantProps, ct as accordionChevronDefinition, d as ServiceWorkerOptions, dt as accordionHeadingSubtitleDefinition, et as labelDefinition, f as installServiceWorker, ft as accordionHeadingTitleDefinition, g as QueriesUtils, gt as accordionPanelDefinition, h as RoutingUtils, ht as accordionPanelContentDefinition, it as formFieldHeaderDefinition, j as getKeyInteractionAction, jt as breadcrumbsDefinition, k as UseKeyInteractionsResult, kt as breadcrumbItemDefinition, lt as accordionDefinition, m as ZodUtils, mt as accordionItemDefinition, n as dynamicInputs, nt as formFieldHelperDefinition, ot as datePickerInputContentRowDefinition, p as CloseIcon, pt as accordionIconDefinition, q as statusSeparatorDefinition, rt as formFieldErrorDefinition, st as AccordionVariantProps, t as DynamicInputsOptions, tt as textAreaWrapperDefinition, ut as accordionHeadingDefinition, v as isEqual, vt as MenuPopover, w as KeyInteraction, wt as BreadcrumbItemVariantProps, x as useStateAndRef, xt as tooltipWrapperTriggerDefinition, y as DomUtils, yt as MenuPopoverProps, z as useDeepCompareEffect } from "./dynamicInputs-R5i7AT_C.js";
|
|
97
97
|
import { a as stepperDefinition, c as stepperNumberDefinition, d as stepperTitleDefinition, i as StepperVariantProps, l as stepperSeparatorDefinition, n as StepItem, o as stepperIconDefinition, r as StepperProps, s as stepperItemDefinition, t as Stepper, u as stepperSubtextDefinition } from "./Stepper-TATlHZhQ.js";
|
|
98
98
|
import { n as ToastProvider, t as ToastContainer } from "./ToastContainer-1H_IxvyH.js";
|
|
99
99
|
import { C as HeaderText, D as CellText, E as ColumnConfigModalProps, O as CellTextProps, S as tableRowDefinition, T as ColumnConfigModal, _ as tableCellTextDefinition, a as DynamicColumnsOptions, b as tableHeadRowDefinition, c as PaginatedTableProps, d as InfiniteTableProps, f as InfiniteTableWrapperProps, g as TableRowVariantProps, h as TableWrapperProps, i as usePagination, l as PaginatedTableWrapperProps, m as TableProps, n as useTableColumnConfig, o as dynamicColumns, p as Table, r as useSorting, s as PaginatedTable, t as useTableNav, u as InfiniteTable, v as tableDataDefinition, w as HeaderTextProps, x as tableHeaderTextDefinition, y as tableHeadDataDefinition } from "./useTableNav-Ckj5PBRk.js";
|