@module-federation/devtools 0.22.0 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/dist/es/App.css +13 -0
  2. package/dist/es/App.js +461 -21
  3. package/dist/es/App.module.js +1 -1
  4. package/dist/es/App_module.css +293 -5
  5. package/dist/es/component/DependencyGraph/index.js +204 -0
  6. package/dist/es/component/DependencyGraph/index.module.js +5 -0
  7. package/dist/es/component/DependencyGraph/index_module.css +100 -0
  8. package/dist/es/component/{GraphItem → DependencyGraphItem}/index.js +20 -9
  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 +192 -117
  12. package/dist/es/component/Form/index.module.js +1 -1
  13. package/dist/es/component/Form/index_module.css +176 -25
  14. package/dist/es/component/LanguageSwitch.js +50 -0
  15. package/dist/es/component/Layout/index.js +296 -49
  16. package/dist/es/component/Layout/index.module.js +1 -1
  17. package/dist/es/component/Layout/index_module.css +52 -32
  18. package/dist/es/component/ModuleInfo/index.js +313 -0
  19. package/dist/es/component/ModuleInfo/index.module.js +5 -0
  20. package/dist/es/component/ModuleInfo/index_module.css +184 -0
  21. package/dist/es/component/SharedDepsExplorer/FocusResultDisplay.js +35 -0
  22. package/dist/es/component/SharedDepsExplorer/FocusResultDisplay.module.js +5 -0
  23. package/dist/es/component/SharedDepsExplorer/FocusResultDisplay_module.css +45 -0
  24. package/dist/es/component/SharedDepsExplorer/index.js +495 -0
  25. package/dist/es/component/SharedDepsExplorer/index.module.js +5 -0
  26. package/dist/es/component/SharedDepsExplorer/index_module.css +467 -0
  27. package/dist/es/component/SharedDepsExplorer/share-utils.js +206 -0
  28. package/dist/es/component/ThemeToggle.js +19 -0
  29. package/dist/es/component/ThemeToggle.module.js +5 -0
  30. package/dist/es/component/ThemeToggle_module.css +12 -0
  31. package/dist/es/hooks/useDevtoolsTheme.js +77 -0
  32. package/dist/es/i18n/index.js +506 -0
  33. package/dist/es/template/constant.js +3 -19
  34. package/dist/es/utils/chrome/index.js +91 -38
  35. package/dist/es/utils/chrome/messages.js +6 -0
  36. package/dist/es/utils/chrome/override-remote.js +42 -0
  37. package/dist/es/utils/chrome/post-message-listener.js +2 -1
  38. package/dist/es/utils/chrome/post-message-start.js +10 -2
  39. package/dist/es/utils/chrome/storage.js +6 -1
  40. package/dist/es/utils/sdk/graph.js +25 -4
  41. package/dist/es/utils/sdk/index.js +9 -0
  42. package/dist/es/worker/index.js +168 -1
  43. package/dist/lib/App.css +13 -0
  44. package/dist/lib/App.js +451 -18
  45. package/dist/lib/App.module.js +1 -1
  46. package/dist/lib/App_module.css +293 -5
  47. package/dist/lib/component/DependencyGraph/index.js +226 -0
  48. package/dist/lib/component/{GraphItem → DependencyGraph}/index.module.js +1 -1
  49. package/dist/lib/component/DependencyGraph/index_module.css +100 -0
  50. package/dist/lib/component/{GraphItem → DependencyGraphItem}/index.js +23 -12
  51. package/dist/lib/component/{Graph → DependencyGraphItem}/index.module.js +1 -1
  52. package/dist/lib/component/DependencyGraphItem/index_module.css +95 -0
  53. package/dist/lib/component/Form/index.js +189 -115
  54. package/dist/lib/component/Form/index.module.js +1 -1
  55. package/dist/lib/component/Form/index_module.css +176 -25
  56. package/dist/lib/component/LanguageSwitch.js +80 -0
  57. package/dist/lib/component/Layout/index.js +290 -47
  58. package/dist/lib/component/Layout/index.module.js +1 -1
  59. package/dist/lib/component/Layout/index_module.css +52 -32
  60. package/dist/lib/component/ModuleInfo/index.js +343 -0
  61. package/dist/lib/component/ModuleInfo/index.module.js +25 -0
  62. package/dist/lib/component/ModuleInfo/index_module.css +184 -0
  63. package/dist/lib/component/SharedDepsExplorer/FocusResultDisplay.js +65 -0
  64. package/dist/lib/component/SharedDepsExplorer/FocusResultDisplay.module.js +25 -0
  65. package/dist/lib/component/SharedDepsExplorer/FocusResultDisplay_module.css +45 -0
  66. package/dist/lib/component/SharedDepsExplorer/index.js +502 -0
  67. package/dist/lib/component/SharedDepsExplorer/index.module.js +25 -0
  68. package/dist/lib/component/SharedDepsExplorer/index_module.css +467 -0
  69. package/dist/lib/component/SharedDepsExplorer/share-utils.js +237 -0
  70. package/dist/lib/component/ThemeToggle.js +49 -0
  71. package/dist/lib/component/ThemeToggle.module.js +25 -0
  72. package/dist/lib/component/ThemeToggle_module.css +12 -0
  73. package/dist/lib/hooks/useDevtoolsTheme.js +101 -0
  74. package/dist/lib/i18n/index.js +540 -0
  75. package/dist/lib/template/constant.js +4 -17
  76. package/dist/lib/utils/chrome/index.js +94 -38
  77. package/dist/lib/utils/chrome/messages.js +31 -0
  78. package/dist/lib/utils/chrome/override-remote.js +65 -0
  79. package/dist/lib/utils/chrome/post-message-listener.js +2 -1
  80. package/dist/lib/utils/chrome/post-message-start.js +10 -2
  81. package/dist/lib/utils/chrome/storage.js +5 -0
  82. package/dist/lib/utils/sdk/graph.js +25 -4
  83. package/dist/lib/utils/sdk/index.js +10 -0
  84. package/dist/lib/worker/index.js +156 -1
  85. package/dist/types/src/App.d.ts +2 -1
  86. package/dist/types/src/component/{Graph → DependencyGraph}/index.d.ts +0 -1
  87. package/dist/types/src/component/{GraphItem → DependencyGraphItem}/index.d.ts +0 -1
  88. package/dist/types/src/component/Form/index.d.ts +2 -0
  89. package/dist/types/src/component/LanguageSwitch.d.ts +2 -0
  90. package/dist/types/src/component/Layout/index.d.ts +0 -1
  91. package/dist/types/src/component/ModuleInfo/index.d.ts +8 -0
  92. package/dist/types/src/component/SharedDepsExplorer/FocusResultDisplay.d.ts +15 -0
  93. package/dist/types/src/component/SharedDepsExplorer/index.d.ts +6 -0
  94. package/dist/types/src/component/SharedDepsExplorer/share-utils.d.ts +44 -0
  95. package/dist/types/src/component/ThemeToggle.d.ts +8 -0
  96. package/dist/types/src/hooks/useDevtoolsTheme.d.ts +2 -0
  97. package/dist/types/src/i18n/index.d.ts +5 -0
  98. package/dist/types/src/init.d.ts +0 -1
  99. package/dist/types/src/template/constant.d.ts +2 -5
  100. package/dist/types/src/utils/chrome/index.d.ts +5 -3
  101. package/dist/types/src/utils/chrome/messages.d.ts +2 -0
  102. package/dist/types/src/utils/chrome/override-remote.d.ts +1 -0
  103. package/dist/types/src/utils/chrome/storage.d.ts +5 -4
  104. package/dist/types/src/utils/sdk/graph.d.ts +2 -1
  105. package/dist/types/src/utils/sdk/index.d.ts +1 -0
  106. package/dist/types/src/utils/types/common.d.ts +4 -0
  107. package/dist/types/src/worker/index.d.ts +1 -0
  108. package/package.json +18 -14
  109. package/dist/es/component/Graph/index.js +0 -127
  110. package/dist/es/component/Graph/index.module.js +0 -5
  111. package/dist/es/component/Graph/index_module.css +0 -12
  112. package/dist/es/component/GraphItem/index.module.js +0 -5
  113. package/dist/es/component/GraphItem/index_module.css +0 -61
  114. package/dist/lib/component/Graph/index.js +0 -149
  115. package/dist/lib/component/Graph/index_module.css +0 -12
  116. package/dist/lib/component/GraphItem/index_module.css +0 -61
