@kruschdev/pascal-plugin-furnishings 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +70 -2
- package/docs/ARCHITECTURE.md +56 -0
- package/docs/CAD-CATALOG.md +124 -0
- package/package.json +92 -4
- package/src/agent-operations.ts +851 -0
- package/src/agent-tools.ts +273 -0
- package/src/cad/catalog.ts +107 -0
- package/src/cad/electronics-geometry.ts +298 -0
- package/src/cad/furniture-geometry.ts +846 -0
- package/src/cad/index.ts +10 -0
- package/src/cad/materials.ts +274 -0
- package/src/cad/plants-geometry.ts +506 -0
- package/src/furnishings/audit.ts +711 -0
- package/src/furnishings/autopopulate.ts +1474 -0
- package/src/furnishings/catalog.ts +1848 -0
- package/src/furnishings/geometry.ts +753 -0
- package/src/furnishings/index.ts +14 -0
- package/src/furnishings/schedule.ts +503 -0
- package/src/furnishings/spatial-grounding.ts +1753 -0
- package/src/furnishings/types.ts +416 -0
- package/src/index.ts +145 -0
- package/src/nodes/assembly.ts +105 -0
- package/src/nodes/electronics.ts +187 -0
- package/src/nodes/glb-hydration.ts +269 -0
- package/src/nodes/item.ts +202 -0
- package/src/nodes/parametrics.ts +102 -0
- package/src/nodes/plant.ts +197 -0
- package/src/render.ts +55 -0
- package/src/ui/chat-card.tsx +119 -0
- package/src/ui/furnishings-panel.tsx +679 -0
- package/src/ui/inspector-card.tsx +350 -0
- package/src/ui/schedule-view.tsx +336 -0
- package/src/ui/store.ts +94 -0
|
@@ -0,0 +1,416 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical types, enums, style presets, and material/botanical palettes
|
|
3
|
+
* for `@kruschdev/pascal-plugin-furnishings/furnishings`.
|
|
4
|
+
*
|
|
5
|
+
* Pure framework-free TypeScript: zero `three`, `react`, `@pascal-app/*`, or `next` imports.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export type {
|
|
9
|
+
Aabb3,
|
|
10
|
+
OrientedPrismY,
|
|
11
|
+
SceneNodeLike,
|
|
12
|
+
Vec2,
|
|
13
|
+
Vec3,
|
|
14
|
+
XzBounds2D,
|
|
15
|
+
} from '@kruschdev/pascal-mep-kernel'
|
|
16
|
+
|
|
17
|
+
export {
|
|
18
|
+
FEET_TO_METERS,
|
|
19
|
+
INCHES_TO_METERS,
|
|
20
|
+
METERS_TO_FEET,
|
|
21
|
+
SQM_TO_SQFT,
|
|
22
|
+
round2,
|
|
23
|
+
round3,
|
|
24
|
+
round4,
|
|
25
|
+
} from '@kruschdev/pascal-mep-kernel'
|
|
26
|
+
|
|
27
|
+
export const FURNISHING_DOMAINS = [
|
|
28
|
+
'seating',
|
|
29
|
+
'tables-desks',
|
|
30
|
+
'beds-storage',
|
|
31
|
+
'electronics-av',
|
|
32
|
+
'soft-goods-decor',
|
|
33
|
+
'outdoor-patio',
|
|
34
|
+
'trees-plants',
|
|
35
|
+
] as const
|
|
36
|
+
|
|
37
|
+
export type FurnishingDomain = (typeof FURNISHING_DOMAINS)[number]
|
|
38
|
+
|
|
39
|
+
export const DOMAIN_LABELS: Readonly<Record<FurnishingDomain, string>> = {
|
|
40
|
+
seating: 'Seating',
|
|
41
|
+
'tables-desks': 'Tables & Desks',
|
|
42
|
+
'beds-storage': 'Beds & Freestanding Storage',
|
|
43
|
+
'electronics-av': 'TVs, Audio & Computers',
|
|
44
|
+
'soft-goods-decor': 'Rugs, Lights, Grates & Decor',
|
|
45
|
+
'outdoor-patio': 'Outdoor & Patio',
|
|
46
|
+
'trees-plants': 'Trees, Bushes & Plants',
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export const DOMAIN_COLORS: Readonly<Record<FurnishingDomain, string>> = {
|
|
50
|
+
seating: '#f59e0b',
|
|
51
|
+
'tables-desks': '#d97706',
|
|
52
|
+
'beds-storage': '#8b5cf6',
|
|
53
|
+
'electronics-av': '#38bdf8',
|
|
54
|
+
'soft-goods-decor': '#ec4899',
|
|
55
|
+
'outdoor-patio': '#14b8a6',
|
|
56
|
+
'trees-plants': '#22c55e',
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export const FURNISHING_NODE_KINDS = [
|
|
60
|
+
'furnishings:item',
|
|
61
|
+
'furnishings:electronics',
|
|
62
|
+
'furnishings:plant',
|
|
63
|
+
] as const
|
|
64
|
+
|
|
65
|
+
export type FurnishingNodeKind = (typeof FURNISHING_NODE_KINDS)[number]
|
|
66
|
+
|
|
67
|
+
export const STYLE_PRESETS = [
|
|
68
|
+
'modern',
|
|
69
|
+
'mid-century',
|
|
70
|
+
'craftsman',
|
|
71
|
+
'industrial',
|
|
72
|
+
'coastal',
|
|
73
|
+
'scandinavian',
|
|
74
|
+
] as const
|
|
75
|
+
|
|
76
|
+
export type StylePreset = (typeof STYLE_PRESETS)[number]
|
|
77
|
+
|
|
78
|
+
export const BUDGET_TIERS = ['value', 'mid-tier', 'designer'] as const
|
|
79
|
+
export type BudgetTier = (typeof BUDGET_TIERS)[number]
|
|
80
|
+
|
|
81
|
+
export const BUDGET_TIER_MULTIPLIER: Readonly<Record<BudgetTier, number>> = {
|
|
82
|
+
value: 0.68,
|
|
83
|
+
'mid-tier': 1.0,
|
|
84
|
+
designer: 1.85,
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export const WOOD_FINISHES = [
|
|
88
|
+
'natural-oak',
|
|
89
|
+
'american-walnut',
|
|
90
|
+
'warm-cherry',
|
|
91
|
+
'espresso',
|
|
92
|
+
'white-ash',
|
|
93
|
+
'matte-black',
|
|
94
|
+
'driftwood',
|
|
95
|
+
'teak-outdoor',
|
|
96
|
+
] as const
|
|
97
|
+
|
|
98
|
+
export type WoodFinish = (typeof WOOD_FINISHES)[number]
|
|
99
|
+
|
|
100
|
+
export const WOOD_FINISH_HEX: Readonly<Record<WoodFinish, string>> = {
|
|
101
|
+
'natural-oak': '#c8a575',
|
|
102
|
+
'american-walnut': '#6b472d',
|
|
103
|
+
'warm-cherry': '#8c4a2f',
|
|
104
|
+
espresso: '#3b2820',
|
|
105
|
+
'white-ash': '#dfd3be',
|
|
106
|
+
'matte-black': '#26282b',
|
|
107
|
+
driftwood: '#9e9284',
|
|
108
|
+
'teak-outdoor': '#b07b48',
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export const FABRIC_FINISHES = [
|
|
112
|
+
'warm-linen',
|
|
113
|
+
'charcoal-weave',
|
|
114
|
+
'navy-velvet',
|
|
115
|
+
'olive-boucle',
|
|
116
|
+
'cognac-leather',
|
|
117
|
+
'slate-gray',
|
|
118
|
+
'terracotta-weave',
|
|
119
|
+
'cream-boucle',
|
|
120
|
+
'sage-cotton',
|
|
121
|
+
'outdoor-sand',
|
|
122
|
+
] as const
|
|
123
|
+
|
|
124
|
+
export type FabricFinish = (typeof FABRIC_FINISHES)[number]
|
|
125
|
+
|
|
126
|
+
export const FABRIC_FINISH_HEX: Readonly<Record<FabricFinish, string>> = {
|
|
127
|
+
'warm-linen': '#d8cfc0',
|
|
128
|
+
'charcoal-weave': '#3f444c',
|
|
129
|
+
'navy-velvet': '#253958',
|
|
130
|
+
'olive-boucle': '#606c4d',
|
|
131
|
+
'cognac-leather': '#9b5a2e',
|
|
132
|
+
'slate-gray': '#6b7280',
|
|
133
|
+
'terracotta-weave': '#b85c3e',
|
|
134
|
+
'cream-boucle': '#ebe5d9',
|
|
135
|
+
'sage-cotton': '#8fa38b',
|
|
136
|
+
'outdoor-sand': '#cfc2ab',
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export const METAL_FINISHES = [
|
|
140
|
+
'matte-black',
|
|
141
|
+
'brushed-brass',
|
|
142
|
+
'brushed-nickel',
|
|
143
|
+
'chrome',
|
|
144
|
+
'gunmetal',
|
|
145
|
+
'warm-bronze',
|
|
146
|
+
'white-powdercoat',
|
|
147
|
+
] as const
|
|
148
|
+
|
|
149
|
+
export type MetalFinish = (typeof METAL_FINISHES)[number]
|
|
150
|
+
|
|
151
|
+
export const METAL_FINISH_HEX: Readonly<Record<MetalFinish, string>> = {
|
|
152
|
+
'matte-black': '#202226',
|
|
153
|
+
'brushed-brass': '#c49f52',
|
|
154
|
+
'brushed-nickel': '#adb5bd',
|
|
155
|
+
chrome: '#dde3ea',
|
|
156
|
+
gunmetal: '#4b525c',
|
|
157
|
+
'warm-bronze': '#785a40',
|
|
158
|
+
'white-powdercoat': '#f1f3f5',
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export const ELECTRONICS_FINISHES = [
|
|
162
|
+
'matte-black',
|
|
163
|
+
'space-gray',
|
|
164
|
+
'silver-aluminum',
|
|
165
|
+
'walnut-grille',
|
|
166
|
+
'matte-white',
|
|
167
|
+
] as const
|
|
168
|
+
|
|
169
|
+
export type ElectronicsFinish = (typeof ELECTRONICS_FINISHES)[number]
|
|
170
|
+
|
|
171
|
+
export const ELECTRONICS_FINISH_HEX: Readonly<Record<ElectronicsFinish, string>> = {
|
|
172
|
+
'matte-black': '#191c20',
|
|
173
|
+
'space-gray': '#3c4149',
|
|
174
|
+
'silver-aluminum': '#cfd5dc',
|
|
175
|
+
'walnut-grille': '#6b472d',
|
|
176
|
+
'matte-white': '#edf0f3',
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export const ELECTRONICS_MOUNT_STYLES = [
|
|
180
|
+
'stand',
|
|
181
|
+
'wall-mount',
|
|
182
|
+
'ceiling-mount',
|
|
183
|
+
'floor',
|
|
184
|
+
'desk',
|
|
185
|
+
] as const
|
|
186
|
+
|
|
187
|
+
export type ElectronicsMountStyle = (typeof ELECTRONICS_MOUNT_STYLES)[number]
|
|
188
|
+
|
|
189
|
+
export const ELECTRONICS_CHANNEL_ROLES = [
|
|
190
|
+
'display',
|
|
191
|
+
'left',
|
|
192
|
+
'right',
|
|
193
|
+
'center',
|
|
194
|
+
'surround-l',
|
|
195
|
+
'surround-r',
|
|
196
|
+
'subwoofer',
|
|
197
|
+
'soundbar',
|
|
198
|
+
'workstation',
|
|
199
|
+
'source',
|
|
200
|
+
'aux',
|
|
201
|
+
] as const
|
|
202
|
+
|
|
203
|
+
export type ElectronicsChannelRole = (typeof ELECTRONICS_CHANNEL_ROLES)[number]
|
|
204
|
+
|
|
205
|
+
export const SCREEN_STATES = ['ambient', 'cinema', 'code', 'off'] as const
|
|
206
|
+
export type ScreenState = (typeof SCREEN_STATES)[number]
|
|
207
|
+
|
|
208
|
+
export const PLANT_SEASONS = ['spring', 'summer', 'autumn', 'winter'] as const
|
|
209
|
+
export type PlantSeason = (typeof PLANT_SEASONS)[number]
|
|
210
|
+
|
|
211
|
+
export const PLANT_MATURITIES = ['sapling', 'juvenile', 'mature', 'specimen'] as const
|
|
212
|
+
export type PlantMaturity = (typeof PLANT_MATURITIES)[number]
|
|
213
|
+
|
|
214
|
+
export const PLANT_MATURITY_SCALE: Readonly<Record<PlantMaturity, number>> = {
|
|
215
|
+
sapling: 0.55,
|
|
216
|
+
juvenile: 0.78,
|
|
217
|
+
mature: 1.0,
|
|
218
|
+
specimen: 1.28,
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export const PLANT_PLACEMENTS = ['in-ground', 'potted', 'raised-bed', 'window-box'] as const
|
|
222
|
+
export type PlantPlacement = (typeof PLANT_PLACEMENTS)[number]
|
|
223
|
+
|
|
224
|
+
export const POT_STYLES = [
|
|
225
|
+
'none',
|
|
226
|
+
'terracotta',
|
|
227
|
+
'ceramic-white',
|
|
228
|
+
'ceramic-charcoal',
|
|
229
|
+
'woven-basket',
|
|
230
|
+
'concrete-trough',
|
|
231
|
+
'cedar-box',
|
|
232
|
+
] as const
|
|
233
|
+
|
|
234
|
+
export type PotStyle = (typeof POT_STYLES)[number]
|
|
235
|
+
|
|
236
|
+
export const POT_STYLE_HEX: Readonly<Record<PotStyle, string>> = {
|
|
237
|
+
none: '#5c4033',
|
|
238
|
+
terracotta: '#b85c38',
|
|
239
|
+
'ceramic-white': '#eceae4',
|
|
240
|
+
'ceramic-charcoal': '#36393f',
|
|
241
|
+
'woven-basket': '#b59461',
|
|
242
|
+
'concrete-trough': '#8f9396',
|
|
243
|
+
'cedar-box': '#9b633c',
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
export type StylePresetPalette = {
|
|
247
|
+
readonly label: string
|
|
248
|
+
readonly woodFinish: WoodFinish
|
|
249
|
+
readonly fabricFinish: FabricFinish
|
|
250
|
+
readonly metalFinish: MetalFinish
|
|
251
|
+
readonly electronicsFinish: ElectronicsFinish
|
|
252
|
+
readonly potStyle: PotStyle
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
export const STYLE_PRESET_PALETTES: Readonly<Record<StylePreset, StylePresetPalette>> = {
|
|
256
|
+
modern: {
|
|
257
|
+
label: 'Modern Contemporary',
|
|
258
|
+
woodFinish: 'matte-black',
|
|
259
|
+
fabricFinish: 'charcoal-weave',
|
|
260
|
+
metalFinish: 'matte-black',
|
|
261
|
+
electronicsFinish: 'matte-black',
|
|
262
|
+
potStyle: 'ceramic-charcoal',
|
|
263
|
+
},
|
|
264
|
+
'mid-century': {
|
|
265
|
+
label: 'Mid-Century Modern',
|
|
266
|
+
woodFinish: 'american-walnut',
|
|
267
|
+
fabricFinish: 'cognac-leather',
|
|
268
|
+
metalFinish: 'brushed-brass',
|
|
269
|
+
electronicsFinish: 'walnut-grille',
|
|
270
|
+
potStyle: 'ceramic-white',
|
|
271
|
+
},
|
|
272
|
+
craftsman: {
|
|
273
|
+
label: 'Warm Craftsman',
|
|
274
|
+
woodFinish: 'warm-cherry',
|
|
275
|
+
fabricFinish: 'olive-boucle',
|
|
276
|
+
metalFinish: 'warm-bronze',
|
|
277
|
+
electronicsFinish: 'matte-black',
|
|
278
|
+
potStyle: 'terracotta',
|
|
279
|
+
},
|
|
280
|
+
industrial: {
|
|
281
|
+
label: 'Urban Industrial',
|
|
282
|
+
woodFinish: 'espresso',
|
|
283
|
+
fabricFinish: 'slate-gray',
|
|
284
|
+
metalFinish: 'gunmetal',
|
|
285
|
+
electronicsFinish: 'space-gray',
|
|
286
|
+
potStyle: 'concrete-trough',
|
|
287
|
+
},
|
|
288
|
+
coastal: {
|
|
289
|
+
label: 'Coastal Light',
|
|
290
|
+
woodFinish: 'driftwood',
|
|
291
|
+
fabricFinish: 'warm-linen',
|
|
292
|
+
metalFinish: 'brushed-nickel',
|
|
293
|
+
electronicsFinish: 'matte-white',
|
|
294
|
+
potStyle: 'woven-basket',
|
|
295
|
+
},
|
|
296
|
+
scandinavian: {
|
|
297
|
+
label: 'Scandinavian Minimal',
|
|
298
|
+
woodFinish: 'natural-oak',
|
|
299
|
+
fabricFinish: 'cream-boucle',
|
|
300
|
+
metalFinish: 'white-powdercoat',
|
|
301
|
+
electronicsFinish: 'silver-aluminum',
|
|
302
|
+
potStyle: 'ceramic-white',
|
|
303
|
+
},
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
export const ROOM_STAGING_KINDS = [
|
|
307
|
+
'living',
|
|
308
|
+
'bedroom',
|
|
309
|
+
'dining',
|
|
310
|
+
'office',
|
|
311
|
+
'media',
|
|
312
|
+
'entryway',
|
|
313
|
+
'hallway',
|
|
314
|
+
'kitchen',
|
|
315
|
+
'bathroom',
|
|
316
|
+
'closet',
|
|
317
|
+
'laundry',
|
|
318
|
+
'patio',
|
|
319
|
+
'yard',
|
|
320
|
+
'garage',
|
|
321
|
+
'general',
|
|
322
|
+
] as const
|
|
323
|
+
|
|
324
|
+
export type RoomStagingKind = (typeof ROOM_STAGING_KINDS)[number]
|
|
325
|
+
|
|
326
|
+
export type BlueprintWallSide = 'north' | 'south' | 'east' | 'west' | 'center' | 'auto'
|
|
327
|
+
|
|
328
|
+
export type BlueprintFurnishingItemDirective = {
|
|
329
|
+
readonly kind: string
|
|
330
|
+
/** Optional explicit wall anchor (`north`=-Z, `south`=+Z, `west`=-X, `east`=+X, `center`, or `auto`) */
|
|
331
|
+
readonly wall?: BlueprintWallSide
|
|
332
|
+
/** Optional explicit world XZ position in meters (overrides wall placement) */
|
|
333
|
+
readonly position?: readonly [number, number]
|
|
334
|
+
/** Optional elevation in meters (e.g., wall-mounted TV height) */
|
|
335
|
+
readonly yM?: number
|
|
336
|
+
/** Optional explicit yaw rotation in radians */
|
|
337
|
+
readonly rotationRad?: number
|
|
338
|
+
/** Offset along the chosen wall tangent in meters from wall midpoint */
|
|
339
|
+
readonly offsetAlongWallM?: number
|
|
340
|
+
/** Inward distance from the chosen wall face in meters */
|
|
341
|
+
readonly distanceFromWallM?: number
|
|
342
|
+
/** Optional repeat count (e.g., 4 bar stools along a kitchen island or dining chairs) */
|
|
343
|
+
readonly count?: number
|
|
344
|
+
/** Spacing between repeated items in meters (defaults to item width + 0.18m) */
|
|
345
|
+
readonly spacingM?: number
|
|
346
|
+
/** Optional override width/depth in meters (useful for area rugs) */
|
|
347
|
+
readonly widthM?: number
|
|
348
|
+
readonly depthM?: number
|
|
349
|
+
readonly screenDiagonalIn?: number
|
|
350
|
+
readonly channelRole?: ElectronicsChannelRole
|
|
351
|
+
readonly ignoreCollision?: boolean
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
export type BlueprintRoomFurnishingPlan = {
|
|
355
|
+
/** Explicit room classification override from architectural plans / design deck */
|
|
356
|
+
readonly roomKind?: RoomStagingKind
|
|
357
|
+
/**
|
|
358
|
+
* - `'blueprint-only'`: place ONLY `items` specified by the architectural plans
|
|
359
|
+
* - `'blueprint-plus-auto'`: place `items` first, then run room auto-staging in remaining clear space
|
|
360
|
+
* - `'skip'`: leave room un-staged (e.g. built-in cabinetry/millwork/closet shelving only)
|
|
361
|
+
*/
|
|
362
|
+
readonly mode?: 'blueprint-only' | 'blueprint-plus-auto' | 'skip'
|
|
363
|
+
/** Preferred anchor wall for the room's primary furniture group (bed, sofa/TV, desk) */
|
|
364
|
+
readonly preferredAnchorWall?: BlueprintWallSide
|
|
365
|
+
/** Explicit bed size override when staging a bedroom */
|
|
366
|
+
readonly bedSize?: 'king' | 'queen' | 'twin' | 'bunk'
|
|
367
|
+
/** Explicit blueprint/design-deck furniture, electronics, or plant placements */
|
|
368
|
+
readonly items?: readonly BlueprintFurnishingItemDirective[]
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
export type FurnishingElectricalDemand = {
|
|
372
|
+
readonly required: boolean
|
|
373
|
+
readonly role: 'tv-media-outlet' | 'workstation-outlet' | 'av-outlet' | 'ceiling-projector-outlet' | 'hardwired-luminaire' | 'appliance-outlet'
|
|
374
|
+
readonly voltage: 120
|
|
375
|
+
readonly poles: 1
|
|
376
|
+
readonly breakerAmps: 15 | 20
|
|
377
|
+
readonly loadVa: number
|
|
378
|
+
readonly recessed?: boolean
|
|
379
|
+
readonly mountHeightM?: number
|
|
380
|
+
readonly fixtureStyle?: 'chandelier' | 'pendant' | 'recessed-can' | 'flush-drum' | 'wall-sconce' | 'track-light' | 'ceiling-fan' | 'exterior-sconce'
|
|
381
|
+
readonly dimmable?: boolean
|
|
382
|
+
readonly label: string
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
export type FurnishingCatalogItem = {
|
|
386
|
+
readonly kind: string
|
|
387
|
+
readonly nodeType: FurnishingNodeKind
|
|
388
|
+
readonly domain: FurnishingDomain
|
|
389
|
+
readonly swapGroup: string
|
|
390
|
+
readonly label: string
|
|
391
|
+
readonly description: string
|
|
392
|
+
readonly csiDivision: string
|
|
393
|
+
readonly widthM: number
|
|
394
|
+
readonly depthM: number
|
|
395
|
+
readonly heightM: number
|
|
396
|
+
readonly defaultElevationM: number
|
|
397
|
+
readonly estUnitPriceUsd: number
|
|
398
|
+
readonly wattageW: number
|
|
399
|
+
readonly isFloorCovering?: boolean
|
|
400
|
+
readonly isWallMounted?: boolean
|
|
401
|
+
readonly isCeilingMounted?: boolean
|
|
402
|
+
readonly isDeskTopItem?: boolean
|
|
403
|
+
readonly isHardwiredLight?: boolean
|
|
404
|
+
readonly fixtureStyle?: FurnishingElectricalDemand['fixtureStyle']
|
|
405
|
+
readonly outdoorOnly?: boolean
|
|
406
|
+
readonly indoorOnly?: boolean
|
|
407
|
+
readonly minFoundationClearanceM?: number
|
|
408
|
+
readonly defaultMountStyle?: ElectronicsMountStyle
|
|
409
|
+
readonly defaultChannelRole?: ElectronicsChannelRole
|
|
410
|
+
readonly defaultScreenDiagonalIn?: number
|
|
411
|
+
readonly defaultSpecies?: string
|
|
412
|
+
readonly defaultPlacement?: PlantPlacement
|
|
413
|
+
readonly defaultPotStyle?: PotStyle
|
|
414
|
+
readonly foliageDeciduous?: boolean
|
|
415
|
+
readonly tags: readonly string[]
|
|
416
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Main browser entry (`@kruschdev/pascal-plugin-furnishings`).
|
|
3
|
+
*
|
|
4
|
+
* Exports the full Pascal Plugin API v1 surface:
|
|
5
|
+
* - `furnishingsPlugin`: Core `Plugin` manifest (`apiVersion: 1`, 4 `furnishings:*` node kinds + InspectorExtension)
|
|
6
|
+
* - `furnishingsHostPanel`: Left-rail `EditorHostPanel` (Auto-Furnish & Landscape + 86-item catalog browser)
|
|
7
|
+
* - `furnishingsScheduleView`: Full-pane `EditorHostView` (5-tab Room, Electronics/Power, Botanicals, Audit & CSI BOM view)
|
|
8
|
+
* - `furnishingsChatExtension`: `PluginChatExtension` (`/` actions + persisted tool cards)
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import type { AnyNodeDefinition, InspectorExtension, Plugin } from '@pascal-app/core'
|
|
12
|
+
import type { EditorHostPanel, EditorHostView, PluginChatExtension } from '@pascal-app/editor'
|
|
13
|
+
import { FURNISHINGS_CATALOG } from './furnishings/catalog'
|
|
14
|
+
import { furnishingsAssemblyRenderDefinition } from './nodes/assembly'
|
|
15
|
+
import { furnishingsElectronicsRenderDefinition } from './nodes/electronics'
|
|
16
|
+
import { furnishingsItemRenderDefinition } from './nodes/item'
|
|
17
|
+
import {
|
|
18
|
+
furnishingsAssemblyParametrics,
|
|
19
|
+
furnishingsElectronicsParametrics,
|
|
20
|
+
furnishingsItemParametrics,
|
|
21
|
+
furnishingsPlantParametrics,
|
|
22
|
+
} from './nodes/parametrics'
|
|
23
|
+
import { furnishingsPlantRenderDefinition } from './nodes/plant'
|
|
24
|
+
import {
|
|
25
|
+
FURNISHINGS_PLUGIN_ID,
|
|
26
|
+
FURNISHINGS_SCHEDULE_VIEW_ID,
|
|
27
|
+
furnishingsRenderPlugin,
|
|
28
|
+
} from './render'
|
|
29
|
+
|
|
30
|
+
export const furnishingsInspectorExtensions: InspectorExtension[] = [
|
|
31
|
+
{
|
|
32
|
+
id: `${FURNISHINGS_PLUGIN_ID}:item-inspector`,
|
|
33
|
+
pluginId: FURNISHINGS_PLUGIN_ID,
|
|
34
|
+
kinds: ['furnishings:assembly', 'furnishings:item', 'furnishings:electronics', 'furnishings:plant'],
|
|
35
|
+
icon: { kind: 'iconify', name: 'lucide:armchair' },
|
|
36
|
+
title: 'Furnishings, AV & Plants',
|
|
37
|
+
component: () => import('./ui/inspector-card'),
|
|
38
|
+
},
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
export const furnishingsAssemblyDefinition: AnyNodeDefinition = {
|
|
42
|
+
...furnishingsAssemblyRenderDefinition,
|
|
43
|
+
snapProfile: 'item' as const,
|
|
44
|
+
parametrics: furnishingsAssemblyParametrics,
|
|
45
|
+
} as unknown as AnyNodeDefinition
|
|
46
|
+
|
|
47
|
+
export const furnishingsItemDefinition: AnyNodeDefinition = {
|
|
48
|
+
...furnishingsItemRenderDefinition,
|
|
49
|
+
snapProfile: 'item' as const,
|
|
50
|
+
parametrics: furnishingsItemParametrics,
|
|
51
|
+
} as unknown as AnyNodeDefinition
|
|
52
|
+
|
|
53
|
+
export const furnishingsElectronicsDefinition: AnyNodeDefinition = {
|
|
54
|
+
...furnishingsElectronicsRenderDefinition,
|
|
55
|
+
snapProfile: 'item' as const,
|
|
56
|
+
parametrics: furnishingsElectronicsParametrics,
|
|
57
|
+
} as unknown as AnyNodeDefinition
|
|
58
|
+
|
|
59
|
+
export const furnishingsPlantDefinition: AnyNodeDefinition = {
|
|
60
|
+
...furnishingsPlantRenderDefinition,
|
|
61
|
+
snapProfile: 'item' as const,
|
|
62
|
+
parametrics: furnishingsPlantParametrics,
|
|
63
|
+
} as unknown as AnyNodeDefinition
|
|
64
|
+
|
|
65
|
+
export const furnishingsPlugin: Plugin = {
|
|
66
|
+
...furnishingsRenderPlugin,
|
|
67
|
+
nodes: [
|
|
68
|
+
furnishingsAssemblyDefinition,
|
|
69
|
+
furnishingsItemDefinition,
|
|
70
|
+
furnishingsElectronicsDefinition,
|
|
71
|
+
furnishingsPlantDefinition,
|
|
72
|
+
],
|
|
73
|
+
inspectorExtensions: furnishingsInspectorExtensions,
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export const furnishingsHostPanel: EditorHostPanel = {
|
|
77
|
+
id: `${FURNISHINGS_PLUGIN_ID}:panel`,
|
|
78
|
+
pluginId: FURNISHINGS_PLUGIN_ID,
|
|
79
|
+
label: 'Furnishings & Plants',
|
|
80
|
+
summary:
|
|
81
|
+
`${FURNISHINGS_CATALOG.length} parametric non-cabinetry furnishings, TVs, speakers, computers, patio pieces, and procedural trees, bushes & houseplants.`,
|
|
82
|
+
description:
|
|
83
|
+
'Stage complete interiors and exterior landscapes on top of @kruschdev/pascal-mep-kernel with zero external server required: seating, tables, desks, beds, freestanding storage, OLED TVs, surround audio, workstations, rugs, architectural lighting & HVAC grates, patio living, and seasonal trees/bushes/plants with ergonomics/clearance/AV/electrical audits and CSI Div 12/23/26/27/32 BOMs.',
|
|
84
|
+
category: 'Architecture & Interiors',
|
|
85
|
+
creator: {
|
|
86
|
+
name: 'Kevin Ruschman (@kruschdev)',
|
|
87
|
+
url: 'https://github.com/kruschdev',
|
|
88
|
+
},
|
|
89
|
+
pluginUrl: 'https://github.com/kruschdev/pascal-plugin-furnishings',
|
|
90
|
+
icon: { kind: 'iconify', name: 'lucide:armchair' },
|
|
91
|
+
component: () => import('./ui/furnishings-panel'),
|
|
92
|
+
defaultInstalled: false,
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export const furnishingsScheduleView: EditorHostView = {
|
|
96
|
+
id: FURNISHINGS_SCHEDULE_VIEW_ID,
|
|
97
|
+
pluginId: FURNISHINGS_PLUGIN_ID,
|
|
98
|
+
label: 'Furnishings Schedule',
|
|
99
|
+
description:
|
|
100
|
+
'Room-by-room FF&E staging, electronics wattage handoff, landscape botanical schedule, clearance/ergonomics audit, and CSI Div 12/23/26/27/32 BOM CSV.',
|
|
101
|
+
icon: { kind: 'iconify', name: 'lucide:clipboard-list' },
|
|
102
|
+
component: () => import('./ui/schedule-view'),
|
|
103
|
+
workspaces: ['edit'],
|
|
104
|
+
defaultPinned: false,
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export const furnishingsChatExtension: PluginChatExtension = {
|
|
108
|
+
pluginId: FURNISHINGS_PLUGIN_ID,
|
|
109
|
+
cards: {
|
|
110
|
+
furnishings_autopopulate: () => import('./ui/chat-card'),
|
|
111
|
+
furnishings_search_catalog: () => import('./ui/chat-card'),
|
|
112
|
+
furnishings_place_item: () => import('./ui/chat-card'),
|
|
113
|
+
furnishings_place_electronics: () => import('./ui/chat-card'),
|
|
114
|
+
furnishings_place_plant: () => import('./ui/chat-card'),
|
|
115
|
+
furnishings_swap_item: () => import('./ui/chat-card'),
|
|
116
|
+
furnishings_audit_layout: () => import('./ui/chat-card'),
|
|
117
|
+
furnishings_generate_schedule: () => import('./ui/chat-card'),
|
|
118
|
+
furnishings_compile_render_prompt: () => import('./ui/chat-card'),
|
|
119
|
+
furnishings_check_directions_diversity: () => import('./ui/chat-card'),
|
|
120
|
+
},
|
|
121
|
+
actions: [
|
|
122
|
+
{
|
|
123
|
+
id: 'furnishings-autopopulate',
|
|
124
|
+
label: 'Auto-Furnish & Landscape',
|
|
125
|
+
hint: 'Stage all interior rooms with furniture, TVs, speakers, computers & houseplants plus exterior trees and bushes',
|
|
126
|
+
prompt: 'Run furnishings_autopopulate on this building and summarize the staged rooms, landscaping, and total budget.',
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
id: 'furnishings-audit',
|
|
130
|
+
label: 'Audit Clearances, AV & Trees',
|
|
131
|
+
hint: 'Check overlaps, door egress, TV viewing distance, stereo balance, 15A circuit loads, and tree foundation setbacks',
|
|
132
|
+
prompt: 'Run furnishings_audit_layout on this scene and report any clearance, ergonomics, AV, electrical, or botanical findings.',
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
id: 'furnishings-bom',
|
|
136
|
+
label: 'FF&E & Landscape BOM',
|
|
137
|
+
hint: 'Generate CSI Division 12/23/26/27/32 schedule, electrical load handoff, and formula-safe CSV export',
|
|
138
|
+
prompt: 'Run furnishings_generate_schedule and summarize room totals, plug-in wattage, and grand total.',
|
|
139
|
+
},
|
|
140
|
+
],
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export default furnishingsPlugin
|
|
144
|
+
export * from './render'
|
|
145
|
+
export * from './furnishings'
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `furnishings:assembly` — Whole-Building FF&E & Landscape Staging Configuration Node.
|
|
3
|
+
* Render-safe module: zero `@pascal-app/editor` or `react` imports.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
BaseNode,
|
|
8
|
+
type FloorplanGeometry,
|
|
9
|
+
type GeometryContext,
|
|
10
|
+
type NodeDefinition,
|
|
11
|
+
type NodePort,
|
|
12
|
+
nodeType,
|
|
13
|
+
objectId,
|
|
14
|
+
} from '@pascal-app/core'
|
|
15
|
+
import { Group } from 'three'
|
|
16
|
+
import { z } from 'zod'
|
|
17
|
+
import { BUDGET_TIERS, PLANT_SEASONS, STYLE_PRESETS } from '../furnishings/types'
|
|
18
|
+
|
|
19
|
+
export const FurnishingsAssemblyNode = BaseNode.extend({
|
|
20
|
+
id: objectId('frnasm'),
|
|
21
|
+
type: nodeType('furnishings:assembly'),
|
|
22
|
+
position: z.tuple([z.number().finite(), z.number().finite(), z.number().finite()]).default([0, 0, 0]),
|
|
23
|
+
rotation: z.number().finite().default(0),
|
|
24
|
+
stylePreset: z.enum(STYLE_PRESETS).default('mid-century'),
|
|
25
|
+
budgetTier: z.enum(BUDGET_TIERS).default('mid-tier'),
|
|
26
|
+
season: z.enum(PLANT_SEASONS).default('summer'),
|
|
27
|
+
includeExteriorLandscaping: z.boolean().default(true),
|
|
28
|
+
includeElectronics: z.boolean().default(true),
|
|
29
|
+
includeHouseplants: z.boolean().default(true),
|
|
30
|
+
includeRugsAndDecor: z.boolean().default(true),
|
|
31
|
+
hardinessZone: z.string().default('7b'),
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
export type FurnishingsAssemblyNode = z.infer<typeof FurnishingsAssemblyNode>
|
|
35
|
+
|
|
36
|
+
export function getFurnishingsAssemblyPorts(node: FurnishingsAssemblyNode): NodePort[] {
|
|
37
|
+
const [x, y, zPos] = node.position
|
|
38
|
+
return [{ id: 'assembly-origin', position: [x, y, zPos], direction: [0, 1, 0], diameter: 0.05 }]
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function buildFurnishingsAssemblyGeometry(
|
|
42
|
+
node: FurnishingsAssemblyNode,
|
|
43
|
+
_ctx?: GeometryContext,
|
|
44
|
+
): Group {
|
|
45
|
+
const group = new Group()
|
|
46
|
+
group.name = `furnishings-assembly:${node.id}`
|
|
47
|
+
group.userData = {
|
|
48
|
+
stylePreset: node.stylePreset,
|
|
49
|
+
budgetTier: node.budgetTier,
|
|
50
|
+
season: node.season,
|
|
51
|
+
}
|
|
52
|
+
return group
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function buildFurnishingsAssemblyFloorplan(
|
|
56
|
+
_node: FurnishingsAssemblyNode,
|
|
57
|
+
_ctx?: GeometryContext,
|
|
58
|
+
): FloorplanGeometry {
|
|
59
|
+
return { kind: 'group', children: [] }
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export const furnishingsAssemblyRenderDefinition: NodeDefinition<typeof FurnishingsAssemblyNode> = {
|
|
63
|
+
kind: 'furnishings:assembly',
|
|
64
|
+
schemaVersion: 1,
|
|
65
|
+
schema: FurnishingsAssemblyNode,
|
|
66
|
+
category: 'furnish',
|
|
67
|
+
defaults: () => ({
|
|
68
|
+
object: 'node',
|
|
69
|
+
parentId: null,
|
|
70
|
+
visible: true,
|
|
71
|
+
metadata: {},
|
|
72
|
+
name: 'FF&E & Landscape Staging Package',
|
|
73
|
+
position: [0, 0, 0],
|
|
74
|
+
rotation: 0,
|
|
75
|
+
stylePreset: 'mid-century',
|
|
76
|
+
budgetTier: 'mid-tier',
|
|
77
|
+
season: 'summer',
|
|
78
|
+
includeExteriorLandscaping: true,
|
|
79
|
+
includeElectronics: true,
|
|
80
|
+
includeHouseplants: true,
|
|
81
|
+
includeRugsAndDecor: true,
|
|
82
|
+
hardinessZone: '7b',
|
|
83
|
+
}),
|
|
84
|
+
capabilities: {
|
|
85
|
+
selectable: { hitVolume: 'bbox' },
|
|
86
|
+
movable: { axes: ['x', 'z'], gridSnap: true },
|
|
87
|
+
rotatable: { axes: ['y'], snapAngles: [Math.PI / 2] },
|
|
88
|
+
duplicable: false,
|
|
89
|
+
deletable: true,
|
|
90
|
+
snappable: {},
|
|
91
|
+
},
|
|
92
|
+
geometry: buildFurnishingsAssemblyGeometry,
|
|
93
|
+
geometryKey: (n) => JSON.stringify([n.stylePreset, n.budgetTier, n.season]),
|
|
94
|
+
ports: getFurnishingsAssemblyPorts,
|
|
95
|
+
floorplan: buildFurnishingsAssemblyFloorplan,
|
|
96
|
+
presentation: {
|
|
97
|
+
label: 'FF&E & Landscape Package',
|
|
98
|
+
description: 'Whole-building style, budget tier, and seasonal botanical configuration node.',
|
|
99
|
+
icon: { kind: 'iconify', name: 'lucide:armchair' },
|
|
100
|
+
paletteSection: 'furnish',
|
|
101
|
+
},
|
|
102
|
+
mcp: {
|
|
103
|
+
description: 'Whole-building furnishings style preset, budget tier, and landscape season configuration.',
|
|
104
|
+
},
|
|
105
|
+
}
|