@module-federation/devtools 0.22.0 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/dist/es/App.css +13 -0
  2. package/dist/es/App.js +461 -21
  3. package/dist/es/App.module.js +1 -1
  4. package/dist/es/App_module.css +293 -5
  5. package/dist/es/component/DependencyGraph/index.js +204 -0
  6. package/dist/es/component/DependencyGraph/index.module.js +5 -0
  7. package/dist/es/component/DependencyGraph/index_module.css +100 -0
  8. package/dist/es/component/{GraphItem → DependencyGraphItem}/index.js +20 -9
  9. package/dist/es/component/DependencyGraphItem/index.module.js +5 -0
  10. package/dist/es/component/DependencyGraphItem/index_module.css +95 -0
  11. package/dist/es/component/Form/index.js +192 -117
  12. package/dist/es/component/Form/index.module.js +1 -1
  13. package/dist/es/component/Form/index_module.css +176 -25
  14. package/dist/es/component/LanguageSwitch.js +50 -0
  15. package/dist/es/component/Layout/index.js +296 -49
  16. package/dist/es/component/Layout/index.module.js +1 -1
  17. package/dist/es/component/Layout/index_module.css +52 -32
  18. package/dist/es/component/ModuleInfo/index.js +313 -0
  19. package/dist/es/component/ModuleInfo/index.module.js +5 -0
  20. package/dist/es/component/ModuleInfo/index_module.css +184 -0
  21. package/dist/es/component/SharedDepsExplorer/FocusResultDisplay.js +35 -0
  22. package/dist/es/component/SharedDepsExplorer/FocusResultDisplay.module.js +5 -0
  23. package/dist/es/component/SharedDepsExplorer/FocusResultDisplay_module.css +45 -0
  24. package/dist/es/component/SharedDepsExplorer/index.js +495 -0
  25. package/dist/es/component/SharedDepsExplorer/index.module.js +5 -0
  26. package/dist/es/component/SharedDepsExplorer/index_module.css +467 -0
  27. package/dist/es/component/SharedDepsExplorer/share-utils.js +206 -0
  28. package/dist/es/component/ThemeToggle.js +19 -0
  29. package/dist/es/component/ThemeToggle.module.js +5 -0
  30. package/dist/es/component/ThemeToggle_module.css +12 -0
  31. package/dist/es/hooks/useDevtoolsTheme.js +77 -0
  32. package/dist/es/i18n/index.js +506 -0
  33. package/dist/es/template/constant.js +3 -19
  34. package/dist/es/utils/chrome/index.js +91 -38
  35. package/dist/es/utils/chrome/messages.js +6 -0
  36. package/dist/es/utils/chrome/override-remote.js +42 -0
  37. package/dist/es/utils/chrome/post-message-listener.js +2 -1
  38. package/dist/es/utils/chrome/post-message-start.js +10 -2
  39. package/dist/es/utils/chrome/storage.js +6 -1
  40. package/dist/es/utils/sdk/graph.js +25 -4
  41. package/dist/es/utils/sdk/index.js +9 -0
  42. package/dist/es/worker/index.js +168 -1
  43. package/dist/lib/App.css +13 -0
  44. package/dist/lib/App.js +451 -18
  45. package/dist/lib/App.module.js +1 -1
  46. package/dist/lib/App_module.css +293 -5
  47. package/dist/lib/component/DependencyGraph/index.js +226 -0
  48. package/dist/lib/component/{GraphItem → DependencyGraph}/index.module.js +1 -1
  49. package/dist/lib/component/DependencyGraph/index_module.css +100 -0
  50. package/dist/lib/component/{GraphItem → DependencyGraphItem}/index.js +23 -12
  51. package/dist/lib/component/{Graph → DependencyGraphItem}/index.module.js +1 -1
  52. package/dist/lib/component/DependencyGraphItem/index_module.css +95 -0
  53. package/dist/lib/component/Form/index.js +189 -115
  54. package/dist/lib/component/Form/index.module.js +1 -1
  55. package/dist/lib/component/Form/index_module.css +176 -25
  56. package/dist/lib/component/LanguageSwitch.js +80 -0
  57. package/dist/lib/component/Layout/index.js +290 -47
  58. package/dist/lib/component/Layout/index.module.js +1 -1
  59. package/dist/lib/component/Layout/index_module.css +52 -32
  60. package/dist/lib/component/ModuleInfo/index.js +343 -0
  61. package/dist/lib/component/ModuleInfo/index.module.js +25 -0
  62. package/dist/lib/component/ModuleInfo/index_module.css +184 -0
  63. package/dist/lib/component/SharedDepsExplorer/FocusResultDisplay.js +65 -0
  64. package/dist/lib/component/SharedDepsExplorer/FocusResultDisplay.module.js +25 -0
  65. package/dist/lib/component/SharedDepsExplorer/FocusResultDisplay_module.css +45 -0
  66. package/dist/lib/component/SharedDepsExplorer/index.js +502 -0
  67. package/dist/lib/component/SharedDepsExplorer/index.module.js +25 -0
  68. package/dist/lib/component/SharedDepsExplorer/index_module.css +467 -0
  69. package/dist/lib/component/SharedDepsExplorer/share-utils.js +237 -0
  70. package/dist/lib/component/ThemeToggle.js +49 -0
  71. package/dist/lib/component/ThemeToggle.module.js +25 -0
  72. package/dist/lib/component/ThemeToggle_module.css +12 -0
  73. package/dist/lib/hooks/useDevtoolsTheme.js +101 -0
  74. package/dist/lib/i18n/index.js +540 -0
  75. package/dist/lib/template/constant.js +4 -17
  76. package/dist/lib/utils/chrome/index.js +94 -38
  77. package/dist/lib/utils/chrome/messages.js +31 -0
  78. package/dist/lib/utils/chrome/override-remote.js +65 -0
  79. package/dist/lib/utils/chrome/post-message-listener.js +2 -1
  80. package/dist/lib/utils/chrome/post-message-start.js +10 -2
  81. package/dist/lib/utils/chrome/storage.js +5 -0
  82. package/dist/lib/utils/sdk/graph.js +25 -4
  83. package/dist/lib/utils/sdk/index.js +10 -0
  84. package/dist/lib/worker/index.js +156 -1
  85. package/dist/types/src/App.d.ts +2 -1
  86. package/dist/types/src/component/{Graph → DependencyGraph}/index.d.ts +0 -1
  87. package/dist/types/src/component/{GraphItem → DependencyGraphItem}/index.d.ts +0 -1
  88. package/dist/types/src/component/Form/index.d.ts +2 -0
  89. package/dist/types/src/component/LanguageSwitch.d.ts +2 -0
  90. package/dist/types/src/component/Layout/index.d.ts +0 -1
  91. package/dist/types/src/component/ModuleInfo/index.d.ts +8 -0
  92. package/dist/types/src/component/SharedDepsExplorer/FocusResultDisplay.d.ts +15 -0
  93. package/dist/types/src/component/SharedDepsExplorer/index.d.ts +6 -0
  94. package/dist/types/src/component/SharedDepsExplorer/share-utils.d.ts +44 -0
  95. package/dist/types/src/component/ThemeToggle.d.ts +8 -0
  96. package/dist/types/src/hooks/useDevtoolsTheme.d.ts +2 -0
  97. package/dist/types/src/i18n/index.d.ts +5 -0
  98. package/dist/types/src/init.d.ts +0 -1
  99. package/dist/types/src/template/constant.d.ts +2 -5
  100. package/dist/types/src/utils/chrome/index.d.ts +5 -3
  101. package/dist/types/src/utils/chrome/messages.d.ts +2 -0
  102. package/dist/types/src/utils/chrome/override-remote.d.ts +1 -0
  103. package/dist/types/src/utils/chrome/storage.d.ts +5 -4
  104. package/dist/types/src/utils/sdk/graph.d.ts +2 -1
  105. package/dist/types/src/utils/sdk/index.d.ts +1 -0
  106. package/dist/types/src/utils/types/common.d.ts +4 -0
  107. package/dist/types/src/worker/index.d.ts +1 -0
  108. package/package.json +18 -14
  109. package/dist/es/component/Graph/index.js +0 -127
  110. package/dist/es/component/Graph/index.module.js +0 -5
  111. package/dist/es/component/Graph/index_module.css +0 -12
  112. package/dist/es/component/GraphItem/index.module.js +0 -5
  113. package/dist/es/component/GraphItem/index_module.css +0 -61
  114. package/dist/lib/component/Graph/index.js +0 -149
  115. package/dist/lib/component/Graph/index_module.css +0 -12
  116. package/dist/lib/component/GraphItem/index_module.css +0 -61
