@likec4/diagram 1.31.0 → 1.32.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 (269) hide show
  1. package/bundle/{chunk-BBzMXzCg.js → chunk-DlHyKoeo.js} +1700 -1206
  2. package/bundle/custom.js +51 -47
  3. package/bundle/index.js +5495 -5428
  4. package/dist/LikeC4CustomColors.d.ts +2 -7
  5. package/dist/LikeC4CustomColors.js +17 -6
  6. package/dist/LikeC4Diagram.d.ts +3 -2
  7. package/dist/LikeC4Diagram.js +10 -14
  8. package/dist/LikeC4Diagram.props.d.ts +41 -24
  9. package/dist/LikeC4ModelProvider.d.ts +5 -4
  10. package/dist/StaticLikeC4Diagram.d.ts +3 -2
  11. package/dist/StaticLikeC4Diagram.js +2 -2
  12. package/dist/base/BaseXYFlow.js +5 -5
  13. package/dist/base/const.d.ts +1 -1
  14. package/dist/base/const.js +1 -1
  15. package/dist/base/index.d.ts +2 -1
  16. package/dist/base/primitives/compound/CompoundActionButton.js +2 -1
  17. package/dist/base/primitives/compound/CompoundDetailsButton.js +2 -1
  18. package/dist/base/primitives/compound/CompoundTitle.d.ts +1 -1
  19. package/dist/base/primitives/compound/CompoundTitle.js +2 -1
  20. package/dist/base/primitives/edge/EdgeContainer.d.ts +1 -1
  21. package/dist/base/primitives/edge/EdgeLabel.css.js +1 -0
  22. package/dist/base/primitives/edge/EdgeLabel.d.ts +3 -3
  23. package/dist/base/primitives/edge/EdgeLabel.js +6 -4
  24. package/dist/base/primitives/edge/EdgeLabelContainer.d.ts +1 -1
  25. package/dist/base/primitives/edge/EdgeMarkers.d.ts +1 -1
  26. package/dist/base/primitives/edge/EdgePath.d.ts +1 -1
  27. package/dist/base/primitives/element/ElementActionButtons.js +10 -9
  28. package/dist/base/primitives/element/ElementDetailsButton.js +2 -1
  29. package/dist/base/primitives/element/ElementShape.d.ts +1 -1
  30. package/dist/base/primitives/element/ElementTags.d.ts +14 -0
  31. package/dist/base/primitives/element/ElementTags.js +176 -0
  32. package/dist/base/primitives/element/ElementTitle.d.ts +5 -4
  33. package/dist/base/primitives/element/ElementTitle.js +6 -6
  34. package/dist/base/primitives/index.d.ts +1 -0
  35. package/dist/base/types.Base.d.ts +54 -0
  36. package/dist/base/types.Base.js +48 -0
  37. package/dist/base/types.d.ts +2 -52
  38. package/dist/bundle/LikeC4View.d.ts +2 -1
  39. package/dist/bundle/LikeC4View.js +22 -19
  40. package/dist/bundle/LikeC4View.props.d.ts +15 -4
  41. package/dist/bundle/ReactLikeC4.d.ts +4 -7
  42. package/dist/bundle/ReactLikeC4.js +10 -8
  43. package/dist/bundle/index.js +1 -1
  44. package/dist/components/ErrorFallback.d.ts +2 -0
  45. package/dist/components/ErrorFallback.js +29 -0
  46. package/dist/context/DiagramEventHandlers.d.ts +6 -5
  47. package/dist/context/DiagramFeatures.d.ts +2 -2
  48. package/dist/context/DiagramFeatures.js +3 -31
  49. package/dist/context/EnsureMantine.js +1 -1
  50. package/dist/context/IconRenderer.js +1 -4
  51. package/dist/context/RootContainer.js +5 -1
  52. package/dist/context/TagStylesContext.d.ts +7 -0
  53. package/dist/context/TagStylesContext.js +85 -0
  54. package/dist/custom/components.d.ts +1 -1
  55. package/dist/custom/customNodes.d.ts +32 -17
  56. package/dist/custom/hooks.d.ts +1 -1
  57. package/dist/hooks/index.d.ts +1 -1
  58. package/dist/hooks/useDiagram.d.ts +73 -38
  59. package/dist/hooks/useDiagram.js +7 -3
  60. package/dist/hooks/useMantinePortalProps.d.ts +2 -2
  61. package/dist/hooks/useSearchActor.d.ts +2 -0
  62. package/dist/hooks/useSearchActor.js +10 -0
  63. package/dist/hooks/useUpdateEffect.js +3 -0
  64. package/dist/hooks/useXYFlow.d.ts +39 -37
  65. package/dist/hooks/useXYFlow.js +5 -1
  66. package/dist/index.js +1 -1
  67. package/dist/likec4diagram/DiagramUI.js +7 -2
  68. package/dist/likec4diagram/DiagramXYFlow.d.ts +4 -3
  69. package/dist/likec4diagram/DiagramXYFlow.js +107 -110
  70. package/dist/likec4diagram/custom/edges/RelationshipEdge.d.ts +7 -6
  71. package/dist/likec4diagram/custom/edges/RelationshipEdge.js +8 -0
  72. package/dist/likec4diagram/custom/edges/RelationshipsDropdownMenu.js +7 -5
  73. package/dist/likec4diagram/custom/index.d.ts +7 -6
  74. package/dist/likec4diagram/custom/nodes/nodes.js +39 -26
  75. package/dist/likec4diagram/custom/nodes/toolbar/_shared.d.ts +7 -7
  76. package/dist/likec4diagram/types.d.ts +5 -5
  77. package/dist/likec4diagram/ui/controls/Controls.js +12 -4
  78. package/dist/likec4diagram/ui/notation/NotationPanel.js +1 -1
  79. package/dist/likec4diagram/useViewToNodesEdges.d.ts +5 -3
  80. package/dist/likec4diagram/useViewToNodesEdges.js +20 -30
  81. package/dist/likec4model/LikeC4ModelContext.d.ts +2 -2
  82. package/dist/likec4model/index.d.ts +1 -1
  83. package/dist/likec4model/useLikeC4ElementsTree.js +1 -1
  84. package/dist/likec4model/useLikeC4Model.d.ts +23 -10
  85. package/dist/likec4model/useLikeC4Model.js +22 -7
  86. package/dist/overlays/Overlays.js +4 -27
  87. package/dist/overlays/element-details/ElementDetailsCard.d.ts +1 -1
  88. package/dist/overlays/element-details/ElementDetailsCard.js +19 -12
  89. package/dist/overlays/element-details/TabPanelDeployments.d.ts +1 -1
  90. package/dist/overlays/element-details/TabPanelDeployments.js +1 -1
  91. package/dist/overlays/element-details/TabPanelRelationships.d.ts +1 -1
  92. package/dist/overlays/element-details/TabPanelStructure.d.ts +1 -1
  93. package/dist/overlays/element-details/actor.d.ts +288 -286
  94. package/dist/overlays/overlay/Overlay.css.d.ts +57 -2
  95. package/dist/overlays/overlay/Overlay.css.js +76 -39
  96. package/dist/overlays/overlay/Overlay.d.ts +12 -0
  97. package/dist/overlays/overlay/Overlay.js +58 -27
  98. package/dist/overlays/overlaysActor.d.ts +1 -1
  99. package/dist/overlays/relationship-details/RelationshipDetails.d.ts +3 -2
  100. package/dist/overlays/relationship-details/RelationshipDetails.js +3 -3
  101. package/dist/overlays/relationship-details/_types.d.ts +2 -2
  102. package/dist/overlays/relationship-details/actor.js +7 -7
  103. package/dist/overlays/relationship-details/custom/edgeTypes.d.ts +3 -2
  104. package/dist/overlays/relationship-details/custom/nodeTypes.js +4 -0
  105. package/dist/overlays/relationship-details/hooks.d.ts +10 -9
  106. package/dist/overlays/relationship-details/layout-to-xyflow.js +1 -0
  107. package/dist/overlays/relationship-details/layout.js +3 -1
  108. package/dist/overlays/relationships-browser/RelationshipsBrowser.d.ts +3 -2
  109. package/dist/overlays/relationships-browser/SelectElement.js +1 -1
  110. package/dist/overlays/relationships-browser/_types.d.ts +2 -2
  111. package/dist/overlays/relationships-browser/actor.d.ts +1 -1
  112. package/dist/overlays/relationships-browser/actor.js +7 -7
  113. package/dist/overlays/relationships-browser/custom/edgeTypes.d.ts +3 -2
  114. package/dist/overlays/relationships-browser/custom/nodeTypes.d.ts +8 -5
  115. package/dist/overlays/relationships-browser/custom/nodeTypes.js +4 -0
  116. package/dist/overlays/relationships-browser/layout.d.ts +2 -2
  117. package/dist/overlays/relationships-browser/layout.js +10 -6
  118. package/dist/overlays/relationships-browser/useViewToNodesEdges.js +4 -3
  119. package/dist/search/Search.d.ts +4 -0
  120. package/dist/search/Search.js +173 -0
  121. package/dist/{likec4diagram/ui/search → search/components}/ElementsColumn.css.js +0 -1
  122. package/dist/search/components/ElementsColumn.d.ts +2 -0
  123. package/dist/{likec4diagram/ui/search → search/components}/ElementsColumn.js +26 -25
  124. package/dist/search/components/PickView.d.ts +4 -0
  125. package/dist/search/components/PickView.js +135 -0
  126. package/dist/search/components/SearchByTags.d.ts +1 -0
  127. package/dist/search/components/SearchByTags.js +119 -0
  128. package/dist/search/components/SearchInput.d.ts +2 -0
  129. package/dist/{likec4diagram/ui/search → search/components}/SearchInput.js +61 -40
  130. package/dist/{likec4diagram/ui/search → search/components}/ViewsColum.d.ts +3 -2
  131. package/dist/{likec4diagram/ui/search → search/components}/ViewsColum.js +25 -17
  132. package/dist/{likec4diagram/ui/search → search/components}/_shared.css.js +26 -35
  133. package/dist/{likec4diagram/ui/search/LikeC4Search.css.d.ts → search/components/styles.css.d.ts} +0 -2
  134. package/dist/search/components/styles.css.js +60 -0
  135. package/dist/search/components/utils.d.ts +5 -0
  136. package/dist/search/components/utils.js +58 -0
  137. package/dist/search/hooks.d.ts +10 -0
  138. package/dist/search/hooks.js +35 -0
  139. package/dist/search/searchActor.d.ts +90 -0
  140. package/dist/search/searchActor.js +75 -0
  141. package/dist/state/DiagramActorProvider.d.ts +9 -7
  142. package/dist/state/DiagramActorProvider.js +24 -18
  143. package/dist/state/assign.d.ts +0 -1
  144. package/dist/state/assign.js +9 -19
  145. package/dist/state/diagram-machine.d.ts +645 -183
  146. package/dist/state/diagram-machine.js +127 -60
  147. package/dist/state/syncManualLayoutActor.d.ts +2 -2
  148. package/dist/state/types.d.ts +2 -0
  149. package/dist/state/utils.d.ts +2 -0
  150. package/dist/state/utils.js +3 -0
  151. package/dist/styles-min.css +1 -1
  152. package/dist/styles-xyflow.css +1 -1
  153. package/dist/styles.css +1 -1
  154. package/dist/styles.css2.js +1 -1
  155. package/package.json +20 -19
  156. package/panda.buildinfo.json +171 -148
  157. package/src/LikeC4CustomColors.tsx +21 -6
  158. package/src/LikeC4Diagram.props.ts +48 -32
  159. package/src/LikeC4Diagram.tsx +19 -20
  160. package/src/LikeC4ModelProvider.tsx +6 -5
  161. package/src/StaticLikeC4Diagram.tsx +8 -6
  162. package/src/base/const.ts +1 -1
  163. package/src/base/index.ts +2 -1
  164. package/src/base/primitives/compound/CompoundActionButton.tsx +2 -1
  165. package/src/base/primitives/compound/CompoundDetailsButton.tsx +2 -1
  166. package/src/base/primitives/compound/CompoundTitle.tsx +3 -2
  167. package/src/base/primitives/edge/EdgeContainer.tsx +2 -1
  168. package/src/base/primitives/edge/EdgeLabel.css.ts +1 -0
  169. package/src/base/primitives/edge/EdgeLabel.tsx +20 -15
  170. package/src/base/primitives/edge/EdgeLabelContainer.tsx +1 -1
  171. package/src/base/primitives/edge/EdgeMarkers.tsx +2 -1
  172. package/src/base/primitives/edge/EdgePath.tsx +1 -1
  173. package/src/base/primitives/element/ElementActionButtons.tsx +11 -10
  174. package/src/base/primitives/element/ElementDetailsButton.tsx +2 -1
  175. package/src/base/primitives/element/ElementShape.tsx +2 -1
  176. package/src/base/primitives/element/ElementTags.tsx +182 -0
  177. package/src/base/primitives/element/ElementTitle.tsx +21 -15
  178. package/src/base/primitives/index.ts +1 -0
  179. package/src/base/types.Base.ts +104 -0
  180. package/src/base/types.ts +2 -99
  181. package/src/bundle/LikeC4View.props.ts +17 -4
  182. package/src/bundle/LikeC4View.tsx +27 -36
  183. package/src/bundle/ReactLikeC4.tsx +16 -36
  184. package/src/components/ErrorFallback.tsx +30 -0
  185. package/src/context/DiagramEventHandlers.tsx +5 -4
  186. package/src/context/DiagramFeatures.tsx +3 -22
  187. package/src/context/EnsureMantine.tsx +1 -1
  188. package/src/context/IconRenderer.tsx +1 -4
  189. package/src/context/RootContainer.tsx +9 -3
  190. package/src/context/TagStylesContext.tsx +96 -0
  191. package/src/custom/components.ts +2 -0
  192. package/src/custom/customNodes.tsx +29 -14
  193. package/src/custom/hooks.ts +2 -0
  194. package/src/hooks/index.ts +1 -1
  195. package/src/hooks/useCurrentViewId.ts +1 -4
  196. package/src/hooks/useDiagram.ts +104 -12
  197. package/src/hooks/useMantinePortalProps.ts +10 -1
  198. package/src/hooks/useSearchActor.ts +11 -0
  199. package/src/hooks/useUpdateEffect.ts +7 -4
  200. package/src/hooks/useXYFlow.ts +5 -0
  201. package/src/likec4diagram/DiagramUI.tsx +5 -0
  202. package/src/likec4diagram/DiagramXYFlow.tsx +118 -121
  203. package/src/likec4diagram/custom/edges/RelationshipEdge.tsx +9 -0
  204. package/src/likec4diagram/custom/edges/RelationshipsDropdownMenu.tsx +10 -9
  205. package/src/likec4diagram/custom/nodes/nodes.tsx +45 -43
  206. package/src/likec4diagram/custom/nodes/toolbar/_shared.tsx +11 -3
  207. package/src/likec4diagram/types.ts +5 -3
  208. package/src/likec4diagram/ui/controls/Controls.tsx +11 -4
  209. package/src/likec4diagram/ui/notation/NotationPanel.tsx +2 -2
  210. package/src/likec4diagram/useViewToNodesEdges.ts +34 -36
  211. package/src/likec4model/LikeC4ModelContext.ts +2 -2
  212. package/src/likec4model/index.ts +2 -0
  213. package/src/likec4model/useLikeC4ElementsTree.ts +1 -1
  214. package/src/likec4model/useLikeC4Model.ts +32 -16
  215. package/src/overlays/Overlays.tsx +5 -32
  216. package/src/overlays/element-details/ElementDetailsCard.tsx +25 -18
  217. package/src/overlays/element-details/TabPanelDeployments.tsx +3 -2
  218. package/src/overlays/element-details/TabPanelRelationships.tsx +2 -1
  219. package/src/overlays/element-details/TabPanelStructure.tsx +1 -1
  220. package/src/overlays/element-details/actor.ts +2 -2
  221. package/src/overlays/overlay/Overlay.css.ts +75 -38
  222. package/src/overlays/overlay/Overlay.tsx +61 -29
  223. package/src/overlays/overlaysActor.ts +1 -1
  224. package/src/overlays/relationship-details/RelationshipDetails.tsx +4 -4
  225. package/src/overlays/relationship-details/_types.ts +2 -1
  226. package/src/overlays/relationship-details/custom/nodeTypes.tsx +4 -0
  227. package/src/overlays/relationship-details/layout-to-xyflow.ts +1 -0
  228. package/src/overlays/relationship-details/layout.ts +3 -1
  229. package/src/overlays/relationships-browser/SelectElement.tsx +1 -1
  230. package/src/overlays/relationships-browser/_types.ts +2 -1
  231. package/src/overlays/relationships-browser/custom/nodeTypes.tsx +4 -0
  232. package/src/overlays/relationships-browser/layout.ts +12 -7
  233. package/src/overlays/relationships-browser/useViewToNodesEdges.ts +4 -4
  234. package/src/search/Search.tsx +220 -0
  235. package/src/{likec4diagram/ui/search → search/components}/ElementsColumn.css.ts +0 -29
  236. package/src/{likec4diagram/ui/search → search/components}/ElementsColumn.tsx +28 -29
  237. package/src/search/components/PickView.tsx +134 -0
  238. package/src/search/components/SearchByTags.tsx +112 -0
  239. package/src/{likec4diagram/ui/search → search/components}/SearchInput.tsx +72 -42
  240. package/src/{likec4diagram/ui/search → search/components}/ViewsColum.tsx +29 -22
  241. package/src/{likec4diagram/ui/search → search/components}/_shared.css.ts +26 -37
  242. package/src/{likec4diagram/ui/search/LikeC4Search.css.ts → search/components/styles.css.ts} +9 -36
  243. package/src/search/components/utils.ts +64 -0
  244. package/src/search/hooks.ts +38 -0
  245. package/src/search/searchActor.ts +99 -0
  246. package/src/state/DiagramActorProvider.tsx +37 -25
  247. package/src/state/assign.ts +10 -10
  248. package/src/state/diagram-machine.ts +123 -58
  249. package/src/state/syncManualLayoutActor.ts +1 -1
  250. package/src/state/types.ts +2 -0
  251. package/src/state/utils.ts +4 -0
  252. package/dist/base/types.js +0 -54
  253. package/dist/likec4diagram/ui/search/ElementsColumn.d.ts +0 -1
  254. package/dist/likec4diagram/ui/search/LikeC4Search.css.js +0 -87
  255. package/dist/likec4diagram/ui/search/LikeC4Search.d.ts +0 -2
  256. package/dist/likec4diagram/ui/search/LikeC4Search.js +0 -267
  257. package/dist/likec4diagram/ui/search/SearchInput.d.ts +0 -1
  258. package/dist/likec4diagram/ui/search/state.d.ts +0 -19
  259. package/dist/likec4diagram/ui/search/state.js +0 -63
  260. package/dist/likec4diagram/ui/search/utils.d.ts +0 -3
  261. package/dist/likec4diagram/ui/search/utils.js +0 -20
  262. package/src/likec4diagram/ui/search/LikeC4Search.tsx +0 -301
  263. package/src/likec4diagram/ui/search/state.ts +0 -78
  264. package/src/likec4diagram/ui/search/utils.ts +0 -20
  265. /package/dist/{likec4diagram/ui/search → search/components}/ElementsColumn.css.d.ts +0 -0
  266. /package/dist/{likec4diagram/ui/search → search/components}/ViewsColumn.css.d.ts +0 -0
  267. /package/dist/{likec4diagram/ui/search → search/components}/ViewsColumn.css.js +0 -0
  268. /package/dist/{likec4diagram/ui/search → search/components}/_shared.css.d.ts +0 -0
  269. /package/src/{likec4diagram/ui/search → search/components}/ViewsColumn.css.ts +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@likec4/diagram",
