@likec4/diagram 1.28.0 → 1.29.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 (162) hide show
  1. package/bundle/index.js +1040 -1190
  2. package/dist/LikeC4CustomColors.js +2 -2
  3. package/dist/LikeC4Diagram.js +2 -2
  4. package/dist/LikeC4ModelProvider.js +1 -1
  5. package/dist/_virtual/index.js +5 -0
  6. package/dist/_virtual/index2.js +3 -0
  7. package/dist/_virtual/react.production.js +3 -0
  8. package/dist/base/BaseXYFlow.js +5 -5
  9. package/dist/base/primitives/compound/CompoundActionButton.js +1 -1
  10. package/dist/base/primitives/compound/CompoundDetailsButton.js +1 -1
  11. package/dist/base/primitives/compound/CompoundNodeContainer.d.ts +1 -1
  12. package/dist/base/primitives/compound/CompoundNodeContainer.js +2 -2
  13. package/dist/base/primitives/customEdge.d.ts +1 -1
  14. package/dist/base/primitives/customEdge.js +3 -3
  15. package/dist/base/primitives/customNode.js +2 -2
  16. package/dist/base/primitives/edge/EdgeContainer.js +1 -1
  17. package/dist/base/primitives/edge/EdgeLabel.css.d.ts +3 -0
  18. package/dist/base/primitives/edge/EdgeLabel.css.js +3 -0
  19. package/dist/base/primitives/edge/EdgeLabel.d.ts +1 -1
  20. package/dist/base/primitives/edge/EdgeLabel.js +3 -2
  21. package/dist/base/primitives/edge/EdgeLabelContainer.js +1 -1
  22. package/dist/base/primitives/edge/EdgePath.d.ts +10 -42
  23. package/dist/base/primitives/edge/EdgePath.js +23 -16
  24. package/dist/base/primitives/edge/edge.css.js +1 -1
  25. package/dist/base/primitives/element/ElementActionButtons.js +1 -2
  26. package/dist/base/primitives/element/ElementDetailsButton.js +1 -2
  27. package/dist/base/primitives/element/ElementNodeContainer.js +3 -3
  28. package/dist/base/updateEdges.js +7 -2
  29. package/dist/base/updateNodes.js +11 -3
  30. package/dist/bundle/LikeC4View.js +3 -3
  31. package/dist/bundle/ReactLikeC4.js +1 -1
  32. package/dist/bundle/ShadowRoot.js +3 -3
  33. package/dist/bundle/styles.css.js +3 -3
  34. package/dist/context/ControlsCustomLayout.js +1 -1
  35. package/dist/context/DiagramEventHandlers.js +5 -5
  36. package/dist/context/DiagramFeatures.js +7 -7
  37. package/dist/context/EnsureMantine.js +2 -2
  38. package/dist/context/FramerMotionConfig.js +2 -2
  39. package/dist/context/IconRenderer.js +4 -4
  40. package/dist/context/ReduceGraphics.js +2 -2
  41. package/dist/context/RootContainer.js +5 -9
  42. package/dist/hooks/safeContext.d.ts +2 -5
  43. package/dist/hooks/safeContext.js +5 -4
  44. package/dist/hooks/useCurrentViewId.js +1 -1
  45. package/dist/hooks/useDiagram.d.ts +715 -150
  46. package/dist/hooks/useDiagram.js +2 -2
  47. package/dist/hooks/useMantinePortalProps.js +2 -2
  48. package/dist/hooks/useSetState.js +3 -3
  49. package/dist/hooks/useUpdateEffect.js +1 -1
  50. package/dist/hooks/useXYFlow.d.ts +2 -2
  51. package/dist/likec4diagram/DiagramUI.js +2 -2
  52. package/dist/likec4diagram/DiagramXYFlow.js +2 -2
  53. package/dist/likec4diagram/custom/edges/NotePopover.js +2 -2
  54. package/dist/likec4diagram/custom/edges/RelationshipEdge.d.ts +2 -2
  55. package/dist/likec4diagram/custom/edges/RelationshipEdge.js +7 -7
  56. package/dist/likec4diagram/custom/edges/RelationshipsDropdownMenu.js +6 -6
  57. package/dist/likec4diagram/custom/index.d.ts +1 -2
  58. package/dist/likec4diagram/custom/nodes/toolbar/ColorButton.js +2 -2
  59. package/dist/likec4diagram/custom/nodes/toolbar/CompoundToolbar.js +3 -3
  60. package/dist/likec4diagram/custom/nodes/toolbar/_shared.js +2 -2
  61. package/dist/likec4diagram/ui/controls/ChangeAutoLayoutButton.js +4 -4
  62. package/dist/likec4diagram/ui/controls/Controls.js +9 -9
  63. package/dist/likec4diagram/ui/controls/NavigationButtons.js +1 -1
  64. package/dist/likec4diagram/ui/diagram-title/DiagramTitlePanel.js +1 -1
  65. package/dist/likec4diagram/ui/notation/NotationPanel.js +4 -4
  66. package/dist/likec4diagram/ui/search/ElementsColumn.js +88 -77
  67. package/dist/likec4diagram/ui/search/LikeC4Search.d.ts +2 -1
  68. package/dist/likec4diagram/ui/search/LikeC4Search.js +27 -24
  69. package/dist/likec4diagram/ui/search/SearchInput.js +1 -1
  70. package/dist/likec4diagram/ui/search/ViewsColum.js +3 -2
  71. package/dist/likec4diagram/ui/search/state.js +11 -9
  72. package/dist/likec4diagram/ui/walkthrough/DynamicViewWalkthrough.js +1 -1
  73. package/dist/likec4diagram/useLayoutConstraints.js +3 -3
  74. package/dist/likec4model/LikeC4ModelContext.js +2 -2
  75. package/dist/likec4model/useLikeC4ElementsTree.js +2 -2
  76. package/dist/likec4model/useLikeC4Model.js +2 -2
  77. package/dist/node_modules/.pnpm/react@19.0.0/node_modules/react/cjs/react.production.js +548 -0
  78. package/dist/node_modules/.pnpm/react@19.0.0/node_modules/react/index.js +15 -0
  79. package/dist/overlays/Overlays.js +6 -6
  80. package/dist/overlays/element-details/ElementDetails.js +1 -1
  81. package/dist/overlays/element-details/ElementDetailsCard.js +5 -5
  82. package/dist/overlays/element-details/TabPanelDeployments.js +7 -4
  83. package/dist/overlays/element-details/TabPanelRelationships.js +2 -2
  84. package/dist/overlays/element-details/TabPanelStructure.js +6 -3
  85. package/dist/overlays/element-details/actor.d.ts +2 -2
  86. package/dist/overlays/element-details/actorContext.js +3 -3
  87. package/dist/overlays/overlay/Overlay.js +8 -7
  88. package/dist/overlays/relationship-details/RelationshipDetails.d.ts +1 -1
  89. package/dist/overlays/relationship-details/RelationshipDetails.js +28 -23
  90. package/dist/overlays/relationship-details/SelectEdge.js +3 -6
  91. package/dist/overlays/relationship-details/actor.d.ts +4 -1
  92. package/dist/overlays/relationship-details/custom/edgeTypes.d.ts +1 -1
  93. package/dist/overlays/relationship-details/custom/edgeTypes.js +1 -1
  94. package/dist/overlays/relationship-details/hooks.d.ts +4 -1
  95. package/dist/overlays/relationship-details/hooks.js +4 -4
  96. package/dist/overlays/relationships-browser/RelationshipsBrowser.d.ts +1 -1
  97. package/dist/overlays/relationships-browser/RelationshipsBrowser.js +9 -11
  98. package/dist/overlays/relationships-browser/SelectElement.js +8 -5
  99. package/dist/overlays/relationships-browser/actor.d.ts +2 -1
  100. package/dist/overlays/relationships-browser/actor.js +6 -12
  101. package/dist/overlays/relationships-browser/const.d.ts +2 -1
  102. package/dist/overlays/relationships-browser/const.js +6 -1
  103. package/dist/overlays/relationships-browser/custom/edgeTypes.d.ts +1 -1
  104. package/dist/overlays/relationships-browser/custom/edgeTypes.js +3 -4
  105. package/dist/overlays/relationships-browser/custom/nodeTypes.js +1 -1
  106. package/dist/overlays/relationships-browser/hooks.d.ts +2 -1
  107. package/dist/overlays/relationships-browser/hooks.js +4 -4
  108. package/dist/overlays/relationships-browser/layout.js +2 -2
  109. package/dist/overlays/relationships-browser/useViewToNodesEdges.js +1 -2
  110. package/dist/state/DiagramActorProvider.js +7 -5
  111. package/dist/state/diagram-machine.d.ts +719 -146
  112. package/dist/state/diagram-machine.js +51 -10
  113. package/dist/styles.css.js +1 -1
  114. package/package.json +20 -16
  115. package/src/LikeC4Diagram.tsx +0 -1
  116. package/src/base/BaseXYFlow.tsx +2 -2
  117. package/src/base/primitives/compound/CompoundActionButton.tsx +1 -1
  118. package/src/base/primitives/compound/CompoundDetailsButton.tsx +1 -1
  119. package/src/base/primitives/compound/CompoundNodeContainer.tsx +1 -1
  120. package/src/base/primitives/customEdge.ts +1 -0
  121. package/src/base/primitives/edge/EdgeLabel.css.ts +3 -0
  122. package/src/base/primitives/edge/EdgeLabel.tsx +2 -1
  123. package/src/base/primitives/edge/EdgePath.tsx +22 -14
  124. package/src/base/primitives/edge/edge.css.ts +1 -1
  125. package/src/base/primitives/element/ElementActionButtons.tsx +2 -2
  126. package/src/base/primitives/element/ElementDetailsButton.tsx +2 -2
  127. package/src/base/primitives/element/ElementNodeContainer.tsx +1 -1
  128. package/src/base/updateEdges.ts +6 -9
  129. package/src/base/updateNodes.ts +10 -14
  130. package/src/context/FramerMotionConfig.tsx +1 -1
  131. package/src/context/RootContainer.tsx +0 -4
  132. package/src/hooks/safeContext.tsx +3 -1
  133. package/src/likec4diagram/custom/edges/RelationshipEdge.tsx +2 -2
  134. package/src/likec4diagram/custom/edges/RelationshipsDropdownMenu.tsx +1 -1
  135. package/src/likec4diagram/ui/controls/Controls.tsx +56 -58
  136. package/src/likec4diagram/ui/controls/NavigationButtons.tsx +1 -1
  137. package/src/likec4diagram/ui/diagram-title/DiagramTitlePanel.tsx +1 -1
  138. package/src/likec4diagram/ui/notation/NotationPanel.tsx +1 -1
  139. package/src/likec4diagram/ui/search/ElementsColumn.tsx +94 -71
  140. package/src/likec4diagram/ui/search/LikeC4Search.tsx +48 -55
  141. package/src/likec4diagram/ui/search/ViewsColum.tsx +2 -2
  142. package/src/likec4diagram/ui/search/state.ts +8 -6
  143. package/src/likec4diagram/ui/walkthrough/DynamicViewWalkthrough.tsx +1 -1
  144. package/src/overlays/Overlays.tsx +2 -2
  145. package/src/overlays/element-details/ElementDetails.tsx +2 -2
  146. package/src/overlays/element-details/ElementDetailsCard.tsx +1 -1
  147. package/src/overlays/element-details/TabPanelDeployments.tsx +2 -0
  148. package/src/overlays/element-details/TabPanelStructure.tsx +2 -1
  149. package/src/overlays/overlay/Overlay.tsx +2 -1
  150. package/src/overlays/relationship-details/RelationshipDetails.tsx +25 -16
  151. package/src/overlays/relationship-details/SelectEdge.tsx +0 -14
  152. package/src/overlays/relationship-details/actor.ts +2 -1
  153. package/src/overlays/relationship-details/custom/edgeTypes.tsx +1 -1
  154. package/src/overlays/relationships-browser/RelationshipsBrowser.tsx +1 -3
  155. package/src/overlays/relationships-browser/SelectElement.tsx +2 -0
  156. package/src/overlays/relationships-browser/actor.ts +8 -13
  157. package/src/overlays/relationships-browser/const.ts +8 -1
  158. package/src/overlays/relationships-browser/custom/edgeTypes.tsx +2 -3
  159. package/src/overlays/relationships-browser/custom/nodeTypes.tsx +1 -1
  160. package/src/overlays/relationships-browser/useViewToNodesEdges.ts +1 -2
  161. package/src/state/DiagramActorProvider.tsx +7 -4
  162. package/src/state/diagram-machine.ts +50 -8
