@module-federation/devtools 0.22.1 → 0.24.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 (58) hide show
  1. package/dist/es/App.css +6 -5
  2. package/dist/es/App.js +191 -59
  3. package/dist/es/App.module.js +1 -1
  4. package/dist/es/App_module.css +38 -36
  5. package/dist/es/component/DependencyGraph/index.js +11 -12
  6. package/dist/es/component/DependencyGraph/index_module.css +20 -17
  7. package/dist/es/component/DependencyGraphItem/index.js +5 -3
  8. package/dist/es/component/DependencyGraphItem/index_module.css +7 -7
  9. package/dist/es/component/Form/index.js +24 -31
  10. package/dist/es/component/Form/index.module.js +1 -1
  11. package/dist/es/component/Form/index_module.css +22 -25
  12. package/dist/es/component/LanguageSwitch.js +50 -0
  13. package/dist/es/component/Layout/index.js +6 -10
  14. package/dist/es/component/Layout/index_module.css +7 -7
  15. package/dist/es/component/ModuleInfo/index.js +65 -41
  16. package/dist/es/component/ModuleInfo/index_module.css +12 -11
  17. package/dist/es/component/SharedDepsExplorer/FocusResultDisplay.js +5 -3
  18. package/dist/es/component/SharedDepsExplorer/FocusResultDisplay_module.css +5 -5
  19. package/dist/es/component/SharedDepsExplorer/index.js +223 -93
  20. package/dist/es/component/SharedDepsExplorer/index_module.css +12 -2
  21. package/dist/es/component/SharedDepsExplorer/share-utils.js +21 -5
  22. package/dist/es/component/ThemeToggle.js +19 -0
  23. package/dist/es/component/ThemeToggle.module.js +5 -0
  24. package/dist/es/component/ThemeToggle_module.css +12 -0
  25. package/dist/es/hooks/useDevtoolsTheme.js +77 -0
  26. package/dist/es/i18n/index.js +510 -0
  27. package/dist/lib/App.css +6 -5
  28. package/dist/lib/App.js +189 -59
  29. package/dist/lib/App.module.js +1 -1
  30. package/dist/lib/App_module.css +38 -36
  31. package/dist/lib/component/DependencyGraph/index.js +11 -12
  32. package/dist/lib/component/DependencyGraph/index_module.css +20 -17
  33. package/dist/lib/component/DependencyGraphItem/index.js +5 -3
  34. package/dist/lib/component/DependencyGraphItem/index_module.css +7 -7
  35. package/dist/lib/component/Form/index.js +24 -31
  36. package/dist/lib/component/Form/index.module.js +1 -1
  37. package/dist/lib/component/Form/index_module.css +22 -25
  38. package/dist/lib/component/LanguageSwitch.js +80 -0
  39. package/dist/lib/component/Layout/index.js +6 -10
  40. package/dist/lib/component/Layout/index_module.css +7 -7
  41. package/dist/lib/component/ModuleInfo/index.js +65 -41
  42. package/dist/lib/component/ModuleInfo/index_module.css +12 -11
  43. package/dist/lib/component/SharedDepsExplorer/FocusResultDisplay.js +5 -3
  44. package/dist/lib/component/SharedDepsExplorer/FocusResultDisplay_module.css +5 -5
  45. package/dist/lib/component/SharedDepsExplorer/index.js +217 -91
  46. package/dist/lib/component/SharedDepsExplorer/index_module.css +12 -2
  47. package/dist/lib/component/SharedDepsExplorer/share-utils.js +21 -5
  48. package/dist/lib/component/ThemeToggle.js +49 -0
  49. package/dist/lib/component/ThemeToggle.module.js +25 -0
  50. package/dist/lib/component/ThemeToggle_module.css +12 -0
  51. package/dist/lib/hooks/useDevtoolsTheme.js +101 -0
  52. package/dist/lib/i18n/index.js +544 -0
  53. package/dist/types/src/component/LanguageSwitch.d.ts +2 -0
  54. package/dist/types/src/component/SharedDepsExplorer/share-utils.d.ts +2 -1
  55. package/dist/types/src/component/ThemeToggle.d.ts +8 -0
  56. package/dist/types/src/hooks/useDevtoolsTheme.d.ts +2 -0
  57. package/dist/types/src/i18n/index.d.ts +5 -0
  58. package/package.json +26 -12
