@almadar/ui 6.10.0 → 6.12.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.
Files changed (35) hide show
  1. package/dist/{EntityBindingContext-Y4zXyNJZ.d.cts → EntityBindingContext-D5lRu6p1.d.cts} +11 -0
  2. package/dist/{EntityBindingContext-Y4zXyNJZ.d.ts → EntityBindingContext-D5lRu6p1.d.ts} +11 -0
  3. package/dist/{GameAudioProvider-Dk_Y3LN3.d.cts → GameAudioProvider-D8GynTNq.d.cts} +1 -1
  4. package/dist/{GameAudioProvider-Ctceau1s.d.ts → GameAudioProvider-Dozqx4sL.d.ts} +1 -1
  5. package/dist/avl/index.cjs +250 -106
  6. package/dist/avl/index.js +209 -65
  7. package/dist/{avl-schema-parser-DncJLEn9.d.ts → avl-schema-parser-DX-aVCCm.d.ts} +1 -1
  8. package/dist/{avl-schema-parser-FQ1474v8.d.cts → avl-schema-parser-PVu8rgsy.d.cts} +1 -1
  9. package/dist/{cn-C7fvp9gH.d.ts → cn-Do5gsPBm.d.cts} +2 -100
  10. package/dist/{cn-DnLYahyL.d.cts → cn-Do5gsPBm.d.ts} +2 -100
  11. package/dist/components/index.cjs +103 -68
  12. package/dist/components/index.d.cts +44 -20
  13. package/dist/components/index.d.ts +44 -20
  14. package/dist/components/index.js +64 -29
  15. package/dist/lib/drawable/three/index.d.cts +3 -4
  16. package/dist/lib/drawable/three/index.d.ts +3 -4
  17. package/dist/lib/index.cjs +7 -23
  18. package/dist/lib/index.d.cts +6 -28
  19. package/dist/lib/index.d.ts +6 -28
  20. package/dist/lib/index.js +5 -23
  21. package/dist/{paintDispatch-B5ObLnUv.d.ts → paintDispatch-CK5uwYEq.d.cts} +50 -3
  22. package/dist/{paintDispatch-D3R8NNmV.d.cts → paintDispatch-CK5uwYEq.d.ts} +50 -3
  23. package/dist/providers/index.cjs +129 -78
  24. package/dist/providers/index.d.cts +5 -3
  25. package/dist/providers/index.d.ts +5 -3
  26. package/dist/providers/index.js +90 -39
  27. package/dist/runtime/index.cjs +249 -105
  28. package/dist/runtime/index.d.cts +27 -5
  29. package/dist/runtime/index.d.ts +27 -5
  30. package/dist/runtime/index.js +208 -64
  31. package/dist/verificationRegistry-BLsjb1oU.d.cts +110 -0
  32. package/dist/verificationRegistry-D8bHWD8Q.d.ts +110 -0
  33. package/package.json +7 -7
  34. package/dist/types-B3nHgnMG.d.cts +0 -51
  35. package/dist/types-B3nHgnMG.d.ts +0 -51
@@ -1,12 +1,13 @@
1
1
  import * as _almadar_core from '@almadar/core';
2
- import { EventPayload, ServiceParams, ResolvedTraitBinding, ResolvedPage, ResolvedEntity, ResolvedTrait, ResolvedIR, OrbitalSchema, PatternConfig, FieldValue, EventSource, SExpr, BusEventSource, EntityRow, EntityData } from '@almadar/core';
2
+ import { EventPayload, ServiceParams, ResolvedTraitBinding, ResolvedPage, ResolvedEntity, ResolvedTrait, ResolvedIR, OrbitalSchema, PatternConfig, ResolvedPatternProps, EventSource, SExpr, BusEventSource, EntityRow, EntityData } from '@almadar/core';
3
3
  export { ResolvedEntity, ResolvedIR, ResolvedPage, ResolvedTrait, ResolvedTraitBinding } from '@almadar/core';
4
4
  import * as _almadar_runtime from '@almadar/runtime';
5
5
  import { TraitState, EffectHandlers } from '@almadar/runtime';
6
6
  import { K as KeyCaptureTable } from '../useKeyboardRouter-CVn8lfiX.cjs';