@@ -0,0 +1,548 @@
1
+ import { __exports as react_production } from '../../../../../../_virtual/react.production.js';
2
+
3
+ /**
4
+ * @license React
5
+ * react.production.js
6
+ *
7
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
8
+ *
9
+ * This source code is licensed under the MIT license found in the
10
+ * LICENSE file in the root directory of this source tree.
11
+ */
12
+
13
+ var hasRequiredReact_production;
14
+
15
+ function requireReact_production () {
16
+ if (hasRequiredReact_production) return react_production;
17
+ hasRequiredReact_production = 1;
18
+ var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
19
+ REACT_PORTAL_TYPE = Symbol.for("react.portal"),
20
+ REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
21
+ REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
22
+ REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
23
+ REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
24
+ REACT_CONTEXT_TYPE = Symbol.for("react.context"),
25
+ REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
26
+ REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
27
+ REACT_MEMO_TYPE = Symbol.for("react.memo"),
28
+ REACT_LAZY_TYPE = Symbol.for("react.lazy"),
29
+ MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
30
+ function getIteratorFn(maybeIterable) {
31
+ if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
32
+ maybeIterable =
33
+ (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||
34
+ maybeIterable["@@iterator"];
35
+ return "function" === typeof maybeIterable ? maybeIterable : null;
36
+ }
37
+ var ReactNoopUpdateQueue = {
38
+ isMounted: function () {
39
+ return false;
40
+ },
41
+ enqueueForceUpdate: function () {},
42
+ enqueueReplaceState: function () {},
43
+ enqueueSetState: function () {}
44
+ },
45
+ assign = Object.assign,
46
+ emptyObject = {};
47
+ function Component(props, context, updater) {
48
+ this.props = props;
49
+ this.context = context;
50
+ this.refs = emptyObject;
51
+ this.updater = updater || ReactNoopUpdateQueue;
52
+ }
53
+ Component.prototype.isReactComponent = {};
54
+ Component.prototype.setState = function (partialState, callback) {
55
+ if (
56
+ "object" !== typeof partialState &&
57
+ "function" !== typeof partialState &&
58
+ null != partialState
59
+ )
60
+ throw Error(
61
+ "takes an object of state variables to update or a function which returns an object of state variables."
62
+ );
63
+ this.updater.enqueueSetState(this, partialState, callback, "setState");
64
+ };
65
+ Component.prototype.forceUpdate = function (callback) {
66
+ this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
67
+ };
68
+ function ComponentDummy() {}
69
+ ComponentDummy.prototype = Component.prototype;
70
+ function PureComponent(props, context, updater) {
71
+ this.props = props;
72
+ this.context = context;
73
+ this.refs = emptyObject;
74
+ this.updater = updater || ReactNoopUpdateQueue;
75
+ }
76
+ var pureComponentPrototype = (PureComponent.prototype = new ComponentDummy());
77
+ pureComponentPrototype.constructor = PureComponent;
78
+ assign(pureComponentPrototype, Component.prototype);
79
+ pureComponentPrototype.isPureReactComponent = true;
80
+ var isArrayImpl = Array.isArray,
81
+ ReactSharedInternals = { H: null, A: null, T: null, S: null },
82
+ hasOwnProperty = Object.prototype.hasOwnProperty;
83
+ function ReactElement(type, key, self, source, owner, props) {
84
+ self = props.ref;
85
+ return {
86
+ $$typeof: REACT_ELEMENT_TYPE,
87
+ type: type,
88
+ key: key,
89
+ ref: void 0 !== self ? self : null,
90
+ props: props
91
+ };
92
+ }
93
+ function cloneAndReplaceKey(oldElement, newKey) {
94
+ return ReactElement(
95
+ oldElement.type,
96
+ newKey,
97
+ void 0,
98
+ void 0,
99
+ void 0,
100
+ oldElement.props
101
+ );
102
+ }
103
+ function isValidElement(object) {
104
+ return (
105
+ "object" === typeof object &&
106
+ null !== object &&
107
+ object.$$typeof === REACT_ELEMENT_TYPE
108
+ );
109
+ }
110
+ function escape(key) {
111
+ var escaperLookup = { "=": "=0", ":": "=2" };
112
+ return (
113
+ "$" +
114
+ key.replace(/[=:]/g, function (match) {
115
+ return escaperLookup[match];
116
+ })
117
+ );
118
+ }
119
+ var userProvidedKeyEscapeRegex = /\/+/g;
120
+ function getElementKey(element, index) {
121
+ return "object" === typeof element && null !== element && null != element.key
122
+ ? escape("" + element.key)
123
+ : index.toString(36);
124
+ }
125
+ function noop$1() {}
126
+ function resolveThenable(thenable) {
127
+ switch (thenable.status) {
128
+ case "fulfilled":
129
+ return thenable.value;
130
+ case "rejected":
131
+ throw thenable.reason;
132
+ default:
133
+ switch (
134
+ ("string" === typeof thenable.status
135
+ ? thenable.then(noop$1, noop$1)
136
+ : ((thenable.status = "pending"),
137
+ thenable.then(
138
+ function (fulfilledValue) {
139
+ "pending" === thenable.status &&
140
+ ((thenable.status = "fulfilled"),
141
+ (thenable.value = fulfilledValue));
142
+ },
143
+ function (error) {
144
+ "pending" === thenable.status &&
145
+ ((thenable.status = "rejected"), (thenable.reason = error));
146
+ }
147
+ )),
148
+ thenable.status)
149
+ ) {
150
+ case "fulfilled":
151
+ return thenable.value;
152
+ case "rejected":
153
+ throw thenable.reason;
154
+ }
155
+ }
156
+ throw thenable;
157
+ }
158
+ function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
159
+ var type = typeof children;
160
+ if ("undefined" === type || "boolean" === type) children = null;
161
+ var invokeCallback = false;
162
+ if (null === children) invokeCallback = true;
163
+ else
164
+ switch (type) {
165
+ case "bigint":
166
+ case "string":
167
+ case "number":
168
+ invokeCallback = true;
169
+ break;
170
+ case "object":
171
+ switch (children.$$typeof) {
172
+ case REACT_ELEMENT_TYPE:
173
+ case REACT_PORTAL_TYPE:
174
+ invokeCallback = true;
175
+ break;
176
+ case REACT_LAZY_TYPE:
177
+ return (
178
+ (invokeCallback = children._init),
179
+ mapIntoArray(
180
+ invokeCallback(children._payload),
181
+ array,
182
+ escapedPrefix,
183
+ nameSoFar,
184
+ callback
185
+ )
186
+ );
187
+ }
188
+ }
189
+ if (invokeCallback)
190
+ return (
191
+ (callback = callback(children)),
192
+ (invokeCallback =
193
+ "" === nameSoFar ? "." + getElementKey(children, 0) : nameSoFar),
194
+ isArrayImpl(callback)
195
+ ? ((escapedPrefix = ""),
196
+ null != invokeCallback &&
197
+ (escapedPrefix =
198
+ invokeCallback.replace(userProvidedKeyEscapeRegex, "$&/") + "/"),
199
+ mapIntoArray(callback, array, escapedPrefix, "", function (c) {
200
+ return c;
201
+ }))
202
+ : null != callback &&
203
+ (isValidElement(callback) &&
204
+ (callback = cloneAndReplaceKey(
205
+ callback,
206
+ escapedPrefix +
207
+ (null == callback.key ||
208
+ (children && children.key === callback.key)
209
+ ? ""
210
+ : ("" + callback.key).replace(
211
+ userProvidedKeyEscapeRegex,
212
+ "$&/"
213
+ ) + "/") +
214
+ invokeCallback
215
+ )),
216
+ array.push(callback)),
217
+ 1
218
+ );
219
+ invokeCallback = 0;
220
+ var nextNamePrefix = "" === nameSoFar ? "." : nameSoFar + ":";
221
+ if (isArrayImpl(children))
222
+ for (var i = 0; i < children.length; i++)
223
+ (nameSoFar = children[i]),
224
+ (type = nextNamePrefix + getElementKey(nameSoFar, i)),
225
+ (invokeCallback += mapIntoArray(
226
+ nameSoFar,
227
+ array,
228
+ escapedPrefix,
229
+ type,
230
+ callback
231
+ ));
232
+ else if (((i = getIteratorFn(children)), "function" === typeof i))
233
+ for (
234
+ children = i.call(children), i = 0;
235
+ !(nameSoFar = children.next()).done;
236
+
237
+ )
238
+ (nameSoFar = nameSoFar.value),
239
+ (type = nextNamePrefix + getElementKey(nameSoFar, i++)),
240
+ (invokeCallback += mapIntoArray(
241
+ nameSoFar,
242
+ array,
243
+ escapedPrefix,
244
+ type,
245
+ callback
246
+ ));
247
+ else if ("object" === type) {
248
+ if ("function" === typeof children.then)
249
+ return mapIntoArray(
250
+ resolveThenable(children),
251
+ array,
252
+ escapedPrefix,
253
+ nameSoFar,
254
+ callback
255
+ );
256
+ array = String(children);
257
+ throw Error(
258
+ "Objects are not valid as a React child (found: " +
259
+ ("[object Object]" === array
260
+ ? "object with keys {" + Object.keys(children).join(", ") + "}"
261
+ : array) +
262
+ "). If you meant to render a collection of children, use an array instead."
263
+ );
264
+ }
265
+ return invokeCallback;
266
+ }
267
+ function mapChildren(children, func, context) {
268
+ if (null == children) return children;
269
+ var result = [],
270
+ count = 0;
271
+ mapIntoArray(children, result, "", "", function (child) {
272
+ return func.call(context, child, count++);
273
+ });
274
+ return result;
275
+ }
276
+ function lazyInitializer(payload) {
277
+ if (-1 === payload._status) {
278
+ var ctor = payload._result;
279
+ ctor = ctor();
280
+ ctor.then(
281
+ function (moduleObject) {
282
+ if (0 === payload._status || -1 === payload._status)
283
+ (payload._status = 1), (payload._result = moduleObject);
284
+ },
285
+ function (error) {
286
+ if (0 === payload._status || -1 === payload._status)
287
+ (payload._status = 2), (payload._result = error);
288
+ }
289
+ );
290
+ -1 === payload._status && ((payload._status = 0), (payload._result = ctor));
291
+ }
292
+ if (1 === payload._status) return payload._result.default;
293
+ throw payload._result;
294
+ }
295
+ var reportGlobalError =
296
+ "function" === typeof reportError
297
+ ? reportError
298
+ : function (error) {
299
+ if (
300
+ "object" === typeof window &&
301
+ "function" === typeof window.ErrorEvent
302
+ ) {
303
+ var event = new window.ErrorEvent("error", {
304
+ bubbles: true,
305
+ cancelable: true,
306
+ message:
307
+ "object" === typeof error &&
308
+ null !== error &&
309
+ "string" === typeof error.message
310
+ ? String(error.message)
311
+ : String(error),
312
+ error: error
313
+ });
314
+ if (!window.dispatchEvent(event)) return;
315
+ } else if (
316
+ "object" === typeof process &&
317
+ "function" === typeof process.emit
318
+ ) {
319
+ process.emit("uncaughtException", error);
320
+ return;
321
+ }
322
+ console.error(error);
323
+ };
324
+ function noop() {}
325
+ react_production.Children = {
326
+ map: mapChildren,
327
+ forEach: function (children, forEachFunc, forEachContext) {
328
+ mapChildren(
329
+ children,
330
+ function () {
331
+ forEachFunc.apply(this, arguments);
332
+ },
333
+ forEachContext
334
+ );
335
+ },
336
+ count: function (children) {
337
+ var n = 0;
338
+ mapChildren(children, function () {
339
+ n++;
340
+ });
341
+ return n;
342
+ },
343
+ toArray: function (children) {
344
+ return (
345
+ mapChildren(children, function (child) {
346
+ return child;
347
+ }) || []
348
+ );
349
+ },
350
+ only: function (children) {
351
+ if (!isValidElement(children))
352
+ throw Error(
353
+ "React.Children.only expected to receive a single React element child."
354
+ );
355
+ return children;
356
+ }
357
+ };
358
+ react_production.Component = Component;
359
+ react_production.Fragment = REACT_FRAGMENT_TYPE;
360
+ react_production.Profiler = REACT_PROFILER_TYPE;
361
+ react_production.PureComponent = PureComponent;
362
+ react_production.StrictMode = REACT_STRICT_MODE_TYPE;
363
+ react_production.Suspense = REACT_SUSPENSE_TYPE;
364
+ react_production.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
365
+ ReactSharedInternals;
366
+ react_production.act = function () {
367
+ throw Error("act(...) is not supported in production builds of React.");
368
+ };
369
+ react_production.cache = function (fn) {
370
+ return function () {
371
+ return fn.apply(null, arguments);
372
+ };
373
+ };
374
+ react_production.cloneElement = function (element, config, children) {
375
+ if (null === element || void 0 === element)
376
+ throw Error(
377
+ "The argument must be a React element, but you passed " + element + "."
378
+ );
379
+ var props = assign({}, element.props),
380
+ key = element.key,
381
+ owner = void 0;
382
+ if (null != config)
383
+ for (propName in (void 0 !== config.ref && (owner = void 0),
384
+ void 0 !== config.key && (key = "" + config.key),
385
+ config))
386
+ !hasOwnProperty.call(config, propName) ||
387
+ "key" === propName ||
388
+ "__self" === propName ||
389
+ "__source" === propName ||
390
+ ("ref" === propName && void 0 === config.ref) ||
391
+ (props[propName] = config[propName]);
392
+ var propName = arguments.length - 2;
393
+ if (1 === propName) props.children = children;
394
+ else if (1 < propName) {
395
+ for (var childArray = Array(propName), i = 0; i < propName; i++)
396
+ childArray[i] = arguments[i + 2];
397
+ props.children = childArray;
398
+ }
399
+ return ReactElement(element.type, key, void 0, void 0, owner, props);
400
+ };
401
+ react_production.createContext = function (defaultValue) {
402
+ defaultValue = {
403
+ $$typeof: REACT_CONTEXT_TYPE,
404
+ _currentValue: defaultValue,
405
+ _currentValue2: defaultValue,
406
+ _threadCount: 0,
407
+ Provider: null,
408
+ Consumer: null
409
+ };
410
+ defaultValue.Provider = defaultValue;
411
+ defaultValue.Consumer = {
412
+ $$typeof: REACT_CONSUMER_TYPE,
413
+ _context: defaultValue
414
+ };
415
+ return defaultValue;
416
+ };
417
+ react_production.createElement = function (type, config, children) {
418
+ var propName,
419
+ props = {},
420
+ key = null;
421
+ if (null != config)
422
+ for (propName in (void 0 !== config.key && (key = "" + config.key), config))
423
+ hasOwnProperty.call(config, propName) &&
424
+ "key" !== propName &&
425
+ "__self" !== propName &&
426
+ "__source" !== propName &&
427
+ (props[propName] = config[propName]);
428
+ var childrenLength = arguments.length - 2;
429
+ if (1 === childrenLength) props.children = children;
430
+ else if (1 < childrenLength) {
431
+ for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++)
432
+ childArray[i] = arguments[i + 2];
433
+ props.children = childArray;
434
+ }
435
+ if (type && type.defaultProps)
436
+ for (propName in ((childrenLength = type.defaultProps), childrenLength))
437
+ void 0 === props[propName] &&
438
+ (props[propName] = childrenLength[propName]);
439
+ return ReactElement(type, key, void 0, void 0, null, props);
440
+ };
441
+ react_production.createRef = function () {
442
+ return { current: null };
443
+ };
444
+ react_production.forwardRef = function (render) {
445
+ return { $$typeof: REACT_FORWARD_REF_TYPE, render: render };
446
+ };
447
+ react_production.isValidElement = isValidElement;
448
+ react_production.lazy = function (ctor) {
449
+ return {
450
+ $$typeof: REACT_LAZY_TYPE,
451
+ _payload: { _status: -1, _result: ctor },
452
+ _init: lazyInitializer
453
+ };
454
+ };
455
+ react_production.memo = function (type, compare) {
456
+ return {
457
+ $$typeof: REACT_MEMO_TYPE,
458
+ type: type,
459
+ compare: void 0 === compare ? null : compare
460
+ };
461
+ };
462
+ react_production.startTransition = function (scope) {
463
+ var prevTransition = ReactSharedInternals.T,
464
+ currentTransition = {};
465
+ ReactSharedInternals.T = currentTransition;
466
+ try {
467
+ var returnValue = scope(),
468
+ onStartTransitionFinish = ReactSharedInternals.S;
469
+ null !== onStartTransitionFinish &&
470
+ onStartTransitionFinish(currentTransition, returnValue);
471
+ "object" === typeof returnValue &&
472
+ null !== returnValue &&
473
+ "function" === typeof returnValue.then &&
474
+ returnValue.then(noop, reportGlobalError);
475
+ } catch (error) {
476
+ reportGlobalError(error);
477
+ } finally {
478
+ ReactSharedInternals.T = prevTransition;
479
+ }
480
+ };
481
+ react_production.unstable_useCacheRefresh = function () {
482
+ return ReactSharedInternals.H.useCacheRefresh();
483
+ };
484
+ react_production.use = function (usable) {
485
+ return ReactSharedInternals.H.use(usable);
486
+ };
487
+ react_production.useActionState = function (action, initialState, permalink) {
488
+ return ReactSharedInternals.H.useActionState(action, initialState, permalink);
489
+ };
490
+ react_production.useCallback = function (callback, deps) {
491
+ return ReactSharedInternals.H.useCallback(callback, deps);
492
+ };
493
+ react_production.useContext = function (Context) {
494
+ return ReactSharedInternals.H.useContext(Context);
495
+ };
496
+ react_production.useDebugValue = function () {};
497
+ react_production.useDeferredValue = function (value, initialValue) {
498
+ return ReactSharedInternals.H.useDeferredValue(value, initialValue);
499
+ };
500
+ react_production.useEffect = function (create, deps) {
501
+ return ReactSharedInternals.H.useEffect(create, deps);
502
+ };
503
+ react_production.useId = function () {
504
+ return ReactSharedInternals.H.useId();
505
+ };
506
+ react_production.useImperativeHandle = function (ref, create, deps) {
507
+ return ReactSharedInternals.H.useImperativeHandle(ref, create, deps);
508
+ };
509
+ react_production.useInsertionEffect = function (create, deps) {
510
+ return ReactSharedInternals.H.useInsertionEffect(create, deps);
511
+ };
512
+ react_production.useLayoutEffect = function (create, deps) {
513
+ return ReactSharedInternals.H.useLayoutEffect(create, deps);
514
+ };
515
+ react_production.useMemo = function (create, deps) {
516
+ return ReactSharedInternals.H.useMemo(create, deps);
517
+ };
518
+ react_production.useOptimistic = function (passthrough, reducer) {
519
+ return ReactSharedInternals.H.useOptimistic(passthrough, reducer);
520
+ };
521
+ react_production.useReducer = function (reducer, initialArg, init) {
522
+ return ReactSharedInternals.H.useReducer(reducer, initialArg, init);
523
+ };
524
+ react_production.useRef = function (initialValue) {
525
+ return ReactSharedInternals.H.useRef(initialValue);
526
+ };
527
+ react_production.useState = function (initialState) {
528
+ return ReactSharedInternals.H.useState(initialState);
529
+ };
530
+ react_production.useSyncExternalStore = function (
531
+ subscribe,
532
+ getSnapshot,
533
+ getServerSnapshot
534
+ ) {
535
+ return ReactSharedInternals.H.useSyncExternalStore(
536
+ subscribe,
537
+ getSnapshot,
538
+ getServerSnapshot
539
+ );
540
+ };
541
+ react_production.useTransition = function () {
542
+ return ReactSharedInternals.H.useTransition();
543
+ };
544
+ react_production.version = "19.0.0";
545
+ return react_production;
546
+ }
547
+
548
+ export { requireReact_production as __require };
@@ -0,0 +1,15 @@
1
+ import { __module as react } from '../../../../../_virtual/index2.js';
2
+ import { __require as requireReact_production } from './cjs/react.production.js';
3
+
4
+ var hasRequiredReact;
5
+
6
+ function requireReact () {
7
+ if (hasRequiredReact) return react.exports;
8
+ hasRequiredReact = 1;
9
+ {
10
+ react.exports = requireReact_production();
11
+ }
12
+ return react.exports;
13
+ }
14
+
15
+ export { requireReact as __require };
@@ -3,9 +3,9 @@ import { nonexhaustive } from '@likec4/core';
3
3
  import { Box, Notification, ScrollAreaAutosize, Code, Group, Button } from '@mantine/core';
