@almadar/core 10.77.0 → 10.78.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,6 +1,6 @@
1
- import { I as IdentityLedger, A as AnyPatternConfig, U as UISlot, c as Effect, h as RenderBinding, i as RenderUIEffect, d as EntityId, e as Entity, E as EntityField, a as EntityPersistence, f as EntityRow } from './effect-BHaHSAvM.js';
2
- import { a as OrbitalDefinition, O as OrbitalSchema, U as UseDeclaration, E as EntityRef, b as ExpectDeclaration, P as PageRef, c as Page, d as PageRefObject } from './schema-Czlrw3bA.js';
3
- import { b as TraitConfig, g as Trait, T as TraitEventListener, h as CallSiteConfig, j as TraitEventContract, d as TraitRef, a as TraitReference } from './trait-DCmf5iRN.js';
1
+ import { I as IdentityLedger, A as AnyPatternConfig, U as UISlot, c as Effect, h as RenderBinding, i as RenderUIEffect, d as EntityId, e as Entity, E as EntityField, a as EntityPersistence, f as EntityRow } from './effect-CW3s399G.js';
2
+ import { a as OrbitalDefinition, O as OrbitalSchema, U as UseDeclaration, E as EntityRef, b as ExpectDeclaration, P as PageRef, c as Page, d as PageRefObject } from './schema-BG7mDO7m.js';
3
+ import { b as TraitConfig, g as Trait, T as TraitEventListener, h as CallSiteConfig, j as TraitEventContract, d as TraitRef, a as TraitReference } from './trait-jWk0BInU.js';
4
4
  import { S as SExpr } from './expression-Fk8bQWef.js';
5
5
  import 'zod';
6
6
 
package/dist/builders.js CHANGED
@@ -102,7 +102,9 @@ var FIELD_TYPES = [
102
102
  "slot",
103
103
  "pattern",
104
104
  "node",
105
- "event"
105
+ "event",
106
+ "scalar",
107
+ "union"
106
108
  ];
107
109
  z.enum(FIELD_TYPES);
108
110
  var RelationCardinalitySchema = z.enum([
@@ -198,12 +200,20 @@ var EntityFieldSchema = z.lazy(() => {
198
200
  scalarVariant("event"),
199
201
  scalarVariant("money"),
200
202
  scalarVariant("file"),
203
+ scalarVariant("scalar"),
201
204
  // Enum variant — REQUIRES non-empty values.
202
205
  z.object({
203
206
  ...baseFieldShape,
204
207
  type: z.literal("enum"),
205
208
  values: z.array(z.string()).min(1, "Enum field requires a non-empty `values` array")
206
209
  }),
210
+ // Union variant — tagged struct union; values = variant names,
211
+ // per-variant shapes in `properties` (absent on named recursion).
212
+ z.object({
213
+ ...baseFieldShape,
214
+ type: z.literal("union"),
215
+ values: z.array(z.string()).min(1, "Union field requires a non-empty `values` array")
216
+ }),
207
217
  // Relation variant — REQUIRES relation config.
208
218
  z.object({
209
219
  ...baseFieldShape,
@@ -246,8 +256,8 @@ var ASSET_DIMENSIONS = ["2d", "3d"];
246
256
  var AssetDimensionSchema = z.enum(ASSET_DIMENSIONS);
247
257
  var ASSET_ASPECTS = ["1:1", "16:9", "5:7", "8:1"];
248
258
  var AssetAspectSchema = z.enum(ASSET_ASPECTS);
249
- var ANIMATION_NAMES = ["idle", "walk", "attack", "hit", "death"];
250
- var AnimationNameSchema = z.enum(ANIMATION_NAMES);
259
+ var ANIMATION_NAMES = ["idle", "walk", "skate", "jump", "fall", "attack", "hit", "death"];
260
+ z.enum(ANIMATION_NAMES);
251
261
  var SPRITE_DIRECTIONS = ["se", "sw", "ne", "nw"];
252
262
  var SpriteDirectionSchema = z.enum(SPRITE_DIRECTIONS);
253
263
  var SHEET_PROJECTIONS = ["iso", "front", "back", "top", "perspective"];
@@ -267,7 +277,7 @@ z.object({
267
277
  rows: z.number().int().positive(),
268
278
  directions: z.array(SpriteDirectionSchema),
269
279
  sheets: z.record(SpriteDirectionSchema, z.string()),
270
- animations: z.record(AnimationNameSchema, AnimationDefSchema),
280
+ animations: z.record(z.string(), AnimationDefSchema),
271
281
  projections: z.object({
272
282
  iso: z.record(SpriteDirectionSchema, z.string()).optional(),
273
283
  front: z.string().optional(),
@@ -642,6 +652,7 @@ var TraitEventContractSchema = z.object({
642
652
  description: z.string().optional(),
643
653
  synonyms: z.string().optional(),
644
654
  tier: z.string().optional(),
655
+ definerKnob: z.string().optional(),
645
656
  payloadSchema: z.array(EventPayloadFieldSchema).optional(),
646
657
  scope: EventScopeSchema.optional()
647
658
  });