3
- "version": "1.31.0",
3
+ "version": "1.32.1",
4
4
  "license": "MIT",
5
5
  "bugs": "https://github.com/likec4/likec4/issues",
6
6
  "homepage": "https://likec4.dev",
@@ -67,14 +67,14 @@
67
67
  },
68
68
  "dependencies": {
69
69
  "@dagrejs/dagre": "1.1.4",
70
- "@mantine/core": "8.0.1",
71
- "@mantine/hooks": "8.0.1",
70
+ "@mantine/core": "8.1.0",
71
+ "@mantine/hooks": "8.1.0",
72
72
  "@nanostores/react": "1.0.0",
73
73
  "@react-hookz/web": "^25.1.1",
74
74
  "@tabler/icons-react": "3.31.0",
75
- "@xstate/react": "^5.0.3",
76
- "@xyflow/react": "^12.6.0",
77
- "@xyflow/system": "^0.0.57",
75
+ "@xstate/react": "^5.0.4",
76
+ "@xyflow/react": "^12.6.4",
77
+ "@xyflow/system": "^0.0.61",
78
78
  "bezier-js": "^6.1.4",
79
79
  "d3-shape": "^3.2.0",
80
80
  "fast-equals": "^5.2.2",
@@ -82,12 +82,12 @@
82
82
  "nanostores": "1.0.1",
83
83
  "react-error-boundary": "^5.0.0",
84
84
  "react-shadow": "^20.6.0",
85
- "remeda": "^2.21.3",
86
- "type-fest": "^4.40.0",
87
- "xstate": "^5.19.2",
88
- "@likec4/core": "1.31.0",
89
- "@likec4/style-preset": "1.31.0",
90
- "@likec4/styles": "1.31.0"
85
+ "remeda": "^2.23.0",
86
+ "type-fest": "^4.41.0",
87
+ "xstate": "^5.19.3",
88
+ "@likec4/styles": "1.32.1",
89
+ "@likec4/core": "1.32.1",
90
+ "@likec4/style-preset": "1.32.1"
91
91
  },
