@likec4/diagram 1.18.0 → 1.19.1

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 (277) hide show
  1. package/LICENSE +1 -1
  2. package/dist/LikeC4CustomColors.d.ts +7 -0
  3. package/dist/LikeC4CustomColors.js +30 -0
  4. package/dist/LikeC4Diagram.css.d.ts +5 -0
  5. package/dist/LikeC4Diagram.css.js +13 -0
  6. package/dist/LikeC4Diagram.d.ts +6 -0
  7. package/dist/LikeC4Diagram.js +194 -0
  8. package/dist/LikeC4Diagram.props.d.ts +166 -0
  9. package/dist/LikeC4ModelProvider.d.ts +9 -0
  10. package/dist/LikeC4ModelProvider.js +12 -0
  11. package/dist/LikeC4Search.css.d.ts +1 -0
  12. package/dist/LikeC4Search.css.js +5 -0
  13. package/dist/LikeC4Search.d.ts +2 -0
  14. package/dist/LikeC4Search.js +96 -0
  15. package/dist/StaticLikeC4Diagram.d.ts +3 -0
  16. package/dist/StaticLikeC4Diagram.js +41 -0
  17. package/dist/_virtual/_commonjsHelpers.js +6 -0
  18. package/dist/controls/Text.d.ts +2 -0
  19. package/dist/controls/Text.js +7 -0
  20. package/dist/controls/action-button-bar/ActionButtonBar.css.d.ts +1 -0
  21. package/dist/controls/action-button-bar/ActionButtonBar.css.js +5 -0
  22. package/dist/controls/action-button-bar/ActionButtonBar.d.ts +9 -0
  23. package/dist/controls/action-button-bar/ActionButtonBar.js +100 -0
  24. package/dist/controls/action-button-bar/useActionButtonBarCtx.d.ts +10 -0
  25. package/dist/controls/action-button-bar/useActionButtonBarCtx.js +9 -0
  26. package/dist/controls/action-buttons/ActionButton.css.d.ts +1 -0
  27. package/dist/controls/action-buttons/ActionButton.css.js +5 -0
  28. package/dist/controls/action-buttons/ActionButton.d.ts +9 -0
  29. package/dist/controls/action-buttons/ActionButton.js +66 -0
  30. package/dist/controls/action-buttons/ActionButtons.d.ts +12 -0
  31. package/dist/controls/action-buttons/ActionButtons.js +99 -0
  32. package/dist/globals.css.d.ts +1 -0
  33. package/dist/globals.css.js +92 -0
  34. package/dist/hooks/index.d.ts +5 -0
  35. package/dist/hooks/useDiagramState.d.ts +6 -0
  36. package/dist/hooks/useDiagramState.js +27 -0
  37. package/dist/hooks/useMantinePortalProps.d.ts +9 -0
  38. package/dist/hooks/useMantinePortalProps.js +9 -0
  39. package/dist/hooks/useSetState.d.ts +2 -0
  40. package/dist/hooks/useSetState.js +19 -0
  41. package/dist/hooks/useUpdateEffect.d.ts +4 -0
  42. package/dist/hooks/useUpdateEffect.js +32 -0
  43. package/dist/hooks/useXYFlow.d.ts +270 -0
  44. package/dist/hooks/useXYFlow.js +20 -0
  45. package/dist/index.d.ts +11 -0
  46. package/dist/index.js +25 -0
  47. package/dist/likec4model/LikeC4ModelContext.d.ts +3 -0
  48. package/dist/likec4model/LikeC4ModelContext.js +5 -0
  49. package/dist/likec4model/index.d.ts +2 -0
  50. package/dist/likec4model/useLikeC4ElementsTree.d.ts +12 -0
  51. package/dist/likec4model/useLikeC4ElementsTree.js +25 -0
  52. package/dist/likec4model/useLikeC4Model.d.ts +20 -0
  53. package/dist/likec4model/useLikeC4Model.js +55 -0
  54. package/dist/overlays/OverlayContext.d.ts +10 -0
  55. package/dist/overlays/OverlayContext.js +9 -0
  56. package/dist/overlays/Overlays.css.d.ts +3 -0
  57. package/dist/overlays/Overlays.css.js +7 -0
  58. package/dist/overlays/Overlays.d.ts +2 -0
  59. package/dist/overlays/Overlays.js +137 -0
  60. package/dist/overlays/edge-details/EdgeDetailsXYFlow.d.ts +5 -0
  61. package/dist/overlays/edge-details/EdgeDetailsXYFlow.js +185 -0
  62. package/dist/overlays/edge-details/SelectEdge.css.d.ts +7 -0
  63. package/dist/overlays/edge-details/SelectEdge.css.js +17 -0
  64. package/dist/overlays/edge-details/SelectEdge.d.ts +5 -0
  65. package/dist/overlays/edge-details/SelectEdge.js +129 -0
  66. package/dist/overlays/edge-details/_types.d.ts +14 -0
  67. package/dist/overlays/edge-details/use-layouted-edge-details.d.ts +21 -0
  68. package/dist/overlays/edge-details/use-layouted-edge-details.js +270 -0
  69. package/dist/overlays/edge-details/xyflow/CompoundNode.d.ts +5 -0
  70. package/dist/overlays/edge-details/xyflow/CompoundNode.js +76 -0
  71. package/dist/overlays/edge-details/xyflow/ElementNode.d.ts +5 -0
  72. package/dist/overlays/edge-details/xyflow/ElementNode.js +159 -0
  73. package/dist/overlays/edge-details/xyflow/RelationshipEdge.d.ts +3 -0
  74. package/dist/overlays/edge-details/xyflow/RelationshipEdge.js +84 -0
  75. package/dist/overlays/edge-details/xyflow/styles.css.d.ts +9 -0
  76. package/dist/overlays/edge-details/xyflow/styles.css.js +21 -0
  77. package/dist/overlays/element-details/ElementDetailsCard.css.d.ts +16 -0
  78. package/dist/overlays/element-details/ElementDetailsCard.css.js +33 -0
  79. package/dist/overlays/element-details/ElementDetailsCard.d.ts +7 -0
  80. package/dist/overlays/element-details/ElementDetailsCard.js +484 -0
  81. package/dist/overlays/element-details/TabPanelDeployments.css.d.ts +4 -0
  82. package/dist/overlays/element-details/TabPanelDeployments.css.js +11 -0
  83. package/dist/overlays/element-details/TabPanelDeployments.d.ts +7 -0
  84. package/dist/overlays/element-details/TabPanelDeployments.js +173 -0
  85. package/dist/overlays/element-details/TabPanelRelationships.css.d.ts +5 -0
  86. package/dist/overlays/element-details/TabPanelRelationships.css.js +11 -0
  87. package/dist/overlays/element-details/TabPanelRelationships.d.ts +8 -0
  88. package/dist/overlays/element-details/TabPanelRelationships.js +157 -0
  89. package/dist/overlays/element-details/TabPanelStructure.css.d.ts +2 -0
  90. package/dist/overlays/element-details/TabPanelStructure.css.js +7 -0
  91. package/dist/overlays/element-details/TabPanelStructure.d.ts +25 -0
  92. package/dist/overlays/element-details/TabPanelStructure.js +91 -0
  93. package/dist/overlays/index.d.ts +1 -0
  94. package/dist/overlays/relationships-of/RelationshipsOverlay.d.ts +5 -0
  95. package/dist/overlays/relationships-of/RelationshipsOverlay.js +193 -0
  96. package/dist/overlays/relationships-of/RelationshipsXYFlow.d.ts +19 -0
  97. package/dist/overlays/relationships-of/RelationshipsXYFlow.js +290 -0
  98. package/dist/overlays/relationships-of/SelectElement.css.d.ts +2 -0
  99. package/dist/overlays/relationships-of/SelectElement.css.js +7 -0
  100. package/dist/overlays/relationships-of/SelectElement.d.ts +7 -0
  101. package/dist/overlays/relationships-of/SelectElement.js +126 -0
  102. package/dist/overlays/relationships-of/_types.d.ts +28 -0
  103. package/dist/overlays/relationships-of/use-layouted-relationships.d.ts +22 -0
  104. package/dist/overlays/relationships-of/use-layouted-relationships.js +496 -0
  105. package/dist/overlays/relationships-of/xyflow/CompoundNode.d.ts +6 -0
  106. package/dist/overlays/relationships-of/xyflow/CompoundNode.js +120 -0
  107. package/dist/overlays/relationships-of/xyflow/ElementNode.d.ts +6 -0
  108. package/dist/overlays/relationships-of/xyflow/ElementNode.js +194 -0
  109. package/dist/overlays/relationships-of/xyflow/EmptyNode.d.ts +5 -0
  110. package/dist/overlays/relationships-of/xyflow/EmptyNode.js +18 -0
  111. package/dist/overlays/relationships-of/xyflow/RelationshipEdge.d.ts +3 -0
  112. package/dist/overlays/relationships-of/xyflow/RelationshipEdge.js +123 -0
  113. package/dist/overlays/relationships-of/xyflow/styles.css.d.ts +14 -0
  114. package/dist/overlays/relationships-of/xyflow/styles.css.js +24 -0
  115. package/dist/overlays/shared/xyflow/RelationshipEdge.css.d.ts +4 -0
  116. package/dist/overlays/shared/xyflow/RelationshipEdge.css.js +12 -0
  117. package/dist/overlays/shared/xyflow/_types.d.ts +77 -0
  118. package/dist/state/DiagramContext.d.ts +1609 -0
  119. package/dist/state/DiagramContext.js +101 -0
  120. package/dist/state/aligners.d.ts +42 -0
  121. package/dist/state/aligners.js +349 -0
  122. package/dist/state/diagram-to-xyflow.d.ts +11 -0
  123. package/dist/state/diagram-to-xyflow.js +113 -0
  124. package/dist/state/diagramStore.d.ts +1705 -0
  125. package/dist/state/diagramStore.js +808 -0
  126. package/dist/state/diagramStore.layout.d.ts +4 -0
  127. package/dist/state/diagramStore.layout.js +56 -0
  128. package/dist/style.css +1 -0
  129. package/dist/theme-vars.css.d.ts +72 -0
  130. package/dist/theme-vars.css.js +6 -0
  131. package/dist/theme-vars.css.ts.vanilla.css.js +1 -0
  132. package/dist/theme-vars.d.ts +3 -0
  133. package/dist/theme-vars.js +5 -0
  134. package/dist/ui/DiagramTitlePanel.css.d.ts +4 -0
  135. package/dist/ui/DiagramTitlePanel.css.js +11 -0
  136. package/dist/ui/DiagramTitlePanel.d.ts +1 -0
  137. package/dist/ui/DiagramTitlePanel.js +159 -0
  138. package/dist/ui/DynamicViewWalkthrough.css.d.ts +4 -0
  139. package/dist/ui/DynamicViewWalkthrough.css.js +11 -0
  140. package/dist/ui/DynamicViewWalkthrough.d.ts +1 -0
  141. package/dist/ui/DynamicViewWalkthrough.js +156 -0
  142. package/dist/ui/EnsureMantine.d.ts +7 -0
  143. package/dist/ui/EnsureMantine.js +14 -0
  144. package/dist/ui/FramerMotionConfig.d.ts +2 -0
  145. package/dist/ui/FramerMotionConfig.js +14 -0
  146. package/dist/ui/Link.d.ts +4 -0
  147. package/dist/ui/Link.js +36 -0
  148. package/dist/ui/notation/NotationPanel.css.d.ts +6 -0
  149. package/dist/ui/notation/NotationPanel.css.js +16 -0
  150. package/dist/ui/notation/NotationPanel.d.ts +1 -0
  151. package/dist/ui/notation/NotationPanel.js +250 -0
  152. package/dist/ui/notation/index.d.ts +1 -0
  153. package/dist/ui/top-left/ChangeAutoLayoutButton.d.ts +2 -0
  154. package/dist/ui/top-left/ChangeAutoLayoutButton.js +159 -0
  155. package/dist/ui/top-left/ManualLayoutToolsButton.d.ts +2 -0
  156. package/dist/ui/top-left/ManualLayoutToolsButton.js +137 -0
  157. package/dist/ui/top-left/TopLeftPanel.d.ts +4 -0
  158. package/dist/ui/top-left/TopLeftPanel.js +211 -0
  159. package/dist/ui/top-left/_shared.d.ts +7 -0
  160. package/dist/ui/top-left/_shared.js +22 -0
  161. package/dist/ui/top-left/styles.css.d.ts +8 -0
  162. package/dist/ui/top-left/styles.css.js +17 -0
  163. package/dist/utils/types.d.ts +8 -0
  164. package/dist/utils/vector.d.ts +24 -0
  165. package/dist/utils/vector.js +55 -0
  166. package/dist/xyflow/EdgeMarkers.d.ts +12 -0
  167. package/dist/xyflow/EdgeMarkers.js +192 -0
  168. package/dist/xyflow/FitviewOnDiagramChange.d.ts +4 -0
  169. package/dist/xyflow/FitviewOnDiagramChange.js +72 -0
  170. package/dist/xyflow/SelectEdgesOnNodeFocus.d.ts +1 -0
  171. package/dist/xyflow/SelectEdgesOnNodeFocus.js +96 -0
  172. package/dist/xyflow/XYFlow.d.ts +8 -0
  173. package/dist/xyflow/XYFlow.js +145 -0
  174. package/dist/xyflow/XYFlowBackground.d.ts +10 -0
  175. package/dist/xyflow/XYFlowBackground.js +25 -0
  176. package/dist/xyflow/XYFlowInner.d.ts +8 -0
  177. package/dist/xyflow/XYFlowInner.js +41 -0
  178. package/dist/xyflow/const.d.ts +7 -0
  179. package/dist/xyflow/const.js +12 -0
  180. package/dist/xyflow/edges/EdgeLabel.d.ts +7 -0
  181. package/dist/xyflow/edges/EdgeLabel.js +160 -0
  182. package/dist/xyflow/edges/RelationshipEdge.d.ts +6 -0
  183. package/dist/xyflow/edges/RelationshipEdge.js +443 -0
  184. package/dist/xyflow/edges/RelationshipsDropdownMenu.css.d.ts +4 -0
  185. package/dist/xyflow/edges/RelationshipsDropdownMenu.css.js +11 -0
  186. package/dist/xyflow/edges/RelationshipsDropdownMenu.d.ts +13 -0
  187. package/dist/xyflow/edges/RelationshipsDropdownMenu.js +211 -0
  188. package/dist/xyflow/edges/edges.css.d.ts +17 -0
  189. package/dist/xyflow/edges/edges.css.js +37 -0
  190. package/dist/xyflow/edges/utils.d.ts +16 -0
  191. package/dist/xyflow/edges/utils.js +24 -0
  192. package/dist/xyflow/nodes/AnimateVariants.d.ts +1313 -0
  193. package/dist/xyflow/nodes/AnimateVariants.js +123 -0
  194. package/dist/xyflow/nodes/Node.css.d.ts +3 -0
  195. package/dist/xyflow/nodes/Node.css.js +9 -0
  196. package/dist/xyflow/nodes/compound/CompoundNode.css.d.ts +14 -0
  197. package/dist/xyflow/nodes/compound/CompoundNode.css.js +27 -0
  198. package/dist/xyflow/nodes/compound/CompoundNode.d.ts +6 -0
  199. package/dist/xyflow/nodes/compound/CompoundNode.js +216 -0
  200. package/dist/xyflow/nodes/compound/index.d.ts +1 -0
  201. package/dist/xyflow/nodes/element/ElementLink.css.d.ts +3 -0
  202. package/dist/xyflow/nodes/element/ElementLink.d.ts +6 -0
  203. package/dist/xyflow/nodes/element/ElementNode.d.ts +6 -0
  204. package/dist/xyflow/nodes/element/ElementNode.js +190 -0
  205. package/dist/xyflow/nodes/element/ElementShapeSvg.d.ts +17 -0
  206. package/dist/xyflow/nodes/element/ElementShapeSvg.js +175 -0
  207. package/dist/xyflow/nodes/element/element.css.d.ts +18 -0
  208. package/dist/xyflow/nodes/element/element.css.js +31 -0
  209. package/dist/xyflow/nodes/element/index.d.ts +1 -0
  210. package/dist/xyflow/nodes/shared/ElementIcon.d.ts +8 -0
  211. package/dist/xyflow/nodes/shared/ElementIcon.js +38 -0
  212. package/dist/xyflow/nodes/shared/Toolbar.d.ts +9 -0
  213. package/dist/xyflow/nodes/shared/Toolbar.js +436 -0
  214. package/dist/xyflow/types.d.ts +36 -0
  215. package/dist/xyflow/useLayoutConstraints.d.ts +42 -0
  216. package/dist/xyflow/useLayoutConstraints.js +226 -0
  217. package/dist/xyflow/useXYFlowEvents.d.ts +160 -0
  218. package/dist/xyflow/useXYFlowEvents.js +275 -0
  219. package/dist/xyflow/utils.d.ts +22 -0
  220. package/dist/xyflow/utils.js +72 -0
  221. package/package.json +34 -27
  222. package/src/LikeC4Diagram.tsx +4 -4
  223. package/src/LikeC4Search.css.ts +12 -0
  224. package/src/LikeC4Search.tsx +39 -90
  225. package/src/controls/Text.ts +5 -0
  226. package/src/controls/action-button-bar/ActionButtonBar.css.ts +13 -0
  227. package/src/controls/action-button-bar/ActionButtonBar.tsx +138 -0
  228. package/src/controls/action-button-bar/useActionButtonBarCtx.ts +13 -0
  229. package/src/controls/action-buttons/ActionButton.css.ts +29 -0
  230. package/src/controls/action-buttons/ActionButton.tsx +66 -0
  231. package/src/controls/action-buttons/ActionButtons.tsx +138 -0
  232. package/src/hooks/useXYFlow.ts +8 -8
  233. package/src/index.ts +12 -6
  234. package/src/likec4model/index.ts +12 -2
  235. package/src/overlays/edge-details/EdgeDetailsXYFlow.tsx +18 -12
  236. package/src/overlays/edge-details/_types.ts +13 -37
  237. package/src/overlays/edge-details/use-layouted-edge-details.ts +16 -14
  238. package/src/overlays/edge-details/xyflow/CompoundNode.tsx +3 -11
  239. package/src/overlays/edge-details/xyflow/ElementNode.tsx +4 -11
  240. package/src/overlays/edge-details/xyflow/RelationshipEdge.tsx +3 -3
  241. package/src/overlays/edge-details/xyflow/styles.css.ts +1 -59
  242. package/src/overlays/relationships-of/RelationshipsXYFlow.tsx +23 -23
  243. package/src/overlays/relationships-of/_types.ts +20 -58
  244. package/src/overlays/relationships-of/use-layouted-relationships.ts +36 -40
  245. package/src/overlays/relationships-of/xyflow/CompoundNode.tsx +9 -13
  246. package/src/overlays/relationships-of/xyflow/ElementNode.tsx +12 -15
  247. package/src/overlays/relationships-of/xyflow/EmptyNode.tsx +4 -7
  248. package/src/overlays/relationships-of/xyflow/RelationshipEdge.tsx +16 -14
  249. package/src/overlays/shared/xyflow/RelationshipEdge.css.ts +60 -0
  250. package/src/overlays/shared/xyflow/_types.ts +87 -0
  251. package/src/state/diagram-to-xyflow.ts +6 -7
  252. package/src/state/diagramStore.layout.ts +3 -4
  253. package/src/state/diagramStore.ts +35 -37
  254. package/src/theme-vars.css.ts +81 -0
  255. package/src/theme-vars.ts +8 -81
  256. package/src/ui/DiagramTitlePanel.tsx +6 -6
  257. package/src/utils/types.ts +6 -0
  258. package/src/xyflow/SelectEdgesOnNodeFocus.tsx +3 -3
  259. package/src/xyflow/XYFlow.tsx +2 -2
  260. package/src/xyflow/edges/EdgeLabel.tsx +25 -18
  261. package/src/xyflow/edges/RelationshipEdge.tsx +5 -3
  262. package/src/xyflow/edges/RelationshipsDropdownMenu.tsx +3 -3
  263. package/src/xyflow/edges/edges.css.ts +68 -74
  264. package/src/xyflow/edges/utils.ts +6 -6
  265. package/src/xyflow/nodes/AnimateVariants.ts +143 -0
  266. package/src/xyflow/nodes/Node.css.ts +44 -0
  267. package/src/xyflow/nodes/compound/CompoundNode.css.ts +1 -64
  268. package/src/xyflow/nodes/compound/CompoundNode.tsx +69 -182
  269. package/src/xyflow/nodes/element/ElementLink.tsx +2 -3
  270. package/src/xyflow/nodes/element/ElementNode.tsx +64 -266
  271. package/src/xyflow/nodes/element/element.css.ts +0 -57
  272. package/src/xyflow/nodes/shared/Toolbar.tsx +30 -30
  273. package/src/xyflow/types.ts +48 -51
  274. package/src/xyflow/useLayoutConstraints.ts +9 -9
  275. package/src/xyflow/useXYFlowEvents.ts +13 -30
  276. package/src/xyflow/utils.ts +2 -2
  277. package/src/xyflow/nodes/use-animate-variants.tsx +0 -64
