@almadar/core 10.78.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 +16 -2
- package/dist/builders.js.map +1 -1
- package/dist/{effect-CW3s399G.d.ts → effect-Mx_niZdY.d.ts} +1 -1
- package/dist/{entityAccess-B-CK9j-I.d.ts → entityAccess-C3_cjLNi.d.ts} +1 -1
- package/dist/factory/index.d.ts +4 -4
- package/dist/factory/index.js +211 -76
- package/dist/factory/index.js.map +1 -1
- package/dist/factory-runtime/index.d.ts +3 -3
- package/dist/factory-runtime/index.js +16 -2
- package/dist/factory-runtime/index.js.map +1 -1
- package/dist/{index-C5Firrg9.d.ts → index-B1N3gjT0.d.ts} +4 -4
- package/dist/index.d.ts +10 -10
- package/dist/index.js +243 -85
- package/dist/index.js.map +1 -1
- package/dist/mock/index.d.ts +4 -4
- package/dist/mock/index.js +13 -0
- package/dist/mock/index.js.map +1 -1
- package/dist/patterns/component-mapping.json +1 -1
- package/dist/patterns/event-contracts.json +1 -1
- package/dist/patterns/index.d.ts +440 -143
- package/dist/patterns/index.js +219 -80
- package/dist/patterns/index.js.map +1 -1
- package/dist/patterns/patterns-registry.json +212 -77
- package/dist/patterns/registry.json +212 -77
- package/dist/{schema-BG7mDO7m.d.ts → schema-CkTuSx6F.d.ts} +265 -2
- package/dist/{trait-jWk0BInU.d.ts → trait-B1fI0lTU.d.ts} +90 -2
- package/dist/types/index.d.ts +5 -5
- package/dist/types/index.js +15 -2
- package/dist/types/index.js.map +1 -1
- package/dist/{types-DwAE_Qu-.d.ts → types-B53Myv7U.d.ts} +2 -2
- package/package.json +1 -1
package/dist/builders.d.ts
CHANGED
|
@@ -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-
|
|
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-
|
|
3
|
-
import { b as TraitConfig,
|
|
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-Mx_niZdY.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-CkTuSx6F.js';
|
|
3
|
+
import { b as TraitConfig, h as Trait, T as TraitEventListener, i as CallSiteConfig, k as TraitEventContract, d as TraitRef, a as TraitReference } from './trait-B1fI0lTU.js';
|
|
4
4
|
import { S as SExpr } from './expression-Fk8bQWef.js';
|
|
5
5
|
import 'zod';
|
|
6
6
|
|
|
@@ -356,6 +356,11 @@ interface MakeTraitRefOpts {
|
|
|
356
356
|
linkedEntityId?: EntityId;
|
|
357
357
|
/** Per-key rename map, e.g. `{ OPEN: "ADD_ITEM" }`. */
|
|
358
358
|
events?: Record<string, string>;
|
|
359
|
+
/**
|
|
360
|
+
* 3-II trait type-parameter arguments (`:: p SomeType`): declared-param
|
|
361
|
+
* name → type-vocabulary name. Mirrors {@link TraitReference.typeArgs}.
|
|
362
|
+
*/
|
|
363
|
+
typeArgs?: Record<string, string>;
|
|
359
364
|
/**
|
|
360
365
|
* Entity-field remap, e.g. `{ name: "title", folder: "parentId" }`. Rewrites
|
|
361
366
|
* the inlined trait's canonical `@entity.X` / `@payload.row.X` references to
|
package/dist/builders.js
CHANGED
|
@@ -653,6 +653,7 @@ var TraitEventContractSchema = z.object({
|
|
|
653
653
|
synonyms: z.string().optional(),
|
|
654
654
|
tier: z.string().optional(),
|
|
655
655
|
definerKnob: z.string().optional(),
|
|
656
|
+
scopeOverridden: z.boolean().optional(),
|
|
656
657
|
payloadSchema: z.array(EventPayloadFieldSchema).optional(),
|
|
657
658
|
scope: EventScopeSchema.optional()
|
|
658
659
|
});
|
|
@@ -706,6 +707,11 @@ var TraitReferenceSchema = z.object({
|
|
|
706
707
|
z.string().min(1, "events value (caller event name) must be non-empty")
|
|
707
708
|
).optional(),
|
|
708
709
|
eventIds: z.record(z.string().min(1), EventIdSchema).optional(),
|
|
710
|
+
// 3-II type-parameter arguments (see `TraitReference.typeArgs`).
|
|
711
|
+
typeArgs: z.record(
|
|
712
|
+
z.string().min(1, "typeArgs key (declared param name) must be non-empty"),
|
|
713
|
+
z.string().min(1, "typeArgs value (type name) must be non-empty")
|
|
714
|
+
).optional(),
|
|
709
715
|
fields: z.record(
|
|
710
716
|
z.string().min(1, "fields key (canonical field name) must be non-empty"),
|
|
711
717
|
z.string().min(1, "fields value (consumer field name) must be non-empty")
|
|
@@ -766,6 +772,11 @@ var SourceBehaviorMetadataSchema = z.object({
|
|
|
766
772
|
alias: z.string().min(1),
|
|
767
773
|
originalName: z.string().min(1)
|
|
768
774
|
});
|
|
775
|
+
var TraitTypeParamDefSchema = z.object({
|
|
776
|
+
name: z.string().min(1),
|
|
777
|
+
kind: z.string().min(1),
|
|
778
|
+
default: z.string().optional()
|
|
779
|
+
});
|
|
769
780
|
var TraitSchema = z.object({
|
|
770
781
|
id: TraitIdSchema.optional(),
|
|
771
782
|
name: z.string().min(1),
|
|
@@ -792,7 +803,8 @@ var TraitSchema = z.object({
|
|
|
792
803
|
ui: TraitUIBindingSchema.optional(),
|
|
793
804
|
config: DeclaredTraitConfigSchema.optional(),
|
|
794
805
|
sourceBehavior: SourceBehaviorMetadataSchema.optional(),
|
|
795
|
-
sourceEntityDefinition: EntitySchema.optional()
|
|
806
|
+
sourceEntityDefinition: EntitySchema.optional(),
|
|
807
|
+
typeParams: z.array(TraitTypeParamDefSchema).optional()
|
|
796
808
|
});
|
|
797
809
|
var TraitRefSchema = z.union([
|
|
798
810
|
z.string().min(1),
|
|
@@ -1447,7 +1459,8 @@ z.object({
|
|
|
1447
1459
|
// Context fields - persisted throughout orbital lifecycle
|
|
1448
1460
|
domainContext: DomainContextSchema.optional(),
|
|
1449
1461
|
design: DesignPreferencesSchema.optional(),
|
|
1450
|
-
suggestedGuards: z.array(SuggestedGuardSchema).optional()
|
|
1462
|
+
suggestedGuards: z.array(SuggestedGuardSchema).optional(),
|
|
1463
|
+
types: z.record(z.string(), z.array(EventPayloadFieldSchema)).optional()
|
|
1451
1464
|
});
|
|
1452
1465
|
|
|
1453
1466
|
// src/builders/apply-config-overrides.ts
|
|
@@ -1860,6 +1873,7 @@ function makeTraitRef(opts) {
|
|
|
1860
1873
|
if (opts.linkedEntity !== void 0) ref.linkedEntity = opts.linkedEntity;
|
|
1861
1874
|
if (opts.linkedEntityId !== void 0) ref.linkedEntityId = opts.linkedEntityId;
|
|
1862
1875
|
if (opts.events !== void 0) ref.events = opts.events;
|
|
1876
|
+
if (opts.typeArgs !== void 0) ref.typeArgs = opts.typeArgs;
|
|
1863
1877
|
if (opts.fields !== void 0) ref.fields = opts.fields;
|
|
1864
1878
|
if (opts.effects !== void 0) ref.effects = opts.effects;
|
|
1865
1879
|
if (opts.listens !== void 0) ref.listens = opts.listens;
|