@almadar/core 10.27.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-CeDAKf9u.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-CSaCYNJl.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-BFgbJ7BM.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-CEZfJqGr.d.ts +0 -4584
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as EntityField, a as EntityPersistence, R as RelationConfig } from './pattern-types-
|
|
2
|
-
import { T as TraitEventListener, a as TraitReference } from './trait-
|
|
1
|
+
import { E as EntityField, a as EntityPersistence, R as RelationConfig } from './pattern-types-JZordBZv.js';
|
|
2
|
+
import { T as TraitEventListener, a as TraitReference } from './trait-B_CzfDSi.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Cross-cutting presentation knobs that don't live per orbital
|
|
@@ -219,6 +219,14 @@ interface FactoryConfigParam {
|
|
|
219
219
|
/** Key name as advertised by the trait. Matches the override path
|
|
220
220
|
* `traitOverrides.<traitName>.config.<key>`. */
|
|
221
221
|
key: string;
|
|
222
|
+
/** True when the atom's own state machine consumes this config value in
|
|
223
|
+
* an entity position (`['persist', op, '@config.<key>', …]` or
|
|
224
|
+
* `['fetch', '@config.<key>', …]`) — the value IS an entity name.
|
|
225
|
+
* Source-derived at signature extraction, never authored. Consumers
|
|
226
|
+
* threading a `params.entityName` rename must rewrite every
|
|
227
|
+
* entityRef-marked value equal to the renamed entity, or the baked
|
|
228
|
+
* default dangles against an entity that no longer exists. */
|
|
229
|
+
entityRef?: boolean;
|
|
222
230
|
/** Type tag lifted from the `.lolo` config declaration. Drives the
|
|
223
231
|
* question widget selection. Free-form to admit array/object
|
|
224
232
|
* brackets (`[object]`, `[string]`) and atom-defined custom tags. */
|
|
@@ -305,6 +313,19 @@ interface FactoryTraitSignature {
|
|
|
305
313
|
emittedEvents: ReadonlyArray<string>;
|
|
306
314
|
/** Event keys this trait listens for. */
|
|
307
315
|
listenedEvents: ReadonlyArray<string>;
|
|
316
|
+
/** Event keys the trait's own state machine transitions on
|
|
317
|
+
* (`stateMachine.transitions[].event`, post-rename) — the only valid
|
|
318
|
+
* `listens[].triggers` targets (ORB_X_LISTEN_TRIGGER_UNMATCHED
|
|
319
|
+
* otherwise). Present when the source trait carries a state machine
|
|
320
|
+
* (directly or inherited from its upstream atom); an EMPTY array means
|
|
321
|
+
* the trait is render-only and cannot accept a listens entry at all.
|
|
322
|
+
* Absent = topology unknown (legacy catalogs). */
|
|
323
|
+
transitionEvents?: ReadonlyArray<string>;
|
|
324
|
+
/** Call-site `events` rename map (old → new) authored on the trait ref.
|
|
325
|
+
* Renames rewrite the upstream atom's transition triggers, so catalog
|
|
326
|
+
* inheritance projects the atom's `transitionEvents` through this map
|
|
327
|
+
* before stamping them on the call site. */
|
|
328
|
+
eventRenames?: Readonly<Record<string, string>>;
|
|
308
329
|
/** Structured emit + listen events with their `@description`/`@synonyms`/`@tier`
|
|
309
330
|
* annotations. Parallel to `emittedEvents`/`listenedEvents` (kept as bare-key
|
|
310
331
|
* back-compat); the curation event matcher reads this. */
|
|
@@ -437,6 +458,28 @@ interface FactorySignature {
|
|
|
437
458
|
* (`computeSubstrateSignature`); recomputed every generation run.
|
|
438
459
|
*/
|
|
439
460
|
substrateSignature?: string;
|
|
461
|
+
/**
|
|
462
|
+
* Organism-only dispatch smoke test. Stamped by pattern-sync gen-ts;
|
|
463
|
+
* `true` when the organism's factory dispatch with default params
|
|
464
|
+
* round-trips `orb resolve` clean. `false` = not factory ready (excluded
|
|
465
|
+
* from HIT retrieval; stays compose-palette if palette-exposed).
|
|
466
|
+
* Undefined = not yet swept (legacy catalogs).
|
|
467
|
+
*/
|
|
468
|
+
factoryReady?: boolean;
|
|
469
|
+
/** Resolve/validate error strings when `factoryReady` is `false`. */
|
|
470
|
+
readinessErrors?: ReadonlyArray<string>;
|
|
471
|
+
/**
|
|
472
|
+
* Tier-agnostic (atoms/molecules/organisms alike). Stamped by
|
|
473
|
+
* pattern-sync gen-ts for every behavior entry: `true` when the
|
|
474
|
+
* registry `.orb` passes `orb validate` + `orb resolve` at bake time.
|
|
475
|
+
* `false` = source-broken (excluded from retrieval regardless of tier).
|
|
476
|
+
* Undefined = not yet swept (legacy catalogs). Distinct from
|
|
477
|
+
* `factoryReady`, which additionally requires an organism-level
|
|
478
|
+
* dispatch smoke test.
|
|
479
|
+
*/
|
|
480
|
+
sourceValid?: boolean;
|
|
481
|
+
/** `orb validate`/`orb resolve` error strings when `sourceValid` is `false`. */
|
|
482
|
+
sourceErrors?: ReadonlyArray<string>;
|
|
440
483
|
}
|
|
441
484
|
/**
|
|
442
485
|
* Aggregate catalog written to
|
package/package.json
CHANGED
package/src/types/bindings.ts
CHANGED
|
@@ -98,6 +98,12 @@ export const BINDING_DOCS = {
|
|
|
98
98
|
examples: ['@user.id', '@user.role'],
|
|
99
99
|
requiresPath: true,
|
|
100
100
|
},
|
|
101
|
+
callsitePayload: {
|
|
102
|
+
description:
|
|
103
|
+
'Call-site-captured event payload — emitted by the compiler\'s inline-trait hoisting when an extracted render block captured @payload; resolved at the composing effect by the runtime BindingResolver',
|
|
104
|
+
examples: ['@callsitePayload.error', '@callsitePayload.row'],
|
|
105
|
+
requiresPath: true,
|
|
106
|
+
},
|
|
101
107
|
} as const;
|
|
102
108
|
|
|
103
109
|
/**
|
|
@@ -110,9 +116,9 @@ export const BINDING_CONTEXT_RULES = {
|
|
|
110
116
|
'Guards can access entity fields, event payload, current state, time, the call-site trait config (@config.X), and the authenticated user context (@user.id, @user.role) for ownership / role gates. Config access lets atoms write mode-aware guards — e.g. std-modal\'s OPEN can require @payload.row only when @config.mode equals "edit", letting create-mode legitimately fire OPEN with no row. Like effects, @config.X is substituted at molecule/organism inline time with the literal call-site value; at atom-scope validate, @config is allowed-but-unresolved.',
|
|
111
117
|
},
|
|
112
118
|
effect: {
|
|
113
|
-
allowed: ['entity', 'payload', 'state', 'now', 'trait', 'config', 'user'] as const,
|
|
119
|
+
allowed: ['entity', 'payload', 'state', 'now', 'trait', 'config', 'user', 'callsitePayload'] as const,
|
|
114
120
|
description:
|
|
115
|
-
'Effects can access and modify entity fields, use payload data, embed another trait\'s live frame via @trait.X inside render-ui children, read trait config values (@config.X) for atoms parameterized by their call-site, and read the authenticated user context (@user.id, @user.role). At molecule/organism inline time, @config.X is substituted with the literal value from the call-site config block; at atom-scope validate, @config is allowed-but-unresolved.',
|
|
121
|
+
'Effects can access and modify entity fields, use payload data, embed another trait\'s live frame via @trait.X inside render-ui children, read trait config values (@config.X) for atoms parameterized by their call-site, and read the authenticated user context (@user.id, @user.role). At molecule/organism inline time, @config.X is substituted with the literal value from the call-site config block; at atom-scope validate, @config is allowed-but-unresolved. @callsitePayload.X is the call-site-captured event payload emitted by the compiler\'s inline-trait hoisting (a hoisted render block that captured @payload); it is resolved at the composing effect by the runtime BindingResolver.',
|
|
116
122
|
},
|
|
117
123
|
tick: {
|
|
118
124
|
allowed: ['entity', 'state', 'now', 'config', 'user'] as const,
|