@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,3 +1,34 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ var __objRest = (source, exclude) => {
21
+ var target = {};
22
+ for (var prop in source)
23
+ if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
24
+ target[prop] = source[prop];
25
+ if (source != null && __getOwnPropSymbols)
26
+ for (var prop of __getOwnPropSymbols(source)) {
27
+ if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
28
+ target[prop] = source[prop];
29
+ }
30
+ return target;
31
+ };
1
32
  var __async = (__this, __arguments, generator) => {
2
33
  return new Promise((resolve, reject) => {
3
34
  var fulfilled = (value) => {
@@ -27,7 +58,8 @@ import {
27
58
  Package2,
28
59
  Repeat,
29
60
  Search,
30
- Server
61
+ Server,
62
+ Info
31
63
  } from "lucide-react";
32
64
  import {
33
65
  Card,
@@ -37,8 +69,10 @@ import {
37
69
  Select,
38
70
  Collapse,
39
71
  Popover,
40
- Button
72
+ Button,
73
+ Tooltip
41
74
  } from "@arco-design/web-react";
75
+ import { useTranslation } from "react-i18next";
42
76
  import {
43
77
  normalizeShareData,
44
78
  computeShareStats,
@@ -49,24 +83,36 @@ import {
49
83
  import FocusResultDisplay from "./FocusResultDisplay";
50
84
  import styles from "./index.module";
51
85
  const ALL_VALUE = "__all__";
52
- function loadedStatusLabel(status) {
53
- if (status === "loaded") {
54
- return "Loaded";
55
- }
56
- if (status === "loading") {
57
- return "Loading";
58
- }
59
- return "Not Loaded";
86
+ function HoverTag(_a) {
87
+ var _b = _a, { tooltip, children } = _b, tagProps = __objRest(_b, ["tooltip", "children"]);
88
+ return /* @__PURE__ */ jsx(Popover, { trigger: "hover", position: "top", content: tooltip != null ? tooltip : children, children: /* @__PURE__ */ jsx(Tag, __spreadProps(__spreadValues({}, tagProps), { children })) });
60
89
  }
61
90
  function SharedDepsExplorer({
62
91
  shareData: shareDataProp
63
92
  }) {
93
+ const { t } = useTranslation();
64
94
  const [normalized, setNormalized] = useState([]);
65
95
  const [loadingState, setLoadingState] = useState("idle");
66
96
  const [errorMessage, setErrorMessage] = useState(null);
97
+ const loadedStatusLabelLocal = (status) => {
98
+ if (status === "loaded") {
99
+ return t("sharedDeps.status.loaded");
100
+ }
101
+ if (status === "loading") {
102
+ return t("sharedDeps.status.loading");
103
+ }
104
+ if (status === "t-loaded") {
105
+ return t("sharedDeps.status.tLoaded");
106
+ }
107
+ if (status === "t-loading") {
108
+ return t("sharedDeps.status.tLoading");
109
+ }
110
+ return t("sharedDeps.status.notLoaded");
111
+ };
67
112
  const [selectedProvider, setSelectedProvider] = useState("");
68
113
  const [selectedPackage, setSelectedPackage] = useState("");
69
114
  const [selectedVersion, setSelectedVersion] = useState("");
115
+ const [selectedMode, setSelectedMode] = useState("");
70
116
  const [searchText, setSearchText] = useState("");
71
117
  const [chartScope, setChartScope] = useState("default");
72
118
  const [focusPackage, setFocusPackage] = useState("react");
@@ -125,6 +171,9 @@ function SharedDepsExplorer({
125
171
  if (selectedVersion && v.version !== selectedVersion) {
126
172
  return false;
127
173
  }
174
+ if (selectedMode && v.treeShakingMode !== selectedMode) {
175
+ return false;
176
+ }
128
177
  if (keyword && !v.packageName.toLowerCase().includes(keyword)) {
129
178
  return false;
130
179
  }
@@ -135,6 +184,7 @@ function SharedDepsExplorer({
135
184
  selectedProvider,
136
185
  selectedPackage,
137
186
  selectedVersion,
187
+ selectedMode,
138
188
  searchText
139
189
  ]);
140
190
  const tree = useMemo(
@@ -153,6 +203,18 @@ function SharedDepsExplorer({
153
203
  });
154
204
  return Array.from(set).sort();
155
205
  }, [normalized, selectedPackage]);
206
+ const modesForSelectedPackage = useMemo(() => {
207
+ if (!selectedPackage) {
208
+ return [];
209
+ }
210
+ const set = /* @__PURE__ */ new Set();
211
+ normalized.forEach((v) => {
212
+ if (v.packageName === selectedPackage && v.treeShakingMode) {
213
+ set.add(v.treeShakingMode);
214
+ }
215
+ });
216
+ return Array.from(set).sort();
217
+ }, [normalized, selectedPackage]);
156
218
  const focusVersionsForPackage = useMemo(() => {
157
219
  if (!focusPackage) {
158
220
  return [];
@@ -178,7 +240,7 @@ function SharedDepsExplorer({
178
240
  const hasData = normalized.length > 0;
179
241
  const columns = [
180
242
  {
181
- title: "Package / Version",
243
+ title: t("sharedDeps.table.columns.packageVersion"),
182
244
  width: "28%",
183
245
  render: (_, item) => /* @__PURE__ */ jsxs("div", { className: styles.cellCol, children: [
184
246
  /* @__PURE__ */ jsx("div", { className: styles.packageName, children: item.packageName }),
@@ -189,44 +251,74 @@ function SharedDepsExplorer({
189
251
  ] })
190
252
  },
191
253
  {
192
- title: "Provider / Scope",
254
+ title: t("sharedDeps.table.columns.providerScope"),
193
255
  width: "20%",
194
256
  render: (_, item) => /* @__PURE__ */ jsxs("div", { className: styles.cellColGap, children: [
195
- /* @__PURE__ */ jsxs("span", { className: styles.truncate, title: item.from, children: [
196
- "Provider: ",
197
- item.from
198
- ] }),
199
- /* @__PURE__ */ jsxs("span", { className: styles.scopeText, children: [
200
- "scope: ",
201
- item.scope
202
- ] })
257
+ /* @__PURE__ */ jsx("span", { className: styles.truncate, title: item.from, children: t("sharedDeps.table.providerPrefix", { name: item.from }) }),
258
+ /* @__PURE__ */ jsx("span", { className: styles.scopeText, children: t("sharedDeps.table.scopePrefix", { scope: item.scope }) })
203
259
  ] })
204
260
  },
205
261
  {
206
- title: "Status",
262
+ title: t("sharedDeps.table.columns.status"),
207
263
  width: "22%",
208
264
  render: (_, item) => /* @__PURE__ */ jsxs("div", { className: styles.cellColGap, children: [
209
- ["loaded", "loading"].includes(item.loadedStatus) ? /* @__PURE__ */ jsx(
210
- Tag,
265
+ ["loaded", "loading", "t-loaded", "t-loading"].includes(
266
+ item.loadedStatus
267
+ ) ? /* @__PURE__ */ jsx(
268
+ HoverTag,
211
269
  {
212
270
  size: "small",
213
271
  className: `${styles.tagContainer} loaded-status-tag`,
214
- children: loadedStatusLabel(item.loadedStatus)
272
+ tooltip: loadedStatusLabelLocal(item.loadedStatus),
273
+ children: loadedStatusLabelLocal(item.loadedStatus)
274
+ }
275
+ ) : null,
276
+ item.treeShakingMode ? /* @__PURE__ */ jsx(
277
+ HoverTag,
278
+ {
279
+ size: "small",
280
+ className: styles.tagContainer,
281
+ tooltip: item.treeShakingMode,
282
+ children: item.treeShakingMode
215
283
  }
216
284
  ) : null,
217
285
  /* @__PURE__ */ jsxs("div", { className: styles.configTags, children: [
218
- item.shareConfig.singleton && /* @__PURE__ */ jsx(Tag, { size: "small", className: styles.scale90, children: "singleton" }),
219
- item.shareConfig.eager && /* @__PURE__ */ jsx(Tag, { size: "small", className: styles.scale90, children: "eager" }),
220
- item.shareConfig.strictVersion && /* @__PURE__ */ jsx(Tag, { size: "small", className: styles.scale90, children: "strictVersion" }),
221
- item.shareConfig.requiredVersion && /* @__PURE__ */ jsxs(Tag, { size: "small", className: styles.scale90, children: [
222
- "req: ",
223
- item.shareConfig.requiredVersion
224
- ] })
286
+ item.shareConfig.singleton && /* @__PURE__ */ jsx(
287
+ HoverTag,
288
+ {
289
+ size: "small",
290
+ className: styles.scale90,
291
+ tooltip: "singleton",
292
+ children: "singleton"
293
+ }
294
+ ),
295
+ item.shareConfig.eager && /* @__PURE__ */ jsx(HoverTag, { size: "small", className: styles.scale90, tooltip: "eager", children: "eager" }),
296
+ item.shareConfig.strictVersion && /* @__PURE__ */ jsx(
297
+ HoverTag,
298
+ {
299
+ size: "small",
300
+ className: styles.scale90,
301
+ tooltip: "strictVersion",
302
+ children: "strictVersion"
303
+ }
304
+ ),
305
+ item.shareConfig.requiredVersion && /* @__PURE__ */ jsxs(
306
+ HoverTag,
307
+ {
308
+ size: "small",
309
+ className: styles.scale90,
310
+ tooltip: `requiredVersion: ${item.shareConfig.requiredVersion}`,
311
+ children: [
312
+ "requiredVersion: ",
313
+ item.shareConfig.requiredVersion
314
+ ]
315
+ }
316
+ )
225
317
  ] })
226
318
  ] })
227
319
  },
228
320
  {
229
- title: "Consumers",
321
+ title: t("sharedDeps.table.columns.consumers"),
230
322
  width: "18%",
231
323
  render: (_, item) => /* @__PURE__ */ jsx(
232
324
  Popover,
@@ -234,86 +326,101 @@ function SharedDepsExplorer({
234
326
  trigger: "click",
235
327
  position: "right",
236
328
  content: /* @__PURE__ */ jsxs("div", { className: styles.popoverContent, children: [
237
- /* @__PURE__ */ jsx("div", { className: styles.popoverTitle, children: "Consumer List" }),
238
- item.useIn.length === 0 ? /* @__PURE__ */ jsx("p", { className: styles.scopeText, children: "No applications are consuming this shared dependency version." }) : /* @__PURE__ */ jsx("ul", { className: styles.consumerList, children: item.useIn.map((c) => /* @__PURE__ */ jsxs("li", { className: styles.consumerItem, children: [
329
+ /* @__PURE__ */ jsx("div", { className: styles.popoverTitle, children: t("sharedDeps.consumersPopover.title") }),
330
+ item.useIn.length === 0 ? /* @__PURE__ */ jsx("p", { className: styles.scopeText, children: t("sharedDeps.consumersPopover.empty") }) : /* @__PURE__ */ jsx("ul", { className: styles.consumerList, children: item.useIn.map((c) => /* @__PURE__ */ jsxs("li", { className: styles.consumerItem, children: [
239
331
  /* @__PURE__ */ jsx("span", { className: styles.dot }),
240
332
  /* @__PURE__ */ jsx("span", { className: styles.packageName, children: c })
241
333
  ] }, c)) })
242
334
  ] }),
243
335
  children: /* @__PURE__ */ jsx(Button, { size: "mini", type: "secondary", children: /* @__PURE__ */ jsxs("div", { className: styles.btnContent, children: [
244
336
  /* @__PURE__ */ jsx(Network, { className: styles.mr1, size: 12 }),
245
- /* @__PURE__ */ jsxs("span", { children: [
246
- item.useIn.length || 0,
247
- " Apps"
248
- ] })
337
+ /* @__PURE__ */ jsx("span", { children: t("sharedDeps.consumersPopover.button", {
338
+ count: item.useIn.length || 0
339
+ }) })
249
340
  ] }) })
250
341
  }
251
342
  )
252
343
  },
253
344
  {
254
- title: "Strategy",
345
+ title: t("sharedDeps.table.columns.strategy"),
255
346
  width: "12%",
256
347
  render: (_, item) => {
257
348
  var _a;
258
- return /* @__PURE__ */ jsx(Tag, { size: "small", color: "gray", children: (_a = item.strategy) != null ? _a : "-" });
349
+ return /* @__PURE__ */ jsx(HoverTag, { size: "small", color: "gray", children: (_a = item.strategy) != null ? _a : t("sharedDeps.table.strategyFallback") });
259
350
  }
260
351
  }
261
352
  ];
262
353
  return /* @__PURE__ */ jsxs("div", { className: styles.container, children: [
263
354
  /* @__PURE__ */ jsxs("section", { className: styles.heroSection, children: [
264
- /* @__PURE__ */ jsx("p", { className: styles.heroSubtitle, children: "Module Federation · Shared Dependencies" }),
265
- /* @__PURE__ */ jsx("h1", { className: styles.heroTitle, children: "Overview of Shared Dependencies Usage" })
355
+ /* @__PURE__ */ jsx("p", { className: styles.heroSubtitle, children: t("sharedDeps.hero.subtitle") }),
356
+ /* @__PURE__ */ jsx("h1", { className: styles.heroTitle, children: t("sharedDeps.hero.title") })
266
357
  ] }),
267
358
  /* @__PURE__ */ jsx("section", { children: /* @__PURE__ */ jsxs("div", { className: styles.statsGrid, children: [
268
359
  /* @__PURE__ */ jsxs(Card, { className: styles.cardWithPadding, children: [
269
360
  /* @__PURE__ */ jsx("div", { className: styles.cardHeader, children: /* @__PURE__ */ jsxs("div", { className: styles.statSpace, children: [
270
- /* @__PURE__ */ jsx("div", { className: styles.statLabel, children: "Number of Providers" }),
361
+ /* @__PURE__ */ jsx("div", { className: styles.statLabel, children: t("sharedDeps.stats.providers.title") }),
271
362
  /* @__PURE__ */ jsxs("div", { className: styles.statValue, children: [
272
363
  /* @__PURE__ */ jsx(Server, { className: styles.icon }),
273
364
  /* @__PURE__ */ jsx("span", { children: stats.totalProviders })
274
365
  ] })
275
366
  ] }) }),
276
- /* @__PURE__ */ jsx("p", { className: styles.statDescription, children: "Number of applications/build versions exposing shared dependencies." })
367
+ /* @__PURE__ */ jsx("p", { className: styles.statDescription, children: t("sharedDeps.stats.providers.description") })
277
368
  ] }),
278
369
  /* @__PURE__ */ jsxs(Card, { className: styles.cardWithPadding, children: [
279
370
  /* @__PURE__ */ jsx("div", { className: styles.cardHeader, children: /* @__PURE__ */ jsxs("div", { className: styles.statSpace, children: [
280
- /* @__PURE__ */ jsx("div", { className: styles.statLabel, children: "Share Scope / Package" }),
371
+ /* @__PURE__ */ jsx("div", { className: styles.statLabel, children: t("sharedDeps.stats.scopes.title") }),
281
372
  /* @__PURE__ */ jsxs("div", { className: styles.statValue, children: [
282
373
  /* @__PURE__ */ jsx(Layers, { className: styles.icon }),
283
374
  /* @__PURE__ */ jsx("span", { children: stats.totalScopes }),
284
- /* @__PURE__ */ jsx("span", { className: styles.statSubtext, children: "scope" })
375
+ /* @__PURE__ */ jsx("span", { className: styles.statSubtext, children: t("sharedDeps.stats.scopes.badge") })
285
376
  ] })
286
377
  ] }) }),
287
378
  /* @__PURE__ */ jsxs("div", { className: styles.cardFooter, children: [
288
- /* @__PURE__ */ jsx("span", { className: `${styles.truncate} ${styles.mr2}`, children: "Shared spaces under Scope dimension." }),
379
+ /* @__PURE__ */ jsx("span", { className: `${styles.truncate} ${styles.mr2}`, children: t("sharedDeps.stats.scopes.description") }),
289
380
  /* @__PURE__ */ jsxs("span", { className: styles.badgeGroup, children: [
290
381
  /* @__PURE__ */ jsx(Box, { className: styles.iconSmall }),
291
382
  /* @__PURE__ */ jsxs("span", { children: [
292
383
  stats.totalPackages,
293
- " packages"
384
+ t("sharedDeps.stats.scopes.packagesBadge", {
385
+ count: stats.totalPackages
386
+ })
294
387
  ] })
295
388
  ] })
296
389
  ] })
297
390
  ] }),
298
391
  /* @__PURE__ */ jsxs(Card, { className: styles.cardWithPadding, children: [
299
392
  /* @__PURE__ */ jsx("div", { className: styles.cardHeader, children: /* @__PURE__ */ jsxs("div", { className: styles.statSpace, children: [
300
- /* @__PURE__ */ jsx("div", { className: styles.statLabel, children: "Version Loading & Reuse" }),
393
+ /* @__PURE__ */ jsx("div", { className: styles.statLabel, children: t("sharedDeps.stats.versions.title") }),
301
394
  /* @__PURE__ */ jsxs("div", { className: styles.statValue, children: [
302
395
  /* @__PURE__ */ jsx(Package2, { className: styles.icon }),
303
396
  /* @__PURE__ */ jsx("span", { children: stats.totalVersions })
304
397
  ] })
305
398
  ] }) }),
306
399
  /* @__PURE__ */ jsx("div", { className: styles.statusTags, children: /* @__PURE__ */ jsxs("div", { className: styles.tagRow, children: [
307
- /* @__PURE__ */ jsx(Tag, { className: `${styles.tagContent} loaded-status-tag`, children: /* @__PURE__ */ jsxs("div", { className: styles.tagContent, children: [
308
- /* @__PURE__ */ jsx(Network, { className: `${styles.iconSmall} ${styles.mr1}` }),
309
- /* @__PURE__ */ jsx("span", { children: "Loaded" }),
310
- /* @__PURE__ */ jsx("span", { className: styles.tagValue, children: stats.loadedCount })
311
- ] }) }),
312
- /* @__PURE__ */ jsx(Tag, { className: `${styles.tagContent} reused-status-tag`, children: /* @__PURE__ */ jsxs("div", { className: styles.tagContent, children: [
313
- /* @__PURE__ */ jsx(Repeat, { className: `${styles.iconSmall} ${styles.mr1}` }),
314
- /* @__PURE__ */ jsx("span", { children: "Reused" }),
315
- /* @__PURE__ */ jsx("span", { className: styles.tagValue, children: stats.reusedCount })
316
- ] }) })
400
+ /* @__PURE__ */ jsx(
401
+ HoverTag,
402
+ {
403
+ className: `${styles.tagContent} loaded-status-tag`,
404
+ tooltip: `Loaded: ${stats.loadedCount}`,
405
+ children: /* @__PURE__ */ jsxs("div", { className: styles.tagContent, children: [
406
+ /* @__PURE__ */ jsx(Network, { className: `${styles.iconSmall} ${styles.mr1}` }),
407
+ /* @__PURE__ */ jsx("span", { children: t("sharedDeps.stats.versions.loadedLabel") }),
408
+ /* @__PURE__ */ jsx("span", { className: styles.tagValue, children: stats.loadedCount })
409
+ ] })
410
+ }
411
+ ),
412
+ /* @__PURE__ */ jsx(
413
+ HoverTag,
414
+ {
415
+ className: `${styles.tagContent} reused-status-tag`,
416
+ tooltip: `Reused: ${stats.reusedCount}`,
417
+ children: /* @__PURE__ */ jsxs("div", { className: styles.tagContent, children: [
418
+ /* @__PURE__ */ jsx(Repeat, { className: `${styles.iconSmall} ${styles.mr1}` }),
419
+ /* @__PURE__ */ jsx("span", { children: /* @__PURE__ */ jsx("span", { children: t("sharedDeps.stats.versions.reusedLabel") }) }),
420
+ /* @__PURE__ */ jsx("span", { className: styles.tagValue, children: stats.reusedCount })
421
+ ] })
422
+ }
423
+ )
317
424
  ] }) })
318
425
  ] })
319
426
  ] }) }),
@@ -323,14 +430,12 @@ function SharedDepsExplorer({
323
430
  className: styles.card,
324
431
  title: /* @__PURE__ */ jsxs("div", { className: styles.cardTitle, children: [
325
432
  /* @__PURE__ */ jsx(Box, { className: styles.iconMedium }),
326
- "Who provides the current shared: '",
327
- focusPackage,
328
- "'?"
433
+ t("sharedDeps.focusPanel.title", { package: focusPackage })
329
434
  ] }),
330
435
  children: [
331
436
  /* @__PURE__ */ jsxs("div", { className: styles.controlsGrid, children: [
332
437
  /* @__PURE__ */ jsxs("div", { className: styles.inputGroup, children: [
333
- /* @__PURE__ */ jsx("div", { className: styles.inputLabel, children: "Package Name" }),
438
+ /* @__PURE__ */ jsx("div", { className: styles.inputLabel, children: t("sharedDeps.focusPanel.packageLabel") }),
334
439
  /* @__PURE__ */ jsx(
335
440
  Select,
336
441
  {
@@ -340,24 +445,24 @@ function SharedDepsExplorer({
340
445
  setFocusPackage(value);
341
446
  setFocusVersion("");
342
447
  },
343
- placeholder: "Select Shared Dependency Package Name",
448
+ placeholder: t("sharedDeps.focusPanel.packagePlaceholder"),
344
449
  className: styles.fullWidth,
345
450
  children: filterOptions.packages.map((name) => /* @__PURE__ */ jsx(Select.Option, { value: name, children: name }, name))
346
451
  }
347
452
  )
348
453
  ] }),
349
454
  /* @__PURE__ */ jsxs("div", { className: styles.inputGroup, children: [
350
- /* @__PURE__ */ jsx("div", { className: styles.inputLabel, children: "Version (Optional, inferred if empty)" }),
455
+ /* @__PURE__ */ jsx("div", { className: styles.inputLabel, children: t("sharedDeps.focusPanel.versionLabel") }),
351
456
  /* @__PURE__ */ jsxs(
352
457
  Select,
353
458
  {
354
459
  showSearch: true,
355
460
  value: focusVersion || ALL_VALUE,
356
461
  onChange: (value) => setFocusVersion(value === ALL_VALUE ? "" : value),
357
- placeholder: "All Versions",
462
+ placeholder: t("sharedDeps.focusPanel.versionPlaceholder"),
358
463
  className: styles.fullWidth,
359
464
  children: [
360
- /* @__PURE__ */ jsx(Select.Option, { value: ALL_VALUE, children: "All Versions" }),
465
+ /* @__PURE__ */ jsx(Select.Option, { value: ALL_VALUE, children: t("sharedDeps.focusPanel.versionAllOption") }),
361
466
  focusVersionsForPackage.map((v) => /* @__PURE__ */ jsx(Select.Option, { value: v, children: v }, v))
362
467
  ]
363
468
  }
@@ -369,7 +474,7 @@ function SharedDepsExplorer({
369
474
  {
370
475
  focusResult,
371
476
  hasData,
372
- loadedStatusLabel
477
+ loadedStatusLabel: loadedStatusLabelLocal
373
478
  }
374
479
  ) })
375
480
  ]
@@ -381,18 +486,18 @@ function SharedDepsExplorer({
381
486
  className: styles.card,
382
487
  title: /* @__PURE__ */ jsxs("div", { className: styles.cardTitle, children: [
383
488
  /* @__PURE__ */ jsx(Search, { className: styles.iconMedium }),
384
- "Filter / Search"
489
+ t("sharedDeps.filters.cardTitle")
385
490
  ] }),
386
491
  children: [
387
492
  /* @__PURE__ */ jsxs("div", { className: styles.filterGrid, children: [
388
493
  /* @__PURE__ */ jsxs("div", { className: `${styles.inputGroup} ${styles.padding2}`, children: [
389
- /* @__PURE__ */ jsx("div", { className: styles.inputLabel, children: "Provider" }),
494
+ /* @__PURE__ */ jsx("div", { className: styles.inputLabel, children: t("sharedDeps.filters.providerLabel") }),
390
495
  /* @__PURE__ */ jsx(
391
496
  Select,
392
497
  {
393
498
  value: selectedProvider || void 0,
394
499
  onChange: (value) => setSelectedProvider(value === ALL_VALUE ? "" : value),
395
- placeholder: "All Providers",
500
+ placeholder: t("sharedDeps.filters.providerPlaceholder"),
396
501
  className: styles.fullWidth,
397
502
  allowClear: true,
398
503
  children: filterOptions.providers.map((p) => /* @__PURE__ */ jsx(Select.Option, { value: p, children: p }, p))
@@ -400,13 +505,13 @@ function SharedDepsExplorer({
400
505
  )
401
506
  ] }),
402
507
  /* @__PURE__ */ jsxs("div", { className: `${styles.inputGroup} ${styles.padding2}`, children: [
403
- /* @__PURE__ */ jsx("div", { className: styles.inputLabel, children: "Package Name" }),
508
+ /* @__PURE__ */ jsx("div", { className: styles.inputLabel, children: t("sharedDeps.filters.packageLabel") }),
404
509
  /* @__PURE__ */ jsx(
405
510
  Select,
406
511
  {
407
512
  value: selectedPackage || void 0,
408
513
  onChange: (value) => setSelectedPackage(value === ALL_VALUE ? "" : value),
409
- placeholder: "All Packages",
514
+ placeholder: t("sharedDeps.filters.packagePlaceholder"),
410
515
  className: styles.fullWidth,
411
516
  allowClear: true,
412
517
  children: filterOptions.packages.map((name) => /* @__PURE__ */ jsx(Select.Option, { value: name, children: name }, name))
@@ -414,47 +519,74 @@ function SharedDepsExplorer({
414
519
  )
415
520
  ] }),
416
521
  /* @__PURE__ */ jsxs("div", { className: `${styles.inputGroup} ${styles.padding2}`, children: [
417
- /* @__PURE__ */ jsx("div", { className: styles.inputLabel, children: "Version" }),
522
+ /* @__PURE__ */ jsx("div", { className: styles.inputLabel, children: t("sharedDeps.filters.versionLabel") }),
418
523
  /* @__PURE__ */ jsx(
419
524
  Select,
420
525
  {
421
526
  value: selectedVersion || void 0,
422
527
  onChange: (value) => setSelectedVersion(value === ALL_VALUE ? "" : value),
423
- placeholder: "All Versions",
528
+ placeholder: t("sharedDeps.filters.versionPlaceholder"),
424
529
  className: styles.fullWidth,
425
530
  disabled: !selectedPackage,
426
531
  allowClear: true,
427
532
  children: versionsForSelectedPackage.map((v) => /* @__PURE__ */ jsx(Select.Option, { value: v, children: v }, v))
428
533
  }
429
534
  )
535
+ ] }),
536
+ /* @__PURE__ */ jsxs("div", { className: `${styles.inputGroup} ${styles.padding2}`, children: [
537
+ /* @__PURE__ */ jsxs(
538
+ "div",
539
+ {
540
+ className: styles.inputLabel,
541
+ style: { display: "flex", alignItems: "center", gap: 4 },
542
+ children: [
543
+ "Mode",
544
+ /* @__PURE__ */ jsx(Tooltip, { content: "Shared Tree Shaking Mode, options: server-calc | runtime-infer", children: /* @__PURE__ */ jsx(
545
+ Info,
546
+ {
547
+ size: 14,
548
+ style: { cursor: "help", color: "#86909c" }
549
+ }
550
+ ) })
551
+ ]
552
+ }
553
+ ),
554
+ /* @__PURE__ */ jsx(
555
+ Select,
556
+ {
557
+ value: selectedMode || void 0,
558
+ onChange: (value) => setSelectedMode(value === ALL_VALUE ? "" : value),
559
+ placeholder: "All Modes",
560
+ className: styles.fullWidth,
561
+ disabled: !selectedPackage || modesForSelectedPackage.length === 0,
562
+ allowClear: true,
563
+ children: modesForSelectedPackage.map((v) => /* @__PURE__ */ jsx(Select.Option, { value: v, children: v }, v))
564
+ }
565
+ )
430
566
  ] })
431
567
  ] }),
432
568
  /* @__PURE__ */ jsxs("div", { className: styles.searchGrid, children: [
433
569
  /* @__PURE__ */ jsxs("div", { className: styles.inputGroup, children: [
434
- /* @__PURE__ */ jsx("div", { className: styles.inputLabel, children: "Package Name Keyword (Fuzzy Match)" }),
570
+ /* @__PURE__ */ jsx("div", { className: styles.inputLabel, children: t("sharedDeps.filters.keywordLabel") }),
435
571
  /* @__PURE__ */ jsx(
436
572
  Input,
437
573
  {
438
574
  prefix: /* @__PURE__ */ jsx(Search, { className: styles.iconMedium }),
439
575
  className: styles.searchInput,
440
- placeholder: "e.g., react / axios",
576
+ placeholder: t("sharedDeps.filters.keywordPlaceholder"),
441
577
  value: searchText,
442
578
  onChange: (val) => setSearchText(val)
443
579
  }
444
580
  )
445
581
  ] }),
446
582
  /* @__PURE__ */ jsx("div", { className: styles.matchCount, children: /* @__PURE__ */ jsxs("span", { children: [
447
- "Currently Matched Versions:",
583
+ t("sharedDeps.filters.matchCountLabel"),
448
584
  /* @__PURE__ */ jsx("span", { className: styles.matchValue, children: filteredVersions.length })
449
585
  ] }) })
450
586
  ] }),
451
- !hasData && loadingState === "loading" && /* @__PURE__ */ jsx("div", { className: styles.loadingText, children: "Parsing shared dependency data..." }),
452
- loadingState === "error" && /* @__PURE__ */ jsxs("div", { className: styles.errorText, children: [
453
- "Failed to load shared dependency data:",
454
- " ",
455
- errorMessage != null ? errorMessage : "Unknown Error"
456
- ] }),
457
- hasData && Object.keys(tree).length === 0 && /* @__PURE__ */ jsx("div", { className: styles.noMatchText, children: "No matching shared dependency versions under current filter conditions, try relaxing the filter conditions." }),
587
+ !hasData && loadingState === "loading" && /* @__PURE__ */ jsx("div", { className: styles.loadingText, children: t("sharedDeps.messages.loading") }),
588
+ loadingState === "error" && /* @__PURE__ */ jsx("div", { className: styles.errorText, children: errorMessage ? t("sharedDeps.messages.error", { message: errorMessage }) : t("sharedDeps.messages.errorUnknown") }),
589
+ hasData && Object.keys(tree).length === 0 && /* @__PURE__ */ jsx("div", { className: styles.noMatchText, children: t("sharedDeps.messages.noMatch") }),
458
590
  hasData && Object.keys(tree).length > 0 && /* @__PURE__ */ jsx("div", { className: styles.treeContainer, children: /* @__PURE__ */ jsx("div", { className: styles.collapseWrapper, children: /* @__PURE__ */ jsx(Collapse, { children: Object.entries(tree).map(([provider, scopes]) => /* @__PURE__ */ jsx(
459
591
  Collapse.Item,
460
592
  {
@@ -464,20 +596,18 @@ function SharedDepsExplorer({
464
596
  /* @__PURE__ */ jsx(Server, { className: styles.iconMedium }),
465
597
  /* @__PURE__ */ jsx("span", { children: provider })
466
598
  ] }),
467
- /* @__PURE__ */ jsx("div", { className: styles.providerMeta, children: /* @__PURE__ */ jsxs("span", { children: [
468
- "Scope Count: ",
469
- Object.keys(scopes).length
470
- ] }) })
599
+ /* @__PURE__ */ jsx("div", { className: styles.providerMeta, children: /* @__PURE__ */ jsx("span", { children: t("sharedDeps.filters.scopeCount", {
600
+ count: Object.keys(scopes).length
601
+ }) }) })
471
602
  ] }),
472
603
  children: /* @__PURE__ */ jsx("div", { className: styles.scopeList, children: Object.entries(scopes).map(([scopeName, packages]) => {
473
604
  const list = Object.values(packages).flat();
474
605
  return /* @__PURE__ */ jsxs("div", { className: styles.scopeItem, children: [
475
606
  /* @__PURE__ */ jsxs("div", { className: styles.scopeHeader, children: [
476
607
  /* @__PURE__ */ jsx(Layers, { className: styles.iconSmall }),
477
- /* @__PURE__ */ jsxs("span", { children: [
478
- "Scope: ",
479
- scopeName
480
- ] })
608
+ /* @__PURE__ */ jsx("span", { children: t("sharedDeps.filters.scopePrefix", {
609
+ name: scopeName
610
+ }) })
481
611
  ] }),
482
612
  /* @__PURE__ */ jsx("div", { className: styles.tableContainer, children: /* @__PURE__ */ jsx(
483
613
  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 {