@module-federation/devtools 0.0.0-next-20250926024003 → 0.0.0-perf-devtools-20260106124142

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 (92) hide show
  1. package/dist/es/App.js +328 -22
  2. package/dist/es/App.module.js +1 -1
  3. package/dist/es/App_module.css +291 -5
  4. package/dist/es/component/DependencyGraph/index.js +205 -0
  5. package/dist/es/component/DependencyGraph/index.module.js +5 -0
  6. package/dist/es/component/DependencyGraph/index_module.css +97 -0
  7. package/dist/es/component/{GraphItem → DependencyGraphItem}/index.js +15 -6
  8. package/dist/es/component/DependencyGraphItem/index.module.js +5 -0
  9. package/dist/es/component/DependencyGraphItem/index_module.css +95 -0
  10. package/dist/es/component/Form/index.js +191 -109
  11. package/dist/es/component/Form/index.module.js +1 -1
  12. package/dist/es/component/Form/index_module.css +179 -25
  13. package/dist/es/component/Layout/index.js +288 -51
  14. package/dist/es/component/Layout/index.module.js +1 -1
  15. package/dist/es/component/Layout/index_module.css +52 -32
  16. package/dist/es/component/ModuleInfo/index.js +289 -0
  17. package/dist/es/component/ModuleInfo/index.module.js +5 -0
  18. package/dist/es/component/ModuleInfo/index_module.css +183 -0
  19. package/dist/es/component/SharedDepsExplorer/FocusResultDisplay.js +39 -0
  20. package/dist/es/component/SharedDepsExplorer/index.js +505 -0
  21. package/dist/es/component/SharedDepsExplorer/share-utils.js +206 -0
  22. package/dist/es/index.css +15 -0
  23. package/dist/es/template/constant.js +5 -19
  24. package/dist/es/utils/chrome/fast-refresh.js +80 -7
  25. package/dist/es/utils/chrome/index.js +91 -38
  26. package/dist/es/utils/chrome/messages.js +6 -0
  27. package/dist/es/utils/chrome/post-message-listener.js +2 -1
  28. package/dist/es/utils/chrome/post-message-start.js +10 -2
  29. package/dist/es/utils/chrome/storage.js +6 -1
  30. package/dist/es/utils/sdk/graph.js +25 -4
  31. package/dist/es/utils/sdk/index.js +9 -0
  32. package/dist/es/worker/index.js +168 -1
  33. package/dist/lib/App.js +318 -17
  34. package/dist/lib/App.module.js +1 -1
  35. package/dist/lib/App_module.css +291 -5
  36. package/dist/lib/component/DependencyGraph/index.js +227 -0
  37. package/dist/lib/component/{GraphItem → DependencyGraph}/index.module.js +1 -1
  38. package/dist/lib/component/DependencyGraph/index_module.css +97 -0
  39. package/dist/lib/component/{GraphItem → DependencyGraphItem}/index.js +18 -9
  40. package/dist/lib/component/{Graph → DependencyGraphItem}/index.module.js +1 -1
  41. package/dist/lib/component/DependencyGraphItem/index_module.css +95 -0
  42. package/dist/lib/component/Form/index.js +188 -107
  43. package/dist/lib/component/Form/index.module.js +1 -1
  44. package/dist/lib/component/Form/index_module.css +179 -25
  45. package/dist/lib/component/Layout/index.js +280 -48
  46. package/dist/lib/component/Layout/index.module.js +1 -1
  47. package/dist/lib/component/Layout/index_module.css +52 -32
  48. package/dist/lib/component/ModuleInfo/index.js +319 -0
  49. package/dist/lib/component/ModuleInfo/index.module.js +25 -0
  50. package/dist/lib/component/ModuleInfo/index_module.css +183 -0
  51. package/dist/lib/component/SharedDepsExplorer/FocusResultDisplay.js +59 -0
  52. package/dist/lib/component/SharedDepsExplorer/index.js +512 -0
  53. package/dist/lib/component/SharedDepsExplorer/share-utils.js +237 -0
  54. package/dist/lib/index.css +15 -0
  55. package/dist/lib/template/constant.js +7 -17
  56. package/dist/lib/utils/chrome/fast-refresh.js +77 -8
  57. package/dist/lib/utils/chrome/index.js +94 -38
  58. package/dist/lib/utils/chrome/messages.js +31 -0
  59. package/dist/lib/utils/chrome/post-message-listener.js +2 -1
  60. package/dist/lib/utils/chrome/post-message-start.js +10 -2
  61. package/dist/lib/utils/chrome/storage.js +5 -0
  62. package/dist/lib/utils/sdk/graph.js +25 -4
  63. package/dist/lib/utils/sdk/index.js +10 -0
  64. package/dist/lib/worker/index.js +156 -1
  65. package/dist/types/src/App.d.ts +0 -1
  66. package/dist/types/src/component/{Graph → DependencyGraph}/index.d.ts +0 -1
  67. package/dist/types/src/component/{GraphItem → DependencyGraphItem}/index.d.ts +0 -1
  68. package/dist/types/src/component/Form/index.d.ts +2 -0
  69. package/dist/types/src/component/Layout/index.d.ts +0 -1
  70. package/dist/types/src/component/ModuleInfo/index.d.ts +8 -0
  71. package/dist/types/src/component/SharedDepsExplorer/FocusResultDisplay.d.ts +15 -0
  72. package/dist/types/src/component/SharedDepsExplorer/index.d.ts +6 -0
  73. package/dist/types/src/component/SharedDepsExplorer/share-utils.d.ts +44 -0
  74. package/dist/types/src/index.d.ts +2 -1
  75. package/dist/types/src/init.d.ts +0 -1
  76. package/dist/types/src/template/constant.d.ts +3 -5
  77. package/dist/types/src/utils/chrome/index.d.ts +5 -3
  78. package/dist/types/src/utils/chrome/messages.d.ts +2 -0
  79. package/dist/types/src/utils/chrome/storage.d.ts +5 -4
  80. package/dist/types/src/utils/sdk/graph.d.ts +2 -1
  81. package/dist/types/src/utils/sdk/index.d.ts +1 -0
  82. package/dist/types/src/utils/types/common.d.ts +4 -0
  83. package/dist/types/src/worker/index.d.ts +1 -0
  84. package/package.json +18 -14
  85. package/dist/es/component/Graph/index.js +0 -127
  86. package/dist/es/component/Graph/index.module.js +0 -5
  87. package/dist/es/component/Graph/index_module.css +0 -12
  88. package/dist/es/component/GraphItem/index.module.js +0 -5
  89. package/dist/es/component/GraphItem/index_module.css +0 -61
  90. package/dist/lib/component/Graph/index.js +0 -149
  91. package/dist/lib/component/Graph/index_module.css +0 -12
  92. package/dist/lib/component/GraphItem/index_module.css +0 -61
