@likec4/diagram 1.47.0 → 1.48.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 (303) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +1 -1
  3. package/bundle/index.js +5489 -4909
  4. package/dist/LikeC4Diagram.js +18 -12
  5. package/dist/LikeC4Diagram.props.d.ts +1 -5
  6. package/dist/LikeC4ProjectsProvider.js +7 -5
  7. package/dist/LikeC4Styles.d.ts +2 -6
  8. package/dist/LikeC4Styles.js +44 -43
  9. package/dist/LikeC4View.d.ts +9 -1
  10. package/dist/LikeC4View.js +10 -8
  11. package/dist/ReactLikeC4.d.ts +12 -2
  12. package/dist/ReactLikeC4.js +5 -3
  13. package/dist/adhoc-editor/ActorProvider.d.ts +7 -0
  14. package/dist/adhoc-editor/ActorProvider.js +41 -0
  15. package/dist/adhoc-editor/EditorNavigationPanel.d.ts +1 -0
  16. package/dist/adhoc-editor/EditorNavigationPanel.js +32 -0
  17. package/dist/adhoc-editor/LikeC4AdHocViewEditor.d.ts +4 -0
  18. package/dist/adhoc-editor/LikeC4AdHocViewEditor.js +71 -0
  19. package/dist/adhoc-editor/SelectElementOverlay.d.ts +1 -0
  20. package/dist/adhoc-editor/SelectElementOverlay.js +124 -0
  21. package/dist/adhoc-editor/actor.d.ts +131 -0
  22. package/dist/adhoc-editor/actor.editor.d.ts +54 -0
  23. package/dist/adhoc-editor/actor.editor.js +96 -0
  24. package/dist/adhoc-editor/actor.js +20 -0
  25. package/dist/adhoc-editor/actor.layouter.d.ts +48 -0
  26. package/dist/adhoc-editor/actor.layouter.js +66 -0
  27. package/dist/adhoc-editor/actor.types.d.ts +57 -0
  28. package/dist/adhoc-editor/actor.types.js +22 -0
  29. package/dist/adhoc-editor/hooks.d.ts +14 -0
  30. package/dist/adhoc-editor/hooks.js +47 -0
  31. package/dist/adhoc-editor/index.d.ts +2 -0
  32. package/dist/adhoc-editor/viewrules/ViewRulesPanel.d.ts +6 -0
  33. package/dist/adhoc-editor/viewrules/ViewRulesPanel.js +104 -0
  34. package/dist/base/const.d.ts +1 -0
  35. package/dist/base/const.js +2 -1
  36. package/dist/base/updateEdges.js +26 -3
  37. package/dist/base/updateNodes.js +8 -5
  38. package/dist/base-primitives/Markdown.d.ts +1 -1
  39. package/dist/base-primitives/Markdown.js +1 -1
  40. package/dist/base-primitives/NodeHandles.d.ts +4 -2
  41. package/dist/base-primitives/NodeHandles.js +46 -19
  42. package/dist/base-primitives/compound/CompoundActionButton.js +3 -1
  43. package/dist/base-primitives/compound/CompoundDetailsButton.js +3 -1
  44. package/dist/base-primitives/compound/CompoundNodeContainer.js +6 -4
  45. package/dist/base-primitives/compound/CompoundTitle.js +1 -2
  46. package/dist/base-primitives/compound/actionbtns.css.d.ts +1 -1
  47. package/dist/base-primitives/edge/EdgeActionButton.js +1 -1
  48. package/dist/base-primitives/edge/EdgeContainer.js +5 -2
  49. package/dist/base-primitives/edge/EdgeLabelContainer.js +5 -1
  50. package/dist/base-primitives/element/ElementActionButtons.js +31 -58
  51. package/dist/base-primitives/element/ElementData.d.ts +7 -7
  52. package/dist/base-primitives/element/ElementData.js +61 -48
  53. package/dist/base-primitives/element/ElementDetailsButton.js +2 -1
  54. package/dist/base-primitives/element/ElementNodeContainer.d.ts +2 -2
  55. package/dist/base-primitives/element/ElementNodeContainer.js +1 -0
  56. package/dist/base-primitives/element/ElementTags.d.ts +6 -2
  57. package/dist/base-primitives/element/ElementTags.js +55 -32
  58. package/dist/base-primitives/index.d.ts +1 -1
  59. package/dist/base-primitives/memoEdge.js +1 -1
  60. package/dist/base-primitives/memoNode.js +1 -1
  61. package/dist/components/ErrorFallback.js +1 -1
  62. package/dist/components/Link.js +2 -2
  63. package/dist/components/Logo.js +1 -1
  64. package/dist/components/NavigationPanel.d.ts +2 -2
  65. package/dist/components/NavigationPanel.js +9 -28
  66. package/dist/components/RootContainer.js +5 -8
  67. package/dist/context/DefaultMantineProvider.d.ts +2 -0
  68. package/dist/context/DefaultMantineProvider.js +66 -0
  69. package/dist/context/DiagramFeatures.js +12 -11
  70. package/dist/context/EnsureMantine.d.ts +0 -3
  71. package/dist/context/EnsureMantine.js +3 -4
  72. package/dist/context/IconRenderer.d.ts +14 -0
  73. package/dist/context/IconRenderer.js +8 -8
  74. package/dist/context/TagStylesContext.js +12 -4
  75. package/dist/custom/hooks.d.ts +2 -2
  76. package/dist/custom/index.d.ts +1 -1
  77. package/dist/custom/index.js +2 -2
  78. package/dist/editor/LikeC4EditorCallbacks.d.ts +18 -0
  79. package/dist/editor/LikeC4EditorCallbacks.js +5 -0
  80. package/dist/editor/LikeC4EditorProvider.d.ts +30 -18
  81. package/dist/editor/LikeC4EditorProvider.js +2 -2
  82. package/dist/editor/applyChangesToManualLayout.js +1 -0
  83. package/dist/editor/editorActor.actions.d.ts +25 -25
  84. package/dist/editor/editorActor.actions.js +2 -2
  85. package/dist/editor/editorActor.setup.d.ts +84 -0
  86. package/dist/editor/editorActor.setup.js +38 -0
  87. package/dist/editor/editorActor.states.d.ts +9 -0
  88. package/dist/editor/{editorActor.js → editorActor.states.js} +22 -64
  89. package/dist/editor/index.d.ts +4 -3
  90. package/dist/editor/useEditorActorLogic.d.ts +2 -564
  91. package/dist/editor/useEditorActorLogic.js +8 -12
  92. package/dist/hooks/index.d.ts +1 -1
  93. package/dist/hooks/useCallbackRef.d.ts +6 -0
  94. package/dist/hooks/useCurrentViewModel.d.ts +10 -0
  95. package/dist/hooks/useDiagram.js +2 -2
  96. package/dist/hooks/useDiagramCompareLayout.d.ts +1 -1
  97. package/dist/hooks/useDiagramCompareLayout.js +1 -1
  98. package/dist/hooks/useLikeC4ElementsTree.js +1 -1
  99. package/dist/hooks/useLikeC4Model.js +2 -2
  100. package/dist/hooks/useSetState.d.ts +6 -1
  101. package/dist/hooks/useSetState.js +7 -4
  102. package/dist/hooks/useXYFlow.d.ts +7 -1
  103. package/dist/hooks/useXYFlow.js +4 -4
  104. package/dist/index.d.ts +7 -4
  105. package/dist/index.js +4 -2
  106. package/dist/likec4diagram/DiagramUI.js +1 -3
  107. package/dist/likec4diagram/DiagramXYFlow.js +25 -12
  108. package/dist/likec4diagram/convert-to-xyflow.d.ts +2 -1
  109. package/dist/likec4diagram/convert-to-xyflow.js +2 -6
  110. package/dist/likec4diagram/custom/edges/RelationshipEdge.js +13 -14
  111. package/dist/likec4diagram/custom/edges/useControlPoints.js +3 -3
  112. package/dist/likec4diagram/custom/edges/useRelationshipEdgePath.d.ts +3 -0
  113. package/dist/likec4diagram/custom/edges/useRelationshipEdgePath.js +68 -35
  114. package/dist/likec4diagram/custom/nodes/ElementActions.d.ts +1 -2
  115. package/dist/likec4diagram/custom/nodes/ElementActions.js +7 -10
  116. package/dist/likec4diagram/custom/nodes/SequenceActorNode.js +7 -5
  117. package/dist/likec4diagram/custom/nodes/nodes.js +25 -6
  118. package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.js +5 -4
  119. package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.d.ts +6 -1
  120. package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.js +7 -6
  121. package/dist/likec4diagram/custom/nodes/toolbar/_shared.js +3 -3
  122. package/dist/likec4diagram/custom/nodes/toolbar/styles.css.js +2 -2
  123. package/dist/likec4diagram/relationship-popover/RelationshipPopover.js +15 -15
  124. package/dist/likec4diagram/relationship-popover/components.d.ts +7 -0
  125. package/dist/likec4diagram/relationship-popover/components.js +39 -0
  126. package/dist/likec4diagram/state/DiagramActorProvider.d.ts +4 -3
  127. package/dist/likec4diagram/state/DiagramActorProvider.js +14 -15
  128. package/dist/likec4diagram/state/assign.d.ts +1 -1
  129. package/dist/likec4diagram/state/createViewChange.js +16 -4
  130. package/dist/likec4diagram/state/machine.actions.d.ts +65 -0
  131. package/dist/likec4diagram/state/machine.actions.js +51 -39
  132. package/dist/likec4diagram/state/machine.actions.layout.d.ts +22 -2
  133. package/dist/likec4diagram/state/machine.actions.layout.js +32 -14
  134. package/dist/likec4diagram/state/machine.d.ts +1 -1
  135. package/dist/likec4diagram/state/machine.js +31 -30
  136. package/dist/likec4diagram/state/machine.setup.d.ts +21 -5
  137. package/dist/likec4diagram/state/machine.setup.js +13 -4
  138. package/dist/likec4diagram/state/machine.state.initializing.d.ts +32 -2
  139. package/dist/likec4diagram/state/machine.state.navigating.d.ts +1 -1
  140. package/dist/likec4diagram/state/machine.state.navigating.js +81 -49
  141. package/dist/likec4diagram/state/machine.state.ready.d.ts +508 -582
  142. package/dist/likec4diagram/state/machine.state.ready.focused.d.ts +17 -148
  143. package/dist/likec4diagram/state/machine.state.ready.focused.js +6 -14
  144. package/dist/likec4diagram/state/machine.state.ready.idle.d.ts +11 -96
  145. package/dist/likec4diagram/state/machine.state.ready.idle.js +7 -12
  146. package/dist/likec4diagram/state/machine.state.ready.js +80 -69
  147. package/dist/likec4diagram/state/machine.state.ready.printing.d.ts +4 -0
  148. package/dist/likec4diagram/state/machine.state.ready.printing.js +4 -3
  149. package/dist/likec4diagram/state/machine.state.ready.walkthrough.d.ts +145 -2
  150. package/dist/likec4diagram/state/machine.state.ready.walkthrough.js +29 -21
  151. package/dist/likec4diagram/state/types.d.ts +1 -1
  152. package/dist/likec4diagram/state/utils.d.ts +13 -14
  153. package/dist/likec4diagram/state/utils.js +11 -3
  154. package/dist/likec4diagram/types.d.ts +9 -1
  155. package/dist/likec4diagram/ui/notation/NotationPanel.css.js +1 -1
  156. package/dist/likec4diagram/ui/notation/NotationPanel.js +3 -3
  157. package/dist/likec4diagram/useLayoutConstraints.js +4 -1
  158. package/dist/likec4diagram/xyflow-diagram/diagram-view.d.ts +11 -3
  159. package/dist/likec4diagram/xyflow-diagram/diagram-view.js +5 -3
  160. package/dist/likec4diagram/xyflow-sequence/sequence-layout.d.ts +7 -3
  161. package/dist/likec4diagram/xyflow-sequence/sequence-layout.js +10 -8
  162. package/dist/navigationpanel/NavigationPanel.js +2 -1
  163. package/dist/navigationpanel/NavigationPanelControls.js +4 -2
  164. package/dist/navigationpanel/NavigationPanelDropdown.js +7 -7
  165. package/dist/navigationpanel/_common.d.ts +1 -1
  166. package/dist/navigationpanel/_common.js +1 -2
  167. package/dist/navigationpanel/comparepanel/CompareActionsMenu.js +2 -2
  168. package/dist/navigationpanel/comparepanel/ComparePanelControls.js +1 -1
  169. package/dist/navigationpanel/comparepanel/LayoutTypeSwitcher.js +4 -5
  170. package/dist/navigationpanel/controls/DetailsControls.js +5 -5
  171. package/dist/navigationpanel/controls/LayoutWarning.js +2 -2
  172. package/dist/navigationpanel/controls/NavigationButtons.js +2 -2
  173. package/dist/navigationpanel/controls/OpenSource.js +1 -1
  174. package/dist/navigationpanel/controls/SearchControl.d.ts +1 -2
  175. package/dist/navigationpanel/controls/SearchControl.js +8 -12
  176. package/dist/navigationpanel/controls/ToggleReadonly.js +4 -5
  177. package/dist/navigationpanel/dropdown/ProjectsMenu.js +12 -6
  178. package/dist/navigationpanel/editorpanel/CenterCamera.js +1 -1
  179. package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.js +1 -1
  180. package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.js +9 -9
  181. package/dist/navigationpanel/editorpanel/ToggleReadonly.js +1 -1
  182. package/dist/navigationpanel/editorpanel/styles.js +4 -4
  183. package/dist/navigationpanel/styles.css.d.ts +1 -1
  184. package/dist/navigationpanel/styles.css.js +1 -1
  185. package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.js +3 -3
  186. package/dist/navigationpanel/walkthrough/DynamicViewControls.d.ts +67 -67
  187. package/dist/navigationpanel/walkthrough/DynamicViewControls.js +1 -1
  188. package/dist/navigationpanel/walkthrough/WalkthroughPanel.js +1 -1
  189. package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconCirclePlus.js +14 -0
  190. package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.js +14 -0
  191. package/dist/overlays/element-details/ElementDetailsCard.css.js +4 -4
  192. package/dist/overlays/element-details/ElementDetailsCard.js +4 -4
  193. package/dist/overlays/element-details/MetadataValue.js +6 -7
  194. package/dist/overlays/element-details/TabPanelDeployments.js +7 -5
  195. package/dist/overlays/element-details/TabPanelRelationships.css.js +5 -25
  196. package/dist/overlays/element-details/TabPanelRelationships.js +3 -3
  197. package/dist/overlays/element-details/TabPanelStructure.js +3 -2
  198. package/dist/overlays/overlaysActor.js +18 -0
  199. package/dist/overlays/relationship-details/RelationshipDetails.d.ts +0 -5
  200. package/dist/overlays/relationship-details/RelationshipDetails.js +4 -4
  201. package/dist/overlays/relationship-details/SelectEdge.css.js +2 -2
  202. package/dist/overlays/relationship-details/SelectEdge.js +2 -2
  203. package/dist/overlays/relationship-details/compute.js +1 -1
  204. package/dist/overlays/relationship-details/custom/ElementActions.js +3 -3
  205. package/dist/overlays/relationship-details/custom/nodeTypes.js +14 -1
  206. package/dist/overlays/relationship-details/layout.js +1 -1
  207. package/dist/overlays/relationships-browser/RelationshipsBrowser.d.ts +0 -5
  208. package/dist/overlays/relationships-browser/RelationshipsBrowser.js +116 -21
  209. package/dist/overlays/relationships-browser/SelectElement.js +2 -2
  210. package/dist/overlays/relationships-browser/custom/ElementActions.js +3 -3
  211. package/dist/overlays/relationships-browser/custom/EmptyNode.js +21 -6
  212. package/dist/overlays/relationships-browser/custom/nodeTypes.js +14 -1
  213. package/dist/overlays/relationships-browser/layout.d.ts +1 -1
  214. package/dist/overlays/relationships-browser/layout.js +1 -1
  215. package/dist/projects-overview/actor.js +8 -31
  216. package/dist/projects-overview/custom/nodeTypes.js +1 -1
  217. package/dist/projects-overview/panel/ProjectsOverviewPanel.js +1 -1
  218. package/dist/search/Search.d.ts +1 -4
  219. package/dist/search/Search.js +89 -87
  220. package/dist/search/components/ElementsColumn.css.js +3 -3
  221. package/dist/search/components/ElementsColumn.js +3 -4
  222. package/dist/search/components/PickView.d.ts +3 -1
  223. package/dist/search/components/PickView.js +5 -4
  224. package/dist/search/components/SearchByTags.js +1 -1
  225. package/dist/search/components/SearchInput.js +1 -1
  226. package/dist/search/components/ViewsColum.js +2 -2
  227. package/dist/search/components/_shared.css.d.ts +1 -1
  228. package/dist/search/components/_shared.css.js +1 -1
  229. package/dist/search/components/utils.js +1 -1
  230. package/dist/search/hooks.d.ts +1 -6
  231. package/dist/search/hooks.js +12 -9
  232. package/dist/search/searchActor.d.ts +1 -1
  233. package/dist/shadowroot/ShadowRoot.js +20 -19
  234. package/dist/shadowroot/styles.css.d.ts +0 -2
  235. package/dist/shadowroot/styles.css.js +1 -34
  236. package/dist/styles-font.css2.js +1 -1
  237. package/dist/styles.css2.js +1 -1
  238. package/dist/utils/view-bounds.js +9 -5
  239. package/dist/utils/xyflow.d.ts +19 -3
  240. package/dist/utils/xyflow.js +52 -9
  241. package/package.json +21 -20
  242. package/panda.buildinfo.json +80 -104
  243. package/styles-font.css +1 -1
  244. package/styles-min.css +1 -1
  245. package/styles.css +1 -1
  246. package/dist/editor/__tests__/fixture.d.ts +0 -205
  247. package/dist/editor/editorActor.d.ts +0 -653
  248. package/dist/likec4diagram/relationship-popover/styles.css.d.ts +0 -2
  249. package/dist/likec4diagram/relationship-popover/styles.css.js +0 -28
  250. package/dist/overlays/relationships-browser/custom/styles.css.d.ts +0 -1
  251. package/dist/overlays/relationships-browser/custom/styles.css.js +0 -14
  252. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/createReactComponent.js +0 -0
  253. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.js +0 -0
  254. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.js +0 -0
  255. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowDownRight.js +0 -0
  256. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowLeft.js +0 -0
  257. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js +0 -0
  258. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconBolt.js +0 -0
  259. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconBrowser.js +0 -0
  260. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.js +0 -0
  261. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.js +0 -0
  262. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.js +0 -0
  263. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js +0 -0
  264. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js +0 -0
  265. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconCylinder.js +0 -0
  266. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconDeviceMobile.js +0 -0
  267. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconDirectionSignFilled.js +0 -0
  268. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconExternalLink.js +0 -0
  269. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js +0 -0
  270. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconFileText.js +0 -0
  271. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconFocusCentered.js +0 -0
  272. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconFolderFilled.js +0 -0
  273. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconHelpCircle.js +0 -0
  274. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js +0 -0
  275. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.js +0 -0
  276. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignBottom.js +0 -0
  277. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignCenter.js +0 -0
  278. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignLeft.js +0 -0
  279. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignMiddle.js +0 -0
  280. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignRight.js +0 -0
  281. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignTop.js +0 -0
  282. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutBoardSplit.js +0 -0
  283. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutCollage.js +0 -0
  284. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutDashboard.js +0 -0
  285. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLink.js +0 -0
  286. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLock.js +0 -0
  287. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLockOpen2.js +0 -0
  288. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerPlayFilled.js +0 -0
  289. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipBackFilled.js +0 -0
  290. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipForwardFilled.js +0 -0
  291. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerStopFilled.js +0 -0
  292. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconRectangularPrism.js +0 -0
  293. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconReorder.js +0 -0
  294. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.js +0 -0
  295. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js +0 -0
  296. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.js +0 -0
  297. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconStack2.js +0 -0
  298. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconStarFilled.js +0 -0
  299. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconTarget.js +0 -0
  300. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.js +0 -0
  301. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconUser.js +0 -0
  302. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js +0 -0
  303. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js +0 -0
