@likec4/diagram 1.17.1 → 1.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (300) 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 +40 -31
  222. package/src/LikeC4Diagram.props.ts +21 -12
  223. package/src/LikeC4Diagram.tsx +8 -10
  224. package/src/LikeC4Search.css.ts +12 -0
  225. package/src/LikeC4Search.tsx +45 -93
  226. package/src/controls/Text.ts +5 -0
  227. package/src/controls/action-button-bar/ActionButtonBar.css.ts +13 -0
  228. package/src/controls/action-button-bar/ActionButtonBar.tsx +138 -0
  229. package/src/controls/action-button-bar/useActionButtonBarCtx.ts +13 -0
  230. package/src/controls/action-buttons/ActionButton.css.ts +29 -0
  231. package/src/controls/action-buttons/ActionButton.tsx +66 -0
  232. package/src/controls/action-buttons/ActionButtons.tsx +138 -0
  233. package/src/hooks/useDiagramState.ts +8 -3
  234. package/src/hooks/useXYFlow.ts +9 -8
  235. package/src/index.ts +12 -6
  236. package/src/likec4model/index.ts +12 -2
  237. package/src/likec4model/useLikeC4ElementsTree.ts +6 -13
  238. package/src/likec4model/useLikeC4Model.ts +21 -11
  239. package/src/overlays/Overlays.tsx +96 -63
  240. package/src/overlays/edge-details/EdgeDetailsXYFlow.tsx +18 -10
  241. package/src/overlays/edge-details/_types.ts +13 -33
  242. package/src/overlays/edge-details/use-layouted-edge-details.ts +35 -26
  243. package/src/overlays/edge-details/xyflow/CompoundNode.tsx +3 -11
  244. package/src/overlays/edge-details/xyflow/ElementNode.tsx +8 -13
  245. package/src/overlays/edge-details/xyflow/RelationshipEdge.tsx +7 -7
  246. package/src/overlays/edge-details/xyflow/styles.css.ts +1 -59
  247. package/src/overlays/element-details/ElementDetailsCard.tsx +91 -78
  248. package/src/overlays/element-details/TabPanelDeployments.css.ts +69 -0
  249. package/src/overlays/element-details/TabPanelDeployments.tsx +217 -0
  250. package/src/overlays/element-details/TabPanelRelationships.tsx +8 -9
  251. package/src/overlays/element-details/TabPanelStructure.tsx +10 -10
  252. package/src/overlays/relationships-of/RelationshipsOverlay.tsx +1 -1
  253. package/src/overlays/relationships-of/RelationshipsXYFlow.tsx +26 -34
  254. package/src/overlays/relationships-of/SelectElement.tsx +2 -2
  255. package/src/overlays/relationships-of/_types.ts +20 -58
  256. package/src/overlays/relationships-of/use-layouted-relationships.ts +54 -59
  257. package/src/overlays/relationships-of/xyflow/CompoundNode.tsx +10 -16
  258. package/src/overlays/relationships-of/xyflow/ElementNode.tsx +24 -21
  259. package/src/overlays/relationships-of/xyflow/EmptyNode.tsx +4 -7
  260. package/src/overlays/relationships-of/xyflow/RelationshipEdge.tsx +16 -15
  261. package/src/overlays/shared/xyflow/RelationshipEdge.css.ts +60 -0
  262. package/src/overlays/shared/xyflow/_types.ts +87 -0
  263. package/src/state/diagram-to-xyflow.ts +6 -7
  264. package/src/state/diagramStore.layout.ts +3 -4
  265. package/src/state/diagramStore.ts +63 -48
  266. package/src/theme-vars.css.ts +81 -0
  267. package/src/theme-vars.ts +8 -81
  268. package/src/ui/DiagramTitlePanel.tsx +7 -34
  269. package/src/ui/Link.tsx +40 -0
  270. package/src/ui/notation/NotationPanel.tsx +4 -2
  271. package/src/ui/top-left/ChangeAutoLayoutButton.tsx +2 -2
  272. package/src/ui/top-left/TopLeftPanel.tsx +5 -5
  273. package/src/utils/types.ts +6 -0
  274. package/src/xyflow/SelectEdgesOnNodeFocus.tsx +3 -3
  275. package/src/xyflow/XYFlow.tsx +2 -2
  276. package/src/xyflow/edges/EdgeLabel.tsx +26 -19
  277. package/src/xyflow/edges/RelationshipEdge.tsx +5 -3
  278. package/src/xyflow/edges/RelationshipsDropdownMenu.tsx +23 -10
  279. package/src/xyflow/edges/edges.css.ts +68 -74
  280. package/src/xyflow/edges/utils.ts +6 -6
  281. package/src/xyflow/nodes/AnimateVariants.ts +143 -0
  282. package/src/xyflow/nodes/Node.css.ts +44 -0
  283. package/src/xyflow/nodes/compound/CompoundNode.css.ts +27 -75
  284. package/src/xyflow/nodes/compound/CompoundNode.tsx +82 -163
  285. package/src/xyflow/nodes/element/ElementLink.tsx +2 -3
  286. package/src/xyflow/nodes/element/ElementNode.tsx +73 -252
  287. package/src/xyflow/nodes/element/element.css.ts +40 -64
  288. package/src/xyflow/nodes/shared/ElementIcon.tsx +1 -1
  289. package/src/xyflow/nodes/shared/Toolbar.tsx +51 -35
  290. package/src/xyflow/types.ts +48 -51
  291. package/src/xyflow/useLayoutConstraints.ts +10 -10
  292. package/src/xyflow/useXYFlowEvents.ts +31 -35
  293. package/src/xyflow/utils.ts +2 -2
  294. package/src/ui/OptionsPanel.css.ts +0 -9
  295. package/src/ui/OptionsPanel.tsx +0 -70
  296. package/src/ui/options/EdgeOptions.tsx +0 -142
  297. package/src/ui/options/NodeOptions.tsx +0 -362
  298. package/src/xyflow/nodes/element/ElementDetails.css.ts +0 -101
  299. package/src/xyflow/nodes/element/ElementDetails.tsx +0 -393
  300. package/src/xyflow/nodes/use-animate-variants.tsx +0 -64
