@module-federation/devtools 0.0.0-chore-bump-node-22-20260710161714

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 (164) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +11 -0
  3. package/dist/es/App.css +13 -0
  4. package/dist/es/App.js +498 -0
  5. package/dist/es/App.module.js +5 -0
  6. package/dist/es/App_module.css +307 -0
  7. package/dist/es/component/DependencyGraph/index.js +204 -0
  8. package/dist/es/component/DependencyGraph/index.module.js +5 -0
  9. package/dist/es/component/DependencyGraph/index_module.css +100 -0
  10. package/dist/es/component/DependencyGraphItem/index.js +95 -0
  11. package/dist/es/component/DependencyGraphItem/index.module.js +5 -0
  12. package/dist/es/component/DependencyGraphItem/index_module.css +95 -0
  13. package/dist/es/component/Form/index.js +363 -0
  14. package/dist/es/component/Form/index.module.js +5 -0
  15. package/dist/es/component/Form/index_module.css +198 -0
  16. package/dist/es/component/LanguageSwitch.js +50 -0
  17. package/dist/es/component/Layout/index.js +470 -0
  18. package/dist/es/component/Layout/index.module.js +5 -0
  19. package/dist/es/component/Layout/index_module.css +68 -0
  20. package/dist/es/component/LoadingTrace/index.js +944 -0
  21. package/dist/es/component/LoadingTrace/index.module.js +5 -0
  22. package/dist/es/component/LoadingTrace/index_module.css +876 -0
  23. package/dist/es/component/ModuleInfo/index.js +313 -0
  24. package/dist/es/component/ModuleInfo/index.module.js +5 -0
  25. package/dist/es/component/ModuleInfo/index_module.css +184 -0
  26. package/dist/es/component/SharedDepsExplorer/FocusResultDisplay.js +35 -0
  27. package/dist/es/component/SharedDepsExplorer/FocusResultDisplay.module.js +5 -0
  28. package/dist/es/component/SharedDepsExplorer/FocusResultDisplay_module.css +45 -0
  29. package/dist/es/component/SharedDepsExplorer/index.js +636 -0
  30. package/dist/es/component/SharedDepsExplorer/index.module.js +5 -0
  31. package/dist/es/component/SharedDepsExplorer/index_module.css +467 -0
  32. package/dist/es/component/SharedDepsExplorer/share-utils.js +222 -0
  33. package/dist/es/component/ThemeToggle.js +19 -0
  34. package/dist/es/component/ThemeToggle.module.js +5 -0
  35. package/dist/es/component/ThemeToggle_module.css +12 -0
  36. package/dist/es/hooks/useDevtoolsTheme.js +77 -0
  37. package/dist/es/i18n/index.js +688 -0
  38. package/dist/es/init.js +8 -0
  39. package/dist/es/template/constant.js +51 -0
  40. package/dist/es/template/index.js +1 -0
  41. package/dist/es/utils/chrome/fast-refresh.js +342 -0
  42. package/dist/es/utils/chrome/index.js +284 -0
  43. package/dist/es/utils/chrome/messages.js +12 -0
  44. package/dist/es/utils/chrome/observability-plugin.js +93 -0
  45. package/dist/es/utils/chrome/observability-shared.js +99 -0
  46. package/dist/es/utils/chrome/observability.js +208 -0
  47. package/dist/es/utils/chrome/override-remote.js +2 -0
  48. package/dist/es/utils/chrome/post-message-init.js +5 -0
  49. package/dist/es/utils/chrome/post-message-listener.js +39 -0
  50. package/dist/es/utils/chrome/post-message-start.js +10 -0
  51. package/dist/es/utils/chrome/post-message.js +71 -0
  52. package/dist/es/utils/chrome/safe-post-message.js +124 -0
  53. package/dist/es/utils/chrome/snapshot-plugin.js +2 -0
  54. package/dist/es/utils/chrome/storage.js +50 -0
  55. package/dist/es/utils/data/index.js +59 -0
  56. package/dist/es/utils/index.js +4 -0
  57. package/dist/es/utils/sdk/graph.js +190 -0
  58. package/dist/es/utils/sdk/index.js +70 -0
  59. package/dist/es/utils/types/common.js +0 -0
  60. package/dist/es/utils/types/index.js +1 -0
  61. package/dist/es/vendor/basic-proxy-core.js +155 -0
  62. package/dist/es/worker/index.js +187 -0
  63. package/dist/lib/App.css +13 -0
  64. package/dist/lib/App.js +519 -0
  65. package/dist/lib/App.module.js +24 -0
  66. package/dist/lib/App_module.css +307 -0
  67. package/dist/lib/component/DependencyGraph/index.js +225 -0
  68. package/dist/lib/component/DependencyGraph/index.module.js +24 -0
  69. package/dist/lib/component/DependencyGraph/index_module.css +100 -0
  70. package/dist/lib/component/DependencyGraphItem/index.js +124 -0
  71. package/dist/lib/component/DependencyGraphItem/index.module.js +24 -0
  72. package/dist/lib/component/DependencyGraphItem/index_module.css +95 -0
  73. package/dist/lib/component/Form/index.js +372 -0
  74. package/dist/lib/component/Form/index.module.js +24 -0
  75. package/dist/lib/component/Form/index_module.css +198 -0
  76. package/dist/lib/component/LanguageSwitch.js +79 -0
  77. package/dist/lib/component/Layout/index.js +471 -0
  78. package/dist/lib/component/Layout/index.module.js +24 -0
  79. package/dist/lib/component/Layout/index_module.css +68 -0
  80. package/dist/lib/component/LoadingTrace/index.js +953 -0
  81. package/dist/lib/component/LoadingTrace/index.module.js +24 -0
  82. package/dist/lib/component/LoadingTrace/index_module.css +876 -0
  83. package/dist/lib/component/ModuleInfo/index.js +342 -0
  84. package/dist/lib/component/ModuleInfo/index.module.js +24 -0
  85. package/dist/lib/component/ModuleInfo/index_module.css +184 -0
  86. package/dist/lib/component/SharedDepsExplorer/FocusResultDisplay.js +64 -0
  87. package/dist/lib/component/SharedDepsExplorer/FocusResultDisplay.module.js +24 -0
  88. package/dist/lib/component/SharedDepsExplorer/FocusResultDisplay_module.css +45 -0
  89. package/dist/lib/component/SharedDepsExplorer/index.js +638 -0
  90. package/dist/lib/component/SharedDepsExplorer/index.module.js +24 -0
  91. package/dist/lib/component/SharedDepsExplorer/index_module.css +467 -0
  92. package/dist/lib/component/SharedDepsExplorer/share-utils.js +252 -0
  93. package/dist/lib/component/ThemeToggle.js +48 -0
  94. package/dist/lib/component/ThemeToggle.module.js +24 -0
  95. package/dist/lib/component/ThemeToggle_module.css +12 -0
  96. package/dist/lib/hooks/useDevtoolsTheme.js +100 -0
  97. package/dist/lib/i18n/index.js +721 -0
  98. package/dist/lib/init.js +8 -0
  99. package/dist/lib/template/constant.js +84 -0
  100. package/dist/lib/template/index.js +21 -0
  101. package/dist/lib/utils/chrome/fast-refresh.js +329 -0
  102. package/dist/lib/utils/chrome/index.js +321 -0
  103. package/dist/lib/utils/chrome/messages.js +39 -0
  104. package/dist/lib/utils/chrome/observability-plugin.js +85 -0
  105. package/dist/lib/utils/chrome/observability-shared.js +125 -0
  106. package/dist/lib/utils/chrome/observability.js +233 -0
  107. package/dist/lib/utils/chrome/override-remote.js +17 -0
  108. package/dist/lib/utils/chrome/post-message-init.js +5 -0
  109. package/dist/lib/utils/chrome/post-message-listener.js +36 -0
  110. package/dist/lib/utils/chrome/post-message-start.js +10 -0
  111. package/dist/lib/utils/chrome/post-message.js +91 -0
  112. package/dist/lib/utils/chrome/safe-post-message.js +147 -0
  113. package/dist/lib/utils/chrome/snapshot-plugin.js +17 -0
  114. package/dist/lib/utils/chrome/storage.js +71 -0
  115. package/dist/lib/utils/data/index.js +83 -0
  116. package/dist/lib/utils/index.js +27 -0
  117. package/dist/lib/utils/sdk/graph.js +213 -0
  118. package/dist/lib/utils/sdk/index.js +104 -0
  119. package/dist/lib/utils/types/common.js +15 -0
  120. package/dist/lib/utils/types/index.js +21 -0
  121. package/dist/lib/vendor/basic-proxy-core.js +147 -0
  122. package/dist/lib/worker/index.js +175 -0
  123. package/dist/types/src/App.d.ts +7 -0
  124. package/dist/types/src/component/DependencyGraph/index.d.ts +6 -0
  125. package/dist/types/src/component/DependencyGraphItem/index.d.ts +9 -0
  126. package/dist/types/src/component/Form/index.d.ts +21 -0
  127. package/dist/types/src/component/LanguageSwitch.d.ts +2 -0
  128. package/dist/types/src/component/Layout/index.d.ts +15 -0
  129. package/dist/types/src/component/LoadingTrace/index.d.ts +6 -0
  130. package/dist/types/src/component/ModuleInfo/index.d.ts +8 -0
  131. package/dist/types/src/component/SharedDepsExplorer/FocusResultDisplay.d.ts +15 -0
  132. package/dist/types/src/component/SharedDepsExplorer/index.d.ts +6 -0
  133. package/dist/types/src/component/SharedDepsExplorer/share-utils.d.ts +45 -0
  134. package/dist/types/src/component/ThemeToggle.d.ts +8 -0
  135. package/dist/types/src/hooks/useDevtoolsTheme.d.ts +2 -0
  136. package/dist/types/src/i18n/index.d.ts +5 -0
  137. package/dist/types/src/index.d.ts +1 -0
  138. package/dist/types/src/init.d.ts +12 -0
  139. package/dist/types/src/template/constant.d.ts +21 -0
  140. package/dist/types/src/template/index.d.ts +1 -0
  141. package/dist/types/src/utils/chrome/fast-refresh.d.ts +1 -0
  142. package/dist/types/src/utils/chrome/index.d.ts +19 -0
  143. package/dist/types/src/utils/chrome/messages.d.ts +5 -0
  144. package/dist/types/src/utils/chrome/observability-plugin.d.ts +1 -0
  145. package/dist/types/src/utils/chrome/observability-shared.d.ts +41 -0
  146. package/dist/types/src/utils/chrome/observability.d.ts +110 -0
  147. package/dist/types/src/utils/chrome/override-remote.d.ts +1 -0
  148. package/dist/types/src/utils/chrome/post-message-init.d.ts +1 -0
  149. package/dist/types/src/utils/chrome/post-message-listener.d.ts +1 -0
  150. package/dist/types/src/utils/chrome/post-message-start.d.ts +1 -0
  151. package/dist/types/src/utils/chrome/post-message.d.ts +1 -0
  152. package/dist/types/src/utils/chrome/safe-post-message.d.ts +1 -0
  153. package/dist/types/src/utils/chrome/snapshot-plugin.d.ts +1 -0
  154. package/dist/types/src/utils/chrome/storage.d.ts +5 -0
  155. package/dist/types/src/utils/data/index.d.ts +10 -0
  156. package/dist/types/src/utils/index.d.ts +4 -0
  157. package/dist/types/src/utils/sdk/graph.d.ts +46 -0
  158. package/dist/types/src/utils/sdk/index.d.ts +11 -0
  159. package/dist/types/src/utils/types/common.d.ts +22 -0
  160. package/dist/types/src/utils/types/index.d.ts +1 -0
  161. package/dist/types/src/worker/index.d.ts +1 -0
  162. package/dist/types/stories/index.stories.d.ts +9 -0
  163. package/install-deps.bash +23 -0
  164. package/package.json +108 -0
