@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
@@ -7,6 +7,7 @@ import { useEnabledFeatures } from '../../../context/DiagramFeatures.js';
7
7
  import { ElementActions } from './ElementActions.js';
8
8
  import { NodeDrifts } from './NodeDrifts.js';
9
9
  import { ElementDetailsButtonWithHandler } from './nodes.js';
10
+ import { ElementToolbar } from './toolbar/ElementToolbar.js';
10
11
  import { ElementNodeContainer } from '../../../base-primitives/element/ElementNodeContainer.js';
11
12
  import { ElementShape } from '../../../base-primitives/element/ElementShape.js';
12
13
  import { ElementData } from '../../../base-primitives/element/ElementData.js';
@@ -67,9 +68,9 @@ const ActorStepPort = ({
67
68
  )
68
69
  ] });
69
70
  };
70
- const hasModelFqn = (data) => isTruthy(data.modelFqn);
71
+ const hasModelFqn = (node) => "modelFqn" in node.data && isTruthy(node.data.modelFqn);
71
72
  function SequenceActorNode(props) {
72
- const { enableElementDetails, enableCompareWithLatest } = useEnabledFeatures();
73
+ const { enableElementDetails, enableReadOnly, enableCompareWithLatest } = useEnabledFeatures();
73
74
  const data = props.data;
74
75
  const {
75
76
  id,
@@ -109,9 +110,10 @@ function SequenceActorNode(props) {
109
110
  enableCompareWithLatest && /* @__PURE__ */ jsx(NodeDrifts, { nodeProps: props }),
110
111
  /* @__PURE__ */ jsx(ElementShape, { ...props }),
111
112
  /* @__PURE__ */ jsx(ElementData, { ...props }),
112
- hasModelFqn(data) && /* @__PURE__ */ jsxs(Fragment, { children: [
113
- /* @__PURE__ */ jsx(ElementActions, { ...props, data }),
114
- enableElementDetails && /* @__PURE__ */ jsx(ElementDetailsButtonWithHandler, { id, data })
113
+ hasModelFqn(props) && /* @__PURE__ */ jsxs(Fragment, { children: [
114
+ /* @__PURE__ */ jsx(ElementActions, { ...props }),
115
+ enableElementDetails && /* @__PURE__ */ jsx(ElementDetailsButtonWithHandler, { id, data }),
116
+ !enableReadOnly && /* @__PURE__ */ jsx(ElementToolbar, { ...props })
115
117
  ] })
116
118
  ] }),
117
119
  ports.map((p) => /* @__PURE__ */ jsx(ActorStepPort, { port: p, data: props.data }, p.id))
@@ -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 { CompoundActions } from './CompoundActions.js';
9
10
  import { DeploymentElementActions, ElementActions } from './ElementActions.js';
10
11
  import { NodeDrifts } from './NodeDrifts.js';
@@ -17,9 +18,27 @@ import { CompoundDetailsButton } from '../../../base-primitives/compound/Compoun
17
18
  import { ElementNodeContainer } from '../../../base-primitives/element/ElementNodeContainer.js';
18
19
  import { ElementShape } from '../../../base-primitives/element/ElementShape.js';
19
20
  import { ElementData } from '../../../base-primitives/element/ElementData.js';
20
- import { ElementTags } from '../../../base-primitives/element/ElementTags.js';
21
21
  import { ElementDetailsButton } from '../../../base-primitives/element/ElementDetailsButton.js';
22
+ import { ElementTags as ElementTags$1 } from '../../../base-primitives/element/ElementTags.js';
22
23
 
24
+ function ElementTags(props) {
25
+ const diagram = useDiagram();
26
+ return /* @__PURE__ */ jsx(
27
+ ElementTags$1,
28
+ {
29
+ onTagClick: useCallbackRef((tag) => {
30
+ diagram.openSearch(tag);
31
+ }),
32
+ onTagMouseEnter: useCallbackRef((tag) => {
33
+ diagram.send({ type: "tag.highlight", tag });
34
+ }),
35
+ onTagMouseLeave: useCallbackRef((_tag) => {
36
+ diagram.send({ type: "tag.unhighlight" });
37
+ }),
38
+ ...props
39
+ }
40
+ );
41
+ }
23
42
  function ElementDetailsButtonWithHandler(props) {
24
43
  const diagram = useDiagram();
25
44
  const fqn = props.data.modelFqn;
@@ -60,7 +79,7 @@ function ElementNode(props) {
60
79
  /* @__PURE__ */ jsx(ElementActions, { ...props }),
61
80
  enableElementDetails && /* @__PURE__ */ jsx(ElementDetailsButtonWithHandler, { ...props }),
62
81
  !enableReadOnly && /* @__PURE__ */ jsx(ElementToolbar, { ...props }),
63
- /* @__PURE__ */ jsx(DefaultHandles, {})
82
+ /* @__PURE__ */ jsx(DefaultHandles, { direction: props.data.viewLayoutDir })
64
83
  ] });
65
84
  }
66
85
  function DeploymentNode(props) {
@@ -73,7 +92,7 @@ function DeploymentNode(props) {
73
92
  /* @__PURE__ */ jsx(DeploymentElementActions, { ...props }),
74
93
  enableElementDetails && /* @__PURE__ */ jsx(ElementDetailsButtonWithHandler, { ...props }),
75
94
  !enableReadOnly && /* @__PURE__ */ jsx(DeploymentElementToolbar, { ...props }),
76
- /* @__PURE__ */ jsx(DefaultHandles, {})
95
+ /* @__PURE__ */ jsx(DefaultHandles, { direction: props.data.viewLayoutDir })
77
96
  ] });
