@likec4/diagram 1.42.1 → 1.44.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 (309) hide show
  1. package/bundle/index.js +6198 -4860
  2. package/dist/LikeC4Diagram.d.ts +1 -1
  3. package/dist/LikeC4Diagram.js +15 -12
  4. package/dist/LikeC4Diagram.props.d.ts +28 -14
  5. package/dist/LikeC4ProjectsProvider.js +1 -1
  6. package/dist/LikeC4View.d.ts +28 -4
  7. package/dist/LikeC4View.js +28 -17
  8. package/dist/ReactLikeC4.d.ts +1 -1
  9. package/dist/ReactLikeC4.js +5 -7
  10. package/dist/StaticLikeC4Diagram.js +2 -2
  11. package/dist/_virtual/_commonjsHelpers.js +3 -0
  12. package/dist/_virtual/assign-dea9f7c8.cjs.js +3 -0
  13. package/dist/_virtual/log-ec8d4df4.cjs.js +3 -0
  14. package/dist/_virtual/raise-da5b247f.cjs.js +3 -0
  15. package/dist/_virtual/xstate-actions.cjs.js +5 -0
  16. package/dist/_virtual/xstate-actions.cjs2.js +3 -0
  17. package/dist/_virtual/xstate-dev.cjs.js +3 -0
  18. package/dist/_virtual/xstate-guards.cjs.js +5 -0
  19. package/dist/_virtual/xstate-guards.cjs2.js +3 -0
  20. package/dist/base/Background.d.ts +2 -1
  21. package/dist/base/Background.js +11 -2
  22. package/dist/base/Base.d.ts +28 -0
  23. package/dist/base/BaseXYFlow.d.ts +5 -5
  24. package/dist/base/BaseXYFlow.js +38 -44
  25. package/dist/base/const.d.ts +1 -1
  26. package/dist/base/const.js +1 -1
  27. package/dist/base/index.d.ts +6 -2
  28. package/dist/base/types.d.ts +1 -28
  29. package/dist/base/updateEdges.js +4 -3
  30. package/dist/base/updateNodes.js +3 -2
  31. package/dist/base-primitives/compound/CompoundActionButton.js +1 -1
  32. package/dist/base-primitives/compound/CompoundDetailsButton.js +1 -1
  33. package/dist/base-primitives/edge/EdgeActionButton.js +1 -1
  34. package/dist/base-primitives/edge/EdgeContainer.d.ts +1 -1
  35. package/dist/base-primitives/edge/EdgeContainer.js +4 -0
  36. package/dist/base-primitives/edge/EdgeLabel.d.ts +1 -0
  37. package/dist/base-primitives/edge/EdgeLabel.js +2 -0
  38. package/dist/base-primitives/edge/EdgeLabelContainer.d.ts +1 -1
  39. package/dist/base-primitives/edge/EdgeLabelContainer.js +4 -0
  40. package/dist/base-primitives/edge/EdgePath.d.ts +4 -0
  41. package/dist/base-primitives/edge/EdgePath.js +9 -5
  42. package/dist/base-primitives/element/ElementActionButtons.d.ts +3 -2
  43. package/dist/base-primitives/element/ElementActionButtons.js +1 -1
  44. package/dist/base-primitives/element/ElementDetailsButton.js +2 -5
  45. package/dist/base-primitives/element/ElementNodeContainer.css.js +15 -27
  46. package/dist/base-primitives/element/ElementTags.js +2 -1
  47. package/dist/base-primitives/memoEdge.js +4 -2
  48. package/dist/base-primitives/memoNode.d.ts +1 -1
  49. package/dist/base-primitives/memoNode.js +3 -3
  50. package/dist/components/ErrorFallback.js +52 -35
  51. package/dist/components/Link.js +2 -2
  52. package/dist/context/DiagramEventHandlers.js +2 -1
  53. package/dist/context/DiagramFeatures.d.ts +24 -6
  54. package/dist/context/DiagramFeatures.js +28 -56
  55. package/dist/context/IconRenderer.js +6 -6
  56. package/dist/context/LikeC4ModelContext.js +3 -10
  57. package/dist/context/TagStylesContext.js +2 -18
  58. package/dist/context/index.d.ts +1 -1
  59. package/dist/custom/customNodes.js +3 -2
  60. package/dist/custom/hooks.d.ts +1 -1
  61. package/dist/custom/index.d.ts +1 -1
  62. package/dist/custom/index.js +4 -4
  63. package/dist/editor/LikeC4EditorContext.d.ts +21 -0
  64. package/dist/editor/index.d.ts +2 -0
  65. package/dist/hooks/index.d.ts +2 -1
  66. package/dist/hooks/safeContext.d.ts +6 -3
  67. package/dist/hooks/safeContext.js +10 -3
  68. package/dist/hooks/useCallbackRef.d.ts +1 -0
  69. package/dist/hooks/useCallbackRef.js +13 -0
  70. package/dist/hooks/useCurrentView.d.ts +11 -0
  71. package/dist/hooks/{useCurrentViewId.js → useCurrentView.js} +7 -3
  72. package/dist/hooks/useCurrentViewModel.js +4 -1
  73. package/dist/hooks/useDiagram.d.ts +7 -113
  74. package/dist/hooks/useDiagram.js +7 -127
  75. package/dist/hooks/useDiagramCompareLayout.d.ts +35 -0
  76. package/dist/hooks/useDiagramCompareLayout.js +60 -0
  77. package/dist/hooks/useUpdateEffect.js +2 -4
  78. package/dist/hooks/useXYFlow.d.ts +1 -0
  79. package/dist/hooks/useXYFlow.js +4 -7
  80. package/dist/index.d.ts +2 -2
  81. package/dist/index.js +4 -3
  82. package/dist/likec4diagram/DiagramUI.js +14 -7
  83. package/dist/likec4diagram/DiagramXYFlow.d.ts +2 -2
  84. package/dist/likec4diagram/DiagramXYFlow.js +54 -51
  85. package/dist/likec4diagram/convert-to-xyflow.d.ts +0 -1
  86. package/dist/likec4diagram/custom/edges/RelationshipEdge.js +249 -220
  87. package/dist/likec4diagram/custom/edges/SequenceStepEdge.js +7 -2
  88. package/dist/likec4diagram/custom/edges/edges.css.js +3 -4
  89. package/dist/likec4diagram/custom/edges/useControlPoints.d.ts +8 -0
  90. package/dist/likec4diagram/custom/edges/useControlPoints.js +58 -0
  91. package/dist/likec4diagram/custom/edges/useRelationshipEdgePath.d.ts +7 -0
  92. package/dist/likec4diagram/custom/edges/useRelationshipEdgePath.js +60 -0
  93. package/dist/likec4diagram/custom/edges/utils.d.ts +0 -12
  94. package/dist/likec4diagram/custom/nodes/CompoundActions.js +4 -1
  95. package/dist/likec4diagram/custom/nodes/ElementActions.d.ts +2 -1
  96. package/dist/likec4diagram/custom/nodes/ElementActions.js +15 -10
  97. package/dist/likec4diagram/custom/nodes/ElementNodeDrifts.d.ts +4 -0
  98. package/dist/likec4diagram/custom/nodes/ElementNodeDrifts.js +46 -0
  99. package/dist/likec4diagram/custom/nodes/SequenceActorNode.js +4 -1
  100. package/dist/likec4diagram/custom/nodes/nodes.d.ts +9 -1
  101. package/dist/likec4diagram/custom/nodes/nodes.js +13 -9
  102. package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.d.ts +1 -1
  103. package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.js +1 -1
  104. package/dist/likec4diagram/custom/nodes/toolbar/CompoundToolbar.js +2 -1
  105. package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.js +4 -3
  106. package/dist/likec4diagram/custom/nodes/toolbar/_shared.d.ts +1 -11
  107. package/dist/likec4diagram/custom/nodes/toolbar/_shared.js +7 -51
  108. package/dist/likec4diagram/custom/nodes/toolbar/types.d.ts +5 -0
  109. package/dist/likec4diagram/custom/nodes/toolbar/types.js +7 -0
  110. package/dist/likec4diagram/custom/nodes/toolbar/useHandlers.d.ts +8 -0
  111. package/dist/likec4diagram/custom/nodes/toolbar/useHandlers.js +44 -0
  112. package/dist/likec4diagram/relationship-popover/RelationshipPopover.js +5 -7
  113. package/dist/likec4diagram/state/DiagramActorProvider.d.ts +3 -2
  114. package/dist/likec4diagram/state/DiagramActorProvider.js +96 -70
  115. package/dist/likec4diagram/state/assign.d.ts +4 -2
  116. package/dist/likec4diagram/state/assign.js +39 -103
  117. package/dist/likec4diagram/state/createViewChange.d.ts +3 -0
  118. package/dist/likec4diagram/state/createViewChange.js +90 -0
  119. package/dist/likec4diagram/state/diagram-api.d.ts +113 -0
  120. package/dist/likec4diagram/state/diagram-api.js +134 -0
  121. package/dist/likec4diagram/state/hotkeyActor.d.ts +7 -0
  122. package/dist/likec4diagram/state/hotkeyActor.js +17 -1
  123. package/dist/likec4diagram/state/machine.actions.d.ts +2099 -0
  124. package/dist/likec4diagram/state/machine.actions.js +735 -0
  125. package/dist/likec4diagram/state/machine.d.ts +3717 -0
  126. package/dist/likec4diagram/state/machine.js +141 -0
  127. package/dist/likec4diagram/state/machine.setup.d.ts +284 -0
  128. package/dist/likec4diagram/state/machine.setup.js +71 -0
  129. package/dist/likec4diagram/state/machine.state.initializing.d.ts +183 -0
  130. package/dist/likec4diagram/state/machine.state.initializing.js +55 -0
  131. package/dist/likec4diagram/state/machine.state.navigating.d.ts +117 -0
  132. package/dist/likec4diagram/state/machine.state.navigating.js +45 -0
  133. package/dist/likec4diagram/state/machine.state.ready.d.ts +3666 -0
  134. package/dist/likec4diagram/state/machine.state.ready.js +437 -0
  135. package/dist/likec4diagram/state/syncManualLayoutActor.d.ts +220 -63
  136. package/dist/likec4diagram/state/syncManualLayoutActor.js +218 -143
  137. package/dist/likec4diagram/state/types.d.ts +4 -7
  138. package/dist/likec4diagram/state/utils.d.ts +4 -2
  139. package/dist/likec4diagram/state/utils.js +4 -1
  140. package/dist/likec4diagram/types.d.ts +6 -1
  141. package/dist/likec4diagram/ui/LayoutDriftFrame.d.ts +2 -0
  142. package/dist/likec4diagram/ui/LayoutDriftFrame.js +66 -0
  143. package/dist/likec4diagram/ui/index.d.ts +1 -0
  144. package/dist/likec4diagram/ui/notation/NotationPanel.js +10 -12
  145. package/dist/likec4diagram/useLayoutConstraints.d.ts +10 -5
  146. package/dist/likec4diagram/useLayoutConstraints.js +225 -54
  147. package/dist/likec4diagram/xyflow-diagram/diagram-view.d.ts +0 -1
  148. package/dist/likec4diagram/xyflow-diagram/diagram-view.js +15 -15
  149. package/dist/navigationpanel/NavigationPanel.js +11 -7
  150. package/dist/navigationpanel/NavigationPanelControls.d.ts +2 -1
  151. package/dist/navigationpanel/NavigationPanelControls.js +23 -17
  152. package/dist/navigationpanel/NavigationPanelDropdown.d.ts +2 -1
  153. package/dist/navigationpanel/NavigationPanelDropdown.js +62 -42
  154. package/dist/navigationpanel/_common.d.ts +1 -1
  155. package/dist/navigationpanel/_common.js +4 -2
  156. package/dist/navigationpanel/actor.d.ts +11 -7
  157. package/dist/navigationpanel/actor.js +5 -4
  158. package/dist/navigationpanel/comparepanel/CompareActionsMenu.d.ts +3 -0
  159. package/dist/navigationpanel/comparepanel/CompareActionsMenu.js +59 -0
  160. package/dist/navigationpanel/comparepanel/ComparePanel.d.ts +2 -0
  161. package/dist/navigationpanel/comparepanel/ComparePanel.js +42 -0
  162. package/dist/navigationpanel/comparepanel/ComparePanelControls.d.ts +1 -0
  163. package/dist/navigationpanel/comparepanel/ComparePanelControls.js +60 -0
  164. package/dist/navigationpanel/comparepanel/LayoutTypeSwitcher.d.ts +5 -0
  165. package/dist/navigationpanel/comparepanel/LayoutTypeSwitcher.js +38 -0
  166. package/dist/navigationpanel/comparepanel/index.d.ts +1 -0
  167. package/dist/navigationpanel/controls/{ViewDetailsCard.d.ts → DetailsControls.d.ts} +1 -1
  168. package/dist/navigationpanel/controls/{ViewDetailsCard.js → DetailsControls.js} +18 -14
  169. package/dist/navigationpanel/controls/LayoutWarning.d.ts +2 -0
  170. package/dist/navigationpanel/controls/LayoutWarning.js +102 -0
  171. package/dist/navigationpanel/controls/NavigationButtons.js +4 -3
  172. package/dist/navigationpanel/controls/OpenSource.js +2 -2
  173. package/dist/navigationpanel/controls/SearchControl.d.ts +2 -1
  174. package/dist/navigationpanel/controls/SearchControl.js +15 -17
  175. package/dist/navigationpanel/controls/ToggleReadonly.d.ts +1 -1
  176. package/dist/navigationpanel/controls/ToggleReadonly.js +19 -16
  177. package/dist/navigationpanel/controls/index.d.ts +2 -1
  178. package/dist/navigationpanel/dropdown/ProjectsMenu.d.ts +2 -2
  179. package/dist/navigationpanel/dropdown/ProjectsMenu.js +5 -5
  180. package/dist/navigationpanel/editorpanel/CenterCamera.js +5 -2
  181. package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.d.ts +1 -1
  182. package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.js +21 -20
  183. package/dist/navigationpanel/editorpanel/EditorPanel.js +3 -3
  184. package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.d.ts +2 -2
  185. package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.js +16 -13
  186. package/dist/navigationpanel/editorpanel/ToggleReadonly.d.ts +1 -0
  187. package/dist/navigationpanel/editorpanel/ToggleReadonly.js +15 -0
  188. package/dist/navigationpanel/styles.css.d.ts +2 -2
  189. package/dist/navigationpanel/styles.css.js +4 -4
  190. package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.js +14 -8
  191. package/dist/navigationpanel/walkthrough/DynamicViewControls.d.ts +10 -10
  192. package/dist/navigationpanel/walkthrough/DynamicViewControls.js +31 -14
  193. package/dist/navigationpanel/walkthrough/WalkthroughPanel.d.ts +2 -1
  194. package/dist/navigationpanel/walkthrough/WalkthroughPanel.js +66 -49
  195. package/dist/node_modules/.pnpm/xstate@5.24.0_patch_hash_3a1bd6d012ec67bf6e38a00c3226d1be77089442f83aeb6e424b00ca2a11d21c/node_modules/xstate/actions/dist/xstate-actions.cjs.js +37 -0
  196. package/dist/node_modules/.pnpm/xstate@5.24.0_patch_hash_3a1bd6d012ec67bf6e38a00c3226d1be77089442f83aeb6e424b00ca2a11d21c/node_modules/xstate/dev/dist/xstate-dev.cjs.js +59 -0
  197. package/dist/node_modules/.pnpm/xstate@5.24.0_patch_hash_3a1bd6d012ec67bf6e38a00c3226d1be77089442f83aeb6e424b00ca2a11d21c/node_modules/xstate/dist/assign-dea9f7c8.cjs.js +140 -0
  198. package/dist/node_modules/.pnpm/xstate@5.24.0_patch_hash_3a1bd6d012ec67bf6e38a00c3226d1be77089442f83aeb6e424b00ca2a11d21c/node_modules/xstate/dist/log-ec8d4df4.cjs.js +401 -0
  199. package/dist/node_modules/.pnpm/xstate@5.24.0_patch_hash_3a1bd6d012ec67bf6e38a00c3226d1be77089442f83aeb6e424b00ca2a11d21c/node_modules/xstate/dist/raise-da5b247f.cjs.js +2716 -0
  200. package/dist/node_modules/.pnpm/xstate@5.24.0_patch_hash_3a1bd6d012ec67bf6e38a00c3226d1be77089442f83aeb6e424b00ca2a11d21c/node_modules/xstate/guards/dist/xstate-guards.cjs.js +26 -0
  201. package/dist/overlays/element-details/ElementDetails.js +7 -7
  202. package/dist/overlays/element-details/ElementDetailsCard.js +18 -88
  203. package/dist/overlays/element-details/MetadataValue.d.ts +9 -0
  204. package/dist/overlays/element-details/MetadataValue.js +261 -0
  205. package/dist/overlays/element-details/TabPanelDeployments.js +6 -4
  206. package/dist/overlays/element-details/TabPanelRelationships.js +3 -3
  207. package/dist/overlays/element-details/TabPanelStructure.js +1 -1
  208. package/dist/overlays/element-details/actor.d.ts +3 -2
  209. package/dist/overlays/overlaysActor.d.ts +304 -62
  210. package/dist/overlays/overlaysActor.js +132 -131
  211. package/dist/overlays/relationship-details/RelationshipDetails.js +4 -3
  212. package/dist/overlays/relationship-details/SelectEdge.js +2 -2
  213. package/dist/overlays/relationship-details/actor.d.ts +14 -2
  214. package/dist/overlays/relationship-details/actor.js +23 -5
  215. package/dist/overlays/relationship-details/custom/ElementActions.js +8 -5
  216. package/dist/overlays/relationship-details/custom/edgeTypes.js +4 -1
  217. package/dist/overlays/relationship-details/custom/nodeTypes.js +4 -1
  218. package/dist/overlays/relationship-details/hooks.js +1 -1
  219. package/dist/overlays/relationships-browser/RelationshipsBrowser.js +6 -4
  220. package/dist/overlays/relationships-browser/SelectElement.js +2 -2
  221. package/dist/overlays/relationships-browser/actor.d.ts +239 -173
  222. package/dist/overlays/relationships-browser/actor.js +132 -110
  223. package/dist/overlays/relationships-browser/const.d.ts +3 -3
  224. package/dist/overlays/relationships-browser/const.js +3 -3
  225. package/dist/overlays/relationships-browser/custom/ElementActions.js +44 -37
  226. package/dist/overlays/relationships-browser/custom/edgeTypes.js +4 -1
  227. package/dist/overlays/relationships-browser/custom/nodeTypes.js +4 -1
  228. package/dist/overlays/relationships-browser/hooks.js +7 -6
  229. package/dist/search/Search.js +2 -1
  230. package/dist/search/components/ElementsColumn.js +5 -3
  231. package/dist/search/components/PickView.js +1 -1
  232. package/dist/search/components/SearchByTags.js +21 -44
  233. package/dist/search/components/SearchInput.js +1 -1
  234. package/dist/search/components/ViewsColum.js +6 -4
  235. package/dist/shadowroot/ShadowRoot.js +53 -12
  236. package/dist/shadowroot/styles.css.d.ts +0 -4
  237. package/dist/shadowroot/styles.css.js +1 -41
  238. package/dist/styles.css2.js +1 -1
  239. package/dist/utils/index.d.ts +4 -4
  240. package/dist/utils/vector.d.ts +78 -21
  241. package/dist/utils/vector.js +91 -24
  242. package/dist/utils/view-bounds.d.ts +8 -0
  243. package/dist/utils/view-bounds.js +57 -0
  244. package/dist/utils/xyflow.d.ts +49 -7
  245. package/dist/utils/xyflow.js +63 -11
  246. package/package.json +28 -27
  247. package/panda.buildinfo.json +140 -83
  248. package/styles-min.css +1 -1
  249. package/styles.css +1 -1
  250. package/dist/hooks/useCurrentViewId.d.ts +0 -6
  251. package/dist/likec4diagram/custom/edges/utils.js +0 -23
  252. package/dist/likec4diagram/state/diagram-machine.d.ts +0 -2590
  253. package/dist/likec4diagram/state/diagram-machine.js +0 -1180
  254. package/dist/navigationpanel/editorpanel/LayoutDriftNotification.d.ts +0 -1
  255. package/dist/navigationpanel/editorpanel/LayoutDriftNotification.js +0 -56
  256. package/dist/utils/get-view-bounds.d.ts +0 -3
  257. package/dist/utils/get-view-bounds.js +0 -14
  258. /package/dist/base/{types.js → Base.js} +0 -0
  259. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/createReactComponent.js +0 -0
  260. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.js +0 -0
  261. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.js +0 -0
  262. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowDownRight.js +0 -0
  263. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowLeft.js +0 -0
  264. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js +0 -0
  265. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconBolt.js +0 -0
  266. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconBrowser.js +0 -0
  267. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.js +0 -0
  268. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.js +0 -0
  269. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.js +0 -0
  270. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js +0 -0
  271. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js +0 -0
  272. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconCylinder.js +0 -0
  273. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconDeviceMobile.js +0 -0
  274. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconDirectionSignFilled.js +0 -0
  275. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconExternalLink.js +0 -0
  276. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js +0 -0
  277. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconFocusCentered.js +0 -0
  278. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconFolderFilled.js +0 -0
  279. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconHelpCircle.js +0 -0
  280. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js +0 -0
  281. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.js +0 -0
  282. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignBottom.js +0 -0
  283. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignCenter.js +0 -0
  284. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignLeft.js +0 -0
  285. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignMiddle.js +0 -0
  286. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignRight.js +0 -0
  287. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignTop.js +0 -0
  288. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutBoardSplit.js +0 -0
  289. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutCollage.js +0 -0
  290. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutDashboard.js +0 -0
  291. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconLink.js +0 -0
  292. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconLock.js +0 -0
  293. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconLockOpen2.js +0 -0
  294. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerPlayFilled.js +0 -0
  295. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipBackFilled.js +0 -0
  296. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipForwardFilled.js +0 -0
  297. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerStopFilled.js +0 -0
  298. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconRectangularPrism.js +0 -0
  299. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconReorder.js +0 -0
  300. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.js +0 -0
  301. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js +0 -0
  302. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.js +0 -0
  303. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconStack2.js +0 -0
  304. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconStarFilled.js +0 -0
  305. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconTarget.js +0 -0
  306. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.js +0 -0
  307. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconUser.js +0 -0
  308. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js +0 -0
  309. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.1.1 → @tabler_icons-react@3.35.0_react@19.2.0}/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js +0 -0
