@almadar/ui 6.5.0 → 6.7.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 (48) hide show
  1. package/dist/{EntityBindingContext-0Evn_LcT.d.cts → EntityBindingContext-Bn3ePJQC.d.cts} +1 -1
  2. package/dist/{EntityBindingContext-0Evn_LcT.d.ts → EntityBindingContext-Bn3ePJQC.d.ts} +1 -1
  3. package/dist/{GameAudioProvider-B48iXwz3.d.ts → GameAudioProvider-Ctceau1s.d.ts} +6 -18
  4. package/dist/{GameAudioProvider-CQAdPreB.d.cts → GameAudioProvider-Dk_Y3LN3.d.cts} +6 -18
  5. package/dist/avl/index.cjs +1268 -220
  6. package/dist/avl/index.js +1269 -221
  7. package/dist/{avl-schema-parser-dvJKXn-o.d.ts → avl-schema-parser-DncJLEn9.d.ts} +18 -0
  8. package/dist/{avl-schema-parser-Bt4NzAam.d.cts → avl-schema-parser-FQ1474v8.d.cts} +18 -0
  9. package/dist/{cn-DJSBBm5W.d.cts → cn-CCjFspAo.d.cts} +25 -1
  10. package/dist/{cn-BbhJq_nr.d.ts → cn-sgpqpN0U.d.ts} +25 -1
  11. package/dist/components/index.cjs +1092 -249
  12. package/dist/components/index.d.cts +193 -23
  13. package/dist/components/index.d.ts +193 -23
  14. package/dist/components/index.js +1089 -250
  15. package/dist/context/index.cjs +10 -13
  16. package/dist/context/index.js +10 -13
  17. package/dist/hooks/index.cjs +63 -13
  18. package/dist/hooks/index.d.cts +2 -2
  19. package/dist/hooks/index.d.ts +2 -2
  20. package/dist/hooks/index.js +64 -15
  21. package/dist/lib/drawable/three/index.cjs +126 -13
  22. package/dist/lib/drawable/three/index.d.cts +2 -2
  23. package/dist/lib/drawable/three/index.d.ts +2 -2
  24. package/dist/lib/drawable/three/index.js +127 -14
  25. package/dist/lib/index.cjs +180 -0
  26. package/dist/lib/index.d.cts +1 -1
  27. package/dist/lib/index.d.ts +1 -1
  28. package/dist/lib/index.js +178 -1
  29. package/dist/locales/index.cjs +6 -3
  30. package/dist/locales/index.js +6 -3
  31. package/dist/providers/index.cjs +974 -202
  32. package/dist/providers/index.d.cts +2 -2
  33. package/dist/providers/index.d.ts +2 -2
  34. package/dist/providers/index.js +974 -202
  35. package/dist/runtime/index.cjs +1594 -196
  36. package/dist/runtime/index.d.cts +79 -6
  37. package/dist/runtime/index.d.ts +79 -6
  38. package/dist/runtime/index.js +1592 -198
  39. package/dist/slot-host-Czc2JAxo.d.cts +47 -0
  40. package/dist/slot-host-Czc2JAxo.d.ts +47 -0
  41. package/dist/{useEventBus-CQWyAWpK.d.ts → useKeyboardRouter-D84cNWmA.d.ts} +31 -1
  42. package/dist/{useEventBus-Ckr4wqW3.d.cts → useKeyboardRouter-DQEE_9mq.d.cts} +31 -1
  43. package/locales/ar.json +2 -1
  44. package/locales/en.json +2 -1
  45. package/locales/sl.json +2 -1
  46. package/package.json +4 -4
  47. package/themes/comic.css +437 -0
  48. package/themes/index.css +1 -0