@@ -0,0 +1,156 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { nonNullable } from "@likec4/core";
3
+ import { Box, Button, Badge, ButtonGroup } from "@mantine/core";
4
+ import { useHotkeys } from "@mantine/hooks";
5
+ import { IconPlayerPlayFilled, IconPlayerSkipBackFilled, IconPlayerStopFilled, IconPlayerSkipForwardFilled } from "@tabler/icons-react";
6
+ import clsx from "clsx";
7
+ import { AnimatePresence, m } from "framer-motion";
8
+ import { isNonNull, isTruthy, first } from "remeda";
9
+ import { parallelStateFrame, container, buttons, btn } from "./DynamicViewWalkthrough.css.js";
10
+ import { useXYStore } from "../hooks/useXYFlow.js";
11
+ import { useDiagramState, useDiagramStoreApi } from "../hooks/useDiagramState.js";
12
+ function DynamicViewWalkthrough() {
13
+ const isMobile = useXYStore((s) => s.width <= 750);
14
+ const {
15
+ nextDynamicStep,
16
+ stopDynamicView,
17
+ isActive,
18
+ isParallel,
19
+ hasNext,
20
+ hasPrevious
21
+ } = useDiagramState((s) => {
22
+ var _a, _b, _c;
23
+ return {
24
+ nextDynamicStep: s.nextDynamicStep,
25
+ stopDynamicView: s.stopWalkthrough,
26
+ isActive: isNonNull(s.activeWalkthrough),
27
+ isParallel: isTruthy((_a = s.activeWalkthrough) == null ? void 0 : _a.parallelPrefix),
28
+ hasNext: ((_b = s.activeWalkthrough) == null ? void 0 : _b.hasNext) ?? false,
29
+ hasPrevious: ((_c = s.activeWalkthrough) == null ? void 0 : _c.hasPrevious) ?? false
30
+ };
31
+ });
32
+ const diagramApi = useDiagramStoreApi();
33
+ useHotkeys(
34
+ isActive ? [
35
+ ["ArrowLeft", () => nextDynamicStep(-1)],
36
+ ["ArrowRight", () => nextDynamicStep()],
37
+ ["Escape", (e) => {
38
+ e.stopImmediatePropagation();
39
+ stopDynamicView();
40
+ }, { preventDefault: true }]
41
+ ] : [
42
+ ["ArrowLeft", () => nextDynamicStep()],
43
+ ["ArrowRight", () => nextDynamicStep()]
44
+ ]
45
+ );
46
+ const buttonProps = {
47
+ className: btn,
48
+ size: isMobile ? "compact-md" : "lg",
49
+ radius: isMobile ? "lg" : "xl"
50
+ };
51
+ const startWalkthrough = (e) => {
52
+ e.stopPropagation();
53
+ const {
54
+ xyedges,
55
+ activateWalkthrough
56
+ } = diagramApi.getState();
57
+ const firstEdge = nonNullable(first(xyedges), "expected at least one edge");
58
+ activateWalkthrough(firstEdge.data.edge.id);
59
+ };
60
+ const nextStep = (increment = 1) => (e) => {
61
+ e.stopPropagation();
62
+ nextDynamicStep(increment);
63
+ };
64
+ return /* @__PURE__ */ jsxs(AnimatePresence, { children: [
65
+ isParallel && /* @__PURE__ */ jsx(
66
+ Box,
67
+ {
68
+ layout: true,
69
+ component: m.div,
70
+ initial: { opacity: 0 },
71
+ animate: { opacity: 1 },
72
+ exit: { opacity: 0 },
73
+ className: clsx("react-flow__panel", parallelStateFrame)
74
+ },
75
+ "parallel-frame"
76
+ ),
77
+ /* @__PURE__ */ jsxs(
78
+ Box,
79
+ {
80
+ className: clsx("react-flow__panel", container),
81
+ onClick: (e) => e.stopPropagation(),
82
+ onDoubleClick: (e) => e.stopPropagation(),
83
+ children: [
84
+ !isActive && /* @__PURE__ */ jsx(
85
+ Button,
86
+ {
87
+ ...buttonProps,
88
+ className: clsx(buttons, btn),
89
+ rightSection: /* @__PURE__ */ jsx(IconPlayerPlayFilled, {}),
90
+ onClick: startWalkthrough,
91
+ px: "xl",
92
+ children: "Start"
93
+ }
94
+ ),
95
+ isParallel && /* @__PURE__ */ jsx(
96
+ Badge,
97
+ {
98
+ component: m.div,
99
+ initial: { opacity: 0.05, transform: "translateY(20px)" },
100
+ animate: { opacity: 1, transform: "translateY(0)" },
101
+ exit: {
102
+ opacity: 0,
103
+ transform: "translateY(20px)"
104
+ },
105
+ variant: "gradient",
106
+ size: isMobile ? "xs" : "md",
107
+ gradient: { from: "red", to: "orange", deg: 90 },
108
+ radius: "sm",
109
+ children: "parallel"
110
+ },
111
+ "parallel-badge"
112
+ ),
113
+ isActive && /* @__PURE__ */ jsxs(ButtonGroup, { className: buttons, children: [
114
+ /* @__PURE__ */ jsx(
115
+ Button,
116
+ {
117
+ ...buttonProps,
118
+ pl: "lg",
119
+ disabled: !hasPrevious,
120
+ onClick: nextStep(-1),
121
+ children: /* @__PURE__ */ jsx(IconPlayerSkipBackFilled, {})
122
+ }
123
+ ),
124
+ /* @__PURE__ */ jsxs(
125
+ Button,
126
+ {
127
+ ...buttonProps,
128
+ px: hasNext ? "md" : "xl",
129
+ onClick: (e) => {
130
+ e.stopPropagation();
131
+ stopDynamicView();
132
+ },
133
+ children: [
134
+ hasNext && /* @__PURE__ */ jsx(IconPlayerStopFilled, {}),
135
+ !hasNext && "End"
136
+ ]
137
+ }
138
+ ),
139
+ hasNext && /* @__PURE__ */ jsx(
140
+ Button,
141
+ {
142
+ ...buttonProps,
143
+ pr: "lg",
144
+ onClick: nextStep(),
145
+ children: /* @__PURE__ */ jsx(IconPlayerSkipForwardFilled, {})
146
+ }
147
+ )
148
+ ] })
149
+ ]
150
+ }
151
+ )
152
+ ] });
153
+ }
154
+ export {
155
+ DynamicViewWalkthrough
156
+ };
@@ -0,0 +1,7 @@
1
+ import { PropsWithChildren } from 'react';
2
+ type EnsureMantineProps = PropsWithChildren<{}>;
3
+ export declare function EnsureMantine({ children }: EnsureMantineProps): import("react/jsx-runtime").JSX.Element;
4
+ export declare namespace EnsureMantine {
5
+ var displayName: string;
6
+ }
7
+ export {};
@@ -0,0 +1,14 @@
1
+ import { jsx, Fragment } from "react/jsx-runtime";
2
+ import { MantineContext } from "@mantine/core";
3
+ import { useContext } from "react";
4
+ function EnsureMantine({ children }) {
5
+ const mantineCtx = useContext(MantineContext);
6
+ if (!mantineCtx) {
7
+ throw new Error("LikeC4Diagram must be a child of MantineProvider");
8
+ }
9
+ return /* @__PURE__ */ jsx(Fragment, { children });
10
+ }
11
+ EnsureMantine.displayName = "EnsureMantine";
12
+ export {
13
+ EnsureMantine
14
+ };
@@ -0,0 +1,2 @@
1
+ import { PropsWithChildren } from 'react';
2
+ export declare const FramerMotionConfig: ({ children }: PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,14 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { useMantineStyleNonce } from "@mantine/core";
3
+ import { useId } from "@mantine/hooks";
4
+ import { LazyMotion, domMax, MotionConfig, LayoutGroup } from "framer-motion";
5
+ import "react";
6
+ const FramerMotionConfig = ({ children }) => {
7
+ var _a;
8
+ const layoutId = useId();
9
+ const nonce = (_a = useMantineStyleNonce()) == null ? void 0 : _a();
10
+ return /* @__PURE__ */ jsx(LazyMotion, { features: domMax, strict: true, children: /* @__PURE__ */ jsx(MotionConfig, { reducedMotion: "user", ...nonce && { nonce }, children: /* @__PURE__ */ jsx(LayoutGroup, { id: layoutId, children }) }) });
11
+ };
12
+ export {
13
+ FramerMotionConfig
14
+ };
@@ -0,0 +1,4 @@
1
+ import { Link } from '@likec4/core';
2
+ export declare function Link({ link }: {
3
+ link: Link;
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,36 @@
1
+ import { jsx, Fragment, jsxs } from "react/jsx-runtime";
2
+ import { Group, Box, Anchor, CopyButton, Button } from "@mantine/core";
3
+ function Link({ link }) {
4
+ return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(Group, { wrap: "nowrap", align: "center", gap: "sm", children: [
5
+ /* @__PURE__ */ jsx(Box, { flex: "1", style: { overflow: "hidden" }, children: /* @__PURE__ */ jsx(
6
+ Anchor,
7
+ {
8
+ href: link.url,
9
+ target: "_blank",
10
+ fz: "xs",
11
+ truncate: "end",
12
+ display: "inline-block",
13
+ w: "100%",
14
+ onClick: (e) => e.stopPropagation(),
15
+ children: link.title || link.url
16
+ }
17
+ ) }),
18
+ /* @__PURE__ */ jsx(CopyButton, { value: link.url, children: ({ copied, copy }) => /* @__PURE__ */ jsx(
19
+ Button,
20
+ {
21
+ size: "compact-xs",
22
+ fz: "10",
23
+ variant: "light",
24
+ onClick: (e) => {
25
+ e.stopPropagation();
26
+ copy();
27
+ },
28
+ color: copied ? "teal" : "gray",
29
+ children: copied ? "copied" : "copy"
30
+ }
31
+ ) })
32
+ ] }, link.url) });
33
+ }
34
+ export {
35
+ Link
36
+ };
@@ -0,0 +1,6 @@
1
+ export declare const container: string;
2
+ export declare const card: string;
3
+ export declare const tabPanel: string;
4
+ export declare const elementNotation: string;
5
+ export declare const shapeSvg: string;
6
+ export declare const shapeBadge: string;
@@ -0,0 +1,16 @@
1
+ /* empty css */
2
+ /* empty css */
3
+ var container = "_1ncdyfa0";
4
+ var card = "_1ncdyfa1";
5
+ var tabPanel = "_1ncdyfa2";
6
+ var elementNotation = "_1ncdyfa3";
7
+ var shapeSvg = "_1ncdyfa4";
8
+ var shapeBadge = "_1ncdyfa5";
9
+ export {
10
+ card,
11
+ container,
12
+ elementNotation,
13
+ shapeBadge,
14
+ shapeSvg,
15
+ tabPanel
16
+ };
@@ -0,0 +1 @@
1
+ export declare function NotationPanel(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,250 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import "@likec4/core";
3
+ import { Tooltip, ThemeIcon, ActionIcon, Paper, Tabs, TabsList, TabsTab, TabsPanel, ScrollAreaAutosize, Stack, Card, Group, Box, Badge, Text } from "@mantine/core";
4
+ import { useLocalStorage } from "@mantine/hooks";
5
+ import { IconAlertTriangle, IconHelpCircle, IconArrowDownRight } from "@tabler/icons-react";
6
+ import clsx from "clsx";
7
+ import { AnimatePresence, m } from "framer-motion";
8
+ import { useState } from "react";
9
+ import { ceil, isNonNullish, isNullish } from "remeda";
10
+ import { useDiagramState, useDiagramStoreApi } from "../../hooks/useDiagramState.js";
11
+ import { useMantinePortalProps } from "../../hooks/useMantinePortalProps.js";
12
+ import { ElementShapeSvg } from "../../xyflow/nodes/element/ElementShapeSvg.js";
13
+ import { container, card, tabPanel, elementNotation, shapeSvg, shapeBadge } from "./NotationPanel.css.js";
14
+ import { vars } from "../../theme-vars.css.js";
15
+ import { useXYStore } from "../../hooks/useXYFlow.js";
16
+ const ElementNotation = ({ value }) => {
17
+ const {
18
+ title,
19
+ color = "primary",
20
+ shape = "rectangle"
21
+ } = value;
22
+ const [onlyKind, setOnlyKind] = useState(null);
23
+ const diagramStore = useDiagramStoreApi();
24
+ const w = 300;
25
+ const h = 200;
26
+ return /* @__PURE__ */ jsx(
27
+ Card,
28
+ {
29
+ shadow: "none",
30
+ px: "xs",
31
+ py: "sm",
32
+ className: elementNotation,
33
+ mod: {
34
+ "data-likec4-color": color
35
+ },
36
+ onMouseEnter: () => {
37
+ setOnlyKind(null);
38
+ diagramStore.getState().highlightByElementNotation(value);
39
+ },
40
+ onMouseLeave: () => {
41
+ setOnlyKind(null);
42
+ diagramStore.setState({ dimmed: /* @__PURE__ */ new Set() });
43
+ },
44
+ children: /* @__PURE__ */ jsxs(
45
+ Group,
46
+ {
47
+ gap: "sm",
48
+ align: "stretch",
49
+ wrap: "nowrap",
50
+ children: [
51
+ /* @__PURE__ */ jsx(
52
+ Box,
53
+ {
54
+ flex: "0 0 70px",
55
+ style: {
56
+ width: 70,
57
+ height: ceil(70 * (h / w), 0)
58
+ },
59
+ children: /* @__PURE__ */ jsx(
60
+ "svg",
61
+ {
62
+ className: clsx(
63
+ shapeSvg
64
+ ),
65
+ viewBox: `0 0 ${w} ${h}`,
66
+ children: /* @__PURE__ */ jsx(
67
+ ElementShapeSvg,
68
+ {
69
+ shape,
70
+ w,
71
+ h
72
+ }
73
+ )
74
+ }
75
+ )
76
+ }
77
+ ),
78
+ /* @__PURE__ */ jsxs(Stack, { gap: 4, flex: 1, children: [
79
+ /* @__PURE__ */ jsx(Group, { gap: 4, flex: "0 0 auto", children: value.kinds.map((kind) => /* @__PURE__ */ jsx(
80
+ Badge,
81
+ {
82
+ className: shapeBadge,
83
+ onMouseEnter: () => {
84
+ setOnlyKind(kind);
85
+ diagramStore.getState().highlightByElementNotation(value, kind);
86
+ },
87
+ onMouseLeave: () => {
88
+ setOnlyKind(null);
89
+ diagramStore.getState().highlightByElementNotation(value);
90
+ },
91
+ opacity: isNonNullish(onlyKind) && onlyKind !== kind ? 0.25 : 1,
92
+ color: isNonNullish(onlyKind) && onlyKind !== kind ? "gray" : vars.element.fill,
93
+ children: kind
94
+ },
95
+ kind
96
+ )) }),
97
+ /* @__PURE__ */ jsx(
98
+ Text,
99
+ {
100
+ component: "div",
101
+ fz: "sm",
102
+ fw: 500,
103
+ lh: "1.25",
104
+ style: {
105
+ textWrap: "pretty"
106
+ },
107
+ children: title
108
+ }
109
+ )
110
+ ] })
111
+ ]
112
+ }
113
+ )
114
+ }
115
+ );
116
+ };
117
+ const selector = (s) => {
118
+ var _a;
119
+ return {
120
+ id: s.view.id,
121
+ notations: ((_a = s.view.notation) == null ? void 0 : _a.elements) ?? [],
122
+ isVisible: isNullish(s.focusedNodeId ?? s.activeWalkthrough)
123
+ };
124
+ };
125
+ function NotationPanel() {
126
+ const height = useXYStore((s) => s.height);
127
+ const {
128
+ id,
129
+ notations,
130
+ isVisible
131
+ } = useDiagramState(selector);
132
+ const [isCollapsed, setCollapsed] = useLocalStorage({
133
+ key: "notation-webview-collapsed",
134
+ defaultValue: true
135
+ });
136
+ const hasNotations = notations.length > 0;
137
+ const portalProps = useMantinePortalProps();
138
+ return /* @__PURE__ */ jsxs(AnimatePresence, { children: [
139
+ !hasNotations && isVisible && /* @__PURE__ */ jsx(
140
+ m.div,
141
+ {
142
+ initial: { opacity: 0.75, translateX: "50%" },
143
+ animate: { opacity: 1, translateX: 0 },
144
+ exit: {
145
+ translateX: "100%",
146
+ opacity: 0.6
147
+ },
148
+ className: clsx("react-flow__panel", container),
149
+ children: /* @__PURE__ */ jsx(Tooltip, { label: "View has no notations", color: "orange", ...portalProps, children: /* @__PURE__ */ jsx(
150
+ ThemeIcon,
151
+ {
152
+ size: "lg",
153
+ variant: "light",
154
+ color: "orange",
155
+ radius: "md",
156
+ children: /* @__PURE__ */ jsx(IconAlertTriangle, {})
157
+ }
158
+ ) })
159
+ },
160
+ "empty"
161
+ ),
162
+ hasNotations && isVisible && isCollapsed && /* @__PURE__ */ jsx(
163
+ m.div,
164
+ {
165
+ initial: { opacity: 0.75, translateX: "50%" },
166
+ animate: { opacity: 1, translateX: 0 },
167
+ exit: {
168
+ translateX: "100%",
169
+ opacity: 0.6
170
+ },
171
+ className: clsx("react-flow__panel", container),
172
+ children: /* @__PURE__ */ jsx(Tooltip, { label: "Show notation", color: "dark", fz: "xs", ...portalProps, children: /* @__PURE__ */ jsx(
173
+ ActionIcon,
174
+ {
175
+ size: "lg",
176
+ variant: "default",
177
+ color: "gray",
178
+ radius: "md",
179
+ onClick: () => setCollapsed(false),
180
+ children: /* @__PURE__ */ jsx(IconHelpCircle, { stroke: 1.5 })
181
+ }
182
+ ) })
183
+ },
184
+ "collapsed"
185
+ ),
186
+ hasNotations && isVisible && !isCollapsed && /* @__PURE__ */ jsx(
187
+ m.div,
188
+ {
189
+ initial: {
190
+ opacity: 0.75,
191
+ // translateX: '50%',
192
+ scale: 0.2
193
+ },
194
+ animate: { opacity: 1, scale: 1 },
195
+ exit: {
196
+ opacity: 0,
197
+ scale: 0.25
198
+ },
199
+ className: clsx("react-flow__panel", container),
200
+ style: {
201
+ transformOrigin: "bottom right"
202
+ },
203
+ children: /* @__PURE__ */ jsx(
204
+ Paper,
205
+ {
206
+ radius: "sm",
207
+ withBorder: true,
208
+ shadow: "lg",
209
+ className: card,
210
+ children: /* @__PURE__ */ jsxs(Tabs, { defaultValue: "first", radius: "xs", children: [
211
+ /* @__PURE__ */ jsxs(TabsList, { children: [
212
+ /* @__PURE__ */ jsx(
213
+ ActionIcon,
214
+ {
215
+ size: "md",
216
+ variant: "subtle",
217
+ color: "gray",
218
+ ml: 2,
219
+ style: {
220
+ alignSelf: "center"
221
+ },
222
+ onClick: () => setCollapsed(true),
223
+ children: /* @__PURE__ */ jsx(IconArrowDownRight, { stroke: 2 })
224
+ }
225
+ ),
226
+ /* @__PURE__ */ jsx(TabsTab, { value: "first", fz: "xs", children: "Elements" }),
227
+ /* @__PURE__ */ jsx(TabsTab, { value: "second", fz: "xs", disabled: true, children: "Relationships" })
228
+ ] }),
229
+ /* @__PURE__ */ jsx(TabsPanel, { value: "first", className: tabPanel, hidden: isCollapsed, children: /* @__PURE__ */ jsx(
230
+ ScrollAreaAutosize,
231
+ {
232
+ viewportProps: {
233
+ style: {
234
+ maxHeight: `min(40vh, ${Math.max(height - 60, 50)}px)`
235
+ }
236
+ },
237
+ children: /* @__PURE__ */ jsx(Stack, { gap: 0, children: notations.map((n, i) => /* @__PURE__ */ jsx(ElementNotation, { value: n }, i)) })
238
+ }
239
+ ) })
240
+ ] })
241
+ }
242
+ )
243
+ },
244
+ id
245
+ )
246
+ ] });
247
+ }
248
+ export {
249
+ NotationPanel
250
+ };
@@ -0,0 +1 @@
1
+ export { NotationPanel as default } from './NotationPanel';
@@ -0,0 +1,2 @@
1
+ import { PopoverProps } from '@mantine/core';
2
+ export declare const ChangeAutoLayoutButton: (props: PopoverProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,159 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { Popover, PopoverTarget, PopoverDropdown, Box, FloatingIndicator, Text, Flex, UnstyledButton } from "@mantine/core";
3
+ import { useHover, useUncontrolled, clampUseMovePosition, useMove, useMergedRef } from "@mantine/hooks";
4
+ import { useDebouncedCallback } from "@react-hookz/web";
5
+ import { IconLayoutDashboard } from "@tabler/icons-react";
6
+ import { useState, forwardRef } from "react";
7
+ import { useDiagramStoreApi, useDiagramState } from "../../hooks/useDiagramState.js";
8
+ import { Tooltip, ActionIcon } from "./_shared.js";
9
+ import { autolayoutIndicator, autolayoutButton, spacingSliderBody, spacingSliderThumb } from "./styles.css.js";
10
+ const selector = (state) => ({
11
+ viewId: state.view.id,
12
+ autoLayout: state.view.autoLayout
13
+ });
14
+ const ChangeAutoLayoutButton = (props) => {
15
+ const store = useDiagramStoreApi();
16
+ const [rootRef, setRootRef] = useState(null);
17
+ const [controlsRefs, setControlsRefs] = useState({});
18
+ const {
19
+ autoLayout,
20
+ viewId
21
+ } = useDiagramState(selector);
22
+ const { ref, hovered: isSpacingHovered } = useHover();
23
+ const setControlRef = (name) => (node) => {
24
+ controlsRefs[name] = node;
25
+ setControlsRefs(controlsRefs);
26
+ };
27
+ const setAutoLayout = (direction) => (event) => {
28
+ var _a, _b;
29
+ event.stopPropagation();
30
+ (_b = (_a = store.getState()).onChange) == null ? void 0 : _b.call(_a, {
31
+ change: {
32
+ op: "change-autolayout",
33
+ layout: {
34
+ ...autoLayout,
35
+ direction
36
+ }
37
+ }
38
+ });
39
+ };
40
+ const setSpacing = (nodeSep, rankSep) => {
41
+ var _a, _b;
42
+ store.setState({
43
+ viewportChanged: false
44
+ });
45
+ (_b = (_a = store.getState()).onChange) == null ? void 0 : _b.call(_a, {
46
+ change: {
47
+ op: "change-autolayout",
48
+ layout: {
49
+ ...autoLayout,
50
+ nodeSep,
51
+ rankSep
52
+ }
53
+ }
54
+ });
55
+ };
56
+ return /* @__PURE__ */ jsxs(
57
+ Popover,
58
+ {
59
+ position: "right-start",
60
+ clickOutsideEvents: [
61
+ "pointerdown"
62
+ ],
63
+ radius: "xs",
64
+ shadow: "lg",
65
+ offset: {
66
+ mainAxis: 10
67
+ },
68
+ ...props,
69
+ children: [
70
+ /* @__PURE__ */ jsx(PopoverTarget, { children: /* @__PURE__ */ jsx(Tooltip, { label: "Change Auto Layout", children: /* @__PURE__ */ jsx(ActionIcon, { children: /* @__PURE__ */ jsx(IconLayoutDashboard, {}) }) }) }),
71
+ /* @__PURE__ */ jsx(PopoverDropdown, { className: "likec4-top-left-panel", p: 8, pt: 6, opacity: isSpacingHovered ? 0.6 : 1, children: /* @__PURE__ */ jsxs(Box, { pos: "relative", ref: setRootRef, children: [
72
+ /* @__PURE__ */ jsx(
73
+ FloatingIndicator,
74
+ {
75
+ target: controlsRefs[autoLayout.direction],
76
+ parent: rootRef,
77
+ className: autolayoutIndicator
78
+ }
79
+ ),
80
+ /* @__PURE__ */ jsx(Box, { mb: 10, children: /* @__PURE__ */ jsx(Text, { inline: true, fz: "xs", c: "dimmed", fw: 500, children: "Auto layout:" }) }),
81
+ /* @__PURE__ */ jsxs(Flex, { gap: 2, wrap: "wrap", justify: "stretch", maw: 160, children: [
82
+ /* @__PURE__ */ jsx(UnstyledButton, { className: autolayoutButton, ref: setControlRef("TB"), onClick: setAutoLayout("TB"), children: "Top-Bottom" }),
83
+ /* @__PURE__ */ jsx(UnstyledButton, { className: autolayoutButton, ref: setControlRef("BT"), onClick: setAutoLayout("BT"), children: "Bottom-Top" }),
84
+ /* @__PURE__ */ jsx(UnstyledButton, { className: autolayoutButton, ref: setControlRef("LR"), onClick: setAutoLayout("LR"), children: "Left-Right" }),
85
+ /* @__PURE__ */ jsx(UnstyledButton, { className: autolayoutButton, ref: setControlRef("RL"), onClick: setAutoLayout("RL"), children: "Right-Left" })
86
+ ] }),
87
+ /* @__PURE__ */ jsx(Box, { my: 10, children: /* @__PURE__ */ jsx(Text, { inline: true, fz: "xs", c: "dimmed", fw: 500, children: "Spacing:" }) }),
88
+ /* @__PURE__ */ jsx(
89
+ SpacingSliders,
90
+ {
91
+ ref,
92
+ isVertical: autoLayout.direction === "TB" || autoLayout.direction === "BT",
93
+ nodeSep: autoLayout.nodeSep,
94
+ rankSep: autoLayout.rankSep,
95
+ onChange: setSpacing
96
+ },
97
+ viewId
98
+ )
99
+ ] }) })
100
+ ]
101
+ }
102
+ );
103
+ };
104
+ const MAX_SPACING = 400;
105
+ const SpacingSliders = forwardRef(({
106
+ isVertical,
107
+ nodeSep,
108
+ rankSep,
109
+ onChange
110
+ }, _ref) => {
111
+ if (!isVertical) {
112
+ [nodeSep, rankSep] = [rankSep, nodeSep];
113
+ }
114
+ const propagateChange = useDebouncedCallback(
115
+ ({ x, y }) => {
116
+ if (!isVertical) {
117
+ [x, y] = [y, x];
118
+ }
119
+ onChange(Math.round(x * MAX_SPACING), Math.round(y * MAX_SPACING));
120
+ },
121
+ [onChange, isVertical],
122
+ 250,
123
+ 2e3
124
+ );
125
+ const [value, setValue] = useUncontrolled({
126
+ defaultValue: clampUseMovePosition({
127
+ x: (nodeSep ?? 100) / MAX_SPACING,
128
+ y: (rankSep ?? 120) / MAX_SPACING
129
+ }),
130
+ onChange: propagateChange
131
+ });
132
+ const { ref } = useMove(setValue);
133
+ let nodeSepValue = Math.round(value.x * MAX_SPACING);
134
+ let rankSepValue = Math.round(value.y * MAX_SPACING);
135
+ if (!isVertical) {
136
+ [nodeSepValue, rankSepValue] = [rankSepValue, nodeSepValue];
137
+ }
138
+ const mergedRef = useMergedRef(ref, _ref);
139
+ return /* @__PURE__ */ jsxs(Box, { ref: mergedRef, className: spacingSliderBody, pt: "100%", children: [
140
+ /* @__PURE__ */ jsx(
141
+ Box,
142
+ {
143
+ className: spacingSliderThumb,
144
+ style: {
145
+ left: `${value.x * 100}%`,
146
+ top: `${value.y * 100}%`
147
+ }
148
+ }
149
+ ),
150
+ /* @__PURE__ */ jsx(Box, { pos: "absolute", left: 2, bottom: 2, children: /* @__PURE__ */ jsxs(Text, { component: "div", fz: 8, c: "dimmed", fw: 500, children: [
151
+ rankSepValue,
152
+ ", ",
153
+ nodeSepValue
154
+ ] }) })
155
+ ] });
156
+ });
157
+ export {
158
+ ChangeAutoLayoutButton
159
+ };