@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.
Files changed (35) hide show
  1. package/dist/{EntityBindingContext-Bn3ePJQC.d.cts → EntityBindingContext-D5lRu6p1.d.cts} +25 -2
  2. package/dist/{EntityBindingContext-Bn3ePJQC.d.ts → EntityBindingContext-D5lRu6p1.d.ts} +25 -2
  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 +254 -108
  6. package/dist/avl/index.js +213 -67
  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 +46 -22
  13. package/dist/components/index.d.ts +46 -22
  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 +158 -88
  24. package/dist/providers/index.d.cts +5 -3
  25. package/dist/providers/index.d.ts +5 -3
  26. package/dist/providers/index.js +119 -49
  27. package/dist/runtime/index.cjs +253 -107
  28. package/dist/runtime/index.d.cts +31 -7
  29. package/dist/runtime/index.d.ts +31 -7
  30. package/dist/runtime/index.js +212 -66
  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
@@ -2,6 +2,7 @@ import * as React from 'react';
2
2
  import React__default, { ReactNode } from 'react';
3
3
  import { ResolvedEntity, EventPayload, EntityRow, OrbitalSchema, BusEventSource, SExpr, ResolvedTrait, ResolvedTraitBinding, TraitConfig } from '@almadar/core';
4
4
  import { AnyPatternConfig } from '@almadar/core/patterns';
5
+ import { ServerEffectResult } from '@almadar/runtime';
5
6
 
6
7
  /**
7
8
  * EntitySchemaContext
@@ -111,6 +112,14 @@ interface OrbitalEventResponse {
111
112
  traitName: string;
112
113
  effect: ClientEffectTuple;
113
114
  }>;
115
+ /**
116
+ * Results from server-side effects (persist, call-service, set, …) —
117
+ * `ServerEffectResult`, JSON-serialized. Carries the
118
+ * persist effect's real outcome (action, entity, resulting id, denied)
119
+ * so the verification trace can read it instead of inferring success
120
+ * from a row-count delta.
121
+ */
122
+ effectResults?: ServerEffectResult[];
114
123
  error?: string;
115
124
  }
