@nice2dev/ui-bi 1.0.21 → 1.0.23

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/index.mjs CHANGED
@@ -1,1399 +1,1780 @@
1
- import { jsxs as t, jsx as e, Fragment as F } from "react/jsx-runtime";
2
- import { useState as S, useCallback as w, useRef as q } from "react";
3
- const Y = {
4
- id: "",
5
- name: "New Report",
6
- dataSource: "",
7
- layout: {
8
- type: "table",
9
- elements: [],
10
- pageSize: "A4",
11
- orientation: "portrait"
12
- },
13
- parameters: [],
14
- filters: [],
15
- sorting: [],
16
- grouping: [],
17
- calculations: [],
18
- formatting: {
19
- conditionalFormats: [],
20
- alternateRowColors: !0,
21
- gridLines: !0
22
- }
23
- }, W = [
24
- { type: "table", label: "Table", icon: "📊" },
25
- { type: "chart", label: "Chart", icon: "📈" },
26
- { type: "text", label: "Text", icon: "📝" },
27
- { type: "image", label: "Image", icon: "🖼️" },
28
- { type: "shape", label: "Shape", icon: "⬜" },
29
- { type: "barcode", label: "Barcode", icon: "▮▯▮" },
30
- { type: "qrcode", label: "QR Code", icon: "⊞" },
31
- { type: "subreport", label: "Subreport", icon: "📋" },
32
- { type: "page-break", label: "Page Break", icon: "📄" }
33
- ];
34
- function he({
35
- report: i,
36
- dataSources: l = [],
37
- onChange: o,
38
- onPreview: s,
39
- onExport: d,
40
- className: m = ""
41
- }) {
42
- const [a, y] = S(
43
- i || { ...Y, id: crypto.randomUUID() }
44
- ), [r, v] = S(null), [_, p] = S("design"), [f, M] = S(null), [T, L] = S(100), b = w(
45
- (n) => {
46
- y((h) => {
47
- const g = n(h);
48
- return o == null || o(g), g;
49
- });
50
- },
51
- [o]
52
- ), D = w(
53
- (n, h) => {
54
- const g = {
55
- id: crypto.randomUUID(),
56
- type: n,
57
- position: {
58
- x: h.x,
59
- y: h.y,
60
- width: 200,
61
- height: n === "page-break" ? 20 : 100
62
- },
63
- config: B(n),
64
- style: {}
65
- };
66
- b((k) => ({
67
- ...k,
68
- layout: {
69
- ...k.layout,
70
- elements: [...k.layout.elements, g]
71
- }
72
- })), v(g);
73
- },
74
- [b]
75
- ), z = w(
76
- (n, h) => {
77
- b((g) => ({
78
- ...g,
79
- layout: {
80
- ...g.layout,
81
- elements: g.layout.elements.map(
82
- (k) => k.id === n ? { ...k, ...h } : k
83
- )
84
- }
85
- })), (r == null ? void 0 : r.id) === n && v((g) => g ? { ...g, ...h } : null);
86
- },
87
- [b, r]
88
- ), C = w(
89
- (n) => {
90
- b((h) => ({
91
- ...h,
92
- layout: {
93
- ...h.layout,
94
- elements: h.layout.elements.filter((g) => g.id !== n)
95
- }
96
- })), v(null);
97
- },
98
- [b]
99
- ), E = w(
100
- (n) => {
101
- if (n.preventDefault(), !f)
102
- return;
103
- const h = n.currentTarget.getBoundingClientRect(), g = (n.clientX - h.left) * (100 / T), k = (n.clientY - h.top) * (100 / T);
104
- D(f, { x: g, y: k }), M(null);
105
- },
106
- [f, D, T]
107
- ), P = w(() => {
108
- s == null || s(a);
109
- }, [a, s]), U = w(
110
- (n) => {
111
- d == null || d(a, n);
112
- },
113
- [a, d]
114
- ), u = l.find((n) => n.id === a.dataSource);
115
- return /* @__PURE__ */ t("div", { className: `nice-report-builder ${m}`, children: [
116
- /* @__PURE__ */ t("div", { className: "nice-report-builder__toolbar", children: [
117
- /* @__PURE__ */ e(
118
- "input",
119
- {
120
- type: "text",
121
- value: a.name,
122
- onChange: (n) => b((h) => ({ ...h, name: n.target.value })),
123
- className: "nice-report-builder__name-input"
124
- }
125
- ),
126
- /* @__PURE__ */ e("div", { className: "nice-report-builder__tabs", children: ["design", "data", "parameters", "formatting"].map((n) => /* @__PURE__ */ e(
127
- "button",
128
- {
129
- className: `nice-report-builder__tab ${_ === n ? "nice-report-builder__tab--active" : ""}`,
130
- onClick: () => p(n),
131
- children: n.charAt(0).toUpperCase() + n.slice(1)
132
- },
133
- n
134
- )) }),
135
- /* @__PURE__ */ t("div", { className: "nice-report-builder__zoom", children: [
136
- /* @__PURE__ */ e("button", { onClick: () => L((n) => Math.max(25, n - 25)), children: "−" }),
137
- /* @__PURE__ */ t("span", { children: [
138
- T,
139
- "%"
140
- ] }),
141
- /* @__PURE__ */ e("button", { onClick: () => L((n) => Math.min(200, n + 25)), children: "+" })
142
- ] }),
143
- /* @__PURE__ */ t("div", { className: "nice-report-builder__actions", children: [
144
- /* @__PURE__ */ e("button", { onClick: P, children: "👁 Preview" }),
145
- /* @__PURE__ */ e("button", { onClick: () => U("pdf"), children: "📄 PDF" }),
146
- /* @__PURE__ */ e("button", { onClick: () => U("excel"), children: "📊 Excel" })
147
- ] })
148
- ] }),
149
- /* @__PURE__ */ t("div", { className: "nice-report-builder__main", children: [
150
- _ === "design" && /* @__PURE__ */ t("div", { className: "nice-report-builder__palette", children: [
151
- /* @__PURE__ */ e("h4", { children: "Elements" }),
152
- W.map((n) => /* @__PURE__ */ t(
153
- "div",
154
- {
155
- className: "nice-report-builder__palette-item",
156
- draggable: !0,
157
- onDragStart: () => M(n.type),
158
- onDragEnd: () => M(null),
159
- children: [
160
- /* @__PURE__ */ e("span", { className: "nice-report-builder__palette-icon", children: n.icon }),
161
- /* @__PURE__ */ e("span", { children: n.label })
162
- ]
163
- },
164
- n.type
165
- )),
166
- /* @__PURE__ */ e("h4", { children: "Data Source" }),
167
- /* @__PURE__ */ t(
168
- "select",
169
- {
170
- value: a.dataSource,
171
- onChange: (n) => b((h) => ({ ...h, dataSource: n.target.value })),
172
- children: [
173
- /* @__PURE__ */ e("option", { value: "", children: "Select data source..." }),
174
- l.map((n) => /* @__PURE__ */ e("option", { value: n.id, children: n.name }, n.id))
175
- ]
176
- }
177
- ),
178
- (u == null ? void 0 : u.schema) && /* @__PURE__ */ t("div", { className: "nice-report-builder__fields", children: [
179
- /* @__PURE__ */ e("h5", { children: "Fields" }),
180
- u.schema.tables.map((n) => /* @__PURE__ */ t("div", { className: "nice-report-builder__table-fields", children: [
181
- /* @__PURE__ */ e("strong", { children: n.name }),
182
- n.columns.map((h) => /* @__PURE__ */ t(
183
- "div",
184
- {
185
- className: "nice-report-builder__field",
186
- draggable: !0,
187
- onDragStart: () => {
188
- },
189
- children: [
190
- h.name,
191
- " ",
192
- /* @__PURE__ */ t("small", { children: [
193
- "(",
194
- h.type,
195
- ")"
196
- ] })
197
- ]
198
- },
199
- h.name
200
- ))
201
- ] }, n.name))
202
- ] })
203
- ] }),
204
- _ === "design" && /* @__PURE__ */ e("div", { className: "nice-report-builder__canvas-container", children: /* @__PURE__ */ t(
205
- "div",
206
- {
207
- className: "nice-report-builder__canvas",
208
- style: {
209
- transform: `scale(${T / 100})`,
210
- transformOrigin: "top left",
211
- width: a.layout.orientation === "landscape" ? "297mm" : "210mm",
212
- height: a.layout.orientation === "landscape" ? "210mm" : "297mm"
213
- },
214
- onDragOver: (n) => n.preventDefault(),
215
- onDrop: E,
216
- onClick: () => v(null),
217
- children: [
218
- a.layout.elements.map((n) => /* @__PURE__ */ e(
219
- O,
220
- {
221
- element: n,
222
- isSelected: (r == null ? void 0 : r.id) === n.id,
223
- onSelect: () => v(n),
224
- onUpdate: (h) => z(n.id, h),
225
- onDelete: () => C(n.id)
226
- },
227
- n.id
228
- )),
229
- a.layout.elements.length === 0 && /* @__PURE__ */ e("div", { className: "nice-report-builder__canvas-empty", children: "Drag elements here to build your report" })
230
- ]
231
- }
232
- ) }),
233
- _ === "data" && /* @__PURE__ */ e(
234
- X,
235
- {
236
- report: a,
237
- dataSource: u,
238
- onChange: (n) => b((h) => ({ ...h, query: n }))
239
- }
240
- ),
241
- _ === "parameters" && /* @__PURE__ */ e(
242
- H,
243
- {
244
- parameters: a.parameters,
245
- calculations: a.calculations,
246
- onChange: (n, h) => b((g) => ({ ...g, parameters: n, calculations: h }))
247
- }
248
- ),
249
- _ === "formatting" && /* @__PURE__ */ e(
250
- j,
251
- {
252
- formatting: a.formatting,
253
- grouping: a.grouping,
254
- sorting: a.sorting,
255
- onChange: (n, h, g) => b((k) => ({ ...k, formatting: n, grouping: h, sorting: g }))
256
- }
257
- ),
258
- r && _ === "design" && /* @__PURE__ */ e(
259
- G,
260
- {
261
- element: r,
262
- dataSource: u,
263
- onChange: (n) => z(r.id, n),
264
- onClose: () => v(null)
265
- }
266
- )
267
- ] })
268
- ] });
1
+ import { jsx as e, jsxs as d, Fragment as N } from "react/jsx-runtime";
2
+ import { useContext as F, createContext as b, memo as re, useState as w, useEffect as ae, useRef as ie, useCallback as x } from "react";
3
+ const ne = (a, r) => r, ce = b(ne);
4
+ function de() {
5
+ return { t: F(ce) };
269
6
  }
270
- function B(i) {
271
- switch (i) {
272
- case "table":
273
- return { columns: [], showHeader: !0, showFooter: !1 };
274
- case "chart":
275
- return { chartType: "bar", series: [], axes: [] };
276
- case "text":
277
- return { content: "Text", fontSize: 12 };
278
- case "image":
279
- return { src: "", fit: "contain" };
280
- case "shape":
281
- return {
282
- shape: "rectangle",
283
- fill: "var(--nice-border, #e0e0e0)",
284
- stroke: "var(--nice-text, #333)"
285
- };
286
- case "barcode":
287
- return { format: "CODE128", value: "" };
288
- case "qrcode":
289
- return { value: "" };
290
- case "subreport":
291
- return { reportId: "" };
292
- case "page-break":
293
- return {};
294
- default:
295
- return {};
7
+ b({
8
+ dir: "ltr",
9
+ isRTL: !1,
10
+ flip: (a) => a,
11
+ value: (a) => a.ltr
12
+ });
13
+ b(null);
14
+ b(null);
15
+ const oe = {
16
+ radius: "md",
17
+ shadow: "md",
18
+ fill: "solid",
19
+ buttonStyle: "flat",
20
+ inputStyle: "bordered",
21
+ cardStyle: "elevated",
22
+ badgeStyle: "solid",
23
+ tabStyle: "underline",
24
+ toggleStyle: "default",
25
+ tooltipStyle: "dark",
26
+ modalStyle: "default",
27
+ tableStyle: "default",
28
+ menuStyle: "default",
29
+ animation: "normal",
30
+ density: "normal"
31
+ };
32
+ b({
33
+ displayStyle: "default",
34
+ variantConfig: oe,
35
+ setDisplayStyle: () => {
296
36
  }
37
+ });
38
+ b({});
39
+ b({
40
+ direction: "ltr",
41
+ isRTL: !1,
42
+ flip: (a) => a,
43
+ flipStyle: (a, r) => ({ [a]: r })
44
+ });
45
+ b({
46
+ permissions: {},
47
+ getAccessMode: () => "full"
48
+ });
49
+ b(null);
50
+ const te = process.env.NODE_ENV === "development";
51
+ let W = {
52
+ enabled: te,
53
+ slowRenderThreshold: 16
54
+ };
55
+ const O = [], M = /* @__PURE__ */ new Map(), $ = /* @__PURE__ */ new Map();
56
+ function fe() {
57
+ O.length = 0, M.clear(), $.clear();
297
58
  }
298
- function O({
299
- element: i,
300
- isSelected: l,
301
- onSelect: o,
302
- onUpdate: s,
303
- onDelete: d
304
- }) {
305
- var L;
306
- const [m, a] = S(!1), [y, r] = S(!1), v = (b) => {
307
- if (b.button !== 0)
308
- return;
309
- b.stopPropagation(), o(), a(!0);
310
- const D = b.clientX, z = b.clientY, C = { ...i.position }, E = (U) => {
311
- const u = U.clientX - D, n = U.clientY - z;
312
- s({
313
- position: {
314
- ...C,
315
- x: Math.max(0, C.x + u),
316
- y: Math.max(0, C.y + n)
317
- }
318
- });
319
- }, P = () => {
320
- a(!1), window.removeEventListener("mousemove", E), window.removeEventListener("mouseup", P);
321
- };
322
- window.addEventListener("mousemove", E), window.addEventListener("mouseup", P);
323
- }, _ = (b, D) => {
324
- b.stopPropagation(), r(!0);
325
- const z = b.clientX, C = b.clientY, E = { ...i.position }, P = (u) => {
326
- const n = u.clientX - z, h = u.clientY - C, g = { ...E };
327
- D.includes("e") && (g.width = Math.max(50, E.width + n)), D.includes("s") && (g.height = Math.max(30, E.height + h)), D.includes("w") && (g.x = E.x + n, g.width = Math.max(50, E.width - n)), D.includes("n") && (g.y = E.y + h, g.height = Math.max(30, E.height - h)), s({ position: g });
328
- }, U = () => {
329
- r(!1), window.removeEventListener("mousemove", P), window.removeEventListener("mouseup", U);
330
- };
331
- window.addEventListener("mousemove", P), window.addEventListener("mouseup", U);
332
- }, p = W.find((b) => b.type === i.type), { padding: f, ...M } = i.style ?? {}, T = typeof f == "object" && f !== null ? `${f.top}px ${f.right}px ${f.bottom}px ${f.left}px` : f;
333
- return /* @__PURE__ */ t(
334
- "div",
335
- {
336
- className: `nice-report-builder__element nice-report-builder__element--${i.type} ${l ? "nice-report-builder__element--selected" : ""}`,
337
- style: {
338
- left: i.position.x,
339
- top: i.position.y,
340
- width: i.position.width,
341
- height: i.position.height,
342
- ...M,
343
- padding: T
344
- },
345
- onMouseDown: v,
346
- children: [
347
- /* @__PURE__ */ t("div", { className: "nice-report-builder__element-content", children: [
348
- /* @__PURE__ */ e("span", { className: "nice-report-builder__element-icon", children: p == null ? void 0 : p.icon }),
349
- /* @__PURE__ */ e("span", { className: "nice-report-builder__element-label", children: ((L = i.binding) == null ? void 0 : L.field) || (p == null ? void 0 : p.label) })
350
- ] }),
351
- l && /* @__PURE__ */ t(F, { children: [
352
- /* @__PURE__ */ e(
353
- "button",
354
- {
355
- className: "nice-report-builder__element-delete",
356
- onClick: (b) => {
357
- b.stopPropagation(), d();
358
- },
359
- children: "×"
360
- }
361
- ),
362
- /* @__PURE__ */ e(
363
- "div",
364
- {
365
- className: "nice-report-builder__resize-handle nice-report-builder__resize-handle--se",
366
- onMouseDown: (b) => _(b, "se")
367
- }
368
- ),
369
- /* @__PURE__ */ e(
370
- "div",
371
- {
372
- className: "nice-report-builder__resize-handle nice-report-builder__resize-handle--e",
373
- onMouseDown: (b) => _(b, "e")
374
- }
375
- ),
376
- /* @__PURE__ */ e(
377
- "div",
378
- {
379
- className: "nice-report-builder__resize-handle nice-report-builder__resize-handle--s",
380
- onMouseDown: (b) => _(b, "s")
381
- }
382
- )
383
- ] })
384
- ]
385
- }
386
- );
59
+ function se(a) {
60
+ const r = W.slowRenderThreshold;
61
+ return O.filter((c) => c.actualDuration > r);
387
62
  }
388
- function X({
389
- report: i,
390
- dataSource: l,
391
- onChange: o
392
- }) {
393
- var m, a, y, r;
394
- const [s, d] = S("builder");
395
- return /* @__PURE__ */ t("div", { className: "nice-report-builder__query-builder", children: [
396
- /* @__PURE__ */ t("div", { className: "nice-report-builder__query-tabs", children: [
397
- /* @__PURE__ */ e("button", { className: s === "builder" ? "active" : "", onClick: () => d("builder"), children: "Query Builder" }),
398
- /* @__PURE__ */ e("button", { className: s === "sql" ? "active" : "", onClick: () => d("sql"), children: "SQL" })
399
- ] }),
400
- s === "builder" ? /* @__PURE__ */ t("div", { className: "nice-report-builder__visual-query", children: [
401
- /* @__PURE__ */ e("h4", { children: "Tables" }),
402
- (m = l == null ? void 0 : l.schema) == null ? void 0 : m.tables.map((v) => {
403
- var _, p;
404
- return /* @__PURE__ */ e("div", { className: "nice-report-builder__query-table", children: /* @__PURE__ */ t("label", { children: [
405
- /* @__PURE__ */ e(
406
- "input",
407
- {
408
- type: "checkbox",
409
- checked: ((p = (_ = i.query) == null ? void 0 : _.tables) == null ? void 0 : p.includes(v.name)) || !1,
410
- onChange: (f) => {
411
- var T, L;
412
- const M = f.target.checked ? [...((T = i.query) == null ? void 0 : T.tables) || [], v.name] : (((L = i.query) == null ? void 0 : L.tables) || []).filter((b) => b !== v.name);
413
- o({ ...i.query, type: "builder", tables: M });
414
- }
415
- }
416
- ),
417
- v.name
418
- ] }) }, v.name);
419
- }),
420
- /* @__PURE__ */ e("h4", { children: "Columns" }),
421
- /* @__PURE__ */ e("div", { className: "nice-report-builder__column-list", children: (y = (a = i.query) == null ? void 0 : a.tables) == null ? void 0 : y.map((v) => {
422
- var p;
423
- const _ = (p = l == null ? void 0 : l.schema) == null ? void 0 : p.tables.find((f) => f.name === v);
424
- return _ == null ? void 0 : _.columns.map((f) => /* @__PURE__ */ t("div", { className: "nice-report-builder__column-item", children: [
425
- /* @__PURE__ */ e("input", { type: "checkbox" }),
426
- /* @__PURE__ */ t("span", { children: [
427
- v,
428
- ".",
429
- f.name
430
- ] }),
431
- /* @__PURE__ */ t("select", { children: [
432
- /* @__PURE__ */ e("option", { value: "", children: "No aggregate" }),
433
- /* @__PURE__ */ e("option", { value: "sum", children: "SUM" }),
434
- /* @__PURE__ */ e("option", { value: "avg", children: "AVG" }),
435
- /* @__PURE__ */ e("option", { value: "count", children: "COUNT" }),
436
- /* @__PURE__ */ e("option", { value: "min", children: "MIN" }),
437
- /* @__PURE__ */ e("option", { value: "max", children: "MAX" })
438
- ] })
439
- ] }, `${v}.${f.name}`));
440
- }) })
441
- ] }) : /* @__PURE__ */ e("div", { className: "nice-report-builder__sql-editor", children: /* @__PURE__ */ e(
442
- "textarea",
443
- {
444
- value: ((r = i.query) == null ? void 0 : r.text) || "",
445
- onChange: (v) => o({ ...i.query, type: "sql", text: v.target.value }),
446
- placeholder: "SELECT * FROM table_name",
447
- rows: 15
448
- }
449
- ) })
450
- ] });
63
+ function H(a) {
64
+ return a < 1 ? `${(a * 1e3).toFixed(0)}μs` : a < 1e3 ? `${a.toFixed(2)}ms` : `${(a / 1e3).toFixed(2)}s`;
451
65
  }
452
- function H({
453
- parameters: i,
454
- calculations: l,
455
- onChange: o
456
- }) {
457
- const s = () => {
458
- const m = {
459
- id: crypto.randomUUID(),
460
- name: "param" + (i.length + 1),
461
- label: "Parameter " + (i.length + 1),
462
- type: "text"
463
- };
464
- o([...i, m], l);
465
- }, d = () => {
466
- const m = {
467
- id: crypto.randomUUID(),
468
- name: "calc" + (l.length + 1),
469
- expression: ""
470
- };
471
- o(i, [...l, m]);
472
- };
473
- return /* @__PURE__ */ t("div", { className: "nice-report-builder__parameters-editor", children: [
474
- /* @__PURE__ */ t("section", { children: [
475
- /* @__PURE__ */ t("div", { className: "nice-report-builder__section-header", children: [
476
- /* @__PURE__ */ e("h4", { children: "Parameters" }),
477
- /* @__PURE__ */ e("button", { onClick: s, children: "+ Add" })
478
- ] }),
479
- i.map((m, a) => /* @__PURE__ */ t("div", { className: "nice-report-builder__param-row", children: [
480
- /* @__PURE__ */ e(
481
- "input",
482
- {
483
- type: "text",
484
- value: m.name,
485
- placeholder: "Name",
486
- onChange: (y) => {
487
- const r = [...i];
488
- r[a] = { ...m, name: y.target.value }, o(r, l);
489
- }
490
- }
491
- ),
492
- /* @__PURE__ */ e(
493
- "input",
494
- {
495
- type: "text",
496
- value: m.label,
497
- placeholder: "Label",
498
- onChange: (y) => {
499
- const r = [...i];
500
- r[a] = { ...m, label: y.target.value }, o(r, l);
501
- }
502
- }
503
- ),
504
- /* @__PURE__ */ t(
505
- "select",
506
- {
507
- value: m.type,
508
- onChange: (y) => {
509
- const r = [...i];
510
- r[a] = { ...m, type: y.target.value }, o(r, l);
511
- },
512
- children: [
513
- /* @__PURE__ */ e("option", { value: "text", children: "Text" }),
514
- /* @__PURE__ */ e("option", { value: "number", children: "Number" }),
515
- /* @__PURE__ */ e("option", { value: "date", children: "Date" }),
516
- /* @__PURE__ */ e("option", { value: "daterange", children: "Date Range" }),
517
- /* @__PURE__ */ e("option", { value: "select", children: "Select" }),
518
- /* @__PURE__ */ e("option", { value: "multiselect", children: "Multi-select" })
519
- ]
520
- }
521
- ),
522
- /* @__PURE__ */ e(
523
- "button",
524
- {
525
- onClick: () => {
526
- o(
527
- i.filter((y) => y.id !== m.id),
528
- l
529
- );
530
- },
531
- children: "×"
532
- }
533
- )
534
- ] }, m.id))
535
- ] }),
536
- /* @__PURE__ */ t("section", { children: [
537
- /* @__PURE__ */ t("div", { className: "nice-report-builder__section-header", children: [
538
- /* @__PURE__ */ e("h4", { children: "Calculated Fields" }),
539
- /* @__PURE__ */ e("button", { onClick: d, children: "+ Add" })
540
- ] }),
541
- l.map((m, a) => /* @__PURE__ */ t("div", { className: "nice-report-builder__calc-row", children: [
542
- /* @__PURE__ */ e(
543
- "input",
544
- {
545
- type: "text",
546
- value: m.name,
547
- placeholder: "Name",
548
- onChange: (y) => {
549
- const r = [...l];
550
- r[a] = { ...m, name: y.target.value }, o(i, r);
551
- }
552
- }
553
- ),
554
- /* @__PURE__ */ e(
555
- "input",
556
- {
557
- type: "text",
558
- value: m.expression,
559
- placeholder: "Expression (e.g., [Sales] * [Quantity])",
560
- onChange: (y) => {
561
- const r = [...l];
562
- r[a] = { ...m, expression: y.target.value }, o(i, r);
563
- }
564
- }
565
- ),
566
- /* @__PURE__ */ e(
567
- "button",
568
- {
569
- onClick: () => {
570
- o(
571
- i,
572
- l.filter((y) => y.id !== m.id)
573
- );
574
- },
575
- children: "×"
576
- }
577
- )
578
- ] }, m.id))
579
- ] })
580
- ] });
66
+ function le() {
67
+ const a = Array.from(M.values()), r = se(), c = a.reduce((u, o) => u + o.renderCount, 0), t = a.length > 0 ? a.reduce((u, o) => u + o.avgRenderTime, 0) / a.length : 0, y = Array.from($.values());
68
+ return { stats: a, slowRenders: r, totalRenders: c, avgRenderTime: t, marks: y };
581
69
  }
582
- function j({
583
- formatting: i,
584
- grouping: l,
585
- sorting: o,
586
- onChange: s
587
- }) {
588
- return /* @__PURE__ */ t("div", { className: "nice-report-builder__formatting-editor", children: [
589
- /* @__PURE__ */ t("section", { children: [
590
- /* @__PURE__ */ e("h4", { children: "General" }),
591
- /* @__PURE__ */ t("label", { children: [
592
- /* @__PURE__ */ e(
593
- "input",
594
- {
595
- type: "checkbox",
596
- checked: i.alternateRowColors,
597
- onChange: (d) => s({ ...i, alternateRowColors: d.target.checked }, l, o)
598
- }
599
- ),
600
- "Alternate row colors"
601
- ] }),
602
- /* @__PURE__ */ t("label", { children: [
603
- /* @__PURE__ */ e(
604
- "input",
605
- {
606
- type: "checkbox",
607
- checked: i.gridLines,
608
- onChange: (d) => s({ ...i, gridLines: d.target.checked }, l, o)
609
- }
610
- ),
611
- "Show grid lines"
612
- ] })
613
- ] }),
614
- /* @__PURE__ */ t("section", { children: [
615
- /* @__PURE__ */ e("h4", { children: "Conditional Formatting" }),
616
- /* @__PURE__ */ e(
617
- "button",
618
- {
619
- onClick: () => {
620
- const d = {
621
- id: crypto.randomUUID(),
622
- condition: { column: "", operator: "gt", value: 0 },
623
- style: { backgroundColor: "#ffcccc" },
624
- scope: "cell"
625
- };
626
- s(
627
- {
628
- ...i,
629
- conditionalFormats: [...i.conditionalFormats, d]
630
- },
631
- l,
632
- o
633
- );
634
- },
635
- children: "+ Add Rule"
636
- }
637
- ),
638
- i.conditionalFormats.map((d) => /* @__PURE__ */ t("div", { className: "nice-report-builder__format-rule", children: [
639
- /* @__PURE__ */ t("span", { children: [
640
- "If column ",
641
- d.condition.operator,
642
- " ",
643
- String(d.condition.value)
644
- ] }),
645
- /* @__PURE__ */ e(
646
- "input",
647
- {
648
- type: "color",
649
- value: d.style.backgroundColor || "var(--nice-bg, #fff)",
650
- onChange: (m) => {
651
- s(
652
- {
653
- ...i,
654
- conditionalFormats: i.conditionalFormats.map(
655
- (a) => a.id === d.id ? { ...a, style: { ...a.style, backgroundColor: m.target.value } } : a
656
- )
657
- },
658
- l,
659
- o
660
- );
661
- }
662
- }
663
- )
664
- ] }, d.id))
665
- ] })
666
- ] });
667
- }
668
- function G({
669
- element: i,
670
- dataSource: l,
671
- onChange: o,
672
- onClose: s
673
- }) {
674
- var d, m, a, y, r, v, _;
675
- return /* @__PURE__ */ t("div", { className: "nice-report-builder__properties", children: [
676
- /* @__PURE__ */ t("div", { className: "nice-report-builder__properties-header", children: [
677
- /* @__PURE__ */ t("h4", { children: [
678
- (d = W.find((p) => p.type === i.type)) == null ? void 0 : d.label,
679
- " Properties"
680
- ] }),
681
- /* @__PURE__ */ e("button", { onClick: s, children: "×" })
682
- ] }),
683
- /* @__PURE__ */ t("div", { className: "nice-report-builder__properties-content", children: [
684
- /* @__PURE__ */ t("div", { className: "nice-report-builder__field", children: [
685
- /* @__PURE__ */ e("label", { children: "Data Binding" }),
686
- /* @__PURE__ */ t(
687
- "select",
688
- {
689
- value: ((m = i.binding) == null ? void 0 : m.field) || "",
690
- onChange: (p) => o({ binding: { ...i.binding, field: p.target.value } }),
691
- children: [
692
- /* @__PURE__ */ e("option", { value: "", children: "None" }),
693
- (a = l == null ? void 0 : l.schema) == null ? void 0 : a.tables.flatMap(
694
- (p) => p.columns.map((f) => /* @__PURE__ */ t("option", { value: `${p.name}.${f.name}`, children: [
695
- p.name,
696
- ".",
697
- f.name
698
- ] }, `${p.name}.${f.name}`))
699
- )
700
- ]
701
- }
702
- )
703
- ] }),
704
- /* @__PURE__ */ t("div", { className: "nice-report-builder__field", children: [
705
- /* @__PURE__ */ e("label", { children: "Position" }),
706
- /* @__PURE__ */ t("div", { className: "nice-report-builder__position-inputs", children: [
707
- /* @__PURE__ */ e(
708
- "input",
709
- {
710
- type: "number",
711
- value: i.position.x,
712
- onChange: (p) => o({
713
- position: { ...i.position, x: parseInt(p.target.value, 10) || 0 }
714
- }),
715
- placeholder: "X"
716
- }
717
- ),
718
- /* @__PURE__ */ e(
719
- "input",
720
- {
721
- type: "number",
722
- value: i.position.y,
723
- onChange: (p) => o({
724
- position: { ...i.position, y: parseInt(p.target.value, 10) || 0 }
725
- }),
726
- placeholder: "Y"
727
- }
728
- ),
729
- /* @__PURE__ */ e(
730
- "input",
731
- {
732
- type: "number",
733
- value: i.position.width,
734
- onChange: (p) => o({
735
- position: { ...i.position, width: parseInt(p.target.value, 10) || 50 }
736
- }),
737
- placeholder: "W"
738
- }
739
- ),
740
- /* @__PURE__ */ e(
741
- "input",
742
- {
743
- type: "number",
744
- value: i.position.height,
745
- onChange: (p) => o({
746
- position: { ...i.position, height: parseInt(p.target.value, 10) || 30 }
747
- }),
748
- placeholder: "H"
749
- }
750
- )
751
- ] })
752
- ] }),
753
- /* @__PURE__ */ t("div", { className: "nice-report-builder__field", children: [
754
- /* @__PURE__ */ e("label", { children: "Background Color" }),
755
- /* @__PURE__ */ e(
756
- "input",
757
- {
758
- type: "color",
759
- value: ((y = i.style) == null ? void 0 : y.backgroundColor) || "var(--nice-bg, #fff)",
760
- onChange: (p) => o({ style: { ...i.style, backgroundColor: p.target.value } })
761
- }
762
- )
763
- ] }),
764
- /* @__PURE__ */ t("div", { className: "nice-report-builder__field", children: [
765
- /* @__PURE__ */ e("label", { children: "Border" }),
766
- /* @__PURE__ */ t("div", { className: "nice-report-builder__border-inputs", children: [
767
- /* @__PURE__ */ e(
768
- "input",
769
- {
770
- type: "color",
771
- value: ((r = i.style) == null ? void 0 : r.borderColor) || "var(--nice-text, #000000)",
772
- onChange: (p) => o({ style: { ...i.style, borderColor: p.target.value } })
773
- }
774
- ),
775
- /* @__PURE__ */ e(
776
- "input",
777
- {
778
- type: "number",
779
- value: ((v = i.style) == null ? void 0 : v.borderWidth) || 0,
780
- onChange: (p) => o({
781
- style: { ...i.style, borderWidth: parseInt(p.target.value, 10) || 0 }
782
- }),
783
- placeholder: "Width",
784
- min: 0,
785
- max: 10
786
- }
787
- )
788
- ] })
789
- ] }),
790
- i.type === "text" && /* @__PURE__ */ t(F, { children: [
791
- /* @__PURE__ */ t("div", { className: "nice-report-builder__field", children: [
792
- /* @__PURE__ */ e("label", { children: "Content" }),
793
- /* @__PURE__ */ e(
794
- "textarea",
795
- {
796
- value: i.config.content || "",
797
- onChange: (p) => o({ config: { ...i.config, content: p.target.value } }),
798
- rows: 3
799
- }
800
- )
801
- ] }),
802
- /* @__PURE__ */ t("div", { className: "nice-report-builder__field", children: [
803
- /* @__PURE__ */ e("label", { children: "Font Size" }),
804
- /* @__PURE__ */ e(
805
- "input",
806
- {
807
- type: "number",
808
- value: ((_ = i.style) == null ? void 0 : _.fontSize) || 12,
809
- onChange: (p) => o({
810
- style: { ...i.style, fontSize: parseInt(p.target.value, 10) || 12 }
811
- }),
812
- min: 8,
813
- max: 72
814
- }
815
- )
816
- ] })
817
- ] }),
818
- i.type === "chart" && /* @__PURE__ */ t("div", { className: "nice-report-builder__field", children: [
819
- /* @__PURE__ */ e("label", { children: "Chart Type" }),
820
- /* @__PURE__ */ t(
821
- "select",
822
- {
823
- value: i.config.chartType || "bar",
824
- onChange: (p) => o({ config: { ...i.config, chartType: p.target.value } }),
825
- children: [
826
- /* @__PURE__ */ e("option", { value: "bar", children: "Bar" }),
827
- /* @__PURE__ */ e("option", { value: "line", children: "Line" }),
828
- /* @__PURE__ */ e("option", { value: "pie", children: "Pie" }),
829
- /* @__PURE__ */ e("option", { value: "area", children: "Area" }),
830
- /* @__PURE__ */ e("option", { value: "scatter", children: "Scatter" })
831
- ]
832
- }
833
- )
834
- ] })
835
- ] })
836
- ] });
70
+ function ye() {
71
+ const a = le();
72
+ console.group(
73
+ "%c[Nice2Dev Performance Report]",
74
+ "color: var(--nice-info, #6366f1); font-weight: bold; font-size: 14px"
75
+ ), console.log(`Total renders: ${a.totalRenders}`), console.log(`Average render time: ${H(a.avgRenderTime)}`), console.log(`Slow renders: ${a.slowRenders.length}`), console.group("Component Stats"), console.table(
76
+ a.stats.sort((r, c) => c.totalRenderTime - r.totalRenderTime).map((r) => ({
77
+ Name: r.componentName,
78
+ Renders: r.renderCount,
79
+ "Avg Time": H(r.avgRenderTime),
80
+ "Max Time": H(r.maxRenderTime),
81
+ "Total Time": H(r.totalRenderTime),
82
+ "Slow Renders": r.slowRenderCount
83
+ }))
84
+ ), console.groupEnd(), a.slowRenders.length > 0 && (console.group("Slow Renders (last 10)"), console.table(
85
+ a.slowRenders.slice(-10).map((r) => ({
86
+ Component: r.componentName,
87
+ Phase: r.phase,
88
+ Duration: H(r.actualDuration),
89
+ Time: new Date(r.timestamp).toLocaleTimeString()
90
+ }))
91
+ ), console.groupEnd()), a.marks.length > 0 && (console.group("Custom Marks"), console.table(
92
+ a.marks.filter((r) => r.duration).map((r) => ({
93
+ Name: r.name,
94
+ Duration: H(r.duration)
95
+ }))
96
+ ), console.groupEnd()), console.groupEnd();
837
97
  }
838
- const Q = {
839
- id: "",
840
- name: "New Dashboard",
841
- layout: {
842
- type: "grid",
843
- columns: 12,
844
- rowHeight: 50,
845
- gap: 8
846
- },
847
- widgets: [],
848
- filters: []
849
- }, V = [
850
- { type: "chart", label: "Chart", icon: "📈", category: "Visualization" },
851
- { type: "table", label: "Table", icon: "📊", category: "Visualization" },
852
- { type: "card", label: "KPI Card", icon: "🎯", category: "Visualization" },
853
- { type: "gauge", label: "Gauge", icon: "⏱️", category: "Visualization" },
854
- { type: "map", label: "Map", icon: "🗺️", category: "Visualization" },
855
- { type: "treemap", label: "Treemap", icon: "🌳", category: "Visualization" },
856
- { type: "funnel", label: "Funnel", icon: "🔻", category: "Visualization" },
857
- { type: "heatmap", label: "Heatmap", icon: "🌡️", category: "Visualization" },
858
- { type: "timeline", label: "Timeline", icon: "📅", category: "Visualization" },
859
- { type: "sankey", label: "Sankey", icon: "〰️", category: "Visualization" },
860
- { type: "filter", label: "Filter", icon: "🔍", category: "Controls" },
861
- { type: "slicer", label: "Slicer", icon: "📋", category: "Controls" },
862
- { type: "text", label: "Text", icon: "📝", category: "Layout" },
863
- { type: "image", label: "Image", icon: "🖼️", category: "Layout" }
864
- ];
865
- function pe({
866
- dashboard: i,
867
- dataSources: l = [],
868
- onChange: o,
869
- onWidgetAdd: s,
870
- onRefresh: d,
871
- className: m = ""
872
- }) {
873
- const [a, y] = S(
874
- i || { ...Q, id: crypto.randomUUID() }
875
- ), [r, v] = S(null), [_, p] = S(!0), [f, M] = S(null), [T, L] = S(!0), b = q(null), D = w(
876
- (u) => {
877
- y((n) => {
878
- const h = u(n);
879
- return o == null || o(h), h;
880
- });
881
- },
882
- [o]
883
- ), z = w(
884
- (u, n) => {
885
- var g;
886
- const h = {
887
- id: crypto.randomUUID(),
888
- type: u,
889
- title: ((g = V.find((k) => k.type === u)) == null ? void 0 : g.label) || u,
890
- position: {
891
- x: (n == null ? void 0 : n.x) ?? 0,
892
- y: (n == null ? void 0 : n.y) ?? K(a.widgets),
893
- width: (n == null ? void 0 : n.width) ?? J(u),
894
- height: (n == null ? void 0 : n.height) ?? Z(u)
895
- },
896
- config: ee(u)
98
+ const me = re(
99
+ ({ position: a = "bottom-right", defaultCollapsed: r = !0 }) => {
100
+ const [c, t] = w(r), [y, u] = w([]), [o, p] = w({ used: 0, total: 0 });
101
+ if (ae(() => {
102
+ const f = () => {
103
+ const _ = Array.from(M.values());
104
+ u(_.sort((T, k) => k.totalRenderTime - T.totalRenderTime).slice(0, 10));
105
+ const C = window.performance;
106
+ C.memory && p({
107
+ used: C.memory.usedJSHeapSize / 1024 / 1024,
108
+ total: C.memory.totalJSHeapSize / 1024 / 1024
109
+ });
897
110
  };
898
- D((k) => ({
899
- ...k,
900
- widgets: [...k.widgets, h]
901
- })), v(h), s == null || s(u);
902
- },
903
- [a.widgets, D, s]
904
- ), C = w(
905
- (u, n) => {
906
- D((h) => ({
907
- ...h,
908
- widgets: h.widgets.map((g) => g.id === u ? { ...g, ...n } : g)
909
- })), (r == null ? void 0 : r.id) === u && v((h) => h ? { ...h, ...n } : null);
910
- },
911
- [D, r]
912
- ), E = w(
913
- (u) => {
914
- D((n) => ({
915
- ...n,
916
- widgets: n.widgets.filter((h) => h.id !== u)
917
- })), v(null);
918
- },
919
- [D]
920
- ), P = w(
921
- (u) => {
922
- if (u.preventDefault(), !f || !b.current)
923
- return;
924
- const n = b.current.getBoundingClientRect(), h = n.width / (a.layout.columns || 12), g = Math.floor((u.clientX - n.left) / h), k = Math.floor((u.clientY - n.top) / (a.layout.rowHeight || 50));
925
- z(f, { x: g, y: k }), M(null);
926
- },
927
- [f, a.layout, z]
928
- ), U = w(() => {
929
- d == null || d();
930
- }, [d]);
931
- return /* @__PURE__ */ t("div", { className: `nice-dashboard-studio ${m}`, children: [
932
- /* @__PURE__ */ t("div", { className: "nice-dashboard-studio__toolbar", children: [
933
- /* @__PURE__ */ e(
934
- "input",
935
- {
936
- type: "text",
937
- value: a.name,
938
- onChange: (u) => D((n) => ({ ...n, name: u.target.value })),
939
- className: "nice-dashboard-studio__name-input",
940
- disabled: !_
941
- }
942
- ),
943
- /* @__PURE__ */ t("div", { className: "nice-dashboard-studio__actions", children: [
944
- /* @__PURE__ */ e(
945
- "button",
946
- {
947
- className: `nice-dashboard-studio__action ${_ ? "active" : ""}`,
948
- onClick: () => p(!_),
949
- children: _ ? "✏️ Editing" : "👁 Viewing"
950
- }
951
- ),
952
- /* @__PURE__ */ t("button", { onClick: () => L(!T), children: [
953
- "🔍 Filters ",
954
- T ? "▲" : "▼"
955
- ] }),
956
- /* @__PURE__ */ e("button", { onClick: U, children: "🔄 Refresh" }),
957
- /* @__PURE__ */ e("button", { children: "📤 Share" }),
958
- /* @__PURE__ */ e("button", { children: "💾 Save" })
959
- ] })
960
- ] }),
961
- T && a.filters.length > 0 && /* @__PURE__ */ e("div", { className: "nice-dashboard-studio__filters-bar", children: a.filters.map((u) => /* @__PURE__ */ e(ne, { filter: u }, u.id)) }),
962
- /* @__PURE__ */ t("div", { className: "nice-dashboard-studio__main", children: [
963
- _ && /* @__PURE__ */ t("div", { className: "nice-dashboard-studio__palette", children: [
964
- /* @__PURE__ */ e("h4", { children: "Widgets" }),
965
- ["Visualization", "Controls", "Layout"].map((u) => /* @__PURE__ */ t("div", { className: "nice-dashboard-studio__category", children: [
966
- /* @__PURE__ */ e("h5", { children: u }),
967
- V.filter((n) => n.category === u).map((n) => /* @__PURE__ */ t(
111
+ f();
112
+ const v = setInterval(f, 2e3);
113
+ return () => clearInterval(v);
114
+ }, []), !W.enabled)
115
+ return null;
116
+ const S = {
117
+ position: "fixed",
118
+ zIndex: 99999,
119
+ ...a.includes("top") ? { top: 8 } : { bottom: 8 },
120
+ ...a.includes("left") ? { left: 8 } : { right: 8 }
121
+ };
122
+ return /* @__PURE__ */ d(
123
+ "div",
124
+ {
125
+ style: {
126
+ ...S,
127
+ background: "var(--nice-overlay-85, rgba(0, 0, 0, 0.85))",
128
+ color: "var(--bg-primary, #fff)",
129
+ borderRadius: 8,
130
+ fontSize: 11,
131
+ fontFamily: "Monaco, Consolas, monospace",
132
+ padding: c ? "4px 8px" : 8,
133
+ maxWidth: c ? "auto" : 300,
134
+ maxHeight: c ? "auto" : 400,
135
+ overflow: "auto"
136
+ },
137
+ children: [
138
+ /* @__PURE__ */ d(
968
139
  "div",
969
140
  {
970
- className: "nice-dashboard-studio__palette-item",
971
- draggable: !0,
972
- onDragStart: () => M(n.type),
973
- onDragEnd: () => M(null),
141
+ style: { cursor: "pointer", display: "flex", alignItems: "center", gap: 8 },
142
+ onClick: () => t((f) => !f),
974
143
  children: [
975
- /* @__PURE__ */ e("span", { className: "nice-dashboard-studio__palette-icon", children: n.icon }),
976
- /* @__PURE__ */ e("span", { children: n.label })
144
+ /* @__PURE__ */ e("span", { style: { color: "var(--color-success, #22c55e)" }, children: "●" }),
145
+ /* @__PURE__ */ e("span", { children: "Profiler" }),
146
+ o.used > 0 && /* @__PURE__ */ d(
147
+ "span",
148
+ {
149
+ style: {
150
+ color: o.used > 100 ? "var(--color-warning, #f59e0b)" : "var(--text-muted, #64748b)"
151
+ },
152
+ children: [
153
+ o.used.toFixed(0),
154
+ "MB"
155
+ ]
156
+ }
157
+ ),
158
+ /* @__PURE__ */ e("span", { style: { marginLeft: "auto", opacity: 0.5 }, children: c ? "▼" : "▲" })
977
159
  ]
978
- },
979
- n.type
980
- ))
981
- ] }, u)),
982
- /* @__PURE__ */ e("h4", { children: "Data Sources" }),
983
- l.map((u) => /* @__PURE__ */ e("div", { className: "nice-dashboard-studio__datasource", children: /* @__PURE__ */ t("span", { children: [
984
- "🗄️ ",
985
- u.name
986
- ] }) }, u.id))
987
- ] }),
988
- /* @__PURE__ */ t(
989
- "div",
990
- {
991
- ref: b,
992
- className: `nice-dashboard-studio__grid ${_ ? "nice-dashboard-studio__grid--editing" : ""}`,
993
- style: {
994
- "--columns": a.layout.columns || 12,
995
- "--row-height": `${a.layout.rowHeight || 50}px`,
996
- "--gap": `${a.layout.gap || 8}px`
997
- },
998
- onDragOver: (u) => u.preventDefault(),
999
- onDrop: P,
1000
- onClick: () => v(null),
1001
- children: [
1002
- a.widgets.map((u) => /* @__PURE__ */ e(
1003
- ie,
160
+ }
161
+ ),
162
+ !c && /* @__PURE__ */ d("div", { style: { marginTop: 8 }, children: [
163
+ /* @__PURE__ */ e(
164
+ "div",
1004
165
  {
1005
- widget: u,
1006
- isSelected: (r == null ? void 0 : r.id) === u.id,
1007
- isEditing: _,
1008
- onSelect: () => v(u),
1009
- onUpdate: (n) => C(u.id, n),
1010
- onDelete: () => E(u.id)
1011
- },
1012
- u.id
1013
- )),
1014
- a.widgets.length === 0 && _ && /* @__PURE__ */ e("div", { className: "nice-dashboard-studio__empty", children: "Drag widgets from the palette to build your dashboard" })
1015
- ]
1016
- }
1017
- ),
1018
- r && _ && /* @__PURE__ */ e(
1019
- ae,
1020
- {
1021
- widget: r,
1022
- dataSources: l,
1023
- onChange: (u) => C(r.id, u),
1024
- onClose: () => v(null)
1025
- }
1026
- )
1027
- ] })
1028
- ] });
1029
- }
1030
- function K(i) {
1031
- return i.length === 0 ? 0 : Math.max(...i.map((l) => l.position.y + l.position.height));
1032
- }
1033
- function J(i) {
1034
- switch (i) {
1035
- case "card":
1036
- return 3;
1037
- case "gauge":
1038
- return 3;
1039
- case "filter":
1040
- case "slicer":
1041
- return 3;
1042
- case "text":
1043
- return 4;
1044
- case "chart":
1045
- case "table":
1046
- return 6;
1047
- case "map":
1048
- return 8;
1049
- default:
1050
- return 4;
166
+ style: {
167
+ borderBottom: "1px solid var(--border-color, #333)",
168
+ paddingBottom: 4,
169
+ marginBottom: 8
170
+ },
171
+ children: /* @__PURE__ */ e("strong", { children: "Top Components" })
172
+ }
173
+ ),
174
+ y.map((f) => /* @__PURE__ */ d("div", { style: { marginBottom: 4, display: "flex", gap: 8 }, children: [
175
+ /* @__PURE__ */ e("span", { style: { flex: 1, overflow: "hidden", textOverflow: "ellipsis" }, children: f.componentName }),
176
+ /* @__PURE__ */ e(
177
+ "span",
178
+ {
179
+ style: {
180
+ color: f.avgRenderTime > 16 ? "var(--color-warning, #f59e0b)" : "var(--color-success, #22c55e)"
181
+ },
182
+ children: H(f.avgRenderTime)
183
+ }
184
+ ),
185
+ /* @__PURE__ */ d(
186
+ "span",
187
+ {
188
+ style: { color: "var(--text-muted, #64748b)", minWidth: 30, textAlign: "right" },
189
+ children: [
190
+ "x",
191
+ f.renderCount
192
+ ]
193
+ }
194
+ )
195
+ ] }, f.componentName)),
196
+ /* @__PURE__ */ d("div", { style: { marginTop: 8, display: "flex", gap: 8 }, children: [
197
+ /* @__PURE__ */ e(
198
+ "button",
199
+ {
200
+ onClick: ye,
201
+ style: {
202
+ flex: 1,
203
+ padding: "4px 8px",
204
+ background: "var(--bg-tertiary, #333)",
205
+ border: "none",
206
+ borderRadius: 4,
207
+ color: "var(--bg-primary, #fff)",
208
+ cursor: "pointer",
209
+ fontSize: 10
210
+ },
211
+ children: "Print Report"
212
+ }
213
+ ),
214
+ /* @__PURE__ */ e(
215
+ "button",
216
+ {
217
+ onClick: fe,
218
+ style: {
219
+ flex: 1,
220
+ padding: "4px 8px",
221
+ background: "var(--bg-tertiary, #333)",
222
+ border: "none",
223
+ borderRadius: 4,
224
+ color: "var(--bg-primary, #fff)",
225
+ cursor: "pointer",
226
+ fontSize: 10
227
+ },
228
+ children: "Clear"
229
+ }
230
+ )
231
+ ] })
232
+ ] })
233
+ ]
234
+ }
235
+ );
1051
236
  }
1052
- }
1053
- function Z(i) {
1054
- switch (i) {
1055
- case "card":
1056
- return 2;
1057
- case "gauge":
1058
- return 3;
1059
- case "filter":
1060
- case "slicer":
1061
- return 1;
1062
- case "text":
1063
- return 2;
1064
- case "chart":
1065
- case "table":
1066
- return 5;
1067
- case "map":
1068
- return 8;
1069
- default:
1070
- return 4;
237
+ );
238
+ me.displayName = "ProfilerOverlay";
239
+ process.env.NODE_ENV;
240
+ b(null);
241
+ const pe = b({
242
+ enabled: !0,
243
+ active: !1,
244
+ run: () => {
1071
245
  }
246
+ });
247
+ function ue() {
248
+ return F(pe);
1072
249
  }
1073
- function ee(i) {
1074
- switch (i) {
1075
- case "chart":
1076
- return { chartType: "bar", series: [], axes: [], legend: { show: !0, position: "bottom" } };
1077
- case "table":
1078
- return { columns: [], pageSize: 10 };
1079
- case "card":
1080
- return { value: "", label: "", format: "number", icon: "📊" };
1081
- case "gauge":
1082
- return { value: "0", min: 0, max: 100, target: 75, format: "percent" };
1083
- case "map":
1084
- return { type: "choropleth", geoField: "", valueField: "" };
1085
- case "filter":
1086
- return { field: "", type: "dropdown" };
1087
- case "slicer":
1088
- return { field: "", multiSelect: !0 };
1089
- case "text":
1090
- return { content: "Text content", fontSize: 14 };
1091
- case "image":
1092
- return { src: "", fit: "contain" };
1093
- default:
1094
- return {};
1095
- }
250
+ function be(a, r) {
251
+ if (!a)
252
+ return null;
253
+ if (a === !0)
254
+ return r && r.length > 0 ? r : null;
255
+ if (Array.isArray(a))
256
+ return a.length > 0 ? a : null;
257
+ const c = a.steps ?? r;
258
+ return c && c.length > 0 ? c : null;
1096
259
  }
1097
- function ie({
1098
- widget: i,
1099
- isSelected: l,
1100
- isEditing: o,
1101
- onSelect: s,
1102
- onUpdate: d,
1103
- onDelete: m
1104
- }) {
1105
- const a = (r) => {
1106
- if (!o || r.button !== 0)
1107
- return;
1108
- r.stopPropagation(), s();
1109
- const v = r.clientX, _ = r.clientY, p = { ...i.position }, f = (T) => {
1110
- const L = Math.round((T.clientX - v) / 50), b = Math.round((T.clientY - _) / 50);
1111
- d({
1112
- position: {
1113
- ...p,
1114
- x: Math.max(0, p.x + L),
1115
- y: Math.max(0, p.y + b)
1116
- }
1117
- });
1118
- }, M = () => {
1119
- window.removeEventListener("mousemove", f), window.removeEventListener("mouseup", M);
1120
- };
1121
- window.addEventListener("mousemove", f), window.addEventListener("mouseup", M);
1122
- }, y = V.find((r) => r.type === i.type);
1123
- return /* @__PURE__ */ t(
1124
- "div",
260
+ function ve(a, r) {
261
+ return a.map((c) => ({
262
+ target: c.target,
263
+ title: c.titleKey ? r(c.titleKey, c.title ?? "") : c.title ?? "",
264
+ content: c.contentKey ? r(c.contentKey, c.content ?? "") : c.content ?? "",
265
+ placement: c.placement,
266
+ highlightPadding: c.highlightPadding,
267
+ showArrow: c.showArrow,
268
+ scrollIntoView: c.scrollIntoView,
269
+ disableInteraction: c.disableInteraction
270
+ }));
271
+ }
272
+ const he = ({
273
+ steps: a,
274
+ autoStart: r,
275
+ label: c,
276
+ size: t = "md",
277
+ className: y,
278
+ style: u,
279
+ "data-testid": o
280
+ }) => {
281
+ const { enabled: p, run: S } = ue(), { t: f } = de();
282
+ if (!p || !a || a.length === 0)
283
+ return null;
284
+ const v = c ?? f("tutorial.startAria", "Start tutorial");
285
+ return /* @__PURE__ */ e(
286
+ "button",
1125
287
  {
1126
- className: `nice-dashboard-studio__widget nice-dashboard-studio__widget--${i.type} ${l ? "nice-dashboard-studio__widget--selected" : ""}`,
1127
- style: {
1128
- gridColumn: `${i.position.x + 1} / span ${i.position.width}`,
1129
- gridRow: `${i.position.y + 1} / span ${i.position.height}`
1130
- },
1131
- onMouseDown: a,
1132
- children: [
1133
- /* @__PURE__ */ t("div", { className: "nice-dashboard-studio__widget-header", children: [
1134
- /* @__PURE__ */ e("span", { className: "nice-dashboard-studio__widget-icon", children: y == null ? void 0 : y.icon }),
1135
- /* @__PURE__ */ e("span", { className: "nice-dashboard-studio__widget-title", children: i.title }),
1136
- o && /* @__PURE__ */ e(
1137
- "button",
1138
- {
1139
- className: "nice-dashboard-studio__widget-delete",
1140
- onClick: (r) => {
1141
- r.stopPropagation(), m();
1142
- },
1143
- children: "×"
1144
- }
1145
- )
1146
- ] }),
1147
- /* @__PURE__ */ e("div", { className: "nice-dashboard-studio__widget-content", children: /* @__PURE__ */ e(te, { widget: i }) })
1148
- ]
288
+ type: "button",
289
+ className: `nice-tutorial-button nice-tutorial-button--${t}` + (y ? ` ${y}` : ""),
290
+ style: u,
291
+ "data-testid": o,
292
+ "aria-label": v,
293
+ title: v,
294
+ onClick: () => S(ve(a, f), { autoStart: r }),
295
+ children: "?"
1149
296
  }
1150
297
  );
1151
- }
1152
- function te({ widget: i }) {
1153
- switch (i.type) {
1154
- case "card":
1155
- return /* @__PURE__ */ t("div", { className: "nice-dashboard-studio__card", children: [
1156
- /* @__PURE__ */ e("div", { className: "nice-dashboard-studio__card-value", children: String(i.config.value || "0") }),
1157
- /* @__PURE__ */ e("div", { className: "nice-dashboard-studio__card-label", children: String(i.config.label || "Label") })
1158
- ] });
1159
- case "gauge": {
1160
- const l = Number(i.config.value) || 0, o = Number(i.config.max) || 100, s = l / o * 100;
1161
- return /* @__PURE__ */ e("div", { className: "nice-dashboard-studio__gauge", children: /* @__PURE__ */ t("svg", { viewBox: "0 0 100 60", children: [
1162
- /* @__PURE__ */ e(
1163
- "path",
1164
- {
1165
- d: "M 10 55 A 40 40 0 0 1 90 55",
1166
- fill: "none",
1167
- stroke: "var(--nice-border, #e0e0e0)",
1168
- strokeWidth: "8"
1169
- }
1170
- ),
1171
- /* @__PURE__ */ e(
1172
- "path",
1173
- {
1174
- d: "M 10 55 A 40 40 0 0 1 90 55",
1175
- fill: "none",
1176
- stroke: "var(--nice-primary, #0066cc)",
1177
- strokeWidth: "8",
1178
- strokeDasharray: `${s * 1.26} 126`
1179
- }
1180
- ),
1181
- /* @__PURE__ */ t("text", { x: "50", y: "50", textAnchor: "middle", fontSize: "16", fontWeight: "bold", children: [
1182
- l,
1183
- "%"
1184
- ] })
1185
- ] }) });
298
+ }, U = "nice-tutorial-button-styles";
299
+ if (typeof document < "u" && !document.getElementById(U)) {
300
+ const a = document.createElement("style");
301
+ a.id = U, a.textContent = `
302
+ .nice-tutorial-button {
303
+ display: inline-flex;
304
+ align-items: center;
305
+ justify-content: center;
306
+ border: 1px solid var(--nice-border, #cbd5e1);
307
+ background: var(--nice-bg, #fff);
308
+ color: var(--nice-text-secondary, #475569);
309
+ border-radius: var(--nice-radius-full, 9999px);
310
+ cursor: help;
311
+ font-weight: 700;
312
+ line-height: 1;
313
+ padding: 0;
314
+ transition: background var(--nice-transition, 200ms ease), color var(--nice-transition, 200ms ease), border-color var(--nice-transition, 200ms ease);
1186
315
  }
1187
- case "chart":
1188
- return /* @__PURE__ */ t("div", { className: "nice-dashboard-studio__chart-placeholder", children: [
1189
- /* @__PURE__ */ e("span", { children: "📊" }),
1190
- /* @__PURE__ */ t("span", { children: [
1191
- String(i.config.chartType || "bar"),
1192
- " chart"
1193
- ] })
1194
- ] });
1195
- case "table":
1196
- return /* @__PURE__ */ t("div", { className: "nice-dashboard-studio__table-placeholder", children: [
1197
- /* @__PURE__ */ e("span", { children: "📋" }),
1198
- /* @__PURE__ */ e("span", { children: "Data table" })
1199
- ] });
1200
- case "map":
1201
- return /* @__PURE__ */ t("div", { className: "nice-dashboard-studio__map-placeholder", children: [
1202
- /* @__PURE__ */ e("span", { children: "🗺️" }),
1203
- /* @__PURE__ */ e("span", { children: "Map visualization" })
1204
- ] });
1205
- case "text":
1206
- return /* @__PURE__ */ e(
1207
- "div",
1208
- {
1209
- className: "nice-dashboard-studio__text",
1210
- style: { fontSize: Number(i.config.fontSize) || 14 },
1211
- children: String(i.config.content || "")
1212
- }
1213
- );
1214
- default:
1215
- return /* @__PURE__ */ e("div", { className: "nice-dashboard-studio__widget-placeholder", children: i.type });
1216
- }
316
+ .nice-tutorial-button:hover {
317
+ background: var(--nice-primary, #2563eb);
318
+ border-color: var(--nice-primary, #2563eb);
319
+ color: var(--nice-text-inverse, #fff);
320
+ }
321
+ .nice-tutorial-button:focus-visible {
322
+ outline: none;
323
+ box-shadow: 0 0 0 2px var(--nice-bg, #fff), 0 0 0 4px var(--nice-primary, #2563eb);
324
+ }
325
+ .nice-tutorial-button--sm { width: 16px; height: 16px; font-size: 11px; }
326
+ .nice-tutorial-button--md { width: 20px; height: 20px; font-size: 12px; }
327
+ `, document.head.appendChild(a);
1217
328
  }
1218
- function ne({ filter: i }) {
1219
- const [l, o] = S(i.defaultValue);
1220
- switch (i.type) {
1221
- case "dropdown":
1222
- return /* @__PURE__ */ t("div", { className: "nice-dashboard-studio__filter", children: [
1223
- /* @__PURE__ */ e("label", { children: i.label }),
1224
- /* @__PURE__ */ e("select", { value: String(l || ""), onChange: (s) => o(s.target.value), children: /* @__PURE__ */ e("option", { value: "", children: "All" }) })
1225
- ] });
1226
- case "daterange":
1227
- return /* @__PURE__ */ t("div", { className: "nice-dashboard-studio__filter", children: [
1228
- /* @__PURE__ */ e("label", { children: i.label }),
1229
- /* @__PURE__ */ e("input", { type: "date" }),
1230
- /* @__PURE__ */ e("span", { children: "to" }),
1231
- /* @__PURE__ */ e("input", { type: "date" })
1232
- ] });
1233
- case "slider":
1234
- return /* @__PURE__ */ t("div", { className: "nice-dashboard-studio__filter", children: [
1235
- /* @__PURE__ */ e("label", { children: i.label }),
1236
- /* @__PURE__ */ e("input", { type: "range" })
1237
- ] });
1238
- default:
1239
- return /* @__PURE__ */ t("div", { className: "nice-dashboard-studio__filter", children: [
1240
- /* @__PURE__ */ e("label", { children: i.label }),
1241
- /* @__PURE__ */ e(
1242
- "input",
1243
- {
1244
- type: "text",
1245
- value: String(l || ""),
1246
- onChange: (s) => o(s.target.value)
1247
- }
1248
- )
1249
- ] });
1250
- }
329
+ b(null);
330
+ b(null);
331
+ b(null);
332
+ const B = {
333
+ space1: "4px",
334
+ space2: "8px",
335
+ space3: "12px",
336
+ space4: "16px",
337
+ space5: "20px",
338
+ space6: "24px",
339
+ space8: "32px"
340
+ }, V = {
341
+ fontFamily: "'Inter', system-ui, -apple-system, sans-serif",
342
+ fontSizeXs: "0.75rem",
343
+ fontSizeSm: "0.8125rem",
344
+ fontSizeMd: "0.875rem",
345
+ fontSizeLg: "1rem",
346
+ fontSizeXl: "1.125rem",
347
+ fontWeightNormal: 400,
348
+ fontWeightMedium: 500,
349
+ fontWeightSemibold: 600,
350
+ fontWeightBold: 700,
351
+ lineHeight: 1.5
352
+ }, K = { fast: "120ms ease", normal: "200ms ease", slow: "300ms ease" }, j = (a) => ({
353
+ color: a,
354
+ radiusSm: "4px",
355
+ radiusMd: "6px",
356
+ radiusLg: "8px",
357
+ radiusXl: "12px",
358
+ radiusFull: "9999px"
359
+ }), ge = {
360
+ sm: "0 1px 2px rgba(0,0,0,0.05)",
361
+ md: "0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",
362
+ lg: "0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",
363
+ xl: "0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)"
364
+ }, we = {
365
+ sm: "0 1px 2px rgba(0,0,0,0.3)",
366
+ md: "0 4px 6px -1px rgba(0,0,0,0.4)",
367
+ lg: "0 10px 15px -3px rgba(0,0,0,0.4)",
368
+ xl: "0 20px 25px -5px rgba(0,0,0,0.4)"
369
+ };
370
+ function i(a, r, c, t, y) {
371
+ return {
372
+ name: a,
373
+ darkMode: "light",
374
+ colors: {
375
+ ...r,
376
+ surface: r.surface ?? c.primary,
377
+ surfaceHover: r.surfaceHover ?? c.secondary
378
+ },
379
+ backgrounds: {
380
+ ...c,
381
+ elevated: c.elevated ?? c.primary,
382
+ inset: c.inset ?? c.tertiary,
383
+ canvas: c.canvas ?? c.primary
384
+ },
385
+ text: { ...t, inverse: t.inverse ?? "#ffffff" },
386
+ borders: j(y),
387
+ shadows: ge,
388
+ spacing: B,
389
+ typography: V,
390
+ transitions: K
391
+ };
1251
392
  }
1252
- function ae({
1253
- widget: i,
1254
- dataSources: l,
1255
- onChange: o,
1256
- onClose: s
1257
- }) {
1258
- return /* @__PURE__ */ t("div", { className: "nice-dashboard-studio__properties", children: [
1259
- /* @__PURE__ */ t("div", { className: "nice-dashboard-studio__properties-header", children: [
1260
- /* @__PURE__ */ e("h4", { children: "Widget Properties" }),
1261
- /* @__PURE__ */ e("button", { onClick: s, children: "×" })
1262
- ] }),
1263
- /* @__PURE__ */ t("div", { className: "nice-dashboard-studio__properties-content", children: [
1264
- /* @__PURE__ */ t("div", { className: "nice-dashboard-studio__field", children: [
1265
- /* @__PURE__ */ e("label", { children: "Title" }),
1266
- /* @__PURE__ */ e(
1267
- "input",
1268
- {
1269
- type: "text",
1270
- value: i.title || "",
1271
- onChange: (d) => o({ title: d.target.value })
1272
- }
1273
- )
1274
- ] }),
1275
- /* @__PURE__ */ t("div", { className: "nice-dashboard-studio__field", children: [
1276
- /* @__PURE__ */ e("label", { children: "Data Source" }),
1277
- /* @__PURE__ */ t(
1278
- "select",
1279
- {
1280
- value: i.dataSource || "",
1281
- onChange: (d) => o({ dataSource: d.target.value }),
1282
- children: [
1283
- /* @__PURE__ */ e("option", { value: "", children: "Select..." }),
1284
- l.map((d) => /* @__PURE__ */ e("option", { value: d.id, children: d.name }, d.id))
1285
- ]
1286
- }
1287
- )
1288
- ] }),
1289
- /* @__PURE__ */ t("div", { className: "nice-dashboard-studio__field", children: [
1290
- /* @__PURE__ */ e("label", { children: "Size" }),
1291
- /* @__PURE__ */ t("div", { className: "nice-dashboard-studio__size-inputs", children: [
1292
- /* @__PURE__ */ e(
1293
- "input",
1294
- {
1295
- type: "number",
1296
- value: i.position.width,
1297
- onChange: (d) => o({
1298
- position: { ...i.position, width: parseInt(d.target.value, 10) || 1 }
1299
- }),
1300
- min: 1,
1301
- max: 12
1302
- }
1303
- ),
1304
- /* @__PURE__ */ e("span", { children: "×" }),
1305
- /* @__PURE__ */ e(
1306
- "input",
1307
- {
1308
- type: "number",
1309
- value: i.position.height,
1310
- onChange: (d) => o({
1311
- position: { ...i.position, height: parseInt(d.target.value, 10) || 1 }
1312
- }),
1313
- min: 1,
1314
- max: 20
1315
- }
1316
- )
1317
- ] })
1318
- ] }),
1319
- i.type === "chart" && /* @__PURE__ */ t("div", { className: "nice-dashboard-studio__field", children: [
1320
- /* @__PURE__ */ e("label", { children: "Chart Type" }),
1321
- /* @__PURE__ */ t(
1322
- "select",
1323
- {
1324
- value: String(i.config.chartType || "bar"),
1325
- onChange: (d) => o({ config: { ...i.config, chartType: d.target.value } }),
1326
- children: [
1327
- /* @__PURE__ */ e("option", { value: "bar", children: "Bar" }),
1328
- /* @__PURE__ */ e("option", { value: "line", children: "Line" }),
1329
- /* @__PURE__ */ e("option", { value: "pie", children: "Pie" }),
1330
- /* @__PURE__ */ e("option", { value: "area", children: "Area" }),
1331
- /* @__PURE__ */ e("option", { value: "scatter", children: "Scatter" }),
1332
- /* @__PURE__ */ e("option", { value: "donut", children: "Donut" })
1333
- ]
1334
- }
1335
- )
1336
- ] }),
1337
- i.type === "card" && /* @__PURE__ */ t(F, { children: [
1338
- /* @__PURE__ */ t("div", { className: "nice-dashboard-studio__field", children: [
1339
- /* @__PURE__ */ e("label", { children: "Value Field" }),
1340
- /* @__PURE__ */ e(
1341
- "input",
1342
- {
1343
- type: "text",
1344
- value: String(i.config.value || ""),
1345
- onChange: (d) => o({ config: { ...i.config, value: d.target.value } }),
1346
- placeholder: "e.g., SUM(Sales)"
1347
- }
1348
- )
1349
- ] }),
1350
- /* @__PURE__ */ t("div", { className: "nice-dashboard-studio__field", children: [
1351
- /* @__PURE__ */ e("label", { children: "Label" }),
1352
- /* @__PURE__ */ e(
1353
- "input",
1354
- {
1355
- type: "text",
1356
- value: String(i.config.label || ""),
1357
- onChange: (d) => o({ config: { ...i.config, label: d.target.value } })
1358
- }
1359
- )
1360
- ] })
1361
- ] }),
1362
- i.type === "text" && /* @__PURE__ */ t("div", { className: "nice-dashboard-studio__field", children: [
1363
- /* @__PURE__ */ e("label", { children: "Content" }),
1364
- /* @__PURE__ */ e(
1365
- "textarea",
1366
- {
1367
- value: String(i.config.content || ""),
1368
- onChange: (d) => o({ config: { ...i.config, content: d.target.value } }),
1369
- rows: 4
1370
- }
1371
- )
1372
- ] }),
1373
- /* @__PURE__ */ t("div", { className: "nice-dashboard-studio__field", children: [
1374
- /* @__PURE__ */ e("label", { children: "Refresh Interval (seconds)" }),
1375
- /* @__PURE__ */ e(
1376
- "input",
1377
- {
1378
- type: "number",
1379
- value: i.refreshInterval || 0,
1380
- onChange: (d) => o({ refreshInterval: parseInt(d.target.value, 10) || 0 }),
1381
- min: 0,
1382
- placeholder: "0 = manual"
1383
- }
1384
- )
1385
- ] })
1386
- ] })
1387
- ] });
393
+ function m(a, r, c, t, y) {
394
+ return {
395
+ name: a,
396
+ darkMode: "dark",
397
+ colors: {
398
+ ...r,
399
+ surface: r.surface ?? c.secondary,
400
+ surfaceHover: r.surfaceHover ?? c.tertiary
401
+ },
402
+ backgrounds: {
403
+ ...c,
404
+ elevated: c.elevated ?? c.secondary,
405
+ inset: c.inset ?? c.primary,
406
+ canvas: c.canvas ?? c.primary
407
+ },
408
+ text: { ...t, inverse: t.inverse ?? "#0f172a" },
409
+ borders: j(y),
410
+ shadows: we,
411
+ spacing: B,
412
+ typography: V,
413
+ transitions: K
414
+ };
1388
415
  }
1389
- const le = {
416
+ i(
417
+ "Slate",
418
+ {
419
+ primary: "#64748b",
420
+ primaryHover: "#475569",
421
+ success: "#10b981",
422
+ warning: "#f59e0b",
423
+ error: "#ef4444",
424
+ info: "#06b6d4"
425
+ },
426
+ { primary: "#f8fafc", secondary: "#f1f5f9", tertiary: "#e2e8f0", hover: "#e2e8f0" },
427
+ { primary: "#1e293b", secondary: "#475569", muted: "#94a3b8" },
428
+ "#cbd5e1"
429
+ );
430
+ i(
431
+ "Zinc",
432
+ {
433
+ primary: "#71717a",
434
+ primaryHover: "#52525b",
435
+ success: "#22c55e",
436
+ warning: "#eab308",
437
+ error: "#ef4444",
438
+ info: "#06b6d4"
439
+ },
440
+ { primary: "#fafafa", secondary: "#f4f4f5", tertiary: "#e4e4e7", hover: "#e4e4e7" },
441
+ { primary: "#18181b", secondary: "#3f3f46", muted: "#a1a1aa" },
442
+ "#d4d4d8"
443
+ );
444
+ i(
445
+ "Stone",
446
+ {
447
+ primary: "#78716c",
448
+ primaryHover: "#57534e",
449
+ success: "#16a34a",
450
+ warning: "#ca8a04",
451
+ error: "#dc2626",
452
+ info: "#0891b2"
453
+ },
454
+ { primary: "#fafaf9", secondary: "#f5f5f4", tertiary: "#e7e5e4", hover: "#e7e5e4" },
455
+ { primary: "#1c1917", secondary: "#44403c", muted: "#a8a29e" },
456
+ "#d6d3d1"
457
+ );
458
+ i(
459
+ "Cool Gray",
460
+ {
461
+ primary: "#6b7280",
462
+ primaryHover: "#4b5563",
463
+ success: "#10b981",
464
+ warning: "#f59e0b",
465
+ error: "#ef4444",
466
+ info: "#3b82f6"
467
+ },
468
+ { primary: "#f9fafb", secondary: "#f3f4f6", tertiary: "#e5e7eb", hover: "#e5e7eb" },
469
+ { primary: "#111827", secondary: "#374151", muted: "#9ca3af" },
470
+ "#d1d5db"
471
+ );
472
+ i(
473
+ "Warm Gray",
474
+ {
475
+ primary: "#7c7568",
476
+ primaryHover: "#5c564c",
477
+ success: "#4d7c0f",
478
+ warning: "#a16207",
479
+ error: "#b91c1c",
480
+ info: "#0e7490"
481
+ },
482
+ { primary: "#faf9f7", secondary: "#f5f4f0", tertiary: "#e8e6e1", hover: "#e8e6e1" },
483
+ { primary: "#1f1d19", secondary: "#4a463d", muted: "#a09888" },
484
+ "#d4d0c8"
485
+ );
486
+ i(
487
+ "Silver",
488
+ {
489
+ primary: "#94a3b8",
490
+ primaryHover: "#64748b",
491
+ success: "#10b981",
492
+ warning: "#f59e0b",
493
+ error: "#ef4444",
494
+ info: "#38bdf8"
495
+ },
496
+ { primary: "#f8fafc", secondary: "#f1f5f9", tertiary: "#e2e8f0", hover: "#e2e8f0" },
497
+ { primary: "#334155", secondary: "#64748b", muted: "#94a3b8" },
498
+ "#cbd5e1"
499
+ );
500
+ i(
501
+ "Charcoal",
502
+ {
503
+ primary: "#374151",
504
+ primaryHover: "#1f2937",
505
+ success: "#059669",
506
+ warning: "#d97706",
507
+ error: "#dc2626",
508
+ info: "#0284c7"
509
+ },
510
+ { primary: "#f9fafb", secondary: "#f3f4f6", tertiary: "#e5e7eb", hover: "#e5e7eb" },
511
+ { primary: "#111827", secondary: "#374151", muted: "#6b7280" },
512
+ "#d1d5db"
513
+ );
514
+ i(
515
+ "Ivory",
516
+ {
517
+ primary: "#92876d",
518
+ primaryHover: "#7a6f55",
519
+ success: "#4d7c0f",
520
+ warning: "#a16207",
521
+ error: "#b91c1c",
522
+ info: "#0e7490"
523
+ },
524
+ { primary: "#fffef7", secondary: "#faf6eb", tertiary: "#f0ead6", hover: "#f0ead6" },
525
+ { primary: "#2b2517", secondary: "#5c5340", muted: "#9c9280" },
526
+ "#ddd8c4"
527
+ );
528
+ i(
529
+ "Rose",
530
+ {
531
+ primary: "#e11d48",
532
+ primaryHover: "#be123c",
533
+ success: "#16a34a",
534
+ warning: "#ea580c",
535
+ error: "#dc2626",
536
+ info: "#0891b2"
537
+ },
538
+ { primary: "#fff1f2", secondary: "#ffe4e6", tertiary: "#fecdd3", hover: "#ffe4e6" },
539
+ { primary: "#4c0519", secondary: "#881337", muted: "#f43f5e" },
540
+ "#fda4af"
541
+ );
542
+ i(
543
+ "Emerald",
544
+ {
545
+ primary: "#059669",
546
+ primaryHover: "#047857",
547
+ success: "#16a34a",
548
+ warning: "#d97706",
549
+ error: "#dc2626",
550
+ info: "#0891b2"
551
+ },
552
+ { primary: "#ecfdf5", secondary: "#d1fae5", tertiary: "#a7f3d0", hover: "#d1fae5" },
553
+ { primary: "#064e3b", secondary: "#065f46", muted: "#34d399" },
554
+ "#6ee7b7"
555
+ );
556
+ i(
557
+ "Amber",
558
+ {
559
+ primary: "#d97706",
560
+ primaryHover: "#b45309",
561
+ success: "#16a34a",
562
+ warning: "#ca8a04",
563
+ error: "#dc2626",
564
+ info: "#0284c7"
565
+ },
566
+ { primary: "#fffbeb", secondary: "#fef3c7", tertiary: "#fde68a", hover: "#fef3c7" },
567
+ { primary: "#451a03", secondary: "#78350f", muted: "#f59e0b" },
568
+ "#fcd34d"
569
+ );
570
+ i(
571
+ "Violet",
572
+ {
573
+ primary: "#7c3aed",
574
+ primaryHover: "#6d28d9",
575
+ success: "#10b981",
576
+ warning: "#f59e0b",
577
+ error: "#ef4444",
578
+ info: "#06b6d4"
579
+ },
580
+ { primary: "#f5f3ff", secondary: "#ede9fe", tertiary: "#ddd6fe", hover: "#ede9fe" },
581
+ { primary: "#2e1065", secondary: "#4c1d95", muted: "#a78bfa" },
582
+ "#c4b5fd"
583
+ );
584
+ i(
585
+ "Teal",
586
+ {
587
+ primary: "#0d9488",
588
+ primaryHover: "#0f766e",
589
+ success: "#16a34a",
590
+ warning: "#d97706",
591
+ error: "#dc2626",
592
+ info: "#0284c7"
593
+ },
594
+ { primary: "#f0fdfa", secondary: "#ccfbf1", tertiary: "#99f6e4", hover: "#ccfbf1" },
595
+ { primary: "#134e4a", secondary: "#115e59", muted: "#2dd4bf" },
596
+ "#5eead4"
597
+ );
598
+ i(
599
+ "Indigo",
600
+ {
601
+ primary: "#4f46e5",
602
+ primaryHover: "#4338ca",
603
+ success: "#10b981",
604
+ warning: "#f59e0b",
605
+ error: "#ef4444",
606
+ info: "#06b6d4"
607
+ },
608
+ { primary: "#eef2ff", secondary: "#e0e7ff", tertiary: "#c7d2fe", hover: "#e0e7ff" },
609
+ { primary: "#1e1b4b", secondary: "#312e81", muted: "#818cf8" },
610
+ "#a5b4fc"
611
+ );
612
+ i(
613
+ "Cyan",
614
+ {
615
+ primary: "#0891b2",
616
+ primaryHover: "#0e7490",
617
+ success: "#10b981",
618
+ warning: "#f59e0b",
619
+ error: "#ef4444",
620
+ info: "#0284c7"
621
+ },
622
+ { primary: "#ecfeff", secondary: "#cffafe", tertiary: "#a5f3fc", hover: "#cffafe" },
623
+ { primary: "#164e63", secondary: "#155e75", muted: "#22d3ee" },
624
+ "#67e8f9"
625
+ );
626
+ i(
627
+ "Lime",
628
+ {
629
+ primary: "#65a30d",
630
+ primaryHover: "#4d7c0f",
631
+ success: "#16a34a",
632
+ warning: "#ca8a04",
633
+ error: "#dc2626",
634
+ info: "#0891b2"
635
+ },
636
+ { primary: "#f7fee7", secondary: "#ecfccb", tertiary: "#d9f99d", hover: "#ecfccb" },
637
+ { primary: "#1a2e05", secondary: "#365314", muted: "#84cc16" },
638
+ "#bef264"
639
+ );
640
+ i(
641
+ "Pink",
642
+ {
643
+ primary: "#db2777",
644
+ primaryHover: "#be185d",
645
+ success: "#10b981",
646
+ warning: "#f59e0b",
647
+ error: "#dc2626",
648
+ info: "#06b6d4"
649
+ },
650
+ { primary: "#fdf2f8", secondary: "#fce7f3", tertiary: "#fbcfe8", hover: "#fce7f3" },
651
+ { primary: "#500724", secondary: "#831843", muted: "#f472b6" },
652
+ "#f9a8d4"
653
+ );
654
+ i(
655
+ "Orange",
656
+ {
657
+ primary: "#ea580c",
658
+ primaryHover: "#c2410c",
659
+ success: "#16a34a",
660
+ warning: "#ca8a04",
661
+ error: "#dc2626",
662
+ info: "#0891b2"
663
+ },
664
+ { primary: "#fff7ed", secondary: "#ffedd5", tertiary: "#fed7aa", hover: "#ffedd5" },
665
+ { primary: "#431407", secondary: "#7c2d12", muted: "#fb923c" },
666
+ "#fdba74"
667
+ );
668
+ i(
669
+ "Fuchsia",
670
+ {
671
+ primary: "#c026d3",
672
+ primaryHover: "#a21caf",
673
+ success: "#10b981",
674
+ warning: "#eab308",
675
+ error: "#ef4444",
676
+ info: "#06b6d4"
677
+ },
678
+ { primary: "#fdf4ff", secondary: "#fae8ff", tertiary: "#f5d0fe", hover: "#fae8ff" },
679
+ { primary: "#4a044e", secondary: "#701a75", muted: "#d946ef" },
680
+ "#e879f9"
681
+ );
682
+ i(
683
+ "Sky",
684
+ {
685
+ primary: "#0284c7",
686
+ primaryHover: "#0369a1",
687
+ success: "#10b981",
688
+ warning: "#f59e0b",
689
+ error: "#ef4444",
690
+ info: "#06b6d4"
691
+ },
692
+ { primary: "#f0f9ff", secondary: "#e0f2fe", tertiary: "#bae6fd", hover: "#e0f2fe" },
693
+ { primary: "#0c4a6e", secondary: "#075985", muted: "#38bdf8" },
694
+ "#7dd3fc"
695
+ );
696
+ i(
697
+ "Ruby",
698
+ {
699
+ primary: "#be123c",
700
+ primaryHover: "#9f1239",
701
+ success: "#059669",
702
+ warning: "#d97706",
703
+ error: "#dc2626",
704
+ info: "#0284c7"
705
+ },
706
+ { primary: "#fff1f2", secondary: "#ffe4e6", tertiary: "#fecdd3", hover: "#ffe4e6" },
707
+ { primary: "#4c0519", secondary: "#881337", muted: "#fb7185" },
708
+ "#fda4af"
709
+ );
710
+ i(
711
+ "Coral",
712
+ {
713
+ primary: "#f97316",
714
+ primaryHover: "#ea580c",
715
+ success: "#10b981",
716
+ warning: "#eab308",
717
+ error: "#ef4444",
718
+ info: "#06b6d4"
719
+ },
720
+ { primary: "#fff7ed", secondary: "#ffedd5", tertiary: "#fed7aa", hover: "#ffedd5" },
721
+ { primary: "#431407", secondary: "#9a3412", muted: "#fb923c" },
722
+ "#fdba74"
723
+ );
724
+ m(
725
+ "Midnight",
726
+ {
727
+ primary: "#818cf8",
728
+ primaryHover: "#6366f1",
729
+ success: "#34d399",
730
+ warning: "#fbbf24",
731
+ error: "#f87171",
732
+ info: "#22d3ee"
733
+ },
734
+ { primary: "#020617", secondary: "#0f172a", tertiary: "#1e293b", hover: "#1e293b" },
735
+ { primary: "#f1f5f9", secondary: "#94a3b8", muted: "#475569" },
736
+ "#1e293b"
737
+ );
738
+ m(
739
+ "Obsidian",
740
+ {
741
+ primary: "#a78bfa",
742
+ primaryHover: "#8b5cf6",
743
+ success: "#4ade80",
744
+ warning: "#facc15",
745
+ error: "#fb7185",
746
+ info: "#38bdf8"
747
+ },
748
+ { primary: "#09090b", secondary: "#18181b", tertiary: "#27272a", hover: "#27272a" },
749
+ { primary: "#fafafa", secondary: "#a1a1aa", muted: "#52525b" },
750
+ "#3f3f46"
751
+ );
752
+ m(
753
+ "Eclipse",
754
+ {
755
+ primary: "#c084fc",
756
+ primaryHover: "#a855f7",
757
+ success: "#34d399",
758
+ warning: "#fbbf24",
759
+ error: "#f87171",
760
+ info: "#67e8f9"
761
+ },
762
+ { primary: "#0c0a1d", secondary: "#1a1533", tertiary: "#2a2248", hover: "#2a2248" },
763
+ { primary: "#f5f3ff", secondary: "#a78bfa", muted: "#6d5eac" },
764
+ "#3b3266"
765
+ );
766
+ m(
767
+ "Onyx",
768
+ {
769
+ primary: "#60a5fa",
770
+ primaryHover: "#3b82f6",
771
+ success: "#4ade80",
772
+ warning: "#fbbf24",
773
+ error: "#f87171",
774
+ info: "#22d3ee"
775
+ },
776
+ { primary: "#000000", secondary: "#0a0a0a", tertiary: "#171717", hover: "#171717" },
777
+ { primary: "#ffffff", secondary: "#a3a3a3", muted: "#525252" },
778
+ "#262626"
779
+ );
780
+ m(
781
+ "Carbon",
782
+ {
783
+ primary: "#38bdf8",
784
+ primaryHover: "#0ea5e9",
785
+ success: "#4ade80",
786
+ warning: "#facc15",
787
+ error: "#f87171",
788
+ info: "#67e8f9"
789
+ },
790
+ { primary: "#161616", secondary: "#262626", tertiary: "#393939", hover: "#393939" },
791
+ { primary: "#f4f4f4", secondary: "#c6c6c6", muted: "#6f6f6f" },
792
+ "#525252"
793
+ );
794
+ m(
795
+ "Cosmos",
796
+ {
797
+ primary: "#6366f1",
798
+ primaryHover: "#4f46e5",
799
+ success: "#34d399",
800
+ warning: "#fbbf24",
801
+ error: "#f87171",
802
+ info: "#22d3ee"
803
+ },
804
+ { primary: "#030712", secondary: "#111827", tertiary: "#1f2937", hover: "#1f2937" },
805
+ { primary: "#e5e7eb", secondary: "#9ca3af", muted: "#4b5563" },
806
+ "#374151"
807
+ );
808
+ m(
809
+ "Nebula",
810
+ {
811
+ primary: "#e879f9",
812
+ primaryHover: "#d946ef",
813
+ success: "#4ade80",
814
+ warning: "#fbbf24",
815
+ error: "#fb7185",
816
+ info: "#67e8f9"
817
+ },
818
+ { primary: "#0d0117", secondary: "#1a0533", tertiary: "#2d0a52", hover: "#2d0a52" },
819
+ { primary: "#fae8ff", secondary: "#d8b4fe", muted: "#7c3aed" },
820
+ "#581c87"
821
+ );
822
+ m(
823
+ "Abyss",
824
+ {
825
+ primary: "#22d3ee",
826
+ primaryHover: "#06b6d4",
827
+ success: "#34d399",
828
+ warning: "#fbbf24",
829
+ error: "#f87171",
830
+ info: "#38bdf8"
831
+ },
832
+ { primary: "#001219", secondary: "#002a3a", tertiary: "#003e54", hover: "#003e54" },
833
+ { primary: "#e0f2fe", secondary: "#7dd3fc", muted: "#0369a1" },
834
+ "#075985"
835
+ );
836
+ m(
837
+ "Shadow",
838
+ {
839
+ primary: "#a3a3a3",
840
+ primaryHover: "#737373",
841
+ success: "#4ade80",
842
+ warning: "#facc15",
843
+ error: "#f87171",
844
+ info: "#38bdf8"
845
+ },
846
+ { primary: "#171717", secondary: "#1f1f1f", tertiary: "#2a2a2a", hover: "#2a2a2a" },
847
+ { primary: "#e5e5e5", secondary: "#a3a3a3", muted: "#525252" },
848
+ "#404040"
849
+ );
850
+ m(
851
+ "Emerald Dark",
852
+ {
853
+ primary: "#34d399",
854
+ primaryHover: "#10b981",
855
+ success: "#4ade80",
856
+ warning: "#fbbf24",
857
+ error: "#f87171",
858
+ info: "#22d3ee"
859
+ },
860
+ { primary: "#022c22", secondary: "#064e3b", tertiary: "#065f46", hover: "#065f46" },
861
+ { primary: "#ecfdf5", secondary: "#6ee7b7", muted: "#047857" },
862
+ "#047857"
863
+ );
864
+ i(
865
+ "Forest",
866
+ {
867
+ primary: "#166534",
868
+ primaryHover: "#14532d",
869
+ success: "#22c55e",
870
+ warning: "#ca8a04",
871
+ error: "#dc2626",
872
+ info: "#0891b2"
873
+ },
874
+ { primary: "#f0fdf4", secondary: "#dcfce7", tertiary: "#bbf7d0", hover: "#dcfce7" },
875
+ { primary: "#052e16", secondary: "#166534", muted: "#4ade80" },
876
+ "#86efac"
877
+ );
878
+ i(
879
+ "Ocean",
880
+ {
881
+ primary: "#0369a1",
882
+ primaryHover: "#075985",
883
+ success: "#059669",
884
+ warning: "#d97706",
885
+ error: "#dc2626",
886
+ info: "#0284c7"
887
+ },
888
+ { primary: "#f0f9ff", secondary: "#e0f2fe", tertiary: "#bae6fd", hover: "#e0f2fe" },
889
+ { primary: "#0c4a6e", secondary: "#0369a1", muted: "#38bdf8" },
890
+ "#7dd3fc"
891
+ );
892
+ i(
893
+ "Desert",
894
+ {
895
+ primary: "#b45309",
896
+ primaryHover: "#92400e",
897
+ success: "#4d7c0f",
898
+ warning: "#a16207",
899
+ error: "#b91c1c",
900
+ info: "#0e7490"
901
+ },
902
+ { primary: "#fefce8", secondary: "#fef9c3", tertiary: "#fef08a", hover: "#fef9c3" },
903
+ { primary: "#422006", secondary: "#713f12", muted: "#ca8a04" },
904
+ "#fde047"
905
+ );
906
+ i(
907
+ "Sunset",
908
+ {
909
+ primary: "#ea580c",
910
+ primaryHover: "#c2410c",
911
+ success: "#16a34a",
912
+ warning: "#d97706",
913
+ error: "#dc2626",
914
+ info: "#0891b2"
915
+ },
916
+ { primary: "#fff7ed", secondary: "#ffedd5", tertiary: "#fed7aa", hover: "#ffedd5" },
917
+ { primary: "#431407", secondary: "#9a3412", muted: "#f97316" },
918
+ "#fdba74"
919
+ );
920
+ i(
921
+ "Aurora",
922
+ {
923
+ primary: "#0d9488",
924
+ primaryHover: "#0f766e",
925
+ success: "#22c55e",
926
+ warning: "#eab308",
927
+ error: "#ef4444",
928
+ info: "#06b6d4"
929
+ },
930
+ { primary: "#f0fdfa", secondary: "#ccfbf1", tertiary: "#99f6e4", hover: "#ccfbf1" },
931
+ { primary: "#134e4a", secondary: "#115e59", muted: "#2dd4bf" },
932
+ "#5eead4"
933
+ );
934
+ i(
935
+ "Lavender",
936
+ {
937
+ primary: "#7e22ce",
938
+ primaryHover: "#6b21a8",
939
+ success: "#16a34a",
940
+ warning: "#d97706",
941
+ error: "#dc2626",
942
+ info: "#0891b2"
943
+ },
944
+ { primary: "#faf5ff", secondary: "#f3e8ff", tertiary: "#e9d5ff", hover: "#f3e8ff" },
945
+ { primary: "#3b0764", secondary: "#581c87", muted: "#a855f7" },
946
+ "#d8b4fe"
947
+ );
948
+ i(
949
+ "Autumn",
950
+ {
951
+ primary: "#c2410c",
952
+ primaryHover: "#9a3412",
953
+ success: "#4d7c0f",
954
+ warning: "#a16207",
955
+ error: "#b91c1c",
956
+ info: "#0e7490"
957
+ },
958
+ { primary: "#fef2f2", secondary: "#fee2e2", tertiary: "#fecaca", hover: "#fee2e2" },
959
+ { primary: "#450a0a", secondary: "#7f1d1d", muted: "#f87171" },
960
+ "#fca5a5"
961
+ );
962
+ i(
963
+ "Spring",
964
+ {
965
+ primary: "#16a34a",
966
+ primaryHover: "#15803d",
967
+ success: "#22c55e",
968
+ warning: "#eab308",
969
+ error: "#ef4444",
970
+ info: "#06b6d4"
971
+ },
972
+ { primary: "#f0fdf4", secondary: "#dcfce7", tertiary: "#bbf7d0", hover: "#dcfce7" },
973
+ { primary: "#14532d", secondary: "#166534", muted: "#4ade80" },
974
+ "#86efac"
975
+ );
976
+ i(
977
+ "Arctic",
978
+ {
979
+ primary: "#0ea5e9",
980
+ primaryHover: "#0284c7",
981
+ success: "#10b981",
982
+ warning: "#f59e0b",
983
+ error: "#ef4444",
984
+ info: "#06b6d4"
985
+ },
986
+ { primary: "#f0f9ff", secondary: "#e0f2fe", tertiary: "#bae6fd", hover: "#e0f2fe" },
987
+ { primary: "#0c4a6e", secondary: "#0369a1", muted: "#7dd3fc" },
988
+ "#bae6fd"
989
+ );
990
+ i(
991
+ "Tropical",
992
+ {
993
+ primary: "#0d9488",
994
+ primaryHover: "#0f766e",
995
+ success: "#16a34a",
996
+ warning: "#f59e0b",
997
+ error: "#ef4444",
998
+ info: "#06b6d4"
999
+ },
1000
+ { primary: "#ecfdf5", secondary: "#d1fae5", tertiary: "#a7f3d0", hover: "#d1fae5" },
1001
+ { primary: "#064e3b", secondary: "#065f46", muted: "#6ee7b7" },
1002
+ "#a7f3d0"
1003
+ );
1004
+ i(
1005
+ "Pastel Rose",
1006
+ {
1007
+ primary: "#f472b6",
1008
+ primaryHover: "#ec4899",
1009
+ success: "#4ade80",
1010
+ warning: "#fcd34d",
1011
+ error: "#fb7185",
1012
+ info: "#67e8f9"
1013
+ },
1014
+ { primary: "#fdf2f8", secondary: "#fce7f3", tertiary: "#fbcfe8", hover: "#fce7f3" },
1015
+ { primary: "#831843", secondary: "#9d174d", muted: "#f9a8d4" },
1016
+ "#f9a8d4"
1017
+ );
1018
+ i(
1019
+ "Pastel Sky",
1020
+ {
1021
+ primary: "#38bdf8",
1022
+ primaryHover: "#0ea5e9",
1023
+ success: "#4ade80",
1024
+ warning: "#fcd34d",
1025
+ error: "#fb7185",
1026
+ info: "#67e8f9"
1027
+ },
1028
+ { primary: "#f0f9ff", secondary: "#e0f2fe", tertiary: "#bae6fd", hover: "#e0f2fe" },
1029
+ { primary: "#075985", secondary: "#0369a1", muted: "#7dd3fc" },
1030
+ "#bae6fd"
1031
+ );
1032
+ i(
1033
+ "Pastel Mint",
1034
+ {
1035
+ primary: "#34d399",
1036
+ primaryHover: "#10b981",
1037
+ success: "#4ade80",
1038
+ warning: "#fcd34d",
1039
+ error: "#fb7185",
1040
+ info: "#67e8f9"
1041
+ },
1042
+ { primary: "#ecfdf5", secondary: "#d1fae5", tertiary: "#a7f3d0", hover: "#d1fae5" },
1043
+ { primary: "#065f46", secondary: "#047857", muted: "#6ee7b7" },
1044
+ "#a7f3d0"
1045
+ );
1046
+ i(
1047
+ "Pastel Peach",
1048
+ {
1049
+ primary: "#fb923c",
1050
+ primaryHover: "#f97316",
1051
+ success: "#4ade80",
1052
+ warning: "#fcd34d",
1053
+ error: "#fb7185",
1054
+ info: "#67e8f9"
1055
+ },
1056
+ { primary: "#fff7ed", secondary: "#ffedd5", tertiary: "#fed7aa", hover: "#ffedd5" },
1057
+ { primary: "#7c2d12", secondary: "#9a3412", muted: "#fdba74" },
1058
+ "#fed7aa"
1059
+ );
1060
+ i(
1061
+ "Pastel Lavender",
1062
+ {
1063
+ primary: "#a78bfa",
1064
+ primaryHover: "#8b5cf6",
1065
+ success: "#4ade80",
1066
+ warning: "#fcd34d",
1067
+ error: "#fb7185",
1068
+ info: "#67e8f9"
1069
+ },
1070
+ { primary: "#f5f3ff", secondary: "#ede9fe", tertiary: "#ddd6fe", hover: "#ede9fe" },
1071
+ { primary: "#4c1d95", secondary: "#5b21b6", muted: "#c4b5fd" },
1072
+ "#ddd6fe"
1073
+ );
1074
+ i(
1075
+ "Pastel Lemon",
1076
+ {
1077
+ primary: "#facc15",
1078
+ primaryHover: "#eab308",
1079
+ success: "#4ade80",
1080
+ warning: "#fcd34d",
1081
+ error: "#fb7185",
1082
+ info: "#67e8f9"
1083
+ },
1084
+ { primary: "#fefce8", secondary: "#fef9c3", tertiary: "#fef08a", hover: "#fef9c3" },
1085
+ { primary: "#713f12", secondary: "#854d0e", muted: "#fde047" },
1086
+ "#fef08a"
1087
+ );
1088
+ i(
1089
+ "Pastel Sage",
1090
+ {
1091
+ primary: "#86efac",
1092
+ primaryHover: "#4ade80",
1093
+ success: "#22c55e",
1094
+ warning: "#fcd34d",
1095
+ error: "#fb7185",
1096
+ info: "#67e8f9"
1097
+ },
1098
+ { primary: "#f0fdf4", secondary: "#dcfce7", tertiary: "#bbf7d0", hover: "#dcfce7" },
1099
+ { primary: "#166534", secondary: "#15803d", muted: "#86efac" },
1100
+ "#bbf7d0"
1101
+ );
1102
+ i(
1103
+ "Pastel Coral",
1104
+ {
1105
+ primary: "#fb7185",
1106
+ primaryHover: "#f43f5e",
1107
+ success: "#4ade80",
1108
+ warning: "#fcd34d",
1109
+ error: "#ef4444",
1110
+ info: "#67e8f9"
1111
+ },
1112
+ { primary: "#fff1f2", secondary: "#ffe4e6", tertiary: "#fecdd3", hover: "#ffe4e6" },
1113
+ { primary: "#881337", secondary: "#9f1239", muted: "#fda4af" },
1114
+ "#fecdd3"
1115
+ );
1116
+ i(
1117
+ "Banking",
1118
+ {
1119
+ primary: "#1e3a5f",
1120
+ primaryHover: "#152c4a",
1121
+ success: "#059669",
1122
+ warning: "#d97706",
1123
+ error: "#dc2626",
1124
+ info: "#0891b2"
1125
+ },
1126
+ { primary: "#f8fafc", secondary: "#f1f5f9", tertiary: "#e2e8f0", hover: "#e2e8f0" },
1127
+ { primary: "#0f172a", secondary: "#334155", muted: "#94a3b8" },
1128
+ "#cbd5e1"
1129
+ );
1130
+ i(
1131
+ "Healthcare",
1132
+ {
1133
+ primary: "#0891b2",
1134
+ primaryHover: "#0e7490",
1135
+ success: "#059669",
1136
+ warning: "#d97706",
1137
+ error: "#dc2626",
1138
+ info: "#0284c7"
1139
+ },
1140
+ { primary: "#f0fdfa", secondary: "#e0f7fa", tertiary: "#b2ebf2", hover: "#e0f7fa" },
1141
+ { primary: "#134e4a", secondary: "#1a6b6a", muted: "#80cbc4" },
1142
+ "#b2dfdb"
1143
+ );
1144
+ i(
1145
+ "Legal",
1146
+ {
1147
+ primary: "#1e293b",
1148
+ primaryHover: "#0f172a",
1149
+ success: "#059669",
1150
+ warning: "#d97706",
1151
+ error: "#dc2626",
1152
+ info: "#0284c7"
1153
+ },
1154
+ { primary: "#fafaf9", secondary: "#f5f5f4", tertiary: "#e7e5e4", hover: "#e7e5e4" },
1155
+ { primary: "#0f172a", secondary: "#44403c", muted: "#a8a29e" },
1156
+ "#d6d3d1"
1157
+ );
1158
+ i(
1159
+ "Tech Startup",
1160
+ {
1161
+ primary: "#7c3aed",
1162
+ primaryHover: "#6d28d9",
1163
+ success: "#10b981",
1164
+ warning: "#f59e0b",
1165
+ error: "#ef4444",
1166
+ info: "#06b6d4"
1167
+ },
1168
+ { primary: "#faf5ff", secondary: "#f3e8ff", tertiary: "#e9d5ff", hover: "#f3e8ff" },
1169
+ { primary: "#1e1b4b", secondary: "#4c1d95", muted: "#a78bfa" },
1170
+ "#c4b5fd"
1171
+ );
1172
+ i(
1173
+ "Enterprise",
1174
+ {
1175
+ primary: "#1e40af",
1176
+ primaryHover: "#1e3a8a",
1177
+ success: "#059669",
1178
+ warning: "#d97706",
1179
+ error: "#dc2626",
1180
+ info: "#0891b2"
1181
+ },
1182
+ { primary: "#eff6ff", secondary: "#dbeafe", tertiary: "#bfdbfe", hover: "#dbeafe" },
1183
+ { primary: "#1e3a5f", secondary: "#1e40af", muted: "#60a5fa" },
1184
+ "#93c5fd"
1185
+ );
1186
+ i(
1187
+ "Government",
1188
+ {
1189
+ primary: "#1d4ed8",
1190
+ primaryHover: "#1e40af",
1191
+ success: "#059669",
1192
+ warning: "#d97706",
1193
+ error: "#dc2626",
1194
+ info: "#0891b2"
1195
+ },
1196
+ { primary: "#f8fafc", secondary: "#f1f5f9", tertiary: "#e2e8f0", hover: "#e2e8f0" },
1197
+ { primary: "#0f172a", secondary: "#1e293b", muted: "#64748b" },
1198
+ "#cbd5e1"
1199
+ );
1200
+ i(
1201
+ "Education",
1202
+ {
1203
+ primary: "#059669",
1204
+ primaryHover: "#047857",
1205
+ success: "#16a34a",
1206
+ warning: "#f59e0b",
1207
+ error: "#ef4444",
1208
+ info: "#0891b2"
1209
+ },
1210
+ { primary: "#f0fdf9", secondary: "#d1fae5", tertiary: "#a7f3d0", hover: "#d1fae5" },
1211
+ { primary: "#064e3b", secondary: "#065f46", muted: "#6ee7b7" },
1212
+ "#a7f3d0"
1213
+ );
1214
+ i(
1215
+ "Real Estate",
1216
+ {
1217
+ primary: "#92400e",
1218
+ primaryHover: "#78350f",
1219
+ success: "#059669",
1220
+ warning: "#b45309",
1221
+ error: "#dc2626",
1222
+ info: "#0891b2"
1223
+ },
1224
+ { primary: "#fffbeb", secondary: "#fef3c7", tertiary: "#fde68a", hover: "#fef3c7" },
1225
+ { primary: "#422006", secondary: "#713f12", muted: "#d97706" },
1226
+ "#fcd34d"
1227
+ );
1228
+ i(
1229
+ "Nord",
1230
+ {
1231
+ primary: "#5e81ac",
1232
+ primaryHover: "#4c6b90",
1233
+ success: "#a3be8c",
1234
+ warning: "#ebcb8b",
1235
+ error: "#bf616a",
1236
+ info: "#88c0d0"
1237
+ },
1238
+ { primary: "#eceff4", secondary: "#e5e9f0", tertiary: "#d8dee9", hover: "#d8dee9" },
1239
+ { primary: "#2e3440", secondary: "#3b4252", muted: "#4c566a" },
1240
+ "#d8dee9"
1241
+ );
1242
+ m(
1243
+ "Dracula",
1244
+ {
1245
+ primary: "#bd93f9",
1246
+ primaryHover: "#9d79d9",
1247
+ success: "#50fa7b",
1248
+ warning: "#f1fa8c",
1249
+ error: "#ff5555",
1250
+ info: "#8be9fd"
1251
+ },
1252
+ { primary: "#282a36", secondary: "#343746", tertiary: "#44475a", hover: "#44475a" },
1253
+ { primary: "#f8f8f2", secondary: "#c0c0c0", muted: "#6272a4" },
1254
+ "#44475a"
1255
+ );
1256
+ i(
1257
+ "Solarized Light",
1258
+ {
1259
+ primary: "#268bd2",
1260
+ primaryHover: "#1a6da0",
1261
+ success: "#859900",
1262
+ warning: "#b58900",
1263
+ error: "#dc322f",
1264
+ info: "#2aa198"
1265
+ },
1266
+ { primary: "#fdf6e3", secondary: "#eee8d5", tertiary: "#e0dbc7", hover: "#eee8d5" },
1267
+ { primary: "#073642", secondary: "#586e75", muted: "#93a1a1" },
1268
+ "#eee8d5"
1269
+ );
1270
+ m(
1271
+ "Solarized Dark",
1272
+ {
1273
+ primary: "#268bd2",
1274
+ primaryHover: "#3d98db",
1275
+ success: "#859900",
1276
+ warning: "#b58900",
1277
+ error: "#dc322f",
1278
+ info: "#2aa198"
1279
+ },
1280
+ { primary: "#002b36", secondary: "#073642", tertiary: "#0a4858", hover: "#073642" },
1281
+ { primary: "#eee8d5", secondary: "#93a1a1", muted: "#586e75" },
1282
+ "#073642"
1283
+ );
1284
+ m(
1285
+ "Monokai",
1286
+ {
1287
+ primary: "#66d9ef",
1288
+ primaryHover: "#45c0d6",
1289
+ success: "#a6e22e",
1290
+ warning: "#e6db74",
1291
+ error: "#f92672",
1292
+ info: "#66d9ef"
1293
+ },
1294
+ { primary: "#272822", secondary: "#34352e", tertiary: "#3e3d32", hover: "#3e3d32" },
1295
+ { primary: "#f8f8f2", secondary: "#cfcfc2", muted: "#75715e" },
1296
+ "#3e3d32"
1297
+ );
1298
+ m(
1299
+ "One Dark",
1300
+ {
1301
+ primary: "#61afef",
1302
+ primaryHover: "#4b9ee0",
1303
+ success: "#98c379",
1304
+ warning: "#e5c07b",
1305
+ error: "#e06c75",
1306
+ info: "#56b6c2"
1307
+ },
1308
+ { primary: "#282c34", secondary: "#2c313a", tertiary: "#353b45", hover: "#353b45" },
1309
+ { primary: "#abb2bf", secondary: "#828997", muted: "#545862" },
1310
+ "#3e4452"
1311
+ );
1312
+ m(
1313
+ "Synthwave",
1314
+ {
1315
+ primary: "#ff7edb",
1316
+ primaryHover: "#e660c2",
1317
+ success: "#72f1b8",
1318
+ warning: "#fede5d",
1319
+ error: "#fe4450",
1320
+ info: "#36f9f6"
1321
+ },
1322
+ { primary: "#241b2f", secondary: "#2d2140", tertiary: "#362a50", hover: "#362a50" },
1323
+ { primary: "#f0e4fc", secondary: "#b4a0cc", muted: "#6c5c84" },
1324
+ "#4a3866"
1325
+ );
1326
+ i(
1327
+ "Vaporwave",
1328
+ {
1329
+ primary: "#ff71ce",
1330
+ primaryHover: "#e655b5",
1331
+ success: "#78dcca",
1332
+ warning: "#ffb86c",
1333
+ error: "#ff5555",
1334
+ info: "#76e8fc"
1335
+ },
1336
+ { primary: "#fce4f7", secondary: "#e8d0f4", tertiary: "#d4bcf0", hover: "#e8d0f4" },
1337
+ { primary: "#4a1a4e", secondary: "#7b3f7d", muted: "#c080c0" },
1338
+ "#d8a8e8"
1339
+ );
1340
+ m(
1341
+ "Terminal Green",
1342
+ {
1343
+ primary: "#00ff41",
1344
+ primaryHover: "#00cc34",
1345
+ success: "#00ff41",
1346
+ warning: "#ffff00",
1347
+ error: "#ff0000",
1348
+ info: "#00ffff"
1349
+ },
1350
+ { primary: "#0a0a0a", secondary: "#0d1a0d", tertiary: "#1a2e1a", hover: "#1a2e1a" },
1351
+ { primary: "#00ff41", secondary: "#00cc33", muted: "#008822" },
1352
+ "#003300"
1353
+ );
1354
+ i(
1355
+ "Sepia",
1356
+ {
1357
+ primary: "#8b6914",
1358
+ primaryHover: "#704f10",
1359
+ success: "#6b8e23",
1360
+ warning: "#cd853f",
1361
+ error: "#b22222",
1362
+ info: "#5f9ea0"
1363
+ },
1364
+ { primary: "#faf0e6", secondary: "#f5e6d3", tertiary: "#eddcc7", hover: "#f5e6d3" },
1365
+ { primary: "#3e2723", secondary: "#5d4037", muted: "#a1887f" },
1366
+ "#d7ccc8"
1367
+ );
1368
+ i(
1369
+ "Vintage",
1370
+ {
1371
+ primary: "#8d6e63",
1372
+ primaryHover: "#6d4c41",
1373
+ success: "#66bb6a",
1374
+ warning: "#ffb300",
1375
+ error: "#e53935",
1376
+ info: "#29b6f6"
1377
+ },
1378
+ { primary: "#efebe9", secondary: "#d7ccc8", tertiary: "#bcaaa4", hover: "#d7ccc8" },
1379
+ { primary: "#3e2723", secondary: "#5d4037", muted: "#a1887f" },
1380
+ "#bcaaa4"
1381
+ );
1382
+ m(
1383
+ "Cyberpunk",
1384
+ {
1385
+ primary: "#00f0ff",
1386
+ primaryHover: "#00c8d4",
1387
+ success: "#39ff14",
1388
+ warning: "#ffff00",
1389
+ error: "#ff003c",
1390
+ info: "#bf00ff"
1391
+ },
1392
+ { primary: "#0a0e17", secondary: "#131824", tertiary: "#1c2333", hover: "#1c2333" },
1393
+ { primary: "#e0fbfc", secondary: "#80d4dd", muted: "#3a6b72" },
1394
+ "#1c3a44"
1395
+ );
1396
+ m(
1397
+ "Neon",
1398
+ {
1399
+ primary: "#ff00ff",
1400
+ primaryHover: "#cc00cc",
1401
+ success: "#00ff00",
1402
+ warning: "#ffff00",
1403
+ error: "#ff0000",
1404
+ info: "#00ffff"
1405
+ },
1406
+ { primary: "#0d0d0d", secondary: "#1a1a1a", tertiary: "#262626", hover: "#262626" },
1407
+ { primary: "#ffffff", secondary: "#cccccc", muted: "#666666" },
1408
+ "#333333"
1409
+ );
1410
+ m(
1411
+ "Retrowave",
1412
+ {
1413
+ primary: "#f77fbe",
1414
+ primaryHover: "#e462a3",
1415
+ success: "#72f1b8",
1416
+ warning: "#ffe261",
1417
+ error: "#ff4444",
1418
+ info: "#79e8fb"
1419
+ },
1420
+ { primary: "#1b0a2e", secondary: "#261440", tertiary: "#321e52", hover: "#321e52" },
1421
+ { primary: "#ffe6f7", secondary: "#c9a0c9", muted: "#6b4c7a" },
1422
+ "#4a2d66"
1423
+ );
1424
+ i(
1425
+ "Christmas",
1426
+ {
1427
+ primary: "#c41e3a",
1428
+ primaryHover: "#a01830",
1429
+ success: "#228b22",
1430
+ warning: "#ffd700",
1431
+ error: "#dc2626",
1432
+ info: "#0891b2"
1433
+ },
1434
+ { primary: "#fef2f2", secondary: "#fde8e8", tertiary: "#f8d0d0", hover: "#fde8e8" },
1435
+ { primary: "#3b0a0a", secondary: "#7f1d1d", muted: "#dc6868" },
1436
+ "#e8a0a0"
1437
+ );
1438
+ m(
1439
+ "Halloween",
1440
+ {
1441
+ primary: "#ff6600",
1442
+ primaryHover: "#e05500",
1443
+ success: "#4ade80",
1444
+ warning: "#fbbf24",
1445
+ error: "#ff0000",
1446
+ info: "#9333ea"
1447
+ },
1448
+ { primary: "#1a0a00", secondary: "#2d1500", tertiary: "#402000", hover: "#402000" },
1449
+ { primary: "#ffedd5", secondary: "#fdba74", muted: "#9a5c28" },
1450
+ "#5c3400"
1451
+ );
1452
+ i(
1453
+ "Valentine",
1454
+ {
1455
+ primary: "#e11d48",
1456
+ primaryHover: "#be123c",
1457
+ success: "#10b981",
1458
+ warning: "#f59e0b",
1459
+ error: "#dc2626",
1460
+ info: "#ec4899"
1461
+ },
1462
+ { primary: "#fff1f2", secondary: "#ffe4e6", tertiary: "#fecdd3", hover: "#ffe4e6" },
1463
+ { primary: "#4c0519", secondary: "#881337", muted: "#f9a8d4" },
1464
+ "#fda4af"
1465
+ );
1466
+ i(
1467
+ "Easter",
1468
+ {
1469
+ primary: "#a78bfa",
1470
+ primaryHover: "#8b5cf6",
1471
+ success: "#4ade80",
1472
+ warning: "#fcd34d",
1473
+ error: "#fb7185",
1474
+ info: "#67e8f9"
1475
+ },
1476
+ { primary: "#fef9ff", secondary: "#f3e8ff", tertiary: "#e8d5ff", hover: "#f3e8ff" },
1477
+ { primary: "#581c87", secondary: "#6d28d9", muted: "#c4b5fd" },
1478
+ "#ddd6fe"
1479
+ );
1480
+ i(
1481
+ "Summer Beach",
1482
+ {
1483
+ primary: "#0ea5e9",
1484
+ primaryHover: "#0284c7",
1485
+ success: "#10b981",
1486
+ warning: "#f59e0b",
1487
+ error: "#ef4444",
1488
+ info: "#06b6d4"
1489
+ },
1490
+ { primary: "#fffbeb", secondary: "#fef3c7", tertiary: "#fde68a", hover: "#fef3c7" },
1491
+ { primary: "#0c4a6e", secondary: "#0369a1", muted: "#7dd3fc" },
1492
+ "#fcd34d"
1493
+ );
1494
+ i(
1495
+ "Winter Frost",
1496
+ {
1497
+ primary: "#3b82f6",
1498
+ primaryHover: "#2563eb",
1499
+ success: "#10b981",
1500
+ warning: "#f59e0b",
1501
+ error: "#ef4444",
1502
+ info: "#06b6d4"
1503
+ },
1504
+ { primary: "#f0f9ff", secondary: "#e0f2fe", tertiary: "#bae6fd", hover: "#e0f2fe" },
1505
+ { primary: "#1e3a5f", secondary: "#1e40af", muted: "#93c5fd" },
1506
+ "#bfdbfe"
1507
+ );
1508
+ i(
1509
+ "Cherry Blossom",
1510
+ {
1511
+ primary: "#ec4899",
1512
+ primaryHover: "#db2777",
1513
+ success: "#10b981",
1514
+ warning: "#f59e0b",
1515
+ error: "#ef4444",
1516
+ info: "#06b6d4"
1517
+ },
1518
+ { primary: "#fdf2f8", secondary: "#fce7f3", tertiary: "#fbcfe8", hover: "#fce7f3" },
1519
+ { primary: "#831843", secondary: "#9d174d", muted: "#f9a8d4" },
1520
+ "#fbcfe8"
1521
+ );
1522
+ i(
1523
+ "Harvest",
1524
+ {
1525
+ primary: "#b45309",
1526
+ primaryHover: "#92400e",
1527
+ success: "#4d7c0f",
1528
+ warning: "#a16207",
1529
+ error: "#b91c1c",
1530
+ info: "#0e7490"
1531
+ },
1532
+ { primary: "#fffbeb", secondary: "#fef3c7", tertiary: "#fde68a", hover: "#fef3c7" },
1533
+ { primary: "#451a03", secondary: "#78350f", muted: "#d97706" },
1534
+ "#fcd34d"
1535
+ );
1536
+ i(
1537
+ "Japanese Zen",
1538
+ {
1539
+ primary: "#6b7280",
1540
+ primaryHover: "#4b5563",
1541
+ success: "#6b8e23",
1542
+ warning: "#d4a017",
1543
+ error: "#c0392b",
1544
+ info: "#5f9ea0"
1545
+ },
1546
+ { primary: "#faf9f6", secondary: "#f0ece3", tertiary: "#e6e0d4", hover: "#f0ece3" },
1547
+ { primary: "#2c2c2c", secondary: "#5c5c5c", muted: "#a0998a" },
1548
+ "#d5cec0"
1549
+ );
1550
+ i(
1551
+ "Moroccan",
1552
+ {
1553
+ primary: "#c2410c",
1554
+ primaryHover: "#9a3412",
1555
+ success: "#15803d",
1556
+ warning: "#ca8a04",
1557
+ error: "#b91c1c",
1558
+ info: "#0e7490"
1559
+ },
1560
+ { primary: "#fffbf0", secondary: "#fef3e0", tertiary: "#fde6c4", hover: "#fef3e0" },
1561
+ { primary: "#3a1a00", secondary: "#7c2d12", muted: "#d97706" },
1562
+ "#f5d0a0"
1563
+ );
1564
+ i(
1565
+ "Scandinavian",
1566
+ {
1567
+ primary: "#4b5563",
1568
+ primaryHover: "#374151",
1569
+ success: "#059669",
1570
+ warning: "#d97706",
1571
+ error: "#dc2626",
1572
+ info: "#0891b2"
1573
+ },
1574
+ { primary: "#ffffff", secondary: "#f9fafb", tertiary: "#f3f4f6", hover: "#f3f4f6" },
1575
+ { primary: "#111827", secondary: "#374151", muted: "#9ca3af" },
1576
+ "#e5e7eb"
1577
+ );
1578
+ i(
1579
+ "Mediterranean",
1580
+ {
1581
+ primary: "#1e40af",
1582
+ primaryHover: "#1e3a8a",
1583
+ success: "#059669",
1584
+ warning: "#d97706",
1585
+ error: "#dc2626",
1586
+ info: "#0891b2"
1587
+ },
1588
+ { primary: "#eff6ff", secondary: "#dbeafe", tertiary: "#bfdbfe", hover: "#dbeafe" },
1589
+ { primary: "#1e3a5f", secondary: "#2563eb", muted: "#93c5fd" },
1590
+ "#bfdbfe"
1591
+ );
1592
+ i(
1593
+ "Chinese New Year",
1594
+ {
1595
+ primary: "#dc2626",
1596
+ primaryHover: "#b91c1c",
1597
+ success: "#16a34a",
1598
+ warning: "#d4a017",
1599
+ error: "#ef4444",
1600
+ info: "#0891b2"
1601
+ },
1602
+ { primary: "#fef2f2", secondary: "#fee2e2", tertiary: "#fecaca", hover: "#fee2e2" },
1603
+ { primary: "#450a0a", secondary: "#991b1b", muted: "#f87171" },
1604
+ "#fca5a5"
1605
+ );
1606
+ i(
1607
+ "Indian Festive",
1608
+ {
1609
+ primary: "#d97706",
1610
+ primaryHover: "#b45309",
1611
+ success: "#16a34a",
1612
+ warning: "#ca8a04",
1613
+ error: "#dc2626",
1614
+ info: "#7c3aed"
1615
+ },
1616
+ { primary: "#fffbeb", secondary: "#fef3c7", tertiary: "#fde68a", hover: "#fef3c7" },
1617
+ { primary: "#451a03", secondary: "#92400e", muted: "#f59e0b" },
1618
+ "#fcd34d"
1619
+ );
1620
+ i(
1621
+ "Brazilian Carnival",
1622
+ {
1623
+ primary: "#16a34a",
1624
+ primaryHover: "#15803d",
1625
+ success: "#22c55e",
1626
+ warning: "#facc15",
1627
+ error: "#ef4444",
1628
+ info: "#0ea5e9"
1629
+ },
1630
+ { primary: "#f0fdf4", secondary: "#dcfce7", tertiary: "#bbf7d0", hover: "#dcfce7" },
1631
+ { primary: "#052e16", secondary: "#166534", muted: "#4ade80" },
1632
+ "#86efac"
1633
+ );
1634
+ i(
1635
+ "African Earth",
1636
+ {
1637
+ primary: "#92400e",
1638
+ primaryHover: "#78350f",
1639
+ success: "#4d7c0f",
1640
+ warning: "#a16207",
1641
+ error: "#b91c1c",
1642
+ info: "#0e7490"
1643
+ },
1644
+ { primary: "#faf5f0", secondary: "#f0e6d6", tertiary: "#e6d5bb", hover: "#f0e6d6" },
1645
+ { primary: "#2b1a0e", secondary: "#5c3d1e", muted: "#a08060" },
1646
+ "#d4b896"
1647
+ );
1648
+ m(
1649
+ "High Contrast Dark",
1650
+ {
1651
+ primary: "#ffff00",
1652
+ primaryHover: "#cccc00",
1653
+ success: "#00ff00",
1654
+ warning: "#ff8c00",
1655
+ error: "#ff0000",
1656
+ info: "#00ffff"
1657
+ },
1658
+ { primary: "#000000", secondary: "#1a1a1a", tertiary: "#333333", hover: "#333333" },
1659
+ { primary: "#ffffff", secondary: "#ffffff", muted: "#cccccc" },
1660
+ "#ffffff"
1661
+ );
1662
+ i(
1663
+ "Monochrome",
1664
+ {
1665
+ primary: "#404040",
1666
+ primaryHover: "#262626",
1667
+ success: "#4d7c0f",
1668
+ warning: "#a16207",
1669
+ error: "#b91c1c",
1670
+ info: "#0e7490"
1671
+ },
1672
+ { primary: "#fafafa", secondary: "#f0f0f0", tertiary: "#e0e0e0", hover: "#e0e0e0" },
1673
+ { primary: "#1a1a1a", secondary: "#404040", muted: "#808080" },
1674
+ "#c0c0c0"
1675
+ );
1676
+ i(
1677
+ "Enhanced Contrast",
1678
+ {
1679
+ primary: "#0050b3",
1680
+ primaryHover: "#003d8c",
1681
+ success: "#006400",
1682
+ warning: "#cc7000",
1683
+ error: "#cc0000",
1684
+ info: "#006680"
1685
+ },
1686
+ { primary: "#ffffff", secondary: "#f5f5f5", tertiary: "#ebebeb", hover: "#ebebeb" },
1687
+ { primary: "#000000", secondary: "#1a1a1a", muted: "#595959" },
1688
+ "#8c8c8c"
1689
+ );
1690
+ i(
1691
+ "Minimalist",
1692
+ {
1693
+ primary: "#18181b",
1694
+ primaryHover: "#27272a",
1695
+ success: "#22c55e",
1696
+ warning: "#eab308",
1697
+ error: "#ef4444",
1698
+ info: "#3b82f6"
1699
+ },
1700
+ { primary: "#ffffff", secondary: "#fafafa", tertiary: "#f5f5f5", hover: "#f5f5f5" },
1701
+ { primary: "#0a0a0a", secondary: "#404040", muted: "#a3a3a3" },
1702
+ "#e5e5e5"
1703
+ );
1704
+ m(
1705
+ "Warm Dark",
1706
+ {
1707
+ primary: "#f59e0b",
1708
+ primaryHover: "#d97706",
1709
+ success: "#10b981",
1710
+ warning: "#fbbf24",
1711
+ error: "#f87171",
1712
+ info: "#38bdf8"
1713
+ },
1714
+ { primary: "#1c1917", secondary: "#292524", tertiary: "#44403c", hover: "#44403c" },
1715
+ { primary: "#fafaf9", secondary: "#d6d3d1", muted: "#78716c" },
1716
+ "#57534e"
1717
+ );
1718
+ m(
1719
+ "Soft Dark",
1720
+ {
1721
+ primary: "#a78bfa",
1722
+ primaryHover: "#8b5cf6",
1723
+ success: "#34d399",
1724
+ warning: "#fcd34d",
1725
+ error: "#fb7185",
1726
+ info: "#67e8f9"
1727
+ },
1728
+ { primary: "#1e1e2e", secondary: "#262637", tertiary: "#313147", hover: "#313147" },
1729
+ { primary: "#e8e8f0", secondary: "#a0a0b8", muted: "#5c5c74" },
1730
+ "#3e3e58"
1731
+ );
1732
+ i(
1733
+ "Coffee",
1734
+ {
1735
+ primary: "#6f4e37",
1736
+ primaryHover: "#5c3d28",
1737
+ success: "#4d7c0f",
1738
+ warning: "#a16207",
1739
+ error: "#b91c1c",
1740
+ info: "#0e7490"
1741
+ },
1742
+ { primary: "#faf6f1", secondary: "#f0e8dc", tertiary: "#e6d8c6", hover: "#f0e8dc" },
1743
+ { primary: "#2c1a0e", secondary: "#5c3d28", muted: "#a08868" },
1744
+ "#d4c4a8"
1745
+ );
1746
+ i(
1747
+ "Wine",
1748
+ {
1749
+ primary: "#7f1d1d",
1750
+ primaryHover: "#641717",
1751
+ success: "#059669",
1752
+ warning: "#d97706",
1753
+ error: "#dc2626",
1754
+ info: "#0891b2"
1755
+ },
1756
+ { primary: "#fef2f2", secondary: "#fde8e8", tertiary: "#f8d0d0", hover: "#fde8e8" },
1757
+ { primary: "#3b0a0a", secondary: "#7f1d1d", muted: "#dc6868" },
1758
+ "#e8a0a0"
1759
+ );
1760
+ b(null);
1761
+ const _e = [
1762
+ {
1763
+ target: ".nice-etl-builder",
1764
+ titleKey: "tutorial.etlBuilder.intro.title",
1765
+ title: "ETL builder",
1766
+ contentKey: "tutorial.etlBuilder.intro.content",
1767
+ content: "Wire sources → transformations → destinations into a pipeline, switch the views, then run it and save the configuration.",
1768
+ placement: "auto"
1769
+ }
1770
+ ], xe = {
1390
1771
  id: "",
1391
1772
  name: "New Pipeline",
1392
1773
  sources: [],
1393
1774
  transformations: [],
1394
1775
  destinations: [],
1395
1776
  version: 1
1396
- }, R = [
1777
+ }, P = [
1397
1778
  { type: "filter", label: "Filter", icon: "🔍" },
1398
1779
  { type: "map", label: "Map", icon: "🔄" },
1399
1780
  { type: "aggregate", label: "Aggregate", icon: "∑" },
@@ -1411,298 +1792,300 @@ const le = {
1411
1792
  { type: "cleanse", label: "Cleanse", icon: "🧹" },
1412
1793
  { type: "custom", label: "Custom", icon: "ƒ" }
1413
1794
  ];
1414
- function me({
1415
- pipeline: i,
1416
- dataSources: l = [],
1417
- onChange: o,
1418
- onRun: s,
1419
- onSchedule: d,
1420
- className: m = ""
1795
+ function De({
1796
+ pipeline: a,
1797
+ dataSources: r = [],
1798
+ onChange: c,
1799
+ onRun: t,
1800
+ onSchedule: y,
1801
+ className: u = "",
1802
+ tutorial: o
1421
1803
  }) {
1422
- const [a, y] = S(
1423
- i || { ...le, id: crypto.randomUUID() }
1424
- ), [r, v] = S(null), [_, p] = S("design"), [f, M] = S(!1), [T, L] = S([]), [b, D] = S(null), z = q(null), C = w(
1425
- (c) => {
1426
- y((N) => {
1427
- const x = c(N);
1428
- return o == null || o(x), x;
1804
+ const [p, S] = w(
1805
+ a || { ...xe, id: crypto.randomUUID() }
1806
+ ), [f, v] = w(null), [_, C] = w("design"), [T, k] = w(!1), [J, G] = w([]), [D, E] = w(null), Z = ie(null), h = x(
1807
+ (n) => {
1808
+ S((s) => {
1809
+ const l = n(s);
1810
+ return c == null || c(l), l;
1429
1811
  });
1430
1812
  },
1431
- [o]
1432
- ), E = w(
1433
- (c) => {
1434
- var x;
1435
- const N = {
1813
+ [c]
1814
+ ), I = x(
1815
+ (n) => {
1816
+ var l;
1817
+ const s = {
1436
1818
  id: crypto.randomUUID(),
1437
- type: c.type,
1438
- name: c.name,
1439
- config: c.config,
1440
- schema: (x = c.schema) == null ? void 0 : x.tables[0]
1819
+ type: n.type,
1820
+ name: n.name,
1821
+ config: n.config,
1822
+ schema: (l = n.schema) == null ? void 0 : l.tables[0]
1441
1823
  };
1442
- C((I) => ({
1443
- ...I,
1444
- sources: [...I.sources, N]
1824
+ h((g) => ({
1825
+ ...g,
1826
+ sources: [...g.sources, s]
1445
1827
  }));
1446
1828
  },
1447
- [C]
1448
- ), P = w(
1449
- (c, N) => {
1450
- var I;
1451
- const x = {
1829
+ [h]
1830
+ ), z = x(
1831
+ (n, s) => {
1832
+ var g;
1833
+ const l = {
1452
1834
  id: crypto.randomUUID(),
1453
- type: c,
1454
- name: ((I = R.find(($) => $.type === c)) == null ? void 0 : I.label) || c,
1835
+ type: n,
1836
+ name: ((g = P.find((R) => R.type === n)) == null ? void 0 : g.label) || n,
1455
1837
  input: [],
1456
1838
  output: crypto.randomUUID(),
1457
- config: re(c)
1839
+ config: He(n)
1458
1840
  };
1459
- C(($) => ({
1460
- ...$,
1461
- transformations: [...$.transformations, x]
1462
- })), v({ type: "transformation", id: x.id });
1841
+ h((R) => ({
1842
+ ...R,
1843
+ transformations: [...R.transformations, l]
1844
+ })), v({ type: "transformation", id: l.id });
1463
1845
  },
1464
- [C]
1465
- ), U = w(() => {
1466
- const c = {
1846
+ [h]
1847
+ ), X = x(() => {
1848
+ const n = {
1467
1849
  id: crypto.randomUUID(),
1468
1850
  type: "database",
1469
1851
  name: "New Destination",
1470
1852
  config: {},
1471
1853
  writeMode: "append"
1472
1854
  };
1473
- C((N) => ({
1474
- ...N,
1475
- destinations: [...N.destinations, c]
1476
- })), v({ type: "destination", id: c.id });
1477
- }, [C]), u = w(
1478
- (c, N) => {
1479
- C((x) => {
1480
- switch (c) {
1855
+ h((s) => ({
1856
+ ...s,
1857
+ destinations: [...s.destinations, n]
1858
+ })), v({ type: "destination", id: n.id });
1859
+ }, [h]), A = x(
1860
+ (n, s) => {
1861
+ h((l) => {
1862
+ switch (n) {
1481
1863
  case "source":
1482
- return { ...x, sources: x.sources.filter((I) => I.id !== N) };
1864
+ return { ...l, sources: l.sources.filter((g) => g.id !== s) };
1483
1865
  case "transformation":
1484
1866
  return {
1485
- ...x,
1486
- transformations: x.transformations.filter((I) => I.id !== N)
1867
+ ...l,
1868
+ transformations: l.transformations.filter((g) => g.id !== s)
1487
1869
  };
1488
1870
  case "destination":
1489
- return { ...x, destinations: x.destinations.filter((I) => I.id !== N) };
1871
+ return { ...l, destinations: l.destinations.filter((g) => g.id !== s) };
1490
1872
  default:
1491
- return x;
1873
+ return l;
1492
1874
  }
1493
1875
  }), v(null);
1494
1876
  },
1495
- [C]
1496
- ), n = w(async () => {
1497
- if (s) {
1498
- M(!0);
1877
+ [h]
1878
+ ), Y = x(async () => {
1879
+ if (t) {
1880
+ k(!0);
1499
1881
  try {
1500
- const c = await s(a);
1501
- L((N) => [c, ...N].slice(0, 50));
1882
+ const n = await t(p);
1883
+ G((s) => [n, ...s].slice(0, 50));
1502
1884
  } finally {
1503
- M(!1);
1885
+ k(!1);
1504
1886
  }
1505
1887
  }
1506
- }, [a, s]), h = w(
1507
- (c) => {
1508
- C((N) => ({ ...N, schedule: c })), d == null || d(a, c);
1888
+ }, [p, t]), q = x(
1889
+ (n) => {
1890
+ h((s) => ({ ...s, schedule: n })), y == null || y(p, n);
1509
1891
  },
1510
- [a, C, d]
1511
- ), g = w(
1512
- (c) => {
1513
- if (c.preventDefault(), !!b) {
1514
- if (b.startsWith("transform:")) {
1515
- const N = b.replace("transform:", "");
1516
- P(N);
1892
+ [p, h, y]
1893
+ ), Q = x(
1894
+ (n) => {
1895
+ if (n.preventDefault(), !!D) {
1896
+ if (D.startsWith("transform:")) {
1897
+ const s = D.replace("transform:", "");
1898
+ z(s);
1517
1899
  }
1518
- D(null);
1900
+ E(null);
1519
1901
  }
1520
1902
  },
1521
- [b, P]
1522
- ), k = () => {
1523
- if (!r)
1903
+ [D, z]
1904
+ ), ee = () => {
1905
+ if (!f)
1524
1906
  return null;
1525
- switch (r.type) {
1907
+ switch (f.type) {
1526
1908
  case "source":
1527
- return a.sources.find((c) => c.id === r.id);
1909
+ return p.sources.find((n) => n.id === f.id);
1528
1910
  case "transformation":
1529
- return a.transformations.find((c) => c.id === r.id);
1911
+ return p.transformations.find((n) => n.id === f.id);
1530
1912
  case "destination":
1531
- return a.destinations.find((c) => c.id === r.id);
1913
+ return p.destinations.find((n) => n.id === f.id);
1532
1914
  default:
1533
1915
  return null;
1534
1916
  }
1535
1917
  };
1536
- return /* @__PURE__ */ t("div", { className: `nice-etl-builder ${m}`, children: [
1537
- /* @__PURE__ */ t("div", { className: "nice-etl-builder__toolbar", children: [
1918
+ return /* @__PURE__ */ d("div", { className: `nice-etl-builder ${u}`, children: [
1919
+ /* @__PURE__ */ d("div", { className: "nice-etl-builder__toolbar", children: [
1538
1920
  /* @__PURE__ */ e(
1539
1921
  "input",
1540
1922
  {
1541
1923
  type: "text",
1542
- value: a.name,
1543
- onChange: (c) => C((N) => ({ ...N, name: c.target.value })),
1924
+ value: p.name,
1925
+ onChange: (n) => h((s) => ({ ...s, name: n.target.value })),
1544
1926
  className: "nice-etl-builder__name-input"
1545
1927
  }
1546
1928
  ),
1547
- /* @__PURE__ */ e("div", { className: "nice-etl-builder__tabs", children: ["design", "code", "schedule", "history"].map((c) => /* @__PURE__ */ e(
1929
+ /* @__PURE__ */ e("div", { className: "nice-etl-builder__tabs", children: ["design", "code", "schedule", "history"].map((n) => /* @__PURE__ */ e(
1548
1930
  "button",
1549
1931
  {
1550
- className: `nice-etl-builder__tab ${_ === c ? "nice-etl-builder__tab--active" : ""}`,
1551
- onClick: () => p(c),
1552
- children: c.charAt(0).toUpperCase() + c.slice(1)
1932
+ className: `nice-etl-builder__tab ${_ === n ? "nice-etl-builder__tab--active" : ""}`,
1933
+ onClick: () => C(n),
1934
+ children: n.charAt(0).toUpperCase() + n.slice(1)
1553
1935
  },
1554
- c
1936
+ n
1555
1937
  )) }),
1556
- /* @__PURE__ */ t("div", { className: "nice-etl-builder__actions", children: [
1557
- /* @__PURE__ */ e("button", { onClick: n, disabled: f, className: "nice-etl-builder__run-btn", children: f ? "⏳ Running..." : "▶ Run" }),
1558
- /* @__PURE__ */ e("button", { className: "nice-etl-builder__save-btn", children: "💾 Save" })
1938
+ /* @__PURE__ */ d("div", { className: "nice-etl-builder__actions", children: [
1939
+ /* @__PURE__ */ e("button", { onClick: Y, disabled: T, className: "nice-etl-builder__run-btn", children: T ? "⏳ Running..." : "▶ Run" }),
1940
+ /* @__PURE__ */ e("button", { className: "nice-etl-builder__save-btn", children: "💾 Save" }),
1941
+ /* @__PURE__ */ e(he, { steps: be(o, _e) })
1559
1942
  ] })
1560
1943
  ] }),
1561
- /* @__PURE__ */ t("div", { className: "nice-etl-builder__main", children: [
1562
- _ === "design" && /* @__PURE__ */ t("div", { className: "nice-etl-builder__palette", children: [
1944
+ /* @__PURE__ */ d("div", { className: "nice-etl-builder__main", children: [
1945
+ _ === "design" && /* @__PURE__ */ d("div", { className: "nice-etl-builder__palette", children: [
1563
1946
  /* @__PURE__ */ e("h4", { children: "Sources" }),
1564
- l.map((c) => /* @__PURE__ */ t(
1947
+ r.map((n) => /* @__PURE__ */ d(
1565
1948
  "div",
1566
1949
  {
1567
1950
  className: "nice-etl-builder__palette-item",
1568
- onClick: () => E(c),
1951
+ onClick: () => I(n),
1569
1952
  children: [
1570
1953
  /* @__PURE__ */ e("span", { className: "nice-etl-builder__palette-icon", children: "🗄️" }),
1571
- /* @__PURE__ */ e("span", { children: c.name })
1954
+ /* @__PURE__ */ e("span", { children: n.name })
1572
1955
  ]
1573
1956
  },
1574
- c.id
1957
+ n.id
1575
1958
  )),
1576
1959
  /* @__PURE__ */ e(
1577
1960
  "button",
1578
1961
  {
1579
- onClick: () => E({ id: "", name: "New Source", type: "database", config: {} }),
1962
+ onClick: () => I({ id: "", name: "New Source", type: "database", config: {} }),
1580
1963
  children: "+ Add Source"
1581
1964
  }
1582
1965
  ),
1583
1966
  /* @__PURE__ */ e("h4", { children: "Transformations" }),
1584
- R.map((c) => /* @__PURE__ */ t(
1967
+ P.map((n) => /* @__PURE__ */ d(
1585
1968
  "div",
1586
1969
  {
1587
1970
  className: "nice-etl-builder__palette-item",
1588
1971
  draggable: !0,
1589
- onDragStart: () => D(`transform:${c.type}`),
1590
- onDragEnd: () => D(null),
1972
+ onDragStart: () => E(`transform:${n.type}`),
1973
+ onDragEnd: () => E(null),
1591
1974
  children: [
1592
- /* @__PURE__ */ e("span", { className: "nice-etl-builder__palette-icon", children: c.icon }),
1593
- /* @__PURE__ */ e("span", { children: c.label })
1975
+ /* @__PURE__ */ e("span", { className: "nice-etl-builder__palette-icon", children: n.icon }),
1976
+ /* @__PURE__ */ e("span", { children: n.label })
1594
1977
  ]
1595
1978
  },
1596
- c.type
1979
+ n.type
1597
1980
  )),
1598
1981
  /* @__PURE__ */ e("h4", { children: "Destinations" }),
1599
- /* @__PURE__ */ e("button", { onClick: U, children: "+ Add Destination" })
1982
+ /* @__PURE__ */ e("button", { onClick: X, children: "+ Add Destination" })
1600
1983
  ] }),
1601
1984
  _ === "design" && /* @__PURE__ */ e(
1602
1985
  "div",
1603
1986
  {
1604
- ref: z,
1987
+ ref: Z,
1605
1988
  className: "nice-etl-builder__canvas",
1606
- onDragOver: (c) => c.preventDefault(),
1607
- onDrop: g,
1989
+ onDragOver: (n) => n.preventDefault(),
1990
+ onDrop: Q,
1608
1991
  onClick: () => v(null),
1609
- children: /* @__PURE__ */ t("div", { className: "nice-etl-builder__flow", children: [
1610
- /* @__PURE__ */ t("div", { className: "nice-etl-builder__column", children: [
1992
+ children: /* @__PURE__ */ d("div", { className: "nice-etl-builder__flow", children: [
1993
+ /* @__PURE__ */ d("div", { className: "nice-etl-builder__column", children: [
1611
1994
  /* @__PURE__ */ e("h5", { children: "Sources" }),
1612
- a.sources.map((c) => /* @__PURE__ */ e(
1613
- A,
1995
+ p.sources.map((n) => /* @__PURE__ */ e(
1996
+ L,
1614
1997
  {
1615
- node: c,
1998
+ node: n,
1616
1999
  nodeType: "source",
1617
2000
  icon: "🗄️",
1618
- isSelected: (r == null ? void 0 : r.id) === c.id,
1619
- onSelect: () => v({ type: "source", id: c.id }),
1620
- onDelete: () => u("source", c.id)
2001
+ isSelected: (f == null ? void 0 : f.id) === n.id,
2002
+ onSelect: () => v({ type: "source", id: n.id }),
2003
+ onDelete: () => A("source", n.id)
1621
2004
  },
1622
- c.id
2005
+ n.id
1623
2006
  ))
1624
2007
  ] }),
1625
2008
  /* @__PURE__ */ e("div", { className: "nice-etl-builder__arrow", children: "→" }),
1626
- /* @__PURE__ */ t("div", { className: "nice-etl-builder__column nice-etl-builder__column--transforms", children: [
2009
+ /* @__PURE__ */ d("div", { className: "nice-etl-builder__column nice-etl-builder__column--transforms", children: [
1627
2010
  /* @__PURE__ */ e("h5", { children: "Transformations" }),
1628
- a.transformations.map((c) => {
1629
- const N = R.find((x) => x.type === c.type);
2011
+ p.transformations.map((n) => {
2012
+ const s = P.find((l) => l.type === n.type);
1630
2013
  return /* @__PURE__ */ e(
1631
- A,
2014
+ L,
1632
2015
  {
1633
- node: c,
2016
+ node: n,
1634
2017
  nodeType: "transformation",
1635
- icon: (N == null ? void 0 : N.icon) || "🔄",
1636
- isSelected: (r == null ? void 0 : r.id) === c.id,
1637
- onSelect: () => v({ type: "transformation", id: c.id }),
1638
- onDelete: () => u("transformation", c.id)
2018
+ icon: (s == null ? void 0 : s.icon) || "🔄",
2019
+ isSelected: (f == null ? void 0 : f.id) === n.id,
2020
+ onSelect: () => v({ type: "transformation", id: n.id }),
2021
+ onDelete: () => A("transformation", n.id)
1639
2022
  },
1640
- c.id
2023
+ n.id
1641
2024
  );
1642
2025
  }),
1643
- a.transformations.length === 0 && /* @__PURE__ */ e("div", { className: "nice-etl-builder__empty-column", children: "Drag transformations here" })
2026
+ p.transformations.length === 0 && /* @__PURE__ */ e("div", { className: "nice-etl-builder__empty-column", children: "Drag transformations here" })
1644
2027
  ] }),
1645
2028
  /* @__PURE__ */ e("div", { className: "nice-etl-builder__arrow", children: "→" }),
1646
- /* @__PURE__ */ t("div", { className: "nice-etl-builder__column", children: [
2029
+ /* @__PURE__ */ d("div", { className: "nice-etl-builder__column", children: [
1647
2030
  /* @__PURE__ */ e("h5", { children: "Destinations" }),
1648
- a.destinations.map((c) => /* @__PURE__ */ e(
1649
- A,
2031
+ p.destinations.map((n) => /* @__PURE__ */ e(
2032
+ L,
1650
2033
  {
1651
- node: c,
2034
+ node: n,
1652
2035
  nodeType: "destination",
1653
2036
  icon: "📥",
1654
- isSelected: (r == null ? void 0 : r.id) === c.id,
1655
- onSelect: () => v({ type: "destination", id: c.id }),
1656
- onDelete: () => u("destination", c.id)
2037
+ isSelected: (f == null ? void 0 : f.id) === n.id,
2038
+ onSelect: () => v({ type: "destination", id: n.id }),
2039
+ onDelete: () => A("destination", n.id)
1657
2040
  },
1658
- c.id
2041
+ n.id
1659
2042
  ))
1660
2043
  ] })
1661
2044
  ] })
1662
2045
  }
1663
2046
  ),
1664
- _ === "code" && /* @__PURE__ */ e("div", { className: "nice-etl-builder__code-view", children: /* @__PURE__ */ e("pre", { children: JSON.stringify(a, null, 2) }) }),
2047
+ _ === "code" && /* @__PURE__ */ e("div", { className: "nice-etl-builder__code-view", children: /* @__PURE__ */ e("pre", { children: JSON.stringify(p, null, 2) }) }),
1665
2048
  _ === "schedule" && /* @__PURE__ */ e(
1666
- oe,
2049
+ Se,
1667
2050
  {
1668
- schedule: a.schedule,
1669
- monitoring: a.monitoring,
1670
- onChange: h
2051
+ schedule: p.schedule,
2052
+ monitoring: p.monitoring,
2053
+ onChange: q
1671
2054
  }
1672
2055
  ),
1673
- _ === "history" && /* @__PURE__ */ e(de, { runs: T }),
1674
- r && _ === "design" && /* @__PURE__ */ e(
1675
- ce,
2056
+ _ === "history" && /* @__PURE__ */ e(Ce, { runs: J }),
2057
+ f && _ === "design" && /* @__PURE__ */ e(
2058
+ Ne,
1676
2059
  {
1677
- nodeType: r.type,
1678
- node: k() ?? null,
1679
- dataSources: l,
1680
- onChange: (c) => {
1681
- C((N) => {
1682
- switch (r.type) {
2060
+ nodeType: f.type,
2061
+ node: ee() ?? null,
2062
+ dataSources: r,
2063
+ onChange: (n) => {
2064
+ h((s) => {
2065
+ switch (f.type) {
1683
2066
  case "source":
1684
2067
  return {
1685
- ...N,
1686
- sources: N.sources.map(
1687
- (x) => x.id === r.id ? { ...x, ...c } : x
2068
+ ...s,
2069
+ sources: s.sources.map(
2070
+ (l) => l.id === f.id ? { ...l, ...n } : l
1688
2071
  )
1689
2072
  };
1690
2073
  case "transformation":
1691
2074
  return {
1692
- ...N,
1693
- transformations: N.transformations.map(
1694
- (x) => x.id === r.id ? { ...x, ...c } : x
2075
+ ...s,
2076
+ transformations: s.transformations.map(
2077
+ (l) => l.id === f.id ? { ...l, ...n } : l
1695
2078
  )
1696
2079
  };
1697
2080
  case "destination":
1698
2081
  return {
1699
- ...N,
1700
- destinations: N.destinations.map(
1701
- (x) => x.id === r.id ? { ...x, ...c } : x
2082
+ ...s,
2083
+ destinations: s.destinations.map(
2084
+ (l) => l.id === f.id ? { ...l, ...n } : l
1702
2085
  )
1703
2086
  };
1704
2087
  default:
1705
- return N;
2088
+ return s;
1706
2089
  }
1707
2090
  });
1708
2091
  },
@@ -1712,8 +2095,8 @@ function me({
1712
2095
  ] })
1713
2096
  ] });
1714
2097
  }
1715
- function re(i) {
1716
- switch (i) {
2098
+ function He(a) {
2099
+ switch (a) {
1717
2100
  case "filter":
1718
2101
  return { condition: "" };
1719
2102
  case "map":
@@ -1745,30 +2128,30 @@ return data;` };
1745
2128
  return {};
1746
2129
  }
1747
2130
  }
1748
- function A({
1749
- node: i,
1750
- nodeType: l,
1751
- icon: o,
1752
- isSelected: s,
1753
- onSelect: d,
1754
- onDelete: m
2131
+ function L({
2132
+ node: a,
2133
+ nodeType: r,
2134
+ icon: c,
2135
+ isSelected: t,
2136
+ onSelect: y,
2137
+ onDelete: u
1755
2138
  }) {
1756
- return /* @__PURE__ */ t(
2139
+ return /* @__PURE__ */ d(
1757
2140
  "div",
1758
2141
  {
1759
- className: `nice-etl-builder__node nice-etl-builder__node--${l} ${s ? "nice-etl-builder__node--selected" : ""}`,
1760
- onClick: (a) => {
1761
- a.stopPropagation(), d();
2142
+ className: `nice-etl-builder__node nice-etl-builder__node--${r} ${t ? "nice-etl-builder__node--selected" : ""}`,
2143
+ onClick: (o) => {
2144
+ o.stopPropagation(), y();
1762
2145
  },
1763
2146
  children: [
1764
- /* @__PURE__ */ e("span", { className: "nice-etl-builder__node-icon", children: o }),
1765
- /* @__PURE__ */ e("span", { className: "nice-etl-builder__node-name", children: i.name }),
2147
+ /* @__PURE__ */ e("span", { className: "nice-etl-builder__node-icon", children: c }),
2148
+ /* @__PURE__ */ e("span", { className: "nice-etl-builder__node-name", children: a.name }),
1766
2149
  /* @__PURE__ */ e(
1767
2150
  "button",
1768
2151
  {
1769
2152
  className: "nice-etl-builder__node-delete",
1770
- onClick: (a) => {
1771
- a.stopPropagation(), m();
2153
+ onClick: (o) => {
2154
+ o.stopPropagation(), u();
1772
2155
  },
1773
2156
  children: "×"
1774
2157
  }
@@ -1777,42 +2160,42 @@ function A({
1777
2160
  }
1778
2161
  );
1779
2162
  }
1780
- function ce({
1781
- nodeType: i,
1782
- node: l,
1783
- dataSources: o,
1784
- onChange: s,
1785
- onClose: d
2163
+ function Ne({
2164
+ nodeType: a,
2165
+ node: r,
2166
+ dataSources: c,
2167
+ onChange: t,
2168
+ onClose: y
1786
2169
  }) {
1787
- var m;
1788
- return l ? /* @__PURE__ */ t("div", { className: "nice-etl-builder__properties", children: [
1789
- /* @__PURE__ */ t("div", { className: "nice-etl-builder__properties-header", children: [
1790
- /* @__PURE__ */ t("h4", { children: [
1791
- i.charAt(0).toUpperCase() + i.slice(1),
2170
+ var u;
2171
+ return r ? /* @__PURE__ */ d("div", { className: "nice-etl-builder__properties", children: [
2172
+ /* @__PURE__ */ d("div", { className: "nice-etl-builder__properties-header", children: [
2173
+ /* @__PURE__ */ d("h4", { children: [
2174
+ a.charAt(0).toUpperCase() + a.slice(1),
1792
2175
  " Properties"
1793
2176
  ] }),
1794
- /* @__PURE__ */ e("button", { onClick: d, children: "×" })
2177
+ /* @__PURE__ */ e("button", { onClick: y, children: "×" })
1795
2178
  ] }),
1796
- /* @__PURE__ */ t("div", { className: "nice-etl-builder__properties-content", children: [
1797
- /* @__PURE__ */ t("div", { className: "nice-etl-builder__field", children: [
2179
+ /* @__PURE__ */ d("div", { className: "nice-etl-builder__properties-content", children: [
2180
+ /* @__PURE__ */ d("div", { className: "nice-etl-builder__field", children: [
1798
2181
  /* @__PURE__ */ e("label", { children: "Name" }),
1799
2182
  /* @__PURE__ */ e(
1800
2183
  "input",
1801
2184
  {
1802
2185
  type: "text",
1803
- value: l.name,
1804
- onChange: (a) => s({ name: a.target.value })
2186
+ value: r.name,
2187
+ onChange: (o) => t({ name: o.target.value })
1805
2188
  }
1806
2189
  )
1807
2190
  ] }),
1808
- i === "source" && /* @__PURE__ */ t(F, { children: [
1809
- /* @__PURE__ */ t("div", { className: "nice-etl-builder__field", children: [
2191
+ a === "source" && /* @__PURE__ */ d(N, { children: [
2192
+ /* @__PURE__ */ d("div", { className: "nice-etl-builder__field", children: [
1810
2193
  /* @__PURE__ */ e("label", { children: "Type" }),
1811
- /* @__PURE__ */ t(
2194
+ /* @__PURE__ */ d(
1812
2195
  "select",
1813
2196
  {
1814
- value: l.type,
1815
- onChange: (a) => s({ type: a.target.value }),
2197
+ value: r.type,
2198
+ onChange: (o) => t({ type: o.target.value }),
1816
2199
  children: [
1817
2200
  /* @__PURE__ */ e("option", { value: "database", children: "Database" }),
1818
2201
  /* @__PURE__ */ e("option", { value: "api", children: "API" }),
@@ -1822,19 +2205,19 @@ function ce({
1822
2205
  }
1823
2206
  )
1824
2207
  ] }),
1825
- /* @__PURE__ */ e("div", { className: "nice-etl-builder__field", children: /* @__PURE__ */ t("label", { children: [
2208
+ /* @__PURE__ */ e("div", { className: "nice-etl-builder__field", children: /* @__PURE__ */ d("label", { children: [
1826
2209
  /* @__PURE__ */ e(
1827
2210
  "input",
1828
2211
  {
1829
2212
  type: "checkbox",
1830
- checked: ((m = l.incremental) == null ? void 0 : m.enabled) || !1,
1831
- onChange: (a) => {
1832
- var y;
1833
- return s({
2213
+ checked: ((u = r.incremental) == null ? void 0 : u.enabled) || !1,
2214
+ onChange: (o) => {
2215
+ var p;
2216
+ return t({
1834
2217
  incremental: {
1835
- ...l.incremental,
1836
- enabled: a.target.checked,
1837
- column: ((y = l.incremental) == null ? void 0 : y.column) || ""
2218
+ ...r.incremental,
2219
+ enabled: o.target.checked,
2220
+ column: ((p = r.incremental) == null ? void 0 : p.column) || ""
1838
2221
  }
1839
2222
  });
1840
2223
  }
@@ -1843,50 +2226,50 @@ function ce({
1843
2226
  "Incremental Load"
1844
2227
  ] }) })
1845
2228
  ] }),
1846
- i === "transformation" && /* @__PURE__ */ t(F, { children: [
1847
- /* @__PURE__ */ t("div", { className: "nice-etl-builder__field", children: [
2229
+ a === "transformation" && /* @__PURE__ */ d(N, { children: [
2230
+ /* @__PURE__ */ d("div", { className: "nice-etl-builder__field", children: [
1848
2231
  /* @__PURE__ */ e("label", { children: "Type" }),
1849
- /* @__PURE__ */ e("span", { children: l.type })
2232
+ /* @__PURE__ */ e("span", { children: r.type })
1850
2233
  ] }),
1851
- l.type === "filter" && /* @__PURE__ */ t("div", { className: "nice-etl-builder__field", children: [
2234
+ r.type === "filter" && /* @__PURE__ */ d("div", { className: "nice-etl-builder__field", children: [
1852
2235
  /* @__PURE__ */ e("label", { children: "Condition" }),
1853
2236
  /* @__PURE__ */ e(
1854
2237
  "textarea",
1855
2238
  {
1856
- value: String(l.config.condition || ""),
1857
- onChange: (a) => s({
1858
- config: { ...l.config, condition: a.target.value }
2239
+ value: String(r.config.condition || ""),
2240
+ onChange: (o) => t({
2241
+ config: { ...r.config, condition: o.target.value }
1859
2242
  }),
1860
2243
  placeholder: "e.g., age > 18 AND status = 'active'",
1861
2244
  rows: 3
1862
2245
  }
1863
2246
  )
1864
2247
  ] }),
1865
- l.type === "derive" && /* @__PURE__ */ t(F, { children: [
1866
- /* @__PURE__ */ t("div", { className: "nice-etl-builder__field", children: [
2248
+ r.type === "derive" && /* @__PURE__ */ d(N, { children: [
2249
+ /* @__PURE__ */ d("div", { className: "nice-etl-builder__field", children: [
1867
2250
  /* @__PURE__ */ e("label", { children: "Column Name" }),
1868
2251
  /* @__PURE__ */ e(
1869
2252
  "input",
1870
2253
  {
1871
2254
  type: "text",
1872
- value: String(l.config.name || ""),
1873
- onChange: (a) => s({
1874
- config: { ...l.config, name: a.target.value }
2255
+ value: String(r.config.name || ""),
2256
+ onChange: (o) => t({
2257
+ config: { ...r.config, name: o.target.value }
1875
2258
  })
1876
2259
  }
1877
2260
  )
1878
2261
  ] }),
1879
- /* @__PURE__ */ t("div", { className: "nice-etl-builder__field", children: [
2262
+ /* @__PURE__ */ d("div", { className: "nice-etl-builder__field", children: [
1880
2263
  /* @__PURE__ */ e("label", { children: "Expression" }),
1881
2264
  /* @__PURE__ */ e(
1882
2265
  "input",
1883
2266
  {
1884
2267
  type: "text",
1885
- value: String(l.config.expression || ""),
1886
- onChange: (a) => s({
2268
+ value: String(r.config.expression || ""),
2269
+ onChange: (o) => t({
1887
2270
  config: {
1888
- ...l.config,
1889
- expression: a.target.value
2271
+ ...r.config,
2272
+ expression: o.target.value
1890
2273
  }
1891
2274
  }),
1892
2275
  placeholder: "e.g., price * quantity"
@@ -1894,14 +2277,14 @@ function ce({
1894
2277
  )
1895
2278
  ] })
1896
2279
  ] }),
1897
- l.type === "custom" && /* @__PURE__ */ t("div", { className: "nice-etl-builder__field", children: [
2280
+ r.type === "custom" && /* @__PURE__ */ d("div", { className: "nice-etl-builder__field", children: [
1898
2281
  /* @__PURE__ */ e("label", { children: "Code" }),
1899
2282
  /* @__PURE__ */ e(
1900
2283
  "textarea",
1901
2284
  {
1902
- value: String(l.config.code || ""),
1903
- onChange: (a) => s({
1904
- config: { ...l.config, code: a.target.value }
2285
+ value: String(r.config.code || ""),
2286
+ onChange: (o) => t({
2287
+ config: { ...r.config, code: o.target.value }
1905
2288
  }),
1906
2289
  rows: 10,
1907
2290
  className: "nice-etl-builder__code-input"
@@ -1909,14 +2292,14 @@ function ce({
1909
2292
  )
1910
2293
  ] })
1911
2294
  ] }),
1912
- i === "destination" && /* @__PURE__ */ t(F, { children: [
1913
- /* @__PURE__ */ t("div", { className: "nice-etl-builder__field", children: [
2295
+ a === "destination" && /* @__PURE__ */ d(N, { children: [
2296
+ /* @__PURE__ */ d("div", { className: "nice-etl-builder__field", children: [
1914
2297
  /* @__PURE__ */ e("label", { children: "Type" }),
1915
- /* @__PURE__ */ t(
2298
+ /* @__PURE__ */ d(
1916
2299
  "select",
1917
2300
  {
1918
- value: l.type,
1919
- onChange: (a) => s({ type: a.target.value }),
2301
+ value: r.type,
2302
+ onChange: (o) => t({ type: o.target.value }),
1920
2303
  children: [
1921
2304
  /* @__PURE__ */ e("option", { value: "database", children: "Database" }),
1922
2305
  /* @__PURE__ */ e("option", { value: "file", children: "File" }),
@@ -1926,13 +2309,13 @@ function ce({
1926
2309
  }
1927
2310
  )
1928
2311
  ] }),
1929
- /* @__PURE__ */ t("div", { className: "nice-etl-builder__field", children: [
2312
+ /* @__PURE__ */ d("div", { className: "nice-etl-builder__field", children: [
1930
2313
  /* @__PURE__ */ e("label", { children: "Write Mode" }),
1931
- /* @__PURE__ */ t(
2314
+ /* @__PURE__ */ d(
1932
2315
  "select",
1933
2316
  {
1934
- value: l.writeMode,
1935
- onChange: (a) => s({ writeMode: a.target.value }),
2317
+ value: r.writeMode,
2318
+ onChange: (o) => t({ writeMode: o.target.value }),
1936
2319
  children: [
1937
2320
  /* @__PURE__ */ e("option", { value: "append", children: "Append" }),
1938
2321
  /* @__PURE__ */ e("option", { value: "overwrite", children: "Overwrite" }),
@@ -1944,56 +2327,56 @@ function ce({
1944
2327
  ] })
1945
2328
  ] })
1946
2329
  ] })
1947
- ] }) : /* @__PURE__ */ e(F, {});
2330
+ ] }) : /* @__PURE__ */ e(N, {});
1948
2331
  }
1949
- function oe({
1950
- schedule: i,
1951
- monitoring: l,
1952
- onChange: o
2332
+ function Se({
2333
+ schedule: a,
2334
+ monitoring: r,
2335
+ onChange: c
1953
2336
  }) {
1954
- const [s, d] = S(i || { enabled: !1 });
1955
- return /* @__PURE__ */ t("div", { className: "nice-etl-builder__schedule-editor", children: [
2337
+ const [t, y] = w(a || { enabled: !1 });
2338
+ return /* @__PURE__ */ d("div", { className: "nice-etl-builder__schedule-editor", children: [
1956
2339
  /* @__PURE__ */ e("h4", { children: "Schedule Configuration" }),
1957
- /* @__PURE__ */ e("div", { className: "nice-etl-builder__field", children: /* @__PURE__ */ t("label", { children: [
2340
+ /* @__PURE__ */ e("div", { className: "nice-etl-builder__field", children: /* @__PURE__ */ d("label", { children: [
1958
2341
  /* @__PURE__ */ e(
1959
2342
  "input",
1960
2343
  {
1961
2344
  type: "checkbox",
1962
- checked: s.enabled,
1963
- onChange: (m) => {
1964
- const a = { ...s, enabled: m.target.checked };
1965
- d(a), o(a);
2345
+ checked: t.enabled,
2346
+ onChange: (u) => {
2347
+ const o = { ...t, enabled: u.target.checked };
2348
+ y(o), c(o);
1966
2349
  }
1967
2350
  }
1968
2351
  ),
1969
2352
  "Enable scheduled execution"
1970
2353
  ] }) }),
1971
- s.enabled && /* @__PURE__ */ t(F, { children: [
1972
- /* @__PURE__ */ t("div", { className: "nice-etl-builder__field", children: [
2354
+ t.enabled && /* @__PURE__ */ d(N, { children: [
2355
+ /* @__PURE__ */ d("div", { className: "nice-etl-builder__field", children: [
1973
2356
  /* @__PURE__ */ e("label", { children: "Cron Expression" }),
1974
2357
  /* @__PURE__ */ e(
1975
2358
  "input",
1976
2359
  {
1977
2360
  type: "text",
1978
- value: s.cron || "",
1979
- onChange: (m) => {
1980
- const a = { ...s, cron: m.target.value };
1981
- d(a);
2361
+ value: t.cron || "",
2362
+ onChange: (u) => {
2363
+ const o = { ...t, cron: u.target.value };
2364
+ y(o);
1982
2365
  },
1983
2366
  placeholder: "0 0 * * * (every hour)"
1984
2367
  }
1985
2368
  ),
1986
2369
  /* @__PURE__ */ e("small", { children: "Format: minute hour day month weekday" })
1987
2370
  ] }),
1988
- /* @__PURE__ */ t("div", { className: "nice-etl-builder__field", children: [
2371
+ /* @__PURE__ */ d("div", { className: "nice-etl-builder__field", children: [
1989
2372
  /* @__PURE__ */ e("label", { children: "Timezone" }),
1990
- /* @__PURE__ */ t(
2373
+ /* @__PURE__ */ d(
1991
2374
  "select",
1992
2375
  {
1993
- value: s.timezone || "UTC",
1994
- onChange: (m) => {
1995
- const a = { ...s, timezone: m.target.value };
1996
- d(a);
2376
+ value: t.timezone || "UTC",
2377
+ onChange: (u) => {
2378
+ const o = { ...t, timezone: u.target.value };
2379
+ y(o);
1997
2380
  },
1998
2381
  children: [
1999
2382
  /* @__PURE__ */ e("option", { value: "UTC", children: "UTC" }),
@@ -2006,16 +2389,16 @@ function oe({
2006
2389
  }
2007
2390
  )
2008
2391
  ] }),
2009
- /* @__PURE__ */ e("button", { onClick: () => o(s), children: "Save Schedule" })
2392
+ /* @__PURE__ */ e("button", { onClick: () => c(t), children: "Save Schedule" })
2010
2393
  ] }),
2011
2394
  /* @__PURE__ */ e("h4", { children: "Monitoring" }),
2012
- /* @__PURE__ */ e("div", { className: "nice-etl-builder__field", children: /* @__PURE__ */ t("label", { children: [
2013
- /* @__PURE__ */ e("input", { type: "checkbox", checked: (l == null ? void 0 : l.alertOnFailure) || !1, disabled: !0 }),
2395
+ /* @__PURE__ */ e("div", { className: "nice-etl-builder__field", children: /* @__PURE__ */ d("label", { children: [
2396
+ /* @__PURE__ */ e("input", { type: "checkbox", checked: (r == null ? void 0 : r.alertOnFailure) || !1, disabled: !0 }),
2014
2397
  "Alert on failure"
2015
2398
  ] }) }),
2016
- /* @__PURE__ */ t("div", { className: "nice-etl-builder__field", children: [
2399
+ /* @__PURE__ */ d("div", { className: "nice-etl-builder__field", children: [
2017
2400
  /* @__PURE__ */ e("label", { children: "Log Level" }),
2018
- /* @__PURE__ */ t("select", { value: (l == null ? void 0 : l.logLevel) || "info", disabled: !0, children: [
2401
+ /* @__PURE__ */ d("select", { value: (r == null ? void 0 : r.logLevel) || "info", disabled: !0, children: [
2019
2402
  /* @__PURE__ */ e("option", { value: "error", children: "Error" }),
2020
2403
  /* @__PURE__ */ e("option", { value: "warn", children: "Warning" }),
2021
2404
  /* @__PURE__ */ e("option", { value: "info", children: "Info" }),
@@ -2024,49 +2407,47 @@ function oe({
2024
2407
  ] })
2025
2408
  ] });
2026
2409
  }
2027
- function de({ runs: i }) {
2028
- return /* @__PURE__ */ t("div", { className: "nice-etl-builder__history-view", children: [
2410
+ function Ce({ runs: a }) {
2411
+ return /* @__PURE__ */ d("div", { className: "nice-etl-builder__history-view", children: [
2029
2412
  /* @__PURE__ */ e("h4", { children: "Run History" }),
2030
- i.length === 0 ? /* @__PURE__ */ e("div", { className: "nice-etl-builder__no-history", children: "No runs yet" }) : /* @__PURE__ */ t("table", { className: "nice-etl-builder__history-table", children: [
2031
- /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ t("tr", { children: [
2413
+ a.length === 0 ? /* @__PURE__ */ e("div", { className: "nice-etl-builder__no-history", children: "No runs yet" }) : /* @__PURE__ */ d("table", { className: "nice-etl-builder__history-table", children: [
2414
+ /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ d("tr", { children: [
2032
2415
  /* @__PURE__ */ e("th", { children: "Status" }),
2033
2416
  /* @__PURE__ */ e("th", { children: "Start Time" }),
2034
2417
  /* @__PURE__ */ e("th", { children: "Duration" }),
2035
2418
  /* @__PURE__ */ e("th", { children: "Rows" }),
2036
2419
  /* @__PURE__ */ e("th", { children: "Errors" })
2037
2420
  ] }) }),
2038
- /* @__PURE__ */ e("tbody", { children: i.map((l) => /* @__PURE__ */ t(
2421
+ /* @__PURE__ */ e("tbody", { children: a.map((r) => /* @__PURE__ */ d(
2039
2422
  "tr",
2040
2423
  {
2041
- className: `nice-etl-builder__run nice-etl-builder__run--${l.status}`,
2424
+ className: `nice-etl-builder__run nice-etl-builder__run--${r.status}`,
2042
2425
  children: [
2043
- /* @__PURE__ */ e("td", { children: /* @__PURE__ */ t(
2426
+ /* @__PURE__ */ e("td", { children: /* @__PURE__ */ d(
2044
2427
  "span",
2045
2428
  {
2046
- className: `nice-etl-builder__status nice-etl-builder__status--${l.status}`,
2429
+ className: `nice-etl-builder__status nice-etl-builder__status--${r.status}`,
2047
2430
  children: [
2048
- l.status === "success" ? "✓" : l.status === "failed" ? "✗" : "⏳",
2049
- l.status
2431
+ r.status === "success" ? "✓" : r.status === "failed" ? "✗" : "⏳",
2432
+ r.status
2050
2433
  ]
2051
2434
  }
2052
2435
  ) }),
2053
- /* @__PURE__ */ e("td", { children: l.startTime.toLocaleString() }),
2054
- /* @__PURE__ */ e("td", { children: l.endTime ? `${Math.round((l.endTime.getTime() - l.startTime.getTime()) / 1e3)}s` : "-" }),
2055
- /* @__PURE__ */ t("td", { children: [
2056
- l.rowsProcessed.toLocaleString(),
2436
+ /* @__PURE__ */ e("td", { children: r.startTime.toLocaleString() }),
2437
+ /* @__PURE__ */ e("td", { children: r.endTime ? `${Math.round((r.endTime.getTime() - r.startTime.getTime()) / 1e3)}s` : "-" }),
2438
+ /* @__PURE__ */ d("td", { children: [
2439
+ r.rowsProcessed.toLocaleString(),
2057
2440
  " / ",
2058
- l.rowsWritten.toLocaleString()
2441
+ r.rowsWritten.toLocaleString()
2059
2442
  ] }),
2060
- /* @__PURE__ */ e("td", { children: l.errors.length })
2443
+ /* @__PURE__ */ e("td", { children: r.errors.length })
2061
2444
  ]
2062
2445
  },
2063
- l.id
2446
+ r.id
2064
2447
  )) })
2065
2448
  ] })
2066
2449
  ] });
2067
2450
  }
2068
2451
  export {
2069
- pe as NiceDashboardStudio,
2070
- me as NiceETLBuilder,
2071
- he as NiceReportBuilder
2452
+ De as NiceETLBuilder
2072
2453
  };