@likec4/diagram 1.34.1 → 1.35.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 (266) hide show
  1. package/bundle/{chunk-Dd7et66b.js → chunk-C0Eg81Gj.js} +971 -1045
  2. package/bundle/custom.js +59 -55
  3. package/bundle/index.js +6656 -4263
  4. package/dist/LikeC4Diagram.props.d.ts +51 -4
  5. package/dist/LikeC4ModelProvider.d.ts +3 -3
  6. package/dist/base/BaseXYFlow.d.ts +2 -2
  7. package/dist/base/BaseXYFlow.js +3 -3
  8. package/dist/base/primitives/compound/CompoundActionButton.js +1 -1
  9. package/dist/base/primitives/compound/CompoundDetailsButton.js +1 -1
  10. package/dist/base/primitives/edge/EdgeActionButton.js +1 -1
  11. package/dist/base/primitives/element/ElementDetailsButton.js +1 -1
  12. package/dist/base/primitives/element/ElementNodeContainer.d.ts +3 -3
  13. package/dist/base/primitives/element/ElementTitle.js +9 -9
  14. package/dist/bundle/LikeC4View.js +3 -3
  15. package/dist/bundle/LikeC4View.props.d.ts +8 -4
  16. package/dist/bundle/custom.js +1 -0
  17. package/dist/bundle/index.js +1 -0
  18. package/dist/components/ErrorFallback.d.ts +2 -1
  19. package/dist/components/ErrorFallback.js +15 -2
  20. package/dist/components/Link.js +2 -2
  21. package/dist/components/NavigationLink.d.ts +6 -0
  22. package/dist/components/NavigationLink.js +25 -0
  23. package/dist/components/SearchControl.js +1 -1
  24. package/dist/context/ControlsCustomLayout.d.ts +0 -1
  25. package/dist/context/DiagramFeatures.d.ts +4 -1
  26. package/dist/context/IconRenderer.js +6 -6
  27. package/dist/custom/customNodes.js +10 -2
  28. package/dist/custom/hooks.d.ts +1 -0
  29. package/dist/custom/index.js +1 -0
  30. package/dist/hooks/useDiagram.d.ts +1 -2
  31. package/dist/hooks/useDiagram.js +1 -5
  32. package/dist/index.js +1 -0
  33. package/dist/likec4diagram/DiagramUI.js +8 -4
  34. package/dist/likec4diagram/DiagramXYFlow.js +1 -1
  35. package/dist/likec4diagram/custom/edges/RelationshipsDropdownMenu.js +4 -4
  36. package/dist/likec4diagram/custom/nodes/ElementActions.js +2 -2
  37. package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.js +2 -2
  38. package/dist/likec4diagram/custom/nodes/toolbar/_shared.js +2 -2
  39. package/dist/likec4diagram/ui/controls/ChangeAutoLayoutButton.js +1 -1
  40. package/dist/likec4diagram/ui/controls/Controls.js +11 -15
  41. package/dist/likec4diagram/ui/controls/LayoutDriftNotification.js +1 -1
  42. package/dist/likec4diagram/ui/controls/ManualLayoutToolsButton.js +9 -9
  43. package/dist/likec4diagram/ui/controls/NavigationButtons.js +4 -2
  44. package/dist/likec4diagram/ui/controls/ToggleReadonly.js +2 -2
  45. package/dist/likec4diagram/ui/diagram-title/DiagramTitlePanel.js +15 -13
  46. package/dist/likec4diagram/ui/notation/NotationPanel.js +3 -3
  47. package/dist/likec4diagram/ui/walkthrough/DynamicViewWalkthrough.js +4 -4
  48. package/dist/likec4model/LikeC4ModelContext.d.ts +4 -1
  49. package/dist/likec4model/LikeC4ModelContext.js +2 -1
  50. package/dist/likec4model/index.d.ts +1 -0
  51. package/dist/likec4model/useCurrentViewModel.d.ts +2 -0
  52. package/dist/likec4model/useCurrentViewModel.js +12 -0
  53. package/dist/likec4model/useLikeC4Model.d.ts +2 -5
  54. package/dist/likec4model/useLikeC4Model.js +10 -16
  55. package/dist/navigationpanel/NavigationPanel.d.ts +2 -0
  56. package/dist/navigationpanel/NavigationPanel.js +124 -0
  57. package/dist/navigationpanel/NavigationPanelControls.d.ts +1 -0
  58. package/dist/navigationpanel/NavigationPanelControls.js +134 -0
  59. package/dist/navigationpanel/NavigationPanelDropdown.d.ts +1 -0
  60. package/dist/navigationpanel/NavigationPanelDropdown.js +436 -0
  61. package/dist/navigationpanel/_common.d.ts +15 -0
  62. package/dist/navigationpanel/_common.js +69 -0
  63. package/dist/navigationpanel/actor.d.ts +300 -0
  64. package/dist/navigationpanel/actor.js +240 -0
  65. package/dist/navigationpanel/controls/BurgerButton.d.ts +1 -0
  66. package/dist/navigationpanel/controls/BurgerButton.js +36 -0
  67. package/dist/navigationpanel/controls/NavigationButtons.d.ts +1 -0
  68. package/dist/navigationpanel/controls/NavigationButtons.js +44 -0
  69. package/dist/navigationpanel/controls/OpenSource.d.ts +1 -0
  70. package/dist/navigationpanel/controls/OpenSource.js +27 -0
  71. package/dist/navigationpanel/controls/SearchControl.d.ts +1 -0
  72. package/dist/navigationpanel/controls/SearchControl.js +68 -0
  73. package/dist/navigationpanel/controls/ToggleReadonly.d.ts +1 -0
  74. package/dist/navigationpanel/controls/ToggleReadonly.js +69 -0
  75. package/dist/navigationpanel/controls/index.d.ts +5 -0
  76. package/dist/navigationpanel/editorpanel/CenterCamera.d.ts +1 -0
  77. package/dist/navigationpanel/editorpanel/CenterCamera.js +12 -0
  78. package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.d.ts +1 -0
  79. package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.js +157 -0
  80. package/dist/navigationpanel/editorpanel/EditorPanel.d.ts +1 -0
  81. package/dist/navigationpanel/editorpanel/EditorPanel.js +48 -0
  82. package/dist/navigationpanel/editorpanel/LayoutDriftNotification.d.ts +1 -0
  83. package/dist/navigationpanel/editorpanel/LayoutDriftNotification.js +56 -0
  84. package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.d.ts +2 -0
  85. package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.js +174 -0
  86. package/dist/navigationpanel/editorpanel/_common.d.ts +6 -0
  87. package/dist/navigationpanel/editorpanel/_common.js +14 -0
  88. package/dist/navigationpanel/editorpanel/index.d.ts +1 -0
  89. package/dist/navigationpanel/editorpanel/styles.d.ts +8 -0
  90. package/dist/navigationpanel/editorpanel/styles.js +79 -0
  91. package/dist/navigationpanel/hooks.d.ts +20 -0
  92. package/dist/navigationpanel/hooks.js +38 -0
  93. package/dist/navigationpanel/index.d.ts +1 -0
  94. package/dist/navigationpanel/styles.css.d.ts +16 -0
  95. package/dist/navigationpanel/styles.css.js +32 -0
  96. package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.d.ts +2 -0
  97. package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.js +157 -0
  98. package/dist/navigationpanel/walkthrough/index.d.ts +1 -0
  99. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.31.0_react@19.1.0 → @tabler_icons-react@3.34.1_react@19.1.1}/node_modules/@tabler/icons-react/dist/esm/createReactComponent.js +1 -1
  100. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.31.0_react@19.1.0 → @tabler_icons-react@3.34.1_react@19.1.1}/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.js +1 -1
  101. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.js +14 -0
  102. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowDownRight.js +14 -0
  103. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowLeft.js +14 -0
  104. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js +14 -0
  105. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconBrowser.js +14 -0
  106. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.js +14 -0
  107. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.js +14 -0
  108. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js +14 -0
  109. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js +14 -0
  110. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconCylinder.js +14 -0
  111. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconDeviceMobile.js +14 -0
  112. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconExternalLink.js +14 -0
  113. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js +14 -0
  114. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconFocusCentered.js +14 -0
  115. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconFolderFilled.js +14 -0
  116. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconHelpCircle.js +14 -0
  117. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js +14 -0
  118. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.js +14 -0
  119. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignBottom.js +14 -0
  120. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignCenter.js +14 -0
  121. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignLeft.js +14 -0
  122. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignMiddle.js +14 -0
  123. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignRight.js +14 -0
  124. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignTop.js +14 -0
  125. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutBoardSplit.js +14 -0
  126. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutCollage.js +14 -0
  127. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutDashboard.js +14 -0
  128. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLock.js +14 -0
  129. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLockOpen2.js +14 -0
  130. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconMenu.js +14 -0
  131. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconMenu2.js +14 -0
  132. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerPlayFilled.js +14 -0
  133. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipBackFilled.js +14 -0
  134. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipForwardFilled.js +14 -0
  135. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerStopFilled.js +14 -0
  136. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconRectangularPrism.js +14 -0
  137. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconReorder.js +14 -0
  138. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.js +14 -0
  139. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js +14 -0
  140. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.js +14 -0
  141. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconStack2.js +14 -0
  142. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconStarFilled.js +14 -0
  143. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconTarget.js +14 -0
  144. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.js +14 -0
  145. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconUser.js +14 -0
  146. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js +14 -0
  147. package/dist/node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js +14 -0
  148. package/dist/overlays/element-details/ElementDetailsCard.js +4 -4
  149. package/dist/overlays/element-details/TabPanelDeployments.js +3 -3
  150. package/dist/overlays/element-details/TabPanelRelationships.js +3 -3
  151. package/dist/overlays/element-details/TabPanelStructure.js +1 -1
  152. package/dist/overlays/relationship-details/RelationshipDetails.js +3 -3
  153. package/dist/overlays/relationship-details/SelectEdge.js +2 -2
  154. package/dist/overlays/relationship-details/custom/ElementActions.js +3 -3
  155. package/dist/overlays/relationships-browser/RelationshipsBrowser.js +3 -3
  156. package/dist/overlays/relationships-browser/SelectElement.js +2 -2
  157. package/dist/overlays/relationships-browser/custom/ElementActions.js +3 -3
  158. package/dist/search/components/ElementsColumn.js +1 -1
  159. package/dist/search/components/PickView.js +1 -1
  160. package/dist/search/components/SearchByTags.js +1 -1
  161. package/dist/search/components/SearchInput.js +1 -1
  162. package/dist/search/components/ViewsColum.js +2 -2
  163. package/dist/state/DiagramActorProvider.d.ts +2 -2
  164. package/dist/state/DiagramActorProvider.js +48 -10
  165. package/dist/state/diagram-machine.d.ts +2 -2
  166. package/dist/styles-min.css +1 -1
  167. package/dist/styles.css +1 -1
  168. package/dist/styles.css2.js +1 -1
  169. package/package.json +16 -15
  170. package/panda.buildinfo.json +170 -134
  171. package/src/LikeC4Diagram.props.ts +51 -3
  172. package/src/LikeC4ModelProvider.tsx +3 -3
  173. package/src/base/BaseXYFlow.tsx +4 -4
  174. package/src/base/primitives/element/ElementNodeContainer.tsx +2 -2
  175. package/src/base/primitives/element/ElementTitle.tsx +4 -4
  176. package/src/bundle/LikeC4View.props.ts +14 -4
  177. package/src/bundle/LikeC4View.tsx +2 -2
  178. package/src/components/ErrorFallback.tsx +16 -1
  179. package/src/components/NavigationLink.tsx +31 -0
  180. package/src/context/ControlsCustomLayout.ts +0 -1
  181. package/src/context/DiagramFeatures.tsx +6 -1
  182. package/src/custom/customNodes.tsx +10 -2
  183. package/src/custom/hooks.ts +3 -0
  184. package/src/hooks/useDiagram.ts +0 -8
  185. package/src/likec4diagram/DiagramUI.tsx +9 -3
  186. package/src/likec4diagram/DiagramXYFlow.tsx +1 -1
  187. package/src/likec4diagram/ui/controls/Controls.tsx +8 -18
  188. package/src/likec4diagram/ui/controls/NavigationButtons.tsx +2 -0
  189. package/src/likec4diagram/ui/diagram-title/DiagramTitlePanel.tsx +14 -11
  190. package/src/likec4model/LikeC4ModelContext.ts +5 -1
  191. package/src/likec4model/index.ts +3 -0
  192. package/src/likec4model/useCurrentViewModel.ts +10 -0
  193. package/src/likec4model/useLikeC4Model.ts +17 -27
  194. package/src/navigationpanel/NavigationPanel.tsx +136 -0
  195. package/src/navigationpanel/NavigationPanelControls.tsx +155 -0
  196. package/src/navigationpanel/NavigationPanelDropdown.tsx +523 -0
  197. package/src/navigationpanel/_common.tsx +81 -0
  198. package/src/navigationpanel/actor.ts +321 -0
  199. package/src/navigationpanel/controls/BurgerButton.tsx +32 -0
  200. package/src/navigationpanel/controls/NavigationButtons.tsx +36 -0
  201. package/src/navigationpanel/controls/OpenSource.tsx +28 -0
  202. package/src/navigationpanel/controls/SearchControl.tsx +64 -0
  203. package/src/navigationpanel/controls/ToggleReadonly.tsx +66 -0
  204. package/src/navigationpanel/controls/index.ts +5 -0
  205. package/src/navigationpanel/editorpanel/CenterCamera.tsx +15 -0
  206. package/src/navigationpanel/editorpanel/ChangeAutoLayoutButton.tsx +199 -0
  207. package/src/navigationpanel/editorpanel/EditorPanel.tsx +49 -0
  208. package/src/navigationpanel/editorpanel/LayoutDriftNotification.tsx +56 -0
  209. package/src/navigationpanel/editorpanel/ManualLayoutToolsButton.tsx +151 -0
  210. package/src/navigationpanel/editorpanel/_common.tsx +14 -0
  211. package/src/navigationpanel/editorpanel/index.ts +1 -0
  212. package/src/navigationpanel/editorpanel/styles.ts +84 -0
  213. package/src/navigationpanel/hooks.tsx +70 -0
  214. package/src/navigationpanel/index.ts +1 -0
  215. package/src/navigationpanel/styles.css.ts +30 -0
  216. package/src/navigationpanel/walkthrough/ActiveWalkthroughControls.tsx +160 -0
  217. package/src/navigationpanel/walkthrough/index.tsx +1 -0
  218. package/src/state/DiagramActorProvider.tsx +60 -12
  219. package/src/state/diagram-machine.ts +2 -2
  220. package/dist/base/primitives/element/ElementTitle.css.d.ts +0 -34
  221. package/dist/base/primitives/element/ElementTitle.css.js +0 -201
  222. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.js +0 -13
  223. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowDownRight.js +0 -13
  224. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js +0 -13
  225. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconBrowser.js +0 -13
  226. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.js +0 -13
  227. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.js +0 -13
  228. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js +0 -13
  229. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js +0 -13
  230. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconCylinder.js +0 -13
  231. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconDeviceMobile.js +0 -13
  232. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconExternalLink.js +0 -13
  233. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js +0 -13
  234. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconFocusCentered.js +0 -13
  235. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconHelpCircle.js +0 -13
  236. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js +0 -13
  237. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.js +0 -13
  238. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignBottom.js +0 -13
  239. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignCenter.js +0 -13
  240. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignLeft.js +0 -13
  241. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignMiddle.js +0 -13
  242. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignRight.js +0 -13
  243. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignTop.js +0 -13
  244. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutBoardSplit.js +0 -13
  245. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutCollage.js +0 -13
  246. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutDashboard.js +0 -13
  247. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLock.js +0 -13
  248. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLockOpen2.js +0 -13
  249. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconMenu.js +0 -13
  250. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconMenu2.js +0 -13
  251. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerPlayFilled.js +0 -13
  252. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipBackFilled.js +0 -13
  253. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipForwardFilled.js +0 -13
  254. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerStopFilled.js +0 -13
  255. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconRectangularPrism.js +0 -13
  256. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconReorder.js +0 -13
  257. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.js +0 -13
  258. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js +0 -13
  259. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.js +0 -13
  260. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconStack2.js +0 -13
  261. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconTarget.js +0 -13
  262. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.js +0 -13
  263. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconUser.js +0 -13
  264. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js +0 -13
  265. package/dist/node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js +0 -13
  266. package/src/base/primitives/element/ElementTitle.css.ts +0 -206
