@almadar/ui 4.54.11 → 4.54.13

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.
@@ -57651,24 +57651,26 @@ function collectUITransitions(orbital, filter) {
57651
57651
  function buildScreenGraph(schema, orbitalName, entityName, transitions, groupedBehaviors, mockData) {
57652
57652
  const nodes = [];
57653
57653
  const edges = [];
57654
- const stateNodeMap = /* @__PURE__ */ new Map();
57654
+ const stateRepresentativeMap = /* @__PURE__ */ new Map();
57655
57655
  for (const entry of transitions) {
57656
57656
  const key = `${entry.traitName}:${entry.transition.to}`;
57657
- const existing = stateNodeMap.get(key);
57657
+ const existing = stateRepresentativeMap.get(key);
57658
57658
  if (!existing || entry.patterns.length > existing.patterns.length) {
57659
- stateNodeMap.set(key, entry);
57659
+ stateRepresentativeMap.set(key, entry);
57660
57660
  }
57661
57661
  }
57662
- const transitionEntries = Array.from(stateNodeMap.values());
57662
+ const transitionEntries = transitions;
57663
57663
  const totalCards = transitionEntries.length + groupedBehaviors.length;
57664
57664
  if (totalCards === 0) return { nodes, edges };
57665
57665
  const cols = Math.min(totalCards, 3);
57666
57666
  const nodeIdMap = /* @__PURE__ */ new Map();
57667
57667
  transitionEntries.forEach((entry, i) => {
57668
57668
  const t = entry.transition;
57669
- const nodeId = `${orbitalName}-${entry.traitName}-${t.event}-${t.to}`;
57669
+ const nodeId = `${orbitalName}-${entry.traitName}-${t.event}-${t.from}-${t.to}`;
57670
57670
  const stateKey = `${entry.traitName}:${t.to}`;
57671
- nodeIdMap.set(stateKey, nodeId);
57671
+ if (stateRepresentativeMap.get(stateKey) === entry) {
57672
+ nodeIdMap.set(stateKey, nodeId);
57673
+ }
57672
57674
  const col = i % cols;
57673
57675
  const row = Math.floor(i / cols);
57674
57676
  nodes.push({
@@ -57737,7 +57739,7 @@ function buildScreenGraph(schema, orbitalName, entityName, transitions, groupedB
57737
57739
  if (!sourceNodeId || !targetNodeId) continue;
57738
57740
  if (sourceNodeId === targetNodeId) continue;
57739
57741
  const backward = isBackwardTransition(t.from, t.to, entry.states);
57740
- const sourceEntry = stateNodeMap.get(sourceKey);
57742
+ const sourceEntry = stateRepresentativeMap.get(sourceKey);
57741
57743
  const triggerSource = sourceEntry?.eventSources.find((s) => s.event === t.event);
57742
57744
  edges.push({
57743
57745
  id: `ef-${entry.traitName}-${t.event}-${t.from}-${t.to}`,
@@ -59913,7 +59915,7 @@ function SchemaRunner({ schema, serverUrl, transport, mockData, pageName, onNavi
59913
59915
  persistence
59914
59916
  }
59915
59917
  ),
59916
- /* @__PURE__ */ jsxRuntime.jsx(OrbitalThemeProvider, { theme: activeOrbitalTheme, children: /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "min-h-full p-4", children: /* @__PURE__ */ jsxRuntime.jsx(UISlotRenderer, { includeHud: true, hudMode: "inline", includeFloating: true }) }) })
59918
+ /* @__PURE__ */ jsxRuntime.jsx(OrbitalThemeProvider, { theme: activeOrbitalTheme, children: /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "h-full min-h-full overflow-auto p-4", children: /* @__PURE__ */ jsxRuntime.jsx(UISlotRenderer, { includeHud: true, hudMode: "inline", includeFloating: true }) }) })
59917
59919
  ]
59918
59920
  }
59919
59921
  ) });