@@ -1,10 +1,39 @@
1
1
  "use strict";
2
2
  var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
+ var __defProps = Object.defineProperties;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
5
7
  var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
6
9
  var __getProtoOf = Object.getPrototypeOf;
7
10
  var __hasOwnProp = Object.prototype.hasOwnProperty;
11
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
12
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
13
+ var __spreadValues = (a, b) => {
14
+ for (var prop in b || (b = {}))
15
+ if (__hasOwnProp.call(b, prop))
16
+ __defNormalProp(a, prop, b[prop]);
17
+ if (__getOwnPropSymbols)
18
+ for (var prop of __getOwnPropSymbols(b)) {
19
+ if (__propIsEnum.call(b, prop))
20
+ __defNormalProp(a, prop, b[prop]);
21
+ }
22
+ return a;
23
+ };
24
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
25
+ var __objRest = (source, exclude) => {
26
+ var target = {};
27
+ for (var prop in source)
28
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
29
+ target[prop] = source[prop];
30
+ if (source != null && __getOwnPropSymbols)
31
+ for (var prop of __getOwnPropSymbols(source)) {
32
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
33
+ target[prop] = source[prop];
34
+ }
35
+ return target;
36
+ };
8
37
  var __export = (target, all) => {
9
38
  for (var name in all)
10
39
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -55,28 +84,41 @@ var import_jsx_runtime = require("react/jsx-runtime");
55
84
  var import_react = require("react");
56
85
  var import_lucide_react = require("lucide-react");
57
86
  var import_web_react = require("@arco-design/web-react");
87
+ var import_react_i18next = require("react-i18next");
58
88
  var import_share_utils = require("./share-utils");
59
89
  var import_FocusResultDisplay = __toESM(require("./FocusResultDisplay"));
60
90
  var import_index = __toESM(require("./index.module"));
61
91
  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";
92
+ function HoverTag(_a) {
93
+ var _b = _a, { tooltip, children } = _b, tagProps = __objRest(_b, ["tooltip", "children"]);
94
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Popover, { trigger: "hover", position: "top", content: tooltip != null ? tooltip : children, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Tag, __spreadProps(__spreadValues({}, tagProps), { children })) });
70
95
  }
