@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
@@ -6,38 +6,44 @@ const controlPointsContainer = css({
6
6
  pointerEvents: "none",
7
7
  top: "0",
8
8
  left: "0",
9
- mixBlendMode: "normal"
9
+ mixBlendMode: {
10
+ _dark: "screen",
11
+ _light: "multiply"
12
+ }
10
13
  });
11
14
  const controlPoint = css({
12
- fill: `var(--likec4-palette-relation-stroke)`,
13
- stroke: `var(--likec4-palette-relation-stroke)`,
14
- fillOpacity: 0.75,
15
- strokeWidth: 1,
15
+ fill: `[var(--xy-edge-stroke)]`,
16
+ stroke: `transparent`,
17
+ fillOpacity: 0.5,
18
+ strokeWidth: 10,
19
+ r: 4,
16
20
  cursor: "grab",
17
- pointerEvents: "auto",
21
+ pointerEvents: "all",
18
22
  visibility: "hidden",
19
- _hover: {
20
- fillOpacity: 1,
21
- stroke: "mantine.colors.primary.filledHover",
22
- strokeWidth: 18,
23
- transition: "stroke 100ms ease-out, stroke-width 100ms ease-out"
24
- },
23
+ transitionDuration: "120ms",
24
+ transitionProperty: "visibility, fill, fill-opacity, r",
25
+ transitionTimingFunction: "inOut",
26
+ transitionDelay: "20ms",
25
27
  [`:where([data-likec4-selected='true'], [data-likec4-hovered='true']) &`]: {
26
28
  visibility: "visible",
27
- transition: "fill-opacity 150ms ease-out, stroke 150ms ease-out, stroke-width 150ms ease-out",
28
- transitionDelay: "50ms",
29
29
  fillOpacity: 1,
30
- strokeWidth: 12
31
- }
32
- });
33
- const controlDragging = css({
34
- cursor: "grabbing",
35
- "& *": {
36
- cursor: "grabbing !important"
30
+ transitionTimingFunction: "out",
31
+ transitionDelay: "0ms"
32
+ },
33
+ [`:where([data-likec4-selected='true']) &`]: {
34
+ r: 6
35
+ },
36
+ [`:is([data-likec4-hovered='true']) &`]: {
37
+ r: 8
38
+ },
39
+ _hover: {
40
+ fill: "mantine.colors.primary.filledHover",
41
+ r: 10,
42
+ transitionDuration: "100ms"
37
43
  },
38
- "& .react-flow__edge-interaction": {
39
- cursor: "grabbing !important"
44
+ _groupActive: {
45
+ cursor: "grabbing"
40
46
  }
41
47
  });
42
48
 
43
- export { controlDragging, controlPoint, controlPointsContainer };
49
+ export { controlPoint, controlPointsContainer };
@@ -2,7 +2,7 @@ import { deepEqual } from 'fast-equals';
2
2
  import { useState } from 'react';
3
3
  import { useCallbackRef } from '../../../hooks/useCallbackRef.js';
4
4
  import { useUpdateEffect } from '../../../hooks/useUpdateEffect.js';
5
- import { vector } from '../../../utils/vector.js';
5
+ import { vector } from '@likec4/core/geometry';
6
6
  import { bezierControlPoints } from '../../../utils/xyflow.js';
7
7
 
8
8
  function useControlPoints({
@@ -19,8 +19,8 @@ function useControlPoints({
19
19
  const next = data.controlPoints ?? bezierControlPoints(data.points);
20
20
  setControlPoints((prev) => deepEqual(prev, next) ? prev : next);
21
21
  }, [
22
- data.controlPoints?.map((p) => `${p.x},${p.y}`).join("|") ?? "",
23
- data.points.map((p) => `${p[0]},${p[1]}`).join("|")
22
+ data.controlPoints?.map((p) => `${Math.round(p.x)},${Math.round(p.y)}`).join("|") ?? "",
23
+ data.points.map((p) => `${Math.round(p[0])},${Math.round(p[1])}`).join("|")
24
24
  ]);
25
25
  const insertControlPoint = useCallbackRef(({ x, y }) => {
26
26
  const sourceV = vector(sourceX, sourceY);
@@ -30,13 +30,13 @@ function useControlPoints({
30
30
  ...controlPoints.map(vector) || [],
31
31
  data.dir === "back" ? sourceV : targetV
32
32
  ];
33
- const newPointV = vector(Math.round(x), Math.round(y));
33
+ const newPointV = vector(x, y).round();
34
34
  let insertionIndex = 0;
35
35
  let minDistance = Infinity;
36
36
  for (let i = 0; i < points.length - 1; i++) {
37
37
  const a = points[i], b = points[i + 1], fromCurrentToNext = b.subtract(a), fromCurrentToNew = newPointV.subtract(a), fromNextToNew = newPointV.subtract(b);
38
38
  if (fromCurrentToNext.dot(fromCurrentToNew) * fromCurrentToNext.dot(fromNextToNew) < 0) {
39
- const distanceToEdge = Math.abs(fromCurrentToNext.cross(fromCurrentToNew).length() / fromCurrentToNext.length());
39
+ const distanceToEdge = Math.abs(fromCurrentToNext.cross(fromCurrentToNew)) / fromCurrentToNext.length();
40
40
  if (distanceToEdge < minDistance) {
41
41
  minDistance = distanceToEdge;
42
42
  insertionIndex = i;
@@ -3,10 +3,10 @@ import { line, curveCatmullRomOpen } from 'd3-shape';
3
3
  import { useCallback } from 'react';
4
4
  import { isTruthy, first, last } from 'remeda';
5
5
  import { useXYStore } from '../../../hooks/useXYFlow.js';
6
- import { extractMinimalInternalNode, getNodeIntersectionFromCenterToPoint, bezierPath, isEqualMinimalInternalNodes } from '../../../utils/xyflow.js';
6
+ import { nodeToRect, getNodeIntersectionFromCenterToPoint, bezierPath, isEqualRects } from '../../../utils/xyflow.js';
7
7
 
8
8
  const curve = line().curve(curveCatmullRomOpen.alpha(0.7)).x((d) => Math.round(d.x)).y((d) => Math.round(d.y));
9
- const isSameNodes = (a, b) => isEqualMinimalInternalNodes(a.sourceNode, b.sourceNode) && isEqualMinimalInternalNodes(a.targetNode, b.targetNode);
9
+ const isSameRects = (a, b) => isEqualRects(a.sourceNode, b.sourceNode) && isEqualRects(a.targetNode, b.targetNode);
10
10
  function useRelationshipEdgePath({
11
11
  props: {
12
12
  sourceX,
@@ -28,11 +28,11 @@ function useRelationshipEdgePath({
28
28
  const sourceNode2 = nonNullable(nodeLookup.get(source), `source node ${source} not found`);
29
29
  const targetNode2 = nonNullable(nodeLookup.get(target), `target node ${target} not found`);
30
30
  return {
31
- sourceNode: extractMinimalInternalNode(sourceNode2),
32
- targetNode: extractMinimalInternalNode(targetNode2)
31
+ sourceNode: nodeToRect(sourceNode2),
32
+ targetNode: nodeToRect(targetNode2)
33
33
  };
34
34
  }, [source, target]),
35
- isSameNodes
35
+ isSameRects
36
36
  );
37
37
  const isModified = isTruthy(data.controlPoints) || isControlPointDragging;
38
38
  if (isModified) {
@@ -5,8 +5,8 @@ import { hasAtLeast } from 'remeda';
5
5
  import { useEnabledFeatures } from '../../../context/DiagramFeatures.js';
6
6
  import '@xstate/react';
7
7
  import { useDiagram } from '../../../hooks/safeContext.js';
8
- 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';
9
- import IconTransform from '../../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.js';
8
+ 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';
9
+ import IconTransform from '../../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.js';
10
10
  import { ElementActionButtons } from '../../../base-primitives/element/ElementActionButtons.js';
11
11
 
12
12
  const compareElementActionsProps = (a, b) => {
@@ -0,0 +1,6 @@
1
+ import { Types } from '../../types';
2
+ export type NodeDriftsProps = {
3
+ nodeProps: Types.NodeProps;
4
+ position?: 'top' | 'bottom';
5
+ };
6
+ export declare function NodeDrifts({ nodeProps: { data }, position, }: NodeDriftsProps): import("react/jsx-runtime").JSX.Element | null;
@@ -1,32 +1,31 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import { Box } from '@likec4/styles/jsx';
3
3
  import { Notification, Text } from '@mantine/core';
4
- import { NodeToolbar, Position } from '@xyflow/react';
4
+ import { Position, NodeToolbar } from '@xyflow/react';
5
5
 
6
- function ElementNodeDrifts({ data }) {
6
+ function NodeDrifts({
7
+ nodeProps: { data },
8
+ position = "bottom"
9
+ }) {
7
10
  const drifts = data.drifts;
8
11
  if (!drifts || drifts.length === 0) {
9
12
  return null;
10
13
  }
14
+ const toolbarPosition = position === "top" ? Position.Top : Position.Bottom;
11
15
  return /* @__PURE__ */ jsx(
12
16
  Box,
13
17
  {
14
18
  className: "likec4-node-drifts",
15
19
  css: {
16
- position: "absolute",
17
- inset: "0",
18
- pointerEvents: "none",
20
+ display: "contents",
19
21
  "& + .likec4-element-shape": {
20
22
  outlineColor: "likec4.compare.manual.outline",
21
- outlineWidth: {
22
- base: "2px",
23
- _light: "4px"
24
- },
25
- outlineStyle: "solid",
26
- outlineOffset: "1"
23
+ outlineWidth: "4px",
24
+ outlineStyle: "dashed",
25
+ outlineOffset: "1.5"
27
26
  }
28
27
  },
29
- children: /* @__PURE__ */ jsx(NodeToolbar, { isVisible: data.hovered === true, align: "start", position: Position.Bottom, children: /* @__PURE__ */ jsx(
28
+ children: /* @__PURE__ */ jsx(NodeToolbar, { isVisible: data.hovered === true, align: "start", position: toolbarPosition, children: /* @__PURE__ */ jsx(
30
29
  Notification,
31
30
  {
32
31
  color: "orange",
@@ -43,4 +42,4 @@ function ElementNodeDrifts({ data }) {
43
42
  );
44
43
  }
45
44
 
46
- export { ElementNodeDrifts };
45
+ export { NodeDrifts };
@@ -5,6 +5,7 @@ import { Handle, Position } from '@xyflow/react';
5
5
  import { isTruthy } from 'remeda';
6
6
  import { useEnabledFeatures } from '../../../context/DiagramFeatures.js';
7
7
  import { ElementActions } from './ElementActions.js';
8
+ import { NodeDrifts } from './NodeDrifts.js';
8
9
  import { ElementDetailsButtonWithHandler } from './nodes.js';
9
10
  import { ElementNodeContainer } from '../../../base-primitives/element/ElementNodeContainer.js';
10
11
  import { ElementShape } from '../../../base-primitives/element/ElementShape.js';
@@ -68,7 +69,7 @@ const ActorStepPort = ({
68
69
  };
69
70
  const hasModelFqn = (data) => isTruthy(data.modelFqn);
70
71
  function SequenceActorNode(props) {
71
- const { enableElementDetails } = useEnabledFeatures();
72
+ const { enableElementDetails, enableCompareWithLatest } = useEnabledFeatures();
72
73
  const data = props.data;
73
74
  const {
74
75
  id,
@@ -105,6 +106,7 @@ function SequenceActorNode(props) {
105
106
  }
106
107
  ),
107
108
  /* @__PURE__ */ jsxs(ElementNodeContainer, { nodeProps: props, children: [
109
+ enableCompareWithLatest && /* @__PURE__ */ jsx(NodeDrifts, { nodeProps: props }),
108
110
  /* @__PURE__ */ jsx(ElementShape, { ...props }),
109
111
  /* @__PURE__ */ jsx(ElementData, { ...props }),
110
112
  hasModelFqn(data) && /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -128,7 +130,7 @@ function SequenceParallelArea(props) {
128
130
  borderWidth: 1,
129
131
  "--_color": {
130
132
  base: "var(--likec4-palette-stroke)",
131
- _dark: "[color-mix(in srgb, var(--likec4-palette-hiContrast) 40%, var(--likec4-palette-fill))]"
133
+ _dark: "[color-mix(in oklab, var(--likec4-palette-hiContrast) 40%, var(--likec4-palette-fill))]"
132
134
  },
133
135
  borderColor: "[var(--_color)/30]",
134
136
  backgroundColor: "var(--likec4-palette-fill)/15",
@@ -2,6 +2,7 @@ export { CompoundActions } from './CompoundActions';
2
2
  export { DeploymentElementActions, ElementActions } from './ElementActions';
3
3
  export { CompoundDeploymentNode, CompoundDetailsButtonWithHandler, CompoundElementNode, DeploymentNode, ElementDetailsButtonWithHandler, ElementNode, ViewGroupNode, } from './nodes';
4
4
  export { SequenceActorNode, SequenceParallelArea } from './SequenceActorNode';
5
+ export { NodeDrifts, type NodeDriftsProps } from './NodeDrifts';
5
6
  export * from './CompoundActions';
6
7
  export * from './ElementActions';
7
8
  export * from './toolbar/CompoundToolbar';
@@ -1,4 +1,5 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { css } from '@likec4/styles/css';
2
3
  import { useEnabledFeatures } from '../../../context/DiagramFeatures.js';
3
4
  import '@xstate/react';
4
5
  import 'fast-equals';
@@ -6,7 +7,7 @@ import 'react';
6
7
  import { useDiagram } from '../../../hooks/safeContext.js';
7
8
  import { CompoundActions } from './CompoundActions.js';
8
9
  import { DeploymentElementActions, ElementActions } from './ElementActions.js';
9
- import { ElementNodeDrifts } from './ElementNodeDrifts.js';
10
+ import { NodeDrifts } from './NodeDrifts.js';
10
11
  import { CompoundDeploymentToolbar, CompoundElementToolbar } from './toolbar/CompoundToolbar.js';
11
12
  import { DeploymentElementToolbar, ElementToolbar } from './toolbar/ElementToolbar.js';
12
13
  import { CompoundNodeContainer } from '../../../base-primitives/compound/CompoundNodeContainer.js';
@@ -52,7 +53,7 @@ function CompoundDetailsButtonWithHandler(props) {
52
53
  function ElementNode(props) {
53
54
  const { enableElementTags, enableElementDetails, enableReadOnly, enableCompareWithLatest } = useEnabledFeatures();
54
55
  return /* @__PURE__ */ jsxs(ElementNodeContainer, { nodeProps: props, children: [
55
- enableCompareWithLatest && /* @__PURE__ */ jsx(ElementNodeDrifts, { ...props }),
56
+ enableCompareWithLatest && /* @__PURE__ */ jsx(NodeDrifts, { nodeProps: props }),
56
57
  /* @__PURE__ */ jsx(ElementShape, { ...props }),
57
58
  /* @__PURE__ */ jsx(ElementData, { ...props }),
58
59
  enableElementTags && /* @__PURE__ */ jsx(ElementTags, { ...props }),
@@ -65,7 +66,7 @@ function ElementNode(props) {
65
66
  function DeploymentNode(props) {
66
67
  const { enableElementTags, enableElementDetails, enableReadOnly, enableCompareWithLatest } = useEnabledFeatures();
67
68
  return /* @__PURE__ */ jsxs(ElementNodeContainer, { nodeProps: props, children: [
68
- enableCompareWithLatest && /* @__PURE__ */ jsx(ElementNodeDrifts, { ...props }),
69
+ enableCompareWithLatest && /* @__PURE__ */ jsx(NodeDrifts, { nodeProps: props }),
69
70
  /* @__PURE__ */ jsx(ElementShape, { ...props }),
70
71
  /* @__PURE__ */ jsx(ElementData, { ...props }),
71
72
  enableElementTags && /* @__PURE__ */ jsx(ElementTags, { ...props }),
@@ -75,31 +76,68 @@ function DeploymentNode(props) {
75
76
  /* @__PURE__ */ jsx(DefaultHandles, {})
76
77
  ] });
77
78
  }
79
+ const compoundHasDrifts = css({
80
+ outlineColor: "likec4.compare.manual.outline",
81
+ outlineWidth: "4px",
82
+ outlineStyle: "dashed",
83
+ outlineOffset: "1.5"
84
+ });
85
+ const hasDrifts = (props) => {
86
+ return props.data.drifts && props.data.drifts.length > 0;
87
+ };
78
88
  function CompoundElementNode(props) {
79
- const { enableElementDetails, enableReadOnly } = useEnabledFeatures();
80
- return /* @__PURE__ */ jsxs(CompoundNodeContainer, { nodeProps: props, children: [
81
- /* @__PURE__ */ jsx(CompoundTitle, { ...props }),
82
- /* @__PURE__ */ jsx(CompoundActions, { ...props }),
83
- enableElementDetails && /* @__PURE__ */ jsx(CompoundDetailsButtonWithHandler, { ...props }),
84
- !enableReadOnly && /* @__PURE__ */ jsx(CompoundElementToolbar, { ...props }),
85
- /* @__PURE__ */ jsx(DefaultHandles, {})
86
- ] });
89
+ const { enableElementDetails, enableReadOnly, enableCompareWithLatest } = useEnabledFeatures();
90
+ const showDrifts = enableCompareWithLatest && hasDrifts(props);
91
+ return /* @__PURE__ */ jsxs(
92
+ CompoundNodeContainer,
93
+ {
94
+ className: showDrifts ? compoundHasDrifts : void 0,
95
+ nodeProps: props,
96
+ children: [
97
+ enableCompareWithLatest && /* @__PURE__ */ jsx(NodeDrifts, { nodeProps: props }),
98
+ /* @__PURE__ */ jsx(CompoundTitle, { ...props }),
99
+ /* @__PURE__ */ jsx(CompoundActions, { ...props }),
100
+ enableElementDetails && /* @__PURE__ */ jsx(CompoundDetailsButtonWithHandler, { ...props }),
101
+ !enableReadOnly && /* @__PURE__ */ jsx(CompoundElementToolbar, { ...props }),
102
+ /* @__PURE__ */ jsx(DefaultHandles, {})
103
+ ]
104
+ }
105
+ );
87
106
  }
88
107
  function CompoundDeploymentNode(props) {
89
- const { enableElementDetails, enableReadOnly } = useEnabledFeatures();
90
- return /* @__PURE__ */ jsxs(CompoundNodeContainer, { nodeProps: props, children: [
91
- /* @__PURE__ */ jsx(CompoundTitle, { ...props }),
92
- /* @__PURE__ */ jsx(CompoundActions, { ...props }),
93
- enableElementDetails && /* @__PURE__ */ jsx(CompoundDetailsButtonWithHandler, { ...props }),
94
- !enableReadOnly && /* @__PURE__ */ jsx(CompoundDeploymentToolbar, { ...props }),
95
- /* @__PURE__ */ jsx(DefaultHandles, {})
96
- ] });
108
+ const { enableElementDetails, enableReadOnly, enableCompareWithLatest } = useEnabledFeatures();
109
+ const showDrifts = enableCompareWithLatest && hasDrifts(props);
110
+ return /* @__PURE__ */ jsxs(
111
+ CompoundNodeContainer,
112
+ {
113
+ className: showDrifts ? compoundHasDrifts : void 0,
114
+ nodeProps: props,
115
+ children: [
116
+ enableCompareWithLatest && /* @__PURE__ */ jsx(NodeDrifts, { nodeProps: props }),
117
+ /* @__PURE__ */ jsx(CompoundTitle, { ...props }),
118
+ /* @__PURE__ */ jsx(CompoundActions, { ...props }),
119
+ enableElementDetails && /* @__PURE__ */ jsx(CompoundDetailsButtonWithHandler, { ...props }),
120
+ !enableReadOnly && /* @__PURE__ */ jsx(CompoundDeploymentToolbar, { ...props }),
121
+ /* @__PURE__ */ jsx(DefaultHandles, {})
122
+ ]
123
+ }
124
+ );
97
125
  }
98
126
  function ViewGroupNode(props) {
99
- return /* @__PURE__ */ jsxs(CompoundNodeContainer, { nodeProps: props, children: [
100
- /* @__PURE__ */ jsx(CompoundTitle, { ...props }),
101
- /* @__PURE__ */ jsx(DefaultHandles, {})
102
- ] });
127
+ const { enableCompareWithLatest } = useEnabledFeatures();
128
+ const showDrifts = enableCompareWithLatest && hasDrifts(props);
129
+ return /* @__PURE__ */ jsxs(
130
+ CompoundNodeContainer,
131
+ {
132
+ className: showDrifts ? compoundHasDrifts : void 0,
133
+ nodeProps: props,
134
+ children: [
135
+ enableCompareWithLatest && /* @__PURE__ */ jsx(NodeDrifts, { nodeProps: props }),
136
+ /* @__PURE__ */ jsx(CompoundTitle, { ...props }),
137
+ /* @__PURE__ */ jsx(DefaultHandles, {})
138
+ ]
139
+ }
140
+ );
103
141
  }
104
142
 
105
143
  export { CompoundDeploymentNode, CompoundDetailsButtonWithHandler, CompoundElementNode, DeploymentNode, ElementDetailsButtonWithHandler, ElementNode, ViewGroupNode };
@@ -7,8 +7,8 @@ import { GoToSourceButton, BrowseRelationshipsButton } from './_shared.js';
7
7
  import { ColorButton } from './ColorButton.js';
8
8
  import { Toolbar } from './Toolbar.js';
9
9
  import { useHandlers } from './useHandlers.js';
10
- import IconSelector from '../../../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.js';
11
- import IconCheck from '../../../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.js';
10
+ import IconSelector from '../../../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.js';
11
+ import IconCheck from '../../../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.js';
12
12
 
13
13
  function ElementToolbar(props) {
14
14
  const { enableVscode, enableRelationshipBrowser } = useEnabledFeatures();
@@ -5,8 +5,8 @@ import 'fast-equals';
5
5
  import 'react';
6
6
  import { useDiagram } from '../../../../hooks/safeContext.js';
7
7
  import { useDiagramEventHandlers } from '../../../../context/DiagramEventHandlers.js';
8
- import IconFileSymlink from '../../../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js';
9
- import IconTransform from '../../../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.js';
8
+ import IconFileSymlink from '../../../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js';
9
+ import IconTransform from '../../../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.js';
10
10
 
11
11
  const Tooltip = Tooltip$1.withProps({
12
12
  color: "dark",
@@ -4,11 +4,11 @@ import { nameFromFqn } from '@likec4/core';
4
4
  import { cx, css } from '@likec4/styles/css';
5
5
  import { VStack, styled, HStack, Box } from '@likec4/styles/jsx';
6
6
  import { bleed } from '@likec4/styles/patterns';
7
- import { Divider, ScrollAreaAutosize, Button, TooltipGroup, Tooltip as Tooltip$1, Text, ActionIcon } from '@mantine/core';
7
+ import { Divider, ScrollAreaAutosize, Button, TooltipGroup, Tooltip as Tooltip$1, Text, ActionIcon, Notification } from '@mantine/core';
8
8
  import { useActorRef, useSelector } from '@xstate/react';
9
9
  import { shallowEqual } from 'fast-equals';
10
10
  import { memo, useEffect, useCallback, useRef, useState, useLayoutEffect, Fragment, forwardRef } from 'react';
11
- import { isEmpty, pipe, map, filter, isTruthy, partition, clamp } from 'remeda';
11
+ import { isEmpty, pipe, map, filter, isTruthy, partition, clamp, entries } from 'remeda';
12
12
  import { Link } from '../../components/Link.js';
13
13
  import { PortalToContainer } from '../../components/PortalToContainer.js';
14
14
  import { useDiagramEventHandlers } from '../../context/DiagramEventHandlers.js';
@@ -21,9 +21,10 @@ import { endpoint, title } from './styles.css.js';
21
21
  import { useDiagram } from '../../hooks/safeContext.js';
22
22
  import { useRootContainerRef } from '../../context/RootContainerContext.js';
23
23
  import { roundDpr } from '../../utils/roundDpr.js';
24
- import IconArrowRight from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js';
25
- 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';
26
- import IconFileSymlink from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js';
24
+ import IconArrowRight from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js';
25
+ 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';
26
+ import IconFileSymlink from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js';
27
+ import IconInfoCircle from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.js';
27
28
  import { Markdown } from '../../base-primitives/Markdown.js';
28
29
 
29
30
  function selectDiagramContext(c) {
@@ -143,7 +144,7 @@ const RelationshipPopover = memo(() => {
143
144
  ) });
144
145
  });
145
146
  const getEdgeLabelElement = (edgeId, container) => {
146
- return container?.querySelector(`.likec4-edge-label[data-edge-id="${edgeId}"]`) ?? null;
147
+ return container?.querySelector(`.likec4-edge-label[data-edge-id="${edgeId}"]`) ?? container?.querySelector(`.likec4-edge-middle-point[data-edge-id="${edgeId}"]`) ?? null;
147
148
  };
148
149
  const POPOVER_PADDING = 8;
149
150
  const RelationshipPopoverInternal = ({
@@ -157,7 +158,7 @@ const RelationshipPopoverInternal = ({
157
158
  onMouseLeave
158
159
  }) => {
159
160
  const ref = useRef(null);
160
- const { enableNavigateTo, enableVscode } = useEnabledFeatures();
161
+ const { enableNavigateTo, enableVscode, enableCompareWithLatest } = useEnabledFeatures();
161
162
  const { onOpenSource } = useDiagramEventHandlers();
162
163
  const containerRef = useRootContainerRef();
163
164
  const [referenceEl, setReferenceEl] = useState(null);
@@ -178,24 +179,26 @@ const RelationshipPopoverInternal = ({
178
179
  offset(4),
179
180
  autoPlacement({
180
181
  crossAxis: true,
181
- padding: POPOVER_PADDING,
182
+ // padding: POPOVER_PADDING,
182
183
  allowedPlacements: [
183
184
  "bottom-start",
185
+ "bottom-end",
186
+ "left-start",
184
187
  "top-start",
188
+ "top-end",
185
189
  "right-start",
186
190
  "right-end",
187
191
  "left-end"
188
192
  ]
189
193
  }),
190
194
  size({
191
- padding: POPOVER_PADDING,
192
195
  apply({ availableHeight, availableWidth, elements }) {
193
196
  if (wasCanceled) {
194
197
  return;
195
198
  }
196
199
  Object.assign(elements.floating.style, {
197
- maxWidth: `${clamp(roundDpr(availableWidth), { min: 200, max: 400 })}px`,
198
- maxHeight: `${clamp(roundDpr(availableHeight), { min: 0, max: 500 })}px`
200
+ maxWidth: `${clamp(roundDpr(availableWidth), { min: 220, max: 400 })}px`,
201
+ maxHeight: `${clamp(roundDpr(availableHeight), { min: 100, max: 500 })}px`
199
202
  });
200
203
  }
201
204
  }),
@@ -254,7 +257,8 @@ const RelationshipPopoverInternal = ({
254
257
  styles: {
255
258
  viewport: {
256
259
  overscrollBehavior: "contain",
257
- minWidth: 180
260
+ minWidth: 200,
261
+ minHeight: 40
258
262
  }
259
263
  },
260
264
  className: cx(
@@ -281,6 +285,7 @@ const RelationshipPopoverInternal = ({
281
285
  paddingTop: "2"
282
286
  },
283
287
  children: [
288
+ enableCompareWithLatest && /* @__PURE__ */ jsx(EdgeDrifts, { diagramEdge }),
284
289
  /* @__PURE__ */ jsx(
285
290
  Button,
286
291
  {
@@ -321,6 +326,25 @@ const RelationshipPopoverInternal = ({
321
326
  }
322
327
  );
323
328
  };
329
+ const EdgeDrifts = ({ diagramEdge }) => {
330
+ const drifts = diagramEdge.drifts;
331
+ if (!drifts || drifts.length === 0) {
332
+ return null;
333
+ }
334
+ return /* @__PURE__ */ jsx(
335
+ Notification,
336
+ {
337
+ color: "orange",
338
+ withBorder: false,
339
+ withCloseButton: false,
340
+ title: "Changes:",
341
+ children: drifts.map((drift) => /* @__PURE__ */ jsxs(Text, { mt: 2, size: "sm", lh: "xs", children: [
342
+ "- ",
343
+ drift
344
+ ] }, drift))
345
+ }
346
+ );
347
+ };
324
348
  const Relationship = forwardRef(({
325
349
  viewId,
326
350
  relationship: r,
@@ -333,6 +357,65 @@ const Relationship = forwardRef(({
333
357
  const targetId = getEndpointId(r, "target", targetNode);
334
358
  const navigateTo = onNavigateTo && r.navigateTo?.id !== viewId ? r.navigateTo?.id : void 0;
335
359
  const links = r.links;
360
+ const metadataEntries = r.hasMetadata() ? entries(r.getMetadata()).sort(([a], [b]) => a.localeCompare(b)) : null;
361
+ const metadataTooltipLabel = metadataEntries && /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "6px" }, children: [
362
+ /* @__PURE__ */ jsx(
363
+ "div",
364
+ {
365
+ style: {
366
+ fontWeight: 600,
367
+ fontSize: "10px",
368
+ color: "#868e96",
369
+ marginBottom: "2px",
370
+ letterSpacing: "0.5px",
371
+ textTransform: "uppercase"
372
+ },
373
+ children: "Metadata"
374
+ }
375
+ ),
376
+ /* @__PURE__ */ jsx(
377
+ "div",
378
+ {
379
+ style: {
380
+ borderTop: "1px solid rgba(0, 0, 0, 0.1)",
381
+ paddingTop: "6px",
382
+ display: "flex",
383
+ flexDirection: "column",
384
+ gap: "6px"
385
+ },
386
+ children: metadataEntries.map(([key, value]) => {
387
+ const displayValue = Array.isArray(value) ? value.join(", ") : value;
388
+ return /* @__PURE__ */ jsxs("div", { style: { display: "flex", gap: "12px", fontSize: "12px", lineHeight: "1.4" }, children: [
389
+ /* @__PURE__ */ jsxs(
390
+ "span",
391
+ {
392
+ style: {
393
+ fontWeight: 600,
394
+ minWidth: "110px",
395
+ color: "#495057"
396
+ },
397
+ children: [
398
+ key,
399
+ ":"
400
+ ]
401
+ }
402
+ ),
403
+ /* @__PURE__ */ jsx(
404
+ "span",
405
+ {
406
+ style: {
407
+ color: "#212529",
408
+ wordBreak: "break-word",
409
+ flex: 1
410
+ },
411
+ children: displayValue
412
+ }
413
+ )
414
+ ] }, key);
415
+ })
416
+ }
417
+ )
418
+ ] });
336
419
  return /* @__PURE__ */ jsxs(
337
420
  VStack,
338
421
  {
@@ -388,7 +471,37 @@ const Relationship = forwardRef(({
388
471
  }
389
472
  ) })
390
473
  ] }) }),
391
- /* @__PURE__ */ jsx(Box, { className: title, children: r.title || "untitled" }),
474
+ /* @__PURE__ */ jsxs(HStack, { gap: "xs", alignItems: "center", children: [
475
+ /* @__PURE__ */ jsx(Box, { className: title, children: r.title || "untitled" }),
476
+ metadataTooltipLabel && /* @__PURE__ */ jsx(
477
+ Tooltip,
478
+ {
479
+ label: metadataTooltipLabel,
480
+ w: 350,
481
+ position: "right",
482
+ offset: 10,
483
+ openDelay: 300,
484
+ withArrow: true,
485
+ bg: "white",
486
+ c: "dark",
487
+ withinPortal: true,
488
+ styles: {
489
+ tooltip: {
490
+ boxShadow: "0 4px 12px rgba(0, 0, 0, 0.15)",
491
+ border: "1px solid #dee2e6"
492
+ }
493
+ },
494
+ children: /* @__PURE__ */ jsx(Box, { display: "inline-flex", children: /* @__PURE__ */ jsx(
495
+ IconInfoCircle,
496
+ {
497
+ size: 14,
498
+ opacity: 0.5,
499
+ style: { flexShrink: 0, cursor: "help" }
500
+ }
501
+ ) })
502
+ }
503
+ )
504
+ ] }),
392
505
  r.kind && /* @__PURE__ */ jsxs(HStack, { gap: "2", children: [
393
506
  /* @__PURE__ */ jsx(Label, { children: "kind" }),
394
507
  /* @__PURE__ */ jsx(Text, { size: "xs", className: css({ userSelect: "all" }), children: r.kind })
@@ -397,7 +510,7 @@ const Relationship = forwardRef(({
397
510
  /* @__PURE__ */ jsx(Label, { children: "technology" }),
398
511
  /* @__PURE__ */ jsx(Text, { size: "xs", className: css({ userSelect: "all" }), children: r.technology })
399
512
  ] }),
400
- r.description.nonEmpty && /* @__PURE__ */ jsxs(Fragment$1, { children: [
513
+ r.summary.nonEmpty && /* @__PURE__ */ jsxs(Fragment$1, { children: [
401
514
  /* @__PURE__ */ jsx(Label, { children: "description" }),
402
515
  /* @__PURE__ */ jsx(
403
516
  Box,
@@ -411,7 +524,7 @@ const Relationship = forwardRef(({
411
524
  _dark: "mantine.colors.dark[4]"
412
525
  }
413
526
  },
414
- children: /* @__PURE__ */ jsx(Markdown, { value: r.description, fontSize: "sm" })
527
+ children: /* @__PURE__ */ jsx(Markdown, { value: r.summary, fontSize: "sm", textScale: 0.875 })
415
528
  }
416
529
  )
417
530
  ] }),
@@ -57,7 +57,7 @@ declare const _actorLogic: StateMachine<RelationshipPopoverActorContext, Relatio
57
57
  params: unknown;
58
58
  };
59
59
  }>, "open timeout" | "close timeout" | "long idle", "idle" | "opening" | {
60
- active: "opened" | "hovered" | "closing";
60
+ active: "hovered" | "opened" | "closing";
61
61
  }, "opened", NonReducibleUnknown, NonReducibleUnknown, EventObject, MetaObject, {
62
62
  readonly id: "breadcrumbs";
63
63
  readonly context: () => {