@almadar/ui 5.60.0 → 5.61.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.
@@ -8468,16 +8468,6 @@ var init_Skeleton = __esm({
8468
8468
  Skeleton.displayName = "Skeleton";
8469
8469
  }
8470
8470
  });
8471
- function isKnownPattern(type) {
8472
- return type in componentMapping;
8473
- }
8474
- var componentMapping;
8475
- var init_pattern_resolver = __esm({
8476
- "renderer/pattern-resolver.ts"() {
8477
- logger.createLogger("almadar:ui:pattern-resolver");
8478
- componentMapping = {};
8479
- }
8480
- });
8481
8471
 
8482
8472
  // renderer/slot-definitions.ts
8483
8473
  function isPortalSlot(slot) {
@@ -8586,7 +8576,6 @@ var init_navigation = __esm({
8586
8576
  // renderer/index.ts
8587
8577
  var init_renderer = __esm({
8588
8578
  "renderer/index.ts"() {
8589
- init_pattern_resolver();
8590
8579
  init_slot_definitions();
8591
8580
  }
8592
8581
  });
@@ -10290,7 +10279,7 @@ function recordTransition(trace) {
10290
10279
  ...trace,
10291
10280
  id: `t-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`
10292
10281
  };
10293
- log5.debug("transition:recorded", { trait: trace.traitName, from: trace.from, to: trace.to, event: trace.event, effectCount: trace.effects.length });
10282
+ log4.debug("transition:recorded", { trait: trace.traitName, from: trace.from, to: trace.to, event: trace.event, effectCount: trace.effects.length });
10294
10283
  getState().transitions.push(entry);
10295
10284
  if (getState().transitions.length > MAX_TRANSITIONS) {
10296
10285
  getState().transitions.shift();
@@ -10389,7 +10378,7 @@ function getTraitSnapshots() {
10389
10378
  try {
10390
10379
  snapshots.push(getter());
10391
10380
  } catch (err) {
10392
- log5.error("traitSnapshot getter failed", { trait: traitName, err: String(err) });
10381
+ log4.error("traitSnapshot getter failed", { trait: traitName, err: String(err) });
10393
10382
  }
10394
10383
  }
10395
10384
  return snapshots;
@@ -10488,10 +10477,10 @@ function updateAssetStatus(url, status) {
10488
10477
  window.__orbitalVerification.assetStatus[url] = status;
10489
10478
  }
10490
10479
  }
10491
- var log5, MAX_TRANSITIONS;
10480
+ var log4, MAX_TRANSITIONS;
10492
10481
  var init_verificationRegistry = __esm({
10493
10482
  "lib/verificationRegistry.ts"() {
10494
- log5 = logger.createLogger("almadar:bridge");
10483
+ log4 = logger.createLogger("almadar:bridge");
10495
10484
  MAX_TRANSITIONS = 500;
10496
10485
  exposeOnWindow();
10497
10486
  }
@@ -12820,7 +12809,7 @@ var init_avl_elk_layout = __esm({
12820
12809
  elk = new ELK__default.default();
12821
12810
  }
12822
12811
  });
12823
- var log6, SWIM_GUTTER, CENTER_W, BehaviorView;
12812
+ var log5, SWIM_GUTTER, CENTER_W, BehaviorView;
12824
12813
  var init_BehaviorView = __esm({
12825
12814
  "components/avl/molecules/BehaviorView.tsx"() {
12826
12815
  "use client";
@@ -12829,7 +12818,7 @@ var init_BehaviorView = __esm({
12829
12818
  init_AvlSwimLane();
12830
12819
  init_types();
12831
12820
  init_avl_elk_layout();
12832
- log6 = logger.createLogger("almadar:ui:avl:behavior-view");
12821
+ log5 = logger.createLogger("almadar:ui:avl:behavior-view");
12833
12822
  SWIM_GUTTER = 120;
12834
12823
  CENTER_W = 360;
12835
12824
  BehaviorView = ({ data }) => {
@@ -12840,7 +12829,7 @@ var init_BehaviorView = __esm({
12840
12829
  const dataKey = React81.useMemo(() => JSON.stringify(traitData), [traitData]);
12841
12830
  React81.useEffect(() => {
12842
12831
  if (!traitData) return;
12843
- computeTraitLayout(traitData).then(setLayout).catch((err) => log6.error("compute-trait-layout-failed", { error: err instanceof Error ? err : String(err) }));
12832
+ computeTraitLayout(traitData).then(setLayout).catch((err) => log5.error("compute-trait-layout-failed", { error: err instanceof Error ? err : String(err) }));
12844
12833
  }, [dataKey]);
12845
12834
  if (!traitData) {
12846
12835
  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") });
@@ -13251,7 +13240,7 @@ function generateDiff(oldVal, newVal) {
13251
13240
  }
13252
13241
  return diff;
13253
13242
  }
13254
- var orbStyleOverrides, orbStyle, loloStyleOverrides, loloStyle, log7, CODE_LANGUAGES, CODE_LANGUAGE_SET, DIFF_STYLES, LINE_PROPS_FN, HIDDEN_LINE_NUMBERS, CodeBlock;
13243
+ var orbStyleOverrides, orbStyle, loloStyleOverrides, loloStyle, log6, CODE_LANGUAGES, CODE_LANGUAGE_SET, DIFF_STYLES, LINE_PROPS_FN, HIDDEN_LINE_NUMBERS, CodeBlock;
13255
13244
  var init_CodeBlock = __esm({
13256
13245
  "components/core/molecules/markdown/CodeBlock.tsx"() {
13257
13246
  init_cn();
@@ -13334,7 +13323,7 @@ var init_CodeBlock = __esm({
13334
13323
  "lolo-op-async": { color: syntax.ORB_COLORS.dark.async }
13335
13324
  };
13336
13325
  loloStyle = { ...dark__default.default, ...loloStyleOverrides };
13337
- log7 = logger.createLogger("almadar:ui:markdown-code");
13326
+ log6 = logger.createLogger("almadar:ui:markdown-code");
13338
13327
  CODE_LANGUAGES = [
13339
13328
  "text",
13340
13329
  "json",
@@ -13598,7 +13587,7 @@ var init_CodeBlock = __esm({
13598
13587
  eventBus.emit("UI:COPY_CODE", { language: activeLanguage, success: true });
13599
13588
  setTimeout(() => setCopied(false), 2e3);
13600
13589
  } catch (err) {
13601
- log7.error("Failed to copy code", { error: err instanceof Error ? err : String(err) });
13590
+ log6.error("Failed to copy code", { error: err instanceof Error ? err : String(err) });
13602
13591
  eventBus.emit("UI:COPY_CODE", { language: activeLanguage, success: false });
13603
13592
  }
13604
13593
  };
@@ -17479,14 +17468,14 @@ function useSafeEventBus2() {
17479
17468
  } };
17480
17469
  }
17481
17470
  }
17482
- var log8, lookStyles4, ButtonGroup;
17471
+ var log7, lookStyles4, ButtonGroup;
17483
17472
  var init_ButtonGroup = __esm({
17484
17473
  "components/core/molecules/ButtonGroup.tsx"() {
17485
17474
  "use client";
17486
17475
  init_cn();
17487
17476
  init_atoms2();
17488
17477
  init_useEventBus();
17489
- log8 = logger.createLogger("almadar:ui:button-group");
17478
+ log7 = logger.createLogger("almadar:ui:button-group");
17490
17479
  lookStyles4 = {
17491
17480
  "right-aligned-buttons": "",
17492
17481
  "floating-bar": "fixed bottom-section left-1/2 -translate-x-1/2 shadow-elevation-toast bg-card p-card-sm rounded-container",
@@ -17567,7 +17556,7 @@ var init_ButtonGroup = __esm({
17567
17556
  {
17568
17557
  variant: "ghost",
17569
17558
  onClick: () => {
17570
- log8.debug("Filter clicked", { field: filter.field });
17559
+ log7.debug("Filter clicked", { field: filter.field });
17571
17560
  },
17572
17561
  children: filter.label
17573
17562
  },
@@ -25229,9 +25218,9 @@ function debug(...args) {
25229
25218
  const [first, ...rest] = args;
25230
25219
  const message = typeof first === "string" ? first : "<debug>";
25231
25220
  if (rest.length === 0 && typeof first === "string") {
25232
- log9.debug(message);
25221
+ log8.debug(message);
25233
25222
  } else {
25234
- log9.debug(message, { args: rest.length > 0 ? formatArgs(rest) : formatArgs([first]) });
25223
+ log8.debug(message, { args: rest.length > 0 ? formatArgs(rest) : formatArgs([first]) });
25235
25224
  }
25236
25225
  }
25237
25226
  function debugGroup(label) {
@@ -25259,11 +25248,11 @@ function toLogMetaValue(v) {
25259
25248
  }
25260
25249
  return String(v);
25261
25250
  }
25262
- var NAMESPACE, log9;
25251
+ var NAMESPACE, log8;
25263
25252
  var init_debug = __esm({
25264
25253
  "lib/debug.ts"() {
25265
25254
  NAMESPACE = "almadar:ui:debug";
25266
- log9 = logger.createLogger(NAMESPACE);
25255
+ log8 = logger.createLogger(NAMESPACE);
25267
25256
  logger.createLogger("almadar:ui:debug:input");
25268
25257
  logger.createLogger("almadar:ui:debug:collision");
25269
25258
  logger.createLogger("almadar:ui:debug:physics");
@@ -37703,6 +37692,7 @@ var init_GraphCanvas = __esm({
37703
37692
  draggable = true,
37704
37693
  actions,
37705
37694
  onNodeClick,
37695
+ onNodeDoubleClick,
37706
37696
  nodeClickEvent,
37707
37697
  selectedNodeId,
37708
37698
  repulsion = 800,
@@ -37722,6 +37712,19 @@ var init_GraphCanvas = __esm({
37722
37712
  const [hoveredNode, setHoveredNode] = React81.useState(null);
37723
37713
  const nodesRef = React81.useRef([]);
37724
37714
  const [, forceUpdate] = React81.useState(0);
37715
+ const [logicalW, setLogicalW] = React81.useState(800);
37716
+ React81.useEffect(() => {
37717
+ const canvas = canvasRef.current;
37718
+ if (!canvas || typeof ResizeObserver === "undefined") return;
37719
+ const measure = () => {
37720
+ const width = Math.round(canvas.clientWidth);
37721
+ if (width > 0) setLogicalW(width);
37722
+ };
37723
+ measure();
37724
+ const ro = new ResizeObserver(measure);
37725
+ ro.observe(canvas);
37726
+ return () => ro.disconnect();
37727
+ }, []);
37725
37728
  const interactionRef = React81.useRef({
37726
37729
  mode: "none",
37727
37730
  dragNodeId: null,
@@ -37734,10 +37737,8 @@ var init_GraphCanvas = __esm({
37734
37737
  const canvas = canvasRef.current;
37735
37738
  if (!canvas) return null;
37736
37739
  const rect = canvas.getBoundingClientRect();
37737
- const scaleX = rect.width > 0 ? canvas.width / rect.width : 1;
37738
- const scaleY = rect.height > 0 ? canvas.height / rect.height : 1;
37739
- const screenX = (e.clientX - rect.left) * scaleX;
37740
- const screenY = (e.clientY - rect.top) * scaleY;
37740
+ const screenX = e.clientX - rect.left;
37741
+ const screenY = e.clientY - rect.top;
37741
37742
  return {
37742
37743
  screenX,
37743
37744
  screenY,
@@ -37777,8 +37778,8 @@ var init_GraphCanvas = __esm({
37777
37778
  React81.useEffect(() => {
37778
37779
  const canvas = canvasRef.current;
37779
37780
  if (!canvas || propNodes.length === 0) return;
37780
- const w = canvas.width;
37781
- const h = canvas.height;
37781
+ const w = logicalW;
37782
+ const h = height;
37782
37783
  const simNodes = propNodes.map((n, idx) => {
37783
37784
  let x = n.x ?? 0;
37784
37785
  let y = n.y ?? 0;
@@ -37868,29 +37869,41 @@ var init_GraphCanvas = __esm({
37868
37869
  return () => {
37869
37870
  cancelAnimationFrame(animRef.current);
37870
37871
  };
37871
- }, [propNodes, propEdges, layout, repulsion, linkDistance]);
37872
+ }, [propNodes, propEdges, layout, repulsion, linkDistance, logicalW, height]);
37872
37873
  React81.useEffect(() => {
37873
37874
  const canvas = canvasRef.current;
37874
37875
  if (!canvas) return;
37875
37876
  const ctx = canvas.getContext("2d");
37876
37877
  if (!ctx) return;
37877
- const w = canvas.width;
37878
- const h = canvas.height;
37878
+ const w = logicalW;
37879
+ const h = height;
37879
37880
  const nodes = nodesRef.current;
37880
37881
  const accentColor = resolveColor2("var(--color-accent)", canvas);
37882
+ const dpr = typeof window !== "undefined" && window.devicePixelRatio || 1;
37883
+ ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
37881
37884
  ctx.clearRect(0, 0, w, h);
37882
37885
  ctx.save();
37883
37886
  ctx.translate(offset.x, offset.y);
37884
37887
  ctx.scale(zoom, zoom);
37888
+ const neighbors = /* @__PURE__ */ new Set();
37889
+ if (hoveredNode) {
37890
+ neighbors.add(hoveredNode);
37891
+ for (const edge of propEdges) {
37892
+ if (edge.source === hoveredNode) neighbors.add(String(edge.target));
37893
+ else if (edge.target === hoveredNode) neighbors.add(String(edge.source));
37894
+ }
37895
+ }
37885
37896
  for (const edge of propEdges) {
37886
37897
  const source = nodes.find((n) => n.id === edge.source);
37887
37898
  const target = nodes.find((n) => n.id === edge.target);
37888
37899
  if (!source || !target) continue;
37900
+ const incident = !!hoveredNode && (edge.source === hoveredNode || edge.target === hoveredNode);
37901
+ ctx.globalAlpha = hoveredNode ? incident ? 1 : 0.12 : 1;
37889
37902
  ctx.beginPath();
37890
37903
  ctx.moveTo(source.x, source.y);
37891
37904
  ctx.lineTo(target.x, target.y);
37892
- ctx.strokeStyle = edge.color || "#88888866";
37893
- ctx.lineWidth = edge.weight ? Math.max(1, edge.weight) : 1;
37905
+ ctx.strokeStyle = incident ? accentColor : edge.color || "#88888866";
37906
+ ctx.lineWidth = incident ? 2 : edge.weight ? Math.max(1, edge.weight) : 1;
37894
37907
  ctx.stroke();
37895
37908
  if (edge.label && showLabels) {
37896
37909
  const mx = (source.x + target.x) / 2;
@@ -37901,11 +37914,13 @@ var init_GraphCanvas = __esm({
37901
37914
  ctx.fillText(edge.label, mx, my - 4);
37902
37915
  }
37903
37916
  }
37917
+ ctx.globalAlpha = 1;
37904
37918
  for (const node of nodes) {
37905
37919
  const size = node.size || 8;
37906
37920
  const color = resolveColor2(node.color || getGroupColor(node.group, groups), canvas);
37907
37921
  const isHovered = hoveredNode === node.id;
37908
37922
  const isSelected = selectedNodeId !== void 0 && node.id === selectedNodeId;
37923
+ ctx.globalAlpha = hoveredNode && !neighbors.has(node.id) ? 0.2 : 1;
37909
37924
  const radius = isSelected ? size + 4 : isHovered ? size + 2 : size;
37910
37925
  ctx.beginPath();
37911
37926
  ctx.arc(node.x, node.y, radius, 0, Math.PI * 2);
@@ -38025,6 +38040,15 @@ var init_GraphCanvas = __esm({
38025
38040
  interactionRef.current.dragNodeId = null;
38026
38041
  setHoveredNode(null);
38027
38042
  }, []);
38043
+ const handleDoubleClick = React81.useCallback(
38044
+ (e) => {
38045
+ const coords = toCoords(e);
38046
+ if (!coords) return;
38047
+ const node = nodeAt(coords.graphX, coords.graphY);
38048
+ if (node) onNodeDoubleClick?.(node);
38049
+ },
38050
+ [toCoords, nodeAt, onNodeDoubleClick]
38051
+ );
38028
38052
  if (isLoading) {
38029
38053
  return /* @__PURE__ */ jsxRuntime.jsx(LoadingState, { message: t("common.loading"), className });
38030
38054
  }
@@ -38082,15 +38106,16 @@ var init_GraphCanvas = __esm({
38082
38106
  "canvas",
38083
38107
  {
38084
38108
  ref: canvasRef,
38085
- width: 800,
38086
- height,
38109
+ width: Math.round(logicalW * (typeof window !== "undefined" && window.devicePixelRatio || 1)),
38110
+ height: Math.round(height * (typeof window !== "undefined" && window.devicePixelRatio || 1)),
38087
38111
  className: "w-full cursor-grab active:cursor-grabbing",
38088
38112
  style: { height },
38089
38113
  onWheel: handleWheel,
38090
38114
  onMouseDown: handleMouseDown,
38091
38115
  onMouseMove: handleMouseMove,
38092
38116
  onMouseUp: handleMouseUp,
38093
- onMouseLeave: handleMouseLeave
38117
+ onMouseLeave: handleMouseLeave,
38118
+ onDoubleClick: handleDoubleClick
38094
38119
  }
38095
38120
  ) }),
38096
38121
  groups.length > 1 && /* @__PURE__ */ jsxRuntime.jsx(HStack, { gap: "md", className: "px-4 py-2 border-t border-border", wrap: true, children: groups.map((group, idx) => /* @__PURE__ */ jsxRuntime.jsxs(HStack, { gap: "xs", align: "center", children: [
@@ -41684,11 +41709,11 @@ var init_Canvas3DErrorBoundary = __esm({
41684
41709
  "components/game/molecules/three/components/Canvas3DErrorBoundary.css"() {
41685
41710
  }
41686
41711
  });
41687
- var log10, Canvas3DErrorBoundary;
41712
+ var log9, Canvas3DErrorBoundary;
41688
41713
  var init_Canvas3DErrorBoundary2 = __esm({
41689
41714
  "components/game/molecules/three/components/Canvas3DErrorBoundary.tsx"() {
41690
41715
  init_Canvas3DErrorBoundary();
41691
- log10 = logger.createLogger("almadar:ui:game:canvas3d:error-boundary");
41716
+ log9 = logger.createLogger("almadar:ui:game:canvas3d:error-boundary");
41692
41717
  Canvas3DErrorBoundary = class extends React81.Component {
41693
41718
  constructor(props) {
41694
41719
  super(props);
@@ -41716,8 +41741,8 @@ var init_Canvas3DErrorBoundary2 = __esm({
41716
41741
  componentDidCatch(error, errorInfo) {
41717
41742
  this.setState({ errorInfo });
41718
41743
  this.props.onError?.(error, errorInfo);
41719
- log10.error("Error caught", { error });
41720
- log10.error("Component stack", { componentStack: errorInfo.componentStack ?? "<none>" });
41744
+ log9.error("Error caught", { error });
41745
+ log9.error("Component stack", { componentStack: errorInfo.componentStack ?? "<none>" });
41721
41746
  }
41722
41747
  render() {
41723
41748
  if (this.state.hasError) {
@@ -41780,7 +41805,7 @@ function useGLTFModel(url, resourceBasePath) {
41780
41805
  setState({ model: null, isLoading: false, error: null });
41781
41806
  return;
41782
41807
  }
41783
- log11.debug("Loading", { url });
41808
+ log10.debug("Loading", { url });
41784
41809
  setState((prev) => ({ ...prev, isLoading: true, error: null }));
41785
41810
  const assetRoot = resourceBasePath || detectAssetRoot2(url);
41786
41811
  const loader = new GLTFLoader.GLTFLoader();
@@ -41788,7 +41813,7 @@ function useGLTFModel(url, resourceBasePath) {
41788
41813
  loader.load(
41789
41814
  url,
41790
41815
  (gltf) => {
41791
- log11.debug("Loaded", { url });
41816
+ log10.debug("Loaded", { url });
41792
41817
  setState({
41793
41818
  model: gltf.scene,
41794
41819
  isLoading: false,
@@ -41797,7 +41822,7 @@ function useGLTFModel(url, resourceBasePath) {
41797
41822
  },
41798
41823
  void 0,
41799
41824
  (err) => {
41800
- log11.warn("Failed", { url, error: err instanceof Error ? err : String(err) });
41825
+ log10.warn("Failed", { url, error: err instanceof Error ? err : String(err) });
41801
41826
  setState({
41802
41827
  model: null,
41803
41828
  isLoading: false,
@@ -41913,11 +41938,11 @@ function ModelLoader({
41913
41938
  }
41914
41939
  );
41915
41940
  }
41916
- var log11;
41941
+ var log10;
41917
41942
  var init_ModelLoader = __esm({
41918
41943
  "components/game/molecules/three/components/ModelLoader.tsx"() {
41919
41944
  "use client";
41920
- log11 = logger.createLogger("almadar:ui:game:model-loader");
41945
+ log10 = logger.createLogger("almadar:ui:game:model-loader");
41921
41946
  }
41922
41947
  });
41923
41948
 
@@ -42178,24 +42203,28 @@ var init_GameCanvas3D2 = __esm({
42178
42203
  const cameraConfig = React81.useMemo(() => {
42179
42204
  const size = Math.max(
42180
42205
  gridBounds.maxX - gridBounds.minX,
42181
- gridBounds.maxZ - gridBounds.minZ
42206
+ gridBounds.maxZ - gridBounds.minZ,
42207
+ 4
42208
+ // minimum framing distance so a tiny board isn't zoomed in
42182
42209
  );
42183
- const distance = size * 1.5;
42210
+ const cx = (gridBounds.minX + gridBounds.maxX) / 2;
42211
+ const cz = (gridBounds.minZ + gridBounds.maxZ) / 2;
42212
+ const d = size * 1.5;
42184
42213
  switch (cameraMode) {
42185
42214
  case "isometric":
42186
42215
  return {
42187
- position: [distance, distance * 0.8, distance],
42216
+ position: [cx + d, d * 0.8, cz + d],
42188
42217
  fov: 45
42189
42218
  };
42190
42219
  case "top-down":
42191
42220
  return {
42192
- position: [0, distance * 2, 0],
42221
+ position: [cx, d * 2, cz],
42193
42222
  fov: 45
42194
42223
  };
42195
42224
  case "perspective":
42196
42225
  default:
42197
42226
  return {
42198
- position: [distance, distance, distance],
42227
+ position: [cx + d, d, cz + d],
42199
42228
  fov: 45
42200
42229
  };
42201
42230
  }
@@ -42434,7 +42463,8 @@ var init_GameCanvas3D2 = __esm({
42434
42463
  "div",
42435
42464
  {
42436
42465
  ref: containerRef,
42437
- className: cn("game-canvas-3d relative w-full h-full min-h-[85vh] overflow-hidden", className),
42466
+ className: cn("game-canvas-3d relative w-full overflow-hidden", className),
42467
+ style: { minHeight: "85vh" },
42438
42468
  "data-orientation": orientation,
42439
42469
  "data-camera-mode": cameraMode,
42440
42470
  "data-overlay": overlay,
@@ -42449,7 +42479,7 @@ var init_GameCanvas3D2 = __esm({
42449
42479
  near: 0.1,
42450
42480
  far: 1e3
42451
42481
  },
42452
- style: { background: backgroundColor },
42482
+ style: { background: backgroundColor, height: "85vh", width: "100%" },
42453
42483
  onClick: (e) => {
42454
42484
  if (e.target === e.currentTarget) {
42455
42485
  eventHandlers.handleCanvasClick(e);
@@ -46251,7 +46281,7 @@ function getAllEvents(traits2) {
46251
46281
  function EventDispatcherTab({ traits: traits2, schema }) {
46252
46282
  const eventBus = useEventBus();
46253
46283
  const { t } = hooks.useTranslate();
46254
- const [log15, setLog] = React81__namespace.useState([]);
46284
+ const [log14, setLog] = React81__namespace.useState([]);
46255
46285
  const prevStatesRef = React81__namespace.useRef(/* @__PURE__ */ new Map());
46256
46286
  React81__namespace.useEffect(() => {
46257
46287
  for (const trait of traits2) {
@@ -46315,9 +46345,9 @@ function EventDispatcherTab({ traits: traits2, schema }) {
46315
46345
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.otherEvents") }),
46316
46346
  /* @__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)) })
46317
46347
  ] }),
46318
- log15.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
46348
+ log14.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
46319
46349
  /* @__PURE__ */ jsxRuntime.jsx(Typography, { variant: "small", weight: "medium", className: "text-gray-500 mb-1", children: t("debug.recentTransitions") }),
46320
- /* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: "xs", children: log15.map((entry, i) => /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "font-mono text-xs", children: [
46350
+ /* @__PURE__ */ jsxRuntime.jsx(Stack, { gap: "xs", children: log14.map((entry, i) => /* @__PURE__ */ jsxRuntime.jsxs(Typography, { variant: "small", className: "font-mono text-xs", children: [
46321
46351
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-purple-400", children: entry.traitName }),
46322
46352
  " ",
46323
46353
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-gray-500", children: entry.from }),
@@ -51332,7 +51362,7 @@ function isPatternConfig(value) {
51332
51362
  if (value instanceof Date) return false;
51333
51363
  if (typeof value === "function") return false;
51334
51364
  const record = value;
51335
- return "type" in record && typeof record.type === "string" && isKnownPattern(record.type);
51365
+ return "type" in record && typeof record.type === "string" && patterns.getComponentForPattern(record.type) !== null;
51336
51366
  }
51337
51367
  function isPlainConfigObject(value) {
51338
51368
  if (React81__namespace.default.isValidElement(value)) return false;
@@ -52079,7 +52109,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
52079
52109
  };
52080
52110
  }, [traitBindings]);
52081
52111
  const executeTransitionEffects = React81.useCallback(async (params) => {
52082
- const { binding, previousState, newState, payload, flushEvent, syncOnly, log: log15 } = params;
52112
+ const { binding, previousState, newState, payload, flushEvent, syncOnly, log: log14 } = params;
52083
52113
  const traitName = binding.trait.name;
52084
52114
  const linkedEntity = binding.linkedEntity || "";
52085
52115
  const entityId = payload?.entityId;
@@ -52167,7 +52197,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
52167
52197
  ...handlers,
52168
52198
  set: async (targetId, field, value) => {
52169
52199
  if (baseSet) await baseSet(targetId, field, value);
52170
- log15.debug("set:write", {
52200
+ log14.debug("set:write", {
52171
52201
  traitName,
52172
52202
  field,
52173
52203
  value: JSON.stringify(value),
@@ -52207,7 +52237,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
52207
52237
  const executor = new runtime.EffectExecutor({ handlers: trackingHandlers, bindings: bindingCtx, context: effectContext });
52208
52238
  try {
52209
52239
  await executor.executeAll(effects);
52210
- log15.debug("effects:executed", () => ({
52240
+ log14.debug("effects:executed", () => ({
52211
52241
  traitName,
52212
52242
  transition: `${previousState}->${newState}`,
52213
52243
  event: flushEvent,
@@ -52217,7 +52247,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
52217
52247
  slotsTouched: Array.from(pendingSlots.keys()).join(",")
52218
52248
  }));
52219
52249
  for (const [slot, patterns] of pendingSlots) {
52220
- log15.debug("flush:slot", {
52250
+ log14.debug("flush:slot", {
52221
52251
  traitName,
52222
52252
  slot,
52223
52253
  patternCount: patterns.length,
@@ -52232,7 +52262,7 @@ function useTraitStateMachine(traitBindings, uiSlots, options) {
52232
52262
  });
52233
52263
  }
52234
52264
  } catch (error) {
52235
- log15.error("effects:error", {
52265
+ log14.error("effects:error", {
52236
52266
  traitName,
52237
52267
  transition: `${previousState}->${newState}`,
52238
52268
  event: flushEvent,
@@ -52707,7 +52737,7 @@ function clearSchemaCache() {
52707
52737
 
52708
52738
  // runtime/index.ts
52709
52739
  init_EntitySchemaContext();
52710
- var log12 = logger.createLogger("almadar:ui:trait-provider");
52740
+ var log11 = logger.createLogger("almadar:ui:trait-provider");
52711
52741
  var TraitContext = React81.createContext(null);
52712
52742
  function TraitProvider({
52713
52743
  traits: traitBindings,
@@ -52724,7 +52754,7 @@ function TraitProvider({
52724
52754
  currentState: stateName,
52725
52755
  availableEvents: trait.transitions.filter((t) => t.from === stateName).map((t) => t.event),
52726
52756
  dispatch: (eventKey, payload) => {
52727
- log12.debug("Dispatch", () => ({
52757
+ log11.debug("Dispatch", () => ({
52728
52758
  trait: trait.name,
52729
52759
  event: eventKey,
52730
52760
  payloadKeys: payload ? Object.keys(payload) : []
@@ -53474,7 +53504,7 @@ OrbitalThemeProvider.displayName = "OrbitalThemeProvider";
53474
53504
  init_navigation();
53475
53505
  init_verificationRegistry();
53476
53506
  var PERF_NAMESPACE = "almadar:perf:canvas";
53477
- var log14 = logger.createLogger(PERF_NAMESPACE);
53507
+ var log13 = logger.createLogger(PERF_NAMESPACE);
53478
53508
  var RING_SIZE = 50;
53479
53509
  var ring = [];
53480
53510
  var writeIdx = 0;
@@ -53529,7 +53559,7 @@ function perfEnd(name, startToken, detail) {
53529
53559
  }
53530
53560
  }
53531
53561
  push({ name, durationMs, ts: endTs, detail });
53532
- log14.debug(name, () => ({ durationMs, ...detail ?? {} }));
53562
+ log13.debug(name, () => ({ durationMs, ...detail ?? {} }));
53533
53563
  }
53534
53564
  function perfTime(name, fn, detail) {
53535
53565
  const t = perfStart(name);
@@ -53547,7 +53577,7 @@ var profilerOnRender = (id, phase, actualDuration, baseDuration, _startTime, com
53547
53577
  ts: commitTime,
53548
53578
  detail: { baseDuration }
53549
53579
  });
53550
- log14.debug(`profiler:${id}:${phase}`, () => ({ actualDuration, baseDuration }));
53580
+ log13.debug(`profiler:${id}:${phase}`, () => ({ actualDuration, baseDuration }));
53551
53581
  };
53552
53582
  function getPerfSnapshot() {
53553
53583
  if (ring.length < RING_SIZE) return ring.slice();