Skip to content
Shapemetry

@huukhanhnguyen/model / validate/components

validate/components

componentTableWarnings()

componentTableWarnings(model): RegistryError[]

Soft lint: Table.* in a component body/opening expression is isolation- law violation. A component receives table data via a PARAMETER; the host evaluates Table.get(...) at placeComponent args (outer scope).

Parameters

model

ModelJSON

Returns

RegistryError[]


flatContractWarnings()

flatContractWarnings(model): RegistryError[]

Parameters

model

ModelJSON

Returns

RegistryError[]


openingCutWarnings()

openingCutWarnings(model, registry?): RegistryError[]

Soft lint for the opening law's GROUP BEHAVIOR (2026-07-26): the subtract does NOT reach inside groups, and that is deliberate — geometry ops pass groups through, and a void is a geometry op like any other. The failure mode is silent: the doorway simply is not there, and the author has no error to read.

So: a placeComponent whose component declares a non-empty opening, sitting in a scope where EVERYTHING is grouped, cuts nothing. Reported here rather than at eval time because it is not wrong — a scene may legitimately be all blocks — and because the JSON says enough to see it.

Position stopped mattering when the cut became a block BEHAVIOR run over the settled chain (behaviors.ts): a wall authored after the door is cut just the same, so only the group boundary is left to warn about.

Needs a registry to tell a producer from a transform; without one the lint is skipped rather than guessed.

Parameters

model

ModelJSON

registry?

Registry

Returns

RegistryError[]

Last updated: 📖 1 min readEdit on GitHub