@almadar/core 10.12.0 → 10.13.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.
@@ -1,7 +1,7 @@
1
- import { T as TraitConfig, U as UISlot, E as Effect, a as Trait, R as RenderBinding, b as RenderUIEffect, c as TraitEventContract, d as Entity, e as TraitEventListener, C as CallSiteConfig, f as EntityField, g as EntityPersistence, h as EntityRow, i as TraitRef, j as TraitReference } from './trait-DecHZfpm.js';
2
- import { O as OrbitalSchema, U as UseDeclaration, E as EntityRef, P as PageRef, a as OrbitalDefinition, b as Page, c as PageRefObject } from './schema-CSn8gU27.js';
1
+ import { T as TraitConfig, U as UISlot, E as Effect, a as Trait, R as RenderBinding, b as RenderUIEffect, c as TraitEventContract, d as Entity, e as TraitEventListener, C as CallSiteConfig, f as EntityField, g as EntityPersistence, h as EntityRow, i as TraitRef, j as TraitReference } from './trait-Bwhkhv3V.js';
2
+ import { O as OrbitalSchema, U as UseDeclaration, E as EntityRef, P as PageRef, a as OrbitalDefinition, b as Page, c as PageRefObject } from './schema-DisJeRQc.js';
3
3
  import { S as SExpr } from './expression-BUIi9ezJ.js';
4
- export { C as ComposeBehaviorsInput, a as ComposeBehaviorsResult, E as EventWiringEntry, L as LayoutStrategy, b as applyEventWiring, c as composeBehaviors, d as detectLayoutStrategy } from './compose-behaviors-Bhf-XFFc.js';
4
+ export { C as ComposeBehaviorsInput, a as ComposeBehaviorsResult, E as EventWiringEntry, L as LayoutStrategy, b as applyEventWiring, c as composeBehaviors, d as detectLayoutStrategy } from './compose-behaviors-CmTHzC3Z.js';
5
5
  import { AnyPatternConfig } from '@almadar/patterns';
6
6
  import 'zod';
7
7
 
package/dist/builders.js CHANGED
@@ -163,11 +163,27 @@ var GAME_TYPES = [
163
163
  "rpg"
164
164
  ];
165
165
  var GameTypeSchema = z.enum(GAME_TYPES);
166
+ var ANIMATION_NAMES = ["idle", "walk", "attack", "hit", "death"];
167
+ var AnimationNameSchema = z.enum(ANIMATION_NAMES);
168
+ var SPRITE_DIRECTIONS = ["se", "sw"];
169
+ var SpriteDirectionSchema = z.enum(SPRITE_DIRECTIONS);
166
170
  var AnimationDefSchema = z.object({
167
- frames: z.union([z.array(z.number()), z.array(z.string())]),
168
- fps: z.number().positive(),
171
+ row: z.number().int().nonnegative(),
172
+ frames: z.number().int().positive(),
173
+ frameRate: z.number().positive(),
169
174
  loop: z.boolean()
170
175
  });
176
+ z.object({
177
+ unit: z.string().optional(),
178
+ type: z.string().optional(),
179
+ frameWidth: z.number().positive(),
180
+ frameHeight: z.number().positive(),
181
+ columns: z.number().int().positive(),
182
+ rows: z.number().int().positive(),
183
+ directions: z.array(SpriteDirectionSchema),
184
+ sheets: z.record(SpriteDirectionSchema, z.string()),
185
+ animations: z.record(AnimationNameSchema, AnimationDefSchema)
186
+ });
171
187
  var SemanticAssetRefSchema = z.object({
172
188
  role: EntityRoleSchema,
173
189
  category: z.string().min(1),