4
4
  import { IconX } from '@tabler/icons-react';
5
5
  import { useSelector } from '@xstate/react';
6
- import { useReducedMotionConfig, LayoutGroup, AnimatePresence } from 'framer-motion';
7
- import { animate } from 'framer-motion/dom';
8
- import { memo, useMemo, useEffect } from 'react';
6
+ import { animate } from 'motion';
7
+ import { useReducedMotionConfig, LayoutGroup, AnimatePresence } from 'motion/react';
8
+ import { r as reactExports } from '../_virtual/index.js';
9
9
  import { ErrorBoundary } from 'react-error-boundary';
10
10
  import { isNonNullish } from 'remeda';
11
11
  import { ElementDetails } from './element-details/ElementDetails.js';
@@ -65,15 +65,15 @@ const compareSelectOverlays = (a, b) => {
65
65
  return overlay.actorRef === b[i].actorRef;
66
66
  });
67
67
  };
68
- const Overlays = memo(({ overlaysActorRef }) => {
68
+ const Overlays = reactExports.memo(({ overlaysActorRef }) => {
69
69
  const xyflowDomNode = useXYStore((s) => s.domNode);
70
- const xyflowRendererDom = useMemo(() => xyflowDomNode?.querySelector(".react-flow__renderer") ?? null, [
70
+ const xyflowRendererDom = reactExports.useMemo(() => xyflowDomNode?.querySelector(".react-flow__renderer") ?? null, [
71
71
  xyflowDomNode
72
72
  ]);
73
73
  const overlays = useSelector(overlaysActorRef, selectOverlays, compareSelectOverlays);
74
74
  const isMotionReduced = useReducedMotionConfig() ?? false;
75
75
  const isActiveOverlay = overlays.length > 0;
76
- useEffect(() => {
76
+ reactExports.useEffect(() => {
77
77
  if (!xyflowRendererDom || isMotionReduced) return;
78
78
  animate(xyflowRendererDom, {
79
79
  opacity: isActiveOverlay ? 0.7 : 1,
@@ -19,7 +19,7 @@ function ElementDetails({
19
19
  })),
20
20
  shallowEqual
21
21
  );
22
- return /* @__PURE__ */ jsx(ElementDetailsActorContext, { value: actorRef, children: /* @__PURE__ */ jsx(
22
+ return /* @__PURE__ */ jsx(ElementDetailsActorContext.Provider, { value: actorRef, children: /* @__PURE__ */ jsx(
23
23
  ElementDetailsCard,
24
24
  {
25
25
  onClose,
@@ -5,8 +5,8 @@ import { RemoveScroll, Card, Box, Group, Text, CloseButton, Badge, Flex, ActionI
5
5
  import { useViewportSize, useSessionStorage } from '@mantine/hooks';
6
6
  import { useSyncedRef, useDebouncedCallback, useTimeoutEffect } from '@react-hookz/web';
7
7
  import { IconExternalLink, IconFileSymlink, IconZoomScan, IconStack2 } from '@tabler/icons-react';
8
- import { useDragControls, useMotionValue, m } from 'framer-motion';
9
- import { useState, useCallback, useRef } from 'react';
8
+ import { useDragControls, useMotionValue, m } from 'motion/react';
9
+ import { r as reactExports } from '../../_virtual/index.js';
10
10
  import { pipe, map, partition, only, clamp, isNullish } from 'remeda';
11
11
  import { Link } from '../../components/Link.js';
12
12
  import { useDiagram } from '../../hooks/useDiagram.js';
@@ -56,7 +56,7 @@ function ElementDetailsCard({
56
56
  fqn,
57
57
  onClose
58
58
  }) {
59
- const [opened, setOpened] = useState(false);
59
+ const [opened, setOpened] = reactExports.useState(false);
60
60
  const windowSize = useViewportSize();
61
61
  const windowWidth = windowSize.width || window.innerWidth || 1200, windowHeight = windowSize.height || window.innerHeight || 800;
62
62
  const [activeTab, setActiveTab] = useSessionStorage({
@@ -119,11 +119,11 @@ function ElementDetailsCard({
119
119
  width.set(_width);
120
120
  height.set(_height);
121
121
  }, [_width, _height]);
122
- const handleDrag = useCallback((_, info) => {
122
+ const handleDrag = reactExports.useCallback((_, info) => {
123
123
  width.set(Math.max(width.get() + info.delta.x, 320));
124
124
  height.set(Math.max(height.get() + info.delta.y, 300));
125
125
  }, []);
126
- const ref = useRef(null);
126
+ const ref = reactExports.useRef(null);
127
127
  const onCloseRef = useSyncedRef(onClose);
128
128
  const close = useDebouncedCallback(
129
129
  () => {
@@ -1,7 +1,7 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import { useTree, Alert, Tree, Box, rem, Button, Group, Text, ThemeIcon, Menu } from '@mantine/core';
3
3
  import { IconInfoCircle, IconTarget, IconZoomScan } from '@tabler/icons-react';
4
- import { memo, useMemo, useEffect } from 'react';
4
+ import { r as reactExports } from '../../_virtual/index.js';
5
5
  import { useDiagram } from '../../hooks/useDiagram.js';
6
6
  import { useLikeC4Model } from '../../likec4model/useLikeC4Model.js';
7
7
  import { treeNodeLabel, treeNode, nodeLabel, instanceLabel } from './TabPanelDeployments.css.js';
@@ -70,13 +70,16 @@ const DeployedInstanceRenderer = ({
70
70
  ] })
71
71
  ] });
72
72
  };
73
- const TabPanelDeployments = memo(({ elementFqn }) => {
73
+ const setHoveredNode = () => {
74
+ };
75
+ const TabPanelDeployments = reactExports.memo(({ elementFqn }) => {
74
76
  const element = useLikeC4Model(true).element(elementFqn);
75
77
  const deployments = [...element.deployments()];
76
78
  const tree = useTree({
77
79
  multiple: false
78
80
  });
79
- const data = useMemo(() => {
81
+ tree.setHoveredNode = setHoveredNode;
82
+ const data = reactExports.useMemo(() => {
80
83
  let roots = [];
81
84
  let treeItems = /* @__PURE__ */ new Map();
82
85
  for (const instance of element.deployments()) {
@@ -110,7 +113,7 @@ const TabPanelDeployments = memo(({ elementFqn }) => {
110
113
  }
111
114
  return roots;
112
115
  }, [element]);
113
- useEffect(() => {
116
+ reactExports.useEffect(() => {
114
117
  tree.expandAllNodes();
115
118
  }, [data]);
116
119
  if (deployments.length === 0) {
@@ -3,7 +3,7 @@ import { nameFromFqn } from '@likec4/core';
3
3
  import { Stack, Group, Box, ThemeIcon, Text, Tooltip as Tooltip$1, ActionIcon, Paper } from '@mantine/core';
4
4
  import { IconArrowRight, IconInfoCircle, IconExternalLink } from '@tabler/icons-react';
5
5
  import { useSelector } from '@xstate/react';
6
- import { useState } from 'react';
6
+ import { r as reactExports } from '../../_virtual/index.js';
7
7
  import { unique } from 'remeda';
8
8
  import { useOverlaysActorRef } from '../../hooks/useOverlaysActor.js';
9
9
  import { RelationshipsBrowser } from '../relationships-browser/RelationshipsBrowser.js';
@@ -27,7 +27,7 @@ function TabPanelRelationships({
27
27
  const overlaysActor = useOverlaysActorRef();
28
28
  const delailsActor = useElementDetailsActorRef();
29
29
  const relationshipsBrowserActor = useSelector(delailsActor, (s) => s.children[`${delailsActor.id}-relationships`]);
30
- const [scope, setScope] = useState("view");
30
+ const [scope, setScope] = reactExports.useState("view");
31
31
  const incoming = [...element.incoming()].map((r) => r.id);
32
32
  const outgoing = [...element.outgoing()].map((r) => r.id);
33
33
  const incomingInView = node ? unique([...node.incoming()].flatMap((e) => e.$edge.relations)) : [];