Handle wall split attachment migration and child ids

This commit is contained in:
sudhir
2026-04-15 14:49:58 +05:30
parent 6190ba4bdc
commit d1bef22701
2 changed files with 164 additions and 10 deletions
+5 -4
View File
@@ -2,15 +2,16 @@ import dedent from 'dedent'
import { z } from 'zod'
import { BaseNode, nodeType, objectId } from '../base'
import { MaterialSchema } from '../material'
import { DoorNode } from './door'
import { ItemNode } from './item'
// import { DoorNode } from "./door";
// import { ItemNode } from "./item";
// import { WindowNode } from "./window";
import { WindowNode } from './window'
export const WallNode = BaseNode.extend({
id: objectId('wall'),
type: nodeType('wall'),
children: z.array(ItemNode.shape.id).default([]),
children: z
.array(z.union([ItemNode.shape.id, DoorNode.shape.id, WindowNode.shape.id]))
.default([]),
material: MaterialSchema.optional(),
thickness: z.number().optional(),
height: z.number().optional(),