@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
@@ -0,0 +1,105 @@
1
+ import { resetLastClickedNode, emitEdgeClick, assignFocusedNode, emitPaneClick, assignLastClickedNode, emitNodeClick, openSourceOfFocusedOrLastClickedNode, openElementDetails, emitOpenSource } from './machine.actions.js';
2
+ import { machine, targetState } from './machine.setup.js';
3
+ import { x as xstateActions_cjsExports } from '../../_virtual/xstate-actions.cjs.js';
4
+ import { x as xstateGuards_cjsExports } from '../../_virtual/xstate-guards.cjs.js';
5
+ import { fitDiagram } from './machine.actions.layout.js';
6
+
7
+ const idle = machine.createStateConfig({
8
+ id: targetState.idle.slice(1),
9
+ on: {
10
+ "xyflow.nodeClick": [
11
+ {
12
+ guard: xstateGuards_cjsExports.and([
13
+ "enabled: Readonly",
14
+ "enabled: FocusMode",
15
+ "click: node has connections",
16
+ xstateGuards_cjsExports.or([
17
+ "click: same node",
18
+ "click: selected node"
19
+ ])
20
+ ]),
21
+ actions: [
22
+ assignLastClickedNode(),
23
+ assignFocusedNode(),
24
+ emitNodeClick()
25
+ ],
26
+ target: targetState.focused
27
+ },
28
+ {
29
+ guard: xstateGuards_cjsExports.and([
30
+ "enabled: Readonly",
31
+ "enabled: ElementDetails",
32
+ "click: node has modelFqn",
33
+ xstateGuards_cjsExports.or([
34
+ "click: same node",
35
+ "click: selected node"
36
+ ])
37
+ ]),
38
+ actions: [
39
+ assignLastClickedNode(),
40
+ openSourceOfFocusedOrLastClickedNode(),
41
+ openElementDetails(),
42
+ emitNodeClick()
43
+ ]
44
+ },
45
+ {
46
+ actions: [
47
+ assignLastClickedNode(),
48
+ openSourceOfFocusedOrLastClickedNode(),
49
+ emitNodeClick()
50
+ ]
51
+ }
52
+ ],
53
+ "xyflow.paneClick": {
54
+ actions: [
55
+ resetLastClickedNode(),
56
+ emitPaneClick()
57
+ ]
58
+ },
59
+ "xyflow.paneDblClick": {
60
+ actions: [
61
+ resetLastClickedNode(),
62
+ xstateActions_cjsExports.enqueueActions(({ context, enqueue, check }) => {
63
+ if (check("enabled: FitView")) {
64
+ enqueue(fitDiagram());
65
+ }
66
+ enqueue(
67
+ emitOpenSource({ view: context.view.id })
68
+ );
69
+ })
70
+ ]
71
+ },
72
+ "focus.node": [
73
+ // Focus was initialed by the user searching (autoUnfocus=true) - always allowed
74
+ {
75
+ guard: "focus.node: autoUnfocus",
76
+ actions: assignFocusedNode(),
77
+ target: targetState.focused
78
+ },
79
+ // Regular focus - requires FocusMode to be enabled
80
+ {
81
+ guard: "enabled: FocusMode",
82
+ actions: assignFocusedNode(),
83
+ target: targetState.focused
84
+ }
85
+ ],
86
+ "xyflow.edgeClick": {
87
+ guard: xstateGuards_cjsExports.and([
88
+ "enabled: Readonly",
89
+ "is dynamic view",
90
+ "enabled: DynamicViewWalkthrough",
91
+ "click: selected edge"
92
+ ]),
93
+ actions: [
94
+ resetLastClickedNode(),
95
+ xstateActions_cjsExports.raise(({ event }) => ({
96
+ type: "walkthrough.start",
97
+ stepId: event.edge.id
98
+ })),
99
+ emitEdgeClick()
100
+ ]
101
+ }
102
+ }
103
+ });
104
+
105
+ export { idle };
@@ -1,318 +1,38 @@
1
- import { isStepEdgeId, getParallelStepsPrefix } from '@likec4/core';
2
- import { clamp, first } from 'remeda';
3
- import { assertEvent } from 'xstate';
4
- import { SeqParallelAreaColor } from '../xyflow-sequence/const.js';
5
- import { navigateForward, navigateBack } from './assign.js';
6
- import { cancelFitDiagram, undimEverything, tagHighlight, notationsHighlight, onEdgeDoubleClick, onEdgeMouseLeave, onEdgeMouseEnter, onNodeMouseLeave, onNodeMouseEnter, toggleFeature, ensureSyncLayout, emitOpenSource, openElementDetails, raiseFitDiagram, stopSyncLayout, disableCompareWithLatest, startEditing, resetEdgesControlPoints, stopEditing, layoutAlign, updateActiveWalkthroughState, xyflow, emitEdgeClick, emitWalkthroughStep, emitWalkthroughStarted, emitWalkthroughStopped, focusOnNodesAndEdges, resetLastClickedNode, emitPaneClick, assignFocusedNode, openSourceOfFocusedOrLastClickedNode, emitNodeClick, assignLastClickedNode } from './machine.actions.js';
7
- import { machine } from './machine.setup.js';
1
+ import { updateView, resetLastClickedNode, emitEdgeClick, assignLastClickedNode, emitNodeClick, emitPaneClick, undimEverything, tagHighlight, notationsHighlight, startEditing, onEdgeDoubleClick, stopEditing, onEdgeMouseLeave, onEdgeMouseEnter, onNodeMouseLeave, onNodeMouseEnter, updateFeatures, ensureOverlaysActor, ensureSearchActor, ensureEditorActor, assignToggledFeatures, emitOpenSource, openOverlay, cancelEditing, disableCompareWithLatest, triggerChange, resetEdgesControlPoints, layoutAlign, handleNavigate, closeAllOverlays, closeSearch, stopEditorActor } from './machine.actions.js';
2
+ import { machine, targetState } from './machine.setup.js';
3
+ import { focused } from './machine.state.ready.focused.js';
4
+ import { idle } from './machine.state.ready.idle.js';
5
+ import { printing } from './machine.state.ready.printing.js';
6
+ import { walkthrough } from './machine.state.ready.walkthrough.js';
8
7
  import { typedSystem } from './utils.js';
