@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
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2023-2024 Denis Davydkov
3
+ Copyright (c) 2023-2025 Denis Davydkov
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -0,0 +1,7 @@
1
+ import { CustomColorDefinitions } from '@likec4/core';
2
+ import { NamedExoticComponent } from 'react';
3
+ interface LikeC4CustomColorsProperties {
4
+ customColors: CustomColorDefinitions;
5
+ }
6
+ export declare const LikeC4CustomColors: NamedExoticComponent<LikeC4CustomColorsProperties>;
7
+ export {};
@@ -0,0 +1,30 @@
1
+ import { jsx, Fragment } from "react/jsx-runtime";
2
+ import "@likec4/core";
3
+ import { useMantineStyleNonce } from "@mantine/core";
4
+ import { deepEqual } from "fast-equals";
5
+ import { memo } from "react";
6
+ import { entries } from "remeda";
7
+ import { vars } from "./theme-vars.css.js";
8
+ function toStyle(name, colorValues) {
9
+ const rules = [
10
+ ...entries(colorValues.elements).map(([key, value]) => `${stripCssVarReference(vars.element[key])}: ${value};`),
11
+ ...entries(colorValues.relationships).map(([key, value]) => `${stripCssVarReference(vars.relation[key])}: ${value};`)
12
+ ].join("\n");
13
+ return `:where([data-likec4-color=${name}]) {
14
+ ${rules}
15
+ }`;
16
+ }
17
+ function stripCssVarReference(ref) {
18
+ const end = ref.indexOf(",");
19
+ return ref.substring(4, end == -1 ? ref.length - 1 : end);
20
+ }
21
+ const LikeC4CustomColors = memo(({ customColors }) => {
22
+ var _a;
23
+ const styles = entries(customColors).map(([name, color]) => toStyle(name, color)).join("\n");
24
+ const nonce = (_a = useMantineStyleNonce()) == null ? void 0 : _a();
25
+ return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx("style", { type: "text/css", dangerouslySetInnerHTML: { __html: styles }, nonce }) });
26
+ }, deepEqual);
27
+ LikeC4CustomColors.displayName = "LikeC4CustomColors";
28
+ export {
29
+ LikeC4CustomColors
30
+ };
@@ -0,0 +1,5 @@
1
+ export declare const cssReactFlow: string;
2
+ export declare const notInitialized: string;
3
+ export declare const cssDisablePan: string;
4
+ export declare const cssTransparentBg: string;
5
+ export declare const cssNoControls: string;
@@ -0,0 +1,13 @@
1
+ /* empty css */
2
+ var cssReactFlow = "_2h8g8h0";
3
+ var notInitialized = "_2h8g8h1";
4
+ var cssDisablePan = "_2h8g8h2";
5
+ var cssTransparentBg = "_2h8g8h3";
6
+ var cssNoControls = "_2h8g8h4";
7
+ export {
8
+ cssDisablePan,
9
+ cssNoControls,
10
+ cssReactFlow,
11
+ cssTransparentBg,
12
+ notInitialized
13
+ };
@@ -0,0 +1,6 @@
1
+ import { LikeC4DiagramEventHandlers, LikeC4DiagramProperties } from './LikeC4Diagram.props';
2
+ export type LikeC4DiagramProps = LikeC4DiagramProperties & LikeC4DiagramEventHandlers;
3
+ export declare function LikeC4Diagram({ view, className, fitView, fitViewPadding, readonly, pannable, zoomable, nodesSelectable, nodesDraggable, background, controls, showDiagramTitle, showNotations, enableDynamicViewWalkthrough, enableFocusMode, enableElementDetails, enableRelationshipDetails, enableRelationshipBrowser, enableSearch, initialWidth, initialHeight, keepAspectRatio, experimentalEdgeEditing, onCanvasClick, onCanvasContextMenu, onCanvasDblClick, onEdgeClick, onChange, onEdgeContextMenu, onNavigateTo, onNodeClick, onNodeContextMenu, onOpenSource, onBurgerMenuClick, renderIcon, where, showNavigationButtons }: LikeC4DiagramProps): import("react/jsx-runtime").JSX.Element;
4
+ export declare namespace LikeC4Diagram {
5
+ var displayName: string;
6
+ }
@@ -0,0 +1,194 @@
1
+ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
+ import { isDeploymentView } from "@likec4/core";
3
+ import { ReactFlowProvider } from "@xyflow/react";
4
+ import clsx from "clsx";
5
+ import { deepEqual } from "fast-equals";
6
+ import { useRef, useEffect, memo } from "react";
7
+ import { isEmpty } from "remeda";
8
+ import { rootClassName } from "./globals.css.js";
9
+ import { useDiagramState } from "./hooks/useDiagramState.js";
10
+ import { LikeC4CustomColors } from "./LikeC4CustomColors.js";
11
+ import { cssReactFlow, cssNoControls, cssDisablePan, cssTransparentBg, notInitialized } from "./LikeC4Diagram.css.js";
12
+ import { LikeC4Search } from "./LikeC4Search.js";
13
+ import { DiagramContextProvider } from "./state/DiagramContext.js";
14
+ import { EnsureMantine } from "./ui/EnsureMantine.js";
15
+ import { FramerMotionConfig } from "./ui/FramerMotionConfig.js";
16
+ import { FitViewOnDiagramChange } from "./xyflow/FitviewOnDiagramChange.js";
17
+ import { SelectEdgesOnNodeFocus } from "./xyflow/SelectEdgesOnNodeFocus.js";
18
+ import { XYFlow } from "./xyflow/XYFlow.js";
19
+ import { XYFlowInner } from "./xyflow/XYFlowInner.js";
20
+ import { useLikeC4Model } from "./likec4model/useLikeC4Model.js";
21
+ import { Overlays } from "./overlays/Overlays.js";
22
+ function LikeC4Diagram({
23
+ view,
24
+ className,
25
+ fitView = true,
26
+ fitViewPadding = 0,
27
+ readonly = true,
28
+ pannable = true,
29
+ zoomable = true,
30
+ nodesSelectable = !readonly,
31
+ nodesDraggable = !readonly,
32
+ background = "dots",
33
+ controls = !readonly,
34
+ showDiagramTitle = true,
35
+ showNotations = true,
36
+ enableDynamicViewWalkthrough = false,
37
+ enableFocusMode = false,
38
+ enableElementDetails = false,
39
+ enableRelationshipDetails = enableElementDetails,
40
+ enableRelationshipBrowser = enableRelationshipDetails,
41
+ enableSearch = true,
42
+ initialWidth,
43
+ initialHeight,
44
+ keepAspectRatio = false,
45
+ experimentalEdgeEditing = false,
46
+ onCanvasClick,
47
+ onCanvasContextMenu,
48
+ onCanvasDblClick,
49
+ onEdgeClick,
50
+ onChange,
51
+ onEdgeContextMenu,
52
+ onNavigateTo,
53
+ onNodeClick,
54
+ onNodeContextMenu,
55
+ onOpenSource,
56
+ onBurgerMenuClick,
57
+ renderIcon,
58
+ where,
59
+ showNavigationButtons = !!onNavigateTo
60
+ }) {
61
+ const hasLikec4model = !!useLikeC4Model();
62
+ const initialRef = useRef({
63
+ defaultNodes: [],
64
+ defaultEdges: [],
65
+ initialWidth: initialWidth ?? view.bounds.width,
66
+ initialHeight: initialHeight ?? view.bounds.height
67
+ });
68
+ useEffect(() => {
69
+ if (readonly !== true && where != null) {
70
+ console.warn("Ignore filter, supported in readonly mode only\n", { where });
71
+ }
72
+ if (hasLikec4model) {
73
+ return;
74
+ }
75
+ if (enableRelationshipDetails) {
76
+ console.warn("Invalid showRelationshipDetails=true, requires LikeC4ModelProvider");
77
+ }
78
+ if (enableElementDetails) {
79
+ console.warn("Invalid enableElementDetails=true, requires LikeC4ModelProvider");
80
+ }
81
+ if (enableRelationshipBrowser) {
82
+ console.warn("Invalid enableRelationshipBrowser=true, requires LikeC4ModelProvider");
83
+ }
84
+ });
85
+ return /* @__PURE__ */ jsx(EnsureMantine, { children: /* @__PURE__ */ jsx(FramerMotionConfig, { children: /* @__PURE__ */ jsxs(
86
+ ReactFlowProvider,
87
+ {
88
+ fitView,
89
+ ...initialRef.current,
90
+ children: [
91
+ !isEmpty(view.customColorDefinitions) && /* @__PURE__ */ jsx(LikeC4CustomColors, { customColors: view.customColorDefinitions }),
92
+ /* @__PURE__ */ jsx(
93
+ DiagramContextProvider,
94
+ {
95
+ view,
96
+ keepAspectRatio,
97
+ className: clsx(rootClassName, className),
98
+ readonly,
99
+ experimentalEdgeEditing: !readonly && experimentalEdgeEditing,
100
+ pannable,
101
+ zoomable,
102
+ nodesDraggable,
103
+ nodesSelectable: nodesSelectable || enableFocusMode,
104
+ hasLikeC4Model: hasLikec4model,
105
+ fitViewEnabled: fitView,
106
+ fitViewPadding,
107
+ controls,
108
+ showNavigationButtons: showNavigationButtons && !!onNavigateTo,
109
+ showNotations,
110
+ enableFocusMode,
111
+ enableSearch: hasLikec4model && enableSearch,
112
+ enableElementDetails: enableElementDetails && hasLikec4model,
113
+ enableDynamicViewWalkthrough,
114
+ enableRelationshipBrowser: enableRelationshipBrowser && hasLikec4model,
115
+ enableRelationshipDetails: enableRelationshipDetails && hasLikec4model && !isDeploymentView(view),
116
+ whereFilter: readonly ? where ?? null : null,
117
+ renderIcon: renderIcon ?? null,
118
+ onCanvasClick: onCanvasClick ?? null,
119
+ onCanvasContextMenu: onCanvasContextMenu ?? null,
120
+ onEdgeClick: onEdgeClick ?? null,
121
+ onEdgeContextMenu: onEdgeContextMenu ?? null,
122
+ onNodeClick: onNodeClick ?? null,
123
+ onNodeContextMenu: onNodeContextMenu ?? null,
124
+ onChange: onChange ?? null,
125
+ onNavigateTo: onNavigateTo ?? null,
126
+ onCanvasDblClick: onCanvasDblClick ?? null,
127
+ onOpenSource: onOpenSource ?? null,
128
+ onBurgerMenuClick: onBurgerMenuClick ?? null,
129
+ children: /* @__PURE__ */ jsx(
130
+ LikeC4DiagramInnerMemo,
131
+ {
132
+ background,
133
+ showDiagramTitle,
134
+ enableSearch: hasLikec4model && enableSearch
135
+ }
136
+ )
137
+ }
138
+ )
139
+ ]
140
+ }
141
+ ) }) });
142
+ }
143
+ LikeC4Diagram.displayName = "LikeC4Diagram";
144
+ const LikeC4DiagramInnerMemo = /* @__PURE__ */ memo(function LikeC4DiagramInner({
145
+ background,
146
+ showDiagramTitle,
147
+ enableSearch
148
+ }) {
149
+ const {
150
+ isInitialized,
151
+ pannable,
152
+ fitView,
153
+ enableFocusMode,
154
+ enableOverlays
155
+ } = useDiagramState((s) => ({
156
+ isInitialized: s.initialized,
157
+ pannable: s.pannable,
158
+ fitView: s.fitViewEnabled,
159
+ enableFocusMode: s.enableFocusMode,
160
+ enableOverlays: s.hasLikeC4Model && (s.enableRelationshipBrowser || s.enableElementDetails)
161
+ }));
162
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
163
+ /* @__PURE__ */ jsx(
164
+ XYFlow,
165
+ {
166
+ className: clsx(
167
+ "likec4-diagram",
168
+ cssReactFlow,
169
+ cssNoControls,
170
+ pannable !== true && cssDisablePan,
171
+ background === "transparent" && cssTransparentBg,
172
+ isInitialized ? "initialized" : notInitialized
173
+ ),
174
+ children: /* @__PURE__ */ jsx(
175
+ XYFlowInner,
176
+ {
177
+ showDiagramTitle,
178
+ background
179
+ }
180
+ )
181
+ }
182
+ ),
183
+ enableOverlays && /* @__PURE__ */ jsx(Overlays, {}),
184
+ enableSearch && /* @__PURE__ */ jsx(LikeC4Search, {}),
185
+ isInitialized && /* @__PURE__ */ jsxs(Fragment, { children: [
186
+ fitView && /* @__PURE__ */ jsx(FitViewOnDiagramChange, {}),
187
+ enableFocusMode && /* @__PURE__ */ jsx(SelectEdgesOnNodeFocus, {})
188
+ ] })
189
+ ] });
190
+ }, deepEqual);
191
+ LikeC4DiagramInnerMemo.displayName = "LikeC4DiagramInnerMemo";
192
+ export {
193
+ LikeC4Diagram
194
+ };
@@ -0,0 +1,166 @@
1
+ import { DiagramEdge, DiagramNode, DiagramView, Fqn, RelationId, ViewChange, ViewId, WhereOperator } from '@likec4/core';
2
+ import { MouseEvent as ReactMouseEvent, ReactNode } from 'react';
3
+ import { XYBackground } from './xyflow/XYFlowBackground';
4
+ export type { WhereOperator };
5
+ export type DiagramNodeWithNavigate<ID extends string = ViewId> = Omit<DiagramNode, 'navigateTo'> & {
6
+ navigateTo: ID;
7
+ };
8
+ type ElementIconNodeProps = {
9
+ id: string;
10
+ title: string;
11
+ icon?: string | undefined;
12
+ };
13
+ export type ElementIconRenderer = (props: {
14
+ node: ElementIconNodeProps;
15
+ }) => ReactNode;
16
+ export type OnNavigateTo<ID extends string = ViewId> = (to: ID, event?: ReactMouseEvent, element?: DiagramNodeWithNavigate<ID>) => void;
17
+ export type OnNodeClick = (node: DiagramNode, event: ReactMouseEvent) => void;
18
+ export type OnEdgeClick = (edge: DiagramEdge, event: ReactMouseEvent) => void;
19
+ /**
20
+ * On pane/canvas click (not on any node or edge)
21
+ */
22
+ export type OnCanvasClick = (event: ReactMouseEvent) => void;
23
+ export type ChangeEvent = {
24
+ change: ViewChange;
25
+ };
26
+ export type OnChange = (event: ChangeEvent) => void;
27
+ export type LikeC4ColorScheme = 'light' | 'dark';
28
+ export interface LikeC4DiagramProperties {
29
+ view: DiagramView;
30
+ className?: string | undefined;
31
+ /**
32
+ * Enable/disable panning
33
+ * @default true
34
+ */
35
+ pannable?: boolean | undefined;
36
+ /**
37
+ * Enable/disable zooming
38
+ * @default true
39
+ */
40
+ zoomable?: boolean | undefined;
41
+ /**
42
+ * Disable any editing (dragging still can be enabled with `nodesDraggable`)
43
+ * @default true
44
+ */
45
+ readonly?: boolean | undefined;
46
+ /**
47
+ * Show/hide panel with top left controls,
48
+ *
49
+ * @default true if not readonly
50
+ */
51
+ controls?: boolean | undefined;
52
+ /**
53
+ * If set, initial viewport will show all nodes & edges
54
+ * @default true
55
+ */
56
+ fitView?: boolean | undefined;
57
+ /**
58
+ * Seems like this is percentage of the view size
59
+ * @default 0
60
+ */
61
+ fitViewPadding?: number | undefined;
62
+ /**
63
+ * @default false if readonly
64
+ */
65
+ nodesSelectable?: boolean | undefined;
66
+ /**
67
+ * @default false if readonly
68
+ */
69
+ nodesDraggable?: boolean | undefined;
70
+ initialWidth?: number | undefined;
71
+ initialHeight?: number | undefined;
72
+ /**
73
+ * Keep aspect ratio of the diagram
74
+ * @default false
75
+ */
76
+ keepAspectRatio?: boolean | undefined;
77
+ /**
78
+ * Background pattern
79
+ * @default 'dots'
80
+ */
81
+ background?: 'transparent' | 'solid' | XYBackground | undefined;
82
+ /**
83
+ * Display webview with diagram title / description
84
+ * @default true
85
+ */
86
+ showDiagramTitle?: boolean | undefined;
87
+ /**
88
+ * Show back/forward history navigation buttons
89
+ * @default true if `onNavigateTo` is set
90
+ */
91
+ showNavigationButtons?: undefined | boolean;
92
+ /**
93
+ * Display notations of the view
94
+ * @default true
95
+ */
96
+ showNotations?: boolean | undefined;
97
+ /**
98
+ * Display dropdown with details on relationship's label click
99
+ * @default false
100
+ */
101
+ enableRelationshipDetails?: boolean | undefined;
102
+ /**
103
+ * If double click on a node should enable focus mode, i.e. highlight incoming/outgoing edges
104
+ * @default false
105
+ */
106
+ enableFocusMode?: boolean | undefined;
107
+ /**
108
+ * Enable search popup for elements and views
109
+ * @default true
110
+ */
111
+ enableSearch?: boolean | undefined;
112
+ /**
113
+ * Enable modal with element details
114
+ * @default false
115
+ */
116
+ enableElementDetails?: boolean | undefined;
117
+ /**
118
+ * Experimental feature to browse relationships
119
+ *
120
+ * @default false
121
+ */
122
+ enableRelationshipBrowser?: boolean | undefined;
123
+ /**
124
+ * If Walkthrough for dynamic views should be enabled
125
+ * @default false
126
+ */
127
+ enableDynamicViewWalkthrough?: boolean | undefined;
128
+ /**
129
+ * Experimental feature to enable edge editing
130
+ * @default false
131
+ */
132
+ experimentalEdgeEditing?: boolean | undefined;
133
+ /**
134
+ * Render icon for an element, bundled or remote
135
+ * By default, if icon is http:// or https://, it will be rendered as an image
136
+ */
137
+ renderIcon?: ElementIconRenderer | undefined;
138
+ /**
139
+ * Dynamic filter, applies both to nodes and edges
140
+ */
141
+ where?: WhereOperator<string, string> | undefined;
142
+ }
143
+ export type OpenSourceParams = {
144
+ element: Fqn;
145
+ property?: string;
146
+ } | {
147
+ relation: RelationId;
148
+ } | {
149
+ deployment: Fqn;
150
+ property?: string;
151
+ } | {
152
+ view: ViewId;
153
+ };
154
+ export interface LikeC4DiagramEventHandlers {
155
+ onChange?: OnChange | null | undefined;
156
+ onNavigateTo?: OnNavigateTo | null | undefined;
157
+ onNodeClick?: OnNodeClick | null | undefined;
158
+ onNodeContextMenu?: OnNodeClick | null | undefined;
159
+ onCanvasContextMenu?: OnCanvasClick | null | undefined;
160
+ onEdgeClick?: OnEdgeClick | null | undefined;
161
+ onEdgeContextMenu?: OnEdgeClick | null | undefined;
162
+ onCanvasClick?: OnCanvasClick | null | undefined;
163
+ onCanvasDblClick?: OnCanvasClick | null | undefined;
164
+ onBurgerMenuClick?: null | undefined | (() => void);
165
+ onOpenSource?: null | undefined | ((params: OpenSourceParams) => void);
166
+ }
@@ -0,0 +1,9 @@
1
+ import { LikeC4Model } from '@likec4/core';
2
+ import { PropsWithChildren } from 'react';
3
+ export type LikeC4ModelProviderProps = PropsWithChildren<{
4
+ likec4model: LikeC4Model;
5
+ }>;
6
+ /**
7
+ * Ensures LikeC4Model context
8
+ */
9
+ export declare function LikeC4ModelProvider({ children, likec4model }: LikeC4ModelProviderProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import "react";
3
+ import { LikeC4ModelContext } from "./likec4model/LikeC4ModelContext.js";
4
+ function LikeC4ModelProvider({
5
+ children,
6
+ likec4model
7
+ }) {
8
+ return /* @__PURE__ */ jsx(LikeC4ModelContext.Provider, { value: likec4model, children });
9
+ }
10
+ export {
11
+ LikeC4ModelProvider
12
+ };
@@ -0,0 +1 @@
1
+ export declare const actionSection: string;
@@ -0,0 +1,5 @@
1
+ /* empty css */
2
+ var actionSection = "_16mg60z0";
3
+ export {
4
+ actionSection
5
+ };
@@ -0,0 +1,2 @@
1
+ import { MemoExoticComponent } from 'react';
2
+ export declare const LikeC4Search: MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
@@ -0,0 +1,96 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { rem } from "@mantine/core";
3
+ import { Spotlight } from "@mantine/spotlight";
4
+ import { IconSearch, IconRectangularPrism, IconStack2, IconSitemap } from "@tabler/icons-react";
5
+ import { memo, useMemo } from "react";
6
+ import { pipe, filter, map } from "remeda";
7
+ import { actionSection } from "./LikeC4Search.css.js";
8
+ import { useDiagramState, useDiagramStoreApi } from "./hooks/useDiagramState.js";
9
+ import { useLikeC4Model } from "./likec4model/useLikeC4Model.js";
10
+ import { useMantinePortalProps } from "./hooks/useMantinePortalProps.js";
11
+ const LikeC4Search = memo(() => {
12
+ const view = useDiagramState((s) => s.view);
13
+ const model = useLikeC4Model(true);
14
+ const store = useDiagramStoreApi();
15
+ const getNodeActionsData = () => {
16
+ const { focusOnNode } = store.getState();
17
+ return pipe(
18
+ view.nodes,
19
+ filter((n) => !!n.title),
20
+ map((n) => ({
21
+ id: n.id,
22
+ label: n.title,
23
+ ...n.description && {
24
+ description: n.description
25
+ },
26
+ keywords: [
27
+ n.title,
28
+ ...(n.tags ?? []).map((t) => `#${t}`),
29
+ ...n.description ? [n.description] : []
30
+ ].filter((k) => k.toLowerCase()),
31
+ onClick: () => focusOnNode(n.id),
32
+ leftSection: /* @__PURE__ */ jsx(IconRectangularPrism, {})
33
+ }))
34
+ );
35
+ };
36
+ const getViewActionsData = () => {
37
+ const views = [...model.views()];
38
+ return map(views, (v) => ({
39
+ id: v.id,
40
+ label: v.title ?? v.id,
41
+ ...v.$view.description && {
42
+ description: v.$view.description
43
+ },
44
+ keywords: [
45
+ v.title ?? v.id,
46
+ ...v.tags ?? [],
47
+ ...v.$view.description ? [v.$view.description] : []
48
+ ],
49
+ onClick: () => {
50
+ var _a, _b;
51
+ store.setState({
52
+ lastOnNavigate: {
53
+ fromView: view.id,
54
+ toView: v.id,
55
+ fromNode: null
56
+ }
57
+ });
58
+ (_b = (_a = store.getState()).onNavigateTo) == null ? void 0 : _b.call(_a, v.id);
59
+ },
60
+ leftSection: v.isDeploymentView() ? /* @__PURE__ */ jsx(IconStack2, {}) : /* @__PURE__ */ jsx(IconSitemap, {})
61
+ }));
62
+ };
63
+ const actions = useMemo(() => [
64
+ {
65
+ group: "Elements",
66
+ actions: getNodeActionsData()
67
+ },
68
+ {
69
+ group: "Views",
70
+ actions: getViewActionsData()
71
+ }
72
+ ], [model, store, view]);
73
+ const portalProps = useMantinePortalProps();
74
+ return /* @__PURE__ */ jsx(
75
+ Spotlight,
76
+ {
77
+ ...portalProps,
78
+ actions,
79
+ nothingFound: "Nothing found...",
80
+ shortcut: ["mod + f", "mod + k"],
81
+ scrollable: true,
82
+ highlightQuery: true,
83
+ maxHeight: 350,
84
+ classNames: {
85
+ actionSection
86
+ },
87
+ searchProps: {
88
+ leftSection: /* @__PURE__ */ jsx(IconSearch, { style: { width: rem(18), height: rem(18) }, stroke: 1.5 }),
89
+ placeholder: "Search elements and views..."
90
+ }
91
+ }
92
+ );
93
+ });
94
+ export {
95
+ LikeC4Search
96
+ };
@@ -0,0 +1,3 @@
1
+ import { LikeC4DiagramProperties } from './LikeC4Diagram.props';
2
+ export type StaticLikeC4DiagramProps = Pick<LikeC4DiagramProperties, 'view' | 'keepAspectRatio' | 'className' | 'fitView' | 'fitViewPadding' | 'background' | 'enableElementDetails' | 'enableRelationshipDetails' | 'enableRelationshipBrowser' | 'initialWidth' | 'initialHeight' | 'renderIcon' | 'where'>;
3
+ export declare function StaticLikeC4Diagram({ view, fitView, fitViewPadding, enableElementDetails, enableRelationshipDetails, enableRelationshipBrowser, background, ...rest }: StaticLikeC4DiagramProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,41 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { LikeC4Diagram } from "./LikeC4Diagram.js";
3
+ function StaticLikeC4Diagram({
4
+ view,
5
+ fitView = true,
6
+ fitViewPadding = 0,
7
+ enableElementDetails = false,
8
+ enableRelationshipDetails = false,
9
+ enableRelationshipBrowser = enableRelationshipDetails,
10
+ background = "transparent",
11
+ ...rest
12
+ }) {
13
+ return /* @__PURE__ */ jsx(
14
+ LikeC4Diagram,
15
+ {
16
+ view,
17
+ readonly: true,
18
+ fitView,
19
+ fitViewPadding,
20
+ pannable: false,
21
+ zoomable: false,
22
+ controls: false,
23
+ background,
24
+ showDiagramTitle: false,
25
+ showNotations: false,
26
+ enableElementDetails,
27
+ enableRelationshipDetails,
28
+ enableRelationshipBrowser,
29
+ enableDynamicViewWalkthrough: false,
30
+ experimentalEdgeEditing: false,
31
+ enableFocusMode: false,
32
+ nodesSelectable: false,
33
+ nodesDraggable: false,
34
+ enableSearch: false,
35
+ ...rest
36
+ }
37
+ );
38
+ }
39
+ export {
40
+ StaticLikeC4Diagram
41
+ };
@@ -0,0 +1,6 @@
1
+ function getDefaultExportFromCjs(x) {
2
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
3
+ }
4
+ export {
5
+ getDefaultExportFromCjs
6
+ };
@@ -0,0 +1,2 @@
1
+ import { PolymorphicComponentProps, TextProps } from '@mantine/core';
2
+ export declare const Text: <L = "div">(props: PolymorphicComponentProps<L, TextProps>) => React.ReactElement;
@@ -0,0 +1,7 @@
1
+ import { Text as Text$1 } from "@mantine/core";
2
+ const Text = Text$1.withProps({
3
+ component: "div"
4
+ });
5
+ export {
6
+ Text
7
+ };
@@ -0,0 +1 @@
1
+ export declare const container: string;
@@ -0,0 +1,5 @@
1
+ /* empty css */
2
+ var container = "_10w34w70";
3
+ export {
4
+ container
5
+ };
@@ -0,0 +1,9 @@
1
+ import { PropsWithChildren } from 'react';
2
+ type ShiftX = 'left' | 'spread' | 'right';
3
+ type ShiftY = 'top' | 'spread' | 'bottom';
4
+ type ActionButtonBarProps = PropsWithChildren<{
5
+ shiftX?: ShiftX;
6
+ shiftY?: ShiftY;
7
+ }>;
8
+ export declare const ActionButtonBar: ({ shiftX, shiftY, children, }: ActionButtonBarProps) => import("react/jsx-runtime").JSX.Element;
9
+ export {};