92
92
  "peerDependencies": {
93
93
  "react": "^18.x || ^19.x",
@@ -98,19 +98,19 @@
98
98
  "@statelyai/inspect": "^0.4.0",
99
99
  "@types/bezier-js": "^4.1.3",
100
100
  "@types/d3-shape": "^3.1.7",
101
- "@types/react": "^19.1.2",
102
- "@types/react-dom": "^19.1.3",
103
- "@types/node": "^20.17.30",
101
+ "@types/react": "^19.1.5",
102
+ "@types/react-dom": "^19.1.5",
103
+ "@types/node": "~20.19.0",
104
104
  "@vitejs/plugin-react": "^4.5.0",
105
- "postcss": "^8.5.3",
105
+ "postcss": "^8.5.4",
106
106
  "react": "^19.1.0",
107
107
  "react-dom": "^19.1.0",
108
108
  "typescript": "^5.8.3",
109
109
  "vite": "^6.3.5",
110
110
  "vite-plugin-dts": "^4.5.4",
111
- "vitest": "^3.1.2",
111
+ "vitest": "3.2.3",
112
112
  "wireit": "^0.14.12",
113
- "@likec4/tsconfig": "1.31.0"
113
+ "@likec4/tsconfig": "1.32.1"
114
114
  },
115
115
  "scripts": {
116
116
  "typecheck": "tsc --build --verbose",
@@ -118,6 +118,7 @@
118
118
  "build:bundle": "vite build -m bundle",
119
119
  "build": "echo \"use pnpm turbo run build\" || true",
120
120
  "pack": "pnpm pack",
121
- "test": "vitest run --no-isolate"
121
+ "test": "vitest run --no-isolate",
122
+ "clean": "pnpm rimraf dist lib bundle"
122
123
  }
