@almadar/core 10.77.0 → 10.79.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.
- package/dist/builders.d.ts +8 -3
- package/dist/builders.js +31 -6
- package/dist/builders.js.map +1 -1
- package/dist/{effect-BHaHSAvM.d.ts → effect-Mx_niZdY.d.ts} +62 -21
- package/dist/{entityAccess-CqqGrG-7.d.ts → entityAccess-C3_cjLNi.d.ts} +1 -1
- package/dist/factory/index.d.ts +41 -5
- package/dist/factory/index.js +52615 -1
- package/dist/factory/index.js.map +1 -1
- package/dist/factory-runtime/index.d.ts +3 -3
- package/dist/factory-runtime/index.js +31 -6
- package/dist/factory-runtime/index.js.map +1 -1
- package/dist/{index-B8ZQ8lo5.d.ts → index-B1N3gjT0.d.ts} +4 -4
- package/dist/index.d.ts +11 -11
- package/dist/index.js +4792 -749
- package/dist/index.js.map +1 -1
- package/dist/mock/index.d.ts +4 -4
- package/dist/mock/index.js +27 -4
- package/dist/mock/index.js.map +1 -1
- package/dist/patterns/component-mapping.json +1 -1
- package/dist/patterns/event-contracts.json +14 -1
- package/dist/patterns/index.d.ts +8460 -898
- package/dist/patterns/index.js +4140 -612
- package/dist/patterns/index.js.map +1 -1
- package/dist/patterns/patterns-registry.json +3966 -455
- package/dist/patterns/registry.json +3966 -455
- package/dist/{schema-Czlrw3bA.d.ts → schema-CkTuSx6F.d.ts} +5971 -5622
- package/dist/{trait-DCmf5iRN.d.ts → trait-B1fI0lTU.d.ts} +686 -568
- package/dist/types/index.d.ts +5 -5
- package/dist/types/index.js +29 -5
- package/dist/types/index.js.map +1 -1
- package/dist/{types-Cb51Jqxe.d.ts → types-B53Myv7U.d.ts} +41 -2
- package/package.json +1 -1
package/dist/mock/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { O as OrbitalSchema } from '../schema-
|
|
2
|
-
export { E as EntityAccessPolicies, e as entityAccessPolicies, a as entityAccessPoliciesByStoreKey, b as entityAccessTable } from '../entityAccess-
|
|
3
|
-
import { a as EntityPersistence, E as EntityField, F as FieldValue, f as EntityRow } from '../effect-
|
|
4
|
-
import '../trait-
|
|
1
|
+
import { O as OrbitalSchema } from '../schema-CkTuSx6F.js';
|
|
2
|
+
export { E as EntityAccessPolicies, e as entityAccessPolicies, a as entityAccessPoliciesByStoreKey, b as entityAccessTable } from '../entityAccess-C3_cjLNi.js';
|
|
3
|
+
import { a as EntityPersistence, E as EntityField, F as FieldValue, f as EntityRow } from '../effect-Mx_niZdY.js';
|
|
4
|
+
import '../trait-B1fI0lTU.js';
|
|
5
5
|
import '../expression-Fk8bQWef.js';
|
|
6
6
|
import 'zod';
|
|
7
7
|
|
package/dist/mock/index.js
CHANGED
|
@@ -396,7 +396,9 @@ var FIELD_TYPES = [
|
|
|
396
396
|
"slot",
|
|
397
397
|
"pattern",
|
|
398
398
|
"node",
|
|
399
|
-
"event"
|
|
399
|
+
"event",
|
|
400
|
+
"scalar",
|
|
401
|
+
"union"
|
|
400
402
|
];
|
|
401
403
|
z.enum(FIELD_TYPES);
|
|
402
404
|
var RelationCardinalitySchema = z.enum([
|
|
@@ -492,12 +494,20 @@ var EntityFieldSchema = z.lazy(() => {
|
|
|
492
494
|
scalarVariant("event"),
|
|
493
495
|
scalarVariant("money"),
|
|
494
496
|
scalarVariant("file"),
|
|
497
|
+
scalarVariant("scalar"),
|
|
495
498
|
// Enum variant — REQUIRES non-empty values.
|
|
496
499
|
z.object({
|
|
497
500
|
...baseFieldShape,
|
|
498
501
|
type: z.literal("enum"),
|
|
499
502
|
values: z.array(z.string()).min(1, "Enum field requires a non-empty `values` array")
|
|
500
503
|
}),
|
|
504
|
+
// Union variant — tagged struct union; values = variant names,
|
|
505
|
+
// per-variant shapes in `properties` (absent on named recursion).
|
|
506
|
+
z.object({
|
|
507
|
+
...baseFieldShape,
|
|
508
|
+
type: z.literal("union"),
|
|
509
|
+
values: z.array(z.string()).min(1, "Union field requires a non-empty `values` array")
|
|
510
|
+
}),
|
|
501
511
|
// Relation variant — REQUIRES relation config.
|
|
502
512
|
z.object({
|
|
503
513
|
...baseFieldShape,
|
|
@@ -540,8 +550,8 @@ var ASSET_DIMENSIONS = ["2d", "3d"];
|
|
|
540
550
|
var AssetDimensionSchema = z.enum(ASSET_DIMENSIONS);
|
|
541
551
|
var ASSET_ASPECTS = ["1:1", "16:9", "5:7", "8:1"];
|
|
542
552
|
var AssetAspectSchema = z.enum(ASSET_ASPECTS);
|
|
543
|
-
var ANIMATION_NAMES = ["idle", "walk", "attack", "hit", "death"];
|
|
544
|
-
|
|
553
|
+
var ANIMATION_NAMES = ["idle", "walk", "skate", "jump", "fall", "attack", "hit", "death"];
|
|
554
|
+
z.enum(ANIMATION_NAMES);
|
|
545
555
|
var SPRITE_DIRECTIONS = ["se", "sw", "ne", "nw"];
|
|
546
556
|
var SpriteDirectionSchema = z.enum(SPRITE_DIRECTIONS);
|
|
547
557
|
var SHEET_PROJECTIONS = ["iso", "front", "back", "top", "perspective"];
|
|
@@ -561,7 +571,7 @@ z.object({
|
|
|
561
571
|
rows: z.number().int().positive(),
|
|
562
572
|
directions: z.array(SpriteDirectionSchema),
|
|
563
573
|
sheets: z.record(SpriteDirectionSchema, z.string()),
|
|
564
|
-
animations: z.record(
|
|
574
|
+
animations: z.record(z.string(), AnimationDefSchema),
|
|
565
575
|
projections: z.object({
|
|
566
576
|
iso: z.record(SpriteDirectionSchema, z.string()).optional(),
|
|
567
577
|
front: z.string().optional(),
|
|
@@ -748,6 +758,7 @@ function indexUuid(index) {
|
|
|
748
758
|
return `00000000-0000-4000-8000-${index.toString(16).padStart(12, "0").slice(-12)}`;
|
|
749
759
|
}
|
|
750
760
|
function declaredValues(field) {
|
|
761
|
+
if (field.type === "union") return void 0;
|
|
751
762
|
const values = "values" in field ? field.values : void 0;
|
|
752
763
|
return values && values.length > 0 ? values : void 0;
|
|
753
764
|
}
|
|
@@ -811,6 +822,16 @@ function sampleObject(field, ctx) {
|
|
|
811
822
|
}
|
|
812
823
|
return out;
|
|
813
824
|
}
|
|
825
|
+
function sampleUnion(field, ctx) {
|
|
826
|
+
const depth = ctx.depth ?? 0;
|
|
827
|
+
if (!field.properties || field.values.length === 0 || depth >= MAX_NESTED_DEPTH) {
|
|
828
|
+
return void 0;
|
|
829
|
+
}
|
|
830
|
+
const firstVariant = field.properties[field.values[0]];
|
|
831
|
+
if (!firstVariant) return void 0;
|
|
832
|
+
const child = { ...firstVariant, name: field.name };
|
|
833
|
+
return sampleFieldValue(child, { ...ctx, depth: depth + 1 });
|
|
834
|
+
}
|
|
814
835
|
function sampleFieldValue(field, ctx) {
|
|
815
836
|
const honoredDefault = field.default !== void 0 && isFieldValue(field.default) ? field.default : void 0;
|
|
816
837
|
if (field.intrinsic === true) return honoredDefault;
|
|
@@ -882,6 +903,8 @@ function sampleFieldValue(field, ctx) {
|
|
|
882
903
|
return sampleArray(field, ctx);
|
|
883
904
|
case "object":
|
|
884
905
|
return sampleObject(field, ctx);
|
|
906
|
+
case "union":
|
|
907
|
+
return sampleUnion(field, ctx);
|
|
885
908
|
case "trait":
|
|
886
909
|
case "slot":
|
|
887
910
|
case "pattern":
|