@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.
Files changed (100) hide show
  1. package/dist/es/App.css +12 -0
  2. package/dist/es/App.js +330 -22
  3. package/dist/es/App.module.js +1 -1
  4. package/dist/es/App_module.css +291 -5
  5. package/dist/es/component/DependencyGraph/index.js +205 -0
  6. package/dist/es/component/DependencyGraph/index.module.js +5 -0
  7. package/dist/es/component/DependencyGraph/index_module.css +97 -0
  8. package/dist/es/component/{GraphItem → DependencyGraphItem}/index.js +15 -6
  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 +191 -109
  12. package/dist/es/component/Form/index.module.js +1 -1
  13. package/dist/es/component/Form/index_module.css +179 -25
  14. package/dist/es/component/Layout/index.js +300 -49
  15. package/dist/es/component/Layout/index.module.js +1 -1
  16. package/dist/es/component/Layout/index_module.css +52 -32
  17. package/dist/es/component/ModuleInfo/index.js +289 -0
  18. package/dist/es/component/ModuleInfo/index.module.js +5 -0
  19. package/dist/es/component/ModuleInfo/index_module.css +183 -0
  20. package/dist/es/component/SharedDepsExplorer/FocusResultDisplay.js +33 -0
  21. package/dist/es/component/SharedDepsExplorer/FocusResultDisplay.module.js +5 -0
  22. package/dist/es/component/SharedDepsExplorer/FocusResultDisplay_module.css +45 -0
  23. package/dist/es/component/SharedDepsExplorer/index.js +506 -0
  24. package/dist/es/component/SharedDepsExplorer/index.module.js +5 -0
  25. package/dist/es/component/SharedDepsExplorer/index_module.css +457 -0
  26. package/dist/es/component/SharedDepsExplorer/share-utils.js +206 -0
  27. package/dist/es/template/constant.js +3 -19
  28. package/dist/es/utils/chrome/index.js +91 -38
  29. package/dist/es/utils/chrome/messages.js +6 -0
  30. package/dist/es/utils/chrome/override-remote.js +42 -0
  31. package/dist/es/utils/chrome/post-message-listener.js +2 -1
  32. package/dist/es/utils/chrome/post-message-start.js +10 -2
  33. package/dist/es/utils/chrome/storage.js +6 -1
  34. package/dist/es/utils/sdk/graph.js +25 -4
  35. package/dist/es/utils/sdk/index.js +9 -0
  36. package/dist/es/worker/index.js +168 -1
  37. package/dist/lib/App.css +12 -0
  38. package/dist/lib/App.js +321 -18
  39. package/dist/lib/App.module.js +1 -1
  40. package/dist/lib/App_module.css +291 -5
  41. package/dist/lib/component/DependencyGraph/index.js +227 -0
  42. package/dist/lib/component/{GraphItem → DependencyGraph}/index.module.js +1 -1
  43. package/dist/lib/component/DependencyGraph/index_module.css +97 -0
  44. package/dist/lib/component/{GraphItem → DependencyGraphItem}/index.js +18 -9
  45. package/dist/lib/component/{Graph → DependencyGraphItem}/index.module.js +1 -1
  46. package/dist/lib/component/DependencyGraphItem/index_module.css +95 -0
  47. package/dist/lib/component/Form/index.js +188 -107
  48. package/dist/lib/component/Form/index.module.js +1 -1
  49. package/dist/lib/component/Form/index_module.css +179 -25
  50. package/dist/lib/component/Layout/index.js +294 -47
  51. package/dist/lib/component/Layout/index.module.js +1 -1
  52. package/dist/lib/component/Layout/index_module.css +52 -32
  53. package/dist/lib/component/ModuleInfo/index.js +319 -0
  54. package/dist/lib/component/ModuleInfo/index.module.js +25 -0
  55. package/dist/lib/component/ModuleInfo/index_module.css +183 -0
  56. package/dist/lib/component/SharedDepsExplorer/FocusResultDisplay.js +63 -0
  57. package/dist/lib/component/SharedDepsExplorer/FocusResultDisplay.module.js +25 -0
  58. package/dist/lib/component/SharedDepsExplorer/FocusResultDisplay_module.css +45 -0
  59. package/dist/lib/component/SharedDepsExplorer/index.js +513 -0
  60. package/dist/lib/component/SharedDepsExplorer/index.module.js +25 -0
  61. package/dist/lib/component/SharedDepsExplorer/index_module.css +457 -0
  62. package/dist/lib/component/SharedDepsExplorer/share-utils.js +237 -0
  63. package/dist/lib/template/constant.js +4 -17
  64. package/dist/lib/utils/chrome/index.js +94 -38
  65. package/dist/lib/utils/chrome/messages.js +31 -0
  66. package/dist/lib/utils/chrome/override-remote.js +65 -0
  67. package/dist/lib/utils/chrome/post-message-listener.js +2 -1
  68. package/dist/lib/utils/chrome/post-message-start.js +10 -2
  69. package/dist/lib/utils/chrome/storage.js +5 -0
  70. package/dist/lib/utils/sdk/graph.js +25 -4
  71. package/dist/lib/utils/sdk/index.js +10 -0
  72. package/dist/lib/worker/index.js +156 -1
  73. package/dist/types/src/App.d.ts +2 -1
  74. package/dist/types/src/component/{Graph → DependencyGraph}/index.d.ts +0 -1
  75. package/dist/types/src/component/{GraphItem → DependencyGraphItem}/index.d.ts +0 -1
  76. package/dist/types/src/component/Form/index.d.ts +2 -0
  77. package/dist/types/src/component/Layout/index.d.ts +0 -1
  78. package/dist/types/src/component/ModuleInfo/index.d.ts +8 -0
  79. package/dist/types/src/component/SharedDepsExplorer/FocusResultDisplay.d.ts +15 -0
  80. package/dist/types/src/component/SharedDepsExplorer/index.d.ts +6 -0
  81. package/dist/types/src/component/SharedDepsExplorer/share-utils.d.ts +44 -0
  82. package/dist/types/src/init.d.ts +0 -1
  83. package/dist/types/src/template/constant.d.ts +2 -5
  84. package/dist/types/src/utils/chrome/index.d.ts +5 -3
  85. package/dist/types/src/utils/chrome/messages.d.ts +2 -0
  86. package/dist/types/src/utils/chrome/override-remote.d.ts +1 -0
  87. package/dist/types/src/utils/chrome/storage.d.ts +5 -4
  88. package/dist/types/src/utils/sdk/graph.d.ts +2 -1
  89. package/dist/types/src/utils/sdk/index.d.ts +1 -0
  90. package/dist/types/src/utils/types/common.d.ts +4 -0
  91. package/dist/types/src/worker/index.d.ts +1 -0
  92. package/package.json +11 -9
  93. package/dist/es/component/Graph/index.js +0 -127
  94. package/dist/es/component/Graph/index.module.js +0 -5
  95. package/dist/es/component/Graph/index_module.css +0 -12
  96. package/dist/es/component/GraphItem/index.module.js +0 -5
  97. package/dist/es/component/GraphItem/index_module.css +0 -61
  98. package/dist/lib/component/Graph/index.js +0 -149
  99. package/dist/lib/component/Graph/index_module.css +0 -12
  100. package/dist/lib/component/GraphItem/index_module.css +0 -61