package/dist/avl/index.js CHANGED
@@ -57605,24 +57605,26 @@ function collectUITransitions(orbital, filter) {
57605
57605
  function buildScreenGraph(schema, orbitalName, entityName, transitions, groupedBehaviors, mockData) {
57606
57606
  const nodes = [];
57607
57607
  const edges = [];
57608
- const stateNodeMap = /* @__PURE__ */ new Map();
57608
+ const stateRepresentativeMap = /* @__PURE__ */ new Map();
57609
57609
  for (const entry of transitions) {
57610
57610
  const key = `${entry.traitName}:${entry.transition.to}`;
57611
- const existing = stateNodeMap.get(key);
57611
+ const existing = stateRepresentativeMap.get(key);
57612
57612
  if (!existing || entry.patterns.length > existing.patterns.length) {
57613
- stateNodeMap.set(key, entry);
57613
+ stateRepresentativeMap.set(key, entry);
57614
57614
  }
57615
57615
  }
57616
- const transitionEntries = Array.from(stateNodeMap.values());
57616
+ const transitionEntries = transitions;
57617
57617
  const totalCards = transitionEntries.length + groupedBehaviors.length;
57618
57618
  if (totalCards === 0) return { nodes, edges };
57619
57619
  const cols = Math.min(totalCards, 3);
57620
57620
  const nodeIdMap = /* @__PURE__ */ new Map();
57621
57621
  transitionEntries.forEach((entry, i) => {
57622
57622
  const t = entry.transition;
57623
- const nodeId = `${orbitalName}-${entry.traitName}-${t.event}-${t.to}`;
57623
+ const nodeId = `${orbitalName}-${entry.traitName}-${t.event}-${t.from}-${t.to}`;
57624
57624
  const stateKey = `${entry.traitName}:${t.to}`;
57625
- nodeIdMap.set(stateKey, nodeId);
57625
+ if (stateRepresentativeMap.get(stateKey) === entry) {
57626
+ nodeIdMap.set(stateKey, nodeId);
57627
+ }
57626
57628
  const col = i % cols;
57627
57629
  const row = Math.floor(i / cols);
57628
57630
  nodes.push({
@@ -57691,7 +57693,7 @@ function buildScreenGraph(schema, orbitalName, entityName, transitions, groupedB
57691
57693
  if (!sourceNodeId || !targetNodeId) continue;
57692
57694
  if (sourceNodeId === targetNodeId) continue;
57693
57695
  const backward = isBackwardTransition(t.from, t.to, entry.states);
57694
- const sourceEntry = stateNodeMap.get(sourceKey);
57696
+ const sourceEntry = stateRepresentativeMap.get(sourceKey);
57695
57697
  const triggerSource = sourceEntry?.eventSources.find((s) => s.event === t.event);
57696
57698
  edges.push({
57697
57699
  id: `ef-${entry.traitName}-${t.event}-${t.from}-${t.to}`,
@@ -59867,7 +59869,7 @@ function SchemaRunner({ schema, serverUrl, transport, mockData, pageName, onNavi
59867
59869
  persistence
59868
59870
  }
59869
59871
  ),
59870
- /* @__PURE__ */ jsx(OrbitalThemeProvider, { theme: activeOrbitalTheme, children: /* @__PURE__ */ jsx(Box, { className: "min-h-full p-4", children: /* @__PURE__ */ jsx(UISlotRenderer, { includeHud: true, hudMode: "inline", includeFloating: true }) }) })
59872
+ /* @__PURE__ */ jsx(OrbitalThemeProvider, { theme: activeOrbitalTheme, children: /* @__PURE__ */ jsx(Box, { className: "h-full min-h-full overflow-auto p-4", children: /* @__PURE__ */ jsx(UISlotRenderer, { includeHud: true, hudMode: "inline", includeFloating: true }) }) })
59871
59873
  ]
59872
59874
  }
59873
59875
  ) });
@@ -47614,7 +47614,7 @@ function SchemaRunner({ schema, serverUrl, transport, mockData, pageName, onNavi
47614
47614
  persistence
47615
47615
  }
47616
47616
  ),
47617
- /* @__PURE__ */ jsxRuntime.jsx(OrbitalThemeProvider, { theme: activeOrbitalTheme, children: /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "min-h-full p-4", children: /* @__PURE__ */ jsxRuntime.jsx(UISlotRenderer, { includeHud: true, hudMode: "inline", includeFloating: true }) }) })
47617
+ /* @__PURE__ */ jsxRuntime.jsx(OrbitalThemeProvider, { theme: activeOrbitalTheme, children: /* @__PURE__ */ jsxRuntime.jsx(Box, { className: "h-full min-h-full overflow-auto p-4", children: /* @__PURE__ */ jsxRuntime.jsx(UISlotRenderer, { includeHud: true, hudMode: "inline", includeFloating: true }) }) })
47618
47618
  ]
47619
47619
  }
47620
47620
  ) });
@@ -47568,7 +47568,7 @@ function SchemaRunner({ schema, serverUrl, transport, mockData, pageName, onNavi
47568
47568
  persistence
47569
47569
  }
47570
47570
  ),
47571
- /* @__PURE__ */ jsx(OrbitalThemeProvider, { theme: activeOrbitalTheme, children: /* @__PURE__ */ jsx(Box, { className: "min-h-full p-4", children: /* @__PURE__ */ jsx(UISlotRenderer, { includeHud: true, hudMode: "inline", includeFloating: true }) }) })
47571
+ /* @__PURE__ */ jsx(OrbitalThemeProvider, { theme: activeOrbitalTheme, children: /* @__PURE__ */ jsx(Box, { className: "h-full min-h-full overflow-auto p-4", children: /* @__PURE__ */ jsx(UISlotRenderer, { includeHud: true, hudMode: "inline", includeFloating: true }) }) })
47572
47572
  ]
47573
47573
  }
47574
47574
  ) });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@almadar/ui",
3
- "version": "4.54.11",
3
+ "version": "4.54.13",
4
4
  "description": "React UI components, hooks, and providers for Almadar",
5
5
  "type": "module",
6
6
  "sideEffects": [