@likec4/diagram 1.59.2 → 1.59.4

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 (233) hide show
  1. package/README.md +53 -0
  2. package/dist/LikeC4Diagram.d.ts +1 -1
  3. package/dist/LikeC4Diagram.js +36 -21
  4. package/dist/LikeC4Diagram.props.d.ts +23 -0
  5. package/dist/LikeC4MantineProvider.d.ts +24 -0
  6. package/dist/LikeC4MantineProvider.js +156 -0
  7. package/dist/LikeC4ProjectsOverview.js +1 -1
  8. package/dist/LikeC4ProjectsProvider.d.ts +17 -2
  9. package/dist/LikeC4Styles.d.ts +13 -3
  10. package/dist/LikeC4Styles.js +10 -6
  11. package/dist/LikeC4View.js +2 -2
  12. package/dist/StaticLikeC4Diagram.d.ts +1 -1
  13. package/dist/base/BaseXYFlow.d.ts +1 -1
  14. package/dist/base/BaseXYFlow.js +19 -9
  15. package/dist/base/const.d.ts +1 -0
  16. package/dist/base/const.js +3 -1
  17. package/dist/base-primitives/Markdown.d.ts +3 -3
  18. package/dist/base-primitives/compound/CompoundNodeContainer.js +2 -3
  19. package/dist/base-primitives/compound/CompoundTitle.js +5 -4
  20. package/dist/base-primitives/compound/actionbtns.css.d.ts +3 -3
  21. package/dist/base-primitives/compound/actionbtns.css.js +3 -3
  22. package/dist/base-primitives/element/ElementData.js +6 -1
  23. package/dist/base-primitives/element/ElementShape.js +9 -10
  24. package/dist/base-primitives/element/ElementTags.d.ts +2 -2
  25. package/dist/base-primitives/element/ElementTags.js +5 -5
  26. package/dist/components/EmptyBox.d.ts +3 -0
  27. package/dist/components/EmptyBox.js +9 -0
  28. package/dist/components/ErrorFallback.js +7 -6
  29. package/dist/components/FloatingWindow.d.ts +18 -0
  30. package/dist/components/FloatingWindow.js +89 -0
  31. package/dist/components/Link.js +7 -7
  32. package/dist/components/NavigationPanel.d.ts +2 -2
  33. package/dist/components/NavigationPanel.js +5 -6
  34. package/dist/components/SearchControl.css.js +10 -12
  35. package/dist/components/ViewIcon.d.ts +11 -0
  36. package/dist/components/ViewIcon.js +71 -0
  37. package/dist/context/CurrentViewModelProvider.js +2 -1
  38. package/dist/context/DiagramEventHandlers.js +4 -2
  39. package/dist/context/EnsureMantine.js +3 -3
  40. package/dist/context/IconRenderer.d.ts +2 -1
  41. package/dist/context/IconRenderer.js +78 -26
  42. package/dist/context/LikeC4ProjectsContext.d.ts +3 -2
  43. package/dist/context/TagStylesContext.d.ts +11 -4
  44. package/dist/context/TagStylesContext.js +39 -27
  45. package/dist/custom/index.d.ts +3 -0
  46. package/dist/custom/index.js +7 -4
  47. package/dist/editor/LikeC4EditorCallbacks.d.ts +20 -1
  48. package/dist/editor/LikeC4EditorCallbacks.js +4 -1
  49. package/dist/editor/actor/setup.d.ts +1 -0
  50. package/dist/editor/actor/setup.js +17 -12
  51. package/dist/editor/actor/state.sync-queue.js +1 -0
  52. package/dist/editor/applyChangesToManualLayout.js +5 -2
  53. package/dist/editor/index.d.ts +1 -1
  54. package/dist/editor/useEditorActorLogic.js +10 -3
  55. package/dist/hooks/safeContext.d.ts +12 -4
  56. package/dist/hooks/safeContext.js +2 -2
  57. package/dist/hooks/useCurrentView.js +5 -5
  58. package/dist/hooks/useDiagram.js +3 -23
  59. package/dist/hooks/useDiagramCompareLayout.d.ts +16 -6
  60. package/dist/hooks/useDiagramCompareLayout.js +20 -17
  61. package/dist/hooks/useEditorActor.js +3 -5
  62. package/dist/hooks/useLikeC4Model.js +8 -3
  63. package/dist/hooks/useLikeC4Project.d.ts +4 -3
  64. package/dist/hooks/useOverlaysActor.d.ts +1 -1
  65. package/dist/hooks/useUpdateEffect.js +2 -1
  66. package/dist/index.d.ts +6 -4
  67. package/dist/index.js +8 -6
  68. package/dist/likec4diagram/DiagramUI.js +4 -3
  69. package/dist/likec4diagram/DiagramXYFlow.d.ts +6 -0
  70. package/dist/likec4diagram/DiagramXYFlow.js +33 -19
  71. package/dist/likec4diagram/custom/edges/EdgeDrifts.js +4 -4
  72. package/dist/likec4diagram/custom/edges/RelationshipEdge.js +2 -4
  73. package/dist/likec4diagram/custom/edges/SequenceStepEdge.js +1 -3
  74. package/dist/likec4diagram/custom/edges/edges.css.js +13 -13
  75. package/dist/likec4diagram/custom/edges/useRelationshipEdgePath.js +3 -2
  76. package/dist/likec4diagram/custom/nodes/NodeDrifts.js +2 -2
  77. package/dist/likec4diagram/custom/nodes/NodeNotes.js +4 -4
  78. package/dist/likec4diagram/custom/nodes/SequenceActorNode.js +2 -2
  79. package/dist/likec4diagram/custom/nodes/SequenceSubFlow.js +8 -5
  80. package/dist/likec4diagram/custom/nodes/nodes.js +8 -5
  81. package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.js +2 -2
  82. package/dist/likec4diagram/custom/nodes/toolbar/Toolbar.js +9 -8
  83. package/dist/likec4diagram/custom/nodes/toolbar/styles.css.js +1 -1
  84. package/dist/likec4diagram/relationship-popover/RelationshipPopover.js +3 -2
  85. package/dist/likec4diagram/relationship-popover/components.d.ts +1 -1
  86. package/dist/likec4diagram/relationship-popover/components.js +6 -2
  87. package/dist/likec4diagram/state/DiagramActorProvider.d.ts +7 -2
  88. package/dist/likec4diagram/state/DiagramActorProvider.js +20 -4
  89. package/dist/likec4diagram/state/assign.js +1 -1
  90. package/dist/likec4diagram/state/createViewChange.js +1 -6
  91. package/dist/likec4diagram/state/diagram-api.d.ts +2 -2
  92. package/dist/likec4diagram/state/diagram-api.js +3 -2
  93. package/dist/likec4diagram/state/machine.actions.js +15 -8
  94. package/dist/likec4diagram/state/machine.actions.layout.d.ts +1 -0
  95. package/dist/likec4diagram/state/machine.actions.layout.js +7 -5
  96. package/dist/likec4diagram/state/machine.setup.d.ts +10 -1
  97. package/dist/likec4diagram/state/machine.setup.js +15 -9
  98. package/dist/likec4diagram/state/machine.state.initializing.d.ts +2 -26
  99. package/dist/likec4diagram/state/machine.state.initializing.js +9 -6
  100. package/dist/likec4diagram/state/machine.state.navigating.js +1 -1
  101. package/dist/likec4diagram/state/machine.state.ready.d.ts +134 -3
  102. package/dist/likec4diagram/state/machine.state.ready.js +2 -1
  103. package/dist/likec4diagram/state/machine.state.ready.walkthrough.d.ts +106 -1
  104. package/dist/likec4diagram/state/machine.state.ready.walkthrough.js +40 -7
  105. package/dist/likec4diagram/state/utils.d.ts +1 -1
  106. package/dist/likec4diagram/state/utils.js +7 -4
  107. package/dist/likec4diagram/ui/FloatingSequenceActors.js +2 -1
  108. package/dist/likec4diagram/ui/LayoutDriftFrame.js +16 -10
  109. package/dist/likec4diagram/ui/index.d.ts +1 -1
  110. package/dist/likec4diagram/ui/notation/NotationPanel.css.js +13 -15
  111. package/dist/likec4diagram/ui/notation/NotationPanel.js +9 -9
  112. package/dist/likec4diagram/ui/sequence-outline/ActiveTrail.d.ts +9 -0
  113. package/dist/likec4diagram/ui/sequence-outline/ActiveTrail.js +81 -0
  114. package/dist/likec4diagram/ui/sequence-outline/FlowRow.d.ts +11 -0
  115. package/dist/likec4diagram/ui/sequence-outline/FlowRow.js +70 -0
  116. package/dist/likec4diagram/ui/sequence-outline/OutlineBody.d.ts +2 -0
  117. package/dist/likec4diagram/ui/sequence-outline/OutlineBody.js +106 -0
  118. package/dist/likec4diagram/ui/sequence-outline/OutlineHeader.d.ts +2 -0
  119. package/dist/likec4diagram/ui/sequence-outline/OutlineHeader.js +140 -0
  120. package/dist/likec4diagram/ui/sequence-outline/OutlineNodes.d.ts +17 -0
  121. package/dist/likec4diagram/ui/sequence-outline/OutlineNodes.js +83 -0
  122. package/dist/likec4diagram/ui/sequence-outline/SequenceOutlinePanel.d.ts +4 -0
  123. package/dist/likec4diagram/ui/sequence-outline/SequenceOutlinePanel.js +49 -525
  124. package/dist/likec4diagram/ui/sequence-outline/StepBadge.d.ts +8 -0
  125. package/dist/likec4diagram/ui/sequence-outline/StepBadge.js +52 -0
  126. package/dist/likec4diagram/ui/sequence-outline/StepRow.d.ts +7 -0
  127. package/dist/likec4diagram/ui/sequence-outline/StepRow.js +190 -0
  128. package/dist/likec4diagram/ui/sequence-outline/StoreProvider.d.ts +238 -0
  129. package/dist/likec4diagram/ui/sequence-outline/StoreProvider.js +94 -0
  130. package/dist/likec4diagram/ui/sequence-outline/depth-of-field.d.ts +21 -0
  131. package/dist/likec4diagram/ui/sequence-outline/depth-of-field.js +71 -0
  132. package/dist/likec4diagram/ui/sequence-outline/index.d.ts +2 -0
  133. package/dist/likec4diagram/ui/sequence-outline/motion.d.ts +13 -0
  134. package/dist/likec4diagram/ui/sequence-outline/motion.js +21 -0
  135. package/dist/likec4diagram/ui/sequence-outline/presentation.d.ts +10 -0
  136. package/dist/likec4diagram/ui/sequence-outline/presentation.js +80 -0
  137. package/dist/likec4diagram/ui/sequence-outline/tree.d.ts +9 -0
  138. package/dist/likec4diagram/ui/sequence-outline/tree.js +67 -0
  139. package/dist/likec4diagram/ui/sequence-outline/{state.d.ts → types.d.ts} +4 -2
  140. package/dist/likec4diagram/ui/sequence-outline/types.js +12 -0
  141. package/dist/likec4diagram/useLayoutConstraints.js +13 -1
  142. package/dist/likec4diagram/xyflow-sequence/layouter.js +8 -10
  143. package/dist/likec4diagram/xyflow-sequence/sequence-view-to-xy.js +1 -0
  144. package/dist/likec4diagram/xyflow-sequence/utils.js +0 -1
  145. package/dist/navigationpanel/NavigationPanel.js +45 -41
  146. package/dist/navigationpanel/NavigationPanelControls.js +102 -63
  147. package/dist/navigationpanel/NavigationPanelDropdown.js +52 -77
  148. package/dist/navigationpanel/_common.d.ts +6 -6
  149. package/dist/navigationpanel/_common.js +31 -42
  150. package/dist/navigationpanel/actor.actions.js +6 -5
  151. package/dist/navigationpanel/actor.js +2 -2
  152. package/dist/navigationpanel/actor.setup.d.ts +6 -6
  153. package/dist/navigationpanel/actor.setup.js +2 -1
  154. package/dist/navigationpanel/comparepanel/CompareActionsMenu.js +2 -4
  155. package/dist/navigationpanel/comparepanel/ComparePanel.js +8 -10
  156. package/dist/navigationpanel/comparepanel/DriftsSummary.d.ts +1 -1
  157. package/dist/navigationpanel/comparepanel/DriftsSummary.js +11 -9
  158. package/dist/navigationpanel/controls/LayoutWarning.js +69 -72
  159. package/dist/navigationpanel/controls/NavigationButtons.d.ts +1 -1
  160. package/dist/navigationpanel/controls/NavigationButtons.js +8 -8
  161. package/dist/navigationpanel/controls/OpenSource.d.ts +1 -1
  162. package/dist/navigationpanel/controls/OpenSource.js +5 -8
  163. package/dist/navigationpanel/controls/SearchControl.js +24 -9
  164. package/dist/navigationpanel/controls/ToggleReadonly.d.ts +4 -1
  165. package/dist/navigationpanel/controls/ToggleReadonly.js +56 -76
  166. package/dist/navigationpanel/controls/ViewDetailsButton.d.ts +5 -0
  167. package/dist/navigationpanel/controls/ViewDetailsButton.js +121 -0
  168. package/dist/navigationpanel/controls/index.d.ts +1 -1
  169. package/dist/navigationpanel/dropdown/ProjectsMenu.js +27 -16
  170. package/dist/navigationpanel/editorpanel/ApplySemanticLayout.js +2 -1
  171. package/dist/navigationpanel/editorpanel/ChangeAutoLayoutButton.js +12 -10
  172. package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.d.ts +2 -0
  173. package/dist/navigationpanel/editorpanel/ManualLayoutToolsButton.js +19 -10
  174. package/dist/navigationpanel/editorpanel/styles.js +8 -15
  175. package/dist/navigationpanel/hooks.d.ts +6 -2
  176. package/dist/navigationpanel/styles.css.d.ts +2 -2
  177. package/dist/navigationpanel/styles.css.js +0 -1
  178. package/dist/navigationpanel/walkthrough/ActiveWalkthroughControls.js +3 -2
  179. package/dist/navigationpanel/walkthrough/DynamicViewControls.d.ts +5 -4
  180. package/dist/navigationpanel/walkthrough/DynamicViewControls.js +10 -39
  181. package/dist/navigationpanel/walkthrough/DynamicViewModeSwitcher.d.ts +1 -0
  182. package/dist/navigationpanel/walkthrough/DynamicViewModeSwitcher.js +49 -0
  183. package/dist/navigationpanel/walkthrough/WalkthroughPanel.js +8 -8
  184. package/dist/navigationpanel/windows/ViewDetailsWindow.d.ts +1 -0
  185. package/dist/navigationpanel/windows/ViewDetailsWindow.js +379 -0
  186. package/dist/overlays/Overlays.js +29 -17
  187. package/dist/overlays/element-details/ElementDetailsCard.css.js +28 -36
  188. package/dist/overlays/element-details/ElementDetailsCard.js +3 -3
  189. package/dist/overlays/element-details/MetadataValue.js +18 -16
  190. package/dist/overlays/element-details/TabPanelDeployments.css.js +6 -14
  191. package/dist/overlays/element-details/TabPanelRelationships.css.js +8 -12
  192. package/dist/overlays/element-details/TabPanelStructure.css.js +4 -8
  193. package/dist/overlays/hooks.d.ts +3 -1
  194. package/dist/overlays/overlay/Overlay.js +8 -7
  195. package/dist/overlays/overlaysActor.js +20 -17
  196. package/dist/overlays/relationship-details/RelationshipDetails.js +2 -1
  197. package/dist/overlays/relationship-details/SelectEdge.css.js +14 -9
  198. package/dist/overlays/relationship-details/actor.js +1 -1
  199. package/dist/overlays/relationship-details/hooks.js +2 -1
  200. package/dist/overlays/relationships-browser/RelationshipsBrowser.d.ts +6 -0
  201. package/dist/overlays/relationships-browser/RelationshipsBrowser.js +15 -8
  202. package/dist/overlays/relationships-browser/SelectElement.css.js +2 -8
  203. package/dist/overlays/relationships-browser/SelectElement.js +5 -1
  204. package/dist/overlays/relationships-browser/actor.js +3 -2
  205. package/dist/overlays/relationships-browser/custom/ElementActions.js +39 -38
  206. package/dist/overlays/relationships-browser/custom/EmptyNode.js +7 -9
  207. package/dist/overlays/relationships-browser/hooks.js +2 -1
  208. package/dist/projects-overview/ProjectsOverview.js +8 -7
  209. package/dist/projects-overview/actor.js +1 -1
  210. package/dist/projects-overview/hooks.js +2 -1
  211. package/dist/search/Search.js +9 -7
  212. package/dist/search/components/ElementsColumn.css.js +6 -5
  213. package/dist/search/components/ElementsColumn.js +4 -3
  214. package/dist/search/components/SearchByTags.js +3 -3
  215. package/dist/search/components/ViewsColum.js +46 -43
  216. package/dist/search/components/ViewsColumn.css.js +4 -4
  217. package/dist/search/components/_shared.css.d.ts +2 -2
  218. package/dist/search/components/_shared.css.js +31 -46
  219. package/dist/search/components/styles.css.js +4 -4
  220. package/dist/search/hooks.js +2 -1
  221. package/dist/shadowroot/ShadowRoot.js +6 -5
  222. package/dist/styles2.js +1 -1
  223. package/dist/utils/index.js +3 -3
  224. package/package.json +29 -29
  225. package/panda.buildinfo.json +342 -299
  226. package/styles-min.css +1 -1
  227. package/styles-xyflow.css +1 -1
  228. package/styles.css +1 -1
  229. package/dist/context/DefaultMantineProvider.d.ts +0 -2
  230. package/dist/context/DefaultMantineProvider.js +0 -48
  231. package/dist/likec4diagram/ui/sequence-outline/state.js +0 -55
  232. package/dist/navigationpanel/controls/DetailsControls.d.ts +0 -2
  233. package/dist/navigationpanel/controls/DetailsControls.js +0 -223