123
124
  }
@@ -212,8 +212,10 @@
212
212
  "width]___[value:80%]___[cond:& .tabler-icon",
213
213
  "height]___[value:80%]___[cond:& .tabler-icon",
214
214
  "strokeWidth]___[value:2]___[cond:& .tabler-icon",
215
- "top]___[value:calc(100% - 28px)",
216
- "minHeight]___[value:28px",
215
+ "zIndex]___[value:1",
216
+ "top]___[value:calc(100% - 30px)",
217
+ "transform]___[value:translateX(-50%)",
218
+ "left]___[value:50%",
217
219
  "top]___[value:2",
218
220
  "right]___[value:2",
219
221
  "right]___[value:5px]___[cond:_shapeBrowser",
@@ -258,6 +260,31 @@
258
260
  "filter]___[value:none]___[cond:_smallZoom",
259
261
  "transition]___[value:none]___[cond:_whenPanning",
260
262
  "filter]___[value:none]___[cond:_whenPanning",
263
+ "position]___[value:bottom-start",
264
+ "mainAxis]___[value:8",
265
+ "alignItems]___[value:flex-end",
266
+ "gap]___[value:4",
267
+ "justifyItems]___[value:stretch",
268
+ "bottom]___[value:0",
269
+ "padding]___[value:4",
270
+ "bottom]___[value:5]___[cond:_shapeCylinder",
271
+ "bottom]___[value:5]___[cond:_shapeStorage",
272
+ "bottom]___[value:0]___[cond:_shapeQueue",
273
+ "paddingLeft]___[value:14]___[cond:_shapeQueue",
274
+ "layerStyle]___[value:likec4.tag",
275
+ "maxWidth]___[value:50",
276
+ "height]___[value:5",
277
+ "height]___[value:12]___[cond:_whenHovered",
278
+ "borderRadius]___[value:4]___[cond:_whenHovered",
279
+ "transitionDelay]___[value:.08s]___[cond:_whenHovered",
280
+ "border]___[value:none",
281
+ "userSelect]___[value:none",
282
+ "fontSize]___[value:lg",
283
+ "borderRadius]___[value:4",
284
+ "paddingInline]___[value:6",
285
+ "flexWrap]___[value:wrap",
286
+ "paddingBottom]___[value:sm",
287
+ "gap]___[value:sm",
261
288
  "textStyle]___[value:likec4.node.primary",
262
289
  "color]___[value:likec4.palette.hiContrast",
263
290
  "flex]___[value:0 1 auto",
@@ -310,6 +337,11 @@
310
337
  "color]___[value:gray",
311
338
  "--mantine-cursor-pointer]___[value:pointer",
312
339
  "cursor]___[value:pointer]___[cond:& :where(.likec4-diagram, .likec4-compound-node, .likec4-element-node)",
340
+ "position]___[value:fixed",
341
+ "color]___[value:red",
342
+ "padding]___[value:xl",
343
+ "gap]___[value:xs",
344
+ "marginTop]___[value:xl",
313
345
  "gap]___[value:micro",
314
346
  "justifyContent]___[value:stretch",
315
347
  "transitionProperty]___[value:all",
@@ -362,7 +394,6 @@
362
394
  "backgroundColor]___[value:mantine.colors.dark[8]/70]___[cond:_dark",
363
395
  "backgroundColor]___[value:mantine.colors.gray[2]]___[cond:_groupHover<___>_light",
364
396
  "backgroundColor]___[value:mantine.colors.dark[8]]___[cond:_groupHover<___>_dark",
365
- "gap]___[value:xs",
366
397
  "top]___[value:1",
367
398
  "right]___[value:1",
368
399
  "zIndex]___[value:9",
@@ -370,12 +401,10 @@
370
401
  "padding]___[value:xs",
371
402
  "marginInline]___[value:auto",
372
403
  "marginTop]___[value:2",
373
- "padding]___[value:4",
374
404
  "gap]___[value:0",
375
405
  "overflowY]___[value:scroll",
376
406
  "minWidth]___[value:250px",
377
407
  "maxWidth]___[value:min(90vw, 500px)",
378
- "gap]___[value:4",
379
408
  "display]___[value:block",
380
409
  "fontSize]___[value:xxs",
381
410
  "whiteSpace]___[value:nowrap",
@@ -387,7 +416,6 @@
387
416
  "color]___[value:likec4.palette.loContrast]___[cond:_dark",
388
417
  "fontSize]___[value:xs",
389
418
  "opacity]___[value:0.65",
390
- "position]___[value:bottom-start",
391
419
  "top]___[value:5",
392
420
  "right]___[value:6",
393
421
  "gap]___[value:10px",
@@ -421,7 +449,6 @@
421
449
  "borderBlockEndWidth]___[value:var(--thickness)",
422
450
  "gap]___[value:2",
423
451
  "justifyContent]___[value:flex-start",
424
- "flexWrap]___[value:wrap",
425
452
  "gap]___[value:6",
426
453
  "marginTop]___[value:sm",
427
454
  "color]___[value:dark",
@@ -466,7 +493,6 @@
466
493
  "boxShadow]___[value:none]___[cond:_whenPanning",
467
494
  "flex]___[value:1 1 40%",
468
495
  "padding]___[value:4px 6px",
469
- "zIndex]___[value:1",
470
496
  "background]___[value:mantine.colors.gray[2]",
471
497
  "borderColor]___[value:mantine.colors.gray[4]",
