@module-federation/devtools 0.21.6 → 0.22.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 (100) hide show
  1. package/dist/es/App.css +12 -0
  2. package/dist/es/App.js +330 -22
  3. package/dist/es/App.module.js +1 -1
  4. package/dist/es/App_module.css +291 -5
  5. package/dist/es/component/DependencyGraph/index.js +205 -0
  6. package/dist/es/component/DependencyGraph/index.module.js +5 -0
  7. package/dist/es/component/DependencyGraph/index_module.css +97 -0
  8. package/dist/es/component/{GraphItem → DependencyGraphItem}/index.js +15 -6
  9. package/dist/es/component/DependencyGraphItem/index.module.js +5 -0
  10. package/dist/es/component/DependencyGraphItem/index_module.css +95 -0
  11. package/dist/es/component/Form/index.js +191 -109
  12. package/dist/es/component/Form/index.module.js +1 -1
  13. package/dist/es/component/Form/index_module.css +179 -25
  14. package/dist/es/component/Layout/index.js +300 -49
  15. package/dist/es/component/Layout/index.module.js +1 -1
  16. package/dist/es/component/Layout/index_module.css +52 -32
  17. package/dist/es/component/ModuleInfo/index.js +289 -0
  18. package/dist/es/component/ModuleInfo/index.module.js +5 -0
  19. package/dist/es/component/ModuleInfo/index_module.css +183 -0
  20. package/dist/es/component/SharedDepsExplorer/FocusResultDisplay.js +33 -0
  21. package/dist/es/component/SharedDepsExplorer/FocusResultDisplay.module.js +5 -0
  22. package/dist/es/component/SharedDepsExplorer/FocusResultDisplay_module.css +45 -0
  23. package/dist/es/component/SharedDepsExplorer/index.js +506 -0
  24. package/dist/es/component/SharedDepsExplorer/index.module.js +5 -0
  25. package/dist/es/component/SharedDepsExplorer/index_module.css +457 -0
  26. package/dist/es/component/SharedDepsExplorer/share-utils.js +206 -0
  27. package/dist/es/template/constant.js +3 -19
  28. package/dist/es/utils/chrome/index.js +91 -38
  29. package/dist/es/utils/chrome/messages.js +6 -0
  30. package/dist/es/utils/chrome/override-remote.js +42 -0
  31. package/dist/es/utils/chrome/post-message-listener.js +2 -1
  32. package/dist/es/utils/chrome/post-message-start.js +10 -2
  33. package/dist/es/utils/chrome/storage.js +6 -1
  34. package/dist/es/utils/sdk/graph.js +25 -4
  35. package/dist/es/utils/sdk/index.js +9 -0
  36. package/dist/es/worker/index.js +168 -1
  37. package/dist/lib/App.css +12 -0
  38. package/dist/lib/App.js +321 -18
  39. package/dist/lib/App.module.js +1 -1
  40. package/dist/lib/App_module.css +291 -5
  41. package/dist/lib/component/DependencyGraph/index.js +227 -0
  42. package/dist/lib/component/{GraphItem → DependencyGraph}/index.module.js +1 -1
  43. package/dist/lib/component/DependencyGraph/index_module.css +97 -0
  44. package/dist/lib/component/{GraphItem → DependencyGraphItem}/index.js +18 -9
  45. package/dist/lib/component/{Graph → DependencyGraphItem}/index.module.js +1 -1
  46. package/dist/lib/component/DependencyGraphItem/index_module.css +95 -0
  47. package/dist/lib/component/Form/index.js +188 -107
  48. package/dist/lib/component/Form/index.module.js +1 -1
  49. package/dist/lib/component/Form/index_module.css +179 -25
  50. package/dist/lib/component/Layout/index.js +294 -47
  51. package/dist/lib/component/Layout/index.module.js +1 -1
  52. package/dist/lib/component/Layout/index_module.css +52 -32
  53. package/dist/lib/component/ModuleInfo/index.js +319 -0
  54. package/dist/lib/component/ModuleInfo/index.module.js +25 -0
  55. package/dist/lib/component/ModuleInfo/index_module.css +183 -0
  56. package/dist/lib/component/SharedDepsExplorer/FocusResultDisplay.js +63 -0
  57. package/dist/lib/component/SharedDepsExplorer/FocusResultDisplay.module.js +25 -0
  58. package/dist/lib/component/SharedDepsExplorer/FocusResultDisplay_module.css +45 -0
  59. package/dist/lib/component/SharedDepsExplorer/index.js +513 -0
  60. package/dist/lib/component/SharedDepsExplorer/index.module.js +25 -0
  61. package/dist/lib/component/SharedDepsExplorer/index_module.css +457 -0
  62. package/dist/lib/component/SharedDepsExplorer/share-utils.js +237 -0
  63. package/dist/lib/template/constant.js +4 -17
  64. package/dist/lib/utils/chrome/index.js +94 -38
  65. package/dist/lib/utils/chrome/messages.js +31 -0
  66. package/dist/lib/utils/chrome/override-remote.js +65 -0
  67. package/dist/lib/utils/chrome/post-message-listener.js +2 -1
  68. package/dist/lib/utils/chrome/post-message-start.js +10 -2
  69. package/dist/lib/utils/chrome/storage.js +5 -0
  70. package/dist/lib/utils/sdk/graph.js +25 -4
  71. package/dist/lib/utils/sdk/index.js +10 -0
  72. package/dist/lib/worker/index.js +156 -1
  73. package/dist/types/src/App.d.ts +2 -1
  74. package/dist/types/src/component/{Graph → DependencyGraph}/index.d.ts +0 -1
  75. package/dist/types/src/component/{GraphItem → DependencyGraphItem}/index.d.ts +0 -1
  76. package/dist/types/src/component/Form/index.d.ts +2 -0
  77. package/dist/types/src/component/Layout/index.d.ts +0 -1
  78. package/dist/types/src/component/ModuleInfo/index.d.ts +8 -0
  79. package/dist/types/src/component/SharedDepsExplorer/FocusResultDisplay.d.ts +15 -0
  80. package/dist/types/src/component/SharedDepsExplorer/index.d.ts +6 -0
  81. package/dist/types/src/component/SharedDepsExplorer/share-utils.d.ts +44 -0
  82. package/dist/types/src/init.d.ts +0 -1
  83. package/dist/types/src/template/constant.d.ts +2 -5
  84. package/dist/types/src/utils/chrome/index.d.ts +5 -3
  85. package/dist/types/src/utils/chrome/messages.d.ts +2 -0
  86. package/dist/types/src/utils/chrome/override-remote.d.ts +1 -0
  87. package/dist/types/src/utils/chrome/storage.d.ts +5 -4
  88. package/dist/types/src/utils/sdk/graph.d.ts +2 -1
  89. package/dist/types/src/utils/sdk/index.d.ts +1 -0
  90. package/dist/types/src/utils/types/common.d.ts +4 -0
  91. package/dist/types/src/worker/index.d.ts +1 -0
  92. package/package.json +16 -14
  93. package/dist/es/component/Graph/index.js +0 -127
  94. package/dist/es/component/Graph/index.module.js +0 -5
  95. package/dist/es/component/Graph/index_module.css +0 -12
  96. package/dist/es/component/GraphItem/index.module.js +0 -5
  97. package/dist/es/component/GraphItem/index_module.css +0 -61
  98. package/dist/lib/component/Graph/index.js +0 -149
  99. package/dist/lib/component/Graph/index_module.css +0 -12
  100. package/dist/lib/component/GraphItem/index_module.css +0 -61
