@likec4/diagram 1.45.0 → 1.46.2

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 (206) hide show
  1. package/bundle/index.js +2488 -1959
  2. package/dist/LikeC4Diagram.d.ts +1 -1
  3. package/dist/LikeC4Diagram.js +8 -7
  4. package/dist/LikeC4Diagram.props.d.ts +4 -12
  5. package/dist/LikeC4ProjectsProvider.js +8 -4
  6. package/dist/LikeC4View.js +1 -5
  7. package/dist/ReactLikeC4.d.ts +1 -4
  8. package/dist/StaticLikeC4Diagram.js +0 -2
  9. package/dist/base-primitives/NodeHandles.d.ts +2 -1
  10. package/dist/base-primitives/NodeHandles.js +22 -18
  11. package/dist/base-primitives/compound/CompoundActionButton.js +1 -1
  12. package/dist/base-primitives/compound/CompoundDetailsButton.js +1 -1
  13. package/dist/base-primitives/edge/EdgeActionButton.js +1 -1
  14. package/dist/base-primitives/edge/EdgeContainer.d.ts +1 -1
  15. package/dist/base-primitives/edge/EdgeContainer.js +2 -3
  16. package/dist/base-primitives/edge/EdgeLabel.js +16 -16
  17. package/dist/base-primitives/edge/EdgeLabelContainer.d.ts +1 -1
  18. package/dist/base-primitives/edge/EdgeLabelContainer.js +5 -4
  19. package/dist/base-primitives/edge/EdgePath.js +13 -18
  20. package/dist/base-primitives/element/ElementActionButtons.js +1 -1
  21. package/dist/base-primitives/element/ElementDetailsButton.js +1 -1
  22. package/dist/base-primitives/memoNode.js +1 -1
  23. package/dist/components/ErrorFallback.js +1 -1
  24. package/dist/components/Link.js +2 -2
  25. package/dist/context/DiagramEventHandlers.js +0 -1
  26. package/dist/context/DiagramFeatures.d.ts +1 -1
  27. package/dist/context/DiagramFeatures.js +1 -0
  28. package/dist/context/EnsureMantine.js +2 -1
  29. package/dist/context/IconRenderer.js +6 -6
  30. package/dist/editor/LikeC4EditorProvider.d.ts +22 -0
  31. package/dist/editor/LikeC4EditorProvider.js +12 -0
  32. package/dist/editor/__tests__/fixture.d.ts +205 -0
  33. package/dist/editor/applyChangesToManualLayout.d.ts +8 -0
  34. package/dist/editor/applyChangesToManualLayout.js +182 -0
  35. package/dist/editor/editorActor.actions.d.ts +201 -0
  36. package/dist/editor/editorActor.actions.js +149 -0
  37. package/dist/editor/editorActor.d.ts +653 -0
  38. package/dist/editor/editorActor.js +324 -0
  39. package/dist/editor/hotkeyActor.d.ts +7 -0
  40. package/dist/editor/hotkeyActor.js +19 -0
  41. package/dist/editor/index.d.ts +3 -2
  42. package/dist/editor/useEditorActorLogic.d.ts +565 -0
  43. package/dist/editor/useEditorActorLogic.js +54 -0
  44. package/dist/hooks/safeContext.d.ts +3 -2
  45. package/dist/hooks/safeContext.js +7 -4
  46. package/dist/hooks/useDiagram.d.ts +4 -2
  47. package/dist/hooks/useDiagram.js +19 -8
  48. package/dist/hooks/useDiagramCompareLayout.d.ts +8 -0
  49. package/dist/hooks/useDiagramCompareLayout.js +22 -2
  50. package/dist/index.d.ts +1 -0
  51. package/dist/index.js +1 -0
  52. package/dist/likec4diagram/DiagramXYFlow.js +1 -2
  53. package/dist/likec4diagram/custom/edges/EdgeDrifts.js +1 -5
  54. package/dist/likec4diagram/custom/edges/RelationshipEdge.js +74 -48
  55. package/dist/likec4diagram/custom/edges/edges.css.d.ts +0 -1
  56. package/dist/likec4diagram/custom/edges/edges.css.js +30 -24
  57. package/dist/likec4diagram/custom/edges/useControlPoints.js +2 -2
  58. package/dist/likec4diagram/custom/nodes/ElementActions.js +2 -2
  59. package/dist/likec4diagram/custom/nodes/NodeDrifts.js +4 -9
  60. package/dist/likec4diagram/custom/nodes/nodes.js +3 -6
  61. package/dist/likec4diagram/custom/nodes/toolbar/ElementToolbar.js +2 -2
  62. package/dist/likec4diagram/custom/nodes/toolbar/_shared.js +2 -2
  63. package/dist/likec4diagram/relationship-popover/RelationshipPopover.js +127 -14
  64. package/dist/likec4diagram/state/DiagramActorProvider.js +63 -71
  65. package/dist/likec4diagram/state/assign.d.ts +4 -1
  66. package/dist/likec4diagram/state/assign.js +11 -8
  67. package/dist/likec4diagram/state/createViewChange.js +13 -9
  68. package/dist/likec4diagram/state/diagram-api.d.ts +20 -2
  69. package/dist/likec4diagram/state/diagram-api.js +58 -44
  70. package/dist/likec4diagram/state/hotkeyActor.d.ts +1 -1
  71. package/dist/likec4diagram/state/hotkeyActor.js +12 -0
  72. package/dist/likec4diagram/state/machine.actions.d.ts +774 -195
  73. package/dist/likec4diagram/state/machine.actions.js +185 -74
  74. package/dist/likec4diagram/state/machine.actions.layout.d.ts +93 -31
  75. package/dist/likec4diagram/state/machine.actions.layout.js +16 -4
  76. package/dist/likec4diagram/state/machine.d.ts +5 -4
  77. package/dist/likec4diagram/state/machine.js +11 -6
  78. package/dist/likec4diagram/state/machine.setup.d.ts +20 -9
  79. package/dist/likec4diagram/state/machine.setup.js +18 -3
  80. package/dist/likec4diagram/state/machine.state.initializing.d.ts +34 -18
  81. package/dist/likec4diagram/state/machine.state.initializing.js +10 -10
  82. package/dist/likec4diagram/state/machine.state.navigating.js +28 -9
  83. package/dist/likec4diagram/state/machine.state.ready.d.ts +1368 -434
  84. package/dist/likec4diagram/state/machine.state.ready.focused.d.ts +363 -39
  85. package/dist/likec4diagram/state/machine.state.ready.focused.js +17 -4
  86. package/dist/likec4diagram/state/machine.state.ready.idle.d.ts +104 -38
  87. package/dist/likec4diagram/state/machine.state.ready.idle.js +14 -5
  88. package/dist/likec4diagram/state/machine.state.ready.js +13 -90
  89. package/dist/likec4diagram/state/machine.state.ready.printing.d.ts +18 -6
  90. package/dist/likec4diagram/state/machine.state.ready.walkthrough.d.ts +204 -31
  91. package/dist/likec4diagram/state/machine.state.ready.walkthrough.js +14 -1
  92. package/dist/likec4diagram/state/types.d.ts +6 -2
  93. package/dist/likec4diagram/state/utils.d.ts +33 -7
  94. package/dist/likec4diagram/state/utils.js +23 -7
  95. package/dist/likec4diagram/ui/notation/NotationPanel.js +3 -3
  96. package/dist/likec4diagram/useLayoutConstraints.js +5 -9
  97. package/dist/navigationpanel/NavigationPanel.js +6 -9
  98. package/dist/navigationpanel/NavigationPanelDropdown.js +7 -7
  99. package/dist/navigationpanel/_common.js +1 -1
  100. package/dist/navigationpanel/comparepanel/CompareActionsMenu.d.ts +3 -1
  101. package/dist/navigationpanel/comparepanel/CompareActionsMenu.js +40 -14
  102. package/dist/navigationpanel/comparepanel/ComparePanelControls.js +6 -4
  103. package/dist/navigationpanel/comparepanel/LayoutTypeSwitcher.js +2 -2
  104. package/dist/navigationpanel/controls/DetailsControls.js +2 -2
  105. package/dist/navigationpanel/controls/LayoutWarning.js +2 -1
  106. package/dist/navigationpanel/controls/NavigationButtons.js +2 -2
  107. package/dist/navigationpanel/controls/OpenSource.js +1 -1
  108. package/dist/navigationpanel/controls/SearchControl.js +2 -2
  109. package/dist/navigationpanel/controls/ToggleReadonly.js +25 -17
  110. package/dist/navigationpanel/dropdown/ProjectsMenu.js +1 -1
  111. package/dist/navigationpanel/editorpanel/CenterCamera.js +1 -1
  112. package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.js +1 -1
  113. package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.js +9 -9
  114. package/dist/navigationpanel/editorpanel/ToggleReadonly.js +1 -1
  115. package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.js +3 -3
  116. package/dist/navigationpanel/walkthrough/DynamicViewControls.d.ts +66 -66
  117. package/dist/navigationpanel/walkthrough/DynamicViewControls.js +1 -1
  118. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/createReactComponent.js +1 -1
  119. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.js +1 -1
  120. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.js +1 -1
  121. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowDownRight.js +1 -1
  122. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowLeft.js +1 -1
  123. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js +1 -1
  124. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconBolt.js +1 -1
  125. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconBrowser.js +1 -1
  126. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.js +1 -1
  127. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.js +1 -1
  128. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.js +1 -1
  129. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js +1 -1
  130. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js +1 -1
  131. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconCylinder.js +1 -1
  132. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconDeviceMobile.js +1 -1
  133. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconDirectionSignFilled.js +1 -1
  134. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconExternalLink.js +1 -1
  135. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconFileSymlink.js +1 -1
  136. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconFocusCentered.js +1 -1
  137. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconFolderFilled.js +1 -1
  138. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconHelpCircle.js +1 -1
  139. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconId.js +1 -1
  140. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.js +1 -1
  141. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignBottom.js +1 -1
  142. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignCenter.js +1 -1
  143. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignLeft.js +1 -1
  144. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignMiddle.js +1 -1
  145. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignRight.js +1 -1
  146. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutAlignTop.js +1 -1
  147. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutBoardSplit.js +1 -1
  148. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutCollage.js +1 -1
  149. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutDashboard.js +1 -1
  150. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconLink.js +1 -1
  151. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconLock.js +1 -1
  152. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconLockOpen2.js +1 -1
  153. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerPlayFilled.js +1 -1
  154. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipBackFilled.js +1 -1
  155. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerSkipForwardFilled.js +1 -1
  156. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerStopFilled.js +1 -1
  157. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconRectangularPrism.js +1 -1
  158. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconReorder.js +1 -1
  159. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconRouteOff.js +1 -1
  160. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js +1 -1
  161. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconSelector.js +1 -1
  162. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconStack2.js +1 -1
  163. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconStarFilled.js +1 -1
  164. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconTarget.js +1 -1
  165. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconTransform.js +1 -1
  166. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconUser.js +1 -1
  167. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js +1 -1
  168. package/dist/node_modules/.pnpm/{@tabler_icons-react@3.35.0_react@19.2.0 → @tabler_icons-react@3.36.0_react@19.2.3}/node_modules/@tabler/icons-react/dist/esm/icons/IconZoomScan.js +1 -1
  169. package/dist/overlays/Overlays.js +23 -11
  170. package/dist/overlays/element-details/ElementDetailsCard.css.js +8 -11
  171. package/dist/overlays/element-details/ElementDetailsCard.js +4 -4
  172. package/dist/overlays/element-details/MetadataValue.js +4 -6
  173. package/dist/overlays/element-details/TabPanelDeployments.js +3 -3
  174. package/dist/overlays/element-details/TabPanelRelationships.js +12 -7
  175. package/dist/overlays/element-details/TabPanelStructure.js +1 -1
  176. package/dist/overlays/overlaysActor.js +6 -5
  177. package/dist/overlays/relationship-details/RelationshipDetails.js +3 -3
  178. package/dist/overlays/relationship-details/SelectEdge.js +2 -2
  179. package/dist/overlays/relationship-details/custom/ElementActions.js +3 -3
  180. package/dist/overlays/relationships-browser/RelationshipsBrowser.js +3 -3
  181. package/dist/overlays/relationships-browser/SelectElement.js +2 -2
  182. package/dist/overlays/relationships-browser/custom/ElementActions.js +3 -3
  183. package/dist/search/components/ElementsColumn.js +16 -11
  184. package/dist/search/components/PickView.js +3 -1
  185. package/dist/search/components/SearchByTags.js +1 -1
  186. package/dist/search/components/SearchInput.js +1 -1
  187. package/dist/search/components/ViewsColum.d.ts +3 -1
  188. package/dist/search/components/ViewsColum.js +14 -9
  189. package/dist/search/components/utils.d.ts +6 -0
  190. package/dist/search/components/utils.js +4 -1
  191. package/dist/shadowroot/styles.css.js +6 -1
  192. package/dist/styles.css2.js +1 -1
  193. package/dist/utils/index.d.ts +2 -2
  194. package/dist/utils/xyflow.d.ts +2 -3
  195. package/dist/utils/xyflow.js +9 -8
  196. package/package.json +22 -22
  197. package/panda.buildinfo.json +61 -80
  198. package/styles-min.css +1 -1
  199. package/styles.css +1 -1
  200. package/dist/base-primitives/edge/edge.css.d.ts +0 -4
  201. package/dist/base-primitives/edge/edge.css.js +0 -71
  202. package/dist/editor/LikeC4EditorContext.d.ts +0 -21
  203. package/dist/likec4diagram/state/syncManualLayoutActor.d.ts +0 -46
  204. package/dist/likec4diagram/state/syncManualLayoutActor.js +0 -309
  205. package/dist/utils/vector.d.ts +0 -86
  206. package/dist/utils/vector.js +0 -127
