Variable spatialRuleSchemaConst
spatialRuleSchema: ZodDiscriminatedUnion<
[
ZodObject<
{
metric: ZodDefault<
ZodEnum<
{
chebyshev: "chebyshev";
euclidean: "euclidean";
manhattan: "manhattan";
},
>,
>;
minDistance: ZodNumber;
severity: ZodDefault<
ZodEnum<
{ error: "error"; suggestion: "suggestion"; warning: "warning" },
>,
>;
target: ZodUnion<
readonly [
ZodObject<{ id: ZodString }, $strict>,
ZodObject<{ category: ZodString }, $strict>,
],
>;
type: ZodLiteral<"minSpacing">;
},
$strict,
>,
ZodObject<
{
buffer: ZodNumber;
severity: ZodDefault<
ZodEnum<
{ error: "error"; suggestion: "suggestion"; warning: "warning" },
>,
>;
target: ZodOptional<
ZodUnion<
readonly [
ZodObject<{ id: ZodString }, $strict>,
ZodObject<{ category: ZodString }, $strict>,
],
>,
>;
type: ZodLiteral<"edgeBuffer">;
},
$strict,
>,
ZodObject<
{
severity: ZodDefault<
ZodEnum<
{ error: "error"; suggestion: "suggestion"; warning: "warning" },
>,
>;
target: ZodUnion<
readonly [
ZodObject<{ id: ZodString }, $strict>,
ZodObject<{ category: ZodString }, $strict>,
],
>;
tolerance: ZodNumber;
type: ZodLiteral<"centered">;
},
$strict,
>,
ZodObject<
{
maxDistance: ZodNumber;
metric: ZodDefault<
ZodEnum<
{
chebyshev: "chebyshev";
euclidean: "euclidean";
manhattan: "manhattan";
},
>,
>;
near: ZodUnion<
readonly [
ZodObject<{ id: ZodString }, $strict>,
ZodObject<{ category: ZodString }, $strict>,
],
>;
severity: ZodDefault<
ZodEnum<
{ error: "error"; suggestion: "suggestion"; warning: "warning" },
>,
>;
target: ZodUnion<
readonly [
ZodObject<{ id: ZodString }, $strict>,
ZodObject<{ category: ZodString }, $strict>,
],
>;
type: ZodLiteral<"proximity">;
},
$strict,
>,
],
"type",
> = ...
A single geometric constraint, discriminated by
type. Each entry is pure data; the validation engine turns it into layout findings withsubjectsso offending buildings light up in the editor. Severity defaults are graded by how hard the constraint usually is (spacing/edge/proximity warn, centering suggests) and can always be overridden per entry.