743 lines
15 KiB
CSS
743 lines
15 KiB
CSS
.wf-editor-modal {
|
|
display: flex;
|
|
flex-direction: column;
|
|
width: min(1200px, 95vw);
|
|
height: min(820px, 92vh);
|
|
min-width: 640px;
|
|
min-height: 480px;
|
|
resize: both;
|
|
overflow: hidden;
|
|
background: var(--bg);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-md);
|
|
}
|
|
|
|
.wf-editor-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: var(--space-md);
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
|
|
.wf-editor-header h2 {
|
|
margin: 0;
|
|
font-size: 1rem;
|
|
color: var(--text);
|
|
}
|
|
|
|
.wf-editor-close {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
background: transparent;
|
|
border: none;
|
|
color: var(--text-muted);
|
|
cursor: pointer;
|
|
}
|
|
|
|
.wf-editor-close:hover {
|
|
color: var(--text);
|
|
}
|
|
|
|
.wf-editor-body {
|
|
display: flex;
|
|
flex: 1;
|
|
min-height: 0;
|
|
}
|
|
|
|
.wf-editor-sidebar {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-xs);
|
|
width: 220px;
|
|
padding: var(--space-sm);
|
|
border-right: 1px solid var(--border);
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.wf-editor-new {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: var(--space-xs);
|
|
padding: var(--space-xs) var(--space-sm);
|
|
background: var(--bg-secondary);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
color: var(--text);
|
|
cursor: pointer;
|
|
}
|
|
|
|
.wf-editor-new:hover {
|
|
background: var(--bg-tertiary);
|
|
}
|
|
|
|
.wf-editor-list {
|
|
list-style: none;
|
|
margin: 0;
|
|
padding: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 2px;
|
|
}
|
|
|
|
.wf-editor-list-item {
|
|
width: 100%;
|
|
text-align: left;
|
|
padding: var(--space-xs) var(--space-sm);
|
|
background: transparent;
|
|
border: 1px solid transparent;
|
|
border-radius: var(--radius-sm);
|
|
color: var(--text);
|
|
cursor: pointer;
|
|
}
|
|
|
|
.wf-editor-list-item:hover {
|
|
background: var(--bg-secondary);
|
|
}
|
|
|
|
.wf-editor-list-item.active {
|
|
background: var(--bg-tertiary);
|
|
border-color: var(--border);
|
|
}
|
|
|
|
.wf-editor-empty {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-xs);
|
|
padding: var(--space-md);
|
|
color: var(--text-muted);
|
|
font-size: 0.85rem;
|
|
}
|
|
|
|
.wf-editor-canvas-wrap {
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.wf-editor-canvas-empty {
|
|
flex: 1;
|
|
justify-content: center;
|
|
}
|
|
|
|
/* No-workflow onboarding panel (R9): icon + heading + explanation + create CTA. */
|
|
.wf-editor-onboard {
|
|
flex-direction: column;
|
|
text-align: center;
|
|
gap: var(--space-sm);
|
|
padding: var(--space-lg);
|
|
}
|
|
|
|
.wf-editor-onboard-icon {
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.wf-editor-onboard-title {
|
|
margin: 0;
|
|
font-size: 1rem;
|
|
color: var(--text);
|
|
}
|
|
|
|
.wf-editor-onboard-text {
|
|
margin: 0;
|
|
max-width: 36ch;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.wf-editor-onboard-cta {
|
|
margin-top: var(--space-xs);
|
|
}
|
|
|
|
/* Trivial-graph palette hint (R9): non-blocking banner over the canvas. */
|
|
.wf-trivial-hint {
|
|
position: absolute;
|
|
top: var(--space-sm);
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
z-index: 5;
|
|
pointer-events: none;
|
|
max-width: min(90%, 42ch);
|
|
padding: var(--space-xs) var(--space-sm);
|
|
background: color-mix(in srgb, var(--ws-info) 8%, var(--bg-secondary));
|
|
border: 1px solid var(--ws-info);
|
|
border-radius: var(--radius-sm);
|
|
color: var(--ws-info);
|
|
font-size: 0.8rem;
|
|
text-align: center;
|
|
}
|
|
|
|
.wf-editor-toolbar {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: var(--space-sm);
|
|
padding: var(--space-sm);
|
|
border-bottom: 1px solid var(--border);
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.wf-editor-palette {
|
|
display: flex;
|
|
gap: var(--space-xs);
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.wf-palette-btn,
|
|
.wf-editor-delete,
|
|
.wf-editor-save {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: var(--space-xs);
|
|
padding: var(--space-xs) var(--space-sm);
|
|
background: var(--bg-secondary);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
color: var(--text);
|
|
cursor: pointer;
|
|
transition: background var(--transition-fast);
|
|
}
|
|
|
|
.wf-palette-btn:hover,
|
|
.wf-editor-delete:hover {
|
|
background: var(--bg-tertiary);
|
|
}
|
|
|
|
.wf-editor-actions {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-xs);
|
|
}
|
|
|
|
.wf-editor-readonly-note {
|
|
font-size: 0.75rem;
|
|
color: var(--text-tertiary);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.04em;
|
|
}
|
|
|
|
/* Neutralize the fieldset wrapper so it only gates interactivity, not layout. */
|
|
.wf-inspector-fields {
|
|
display: contents;
|
|
border: none;
|
|
margin: 0;
|
|
padding: 0;
|
|
min-inline-size: 0;
|
|
}
|
|
|
|
.wf-editor-save {
|
|
background: var(--todo);
|
|
border-color: var(--todo);
|
|
color: var(--bg);
|
|
}
|
|
|
|
.wf-editor-save:disabled {
|
|
opacity: 0.6;
|
|
cursor: default;
|
|
}
|
|
|
|
.wf-editor-delete {
|
|
color: var(--ws-error);
|
|
}
|
|
|
|
/* Inspector delete buttons (U3): sit below the field group, sized to the panel. */
|
|
.wf-inspector-delete {
|
|
margin-top: var(--space-sm);
|
|
justify-content: center;
|
|
}
|
|
|
|
.wf-editor-banner {
|
|
padding: var(--space-sm) var(--space-md);
|
|
background: var(--bg-secondary);
|
|
border-bottom: 1px solid var(--ws-warning);
|
|
color: var(--ws-warning);
|
|
font-size: 0.85rem;
|
|
}
|
|
|
|
/* Info-tone banner (KTD-4): branching graph runs on the interpreter only — not a
|
|
* failure, so it uses the info token rather than the warning treatment. */
|
|
.wf-editor-banner--info {
|
|
border-bottom-color: var(--ws-info);
|
|
color: var(--ws-info);
|
|
background: color-mix(in srgb, var(--ws-info) 6%, var(--bg-secondary));
|
|
}
|
|
|
|
.wf-editor-canvas {
|
|
flex: 1;
|
|
min-height: 0;
|
|
position: relative;
|
|
}
|
|
|
|
.wf-editor-inspector {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-sm);
|
|
width: 280px;
|
|
padding: var(--space-md);
|
|
border-left: 1px solid var(--border);
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.wf-editor-inspector h3 {
|
|
margin: 0;
|
|
font-size: 0.9rem;
|
|
color: var(--text);
|
|
}
|
|
|
|
.wf-field {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-xs);
|
|
font-size: 0.8rem;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.wf-field input,
|
|
.wf-field textarea,
|
|
.wf-field select {
|
|
padding: var(--space-xs) var(--space-sm);
|
|
background: var(--bg-secondary);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
color: var(--text);
|
|
font: inherit;
|
|
}
|
|
|
|
.wf-field input:focus,
|
|
.wf-field textarea:focus,
|
|
.wf-field select:focus {
|
|
outline: none;
|
|
box-shadow: var(--focus-ring);
|
|
}
|
|
|
|
.wf-inspector-note {
|
|
margin: 0;
|
|
font-size: 0.78rem;
|
|
color: var(--text-tertiary);
|
|
}
|
|
|
|
.wf-inspector-note--info {
|
|
color: var(--ws-warning);
|
|
}
|
|
|
|
.wf-field--checkbox {
|
|
flex-direction: row;
|
|
align-items: center;
|
|
gap: var(--space-sm);
|
|
cursor: pointer;
|
|
}
|
|
|
|
.wf-field--checkbox input[type="checkbox"] {
|
|
width: auto;
|
|
padding: 0;
|
|
margin: 0;
|
|
background: none;
|
|
border: none;
|
|
accent-color: var(--todo);
|
|
cursor: pointer;
|
|
}
|
|
|
|
/* Canvas nodes */
|
|
/* ── U1: card-style nodes ──
|
|
* Cards have a header row (icon + label + badges + error badge) and an
|
|
* independent config-summary row. Sizing mirrors WF_CARD_WIDTH /
|
|
* WF_CARD_MAX_WIDTH in workflow-flow-mapping.ts; the max-width ceiling forces
|
|
* long labels/summaries to truncate rather than grow the canvas. Per-kind
|
|
* accent uses a left border + a faint header tint over a semantic token. */
|
|
.wf-node {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 2px;
|
|
box-sizing: border-box;
|
|
width: 200px;
|
|
max-width: 240px;
|
|
padding: var(--space-xs) var(--space-sm);
|
|
background: var(--bg-secondary);
|
|
border: 1px solid var(--border);
|
|
border-left: 3px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
color: var(--text);
|
|
font-size: 0.8rem;
|
|
}
|
|
|
|
.wf-node-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-xs);
|
|
min-width: 0;
|
|
}
|
|
|
|
/* Summary row: single line, truncates independently of the header. */
|
|
.wf-node-summary {
|
|
min-width: 0;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
font-size: 0.68rem;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
/* Per-kind accent: left border color + a faint header tint. color-mix over
|
|
* semantic tokens keeps both themes legible without raw colors. */
|
|
.wf-node-start {
|
|
border-left-color: var(--ws-success);
|
|
}
|
|
|
|
.wf-node-end {
|
|
border-left-color: var(--text-muted);
|
|
}
|
|
|
|
.wf-node-prompt {
|
|
border-left-color: var(--accent, var(--todo));
|
|
background: color-mix(in srgb, var(--accent, var(--todo)) 5%, var(--bg-secondary));
|
|
}
|
|
|
|
.wf-node-script {
|
|
border-left-color: var(--text-muted);
|
|
font-family: var(--font-mono, monospace);
|
|
}
|
|
|
|
.wf-node-gate {
|
|
border-left-color: var(--ws-warning);
|
|
background: color-mix(in srgb, var(--ws-warning) 6%, var(--bg-secondary));
|
|
}
|
|
|
|
.wf-node-hold {
|
|
border-left-color: var(--ws-warning);
|
|
}
|
|
|
|
.wf-node-split,
|
|
.wf-node-join {
|
|
border-left-color: var(--accent, var(--ws-info));
|
|
}
|
|
|
|
.wf-node-merge {
|
|
border-left-color: var(--ws-info);
|
|
border-style: dashed;
|
|
}
|
|
|
|
/* ── Step-inversion nodes (KTD-3/4/12/15, U8) ── */
|
|
|
|
.wf-node-step-execute {
|
|
border-left-color: var(--accent, var(--ws-info));
|
|
background: color-mix(in srgb, var(--accent, var(--ws-info)) 5%, var(--bg-secondary));
|
|
}
|
|
|
|
.wf-node-step-review {
|
|
border-left-color: var(--ws-info);
|
|
background: color-mix(in srgb, var(--ws-info) 6%, var(--bg-secondary));
|
|
}
|
|
|
|
.wf-node-parse-steps {
|
|
border-left-color: var(--ws-info);
|
|
}
|
|
|
|
.wf-node-code {
|
|
border-left-color: var(--text-muted);
|
|
font-family: var(--font-mono, monospace);
|
|
}
|
|
|
|
/* A foreach renders as a React Flow group node containing its template
|
|
* subgraph. Children are positioned inside the group's box. */
|
|
.wf-foreach-group {
|
|
width: 100%;
|
|
height: 100%;
|
|
box-sizing: border-box;
|
|
border: 1px dashed var(--accent, var(--ws-info));
|
|
border-radius: var(--radius-md);
|
|
background: color-mix(in srgb, var(--accent, var(--ws-info)) 6%, transparent);
|
|
padding: var(--space-xs);
|
|
}
|
|
|
|
.wf-foreach-group.wf-node--error {
|
|
border-color: var(--ws-error);
|
|
}
|
|
|
|
.wf-foreach-header {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: var(--space-xs);
|
|
font-size: 0.8rem;
|
|
color: var(--text);
|
|
}
|
|
|
|
.wf-foreach-empty {
|
|
margin-top: var(--space-sm);
|
|
padding: var(--space-sm);
|
|
border: 1px dashed var(--border);
|
|
border-radius: var(--radius-sm);
|
|
font-size: 0.7rem;
|
|
color: var(--text-muted);
|
|
text-align: center;
|
|
}
|
|
|
|
/* Rework edges (KTD-5): dashed accent stroke with a loop affordance. */
|
|
.wf-edge-rework .react-flow__edge-path {
|
|
stroke: var(--accent, var(--ws-info));
|
|
stroke-dasharray: 5 4;
|
|
stroke-width: 2;
|
|
}
|
|
|
|
/* Failure edges (R2): a distinct dash pattern from rework plus an error-token
|
|
* stroke. Two-channel rule — the condition label is always rendered (third
|
|
* channel is color) so failure edges stay distinguishable in low-contrast
|
|
* themes. */
|
|
.react-flow__edge.wf-edge-failure .react-flow__edge-path {
|
|
stroke: var(--ws-error);
|
|
stroke-dasharray: 2 4;
|
|
stroke-width: 2;
|
|
}
|
|
|
|
.wf-code-source {
|
|
font-family: var(--font-mono, monospace);
|
|
font-size: 0.72rem;
|
|
white-space: pre;
|
|
overflow-x: auto;
|
|
}
|
|
|
|
/* Header overflow priority (R1): icon fixed-width; label flex-shrinks first
|
|
* with ellipsis; badges + error badge hold their width flush right. */
|
|
.wf-node-icon {
|
|
display: inline-flex;
|
|
flex-shrink: 0;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.wf-node-label {
|
|
flex: 1 1 auto;
|
|
min-width: 0;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.wf-node-badge {
|
|
flex-shrink: 0;
|
|
font-size: 0.65rem;
|
|
text-transform: uppercase;
|
|
padding: 1px var(--space-xs);
|
|
border-radius: var(--radius-sm);
|
|
background: var(--ws-warning);
|
|
color: var(--bg);
|
|
}
|
|
|
|
.wf-spin {
|
|
animation: wf-spin 1s linear infinite;
|
|
}
|
|
|
|
@keyframes wf-spin {
|
|
from {
|
|
transform: rotate(0deg);
|
|
}
|
|
to {
|
|
transform: rotate(360deg);
|
|
}
|
|
}
|
|
|
|
/* ── U10: swimlane bands, column panel, error badges, read-only banner ── */
|
|
|
|
.wf-column-band {
|
|
border: 1px dashed var(--border);
|
|
background: var(--bg-secondary);
|
|
border-radius: var(--radius-md);
|
|
pointer-events: none;
|
|
}
|
|
|
|
.wf-node--error {
|
|
border-color: var(--ws-error);
|
|
border-left-color: var(--ws-error);
|
|
}
|
|
|
|
.wf-node-error-badge {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: var(--space-xs);
|
|
flex-shrink: 0;
|
|
font-size: 0.65rem;
|
|
padding: 1px var(--space-xs);
|
|
border-radius: var(--radius-sm);
|
|
background: var(--ws-error);
|
|
color: var(--bg);
|
|
}
|
|
|
|
.wf-editor-readonly-banner {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: var(--space-md);
|
|
padding: var(--space-sm) var(--space-md);
|
|
background: var(--bg-tertiary);
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
|
|
.wf-editor-duplicate-primary {
|
|
font-weight: 600;
|
|
}
|
|
|
|
.wf-editor-banner--warn {
|
|
background: var(--ws-warning);
|
|
color: var(--bg);
|
|
}
|
|
|
|
/* Inline name + description strip (KTD-10). */
|
|
.wf-name-strip {
|
|
display: flex;
|
|
align-items: baseline;
|
|
gap: var(--space-sm);
|
|
padding: var(--space-xs) var(--space-sm);
|
|
border-bottom: 1px solid var(--border);
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.wf-workflow-name,
|
|
.wf-workflow-name--readonly {
|
|
font-size: 0.95rem;
|
|
font-weight: 600;
|
|
color: var(--text);
|
|
background: none;
|
|
border: 1px solid transparent;
|
|
border-radius: var(--radius-sm);
|
|
padding: 2px var(--space-xs);
|
|
cursor: pointer;
|
|
text-align: left;
|
|
}
|
|
|
|
.wf-workflow-name:hover {
|
|
background: var(--bg-tertiary);
|
|
}
|
|
|
|
.wf-workflow-name--readonly {
|
|
cursor: default;
|
|
}
|
|
|
|
.wf-workflow-name-input {
|
|
font-size: 0.95rem;
|
|
font-weight: 600;
|
|
color: var(--text);
|
|
background: var(--bg-secondary);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
padding: 2px var(--space-xs);
|
|
}
|
|
|
|
.wf-workflow-description,
|
|
.wf-workflow-description--readonly {
|
|
font-size: 0.78rem;
|
|
color: var(--text-tertiary);
|
|
background: none;
|
|
border: 1px solid transparent;
|
|
border-radius: var(--radius-sm);
|
|
padding: 2px var(--space-xs);
|
|
cursor: pointer;
|
|
text-align: left;
|
|
}
|
|
|
|
.wf-workflow-description:hover {
|
|
background: var(--bg-tertiary);
|
|
}
|
|
|
|
.wf-workflow-description--readonly {
|
|
cursor: default;
|
|
}
|
|
|
|
.wf-workflow-description-input {
|
|
font-size: 0.78rem;
|
|
color: var(--text);
|
|
background: var(--bg-secondary);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-sm);
|
|
padding: 2px var(--space-xs);
|
|
min-width: 220px;
|
|
}
|
|
|
|
/* Create-workflow dialog (KTD-7). */
|
|
.wf-create-error {
|
|
margin: var(--space-xs) 0 0;
|
|
font-size: 0.8rem;
|
|
color: var(--ws-error);
|
|
}
|
|
|
|
.wf-column-panel {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-sm);
|
|
width: 280px;
|
|
min-width: 260px;
|
|
padding: var(--space-md);
|
|
border-left: 1px solid var(--border);
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.wf-column-panel-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.wf-column-list {
|
|
list-style: none;
|
|
margin: 0;
|
|
padding: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-sm);
|
|
}
|
|
|
|
.wf-column-item {
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-md);
|
|
padding: var(--space-sm);
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-xs);
|
|
}
|
|
|
|
.wf-column-item--error {
|
|
border-color: var(--ws-error);
|
|
}
|
|
|
|
.wf-column-item-head {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-xs);
|
|
}
|
|
|
|
.wf-column-name {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.wf-column-item-actions {
|
|
display: flex;
|
|
gap: 2px;
|
|
}
|
|
|
|
.wf-column-violation {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-xs);
|
|
font-size: 0.7rem;
|
|
color: var(--ws-error);
|
|
margin: 0;
|
|
}
|
|
|
|
.wf-column-trait-options {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: var(--space-xs);
|
|
}
|
|
|
|
.wf-column-trait {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 2px;
|
|
font-size: 0.7rem;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.wf-column-traits-label {
|
|
font-size: 0.65rem;
|
|
text-transform: uppercase;
|
|
color: var(--text-tertiary);
|
|
}
|