/** * Character schema — single source of truth for the rig JSON contract. * * Validator, rigger, Ruby mirror, and docs should all read these constants * instead of duplicating part names, pivot keys, or default maps. * * Schema version 2 is the current format (includes leftFoot / rightFoot). * Version 1 was the pre-foot format. */ import type { Dimension, Position, RigData } from '../types.js'; /** Current character JSON schema version (2 = includes foot joints). */ export declare const CHARACTER_SCHEMA_VERSION = 2; /** Body-part imagePaths every character must have (mouth lives on `mouth`). */ export declare const REQUIRED_BODY_PARTS: readonly ["head", "torso", "leftUpperArm", "leftForearm", "leftHand", "rightUpperArm", "rightForearm", "rightHand", "leftThigh", "leftLeg", "leftFoot", "rightThigh", "rightLeg", "rightFoot"]; export type BodyPart = typeof REQUIRED_BODY_PARTS[number]; /** * Keys allowed in `imagePaths`. Includes `mouth` because the rigger stores a * mouth overlay there in addition to the `mouth` object. */ export declare const IMAGE_PATH_KEYS: readonly ["head", "mouth", "torso", "leftUpperArm", "leftForearm", "leftHand", "rightUpperArm", "rightForearm", "rightHand", "leftThigh", "leftLeg", "leftFoot", "rightThigh", "rightLeg", "rightFoot"]; export type ImagePathKey = typeof IMAGE_PATH_KEYS[number]; /** Parent → child joints that chain the whole skeleton. */ export declare const LIMB_CONNECTIONS: readonly [{ readonly parent: "root"; readonly child: "torso"; }, { readonly parent: "torso"; readonly child: "head"; }, { readonly parent: "head"; readonly child: "mouth"; }, { readonly parent: "torso"; readonly child: "leftUpperArm"; }, { readonly parent: "leftUpperArm"; readonly child: "leftForearm"; }, { readonly parent: "leftForearm"; readonly child: "leftHand"; }, { readonly parent: "torso"; readonly child: "rightUpperArm"; }, { readonly parent: "rightUpperArm"; readonly child: "rightForearm"; }, { readonly parent: "rightForearm"; readonly child: "rightHand"; }, { readonly parent: "torso"; readonly child: "leftThigh"; }, { readonly parent: "leftThigh"; readonly child: "leftLeg"; }, { readonly parent: "leftLeg"; readonly child: "leftFoot"; }, { readonly parent: "torso"; readonly child: "rightThigh"; }, { readonly parent: "rightThigh"; readonly child: "rightLeg"; }, { readonly parent: "rightLeg"; readonly child: "rightFoot"; }]; export type LimbConnection = typeof LIMB_CONNECTIONS[number]; /** Pivot-point keys derived from LIMB_CONNECTIONS (`parent_child`). */ export declare const REQUIRED_PIVOT_POINTS: readonly ["root_torso", "torso_head", "head_mouth", "torso_leftUpperArm", "leftUpperArm_leftForearm", "leftForearm_leftHand", "torso_rightUpperArm", "rightUpperArm_rightForearm", "rightForearm_rightHand", "torso_leftThigh", "leftThigh_leftLeg", "leftLeg_leftFoot", "torso_rightThigh", "rightThigh_rightLeg", "rightLeg_rightFoot"]; export type PivotPointKey = typeof REQUIRED_PIVOT_POINTS[number]; /** Joint-offset keys — every limb connection except head_mouth. */ export declare const JOINT_OFFSET_KEYS: readonly Exclude[]; export type JointOffsetKey = typeof JOINT_OFFSET_KEYS[number]; /** Every part that must have a z-index value. */ export declare const REQUIRED_Z_INDEX_PARTS: readonly ["head", "mouth", "torso", "leftEye", "leftIris", "leftEyeLid", "rightEye", "rightIris", "rightEyeLid", "leftUpperArm", "leftForearm", "leftHand", "rightUpperArm", "rightForearm", "rightHand", "leftThigh", "leftLeg", "leftFoot", "rightThigh", "rightLeg", "rightFoot"]; export type ZIndexPart = typeof REQUIRED_Z_INDEX_PARTS[number]; /** Parts that must have a dimensionValues entry with width > 0 and height > 0. */ export declare const REQUIRED_DIMENSION_PARTS: readonly ["head", "torso", "mouth", "leftUpperArm", "leftForearm", "leftHand", "rightUpperArm", "rightForearm", "rightHand", "leftThigh", "leftLeg", "leftFoot", "rightThigh", "rightLeg", "rightFoot"]; export type DimensionPart = typeof REQUIRED_DIMENSION_PARTS[number]; /** * Rigger UI limb list (dimensioned parts, including mouth). * Same set as REQUIRED_DIMENSION_PARTS; named for the rigger. */ export declare const RIGGER_LIMB_NAMES: readonly ["head", "torso", "mouth", "leftUpperArm", "leftForearm", "leftHand", "rightUpperArm", "rightForearm", "rightHand", "leftThigh", "leftLeg", "leftFoot", "rightThigh", "rightLeg", "rightFoot"]; /** Eye image hash fields required in the eyes object. */ export declare const REQUIRED_EYE_IMAGES: readonly ["leftEyeImage", "rightEyeImage", "leftIris", "rightIris", "leftEyeLidOpen", "rightEyeLidOpen", "leftEyeLidHalfClosed", "rightEyeLidHalfClosed", "leftEyeLidClosed", "rightEyeLidClosed"]; export type EyeImageKey = typeof REQUIRED_EYE_IMAGES[number]; /** Eye coordinate fields that must be numbers. */ export declare const REQUIRED_EYE_COORDS: readonly ["leftEyeXCoor", "leftEyeYCoor", "rightEyeXCoor", "rightEyeYCoor", "leftEyeLidXCoor", "leftEyeLidYCoor", "rightEyeLidXCoor", "rightEyeLidYCoor", "leftIrisXCoor", "leftIrisYCoor", "rightIrisXCoor", "rightIrisYCoor"]; export type EyeCoordKey = typeof REQUIRED_EYE_COORDS[number]; /** Iris size fields that must be positive numbers. */ export declare const REQUIRED_IRIS_SIZES: readonly ["leftIrisWidth", "leftIrisHeight", "rightIrisWidth", "rightIrisHeight"]; export type IrisSizeKey = typeof REQUIRED_IRIS_SIZES[number]; /** All mouth shape keys a character may provide. */ export declare const MOUTH_SHAPE_KEYS: readonly ["closed", "slightly-open", "half-open", "open", "ee", "eh", "f", "l", "ds", "wide-open"]; export type MouthShapeKey = typeof MOUTH_SHAPE_KEYS[number]; /** Mouth shapes that represent the character talking. */ export declare const TALKING_MOUTH_SHAPES: readonly ["open", "half-open", "wide-open", "slightly-open", "f", "l", "ds", "ee", "eh"]; export type TalkingMouthShape = typeof TALKING_MOUTH_SHAPES[number]; export declare const DEFAULT_DIMENSION_VALUES: Record; export declare const DEFAULT_SELF_ROTATION_VALUES: Record; export declare const DEFAULT_ROTATION_VALUES: Record; /** * Default draw order (back to front for limbs). Eye layers sit relative to * the head and reuse the same numeric range as the right-arm/leg cluster. */ export declare const DEFAULT_Z_INDEX_VALUES: Record; export declare const DEFAULT_PIVOT_POINTS: Record; export declare const DEFAULT_JOINT_OFFSET: Record; export declare const DEFAULT_VISIBILITY: Record; /** Fill every required z-index key from defaults; keep caller values (including 0). */ export declare function completeZIndexValues(zIndexValues?: Record | null): Record; export declare function completePivotPoints(pivotPoints?: Record | null): Record; export declare function completeJointOffset(jointOffset?: Record | null): Record; export declare function completeDimensionValues(dimensionValues?: Record | null): Record; export declare function completeRotationValues(rotationValues?: Record | null): Record; export declare function completeSelfRotationValues(selfRotationValues?: Record | null): Record; /** * Fill every required structural field on a partial rig. * * Does not invent image hashes, mouth shapes, or eye assets — those stay as * provided. Missing foot z-index / pivot / dimension / rotation keys get * schema defaults so exporters stay valid after a format bump. * * When `customParts` is present, each custom part's keys are backfilled * into the rotation / dimension / z-index / pivot / visibility maps with * sensible defaults so downstream code never hits undefined for a declared * custom part. */ export declare function normalizeRigData(data?: Partial | null): RigData; //# sourceMappingURL=characterSchema.d.ts.map