71
96
  function SharedDepsExplorer({
72
97
  shareData: shareDataProp
73
98
  }) {
99
+ const { t } = (0, import_react_i18next.useTranslation)();
74
100
  const [normalized, setNormalized] = (0, import_react.useState)([]);
75
101
  const [loadingState, setLoadingState] = (0, import_react.useState)("idle");
76
102
  const [errorMessage, setErrorMessage] = (0, import_react.useState)(null);
103
+ const loadedStatusLabelLocal = (status) => {
104
+ if (status === "loaded") {
105
+ return t("sharedDeps.status.loaded");
106
+ }
107
+ if (status === "loading") {
108
+ return t("sharedDeps.status.loading");
109
+ }
110
+ if (status === "t-loaded") {
111
+ return t("sharedDeps.status.tLoaded");
112
+ }
113
+ if (status === "t-loading") {
114
+ return t("sharedDeps.status.tLoading");
115
+ }
116
+ return t("sharedDeps.status.notLoaded");
117
+ };
77
118
  const [selectedProvider, setSelectedProvider] = (0, import_react.useState)("");
78
119
  const [selectedPackage, setSelectedPackage] = (0, import_react.useState)("");
79
120
  const [selectedVersion, setSelectedVersion] = (0, import_react.useState)("");
121
+ const [selectedMode, setSelectedMode] = (0, import_react.useState)("");
80
122
  const [searchText, setSearchText] = (0, import_react.useState)("");
81
123
  const [chartScope, setChartScope] = (0, import_react.useState)("default");
82
124
  const [focusPackage, setFocusPackage] = (0, import_react.useState)("react");
@@ -135,6 +177,9 @@ function SharedDepsExplorer({
135
177
  if (selectedVersion && v.version !== selectedVersion) {
136
178
  return false;
137
179
  }
180
+ if (selectedMode && v.treeShakingMode !== selectedMode) {
181
+ return false;
182
+ }
138
183
  if (keyword && !v.packageName.toLowerCase().includes(keyword)) {
139
184
  return false;
140
185
  }
@@ -145,6 +190,7 @@ function SharedDepsExplorer({
145
190
  selectedProvider,
146
191
  selectedPackage,
147
192
  selectedVersion,
193
+ selectedMode,
148
194
  searchText
149
195
  ]);
150
196
  const tree = (0, import_react.useMemo)(
@@ -163,6 +209,18 @@ function SharedDepsExplorer({
163
209
  });
164
210
  return Array.from(set).sort();
165
211
  }, [normalized, selectedPackage]);
212
+ const modesForSelectedPackage = (0, import_react.useMemo)(() => {
213
+ if (!selectedPackage) {
214
+ return [];
215
+ }
216
+ const set = /* @__PURE__ */ new Set();
217
+ normalized.forEach((v) => {
218
+ if (v.packageName === selectedPackage && v.treeShakingMode) {
219
+ set.add(v.treeShakingMode);
220
+ }
221
+ });
222
+ return Array.from(set).sort();
223
+ }, [normalized, selectedPackage]);
166
224
  const focusVersionsForPackage = (0, import_react.useMemo)(() => {
167
225
  if (!focusPackage) {
168
226
  return [];
@@ -188,7 +246,7 @@ function SharedDepsExplorer({
188
246
  const hasData = normalized.length > 0;
189
247
  const columns = [
190
248
  {
191
- title: "Package / Version",
249
+ title: t("sharedDeps.table.columns.packageVersion"),
192
250
  width: "28%",
193
251
  render: (_, item) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.cellCol, children: [
194
252
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.packageName, children: item.packageName }),
@@ -199,44 +257,74 @@ function SharedDepsExplorer({
199
257
  ] })
200
258
  },
201
259
  {
202
- title: "Provider / Scope",
260
+ title: t("sharedDeps.table.columns.providerScope"),
203
261
  width: "20%",
204
262
  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
- ] })
263
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: import_index.default.truncate, title: item.from, children: t("sharedDeps.table.providerPrefix", { name: item.from }) }),
264
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: import_index.default.scopeText, children: t("sharedDeps.table.scopePrefix", { scope: item.scope }) })
213
265
  ] })
214
266
  },
215
267
  {
216
- title: "Status",
268
+ title: t("sharedDeps.table.columns.status"),
217
269
  width: "22%",
218
270
  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,
271
+ ["loaded", "loading", "t-loaded", "t-loading"].includes(
272
+ item.loadedStatus
273
+ ) ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
274
+ HoverTag,
221
275
  {
222
276
  size: "small",
223
277
  className: `${import_index.default.tagContainer} loaded-status-tag`,
224
- children: loadedStatusLabel(item.loadedStatus)
278
+ tooltip: loadedStatusLabelLocal(item.loadedStatus),
279
+ children: loadedStatusLabelLocal(item.loadedStatus)
280
+ }
281
+ ) : null,
282
+ item.treeShakingMode ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
283
+ HoverTag,
284
+ {
285
+ size: "small",
286
+ className: import_index.default.tagContainer,
287
+ tooltip: item.treeShakingMode,
288
+ children: item.treeShakingMode
225
289
  }
226
290
  ) : null,