@@ -0,0 +1,95 @@
1
+ .Wrapper_d8079 {
2
+ display: flex;
3
+ width: 320px;
4
+ border-radius: 18px;
5
+ border: 1px solid rgba(96, 165, 250, 0.3);
6
+ overflow: hidden;
7
+ box-shadow: 0 18px 32px rgba(8, 11, 25, 0.35);
8
+ background: linear-gradient(140deg, var(--mf-accent, rgba(243, 244, 246, 0.9)) 0%, rgba(229, 231, 235, 0.7) 45%, rgba(255, 255, 255, 0.95) 100%), rgba(255, 255, 255, 0.9);
9
+ color: #1f2937;
10
+ backdrop-filter: blur(4px);
11
+ }
12
+ .Wrapper_d8079 .react-flow__handle {
13
+ width: 10px;
14
+ height: 10px;
15
+ border-radius: 50%;
16
+ border: 2px solid rgba(96, 165, 250, 0.3);
17
+ background: rgba(243, 244, 246, 0.9);
18
+ box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.2);
19
+ }
20
+ .Wrapper_d8079 .container_d8079 {
21
+ display: flex;
22
+ flex-direction: column;
23
+ width: 100%;
24
+ padding-bottom: 8px;
25
+ }
26
+ .Wrapper_d8079 .group_d8079 {
27
+ display: flex;
28
+ align-items: center;
29
+ justify-content: center;
30
+ padding: 12px;
31
+ background: var(--mf-accent, rgba(243, 244, 246, 0.9));
32
+ }
33
+ .Wrapper_d8079 .name_d8079 {
34
+ font-size: 15px;
35
+ font-weight: 600;
36
+ letter-spacing: 0.02em;
37
+ color: white;
38
+ }
39
+ .Wrapper_d8079 .info_d8079 {
40
+ display: flex;
41
+ flex-direction: column;
42
+ gap: 10px;
43
+ margin: 0 12px;
44
+ padding: 12px;
45
+ border-radius: 14px;
46
+ background: rgba(243, 244, 246, 0.4);
47
+ border: 1px solid rgba(96, 165, 250, 0.3);
48
+ font-size: 11px;
49
+ }
50
+ .Wrapper_d8079 .expose-container_d8079 {
51
+ display: flex;
52
+ flex-direction: column;
53
+ gap: 6px;
54
+ }
55
+ .Wrapper_d8079 .expose-container_d8079 div {
56
+ display: flex;
57
+ flex-wrap: wrap;
58
+ gap: 6px;
59
+ }
60
+ .Wrapper_d8079 .type_d8079 {
61
+ font-size: 12px;
62
+ font-weight: 600;
63
+ text-transform: uppercase;
64
+ letter-spacing: 0.04em;
65
+ color: #4b5563;
66
+ }
67
+ .Wrapper_d8079 .item_d8079 {
68
+ display: inline-flex;
69
+ align-items: center;
70
+ padding: 4px 8px;
71
+ border-radius: 999px;
72
+ background: rgba(243, 244, 246, 0.6);
73
+ color: #1f2937;
74
+ font-size: 10px;
75
+ font-weight: 500;
76
+ margin-right: 6px;
77
+ max-width: 100%;
78
+ white-space: nowrap;
79
+ text-overflow: ellipsis;
80
+ overflow: hidden;
81
+ box-shadow: 0 4px 10px rgba(8, 11, 25, 0.45);
82
+ }
83
+ .Wrapper_d8079 .message_d8079 {
84
+ display: flex;
85
+ align-items: center;
86
+ gap: 6px;
87
+ font-size: 11px;
88
+ color: #4b5563;
89
+ }
90
+ .Wrapper_d8079 .message_d8079 .item_d8079 {
91
+ margin-right: 0;
92
+ padding: 4px 10px;
93
+ background: rgba(243, 244, 246, 0.6);
94
+ color: #1f2937;
95
+ }
@@ -53,7 +53,6 @@ __export(Form_exports, {
53
53
  module.exports = __toCommonJS(Form_exports);
54
54
  var import_jsx_runtime = require("react/jsx-runtime");
55
55
  var import_react = require("react");
56
- var import_react_dom = require("react-dom");
57
56
  var import_web_react = require("@arco-design/web-react");
58
57
  var import_icon = require("@arco-design/web-react/icon");
59
58
  var import_constant = require("../../template/constant");
@@ -74,9 +73,15 @@ const FormComponent = (props) => {
74
73
  versionList,
75
74
  setVersionList,
76
75
  getVersion,
77
- customValueValidate
76
+ customValueValidate,
77
+ enableClip,
78
+ onClipChange
78
79
  } = props;
79
- const { moduleInfo } = window.__FEDERATION__;
80
+ const federation = window.__FEDERATION__ || {
81
+ moduleInfo: {},
82
+ originModuleInfo: {}
83
+ };
84
+ const { moduleInfo } = federation;
80
85
  let { producer } = (0, import_utils.separateType)(moduleInfo);
81
86
  const filterDupMap = /* @__PURE__ */ new Map();
82
87
  producer = producer.filter((t) => {
@@ -127,11 +132,16 @@ const FormComponent = (props) => {
127
132
  }
128
133
  if (key) {
129
134
  statusSet[index].keyStatus = true;
130
- (0, import_react_dom.flushSync)(() => setFormStatus(statusSet));
131
- return callback();
135
+ setTimeout(() => {
136
+ setFormStatus(statusSet);
137
+ callback();
138
+ }, 0);
139
+ return;
132
140
  }
133
141
  statusSet[index].keyStatus = false;
134
- (0, import_react_dom.flushSync)(() => setFormStatus(statusSet));
142
+ setTimeout(() => {
143
+ setFormStatus(statusSet);
144
+ }, 0);
135
145
  return callback("Module name can not be empty");
136
146
  };
137
147
  const validateValue = (value, callback, index) => {
@@ -148,11 +158,16 @@ const FormComponent = (props) => {
148
158
  }
149
159
  if ((0, import_utils.validateCustom)(value) || (0, import_utils.validateSemver)(value) || (0, import_utils.validatePort)(value) || (customValueValidate == null ? void 0 : customValueValidate(value))) {
150
160
  statusSet[index].valueStatus = true;
151
- (0, import_react_dom.flushSync)(() => setFormStatus(statusSet));
152
- return callback();
161
+ setTimeout(() => {
162
+ setFormStatus(statusSet);
163
+ callback();
164
+ }, 0);
165
+ return;
153
166
  }
154
167
  statusSet[index].valueStatus = false;
155
- (0, import_react_dom.flushSync)(() => setFormStatus(statusSet));
168
+ setTimeout(() => {
169
+ setFormStatus(statusSet);
170
+ }, 0);
156
171
  return callback(
157
172
  "The module information format is incorrect, check the format in the upper left corner"
158
173
  );
@@ -172,6 +187,9 @@ const FormComponent = (props) => {
172
187
  const hmrChange = (on) => {
173
188
  onHMRChange(on);
174
189
  };
190
+ const handleSwitchChange = (on) => {
191
+ onClipChange(on);
192
+ };
175
193
  const onKeyChange = (key, index) => __async(void 0, null, function* () {
176
194
  const version = yield getVersion == null ? void 0 : getVersion(key);
177
195
  if (version) {
@@ -180,31 +198,52 @@ const FormComponent = (props) => {
180
198
  setVersionList == null ? void 0 : setVersionList(list);
181
199
  }
182
200
  });
183
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FormList, { field: import_constant.proxyFormField, children: (fields, { add, remove }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
184
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.header, children: [
185
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
186
- import_web_react.Tooltip,
187
- {
188
- content: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: "Example: Customize the remote module address, which should end with 「.json」, for example key: @module-federation/button, value: http://localhost:3000/mf-manifest.json" }),
189
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icon.IconInfoCircle, {})
190
- }
191
- ),
192
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.title, children: "Module Proxy" }),
193
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
194
- import_web_react.Button,
195
- {
196
- icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icon.IconPlus, {}),
197
- shape: "circle",
198
- className: import_index.default.add,
199
- onClick: () => onAdd(add),
200
- "data-set-e2e": "e2eAdd"
201
- }
202
- ),
203
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.status, children: [
204
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Badge, { color: condition.color, className: import_index.default.badge }),
205
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: import_index.default.message, children: condition.message }),
206
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: import_index.default.headerSlot, children: [
201
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FormList, { field: import_constant.proxyFormField, children: (fields, { add, remove }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.wrapper, children: [
202
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.sectionHeader, children: [
203
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.heading, children: [
204
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.titleRow, children: [
205
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
206
+ import_web_react.Tooltip,
207
+ {
208
+ content: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: "Example: Customise the remote module address ending with 「.json」. For instance key: @module-federation/button, value: http://localhost:3000/mf-manifest.json" }),
209
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icon.IconInfoCircle, {})
210
+ }
211
+ ),
212
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: import_index.default.title, children: "Proxy Overrides" }),
213
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
214
+ "span",
215
+ {
216
+ className: import_index.default.statusMessage,
217
+ style: { marginLeft: 8 },
218
+ children: [
219
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Badge, { color: condition.color, className: import_index.default.badge }),
220
+ condition.message
221
+ ]
222
+ }
223
+ )
224
+ ] }),
225
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: import_index.default.subtitle, children: "Point consumers to specific remote bundles or manifests for quicker validation." })
226
+ ] }),
227
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.headerActions, children: [
228
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: import_index.default.hmrArea, children: [
207
229
  props.headerSlot,
230
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
231
+ import_web_react.Switch,
232
+ {
233
+ checked: enableClip,
234
+ checkedText: "Enable Clip",
235
+ uncheckedText: "Disable Clip",
236
+ onChange: handleSwitchChange,
237
+ className: import_index.default.switch
238
+ }
239
+ ),
240
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Tooltip, { content: "After enabling data clipping, snapshot modules and shared information will be removed, affecting preloading logic.", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
241
+ import_icon.IconQuestionCircle,
242
+ {
243
+ style: { marginLeft: 5, cursor: "pointer" }
244
+ }
245
+ ) }),
246
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.divider }),
208
247
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
209
248
  import_web_react.Switch,
