@almadar/ui 6.7.0 → 6.9.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.
@@ -3,7 +3,7 @@ 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 { K as KeyCaptureTable } from '../useKeyboardRouter-DQEE_9mq.cjs';
6
+ import { K as KeyCaptureTable } from '../useKeyboardRouter-CVn8lfiX.cjs';
7
7
  import { c as useUISlots } from '../UISlotContext-BlRDbHDy.cjs';
8
8
  import { a as EntityBindingSource, h as ServerBridgeTransport } from '../EntityBindingContext-Bn3ePJQC.cjs';
9
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';
@@ -327,6 +327,34 @@ declare function BrowserPlayground({ schema, mode, initialPagePath, height, clas
327
327
  * preview has (in-memory persist, mock services); `deny` is an opt-in
328
328
  * host policy, never a default sandbox.
329
329
  *
330
+ * OUTBOUND = the runtime's internal event bus, not the direct dispatch
331
+ * response. `response.emittedEvents` (mock mode) reflects only the effects
332
+ * of the trait `dispatch()` DIRECTLY targeted — a sibling trait that reacts
333
+ * through the runtime's own cascade (`setupEventListeners`, a SEPARATE
334
+ * `processOrbitalEvent` call whose response is discarded) never shows up
335
+ * there, so its emits never reached the ambient bus (verified 2026-09-04:
336
+ * vim-mode's `Shell` relays `PLUGIN_ENABLED` -> `VimStudioBridge`'s
337
+ * `ENABLED` arm emits `STATUS` + 2x `REGISTER_COMMAND`, none of which
338
+ * reached the studio's status bar/palette). Fix: for `mode: 'mock'`, one
339
+ * `runtime.getEventBus().onAny(...)` subscription per plugin (mounted
340
+ * alongside the runtime, not per-dispatch) is the ONLY outbound path — it
341
+ * sees every emit, direct or cascaded, since every `emit` effect passes
342
+ * through that same bus. `mode: 'server'` has no local bus to subscribe to
343
+ * (the runtime lives on the remote transport), so it keeps reading
344
+ * `response.emittedEvents` for outbound — same single-hop-only limitation
345
+ * this fix removes for mock mode, unaddressed here (no `mode: 'server'`
346
+ * consumer exists yet; see `docs/Almadar_UI_Gaps.md`).
347
+ *
348
+ * RELAY RULE: the plugin's `inbound[]` is its host→plugin vocabulary — one
349
+ * `UI:<busEvent>` bus event per row, dispatching `trigger` at
350
+ * `orbital`/`trait`. Anything a plugin emits under one of those SAME
351
+ * busEvent names (or under an inbound `trigger` name) is a relay for its
352
+ * own siblings' `listens {}` (the runtime's internal event bus already
353
+ * carries that fan-out), never a fresh request back to the host, and must
354
+ * NEVER be re-broadcast — doing so re-fires the very `UI:<busEvent>`
355
+ * listener that produced it, a synchronous self-feeding loop (verified
356
+ * 2026-09-04, see `docs/Almadar_UI_Gaps.md`).
357
+ *
330
358
  * @packageDocumentation
331
359
  */
332
360
 
@@ -364,13 +392,18 @@ interface OrbitalPluginHostProps {
364
392
  * live `currentState`, so `useKeyboardRouter`'s capture table always follows
365
393
  * the trait's actual mode. Re-derives whenever the host records a new
366
394
  * transition (the context's `tick`).
395
+ *
396
+ * `target` accepts either one target string (default `'shell'`) or a list of
397
+ * targets — the SAME derived entry (mode + keys) is repeated under every
398
+ * target, for a caller keying its table by several editor ids at once (e.g.
399
+ * one plugin's mode capturing keys for both `'schema'` and `'file:a.md'`).
367
400
  */
368
401
  declare function useDeclaredCaptureTable(opts: {
369
402
  pluginId: string;
370
403
  orbital: string;
371
404
  trait: string;
372
405
  keymapKnob?: string;
373
- target?: string;
406
+ target?: string | readonly string[];
374
407
  }): KeyCaptureTable;
375
408
  declare function useOrbitalPluginHost(): {
376
409
  getState: (pluginId: string, orbital: string, trait: string) => TraitState | undefined;
@@ -3,7 +3,7 @@ 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 { K as KeyCaptureTable } from '../useKeyboardRouter-D84cNWmA.js';
6
+ import { K as KeyCaptureTable } from '../useKeyboardRouter-B1pIi9jo.js';
7
7
  import { c as useUISlots } from '../UISlotContext-CB89mv7N.js';
8
8
  import { a as EntityBindingSource, h as ServerBridgeTransport } from '../EntityBindingContext-Bn3ePJQC.js';
9
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';
@@ -327,6 +327,34 @@ declare function BrowserPlayground({ schema, mode, initialPagePath, height, clas
327
327
  * preview has (in-memory persist, mock services); `deny` is an opt-in
328
328
  * host policy, never a default sandbox.
329
329
  *
330
+ * OUTBOUND = the runtime's internal event bus, not the direct dispatch
331
+ * response. `response.emittedEvents` (mock mode) reflects only the effects
332
+ * of the trait `dispatch()` DIRECTLY targeted — a sibling trait that reacts
333
+ * through the runtime's own cascade (`setupEventListeners`, a SEPARATE
334
+ * `processOrbitalEvent` call whose response is discarded) never shows up
335
+ * there, so its emits never reached the ambient bus (verified 2026-09-04:
336
+ * vim-mode's `Shell` relays `PLUGIN_ENABLED` -> `VimStudioBridge`'s
337
+ * `ENABLED` arm emits `STATUS` + 2x `REGISTER_COMMAND`, none of which
338
+ * reached the studio's status bar/palette). Fix: for `mode: 'mock'`, one
339
+ * `runtime.getEventBus().onAny(...)` subscription per plugin (mounted
340
+ * alongside the runtime, not per-dispatch) is the ONLY outbound path — it
341
+ * sees every emit, direct or cascaded, since every `emit` effect passes
342
+ * through that same bus. `mode: 'server'` has no local bus to subscribe to
343
+ * (the runtime lives on the remote transport), so it keeps reading
344
+ * `response.emittedEvents` for outbound — same single-hop-only limitation
345
+ * this fix removes for mock mode, unaddressed here (no `mode: 'server'`
346
+ * consumer exists yet; see `docs/Almadar_UI_Gaps.md`).
347
+ *
348
+ * RELAY RULE: the plugin's `inbound[]` is its host→plugin vocabulary — one
349
+ * `UI:<busEvent>` bus event per row, dispatching `trigger` at
350
+ * `orbital`/`trait`. Anything a plugin emits under one of those SAME
351
+ * busEvent names (or under an inbound `trigger` name) is a relay for its
352
+ * own siblings' `listens {}` (the runtime's internal event bus already
353
+ * carries that fan-out), never a fresh request back to the host, and must
354
+ * NEVER be re-broadcast — doing so re-fires the very `UI:<busEvent>`
355
+ * listener that produced it, a synchronous self-feeding loop (verified
356
+ * 2026-09-04, see `docs/Almadar_UI_Gaps.md`).
357
+ *
330
358
  * @packageDocumentation
331
359
  */
332
360
 
@@ -364,13 +392,18 @@ interface OrbitalPluginHostProps {
364
392
  * live `currentState`, so `useKeyboardRouter`'s capture table always follows
365
393
  * the trait's actual mode. Re-derives whenever the host records a new
366
394
  * transition (the context's `tick`).
395
+ *
396
+ * `target` accepts either one target string (default `'shell'`) or a list of
397
+ * targets — the SAME derived entry (mode + keys) is repeated under every
398
+ * target, for a caller keying its table by several editor ids at once (e.g.
399
+ * one plugin's mode capturing keys for both `'schema'` and `'file:a.md'`).
367
400
  */
368
401
  declare function useDeclaredCaptureTable(opts: {
369
402
  pluginId: string;
370
403
  orbital: string;
371
404
  trait: string;
372
405
  keymapKnob?: string;
373
- target?: string;
406
+ target?: string | readonly string[];
374
407
  }): KeyCaptureTable;
375
408
  declare function useOrbitalPluginHost(): {
376
409
  getState: (pluginId: string, orbital: string, trait: string) => TraitState | undefined;