@pipelex/mthds-ui 0.5.0
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/LICENSE +21 -0
- package/README.md +299 -0
- package/dist/chunk-CCUSQM3E.js +1155 -0
- package/dist/chunk-CCUSQM3E.js.map +1 -0
- package/dist/chunk-DDAAVRWG.js +25 -0
- package/dist/chunk-DDAAVRWG.js.map +1 -0
- package/dist/chunk-IX35IG2I.js +1 -0
- package/dist/chunk-IX35IG2I.js.map +1 -0
- package/dist/graph/index.d.ts +95 -0
- package/dist/graph/index.js +73 -0
- package/dist/graph/index.js.map +1 -0
- package/dist/graph/react/detail/DetailPanel.css +525 -0
- package/dist/graph/react/graph-core.css +394 -0
- package/dist/graph/react/index.css +753 -0
- package/dist/graph/react/index.css.map +1 -0
- package/dist/graph/react/index.d.ts +252 -0
- package/dist/graph/react/index.js +2207 -0
- package/dist/graph/react/index.js.map +1 -0
- package/dist/graph/react/stuff/StuffViewer.css +284 -0
- package/dist/graph/react/viewer/GraphToolbar.css +61 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +73 -0
- package/dist/index.js.map +1 -0
- package/dist/shiki/index.d.ts +13 -0
- package/dist/shiki/index.js +1333 -0
- package/dist/shiki/index.js.map +1 -0
- package/dist/types-bV8F_WoM.d.ts +366 -0
- package/package.json +109 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/graph/react/stuff/StuffViewer.css","../../../src/graph/react/detail/DetailPanel.css","../../../src/graph/react/viewer/GraphToolbar.css"],"sourcesContent":["/* ─── StuffViewer component styles ────────────────────────────────────────── */\n/* Uses CSS custom properties for consumer theming. Defaults match graph-core.css. */\n\n.stuff-viewer {\n --sv-bg: var(--color-bg, #0a0a0a);\n --sv-surface: var(--color-surface, #16213e);\n --sv-surface-hover: var(--color-surface-hover, #1f2b47);\n --sv-border: var(--color-border, #2a3a5a);\n --sv-text: var(--color-text, #e2e8f0);\n --sv-text-muted: var(--color-text-muted, #94a3b8);\n --sv-accent: var(--color-accent, #3b82f6);\n --sv-success: #10b981;\n --sv-success-bg: rgba(16, 185, 129, 0.2);\n --sv-radius: 4px;\n --sv-font-sans: var(\n --font-sans,\n \"Inter\",\n -apple-system,\n BlinkMacSystemFont,\n \"Segoe UI\",\n sans-serif\n );\n --sv-font-mono: var(--font-mono, \"JetBrains Mono\", \"Monaco\", \"Menlo\", monospace);\n\n font-family: var(--sv-font-sans);\n color: var(--sv-text);\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\n/* ─── Header ─────────────────────────────────────────────────────────────── */\n\n.stuff-viewer-header {\n display: flex;\n flex-direction: column;\n gap: 2px;\n padding: 12px 16px 8px;\n border-bottom: 1px solid var(--sv-border);\n flex-shrink: 0;\n}\n\n.stuff-viewer-title {\n font-size: 14px;\n font-weight: 600;\n color: var(--sv-text);\n margin: 0;\n}\n\n.stuff-viewer-subtitle {\n font-size: 12px;\n color: var(--sv-text-muted);\n margin: 0;\n}\n\n/* ─── Toolbar: tabs + action buttons ─────────────────────────────────────── */\n\n.stuff-viewer-toolbar {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 8px 16px;\n gap: 8px;\n flex-shrink: 0;\n}\n\n.stuff-viewer-tabs {\n display: flex;\n gap: 4px;\n}\n\n.stuff-viewer-tab {\n padding: 5px 10px;\n border-radius: var(--sv-radius);\n cursor: pointer;\n font-size: 12px;\n font-weight: 500;\n background: var(--sv-surface-hover);\n color: var(--sv-text-muted);\n border: none;\n transition:\n background 0.15s,\n color 0.15s;\n}\n\n.stuff-viewer-tab:hover {\n background: var(--sv-border);\n color: var(--sv-text);\n}\n\n.stuff-viewer-tab--active {\n background: var(--sv-accent);\n color: #fff;\n}\n\n/* ─── Action buttons ─────────────────────────────────────────────────────── */\n\n.stuff-viewer-actions {\n display: flex;\n gap: 4px;\n}\n\n.stuff-viewer-action-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n border-radius: var(--sv-radius);\n cursor: pointer;\n background: var(--sv-surface-hover);\n color: var(--sv-text-muted);\n border: none;\n transition:\n background 0.15s,\n color 0.15s;\n}\n\n.stuff-viewer-action-btn:hover {\n background: var(--sv-border);\n color: var(--sv-text);\n}\n\n.stuff-viewer-action-btn--copied {\n background: var(--sv-success-bg);\n color: var(--sv-success);\n}\n\n.stuff-viewer-action-btn svg {\n width: 14px;\n height: 14px;\n fill: currentColor;\n}\n\n/* ─── Content area ───────────────────────────────────────────────────────── */\n\n.stuff-viewer-content {\n flex: 1;\n overflow: auto;\n padding: 12px 16px 16px;\n min-height: 0;\n}\n\n/* Pre-formatted text (JSON and Pretty tabs) */\n.stuff-viewer-pre {\n font-family: var(--sv-font-mono);\n font-size: 11px;\n line-height: 1.5;\n white-space: pre-wrap;\n word-wrap: break-word;\n margin: 0;\n color: var(--sv-text-muted);\n}\n\n.stuff-viewer-pre--nowrap {\n white-space: pre;\n word-wrap: normal;\n line-height: 1;\n overflow-x: auto;\n padding-right: 20px;\n}\n\n/* HTML content */\n.stuff-viewer-html {\n font-family: var(--sv-font-sans);\n font-size: 11px;\n color: var(--sv-text-muted);\n line-height: 1.5;\n}\n\n.stuff-viewer-html table {\n border-collapse: collapse;\n width: 100%;\n}\n\n.stuff-viewer-html th,\n.stuff-viewer-html td {\n border: 1px solid var(--sv-border);\n padding: 8px 12px;\n text-align: left;\n}\n\n.stuff-viewer-html th {\n background: var(--sv-surface-hover);\n color: var(--sv-text);\n font-weight: 600;\n}\n\n.stuff-viewer-html tr:hover {\n background: var(--sv-surface-hover);\n}\n\n.stuff-viewer-html a {\n color: var(--sv-accent);\n text-decoration: none;\n}\n\n.stuff-viewer-html a:hover {\n text-decoration: underline;\n}\n\n.stuff-viewer-html ul {\n list-style: none;\n padding-left: 0;\n margin: 0;\n}\n\n/* PDF embed */\n.stuff-viewer-pdf {\n min-height: 400px;\n height: 100%;\n}\n\n.stuff-viewer-pdf embed {\n width: 100%;\n height: 100%;\n min-height: 500px;\n border: none;\n}\n\n/* Image content */\n.stuff-viewer-image {\n display: flex;\n justify-content: center;\n align-items: center;\n min-height: 200px;\n}\n\n.stuff-viewer-image img {\n max-width: 100%;\n max-height: 70vh;\n object-fit: contain;\n}\n\n/* Local file fallback (file:// URLs that can't render inline) */\n.stuff-viewer-local-file {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 16px;\n border-radius: 6px;\n background: var(--sv-surface);\n border: 1px solid var(--sv-border);\n}\n\n.stuff-viewer-local-file-icon {\n flex-shrink: 0;\n width: 32px;\n height: 32px;\n color: var(--sv-text-muted);\n}\n\n.stuff-viewer-local-file-icon svg {\n width: 100%;\n height: 100%;\n fill: currentColor;\n}\n\n.stuff-viewer-local-file-info {\n flex: 1;\n min-width: 0;\n}\n\n.stuff-viewer-local-file-name {\n font-family: var(--sv-font-mono);\n font-size: 12px;\n color: var(--sv-text);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.stuff-viewer-local-file-hint {\n font-size: 11px;\n color: var(--sv-text-muted);\n margin-top: 2px;\n}\n\n/* Placeholder for missing data */\n.stuff-viewer-placeholder {\n color: var(--sv-text-muted);\n font-style: italic;\n font-size: 13px;\n}\n","/* ─── Detail Panel — sliding side panel for node inspection ─────────────── */\n\n.detail-panel {\n position: absolute;\n top: 0;\n right: 0;\n width: 380px;\n height: 100%;\n background: #111118;\n border-left: 1px solid rgba(255, 255, 255, 0.1);\n z-index: 10;\n display: flex;\n flex-direction: column;\n font-family: \"Inter\", -apple-system, sans-serif;\n color: #e2e8f0;\n overflow: hidden;\n transition: transform 0.2s ease;\n}\n\n.detail-panel--closed {\n transform: translateX(100%);\n pointer-events: none;\n}\n\n/* ─── Resize handle — left edge drag target ────────────────────────────── */\n\n.detail-panel-resize-handle {\n position: absolute;\n top: 0;\n left: -6px;\n width: 12px;\n height: 100%;\n cursor: col-resize;\n z-index: 2;\n background: transparent;\n}\n\n/* Visible bar — narrower than the hit area */\n.detail-panel-resize-handle::before {\n content: \"\";\n position: absolute;\n top: 0;\n left: 5px;\n width: 2px;\n height: 100%;\n background: transparent;\n transition: background 0.15s;\n}\n\n.detail-panel-resize-handle:hover::before,\n.detail-panel--dragging .detail-panel-resize-handle::before {\n background: rgba(59, 130, 246, 0.5);\n}\n\n/* Grip indicator — visible on hover */\n.detail-panel-resize-handle::after {\n content: \"\";\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 2px;\n height: 24px;\n border-radius: 1px;\n background: transparent;\n transition: background 0.15s;\n}\n\n.detail-panel-resize-handle:hover::after,\n.detail-panel--dragging .detail-panel-resize-handle::after {\n background: rgba(59, 130, 246, 0.8);\n}\n\n/* Disable transition during drag for smooth resizing */\n.detail-panel--dragging {\n transition: none;\n}\n\n.detail-panel--dragging .detail-panel-content {\n pointer-events: none;\n}\n\n.detail-panel-close {\n all: unset;\n cursor: pointer;\n position: absolute;\n top: 12px;\n right: 12px;\n width: 24px;\n height: 24px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 4px;\n color: #64748b;\n font-size: 18px;\n line-height: 1;\n z-index: 3;\n}\n\n.detail-panel-close:hover {\n color: #94a3b8;\n background: rgba(255, 255, 255, 0.06);\n}\n\n.detail-panel-content {\n flex: 1;\n overflow-y: auto;\n padding: 20px 16px;\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n\n/* ─── Sticky header (pipe info + IO stays pinned at top) ───────────────── */\n\n.detail-sticky-header {\n position: sticky;\n top: -20px;\n z-index: 1;\n background: #111118;\n padding-top: 20px;\n margin-top: -20px;\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n\n/* ─── Shared detail components ──────────────────────────────────────────── */\n\n.detail-section-label {\n font-size: 9px;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 0.06em;\n color: #64748b;\n margin-bottom: 6px;\n}\n\n.detail-header {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.detail-badge {\n font-size: 10px;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 0.04em;\n padding: 2px 7px;\n border-radius: 4px;\n white-space: nowrap;\n}\n\n.detail-badge--operator {\n background: #ff6b6b;\n color: #0e0e0e;\n}\n\n.detail-badge--controller {\n background: #bd93f9;\n color: #0e0e0e;\n}\n\n.detail-pipe-code {\n font-family: \"JetBrains Mono\", \"Monaco\", monospace;\n font-size: 14px;\n font-weight: 600;\n color: #ff6b6b;\n}\n\n.detail-pipe-code--controller {\n color: #bd93f9;\n}\n\n.detail-status {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.detail-status-dot {\n width: 8px;\n height: 8px;\n border-radius: 50%;\n display: inline-block;\n}\n\n.detail-status-label {\n font-size: 12px;\n font-weight: 600;\n text-transform: capitalize;\n}\n\n.detail-duration {\n font-size: 11px;\n color: #64748b;\n font-family: \"JetBrains Mono\", \"Monaco\", monospace;\n}\n\n.detail-description {\n font-size: 12px;\n color: #94a3b8;\n line-height: 1.5;\n}\n\n/* ─── IO Pills ──────────────────────────────────────────────────────────── */\n\n.detail-io-pill {\n display: flex;\n align-items: center;\n gap: 6px;\n font-size: 11px;\n padding: 3px 8px;\n border-radius: 4px;\n background: rgba(255, 255, 255, 0.04);\n border: 1px solid rgba(255, 255, 255, 0.06);\n}\n\n.detail-io-name {\n font-family: \"JetBrains Mono\", \"Monaco\", monospace;\n color: #e2e8f0;\n}\n\n.detail-io-concept {\n color: #64748b;\n font-size: 10px;\n}\n\n.detail-io-list {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n/* ─── Blueprint-specific sections ───────────────────────────────────────── */\n\n.detail-prompt-block {\n font-family: \"JetBrains Mono\", \"Monaco\", monospace;\n font-size: 11px;\n color: #94a3b8;\n background: rgba(255, 255, 255, 0.03);\n border: 1px solid rgba(255, 255, 255, 0.06);\n border-radius: 6px;\n padding: 10px 12px;\n white-space: pre-wrap;\n word-break: break-word;\n overflow-y: auto;\n line-height: 1.5;\n}\n\n.detail-prompt-block--collapsed {\n max-height: 300px;\n}\n\n.detail-prompt-block--expanded {\n max-height: none;\n overflow-y: visible;\n}\n\n.detail-prompt-expand-btn {\n all: unset;\n cursor: pointer;\n display: flex;\n align-items: center;\n gap: 4px;\n font-size: 9px;\n color: #64748b;\n padding: 2px 6px;\n border-radius: 3px;\n background: rgba(255, 255, 255, 0.04);\n border: 1px solid rgba(255, 255, 255, 0.06);\n transition: color 0.15s;\n}\n\n.detail-prompt-expand-btn:hover {\n color: #94a3b8;\n}\n\n.detail-kv-row {\n display: flex;\n justify-content: space-between;\n align-items: flex-start; /* top-align so the label stays next to the first line of a wrapped value */\n gap: 12px;\n font-size: 11px;\n padding: 3px 0;\n}\n\n.detail-kv-key {\n color: #64748b;\n flex-shrink: 0; /* label stays at its natural width */\n}\n\n.detail-kv-value {\n font-family: \"JetBrains Mono\", \"Monaco\", monospace;\n color: #e2e8f0;\n flex: 1 1 0;\n min-width: 0;\n text-align: right;\n word-break: break-word;\n overflow-wrap: anywhere;\n}\n\n/* ─── Field block: labeled multi-line text (for long resolved values) ─── */\n\n.detail-field-block {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.detail-field-block-label {\n font-family: \"JetBrains Mono\", \"Monaco\", monospace;\n font-size: 10px;\n color: #64748b;\n}\n\n.detail-field-block-value {\n font-family: \"JetBrains Mono\", \"Monaco\", monospace;\n font-size: 11px;\n color: #e2e8f0;\n background: rgba(255, 255, 255, 0.03);\n border: 1px solid rgba(255, 255, 255, 0.06);\n border-radius: 6px;\n padding: 8px 10px;\n white-space: pre-wrap;\n word-break: break-word;\n overflow-wrap: anywhere;\n line-height: 1.5;\n max-height: 240px;\n overflow-y: auto;\n}\n\n/* ─── Nested construct sub-section header ───────────────────────────────── */\n/* Rendered before each nested sub-construct's recursive contents. The left\n * border + indent provides a visual \"branch\" cue so the tree structure is\n * obvious without needing collapse state. */\n\n.detail-nested-header {\n display: flex;\n align-items: baseline;\n justify-content: space-between;\n gap: 8px;\n margin-top: 6px;\n margin-bottom: 4px;\n padding: 4px 0 4px 8px;\n border-left: 2px solid rgba(80, 250, 123, 0.35);\n}\n\n.detail-nested-header-name {\n font-family: \"JetBrains Mono\", \"Monaco\", monospace;\n font-size: 11px;\n font-weight: 600;\n color: #e2e8f0;\n}\n\n.detail-nested-header-meta {\n font-family: \"JetBrains Mono\", \"Monaco\", monospace;\n font-size: 9px;\n color: #64748b;\n text-transform: uppercase;\n letter-spacing: 0.04em;\n}\n\n/* ─── Concept schema table ──────────────────────────────────────────────── */\n\n.detail-schema-table {\n width: 100%;\n font-size: 11px;\n border-collapse: collapse;\n}\n\n.detail-schema-table th {\n text-align: left;\n font-weight: 700;\n color: #64748b;\n font-size: 9px;\n text-transform: uppercase;\n letter-spacing: 0.06em;\n padding: 4px 6px;\n border-bottom: 1px solid rgba(255, 255, 255, 0.08);\n}\n\n.detail-schema-table td {\n padding: 4px 6px;\n border-bottom: 1px solid rgba(255, 255, 255, 0.04);\n color: #94a3b8;\n}\n\n.detail-schema-field {\n font-family: \"JetBrains Mono\", \"Monaco\", monospace;\n color: #e2e8f0;\n}\n\n.detail-schema-type {\n color: #8be9fd;\n}\n\n.detail-schema-required {\n color: #ff6b6b;\n font-size: 9px;\n}\n\n/* ─── Error section ─────────────────────────────────────────────────────── */\n\n.detail-error {\n background: rgba(255, 85, 85, 0.08);\n border: 1px solid rgba(255, 85, 85, 0.2);\n border-radius: 6px;\n padding: 10px 12px;\n}\n\n.detail-error-type {\n font-size: 12px;\n font-weight: 600;\n color: #ff5555;\n margin-bottom: 4px;\n}\n\n.detail-error-message {\n font-size: 11px;\n color: #94a3b8;\n line-height: 1.5;\n}\n\n.detail-error-stack {\n font-family: \"JetBrains Mono\", \"Monaco\", monospace;\n font-size: 10px;\n color: #64748b;\n margin-top: 8px;\n max-height: 150px;\n overflow-y: auto;\n white-space: pre-wrap;\n word-break: break-word;\n}\n\n/* ─── Steps list (PipeSequence, PipeCondition outcomes) ─────────────────── */\n\n.detail-steps-list {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.detail-step-item {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 11px;\n padding: 4px 8px;\n border-radius: 4px;\n background: rgba(255, 255, 255, 0.03);\n border: 1px solid rgba(255, 255, 255, 0.06);\n}\n\n.detail-step-index {\n color: #64748b;\n font-size: 10px;\n font-weight: 700;\n min-width: 16px;\n}\n\n.detail-step-code {\n font-family: \"JetBrains Mono\", \"Monaco\", monospace;\n color: #e2e8f0;\n}\n\n/* ─── Tags/Metrics ──────────────────────────────────────────────────────── */\n\n.detail-tags {\n display: flex;\n flex-wrap: wrap;\n gap: 4px;\n}\n\n.detail-tag {\n font-size: 10px;\n padding: 2px 6px;\n border-radius: 3px;\n background: rgba(255, 255, 255, 0.04);\n border: 1px solid rgba(255, 255, 255, 0.06);\n}\n\n.detail-tag-key {\n color: #64748b;\n}\n\n.detail-tag-value {\n color: #e2e8f0;\n font-family: \"JetBrains Mono\", \"Monaco\", monospace;\n}\n\n/* ─── Concept panel header ──────────────────────────────────────────────── */\n\n.detail-concept-code {\n font-family: \"JetBrains Mono\", \"Monaco\", monospace;\n font-size: 14px;\n font-weight: 600;\n color: #50fa7b;\n}\n\n.detail-concept-domain {\n font-size: 11px;\n color: #64748b;\n}\n\n.detail-refines {\n font-size: 11px;\n color: #94a3b8;\n}\n\n.detail-refines-code {\n font-family: \"JetBrains Mono\", \"Monaco\", monospace;\n color: #8be9fd;\n}\n\n/* ─── Not available fallback ────────────────────────────────────────────── */\n\n.detail-not-available {\n font-size: 12px;\n color: #64748b;\n font-style: italic;\n padding: 8px 0;\n}\n","/* ─── Graph Toolbar — floating controls over the graph background ─────── */\n\n.graph-toolbar {\n position: absolute;\n top: 8px;\n display: flex;\n align-items: center;\n gap: 4px;\n z-index: 11;\n pointer-events: auto;\n}\n\n.graph-toolbar-btn {\n all: unset;\n box-sizing: border-box;\n cursor: pointer;\n width: 28px;\n height: 28px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: 6px;\n background: rgba(17, 17, 24, 0.8);\n border: 1px solid rgba(255, 255, 255, 0.1);\n color: #cbd5e1;\n backdrop-filter: blur(6px);\n transition:\n background 0.15s,\n color 0.15s,\n border-color 0.15s;\n}\n\n.graph-toolbar-btn:hover {\n background: rgba(30, 30, 40, 0.9);\n color: #f1f5f9;\n border-color: rgba(255, 255, 255, 0.18);\n}\n\n.graph-toolbar-btn:focus-visible {\n outline: 2px solid rgba(59, 130, 246, 0.6);\n outline-offset: 1px;\n}\n\n.graph-toolbar-btn--active {\n background: #3b82f6;\n border-color: #3b82f6;\n color: #ffffff;\n}\n\n.graph-toolbar-btn--active:hover {\n background: #2563eb;\n border-color: #2563eb;\n color: #ffffff;\n}\n\n.graph-toolbar-separator {\n width: 1px;\n height: 18px;\n background: rgba(255, 255, 255, 0.12);\n margin: 0 2px;\n}\n"],"mappings":";AAGA,CAAC;AACC,WAAS,IAAI,UAAU,EAAE;AACzB,gBAAc,IAAI,eAAe,EAAE;AACnC,sBAAoB,IAAI,qBAAqB,EAAE;AAC/C,eAAa,IAAI,cAAc,EAAE;AACjC,aAAW,IAAI,YAAY,EAAE;AAC7B,mBAAiB,IAAI,kBAAkB,EAAE;AACzC,eAAa,IAAI,cAAc,EAAE;AACjC,gBAAc;AACd,mBAAiB,KAAK,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE;AACpC,eAAa;AACb,kBAAgB,KACd,WAAW,EACX,OAAO,EACP,aAAa,EACb,kBAAkB,EAClB,UAAU,EACV;AAEF,kBAAgB,IAAI,WAAW,EAAE,gBAAgB,EAAE,QAAQ,EAAE,OAAO,EAAE;AAEtE,eAAa,IAAI;AACjB,SAAO,IAAI;AACX,WAAS;AACT,kBAAgB;AAChB,UAAQ;AACV;AAIA,CAAC;AACC,WAAS;AACT,kBAAgB;AAChB,OAAK;AACL,WAAS,KAAK,KAAK;AACnB,iBAAe,IAAI,MAAM,IAAI;AAC7B,eAAa;AACf;AAEA,CAAC;AACC,aAAW;AACX,eAAa;AACb,SAAO,IAAI;AACX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cAAY,KAAK,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE;AAChC,UAAQ,EAAE;AACZ;","names":[]}
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { G as GraphNodeData, a as GraphEdge, b as GraphNode, c as GraphSpec, d as GraphConfig, e as GraphDirection, P as PipeStatus, L as LabelDescriptor, f as PipeControllerType, g as PipeOperatorType, h as GraphSpecNode, C as ConceptInfo, i as GraphSpecNodeIoItem } from '../../types-bV8F_WoM.js';
|
|
4
|
+
import { Edge, Node, ReactFlowInstance } from '@xyflow/react';
|
|
5
|
+
|
|
6
|
+
/** Data for rendering a stuff (data item) in the StuffViewer component. */
|
|
7
|
+
interface StuffViewerData {
|
|
8
|
+
digest: string;
|
|
9
|
+
name?: string;
|
|
10
|
+
concept?: string;
|
|
11
|
+
contentType?: string;
|
|
12
|
+
data?: unknown;
|
|
13
|
+
dataText?: string;
|
|
14
|
+
dataHtml?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Resolver for `pipelex-storage://` URIs.
|
|
18
|
+
*
|
|
19
|
+
* Internal pipelex-storage URIs are not directly fetchable by a browser. Callers
|
|
20
|
+
* pass this function to components that may render such URIs (StuffViewer etc.)
|
|
21
|
+
* to exchange them for short-lived, browser-fetchable URLs (e.g. presigned S3).
|
|
22
|
+
*
|
|
23
|
+
* The resolved URL has a limited lifetime. Components displaying media for
|
|
24
|
+
* extended periods should re-invoke the resolver before expiry.
|
|
25
|
+
*
|
|
26
|
+
* **Stability requirement:** keep the reference stable across renders (wrap in
|
|
27
|
+
* `useCallback` or define outside the component). StuffViewer uses this as a
|
|
28
|
+
* `useEffect` dependency — a fresh arrow on every render re-triggers the
|
|
29
|
+
* presigned-URL fetch on every parent re-render.
|
|
30
|
+
*
|
|
31
|
+
* Returns null if the URI cannot be resolved (auth failure, ownership mismatch, etc.).
|
|
32
|
+
*/
|
|
33
|
+
type ResolveStorageUrl = (uri: string) => Promise<string | null>;
|
|
34
|
+
|
|
35
|
+
/** ReactFlow node parameterized with our domain data. */
|
|
36
|
+
type AppNode = Node<GraphNodeData>;
|
|
37
|
+
/** ReactFlow edge with standard fields (domain-only fields are dropped at the boundary). */
|
|
38
|
+
type AppEdge = Edge<Record<string, unknown>>;
|
|
39
|
+
/** ReactFlow instance typed with our app node/edge types. */
|
|
40
|
+
type AppRFInstance = ReactFlowInstance<AppNode, AppEdge>;
|
|
41
|
+
/**
|
|
42
|
+
* Convert domain GraphNode[] to ReactFlow AppNode[].
|
|
43
|
+
*
|
|
44
|
+
* Style fields use Record<string, string | number> in the domain layer but
|
|
45
|
+
* CSSProperties in React. The cast is safe because graph builders only set
|
|
46
|
+
* valid CSS properties (width, height, background, border, etc.).
|
|
47
|
+
*/
|
|
48
|
+
declare function toAppNodes(nodes: GraphNode[]): AppNode[];
|
|
49
|
+
/**
|
|
50
|
+
* Convert domain GraphEdge[] to ReactFlow AppEdge[].
|
|
51
|
+
*
|
|
52
|
+
* Domain-only fields (_batchEdge, _crossGroup) are dropped — they're only used
|
|
53
|
+
* by pure graph logic (layout weight calculation), not by ReactFlow rendering.
|
|
54
|
+
* The markerEnd cast is safe: our { type: "arrowclosed", color } satisfies EdgeMarker.
|
|
55
|
+
*/
|
|
56
|
+
declare function toAppEdges(edges: GraphEdge[]): AppEdge[];
|
|
57
|
+
|
|
58
|
+
interface GraphViewerProps {
|
|
59
|
+
graphspec: GraphSpec | null;
|
|
60
|
+
config?: GraphConfig;
|
|
61
|
+
/** Initial layout direction. Users can toggle this via the built-in toolbar. */
|
|
62
|
+
initialDirection?: GraphDirection;
|
|
63
|
+
/** Initial controller-grouping state. Users can toggle this via the built-in toolbar. */
|
|
64
|
+
initialShowControllers?: boolean;
|
|
65
|
+
/** Hide the built-in floating toolbar (direction + controllers toggle). */
|
|
66
|
+
hideToolbar?: boolean;
|
|
67
|
+
onNavigateToPipe?: (pipeCode: string, status?: PipeStatus) => void;
|
|
68
|
+
onStuffNodeClick?: (stuffData: StuffViewerData) => void;
|
|
69
|
+
onReactFlowInit?: (instance: AppRFInstance) => void;
|
|
70
|
+
/** Layer 2 execution state: pipe_code → current status. Updates node status dots in real-time. */
|
|
71
|
+
statusMap?: Record<string, PipeStatus>;
|
|
72
|
+
/** Called when any node is clicked with full node data. Use for detail/inspector panels. */
|
|
73
|
+
onNodeSelect?: (nodeId: string, nodeData: GraphNodeData, event: React.MouseEvent) => void;
|
|
74
|
+
/** Called when the graph background (pane) is clicked. Use to dismiss detail panels. */
|
|
75
|
+
onPaneClick?: () => void;
|
|
76
|
+
/** Render extra content below the built-in detail panel content for the selected node. */
|
|
77
|
+
renderDetailExtra?: (nodeId: string, nodeData: GraphNodeData) => React.ReactNode;
|
|
78
|
+
/**
|
|
79
|
+
* Resolver for `pipelex-storage://` URIs. Passed down to StuffViewer so it can
|
|
80
|
+
* exchange internal URIs for browser-fetchable presigned URLs when rendering media.
|
|
81
|
+
*/
|
|
82
|
+
resolveStorageUrl?: ResolveStorageUrl;
|
|
83
|
+
}
|
|
84
|
+
/** Apply Layer 2 execution state overrides to rendered nodes. */
|
|
85
|
+
declare function applyStatusOverrides(nodes: AppNode[], statusMap: Record<string, PipeStatus> | undefined): AppNode[];
|
|
86
|
+
declare function GraphViewer(props: GraphViewerProps): react_jsx_runtime.JSX.Element;
|
|
87
|
+
|
|
88
|
+
declare function renderLabel(desc: LabelDescriptor): React.ReactNode;
|
|
89
|
+
/** Convert label descriptors to React elements on all nodes */
|
|
90
|
+
declare function hydrateLabels(nodes: GraphNode[]): GraphNode[];
|
|
91
|
+
|
|
92
|
+
interface ControllerGroupData {
|
|
93
|
+
label?: React.ReactNode;
|
|
94
|
+
pipeType?: PipeControllerType;
|
|
95
|
+
childCount?: number;
|
|
96
|
+
isCollapsed?: boolean;
|
|
97
|
+
onToggleCollapse?: () => void;
|
|
98
|
+
}
|
|
99
|
+
declare function ControllerGroupNode({ data }: {
|
|
100
|
+
data: ControllerGroupData;
|
|
101
|
+
}): react_jsx_runtime.JSX.Element;
|
|
102
|
+
declare const controllerNodeTypes: {
|
|
103
|
+
controllerGroup: typeof ControllerGroupNode;
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
type PipeCardDirection = "LR" | "TB";
|
|
107
|
+
interface PipeCardData {
|
|
108
|
+
pipeCode: string;
|
|
109
|
+
pipeType: PipeOperatorType;
|
|
110
|
+
description?: string;
|
|
111
|
+
status: PipeStatus;
|
|
112
|
+
inputs: {
|
|
113
|
+
name: string;
|
|
114
|
+
concept: string;
|
|
115
|
+
}[];
|
|
116
|
+
outputs: {
|
|
117
|
+
name: string;
|
|
118
|
+
concept: string;
|
|
119
|
+
}[];
|
|
120
|
+
/** Blueprint-specific tags (model, prompt, etc.) */
|
|
121
|
+
tags?: Record<string, string>;
|
|
122
|
+
/** Layout direction — controls card orientation (narrow+tall in LR, wide+short in TB) */
|
|
123
|
+
direction?: PipeCardDirection;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
interface PipeCardNodeProps {
|
|
127
|
+
data: PipeCardData;
|
|
128
|
+
}
|
|
129
|
+
/** Resolves the correct card component for the pipe type and renders it. */
|
|
130
|
+
declare function PipeCardNode({ data }: PipeCardNodeProps): react_jsx_runtime.JSX.Element;
|
|
131
|
+
|
|
132
|
+
interface PipeCardBaseProps {
|
|
133
|
+
data: PipeCardData;
|
|
134
|
+
/** Extra content rendered below the I/O section (for per-type customization) */
|
|
135
|
+
children?: React.ReactNode;
|
|
136
|
+
}
|
|
137
|
+
declare function PipeCardBase({ data, children }: PipeCardBaseProps): react_jsx_runtime.JSX.Element;
|
|
138
|
+
|
|
139
|
+
interface StuffViewerProps {
|
|
140
|
+
stuff: StuffViewerData;
|
|
141
|
+
className?: string;
|
|
142
|
+
/**
|
|
143
|
+
* Resolver for `pipelex-storage://` URIs. If provided and the stuff data
|
|
144
|
+
* references an internal URI, the viewer will call this to obtain a
|
|
145
|
+
* presigned URL for inline rendering. Without a resolver, media with only
|
|
146
|
+
* internal URIs falls back to the "no preview" placeholder.
|
|
147
|
+
*/
|
|
148
|
+
resolveStorageUrl?: ResolveStorageUrl;
|
|
149
|
+
}
|
|
150
|
+
declare function StuffViewer({ stuff, className, resolveStorageUrl }: StuffViewerProps): react_jsx_runtime.JSX.Element;
|
|
151
|
+
|
|
152
|
+
/** Check whether a URL is safe for links/downloads (no javascript: or data: injection). */
|
|
153
|
+
declare function isSafeDisplayUrl(url: unknown): url is string;
|
|
154
|
+
/** Check whether a URL can be rendered inline in an <img> or <embed> tag.
|
|
155
|
+
* Allows http://, https://, file:// (local dev / Electron), and relative paths. */
|
|
156
|
+
declare function isInlineRenderableUrl(url: unknown): url is string;
|
|
157
|
+
/**
|
|
158
|
+
* Extract a displayable URL from stuff data (for links, downloads, open-external).
|
|
159
|
+
* Prefers public_url (pre-signed S3 / file:// URI) over internal pipelex-storage:// URLs.
|
|
160
|
+
* Returns null for unsafe or missing URLs.
|
|
161
|
+
*/
|
|
162
|
+
declare function extractUrl(data: unknown): string | null;
|
|
163
|
+
/**
|
|
164
|
+
* Extract a URL that can be rendered inline in <img>/<embed> tags.
|
|
165
|
+
* Returns http/https, file://, and relative URLs.
|
|
166
|
+
* Internal schemes like pipelex-storage:// are excluded.
|
|
167
|
+
*/
|
|
168
|
+
declare function extractInlineUrl(data: unknown): string | null;
|
|
169
|
+
/**
|
|
170
|
+
* Extract a `pipelex-storage://` URI from stuff data, if present.
|
|
171
|
+
*
|
|
172
|
+
* Pipelex-storage URIs are internal logical pointers that need to be resolved
|
|
173
|
+
* to a browser-fetchable URL (e.g. presigned S3) before rendering inline.
|
|
174
|
+
*/
|
|
175
|
+
declare function extractStorageUri(data: unknown): string | null;
|
|
176
|
+
/** Extract the filename from stuff data, if available. */
|
|
177
|
+
declare function extractFilename(data: unknown): string | null;
|
|
178
|
+
/**
|
|
179
|
+
* Determine the effective MIME type of a stuff item for preview rendering.
|
|
180
|
+
*
|
|
181
|
+
* Checks (in order):
|
|
182
|
+
* 1. Stuff-level `contentType` (when it's already a MIME type like "application/pdf")
|
|
183
|
+
* 2. The `mime_type` field on the data object (Document content carries this)
|
|
184
|
+
* 3. The file extension from `filename` or from the URL/URI
|
|
185
|
+
*
|
|
186
|
+
* The concept-level `contentType` (e.g. "document") is not a MIME type; we
|
|
187
|
+
* ignore it and look at the data instead. Returns null when nothing recognizable
|
|
188
|
+
* is found.
|
|
189
|
+
*/
|
|
190
|
+
declare function resolveMimeType(data: unknown, contentType: string | undefined, url: string | null): string | null;
|
|
191
|
+
/** Get the appropriate first-tab label based on content MIME type. */
|
|
192
|
+
declare function getHtmlTabLabel(contentType?: string | null): string;
|
|
193
|
+
/**
|
|
194
|
+
* Find stuff data by digest in a GraphSpec.
|
|
195
|
+
* Scans all nodes' IO items — outputs first (producer data), then inputs as fallback.
|
|
196
|
+
*/
|
|
197
|
+
declare function findStuffDataByDigest(graphspec: GraphSpec, digest: string): StuffViewerData | null;
|
|
198
|
+
|
|
199
|
+
interface DetailPanelProps {
|
|
200
|
+
isOpen: boolean;
|
|
201
|
+
onClose: () => void;
|
|
202
|
+
children: React.ReactNode;
|
|
203
|
+
/** Panel width in pixels. When provided, overrides the CSS default. */
|
|
204
|
+
width?: number;
|
|
205
|
+
/** Whether a resize drag is in progress. Disables CSS transition during drag. */
|
|
206
|
+
isDragging?: boolean;
|
|
207
|
+
/** Mouse-down handler for the resize handle. When provided, the handle is rendered. */
|
|
208
|
+
onResizeHandleMouseDown?: (e: React.MouseEvent) => void;
|
|
209
|
+
/** Close panel on Escape key. Defaults to true. */
|
|
210
|
+
closeOnEscape?: boolean;
|
|
211
|
+
}
|
|
212
|
+
declare function DetailPanel({ isOpen, onClose, children, width, isDragging, onResizeHandleMouseDown, closeOnEscape, }: DetailPanelProps): react_jsx_runtime.JSX.Element;
|
|
213
|
+
|
|
214
|
+
interface PipeDetailPanelProps {
|
|
215
|
+
node: GraphSpecNode;
|
|
216
|
+
spec: GraphSpec;
|
|
217
|
+
onConceptClick?: (conceptRef: string) => void;
|
|
218
|
+
}
|
|
219
|
+
declare function PipeDetailPanel({ node, spec, onConceptClick }: PipeDetailPanelProps): react_jsx_runtime.JSX.Element;
|
|
220
|
+
|
|
221
|
+
interface ConceptDetailPanelProps {
|
|
222
|
+
concept: ConceptInfo;
|
|
223
|
+
/** IO data for this concept instance. Accepts GraphSpecNodeIoItem or StuffViewerData. */
|
|
224
|
+
ioData?: GraphSpecNodeIoItem | StuffViewerData;
|
|
225
|
+
/** Whether this is a dry run (schema only, no real data). */
|
|
226
|
+
isDryRun?: boolean;
|
|
227
|
+
/** Resolver for `pipelex-storage://` URIs when rendering media in StuffViewer. */
|
|
228
|
+
resolveStorageUrl?: ResolveStorageUrl;
|
|
229
|
+
}
|
|
230
|
+
declare function ConceptDetailPanel({ concept, ioData, isDryRun, resolveStorageUrl }: ConceptDetailPanelProps): react_jsx_runtime.JSX.Element;
|
|
231
|
+
|
|
232
|
+
interface UseResizableOptions {
|
|
233
|
+
/** Initial panel width in pixels. */
|
|
234
|
+
defaultWidth: number;
|
|
235
|
+
/** Minimum allowed width in pixels. */
|
|
236
|
+
minWidth: number;
|
|
237
|
+
/** Maximum allowed width in pixels (also clamped to 60% of container). */
|
|
238
|
+
maxWidth: number;
|
|
239
|
+
/** Container element ref for percentage-based max-width calculation. */
|
|
240
|
+
containerRef?: React.RefObject<HTMLElement | null>;
|
|
241
|
+
}
|
|
242
|
+
interface UseResizableResult {
|
|
243
|
+
/** Current panel width in pixels. */
|
|
244
|
+
width: number;
|
|
245
|
+
/** Whether a resize drag is in progress. */
|
|
246
|
+
isDragging: boolean;
|
|
247
|
+
/** Attach to the resize handle's onMouseDown. */
|
|
248
|
+
handleMouseDown: (e: React.MouseEvent) => void;
|
|
249
|
+
}
|
|
250
|
+
declare function useResizable({ defaultWidth, minWidth, maxWidth, containerRef, }: UseResizableOptions): UseResizableResult;
|
|
251
|
+
|
|
252
|
+
export { type AppEdge, type AppNode, type AppRFInstance, ConceptDetailPanel, type ConceptDetailPanelProps, ControllerGroupNode, DetailPanel, type DetailPanelProps, GraphViewer, type GraphViewerProps, PipeCardBase, type PipeCardBaseProps, type PipeCardData, PipeCardNode, PipeDetailPanel, type PipeDetailPanelProps, PipeOperatorType, PipeStatus, type ResolveStorageUrl, StuffViewer, type StuffViewerData, type StuffViewerProps, type UseResizableOptions, type UseResizableResult, applyStatusOverrides, controllerNodeTypes, extractFilename, extractInlineUrl, extractStorageUri, extractUrl, findStuffDataByDigest, getHtmlTabLabel, hydrateLabels, isInlineRenderableUrl, isSafeDisplayUrl, renderLabel, resolveMimeType, toAppEdges, toAppNodes, useResizable };
|