@module-federation/devtools 0.0.0-perf-devtools-20260107043700 → 0.0.0-pre-release-2-5-20260518135705

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 (110) hide show
  1. package/README.md +3 -0
  2. package/dist/es/App.css +6 -5
  3. package/dist/es/App.js +208 -61
  4. package/dist/es/App.module.js +1 -1
  5. package/dist/es/App_module.css +41 -39
  6. package/dist/es/component/DependencyGraph/index.js +11 -12
  7. package/dist/es/component/DependencyGraph/index_module.css +20 -17
  8. package/dist/es/component/DependencyGraphItem/index.js +5 -3
  9. package/dist/es/component/DependencyGraphItem/index_module.css +7 -7
  10. package/dist/es/component/Form/index.js +24 -31
  11. package/dist/es/component/Form/index.module.js +1 -1
  12. package/dist/es/component/Form/index_module.css +22 -25
  13. package/dist/es/component/LanguageSwitch.js +50 -0
  14. package/dist/es/component/Layout/index.js +27 -10
  15. package/dist/es/component/Layout/index_module.css +7 -7
  16. package/dist/es/component/LoadingTrace/index.js +944 -0
  17. package/dist/es/component/LoadingTrace/index.module.js +5 -0
  18. package/dist/es/component/LoadingTrace/index_module.css +876 -0
  19. package/dist/es/component/ModuleInfo/index.js +65 -41
  20. package/dist/es/component/ModuleInfo/index_module.css +12 -11
  21. package/dist/es/component/SharedDepsExplorer/FocusResultDisplay.js +5 -3
  22. package/dist/es/component/SharedDepsExplorer/FocusResultDisplay_module.css +5 -5
  23. package/dist/es/component/SharedDepsExplorer/index.js +223 -93
  24. package/dist/es/component/SharedDepsExplorer/index_module.css +12 -2
  25. package/dist/es/component/SharedDepsExplorer/share-utils.js +21 -5
  26. package/dist/es/component/ThemeToggle.js +19 -0
  27. package/dist/es/component/ThemeToggle.module.js +5 -0
  28. package/dist/es/component/ThemeToggle_module.css +12 -0
  29. package/dist/es/hooks/useDevtoolsTheme.js +77 -0
  30. package/dist/es/i18n/index.js +688 -0
  31. package/dist/es/utils/chrome/fast-refresh.js +297 -173
  32. package/dist/es/utils/chrome/index.js +11 -11
  33. package/dist/es/utils/chrome/messages.js +7 -1
  34. package/dist/es/utils/chrome/observability-plugin.js +93 -0
  35. package/dist/es/utils/chrome/observability-shared.js +99 -0
  36. package/dist/es/utils/chrome/observability.js +208 -0
  37. package/dist/es/utils/chrome/override-remote.js +2 -0
  38. package/dist/es/utils/chrome/post-message-listener.js +17 -2
  39. package/dist/es/utils/chrome/post-message-start.js +4 -10
  40. package/dist/es/utils/chrome/post-message.js +12 -3
  41. package/dist/es/utils/chrome/safe-post-message.js +124 -0
  42. package/dist/es/utils/chrome/snapshot-plugin.js +2 -36
  43. package/dist/es/utils/data/index.js +5 -25
  44. package/dist/es/vendor/basic-proxy-core.js +155 -0
  45. package/dist/es/worker/index.js +27 -8
  46. package/dist/lib/App.css +6 -5
  47. package/dist/lib/App.js +206 -61
  48. package/dist/lib/App.module.js +1 -1
  49. package/dist/lib/App_module.css +41 -39
  50. package/dist/lib/component/DependencyGraph/index.js +11 -12
  51. package/dist/lib/component/DependencyGraph/index_module.css +20 -17
  52. package/dist/lib/component/DependencyGraphItem/index.js +5 -3
  53. package/dist/lib/component/DependencyGraphItem/index_module.css +7 -7
  54. package/dist/lib/component/Form/index.js +24 -31
  55. package/dist/lib/component/Form/index.module.js +1 -1
  56. package/dist/lib/component/Form/index_module.css +22 -25
  57. package/dist/lib/component/LanguageSwitch.js +80 -0
  58. package/dist/lib/component/Layout/index.js +27 -10
  59. package/dist/lib/component/Layout/index_module.css +7 -7
  60. package/dist/lib/component/LoadingTrace/index.js +954 -0
  61. package/dist/lib/component/LoadingTrace/index.module.js +25 -0
  62. package/dist/lib/component/LoadingTrace/index_module.css +876 -0
  63. package/dist/lib/component/ModuleInfo/index.js +65 -41
  64. package/dist/lib/component/ModuleInfo/index_module.css +12 -11
  65. package/dist/lib/component/SharedDepsExplorer/FocusResultDisplay.js +5 -3
  66. package/dist/lib/component/SharedDepsExplorer/FocusResultDisplay_module.css +5 -5
  67. package/dist/lib/component/SharedDepsExplorer/index.js +217 -91
  68. package/dist/lib/component/SharedDepsExplorer/index_module.css +12 -2
  69. package/dist/lib/component/SharedDepsExplorer/share-utils.js +21 -5
  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 +722 -0
  75. package/dist/lib/utils/chrome/fast-refresh.js +250 -135
  76. package/dist/lib/utils/chrome/index.js +11 -11
  77. package/dist/lib/utils/chrome/messages.js +11 -2
  78. package/dist/lib/utils/chrome/observability-plugin.js +86 -0
  79. package/dist/lib/utils/chrome/observability-shared.js +126 -0
  80. package/dist/lib/utils/chrome/observability.js +234 -0
  81. package/dist/lib/utils/chrome/override-remote.js +18 -0
  82. package/dist/lib/utils/chrome/post-message-listener.js +14 -2
  83. package/dist/lib/utils/chrome/post-message-start.js +4 -10
  84. package/dist/lib/utils/chrome/post-message.js +12 -3
  85. package/dist/lib/utils/chrome/safe-post-message.js +148 -0
  86. package/dist/lib/utils/chrome/snapshot-plugin.js +5 -46
  87. package/dist/lib/utils/data/index.js +6 -28
  88. package/dist/lib/vendor/basic-proxy-core.js +147 -0
  89. package/dist/lib/worker/index.js +27 -8
  90. package/dist/types/src/component/LanguageSwitch.d.ts +2 -0
  91. package/dist/types/src/component/LoadingTrace/index.d.ts +6 -0
  92. package/dist/types/src/component/SharedDepsExplorer/share-utils.d.ts +2 -1
  93. package/dist/types/src/component/ThemeToggle.d.ts +8 -0
  94. package/dist/types/src/hooks/useDevtoolsTheme.d.ts +2 -0
  95. package/dist/types/src/i18n/index.d.ts +5 -0
  96. package/dist/types/src/utils/chrome/messages.d.ts +3 -0
  97. package/dist/types/src/utils/chrome/observability-plugin.d.ts +1 -0
  98. package/dist/types/src/utils/chrome/observability-shared.d.ts +41 -0
  99. package/dist/types/src/utils/chrome/observability.d.ts +110 -0
  100. package/dist/types/src/utils/chrome/override-remote.d.ts +1 -0
  101. package/dist/types/src/utils/chrome/post-message-listener.d.ts +1 -0
  102. package/dist/types/src/utils/chrome/post-message-start.d.ts +1 -1
  103. package/dist/types/src/utils/chrome/safe-post-message.d.ts +1 -0
  104. package/dist/types/src/utils/chrome/snapshot-plugin.d.ts +0 -3
  105. package/dist/types/src/utils/data/index.d.ts +0 -1
  106. package/install-deps.bash +7 -3
  107. package/package.json +44 -24
  108. package/dist/es/utils/data/snapshot.js +0 -82
  109. package/dist/lib/utils/data/snapshot.js +0 -107
  110. package/dist/types/src/utils/data/snapshot.d.ts +0 -3
