@likec4/diagram 1.44.0 → 1.46.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 (270) hide show
  1. package/bundle/index.js +18847 -17876
  2. package/dist/LikeC4Diagram.d.ts +1 -1
  3. package/dist/LikeC4Diagram.js +15 -12
  4. package/dist/LikeC4Diagram.props.d.ts +13 -20
  5. package/dist/LikeC4ProjectsProvider.js +8 -4
  6. package/dist/LikeC4Styles.js +0 -3
  7. package/dist/LikeC4View.d.ts +3 -3
  8. package/dist/LikeC4View.js +8 -8
  9. package/dist/ReactLikeC4.d.ts +3 -6
  10. package/dist/StaticLikeC4Diagram.js +0 -2
  11. package/dist/base/Base.d.ts +1 -1
  12. package/dist/base/updateEdges.js +25 -15
  13. package/dist/base/updateNodes.d.ts +14 -0
  14. package/dist/base/updateNodes.js +51 -18
  15. package/dist/base-primitives/Markdown.d.ts +30 -4
  16. package/dist/base-primitives/Markdown.js +3 -2
  17. package/dist/base-primitives/NodeHandles.d.ts +2 -1
  18. package/dist/base-primitives/NodeHandles.js +22 -18
  19. package/dist/base-primitives/compound/CompoundActionButton.d.ts +3 -2
  20. package/dist/base-primitives/compound/CompoundActionButton.js +1 -1
  21. package/dist/base-primitives/compound/CompoundDetailsButton.d.ts +3 -2
  22. package/dist/base-primitives/compound/CompoundDetailsButton.js +1 -1
  23. package/dist/base-primitives/edge/EdgeActionButton.d.ts +3 -2
  24. package/dist/base-primitives/edge/EdgeActionButton.js +1 -1
  25. package/dist/base-primitives/edge/EdgeContainer.d.ts +1 -1
  26. package/dist/base-primitives/edge/EdgeContainer.js +6 -4
  27. package/dist/base-primitives/edge/EdgeLabel.d.ts +2 -2
  28. package/dist/base-primitives/edge/EdgeLabel.js +16 -16
  29. package/dist/base-primitives/edge/EdgeLabelContainer.d.ts +1 -1
  30. package/dist/base-primitives/edge/EdgeLabelContainer.js +5 -4
  31. package/dist/base-primitives/edge/EdgePath.js +27 -12
  32. package/dist/base-primitives/element/ElementActionButtons.d.ts +3 -2
  33. package/dist/base-primitives/element/ElementActionButtons.js +3 -3
  34. package/dist/base-primitives/element/ElementData.d.ts +3 -3
  35. package/dist/base-primitives/element/ElementData.js +13 -7
  36. package/dist/base-primitives/element/ElementDetailsButton.d.ts +3 -2
  37. package/dist/base-primitives/element/ElementDetailsButton.js +4 -1
  38. package/dist/base-primitives/element/ElementShape.js +5 -5
  39. package/dist/base-primitives/element/ElementTags.d.ts +6 -4
  40. package/dist/components/ErrorFallback.js +1 -1
  41. package/dist/components/Link.js +2 -2
  42. package/dist/context/DiagramEventHandlers.js +0 -1
  43. package/dist/context/DiagramFeatures.d.ts +2 -1
  44. package/dist/context/DiagramFeatures.js +1 -0
  45. package/dist/context/EnsureMantine.js +2 -1
  46. package/dist/context/IconRenderer.js +6 -6
  47. package/dist/context/TagStylesContext.js +1 -1
  48. package/dist/custom/hooks.d.ts +2 -2
  49. package/dist/custom/index.js +1 -1
  50. package/dist/editor/LikeC4EditorProvider.d.ts +22 -0
  51. package/dist/editor/LikeC4EditorProvider.js +12 -0
  52. package/dist/editor/__tests__/fixture.d.ts +205 -0
  53. package/dist/editor/applyChangesToManualLayout.d.ts +8 -0
  54. package/dist/editor/applyChangesToManualLayout.js +182 -0
  55. package/dist/editor/editorActor.actions.d.ts +201 -0
  56. package/dist/editor/editorActor.actions.js +149 -0
  57. package/dist/editor/editorActor.d.ts +653 -0
  58. package/dist/editor/editorActor.js +324 -0
  59. package/dist/editor/hotkeyActor.d.ts +7 -0
  60. package/dist/editor/hotkeyActor.js +19 -0
  61. package/dist/editor/index.d.ts +3 -2
  62. package/dist/editor/useEditorActorLogic.d.ts +565 -0
  63. package/dist/editor/useEditorActorLogic.js +54 -0
  64. package/dist/hooks/index.d.ts +2 -1
  65. package/dist/hooks/safeContext.d.ts +3 -2
  66. package/dist/hooks/safeContext.js +7 -4
  67. package/dist/hooks/useDiagram.d.ts +4 -2
  68. package/dist/hooks/useDiagram.js +19 -8
  69. package/dist/hooks/useDiagramCompareLayout.d.ts +8 -0
  70. package/dist/hooks/useDiagramCompareLayout.js +29 -4
  71. package/dist/hooks/useLikeC4Project.d.ts +6 -1
  72. package/dist/hooks/useLikeC4Project.js +14 -2
  73. package/dist/hooks/useMediaPrint.d.ts +6 -0
  74. package/dist/index.d.ts +1 -0
  75. package/dist/index.js +1 -0
  76. package/dist/likec4diagram/DiagramXYFlow.js +11 -7
  77. package/dist/likec4diagram/custom/edges/EdgeDrifts.d.ts +6 -0
  78. package/dist/likec4diagram/custom/edges/EdgeDrifts.js +34 -0
  79. package/dist/likec4diagram/custom/edges/RelationshipEdge.js +90 -54
  80. package/dist/likec4diagram/custom/edges/SequenceStepEdge.js +3 -1
  81. package/dist/likec4diagram/custom/edges/edges.css.d.ts +0 -1
  82. package/dist/likec4diagram/custom/edges/edges.css.js +30 -24
  83. package/dist/likec4diagram/custom/edges/useControlPoints.js +5 -5
  84. package/dist/likec4diagram/custom/edges/useRelationshipEdgePath.js +5 -5
  85. package/dist/likec4diagram/custom/nodes/ElementActions.js +2 -2
  86. package/dist/likec4diagram/custom/nodes/NodeDrifts.d.ts +6 -0
  87. package/dist/likec4diagram/custom/nodes/{ElementNodeDrifts.js → NodeDrifts.js} +12 -13
  88. package/dist/likec4diagram/custom/nodes/SequenceActorNode.js +4 -2
  89. package/dist/likec4diagram/custom/nodes/index.d.ts +1 -0
  90. package/dist/likec4diagram/custom/nodes/nodes.js +61 -23
  91. package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.js +2 -2
  92. package/dist/likec4diagram/custom/nodes/toolbar/_shared.js +2 -2
  93. package/dist/likec4diagram/relationship-popover/RelationshipPopover.js +128 -15
  94. package/dist/likec4diagram/relationship-popover/actor.d.ts +1 -1
  95. package/dist/likec4diagram/state/DiagramActorProvider.d.ts +2 -2
  96. package/dist/likec4diagram/state/DiagramActorProvider.js +63 -72
  97. package/dist/likec4diagram/state/assign.d.ts +14 -7
  98. package/dist/likec4diagram/state/assign.js +28 -200
  99. package/dist/likec4diagram/state/createViewChange.js +23 -30
  100. package/dist/likec4diagram/state/diagram-api.d.ts +20 -6
  101. package/dist/likec4diagram/state/diagram-api.js +58 -52
  102. package/dist/likec4diagram/state/hotkeyActor.d.ts +1 -8
  103. package/dist/likec4diagram/state/hotkeyActor.js +13 -17
  104. package/dist/likec4diagram/state/machine.actions.d.ts +1127 -864
  105. package/dist/likec4diagram/state/machine.actions.js +316 -296
  106. package/dist/likec4diagram/state/machine.actions.layout.d.ts +641 -0
  107. package/dist/likec4diagram/state/machine.actions.layout.js +141 -0
  108. package/dist/likec4diagram/state/machine.d.ts +18 -3712
  109. package/dist/likec4diagram/state/machine.js +64 -73
  110. package/dist/likec4diagram/state/machine.setup.d.ts +80 -26
  111. package/dist/likec4diagram/state/machine.setup.js +44 -7
  112. package/dist/likec4diagram/state/machine.state.initializing.d.ts +58 -17
  113. package/dist/likec4diagram/state/machine.state.initializing.js +14 -14
  114. package/dist/likec4diagram/state/machine.state.navigating.d.ts +5 -108
  115. package/dist/likec4diagram/state/machine.state.navigating.js +187 -35
  116. package/dist/likec4diagram/state/machine.state.ready.d.ts +2997 -2598
  117. package/dist/likec4diagram/state/machine.state.ready.focused.d.ts +710 -0
  118. package/dist/likec4diagram/state/machine.state.ready.focused.js +98 -0
  119. package/dist/likec4diagram/state/machine.state.ready.idle.d.ts +540 -0
  120. package/dist/likec4diagram/state/machine.state.ready.idle.js +105 -0
  121. package/dist/likec4diagram/state/machine.state.ready.js +95 -347
  122. package/dist/likec4diagram/state/machine.state.ready.printing.d.ts +140 -0
  123. package/dist/likec4diagram/state/machine.state.ready.printing.js +40 -0
  124. package/dist/likec4diagram/state/machine.state.ready.walkthrough.d.ts +684 -0
  125. package/dist/likec4diagram/state/machine.state.ready.walkthrough.js +190 -0
  126. package/dist/likec4diagram/state/mediaPrintActor.d.ts +12 -0
  127. package/dist/likec4diagram/state/mediaPrintActor.js +18 -0
  128. package/dist/likec4diagram/state/types.d.ts +11 -9
  129. package/dist/likec4diagram/state/utils.d.ts +44 -5
  130. package/dist/likec4diagram/state/utils.js +62 -6
  131. package/dist/likec4diagram/types.d.ts +8 -13
  132. package/dist/likec4diagram/ui/notation/NotationPanel.css.js +5 -2
  133. package/dist/likec4diagram/ui/notation/NotationPanel.js +3 -3
  134. package/dist/likec4diagram/useLayoutConstraints.js +104 -103
  135. package/dist/likec4diagram/xyflow-diagram/diagram-view.js +12 -15
  136. package/dist/likec4diagram/xyflow-sequence/sequence-layout.js +11 -8
  137. package/dist/navigationpanel/NavigationPanel.js +11 -10
  138. package/dist/navigationpanel/NavigationPanelDropdown.js +7 -7
  139. package/dist/navigationpanel/_common.js +1 -1
  140. package/dist/navigationpanel/actor.d.ts +4 -204
  141. package/dist/navigationpanel/actor.js +1 -1
  142. package/dist/navigationpanel/comparepanel/CompareActionsMenu.d.ts +3 -1
  143. package/dist/navigationpanel/comparepanel/CompareActionsMenu.js +40 -14
  144. package/dist/navigationpanel/comparepanel/ComparePanelControls.js +6 -4
  145. package/dist/navigationpanel/comparepanel/LayoutTypeSwitcher.js +2 -2
  146. package/dist/navigationpanel/controls/DetailsControls.js +2 -2
  147. package/dist/navigationpanel/controls/LayoutWarning.js +2 -1
  148. package/dist/navigationpanel/controls/NavigationButtons.js +2 -2
  149. package/dist/navigationpanel/controls/OpenSource.js +1 -1
  150. package/dist/navigationpanel/controls/SearchControl.js +2 -2
  151. package/dist/navigationpanel/controls/ToggleReadonly.js +32 -19
  152. package/dist/navigationpanel/dropdown/ProjectsMenu.js +1 -1
  153. package/dist/navigationpanel/editorpanel/CenterCamera.js +1 -1
  154. package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.js +1 -1
  155. package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.js +9 -9
  156. package/dist/navigationpanel/editorpanel/ToggleReadonly.js +1 -1
  157. package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.js +3 -3
  158. package/dist/navigationpanel/walkthrough/DynamicViewControls.d.ts +9 -9
  159. package/dist/navigationpanel/walkthrough/DynamicViewControls.js +1 -1
  160. package/dist/navigationpanel/walkthrough/WalkthroughPanel.js +4 -3
  161. package/dist/overlays/Overlays.js +24 -12
  162. package/dist/overlays/element-details/ElementDetailsCard.css.js +3 -3
  163. package/dist/overlays/element-details/ElementDetailsCard.js +4 -4
  164. package/dist/overlays/element-details/MetadataValue.d.ts +2 -1
  165. package/dist/overlays/element-details/MetadataValue.js +4 -6
  166. package/dist/overlays/element-details/TabPanelDeployments.js +3 -3
  167. package/dist/overlays/element-details/TabPanelRelationships.js +12 -7
  168. package/dist/overlays/element-details/TabPanelStructure.js +1 -1
  169. package/dist/overlays/element-details/actor.d.ts +8 -83
  170. package/dist/overlays/element-details/actor.js +0 -8
  171. package/dist/overlays/overlay/Overlay.js +10 -10
  172. package/dist/overlays/overlaysActor.d.ts +7 -392
  173. package/dist/overlays/overlaysActor.js +73 -49
  174. package/dist/overlays/relationship-details/RelationshipDetails.js +3 -3
  175. package/dist/overlays/relationship-details/SelectEdge.js +2 -2
  176. package/dist/overlays/relationship-details/_types.d.ts +3 -4
  177. package/dist/overlays/relationship-details/actor.d.ts +6 -562
  178. package/dist/overlays/relationship-details/actor.js +1 -0
  179. package/dist/overlays/relationship-details/custom/ElementActions.js +3 -3
  180. package/dist/overlays/relationship-details/layout-to-xyflow.js +3 -5
  181. package/dist/overlays/relationship-details/layout.d.ts +3 -3
  182. package/dist/overlays/relationship-details/layout.js +4 -4
  183. package/dist/overlays/relationships-browser/RelationshipsBrowser.js +3 -3
  184. package/dist/overlays/relationships-browser/SelectElement.js +2 -2
  185. package/dist/overlays/relationships-browser/_types.d.ts +2 -3
  186. package/dist/overlays/relationships-browser/actor.d.ts +7 -739
  187. package/dist/overlays/relationships-browser/custom/ElementActions.js +3 -3
  188. package/dist/overlays/relationships-browser/layout.d.ts +2 -2
  189. package/dist/overlays/relationships-browser/layout.js +3 -3
  190. package/dist/overlays/relationships-browser/useViewToNodesEdges.js +0 -3
  191. package/dist/overlays/types.d.ts +12 -13
  192. package/dist/search/components/ElementsColumn.js +7 -3
  193. package/dist/search/components/PickView.js +3 -1
  194. package/dist/search/components/SearchByTags.js +1 -1
  195. package/dist/search/components/SearchInput.js +1 -1
  196. package/dist/search/components/ViewsColum.d.ts +3 -1
  197. package/dist/search/components/ViewsColum.js +13 -7
  198. package/dist/search/components/_shared.css.d.ts +1 -1
  199. package/dist/search/searchActor.d.ts +3 -66
  200. package/dist/shadowroot/ShadowRoot.d.ts +5 -7
  201. package/dist/shadowroot/ShadowRoot.js +7 -5
  202. package/dist/shadowroot/styles.css.js +6 -1
  203. package/dist/styles.css2.js +1 -1
  204. package/dist/utils/index.d.ts +2 -2
  205. package/dist/utils/view-bounds.js +7 -6
  206. package/dist/utils/xyflow.d.ts +6 -5
  207. package/dist/utils/xyflow.js +26 -57
  208. package/package.json +24 -23
  209. package/panda.buildinfo.json +65 -71
  210. package/styles-min.css +1 -1
  211. package/styles.css +1 -1
  212. package/dist/base-primitives/edge/edge.css.d.ts +0 -4
  213. package/dist/base-primitives/edge/edge.css.js +0 -71
  214. package/dist/editor/LikeC4EditorContext.d.ts +0 -21
  215. package/dist/likec4diagram/custom/nodes/ElementNodeDrifts.d.ts +0 -4
  216. package/dist/likec4diagram/state/syncManualLayoutActor.d.ts +0 -280
  217. package/dist/likec4diagram/state/syncManualLayoutActor.js +0 -248
  218. package/dist/utils/vector.d.ts +0 -81
  219. package/dist/utils/vector.js +0 -120
  220. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/createReactComponent.js +0 -0
  221. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.js +0 -0
  222. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.js +0 -0
  223. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowDownRight.js +0 -0
  224. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowLeft.js +0 -0
  225. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js +0 -0
  226. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconBolt.js +0 -0
  227. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconBrowser.js +0 -0
  228. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.js +0 -0
  229. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.js +0 -0
  230. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.js +0 -0
  231. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js +0 -0
  232. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js +0 -0
  233. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconCylinder.js +0 -0
  234. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconDeviceMobile.js +0 -0
  235. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconDirectionSignFilled.js +0 -0
  236. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconExternalLink.js +0 -0
  237. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js +0 -0
  238. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconFocusCentered.js +0 -0
  239. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconFolderFilled.js +0 -0
  240. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconHelpCircle.js +0 -0
  241. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js +0 -0
  242. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.js +0 -0
  243. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignBottom.js +0 -0
  244. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignCenter.js +0 -0
  245. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignLeft.js +0 -0
  246. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignMiddle.js +0 -0
  247. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignRight.js +0 -0
  248. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignTop.js +0 -0
  249. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutBoardSplit.js +0 -0
  250. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutCollage.js +0 -0
  251. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutDashboard.js +0 -0
  252. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLink.js +0 -0
  253. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLock.js +0 -0
  254. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconLockOpen2.js +0 -0
  255. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerPlayFilled.js +0 -0
  256. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipBackFilled.js +0 -0
  257. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipForwardFilled.js +0 -0
  258. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerStopFilled.js +0 -0
  259. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconRectangularPrism.js +0 -0
  260. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconReorder.js +0 -0
  261. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.js +0 -0
  262. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js +0 -0
  263. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.js +0 -0
  264. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconStack2.js +0 -0
  265. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconStarFilled.js +0 -0
  266. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconTarget.js +0 -0
  267. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.js +0 -0
  268. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconUser.js +0 -0
  269. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js +0 -0
  270. /package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.35.0_react@19.2.1}/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js +0 -0
