@likec4/diagram 1.34.2 → 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
@@ -31,6 +31,25 @@ export type LikeC4ColorScheme = 'light' | 'dark';
31
31
  export type OverrideReactFlowProps = Pick<XYFlowProps, 'paneClickDistance' | 'nodeClickDistance' | 'selectionKeyCode' | 'panActivationKeyCode' | 'multiSelectionKeyCode' | 'zoomActivationKeyCode' | 'snapToGrid' | 'snapGrid' | 'onlyRenderVisibleElements' | 'nodesDraggable' | 'nodesFocusable' | 'elementsSelectable' | 'selectNodesOnDrag' | 'panOnDrag' | 'preventScrolling' | 'zoomOnScroll' | 'zoomOnPinch' | 'panOnScroll' | 'panOnScrollSpeed' | 'panOnScrollMode' | 'zoomOnDoubleClick' | 'nodeDragThreshold'>;
32
32
  export type PaddingUnit = 'px' | '%';
33
33
  export type PaddingWithUnit = `${number}${PaddingUnit}` | number;
34
+ /**
35
+ * Padding around the diagram
36
+ *
37
+ * @example
38
+ * {
39
+ * top: '8px',
40
+ * right: '8px',
41
+ * bottom: '8px',
42
+ * left: '8px',
43
+ * }
44
+ */
45
+ export type ViewPadding = PaddingWithUnit | {
46
+ top?: PaddingWithUnit;
47
+ right?: PaddingWithUnit;
48
+ bottom?: PaddingWithUnit;
49
+ left?: PaddingWithUnit;
50
+ x?: PaddingWithUnit;
51
+ y?: PaddingWithUnit;
52
+ };
34
53
  export interface LikeC4DiagramProperties<A extends aux.Any> {
35
54
  view: LayoutedView<A>;
36
55
  className?: string | undefined;
@@ -51,10 +70,11 @@ export interface LikeC4DiagramProperties<A extends aux.Any> {
51
70
  readonly?: boolean | undefined;
52
71
  /**
53
72
  * Show/hide panel with top left controls,
73
+ * - `next` - Experimental navigation panel
54
74
  *
55
75
  * @default true if not readonly
56
76
  */
57
- controls?: boolean | undefined;
77
+ controls?: boolean | 'next' | undefined;
58
78
  /**
59
79
  * If set, initial viewport will show all nodes & edges
60
80
  * @default true
@@ -63,8 +83,29 @@ export interface LikeC4DiagramProperties<A extends aux.Any> {
63
83
  /**
64
84
  * Padding around the diagram
65
85
  * @default '8px'
66
- */
67
- fitViewPadding?: PaddingWithUnit | undefined;
86
+ *
87
+ * @see {@link ViewPadding}
88
+ *
89
+ * @example
90
+ * ```tsx
91
+ * <LikeC4Diagram
92
+ * fitViewPadding={{
93
+ * x: '16px',
94
+ * y: '16px',
95
+ * }}
96
+ * />
97
+ *
98
+ * <LikeC4Diagram
99
+ * fitViewPadding={{
100
+ * top: '8px',
101
+ * right: '8px',
102
+ * bottom: '8px',
103
+ * left: '8px',
104
+ * }}
105
+ * />
106
+ * ```
107
+ */
108
+ fitViewPadding?: ViewPadding | undefined;
68
109
  /**
69
110
  * @default false if readonly
70
111
  */
@@ -149,8 +190,9 @@ export interface LikeC4DiagramProperties<A extends aux.Any> {
149
190
  /**
150
191
  * Improve performance by hiding certain elements and reducing visual effects (disable mix-blend, shadows, animations)
151
192
  * Enable it if you have a large or static view
193
+ * - `auto` - will be `true` if view has more then 3000 * 2000 pixels
152
194
  *
153
- * @default 'auto' - will be `true` if view has more then 3000 * 2000 pixels
195
+ * @default 'auto'
154
196
  */
155
197
  reduceGraphics?: 'auto' | boolean | undefined;
156
198
  /**
@@ -160,6 +202,11 @@ export interface LikeC4DiagramProperties<A extends aux.Any> {
160
202
  renderIcon?: ElementIconRenderer | undefined;
161
203
  /**
162
204
  * Customize layout of the controls on the top left
205
+ *
206
+ * @note
207
+ * Ignored if `controls="next"`
208
+ *
209
+ * @see {@link controls}
163
210
  */
164
211
  renderControls?: ControlsCustomLayout | undefined;
165
212
  /**
@@ -1,10 +1,10 @@
1
1
  import { LikeC4Model } from '@likec4/core/model';
2
- import { Any, Unknown } from '@likec4/core/types';
2
+ import { aux } from '@likec4/core/types';
3
3
  import { PropsWithChildren } from 'react';
4
- export type LikeC4ModelProviderProps<A extends Any> = PropsWithChildren<{
4
+ export type LikeC4ModelProviderProps<A extends aux.Any = aux.Unknown> = PropsWithChildren<{
5
5
  likec4model: LikeC4Model<A>;
6
6
  }>;
7
7
  /**
8
8
  * Ensures LikeC4Model context
9
9
  */
10
- export declare function LikeC4ModelProvider<A extends Any = Unknown>({ children, likec4model, }: LikeC4ModelProviderProps<A>): import("react/jsx-runtime").JSX.Element;
10
+ export declare function LikeC4ModelProvider<A extends aux.Any = aux.Unknown>({ children, likec4model, }: LikeC4ModelProviderProps<A>): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import { ReactFlowProps } from '@xyflow/react';
2
2
  import { SetRequired, Simplify } from 'type-fest';
3
- import { PaddingWithUnit } from '../LikeC4Diagram.props';
3
+ import { ViewPadding } from '../LikeC4Diagram.props';
4
4
  import { XYBackground } from './Background';
5
5
  import { Base } from './types';
6
6
  export type BaseXYFlowProps<NodeType extends Base.Node, EdgeType extends Base.Edge> = Simplify<{
@@ -9,7 +9,7 @@ export type BaseXYFlowProps<NodeType extends Base.Node, EdgeType extends Base.Ed
9
9
  nodesSelectable?: boolean;
10
10
  nodesDraggable?: boolean;
11
11
  background?: 'transparent' | 'solid' | XYBackground;
12
- fitViewPadding?: PaddingWithUnit | undefined;
12
+ fitViewPadding?: ViewPadding | undefined;
13
13
  onViewportResize?: undefined | (() => void);
14
14
  } & SetRequired<Omit<ReactFlowProps<NodeType, EdgeType>, 'defaultNodes' | 'defaultEdges' | 'onNodeDoubleClick' | 'onEdgeDoubleClick' | 'fitViewOptions'>, 'nodes' | 'edges' | 'onNodesChange' | 'onEdgesChange'>>;
15
15
  export declare const BaseXYFlow: <NodeType extends Base.Node, EdgeType extends Base.Edge>({ nodes, edges, onEdgesChange, onNodesChange, className, pannable, zoomable, nodesSelectable, nodesDraggable, background, children, colorMode, fitViewPadding, fitView, zoomOnDoubleClick, onViewportResize, onMoveEnd, ...props }: BaseXYFlowProps<NodeType, EdgeType>) => import("react/jsx-runtime").JSX.Element;
@@ -2,7 +2,7 @@ import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { cx, css } from '@likec4/styles/css';
3
3
  import { useCallbackRef } from '@mantine/hooks';
4
4
  import { ReactFlow, useStore } from '@xyflow/react';
5
- import { useMemo, Fragment } from 'react';
5
+ import { Fragment } from 'react';
6
6
  import { useUpdateEffect } from '../hooks/useUpdateEffect.js';
7
7
  import { useIsZoomTooSmall, useXYStoreApi } from '../hooks/useXYFlow.js';
8
8
  import { stopPropagation } from '../utils/xyflow.js';
@@ -82,12 +82,12 @@ const BaseXYFlow = ({
82
82
  maxZoom: zoomable ? MaxZoom : 1,
83
83
  minZoom: zoomable ? MinZoom : 1,
84
84
  fitView,
85
- fitViewOptions: useMemo(() => ({
85
+ fitViewOptions: {
86
86
  minZoom: MinZoom,
87
87
  maxZoom: 1,
88
88
  padding: fitViewPadding,
89
89
  includeHiddenNodes: false
90
- }), [fitViewPadding]),
90
+ },
91
91
  preventScrolling: zoomable || pannable,
92
92
  defaultMarkerColor: "var(--xy-edge-stroke)",
93
93
  noDragClassName: "nodrag",
@@ -7,7 +7,7 @@ import { useDebouncedValue } from '@mantine/hooks';
7
7
  import * as m from 'motion/react-m';
8
8
  import { stopPropagation } from '../../../utils/xyflow.js';
9
9
  import { compoundActionBtn } from './actionbtns.css.js';
10
- import IconZoomScan from '../../../node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js';
10
+ import IconZoomScan from '../../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js';
11
11
 
12
12
  function CompoundActionButton({
13
13
  data: {
@@ -7,7 +7,7 @@ import { useDebouncedValue } from '@mantine/hooks';
7
7
  import * as m from 'motion/react-m';
8
8
  import { stopPropagation } from '../../../utils/xyflow.js';
9
9
  import { compoundActionBtn } from './actionbtns.css.js';
10
- import IconId from '../../../node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js';
10
+ import IconId from '../../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js';
11
11
 
12
12
  function CompoundDetailsButton({
13
13
  data: {
@@ -3,7 +3,7 @@ import { cx } from '@likec4/styles/css';
3
3
  import { ActionIcon } from '@mantine/core';
4
4
  import { stopPropagation } from '../../../utils/xyflow.js';
5
5
  import { actionBtn } from './edge.css.js';
6
- import IconZoomScan from '../../../node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js';
6
+ import IconZoomScan from '../../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js';
7
7
 
8
8
  function EdgeActionButton({ icon, onClick }) {
9
9
  return /* @__PURE__ */ jsx(
@@ -6,7 +6,7 @@ import { ActionIcon } from '@mantine/core';
6
6
  import { useId } from '@mantine/hooks';
7
7
  import * as m from 'motion/react-m';
8
8
  import { stopPropagation } from '../../../utils/xyflow.js';
9
- import IconId from '../../../node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js';
9
+ import IconId from '../../../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js';
10
10
 
11
11
  const container = css({
12
12
  position: "absolute",
@@ -1,5 +1,5 @@
1
1
  import { Color, ElementShape, ElementStyle } from '@likec4/core/types';
2
- import { LayoutProps } from 'motion/react';
2
+ import { MotionNodeLayoutOptions } from 'motion/react';
3
3
  import { CSSProperties, ReactNode, ForwardRefExoticComponent, RefAttributes } from 'react';
4
4
  import { NodeProps } from '../../types';
5
5
  import { ShapeSize, SpacingSize, TextSize } from '@likec4/core';
@@ -14,7 +14,7 @@ export type ElementNodeContainerProps = {
14
14
  className?: string | undefined;
15
15
  style?: CSSProperties | undefined;
16
16
  [key: `data-${string}`]: string | undefined;
17
- } & LayoutProps;
17
+ } & MotionNodeLayoutOptions;
18
18
  export declare function nodeSizes({ size, padding, textSize, }: ElementStyle): {
19
19
  size: ShapeSize;
20
20
  padding: SpacingSize;
@@ -30,4 +30,4 @@ export declare const ElementNodeContainer: ForwardRefExoticComponent<{
30
30
  children?: ReactNode | undefined;
31
31
  className?: string | undefined;
32
32
  style?: CSSProperties | undefined;
33
- } & LayoutProps & RefAttributes<HTMLDivElement>>;
33
+ } & MotionNodeLayoutOptions & RefAttributes<HTMLDivElement>>;
@@ -1,24 +1,24 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { cx } from '@likec4/styles/css';
3
3
  import { Box } from '@likec4/styles/jsx';
4
+ import { elementNodeIcon, elementNodeData } from '@likec4/styles/recipes';
4
5
  import { Text } from '@mantine/core';
5
6
  import { isTruthy, isEmpty, isNumber } from 'remeda';
6
7
  import { IconRenderer } from '../../../context/IconRenderer.js';
7
8
  import { MarkdownBlock } from '../MarkdownBlock.js';
8
9
  import { nodeSizes } from './ElementNodeContainer.js';
9
- import { elementTitle, iconSize, elementIcon } from './ElementTitle.css.js';
10
10
 
11
- function ElementTitle({ id, data, iconSize: iconSize$1 }) {
12
- const elementIcon$1 = IconRenderer({
11
+ function ElementTitle({ id, data, iconSize }) {
12
+ const elementIcon = IconRenderer({
13
13
  element: {
14
14
  id,
15
15
  title: data.title,
16
16
  icon: data.icon
17
17
  },
18
- className: elementIcon
18
+ className: elementNodeIcon()
19
19
  });
20
- const classes = elementTitle({
21
- hasIcon: isTruthy(elementIcon$1),
20
+ const classes = elementNodeData({
21
+ hasIcon: isTruthy(elementIcon),
22
22
  hasDescription: !!data.description?.nonEmpty,
23
23
  hasTechnology: !isEmpty(data.technology ?? "")
24
24
  });
@@ -32,12 +32,12 @@ function ElementTitle({ id, data, iconSize: iconSize$1 }) {
32
32
  classes.root,
33
33
  "likec4-element"
34
34
  ),
35
- style: isNumber(iconSize$1) ? {
35
+ style: isNumber(iconSize) ? {
36
36
  // @ts-ignore
37
- [iconSize]: `${iconSize$1}px`
37
+ ["--likec4-icon-size"]: `${iconSize}px`
38
38
  } : void 0,
39
39
  children: [
40
- elementIcon$1,
40
+ elementIcon,
41
41
  /* @__PURE__ */ jsxs(Box, { className: cx(classes.textContainer, "likec4-element-main-props"), children: [
42
42
  /* @__PURE__ */ jsx(
43
43
  Text,
@@ -11,7 +11,7 @@ import { Overlay } from '../overlays/overlay/Overlay.js';
11
11
  import { ShadowRoot } from './ShadowRoot.js';
12
12
  import { useColorScheme, useShadowRootStyle, cssInteractive } from './styles.css.js';
13
13
  import { ViewNotFound, ErrorMessage } from './ViewNotFound.js';
14
- import IconX from '../node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js';
14
+ import IconX from '../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js';
15
15
 
16
16
  function LikeC4View({
17
17
  viewId,
@@ -60,7 +60,7 @@ const LikeC4ViewInner = memo(({
60
60
  renderNodes,
61
61
  ...props
62
62
  }) => {
63
- const likec4model = useLikeC4Model("layouted");
63
+ const likec4model = useLikeC4Model();
64
64
  const colorScheme = useColorScheme(explicitColorScheme);
65
65
  const [shadowRootProps, cssstyle] = useShadowRootStyle(keepAspectRatio, view);
66
66
  const [browserViewId, onNavigateTo] = useState(null);
@@ -149,7 +149,7 @@ const LikeC4ViewInner = memo(({
149
149
  enableRelationshipDetails: true,
150
150
  enableSearch: true,
151
151
  enableElementTags: true,
152
- controls: true,
152
+ controls: "next",
153
153
  readonly: true,
154
154
  fitView: true,
155
155
  fitViewPadding: "32px",
@@ -1,6 +1,6 @@
1
1
  import { WhereOperator } from '@likec4/core/types';
2
2
  import { CSSProperties } from 'react';
3
- import { CustomNodes, ElementIconRenderer, OverrideReactFlowProps, PaddingWithUnit } from '../LikeC4Diagram.props';
3
+ import { CustomNodes, ElementIconRenderer, OverrideReactFlowProps, PaddingWithUnit, ViewPadding } from '../LikeC4Diagram.props';
4
4
  import type * as aux from '@likec4/core/types/_aux';
5
5
  export interface LikeC4ViewProps<A extends aux.Any> {
6
6
  /**
@@ -58,8 +58,10 @@ export interface LikeC4ViewProps<A extends aux.Any> {
58
58
  /**
59
59
  * Padding around the diagram
60
60
  * @default '8px'
61
+ *
62
+ * @see {@link ViewPadding}
61
63
  */
62
- fitViewPadding?: PaddingWithUnit | undefined;
64
+ fitViewPadding?: ViewPadding | undefined;
63
65
  /**
64
66
  * Display diagram title / description
65
67
  *
@@ -151,9 +153,11 @@ export interface LikeC4BrowserProps {
151
153
  fitViewPadding?: PaddingWithUnit | undefined;
152
154
  /**
153
155
  * Show/hide panel with top left controls,
154
- * @default true
156
+ * - `next` - show navigation panel (Experimental)
157
+ *
158
+ * @default `next`
155
159
  */
156
- controls?: boolean | undefined;
160
+ controls?: boolean | 'next' | undefined;
157
161
  /**
158
162
  * Display diagram title / description
159
163
  *
@@ -25,6 +25,7 @@ export { useCurrentViewId } from '../hooks/useCurrentViewId.js';
25
25
  export { useDiagram, useDiagramContext } from '../hooks/useDiagram.js';
26
26
  export { useDiagramActorRef } from '../hooks/safeContext.js';
27
27
  export { useXYFlow, useXYInternalNode, useXYStore, useXYStoreApi } from '../hooks/useXYFlow.js';
28
+ export { useCurrentViewModel } from '../likec4model/useCurrentViewModel.js';
28
29
  export { useLikeC4Model, useLikeC4Specification, useLikeC4ViewModel } from '../likec4model/useLikeC4Model.js';
29
30
  export { useMantinePortalProps } from '../hooks/useMantinePortalProps.js';
30
31
  export { useSetState } from '../hooks/useSetState.js';
@@ -8,6 +8,7 @@ export { useCurrentViewId } from '../hooks/useCurrentViewId.js';
8
8
  export { useDiagram, useDiagramContext } from '../hooks/useDiagram.js';
9
9
  export { useDiagramActorRef } from '../hooks/safeContext.js';
10
10
  export { useXYFlow, useXYInternalNode, useXYStore, useXYStoreApi } from '../hooks/useXYFlow.js';
11
+ export { useCurrentViewModel } from '../likec4model/useCurrentViewModel.js';
11
12
  export { useLikeC4Model, useLikeC4Specification, useLikeC4ViewModel } from '../likec4model/useLikeC4Model.js';
12
13
  export { useMantinePortalProps } from '../hooks/useMantinePortalProps.js';
13
14
  export { useSetState } from '../hooks/useSetState.js';
@@ -1,2 +1,3 @@
1
- import { FallbackProps } from 'react-error-boundary';
1
+ import { ErrorBoundaryProps, FallbackProps } from 'react-error-boundary';
2
2
  export declare function ErrorFallback({ error, resetErrorBoundary }: FallbackProps): import("react/jsx-runtime").JSX.Element;
3
+ export declare function ErrorBoundary(props: Pick<ErrorBoundaryProps, 'onReset' | 'onError' | 'children'>): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,8 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import { Box } from '@likec4/styles/jsx';
3
3
  import { Notification, ScrollAreaAutosize, Code, Group, Button } from '@mantine/core';
4
- import IconX from '../node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js';
4
+ import { ErrorBoundary as ErrorBoundary$1 } from 'react-error-boundary';
5
+ import IconX from '../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js';
5
6
 
6
7
  function ErrorFallback({ error, resetErrorBoundary }) {
7
8
  const errorString = error instanceof Error ? error.message : "Unknown error";
@@ -25,5 +26,17 @@ function ErrorFallback({ error, resetErrorBoundary }) {
25
26
  }
26
27
  ) });
27
28
  }
29
+ function ErrorBoundary(props) {
30
+ return /* @__PURE__ */ jsx(
31
+ ErrorBoundary$1,
32
+ {
33
+ FallbackComponent: ErrorFallback,
34
+ onError: (err, info) => {
35
+ console.error(err, info);
36
+ },
37
+ ...props
38
+ }
39
+ );
40
+ }
28
41
 
29
- export { ErrorFallback };
42
+ export { ErrorBoundary, ErrorFallback };
@@ -2,8 +2,8 @@ import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import { cx, css, cva } from '@likec4/styles/css';
3
3
  import { CopyButton, Anchor, ActionIcon, Box, Text } from '@mantine/core';
4
4
  import { stopPropagation } from '../utils/xyflow.js';
5
- import IconCheck from '../node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.js';
6
- import IconCopy from '../node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js';
5
+ import IconCheck from '../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.js';
6
+ import IconCopy from '../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js';
7
7
 
8
8
  const link = cva({
9
9
  base: {
@@ -0,0 +1,6 @@
1
+ import { NavLinkProps } from '@mantine/core';
2
+ import { ForwardRefExoticComponent, RefAttributes } from 'react';
3
+ export interface NavigationLinkProps extends NavLinkProps, Omit<React.ComponentPropsWithoutRef<'button'>, keyof NavLinkProps> {
4
+ truncateLabel?: boolean;
5
+ }
6
+ export declare const NavigationLink: ForwardRefExoticComponent<NavigationLinkProps & RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,25 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { cx } from '@likec4/styles/css';
3
+ import { navigationLink } from '@likec4/styles/recipes';
4
+ import { NavLink } from '@mantine/core';
5
+ import { forwardRef } from 'react';
6
+
7
+ const NavigationLink = forwardRef(({ className, truncateLabel = true, ...others }, ref) => /* @__PURE__ */ jsx(
8
+ NavLink,
9
+ {
10
+ ...others,
11
+ component: "button",
12
+ classNames: navigationLink({
13
+ truncateLabel
14
+ }),
15
+ className: cx(
16
+ "group",
17
+ "mantine-active",
18
+ className
19
+ ),
20
+ ref
21
+ }
22
+ ));
23
+ NavigationLink.displayName = "NavigationLink";
24
+
25
+ export { NavigationLink };
@@ -3,7 +3,7 @@ import { cx } from '@likec4/styles/css';
3
3
  import { UnstyledButton, Group, Text } from '@mantine/core';
4
4
  import { isMacOs } from '@xyflow/system';
5
5
  import { placeholder, shortcut, root } from './SearchControl.css.js';
6
- import IconSearch from '../node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js';
6
+ 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';
7
7
 
8
8
  function SearchControl({ className, ...others }) {
9
9
  const isMac = isMacOs();
@@ -4,7 +4,6 @@ export type ControlsCustomLayoutProps = {
4
4
  navigationButtons: ReactNode;
5
5
  search: ReactNode;
6
6
  actionsGroup: ReactNode;
7
- syncInProgressBadge: ReactNode;
8
7
  };
9
8
  export type ControlsCustomLayout = (props: ControlsCustomLayoutProps) => ReactNode;
10
9
  export declare const ControlsCustomLayoutProvider: ({ children, value }: {
@@ -2,8 +2,11 @@ import { ExclusiveUnion } from '@likec4/core/types';
2
2
  import { PropsWithChildren } from 'react';
3
3
  declare const FeatureNames: readonly ["Controls", "ReadOnly", "FocusMode", "NavigateTo", "ElementDetails", "RelationshipDetails", "RelationshipBrowser", "Search", "NavigationButtons", "Notations", "DynamicViewWalkthrough", "EdgeEditing", "ViewTitle", "FitView", "Vscode", "ElementTags"];
4
4
  export type FeatureName = typeof FeatureNames[number];
5
+ type CustomFeatures = {
6
+ enableControls: 'next' | boolean;
7
+ };
5
8
  export type EnabledFeatures = {
6
- [P in `enable${FeatureName}`]: boolean;
9
+ [P in `enable${FeatureName}`]: P extends keyof CustomFeatures ? CustomFeatures[P] : boolean;
7
10
  };
8
11
  export declare const AllDisabled: EnabledFeatures;
9
12
  export declare function DiagramFeatures({ children, features, overrides, }: PropsWithChildren<ExclusiveUnion<{
@@ -1,12 +1,12 @@
1
1
  import { jsx, Fragment } from 'react/jsx-runtime';
2
2
  import { cx } from '@likec4/styles/css';
3
3
  import { useContext, createContext } from 'react';
4
- import IconCylinder from '../node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconCylinder.js';
5
- import IconRectangularPrism from '../node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconRectangularPrism.js';
6
- import IconReorder from '../node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconReorder.js';
7
- import IconUser from '../node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconUser.js';
8
- import IconDeviceMobile from '../node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconDeviceMobile.js';
9
- import IconBrowser from '../node_modules/.pnpm/@tabler_icons-react@3.31.0_react@19.1.0/node_modules/@tabler/icons-react/dist/esm/icons/IconBrowser.js';
4
+ import IconCylinder from '../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconCylinder.js';
5
+ import IconRectangularPrism from '../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconRectangularPrism.js';
6
+ import IconReorder from '../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconReorder.js';
7
+ import IconUser from '../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconUser.js';
8
+ import IconDeviceMobile from '../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconDeviceMobile.js';
9
+ import IconBrowser from '../node_modules/.pnpm/@tabler_icons-react@3.34.1_react@19.1.1/node_modules/@tabler/icons-react/dist/esm/icons/IconBrowser.js';
10
10
 
11
11
  const IconRendererContext = createContext(null);
12
12
  function IconRendererProvider({
@@ -1,10 +1,18 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
- import { useLikeC4Model } from '../likec4model/useLikeC4Model.js';
2
+ import { DEV } from 'esm-env';
3
+ import { useLikeC4ViewModel } from '../likec4model/useLikeC4Model.js';
3
4
  import { customNode } from '../base/primitives/customNode.js';
4
5
 
5
6
  function customDiagramNode(Node) {
6
7
  return customNode((props) => {
7
- const viewModel = useLikeC4Model().view(props.data.viewId);
8
+ const viewModel = useLikeC4ViewModel(props.data.viewId);
9
+ if (!viewModel) {
10
+ if (DEV) {
11
+ throw new Error(`View "${props.data.viewId}" not found, requested by customNode "${props.id}"`);
12
+ }
13
+ console.error(`View "${props.data.viewId}" not found in likec4model`, { props });
14
+ return null;
15
+ }
8
16
  const model = viewModel.node(props.id);
9
17
  return /* @__PURE__ */ jsx(Node, { nodeProps: props, nodeModel: model });
10
18
  });
@@ -4,6 +4,7 @@ export { type EnabledFeatures, type FeatureName, useEnabledFeatures, } from '../
4
4
  export { useCurrentViewId, } from '../hooks/useCurrentViewId';
5
5
  export { type DiagramApi, useDiagram, useDiagramActorRef, useDiagramContext, } from '../hooks/useDiagram';
6
6
  export { useXYFlow, useXYInternalNode, useXYStore, useXYStoreApi, type XYFlowInstance, type XYStoreApi, } from '../hooks/useXYFlow';
7
+ export { useCurrentViewModel, } from '../likec4model/useCurrentViewModel';
7
8
  export { useLikeC4Model, useLikeC4Specification, useLikeC4ViewModel, } from '../likec4model/useLikeC4Model';
8
9
  export { useMantinePortalProps } from '../hooks/useMantinePortalProps';
9
10
  export { useSetState } from '../hooks/useSetState';
@@ -25,6 +25,7 @@ export { useCurrentViewId } from '../hooks/useCurrentViewId.js';
25
25
  export { useDiagram, useDiagramContext } from '../hooks/useDiagram.js';
26
26
  export { useDiagramActorRef } from '../hooks/safeContext.js';
27
27
  export { useXYFlow, useXYInternalNode, useXYStore, useXYStoreApi } from '../hooks/useXYFlow.js';
28
+ export { useCurrentViewModel } from '../likec4model/useCurrentViewModel.js';
28
29
  export { useLikeC4Model, useLikeC4Specification, useLikeC4ViewModel } from '../likec4model/useLikeC4Model.js';
29
30
  export { useMantinePortalProps } from '../hooks/useMantinePortalProps.js';
30
31
  export { useSetState } from '../hooks/useSetState.js';
@@ -5,7 +5,7 @@ import { FeatureName } from '../context/DiagramFeatures';
5
5
  import { OpenSourceParams } from '../LikeC4Diagram.props';
6
6
  import { Types } from '../likec4diagram/types';
7
7
  import { AlignmentMode } from '../state/aligners';
8
- import { DiagramActorEvent, DiagramActorRef, DiagramActorSnapshot, DiagramContext, SyncLayoutActorSnapshot } from '../state/types';
8
+ import { DiagramActorEvent, DiagramActorRef, DiagramActorSnapshot, DiagramContext } from '../state/types';
9
9
  import { useDiagramActorRef } from './safeContext';
10
10
  export { useDiagramActorRef };
11
11
  export interface DiagramApi {
@@ -95,7 +95,6 @@ export interface DiagramApi {
95
95
  */
96
96
  export declare function useDiagram(): DiagramApi;
97
97
  export declare function useDiagramActorSnapshot<T = unknown>(selector: (state: DiagramActorSnapshot) => T, compare?: (a: NoInfer<T>, b: NoInfer<T>) => boolean): T;
98
- export declare function useDiagramSyncLayoutState<T = unknown>(selector: (state: SyncLayoutActorSnapshot) => T, compare?: (a: NoInfer<T>, b: NoInfer<T>) => boolean): T;
99
98
  /**
100
99
  * Read diagram context
101
100
  */
@@ -122,14 +122,10 @@ function useDiagramActorSnapshot(selector, compare = shallowEqual) {
122
122
  const actorRef = useDiagramActorRef();
123
123
  return useSelector(actorRef, useCallbackRef(selector), compare);
124
124
  }
125
- function useDiagramSyncLayoutState(selector, compare = shallowEqual) {
126
- const syncLayoutActorRef = useDiagramActorSnapshot((s) => s.context.syncLayoutActorRef);
127
- return useSelector(syncLayoutActorRef, useCallbackRef(selector), compare);
128
- }
129
125
  function useDiagramContext(selector, compare = shallowEqual, deps) {
130
126
  const actorRef = useDiagramActorRef();
131
127
  const select = useCallback((s) => selector(s.context), deps ?? []);
132
128
  return useSelector(actorRef, select, compare);
133
129
  }
134
130
 
135
- export { useDiagram, useDiagramActorRef, useDiagramActorSnapshot, useDiagramContext, useDiagramSyncLayoutState };
131
+ export { useDiagram, useDiagramActorRef, useDiagramActorSnapshot, useDiagramContext };
package/dist/index.js CHANGED
@@ -10,6 +10,7 @@ export { useCurrentViewId } from './hooks/useCurrentViewId.js';
10
10
  export { useDiagram, useDiagramContext } from './hooks/useDiagram.js';
11
11
  export { useDiagramActorRef } from './hooks/safeContext.js';
12
12
  export { useXYFlow, useXYInternalNode, useXYStore, useXYStoreApi } from './hooks/useXYFlow.js';
13
+ export { useCurrentViewModel } from './likec4model/useCurrentViewModel.js';
13
14
  export { useLikeC4Model, useLikeC4Specification, useLikeC4ViewModel } from './likec4model/useLikeC4Model.js';
14
15
  export { useMantinePortalProps } from './hooks/useMantinePortalProps.js';
15
16
  export { useSetState } from './hooks/useSetState.js';
@@ -5,13 +5,15 @@ import { useSearchActorRef } from '../hooks/useSearchActor.js';
5
5
  import { Overlays } from '../overlays/Overlays.js';
6
6
  import { Search } from '../search/Search.js';
7
7
  import { useEnabledFeatures } from '../context/DiagramFeatures.js';
8
+ import { NavigationPanel } from '../navigationpanel/NavigationPanel.js';
8
9
  import { Controls } from './ui/controls/Controls.js';
9
- import { DiagramTitlePanel } from './ui/diagram-title/DiagramTitlePanel.js';
10
10
  import { NotationPanel } from './ui/notation/NotationPanel.js';
11
+ import { DiagramTitlePanel } from './ui/diagram-title/DiagramTitlePanel.js';
11
12
  import { DynamicViewWalkthrough } from './ui/walkthrough/DynamicViewWalkthrough.js';
12
13
 
13
14
  const DiagramUI = memo(() => {
14
15
  const {
16
+ enableControls,
15
17
  enableViewTitle,
16
18
  enableNotations,
17
19
  enableDynamicViewWalkthrough,
@@ -20,11 +22,13 @@ const DiagramUI = memo(() => {
20
22
  const overlaysActorRef = useOverlaysActorRef();
21
23
  const searchActorRef = useSearchActorRef();
22
24
  return /* @__PURE__ */ jsxs(Fragment, { children: [
23
- /* @__PURE__ */ jsx(Controls, {}),
25
+ enableControls === "next" ? /* @__PURE__ */ jsx(NavigationPanel, {}) : /* @__PURE__ */ jsx(Controls, {}),
24
26
  overlaysActorRef && /* @__PURE__ */ jsx(Overlays, { overlaysActorRef }),
25
- enableViewTitle && /* @__PURE__ */ jsx(DiagramTitlePanel, {}),
26
27
  enableNotations && /* @__PURE__ */ jsx(NotationPanel, {}),
27
- enableDynamicViewWalkthrough && /* @__PURE__ */ jsx(DynamicViewWalkthrough, {}),
28
+ enableControls !== "next" && /* @__PURE__ */ jsxs(Fragment, { children: [
29
+ enableViewTitle && /* @__PURE__ */ jsx(DiagramTitlePanel, {}),
30
+ enableDynamicViewWalkthrough && /* @__PURE__ */ jsx(DynamicViewWalkthrough, {})
31
+ ] }),
28
32
  enableSearch && searchActorRef && /* @__PURE__ */ jsx(Search, { searchActorRef })
29
33
  ] });
30
34
  });
@@ -30,7 +30,7 @@ const selectXYProps = (ctx) => ({
30
30
  }
31
31
  }
32
32
  });
33
- const equalsXYProps = (a, b) => a.initialized === b.initialized && a.pannable === b.pannable && a.zoomable === b.zoomable && a.fitViewPadding === b.fitViewPadding && a.enableFitView === b.enableFitView && a.enableReadOnly === b.enableReadOnly && shallowEqual(a.nodes, b.nodes) && shallowEqual(a.edges, b.edges) && shallowEqual(a.viewport ?? null, b.viewport ?? null);
33
+ const equalsXYProps = (a, b) => a.initialized === b.initialized && a.pannable === b.pannable && a.zoomable === b.zoomable && a.enableFitView === b.enableFitView && a.enableReadOnly === b.enableReadOnly && shallowEqual(a.fitViewPadding, b.fitViewPadding) && shallowEqual(a.nodes, b.nodes) && shallowEqual(a.edges, b.edges) && shallowEqual(a.viewport ?? null, b.viewport ?? null);
34
34
  function LikeC4DiagramXYFlow({
35
35
  background = "dots",
36
36
  nodesDraggable = false,