@almadar/core 10.13.0 → 10.14.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-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';
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-Ctj2l6ma.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-BVcq7eXk.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-CmTHzC3Z.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-Ds6d_mMY.js';
5
5
  import { AnyPatternConfig } from '@almadar/patterns';
6
6
  import 'zod';
7
7
 
package/dist/builders.js CHANGED
@@ -184,6 +184,42 @@ z.object({
184
184
  sheets: z.record(SpriteDirectionSchema, z.string()),
185
185
  animations: z.record(AnimationNameSchema, AnimationDefSchema)
186
186
  });
187
+ var SubTextureSchema = z.object({
188
+ x: z.number().nonnegative(),
189
+ y: z.number().nonnegative(),
190
+ width: z.number().positive(),
191
+ height: z.number().positive(),
192
+ frameX: z.number().optional(),
193
+ frameY: z.number().optional(),
194
+ frameWidth: z.number().positive().optional(),
195
+ frameHeight: z.number().positive().optional()
196
+ });
197
+ z.object({
198
+ imagePath: z.string(),
199
+ subTextures: z.record(z.string(), SubTextureSchema)
200
+ });
201
+ z.object({
202
+ imagePath: z.string(),
203
+ tileWidth: z.number().positive(),
204
+ tileHeight: z.number().positive(),
205
+ columns: z.number().int().positive(),
206
+ rows: z.number().int().positive(),
207
+ margin: z.number().nonnegative().optional(),
208
+ spacing: z.number().nonnegative().optional(),
209
+ names: z.array(z.string()).optional()
210
+ });
211
+ var PACK_CLASSES = ["board-tileset", "character-kit", "shared-primitive"];
212
+ z.enum(PACK_CLASSES);
213
+ var CharacterKitLayerSchema = z.object({
214
+ slot: z.enum(["body", "head", "face", "hair", "facialHair", "shirt", "pants", "shoes", "accessory"]),
215
+ url: z.string(),
216
+ atlas: z.string().optional(),
217
+ sprite: z.string().optional()
218
+ });
219
+ z.object({
220
+ pack: z.string(),
221
+ layers: z.array(CharacterKitLayerSchema)
222
+ });
187
223
  var SemanticAssetRefSchema = z.object({
188
224
  role: EntityRoleSchema,
189
225
  category: z.string().min(1),
@@ -195,6 +231,8 @@ var SemanticAssetRefSchema = z.object({
195
231
  });
196
232
  SemanticAssetRefSchema.extend({
197
233
  url: z.string(),
234
+ atlas: z.string().optional(),
235
+ sprite: z.string().optional(),
198
236
  name: z.string().optional(),
199
237
  thumbnailUrl: z.string().optional()
200
238
  });