@redocly/theme 0.57.0-next.0 → 0.57.0-next.2

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 (108) hide show
  1. package/lib/components/Catalog/CatalogCardView/CatalogCard.js +1 -0
  2. package/lib/components/Catalog/CatalogEntity/CatalogEntity.js +36 -25
  3. package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsEdge.d.ts +6 -0
  4. package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsEdge.js +38 -0
  5. package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.d.ts +6 -0
  6. package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.js +83 -0
  7. package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.lazy.d.ts +2 -0
  8. package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.lazy.js +29 -0
  9. package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsLinkedNode.d.ts +8 -0
  10. package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsLinkedNode.js +33 -0
  11. package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsNode.d.ts +16 -0
  12. package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsNode.js +24 -0
  13. package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsRootNode.d.ts +7 -0
  14. package/lib/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsRootNode.js +30 -0
  15. package/lib/components/Catalog/CatalogEntity/CatalogEntityMethodAndPath.js +5 -2
  16. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.d.ts +1 -0
  17. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.js +7 -3
  18. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.js +3 -8
  19. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTableContent.d.ts +22 -0
  20. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTableContent.js +18 -0
  21. package/lib/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.js +2 -2
  22. package/lib/components/Catalog/CatalogEntityIcon.d.ts +2 -1
  23. package/lib/components/Catalog/CatalogEntityIcon.js +4 -6
  24. package/lib/components/Catalog/CatalogTableView/CatalogTableViewRow.js +1 -1
  25. package/lib/components/Catalog/variables.js +42 -0
  26. package/lib/components/CatalogClassic/CatalogClassicVirtualizedGroups.js +13 -8
  27. package/lib/core/constants/catalog.d.ts +10 -0
  28. package/lib/core/constants/catalog.js +14 -1
  29. package/lib/core/hooks/__mocks__/search/use-recent-searches.d.ts +2 -2
  30. package/lib/core/hooks/__mocks__/search/use-recent-searches.js +2 -1
  31. package/lib/core/hooks/__mocks__/search/use-search-filter.d.ts +2 -2
  32. package/lib/core/hooks/__mocks__/search/use-search-filter.js +2 -1
  33. package/lib/core/hooks/__mocks__/search/use-suggested-pages.d.ts +2 -2
  34. package/lib/core/hooks/__mocks__/search/use-suggested-pages.js +2 -1
  35. package/lib/core/hooks/__mocks__/use-controlled-state.d.ts +1 -1
  36. package/lib/core/hooks/__mocks__/use-controlled-state.js +2 -1
  37. package/lib/core/hooks/__mocks__/use-input-key-commands.d.ts +3 -3
  38. package/lib/core/hooks/__mocks__/use-input-key-commands.js +3 -2
  39. package/lib/core/hooks/__mocks__/use-mobile-menu.d.ts +1 -1
  40. package/lib/core/hooks/__mocks__/use-mobile-menu.js +2 -1
  41. package/lib/core/hooks/__mocks__/use-theme-config.d.ts +2 -2
  42. package/lib/core/hooks/__mocks__/use-theme-config.js +2 -1
  43. package/lib/core/hooks/__mocks__/use-theme-hooks.d.ts +47 -47
  44. package/lib/core/hooks/__mocks__/use-theme-hooks.js +38 -37
  45. package/lib/core/hooks/__mocks__/use-time-ago.d.ts +2 -2
  46. package/lib/core/hooks/__mocks__/use-time-ago.js +2 -1
  47. package/lib/core/hooks/catalog/useGraph.d.ts +15 -0
  48. package/lib/core/hooks/catalog/useGraph.js +165 -0
  49. package/lib/core/hooks/code-walkthrough/__mocks__/MockIntersectionObserver.js +4 -3
  50. package/lib/core/hooks/index.d.ts +1 -0
  51. package/lib/core/hooks/index.js +1 -0
  52. package/lib/core/hooks/menu/__mocks__/use-mobile-menu-items.d.ts +1 -1
  53. package/lib/core/hooks/menu/__mocks__/use-mobile-menu-items.js +2 -1
  54. package/lib/core/hooks/use-page-actions.js +5 -1
  55. package/lib/core/openapi/index.d.ts +1 -0
  56. package/lib/core/openapi/index.js +3 -1
  57. package/lib/core/styles/index.d.ts +1 -0
  58. package/lib/core/styles/index.js +3 -0
  59. package/lib/core/styles/xyflow.d.ts +1 -0
  60. package/lib/core/styles/xyflow.js +623 -0
  61. package/lib/core/utils/dynamic.d.ts +9 -0
  62. package/lib/core/utils/dynamic.js +59 -0
  63. package/lib/core/utils/index.d.ts +1 -0
  64. package/lib/core/utils/index.js +1 -0
  65. package/lib/icons/GenericIcon/GenericIcon.d.ts +2 -2
  66. package/lib/icons/GenericIcon/GenericIcon.js +8 -3
  67. package/lib/icons/__tests__/IconTestUtils.d.ts +0 -1
  68. package/lib/icons/__tests__/IconTestUtils.js +8 -7
  69. package/package.json +11 -14
  70. package/src/components/Catalog/CatalogCardView/CatalogCard.tsx +1 -0
  71. package/src/components/Catalog/CatalogEntity/CatalogEntity.tsx +60 -42
  72. package/src/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsEdge.tsx +63 -0
  73. package/src/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.lazy.tsx +7 -0
  74. package/src/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsGraph.tsx +91 -0
  75. package/src/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsLinkedNode.tsx +48 -0
  76. package/src/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsNode.tsx +45 -0
  77. package/src/components/Catalog/CatalogEntity/CatalogEntityGraph/CatalogEntityRelationsRootNode.tsx +49 -0
  78. package/src/components/Catalog/CatalogEntity/CatalogEntityMethodAndPath.tsx +6 -2
  79. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelations.tsx +8 -2
  80. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTable.tsx +24 -43
  81. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityRelationsTableContent.tsx +76 -0
  82. package/src/components/Catalog/CatalogEntity/CatalogEntityRelations/CatalogEntityTeamRelations.tsx +2 -2
  83. package/src/components/Catalog/CatalogEntityIcon.tsx +7 -5
  84. package/src/components/Catalog/CatalogTableView/CatalogTableViewRow.tsx +1 -1
  85. package/src/components/Catalog/variables.ts +42 -0
  86. package/src/components/CatalogClassic/CatalogClassicVirtualizedGroups.tsx +29 -18
  87. package/src/core/constants/catalog.ts +13 -0
  88. package/src/core/hooks/__mocks__/search/use-recent-searches.ts +3 -1
  89. package/src/core/hooks/__mocks__/search/use-search-filter.ts +3 -1
  90. package/src/core/hooks/__mocks__/search/use-suggested-pages.ts +3 -1
  91. package/src/core/hooks/__mocks__/use-controlled-state.ts +3 -1
  92. package/src/core/hooks/__mocks__/use-input-key-commands.ts +4 -2
  93. package/src/core/hooks/__mocks__/use-mobile-menu.ts +3 -1
  94. package/src/core/hooks/__mocks__/use-theme-config.ts +3 -1
  95. package/src/core/hooks/__mocks__/use-theme-hooks.ts +39 -37
  96. package/src/core/hooks/__mocks__/use-time-ago.ts +3 -1
  97. package/src/core/hooks/catalog/useGraph.ts +236 -0
  98. package/src/core/hooks/code-walkthrough/__mocks__/MockIntersectionObserver.ts +5 -3
  99. package/src/core/hooks/index.ts +1 -0
  100. package/src/core/hooks/menu/__mocks__/use-mobile-menu-items.ts +3 -1
  101. package/src/core/hooks/use-page-actions.ts +5 -1
  102. package/src/core/openapi/index.ts +1 -0
  103. package/src/core/styles/index.ts +1 -0
  104. package/src/core/styles/xyflow.ts +620 -0
  105. package/src/core/utils/dynamic.tsx +85 -0
  106. package/src/core/utils/index.ts +1 -0
  107. package/src/icons/GenericIcon/GenericIcon.tsx +13 -4
  108. package/src/icons/__tests__/IconTestUtils.tsx +5 -4