@@ -0,0 +1,513 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var __async = (__this, __arguments, generator) => {
30
+ return new Promise((resolve, reject) => {
31
+ var fulfilled = (value) => {
32
+ try {
33
+ step(generator.next(value));
34
+ } catch (e) {
35
+ reject(e);
36
+ }
37
+ };
38
+ var rejected = (value) => {
39
+ try {
40
+ step(generator.throw(value));
41
+ } catch (e) {
42
+ reject(e);
43
+ }
44
+ };
45
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
46
+ step((generator = generator.apply(__this, __arguments)).next());
47
+ });
48
+ };
49
+ var SharedDepsExplorer_exports = {};
50
+ __export(SharedDepsExplorer_exports, {
51
+ default: () => SharedDepsExplorer_default
52
+ });
53
+ module.exports = __toCommonJS(SharedDepsExplorer_exports);
54
+ var import_jsx_runtime = require("react/jsx-runtime");
55
+ var import_react = require("react");
56
+ var import_lucide_react = require("lucide-react");
57
+ var import_web_react = require("@arco-design/web-react");
58
+ var import_share_utils = require("./share-utils");
59
+ var import_FocusResultDisplay = __toESM(require("./FocusResultDisplay"));
60
+ var import_index = __toESM(require("./index.module"));
61
+ const ALL_VALUE = "__all__";
62
+ function loadedStatusLabel(status) {
63
+ if (status === "loaded") {
64
+ return "Loaded";
65
+ }
66
+ if (status === "loading") {
67
+ return "Loading";
68
+ }
69
+ return "Not Loaded";
70
+ }
71
+ function SharedDepsExplorer({
72
+ shareData: shareDataProp
73
+ }) {
74
+ const [normalized, setNormalized] = (0, import_react.useState)([]);
75
+ const [loadingState, setLoadingState] = (0, import_react.useState)("idle");
76
+ const [errorMessage, setErrorMessage] = (0, import_react.useState)(null);
77
+ const [selectedProvider, setSelectedProvider] = (0, import_react.useState)("");
78
+ const [selectedPackage, setSelectedPackage] = (0, import_react.useState)("");
79
+ const [selectedVersion, setSelectedVersion] = (0, import_react.useState)("");
80
+ const [searchText, setSearchText] = (0, import_react.useState)("");
81
+ const [chartScope, setChartScope] = (0, import_react.useState)("default");
82
+ const [focusPackage, setFocusPackage] = (0, import_react.useState)("react");
83
+ const [focusVersion, setFocusVersion] = (0, import_react.useState)("");
84
+ (0, import_react.useEffect)(() => {
85
+ let cancelled = false;
86
+ function bootstrap() {
87
+ return __async(this, null, function* () {
88
+ if (shareDataProp && Object.keys(shareDataProp).length > 0) {
89
+ const versions = (0, import_share_utils.normalizeShareData)(shareDataProp);
90
+ if (!cancelled) {
91
+ setNormalized(versions);
92
+ setLoadingState("idle");
93
+ setErrorMessage(null);
94
+ }
95
+ return;
96
+ }
97
+ if (!cancelled) {
98
+ setLoadingState("idle");
99
+ setErrorMessage(null);
100
+ }
101
+ });
102
+ }
103
+ bootstrap();
104
+ return () => {
105
+ cancelled = true;
106
+ };
107
+ }, [shareDataProp]);
108
+ const stats = (0, import_react.useMemo)(() => (0, import_share_utils.computeShareStats)(normalized), [normalized]);
109
+ const filterOptions = (0, import_react.useMemo)(
110
+ () => (0, import_share_utils.getFilterOptions)(normalized),
111
+ [normalized]
112
+ );
113
+ (0, import_react.useEffect)(() => {
114
+ const { scopes } = filterOptions;
115
+ if (!scopes.length) {
116
+ return;
117
+ }
118
+ if (!scopes.includes(chartScope)) {
119
+ if (scopes.includes("default")) {
120
+ setChartScope("default");
121
+ } else {
122
+ setChartScope(scopes[0]);
123
+ }
124
+ }
125
+ }, [filterOptions.scopes, chartScope]);
126
+ const filteredVersions = (0, import_react.useMemo)(() => {
127
+ const keyword = searchText.trim().toLowerCase();
128
+ return normalized.filter((v) => {
129
+ if (selectedProvider && v.from !== selectedProvider) {
130
+ return false;
131
+ }
132
+ if (selectedPackage && v.packageName !== selectedPackage) {
133
+ return false;
134
+ }
135
+ if (selectedVersion && v.version !== selectedVersion) {
136
+ return false;
137
+ }
138
+ if (keyword && !v.packageName.toLowerCase().includes(keyword)) {
139
+ return false;
140
+ }
141
+ return true;
142
+ });
143
+ }, [
144
+ normalized,
145
+ selectedProvider,
146
+ selectedPackage,
147
+ selectedVersion,
148
+ searchText
149
+ ]);
150
+ const tree = (0, import_react.useMemo)(
151
+ () => (0, import_share_utils.groupByProviderScopePackage)(filteredVersions),
152
+ [filteredVersions]
153
+ );
154
+ const versionsForSelectedPackage = (0, import_react.useMemo)(() => {
155
+ if (!selectedPackage) {
156
+ return [];
157
+ }
158
+ const set = /* @__PURE__ */ new Set();
159
+ normalized.forEach((v) => {
160
+ if (v.packageName === selectedPackage) {
161
+ set.add(v.version);
162
+ }
163
+ });
164
+ return Array.from(set).sort();
165
+ }, [normalized, selectedPackage]);
166
+ const focusVersionsForPackage = (0, import_react.useMemo)(() => {
167
+ if (!focusPackage) {
168
+ return [];
169
+ }
170
+ const set = /* @__PURE__ */ new Set();
171
+ normalized.forEach((v) => {
172
+ if (v.packageName === focusPackage) {
173
+ set.add(v.version);
174
+ }
175
+ });
176
+ return Array.from(set).sort();
177
+ }, [normalized, focusPackage]);
178
+ const focusResult = (0, import_react.useMemo)(() => {
179
+ if (!focusPackage) {
180
+ return null;
181
+ }
182
+ return (0, import_share_utils.findPackageProvider)(
183
+ normalized,
184
+ focusPackage,
185
+ focusVersion || void 0
186
+ );
187
+ }, [normalized, focusPackage, focusVersion]);
188
+ const hasData = normalized.length > 0;
189
+ const columns = [
190
+ {
191
+ title: "Package / Version",
192
+ width: "28%",
193
+ render: (_, item) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.cellCol, children: [
194
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.packageName, children: item.packageName }),
195
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.version, children: [
196
+ "v",
197
+ item.version
198
+ ] })
199
+ ] })
200
+ },
201
+ {
202
+ title: "Provider / Scope",
203
+ width: "20%",
204
+ render: (_, item) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.cellColGap, children: [
205
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: import_index.default.truncate, title: item.from, children: [
206
+ "Provider: ",
207
+ item.from
208
+ ] }),
209
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: import_index.default.scopeText, children: [
210
+ "scope: ",
211
+ item.scope
212
+ ] })
213
+ ] })
214
+ },
215
+ {
216
+ title: "Status",
217
+ width: "22%",
218
+ render: (_, item) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.cellColGap, children: [
219
+ ["loaded", "loading"].includes(item.loadedStatus) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
220
+ import_web_react.Tag,
221
+ {
222
+ size: "small",
223
+ className: `${import_index.default.tagContainer} loaded-status-tag`,
224
+ children: loadedStatusLabel(item.loadedStatus)
225
+ }
226
+ ) : null,
227
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.configTags, children: [
228
+ item.shareConfig.singleton && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Tag, { size: "small", className: import_index.default.scale90, children: "singleton" }),
229
+ item.shareConfig.eager && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Tag, { size: "small", className: import_index.default.scale90, children: "eager" }),
230
+ item.shareConfig.strictVersion && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Tag, { size: "small", className: import_index.default.scale90, children: "strictVersion" }),
231
+ item.shareConfig.requiredVersion && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_web_react.Tag, { size: "small", className: import_index.default.scale90, children: [
232
+ "req: ",
233
+ item.shareConfig.requiredVersion
234
+ ] })
235
+ ] })
236
+ ] })
237
+ },
238
+ {
239
+ title: "Consumers",
240
+ width: "18%",
241
+ render: (_, item) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
242
+ import_web_react.Popover,
243
+ {
244
+ trigger: "click",
245
+ position: "right",
246
+ content: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.popoverContent, children: [
247
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.popoverTitle, children: "Consumer List" }),
248
+ item.useIn.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: import_index.default.scopeText, children: "No applications are consuming this shared dependency version." }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("ul", { className: import_index.default.consumerList, children: item.useIn.map((c) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("li", { className: import_index.default.consumerItem, children: [
249
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: import_index.default.dot }),
250
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: import_index.default.packageName, children: c })
251
+ ] }, c)) })
252
+ ] }),
253
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Button, { size: "mini", type: "secondary", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.btnContent, children: [
254
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Network, { className: import_index.default.mr1, size: 12 }),
255
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: [
256
+ item.useIn.length || 0,
257
+ " Apps"
258
+ ] })
259
+ ] }) })
260
+ }
261
+ )
262
+ },
263
+ {
264
+ title: "Strategy",
265
+ width: "12%",
266
+ render: (_, item) => {
267
+ var _a;
268
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Tag, { size: "small", color: "gray", children: (_a = item.strategy) != null ? _a : "-" });
269
+ }
270
+ }
271
+ ];
272
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.container, children: [
273
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: import_index.default.heroSection, children: [
274
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: import_index.default.heroSubtitle, children: "Module Federation · Shared Dependencies" }),
275
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", { className: import_index.default.heroTitle, children: "Overview of Shared Dependencies Usage" })
276
+ ] }),
277
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("section", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.statsGrid, children: [
278
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_web_react.Card, { className: import_index.default.cardWithPadding, children: [
279
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.cardHeader, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.statSpace, children: [
280
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.statLabel, children: "Number of Providers" }),
281
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.statValue, children: [
282
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Server, { className: import_index.default.icon }),
283
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: stats.totalProviders })
284
+ ] })
285
+ ] }) }),
286
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: import_index.default.statDescription, children: "Number of applications/build versions exposing shared dependencies." })
287
+ ] }),
288
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_web_react.Card, { className: import_index.default.cardWithPadding, children: [
289
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.cardHeader, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.statSpace, children: [
290
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.statLabel, children: "Share Scope / Package" }),
291
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.statValue, children: [
292
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Layers, { className: import_index.default.icon }),
293
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: stats.totalScopes }),
294
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: import_index.default.statSubtext, children: "scope" })
295
+ ] })
296
+ ] }) }),
297
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.cardFooter, children: [
298
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `${import_index.default.truncate} ${import_index.default.mr2}`, children: "Shared spaces under Scope dimension." }),
299
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: import_index.default.badgeGroup, children: [
300
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Box, { className: import_index.default.iconSmall }),
301
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: [
302
+ stats.totalPackages,
303
+ " packages"
304
+ ] })
305
+ ] })
306
+ ] })
307
+ ] }),
308
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_web_react.Card, { className: import_index.default.cardWithPadding, children: [
309
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.cardHeader, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.statSpace, children: [
310
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.statLabel, children: "Version Loading & Reuse" }),
311
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.statValue, children: [
312
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Package2, { className: import_index.default.icon }),
313
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: stats.totalVersions })
314
+ ] })
315
+ ] }) }),
316
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.statusTags, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.tagRow, children: [
317
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Tag, { className: `${import_index.default.tagContent} loaded-status-tag`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.tagContent, children: [
318
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Network, { className: `${import_index.default.iconSmall} ${import_index.default.mr1}` }),
319
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "Loaded" }),
320
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: import_index.default.tagValue, children: stats.loadedCount })
321
+ ] }) }),
322
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Tag, { className: `${import_index.default.tagContent} reused-status-tag`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.tagContent, children: [
323
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Repeat, { className: `${import_index.default.iconSmall} ${import_index.default.mr1}` }),
324
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "Reused" }),
325
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: import_index.default.tagValue, children: stats.reusedCount })
326
+ ] }) })
327
+ ] }) })
328
+ ] })
329
+ ] }) }),
330
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("section", { className: import_index.default.rightPanels, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.panelStack, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
331
+ import_web_react.Card,
332
+ {
333
+ className: import_index.default.card,
334
+ title: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.cardTitle, children: [
335
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Box, { className: import_index.default.iconMedium }),
336
+ "Who provides the current shared: '",
337
+ focusPackage,
338
+ "'?"
339
+ ] }),
340
+ children: [
341
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.controlsGrid, children: [
342
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.inputGroup, children: [
343
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.inputLabel, children: "Package Name" }),
344
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
345
+ import_web_react.Select,
346
+ {
347
+ showSearch: true,
348
+ value: focusPackage,
349
+ onChange: (value) => {
350
+ setFocusPackage(value);
351
+ setFocusVersion("");
352
+ },
353
+ placeholder: "Select Shared Dependency Package Name",
354
+ className: import_index.default.fullWidth,
355
+ children: filterOptions.packages.map((name) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Select.Option, { value: name, children: name }, name))
356
+ }
357
+ )
358
+ ] }),
359
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.inputGroup, children: [
360
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.inputLabel, children: "Version (Optional, inferred if empty)" }),
361
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
362
+ import_web_react.Select,
363
+ {
364
+ showSearch: true,
365
+ value: focusVersion || ALL_VALUE,
366
+ onChange: (value) => setFocusVersion(value === ALL_VALUE ? "" : value),
367
+ placeholder: "All Versions",
368
+ className: import_index.default.fullWidth,
369
+ children: [
370
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Select.Option, { value: ALL_VALUE, children: "All Versions" }),
371
+ focusVersionsForPackage.map((v) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Select.Option, { value: v, children: v }, v))
372
+ ]
373
+ }
374
+ )
375
+ ] })
376
+ ] }),
377
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.resultBox, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
378
+ import_FocusResultDisplay.default,
379
+ {
380
+ focusResult,
381
+ hasData,
382
+ loadedStatusLabel
383
+ }
384
+ ) })
385
+ ]
386
+ }
387
+ ) }) }),
388
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("section", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
389
+ import_web_react.Card,
390
+ {
391
+ className: import_index.default.card,
392
+ title: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.cardTitle, children: [
393
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Search, { className: import_index.default.iconMedium }),
394
+ "Filter / Search"
395
+ ] }),
396
+ children: [
397
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.filterGrid, children: [
398
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: `${import_index.default.inputGroup} ${import_index.default.padding2}`, children: [
399
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.inputLabel, children: "Provider" }),
400
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
401
+ import_web_react.Select,
402
+ {
403
+ value: selectedProvider || void 0,
404
+ onChange: (value) => setSelectedProvider(value === ALL_VALUE ? "" : value),
405
+ placeholder: "All Providers",
406
+ className: import_index.default.fullWidth,
407
+ allowClear: true,
408
+ children: filterOptions.providers.map((p) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Select.Option, { value: p, children: p }, p))
409
+ }
410
+ )
411
+ ] }),
412
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: `${import_index.default.inputGroup} ${import_index.default.padding2}`, children: [
413
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.inputLabel, children: "Package Name" }),
414
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
415
+ import_web_react.Select,
416
+ {
417
+ value: selectedPackage || void 0,
418
+ onChange: (value) => setSelectedPackage(value === ALL_VALUE ? "" : value),
419
+ placeholder: "All Packages",
420
+ className: import_index.default.fullWidth,
421
+ allowClear: true,
422
+ children: filterOptions.packages.map((name) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Select.Option, { value: name, children: name }, name))
423
+ }
424
+ )
425
+ ] }),
426
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: `${import_index.default.inputGroup} ${import_index.default.padding2}`, children: [
427
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.inputLabel, children: "Version" }),
428
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
429
+ import_web_react.Select,
430
+ {
431
+ value: selectedVersion || void 0,
432
+ onChange: (value) => setSelectedVersion(value === ALL_VALUE ? "" : value),
433
+ placeholder: "All Versions",
434
+ className: import_index.default.fullWidth,
435
+ disabled: !selectedPackage,
436
+ allowClear: true,
437
+ children: versionsForSelectedPackage.map((v) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Select.Option, { value: v, children: v }, v))
438
+ }
439
+ )
440
+ ] })
441
+ ] }),
442
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.searchGrid, children: [
443
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.inputGroup, children: [
444
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.inputLabel, children: "Package Name Keyword (Fuzzy Match)" }),
445
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
446
+ import_web_react.Input,
447
+ {
448
+ prefix: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Search, { className: import_index.default.iconMedium }),
449
+ className: import_index.default.searchInput,
450
+ placeholder: "e.g., react / axios",
451
+ value: searchText,
452
+ onChange: (val) => setSearchText(val)
453
+ }
454
+ )
455
+ ] }),
456
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.matchCount, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: [
457
+ "Currently Matched Versions:",
458
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: import_index.default.matchValue, children: filteredVersions.length })
459
+ ] }) })
460
+ ] }),
461
+ !hasData && loadingState === "loading" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.loadingText, children: "Parsing shared dependency data..." }),
462
+ loadingState === "error" && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.errorText, children: [
463
+ "Failed to load shared dependency data:",
464
+ " ",
465
+ errorMessage != null ? errorMessage : "Unknown Error"
466
+ ] }),
467
+ hasData && Object.keys(tree).length === 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.noMatchText, children: "No matching shared dependency versions under current filter conditions, try relaxing the filter conditions." }),
468
+ hasData && Object.keys(tree).length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.treeContainer, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.collapseWrapper, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Collapse, { children: Object.entries(tree).map(([provider, scopes]) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
469
+ import_web_react.Collapse.Item,
470
+ {
471
+ name: provider,
472
+ header: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.providerHeader, children: [
473
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.providerTitle, children: [
474
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Server, { className: import_index.default.iconMedium }),
475
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: provider })
476
+ ] }),
477
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.providerMeta, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: [
478
+ "Scope Count: ",
479
+ Object.keys(scopes).length
480
+ ] }) })
481
+ ] }),
482
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.scopeList, children: Object.entries(scopes).map(([scopeName, packages]) => {
483
+ const list = Object.values(packages).flat();
484
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.scopeItem, children: [
485
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.scopeHeader, children: [
486
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Layers, { className: import_index.default.iconSmall }),
487
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: [
488
+ "Scope: ",
489
+ scopeName
490
+ ] })
491
+ ] }),
492
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.tableContainer, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
493
+ import_web_react.Table,
494
+ {
495
+ columns,
496
+ data: list,
497
+ pagination: false,
498
+ rowKey: "id",
499
+ border: false,
500
+ size: "small"
501
+ }
502
+ ) })
503
+ ] }, scopeName);
504
+ }) })
505
+ },
506
+ provider
507
+ )) }) }) })
508
+ ]
509
+ }
510
+ ) })
511
+ ] });
512
+ }
513
+ var SharedDepsExplorer_default = SharedDepsExplorer;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var index_module_exports = {};
20
+ __export(index_module_exports, {
21
+ default: () => index_module_default
22
+ });
23
+ module.exports = __toCommonJS(index_module_exports);
24
+ var import_index_module = require("./index_module.css");
25
+ var index_module_default = { "container": "container_967de", "heroSection": "heroSection_967de", "heroSubtitle": "heroSubtitle_967de", "heroTitle": "heroTitle_967de", "statsGrid": "statsGrid_967de", "card": "card_967de", "cardWithPadding": "cardWithPadding_967de", "cardHeader": "cardHeader_967de", "statSpace": "statSpace_967de", "statLabel": "statLabel_967de", "statValue": "statValue_967de", "icon": "icon_967de", "iconSmall": "iconSmall_967de", "iconMedium": "iconMedium_967de", "statDescription": "statDescription_967de", "statSubtext": "statSubtext_967de", "cardFooter": "cardFooter_967de", "truncate": "truncate_967de", "mr2": "mr2_967de", "badgeGroup": "badgeGroup_967de", "statusTags": "statusTags_967de", "tagRow": "tagRow_967de", "tagContent": "tagContent_967de", "tagValue": "tagValue_967de", "mr1": "mr1_967de", "rightPanels": "rightPanels_967de", "panelStack": "panelStack_967de", "cardTitle": "cardTitle_967de", "controlsGrid": "controlsGrid_967de", "inputGroup": "inputGroup_967de", "inputLabel": "inputLabel_967de", "fullWidth": "fullWidth_967de", "resultBox": "resultBox_967de", "filterGrid": "filterGrid_967de", "padding2": "padding2_967de", "searchGrid": "searchGrid_967de", "searchInput": "searchInput_967de", "matchCount": "matchCount_967de", "matchValue": "matchValue_967de", "loadingText": "loadingText_967de", "errorText": "errorText_967de", "noMatchText": "noMatchText_967de", "treeContainer": "treeContainer_967de", "collapseWrapper": "collapseWrapper_967de", "providerHeader": "providerHeader_967de", "providerTitle": "providerTitle_967de", "providerMeta": "providerMeta_967de", "scopeList": "scopeList_967de", "scopeItem": "scopeItem_967de", "scopeHeader": "scopeHeader_967de", "tableContainer": "tableContainer_967de", "cellCol": "cellCol_967de", "packageName": "packageName_967de", "version": "version_967de", "cellColGap": "cellColGap_967de", "scopeText": "scopeText_967de", "tagContainer": "tagContainer_967de", "configTags": "configTags_967de", "scale90": "scale90_967de", "popoverContent": "popoverContent_967de", "popoverTitle": "popoverTitle_967de", "consumerList": "consumerList_967de", "consumerItem": "consumerItem_967de", "dot": "dot_967de", "btnContent": "btnContent_967de" };