472
498
  "background]___[value:mantine.colors.dark[5]]___[cond:_dark",
@@ -497,13 +523,10 @@
497
523
  "opacity]___[value:0.7",
498
524
  "marginBottom]___[value:sm",
499
525
  "maxHeight]___[value:42",
500
- "gap]___[value:sm",
501
526
  "display]___[value:inline-block",
502
- "bottom]___[value:0",
503
527
  "right]___[value:0",
504
528
  "--ai-radius]___[value:0px",
505
529
  "--ai-radius]___[value:{radii.md}]___[cond:_noReduceGraphics",
506
- "userSelect]___[value:none",
507
530
  "maxWidth]___[value:calc(100vw - 20px)",
508
531
  "minWidth]___[value:300]___[cond:sm",
509
532
  "maxWidth]___[value:65vw]___[cond:sm",
@@ -533,126 +556,6 @@
533
556
  "flex]___[value:0 0 70px",
534
557
  "opacity]___[value:0.25",
535
558
  "marginLeft]___[value:2",
536
- "outline]___[value:none",
537
- "marginBottom]___[value:8px",
538
- "containerName]___[value:likec4-tree",
539
- "containerType]___[value:inline-size",
540
- "alignItems]___[value:baseline",
541
- "outline]___[value:none !important",
542
- "marginTop]___[value:8px",
543
- "flexDirection]___[value:column-reverse]___[cond:@container likec4-tree (max-width: 450px)",
544
- "alignItems]___[value:flex-start]___[cond:@container likec4-tree (max-width: 450px)",
545
- "gap]___[value:2]___[cond:@container likec4-tree (max-width: 450px)",
546
- "lineHeight]___[value:1.3",
547
- "padding]___[value:1px 5px",
548
- "background]___[value:mantine.colors.dark[9]/30",
549
- "background]___[value:mantine.colors.gray[3]/20]___[cond:_light",
550
- "--likec4-icon-size]___[value:24px",
551
- "--likec4-icon-size]___[value:18px]___[cond:@container likec4-tree (max-width: 450px)",
552
- "lineHeight]___[value:1.1",
553
- "display]___[value:none]___[cond:@container likec4-tree (max-width: 450px)",
554
- "maxWidth]___[value:8xl",
555
- "paddingInline]___[value:4",
556
- "paddingInline]___[value:6]___[cond:md",
557
- "paddingInline]___[value:8]___[cond:lg",
558
- "stroke]___[value:3.5",
559
- "lineClamp]___[value:1",
560
- "position]___[value:fixed",
561
- "zIndex]___[value:900",
562
- "inset]___[value:0px",
563
- "backgroundColor]___[value:[rgb(34 34 34 / 0.95)]",
564
- "backdropFilter]___[value:auto",
565
- "backdropBlur]___[value:10px",
566
- "backgroundColor]___[value:[rgb(255 255 255 / 0.92 )]]___[cond:_light",
567
- "containerName]___[value:likec4-search",
568
- "containerType]___[value:size",
569
- "zIndex]___[value:901",
570
- "maxHeight]___[value:100vh",
571
- "gap]___[value:md",
572
- "paddingTop]___[value:32px",
573
- "paddingLeft]___[value:16px",
574
- "paddingRight]___[value:16px",
575
- "background]___[value:mantine.colors.gray[3]/55]___[cond:_focusWithin",
576
- "background]___[value:mantine.colors.dark[4]/55]___[cond:_focusWithin<___>_dark",
577
- "inset]___[value:0",
578
- "backgroundColor]___[value:[rgb(34 34 34 / 0.7)]",
579
- "zIndex]___[value:902",
580
- "backgroundColor]___[value:[rgb(255 255 255 / 0.6)]]___[cond:_light",
581
- "top]___[value:2rem",
582
- "left]___[value:50%",
583
- "maxWidth]___[value:600px",
584
- "minWidth]___[value:200px",
585
- "transform]___[value:translateX(-50%)",
586
- "zIndex]___[value:903",
587
- "marginTop]___[value:32px]___[cond:& + &",
588
- "height]___[value:100cqh]___[cond:xs",
589
- "minHeight]___[value:100%]___[cond:& .mantine-ScrollArea-viewport",
590
- "minHeight]___[value:100%]___[cond:& .mantine-ScrollArea-viewport<___>& > div",
591
- "height]___[value:100%]___[cond:& .mantine-ScrollArea-viewport<___>& > div",
592
- "paddingInline]___[value:sm",
593
- "paddingBlock]___[value:md",
594
- "display]___[value:grid",
595
- "order]___[value:6",
596
- "order]___[value:2",
597
- "containerName]___[value:likec4-search-elements",
598
- "flexGrow]___[value:1",
599
- "paddingRight]___[value:xs",
600
- "opacity]___[value:0.5",
601
- "marginRight]___[value:4",
602
- "marginRight]___[value:1",
603
- "mainAxis]___[value:4",
604
- "crossAxis]___[value:50",
605
- "gap]___[value:8",
606
- "srOnly]___[value:true",
607
- "opacity]___[value:0.45]___[cond:&[data-disabled] .mantine-ThemeIcon-root",
608
- "marginTop]___[value:4px",
609
- "fontSize]___[value:13px",
610
- "lineHeight]___[value:1.4",
611
- "opacity]___[value:0.85]___[cond::where(.likec4-view-btn[data-disabled]) &",
612
- "background]___[value:mantine.colors.primary[8]",
613
- "borderColor]___[value:mantine.colors.primary[9]",
614
- "background]___[value:mantine.colors.body",
615
- "padding]___[value:12px 8px 12px 14px",
616
- "minHeight]___[value:60px",
617
- "outline]___[value:none]___[cond:_hover",
618
- "borderColor]___[value:mantine.colors.primary[9]]___[cond:_hover",
619
- "background]___[value:mantine.colors.primary[8]/60]___[cond:_hover",
620
- "outline]___[value:none]___[cond:_focus",
621
- "background]___[value:mantine.colors.primary[8]]___[cond:_focus",
622
- "borderColor]___[value:mantine.colors.primary[9]]___[cond:_focus",
623
- "outline]___[value:none]___[cond:.mantine-Tree-node:focus > .mantine-Tree-label &",
624
- "background]___[value:mantine.colors.primary[8]]___[cond:.mantine-Tree-node:focus > .mantine-Tree-label &",
625
- "borderColor]___[value:mantine.colors.primary[9]]___[cond:.mantine-Tree-node:focus > .mantine-Tree-label &",
626
- "borderColor]___[value:transparent]___[cond:_dark",
627
- "background]___[value:mantine.colors.dark[6]/80]___[cond:_dark",
628
- "background]___[value:mantine.colors.white/80]___[cond:_light",
629
- "borderColor]___[value:mantine.colors.primary[6]]___[cond:_light<___>_hover",
630
- "backgroundColor]___[value:mantine.colors.primary[5]]___[cond:_light<___>_hover",
631
- "color]___[value:mantine.colors.primary[0]]___[cond:_groupHover",
632
- "color]___[value:mantine.colors.primary[0]]___[cond:_groupFocus",
633
- "color]___[value:mantine.colors.primary[0]]___[cond:.mantine-Tree-node:focus > .mantine-Tree-label &",
634
- "color]___[value:mantine.colors.gray[6]]___[cond:_light",
635
- "color]___[value:mantine.colors.primary[3]]___[cond:_light<___>_groupHover",
636
- "color]___[value:mantine.colors.primary[3]]___[cond:_light<___>_groupFocus",
637
- "color]___[value:mantine.colors.primary[3]]___[cond:_light<___>.mantine-Tree-node:focus > .mantine-Tree-label &",
638
- "flex]___[value:0 0 var(--likec4-icon-size, 24px)",
639
- "height]___[value:var(--likec4-icon-size, 24px)",
640
- "width]___[value:var(--likec4-icon-size, 24px)",
641
- "--ti-size]___[value:var(--likec4-icon-size, 24px)",
642
- "strokeWidth]___[value:1.5]___[cond:&.likec4-shape-icon svg",
643
- "fontSize]___[value:16px",
644
- "opacity]___[value:0.4]___[cond::where([data-disabled]) &",
645
- "color]___[value:mantine.colors.dark[1]",
646
- "color]___[value:mantine.colors.primary[1]]___[cond:_groupHover",
647
- "color]___[value:mantine.colors.primary[1]]___[cond:_groupFocus",
648
- "color]___[value:mantine.colors.primary[1]]___[cond:.mantine-Tree-node:focus > .mantine-Tree-label &",
649
- "color]___[value:mantine.colors.primary[0]]___[cond:_groupHover<___>_light",
650
- "fontSize]___[value:12px",
651
- "opacity]___[value:0.85]___[cond::where([data-disabled]) &",
652
- "border]___[value:2px dashed",
653
- "borderRadius]___[value:md",
654
- "fontSize]___[value:md",
655
- "paddingBlock]___[value:xl",
656
559
  "bottom]___[value:0.5rem",
