@likec4/diagram 1.46.4 → 1.48.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (337) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +1 -1
  3. package/bundle/index.js +7332 -5799
  4. package/dist/LikeC4Diagram.d.ts +1 -1
  5. package/dist/LikeC4Diagram.js +20 -14
  6. package/dist/LikeC4Diagram.props.d.ts +2 -6
  7. package/dist/LikeC4ProjectsOverview.d.ts +7 -0
  8. package/dist/LikeC4ProjectsOverview.js +32 -0
  9. package/dist/LikeC4ProjectsProvider.js +7 -5
  10. package/dist/LikeC4Styles.d.ts +2 -6
  11. package/dist/LikeC4Styles.js +44 -43
  12. package/dist/LikeC4View.d.ts +9 -1
  13. package/dist/LikeC4View.js +10 -8
  14. package/dist/ReactLikeC4.d.ts +12 -2
  15. package/dist/ReactLikeC4.js +5 -3
  16. package/dist/adhoc-editor/ActorProvider.d.ts +7 -0
  17. package/dist/adhoc-editor/ActorProvider.js +41 -0
  18. package/dist/adhoc-editor/EditorNavigationPanel.d.ts +1 -0
  19. package/dist/adhoc-editor/EditorNavigationPanel.js +32 -0
  20. package/dist/adhoc-editor/LikeC4AdHocViewEditor.d.ts +4 -0
  21. package/dist/adhoc-editor/LikeC4AdHocViewEditor.js +71 -0
  22. package/dist/adhoc-editor/SelectElementOverlay.d.ts +1 -0
  23. package/dist/adhoc-editor/SelectElementOverlay.js +124 -0
  24. package/dist/adhoc-editor/actor.d.ts +131 -0
  25. package/dist/adhoc-editor/actor.editor.d.ts +54 -0
  26. package/dist/adhoc-editor/actor.editor.js +96 -0
  27. package/dist/adhoc-editor/actor.js +20 -0
  28. package/dist/adhoc-editor/actor.layouter.d.ts +48 -0
  29. package/dist/adhoc-editor/actor.layouter.js +66 -0
  30. package/dist/adhoc-editor/actor.types.d.ts +57 -0
  31. package/dist/adhoc-editor/actor.types.js +22 -0
  32. package/dist/adhoc-editor/hooks.d.ts +14 -0
  33. package/dist/adhoc-editor/hooks.js +47 -0
  34. package/dist/adhoc-editor/index.d.ts +2 -0
  35. package/dist/adhoc-editor/viewrules/ViewRulesPanel.d.ts +6 -0
  36. package/dist/adhoc-editor/viewrules/ViewRulesPanel.js +104 -0
  37. package/dist/base/const.d.ts +1 -0
  38. package/dist/base/const.js +2 -1
  39. package/dist/base/updateEdges.js +26 -3
  40. package/dist/base/updateNodes.js +8 -5
  41. package/dist/base-primitives/Markdown.js +1 -1
  42. package/dist/base-primitives/NodeHandles.d.ts +4 -2
  43. package/dist/base-primitives/NodeHandles.js +46 -19
  44. package/dist/base-primitives/compound/CompoundActionButton.js +3 -1
  45. package/dist/base-primitives/compound/CompoundDetailsButton.js +3 -1
  46. package/dist/base-primitives/compound/CompoundNodeContainer.d.ts +4 -3
  47. package/dist/base-primitives/compound/CompoundNodeContainer.js +6 -4
  48. package/dist/base-primitives/compound/CompoundTitle.js +1 -2
  49. package/dist/base-primitives/edge/EdgeActionButton.js +1 -1
  50. package/dist/base-primitives/edge/EdgeContainer.js +5 -2
  51. package/dist/base-primitives/edge/EdgeLabelContainer.js +5 -1
  52. package/dist/base-primitives/element/ElementActionButtons.js +31 -58
  53. package/dist/base-primitives/element/ElementData.d.ts +7 -7
  54. package/dist/base-primitives/element/ElementData.js +61 -48
  55. package/dist/base-primitives/element/ElementDetailsButton.js +2 -1
  56. package/dist/base-primitives/element/ElementNodeContainer.d.ts +2 -2
  57. package/dist/base-primitives/element/ElementNodeContainer.js +3 -3
  58. package/dist/base-primitives/element/ElementShape.js +109 -20
  59. package/dist/base-primitives/element/ElementTags.d.ts +6 -2
  60. package/dist/base-primitives/element/ElementTags.js +55 -32
  61. package/dist/base-primitives/index.d.ts +1 -1
  62. package/dist/base-primitives/memoEdge.js +1 -1
  63. package/dist/base-primitives/memoNode.js +1 -1
  64. package/dist/components/ErrorFallback.js +1 -1
  65. package/dist/components/Link.js +2 -2
  66. package/dist/components/Logo.js +1 -1
  67. package/dist/components/NavigationPanel.d.ts +11 -0
  68. package/dist/components/NavigationPanel.js +50 -0
  69. package/dist/components/RootContainer.js +5 -8
  70. package/dist/context/DefaultMantineProvider.d.ts +2 -0
  71. package/dist/context/DefaultMantineProvider.js +66 -0
  72. package/dist/context/DiagramEventHandlers.js +1 -1
  73. package/dist/context/DiagramFeatures.js +12 -11
  74. package/dist/context/EnsureMantine.d.ts +0 -3
  75. package/dist/context/EnsureMantine.js +3 -4
  76. package/dist/context/IconRenderer.d.ts +14 -0
  77. package/dist/context/IconRenderer.js +11 -8
  78. package/dist/context/TagStylesContext.js +12 -4
  79. package/dist/custom/hooks.d.ts +2 -2
  80. package/dist/custom/index.d.ts +1 -1
  81. package/dist/custom/index.js +2 -2
  82. package/dist/editor/LikeC4EditorCallbacks.d.ts +18 -0
  83. package/dist/editor/LikeC4EditorCallbacks.js +5 -0
  84. package/dist/editor/LikeC4EditorProvider.d.ts +30 -18
  85. package/dist/editor/LikeC4EditorProvider.js +2 -2
  86. package/dist/editor/applyChangesToManualLayout.js +1 -0
  87. package/dist/editor/editorActor.actions.d.ts +25 -25
  88. package/dist/editor/editorActor.actions.js +2 -2
  89. package/dist/editor/editorActor.setup.d.ts +84 -0
  90. package/dist/editor/editorActor.setup.js +38 -0
  91. package/dist/editor/editorActor.states.d.ts +9 -0
  92. package/dist/editor/{editorActor.js → editorActor.states.js} +22 -64
  93. package/dist/editor/index.d.ts +4 -3
  94. package/dist/editor/useEditorActorLogic.d.ts +2 -564
  95. package/dist/editor/useEditorActorLogic.js +8 -12
  96. package/dist/hooks/index.d.ts +1 -1
  97. package/dist/hooks/useCallbackRef.d.ts +6 -0
  98. package/dist/hooks/useCurrentViewModel.d.ts +10 -0
  99. package/dist/hooks/useDiagram.js +2 -2
  100. package/dist/hooks/useDiagramCompareLayout.d.ts +1 -1
  101. package/dist/hooks/useDiagramCompareLayout.js +1 -1
  102. package/dist/hooks/useLikeC4ElementsTree.js +1 -1
  103. package/dist/hooks/useLikeC4Model.js +2 -2
  104. package/dist/hooks/useLikeC4Project.js +10 -2
  105. package/dist/hooks/useLikeC4Styles.js +0 -3
  106. package/dist/hooks/useSetState.d.ts +6 -1
  107. package/dist/hooks/useSetState.js +7 -4
  108. package/dist/hooks/useXYFlow.d.ts +7 -1
  109. package/dist/hooks/useXYFlow.js +4 -4
  110. package/dist/index.d.ts +9 -5
  111. package/dist/index.js +6 -3
  112. package/dist/likec4diagram/DiagramUI.js +1 -3
  113. package/dist/likec4diagram/DiagramXYFlow.js +26 -12
  114. package/dist/likec4diagram/convert-to-xyflow.d.ts +2 -1
  115. package/dist/likec4diagram/convert-to-xyflow.js +2 -6
  116. package/dist/likec4diagram/custom/edges/RelationshipEdge.js +13 -14
  117. package/dist/likec4diagram/custom/edges/useControlPoints.js +3 -3
  118. package/dist/likec4diagram/custom/edges/useRelationshipEdgePath.d.ts +3 -0
  119. package/dist/likec4diagram/custom/edges/useRelationshipEdgePath.js +68 -35
  120. package/dist/likec4diagram/custom/nodes/ElementActions.d.ts +1 -2
  121. package/dist/likec4diagram/custom/nodes/ElementActions.js +7 -10
  122. package/dist/likec4diagram/custom/nodes/SequenceActorNode.js +7 -5
  123. package/dist/likec4diagram/custom/nodes/nodes.js +25 -6
  124. package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.js +8 -7
  125. package/dist/likec4diagram/custom/nodes/toolbar/CompoundToolbar.js +1 -38
  126. package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.d.ts +6 -1
  127. package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.js +35 -19
  128. package/dist/likec4diagram/custom/nodes/toolbar/Toolbar.js +9 -5
  129. package/dist/likec4diagram/custom/nodes/toolbar/_shared.d.ts +6 -1
  130. package/dist/likec4diagram/custom/nodes/toolbar/_shared.js +46 -10
  131. package/dist/likec4diagram/custom/nodes/toolbar/styles.css.js +2 -2
  132. package/dist/likec4diagram/relationship-popover/RelationshipPopover.js +15 -15
  133. package/dist/likec4diagram/relationship-popover/components.d.ts +7 -0
  134. package/dist/likec4diagram/relationship-popover/components.js +39 -0
  135. package/dist/likec4diagram/state/DiagramActorProvider.d.ts +4 -3
  136. package/dist/likec4diagram/state/DiagramActorProvider.js +14 -15
  137. package/dist/likec4diagram/state/assign.d.ts +1 -1
  138. package/dist/likec4diagram/state/createViewChange.js +16 -4
  139. package/dist/likec4diagram/state/machine.actions.d.ts +65 -0
  140. package/dist/likec4diagram/state/machine.actions.js +51 -39
  141. package/dist/likec4diagram/state/machine.actions.layout.d.ts +22 -2
  142. package/dist/likec4diagram/state/machine.actions.layout.js +32 -14
  143. package/dist/likec4diagram/state/machine.d.ts +1 -1
  144. package/dist/likec4diagram/state/machine.js +31 -30
  145. package/dist/likec4diagram/state/machine.setup.d.ts +21 -5
  146. package/dist/likec4diagram/state/machine.setup.js +13 -4
  147. package/dist/likec4diagram/state/machine.state.initializing.d.ts +32 -2
  148. package/dist/likec4diagram/state/machine.state.navigating.d.ts +1 -1
  149. package/dist/likec4diagram/state/machine.state.navigating.js +81 -49
  150. package/dist/likec4diagram/state/machine.state.ready.d.ts +508 -582
  151. package/dist/likec4diagram/state/machine.state.ready.focused.d.ts +17 -148
  152. package/dist/likec4diagram/state/machine.state.ready.focused.js +6 -14
  153. package/dist/likec4diagram/state/machine.state.ready.idle.d.ts +11 -96
  154. package/dist/likec4diagram/state/machine.state.ready.idle.js +7 -12
  155. package/dist/likec4diagram/state/machine.state.ready.js +80 -69
  156. package/dist/likec4diagram/state/machine.state.ready.printing.d.ts +4 -0
  157. package/dist/likec4diagram/state/machine.state.ready.printing.js +4 -3
  158. package/dist/likec4diagram/state/machine.state.ready.walkthrough.d.ts +145 -2
  159. package/dist/likec4diagram/state/machine.state.ready.walkthrough.js +29 -21
  160. package/dist/likec4diagram/state/types.d.ts +1 -1
  161. package/dist/likec4diagram/state/utils.d.ts +13 -14
  162. package/dist/likec4diagram/state/utils.js +11 -3
  163. package/dist/likec4diagram/types.d.ts +9 -1
  164. package/dist/likec4diagram/ui/notation/NotationPanel.css.js +1 -1
  165. package/dist/likec4diagram/ui/notation/NotationPanel.js +3 -3
  166. package/dist/likec4diagram/useLayoutConstraints.js +4 -1
  167. package/dist/likec4diagram/xyflow-diagram/diagram-view.d.ts +11 -3
  168. package/dist/likec4diagram/xyflow-diagram/diagram-view.js +5 -3
  169. package/dist/likec4diagram/xyflow-sequence/sequence-layout.d.ts +7 -3
  170. package/dist/likec4diagram/xyflow-sequence/sequence-layout.js +10 -8
  171. package/dist/likec4diagram/xyflow-sequence/utils.d.ts +1 -1
  172. package/dist/navigationpanel/NavigationPanel.js +2 -1
  173. package/dist/navigationpanel/NavigationPanelControls.js +6 -4
  174. package/dist/navigationpanel/NavigationPanelDropdown.js +7 -7
  175. package/dist/navigationpanel/_common.js +1 -2
  176. package/dist/navigationpanel/comparepanel/CompareActionsMenu.js +2 -2
  177. package/dist/navigationpanel/comparepanel/ComparePanelControls.js +1 -1
  178. package/dist/navigationpanel/comparepanel/LayoutTypeSwitcher.js +4 -5
  179. package/dist/navigationpanel/controls/DetailsControls.js +5 -5
  180. package/dist/navigationpanel/controls/LayoutWarning.js +2 -2
  181. package/dist/navigationpanel/controls/LogoButton.d.ts +1 -0
  182. package/dist/navigationpanel/controls/{BurgerButton.js → LogoButton.js} +5 -5
  183. package/dist/navigationpanel/controls/NavigationButtons.js +2 -2
  184. package/dist/navigationpanel/controls/OpenSource.js +1 -1
  185. package/dist/navigationpanel/controls/SearchControl.d.ts +1 -2
  186. package/dist/navigationpanel/controls/SearchControl.js +8 -12
  187. package/dist/navigationpanel/controls/ToggleReadonly.js +4 -5
  188. package/dist/navigationpanel/controls/index.d.ts +1 -1
  189. package/dist/navigationpanel/dropdown/ProjectsMenu.js +12 -6
  190. package/dist/navigationpanel/editorpanel/CenterCamera.js +1 -1
  191. package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.js +1 -1
  192. package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.js +9 -9
  193. package/dist/navigationpanel/editorpanel/ToggleReadonly.js +1 -1
  194. package/dist/navigationpanel/editorpanel/styles.js +4 -4
  195. package/dist/navigationpanel/styles.css.js +1 -1
  196. package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.js +3 -3
  197. package/dist/navigationpanel/walkthrough/DynamicViewControls.d.ts +67 -67
  198. package/dist/navigationpanel/walkthrough/DynamicViewControls.js +1 -1
  199. package/dist/navigationpanel/walkthrough/WalkthroughPanel.js +1 -1
  200. package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconCirclePlus.js +14 -0
  201. package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconFileText.js +14 -0
  202. package/dist/node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.js +14 -0
  203. package/dist/overlays/element-details/ElementDetailsCard.css.js +4 -4
  204. package/dist/overlays/element-details/ElementDetailsCard.js +4 -4
  205. package/dist/overlays/element-details/MetadataValue.js +6 -7
  206. package/dist/overlays/element-details/TabPanelDeployments.js +7 -5
  207. package/dist/overlays/element-details/TabPanelRelationships.css.js +5 -25
  208. package/dist/overlays/element-details/TabPanelRelationships.js +3 -3
  209. package/dist/overlays/element-details/TabPanelStructure.js +3 -2
  210. package/dist/overlays/overlaysActor.js +18 -0
  211. package/dist/overlays/relationship-details/RelationshipDetails.d.ts +0 -5
  212. package/dist/overlays/relationship-details/RelationshipDetails.js +4 -4
  213. package/dist/overlays/relationship-details/SelectEdge.css.js +2 -2
  214. package/dist/overlays/relationship-details/SelectEdge.js +2 -2
  215. package/dist/overlays/relationship-details/compute.js +1 -1
  216. package/dist/overlays/relationship-details/custom/ElementActions.js +3 -3
  217. package/dist/overlays/relationship-details/custom/nodeTypes.js +14 -1
  218. package/dist/overlays/relationship-details/layout.js +1 -1
  219. package/dist/overlays/relationships-browser/RelationshipsBrowser.d.ts +0 -5
  220. package/dist/overlays/relationships-browser/RelationshipsBrowser.js +116 -21
  221. package/dist/overlays/relationships-browser/SelectElement.js +2 -2
  222. package/dist/overlays/relationships-browser/custom/ElementActions.js +3 -3
  223. package/dist/overlays/relationships-browser/custom/EmptyNode.js +21 -6
  224. package/dist/overlays/relationships-browser/custom/edgeTypes.js +0 -1
  225. package/dist/overlays/relationships-browser/custom/nodeTypes.js +14 -1
  226. package/dist/overlays/relationships-browser/layout.d.ts +1 -1
  227. package/dist/overlays/relationships-browser/layout.js +1 -1
  228. package/dist/projects-overview/ProjectsOverview.d.ts +13 -0
  229. package/dist/projects-overview/ProjectsOverview.js +57 -0
  230. package/dist/projects-overview/ProjectsOverviewXY.d.ts +17 -0
  231. package/dist/projects-overview/ProjectsOverviewXY.js +98 -0
  232. package/dist/projects-overview/_types.d.ts +34 -0
  233. package/dist/projects-overview/actor.d.ts +121 -0
  234. package/dist/projects-overview/actor.js +359 -0
  235. package/dist/projects-overview/context.d.ts +4 -0
  236. package/dist/projects-overview/context.js +9 -0
  237. package/dist/projects-overview/custom/edgeTypes.d.ts +3 -0
  238. package/dist/projects-overview/custom/edgeTypes.js +23 -0
  239. package/dist/projects-overview/custom/index.d.ts +2 -0
  240. package/dist/projects-overview/custom/nodeTypes.d.ts +2 -0
  241. package/dist/projects-overview/custom/nodeTypes.js +45 -0
  242. package/dist/projects-overview/hooks.d.ts +5 -0
  243. package/dist/projects-overview/hooks.js +14 -0
  244. package/dist/projects-overview/index.d.ts +1 -0
  245. package/dist/projects-overview/layouted-to-xyflow.d.ts +6 -0
  246. package/dist/projects-overview/layouted-to-xyflow.js +49 -0
  247. package/dist/projects-overview/panel/ProjectsOverviewPanel.d.ts +1 -0
  248. package/dist/projects-overview/panel/ProjectsOverviewPanel.js +11 -0
  249. package/dist/projects-overview/persistence.d.ts +5 -0
  250. package/dist/projects-overview/persistence.js +24 -0
  251. package/dist/search/Search.d.ts +1 -4
  252. package/dist/search/Search.js +89 -87
  253. package/dist/search/components/ElementsColumn.css.js +3 -3
  254. package/dist/search/components/ElementsColumn.js +3 -4
  255. package/dist/search/components/PickView.d.ts +3 -1
  256. package/dist/search/components/PickView.js +5 -4
  257. package/dist/search/components/SearchByTags.js +1 -1
  258. package/dist/search/components/SearchInput.js +1 -1
  259. package/dist/search/components/ViewsColum.js +2 -2
  260. package/dist/search/components/_shared.css.js +1 -1
  261. package/dist/search/components/utils.js +1 -1
  262. package/dist/search/hooks.d.ts +1 -6
  263. package/dist/search/hooks.js +12 -9
  264. package/dist/search/searchActor.d.ts +1 -1
  265. package/dist/shadowroot/ShadowRoot.js +20 -19
  266. package/dist/shadowroot/styles.css.d.ts +0 -2
  267. package/dist/shadowroot/styles.css.js +1 -34
  268. package/dist/styles-font.css2.js +1 -1
  269. package/dist/styles.css2.js +1 -1
  270. package/dist/utils/view-bounds.js +9 -5
  271. package/dist/utils/xyflow.d.ts +19 -3
  272. package/dist/utils/xyflow.js +52 -9
  273. package/package.json +23 -22
  274. package/panda.buildinfo.json +93 -84
  275. package/styles-font.css +1 -1
  276. package/styles-min.css +1 -1
  277. package/styles.css +1 -1
  278. package/dist/base-primitives/element/ElementNodeContainer.css.d.ts +0 -1
  279. package/dist/base-primitives/element/ElementNodeContainer.css.js +0 -39
  280. package/dist/editor/__tests__/fixture.d.ts +0 -205
  281. package/dist/editor/editorActor.d.ts +0 -653
  282. package/dist/likec4diagram/relationship-popover/styles.css.d.ts +0 -2
  283. package/dist/likec4diagram/relationship-popover/styles.css.js +0 -28
  284. package/dist/navigationpanel/controls/BurgerButton.d.ts +0 -1
  285. package/dist/overlays/relationships-browser/custom/styles.css.js +0 -14
  286. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/createReactComponent.js +0 -0
  287. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.js +0 -0
  288. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.js +0 -0
  289. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowDownRight.js +0 -0
  290. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowLeft.js +0 -0
  291. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js +0 -0
  292. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconBolt.js +0 -0
  293. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconBrowser.js +0 -0
  294. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.js +0 -0
  295. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.js +0 -0
  296. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.js +0 -0
  297. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js +0 -0
  298. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js +0 -0
  299. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconCylinder.js +0 -0
  300. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconDeviceMobile.js +0 -0
  301. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconDirectionSignFilled.js +0 -0
  302. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconExternalLink.js +0 -0
  303. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js +0 -0
  304. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconFocusCentered.js +0 -0
  305. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconFolderFilled.js +0 -0
  306. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconHelpCircle.js +0 -0
  307. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js +0 -0
  308. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.js +0 -0
  309. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignBottom.js +0 -0
  310. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignCenter.js +0 -0
  311. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignLeft.js +0 -0
  312. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignMiddle.js +0 -0
  313. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignRight.js +0 -0
  314. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignTop.js +0 -0
  315. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutBoardSplit.js +0 -0
  316. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutCollage.js +0 -0
  317. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutDashboard.js +0 -0
  318. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLink.js +0 -0
  319. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLock.js +0 -0
  320. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconLockOpen2.js +0 -0
  321. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerPlayFilled.js +0 -0
  322. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipBackFilled.js +0 -0
  323. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipForwardFilled.js +0 -0
  324. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerStopFilled.js +0 -0
  325. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconRectangularPrism.js +0 -0
  326. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconReorder.js +0 -0
  327. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.js +0 -0
  328. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js +0 -0
  329. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.js +0 -0
  330. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconStack2.js +0 -0
  331. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconStarFilled.js +0 -0
  332. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconTarget.js +0 -0
  333. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.js +0 -0
  334. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconUser.js +0 -0
  335. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js +0 -0
  336. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.36.0_react@19.2.3 → @tabler_icons-react@3.36.0_react@19.2.4}/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js +0 -0
  337. /package/dist/{overlays/relationships-browser → projects-overview}/custom/styles.css.d.ts +0 -0
