From a8f32dd47aecbe43c853f7daf3df557b25f56591 Mon Sep 17 00:00:00 2001 From: Wassim SAMAD Date: Wed, 17 Jun 2026 15:20:21 -0400 Subject: [PATCH] feat(paint-slots): add node.slots field to fence/stair/column/elevator schemas Pre-adds the unified slot-ref field (Record) to the four kinds being migrated onto the paint-slot model, so per-kind work can proceed in parallel worktrees without cross-package core edits. Co-Authored-By: Claude Opus 4.8 (1M context) --- packages/core/src/schema/nodes/column.ts | 3 +++ packages/core/src/schema/nodes/elevator.ts | 3 +++ packages/core/src/schema/nodes/fence.ts | 3 +++ packages/core/src/schema/nodes/stair.ts | 3 +++ 4 files changed, 12 insertions(+) diff --git a/packages/core/src/schema/nodes/column.ts b/packages/core/src/schema/nodes/column.ts index 78a52126..de411604 100644 --- a/packages/core/src/schema/nodes/column.ts +++ b/packages/core/src/schema/nodes/column.ts @@ -159,6 +159,9 @@ export const ColumnNode = BaseNode.extend({ bracePlateEnabled: z.boolean().default(true), material: MaterialSchema.optional(), materialPreset: z.string().optional(), + // Unified paint-slot refs (`scene:`/`library:` MaterialRef per slot id), + // matching the slot model items/slab/shelf use. Absent = declared default. + slots: z.record(z.string(), z.string()).optional(), }).describe(dedent` Column node - used to represent structural or decorative pillars/columns. - style: visual approach such as plain, lathe-turned, carved, or cluster diff --git a/packages/core/src/schema/nodes/elevator.ts b/packages/core/src/schema/nodes/elevator.ts index 75639387..d1c97b49 100644 --- a/packages/core/src/schema/nodes/elevator.ts +++ b/packages/core/src/schema/nodes/elevator.ts @@ -16,6 +16,9 @@ export const ElevatorNode = BaseNode.extend({ type: nodeType('elevator'), material: MaterialSchema.optional(), materialPreset: z.string().optional(), + // Unified paint-slot refs (`scene:`/`library:` MaterialRef per slot id), + // matching the slot model items/slab/shelf use. Absent = declared default. + slots: z.record(z.string(), z.string()).optional(), position: z.tuple([z.number(), z.number(), z.number()]).default([0, 0, 0]), // Rotation around the Y axis in radians. rotation: z.number().default(0), diff --git a/packages/core/src/schema/nodes/fence.ts b/packages/core/src/schema/nodes/fence.ts index 40875717..1818d007 100644 --- a/packages/core/src/schema/nodes/fence.ts +++ b/packages/core/src/schema/nodes/fence.ts @@ -11,6 +11,9 @@ export const FenceNode = BaseNode.extend({ type: nodeType('fence'), material: MaterialSchema.optional(), materialPreset: z.string().optional(), + // Unified paint-slot refs (`scene:`/`library:` MaterialRef per slot id), + // matching the slot model items/slab/shelf use. Absent = declared default. + slots: z.record(z.string(), z.string()).optional(), start: z.tuple([z.number(), z.number()]), end: z.tuple([z.number(), z.number()]), height: z.number().default(1.8), diff --git a/packages/core/src/schema/nodes/stair.ts b/packages/core/src/schema/nodes/stair.ts index a0c68fe1..abc1fe54 100644 --- a/packages/core/src/schema/nodes/stair.ts +++ b/packages/core/src/schema/nodes/stair.ts @@ -31,6 +31,9 @@ export const StairNode = BaseNode.extend({ treadMaterialPreset: z.string().optional(), sideMaterial: MaterialSchema.optional(), sideMaterialPreset: z.string().optional(), + // Unified paint-slot refs (`scene:`/`library:` MaterialRef per slot id), + // matching the slot model items/slab/shelf use. Absent = declared default. + slots: z.record(z.string(), z.string()).optional(), position: z.tuple([z.number(), z.number(), z.number()]).default([0, 0, 0]), // Rotation around Y axis in radians rotation: z.number().default(0),