<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport"…
- User
--icon-container: 24px; --icon-inner: 16px; --icon-radius: 6px; --icon-fill: #F6F6F5; --icon-stroke: 1.75px; --icon-color: #5F6368; --port-size: 8px; --port-hit: 20px; --port-border: 1.5px; --port-color: #70757D; --port-offset: -4px; --chevron-container: 20px; --chevron-icon: 12px; --chevron-hover-bg: #F3F3F1; --chevron-radius: 4px; --group-header-height: 40px; --group-header-padding: 12px; --group-header-gap: 8px; --group-padding: 16px; --group-radius: 10px; --group-border: #DCDDDD; --group-fill: rgba(255, 255, 255, 0.72); --group-inner-node-height: 40px; --group-inner-node-min-width: 128px; --group-inner-node-gap: 48px; --toolbar-height: 40px; /* Colors */ --color-white: #FFFFFF; --color-border-default: #DCDDDD; --color-border-hover: #B8BBBF; --color-border-selected: #1B1D20; --color-title: #1B1D20; --color-subtitle: #8A8F98; --color-icon-container: #F6F6F5; --color-icon: #5F6368; --color-port: #70757D; --color-chevron-hover: #F3F3F1; --color-running: #3B82F6; --color-success: #22C55E; --color-failure: #EF4444; --color-canvas-bg: #F9F9F8; --color-dot-grid: #E8E8E6; --color-toolbar-bg: #FAFAFA; --color-toolbar-border: #EBEBEB; /* Typography */ --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; --font-title-size: 13px; --font-title-weight: 500; --font-title-line-height: 18px; --font-subtitle-size: 11px; --font-subtitle-weight: 400; --font-subtitle-line-height: 16px; --font-subtitle-format: '3 steps · 1.24M rows'; /* Shadows */ --shadow-none: none; --shadow-group: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03); } * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: var(--font-family); background: #F3F3F1; display: flex; justify-content: center; align-items: center; min-height: 100vh; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; user-select: none; -webkit-user-select: none; } /* === App Shell === */ .app-container { width: 1100px; height: 720px; background: var(--color-white); border-radius: 12px; overflow: hidden; box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.04); display: flex; flex-direction: column; } /* === Toolbar === */ .toolbar { height: var(--toolbar-height); background: var(--color-toolbar-bg); border-bottom: 1px solid var(--color-toolbar-border); display: flex; align-items: center; padding: 0 16px; gap: 8px; flex-shrink: 0; z-index: 10; } .toolbar-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; } .toolbar-dot.red { background: #EC6A5E; } .toolbar-dot.yellow { background: #F4BE4F; } .toolbar-dot.green { background: #61C554; } .toolbar-title { font-size: 12px; font-weight: 500; color: #5F6368; margin-left: 8px; letter-spacing: -0.01em; } .toolbar-spacer { flex: 1; } .toolbar-btn { height: 28px; padding: 0 10px; border-radius: 6px; border: 1px solid #DCDDDD; background: #FFFFFF; font-family: var(--font-family); font-size: 11px; font-weight: 500; color: #3C4043; cursor: pointer; display: flex; align-items: center; gap: 5px; transition: all 0.12s ease; white-space: nowrap; } .toolbar-btn:hover { background: #F6F6F5; border-color: #B8BBBF; } .toolbar-btn.primary { background: #1B1D20; color: #FFFFFF; border-color: #1B1D20; } .toolbar-btn.primary:hover { background: #2D3035; border-color: #2D3035; } .toolbar-btn svg { width: 12px; height: 12px; flex-shrink: 0; } /* === Canvas === */ .canvas { flex: 1; position: relative; overflow: auto; background-color: var(--color-canvas-bg); background-image: radial-gradient(circle, var(--color-dot-grid) 1.2px, transparent 1.2px); background-size: 16px 16px; cursor: grab; } .canvas:active { cursor: grabbing; } .canvas-inner { position: relative; width: 1400px; height: 900px; min-width: 100%; min-height: 100%; } /* === SVG Connections Layer === */ .connections-layer { position: absolute; inset: 0; pointer-events: none; z-index: 1; } .connections-layer path { fill: none; stroke: #C4C7CC; stroke-width: 1.5; stroke-linecap: round; } .connections-layer path.animated { stroke-dasharray: 6 4; animation: flowDash 0.8s linear infinite; } @keyframes flowDash { to { stroke-dashoffset: -20; } } /* === Node Wrapper (for positioning on canvas) === */ .node-wrapper { position: absolute; z-index: 2; transition: filter 0.15s ease; } .node-wrapper.dimmed { filter: brightness(0.97); } /* === Composite Node === */ .composite-node { display: flex; flex-direction: row; align-items: center; height: var(--node-height); min-width: var(--node-min-width); width: var(--node-rec-width); max-width: var(--node-max-width); padding: var(--node-padding-y) var(--node-padding-x); gap: var(--node-gap); background: var(--color-white); border: var(--node-border) solid var(--color-border-default); border-radius: var(--node-radius); cursor: pointer; position: relative; transition: border-color 0.12s ease, border-width 0.12s ease, padding 0.12s ease, box-shadow 0.12s ease; box-shadow: var(--shadow-none); box-sizing: border-box; } .composite-node:hover { border-color: var(--color-border-hover); } .composite-node.selected { border-width: var(--node-selected-border); border-color: var(--color-border-selected); padding: calc(var(--node-padding-y) - 1px) calc(var(--node-padding-x) - 1px); } /* === Ports === */ .port { position: absolute; width: var(--port-size); height: var(--port-size); background: var(--color-white); border: var(--port-border) solid var(--color-port); border-radius: 2px; top: 50%; z-index: 3; cursor: crosshair; transition: background 0.12s ease, border-color 0.12s ease, transform 0.12s ease; } .port::after { content: ''; position: absolute; width: var(--port-hit); height: var(--port-hit); top: 50%; left: 50%; transform: translate(-50%, -50%); border-radius: 4px; } .port.input { left: var(--port-offset); transform: translate(-50%, -50%); } .port.output { right: var(--port-offset); transform: translate(50%, -50%); } .port:hover { background: #F0F0F0; border-color: #3C4043; } .port:active { background: #DDE0E4; border-color: #1B1D20; transform: translate(-50%, -50%) scale(1.3); } .port.output:active { transform: translate(50%, -50%) scale(1.3); } /* === Icon Container === */ .node-icon-container { width: var(--icon-container); height: var(--icon-container); border-radius: var(--icon-radius); background: var(--icon-fill); display: flex; align-items: center; justify-content: center; flex-shrink: 0; } .node-icon-container svg { width: var(--icon-inner); height: var(--icon-inner); flex-shrink: 0; } /* === Content Area === */ .node-content { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; overflow: hidden; } .node-title { font-family: var(--font-family); font-size: var(--font-title-size); font-weight: var(--font-title-weight); line-height: var(--font-title-line-height); color: var(--color-title); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.01em; } .node-subtitle { font-family: var(--font-family); font-size: var(--font-subtitle-size); font-weight: var(--font-subtitle-weight); line-height: var(--font-subtitle-line-height); color: var(--color-subtitle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.005em; display: flex; align-items: center; gap: 4px; } /* === Chevron === */ .node-chevron { width: var(--chevron-container); height: var(--chevron-container); border-radius: var(--chevron-radius); display: flex; align-items: center; justify-content: center; flex-shrink: 0; cursor: pointer; transition: background 0.1s ease; position: relative; z-index: 4; } .node-chevron:hover { background: var(--chevron-hover-bg); } .node-chevron svg { width: var(--chevron-icon); height: var(--chevron-icon); color: #8A8F98; transition: transform 0.15s ease; } .node-chevron.expanded svg { transform: rotate(90deg); } /* === Status Badges === */ .status-badge { position: absolute; z-index: 5; pointer-events: none; } .status-badge.top-left { top: -6px; left: -6px; } .status-badge.top-right { top: -6px; right: -6px; } .status-ring { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--color-running); border-top-color: transparent; animation: spin 0.8s linear infinite; background: var(--color-white); } @keyframes spin { to { transform: rotate(360deg); } } .status-check { width: 14px; height: 14px; border-radius: 50%; background: var(--color-success); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--color-white); } .status-check svg { width: 8px; height: 8px; color: #FFFFFF; } .status-alert { width: 14px; height: 14px; border-radius: 50%; background: var(--color-failure); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--color-white); } .status-alert svg { width: 8px; height: 8px; color: #FFFFFF; } /* === Group Header === */ .group-header { display: flex; align-items: center; height: var(--group-header-height); padding: 0 var(--group-header-padding); gap: var(--group-header-gap); cursor: pointer; background: var(--color-white); border: 1px solid var(--color-border-default); border-radius: var(--node-radius); transition: border-color 0.12s ease, border-radius 0.2s ease; user-select: none; position: relative; z-index: 2; min-width: 260px; white-space: nowrap; } .group-header:hover { border-color: var(--color-border-hover); } .group-header.expanded { border-radius: var(--node-radius) var(--node-radius) 0 0; border-bottom-color: transparent; } .group-header-left { display: flex; align-items: center; gap: var(--group-header-gap); flex: 1; min-width: 0; } .group-header-icon { width: 20px; height: 20px; border-radius: 5px; background: #F0F0EE; display: flex; align-items: center; justify-content: center; flex-shrink: 0; } .group-header-icon svg { width: 11px; height: 11px; color: #5F6368; } .group-header-title { font-size: 12px; font-weight: 500; color: #1B1D20; letter-spacing: -0.01em; } .group-header-count { font-size: 10px; font-weight: 500; color: #8A8F98; background: #F6F6F5; padding: 2px 6px; border-radius: 10px; letter-spacing: -0.005em; } .group-header-right { display: flex; align-items: center; gap: 4px; flex-shrink: 0; } .group-header-btn { width: 24px; height: 24px; border-radius: 4px; border: none; background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #8A8F98; transition: background 0.1s ease; flex-shrink: 0; } .group-header-btn:hover { background: #F3F3F1; } .group-header-btn svg { width: 12px; height: 12px; } /* === Expanded Group Body === */ .group-body { background: var(--group-fill); border: 1px solid var(--color-border-default); border-top: none; border-radius: 0 0 var(--group-radius) var(--group-radius); padding: var(--group-padding); display: flex; flex-direction: row; gap: var(--group-inner-node-gap); align-items: center; flex-wrap: wrap; position: relative; z-index: 1; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: var(--shadow-group); transition: all 0.2s ease; overflow: hidden; } .group-body.collapsed { max-height: 0; padding-top: 0; padding-bottom: 0; opacity: 0; border: none; overflow: hidden; } .group-body.expanded { max-height: 200px; opacity: 1; } /* === Group Inner Node (Simplified) === */ .inner-node { height: var(--group-inner-node-height); min-width: var(--group-inner-node-min-width); padding: 0 14px; display: flex; align-items: center; background: var(--color-white); border: 1px solid #E8E8E6; border-radius: 6px; font-family: var(--font-family); font-size: 12px; font-weight: 500; color: #3C4043; cursor: pointer; transition: all 0.12s ease; white-space: nowrap; position: relative; letter-spacing: -0.005em; } .inner-node:hover { border-color: #B8BBBF; background: #FAFAFA; } .inner-node .inner-dot { width: 5px; height: 5px; border-radius: 50%; background: #C4C7CC; margin-right: 8px; flex-shrink: 0; transition: background 0.12s ease; } .inner-node:hover .inner-dot { background: #8A8F98; } /* === Group Wrapper === */ .group-wrapper { position: absolute; z-index: 3; display: flex; flex-direction: column; } /* === Tooltip / Mini Label === */ .canvas-label { position: absolute; font-size: 10px; font-weight: 500; color: #B0B4BA; letter-spacing: 0.02em; text-transform: uppercase; pointer-events: none; z-index: 0; } /* === Scrollbar Styling === */ .canvas::-webkit-scrollbar { width: 6px; height: 6px; } .canvas::-webkit-scrollbar-track { background: transparent; } .canvas::-webkit-scrollbar-thumb { background: #DCDDDD; border-radius: 3px; } .canvas::-webkit-scrollbar-thumb:hover { background: #B8BBBF; } .canvas::-webkit-scrollbar-corner { background: transparent; } /* === Responsive adjustments === */ @media (max-width: 1200px) { .app-container { width: 95vw; height: 85vh; border-radius: 8px; } } </style><!-- Canvas --> <div class="canvas" id="canvas"> <div class="canvas-inner" id="canvasInner"> <!-- SVG Connections Layer --> <svg class="connections-layer" id="connectionsLayer" width="1400" height="900"> <!-- Connection: Source → Clean Names --> <path d="M 228 108 C 270 108, 280 108, 310 108" /> <!-- Connection: Clean Names → Group (Filter Rows input) --> <path d="M 534 108 C 570 108, 580 150, 600 150" /> <!-- Connection: Group output → Merge --> <path d="M 920 150 C 970 150, 980 200, 1010 200" /> <!-- Connection: Merge → Output --> <path d="M 1234 200 C 1270 200, 1280 260, 1300 280" /> <!-- Animated connection (running) --> <path class="animated" d="M 228 280 C 270 280, 280 280, 310 280" /> <!-- Failure connection --> <path d="M 534 280 C 570 280, 580 350, 600 370" stroke="#E8D0D0" /> </svg> <!-- Label: Source Area --> <span class="canvas-label" style="top: 82px; left: 38px;">Sources</span> <!-- Label: Transforms --> <span class="canvas-label" style="top: 82px; left: 370px;">Transforms</span> <!-- Label: Group --> <span class="canvas-label" style="top: 120px; left: 650px;">Group</span> <!-- Label: Output --> <span class="canvas-label" style="top: 250px; left: 1150px;">Destinations</span> <!-- ===== Node 1: Data Source (Default state) ===== --> <div class="node-wrapper" style="top: 80px; left: 40px;" data-node-id="source"> <div class="composite-node" style="width: 188px;" onclick="selectNode(this)" id="node-source"> <div class="port input"></div> <div class="node-icon-container"> <svg viewBox="0 0 16 16" fill="none" stroke="#5F6368" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"> <ellipse cx="4" cy="4" rx="2.5" ry="2.5"/> <ellipse cx="12" cy="4" rx="2.5" ry="2.5"/> <path d="M1.5 4v5c0 1.5 2.5 3 5 3h3c2.5 0 5-1.5 5-3V4"/> <path d="M1.5 9v3c0 1.5 2.5 3 5 3h3c2.5 0 5-1.5 5-3V9"/> </svg> </div> <div class="node-content"> <span class="node-title">Import Dataset</span> <span class="node-subtitle">CSV · 2.4M rows</span> </div> <div class="node-chevron"> <svg viewBox="0 0 12 12" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"> <path d="M4.5 2.5L8 6L4.5 9.5"/> </svg> </div> <div class="port output"></div> </div> </div> <!-- ===== Node 2: Clean Names (Default state) ===== --> <div class="node-wrapper" style="top: 80px; left: 320px;" data-node-id="clean-names"> <div class="composite-node" style="width: 214px;" onclick="selectNode(this)" id="node-clean"> <div class="port input"></div> <div class="node-icon-container"> <svg viewBox="0 0 16 16" fill="none" stroke="#5F6368" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"> <path d="M2 4h3l1.5-2h4L12 4h2a1 1 0 011 1v7a1 1 0 01-1 1H2a1 1 0 01-1-1V5a1 1 0 011-1z"/> <circle cx="8" cy="8.5" r="2.5"/> </svg> </div> <div class="node-content"> <span class="node-title">Clean Names</span> <span class="node-subtitle">3 steps · 1.24M rows</span> </div> <div class="node-chevron"> <svg viewBox="0 0 12 12" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"> <path d="M4.5 2.5L8 6L4.5 9.5"/> </svg> </div> <div class="port output"></div> </div> </div> <!-- ===== Node 3: Running state ===== --> <div class="node-wrapper" style="top: 252px; left: 40px;" data-node-id="filter-running"> <div class="composite-node running-node" style="width: 198px;" onclick="selectNode(this)" id="node-running"> <div class="status-badge top-left"> <div class="status-ring"></div> </div> <div class="port input"></div> <div class="node-icon-container"> <svg viewBox="0 0 16 16" fill="none" stroke="#5F6368" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"> <path d="M2 3h12L10 8v4l-4 2V8L2 3z"/> </svg> </div> <div class="node-content"> <span class="node-title">Filter Rows</span> <span class="node-subtitle">Running 2/3</span> </div> <div class="node-chevron"> <svg viewBox="0 0 12 12" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"> <path d="M4.5 2.5L8 6L4.5 9.5"/> </svg> </div> <div class="port output"></div> </div> </div> <!-- ===== Node 4: Success state ===== --> <div class="node-wrapper" style="top: 252px; left: 320px;" data-node-id="validate-success"> <div class="composite-node success-node" style="width: 214px;" onclick="selectNode(this)" id="node-success"> <div class="status-badge top-right"> <div class="status-check"> <svg viewBox="0 0 8 8" fill="none" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"> <path d="M1.5 4L3.5 6L6.5 2"/> </svg> </div> </div> <div class="port input"></div> <div class="node-icon-container"> <svg viewBox="0 0 16 16" fill="none" stroke="#5F6368" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"> <path d="M2 8l3.5 3.5L9 7"/> <rect x="1" y="1" width="14" height="14" rx="3"/> </svg> </div> <div class="node-content"> <span class="node-title">Validate Schema</span> <span class="node-subtitle">Completed</span> </div> <div class="node-chevron"> <svg viewBox="0 0 12 12" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"> <path d="M4.5 2.5L8 6L4.5 9.5"/> </svg> </div> <div class="port output"></div> </div> </div> <!-- ===== Node 5: Failure state ===== --> <div class="node-wrapper" style="top: 340px; left: 320px;" data-node-id="merge-failure"> <div class="composite-node failure-node" style="width: 196px;" onclick="selectNode(this)" id="node-failure"> <div class="status-badge top-right"> <div class="status-alert"> <svg viewBox="0 0 8 8" fill="none" stroke="white" stroke-width="1.5" stroke-linecap="round"> <path d="M4 2v2.5M4 6v0.5"/> </svg> </div> </div> <div class="port input"></div> <div class="node-icon-container"> <svg viewBox="0 0 16 16" fill="none" stroke="#5F6368" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"> <circle cx="5" cy="5" r="3"/> <circle cx="11" cy="11" r="3"/> <path d="M7.5 7.5l3 3"/> </svg> </div> <div class="node-content"> <span class="node-title">Merge Datasets</span> <span class="node-subtitle">1 failed</span> </div> <div class="node-chevron"> <svg viewBox="0 0 12 12" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"> <path d="M4.5 2.5L8 6L4.5 9.5"/> </svg> </div> <div class="port output"></div> </div> </div> <!-- ===== Node 6: Export (Default, wider) ===== --> <div class="node-wrapper" style="top: 172px; left: 1020px;" data-node-id="export"> <div class="composite-node" style="width: 214px;" onclick="selectNode(this)" id="node-export"> <div class="port input"></div> <div class="node-icon-container"> <svg viewBox="0 0 16 16" fill="none" stroke="#5F6368" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"> <path d="M8 1.5v9M5 7l3 3.5L11 7"/> <rect x="2" y="11" width="12" height="3.5" rx="1"/> </svg> </div> <div class="node-content"> <span class="node-title">Export Results</span> <span class="node-subtitle">Parquet · 890K rows</span> </div> <div class="node-chevron"> <svg viewBox="0 0 12 12" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"> <path d="M4.5 2.5L8 6L4.5 9.5"/> </svg> </div> <div class="port output"></div> </div> </div> <!-- ===== Group: Data Prep ===== --> <div class="group-wrapper" style="top: 100px; left: 560px;" id="groupWrapper"> <!-- Group Header --> <div class="group-header expanded" id="groupHeader" onclick="toggleGroup()"> <div class="group-header-left"> <div class="group-header-icon"> <svg viewBox="0 0 11 11" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round"> <rect x="1" y="1" width="9" height="9" rx="2"/> <path d="M3.5 5.5h4M5.5 3.5v4"/> </svg> </div> <span class="group-header-title">Data Preparation</span> <span class="group-header-count">3 nodes</span> </div> <div class="group-header-right"> <button class="group-header-btn" title="More options" onclick="event.stopPropagation()"> <svg viewBox="0 0 12 12" fill="currentColor"><circle cx="3" cy="6" r="1.2"/><circle cx="6" cy="6" r="1.2"/><circle cx="9" cy="6" r="1.2"/></svg> </button> <button class="group-header-btn" id="collapseBtn" title="Collapse" onclick="event.stopPropagation(); toggleGroup()"> <svg viewBox="0 0 12 12" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"> <path d="M3 5l3 3 3-3"/> </svg> </button> </div> </div> <!-- Group Body --> <div class="group-body expanded" id="groupBody"> <div class="inner-node"> <span class="inner-dot"></span> Normalize Case </div> <div class="inner-node"> <span class="inner-dot"></span> Trim Whitespace </div> <div class="inner-node"> <span class="inner-dot"></span> Remove Nulls </div> </div> </div> <!-- ===== Standalone inner-node style (outside group, for reference) ===== --> <div class="node-wrapper" style="top: 430px; left: 40px;" data-node-id="quick-check"> <div class="inner-node" style="height:40px; min-width:148px; padding:0 14px; cursor:pointer;" onclick="this.classList.toggle('selected-inner')"> <span class="inner-dot"></span> Quick Validate </div> </div> </div> </div> </div> <script> // ===== Node Selection ===== function selectNode(nodeEl) { // Deselect all document.querySelectorAll('.composite-node.selected').forEach(el => { el.classList.remove('selected'); }); // Select clicked nodeEl.classList.add('selected'); // Dim other node wrappers slightly document.querySelectorAll('.node-wrapper').forEach(w => { w.classList.add('dimmed'); }); const wrapper = nodeEl.closest('.node-wrapper'); if (wrapper) wrapper.classList.remove('dimmed'); // Also undim group document.querySelectorAll('.group-wrapper').forEach(g => g.classList.remove('dimmed')); // Re-dim everything after a moment if clicking canvas setTimeout(() => { document.addEventListener('click', function clearDim(e) { if (!e.target.closest('.composite-node') && !e.target.closest('.group-header') && !e .target.closest('.inner-node')) { document.querySelectorAll('.node-wrapper.dimmed').forEach(w => w.classList.remove( 'dimmed')); document.querySelectorAll('.composite-node.selected').forEach(el => el.classList .remove('selected')); document.removeEventListener('click', clearDim); } }, { once: true }); }, 50); } // ===== Group Toggle ===== function toggleGroup() { const header = document.getElementById('groupHeader'); const body = document.getElementById('groupBody'); const collapseBtn = document.getElementById('collapseBtn'); const isExpanded = header.classList.contains('expanded'); if (isExpanded) { // Collapse header.classList.remove('expanded'); body.classList.remove('expanded'); body.classList.add('collapsed'); if (collapseBtn) { collapseBtn.innerHTML = '<svg viewBox="0 0 12 12" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><path d="M5 3l3 3-3 3"/></svg>'; } } else { // Expand header.classList.add('expanded'); body.classList.remove('collapsed'); body.classList.add('expanded'); if (collapseBtn) { collapseBtn.innerHTML = '<svg viewBox="0 0 12 12" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"><path d="M3 5l3 3 3-3"/></svg>'; } } } // ===== Canvas click to deselect ===== document.getElementById('canvasInner').addEventListener('click', function(e) { if (!e.target.closest('.composite-node') && !e.target.closest('.group-header') && !e.target.closest('.inner-node') && !e.target.closest('.node-chevron') && !e.target.closest('.port') && !e.target.closest('button')) { document.querySelectorAll('.composite-node.selected').forEach(el => el.classList.remove( 'selected')); document.querySelectorAll('.node-wrapper.dimmed').forEach(w => w.classList.remove('dimmed')); } }); // ===== Chevron click ===== document.querySelectorAll('.node-chevron').forEach(chevron => { chevron.addEventListener('click', function(e) { e.stopPropagation(); this.classList.toggle('expanded'); // Simulate opening a submenu or detail panel const node = this.closest('.composite-node'); if (node) { node.style.transition = 'all 0.15s ease'; const originalWidth = node.style.width || getComputedStyle(node).width; if (this.classList.contains('expanded')) { node.style.width = '280px'; } else { node.style.width = originalWidth; } } }); }); // ===== Port hover effects ===== document.querySelectorAll('.port').forEach(port => { port.addEventListener('mouseenter', function() { this.style.backgroundColor = '#F0F0F0'; this.style.borderColor = '#3C4043'; }); port.addEventListener('mouseleave', function() { this.style.backgroundColor = ''; this.style.borderColor = ''; }); }); // ===== Initialize: log design tokens ===== console.log('%c🧊 DataCleaner OS v1.0 — Composite Node %cFrozen Spec', 'font-size:14px; font-weight:600; color:#1B1D20;', 'font-size:11px; color:#8A8F98;'); console.log('%c 8pt Grid | Node Height: 56px | Radius: 8px | Icon: 24×24', 'font-size:10px; color:#5F6368;'); console.log('%c Click nodes to select • Click chevron to expand • Click group to toggle', 'font-size:10px; color:#B0B4BA;'); </script> Assistant
I'll start by listing all the files in the project to understand the structure of this React, Vite, and Tailwind CSS application. Let's find the files.
I am going to read
src/App.tsxto understand the current implementation and see what needs to be replaced.I'll read
package.jsonto check the existing dependencies and see if there are standard packages we can use, such aslucide-reactfor icons, or if we need to install any.I will install
lucide-reactto use its extensive, elegant icon library for our visual data nodes, toolbar actions, and sidebar options. This will help make the application look like a premium, fully interactive professional studio.I'm going to inspect
src/index.cssto see if there are custom styles or standard Tailwind definitions there. This will help integrate our custom styles or custom scrollbars smoothly.I'll read
index.htmlto see where the title is located and update it to match the high-fidelity professional workspace name: "DataCleaner OS v1.0 — Composite Node Studio".I'm going to update
index.htmlto include the Inter font from Google Fonts and change the document title to "DataCleaner OS v1.0 — Composite Node Workspace", matching the visual aesthetic.I will now update
src/index.cssto define the 8pt grid system design tokens, standard node classes, interactive states, custom flow animations, dotted canvas background, and styling utilities. This ensures we preserve the style guide while allowing custom interactive states. Let's write the complete CSS definitions.I'll write the complete stateful React workspace application in
src/App.tsx. Let's lay out what this code will achieve:- Interactive Draggable Nodes & Groups: Compute live port positions and redraw connecting lines instantly as nodes are moved! Includes snapping to an 8px grid.
- Dynamic Connector Generation: Custom SVGs with smooth cubic Bezier paths. Interactive features allow clicking ports to form new connections, hovering over lines to view statistics, and deleting connections.
- Interactive Configuration Inspector Panel: Shows detailed sliders, dropdowns, and form options when a node is selected. Users can edit titles, row counts, and parameters, and toggle node execution states manually.
- Rich Step-by-Step Data Previews: Shows how the data looks at each specific stage of the pipeline (Raw vs Cleaned data) with column highlighting and downloadable CSV outputs!
- Interactive Execution Engine: Pressing "Run Pipeline" triggers a stunning step-by-step visual run. Lines animate with flowing dashes, status badges rotate and light up, and CLI logs stream into an interactive terminal drawer.
- Multiple Presets: Switch between "DataCleaner OS Default", "SaaS Lead Scrubbing", and "Financial Transaction Audit".
- Add Custom Nodes: Choose from a menu of templates to dynamically add new nodes anywhere on the canvas.
Let's create the file
src/App.tsxnow.I will now update
src/App.tsxto resolve all TypeScript compile-time lint errors. I will:- Remove all unused imports (
CheckCircle2,Search,Maximize2,FileText,Copy,ExternalLink,ChevronUp,Settings). - Remove unused local variables
canvasInnerWidthandcanvasInnerHeight. - Avoid passing non-standard
titleattributes directly to<path>elements. - Ensure
activeNodeis fully and properly typed to include all optional parameters to satisfy the compiler checks.
Let's write the complete corrected file.
I am going to test-build the project to ensure that there are no TypeScript syntax errors or compilation issues. This is our standard confirmation step.
I have rebuilt and transformed your mockup into a fully stateful and interactive Visual Pipeline Studio — DataCleaner OS v1.0.
Here is a summary of the advanced interactive features added to the core mockup spec:
1. ⚙️ Drag & Drop Canvas & Snapping Grid
- Live Dragging: Left-click and hold the title or body of any node or group on the dotted canvas to drag them around in real-time.
- Auto-stretch SVG Connections: All curved connecting lines are drawn as dynamic cubic Bezier paths. When you drag a node, its ports automatically calculate their new positions, and the curves stretch and bend smoothly!
- 8pt Grid Snapping: Toggle the "Snap to Grid" option in the left panel to snap nodes to the closest 8px grid alignments.
- Figma-style Canvas Panning: Grab and drag the canvas background to pan around. If you get lost, click "Reset Pan" to center yourself.
2. 🔗 Dynamic Link Creation & Connection Management
- Port-to-Port Linking: Click any Output Port (the small grey square on the right of any node/group), move your cursor (you will see a preview dashed line), and click any other node's Input Port to form a live connection!
- Connection Inspector & Removal: Hovering over a connection line displays its metrics (e.g.
2.4M rows · 144 MB/s). Click a connection line to delete it from the pipeline.
3. 🖥️ Multi-Preset Topology Templates
Quickly switch the entire canvas topology, configuration parameters, and datasets using the dropdown at the top-left:
Customer CRM Cleanse(the exact state from your design spec)SaaS Lead Scrubbing(an API-driven normalize/deduplication pipeline)Financial Transaction Audit(a high-value outlier filter with security assertions)
4. 🚀 Live Pipeline Compiler & Run Simulation
- Click "Run Pipeline" in the top right to start a multi-step compiled sequence.
- Nodes will pulse and transition from Idle 🔘 to Running ⏳, then to Success ✅ (or Failure ❌ on outlier join errors), complete with rotating high-fidelity status ring animations.
- Connection paths light up with flowing dashes during execution.
5. 📊 Real-Time Interactive Spreadsheet Preview & Code Export
- Watch your data actually transform cell-by-cell! Click any node on the canvas, and the spreadsheet at the bottom displays a live preview of the dataset as of that specific pipeline step (with raw vs cleaned text).
- "Highlight Transformed Fields" checkbox toggles colored background markers on the exact cells that were modified (e.g. capital case formatting or whitespace stripping).
- Click "Export preview CSV" to download the clean data of the selected stage directly.
6. 🖥️ Kernel logs terminal
- Switch to the Kernel Execution Logs tab at the bottom to watch CLI compilation, thread executions, and key join warnings log in real-time with automatic downward scrolling.
➕ Add Custom Nodes On-the-Fly
- Click the "+ Add Node" button on the titlebar to spawn new source modules, regex redactors, null filters, or analytical export nodes on the canvas.
Files built:
index.html,src/index.css,src/App.tsx
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.