78
97
  }
79
98
  const compoundHasDrifts = css({
@@ -99,7 +118,7 @@ function CompoundElementNode(props) {
99
118
  /* @__PURE__ */ jsx(CompoundActions, { ...props }),
100
119
  enableElementDetails && /* @__PURE__ */ jsx(CompoundDetailsButtonWithHandler, { ...props }),
101
120
  !enableReadOnly && /* @__PURE__ */ jsx(CompoundElementToolbar, { ...props }),
102
- /* @__PURE__ */ jsx(DefaultHandles, {})
121
+ /* @__PURE__ */ jsx(DefaultHandles, { direction: props.data.viewLayoutDir })
103
122
  ]
104
123
  }
105
124
  );
@@ -118,7 +137,7 @@ function CompoundDeploymentNode(props) {
118
137
  /* @__PURE__ */ jsx(CompoundActions, { ...props }),
119
138
  enableElementDetails && /* @__PURE__ */ jsx(CompoundDetailsButtonWithHandler, { ...props }),
120
139
  !enableReadOnly && /* @__PURE__ */ jsx(CompoundDeploymentToolbar, { ...props }),
121
- /* @__PURE__ */ jsx(DefaultHandles, {})
140
+ /* @__PURE__ */ jsx(DefaultHandles, { direction: props.data.viewLayoutDir })
122
141
  ]
123
142
  }
124
143
  );
@@ -134,7 +153,7 @@ function ViewGroupNode(props) {
134
153
  children: [
135
154
  enableCompareWithLatest && /* @__PURE__ */ jsx(NodeDrifts, { nodeProps: props }),
136
155
  /* @__PURE__ */ jsx(CompoundTitle, { ...props }),
137
- /* @__PURE__ */ jsx(DefaultHandles, {})
156
+ /* @__PURE__ */ jsx(DefaultHandles, { direction: props.data.viewLayoutDir })
138
157
  ]
139
158
  }
140
159
  );
@@ -1,5 +1,6 @@
1
1
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
- import { Popover, PopoverTarget, Button, ColorSwatch, PopoverDropdown, Space, Divider, Stack, TooltipGroup, Flex, Tooltip, CheckIcon, rem, Slider } from '@mantine/core';
2
+ import { Flex } from '@likec4/styles/jsx';
3
+ import { Popover, PopoverTarget, Button, ColorSwatch, PopoverDropdown, Space, Divider, Stack, TooltipGroup, Tooltip, CheckIcon, rem, Slider } from '@mantine/core';
3
4
  import { useUpdateEffect } from '@react-hookz/web';
4
5
  import { useState } from 'react';
5
6
  import { keys } from 'remeda';