@@ -1,12 +1,12 @@
1
1
  import { jsx, Fragment } from 'react/jsx-runtime';
2
2
  import { cx } from '@likec4/styles/css';
3
3
  import { createContext, useContext } from 'react';
4
- import IconCylinder from '../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconCylinder.js';
5
- import IconRectangularPrism from '../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconRectangularPrism.js';
6
- import IconReorder from '../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconReorder.js';
7
- import IconUser from '../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconUser.js';
8
- import IconDeviceMobile from '../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconDeviceMobile.js';
9
- import IconBrowser from '../node_modules/.pnpm/@tabler_icons-react@3.35.0_react@19.2.0/node_modules/@tabler/icons-react/dist/esm/icons/IconBrowser.js';
4
+ import IconCylinder from '../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconCylinder.js';
5
+ import IconRectangularPrism from '../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconRectangularPrism.js';
6
+ import IconReorder from '../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconReorder.js';
7
+ import IconUser from '../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconUser.js';
8
+ import IconDeviceMobile from '../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconDeviceMobile.js';
9
+ import IconBrowser from '../node_modules/.pnpm/@tabler_icons-react@3.36.0_react@19.2.3/node_modules/@tabler/icons-react/dist/esm/icons/IconBrowser.js';
10
10
 
11
11
  const IconRendererContext = createContext(null);