@@ -12,6 +12,7 @@ import {
12
12
  Text,
13
13
  TooltipGroup
14
14
  } from '@mantine/core'
15
+ import { openSpotlight } from '@mantine/spotlight'
15
16
  import {
16
17
  IconAlertTriangle,
17
18
  IconChevronLeft,
@@ -31,7 +32,6 @@ import { ActionIcon, Tooltip } from './_shared'
31
32
  import { ChangeAutoLayoutButton } from './ChangeAutoLayoutButton'
32
33
  import { ManualLayoutToolsButton } from './ManualLayoutToolsButton'
33
34
  import * as css from './styles.css'
34
- import { openSpotlight } from '@mantine/spotlight'
35
35
 
36
36
  const historySelector = (s: DiagramState) => ({
37
37
  showBurgerMenu: !!s.onBurgerMenuClick,
@@ -158,7 +158,7 @@ export const TopLeftPanel = () => {
158
158
  showFitDiagram: s.controls && s.fitViewEnabled && s.zoomable && isNotWalkthrough,
159
159
  showLayoutDriftWarning: s.controls && !s.readonly && s.view.hasLayoutDrift === true && isNotActive,
160
160
  showChangeAutoLayout: s.controls && s.isEditable() && isNotActive,
161
- showGoToSource: s.controls && !!s.onOpenSourceView && isNotWalkthrough,
161
+ showGoToSource: s.controls && !!s.onOpenSource && isNotWalkthrough,
162
162
  viewportChanged: s.viewportChanged,
163
163
  showManualLayoutTools: s.controls && s.readonly !== true && s.experimentalEdgeEditing === true
164
164
  })
@@ -179,10 +179,10 @@ export const TopLeftPanel = () => {
179
179
  {showNavigationButtons && <BackwardForwardButtons />}
180
180
  <ActionIconGroup className={css.actionIconGroup} orientation="vertical">
181
181
  {enableSearch && (
182
- <Tooltip label="Search">
182
+ <Tooltip label="Search (Ctrl+F or ⌘+F)">
183
183
  <ActionIcon
184
184
  onClick={() => openSpotlight()}
185
- >
185
+ >
186
186
  <IconSearch />
187
187
  </ActionIcon>
188
188
  </Tooltip>
@@ -192,7 +192,7 @@ export const TopLeftPanel = () => {
192
192
  <ActionIcon
193
193
  onClick={e => {
194
194
  e.stopPropagation()
195
- store.getState().onOpenSourceView?.()
195
+ store.getState().onOpenSourceView()
196
196
  }}>
197
197
  <IconFileSymlink stroke={1.5} />
198
198
  </ActionIcon>
@@ -0,0 +1,6 @@
1
+ import type { Edge, Node } from '@xyflow/react'
2
+ import type { Merge } from 'type-fest'
3
+
4
+ export type AddNodeData<T extends Node, Data> = Omit<T, 'data'> & { data: Merge<T['data'], Data> }
5
+
6
+ export type AddEdgeData<T extends Edge, Data> = Omit<T, 'data'> & { data: Merge<T['data'], Data> }
@@ -5,7 +5,7 @@ import { getBoundsOfRects, getViewportForBounds } from '@xyflow/system'
5
5
  import { useUpdateEffect } from '../hooks'
6
6
  import { useDiagramState, useDiagramStoreApi } from '../hooks/useDiagramState'
7
7
  import { MinZoom } from './const'
8
- import type { XYFlowEdge, XYFlowNode } from './types'
8
+ import type { DiagramFlowTypes } from './types'
9
9
  import { nodeToRect } from './utils'
10
10
 
11
11
  export function SelectEdgesOnNodeFocus() {
@@ -22,8 +22,8 @@ export function SelectEdgesOnNodeFocus() {
22
22
  return
23
23
  }
24
24
 
25
- const edgeChanges = [] as EdgeChange<XYFlowEdge>[]
26
- const nodeChanges = [] as NodeChange<XYFlowNode>[]
25
+ const edgeChanges = [] as EdgeChange<DiagramFlowTypes.Edge>[]
26
+ const nodeChanges = [] as NodeChange<DiagramFlowTypes.Node>[]
27
27
  const {
28
28
  edgeLookup,
29
29
  nodeLookup,
@@ -8,9 +8,9 @@ import { MaxZoom, MinZoom } from './const'
8
8
  import { RelationshipEdge } from './edges/RelationshipEdge'
9
9
  import { CompoundNode } from './nodes/compound'
10
10
  import { ElementNode } from './nodes/element'
11
- import { XYFlowEdge, XYFlowNode } from './types'
12
11
  import { useLayoutConstraints } from './useLayoutConstraints'
13
12
  import { useXYFlowEvents } from './useXYFlowEvents'
13
+ import type { DiagramFlowTypes } from './types'
14
14
 
15
15
  const nodeTypes = {
16
16
  element: ElementNode,
@@ -117,7 +117,7 @@ export function XYFlow({
117
117
  // }, [])
118
118
 
119
119
  return (
120
- <ReactFlow<XYFlowNode, XYFlowEdge>
120
+ <ReactFlow<DiagramFlowTypes.Node, DiagramFlowTypes.Edge>
121
121
  className={className}
122
122
  style={style}
123
123
  {...colorMode && { colorMode }}
@@ -1,8 +1,8 @@
1
- import { extractStep, isStepEdgeId, type ViewID } from '@likec4/core'
1
+ import { type ViewId, extractStep, isStepEdgeId } from '@likec4/core'
2
2
  import {
3
+ type BoxProps,
3
4
  ActionIcon,
4
5
  Box,
5
- type BoxProps,
6
6
  Button,
7
7
  CloseButton,
8
8
  Group,
@@ -11,7 +11,7 @@ import {
11
11
  PopoverTarget,
12
12
  ScrollAreaAutosize,
13
13
  Stack,
14
- Text
14
+ Text,
15
15
  } from '@mantine/core'
16
16
  import { useDebouncedEffect } from '@react-hookz/web'
17
17
  import { IconZoomScan } from '@tabler/icons-react'
@@ -21,21 +21,21 @@ import { type PropsWithChildren, type ReactNode, useState } from 'react'
21
21
  import { isTruthy } from 'remeda'
22
22
  import { useDiagramState, useDiagramStoreApi, useMantinePortalProps } from '../../hooks'
23
23
  import { useLikeC4Model } from '../../likec4model/useLikeC4Model'
24
- import type { RelationshipData } from '../types'
24
+ import type { DiagramFlowTypes } from '../types'
25
25
  import { stopPropagation } from '../utils'
26
26
  import * as edgesCss from './edges.css'
27
27
  import { RelationshipsDropdownMenu } from './RelationshipsDropdownMenu'
28
28
 
29
29
  export interface EdgeLabelProps extends Omit<BoxProps, 'label'> {
30
30
  isDimmed: boolean
31
- edgeData: RelationshipData
31
+ edgeData: DiagramFlowTypes.DiagramEdgeData
32
32
  }
33
33
 
34
34
  export const EdgeLabel = ({
35
35
  isDimmed,
36
36
  edgeData: {
37
37
  label,
38
- edge
38
+ edge,
39
39
  },
40
40
  ...props
41
41
  }: EdgeLabelProps) => {
@@ -43,11 +43,11 @@ export const EdgeLabel = ({
43
43
  const {
44
44
  enableRelationshipDetails,
45
45
  isActiveWalkthroughStep,
46
- hasOnNavigateTo
46
+ hasOnNavigateTo,
47
47
  } = useDiagramState(s => ({
48
48
  enableRelationshipDetails: s.enableRelationshipDetails,
49
49
  isActiveWalkthroughStep: s.activeWalkthrough?.stepId === edge.id,
50
- hasOnNavigateTo: !!s.onNavigateTo
50
+ hasOnNavigateTo: !!s.onNavigateTo,
51
51
  }))
52
52
  const notes = isActiveWalkthroughStep ? (edge.notes ?? null) : null
53
53
  const stepNum = isStepEdgeId(edge.id) ? extractStep(edge.id) : null
@@ -79,13 +79,20 @@ export const EdgeLabel = ({
79
79
  {stepNum}
80
80
  </Box>
81
81
  )}
82
- {isTruthy(label?.text) && (
83
- <Box className={edgesCss.edgeLabelText}>
84
- {label.text}
85
- </Box>
86
- )}
87
- {navigateTo && <NavigateToBtn viewId={navigateTo} />}
88
- </Box>
82
+ <Stack gap={4} align="center">
83
+ {isTruthy(label?.text) && (
84
+ <Text component="div" className={edgesCss.edgeLabelText} lineClamp={5}>
85
+ {label.text}
86
+ </Text>
87
+ )}
88
+ {isTruthy(edge.technology) && (
89
+ <Text component="div" className={edgesCss.edgeLabelTechnology}>
90
+ {'[ ' + edge.technology + ' ]'}
91
+ </Text>
92
+ )}
93
+ {navigateTo && <NavigateToBtn viewId={navigateTo} />}
94
+ </Stack>
95
+ </Box>,
89
96
  )}
90
97
  </EdgeLabelRenderer>
91
98
  )
@@ -95,11 +102,11 @@ const NotePopover = ({ notes, children }: PropsWithChildren<{ notes: string }>)
95
102
  const {
96
103
  nextDynamicStep,
97
104
  hasNext,
98
- hasPrevious
105
+ hasPrevious,
99
106
  } = useDiagramState(s => ({
100
107
  nextDynamicStep: s.nextDynamicStep,
101
108
  hasNext: s.activeWalkthrough?.hasNext ?? false,
102
- hasPrevious: s.activeWalkthrough?.hasPrevious ?? false
109
+ hasPrevious: s.activeWalkthrough?.hasPrevious ?? false,
103
110
  }))
104
111
 
105
112
  const [isOpened, setIsOpened] = useState(false)
@@ -110,7 +117,7 @@ const NotePopover = ({ notes, children }: PropsWithChildren<{ notes: string }>)
110
117
  setIsOpened(true)
111
118
  },
112
119
  [],
113
- 300
120
+ 300,
114
121
  )
115
122
 
116
123
  return (
@@ -162,7 +169,7 @@ const NotePopover = ({ notes, children }: PropsWithChildren<{ notes: string }>)
162
169
  }
163
170
 
164
171
  type NavigateToBtnProps = {
165
- viewId: ViewID
172
+ viewId: ViewId
166
173
  }
167
174
 
168
175
  function NavigateToBtn({ viewId }: NavigateToBtnProps) {
@@ -20,11 +20,11 @@ import { useXYStoreApi } from '../../hooks/useXYFlow'
20
20
  import { vector, VectorImpl } from '../../utils/vector'
21
21
  import { ZIndexes } from '../const'
22
22
  import { EdgeMarkers, type EdgeMarkerType } from '../EdgeMarkers'
23
- import { type XYFlowEdge } from '../types'
24
23
  import { bezierControlPoints } from '../utils'
25
24
  import { EdgeLabel } from './EdgeLabel'
26
25
  import * as edgesCss from './edges.css'
27
26
  import { getNodeIntersectionFromCenterToPoint } from './utils'
27
+ import type { DiagramFlowTypes } from '../types'
28
28
  // import { getEdgeParams } from './utils'
29
29
 
30
30
  // function getBend(a: XYPosition, b: XYPosition, c: XYPosition, size = 8): string {
@@ -115,7 +115,9 @@ const sameControlPoints = (a: XYPosition[] | null, b: XYPosition[] | null) => {
115
115
  return a.every((ap, i) => isSamePoint(ap, b[i]!))
116
116
  }
117
117
 
118
- const isEqualProps = (prev: EdgeProps<XYFlowEdge>, next: EdgeProps<XYFlowEdge>) => (
118
+ type DiagramEdgeProps = EdgeProps<DiagramFlowTypes.Edge>
119
+
120
+ const isEqualProps = (prev: DiagramEdgeProps, next: DiagramEdgeProps) => (
119
121
  prev.id === next.id
120
122
  && eq(prev.source, next.source)
121
123
  && eq(prev.target, next.target)
@@ -134,7 +136,7 @@ const curve = d3line<XYPosition>()
134
136
  .x(d => d.x)
135
137
  .y(d => d.y)
136
138
 
137
- export const RelationshipEdge = memo<EdgeProps<XYFlowEdge>>(function RelationshipEdgeR({
139
+ export const RelationshipEdge = memo<DiagramEdgeProps>(function RelationshipEdgeR({
138
140
  id,
139
141
  data,
140
142
  sourceX,
@@ -16,13 +16,14 @@ import {
16
16
  Tooltip as MantineTooltip,
17
17
  TooltipGroup
18
18
  } from '@mantine/core'
19
- import { IconArrowRight, IconArrowsMaximize, IconFileSymlink, IconInfoCircle, IconZoomScan } from '@tabler/icons-react'
19
+ import { IconArrowRight, IconFileSymlink, IconInfoCircle, IconZoomScan } from '@tabler/icons-react'
20
20
  import clsx from 'clsx'
21
21
  import { forwardRef, Fragment, type MouseEventHandler, type PropsWithChildren, useCallback } from 'react'
22
22
  import { filter, isTruthy, map, partition, pick, pipe } from 'remeda'
23
23
  import { useDiagramState, useDiagramStoreApi, useMantinePortalProps, useXYNodesData } from '../../hooks'
24
- import type { RelationshipData } from '../types'
24
+ import { Link } from '../../ui/Link'
25
25
  import * as css from './RelationshipsDropdownMenu.css'
26
+ import type { DiagramFlowTypes } from '../types'
26
27
 
27
28
  const stopPropagation: MouseEventHandler = (e) => e.stopPropagation()
28
29
 
@@ -43,7 +44,7 @@ export function RelationshipsDropdownMenu({
43
44
  likec4model,
44
45
  children
45
46
  }: PropsWithChildren<{
46
- edge: RelationshipData['edge']
47
+ edge: DiagramFlowTypes.DiagramEdgeData['edge']
47
48
  disabled?: boolean | undefined
48
49
  likec4model: LikeC4Model
49
50
  }>) {
@@ -72,7 +73,7 @@ export function RelationshipsDropdownMenu({
72
73
  }
73
74
  }),
74
75
  filter(isTruthy),
75
- partition(r => r.relationship.source === edge.source && r.relationship.target === edge.target)
76
+ partition(r => r.source.id === edge.source && r.target.id === edge.target)
76
77
  )
77
78
 
78
79
  const onClickOpenOverlay = useCallback((e: React.MouseEvent): void => {
@@ -84,7 +85,7 @@ export function RelationshipsDropdownMenu({
84
85
  }
85
86
  }, [edge.id, openOverlay, enableRelationshipBrowser])
86
87
 
87
- const renderRelationship = (relationship: LikeC4Model.ViewModel.Relationship, index: number) => (
88
+ const renderRelationship = (relationship: LikeC4Model.AnyRelation, index: number) => (
88
89
  <Fragment key={relationship.id}>
89
90
  {index > 0 && <MenuDivider opacity={0.65} />}
90
91
  <MenuItem
@@ -155,8 +156,8 @@ export function RelationshipsDropdownMenu({
155
156
  const Relationship = forwardRef<
156
157
  HTMLDivElement,
157
158
  StackProps & {
158
- relationship: LikeC4Model.ViewModel.Relationship
159
- edge: RelationshipData['edge']
159
+ relationship: LikeC4Model.AnyRelation
160
+ edge: DiagramFlowTypes.DiagramEdgeData['edge']
160
161
  sourceNode: DiagramNode
161
162
  targetNode: DiagramNode
162
163
  }
@@ -175,12 +176,13 @@ const Relationship = forwardRef<
175
176
  hasOnNavigateTo
176
177
  } = useDiagramState(s => ({
177
178
  viewId: s.view.id,
178
- hasOnOpenSourceRelation: !!s.onOpenSourceRelation,
179
+ hasOnOpenSourceRelation: !!s.onOpenSource,
179
180
  hasOnNavigateTo: !!s.onNavigateTo
180
181
  }))
181
182
  const sourceId = nameFromFqn(edge.source) + r.source.id.slice(edge.source.length)
182
183
  const targetId = nameFromFqn(edge.target) + r.target.id.slice(edge.target.length)
183
- const navigateTo = hasOnNavigateTo && r.relationship.navigateTo !== viewId ? r.relationship.navigateTo : undefined
184
+ const navigateTo = hasOnNavigateTo && r.navigateTo?.id !== viewId ? r.navigateTo?.id : undefined
185
+ const links = r.links
184
186
 
185
187
  return (
186
188
  <Stack ref={ref} className={clsx(css.menuItemRelationship, className)} {...props}>
@@ -223,7 +225,9 @@ const Relationship = forwardRef<
223
225
  onPointerDownCapture={stopPropagation}
224
226
  onClick={event => {
225
227
  event.stopPropagation()
226
- diagramApi.getState().onOpenSourceRelation?.(r.id)
228
+ diagramApi.getState().onOpenSource?.({
229
+ relation: r.id
230
+ })
227
231
  }}
228
232
  role="button"
229
233
  >
@@ -235,6 +239,15 @@ const Relationship = forwardRef<
235
239
  )}
236
240
  </Group>
237
241
  <Box className={css.title}>{r.title || 'untitled'}</Box>
242
+ {r.description && <Text size="xs" c="dimmed">{r.description}</Text>}
243
+ {links.length > 0 && (
244
+ <Stack
245
+ gap={3}
246
+ justify="stretch"
247
+ align="stretch">
248
+ {links.map((link) => <Link key={link.url} link={link} />)}
249
+ </Stack>
250
+ )}
238
251
  </Stack>
239
252
  )
240
253
  })
@@ -1,6 +1,6 @@
1
1
  import { rem } from '@mantine/core'
2
2
  import { createVar, fallbackVar, globalStyle, keyframes, style } from '@vanilla-extract/css'
3
- import { mantine, vars, xyvars } from '../../theme-vars'
3
+ import { mantine, transitions, vars, xyvars } from '../../theme-vars'
4
4
 
5
5
  const mixColor = createVar('mix-color')
6
6
 
@@ -11,16 +11,16 @@ export const container = style({
11
11
  [xyvars.edge.strokeSelected]: `color-mix(in srgb, ${vars.relation.lineColor}, ${mixColor} 35%)`,
12
12
  [xyvars.edge.labelColor]: `color-mix(in srgb, ${vars.relation.labelColor}, rgba(255 255 255 / 0.85) 40%)`,
13
13
  [xyvars.edge.labelBgColor]: `color-mix(in srgb, ${vars.relation.labelBgColor}, transparent 40%)`,
14
- [xyvars.edge.strokeWidth]: '3'
15
- }
14
+ [xyvars.edge.strokeWidth]: '3',
15
+ },
16
16
  })
17
17
 
18
18
  globalStyle(`:where([data-mantine-color-scheme="dark"]) ${container}`, {
19
19
  vars: {
20
20
  [mixColor]: `white`,
21
21
  [xyvars.edge.labelColor]: vars.relation.labelColor,
22
- [xyvars.edge.labelBgColor]: `color-mix(in srgb, ${vars.relation.labelBgColor}, transparent 50%)`
23
- }
22
+ [xyvars.edge.labelBgColor]: `color-mix(in srgb, ${vars.relation.labelBgColor}, transparent 50%)`,
23
+ },
24
24
  })
25
25
 
26
26
  const isSelected = '.react-flow__edge.selected'
@@ -28,29 +28,29 @@ const isSelected = '.react-flow__edge.selected'
28
28
  globalStyle(`:where(${isSelected}) ${container}`, {
29
29
  vars: {
30
30
  [xyvars.edge.stroke]: xyvars.edge.strokeSelected,
31
- [xyvars.edge.strokeWidth]: '3'
32
- }
31
+ [xyvars.edge.strokeWidth]: '3',
32
+ },
33
33
  })
34
34
 
35
35
  globalStyle(`${container}:is([data-edge-hovered='true'],[data-edge-active='true'])`, {
36
36
  vars: {
37
37
  // [xyvars.edge.stroke]: `color-mix(in srgb, ${vars.relation.lineColor}, ${mixColor} 35%)`,
38
38
  [xyvars.edge.stroke]: xyvars.edge.strokeSelected,
39
- [xyvars.edge.strokeWidth]: '3'
40
- }
39
+ [xyvars.edge.strokeWidth]: '3',
40
+ },
41
41
  })
42
42
 
43
43
  globalStyle(`:where(${isSelected}) ${container}[data-edge-hovered='true']`, {
44
44
  vars: {
45
- [xyvars.edge.strokeWidth]: '4'
46
- }
45
+ [xyvars.edge.strokeWidth]: '4',
46
+ },
47
47
  })
48
48
 
49
49
  globalStyle(`.likec4-diagram .react-flow__edges > svg`, {
50
- mixBlendMode: 'plus-lighter'
50
+ mixBlendMode: 'plus-lighter',
51
51
  })
52
52
  globalStyle(`:where([data-mantine-color-scheme="light"]) .likec4-diagram .react-flow__edges > svg`, {
53
- mixBlendMode: 'screen'
53
+ mixBlendMode: 'screen',
54
54
  })
55
55
 
56
56
  export const dimmed = style({})
@@ -60,7 +60,7 @@ globalStyle(`.likec4-diagram .react-flow__edges > svg:has(${dimmed})`, {
60
60
  transition: 'opacity 600ms ease-in-out, filter 600ms ease-in-out',
61
61
  transitionDelay: '200ms',
62
62
  filter: `grayscale(0.85) ${fallbackVar(vars.safariAnimationHook, 'blur(1px)')}`,
63
- willChange: 'opacity, filter'
63
+ willChange: 'opacity, filter',
64
64
  })
65
65
 
66
66
  export const edgePathBg = style({
@@ -74,15 +74,15 @@ export const edgePathBg = style({
74
74
  selectors: {
75
75
  [`:where(${isSelected}, [data-edge-active='true'], [data-edge-hovered='true']) &`]: {
76
76
  strokeWidth: `calc(${xyvars.edge.strokeWidth} + 8)`,
77
- strokeOpacity: 0.15
78
- }
79
- }
77
+ strokeOpacity: 0.15,
78
+ },
79
+ },
80
80
  })
81
81
 
82
82
  // To fix issue with marker not inheriting color from path - we need to create container
83
83
  export const markerContext = style({
84
84
  fill: xyvars.edge.stroke,
85
- stroke: xyvars.edge.stroke
85
+ stroke: xyvars.edge.stroke,
86
86
  })
87
87
 
88
88
  export const controlPoint = style({
@@ -96,7 +96,7 @@ export const controlPoint = style({
96
96
  ':hover': {
97
97
  stroke: mantine.colors.primaryColors.filledHover,
98
98
  strokeWidth: 9,
99
- transition: 'stroke 100ms ease-out, stroke-width 100ms ease-out'
99
+ transition: 'stroke 100ms ease-out, stroke-width 100ms ease-out',
100
100
  },
101
101
  selectors: {
102
102
  [`:where(${isSelected}, [data-edge-hovered='true']) &`]: {
@@ -104,26 +104,26 @@ export const controlPoint = style({
104
104
  transition: 'fill-opacity 150ms ease-out, stroke 150ms ease-out, stroke-width 150ms ease-out',
105
105
  transitionDelay: '50ms',
106
106
  fillOpacity: 1,
107
- strokeWidth: 5
108
- }
109
- }
107
+ strokeWidth: 5,
108
+ },
109
+ },
110
110
  })
111
111
 
112
112
  export const controlDragging = style({
113
- cursor: 'grabbing'
113
+ cursor: 'grabbing',
114
114
  })
115
115
 
116
116
  globalStyle(`${controlDragging} *`, {
117
- cursor: 'grabbing !important'
117
+ cursor: 'grabbing !important',
118
118
  })
119
119
 
120
120
  const strokeKeyframes = keyframes({
121
121
  'from': {
122
- strokeDashoffset: 18 * 2 + 10
122
+ strokeDashoffset: 18 * 2 + 10,
123
123
  },
124
124
  'to': {
125
- strokeDashoffset: 10
126
- }
125
+ strokeDashoffset: 10,
126
+ },
127
127
  })
128
128
 
129
129
  export const cssEdgePath = style({
@@ -136,20 +136,20 @@ export const cssEdgePath = style({
136
136
  [`:where([data-edge-hovered='true']) &`]: {
137
137
  animationName: strokeKeyframes,
138
138
  animationDelay: '450ms',
139
- transition: 'stroke 130ms ease-out,stroke-width 130ms ease-out'
139
+ transition: 'stroke 130ms ease-out,stroke-width 130ms ease-out',
140
140
  },
141
141
  [`:where(${isSelected}, [data-edge-active='true'], [data-edge-animated='true']) &`]: {
142
142
  animationName: strokeKeyframes,
143
143
  animationDelay: '0ms',
144
- transition: 'stroke 130ms ease-out,stroke-width 130ms ease-out'
144
+ transition: 'stroke 130ms ease-out,stroke-width 130ms ease-out',
145
145
  },
146
146
  [`:where([data-edge-dir='back']) &`]: {
147
- animationDirection: 'reverse'
147
+ animationDirection: 'reverse',
148
148
  },
149
149
  [`${dimmed} &`]: {
150
- animationPlayState: 'paused'
151
- }
152
- }
150
+ animationPlayState: 'paused',
151
+ },
152
+ },
153
153
  })
154
154
 
155
155
  const labelBorderRadius = 2
@@ -167,12 +167,12 @@ export const stepEdgeNumber = style({
167
167
  fontVariantNumeric: 'tabular-nums',
168
168
  selectors: {
169
169
  [`:where([data-mantine-color-scheme="dark"]) :where([data-likec4-color="gray"]) &`]: {
170
- backgroundColor: `color-mix(in srgb, ${vars.relation.labelBgColor}, ${mixColor} 15%)`
170
+ backgroundColor: `color-mix(in srgb, ${vars.relation.labelBgColor}, ${mixColor} 15%)`,
171
171
  },
172
172
  [`:where([data-edge-active='true']) &`]: {
173
- backgroundColor: 'transparent'
174
- }
175
- }
173
+ backgroundColor: 'transparent',
174
+ },
175
+ },
176
176
  })
177
177
 
178
178
  export const varLabelX = createVar('label-x')
@@ -197,43 +197,50 @@ export const edgeLabel = style({
197
197
  borderRadius: labelBorderRadius,
198
198
  transform: varTranslate,
199
199
  vars: {
200
- [varTranslate]: `translate(${fallbackVar(varLabelX, '-50%')}, ${fallbackVar(varLabelY, '-50%')})`
200
+ [varTranslate]: `translate(${fallbackVar(varLabelX, '-50%')}, ${fallbackVar(varLabelY, '-50%')})`,
201
201
  },
202
202
  selectors: {
203
203
  '&[data-edge-hovered="true"]': {
204
204
  transition: 'all 140ms ease-in-out',
205
- transform: `${varTranslate} scale(1.12)`
205
+ transform: `${varTranslate} scale(1.12)`,
206
206
  },
207
207
  [`&:has(${stepEdgeNumber})`]: {
208
208
  padding: 0,
209
- gap: 2
209
+ gap: 2,
210
210
  },
211
211
  [`&:is(${dimmed})`]: {
212
212
  opacity: 0.3,
213
213
  transition: 'opacity 600ms ease-in-out, filter 600ms ease-in-out',
214
214
  transitionDelay: '200ms',
215
215
  filter: `grayscale(0.85) ${fallbackVar(vars.safariAnimationHook, 'blur(1px)')}`,
216
- willChange: 'opacity, filter'
217
- }
218
- }
216
+ willChange: 'opacity, filter',
217
+ },
218
+ },
219
219
  })
220
220
 
221
221
  export const edgeLabelText = style({
222
- textAlign: 'center',
223
222
  whiteSpaceCollapse: 'preserve-breaks',
224
223
  fontSize: rem(14),
225
- lineHeight: 1.185
224
+ lineHeight: 1.185,
225
+ })
226
+
227
+ export const edgeLabelTechnology = style({
228
+ textAlign: 'center',
229
+ whiteSpaceCollapse: 'preserve-breaks',
230
+ fontSize: rem(11),
231
+ lineHeight: 1,
232
+ opacity: 0.75,
226
233
  })
227
234
 
228
235
  globalStyle(`${edgeLabel}:has(${stepEdgeNumber}) ${edgeLabelText}`, {
229
- padding: '2px 5px 4px 2px'
236
+ padding: '2px 5px 4px 2px',
230
237
  })
231
238
 
232
239
  export const edgeNoteCloseButton = style({
233
240
  position: 'absolute',
234
241
  top: 4,
235
242
  right: 4,
236
- zIndex: 9
243
+ zIndex: 9,
237
244
  })
238
245
 
239
246
  export const edgeNoteText = style({
@@ -243,52 +250,39 @@ export const edgeNoteText = style({
243
250
  textWrap: 'pretty',
244
251
  lineHeight: 1.25,
245
252
  vars: {
246
- '--text-fz': mantine.fontSizes.sm
253
+ '--text-fz': mantine.fontSizes.sm,
247
254
  },
248
255
  '@media': {
249
256
  [mantine.largerThan('md')]: {
250
257
  vars: {
251
- '--text-fz': mantine.fontSizes.md
252
- }
253
- }
254
- }
258
+ '--text-fz': mantine.fontSizes.md,
259
+ },
260
+ },
261
+ },
255
262
  })
256
263
 
257
264
  export const cssNavigateBtn = style({
258
265
  zIndex: 'calc(var(--layer-overlays, 1) + 1)',
259
- position: 'absolute',
260
266
  pointerEvents: 'all',
261
- left: '50%',
262
- top: 'calc(100% + 1px)',
263
267
  color: xyvars.edge.labelColor,
264
268
  cursor: 'pointer',
265
- transformOrigin: 'top center',
266
- opacity: 0.8,
267
- transition: 'all 150ms ease-in-out',
268
- transform: 'translate(-50%, 0)',
269
- transitionDelay: '0ms',
269
+ opacity: 1,
270
+ transition: transitions.fast,
270
271
  backgroundColor: 'var(--ai-bg)',
271
272
  vars: {
272
273
  '--ai-bg': vars.relation.labelBgColor,
273
- '--ai-hover': `color-mix(in srgb , ${vars.relation.labelBgColor}, ${mixColor} 10%)`
274
- },
275
- selectors: {
276
- [`:is(${dimmed}) &`]: {
277
- display: 'none'
278
- }
274
+ '--ai-hover': `color-mix(in srgb , ${vars.relation.labelBgColor}, ${mixColor} 10%)`,
279
275
  },
280
276
  ':hover': {
281
- boxShadow: mantine.shadows.lg,
282
- transform: 'translate(-50%, 0) scale(1.3)',
283
- opacity: 1
277
+ transform: 'translateY(1px) scale(1.15)',
284
278
  },
285
279
  ':active': {
286
- transform: 'translate(-50%, 0) scale(1.02)'
287
- }
280
+ transform: 'translateY(-1px) scale(0.9)',
281
+ },
288
282
  })
289
283
  globalStyle(`${cssNavigateBtn} .tabler-icon`, {
290
- width: '75%',
291
- height: '75%',
292
- strokeWidth: 2
284
+ width: '80%',
285
+ height: '80%',
286
+ strokeWidth: 2,
293
287
  })
294
288
  export const cssNavigateBtnIcon = style({})