@almadar/core 10.19.0 → 10.21.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-BnNByIRE.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-BOGLyI7O.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-BcRvHKLW.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-BEL2Gr4v.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-DEeRtnHP.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-mP-vUG61.js';
5
5
  import { AnyPatternConfig } from '@almadar/patterns';
6
6
  import 'zod';
7
7
 
package/dist/builders.js CHANGED
@@ -144,25 +144,13 @@ var ENTITY_ROLES = [
144
144
  "decoration",
145
145
  "vehicle"
146
146
  ];
147
- var EntityRoleSchema = z.enum(ENTITY_ROLES);
147
+ z.enum(ENTITY_ROLES);
148
148
  var VISUAL_STYLES = ["pixel", "vector", "hd", "1-bit", "isometric"];
149
149
  var VisualStyleSchema = z.enum(VISUAL_STYLES);
150
150
  var ASSET_DIMENSIONS = ["2d", "3d"];
151
151
  var AssetDimensionSchema = z.enum(ASSET_DIMENSIONS);
152
152
  var ASSET_ASPECTS = ["1:1", "16:9", "5:7", "8:1"];
153
153
  var AssetAspectSchema = z.enum(ASSET_ASPECTS);
154
- var GAME_TYPES = [
155
- "platformer",
156
- "roguelike",
157
- "top-down",
158
- "puzzle",
159
- "racing",
160
- "card",
161
- "board",
162
- "shooter",
163
- "rpg"
164
- ];
165
- var GameTypeSchema = z.enum(GAME_TYPES);
166
154
  var ANIMATION_NAMES = ["idle", "walk", "attack", "hit", "death"];
167
155
  var AnimationNameSchema = z.enum(ANIMATION_NAMES);
168
156
  var SPRITE_DIRECTIONS = ["se", "sw"];
@@ -208,20 +196,8 @@ z.object({
208
196
  spacing: z.number().nonnegative().optional(),
209
197
  names: z.array(z.string()).optional()
210
198
  });
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
- });
223
199
  var SemanticAssetRefSchema = z.object({
224
- role: EntityRoleSchema,
200
+ role: z.string().min(1),
225
201
  category: z.string().min(1),
226
202
  animations: z.array(z.string()).optional(),
227
203
  style: VisualStyleSchema.optional(),
@@ -236,27 +212,6 @@ SemanticAssetRefSchema.extend({
236
212
  name: z.string().optional(),
237
213
  thumbnailUrl: z.string().optional()
238
214
  });
239
- z.object({
240
- basePath: z.string(),
241
- path: z.string(),
242
- tiles: z.array(z.number()).optional(),
243
- tileSize: z.number().positive().optional(),
244
- files: z.array(z.string()).optional(),
245
- animations: z.record(AnimationDefSchema).optional()
246
- });
247
- var AssetMappingSchema = z.object({
248
- path: z.string(),
249
- tiles: z.array(z.number()).optional(),
250
- tileSize: z.number().positive().optional(),
251
- files: z.array(z.string()).optional(),
252
- animations: z.record(AnimationDefSchema).optional()
253
- });
254
- z.object({
255
- gameType: GameTypeSchema,
256
- style: VisualStyleSchema,
257
- basePath: z.string(),
258
- mappings: z.record(AssetMappingSchema)
259
- });
260
215
  var AssetCatalogEntrySchema = z.object({
261
216
  url: z.string(),
262
217
  name: z.string(),
@@ -267,6 +222,20 @@ var AssetCatalogEntrySchema = z.object({
267
222
  aspect: AssetAspectSchema.optional()
268
223
  });
269
224
  z.array(AssetCatalogEntrySchema);
225
+ var ScenePosSchema = z.object({
226
+ x: z.number(),
227
+ y: z.number(),
228
+ z: z.number().optional()
229
+ });
230
+ var CAMERA_MODES = ["isometric", "perspective", "top-down", "follow", "chase"];
231
+ var CameraModeSchema = z.enum(CAMERA_MODES);
232
+ z.object({
233
+ pos: ScenePosSchema.optional(),
234
+ target: ScenePosSchema.optional(),
235
+ zoom: z.number().optional(),
236
+ fov: z.number().optional(),
237
+ mode: CameraModeSchema.optional()
238
+ });
270
239
 
271
240
  // src/types/entity.ts
272
241
  var EntityPersistenceSchema = z.enum([