@module-federation/devtools 0.0.0-next-20250926024003 → 0.0.0-perf-devtools-20260107043700
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.
- package/dist/es/App.css +12 -0
- package/dist/es/App.js +330 -22
- package/dist/es/App.module.js +1 -1
- package/dist/es/App_module.css +291 -5
- package/dist/es/component/DependencyGraph/index.js +205 -0
- package/dist/es/component/DependencyGraph/index.module.js +5 -0
- package/dist/es/component/DependencyGraph/index_module.css +97 -0
- package/dist/es/component/{GraphItem → DependencyGraphItem}/index.js +15 -6
- package/dist/es/component/DependencyGraphItem/index.module.js +5 -0
- package/dist/es/component/DependencyGraphItem/index_module.css +95 -0
- package/dist/es/component/Form/index.js +191 -109
- package/dist/es/component/Form/index.module.js +1 -1
- package/dist/es/component/Form/index_module.css +179 -25
- package/dist/es/component/Layout/index.js +288 -51
- package/dist/es/component/Layout/index.module.js +1 -1
- package/dist/es/component/Layout/index_module.css +52 -32
- package/dist/es/component/ModuleInfo/index.js +289 -0
- package/dist/es/component/ModuleInfo/index.module.js +5 -0
- package/dist/es/component/ModuleInfo/index_module.css +183 -0
- package/dist/es/component/SharedDepsExplorer/FocusResultDisplay.js +33 -0
- package/dist/es/component/SharedDepsExplorer/FocusResultDisplay.module.js +5 -0
- package/dist/es/component/SharedDepsExplorer/FocusResultDisplay_module.css +45 -0
- package/dist/es/component/SharedDepsExplorer/index.js +506 -0
- package/dist/es/component/SharedDepsExplorer/index.module.js +5 -0
- package/dist/es/component/SharedDepsExplorer/index_module.css +457 -0
- package/dist/es/component/SharedDepsExplorer/share-utils.js +206 -0
- package/dist/es/template/constant.js +5 -19
- package/dist/es/utils/chrome/fast-refresh.js +80 -7
- package/dist/es/utils/chrome/index.js +91 -38
- package/dist/es/utils/chrome/messages.js +6 -0
- package/dist/es/utils/chrome/post-message-listener.js +2 -1
- package/dist/es/utils/chrome/post-message-start.js +10 -2
- package/dist/es/utils/chrome/storage.js +6 -1
- package/dist/es/utils/sdk/graph.js +25 -4
- package/dist/es/utils/sdk/index.js +9 -0
- package/dist/es/worker/index.js +168 -1
- package/dist/lib/App.css +12 -0
- package/dist/lib/App.js +321 -18
- package/dist/lib/App.module.js +1 -1
- package/dist/lib/App_module.css +291 -5
- package/dist/lib/component/DependencyGraph/index.js +227 -0
- package/dist/lib/component/{GraphItem → DependencyGraph}/index.module.js +1 -1
- package/dist/lib/component/DependencyGraph/index_module.css +97 -0
- package/dist/lib/component/{GraphItem → DependencyGraphItem}/index.js +18 -9
- package/dist/lib/component/{Graph → DependencyGraphItem}/index.module.js +1 -1
- package/dist/lib/component/DependencyGraphItem/index_module.css +95 -0
- package/dist/lib/component/Form/index.js +188 -107
- package/dist/lib/component/Form/index.module.js +1 -1
- package/dist/lib/component/Form/index_module.css +179 -25
- package/dist/lib/component/Layout/index.js +280 -48
- package/dist/lib/component/Layout/index.module.js +1 -1
- package/dist/lib/component/Layout/index_module.css +52 -32
- package/dist/lib/component/ModuleInfo/index.js +319 -0
- package/dist/lib/component/ModuleInfo/index.module.js +25 -0
- package/dist/lib/component/ModuleInfo/index_module.css +183 -0
- package/dist/lib/component/SharedDepsExplorer/FocusResultDisplay.js +63 -0
- package/dist/lib/component/SharedDepsExplorer/FocusResultDisplay.module.js +25 -0
- package/dist/lib/component/SharedDepsExplorer/FocusResultDisplay_module.css +45 -0
- package/dist/lib/component/SharedDepsExplorer/index.js +513 -0
- package/dist/lib/component/SharedDepsExplorer/index.module.js +25 -0
- package/dist/lib/component/SharedDepsExplorer/index_module.css +457 -0
- package/dist/lib/component/SharedDepsExplorer/share-utils.js +237 -0
- package/dist/lib/template/constant.js +7 -17
- package/dist/lib/utils/chrome/fast-refresh.js +77 -8
- package/dist/lib/utils/chrome/index.js +94 -38
- package/dist/lib/utils/chrome/messages.js +31 -0
- package/dist/lib/utils/chrome/post-message-listener.js +2 -1
- package/dist/lib/utils/chrome/post-message-start.js +10 -2
- package/dist/lib/utils/chrome/storage.js +5 -0
- package/dist/lib/utils/sdk/graph.js +25 -4
- package/dist/lib/utils/sdk/index.js +10 -0
- package/dist/lib/worker/index.js +156 -1
- package/dist/types/src/App.d.ts +2 -1
- package/dist/types/src/component/{Graph → DependencyGraph}/index.d.ts +0 -1
- package/dist/types/src/component/{GraphItem → DependencyGraphItem}/index.d.ts +0 -1
- package/dist/types/src/component/Form/index.d.ts +2 -0
- package/dist/types/src/component/Layout/index.d.ts +0 -1
- package/dist/types/src/component/ModuleInfo/index.d.ts +8 -0
- package/dist/types/src/component/SharedDepsExplorer/FocusResultDisplay.d.ts +15 -0
- package/dist/types/src/component/SharedDepsExplorer/index.d.ts +6 -0
- package/dist/types/src/component/SharedDepsExplorer/share-utils.d.ts +44 -0
- package/dist/types/src/init.d.ts +0 -1
- package/dist/types/src/template/constant.d.ts +3 -5
- package/dist/types/src/utils/chrome/index.d.ts +5 -3
- package/dist/types/src/utils/chrome/messages.d.ts +2 -0
- package/dist/types/src/utils/chrome/storage.d.ts +5 -4
- package/dist/types/src/utils/sdk/graph.d.ts +2 -1
- package/dist/types/src/utils/sdk/index.d.ts +1 -0
- package/dist/types/src/utils/types/common.d.ts +4 -0
- package/dist/types/src/worker/index.d.ts +1 -0
- package/package.json +16 -14
- package/dist/es/component/Graph/index.js +0 -127
- package/dist/es/component/Graph/index.module.js +0 -5
- package/dist/es/component/Graph/index_module.css +0 -12
- package/dist/es/component/GraphItem/index.module.js +0 -5
- package/dist/es/component/GraphItem/index_module.css +0 -61
- package/dist/lib/component/Graph/index.js +0 -149
- package/dist/lib/component/Graph/index_module.css +0 -12
- package/dist/lib/component/GraphItem/index_module.css +0 -61
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __defProps = Object.defineProperties;
|
|
5
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
-
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
7
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
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 __export = (target, all) => {
|
|
26
|
-
for (var name in all)
|
|
27
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
28
|
-
};
|
|
29
|
-
var __copyProps = (to, from, except, desc) => {
|
|
30
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
31
|
-
for (let key of __getOwnPropNames(from))
|
|
32
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
33
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
34
|
-
}
|
|
35
|
-
return to;
|
|
36
|
-
};
|
|
37
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
38
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
39
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
40
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
41
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
42
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
43
|
-
mod
|
|
44
|
-
));
|
|
45
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
46
|
-
var Graph_exports = {};
|
|
47
|
-
__export(Graph_exports, {
|
|
48
|
-
default: () => Graph_default
|
|
49
|
-
});
|
|
50
|
-
module.exports = __toCommonJS(Graph_exports);
|
|
51
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
52
|
-
var import_react = require("react");
|
|
53
|
-
var import_reactflow = __toESM(require("reactflow"));
|
|
54
|
-
var import_dagre = __toESM(require("dagre"));
|
|
55
|
-
var import_graph = require("../../utils/sdk/graph");
|
|
56
|
-
var import_GraphItem = __toESM(require("../GraphItem"));
|
|
57
|
-
var import_utils = require("../../utils");
|
|
58
|
-
var import_index = __toESM(require("./index.module"));
|
|
59
|
-
var import_style = require("reactflow/dist/style.css");
|
|
60
|
-
const nodeWidth = 400;
|
|
61
|
-
const nodeHeight = 600;
|
|
62
|
-
const nodeTypes = { graphItem: import_GraphItem.default };
|
|
63
|
-
const Graph = (props) => {
|
|
64
|
-
const [nodes, setNodes, onNodesChange] = (0, import_reactflow.useNodesState)([]);
|
|
65
|
-
const [edges, setEdges, onEdgesChange] = (0, import_reactflow.useEdgesState)([]);
|
|
66
|
-
const { snapshot } = props;
|
|
67
|
-
const { moduleInfo } = window.__FEDERATION__;
|
|
68
|
-
const { consumers } = (0, import_utils.separateType)(moduleInfo);
|
|
69
|
-
(0, import_react.useEffect)(() => {
|
|
70
|
-
const dagreGraph = new import_dagre.default.graphlib.Graph();
|
|
71
|
-
dagreGraph.setDefaultEdgeLabel(() => ({}));
|
|
72
|
-
const getLayoutedElements = (nodes2, edges2, direction = "TB") => {
|
|
73
|
-
dagreGraph.setGraph({ rankdir: direction });
|
|
74
|
-
nodes2.forEach((node) => {
|
|
75
|
-
dagreGraph.setNode(node.id, { width: nodeWidth, height: nodeHeight });
|
|
76
|
-
});
|
|
77
|
-
edges2.forEach((edge) => {
|
|
78
|
-
dagreGraph.setEdge(edge.source, edge.target);
|
|
79
|
-
});
|
|
80
|
-
import_dagre.default.layout(dagreGraph);
|
|
81
|
-
nodes2.forEach((node) => {
|
|
82
|
-
const nodeWithPosition = dagreGraph.node(node.id);
|
|
83
|
-
node.position = {
|
|
84
|
-
x: nodeWithPosition.x - nodeWidth / 2,
|
|
85
|
-
y: nodeWithPosition.y - nodeHeight / 2
|
|
86
|
-
};
|
|
87
|
-
});
|
|
88
|
-
return { nodes: nodes2, edges: edges2 };
|
|
89
|
-
};
|
|
90
|
-
let nodeSet = [];
|
|
91
|
-
let edgeSet = [];
|
|
92
|
-
for (const consumer in consumers) {
|
|
93
|
-
const moduleGraph = new import_graph.DependencyGraph(snapshot, consumer);
|
|
94
|
-
moduleGraph.createGraph();
|
|
95
|
-
moduleGraph.run(moduleGraph.graph, consumer, "graphItem");
|
|
96
|
-
nodeSet = [...nodeSet, ...moduleGraph.node];
|
|
97
|
-
edgeSet = [...edgeSet, ...moduleGraph.edge];
|
|
98
|
-
}
|
|
99
|
-
if (!nodeSet.length) {
|
|
100
|
-
nodeSet.push({
|
|
101
|
-
id: "1",
|
|
102
|
-
type: "graphItem",
|
|
103
|
-
position: {
|
|
104
|
-
x: 0,
|
|
105
|
-
y: 0
|
|
106
|
-
},
|
|
107
|
-
data: {
|
|
108
|
-
color: "lightgreen"
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
const { nodes: layoutedNodes, edges: layoutedEdges } = getLayoutedElements(
|
|
113
|
-
nodeSet,
|
|
114
|
-
edgeSet
|
|
115
|
-
);
|
|
116
|
-
setNodes(layoutedNodes);
|
|
117
|
-
setEdges(layoutedEdges);
|
|
118
|
-
setTimeout(() => {
|
|
119
|
-
const element = document.getElementsByClassName(
|
|
120
|
-
"react-flow__controls-fitview"
|
|
121
|
-
)[0];
|
|
122
|
-
element == null ? void 0 : element.click();
|
|
123
|
-
}, 50);
|
|
124
|
-
}, [snapshot]);
|
|
125
|
-
const onConnect = (0, import_react.useCallback)(
|
|
126
|
-
(params) => setEdges(
|
|
127
|
-
(eds) => (0, import_reactflow.addEdge)(
|
|
128
|
-
__spreadProps(__spreadValues({}, params), { type: import_reactflow.ConnectionLineType.SmoothStep, animated: true }),
|
|
129
|
-
eds
|
|
130
|
-
)
|
|
131
|
-
),
|
|
132
|
-
[]
|
|
133
|
-
);
|
|
134
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.depWrapper, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
135
|
-
import_reactflow.default,
|
|
136
|
-
{
|
|
137
|
-
className: import_index.default.graph,
|
|
138
|
-
nodes,
|
|
139
|
-
edges,
|
|
140
|
-
onNodesChange,
|
|
141
|
-
onEdgesChange,
|
|
142
|
-
onConnect,
|
|
143
|
-
nodeTypes,
|
|
144
|
-
fitView: true,
|
|
145
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_reactflow.Controls, {})
|
|
146
|
-
}
|
|
147
|
-
) });
|
|
148
|
-
};
|
|
149
|
-
var Graph_default = Graph;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
.Wrapper_2fa4f {
|
|
2
|
-
display: flex;
|
|
3
|
-
box-sizing: border-box;
|
|
4
|
-
border-radius: 10px;
|
|
5
|
-
margin: 0;
|
|
6
|
-
padding: 0;
|
|
7
|
-
width: 300px;
|
|
8
|
-
overflow: hidden;
|
|
9
|
-
}
|
|
10
|
-
.Wrapper_2fa4f .container_2fa4f {
|
|
11
|
-
display: flex;
|
|
12
|
-
flex-direction: column;
|
|
13
|
-
width: 100%;
|
|
14
|
-
height: 100%;
|
|
15
|
-
margin: 0;
|
|
16
|
-
padding: 0;
|
|
17
|
-
}
|
|
18
|
-
.Wrapper_2fa4f .container_2fa4f .group_2fa4f {
|
|
19
|
-
display: flex;
|
|
20
|
-
align-items: center;
|
|
21
|
-
margin-bottom: 3px;
|
|
22
|
-
width: 100%;
|
|
23
|
-
padding: 5px 0;
|
|
24
|
-
}
|
|
25
|
-
.Wrapper_2fa4f .container_2fa4f .group_2fa4f .name_2fa4f {
|
|
26
|
-
color: white;
|
|
27
|
-
text-align: center;
|
|
28
|
-
margin: 0 auto;
|
|
29
|
-
}
|
|
30
|
-
.Wrapper_2fa4f .container_2fa4f .info_2fa4f {
|
|
31
|
-
display: flex;
|
|
32
|
-
flex-direction: column;
|
|
33
|
-
background-color: white;
|
|
34
|
-
margin: 0 4px 4px 4px;
|
|
35
|
-
padding: 10px;
|
|
36
|
-
border-radius: 0 0 5px 5px;
|
|
37
|
-
font-size: 12px;
|
|
38
|
-
}
|
|
39
|
-
.Wrapper_2fa4f .container_2fa4f .info_2fa4f .expose-container_2fa4f {
|
|
40
|
-
display: flex;
|
|
41
|
-
margin-bottom: 5px;
|
|
42
|
-
}
|
|
43
|
-
.Wrapper_2fa4f .container_2fa4f .info_2fa4f .type_2fa4f {
|
|
44
|
-
font-weight: bold;
|
|
45
|
-
margin-right: 10px;
|
|
46
|
-
}
|
|
47
|
-
.Wrapper_2fa4f .container_2fa4f .info_2fa4f .item_2fa4f {
|
|
48
|
-
display: inline-block;
|
|
49
|
-
padding: 5px;
|
|
50
|
-
background: lightgray;
|
|
51
|
-
border-radius: 15px;
|
|
52
|
-
font-size: 8px;
|
|
53
|
-
margin-right: 5px;
|
|
54
|
-
margin-bottom: 5px;
|
|
55
|
-
font-weight: 300;
|
|
56
|
-
text-overflow: ellipsis;
|
|
57
|
-
overflow: hidden;
|
|
58
|
-
}
|
|
59
|
-
.Wrapper_2fa4f .container_2fa4f .message_2fa4f {
|
|
60
|
-
display: flex;
|
|
61
|
-
}
|