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>
23 lines
788 B
TypeScript
23 lines
788 B
TypeScript
import type { ParametricDescriptor } from '@pascal-app/core'
|
|
import type { SlabNode } from './schema'
|
|
|
|
/**
|
|
* 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: [
|
|
{
|
|
label: 'Elevation',
|
|
fields: [{ key: 'elevation', kind: 'number', unit: 'm', min: 0.02, max: 1, step: 0.01 }],
|
|
},
|
|
],
|
|
customPanel: () => import('./panel'),
|
|
}
|