227
291
  /* @__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
- ] })
292
+ item.shareConfig.singleton && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
293
+ HoverTag,
294
+ {
295
+ size: "small",
296
+ className: import_index.default.scale90,
297
+ tooltip: "singleton",
298
+ children: "singleton"
299
+ }
300
+ ),
301
+ item.shareConfig.eager && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(HoverTag, { size: "small", className: import_index.default.scale90, tooltip: "eager", children: "eager" }),
302
+ item.shareConfig.strictVersion && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
303
+ HoverTag,
304
+ {
305
+ size: "small",
306
+ className: import_index.default.scale90,
307
+ tooltip: "strictVersion",
308
+ children: "strictVersion"
309
+ }
310
+ ),
311
+ item.shareConfig.requiredVersion && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
312
+ HoverTag,
313
+ {
314
+ size: "small",
315
+ className: import_index.default.scale90,
316
+ tooltip: `requiredVersion: ${item.shareConfig.requiredVersion}`,
317
+ children: [
318
+ "requiredVersion: ",
319
+ item.shareConfig.requiredVersion
320
+ ]
321
+ }
322
+ )
235
323
  ] })
236
324
  ] })
237
325
  },
238
326
  {
239
- title: "Consumers",
327
+ title: t("sharedDeps.table.columns.consumers"),
240
328
  width: "18%",
241
329
  render: (_, item) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
242
330
  import_web_react.Popover,
@@ -244,86 +332,101 @@ function SharedDepsExplorer({
244
332
  trigger: "click",
245
333
  position: "right",
246
334
  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: [
335
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.popoverTitle, children: t("sharedDeps.consumersPopover.title") }),
336
+ 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: [
249
337
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: import_index.default.dot }),
250
338
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: import_index.default.packageName, children: c })
251
339
  ] }, c)) })
252
340
  ] }),
253
341
  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
342
  /* @__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
- ] })
343
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: t("sharedDeps.consumersPopover.button", {
344
+ count: item.useIn.length || 0
345
+ }) })
259
346
  ] }) })
260
347
  }
261
348
  )
262
349
  },
263
350
  {
264
- title: "Strategy",
351
+ title: t("sharedDeps.table.columns.strategy"),
265
352
  width: "12%",
266
353
  render: (_, item) => {
267
354
  var _a;
268
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Tag, { size: "small", color: "gray", children: (_a = item.strategy) != null ? _a : "-" });
355
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(HoverTag, { size: "small", color: "gray", children: (_a = item.strategy) != null ? _a : t("sharedDeps.table.strategyFallback") });
269
356
  }
270
357
  }
271
358
  ];
272
359
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.container, children: [
273
360
  /* @__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" })
361
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: import_index.default.heroSubtitle, children: t("sharedDeps.hero.subtitle") }),
362
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", { className: import_index.default.heroTitle, children: t("sharedDeps.hero.title") })
276
363
  ] }),
277
364
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("section", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.statsGrid, children: [
278
365
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_web_react.Card, { className: import_index.default.cardWithPadding, children: [
279
366
  /* @__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" }),
367
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.statLabel, children: t("sharedDeps.stats.providers.title") }),
281
368
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.statValue, children: [
282
369
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Server, { className: import_index.default.icon }),
283
370
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: stats.totalProviders })
284
371
  ] })
285
372
  ] }) }),
286
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: import_index.default.statDescription, children: "Number of applications/build versions exposing shared dependencies." })
373
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: import_index.default.statDescription, children: t("sharedDeps.stats.providers.description") })
287
374
  ] }),
288
375
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_web_react.Card, { className: import_index.default.cardWithPadding, children: [
289
376
  /* @__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" }),
377
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.statLabel, children: t("sharedDeps.stats.scopes.title") }),
291
378
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.statValue, children: [
292
379
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Layers, { className: import_index.default.icon }),
293
380
  /* @__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" })
381
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: import_index.default.statSubtext, children: t("sharedDeps.stats.scopes.badge") })
295
382
  ] })
296
383
  ] }) }),
297
384
  /* @__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." }),
385
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `${import_index.default.truncate} ${import_index.default.mr2}`, children: t("sharedDeps.stats.scopes.description") }),
299
386
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: import_index.default.badgeGroup, children: [
300
387
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Box, { className: import_index.default.iconSmall }),
301
388
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: [
302
389
  stats.totalPackages,
303
- " packages"
390
+ t("sharedDeps.stats.scopes.packagesBadge", {
391
+ count: stats.totalPackages
392
+ })
304
393
  ] })
305
394
  ] })
306
395
  ] })
307
396
  ] }),
308
397
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_web_react.Card, { className: import_index.default.cardWithPadding, children: [
309
398
  /* @__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" }),
399
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.statLabel, children: t("sharedDeps.stats.versions.title") }),
311
400
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.statValue, children: [
312
401
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Package2, { className: import_index.default.icon }),
313
402
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: stats.totalVersions })
314
403
  ] })
315
404
  ] }) }),
316
405
  /* @__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
- ] }) })
406
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
407
+ HoverTag,
408
+ {
409
+ className: `${import_index.default.tagContent} loaded-status-tag`,
410
+ tooltip: `Loaded: ${stats.loadedCount}`,
411
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.tagContent, children: [
412
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Network, { className: `${import_index.default.iconSmall} ${import_index.default.mr1}` }),
413
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: t("sharedDeps.stats.versions.loadedLabel") }),
414
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: import_index.default.tagValue, children: stats.loadedCount })
415
+ ] })
416
+ }
417
+ ),
418
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
419
+ HoverTag,
420
+ {
421
+ className: `${import_index.default.tagContent} reused-status-tag`,
422
+ tooltip: `Reused: ${stats.reusedCount}`,
423
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.tagContent, children: [
424
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Repeat, { className: `${import_index.default.iconSmall} ${import_index.default.mr1}` }),
425
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: t("sharedDeps.stats.versions.reusedLabel") }) }),
426
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: import_index.default.tagValue, children: stats.reusedCount })
427
+ ] })
428
+ }
429
+ )
327
430
  ] }) })
328
431
  ] })
329
432
  ] }) }),
@@ -333,14 +436,12 @@ function SharedDepsExplorer({
333
436
  className: import_index.default.card,
334
437
  title: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.cardTitle, children: [
335
438
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Box, { className: import_index.default.iconMedium }),
336
- "Who provides the current shared: '",
337
- focusPackage,
338
- "'?"
439
+ t("sharedDeps.focusPanel.title", { package: focusPackage })
339
440
  ] }),
340
441
  children: [
341
442
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.controlsGrid, children: [
342
443
  /* @__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" }),
444
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.inputLabel, children: t("sharedDeps.focusPanel.packageLabel") }),
344
445
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
345
446
  import_web_react.Select,
346
447
  {
@@ -350,24 +451,24 @@ function SharedDepsExplorer({
350
451
  setFocusPackage(value);
351
452
  setFocusVersion("");
352
453
  },
353
- placeholder: "Select Shared Dependency Package Name",
454
+ placeholder: t("sharedDeps.focusPanel.packagePlaceholder"),
354
455
  className: import_index.default.fullWidth,
355
456
  children: filterOptions.packages.map((name) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Select.Option, { value: name, children: name }, name))
356
457
  }
357
458
  )
358
459
  ] }),
359
460
  /* @__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)" }),
461
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.inputLabel, children: t("sharedDeps.focusPanel.versionLabel") }),
361
462
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
362
463
  import_web_react.Select,
363
464
  {
364
465
  showSearch: true,
365
466
  value: focusVersion || ALL_VALUE,
366
467
  onChange: (value) => setFocusVersion(value === ALL_VALUE ? "" : value),
367
- placeholder: "All Versions",
468
+ placeholder: t("sharedDeps.focusPanel.versionPlaceholder"),
368
469
  className: import_index.default.fullWidth,
369
470
  children: [
370
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Select.Option, { value: ALL_VALUE, children: "All Versions" }),
471
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Select.Option, { value: ALL_VALUE, children: t("sharedDeps.focusPanel.versionAllOption") }),
371
472
  focusVersionsForPackage.map((v) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Select.Option, { value: v, children: v }, v))
372
473
  ]
373
474
  }
@@ -379,7 +480,7 @@ function SharedDepsExplorer({
379
480
  {
380
481
  focusResult,
381
482
  hasData,
382
- loadedStatusLabel
483
+ loadedStatusLabel: loadedStatusLabelLocal
383
484
  }
384
485
  ) })
385
486
  ]
@@ -391,18 +492,18 @@ function SharedDepsExplorer({
391
492
  className: import_index.default.card,
392
493
  title: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.cardTitle, children: [
393
494
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Search, { className: import_index.default.iconMedium }),
394
- "Filter / Search"
495
+ t("sharedDeps.filters.cardTitle")
395
496
  ] }),
396
497
  children: [
397
498
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.filterGrid, children: [
398
499
  /* @__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" }),
500
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.inputLabel, children: t("sharedDeps.filters.providerLabel") }),
400
501
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
401
502
  import_web_react.Select,
402
503
  {
403
504
  value: selectedProvider || void 0,
404
505
  onChange: (value) => setSelectedProvider(value === ALL_VALUE ? "" : value),
405
- placeholder: "All Providers",
506
+ placeholder: t("sharedDeps.filters.providerPlaceholder"),
406
507
  className: import_index.default.fullWidth,
407
508
  allowClear: true,
408
509
  children: filterOptions.providers.map((p) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Select.Option, { value: p, children: p }, p))
@@ -410,13 +511,13 @@ function SharedDepsExplorer({
410
511
  )
411
512
  ] }),
412
513
  /* @__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" }),
514
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.inputLabel, children: t("sharedDeps.filters.packageLabel") }),
414
515
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
415
516
  import_web_react.Select,
416
517
  {
417
518
  value: selectedPackage || void 0,
418
519
  onChange: (value) => setSelectedPackage(value === ALL_VALUE ? "" : value),
419
- placeholder: "All Packages",
520
+ placeholder: t("sharedDeps.filters.packagePlaceholder"),
420
521
  className: import_index.default.fullWidth,
421
522
  allowClear: true,
422
523
  children: filterOptions.packages.map((name) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Select.Option, { value: name, children: name }, name))
@@ -424,47 +525,74 @@ function SharedDepsExplorer({
424
525
  )
425
526
  ] }),
426
527
  /* @__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" }),
528
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.inputLabel, children: t("sharedDeps.filters.versionLabel") }),
428
529
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
429
530
  import_web_react.Select,
430
531
  {
431
532
  value: selectedVersion || void 0,
432
533
  onChange: (value) => setSelectedVersion(value === ALL_VALUE ? "" : value),
433
- placeholder: "All Versions",
534
+ placeholder: t("sharedDeps.filters.versionPlaceholder"),
434
535
  className: import_index.default.fullWidth,
435
536
  disabled: !selectedPackage,
436
537
  allowClear: true,
437
538
  children: versionsForSelectedPackage.map((v) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Select.Option, { value: v, children: v }, v))
438
539
  }
439
540
  )
541
+ ] }),
542
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: `${import_index.default.inputGroup} ${import_index.default.padding2}`, children: [
543
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
544
+ "div",
545
+ {
546
+ className: import_index.default.inputLabel,
547
+ style: { display: "flex", alignItems: "center", gap: 4 },
548
+ children: [
549
+ "Mode",
550
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Tooltip, { content: "Shared Tree Shaking Mode, options: server-calc | runtime-infer", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
551
+ import_lucide_react.Info,
552
+ {
553
+ size: 14,
554
+ style: { cursor: "help", color: "#86909c" }
555
+ }
556
+ ) })
557
+ ]
558
+ }
559
+ ),
560
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
561
+ import_web_react.Select,
562
+ {
563
+ value: selectedMode || void 0,
564
+ onChange: (value) => setSelectedMode(value === ALL_VALUE ? "" : value),
565
+ placeholder: "All Modes",
566
+ className: import_index.default.fullWidth,
567
+ disabled: !selectedPackage || modesForSelectedPackage.length === 0,
568
+ allowClear: true,
569
+ children: modesForSelectedPackage.map((v) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web_react.Select.Option, { value: v, children: v }, v))
570
+ }
571
+ )
440
572
  ] })
441
573
  ] }),
442
574
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.searchGrid, children: [
443
575
  /* @__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)" }),
576
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.inputLabel, children: t("sharedDeps.filters.keywordLabel") }),
445
577
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
446
578
  import_web_react.Input,
447
579
  {
448
580
  prefix: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Search, { className: import_index.default.iconMedium }),
449
581
  className: import_index.default.searchInput,
450
- placeholder: "e.g., react / axios",
582
+ placeholder: t("sharedDeps.filters.keywordPlaceholder"),
451
583
  value: searchText,
452
584
  onChange: (val) => setSearchText(val)
453
585
  }
454
586
  )
455
587
  ] }),
456
588
  /* @__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:",
589
+ t("sharedDeps.filters.matchCountLabel"),
458
590
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: import_index.default.matchValue, children: filteredVersions.length })
459
591
  ] }) })
460
592
  ] }),
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." }),
593
+ !hasData && loadingState === "loading" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.loadingText, children: t("sharedDeps.messages.loading") }),
594
+ 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") }),
595
+ hasData && Object.keys(tree).length === 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.noMatchText, children: t("sharedDeps.messages.noMatch") }),
468
596
  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
597
  import_web_react.Collapse.Item,
470
598
  {
@@ -474,20 +602,18 @@ function SharedDepsExplorer({
474
602
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Server, { className: import_index.default.iconMedium }),
475
603
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: provider })
476
604
  ] }),
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
- ] }) })
605
+ /* @__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", {
606
+ count: Object.keys(scopes).length
607
+ }) }) })
481
608
  ] }),
482
609
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.scopeList, children: Object.entries(scopes).map(([scopeName, packages]) => {
483
610
  const list = Object.values(packages).flat();
484
611
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.scopeItem, children: [
485
612
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.scopeHeader, children: [
486
613
  /* @__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
- ] })
614
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: t("sharedDeps.filters.scopePrefix", {
615
+ name: scopeName
616
+ }) })
491
617
  ] }),
492
618
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.tableContainer, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
493
619
  import_web_react.Table,
@@ -227,7 +227,7 @@
227
227
  .resultBox_967de {
228
228
  border-radius: 6px;
229
229
  border: 1px dashed #e4e4e7;
230
- background-color: #f9fafb;
230
+ background-color: var(--color-bg-1, #f9fafb) !important;
231
231
  padding: 8px 12px;
232
232
  font-size: 12px;
233
233
  }
@@ -366,6 +366,16 @@
366
366
  border: 1px solid #e4e4e7;
367
367
  background-color: rgba(249, 250, 251, 0.4);
368
368
  }
369
+ .tableContainer_967de .arco-table-hover .arco-table-tr:not(.arco-table-empty-row):hover .arco-table-td:not(.arco-table-col-fixed-left):not(.arco-table-col-fixed-right) {
370
+ background-color: var(--color-fill-2, #f2f3f5) !important;
371
+ }
372
+ .arco-theme-dark .tableContainer_967de .arco-table-hover
373
+ .arco-table-tr:not(.arco-table-empty-row):hover
374
+ .arco-table-td:not(.arco-table-col-fixed-left):not(
375
+ .arco-table-col-fixed-right
376
+ ) {
377
+ background-color: var(--color-bg-4) !important;
378
+ }
369
379
 
370
380
  .cellCol_967de {
371
381
  display: flex;
@@ -376,7 +386,7 @@
376
386
  word-break: break-all;
377
387
  font-family: monospace;
378
388
  font-size: 11px;
379
- color: #27272a;
389
+ color: var(--color-neutral-10, #27272a) !important;
380
390
  }
381
391
 
382
392
  .version_967de {