@@ -106,8 +106,8 @@ function DeploymentNode(props) {
106
106
  });
107
107
  }
108
108
  var compoundHasDrifts = css({
109
- outlineColor: "likec4.compare.manual.outline",
110
- outlineWidth: "4px",
109
+ outlineColor: "likec4.compare.outline",
110
+ outlineWidth: "extra",
111
111
  outlineStyle: "dashed",
112
112
  outlineOffset: "1.5"
113
113
  });
@@ -116,8 +116,9 @@ var hasDrifts = (props) => {
116
116
  };
117
117
  function CompoundElementNode(props) {
118
118
  const { enableElementDetails, enableReadOnly, enableCompareWithLatest } = useEnabledFeatures();
119
+ const showDrifts = enableCompareWithLatest && hasDrifts(props);
119
120
  return /* @__PURE__ */ jsxs(CompoundNodeContainer, {
120
- className: enableCompareWithLatest && hasDrifts(props) ? compoundHasDrifts : void 0,
121
+ className: showDrifts ? compoundHasDrifts : void 0,
121
122
  nodeProps: props,
122
123
  children: [
123
124
  enableCompareWithLatest && /* @__PURE__ */ jsx(NodeDrifts, { nodeProps: props }),
@@ -134,8 +135,9 @@ function CompoundElementNode(props) {
134
135
  }
135
136
  function CompoundDeploymentNode(props) {
136
137
  const { enableElementDetails, enableReadOnly, enableCompareWithLatest } = useEnabledFeatures();
138
+ const showDrifts = enableCompareWithLatest && hasDrifts(props);
137
139
  return /* @__PURE__ */ jsxs(CompoundNodeContainer, {
138
- className: enableCompareWithLatest && hasDrifts(props) ? compoundHasDrifts : void 0,
140
+ className: showDrifts ? compoundHasDrifts : void 0,
139
141
  nodeProps: props,
140
142
  children: [
141
143
  enableCompareWithLatest && /* @__PURE__ */ jsx(NodeDrifts, { nodeProps: props }),
@@ -152,8 +154,9 @@ function CompoundDeploymentNode(props) {
152
154
  }
153
155
  function ViewGroupNode(props) {
154
156
  const { enableCompareWithLatest } = useEnabledFeatures();
157
+ const showDrifts = enableCompareWithLatest && hasDrifts(props);
155
158
  return /* @__PURE__ */ jsxs(CompoundNodeContainer, {
156
- className: enableCompareWithLatest && hasDrifts(props) ? compoundHasDrifts : void 0,
159
+ className: showDrifts ? compoundHasDrifts : void 0,
157
160
  nodeProps: props,
158
161
  children: [
159
162
  enableCompareWithLatest && /* @__PURE__ */ jsx(NodeDrifts, { nodeProps: props }),
@@ -73,7 +73,7 @@ function ColorSwatches({ theme, elementColor, onColorPreview, onChange }) {
73
73
  openDelay: 1e3,
74
74
  closeDelay: 300,
75
75
  children: [/* @__PURE__ */ jsx(Flex$1, {
76
- maxW: "120px",
76
+ maxW: "[120px]",
77
77
  gap: "1.5",
78
78
  justify: "flex-start",
79
79
  align: "flex-start",
@@ -107,7 +107,7 @@ function ColorSwatches({ theme, elementColor, onColorPreview, onChange }) {
107
107
  }, color))
108
108
  }), /* @__PURE__ */ jsx(Flex$1, {
109
109
  mt: "sm",
110
- maxW: "110px",
110
+ maxW: "[110px]",
111
111
  gap: "1.5",
112
112
  justify: "flex-start",
113
113
  align: "flex-start",
@@ -1,6 +1,6 @@
1
1
  import "../../../../_virtual/_rolldown/runtime.js";
2
2
  import { stopPropagation } from "../../../../utils/xyflow.js";
3
- import { useDiagramContext } from "../../../../hooks/useDiagram.js";
3
+ import { selectDiagramContext, useDiagramSelector } from "../../../../hooks/safeContext.js";
4
4
  import { toolbarTitle } from "./styles.css.js";
5
5
  import { cx } from "@likec4/styles/css";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -9,20 +9,21 @@ import { Paper, Text } from "@mantine/core";
9
9
  import { useDebouncedValue } from "@mantine/hooks";
10
10
  import { Box as Box$1, HStack, VStack } from "@likec4/styles/jsx";
11
11
  //#region src/likec4diagram/custom/nodes/toolbar/Toolbar.tsx
12
- var selectSelectedNodesCount = (context) => {
12
+ var selectSelectedNodesCount = selectDiagramContext((context) => {
13
13
  return context.xynodes.filter((x) => x.selected).length;
14
- };
14
+ });
15
15
  var useSelectedNodesCount = () => {
16
- return useDiagramContext(selectSelectedNodesCount);
16
+ return useDiagramSelector(selectSelectedNodesCount);
17
17
  };
18
18
  function Toolbar({ title, children, nodeProps, ...props }) {
19
19
  const selectedNodesCount = useSelectedNodesCount();
20
20
  const { selected = false, dragging = false, data: { hovered = false } } = nodeProps;
21
21
  const _isToolbarVisible = hovered && selectedNodesCount === 0 || selected && selectedNodesCount === 1;
22
22
  let delay = 150;
23
- if (_isToolbarVisible) if (selected) delay = 100;
24
- else delay = 1e3;
25
- else if (selectedNodesCount > 0) delay = 50;
23
+ if (_isToolbarVisible) {
24
+ if (selected) delay = 100;
25
+ else delay = 1e3;
26
+ } else if (selectedNodesCount > 0) delay = 50;
26
27
  const [isToolbarVisible] = useDebouncedValue(_isToolbarVisible, delay);
27
28
  if (!isToolbarVisible) return null;
28
29
  return /* @__PURE__ */ jsx(NodeToolbar, {
@@ -35,7 +36,7 @@ function Toolbar({ title, children, nodeProps, ...props }) {
35
36
  pb: 8,
36
37
  pt: 4,
37
38
  radius: "sm",
38
- shadow: "xl",
39
+ shadow: "lg",
39
40
  onDoubleClickCapture: stopPropagation,
40
41
  onPointerDown: stopPropagation,
41
42
  onClick: stopPropagation,
@@ -4,7 +4,7 @@ var toolbarTitle = css({
4
4
  color: "text.dimmed",
5
5
  fontSize: "xxs",
6
6
  fontWeight: "bold",
7
- maxWidth: "220px",
7
+ maxWidth: "[220px]",
8
8
  cursor: "default",
9
9
  userSelect: "all",
10
10
  textOverflow: "ellipsis",
@@ -134,7 +134,6 @@ var RelationshipPopover = memo(() => {
134
134
  var getEdgeLabelElement = (edgeId, container) => {
135
135
  return container?.querySelector(`.likec4-edge-label[data-edge-id="${edgeId}"]`) ?? container?.querySelector(`.likec4-edge-middle-point[data-edge-id="${edgeId}"]`) ?? null;
136
136
  };
137
- var POPOVER_PADDING = 8;
138
137
  var RelationshipPopoverInternal = ({ viewId, diagramEdge, direct, nested, sourceNode, targetNode, onMouseEnter, onMouseLeave }) => {
139
138
  const ref = useRef(null);
140
139
  const { enableNavigateTo, enableVscode } = useEnabledFeatures();
@@ -180,7 +179,7 @@ var RelationshipPopoverInternal = ({ viewId, diagramEdge, direct, nested, source
180
179
  })}px`
181
180
  });
182
181
  } }),
183
- hide({ padding: POPOVER_PADDING * 2 })
182
+ hide({ padding: 16 })
184
183
  ]
185
184
  }).then(({ x, y, middlewareData }) => {
186
185
  if (wasCanceled) return;
@@ -230,6 +229,8 @@ var RelationshipPopoverInternal = ({ viewId, diagramEdge, direct, nested, source
230
229
  } },
231
230
  className: cx(css({
232
231
  layerStyle: "likec4.dropdown",
232
+ border: "subtle",
233
+ rounded: "sm",
233
234
  p: "0",
234
235
  pointerEvents: {
235
236
  base: "all",
@@ -1,6 +1,6 @@
1
1
  import { Color } from '@likec4/core/types';
2
2
  import { PropsWithChildren } from 'react';
3
- import { StyledComponent } from '../../../styled-system/types';
3
+ import { StyledComponent } from '@likec4/styles/types';
4
4
  export declare const Endpoint: ({ children, likec4color }: PropsWithChildren<{
5
5
  likec4color: Color;
6
6
  }>) => import("react").JSX.Element;
@@ -12,7 +12,7 @@ var Endpoint = ({ children, likec4color }) => {
12
12
  whiteSpace: "nowrap",
13
13
  overflow: "hidden",
14
14
  textOverflow: "ellipsis",
15
- maxWidth: "160px",
15
+ truncate: true,
16
16
  paddingX: "1",
17
17
  paddingY: "0.5",
18
18
  rounded: "xs",
@@ -25,6 +25,10 @@ var Endpoint = ({ children, likec4color }) => {
25
25
  _dark: "var(--likec4-palette-loContrast)"
26
26
  }
27
27
  }),
28
+ style: {
29
+ minWidth: 0,
30
+ maxWidth: 160
31
+ },
28
32
  children
29
33
  });
30
34
  };
@@ -35,7 +39,7 @@ var RelationshipTitle = styled("div", { base: {
35
39
  userSelect: "all",
36
40
  overflowWrap: "anywhere",
37
41
  wordBreak: "break-word",
38
- minWidth: 0
42
+ minWidth: "0"
39
43
  } });
40
44
  //#endregion
41
45
  export { Endpoint, RelationshipTitle };
@@ -1,14 +1,19 @@
1
1
  import { DiagramView, DynamicViewDisplayVariant, WhereOperator } from '@likec4/core/types';
2
2
  import { PropsWithChildren } from 'react';
3
- import { ViewPaddings } from '../../LikeC4Diagram.props';
4
- export declare function DiagramActorProvider({ id, view, zoomable, pannable, nodesDraggable, nodesSelectable, fitViewPadding, where, children, dynamicViewVariant: _defaultVariant, }: PropsWithChildren<{
3
+ import { RelationshipBrowserScope, ViewPaddings } from '../../LikeC4Diagram.props';
4
+ export declare function DiagramActorProvider({ id, view, zoomable, pannable, fitView, initialZoom, nodesDraggable, nodesSelectable, fitViewPadding, where, minZoom, maxZoom, children, dynamicViewVariant: _defaultVariant, relationshipBrowserScope, }: PropsWithChildren<{
5
5
  id: string;
6
6
  view: DiagramView;
7
7
  zoomable: boolean;
8
8
  pannable: boolean;
9
+ fitView: boolean;
10
+ initialZoom?: number | undefined;
11
+ minZoom?: number | undefined;
12
+ maxZoom?: number | undefined;
9
13
  nodesDraggable: boolean;
10
14
  nodesSelectable: boolean;
11
15
  fitViewPadding: ViewPaddings;
12
16
  where?: WhereOperator | null;
13
17
  dynamicViewVariant?: DynamicViewDisplayVariant | undefined;
18
+ relationshipBrowserScope: RelationshipBrowserScope;
14
19
  }>): import("react").JSX.Element;
@@ -1,4 +1,5 @@
1
1
  import "../../_virtual/_rolldown/runtime.js";
2
+ import { MinZoom } from "../../base/const.js";
2
3
  import { useUpdateEffect } from "../../hooks/useUpdateEffect.js";
3
4
  import { useDiagramEventHandlersRef } from "../../context/DiagramEventHandlers.js";
4
5
  import { DiagramFeatures, useEnabledFeatures } from "../../context/DiagramFeatures.js";
@@ -14,7 +15,7 @@ import { useStoreApi } from "@xyflow/react";
14
15
  import { isNullish } from "remeda";
15
16
  import { useActorRef } from "@xstate/react";
16
17
  //#region src/likec4diagram/state/DiagramActorProvider.tsx
17
- function DiagramActorProvider({ id, view, zoomable, pannable, nodesDraggable, nodesSelectable, fitViewPadding, where = null, children, dynamicViewVariant: _defaultVariant }) {
18
+ function DiagramActorProvider({ id, view, zoomable, pannable, fitView, initialZoom, nodesDraggable, nodesSelectable, fitViewPadding, where = null, minZoom = MinZoom, maxZoom = 3, children, dynamicViewVariant: _defaultVariant, relationshipBrowserScope }) {
18
19
  const xystore = useStoreApi();
19
20
  const editor = useEditorActorLogic();
20
21
  const features = useEnabledFeatures();
@@ -26,12 +27,17 @@ function DiagramActorProvider({ id, view, zoomable, pannable, nodesDraggable, no
26
27
  view,
27
28
  zoomable,
28
29
  pannable,
30
+ fitView,
31
+ initialZoom,
32
+ minZoom,
33
+ maxZoom,
29
34
  fitViewPadding,
30
35
  nodesDraggable,
31
36
  nodesSelectable,
32
37
  where,
33
38
  features,
34
- dynamicViewVariant: _defaultVariant
39
+ dynamicViewVariant: _defaultVariant,
40
+ relationshipBrowserScope
35
41
  }
36
42
  });
37
43
  const actorRef = useRef(actor);
@@ -54,18 +60,28 @@ function DiagramActorProvider({ id, view, zoomable, pannable, nodesDraggable, no
54
60
  zoomable,
55
61
  where,
56
62
  pannable,
63
+ fitView,
64
+ initialZoom,
65
+ minZoom,
66
+ maxZoom,
57
67
  fitViewPadding,
58
68
  nodesDraggable,
59
- nodesSelectable
69
+ nodesSelectable,
70
+ relationshipBrowserScope
60
71
  }
61
72
  }), [
62
73
  actor,
63
74
  zoomable,
64
75
  where,
65
76
  pannable,
77
+ fitView,
78
+ initialZoom,
79
+ minZoom,
80
+ maxZoom,
66
81
  fitViewPadding,
67
82
  nodesDraggable,
68
- nodesSelectable
83
+ nodesSelectable,
84
+ relationshipBrowserScope
69
85
  ]);
70
86
  useUpdateEffect(() => {
71
87
  if (!_defaultVariant) return;
@@ -86,7 +86,7 @@ function resetEdgeControlPoints(nodeLookup, edge) {
86
86
  if (source === target) {
87
87
  const loopSize = 80;
88
88
  const centerOfTopBoundary = vector(0, source.height || 0).multiply(-.5).add(sourceCenter);
89
- return [centerOfTopBoundary.add(vector(-80 / 2.5, -80)).round().toObject(), centerOfTopBoundary.add(vector(loopSize / 2.5, -80)).round().toObject()];
89
+ return [centerOfTopBoundary.add(vector(-32, -80)).round().toObject(), centerOfTopBoundary.add(vector(loopSize / 2.5, -80)).round().toObject()];
90
90
  }
91
91
  const sourceToTargetVector = targetCenter.subtract(sourceCenter);
92
92
  const sourceBorderPoint = getBorderPointOnVector(source, sourceCenter, sourceToTargetVector);
@@ -1,5 +1,4 @@
1
1
  import "../../_virtual/_rolldown/runtime.js";
2
- import { bezierControlPoints, isSamePoint } from "../../utils/xyflow.js";
3
2
  import { calcViewBounds } from "../../utils/view-bounds.js";
4
3
  import { hasAtLeast, map } from "remeda";
5
4
  import { getNodeDimensions } from "@xyflow/system";
@@ -7,7 +6,6 @@ import { getNodeDimensions } from "@xyflow/system";
7
6
  function createViewChange(parentContext) {
8
7
  const { view: { drifts: _1, _layout: _2, ...view }, xynodes, xystore } = parentContext;
9
8
  const { nodeLookup, edgeLookup } = xystore.getState();
10
- const movedNodes = /* @__PURE__ */ new Set();
11
9
  const nodes = map(view.nodes, (node) => {
12
10
  const internal = nodeLookup.get(node.id);
13
11
  if (!internal) {
@@ -17,7 +15,6 @@ function createViewChange(parentContext) {
17
15
  const xynodedata = xynodes.find((n) => n.data.id === node.id)?.data ?? internal.data;
18
16
  const position = internal.internals.positionAbsolute;
19
17
  const { width, height } = getNodeDimensions(internal);
20
- if (!isSamePoint(position, node) || node.width !== width || node.height !== height) movedNodes.add(node.id);
21
18
  return {
22
19
  ...node,
23
20
  shape: xynodedata.shape,
@@ -36,9 +33,7 @@ function createViewChange(parentContext) {
36
33
  return edge;
37
34
  }
38
35
  const data = xyedge.data;
39
- let controlPoints = data.controlPoints ?? [];
40
- const sourceOrTargetMoved = movedNodes.has(xyedge.source) || movedNodes.has(xyedge.target);
41
- if (controlPoints.length === 0 && sourceOrTargetMoved) controlPoints = bezierControlPoints(data.points);
36
+ const controlPoints = data.controlPoints ?? [];
42
37
  const _updated = {
43
38
  ...edge,
44
39
  points: data.points
@@ -3,7 +3,7 @@ import { RefObject } from 'react';
3
3
  import { PartialDeep } from 'type-fest';
4
4
  import { TogglableFeature } from '../../context/DiagramFeatures';
5
5
  import { EditorActorRef } from '../../editor/actor/machine';
6
- import { OpenSourceParams } from '../../LikeC4Diagram.props';
6
+ import { OpenSourceParams, RelationshipBrowserScope } from '../../LikeC4Diagram.props';
7
7
  import { OverlaysActorRef } from '../../overlays/overlaysActor';
8
8
  import { SearchActorRef } from '../../search/searchActor';
9
9
  import { Types } from '../types';
@@ -69,7 +69,7 @@ export declare class DiagramApi<A extends Any = Unknown> {
69
69
  /**
70
70
  * Open relationships browser
71
71
  */
72
- openRelationshipsBrowser(fqn: Fqn<A>): void;
72
+ openRelationshipsBrowser(fqn: Fqn<A>, scope?: RelationshipBrowserScope): void;
73
73
  /**
74
74
  * If running in editor, trigger opening source file
75
75
  */
@@ -88,10 +88,11 @@ var DiagramApi = class DiagramApi {
88
88
  /**
89
89
  * Open relationships browser
90
90
  */
91
- openRelationshipsBrowser(fqn) {
91
+ openRelationshipsBrowser(fqn, scope) {
92
92
  this.send({
93
93
  type: "open.relationshipsBrowser",
94
- fqn
94
+ fqn,
95
+ ...scope && { scope }
95
96
  });
96
97
  }
97
98
  /**
@@ -1,10 +1,10 @@
1
1
  import "../../_virtual/_rolldown/runtime.js";
2
2
  import { Base } from "../../base/Base.js";
3
+ import { convertToXYFlow } from "../convert-to-xyflow.js";
3
4
  import { findDiagramEdge, findDiagramNode, typedSystem, viewBounds } from "./utils.js";
4
5
  import { machine } from "./machine.setup.js";
5
6
  import { createLayoutConstraints } from "../useLayoutConstraints.js";
6
7
  import { focusNodesEdges, mergeXYNodesEdges, resetEdgeControlPoints } from "./assign.js";
7
- import { convertToXYFlow } from "../convert-to-xyflow.js";
8
8
  import { getAligner, toNodeRect } from "./aligners.js";
9
9
  import { assignViewportBefore, cancelFitDiagram, centerOnNodeOrEdge, fitDiagram, fitFocusedBounds, raiseFitDiagram, raiseSetViewport, raiseUpdateView, returnViewportBefore, setViewport, setViewportCenter } from "./machine.actions.layout.js";
10
10
  import { hasAtLeast, isTruthy, mapToObj } from "remeda";
@@ -13,6 +13,7 @@ import { BBox as BBox$1 } from "@likec4/core/geometry";
13
13
  import { difference as difference$1, isString as isString$1 } from "@likec4/core/utils";
14
14
  import { nodeToRect } from "@xyflow/system";
15
15
  import { assertEvent } from "xstate";
16
+ import { getViewFolderPath } from "@likec4/core/model";
16
17
  import { produce } from "immer";
17
18
  //#region src/likec4diagram/state/machine.actions.ts
18
19
  var resetSelection = () => machine.raise({ type: "xyflow.resetSelection" });
@@ -231,7 +232,7 @@ var emitOnLayoutTypeChange = () => machine.enqueueActions(({ event, system, cont
231
232
  return;
232
233
  }
233
234
  if (context.toggledFeatures.enableCompareWithLatest === true) {
234
- if (currentLayoutType === "manual" && nextLayoutType === "auto") typedSystem(system).editorActorRef?.send({ type: "cancel" });
235
+ if (currentLayoutType === "manual" && nextLayoutType === "auto") enqueue.sendTo(typedSystem.editorActor, { type: "cancel" });
235
236
  const currentViewport = context.viewport;
236
237
  if (currentLayoutType === "auto") enqueue.assign({ viewportOnAutoLayout: currentViewport });
237
238
  if (currentLayoutType === "manual") enqueue.assign({ viewportOnManualLayout: currentViewport });
@@ -250,7 +251,8 @@ var layoutAlign = (params) => machine.createAction(({ context, event }) => {
250
251
  }
251
252
  const xystore = nonNullable(context.xystore, "xystore is not initialized");
252
253
  const { nodeLookup, parentLookup } = xystore.getState();
253
- const nodesToAlign = [...difference$1(new Set(nodeLookup.values().filter((n) => n.selected).map((n) => n.id)), new Set(parentLookup.keys()))];
254
+ const selectedNodes = new Set(nodeLookup.values().filter((n) => n.selected).map((n) => n.id));
255
+ const nodesToAlign = [...difference$1(selectedNodes, new Set(parentLookup.keys()))];
254
256
  if (!hasAtLeast(nodesToAlign, 2)) {
255
257
  console.warn("At least 2 nodes must be selected to align");
256
258
  return;
@@ -307,8 +309,9 @@ var notationsHighlight = () => machine.assign(({ context, event }) => {
307
309
  });
308
310
  var tagHighlight = () => machine.assign(({ context, event }) => {
309
311
  assertEvent(event, "tag.highlight");
312
+ const tag = event.tag.startsWith("#") ? event.tag.slice(1) : event.tag;
310
313
  return { xynodes: context.xynodes.map((n) => {
311
- if (n.data.tags?.includes(event.tag)) return Base.setDimmed(n, false);
314
+ if (n.data.tags && n.data.tags.includes(tag)) return Base.setDimmed(n, false);
312
315
  return Base.setDimmed(n, true);
313
316
  }) };
314
317
  });
@@ -476,7 +479,7 @@ var openOverlay = () => machine.enqueueActions(({ context, event, enqueue, check
476
479
  type: "open.relationshipsBrowser",
477
480
  subject: event.fqn,
478
481
  viewId: context.view.id,
479
- scope: "view",
482
+ scope: event.scope ?? context.relationshipBrowserScope,
480
483
  closeable: true,
481
484
  enableChangeScope: true,
482
485
  enableSelectSubject: true
@@ -536,12 +539,13 @@ var ensureNavigationPanelActor = () => machine.enqueueActions(({ enqueue, check,
536
539
  const enabled = check("enabled: NavigationPanel");
537
540
  const running = typedSystem(system).navigationActorRef;
538
541
  if (enabled && !running) {
542
+ const viewFolder = context.view.title ? getViewFolderPath(context.view.title) : "";
539
543
  enqueue.spawnChild("navigationPanel", {
540
544
  id: "navigationPanel",
541
545
  systemId: "navigationPanel",
542
546
  input: {
543
- view: context.view,
544
- viewModel: null
547
+ viewId: context.view.id,
548
+ viewFolder: viewFolder ?? ""
545
549
  },
546
550
  syncSnapshot: true
547
551
  });
@@ -737,7 +741,10 @@ var updateView = () => machine.enqueueActions(({ enqueue, event, context }) => {
737
741
  let recenter = !context.viewportChangedManually && !context.focusedNode && !context.activeWalkthrough;
738
742
  recenter = recenter || context.toggledFeatures.enableCompareWithLatest === true && !!nextView._layout && context.view._layout !== nextView._layout;
739
743
  if (nextView._type === "dynamic" && context.view._type === "dynamic") {
740
- if (nextView.variant === context.view.variant && nextView.variant !== context.dynamicViewVariant) enqueue(setViewportCenter(BBox$1.center(viewBounds(context, nextView))));
744
+ if (nextView.variant === context.view.variant && nextView.variant !== context.dynamicViewVariant) {
745
+ const nextCenter = BBox$1.center(viewBounds(context, nextView));
746
+ enqueue(setViewportCenter(nextCenter));
747
+ }
741
748
  }
742
749
  if (recenter) {
743
750
  enqueue(cancelFitDiagram());
@@ -225,6 +225,7 @@ export declare const centerOnNodeOrEdge: () => ActionFunction<Context, Events, E
225
225
  export declare const fitDiagram: (params?: {
226
226
  duration?: number;
227
227
  bounds?: BBox;
228
+ zoom?: number | undefined;
228
229
  }) => ActionFunction<Context, Events, Events, unknown, {
229
230
  src: "search";
230
231
  logic: SearchActorLogic;
@@ -1,5 +1,4 @@
1
1
  import "../../_virtual/_rolldown/runtime.js";
2
- import { MinZoom } from "../../base/const.js";
3
2
  import { calcEdgeBounds } from "../../utils/view-bounds.js";
4
3
  import { activeSequenceBounds, focusedBounds, getEdgeBounds, viewBounds } from "./utils.js";
5
4
  import { isActiveSequenceWalkthrough, machine } from "./machine.setup.js";
@@ -77,15 +76,16 @@ var centerOnNodeOrEdge = () => machine.raise(({ context, event }) => {
77
76
  bounds: getNodesBounds([node], xystate)
78
77
  };
79
78
  });
80
- function fitBoundsInViewport(context, bounds, duration) {
79
+ function fitBoundsInViewport(context, bounds, duration, zoom) {
81
80
  let { width, height, panZoom, transform } = nonNullable(context.xystore).getState();
82
81
  let left = void 0;
83
82
  if (isActiveSequenceWalkthrough(context)) {
84
83
  left = context.activeWalkthrough.outlinePanelWidth;
85
84
  width -= left;
86
85
  }
87
- const maxZoom = calcMaxZoom(context, transform);
88
- const viewport = getViewportForBounds(bounds, width, height, MinZoom, maxZoom, context.fitViewPadding);
86
+ const minZoom = zoom ?? context.minZoom;
87
+ const maxZoom = zoom ?? calcMaxZoom(context, transform);
88
+ const viewport = getViewportForBounds(bounds, width, height, minZoom, maxZoom, context.fitViewPadding);
89
89
  viewport.x = Math.round(viewport.x);
90
90
  viewport.y = Math.round(viewport.y);
91
91
  if (left !== void 0) viewport.x += left;
@@ -100,16 +100,18 @@ function fitBoundsInViewport(context, bounds, duration) {
100
100
  var fitDiagram = (params) => machine.createAction(({ context, event }) => {
101
101
  let bounds;
102
102
  let duration;
103
+ let zoom;
103
104
  if (params) {
104
105
  bounds = params.bounds;
105
106
  duration = params.duration;
107
+ zoom = params.zoom;
106
108
  } else if (event.type === "xyflow.fitDiagram") {
107
109
  bounds = event.bounds;
108
110
  duration = event.duration;
109
111
  }
110
112
  bounds ??= viewBounds(context);
111
113
  duration ??= 450;
112
- fitBoundsInViewport(context, bounds, duration);
114
+ fitBoundsInViewport(context, bounds, duration, zoom);
113
115
  });
114
116
  var fitFocusedBounds = (params) => machine.createAction(({ context }) => {
115
117
  let { bounds, duration = 450 } = !!context.activeWalkthrough ? activeSequenceBounds({ context }) : focusedBounds({ context });
@@ -6,7 +6,7 @@ import { PartialDeep } from 'type-fest';
6
6
  import { ActorRefFromLogic, StateMachine, StateValue, SetupReturn, NonReducibleUnknown, MetaObject } from 'xstate';
7
7
  import { EnabledFeatures, TogglableFeature } from '../../context/DiagramFeatures';
8
8
  import { XYFlowInstance, XYStoreApi } from '../../hooks/useXYFlow';
9
- import { OpenSourceParams, ViewPaddings } from '../../LikeC4Diagram.props';
9
+ import { OpenSourceParams, RelationshipBrowserScope, ViewPaddings } from '../../LikeC4Diagram.props';
10
10
  import { Types } from '../types';
11
11
  import { AlignmentMode } from './aligners';
12
12
  import { HotKeyEvent, HotkeyActorLogic } from './hotkeyActor';
@@ -40,17 +40,23 @@ export interface Input {
40
40
  xystore: XYStoreApi;
41
41
  zoomable: boolean;
42
42
  pannable: boolean;
43
+ fitView?: boolean | undefined;
44
+ initialZoom?: number | undefined;
45
+ minZoom?: number | undefined;
46
+ maxZoom?: number | undefined;
43
47
  nodesDraggable: boolean;
44
48
  nodesSelectable: boolean;
45
49
  fitViewPadding: ViewPaddings;
46
50
  where: WhereOperator | null;
47
51
  dynamicViewVariant?: DynamicViewDisplayVariant | undefined;
52
+ relationshipBrowserScope?: RelationshipBrowserScope | undefined;
48
53
  features?: EnabledFeatures;
49
54
  }
50
55
  export type ToggledFeatures = {
51
56
  [P in `enable${TogglableFeature}`]?: boolean;
52
57
  };
53
58
  export interface Context extends Input {
59
+ relationshipBrowserScope: RelationshipBrowserScope;
54
60
  xynodes: Types.Node[];
55
61
  xyedges: Types.Edge[];
56
62
  features: EnabledFeatures;
@@ -100,6 +106,8 @@ export interface Context extends Input {
100
106
  collapsedSequenceFlows: {
101
107
  [flowId: StepPath]: boolean;
102
108
  };
109
+ minZoom: number;
110
+ maxZoom: number;
103
111
  }
104
112
  export declare function Context({ input }: {
105
113
  input: Input;
@@ -206,6 +214,7 @@ export type Events = HotKeyEvent | MediaPrintEvent | {
206
214
  } | {
207
215
  type: 'open.relationshipsBrowser';
208
216
  fqn: Fqn;
217
+ scope?: RelationshipBrowserScope | undefined;
209
218
  } | {
210
219
  type: 'open.search';
211
220
  search?: string;
@@ -1,4 +1,5 @@
1
1
  import "../../_virtual/_rolldown/runtime.js";
2
+ import "../../base/const.js";
2
3
  import { DefaultFeatures } from "../../context/DiagramFeatures.js";
3
4
  import { defineActors } from "../../utils/defineActors.js";
4
5
  import { editorActorLogic } from "../../editor/actor/machine.js";
@@ -16,6 +17,8 @@ import { assertEvent, setup } from "xstate";
16
17
  function Context({ input }) {
17
18
  return {
18
19
  ...input,
20
+ fitView: input.fitView ?? true,
21
+ relationshipBrowserScope: input.relationshipBrowserScope ?? "view",
19
22
  xynodes: [],
20
23
  xyedges: [],
21
24
  features: {
@@ -51,7 +54,9 @@ function Context({ input }) {
51
54
  xyflow: null,
52
55
  dynamicViewVariant: input.dynamicViewVariant ?? (input.view._type === "dynamic" ? input.view.variant : "diagram") ?? "diagram",
53
56
  activeWalkthrough: null,
54
- collapsedSequenceFlows: {}
57
+ collapsedSequenceFlows: {},
58
+ minZoom: input.minZoom ?? .05,
59
+ maxZoom: input.maxZoom ?? 3
55
60
  };
56
61
  }
57
62
  var deriveToggledFeatures = (context) => {
@@ -67,6 +72,14 @@ var isReadOnly = (context) => deriveToggledFeatures(context).enableReadOnly;
67
72
  function isActiveSequenceWalkthrough(context) {
68
73
  return isDynamicView(context.view) && context.dynamicViewVariant === "sequence" && !!context.activeWalkthrough && hasProp(context.view, "flow");
69
74
  }
75
+ var actors = defineActors({
76
+ hotkey: hotkeyActorLogic,
77
+ overlays: overlaysActorLogic,
78
+ search: searchActorLogic,
79
+ mediaPrint: mediaPrintActorLogic,
80
+ editor: editorActorLogic,
81
+ navigationPanel: navigationPanelActorLogic
82
+ });
70
83
  var machine = setup({
71
84
  types: {
72
85
  context: {},
@@ -75,14 +88,7 @@ var machine = setup({
75
88
  events: {},
76
89
  emitted: {}
77
90
  },
78
- actors: defineActors({
79
- hotkey: hotkeyActorLogic,
80
- overlays: overlaysActorLogic,
81
- search: searchActorLogic,
82
- mediaPrint: mediaPrintActorLogic,
83
- editor: editorActorLogic,
84
- navigationPanel: navigationPanelActorLogic
85
- }),
91
+ actors,
86
92
  guards: {
87
93
  "isReady": ({ context }) => context.initialized.xydata && context.initialized.xyflow,
88
94
  "enabled: Editor": ({ context }) => context.features.enableEditor,
@@ -96,7 +96,7 @@ export declare const initializing: {
96
96
  export declare const isReady: {
97
97
  always: ({
98
98
  guard: "isReady";
99
- actions: ( ActionFunction<Context, Events, Events, unknown, {
99
+ actions: ActionFunction<Context, Events, Events, undefined, {
100
100
  src: "search";
101
101
  logic: SearchActorLogic;
102
102
  id: "search";
@@ -198,31 +198,7 @@ export declare const isReady: {
198
198
  } | {
199
199
  type: "click: active walkthrough step";
200
200
  params: unknown;
201
- }, never, EmittedEvents> | ActionFunction<Context, Events, Events, undefined, {
202
- src: "search";
203
- logic: SearchActorLogic;
204
- id: "search";
205
- } | {
206
- src: "hotkey";
207
- logic: HotkeyActorLogic;
208
- id: "hotkey";
209
- } | {
210
- src: "overlays";
211
- logic: OverlaysActorLogic;
212
- id: "overlays";
213
- } | {
214
- src: "mediaPrint";
215
- logic: MediaPrintActorLogic;
216
- id: "mediaPrint";
217
- } | {
218
- src: "editor";
219
- logic: EditorActorLogic;
220
- id: "editor";
221
- } | {
222
- src: "navigationPanel";
223
- logic: NavigationPanelActorLogic;
224
- id: "navigationPanel";
225
- }, never, never, never, never> | ActionFunction<Context, Events, Events, undefined, never, never, never, never, EmittedEvents>)[];
201
+ }, never, EmittedEvents>;
226
202
  target: string;
227
203
  } | {
228
204
  target: string;