{
  "version": 3,
  "sources": ["../../src/misc/geometry-types.ts"],
  "sourcesContent": ["import { T } from '@tldraw/validate'\n\n/**\n * A serializable model for 2D boxes.\n *\n * @public */\nexport interface BoxModel {\n\tx: number\n\ty: number\n\tw: number\n\th: number\n}\n\n/**\n * A serializable model for 2D vectors.\n *\n * @public */\nexport interface VecModel {\n\tx: number\n\ty: number\n\tz?: number\n}\n\n/**\n * Validator for VecModel objects that ensures they have numeric x and y coordinates,\n * with an optional z coordinate for 3D vectors. Used throughout the schema to\n * validate point and vector data structures.\n *\n * @public\n * @example\n * ```ts\n * const vector2D = { x: 10, y: 20 }\n * const isValid = vecModelValidator.check(vector2D) // true\n *\n * const vector3D = { x: 10, y: 20, z: 30 }\n * const isValid3D = vecModelValidator.check(vector3D) // true\n * ```\n */\nexport const vecModelValidator: T.ObjectValidator<VecModel> = T.object({\n\tx: T.number,\n\ty: T.number,\n\tz: T.number.optional(),\n})\n\n/**\n * Validator for BoxModel objects that ensures they have numeric x, y coordinates\n * for position and w, h values for width and height. Used throughout the schema\n * to validate bounding box and rectangular area data structures.\n *\n * @public\n * @example\n * ```ts\n * const box = { x: 10, y: 20, w: 100, h: 50 }\n * const isValid = boxModelValidator.check(box) // true\n *\n * const invalidBox = { x: 10, y: 20, w: -5, h: 50 }\n * const isValidNegative = boxModelValidator.check(invalidBox) // true (validator allows negative values)\n * ```\n */\nexport const boxModelValidator: T.ObjectValidator<BoxModel> = T.object({\n\tx: T.number,\n\ty: T.number,\n\tw: T.number,\n\th: T.number,\n})\n"],
  "mappings": "AAAA,SAAS,SAAS;AAsCX,MAAM,oBAAiD,EAAE,OAAO;AAAA,EACtE,GAAG,EAAE;AAAA,EACL,GAAG,EAAE;AAAA,EACL,GAAG,EAAE,OAAO,SAAS;AACtB,CAAC;AAiBM,MAAM,oBAAiD,EAAE,OAAO;AAAA,EACtE,GAAG,EAAE;AAAA,EACL,GAAG,EAAE;AAAA,EACL,GAAG,EAAE;AAAA,EACL,GAAG,EAAE;AACN,CAAC;",
  "names": []
}
