@module-federation/devtools 0.0.0-chore-bump-node-22-20260710161714

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 (164) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +11 -0
  3. package/dist/es/App.css +13 -0
  4. package/dist/es/App.js +498 -0
  5. package/dist/es/App.module.js +5 -0
  6. package/dist/es/App_module.css +307 -0
  7. package/dist/es/component/DependencyGraph/index.js +204 -0
  8. package/dist/es/component/DependencyGraph/index.module.js +5 -0
  9. package/dist/es/component/DependencyGraph/index_module.css +100 -0
  10. package/dist/es/component/DependencyGraphItem/index.js +95 -0
  11. package/dist/es/component/DependencyGraphItem/index.module.js +5 -0
  12. package/dist/es/component/DependencyGraphItem/index_module.css +95 -0
  13. package/dist/es/component/Form/index.js +363 -0
  14. package/dist/es/component/Form/index.module.js +5 -0
  15. package/dist/es/component/Form/index_module.css +198 -0
  16. package/dist/es/component/LanguageSwitch.js +50 -0
  17. package/dist/es/component/Layout/index.js +470 -0
  18. package/dist/es/component/Layout/index.module.js +5 -0
  19. package/dist/es/component/Layout/index_module.css +68 -0
  20. package/dist/es/component/LoadingTrace/index.js +944 -0
  21. package/dist/es/component/LoadingTrace/index.module.js +5 -0
  22. package/dist/es/component/LoadingTrace/index_module.css +876 -0
  23. package/dist/es/component/ModuleInfo/index.js +313 -0
  24. package/dist/es/component/ModuleInfo/index.module.js +5 -0
  25. package/dist/es/component/ModuleInfo/index_module.css +184 -0
  26. package/dist/es/component/SharedDepsExplorer/FocusResultDisplay.js +35 -0
  27. package/dist/es/component/SharedDepsExplorer/FocusResultDisplay.module.js +5 -0
  28. package/dist/es/component/SharedDepsExplorer/FocusResultDisplay_module.css +45 -0
  29. package/dist/es/component/SharedDepsExplorer/index.js +636 -0
  30. package/dist/es/component/SharedDepsExplorer/index.module.js +5 -0
  31. package/dist/es/component/SharedDepsExplorer/index_module.css +467 -0
  32. package/dist/es/component/SharedDepsExplorer/share-utils.js +222 -0
  33. package/dist/es/component/ThemeToggle.js +19 -0
  34. package/dist/es/component/ThemeToggle.module.js +5 -0
  35. package/dist/es/component/ThemeToggle_module.css +12 -0
  36. package/dist/es/hooks/useDevtoolsTheme.js +77 -0
  37. package/dist/es/i18n/index.js +688 -0
  38. package/dist/es/init.js +8 -0
  39. package/dist/es/template/constant.js +51 -0
  40. package/dist/es/template/index.js +1 -0
  41. package/dist/es/utils/chrome/fast-refresh.js +342 -0
  42. package/dist/es/utils/chrome/index.js +284 -0
  43. package/dist/es/utils/chrome/messages.js +12 -0
  44. package/dist/es/utils/chrome/observability-plugin.js +93 -0
  45. package/dist/es/utils/chrome/observability-shared.js +99 -0
  46. package/dist/es/utils/chrome/observability.js +208 -0
  47. package/dist/es/utils/chrome/override-remote.js +2 -0
  48. package/dist/es/utils/chrome/post-message-init.js +5 -0
  49. package/dist/es/utils/chrome/post-message-listener.js +39 -0
  50. package/dist/es/utils/chrome/post-message-start.js +10 -0
  51. package/dist/es/utils/chrome/post-message.js +71 -0
  52. package/dist/es/utils/chrome/safe-post-message.js +124 -0
  53. package/dist/es/utils/chrome/snapshot-plugin.js +2 -0
  54. package/dist/es/utils/chrome/storage.js +50 -0
  55. package/dist/es/utils/data/index.js +59 -0
  56. package/dist/es/utils/index.js +4 -0
  57. package/dist/es/utils/sdk/graph.js +190 -0
  58. package/dist/es/utils/sdk/index.js +70 -0
  59. package/dist/es/utils/types/common.js +0 -0
  60. package/dist/es/utils/types/index.js +1 -0
  61. package/dist/es/vendor/basic-proxy-core.js +155 -0
  62. package/dist/es/worker/index.js +187 -0
  63. package/dist/lib/App.css +13 -0
  64. package/dist/lib/App.js +519 -0
  65. package/dist/lib/App.module.js +24 -0
  66. package/dist/lib/App_module.css +307 -0
  67. package/dist/lib/component/DependencyGraph/index.js +225 -0
  68. package/dist/lib/component/DependencyGraph/index.module.js +24 -0
  69. package/dist/lib/component/DependencyGraph/index_module.css +100 -0
  70. package/dist/lib/component/DependencyGraphItem/index.js +124 -0
  71. package/dist/lib/component/DependencyGraphItem/index.module.js +24 -0
  72. package/dist/lib/component/DependencyGraphItem/index_module.css +95 -0
  73. package/dist/lib/component/Form/index.js +372 -0
  74. package/dist/lib/component/Form/index.module.js +24 -0
  75. package/dist/lib/component/Form/index_module.css +198 -0
  76. package/dist/lib/component/LanguageSwitch.js +79 -0
  77. package/dist/lib/component/Layout/index.js +471 -0
  78. package/dist/lib/component/Layout/index.module.js +24 -0
  79. package/dist/lib/component/Layout/index_module.css +68 -0
  80. package/dist/lib/component/LoadingTrace/index.js +953 -0
  81. package/dist/lib/component/LoadingTrace/index.module.js +24 -0
  82. package/dist/lib/component/LoadingTrace/index_module.css +876 -0
  83. package/dist/lib/component/ModuleInfo/index.js +342 -0
  84. package/dist/lib/component/ModuleInfo/index.module.js +24 -0
  85. package/dist/lib/component/ModuleInfo/index_module.css +184 -0
  86. package/dist/lib/component/SharedDepsExplorer/FocusResultDisplay.js +64 -0
  87. package/dist/lib/component/SharedDepsExplorer/FocusResultDisplay.module.js +24 -0
  88. package/dist/lib/component/SharedDepsExplorer/FocusResultDisplay_module.css +45 -0
  89. package/dist/lib/component/SharedDepsExplorer/index.js +638 -0
  90. package/dist/lib/component/SharedDepsExplorer/index.module.js +24 -0
  91. package/dist/lib/component/SharedDepsExplorer/index_module.css +467 -0
  92. package/dist/lib/component/SharedDepsExplorer/share-utils.js +252 -0
  93. package/dist/lib/component/ThemeToggle.js +48 -0
  94. package/dist/lib/component/ThemeToggle.module.js +24 -0
  95. package/dist/lib/component/ThemeToggle_module.css +12 -0
  96. package/dist/lib/hooks/useDevtoolsTheme.js +100 -0
  97. package/dist/lib/i18n/index.js +721 -0
  98. package/dist/lib/init.js +8 -0
  99. package/dist/lib/template/constant.js +84 -0
  100. package/dist/lib/template/index.js +21 -0
  101. package/dist/lib/utils/chrome/fast-refresh.js +329 -0
  102. package/dist/lib/utils/chrome/index.js +321 -0
  103. package/dist/lib/utils/chrome/messages.js +39 -0
  104. package/dist/lib/utils/chrome/observability-plugin.js +85 -0
  105. package/dist/lib/utils/chrome/observability-shared.js +125 -0
  106. package/dist/lib/utils/chrome/observability.js +233 -0
  107. package/dist/lib/utils/chrome/override-remote.js +17 -0
  108. package/dist/lib/utils/chrome/post-message-init.js +5 -0
  109. package/dist/lib/utils/chrome/post-message-listener.js +36 -0
  110. package/dist/lib/utils/chrome/post-message-start.js +10 -0
  111. package/dist/lib/utils/chrome/post-message.js +91 -0
  112. package/dist/lib/utils/chrome/safe-post-message.js +147 -0
  113. package/dist/lib/utils/chrome/snapshot-plugin.js +17 -0
  114. package/dist/lib/utils/chrome/storage.js +71 -0
  115. package/dist/lib/utils/data/index.js +83 -0
  116. package/dist/lib/utils/index.js +27 -0
  117. package/dist/lib/utils/sdk/graph.js +213 -0
  118. package/dist/lib/utils/sdk/index.js +104 -0
  119. package/dist/lib/utils/types/common.js +15 -0
  120. package/dist/lib/utils/types/index.js +21 -0
  121. package/dist/lib/vendor/basic-proxy-core.js +147 -0
  122. package/dist/lib/worker/index.js +175 -0
  123. package/dist/types/src/App.d.ts +7 -0
  124. package/dist/types/src/component/DependencyGraph/index.d.ts +6 -0
  125. package/dist/types/src/component/DependencyGraphItem/index.d.ts +9 -0
  126. package/dist/types/src/component/Form/index.d.ts +21 -0
  127. package/dist/types/src/component/LanguageSwitch.d.ts +2 -0
  128. package/dist/types/src/component/Layout/index.d.ts +15 -0
  129. package/dist/types/src/component/LoadingTrace/index.d.ts +6 -0
  130. package/dist/types/src/component/ModuleInfo/index.d.ts +8 -0
  131. package/dist/types/src/component/SharedDepsExplorer/FocusResultDisplay.d.ts +15 -0
  132. package/dist/types/src/component/SharedDepsExplorer/index.d.ts +6 -0
  133. package/dist/types/src/component/SharedDepsExplorer/share-utils.d.ts +45 -0
  134. package/dist/types/src/component/ThemeToggle.d.ts +8 -0
  135. package/dist/types/src/hooks/useDevtoolsTheme.d.ts +2 -0
  136. package/dist/types/src/i18n/index.d.ts +5 -0
  137. package/dist/types/src/index.d.ts +1 -0
  138. package/dist/types/src/init.d.ts +12 -0
  139. package/dist/types/src/template/constant.d.ts +21 -0
  140. package/dist/types/src/template/index.d.ts +1 -0
  141. package/dist/types/src/utils/chrome/fast-refresh.d.ts +1 -0
  142. package/dist/types/src/utils/chrome/index.d.ts +19 -0
  143. package/dist/types/src/utils/chrome/messages.d.ts +5 -0
  144. package/dist/types/src/utils/chrome/observability-plugin.d.ts +1 -0
  145. package/dist/types/src/utils/chrome/observability-shared.d.ts +41 -0
  146. package/dist/types/src/utils/chrome/observability.d.ts +110 -0
  147. package/dist/types/src/utils/chrome/override-remote.d.ts +1 -0
  148. package/dist/types/src/utils/chrome/post-message-init.d.ts +1 -0
  149. package/dist/types/src/utils/chrome/post-message-listener.d.ts +1 -0
  150. package/dist/types/src/utils/chrome/post-message-start.d.ts +1 -0
  151. package/dist/types/src/utils/chrome/post-message.d.ts +1 -0
  152. package/dist/types/src/utils/chrome/safe-post-message.d.ts +1 -0
  153. package/dist/types/src/utils/chrome/snapshot-plugin.d.ts +1 -0
  154. package/dist/types/src/utils/chrome/storage.d.ts +5 -0
  155. package/dist/types/src/utils/data/index.d.ts +10 -0
  156. package/dist/types/src/utils/index.d.ts +4 -0
  157. package/dist/types/src/utils/sdk/graph.d.ts +46 -0
  158. package/dist/types/src/utils/sdk/index.d.ts +11 -0
  159. package/dist/types/src/utils/types/common.d.ts +22 -0
  160. package/dist/types/src/utils/types/index.d.ts +1 -0
  161. package/dist/types/src/worker/index.d.ts +1 -0
  162. package/dist/types/stories/index.stories.d.ts +9 -0
  163. package/install-deps.bash +23 -0
  164. package/package.json +108 -0
