@nice2dev/ui-bi 1.0.29 → 1.1.5

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