@nice2dev/ui-bi 1.0.27 → 1.0.29

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,18 +1,88 @@
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) };
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) };
6
76
  }
7
- b({
77
+ g({
8
78
  dir: "ltr",
9
79
  isRTL: !1,
10
- flip: (a) => a,
11
- value: (a) => a.ltr
80
+ flip: (i) => i,
81
+ value: (i) => i.ltr
12
82
  });
13
- b(null);
14
- b(null);
15
- const oe = {
83
+ g(null);
84
+ g(null);
85
+ const ye = {
16
86
  radius: "md",
17
87
  shadow: "md",
18
88
  fill: "solid",
@@ -29,109 +99,109 @@ const oe = {
29
99
  animation: "normal",
30
100
  density: "normal"
31
101
  };
32
- b({
102
+ g({
33
103
  displayStyle: "default",
34
- variantConfig: oe,
104
+ variantConfig: ye,
35
105
  setDisplayStyle: () => {
36
106
  }
37
107
  });
38
- b({});
39
- b({
108
+ g({});
109
+ g({
40
110
  direction: "ltr",
41
111
  isRTL: !1,
42
- flip: (a) => a,
43
- flipStyle: (a, r) => ({ [a]: r })
112
+ flip: (i) => i,
113
+ flipStyle: (i, r) => ({ [i]: r })
44
114
  });
45
- b({
115
+ g({
46
116
  permissions: {},
47
117
  getAccessMode: () => "full"
48
118
  });
49
- b(null);
50
- const te = process.env.NODE_ENV === "development";
51
- let W = {
52
- enabled: te,
119
+ g(null);
120
+ const me = process.env.NODE_ENV === "development";
121
+ let K = {
122
+ enabled: me,
53
123
  slowRenderThreshold: 16
54
124
  };
55
- const O = [], M = /* @__PURE__ */ new Map(), B = /* @__PURE__ */ new Map();
56
- function fe() {
57
- O.length = 0, M.clear(), B.clear();
125
+ const j = [], F = /* @__PURE__ */ new Map(), J = /* @__PURE__ */ new Map();
126
+ function pe() {
127
+ j.length = 0, F.clear(), J.clear();
58
128
  }
59
- function se(a) {
60
- const r = W.slowRenderThreshold;
61
- return O.filter((c) => c.actualDuration > r);
129
+ function ue(i) {
130
+ const r = K.slowRenderThreshold;
131
+ return j.filter((a) => a.actualDuration > r);
62
132
  }
63
- function H(a) {
64
- return a < 1 ? `${(a * 1e3).toFixed(0)}μs` : a < 1e3 ? `${a.toFixed(2)}ms` : `${(a / 1e3).toFixed(2)}s`;
133
+ function S(i) {
134
+ return i < 1 ? `${(i * 1e3).toFixed(0)}μs` : i < 1e3 ? `${i.toFixed(2)}ms` : `${(i / 1e3).toFixed(2)}s`;
65
135
  }
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(B.values());
68
- return { stats: a, slowRenders: r, totalRenders: c, avgRenderTime: t, marks: y };
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 };
69
139
  }
70
- function ye() {
71
- const a = le();
140
+ function he() {
141
+ const i = be();
72
142
  console.group(
73
143
  "%c[Nice2Dev Performance Report]",
74
144
  "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) => ({
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) => ({
77
147
  Name: r.componentName,
78
148
  Renders: r.renderCount,
79
- "Avg Time": H(r.avgRenderTime),
80
- "Max Time": H(r.maxRenderTime),
81
- "Total Time": H(r.totalRenderTime),
149
+ "Avg Time": S(r.avgRenderTime),
150
+ "Max Time": S(r.maxRenderTime),
151
+ "Total Time": S(r.totalRenderTime),
82
152
  "Slow Renders": r.slowRenderCount
83
153
  }))
84
- ), console.groupEnd(), a.slowRenders.length > 0 && (console.group("Slow Renders (last 10)"), console.table(
85
- a.slowRenders.slice(-10).map((r) => ({
154
+ ), console.groupEnd(), i.slowRenders.length > 0 && (console.group("Slow Renders (last 10)"), console.table(
155
+ i.slowRenders.slice(-10).map((r) => ({
86
156
  Component: r.componentName,
87
157
  Phase: r.phase,
88
- Duration: H(r.actualDuration),
158
+ Duration: S(r.actualDuration),
89
159
  Time: new Date(r.timestamp).toLocaleTimeString()
90
160
  }))
91
- ), console.groupEnd()), a.marks.length > 0 && (console.group("Custom Marks"), console.table(
92
- a.marks.filter((r) => r.duration).map((r) => ({
161
+ ), console.groupEnd()), i.marks.length > 0 && (console.group("Custom Marks"), console.table(
162
+ i.marks.filter((r) => r.duration).map((r) => ({
93
163
  Name: r.name,
94
- Duration: H(r.duration)
164
+ Duration: S(r.duration)
95
165
  }))
96
166
  ), console.groupEnd()), console.groupEnd();
97
167
  }
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
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
109
179
  });
110
180
  };
111
- f();
112
- const v = setInterval(f, 2e3);
113
- return () => clearInterval(v);
114
- }, []), !W.enabled)
181
+ h();
182
+ const m = setInterval(h, 2e3);
183
+ return () => clearInterval(m);
184
+ }, []), !K.enabled)
115
185
  return null;
116
- const S = {
186
+ const u = {
117
187
  position: "fixed",
118
188
  zIndex: 99999,
119
- ...a.includes("top") ? { top: 8 } : { bottom: 8 },
120
- ...a.includes("left") ? { left: 8 } : { right: 8 }
189
+ ...i.includes("top") ? { top: 8 } : { bottom: 8 },
190
+ ...i.includes("left") ? { left: 8 } : { right: 8 }
121
191
  };
122
192
  return /* @__PURE__ */ d(
123
193
  "div",
124
194
  {
125
195
  style: {
126
- ...S,
196
+ ...u,
127
197
  background: "var(--nice-overlay-85, rgba(0, 0, 0, 0.85))",
128
198
  color: "var(--bg-primary, #fff)",
129
199
  borderRadius: 8,
130
200
  fontSize: 11,
131
201
  fontFamily: "Monaco, Consolas, monospace",
132
- padding: c ? "4px 8px" : 8,
133
- maxWidth: c ? "auto" : 300,
134
- maxHeight: c ? "auto" : 400,
202
+ padding: a ? "4px 8px" : 8,
203
+ maxWidth: a ? "auto" : 300,
204
+ maxHeight: a ? "auto" : 400,
135
205
  overflow: "auto"
136
206
  },
137
207
  children: [
@@ -139,27 +209,27 @@ const me = re(
139
209
  "div",
140
210
  {
141
211
  style: { cursor: "pointer", display: "flex", alignItems: "center", gap: 8 },
142
- onClick: () => t((f) => !f),
212
+ onClick: () => t((h) => !h),
143
213
  children: [
144
214
  /* @__PURE__ */ e("span", { style: { color: "var(--color-success, #22c55e)" }, children: "●" }),
145
215
  /* @__PURE__ */ e("span", { children: "Profiler" }),
146
- o.used > 0 && /* @__PURE__ */ d(
216
+ p.used > 0 && /* @__PURE__ */ d(
147
217
  "span",
148
218
  {
149
219
  style: {
150
- color: o.used > 100 ? "var(--color-warning, #f59e0b)" : "var(--text-muted, #64748b)"
220
+ color: p.used > 100 ? "var(--color-warning, #f59e0b)" : "var(--text-muted, #64748b)"
151
221
  },
152
222
  children: [
153
- o.used.toFixed(0),
223
+ p.used.toFixed(0),
154
224
  "MB"
155
225
  ]
156
226
  }
157
227
  ),
158
- /* @__PURE__ */ e("span", { style: { marginLeft: "auto", opacity: 0.5 }, children: c ? "▼" : "▲" })
228
+ /* @__PURE__ */ e("span", { style: { marginLeft: "auto", opacity: 0.5 }, children: a ? "▼" : "▲" })
159
229
  ]
160
230
  }
161
231
  ),
162
- !c && /* @__PURE__ */ d("div", { style: { marginTop: 8 }, children: [
232
+ !a && /* @__PURE__ */ d("div", { style: { marginTop: 8 }, children: [
163
233
  /* @__PURE__ */ e(
164
234
  "div",
165
235
  {
@@ -171,15 +241,15 @@ const me = re(
171
241
  children: /* @__PURE__ */ e("strong", { children: "Top Components" })
172
242
  }
173
243
  ),
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 }),
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 }),
176
246
  /* @__PURE__ */ e(
177
247
  "span",
178
248
  {
179
249
  style: {
180
- color: f.avgRenderTime > 16 ? "var(--color-warning, #f59e0b)" : "var(--color-success, #22c55e)"
250
+ color: h.avgRenderTime > 16 ? "var(--color-warning, #f59e0b)" : "var(--color-success, #22c55e)"
181
251
  },
182
- children: H(f.avgRenderTime)
252
+ children: S(h.avgRenderTime)
183
253
  }
184
254
  ),
185
255
  /* @__PURE__ */ d(
@@ -188,16 +258,16 @@ const me = re(
188
258
  style: { color: "var(--text-muted, #64748b)", minWidth: 30, textAlign: "right" },
189
259
  children: [
190
260
  "x",
191
- f.renderCount
261
+ h.renderCount
192
262
  ]
193
263
  }
194
264
  )
195
- ] }, f.componentName)),
265
+ ] }, h.componentName)),
196
266
  /* @__PURE__ */ d("div", { style: { marginTop: 8, display: "flex", gap: 8 }, children: [
197
267
  /* @__PURE__ */ e(
198
268
  "button",
199
269
  {
200
- onClick: ye,
270
+ onClick: he,
201
271
  style: {
202
272
  flex: 1,
203
273
  padding: "4px 8px",
@@ -214,7 +284,7 @@ const me = re(
214
284
  /* @__PURE__ */ e(
215
285
  "button",
216
286
  {
217
- onClick: fe,
287
+ onClick: pe,
218
288
  style: {
219
289
  flex: 1,
220
290
  padding: "4px 8px",
@@ -235,70 +305,70 @@ const me = re(
235
305
  );
236
306
  }
237
307
  );
238
- me.displayName = "ProfilerOverlay";
308
+ ve.displayName = "ProfilerOverlay";
239
309
  process.env.NODE_ENV;
240
- b(null);
241
- const pe = b({
310
+ g(null);
311
+ const ge = g({
242
312
  enabled: !0,
243
313
  active: !1,
244
314
  run: () => {
245
315
  }
246
316
  });
247
- function ue() {
248
- return F(pe);
317
+ function we() {
318
+ return O(ge);
249
319
  }
250
- function be(a, r) {
251
- if (!a)
320
+ function _e(i, r) {
321
+ if (!i)
252
322
  return null;
253
- if (a === !0)
323
+ if (i === !0)
254
324
  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;
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;
259
329
  }
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
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
270
340
  }));
271
341
  }
272
- const he = ({
273
- steps: a,
342
+ const He = ({
343
+ steps: i,
274
344
  autoStart: r,
275
- label: c,
345
+ label: a,
276
346
  size: t = "md",
277
- className: y,
278
- style: u,
279
- "data-testid": o
347
+ className: s,
348
+ style: o,
349
+ "data-testid": p
280
350
  }) => {
281
- const { enabled: p, run: S } = ue(), { t: f } = de();
282
- if (!p || !a || a.length === 0)
351
+ const { enabled: f, run: u } = we(), { t: h } = k();
352
+ if (!f || !i || i.length === 0)
283
353
  return null;
284
- const v = c ?? f("tutorial.startAria", "Start tutorial");
354
+ const m = a ?? h("tutorial.startAria", "Start tutorial");
285
355
  return /* @__PURE__ */ e(
286
356
  "button",
287
357
  {
288
358
  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 }),
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 }),
295
365
  children: "?"
296
366
  }
297
367
  );
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 = `
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 = `
302
372
  .nice-tutorial-button {
303
373
  display: inline-flex;
304
374
  align-items: center;
@@ -324,12 +394,12 @@ if (typeof document < "u" && !document.getElementById(U)) {
324
394
  }
325
395
  .nice-tutorial-button--sm { width: 16px; height: 16px; font-size: 11px; }
326
396
  .nice-tutorial-button--md { width: 20px; height: 20px; font-size: 12px; }
327
- `, document.head.appendChild(a);
397
+ `, document.head.appendChild(i);
328
398
  }
329
- b(null);
330
- b(null);
331
- b(null);
332
- const $ = {
399
+ g(null);
400
+ g(null);
401
+ g(null);
402
+ const G = {
333
403
  space1: "4px",
334
404
  space2: "8px",
335
405
  space3: "12px",
@@ -337,7 +407,7 @@ const $ = {
337
407
  space5: "20px",
338
408
  space6: "24px",
339
409
  space8: "32px"
340
- }, V = {
410
+ }, Y = {
341
411
  fontFamily: "'Inter', system-ui, -apple-system, sans-serif",
342
412
  fontSizeXs: "0.75rem",
343
413
  fontSizeSm: "0.8125rem",
@@ -349,71 +419,71 @@ const $ = {
349
419
  fontWeightSemibold: 600,
350
420
  fontWeightBold: 700,
351
421
  lineHeight: 1.5
352
- }, K = { fast: "120ms ease", normal: "200ms ease", slow: "300ms ease" }, j = (a) => ({
353
- color: a,
422
+ }, X = { fast: "120ms ease", normal: "200ms ease", slow: "300ms ease" }, Z = (i) => ({
423
+ color: i,
354
424
  radiusSm: "4px",
355
425
  radiusMd: "6px",
356
426
  radiusLg: "8px",
357
427
  radiusXl: "12px",
358
428
  radiusFull: "9999px"
359
- }), ge = {
429
+ }), Ne = {
360
430
  sm: "0 1px 2px rgba(0,0,0,0.05)",
361
431
  md: "0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",
362
432
  lg: "0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",
363
433
  xl: "0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)"
364
- }, we = {
434
+ }, Se = {
365
435
  sm: "0 1px 2px rgba(0,0,0,0.3)",
366
436
  md: "0 4px 6px -1px rgba(0,0,0,0.4)",
367
437
  lg: "0 10px 15px -3px rgba(0,0,0,0.4)",
368
438
  xl: "0 20px 25px -5px rgba(0,0,0,0.4)"
369
439
  };
370
- function i(a, r, c, t, y) {
440
+ function n(i, r, a, t, s) {
371
441
  return {
372
- name: a,
442
+ name: i,
373
443
  darkMode: "light",
374
444
  colors: {
375
445
  ...r,
376
- surface: r.surface ?? c.primary,
377
- surfaceHover: r.surfaceHover ?? c.secondary
446
+ surface: r.surface ?? a.primary,
447
+ surfaceHover: r.surfaceHover ?? a.secondary
378
448
  },
379
449
  backgrounds: {
380
- ...c,
381
- elevated: c.elevated ?? c.primary,
382
- inset: c.inset ?? c.tertiary,
383
- canvas: c.canvas ?? c.primary
450
+ ...a,
451
+ elevated: a.elevated ?? a.primary,
452
+ inset: a.inset ?? a.tertiary,
453
+ canvas: a.canvas ?? a.primary
384
454
  },
385
455
  text: { ...t, inverse: t.inverse ?? "#ffffff" },
386
- borders: j(y),
387
- shadows: ge,
388
- spacing: $,
389
- typography: V,
390
- transitions: K
456
+ borders: Z(s),
457
+ shadows: Ne,
458
+ spacing: G,
459
+ typography: Y,
460
+ transitions: X
391
461
  };
392
462
  }
393
- function m(a, r, c, t, y) {
463
+ function b(i, r, a, t, s) {
394
464
  return {
395
- name: a,
465
+ name: i,
396
466
  darkMode: "dark",
397
467
  colors: {
398
468
  ...r,
399
- surface: r.surface ?? c.secondary,
400
- surfaceHover: r.surfaceHover ?? c.tertiary
469
+ surface: r.surface ?? a.secondary,
470
+ surfaceHover: r.surfaceHover ?? a.tertiary
401
471
  },
402
472
  backgrounds: {
403
- ...c,
404
- elevated: c.elevated ?? c.secondary,
405
- inset: c.inset ?? c.primary,
406
- canvas: c.canvas ?? c.primary
473
+ ...a,
474
+ elevated: a.elevated ?? a.secondary,
475
+ inset: a.inset ?? a.primary,
476
+ canvas: a.canvas ?? a.primary
407
477
  },
408
478
  text: { ...t, inverse: t.inverse ?? "#0f172a" },
409
- borders: j(y),
410
- shadows: we,
411
- spacing: $,
412
- typography: V,
413
- transitions: K
479
+ borders: Z(s),
480
+ shadows: Se,
481
+ spacing: G,
482
+ typography: Y,
483
+ transitions: X
414
484
  };
415
485
  }
416
- i(
486
+ n(
417
487
  "Slate",
418
488
  {
419
489
  primary: "#64748b",
@@ -427,7 +497,7 @@ i(
427
497
  { primary: "#1e293b", secondary: "#475569", muted: "#94a3b8" },
428
498
  "#cbd5e1"
429
499
  );
430
- i(
500
+ n(
431
501
  "Zinc",
432
502
  {
433
503
  primary: "#71717a",
@@ -441,7 +511,7 @@ i(
441
511
  { primary: "#18181b", secondary: "#3f3f46", muted: "#a1a1aa" },
442
512
  "#d4d4d8"
443
513
  );
444
- i(
514
+ n(
445
515
  "Stone",
446
516
  {
447
517
  primary: "#78716c",
@@ -455,7 +525,7 @@ i(
455
525
  { primary: "#1c1917", secondary: "#44403c", muted: "#a8a29e" },
456
526
  "#d6d3d1"
457
527
  );
458
- i(
528
+ n(
459
529
  "Cool Gray",
460
530
  {
461
531
  primary: "#6b7280",
@@ -469,7 +539,7 @@ i(
469
539
  { primary: "#111827", secondary: "#374151", muted: "#9ca3af" },
470
540
  "#d1d5db"
471
541
  );
472
- i(
542
+ n(
473
543
  "Warm Gray",
474
544
  {
475
545
  primary: "#7c7568",
@@ -483,7 +553,7 @@ i(
483
553
  { primary: "#1f1d19", secondary: "#4a463d", muted: "#a09888" },
484
554
  "#d4d0c8"
485
555
  );
486
- i(
556
+ n(
487
557
  "Silver",
488
558
  {
489
559
  primary: "#94a3b8",
@@ -497,7 +567,7 @@ i(
497
567
  { primary: "#334155", secondary: "#64748b", muted: "#94a3b8" },
498
568
  "#cbd5e1"
499
569
  );
500
- i(
570
+ n(
501
571
  "Charcoal",
502
572
  {
503
573
  primary: "#374151",
@@ -511,7 +581,7 @@ i(
511
581
  { primary: "#111827", secondary: "#374151", muted: "#6b7280" },
512
582
  "#d1d5db"
513
583
  );
514
- i(
584
+ n(
515
585
  "Ivory",
516
586
  {
517
587
  primary: "#92876d",
@@ -525,7 +595,7 @@ i(
525
595
  { primary: "#2b2517", secondary: "#5c5340", muted: "#9c9280" },
526
596
  "#ddd8c4"
527
597
  );
528
- i(
598
+ n(
529
599
  "Rose",
530
600
  {
531
601
  primary: "#e11d48",
@@ -539,7 +609,7 @@ i(
539
609
  { primary: "#4c0519", secondary: "#881337", muted: "#f43f5e" },
540
610
  "#fda4af"
541
611
  );
542
- i(
612
+ n(
543
613
  "Emerald",
544
614
  {
545
615
  primary: "#059669",
@@ -553,7 +623,7 @@ i(
553
623
  { primary: "#064e3b", secondary: "#065f46", muted: "#34d399" },
554
624
  "#6ee7b7"
555
625
  );
556
- i(
626
+ n(
557
627
  "Amber",
558
628
  {
559
629
  primary: "#d97706",
@@ -567,7 +637,7 @@ i(
567
637
  { primary: "#451a03", secondary: "#78350f", muted: "#f59e0b" },
568
638
  "#fcd34d"
569
639
  );
570
- i(
640
+ n(
571
641
  "Violet",
572
642
  {
573
643
  primary: "#7c3aed",
@@ -581,7 +651,7 @@ i(
581
651
  { primary: "#2e1065", secondary: "#4c1d95", muted: "#a78bfa" },
582
652
  "#c4b5fd"
583
653
  );
584
- i(
654
+ n(
585
655
  "Teal",
586
656
  {
587
657
  primary: "#0d9488",
@@ -595,7 +665,7 @@ i(
595
665
  { primary: "#134e4a", secondary: "#115e59", muted: "#2dd4bf" },
596
666
  "#5eead4"
597
667
  );
598
- i(
668
+ n(
599
669
  "Indigo",
600
670
  {
601
671
  primary: "#4f46e5",
@@ -609,7 +679,7 @@ i(
609
679
  { primary: "#1e1b4b", secondary: "#312e81", muted: "#818cf8" },
610
680
  "#a5b4fc"
611
681
  );
612
- i(
682
+ n(
613
683
  "Cyan",
614
684
  {
615
685
  primary: "#0891b2",
@@ -623,7 +693,7 @@ i(
623
693
  { primary: "#164e63", secondary: "#155e75", muted: "#22d3ee" },
624
694
  "#67e8f9"
625
695
  );
626
- i(
696
+ n(
627
697
  "Lime",
628
698
  {
629
699
  primary: "#65a30d",
@@ -637,7 +707,7 @@ i(
637
707
  { primary: "#1a2e05", secondary: "#365314", muted: "#84cc16" },
638
708
  "#bef264"
639
709
  );
640
- i(
710
+ n(
641
711
  "Pink",
642
712
  {
643
713
  primary: "#db2777",
@@ -651,7 +721,7 @@ i(
651
721
  { primary: "#500724", secondary: "#831843", muted: "#f472b6" },
652
722
  "#f9a8d4"
653
723
  );
654
- i(
724
+ n(
655
725
  "Orange",
656
726
  {
657
727
  primary: "#ea580c",
@@ -665,7 +735,7 @@ i(
665
735
  { primary: "#431407", secondary: "#7c2d12", muted: "#fb923c" },
666
736
  "#fdba74"
667
737
  );
668
- i(
738
+ n(
669
739
  "Fuchsia",
670
740
  {
671
741
  primary: "#c026d3",
@@ -679,7 +749,7 @@ i(
679
749
  { primary: "#4a044e", secondary: "#701a75", muted: "#d946ef" },
680
750
  "#e879f9"
681
751
  );
682
- i(
752
+ n(
683
753
  "Sky",
684
754
  {
685
755
  primary: "#0284c7",
@@ -693,7 +763,7 @@ i(
693
763
  { primary: "#0c4a6e", secondary: "#075985", muted: "#38bdf8" },
694
764
  "#7dd3fc"
695
765
  );
696
- i(
766
+ n(
697
767
  "Ruby",
698
768
  {
699
769
  primary: "#be123c",
@@ -707,7 +777,7 @@ i(
707
777
  { primary: "#4c0519", secondary: "#881337", muted: "#fb7185" },
708
778
  "#fda4af"
709
779
  );
710
- i(
780
+ n(
711
781
  "Coral",
712
782
  {
713
783
  primary: "#f97316",
@@ -721,7 +791,7 @@ i(
721
791
  { primary: "#431407", secondary: "#9a3412", muted: "#fb923c" },
722
792
  "#fdba74"
723
793
  );
724
- m(
794
+ b(
725
795
  "Midnight",
726
796
  {
727
797
  primary: "#818cf8",
@@ -735,7 +805,7 @@ m(
735
805
  { primary: "#f1f5f9", secondary: "#94a3b8", muted: "#475569" },
736
806
  "#1e293b"
737
807
  );
738
- m(
808
+ b(
739
809
  "Obsidian",
740
810
  {
741
811
  primary: "#a78bfa",
@@ -749,7 +819,7 @@ m(
749
819
  { primary: "#fafafa", secondary: "#a1a1aa", muted: "#52525b" },
750
820
  "#3f3f46"
751
821
  );
752
- m(
822
+ b(
753
823
  "Eclipse",
754
824
  {
755
825
  primary: "#c084fc",
@@ -763,7 +833,7 @@ m(
763
833
  { primary: "#f5f3ff", secondary: "#a78bfa", muted: "#6d5eac" },
764
834
  "#3b3266"
765
835
  );
766
- m(
836
+ b(
767
837
  "Onyx",
768
838
  {
769
839
  primary: "#60a5fa",
@@ -777,7 +847,7 @@ m(
777
847
  { primary: "#ffffff", secondary: "#a3a3a3", muted: "#525252" },
778
848
  "#262626"
779
849
  );
780
- m(
850
+ b(
781
851
  "Carbon",
782
852
  {
783
853
  primary: "#38bdf8",
@@ -791,7 +861,7 @@ m(
791
861
  { primary: "#f4f4f4", secondary: "#c6c6c6", muted: "#6f6f6f" },
792
862
  "#525252"
793
863
  );
794
- m(
864
+ b(
795
865
  "Cosmos",
796
866
  {
797
867
  primary: "#6366f1",
@@ -805,7 +875,7 @@ m(
805
875
  { primary: "#e5e7eb", secondary: "#9ca3af", muted: "#4b5563" },
806
876
  "#374151"
807
877
  );
808
- m(
878
+ b(
809
879
  "Nebula",
810
880
  {
811
881
  primary: "#e879f9",
@@ -819,7 +889,7 @@ m(
819
889
  { primary: "#fae8ff", secondary: "#d8b4fe", muted: "#7c3aed" },
820
890
  "#581c87"
821
891
  );
822
- m(
892
+ b(
823
893
  "Abyss",
824
894
  {
825
895
  primary: "#22d3ee",
@@ -833,7 +903,7 @@ m(
833
903
  { primary: "#e0f2fe", secondary: "#7dd3fc", muted: "#0369a1" },
834
904
  "#075985"
835
905
  );
836
- m(
906
+ b(
837
907
  "Shadow",
838
908
  {
839
909
  primary: "#a3a3a3",
@@ -847,7 +917,7 @@ m(
847
917
  { primary: "#e5e5e5", secondary: "#a3a3a3", muted: "#525252" },
848
918
  "#404040"
849
919
  );
850
- m(
920
+ b(
851
921
  "Emerald Dark",
852
922
  {
853
923
  primary: "#34d399",
@@ -861,7 +931,7 @@ m(
861
931
  { primary: "#ecfdf5", secondary: "#6ee7b7", muted: "#047857" },
862
932
  "#047857"
863
933
  );
864
- i(
934
+ n(
865
935
  "Forest",
866
936
  {
867
937
  primary: "#166534",
@@ -875,7 +945,7 @@ i(
875
945
  { primary: "#052e16", secondary: "#166534", muted: "#4ade80" },
876
946
  "#86efac"
877
947
  );
878
- i(
948
+ n(
879
949
  "Ocean",
880
950
  {
881
951
  primary: "#0369a1",
@@ -889,7 +959,7 @@ i(
889
959
  { primary: "#0c4a6e", secondary: "#0369a1", muted: "#38bdf8" },
890
960
  "#7dd3fc"
891
961
  );
892
- i(
962
+ n(
893
963
  "Desert",
894
964
  {
895
965
  primary: "#b45309",
@@ -903,7 +973,7 @@ i(
903
973
  { primary: "#422006", secondary: "#713f12", muted: "#ca8a04" },
904
974
  "#fde047"
905
975
  );
906
- i(
976
+ n(
907
977
  "Sunset",
908
978
  {
909
979
  primary: "#ea580c",
@@ -917,7 +987,7 @@ i(
917
987
  { primary: "#431407", secondary: "#9a3412", muted: "#f97316" },
918
988
  "#fdba74"
919
989
  );
920
- i(
990
+ n(
921
991
  "Aurora",
922
992
  {
923
993
  primary: "#0d9488",
@@ -931,7 +1001,7 @@ i(
931
1001
  { primary: "#134e4a", secondary: "#115e59", muted: "#2dd4bf" },
932
1002
  "#5eead4"
933
1003
  );
934
- i(
1004
+ n(
935
1005
  "Lavender",
936
1006
  {
937
1007
  primary: "#7e22ce",
@@ -945,7 +1015,7 @@ i(
945
1015
  { primary: "#3b0764", secondary: "#581c87", muted: "#a855f7" },
946
1016
  "#d8b4fe"
947
1017
  );
948
- i(
1018
+ n(
949
1019
  "Autumn",
950
1020
  {
951
1021
  primary: "#c2410c",
@@ -959,7 +1029,7 @@ i(
959
1029
  { primary: "#450a0a", secondary: "#7f1d1d", muted: "#f87171" },
960
1030
  "#fca5a5"
961
1031
  );
962
- i(
1032
+ n(
963
1033
  "Spring",
964
1034
  {
965
1035
  primary: "#16a34a",
@@ -973,7 +1043,7 @@ i(
973
1043
  { primary: "#14532d", secondary: "#166534", muted: "#4ade80" },
974
1044
  "#86efac"
975
1045
  );
976
- i(
1046
+ n(
977
1047
  "Arctic",
978
1048
  {
979
1049
  primary: "#0ea5e9",
@@ -987,7 +1057,7 @@ i(
987
1057
  { primary: "#0c4a6e", secondary: "#0369a1", muted: "#7dd3fc" },
988
1058
  "#bae6fd"
989
1059
  );
990
- i(
1060
+ n(
991
1061
  "Tropical",
992
1062
  {
993
1063
  primary: "#0d9488",
@@ -1001,7 +1071,7 @@ i(
1001
1071
  { primary: "#064e3b", secondary: "#065f46", muted: "#6ee7b7" },
1002
1072
  "#a7f3d0"
1003
1073
  );
1004
- i(
1074
+ n(
1005
1075
  "Pastel Rose",
1006
1076
  {
1007
1077
  primary: "#f472b6",
@@ -1015,7 +1085,7 @@ i(
1015
1085
  { primary: "#831843", secondary: "#9d174d", muted: "#f9a8d4" },
1016
1086
  "#f9a8d4"
1017
1087
  );
1018
- i(
1088
+ n(
1019
1089
  "Pastel Sky",
1020
1090
  {
1021
1091
  primary: "#38bdf8",
@@ -1029,7 +1099,7 @@ i(
1029
1099
  { primary: "#075985", secondary: "#0369a1", muted: "#7dd3fc" },
1030
1100
  "#bae6fd"
1031
1101
  );
1032
- i(
1102
+ n(
1033
1103
  "Pastel Mint",
1034
1104
  {
1035
1105
  primary: "#34d399",
@@ -1043,7 +1113,7 @@ i(
1043
1113
  { primary: "#065f46", secondary: "#047857", muted: "#6ee7b7" },
1044
1114
  "#a7f3d0"
1045
1115
  );
1046
- i(
1116
+ n(
1047
1117
  "Pastel Peach",
1048
1118
  {
1049
1119
  primary: "#fb923c",
@@ -1057,7 +1127,7 @@ i(
1057
1127
  { primary: "#7c2d12", secondary: "#9a3412", muted: "#fdba74" },
1058
1128
  "#fed7aa"
1059
1129
  );
1060
- i(
1130
+ n(
1061
1131
  "Pastel Lavender",
1062
1132
  {
1063
1133
  primary: "#a78bfa",
@@ -1071,7 +1141,7 @@ i(
1071
1141
  { primary: "#4c1d95", secondary: "#5b21b6", muted: "#c4b5fd" },
1072
1142
  "#ddd6fe"
1073
1143
  );
1074
- i(
1144
+ n(
1075
1145
  "Pastel Lemon",
1076
1146
  {
1077
1147
  primary: "#facc15",
@@ -1085,7 +1155,7 @@ i(
1085
1155
  { primary: "#713f12", secondary: "#854d0e", muted: "#fde047" },
1086
1156
  "#fef08a"
1087
1157
  );
1088
- i(
1158
+ n(
1089
1159
  "Pastel Sage",
1090
1160
  {
1091
1161
  primary: "#86efac",
@@ -1099,7 +1169,7 @@ i(
1099
1169
  { primary: "#166534", secondary: "#15803d", muted: "#86efac" },
1100
1170
  "#bbf7d0"
1101
1171
  );
1102
- i(
1172
+ n(
1103
1173
  "Pastel Coral",
1104
1174
  {
1105
1175
  primary: "#fb7185",
@@ -1113,7 +1183,7 @@ i(
1113
1183
  { primary: "#881337", secondary: "#9f1239", muted: "#fda4af" },
1114
1184
  "#fecdd3"
1115
1185
  );
1116
- i(
1186
+ n(
1117
1187
  "Banking",
1118
1188
  {
1119
1189
  primary: "#1e3a5f",
@@ -1127,7 +1197,7 @@ i(
1127
1197
  { primary: "#0f172a", secondary: "#334155", muted: "#94a3b8" },
1128
1198
  "#cbd5e1"
1129
1199
  );
1130
- i(
1200
+ n(
1131
1201
  "Healthcare",
1132
1202
  {
1133
1203
  primary: "#0891b2",
@@ -1141,7 +1211,7 @@ i(
1141
1211
  { primary: "#134e4a", secondary: "#1a6b6a", muted: "#80cbc4" },
1142
1212
  "#b2dfdb"
1143
1213
  );
1144
- i(
1214
+ n(
1145
1215
  "Legal",
1146
1216
  {
1147
1217
  primary: "#1e293b",
@@ -1155,7 +1225,7 @@ i(
1155
1225
  { primary: "#0f172a", secondary: "#44403c", muted: "#a8a29e" },
1156
1226
  "#d6d3d1"
1157
1227
  );
1158
- i(
1228
+ n(
1159
1229
  "Tech Startup",
1160
1230
  {
1161
1231
  primary: "#7c3aed",
@@ -1169,7 +1239,7 @@ i(
1169
1239
  { primary: "#1e1b4b", secondary: "#4c1d95", muted: "#a78bfa" },
1170
1240
  "#c4b5fd"
1171
1241
  );
1172
- i(
1242
+ n(
1173
1243
  "Enterprise",
1174
1244
  {
1175
1245
  primary: "#1e40af",
@@ -1183,7 +1253,7 @@ i(
1183
1253
  { primary: "#1e3a5f", secondary: "#1e40af", muted: "#60a5fa" },
1184
1254
  "#93c5fd"
1185
1255
  );
1186
- i(
1256
+ n(
1187
1257
  "Government",
1188
1258
  {
1189
1259
  primary: "#1d4ed8",
@@ -1197,7 +1267,7 @@ i(
1197
1267
  { primary: "#0f172a", secondary: "#1e293b", muted: "#64748b" },
1198
1268
  "#cbd5e1"
1199
1269
  );
1200
- i(
1270
+ n(
1201
1271
  "Education",
1202
1272
  {
1203
1273
  primary: "#059669",
@@ -1211,7 +1281,7 @@ i(
1211
1281
  { primary: "#064e3b", secondary: "#065f46", muted: "#6ee7b7" },
1212
1282
  "#a7f3d0"
1213
1283
  );
1214
- i(
1284
+ n(
1215
1285
  "Real Estate",
1216
1286
  {
1217
1287
  primary: "#92400e",
@@ -1225,7 +1295,7 @@ i(
1225
1295
  { primary: "#422006", secondary: "#713f12", muted: "#d97706" },
1226
1296
  "#fcd34d"
1227
1297
  );
1228
- i(
1298
+ n(
1229
1299
  "Nord",
1230
1300
  {
1231
1301
  primary: "#5e81ac",
@@ -1239,7 +1309,7 @@ i(
1239
1309
  { primary: "#2e3440", secondary: "#3b4252", muted: "#4c566a" },
1240
1310
  "#d8dee9"
1241
1311
  );
1242
- m(
1312
+ b(
1243
1313
  "Dracula",
1244
1314
  {
1245
1315
  primary: "#bd93f9",
@@ -1253,7 +1323,7 @@ m(
1253
1323
  { primary: "#f8f8f2", secondary: "#c0c0c0", muted: "#6272a4" },
1254
1324
  "#44475a"
1255
1325
  );
1256
- i(
1326
+ n(
1257
1327
  "Solarized Light",
1258
1328
  {
1259
1329
  primary: "#268bd2",
@@ -1267,7 +1337,7 @@ i(
1267
1337
  { primary: "#073642", secondary: "#586e75", muted: "#93a1a1" },
1268
1338
  "#eee8d5"
1269
1339
  );
1270
- m(
1340
+ b(
1271
1341
  "Solarized Dark",
1272
1342
  {
1273
1343
  primary: "#268bd2",
@@ -1281,7 +1351,7 @@ m(
1281
1351
  { primary: "#eee8d5", secondary: "#93a1a1", muted: "#586e75" },
1282
1352
  "#073642"
1283
1353
  );
1284
- m(
1354
+ b(
1285
1355
  "Monokai",
1286
1356
  {
1287
1357
  primary: "#66d9ef",
@@ -1295,7 +1365,7 @@ m(
1295
1365
  { primary: "#f8f8f2", secondary: "#cfcfc2", muted: "#75715e" },
1296
1366
  "#3e3d32"
1297
1367
  );
1298
- m(
1368
+ b(
1299
1369
  "One Dark",
1300
1370
  {
1301
1371
  primary: "#61afef",
@@ -1309,7 +1379,7 @@ m(
1309
1379
  { primary: "#abb2bf", secondary: "#828997", muted: "#545862" },
1310
1380
  "#3e4452"
1311
1381
  );
1312
- m(
1382
+ b(
1313
1383
  "Synthwave",
1314
1384
  {
1315
1385
  primary: "#ff7edb",
@@ -1323,7 +1393,7 @@ m(
1323
1393
  { primary: "#f0e4fc", secondary: "#b4a0cc", muted: "#6c5c84" },
1324
1394
  "#4a3866"
1325
1395
  );
1326
- i(
1396
+ n(
1327
1397
  "Vaporwave",
1328
1398
  {
1329
1399
  primary: "#ff71ce",
@@ -1337,7 +1407,7 @@ i(
1337
1407
  { primary: "#4a1a4e", secondary: "#7b3f7d", muted: "#c080c0" },
1338
1408
  "#d8a8e8"
1339
1409
  );
1340
- m(
1410
+ b(
1341
1411
  "Terminal Green",
1342
1412
  {
1343
1413
  primary: "#00ff41",
@@ -1351,7 +1421,7 @@ m(
1351
1421
  { primary: "#00ff41", secondary: "#00cc33", muted: "#008822" },
1352
1422
  "#003300"
1353
1423
  );
1354
- i(
1424
+ n(
1355
1425
  "Sepia",
1356
1426
  {
1357
1427
  primary: "#8b6914",
@@ -1365,7 +1435,7 @@ i(
1365
1435
  { primary: "#3e2723", secondary: "#5d4037", muted: "#a1887f" },
1366
1436
  "#d7ccc8"
1367
1437
  );
1368
- i(
1438
+ n(
1369
1439
  "Vintage",
1370
1440
  {
1371
1441
  primary: "#8d6e63",
@@ -1379,7 +1449,7 @@ i(
1379
1449
  { primary: "#3e2723", secondary: "#5d4037", muted: "#a1887f" },
1380
1450
  "#bcaaa4"
1381
1451
  );
1382
- m(
1452
+ b(
1383
1453
  "Cyberpunk",
1384
1454
  {
1385
1455
  primary: "#00f0ff",
@@ -1393,7 +1463,7 @@ m(
1393
1463
  { primary: "#e0fbfc", secondary: "#80d4dd", muted: "#3a6b72" },
1394
1464
  "#1c3a44"
1395
1465
  );
1396
- m(
1466
+ b(
1397
1467
  "Neon",
1398
1468
  {
1399
1469
  primary: "#ff00ff",
@@ -1407,7 +1477,7 @@ m(
1407
1477
  { primary: "#ffffff", secondary: "#cccccc", muted: "#666666" },
1408
1478
  "#333333"
1409
1479
  );
1410
- m(
1480
+ b(
1411
1481
  "Retrowave",
1412
1482
  {
1413
1483
  primary: "#f77fbe",
@@ -1421,7 +1491,7 @@ m(
1421
1491
  { primary: "#ffe6f7", secondary: "#c9a0c9", muted: "#6b4c7a" },
1422
1492
  "#4a2d66"
1423
1493
  );
1424
- i(
1494
+ n(
1425
1495
  "Christmas",
1426
1496
  {
1427
1497
  primary: "#c41e3a",
@@ -1435,7 +1505,7 @@ i(
1435
1505
  { primary: "#3b0a0a", secondary: "#7f1d1d", muted: "#dc6868" },
1436
1506
  "#e8a0a0"
1437
1507
  );
1438
- m(
1508
+ b(
1439
1509
  "Halloween",
1440
1510
  {
1441
1511
  primary: "#ff6600",
@@ -1449,7 +1519,7 @@ m(
1449
1519
  { primary: "#ffedd5", secondary: "#fdba74", muted: "#9a5c28" },
1450
1520
  "#5c3400"
1451
1521
  );
1452
- i(
1522
+ n(
1453
1523
  "Valentine",
1454
1524
  {
1455
1525
  primary: "#e11d48",
@@ -1463,7 +1533,7 @@ i(
1463
1533
  { primary: "#4c0519", secondary: "#881337", muted: "#f9a8d4" },
1464
1534
  "#fda4af"
1465
1535
  );
1466
- i(
1536
+ n(
1467
1537
  "Easter",
1468
1538
  {
1469
1539
  primary: "#a78bfa",
@@ -1477,7 +1547,7 @@ i(
1477
1547
  { primary: "#581c87", secondary: "#6d28d9", muted: "#c4b5fd" },
1478
1548
  "#ddd6fe"
1479
1549
  );
1480
- i(
1550
+ n(
1481
1551
  "Summer Beach",
1482
1552
  {
1483
1553
  primary: "#0ea5e9",
@@ -1491,7 +1561,7 @@ i(
1491
1561
  { primary: "#0c4a6e", secondary: "#0369a1", muted: "#7dd3fc" },
1492
1562
  "#fcd34d"
1493
1563
  );
1494
- i(
1564
+ n(
1495
1565
  "Winter Frost",
1496
1566
  {
1497
1567
  primary: "#3b82f6",
@@ -1505,7 +1575,7 @@ i(
1505
1575
  { primary: "#1e3a5f", secondary: "#1e40af", muted: "#93c5fd" },
1506
1576
  "#bfdbfe"
1507
1577
  );
1508
- i(
1578
+ n(
1509
1579
  "Cherry Blossom",
1510
1580
  {
1511
1581
  primary: "#ec4899",
@@ -1519,7 +1589,7 @@ i(
1519
1589
  { primary: "#831843", secondary: "#9d174d", muted: "#f9a8d4" },
1520
1590
  "#fbcfe8"
1521
1591
  );
1522
- i(
1592
+ n(
1523
1593
  "Harvest",
1524
1594
  {
1525
1595
  primary: "#b45309",
@@ -1533,7 +1603,7 @@ i(
1533
1603
  { primary: "#451a03", secondary: "#78350f", muted: "#d97706" },
1534
1604
  "#fcd34d"
1535
1605
  );
1536
- i(
1606
+ n(
1537
1607
  "Japanese Zen",
1538
1608
  {
1539
1609
  primary: "#6b7280",
@@ -1547,7 +1617,7 @@ i(
1547
1617
  { primary: "#2c2c2c", secondary: "#5c5c5c", muted: "#a0998a" },
1548
1618
  "#d5cec0"
1549
1619
  );
1550
- i(
1620
+ n(
1551
1621
  "Moroccan",
1552
1622
  {
1553
1623
  primary: "#c2410c",
@@ -1561,7 +1631,7 @@ i(
1561
1631
  { primary: "#3a1a00", secondary: "#7c2d12", muted: "#d97706" },
1562
1632
  "#f5d0a0"
1563
1633
  );
1564
- i(
1634
+ n(
1565
1635
  "Scandinavian",
1566
1636
  {
1567
1637
  primary: "#4b5563",
@@ -1575,7 +1645,7 @@ i(
1575
1645
  { primary: "#111827", secondary: "#374151", muted: "#9ca3af" },
1576
1646
  "#e5e7eb"
1577
1647
  );
1578
- i(
1648
+ n(
1579
1649
  "Mediterranean",
1580
1650
  {
1581
1651
  primary: "#1e40af",
@@ -1589,7 +1659,7 @@ i(
1589
1659
  { primary: "#1e3a5f", secondary: "#2563eb", muted: "#93c5fd" },
1590
1660
  "#bfdbfe"
1591
1661
  );
1592
- i(
1662
+ n(
1593
1663
  "Chinese New Year",
1594
1664
  {
1595
1665
  primary: "#dc2626",
@@ -1603,7 +1673,7 @@ i(
1603
1673
  { primary: "#450a0a", secondary: "#991b1b", muted: "#f87171" },
1604
1674
  "#fca5a5"
1605
1675
  );
1606
- i(
1676
+ n(
1607
1677
  "Indian Festive",
1608
1678
  {
1609
1679
  primary: "#d97706",
@@ -1617,7 +1687,7 @@ i(
1617
1687
  { primary: "#451a03", secondary: "#92400e", muted: "#f59e0b" },
1618
1688
  "#fcd34d"
1619
1689
  );
1620
- i(
1690
+ n(
1621
1691
  "Brazilian Carnival",
1622
1692
  {
1623
1693
  primary: "#16a34a",
@@ -1631,7 +1701,7 @@ i(
1631
1701
  { primary: "#052e16", secondary: "#166534", muted: "#4ade80" },
1632
1702
  "#86efac"
1633
1703
  );
1634
- i(
1704
+ n(
1635
1705
  "African Earth",
1636
1706
  {
1637
1707
  primary: "#92400e",
@@ -1645,7 +1715,7 @@ i(
1645
1715
  { primary: "#2b1a0e", secondary: "#5c3d1e", muted: "#a08060" },
1646
1716
  "#d4b896"
1647
1717
  );
1648
- m(
1718
+ b(
1649
1719
  "High Contrast Dark",
1650
1720
  {
1651
1721
  primary: "#ffff00",
@@ -1659,7 +1729,7 @@ m(
1659
1729
  { primary: "#ffffff", secondary: "#ffffff", muted: "#cccccc" },
1660
1730
  "#ffffff"
1661
1731
  );
1662
- i(
1732
+ n(
1663
1733
  "Monochrome",
1664
1734
  {
1665
1735
  primary: "#404040",
@@ -1673,7 +1743,7 @@ i(
1673
1743
  { primary: "#1a1a1a", secondary: "#404040", muted: "#808080" },
1674
1744
  "#c0c0c0"
1675
1745
  );
1676
- i(
1746
+ n(
1677
1747
  "Enhanced Contrast",
1678
1748
  {
1679
1749
  primary: "#0050b3",
@@ -1687,7 +1757,7 @@ i(
1687
1757
  { primary: "#000000", secondary: "#1a1a1a", muted: "#595959" },
1688
1758
  "#8c8c8c"
1689
1759
  );
1690
- i(
1760
+ n(
1691
1761
  "Minimalist",
1692
1762
  {
1693
1763
  primary: "#18181b",
@@ -1701,7 +1771,7 @@ i(
1701
1771
  { primary: "#0a0a0a", secondary: "#404040", muted: "#a3a3a3" },
1702
1772
  "#e5e5e5"
1703
1773
  );
1704
- m(
1774
+ b(
1705
1775
  "Warm Dark",
1706
1776
  {
1707
1777
  primary: "#f59e0b",
@@ -1715,7 +1785,7 @@ m(
1715
1785
  { primary: "#fafaf9", secondary: "#d6d3d1", muted: "#78716c" },
1716
1786
  "#57534e"
1717
1787
  );
1718
- m(
1788
+ b(
1719
1789
  "Soft Dark",
1720
1790
  {
1721
1791
  primary: "#a78bfa",
@@ -1729,7 +1799,7 @@ m(
1729
1799
  { primary: "#e8e8f0", secondary: "#a0a0b8", muted: "#5c5c74" },
1730
1800
  "#3e3e58"
1731
1801
  );
1732
- i(
1802
+ n(
1733
1803
  "Coffee",
1734
1804
  {
1735
1805
  primary: "#6f4e37",
@@ -1743,7 +1813,7 @@ i(
1743
1813
  { primary: "#2c1a0e", secondary: "#5c3d28", muted: "#a08868" },
1744
1814
  "#d4c4a8"
1745
1815
  );
1746
- i(
1816
+ n(
1747
1817
  "Wine",
1748
1818
  {
1749
1819
  primary: "#7f1d1d",
@@ -1757,8 +1827,9 @@ i(
1757
1827
  { primary: "#3b0a0a", secondary: "#7f1d1d", muted: "#dc6868" },
1758
1828
  "#e8a0a0"
1759
1829
  );
1760
- b(null);
1761
- const _e = [
1830
+ g(null);
1831
+ g(null);
1832
+ const Ce = [
1762
1833
  {
1763
1834
  target: ".nice-etl-builder",
1764
1835
  titleKey: "tutorial.etlBuilder.intro.title",
@@ -1767,14 +1838,14 @@ const _e = [
1767
1838
  content: "Wire sources → transformations → destinations into a pipeline, switch the views, then run it and save the configuration.",
1768
1839
  placement: "auto"
1769
1840
  }
1770
- ], xe = {
1841
+ ], Be = {
1771
1842
  id: "",
1772
1843
  name: "New Pipeline",
1773
1844
  sources: [],
1774
1845
  transformations: [],
1775
1846
  destinations: [],
1776
1847
  version: 1
1777
- }, P = [
1848
+ }, I = [
1778
1849
  { type: "filter", label: "Filter", icon: "🔍" },
1779
1850
  { type: "map", label: "Map", icon: "🔄" },
1780
1851
  { type: "aggregate", label: "Aggregate", icon: "∑" },
@@ -1792,311 +1863,310 @@ const _e = [
1792
1863
  { type: "cleanse", label: "Cleanse", icon: "🧹" },
1793
1864
  { type: "custom", label: "Custom", icon: "ƒ" }
1794
1865
  ];
1795
- function De({
1796
- pipeline: a,
1866
+ function Pe({
1867
+ pipeline: i,
1797
1868
  dataSources: r = [],
1798
- onChange: c,
1869
+ onChange: a,
1799
1870
  onRun: t,
1800
- onSchedule: y,
1801
- className: u = "",
1802
- tutorial: o
1871
+ onSchedule: s,
1872
+ className: o = "",
1873
+ tutorial: p
1803
1874
  }) {
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), Y = ie(null), h = x(
1807
- (n) => {
1808
- S((s) => {
1809
- const l = n(s);
1810
- return c == null || c(l), l;
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;
1811
1882
  });
1812
1883
  },
1813
- [c]
1814
- ), I = x(
1815
- (n) => {
1816
- var l;
1817
- const s = {
1884
+ [a]
1885
+ ), z = N(
1886
+ (c) => {
1887
+ var y;
1888
+ const l = {
1818
1889
  id: crypto.randomUUID(),
1819
- type: n.type,
1820
- name: n.name,
1821
- config: n.config,
1822
- schema: (l = n.schema) == null ? void 0 : l.tables[0]
1890
+ type: c.type,
1891
+ name: c.name,
1892
+ config: c.config,
1893
+ schema: (y = c.schema) == null ? void 0 : y.tables[0]
1823
1894
  };
1824
- h((g) => ({
1825
- ...g,
1826
- sources: [...g.sources, s]
1895
+ _((x) => ({
1896
+ ...x,
1897
+ sources: [...x.sources, l]
1827
1898
  }));
1828
1899
  },
1829
- [h]
1830
- ), z = x(
1831
- (n, s) => {
1832
- var g;
1833
- const l = {
1900
+ [_]
1901
+ ), U = N(
1902
+ (c, l) => {
1903
+ var x;
1904
+ const y = {
1834
1905
  id: crypto.randomUUID(),
1835
- type: n,
1836
- name: ((g = P.find((R) => R.type === n)) == null ? void 0 : g.label) || n,
1906
+ type: c,
1907
+ name: ((x = I.find((A) => A.type === c)) == null ? void 0 : x.label) || c,
1837
1908
  input: [],
1838
1909
  output: crypto.randomUUID(),
1839
- config: He(n)
1910
+ config: Te(c)
1840
1911
  };
1841
- h((R) => ({
1842
- ...R,
1843
- transformations: [...R.transformations, l]
1844
- })), v({ type: "transformation", id: l.id });
1912
+ _((A) => ({
1913
+ ...A,
1914
+ transformations: [...A.transformations, y]
1915
+ })), v({ type: "transformation", id: y.id });
1845
1916
  },
1846
- [h]
1847
- ), X = x(() => {
1848
- const n = {
1917
+ [_]
1918
+ ), q = N(() => {
1919
+ const c = {
1849
1920
  id: crypto.randomUUID(),
1850
1921
  type: "database",
1851
1922
  name: "New Destination",
1852
1923
  config: {},
1853
1924
  writeMode: "append"
1854
1925
  };
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) {
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) {
1863
1934
  case "source":
1864
- return { ...l, sources: l.sources.filter((g) => g.id !== s) };
1935
+ return { ...y, sources: y.sources.filter((x) => x.id !== l) };
1865
1936
  case "transformation":
1866
1937
  return {
1867
- ...l,
1868
- transformations: l.transformations.filter((g) => g.id !== s)
1938
+ ...y,
1939
+ transformations: y.transformations.filter((x) => x.id !== l)
1869
1940
  };
1870
1941
  case "destination":
1871
- return { ...l, destinations: l.destinations.filter((g) => g.id !== s) };
1942
+ return { ...y, destinations: y.destinations.filter((x) => x.id !== l) };
1872
1943
  default:
1873
- return l;
1944
+ return y;
1874
1945
  }
1875
1946
  }), v(null);
1876
1947
  },
1877
- [h]
1878
- ), Z = x(async () => {
1948
+ [_]
1949
+ ), ee = N(async () => {
1879
1950
  if (t) {
1880
- k(!0);
1951
+ R(!0);
1881
1952
  try {
1882
- const n = await t(p);
1883
- G((s) => [n, ...s].slice(0, 50));
1953
+ const c = await t(u);
1954
+ D((l) => [c, ...l].slice(0, 50));
1884
1955
  } finally {
1885
- k(!1);
1956
+ R(!1);
1886
1957
  }
1887
1958
  }
1888
- }, [p, t]), q = x(
1889
- (n) => {
1890
- h((s) => ({ ...s, schedule: n })), y == null || y(p, n);
1959
+ }, [u, t]), re = N(
1960
+ (c) => {
1961
+ _((l) => ({ ...l, schedule: c })), s == null || s(u, c);
1891
1962
  },
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);
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);
1899
1970
  }
1900
- E(null);
1971
+ L(null);
1901
1972
  }
1902
1973
  },
1903
- [D, z]
1904
- ), ee = () => {
1905
- if (!f)
1974
+ [E, U]
1975
+ ), ie = () => {
1976
+ if (!m)
1906
1977
  return null;
1907
- switch (f.type) {
1978
+ switch (m.type) {
1908
1979
  case "source":
1909
- return p.sources.find((n) => n.id === f.id);
1980
+ return u.sources.find((c) => c.id === m.id);
1910
1981
  case "transformation":
1911
- return p.transformations.find((n) => n.id === f.id);
1982
+ return u.transformations.find((c) => c.id === m.id);
1912
1983
  case "destination":
1913
- return p.destinations.find((n) => n.id === f.id);
1984
+ return u.destinations.find((c) => c.id === m.id);
1914
1985
  default:
1915
1986
  return null;
1916
1987
  }
1917
- };
1918
- return /* @__PURE__ */ d("div", { className: `nice-etl-builder ${u}`, children: [
1919
- /* @__PURE__ */ d("div", { className: "nice-etl-builder__toolbar", children: [
1920
- /* @__PURE__ */ e(
1921
- "input",
1922
- {
1923
- type: "text",
1924
- value: p.name,
1925
- onChange: (n) => h((s) => ({ ...s, name: n.target.value })),
1926
- className: "nice-etl-builder__name-input"
1927
- }
1928
- ),
1929
- /* @__PURE__ */ e("div", { className: "nice-etl-builder__tabs", children: ["design", "code", "schedule", "history"].map((n) => /* @__PURE__ */ e(
1930
- "button",
1931
- {
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)
1935
- },
1936
- n
1937
- )) }),
1938
- /* @__PURE__ */ d("div", { className: "nice-etl-builder__actions", children: [
1939
- /* @__PURE__ */ e("button", { onClick: Z, 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) })
1942
- ] })
1943
- ] }),
1944
- /* @__PURE__ */ d("div", { className: "nice-etl-builder__main", children: [
1945
- _ === "design" && /* @__PURE__ */ d("div", { className: "nice-etl-builder__palette", children: [
1946
- /* @__PURE__ */ e("h4", { children: "Sources" }),
1947
- r.map((n) => /* @__PURE__ */ d(
1948
- "div",
1949
- {
1950
- className: "nice-etl-builder__palette-item",
1951
- onClick: () => I(n),
1952
- children: [
1953
- /* @__PURE__ */ e("span", { className: "nice-etl-builder__palette-icon", children: "🗄️" }),
1954
- /* @__PURE__ */ e("span", { children: n.name })
1955
- ]
1956
- },
1957
- n.id
1958
- )),
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: [
1959
2066
  /* @__PURE__ */ e(
1960
- "button",
2067
+ "input",
1961
2068
  {
1962
- onClick: () => I({ id: "", name: "New Source", type: "database", config: {} }),
1963
- children: "+ Add Source"
2069
+ type: "text",
2070
+ value: u.name,
2071
+ onChange: (c) => _((l) => ({ ...l, name: c.target.value })),
2072
+ className: "nice-etl-builder__name-input"
1964
2073
  }
1965
2074
  ),
1966
- /* @__PURE__ */ e("h4", { children: "Transformations" }),
1967
- P.map((n) => /* @__PURE__ */ d(
1968
- "div",
2075
+ /* @__PURE__ */ e("div", { className: "nice-etl-builder__tabs", children: ["design", "code", "schedule", "history"].map((c) => /* @__PURE__ */ e(
2076
+ "button",
1969
2077
  {
1970
- className: "nice-etl-builder__palette-item",
1971
- draggable: !0,
1972
- onDragStart: () => E(`transform:${n.type}`),
1973
- onDragEnd: () => E(null),
1974
- children: [
1975
- /* @__PURE__ */ e("span", { className: "nice-etl-builder__palette-icon", children: n.icon }),
1976
- /* @__PURE__ */ e("span", { children: n.label })
1977
- ]
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)
1978
2081
  },
1979
- n.type
1980
- )),
1981
- /* @__PURE__ */ e("h4", { children: "Destinations" }),
1982
- /* @__PURE__ */ e("button", { onClick: X, children: "+ Add Destination" })
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
+ ] })
1983
2089
  ] }),
1984
- _ === "design" && /* @__PURE__ */ e(
1985
- "div",
1986
- {
1987
- ref: Y,
1988
- className: "nice-etl-builder__canvas",
1989
- onDragOver: (n) => n.preventDefault(),
1990
- onDrop: Q,
1991
- onClick: () => v(null),
1992
- children: /* @__PURE__ */ d("div", { className: "nice-etl-builder__flow", children: [
1993
- /* @__PURE__ */ d("div", { className: "nice-etl-builder__column", children: [
1994
- /* @__PURE__ */ e("h5", { children: "Sources" }),
1995
- p.sources.map((n) => /* @__PURE__ */ e(
1996
- L,
1997
- {
1998
- node: n,
1999
- nodeType: "source",
2000
- icon: "🗄️",
2001
- isSelected: (f == null ? void 0 : f.id) === n.id,
2002
- onSelect: () => v({ type: "source", id: n.id }),
2003
- onDelete: () => A("source", n.id)
2004
- },
2005
- n.id
2006
- ))
2007
- ] }),
2008
- /* @__PURE__ */ e("div", { className: "nice-etl-builder__arrow", children: "→" }),
2009
- /* @__PURE__ */ d("div", { className: "nice-etl-builder__column nice-etl-builder__column--transforms", children: [
2010
- /* @__PURE__ */ e("h5", { children: "Transformations" }),
2011
- p.transformations.map((n) => {
2012
- const s = P.find((l) => l.type === n.type);
2013
- return /* @__PURE__ */ e(
2014
- L,
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
+ $,
2015
2104
  {
2016
- node: n,
2017
- nodeType: "transformation",
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)
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)
2022
2111
  },
2023
- n.id
2024
- );
2025
- }),
2026
- p.transformations.length === 0 && /* @__PURE__ */ e("div", { className: "nice-etl-builder__empty-column", children: "Drag transformations here" })
2027
- ] }),
2028
- /* @__PURE__ */ e("div", { className: "nice-etl-builder__arrow", children: "→" }),
2029
- /* @__PURE__ */ d("div", { className: "nice-etl-builder__column", children: [
2030
- /* @__PURE__ */ e("h5", { children: "Destinations" }),
2031
- p.destinations.map((n) => /* @__PURE__ */ e(
2032
- L,
2033
- {
2034
- node: n,
2035
- nodeType: "destination",
2036
- icon: "📥",
2037
- isSelected: (f == null ? void 0 : f.id) === n.id,
2038
- onSelect: () => v({ type: "destination", id: n.id }),
2039
- onDelete: () => A("destination", n.id)
2040
- },
2041
- n.id
2042
- ))
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
+ ] })
2043
2151
  ] })
2044
- ] })
2045
- }
2046
- ),
2047
- _ === "code" && /* @__PURE__ */ e("div", { className: "nice-etl-builder__code-view", children: /* @__PURE__ */ e("pre", { children: JSON.stringify(p, null, 2) }) }),
2048
- _ === "schedule" && /* @__PURE__ */ e(
2049
- Se,
2050
- {
2051
- schedule: p.schedule,
2052
- monitoring: p.monitoring,
2053
- onChange: q
2054
- }
2055
- ),
2056
- _ === "history" && /* @__PURE__ */ e(Ce, { runs: J }),
2057
- f && _ === "design" && /* @__PURE__ */ e(
2058
- Ne,
2059
- {
2060
- nodeType: f.type,
2061
- node: ee() ?? null,
2062
- dataSources: r,
2063
- onChange: (n) => {
2064
- h((s) => {
2065
- switch (f.type) {
2066
- case "source":
2067
- return {
2068
- ...s,
2069
- sources: s.sources.map(
2070
- (l) => l.id === f.id ? { ...l, ...n } : l
2071
- )
2072
- };
2073
- case "transformation":
2074
- return {
2075
- ...s,
2076
- transformations: s.transformations.map(
2077
- (l) => l.id === f.id ? { ...l, ...n } : l
2078
- )
2079
- };
2080
- case "destination":
2081
- return {
2082
- ...s,
2083
- destinations: s.destinations.map(
2084
- (l) => l.id === f.id ? { ...l, ...n } : l
2085
- )
2086
- };
2087
- default:
2088
- return s;
2089
- }
2090
- });
2091
- },
2092
- onClose: () => v(null)
2093
- }
2094
- )
2095
- ] })
2096
- ] });
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
+ );
2097
2167
  }
2098
- function He(a) {
2099
- switch (a) {
2168
+ function Te(i) {
2169
+ switch (i) {
2100
2170
  case "filter":
2101
2171
  return { condition: "" };
2102
2172
  case "map":
@@ -2128,30 +2198,30 @@ return data;` };
2128
2198
  return {};
2129
2199
  }
2130
2200
  }
2131
- function L({
2132
- node: a,
2201
+ function $({
2202
+ node: i,
2133
2203
  nodeType: r,
2134
- icon: c,
2204
+ icon: a,
2135
2205
  isSelected: t,
2136
- onSelect: y,
2137
- onDelete: u
2206
+ onSelect: s,
2207
+ onDelete: o
2138
2208
  }) {
2139
2209
  return /* @__PURE__ */ d(
2140
2210
  "div",
2141
2211
  {
2142
2212
  className: `nice-etl-builder__node nice-etl-builder__node--${r} ${t ? "nice-etl-builder__node--selected" : ""}`,
2143
- onClick: (o) => {
2144
- o.stopPropagation(), y();
2213
+ onClick: (p) => {
2214
+ p.stopPropagation(), s();
2145
2215
  },
2146
2216
  children: [
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 }),
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 }),
2149
2219
  /* @__PURE__ */ e(
2150
2220
  "button",
2151
2221
  {
2152
2222
  className: "nice-etl-builder__node-delete",
2153
- onClick: (o) => {
2154
- o.stopPropagation(), u();
2223
+ onClick: (p) => {
2224
+ p.stopPropagation(), o();
2155
2225
  },
2156
2226
  children: "×"
2157
2227
  }
@@ -2160,47 +2230,48 @@ function L({
2160
2230
  }
2161
2231
  );
2162
2232
  }
2163
- function Ne({
2164
- nodeType: a,
2233
+ function ke({
2234
+ nodeType: i,
2165
2235
  node: r,
2166
- dataSources: c,
2236
+ dataSources: a,
2167
2237
  onChange: t,
2168
- onClose: y
2238
+ onClose: s
2169
2239
  }) {
2170
- var u;
2240
+ var p;
2241
+ const { t: o } = k();
2171
2242
  return r ? /* @__PURE__ */ d("div", { className: "nice-etl-builder__properties", children: [
2172
2243
  /* @__PURE__ */ d("div", { className: "nice-etl-builder__properties-header", children: [
2173
2244
  /* @__PURE__ */ d("h4", { children: [
2174
- a.charAt(0).toUpperCase() + a.slice(1),
2245
+ i.charAt(0).toUpperCase() + i.slice(1),
2175
2246
  " Properties"
2176
2247
  ] }),
2177
- /* @__PURE__ */ e("button", { onClick: y, children: "×" })
2248
+ /* @__PURE__ */ e("button", { onClick: s, children: "×" })
2178
2249
  ] }),
2179
2250
  /* @__PURE__ */ d("div", { className: "nice-etl-builder__properties-content", children: [
2180
2251
  /* @__PURE__ */ d("div", { className: "nice-etl-builder__field", children: [
2181
- /* @__PURE__ */ e("label", { children: "Name" }),
2252
+ /* @__PURE__ */ e("label", { children: o("etlBuilder.name", "Name") }),
2182
2253
  /* @__PURE__ */ e(
2183
2254
  "input",
2184
2255
  {
2185
2256
  type: "text",
2186
2257
  value: r.name,
2187
- onChange: (o) => t({ name: o.target.value })
2258
+ onChange: (f) => t({ name: f.target.value })
2188
2259
  }
2189
2260
  )
2190
2261
  ] }),
2191
- a === "source" && /* @__PURE__ */ d(N, { children: [
2262
+ i === "source" && /* @__PURE__ */ d(B, { children: [
2192
2263
  /* @__PURE__ */ d("div", { className: "nice-etl-builder__field", children: [
2193
- /* @__PURE__ */ e("label", { children: "Type" }),
2264
+ /* @__PURE__ */ e("label", { children: o("etlBuilder.type", "Type") }),
2194
2265
  /* @__PURE__ */ d(
2195
2266
  "select",
2196
2267
  {
2197
2268
  value: r.type,
2198
- onChange: (o) => t({ type: o.target.value }),
2269
+ onChange: (f) => t({ type: f.target.value }),
2199
2270
  children: [
2200
- /* @__PURE__ */ e("option", { value: "database", children: "Database" }),
2271
+ /* @__PURE__ */ e("option", { value: "database", children: o("etlBuilder.database", "Database") }),
2201
2272
  /* @__PURE__ */ e("option", { value: "api", children: "API" }),
2202
- /* @__PURE__ */ e("option", { value: "file", children: "File" }),
2203
- /* @__PURE__ */ e("option", { value: "stream", children: "Stream" })
2273
+ /* @__PURE__ */ e("option", { value: "file", children: o("etlBuilder.file", "File") }),
2274
+ /* @__PURE__ */ e("option", { value: "stream", children: o("etlBuilder.stream", "Stream") })
2204
2275
  ]
2205
2276
  }
2206
2277
  )
@@ -2210,81 +2281,84 @@ function Ne({
2210
2281
  "input",
2211
2282
  {
2212
2283
  type: "checkbox",
2213
- checked: ((u = r.incremental) == null ? void 0 : u.enabled) || !1,
2214
- onChange: (o) => {
2215
- var p;
2284
+ checked: ((p = r.incremental) == null ? void 0 : p.enabled) || !1,
2285
+ onChange: (f) => {
2286
+ var u;
2216
2287
  return t({
2217
2288
  incremental: {
2218
2289
  ...r.incremental,
2219
- enabled: o.target.checked,
2220
- column: ((p = r.incremental) == null ? void 0 : p.column) || ""
2290
+ enabled: f.target.checked,
2291
+ column: ((u = r.incremental) == null ? void 0 : u.column) || ""
2221
2292
  }
2222
2293
  });
2223
2294
  }
2224
2295
  }
2225
2296
  ),
2226
- "Incremental Load"
2297
+ o("etlBuilder.incrementalLoad", "Incremental Load")
2227
2298
  ] }) })
2228
2299
  ] }),
2229
- a === "transformation" && /* @__PURE__ */ d(N, { children: [
2300
+ i === "transformation" && /* @__PURE__ */ d(B, { children: [
2230
2301
  /* @__PURE__ */ d("div", { className: "nice-etl-builder__field", children: [
2231
- /* @__PURE__ */ e("label", { children: "Type" }),
2302
+ /* @__PURE__ */ e("label", { children: o("etlBuilder.type", "Type") }),
2232
2303
  /* @__PURE__ */ e("span", { children: r.type })
2233
2304
  ] }),
2234
2305
  r.type === "filter" && /* @__PURE__ */ d("div", { className: "nice-etl-builder__field", children: [
2235
- /* @__PURE__ */ e("label", { children: "Condition" }),
2306
+ /* @__PURE__ */ e("label", { children: o("etlBuilder.condition", "Condition") }),
2236
2307
  /* @__PURE__ */ e(
2237
2308
  "textarea",
2238
2309
  {
2239
2310
  value: String(r.config.condition || ""),
2240
- onChange: (o) => t({
2241
- config: { ...r.config, condition: o.target.value }
2311
+ onChange: (f) => t({
2312
+ config: { ...r.config, condition: f.target.value }
2242
2313
  }),
2243
- placeholder: "e.g., age > 18 AND status = 'active'",
2314
+ placeholder: o(
2315
+ "etlBuilder.conditionPlaceholder",
2316
+ "e.g., age > 18 AND status = 'active'"
2317
+ ),
2244
2318
  rows: 3
2245
2319
  }
2246
2320
  )
2247
2321
  ] }),
2248
- r.type === "derive" && /* @__PURE__ */ d(N, { children: [
2322
+ r.type === "derive" && /* @__PURE__ */ d(B, { children: [
2249
2323
  /* @__PURE__ */ d("div", { className: "nice-etl-builder__field", children: [
2250
- /* @__PURE__ */ e("label", { children: "Column Name" }),
2324
+ /* @__PURE__ */ e("label", { children: o("etlBuilder.columnName", "Column Name") }),
2251
2325
  /* @__PURE__ */ e(
2252
2326
  "input",
2253
2327
  {
2254
2328
  type: "text",
2255
2329
  value: String(r.config.name || ""),
2256
- onChange: (o) => t({
2257
- config: { ...r.config, name: o.target.value }
2330
+ onChange: (f) => t({
2331
+ config: { ...r.config, name: f.target.value }
2258
2332
  })
2259
2333
  }
2260
2334
  )
2261
2335
  ] }),
2262
2336
  /* @__PURE__ */ d("div", { className: "nice-etl-builder__field", children: [
2263
- /* @__PURE__ */ e("label", { children: "Expression" }),
2337
+ /* @__PURE__ */ e("label", { children: o("etlBuilder.expression", "Expression") }),
2264
2338
  /* @__PURE__ */ e(
2265
2339
  "input",
2266
2340
  {
2267
2341
  type: "text",
2268
2342
  value: String(r.config.expression || ""),
2269
- onChange: (o) => t({
2343
+ onChange: (f) => t({
2270
2344
  config: {
2271
2345
  ...r.config,
2272
- expression: o.target.value
2346
+ expression: f.target.value
2273
2347
  }
2274
2348
  }),
2275
- placeholder: "e.g., price * quantity"
2349
+ placeholder: o("etlBuilder.expressionPlaceholder", "e.g., price * quantity")
2276
2350
  }
2277
2351
  )
2278
2352
  ] })
2279
2353
  ] }),
2280
2354
  r.type === "custom" && /* @__PURE__ */ d("div", { className: "nice-etl-builder__field", children: [
2281
- /* @__PURE__ */ e("label", { children: "Code" }),
2355
+ /* @__PURE__ */ e("label", { children: o("etlBuilder.code", "Code") }),
2282
2356
  /* @__PURE__ */ e(
2283
2357
  "textarea",
2284
2358
  {
2285
2359
  value: String(r.config.code || ""),
2286
- onChange: (o) => t({
2287
- config: { ...r.config, code: o.target.value }
2360
+ onChange: (f) => t({
2361
+ config: { ...r.config, code: f.target.value }
2288
2362
  }),
2289
2363
  rows: 10,
2290
2364
  className: "nice-etl-builder__code-input"
@@ -2292,162 +2366,163 @@ function Ne({
2292
2366
  )
2293
2367
  ] })
2294
2368
  ] }),
2295
- a === "destination" && /* @__PURE__ */ d(N, { children: [
2369
+ i === "destination" && /* @__PURE__ */ d(B, { children: [
2296
2370
  /* @__PURE__ */ d("div", { className: "nice-etl-builder__field", children: [
2297
- /* @__PURE__ */ e("label", { children: "Type" }),
2371
+ /* @__PURE__ */ e("label", { children: o("etlBuilder.type", "Type") }),
2298
2372
  /* @__PURE__ */ d(
2299
2373
  "select",
2300
2374
  {
2301
2375
  value: r.type,
2302
- onChange: (o) => t({ type: o.target.value }),
2376
+ onChange: (f) => t({ type: f.target.value }),
2303
2377
  children: [
2304
- /* @__PURE__ */ e("option", { value: "database", children: "Database" }),
2305
- /* @__PURE__ */ e("option", { value: "file", children: "File" }),
2378
+ /* @__PURE__ */ e("option", { value: "database", children: o("etlBuilder.database", "Database") }),
2379
+ /* @__PURE__ */ e("option", { value: "file", children: o("etlBuilder.file", "File") }),
2306
2380
  /* @__PURE__ */ e("option", { value: "api", children: "API" }),
2307
- /* @__PURE__ */ e("option", { value: "warehouse", children: "Data Warehouse" })
2381
+ /* @__PURE__ */ e("option", { value: "warehouse", children: o("etlBuilder.dataWarehouse", "Data Warehouse") })
2308
2382
  ]
2309
2383
  }
2310
2384
  )
2311
2385
  ] }),
2312
2386
  /* @__PURE__ */ d("div", { className: "nice-etl-builder__field", children: [
2313
- /* @__PURE__ */ e("label", { children: "Write Mode" }),
2387
+ /* @__PURE__ */ e("label", { children: o("etlBuilder.writeMode", "Write Mode") }),
2314
2388
  /* @__PURE__ */ d(
2315
2389
  "select",
2316
2390
  {
2317
2391
  value: r.writeMode,
2318
- onChange: (o) => t({ writeMode: o.target.value }),
2392
+ onChange: (f) => t({ writeMode: f.target.value }),
2319
2393
  children: [
2320
- /* @__PURE__ */ e("option", { value: "append", children: "Append" }),
2321
- /* @__PURE__ */ e("option", { value: "overwrite", children: "Overwrite" }),
2322
- /* @__PURE__ */ e("option", { value: "upsert", children: "Upsert" }),
2323
- /* @__PURE__ */ e("option", { value: "merge", children: "Merge" })
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") })
2324
2398
  ]
2325
2399
  }
2326
2400
  )
2327
2401
  ] })
2328
2402
  ] })
2329
2403
  ] })
2330
- ] }) : /* @__PURE__ */ e(N, {});
2404
+ ] }) : /* @__PURE__ */ e(B, {});
2331
2405
  }
2332
- function Se({
2333
- schedule: a,
2406
+ function Re({
2407
+ schedule: i,
2334
2408
  monitoring: r,
2335
- onChange: c
2409
+ onChange: a
2336
2410
  }) {
2337
- const [t, y] = w(a || { enabled: !1 });
2411
+ const { t } = k(), [s, o] = H(i || { enabled: !1 });
2338
2412
  return /* @__PURE__ */ d("div", { className: "nice-etl-builder__schedule-editor", children: [
2339
- /* @__PURE__ */ e("h4", { children: "Schedule Configuration" }),
2413
+ /* @__PURE__ */ e("h4", { children: t("etlBuilder.scheduleConfiguration", "Schedule Configuration") }),
2340
2414
  /* @__PURE__ */ e("div", { className: "nice-etl-builder__field", children: /* @__PURE__ */ d("label", { children: [
2341
2415
  /* @__PURE__ */ e(
2342
2416
  "input",
2343
2417
  {
2344
2418
  type: "checkbox",
2345
- checked: t.enabled,
2346
- onChange: (u) => {
2347
- const o = { ...t, enabled: u.target.checked };
2348
- y(o), c(o);
2419
+ checked: s.enabled,
2420
+ onChange: (p) => {
2421
+ const f = { ...s, enabled: p.target.checked };
2422
+ o(f), a(f);
2349
2423
  }
2350
2424
  }
2351
2425
  ),
2352
- "Enable scheduled execution"
2426
+ t("etlBuilder.enableScheduledExecution", "Enable scheduled execution")
2353
2427
  ] }) }),
2354
- t.enabled && /* @__PURE__ */ d(N, { children: [
2428
+ s.enabled && /* @__PURE__ */ d(B, { children: [
2355
2429
  /* @__PURE__ */ d("div", { className: "nice-etl-builder__field", children: [
2356
- /* @__PURE__ */ e("label", { children: "Cron Expression" }),
2430
+ /* @__PURE__ */ e("label", { children: t("etlBuilder.cronExpression", "Cron Expression") }),
2357
2431
  /* @__PURE__ */ e(
2358
2432
  "input",
2359
2433
  {
2360
2434
  type: "text",
2361
- value: t.cron || "",
2362
- onChange: (u) => {
2363
- const o = { ...t, cron: u.target.value };
2364
- y(o);
2435
+ value: s.cron || "",
2436
+ onChange: (p) => {
2437
+ const f = { ...s, cron: p.target.value };
2438
+ o(f);
2365
2439
  },
2366
- placeholder: "0 0 * * * (every hour)"
2440
+ placeholder: t("etlBuilder.cronPlaceholder", "0 0 * * * (every hour)")
2367
2441
  }
2368
2442
  ),
2369
2443
  /* @__PURE__ */ e("small", { children: "Format: minute hour day month weekday" })
2370
2444
  ] }),
2371
2445
  /* @__PURE__ */ d("div", { className: "nice-etl-builder__field", children: [
2372
- /* @__PURE__ */ e("label", { children: "Timezone" }),
2446
+ /* @__PURE__ */ e("label", { children: t("etlBuilder.timezone", "Timezone") }),
2373
2447
  /* @__PURE__ */ d(
2374
2448
  "select",
2375
2449
  {
2376
- value: t.timezone || "UTC",
2377
- onChange: (u) => {
2378
- const o = { ...t, timezone: u.target.value };
2379
- y(o);
2450
+ value: s.timezone || "UTC",
2451
+ onChange: (p) => {
2452
+ const f = { ...s, timezone: p.target.value };
2453
+ o(f);
2380
2454
  },
2381
2455
  children: [
2382
2456
  /* @__PURE__ */ e("option", { value: "UTC", children: "UTC" }),
2383
- /* @__PURE__ */ e("option", { value: "America/New_York", children: "Eastern Time" }),
2384
- /* @__PURE__ */ e("option", { value: "America/Chicago", children: "Central Time" }),
2385
- /* @__PURE__ */ e("option", { value: "America/Los_Angeles", children: "Pacific Time" }),
2386
- /* @__PURE__ */ e("option", { value: "Europe/London", children: "London" }),
2387
- /* @__PURE__ */ e("option", { value: "Europe/Warsaw", children: "Warsaw" })
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") })
2388
2462
  ]
2389
2463
  }
2390
2464
  )
2391
2465
  ] }),
2392
- /* @__PURE__ */ e("button", { onClick: () => c(t), children: "Save Schedule" })
2466
+ /* @__PURE__ */ e("button", { onClick: () => a(s), children: t("etlBuilder.saveSchedule", "Save Schedule") })
2393
2467
  ] }),
2394
- /* @__PURE__ */ e("h4", { children: "Monitoring" }),
2468
+ /* @__PURE__ */ e("h4", { children: t("etlBuilder.monitoring", "Monitoring") }),
2395
2469
  /* @__PURE__ */ e("div", { className: "nice-etl-builder__field", children: /* @__PURE__ */ d("label", { children: [
2396
2470
  /* @__PURE__ */ e("input", { type: "checkbox", checked: (r == null ? void 0 : r.alertOnFailure) || !1, disabled: !0 }),
2397
- "Alert on failure"
2471
+ t("etlBuilder.alertOnFailure", "Alert on failure")
2398
2472
  ] }) }),
2399
2473
  /* @__PURE__ */ d("div", { className: "nice-etl-builder__field", children: [
2400
- /* @__PURE__ */ e("label", { children: "Log Level" }),
2474
+ /* @__PURE__ */ e("label", { children: t("etlBuilder.logLevel", "Log Level") }),
2401
2475
  /* @__PURE__ */ d("select", { value: (r == null ? void 0 : r.logLevel) || "info", disabled: !0, children: [
2402
- /* @__PURE__ */ e("option", { value: "error", children: "Error" }),
2403
- /* @__PURE__ */ e("option", { value: "warn", children: "Warning" }),
2404
- /* @__PURE__ */ e("option", { value: "info", children: "Info" }),
2405
- /* @__PURE__ */ e("option", { value: "debug", children: "Debug" })
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") })
2406
2480
  ] })
2407
2481
  ] })
2408
2482
  ] });
2409
2483
  }
2410
- function Ce({ runs: a }) {
2484
+ function De({ runs: i }) {
2485
+ const { t: r } = k();
2411
2486
  return /* @__PURE__ */ d("div", { className: "nice-etl-builder__history-view", children: [
2412
- /* @__PURE__ */ e("h4", { children: "Run History" }),
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: [
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: [
2414
2489
  /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ d("tr", { children: [
2415
- /* @__PURE__ */ e("th", { children: "Status" }),
2416
- /* @__PURE__ */ e("th", { children: "Start Time" }),
2417
- /* @__PURE__ */ e("th", { children: "Duration" }),
2418
- /* @__PURE__ */ e("th", { children: "Rows" }),
2419
- /* @__PURE__ */ e("th", { children: "Errors" })
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") })
2420
2495
  ] }) }),
2421
- /* @__PURE__ */ e("tbody", { children: a.map((r) => /* @__PURE__ */ d(
2496
+ /* @__PURE__ */ e("tbody", { children: i.map((a) => /* @__PURE__ */ d(
2422
2497
  "tr",
2423
2498
  {
2424
- className: `nice-etl-builder__run nice-etl-builder__run--${r.status}`,
2499
+ className: `nice-etl-builder__run nice-etl-builder__run--${a.status}`,
2425
2500
  children: [
2426
2501
  /* @__PURE__ */ e("td", { children: /* @__PURE__ */ d(
2427
2502
  "span",
2428
2503
  {
2429
- className: `nice-etl-builder__status nice-etl-builder__status--${r.status}`,
2504
+ className: `nice-etl-builder__status nice-etl-builder__status--${a.status}`,
2430
2505
  children: [
2431
- r.status === "success" ? "✓" : r.status === "failed" ? "✗" : "⏳",
2432
- r.status
2506
+ a.status === "success" ? "✓" : a.status === "failed" ? "✗" : "⏳",
2507
+ a.status
2433
2508
  ]
2434
2509
  }
2435
2510
  ) }),
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` : "-" }),
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` : "-" }),
2438
2513
  /* @__PURE__ */ d("td", { children: [
2439
- r.rowsProcessed.toLocaleString(),
2514
+ a.rowsProcessed.toLocaleString(),
2440
2515
  " / ",
2441
- r.rowsWritten.toLocaleString()
2516
+ a.rowsWritten.toLocaleString()
2442
2517
  ] }),
2443
- /* @__PURE__ */ e("td", { children: r.errors.length })
2518
+ /* @__PURE__ */ e("td", { children: a.errors.length })
2444
2519
  ]
2445
2520
  },
2446
- r.id
2521
+ a.id
2447
2522
  )) })
2448
2523
  ] })
2449
2524
  ] });
2450
2525
  }
2451
2526
  export {
2452
- De as NiceETLBuilder
2527
+ Pe as NiceETLBuilder
2453
2528
  };