@@ -0,0 +1,26 @@
1
+ import { __exports as xstateGuards_cjs } from '../../../../../../../_virtual/xstate-guards.cjs2.js';
2
+ import { __require as requireRaiseDa5b247f_cjs } from '../../dist/raise-da5b247f.cjs.js';
3
+ import { __require as requireXstateDev_cjs } from '../../dev/dist/xstate-dev.cjs.js';
4
+
5
+ var hasRequiredXstateGuards_cjs;
6
+
7
+ function requireXstateGuards_cjs () {
8
+ if (hasRequiredXstateGuards_cjs) return xstateGuards_cjs;
9
+ hasRequiredXstateGuards_cjs = 1;
10
+
11
+ Object.defineProperty(xstateGuards_cjs, '__esModule', { value: true });
12
+
13
+ var guards_dist_xstateGuards = /*@__PURE__*/ requireRaiseDa5b247f_cjs();
14
+ requireXstateDev_cjs();
15
+
16
+
17
+
18
+ xstateGuards_cjs.and = guards_dist_xstateGuards.and;
19
+ xstateGuards_cjs.evaluateGuard = guards_dist_xstateGuards.evaluateGuard;
20
+ xstateGuards_cjs.not = guards_dist_xstateGuards.not;
21
+ xstateGuards_cjs.or = guards_dist_xstateGuards.or;
22
+ xstateGuards_cjs.stateIn = guards_dist_xstateGuards.stateIn;
23
+ return xstateGuards_cjs;
24
+ }
25
+
26
+ export { requireXstateGuards_cjs as __require };
@@ -1,22 +1,22 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
- import { useCallbackRef } from '@mantine/hooks';
3
2
  import { useSelector } from '@xstate/react';