7
7
  import { c as useUISlots } from '../UISlotContext-BlRDbHDy.cjs';
8
- import { a as EntityBindingSource, h as ServerBridgeTransport, A as AccessTokenProvider } from '../EntityBindingContext-Y4zXyNJZ.cjs';
9
- export { b as EntitySchemaContextValue, c as EntitySchemaProvider, d as EntitySchemaProviderProps, e as ServerBridgeContextValue, f as ServerBridgeProvider, i as ServerClientEffect, T as TraitContext, k as TraitContextValue, l as TraitInstance, m as TraitProvider, n as TraitProviderProps, o as useEntitySchema, p as useEntitySchemaOptional, q as useServerBridge, r as useTrait, s as useTraitContext } from '../EntityBindingContext-Y4zXyNJZ.cjs';
8
+ import { a as EntityBindingSource, h as ServerBridgeTransport, A as AccessTokenProvider } from '../EntityBindingContext-D5lRu6p1.cjs';
9
+ export { b as EntitySchemaContextValue, c as EntitySchemaProvider, d as EntitySchemaProviderProps, e as ServerBridgeContextValue, f as ServerBridgeProvider, i as ServerClientEffect, T as TraitContext, k as TraitContextValue, l as TraitInstance, m as TraitProvider, n as TraitProviderProps, o as useEntitySchema, p as useEntitySchemaOptional, q as useServerBridge, r as useTrait, s as useTraitContext } from '../EntityBindingContext-D5lRu6p1.cjs';
10
+ import '../verificationRegistry-BLsjb1oU.cjs';
10
11
  export { PERF_NAMESPACE, PerfEntry, PreparedPreviewSchema, adjustSchemaForMockData, buildMockData, clearPerf, perfEnd, perfStart, perfTime, prepareSchemaForPreview, wrapCallbackForEvent } from '@almadar/runtime/ui';
11
12
  import React__default, { ReactNode } from 'react';
12
13
  export { S as SlotHostManifest, a as SlotHostRegion, b as assertUniqueSlotsPerHost } from '../slot-host-Czc2JAxo.cjs';
@@ -14,6 +15,7 @@ export { p as profilerOnRender, u as usePerfBuffer } from '../perf-DaVdsbU0.cjs'
14
15
  import '../event-bus-types-Bl78kokd.cjs';
15
16
  import '../useUISlots-GNwGLlW2.cjs';
16
17
  import '@almadar/core/patterns';
18
+ import '../paintDispatch-CK5uwYEq.cjs';
17
19
 