@@ -1,5 +1,5 @@
1
1
  import { LayoutedView, ViewId } from '@likec4/core/types';
2
- import { ActorRefFromLogic, SnapshotFrom, StateMachine, Values, NonReducibleUnknown, MetaObject, AnyActorLogic, ConditionalRequired, InputFrom, RequiredLogicInput, IsNotNever, ActorRef, MachineSnapshot, AnyActorRef, StateValue, AnyEventObject, ActionFunction } from 'xstate';
2
+ import { ActorRef, SnapshotFrom, StateMachine } from 'xstate';
3
3
  import { CurrentViewModel } from '../hooks/useCurrentViewModel';
4
4
  export interface NavigationPanelActorInput {
5
5
  view: LayoutedView;
@@ -90,211 +90,11 @@ export interface NavigationPanelActorContext {
90
90
  selectedFolder: string;
91
91
  searchQuery: string;
92
92
  }
93
- declare const _actorLogic: StateMachine<NavigationPanelActorContext, NavigationPanelActorEvent, {}, never, Values<{
94
- "update activatedBy": {
95
- type: "update activatedBy";
96
- params: NonReducibleUnknown;
97
- };
98
- "keep dropdown open": {
99
- type: "keep dropdown open";
100
- params: NonReducibleUnknown;
101
- };
102
- "update selected folder": {
103
- type: "update selected folder";
104
- params: NonReducibleUnknown;
105
- };
106
- "reset selected folder": {
107
- type: "reset selected folder";
108
- params: NonReducibleUnknown;
109
- };
110
- "update inputs": {
111
- type: "update inputs";
112
- params: NonReducibleUnknown;
113
- };
114
- "reset search query": {
115
- type: "reset search query";
116
- params: NonReducibleUnknown;
117
- };
118
- "update search query": {
119
- type: "update search query";
120
- params: NonReducibleUnknown;
121
- };
122
- "emit navigateTo": {
123
- type: "emit navigateTo";
124
- params: NonReducibleUnknown;
125
- };
126
- }>, Values<{
127
- "was opened on hover": {
128
- type: "was opened on hover";
129
- params: unknown;
130
- };
131
- "has search query": {
132
- type: "has search query";
133
- params: unknown;
134
- };
135
- "search query is empty": {
136
- type: "search query is empty";
137
- params: unknown;
138
- };
139
- }>, "open timeout" | "close timeout", "pending" | "idle" | {
140
- active: "search" | "opened" | "closing" | "decide";
141
- }, "active", NavigationPanelActorInput, NonReducibleUnknown, NavigationPanelActorEmitted, MetaObject, {
142
- readonly id: "breadcrumbs";
143
- readonly context: ({ input }: {
144
- spawn: {
145
- <TSrc extends never>(logic: TSrc, ...[options]: never): ActorRefFromLogic<never>;
146
- <TLogic extends AnyActorLogic>(src: TLogic, ...[options]: ConditionalRequired<[options?: {
147
- id?: never;
148
- systemId?: string;
149
- input?: InputFrom<TLogic>;
150
- syncSnapshot?: boolean;
151
- } & { [K in RequiredLogicInput<TLogic>]: unknown; }], IsNotNever<RequiredLogicInput<TLogic>>>): ActorRefFromLogic<TLogic>;
152
- };
153
- input: NavigationPanelActorInput;
154
- self: ActorRef<MachineSnapshot<NavigationPanelActorContext, NavigationPanelActorEvent, Record<string, AnyActorRef | undefined>, StateValue, string, unknown, any, any>, NavigationPanelActorEvent, AnyEventObject>;
155
- }) => {
156
- breadcrumbs: never[];
157
- activatedBy: "hover";
158
- selectedFolder: string;
159
- searchQuery: string;
160
- folderColumns: never[];
161
- view: LayoutedView;
162
- viewModel: CurrentViewModel | null;
163
- };
164
- readonly initial: "idle";
165
- readonly entry: readonly ["update activatedBy", "reset selected folder"];
166
- readonly on: {
167
- readonly 'update.inputs': {
168
- readonly actions: "update inputs";
169
- };
170
- readonly 'searchQuery.change': {
171
- readonly actions: readonly ["update search query", ActionFunction<NavigationPanelActorContext, {
172
- type: "searchQuery.change";
173
- value: string;
174
- }, NavigationPanelActorEvent, undefined, never, never, never, "open timeout" | "close timeout", never>];
175
- };
176
- };
177
- readonly states: {
178
- readonly idle: {
179
- readonly id: "idle";
180
- readonly on: {
181
- readonly 'breadcrumbs.mouseEnter.*': {
182
- readonly target: "pending";
183
- readonly actions: "update activatedBy";
184
- };
185
- readonly 'breadcrumbs.click.*': {
186
- readonly target: "active";
187
- readonly actions: "update activatedBy";
188
- };
189
- };
190
- };
191
- readonly pending: {
192
- readonly on: {
193
- readonly 'breadcrumbs.mouseEnter.*': {
194
- readonly actions: "update activatedBy";
195
- };
196
- readonly 'breadcrumbs.mouseLeave.*': {
197
- readonly target: "idle";
198
- };
199
- readonly 'breadcrumbs.click.*': {
200
- readonly target: "active";
201
- readonly actions: "update activatedBy";
202
- };
203
- };
204
- readonly after: {
205
- readonly 'open timeout': {
206
- readonly target: "active";
207
- };
208
- };
209
- };
210
- readonly active: {
211
- readonly tags: readonly ["active"];
212
- readonly initial: "decide";
213
- readonly on: {
214
- readonly 'dropdown.dismiss': {
215
- readonly target: "#idle";
216
- };
217
- readonly 'breadcrumbs.mouseLeave': {
218
- readonly guard: "was opened on hover";
219
- readonly target: ".closing";
220
- };
221
- readonly 'dropdown.mouseLeave': {
222
- readonly guard: "was opened on hover";
223
- readonly target: ".closing";
224
- };
225
- readonly 'searchQuery.changed': {
226
- readonly target: ".decide";
227
- };
228
- };
229
- readonly states: {
230
- readonly decide: {
231
- readonly always: readonly [{
232
- readonly guard: "has search query";
233
- readonly target: "search";
234
- }, {
235
- readonly target: "opened";
236
- }];
237
- };
238
- readonly opened: {
239
- readonly on: {
240
- readonly 'searchQuery.changed': {
241
- readonly guard: "has search query";
242
- readonly actions: "keep dropdown open";
243
- readonly target: "search";
244
- };
245
- readonly 'breadcrumbs.click.viewtitle': {
246
- readonly actions: "reset selected folder";
247
- };
248
- readonly 'breadcrumbs.click.*': {
249
- readonly actions: "update selected folder";
250
- };
251
- readonly 'select.folder': {
252
- readonly actions: readonly ["keep dropdown open", "update selected folder"];
253
- };
254
- readonly 'select.view': {
255
- readonly actions: readonly ["emit navigateTo"];
256
- };
257
- };
258
- };
259
- readonly search: {
260
- readonly on: {
261
- readonly 'breadcrumbs.click.viewtitle': {
262
- readonly actions: readonly ["reset search query", "reset selected folder"];
263
- readonly target: "opened";
264
- };
265
- readonly 'breadcrumbs.click.*': {
266
- readonly actions: readonly ["reset search query", "update selected folder"];
267
- readonly target: "opened";
268
- };
269
- readonly 'select.view': {
270
- readonly actions: readonly ["emit navigateTo"];
271
- };
272
- };
273
- };
274
- readonly closing: {
275
- readonly on: {
276
- readonly 'breadcrumbs.mouseEnter.*': {
277
- readonly target: "decide";
278
- };
279
- readonly 'dropdown.mouseEnter': {
280
- readonly target: "decide";
281
- };
282
- };
283
- readonly after: {
284
- readonly 'close timeout': {
285
- readonly target: "#idle";
286
- };
287
- };
288
- };
289
- };
290
- };
291
- };
292
- }>;
293
- type InferredMachine = typeof _actorLogic;
294
- export interface NavigationPanelActorLogic extends InferredMachine {
93
+ type Tags = 'active';
94
+ export interface NavigationPanelActorLogic extends StateMachine<NavigationPanelActorContext, NavigationPanelActorEvent, {}, any, any, any, any, any, Tags, NavigationPanelActorInput, any, NavigationPanelActorEmitted, any, any> {
295
95
  }
296
96
  export declare const navigationPanelActorLogic: NavigationPanelActorLogic;
297
97
  export type NavigationPanelActorSnapshot = SnapshotFrom<NavigationPanelActorLogic>;
298
- export interface NavigationPanelActorRef extends ActorRefFromLogic<NavigationPanelActorLogic> {
98
+ export interface NavigationPanelActorRef extends ActorRef<NavigationPanelActorSnapshot, NavigationPanelActorEvent, NavigationPanelActorEmitted> {
299
99
  }
300
100
  export {};
@@ -5,7 +5,7 @@ const _actorLogic = setup({
5
5
  types: {
6
6
  context: {},
7
7
  events: {},
8
- tags: "active",
8
+ tags: "",
9
9
  input: {},
10
10
  emitted: {}
11
11
  },
@@ -1,3 +1,5 @@
1
- export declare function CompareActionsMenu({ onResetManualLayout, }: {
1
+ export declare function CompareActionsMenu({ disabled, onApplyLatestToManual, onResetManualLayout, }: {
2
+ disabled?: boolean;
3
+ onApplyLatestToManual?: undefined | (() => void);
2
4
  onResetManualLayout: () => void;
3
5
  }): import("react/jsx-runtime").JSX.Element;
@@ -1,12 +1,15 @@
1
- import { jsxs, jsx } from 'react/jsx-runtime';
1
+ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
2
  import { cx } from '@likec4/styles/css';
3
3
  import { Box } from '@likec4/styles/jsx';
4
4
  import { hstack } from '@likec4/styles/patterns';
5
- import { navigationPanelActionIcon } from '@likec4/styles/recipes';
6
- import { Menu, UnstyledButton, Badge } from '@mantine/core';
7
- import IconChevronDown from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.js';
5
+ import { Menu, UnstyledButton, Tooltip } from '@mantine/core';
6
+ import IconChevronDown from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.js';
7
+ import { stopPropagation } from '../../utils/xyflow.js';
8
+ import IconInfoCircle from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.js';
8
9
 
9
10
  function CompareActionsMenu({
11
+ disabled = false,
12
+ onApplyLatestToManual,
10
13
  onResetManualLayout
11
14
  }) {
12
15
  return /* @__PURE__ */ jsxs(
@@ -17,27 +20,22 @@ function CompareActionsMenu({
17
20
  shadow: "lg",
18
21
  position: "bottom-start",
19
22
  offset: { mainAxis: 4 },
23
+ disabled,
20
24
  children: [
21
25
  /* @__PURE__ */ jsx(Menu.Target, { children: /* @__PURE__ */ jsxs(
22
26
  UnstyledButton,
23
27
  {
28
+ disabled,
24
29
  className: cx(
25
30
  "mantine-active",
26
- navigationPanelActionIcon({
27
- variant: "default"
28
- }),
29
31
  hstack({
30
32
  gap: "2",
31
33
  py: "1.5",
32
34
  px: "2",
33
35
  lineHeight: "1",
34
- rounded: "sm",
35
36
  textStyle: "xs",
36
37
  fontWeight: "medium",
37
- color: {
38
- base: "likec4.panel.action",
39
- _hover: "likec4.panel.action.hover"
40
- },
38
+ layerStyle: "likec4.panel.action",
41
39
  userSelect: "none"
42
40
  })
43
41
  ),
@@ -48,8 +46,36 @@ function CompareActionsMenu({
48
46
  }
49
47
  ) }),
50
48
  /* @__PURE__ */ jsxs(Menu.Dropdown, { children: [
51
- /* @__PURE__ */ jsx(Menu.Item, { disabled: true, rightSection: /* @__PURE__ */ jsx(Badge, { size: "xs", radius: "sm", children: "Soon" }), children: "Apply changes" }),
52
- /* @__PURE__ */ jsx(Menu.Item, { fz: "sm", onClick: onResetManualLayout, children: "Reset manual layout" })
49
+ /* @__PURE__ */ jsxs(
50
+ Menu.Item,
51
+ {
52
+ disabled: !onApplyLatestToManual,
53
+ onClick: onApplyLatestToManual,
54
+ rightSection: onApplyLatestToManual && /* @__PURE__ */ jsx(
55
+ Tooltip,
56
+ {
57
+ onClick: stopPropagation,
58
+ position: "right-start",
59
+ label: /* @__PURE__ */ jsxs(Fragment, { children: [
60
+ "Applies changes from the latest auto-layouted",
61
+ /* @__PURE__ */ jsx("br", {}),
62
+ "to saved snapshot, preserving (as possible)",
63
+ /* @__PURE__ */ jsx("br", {}),
64
+ "manual adjustments.",
65
+ /* @__PURE__ */ jsx("br", {}),
66
+ /* @__PURE__ */ jsx("br", {}),
67
+ "You can undo this action."
68
+ ] }),
69
+ children: /* @__PURE__ */ jsx(IconInfoCircle, { size: 14, stroke: 1.7, opacity: 0.5 })
70
+ }
71
+ ),
72
+ children: [
73
+ "Sync with latest",
74
+ !onApplyLatestToManual && /* @__PURE__ */ jsx(Box, { textStyle: "xs", children: "view type is changed" })
75
+ ]
76
+ }
77
+ ),
78
+ /* @__PURE__ */ jsx(Menu.Item, { onClick: onResetManualLayout, children: "Remove manual layout" })
53
79
  ] })
54
80
  ]
55
81
  }
@@ -5,7 +5,7 @@ import { useDiagramCompareLayout } from '../../hooks/useDiagramCompareLayout.js'
5
5
  import { PanelActionIcon } from '../_common.js';
6
6
  import { CompareActionsMenu } from './CompareActionsMenu.js';
7
7
  import { LayoutTypeSwitcher } from './LayoutTypeSwitcher.js';
8
- import IconX from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js';
8
+ import IconX from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js';
9
9
 
10
10
  const Divider = Divider$1.withProps({
11
11
  mx: 2,
@@ -13,7 +13,7 @@ const Divider = Divider$1.withProps({
13
13
  orientation: "vertical"
14
14
  });
15
15
  function ComparePanelControls() {
16
- const [ctx, { toggleCompare, switchLayout, resetManualLayout }] = useDiagramCompareLayout();
16
+ const [ctx, { toggleCompare, switchLayout, resetManualLayout, applyLatestToManual }] = useDiagramCompareLayout();
17
17
  return /* @__PURE__ */ jsxs(Fragment, { children: [
18
18
  /* @__PURE__ */ jsx(
19
19
  Box,
@@ -33,12 +33,14 @@ function ComparePanelControls() {
33
33
  onChange: switchLayout
34
34
  }
35
35
  ),
36
- ctx.isEditable && /* @__PURE__ */ jsxs(HStack, { gap: "1", children: [
36
+ ctx.hasEditor && /* @__PURE__ */ jsxs(HStack, { gap: "1", children: [
37
37
  /* @__PURE__ */ jsx(Divider, {}),
38
38
  /* @__PURE__ */ jsx(
39
39
  CompareActionsMenu,
40
40
  {
41
- onResetManualLayout: resetManualLayout
41
+ disabled: ctx.layout === "auto",
42
+ onResetManualLayout: resetManualLayout,
43
+ onApplyLatestToManual: ctx.canApplyLatest ? applyLatestToManual : void 0
42
44
  }
43
45
  ),
44
46
  /* @__PURE__ */ jsx(Divider, {})
@@ -10,8 +10,8 @@ function LayoutTypeSwitcher({
10
10
  onChange
11
11
  }) {
12
12
  const data = useMemo(() => [
13
- { value: "manual", label: "Saved" },
14
- { value: "auto", label: "Latest" }
13
+ { value: "manual", label: "Saved manual" },
14
+ { value: "auto", label: "Latest auto" }
15
15
  ], []);
16
16
  return /* @__PURE__ */ jsx(m.div, { layout: "position", children: /* @__PURE__ */ jsx(
17
17
  SegmentedControl,
@@ -12,8 +12,8 @@ import { Link } from '../../components/Link.js';
12
12
  import { useOnDiagramEvent } from '../../hooks/useDiagram.js';
13
13
  import { useMantinePortalProps } from '../../hooks/useMantinePortalProps.js';
14
14
  import { useNavigationActorSnapshot } from '../hooks.js';
15
- import IconId from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js';
16
- import IconLink from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLink.js';
15
+ import IconId from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js';
16
+ import IconLink from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLink.js';
17
17
  import { useDiagram } from '../../hooks/safeContext.js';
18
18
  import { ElementTag } from '../../base-primitives/element/ElementTags.js';
19
19
  import { Markdown } from '../../base-primitives/Markdown.js';
@@ -8,7 +8,7 @@ import * as m from 'motion/react-m';
8
8
  import { memo, Fragment as Fragment$1 } from 'react';
9
9
  import { useDiagramCompareLayout } from '../../hooks/useDiagramCompareLayout.js';
10
10
  import { useMantinePortalProps } from '../../hooks/useMantinePortalProps.js';
11
- import IconAlertTriangle from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.js';
11
+ import IconAlertTriangle from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.js';
12
12
 
13
13
  const LayoutWarning = memo(() => {
14
14
  const [ctx, { toggleCompare }] = useDiagramCompareLayout();
@@ -33,6 +33,7 @@ const LayoutWarning = memo(() => {
33
33
  component: m.button,
34
34
  layout: "position",
35
35
  onClick: (e) => {
36
+ e.stopPropagation();
36
37
  toggleCompare();
37
38
  },
38
39
  whileTap: {
@@ -4,8 +4,8 @@ import * as m from 'motion/react-m';
4
4
  import { useDiagramContext } from '../../hooks/useDiagram.js';
5
5
  import { PanelActionIcon } from '../_common.js';
6
6
  import { useDiagram } from '../../hooks/safeContext.js';
7
- import IconArrowLeft from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowLeft.js';
8
- import IconArrowRight from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js';
7
+ import IconArrowLeft from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowLeft.js';
8
+ import IconArrowRight from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js';
9
9
 
10
10
  const NavigationButtons = () => {
11
11
  const diagram = useDiagram();
@@ -3,7 +3,7 @@ import { useDiagramEventHandlers } from '../../context/DiagramEventHandlers.js';
3
3
  import { useEnabledFeatures } from '../../context/DiagramFeatures.js';
4
4
  import { useCurrentViewId } from '../../hooks/useCurrentView.js';
5
5
  import { Tooltip, PanelActionIcon } from '../_common.js';
6
- import IconFileSymlink from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js';
6
+ import IconFileSymlink from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js';
7
7
 
8
8
  const OpenSource = () => {
9
9
  const viewId = useCurrentViewId();
@@ -11,7 +11,7 @@ import '@xstate/react';
11
11
  import 'fast-equals';
12
12
  import { useDiagram } from '../../hooks/safeContext.js';
13
13
  import { useEnabledFeatures } from '../../context/DiagramFeatures.js';
14
- import IconSearch from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js';
14
+ import IconSearch from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js';
15
15
 
16
16
  const SearchControl = memo(() => {
17
17
  const { enableSearch, enableCompareWithLatest } = useEnabledFeatures();
@@ -37,7 +37,7 @@ const SearchControl = memo(() => {
37
37
  paddingInline: "sm",
38
38
  paddingBlock: "xxs",
39
39
  userSelect: "none",
40
- layerStyle: "likec4.panel.action",
40
+ layerStyle: "likec4.panel.action.filled",
41
41
  display: {
42
42
  base: "none",
43
43
  "@/md": "flex"
@@ -4,30 +4,41 @@ import { hstack } from '@likec4/styles/patterns';
4
4
  import { UnstyledButton } from '@mantine/core';
5
5
  import { AnimatePresence } from 'motion/react';
6
6
  import * as m from 'motion/react-m';
7
+ import { isTruthy } from 'remeda';
7
8
  import { useDiagramContext } from '../../hooks/useDiagram.js';
9
+ import { deriveToggledFeatures } from '../../likec4diagram/state/machine.setup.js';
8
10
  import { useDiagram } from '../../hooks/safeContext.js';
9
- import IconLock from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLock.js';
10
- import IconLockOpen2 from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLockOpen2.js';
11
+ import IconLockOpen2 from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLockOpen2.js';
12
+ import IconLock from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLock.js';
11
13
 
12
- const selector = (ctx) => ({
13
- visible: ctx.features.enableReadOnly !== true && // Disable toggle in sequence mode
14
- (ctx.view._type !== "dynamic" || ctx.dynamicViewVariant !== "sequence"),
15
- isReadOnly: ctx.toggledFeatures.enableReadOnly ?? ctx.features.enableReadOnly
16
- });
14
+ const selector = (ctx) => {
15
+ const toggledFeatures = deriveToggledFeatures(ctx);
16
+ const comparingLatest = toggledFeatures.enableCompareWithLatest && !!ctx.view.drifts && ctx.view._layout === "auto";
17
+ const sequenceLayoutActive = ctx.view._type === "dynamic" && ctx.dynamicViewVariant === "sequence";
18
+ const noActiveWalkthrough = !isTruthy(ctx.activeWalkthrough);
19
+ const hasEditor = ctx.features.enableEditor;
20
+ return {
21
+ visible: hasEditor && noActiveWalkthrough,
22
+ disabled: comparingLatest || sequenceLayoutActive,
23
+ isReadOnly: ctx.toggledFeatures.enableReadOnly ?? false
24
+ };
25
+ };
17
26
  const ToggleReadonly = () => {
18
- const { visible, isReadOnly } = useDiagramContext(selector);
27
+ const { visible, disabled, isReadOnly } = useDiagramContext(selector);
19
28
  const diagram = useDiagram();
20
29
  return /* @__PURE__ */ jsx(AnimatePresence, { mode: "popLayout", children: visible && /* @__PURE__ */ jsxs(
21
30
  UnstyledButton,
22
31
  {
23
32
  component: m.button,
24
33
  layout: "position",
34
+ layoutDependency: isReadOnly,
35
+ disabled,
25
36
  onClick: (e) => {
26
37
  e.stopPropagation();
27
- diagram.toggleFeature("ReadOnly");
38
+ !disabled && diagram.toggleFeature("ReadOnly");
28
39
  },
29
40
  initial: { opacity: 0, scale: 0.6 },
30
- animate: { opacity: 1, scale: 1 },
41
+ animate: { opacity: 1, scale: disabled ? 0.95 : 1 },
31
42
  exit: { opacity: 0, scale: 0.6 },
32
43
  whileTap: {
33
44
  translateY: 1
@@ -38,21 +49,20 @@ const ToggleReadonly = () => {
38
49
  gap: "0.5",
39
50
  paddingInline: "xxs",
40
51
  paddingBlock: "xxs",
41
- rounded: "sm",
42
52
  userSelect: "none",
43
- cursor: "pointer",
44
- color: {
45
- base: "likec4.panel.action",
46
- _hover: "likec4.panel.action.hover"
47
- },
53
+ layerStyle: "likec4.panel.action",
48
54
  backgroundColor: {
49
- _hover: "likec4.panel.action.bg.hover"
55
+ base: "none",
56
+ _notDisabled: {
57
+ _hover: "likec4.panel.action.bg.hover"
58
+ }
50
59
  }
51
60
  })
52
61
  ),
53
62
  children: [
54
- isReadOnly ? /* @__PURE__ */ jsx(IconLock, { size: 14, stroke: 2 }) : /* @__PURE__ */ jsx(IconLockOpen2, { size: 14, stroke: 2 }),
55
- isReadOnly && /* @__PURE__ */ jsx(
63
+ /* @__PURE__ */ jsx(IconLockOpen2, { size: 14, stroke: 2, style: { display: isReadOnly ? "none" : void 0 } }),
64
+ /* @__PURE__ */ jsx(IconLock, { size: 14, stroke: 2, style: { display: !isReadOnly ? "none" : void 0 } }),
65
+ /* @__PURE__ */ jsx(
56
66
  m.div,
57
67
  {
58
68
  className: css({
@@ -61,6 +71,9 @@ const ToggleReadonly = () => {
61
71
  lineHeight: 1,
62
72
  opacity: 0.8
63
73
  }),
74
+ style: {
75
+ display: isReadOnly ? "block" : "none"
76
+ },
64
77
  children: "Edit"
65
78
  }
66
79
  )
@@ -4,7 +4,7 @@ import { HStack, Box } from '@likec4/styles/jsx';
4
4
  import { Menu, MenuTarget, Button, MenuDropdown, MenuItem } from '@mantine/core';
5
5
  import { memo } from 'react';
6
6
  import { useLikeC4ProjectsContext, useLikeC4ProjectId } from '../../hooks/useLikeC4Project.js';
7
- import IconChevronDown from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.js';
7
+ import IconChevronDown from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.js';
8
8
 
9
9
  const ProjectsMenu = memo((_) => {
10
10
  const { projects, onProjectChange } = useLikeC4ProjectsContext();
@@ -5,7 +5,7 @@ import 'react';
5
5
  import { useDiagram } from '../../hooks/safeContext.js';
6
6
  import { PanelActionIcon } from '../_common.js';
7
7
  import { Tooltip } from './_common.js';
8
- import IconFocusCentered from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconFocusCentered.js';
8
+ import IconFocusCentered from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconFocusCentered.js';
9
9
 
10
10
  const CenterCamera = () => {
11
11
  const diagram = useDiagram();
@@ -8,7 +8,7 @@ import { PanelActionIcon } from '../_common.js';
8
8
  import { Tooltip } from './_common.js';
9
9
  import { autolayoutIndicator, autolayoutButton, spacingSliderBody, spacingSliderThumb } from './styles.js';
10
10
  import { useDiagram } from '../../hooks/safeContext.js';
11
- import IconLayoutDashboard from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutDashboard.js';
11
+ import IconLayoutDashboard from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutDashboard.js';
12
12
 
13
13
  const selector = (state) => ({
14
14
  viewId: state.view.id,
@@ -9,15 +9,15 @@ import { useDiagram } from '../../hooks/safeContext.js';
9
9
  import { useMantinePortalProps } from '../../hooks/useMantinePortalProps.js';
10
10
  import { PanelActionIcon } from '../_common.js';
11
11
  import { Tooltip } from './_common.js';
12
- import IconLayoutCollage from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutCollage.js';
13
- import IconLayoutBoardSplit from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutBoardSplit.js';
14
- import IconLayoutAlignLeft from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignLeft.js';
15
- import IconLayoutAlignCenter from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignCenter.js';
16
- import IconLayoutAlignRight from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignRight.js';
17
- import IconLayoutAlignTop from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignTop.js';
18
- import IconLayoutAlignMiddle from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignMiddle.js';
19
- import IconLayoutAlignBottom from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignBottom.js';
20
- import IconRouteOff from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.js';
12
+ import IconLayoutCollage from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutCollage.js';
13
+ import IconLayoutBoardSplit from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutBoardSplit.js';
14
+ import IconLayoutAlignLeft from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignLeft.js';
15
+ import IconLayoutAlignCenter from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignCenter.js';
16
+ import IconLayoutAlignRight from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignRight.js';
17
+ import IconLayoutAlignTop from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignTop.js';
18
+ import IconLayoutAlignMiddle from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignMiddle.js';
19
+ import IconLayoutAlignBottom from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignBottom.js';
20
+ import IconRouteOff from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.js';
21
21
 
22
22
  const Action = ({
23
23
  label,
@@ -5,7 +5,7 @@ import 'react';
5
5
  import { useDiagram } from '../../hooks/safeContext.js';
6
6
  import { PanelActionIcon } from '../_common.js';
7
7
  import { Tooltip } from './_common.js';
8
- import IconLockOpen2 from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconLockOpen2.js';
8
+ import IconLockOpen2 from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconLockOpen2.js';
9
9
 
10
10
  const ToggleReadonly = () => {
11
11
  const diagram = useDiagram();
@@ -8,9 +8,9 @@ import { isTruthy } from 'remeda';
8
8
  import { useDiagramContext } from '../../hooks/useDiagram.js';
9
9
  import { TriggerWalkthroughButton } from './DynamicViewControls.js';
10
10
  import { useDiagram } from '../../hooks/safeContext.js';
11
- import IconPlayerStopFilled from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerStopFilled.js';
12
- import IconPlayerSkipBackFilled from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipBackFilled.js';
13
- import IconPlayerSkipForwardFilled from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipForwardFilled.js';
11
+ import IconPlayerStopFilled from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerStopFilled.js';
12
+ import IconPlayerSkipBackFilled from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipBackFilled.js';
13
+ import IconPlayerSkipForwardFilled from '../../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.1/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipForwardFilled.js';
14
14
  import { useMantinePortalProps } from '../../hooks/useMantinePortalProps.js';
15
15
 
16
16
  const PrevNextButton = Button.withProps({