@almadar/ui 6.9.0 → 6.11.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/{EntityBindingContext-Bn3ePJQC.d.cts → EntityBindingContext-D5lRu6p1.d.cts} +25 -2
- package/dist/{EntityBindingContext-Bn3ePJQC.d.ts → EntityBindingContext-D5lRu6p1.d.ts} +25 -2
- package/dist/{GameAudioProvider-Dk_Y3LN3.d.cts → GameAudioProvider-D8GynTNq.d.cts} +1 -1
- package/dist/{GameAudioProvider-Ctceau1s.d.ts → GameAudioProvider-Dozqx4sL.d.ts} +1 -1
- package/dist/avl/index.cjs +254 -108
- package/dist/avl/index.js +213 -67
- package/dist/{avl-schema-parser-DncJLEn9.d.ts → avl-schema-parser-DX-aVCCm.d.ts} +1 -1
- package/dist/{avl-schema-parser-FQ1474v8.d.cts → avl-schema-parser-PVu8rgsy.d.cts} +1 -1
- package/dist/{cn-C7fvp9gH.d.ts → cn-Do5gsPBm.d.cts} +2 -100
- package/dist/{cn-DnLYahyL.d.cts → cn-Do5gsPBm.d.ts} +2 -100
- package/dist/components/index.cjs +103 -68
- package/dist/components/index.d.cts +46 -22
- package/dist/components/index.d.ts +46 -22
- package/dist/components/index.js +64 -29
- package/dist/lib/drawable/three/index.d.cts +3 -4
- package/dist/lib/drawable/three/index.d.ts +3 -4
- package/dist/lib/index.cjs +7 -23
- package/dist/lib/index.d.cts +6 -28
- package/dist/lib/index.d.ts +6 -28
- package/dist/lib/index.js +5 -23
- package/dist/{paintDispatch-B5ObLnUv.d.ts → paintDispatch-CK5uwYEq.d.cts} +50 -3
- package/dist/{paintDispatch-D3R8NNmV.d.cts → paintDispatch-CK5uwYEq.d.ts} +50 -3
- package/dist/providers/index.cjs +158 -88
- package/dist/providers/index.d.cts +5 -3
- package/dist/providers/index.d.ts +5 -3
- package/dist/providers/index.js +119 -49
- package/dist/runtime/index.cjs +253 -107
- package/dist/runtime/index.d.cts +31 -7
- package/dist/runtime/index.d.ts +31 -7
- package/dist/runtime/index.js +212 -66
- package/dist/verificationRegistry-BLsjb1oU.d.cts +110 -0
- package/dist/verificationRegistry-D8bHWD8Q.d.ts +110 -0
- package/package.json +7 -7
- package/dist/types-B3nHgnMG.d.cts +0 -51
- package/dist/types-B3nHgnMG.d.ts +0 -51
package/dist/runtime/index.d.cts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import * as _almadar_core from '@almadar/core';
|
|
2
|
-
import { EventPayload, ServiceParams, ResolvedTraitBinding, ResolvedPage, ResolvedEntity, ResolvedTrait, ResolvedIR, OrbitalSchema, PatternConfig,
|
|
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 } from '../EntityBindingContext-
|
|
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-
|
|
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:
|
|
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?:
|
|
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
|
|
@@ -246,6 +268,8 @@ interface OrbPreviewProps {
|
|
|
246
268
|
* `OrbitalServerRuntime.processOrbitalEvent` directly without HTTP.
|
|
247
269
|
*/
|
|
248
270
|
transport?: ServerBridgeTransport;
|
|
271
|
+
/** Bearer token for `serverUrl` requests (see `ServerBridgeProviderProps.getAccessToken`). */
|
|
272
|
+
getAccessToken?: AccessTokenProvider;
|
|
249
273
|
/**
|
|
250
274
|
* Initial page path to render (e.g. `/deals`). Resolves against the
|
|
251
275
|
* schema's `pages[]` to seed `currentPage` so the right orbital's traits
|
|
@@ -275,7 +299,7 @@ interface OrbPreviewProps {
|
|
|
275
299
|
* <OrbPreview schema={schema} serverUrl="/api/orbitals" />
|
|
276
300
|
* ```
|
|
277
301
|
*/
|
|
278
|
-
declare function OrbPreview({ schema, mockData, autoMock, height, className, serverUrl, transport, initialPagePath, isolated, }: OrbPreviewProps): React__default.ReactElement;
|
|
302
|
+
declare function OrbPreview({ schema, mockData, autoMock, height, className, serverUrl, transport, getAccessToken, initialPagePath, isolated, }: OrbPreviewProps): React__default.ReactElement;
|
|
279
303
|
declare namespace OrbPreview {
|
|
280
304
|
var displayName: string;
|
|
281
305
|
}
|
|
@@ -418,4 +442,4 @@ declare function useOrbitalPluginHost(): {
|
|
|
418
442
|
*/
|
|
419
443
|
declare function OrbitalPluginHost({ plugins, mode, transport, deny, navigate, notify, onTransition, children, }: OrbitalPluginHostProps): React__default.ReactElement;
|
|
420
444
|
|
|
421
|
-
export { BrowserPlayground, type BrowserPlaygroundProps, type ClientEventBus, type CreateClientEffectHandlersOptions, OrbPreview, type OrbPreviewProps, OrbitalPluginHost, type OrbitalPluginHostProps, type PluginHostDenyVerb, type PluginHostInbound, type PluginHostPlugin, type ResolvedSchemaResult, ServerBridgeTransport, type SlotPatternEntry, type SlotSetter, type SlotSource, type TraitStateMachineResult, type UseTraitStateMachineOptions, clearSchemaCache, createClientEffectHandlers, useDeclaredCaptureTable, useOrbitalPluginHost, useResolvedSchema, useTraitStateMachine };
|
|
445
|
+
export { AccessTokenProvider, BrowserPlayground, type BrowserPlaygroundProps, type ClientEventBus, type CreateClientEffectHandlersOptions, OrbPreview, type OrbPreviewProps, OrbitalPluginHost, type OrbitalPluginHostProps, type PluginHostDenyVerb, type PluginHostInbound, type PluginHostPlugin, type ResolvedSchemaResult, ServerBridgeTransport, type SlotPatternEntry, type SlotSetter, type SlotSource, type TraitStateMachineResult, type UseTraitStateMachineOptions, clearSchemaCache, createClientEffectHandlers, useDeclaredCaptureTable, useOrbitalPluginHost, useResolvedSchema, useTraitStateMachine };
|
package/dist/runtime/index.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import * as _almadar_core from '@almadar/core';
|
|
2
|
-
import { EventPayload, ServiceParams, ResolvedTraitBinding, ResolvedPage, ResolvedEntity, ResolvedTrait, ResolvedIR, OrbitalSchema, PatternConfig,
|
|
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 } from '../EntityBindingContext-
|
|
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-
|
|
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:
|
|
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?:
|
|
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
|
|
@@ -246,6 +268,8 @@ interface OrbPreviewProps {
|
|
|
246
268
|
* `OrbitalServerRuntime.processOrbitalEvent` directly without HTTP.
|
|
247
269
|
*/
|
|
248
270
|
transport?: ServerBridgeTransport;
|
|
271
|
+
/** Bearer token for `serverUrl` requests (see `ServerBridgeProviderProps.getAccessToken`). */
|
|
272
|
+
getAccessToken?: AccessTokenProvider;
|
|
249
273
|
/**
|
|
250
274
|
* Initial page path to render (e.g. `/deals`). Resolves against the
|
|
251
275
|
* schema's `pages[]` to seed `currentPage` so the right orbital's traits
|
|
@@ -275,7 +299,7 @@ interface OrbPreviewProps {
|
|
|
275
299
|
* <OrbPreview schema={schema} serverUrl="/api/orbitals" />
|
|
276
300
|
* ```
|
|
277
301
|
*/
|
|
278
|
-
declare function OrbPreview({ schema, mockData, autoMock, height, className, serverUrl, transport, initialPagePath, isolated, }: OrbPreviewProps): React__default.ReactElement;
|
|
302
|
+
declare function OrbPreview({ schema, mockData, autoMock, height, className, serverUrl, transport, getAccessToken, initialPagePath, isolated, }: OrbPreviewProps): React__default.ReactElement;
|
|
279
303
|
declare namespace OrbPreview {
|
|
280
304
|
var displayName: string;
|
|
281
305
|
}
|
|
@@ -418,4 +442,4 @@ declare function useOrbitalPluginHost(): {
|
|
|
418
442
|
*/
|
|
419
443
|
declare function OrbitalPluginHost({ plugins, mode, transport, deny, navigate, notify, onTransition, children, }: OrbitalPluginHostProps): React__default.ReactElement;
|
|
420
444
|
|
|
421
|
-
export { BrowserPlayground, type BrowserPlaygroundProps, type ClientEventBus, type CreateClientEffectHandlersOptions, OrbPreview, type OrbPreviewProps, OrbitalPluginHost, type OrbitalPluginHostProps, type PluginHostDenyVerb, type PluginHostInbound, type PluginHostPlugin, type ResolvedSchemaResult, ServerBridgeTransport, type SlotPatternEntry, type SlotSetter, type SlotSource, type TraitStateMachineResult, type UseTraitStateMachineOptions, clearSchemaCache, createClientEffectHandlers, useDeclaredCaptureTable, useOrbitalPluginHost, useResolvedSchema, useTraitStateMachine };
|
|
445
|
+
export { AccessTokenProvider, BrowserPlayground, type BrowserPlaygroundProps, type ClientEventBus, type CreateClientEffectHandlersOptions, OrbPreview, type OrbPreviewProps, OrbitalPluginHost, type OrbitalPluginHostProps, type PluginHostDenyVerb, type PluginHostInbound, type PluginHostPlugin, type ResolvedSchemaResult, ServerBridgeTransport, type SlotPatternEntry, type SlotSetter, type SlotSource, type TraitStateMachineResult, type UseTraitStateMachineOptions, clearSchemaCache, createClientEffectHandlers, useDeclaredCaptureTable, useOrbitalPluginHost, useResolvedSchema, useTraitStateMachine };
|