@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 { O as OrbitalSchema, a as OrbitalDefinition } from '../schema-Czlrw3bA.js';
2
- import { h as CallSiteConfig, i as CallSiteConfigEntry, g as Trait } from '../trait-DCmf5iRN.js';
3
- import { E as EntityField, a as EntityPersistence } from '../effect-BHaHSAvM.js';
1
+ import { O as OrbitalSchema, a as OrbitalDefinition } from '../schema-BG7mDO7m.js';
2
+ import { h as CallSiteConfig, i as CallSiteConfigEntry, g as Trait } from '../trait-jWk0BInU.js';
3
+ import { E as EntityField, a as EntityPersistence } from '../effect-CW3s399G.js';
4
4
  import { MakeTraitRefOpts } from '../builders.js';
5
5
  import '../expression-Fk8bQWef.js';
6
6
  import 'zod';
@@ -112,7 +112,9 @@ var FIELD_TYPES = [
112
112
  "slot",
113
113
  "pattern",
114
114
  "node",
115
- "event"
115
+ "event",
116
+ "scalar",
117
+ "union"
116
118
  ];
117
119
  z.enum(FIELD_TYPES);
118
120
  var RelationCardinalitySchema = z.enum([
@@ -208,12 +210,20 @@ var EntityFieldSchema = z.lazy(() => {
208
210
  scalarVariant("event"),
209
211
  scalarVariant("money"),
210
212
  scalarVariant("file"),
213
+ scalarVariant("scalar"),
211
214
  // Enum variant — REQUIRES non-empty values.
212
215
  z.object({
213
216
  ...baseFieldShape,
214
217
  type: z.literal("enum"),
215
218
  values: z.array(z.string()).min(1, "Enum field requires a non-empty `values` array")
216
219
  }),
220
+ // Union variant — tagged struct union; values = variant names,
221
+ // per-variant shapes in `properties` (absent on named recursion).
222
+ z.object({
223
+ ...baseFieldShape,
224
+ type: z.literal("union"),
225
+ values: z.array(z.string()).min(1, "Union field requires a non-empty `values` array")
226
+ }),
217
227
  // Relation variant — REQUIRES relation config.
218
228
  z.object({
219
229
  ...baseFieldShape,
@@ -256,8 +266,8 @@ var ASSET_DIMENSIONS = ["2d", "3d"];
256
266
  var AssetDimensionSchema = z.enum(ASSET_DIMENSIONS);
257
267
  var ASSET_ASPECTS = ["1:1", "16:9", "5:7", "8:1"];
258
268
  var AssetAspectSchema = z.enum(ASSET_ASPECTS);
259
- var ANIMATION_NAMES = ["idle", "walk", "attack", "hit", "death"];
260
- var AnimationNameSchema = z.enum(ANIMATION_NAMES);
269
+ var ANIMATION_NAMES = ["idle", "walk", "skate", "jump", "fall", "attack", "hit", "death"];
270
+ z.enum(ANIMATION_NAMES);
261
271
  var SPRITE_DIRECTIONS = ["se", "sw", "ne", "nw"];
262
272
  var SpriteDirectionSchema = z.enum(SPRITE_DIRECTIONS);
263
273
  var SHEET_PROJECTIONS = ["iso", "front", "back", "top", "perspective"];
@@ -277,7 +287,7 @@ z.object({
277
287
  rows: z.number().int().positive(),
278
288
  directions: z.array(SpriteDirectionSchema),
279
289
  sheets: z.record(SpriteDirectionSchema, z.string()),
280
- animations: z.record(AnimationNameSchema, AnimationDefSchema),
290
+ animations: z.record(z.string(), AnimationDefSchema),
281
291
  projections: z.object({
282
292
  iso: z.record(SpriteDirectionSchema, z.string()).optional(),
283
293
  front: z.string().optional(),
@@ -655,6 +665,7 @@ var TraitEventContractSchema = z.object({
655
665
  description: z.string().optional(),
656
666
  synonyms: z.string().optional(),
657
667
  tier: z.string().optional(),
668
+ definerKnob: z.string().optional(),
658
669
  payloadSchema: z.array(EventPayloadFieldSchema).optional(),
659
670
  scope: EventScopeSchema.optional()
660
671
  });