9
8
  import { x as xstateActions_cjsExports } from '../../_virtual/xstate-actions.cjs.js';
10
9
  import { x as xstateGuards_cjsExports } from '../../_virtual/xstate-guards.cjs.js';
11
- import { Base } from '../../base/Base.js';
10
+ import { setViewport, fitDiagram, cancelFitDiagram, raiseFitDiagram } from './machine.actions.layout.js';
12
11
 
13
- const navigating = "#navigating";
14
- const idle = machine.createStateConfig({
15
- id: "idle",
16
- on: {
17
- "xyflow.nodeClick": [
18
- {
19
- guard: xstateGuards_cjsExports.and([
20
- "enabled: FocusMode",
21
- "click: node has connections",
22
- xstateGuards_cjsExports.or([
23
- "click: same node",
24
- "click: selected node"
25
- ])
26
- ]),
27
- actions: [
28
- assignLastClickedNode(),
29
- assignFocusedNode(),
30
- emitNodeClick()
31
- ],
32
- target: "focused"
33
- },
34
- {
35
- guard: xstateGuards_cjsExports.and([
36
- "enabled: Readonly",
37
- "enabled: ElementDetails",
38
- "click: node has modelFqn",
39
- xstateGuards_cjsExports.or([
40
- "click: same node",
41
- "click: selected node"
42
- ])
43
- ]),
44
- actions: [
45
- assignLastClickedNode(),
46
- openSourceOfFocusedOrLastClickedNode(),
47
- openElementDetails(),
48
- emitNodeClick()
49
- ]
50
- },
51
- {
52
- actions: [
53
- assignLastClickedNode(),
54
- openSourceOfFocusedOrLastClickedNode(),
55
- emitNodeClick()
56
- ]
57
- }
58
- ],
59
- "xyflow.paneClick": {
60
- actions: [
61
- resetLastClickedNode(),
62
- emitPaneClick()
63
- ]
64
- },
65
- "xyflow.paneDblClick": {
66
- actions: [
67
- resetLastClickedNode(),
68
- xyflow.fitDiagram(),
69
- xstateActions_cjsExports.enqueueActions(({ context, enqueue }) => {
70
- enqueue(
71
- emitOpenSource({ view: context.view.id })
72
- );
73
- })
74
- ]
75
- },
76
- "focus.node": {
77
- guard: "enabled: FocusMode",
78
- actions: assignFocusedNode(),
79
- target: "focused"
80
- },
81
- "xyflow.edgeClick": {
82
- guard: xstateGuards_cjsExports.and([
83
- "enabled: Readonly",
84
- "is dynamic view",
85
- "enabled: DynamicViewWalkthrough",
86
- "click: selected edge"
87
- ]),
88
- actions: [
89
- xstateActions_cjsExports.raise(({ event }) => ({
90
- type: "walkthrough.start",
91
- stepId: event.edge.id
92
- })),
93
- emitEdgeClick()
94
- ]
95
- }
96
- }
97
- });
98
- const focused = machine.createStateConfig({
12
+ const ready = machine.createStateConfig({
13
+ initial: "idle",
99
14
  entry: [
100
- focusOnNodesAndEdges(),
101
- xstateActions_cjsExports.assign((s) => ({
102
- viewportBeforeFocus: { ...s.context.viewport }
103
- })),
104
- openSourceOfFocusedOrLastClickedNode(),
105
- xstateActions_cjsExports.spawnChild("hotkeyActorLogic", { id: "hotkey" }),
106
- xyflow.fitFocusedBounds()
15
+ xstateActions_cjsExports.spawnChild("mediaPrintActorLogic", { id: "mediaPrint" }),
16
+ ensureEditorActor(),
17
+ ensureOverlaysActor(),
18
+ ensureSearchActor()
107
19
  ],
108
- exit: xstateActions_cjsExports.enqueueActions(({ enqueue, context }) => {
109
- enqueue.stopChild("hotkey");
110
- if (context.viewportBeforeFocus) {
111
- enqueue(xyflow.setViewport({ viewport: context.viewportBeforeFocus }));
112
- } else {
113
- enqueue.raise({ type: "fitDiagram" }, { id: "fitDiagram", delay: 20 });
114
- }
115
- enqueue(undimEverything());
116
- enqueue.assign({
117
- viewportBeforeFocus: null,
118
- focusedNode: null
119
- });
120
- }),
121
- on: {
122
- "xyflow.nodeClick": [
123
- {
124
- guard: xstateGuards_cjsExports.and([
125
- "click: focused node",
126
- "click: node has modelFqn"
127
- ]),
128
- actions: [
129
- openElementDetails(),
130
- emitNodeClick()
131
- ]
132
- },
133
- {
134
- guard: "click: focused node",
135
- actions: emitNodeClick(),
136
- target: "#idle"
137
- },
138
- {
139
- actions: [
140
- assignLastClickedNode(),
141
- xstateActions_cjsExports.raise(({ event }) => ({
142
- type: "focus.node",
143
- nodeId: event.node.id
144
- })),
145
- emitNodeClick()
146
- ]
147
- }
148
- ],
149
- "focus.node": {
150
- actions: [
151
- assignFocusedNode(),
152
- focusOnNodesAndEdges(),
153
- openSourceOfFocusedOrLastClickedNode(),
154
- xyflow.fitFocusedBounds()
155
- ]
156
- },
157
- "key.esc": {
158
- target: "idle"
159
- },
160
- "xyflow.paneClick": {
161
- actions: [
162
- resetLastClickedNode(),
163
- emitPaneClick()
164
- ],
165
- target: "idle"
166
- },
167
- "notations.unhighlight": {
168
- actions: focusOnNodesAndEdges()
169
- },
170
- "tag.unhighlight": {
171
- actions: focusOnNodesAndEdges()
172
- }
173
- }
174
- });
175
- const walkthrough = machine.createStateConfig({
176
- entry: [
177
- xstateActions_cjsExports.spawnChild("hotkeyActorLogic", { id: "hotkey" }),
178
- xstateActions_cjsExports.assign({
179
- viewportBeforeFocus: ({ context }) => context.viewport,
180
- activeWalkthrough: ({ context, event }) => {
181
- assertEvent(event, "walkthrough.start");
182
- const stepId = event.stepId ?? first(context.xyedges).id;
183
- return {
184
- stepId,
185
- parallelPrefix: getParallelStepsPrefix(stepId)
186
- };
187
- }
188
- }),
189
- updateActiveWalkthroughState(),
190
- xyflow.fitFocusedBounds(),
191
- emitWalkthroughStarted()
20
+ exit: [
21
+ cancelFitDiagram(),
22
+ xstateActions_cjsExports.stopChild("mediaPrint"),
23
+ closeAllOverlays(),
24
+ closeSearch(),
25
+ stopEditorActor()
192
26
  ],
193
- exit: xstateActions_cjsExports.enqueueActions(({ enqueue, context }) => {
194
- enqueue.stopChild("hotkey");
195
- if (context.viewportBeforeFocus) {
196
- enqueue(xyflow.setViewport({ viewport: context.viewportBeforeFocus }));
197
- } else {
198
- enqueue(raiseFitDiagram({ delay: 10 }));
199
- }
200
- if (context.dynamicViewVariant === "sequence" && context.activeWalkthrough?.parallelPrefix) {
201
- enqueue.assign({
202
- xynodes: context.xynodes.map((n) => {
203
- if (n.type === "seq-parallel") {
204
- return Base.setData(n, {
205
- color: SeqParallelAreaColor.default
206
- });
207
- }
208
- return n;
209
- })
210
- });
211
- }
212
- enqueue(undimEverything());
213
- enqueue.assign({
214
- activeWalkthrough: null,
215
- viewportBeforeFocus: null
216
- });
217
- enqueue(emitWalkthroughStopped());
218
- }),
219
- on: {
220
- "key.esc": {
221
- target: "idle"
222
- },
223
- "key.arrow.left": {
224
- actions: xstateActions_cjsExports.raise({ type: "walkthrough.step", direction: "previous" })
225
- },
226
- "key.arrow.right": {
227
- actions: xstateActions_cjsExports.raise({ type: "walkthrough.step", direction: "next" })
228
- },
229
- "walkthrough.step": {
230
- actions: [
231
- xstateActions_cjsExports.assign(({ context, event }) => {
232
- const { stepId } = context.activeWalkthrough;
233
- const stepIndex = context.xyedges.findIndex((e) => e.id === stepId);
234
- const nextStepIndex = clamp(event.direction === "next" ? stepIndex + 1 : stepIndex - 1, {
235
- min: 0,
236
- max: context.xyedges.length - 1
237
- });
238
- if (nextStepIndex === stepIndex) {
239
- return {};
240
- }
241
- const nextStepId = context.xyedges[nextStepIndex].id;
242
- return {
243
- activeWalkthrough: {
244
- stepId: nextStepId,
245
- parallelPrefix: getParallelStepsPrefix(nextStepId)
246
- }
247
- };
248
- }),
249
- updateActiveWalkthroughState(),
250
- xyflow.fitFocusedBounds(),
251
- emitWalkthroughStep()
252
- ]
253
- },
254
- "xyflow.edgeClick": {
255
- actions: [
256
- xstateActions_cjsExports.assign(({ event, context }) => {
257
- if (!isStepEdgeId(event.edge.id) || event.edge.id === context.activeWalkthrough?.stepId) {
258
- return {};
259
- }
260
- return {
261
- activeWalkthrough: {
262
- stepId: event.edge.id,
263
- parallelPrefix: getParallelStepsPrefix(event.edge.id)
264
- }
265
- };
266
- }),
267
- updateActiveWalkthroughState(),
268
- xyflow.fitFocusedBounds(),
269
- emitEdgeClick(),
270
- emitWalkthroughStep()
271
- ]
272
- },
273
- "notations.unhighlight": {
274
- actions: updateActiveWalkthroughState()
275
- },
276
- "tag.unhighlight": {
277
- actions: updateActiveWalkthroughState()
278
- },
279
- "walkthrough.end": {
280
- target: "idle"
281
- },
282
- "xyflow.paneDblClick": {
283
- target: "idle"
284
- },
285
- // We received another view, close overlay and process event again
286
- "update.view": {
287
- guard: "is another view",
288
- actions: xstateActions_cjsExports.raise(({ event }) => event, { delay: 50 }),
289
- target: "idle"
290
- }
291
- }
292
- });
293
- const ready = machine.createStateConfig({
294
- initial: "idle",
27
+ states: {
28
+ idle,
29
+ focused,
30
+ walkthrough,
31
+ printing
32
+ },
295
33
  on: {
296
- "navigate.to": {
297
- guard: "is another view",
298
- actions: xstateActions_cjsExports.assign({
299
- lastOnNavigate: ({ context, event }) => ({
300
- fromView: context.view.id,
301
- toView: event.viewId,
302
- fromNode: event.fromNode ?? null
303
- })
304
- }),
305
- target: navigating
306
- },
307
- "navigate.back": {
308
- guard: ({ context }) => context.navigationHistory.currentIndex > 0,
309
- actions: xstateActions_cjsExports.assign(navigateBack),
310
- target: navigating
311
- },
312
- "navigate.forward": {
313
- guard: ({ context }) => context.navigationHistory.currentIndex < context.navigationHistory.history.length - 1,
314
- actions: xstateActions_cjsExports.assign(navigateForward),
315
- target: navigating
34
+ "navigate.*": {
35
+ actions: handleNavigate()
316
36
  },
317
37
  "layout.align": {
318
38
  guard: "not readonly",
@@ -325,7 +45,7 @@ const ready = machine.createStateConfig({
325
45
  "layout.resetEdgeControlPoints": {
326
46
  guard: "not readonly",
327
47
  actions: [
328
- startEditing("node"),
48
+ startEditing("edge"),
329
49
  resetEdgesControlPoints(),
330
50
  stopEditing(true)
331
51
  ]
@@ -333,14 +53,10 @@ const ready = machine.createStateConfig({
333
53
  "layout.resetManualLayout": {
334
54
  guard: "not readonly",
335
55
  actions: [
336
- stopSyncLayout(),
56
+ cancelEditing(),
337
57
  disableCompareWithLatest(),
338
- ensureSyncLayout(),
339
- xstateActions_cjsExports.emit({
340
- type: "onChange",
341
- change: {
342
- op: "reset-manual-layout"
343
- }
58
+ triggerChange({
59
+ op: "reset-manual-layout"
344
60
  })
345
61
  ]
346
62
  },
@@ -352,40 +68,34 @@ const ready = machine.createStateConfig({
352
68
  ]
353
69
  },
354
70
  "open.elementDetails": {
355
- guard: "enabled: ElementDetails",
356
- actions: openElementDetails()
71
+ actions: openOverlay()
357
72
  },
358
73
  "open.relationshipsBrowser": {
359
- actions: xstateActions_cjsExports.sendTo(({ system }) => typedSystem(system).overlaysActorRef, ({ context, event, self }) => ({
360
- type: "open.relationshipsBrowser",
361
- subject: event.fqn,
362
- viewId: context.view.id,
363
- scope: "view",
364
- closeable: true,
365
- enableChangeScope: true,
366
- enableSelectSubject: true,
367
- openSourceActor: self
368
- }))
74
+ actions: openOverlay()
369
75
  },
370
76
  "open.relationshipDetails": {
371
- actions: xstateActions_cjsExports.sendTo(({ system }) => typedSystem(system).overlaysActorRef, ({ context, event, self }) => ({
372
- type: "open.relationshipDetails",
373
- viewId: context.view.id,
374
- openSourceActor: self,
375
- ...event.params
376
- }))
77
+ actions: openOverlay()
377
78
  },
378
79
  "open.source": {
80
+ guard: "enabled: OpenSource",
379
81
  actions: emitOpenSource()
380
82
  },
381
83
  "walkthrough.start": {
382
84
  guard: "is dynamic view",
383
- target: ".walkthrough"
85
+ target: targetState.walkthrough
384
86
  },
385
87
  "toggle.feature": {
386
88
  actions: [
387
- toggleFeature(),
388
- ensureSyncLayout()
89
+ assignToggledFeatures(),
90
+ ensureEditorActor()
91
+ ]
92
+ },
93
+ "update.features": {
94
+ actions: [
95
+ updateFeatures(),
96
+ ensureOverlaysActor(),
97
+ ensureSearchActor(),
98
+ ensureEditorActor()
389
99
  ]
390
100
  },
391
101
  "xyflow.nodeMouseEnter": {
@@ -401,8 +111,15 @@ const ready = machine.createStateConfig({
401
111
  actions: onEdgeMouseLeave()
402
112
  },
403
113
  "xyflow.edgeDoubleClick": {
404
- guard: "not readonly",
405
- actions: onEdgeDoubleClick()
114
+ guard: xstateGuards_cjsExports.and([
115
+ "not readonly",
116
+ ({ event }) => !!event.edge.data.controlPoints && event.edge.data.controlPoints.length > 0
117
+ ]),
118
+ actions: [
119
+ startEditing("edge"),
120
+ onEdgeDoubleClick(),
121
+ stopEditing(true)
122
+ ]
406
123
  },
407
124
  "notations.highlight": {
408
125
  actions: notationsHighlight()
@@ -422,16 +139,47 @@ const ready = machine.createStateConfig({
422
139
  type: "open",
423
140
  search: event.search
424
141
  }))
142
+ },
143
+ "xyflow.paneClick": {
144
+ actions: [
145
+ resetLastClickedNode(),
146
+ emitPaneClick()
147
+ ]
148
+ },
149
+ "xyflow.nodeClick": {
150
+ actions: [
151
+ assignLastClickedNode(),
152
+ emitNodeClick()
153
+ ]
154
+ },
155
+ "xyflow.edgeClick": {
156
+ actions: [
157
+ resetLastClickedNode(),
158
+ emitEdgeClick()
159
+ ]
160
+ },
161
+ "xyflow.fitDiagram": {
162
+ guard: "enabled: FitView",
163
+ actions: fitDiagram()
164
+ },
165
+ "xyflow.setViewport": {
166
+ actions: setViewport()
167
+ },
168
+ "update.view": [
169
+ // Redirect to navigating state if received another view
170
+ {
171
+ guard: "is another view",
172
+ target: targetState.navigating
173
+ },
174
+ // Otherwise, just update the view in place
175
+ {
176
+ actions: updateView()
177
+ }
178
+ ],
179
+ "media.print.on": {
180
+ target: targetState.printing
425
181
  }
426
- },
427
- exit: [
428
- cancelFitDiagram()
429
- ],
430
- states: {
431
- idle,
432
- focused,
433
- walkthrough
434
182
  }
435
183
  });
436
184
 
437
- export { focused, idle, ready, walkthrough };
185
+ export { ready };