@@ -0,0 +1,187 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropNames = Object.getOwnPropertyNames;
3
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
6
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7
+ var __spreadValues = (a, b) => {
8
+ for (var prop in b || (b = {}))
9
+ if (__hasOwnProp.call(b, prop))
10
+ __defNormalProp(a, prop, b[prop]);
11
+ if (__getOwnPropSymbols)
12
+ for (var prop of __getOwnPropSymbols(b)) {
13
+ if (__propIsEnum.call(b, prop))
14
+ __defNormalProp(a, prop, b[prop]);
15
+ }
16
+ return a;
17
+ };
18
+ var __commonJS = (cb, mod) => function __require() {
19
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
20
+ };
21
+ var __async = (__this, __arguments, generator) => {
22
+ return new Promise((resolve, reject) => {
23
+ var fulfilled = (value) => {
24
+ try {
25
+ step(generator.next(value));
26
+ } catch (e) {
27
+ reject(e);
28
+ }
29
+ };
30
+ var rejected = (value) => {
31
+ try {
32
+ step(generator.throw(value));
33
+ } catch (e) {
34
+ reject(e);
35
+ }
36
+ };
37
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
38
+ step((generator = generator.apply(__this, __arguments)).next());
39
+ });
40
+ };
41
+ import {
42
+ MESSAGE_ACTIVE_TAB_CHANGED,
43
+ MESSAGE_OPEN_SIDE_PANEL
44
+ } from "../utils/chrome/messages";
45
+ var require_worker = __commonJS({
46
+ "src/worker/index.ts"(exports) {
47
+ const SIDE_PANEL_PATH = "html/main/index.html";
48
+ const getSidePanel = () => chrome == null ? void 0 : chrome.sidePanel;
49
+ const resolveTabId = (tabId) => __async(exports, null, function* () {
50
+ if (typeof tabId === "number") {
51
+ return tabId;
52
+ }
53
+ const [activeTab] = yield chrome.tabs.query({
54
+ active: true,
55
+ lastFocusedWindow: true
56
+ });
57
+ return activeTab == null ? void 0 : activeTab.id;
58
+ });
59
+ const broadcastActiveTab = (tabId, payload) => {
60
+ try {
61
+ chrome.runtime.sendMessage(__spreadValues({
62
+ type: MESSAGE_ACTIVE_TAB_CHANGED,
63
+ tabId
64
+ }, payload));
65
+ } catch (error) {
66
+ console.warn(
67
+ "[Module Federation Devtools] Failed to broadcast active tab",
68
+ error
69
+ );
70
+ }
71
+ };
72
+ const openSidePanel = (tabId) => __async(exports, null, function* () {
73
+ const sidePanel = getSidePanel();
74
+ if (!sidePanel) {
75
+ throw new Error("sidePanel api not available");
76
+ }
77
+ const targetTabId = yield resolveTabId(tabId);
78
+ if (typeof targetTabId !== "number") {
79
+ throw new Error("No active tab available");
80
+ }
81
+ yield sidePanel.setOptions({
82
+ tabId: targetTabId,
83
+ path: SIDE_PANEL_PATH,
84
+ enabled: true
85
+ });
86
+ if (sidePanel.open) {
87
+ yield sidePanel.open({ tabId: targetTabId });
88
+ }
89
+ broadcastActiveTab(targetTabId, { reason: "side-panel" });
90
+ if (sidePanel.getOptions) {
91
+ try {
92
+ const options = yield sidePanel.getOptions({ tabId: targetTabId });
93
+ broadcastActiveTab(targetTabId, { reason: "side-panel" });
94
+ return options;
95
+ } catch (error) {
96
+ console.warn("[Module Federation Devtools] getOptions failed", error);
97
+ }
98
+ }
99
+ return {
100
+ path: SIDE_PANEL_PATH,
101
+ enabled: true
102
+ };
103
+ });
104
+ chrome.runtime.onInstalled.addListener(() => {
105
+ const sidePanel = getSidePanel();
106
+ if (sidePanel == null ? void 0 : sidePanel.setPanelBehavior) {
107
+ sidePanel.setPanelBehavior({ openPanelOnActionClick: true }).catch((error) => {
108
+ console.warn(
109
+ "[Module Federation Devtools] setPanelBehavior failed",
110
+ error
111
+ );
112
+ });
113
+ }
114
+ });
115
+ chrome.action.onClicked.addListener((tab) => __async(exports, null, function* () {
116
+ try {
117
+ yield openSidePanel(tab.id);
118
+ } catch (error) {
119
+ console.warn(
120
+ "[Module Federation Devtools] Failed to open side panel",
121
+ error
122
+ );
123
+ }
124
+ }));
125
+ chrome.runtime.onMessage.addListener((message, _sender, sendResponse) => {
126
+ if ((message == null ? void 0 : message.type) === MESSAGE_OPEN_SIDE_PANEL) {
127
+ openSidePanel(message.tabId).then((options) => sendResponse({ ok: true, options })).catch(
128
+ (error) => sendResponse({ ok: false, message: String(error) })
129
+ );
130
+ return true;
131
+ }
132
+ return void 0;
133
+ });
134
+ chrome.tabs.onActivated.addListener((activeInfo) => __async(exports, null, function* () {
135
+ const tabId = activeInfo == null ? void 0 : activeInfo.tabId;
136
+ if (typeof tabId !== "number") {
137
+ return;
138
+ }
139
+ try {
140
+ broadcastActiveTab(tabId, { reason: "activated" });
141
+ } catch (error) {
142
+ console.warn(
143
+ "[Module Federation Devtools] Failed to handle tab activation",
144
+ error
145
+ );
146
+ }
147
+ }));
148
+ chrome.tabs.onUpdated.addListener((tabId, changeInfo, tab) => {
149
+ if (changeInfo.status !== "loading" && changeInfo.status !== "complete") {
150
+ return;
151
+ }
152
+ if (tab == null ? void 0 : tab.active) {
153
+ try {
154
+ broadcastActiveTab(tabId, {
155
+ reason: "updated",
156
+ status: changeInfo.status
157
+ });
158
+ } catch (error) {
159
+ console.warn(
160
+ "[Module Federation Devtools] Failed to handle tab update",
161
+ error
162
+ );
163
+ }
164
+ }
165
+ });
166
+ chrome.tabs.onRemoved.addListener((tabId) => __async(exports, null, function* () {
167
+ try {
168
+ const FormID = "FormID";
169
+ const data = yield chrome.storage.sync.get(FormID);
170
+ const storeData = data[FormID];
171
+ if (storeData == null ? void 0 : storeData[String(tabId)]) {
172
+ delete storeData[String(tabId)];
173
+ yield chrome.storage.sync.set({
174
+ [FormID]: storeData
175
+ });
176
+ }
177
+ } catch (error) {
178
+ console.warn(
179
+ "[Module Federation Devtools] Failed to handle tab removal",
180
+ error
181
+ );
182
+ }
183
+ }));
184
+ console.log("Module Federation Worker ready");
185
+ }
186
+ });
187
+ export default require_worker();
@@ -0,0 +1,13 @@
1
+ .loaded-status-tag {
2
+ color: var(--color-bg-1, white) !important;
3
+ background-color: var(--color-neutral-10, black) !important;
4
+ }
5
+ .reused-status-tag {
6
+ background-color: greenyellow !important;
7
+ color: black !important;
8
+ }
9
+ .common-tag {
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;
13
+ }