@almadar/ui 6.4.0 → 6.6.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 (46) 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 +2755 -1532
  6. package/dist/avl/index.js +1710 -487
  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 +2518 -1692
  12. package/dist/components/index.d.cts +178 -25
  13. package/dist/components/index.d.ts +178 -25
  14. package/dist/components/index.js +1500 -677
  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 +2346 -1399
  32. package/dist/providers/index.d.cts +2 -2
  33. package/dist/providers/index.d.ts +2 -2
  34. package/dist/providers/index.js +1389 -442
  35. package/dist/runtime/index.cjs +2892 -1356
  36. package/dist/runtime/index.d.cts +78 -6
  37. package/dist/runtime/index.d.ts +78 -6
  38. package/dist/runtime/index.js +1974 -441
  39. package/dist/{useEventBus-CQWyAWpK.d.ts → useKeyboardRouter-D84cNWmA.d.ts} +31 -1
  40. package/dist/{useEventBus-Ckr4wqW3.d.cts → useKeyboardRouter-DQEE_9mq.d.cts} +31 -1
  41. package/locales/ar.json +2 -1
  42. package/locales/en.json +2 -1
  43. package/locales/sl.json +2 -1
  44. package/package.json +4 -4
  45. package/themes/comic.css +437 -0
  46. package/themes/index.css +1 -0
@@ -3,12 +3,12 @@ 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
12
  export { p as profilerOnRender, u as usePerfBuffer } from '../perf-DaVdsbU0.cjs';
13
13
  import '../event-bus-types-Bl78kokd.cjs';
14
14
  import '../useUISlots-GNwGLlW2.cjs';
@@ -309,7 +309,79 @@ interface BrowserPlaygroundProps {
309
309
  height?: string;
310
310
  /** CSS class for the outer container. */
311
311
  className?: string;
312
+ /** Pause the in-process runtime's tick scheduler. Default: undefined (running, same as today). */
313
+ paused?: boolean;
312
314
  }
313
- declare function BrowserPlayground({ schema, mode, initialPagePath, height, className, }: BrowserPlaygroundProps): React__default.ReactElement;
315
+ declare function BrowserPlayground({ schema, mode, initialPagePath, height, className, paused, }: BrowserPlaygroundProps): React__default.ReactElement;
314
316
 
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 };
317
+ /**
318
+ * OrbitalPluginHost — runs an ordinary behavior headless against the
319
+ * AMBIENT event bus + slot provider (Almadar Studio V4 §14 plan, Part F1).
320
+ *
321
+ * A "plugin" is not a new kind of artifact: it is a `.lolo` behavior a host
322
+ * chooses to run in its own `OrbitalServerRuntime`, wired to the SAME bus
323
+ * and slots every other UI component uses. One runtime per plugin (mirrors
324
+ * `BrowserPlayground`'s single-schema mount, generalized over a list).
325
+ * Default policy denies nothing — a plugin has the full behavior power a
326
+ * preview has (in-memory persist, mock services); `deny` is an opt-in
327
+ * host policy, never a default sandbox.
328
+ *
329
+ * @packageDocumentation
330
+ */
331
+
332
+ /** Verbs a host may deny. Never includes `emit` — the runtime's own emit
333
+ * handler drives the internal `listens` cascade and must never be replaced. */
334
+ type PluginHostDenyVerb = 'persist' | 'call-service' | 'navigate' | 'notify';
335
+ /** One bus-event → orbital-event wiring: `UI:<busEvent>` dispatches `trigger` at `orbital`/`trait`. */
336
+ interface PluginHostInbound {
337
+ busEvent: string;
338
+ orbital: string;
339
+ trait: string;
340
+ trigger: string;
341
+ }
342
+ interface PluginHostPlugin {
343
+ id: string;
344
+ schema: OrbitalSchema;
345
+ inbound: PluginHostInbound[];
346
+ }
347
+ interface OrbitalPluginHostProps {
348
+ plugins: PluginHostPlugin[];
349
+ /** 'mock' (default): in-memory persist, mock services — full behavior power, as any preview.
350
+ * 'server': dispatch through `transport` instead of a local runtime, as `AlmadarApp`. */
351
+ mode?: 'mock' | 'server';
352
+ /** Required when `mode === 'server'`. */
353
+ transport?: ServerBridgeTransport;
354
+ /** OPTIONAL policy: verbs listed here are denied with a logged warning, never a throw. Default: none denied. */
355
+ deny?: PluginHostDenyVerb[];
356
+ navigate?: (path: string) => void;
357
+ notify?: (message: string, type?: string) => void;
358
+ onTransition?: (pluginId: string, orbital: string, trait: string, state: string) => void;
359
+ children?: ReactNode;
360
+ }
361
+ /**
362
+ * Reads the declared `keymap` config knob off the plugin's own trait and the
363
+ * live `currentState`, so `useKeyboardRouter`'s capture table always follows
364
+ * the trait's actual mode. Re-derives whenever the host records a new
365
+ * transition (the context's `tick`).
366
+ */
367
+ declare function useDeclaredCaptureTable(opts: {
368
+ pluginId: string;
369
+ orbital: string;
370
+ trait: string;
371
+ keymapKnob?: string;
372
+ target?: string;
373
+ }): KeyCaptureTable;
374
+ declare function useOrbitalPluginHost(): {
375
+ getState: (pluginId: string, orbital: string, trait: string) => TraitState | undefined;
376
+ lastEvent: (pluginId: string) => string | undefined;
377
+ errors: Readonly<Record<string, string>>;
378
+ };
379
+ /**
380
+ * Mounts one headless `OrbitalServerRuntime` per plugin against the ambient
381
+ * event bus + slot provider. Renders nothing of its own besides an optional
382
+ * `children` passthrough — MUST be mounted inside `EventBusProvider` +
383
+ * `UISlotProvider`.
384
+ */
385
+ declare function OrbitalPluginHost({ plugins, mode, transport, deny, navigate, notify, onTransition, children, }: OrbitalPluginHostProps): React__default.ReactElement;
386
+
387
+ 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,12 @@ 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
12
  export { p as profilerOnRender, u as usePerfBuffer } from '../perf-DaVdsbU0.js';
