feat(scene-editor): add persistent dockable tool workspaces

This commit is contained in:
Codex
2026-11-04 00:39:39 +03:00
parent ecf53ce974
commit 972944e6f2
27 changed files with 1020 additions and 67 deletions
+116 -1
View File
@@ -1565,7 +1565,8 @@ textarea.nodedc-field__control {
height: calc(100vh - var(--nodedc-app-header-height));
min-height: 0;
margin-top: var(--nodedc-app-header-height);
overflow: hidden;
/* Translated inactive stages must not become a focus-scroll destination. */
overflow: clip;
}
.nodedc-app-shell__stage {
@@ -4519,6 +4520,29 @@ textarea.nodedc-field__control {
/* Content minimums govern resizing; an undersized viewport scrolls the canvas. */
.nodedc-dock-layout {overflow:auto; overscroll-behavior:contain;}
.nodedc-dock-layout__canvas {position:relative; height:100%; width:100%;}
/* Shared editor workspace: its header is outside the docking bounds. */
.nodedc-editor-workspace__slot,.nodedc-editor-workspace__host,.nodedc-editor-workspace {position:relative;width:100%;height:100%;min-width:0;min-height:0;}
.nodedc-editor-workspace {display:flex;flex-direction:column;}
.nodedc-editor-workspace__host[data-editing="true"] {position:fixed;inset:var(--nodedc-space-4);width:auto;height:auto;z-index:calc(var(--nodedc-layer-overlay) - 1);background:var(--nodedc-app-panel-surface);border-radius:var(--nodedc-radius-panel);box-shadow:var(--nodedc-modal-shadow);overflow:hidden;}
.nodedc-editor-workspace__host[data-editing="true"][data-expanded="true"] {inset:0;border-radius:0;}
.nodedc-editor-workspace__head {flex:none;}
.nodedc-editor-workspace__body {position:relative;flex:1;min-height:0;min-width:0;overflow:hidden;}
.nodedc-editor-dock {position:absolute;inset:0;overflow:auto;overscroll-behavior:contain;isolation:isolate;}
.nodedc-editor-dock__canvas {position:relative;width:100%;height:100%;}
.nodedc-editor-dock__primary {position:absolute;overflow:hidden;min-width:0;min-height:0;}
.nodedc-editor-dock__tool {position:absolute;display:flex;flex-direction:column;box-sizing:border-box;min-width:0;min-height:0;}
.nodedc-editor-dock__tool[hidden] {display:none;}
.nodedc-editor-dock__tool:not([data-floating]) {border-radius:0;box-shadow:none;}
.nodedc-editor-dock__tool::before {display:none;}
.nodedc-editor-dock__tool>.nodedc-window__head {flex:none;cursor:grab;touch-action:none;user-select:none;}
.nodedc-editor-dock__tool>.nodedc-window__head:active {cursor:grabbing;}
.nodedc-editor-dock__tool>.nodedc-window__head:focus-visible {outline:2px solid var(--nodedc-text-primary);outline-offset:-3px;}
.nodedc-editor-dock__body {flex:1;min-height:0;min-width:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;padding:0 var(--nodedc-space-3) var(--nodedc-space-3);}
.nodedc-editor-dock__tool .nodedc-inspector {width:100%;max-width:none;}
.nodedc-editor-dock__tool>.nodedc-window__footer {flex:none;}
.nodedc-editor-dock__shield {position:absolute;inset:0;z-index:30;cursor:grabbing;}
.nodedc-editor-dock__preview {z-index:50;pointer-events:none;}
.nodedc-comparison-table[data-density="compact"] table {min-width:calc(7.5rem + (var(--nodedc-comparison-columns) - 1) * 5.5rem); table-layout:fixed; line-height:1.25;}
.nodedc-comparison-table[data-density="compact"] col:first-child {width:7.5rem;}
.nodedc-comparison-table[data-density="compact"] th, .nodedc-comparison-table[data-density="compact"] td {padding:3px var(--nodedc-space-1);}
@@ -4547,3 +4571,94 @@ textarea.nodedc-field__control {
.nodedc-navigation-cube g.is-hovered polygon, .nodedc-navigation-cube g:focus-visible polygon { fill: var(--cube-hover, var(--nodedc-control-selected-bg, #eee)); }
.nodedc-navigation-cube g.is-hovered text, .nodedc-navigation-cube g:focus-visible text { fill: var(--cube-hover-text, var(--nodedc-control-selected-text, #161616)); }
.nodedc-navigation-cube g[aria-disabled="true"] { opacity: .45; cursor: default; }
.nodedc-window__resize:is([data-edge="n"], [data-edge="s"]) { cursor: ns-resize; }
.nodedc-window__resize:is([data-edge="e"], [data-edge="w"]) { cursor: ew-resize; }
.nodedc-window__resize:is([data-edge="ne"], [data-edge="sw"]) { cursor: nesw-resize; }
.nodedc-window__resize:is([data-edge="nw"], [data-edge="se"]) { cursor: nwse-resize; }
.nodedc-window[data-floating="true"] > .nodedc-window__head { cursor: move; }
/* Modeless mode retains the same mounted window and form. */
.nodedc-overlay[data-floating="true"] {
background: transparent;
backdrop-filter: none;
-webkit-backdrop-filter: none;
pointer-events: none;
overflow: hidden;
}
.nodedc-window[data-floating="true"] { pointer-events: auto; }
.nodedc-window[data-floating="true"] > .nodedc-window__head { touch-action: none; user-select: none; }
.nodedc-window__resize { position: absolute; z-index: 3; touch-action: none; }
.nodedc-window__resize[data-edge="n"] { top: 0; left: 12px; right: 12px; height: 6px; }
.nodedc-window__resize[data-edge="s"] { bottom: 0; left: 12px; right: 12px; height: 6px; }
.nodedc-window__resize[data-edge="e"] { right: 0; top: 12px; bottom: 12px; width: 6px; }
.nodedc-window__resize[data-edge="w"] { left: 0; top: 12px; bottom: 12px; width: 6px; }
.nodedc-window__resize[data-edge="ne"] { top: 0; right: 0; width: 12px; height: 12px; }
.nodedc-window__resize[data-edge="nw"] { top: 0; left: 0; width: 12px; height: 12px; }
.nodedc-window__resize[data-edge="se"] { bottom: 0; right: 0; width: 12px; height: 12px; }
.nodedc-window__resize[data-edge="sw"] { bottom: 0; left: 0; width: 12px; height: 12px; }
/* An inspector in a settings window follows the available content width. */
.nodedc-window__body .nodedc-inspector,
.nodedc-window__body .nodedc-control-row { width: 100%; min-width: 0; }
.nodedc-feature-settings-window > .nodedc-window__body { container: nodedc-settings / inline-size; }
@container nodedc-settings (max-width: 42rem) {
.nodedc-feature-settings { grid-template-columns:minmax(0,1fr); grid-template-rows:auto minmax(0,1fr); }
.nodedc-feature-settings__navigation { max-height:10rem; }
}
/* Compact outliner: rows, indentation and selection; no nested card surfaces. */
.nodedc-tree { overflow:auto; min-height:0; overscroll-behavior:contain; font-size:var(--nodedc-font-size-sm); }
.nodedc-tree__row { display:flex; align-items:center; gap:6px; min-height:28px; padding:2px 6px 2px calc(4px + var(--tree-depth) * 14px); box-sizing:border-box; cursor:default; user-select:none; color:var(--nodedc-text-secondary); }
.nodedc-tree__row:hover { background:rgb(var(--nodedc-accent-rgb) / .06); }
.nodedc-tree__row[aria-selected="true"] { background:rgb(var(--nodedc-accent-rgb) / .14); color:var(--nodedc-text-primary); }
.nodedc-tree__row:focus-visible { outline:2px solid var(--nodedc-accent); outline-offset:-2px; }
.nodedc-tree__row > svg { flex:0 0 auto; }
.nodedc-tree__branch { display:flex; flex:0 0 16px; }
.nodedc-tree__label { flex:1; min-width:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.nodedc-tree button { appearance:none; border:0; padding:2px; background:transparent; color:inherit; display:flex; align-items:center; justify-content:center; width:20px; height:22px; cursor:pointer; }
.nodedc-tree button:focus-visible { outline:2px solid var(--nodedc-accent); }
.nodedc-tree__visibility { flex:0 0 20px; opacity:.6; }
.nodedc-tree__visibility:hover { opacity:1; }
.nodedc-window[data-resizable="true"] { display:flex; flex-direction:column; }
.nodedc-window[data-resizable="true"] > .nodedc-window__body { flex:1; min-height:0; }
.nodedc-glass-material[data-radius="panel"] { border-radius:var(--nodedc-radius-panel); }
.nodedc-glass-material[data-radius="card"] { border-radius:var(--nodedc-radius-card); }
.nodedc-glass-material[data-radius="pill"] { border-radius:var(--nodedc-radius-circle); }
.nodedc-glass-material[data-glass-context="scene"] {
background:rgb(var(--nodedc-modal-glass-tint-rgb) / var(--nodedc-scene-glass-opacity));
backdrop-filter:blur(var(--nodedc-scene-glass-blur)) saturate(var(--nodedc-modal-glass-saturation)) brightness(var(--nodedc-modal-glass-brightness));
-webkit-backdrop-filter:blur(var(--nodedc-scene-glass-blur)) saturate(var(--nodedc-modal-glass-saturation)) brightness(var(--nodedc-modal-glass-brightness));
box-shadow:var(--nodedc-glass-panel-shadow);
}
.nodedc-resizable-viewport { position:relative; min-width:0; isolation:isolate; }
.nodedc-resizable-viewport__grip {
position:absolute; z-index:4; bottom:0; width:28px; height:28px;
color:var(--nodedc-text-secondary); cursor:ns-resize; touch-action:none; user-select:none;
border-radius:var(--nodedc-radius-sm);
}
.nodedc-resizable-viewport__grip[data-corner="end"] { right:0; }
.nodedc-resizable-viewport__grip[data-corner="start"] { left:0; transform:scaleX(-1); }
.nodedc-resizable-viewport__grip::before, .nodedc-resizable-viewport__grip::after {
content:""; position:absolute; right:5px; bottom:5px;
border-right:1px solid currentColor; border-bottom:1px solid currentColor;
}
.nodedc-resizable-viewport__grip::before { width:12px; height:12px; }
.nodedc-resizable-viewport__grip::after { width:6px; height:6px; }
.nodedc-resizable-viewport__grip:hover { color:var(--nodedc-text-primary); background:var(--nodedc-glass-control-hover); }
.nodedc-resizable-viewport__grip:focus-visible { outline:2px solid rgb(var(--nodedc-accent-rgb)); outline-offset:-3px; }
.nodedc-panel-viewport-anchor, .nodedc-panel-viewport-anchor > div, .nodedc-panel-viewport { height:100%; min-height:0; }
.nodedc-panel-viewport[data-fullscreen="true"] { position:fixed; inset:var(--nodedc-space-3); height:auto; z-index:calc(var(--nodedc-layer-overlay) - 1); }
.nodedc-panel-viewport[data-fullscreen="true"] > .nodedc-application-panel { animation:none; }
.nodedc-resizable-viewport[data-resize-indicator="hidden"] .nodedc-resizable-viewport__grip::before,
.nodedc-resizable-viewport[data-resize-indicator="hidden"] .nodedc-resizable-viewport__grip::after { display:none; }
.nodedc-resizable-viewport[data-resize-indicator="hidden"] .nodedc-resizable-viewport__grip:hover { background:transparent; }
.nodedc-scene-annotation.nodedc-button { min-width:0; padding:var(--nodedc-space-1); background:transparent; text-shadow:0 1px 4px rgb(0 0 0 / .85); }
.nodedc-scene-annotation .nodedc-button__content { display:grid; gap:0; text-align:center; font-variant-numeric:tabular-nums; }
.nodedc-scene-annotation:hover, .nodedc-scene-annotation[aria-pressed="true"] { background:var(--nodedc-glass-control-hover); }
.nodedc-scene-annotation[aria-pressed="true"] { box-shadow:var(--nodedc-glass-control-shadow); }
.nodedc-scene-annotation.nodedc-button[hidden] { display:none; }