4
3
  import { shallowEqual } from 'fast-equals';
5
4
  import { ElementDetailsActorContext } from './actorContext.js';
6
5
  import { ElementDetailsCard } from './ElementDetailsCard.js';
7
6
 
7
+ const selector = (s) => ({
8
+ viewId: s.context.currentView.id,
9
+ fromNode: s.context.initiatedFrom.node,
10
+ rectFromNode: s.context.initiatedFrom.clientRect,
11
+ fqn: s.context.subject
12
+ });
8
13
  function ElementDetails({
9
14
  actorRef,
10
15
  onClose
11
16
  }) {
12
17
  const props = useSelector(
13
18
  actorRef,
14
- useCallbackRef((s) => ({
15
- viewId: s.context.currentView.id,
16
- fromNode: s.context.initiatedFrom.node,
17
- rectFromNode: s.context.initiatedFrom.clientRect,
18
- fqn: s.context.subject
19
- })),
19
+ selector,
20
20
  shallowEqual
21
21
  );
22
22
  return /* @__PURE__ */ jsx(ElementDetailsActorContext.Provider, { value: actorRef, children: /* @__PURE__ */ jsx(
@@ -10,20 +10,23 @@ import { pipe, map, partition, only, clamp, isNullish, entries } from 'remeda';
10
10
  import { ElementTag } from '../../base-primitives/element/ElementTags.js';
11
11
  import { Link } from '../../components/Link.js';
12
12
  import { useCurrentViewModel } from '../../hooks/useCurrentViewModel.js';
13
- import { useDiagram } from '../../hooks/useDiagram.js';
13
+ import '@xstate/react';
14
+ import 'fast-equals';
15
+ import { useDiagram } from '../../hooks/safeContext.js';
14
16
  import { elementIcon, card, cardHeader, title, tabsPanel, tabsTab, tabsList, tabsRoot, propertiesGrid, resizeHandle, backdropOpacity, backdropBlur, dialog, propertyLabel, viewButton, viewButtonTitle } from './ElementDetailsCard.css.js';
17
+ import { MetadataProvider, MetadataValue } from './MetadataValue.js';
15
18
  import { TabPanelDeployments } from './TabPanelDeployments.js';
16
19
  import { TabPanelRelationships } from './TabPanelRelationships.js';
17
20
  import { TabPanelStructure } from './TabPanelStructure.js';
18
21
  import { useUpdateEffect } from '../../hooks/useUpdateEffect.js';
19
22
  import { IconRenderer } from '../../context/IconRenderer.js';
20
23
  import { stopPropagation } from '../../utils/xyflow.js';
21
- import IconExternalLink from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconExternalLink.js';
24
+ import IconExternalLink from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconExternalLink.js';
22
25
  import { IfEnabled, DiagramFeatures } from '../../context/DiagramFeatures.js';
23
- import IconFileSymlink from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js';
24
- import IconZoomScan from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.1.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.0/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js';
27
+ 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
28
  import { Markdown } from '../../base-primitives/Markdown.js';
26
- import IconStack2 from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconStack2.js';
29
+ 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';
27
30
 
28
31
  const Divider = Divider$1.withProps({
29
32
  mb: 8,
@@ -340,7 +343,7 @@ function ElementDetailsCard({
340
343
  )
341
344
  ] })
342
345
  ] }),
343
- /* @__PURE__ */ jsxs(
346
+ /* @__PURE__ */ jsx(MetadataProvider, { children: /* @__PURE__ */ jsxs(
344
347
  Tabs,
345
348
  {
346
349
  value: activeTab,
@@ -420,7 +423,7 @@ function ElementDetailsCard({
420
423
  /* @__PURE__ */ jsx(TabsPanel, { value: "Deployments", children: /* @__PURE__ */ jsx(ScrollArea, { scrollbars: "y", type: "auto", children: /* @__PURE__ */ jsx(TabPanelDeployments, { elementFqn: elementModel.id }) }) })
421
424
  ]
422
425
  }
423
- ),
426
+ ) }),
424
427
  /* @__PURE__ */ jsx(
425
428
  m.div,
426
429
  {
@@ -476,97 +479,24 @@ function ElementProperty({
476
479
  function ElementMetata({
477
480
  value: metadata
478
481
  }) {
479
- return /* @__PURE__ */ jsxs(Fragment, { children: [
480
- /* @__PURE__ */ jsx(PropertyLabel, { children: "metadata" }),
482
+ const metadataEntries = entries(metadata).sort(([a], [b]) => a.localeCompare(b));
483
+ return /* @__PURE__ */ jsx(MetadataProvider, { children: /* @__PURE__ */ jsxs(Fragment, { children: [
484
+ /* @__PURE__ */ jsx(PropertyLabel, { style: { justifySelf: "end", textAlign: "right" }, children: "metadata" }),
481
485
  /* @__PURE__ */ jsx(
482
486
  Box,
483
487
  {
484
488
  className: css({
485
- flex: 1,
486
489
  display: "grid",
487
490
  gridTemplateColumns: "min-content 1fr",
488
- gridAutoRows: "min-content max-content",
489
- gap: `[4px 4px]`,
491
+ gridAutoRows: "min-content",
492
+ gap: `[12px 16px]`,
490
493
  alignItems: "baseline",
491
- justifyItems: "stretch",
492
- paddingRight: "xxs"
494
+ justifyItems: "stretch"
493
495
  }),
494
- children: entries(metadata).map(([key, value]) => /* @__PURE__ */ jsxs(
495
- "div",
496
- {
497
- style: {
498
- display: "contents"
499
- },
500
- className: "group",
501
- children: [
502
- /* @__PURE__ */ jsxs(
503
- "div",
504
- {
505
- className: css({
506
- fontSize: "sm",
507
- fontWeight: 500,
508
- justifySelf: "end",
509
- whiteSpace: "nowrap"
510
- }),
511
- children: [
512
- key,
513
- ":"
514
- ]
515
- }
516
- ),
517
- /* @__PURE__ */ jsx(
518
- "div",
519
- {
520
- className: css({}),
521
- children: /* @__PURE__ */ jsx(
522
- ScrollArea.Autosize,
523
- {
524
- type: "auto",
525
- mah: 200,
526
- classNames: {
527
- root: css({
528
- transitionProperty: "all",
529
- transitionDuration: "fast",
530
- transitionTimingFunction: "inOut",
531
- rounded: "sm",
532
- color: "mantine.colors.gray[8]",
533
- _dark: {
534
- color: "mantine.colors.dark[1]"
535
- },
536
- _groupHover: {
537
- transitionTimingFunction: "out",
538
- color: "mantine.colors.defaultColor",
539
- background: "mantine.colors.defaultHover"
540
- }
541
- }),
542
- viewport: css({
543
- overscrollBehavior: "none"
544
- })
545
- },
546
- children: /* @__PURE__ */ jsx(
547
- "div",
548
- {
549
- className: css({
550
- fontSize: "sm",
551
- padding: "xxs",
552
- whiteSpace: "pre",
553
- fontFamily: "mono",
554
- userSelect: "all"
555
- }),
556
- children: value
557
- }
558
- )
559
- }
560
- )
561
- }
562
- )
563
- ]
564
- },
565
- key
566
- ))
496
+ children: metadataEntries.map(([key, value]) => /* @__PURE__ */ jsx(MetadataValue, { label: key, value }, key))
567
497
  }
568
498
  )
569
- ] });
499
+ ] }) });
570
500
  }
571
501
 
572
502
  export { ElementDetailsCard };
@@ -0,0 +1,9 @@
1
+ export declare function MetadataProvider({ children }: {
2
+ children: React.ReactNode;
3
+ }): import("react/jsx-runtime").JSX.Element;
4
+ interface MetadataValueProps {
5
+ label: string;
6
+ value: string | string[];
7
+ }
8
+ export declare function MetadataValue({ label, value }: MetadataValueProps): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,261 @@
1
+ import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
2
+ import { css } from '@likec4/styles/css';
3
+ import { UnstyledButton, Flex, Text, Box, Stack, Tooltip } from '@mantine/core';
4
+ import { useState, useRef, useEffect } from 'react';
5
+ import IconChevronDown from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.js';
6
+ 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
+
8
+ function MetadataProvider({ children }) {
9
+ return /* @__PURE__ */ jsx(Fragment, { children });
10
+ }
11
+ function TruncatedValue({ value, isExpanded }) {
12
+ const [isTruncated, setIsTruncated] = useState(false);
13
+ const textRef = useRef(null);
14
+ useEffect(() => {
15
+ if (textRef.current) {
16
+ setIsTruncated(textRef.current.scrollWidth > textRef.current.clientWidth);
17
+ }
18
+ }, [value]);
19
+ return /* @__PURE__ */ jsx(
20
+ Tooltip,
21
+ {
22
+ label: isTruncated && !isExpanded ? value : null,
23
+ multiline: true,
24
+ w: 300,
25
+ withinPortal: true,
26
+ children: /* @__PURE__ */ jsx(
27
+ Text,
28
+ {
29
+ ref: textRef,
30
+ component: "div",
31
+ className: css({
32
+ fontSize: "sm",
33
+ padding: "xs",
34
+ userSelect: "all",
35
+ color: "mantine.colors.text",
36
+ lineHeight: 1.4,
37
+ whiteSpace: isExpanded ? "pre-wrap" : "nowrap",
38
+ overflow: isExpanded ? "visible" : "hidden",
39
+ textOverflow: isExpanded ? "unset" : "ellipsis",
40
+ wordBreak: isExpanded ? "break-word" : "normal",
41
+ minWidth: 0,
42
+ width: "100%"
43
+ }),
44
+ children: value
45
+ }
46
+ )
47
+ }
48
+ );
49
+ }
50
+ function MultiValueDisplay({
51
+ values,
52
+ isExpanded,
53
+ onToggle
54
+ }) {
55
+ if (isExpanded) {
56
+ return /* @__PURE__ */ jsx(Stack, { gap: "xs", children: values.map((value, index) => /* @__PURE__ */ jsxs(Flex, { align: "center", gap: "xs", children: [
57
+ /* @__PURE__ */ jsx(
58
+ Text,
59
+ {
60
+ className: css({
61
+ fontSize: "xs",
62
+ color: "mantine.colors.gray[5]",
63
+ fontWeight: 500,
64
+ flexShrink: 0,
65
+ _dark: {
66
+ color: "mantine.colors.dark[3]"
67
+ }
68
+ }),
69
+ children: "•"
70
+ }
71
+ ),
72
+ /* @__PURE__ */ jsx(
73
+ Box,
74
+ {
75
+ className: css({
76
+ minHeight: "32px",
77
+ display: "flex",
78
+ alignItems: "center",
79
+ flex: 1
80
+ }),
81
+ children: /* @__PURE__ */ jsx(TruncatedValue, { value, isExpanded: true })
82
+ }
83
+ )
84
+ ] }, index)) });
85
+ }
86
+ return /* @__PURE__ */ jsx(
87
+ Box,
88
+ {
89
+ className: css({
90
+ minHeight: "32px",
91
+ display: "flex",
92
+ alignItems: "center",
93
+ padding: "xs",
94
+ gap: "xs",
95
+ flexWrap: "wrap",
96
+ minWidth: 0,
97
+ // Allow shrinking
98
+ overflow: "hidden"
99
+ // Prevent overflow
100
+ }),
101
+ children: values.map((value, index) => /* @__PURE__ */ jsxs(Flex, { align: "center", gap: "xs", style: { minWidth: 0 }, children: [
102
+ /* @__PURE__ */ jsx(
103
+ Text,
104
+ {
105
+ className: css({
106
+ fontSize: "sm",
107
+ padding: "[4px 8px]",
108
+ backgroundColor: "mantine.colors.white",
109
+ color: "mantine.colors.text",
110
+ borderRadius: "sm",
111
+ border: "1px solid",
112
+ borderColor: "mantine.colors.gray[3]",
113
+ whiteSpace: "nowrap",
114
+ overflow: "hidden",
115
+ textOverflow: "ellipsis",
116
+ maxWidth: "min(200px, 100%)",
117
+ minWidth: "60px",
118
+ flex: "0 1 auto",
119
+ userSelect: "all",
120
+ _dark: {
121
+ backgroundColor: "mantine.colors.dark[9]",
122
+ color: "mantine.colors.text",
123
+ borderColor: "mantine.colors.dark[4]"
124
+ }
125
+ }),
126
+ title: value,
127
+ children: value
128
+ }
129
+ ),
130
+ index < values.length - 1 && /* @__PURE__ */ jsx(
131
+ Text,
132
+ {
133
+ className: css({
134
+ fontSize: "xs",
135
+ color: "mantine.colors.gray[5]",
136
+ fontWeight: 500,
137
+ flexShrink: 0,
138
+ _dark: {
139
+ color: "mantine.colors.dark[3]"
140
+ }
141
+ }),
142
+ children: "•"
143
+ }
144
+ )
145
+ ] }, index))
146
+ }
147
+ );
148
+ }
149
+ function MetadataValue({ label, value }) {
150
+ const elements = Array.isArray(value) ? value : typeof value === "string" && value.includes("\n") ? value.split("\n").map((s) => s.trim()).filter(Boolean) : [value];
151
+ const hasMultipleElements = elements.length > 1;
152
+ const [isExpanded, setIsExpanded] = useState(false);
153
+ const handleToggle = () => {
154
+ setIsExpanded(!isExpanded);
155
+ };
156
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
157
+ hasMultipleElements ? /* @__PURE__ */ jsx(
158
+ UnstyledButton,
159
+ {
160
+ onClick: handleToggle,
161
+ className: css({
162
+ fontSize: "xs",
163
+ color: "mantine.colors.dimmed",
164
+ justifySelf: "end",
165
+ textAlign: "right",
166
+ userSelect: "none",
167
+ display: "flex",
168
+ alignItems: "center",
169
+ justifyContent: "flex-end",
170
+ gap: "xs",
171
+ padding: "[4px 8px]",
172
+ borderRadius: "sm",
173
+ whiteSpace: "nowrap",
174
+ transition: "all 150ms ease",
175
+ _hover: {
176
+ backgroundColor: "mantine.colors.gray[1]",
177
+ color: "mantine.colors.primary[6]",
178
+ _dark: {
179
+ backgroundColor: "mantine.colors.dark[7]",
180
+ color: "mantine.colors.primary[4]"
181
+ }
182
+ }
183
+ }),
184
+ children: /* @__PURE__ */ jsxs(Flex, { align: "center", gap: "xs", children: [
185
+ /* @__PURE__ */ jsxs(Text, { component: "span", size: "xs", fw: 700, children: [
186
+ label,
187
+ ":"
188
+ ] }),
189
+ /* @__PURE__ */ jsx(
190
+ Text,
191
+ {
192
+ component: "span",
193
+ className: css({
194
+ fontSize: "xs",
195
+ fontWeight: 500,
196
+ color: "mantine.colors.gray[6]",
197
+ backgroundColor: "mantine.colors.gray[1]",
198
+ padding: "[1px 4px]",
199
+ borderRadius: "xs",
200
+ _dark: {
201
+ color: "mantine.colors.dark[2]",
202
+ backgroundColor: "mantine.colors.dark[6]"
203
+ }
204
+ }),
205
+ children: elements.length
206
+ }
207
+ ),
208
+ isExpanded ? /* @__PURE__ */ jsx(IconChevronDown, { size: 12 }) : /* @__PURE__ */ jsx(IconChevronRight, { size: 12 })
209
+ ] })
210
+ }
211
+ ) : /* @__PURE__ */ jsxs(
212
+ Text,
213
+ {
214
+ component: "div",
215
+ className: css({
216
+ fontSize: "xs",
217
+ color: "mantine.colors.dimmed",
218
+ justifySelf: "end",
219
+ textAlign: "right",
220
+ userSelect: "none",
221
+ whiteSpace: "nowrap",
222
+ padding: "[4px 8px]",
223
+ fontWeight: 700
224
+ }),
225
+ children: [
226
+ label,
227
+ ":"
228
+ ]
229
+ }
230
+ ),
231
+ /* @__PURE__ */ jsx(
232
+ Box,
233
+ {
234
+ className: css({
235
+ justifySelf: "stretch",
236
+ alignSelf: "start"
237
+ }),
238
+ children: hasMultipleElements ? /* @__PURE__ */ jsx(
239
+ MultiValueDisplay,
240
+ {
241
+ values: elements,
242
+ isExpanded,
243
+ onToggle: handleToggle
244
+ }
245
+ ) : /* @__PURE__ */ jsx(
246
+ Box,
247
+ {
248
+ className: css({
249
+ minHeight: "32px",
250
+ display: "flex",
251
+ alignItems: "center"
252
+ }),
253
+ children: /* @__PURE__ */ jsx(TruncatedValue, { value: elements[0] || "", isExpanded })
254
+ }
255
+ )
256
+ }
257
+ )
258
+ ] });
259
+ }
260
+
261
+ export { MetadataProvider, MetadataValue };
@@ -1,13 +1,15 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import { useTree, Alert, Tree, Box, rem, Button, Group, Text, ThemeIcon, Menu } from '@mantine/core';
3
3
  import { memo, useMemo, useEffect } from 'react';
4
- import { useDiagram } from '../../hooks/useDiagram.js';
4
+ import '@xstate/react';
5
+ import 'fast-equals';
6
+ import { useDiagram } from '../../hooks/safeContext.js';
5
7
  import { useLikeC4Model } from '../../hooks/useLikeC4Model.js';
6
8
  import { treeNodeLabel, treeNode, nodeLabel, instanceLabel } from './TabPanelDeployments.css.js';
7
- import IconInfoCircle from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.js';
8
- import IconTarget from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconTarget.js';
9
+ import IconInfoCircle from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.js';
10
+ import IconTarget from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconTarget.js';
9
11
  import { stopPropagation } from '../../utils/xyflow.js';
10
- import IconZoomScan from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js';
12
+ 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';
11
13
 
12
14
  const DeploymentNodeRenderer = ({
13
15
  node
@@ -7,9 +7,9 @@ import { useOverlaysActorRef } from '../../hooks/useOverlaysActor.js';
7
7
  import { RelationshipsBrowser } from '../relationships-browser/RelationshipsBrowser.js';
8
8
  import { useElementDetailsActorRef } from './actorContext.js';
9
9
  import { fqn, xyflow, relationshipStat } from './TabPanelRelationships.css.js';
10
- import IconArrowRight from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js';
11
- import IconInfoCircle from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.js';
12
- import IconExternalLink from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconExternalLink.js';
10
+ 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';
11
+ import IconInfoCircle from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.js';
12
+ import IconExternalLink from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconExternalLink.js';
13
13
 
14
14
  const Tooltip = Tooltip$1.withProps({
15
15
  color: "dark",
@@ -2,7 +2,7 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
2
  import { useTree, Alert, Anchor, Tree, Box, Text, Pill } from '@mantine/core';
3
3
  import { useMemo, useEffect } from 'react';
4
4
  import { treeNodeLabel, elementLabel } from './TabPanelStructure.css.js';
5
- import IconInfoCircle from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.js';
5
+ import IconInfoCircle from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.js';
6
6
 
7
7
  const ElementLabel = ({
8
8
  element
@@ -1,6 +1,6 @@
1
1
  import { DiagramView, Fqn, NodeId } from '@likec4/core/types';
2
2
  import { Rect } from '@xyflow/system';
3
- import { ActorLogicFrom, ActorRefFromLogic, SnapshotFrom, StateMachine, NonReducibleUnknown, EventObject, MetaObject, ConditionalRequired, InputFrom, RequiredActorOptions, IsNotNever, GetConcreteByKey, AnyActorLogic, RequiredLogicInput, ActorRef, MachineSnapshot, AnyActorRef, StateValue, AnyEventObject, ActionFunction, StopAction } from 'xstate';
3
+ import { ActorRefFromLogic, SnapshotFrom, StateMachine, NonReducibleUnknown, EventObject, MetaObject, ConditionalRequired, InputFrom, RequiredActorOptions, IsNotNever, GetConcreteByKey, AnyActorLogic, RequiredLogicInput, ActorRef, MachineSnapshot, AnyActorRef, StateValue, AnyEventObject, ActionFunction, StopAction } from 'xstate';
4
4
  import { RelationshipsBrowserLogic } from '../relationships-browser/actor';
5
5
  export type Input = {
6
6
  subject: Fqn;
@@ -100,7 +100,8 @@ declare const _elementDetailsLogic: StateMachine<Context, Events, {
100
100
  };
101
101
  };
102
102
  }>;
103
- export interface ElementDetailsLogic extends ActorLogicFrom<typeof _elementDetailsLogic> {
103
+ type InferredMachine = typeof _elementDetailsLogic;
104
+ export interface ElementDetailsLogic extends InferredMachine {
104
105
  }
105
106
  export declare const elementDetailsLogic: ElementDetailsLogic;
106
107
  export interface ElementDetailsActorRef extends ActorRefFromLogic<ElementDetailsLogic> {