@@ -0,0 +1,68 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { cx } from '@likec4/styles/css';
3
+ import { Box } from '@likec4/styles/jsx';
4
+ import { hstack } from '@likec4/styles/patterns';
5
+ import { UnstyledButton } from '@mantine/core';
6
+ import { isMacOs } from '@xyflow/system';
7
+ import * as m from 'motion/react-m';
8
+ import { useDiagram } from '../../hooks/useDiagram.js';
9
+ import IconSearch from '../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js';
10
+
11
+ function SearchControl() {
12
+ const diagram = useDiagram();
13
+ const isMac = isMacOs();
14
+ return /* @__PURE__ */ jsxs(
15
+ UnstyledButton,
16
+ {
17
+ component: m.button,
18
+ layout: "position",
19
+ onClick: (e) => {
20
+ e.stopPropagation();
21
+ diagram.openSearch();
22
+ },
23
+ whileTap: {
24
+ translateY: 1
25
+ },
26
+ className: cx(
27
+ "group",
28
+ hstack({
29
+ gap: "2xs",
30
+ paddingInline: "sm",
31
+ paddingBlock: "2xs",
32
+ rounded: "sm",
33
+ userSelect: "none",
34
+ cursor: "pointer",
35
+ color: {
36
+ base: "likec4.panel.action-icon.text",
37
+ _hover: "likec4.panel.action-icon.text.hover"
38
+ },
39
+ backgroundColor: {
40
+ base: "likec4.panel.action-icon.bg",
41
+ _hover: "likec4.panel.action-icon.bg.hover"
42
+ },
43
+ smDown: {
44
+ display: "none"
45
+ }
46
+ })
47
+ ),
48
+ children: [
49
+ /* @__PURE__ */ jsx(IconSearch, { size: 14, stroke: 2.5 }),
50
+ /* @__PURE__ */ jsx(
51
+ Box,
52
+ {
53
+ css: {
54
+ fontSize: "11px",
55
+ fontWeight: 600,
56
+ lineHeight: 1,
57
+ opacity: 0.8,
58
+ whiteSpace: "nowrap"
59
+ },
60
+ children: isMac ? "⌘ + K" : "Ctrl + K"
61
+ }
62
+ )
63
+ ]
64
+ }
65
+ );
66
+ }
67
+
68
+ export { SearchControl };
@@ -0,0 +1 @@
1
+ export declare const ToggleReadonly: () => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,69 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { cx, css } from '@likec4/styles/css';
3
+ import { hstack } from '@likec4/styles/patterns';
4
+ import { UnstyledButton } from '@mantine/core';
5
+ import * as m from 'motion/react-m';
6
+ import { useDiagramContext, useDiagram } from '../../hooks/useDiagram.js';
7
+ import IconLock from '../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLock.js';
8
+ import IconLockOpen2 from '../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLockOpen2.js';
9
+
10
+ const selector = (state) => ({
11
+ visible: state.features.enableReadOnly !== true,
12
+ isReadOnly: state.toggledFeatures.enableReadOnly ?? state.features.enableReadOnly
13
+ });
14
+ const ToggleReadonly = () => {
15
+ const { visible, isReadOnly } = useDiagramContext(selector);
16
+ const diagram = useDiagram();
17
+ if (!visible) {
18
+ return null;
19
+ }
20
+ return /* @__PURE__ */ jsxs(
21
+ UnstyledButton,
22
+ {
23
+ component: m.button,
24
+ layout: "position",
25
+ onClick: (e) => {
26
+ e.stopPropagation();
27
+ diagram.toggleFeature("ReadOnly");
28
+ },
29
+ whileTap: {
30
+ translateY: 1
31
+ },
32
+ className: cx(
33
+ "group",
34
+ hstack({
35
+ gap: "2",
36
+ paddingInline: "2xs",
37
+ paddingBlock: "2xs",
38
+ rounded: "sm",
39
+ userSelect: "none",
40
+ cursor: "pointer",
41
+ color: {
42
+ base: "likec4.panel.action-icon.text",
43
+ _hover: "likec4.panel.action-icon.text.hover"
44
+ },
45
+ backgroundColor: {
46
+ _hover: "likec4.panel.action-icon.bg.hover"
47
+ }
48
+ })
49
+ ),
50
+ children: [
51
+ isReadOnly ? /* @__PURE__ */ jsx(IconLock, { size: 14, stroke: 2 }) : /* @__PURE__ */ jsx(IconLockOpen2, { size: 14, stroke: 2 }),
52
+ isReadOnly && /* @__PURE__ */ jsx(
53
+ m.div,
54
+ {
55
+ className: css({
56
+ fontSize: "11px",
57
+ fontWeight: 600,
58
+ lineHeight: 1,
59
+ opacity: 0.8
60
+ }),
61
+ children: "Unlock"
62
+ }
63
+ )
64
+ ]
65
+ }
66
+ );
67
+ };
68
+
69
+ export { ToggleReadonly };
@@ -0,0 +1,5 @@
1
+ export { BurgerButton } from './BurgerButton';
2
+ export { NavigationButtons } from './NavigationButtons';
3
+ export { OpenSource } from './OpenSource';
4
+ export { SearchControl } from './SearchControl';
5
+ export { ToggleReadonly } from './ToggleReadonly';
@@ -0,0 +1 @@
1
+ export declare const CenterCamera: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { useDiagram } from '../../hooks/useDiagram.js';
3
+ import { PanelActionIcon } from '../_common.js';
4
+ import { Tooltip } from './_common.js';
5
+ import IconFocusCentered from '../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconFocusCentered.js';
6
+
7
+ const CenterCamera = () => {
8
+ const diagram = useDiagram();
9
+ return /* @__PURE__ */ jsx(Tooltip, { label: "Center camera", children: /* @__PURE__ */ jsx(PanelActionIcon, { onClick: () => diagram.fitDiagram(), children: /* @__PURE__ */ jsx(IconFocusCentered, {}) }) });
10
+ };
11
+
12
+ export { CenterCamera };
@@ -0,0 +1 @@
1
+ export declare const ChangeAutoLayoutButton: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,157 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { Popover, PopoverTarget, PopoverDropdown, Box, FloatingIndicator, Text, Flex, UnstyledButton } from '@mantine/core';
3
+ import { useHover, useUncontrolled, clampUseMovePosition, useMove, useMergedRef } from '@mantine/hooks';
4
+ import { useDebouncedCallback } from '@react-hookz/web';
5
+ import { useState, forwardRef } from 'react';
6
+ import { useDiagram, useDiagramContext } from '../../hooks/useDiagram.js';
7
+ import { PanelActionIcon } from '../_common.js';
8
+ import { Tooltip } from './_common.js';
9
+ import { autolayoutIndicator, autolayoutButton, spacingSliderBody, spacingSliderThumb } from './styles.js';
10
+ import { useDiagramEventHandlers } from '../../context/DiagramEventHandlers.js';
11
+ import IconLayoutDashboard from '../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutDashboard.js';
12
+
13
+ const selector = (state) => ({
14
+ viewId: state.view.id,
15
+ autoLayout: state.view.autoLayout
16
+ });
17
+ const ChangeAutoLayoutButton = () => {
18
+ const { onChange } = useDiagramEventHandlers();
19
+ const diagram = useDiagram();
20
+ const [rootRef, setRootRef] = useState(null);
21
+ const [controlsRefs, setControlsRefs] = useState({});
22
+ const {
23
+ autoLayout,
24
+ viewId
25
+ } = useDiagramContext(selector);
26
+ const { ref, hovered: isSpacingHovered } = useHover();
27
+ const setControlRef = (name) => (node) => {
28
+ controlsRefs[name] = node;
29
+ setControlsRefs(controlsRefs);
30
+ };
31
+ const setAutoLayout = (direction) => (event) => {
32
+ event.stopPropagation();
33
+ onChange?.({
34
+ change: {
35
+ op: "change-autolayout",
36
+ layout: {
37
+ ...autoLayout,
38
+ direction
39
+ }
40
+ }
41
+ });
42
+ };
43
+ const setSpacing = (nodeSep, rankSep) => {
44
+ diagram.fitDiagram();
45
+ onChange?.({
46
+ change: {
47
+ op: "change-autolayout",
48
+ layout: {
49
+ ...autoLayout,
50
+ nodeSep,
51
+ rankSep
52
+ }
53
+ }
54
+ });
55
+ };
56
+ return /* @__PURE__ */ jsxs(
57
+ Popover,
58
+ {
59
+ position: "right-start",
60
+ clickOutsideEvents: [
61
+ "pointerdown"
62
+ ],
63
+ radius: "xs",
64
+ shadow: "lg",
65
+ offset: {
66
+ mainAxis: 10
67
+ },
68
+ children: [
69
+ /* @__PURE__ */ jsx(PopoverTarget, { children: /* @__PURE__ */ jsx(Tooltip, { label: "Change Auto Layout", children: /* @__PURE__ */ jsx(PanelActionIcon, { children: /* @__PURE__ */ jsx(IconLayoutDashboard, {}) }) }) }),
70
+ /* @__PURE__ */ jsx(PopoverDropdown, { className: "likec4-top-left-panel", p: 8, pt: 6, opacity: isSpacingHovered ? 0.6 : 1, children: /* @__PURE__ */ jsxs(Box, { pos: "relative", ref: setRootRef, children: [
71
+ /* @__PURE__ */ jsx(
72
+ FloatingIndicator,
73
+ {
74
+ target: controlsRefs[autoLayout.direction],
75
+ parent: rootRef,
76
+ className: autolayoutIndicator
77
+ }
78
+ ),
79
+ /* @__PURE__ */ jsx(Box, { mb: 10, children: /* @__PURE__ */ jsx(Text, { inline: true, fz: "xs", c: "dimmed", fw: 500, children: "Auto layout:" }) }),
80
+ /* @__PURE__ */ jsxs(Flex, { gap: 2, wrap: "wrap", justify: "stretch", maw: 160, children: [
81
+ /* @__PURE__ */ jsx(UnstyledButton, { className: autolayoutButton, ref: setControlRef("TB"), onClick: setAutoLayout("TB"), children: "Top-Bottom" }),
82
+ /* @__PURE__ */ jsx(UnstyledButton, { className: autolayoutButton, ref: setControlRef("BT"), onClick: setAutoLayout("BT"), children: "Bottom-Top" }),
83
+ /* @__PURE__ */ jsx(UnstyledButton, { className: autolayoutButton, ref: setControlRef("LR"), onClick: setAutoLayout("LR"), children: "Left-Right" }),
84
+ /* @__PURE__ */ jsx(UnstyledButton, { className: autolayoutButton, ref: setControlRef("RL"), onClick: setAutoLayout("RL"), children: "Right-Left" })
85
+ ] }),
86
+ /* @__PURE__ */ jsx(Box, { my: 10, children: /* @__PURE__ */ jsx(Text, { inline: true, fz: "xs", c: "dimmed", fw: 500, children: "Spacing:" }) }),
87
+ /* @__PURE__ */ jsx(
88
+ SpacingSliders,
89
+ {
90
+ ref,
91
+ isVertical: autoLayout.direction === "TB" || autoLayout.direction === "BT",
92
+ nodeSep: autoLayout.nodeSep,
93
+ rankSep: autoLayout.rankSep,
94
+ onChange: setSpacing
95
+ },
96
+ viewId
97
+ )
98
+ ] }) })
99
+ ]
100
+ }
101
+ );
102
+ };
103
+ const MAX_SPACING = 400;
104
+ const SpacingSliders = forwardRef(({
105
+ isVertical,
106
+ nodeSep,
107
+ rankSep,
108
+ onChange
109
+ }, _ref) => {
110
+ if (!isVertical) {
111
+ [nodeSep, rankSep] = [rankSep, nodeSep];
112
+ }
113
+ const propagateChange = useDebouncedCallback(
114
+ ({ x, y }) => {
115
+ if (!isVertical) {
116
+ [x, y] = [y, x];
117
+ }
118
+ onChange(Math.round(x * MAX_SPACING), Math.round(y * MAX_SPACING));
119
+ },
120
+ [onChange, isVertical],
121
+ 250,
122
+ 2e3
123
+ );
124
+ const [value, setValue] = useUncontrolled({
125
+ defaultValue: clampUseMovePosition({
126
+ x: (nodeSep ?? 100) / MAX_SPACING,
127
+ y: (rankSep ?? 120) / MAX_SPACING
128
+ }),
129
+ onChange: propagateChange
130
+ });
131
+ const { ref } = useMove(setValue);
132
+ let nodeSepValue = Math.round(value.x * MAX_SPACING);
133
+ let rankSepValue = Math.round(value.y * MAX_SPACING);
134
+ if (!isVertical) {
135
+ [nodeSepValue, rankSepValue] = [rankSepValue, nodeSepValue];
136
+ }
137
+ const mergedRef = useMergedRef(ref, _ref);
138
+ return /* @__PURE__ */ jsxs(Box, { ref: mergedRef, className: spacingSliderBody, pt: "100%", children: [
139
+ /* @__PURE__ */ jsx(
140
+ Box,
141
+ {
142
+ className: spacingSliderThumb,
143
+ style: {
144
+ left: `${value.x * 100}%`,
145
+ top: `${value.y * 100}%`
146
+ }
147
+ }
148
+ ),
149
+ /* @__PURE__ */ jsx(Box, { pos: "absolute", left: 2, bottom: 2, children: /* @__PURE__ */ jsxs(Text, { component: "div", fz: 8, c: "dimmed", fw: 500, children: [
150
+ rankSepValue,
151
+ ", ",
152
+ nodeSepValue
153
+ ] }) })
154
+ ] });
155
+ });
156
+
157
+ export { ChangeAutoLayoutButton };
@@ -0,0 +1 @@
1
+ export declare function EditorPanel(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,48 @@
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import { vstack } from '@likec4/styles/patterns';
3
+ import { TooltipGroup } from '@mantine/core';
4
+ import { AnimatePresence } from 'motion/react';
5
+ import * as m from 'motion/react-m';
6
+ import { CenterCamera } from './CenterCamera.js';
7
+ import { ChangeAutoLayoutButton } from './ChangeAutoLayoutButton.js';
8
+ import { LayoutDriftNotification } from './LayoutDriftNotification.js';
9
+ import { ManualLayoutToolsButton } from './ManualLayoutToolsButton.js';
10
+ import { useEnabledFeatures } from '../../context/DiagramFeatures.js';
11
+
12
+ function EditorPanel() {
13
+ const { enableReadOnly } = useEnabledFeatures();
14
+ return /* @__PURE__ */ jsx(AnimatePresence, { children: !enableReadOnly && /* @__PURE__ */ jsx(
15
+ m.div,
16
+ {
17
+ layout: "position",
18
+ className: vstack({
19
+ gap: "sm",
20
+ layerStyle: "likec4.panel",
21
+ position: "relative",
22
+ cursor: "pointer",
23
+ padding: "4",
24
+ pointerEvents: "all"
25
+ }),
26
+ initial: {
27
+ opacity: 0,
28
+ translateX: -20
29
+ },
30
+ animate: {
31
+ opacity: 1,
32
+ translateX: 0
33
+ },
34
+ exit: {
35
+ opacity: 0,
36
+ translateX: -20
37
+ },
38
+ children: /* @__PURE__ */ jsxs(TooltipGroup, { children: [
39
+ /* @__PURE__ */ jsx(ChangeAutoLayoutButton, {}),
40
+ /* @__PURE__ */ jsx(ManualLayoutToolsButton, {}),
41
+ /* @__PURE__ */ jsx(LayoutDriftNotification, {}),
42
+ /* @__PURE__ */ jsx(CenterCamera, {})
43
+ ] })
44
+ }
45
+ ) });
46
+ }
47
+
48
+ export { EditorPanel };
@@ -0,0 +1 @@
1
+ export declare const LayoutDriftNotification: () => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,56 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { HoverCard, HoverCardTarget, ActionIcon, HoverCardDropdown, Notification, Text, Code } from '@mantine/core';
3
+ import { css } from '@likec4/styles/css';
4
+ import { useDiagramContext } from '../../hooks/useDiagram.js';
5
+ import { useMantinePortalProps } from '../../hooks/useMantinePortalProps.js';
6
+ import IconAlertTriangle from '../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.js';
7
+
8
+ const LayoutDriftNotification = () => {
9
+ const portalProps = useMantinePortalProps();
10
+ const hasLayoutDrift = useDiagramContext((c) => c.view.hasLayoutDrift ?? false);
11
+ if (!hasLayoutDrift) return null;
12
+ return /* @__PURE__ */ jsxs(
13
+ HoverCard,
14
+ {
15
+ position: "right-start",
16
+ openDelay: 200,
17
+ closeDelay: 100,
18
+ ...portalProps,
19
+ children: [
20
+ /* @__PURE__ */ jsx(HoverCardTarget, { children: /* @__PURE__ */ jsx(
21
+ ActionIcon,
22
+ {
23
+ color: "orange",
24
+ c: "orange",
25
+ className: css({
26
+ bg: "mantine.colors.orange.light"
27
+ }),
28
+ children: /* @__PURE__ */ jsx(IconAlertTriangle, {})
29
+ }
30
+ ) }),
31
+ /* @__PURE__ */ jsx(HoverCardDropdown, { p: "0", children: /* @__PURE__ */ jsxs(
32
+ Notification,
33
+ {
34
+ color: "orange",
35
+ withBorder: false,
36
+ withCloseButton: false,
37
+ title: "Manual layout issues",
38
+ children: [
39
+ /* @__PURE__ */ jsxs(Text, { mt: 2, size: "sm", lh: "xs", children: [
40
+ "View contains new elements or their sizes have changed,",
41
+ /* @__PURE__ */ jsx("br", {}),
42
+ "last manual layout can not be applied."
43
+ ] }),
44
+ /* @__PURE__ */ jsxs(Text, { mt: "xs", size: "sm", lh: "xs", children: [
45
+ "Update view predicates or remove ",
46
+ /* @__PURE__ */ jsx(Code, { children: "@likec4-generated" })
47
+ ] })
48
+ ]
49
+ }
50
+ ) })
51
+ ]
52
+ }
53
+ );
54
+ };
55
+
56
+ export { LayoutDriftNotification };
@@ -0,0 +1,2 @@
1
+ import { PopoverProps } from '@mantine/core';
2
+ export declare const ManualLayoutToolsButton: (props: PopoverProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,174 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { css } from '@likec4/styles/css';
3
+ import { hstack } from '@likec4/styles/patterns';
4
+ import { Popover, PopoverTarget, PopoverDropdown, TooltipGroup, ActionIcon } from '@mantine/core';
5
+ import { useDiagram } from '../../hooks/useDiagram.js';
6
+ import { PanelActionIcon } from '../_common.js';
7
+ import { Tooltip } from './_common.js';
8
+ import IconLayoutCollage from '../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutCollage.js';
9
+ import IconLayoutBoardSplit from '../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutBoardSplit.js';
10
+ import IconLayoutAlignLeft from '../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignLeft.js';
11
+ import IconLayoutAlignCenter from '../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignCenter.js';
12
+ import IconLayoutAlignRight from '../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignRight.js';
13
+ import IconLayoutAlignTop from '../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignTop.js';
14
+ import IconLayoutAlignMiddle from '../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignMiddle.js';
15
+ import IconLayoutAlignBottom from '../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignBottom.js';
16
+ import IconRouteOff from '../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.js';
17
+
18
+ const Action = ({
19
+ label,
20
+ icon,
21
+ onClick
22
+ }) => /* @__PURE__ */ jsx(Tooltip, { label, withinPortal: false, position: "top", children: /* @__PURE__ */ jsx(
23
+ ActionIcon,
24
+ {
25
+ classNames: {
26
+ root: "action-icon",
27
+ icon: css({
28
+ "& > svg": {
29
+ width: "70%",
30
+ height: "70%"
31
+ }
32
+ })
33
+ },
34
+ variant: "subtle",
35
+ color: "gray",
36
+ onClick,
37
+ children: icon
38
+ }
39
+ ) });
40
+ const ManualLayoutToolsButton = (props) => {
41
+ const diagram = useDiagram();
42
+ return /* @__PURE__ */ jsxs(
43
+ Popover,
44
+ {
45
+ position: "right-start",
46
+ offset: {
47
+ mainAxis: 10,
48
+ crossAxis: -2
49
+ },
50
+ clickOutsideEvents: [
51
+ "pointerdown"
52
+ ],
53
+ radius: "sm",
54
+ shadow: "lg",
55
+ ...props,
56
+ children: [
57
+ /* @__PURE__ */ jsx(PopoverTarget, { children: /* @__PURE__ */ jsx(Tooltip, { label: "Manual layouting tools", children: /* @__PURE__ */ jsx(PanelActionIcon, { children: /* @__PURE__ */ jsx(IconLayoutCollage, {}) }) }) }),
58
+ /* @__PURE__ */ jsx(
59
+ PopoverDropdown,
60
+ {
61
+ className: hstack({
62
+ gap: 1,
63
+ layerStyle: "likec4.panel",
64
+ p: "2"
65
+ }),
66
+ children: /* @__PURE__ */ jsxs(TooltipGroup, { children: [
67
+ /* @__PURE__ */ jsx(
68
+ Action,
69
+ {
70
+ label: "Align in columns",
71
+ icon: /* @__PURE__ */ jsx(IconLayoutBoardSplit, { stroke: 1.2 }),
72
+ onClick: (e) => {
73
+ e.stopPropagation();
74
+ diagram.align("Column");
75
+ }
76
+ }
77
+ ),
78
+ /* @__PURE__ */ jsx(
79
+ Action,
80
+ {
81
+ label: "Align left",
82
+ icon: /* @__PURE__ */ jsx(IconLayoutAlignLeft, { stroke: 1.5 }),
83
+ onClick: (e) => {
84
+ e.stopPropagation();
85
+ diagram.align("Left");
86
+ }
87
+ }
88
+ ),
89
+ /* @__PURE__ */ jsx(
90
+ Action,
91
+ {
92
+ label: "Align center",
93
+ icon: /* @__PURE__ */ jsx(IconLayoutAlignCenter, { stroke: 1.5 }),
94
+ onClick: (e) => {
95
+ e.stopPropagation();
96
+ diagram.align("Center");
97
+ }
98
+ }
99
+ ),
100
+ /* @__PURE__ */ jsx(
101
+ Action,
102
+ {
103
+ label: "Align right",
104
+ icon: /* @__PURE__ */ jsx(IconLayoutAlignRight, { stroke: 1.5 }),
105
+ onClick: (e) => {
106
+ e.stopPropagation();
107
+ diagram.align("Right");
108
+ }
109
+ }
110
+ ),
111
+ /* @__PURE__ */ jsx(
112
+ Action,
113
+ {
114
+ label: "Align in rows",
115
+ icon: /* @__PURE__ */ jsx(IconLayoutBoardSplit, { stroke: 1.5, style: { transform: "rotate(90deg)" } }),
116
+ onClick: (e) => {
117
+ e.stopPropagation();
118
+ diagram.align("Row");
119
+ }
120
+ }
121
+ ),
122
+ /* @__PURE__ */ jsx(
123
+ Action,
124
+ {
125
+ label: "Align top",
126
+ icon: /* @__PURE__ */ jsx(IconLayoutAlignTop, { stroke: 1.5 }),
127
+ onClick: (e) => {
128
+ e.stopPropagation();
129
+ diagram.align("Top");
130
+ }
131
+ }
132
+ ),
133
+ /* @__PURE__ */ jsx(
134
+ Action,
135
+ {
136
+ label: "Align middle",
137
+ icon: /* @__PURE__ */ jsx(IconLayoutAlignMiddle, { stroke: 1.5 }),
138
+ onClick: (e) => {
139
+ e.stopPropagation();
140
+ diagram.align("Middle");
141
+ }
142
+ }
143
+ ),
144
+ /* @__PURE__ */ jsx(
145
+ Action,
146
+ {
147
+ label: "Align bottom",
148
+ icon: /* @__PURE__ */ jsx(IconLayoutAlignBottom, { stroke: 1.5 }),
149
+ onClick: (e) => {
150
+ e.stopPropagation();
151
+ diagram.align("Bottom");
152
+ }
153
+ }
154
+ ),
155
+ /* @__PURE__ */ jsx(
156
+ Action,
157
+ {
158
+ label: "Reset all control points",
159
+ icon: /* @__PURE__ */ jsx(IconRouteOff, { stroke: 1.5 }),
160
+ onClick: (e) => {
161
+ e.stopPropagation();
162
+ diagram.resetEdgeControlPoints();
163
+ }
164
+ }
165
+ )
166
+ ] })
167
+ }
168
+ )
169
+ ]
170
+ }
171
+ );
172
+ };
173
+
174
+ export { ManualLayoutToolsButton };
@@ -0,0 +1,6 @@
1
+ import { ForwardRefExoticComponent, RefAttributes } from 'react';
2
+ import { TooltipProps } from '@mantine/core';
3
+ export declare const Tooltip: ForwardRefExoticComponent< TooltipProps & RefAttributes<HTMLDivElement> & {
4
+ component?: any;
5
+ renderRoot?: (props: Record<string, any>) => React.ReactNode;
6
+ }>;
@@ -0,0 +1,14 @@
1
+ import { Tooltip as Tooltip$1 } from '@mantine/core';
2
+
3
+ const Tooltip = Tooltip$1.withProps({
4
+ color: "dark",
5
+ fz: "xs",
6
+ openDelay: 600,
7
+ closeDelay: 120,
8
+ label: "",
9
+ children: null,
10
+ offset: 8,
11
+ position: "right"
12
+ });
13
+
14
+ export { Tooltip };
@@ -0,0 +1 @@
1
+ export { EditorPanel } from './EditorPanel';
@@ -0,0 +1,8 @@
1
+ export declare const navigationButtons: string;
2
+ export declare const panel: string;
3
+ export declare const actionIconGroup: string;
4
+ export declare const autolayoutIcon: string;
5
+ export declare const autolayoutButton: string;
6
+ export declare const autolayoutIndicator: string;
7
+ export declare const spacingSliderBody: string;
8
+ export declare const spacingSliderThumb: string;