@@ -0,0 +1,457 @@
1
+ .container_967de {
2
+ display: flex;
3
+ flex-direction: column;
4
+ gap: 16px;
5
+ padding: 16px 12px;
6
+ max-width: 1024px;
7
+ }
8
+
9
+ @media (min-width: 768px) {
10
+ .container_967de {
11
+ padding: 24px 16px;
12
+ }
13
+ }
14
+ .heroSection_967de {
15
+ display: flex;
16
+ flex-direction: column;
17
+ gap: 8px;
18
+ }
19
+
20
+ .heroSubtitle_967de {
21
+ font-size: 12px;
22
+ font-weight: 600;
23
+ text-transform: uppercase;
24
+ letter-spacing: 0.025em;
25
+ color: #71717a;
26
+ margin: 0;
27
+ }
28
+
29
+ .heroTitle_967de {
30
+ font-size: 30px;
31
+ line-height: 36px;
32
+ font-weight: 700;
33
+ letter-spacing: -0.025em;
34
+ color: #18181b;
35
+ margin: 0;
36
+ }
37
+
38
+ .statsGrid_967de {
39
+ display: grid;
40
+ grid-template-columns: repeat(1, minmax(0, 1fr));
41
+ gap: 16px;
42
+ }
43
+
44
+ @media (min-width: 640px) {
45
+ .statsGrid_967de {
46
+ grid-template-columns: repeat(2, minmax(0, 1fr));
47
+ }
48
+ }
49
+ @media (min-width: 1024px) {
50
+ .statsGrid_967de {
51
+ grid-template-columns: repeat(3, minmax(0, 1fr));
52
+ }
53
+ }
54
+ .card_967de {
55
+ border-radius: 12px;
56
+ box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
57
+ border: 1px solid #e4e4e7;
58
+ background-color: white;
59
+ }
60
+
61
+ .cardWithPadding_967de {
62
+ border-radius: 12px;
63
+ box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
64
+ border: 1px solid #e4e4e7;
65
+ background-color: white;
66
+ padding: 16px;
67
+ }
68
+
69
+ .cardHeader_967de {
70
+ display: flex;
71
+ flex-direction: row;
72
+ align-items: center;
73
+ justify-content: space-between;
74
+ padding-bottom: 8px;
75
+ }
76
+
77
+ .statSpace_967de {
78
+ display: flex;
79
+ flex-direction: column;
80
+ gap: 4px;
81
+ }
82
+
83
+ .statLabel_967de {
84
+ font-size: 14px;
85
+ color: #71717a;
86
+ }
87
+
88
+ .statValue_967de {
89
+ font-size: 24px;
90
+ font-weight: 600;
91
+ display: flex;
92
+ align-items: center;
93
+ gap: 8px;
94
+ color: #18181b;
95
+ }
96
+
97
+ .icon_967de {
98
+ height: 20px;
99
+ width: 20px;
100
+ color: #a1a1aa;
101
+ }
102
+
103
+ .iconSmall_967de {
104
+ height: 12px;
105
+ width: 12px;
106
+ }
107
+
108
+ .iconMedium_967de {
109
+ height: 14px;
110
+ width: 14px;
111
+ color: #71717a;
112
+ }
113
+
114
+ .statDescription_967de {
115
+ font-size: 12px;
116
+ color: #71717a;
117
+ margin: 0;
118
+ }
119
+
120
+ .statSubtext_967de {
121
+ font-size: 16px;
122
+ color: #a1a1aa;
123
+ font-weight: 400;
124
+ }
125
+
126
+ .cardFooter_967de {
127
+ display: flex;
128
+ align-items: center;
129
+ justify-content: space-between;
130
+ font-size: 12px;
131
+ color: #71717a;
132
+ white-space: nowrap;
133
+ }
134
+
135
+ .truncate_967de {
136
+ overflow: hidden;
137
+ text-overflow: ellipsis;
138
+ white-space: nowrap;
139
+ }
140
+
141
+ .mr2_967de {
142
+ margin-right: 8px;
143
+ }
144
+
145
+ .badgeGroup_967de {
146
+ display: inline-flex;
147
+ align-items: center;
148
+ gap: 4px;
149
+ flex-shrink: 0;
150
+ }
151
+
152
+ .statusTags_967de {
153
+ display: flex;
154
+ flex-direction: column;
155
+ gap: 4px;
156
+ font-size: 12px;
157
+ color: #71717a;
158
+ }
159
+
160
+ .tagRow_967de {
161
+ display: flex;
162
+ align-items: center;
163
+ gap: 8px;
164
+ }
165
+
166
+ .tagContent_967de {
167
+ display: flex;
168
+ align-items: center;
169
+ }
170
+
171
+ .tagValue_967de {
172
+ font-weight: 600;
173
+ color: #18181b;
174
+ margin-left: 4px;
175
+ }
176
+
177
+ .mr1_967de {
178
+ margin-right: 4px;
179
+ }
180
+
181
+ .rightPanels_967de {
182
+ display: flex;
183
+ flex-direction: column;
184
+ gap: 16px;
185
+ }
186
+
187
+ .panelStack_967de {
188
+ display: flex;
189
+ flex-direction: column;
190
+ gap: 16px;
191
+ }
192
+
193
+ .cardTitle_967de {
194
+ font-size: 16px;
195
+ display: flex;
196
+ align-items: center;
197
+ gap: 8px;
198
+ }
199
+
200
+ .controlsGrid_967de {
201
+ display: grid;
202
+ gap: 12px;
203
+ margin-bottom: 12px;
204
+ padding: 8px;
205
+ }
206
+
207
+ @media (min-width: 768px) {
208
+ .controlsGrid_967de {
209
+ grid-template-columns: repeat(2, minmax(0, 1fr));
210
+ }
211
+ }
212
+ .inputGroup_967de {
213
+ display: flex;
214
+ flex-direction: column;
215
+ gap: 4px;
216
+ }
217
+
218
+ .inputLabel_967de {
219
+ font-size: 12px;
220
+ color: #71717a;
221
+ }
222
+
223
+ .fullWidth_967de {
224
+ width: 100%;
225
+ }
226
+
227
+ .resultBox_967de {
228
+ border-radius: 6px;
229
+ border: 1px dashed #e4e4e7;
230
+ background-color: #f9fafb;
231
+ padding: 8px 12px;
232
+ font-size: 12px;
233
+ }
234
+
235
+ .filterGrid_967de {
236
+ display: grid;
237
+ gap: 12px;
238
+ margin-bottom: 12px;
239
+ }
240
+
241
+ @media (min-width: 768px) {
242
+ .filterGrid_967de {
243
+ grid-template-columns: repeat(2, minmax(0, 1fr));
244
+ }
245
+ }
246
+ @media (min-width: 1024px) {
247
+ .filterGrid_967de {
248
+ grid-template-columns: repeat(3, minmax(0, 1fr));
249
+ }
250
+ }
251
+ .padding2_967de {
252
+ padding: 8px;
253
+ }
254
+
255
+ .searchGrid_967de {
256
+ display: grid;
257
+ gap: 12px;
258
+ padding: 8px;
259
+ }
260
+
261
+ @media (min-width: 768px) {
262
+ .searchGrid_967de {
263
+ grid-template-columns: repeat(2, minmax(0, 1fr));
264
+ }
265
+ }
266
+ .searchInput_967de {
267
+ font-size: 12px;
268
+ }
269
+
270
+ .matchCount_967de {
271
+ display: flex;
272
+ align-items: flex-end;
273
+ justify-content: flex-end;
274
+ gap: 8px;
275
+ font-size: 12px;
276
+ color: #71717a;
277
+ }
278
+
279
+ .matchValue_967de {
280
+ font-weight: 600;
281
+ color: #18181b;
282
+ margin-left: 4px;
283
+ }
284
+
285
+ .loadingText_967de {
286
+ padding-top: 16px;
287
+ padding-bottom: 16px;
288
+ font-size: 12px;
289
+ color: #71717a;
290
+ }
291
+
292
+ .errorText_967de {
293
+ padding-top: 12px;
294
+ padding-bottom: 12px;
295
+ font-size: 12px;
296
+ color: #dc2626;
297
+ }
298
+
299
+ .noMatchText_967de {
300
+ padding-top: 12px;
301
+ padding-bottom: 12px;
302
+ font-size: 12px;
303
+ color: #71717a;
304
+ }
305
+
306
+ .treeContainer_967de {
307
+ max-height: 320px;
308
+ overflow-y: auto;
309
+ }
310
+
311
+ .collapseWrapper_967de {
312
+ display: flex;
313
+ flex-direction: column;
314
+ gap: 8px;
315
+ border: 0;
316
+ }
317
+
318
+ .providerHeader_967de {
319
+ display: flex;
320
+ flex-direction: column;
321
+ align-items: flex-start;
322
+ gap: 4px;
323
+ text-align: left;
324
+ }
325
+
326
+ .providerTitle_967de {
327
+ display: flex;
328
+ align-items: center;
329
+ gap: 8px;
330
+ font-size: 14px;
331
+ font-weight: 500;
332
+ }
333
+
334
+ .providerMeta_967de {
335
+ display: flex;
336
+ flex-wrap: wrap;
337
+ gap: 8px;
338
+ font-size: 10px;
339
+ color: #71717a;
340
+ }
341
+
342
+ .scopeList_967de {
343
+ display: flex;
344
+ flex-direction: column;
345
+ gap: 16px;
346
+ }
347
+
348
+ .scopeItem_967de {
349
+ display: flex;
350
+ flex-direction: column;
351
+ gap: 8px;
352
+ }
353
+
354
+ .scopeHeader_967de {
355
+ display: flex;
356
+ align-items: center;
357
+ gap: 8px;
358
+ font-size: 12px;
359
+ font-weight: 500;
360
+ color: #52525b;
361
+ }
362
+
363
+ .tableContainer_967de {
364
+ overflow: hidden;
365
+ border-radius: 6px;
366
+ border: 1px solid #e4e4e7;
367
+ background-color: rgba(249, 250, 251, 0.4);
368
+ }
369
+
370
+ .cellCol_967de {
371
+ display: flex;
372
+ flex-direction: column;
373
+ }
374
+
375
+ .packageName_967de {
376
+ word-break: break-all;
377
+ font-family: monospace;
378
+ font-size: 11px;
379
+ color: #27272a;
380
+ }
381
+
382
+ .version_967de {
383
+ margin-top: 4px;
384
+ font-size: 11px;
385
+ color: #71717a;
386
+ }
387
+
388
+ .cellColGap_967de {
389
+ display: flex;
390
+ flex-direction: column;
391
+ gap: 4px;
392
+ }
393
+
394
+ .scopeText_967de {
395
+ font-size: 11px;
396
+ color: #71717a;
397
+ }
398
+
399
+ .tagContainer_967de {
400
+ width: 64px;
401
+ display: flex;
402
+ align-items: center;
403
+ justify-content: center;
404
+ }
405
+
406
+ .configTags_967de {
407
+ margin-top: 4px;
408
+ display: flex;
409
+ flex-wrap: wrap;
410
+ gap: 4px;
411
+ font-size: 10px;
412
+ color: #71717a;
413
+ }
414
+
415
+ .scale90_967de {
416
+ transform: scale(0.9);
417
+ transform-origin: left;
418
+ }
419
+
420
+ .popoverContent_967de {
421
+ width: 288px;
422
+ }
423
+
424
+ .popoverTitle_967de {
425
+ margin-bottom: 4px;
426
+ font-size: 12px;
427
+ font-weight: 500;
428
+ }
429
+
430
+ .consumerList_967de {
431
+ display: flex;
432
+ flex-direction: column;
433
+ gap: 4px;
434
+ font-size: 11px;
435
+ color: #374151;
436
+ padding-left: 0;
437
+ list-style: none;
438
+ margin: 0;
439
+ }
440
+
441
+ .consumerItem_967de {
442
+ display: flex;
443
+ align-items: center;
444
+ gap: 4px;
445
+ }
446
+
447
+ .dot_967de {
448
+ height: 6px;
449
+ width: 6px;
450
+ border-radius: 50%;
451
+ background-color: #10b981;
452
+ }
453
+
454
+ .btnContent_967de {
455
+ display: flex;
456
+ align-items: center;
457
+ }
@@ -0,0 +1,206 @@
1
+ function isRecord(value) {
2
+ return Boolean(value) && typeof value === "object" && !Array.isArray(value);
3
+ }
4
+ function computeLoadedStatus(entry) {
5
+ if (entry.loaded === true) {
6
+ return "loaded";
7
+ }
8
+ if (entry.loading) {
9
+ return "loading";
10
+ }
11
+ return "not-loaded";
12
+ }
13
+ function computeReuseStatus(entry) {
14
+ const useIn = Array.isArray(entry.useIn) ? entry.useIn : [];
15
+ const { from } = entry;
16
+ const reused = useIn.some((consumer) => consumer && consumer !== from);
17
+ return reused;
18
+ }
19
+ function normalizeEntry({
20
+ provider,
21
+ scope,
22
+ packageName,
23
+ versionKey,
24
+ entry
25
+ }) {
26
+ var _a;
27
+ if (!isRecord(entry)) {
28
+ return null;
29
+ }
30
+ const sharedEntry = entry;
31
+ const loadedStatus = computeLoadedStatus(sharedEntry);
32
+ const reuseStatus = computeReuseStatus(sharedEntry);
33
+ const useIn = Array.isArray(sharedEntry.useIn) ? sharedEntry.useIn : [];
34
+ return {
35
+ id: `${provider}::${scope}::${packageName}::${versionKey}`,
36
+ provider,
37
+ scope,
38
+ packageName,
39
+ version: sharedEntry.version || versionKey,
40
+ from: sharedEntry.from,
41
+ useIn,
42
+ shareConfig: (_a = sharedEntry.shareConfig) != null ? _a : {},
43
+ strategy: sharedEntry.strategy,
44
+ loaded: sharedEntry.loaded,
45
+ loading: sharedEntry.loading,
46
+ loadedStatus,
47
+ reuseStatus
48
+ };
49
+ }
50
+ function normalizeShareData(raw) {
51
+ if (!raw || !isRecord(raw)) {
52
+ return [];
53
+ }
54
+ const items = [];
55
+ Object.entries(raw).forEach(([topKey, topValue]) => {
56
+ if (!isRecord(topValue)) {
57
+ return;
58
+ }
59
+ if (topKey === "default") {
60
+ const provider2 = "default";
61
+ const scope = "default";
62
+ const packagesObj = topValue;
63
+ Object.entries(packagesObj).forEach(([pkgName, versions]) => {
64
+ if (pkgName === "version" || !isRecord(versions)) {
65
+ return;
66
+ }
67
+ Object.entries(versions).forEach(([versionKey, entry]) => {
68
+ const normalized = normalizeEntry({
69
+ provider: provider2,
70
+ scope,
71
+ packageName: pkgName,
72
+ versionKey,
73
+ entry
74
+ });
75
+ if (normalized) {
76
+ items.push(normalized);
77
+ }
78
+ });
79
+ });
80
+ return;
81
+ }
82
+ const provider = topKey;
83
+ const scopesObj = topValue;
84
+ Object.entries(scopesObj).forEach(([scopeName, scopeValue]) => {
85
+ if (scopeName === "version" || !isRecord(scopeValue)) {
86
+ return;
87
+ }
88
+ const packagesObj = scopeValue;
89
+ Object.entries(packagesObj).forEach(([pkgName, versions]) => {
90
+ if (pkgName === "version" || !isRecord(versions)) {
91
+ return;
92
+ }
93
+ Object.entries(versions).forEach(([versionKey, entry]) => {
94
+ const normalized = normalizeEntry({
95
+ provider,
96
+ scope: scopeName,
97
+ packageName: pkgName,
98
+ versionKey,
99
+ entry
100
+ });
101
+ if (normalized) {
102
+ items.push(normalized);
103
+ }
104
+ });
105
+ });
106
+ });
107
+ });
108
+ return items;
109
+ }
110
+ function computeShareStats(versions) {
111
+ const providerSet = /* @__PURE__ */ new Set();
112
+ const scopeSet = /* @__PURE__ */ new Set();
113
+ const packageSet = /* @__PURE__ */ new Set();
114
+ let loadedCount = 0;
115
+ let reusedCount = 0;
116
+ versions.forEach((v) => {
117
+ providerSet.add(v.provider);
118
+ scopeSet.add(v.scope);
119
+ packageSet.add(v.packageName);
120
+ if (v.loadedStatus === "loaded") {
121
+ loadedCount += 1;
122
+ }
123
+ if (v.reuseStatus) {
124
+ reusedCount += 1;
125
+ }
126
+ });
127
+ return {
128
+ totalProviders: providerSet.size,
129
+ totalScopes: scopeSet.size,
130
+ totalPackages: packageSet.size,
131
+ totalVersions: versions.length,
132
+ loadedCount,
133
+ reusedCount
134
+ };
135
+ }
136
+ function groupByProviderScopePackage(versions) {
137
+ const tree = {};
138
+ versions.forEach((v) => {
139
+ if (!tree[v.provider]) {
140
+ tree[v.provider] = {};
141
+ }
142
+ if (!tree[v.provider][v.scope]) {
143
+ tree[v.provider][v.scope] = {};
144
+ }
145
+ if (!tree[v.provider][v.scope][v.packageName]) {
146
+ tree[v.provider][v.scope][v.packageName] = [];
147
+ }
148
+ tree[v.provider][v.scope][v.packageName].push(v);
149
+ });
150
+ return tree;
151
+ }
152
+ function getFilterOptions(versions) {
153
+ const providerSet = /* @__PURE__ */ new Set();
154
+ const scopeSet = /* @__PURE__ */ new Set();
155
+ const packageSet = /* @__PURE__ */ new Set();
156
+ const versionSet = /* @__PURE__ */ new Set();
157
+ versions.forEach((v) => {
158
+ providerSet.add(v.provider);
159
+ scopeSet.add(v.scope);
160
+ packageSet.add(v.packageName);
161
+ versionSet.add(v.version);
162
+ });
163
+ return {
164
+ providers: Array.from(providerSet).sort(),
165
+ scopes: Array.from(scopeSet).sort(),
166
+ packages: Array.from(packageSet).sort(),
167
+ versions: Array.from(versionSet).sort()
168
+ };
169
+ }
170
+ function findPackageProvider(versions, packageName, version) {
171
+ var _a;
172
+ const candidates = versions.filter(
173
+ (v) => v.packageName === packageName && (!version || v.version === version)
174
+ );
175
+ if (!candidates.length) {
176
+ return null;
177
+ }
178
+ const providers = Array.from(new Set(candidates.map((v) => v.from))).sort();
179
+ const hasLoaded = candidates.some((v) => v.loadedStatus === "loaded");
180
+ const hasLoading = !hasLoaded && candidates.some((v) => v.loadedStatus === "loading");
181
+ let status = "not-loaded";
182
+ if (hasLoaded) {
183
+ status = "loaded";
184
+ } else if (hasLoading) {
185
+ status = "loading";
186
+ }
187
+ return {
188
+ packageName,
189
+ version: version || ((_a = candidates[0]) == null ? void 0 : _a.version),
190
+ providers,
191
+ status
192
+ };
193
+ }
194
+ function getReusedVersions(versions) {
195
+ return versions.filter((v) => v.reuseStatus === true);
196
+ }
197
+ export {
198
+ computeLoadedStatus,
199
+ computeReuseStatus,
200
+ computeShareStats,
201
+ findPackageProvider,
202
+ getFilterOptions,
203
+ getReusedVersions,
204
+ groupByProviderScopePackage,
205
+ normalizeShareData
206
+ };
@@ -1,21 +1,6 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3
- var __hasOwnProp = Object.prototype.hasOwnProperty;
4
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
5
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
- var __spreadValues = (a, b) => {
7
- for (var prop in b || (b = {}))
8
- if (__hasOwnProp.call(b, prop))
9
- __defNormalProp(a, prop, b[prop]);
10
- if (__getOwnPropSymbols)
11
- for (var prop of __getOwnPropSymbols(b)) {
12
- if (__propIsEnum.call(b, prop))
13
- __defNormalProp(a, prop, b[prop]);
14
- }
15
- return a;
16
- };
17
1
  const FormID = "FormID";
18
2
  const ENABLEHMR = "enableHMR";
3
+ const ENABLE_CLIP = "enableClip";
19
4
  const proxyFormField = "proxyFormField";
20
5
  const defaultDataItem = {
21
6
  key: "",
@@ -23,9 +8,7 @@ const defaultDataItem = {
23
8
  checked: true
24
9
  };
25
10
  const defaultModuleData = {
26
- proxyFormField: [
27
- __spreadValues({}, defaultDataItem)
28
- ]
11
+ proxyFormField: []
29
12
  };
30
13
  const statusInfo = {
31
14
  noProxy: {
@@ -56,6 +39,7 @@ const __FEDERATION_DEVTOOLS__ = "__MF_DEVTOOLS__";
56
39
  export {
57
40
  BROWSER_ENV_KEY,
58
41
  ENABLEHMR,
42
+ ENABLE_CLIP,
59
43
  FormID,
60
44
  __EAGER_SHARE__,
61
45
  __ENABLE_FAST_REFRESH__,