@@ -0,0 +1,502 @@
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_react_i18next = require("react-i18next");
59
+ var import_share_utils = require("./share-utils");
60
+ var import_FocusResultDisplay = __toESM(require("./FocusResultDisplay"));
61
+ var import_index = __toESM(require("./index.module"));
62
+ const ALL_VALUE = "__all__";
63
+ function SharedDepsExplorer({
64
+ shareData: shareDataProp
65
+ }) {
66
+ const { t } = (0, import_react_i18next.useTranslation)();
67
+ const [normalized, setNormalized] = (0, import_react.useState)([]);
68
+ const [loadingState, setLoadingState] = (0, import_react.useState)("idle");
69
+ const [errorMessage, setErrorMessage] = (0, import_react.useState)(null);
70
+ const loadedStatusLabelLocal = (status) => {
71
+ if (status === "loaded") {
72
+ return t("sharedDeps.status.loaded");
73
+ }
74
+ if (status === "loading") {
75
+ return t("sharedDeps.status.loading");
76
+ }
77
+ return t("sharedDeps.status.notLoaded");
78
+ };
79
+ const [selectedProvider, setSelectedProvider] = (0, import_react.useState)("");
80
+ const [selectedPackage, setSelectedPackage] = (0, import_react.useState)("");
81
+ const [selectedVersion, setSelectedVersion] = (0, import_react.useState)("");
82
+ const [searchText, setSearchText] = (0, import_react.useState)("");
83
+ const [chartScope, setChartScope] = (0, import_react.useState)("default");
84
+ const [focusPackage, setFocusPackage] = (0, import_react.useState)("react");
85
+ const [focusVersion, setFocusVersion] = (0, import_react.useState)("");
86
+ (0, import_react.useEffect)(() => {
87
+ let cancelled = false;
88
+ function bootstrap() {
89
+ return __async(this, null, function* () {
90
+ if (shareDataProp && Object.keys(shareDataProp).length > 0) {
91
+ const versions = (0, import_share_utils.normalizeShareData)(shareDataProp);
92
+ if (!cancelled) {
93
+ setNormalized(versions);
94
+ setLoadingState("idle");
95
+ setErrorMessage(null);
96
+ }
97
+ return;
98
+ }
99
+ if (!cancelled) {
100
+ setLoadingState("idle");
101
+ setErrorMessage(null);
102
+ }
103
+ });
104
+ }
105
+ bootstrap();
106
+ return () => {
107
+ cancelled = true;
108
+ };
109
+ }, [shareDataProp]);
110
+ const stats = (0, import_react.useMemo)(() => (0, import_share_utils.computeShareStats)(normalized), [normalized]);
111
+ const filterOptions = (0, import_react.useMemo)(
112
+ () => (0, import_share_utils.getFilterOptions)(normalized),
113
+ [normalized]
114
+ );
115
+ (0, import_react.useEffect)(() => {
116
+ const { scopes } = filterOptions;
117
+ if (!scopes.length) {
118
+ return;
119
+ }
120
+ if (!scopes.includes(chartScope)) {
121
+ if (scopes.includes("default")) {
122
+ setChartScope("default");
123
+ } else {
124
+ setChartScope(scopes[0]);
125
+ }
126
+ }
127
+ }, [filterOptions.scopes, chartScope]);
128
+ const filteredVersions = (0, import_react.useMemo)(() => {
129
+ const keyword = searchText.trim().toLowerCase();
130
+ return normalized.filter((v) => {
131
+ if (selectedProvider && v.from !== selectedProvider) {
132
+ return false;
133
+ }
134
+ if (selectedPackage && v.packageName !== selectedPackage) {
135
+ return false;
136
+ }
137
+ if (selectedVersion && v.version !== selectedVersion) {
138
+ return false;
139
+ }
140
+ if (keyword && !v.packageName.toLowerCase().includes(keyword)) {
141
+ return false;
142
+ }
143
+ return true;
144
+ });
145
+ }, [
146
+ normalized,
147
+ selectedProvider,
148
+ selectedPackage,
149
+ selectedVersion,
150
+ searchText
151
+ ]);
152
+ const tree = (0, import_react.useMemo)(
153
+ () => (0, import_share_utils.groupByProviderScopePackage)(filteredVersions),
154
+ [filteredVersions]
155
+ );
156
+ const versionsForSelectedPackage = (0, import_react.useMemo)(() => {
157
+ if (!selectedPackage) {
158
+ return [];
159
+ }
160
+ const set = /* @__PURE__ */ new Set();
161
+ normalized.forEach((v) => {
162
+ if (v.packageName === selectedPackage) {
163
+ set.add(v.version);
164
+ }
165
+ });
166
+ return Array.from(set).sort();
167
+ }, [normalized, selectedPackage]);
168
+ const focusVersionsForPackage = (0, import_react.useMemo)(() => {
169
+ if (!focusPackage) {
170
+ return [];
171
+ }
172
+ const set = /* @__PURE__ */ new Set();
173
+ normalized.forEach((v) => {
174
+ if (v.packageName === focusPackage) {
175
+ set.add(v.version);
176
+ }
177
+ });
178
+ return Array.from(set).sort();
179
+ }, [normalized, focusPackage]);
180
+ const focusResult = (0, import_react.useMemo)(() => {
181
+ if (!focusPackage) {
182
+ return null;
183
+ }
184
+ return (0, import_share_utils.findPackageProvider)(
185
+ normalized,
186
+ focusPackage,
187
+ focusVersion || void 0
188
+ );
189
+ }, [normalized, focusPackage, focusVersion]);
190
+ const hasData = normalized.length > 0;
191
+ const columns = [
192
+ {
193
+ title: t("sharedDeps.table.columns.packageVersion"),
194
+ width: "28%",
195
+ render: (_, item) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.cellCol, children: [
196
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.packageName, children: item.packageName }),
197
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.version, children: [
198
+ "v",
199
+ item.version
200
+ ] })
201
+ ] })
202
+ },
203
+ {
204
+ title: t("sharedDeps.table.columns.providerScope"),
205
+ width: "20%",
206
+ render: (_, item) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.cellColGap, children: [
207
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: import_index.default.truncate, title: item.from, children: t("sharedDeps.table.providerPrefix", { name: item.from }) }),
208
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: import_index.default.scopeText, children: t("sharedDeps.table.scopePrefix", { scope: item.scope }) })
209
+ ] })
210
+ },
211
+ {
212
+ title: t("sharedDeps.table.columns.status"),
213
+ width: "22%",
214
+ render: (_, item) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.cellColGap, children: [
215
+ ["loaded", "loading"].includes(item.loadedStatus) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
216
+ import_web_react.Tag,
217
+ {
218
+ size: "small",
219
+ className: `${import_index.default.tagContainer} loaded-status-tag`,
220
+ children: loadedStatusLabelLocal(item.loadedStatus)
221
+ }
222
+ ) : null,
223
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.configTags, children: [
224
+ item.shareConfig.singleton && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Tag, { size: "small", className: import_index.default.scale90, children: "singleton" }),
225
+ item.shareConfig.eager && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Tag, { size: "small", className: import_index.default.scale90, children: "eager" }),
226
+ item.shareConfig.strictVersion && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Tag, { size: "small", className: import_index.default.scale90, children: "strictVersion" }),
227
+ item.shareConfig.requiredVersion && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_web_react.Tag, { size: "small", className: import_index.default.scale90, children: [
228
+ "req: ",
229
+ item.shareConfig.requiredVersion
230
+ ] })
231
+ ] })
232
+ ] })
233
+ },
234
+ {
235
+ title: t("sharedDeps.table.columns.consumers"),
236
+ width: "18%",
237
+ render: (_, item) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
238
+ import_web_react.Popover,
239
+ {
240
+ trigger: "click",
241
+ position: "right",
242
+ content: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.popoverContent, children: [
243
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.popoverTitle, children: t("sharedDeps.consumersPopover.title") }),
244
+ item.useIn.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: import_index.default.scopeText, children: t("sharedDeps.consumersPopover.empty") }) : /* @__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: [
245
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: import_index.default.dot }),
246
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: import_index.default.packageName, children: c })
247
+ ] }, c)) })
248
+ ] }),
249
+ 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: [
250
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Network, { className: import_index.default.mr1, size: 12 }),
251
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: t("sharedDeps.consumersPopover.button", {
252
+ count: item.useIn.length || 0
253
+ }) })
254
+ ] }) })
255
+ }
256
+ )
257
+ },
258
+ {
259
+ title: t("sharedDeps.table.columns.strategy"),
260
+ width: "12%",
261
+ render: (_, item) => {
262
+ var _a;
263
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Tag, { size: "small", color: "gray", children: (_a = item.strategy) != null ? _a : t("sharedDeps.table.strategyFallback") });
264
+ }
265
+ }
266
+ ];
267
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.container, children: [
268
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: import_index.default.heroSection, children: [
269
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: import_index.default.heroSubtitle, children: t("sharedDeps.hero.subtitle") }),
270
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", { className: import_index.default.heroTitle, children: t("sharedDeps.hero.title") })
271
+ ] }),
272
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("section", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.statsGrid, children: [
273
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_web_react.Card, { className: import_index.default.cardWithPadding, children: [
274
+ /* @__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: [
275
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.statLabel, children: t("sharedDeps.stats.providers.title") }),
276
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.statValue, children: [
277
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Server, { className: import_index.default.icon }),
278
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: stats.totalProviders })
279
+ ] })
280
+ ] }) }),
281
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: import_index.default.statDescription, children: t("sharedDeps.stats.providers.description") })
282
+ ] }),
283
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_web_react.Card, { className: import_index.default.cardWithPadding, children: [
284
+ /* @__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: [
285
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.statLabel, children: t("sharedDeps.stats.scopes.title") }),
286
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.statValue, children: [
287
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Layers, { className: import_index.default.icon }),
288
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: stats.totalScopes }),
289
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: import_index.default.statSubtext, children: t("sharedDeps.stats.scopes.badge") })
290
+ ] })
291
+ ] }) }),
292
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.cardFooter, children: [
293
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `${import_index.default.truncate} ${import_index.default.mr2}`, children: t("sharedDeps.stats.scopes.description") }),
294
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: import_index.default.badgeGroup, children: [
295
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Box, { className: import_index.default.iconSmall }),
296
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: [
297
+ stats.totalPackages,
298
+ t("sharedDeps.stats.scopes.packagesBadge", {
299
+ count: stats.totalPackages
300
+ })
301
+ ] })
302
+ ] })
303
+ ] })
304
+ ] }),
305
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_web_react.Card, { className: import_index.default.cardWithPadding, children: [
306
+ /* @__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: [
307
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.statLabel, children: t("sharedDeps.stats.versions.title") }),
308
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.statValue, children: [
309
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Package2, { className: import_index.default.icon }),
310
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: stats.totalVersions })
311
+ ] })
312
+ ] }) }),
313
+ /* @__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: [
314
+ /* @__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: [
315
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Network, { className: `${import_index.default.iconSmall} ${import_index.default.mr1}` }),
316
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: t("sharedDeps.stats.versions.loadedLabel") }),
317
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: import_index.default.tagValue, children: stats.loadedCount })
318
+ ] }) }),
319
+ /* @__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: [
320
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Repeat, { className: `${import_index.default.iconSmall} ${import_index.default.mr1}` }),
321
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: t("sharedDeps.stats.versions.reusedLabel") }) }),
322
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: import_index.default.tagValue, children: stats.reusedCount })
323
+ ] }) })
324
+ ] }) })
325
+ ] })
326
+ ] }) }),
327
+ /* @__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)(
328
+ import_web_react.Card,
329
+ {
330
+ className: import_index.default.card,
331
+ title: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.cardTitle, children: [
332
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Box, { className: import_index.default.iconMedium }),
333
+ t("sharedDeps.focusPanel.title", { package: focusPackage })
334
+ ] }),
335
+ children: [
336
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.controlsGrid, children: [
337
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.inputGroup, children: [
338
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.inputLabel, children: t("sharedDeps.focusPanel.packageLabel") }),
339
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
340
+ import_web_react.Select,
341
+ {
342
+ showSearch: true,
343
+ value: focusPackage,
344
+ onChange: (value) => {
345
+ setFocusPackage(value);
346
+ setFocusVersion("");
347
+ },
348
+ placeholder: t("sharedDeps.focusPanel.packagePlaceholder"),
349
+ className: import_index.default.fullWidth,
350
+ children: filterOptions.packages.map((name) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Select.Option, { value: name, children: name }, name))
351
+ }
352
+ )
353
+ ] }),
354
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.inputGroup, children: [
355
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.inputLabel, children: t("sharedDeps.focusPanel.versionLabel") }),
356
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
357
+ import_web_react.Select,
358
+ {
359
+ showSearch: true,
360
+ value: focusVersion || ALL_VALUE,
361
+ onChange: (value) => setFocusVersion(value === ALL_VALUE ? "" : value),
362
+ placeholder: t("sharedDeps.focusPanel.versionPlaceholder"),
363
+ className: import_index.default.fullWidth,
364
+ children: [
365
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Select.Option, { value: ALL_VALUE, children: t("sharedDeps.focusPanel.versionAllOption") }),
366
+ focusVersionsForPackage.map((v) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Select.Option, { value: v, children: v }, v))
367
+ ]
368
+ }
369
+ )
370
+ ] })
371
+ ] }),
372
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.resultBox, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
373
+ import_FocusResultDisplay.default,
374
+ {
375
+ focusResult,
376
+ hasData,
377
+ loadedStatusLabel: loadedStatusLabelLocal
378
+ }
379
+ ) })
380
+ ]
381
+ }
382
+ ) }) }),
383
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("section", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
384
+ import_web_react.Card,
385
+ {
386
+ className: import_index.default.card,
387
+ title: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.cardTitle, children: [
388
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Search, { className: import_index.default.iconMedium }),
389
+ t("sharedDeps.filters.cardTitle")
390
+ ] }),
391
+ children: [
392
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.filterGrid, children: [
393
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: `${import_index.default.inputGroup} ${import_index.default.padding2}`, children: [
394
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.inputLabel, children: t("sharedDeps.filters.providerLabel") }),
395
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
396
+ import_web_react.Select,
397
+ {
398
+ value: selectedProvider || void 0,
399
+ onChange: (value) => setSelectedProvider(value === ALL_VALUE ? "" : value),
400
+ placeholder: t("sharedDeps.filters.providerPlaceholder"),
401
+ className: import_index.default.fullWidth,
402
+ allowClear: true,
403
+ children: filterOptions.providers.map((p) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Select.Option, { value: p, children: p }, p))
404
+ }
405
+ )
406
+ ] }),
407
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: `${import_index.default.inputGroup} ${import_index.default.padding2}`, children: [
408
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.inputLabel, children: t("sharedDeps.filters.packageLabel") }),
409
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
410
+ import_web_react.Select,
411
+ {
412
+ value: selectedPackage || void 0,
413
+ onChange: (value) => setSelectedPackage(value === ALL_VALUE ? "" : value),
414
+ placeholder: t("sharedDeps.filters.packagePlaceholder"),
415
+ className: import_index.default.fullWidth,
416
+ allowClear: true,
417
+ children: filterOptions.packages.map((name) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Select.Option, { value: name, children: name }, name))
418
+ }
419
+ )
420
+ ] }),
421
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: `${import_index.default.inputGroup} ${import_index.default.padding2}`, children: [
422
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.inputLabel, children: t("sharedDeps.filters.versionLabel") }),
423
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
424
+ import_web_react.Select,
425
+ {
426
+ value: selectedVersion || void 0,
427
+ onChange: (value) => setSelectedVersion(value === ALL_VALUE ? "" : value),
428
+ placeholder: t("sharedDeps.filters.versionPlaceholder"),
429
+ className: import_index.default.fullWidth,
430
+ disabled: !selectedPackage,
431
+ allowClear: true,
432
+ children: versionsForSelectedPackage.map((v) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Select.Option, { value: v, children: v }, v))
433
+ }
434
+ )
435
+ ] })
436
+ ] }),
437
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.searchGrid, children: [
438
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.inputGroup, children: [
439
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.inputLabel, children: t("sharedDeps.filters.keywordLabel") }),
440
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
441
+ import_web_react.Input,
442
+ {
443
+ prefix: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Search, { className: import_index.default.iconMedium }),
444
+ className: import_index.default.searchInput,
445
+ placeholder: t("sharedDeps.filters.keywordPlaceholder"),
446
+ value: searchText,
447
+ onChange: (val) => setSearchText(val)
448
+ }
449
+ )
450
+ ] }),
451
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.matchCount, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: [
452
+ t("sharedDeps.filters.matchCountLabel"),
453
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: import_index.default.matchValue, children: filteredVersions.length })
454
+ ] }) })
455
+ ] }),
456
+ !hasData && loadingState === "loading" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.loadingText, children: t("sharedDeps.messages.loading") }),
457
+ loadingState === "error" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.errorText, children: errorMessage ? t("sharedDeps.messages.error", { message: errorMessage }) : t("sharedDeps.messages.errorUnknown") }),
458
+ hasData && Object.keys(tree).length === 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.noMatchText, children: t("sharedDeps.messages.noMatch") }),
459
+ 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)(
460
+ import_web_react.Collapse.Item,
461
+ {
462
+ name: provider,
463
+ header: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.providerHeader, children: [
464
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.providerTitle, children: [
465
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Server, { className: import_index.default.iconMedium }),
466
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: provider })
467
+ ] }),
468
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.providerMeta, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: t("sharedDeps.filters.scopeCount", {
469
+ count: Object.keys(scopes).length
470
+ }) }) })
471
+ ] }),
472
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.scopeList, children: Object.entries(scopes).map(([scopeName, packages]) => {
473
+ const list = Object.values(packages).flat();
474
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.scopeItem, children: [
475
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.scopeHeader, children: [
476
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Layers, { className: import_index.default.iconSmall }),
477
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: t("sharedDeps.filters.scopePrefix", {
478
+ name: scopeName
479
+ }) })
480
+ ] }),
481
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.tableContainer, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
482
+ import_web_react.Table,
483
+ {
484
+ columns,
485
+ data: list,
486
+ pagination: false,
487
+ rowKey: "id",
488
+ border: false,
489
+ size: "small"
490
+ }
491
+ ) })
492
+ ] }, scopeName);
493
+ }) })
494
+ },
495
+ provider
496
+ )) }) }) })
497
+ ]
498
+ }
499
+ ) })
500
+ ] });
501
+ }
502
+ 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" };