13
13
  import '../event-bus-types-Bl78kokd.js';
14
14
  import '../useUISlots-GNwGLlW2.js';
@@ -309,7 +309,79 @@ interface BrowserPlaygroundProps {
309
309
  height?: string;
310
310
  /** CSS class for the outer container. */
311
311
  className?: string;
312
+ /** Pause the in-process runtime's tick scheduler. Default: undefined (running, same as today). */
313
+ paused?: boolean;
312
314
  }
313
- declare function BrowserPlayground({ schema, mode, initialPagePath, height, className, }: BrowserPlaygroundProps): React__default.ReactElement;
315
+ declare function BrowserPlayground({ schema, mode, initialPagePath, height, className, paused, }: BrowserPlaygroundProps): React__default.ReactElement;
314
316
 
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 };
317
+ /**
318
+ * OrbitalPluginHost — runs an ordinary behavior headless against the
319
+ * AMBIENT event bus + slot provider (Almadar Studio V4 §14 plan, Part F1).
320
+ *
321
+ * A "plugin" is not a new kind of artifact: it is a `.lolo` behavior a host
322
+ * chooses to run in its own `OrbitalServerRuntime`, wired to the SAME bus
323
+ * and slots every other UI component uses. One runtime per plugin (mirrors
324
+ * `BrowserPlayground`'s single-schema mount, generalized over a list).
325
+ * Default policy denies nothing — a plugin has the full behavior power a
326
+ * preview has (in-memory persist, mock services); `deny` is an opt-in
327
+ * host policy, never a default sandbox.
328
+ *
329
+ * @packageDocumentation
330
+ */
331
+
332
+ /** Verbs a host may deny. Never includes `emit` — the runtime's own emit
333
+ * handler drives the internal `listens` cascade and must never be replaced. */
334
+ type PluginHostDenyVerb = 'persist' | 'call-service' | 'navigate' | 'notify';
335
+ /** One bus-event → orbital-event wiring: `UI:<busEvent>` dispatches `trigger` at `orbital`/`trait`. */
336
+ interface PluginHostInbound {
337
+ busEvent: string;
338
+ orbital: string;
339
+ trait: string;
340
+ trigger: string;
341
+ }
342
+ interface PluginHostPlugin {
343
+ id: string;
344
+ schema: OrbitalSchema;
345
+ inbound: PluginHostInbound[];
346
+ }
347
+ interface OrbitalPluginHostProps {
348
+ plugins: PluginHostPlugin[];
349
+ /** 'mock' (default): in-memory persist, mock services — full behavior power, as any preview.
350
+ * 'server': dispatch through `transport` instead of a local runtime, as `AlmadarApp`. */
351
+ mode?: 'mock' | 'server';
352
+ /** Required when `mode === 'server'`. */
353
+ transport?: ServerBridgeTransport;
354
+ /** OPTIONAL policy: verbs listed here are denied with a logged warning, never a throw. Default: none denied. */
355
+ deny?: PluginHostDenyVerb[];
356
+ navigate?: (path: string) => void;
357
+ notify?: (message: string, type?: string) => void;
358
+ onTransition?: (pluginId: string, orbital: string, trait: string, state: string) => void;
359
+ children?: ReactNode;
360
+ }
361
+ /**
362
+ * Reads the declared `keymap` config knob off the plugin's own trait and the
363
+ * live `currentState`, so `useKeyboardRouter`'s capture table always follows
364
+ * the trait's actual mode. Re-derives whenever the host records a new
365
+ * transition (the context's `tick`).
366
+ */
367
+ declare function useDeclaredCaptureTable(opts: {
368
+ pluginId: string;
369
+ orbital: string;
370
+ trait: string;
371
+ keymapKnob?: string;
372
+ target?: string;
373
+ }): KeyCaptureTable;
374
+ declare function useOrbitalPluginHost(): {
375
+ getState: (pluginId: string, orbital: string, trait: string) => TraitState | undefined;
376
+ lastEvent: (pluginId: string) => string | undefined;
377
+ errors: Readonly<Record<string, string>>;
378
+ };
379
+ /**
380
+ * Mounts one headless `OrbitalServerRuntime` per plugin against the ambient
381
+ * event bus + slot provider. Renders nothing of its own besides an optional
382
+ * `children` passthrough — MUST be mounted inside `EventBusProvider` +
383
+ * `UISlotProvider`.
384
+ */
385
+ declare function OrbitalPluginHost({ plugins, mode, transport, deny, navigate, notify, onTransition, children, }: OrbitalPluginHostProps): React__default.ReactElement;
386
+
387
+ 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 };