feat(ui): standardize inspector spacing and compact level geometry

This commit is contained in:
Codex
2026-11-04 18:18:10 +03:00
parent 8ff33a6a17
commit be929f9d8e
10 changed files with 74 additions and 9 deletions
@@ -59,3 +59,12 @@ test("Foundry Inspector screens consume the semantic selection field", async ()
assert.equal((catalog.match(/<InspectorSelectField/g) ?? []).length, 2);
assert.match(coreStyles, /\.nodedc-inspector \.nodedc-control-row:has\(\.nodedc-select-anchor\)/);
});
test("Inspector owns form header and centered action footer around its sections",async()=>{
const markup=renderToStaticMarkup(createElement(Inspector,{header:'Form fields',footer:'Action',sections:[{id:'surface',label:'Surface',content:'Controls'},{id:'textures',label:'Textures',content:'Slots'}]}));
assert.ok(markup.indexOf('nodedc-inspector__header')<markup.indexOf('nodedc-inspector__group'));
assert.ok(markup.indexOf('nodedc-inspector__footer')>markup.lastIndexOf('nodedc-inspector__section'));
const css=await readFile(new URL('../packages/ui-core/styles.css',import.meta.url),'utf8');
assert.match(css,/\.nodedc-inspector__group\s*\{[^}]*gap: var\(--nodedc-space-3\)/);
assert.match(css,/\.nodedc-inspector__footer\s*\{[^}]*justify-content: center/);
});