@@ -3,12 +3,13 @@ import { EventPayload, ServiceParams, ResolvedTraitBinding, ResolvedPage, Resolv
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
- import '../useEventBus-Ckr4wqW3.cjs';
6
+ import { K as KeyCaptureTable } from '../useKeyboardRouter-DQEE_9mq.cjs';
7
7
  import { c as useUISlots } from '../UISlotContext-BlRDbHDy.cjs';
8
- import { E as EntityBindingSource, S as ServerBridgeTransport } from '../EntityBindingContext-0Evn_LcT.cjs';
9
- export { a as EntitySchemaContextValue, b as EntitySchemaProvider, c as EntitySchemaProviderProps, d as ServerBridgeContextValue, e as ServerBridgeProvider, f as ServerClientEffect, T as TraitContext, g as TraitContextValue, h as TraitInstance, i as TraitProvider, j as TraitProviderProps, u as useEntitySchema, k as useEntitySchemaOptional, l as useServerBridge, m as useTrait, n as useTraitContext } from '../EntityBindingContext-0Evn_LcT.cjs';
8
+ import { a as EntityBindingSource, h as ServerBridgeTransport } from '../EntityBindingContext-Bn3ePJQC.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-Bn3ePJQC.cjs';
10
10
  export { PERF_NAMESPACE, PerfEntry, PreparedPreviewSchema, adjustSchemaForMockData, buildMockData, clearPerf, perfEnd, perfStart, perfTime, prepareSchemaForPreview, wrapCallbackForEvent } from '@almadar/runtime/ui';
11
- import React__default from 'react';
11
+ import React__default, { ReactNode } from 'react';
12
+ export { S as SlotHostManifest, a as SlotHostRegion, b as assertUniqueSlotsPerHost } from '../slot-host-Czc2JAxo.cjs';
12
13
  export { p as profilerOnRender, u as usePerfBuffer } from '../perf-DaVdsbU0.cjs';
13
14
  import '../event-bus-types-Bl78kokd.cjs';
14
15
  import '../useUISlots-GNwGLlW2.cjs';
@@ -309,7 +310,79 @@ interface BrowserPlaygroundProps {
309
310
  height?: string;
310
311
  /** CSS class for the outer container. */
311
312
  className?: string;
313
+ /** Pause the in-process runtime's tick scheduler. Default: undefined (running, same as today). */
314
+ paused?: boolean;
312
315
  }
313
- declare function BrowserPlayground({ schema, mode, initialPagePath, height, className, }: BrowserPlaygroundProps): React__default.ReactElement;
316
+ declare function BrowserPlayground({ schema, mode, initialPagePath, height, className, paused, }: BrowserPlaygroundProps): React__default.ReactElement;
314
317
 
315
- export { BrowserPlayground, type BrowserPlaygroundProps, type ClientEventBus, type CreateClientEffectHandlersOptions, OrbPreview, type OrbPreviewProps, type ResolvedSchemaResult, ServerBridgeTransport, type SlotPatternEntry, type SlotSetter, type SlotSource, type TraitStateMachineResult, type UseTraitStateMachineOptions, clearSchemaCache, createClientEffectHandlers, useResolvedSchema, useTraitStateMachine };
318
+ /**
319
+ * OrbitalPluginHost — runs an ordinary behavior headless against the
320
+ * AMBIENT event bus + slot provider (Almadar Studio V4 §14 plan, Part F1).
321
+ *
322
+ * A "plugin" is not a new kind of artifact: it is a `.lolo` behavior a host
323
+ * chooses to run in its own `OrbitalServerRuntime`, wired to the SAME bus
324
+ * and slots every other UI component uses. One runtime per plugin (mirrors
325
+ * `BrowserPlayground`'s single-schema mount, generalized over a list).
326
+ * Default policy denies nothing — a plugin has the full behavior power a
327
+ * preview has (in-memory persist, mock services); `deny` is an opt-in
328
+ * host policy, never a default sandbox.
329
+ *
330
+ * @packageDocumentation
331
+ */
332
+
333
+ /** Verbs a host may deny. Never includes `emit` — the runtime's own emit
334
+ * handler drives the internal `listens` cascade and must never be replaced. */
335
+ type PluginHostDenyVerb = 'persist' | 'call-service' | 'navigate' | 'notify';
336
+ /** One bus-event → orbital-event wiring: `UI:<busEvent>` dispatches `trigger` at `orbital`/`trait`. */
337
+ interface PluginHostInbound {
338
+ busEvent: string;
339
+ orbital: string;
340
+ trait: string;
341
+ trigger: string;
342
+ }
343
+ interface PluginHostPlugin {
344
+ id: string;
345
+ schema: OrbitalSchema;
346
+ inbound: PluginHostInbound[];
347
+ }
348
+ interface OrbitalPluginHostProps {
349
+ plugins: PluginHostPlugin[];
350
+ /** 'mock' (default): in-memory persist, mock services — full behavior power, as any preview.
351
+ * 'server': dispatch through `transport` instead of a local runtime, as `AlmadarApp`. */
352
+ mode?: 'mock' | 'server';
353
+ /** Required when `mode === 'server'`. */
354
+ transport?: ServerBridgeTransport;
355
+ /** OPTIONAL policy: verbs listed here are denied with a logged warning, never a throw. Default: none denied. */
356
+ deny?: PluginHostDenyVerb[];
357
+ navigate?: (path: string) => void;
358
+ notify?: (message: string, type?: string) => void;
359
+ onTransition?: (pluginId: string, orbital: string, trait: string, state: string) => void;
360
+ children?: ReactNode;
361
+ }
362
+ /**
363
+ * Reads the declared `keymap` config knob off the plugin's own trait and the
364
+ * live `currentState`, so `useKeyboardRouter`'s capture table always follows
365
+ * the trait's actual mode. Re-derives whenever the host records a new
366
+ * transition (the context's `tick`).
367
+ */
368
+ declare function useDeclaredCaptureTable(opts: {
369
+ pluginId: string;
370
+ orbital: string;
371
+ trait: string;
372
+ keymapKnob?: string;
373
+ target?: string;
374
+ }): KeyCaptureTable;
375
+ declare function useOrbitalPluginHost(): {
376
+ getState: (pluginId: string, orbital: string, trait: string) => TraitState | undefined;
377
+ lastEvent: (pluginId: string) => string | undefined;
378
+ errors: Readonly<Record<string, string>>;
379
+ };
380
+ /**
381
+ * Mounts one headless `OrbitalServerRuntime` per plugin against the ambient
382
+ * event bus + slot provider. Renders nothing of its own besides an optional
383
+ * `children` passthrough — MUST be mounted inside `EventBusProvider` +
384
+ * `UISlotProvider`.
385
+ */
386
+ declare function OrbitalPluginHost({ plugins, mode, transport, deny, navigate, notify, onTransition, children, }: OrbitalPluginHostProps): React__default.ReactElement;
387
+
388
+ 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 };
@@ -3,12 +3,13 @@ import { EventPayload, ServiceParams, ResolvedTraitBinding, ResolvedPage, Resolv
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
- import '../useEventBus-CQWyAWpK.js';
6
+ import { K as KeyCaptureTable } from '../useKeyboardRouter-D84cNWmA.js';
7
7
  import { c as useUISlots } from '../UISlotContext-CB89mv7N.js';
8
- import { E as EntityBindingSource, S as ServerBridgeTransport } from '../EntityBindingContext-0Evn_LcT.js';
9
- export { a as EntitySchemaContextValue, b as EntitySchemaProvider, c as EntitySchemaProviderProps, d as ServerBridgeContextValue, e as ServerBridgeProvider, f as ServerClientEffect, T as TraitContext, g as TraitContextValue, h as TraitInstance, i as TraitProvider, j as TraitProviderProps, u as useEntitySchema, k as useEntitySchemaOptional, l as useServerBridge, m as useTrait, n as useTraitContext } from '../EntityBindingContext-0Evn_LcT.js';
8
+ import { a as EntityBindingSource, h as ServerBridgeTransport } from '../EntityBindingContext-Bn3ePJQC.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-Bn3ePJQC.js';
10
10
  export { PERF_NAMESPACE, PerfEntry, PreparedPreviewSchema, adjustSchemaForMockData, buildMockData, clearPerf, perfEnd, perfStart, perfTime, prepareSchemaForPreview, wrapCallbackForEvent } from '@almadar/runtime/ui';
11
- import React__default from 'react';
11
+ import React__default, { ReactNode } from 'react';
12
+ export { S as SlotHostManifest, a as SlotHostRegion, b as assertUniqueSlotsPerHost } from '../slot-host-Czc2JAxo.js';
12
13
  export { p as profilerOnRender, u as usePerfBuffer } from '../perf-DaVdsbU0.js';
13
14
  import '../event-bus-types-Bl78kokd.js';
14
15
  import '../useUISlots-GNwGLlW2.js';
@@ -309,7 +310,79 @@ interface BrowserPlaygroundProps {
309
310
  height?: string;
310
311
  /** CSS class for the outer container. */
311
312
  className?: string;
313
+ /** Pause the in-process runtime's tick scheduler. Default: undefined (running, same as today). */
314
+ paused?: boolean;
312
315
  }
313
- declare function BrowserPlayground({ schema, mode, initialPagePath, height, className, }: BrowserPlaygroundProps): React__default.ReactElement;
316
+ declare function BrowserPlayground({ schema, mode, initialPagePath, height, className, paused, }: BrowserPlaygroundProps): React__default.ReactElement;
314
317
 
315
- export { BrowserPlayground, type BrowserPlaygroundProps, type ClientEventBus, type CreateClientEffectHandlersOptions, OrbPreview, type OrbPreviewProps, type ResolvedSchemaResult, ServerBridgeTransport, type SlotPatternEntry, type SlotSetter, type SlotSource, type TraitStateMachineResult, type UseTraitStateMachineOptions, clearSchemaCache, createClientEffectHandlers, useResolvedSchema, useTraitStateMachine };
318
+ /**
319
+ * OrbitalPluginHost — runs an ordinary behavior headless against the
320
+ * AMBIENT event bus + slot provider (Almadar Studio V4 §14 plan, Part F1).
321
+ *
322
+ * A "plugin" is not a new kind of artifact: it is a `.lolo` behavior a host
323
+ * chooses to run in its own `OrbitalServerRuntime`, wired to the SAME bus
324
+ * and slots every other UI component uses. One runtime per plugin (mirrors
325
+ * `BrowserPlayground`'s single-schema mount, generalized over a list).
326
+ * Default policy denies nothing — a plugin has the full behavior power a
327
+ * preview has (in-memory persist, mock services); `deny` is an opt-in
328
+ * host policy, never a default sandbox.
329
+ *
330
+ * @packageDocumentation
331
+ */
332
+
333
+ /** Verbs a host may deny. Never includes `emit` — the runtime's own emit
334
+ * handler drives the internal `listens` cascade and must never be replaced. */
335
+ type PluginHostDenyVerb = 'persist' | 'call-service' | 'navigate' | 'notify';
336
+ /** One bus-event → orbital-event wiring: `UI:<busEvent>` dispatches `trigger` at `orbital`/`trait`. */
337
+ interface PluginHostInbound {
338
+ busEvent: string;
339
+ orbital: string;
340
+ trait: string;
341
+ trigger: string;
342
+ }
343
+ interface PluginHostPlugin {
344
+ id: string;
345
+ schema: OrbitalSchema;
346
+ inbound: PluginHostInbound[];
347
+ }
348
+ interface OrbitalPluginHostProps {
349
+ plugins: PluginHostPlugin[];
350
+ /** 'mock' (default): in-memory persist, mock services — full behavior power, as any preview.
351
+ * 'server': dispatch through `transport` instead of a local runtime, as `AlmadarApp`. */
352
+ mode?: 'mock' | 'server';
353
+ /** Required when `mode === 'server'`. */
354
+ transport?: ServerBridgeTransport;
355
+ /** OPTIONAL policy: verbs listed here are denied with a logged warning, never a throw. Default: none denied. */
356
+ deny?: PluginHostDenyVerb[];
357
+ navigate?: (path: string) => void;
358
+ notify?: (message: string, type?: string) => void;
359
+ onTransition?: (pluginId: string, orbital: string, trait: string, state: string) => void;
360
+ children?: ReactNode;
361
+ }
362
+ /**
363
+ * Reads the declared `keymap` config knob off the plugin's own trait and the
364
+ * live `currentState`, so `useKeyboardRouter`'s capture table always follows
365
+ * the trait's actual mode. Re-derives whenever the host records a new
366
+ * transition (the context's `tick`).
367
+ */
368
+ declare function useDeclaredCaptureTable(opts: {
369
+ pluginId: string;
370
+ orbital: string;
371
+ trait: string;
372
+ keymapKnob?: string;
373
+ target?: string;
374
+ }): KeyCaptureTable;
375
+ declare function useOrbitalPluginHost(): {
376
+ getState: (pluginId: string, orbital: string, trait: string) => TraitState | undefined;
377
+ lastEvent: (pluginId: string) => string | undefined;
378
+ errors: Readonly<Record<string, string>>;
379
+ };
380
+ /**
381
+ * Mounts one headless `OrbitalServerRuntime` per plugin against the ambient
382
+ * event bus + slot provider. Renders nothing of its own besides an optional
383
+ * `children` passthrough — MUST be mounted inside `EventBusProvider` +
384
+ * `UISlotProvider`.
385
+ */
386
+ declare function OrbitalPluginHost({ plugins, mode, transport, deny, navigate, notify, onTransition, children, }: OrbitalPluginHostProps): React__default.ReactElement;
387
+
388
+ 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 };