@@ -3,8 +3,8 @@ import { Popover, PopoverTarget, Button, Box, Text, ThemeIcon, PopoverDropdown,
3
3
  import { useRef } from 'react';
4
4
  import { useRelationshipDetails } from './hooks.js';
5
5
  import { edgeSource, edgeTarget, scrollArea, edgeGrid, edgeRow, edgeArrow, edgeLabel } from './SelectEdge.css.js';
6
- import IconArrowRight from '../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js';
7
- import IconSelector from '../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.js';
6
+ import IconArrowRight from '../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js';
7
+ import IconSelector from '../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.js';
8
8
 
9
9
  const SelectEdge = ({
10
10
  edge,
@@ -1,4 +1,4 @@
1
- import { treeFromElements } from '@likec4/core/compute-view/relationships';
1
+ import { treeFromElements } from '@likec4/core/compute-view';
2
2
  import { modelConnection } from '@likec4/core/model';
3
3
  import { invariant, isAncestor, sortParentsFirst } from '@likec4/core/utils';
4
4
  import { hasAtLeast } from 'remeda';
@@ -6,9 +6,9 @@ import 'fast-equals';
6
6
  import 'react';
7
7
  import { useDiagram } from '../../../hooks/safeContext.js';
8
8
  import { ElementActionButtons } from '../../../base-primitives/element/ElementActionButtons.js';
9
- import IconZoomScan from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js';
10
- import IconTransform from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.js';
11
- import IconFileSymlink from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js';
9
+ import IconZoomScan from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js';
10
+ import IconTransform from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.js';
11
+ import IconFileSymlink from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js';
12
12
 
13
13
  const ElementActions = (props) => {
14
14
  const { enableNavigateTo, enableVscode } = useEnabledFeatures();
@@ -7,15 +7,28 @@ import '@xstate/react';
7
7
  import 'fast-equals';
8
8
  import 'react';
9
9
  import { useDiagram } from '../../../hooks/safeContext.js';
10
+ import { useCallbackRef } from '../../../hooks/useCallbackRef.js';
10
11
  import { memoNode } from '../../../base-primitives/memoNode.js';
11
12
  import { CompoundNodeContainer } from '../../../base-primitives/compound/CompoundNodeContainer.js';
12
13
  import { CompoundTitle } from '../../../base-primitives/compound/CompoundTitle.js';
13
14
  import { ElementNodeContainer } from '../../../base-primitives/element/ElementNodeContainer.js';
14
15
  import { ElementShape } from '../../../base-primitives/element/ElementShape.js';
15
16
  import { ElementData } from '../../../base-primitives/element/ElementData.js';
16
- import { ElementTags } from '../../../base-primitives/element/ElementTags.js';
17
17
  import { ElementDetailsButton } from '../../../base-primitives/element/ElementDetailsButton.js';
18
+ import { ElementTags as ElementTags$1 } from '../../../base-primitives/element/ElementTags.js';
18
19
 
20
+ function ElementTags(props) {
21
+ const diagram = useDiagram();
22
+ return /* @__PURE__ */ jsx(
23
+ ElementTags$1,
24
+ {
25
+ onTagClick: useCallbackRef((tag) => {
26
+ diagram.openSearch(tag);
27
+ }),
28
+ ...props
29
+ }
30
+ );
31
+ }
19
32
  const ElementDetailsButtonWithHandler = (props) => {
20
33
  const diagram = useDiagram();
21
34
  return /* @__PURE__ */ jsx(
@@ -1,4 +1,4 @@
1
- import { treeFromElements } from '@likec4/core/compute-view/relationships';
1
+ import { treeFromElements } from '@likec4/core/compute-view';
2
2
  import { exact, preferSummary } from '@likec4/core/types';
3
3
  import dagre from '@dagrejs/dagre';
4
4
  import { ifind, DefaultMap, invariant } from '@likec4/core/utils';
@@ -1,9 +1,4 @@
1
- import { RelationshipsBrowserTypes } from './_types';
2
1
  import { RelationshipsBrowserActorRef } from './actor';
3
- import { FunctionComponent } from 'react';
4
- export declare const edgeTypes: {
5
- relationship: FunctionComponent<RelationshipsBrowserTypes.EdgeProps>;
6
- };
7
2
  export type RelationshipsBrowserProps = {
8
3
  actorRef: RelationshipsBrowserActorRef;
9
4
  };
@@ -1,12 +1,11 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
2
  import { cx } from '@likec4/styles/css';
3
- import { ActionIcon, Group } from '@mantine/core';
4
- import { useStateHistory } from '@mantine/hooks';
5
- import { useRafEffect } from '@react-hookz/web';
3
+ import { Group, ActionIcon, Tooltip as Tooltip$1 } from '@mantine/core';
4
+ import { useStateHistory, useClipboard } from '@mantine/hooks';
6
5
  import { ReactFlowProvider, useStoreApi, useReactFlow, Panel } from '@xyflow/react';
7
6
  import { shallowEqual } from 'fast-equals';
8
7
  import { LayoutGroup, AnimatePresence, m } from 'motion/react';
9
- import { useRef, memo, useEffect } from 'react';
8
+ import { useRef, memo, useEffect, useState } from 'react';
10
9
  import { BaseXYFlow } from '../../base/BaseXYFlow.js';
11
10
  import { useCallbackRef } from '../../hooks/useCallbackRef.js';
12
11
  import { RelationshipsBrowserActorContext, useRelationshipsBrowser, useRelationshipsBrowserState } from './hooks.js';
@@ -15,9 +14,12 @@ import { SelectElement } from './SelectElement.js';
15
14
  import { RelationshipEdge } from './custom/edgeTypes.js';
16
15
  import { EmptyNode } from './custom/EmptyNode.js';
17
16
  import { CompoundNode, ElementNode } from './custom/nodeTypes.js';
18
- import IconX from '../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js';
19
- import IconChevronLeft from '../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.js';
20
- import IconChevronRight from '../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js';
17
+ import IconX from '../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js';
18
+ import IconChevronLeft from '../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.js';
19
+ import IconChevronRight from '../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js';
20
+ import IconCheck from '../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.js';
21
+ import IconAlertTriangle from '../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.js';
22
+ import IconLink from '../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconLink.js';
21
23
 
22
24
  const nodeTypes = {
23
25
  element: ElementNode,
@@ -144,7 +146,7 @@ const RelationshipsBrowserInner = memo(() => {
144
146
  browser.navigateTo(historySubjectId);
145
147
  }
146
148
  }, [historySubjectId, browser]);
147
- useRafEffect(() => {
149
+ useEffect(() => {
148
150
  browser.updateView(layouted);
149
151
  }, [layouted, browser]);
150
152
  const hasStepBack = current > 0;
@@ -159,18 +161,21 @@ const RelationshipsBrowserInner = memo(() => {
159
161
  onStepForward: () => historyOps.forward()
160
162
  }
161
163
  ),
162
- closeable && /* @__PURE__ */ jsx(Panel, { position: "top-right", children: /* @__PURE__ */ jsx(
163
- ActionIcon,
164
- {
165
- variant: "default",
166
- color: "gray",
167
- onClick: (e) => {
168
- e.stopPropagation();
169
- browser.close();
170
- },
171
- children: /* @__PURE__ */ jsx(IconX, {})
172
- }
173
- ) })
164
+ closeable && /* @__PURE__ */ jsx(Panel, { position: "top-right", children: /* @__PURE__ */ jsxs(Group, { gap: 4, wrap: "nowrap", children: [
165
+ /* @__PURE__ */ jsx(CopyLinkButton, { subjectId }),
166
+ /* @__PURE__ */ jsx(
167
+ ActionIcon,
168
+ {
169
+ variant: "default",
170
+ color: "gray",
171
+ onClick: (e) => {
172
+ e.stopPropagation();
173
+ browser.close();
174
+ },
175
+ children: /* @__PURE__ */ jsx(IconX, {})
176
+ }
177
+ )
178
+ ] }) })
174
179
  ] });
175
180
  });
176
181
  const TopLeftPanel = ({
@@ -235,5 +240,95 @@ const TopLeftPanel = ({
235
240
  /* @__PURE__ */ jsx(SelectElement, {})
236
241
  ] }) });
237
242
  };
243
+ const Tooltip = Tooltip$1.withProps({
244
+ color: "dark",
245
+ fz: "xs",
246
+ openDelay: 400,
247
+ closeDelay: 150,
248
+ label: "",
249
+ children: null,
250
+ offset: 4,
251
+ withinPortal: false
252
+ });
253
+ function buildRelationshipUrl(subjectId) {
254
+ const currentUrl = new URL(window.location.href);
255
+ if (currentUrl.hash.startsWith("#/")) {
256
+ const hashUrl = new URL(currentUrl.hash.substring(1), currentUrl.origin);
257
+ hashUrl.searchParams.set("relationships", subjectId);
258
+ const cleanPath = hashUrl.pathname.replace(/\/$/, "");
259
+ return `${currentUrl.origin}${currentUrl.pathname}${currentUrl.search}#${cleanPath}${hashUrl.search}`;
260
+ }
261
+ currentUrl.searchParams.set("relationships", subjectId);
262
+ return currentUrl.href;
263
+ }
264
+ const CopyLinkButton = ({ subjectId }) => {
265
+ const clipboard = useClipboard({ timeout: 2e3 });
266
+ const [copyError, setCopyError] = useState(false);
267
+ const errorTimeoutRef = useRef(null);
268
+ const handleCopy = async (e) => {
269
+ e.stopPropagation();
270
+ setCopyError(false);
271
+ if (errorTimeoutRef.current) {
272
+ clearTimeout(errorTimeoutRef.current);
273
+ errorTimeoutRef.current = null;
274
+ }
275
+ const url = buildRelationshipUrl(subjectId);
276
+ if (!window.isSecureContext) {
277
+ setCopyError(true);
278
+ errorTimeoutRef.current = window.setTimeout(() => {
279
+ setCopyError(false);
280
+ }, 2e3);
281
+ return;
282
+ }
283
+ clipboard.copy(url);
284
+ };
285
+ useEffect(() => {
286
+ if (clipboard.error) {
287
+ setCopyError(true);
288
+ if (errorTimeoutRef.current) {
289
+ clearTimeout(errorTimeoutRef.current);
290
+ }
291
+ errorTimeoutRef.current = window.setTimeout(() => {
292
+ setCopyError(false);
293
+ }, 2e3);
294
+ }
295
+ }, [clipboard.error]);
296
+ useEffect(() => {
297
+ return () => {
298
+ if (errorTimeoutRef.current) {
299
+ clearTimeout(errorTimeoutRef.current);
300
+ }
301
+ };
302
+ }, []);
303
+ const getButtonState = () => {
304
+ if (clipboard.copied) {
305
+ return {
306
+ icon: /* @__PURE__ */ jsx(IconCheck, {}),
307
+ tooltip: "Link copied!"
308
+ };
309
+ }
310
+ if (copyError) {
311
+ return {
312
+ icon: /* @__PURE__ */ jsx(IconAlertTriangle, {}),
313
+ tooltip: "Copy failed - Clipboard requires HTTPS or localhost"
314
+ };
315
+ }
316
+ return {
317
+ icon: /* @__PURE__ */ jsx(IconLink, {}),
318
+ tooltip: "Copy link to this relationship view"
319
+ };
320
+ };
321
+ const buttonState = getButtonState();
322
+ return /* @__PURE__ */ jsx(Tooltip, { label: buttonState.tooltip, withArrow: true, position: "top", withinPortal: false, children: /* @__PURE__ */ jsx(
323
+ ActionIcon,
324
+ {
325
+ variant: "default",
326
+ color: "gray",
327
+ onClick: handleCopy,
328
+ "aria-label": "Copy link to this relationship view",
329
+ children: buttonState.icon
330
+ }
331
+ ) });
332
+ };
238
333
 
239
- export { RelationshipsBrowser, edgeTypes };
334
+ export { RelationshipsBrowser };
@@ -7,8 +7,8 @@ import { useLikeC4Model } from '../../hooks/useLikeC4Model.js';
7
7
  import { useRelationshipsBrowser, useRelationshipsBrowserState } from './hooks.js';
8
8
  import * as SelectElement_css from './SelectElement.css.js';
9
9
  import { scrollArea } from './SelectElement.css.js';
10
- import IconSelector from '../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.js';
11
- import IconChevronRight from '../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js';
10
+ import IconSelector from '../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.js';
11
+ import IconChevronRight from '../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js';
12
12
 
13
13
  const selector2 = (state) => {
14
14
  const subjectExistsInScope = state.context.layouted?.subjectExistsInScope ?? false;
@@ -6,9 +6,9 @@ import '@xstate/react';
6
6
  import 'fast-equals';
7
7
  import { useDiagram } from '../../../hooks/safeContext.js';
8
8
  import { useRelationshipsBrowser, useRelationshipsBrowserState } from '../hooks.js';
9
- import IconZoomScan from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js';
10
- import IconTransform from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.js';
11
- import IconFileSymlink from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js';
9
+ import IconZoomScan from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js';
10
+ import IconTransform from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.js';
11
+ import IconFileSymlink from '../../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js';
12
12
  import { ElementActionButtons } from '../../../base-primitives/element/ElementActionButtons.js';
13
13
 
14
14
  const selectSubject = (state) => state.context.subject;
@@ -1,16 +1,31 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
- import { Box, Text } from '@mantine/core';
3
- import { emptyNode } from './styles.css.js';
2
+ import { Box } from '@likec4/styles/jsx';
3
+ import { Text } from '@mantine/core';
4
4
 
5
5
  function EmptyNode({
6
6
  data: {
7
7
  column
8
8
  }
9
9
  }) {
10
- return /* @__PURE__ */ jsx(Box, { className: emptyNode, children: /* @__PURE__ */ jsxs(Text, { c: "dimmed", fz: "lg", fw: 500, children: [
11
- "No ",
12
- column === "incomers" ? "incoming" : "outgoing"
13
- ] }) });
10
+ return /* @__PURE__ */ jsx(
11
+ Box,
12
+ {
13
+ css: {
14
+ width: "100%",
15
+ height: "100%",
16
+ border: `3px dashed`,
17
+ borderColor: `mantine.colors.defaultBorder`,
18
+ borderRadius: "md",
19
+ display: "flex",
20
+ justifyContent: "center",
21
+ alignItems: "center"
22
+ },
23
+ children: /* @__PURE__ */ jsxs(Text, { c: "dimmed", fz: "lg", fw: 500, children: [
24
+ "No ",
25
+ column === "incomers" ? "incoming" : "outgoing"
26
+ ] })
27
+ }
28
+ );
14
29
  }
15
30
 
16
31
  export { EmptyNode };
@@ -32,7 +32,6 @@ const RelationshipEdge = memoEdge((props) => {
32
32
  ...props,
33
33
  data: {
34
34
  ...props.data,
35
- line: "solid",
36
35
  color: "amber"
37
36
  }
38
37
  } : props;
@@ -5,6 +5,7 @@ import '@xstate/react';
5
5
  import 'fast-equals';
6
6
  import 'react';
7
7
  import { useDiagram } from '../../../hooks/safeContext.js';
8
+ import { useCallbackRef } from '../../../hooks/useCallbackRef.js';
8
9
  import { ElementActions } from './ElementActions.js';
9
10
  import { CompoundNodeContainer } from '../../../base-primitives/compound/CompoundNodeContainer.js';
10
11
  import { CompoundTitle } from '../../../base-primitives/compound/CompoundTitle.js';
@@ -12,9 +13,21 @@ import { CompoundDetailsButton } from '../../../base-primitives/compound/Compoun
12
13
  import { ElementNodeContainer } from '../../../base-primitives/element/ElementNodeContainer.js';
13
14
  import { ElementShape } from '../../../base-primitives/element/ElementShape.js';
14
15
  import { ElementData } from '../../../base-primitives/element/ElementData.js';
15
- import { ElementTags } from '../../../base-primitives/element/ElementTags.js';
16
+ import { ElementTags as ElementTags$1 } from '../../../base-primitives/element/ElementTags.js';
16
17
  import { ElementDetailsButton } from '../../../base-primitives/element/ElementDetailsButton.js';
17
18
 
19
+ function ElementTags(props) {
20
+ const diagram = useDiagram();
21
+ return /* @__PURE__ */ jsx(
22
+ ElementTags$1,
23
+ {
24
+ onTagClick: useCallbackRef((tag) => {
25
+ diagram.openSearch(tag);
26
+ }),
27
+ ...props
28
+ }
29
+ );
30
+ }
18
31
  const ElementDetailsButtonWithHandler = (props) => {
19
32
  const diagram = useDiagram();
20
33
  return /* @__PURE__ */ jsx(
@@ -1,4 +1,4 @@
1
- import { RelationshipsViewData } from '@likec4/core/compute-view/relationships';
1
+ import { RelationshipsViewData } from '@likec4/core/compute-view';
2
2
  import { DiagramEdge, DiagramNode, DiagramView, ElementKind, Fqn, MarkdownOrString, ViewId } from '@likec4/core/types';
3
3
  import { LikeC4ViewModel } from '@likec4/core/model';
4
4
  import { RelationshipsBrowserTypes } from './_types';
@@ -1,4 +1,4 @@
1
- import { computeRelationshipsView, treeFromElements } from '@likec4/core/compute-view/relationships';
1
+ import { computeRelationshipsView, treeFromElements } from '@likec4/core/compute-view';
2
2
  import { useMemo } from 'react';
3
3
  import dagre from '@dagrejs/dagre';
4
4
  import { preferSummary, exact } from '@likec4/core/types';
@@ -0,0 +1,13 @@
1
+ import { ProjectId } from '@likec4/core';
2
+ import { LayoutedProjectsView } from '@likec4/core/compute-view';
3
+ import { ViewPadding } from '../LikeC4Diagram.props';
4
+ import { ProjectsOverviewXYProps } from './ProjectsOverviewXY';
5
+ export type ProjectsOverviewProps = {
6
+ view: LayoutedProjectsView;
7
+ /**
8
+ * Callback when project is selected (e.g. clicked)
9
+ */
10
+ onNavigateToProject?: undefined | ((projectId: ProjectId) => void);
11
+ fitViewPadding?: ViewPadding | undefined;
12
+ } & ProjectsOverviewXYProps;
13
+ export declare function ProjectsOverview({ view, onNavigateToProject, fitViewPadding, ...props }: ProjectsOverviewProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,57 @@
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import { useSyncedRef } from '@react-hookz/web';
3
+ import { useActorRef } from '@xstate/react';
4
+ import { ReactFlowProvider } from '@xyflow/react';
5
+ import { LayoutGroup } from 'motion/react';
6
+ import { useEffect, useRef } from 'react';
7
+ import { projectOverviewLogic } from './actor.js';
8
+ import { ProjectsOverviewActorContext } from './context.js';
9
+ import { ProjectsOverviewPanel } from './panel/ProjectsOverviewPanel.js';
10
+ import { ProjectsOverviewXY } from './ProjectsOverviewXY.js';
11
+
12
+ function ProjectsOverview({
13
+ view,
14
+ onNavigateToProject,
15
+ fitViewPadding = {
16
+ top: "50px",
17
+ bottom: "32px",
18
+ left: "32px",
19
+ right: "32px"
20
+ },
21
+ ...props
22
+ }) {
23
+ const actorRef = useActorRef(
24
+ projectOverviewLogic,
25
+ {
26
+ input: { view, fitViewPadding }
27
+ }
28
+ );
29
+ useEffect(() => {
30
+ actorRef.send({ type: "update.view", view });
31
+ }, [actorRef, view]);
32
+ const onNavigateToProjectRef = useSyncedRef(onNavigateToProject);
33
+ useEffect(() => {
34
+ const subs = [
35
+ actorRef.on("navigate.to", ({ projectId }) => {
36
+ onNavigateToProjectRef.current?.(projectId);
37
+ })
38
+ ];
39
+ return () => {
40
+ subs.forEach((sub) => sub.unsubscribe());
41
+ };
42
+ }, [actorRef]);
43
+ const bounds = view.bounds;
44
+ const initialRef = useRef({
45
+ initialNodes: [],
46
+ initialEdges: [],
47
+ initialWidth: bounds.width,
48
+ initialHeight: bounds.height,
49
+ fitView: false
50
+ });
51
+ return /* @__PURE__ */ jsx(ProjectsOverviewActorContext.Provider, { value: actorRef, children: /* @__PURE__ */ jsxs(ReactFlowProvider, { ...initialRef.current, children: [
52
+ /* @__PURE__ */ jsx(LayoutGroup, { id: actorRef.sessionId, inherit: false, children: /* @__PURE__ */ jsx(ProjectsOverviewXY, { ...props }) }),
53
+ /* @__PURE__ */ jsx(ProjectsOverviewPanel, {})
54
+ ] }) });
55
+ }
56
+
57
+ export { ProjectsOverview };
@@ -0,0 +1,17 @@
1
+ import { ProjectsOverviewTypes } from './_types';
2
+ import { FunctionComponent, NamedExoticComponent } from 'react';
3
+ export declare const edgeTypes: {
4
+ relationship: FunctionComponent<ProjectsOverviewTypes.EdgeProps>;
5
+ };
6
+ export type ProjectsOverviewXYProps = {
7
+ /**
8
+ * Background pattern
9
+ * @default 'dots'
10
+ */
11
+ background?: 'dots' | 'lines' | 'cross' | 'transparent' | 'solid' | undefined;
12
+ /**
13
+ * @default - determined by the user's system preferences.
14
+ */
15
+ colorScheme?: 'light' | 'dark' | undefined;
16
+ };
17
+ export declare const ProjectsOverviewXY: NamedExoticComponent<ProjectsOverviewXYProps>;
@@ -0,0 +1,98 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { cx } from '@likec4/styles/css';
3
+ import { shallowEqual } from 'fast-equals';
4
+ import { memo } from 'react';
5
+ import { BaseXYFlow } from '../base/BaseXYFlow.js';
6
+ import { useCallbackRef } from '../hooks/useCallbackRef.js';
7
+ import { useProjectsOverviewActor } from './context.js';
8
+ import { useProjectsOverviewState, useProjectsOverviewXYStoreApi } from './hooks.js';
9
+ import { RelationshipEdge } from './custom/edgeTypes.js';
10
+ import { ProjectNode } from './custom/nodeTypes.js';
11
+
12
+ const nodeTypes = {
13
+ project: ProjectNode
14
+ };
15
+ const edgeTypes = {
16
+ relationship: RelationshipEdge
17
+ };
18
+ const selector = (state) => ({
19
+ isActive: state.hasTag("active"),
20
+ nodes: state.context.xynodes,
21
+ edges: state.context.xyedges
22
+ });
23
+ const selectorEq = (a, b) => a.isActive === b.isActive && shallowEqual(a.nodes, b.nodes) && shallowEqual(a.edges, b.edges);
24
+ const ProjectsOverviewXY = memo(({
25
+ background = "dots",
26
+ ...props
27
+ }) => {
28
+ const actorRef = useProjectsOverviewActor();
29
+ const {
30
+ isActive,
31
+ nodes,
32
+ edges
33
+ } = useProjectsOverviewState(
34
+ selector,
35
+ selectorEq
36
+ );
37
+ const xystore = useProjectsOverviewXYStoreApi();
38
+ return /* @__PURE__ */ jsx(
39
+ BaseXYFlow,
40
+ {
41
+ nodes,
42
+ edges,
43
+ className: cx(
44
+ isActive ? "initialized" : "not-initialized",
45
+ "projects-overview"
46
+ ),
47
+ nodeTypes,
48
+ edgeTypes,
49
+ fitView: false,
50
+ onNodeClick: useCallbackRef((_e, node) => {
51
+ _e.stopPropagation();
52
+ actorRef.send({ type: "xyflow.click.node", node });
53
+ }),
54
+ onEdgeClick: useCallbackRef((_e, edge) => {
55
+ _e.stopPropagation();
56
+ actorRef.send({ type: "xyflow.click.edge", edge });
57
+ }),
58
+ onPaneClick: useCallbackRef((_e) => {
59
+ _e.stopPropagation();
60
+ actorRef.send({ type: "xyflow.click.pane" });
61
+ }),
62
+ onDoubleClick: useCallbackRef((_e) => {
63
+ _e.stopPropagation();
64
+ actorRef.send({ type: "xyflow.click.double" });
65
+ }),
66
+ onNodesChange: useCallbackRef((changes) => {
67
+ actorRef.send({ type: "xyflow.applyNodeChanges", changes });
68
+ }),
69
+ onEdgesChange: useCallbackRef((changes) => {
70
+ actorRef.send({ type: "xyflow.applyEdgeChanges", changes });
71
+ }),
72
+ onEdgeMouseEnter: useCallbackRef((event, edge) => {
73
+ actorRef.send({ type: "xyflow.mouse.enter.edge", edge, event });
74
+ }),
75
+ onEdgeMouseLeave: useCallbackRef((event, edge) => {
76
+ actorRef.send({ type: "xyflow.mouse.leave.edge", edge, event });
77
+ }),
78
+ onNodeMouseEnter: useCallbackRef((event, node) => {
79
+ actorRef.send({ type: "xyflow.mouse.enter.node", node });
80
+ }),
81
+ onNodeMouseLeave: useCallbackRef((event, node) => {
82
+ actorRef.send({ type: "xyflow.mouse.leave.node", node });
83
+ }),
84
+ onInit: useCallbackRef((xyflow) => {
85
+ actorRef.send({ type: "xyflow.init", xyflow, xystore });
86
+ }),
87
+ nodesDraggable: false,
88
+ nodesSelectable: true,
89
+ pannable: true,
90
+ zoomable: true,
91
+ background,
92
+ ...props
93
+ }
94
+ );
95
+ });
96
+ ProjectsOverviewXY.displayName = "ProjectsOverviewXY";
97
+
98
+ export { ProjectsOverviewXY, edgeTypes };
@@ -0,0 +1,34 @@
1
+ import { LayoutedProjectEdge } from '@likec4/core/compute-view';
2
+ import { DiagramNode, ExclusiveUnion, ProjectId } from '@likec4/core/types';
3
+ import { ReactFlowInstance, ReactFlowState } from '@xyflow/react';
4
+ import { FunctionComponent } from 'react';
5
+ import { Simplify } from 'type-fest';
6
+ import { BaseEdge, BaseEdgeData, BaseEdgeProps, BaseNode, BaseNodeData, BaseNodeProps, NonOptional } from '../base/types';
7
+ export declare namespace ProjectsOverviewTypes {
8
+ type ProjectNodeData = Simplify<BaseNodeData & NonOptional<Pick<DiagramNode, 'id' | 'title' | 'color' | 'shape' | 'style' | 'width' | 'height'>> & {
9
+ projectId: ProjectId;
10
+ }>;
11
+ type ProjectNode = BaseNode<ProjectNodeData, 'project'>;
12
+ type AnyNode = ProjectNode;
13
+ type NodeType = AnyNode['type'];
14
+ type Node<T extends NodeType = NodeType> = Extract<AnyNode, {
15
+ type: T;
16
+ }>;
17
+ type NodeProps<T extends NodeType = NodeType> = BaseNodeProps<Node<T>>;
18
+ type NodeData = ExclusiveUnion<{
19
+ ProjectNodeData: ProjectNodeData;
20
+ }>;
21
+ type NodeRenderer<T extends NodeType = NodeType> = FunctionComponent<NodeProps<T>>;
22
+ type NodeRenderers = {
23
+ [T in NodeType]: NodeRenderer<T>;
24
+ };
25
+ type EdgeData = Simplify<BaseEdgeData & NonOptional<Pick<LayoutedProjectEdge, 'id' | 'label' | 'labelBBox' | 'technology' | 'projectId' | 'points' | 'color' | 'line'>>>;
26
+ type Edge = BaseEdge<EdgeData, 'relationship'>;
27
+ type EdgeProps = BaseEdgeProps<Edge>;
28
+ }
29
+ export type ProjectsOverviewXYFLowInstance = ReactFlowInstance<ProjectsOverviewTypes.Node, ProjectsOverviewTypes.Edge>;
30
+ export type ProjectsOverviewXYStoreState = ReactFlowState<ProjectsOverviewTypes.Node, ProjectsOverviewTypes.Edge>;
31
+ export type ProjectsOverviewXYStoreApi = {
32
+ getState: () => ProjectsOverviewXYStoreState;
33
+ setState: (state: ProjectsOverviewXYStoreState) => void;
34
+ };