@@ -19,16 +20,16 @@ function ColorButton({
19
20
  Popover,
20
21
  {
21
22
  clickOutsideEvents: ["pointerdown", "mousedown", "click"],
22
- position: "right-end",
23
+ position: "top-start",
23
24
  offset: 2,
24
25
  withinPortal: false,
25
26
  ...props,
26
27
  children: [
27
- /* @__PURE__ */ jsx(PopoverTarget, { children: /* @__PURE__ */ jsx(Button, { variant: "subtle", color: "gray", size: "compact-xs", px: 3, children: /* @__PURE__ */ jsx(
28
+ /* @__PURE__ */ jsx(PopoverTarget, { children: /* @__PURE__ */ jsx(Button, { variant: "subtle", color: "gray", size: "xs", px: 6, children: /* @__PURE__ */ jsx(
28
29
  ColorSwatch,
29
30
  {
30
31
  color: theme.colors[elementColor].elements.fill,
31
- size: 14,
32
+ size: 16,
32
33
  withShadow: true,
33
34
  style: { color: "#fff", cursor: "pointer" }
34
35
  }
@@ -78,7 +79,7 @@ function ColorSwatches({
78
79
  };
79
80
  const otherColors = keys(theme.colors).filter((color) => !SemanticColors.includes(color));
80
81
  return /* @__PURE__ */ jsx(Stack, { gap: 2, onMouseLeave: () => onColorPreview(null), children: /* @__PURE__ */ jsxs(TooltipGroup, { openDelay: 1e3, closeDelay: 300, children: [
81
- /* @__PURE__ */ jsx(Flex, { maw: 120, gap: "6", justify: "flex-start", align: "flex-start", direction: "row", wrap: "wrap", children: SemanticColors.map((color) => /* @__PURE__ */ jsx(
82
+ /* @__PURE__ */ jsx(Flex, { maxW: "120px", gap: "1.5", justify: "flex-start", align: "flex-start", direction: "row", wrap: "wrap", children: SemanticColors.map((color) => /* @__PURE__ */ jsx(
82
83
  Tooltip,
83
84
  {
84
85
  label: color,
@@ -106,8 +107,8 @@ function ColorSwatches({
106
107
  Flex,
107
108
  {
108
109
  mt: "sm",
109
- maw: 110,
110
- gap: "6",
110
+ maxW: "110px",
111
+ gap: "1.5",
111
112
  justify: "flex-start",
112
113
  align: "flex-start",
113
114
  direction: "row",
@@ -1,8 +1,6 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { Box, SegmentedControl } from '@mantine/core';
3
- import { useState, useEffect } from 'react';
4
2
  import { useEnabledFeatures } from '../../../../context/DiagramFeatures.js';
5
- import { GoToSourceButton, BrowseRelationshipsButton } from './_shared.js';
3
+ import { BorderStyleOption, GoToSourceButton, BrowseRelationshipsButton } from './_shared.js';
6
4
  import { ColorButton } from './ColorButton.js';
7
5
  import { Toolbar } from './Toolbar.js';
8
6
  import { useHandlers } from './useHandlers.js';
@@ -89,40 +87,5 @@ function CompoundDeploymentToolbar(props) {
89
87
  }
90
88
  );
91
89
  }
92
- function BorderStyleOption({
93
- elementBorderStyle = "dashed",
94
- onChange
95
- }) {
96
- const [value, setValue] = useState(elementBorderStyle);
97
- useEffect(() => {
98
- setValue(elementBorderStyle);
99
- }, [elementBorderStyle]);
100
- return /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(
101
- SegmentedControl,
102
- {
103
- size: "xs",
104
- fullWidth: true,
105
- withItemsBorders: false,
106
- value,
107
- onChange: (v) => {
108
- const border = v;
109
- setValue(border);
110
- onChange({ border });
111
- },
112
- styles: {
113
- label: {
114
- paddingTop: "0.5",
115
- paddingBottom: "0.5"
116
- }
117
- },
118
- data: [
119
- { label: "Solid", value: "solid" },
120
- { label: "Dashed", value: "dashed" },
121
- { label: "Dotted", value: "dotted" },
122
- { label: "None", value: "none" }
123
- ]
124
- }
125
- ) });
126
- }
127
90
 
128
91
  export { CompoundDeploymentToolbar, CompoundElementToolbar };
@@ -1,3 +1,8 @@
1
+ import { Fqn } from '@likec4/core/types';
1
2
  import { Types } from '../../../types';
2
- export declare function ElementToolbar(props: Types.NodeProps<'element'>): import("react/jsx-runtime").JSX.Element;
3
+ export declare function ElementToolbar(props: Types.NodeProps<'element' | 'seq-actor'> & {
4
+ data: {
5
+ modelFqn: Fqn;
6
+ };
7
+ }): import("react/jsx-runtime").JSX.Element;
3
8
  export declare function DeploymentElementToolbar(props: Types.NodeProps<'deployment'>): import("react/jsx-runtime").JSX.Element;
@@ -3,19 +3,20 @@ import { ElementShapes } from '@likec4/core/styles';
3
3
  import { Menu, MenuTarget, Button, MenuDropdown, MenuItem } from '@mantine/core';
4
4
  import { useEnabledFeatures } from '../../../../context/DiagramFeatures.js';
5
5
  import { stopPropagation } from '../../../../utils/xyflow.js';
6
- import { GoToSourceButton, BrowseRelationshipsButton } from './_shared.js';
6
+ import { BorderStyleOption, GoToSourceButton, BrowseRelationshipsButton } from './_shared.js';
7
7
  import { ColorButton } from './ColorButton.js';
8
8
  import { Toolbar } from './Toolbar.js';
9
9
  import { useHandlers } from './useHandlers.js';
10
- import IconSelector from '../../../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.js';
11
- import IconCheck from '../../../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.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 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';
12
12
 
13
13
  function ElementToolbar(props) {
14
14
  const { enableVscode, enableRelationshipBrowser } = useEnabledFeatures();
15
15
  const {
16
16
  data: {
17
17
  shape,
18
- modelFqn
18
+ modelFqn,
19
+ style
19
20
  }
20
21
  } = props;
21
22
  const { elementColor, onColorPreview, onChange } = useHandlers(modelFqn, props);
@@ -26,6 +27,14 @@ function ElementToolbar(props) {
26
27
  title: modelFqn,
27
28
  align: "start",
28
29
  children: [
30
+ /* @__PURE__ */ jsx(
31
+ ColorButton,
32
+ {
33
+ elementColor,
34
+ onColorPreview,
35
+ onChange
36
+ }
37
+ ),
29
38
  /* @__PURE__ */ jsx(
30
39
  ElementShapeButton,
31
40
  {
@@ -34,12 +43,10 @@ function ElementToolbar(props) {
34
43
  }
35
44
  ),
36
45
  /* @__PURE__ */ jsx(
37
- ColorButton,
46
+ BorderStyleOption,
38
47
  {
39
- elementColor,
40
- onColorPreview,
41
- onChange,
42
- position: "right-end"
48
+ elementBorderStyle: style?.border ?? "none",
49
+ onChange
43
50
  }
44
51
  ),
45
52
  enableVscode && /* @__PURE__ */ jsx(GoToSourceButton, { elementId: modelFqn }),
@@ -54,7 +61,8 @@ function DeploymentElementToolbar(props) {
54
61
  data: {
55
62
  shape,
56
63
  deploymentFqn,
57
- modelFqn
64
+ modelFqn,
65
+ style
58
66
  }
59
67
  } = props;
60
68
  const { elementColor, onColorPreview, onChange } = useHandlers(deploymentFqn, props);
@@ -65,6 +73,14 @@ function DeploymentElementToolbar(props) {
65
73
  title: deploymentFqn,
66
74
  align: "start",
67
75
  children: [
76
+ /* @__PURE__ */ jsx(
77
+ ColorButton,
78
+ {
79
+ elementColor,
80
+ onColorPreview,
81
+ onChange
82
+ }
83
+ ),
68
84
  /* @__PURE__ */ jsx(
69
85
  ElementShapeButton,
70
86
  {
@@ -73,12 +89,10 @@ function DeploymentElementToolbar(props) {
73
89
  }
74
90
  ),
75
91
  /* @__PURE__ */ jsx(
76
- ColorButton,
92
+ BorderStyleOption,
77
93
  {
78
- elementColor,
79
- onColorPreview,
80
- onChange,
81
- position: "right-end"
94
+ elementBorderStyle: style?.border ?? "none",
95
+ onChange
82
96
  }
83
97
  ),
84
98
  enableVscode && /* @__PURE__ */ jsx(GoToSourceButton, { deploymentId: deploymentFqn }),
@@ -105,7 +119,7 @@ function ElementShapeButton({
105
119
  offset: 2,
106
120
  styles: {
107
121
  item: {
108
- padding: "calc(var(--mantine-spacing-xs) / 1.5) var(--mantine-spacing-xs)"
122
+ padding: "calc(var(--spacing-xs) / 1.5) var(--spacing-xs)"
109
123
  }
110
124
  },
111
125
  withinPortal: false,
@@ -115,7 +129,9 @@ function ElementShapeButton({
115
129
  {
116
130
  variant: "light",
117
131
  color: "gray",
118
- size: "compact-xs",
132
+ size: "xs",
133
+ fz: "xxs",
134
+ px: "xs",
119
135
  rightSection: /* @__PURE__ */ jsx(IconSelector, { size: 12 }),
120
136
  children: elementShape
121
137
  }
@@ -128,8 +144,8 @@ function ElementShapeButton({
128
144
  children: ElementShapes.map((shape) => /* @__PURE__ */ jsx(
129
145
  MenuItem,
130
146
  {
131
- fz: 12,
132
- fw: 500,
147
+ fz: "xs",
148
+ fw: "500",
133
149
  value: shape,
134
150
  rightSection: elementShape === shape ? /* @__PURE__ */ jsx(IconCheck, { size: 12 }) : void 0,
135
151
  onClick: (e) => {
@@ -1,14 +1,18 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import { cx } from '@likec4/styles/css';
3
- import { Paper, Stack, Box, Text, Group } from '@mantine/core';
3
+ import { VStack, Box, HStack } from '@likec4/styles/jsx';
4
+ import { Paper, Text } from '@mantine/core';
4
5
  import { useDebouncedValue } from '@mantine/hooks';
5
6
  import { NodeToolbar } from '@xyflow/react';
6
7
  import { useDiagramContext } from '../../../../hooks/useDiagram.js';
7
8
  import { stopPropagation } from '../../../../utils/xyflow.js';
8
9
  import { toolbarTitle } from './styles.css.js';
9
10
 
11
+ const selectSelectedNodesCount = (context) => {
12
+ return context.xynodes.filter((x) => x.selected).length;
13
+ };
10
14
  const useSelectedNodesCount = () => {
11
- return useDiagramContext((s) => s.xynodes.filter((x) => x.selected).length);
15
+ return useDiagramContext(selectSelectedNodesCount);
12
16
  };
13
17
  function Toolbar({ title, children, nodeProps, ...props }) {
14
18
  const selectedNodesCount = useSelectedNodesCount();
@@ -56,9 +60,9 @@ function Toolbar({ title, children, nodeProps, ...props }) {
56
60
  onClick: stopPropagation,
57
61
  onDoubleClick: stopPropagation,
58
62
  withBorder: true,
59
- children: /* @__PURE__ */ jsxs(Stack, { gap: "6px", children: [
60
- /* @__PURE__ */ jsx(Box, { px: "4px", children: /* @__PURE__ */ jsx(Text, { className: toolbarTitle, children: title }) }),
61
- /* @__PURE__ */ jsx(Group, { gap: 4, children })
63
+ children: /* @__PURE__ */ jsxs(VStack, { gap: "2", children: [
64
+ /* @__PURE__ */ jsx(Box, { px: "1", children: /* @__PURE__ */ jsx(Text, { className: toolbarTitle, children: title }) }),
65
+ /* @__PURE__ */ jsx(HStack, { gap: "1", children })
62
66
  ] })
63
67
  }
64
68
  )
@@ -1,5 +1,6 @@
1
- import { DeploymentFqn, Fqn } from '@likec4/core/types';
1
+ import { BorderStyle, DeploymentFqn, Fqn } from '@likec4/core/types';
2
2
  import { MergeExclusive } from 'type-fest';
3
+ import { OnStyleChange } from './types';
3
4
  import { ForwardRefExoticComponent, RefAttributes } from 'react';
4
5
  import { TooltipProps } from '@mantine/core';
5
6
  export declare const Tooltip: ForwardRefExoticComponent< TooltipProps & RefAttributes<HTMLDivElement> & {
@@ -14,3 +15,7 @@ export declare function GoToSourceButton(props: MergeExclusive<{
14
15
  }, {
15
16
  deploymentId: DeploymentFqn;
16
17
  }>): import("react/jsx-runtime").JSX.Element | null;
18
+ export declare function BorderStyleOption({ elementBorderStyle, onChange, }: {
19
+ elementBorderStyle: BorderStyle | undefined;
20
+ onChange: OnStyleChange;
21
+ }): import("react/jsx-runtime").JSX.Element;
@@ -1,12 +1,12 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
- import { Tooltip as Tooltip$1, ActionIcon } from '@mantine/core';
2
+ import { SegmentedControl, Tooltip as Tooltip$1, ActionIcon } from '@mantine/core';
3
+ import { useState, useEffect } from 'react';
3
4
  import '@xstate/react';
4
5
  import 'fast-equals';
5
- import 'react';
6
6
  import { useDiagram } from '../../../../hooks/safeContext.js';
7
7
  import { useDiagramEventHandlers } from '../../../../context/DiagramEventHandlers.js';
8
- import IconFileSymlink from '../../../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js';
9
- 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';
8
+ 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';
9
+ 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';
10
10
 
11
11
  const Tooltip = Tooltip$1.withProps({
12
12
  color: "dark",
@@ -23,7 +23,7 @@ function BrowseRelationshipsButton({ fqn }) {
23
23
  return /* @__PURE__ */ jsx(Tooltip, { label: "Browse relationships", children: /* @__PURE__ */ jsx(
24
24
  ActionIcon,
25
25
  {
26
- size: "sm",
26
+ size: "md",
27
27
  variant: "subtle",
28
28
  color: "gray",
29
29
  onClick: (e) => {
@@ -35,8 +35,8 @@ function BrowseRelationshipsButton({ fqn }) {
35
35
  {
36
36
  stroke: 2,
37
37
  style: {
38
- width: "72%",
39
- height: "72%"
38
+ width: "65%",
39
+ height: "65%"
40
40
  }
41
41
  }
42
42
  )
@@ -49,7 +49,7 @@ function GoToSourceButton(props) {
49
49
  return /* @__PURE__ */ jsx(Tooltip, { label: "Open source", children: /* @__PURE__ */ jsx(
50
50
  ActionIcon,
51
51
  {
52
- size: "sm",
52
+ size: "md",
53
53
  variant: "subtle",
54
54
  color: "gray",
55
55
  onClick: (e) => {
@@ -64,9 +64,45 @@ function GoToSourceButton(props) {
64
64
  });
65
65
  }
66
66
  },
67
- children: /* @__PURE__ */ jsx(IconFileSymlink, { stroke: 1.8, style: { width: "70%" } })
67
+ children: /* @__PURE__ */ jsx(IconFileSymlink, { stroke: 1.8, style: { width: "65%" } })
68
68
  }
69
69
  ) });
70
70
  }
71
+ function BorderStyleOption({
72
+ elementBorderStyle = "none",
73
+ onChange
74
+ }) {
75
+ const [value, setValue] = useState(elementBorderStyle);
76
+ useEffect(() => {
77
+ setValue(elementBorderStyle);
78
+ }, [elementBorderStyle]);
79
+ return /* @__PURE__ */ jsx(
80
+ SegmentedControl,
81
+ {
82
+ size: "xs",
83
+ fz: "xxs",
84
+ fullWidth: true,
85
+ withItemsBorders: false,
86
+ value,
87
+ onChange: (v) => {
88
+ const border = v;
89
+ setValue(border);
90
+ onChange({ border });
91
+ },
92
+ styles: {
93
+ label: {
94
+ paddingTop: 2,
95
+ paddingBottom: 2
96
+ }
97
+ },
98
+ data: [
99
+ { label: "Solid", value: "solid" },
100
+ { label: "Dashed", value: "dashed" },
101
+ { label: "Dotted", value: "dotted" },
102
+ { label: "None", value: "none" }
103
+ ]
104
+ }
105
+ );
106
+ }
71
107
 
72
- export { BrowseRelationshipsButton, GoToSourceButton, Tooltip };
108
+ export { BorderStyleOption, BrowseRelationshipsButton, GoToSourceButton, Tooltip };
@@ -2,8 +2,8 @@ import { css } from '@likec4/styles/css';
2
2
 
3
3
  const toolbarTitle = css({
4
4
  color: "mantine.colors.dimmed",
5
- fontSize: "10px",
6
- fontWeight: 600,
5
+ fontSize: "xxs",
6
+ fontWeight: "bold",
7
7
  maxWidth: "220px",
8
8
  cursor: "default",
9
9
  userSelect: "all",
@@ -2,9 +2,9 @@ import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
2
2
  import { autoUpdate, computePosition, offset, autoPlacement, size, hide } from '@floating-ui/dom';
3
3
  import { nameFromFqn } from '@likec4/core';
4
4
  import { cx, css } from '@likec4/styles/css';
5
- import { VStack, styled, HStack, Box } from '@likec4/styles/jsx';
5
+ import { VStack, styled, HStack, Box, Txt } from '@likec4/styles/jsx';
6
6
  import { bleed } from '@likec4/styles/patterns';
7
- import { Divider, ScrollAreaAutosize, Button, TooltipGroup, Tooltip as Tooltip$1, Text, ActionIcon, Notification } from '@mantine/core';
7
+ import { Divider, ScrollAreaAutosize, Button, TooltipGroup, Tooltip as Tooltip$1, ActionIcon, Text, Notification } from '@mantine/core';
8
8
  import { useActorRef, useSelector } from '@xstate/react';
9
9
  import { shallowEqual } from 'fast-equals';
10
10
  import { memo, useEffect, useCallback, useRef, useState, useLayoutEffect, Fragment, forwardRef } from 'react';
@@ -17,14 +17,14 @@ import { useDiagramContext, useOnDiagramEvent } from '../../hooks/useDiagram.js'
17
17
  import { useLikeC4Model } from '../../hooks/useLikeC4Model.js';
18
18
  import { findDiagramEdge, findDiagramNode } from '../state/utils.js';
19
19
  import { RelationshipPopoverActorLogic } from './actor.js';
20
- import { endpoint, title } from './styles.css.js';
20
+ import { Endpoint, RelationshipTitle } from './components.js';
21
21
  import { useDiagram } from '../../hooks/safeContext.js';
22
22
  import { useRootContainerRef } from '../../context/RootContainerContext.js';
23
23
  import { roundDpr } from '../../utils/roundDpr.js';
24
- import IconArrowRight from '../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js';
25
- 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';
26
- 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';
27
- import IconInfoCircle from '../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.js';
24
+ 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';
25
+ 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';
26
+ 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';
27
+ import IconInfoCircle from '../../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.4/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.js';
28
28
  import { Markdown } from '../../base-primitives/Markdown.js';
29
29
 
30
30
  function selectDiagramContext(c) {
@@ -294,7 +294,7 @@ const RelationshipPopoverInternal = ({
294
294
  size: "compact-xs",
295
295
  style: {
296
296
  alignSelf: "flex-start",
297
- fontWeight: 500,
297
+ fontWeight: "medium",
298
298
  ["--button-fz"]: "var(--font-sizes-xxs)"
299
299
  },
300
300
  onClick: (e) => {
@@ -338,7 +338,7 @@ const EdgeDrifts = ({ diagramEdge }) => {
338
338
  withBorder: false,
339
339
  withCloseButton: false,
340
340
  title: "Changes:",
341
- children: drifts.map((drift) => /* @__PURE__ */ jsxs(Text, { mt: 2, size: "sm", lh: "xs", children: [
341
+ children: drifts.map((drift) => /* @__PURE__ */ jsxs(Txt, { mt: "1", size: "xs", children: [
342
342
  "- ",
343
343
  drift
344
344
  ] }, drift))
@@ -363,7 +363,7 @@ const Relationship = forwardRef(({
363
363
  "div",
364
364
  {
365
365
  style: {
366
- fontWeight: 600,
366
+ fontWeight: "bold",
367
367
  fontSize: "10px",
368
368
  color: "#868e96",
369
369
  marginBottom: "2px",
@@ -390,7 +390,7 @@ const Relationship = forwardRef(({
390
390
  "span",
391
391
  {
392
392
  style: {
393
- fontWeight: 600,
393
+ fontWeight: "bold",
394
394
  minWidth: "110px",
395
395
  color: "#495057"
396
396
  },
@@ -436,9 +436,9 @@ const Relationship = forwardRef(({
436
436
  }),
437
437
  children: [
438
438
  /* @__PURE__ */ jsx(HStack, { gap: "0.5", children: /* @__PURE__ */ jsxs(TooltipGroup, { openDelay: 200, children: [
439
- /* @__PURE__ */ jsx(Tooltip, { label: sourceId.full, offset: 2, position: "top-start", children: /* @__PURE__ */ jsx(Text, { component: "div", "data-likec4-color": sourceNode.color, className: endpoint, children: sourceId.short }) }),
439
+ /* @__PURE__ */ jsx(Tooltip, { label: sourceId.full, offset: 2, position: "top-start", children: /* @__PURE__ */ jsx(Endpoint, { likec4color: sourceNode.color, children: sourceId.short }) }),
440
440
  /* @__PURE__ */ jsx(IconArrowRight, { stroke: 2.5, size: "11px", opacity: 0.65 }),
441
- /* @__PURE__ */ jsx(Tooltip, { label: targetId.full, offset: 2, position: "top-start", children: /* @__PURE__ */ jsx(Text, { component: "div", "data-likec4-color": targetNode.color, className: endpoint, children: targetId.short }) }),
441
+ /* @__PURE__ */ jsx(Tooltip, { label: targetId.full, offset: 2, position: "top-start", children: /* @__PURE__ */ jsx(Endpoint, { likec4color: targetNode.color, children: targetId.short }) }),
442
442
  navigateTo && /* @__PURE__ */ jsx(Tooltip, { label: "Open dynamic view", children: /* @__PURE__ */ jsx(
443
443
  ActionIcon,
444
444
  {
@@ -472,7 +472,7 @@ const Relationship = forwardRef(({
472
472
  ) })
473
473
  ] }) }),
474
474
  /* @__PURE__ */ jsxs(HStack, { gap: "xs", alignItems: "center", children: [
475
- /* @__PURE__ */ jsx(Box, { className: title, children: r.title || "untitled" }),
475
+ /* @__PURE__ */ jsx(RelationshipTitle, { children: r.title || "untitled" }),
476
476
  metadataTooltipLabel && /* @__PURE__ */ jsx(
477
477
  Tooltip,
478
478
  {
@@ -540,7 +540,7 @@ const Label = styled("div", {
540
540
  base: {
541
541
  display: "block",
542
542
  fontSize: "xxs",
543
- fontWeight: 500,
543
+ fontWeight: "medium",
544
544
  userSelect: "none",
545
545
  lineHeight: "sm",
546
546
  color: "mantine.colors.dimmed"
@@ -0,0 +1,7 @@
1
+ import { Color } from '@likec4/core/types';
2
+ import { PropsWithChildren } from 'react';
3
+ import { StyledComponent } from '@likec4/styles';
4
+ export declare const Endpoint: ({ children, likec4color }: PropsWithChildren<{
5
+ likec4color: Color;
6
+ }>) => import("react/jsx-runtime").JSX.Element;
7
+ export declare const RelationshipTitle: StyledComponent<"div", {}>;
@@ -0,0 +1,39 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { styled } from '@likec4/styles/jsx';
3
+ import { txt } from '@likec4/styles/patterns';
4
+
5
+ const Endpoint = ({ children, likec4color }) => {
6
+ return /* @__PURE__ */ jsx(
7
+ "div",
8
+ {
9
+ "data-likec4-color": likec4color,
10
+ className: txt({
11
+ size: "xxs",
12
+ fontWeight: "medium",
13
+ whiteSpace: "nowrap",
14
+ paddingX: "1",
15
+ paddingY: "0.5",
16
+ rounded: "xs",
17
+ background: {
18
+ _light: "var(--likec4-palette-fill)/90",
19
+ _dark: "var(--likec4-palette-fill)/60"
20
+ },
21
+ color: {
22
+ _light: "var(--likec4-palette-hiContrast)",
23
+ _dark: "var(--likec4-palette-loContrast)"
24
+ }
25
+ }),
26
+ children
27
+ }
28
+ );
29
+ };
30
+ const RelationshipTitle = styled("div", {
31
+ base: {
32
+ whiteSpaceCollapse: "preserve-breaks",
33
+ fontSize: "sm",
34
+ lineHeight: "sm",
35
+ userSelect: "all"
36
+ }
37
+ });
38
+
39
+ export { Endpoint, RelationshipTitle };