12
12
  function IconRendererProvider({
@@ -0,0 +1,22 @@
1
+ import { PropsWithChildren, Context } from 'react';
2
+ import type * as t from '@likec4/core/types';
3
+ export type LikeC4EditorPort = {
4
+ /**
5
+ * Fetch a view by its ID and layout type.
6
+ *
7
+ * @param viewId - The ID of the view to fetch.
8
+ * @param layout - The layout type to use when fetching the view.
9
+ */
10
+ fetchView(viewId: t.ViewId, layout?: t.LayoutType): t.LayoutedView | Promise<t.LayoutedView>;
11
+ /**
12
+ * Callback invoked when the view changes.
13
+ */
14
+ handleChange(viewId: t.ViewId, change: t.ViewChange): void | Promise<void>;
15
+ };
16
+ export type LikeC4EditorProviderProps = PropsWithChildren<{
17
+ editor: LikeC4EditorPort;
18
+ }>;
19
+ export declare const LikeC4EditorReactContext: Context<LikeC4EditorPort | null>;
20
+ export declare function LikeC4EditorProvider({ children, editor }: LikeC4EditorProviderProps): import("react/jsx-runtime").JSX.Element;
21
+ export declare function EnsureEditorContext({ children }: PropsWithChildren): import("react/jsx-runtime").JSX.Element | null;
22
+ export declare function useOptionalLikeC4EditorPort(): LikeC4EditorPort | null;
@@ -0,0 +1,12 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { createContext, useContext } from 'react';
3
+
4
+ const LikeC4EditorReactContext = createContext(null);
5
+ function LikeC4EditorProvider({ children, editor }) {
6
+ return /* @__PURE__ */ jsx(LikeC4EditorReactContext.Provider, { value: editor, children });
7
+ }
8
+ function useOptionalLikeC4EditorPort() {
9
+ return useContext(LikeC4EditorReactContext);
10
+ }
11
+
12
+ export { LikeC4EditorProvider, LikeC4EditorReactContext, useOptionalLikeC4EditorPort };
@@ -0,0 +1,205 @@
1
+ import { Types, Builder } from '@likec4/core/builder';
2
+ import { DiagramEdge, DiagramNode, LayoutedElementView } from '@likec4/core/types';
3
+ import { WritableDraft } from 'immer';
4
+ import { LiteralUnion } from 'type-fest';
5
+ /**
6
+ Snapshot {@link indexSnapshot} is built from the model below.
7
+ =======
8
+ specification {
9
+ element el
10
+ element app
11
+ tag tag-1
12
+ tag tag-2
13
+ tag tag-3
14
+ }
15
+
16
+ model {
17
+ el customer 'Customer' {
18
+ #tag-1 #tag-2
19
+ description 'Uses services online'
20
+ }
21
+
22
+ el saas {
23
+ #tag-1
24
+ title 'SaaS Application'
25
+ description 'Provides online services to customers'
26
+
27
+ el frontend {
28
+ #tag-2
29
+ title 'Frontend'
30
+
31
+ app spa {
32
+ #tag-2
33
+ title 'SPA'
34
+ description 'Single Page Application'
35
+ icon tech:react
36
+
37
+ -> api
38
+ }
39
+ app pwa {
40
+ #tag-2
41
+ title 'PWA'
42
+ description 'Progressive Web Application'
43
+ icon tech:react
44
+
45
+ -> api
46
+ }
47
+ }
48
+ el backend {
49
+ title 'Backend'
50
+
51
+ el auth {
52
+ title 'Auth'
53
+ description 'Authentication'
54
+ }
55
+
56
+ el api {
57
+ #tag-3
58
+ title 'API'
59
+ description 'REST API'
60
+ icon tech:nodejs
61
+ }
62
+
63
+ el worker {
64
+ title 'Worker'
65
+ description 'Background processing'
66
+ }
67
+
68
+ api -> auth
69
+ api -> worker
70
+ api -> external.database
71
+ worker -> external.email
72
+ }
73
+
74
+ frontend -> api {
75
+ title 'requests'
76
+ technology 'REST'
77
+ description '''
78
+ requests **data**
79
+ '''
80
+ }
81
+ }
82
+
83
+ el external {
84
+ title 'External'
85
+ description 'External system'
86
+
87
+ el email {
88
+ title 'Email'
89
+ description 'Email service'
90
+ }
91
+
92
+ el database {
93
+ title 'Database'
94
+ description 'External database'
95
+ }
96
+ }
97
+
98
+ customer -> saas.frontend 'uses'
99
+
100
+ }
101
+
102
+ views {
103
+ view index {
104
+ title 'Landscape'
105
+ description '''
106
+ System _Landscape_
107
+
108
+ '''
109
+
110
+ include
111
+ *,
112
+ saas.**,
113
+ external.**
114
+ }
115
+ }
116
+
117
+ */
118
+ /**
119
+ * Builder that produces the model used to create {@link indexSnapshot}
120
+ * Here for type safety and easy maintenance of the snapshot.
121
+ */
122
+ declare function simplebuilder(): Builder<Types<"el" | "app", "external" | "saas" | "customer" | "saas.frontend" | "saas.frontend.spa" | "saas.frontend.pwa" | "saas.backend" | "saas.backend.auth" | "saas.backend.api" | "saas.backend.worker" | "external.email" | "external.database", "index", never, "tag-1" | "tag-2" | "tag-3", never, never, never>>;
123
+ type A = Types.ToAux<ReturnType<typeof simplebuilder>['Types']>;
124
+ type ExistingNodes = A['ElementId'];
125
+ type WithoutNodesEdges<V = LayoutedElementView> = Omit<V, 'nodes' | 'edges'>;
126
+ export type NodeIds = LiteralUnion<ExistingNodes, string>;
127
+ type NodeUpdater = ((draft: WritableDraft<Omit<DiagramNode, 'id'>>) => void) | Partial<Omit<DiagramNode, 'id'>> | undefined | null;
128
+ type NodeIdFrom<N> = N extends infer L extends string ? L | ExistingNodes : ExistingNodes;
129
+ type ExistingEdges = 'edge1' | 'edge2' | 'edge3' | 'edge4' | 'edge5' | 'edge6' | 'edge7';
130
+ type UpdatableEdge<Node> = Omit<DiagramEdge, 'id' | 'source' | 'target'> & {
131
+ id: LiteralUnion<ExistingEdges, string>;
132
+ source: Node;
133
+ target: Node;
134
+ };
135
+ type EdgeUpdater<Node> = ((draft: WritableDraft<UpdatableEdge<Node>>) => void) | Partial<UpdatableEdge<Node>> | undefined | null;
136
+ export type Patches<N, E> = {
137
+ view?: Partial<WithoutNodesEdges> | ((draft: WritableDraft<WithoutNodesEdges>) => void);
138
+ nodes?: {
139
+ [Id in ExistingNodes]?: NodeUpdater;
140
+ } & {
141
+ [Id in N & string]?: NodeUpdater | undefined | null;
142
+ };
143
+ edges?: {
144
+ [Id in ExistingEdges]?: EdgeUpdater<NodeIdFrom<N>>;
145
+ } & {
146
+ [Id in E & string]?: EdgeUpdater<NodeIdFrom<N>>;
147
+ };
148
+ };
149
+ /**
150
+ * Helper to get a fixture with manual layout snapshot, and auto layouted view.
151
+ * It takes {@link indexSnapshot} as base, applies provided patches
152
+ * to return as auto-layouted.
153
+ *
154
+ * Patcher can modify view properties, nodes and edges by their ids.
155
+ *
156
+ * Nodes/Edges can be modified, removed (by setting to null/undefined), or added (by using new key).
157
+ *
158
+ * @example
159
+ * const { snapshot, layouted } = prepareFixtures({
160
+ * nodes: {
161
+ * // Merge changes to the node
162
+ * 'customer': {
163
+ * x: 100,
164
+ * },
165
+ * // Apply changes to existing node via immer
166
+ * 'saas.api': d => {
167
+ * d.color = 'secondary'
168
+ * },
169
+ * // Remove node from snapshot
170
+ * 'saas.frontend': null,
171
+ * // Add new node to layouted View
172
+ * 'another': d => {
173
+ * d.title = 'Another Node'
174
+ * },
175
+ * edges: {
176
+ * // Merge changes to existing edge
177
+ * 'edge1: customer to frontend': d => {
178
+ * d.source = 'another'
179
+ * },
180
+ * // Delete existing edge
181
+ * 'edge2: frontend to api': null,
182
+ * // Add new edge (TS will check source/target ids)
183
+ * 'customer -> another': {
184
+ * label: 'New Edge',
185
+ * source: 'customer',
186
+ * target: 'another',
187
+ * }
188
+ * }
189
+ * }
190
+
191
+ * })
192
+ */
193
+ export declare function prepareFixtures<const N, E>(patcher?: Patches<N, E>): {
194
+ snapshot: LayoutedElementView;
195
+ snapshotNodes: Record<ExistingNodes, DiagramNode>;
196
+ snapshotEdges: Record<ExistingEdges, DiagramEdge>;
197
+ layouted: LayoutedElementView;
198
+ layoutedNodes: {
199
+ [Id in ExistingNodes | N & string]: DiagramNode;
200
+ };
201
+ layoutedEdges: {
202
+ [Id in ExistingEdges | E & string]: DiagramEdge;
203
+ };
204
+ };
205
+ export {};
@@ -0,0 +1,8 @@
1
+ import * as t from '@likec4/core/types';
2
+ /**
3
+ * Applies changes to a manual layout.
4
+ *
5
+ * @param manual - The manual layout.
6
+ * @param latest - The latest layout.
7
+ */
8
+ export declare function applyChangesToManualLayout(manualView: t.LayoutedView, latestView: t.LayoutedView): t.LayoutedView;
@@ -0,0 +1,182 @@
1
+ import { invariant, nonNullable } from '@likec4/core';
2
+ import { BBox, vector } from '@likec4/core/geometry';
3
+ import { setAutoFreeze, produce, castDraft } from 'immer';
4
+ import { isNullish } from 'remeda';
5
+
6
+ function applyChangesToManualLayout(manualView, latestView) {
7
+ try {
8
+ setAutoFreeze(false);
9
+ return _applyChangesToManualLayout(manualView, latestView);
10
+ } finally {
11
+ setAutoFreeze(true);
12
+ }
13
+ }
14
+ const isRootNode = (node) => isNullish(node.parent);
15
+ function _applyChangesToManualLayout(manualView, latestView) {
16
+ invariant(manualView.id === latestView.id, "View IDs do not match");
17
+ invariant(manualView._type === latestView._type, "View types do not match");
18
+ invariant(manualView._layout === "manual" && latestView._layout === "auto", "Views must be manual and auto");
19
+ const compounds = /* @__PURE__ */ new Set();
20
+ const newnodes = /* @__PURE__ */ new Set();
21
+ const isNotCompound = (node) => !compounds.has(typeof node === "string" ? node : node.id);
22
+ const isBetweenNewLeafNodes = (edge) => newnodes.has(edge.source) && newnodes.has(edge.target) && isNotCompound(edge.source) && isNotCompound(edge.target);
23
+ const nodesMap = new Map(
24
+ latestView.nodes.map((latest) => {
25
+ if (latest.children && latest.children.length > 0) {
26
+ compounds.add(latest.id);
27
+ }
28
+ const manual = manualView.nodes.find((n) => n.id === latest.id);
29
+ if (manual) {
30
+ return [latest.id, applyFromManualNode({ latest, manual })];
31
+ }
32
+ newnodes.add(latest.id);
33
+ return [latest.id, removeDrift(latest)];
34
+ })
35
+ );
36
+ const newNodesOnly = newnodes.size === nodesMap.size;
37
+ if (newNodesOnly) {
38
+ return produce(latestView, (draft) => {
39
+ draft._layout = "manual";
40
+ draft.nodes = castDraft([...nodesMap.values()]);
41
+ draft.edges = castDraft(latestView.edges.map(removeDrift));
42
+ delete draft.drifts;
43
+ });
44
+ }
45
+ if (compounds.size > 0) {
46
+ expandCompoundNodes(nodesMap);
47
+ }
48
+ const nodes = [...nodesMap.values()];
49
+ const edges = latestView.edges.map((latest) => {
50
+ const dir = latest.dir ?? "forward";
51
+ const hasSameEndpoints = (candidate) => candidate.source === latest.source && candidate.target === latest.target && (candidate.dir === dir || !candidate.dir && !latest.dir);
52
+ let manual = manualView.edges.find((e) => e.id === latest.id && hasSameEndpoints(e));
53
+ if (!manual) {
54
+ manual = manualView.edges.find((e) => hasSameEndpoints(e));
55
+ }
56
+ if (manual) {
57
+ return applyFromManualEdge({
58
+ latest,
59
+ manual
60
+ });
61
+ }
62
+ if (isBetweenNewLeafNodes(latest)) {
63
+ return removeDrift(latest);
64
+ }
65
+ const sourceNode = nodesMap.get(latest.source);
66
+ const targetNode = nodesMap.get(latest.target);
67
+ return makeAsStraightLine(latest, sourceNode, targetNode);
68
+ });
69
+ const bounds = BBox.merge(...nodes.filter(isRootNode));
70
+ return produce(latestView, (draft) => {
71
+ draft._layout = "manual";
72
+ draft.nodes = castDraft(nodes);
73
+ draft.edges = castDraft(edges);
74
+ draft.bounds = bounds;
75
+ delete draft.drifts;
76
+ });
77
+ }
78
+ const COMPOUND_PADDING = {
79
+ Left: 42,
80
+ Right: 42,
81
+ Top: 60,
82
+ Bottom: 42
83
+ };
84
+ function expandCompoundNodes(nodes) {
85
+ function expand(nodeId) {
86
+ const node = nonNullable(nodes.get(nodeId), `Node ${nodeId} not found`);
87
+ if (node.children.length === 0) {
88
+ return node;
89
+ }
90
+ const childBBoxes = [];
91
+ for (const childId of node.children) {
92
+ childBBoxes.push(
93
+ expand(childId)
94
+ );
95
+ }
96
+ const childrenBBox = BBox.merge(...childBBoxes);
97
+ node.x = childrenBBox.x - COMPOUND_PADDING.Left;
98
+ node.y = childrenBBox.y - COMPOUND_PADDING.Top;
99
+ node.width = childrenBBox.width + COMPOUND_PADDING.Left + COMPOUND_PADDING.Right;
100
+ node.height = childrenBBox.height + COMPOUND_PADDING.Top + COMPOUND_PADDING.Bottom;
101
+ return node;
102
+ }
103
+ for (const node of nodes.values()) {
104
+ if (!isRootNode(node) || node.children.length === 0) {
105
+ continue;
106
+ }
107
+ expand(node.id);
108
+ }
109
+ }
110
+ function applyFromManualNode({ latest, manual }) {
111
+ invariant(manual.id === latest.id, "Node IDs do not match");
112
+ return produce(latest, (next) => {
113
+ next.x = manual.x;
114
+ next.y = manual.y;
115
+ next.drifts = null;
116
+ });
117
+ }
118
+ function applyFromManualEdge(edges) {
119
+ const { manual, latest } = edges;
120
+ return produce(latest, (draft) => {
121
+ if (manual.controlPoints) {
122
+ draft.controlPoints = manual.controlPoints;
123
+ } else {
124
+ delete draft.controlPoints;
125
+ }
126
+ draft.points = castDraft(manual.points);
127
+ if (manual.labelBBox) {
128
+ draft.labelBBox = latest.labelBBox ?? manual.labelBBox;
129
+ draft.labelBBox.x = manual.labelBBox.x;
130
+ draft.labelBBox.y = manual.labelBBox.y;
131
+ }
132
+ draft.drifts = null;
133
+ });
134
+ }
135
+ function removeDrift(object) {
136
+ if ("drifts" in object && object.drifts !== null) {
137
+ const result = { ...object };
138
+ result.drifts = null;
139
+ return result;
140
+ }
141
+ return object;
142
+ }
143
+ function makeAsStraightLine(edge, sourceNode, targetNode) {
144
+ const controlPoints = edgeControlPoints(sourceNode, targetNode);
145
+ const labelPos = controlPoints[0];
146
+ return produce(edge, (draft) => {
147
+ draft.controlPoints = controlPoints;
148
+ if (edge.labelBBox) {
149
+ draft.labelBBox.x = labelPos.x;
150
+ draft.labelBBox.y = labelPos.y;
151
+ }
152
+ delete draft.drifts;
153
+ });
154
+ }
155
+ function getBorderPointOnVector(node, nodeCenter, v) {
156
+ const xScale = node.width / 2 / v.x;
157
+ const yScale = node.height / 2 / v.y;
158
+ const scale = Math.min(Math.abs(xScale), Math.abs(yScale));
159
+ return vector(v).multiply(scale).add(nodeCenter);
160
+ }
161
+ function edgeControlPoints(source, target) {
162
+ const sourceCenter = vector(BBox.center(source));
163
+ const targetCenter = vector(BBox.center(target));
164
+ if (source === target) {
165
+ const loopSize = 80;
166
+ const centerOfTopBoundary = vector(0, source.height || 0).multiply(-0.5).add(sourceCenter);
167
+ return [
168
+ centerOfTopBoundary.add(vector(-loopSize / 2.5, -loopSize)).round().toObject(),
169
+ centerOfTopBoundary.add(vector(loopSize / 2.5, -loopSize)).round().toObject()
170
+ ];
171
+ }
172
+ const sourceToTargetVector = targetCenter.subtract(sourceCenter);
173
+ const sourceBorderPoint = getBorderPointOnVector(source, sourceCenter, sourceToTargetVector);
174
+ const targetBorderPoint = getBorderPointOnVector(target, targetCenter, sourceToTargetVector.multiply(-1));
175
+ const sourceToTarget = targetBorderPoint.subtract(sourceBorderPoint);
176
+ return [
177
+ sourceBorderPoint.add(sourceToTarget.multiply(0.4)).round().toObject(),
178
+ sourceBorderPoint.add(sourceToTarget.multiply(0.6)).round().toObject()
179
+ ];
180
+ }
181
+
182
+ export { applyChangesToManualLayout };
@@ -0,0 +1,201 @@
1
+ import { ViewChange } from '@likec4/core/types';
2
+ import { ActionFunction, CancelAction, Values, PromiseActorLogic, EventObject, NonReducibleUnknown, StopAction } from 'xstate';
3
+ import { EditorActorContext, EditorActorEvent, EditorActorEmitedEvent } from './editorActor';
4
+ import { HotkeyActorLogic } from './hotkeyActor';
5
+ export declare const raiseSync: () => ActionFunction<EditorActorContext, EditorActorEvent, EditorActorEvent, undefined, never, never, never, "350ms" | "waitBeforeSync", never>;
6
+ export declare const cancelSync: () => CancelAction<EditorActorContext, EditorActorEvent, undefined, EditorActorEvent>;
7
+ export declare const reschedule: (delay?: number) => ActionFunction<EditorActorContext, EditorActorEvent, EditorActorEvent, undefined, never, never, never, "350ms" | "waitBeforeSync", never>;
8
+ type LayoutChanges = ViewChange.ResetManualLayout | ViewChange.SaveViewSnapshot;
9
+ export declare const isLayoutChange: (change: ViewChange) => change is LayoutChanges;
10
+ export declare const withoutSnapshotChanges: (data: ViewChange[]) => (ViewChange.ChangeElementStyle | ViewChange.ChangeAutoLayout)[];
11
+ export declare const saveStateBeforeEdit: () => ActionFunction<EditorActorContext, EditorActorEvent, EditorActorEvent, undefined, Values<{
12
+ hotkey: {
13
+ src: "hotkey";
14
+ logic: HotkeyActorLogic;
15
+ id: "hotkey";
16
+ };
17
+ applyLatest: {
18
+ src: "applyLatest";
19
+ logic: PromiseActorLogic<import("./editorActor").EditorCalls.ApplyLatestToManual.Output, import("./editorActor").EditorCalls.ApplyLatestToManual.Input, EventObject>;
20
+ id: string | undefined;
21
+ };
22
+ executeChange: {
23
+ src: "executeChange";
24
+ logic: PromiseActorLogic<NonReducibleUnknown, import("./editorActor").EditorCalls.ExecuteChange.Input, EventObject>;
25
+ id: string | undefined;
26
+ };
27
+ }>, never, never, never, never>;
28
+ export declare const startEditing: () => ActionFunction<EditorActorContext, EditorActorEvent, EditorActorEvent, undefined, Values<{
29
+ hotkey: {
30
+ src: "hotkey";
31
+ logic: HotkeyActorLogic;
32
+ id: "hotkey";
33
+ };
34
+ applyLatest: {
35
+ src: "applyLatest";
36
+ logic: PromiseActorLogic<import("./editorActor").EditorCalls.ApplyLatestToManual.Output, import("./editorActor").EditorCalls.ApplyLatestToManual.Input, EventObject>;
37
+ id: string | undefined;
38
+ };
39
+ executeChange: {
40
+ src: "executeChange";
41
+ logic: PromiseActorLogic<NonReducibleUnknown, import("./editorActor").EditorCalls.ExecuteChange.Input, EventObject>;
42
+ id: string | undefined;
43
+ };
44
+ }>, never, Values<{
45
+ "has pending": {
46
+ type: "has pending";
47
+ params: unknown;
48
+ };
49
+ "can undo": {
50
+ type: "can undo";
51
+ params: unknown;
52
+ };
53
+ }>, "350ms" | "waitBeforeSync", EditorActorEmitedEvent>;
54
+ export declare const stopHotkey: () => StopAction<EditorActorContext, EditorActorEvent, undefined, EditorActorEvent>;
55
+ export declare const ensureHotKey: () => ActionFunction<EditorActorContext, EditorActorEvent, EditorActorEvent, undefined, Values<{
56
+ hotkey: {
57
+ src: "hotkey";
58
+ logic: HotkeyActorLogic;
59
+ id: "hotkey";
60
+ };
61
+ applyLatest: {
62
+ src: "applyLatest";
63
+ logic: PromiseActorLogic<import("./editorActor").EditorCalls.ApplyLatestToManual.Output, import("./editorActor").EditorCalls.ApplyLatestToManual.Input, EventObject>;
64
+ id: string | undefined;
65
+ };
66
+ executeChange: {
67
+ src: "executeChange";
68
+ logic: PromiseActorLogic<NonReducibleUnknown, import("./editorActor").EditorCalls.ExecuteChange.Input, EventObject>;
69
+ id: string | undefined;
70
+ };
71
+ }>, never, Values<{
72
+ "has pending": {
73
+ type: "has pending";
74
+ params: unknown;
75
+ };
76
+ "can undo": {
77
+ type: "can undo";
78
+ params: unknown;
79
+ };
80
+ }>, "350ms" | "waitBeforeSync", EditorActorEmitedEvent>;
81
+ export declare const pushHistory: () => ActionFunction<EditorActorContext, EditorActorEvent, EditorActorEvent, undefined, Values<{
82
+ hotkey: {
83
+ src: "hotkey";
84
+ logic: HotkeyActorLogic;
85
+ id: "hotkey";
86
+ };
87
+ applyLatest: {
88
+ src: "applyLatest";
89
+ logic: PromiseActorLogic<import("./editorActor").EditorCalls.ApplyLatestToManual.Output, import("./editorActor").EditorCalls.ApplyLatestToManual.Input, EventObject>;
90
+ id: string | undefined;
91
+ };
92
+ executeChange: {
93
+ src: "executeChange";
94
+ logic: PromiseActorLogic<NonReducibleUnknown, import("./editorActor").EditorCalls.ExecuteChange.Input, EventObject>;
95
+ id: string | undefined;
96
+ };
97
+ }>, never, never, never, never>;
98
+ export declare const stopEditing: () => ActionFunction<EditorActorContext, EditorActorEvent, EditorActorEvent, undefined, Values<{
99
+ hotkey: {
100
+ src: "hotkey";
101
+ logic: HotkeyActorLogic;
102
+ id: "hotkey";
103
+ };
104
+ applyLatest: {
105
+ src: "applyLatest";
106
+ logic: PromiseActorLogic<import("./editorActor").EditorCalls.ApplyLatestToManual.Output, import("./editorActor").EditorCalls.ApplyLatestToManual.Input, EventObject>;
107
+ id: string | undefined;
108
+ };
109
+ executeChange: {
110
+ src: "executeChange";
111
+ logic: PromiseActorLogic<NonReducibleUnknown, import("./editorActor").EditorCalls.ExecuteChange.Input, EventObject>;
112
+ id: string | undefined;
113
+ };
114
+ }>, never, Values<{
115
+ "has pending": {
116
+ type: "has pending";
117
+ params: unknown;
118
+ };
119
+ "can undo": {
120
+ type: "can undo";
121
+ params: unknown;
122
+ };
123
+ }>, "350ms" | "waitBeforeSync", EditorActorEmitedEvent>;
124
+ export declare const markHistoryAsSynched: () => ActionFunction<EditorActorContext, EditorActorEvent, EditorActorEvent, undefined, Values<{
125
+ hotkey: {
126
+ src: "hotkey";
127
+ logic: HotkeyActorLogic;
128
+ id: "hotkey";
129
+ };
130
+ applyLatest: {
131
+ src: "applyLatest";
132
+ logic: PromiseActorLogic<import("./editorActor").EditorCalls.ApplyLatestToManual.Output, import("./editorActor").EditorCalls.ApplyLatestToManual.Input, EventObject>;
133
+ id: string | undefined;
134
+ };
135
+ executeChange: {
136
+ src: "executeChange";
137
+ logic: PromiseActorLogic<NonReducibleUnknown, import("./editorActor").EditorCalls.ExecuteChange.Input, EventObject>;
138
+ id: string | undefined;
139
+ };
140
+ }>, never, never, never, never>;
141
+ export declare const popHistory: () => ActionFunction<EditorActorContext, EditorActorEvent, EditorActorEvent, undefined, Values<{
142
+ hotkey: {
143
+ src: "hotkey";
144
+ logic: HotkeyActorLogic;
145
+ id: "hotkey";
146
+ };
147
+ applyLatest: {
148
+ src: "applyLatest";
149
+ logic: PromiseActorLogic<import("./editorActor").EditorCalls.ApplyLatestToManual.Output, import("./editorActor").EditorCalls.ApplyLatestToManual.Input, EventObject>;
150
+ id: string | undefined;
151
+ };
152
+ executeChange: {
153
+ src: "executeChange";
154
+ logic: PromiseActorLogic<NonReducibleUnknown, import("./editorActor").EditorCalls.ExecuteChange.Input, EventObject>;
155
+ id: string | undefined;
156
+ };
157
+ }>, never, never, never, never>;
158
+ export declare const undo: () => ActionFunction<EditorActorContext, EditorActorEvent, EditorActorEvent, undefined, Values<{
159
+ hotkey: {
160
+ src: "hotkey";
161
+ logic: HotkeyActorLogic;
162
+ id: "hotkey";
163
+ };
164
+ applyLatest: {
165
+ src: "applyLatest";
166
+ logic: PromiseActorLogic<import("./editorActor").EditorCalls.ApplyLatestToManual.Output, import("./editorActor").EditorCalls.ApplyLatestToManual.Input, EventObject>;
167
+ id: string | undefined;
168
+ };
169
+ executeChange: {
170
+ src: "executeChange";
171
+ logic: PromiseActorLogic<NonReducibleUnknown, import("./editorActor").EditorCalls.ExecuteChange.Input, EventObject>;
172
+ id: string | undefined;
173
+ };
174
+ }>, never, Values<{
175
+ "has pending": {
176
+ type: "has pending";
177
+ params: unknown;
178
+ };
179
+ "can undo": {
180
+ type: "can undo";
181
+ params: unknown;
182
+ };
183
+ }>, "350ms" | "waitBeforeSync", EditorActorEmitedEvent>;
184
+ export declare const addSnapshotToPendingChanges: () => ActionFunction<EditorActorContext, EditorActorEvent, EditorActorEvent, undefined, Values<{
185
+ hotkey: {
186
+ src: "hotkey";
187
+ logic: HotkeyActorLogic;
188
+ id: "hotkey";
189
+ };
190
+ applyLatest: {
191
+ src: "applyLatest";
192
+ logic: PromiseActorLogic<import("./editorActor").EditorCalls.ApplyLatestToManual.Output, import("./editorActor").EditorCalls.ApplyLatestToManual.Input, EventObject>;
193
+ id: string | undefined;
194
+ };
195
+ executeChange: {
196
+ src: "executeChange";
197
+ logic: PromiseActorLogic<NonReducibleUnknown, import("./editorActor").EditorCalls.ExecuteChange.Input, EventObject>;
198
+ id: string | undefined;
199
+ };
200
+ }>, never, never, never, never>;
201
+ export {};