@almadar/ui 6.23.0 → 6.24.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.
@@ -7710,7 +7710,7 @@ function recordTransition(trace) {
7710
7710
  ...trace,
7711
7711
  id: `t-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`
7712
7712
  };
7713
- log4.debug("transition:recorded", { trait: trace.traitName, from: trace.from, to: trace.to, event: trace.event, effectCount: trace.effects.length });
7713
+ log5.debug("transition:recorded", { trait: trace.traitName, from: trace.from, to: trace.to, event: trace.event, effectCount: trace.effects.length });
7714
7714
  getState().transitions.push(entry);
7715
7715
  if (getState().transitions.length > MAX_TRANSITIONS) {
7716
7716
  getState().transitions.shift();
@@ -7828,7 +7828,7 @@ function getTraitSnapshots() {
7828
7828
  try {
7829
7829
  snapshots.push(getter());
7830
7830
  } catch (err) {
7831
- log4.error("traitSnapshot getter failed", { trait: traitName, err: String(err) });
7831
+ log5.error("traitSnapshot getter failed", { trait: traitName, err: String(err) });
7832
7832
  }
7833
7833
  }
7834
7834
  return snapshots;
@@ -7934,10 +7934,10 @@ function updateAssetStatus(url, status) {
7934
7934
  window.__orbitalVerification.assetStatus[url] = status;
7935
7935
  }
7936
7936
  }