657
560
  "gap]___[value:0.4rem",
658
561
  "gap]___[value:0.6rem]___[cond:md",
@@ -673,13 +576,12 @@
673
576
  "paddingLeft]___[value:lg",
674
577
  "paddingInline]___[value:md",
675
578
  "paddingRight]___[value:lg",
676
- "color]___[value:red",
677
- "padding]___[value:xl",
678
- "marginTop]___[value:xl",
679
579
  "boxSizing]___[value:border-box",
580
+ "inset]___[value:0",
680
581
  "width]___[value:100vw",
681
582
  "height]___[value:100vh",
682
583
  "maxWidth]___[value:100vw",
584
+ "maxHeight]___[value:100vh",
683
585
  "background]___[value:[transparent]",
684
586
  "backdropFilter]___[value:auto]___[cond:_backdrop",
685
587
  "backdropBlur]___[value:var(--_blur)]___[cond:_backdrop",
@@ -687,7 +589,6 @@
687
589
  "gap]___[value:lg",
688
590
  "backgroundColor]___[value:mantine.colors.body",
689
591
  "backgroundColor]___[value:mantine.colors.dark[6]]___[cond:_dark",
690
- "border]___[value:none",
691
592
  "backgroundImage]___[value: linear-gradient(180deg, color-mix(in srgb, {colors.likec4.palette.fill} 60%, transparent), color-mix(in srgb, {colors.likec4.palette.fill} 20%, transparent) 8px, color-mix(in srgb, {colors.likec4.palette.fill} 14%, transparent) 20px, transparent 80px ), linear-gradient(180deg, {colors.likec4.palette.fill}, {colors.likec4.palette.fill} 4px, transparent 4px) ",
692
593
  "cursor]___[value:move",
693
594
  "fontFamily]___[value:likec4.element",
@@ -704,6 +605,7 @@
704
605
  "maxHeight]___[value:100%]___[cond:& :where(svg, img)",
705
606
  "pointerEvents]___[value:none]___[cond:& :where(svg, img)",
706
607
  "filter]___[value: drop-shadow(0 0 3px rgb(0 0 0 / 10%)) drop-shadow(0 1px 8px rgb(0 0 0 / 5%)) drop-shadow(1px 1px 16px rgb(0 0 0 / 2%)) ]___[cond:& :where(svg, img)",
608
+ "background]___[value:mantine.colors.body",
707
609
  "padding]___[value:10px 8px",
708
610
  "border]___[value:1px dashed",
709
611
  "--view-title-color]___[value:{colors.mantine.colors.dark[1]}",
@@ -720,8 +622,10 @@
720
622
  "transitionTimingFunction]___[value:out]___[cond:&:hover > *",
721
623
  "transform]___[value:translateX(1.6px)]___[cond:&:hover > *",
722
624
  "color]___[value:[var(--view-title-color, {colors.mantine.colors.gray[7]})]",
625
+ "lineHeight]___[value:1.4",
723
626
  "background]___[value:mantine.colors.gray[1]",
724
627
  "padding]___[value:4px",
628
+ "flexGrow]___[value:1",
725
629
  "padding]___[value:6px 8px",
726
630
  "background]___[value:mantine.colors.gray[3]]___[cond:_hover",
727
631
  "transition]___[value:none]___[cond:&[data-active]",
@@ -738,10 +642,11 @@
738
642
  "height]___[value:100%]___[cond:& .mantine-ScrollArea-root",
739
643
  "paddingLeft]___[value:4px]___[cond:& .mantine-ScrollArea-root<___>& > div",
740
644
  "paddingRight]___[value:4px]___[cond:& .mantine-ScrollArea-root<___>& > div",
645
+ "display]___[value:grid",
741
646
  "gridTemplateColumns]___[value:min-content 1fr",
742
647
  "gridAutoRows]___[value:min-content max-content",
743
648
  "gap]___[value:[20px 16px]",
744
- "justifyItems]___[value:stretch",
649
+ "alignItems]___[value:baseline",
745
650
  "justifySelf]___[value:end",
746
651
  "width]___[value:14px",
747
652
  "height]___[value:14px",
@@ -755,6 +660,7 @@
755
660
  "cursor]___[value:se-resize",
756
661
  "borderWidth]___[value:4px]___[cond:_hover",
757
662
  "borderColor]___[value:mantine.colors.dark[1]]___[cond:_hover",
663
+ "lineClamp]___[value:1",
758
664
  "marginTop]___[value:6",
759
665
  "stroke]___[value:1.6",
760
666
  "paddingTop]___[value:xs",
@@ -795,12 +701,13 @@
795
701
  "transform]___[value:translateY(-100%) translateY(-2px)]___[cond:_before",
796
702
  "background]___[value:mantine.colors.gray[3]]___[cond:_light<___>& .mantine-SegmentedControl-root",
797
703
  "fontSize]___[value:xl",
704
+ "padding]___[value:1px 5px",
798
705
  "minWidth]___[value:24",
799
706
  "background]___[value:mantine.colors.dark[7]",
800
707
  "color]___[value:mantine.colors.defaultColor",
801
708
  "color]___[value:mantine.colors.dimmed]___[cond:&[data-zero]",
802
709
  "background]___[value:mantine.colors.orange[8]/20]___[cond:&[data-missing]",
803
- "alignItems]___[value:flex-end",
710
+ "gap]___[value:8",
804
711
  "marginBottom]___[value:4",
805
712
  "top]___[value:12",
806
713
  "right]___[value:12",
@@ -810,22 +717,18 @@
810
717
  "transitionTimingFunction]___[value:out]___[cond:_hover<___>& > *",
811
718
  "transform]___[value:translateX(1px)]___[cond:_hover<___>& > *",
