@almadar/core 10.42.0 → 10.44.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 +4 -4
- package/dist/builders.js +45 -27
- package/dist/builders.js.map +1 -1
- package/dist/{effect-D4os99OL.d.ts → effect-NbTgX2yB.d.ts} +65 -110
- package/dist/{expression-DpAj1RzP.d.ts → expression-Yf7qvvOs.d.ts} +85 -10
- package/dist/factory/index.d.ts +5 -6
- package/dist/factory-runtime/index.d.ts +4 -4
- package/dist/factory-runtime/index.js +45 -27
- package/dist/factory-runtime/index.js.map +1 -1
- package/dist/index.d.ts +13 -13
- package/dist/index.js +270 -113
- package/dist/index.js.map +1 -1
- package/dist/mock/index.d.ts +4 -4
- package/dist/mock/index.js +1 -1
- package/dist/mock/index.js.map +1 -1
- package/dist/patterns/component-mapping.json +6 -1
- package/dist/patterns/event-contracts.json +1 -1
- package/dist/patterns/index.d.ts +276 -10
- package/dist/patterns/index.js +117 -6
- package/dist/patterns/index.js.map +1 -1
- package/dist/patterns/patterns-registry.json +109 -4
- package/dist/patterns/registry.json +109 -4
- package/dist/{schema-C_lv_cta.d.ts → schema-DdcBBHkb.d.ts} +7240 -3158
- package/dist/state-machine/index.d.ts +1 -1
- package/dist/{trait-BQIlqUHC.d.ts → trait-DdBiEffx.d.ts} +987 -98
- package/dist/types/index.d.ts +150 -50
- package/dist/types/index.js +154 -107
- package/dist/types/index.js.map +1 -1
- package/dist/{types-Bd_LX0j8.d.ts → types-B4NVh8V9.d.ts} +3 -2
- package/package.json +1 -1
- package/src/types/bindings.ts +79 -0
package/dist/builders.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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, P as PageRef, b as Page, c as PageRefObject } from './schema-
|
|
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-
|
|
4
|
-
import { S as SExpr } from './expression-
|
|
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-NbTgX2yB.js';
|
|
2
|
+
import { a as OrbitalDefinition, O as OrbitalSchema, U as UseDeclaration, E as EntityRef, P as PageRef, b as Page, c as PageRefObject } from './schema-DdcBBHkb.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-DdBiEffx.js';
|
|
4
|
+
import { S as SExpr } from './expression-Yf7qvvOs.js';
|
|
5
5
|
import 'zod';
|
|
6
6
|
|
|
7
7
|
/**
|
package/dist/builders.js
CHANGED
|
@@ -333,7 +333,7 @@ var OrbitalEntitySchema = z.object({
|
|
|
333
333
|
identity: z.boolean().optional(),
|
|
334
334
|
collection: z.string().optional(),
|
|
335
335
|
fields: z.array(EntityFieldSchema).min(1, "At least one field is required"),
|
|
336
|
-
instances: z.array(z.record(
|
|
336
|
+
instances: z.array(z.record(JsonValueSchema)).optional(),
|
|
337
337
|
timestamps: z.boolean().optional(),
|
|
338
338
|
softDelete: z.boolean().optional(),
|
|
339
339
|
description: z.string().optional(),
|
|
@@ -341,6 +341,29 @@ var OrbitalEntitySchema = z.object({
|
|
|
341
341
|
assetRef: SemanticAssetRefSchema.optional()
|
|
342
342
|
});
|
|
343
343
|
var EntitySchema = OrbitalEntitySchema;
|
|
344
|
+
var SExprDataSchema = z.lazy(
|
|
345
|
+
() => z.union([SExprAtomSchema, z.array(SExprDataSchema)])
|
|
346
|
+
);
|
|
347
|
+
var SExprAtomSchema = z.union([
|
|
348
|
+
z.string(),
|
|
349
|
+
z.number(),
|
|
350
|
+
z.boolean(),
|
|
351
|
+
z.null(),
|
|
352
|
+
z.record(SExprDataSchema)
|
|
353
|
+
// Objects for payload data
|
|
354
|
+
]);
|
|
355
|
+
var SExprSchema = z.lazy(
|
|
356
|
+
() => z.union([
|
|
357
|
+
SExprAtomSchema,
|
|
358
|
+
z.array(z.lazy(() => SExprSchema)).min(1).refine(
|
|
359
|
+
(arr) => typeof arr[0] === "string",
|
|
360
|
+
{ message: "S-expression array must have a string operator as first element" }
|
|
361
|
+
)
|
|
362
|
+
])
|
|
363
|
+
);
|
|
364
|
+
var ExpressionSchema = SExprSchema;
|
|
365
|
+
|
|
366
|
+
// src/types/effect.ts
|
|
344
367
|
var UI_SLOTS = [
|
|
345
368
|
// App slots
|
|
346
369
|
"main",
|
|
@@ -370,28 +393,10 @@ var UI_SLOTS = [
|
|
|
370
393
|
"overlay.pause"
|
|
371
394
|
];
|
|
372
395
|
z.enum(UI_SLOTS);
|
|
373
|
-
var EffectSchema = z.array(
|
|
396
|
+
var EffectSchema = z.array(SExprDataSchema).min(1).refine(
|
|
374
397
|
(arr) => typeof arr[0] === "string",
|
|
375
398
|
{ message: "Effect must be an S-expression with a string operator as first element" }
|
|
376
399
|
);
|
|
377
|
-
var SExprAtomSchema = z.union([
|
|
378
|
-
z.string(),
|
|
379
|
-
z.number(),
|
|
380
|
-
z.boolean(),
|
|
381
|
-
z.null(),
|
|
382
|
-
z.record(z.unknown())
|
|
383
|
-
// Objects for payload data
|
|
384
|
-
]);
|
|
385
|
-
var SExprSchema = z.lazy(
|
|
386
|
-
() => z.union([
|
|
387
|
-
SExprAtomSchema,
|
|
388
|
-
z.array(z.lazy(() => SExprSchema)).min(1).refine(
|
|
389
|
-
(arr) => typeof arr[0] === "string",
|
|
390
|
-
{ message: "S-expression array must have a string operator as first element" }
|
|
391
|
-
)
|
|
392
|
-
])
|
|
393
|
-
);
|
|
394
|
-
var ExpressionSchema = SExprSchema;
|
|
395
400
|
|
|
396
401
|
// src/types/state-machine.ts
|
|
397
402
|
var StateSchema = z.object({
|
|
@@ -651,12 +656,9 @@ var TraitReferenceSchema = z.object({
|
|
|
651
656
|
// through to the recursive TraitConfigValue union.
|
|
652
657
|
config: z.record(z.union([ConfigFieldDeclarationSchema, TraitConfigValueSchema])).optional(),
|
|
653
658
|
appliesTo: z.array(z.string()).optional(),
|
|
654
|
-
// Phase F.7:
|
|
655
|
-
//
|
|
656
|
-
|
|
657
|
-
// pasted in are already-resolved structured definitions, not nested
|
|
658
|
-
// overrides.
|
|
659
|
-
listens: z.array(z.unknown()).optional(),
|
|
659
|
+
// Phase F.7: caller-supplied listen entries are already-resolved
|
|
660
|
+
// structured definitions (see `TraitReference.listens`).
|
|
661
|
+
listens: z.array(TraitEventListenerSchema).optional(),
|
|
660
662
|
emitsScope: z.enum(["internal", "external"]).optional(),
|
|
661
663
|
// Phase F.8: per-transition effects override. The keys are event
|
|
662
664
|
// names (the transition triggers AFTER renames); values are SExpr
|
|
@@ -678,6 +680,22 @@ var TraitReferenceSchema = z.object({
|
|
|
678
680
|
path: ["events"]
|
|
679
681
|
}
|
|
680
682
|
);
|
|
683
|
+
var TraitUIBindingSchema = z.record(
|
|
684
|
+
z.object({
|
|
685
|
+
presentation: z.enum(["modal", "drawer", "popover", "inline", "confirm-dialog"]),
|
|
686
|
+
content: z.union([z.record(JsonValueSchema), z.array(z.record(JsonValueSchema))]),
|
|
687
|
+
props: z.object({
|
|
688
|
+
size: z.enum(["sm", "md", "lg", "xl", "full"]).optional(),
|
|
689
|
+
position: z.enum(["left", "right", "top", "bottom", "center"]).optional(),
|
|
690
|
+
title: z.string().optional(),
|
|
691
|
+
closable: z.boolean().optional(),
|
|
692
|
+
width: z.string().optional(),
|
|
693
|
+
showProgress: z.boolean().optional(),
|
|
694
|
+
step: z.number().optional(),
|
|
695
|
+
totalSteps: z.number().optional()
|
|
696
|
+
}).optional()
|
|
697
|
+
})
|
|
698
|
+
);
|
|
681
699
|
var TraitScopeSchema = z.enum(["instance", "collection"]);
|
|
682
700
|
var EntityFieldContractSchema = z.object({
|
|
683
701
|
requires: z.array(z.string()),
|
|
@@ -711,7 +729,7 @@ var TraitSchema = z.object({
|
|
|
711
729
|
ticks: z.array(TraitTickSchema).optional(),
|
|
712
730
|
emits: z.array(TraitEventContractSchema).optional(),
|
|
713
731
|
listens: z.array(TraitEventListenerSchema).optional(),
|
|
714
|
-
ui:
|
|
732
|
+
ui: TraitUIBindingSchema.optional(),
|
|
715
733
|
config: DeclaredTraitConfigSchema.optional(),
|
|
716
734
|
sourceBehavior: SourceBehaviorMetadataSchema.optional(),
|
|
717
735
|
sourceEntityDefinition: EntitySchema.optional()
|