@almadar/core 10.28.0 → 10.29.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-BN3WLFYM.d.ts → builders-DcBjE_Uw.d.ts} +308 -2306
- package/dist/builders.d.ts +4 -4
- package/dist/builders.js +23 -7
- package/dist/builders.js.map +1 -1
- package/dist/{expression-C6X4A8L7.d.ts → expression-CB9R3KWk.d.ts} +4 -1
- package/dist/factory/index.d.ts +5 -5
- package/dist/factory-runtime/index.d.ts +21 -5
- package/dist/factory-runtime/index.js +85 -9
- package/dist/factory-runtime/index.js.map +1 -1
- package/dist/index.d.ts +50 -10
- package/dist/index.js +631 -24
- package/dist/index.js.map +1 -1
- package/dist/pattern-types-JZordBZv.d.ts +4635 -0
- package/dist/patterns/component-mapping.json +1 -1
- package/dist/patterns/event-contracts.json +1 -1
- package/dist/patterns/index.d.ts +1003 -24
- package/dist/patterns/index.js +460 -13
- package/dist/patterns/index.js.map +1 -1
- package/dist/patterns/patterns-registry.json +458 -11
- package/dist/patterns/registry.json +458 -11
- package/dist/state-machine/index.d.ts +1 -1
- package/dist/{trait-DZkS625T.d.ts → trait-B_CzfDSi.d.ts} +187 -643
- package/dist/types/index.d.ts +17 -12
- package/dist/types/index.js +69 -12
- package/dist/types/index.js.map +1 -1
- package/dist/{types-DFn3sWpV.d.ts → types-CGC5A1-T.d.ts} +45 -2
- package/package.json +1 -1
- package/src/types/bindings.ts +8 -2
- package/dist/pattern-types-BeQXwgpZ.d.ts +0 -4584
package/dist/builders.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import './pattern-types-
|
|
2
|
-
export { i as ComposeBehaviorsInput, j as ComposeBehaviorsResult, c7 as ComposeConnection, c8 as ComposePage, a6 as EventWiringEntry, aq as LayoutStrategy, c9 as MakeAtomOrbitalOpts, ca as MakeAtomOrbitalTraitOverrides, cb as MakeEntityOpts, cc as MakeLayoutTraitOpts, cd as MakeOrbitalWithUsesOpts, ce as MakePageOpts, cf as MakePageRefOpts, cg as MakePageRefOptsTyped, M as MakeTraitRefOpts, ch as MakeTraitRefOptsTyped, bS as applyEventWiring, ci as applyTraitConfigOverrides, cj as compose, bT as composeBehaviors, ck as connect, bU as detectLayoutStrategy, cl as ensureIdField, cm as extractTrait, cn as makeAtomOrbital, co as makeEntity, cp as makeLayoutTrait, cq as makeOrbital, cr as makeOrbitalWithUses, cs as makePage, ct as makePageRef, cu as makeRenderUI, cv as makeSchema, cw as makeSlot, cx as makeTraitRef, cy as mergeOrbitals, cz as pipe, cA as plural, cB as wire } from './builders-
|
|
3
|
-
import './trait-
|
|
4
|
-
import './expression-
|
|
1
|
+
import './pattern-types-JZordBZv.js';
|
|
2
|
+
export { i as ComposeBehaviorsInput, j as ComposeBehaviorsResult, c7 as ComposeConnection, c8 as ComposePage, a6 as EventWiringEntry, aq as LayoutStrategy, c9 as MakeAtomOrbitalOpts, ca as MakeAtomOrbitalTraitOverrides, cb as MakeEntityOpts, cc as MakeLayoutTraitOpts, cd as MakeOrbitalWithUsesOpts, ce as MakePageOpts, cf as MakePageRefOpts, cg as MakePageRefOptsTyped, M as MakeTraitRefOpts, ch as MakeTraitRefOptsTyped, bS as applyEventWiring, ci as applyTraitConfigOverrides, cj as compose, bT as composeBehaviors, ck as connect, bU as detectLayoutStrategy, cl as ensureIdField, cm as extractTrait, cn as makeAtomOrbital, co as makeEntity, cp as makeLayoutTrait, cq as makeOrbital, cr as makeOrbitalWithUses, cs as makePage, ct as makePageRef, cu as makeRenderUI, cv as makeSchema, cw as makeSlot, cx as makeTraitRef, cy as mergeOrbitals, cz as pipe, cA as plural, cB as wire } from './builders-DcBjE_Uw.js';
|
|
3
|
+
import './trait-B_CzfDSi.js';
|
|
4
|
+
import './expression-CB9R3KWk.js';
|
|
5
5
|
import 'zod';
|
package/dist/builders.js
CHANGED
|
@@ -321,7 +321,8 @@ var StateSchema = z.object({
|
|
|
321
321
|
var PayloadFieldSchema = z.object({
|
|
322
322
|
name: z.string().min(1),
|
|
323
323
|
type: z.string().min(1),
|
|
324
|
-
required: z.boolean().optional()
|
|
324
|
+
required: z.boolean().optional(),
|
|
325
|
+
properties: z.lazy(() => z.array(PayloadFieldSchema)).optional()
|
|
325
326
|
});
|
|
326
327
|
var EventSchema = z.object({
|
|
327
328
|
key: z.string().min(1, "Event key is required"),
|
|
@@ -368,14 +369,24 @@ var TraitConfigSchema = z.record(TraitConfigValueSchema);
|
|
|
368
369
|
function isCallSiteConfigDeclaration(entry) {
|
|
369
370
|
return typeof entry === "object" && entry !== null && !Array.isArray(entry) && "type" in entry && typeof entry.type === "string" && "default" in entry;
|
|
370
371
|
}
|
|
372
|
+
var ConfigFieldItemsDeclarationSchema = z.lazy(
|
|
373
|
+
() => z.object({
|
|
374
|
+
type: z.string().optional(),
|
|
375
|
+
properties: z.record(TraitEntityFieldSchema).optional(),
|
|
376
|
+
items: ConfigFieldItemsDeclarationSchema.optional()
|
|
377
|
+
})
|
|
378
|
+
);
|
|
371
379
|
var ConfigFieldDeclarationSchema = z.object({
|
|
372
380
|
type: z.string(),
|
|
373
381
|
default: TraitConfigValueSchema.optional(),
|
|
382
|
+
required: z.boolean().optional(),
|
|
374
383
|
label: z.string().optional(),
|
|
375
384
|
description: z.string().optional(),
|
|
376
385
|
tier: z.string().optional(),
|
|
377
386
|
values: z.array(z.string()).optional(),
|
|
378
|
-
synonyms: z.string().optional()
|
|
387
|
+
synonyms: z.string().optional(),
|
|
388
|
+
items: ConfigFieldItemsDeclarationSchema.optional(),
|
|
389
|
+
properties: z.lazy(() => z.record(TraitEntityFieldSchema)).optional()
|
|
379
390
|
});
|
|
380
391
|
var DeclaredTraitConfigSchema = z.record(
|
|
381
392
|
ConfigFieldDeclarationSchema
|
|
@@ -412,7 +423,9 @@ var TraitEntityFieldSchema = z.object({
|
|
|
412
423
|
]),
|
|
413
424
|
required: z.boolean().optional(),
|
|
414
425
|
default: z.unknown().optional(),
|
|
415
|
-
values: z.array(z.string()).optional()
|
|
426
|
+
values: z.array(z.string()).optional(),
|
|
427
|
+
items: ConfigFieldItemsDeclarationSchema.optional(),
|
|
428
|
+
properties: z.lazy(() => z.record(TraitEntityFieldSchema)).optional()
|
|
416
429
|
});
|
|
417
430
|
var TraitDataEntitySchema = z.object({
|
|
418
431
|
name: z.string().min(1),
|
|
@@ -451,7 +464,8 @@ var EventPayloadFieldSchema = z.object({
|
|
|
451
464
|
type: z.string().min(1),
|
|
452
465
|
required: z.boolean().optional(),
|
|
453
466
|
description: z.string().optional(),
|
|
454
|
-
entityType: z.string().optional()
|
|
467
|
+
entityType: z.string().optional(),
|
|
468
|
+
properties: z.lazy(() => z.array(EventPayloadFieldSchema)).optional()
|
|
455
469
|
});
|
|
456
470
|
var TraitEventContractSchema = z.object({
|
|
457
471
|
/**
|
|
@@ -459,11 +473,13 @@ var TraitEventContractSchema = z.object({
|
|
|
459
473
|
* starts with a letter, then any letters / digits / underscores. Both
|
|
460
474
|
* UPPER_SNAKE_CASE and PascalCase shapes are valid identifiers in the
|
|
461
475
|
* post-Phase 2.5 nominal-event type system (events declared via
|
|
462
|
-
* `type X = Event<T>`).
|
|
476
|
+
* `type X = Event<T>`). A pre-resolution `@config.<knob>` reference
|
|
477
|
+
* (Option B) is also legal — inline/resolve substitutes it with the
|
|
478
|
+
* knob's effective literal before codegen/runtime consume it.
|
|
463
479
|
*/
|
|
464
480
|
event: z.string().min(1).regex(
|
|
465
|
-
/^[A-Za-z][A-Za-z0-9_]
|
|
466
|
-
"Event name must start with a letter and contain only letters, digits, and underscores"
|
|
481
|
+
/^([A-Za-z][A-Za-z0-9_]*|@config\.[A-Za-z_][A-Za-z0-9_]*)$/,
|
|
482
|
+
"Event name must start with a letter and contain only letters, digits, and underscores, or be a `@config.<knob>` reference"
|
|
467
483
|
),
|
|
468
484
|
description: z.string().optional(),
|
|
469
485
|
synonyms: z.string().optional(),
|