812
719
  "background]___[value:mantine.colors.defaultBorder/50",
720
+ "outline]___[value:none",
813
721
  "borderRadius]___[value:var(--_border-radius)",
814
722
  "--_blur]___[value:0px",
815
723
  "--_level]___[value:0",
816
724
  "--_offset]___[value:0px",
817
725
  "--_inset]___[value:calc((1 + var(--_level) * 0.75) * var(--_offset))",
818
726
  "--_opacity]___[value:0%",
727
+ "--_border-radius]___[value:0px",
819
728
  "cursor]___[value:zoom-out]___[cond:_backdrop",
820
- "backdropFilter]___[value:blur(var(--_blur))]___[cond:_backdrop",
821
- "backgroundColor]___[value:[rgb(34 34 34 / var(--_opacity))]]___[cond:_backdrop<___>_dark",
822
- "backgroundColor]___[value:[rgb(15 15 15/ var(--_opacity))]]___[cond:_backdrop<___>_light",
823
- "--_border-radius]___[value:0px]___[cond:smDown",
824
- "border]___[value:none]___[cond:smDown",
825
- "inset]___[value:0]___[cond:smDown",
826
- "padding]___[value:0]___[cond:smDown",
827
- "width]___[value:100vw]___[cond:smDown",
828
- "height]___[value:100vh]___[cond:smDown",
729
+ "containerName]___[value:overlay-dialog",
730
+ "containerType]___[value:size",
731
+ "border]___[value:0 solid transparent",
829
732
  "inset]___[value:[var(--_inset) var(--_inset) var(--_offset) var(--_inset)]]___[cond:sm",
830
733
  "width]___[value:calc(100vw - 2 * var(--_inset))]___[cond:sm",
831
734
  "height]___[value:calc(100vh - var(--_offset) - var(--_inset))]___[cond:sm",
@@ -835,8 +738,10 @@
835
738
  "--_offset]___[value:1rem]___[cond:md",
836
739
  "--_offset]___[value:2rem]___[cond:lg",
837
740
  "--_offset]___[value:4rem]___[cond:xl",
838
- "containerName]___[value:overlay-dialog",
839
- "border]___[value:0 solid transparent",
741
+ "display]___[value:none]___[cond:_backdrop",
742
+ "backdropFilter]___[value:blur(var(--_blur))]___[cond:_backdrop",
743
+ "backgroundColor]___[value:[rgb(34 34 34 / var(--_opacity))]]___[cond:_backdrop<___>_dark",
744
+ "backgroundColor]___[value:[rgb(15 15 15/ var(--_opacity))]]___[cond:_backdrop<___>_light",
840
745
  "borderRadius]___[value:calc(var(--_border-radius) - 2px)]___[cond:sm",
841
746
  "position]___[value:top-right",
842
747
  "position]___[value:top-left",
@@ -873,13 +778,125 @@
873
778
  "maxHeight]___[value:70vh",
874
779
  "maxHeight]___[value:calc(100cqh - 70px)]___[cond:xs",
875
780
  "borderWidth]___[value:3px",
781
+ "borderRadius]___[value:md",
876
782
  "backgroundColor]___[value:mantine.colors.gray[0]]___[cond:_hover",
877
783
  "backgroundColor]___[value:mantine.colors.defaultHover]___[cond:_hover<___>_dark",
878
784
  "color]___[value:mantine.colors.white]___[cond:_hover<___>_dark",
879
785
  "paddingBlock]___[value:3",
786
+ "stroke]___[value:3.5",
880
787
  "flex]___[value:1 0 auto",
881
788
  "strokeWidth]___[value:5",
882
789
  "border]___[value:3px dashed",