@@ -0,0 +1,5 @@
1
+ import "./index_module.css";
2
+ var index_module_default = { "Wrapper": "Wrapper_d8079", "container": "container_d8079", "group": "group_d8079", "name": "name_d8079", "info": "info_d8079", "expose-container": "expose-container_d8079", "type": "type_d8079", "item": "item_d8079", "message": "message_d8079" };
3
+ export {
4
+ index_module_default as default
5
+ };
@@ -0,0 +1,95 @@
1
+ .Wrapper_d8079 {
2
+ display: flex;
3
+ width: 320px;
4
+ border-radius: 18px;
5
+ border: 1px solid var(--color-border-1, 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%), var(--color-bg-2, rgba(255, 255, 255, 0.9));
9
+ color: var(--color-text-1, #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: var(--color-text-2, #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: var(--color-text-1, #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: var(--color-text-2, #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: var(--color-text-1, #1f2937);
95
+ }
@@ -0,0 +1,363 @@
1
+ var __async = (__this, __arguments, generator) => {
2
+ return new Promise((resolve, reject) => {
3
+ var fulfilled = (value) => {
4
+ try {
5
+ step(generator.next(value));
6
+ } catch (e) {
7
+ reject(e);
8
+ }
9
+ };
10
+ var rejected = (value) => {
11
+ try {
12
+ step(generator.throw(value));
13
+ } catch (e) {
14
+ reject(e);
15
+ }
16
+ };
17
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
18
+ step((generator = generator.apply(__this, __arguments)).next());
19
+ });
20
+ };
21
+ import { jsx, jsxs } from "react/jsx-runtime";
22
+ import { useEffect } from "react";
23
+ import {
24
+ Checkbox,
25
+ Button,
26
+ Empty,
27
+ Tooltip,
28
+ Badge,
29
+ Form,
30
+ Select,
31
+ Switch
32
+ } from "@arco-design/web-react";
33
+ import { useTranslation } from "react-i18next";
34
+ import {
35
+ IconDelete,
36
+ IconPlus,
37
+ IconInfoCircle,
38
+ IconQuestionCircle
39
+ } from "@arco-design/web-react/icon";
40
+ import { defaultDataItem, proxyFormField } from "../../template/constant";
41
+ import {
42
+ validateCustom,
43
+ validateSemver,
44
+ validatePort,
45
+ isObject,
46
+ separateType
47
+ } from "../../utils";
48
+ import styles from "./index.module";
49
+ const FormItem = Form.Item;
50
+ const FormList = Form.List;
51
+ const { Option } = Select;
52
+ const FormComponent = (props) => {
53
+ const {
54
+ form,
55
+ condition,
56
+ formStatus,
57
+ setFormStatus,
58
+ validateForm,
59
+ enableHMR,
60
+ onHMRChange,
61
+ versionList,
62
+ setVersionList,
63
+ getVersion,
64
+ customValueValidate,
65
+ enableClip,
66
+ onClipChange
67
+ } = props;
68
+ const { t } = useTranslation();
69
+ const federation = window.__FEDERATION__ || {
70
+ moduleInfo: {},
71
+ originModuleInfo: {}
72
+ };
73
+ const { moduleInfo } = federation;
74
+ let { producer } = separateType(moduleInfo);
75
+ const filterDupMap = /* @__PURE__ */ new Map();
76
+ producer = producer.filter((tItem) => {
77
+ const [typeOrName, name] = tItem.split(":");
78
+ const marked = filterDupMap.get(name || typeOrName);
79
+ filterDupMap.set(name || typeOrName, true);
80
+ return !marked;
81
+ });
82
+ const formatProducer = producer.map((id) => {
83
+ const hasType = id.includes(":");
84
+ if (hasType) {
85
+ return {
86
+ label: id.split(":")[1],
87
+ value: id
88
+ };
89
+ } else {
90
+ return {
91
+ label: id,
92
+ value: id
93
+ };
94
+ }
95
+ });
96
+ useEffect(() => {
97
+ producer.forEach((target) => __async(void 0, null, function* () {
98
+ const version = yield getVersion == null ? void 0 : getVersion(target);
99
+ const list = [...versionList || []];
100
+ if (version) {
101
+ list.push(version);
102
+ }
103
+ setVersionList == null ? void 0 : setVersionList(list);
104
+ }));
105
+ }, []);
106
+ const getCheckStatus = (index) => {
107
+ const formData = form.getFieldsValue();
108
+ return formData[proxyFormField][index].checked;
109
+ };
110
+ const validateKey = (key, callback, index) => {
111
+ const status = getCheckStatus(index);
112
+ if (!status) {
113
+ return callback();
114
+ }
115
+ const statusSet = [...formStatus];
116
+ if (!isObject(statusSet[index])) {
117
+ statusSet[index] = {
118
+ keyStatus: false,
119
+ valueStatus: false
120
+ };
121
+ }
122
+ if (key) {
123
+ statusSet[index].keyStatus = true;
124
+ setTimeout(() => {
125
+ setFormStatus(statusSet);
126
+ callback();
127
+ }, 0);
128
+ return;
129
+ }
130
+ statusSet[index].keyStatus = false;
131
+ setTimeout(() => {
132
+ setFormStatus(statusSet);
133
+ }, 0);
134
+ return callback(t("form.validation.moduleNameRequired"));
135
+ };
136
+ const validateValue = (value, callback, index) => {
137
+ const status = getCheckStatus(index);
138
+ if (!status) {
139
+ return callback();
140
+ }
141
+ const statusSet = [...formStatus];
142
+ if (!isObject(statusSet[index])) {
143
+ statusSet[index] = {
144
+ keyStatus: false,
145
+ valueStatus: false
146
+ };
147
+ }
148
+ if (validateCustom(value) || validateSemver(value) || validatePort(value) || (customValueValidate == null ? void 0 : customValueValidate(value))) {
149
+ statusSet[index].valueStatus = true;
150
+ setTimeout(() => {
151
+ setFormStatus(statusSet);
152
+ callback();
153
+ }, 0);
154
+ return;
155
+ }
156
+ statusSet[index].valueStatus = false;
157
+ setTimeout(() => {
158
+ setFormStatus(statusSet);
159
+ }, 0);
160
+ return callback(t("form.validation.moduleInfoInvalid"));
161
+ };
162
+ const onAdd = (add) => {
163
+ add(defaultDataItem);
164
+ setVersionList == null ? void 0 : setVersionList([...versionList || [], []]);
165
+ validateForm();
166
+ };
167
+ const onRemove = (remove, index) => {
168
+ if (Array.isArray(versionList)) {
169
+ versionList.splice(index, 1);
170
+ setVersionList == null ? void 0 : setVersionList(versionList);
171
+ }
172
+ remove(index);
173
+ };
174
+ const hmrChange = (on) => {
175
+ onHMRChange(on);
176
+ };
177
+ const handleSwitchChange = (on) => {
178
+ onClipChange(on);
179
+ };
180
+ const onKeyChange = (key, index) => __async(void 0, null, function* () {
181
+ const version = yield getVersion == null ? void 0 : getVersion(key);
182
+ if (version) {
183
+ const list = [...versionList || []];
184
+ list.splice(index, 1, version);
185
+ setVersionList == null ? void 0 : setVersionList(list);
186
+ }
187
+ });
188
+ return /* @__PURE__ */ jsx(FormList, { field: proxyFormField, children: (fields, { add, remove }) => /* @__PURE__ */ jsxs("div", { className: styles.wrapper, children: [
189
+ /* @__PURE__ */ jsxs("div", { className: styles.sectionHeader, children: [
190
+ /* @__PURE__ */ jsxs("div", { className: styles.heading, children: [
191
+ /* @__PURE__ */ jsxs("div", { className: styles.titleRow, children: [
192
+ /* @__PURE__ */ jsx(Tooltip, { content: /* @__PURE__ */ jsx("div", { children: t("form.tooltip.proxyExample") }), children: /* @__PURE__ */ jsx(IconInfoCircle, {}) }),
193
+ /* @__PURE__ */ jsx("span", { className: styles.title, children: t("form.title") }),
194
+ /* @__PURE__ */ jsxs(
195
+ "span",
196
+ {
197
+ className: styles.statusMessage,
198
+ style: { marginLeft: 8 },
199
+ children: [
200
+ /* @__PURE__ */ jsx(Badge, { color: condition.color, className: styles.badge }),
201
+ condition.message
202
+ ]
203
+ }
204
+ )
205
+ ] }),
206
+ /* @__PURE__ */ jsx("span", { className: styles.subtitle, children: t("form.subtitle") })
207
+ ] }),
208
+ /* @__PURE__ */ jsxs("div", { className: styles.headerActions, children: [
209
+ /* @__PURE__ */ jsxs("span", { className: styles.hmrArea, children: [
210
+ props.headerSlot,
211
+ /* @__PURE__ */ jsx(
212
+ Switch,
213
+ {
214
+ checked: enableClip,
215
+ checkedText: t("form.clip.enable"),
216
+ uncheckedText: t("form.clip.disable"),
217
+ onChange: handleSwitchChange,
218
+ className: styles.switch
219
+ }
220
+ ),
221
+ /* @__PURE__ */ jsx(Tooltip, { content: t("form.clip.tooltip"), children: /* @__PURE__ */ jsx(
222
+ IconQuestionCircle,
223
+ {
224
+ style: { marginLeft: 5, cursor: "pointer" }
225
+ }
226
+ ) }),
227
+ /* @__PURE__ */ jsx("div", { className: styles.divider }),
228
+ /* @__PURE__ */ jsx(
229
+ Switch,
230
+ {
231
+ checked: enableHMR === "enable",
232
+ checkedText: t("form.hmr.enable"),
233
+ uncheckedText: t("form.hmr.disable"),
234
+ onChange: hmrChange,
235
+ className: styles.switch
236
+ }
237
+ )
238
+ ] }),
239
+ /* @__PURE__ */ jsx(
240
+ Button,
241
+ {
242
+ icon: /* @__PURE__ */ jsx(IconPlus, {}),
243
+ shape: "circle",
244
+ className: styles.add,
245
+ onClick: () => onAdd(add),
246
+ "data-set-e2e": "e2eAdd"
247
+ }
248
+ )
249
+ ] })
250
+ ] }),
251
+ fields.length ? /* @__PURE__ */ jsx("div", { className: styles.rules, children: fields.map((item, index) => {
252
+ var _a, _b;
253
+ return /* @__PURE__ */ jsxs("div", { className: styles.ruleCard, children: [
254
+ /* @__PURE__ */ jsxs("div", { className: styles.ruleHeader, children: [
255
+ /* @__PURE__ */ jsx(
256
+ FormItem,
257
+ {
258
+ field: `${item.field}.checked`,
259
+ triggerPropName: "checked",
260
+ children: /* @__PURE__ */ jsx(Checkbox, { className: styles.toggle })
261
+ }
262
+ ),
263
+ /* @__PURE__ */ jsx(
264
+ Button,
265
+ {
266
+ icon: /* @__PURE__ */ jsx(IconDelete, {}),
267
+ shape: "circle",
268
+ status: "danger",
269
+ className: styles.delete,
270
+ "data-set-e2e": "e2eDelete",
271
+ onClick: () => onRemove(remove, index)
272
+ }
273
+ )
274
+ ] }),
275
+ /* @__PURE__ */ jsxs("div", { className: styles.inputs, "data-set-e2e": "e2eProxyItem", children: [
276
+ /* @__PURE__ */ jsx(
277
+ FormItem,
278
+ {
279
+ field: `${item.field}.key`,
280
+ rules: [
281
+ {
282
+ validator: (value, cb) => {
283
+ const isValid = Boolean(value);
284
+ if (isValid) {
285
+ cb();
286
+ validateKey(value, () => {
287
+ }, index);
288
+ } else {
289
+ cb(t("form.validation.moduleNameRequired"));
290
+ validateKey(value, () => {
291
+ }, index);
292
+ }
293
+ }
294
+ }
295
+ ],
296
+ className: styles.field,
297
+ children: /* @__PURE__ */ jsx(
298
+ Select,
299
+ {
300
+ "data-set-e2e": "e2eProxyKey",
301
+ placeholder: t("form.fields.moduleName.placeholder"),
302
+ onChange: (key) => onKeyChange(key, index),
303
+ allowClear: true,
304
+ showSearch: true,
305
+ dropdownMenuClassName: styles.dropdown,
306
+ children: formatProducer.map((option) => /* @__PURE__ */ jsx(Option, { value: option.value, children: option.label }, option.value))
307
+ }
308
+ )
309
+ }
310
+ ),
311
+ /* @__PURE__ */ jsx(
312
+ FormItem,
313
+ {
314
+ field: `${item.field}.value`,
315
+ rules: [
316
+ {
317
+ validator: (value, cb) => {
318
+ const isValid = validateCustom(value) || validateSemver(value) || validatePort(value) || (customValueValidate == null ? void 0 : customValueValidate(value));
319
+ if (isValid) {
320
+ cb();
321
+ validateValue(value, () => {
322
+ }, index);
323
+ } else {
324
+ cb(t("form.validation.moduleInfoInvalid"));
325
+ validateValue(value, () => {
326
+ }, index);
327
+ }
328
+ }
329
+ }
330
+ ],
331
+ className: styles.field,
332
+ children: /* @__PURE__ */ jsx(
333
+ Select,
334
+ {
335
+ "data-set-e2e": "e2eProxyValue",
336
+ placeholder: t(
337
+ "form.fields.customManifest.placeholder"
338
+ ),
339
+ allowClear: true,
340
+ showSearch: true,
341
+ allowCreate: true,
342
+ dropdownMenuClassName: styles.dropdown,
343
+ children: (_b = (_a = versionList || []) == null ? void 0 : _a[index]) == null ? void 0 : _b.map((version) => /* @__PURE__ */ jsx(Option, { value: version, children: version }, version))
344
+ }
345
+ )
346
+ }
347
+ )
348
+ ] })
349
+ ] }, item.field);
350
+ }) }) : /* @__PURE__ */ jsx("div", { className: styles.emptyWrapper, children: /* @__PURE__ */ jsx(
351
+ Empty,
352
+ {
353
+ description: t("form.empty.description"),
354
+ className: styles.empty
355
+ }
356
+ ) }),
357
+ /* @__PURE__ */ jsx("div", { className: styles.footerHint, children: t("form.footer.hint") })
358
+ ] }) });
359
+ };
360
+ var Form_default = FormComponent;
361
+ export {
362
+ Form_default as default
363
+ };
@@ -0,0 +1,5 @@
1
+ import "./index_module.css";
2
+ 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", "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" };
3
+ export {
4
+ index_module_default as default
5
+ };
@@ -0,0 +1,198 @@
1
+ .wrapper_20b79 {
2
+ display: flex;
3
+ flex-direction: column;
4
+ gap: 18px;
5
+ color: var(--color-text-1, #1f2937);
6
+ }
7
+
8
+ .sectionHeader_20b79 {
9
+ display: flex;
10
+ align-items: center;
11
+ justify-content: space-between;
12
+ gap: 18px;
13
+ padding: 12px 16px;
14
+ background: rgba(228, 228, 231, 0.1);
15
+ border: 1px solid rgba(228, 228, 231, 0.5);
16
+ }
17
+
18
+ .heading_20b79 {
19
+ display: flex;
20
+ flex-direction: column;
21
+ gap: 6px;
22
+ flex: 1 1;
23
+ }
24
+
25
+ .titleRow_20b79 {
26
+ display: flex;
27
+ align-items: center;
28
+ gap: 10px;
29
+ font-size: 16px;
30
+ font-weight: 600;
31
+ color: var(--color-text-1, #1f2937);
32
+ }
33
+ .titleRow_20b79 .arco-icon {
34
+ color: rgba(23, 75, 180, 0.9);
35
+ font-size: 18px;
36
+ }
37
+
38
+ .title_20b79 {
39
+ letter-spacing: 0.02em;
40
+ }
41
+
42
+ .subtitle_20b79 {
43
+ font-size: 12px;
44
+ color: var(--color-text-2, #4b5563);
45
+ line-height: 1.5;
46
+ }
47
+
48
+ .headerActions_20b79 {
49
+ display: flex;
50
+ align-items: center;
51
+ gap: 12px;
52
+ flex-wrap: wrap;
53
+ }
54
+
55
+ .badge_20b79 {
56
+ transform: scale(1.4);
57
+ margin-right: 6px;
58
+ }
59
+
60
+ .statusMessage_20b79 {
61
+ font-size: 12px;
62
+ color: var(--color-text-2, #4b5563);
63
+ max-width: 260px;
64
+ line-height: 1.4;
65
+ }
66
+
67
+ .divider_20b79 {
68
+ width: 1px;
69
+ height: 1px;
70
+ background: rgba(96, 165, 250, 0.3);
71
+ }
72
+
73
+ .hmrArea_20b79 {
74
+ display: flex;
75
+ align-items: center;
76
+ gap: 8px;
77
+ font-size: 12px;
78
+ color: var(--color-text-2, #4b5563);
79
+ }
80
+
81
+ .switch_20b79 .arco-switch {
82
+ background: rgba(243, 244, 246, var(--form-control-alpha, 0.9));
83
+ border-color: rgba(96, 165, 250, 0.35);
84
+ color: var(--color-text-2, #4b5563);
85
+ }
86
+ .switch_20b79 .arco-switch-checked {
87
+ background: rgba(243, 244, 246, var(--form-control-alpha, 0.9));
88
+ border-color: rgba(96, 165, 250, 0.35);
89
+ }
90
+
91
+ .rules_20b79 {
92
+ display: flex;
93
+ flex-direction: column;
94
+ gap: 16px;
95
+ }
96
+
97
+ .ruleCard_20b79 {
98
+ display: flex;
99
+ flex-direction: column;
100
+ gap: 14px;
101
+ padding: 18px;
102
+ border-radius: 18px;
103
+ border: 1px solid rgba(228, 228, 231, 0.5);
104
+ background: var(--color-bg-1, rgba(255, 255, 255, 0.9));
105
+ box-shadow: 0 15px 32px rgba(8, 11, 25, 0.45);
106
+ }
107
+
108
+ .ruleHeader_20b79 {
109
+ display: flex;
110
+ align-items: center;
111
+ justify-content: space-between;
112
+ }
113
+
114
+ .toggle_20b79 .arco-checkbox {
115
+ transform: scale(1.4);
116
+ }
117
+ .toggle_20b79 .arco-checkbox-icon {
118
+ border-radius: 6px;
119
+ border-color: rgba(228, 228, 231, 0.5);
120
+ background: rgba(243, 244, 246, var(--form-control-alpha, 0.1));
121
+ }
122
+ .toggle_20b79 .arco-checkbox-checked .arco-checkbox-icon {
123
+ background: rgba(243, 244, 246, var(--form-control-alpha, 0.1));
124
+ border-color: rgba(228, 228, 231, 0.5);
125
+ }
126
+
127
+ .inputs_20b79 {
128
+ display: flex;
129
+ flex-direction: column;
130
+ gap: 12px;
131
+ }
132
+
133
+ @media (min-width: 520px) {
134
+ .inputs_20b79 {
135
+ flex-direction: row;
136
+ }
137
+ }
138
+ .field_20b79 {
139
+ flex: 1 1;
140
+ }
141
+ .field_20b79 .arco-form-item-content {
142
+ width: 100%;
143
+ }
144
+ .field_20b79 .arco-select-view {
145
+ background: rgba(243, 244, 246, var(--form-control-alpha, 0.1));
146
+ border: 1px solid rgba(228, 228, 231, 0.5);
147
+ border-radius: 14px;
148
+ color: var(--color-text-1, #1f2937);
149
+ min-height: 42px;
150
+ padding: 6px 12px;
151
+ }
152
+ .field_20b79 .arco-select-view-input {
153
+ color: var(--color-text-2, #4b5563);
154
+ }
155
+ .field_20b79 .arco-select-view-placeholder {
156
+ color: var(--color-text-2, #4b5563);
157
+ }
158
+
159
+ .dropdown_20b79 {
160
+ background: var(--color-bg-1, rgba(255, 255, 255, 0.9));
161
+ border: 1px solid rgba(228, 228, 231, 0.5);
162
+ box-shadow: 0 16px 30px rgba(8, 11, 25, 0.45);
163
+ }
164
+ .dropdown_20b79 .arco-select-option {
165
+ color: var(--color-text-2, #4b5563);
166
+ }
167
+ .dropdown_20b79 .arco-select-option:hover,
168
+ .dropdown_20b79 .arco-select-option.arco-select-option-selected {
169
+ background: rgba(243, 244, 246, var(--form-control-alpha, 0.1));
170
+ }
171
+
172
+ .delete_20b79 {
173
+ box-shadow: 0 8px 16px rgba(248, 113, 113, 0.18);
174
+ }
175
+
176
+ .emptyWrapper_20b79 {
177
+ border-radius: 16px;
178
+ border: 1px dashed rgba(228, 228, 231, 0.5);
179
+ padding: 28px 16px;
180
+ background: var(--color-bg-1, rgba(255, 255, 255, 0.9));
181
+ display: flex;
182
+ justify-content: center;
183
+ }
184
+
185
+ .empty_20b79 .arco-empty-description {
186
+ color: var(--color-text-2, #4b5563);
187
+ }
188
+
189
+ .footerHint_20b79 {
190
+ font-size: 11px;
191
+ color: var(--color-text-2, #4b5563);
192
+ text-align: right;
193
+ letter-spacing: 0.04em;
194
+ text-transform: uppercase;
195
+ align-items: center;
196
+ justify-content: center;
197
+ display: flex;
198
+ }