package/README.md CHANGED
@@ -4,5 +4,8 @@
4
4
 
5
5
  - Proxy online Module Federation remote module to local
6
6
  - Let proxied remote module get hmr
7
+ - Inject the Chrome-specific observability runtime plugin from the Loading Trace
8
+ tab, receive page events through `window.postMessage`, and export collected
9
+ loading reports
7
10
 
8
11
  https://module-federation.io/
package/dist/es/App.css CHANGED
@@ -1,12 +1,13 @@
1
1
  .loaded-status-tag {
2
- color: white !important;
3
- background-color: black !important;
2
+ color: var(--color-bg-1, white) !important;
3
+ background-color: var(--color-neutral-10, black) !important;
4
4
  }
5
5
  .reused-status-tag {
6
6
  background-color: greenyellow !important;
7
+ color: black !important;
7
8
  }
8
9
  .common-tag {
9
- color: rgb(113 113 122 / var(--tw-text-opacity)) !important;
10
- background-color: #fff !important;
11
- border-color: rgba(228, 228, 231, 0.5) !important;
10
+ color: var(--color-text-2, #71717a) !important;
11
+ background-color: var(--color-bg-1, #ffffff) !important;
12
+ border-color: var(--color-border-2, rgba(228, 228, 231, 0.5)) !important;
12
13
  }
package/dist/es/App.js CHANGED
@@ -1,3 +1,19 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
4
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
5
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
6
+ var __spreadValues = (a, b) => {
7
+ for (var prop in b || (b = {}))
8
+ if (__hasOwnProp.call(b, prop))
9
+ __defNormalProp(a, prop, b[prop]);
10
+ if (__getOwnPropSymbols)
11
+ for (var prop of __getOwnPropSymbols(b)) {
12
+ if (__propIsEnum.call(b, prop))
13
+ __defNormalProp(a, prop, b[prop]);
14
+ }
15
+ return a;
16
+ };
1
17
  var __async = (__this, __arguments, generator) => {
2
18
  return new Promise((resolve, reject) => {
3
19
  var fulfilled = (value) => {
@@ -23,11 +39,16 @@ import { useState, useEffect, useMemo, useCallback, useRef } from "react";
23
39
  import "@arco-design/web-react/es/_util/react-19-adapter";
24
40
  import "./App.css";
25
41
  import { Empty, Tag, Button, Tooltip } from "@arco-design/web-react";
42
+ import { I18nextProvider, useTranslation } from "react-i18next";
26
43
  import "./init";
44
+ import { IconRefresh } from "@arco-design/web-react/icon";
27
45
  import ProxyLayout from "./component/Layout";
28
46
  import Dependency from "./component/DependencyGraph";
29
47
  import ModuleInfo from "./component/ModuleInfo";
30
48
  import SharedDepsExplorer from "./component/SharedDepsExplorer";
49
+ import LoadingTrace from "./component/LoadingTrace";
50
+ import LanguageSwitch from "./component/LanguageSwitch";
51
+ import ThemeToggle from "./component/ThemeToggle";
31
52
  import {
32
53
  getGlobalModuleInfo,
33
54
  refreshModuleInfo,
@@ -35,8 +56,11 @@ import {
35
56
  syncActiveTab
36
57
  } from "./utils";
37
58
  import { MESSAGE_ACTIVE_TAB_CHANGED } from "./utils/chrome/messages";
59
+ import { useDevtoolsTheme } from "./hooks/useDevtoolsTheme";
60
+ import i18n from "./i18n";
38
61
  import "@arco-design/web-react/dist/css/arco.css";
39
62
  import styles from "./App.module";
63
+ import btnStyles from "./component/ThemeToggle.module";
40
64
  const cloneModuleInfo = (info) => {
41
65
  try {
42
66
  return JSON.parse(JSON.stringify(info || {}));
@@ -92,13 +116,15 @@ const buildShareSnapshot = (share) => {
92
116
  return scopes;
93
117
  };
94
118
  const NAV_ITEMS = [
95
- { key: "moduleInfo", label: "Module info" },
96
- { key: "proxy", label: "Proxy" },
97
- { key: "dependency", label: "Dependency graph" },
98
- { key: "share", label: "Shared" },
99
- { key: "performance", label: "Performance" }
119
+ { key: "moduleInfo", i18nKey: "app.nav.moduleInfo" },
120
+ { key: "proxy", i18nKey: "app.nav.proxy" },
121
+ { key: "dependency", i18nKey: "app.nav.dependency" },
122
+ { key: "share", i18nKey: "app.nav.share" },
123
+ { key: "loadingTrace", i18nKey: "app.nav.loadingTrace" },
124
+ { key: "performance", i18nKey: "app.nav.performance" }
100
125
  ];
101
- const App = (props) => {
126
+ const THEME_STORAGE_KEY = "mf-devtools-theme";
127
+ const InnerApp = (props) => {
102
128
  const {
103
129
  versionList,
104
130
  setVersionList,
@@ -108,6 +134,10 @@ const App = (props) => {
108
134
  customValueValidate,
109
135
  headerSlot
110
136
  } = props;
137
+ const autoTheme = useDevtoolsTheme();
138
+ const [userTheme, setUserTheme] = useState(null);
139
+ const effectiveTheme = userTheme != null ? userTheme : autoTheme;
140
+ const { t } = useTranslation();
111
141
  const [moduleInfo, setModuleInfo] = useState(
112
142
  () => {
113
143
  var _a;
@@ -123,6 +153,7 @@ const App = (props) => {
123
153
  const [inspectedTab, setInspectedTab] = useState(
124
154
  window.targetTab
125
155
  );
156
+ const [inspectedTabRefreshKey, setInspectedTabRefreshKey] = useState(0);
126
157
  const [activePanel, setActivePanel] = useState("proxy");
127
158
  const [selectedModuleId, setSelectedModuleId] = useState(null);
128
159
  const [refreshing, setRefreshing] = useState(false);
@@ -147,6 +178,64 @@ const App = (props) => {
147
178
  [consumers]
148
179
  );
149
180
  const hasModule = moduleCount > 0 || process.env.NODE_ENV === "development";
181
+ useEffect(() => {
182
+ var _a;
183
+ if (typeof window === "undefined") {
184
+ return;
185
+ }
186
+ let cancelled = false;
187
+ const applyTheme = (value) => {
188
+ if (cancelled) {
189
+ return;
190
+ }
191
+ if (value === "light" || value === "dark") {
192
+ setUserTheme(value);
193
+ }
194
+ };
195
+ try {
196
+ const stored = window.localStorage.getItem(THEME_STORAGE_KEY);
197
+ if (stored === "light" || stored === "dark") {
198
+ applyTheme(stored);
199
+ return;
200
+ }
201
+ } catch (error) {
202
+ console.warn("[MF Devtools] read theme from localStorage failed", error);
203
+ }
204
+ try {
205
+ const chromeObj = window.chrome;
206
+ const storage = (_a = chromeObj == null ? void 0 : chromeObj.storage) == null ? void 0 : _a.sync;
207
+ if (storage && typeof storage.get === "function") {
208
+ storage.get([THEME_STORAGE_KEY], (result) => {
209
+ applyTheme(result == null ? void 0 : result[THEME_STORAGE_KEY]);
210
+ });
211
+ }
212
+ } catch (error) {
213
+ console.warn(
214
+ "[MF Devtools] read theme from chrome.storage.sync failed",
215
+ error
216
+ );
217
+ }
218
+ return () => {
219
+ cancelled = true;
220
+ };
221
+ }, []);
222
+ useEffect(() => {
223
+ if (typeof document === "undefined") {
224
+ return;
225
+ }
226
+ const { body } = document;
227
+ if (!body) {
228
+ return;
229
+ }
230
+ if (effectiveTheme === "dark") {
231
+ body.setAttribute("arco-theme", "dark");
232
+ } else {
233
+ body.removeAttribute("arco-theme");
234
+ }
235
+ return () => {
236
+ body.removeAttribute("arco-theme");
237
+ };
238
+ }, [effectiveTheme]);
150
239
  useEffect(() => {
151
240
  if (!moduleKeys.length) {
152
241
  setSelectedModuleId(null);
@@ -172,10 +261,14 @@ const App = (props) => {
172
261
  };
173
262
  }, [applyModuleUpdate]);
174
263
  useEffect(() => {
175
- const updateActiveTab = (tabId) => __async(void 0, null, function* () {
264
+ const updateActiveTab = (tabId, options) => __async(void 0, null, function* () {
176
265
  var _a, _b;
177
266
  const tab = yield syncActiveTab(tabId);
178
267
  setInspectedTab(tab || void 0);
268
+ if ((options == null ? void 0 : options.status) === "loading") {
269
+ setInspectedTabRefreshKey((key) => key + 1);
270
+ return;
271
+ }
179
272
  if ((_a = window.__FEDERATION__) == null ? void 0 : _a.moduleInfo) {
180
273
  applyModuleUpdate(cloneModuleInfo((_b = window.__FEDERATION__) == null ? void 0 : _b.moduleInfo));
181
274
  }
@@ -183,7 +276,7 @@ const App = (props) => {
183
276
  });
184
277
  const onMessage = (message, _sender, _sendResponse) => {
185
278
  if ((message == null ? void 0 : message.type) === MESSAGE_ACTIVE_TAB_CHANGED) {
186
- updateActiveTab(message.tabId);
279
+ updateActiveTab(message.tabId, { status: message.status });
187
280
  }
188
281
  };
189
282
  chrome.runtime.onMessage.addListener(onMessage);
@@ -211,6 +304,34 @@ const App = (props) => {
211
304
  setRefreshing(false);
212
305
  }
213
306
  });
307
+ const handleThemeToggle = () => {
308
+ var _a;
309
+ const current = effectiveTheme;
310
+ const next = current === "dark" ? "light" : "dark";
311
+ setUserTheme(next);
312
+ if (typeof window !== "undefined") {
313
+ try {
314
+ window.localStorage.setItem(THEME_STORAGE_KEY, next);
315
+ } catch (error) {
316
+ console.warn(
317
+ "[MF Devtools] persist theme to localStorage failed",
318
+ error
319
+ );
320
+ }
321
+ try {
322
+ const chromeObj = window.chrome;
323
+ const storage = (_a = chromeObj == null ? void 0 : chromeObj.storage) == null ? void 0 : _a.sync;
324
+ if (storage && typeof storage.set === "function") {
325
+ storage.set({ [THEME_STORAGE_KEY]: next });
326
+ }
327
+ } catch (error) {
328
+ console.warn(
329
+ "[MF Devtools] persist theme to chrome.storage.sync failed",
330
+ error
331
+ );
332
+ }
333
+ }
334
+ };
214
335
  const resetModuleInfo = useCallback(() => {
215
336
  var _a;
216
337
  const origin = ((_a = window.__FEDERATION__) == null ? void 0 : _a.originModuleInfo) || {};
@@ -270,7 +391,7 @@ const App = (props) => {
270
391
  return hasModule ? /* @__PURE__ */ jsx(Dependency, { snapshot: moduleInfo }) : /* @__PURE__ */ jsx("div", { className: styles.emptyState, children: /* @__PURE__ */ jsx(
271
392
  Empty,
272
393
  {
273
- description: "No ModuleInfo Detected",
394
+ description: t("common.empty.noModuleInfo"),
274
395
  className: styles.empty
275
396
  }
276
397
  ) });
@@ -283,66 +404,92 @@ const App = (props) => {
283
404
  )
284
405
  }
285
406
  );
407
+ case "loadingTrace":
408
+ return /* @__PURE__ */ jsx(
409
+ LoadingTrace,
410
+ {
411
+ tabId: inspectedTab == null ? void 0 : inspectedTab.id,
412
+ resetKey: inspectedTabRefreshKey
413
+ }
414
+ );
286
415
  case "performance":
287
- return /* @__PURE__ */ jsx("div", { className: styles.placeholder, children: "WIP..." });
416
+ return /* @__PURE__ */ jsx("div", { className: styles.placeholder, children: t("app.performance.placeholder") });
288
417
  default:
289
418
  return null;
290
419
  }
291
420
  };
292
- return /* @__PURE__ */ jsxs("div", { className: `${styles.shell} ${styles.overrideArco}`, children: [
293
- /* @__PURE__ */ jsx("aside", { className: styles.sidebar, children: NAV_ITEMS.map((item) => /* @__PURE__ */ jsx(
294
- "button",
295
- {
296
- type: "button",
297
- className: `${styles.tabItem} ${activePanel === item.key ? styles.activeTab : ""}`,
298
- onClick: () => setActivePanel(item.key),
299
- children: item.label
300
- },
301
- item.key
302
- )) }),
303
- /* @__PURE__ */ jsxs("section", { className: styles.panel, children: [
304
- /* @__PURE__ */ jsxs("header", { className: styles.header, children: [
305
- /* @__PURE__ */ jsxs("div", { className: styles.headerTop, children: [
306
- /* @__PURE__ */ jsxs("div", { className: styles.branding, children: [
307
- /* @__PURE__ */ jsx("span", { className: styles.logo, children: "Module Federation" }),
308
- /* @__PURE__ */ jsx("span", { className: styles.subtitle, children: "DevTools Companion" })
309
- ] }),
310
- /* @__PURE__ */ jsx(Tooltip, { content: "重新同步当前页面的 Federation 信息", children: /* @__PURE__ */ jsx(
311
- Button,
312
- {
313
- size: "mini",
314
- type: "primary",
315
- loading: refreshing,
316
- onClick: handleRefresh,
317
- className: styles.refresh,
318
- children: "Refresh"
319
- }
320
- ) })
321
- ] }),
322
- /* @__PURE__ */ jsxs("div", { className: styles.meta, children: [
323
- /* @__PURE__ */ jsxs("div", { className: styles.scope, children: [
324
- /* @__PURE__ */ jsx("span", { className: styles.scopeLabel, children: "Focus Tab" }),
325
- /* @__PURE__ */ jsx(Tag, { className: "common-tag", children: (inspectedTab == null ? void 0 : inspectedTab.title) || "Waiting for target" })
326
- ] }),
327
- /* @__PURE__ */ jsxs("div", { className: styles.stats, children: [
328
- /* @__PURE__ */ jsxs("div", { className: styles.statBlock, children: [
329
- /* @__PURE__ */ jsx("span", { className: styles.statValue, children: moduleCount }),
330
- /* @__PURE__ */ jsx("span", { className: styles.statLabel, children: "Modules" })
331
- ] }),
332
- /* @__PURE__ */ jsxs("div", { className: styles.statBlock, children: [
333
- /* @__PURE__ */ jsx("span", { className: styles.statValue, children: producer.length }),
334
- /* @__PURE__ */ jsx("span", { className: styles.statLabel, children: "Remotes" })
421
+ return /* @__PURE__ */ jsxs(
422
+ "div",
423
+ {
424
+ className: `${styles.shell} ${styles.overrideArco} ${effectiveTheme === "dark" ? "arco-theme-dark" : ""}`,
425
+ children: [
426
+ /* @__PURE__ */ jsx("aside", { className: styles.sidebar, children: NAV_ITEMS.map((item) => /* @__PURE__ */ jsx(
427
+ "button",
428
+ {
429
+ type: "button",
430
+ className: `${styles.tabItem} ${activePanel === item.key ? styles.activeTab : ""}`,
431
+ onClick: () => setActivePanel(item.key),
432
+ children: t(item.i18nKey)
433
+ },
434
+ item.key
435
+ )) }),
436
+ /* @__PURE__ */ jsxs("section", { className: styles.panel, children: [
437
+ /* @__PURE__ */ jsxs("header", { className: styles.header, children: [
438
+ /* @__PURE__ */ jsxs("div", { className: styles.headerTop, children: [
439
+ /* @__PURE__ */ jsxs("div", { className: styles.branding, children: [
440
+ /* @__PURE__ */ jsx("span", { className: styles.logo, children: t("app.header.title") }),
441
+ /* @__PURE__ */ jsx("span", { className: styles.subtitle, children: t("app.header.subtitle") })
442
+ ] }),
443
+ /* @__PURE__ */ jsxs("div", { className: styles.headerActions, children: [
444
+ /* @__PURE__ */ jsx(LanguageSwitch, {}),
445
+ /* @__PURE__ */ jsx(
446
+ ThemeToggle,
447
+ {
448
+ theme: effectiveTheme,
449
+ onToggle: handleThemeToggle
450
+ }
451
+ ),
452
+ /* @__PURE__ */ jsx(Tooltip, { content: t("app.header.refresh.tooltip"), children: /* @__PURE__ */ jsx(
453
+ Button,
454
+ {
455
+ size: "default",
456
+ icon: /* @__PURE__ */ jsx(IconRefresh, {}),
457
+ loading: refreshing,
458
+ onClick: handleRefresh,
459
+ className: btnStyles.themeToggle
460
+ }
461
+ ) })
462
+ ] })
335
463
  ] }),
336
- /* @__PURE__ */ jsxs("div", { className: styles.statBlock, children: [
337
- /* @__PURE__ */ jsx("span", { className: styles.statValue, children: consumerCount }),
338
- /* @__PURE__ */ jsx("span", { className: styles.statLabel, children: "Consumers" })
464
+ /* @__PURE__ */ jsxs("div", { className: styles.meta, children: [
465
+ /* @__PURE__ */ jsxs("div", { className: styles.scope, children: [
466
+ /* @__PURE__ */ jsx("span", { className: styles.scopeLabel, children: t("app.header.scope.label") }),
467
+ /* @__PURE__ */ jsx(Tag, { className: "common-tag", children: (inspectedTab == null ? void 0 : inspectedTab.title) || t("app.header.scope.waiting") })
468
+ ] }),
469
+ /* @__PURE__ */ jsxs("div", { className: styles.stats, children: [
470
+ /* @__PURE__ */ jsxs("div", { className: styles.statBlock, children: [
471
+ /* @__PURE__ */ jsx("span", { className: styles.statValue, children: moduleCount }),
472
+ /* @__PURE__ */ jsx("span", { className: styles.statLabel, children: t("app.header.stats.modules") })
473
+ ] }),
474
+ /* @__PURE__ */ jsxs("div", { className: styles.statBlock, children: [
475
+ /* @__PURE__ */ jsx("span", { className: styles.statValue, children: producer.length }),
476
+ /* @__PURE__ */ jsx("span", { className: styles.statLabel, children: t("app.header.stats.remotes") })
477
+ ] }),
478
+ /* @__PURE__ */ jsxs("div", { className: styles.statBlock, children: [
479
+ /* @__PURE__ */ jsx("span", { className: styles.statValue, children: consumerCount }),
480
+ /* @__PURE__ */ jsx("span", { className: styles.statLabel, children: t("app.header.stats.consumers") })
481
+ ] })
482
+ ] })
339
483
  ] })
340
- ] })
484
+ ] }),
485
+ /* @__PURE__ */ jsx("div", { className: styles.body, children: /* @__PURE__ */ jsx("div", { className: styles.content, children: renderContent() }) })
341
486
  ] })
342
- ] }),
343
- /* @__PURE__ */ jsx("div", { className: styles.body, children: /* @__PURE__ */ jsx("div", { className: styles.content, children: renderContent() }) })
344
- ] })
345
- ] });
487
+ ]
488
+ }
489
+ );
490
+ };
491
+ const App = (props) => {
492
+ return /* @__PURE__ */ jsx(I18nextProvider, { i18n, children: /* @__PURE__ */ jsx(InnerApp, __spreadValues({}, props)) });
346
493
  };
347
494
  var App_default = App;
348
495
  export {
@@ -1,5 +1,5 @@
1
1
  import "./App_module.css";
2
- var App_module_default = { "shell": "shell_ae2ee", "sidebar": "sidebar_ae2ee", "tabItem": "tabItem_ae2ee", "activeTab": "activeTab_ae2ee", "panel": "panel_ae2ee", "header": "header_ae2ee", "headerTop": "headerTop_ae2ee", "branding": "branding_ae2ee", "refresh": "refresh_ae2ee", "logo": "logo_ae2ee", "subtitle": "subtitle_ae2ee", "meta": "meta_ae2ee", "scope": "scope_ae2ee", "scopeLabel": "scopeLabel_ae2ee", "stats": "stats_ae2ee", "statBlock": "statBlock_ae2ee", "statValue": "statValue_ae2ee", "statLabel": "statLabel_ae2ee", "body": "body_ae2ee", "content": "content_ae2ee", "emptyState": "emptyState_ae2ee", "empty": "empty_ae2ee", "placeholder": "placeholder_ae2ee", "overrideArco": "overrideArco_ae2ee" };
2
+ var App_module_default = { "shell": "shell_ae2ee", "sidebar": "sidebar_ae2ee", "tabItem": "tabItem_ae2ee", "activeTab": "activeTab_ae2ee", "panel": "panel_ae2ee", "header": "header_ae2ee", "headerTop": "headerTop_ae2ee", "branding": "branding_ae2ee", "logo": "logo_ae2ee", "subtitle": "subtitle_ae2ee", "meta": "meta_ae2ee", "scope": "scope_ae2ee", "scopeLabel": "scopeLabel_ae2ee", "stats": "stats_ae2ee", "statBlock": "statBlock_ae2ee", "statValue": "statValue_ae2ee", "statLabel": "statLabel_ae2ee", "body": "body_ae2ee", "content": "content_ae2ee", "emptyState": "emptyState_ae2ee", "empty": "empty_ae2ee", "placeholder": "placeholder_ae2ee", "overrideArco": "overrideArco_ae2ee" };
3
3
  export {
4
4
  App_module_default as default
5
5
  };
@@ -10,7 +10,7 @@
10
10
  flex: 1 1;
11
11
  }
12
12
  .arco-empty {
13
- color: #4b5563;
13
+ color: var(--color-text-2, #4b5563);
14
14
  }
15
15
  .arco-select, .arco-input {
16
16
  background: transparent;
@@ -20,6 +20,12 @@
20
20
  border: 1px solid rgba(34, 197, 94, 0.35);
21
21
  color: #4b5563;
22
22
  }
23
+ body {
24
+ --form-control-alpha: 0.9;
25
+ }
26
+ body[arco-theme=dark] {
27
+ --form-control-alpha: 0.1;
28
+ }
23
29
 
24
30
  .shell_ae2ee {
25
31
  width: 100%;
@@ -41,8 +47,8 @@
41
47
  gap: 12px;
42
48
  padding: clamp(18px, 2.5vw, 24px) clamp(14px, 2vw, 18px);
43
49
  border-radius: 22px;
44
- border: 1px solid rgba(148, 163, 184, 0.18);
45
- background: rgba(255, 255, 255, 0.95);
50
+ border: 1px solid var(--color-border-1, rgba(148, 163, 184, 0.18));
51
+ background: var(--color-bg-2, rgba(255, 255, 255, 0.95));
46
52
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.08), 0 1px 0 rgba(0, 0, 0, 0.05) inset;
47
53
  box-sizing: border-box;
48
54
  }
@@ -54,8 +60,8 @@
54
60
  border: 1px solid transparent;
55
61
  border-radius: 12px;
56
62
  padding: 10px 12px;
57
- background: rgba(249, 250, 251, 0.8);
58
- color: rgba(55, 65, 81, 0.9);
63
+ background: var(--color-bg-2, rgba(249, 250, 251, 0.8));
64
+ color: var(--color-text-2, rgba(55, 65, 81, 0.9));
59
65
  font-size: 13px;
60
66
  letter-spacing: 0.04em;
61
67
  text-transform: uppercase;
@@ -66,14 +72,14 @@
66
72
 
67
73
  .tabItem_ae2ee:hover {
68
74
  border-color: rgba(37, 49, 48, 0.45);
69
- color: #1e293b;
75
+ color: var(--color-text-1, #1e293b);
70
76
  }
71
77
 
72
78
  .activeTab_ae2ee {
73
- border-color: rgba(99, 102, 241, 0.65);
74
- background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.1));
75
- color: #1e293b;
76
- box-shadow: 0 12px 28px rgba(30, 64, 175, 0.25);
79
+ border-color: rgba(24, 24, 27, 0.28);
80
+ background: linear-gradient(135deg, rgba(24, 24, 27, 0.08), rgba(113, 113, 122, 0.08));
81
+ color: var(--color-text-1, #1e293b);
82
+ box-shadow: 0 12px 28px rgba(24, 24, 27, 0.14);
77
83
  }
78
84
 
79
85
  .panel_ae2ee {
@@ -82,8 +88,8 @@
82
88
  width: 100%;
83
89
  max-width: 1120px;
84
90
  min-height: calc(100vh - 56px);
85
- background: rgba(255, 255, 255, 0.98);
86
- border: 1px solid rgba(0, 0, 0, 0.08);
91
+ background: var(--color-bg-1, rgba(255, 255, 255, 0.98));
92
+ border: 1px solid var(--color-border-2, rgba(0, 0, 0, 0.08));
87
93
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.06), 0 2px 0 rgba(0, 0, 0, 0.04) inset;
88
94
  border-radius: 22px;
89
95
  padding: clamp(20px, 3vw, 32px);
@@ -91,7 +97,7 @@
91
97
  flex-direction: column;
92
98
  gap: 28px;
93
99
  box-sizing: border-box;
94
- color: #1f2937;
100
+ color: var(--color-text-1, #1f2937);
95
101
  }
96
102
 
97
103
  .header_ae2ee {
@@ -113,25 +119,17 @@
113
119
  gap: 4px;
114
120
  }
115
121
 
116
- .refresh_ae2ee .arco-btn-primary {
117
- background: linear-gradient(135deg, rgba(34, 197, 94, 0.8), rgba(22, 163, 74, 0.7));
118
- border-color: rgba(34, 197, 94, 0.65);
119
- }
120
- .refresh_ae2ee .arco-btn-primary:hover {
121
- background: linear-gradient(135deg, rgba(34, 197, 94, 0.95), rgba(22, 163, 74, 0.85));
122
- }
123
-
124
122
  .logo_ae2ee {
125
123
  font-size: 20px;
126
124
  font-weight: 600;
127
125
  letter-spacing: 0.02em;
128
- color: #1e293b;
126
+ color: var(--color-text-1, #1e293b);
129
127
  }
130
128
 
131
129
  .subtitle_ae2ee {
132
130
  font-size: 12px;
133
131
  font-weight: 500;
134
- color: rgba(75, 85, 99, 0.8);
132
+ color: var(--color-text-2, rgba(75, 85, 99, 0.8));
135
133
  text-transform: uppercase;
136
134
  letter-spacing: 0.12em;
137
135
  }
@@ -153,7 +151,7 @@
153
151
 
154
152
  .scopeLabel_ae2ee {
155
153
  font-size: 12px;
156
- color: rgba(75, 85, 99, 0.85);
154
+ color: var(--color-text-2, rgba(75, 85, 99, 0.85));
157
155
  text-transform: uppercase;
158
156
  letter-spacing: 0.08em;
159
157
  }
@@ -172,7 +170,7 @@
172
170
  min-width: 80px;
173
171
  padding: 12px 14px;
174
172
  border-radius: 14px;
175
- background: linear-gradient(140deg, rgba(243, 244, 246, 0.8) 0%, rgba(229, 231, 235, 0.6) 100%);
173
+ background: linear-gradient(140deg, rgba(243, 244, 246, 0) 0%, rgba(229, 231, 235, 0.1) 100%);
176
174
  border: 1px solid rgba(203, 213, 225, 0.4);
177
175
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
178
176
  }
@@ -180,13 +178,13 @@
180
178
  .statValue_ae2ee {
181
179
  font-size: 22px;
182
180
  font-weight: 600;
183
- color: #1e293b;
181
+ color: var(--color-text-1, #1e293b);
184
182
  line-height: 1.1;
185
183
  }
186
184
 
187
185
  .statLabel_ae2ee {
188
186
  font-size: 11px;
189
- color: rgba(75, 85, 99, 0.88);
187
+ color: var(--color-text-2, rgba(75, 85, 99, 0.88));
190
188
  letter-spacing: 0.04em;
191
189
  text-transform: uppercase;
192
190
  }
@@ -251,7 +249,7 @@
251
249
  justify-content: center;
252
250
  border-radius: 18px;
253
251
  border: 1px dashed rgba(203, 213, 225, 0.4);
254
- background: rgba(255, 255, 255, 0.8);
252
+ background: var(--color-bg-2, rgba(255, 255, 255, 0.8));
255
253
  padding: 32px;
256
254
  }
257
255
 
@@ -266,8 +264,8 @@
266
264
  justify-content: center;
267
265
  border-radius: 18px;
268
266
  border: 1px dashed rgba(203, 213, 225, 0.4);
269
- background: rgba(255, 255, 255, 0.8);
270
- color: rgba(75, 85, 99, 0.75);
267
+ background: var(--color-bg-2, rgba(255, 255, 255, 0.8));
268
+ color: var(--color-text-2, rgba(75, 85, 99, 0.75));
271
269
  font-size: 14px;
272
270
  letter-spacing: 0.08em;
273
271
  text-transform: uppercase;
@@ -275,18 +273,18 @@
275
273
 
276
274
  .overrideArco_ae2ee .arco-input-inner-wrapper,
277
275
  .overrideArco_ae2ee .arco-select-view {
278
- background-color: #fff !important;
279
- border-color: rgba(228, 228, 231, 0.5) !important;
276
+ background-color: var(--color-bg-1, #fff) !important;
277
+ border-color: var(--color-border-2, rgba(228, 228, 231, 0.5)) !important;
280
278
  }
281
279
  .overrideArco_ae2ee .arco-input-inner-wrapper:hover,
282
280
  .overrideArco_ae2ee .arco-select-view:hover {
283
- background-color: #fff !important;
284
- border-color: rgba(228, 228, 231, 0.5) !important;
281
+ background-color: var(--color-bg-1, #fff) !important;
282
+ border-color: var(--color-border-2, rgba(228, 228, 231, 0.5)) !important;
285
283
  }
286
284
  .overrideArco_ae2ee .arco-input-inner-wrapper:focus-within,
287
285
  .overrideArco_ae2ee .arco-select-view-focus {
288
- background-color: #fff !important;
289
- border-color: rgba(228, 228, 231, 0.5) !important;
286
+ background-color: var(--color-bg-1, #fff) !important;
287
+ border-color: var(--color-border-2, rgba(228, 228, 231, 0.5)) !important;
290
288
  }
291
289
  .overrideArco_ae2ee .arco-collapse-item .arco-collapse-item-icon-hover {
292
290
  top: 25% !important;
@@ -296,10 +294,14 @@
296
294
  }
297
295
 
298
296
  .arco-table-th {
299
- background-color: rgb(250 250 250/var(--tw-bg-opacity)) !important;
300
- border-bottom-color: rgb(228 228 231/var(--tw-border-opacity)) !important;
297
+ background-color: var(--color-bg-2, rgb(250 250 250/var(--tw-bg-opacity))) !important;
298
+ border-bottom-color: var(--color-border-2, rgb(228 228 231/var(--tw-border-opacity))) !important;
301
299
  }
302
300
 
303
301
  .arco-table-td {
304
- border-bottom-color: rgba(228, 228, 231, 0.5) !important;
302
+ border-bottom-color: var(--color-border-2, rgba(228, 228, 231, 0.5)) !important;
303
+ }
304
+
305
+ .shell_ae2ee.arco-theme-dark {
306
+ background: radial-gradient(circle at 10% 20%, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.98) 55%), linear-gradient(135deg, var(--color-bg-1, #020617) 0%, var(--color-bg-2, #020617) 100%);
305
307
  }