790
+ "backgroundColor]___[value:[rgb(34 34 34 / var(--_opacity, 95%))]",
791
+ "backgroundColor]___[value:[rgb(250 250 250 / var(--_opacity, 95%))]]___[cond:_light",
792
+ "backdropFilter]___[value:auto",
793
+ "backdropBlur]___[value:var(--_blur, 10px)",
794
+ "paddingTop]___[value:20",
795
+ "paddingLeft]___[value:16",
796
+ "paddingRight]___[value:16",
797
+ "height]___[value:100cqh]___[cond:xs",
798
+ "minHeight]___[value:100%]___[cond:& .mantine-ScrollArea-viewport",
799
+ "minHeight]___[value:100%]___[cond:& .mantine-ScrollArea-viewport<___>& > div",
800
+ "height]___[value:100%]___[cond:& .mantine-ScrollArea-viewport<___>& > div",
801
+ "containerName]___[value:likec4-search-elements",
802
+ "paddingInline]___[value:sm",
803
+ "order]___[value:6",
804
+ "paddingRight]___[value:xs",
805
+ "marginBottom]___[value:8px",
806
+ "containerName]___[value:likec4-tree",
807
+ "containerType]___[value:inline-size",
808
+ "outline]___[value:none !important",
809
+ "marginTop]___[value:8px",
810
+ "flexDirection]___[value:column-reverse]___[cond:@container likec4-tree (max-width: 450px)",
811
+ "alignItems]___[value:flex-start]___[cond:@container likec4-tree (max-width: 450px)",
812
+ "gap]___[value:2]___[cond:@container likec4-tree (max-width: 450px)",
813
+ "lineHeight]___[value:1.3",
814
+ "background]___[value:mantine.colors.dark[9]/30",
815
+ "background]___[value:mantine.colors.gray[3]/20]___[cond:_light",
816
+ "--likec4-icon-size]___[value:24px",
817
+ "--likec4-icon-size]___[value:18px]___[cond:@container likec4-tree (max-width: 450px)",
818
+ "lineHeight]___[value:1.1",
819
+ "display]___[value:none]___[cond:@container likec4-tree (max-width: 450px)",
820
+ "maxWidth]___[value:8xl",
821
+ "paddingInline]___[value:4",
822
+ "paddingInline]___[value:6]___[cond:md",
823
+ "paddingInline]___[value:8]___[cond:lg",
824
+ "paddingBlock]___[value:md",
825
+ "order]___[value:2",
826
+ "gap]___[value:md",
827
+ "paddingLeft]___[value:48",
828
+ "opacity]___[value:0.3",
829
+ "grayscale]___[value:0",
830
+ "grayscale]___[value:0.9",
831
+ "filter]___[value:auto",
832
+ "opacity]___[value:1]___[cond:_groupHover",
833
+ "grayscale]___[value:0]___[cond:_groupHover",
834
+ "opacity]___[value:1]___[cond:_groupFocusWithin",
835
+ "grayscale]___[value:0]___[cond:_groupFocusWithin",
836
+ "opacity]___[value:0.5",
837
+ "marginRight]___[value:1",
838
+ "mainAxis]___[value:4",
839
+ "crossAxis]___[value:50",
840
+ "srOnly]___[value:true",
841
+ "opacity]___[value:0.45]___[cond:&[data-disabled] .mantine-ThemeIcon-root",
842
+ "marginTop]___[value:4px",
843
+ "fontSize]___[value:13px",
844
+ "opacity]___[value:0.85]___[cond::where(.likec4-view-btn[data-disabled]) &",
845
+ "background]___[value:mantine.colors.primary[8]",
846
+ "borderColor]___[value:mantine.colors.primary[9]",
847
+ "padding]___[value:12px 8px 12px 14px",
848
+ "minHeight]___[value:60px",
849
+ "outline]___[value:none]___[cond:_hover",
850
+ "borderColor]___[value:mantine.colors.primary[9]]___[cond:_hover",
851
+ "background]___[value:mantine.colors.primary[8]/60]___[cond:_hover",
852
+ "outline]___[value:none]___[cond:_focus",
853
+ "background]___[value:mantine.colors.primary[8]]___[cond:_focus",
854
+ "borderColor]___[value:mantine.colors.primary[9]]___[cond:_focus",
855
+ "outline]___[value:none]___[cond:.mantine-Tree-node:focus > .mantine-Tree-label &",
856
+ "background]___[value:mantine.colors.primary[8]]___[cond:.mantine-Tree-node:focus > .mantine-Tree-label &",
857
+ "borderColor]___[value:mantine.colors.primary[9]]___[cond:.mantine-Tree-node:focus > .mantine-Tree-label &",
858
+ "borderColor]___[value:transparent]___[cond:_dark",
859
+ "background]___[value:mantine.colors.dark[6]/80]___[cond:_dark",
860
+ "background]___[value:mantine.colors.white/80]___[cond:_light",
861
+ "borderColor]___[value:mantine.colors.primary[6]]___[cond:_light<___>_hover",
862
+ "backgroundColor]___[value:mantine.colors.primary[5]]___[cond:_light<___>_hover",
863
+ "color]___[value:mantine.colors.gray[5]]___[cond:_light",
864
+ "color]___[value:mantine.colors.primary[0]]___[cond:_groupHover",
865
+ "color]___[value:mantine.colors.primary[0]]___[cond:_groupFocus",
866
+ "color]___[value:mantine.colors.primary[0]]___[cond:.mantine-Tree-node:focus > .mantine-Tree-label &",
867
+ "flex]___[value:0 0 var(--likec4-icon-size, 24px)",
868
+ "height]___[value:var(--likec4-icon-size, 24px)",
869
+ "width]___[value:var(--likec4-icon-size, 24px)",
870
+ "--ti-size]___[value:var(--likec4-icon-size, 24px)",
871
+ "strokeWidth]___[value:1.5]___[cond:&.likec4-shape-icon svg",
872
+ "fontSize]___[value:16px",
873
+ "opacity]___[value:0.4]___[cond::where([data-disabled]) &",
874
+ "color]___[value:mantine.colors.dark[1]",
875
+ "color]___[value:mantine.colors.primary[1]]___[cond:_groupHover",
876
+ "color]___[value:mantine.colors.white]___[cond:_groupHover<___>_light",
877
+ "color]___[value:mantine.colors.primary[1]]___[cond:_groupFocus",
878
+ "color]___[value:mantine.colors.white]___[cond:_groupFocus<___>_light",
879
+ "color]___[value:mantine.colors.primary[1]]___[cond:.mantine-Tree-node:focus > .mantine-Tree-label &",
880
+ "color]___[value:mantine.colors.white]___[cond:.mantine-Tree-node:focus > .mantine-Tree-label &<___>_light",
881
+ "color]___[value:mantine.colors.primary[0]]___[cond:_groupHover<___>_light",
882
+ "fontSize]___[value:12px",
883
+ "opacity]___[value:0.85]___[cond::where([data-disabled]) &",
884
+ "border]___[value:2px dashed",
885
+ "fontSize]___[value:md",
886
+ "paddingBlock]___[value:xl",
887
+ "background]___[value:mantine.colors.gray[4]/55 !important]___[cond:_focusWithin",
888
+ "background]___[value:mantine.colors.dark[5]/55 !important]___[cond:_focusWithin<___>_dark",
889
+ "background]___[value:mantine.colors.gray[3]/35]___[cond:_groupHover",
890
+ "background]___[value:mantine.colors.dark[5]/35]___[cond:_groupHover<___>_dark",
891
+ "backgroundColor]___[value:[rgb(34 34 34 / 0.7)]",
892
+ "zIndex]___[value:902",
893
+ "backdropBlur]___[value:10px",
894
+ "backgroundColor]___[value:[rgb(255 255 255 / 0.6)]]___[cond:_light",
895
+ "top]___[value:2rem",
896
+ "maxWidth]___[value:600px",
897
+ "minWidth]___[value:200px",
898
+ "zIndex]___[value:903",
899
+ "marginTop]___[value:32px]___[cond:& + &",
883
900
  "likec4Palette]___[value:amber",
884
901
  "likec4Palette]___[value:blue",
885
902
  "likec4Palette]___[value:gray",
@@ -973,6 +990,12 @@
973
990
  "variant]___[value:filled]___[cond:_whenHovered]___[recipe:actionBtn",
974
991
  "variant]___[value:filled]___[cond:_hover]___[recipe:actionBtn",
975
992
  "reducedGraphics]___[value:filled]___[recipe:actionBtn"
993
+ ],
994
+ "likec4tag": [
995
+ "autoTextColor]___[value:false]___[recipe:likec4tag",
996
+ "autoTextColor]___[value:true]___[recipe:likec4tag",
997
+ "autoTextColor]___[value:true]___[cond:_hover]___[recipe:likec4tag",
998
+ "autoTextColor]___[value:false]___[cond:_hover]___[recipe:likec4tag"
976
999
  ]
977
1000
  }
978
1001
  }
@@ -6,9 +6,10 @@ import {
6
6
  nonexhaustive,
7
7
  } from '@likec4/core'
8
8
  import { useMantineStyleNonce } from '@mantine/core'
9
- import { deepEqual } from 'fast-equals'
10
- import { memo } from 'react'
11
- import { entries } from 'remeda'
9
+ import { memo, useState } from 'react'
10
+ import { entries, isEmpty } from 'remeda'
11
+ import { useUpdateEffect } from './hooks'
12
+ import { useLikeC4Specification } from './likec4model/useLikeC4Model'
12
13
 
13
14
  interface LikeC4CustomColorsProperties {
14
15
  customColors: CustomColorDefinitions
@@ -54,17 +55,31 @@ function toStyle(name: String, colors: ThemeColorValues): String {
54
55
  `
55
56
  }
56
57
 
57
- export const LikeC4CustomColors = memo<LikeC4CustomColorsProperties>(({ customColors }) => {
58
- const styles = entries(customColors)
58
+ function generateCustomColorStyles(customColors: CustomColorDefinitions) {
59
+ return entries(customColors)
59
60
  .map(([name, color]) => toStyle(name, color))
60
61
  .join('\n')
62
+ .trim()
63
+ }
64
+
65
+ export const LikeC4CustomColors = memo(() => {
66
+ const customColors = useLikeC4Specification().customColors ?? {}
67
+ const [styles, setStyles] = useState(() => generateCustomColorStyles(customColors))
68
+
69
+ useUpdateEffect(() => {
70
+ setStyles(generateCustomColorStyles(customColors))
71
+ }, [customColors])
61
72
 
62
73
  const nonce = useMantineStyleNonce()?.()
63
74
 
75
+ if (isEmpty(customColors)) {
76
+ return null
77
+ }
78
+
64
79
  return (
65
80
  <>
66
81
  <style type="text/css" dangerouslySetInnerHTML={{ __html: styles }} nonce={nonce} />
67
82
  </>
68
83
  )
69
- }, deepEqual)
84
+ })
70
85
  LikeC4CustomColors.displayName = 'LikeC4CustomColors'