210
249
  {
@@ -215,85 +254,127 @@ const FormComponent = (props) => {
215
254
  className: import_index.default.switch
216
255
  }
217
256
  )
218
- ] })
257
+ ] }),
258
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
259
+ import_web_react.Button,
260
+ {
261
+ icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icon.IconPlus, {}),
262
+ shape: "circle",
263
+ className: import_index.default.add,
264
+ onClick: () => onAdd(add),
265
+ "data-set-e2e": "e2eAdd",
266
+ type: "primary"
267
+ }
268
+ )
219
269
  ] })
220
270
  ] }),
221
- fields.length ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: fields.map((item, index) => {
271
+ fields.length ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.rules, children: fields.map((item, index) => {
222
272
  var _a, _b;
223
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
224
- "div",
225
- {
226
- className: import_index.default.container,
227
- "data-set-e2e": "e2eProxyItem",
228
- children: [
229
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
230
- FormItem,
231
- {
232
- field: `${item.field}.checked`,
233
- triggerPropName: "checked",
234
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Checkbox, { className: import_index.default.checkBox })
235
- }
236
- ) }),
237
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.input, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
238
- FormItem,
239
- {
240
- field: `${item.field}.key`,
241
- rules: [
242
- {
243
- validator: (value, cb) => validateKey(value, cb, index)
244
- }
245
- ],
246
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
247
- import_web_react.Select,
248
- {
249
- "data-set-e2e": "e2eProxyKey",
250
- placeholder: "Module Name",
251
- onChange: (key) => onKeyChange(key, index),
252
- allowClear: true,
253
- showSearch: true,
254
- children: formatProducer.map((item2) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Option, { value: item2.value, children: item2.label }, item2.value))
255
- }
256
- )
257
- }
258
- ) }),
259
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.input, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
260
- FormItem,
261
- {
262
- field: `${item.field}.value`,
263
- rules: [
264
- {
265
- validator: (value, cb) => validateValue(value, cb, index)
273
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.ruleCard, children: [
274
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.ruleHeader, children: [
275
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
276
+ FormItem,
277
+ {
278
+ field: `${item.field}.checked`,
279
+ triggerPropName: "checked",
280
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Checkbox, { className: import_index.default.toggle })
281
+ }
282
+ ),
283
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
284
+ import_web_react.Button,
285
+ {
286
+ icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icon.IconDelete, {}),
287
+ shape: "circle",
288
+ status: "danger",
289
+ className: import_index.default.delete,
290
+ "data-set-e2e": "e2eDelete",
291
+ onClick: () => onRemove(remove, index)
292
+ }
293
+ )
294
+ ] }),
295
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.inputs, "data-set-e2e": "e2eProxyItem", children: [
296
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
297
+ FormItem,
298
+ {
299
+ field: `${item.field}.key`,
300
+ rules: [
301
+ {
302
+ validator: (value, cb) => {
303
+ const isValid = Boolean(value);
304
+ if (isValid) {
305
+ cb();
306
+ validateKey(value, () => {
307
+ }, index);
308
+ } else {
309
+ cb("Module name can not be empty");
310
+ validateKey(value, () => {
311
+ }, index);
312
+ }
266
313
  }
267
- ],
268
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
269
- import_web_react.Select,
270
- {
271
- "data-set-e2e": "e2eProxyValue",
272
- placeholder: "Custom Manifest URL",
273
- allowClear: true,
274
- showSearch: true,
275
- allowCreate: true,
276
- children: (_b = (_a = versionList || []) == null ? void 0 : _a[index]) == null ? void 0 : _b.map((version) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Option, { value: version, children: version }, version))
314
+ }
315
+ ],
316
+ className: import_index.default.field,
317
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
318
+ import_web_react.Select,
319
+ {
320
+ "data-set-e2e": "e2eProxyKey",
321
+ placeholder: "Module Name",
322
+ onChange: (key) => onKeyChange(key, index),
323
+ allowClear: true,
324
+ showSearch: true,
325
+ dropdownMenuClassName: import_index.default.dropdown,
326
+ children: formatProducer.map((item2) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Option, { value: item2.value, children: item2.label }, item2.value))
327
+ }
328
+ )
329
+ }
330
+ ),
331
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
332
+ FormItem,
333
+ {
334
+ field: `${item.field}.value`,
335
+ rules: [
336
+ {
337
+ validator: (value, cb) => {
338
+ const isValid = (0, import_utils.validateCustom)(value) || (0, import_utils.validateSemver)(value) || (0, import_utils.validatePort)(value) || (customValueValidate == null ? void 0 : customValueValidate(value));
339
+ if (isValid) {
340
+ cb();
341
+ validateValue(value, () => {
342
+ }, index);
343
+ } else {
344
+ cb(
345
+ "The module information format is incorrect, check the format in the upper left corner"
346
+ );
347
+ validateValue(value, () => {
348
+ }, index);
349
+ }
277
350
  }
278
- )
279
- }
280
- ) }),
281
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
282
- import_web_react.Button,
283
- {
284
- icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icon.IconDelete, {}),
285
- shape: "circle",
286
- status: "danger",
287
- className: import_index.default.delete,
288
- "data-set-e2e": "e2eDelete",
289
- onClick: () => onRemove(remove, index)
290
- }
291
- )
292
- ]
293
- },
294
- item.field
295
- );
296
- }) }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Empty, {})
351
+ }
352
+ ],
353
+ className: import_index.default.field,
354
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
355
+ import_web_react.Select,
356
+ {
357
+ "data-set-e2e": "e2eProxyValue",
358
+ placeholder: "Custom Manifest URL",
359
+ allowClear: true,
360
+ showSearch: true,
361
+ allowCreate: true,
362
+ dropdownMenuClassName: import_index.default.dropdown,
363
+ children: (_b = (_a = versionList || []) == null ? void 0 : _a[index]) == null ? void 0 : _b.map((version) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Option, { value: version, children: version }, version))
364
+ }
365
+ )
366
+ }
367
+ )
368
+ ] })
369
+ ] }, item.field);
370
+ }) }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.emptyWrapper, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
371
+ import_web_react.Empty,
372
+ {
373
+ description: "Add your first override to begin redirecting remotes.",
374
+ className: import_index.default.empty
375
+ }
376
+ ) }),
377
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.footerHint, children: "Changes persist per domain and refresh the inspected tab when valid." })
297
378
  ] }) });