@@ -0,0 +1,313 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { useMemo } from "react";
3
+ import { Empty, Select, Tag, Table } from "@arco-design/web-react";
4
+ import { useTranslation } from "react-i18next";
5
+ import styles from "./index.module";
6
+ const renderValue = (value) => {
7
+ if (value === void 0 || value === null) {
8
+ return null;
9
+ }
10
+ if (Array.isArray(value)) {
11
+ if (!value.length) {
12
+ return null;
13
+ }
14
+ return /* @__PURE__ */ jsx("div", { className: styles.pillGroup, children: value.map((item, index) => /* @__PURE__ */ jsx("span", { className: styles.pill, children: typeof item === "string" ? item : JSON.stringify(item) }, index)) });
15
+ }
16
+ if (typeof value === "object") {
17
+ if (Object.keys(value).length === 0) {
18
+ return null;
19
+ }
20
+ return /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-3", children: Object.entries(value).map(([key, val]) => /* @__PURE__ */ jsxs(
21
+ "div",
22
+ {
23
+ className: "flex flex-col border-b border-zinc-100 pb-2 last:border-0 last:pb-0",
24
+ children: [
25
+ /* @__PURE__ */ jsx("span", { className: "font-medium text-zinc-700 text-xs mb-1", children: key }),
26
+ /* @__PURE__ */ jsx("div", { className: "text-zinc-600 text-xs break-all font-mono bg-zinc-50 p-2 rounded border border-zinc-100", children: (() => {
27
+ if (Array.isArray(val)) {
28
+ return /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-1", children: val.map((item, idx) => /* @__PURE__ */ jsx(
29
+ "div",
30
+ {
31
+ className: "border-b border-zinc-200 last:border-0 pb-1 last:pb-0",
32
+ children: typeof item === "object" ? JSON.stringify(item) : String(item)
33
+ },
34
+ idx
35
+ )) });
36
+ }
37
+ return typeof val === "object" ? JSON.stringify(val) : String(val);
38
+ })() })
39
+ ]
40
+ },
41
+ key
42
+ )) });
43
+ }
44
+ return /* @__PURE__ */ jsx("span", { className: styles.valueText, children: String(value) });
45
+ };
46
+ const RemotesTable = ({ data }) => {
47
+ const { t } = useTranslation();
48
+ if (!data || Object.keys(data).length === 0) {
49
+ return null;
50
+ }
51
+ const dataSource = Object.entries(data).map(([key, val]) => ({
52
+ key,
53
+ name: key,
54
+ type: val.type || val.remoteType || "-",
55
+ version: val.version || val.matchedVersion || "-",
56
+ scmVersion: val.scmVersion || val.buildVersion || "-"
57
+ }));
58
+ const columns = [
59
+ { title: t("moduleInfo.tables.remotes.name"), dataIndex: "name" },
60
+ { title: t("moduleInfo.tables.remotes.type"), dataIndex: "type" },
61
+ { title: t("moduleInfo.tables.remotes.version"), dataIndex: "version" },
62
+ {
63
+ title: t("moduleInfo.tables.remotes.scmVersion"),
64
+ dataIndex: "scmVersion"
65
+ }
66
+ ];
67
+ return /* @__PURE__ */ jsx(
68
+ Table,
69
+ {
70
+ columns,
71
+ data: dataSource,
72
+ pagination: false,
73
+ border: false,
74
+ rowKey: "key",
75
+ className: "bg-zinc-50 rounded border border-zinc-200"
76
+ }
77
+ );
78
+ };
79
+ const ExposesTable = ({ data }) => {
80
+ const { t } = useTranslation();
81
+ if (!Array.isArray(data) || data.length === 0) {
82
+ return null;
83
+ }
84
+ const dataSource = data.map((item, index) => ({
85
+ key: index,
86
+ name: item.name || item.moduleName || item.expose || "-",
87
+ path: item.path || item.file || "-",
88
+ shared: Array.isArray(item.requires) ? item.requires.join(", ") : item.requires || t("moduleInfo.tables.exposes.noShared")
89
+ }));
90
+ const columns = [
91
+ { title: t("moduleInfo.tables.exposes.moduleName"), dataIndex: "name" },
92
+ { title: t("moduleInfo.tables.exposes.filePath"), dataIndex: "path" },
93
+ {
94
+ title: t("moduleInfo.tables.exposes.sharedDependencies"),
95
+ dataIndex: "shared"
96
+ }
97
+ ];
98
+ return /* @__PURE__ */ jsx(
99
+ Table,
100
+ {
101
+ columns,
102
+ data: dataSource,
103
+ pagination: false,
104
+ border: false,
105
+ rowKey: "key",
106
+ className: "bg-zinc-50 rounded border border-zinc-200"
107
+ }
108
+ );
109
+ };
110
+ const ConsumersTable = ({ data }) => {
111
+ const { t } = useTranslation();
112
+ if (!Array.isArray(data) || data.length === 0) {
113
+ return null;
114
+ }
115
+ const dataSource = data.map((item, index) => ({
116
+ key: index,
117
+ name: item.name || item.consumerName || "-",
118
+ type: item.type || "-",
119
+ version: item.version || "-",
120
+ moduleName: item.moduleName || "-",
121
+ usedIn: Array.isArray(item.usedIn) ? item.usedIn.join(", ") : item.usedIn || "-",
122
+ time: item.time || "-"
123
+ }));
124
+ const columns = [
125
+ { title: t("moduleInfo.tables.consumers.name"), dataIndex: "name" },
126
+ { title: t("moduleInfo.tables.consumers.type"), dataIndex: "type" },
127
+ { title: t("moduleInfo.tables.consumers.version"), dataIndex: "version" },
128
+ {
129
+ title: t("moduleInfo.tables.consumers.moduleName"),
130
+ dataIndex: "moduleName"
131
+ },
132
+ { title: t("moduleInfo.tables.consumers.usedIn"), dataIndex: "usedIn" },
133
+ { title: t("moduleInfo.tables.consumers.time"), dataIndex: "time" }
134
+ ];
135
+ return /* @__PURE__ */ jsx(
136
+ Table,
137
+ {
138
+ columns,
139
+ data: dataSource,
140
+ pagination: false,
141
+ border: false,
142
+ rowKey: "key",
143
+ className: "bg-zinc-50 rounded border border-zinc-200"
144
+ }
145
+ );
146
+ };
147
+ const SharedTable = ({
148
+ data
149
+ }) => {
150
+ const { t } = useTranslation();
151
+ if (!data || Array.isArray(data) && data.length === 0) {
152
+ return null;
153
+ }
154
+ const dataSource = Object.entries(data).map(([key, val]) => {
155
+ var _a, _b, _c;
156
+ return {
157
+ key,
158
+ name: val.sharedName,
159
+ version: val.version || "-",
160
+ requiredVersion: (_a = val.shareConfig) == null ? void 0 : _a.requiredVersion,
161
+ singleton: (_b = val.shareConfig) == null ? void 0 : _b.singleton,
162
+ eager: (_c = val.shareConfig) == null ? void 0 : _c.eager
163
+ };
164
+ });
165
+ const columns = [
166
+ { title: t("moduleInfo.tables.shared.dependencyName"), dataIndex: "name" },
167
+ { title: t("moduleInfo.tables.shared.version"), dataIndex: "version" },
168
+ {
169
+ title: t("moduleInfo.tables.shared.requiredVersion"),
170
+ dataIndex: "requiredVersion"
171
+ },
172
+ { title: t("moduleInfo.tables.shared.singleton"), dataIndex: "singleton" },
173
+ { title: t("moduleInfo.tables.shared.eager"), dataIndex: "eager" }
174
+ ];
175
+ return /* @__PURE__ */ jsx(
176
+ Table,
177
+ {
178
+ columns,
179
+ data: dataSource,
180
+ pagination: false,
181
+ border: false,
182
+ rowKey: "key",
183
+ className: "bg-zinc-50 rounded border border-zinc-200"
184
+ }
185
+ );
186
+ };
187
+ const extractDetailSections = (moduleSnapshot) => {
188
+ if (!moduleSnapshot) {
189
+ return [];
190
+ }
191
+ const sections = [];
192
+ const remoteEntry = moduleSnapshot.remoteEntry || moduleSnapshot.entry || moduleSnapshot.version;
193
+ if (remoteEntry) {
194
+ sections.push({
195
+ key: "remoteEntry",
196
+ value: remoteEntry
197
+ });
198
+ }
199
+ if (moduleSnapshot.version) {
200
+ sections.push({
201
+ key: "version",
202
+ value: moduleSnapshot.version
203
+ });
204
+ }
205
+ if (moduleSnapshot.consumerList) {
206
+ sections.push({
207
+ key: "consumers",
208
+ value: moduleSnapshot.consumerList
209
+ });
210
+ }
211
+ if (moduleSnapshot.modules) {
212
+ sections.push({
213
+ key: "exposes",
214
+ value: moduleSnapshot.modules
215
+ });
216
+ }
217
+ if (moduleSnapshot.remotesInfo) {
218
+ sections.push({
219
+ key: "remotes",
220
+ value: moduleSnapshot.remotesInfo
221
+ });
222
+ }
223
+ if (moduleSnapshot.shared) {
224
+ sections.push({
225
+ key: "shared",
226
+ value: moduleSnapshot.shared
227
+ });
228
+ }
229
+ if (!sections.length) {
230
+ sections.push({
231
+ key: "snapshot",
232
+ value: moduleSnapshot
233
+ });
234
+ }
235
+ return sections;
236
+ };
237
+ const Home = (props) => {
238
+ const { t } = useTranslation();
239
+ const { moduleInfo, selectedModuleId, onSelectModule } = props;
240
+ const moduleEntries = useMemo(
241
+ () => Object.entries(moduleInfo || {}).filter(([key]) => key !== "extendInfos"),
242
+ [moduleInfo]
243
+ );
244
+ const [currentModuleId, currentSnapshot] = useMemo(() => {
245
+ if (!moduleEntries.length) {
246
+ return [null, null];
247
+ }
248
+ const entry = moduleEntries.find(([moduleId]) => moduleId === selectedModuleId) || moduleEntries[0];
249
+ return entry;
250
+ }, [moduleEntries, selectedModuleId]);
251
+ const detailSections = useMemo(
252
+ () => extractDetailSections(currentSnapshot),
253
+ [currentSnapshot]
254
+ );
255
+ if (!moduleEntries.length || !currentModuleId) {
256
+ return /* @__PURE__ */ jsx("div", { className: styles.emptyState, children: /* @__PURE__ */ jsx(Empty, { description: t("moduleInfo.empty.noModuleInfo") }) });
257
+ }
258
+ return /* @__PURE__ */ jsxs("div", { className: styles.home, children: [
259
+ /* @__PURE__ */ jsx(
260
+ Select,
261
+ {
262
+ className: styles.moduleSelect,
263
+ placeholder: t("moduleInfo.selector.placeholder"),
264
+ style: { width: "100%" },
265
+ allowClear: true,
266
+ showSearch: true,
267
+ autoWidth: true,
268
+ onChange: onSelectModule,
269
+ children: moduleEntries.map(([moduleId, snapshot]) => /* @__PURE__ */ jsxs(Select.Option, { value: moduleId, children: [
270
+ snapshot && "remotesInfo" in snapshot && Object.keys(snapshot.remotesInfo).length ? /* @__PURE__ */ jsx(Tag, { color: "pinkpurple", children: t("moduleInfo.selector.consumerTag") }) : /* @__PURE__ */ jsx(Tag, { color: "cyan", children: t("moduleInfo.selector.providerTag") }),
271
+ " ",
272
+ moduleId
273
+ ] }, moduleId))
274
+ }
275
+ ),
276
+ /* @__PURE__ */ jsx("div", { className: styles.moduleSelector, children: /* @__PURE__ */ jsxs("div", { className: styles.moduleDetail, children: [
277
+ /* @__PURE__ */ jsx("div", { className: styles.detailHeader, children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
278
+ /* @__PURE__ */ jsx("span", { className: styles.detailTitle, children: currentModuleId }),
279
+ currentSnapshot && "remotesInfo" in currentSnapshot && Object.keys(currentSnapshot.remotesInfo).length ? /* @__PURE__ */ jsx(Tag, { color: "pinkpurple", children: "Consumer" }) : /* @__PURE__ */ jsx(Tag, { color: "cyan", children: "Provider" })
280
+ ] }) }),
281
+ /* @__PURE__ */ jsx("div", { className: styles.detailBody, children: detailSections.map((section) => {
282
+ let content;
283
+ switch (section.key) {
284
+ case "remotes":
285
+ content = /* @__PURE__ */ jsx(RemotesTable, { data: section.value });
286
+ break;
287
+ case "exposes":
288
+ content = /* @__PURE__ */ jsx(ExposesTable, { data: section.value });
289
+ break;
290
+ case "consumers":
291
+ content = /* @__PURE__ */ jsx(ConsumersTable, { data: section.value });
292
+ break;
293
+ case "shared":
294
+ content = /* @__PURE__ */ jsx(SharedTable, { data: section.value });
295
+ break;
296
+ default:
297
+ content = renderValue(section.value);
298
+ }
299
+ if (!content) {
300
+ return null;
301
+ }
302
+ return /* @__PURE__ */ jsxs("div", { className: styles.detailRow, children: [
303
+ /* @__PURE__ */ jsx("div", { className: styles.detailLabel, children: t(`moduleInfo.detail.${section.key}`) }),
304
+ /* @__PURE__ */ jsx("div", { className: styles.detailValue, children: content })
305
+ ] }, section.key);
306
+ }) })
307
+ ] }) })
308
+ ] });
309
+ };
310
+ var ModuleInfo_default = Home;
311
+ export {
312
+ ModuleInfo_default as default
313
+ };
@@ -0,0 +1,5 @@
1
+ import "./index_module.css";
2
+ var index_module_default = { "home": "home_cde89", "moduleSelector": "moduleSelector_cde89", "moduleList": "moduleList_cde89", "moduleItem": "moduleItem_cde89", "moduleItemActive": "moduleItemActive_cde89", "moduleName": "moduleName_cde89", "moduleDetail": "moduleDetail_cde89", "detailHeader": "detailHeader_cde89", "detailTitle": "detailTitle_cde89", "detailBody": "detailBody_cde89", "detailRow": "detailRow_cde89", "detailLabel": "detailLabel_cde89", "detailValue": "detailValue_cde89", "valueText": "valueText_cde89", "pillGroup": "pillGroup_cde89", "pill": "pill_cde89", "jsonBlock": "jsonBlock_cde89", "emptyState": "emptyState_cde89" };
3
+ export {
4
+ index_module_default as default
5
+ };
@@ -0,0 +1,184 @@
1
+ .home_cde89 {
2
+ display: flex;
3
+ flex-direction: column;
4
+ gap: 20px;
5
+ height: 100%;
6
+ }
7
+
8
+ .moduleSelector_cde89 {
9
+ display: flex;
10
+ gap: clamp(12px, 2vw, 20px);
11
+ flex: 1 1;
12
+ min-height: 0;
13
+ }
14
+
15
+ .moduleList_cde89 {
16
+ width: clamp(220px, 28%, 320px);
17
+ max-width: 40%;
18
+ padding: 12px;
19
+ border-radius: 16px;
20
+ border: 1px solid var(--color-border-1, rgba(96, 165, 250, 0.3));
21
+ background: var(--color-bg-2, rgba(255, 255, 255, 0.9));
22
+ display: flex;
23
+ flex-direction: column;
24
+ gap: 8px;
25
+ overflow-y: auto;
26
+ }
27
+
28
+ .moduleItem_cde89 {
29
+ border: 1px solid transparent;
30
+ border-radius: 12px;
31
+ padding: 10px 12px;
32
+ background: rgba(243, 244, 246, 0.4);
33
+ color: var(--color-text-1, #1f2937);
34
+ font-size: 13px;
35
+ text-align: left;
36
+ cursor: pointer;
37
+ transition: all 0.15s ease;
38
+ }
39
+
40
+ .moduleItem_cde89:hover {
41
+ border-color: rgba(34, 197, 94, 0.5);
42
+ background: rgba(243, 244, 246, 0.6);
43
+ }
44
+
45
+ .moduleItemActive_cde89 {
46
+ border-color: rgba(34, 197, 94, 0.6);
47
+ background: rgba(243, 244, 246, 0.8);
48
+ box-shadow: 0 10px 22px rgba(34, 197, 94, 0.2);
49
+ }
50
+
51
+ .moduleName_cde89 {
52
+ display: block;
53
+ overflow: hidden;
54
+ text-overflow: ellipsis;
55
+ white-space: nowrap;
56
+ }
57
+
58
+ .moduleDetail_cde89 {
59
+ flex: 1 1;
60
+ display: flex;
61
+ flex-direction: column;
62
+ min-height: 0;
63
+ padding: 16px 20px;
64
+ border-radius: 20px;
65
+ border: 1px solid var(--color-border-2, rgba(228, 228, 231, 0.5));
66
+ background: var(--color-bg-1, rgba(255, 255, 255, 0.9));
67
+ }
68
+
69
+ .detailHeader_cde89 {
70
+ display: flex;
71
+ justify-content: space-between;
72
+ align-items: center;
73
+ margin-bottom: 16px;
74
+ }
75
+
76
+ .detailTitle_cde89 {
77
+ font-size: 16px;
78
+ font-weight: 600;
79
+ color: var(--color-text-1, #1f2937);
80
+ word-break: break-word;
81
+ margin-right: 10px;
82
+ }
83
+
84
+ .detailBody_cde89 {
85
+ flex: 1 1;
86
+ overflow-y: auto;
87
+ display: flex;
88
+ flex-direction: column;
89
+ gap: 12px;
90
+ }
91
+
92
+ .detailRow_cde89 {
93
+ display: flex;
94
+ flex-direction: column;
95
+ gap: 6px;
96
+ padding: 12px;
97
+ border-radius: 14px;
98
+ background: rgba(243, 244, 246, 0.4);
99
+ border: 1px solid rgba(228, 228, 231, 0.5);
100
+ }
101
+
102
+ .detailLabel_cde89 {
103
+ font-size: 12px;
104
+ letter-spacing: 0.08em;
105
+ text-transform: uppercase;
106
+ color: var(--color-text-2, #4b5563);
107
+ }
108
+
109
+ .detailValue_cde89 {
110
+ font-size: 13px;
111
+ color: var(--color-text-1, #1f2937);
112
+ }
113
+
114
+ .valueText_cde89 {
115
+ word-break: break-word;
116
+ }
117
+
118
+ .pillGroup_cde89 {
119
+ display: flex;
120
+ flex-wrap: wrap;
121
+ gap: 6px;
122
+ }
123
+
124
+ .pill_cde89 {
125
+ padding: 4px 8px;
126
+ border-radius: 999px;
127
+ background: rgba(243, 244, 246, 0.4);
128
+ border: 1px solid rgba(96, 165, 250, 0.3);
129
+ font-size: 11px;
130
+ color: var(--color-text-1, #1f2937);
131
+ max-width: 100%;
132
+ text-overflow: ellipsis;
133
+ overflow: hidden;
134
+ }
135
+
136
+ .jsonBlock_cde89 {
137
+ margin: 0;
138
+ padding: 12px;
139
+ border-radius: 12px;
140
+ background: rgba(243, 244, 246, 0.4);
141
+ border: 1px solid rgba(96, 165, 250, 0.3);
142
+ font-size: 12px;
143
+ color: var(--color-text-1, #1f2937);
144
+ overflow-x: auto;
145
+ }
146
+
147
+ .emptyState_cde89 {
148
+ flex: 1 1;
149
+ display: flex;
150
+ align-items: center;
151
+ justify-content: center;
152
+ border-radius: 18px;
153
+ border: 1px dashed rgba(96, 165, 250, 0.3);
154
+ background: var(--color-bg-2, rgba(255, 255, 255, 0.9));
155
+ }
156
+
157
+ @media (max-width: 960px) {
158
+ .moduleSelector_cde89 {
159
+ flex-direction: column;
160
+ }
161
+ .moduleList_cde89 {
162
+ width: 100%;
163
+ max-width: none;
164
+ flex-direction: row;
165
+ flex-wrap: nowrap;
166
+ overflow-x: auto;
167
+ padding: 10px;
168
+ }
169
+ .moduleItem_cde89 {
170
+ min-width: 180px;
171
+ }
172
+ .moduleDetail_cde89 {
173
+ width: 100%;
174
+ padding: 14px 18px;
175
+ }
176
+ }
177
+ @media (max-width: 640px) {
178
+ .moduleItem_cde89 {
179
+ min-width: 150px;
180
+ }
181
+ .detailRow_cde89 {
182
+ padding: 10px;
183
+ }
184
+ }
@@ -0,0 +1,35 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { Tag } from "@arco-design/web-react";
3
+ import { useTranslation } from "react-i18next";
4
+ import styles from "./FocusResultDisplay.module";
5
+ const FocusResultDisplay = ({
6
+ focusResult,
7
+ hasData,
8
+ loadedStatusLabel
9
+ }) => {
10
+ const { t } = useTranslation();
11
+ if (focusResult) {
12
+ return /* @__PURE__ */ jsxs("div", { className: styles.container, children: [
13
+ /* @__PURE__ */ jsxs("div", { className: styles.header, children: [
14
+ /* @__PURE__ */ jsxs("span", { className: styles.packageInfo, children: [
15
+ focusResult.packageName,
16
+ "@",
17
+ focusResult.version
18
+ ] }),
19
+ /* @__PURE__ */ jsx(Tag, { size: "small", className: "loaded-status-tag", children: loadedStatusLabel(focusResult.status) })
20
+ ] }),
21
+ /* @__PURE__ */ jsxs("div", { className: styles.providers, children: [
22
+ /* @__PURE__ */ jsx("span", { className: styles.label, children: t("sharedDeps.focusResult.providerLabel") }),
23
+ focusResult.providers.map((p) => /* @__PURE__ */ jsx("span", { className: styles.providerTag, children: p }, p))
24
+ ] })
25
+ ] });
26
+ }
27
+ if (hasData) {
28
+ return /* @__PURE__ */ jsx("p", { className: styles.emptyText, children: t("sharedDeps.messages.noFocusMatch") });
29
+ }
30
+ return /* @__PURE__ */ jsx("p", { className: styles.emptyText, children: t("sharedDeps.messages.noData") });
31
+ };
32
+ var FocusResultDisplay_default = FocusResultDisplay;
33
+ export {
34
+ FocusResultDisplay_default as default
35
+ };
@@ -0,0 +1,5 @@
1
+ import "./FocusResultDisplay_module.css";
2
+ var FocusResultDisplay_module_default = { "container": "container_ee3c9", "header": "header_ee3c9", "packageInfo": "packageInfo_ee3c9", "providers": "providers_ee3c9", "label": "label_ee3c9", "providerTag": "providerTag_ee3c9", "emptyText": "emptyText_ee3c9" };
3
+ export {
4
+ FocusResultDisplay_module_default as default
5
+ };
@@ -0,0 +1,45 @@
1
+ .container_ee3c9 {
2
+ display: flex;
3
+ flex-direction: column;
4
+ gap: 4px;
5
+ }
6
+
7
+ .header_ee3c9 {
8
+ display: flex;
9
+ flex-wrap: wrap;
10
+ align-items: center;
11
+ gap: 8px;
12
+ }
13
+
14
+ .packageInfo_ee3c9 {
15
+ font-family: monospace;
16
+ font-size: 11px;
17
+ }
18
+
19
+ .providers_ee3c9 {
20
+ display: flex;
21
+ flex-wrap: wrap;
22
+ align-items: center;
23
+ gap: 4px;
24
+ font-size: 11px;
25
+ color: var(--color-text-1, #374151); /* text-zinc-700 */
26
+ }
27
+
28
+ .label_ee3c9 {
29
+ color: var(--color-text-2, #71717a); /* text-zinc-500 */
30
+ }
31
+
32
+ .providerTag_ee3c9 {
33
+ border-radius: 4px;
34
+ background-color: var(--color-bg-1, #ffffff);
35
+ padding: 2px 6px;
36
+ font-weight: 500;
37
+ color: var(--color-text-1, #27272a); /* text-zinc-800 */
38
+ box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
39
+ }
40
+
41
+ .emptyText_ee3c9 {
42
+ font-size: 11px;
43
+ color: var(--color-text-2, #71717a); /* text-zinc-500 */
44
+ margin: 0;
45
+ }