Phase 5 Stage E: fence / slab / ceiling drop their legacy panels

Three flavors of Stage E in one PR:

- **Fence** — fully auto-derived. Adds `kind: 'boolean'` to ParamField
  (rendered as ToggleControl), wires `showInfill` through
  `def.parametrics`. Legacy `FencePanel` deleted; the auto-derived
  `<ParametricInspector>` now drives fence editing entirely.

- **Slab / Ceiling** — kind-owned via `parametrics.customPanel`. The
  legacy panels have shape-specific bits (elevation/height presets,
  area display, holes list with auto-vs-manual provenance) that don't
  fit the auto-derived field model yet. `<ParametricInspector>` learns
  to lazy-load and mount `parametrics.customPanel` when present;
  legacy `SlabPanel` + `CeilingPanel` files relocate to
  `nodes/src/<kind>/panel.tsx` and the legacy copies delete.

  When `list` / `computed` / `action` field kinds eventually graduate
  to auto-derived support, these custom panels collapse back into
  `parametrics.groups`. The plan calls this out under "Custom-behavior
  escape hatch" and Foot-gun 5 of the recipe.

Public-surface additions in `@pascal-app/editor`:
- `ActionButton`, `ActionGroup`, `PanelSection`, `SegmentedControl`,
  `ToggleControl`, `PanelWrapper` — needed by the kind-owned panels.

Per-kind progress table: fence/slab/ceiling all flip to E .

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Wassim SAMAD
2026-05-18 10:04:11 -04:00
co-authored by Claude Opus 4.7
parent c3e255b58a
commit 3c37ff009b
10 changed files with 108 additions and 268 deletions
+9 -4
View File
@@ -2,10 +2,14 @@ import type { ParametricDescriptor } from '@pascal-app/core'
import type { SlabNode } from './schema'
/**
* Inspector descriptor for slab. Polygon + holes are edited via the
* floor-plan boundary / hole editors — not number inputs. The inspector
* exposes only the per-instance scalars (elevation + auto-from-walls
* toggle).
* Inspector descriptor for slab.
*
* Mounts the kind-owned `<SlabPanel>` via `customPanel` — the slab
* editor has shape-specific concerns (elevation presets, area display,
* holes list with auto-vs-manual provenance) that don't fit the
* auto-derived field model. `groups` retained as a placeholder for the
* future when `list` / `computed` / `action` field kinds let this
* collapse into pure parametrics.
*/
export const slabParametrics: ParametricDescriptor<SlabNode> = {
groups: [
@@ -14,4 +18,5 @@ export const slabParametrics: ParametricDescriptor<SlabNode> = {
fields: [{ key: 'elevation', kind: 'number', unit: 'm', min: 0.02, max: 1, step: 0.01 }],
},
],
customPanel: () => import('./panel'),
}