Expand Schemeta frontend editor with pin/net/symbol editing and schema updates

This commit is contained in:
Rbanh committed 2026-02-16 21:44:58 -05:00
1 parent 61814349ed
commit f2d48cee85
15 files changed
+7078 -244

No files matched your search

+2372
View File
File diff suppressed because it is too large. Load diff
+238
View File
@@ -0,0 +1,238 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Schemeta Workspace</title>
<link rel="stylesheet" href="/styles.css" />
</head>
<body>
<header class="topbar">
<div class="brand">
<h1>SCHEMETA</h1>
<p>AI-Native Schematic Workspace</p>
</div>
<div class="actions">
<button id="newProjectBtn">New</button>
<button id="loadSampleBtn">Load Sample</button>
<button id="importBtn">Import JSON</button>
<button id="exportBtn">Export JSON</button>
<button id="autoLayoutBtn">Auto Layout</button>
<button id="autoTidyBtn">Auto Tidy</button>
<label class="inlineSelect">
Mode
<select id="renderModeSelect">
<option value="schematic_stub">Schematic Stub</option>
<option value="explicit">Explicit Wires</option>
</select>
</label>
<input id="fileInput" type="file" accept="application/json,.json" hidden />
</div>
</header>
<main class="workspace">
<aside class="pane left">
<section>
<div class="sectionHead">
<h2>Instances</h2>
<button id="isolateComponentBtn" class="chip">Isolate</button>
</div>
<input id="instanceFilter" placeholder="Filter instances" />
<ul id="instanceList" class="list"></ul>
</section>
<section>
<div class="sectionHead">
<h2>Nets</h2>
<button id="isolateNetBtn" class="chip">Isolate</button>
</div>
<input id="netFilter" placeholder="Filter nets" />
<ul id="netList" class="list"></ul>
</section>
</aside>
<section class="pane center">
<div class="canvasTools">
<button id="zoomOutBtn">-</button>
<button id="zoomResetBtn">100%</button>
<button id="zoomInBtn">+</button>
<button id="fitViewBtn">Fit</button>
<label class="inlineCheck"><input id="showLabelsInput" type="checkbox" checked /> Labels</label>
<span id="compileStatus">Idle</span>
</div>
<div id="canvasViewport" class="canvasViewport">
<div id="canvasInner" class="canvasInner"></div>
<div id="selectionBox" class="selectionBox hidden"></div>
<div id="pinTooltip" class="pinTooltip hidden"></div>
</div>
</section>
<aside class="pane right">
<section>
<h2>Selected</h2>
<div id="selectedSummary" class="card">Click a component, net, or pin to inspect it.</div>
<div id="componentEditor" class="editorCard hidden">
<div class="editorGrid">
<label>Ref <input id="instRefInput" type="text" /></label>
<label>Value <input id="instValueInput" type="text" /></label>
<label>Notes <input id="instNotesInput" type="text" /></label>
<label>X <input id="xInput" type="number" step="20" /></label>
<label>Y <input id="yInput" type="number" step="20" /></label>
<label>Rotation
<select id="rotationInput">
<option value="0">0deg</option>
<option value="90">90deg</option>
<option value="180">180deg</option>
<option value="270">270deg</option>
</select>
</label>
</div>
<label class="inline"><input id="lockedInput" type="checkbox" /> Locked</label>
<div class="editorActions">
<button id="rotateSelectedBtn">Rotate +90</button>
<button id="updatePlacementBtn">Apply Component</button>
</div>
</div>
<div id="symbolEditor" class="editorCard hidden">
<div id="symbolMeta" class="hintText"></div>
<div class="editorGrid">
<label>Category <input id="symbolCategoryInput" type="text" /></label>
<label>Body Width <input id="symbolWidthInput" type="number" min="20" step="10" /></label>
<label>Body Height <input id="symbolHeightInput" type="number" min="20" step="10" /></label>
</div>
<div class="editorActions">
<button id="addSymbolPinBtn">Add Pin</button>
<button id="applySymbolBtn">Apply Symbol</button>
</div>
<div id="symbolPinsList" class="miniList"></div>
</div>
<div id="pinEditor" class="editorCard hidden">
<div id="pinMeta" class="hintText"></div>
<div class="editorGrid">
<label>Pin Name <input id="pinNameInput" type="text" /></label>
<label>Pin Number <input id="pinNumberInput" type="text" /></label>
<label>Pin Side
<select id="pinSideInput">
<option value="left">left</option>
<option value="right">right</option>
<option value="top">top</option>
<option value="bottom">bottom</option>
</select>
</label>
<label>Pin Type
<select id="pinTypeInput">
<option value="power_in">power_in</option>
<option value="power_out">power_out</option>
<option value="input">input</option>
<option value="output">output</option>
<option value="bidirectional">bidirectional</option>
<option value="passive">passive</option>
<option value="analog">analog</option>
<option value="ground">ground</option>
</select>
</label>
<label>Pin Offset <input id="pinOffsetInput" type="number" min="0" step="1" /></label>
</div>
<div class="editorActions">
<button id="applyPinPropsBtn">Apply Pin Properties</button>
</div>
<label class="inline"><input id="showPinNetLabelInput" type="checkbox" /> Show net label on this pin</label>
<label>Connect to existing net
<select id="pinNetSelect"></select>
</label>
<div class="editorActions">
<button id="connectPinBtn">Connect</button>
</div>
<label>Or create new net
<input id="newNetNameInput" type="text" placeholder="NET_1" />
</label>
<label>New net class
<select id="newNetClassInput">
<option value="signal">signal</option>
<option value="analog">analog</option>
<option value="power">power</option>
<option value="ground">ground</option>
<option value="clock">clock</option>
<option value="bus">bus</option>
<option value="differential">differential</option>
</select>
</label>
<div class="editorActions">
<button id="createConnectNetBtn">Create + Connect</button>
</div>
<div id="pinConnections" class="miniList"></div>
</div>
<div id="netEditor" class="editorCard hidden">
<div class="editorGrid">
<label>Name <input id="netNameInput" type="text" /></label>
<label>Class
<select id="netClassInput">
<option value="signal">signal</option>
<option value="analog">analog</option>
<option value="power">power</option>
<option value="ground">ground</option>
<option value="clock">clock</option>
<option value="bus">bus</option>
<option value="differential">differential</option>
</select>
</label>
</div>
<div class="editorActions">
<button id="updateNetBtn">Apply Net</button>
</div>
<div class="editorGrid">
<label>Node Ref <input id="netNodeRefInput" type="text" placeholder="U1" /></label>
<label>Node Pin <input id="netNodePinInput" type="text" placeholder="GPIO1" /></label>
</div>
<div class="editorActions">
<button id="addNetNodeBtn">Add Node</button>
</div>
<div id="netNodesList" class="miniList"></div>
</div>
</section>
<section>
<h2>Diagnostics</h2>
<div id="issues" class="card"></div>
</section>
<section>
<h2>Topology</h2>
<div id="topology" class="card"></div>
</section>
<section>
<div class="sectionHead">
<h2>JSON</h2>
<div class="jsonActions">
<button id="showSchemaBtn">View Schema</button>
<button id="validateJsonBtn">Validate</button>
<button id="formatJsonBtn">Format</button>
<button id="sortJsonBtn">Sort Keys</button>
<button id="copyReproBtn">Copy Repro</button>
<button id="applyJsonBtn" class="primary">Apply JSON</button>
</div>
</div>
<div id="jsonFeedback" class="jsonFeedback"></div>
<textarea id="jsonEditor" spellcheck="false"></textarea>
</section>
</aside>
</main>
<div id="schemaModal" class="modal hidden" role="dialog" aria-modal="true" aria-labelledby="schemaTitle">
<div class="modalCard">
<div class="modalHead">
<h3 id="schemaTitle">Schemeta JSON Schema</h3>
<div class="jsonActions">
<button id="copySchemaBtn">Copy</button>
<button id="downloadSchemaBtn">Download</button>
<button id="closeSchemaBtn">Close</button>
</div>
</div>
<p class="modalHint">Use this schema in AI prompts/tools to generate valid Schemeta JSON deterministically.</p>
<textarea id="schemaViewer" spellcheck="false" readonly></textarea>
</div>
</div>
<script type="module" src="/app.js"></script>
</body>
</html>
+91
View File
@@ -0,0 +1,91 @@
{
"meta": {
"title": "ESP32 Audio Path"
},
"symbols": {
"esp32_s3_supermini": {
"symbol_id": "esp32_s3_supermini",
"category": "microcontroller",
"body": { "width": 160, "height": 240 },
"pins": [
{ "name": "3V3", "number": "1", "side": "left", "offset": 30, "type": "power_in" },
{ "name": "GND", "number": "2", "side": "left", "offset": 60, "type": "ground" },
{ "name": "GPIO5", "number": "10", "side": "right", "offset": 40, "type": "output" },
{ "name": "GPIO6", "number": "11", "side": "right", "offset": 70, "type": "output" },
{ "name": "GPIO7", "number": "12", "side": "right", "offset": 100, "type": "output" }
],
"graphics": {
"primitives": [{ "type": "rect", "x": 0, "y": 0, "w": 160, "h": 240 }]
}
},
"dac_i2s": {
"symbol_id": "dac_i2s",
"category": "audio",
"body": { "width": 140, "height": 180 },
"pins": [
{ "name": "3V3", "number": "1", "side": "left", "offset": 20, "type": "power_in" },
{ "name": "GND", "number": "2", "side": "left", "offset": 50, "type": "ground" },
{ "name": "BCLK", "number": "3", "side": "left", "offset": 80, "type": "input" },
{ "name": "LRCLK", "number": "4", "side": "left", "offset": 110, "type": "input" },
{ "name": "DIN", "number": "5", "side": "left", "offset": 140, "type": "input" },
{ "name": "AOUT", "number": "6", "side": "right", "offset": 90, "type": "analog" }
],
"graphics": {
"primitives": [{ "type": "rect", "x": 0, "y": 0, "w": 140, "h": 180 }]
}
},
"amp": {
"symbol_id": "amp",
"category": "output",
"body": { "width": 120, "height": 120 },
"pins": [
{ "name": "5V", "number": "1", "side": "left", "offset": 20, "type": "power_in" },
{ "name": "GND", "number": "2", "side": "left", "offset": 50, "type": "ground" },
{ "name": "IN", "number": "3", "side": "left", "offset": 80, "type": "input" },
{ "name": "SPK", "number": "4", "side": "right", "offset": 70, "type": "output" }
],
"graphics": {
"primitives": [{ "type": "rect", "x": 0, "y": 0, "w": 120, "h": 120 }]
}
},
"psu": {
"symbol_id": "psu",
"category": "power",
"body": { "width": 120, "height": 120 },
"pins": [
{ "name": "5V_OUT", "number": "1", "side": "right", "offset": 30, "type": "power_out" },
{ "name": "3V3_OUT", "number": "2", "side": "right", "offset": 60, "type": "power_out" },
{ "name": "GND", "number": "3", "side": "right", "offset": 90, "type": "ground" }
],
"graphics": {
"primitives": [{ "type": "rect", "x": 0, "y": 0, "w": 120, "h": 120 }]
}
}
},
"instances": [
{ "ref": "U1", "symbol": "esp32_s3_supermini", "properties": { "value": "ESP32-S3" }, "placement": { "x": null, "y": null, "rotation": 0, "locked": false } },
{ "ref": "U2", "symbol": "dac_i2s", "properties": { "value": "DAC" }, "placement": { "x": null, "y": null, "rotation": 0, "locked": false } },
{ "ref": "U3", "symbol": "amp", "properties": { "value": "Amp" }, "placement": { "x": null, "y": null, "rotation": 0, "locked": false } },
{ "ref": "U4", "symbol": "psu", "properties": { "value": "Power" }, "placement": { "x": null, "y": null, "rotation": 0, "locked": false } }
],
"nets": [
{ "name": "3V3", "class": "power", "nodes": [{ "ref": "U4", "pin": "3V3_OUT" }, { "ref": "U1", "pin": "3V3" }, { "ref": "U2", "pin": "3V3" }] },
{ "name": "5V", "class": "power", "nodes": [{ "ref": "U4", "pin": "5V_OUT" }, { "ref": "U3", "pin": "5V" }] },
{ "name": "GND", "class": "ground", "nodes": [{ "ref": "U4", "pin": "GND" }, { "ref": "U1", "pin": "GND" }, { "ref": "U2", "pin": "GND" }, { "ref": "U3", "pin": "GND" }] },
{ "name": "I2S_BCLK", "class": "clock", "nodes": [{ "ref": "U1", "pin": "GPIO5" }, { "ref": "U2", "pin": "BCLK" }] },
{ "name": "I2S_LRCLK", "class": "clock", "nodes": [{ "ref": "U1", "pin": "GPIO6" }, { "ref": "U2", "pin": "LRCLK" }] },
{ "name": "I2S_DOUT", "class": "signal", "nodes": [{ "ref": "U1", "pin": "GPIO7" }, { "ref": "U2", "pin": "DIN" }] },
{ "name": "AUDIO_ANALOG", "class": "analog", "nodes": [{ "ref": "U2", "pin": "AOUT" }, { "ref": "U3", "pin": "IN" }] }
],
"constraints": {
"groups": [
{ "name": "power_stage", "members": ["U4"], "layout": "cluster" },
{ "name": "compute", "members": ["U1", "U2"], "layout": "cluster" }
],
"alignment": [{ "left_of": "U1", "right_of": "U2" }],
"near": [{ "component": "U2", "target_pin": { "ref": "U1", "pin": "GPIO5" } }]
},
"annotations": [
{ "text": "I2S audio chain" }
]
}
+288
View File
@@ -0,0 +1,288 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://schemeta.dev/schema/schemeta.schema.json",
"title": "Schemeta JSON Model (SJM)",
"type": "object",
"additionalProperties": false,
"required": ["meta", "symbols", "instances", "nets", "constraints", "annotations"],
"properties": {
"meta": {
"type": "object",
"description": "Project metadata.",
"additionalProperties": true
},
"symbols": {
"type": "object",
"description": "Map of symbol_id -> symbol definition.",
"patternProperties": {
"^[A-Za-z_][A-Za-z0-9_]*$": {
"$ref": "#/$defs/symbol"
}
},
"additionalProperties": false
},
"instances": {
"type": "array",
"items": { "$ref": "#/$defs/instance" }
},
"nets": {
"type": "array",
"items": { "$ref": "#/$defs/net" }
},
"constraints": { "$ref": "#/$defs/constraints" },
"annotations": {
"type": "array",
"items": { "$ref": "#/$defs/annotation" }
}
},
"$defs": {
"pinType": {
"type": "string",
"enum": ["power_in", "power_out", "input", "output", "bidirectional", "passive", "analog", "ground"]
},
"pinSide": {
"type": "string",
"enum": ["left", "right", "top", "bottom"]
},
"netClass": {
"type": "string",
"enum": ["power", "ground", "signal", "analog", "differential", "clock", "bus"]
},
"pin": {
"type": "object",
"additionalProperties": false,
"required": ["name", "number", "side", "offset", "type"],
"properties": {
"name": { "type": "string", "minLength": 1 },
"number": { "type": "string", "minLength": 1 },
"side": { "$ref": "#/$defs/pinSide" },
"offset": { "type": "number", "minimum": 0 },
"type": { "$ref": "#/$defs/pinType" }
}
},
"symbol": {
"type": "object",
"additionalProperties": true,
"description": "Symbol definition. Minimal shorthand is supported for template/generic symbols; compiler hydrates missing fields.",
"required": [],
"properties": {
"symbol_id": {
"type": "string",
"minLength": 1,
"description": "Optional in shorthand; defaults to map key."
},
"category": {
"type": "string",
"minLength": 1,
"description": "Optional in shorthand; inferred from template or defaults to generic."
},
"auto_generated": { "type": "boolean" },
"template_name": {
"type": "string",
"enum": ["resistor", "capacitor", "inductor", "diode", "led", "connector"]
},
"body": {
"type": "object",
"additionalProperties": false,
"required": ["width", "height"],
"properties": {
"width": { "type": "number", "minimum": 20 },
"height": { "type": "number", "minimum": 20 }
}
},
"pins": {
"type": "array",
"minItems": 1,
"items": { "$ref": "#/$defs/pin" }
},
"graphics": {
"type": "object",
"additionalProperties": true,
"properties": {
"primitives": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": true,
"required": ["type"],
"properties": {
"type": { "type": "string" }
}
}
}
}
}
},
"examples": [
{ "template_name": "resistor" },
{ "category": "generic" },
{
"symbol_id": "opamp_generic",
"category": "analog",
"body": { "width": 160, "height": 120 },
"pins": [
{ "name": "IN+", "number": "1", "side": "left", "offset": 24, "type": "analog" },
{ "name": "IN-", "number": "2", "side": "left", "offset": 48, "type": "analog" },
{ "name": "OUT", "number": "3", "side": "right", "offset": 36, "type": "output" }
]
}
]
},
"placement": {
"type": "object",
"additionalProperties": false,
"required": ["x", "y", "rotation", "locked"],
"properties": {
"x": { "type": ["number", "null"] },
"y": { "type": ["number", "null"] },
"rotation": { "type": "number" },
"locked": { "type": "boolean" }
}
},
"instance": {
"type": "object",
"additionalProperties": false,
"required": ["ref", "properties", "placement"],
"anyOf": [{ "required": ["symbol"] }, { "required": ["part"] }],
"properties": {
"ref": { "type": "string", "pattern": "^[A-Za-z][A-Za-z0-9_]*$" },
"symbol": {
"type": "string",
"minLength": 1,
"description": "Custom symbol id reference."
},
"part": {
"type": "string",
"description": "Built-in shorthand for common parts (no explicit symbol definition required).",
"enum": ["resistor", "capacitor", "inductor", "diode", "led", "connector", "generic"]
},
"properties": {
"type": "object",
"description": "Instance-level editable properties. Includes UI/editor hints such as per-pin label visibility.",
"properties": {
"pin_ui": {
"type": "object",
"description": "Per-pin UI overrides keyed by pin name.",
"additionalProperties": {
"type": "object",
"additionalProperties": false,
"properties": {
"show_net_label": { "type": "boolean" }
}
}
}
},
"additionalProperties": {
"type": ["string", "number", "boolean", "null", "object", "array"]
}
},
"placement": { "$ref": "#/$defs/placement" }
},
"examples": [
{
"ref": "R1",
"part": "resistor",
"properties": { "value": "10k", "pin_ui": { "1": { "show_net_label": true } } },
"placement": { "x": null, "y": null, "rotation": 0, "locked": false }
},
{
"ref": "U1",
"symbol": "esp32_s3_supermini",
"properties": { "value": "ESP32-S3" },
"placement": { "x": null, "y": null, "rotation": 0, "locked": false }
}
]
},
"netNode": {
"type": "object",
"additionalProperties": false,
"required": ["ref", "pin"],
"properties": {
"ref": { "type": "string", "pattern": "^[A-Za-z][A-Za-z0-9_]*$" },
"pin": { "type": "string", "minLength": 1 }
}
},
"net": {
"type": "object",
"additionalProperties": false,
"required": ["name", "class", "nodes"],
"properties": {
"name": { "type": "string", "minLength": 1 },
"class": { "$ref": "#/$defs/netClass" },
"nodes": {
"type": "array",
"minItems": 2,
"items": { "$ref": "#/$defs/netNode" }
}
}
},
"constraintGroup": {
"type": "object",
"additionalProperties": false,
"required": ["name", "members", "layout"],
"properties": {
"name": { "type": "string" },
"members": {
"type": "array",
"items": { "type": "string" }
},
"layout": { "type": "string", "enum": ["cluster"] }
}
},
"alignmentConstraint": {
"type": "object",
"additionalProperties": false,
"required": ["left_of", "right_of"],
"properties": {
"left_of": { "type": "string" },
"right_of": { "type": "string" }
}
},
"nearConstraint": {
"type": "object",
"additionalProperties": false,
"required": ["component", "target_pin"],
"properties": {
"component": { "type": "string" },
"target_pin": {
"type": "object",
"additionalProperties": false,
"required": ["ref", "pin"],
"properties": {
"ref": { "type": "string" },
"pin": { "type": "string" }
}
}
}
},
"constraints": {
"type": "object",
"additionalProperties": false,
"properties": {
"groups": {
"type": "array",
"items": { "$ref": "#/$defs/constraintGroup" }
},
"alignment": {
"type": "array",
"items": { "$ref": "#/$defs/alignmentConstraint" }
},
"near": {
"type": "array",
"items": { "$ref": "#/$defs/nearConstraint" }
}
},
"default": {}
},
"annotation": {
"type": "object",
"additionalProperties": false,
"required": ["text"],
"properties": {
"text": { "type": "string", "minLength": 1 },
"x": { "type": "number" },
"y": { "type": "number" }
}
}
}
}
+443
View File
@@ -0,0 +1,443 @@
:root {
--bg: #eef2f6;
--panel: #ffffff;
--ink: #1d2939;
--ink-soft: #667085;
--line: #d0d5dd;
--accent: #155eef;
--accent-soft: #dbe8ff;
--warn: #b54708;
--error: #b42318;
--ok: #067647;
}
* {
box-sizing: border-box;
}
body {
margin: 0;
font-family: "Manrope", "Segoe UI", sans-serif;
color: var(--ink);
background: radial-gradient(circle at 8% 8%, #fef7e6, transparent 30%),
radial-gradient(circle at 88% 12%, #e0f2ff, transparent 30%), var(--bg);
min-height: 100vh;
}
.topbar {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 12px;
border-bottom: 1px solid var(--line);
background: #f7fbffde;
backdrop-filter: blur(4px);
}
.brand h1 {
margin: 0;
font-size: 1.2rem;
letter-spacing: 0.08em;
}
.brand p {
margin: 2px 0 0;
color: var(--ink-soft);
font-size: 0.8rem;
}
.actions {
display: flex;
flex-wrap: wrap;
gap: 8px;
align-items: center;
}
button,
select,
input,
textarea {
font: inherit;
}
button {
border: 1px solid var(--line);
border-radius: 8px;
background: #fff;
padding: 6px 10px;
color: var(--ink);
cursor: pointer;
}
button.primary {
background: var(--accent);
color: #fff;
border-color: var(--accent);
}
button.chip {
padding: 4px 8px;
font-size: 0.76rem;
}
button.activeChip {
background: var(--accent-soft);
border-color: var(--accent);
color: #0f3ea3;
}
.inlineSelect,
.inlineCheck,
.inline {
display: inline-flex;
align-items: center;
gap: 6px;
}
.inlineSelect select {
border: 1px solid var(--line);
border-radius: 8px;
padding: 5px 8px;
}
.workspace {
height: calc(100vh - 65px);
display: grid;
grid-template-columns: 270px minmax(480px, 1fr) 380px;
gap: 10px;
padding: 10px;
}
.pane {
background: var(--panel);
border: 1px solid var(--line);
border-radius: 12px;
overflow: hidden;
}
.pane.left,
.pane.right {
display: flex;
flex-direction: column;
gap: 10px;
padding: 10px;
overflow: auto;
}
.sectionHead {
display: flex;
justify-content: space-between;
align-items: center;
gap: 8px;
}
.sectionHead h2 {
margin: 0;
font-size: 0.9rem;
}
input,
textarea,
select {
width: 100%;
border: 1px solid var(--line);
border-radius: 8px;
padding: 8px;
color: var(--ink);
}
textarea {
min-height: 250px;
font-family: "JetBrains Mono", monospace;
font-size: 12px;
line-height: 1.45;
}
.list {
margin: 8px 0 0;
padding: 0;
list-style: none;
max-height: 230px;
overflow: auto;
border: 1px solid var(--line);
border-radius: 8px;
}
.list li {
padding: 8px;
border-bottom: 1px solid var(--line);
cursor: pointer;
}
.list li:last-child {
border-bottom: none;
}
.list li.active {
background: var(--accent-soft);
}
.card {
border: 1px solid var(--line);
border-radius: 8px;
padding: 8px;
color: var(--ink-soft);
font-size: 0.85rem;
white-space: pre-wrap;
}
.editorCard {
margin-top: 8px;
border: 1px solid var(--line);
border-radius: 8px;
padding: 8px;
background: #fcfcfd;
display: flex;
flex-direction: column;
gap: 8px;
}
.editorGrid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 8px;
}
.editorActions {
display: flex;
gap: 8px;
flex-wrap: wrap;
}
.hintText {
font-size: 0.8rem;
color: var(--ink-soft);
}
.miniList {
border: 1px solid var(--line);
border-radius: 8px;
background: #fff;
max-height: 170px;
overflow: auto;
}
.miniRow {
display: flex;
justify-content: space-between;
align-items: center;
gap: 8px;
padding: 6px 8px;
border-bottom: 1px solid var(--line);
font-size: 0.8rem;
}
.miniRow:last-child {
border-bottom: none;
}
.symbolPinRow {
display: grid;
grid-template-columns: 1fr 0.9fr 0.9fr 0.8fr 1fr auto;
align-items: center;
}
.pinCol {
min-width: 0;
padding: 5px 6px;
font-size: 0.75rem;
}
.canvasTools {
display: flex;
gap: 8px;
align-items: center;
border-bottom: 1px solid var(--line);
padding: 8px;
}
#compileStatus {
margin-left: auto;
color: var(--ink-soft);
font-size: 0.84rem;
}
.status-ok {
color: var(--ok);
}
.canvasViewport {
height: calc(100% - 52px);
overflow: hidden;
position: relative;
cursor: grab;
background-image: linear-gradient(0deg, #ebeff3 1px, transparent 1px),
linear-gradient(90deg, #ebeff3 1px, transparent 1px);
background-size: 20px 20px;
}
.canvasViewport.dragging {
cursor: grabbing;
}
.canvasInner {
transform-origin: 0 0;
position: absolute;
left: 0;
top: 0;
}
.canvasInner svg {
display: block;
}
.selectionBox {
position: absolute;
border: 1px solid #155eef;
background: rgba(21, 94, 239, 0.12);
pointer-events: none;
z-index: 15;
}
.hidden {
display: none;
}
.jsonActions {
display: flex;
flex-wrap: wrap;
gap: 6px;
}
.jsonActions button {
padding: 4px 8px;
font-size: 0.78rem;
}
.jsonFeedback {
min-height: 18px;
color: var(--ink-soft);
font-size: 0.78rem;
margin-bottom: 6px;
}
.issueRow {
border: 1px solid var(--line);
border-radius: 7px;
padding: 7px;
margin-bottom: 6px;
cursor: pointer;
background: #fff;
}
.issueRow:hover {
background: #f8faff;
}
.issueErr {
border-color: #fecdca;
background: #fff6f5;
}
.issueWarn {
border-color: #fedf89;
background: #fffcf5;
}
.issueTitle {
font-size: 0.8rem;
font-weight: 700;
}
.issueMeta {
font-size: 0.72rem;
color: var(--ink-soft);
}
.pinTooltip {
position: absolute;
pointer-events: none;
padding: 6px 8px;
border: 1px solid var(--line);
border-radius: 8px;
background: #ffffffee;
color: var(--ink);
font-size: 0.74rem;
z-index: 20;
box-shadow: 0 6px 20px rgba(16, 24, 40, 0.12);
}
.modal {
position: fixed;
inset: 0;
background: rgba(15, 23, 42, 0.45);
z-index: 70;
display: flex;
align-items: center;
justify-content: center;
padding: 18px;
}
.modal.hidden {
display: none;
}
.modalCard {
width: min(1120px, 100%);
height: min(88vh, 900px);
background: #fff;
border: 1px solid var(--line);
border-radius: 12px;
padding: 12px;
display: flex;
flex-direction: column;
gap: 8px;
}
.modalHead {
display: flex;
justify-content: space-between;
align-items: center;
gap: 10px;
}
.modalHead h3 {
margin: 0;
font-size: 0.95rem;
}
.modalHint {
margin: 0;
color: var(--ink-soft);
font-size: 0.8rem;
}
#schemaViewer {
height: 100%;
min-height: 0;
}
.flash {
animation: flashPulse 0.7s ease-in-out 0s 2;
}
@keyframes flashPulse {
0% {
opacity: 0.2;
}
100% {
opacity: 1;
}
}
@media (max-width: 1300px) {
.workspace {
grid-template-columns: 1fr;
grid-template-rows: auto auto auto;
height: auto;
}
.pane.center {
min-height: 560px;
}
}