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