18
20
  interface TraitStateMachineResult {
19
21
  /** Current state for each trait */
@@ -95,6 +97,15 @@ interface UseTraitStateMachineOptions {
95
97
  * compiled-path codegen semantics.
96
98
  */
97
99
  embeddedTraits?: ReadonlySet<string>;
100
+ /**
101
+ * Referrer trait name → the DIRECT children (via `@trait.X`) that need
102
+ * their lifecycle transition re-run under the referrer's payload
103
+ * whenever the referrer's own transition fires — built by the caller
104
+ * via `@almadar/core`'s `collectCallsiteCaptureChildren` (merged across
105
+ * every orbital in the resolved schema, the same flattening
106
+ * `orbitalsByTrait` uses). See `reRenderCallsiteCaptureChildren`.
107
+ */
108
+ callsiteCaptureChildrenByTrait?: ReadonlyMap<string, ReadonlySet<string>>;
98
109
  }
99
110
  declare function useTraitStateMachine(traitBindings: ResolvedTraitBinding[], uiSlots: ReturnType<typeof useUISlots>, options?: UseTraitStateMachineOptions): TraitStateMachineResult;
100
111
 
@@ -149,7 +160,7 @@ declare function clearSchemaCache(): void;
149
160
  */
150
161
  interface SlotPatternEntry {
151
162
  pattern: PatternConfig;
152
- props: Record<string, FieldValue | undefined>;
163
+ props: ResolvedPatternProps;
153
164
  }
154
165
  /**
155
166
  * The originating trait + state for a slot write. Embedded in the
@@ -177,7 +188,7 @@ interface ClientEventBus {
177
188
  emit: (type: string, payload?: EventPayload, source?: BusEventSource) => void;
178
189
  }
179
190
  interface SlotSetter {
180
- addPattern: (slot: string, pattern: PatternConfig | null, props?: Record<string, FieldValue | undefined>) => void;
191
+ addPattern: (slot: string, pattern: PatternConfig | null, props?: ResolvedPatternProps) => void;
181
192
  clearSlot: (slot: string) => void;
182
193
  }
183
194
  interface CreateClientEffectHandlersOptions {
@@ -200,6 +211,17 @@ interface CreateClientEffectHandlersOptions {
200
211
  * and ticks — no guard-vs-render split.
201
212
  */
202
213
  liveEntity?: EntityRow;
214
+ /**
215
+ * Bridge mode — no local persistence adapter is wired, so the SERVER
216
+ * executes every persist and returns its outcome. Sets
217
+ * `EffectHandlers.persistDelegated` so the executor skips the placeholder
218
+ * `persist` below instead of reading its `undefined` as a denial
219
+ * (an error in every browser console + a client-side `failure` emit
220
+ * while the server had succeeded). The hook decides this from whether a
221
+ * `persistence` adapter was supplied — `liveEntity` says nothing about
222
+ * it (the hook always binds one for `(set @entity.X)`).
223
+ */
224
+ persistDelegated?: boolean;
203
225
  /**
204
226
  * Optional consumer-supplied call-service handler. When set, it runs
205
227
  * instead of the default mock fallback — use to wire the playground
@@ -1,12 +1,13 @@
1
1
  import * as _almadar_core from '@almadar/core';
2
- import { EventPayload, ServiceParams, ResolvedTraitBinding, ResolvedPage, ResolvedEntity, ResolvedTrait, ResolvedIR, OrbitalSchema, PatternConfig, FieldValue, EventSource, SExpr, BusEventSource, EntityRow, EntityData } from '@almadar/core';
2
+ import { EventPayload, ServiceParams, ResolvedTraitBinding, ResolvedPage, ResolvedEntity, ResolvedTrait, ResolvedIR, OrbitalSchema, PatternConfig, ResolvedPatternProps, EventSource, SExpr, BusEventSource, EntityRow, EntityData } from '@almadar/core';
3
3
  export { ResolvedEntity, ResolvedIR, ResolvedPage, ResolvedTrait, ResolvedTraitBinding } from '@almadar/core';
4
4
  import * as _almadar_runtime from '@almadar/runtime';
5
5
  import { TraitState, EffectHandlers } from '@almadar/runtime';
6
6
  import { K as KeyCaptureTable } from '../useKeyboardRouter-B1pIi9jo.js';
7
7
  import { c as useUISlots } from '../UISlotContext-CB89mv7N.js';
8
- import { a as EntityBindingSource, h as ServerBridgeTransport, A as AccessTokenProvider } from '../EntityBindingContext-Y4zXyNJZ.js';
9
- export { b as EntitySchemaContextValue, c as EntitySchemaProvider, d as EntitySchemaProviderProps, e as ServerBridgeContextValue, f as ServerBridgeProvider, i as ServerClientEffect, T as TraitContext, k as TraitContextValue, l as TraitInstance, m as TraitProvider, n as TraitProviderProps, o as useEntitySchema, p as useEntitySchemaOptional, q as useServerBridge, r as useTrait, s as useTraitContext } from '../EntityBindingContext-Y4zXyNJZ.js';
8
+ import { a as EntityBindingSource, h as ServerBridgeTransport, A as AccessTokenProvider } from '../EntityBindingContext-D5lRu6p1.js';
9
+ export { b as EntitySchemaContextValue, c as EntitySchemaProvider, d as EntitySchemaProviderProps, e as ServerBridgeContextValue, f as ServerBridgeProvider, i as ServerClientEffect, T as TraitContext, k as TraitContextValue, l as TraitInstance, m as TraitProvider, n as TraitProviderProps, o as useEntitySchema, p as useEntitySchemaOptional, q as useServerBridge, r as useTrait, s as useTraitContext } from '../EntityBindingContext-D5lRu6p1.js';
10
+ import '../verificationRegistry-D8bHWD8Q.js';
10
11
  export { PERF_NAMESPACE, PerfEntry, PreparedPreviewSchema, adjustSchemaForMockData, buildMockData, clearPerf, perfEnd, perfStart, perfTime, prepareSchemaForPreview, wrapCallbackForEvent } from '@almadar/runtime/ui';
11
12
  import React__default, { ReactNode } from 'react';
12
13
  export { S as SlotHostManifest, a as SlotHostRegion, b as assertUniqueSlotsPerHost } from '../slot-host-Czc2JAxo.js';
@@ -14,6 +15,7 @@ export { p as profilerOnRender, u as usePerfBuffer } from '../perf-DaVdsbU0.js';
14
15
  import '../event-bus-types-Bl78kokd.js';
15
16
  import '../useUISlots-GNwGLlW2.js';
16
17
  import '@almadar/core/patterns';
18
+ import '../paintDispatch-CK5uwYEq.js';
17
19
 
18
20
  interface TraitStateMachineResult {
19
21
  /** Current state for each trait */
@@ -95,6 +97,15 @@ interface UseTraitStateMachineOptions {
95
97
  * compiled-path codegen semantics.
96
98
  */
97
99
  embeddedTraits?: ReadonlySet<string>;
100
+ /**
101
+ * Referrer trait name → the DIRECT children (via `@trait.X`) that need
102
+ * their lifecycle transition re-run under the referrer's payload
103
+ * whenever the referrer's own transition fires — built by the caller
104
+ * via `@almadar/core`'s `collectCallsiteCaptureChildren` (merged across
105
+ * every orbital in the resolved schema, the same flattening
106
+ * `orbitalsByTrait` uses). See `reRenderCallsiteCaptureChildren`.
107
+ */
108
+ callsiteCaptureChildrenByTrait?: ReadonlyMap<string, ReadonlySet<string>>;
98
109
  }
99
110
  declare function useTraitStateMachine(traitBindings: ResolvedTraitBinding[], uiSlots: ReturnType<typeof useUISlots>, options?: UseTraitStateMachineOptions): TraitStateMachineResult;
100
111
 
@@ -149,7 +160,7 @@ declare function clearSchemaCache(): void;
149
160
  */
150
161
  interface SlotPatternEntry {
151
162
  pattern: PatternConfig;
152
- props: Record<string, FieldValue | undefined>;
163
+ props: ResolvedPatternProps;
153
164
  }
154
165
  /**
155
166
  * The originating trait + state for a slot write. Embedded in the
@@ -177,7 +188,7 @@ interface ClientEventBus {
177
188
  emit: (type: string, payload?: EventPayload, source?: BusEventSource) => void;
178
189
  }
179
190
  interface SlotSetter {
180
- addPattern: (slot: string, pattern: PatternConfig | null, props?: Record<string, FieldValue | undefined>) => void;
191
+ addPattern: (slot: string, pattern: PatternConfig | null, props?: ResolvedPatternProps) => void;
181
192
  clearSlot: (slot: string) => void;
182
193
  }
183
194
  interface CreateClientEffectHandlersOptions {
@@ -200,6 +211,17 @@ interface CreateClientEffectHandlersOptions {
200
211
  * and ticks — no guard-vs-render split.
201
212
  */
202
213
  liveEntity?: EntityRow;
214
+ /**
215
+ * Bridge mode — no local persistence adapter is wired, so the SERVER
216
+ * executes every persist and returns its outcome. Sets
217
+ * `EffectHandlers.persistDelegated` so the executor skips the placeholder
218
+ * `persist` below instead of reading its `undefined` as a denial
219
+ * (an error in every browser console + a client-side `failure` emit
220
+ * while the server had succeeded). The hook decides this from whether a
221
+ * `persistence` adapter was supplied — `liveEntity` says nothing about
222
+ * it (the hook always binds one for `(set @entity.X)`).
223
+ */
224
+ persistDelegated?: boolean;
203
225
  /**
204
226
  * Optional consumer-supplied call-service handler. When set, it runs
205
227
  * instead of the default mock fallback — use to wire the playground