@module-federation/devtools 2.7.0 → 2.8.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 (75) hide show
  1. package/dist/types/App.css +13 -0
  2. package/dist/types/App.js +519 -0
  3. package/dist/types/App.module.js +24 -0
  4. package/dist/types/App_module.css +307 -0
  5. package/dist/types/component/DependencyGraph/index.js +225 -0
  6. package/dist/types/component/DependencyGraph/index.module.js +24 -0
  7. package/dist/types/component/DependencyGraph/index_module.css +100 -0
  8. package/dist/types/component/DependencyGraphItem/index.js +124 -0
  9. package/dist/types/component/DependencyGraphItem/index.module.js +24 -0
  10. package/dist/types/component/DependencyGraphItem/index_module.css +95 -0
  11. package/dist/types/component/Form/index.js +372 -0
  12. package/dist/types/component/Form/index.module.js +24 -0
  13. package/dist/types/component/Form/index_module.css +198 -0
  14. package/dist/types/component/LanguageSwitch.js +79 -0
  15. package/dist/types/component/Layout/index.js +471 -0
  16. package/dist/types/component/Layout/index.module.js +24 -0
  17. package/dist/types/component/Layout/index_module.css +68 -0
  18. package/dist/types/component/LoadingTrace/index.js +953 -0
  19. package/dist/types/component/LoadingTrace/index.module.js +24 -0
  20. package/dist/types/component/LoadingTrace/index_module.css +876 -0
  21. package/dist/types/component/ModuleInfo/index.js +342 -0
  22. package/dist/types/component/ModuleInfo/index.module.js +24 -0
  23. package/dist/types/component/ModuleInfo/index_module.css +184 -0
  24. package/dist/types/component/SharedDepsExplorer/FocusResultDisplay.js +64 -0
  25. package/dist/types/component/SharedDepsExplorer/FocusResultDisplay.module.js +24 -0
  26. package/dist/types/component/SharedDepsExplorer/FocusResultDisplay_module.css +45 -0
  27. package/dist/types/component/SharedDepsExplorer/index.js +638 -0
  28. package/dist/types/component/SharedDepsExplorer/index.module.js +24 -0
  29. package/dist/types/component/SharedDepsExplorer/index_module.css +467 -0
  30. package/dist/types/component/SharedDepsExplorer/share-utils.js +252 -0
  31. package/dist/types/component/ThemeToggle.js +48 -0
  32. package/dist/types/component/ThemeToggle.module.js +24 -0
  33. package/dist/types/component/ThemeToggle_module.css +12 -0
  34. package/dist/types/hooks/useDevtoolsTheme.js +100 -0
  35. package/dist/types/i18n/index.js +721 -0
  36. package/dist/types/init.js +8 -0
  37. package/dist/types/src/App.d.ts +1 -1
  38. package/dist/types/src/component/DependencyGraph/index.d.ts +1 -1
  39. package/dist/types/src/component/DependencyGraphItem/index.d.ts +1 -1
  40. package/dist/types/src/component/Form/index.d.ts +1 -1
  41. package/dist/types/src/component/LanguageSwitch.d.ts +1 -1
  42. package/dist/types/src/component/Layout/index.d.ts +1 -1
  43. package/dist/types/src/component/LoadingTrace/index.d.ts +1 -1
  44. package/dist/types/src/component/ModuleInfo/index.d.ts +1 -1
  45. package/dist/types/src/component/SharedDepsExplorer/index.d.ts +1 -1
  46. package/dist/types/src/i18n/index.d.ts +1 -1
  47. package/dist/types/src/template/constant.d.ts +1 -1
  48. package/dist/types/src/utils/chrome/observability.d.ts +1 -1
  49. package/dist/types/src/utils/data/index.d.ts +1 -1
  50. package/dist/types/stories/index.stories.d.ts +2 -1
  51. package/dist/types/template/constant.js +84 -0
  52. package/dist/types/template/index.js +21 -0
  53. package/dist/types/utils/chrome/fast-refresh.js +329 -0
  54. package/dist/types/utils/chrome/index.js +321 -0
  55. package/dist/types/utils/chrome/messages.js +39 -0
  56. package/dist/types/utils/chrome/observability-plugin.js +85 -0
  57. package/dist/types/utils/chrome/observability-shared.js +125 -0
  58. package/dist/types/utils/chrome/observability.js +233 -0
  59. package/dist/types/utils/chrome/override-remote.js +17 -0
  60. package/dist/types/utils/chrome/post-message-init.js +5 -0
  61. package/dist/types/utils/chrome/post-message-listener.js +36 -0
  62. package/dist/types/utils/chrome/post-message-start.js +10 -0
  63. package/dist/types/utils/chrome/post-message.js +91 -0
  64. package/dist/types/utils/chrome/safe-post-message.js +147 -0
  65. package/dist/types/utils/chrome/snapshot-plugin.js +17 -0
  66. package/dist/types/utils/chrome/storage.js +71 -0
  67. package/dist/types/utils/data/index.js +83 -0
  68. package/dist/types/utils/index.js +27 -0
  69. package/dist/types/utils/sdk/graph.js +213 -0
  70. package/dist/types/utils/sdk/index.js +104 -0
  71. package/dist/types/utils/types/common.js +15 -0
  72. package/dist/types/utils/types/index.js +21 -0
  73. package/dist/types/vendor/basic-proxy-core.js +147 -0
  74. package/dist/types/worker/index.js +175 -0
  75. package/package.json +6 -6