116
125
  interface ServerClientEffect {
@@ -137,6 +146,8 @@ interface ServerResponseMeta {
137
146
  /** Raw entity data from server response (for EntityStore advancement) */
138
147
  data?: Record<string, EntityRow[]>;
139
148
  emittedEvents: string[];
149
+ /** Server-side effect outcomes — see `OrbitalEventResponse.effectResults`. */
150
+ effectResults?: ServerEffectResult[];
140
151
  error?: string;
141
152
  }
142
153
  interface SendEventResult {
@@ -175,6 +186,12 @@ interface ServerBridgeTransport {
175
186
  */
176
187
  sendEvent: (orbitalName: string, event: string, payload?: EventPayload, clientId?: string, tick?: string, sourceTrait?: string) => Promise<OrbitalEventResponse>;
177
188
  }
189
+ /**
190
+ * Supplies the bearer token the hosting server authenticates with. Resolved
191
+ * per request (tokens expire); `undefined` sends the request unauthenticated
192
+ * (dev servers with an auth bypass, standalone playground).
193
+ */
194
+ type AccessTokenProvider = () => Promise<string | undefined>;
178
195
  /**
179
196
  * Access the server bridge. Returns a no-op stub when outside the provider.
180
197
  */
@@ -189,9 +206,15 @@ interface ServerBridgeProviderProps {
189
206
  * directly). Mutually exclusive with `serverUrl`.
190
207
  */
191
208
  transport?: ServerBridgeTransport;
209
+ /**
210
+ * Bearer token for the HTTP transport (`Authorization` on every fetch;
211
+ * `access_token` on the SSE URL, since EventSource cannot set headers).
212
+ * Ignored with a custom `transport`.
213
+ */
214
+ getAccessToken?: AccessTokenProvider;
192
215
  children: ReactNode;
193
216
  }
194
- declare function ServerBridgeProvider({ schema, serverUrl, transport: customTransport, children, }: ServerBridgeProviderProps): React.JSX.Element;
217
+ declare function ServerBridgeProvider({ schema, serverUrl, transport: customTransport, getAccessToken, children, }: ServerBridgeProviderProps): React.JSX.Element;
195
218
 
196
219
  /**
197
220
  * TraitProvider Component
@@ -272,4 +295,4 @@ declare function useEntityBindingSnapshot(traitName: string | undefined): {
272
295
  state: string;
273
296
  };
274
297
 
275
- export { EntityBindingContext as E, type SendEventResult as S, TraitContext as T, type EntityBindingSource as a, type EntitySchemaContextValue as b, EntitySchemaProvider as c, type EntitySchemaProviderProps as d, type ServerBridgeContextValue as e, ServerBridgeProvider as f, type ServerBridgeProviderProps as g, type ServerBridgeTransport as h, type ServerClientEffect as i, type ServerResponseMeta as j, type TraitContextValue as k, type TraitInstance as l, TraitProvider as m, type TraitProviderProps as n, useEntitySchema as o, useEntitySchemaOptional as p, useServerBridge as q, useTrait as r, useTraitContext as s, useEntityBindingSnapshot as u };
298
+ export { type AccessTokenProvider as A, EntityBindingContext as E, type SendEventResult as S, TraitContext as T, type EntityBindingSource as a, type EntitySchemaContextValue as b, EntitySchemaProvider as c, type EntitySchemaProviderProps as d, type ServerBridgeContextValue as e, ServerBridgeProvider as f, type ServerBridgeProviderProps as g, type ServerBridgeTransport as h, type ServerClientEffect as i, type ServerResponseMeta as j, type TraitContextValue as k, type TraitInstance as l, TraitProvider as m, type TraitProviderProps as n, useEntitySchema as o, useEntitySchemaOptional as p, useServerBridge as q, useTrait as r, useTraitContext as s, useEntityBindingSnapshot as u };
@@ -2,6 +2,7 @@ import * as React from 'react';
2
2
  import React__default, { ReactNode } from 'react';
3
3
  import { ResolvedEntity, EventPayload, EntityRow, OrbitalSchema, BusEventSource, SExpr, ResolvedTrait, ResolvedTraitBinding, TraitConfig } from '@almadar/core';
4
4
  import { AnyPatternConfig } from '@almadar/core/patterns';
5
+ import { ServerEffectResult } from '@almadar/runtime';
5
6
 
6
7
  /**
7
8
  * EntitySchemaContext
@@ -111,6 +112,14 @@ interface OrbitalEventResponse {
111
112
  traitName: string;
112
113
  effect: ClientEffectTuple;
113
114
  }>;
115
+ /**
116
+ * Results from server-side effects (persist, call-service, set, …) —
117
+ * `ServerEffectResult`, JSON-serialized. Carries the
118
+ * persist effect's real outcome (action, entity, resulting id, denied)
119
+ * so the verification trace can read it instead of inferring success
120
+ * from a row-count delta.
121
+ */
122
+ effectResults?: ServerEffectResult[];
114
123
  error?: string;
115
124
  }