298
379
  };
299
380
  var Form_default = FormComponent;
@@ -22,4 +22,4 @@ __export(index_module_exports, {
22
22
  });
23
23
  module.exports = __toCommonJS(index_module_exports);
24
24
  var import_index_module = require("./index_module.css");
25
- var index_module_default = { "container": "container_20b79", "checkBox": "checkBox_20b79", "input": "input_20b79", "delete": "delete_20b79", "header": "header_20b79", "add": "add_20b79", "title": "title_20b79", "status": "status_20b79", "message": "message_20b79", "switch": "switch_20b79", "headerSlot": "headerSlot_20b79", "badge": "badge_20b79" };
25
+ var index_module_default = { "wrapper": "wrapper_20b79", "sectionHeader": "sectionHeader_20b79", "heading": "heading_20b79", "titleRow": "titleRow_20b79", "title": "title_20b79", "subtitle": "subtitle_20b79", "headerActions": "headerActions_20b79", "add": "add_20b79", "badge": "badge_20b79", "statusMessage": "statusMessage_20b79", "divider": "divider_20b79", "hmrArea": "hmrArea_20b79", "switch": "switch_20b79", "rules": "rules_20b79", "ruleCard": "ruleCard_20b79", "ruleHeader": "ruleHeader_20b79", "toggle": "toggle_20b79", "inputs": "inputs_20b79", "field": "field_20b79", "dropdown": "dropdown_20b79", "delete": "delete_20b79", "emptyWrapper": "emptyWrapper_20b79", "empty": "empty_20b79", "footerHint": "footerHint_20b79" };