@@ -128,6 +128,10 @@ export declare const printing: {
128
128
  type: "click: selected edge";
129
129
  params: unknown;
130
130
  };
131
+ "click: active walkthrough step": {
132
+ type: "click: active walkthrough step";
133
+ params: unknown;
134
+ };
131
135
  }>, never, EmittedEvents>[];
132
136
  on: {
133
137
  'media.print.off': {
@@ -1,5 +1,6 @@
1
1
  import { log, enqueueActions } from 'xstate';
2
- import { machine, targetState } from './machine.setup.js';
2
+ import { machine, to, targetState } from './machine.setup.js';
3
+ import { viewBounds } from './utils.js';
3
4
  import { returnViewportBefore, cancelFitDiagram, assignViewportBefore, setViewport } from './machine.actions.layout.js';
4
5
 
5
6
  const printing = machine.createStateConfig({
@@ -8,7 +9,7 @@ const printing = machine.createStateConfig({
8
9
  cancelFitDiagram(),
9
10
  assignViewportBefore(),
10
11
  enqueueActions(({ enqueue, context }) => {
11
- const bounds = context.view.bounds;
12
+ const bounds = viewBounds(context);
12
13
  const OFFSET = 16;
13
14
  enqueue(
14
15
  setViewport({
@@ -27,7 +28,7 @@ const printing = machine.createStateConfig({
27
28
  ],
28
29
  on: {
29
30
  "media.print.off": {
30
- target: targetState.idle
31
+ ...to.idle
31
32
  },
32
33
  "*": {
33
34
  actions: [
@@ -141,6 +141,10 @@ export declare const walkthrough: {
141
141
  type: "click: selected edge";
142
142
  params: unknown;
143
143
  };
144
+ "click: active walkthrough step": {
145
+ type: "click: active walkthrough step";
146
+ params: unknown;
147
+ };
144
148
  }>, never, EmittedEvents> | ActionFunction<Context, {
145
149
  type: "walkthrough.step";
146
150
  direction: "next" | "previous";
@@ -172,7 +176,129 @@ export declare const walkthrough: {
172
176
  };
173
177
  }>, never, never, never, never>)[];
174
178
  };
175
- 'xyflow.edgeClick': {
179
+ 'xyflow.edgeClick': ({
180
+ guard: "click: active walkthrough step";
181
+ actions: ( ActionFunction<Context, Events, Events, unknown, Values<{
182
+ hotkeyActorLogic: {
183
+ src: "hotkeyActorLogic";
184
+ logic: HotkeyActorLogic;
185
+ id: "hotkey";
186
+ };
187
+ overlaysActorLogic: {
188
+ src: "overlaysActorLogic";
189
+ logic: OverlaysActorLogic;
190
+ id: "overlays";
191
+ };
192
+ searchActorLogic: {
193
+ src: "searchActorLogic";
194
+ logic: SearchActorLogic;
195
+ id: "search";
196
+ };
197
+ mediaPrintActorLogic: {
198
+ src: "mediaPrintActorLogic";
199
+ logic: MediaPrintActorLogic;
200
+ id: "mediaPrint";
201
+ };
202
+ editorActor: {
203
+ src: "editorActor";
204
+ logic: EditorActorLogic;
205
+ id: "editor";
206
+ };
207
+ }>, never, Values<{
208
+ isReady: {
209
+ type: "isReady";
210
+ params: unknown;
211
+ };
212
+ "enabled: Editor": {
213
+ type: "enabled: Editor";
214
+ params: unknown;
215
+ };
216
+ "enabled: FitView": {
217
+ type: "enabled: FitView";
218
+ params: unknown;
219
+ };
220
+ "enabled: FocusMode": {
221
+ type: "enabled: FocusMode";
222
+ params: unknown;
223
+ };
224
+ "enabled: Readonly": {
225
+ type: "enabled: Readonly";
226
+ params: unknown;
227
+ };
228
+ "enabled: RelationshipDetails": {
229
+ type: "enabled: RelationshipDetails";
230
+ params: unknown;
231
+ };
232
+ "enabled: Search": {
233
+ type: "enabled: Search";
234
+ params: unknown;
235
+ };
236
+ "enabled: ElementDetails": {
237
+ type: "enabled: ElementDetails";
238
+ params: unknown;
239
+ };
240
+ "enabled: OpenSource": {
241
+ type: "enabled: OpenSource";
242
+ params: unknown;
243
+ };
244
+ "enabled: DynamicViewWalkthrough": {
245
+ type: "enabled: DynamicViewWalkthrough";
246
+ params: unknown;
247
+ };
248
+ "focus.node: autoUnfocus": {
249
+ type: "focus.node: autoUnfocus";
250
+ params: unknown;
251
+ };
252
+ "enabled: Overlays": {
253
+ type: "enabled: Overlays";
254
+ params: unknown;
255
+ };
256
+ "not readonly": {
257
+ type: "not readonly";
258
+ params: unknown;
259
+ };
260
+ "is dynamic view": {
261
+ type: "is dynamic view";
262
+ params: unknown;
263
+ };
264
+ "is same view": {
265
+ type: "is same view";
266
+ params: unknown;
267
+ };
268
+ "is another view": {
269
+ type: "is another view";
270
+ params: unknown;
271
+ };
272
+ "click: node has modelFqn": {
273
+ type: "click: node has modelFqn";
274
+ params: unknown;
275
+ };
276
+ "click: selected node": {
277
+ type: "click: selected node";
278
+ params: unknown;
279
+ };
280
+ "click: same node": {
281
+ type: "click: same node";
282
+ params: unknown;
283
+ };
284
+ "click: focused node": {
285
+ type: "click: focused node";
286
+ params: unknown;
287
+ };
288
+ "click: node has connections": {
289
+ type: "click: node has connections";
290
+ params: unknown;
291
+ };
292
+ "click: selected edge": {
293
+ type: "click: selected edge";
294
+ params: unknown;
295
+ };
296
+ "click: active walkthrough step": {
297
+ type: "click: active walkthrough step";
298
+ params: unknown;
299
+ };
300
+ }>, never, EmittedEvents> | ActionFunction<Context, Events, Events, undefined, never, never, never, never, EmittedEvents>)[];
301
+ } | {
176
302
  actions: ( ActionFunction<Context, Events, Events, undefined, Values<{
177
303
  hotkeyActorLogic: {
178
304
  src: "hotkeyActorLogic";
@@ -288,6 +414,10 @@ export declare const walkthrough: {
288
414
  type: "click: selected edge";
289
415
  params: unknown;
290
416
  };
417
+ "click: active walkthrough step": {
418
+ type: "click: active walkthrough step";
419
+ params: unknown;
420
+ };
291
421
  }>, never, EmittedEvents> | ActionFunction<Context, {
292
422
  type: "xyflow.edgeClick";
293
423
  edge: import("../types").Types.Edge;
@@ -318,7 +448,8 @@ export declare const walkthrough: {
318
448
  id: "editor";
319
449
  };
320
450
  }>, never, never, never, never>)[];
321
- };
451
+ guard?: never;
452
+ })[];
322
453
  'notations.unhighlight': {
323
454
  actions: ActionFunction<Context, Events, Events, undefined, Values<{
324
455
  hotkeyActorLogic: {
@@ -435,6 +566,10 @@ export declare const walkthrough: {
435
566
  type: "click: selected edge";
436
567
  params: unknown;
437
568
  };
569
+ "click: active walkthrough step": {
570
+ type: "click: active walkthrough step";
571
+ params: unknown;
572
+ };
438
573
  }>, never, EmittedEvents>;
439
574
  };
440
575
  'tag.unhighlight': {
@@ -553,6 +688,10 @@ export declare const walkthrough: {
553
688
  type: "click: selected edge";
554
689
  params: unknown;
555
690
  };
691
+ "click: active walkthrough step": {
692
+ type: "click: active walkthrough step";
693
+ params: unknown;
694
+ };
556
695
  }>, never, EmittedEvents>;
557
696
  };
558
697
  'update.view': {
@@ -672,6 +811,10 @@ export declare const walkthrough: {
672
811
  type: "click: selected edge";
673
812
  params: unknown;
674
813
  };
814
+ "click: active walkthrough step": {
815
+ type: "click: active walkthrough step";
816
+ params: unknown;
817
+ };
675
818
  }>, never, EmittedEvents>[];
676
819
  };
677
820
  'walkthrough.end': {
@@ -1,4 +1,4 @@
1
- import { isStepEdgeId, getParallelStepsPrefix, invariant } from '@likec4/core';
1
+ import { invariant, isStepEdgeId, getParallelStepsPrefix, nonNullable } from '@likec4/core';
2
2
  import { clamp, first } from 'remeda';
3
3
  import { assertEvent } from 'xstate';
4
4
  import { SeqParallelAreaColor } from '../xyflow-sequence/const.js';
@@ -133,7 +133,7 @@ const walkthrough = machine.createStateConfig({
133
133
  if (nextStepIndex === stepIndex) {
134
134
  return {};
135
135
  }
136
- const nextStepId = context.xyedges[nextStepIndex].id;
136
+ const nextStepId = nonNullable(context.xyedges[nextStepIndex]).id;
137
137
  return {
138
138
  activeWalkthrough: {
139
139
  stepId: nextStepId,
@@ -146,25 +146,33 @@ const walkthrough = machine.createStateConfig({
146
146
  emitWalkthroughStep()
147
147
  ]
148
148
  },
149
- "xyflow.edgeClick": {
150
- actions: [
151
- xstateActions_cjsExports.assign(({ event, context }) => {
152
- if (!isStepEdgeId(event.edge.id) || event.edge.id === context.activeWalkthrough?.stepId) {
153
- return {};
154
- }
155
- return {
156
- activeWalkthrough: {
157
- stepId: event.edge.id,
158
- parallelPrefix: getParallelStepsPrefix(event.edge.id)
159
- }
160
- };
161
- }),
162
- updateActiveWalkthroughState(),
163
- fitFocusedBounds(),
164
- emitEdgeClick(),
165
- emitWalkthroughStep()
166
- ]
167
- },
149
+ "xyflow.edgeClick": [
150
+ {
151
+ guard: "click: active walkthrough step",
152
+ actions: [
153
+ fitFocusedBounds(),
154
+ emitEdgeClick()
155
+ ]
156
+ },
157
+ {
158
+ actions: [
159
+ xstateActions_cjsExports.assign(({ event }) => {
160
+ const stepId = event.edge.id;
161
+ invariant(isStepEdgeId(stepId));
162
+ return {
163
+ activeWalkthrough: {
164
+ stepId,
165
+ parallelPrefix: getParallelStepsPrefix(stepId)
166
+ }
167
+ };
168
+ }),
169
+ updateActiveWalkthroughState(),
170
+ fitFocusedBounds(),
171
+ emitEdgeClick(),
172
+ emitWalkthroughStep()
173
+ ]
174
+ }
175
+ ],
168
176
  "notations.unhighlight": {
169
177
  actions: updateActiveWalkthroughState()
170
178
  },
@@ -1,5 +1,5 @@
1
1
  import { ActorSystem } from 'xstate';
2
- import { EditorActorRef } from '../../editor/editorActor';
2
+ import { EditorActorRef } from '../../editor/editorActor.states';
3
3
  import { OverlaysActorRef } from '../../overlays/overlaysActor';
4
4
  import { SearchActorRef } from '../../search/searchActor';
5
5
  import { DiagramMachineRef } from './machine';
@@ -1,14 +1,12 @@
1
- import { DiagramEdge, DiagramNode, DiagramView, Fqn, BBox } from '@likec4/core/types';
1
+ import { DeploymentFqn, DiagramEdge, DiagramNode, DiagramView, Fqn, BBox } from '@likec4/core/types';
2
2
  import { Viewport } from '@xyflow/system';
3
3
  import { ActorSystem } from 'xstate';
4
- import { EditorActorRef } from '../../editor/editorActor';
5
- import { ViewPaddings } from '../../LikeC4Diagram.props';
4
+ import { EditorActorRef } from '../../editor/editorActor.states';
6
5
  import { OverlaysActorRef } from '../../overlays/overlaysActor';
7
6
  import { SearchActorRef } from '../../search/searchActor';
8
7
  import { Types } from '../types';
9
8
  import { Context } from './machine.setup';
10
9
  import { DiagramActorRef, NodeWithData } from './types';
11
- import { DeploymentFqn } from '@likec4/core';
12
10
  export declare const findNodeByModelFqn: <T extends NodeWithData>(xynodes: T[], elementFqn: Fqn) => (T & {
13
11
  data: {
14
12
  modelFqn: Fqn;
@@ -36,6 +34,11 @@ export declare namespace typedSystem {
36
34
  }
37
35
  export declare function findDiagramNode(ctx: Context, xynodeId: string): DiagramNode | null;
38
36
  export declare function findDiagramEdge(ctx: Context, xyedgeId: string): DiagramEdge | null;
37
+ /**
38
+ * Returns the bounds of the current view from the context.
39
+ * If {@link nextView} is provided, returns the bounds of the next view.
40
+ */
41
+ export declare function viewBounds(ctx: Pick<Context, 'view' | 'dynamicViewVariant'>, nextView?: DiagramView): BBox;
39
42
  export declare function focusedBounds(params: {
40
43
  context: Context;
41
44
  }): {
@@ -48,19 +51,15 @@ export declare function activeSequenceBounds(params: {
48
51
  bounds: BBox;
49
52
  duration: number;
50
53
  };
51
- export declare function nodeRef(node: Types.Node): DeploymentFqn | Fqn | null;
54
+ export declare function nodeRef(node: Types.Node): Fqn | DeploymentFqn | null;
52
55
  export declare function findCorrespondingNode(context: Pick<Context, 'lastOnNavigate' | 'xynodes'>, event: {
53
56
  view: DiagramView;
54
57
  xynodes: Types.Node[];
55
58
  }): {
56
- fromNode: Types.Node<"element" | "deployment" | "compound-element" | "compound-deployment" | "view-group" | "seq-actor" | "seq-parallel"> | null | undefined;
57
- toNode: Types.Node<"element" | "deployment" | "compound-element" | "compound-deployment" | "view-group" | "seq-actor" | "seq-parallel"> | null | undefined;
59
+ fromNode: null;
60
+ toNode: null;
61
+ } | {
62
+ fromNode: Types.Node;
63
+ toNode: Types.Node | null;
58
64
  };
59
65
  export declare function calcViewportForBounds(context: Pick<Context, 'xystore' | 'fitViewPadding'>, bounds: BBox): Viewport;
60
- export declare function parseAsNumber(value: string | number | undefined): number;
61
- export declare function parseViewPaddings(paddings: ViewPaddings): {
62
- top: number;
63
- right: number;
64
- bottom: number;
65
- left: number;
66
- };
@@ -2,6 +2,7 @@ import { BBox } from '@likec4/core/types';
2
2
  import { nonNullable, nonexhaustive } from '@likec4/core/utils';
3
3
  import { getViewportForBounds, getNodesBounds, getNodeDimensions, getEdgePosition } from '@xyflow/system';
4
4
  import { MinZoom } from '../../base/const.js';
5
+ import { pickViewBounds } from '../../utils/view-bounds.js';
5
6
 
6
7
  const findNodeByModelFqn = (xynodes, elementFqn) => {
7
8
  const node = xynodes.find((n) => "modelFqn" in n.data && n.data["modelFqn"] === elementFqn);
@@ -41,6 +42,10 @@ function findDiagramNode(ctx, xynodeId) {
41
42
  function findDiagramEdge(ctx, xyedgeId) {
42
43
  return ctx.view.edges.find((e) => e.id === xyedgeId) ?? null;
43
44
  }
45
+ function viewBounds(ctx, nextView) {
46
+ const view = nextView ?? ctx.view;
47
+ return pickViewBounds(view, ctx.dynamicViewVariant);
48
+ }
44
49
  function focusedBounds(params) {
45
50
  const knownAbsolutes = /* @__PURE__ */ new Map();
46
51
  const b = params.context.xynodes.reduce((acc, node) => {
@@ -71,7 +76,7 @@ function focusedBounds(params) {
71
76
  });
72
77
  if (b.minX === Infinity) {
73
78
  return {
74
- bounds: params.context.view.bounds
79
+ bounds: viewBounds(params.context)
75
80
  };
76
81
  }
77
82
  return {
@@ -161,7 +166,10 @@ function findCorrespondingNode(context, event) {
161
166
  const fromNodeId = context.lastOnNavigate?.fromNode;
162
167
  const fromNode = fromNodeId && context.xynodes.find((n) => n.id === fromNodeId);
163
168
  const fromRef = fromNode && nodeRef(fromNode);
164
- const toNode = fromRef && event.xynodes.find((n) => nodeRef(n) === fromRef);
169
+ if (!fromNode || !fromRef) {
170
+ return { fromNode: null, toNode: null };
171
+ }
172
+ const toNode = event.xynodes.find((n) => nodeRef(n) === fromRef) ?? null;
165
173
  return { fromNode, toNode };
166
174
  }
167
175
  function calcViewportForBounds(context, bounds) {
@@ -181,4 +189,4 @@ function calcViewportForBounds(context, bounds) {
181
189
  );
182
190
  }
183
191
 
184
- export { activeSequenceBounds, calcViewportForBounds, findCorrespondingNode, findDiagramEdge, findDiagramNode, findNodeByModelFqn, focusedBounds, nodeRef, typedSystem };
192
+ export { activeSequenceBounds, calcViewportForBounds, findCorrespondingNode, findDiagramEdge, findDiagramNode, findNodeByModelFqn, focusedBounds, nodeRef, typedSystem, viewBounds };
@@ -1,10 +1,14 @@
1
- import { BBox, DeploymentFqn, DiagramEdge, DiagramNode, DiagramNodeDriftReason, ExclusiveUnion, Fqn, IconUrl, MarkdownOrString, NonEmptyReadonlyArray, ViewId } from '@likec4/core/types';
1
+ import { AutoLayoutDirection, BBox, DeploymentFqn, DiagramEdge, DiagramNode, DiagramNodeDriftReason, ExclusiveUnion, Fqn, IconUrl, MarkdownOrString, NonEmptyReadonlyArray, ViewId } from '@likec4/core/types';
2
2
  import { XYPosition } from '@xyflow/system';
3
3
  import { FunctionComponent } from 'react';
4
4
  import { Simplify } from 'type-fest';
5
5
  import { BaseEdge, BaseEdgeData, BaseEdgeProps, BaseNode, BaseNodeData, BaseNodeProps, NonOptional } from '../base/types';
6
6
  export declare namespace Types {
7
7
  type LeafNodeData = Simplify<BaseNodeData & NonOptional<Pick<DiagramNode, 'id' | 'title' | 'technology' | 'description' | 'color' | 'shape' | 'width' | 'level' | 'height' | 'style' | 'tags' | 'x' | 'y'>> & {
8
+ /**
9
+ * View layout direction, used by DefaultHandles to position node handles
10
+ */
11
+ viewLayoutDir?: AutoLayoutDirection | undefined;
8
12
  /**
9
13
  * View this node belongs to
10
14
  */
@@ -50,6 +54,10 @@ export declare namespace Types {
50
54
  parallelPrefix: string;
51
55
  }>;
52
56
  type CompoundNodeData = Simplify<BaseNodeData & NonOptional<Pick<DiagramNode, 'id' | 'title' | 'color' | 'shape' | 'style' | 'tags' | 'x' | 'y'>> & {
57
+ /**
58
+ * View layout direction, used by DefaultHandles to position node handles
59
+ */
60
+ viewLayoutDir?: AutoLayoutDirection | undefined;
53
61
  /**
54
62
  * View this node belongs to
55
63
  */
@@ -72,7 +72,7 @@ css({
72
72
  `
73
73
  });
74
74
  const shapeBadge = css({
75
- fontWeight: 500,
75
+ fontWeight: "medium",
76
76
  letterSpacing: "0.2px",
77
77
  paddingTop: "0",
78
78
  paddingBottom: "0",
@@ -9,9 +9,9 @@ import { useDiagramContext } from '../../../hooks/useDiagram.js';
9
9
  import { useXYStore } from '../../../hooks/useXYFlow.js';
10
10
  import { container, icon, card, tabPanel, shapeBadge, elementNotation } from './NotationPanel.css.js';
11
11
  import { useMantinePortalProps } from '../../../hooks/useMantinePortalProps.js';
12
- import IconAlertTriangle from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.js';
13
- import IconHelpCircle from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconHelpCircle.js';
14
- import IconArrowDownRight from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowDownRight.js';
12
+ import IconAlertTriangle from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.js';
13
+ import IconHelpCircle from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconHelpCircle.js';
14
+ import IconArrowDownRight from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowDownRight.js';
15
15
  import { useDiagram } from '../../../hooks/safeContext.js';
16
16
  import { ElementShape } from '../../../base-primitives/element/ElementShape.js';
17
17
 
@@ -338,7 +338,10 @@ function createLayoutConstraints(xyflowApi, editingNodeIds) {
338
338
  if (rectsToUpdate.length === 0) {
339
339
  return;
340
340
  }
341
- animationFrameId ??= requestAnimationFrame(() => {
341
+ if (animationFrameId !== null) {
342
+ cancelAnimationFrame(animationFrameId);
343
+ }
344
+ animationFrameId = requestAnimationFrame(() => {
342
345
  animationFrameId = null;
343
346
  for (const id of editingNodeIds) {
344
347
  const rect = rects.get(id);
@@ -1,10 +1,18 @@
1
- import { DiagramView, WhereOperator, BBox } from '@likec4/core';
1
+ import { DiagramView, ViewId, WhereOperator } from '@likec4/core';
2
2
  import { Types } from '../types';
3
+ /**
4
+ * Convert a diagram view to XY flow nodes and edges.
5
+ * @param opts
6
+ * @param opts.view - The diagram view to convert.
7
+ * @param opts.currentViewId - The ID of the current view.
8
+ * @param opts.where - Optional filter for nodes and edges.
9
+ * @returns An object containing an array of XY flow nodes and an array of XY flow edges.
10
+ */
3
11
  export declare function diagramToXY(opts: {
4
- view: Pick<DiagramView, 'id' | 'nodes' | 'edges' | 'bounds' | '_type'>;
12
+ view: Pick<DiagramView, 'id' | 'nodes' | 'edges' | '_type' | 'autoLayout'>;
13
+ currentViewId: ViewId | undefined;
5
14
  where: WhereOperator | null;
6
15
  }): {
7
- bounds: BBox;
8
16
  xynodes: Types.Node[];
9
17
  xyedges: Types.Edge[];
10
18
  };
@@ -7,6 +7,7 @@ function diagramToXY(opts) {
7
7
  view
8
8
  } = opts;
9
9
  const xynodes = [], xyedges = [], nodeLookup = /* @__PURE__ */ new Map();
10
+ const viewLayoutDir = view.autoLayout?.direction ?? "TB";
10
11
  const queue = Queue.from(view.nodes.reduce(
11
12
  (acc, node) => {
12
13
  nodeLookup.set(node.id, node);
@@ -78,7 +79,8 @@ function diagramToXY(opts) {
78
79
  tags: node.tags ?? null,
79
80
  x: node.x,
80
81
  y: node.y,
81
- drifts: node.drifts ?? null
82
+ drifts: node.drifts ?? null,
83
+ viewLayoutDir
82
84
  };
83
85
  const leafNodeData = {
84
86
  viewId: view.id,
@@ -97,7 +99,8 @@ function diagramToXY(opts) {
97
99
  x: node.x,
98
100
  y: node.y,
99
101
  isMultiple: node.style?.multiple ?? false,
100
- drifts: node.drifts ?? null
102
+ drifts: node.drifts ?? null,
103
+ viewLayoutDir
101
104
  };
102
105
  if (node.kind === GroupElementKind) {
103
106
  xynodes.push({
@@ -218,7 +221,6 @@ function diagramToXY(opts) {
218
221
  });
219
222
  }
220
223
  return {
221
- bounds: view.bounds,
222
224
  xynodes,
223
225
  xyedges
224
226
  };
@@ -1,7 +1,11 @@
1
- import { BBox, LayoutedDynamicView } from '@likec4/core/types';
1
+ import { LayoutedDynamicView, ViewId } from '@likec4/core/types';
2
2
  import { Types } from '../types';
3
- export declare function sequenceLayoutToXY(view: LayoutedDynamicView): {
4
- bounds: BBox;
3
+ /**
4
+ * Converts a sequence layout to XY flow nodes and edges.
5
+ * @param view The next dynamic view which contains the sequence layout.
6
+ * @param currentViewId The ID of the current view (optional, used to exclude navigation to the current view)
7
+ */
8
+ export declare function sequenceLayoutToXY(view: LayoutedDynamicView, currentViewId: ViewId | undefined): {
5
9
  xynodes: Array<Types.SequenceActorNode | Types.SequenceParallelArea | Types.ViewGroupNode>;
6
10
  xyedges: Array<Types.SequenceStepEdge>;
7
11
  };
@@ -1,7 +1,7 @@
1
1
  import { nonNullable } from '@likec4/core';
2
2
  import { SeqZIndex, SeqParallelAreaColor } from './const.js';
3
3
 
4
- function sequenceLayoutToXY(view) {
4
+ function sequenceLayoutToXY(view, currentViewId) {
5
5
  const { actors, steps, compounds, parallelAreas, bounds } = view.sequenceLayout;
6
6
  const xynodes = [];
7
7
  const xyedges = [];
@@ -22,10 +22,9 @@ function sequenceLayoutToXY(view) {
22
22
  if (!edge) {
23
23
  throw new Error(`Edge ${step.id} not found`);
24
24
  }
25
- xyedges.push(toSeqStepEdge(step, edge));
25
+ xyedges.push(toSeqStepEdge(step, edge, currentViewId ?? view.id));
26
26
  }
27
27
  return {
28
- bounds,
29
28
  xynodes,
30
29
  xyedges
31
30
  };
@@ -46,7 +45,8 @@ function toCompoundArea({ id, x, y, width, height, depth }, node, view) {
46
45
  viewId: view.id,
47
46
  depth,
48
47
  isViewGroup: true,
49
- drifts: node.drifts ?? null
48
+ drifts: node.drifts ?? null,
49
+ viewLayoutDir: "LR"
50
50
  },
51
51
  // zIndex: SeqZIndex.compound,
52
52
  position: {
@@ -86,7 +86,8 @@ function toSeqParallelArea({ parallelPrefix, x, y, width, height }, view) {
86
86
  description: null,
87
87
  viewId: view.id,
88
88
  parallelPrefix,
89
- drifts: null
89
+ drifts: null,
90
+ viewLayoutDir: "LR"
90
91
  },
91
92
  zIndex: SeqZIndex.parallel,
92
93
  position: {
@@ -131,7 +132,8 @@ function toSeqActorNode({ id, x, y, width, height, ports }, actor, bounds, view)
131
132
  viewHeight: bounds.height,
132
133
  viewId: view.id,
133
134
  ports,
134
- drifts: actor.drifts ?? null
135
+ drifts: actor.drifts ?? null,
136
+ viewLayoutDir: "LR"
135
137
  },
136
138
  deletable: false,
137
139
  selectable: true,
@@ -143,7 +145,7 @@ function toSeqActorNode({ id, x, y, width, height, ports }, actor, bounds, view)
143
145
  initialHeight: height
144
146
  };
145
147
  }
146
- function toSeqStepEdge({ id, labelBBox, sourceHandle, targetHandle }, edge) {
148
+ function toSeqStepEdge({ id, labelBBox, sourceHandle, targetHandle }, edge, currentViewId) {
147
149
  return {
148
150
  id,
149
151
  type: "seq-step",
@@ -152,7 +154,7 @@ function toSeqStepEdge({ id, labelBBox, sourceHandle, targetHandle }, edge) {
152
154
  label: edge.label,
153
155
  technology: edge.technology,
154
156
  notes: edge.notes ?? null,
155
- navigateTo: edge.navigateTo,
157
+ navigateTo: edge.navigateTo !== currentViewId ? edge.navigateTo : null,
156
158
  controlPoints: null,
157
159
  labelBBox: {
158
160
  x: 0,
@@ -81,8 +81,9 @@ const NavigationPanel = memo(() => {
81
81
  );
82
82
  });
83
83
  NavigationPanel.displayName = "NavigationPanel";
84
+ const stateHasActiveTag = (state) => state.hasTag("active");
84
85
  const NavigationPanelImpl = ({ actor }) => {
85
- const opened = useSelector(actor, (s) => s.hasTag("active"));
86
+ const opened = useSelector(actor, stateHasActiveTag);
86
87
  const portalProps = useMantinePortalProps();
87
88
  return /* @__PURE__ */ jsxs(
88
89
  Popover,
@@ -38,7 +38,9 @@ const NavigationPanelControls = memo(() => {
38
38
  const actor = useNavigationActor();
39
39
  const {
40
40
  enableNavigationButtons,
41
- enableDynamicViewWalkthrough
41
+ enableDynamicViewWalkthrough,
42
+ enableCompareWithLatest,
43
+ enableSearch
42
44
  } = useEnabledFeatures();
43
45
  const {
44
46
  folders,
@@ -143,7 +145,7 @@ const NavigationPanelControls = memo(() => {
143
145
  "actions"
144
146
  ),
145
147
  enableDynamicViewWalkthrough && isDynamicView && /* @__PURE__ */ jsx(DynamicViewControls, {}, "dynamic-view-controls"),
146
- /* @__PURE__ */ jsx(SearchControl, {}, "search-control"),
148
+ enableSearch && !enableCompareWithLatest && /* @__PURE__ */ jsx(SearchControl, {}, "search-control"),
147
149
  /* @__PURE__ */ jsx(LayoutWarning, {}, "outdated-manual-layout-warning")
148
150
  ] });
149
151
  });