@likec4/diagram 1.44.0 → 1.46.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 (270) hide show
  1. package/bundle/index.js +18847 -17876
  2. package/dist/LikeC4Diagram.d.ts +1 -1
  3. package/dist/LikeC4Diagram.js +15 -12
  4. package/dist/LikeC4Diagram.props.d.ts +13 -20
  5. package/dist/LikeC4ProjectsProvider.js +8 -4
  6. package/dist/LikeC4Styles.js +0 -3
  7. package/dist/LikeC4View.d.ts +3 -3
  8. package/dist/LikeC4View.js +8 -8
  9. package/dist/ReactLikeC4.d.ts +3 -6
  10. package/dist/StaticLikeC4Diagram.js +0 -2
  11. package/dist/base/Base.d.ts +1 -1
  12. package/dist/base/updateEdges.js +25 -15
  13. package/dist/base/updateNodes.d.ts +14 -0
  14. package/dist/base/updateNodes.js +51 -18
  15. package/dist/base-primitives/Markdown.d.ts +30 -4
  16. package/dist/base-primitives/Markdown.js +3 -2
  17. package/dist/base-primitives/NodeHandles.d.ts +2 -1
  18. package/dist/base-primitives/NodeHandles.js +22 -18
  19. package/dist/base-primitives/compound/CompoundActionButton.d.ts +3 -2
  20. package/dist/base-primitives/compound/CompoundActionButton.js +1 -1
  21. package/dist/base-primitives/compound/CompoundDetailsButton.d.ts +3 -2
  22. package/dist/base-primitives/compound/CompoundDetailsButton.js +1 -1
  23. package/dist/base-primitives/edge/EdgeActionButton.d.ts +3 -2
  24. package/dist/base-primitives/edge/EdgeActionButton.js +1 -1
  25. package/dist/base-primitives/edge/EdgeContainer.d.ts +1 -1
  26. package/dist/base-primitives/edge/EdgeContainer.js +6 -4
  27. package/dist/base-primitives/edge/EdgeLabel.d.ts +2 -2
  28. package/dist/base-primitives/edge/EdgeLabel.js +16 -16
  29. package/dist/base-primitives/edge/EdgeLabelContainer.d.ts +1 -1
  30. package/dist/base-primitives/edge/EdgeLabelContainer.js +5 -4
  31. package/dist/base-primitives/edge/EdgePath.js +27 -12
  32. package/dist/base-primitives/element/ElementActionButtons.d.ts +3 -2
  33. package/dist/base-primitives/element/ElementActionButtons.js +3 -3
  34. package/dist/base-primitives/element/ElementData.d.ts +3 -3
  35. package/dist/base-primitives/element/ElementData.js +13 -7
  36. package/dist/base-primitives/element/ElementDetailsButton.d.ts +3 -2
  37. package/dist/base-primitives/element/ElementDetailsButton.js +4 -1
  38. package/dist/base-primitives/element/ElementShape.js +5 -5
  39. package/dist/base-primitives/element/ElementTags.d.ts +6 -4
  40. package/dist/components/ErrorFallback.js +1 -1
  41. package/dist/components/Link.js +2 -2
  42. package/dist/context/DiagramEventHandlers.js +0 -1
  43. package/dist/context/DiagramFeatures.d.ts +2 -1
  44. package/dist/context/DiagramFeatures.js +1 -0
  45. package/dist/context/EnsureMantine.js +2 -1
  46. package/dist/context/IconRenderer.js +6 -6
  47. package/dist/context/TagStylesContext.js +1 -1
  48. package/dist/custom/hooks.d.ts +2 -2
  49. package/dist/custom/index.js +1 -1
  50. package/dist/editor/LikeC4EditorProvider.d.ts +22 -0
  51. package/dist/editor/LikeC4EditorProvider.js +12 -0
  52. package/dist/editor/__tests__/fixture.d.ts +205 -0
  53. package/dist/editor/applyChangesToManualLayout.d.ts +8 -0
  54. package/dist/editor/applyChangesToManualLayout.js +182 -0
  55. package/dist/editor/editorActor.actions.d.ts +201 -0
  56. package/dist/editor/editorActor.actions.js +149 -0
  57. package/dist/editor/editorActor.d.ts +653 -0
  58. package/dist/editor/editorActor.js +324 -0
  59. package/dist/editor/hotkeyActor.d.ts +7 -0
  60. package/dist/editor/hotkeyActor.js +19 -0
  61. package/dist/editor/index.d.ts +3 -2
  62. package/dist/editor/useEditorActorLogic.d.ts +565 -0
  63. package/dist/editor/useEditorActorLogic.js +54 -0
  64. package/dist/hooks/index.d.ts +2 -1
  65. package/dist/hooks/safeContext.d.ts +3 -2
  66. package/dist/hooks/safeContext.js +7 -4
  67. package/dist/hooks/useDiagram.d.ts +4 -2
  68. package/dist/hooks/useDiagram.js +19 -8
  69. package/dist/hooks/useDiagramCompareLayout.d.ts +8 -0
  70. package/dist/hooks/useDiagramCompareLayout.js +29 -4
  71. package/dist/hooks/useLikeC4Project.d.ts +6 -1
  72. package/dist/hooks/useLikeC4Project.js +14 -2
  73. package/dist/hooks/useMediaPrint.d.ts +6 -0
  74. package/dist/index.d.ts +1 -0
  75. package/dist/index.js +1 -0
  76. package/dist/likec4diagram/DiagramXYFlow.js +11 -7
  77. package/dist/likec4diagram/custom/edges/EdgeDrifts.d.ts +6 -0
  78. package/dist/likec4diagram/custom/edges/EdgeDrifts.js +34 -0
  79. package/dist/likec4diagram/custom/edges/RelationshipEdge.js +90 -54
  80. package/dist/likec4diagram/custom/edges/SequenceStepEdge.js +3 -1
  81. package/dist/likec4diagram/custom/edges/edges.css.d.ts +0 -1
  82. package/dist/likec4diagram/custom/edges/edges.css.js +30 -24
  83. package/dist/likec4diagram/custom/edges/useControlPoints.js +5 -5
  84. package/dist/likec4diagram/custom/edges/useRelationshipEdgePath.js +5 -5
  85. package/dist/likec4diagram/custom/nodes/ElementActions.js +2 -2
  86. package/dist/likec4diagram/custom/nodes/NodeDrifts.d.ts +6 -0
  87. package/dist/likec4diagram/custom/nodes/{ElementNodeDrifts.js → NodeDrifts.js} +12 -13
  88. package/dist/likec4diagram/custom/nodes/SequenceActorNode.js +4 -2
  89. package/dist/likec4diagram/custom/nodes/index.d.ts +1 -0
  90. package/dist/likec4diagram/custom/nodes/nodes.js +61 -23
  91. package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.js +2 -2
  92. package/dist/likec4diagram/custom/nodes/toolbar/_shared.js +2 -2
  93. package/dist/likec4diagram/relationship-popover/RelationshipPopover.js +128 -15
  94. package/dist/likec4diagram/relationship-popover/actor.d.ts +1 -1
  95. package/dist/likec4diagram/state/DiagramActorProvider.d.ts +2 -2
  96. package/dist/likec4diagram/state/DiagramActorProvider.js +63 -72
  97. package/dist/likec4diagram/state/assign.d.ts +14 -7
  98. package/dist/likec4diagram/state/assign.js +28 -200
  99. package/dist/likec4diagram/state/createViewChange.js +23 -30
  100. package/dist/likec4diagram/state/diagram-api.d.ts +20 -6
  101. package/dist/likec4diagram/state/diagram-api.js +58 -52
  102. package/dist/likec4diagram/state/hotkeyActor.d.ts +1 -8
  103. package/dist/likec4diagram/state/hotkeyActor.js +13 -17
  104. package/dist/likec4diagram/state/machine.actions.d.ts +1127 -864
  105. package/dist/likec4diagram/state/machine.actions.js +316 -296
  106. package/dist/likec4diagram/state/machine.actions.layout.d.ts +641 -0
  107. package/dist/likec4diagram/state/machine.actions.layout.js +141 -0
  108. package/dist/likec4diagram/state/machine.d.ts +18 -3712
  109. package/dist/likec4diagram/state/machine.js +64 -73
  110. package/dist/likec4diagram/state/machine.setup.d.ts +80 -26
  111. package/dist/likec4diagram/state/machine.setup.js +44 -7
  112. package/dist/likec4diagram/state/machine.state.initializing.d.ts +58 -17
  113. package/dist/likec4diagram/state/machine.state.initializing.js +14 -14
  114. package/dist/likec4diagram/state/machine.state.navigating.d.ts +5 -108
  115. package/dist/likec4diagram/state/machine.state.navigating.js +187 -35
  116. package/dist/likec4diagram/state/machine.state.ready.d.ts +2997 -2598
  117. package/dist/likec4diagram/state/machine.state.ready.focused.d.ts +710 -0
  118. package/dist/likec4diagram/state/machine.state.ready.focused.js +98 -0
  119. package/dist/likec4diagram/state/machine.state.ready.idle.d.ts +540 -0
  120. package/dist/likec4diagram/state/machine.state.ready.idle.js +105 -0
  121. package/dist/likec4diagram/state/machine.state.ready.js +95 -347
  122. package/dist/likec4diagram/state/machine.state.ready.printing.d.ts +140 -0
  123. package/dist/likec4diagram/state/machine.state.ready.printing.js +40 -0
  124. package/dist/likec4diagram/state/machine.state.ready.walkthrough.d.ts +684 -0
  125. package/dist/likec4diagram/state/machine.state.ready.walkthrough.js +190 -0
  126. package/dist/likec4diagram/state/mediaPrintActor.d.ts +12 -0
  127. package/dist/likec4diagram/state/mediaPrintActor.js +18 -0
  128. package/dist/likec4diagram/state/types.d.ts +11 -9
  129. package/dist/likec4diagram/state/utils.d.ts +44 -5
  130. package/dist/likec4diagram/state/utils.js +62 -6
  131. package/dist/likec4diagram/types.d.ts +8 -13
  132. package/dist/likec4diagram/ui/notation/NotationPanel.css.js +5 -2
  133. package/dist/likec4diagram/ui/notation/NotationPanel.js +3 -3
  134. package/dist/likec4diagram/useLayoutConstraints.js +104 -103
  135. package/dist/likec4diagram/xyflow-diagram/diagram-view.js +12 -15
  136. package/dist/likec4diagram/xyflow-sequence/sequence-layout.js +11 -8
  137. package/dist/navigationpanel/NavigationPanel.js +11 -10
  138. package/dist/navigationpanel/NavigationPanelDropdown.js +7 -7
  139. package/dist/navigationpanel/_common.js +1 -1
  140. package/dist/navigationpanel/actor.d.ts +4 -204
  141. package/dist/navigationpanel/actor.js +1 -1
  142. package/dist/navigationpanel/comparepanel/CompareActionsMenu.d.ts +3 -1
  143. package/dist/navigationpanel/comparepanel/CompareActionsMenu.js +40 -14
  144. package/dist/navigationpanel/comparepanel/ComparePanelControls.js +6 -4
  145. package/dist/navigationpanel/comparepanel/LayoutTypeSwitcher.js +2 -2
  146. package/dist/navigationpanel/controls/DetailsControls.js +2 -2
  147. package/dist/navigationpanel/controls/LayoutWarning.js +2 -1
  148. package/dist/navigationpanel/controls/NavigationButtons.js +2 -2
  149. package/dist/navigationpanel/controls/OpenSource.js +1 -1
  150. package/dist/navigationpanel/controls/SearchControl.js +2 -2
  151. package/dist/navigationpanel/controls/ToggleReadonly.js +32 -19
  152. package/dist/navigationpanel/dropdown/ProjectsMenu.js +1 -1
  153. package/dist/navigationpanel/editorpanel/CenterCamera.js +1 -1
  154. package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.js +1 -1
  155. package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.js +9 -9
  156. package/dist/navigationpanel/editorpanel/ToggleReadonly.js +1 -1
  157. package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.js +3 -3
  158. package/dist/navigationpanel/walkthrough/DynamicViewControls.d.ts +9 -9
  159. package/dist/navigationpanel/walkthrough/DynamicViewControls.js +1 -1
  160. package/dist/navigationpanel/walkthrough/WalkthroughPanel.js +4 -3
  161. package/dist/overlays/Overlays.js +24 -12
  162. package/dist/overlays/element-details/ElementDetailsCard.css.js +3 -3
  163. package/dist/overlays/element-details/ElementDetailsCard.js +4 -4
  164. package/dist/overlays/element-details/MetadataValue.d.ts +2 -1
  165. package/dist/overlays/element-details/MetadataValue.js +4 -6
  166. package/dist/overlays/element-details/TabPanelDeployments.js +3 -3
  167. package/dist/overlays/element-details/TabPanelRelationships.js +12 -7
  168. package/dist/overlays/element-details/TabPanelStructure.js +1 -1
  169. package/dist/overlays/element-details/actor.d.ts +8 -83
  170. package/dist/overlays/element-details/actor.js +0 -8
  171. package/dist/overlays/overlay/Overlay.js +10 -10
  172. package/dist/overlays/overlaysActor.d.ts +7 -392
  173. package/dist/overlays/overlaysActor.js +73 -49
  174. package/dist/overlays/relationship-details/RelationshipDetails.js +3 -3
  175. package/dist/overlays/relationship-details/SelectEdge.js +2 -2
  176. package/dist/overlays/relationship-details/_types.d.ts +3 -4
  177. package/dist/overlays/relationship-details/actor.d.ts +6 -562
  178. package/dist/overlays/relationship-details/actor.js +1 -0
  179. package/dist/overlays/relationship-details/custom/ElementActions.js +3 -3
  180. package/dist/overlays/relationship-details/layout-to-xyflow.js +3 -5
  181. package/dist/overlays/relationship-details/layout.d.ts +3 -3
  182. package/dist/overlays/relationship-details/layout.js +4 -4
  183. package/dist/overlays/relationships-browser/RelationshipsBrowser.js +3 -3
  184. package/dist/overlays/relationships-browser/SelectElement.js +2 -2
  185. package/dist/overlays/relationships-browser/_types.d.ts +2 -3
  186. package/dist/overlays/relationships-browser/actor.d.ts +7 -739
  187. package/dist/overlays/relationships-browser/custom/ElementActions.js +3 -3
  188. package/dist/overlays/relationships-browser/layout.d.ts +2 -2
  189. package/dist/overlays/relationships-browser/layout.js +3 -3
  190. package/dist/overlays/relationships-browser/useViewToNodesEdges.js +0 -3
  191. package/dist/overlays/types.d.ts +12 -13
  192. package/dist/search/components/ElementsColumn.js +7 -3
  193. package/dist/search/components/PickView.js +3 -1
  194. package/dist/search/components/SearchByTags.js +1 -1
  195. package/dist/search/components/SearchInput.js +1 -1
  196. package/dist/search/components/ViewsColum.d.ts +3 -1
  197. package/dist/search/components/ViewsColum.js +13 -7
  198. package/dist/search/components/_shared.css.d.ts +1 -1
  199. package/dist/search/searchActor.d.ts +3 -66
  200. package/dist/shadowroot/ShadowRoot.d.ts +5 -7
  201. package/dist/shadowroot/ShadowRoot.js +7 -5
  202. package/dist/shadowroot/styles.css.js +6 -1
  203. package/dist/styles.css2.js +1 -1
  204. package/dist/utils/index.d.ts +2 -2
  205. package/dist/utils/view-bounds.js +7 -6
  206. package/dist/utils/xyflow.d.ts +6 -5
  207. package/dist/utils/xyflow.js +26 -57
  208. package/package.json +24 -23
  209. package/panda.buildinfo.json +65 -71
  210. package/styles-min.css +1 -1
  211. package/styles.css +1 -1
  212. package/dist/base-primitives/edge/edge.css.d.ts +0 -4
  213. package/dist/base-primitives/edge/edge.css.js +0 -71
  214. package/dist/editor/LikeC4EditorContext.d.ts +0 -21
  215. package/dist/likec4diagram/custom/nodes/ElementNodeDrifts.d.ts +0 -4
  216. package/dist/likec4diagram/state/syncManualLayoutActor.d.ts +0 -280
  217. package/dist/likec4diagram/state/syncManualLayoutActor.js +0 -248
  218. package/dist/utils/vector.d.ts +0 -81
  219. package/dist/utils/vector.js +0 -120
  220. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/createReactComponent.js +0 -0
  221. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.js +0 -0
  222. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.js +0 -0
  223. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowDownRight.js +0 -0
  224. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowLeft.js +0 -0
  225. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js +0 -0
  226. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconBolt.js +0 -0
  227. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconBrowser.js +0 -0
  228. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.js +0 -0
  229. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.js +0 -0
  230. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.js +0 -0
  231. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js +0 -0
  232. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js +0 -0
  233. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconCylinder.js +0 -0
  234. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconDeviceMobile.js +0 -0
  235. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconDirectionSignFilled.js +0 -0
  236. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconExternalLink.js +0 -0
  237. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js +0 -0
  238. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconFocusCentered.js +0 -0
  239. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconFolderFilled.js +0 -0
  240. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconHelpCircle.js +0 -0
  241. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js +0 -0
  242. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.js +0 -0
  243. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignBottom.js +0 -0
  244. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignCenter.js +0 -0
  245. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignLeft.js +0 -0
  246. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignMiddle.js +0 -0
  247. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignRight.js +0 -0
  248. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignTop.js +0 -0
  249. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutBoardSplit.js +0 -0
  250. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutCollage.js +0 -0
  251. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutDashboard.js +0 -0
  252. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLink.js +0 -0
  253. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLock.js +0 -0
  254. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLockOpen2.js +0 -0
  255. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerPlayFilled.js +0 -0
  256. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipBackFilled.js +0 -0
  257. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipForwardFilled.js +0 -0
  258. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerStopFilled.js +0 -0
  259. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconRectangularPrism.js +0 -0
  260. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconReorder.js +0 -0
  261. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.js +0 -0
  262. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js +0 -0
  263. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.js +0 -0
  264. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconStack2.js +0 -0
  265. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconStarFilled.js +0 -0
  266. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconTarget.js +0 -0
  267. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.js +0 -0
  268. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconUser.js +0 -0
  269. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js +0 -0
  270. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js +0 -0
