@almadar/core 5.1.0 → 5.2.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 +5 -24
- package/dist/builders.js +56 -33
- package/dist/builders.js.map +1 -1
- package/dist/{compose-behaviors-vE2bU7TB.d.ts → compose-behaviors-BOy-gFQn.d.ts} +1 -1
- package/dist/domain-language/index.d.ts +1 -1
- package/dist/domain-language/index.js +56 -33
- package/dist/domain-language/index.js.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +62 -35
- package/dist/index.js.map +1 -1
- package/dist/{schema-CsX_xlhO.d.ts → schema-ks5fDpzp.d.ts} +4932 -3580
- package/dist/types/index.d.ts +36 -14
- package/dist/types/index.js +57 -34
- package/dist/types/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -3494,36 +3494,6 @@ var OrbitalEntitySchema = z.object({
|
|
|
3494
3494
|
assetRef: SemanticAssetRefSchema.optional()
|
|
3495
3495
|
});
|
|
3496
3496
|
var EntitySchema = OrbitalEntitySchema;
|
|
3497
|
-
var ViewTypeSchema = z.enum([
|
|
3498
|
-
"list",
|
|
3499
|
-
"detail",
|
|
3500
|
-
"create",
|
|
3501
|
-
"edit",
|
|
3502
|
-
"dashboard",
|
|
3503
|
-
"custom"
|
|
3504
|
-
]);
|
|
3505
|
-
var PageTraitRefSchema = z.object({
|
|
3506
|
-
ref: z.string().min(1, "Trait ref is required"),
|
|
3507
|
-
linkedEntity: z.string().optional(),
|
|
3508
|
-
config: z.record(z.unknown()).optional()
|
|
3509
|
-
});
|
|
3510
|
-
z.object({
|
|
3511
|
-
name: z.string().min(1, "Page name is required"),
|
|
3512
|
-
path: z.string().min(1, "Page path is required").startsWith("/", "Path must start with /"),
|
|
3513
|
-
primaryEntity: z.string().min(1, "Primary entity is required"),
|
|
3514
|
-
traits: z.array(PageTraitRefSchema).min(1, "Page must have at least one trait"),
|
|
3515
|
-
title: z.string().optional()
|
|
3516
|
-
}).strict();
|
|
3517
|
-
var OrbitalPageSchema = z.object({
|
|
3518
|
-
name: z.string().min(1, "Page name is required"),
|
|
3519
|
-
path: z.string().min(1, "Page path is required").startsWith("/", "Path must start with /"),
|
|
3520
|
-
viewType: ViewTypeSchema.optional(),
|
|
3521
|
-
title: z.string().optional(),
|
|
3522
|
-
primaryEntity: z.string().optional(),
|
|
3523
|
-
traits: z.array(PageTraitRefSchema).optional(),
|
|
3524
|
-
isInitial: z.boolean().optional()
|
|
3525
|
-
}).strict();
|
|
3526
|
-
var PageSchema = OrbitalPageSchema;
|
|
3527
3497
|
var UI_SLOTS = [
|
|
3528
3498
|
// App slots
|
|
3529
3499
|
"main",
|
|
@@ -3631,6 +3601,17 @@ var StateMachineSchema = z.object({
|
|
|
3631
3601
|
});
|
|
3632
3602
|
|
|
3633
3603
|
// src/types/trait.ts
|
|
3604
|
+
var TraitConfigValueSchema = z.lazy(
|
|
3605
|
+
() => z.union([
|
|
3606
|
+
z.string(),
|
|
3607
|
+
z.number(),
|
|
3608
|
+
z.boolean(),
|
|
3609
|
+
z.null(),
|
|
3610
|
+
z.array(TraitConfigValueSchema),
|
|
3611
|
+
z.record(TraitConfigValueSchema)
|
|
3612
|
+
])
|
|
3613
|
+
);
|
|
3614
|
+
var TraitConfigSchema = z.record(TraitConfigValueSchema);
|
|
3634
3615
|
var TraitCategorySchema = z.enum([
|
|
3635
3616
|
"lifecycle",
|
|
3636
3617
|
"temporal",
|
|
@@ -3703,12 +3684,22 @@ var TraitEventContractSchema = z.object({
|
|
|
3703
3684
|
payload: z.array(EventPayloadFieldSchema).optional(),
|
|
3704
3685
|
scope: EventScopeSchema.optional()
|
|
3705
3686
|
});
|
|
3687
|
+
var ListenSourceSchema = z.union([
|
|
3688
|
+
z.object({ kind: z.literal("any") }),
|
|
3689
|
+
z.object({ kind: z.literal("trait"), trait: z.string().min(1) }),
|
|
3690
|
+
z.object({
|
|
3691
|
+
kind: z.literal("orbital"),
|
|
3692
|
+
orbital: z.string().min(1),
|
|
3693
|
+
trait: z.string().min(1)
|
|
3694
|
+
})
|
|
3695
|
+
]);
|
|
3706
3696
|
var TraitEventListenerSchema = z.object({
|
|
3707
3697
|
event: z.string().min(1),
|
|
3708
3698
|
triggers: z.string().min(1),
|
|
3709
3699
|
guard: ExpressionSchema.optional(),
|
|
3710
3700
|
scope: EventScopeSchema.optional(),
|
|
3711
|
-
payloadMapping: z.record(z.string()).optional()
|
|
3701
|
+
payloadMapping: z.record(z.string()).optional(),
|
|
3702
|
+
source: ListenSourceSchema.optional()
|
|
3712
3703
|
});
|
|
3713
3704
|
var RequiredFieldSchema = z.object({
|
|
3714
3705
|
name: z.string().min(1),
|
|
@@ -3725,7 +3716,7 @@ z.object({
|
|
|
3725
3716
|
z.string().min(1, "events key (atom event name) must be non-empty"),
|
|
3726
3717
|
z.string().min(1, "events value (caller event name) must be non-empty")
|
|
3727
3718
|
).optional(),
|
|
3728
|
-
config:
|
|
3719
|
+
config: TraitConfigSchema.optional(),
|
|
3729
3720
|
appliesTo: z.array(z.string()).optional(),
|
|
3730
3721
|
// Phase F.7: zod accepts an array (the inliner validates element
|
|
3731
3722
|
// shape). The full ListenDefinition shape isn't recursively encoded
|
|
@@ -3776,7 +3767,7 @@ var TraitRefSchema = z.union([
|
|
|
3776
3767
|
z.string().min(1),
|
|
3777
3768
|
z.object({
|
|
3778
3769
|
ref: z.string().min(1),
|
|
3779
|
-
config:
|
|
3770
|
+
config: TraitConfigSchema.optional(),
|
|
3780
3771
|
linkedEntity: z.string().optional(),
|
|
3781
3772
|
name: z.string().optional(),
|
|
3782
3773
|
// Phase F.4: same non-empty refine as TraitReferenceSchema.events.
|
|
@@ -3802,6 +3793,38 @@ function getTraitName(traitRef) {
|
|
|
3802
3793
|
}
|
|
3803
3794
|
return traitRef.ref;
|
|
3804
3795
|
}
|
|
3796
|
+
|
|
3797
|
+
// src/types/page.ts
|
|
3798
|
+
var ViewTypeSchema = z.enum([
|
|
3799
|
+
"list",
|
|
3800
|
+
"detail",
|
|
3801
|
+
"create",
|
|
3802
|
+
"edit",
|
|
3803
|
+
"dashboard",
|
|
3804
|
+
"custom"
|
|
3805
|
+
]);
|
|
3806
|
+
var PageTraitRefSchema = z.object({
|
|
3807
|
+
ref: z.string().min(1, "Trait ref is required"),
|
|
3808
|
+
linkedEntity: z.string().optional(),
|
|
3809
|
+
config: TraitConfigSchema.optional()
|
|
3810
|
+
});
|
|
3811
|
+
z.object({
|
|
3812
|
+
name: z.string().min(1, "Page name is required"),
|
|
3813
|
+
path: z.string().min(1, "Page path is required").startsWith("/", "Path must start with /"),
|
|
3814
|
+
primaryEntity: z.string().min(1, "Primary entity is required"),
|
|
3815
|
+
traits: z.array(PageTraitRefSchema).min(1, "Page must have at least one trait"),
|
|
3816
|
+
title: z.string().optional()
|
|
3817
|
+
}).strict();
|
|
3818
|
+
var OrbitalPageSchema = z.object({
|
|
3819
|
+
name: z.string().min(1, "Page name is required"),
|
|
3820
|
+
path: z.string().min(1, "Page path is required").startsWith("/", "Path must start with /"),
|
|
3821
|
+
viewType: ViewTypeSchema.optional(),
|
|
3822
|
+
title: z.string().optional(),
|
|
3823
|
+
primaryEntity: z.string().optional(),
|
|
3824
|
+
traits: z.array(PageTraitRefSchema).optional(),
|
|
3825
|
+
isInitial: z.boolean().optional()
|
|
3826
|
+
}).strict();
|
|
3827
|
+
var PageSchema = OrbitalPageSchema;
|
|
3805
3828
|
z.enum([
|
|
3806
3829
|
"healthcare",
|
|
3807
3830
|
"education",
|