@nice2dev/ui-bi 1.0.28 → 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.cjs CHANGED
@@ -1,28 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("react"),Y=(a,r)=>r,X=s.createContext(Y);function Z(){return{t:s.useContext(X)}}s.createContext({dir:"ltr",isRTL:!1,flip:a=>a,value:a=>a.ltr});s.createContext(null);s.createContext(null);const Q={radius:"md",shadow:"md",fill:"solid",buttonStyle:"flat",inputStyle:"bordered",cardStyle:"elevated",badgeStyle:"solid",tabStyle:"underline",toggleStyle:"default",tooltipStyle:"dark",modalStyle:"default",tableStyle:"default",menuStyle:"default",animation:"normal",density:"normal"};s.createContext({displayStyle:"default",variantConfig:Q,setDisplayStyle:()=>{}});s.createContext({});s.createContext({direction:"ltr",isRTL:!1,flip:a=>a,flipStyle:(a,r)=>({[a]:r})});s.createContext({permissions:{},getAccessMode:()=>"full"});s.createContext(null);const ee=process.env.NODE_ENV==="development";let L={enabled:ee,slowRenderThreshold:16};const M=[],R=new Map,F=new Map;function re(){M.length=0,R.clear(),F.clear()}function ae(a){const r=L.slowRenderThreshold;return M.filter(c=>c.actualDuration>r)}function x(a){return a<1?`${(a*1e3).toFixed(0)}μs`:a<1e3?`${a.toFixed(2)}ms`:`${(a/1e3).toFixed(2)}s`}function ie(){const a=Array.from(R.values()),r=ae(),c=a.reduce((u,t)=>u+t.renderCount,0),d=a.length>0?a.reduce((u,t)=>u+t.avgRenderTime,0)/a.length:0,y=Array.from(F.values());return{stats:a,slowRenders:r,totalRenders:c,avgRenderTime:d,marks:y}}function ne(){const a=ie();console.group("%c[Nice2Dev Performance Report]","color: var(--nice-info, #6366f1); font-weight: bold; font-size: 14px"),console.log(`Total renders: ${a.totalRenders}`),console.log(`Average render time: ${x(a.avgRenderTime)}`),console.log(`Slow renders: ${a.slowRenders.length}`),console.group("Component Stats"),console.table(a.stats.sort((r,c)=>c.totalRenderTime-r.totalRenderTime).map(r=>({Name:r.componentName,Renders:r.renderCount,"Avg Time":x(r.avgRenderTime),"Max Time":x(r.maxRenderTime),"Total Time":x(r.totalRenderTime),"Slow Renders":r.slowRenderCount}))),console.groupEnd(),a.slowRenders.length>0&&(console.group("Slow Renders (last 10)"),console.table(a.slowRenders.slice(-10).map(r=>({Component:r.componentName,Phase:r.phase,Duration:x(r.actualDuration),Time:new Date(r.timestamp).toLocaleTimeString()}))),console.groupEnd()),a.marks.length>0&&(console.group("Custom Marks"),console.table(a.marks.filter(r=>r.duration).map(r=>({Name:r.name,Duration:x(r.duration)}))),console.groupEnd()),console.groupEnd()}const ce=s.memo(({position:a="bottom-right",defaultCollapsed:r=!0})=>{const[c,d]=s.useState(r),[y,u]=s.useState([]),[t,p]=s.useState({used:0,total:0});if(s.useEffect(()=>{const o=()=>{const g=Array.from(R.values());u(g.sort((_,H)=>H.totalRenderTime-_.totalRenderTime).slice(0,10));const j=window.performance;j.memory&&p({used:j.memory.usedJSHeapSize/1024/1024,total:j.memory.totalJSHeapSize/1024/1024})};o();const b=setInterval(o,2e3);return()=>clearInterval(b)},[]),!L.enabled)return null;const w={position:"fixed",zIndex:99999,...a.includes("top")?{top:8}:{bottom:8},...a.includes("left")?{left:8}:{right:8}};return e.jsxs("div",{style:{...w,background:"var(--nice-overlay-85, rgba(0, 0, 0, 0.85))",color:"var(--bg-primary, #fff)",borderRadius:8,fontSize:11,fontFamily:"Monaco, Consolas, monospace",padding:c?"4px 8px":8,maxWidth:c?"auto":300,maxHeight:c?"auto":400,overflow:"auto"},children:[e.jsxs("div",{style:{cursor:"pointer",display:"flex",alignItems:"center",gap:8},onClick:()=>d(o=>!o),children:[e.jsx("span",{style:{color:"var(--color-success, #22c55e)"},children:"●"}),e.jsx("span",{children:"Profiler"}),t.used>0&&e.jsxs("span",{style:{color:t.used>100?"var(--color-warning, #f59e0b)":"var(--text-muted, #64748b)"},children:[t.used.toFixed(0),"MB"]}),e.jsx("span",{style:{marginLeft:"auto",opacity:.5},children:c?"▼":"▲"})]}),!c&&e.jsxs("div",{style:{marginTop:8},children:[e.jsx("div",{style:{borderBottom:"1px solid var(--border-color, #333)",paddingBottom:4,marginBottom:8},children:e.jsx("strong",{children:"Top Components"})}),y.map(o=>e.jsxs("div",{style:{marginBottom:4,display:"flex",gap:8},children:[e.jsx("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis"},children:o.componentName}),e.jsx("span",{style:{color:o.avgRenderTime>16?"var(--color-warning, #f59e0b)":"var(--color-success, #22c55e)"},children:x(o.avgRenderTime)}),e.jsxs("span",{style:{color:"var(--text-muted, #64748b)",minWidth:30,textAlign:"right"},children:["x",o.renderCount]})]},o.componentName)),e.jsxs("div",{style:{marginTop:8,display:"flex",gap:8},children:[e.jsx("button",{onClick:ne,style:{flex:1,padding:"4px 8px",background:"var(--bg-tertiary, #333)",border:"none",borderRadius:4,color:"var(--bg-primary, #fff)",cursor:"pointer",fontSize:10},children:"Print Report"}),e.jsx("button",{onClick:re,style:{flex:1,padding:"4px 8px",background:"var(--bg-tertiary, #333)",border:"none",borderRadius:4,color:"var(--bg-primary, #fff)",cursor:"pointer",fontSize:10},children:"Clear"})]})]})]})});ce.displayName="ProfilerOverlay";process.env.NODE_ENV;s.createContext(null);const te=s.createContext({enabled:!0,active:!1,run:()=>{}});function se(){return s.useContext(te)}function de(a,r){if(!a)return null;if(a===!0)return r&&r.length>0?r:null;if(Array.isArray(a))return a.length>0?a:null;const c=a.steps??r;return c&&c.length>0?c:null}function oe(a,r){return a.map(c=>({target:c.target,title:c.titleKey?r(c.titleKey,c.title??""):c.title??"",content:c.contentKey?r(c.contentKey,c.content??""):c.content??"",placement:c.placement,highlightPadding:c.highlightPadding,showArrow:c.showArrow,scrollIntoView:c.scrollIntoView,disableInteraction:c.disableInteraction}))}const fe=({steps:a,autoStart:r,label:c,size:d="md",className:y,style:u,"data-testid":t})=>{const{enabled:p,run:w}=se(),{t:o}=Z();if(!p||!a||a.length===0)return null;const b=c??o("tutorial.startAria","Start tutorial");return e.jsx("button",{type:"button",className:`nice-tutorial-button nice-tutorial-button--${d}`+(y?` ${y}`:""),style:u,"data-testid":t,"aria-label":b,title:b,onClick:()=>w(oe(a,o),{autoStart:r}),children:"?"})},P="nice-tutorial-button-styles";if(typeof document<"u"&&!document.getElementById(P)){const a=document.createElement("style");a.id=P,a.textContent=`
2
- .nice-tutorial-button {
3
- display: inline-flex;
4
- align-items: center;
5
- justify-content: center;
6
- border: 1px solid var(--nice-border, #cbd5e1);
7
- background: var(--nice-bg, #fff);
8
- color: var(--nice-text-secondary, #475569);
9
- border-radius: var(--nice-radius-full, 9999px);
10
- cursor: help;
11
- font-weight: 700;
12
- line-height: 1;
13
- padding: 0;
14
- transition: background var(--nice-transition, 200ms ease), color var(--nice-transition, 200ms ease), border-color var(--nice-transition, 200ms ease);
15
- }
16
- .nice-tutorial-button:hover {
17
- background: var(--nice-primary, #2563eb);
18
- border-color: var(--nice-primary, #2563eb);
19
- color: var(--nice-text-inverse, #fff);
20
- }
21
- .nice-tutorial-button:focus-visible {
22
- outline: none;
23
- box-shadow: 0 0 0 2px var(--nice-bg, #fff), 0 0 0 4px var(--nice-primary, #2563eb);
24
- }
25
- .nice-tutorial-button--sm { width: 16px; height: 16px; font-size: 11px; }
26
- .nice-tutorial-button--md { width: 20px; height: 20px; font-size: 12px; }
27
- `,document.head.appendChild(a)}s.createContext(null);s.createContext(null);s.createContext(null);const I={space1:"4px",space2:"8px",space3:"12px",space4:"16px",space5:"20px",space6:"24px",space8:"32px"},z={fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontSizeXs:"0.75rem",fontSizeSm:"0.8125rem",fontSizeMd:"0.875rem",fontSizeLg:"1rem",fontSizeXl:"1.125rem",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeight:1.5},U={fast:"120ms ease",normal:"200ms ease",slow:"300ms ease"},O=a=>({color:a,radiusSm:"4px",radiusMd:"6px",radiusLg:"8px",radiusXl:"12px",radiusFull:"9999px"}),le={sm:"0 1px 2px rgba(0,0,0,0.05)",md:"0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1)",lg:"0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1)",xl:"0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1)"},ye={sm:"0 1px 2px rgba(0,0,0,0.3)",md:"0 4px 6px -1px rgba(0,0,0,0.4)",lg:"0 10px 15px -3px rgba(0,0,0,0.4)",xl:"0 20px 25px -5px rgba(0,0,0,0.4)"};function i(a,r,c,d,y){return{name:a,darkMode:"light",colors:{...r,surface:r.surface??c.primary,surfaceHover:r.surfaceHover??c.secondary},backgrounds:{...c,elevated:c.elevated??c.primary,inset:c.inset??c.tertiary,canvas:c.canvas??c.primary},text:{...d,inverse:d.inverse??"#ffffff"},borders:O(y),shadows:le,spacing:I,typography:z,transitions:U}}function m(a,r,c,d,y){return{name:a,darkMode:"dark",colors:{...r,surface:r.surface??c.secondary,surfaceHover:r.surfaceHover??c.tertiary},backgrounds:{...c,elevated:c.elevated??c.secondary,inset:c.inset??c.primary,canvas:c.canvas??c.primary},text:{...d,inverse:d.inverse??"#0f172a"},borders:O(y),shadows:ye,spacing:I,typography:z,transitions:U}}i("Slate",{primary:"#64748b",primaryHover:"#475569",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#f8fafc",secondary:"#f1f5f9",tertiary:"#e2e8f0",hover:"#e2e8f0"},{primary:"#1e293b",secondary:"#475569",muted:"#94a3b8"},"#cbd5e1");i("Zinc",{primary:"#71717a",primaryHover:"#52525b",success:"#22c55e",warning:"#eab308",error:"#ef4444",info:"#06b6d4"},{primary:"#fafafa",secondary:"#f4f4f5",tertiary:"#e4e4e7",hover:"#e4e4e7"},{primary:"#18181b",secondary:"#3f3f46",muted:"#a1a1aa"},"#d4d4d8");i("Stone",{primary:"#78716c",primaryHover:"#57534e",success:"#16a34a",warning:"#ca8a04",error:"#dc2626",info:"#0891b2"},{primary:"#fafaf9",secondary:"#f5f5f4",tertiary:"#e7e5e4",hover:"#e7e5e4"},{primary:"#1c1917",secondary:"#44403c",muted:"#a8a29e"},"#d6d3d1");i("Cool Gray",{primary:"#6b7280",primaryHover:"#4b5563",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#3b82f6"},{primary:"#f9fafb",secondary:"#f3f4f6",tertiary:"#e5e7eb",hover:"#e5e7eb"},{primary:"#111827",secondary:"#374151",muted:"#9ca3af"},"#d1d5db");i("Warm Gray",{primary:"#7c7568",primaryHover:"#5c564c",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#faf9f7",secondary:"#f5f4f0",tertiary:"#e8e6e1",hover:"#e8e6e1"},{primary:"#1f1d19",secondary:"#4a463d",muted:"#a09888"},"#d4d0c8");i("Silver",{primary:"#94a3b8",primaryHover:"#64748b",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#38bdf8"},{primary:"#f8fafc",secondary:"#f1f5f9",tertiary:"#e2e8f0",hover:"#e2e8f0"},{primary:"#334155",secondary:"#64748b",muted:"#94a3b8"},"#cbd5e1");i("Charcoal",{primary:"#374151",primaryHover:"#1f2937",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#f9fafb",secondary:"#f3f4f6",tertiary:"#e5e7eb",hover:"#e5e7eb"},{primary:"#111827",secondary:"#374151",muted:"#6b7280"},"#d1d5db");i("Ivory",{primary:"#92876d",primaryHover:"#7a6f55",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#fffef7",secondary:"#faf6eb",tertiary:"#f0ead6",hover:"#f0ead6"},{primary:"#2b2517",secondary:"#5c5340",muted:"#9c9280"},"#ddd8c4");i("Rose",{primary:"#e11d48",primaryHover:"#be123c",success:"#16a34a",warning:"#ea580c",error:"#dc2626",info:"#0891b2"},{primary:"#fff1f2",secondary:"#ffe4e6",tertiary:"#fecdd3",hover:"#ffe4e6"},{primary:"#4c0519",secondary:"#881337",muted:"#f43f5e"},"#fda4af");i("Emerald",{primary:"#059669",primaryHover:"#047857",success:"#16a34a",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#ecfdf5",secondary:"#d1fae5",tertiary:"#a7f3d0",hover:"#d1fae5"},{primary:"#064e3b",secondary:"#065f46",muted:"#34d399"},"#6ee7b7");i("Amber",{primary:"#d97706",primaryHover:"#b45309",success:"#16a34a",warning:"#ca8a04",error:"#dc2626",info:"#0284c7"},{primary:"#fffbeb",secondary:"#fef3c7",tertiary:"#fde68a",hover:"#fef3c7"},{primary:"#451a03",secondary:"#78350f",muted:"#f59e0b"},"#fcd34d");i("Violet",{primary:"#7c3aed",primaryHover:"#6d28d9",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#f5f3ff",secondary:"#ede9fe",tertiary:"#ddd6fe",hover:"#ede9fe"},{primary:"#2e1065",secondary:"#4c1d95",muted:"#a78bfa"},"#c4b5fd");i("Teal",{primary:"#0d9488",primaryHover:"#0f766e",success:"#16a34a",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#f0fdfa",secondary:"#ccfbf1",tertiary:"#99f6e4",hover:"#ccfbf1"},{primary:"#134e4a",secondary:"#115e59",muted:"#2dd4bf"},"#5eead4");i("Indigo",{primary:"#4f46e5",primaryHover:"#4338ca",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#eef2ff",secondary:"#e0e7ff",tertiary:"#c7d2fe",hover:"#e0e7ff"},{primary:"#1e1b4b",secondary:"#312e81",muted:"#818cf8"},"#a5b4fc");i("Cyan",{primary:"#0891b2",primaryHover:"#0e7490",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#0284c7"},{primary:"#ecfeff",secondary:"#cffafe",tertiary:"#a5f3fc",hover:"#cffafe"},{primary:"#164e63",secondary:"#155e75",muted:"#22d3ee"},"#67e8f9");i("Lime",{primary:"#65a30d",primaryHover:"#4d7c0f",success:"#16a34a",warning:"#ca8a04",error:"#dc2626",info:"#0891b2"},{primary:"#f7fee7",secondary:"#ecfccb",tertiary:"#d9f99d",hover:"#ecfccb"},{primary:"#1a2e05",secondary:"#365314",muted:"#84cc16"},"#bef264");i("Pink",{primary:"#db2777",primaryHover:"#be185d",success:"#10b981",warning:"#f59e0b",error:"#dc2626",info:"#06b6d4"},{primary:"#fdf2f8",secondary:"#fce7f3",tertiary:"#fbcfe8",hover:"#fce7f3"},{primary:"#500724",secondary:"#831843",muted:"#f472b6"},"#f9a8d4");i("Orange",{primary:"#ea580c",primaryHover:"#c2410c",success:"#16a34a",warning:"#ca8a04",error:"#dc2626",info:"#0891b2"},{primary:"#fff7ed",secondary:"#ffedd5",tertiary:"#fed7aa",hover:"#ffedd5"},{primary:"#431407",secondary:"#7c2d12",muted:"#fb923c"},"#fdba74");i("Fuchsia",{primary:"#c026d3",primaryHover:"#a21caf",success:"#10b981",warning:"#eab308",error:"#ef4444",info:"#06b6d4"},{primary:"#fdf4ff",secondary:"#fae8ff",tertiary:"#f5d0fe",hover:"#fae8ff"},{primary:"#4a044e",secondary:"#701a75",muted:"#d946ef"},"#e879f9");i("Sky",{primary:"#0284c7",primaryHover:"#0369a1",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#f0f9ff",secondary:"#e0f2fe",tertiary:"#bae6fd",hover:"#e0f2fe"},{primary:"#0c4a6e",secondary:"#075985",muted:"#38bdf8"},"#7dd3fc");i("Ruby",{primary:"#be123c",primaryHover:"#9f1239",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#fff1f2",secondary:"#ffe4e6",tertiary:"#fecdd3",hover:"#ffe4e6"},{primary:"#4c0519",secondary:"#881337",muted:"#fb7185"},"#fda4af");i("Coral",{primary:"#f97316",primaryHover:"#ea580c",success:"#10b981",warning:"#eab308",error:"#ef4444",info:"#06b6d4"},{primary:"#fff7ed",secondary:"#ffedd5",tertiary:"#fed7aa",hover:"#ffedd5"},{primary:"#431407",secondary:"#9a3412",muted:"#fb923c"},"#fdba74");m("Midnight",{primary:"#818cf8",primaryHover:"#6366f1",success:"#34d399",warning:"#fbbf24",error:"#f87171",info:"#22d3ee"},{primary:"#020617",secondary:"#0f172a",tertiary:"#1e293b",hover:"#1e293b"},{primary:"#f1f5f9",secondary:"#94a3b8",muted:"#475569"},"#1e293b");m("Obsidian",{primary:"#a78bfa",primaryHover:"#8b5cf6",success:"#4ade80",warning:"#facc15",error:"#fb7185",info:"#38bdf8"},{primary:"#09090b",secondary:"#18181b",tertiary:"#27272a",hover:"#27272a"},{primary:"#fafafa",secondary:"#a1a1aa",muted:"#52525b"},"#3f3f46");m("Eclipse",{primary:"#c084fc",primaryHover:"#a855f7",success:"#34d399",warning:"#fbbf24",error:"#f87171",info:"#67e8f9"},{primary:"#0c0a1d",secondary:"#1a1533",tertiary:"#2a2248",hover:"#2a2248"},{primary:"#f5f3ff",secondary:"#a78bfa",muted:"#6d5eac"},"#3b3266");m("Onyx",{primary:"#60a5fa",primaryHover:"#3b82f6",success:"#4ade80",warning:"#fbbf24",error:"#f87171",info:"#22d3ee"},{primary:"#000000",secondary:"#0a0a0a",tertiary:"#171717",hover:"#171717"},{primary:"#ffffff",secondary:"#a3a3a3",muted:"#525252"},"#262626");m("Carbon",{primary:"#38bdf8",primaryHover:"#0ea5e9",success:"#4ade80",warning:"#facc15",error:"#f87171",info:"#67e8f9"},{primary:"#161616",secondary:"#262626",tertiary:"#393939",hover:"#393939"},{primary:"#f4f4f4",secondary:"#c6c6c6",muted:"#6f6f6f"},"#525252");m("Cosmos",{primary:"#6366f1",primaryHover:"#4f46e5",success:"#34d399",warning:"#fbbf24",error:"#f87171",info:"#22d3ee"},{primary:"#030712",secondary:"#111827",tertiary:"#1f2937",hover:"#1f2937"},{primary:"#e5e7eb",secondary:"#9ca3af",muted:"#4b5563"},"#374151");m("Nebula",{primary:"#e879f9",primaryHover:"#d946ef",success:"#4ade80",warning:"#fbbf24",error:"#fb7185",info:"#67e8f9"},{primary:"#0d0117",secondary:"#1a0533",tertiary:"#2d0a52",hover:"#2d0a52"},{primary:"#fae8ff",secondary:"#d8b4fe",muted:"#7c3aed"},"#581c87");m("Abyss",{primary:"#22d3ee",primaryHover:"#06b6d4",success:"#34d399",warning:"#fbbf24",error:"#f87171",info:"#38bdf8"},{primary:"#001219",secondary:"#002a3a",tertiary:"#003e54",hover:"#003e54"},{primary:"#e0f2fe",secondary:"#7dd3fc",muted:"#0369a1"},"#075985");m("Shadow",{primary:"#a3a3a3",primaryHover:"#737373",success:"#4ade80",warning:"#facc15",error:"#f87171",info:"#38bdf8"},{primary:"#171717",secondary:"#1f1f1f",tertiary:"#2a2a2a",hover:"#2a2a2a"},{primary:"#e5e5e5",secondary:"#a3a3a3",muted:"#525252"},"#404040");m("Emerald Dark",{primary:"#34d399",primaryHover:"#10b981",success:"#4ade80",warning:"#fbbf24",error:"#f87171",info:"#22d3ee"},{primary:"#022c22",secondary:"#064e3b",tertiary:"#065f46",hover:"#065f46"},{primary:"#ecfdf5",secondary:"#6ee7b7",muted:"#047857"},"#047857");i("Forest",{primary:"#166534",primaryHover:"#14532d",success:"#22c55e",warning:"#ca8a04",error:"#dc2626",info:"#0891b2"},{primary:"#f0fdf4",secondary:"#dcfce7",tertiary:"#bbf7d0",hover:"#dcfce7"},{primary:"#052e16",secondary:"#166534",muted:"#4ade80"},"#86efac");i("Ocean",{primary:"#0369a1",primaryHover:"#075985",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#f0f9ff",secondary:"#e0f2fe",tertiary:"#bae6fd",hover:"#e0f2fe"},{primary:"#0c4a6e",secondary:"#0369a1",muted:"#38bdf8"},"#7dd3fc");i("Desert",{primary:"#b45309",primaryHover:"#92400e",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#fefce8",secondary:"#fef9c3",tertiary:"#fef08a",hover:"#fef9c3"},{primary:"#422006",secondary:"#713f12",muted:"#ca8a04"},"#fde047");i("Sunset",{primary:"#ea580c",primaryHover:"#c2410c",success:"#16a34a",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#fff7ed",secondary:"#ffedd5",tertiary:"#fed7aa",hover:"#ffedd5"},{primary:"#431407",secondary:"#9a3412",muted:"#f97316"},"#fdba74");i("Aurora",{primary:"#0d9488",primaryHover:"#0f766e",success:"#22c55e",warning:"#eab308",error:"#ef4444",info:"#06b6d4"},{primary:"#f0fdfa",secondary:"#ccfbf1",tertiary:"#99f6e4",hover:"#ccfbf1"},{primary:"#134e4a",secondary:"#115e59",muted:"#2dd4bf"},"#5eead4");i("Lavender",{primary:"#7e22ce",primaryHover:"#6b21a8",success:"#16a34a",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#faf5ff",secondary:"#f3e8ff",tertiary:"#e9d5ff",hover:"#f3e8ff"},{primary:"#3b0764",secondary:"#581c87",muted:"#a855f7"},"#d8b4fe");i("Autumn",{primary:"#c2410c",primaryHover:"#9a3412",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#fef2f2",secondary:"#fee2e2",tertiary:"#fecaca",hover:"#fee2e2"},{primary:"#450a0a",secondary:"#7f1d1d",muted:"#f87171"},"#fca5a5");i("Spring",{primary:"#16a34a",primaryHover:"#15803d",success:"#22c55e",warning:"#eab308",error:"#ef4444",info:"#06b6d4"},{primary:"#f0fdf4",secondary:"#dcfce7",tertiary:"#bbf7d0",hover:"#dcfce7"},{primary:"#14532d",secondary:"#166534",muted:"#4ade80"},"#86efac");i("Arctic",{primary:"#0ea5e9",primaryHover:"#0284c7",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#f0f9ff",secondary:"#e0f2fe",tertiary:"#bae6fd",hover:"#e0f2fe"},{primary:"#0c4a6e",secondary:"#0369a1",muted:"#7dd3fc"},"#bae6fd");i("Tropical",{primary:"#0d9488",primaryHover:"#0f766e",success:"#16a34a",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#ecfdf5",secondary:"#d1fae5",tertiary:"#a7f3d0",hover:"#d1fae5"},{primary:"#064e3b",secondary:"#065f46",muted:"#6ee7b7"},"#a7f3d0");i("Pastel Rose",{primary:"#f472b6",primaryHover:"#ec4899",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#fdf2f8",secondary:"#fce7f3",tertiary:"#fbcfe8",hover:"#fce7f3"},{primary:"#831843",secondary:"#9d174d",muted:"#f9a8d4"},"#f9a8d4");i("Pastel Sky",{primary:"#38bdf8",primaryHover:"#0ea5e9",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#f0f9ff",secondary:"#e0f2fe",tertiary:"#bae6fd",hover:"#e0f2fe"},{primary:"#075985",secondary:"#0369a1",muted:"#7dd3fc"},"#bae6fd");i("Pastel Mint",{primary:"#34d399",primaryHover:"#10b981",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#ecfdf5",secondary:"#d1fae5",tertiary:"#a7f3d0",hover:"#d1fae5"},{primary:"#065f46",secondary:"#047857",muted:"#6ee7b7"},"#a7f3d0");i("Pastel Peach",{primary:"#fb923c",primaryHover:"#f97316",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#fff7ed",secondary:"#ffedd5",tertiary:"#fed7aa",hover:"#ffedd5"},{primary:"#7c2d12",secondary:"#9a3412",muted:"#fdba74"},"#fed7aa");i("Pastel Lavender",{primary:"#a78bfa",primaryHover:"#8b5cf6",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#f5f3ff",secondary:"#ede9fe",tertiary:"#ddd6fe",hover:"#ede9fe"},{primary:"#4c1d95",secondary:"#5b21b6",muted:"#c4b5fd"},"#ddd6fe");i("Pastel Lemon",{primary:"#facc15",primaryHover:"#eab308",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#fefce8",secondary:"#fef9c3",tertiary:"#fef08a",hover:"#fef9c3"},{primary:"#713f12",secondary:"#854d0e",muted:"#fde047"},"#fef08a");i("Pastel Sage",{primary:"#86efac",primaryHover:"#4ade80",success:"#22c55e",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#f0fdf4",secondary:"#dcfce7",tertiary:"#bbf7d0",hover:"#dcfce7"},{primary:"#166534",secondary:"#15803d",muted:"#86efac"},"#bbf7d0");i("Pastel Coral",{primary:"#fb7185",primaryHover:"#f43f5e",success:"#4ade80",warning:"#fcd34d",error:"#ef4444",info:"#67e8f9"},{primary:"#fff1f2",secondary:"#ffe4e6",tertiary:"#fecdd3",hover:"#ffe4e6"},{primary:"#881337",secondary:"#9f1239",muted:"#fda4af"},"#fecdd3");i("Banking",{primary:"#1e3a5f",primaryHover:"#152c4a",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#f8fafc",secondary:"#f1f5f9",tertiary:"#e2e8f0",hover:"#e2e8f0"},{primary:"#0f172a",secondary:"#334155",muted:"#94a3b8"},"#cbd5e1");i("Healthcare",{primary:"#0891b2",primaryHover:"#0e7490",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#f0fdfa",secondary:"#e0f7fa",tertiary:"#b2ebf2",hover:"#e0f7fa"},{primary:"#134e4a",secondary:"#1a6b6a",muted:"#80cbc4"},"#b2dfdb");i("Legal",{primary:"#1e293b",primaryHover:"#0f172a",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0284c7"},{primary:"#fafaf9",secondary:"#f5f5f4",tertiary:"#e7e5e4",hover:"#e7e5e4"},{primary:"#0f172a",secondary:"#44403c",muted:"#a8a29e"},"#d6d3d1");i("Tech Startup",{primary:"#7c3aed",primaryHover:"#6d28d9",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#faf5ff",secondary:"#f3e8ff",tertiary:"#e9d5ff",hover:"#f3e8ff"},{primary:"#1e1b4b",secondary:"#4c1d95",muted:"#a78bfa"},"#c4b5fd");i("Enterprise",{primary:"#1e40af",primaryHover:"#1e3a8a",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#eff6ff",secondary:"#dbeafe",tertiary:"#bfdbfe",hover:"#dbeafe"},{primary:"#1e3a5f",secondary:"#1e40af",muted:"#60a5fa"},"#93c5fd");i("Government",{primary:"#1d4ed8",primaryHover:"#1e40af",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#f8fafc",secondary:"#f1f5f9",tertiary:"#e2e8f0",hover:"#e2e8f0"},{primary:"#0f172a",secondary:"#1e293b",muted:"#64748b"},"#cbd5e1");i("Education",{primary:"#059669",primaryHover:"#047857",success:"#16a34a",warning:"#f59e0b",error:"#ef4444",info:"#0891b2"},{primary:"#f0fdf9",secondary:"#d1fae5",tertiary:"#a7f3d0",hover:"#d1fae5"},{primary:"#064e3b",secondary:"#065f46",muted:"#6ee7b7"},"#a7f3d0");i("Real Estate",{primary:"#92400e",primaryHover:"#78350f",success:"#059669",warning:"#b45309",error:"#dc2626",info:"#0891b2"},{primary:"#fffbeb",secondary:"#fef3c7",tertiary:"#fde68a",hover:"#fef3c7"},{primary:"#422006",secondary:"#713f12",muted:"#d97706"},"#fcd34d");i("Nord",{primary:"#5e81ac",primaryHover:"#4c6b90",success:"#a3be8c",warning:"#ebcb8b",error:"#bf616a",info:"#88c0d0"},{primary:"#eceff4",secondary:"#e5e9f0",tertiary:"#d8dee9",hover:"#d8dee9"},{primary:"#2e3440",secondary:"#3b4252",muted:"#4c566a"},"#d8dee9");m("Dracula",{primary:"#bd93f9",primaryHover:"#9d79d9",success:"#50fa7b",warning:"#f1fa8c",error:"#ff5555",info:"#8be9fd"},{primary:"#282a36",secondary:"#343746",tertiary:"#44475a",hover:"#44475a"},{primary:"#f8f8f2",secondary:"#c0c0c0",muted:"#6272a4"},"#44475a");i("Solarized Light",{primary:"#268bd2",primaryHover:"#1a6da0",success:"#859900",warning:"#b58900",error:"#dc322f",info:"#2aa198"},{primary:"#fdf6e3",secondary:"#eee8d5",tertiary:"#e0dbc7",hover:"#eee8d5"},{primary:"#073642",secondary:"#586e75",muted:"#93a1a1"},"#eee8d5");m("Solarized Dark",{primary:"#268bd2",primaryHover:"#3d98db",success:"#859900",warning:"#b58900",error:"#dc322f",info:"#2aa198"},{primary:"#002b36",secondary:"#073642",tertiary:"#0a4858",hover:"#073642"},{primary:"#eee8d5",secondary:"#93a1a1",muted:"#586e75"},"#073642");m("Monokai",{primary:"#66d9ef",primaryHover:"#45c0d6",success:"#a6e22e",warning:"#e6db74",error:"#f92672",info:"#66d9ef"},{primary:"#272822",secondary:"#34352e",tertiary:"#3e3d32",hover:"#3e3d32"},{primary:"#f8f8f2",secondary:"#cfcfc2",muted:"#75715e"},"#3e3d32");m("One Dark",{primary:"#61afef",primaryHover:"#4b9ee0",success:"#98c379",warning:"#e5c07b",error:"#e06c75",info:"#56b6c2"},{primary:"#282c34",secondary:"#2c313a",tertiary:"#353b45",hover:"#353b45"},{primary:"#abb2bf",secondary:"#828997",muted:"#545862"},"#3e4452");m("Synthwave",{primary:"#ff7edb",primaryHover:"#e660c2",success:"#72f1b8",warning:"#fede5d",error:"#fe4450",info:"#36f9f6"},{primary:"#241b2f",secondary:"#2d2140",tertiary:"#362a50",hover:"#362a50"},{primary:"#f0e4fc",secondary:"#b4a0cc",muted:"#6c5c84"},"#4a3866");i("Vaporwave",{primary:"#ff71ce",primaryHover:"#e655b5",success:"#78dcca",warning:"#ffb86c",error:"#ff5555",info:"#76e8fc"},{primary:"#fce4f7",secondary:"#e8d0f4",tertiary:"#d4bcf0",hover:"#e8d0f4"},{primary:"#4a1a4e",secondary:"#7b3f7d",muted:"#c080c0"},"#d8a8e8");m("Terminal Green",{primary:"#00ff41",primaryHover:"#00cc34",success:"#00ff41",warning:"#ffff00",error:"#ff0000",info:"#00ffff"},{primary:"#0a0a0a",secondary:"#0d1a0d",tertiary:"#1a2e1a",hover:"#1a2e1a"},{primary:"#00ff41",secondary:"#00cc33",muted:"#008822"},"#003300");i("Sepia",{primary:"#8b6914",primaryHover:"#704f10",success:"#6b8e23",warning:"#cd853f",error:"#b22222",info:"#5f9ea0"},{primary:"#faf0e6",secondary:"#f5e6d3",tertiary:"#eddcc7",hover:"#f5e6d3"},{primary:"#3e2723",secondary:"#5d4037",muted:"#a1887f"},"#d7ccc8");i("Vintage",{primary:"#8d6e63",primaryHover:"#6d4c41",success:"#66bb6a",warning:"#ffb300",error:"#e53935",info:"#29b6f6"},{primary:"#efebe9",secondary:"#d7ccc8",tertiary:"#bcaaa4",hover:"#d7ccc8"},{primary:"#3e2723",secondary:"#5d4037",muted:"#a1887f"},"#bcaaa4");m("Cyberpunk",{primary:"#00f0ff",primaryHover:"#00c8d4",success:"#39ff14",warning:"#ffff00",error:"#ff003c",info:"#bf00ff"},{primary:"#0a0e17",secondary:"#131824",tertiary:"#1c2333",hover:"#1c2333"},{primary:"#e0fbfc",secondary:"#80d4dd",muted:"#3a6b72"},"#1c3a44");m("Neon",{primary:"#ff00ff",primaryHover:"#cc00cc",success:"#00ff00",warning:"#ffff00",error:"#ff0000",info:"#00ffff"},{primary:"#0d0d0d",secondary:"#1a1a1a",tertiary:"#262626",hover:"#262626"},{primary:"#ffffff",secondary:"#cccccc",muted:"#666666"},"#333333");m("Retrowave",{primary:"#f77fbe",primaryHover:"#e462a3",success:"#72f1b8",warning:"#ffe261",error:"#ff4444",info:"#79e8fb"},{primary:"#1b0a2e",secondary:"#261440",tertiary:"#321e52",hover:"#321e52"},{primary:"#ffe6f7",secondary:"#c9a0c9",muted:"#6b4c7a"},"#4a2d66");i("Christmas",{primary:"#c41e3a",primaryHover:"#a01830",success:"#228b22",warning:"#ffd700",error:"#dc2626",info:"#0891b2"},{primary:"#fef2f2",secondary:"#fde8e8",tertiary:"#f8d0d0",hover:"#fde8e8"},{primary:"#3b0a0a",secondary:"#7f1d1d",muted:"#dc6868"},"#e8a0a0");m("Halloween",{primary:"#ff6600",primaryHover:"#e05500",success:"#4ade80",warning:"#fbbf24",error:"#ff0000",info:"#9333ea"},{primary:"#1a0a00",secondary:"#2d1500",tertiary:"#402000",hover:"#402000"},{primary:"#ffedd5",secondary:"#fdba74",muted:"#9a5c28"},"#5c3400");i("Valentine",{primary:"#e11d48",primaryHover:"#be123c",success:"#10b981",warning:"#f59e0b",error:"#dc2626",info:"#ec4899"},{primary:"#fff1f2",secondary:"#ffe4e6",tertiary:"#fecdd3",hover:"#ffe4e6"},{primary:"#4c0519",secondary:"#881337",muted:"#f9a8d4"},"#fda4af");i("Easter",{primary:"#a78bfa",primaryHover:"#8b5cf6",success:"#4ade80",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#fef9ff",secondary:"#f3e8ff",tertiary:"#e8d5ff",hover:"#f3e8ff"},{primary:"#581c87",secondary:"#6d28d9",muted:"#c4b5fd"},"#ddd6fe");i("Summer Beach",{primary:"#0ea5e9",primaryHover:"#0284c7",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#fffbeb",secondary:"#fef3c7",tertiary:"#fde68a",hover:"#fef3c7"},{primary:"#0c4a6e",secondary:"#0369a1",muted:"#7dd3fc"},"#fcd34d");i("Winter Frost",{primary:"#3b82f6",primaryHover:"#2563eb",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#f0f9ff",secondary:"#e0f2fe",tertiary:"#bae6fd",hover:"#e0f2fe"},{primary:"#1e3a5f",secondary:"#1e40af",muted:"#93c5fd"},"#bfdbfe");i("Cherry Blossom",{primary:"#ec4899",primaryHover:"#db2777",success:"#10b981",warning:"#f59e0b",error:"#ef4444",info:"#06b6d4"},{primary:"#fdf2f8",secondary:"#fce7f3",tertiary:"#fbcfe8",hover:"#fce7f3"},{primary:"#831843",secondary:"#9d174d",muted:"#f9a8d4"},"#fbcfe8");i("Harvest",{primary:"#b45309",primaryHover:"#92400e",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#fffbeb",secondary:"#fef3c7",tertiary:"#fde68a",hover:"#fef3c7"},{primary:"#451a03",secondary:"#78350f",muted:"#d97706"},"#fcd34d");i("Japanese Zen",{primary:"#6b7280",primaryHover:"#4b5563",success:"#6b8e23",warning:"#d4a017",error:"#c0392b",info:"#5f9ea0"},{primary:"#faf9f6",secondary:"#f0ece3",tertiary:"#e6e0d4",hover:"#f0ece3"},{primary:"#2c2c2c",secondary:"#5c5c5c",muted:"#a0998a"},"#d5cec0");i("Moroccan",{primary:"#c2410c",primaryHover:"#9a3412",success:"#15803d",warning:"#ca8a04",error:"#b91c1c",info:"#0e7490"},{primary:"#fffbf0",secondary:"#fef3e0",tertiary:"#fde6c4",hover:"#fef3e0"},{primary:"#3a1a00",secondary:"#7c2d12",muted:"#d97706"},"#f5d0a0");i("Scandinavian",{primary:"#4b5563",primaryHover:"#374151",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#ffffff",secondary:"#f9fafb",tertiary:"#f3f4f6",hover:"#f3f4f6"},{primary:"#111827",secondary:"#374151",muted:"#9ca3af"},"#e5e7eb");i("Mediterranean",{primary:"#1e40af",primaryHover:"#1e3a8a",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#eff6ff",secondary:"#dbeafe",tertiary:"#bfdbfe",hover:"#dbeafe"},{primary:"#1e3a5f",secondary:"#2563eb",muted:"#93c5fd"},"#bfdbfe");i("Chinese New Year",{primary:"#dc2626",primaryHover:"#b91c1c",success:"#16a34a",warning:"#d4a017",error:"#ef4444",info:"#0891b2"},{primary:"#fef2f2",secondary:"#fee2e2",tertiary:"#fecaca",hover:"#fee2e2"},{primary:"#450a0a",secondary:"#991b1b",muted:"#f87171"},"#fca5a5");i("Indian Festive",{primary:"#d97706",primaryHover:"#b45309",success:"#16a34a",warning:"#ca8a04",error:"#dc2626",info:"#7c3aed"},{primary:"#fffbeb",secondary:"#fef3c7",tertiary:"#fde68a",hover:"#fef3c7"},{primary:"#451a03",secondary:"#92400e",muted:"#f59e0b"},"#fcd34d");i("Brazilian Carnival",{primary:"#16a34a",primaryHover:"#15803d",success:"#22c55e",warning:"#facc15",error:"#ef4444",info:"#0ea5e9"},{primary:"#f0fdf4",secondary:"#dcfce7",tertiary:"#bbf7d0",hover:"#dcfce7"},{primary:"#052e16",secondary:"#166534",muted:"#4ade80"},"#86efac");i("African Earth",{primary:"#92400e",primaryHover:"#78350f",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#faf5f0",secondary:"#f0e6d6",tertiary:"#e6d5bb",hover:"#f0e6d6"},{primary:"#2b1a0e",secondary:"#5c3d1e",muted:"#a08060"},"#d4b896");m("High Contrast Dark",{primary:"#ffff00",primaryHover:"#cccc00",success:"#00ff00",warning:"#ff8c00",error:"#ff0000",info:"#00ffff"},{primary:"#000000",secondary:"#1a1a1a",tertiary:"#333333",hover:"#333333"},{primary:"#ffffff",secondary:"#ffffff",muted:"#cccccc"},"#ffffff");i("Monochrome",{primary:"#404040",primaryHover:"#262626",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#fafafa",secondary:"#f0f0f0",tertiary:"#e0e0e0",hover:"#e0e0e0"},{primary:"#1a1a1a",secondary:"#404040",muted:"#808080"},"#c0c0c0");i("Enhanced Contrast",{primary:"#0050b3",primaryHover:"#003d8c",success:"#006400",warning:"#cc7000",error:"#cc0000",info:"#006680"},{primary:"#ffffff",secondary:"#f5f5f5",tertiary:"#ebebeb",hover:"#ebebeb"},{primary:"#000000",secondary:"#1a1a1a",muted:"#595959"},"#8c8c8c");i("Minimalist",{primary:"#18181b",primaryHover:"#27272a",success:"#22c55e",warning:"#eab308",error:"#ef4444",info:"#3b82f6"},{primary:"#ffffff",secondary:"#fafafa",tertiary:"#f5f5f5",hover:"#f5f5f5"},{primary:"#0a0a0a",secondary:"#404040",muted:"#a3a3a3"},"#e5e5e5");m("Warm Dark",{primary:"#f59e0b",primaryHover:"#d97706",success:"#10b981",warning:"#fbbf24",error:"#f87171",info:"#38bdf8"},{primary:"#1c1917",secondary:"#292524",tertiary:"#44403c",hover:"#44403c"},{primary:"#fafaf9",secondary:"#d6d3d1",muted:"#78716c"},"#57534e");m("Soft Dark",{primary:"#a78bfa",primaryHover:"#8b5cf6",success:"#34d399",warning:"#fcd34d",error:"#fb7185",info:"#67e8f9"},{primary:"#1e1e2e",secondary:"#262637",tertiary:"#313147",hover:"#313147"},{primary:"#e8e8f0",secondary:"#a0a0b8",muted:"#5c5c74"},"#3e3e58");i("Coffee",{primary:"#6f4e37",primaryHover:"#5c3d28",success:"#4d7c0f",warning:"#a16207",error:"#b91c1c",info:"#0e7490"},{primary:"#faf6f1",secondary:"#f0e8dc",tertiary:"#e6d8c6",hover:"#f0e8dc"},{primary:"#2c1a0e",secondary:"#5c3d28",muted:"#a08868"},"#d4c4a8");i("Wine",{primary:"#7f1d1d",primaryHover:"#641717",success:"#059669",warning:"#d97706",error:"#dc2626",info:"#0891b2"},{primary:"#fef2f2",secondary:"#fde8e8",tertiary:"#f8d0d0",hover:"#fde8e8"},{primary:"#3b0a0a",secondary:"#7f1d1d",muted:"#dc6868"},"#e8a0a0");s.createContext(null);const me=[{target:".nice-etl-builder",titleKey:"tutorial.etlBuilder.intro.title",title:"ETL builder",contentKey:"tutorial.etlBuilder.intro.content",content:"Wire sources → transformations → destinations into a pipeline, switch the views, then run it and save the configuration.",placement:"auto"}],pe={id:"",name:"New Pipeline",sources:[],transformations:[],destinations:[],version:1},k=[{type:"filter",label:"Filter",icon:"🔍"},{type:"map",label:"Map",icon:"🔄"},{type:"aggregate",label:"Aggregate",icon:"∑"},{type:"join",label:"Join",icon:"🔗"},{type:"union",label:"Union",icon:"∪"},{type:"sort",label:"Sort",icon:"↕️"},{type:"deduplicate",label:"Deduplicate",icon:"🔲"},{type:"pivot",label:"Pivot",icon:"⤢"},{type:"unpivot",label:"Unpivot",icon:"⤡"},{type:"split",label:"Split",icon:"✂️"},{type:"merge",label:"Merge",icon:"🔀"},{type:"lookup",label:"Lookup",icon:"📖"},{type:"derive",label:"Derive Column",icon:"➕"},{type:"validate",label:"Validate",icon:"✓"},{type:"cleanse",label:"Cleanse",icon:"🧹"},{type:"custom",label:"Custom",icon:"ƒ"}];function ue({pipeline:a,dataSources:r=[],onChange:c,onRun:d,onSchedule:y,className:u="",tutorial:t}){const[p,w]=s.useState(a||{...pe,id:crypto.randomUUID()}),[o,b]=s.useState(null),[g,j]=s.useState("design"),[_,H]=s.useState(!1),[W,B]=s.useState([]),[S,N]=s.useState(null),$=s.useRef(null),v=s.useCallback(n=>{w(f=>{const l=n(f);return c==null||c(l),l})},[c]),E=s.useCallback(n=>{var l;const f={id:crypto.randomUUID(),type:n.type,name:n.name,config:n.config,schema:(l=n.schema)==null?void 0:l.tables[0]};v(h=>({...h,sources:[...h.sources,f]}))},[v]),A=s.useCallback((n,f)=>{var h;const l={id:crypto.randomUUID(),type:n,name:((h=k.find(C=>C.type===n))==null?void 0:h.label)||n,input:[],output:crypto.randomUUID(),config:be(n)};v(C=>({...C,transformations:[...C.transformations,l]})),b({type:"transformation",id:l.id})},[v]),V=s.useCallback(()=>{const n={id:crypto.randomUUID(),type:"database",name:"New Destination",config:{},writeMode:"append"};v(f=>({...f,destinations:[...f.destinations,n]})),b({type:"destination",id:n.id})},[v]),T=s.useCallback((n,f)=>{v(l=>{switch(n){case"source":return{...l,sources:l.sources.filter(h=>h.id!==f)};case"transformation":return{...l,transformations:l.transformations.filter(h=>h.id!==f)};case"destination":return{...l,destinations:l.destinations.filter(h=>h.id!==f)};default:return l}}),b(null)},[v]),K=s.useCallback(async()=>{if(d){H(!0);try{const n=await d(p);B(f=>[n,...f].slice(0,50))}finally{H(!1)}}},[p,d]),J=s.useCallback(n=>{v(f=>({...f,schedule:n})),y==null||y(p,n)},[p,v,y]),G=s.useCallback(n=>{if(n.preventDefault(),!!S){if(S.startsWith("transform:")){const f=S.replace("transform:","");A(f)}N(null)}},[S,A]),q=()=>{if(!o)return null;switch(o.type){case"source":return p.sources.find(n=>n.id===o.id);case"transformation":return p.transformations.find(n=>n.id===o.id);case"destination":return p.destinations.find(n=>n.id===o.id);default:return null}};return e.jsxs("div",{className:`nice-etl-builder ${u}`,children:[e.jsxs("div",{className:"nice-etl-builder__toolbar",children:[e.jsx("input",{type:"text",value:p.name,onChange:n=>v(f=>({...f,name:n.target.value})),className:"nice-etl-builder__name-input"}),e.jsx("div",{className:"nice-etl-builder__tabs",children:["design","code","schedule","history"].map(n=>e.jsx("button",{className:`nice-etl-builder__tab ${g===n?"nice-etl-builder__tab--active":""}`,onClick:()=>j(n),children:n.charAt(0).toUpperCase()+n.slice(1)},n))}),e.jsxs("div",{className:"nice-etl-builder__actions",children:[e.jsx("button",{onClick:K,disabled:_,className:"nice-etl-builder__run-btn",children:_?"⏳ Running...":"▶ Run"}),e.jsx("button",{className:"nice-etl-builder__save-btn",children:"💾 Save"}),e.jsx(fe,{steps:de(t,me)})]})]}),e.jsxs("div",{className:"nice-etl-builder__main",children:[g==="design"&&e.jsxs("div",{className:"nice-etl-builder__palette",children:[e.jsx("h4",{children:"Sources"}),r.map(n=>e.jsxs("div",{className:"nice-etl-builder__palette-item",onClick:()=>E(n),children:[e.jsx("span",{className:"nice-etl-builder__palette-icon",children:"🗄️"}),e.jsx("span",{children:n.name})]},n.id)),e.jsx("button",{onClick:()=>E({id:"",name:"New Source",type:"database",config:{}}),children:"+ Add Source"}),e.jsx("h4",{children:"Transformations"}),k.map(n=>e.jsxs("div",{className:"nice-etl-builder__palette-item",draggable:!0,onDragStart:()=>N(`transform:${n.type}`),onDragEnd:()=>N(null),children:[e.jsx("span",{className:"nice-etl-builder__palette-icon",children:n.icon}),e.jsx("span",{children:n.label})]},n.type)),e.jsx("h4",{children:"Destinations"}),e.jsx("button",{onClick:V,children:"+ Add Destination"})]}),g==="design"&&e.jsx("div",{ref:$,className:"nice-etl-builder__canvas",onDragOver:n=>n.preventDefault(),onDrop:G,onClick:()=>b(null),children:e.jsxs("div",{className:"nice-etl-builder__flow",children:[e.jsxs("div",{className:"nice-etl-builder__column",children:[e.jsx("h5",{children:"Sources"}),p.sources.map(n=>e.jsx(D,{node:n,nodeType:"source",icon:"🗄️",isSelected:(o==null?void 0:o.id)===n.id,onSelect:()=>b({type:"source",id:n.id}),onDelete:()=>T("source",n.id)},n.id))]}),e.jsx("div",{className:"nice-etl-builder__arrow",children:"→"}),e.jsxs("div",{className:"nice-etl-builder__column nice-etl-builder__column--transforms",children:[e.jsx("h5",{children:"Transformations"}),p.transformations.map(n=>{const f=k.find(l=>l.type===n.type);return e.jsx(D,{node:n,nodeType:"transformation",icon:(f==null?void 0:f.icon)||"🔄",isSelected:(o==null?void 0:o.id)===n.id,onSelect:()=>b({type:"transformation",id:n.id}),onDelete:()=>T("transformation",n.id)},n.id)}),p.transformations.length===0&&e.jsx("div",{className:"nice-etl-builder__empty-column",children:"Drag transformations here"})]}),e.jsx("div",{className:"nice-etl-builder__arrow",children:"→"}),e.jsxs("div",{className:"nice-etl-builder__column",children:[e.jsx("h5",{children:"Destinations"}),p.destinations.map(n=>e.jsx(D,{node:n,nodeType:"destination",icon:"📥",isSelected:(o==null?void 0:o.id)===n.id,onSelect:()=>b({type:"destination",id:n.id}),onDelete:()=>T("destination",n.id)},n.id))]})]})}),g==="code"&&e.jsx("div",{className:"nice-etl-builder__code-view",children:e.jsx("pre",{children:JSON.stringify(p,null,2)})}),g==="schedule"&&e.jsx(he,{schedule:p.schedule,monitoring:p.monitoring,onChange:J}),g==="history"&&e.jsx(ge,{runs:W}),o&&g==="design"&&e.jsx(ve,{nodeType:o.type,node:q()??null,dataSources:r,onChange:n=>{v(f=>{switch(o.type){case"source":return{...f,sources:f.sources.map(l=>l.id===o.id?{...l,...n}:l)};case"transformation":return{...f,transformations:f.transformations.map(l=>l.id===o.id?{...l,...n}:l)};case"destination":return{...f,destinations:f.destinations.map(l=>l.id===o.id?{...l,...n}:l)};default:return f}})},onClose:()=>b(null)})]})]})}function be(a){switch(a){case"filter":return{condition:""};case"map":return{mappings:[]};case"aggregate":return{groupBy:[],aggregations:[]};case"join":return{joinType:"inner",leftKey:"",rightKey:""};case"union":return{inputs:[]};case"sort":return{columns:[],directions:[]};case"deduplicate":return{columns:[],keepFirst:!0};case"pivot":return{pivotColumn:"",valueColumn:"",aggregation:"sum"};case"unpivot":return{columns:[],nameColumn:"name",valueColumn:"value"};case"derive":return{name:"",expression:""};case"validate":return{rules:[]};case"cleanse":return{operations:[]};case"custom":return{code:`// Custom transformation
28
- return data;`};default:return{}}}function D({node:a,nodeType:r,icon:c,isSelected:d,onSelect:y,onDelete:u}){return e.jsxs("div",{className:`nice-etl-builder__node nice-etl-builder__node--${r} ${d?"nice-etl-builder__node--selected":""}`,onClick:t=>{t.stopPropagation(),y()},children:[e.jsx("span",{className:"nice-etl-builder__node-icon",children:c}),e.jsx("span",{className:"nice-etl-builder__node-name",children:a.name}),e.jsx("button",{className:"nice-etl-builder__node-delete",onClick:t=>{t.stopPropagation(),u()},children:"×"})]})}function ve({nodeType:a,node:r,dataSources:c,onChange:d,onClose:y}){var u;return r?e.jsxs("div",{className:"nice-etl-builder__properties",children:[e.jsxs("div",{className:"nice-etl-builder__properties-header",children:[e.jsxs("h4",{children:[a.charAt(0).toUpperCase()+a.slice(1)," Properties"]}),e.jsx("button",{onClick:y,children:"×"})]}),e.jsxs("div",{className:"nice-etl-builder__properties-content",children:[e.jsxs("div",{className:"nice-etl-builder__field",children:[e.jsx("label",{children:"Name"}),e.jsx("input",{type:"text",value:r.name,onChange:t=>d({name:t.target.value})})]}),a==="source"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"nice-etl-builder__field",children:[e.jsx("label",{children:"Type"}),e.jsxs("select",{value:r.type,onChange:t=>d({type:t.target.value}),children:[e.jsx("option",{value:"database",children:"Database"}),e.jsx("option",{value:"api",children:"API"}),e.jsx("option",{value:"file",children:"File"}),e.jsx("option",{value:"stream",children:"Stream"})]})]}),e.jsx("div",{className:"nice-etl-builder__field",children:e.jsxs("label",{children:[e.jsx("input",{type:"checkbox",checked:((u=r.incremental)==null?void 0:u.enabled)||!1,onChange:t=>{var p;return d({incremental:{...r.incremental,enabled:t.target.checked,column:((p=r.incremental)==null?void 0:p.column)||""}})}}),"Incremental Load"]})})]}),a==="transformation"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"nice-etl-builder__field",children:[e.jsx("label",{children:"Type"}),e.jsx("span",{children:r.type})]}),r.type==="filter"&&e.jsxs("div",{className:"nice-etl-builder__field",children:[e.jsx("label",{children:"Condition"}),e.jsx("textarea",{value:String(r.config.condition||""),onChange:t=>d({config:{...r.config,condition:t.target.value}}),placeholder:"e.g., age > 18 AND status = 'active'",rows:3})]}),r.type==="derive"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"nice-etl-builder__field",children:[e.jsx("label",{children:"Column Name"}),e.jsx("input",{type:"text",value:String(r.config.name||""),onChange:t=>d({config:{...r.config,name:t.target.value}})})]}),e.jsxs("div",{className:"nice-etl-builder__field",children:[e.jsx("label",{children:"Expression"}),e.jsx("input",{type:"text",value:String(r.config.expression||""),onChange:t=>d({config:{...r.config,expression:t.target.value}}),placeholder:"e.g., price * quantity"})]})]}),r.type==="custom"&&e.jsxs("div",{className:"nice-etl-builder__field",children:[e.jsx("label",{children:"Code"}),e.jsx("textarea",{value:String(r.config.code||""),onChange:t=>d({config:{...r.config,code:t.target.value}}),rows:10,className:"nice-etl-builder__code-input"})]})]}),a==="destination"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"nice-etl-builder__field",children:[e.jsx("label",{children:"Type"}),e.jsxs("select",{value:r.type,onChange:t=>d({type:t.target.value}),children:[e.jsx("option",{value:"database",children:"Database"}),e.jsx("option",{value:"file",children:"File"}),e.jsx("option",{value:"api",children:"API"}),e.jsx("option",{value:"warehouse",children:"Data Warehouse"})]})]}),e.jsxs("div",{className:"nice-etl-builder__field",children:[e.jsx("label",{children:"Write Mode"}),e.jsxs("select",{value:r.writeMode,onChange:t=>d({writeMode:t.target.value}),children:[e.jsx("option",{value:"append",children:"Append"}),e.jsx("option",{value:"overwrite",children:"Overwrite"}),e.jsx("option",{value:"upsert",children:"Upsert"}),e.jsx("option",{value:"merge",children:"Merge"})]})]})]})]})]}):e.jsx(e.Fragment,{})}function he({schedule:a,monitoring:r,onChange:c}){const[d,y]=s.useState(a||{enabled:!1});return e.jsxs("div",{className:"nice-etl-builder__schedule-editor",children:[e.jsx("h4",{children:"Schedule Configuration"}),e.jsx("div",{className:"nice-etl-builder__field",children:e.jsxs("label",{children:[e.jsx("input",{type:"checkbox",checked:d.enabled,onChange:u=>{const t={...d,enabled:u.target.checked};y(t),c(t)}}),"Enable scheduled execution"]})}),d.enabled&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"nice-etl-builder__field",children:[e.jsx("label",{children:"Cron Expression"}),e.jsx("input",{type:"text",value:d.cron||"",onChange:u=>{const t={...d,cron:u.target.value};y(t)},placeholder:"0 0 * * * (every hour)"}),e.jsx("small",{children:"Format: minute hour day month weekday"})]}),e.jsxs("div",{className:"nice-etl-builder__field",children:[e.jsx("label",{children:"Timezone"}),e.jsxs("select",{value:d.timezone||"UTC",onChange:u=>{const t={...d,timezone:u.target.value};y(t)},children:[e.jsx("option",{value:"UTC",children:"UTC"}),e.jsx("option",{value:"America/New_York",children:"Eastern Time"}),e.jsx("option",{value:"America/Chicago",children:"Central Time"}),e.jsx("option",{value:"America/Los_Angeles",children:"Pacific Time"}),e.jsx("option",{value:"Europe/London",children:"London"}),e.jsx("option",{value:"Europe/Warsaw",children:"Warsaw"})]})]}),e.jsx("button",{onClick:()=>c(d),children:"Save Schedule"})]}),e.jsx("h4",{children:"Monitoring"}),e.jsx("div",{className:"nice-etl-builder__field",children:e.jsxs("label",{children:[e.jsx("input",{type:"checkbox",checked:(r==null?void 0:r.alertOnFailure)||!1,disabled:!0}),"Alert on failure"]})}),e.jsxs("div",{className:"nice-etl-builder__field",children:[e.jsx("label",{children:"Log Level"}),e.jsxs("select",{value:(r==null?void 0:r.logLevel)||"info",disabled:!0,children:[e.jsx("option",{value:"error",children:"Error"}),e.jsx("option",{value:"warn",children:"Warning"}),e.jsx("option",{value:"info",children:"Info"}),e.jsx("option",{value:"debug",children:"Debug"})]})]})]})}function ge({runs:a}){return e.jsxs("div",{className:"nice-etl-builder__history-view",children:[e.jsx("h4",{children:"Run History"}),a.length===0?e.jsx("div",{className:"nice-etl-builder__no-history",children:"No runs yet"}):e.jsxs("table",{className:"nice-etl-builder__history-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Status"}),e.jsx("th",{children:"Start Time"}),e.jsx("th",{children:"Duration"}),e.jsx("th",{children:"Rows"}),e.jsx("th",{children:"Errors"})]})}),e.jsx("tbody",{children:a.map(r=>e.jsxs("tr",{className:`nice-etl-builder__run nice-etl-builder__run--${r.status}`,children:[e.jsx("td",{children:e.jsxs("span",{className:`nice-etl-builder__status nice-etl-builder__status--${r.status}`,children:[r.status==="success"?"✓":r.status==="failed"?"✗":"⏳",r.status]})}),e.jsx("td",{children:r.startTime.toLocaleString()}),e.jsx("td",{children:r.endTime?`${Math.round((r.endTime.getTime()-r.startTime.getTime())/1e3)}s`:"-"}),e.jsxs("td",{children:[r.rowsProcessed.toLocaleString()," / ",r.rowsWritten.toLocaleString()]}),e.jsx("td",{children:r.errors.length})]},r.id))})]})]})}exports.NiceETLBuilder=ue;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-5FyuIZGq.cjs");exports.NiceETLBuilder=e.NiceETLBuilder;