7937
- var log4, MAX_TRANSITIONS;
7937
+ var log5, MAX_TRANSITIONS;
7938
7938
  var init_verificationRegistry = __esm({
7939
7939
  "lib/verificationRegistry.ts"() {
7940
- log4 = logger.createLogger("almadar:bridge");
7940
+ log5 = logger.createLogger("almadar:bridge");
7941
7941
  MAX_TRANSITIONS = 500;
7942
7942
  exposeOnWindow();
7943
7943
  }
@@ -16776,7 +16776,7 @@ var init_avl_elk_layout = __esm({
16776
16776
  elk = new ELK__default.default();
16777
16777
  }
16778
16778
  });
16779
- var log5, SWIM_GUTTER, CENTER_W, BehaviorView;
16779
+ var log6, SWIM_GUTTER, CENTER_W, BehaviorView;
16780
16780
  var init_BehaviorView = __esm({
16781
16781
  "components/avl/molecules/BehaviorView.tsx"() {
16782
16782
  "use client";
@@ -16785,7 +16785,7 @@ var init_BehaviorView = __esm({
16785
16785
  init_AvlSwimLane();
16786
16786
  init_avl_atom_types();
16787
16787
  init_avl_elk_layout();
16788
- log5 = logger.createLogger("almadar:ui:avl:behavior-view");
16788
+ log6 = logger.createLogger("almadar:ui:avl:behavior-view");
16789
16789
  SWIM_GUTTER = 120;
16790
16790
  CENTER_W = 360;
16791
16791
  BehaviorView = ({ data }) => {
@@ -16796,7 +16796,7 @@ var init_BehaviorView = __esm({
16796
16796
  const dataKey = React87.useMemo(() => JSON.stringify(traitData), [traitData]);
16797
16797
  React87.useEffect(() => {
16798
16798
  if (!traitData) return;
16799
- computeTraitLayout(traitData).then(setLayout).catch((err) => log5.error("compute-trait-layout-failed", { error: err instanceof Error ? err : String(err) }));
16799
+ computeTraitLayout(traitData).then(setLayout).catch((err) => log6.error("compute-trait-layout-failed", { error: err instanceof Error ? err : String(err) }));
16800
16800
  }, [dataKey]);
16801
16801
  if (!traitData) {
16802
16802
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "rounded-lg border border-[var(--color-border)] bg-[var(--color-card)] p-4 text-center text-[var(--color-muted-foreground)] text-sm", children: t("avl.noTraitData") });
@@ -18716,7 +18716,7 @@ function translateProgram(source, language, lang) {
18716
18716
  }
18717
18717
  return source;
18718
18718
  }
18719
- var dynamicallyLoaded, codeLanguageLoader, orbStyleOverrides, orbStyle, loloStyleOverrides, loloStyle, log6, CODE_LANGUAGES, CODE_LANGUAGE_SET, DIFF_STYLES, DIFF_STYLE_FALLBACK, LINE_PROPS_FN, HIDDEN_LINE_NUMBERS, HIGHLIGHT_CAPACITY_BYTES, MONO_FONT_FAMILY, VIEWER_LINE_NUMBER_STYLE, CodeBlock;
18719
+ var dynamicallyLoaded, codeLanguageLoader, orbStyleOverrides, orbStyle, loloStyleOverrides, loloStyle, log7, CODE_LANGUAGES, CODE_LANGUAGE_SET, DIFF_STYLES, DIFF_STYLE_FALLBACK, LINE_PROPS_FN, HIDDEN_LINE_NUMBERS, HIGHLIGHT_CAPACITY_BYTES, MONO_FONT_FAMILY, VIEWER_LINE_NUMBER_STYLE, CodeBlock;
18720
18720
  var init_CodeBlock = __esm({
18721
18721
  "components/core/molecules/markdown/CodeBlock.tsx"() {
18722
18722
  init_cn();
@@ -18855,7 +18855,7 @@ var init_CodeBlock = __esm({
18855
18855
  "lolo-op-async": { color: syntax.ORB_COLORS.dark.async }
18856
18856
  };
18857
18857
  loloStyle = { ...dark__default.default, ...loloStyleOverrides };
18858
- log6 = logger.createLogger("almadar:ui:markdown-code");
18858
+ log7 = logger.createLogger("almadar:ui:markdown-code");
18859
18859
  CODE_LANGUAGES = [
18860
18860
  "text",
18861
18861
  "json",
@@ -19494,7 +19494,7 @@ var init_CodeBlock = __esm({
19494
19494
  eventBus.emit("UI:COPY_CODE", { language: activeLanguage, success: true });
19495
19495
  setTimeout(() => setCopied(false), 2e3);
19496
19496
  } catch (err) {
19497
- log6.error("Failed to copy code", { error: err instanceof Error ? err : String(err) });
19497
+ log7.error("Failed to copy code", { error: err instanceof Error ? err : String(err) });
19498
19498
  eventBus.emit("UI:COPY_CODE", { language: activeLanguage, success: false });
19499
19499
  }
19500
19500
  };
@@ -19944,7 +19944,7 @@ function loadMermaid() {
19944
19944
  mermaidModule ?? (mermaidModule = import('mermaid').then((m) => m.default));
19945
19945
  return mermaidModule;
19946
19946
  }
19947
- var log7, mermaidModule, MermaidDiagram;
19947
+ var log8, mermaidModule, MermaidDiagram;
19948
19948
  var init_MermaidDiagram = __esm({
19949
19949
  "components/core/molecules/markdown/MermaidDiagram.tsx"() {
19950
19950
  init_Box();
@@ -19952,7 +19952,7 @@ var init_MermaidDiagram = __esm({
19952
19952
  init_CodeBlock();
19953
19953
  init_mermaidSource();
19954
19954
  init_cn();
19955
- log7 = logger.createLogger("almadar:ui:mermaid-diagram");
19955
+ log8 = logger.createLogger("almadar:ui:mermaid-diagram");
19956
19956
  mermaidModule = null;
19957
19957
  MermaidDiagram = React87__namespace.default.memo(
19958
19958
  ({ code, className }) => {
@@ -19986,14 +19986,14 @@ var init_MermaidDiagram = __esm({
19986
19986
  container.innerHTML = svg;
19987
19987
  container.dataset.mermaidRepaired = String(index > 0);
19988
19988
  setUnrenderable(false);
19989
- if (index > 0) log7.debug("mermaid:repaired", { candidate: index });
19989
+ if (index > 0) log8.debug("mermaid:repaired", { candidate: index });
19990
19990
  return;
19991
19991
  } catch (err) {
19992
19992
  firstError ?? (firstError = err instanceof Error ? err : new Error(String(err)));
19993
19993
  }
19994
19994
  }
19995
19995
  if (!active) return;
19996
- log7.warn("mermaid:unrenderable", { error: firstError?.message ?? "", code });
19996
+ log8.warn("mermaid:unrenderable", { error: firstError?.message ?? "", code });
19997
19997
  setUnrenderable(true);
19998
19998
  })();
19999
19999
  return () => {
@@ -23364,14 +23364,14 @@ function useSafeEventBus2() {
23364
23364
  } };
23365
23365
  }
23366
23366
  }
23367
- var log8, lookStyles4, ButtonGroup;
23367
+ var log9, lookStyles4, ButtonGroup;
23368
23368
  var init_ButtonGroup = __esm({
23369
23369
  "components/core/molecules/ButtonGroup.tsx"() {
23370
23370
  "use client";
23371
23371
  init_cn();
23372
23372
  init_atoms();
23373
23373
  init_useEventBus();
23374
- log8 = logger.createLogger("almadar:ui:button-group");
23374
+ log9 = logger.createLogger("almadar:ui:button-group");
23375
23375
  lookStyles4 = {
23376
23376
  "right-aligned-buttons": "",
23377
23377
  "floating-bar": "fixed bottom-section left-1/2 -translate-x-1/2 shadow-elevation-toast bg-card p-card-sm rounded-container",
@@ -23452,7 +23452,7 @@ var init_ButtonGroup = __esm({
23452
23452
  {
23453
23453
  variant: "ghost",
23454
23454
  onClick: () => {
23455
- log8.debug("Filter clicked", { field: filter.field });
23455
+ log9.debug("Filter clicked", { field: filter.field });
23456
23456
  },
23457
23457
  children: filter.label
23458
23458
  },
@@ -31255,9 +31255,9 @@ function debug(...args) {
31255
31255
  const [first, ...rest] = args;
31256
31256
  const message = typeof first === "string" ? first : "<debug>";
31257
31257
  if (rest.length === 0 && typeof first === "string") {
31258
- log9.debug(message);
31258
+ log10.debug(message);
31259
31259
  } else {
31260
- log9.debug(message, { args: rest.length > 0 ? formatArgs(rest) : formatArgs([first]) });
31260
+ log10.debug(message, { args: rest.length > 0 ? formatArgs(rest) : formatArgs([first]) });
31261
31261
  }
31262
31262
  }
31263
31263
  function debugGroup(label) {
@@ -31285,11 +31285,11 @@ function toLogMetaValue(v) {
31285
31285
  }
31286
31286
  return String(v);
31287
31287
  }
31288
- var NAMESPACE, log9;
31288
+ var NAMESPACE, log10;
31289
31289
  var init_debug = __esm({
31290
31290
  "lib/debug.ts"() {
31291
31291
  NAMESPACE = "almadar:ui:debug";
31292
- log9 = logger.createLogger(NAMESPACE);
31292
+ log10 = logger.createLogger(NAMESPACE);
31293
31293
  logger.createLogger("almadar:ui:debug:input");
31294
31294
  logger.createLogger("almadar:ui:debug:collision");
31295
31295
  logger.createLogger("almadar:ui:debug:physics");
@@ -34567,13 +34567,13 @@ var init_MapView = __esm({
34567
34567
  shadowSize: [41, 41]
34568
34568
  });
34569
34569
  L.Marker.prototype.options.icon = defaultIcon;
34570
- const { useEffect: useEffect68, useRef: useRef69, useCallback: useCallback96, useState: useState102 } = React87__namespace.default;
34570
+ const { useEffect: useEffect69, useRef: useRef70, useCallback: useCallback97, useState: useState103 } = React87__namespace.default;
34571
34571
  const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
34572
34572
  const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
34573
34573
  function MapUpdater({ centerLat, centerLng, zoom }) {
34574
34574
  const map = useMap();
34575
- const prevRef = useRef69({ centerLat, centerLng, zoom });
34576
- useEffect68(() => {
34575
+ const prevRef = useRef70({ centerLat, centerLng, zoom });
34576
+ useEffect69(() => {
34577
34577
  const prev = prevRef.current;
34578
34578
  if (prev.centerLat !== centerLat || prev.centerLng !== centerLng || prev.zoom !== zoom) {
34579
34579
  map.setView([centerLat, centerLng], zoom);
@@ -34584,7 +34584,7 @@ var init_MapView = __esm({
34584
34584
  }
34585
34585
  function MapClickHandler({ onMapClick }) {
34586
34586
  const map = useMap();
34587
- useEffect68(() => {
34587
+ useEffect69(() => {
34588
34588
  if (!onMapClick) return;
34589
34589
  const handler = (e) => {
34590
34590
  onMapClick(e.latlng.lat, e.latlng.lng);
@@ -34612,8 +34612,8 @@ var init_MapView = __esm({
34612
34612
  showAttribution = true
34613
34613
  }) {
34614
34614
  const eventBus = useEventBus2();
34615
- const [clickedPosition, setClickedPosition] = useState102(null);
34616
- const handleMapClick = useCallback96((lat, lng) => {
34615
+ const [clickedPosition, setClickedPosition] = useState103(null);
34616
+ const handleMapClick = useCallback97((lat, lng) => {
34617
34617
  if (showClickedPin) {
34618
34618
  setClickedPosition({ lat, lng });
34619
34619
  }
@@ -34622,7 +34622,7 @@ var init_MapView = __esm({
34622
34622
  eventBus.emit(`UI:${mapClickEvent}`, { latitude: lat, longitude: lng });
34623
34623
  }
34624
34624
  }, [onMapClick, mapClickEvent, eventBus, showClickedPin]);
34625
- const handleMarkerClick = useCallback96((marker) => {
34625
+ const handleMarkerClick = useCallback97((marker) => {
34626
34626
  onMarkerClick?.(marker);
34627
34627
  if (markerClickEvent) {
34628
34628
  eventBus.emit(`UI:${markerClickEvent}`, { ...marker });
@@ -49209,7 +49209,7 @@ function getAllEvents(traits2) {
49209
49209
  function EventDispatcherTab({ traits: traits2, schema }) {
49210
49210
  const eventBus = useEventBus();
49211
49211
  const { t } = hooks.useTranslate();
49212
- const [log11, setLog] = React87__namespace.useState([]);
49212
+ const [log12, setLog] = React87__namespace.useState([]);
49213
49213
  const prevStatesRef = React87__namespace.useRef(/* @__PURE__ */ new Map());
49214
49214
  React87__namespace.useEffect(() => {
49215
49215
  for (const trait of traits2) {
@@ -49273,9 +49273,9 @@ function EventDispatcherTab({ traits: traits2, schema }) {
49273
49273
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-1", children: t("debug.otherEvents") }),
49274
49274
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1", children: unavailableEvents.map((event) => /* @__PURE__ */ jsxRuntime.jsx(Badge, { variant: "default", size: "sm", className: "opacity-50", children: event }, event)) })
49275
49275
  ] }),
49276
- log11.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
49276
+ log12.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
49277
49277
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-muted-foreground mb-1", children: t("debug.recentTransitions") }),
49278
- /* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: "xs", children: log11.map((entry, i) => /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "font-mono text-xs", children: [
49278
+ /* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: "xs", children: log12.map((entry, i) => /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "font-mono text-xs", children: [
49279
49279
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: entry.traitName }),
49280
49280
  " ",
49281
49281
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: entry.from }),
@@ -53024,7 +53024,25 @@ var init_UISlotRenderer = __esm({
53024
53024
 
53025
53025
  // hooks/index.ts
53026
53026
  init_useEventBus();
53027
- var log2 = logger.createLogger("almadar:ui:shared-entity-store");
53027
+ logger.createLogger("almadar:ui:ui-slots");
53028
+ var ALL_SLOTS = core.UI_SLOTS.filter(
53029
+ (slot) => !slot.includes(".") && slot !== "hud" && slot !== "screen"
53030
+ );
53031
+ ALL_SLOTS.reduce(
53032
+ (acc, slot) => {
53033
+ acc[slot] = null;
53034
+ return acc;
53035
+ },
53036
+ {}
53037
+ );
53038
+ ALL_SLOTS.reduce(
53039
+ (acc, slot) => {
53040
+ acc[slot] = {};
53041
+ return acc;
53042
+ },
53043
+ {}
53044
+ );
53045
+ var log3 = logger.createLogger("almadar:ui:shared-entity-store");
53028
53046
  var EMPTY_ENTITY_STATE = {};
53029
53047
  function createSharedEntityStore() {
53030
53048
  const states = /* @__PURE__ */ new Map();
@@ -53054,7 +53072,7 @@ function createSharedEntityStore() {
53054
53072
  try {
53055
53073
  callback();
53056
53074
  } catch (error) {
53057
- log2.error("Shared entity subscriber error", {
53075
+ log3.error("Shared entity subscriber error", {
53058
53076
  entityId,
53059
53077
  error: error instanceof Error ? error : String(error)
53060
53078
  });
@@ -53085,7 +53103,7 @@ function runTickFrame(entityId, orderedWriters, store) {
53085
53103
  store.commit(entityId, scratch);
53086
53104
  return scratch;
53087
53105
  }
53088
- var log3 = logger.createLogger("almadar:ui:effects:client-handlers");
53106
+ var log4 = logger.createLogger("almadar:ui:effects:client-handlers");
53089
53107
  function createClientEffectHandlers(options) {
53090
53108
  const { eventBus, slotSetter, navigate, navigateBack, callService, liveEntity, persistDelegated, callServiceDelegated } = options;
53091
53109
  return {
@@ -53094,7 +53112,7 @@ function createClientEffectHandlers(options) {
53094
53112
  eventBus.emit(prefixedEvent, payload, source);
53095
53113
  },
53096
53114
  persist: async () => {
53097
- log3.debug("persist is server-side only, ignored on client");
53115
+ log4.debug("persist is server-side only, ignored on client");
53098
53116
  },
53099
53117
  // Bridge mode: the server runs every persist and the response
53100
53118
  // carries its outcome — tell the executor so the placeholder above is
@@ -53104,7 +53122,7 @@ function createClientEffectHandlers(options) {
53104
53122
  // @almadar/runtime EffectHandlers.set types value:unknown — should be FieldValue (upstream fix queued)
53105
53123
  set: ((_entityId, field, value) => {
53106
53124
  if (!liveEntity) {
53107
- log3.warn("set is server-side only, ignored on client (no live entity)");
53125
+ log4.warn("set is server-side only, ignored on client (no live entity)");
53108
53126
  return;
53109
53127
  }
53110
53128
  liveEntity[field] = value;
@@ -53140,10 +53158,10 @@ function createClientEffectHandlers(options) {
53140
53158
  window.location.href = path;
53141
53159
  return;
53142
53160
  }
53143
- log3.warn("No navigate handler, ignoring", { path });
53161
+ log4.warn("No navigate handler, ignoring", { path });
53144
53162
  }),
53145
53163
  navigateBack: navigateBack ?? (() => {
53146
- log3.warn("No navigate-back handler, ignoring");
53164
+ log4.warn("No navigate-back handler, ignoring");
53147
53165
  })
53148
53166
  };
53149
53167
  }
@@ -53397,6 +53415,13 @@ function effectsCallOp(effects, ops) {
53397
53415
  }
53398
53416
  return false;
53399
53417
  }
53418
+ function diffDroppedTraitNames(prev, next) {
53419
+ const dropped = [];
53420
+ for (const name of prev) {
53421
+ if (!next.has(name)) dropped.push(name);
53422
+ }
53423
+ return dropped;
53424
+ }
53400
53425
  function classifySharedTick(tick) {
53401
53426
  const writes = effectsCallOp(tick.effects, SHARED_ENTITY_WRITE_OPS);
53402
53427
  const renders = effectsCallOp(tick.effects, SHARED_ENTITY_RENDER_OPS);
@@ -53599,6 +53624,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
53599
53624
  const uiSlotsRef = React87.useRef(uiSlots);
53600
53625
  const embeddedTraitsRef = React87.useRef(options?.embeddedTraits);
53601
53626
  const optionsRef = React87.useRef(options);
53627
+ const prevActiveTraitNamesRef = React87.useRef(/* @__PURE__ */ new Set());
53602
53628
  React87.useEffect(() => {
53603
53629
  traitBindingsRef.current = traitBindings;
53604
53630
  }, [traitBindings]);
@@ -53727,6 +53753,18 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
53727
53753
  };
53728
53754
  }, [traitBindings]);
53729
53755
  React87.useEffect(() => {
53756
+ const nextActiveTraitNames = new Set(
53757
+ traitBindings.map((b) => b.trait.name).filter((n) => !!n)
53758
+ );
53759
+ const dropped = diffDroppedTraitNames(prevActiveTraitNamesRef.current, nextActiveTraitNames);
53760
+ if (dropped.length > 0) {
53761
+ for (const traitName of dropped) {
53762
+ for (const slot of ALL_SLOTS) {
53763
+ uiSlotsRef.current.clearBySource(slot, traitName);
53764
+ }
53765
+ }
53766
+ }
53767
+ prevActiveTraitNamesRef.current = nextActiveTraitNames;
53730
53768
  const newManager = managerRef.current;
53731
53769
  newManager.resetAll();
53732
53770
  setTraitStates(newManager.getAllStates());
@@ -53774,7 +53812,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
53774
53812
  };
53775
53813
  }, [traitBindings]);
53776
53814
  const executeTransitionEffects = React87.useCallback(async (params) => {
53777
- const { binding, previousState, newState, payload, flushEvent, syncOnly, log: log11, callsitePayload } = params;
53815
+ const { binding, previousState, newState, payload, flushEvent, syncOnly, log: log12, callsitePayload } = params;
53778
53816
  const traitName = binding.trait.name;
53779
53817
  const linkedEntity = binding.linkedEntity || "";
53780
53818
  const entityId = payload?.entityId;
@@ -53911,7 +53949,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
53911
53949
  if (sharedKey !== void 0) {
53912
53950
  sharedWrites.push({ field, value });
53913
53951
  }
53914
- log11.debug("set:write", {
53952
+ log12.debug("set:write", {
53915
53953
  traitName,
53916
53954
  field,
53917
53955
  value: JSON.stringify(value),
@@ -53983,7 +54021,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
53983
54021
  core.mergeEntityFrame(sharedEntityStore.getSnapshot(sharedKey), sharedWrites)
53984
54022
  );
53985
54023
  }
53986
- log11.debug("effects:executed", () => ({
54024
+ log12.debug("effects:executed", () => ({
53987
54025
  traitName,
53988
54026
  transition: `${previousState}->${newState}`,
53989
54027
  event: flushEvent,
@@ -53993,7 +54031,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
53993
54031
  slotsTouched: Array.from(pendingSlots.keys()).join(",")
53994
54032
  }));
53995
54033
  for (const [slot, patterns] of pendingSlots) {
53996
- log11.debug("flush:slot", {
54034
+ log12.debug("flush:slot", {
53997
54035
  traitName,
53998
54036
  slot,
53999
54037
  patternCount: patterns.length,
@@ -54011,7 +54049,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
54011
54049
  publishBindingSnapshot(traitName, liveEntity);
54012
54050
  }
54013
54051
  } catch (error) {
54014
- log11.error("effects:error", {
54052
+ log12.error("effects:error", {
54015
54053
  traitName,
54016
54054
  transition: `${previousState}->${newState}`,
54017
54055
  event: flushEvent,
@@ -54021,7 +54059,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
54021
54059
  }
54022
54060
  return { emitted: emittedDuringExec, serverEffectResults };
54023
54061
  }, [eventBus, flushSlot, sharedEntityStore, publishBindingSnapshot, orbitalsByTrait, viewer]);
54024
- const reRenderCallsiteCaptureChildren = React87.useCallback(async (traitName, callsitePayload, entityByTrait, log11, visited = /* @__PURE__ */ new Set()) => {
54062
+ const reRenderCallsiteCaptureChildren = React87.useCallback(async (traitName, callsitePayload, entityByTrait, log12, visited = /* @__PURE__ */ new Set()) => {
54025
54063
  const children = callsiteCaptureChildrenByTrait?.get(traitName);
54026
54064
  if (!children || children.size === 0) return;
54027
54065
  const mgr = managerRef.current;
@@ -54035,7 +54073,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
54035
54073
  if (lifecycleEvent === void 0) continue;
54036
54074
  const [entry] = mgr.sendEvent(lifecycleEvent, {}, void 0, entityByTrait, void 0, childName);
54037
54075
  if (!entry || !entry.result.executed) continue;
54038
- log11.debug("callsite-capture-child:rerender", {
54076
+ log12.debug("callsite-capture-child:rerender", {
54039
54077
  referrer: traitName,
54040
54078
  child: childName,
54041
54079
  lifecycleEvent,
@@ -54049,10 +54087,10 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
54049
54087
  payload: {},
54050
54088
  flushEvent: lifecycleEvent,
54051
54089
  syncOnly: false,
54052
- log: log11,
54090
+ log: log12,
54053
54091
  callsitePayload
54054
54092
  });
54055
- await reRenderCallsiteCaptureChildren(childName, callsitePayload, entityByTrait, log11, visited);
54093
+ await reRenderCallsiteCaptureChildren(childName, callsitePayload, entityByTrait, log12, visited);
54056
54094
  }
54057
54095
  }, [callsiteCaptureChildrenByTrait, executeTransitionEffects]);
54058
54096
  const runTickEffects = React87.useCallback((tick, binding) => {
@@ -55375,7 +55413,7 @@ function BrowserPlayground({
55375
55413
 
55376
55414
  // runtime/OrbitalPluginHost.tsx
55377
55415
  init_useEventBus();
55378
- var log10 = logger.createLogger("almadar:ui:plugin-host");
55416
+ var log11 = logger.createLogger("almadar:ui:plugin-host");
55379
55417
  var UI_SLOT_SET = new Set(core.UI_SLOTS);
55380
55418
  function isUISlot(value) {
55381
55419
  return UI_SLOT_SET.has(value);
@@ -55454,7 +55492,7 @@ function buildMockEffectHandlers(opts) {
55454
55492
  const handlers = {
55455
55493
  renderUI: (slot, pattern, props, priority) => {
55456
55494
  if (!isUISlot(slot)) {
55457
- log10.warn("renderUI:unknown-slot", { pluginId, slot });
55495
+ log11.warn("renderUI:unknown-slot", { pluginId, slot });
55458
55496
  return;
55459
55497
  }
55460
55498
  if (pattern === null) {
@@ -55466,19 +55504,19 @@ function buildMockEffectHandlers(opts) {
55466
55504
  }
55467
55505
  };
55468
55506
  if (denySet.has("navigate")) {
55469
- handlers.navigate = (path) => log10.warn("navigate:denied", { pluginId, path });
55507
+ handlers.navigate = (path) => log11.warn("navigate:denied", { pluginId, path });
55470
55508
  } else if (navigateRef.current) {
55471
55509
  handlers.navigate = (path) => navigateRef.current?.(path);
55472
55510
  }
55473
55511
  if (denySet.has("persist")) {
55474
55512
  handlers.persist = async (action, entityType) => {
55475
- log10.warn("persist:denied", { pluginId, action, entityType });
55513
+ log11.warn("persist:denied", { pluginId, action, entityType });
55476
55514
  return void 0;
55477
55515
  };
55478
55516
  }
55479
55517
  if (denySet.has("call-service")) {
55480
55518
  handlers.callService = async (service, action) => {
55481
- log10.warn("call-service:denied", { pluginId, service, action });
55519
+ log11.warn("call-service:denied", { pluginId, service, action });
55482
55520
  return null;
55483
55521
  };
55484
55522
  }