@@ -0,0 +1,623 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.xyflow = void 0;
4
+ const styled_components_1 = require("styled-components");
5
+ // Need to be in a separate file because webpack doesn't support direct import of css files
6
+ exports.xyflow = (0, styled_components_1.css) `
7
+ .react-flow {
8
+ direction: ltr;
9
+
10
+ --xy-edge-stroke-default: #b1b1b7;
11
+ --xy-edge-stroke-width-default: 1;
12
+ --xy-edge-stroke-selected-default: #555;
13
+
14
+ --xy-connectionline-stroke-default: #b1b1b7;
15
+ --xy-connectionline-stroke-width-default: 1;
16
+
17
+ --xy-attribution-background-color-default: rgba(255, 255, 255, 0.5);
18
+
19
+ --xy-minimap-background-color-default: #fff;
20
+ --xy-minimap-mask-background-color-default: rgba(240, 240, 240, 0.6);
21
+ --xy-minimap-mask-stroke-color-default: transparent;
22
+ --xy-minimap-mask-stroke-width-default: 1;
23
+ --xy-minimap-node-background-color-default: #e2e2e2;
24
+ --xy-minimap-node-stroke-color-default: transparent;
25
+ --xy-minimap-node-stroke-width-default: 2;
26
+
27
+ --xy-background-color-default: transparent;
28
+ --xy-background-pattern-dots-color-default: #91919a;
29
+ --xy-background-pattern-lines-color-default: #eee;
30
+ --xy-background-pattern-cross-color-default: #e2e2e2;
31
+ background-color: var(--xy-background-color, var(--xy-background-color-default));
32
+ --xy-node-color-default: inherit;
33
+ --xy-node-border-default: 1px solid #1a192b;
34
+ --xy-node-background-color-default: #fff;
35
+ --xy-node-group-background-color-default: rgba(240, 240, 240, 0.25);
36
+ --xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(0, 0, 0, 0.08);
37
+ --xy-node-boxshadow-selected-default: 0 0 0 0.5px #1a192b;
38
+ --xy-node-border-radius-default: 3px;
39
+
40
+ --xy-handle-background-color-default: #1a192b;
41
+ --xy-handle-border-color-default: #fff;
42
+
43
+ --xy-selection-background-color-default: rgba(0, 89, 220, 0.08);
44
+ --xy-selection-border-default: 1px dotted rgba(0, 89, 220, 0.8);
45
+
46
+ --xy-controls-button-background-color-default: #fefefe;
47
+ --xy-controls-button-background-color-hover-default: #f4f4f4;
48
+ --xy-controls-button-color-default: inherit;
49
+ --xy-controls-button-color-hover-default: inherit;
50
+ --xy-controls-button-border-color-default: #eee;
51
+ --xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, 0.08);
52
+
53
+ --xy-edge-label-background-color-default: #ffffff;
54
+ --xy-edge-label-color-default: inherit;
55
+ --xy-resize-background-color-default: #3367d9;
56
+ }
57
+ .react-flow.dark {
58
+ --xy-edge-stroke-default: #3e3e3e;
59
+ --xy-edge-stroke-width-default: 1;
60
+ --xy-edge-stroke-selected-default: #727272;
61
+
62
+ --xy-connectionline-stroke-default: #b1b1b7;
63
+ --xy-connectionline-stroke-width-default: 1;
64
+
65
+ --xy-attribution-background-color-default: rgba(150, 150, 150, 0.25);
66
+
67
+ --xy-minimap-background-color-default: #141414;
68
+ --xy-minimap-mask-background-color-default: rgba(60, 60, 60, 0.6);
69
+ --xy-minimap-mask-stroke-color-default: transparent;
70
+ --xy-minimap-mask-stroke-width-default: 1;
71
+ --xy-minimap-node-background-color-default: #2b2b2b;
72
+ --xy-minimap-node-stroke-color-default: transparent;
73
+ --xy-minimap-node-stroke-width-default: 2;
74
+
75
+ --xy-background-color-default: #141414;
76
+ --xy-background-pattern-dots-color-default: #777;
77
+ --xy-background-pattern-lines-color-default: #777;
78
+ --xy-background-pattern-cross-color-default: #777;
79
+ --xy-node-color-default: #f8f8f8;
80
+ --xy-node-border-default: 1px solid #3c3c3c;
81
+ --xy-node-background-color-default: #1e1e1e;
82
+ --xy-node-group-background-color-default: rgba(240, 240, 240, 0.25);
83
+ --xy-node-boxshadow-hover-default: 0 1px 4px 1px rgba(255, 255, 255, 0.08);
84
+ --xy-node-boxshadow-selected-default: 0 0 0 0.5px #999;
85
+
86
+ --xy-handle-background-color-default: #bebebe;
87
+ --xy-handle-border-color-default: #1e1e1e;
88
+
89
+ --xy-selection-background-color-default: rgba(200, 200, 220, 0.08);
90
+ --xy-selection-border-default: 1px dotted rgba(200, 200, 220, 0.8);
91
+
92
+ --xy-controls-button-background-color-default: #2b2b2b;
93
+ --xy-controls-button-background-color-hover-default: #3e3e3e;
94
+ --xy-controls-button-color-default: #f8f8f8;
95
+ --xy-controls-button-color-hover-default: #fff;
96
+ --xy-controls-button-border-color-default: #5b5b5b;
97
+ --xy-controls-box-shadow-default: 0 0 2px 1px rgba(0, 0, 0, 0.08);
98
+
99
+ --xy-edge-label-background-color-default: #141414;
100
+ --xy-edge-label-color-default: #f8f8f8;
101
+ }
102
+ .react-flow__background {
103
+ background-color: var(--xy-background-color-props, var(--xy-background-color, var(--xy-background-color-default)));
104
+ pointer-events: none;
105
+ z-index: -1;
106
+ }
107
+ .react-flow__container {
108
+ position: absolute;
109
+ width: 100%;
110
+ height: 100%;
111
+ top: 0;
112
+ left: 0;
113
+ }
114
+ .react-flow__pane {
115
+ z-index: 1;
116
+ }
117
+ .react-flow__pane.draggable {
118
+ cursor: grab;
119
+ }
120
+ .react-flow__pane.dragging {
121
+ cursor: grabbing;
122
+ }
123
+ .react-flow__pane.selection {
124
+ cursor: pointer;
125
+ }
126
+ .react-flow__viewport {
127
+ transform-origin: 0 0;
128
+ z-index: 2;
129
+ pointer-events: none;
130
+ }
131
+ .react-flow__renderer {
132
+ z-index: 4;
133
+ }
134
+ .react-flow__selection {
135
+ z-index: 6;
136
+ }
137
+ .react-flow__nodesselection-rect:focus,
138
+ .react-flow__nodesselection-rect:focus-visible {
139
+ outline: none;
140
+ }
141
+ .react-flow__edge-path {
142
+ stroke: var(--xy-edge-stroke, var(--xy-edge-stroke-default));
143
+ stroke-width: var(--xy-edge-stroke-width, var(--xy-edge-stroke-width-default));
144
+ fill: none;
145
+ }
146
+ .react-flow__connection-path {
147
+ stroke: var(--xy-connectionline-stroke, var(--xy-connectionline-stroke-default));
148
+ stroke-width: var(--xy-connectionline-stroke-width, var(--xy-connectionline-stroke-width-default));
149
+ fill: none;
150
+ }
151
+ .react-flow .react-flow__edges {
152
+ position: absolute;
153
+ }
154
+ .react-flow .react-flow__edges svg {
155
+ overflow: visible;
156
+ position: absolute;
157
+ pointer-events: none;
158
+ }
159
+ .react-flow__edge {
160
+ pointer-events: visibleStroke;
161
+ }
162
+ .react-flow__edge.selectable {
163
+ cursor: pointer;
164
+ }
165
+ .react-flow__edge.animated path {
166
+ stroke-dasharray: 5;
167
+ animation: dashdraw 0.5s linear infinite;
168
+ }
169
+ .react-flow__edge.animated path.react-flow__edge-interaction {
170
+ stroke-dasharray: none;
171
+ animation: none;
172
+ }
173
+ .react-flow__edge.inactive {
174
+ pointer-events: none;
175
+ }
176
+ .react-flow__edge.selected,
177
+ .react-flow__edge:focus,
178
+ .react-flow__edge:focus-visible {
179
+ outline: none;
180
+ }
181
+ .react-flow__edge.selected .react-flow__edge-path,
182
+ .react-flow__edge.selectable:focus .react-flow__edge-path,
183
+ .react-flow__edge.selectable:focus-visible .react-flow__edge-path {
184
+ stroke: var(--xy-edge-stroke-selected, var(--xy-edge-stroke-selected-default));
185
+ }
186
+ .react-flow__edge-textwrapper {
187
+ pointer-events: all;
188
+ }
189
+ .react-flow__edge .react-flow__edge-text {
190
+ pointer-events: none;
191
+ -webkit-user-select: none;
192
+ -moz-user-select: none;
193
+ user-select: none;
194
+ }
195
+ .react-flow__connection {
196
+ pointer-events: none;
197
+ }
198
+ .react-flow__connection .animated {
199
+ stroke-dasharray: 5;
200
+ animation: dashdraw 0.5s linear infinite;
201
+ }
202
+ svg.react-flow__connectionline {
203
+ z-index: 1001;
204
+ overflow: visible;
205
+ position: absolute;
206
+ }
207
+ .react-flow__nodes {
208
+ pointer-events: none;
209
+ transform-origin: 0 0;
210
+ }
211
+ .react-flow__node {
212
+ position: absolute;
213
+ -webkit-user-select: none;
214
+ -moz-user-select: none;
215
+ user-select: none;
216
+ pointer-events: all;
217
+ transform-origin: 0 0;
218
+ box-sizing: border-box;
219
+ cursor: default;
220
+ }
221
+ .react-flow__node.selectable {
222
+ cursor: pointer;
223
+ }
224
+ .react-flow__node.draggable {
225
+ cursor: grab;
226
+ pointer-events: all;
227
+ }
228
+ .react-flow__node.draggable.dragging {
229
+ cursor: grabbing;
230
+ }
231
+ .react-flow__nodesselection {
232
+ z-index: 3;
233
+ transform-origin: left top;
234
+ pointer-events: none;
235
+ }
236
+ .react-flow__nodesselection-rect {
237
+ position: absolute;
238
+ pointer-events: all;
239
+ cursor: grab;
240
+ }
241
+ .react-flow__handle {
242
+ position: absolute;
243
+ pointer-events: none;
244
+ min-width: 5px;
245
+ min-height: 5px;
246
+ width: 6px;
247
+ height: 6px;
248
+ background-color: var(--xy-handle-background-color, var(--xy-handle-background-color-default));
249
+ border: 1px solid var(--xy-handle-border-color, var(--xy-handle-border-color-default));
250
+ border-radius: 100%;
251
+ }
252
+ .react-flow__handle.connectingfrom {
253
+ pointer-events: all;
254
+ }
255
+ .react-flow__handle.connectionindicator {
256
+ pointer-events: all;
257
+ cursor: crosshair;
258
+ }
259
+ .react-flow__handle-bottom {
260
+ top: auto;
261
+ left: 50%;
262
+ bottom: 0;
263
+ transform: translate(-50%, 50%);
264
+ }
265
+ .react-flow__handle-top {
266
+ top: 0;
267
+ left: 50%;
268
+ transform: translate(-50%, -50%);
269
+ }
270
+ .react-flow__handle-left {
271
+ top: 50%;
272
+ left: 0;
273
+ transform: translate(-50%, -50%);
274
+ }
275
+ .react-flow__handle-right {
276
+ top: 50%;
277
+ right: 0;
278
+ transform: translate(50%, -50%);
279
+ }
280
+ .react-flow__edgeupdater {
281
+ cursor: move;
282
+ pointer-events: all;
283
+ }
284
+ .react-flow__pane.selection .react-flow__panel {
285
+ pointer-events: none;
286
+ }
287
+ .react-flow__panel {
288
+ position: absolute;
289
+ z-index: 5;
290
+ margin: 15px;
291
+ }
292
+ .react-flow__panel.top {
293
+ top: 0;
294
+ }
295
+ .react-flow__panel.bottom {
296
+ bottom: 0;
297
+ }
298
+ .react-flow__panel.top.center, .react-flow__panel.bottom.center {
299
+ left: 50%;
300
+ transform: translateX(-15px) translateX(-50%);
301
+ }
302
+ .react-flow__panel.left {
303
+ left: 0;
304
+ }
305
+ .react-flow__panel.right {
306
+ right: 0;
307
+ }
308
+ .react-flow__panel.left.center, .react-flow__panel.right.center {
309
+ top: 50%;
310
+ transform: translateY(-15px) translateY(-50%);
311
+ }
312
+ .react-flow__attribution {
313
+ font-size: 10px;
314
+ background: var(--xy-attribution-background-color, var(--xy-attribution-background-color-default));
315
+ padding: 2px 3px;
316
+ margin: 0;
317
+ }
318
+ .react-flow__attribution a {
319
+ text-decoration: none;
320
+ color: #999;
321
+ }
322
+ @keyframes dashdraw {
323
+ from {
324
+ stroke-dashoffset: 10;
325
+ }
326
+ }
327
+ .react-flow__edgelabel-renderer {
328
+ position: absolute;
329
+ width: 100%;
330
+ height: 100%;
331
+ pointer-events: none;
332
+ -webkit-user-select: none;
333
+ -moz-user-select: none;
334
+ user-select: none;
335
+ left: 0;
336
+ top: 0;
337
+ }
338
+ .react-flow__viewport-portal {
339
+ position: absolute;
340
+ width: 100%;
341
+ height: 100%;
342
+ left: 0;
343
+ top: 0;
344
+ -webkit-user-select: none;
345
+ -moz-user-select: none;
346
+ user-select: none;
347
+ }
348
+ .react-flow__minimap {
349
+ background: var(
350
+ --xy-minimap-background-color-props,
351
+ var(--xy-minimap-background-color, var(--xy-minimap-background-color-default))
352
+ );
353
+ }
354
+ .react-flow__minimap-svg {
355
+ display: block;
356
+ }
357
+ .react-flow__minimap-mask {
358
+ fill: var(
359
+ --xy-minimap-mask-background-color-props,
360
+ var(--xy-minimap-mask-background-color, var(--xy-minimap-mask-background-color-default))
361
+ );
362
+ stroke: var(
363
+ --xy-minimap-mask-stroke-color-props,
364
+ var(--xy-minimap-mask-stroke-color, var(--xy-minimap-mask-stroke-color-default))
365
+ );
366
+ stroke-width: var(
367
+ --xy-minimap-mask-stroke-width-props,
368
+ var(--xy-minimap-mask-stroke-width, var(--xy-minimap-mask-stroke-width-default))
369
+ );
370
+ }
371
+ .react-flow__minimap-node {
372
+ fill: var(
373
+ --xy-minimap-node-background-color-props,
374
+ var(--xy-minimap-node-background-color, var(--xy-minimap-node-background-color-default))
375
+ );
376
+ stroke: var(
377
+ --xy-minimap-node-stroke-color-props,
378
+ var(--xy-minimap-node-stroke-color, var(--xy-minimap-node-stroke-color-default))
379
+ );
380
+ stroke-width: var(
381
+ --xy-minimap-node-stroke-width-props,
382
+ var(--xy-minimap-node-stroke-width, var(--xy-minimap-node-stroke-width-default))
383
+ );
384
+ }
385
+ .react-flow__background-pattern.dots {
386
+ fill: var(
387
+ --xy-background-pattern-color-props,
388
+ var(--xy-background-pattern-color, var(--xy-background-pattern-dots-color-default))
389
+ );
390
+ }
391
+ .react-flow__background-pattern.lines {
392
+ stroke: var(
393
+ --xy-background-pattern-color-props,
394
+ var(--xy-background-pattern-color, var(--xy-background-pattern-lines-color-default))
395
+ );
396
+ }
397
+ .react-flow__background-pattern.cross {
398
+ stroke: var(
399
+ --xy-background-pattern-color-props,
400
+ var(--xy-background-pattern-color, var(--xy-background-pattern-cross-color-default))
401
+ );
402
+ }
403
+ .react-flow__controls {
404
+ display: flex;
405
+ flex-direction: column;
406
+ box-shadow: var(--xy-controls-box-shadow, var(--xy-controls-box-shadow-default));
407
+ }
408
+ .react-flow__controls.horizontal {
409
+ flex-direction: row;
410
+ }
411
+ .react-flow__controls-button {
412
+ display: flex;
413
+ justify-content: center;
414
+ align-items: center;
415
+ height: 26px;
416
+ width: 26px;
417
+ padding: 4px;
418
+ border: none;
419
+ background: var(--xy-controls-button-background-color, var(--xy-controls-button-background-color-default));
420
+ border-bottom: 1px solid
421
+ var(
422
+ --xy-controls-button-border-color-props,
423
+ var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default))
424
+ );
425
+ color: var(
426
+ --xy-controls-button-color-props,
427
+ var(--xy-controls-button-color, var(--xy-controls-button-color-default))
428
+ );
429
+ cursor: pointer;
430
+ -webkit-user-select: none;
431
+ -moz-user-select: none;
432
+ user-select: none;
433
+ }
434
+ .react-flow__controls-button svg {
435
+ width: 100%;
436
+ max-width: 12px;
437
+ max-height: 12px;
438
+ fill: currentColor;
439
+ }
440
+ .react-flow__edge.updating .react-flow__edge-path {
441
+ stroke: #777;
442
+ }
443
+ .react-flow__edge-text {
444
+ font-size: 10px;
445
+ }
446
+ .react-flow__node.selectable:focus,
447
+ .react-flow__node.selectable:focus-visible {
448
+ outline: none;
449
+ }
450
+ .react-flow__node-input,
451
+ .react-flow__node-default,
452
+ .react-flow__node-output,
453
+ .react-flow__node-group {
454
+ padding: 10px;
455
+ border-radius: var(--xy-node-border-radius, var(--xy-node-border-radius-default));
456
+ width: 150px;
457
+ font-size: 12px;
458
+ color: var(--xy-node-color, var(--xy-node-color-default));
459
+ text-align: center;
460
+ border: var(--xy-node-border, var(--xy-node-border-default));
461
+ background-color: var(--xy-node-background-color, var(--xy-node-background-color-default));
462
+ }
463
+ .react-flow__node-input.selectable:hover, .react-flow__node-default.selectable:hover, .react-flow__node-output.selectable:hover, .react-flow__node-group.selectable:hover {
464
+ box-shadow: var(--xy-node-boxshadow-hover, var(--xy-node-boxshadow-hover-default));
465
+ }
466
+ .react-flow__node-input.selectable.selected,
467
+ .react-flow__node-input.selectable:focus,
468
+ .react-flow__node-input.selectable:focus-visible,
469
+ .react-flow__node-default.selectable.selected,
470
+ .react-flow__node-default.selectable:focus,
471
+ .react-flow__node-default.selectable:focus-visible,
472
+ .react-flow__node-output.selectable.selected,
473
+ .react-flow__node-output.selectable:focus,
474
+ .react-flow__node-output.selectable:focus-visible,
475
+ .react-flow__node-group.selectable.selected,
476
+ .react-flow__node-group.selectable:focus,
477
+ .react-flow__node-group.selectable:focus-visible {
478
+ box-shadow: var(--xy-node-boxshadow-selected, var(--xy-node-boxshadow-selected-default));
479
+ }
480
+ .react-flow__node-group {
481
+ background-color: var(--xy-node-group-background-color, var(--xy-node-group-background-color-default));
482
+ }
483
+ .react-flow__nodesselection-rect,
484
+ .react-flow__selection {
485
+ background: var(--xy-selection-background-color, var(--xy-selection-background-color-default));
486
+ border: var(--xy-selection-border, var(--xy-selection-border-default));
487
+ }
488
+ .react-flow__nodesselection-rect:focus,
489
+ .react-flow__nodesselection-rect:focus-visible,
490
+ .react-flow__selection:focus,
491
+ .react-flow__selection:focus-visible {
492
+ outline: none;
493
+ }
494
+ .react-flow__controls-button:hover {
495
+ background: var(
496
+ --xy-controls-button-background-color-hover-props,
497
+ var(--xy-controls-button-background-color-hover, var(--xy-controls-button-background-color-hover-default))
498
+ );
499
+ color: var(
500
+ --xy-controls-button-color-hover-props,
501
+ var(--xy-controls-button-color-hover, var(--xy-controls-button-color-hover-default))
502
+ );
503
+ }
504
+ .react-flow__controls-button:disabled {
505
+ pointer-events: none;
506
+ }
507
+ .react-flow__controls-button:disabled svg {
508
+ fill-opacity: 0.4;
509
+ }
510
+ .react-flow__controls-button:last-child {
511
+ border-bottom: none;
512
+ }
513
+ .react-flow__controls.horizontal .react-flow__controls-button {
514
+ border-bottom: none;
515
+ border-right: 1px solid
516
+ var(
517
+ --xy-controls-button-border-color-props,
518
+ var(--xy-controls-button-border-color, var(--xy-controls-button-border-color-default))
519
+ );
520
+ }
521
+ .react-flow__controls.horizontal .react-flow__controls-button:last-child {
522
+ border-right: none;
523
+ }
524
+ .react-flow__resize-control {
525
+ position: absolute;
526
+ }
527
+ .react-flow__resize-control.left,
528
+ .react-flow__resize-control.right {
529
+ cursor: ew-resize;
530
+ }
531
+ .react-flow__resize-control.top,
532
+ .react-flow__resize-control.bottom {
533
+ cursor: ns-resize;
534
+ }
535
+ .react-flow__resize-control.top.left,
536
+ .react-flow__resize-control.bottom.right {
537
+ cursor: nwse-resize;
538
+ }
539
+ .react-flow__resize-control.bottom.left,
540
+ .react-flow__resize-control.top.right {
541
+ cursor: nesw-resize;
542
+ }
543
+ /* handle styles */
544
+ .react-flow__resize-control.handle {
545
+ width: 5px;
546
+ height: 5px;
547
+ border: 1px solid #fff;
548
+ border-radius: 1px;
549
+ background-color: var(--xy-resize-background-color, var(--xy-resize-background-color-default));
550
+ translate: -50% -50%;
551
+ }
552
+ .react-flow__resize-control.handle.left {
553
+ left: 0;
554
+ top: 50%;
555
+ }
556
+ .react-flow__resize-control.handle.right {
557
+ left: 100%;
558
+ top: 50%;
559
+ }
560
+ .react-flow__resize-control.handle.top {
561
+ left: 50%;
562
+ top: 0;
563
+ }
564
+ .react-flow__resize-control.handle.bottom {
565
+ left: 50%;
566
+ top: 100%;
567
+ }
568
+ .react-flow__resize-control.handle.top.left {
569
+ left: 0;
570
+ }
571
+ .react-flow__resize-control.handle.bottom.left {
572
+ left: 0;
573
+ }
574
+ .react-flow__resize-control.handle.top.right {
575
+ left: 100%;
576
+ }
577
+ .react-flow__resize-control.handle.bottom.right {
578
+ left: 100%;
579
+ }
580
+ /* line styles */
581
+ .react-flow__resize-control.line {
582
+ border-color: var(--xy-resize-background-color, var(--xy-resize-background-color-default));
583
+ border-width: 0;
584
+ border-style: solid;
585
+ }
586
+ .react-flow__resize-control.line.left,
587
+ .react-flow__resize-control.line.right {
588
+ width: 1px;
589
+ transform: translate(-50%, 0);
590
+ top: 0;
591
+ height: 100%;
592
+ }
593
+ .react-flow__resize-control.line.left {
594
+ left: 0;
595
+ border-left-width: 1px;
596
+ }
597
+ .react-flow__resize-control.line.right {
598
+ left: 100%;
599
+ border-right-width: 1px;
600
+ }
601
+ .react-flow__resize-control.line.top,
602
+ .react-flow__resize-control.line.bottom {
603
+ height: 1px;
604
+ transform: translate(0, -50%);
605
+ left: 0;
606
+ width: 100%;
607
+ }
608
+ .react-flow__resize-control.line.top {
609
+ top: 0;
610
+ border-top-width: 1px;
611
+ }
612
+ .react-flow__resize-control.line.bottom {
613
+ border-bottom-width: 1px;
614
+ top: 100%;
615
+ }
616
+ .react-flow__edge-textbg {
617
+ fill: var(--xy-edge-label-background-color, var(--xy-edge-label-background-color-default));
618
+ }
619
+ .react-flow__edge-text {
620
+ fill: var(--xy-edge-label-color, var(--xy-edge-label-color-default));
621
+ }
622
+ `;
623
+ //# sourceMappingURL=xyflow.js.map
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ interface DynamicOptions<TProps extends Record<string, unknown>> {
3
+ ssr?: boolean;
4
+ loading?: React.ComponentType<TProps>;
5
+ }
6
+ export declare function dynamic<TProps extends Record<string, unknown>>(factory: () => Promise<React.ComponentType<TProps> | {
7
+ default: React.ComponentType<TProps>;
8
+ } | Record<string, unknown>>, { ssr, loading }?: DynamicOptions<TProps>): React.ComponentType<TProps>;
9
+ export {};
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.dynamic = dynamic;
7
+ const react_1 = __importDefault(require("react"));
8
+ function dynamic(factory, { ssr = true, loading } = {}) {
9
+ const Component = react_1.default.lazy(() => factory().then((mod) => {
10
+ // Case 1: factory() => import('./SomeModule') - direct import
11
+ // Case 2: factory() => import('./SomeModule').then(mod => mod.default) - extract default
12
+ if (typeof mod === 'function') {
13
+ return { default: mod };
14
+ }
15
+ // Case 3: factory() => import('./SomeModule').then(mod => ({ default: mod.default })) - manual wrap
16
+ // Case 4: factory() => import('./SomeModule').then(mod => ({ default: mod.Named })) - manual wrap named
17
+ if (mod && typeof mod === 'object' && 'default' in mod) {
18
+ const defaultExport = mod.default;
19
+ // Handle both function components and React component objects (e.g., memo/forwardRef)
20
+ if (typeof defaultExport === 'function') {
21
+ return { default: defaultExport };
22
+ }
23
+ if (defaultExport && typeof defaultExport === 'object' && '$$typeof' in defaultExport) {
24
+ return { default: defaultExport };
25
+ }
26
+ }
27
+ // Case 5: factory() => import('./SomeModule').then(mod => mod.Named) - find named export
28
+ if (mod && typeof mod === 'object') {
29
+ const modObj = mod;
30
+ for (const key in modObj) {
31
+ const value = modObj[key];
32
+ if (typeof value === 'function') {
33
+ return { default: value };
34
+ }
35
+ if (value && typeof value === 'object' && '$$typeof' in value) {
36
+ return { default: value };
37
+ }
38
+ }
39
+ }
40
+ throw new Error('Dynamic import did not return a valid React component');
41
+ }));
42
+ const LoadingComponent = loading || (() => null);
43
+ return (props) => {
44
+ const [hasMounted, setHasMounted] = react_1.default.useState(false);
45
+ react_1.default.useEffect(() => {
46
+ setHasMounted(true);
47
+ }, []);
48
+ if (ssr) {
49
+ return (react_1.default.createElement(react_1.default.Suspense, { fallback: react_1.default.createElement(LoadingComponent, Object.assign({}, props)) },
50
+ react_1.default.createElement(Component, Object.assign({}, props))));
51
+ }
52
+ if (!hasMounted) {
53
+ return react_1.default.createElement(LoadingComponent, Object.assign({}, props));
54
+ }
55
+ return (react_1.default.createElement(react_1.default.Suspense, { fallback: react_1.default.createElement(LoadingComponent, Object.assign({}, props)) },
56
+ react_1.default.createElement(Component, Object.assign({}, props))));
57
+ };
58
+ }
59
+ //# sourceMappingURL=dynamic.js.map
@@ -36,3 +36,4 @@ export * from './parse-style-string';
36
36
  export * from './lang-to-name';
37
37
  export * from './enhanced-smoothstep';
38
38
  export * from './icon-resolver';
39
+ export * from './dynamic';
@@ -52,4 +52,5 @@ __exportStar(require("./parse-style-string"), exports);
52
52
  __exportStar(require("./lang-to-name"), exports);
53
53
  __exportStar(require("./enhanced-smoothstep"), exports);
54
54
  __exportStar(require("./icon-resolver"), exports);
55
+ __exportStar(require("./dynamic"), exports);
55
56
  //# sourceMappingURL=index.js.map