@@ -1,15 +1,15 @@
1
- import { DefaultMap, nonNullable } from '@likec4/core';
2
- import { isome } from '@likec4/core/utils';
1
+ import { DefaultMap, nonNullable, BBox } from '@likec4/core';
2
+ import { isome, invariant } from '@likec4/core/utils';
3
3
  import { getNodeDimensions } from '@xyflow/system';
4
4
  import { produce } from 'immer';
5
5
  import { useRef, useMemo } from 'react';
6
- import { pipe, filter, hasAtLeast, map, forEach } from 'remeda';
6
+ import { pipe, filter, map, hasAtLeast, flatMap, unique, difference, clamp } from 'remeda';
7
7
  import '@xstate/react';
8
8
  import 'fast-equals';
9
9
  import { useDiagram } from '../hooks/safeContext.js';
10
- import { bezierControlPoints, getNodeIntersection } from '../utils/xyflow.js';
10
+ import { nodeToRect, bezierControlPoints } from '../utils/xyflow.js';
11
11
  import { useXYStoreApi } from '../hooks/useXYFlow.js';
12
- import { vector } from '../utils/vector.js';
12
+ import { vector } from '@likec4/core/geometry';
13
13
 
14
14
  class Rect {
15
15
  static LeftPadding = 42;
@@ -45,14 +45,14 @@ class Rect {
45
45
  }
46
46
  get dimensions() {
47
47
  return {
48
- width: this.maxX - this.minX,
49
- height: this.maxY - this.minY
48
+ width: Math.round(this.maxX - this.minX),
49
+ height: Math.round(this.maxY - this.minY)
50
50
  };
51
51
  }
52
52
  get diff() {
53
53
  return {
54
- x: this.positionAbsolute.x - this.initialX,
55
- y: this.positionAbsolute.y - this.initialY
54
+ x: Math.round(this.positionAbsolute.x - this.initialX),
55
+ y: Math.round(this.positionAbsolute.y - this.initialY)
56
56
  };
57
57
  }
58
58
  get isMoved() {
@@ -100,6 +100,7 @@ class Leaf extends Rect {
100
100
  }
101
101
  }
102
102
  function makeEdgeModifier(edge, anchor) {
103
+ const controlPoints = edge.data.controlPoints ?? null;
103
104
  return (edgeLookup) => {
104
105
  const current = nonNullable(edgeLookup.get(edge.id), `Edge ${edge.id} not found`);
105
106
  const { x: dx, y: dy } = anchor.diff;
@@ -109,8 +110,7 @@ function makeEdgeModifier(edge, anchor) {
109
110
  type: "replace",
110
111
  item: produce(current, (draft) => {
111
112
  draft.data.points = edge.data.points;
112
- draft.data.controlPoints = edge.data.controlPoints;
113
- draft.data.labelXY = edge.data.labelXY;
113
+ draft.data.controlPoints = controlPoints;
114
114
  draft.data.labelBBox = edge.data.labelBBox;
115
115
  })
116
116
  };
@@ -120,18 +120,12 @@ function makeEdgeModifier(edge, anchor) {
120
120
  type: "replace",
121
121
  item: produce(current, (draft) => {
122
122
  draft.data.points = map(edge.data.points, (pt) => [pt[0] + dx, pt[1] + dy]);
123
- if (edge.data.controlPoints) {
124
- draft.data.controlPoints = (edge.data.controlPoints ?? []).map((pt) => ({
123
+ if (controlPoints) {
124
+ draft.data.controlPoints = controlPoints.map((pt) => ({
125
125
  x: pt.x + dx,
126
126
  y: pt.y + dy
127
127
  }));
128
128
  }
129
- if (edge.data.labelXY) {
130
- draft.data.labelXY = {
131
- x: edge.data.labelXY.x + dx,
132
- y: edge.data.labelXY.y + dy
133
- };
134
- }
135
129
  if (edge.data.labelBBox) {
136
130
  draft.data.labelBBox = {
137
131
  x: edge.data.labelBBox.x + dx,
@@ -144,8 +138,54 @@ function makeEdgeModifier(edge, anchor) {
144
138
  };
145
139
  };
146
140
  }
141
+ function makeRelativeEdgeModifier(edge, movingRect, anchorNode, staticNode) {
142
+ const controlPoints = edge.data.controlPoints ?? bezierControlPoints(edge.data.points);
143
+ const anchorV = vector(BBox.center(anchorNode));
144
+ const staticV = vector(BBox.center(staticNode));
145
+ const staticToAnchor = anchorV.subtract(staticV);
146
+ const staticToAnchorLength = staticToAnchor.length();
147
+ return (edgeLookup) => {
148
+ const current = nonNullable(edgeLookup.get(edge.id), `Edge ${edge.id} not found`);
149
+ const { x: dx, y: dy } = movingRect.diff;
150
+ if (dx === 0 && dy === 0) {
151
+ return {
152
+ id: edge.id,
153
+ type: "replace",
154
+ item: produce(current, (draft) => {
155
+ draft.data.points = edge.data.points;
156
+ draft.data.controlPoints = edge.data.controlPoints;
157
+ draft.data.labelBBox = edge.data.labelBBox;
158
+ })
159
+ };
160
+ }
161
+ const d = vector(dx, dy);
162
+ const relativePoint = (pt) => {
163
+ const p = vector(pt);
164
+ const staticToP = p.subtract(staticV);
165
+ const projLength = staticToP.dot(staticToAnchor);
166
+ const coeff = clamp(projLength / staticToAnchorLength ** 2, {
167
+ min: -1,
168
+ max: 1
169
+ });
170
+ return p.add(d.multiply(coeff)).round().toObject();
171
+ };
172
+ return {
173
+ id: edge.id,
174
+ type: "replace",
175
+ item: produce(current, (draft) => {
176
+ draft.data.controlPoints = controlPoints.map(relativePoint);
177
+ if (edge.data.labelBBox) {
178
+ draft.data.labelBBox ??= edge.data.labelBBox;
179
+ const { x, y } = relativePoint(edge.data.labelBBox);
180
+ draft.data.labelBBox.x = x;
181
+ draft.data.labelBBox.y = y;
182
+ }
183
+ })
184
+ };
185
+ };
186
+ }
147
187
  function createLayoutConstraints(xyflowApi, editingNodeIds) {
148
- const { parentLookup, nodeLookup, edges, edgeLookup } = xyflowApi.getState();
188
+ const { parentLookup, nodeLookup, edges } = xyflowApi.getState();
149
189
  const rects = /* @__PURE__ */ new Map();
150
190
  const ancestorsOf = new DefaultMap((nodeId) => {
151
191
  const xynode = nodeLookup.get(nodeId);
@@ -169,6 +209,16 @@ function createLayoutConstraints(xyflowApi, editingNodeIds) {
169
209
  }
170
210
  return nested;
171
211
  });
212
+ if (hasAtLeast(editingNodeIds, 2)) {
213
+ const leafsOnly = pipe(
214
+ editingNodeIds,
215
+ flatMap((id) => [...nestedOf.get(id)]),
216
+ unique(),
217
+ (exclude) => difference(editingNodeIds, exclude)
218
+ );
219
+ invariant(hasAtLeast(leafsOnly, 1), "All editing nodes are nested within each other");
220
+ editingNodeIds = leafsOnly;
221
+ }
172
222
  const ancestorsOfDraggingNodes = new Set(
173
223
  editingNodeIds.flatMap((i) => ancestorsOf.get(i))
174
224
  );
@@ -188,40 +238,21 @@ function createLayoutConstraints(xyflowApi, editingNodeIds) {
188
238
  parent: rect
189
239
  });
190
240
  });
191
- } else {
192
- rects.set(xynode.id, new Leaf(xynode, parent));
241
+ continue;
193
242
  }
243
+ rects.set(xynode.id, new Leaf(xynode, parent));
194
244
  }
195
245
  const rectsToUpdate = [...rects.values()];
196
246
  const edgeModifiers = /* @__PURE__ */ new Map();
197
- for (const r of rectsToUpdate) {
198
- if (r instanceof CompoundRect) {
199
- continue;
200
- }
201
- const nested = nestedOf.get(r.id);
202
- if (nested.size === 0) {
203
- continue;
204
- }
205
- pipe(
206
- edges,
207
- filter((e) => !edgeModifiers.has(e) && nested.has(e.source) && nested.has(e.target)),
208
- forEach((e) => {
209
- edgeModifiers.set(e, makeEdgeModifier(e, r));
210
- })
211
- );
212
- }
213
247
  const findMovingAncestor = (nodeId) => {
214
248
  return rects.get(nodeId) ?? ancestorsOf.get(nodeId).map((id) => rects.get(id)).find((s) => !!s) ?? null;
215
249
  };
216
250
  const movingNodes = new Set(editingNodeIds.flatMap((id) => [id, ...nestedOf.get(id)]));
217
251
  for (const edge of edges) {
218
- if (edgeModifiers.has(edge)) {
219
- continue;
220
- }
221
252
  const isSourceMoving = movingNodes.has(edge.source);
222
253
  const isTargetMoving = movingNodes.has(edge.target);
223
254
  if (isSourceMoving && isTargetMoving) {
224
- let r = rects.get(edge.source) ?? rects.get(edge.target) ?? ancestorsOf.get(edge.source).map((id) => rects.get(id)).find((s) => !!s) ?? ancestorsOf.get(edge.target).map((id) => rects.get(id)).find((s) => !!s);
255
+ let r = rects.get(edge.source) ?? rects.get(edge.target) ?? findMovingAncestor(edge.source) ?? findMovingAncestor(edge.target);
225
256
  if (r) {
226
257
  edgeModifiers.set(edge, makeEdgeModifier(edge, r));
227
258
  }
@@ -232,61 +263,21 @@ function createLayoutConstraints(xyflowApi, editingNodeIds) {
232
263
  if (!movingRect) {
233
264
  continue;
234
265
  }
235
- const controlPoints = edge.data.controlPoints ?? bezierControlPoints(edge.data.points);
236
- const sourceNode = nonNullable(nodeLookup.get(edge.source), `Source node ${edge.source} not found`);
237
- const targetNode = nonNullable(nodeLookup.get(edge.target), `Target node ${edge.target} not found`);
238
- const sourceIntersectionPoint = vector(getNodeIntersection(sourceNode, targetNode));
239
- const targetIntersectionPoint = vector(getNodeIntersection(targetNode, sourceNode));
240
- const [anchorV, staticV] = isSourceMoving ? [sourceIntersectionPoint, targetIntersectionPoint] : [targetIntersectionPoint, sourceIntersectionPoint];
241
- const staticToAnchor = anchorV.subtract(staticV);
242
- const staticToAnchorLength = staticToAnchor.length();
243
- edgeModifiers.set(edge, (edgeLookup2) => {
244
- const current = nonNullable(edgeLookup2.get(edge.id), `Edge ${edge.id} not found`);
245
- const { x: dx, y: dy } = movingRect.diff;
246
- if (dx === 0 && dy === 0) {
247
- return {
248
- id: edge.id,
249
- type: "replace",
250
- item: produce(current, (draft) => {
251
- draft.data.points = edge.data.points;
252
- draft.data.controlPoints = edge.data.controlPoints;
253
- draft.data.labelXY = edge.data.labelXY;
254
- draft.data.labelBBox = edge.data.labelBBox;
255
- })
256
- };
257
- }
258
- const d = vector(dx, dy);
259
- const relativePoint = (pt) => {
260
- const p = vector(pt);
261
- const staticToP = p.subtract(staticV);
262
- const projLength = staticToP.dot(staticToAnchor);
263
- const coeff = Math.min(projLength / staticToAnchorLength ** 2, 1);
264
- const newP = p.add(d.multiply(coeff));
265
- return {
266
- x: Math.round(newP.x),
267
- y: Math.round(newP.y)
268
- };
269
- };
270
- return {
271
- id: edge.id,
272
- type: "replace",
273
- item: produce(current, (draft) => {
274
- draft.data.controlPoints = controlPoints.map(relativePoint);
275
- if (edge.data.labelBBox) {
276
- const { x, y } = relativePoint(edge.data.labelBBox);
277
- draft.data.labelBBox = {
278
- x,
279
- y,
280
- width: edge.data.labelBBox.width,
281
- height: edge.data.labelBBox.height
282
- };
283
- }
284
- if (edge.data.labelXY) {
285
- draft.data.labelXY = relativePoint(edge.data.labelXY);
286
- }
287
- })
288
- };
289
- });
266
+ const [sourceNode, targetNode] = pipe(
267
+ [edge.source, edge.target],
268
+ map((id) => nonNullable(nodeLookup.get(id), `Node ${id} not found`)),
269
+ map(nodeToRect)
270
+ );
271
+ const [anchorNode, staticNode] = isSourceMoving ? [sourceNode, targetNode] : [targetNode, sourceNode];
272
+ edgeModifiers.set(
273
+ edge,
274
+ makeRelativeEdgeModifier(
275
+ edge,
276
+ movingRect,
277
+ anchorNode,
278
+ staticNode
279
+ )
280
+ );
290
281
  continue;
291
282
  }
292
283
  }
@@ -335,10 +326,11 @@ function createLayoutConstraints(xyflowApi, editingNodeIds) {
335
326
  }
336
327
  return acc;
337
328
  }, []);
338
- xyflowApi.getState().triggerNodeChanges(nodeUpdates);
329
+ const { edgeLookup, triggerNodeChanges, triggerEdgeChanges } = xyflowApi.getState();
330
+ triggerNodeChanges(nodeUpdates);
339
331
  const changes = _edgeModifiers.map((fm) => fm(edgeLookup));
340
332
  if (changes.length > 0) {
341
- xyflowApi.getState().triggerEdgeChanges(changes);
333
+ triggerEdgeChanges(changes);
342
334
  }
343
335
  }
344
336
  let animationFrameId = null;
@@ -349,8 +341,16 @@ function createLayoutConstraints(xyflowApi, editingNodeIds) {
349
341
  animationFrameId ??= requestAnimationFrame(() => {
350
342
  animationFrameId = null;
351
343
  for (const id of editingNodeIds) {
352
- const rect = nonNullable(rects.get(id));
353
- const node = nonNullable(nodeLookup.get(id));
344
+ const rect = rects.get(id);
345
+ if (!rect) {
346
+ console.warn(`Rect not found for id ${id}`);
347
+ continue;
348
+ }
349
+ const node = nodeLookup.get(id);
350
+ if (!node) {
351
+ console.warn(`Node not found for id ${id}`);
352
+ continue;
353
+ }
354
354
  rect.positionAbsolute = node.internals.positionAbsolute;
355
355
  }
356
356
  updateXYFlow();
@@ -373,10 +373,11 @@ function useLayoutConstraints() {
373
373
  const { nodeLookup } = xystore.getState();
374
374
  const draggingNodes = pipe(
375
375
  Array.from(nodeLookup.values()),
376
- filter((n) => n.draggable !== false && (n.dragging === true || n.id === xynode.id || n.selected === true))
376
+ filter((n) => n.dragging === true || n.id === xynode.id || n.selected === true),
377
+ map((n) => n.id)
377
378
  );
378
379
  if (hasAtLeast(draggingNodes, 1)) {
379
- solverRef.current = createLayoutConstraints(xystore, map(draggingNodes, (x) => x.id));
380
+ solverRef.current = createLayoutConstraints(xystore, draggingNodes);
380
381
  }
381
382
  },
382
383
  onNodeDrag: (_event) => {
@@ -1,4 +1,4 @@
1
- import { Queue, whereOperatorAsPredicate, nonNullable, GroupElementKind, RichText, invariant } from '@likec4/core';
1
+ import { Queue, whereOperatorAsPredicate, nonNullable, GroupElementKind, invariant } from '@likec4/core';
2
2
  import { pick, hasAtLeast } from 'remeda';
3
3
  import { ZIndexes } from '../../base/const.js';
4
4
 
@@ -50,7 +50,6 @@ function diagramToXY(opts) {
50
50
  position.y -= parent.y;
51
51
  }
52
52
  const id = ns + node.id;
53
- const drifts = node.drifts ?? null;
54
53
  const base = {
55
54
  id,
56
55
  deletable: false,
@@ -78,14 +77,15 @@ function diagramToXY(opts) {
78
77
  icon: node.icon ?? "none",
79
78
  tags: node.tags ?? null,
80
79
  x: node.x,
81
- y: node.y
80
+ y: node.y,
81
+ drifts: node.drifts ?? null
82
82
  };
83
83
  const leafNodeData = {
84
84
  viewId: view.id,
85
85
  id: node.id,
86
86
  title: node.title,
87
87
  technology: node.technology ?? null,
88
- description: RichText.from(node.description),
88
+ description: node.description ?? null,
89
89
  height: node.height,
90
90
  width: node.width,
91
91
  level: node.level,
@@ -96,7 +96,8 @@ function diagramToXY(opts) {
96
96
  tags: node.tags,
97
97
  x: node.x,
98
98
  y: node.y,
99
- isMultiple: node.style?.multiple ?? false
99
+ isMultiple: node.style?.multiple ?? false,
100
+ drifts: node.drifts ?? null
100
101
  };
101
102
  if (node.kind === GroupElementKind) {
102
103
  xynodes.push({
@@ -127,8 +128,7 @@ function diagramToXY(opts) {
127
128
  ...compoundData,
128
129
  ...navigateTo,
129
130
  deploymentFqn,
130
- modelFqn,
131
- drifts
131
+ modelFqn
132
132
  }
133
133
  }
134
134
  );
@@ -143,8 +143,7 @@ function diagramToXY(opts) {
143
143
  data: {
144
144
  ...compoundData,
145
145
  ...navigateTo,
146
- modelFqn,
147
- drifts
146
+ modelFqn
148
147
  }
149
148
  }
150
149
  );
@@ -159,8 +158,7 @@ function diagramToXY(opts) {
159
158
  ...leafNodeData,
160
159
  ...navigateTo,
161
160
  deploymentFqn,
162
- modelFqn,
163
- drifts
161
+ modelFqn
164
162
  }
165
163
  }
166
164
  );
@@ -175,8 +173,7 @@ function diagramToXY(opts) {
175
173
  data: {
176
174
  ...leafNodeData,
177
175
  ...navigateTo,
178
- modelFqn,
179
- drifts
176
+ modelFqn
180
177
  }
181
178
  }
182
179
  );
@@ -203,11 +200,11 @@ function diagramToXY(opts) {
203
200
  id: edge.id,
204
201
  label: edge.label,
205
202
  technology: edge.technology,
206
- notes: RichText.from(edge.notes),
203
+ notes: edge.notes ?? null,
207
204
  navigateTo: edge.navigateTo,
208
205
  controlPoints: edge.controlPoints ?? null,
209
206
  labelBBox: edge.labelBBox ?? null,
210
- labelXY: edge.labelBBox ? { x: edge.labelBBox.x, y: edge.labelBBox.y } : null,
207
+ labelXY: null,
211
208
  points: edge.points,
212
209
  color: edge.color ?? "gray",
213
210
  line: edge.line ?? "dashed",
@@ -1,5 +1,4 @@
1
1
  import { nonNullable } from '@likec4/core';
2
- import { RichText } from '@likec4/core/types';
3
2
  import { SeqZIndex, SeqParallelAreaColor } from './const.js';
4
3
 
5
4
  function sequenceLayoutToXY(view) {
@@ -46,7 +45,8 @@ function toCompoundArea({ id, x, y, width, height, depth }, node, view) {
46
45
  y,
47
46
  viewId: view.id,
48
47
  depth,
49
- isViewGroup: true
48
+ isViewGroup: true,
49
+ drifts: node.drifts ?? null
50
50
  },
51
51
  // zIndex: SeqZIndex.compound,
52
52
  position: {
@@ -83,9 +83,10 @@ function toSeqParallelArea({ parallelPrefix, x, y, width, height }, view) {
83
83
  icon: null,
84
84
  width,
85
85
  height,
86
- description: RichText.EMPTY,
86
+ description: null,
87
87
  viewId: view.id,
88
- parallelPrefix
88
+ parallelPrefix,
89
+ drifts: null
89
90
  },
90
91
  zIndex: SeqZIndex.parallel,
91
92
  position: {
@@ -126,10 +127,11 @@ function toSeqActorNode({ id, x, y, width, height, ports }, actor, bounds, view)
126
127
  tags: actor.tags,
127
128
  modelFqn: actor.modelRef ?? null,
128
129
  technology: actor.technology ?? null,
129
- description: RichText.from(actor.description),
130
+ description: actor.description ?? null,
130
131
  viewHeight: bounds.height,
131
132
  viewId: view.id,
132
- ports
133
+ ports,
134
+ drifts: actor.drifts ?? null
133
135
  },
134
136
  deletable: false,
135
137
  selectable: true,
@@ -149,7 +151,7 @@ function toSeqStepEdge({ id, labelBBox, sourceHandle, targetHandle }, edge) {
149
151
  id,
150
152
  label: edge.label,
151
153
  technology: edge.technology,
152
- notes: RichText.from(edge.notes),
154
+ notes: edge.notes ?? null,
153
155
  navigateTo: edge.navigateTo,
154
156
  controlPoints: null,
155
157
  labelBBox: {
@@ -165,7 +167,8 @@ function toSeqStepEdge({ id, labelBBox, sourceHandle, targetHandle }, edge) {
165
167
  dir: "forward",
166
168
  head: edge.head ?? "normal",
167
169
  tail: edge.tail ?? "none",
168
- astPath: edge.astPath
170
+ astPath: edge.astPath,
171
+ drifts: edge.drifts ?? null
169
172
  },
170
173
  selectable: true,
171
174
  focusable: false,
@@ -2,12 +2,11 @@ import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import { VStack } from '@likec4/styles/jsx';
3
3
  import { hstack } from '@likec4/styles/patterns';
4
4
  import { Popover, PopoverTarget } from '@mantine/core';
5
- import { useUpdateEffect } from '@react-hookz/web';
6
5
  import { useActorRef, useSelector } from '@xstate/react';
7
6
  import { LayoutGroup, AnimatePresence } from 'motion/react';
8
7
  import * as m from 'motion/react-m';
9
8
  import { memo, useEffect } from 'react';
10
- import { useDiagramActorRef } from '../hooks/safeContext.js';
9
+ import { useDiagram } from '../hooks/safeContext.js';
11
10
  import { useCurrentView } from '../hooks/useCurrentView.js';
12
11
  import { useOptionalCurrentViewModel } from '../hooks/useCurrentViewModel.js';
13
12
  import { useDiagramContext } from '../hooks/useDiagram.js';
@@ -22,7 +21,7 @@ import { EditorPanel } from './editorpanel/EditorPanel.js';
22
21
  import { ActiveWalkthroughControls } from './walkthrough/ActiveWalkthroughControls.js';
23
22
 
24
23
  const NavigationPanel = memo(() => {
25
- const diagramActor = useDiagramActorRef();
24
+ const diagram = useDiagram();
26
25
  const view = useCurrentView();
27
26
  const viewModel = useOptionalCurrentViewModel();
28
27
  const actorRef = useActorRef(
@@ -36,13 +35,11 @@ const NavigationPanel = memo(() => {
36
35
  );
37
36
  useEffect(() => {
38
37
  const subscription = actorRef.on("navigateTo", (event) => {
39
- if (diagramActor.getSnapshot().context.view.id !== event.viewId) {
40
- diagramActor.send({ type: "navigate.to", viewId: event.viewId });
41
- }
38
+ diagram.navigateTo(event.viewId);
42
39
  });
43
40
  return () => subscription.unsubscribe();
44
- }, [actorRef, diagramActor]);
45
- useUpdateEffect(() => {
41
+ }, [actorRef, diagram]);
42
+ useEffect(() => {
46
43
  actorRef.send({ type: "update.inputs", inputs: { viewModel, view } });
47
44
  }, [viewModel, view]);
48
45
  return /* @__PURE__ */ jsx(
@@ -69,6 +66,9 @@ const NavigationPanel = memo(() => {
69
66
  "calc(100vw - 2 * {spacing.md})",
70
67
  "calc(100cqw - 2 * {spacing.md})"
71
68
  ]
69
+ },
70
+ _print: {
71
+ display: "none"
72
72
  }
73
73
  },
74
74
  children: /* @__PURE__ */ jsxs(NavigationPanelActorContextProvider, { value: actorRef, children: [
@@ -92,7 +92,7 @@ const NavigationPanelImpl = ({ actor }) => {
92
92
  },
93
93
  opened,
94
94
  position: "bottom-start",
95
- trapFocus: true,
95
+ trapFocus: opened,
96
96
  ...portalProps,
97
97
  clickOutsideEvents: ["pointerdown", "mousedown", "click"],
98
98
  onDismiss: () => actor.send({ type: "dropdown.dismiss" }),
@@ -109,6 +109,7 @@ const NavigationPanelPopoverTarget = ({ actor }) => {
109
109
  m.div,
110
110
  {
111
111
  layout: true,
112
+ layoutDependency: isActiveWalkthrough,
112
113
  className: hstack({
113
114
  layerStyle: "likec4.panel",
114
115
  position: "relative",
@@ -118,7 +119,7 @@ const NavigationPanelPopoverTarget = ({ actor }) => {
118
119
  width: "100%"
119
120
  }),
120
121
  onMouseLeave: () => actor.send({ type: "breadcrumbs.mouseLeave" }),
121
- children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "popLayout", children: isActiveWalkthrough ? /* @__PURE__ */ jsx(ActiveWalkthroughControls, {}) : /* @__PURE__ */ jsx(NavigationPanelControls, {}) })
122
+ children: /* @__PURE__ */ jsx(AnimatePresence, { children: isActiveWalkthrough ? /* @__PURE__ */ jsx(ActiveWalkthroughControls, {}) : /* @__PURE__ */ jsx(NavigationPanelControls, {}) })
122
123
  }
123
124
  ) }) });
124
125
  };
@@ -17,13 +17,13 @@ import { ProjectsMenu } from './dropdown/ProjectsMenu.js';
17
17
  import { useNavigationActor, useNavigationActorSnapshot, useNavigationActorContext, useNavigationActorRef } from './hooks.js';
18
18
  import { breadcrumbTitle } from './styles.css.js';
19
19
  import { useOnDiagramEvent } from '../hooks/useDiagram.js';
20
- import IconSearch from '../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js';
21
- import IconChevronRight from '../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js';
22
- import IconDirectionSignFilled from '../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconDirectionSignFilled.js';
23
- import IconStack2 from '../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconStack2.js';
24
- import IconZoomScan from '../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js';
25
- import IconStarFilled from '../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconStarFilled.js';
26
- import IconFolderFilled from '../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconFolderFilled.js';
20
+ import IconSearch from '../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js';
21
+ import IconChevronRight from '../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js';
22
+ import IconDirectionSignFilled from '../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconDirectionSignFilled.js';
23
+ import IconStack2 from '../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconStack2.js';
24
+ import IconZoomScan from '../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js';
25
+ import IconStarFilled from '../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconStarFilled.js';
26
+ import IconFolderFilled from '../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconFolderFilled.js';
27
27
 
28
28
  const scopedKeydownHandler = createScopedKeydownHandler({
29
29
  siblingSelector: "[data-likec4-focusable]",
@@ -4,7 +4,7 @@ import { navigationPanelActionIcon } from '@likec4/styles/recipes';
4
4
  import { ActionIcon, ThemeIcon, Tooltip as Tooltip$1, Breadcrumbs } from '@mantine/core';
5
5
  import * as m from 'motion/react-m';
6
6
  import { forwardRef } from 'react';
7
- import IconChevronRight from '../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js';
7
+ import IconChevronRight from '../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js';
8
8
 
9
9
  const Tooltip = Tooltip$1.withProps({
10
10
  color: "dark",