116
125
  interface ServerClientEffect {
@@ -137,6 +146,8 @@ interface ServerResponseMeta {
137
146
  /** Raw entity data from server response (for EntityStore advancement) */
138
147
  data?: Record<string, EntityRow[]>;
139
148
  emittedEvents: string[];
149
+ /** Server-side effect outcomes — see `OrbitalEventResponse.effectResults`. */
150
+ effectResults?: ServerEffectResult[];
140
151
  error?: string;
141
152
  }
142
153
  interface SendEventResult {
@@ -175,6 +186,12 @@ interface ServerBridgeTransport {
175
186
  */
176
187
  sendEvent: (orbitalName: string, event: string, payload?: EventPayload, clientId?: string, tick?: string, sourceTrait?: string) => Promise<OrbitalEventResponse>;
177
188
  }
189
+ /**
190
+ * Supplies the bearer token the hosting server authenticates with. Resolved
191
+ * per request (tokens expire); `undefined` sends the request unauthenticated
192
+ * (dev servers with an auth bypass, standalone playground).
193
+ */
194
+ type AccessTokenProvider = () => Promise<string | undefined>;
178
195
  /**
179
196
  * Access the server bridge. Returns a no-op stub when outside the provider.
180
197
  */
@@ -189,9 +206,15 @@ interface ServerBridgeProviderProps {
189
206
  * directly). Mutually exclusive with `serverUrl`.
190
207
  */
191
208
  transport?: ServerBridgeTransport;
209
+ /**
210
+ * Bearer token for the HTTP transport (`Authorization` on every fetch;
211
+ * `access_token` on the SSE URL, since EventSource cannot set headers).
212
+ * Ignored with a custom `transport`.
213
+ */
214
+ getAccessToken?: AccessTokenProvider;
192
215
  children: ReactNode;
193
216
  }
194
- declare function ServerBridgeProvider({ schema, serverUrl, transport: customTransport, children, }: ServerBridgeProviderProps): React.JSX.Element;
217
+ declare function ServerBridgeProvider({ schema, serverUrl, transport: customTransport, getAccessToken, children, }: ServerBridgeProviderProps): React.JSX.Element;
195
218
 
196
219
  /**
197
220
  * TraitProvider Component
@@ -272,4 +295,4 @@ declare function useEntityBindingSnapshot(traitName: string | undefined): {
272
295
  state: string;
273
296
  };
274
297
 
275
- export { EntityBindingContext as E, type SendEventResult as S, TraitContext as T, type EntityBindingSource as a, type EntitySchemaContextValue as b, EntitySchemaProvider as c, type EntitySchemaProviderProps as d, type ServerBridgeContextValue as e, ServerBridgeProvider as f, type ServerBridgeProviderProps as g, type ServerBridgeTransport as h, type ServerClientEffect as i, type ServerResponseMeta as j, type TraitContextValue as k, type TraitInstance as l, TraitProvider as m, type TraitProviderProps as n, useEntitySchema as o, useEntitySchemaOptional as p, useServerBridge as q, useTrait as r, useTraitContext as s, useEntityBindingSnapshot as u };
298
+ export { type AccessTokenProvider as A, EntityBindingContext as E, type SendEventResult as S, TraitContext as T, type EntityBindingSource as a, type EntitySchemaContextValue as b, EntitySchemaProvider as c, type EntitySchemaProviderProps as d, type ServerBridgeContextValue as e, ServerBridgeProvider as f, type ServerBridgeProviderProps as g, type ServerBridgeTransport as h, type ServerClientEffect as i, type ServerResponseMeta as j, type TraitContextValue as k, type TraitInstance as l, TraitProvider as m, type TraitProviderProps as n, useEntitySchema as o, useEntitySchemaOptional as p, useServerBridge as q, useTrait as r, useTraitContext as s, useEntityBindingSnapshot as u };
@@ -1,6 +1,6 @@
1
1
  import React__default from 'react';
2
2
  import { AudioManifest } from '@almadar/core';
3
- import { U as UiError } from './types-B3nHgnMG.cjs';
3
+ import { U as UiError } from './paintDispatch-CK5uwYEq.cjs';
4
4
 
5
5
  /** Core owns the sound-manifest shape (`@almadar/core` `types/asset.ts`) so the
6
6
  * pattern extractor and the generated `.lolo` factories resolve the same
@@ -1,6 +1,6 @@
1
1
  import React__default from 'react';
2
2
  import { AudioManifest } from '@almadar/core';
3
- import { U as UiError } from './types-B3nHgnMG.js';
3
+ import { U as UiError } from './paintDispatch-CK5uwYEq.js';
4
4
 
5
5
  /** Core owns the sound-manifest shape (`@almadar/core` `types/asset.ts`) so the
6
6
  * pattern extractor and the generated `.lolo` factories resolve the same