@@ -0,0 +1,342 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+ var ModuleInfo_exports = {};
29
+ __export(ModuleInfo_exports, {
30
+ default: () => ModuleInfo_default
31
+ });
32
+ module.exports = __toCommonJS(ModuleInfo_exports);
33
+ var import_jsx_runtime = require("react/jsx-runtime");
34
+ var import_react = require("react");
35
+ var import_web_react = require("@arco-design/web-react");
36
+ var import_react_i18next = require("react-i18next");
37
+ var import_index = __toESM(require("./index.module"));
38
+ const renderValue = (value) => {
39
+ if (value === void 0 || value === null) {
40
+ return null;
41
+ }
42
+ if (Array.isArray(value)) {
43
+ if (!value.length) {
44
+ return null;
45
+ }
46
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.pillGroup, children: value.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: import_index.default.pill, children: typeof item === "string" ? item : JSON.stringify(item) }, index)) });
47
+ }
48
+ if (typeof value === "object") {
49
+ if (Object.keys(value).length === 0) {
50
+ return null;
51
+ }
52
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex flex-col gap-3", children: Object.entries(value).map(([key, val]) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
53
+ "div",
54
+ {
55
+ className: "flex flex-col border-b border-zinc-100 pb-2 last:border-0 last:pb-0",
56
+ children: [
57
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "font-medium text-zinc-700 text-xs mb-1", children: key }),
58
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "text-zinc-600 text-xs break-all font-mono bg-zinc-50 p-2 rounded border border-zinc-100", children: (() => {
59
+ if (Array.isArray(val)) {
60
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex flex-col gap-1", children: val.map((item, idx) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
61
+ "div",
62
+ {
63
+ className: "border-b border-zinc-200 last:border-0 pb-1 last:pb-0",
64
+ children: typeof item === "object" ? JSON.stringify(item) : String(item)
65
+ },
66
+ idx
67
+ )) });
68
+ }
69
+ return typeof val === "object" ? JSON.stringify(val) : String(val);
70
+ })() })
71
+ ]
72
+ },
73
+ key
74
+ )) });
75
+ }
76
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: import_index.default.valueText, children: String(value) });
77
+ };
78
+ const RemotesTable = ({ data }) => {
79
+ const { t } = (0, import_react_i18next.useTranslation)();
80
+ if (!data || Object.keys(data).length === 0) {
81
+ return null;
82
+ }
83
+ const dataSource = Object.entries(data).map(([key, val]) => ({
84
+ key,
85
+ name: key,
86
+ type: val.type || val.remoteType || "-",
87
+ version: val.version || val.matchedVersion || "-",
88
+ scmVersion: val.scmVersion || val.buildVersion || "-"
89
+ }));
90
+ const columns = [
91
+ { title: t("moduleInfo.tables.remotes.name"), dataIndex: "name" },
92
+ { title: t("moduleInfo.tables.remotes.type"), dataIndex: "type" },
93
+ { title: t("moduleInfo.tables.remotes.version"), dataIndex: "version" },
94
+ {
95
+ title: t("moduleInfo.tables.remotes.scmVersion"),
96
+ dataIndex: "scmVersion"
97
+ }
98
+ ];
99
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
100
+ import_web_react.Table,
101
+ {
102
+ columns,
103
+ data: dataSource,
104
+ pagination: false,
105
+ border: false,
106
+ rowKey: "key",
107
+ className: "bg-zinc-50 rounded border border-zinc-200"
108
+ }
109
+ );
110
+ };
111
+ const ExposesTable = ({ data }) => {
112
+ const { t } = (0, import_react_i18next.useTranslation)();
113
+ if (!Array.isArray(data) || data.length === 0) {
114
+ return null;
115
+ }
116
+ const dataSource = data.map((item, index) => ({
117
+ key: index,
118
+ name: item.name || item.moduleName || item.expose || "-",
119
+ path: item.path || item.file || "-",
120
+ shared: Array.isArray(item.requires) ? item.requires.join(", ") : item.requires || t("moduleInfo.tables.exposes.noShared")
121
+ }));
122
+ const columns = [
123
+ { title: t("moduleInfo.tables.exposes.moduleName"), dataIndex: "name" },
124
+ { title: t("moduleInfo.tables.exposes.filePath"), dataIndex: "path" },
125
+ {
126
+ title: t("moduleInfo.tables.exposes.sharedDependencies"),
127
+ dataIndex: "shared"
128
+ }
129
+ ];
130
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
131
+ import_web_react.Table,
132
+ {
133
+ columns,
134
+ data: dataSource,
135
+ pagination: false,
136
+ border: false,
137
+ rowKey: "key",
138
+ className: "bg-zinc-50 rounded border border-zinc-200"
139
+ }
140
+ );
141
+ };
142
+ const ConsumersTable = ({ data }) => {
143
+ const { t } = (0, import_react_i18next.useTranslation)();
144
+ if (!Array.isArray(data) || data.length === 0) {
145
+ return null;
146
+ }
147
+ const dataSource = data.map((item, index) => ({
148
+ key: index,
149
+ name: item.name || item.consumerName || "-",
150
+ type: item.type || "-",
151
+ version: item.version || "-",
152
+ moduleName: item.moduleName || "-",
153
+ usedIn: Array.isArray(item.usedIn) ? item.usedIn.join(", ") : item.usedIn || "-",
154
+ time: item.time || "-"
155
+ }));
156
+ const columns = [
157
+ { title: t("moduleInfo.tables.consumers.name"), dataIndex: "name" },
158
+ { title: t("moduleInfo.tables.consumers.type"), dataIndex: "type" },
159
+ { title: t("moduleInfo.tables.consumers.version"), dataIndex: "version" },
160
+ {
161
+ title: t("moduleInfo.tables.consumers.moduleName"),
162
+ dataIndex: "moduleName"
163
+ },
164
+ { title: t("moduleInfo.tables.consumers.usedIn"), dataIndex: "usedIn" },
165
+ { title: t("moduleInfo.tables.consumers.time"), dataIndex: "time" }
166
+ ];
167
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
168
+ import_web_react.Table,
169
+ {
170
+ columns,
171
+ data: dataSource,
172
+ pagination: false,
173
+ border: false,
174
+ rowKey: "key",
175
+ className: "bg-zinc-50 rounded border border-zinc-200"
176
+ }
177
+ );
178
+ };
179
+ const SharedTable = ({
180
+ data
181
+ }) => {
182
+ const { t } = (0, import_react_i18next.useTranslation)();
183
+ if (!data || Array.isArray(data) && data.length === 0) {
184
+ return null;
185
+ }
186
+ const dataSource = Object.entries(data).map(([key, val]) => {
187
+ var _a, _b, _c;
188
+ return {
189
+ key,
190
+ name: val.sharedName,
191
+ version: val.version || "-",
192
+ requiredVersion: (_a = val.shareConfig) == null ? void 0 : _a.requiredVersion,
193
+ singleton: (_b = val.shareConfig) == null ? void 0 : _b.singleton,
194
+ eager: (_c = val.shareConfig) == null ? void 0 : _c.eager
195
+ };
196
+ });
197
+ const columns = [
198
+ { title: t("moduleInfo.tables.shared.dependencyName"), dataIndex: "name" },
199
+ { title: t("moduleInfo.tables.shared.version"), dataIndex: "version" },
200
+ {
201
+ title: t("moduleInfo.tables.shared.requiredVersion"),
202
+ dataIndex: "requiredVersion"
203
+ },
204
+ { title: t("moduleInfo.tables.shared.singleton"), dataIndex: "singleton" },
205
+ { title: t("moduleInfo.tables.shared.eager"), dataIndex: "eager" }
206
+ ];
207
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
208
+ import_web_react.Table,
209
+ {
210
+ columns,
211
+ data: dataSource,
212
+ pagination: false,
213
+ border: false,
214
+ rowKey: "key",
215
+ className: "bg-zinc-50 rounded border border-zinc-200"
216
+ }
217
+ );
218
+ };
219
+ const extractDetailSections = (moduleSnapshot) => {
220
+ if (!moduleSnapshot) {
221
+ return [];
222
+ }
223
+ const sections = [];
224
+ const remoteEntry = moduleSnapshot.remoteEntry || moduleSnapshot.entry || moduleSnapshot.version;
225
+ if (remoteEntry) {
226
+ sections.push({
227
+ key: "remoteEntry",
228
+ value: remoteEntry
229
+ });
230
+ }
231
+ if (moduleSnapshot.version) {
232
+ sections.push({
233
+ key: "version",
234
+ value: moduleSnapshot.version
235
+ });
236
+ }
237
+ if (moduleSnapshot.consumerList) {
238
+ sections.push({
239
+ key: "consumers",
240
+ value: moduleSnapshot.consumerList
241
+ });
242
+ }
243
+ if (moduleSnapshot.modules) {
244
+ sections.push({
245
+ key: "exposes",
246
+ value: moduleSnapshot.modules
247
+ });
248
+ }
249
+ if (moduleSnapshot.remotesInfo) {
250
+ sections.push({
251
+ key: "remotes",
252
+ value: moduleSnapshot.remotesInfo
253
+ });
254
+ }
255
+ if (moduleSnapshot.shared) {
256
+ sections.push({
257
+ key: "shared",
258
+ value: moduleSnapshot.shared
259
+ });
260
+ }
261
+ if (!sections.length) {
262
+ sections.push({
263
+ key: "snapshot",
264
+ value: moduleSnapshot
265
+ });
266
+ }
267
+ return sections;
268
+ };
269
+ const Home = (props) => {
270
+ const { t } = (0, import_react_i18next.useTranslation)();
271
+ const { moduleInfo, selectedModuleId, onSelectModule } = props;
272
+ const moduleEntries = (0, import_react.useMemo)(
273
+ () => Object.entries(moduleInfo || {}).filter(([key]) => key !== "extendInfos"),
274
+ [moduleInfo]
275
+ );
276
+ const [currentModuleId, currentSnapshot] = (0, import_react.useMemo)(() => {
277
+ if (!moduleEntries.length) {
278
+ return [null, null];
279
+ }
280
+ const entry = moduleEntries.find(([moduleId]) => moduleId === selectedModuleId) || moduleEntries[0];
281
+ return entry;
282
+ }, [moduleEntries, selectedModuleId]);
283
+ const detailSections = (0, import_react.useMemo)(
284
+ () => extractDetailSections(currentSnapshot),
285
+ [currentSnapshot]
286
+ );
287
+ if (!moduleEntries.length || !currentModuleId) {
288
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.emptyState, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Empty, { description: t("moduleInfo.empty.noModuleInfo") }) });
289
+ }
290
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.home, children: [
291
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
292
+ import_web_react.Select,
293
+ {
294
+ className: import_index.default.moduleSelect,
295
+ placeholder: t("moduleInfo.selector.placeholder"),
296
+ style: { width: "100%" },
297
+ allowClear: true,
298
+ showSearch: true,
299
+ autoWidth: true,
300
+ onChange: onSelectModule,
301
+ children: moduleEntries.map(([moduleId, snapshot]) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_web_react.Select.Option, { value: moduleId, children: [
302
+ snapshot && "remotesInfo" in snapshot && Object.keys(snapshot.remotesInfo).length ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Tag, { color: "pinkpurple", children: t("moduleInfo.selector.consumerTag") }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Tag, { color: "cyan", children: t("moduleInfo.selector.providerTag") }),
303
+ " ",
304
+ moduleId
305
+ ] }, moduleId))
306
+ }
307
+ ),
308
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.moduleSelector, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.moduleDetail, children: [
309
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.detailHeader, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2", children: [
310
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: import_index.default.detailTitle, children: currentModuleId }),
311
+ currentSnapshot && "remotesInfo" in currentSnapshot && Object.keys(currentSnapshot.remotesInfo).length ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Tag, { color: "pinkpurple", children: "Consumer" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Tag, { color: "cyan", children: "Provider" })
312
+ ] }) }),
313
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.detailBody, children: detailSections.map((section) => {
314
+ let content;
315
+ switch (section.key) {
316
+ case "remotes":
317
+ content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RemotesTable, { data: section.value });
318
+ break;
319
+ case "exposes":
320
+ content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ExposesTable, { data: section.value });
321
+ break;
322
+ case "consumers":
323
+ content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ConsumersTable, { data: section.value });
324
+ break;
325
+ case "shared":
326
+ content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SharedTable, { data: section.value });
327
+ break;
328
+ default:
329
+ content = renderValue(section.value);
330
+ }
331
+ if (!content) {
332
+ return null;
333
+ }
334
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.detailRow, children: [
335
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.detailLabel, children: t(`moduleInfo.detail.${section.key}`) }),
336
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.detailValue, children: content })
337
+ ] }, section.key);
338
+ }) })
339
+ ] }) })
340
+ ] });
341
+ };
342
+ var ModuleInfo_default = Home;
@@ -0,0 +1,24 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var index_module_exports = {};
19
+ __export(index_module_exports, {
20
+ default: () => index_module_default
21
+ });
22
+ module.exports = __toCommonJS(index_module_exports);
23
+ var import_index_module = require("./index_module.css");
24
+ 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" };
@@ -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,64 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+ var FocusResultDisplay_exports = {};
29
+ __export(FocusResultDisplay_exports, {
30
+ default: () => FocusResultDisplay_default
31
+ });
32
+ module.exports = __toCommonJS(FocusResultDisplay_exports);
33
+ var import_jsx_runtime = require("react/jsx-runtime");
34
+ var import_web_react = require("@arco-design/web-react");
35
+ var import_react_i18next = require("react-i18next");
36
+ var import_FocusResultDisplay = __toESM(require("./FocusResultDisplay.module"));
37
+ const FocusResultDisplay = ({
38
+ focusResult,
39
+ hasData,
40
+ loadedStatusLabel
41
+ }) => {
42
+ const { t } = (0, import_react_i18next.useTranslation)();
43
+ if (focusResult) {
44
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_FocusResultDisplay.default.container, children: [
45
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_FocusResultDisplay.default.header, children: [
46
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: import_FocusResultDisplay.default.packageInfo, children: [
47
+ focusResult.packageName,
48
+ "@",
49
+ focusResult.version
50
+ ] }),
51
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Tag, { size: "small", className: "loaded-status-tag", children: loadedStatusLabel(focusResult.status) })
52
+ ] }),
53
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_FocusResultDisplay.default.providers, children: [
54
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: import_FocusResultDisplay.default.label, children: t("sharedDeps.focusResult.providerLabel") }),
55
+ focusResult.providers.map((p) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: import_FocusResultDisplay.default.providerTag, children: p }, p))
56
+ ] })
57
+ ] });
58
+ }
59
+ if (hasData) {
60
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: import_FocusResultDisplay.default.emptyText, children: t("sharedDeps.messages.noFocusMatch") });
61
+ }
62
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: import_FocusResultDisplay.default.emptyText, children: t("sharedDeps.messages.noData") });
63
+ };
64
+ var FocusResultDisplay_default = FocusResultDisplay;
@@ -0,0 +1,24 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+ var FocusResultDisplay_module_exports = {};
19
+ __export(FocusResultDisplay_module_exports, {
20
+ default: () => FocusResultDisplay_module_default
21
+ });
22
+ module.exports = __toCommonJS(FocusResultDisplay_module_exports);
23
+ var import_FocusResultDisplay_module = require("./FocusResultDisplay_module.css");
24
+ 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" };
@@ -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
+ }