@module-federation/devtools 0.22.0 → 0.22.1
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 +300 -49
- 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 +3 -19
- package/dist/es/utils/chrome/index.js +91 -38
- package/dist/es/utils/chrome/messages.js +6 -0
- package/dist/es/utils/chrome/override-remote.js +42 -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 +294 -47
- 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 +4 -17
- package/dist/lib/utils/chrome/index.js +94 -38
- package/dist/lib/utils/chrome/messages.js +31 -0
- package/dist/lib/utils/chrome/override-remote.js +65 -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 +2 -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/override-remote.d.ts +1 -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 +11 -9
- 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
|
@@ -0,0 +1,227 @@
|
|
|
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 DependencyGraph_exports = {};
|
|
47
|
+
__export(DependencyGraph_exports, {
|
|
48
|
+
default: () => DependencyGraph_default
|
|
49
|
+
});
|
|
50
|
+
module.exports = __toCommonJS(DependencyGraph_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_web_react = require("@arco-design/web-react");
|
|
56
|
+
var import_graph = require("../../utils/sdk/graph");
|
|
57
|
+
var import_DependencyGraphItem = __toESM(require("../DependencyGraphItem"));
|
|
58
|
+
var import_utils = require("../../utils");
|
|
59
|
+
var import_index = __toESM(require("./index.module"));
|
|
60
|
+
var import_style = require("reactflow/dist/style.css");
|
|
61
|
+
const nodeWidth = 360;
|
|
62
|
+
const nodeHeight = 420;
|
|
63
|
+
const nodeTypes = { graphItem: import_DependencyGraphItem.default };
|
|
64
|
+
const { Option } = import_web_react.Select;
|
|
65
|
+
const Graph = (props) => {
|
|
66
|
+
const [nodes, setNodes, onNodesChange] = (0, import_reactflow.useNodesState)([]);
|
|
67
|
+
const [edges, setEdges, onEdgesChange] = (0, import_reactflow.useEdgesState)([]);
|
|
68
|
+
const { snapshot } = props;
|
|
69
|
+
const federation = window.__FEDERATION__ || {
|
|
70
|
+
moduleInfo: {},
|
|
71
|
+
originModuleInfo: {}
|
|
72
|
+
};
|
|
73
|
+
const { moduleInfo } = federation;
|
|
74
|
+
const { consumers } = (0, import_utils.separateType)(moduleInfo);
|
|
75
|
+
const [selectedConsumer, setSelectedConsumer] = (0, import_react.useState)("All");
|
|
76
|
+
const [maxDepth, setMaxDepth] = (0, import_react.useState)(Infinity);
|
|
77
|
+
const [availableDepth, setAvailableDepth] = (0, import_react.useState)(1);
|
|
78
|
+
(0, import_react.useEffect)(() => {
|
|
79
|
+
const targetConsumers = selectedConsumer === "All" ? Object.keys(consumers) : [selectedConsumer].filter((c) => consumers[c]);
|
|
80
|
+
let maxD = 0;
|
|
81
|
+
for (const consumer of targetConsumers) {
|
|
82
|
+
const moduleGraph = new import_graph.DependencyGraph(snapshot, consumer);
|
|
83
|
+
moduleGraph.createGraph();
|
|
84
|
+
const depth = moduleGraph.calculateDepth();
|
|
85
|
+
if (depth > maxD) {
|
|
86
|
+
maxD = depth;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
setAvailableDepth(maxD || 1);
|
|
90
|
+
}, [snapshot, selectedConsumer, consumers]);
|
|
91
|
+
(0, import_react.useEffect)(() => {
|
|
92
|
+
const dagreGraph = new import_dagre.default.graphlib.Graph();
|
|
93
|
+
dagreGraph.setDefaultEdgeLabel(() => ({}));
|
|
94
|
+
const getLayoutedElements = (nodes2, edges2, direction = "TB") => {
|
|
95
|
+
dagreGraph.setGraph({ rankdir: direction });
|
|
96
|
+
nodes2.forEach((node) => {
|
|
97
|
+
dagreGraph.setNode(node.id, { width: nodeWidth, height: nodeHeight });
|
|
98
|
+
});
|
|
99
|
+
edges2.forEach((edge) => {
|
|
100
|
+
dagreGraph.setEdge(edge.source, edge.target);
|
|
101
|
+
});
|
|
102
|
+
import_dagre.default.layout(dagreGraph);
|
|
103
|
+
nodes2.forEach((node) => {
|
|
104
|
+
const nodeWithPosition = dagreGraph.node(node.id);
|
|
105
|
+
node.position = {
|
|
106
|
+
x: nodeWithPosition.x - nodeWidth / 2,
|
|
107
|
+
y: nodeWithPosition.y - nodeHeight / 2
|
|
108
|
+
};
|
|
109
|
+
});
|
|
110
|
+
return { nodes: nodes2, edges: edges2 };
|
|
111
|
+
};
|
|
112
|
+
let nodeSet = [];
|
|
113
|
+
let edgeSet = [];
|
|
114
|
+
const targetConsumers = selectedConsumer === "All" ? Object.keys(consumers) : [selectedConsumer].filter((c) => consumers[c]);
|
|
115
|
+
for (const consumer of targetConsumers) {
|
|
116
|
+
const moduleGraph = new import_graph.DependencyGraph(snapshot, consumer);
|
|
117
|
+
moduleGraph.createGraph();
|
|
118
|
+
moduleGraph.run(
|
|
119
|
+
moduleGraph.graph,
|
|
120
|
+
consumer,
|
|
121
|
+
"graphItem",
|
|
122
|
+
consumer,
|
|
123
|
+
0,
|
|
124
|
+
maxDepth
|
|
125
|
+
);
|
|
126
|
+
nodeSet = [...nodeSet, ...moduleGraph.node];
|
|
127
|
+
edgeSet = [...edgeSet, ...moduleGraph.edge];
|
|
128
|
+
}
|
|
129
|
+
if (!nodeSet.length) {
|
|
130
|
+
nodeSet.push({
|
|
131
|
+
id: "1",
|
|
132
|
+
type: "graphItem",
|
|
133
|
+
position: {
|
|
134
|
+
x: 0,
|
|
135
|
+
y: 0
|
|
136
|
+
},
|
|
137
|
+
data: {
|
|
138
|
+
color: "lightgreen"
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
const { nodes: layoutedNodes, edges: layoutedEdges } = getLayoutedElements(
|
|
143
|
+
nodeSet,
|
|
144
|
+
edgeSet
|
|
145
|
+
);
|
|
146
|
+
setNodes(layoutedNodes);
|
|
147
|
+
setEdges(layoutedEdges);
|
|
148
|
+
setTimeout(() => {
|
|
149
|
+
const element = document.getElementsByClassName(
|
|
150
|
+
"react-flow__controls-fitview"
|
|
151
|
+
)[0];
|
|
152
|
+
element == null ? void 0 : element.click();
|
|
153
|
+
}, 50);
|
|
154
|
+
}, [snapshot, selectedConsumer, maxDepth]);
|
|
155
|
+
const onConnect = (0, import_react.useCallback)(
|
|
156
|
+
(params) => setEdges(
|
|
157
|
+
(eds) => (0, import_reactflow.addEdge)(
|
|
158
|
+
__spreadProps(__spreadValues({}, params), { type: import_reactflow.ConnectionLineType.SmoothStep, animated: true }),
|
|
159
|
+
eds
|
|
160
|
+
)
|
|
161
|
+
),
|
|
162
|
+
[]
|
|
163
|
+
);
|
|
164
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.depWrapper, children: [
|
|
165
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.header, children: [
|
|
166
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.titleBlock, children: [
|
|
167
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: import_index.default.title, children: "Dependency Graph" }),
|
|
168
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: import_index.default.subtitle, children: "Visualise how consumers resolve remotes with the current overrides." })
|
|
169
|
+
] }),
|
|
170
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.filterBlock, children: [
|
|
171
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
172
|
+
import_web_react.Select,
|
|
173
|
+
{
|
|
174
|
+
showSearch: true,
|
|
175
|
+
placeholder: "Select Consumer",
|
|
176
|
+
style: { width: 200 },
|
|
177
|
+
value: selectedConsumer,
|
|
178
|
+
onChange: setSelectedConsumer,
|
|
179
|
+
children: [
|
|
180
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Option, { value: "All", children: "All Consumers" }),
|
|
181
|
+
Object.keys(consumers).map((key) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Option, { value: key, children: key }, key))
|
|
182
|
+
]
|
|
183
|
+
}
|
|
184
|
+
),
|
|
185
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
186
|
+
import_web_react.Select,
|
|
187
|
+
{
|
|
188
|
+
showSearch: true,
|
|
189
|
+
placeholder: "Select Depth",
|
|
190
|
+
style: { width: 120 },
|
|
191
|
+
value: maxDepth === Infinity ? "All" : maxDepth,
|
|
192
|
+
onChange: (val) => setMaxDepth(val === "All" ? Infinity : val),
|
|
193
|
+
children: [
|
|
194
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Option, { value: "All", children: "All Depth" }),
|
|
195
|
+
Array.from({ length: availableDepth }, (_, i) => i + 1).map(
|
|
196
|
+
(depth) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Option, { value: depth, children: [
|
|
197
|
+
"Depth: ",
|
|
198
|
+
depth
|
|
199
|
+
] }, depth)
|
|
200
|
+
)
|
|
201
|
+
]
|
|
202
|
+
}
|
|
203
|
+
)
|
|
204
|
+
] }),
|
|
205
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.meta, children: [
|
|
206
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: import_index.default.metaBadge, children: nodes.length }),
|
|
207
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: import_index.default.metaLabel, children: nodes.length === 1 ? "node rendered" : "nodes rendered" })
|
|
208
|
+
] })
|
|
209
|
+
] }),
|
|
210
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.canvas, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
211
|
+
import_reactflow.default,
|
|
212
|
+
{
|
|
213
|
+
className: import_index.default.graph,
|
|
214
|
+
nodes,
|
|
215
|
+
edges,
|
|
216
|
+
onNodesChange,
|
|
217
|
+
onEdgesChange,
|
|
218
|
+
onConnect,
|
|
219
|
+
nodeTypes,
|
|
220
|
+
proOptions: { hideAttribution: true },
|
|
221
|
+
fitView: true,
|
|
222
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_reactflow.Controls, { className: import_index.default.controls })
|
|
223
|
+
}
|
|
224
|
+
) })
|
|
225
|
+
] });
|
|
226
|
+
};
|
|
227
|
+
var DependencyGraph_default = Graph;
|
|
@@ -22,4 +22,4 @@ __export(index_module_exports, {
|
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(index_module_exports);
|
|
24
24
|
var import_index_module = require("./index_module.css");
|
|
25
|
-
var index_module_default = { "
|
|
25
|
+
var index_module_default = { "depWrapper": "depWrapper_5e584", "header": "header_5e584", "titleBlock": "titleBlock_5e584", "title": "title_5e584", "subtitle": "subtitle_5e584", "meta": "meta_5e584", "metaBadge": "metaBadge_5e584", "metaLabel": "metaLabel_5e584", "filterBlock": "filterBlock_5e584", "canvas": "canvas_5e584", "graph": "graph_5e584", "controls": "controls_5e584" };
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
.depWrapper_5e584 {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: 16px;
|
|
5
|
+
min-height: 340px;
|
|
6
|
+
color: #1f2937;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.header_5e584 {
|
|
10
|
+
display: flex;
|
|
11
|
+
justify-content: space-between;
|
|
12
|
+
align-items: flex-start;
|
|
13
|
+
gap: 18px;
|
|
14
|
+
padding: 0 6px 6px;
|
|
15
|
+
border-bottom: 1px solid rgba(96, 165, 250, 0.3);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.titleBlock_5e584 {
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
gap: 6px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.title_5e584 {
|
|
25
|
+
font-size: 16px;
|
|
26
|
+
font-weight: 600;
|
|
27
|
+
color: #1f2937;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.subtitle_5e584 {
|
|
31
|
+
font-size: 12px;
|
|
32
|
+
color: #4b5563;
|
|
33
|
+
max-width: 260px;
|
|
34
|
+
line-height: 1.5;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.meta_5e584 {
|
|
38
|
+
display: flex;
|
|
39
|
+
align-items: center;
|
|
40
|
+
gap: 10px;
|
|
41
|
+
background: rgba(228, 228, 231, 0.5);
|
|
42
|
+
padding: 4px 12px;
|
|
43
|
+
border-radius: 999px;
|
|
44
|
+
border: 1px solid rgba(96, 165, 250, 0.3);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.metaBadge_5e584 {
|
|
48
|
+
font-size: 16px;
|
|
49
|
+
font-weight: 600;
|
|
50
|
+
color: #1f2937;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.metaLabel_5e584 {
|
|
54
|
+
font-size: 12px;
|
|
55
|
+
color: #4b5563;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.filterBlock_5e584 {
|
|
59
|
+
display: flex;
|
|
60
|
+
align-items: center;
|
|
61
|
+
gap: 12px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.canvas_5e584 {
|
|
65
|
+
flex: 1 1;
|
|
66
|
+
padding: 12px;
|
|
67
|
+
border-radius: 16px;
|
|
68
|
+
border: 1px solid rgba(96, 165, 250, 0.3);
|
|
69
|
+
background: rgba(228, 228, 231, 0.5);
|
|
70
|
+
backdrop-filter: blur(4px);
|
|
71
|
+
}
|
|
72
|
+
.canvas_5e584 .react-flow__handle {
|
|
73
|
+
width: 10px;
|
|
74
|
+
height: 10px;
|
|
75
|
+
border-radius: 50%;
|
|
76
|
+
border: 2px solid rgba(96, 165, 250, 0.3);
|
|
77
|
+
background: rgba(243, 244, 246, 0.9);
|
|
78
|
+
}
|
|
79
|
+
.canvas_5e584 .react-flow__controls-button:hover {
|
|
80
|
+
background: rgba(243, 244, 246, 0.9);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.graph_5e584 {
|
|
84
|
+
width: 100%;
|
|
85
|
+
height: 58vh !important;
|
|
86
|
+
min-height: 280px;
|
|
87
|
+
border-radius: 12px;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.controls_5e584 .react-flow__controls-button {
|
|
91
|
+
background: rgba(243, 244, 246, 0.3);
|
|
92
|
+
border-color: rgba(96, 165, 250, 0.3);
|
|
93
|
+
color: #1f2937;
|
|
94
|
+
}
|
|
95
|
+
.controls_5e584 .react-flow__controls-button:hover {
|
|
96
|
+
background: rgb(255, 255, 255);
|
|
97
|
+
}
|
|
@@ -26,11 +26,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
31
|
-
default: () =>
|
|
29
|
+
var DependencyGraphItem_exports = {};
|
|
30
|
+
__export(DependencyGraphItem_exports, {
|
|
31
|
+
default: () => DependencyGraphItem_default
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(DependencyGraphItem_exports);
|
|
34
34
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
35
35
|
var import_react = require("react");
|
|
36
36
|
var import_reactflow = require("reactflow");
|
|
@@ -56,12 +56,17 @@ const GraphItem = (props) => {
|
|
|
56
56
|
let shareds2;
|
|
57
57
|
if (isEntryType) {
|
|
58
58
|
fetch(version).then((response) => response.json()).then((json) => {
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
const exposeList = Array.isArray(json == null ? void 0 : json.exposes) ? json.exposes : [];
|
|
60
|
+
const sharedList = Array.isArray(json == null ? void 0 : json.shared) ? json.shared : [];
|
|
61
|
+
exposes2 = exposeList.map((expose) => expose.path) || [];
|
|
62
|
+
shareds2 = sharedList.map(
|
|
61
63
|
(share) => `${share.name}:${share.version}`
|
|
62
64
|
) || [];
|
|
63
65
|
setExposes(exposes2);
|
|
64
66
|
setShareds(shareds2);
|
|
67
|
+
}).catch(() => {
|
|
68
|
+
setExposes([]);
|
|
69
|
+
setShareds([]);
|
|
65
70
|
});
|
|
66
71
|
} else {
|
|
67
72
|
exposes2 = ((_a = remote == null ? void 0 : remote.modules) == null ? void 0 : _a.map(
|
|
@@ -73,8 +78,12 @@ const GraphItem = (props) => {
|
|
|
73
78
|
setExposes(exposes2);
|
|
74
79
|
setShareds(shareds2);
|
|
75
80
|
}
|
|
76
|
-
}, []);
|
|
77
|
-
|
|
81
|
+
}, [isEntryType, remote, version]);
|
|
82
|
+
const accentColor = color || "rgba(99, 102, 241, 0.45)";
|
|
83
|
+
const style = {
|
|
84
|
+
["--mf-accent"]: accentColor
|
|
85
|
+
};
|
|
86
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style, className: import_index.default.Wrapper, children: [
|
|
78
87
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_reactflow.Handle, { type: "target", position: import_reactflow.Position.Top }),
|
|
79
88
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: import_index.default.container, children: [
|
|
80
89
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.group, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: import_index.default.name, children: name }) }),
|
|
@@ -100,4 +109,4 @@ const GraphItem = (props) => {
|
|
|
100
109
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_reactflow.Handle, { type: "source", position: import_reactflow.Position.Bottom, id: "source" })
|
|
101
110
|
] });
|
|
102
111
|
};
|
|
103
|
-
var
|
|
112
|
+
var DependencyGraphItem_default = GraphItem;
|
|
@@ -22,4 +22,4 @@ __export(index_module_exports, {
|
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(index_module_exports);
|
|
24
24
|
var import_index_module = require("./index_module.css");
|
|
25
|
-
var index_module_default = { "
|
|
25
|
+
var index_module_default = { "Wrapper": "Wrapper_d8079", "container": "container_d8079", "group": "group_d8079", "name": "name_d8079", "info": "info_d8079", "expose-container": "expose-container_d8079", "type": "type_d8079", "item": "item_d8079", "message": "message_d8079" };
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
.Wrapper_d8079 {
|
|
2
|
+
display: flex;
|
|
3
|
+
width: 320px;
|
|
4
|
+
border-radius: 18px;
|
|
5
|
+
border: 1px solid rgba(96, 165, 250, 0.3);
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
box-shadow: 0 18px 32px rgba(8, 11, 25, 0.35);
|
|
8
|
+
background: linear-gradient(140deg, var(--mf-accent, rgba(243, 244, 246, 0.9)) 0%, rgba(229, 231, 235, 0.7) 45%, rgba(255, 255, 255, 0.95) 100%), rgba(255, 255, 255, 0.9);
|
|
9
|
+
color: #1f2937;
|
|
10
|
+
backdrop-filter: blur(4px);
|
|
11
|
+
}
|
|
12
|
+
.Wrapper_d8079 .react-flow__handle {
|
|
13
|
+
width: 10px;
|
|
14
|
+
height: 10px;
|
|
15
|
+
border-radius: 50%;
|
|
16
|
+
border: 2px solid rgba(96, 165, 250, 0.3);
|
|
17
|
+
background: rgba(243, 244, 246, 0.9);
|
|
18
|
+
box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.2);
|
|
19
|
+
}
|
|
20
|
+
.Wrapper_d8079 .container_d8079 {
|
|
21
|
+
display: flex;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
width: 100%;
|
|
24
|
+
padding-bottom: 8px;
|
|
25
|
+
}
|
|
26
|
+
.Wrapper_d8079 .group_d8079 {
|
|
27
|
+
display: flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
justify-content: center;
|
|
30
|
+
padding: 12px;
|
|
31
|
+
background: var(--mf-accent, rgba(243, 244, 246, 0.9));
|
|
32
|
+
}
|
|
33
|
+
.Wrapper_d8079 .name_d8079 {
|
|
34
|
+
font-size: 15px;
|
|
35
|
+
font-weight: 600;
|
|
36
|
+
letter-spacing: 0.02em;
|
|
37
|
+
color: white;
|
|
38
|
+
}
|
|
39
|
+
.Wrapper_d8079 .info_d8079 {
|
|
40
|
+
display: flex;
|
|
41
|
+
flex-direction: column;
|
|
42
|
+
gap: 10px;
|
|
43
|
+
margin: 0 12px;
|
|
44
|
+
padding: 12px;
|
|
45
|
+
border-radius: 14px;
|
|
46
|
+
background: rgba(243, 244, 246, 0.4);
|
|
47
|
+
border: 1px solid rgba(96, 165, 250, 0.3);
|
|
48
|
+
font-size: 11px;
|
|
49
|
+
}
|
|
50
|
+
.Wrapper_d8079 .expose-container_d8079 {
|
|
51
|
+
display: flex;
|
|
52
|
+
flex-direction: column;
|
|
53
|
+
gap: 6px;
|
|
54
|
+
}
|
|
55
|
+
.Wrapper_d8079 .expose-container_d8079 div {
|
|
56
|
+
display: flex;
|
|
57
|
+
flex-wrap: wrap;
|
|
58
|
+
gap: 6px;
|
|
59
|
+
}
|
|
60
|
+
.Wrapper_d8079 .type_d8079 {
|
|
61
|
+
font-size: 12px;
|
|
62
|
+
font-weight: 600;
|
|
63
|
+
text-transform: uppercase;
|
|
64
|
+
letter-spacing: 0.04em;
|
|
65
|
+
color: #4b5563;
|
|
66
|
+
}
|
|
67
|
+
.Wrapper_d8079 .item_d8079 {
|
|
68
|
+
display: inline-flex;
|
|
69
|
+
align-items: center;
|
|
70
|
+
padding: 4px 8px;
|
|
71
|
+
border-radius: 999px;
|
|
72
|
+
background: rgba(243, 244, 246, 0.6);
|
|
73
|
+
color: #1f2937;
|
|
74
|
+
font-size: 10px;
|
|
75
|
+
font-weight: 500;
|
|
76
|
+
margin-right: 6px;
|
|
77
|
+
max-width: 100%;
|
|
78
|
+
white-space: nowrap;
|
|
79
|
+
text-overflow: ellipsis;
|
|
80
|
+
overflow: hidden;
|
|
81
|
+
box-shadow: 0 4px 10px rgba(8, 11, 25, 0.45);
|
|
82
|
+
}
|
|
83
|
+
.Wrapper_d8079 .message_d8079 {
|
|
84
|
+
display: flex;
|
|
85
|
+
align-items: center;
|
|
86
|
+
gap: 6px;
|
|
87
|
+
font-size: 11px;
|
|
88
|
+
color: #4b5563;
|
|
89
|
+
}
|
|
90
|
+
.Wrapper_d8079 .message_d8079 .item_d8079 {
|
|
91
|
+
margin-right: 0;
|
|
92
|
+
padding: 4px 10px;
|
|
93
|
+
background: rgba(243, 244, 246, 0.6);
|
|
94
|
+
color: #1f2937;
|
|
95
|
+
}
|