@teambit/graph 0.0.558 → 0.0.559
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/graph.docs.md +7 -0
- package/package.json +23 -16
- package/ui/component-node/component-node.module.scss +63 -0
- package/ui/component-node/variants.module.scss +43 -0
- package/ui/dependencies-graph/dep-edge/edge.module.scss +10 -0
- package/ui/dependencies-graph/dependencies-graph.module.scss +83 -0
- package/ui/graph-page/graph-page.module.scss +35 -0
package/graph.docs.md
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
description: Generate Bit component dependency graphs.
|
3
|
+
labels: ['dependency', 'graph', 'component', 'bit']
|
4
|
+
---
|
5
|
+
|
6
|
+
This is an extension that knows to build a graph of components from a component or a list of components.
|
7
|
+
It uses the component-resolver extension in order to resolve the component dependencies during the graph building.
|
package/package.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"name": "@teambit/graph",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.559",
|
4
4
|
"homepage": "https://bit.dev/teambit/component/graph",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"componentId": {
|
7
7
|
"scope": "teambit.component",
|
8
8
|
"name": "graph",
|
9
|
-
"version": "0.0.
|
9
|
+
"version": "0.0.559"
|
10
10
|
},
|
11
11
|
"dependencies": {
|
12
12
|
"@teambit/harmony": "0.2.11",
|
@@ -23,17 +23,17 @@
|
|
23
23
|
"@teambit/base-ui.text.muted-text": "1.0.1",
|
24
24
|
"@teambit/evangelist.input.checkbox.label": "1.0.3",
|
25
25
|
"@teambit/documenter.ui.heading": "4.1.1",
|
26
|
-
"@teambit/component": "0.0.
|
27
|
-
"@teambit/graphql": "0.0.
|
28
|
-
"@teambit/cli": "0.0.
|
29
|
-
"@teambit/ui": "0.0.
|
30
|
-
"@teambit/legacy-bit-id": "0.0.
|
31
|
-
"@teambit/component.ui.deprecation-icon": "0.0.
|
26
|
+
"@teambit/component": "0.0.559",
|
27
|
+
"@teambit/graphql": "0.0.559",
|
28
|
+
"@teambit/cli": "0.0.389",
|
29
|
+
"@teambit/ui": "0.0.559",
|
30
|
+
"@teambit/legacy-bit-id": "0.0.378",
|
31
|
+
"@teambit/component.ui.deprecation-icon": "0.0.472",
|
32
32
|
"@teambit/design.ui.styles.ellipsis": "0.0.346",
|
33
|
-
"@teambit/envs.ui.env-icon": "0.0.
|
33
|
+
"@teambit/envs.ui.env-icon": "0.0.466",
|
34
34
|
"@teambit/design.ui.pages.not-found": "0.0.352",
|
35
35
|
"@teambit/design.ui.pages.server-error": "0.0.352",
|
36
|
-
"@teambit/ui-foundation.ui.hooks.use-data-query": "0.0.
|
36
|
+
"@teambit/ui-foundation.ui.hooks.use-data-query": "0.0.467"
|
37
37
|
},
|
38
38
|
"devDependencies": {
|
39
39
|
"@types/react": "^17.0.8",
|
@@ -49,7 +49,7 @@
|
|
49
49
|
},
|
50
50
|
"peerDependencies": {
|
51
51
|
"@apollo/client": "^3.0.0",
|
52
|
-
"@teambit/legacy": "1.0.
|
52
|
+
"@teambit/legacy": "1.0.175",
|
53
53
|
"react-dom": "^16.8.0 || ^17.0.0",
|
54
54
|
"react": "^16.8.0 || ^17.0.0"
|
55
55
|
},
|
@@ -77,7 +77,7 @@
|
|
77
77
|
"react": "-"
|
78
78
|
},
|
79
79
|
"peerDependencies": {
|
80
|
-
"@teambit/legacy": "1.0.
|
80
|
+
"@teambit/legacy": "1.0.175",
|
81
81
|
"react-dom": "^16.8.0 || ^17.0.0",
|
82
82
|
"react": "^16.8.0 || ^17.0.0"
|
83
83
|
}
|
@@ -86,10 +86,17 @@
|
|
86
86
|
"files": [
|
87
87
|
"dist",
|
88
88
|
"!dist/tsconfig.tsbuildinfo",
|
89
|
-
"
|
90
|
-
"
|
91
|
-
"
|
92
|
-
"
|
89
|
+
"**/*.md",
|
90
|
+
"**/*.mdx",
|
91
|
+
"**/*.js",
|
92
|
+
"**/*.json",
|
93
|
+
"**/*.sass",
|
94
|
+
"**/*.scss",
|
95
|
+
"**/*.less",
|
96
|
+
"**/*.css",
|
97
|
+
"**/*.css",
|
98
|
+
"**/*.jpeg",
|
99
|
+
"**/*.gif"
|
93
100
|
],
|
94
101
|
"private": false,
|
95
102
|
"engines": {
|
@@ -0,0 +1,63 @@
|
|
1
|
+
.compNode {
|
2
|
+
max-width: 300px;
|
3
|
+
min-width: 200px;
|
4
|
+
border-width: 2px;
|
5
|
+
border-style: solid;
|
6
|
+
padding: 16px;
|
7
|
+
background: white;
|
8
|
+
|
9
|
+
text-align: left;
|
10
|
+
}
|
11
|
+
|
12
|
+
.firstRow {
|
13
|
+
display: flex;
|
14
|
+
align-items: center;
|
15
|
+
margin-bottom: 4px;
|
16
|
+
}
|
17
|
+
|
18
|
+
.envIcon {
|
19
|
+
margin-right: 8px;
|
20
|
+
}
|
21
|
+
|
22
|
+
.breadcrumbs {
|
23
|
+
color: #6c707c;
|
24
|
+
font-size: 12px;
|
25
|
+
}
|
26
|
+
|
27
|
+
.nameLine {
|
28
|
+
display: flex;
|
29
|
+
align-items: center;
|
30
|
+
}
|
31
|
+
|
32
|
+
.name {
|
33
|
+
font-weight: bold;
|
34
|
+
margin-right: 8px;
|
35
|
+
|
36
|
+
overflow: hidden;
|
37
|
+
text-overflow: ellipsis;
|
38
|
+
white-space: nowrap;
|
39
|
+
}
|
40
|
+
|
41
|
+
.version {
|
42
|
+
margin-right: 8px;
|
43
|
+
max-width: 80px;
|
44
|
+
}
|
45
|
+
|
46
|
+
.buffs {
|
47
|
+
display: flex;
|
48
|
+
margin-left: auto;
|
49
|
+
line-height: 1;
|
50
|
+
font-size: 15px;
|
51
|
+
line-height: 16px;
|
52
|
+
|
53
|
+
> * {
|
54
|
+
margin-right: 8px;
|
55
|
+
}
|
56
|
+
> *:last-child {
|
57
|
+
margin-right: 0px;
|
58
|
+
}
|
59
|
+
|
60
|
+
&:empty {
|
61
|
+
display: none;
|
62
|
+
}
|
63
|
+
}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
$success: #37b26c;
|
2
|
+
$regularNodeColor: #3a95ff;
|
3
|
+
$br20: #f3faff;
|
4
|
+
$d40: #6c707c;
|
5
|
+
|
6
|
+
$borderLabelHeight: 20px;
|
7
|
+
|
8
|
+
.root {
|
9
|
+
border-color: $success;
|
10
|
+
border-top-width: 20px;
|
11
|
+
|
12
|
+
border-radius: 10px;
|
13
|
+
box-shadow: 0px 0px 0px 2px #d0f1de, var(--bit-shadow-hover-medium);
|
14
|
+
|
15
|
+
&:before {
|
16
|
+
content: 'Current component';
|
17
|
+
position: absolute;
|
18
|
+
top: 1px;
|
19
|
+
left: 10px;
|
20
|
+
|
21
|
+
font-size: $borderLabelHeight / 2;
|
22
|
+
color: white;
|
23
|
+
line-height: $borderLabelHeight;
|
24
|
+
}
|
25
|
+
}
|
26
|
+
|
27
|
+
.defaultNode {
|
28
|
+
border-color: $regularNodeColor;
|
29
|
+
|
30
|
+
box-shadow: 0px 0px 0px 2px $br20;
|
31
|
+
}
|
32
|
+
|
33
|
+
.external {
|
34
|
+
border-color: $d40;
|
35
|
+
|
36
|
+
box-shadow: 0px 0px 0px 2px var(border--color);
|
37
|
+
}
|
38
|
+
|
39
|
+
:export {
|
40
|
+
rootNodeColor: $success;
|
41
|
+
defaultNodeColor: $regularNodeColor;
|
42
|
+
externalNodeColor: $d40;
|
43
|
+
}
|
@@ -0,0 +1,83 @@
|
|
1
|
+
$d30: #878c9a;
|
2
|
+
$b70: #0d2de3;
|
3
|
+
|
4
|
+
.graph {
|
5
|
+
:global {
|
6
|
+
.react-flow__edge-path {
|
7
|
+
stroke: $d30;
|
8
|
+
stroke-width: 2px;
|
9
|
+
}
|
10
|
+
|
11
|
+
// creates space between the handles and lines
|
12
|
+
.react-flow__handle {
|
13
|
+
background: none;
|
14
|
+
border: none;
|
15
|
+
|
16
|
+
&-bottom {
|
17
|
+
bottom: -4px;
|
18
|
+
}
|
19
|
+
&-top {
|
20
|
+
top: -4px;
|
21
|
+
}
|
22
|
+
&-left {
|
23
|
+
left: -4px;
|
24
|
+
}
|
25
|
+
&-right {
|
26
|
+
right: -4px;
|
27
|
+
}
|
28
|
+
}
|
29
|
+
|
30
|
+
.react-flow__arrowhead polyline {
|
31
|
+
stroke: $d30;
|
32
|
+
stroke-width: 2px;
|
33
|
+
}
|
34
|
+
|
35
|
+
// show labels for labels, on hover
|
36
|
+
.react-flow__edge {
|
37
|
+
pointer-events: all !important;
|
38
|
+
&:hover {
|
39
|
+
.react-flow__edge-textbg,
|
40
|
+
.react-flow__edge-text {
|
41
|
+
transition: all 300ms;
|
42
|
+
opacity: 1;
|
43
|
+
}
|
44
|
+
}
|
45
|
+
}
|
46
|
+
|
47
|
+
.react-flow__edge-textbg {
|
48
|
+
fill: #414141;
|
49
|
+
}
|
50
|
+
|
51
|
+
.react-flow__edge-text {
|
52
|
+
fill: white;
|
53
|
+
}
|
54
|
+
|
55
|
+
.react-flow__edge-textbg,
|
56
|
+
.react-flow__edge-text {
|
57
|
+
opacity: 0;
|
58
|
+
}
|
59
|
+
}
|
60
|
+
}
|
61
|
+
|
62
|
+
.minimap {
|
63
|
+
right: 24px;
|
64
|
+
bottom: 24px;
|
65
|
+
box-shadow: var(--bit-shadow-faint);
|
66
|
+
background: white !important; // override inline styles from package
|
67
|
+
border-radius: 5px;
|
68
|
+
|
69
|
+
:global {
|
70
|
+
.react-flow__minimap-mask {
|
71
|
+
stroke: $b70;
|
72
|
+
stroke-width: 4px;
|
73
|
+
fill: transparent;
|
74
|
+
}
|
75
|
+
}
|
76
|
+
}
|
77
|
+
|
78
|
+
.controls {
|
79
|
+
box-shadow: var(--bit-shadow-faint);
|
80
|
+
|
81
|
+
left: 24px;
|
82
|
+
bottom: 24px;
|
83
|
+
}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
.page {
|
2
|
+
display: flex;
|
3
|
+
flex-direction: column;
|
4
|
+
height: 100%;
|
5
|
+
padding: 24px;
|
6
|
+
|
7
|
+
h2 {
|
8
|
+
margin-bottom: 24px;
|
9
|
+
}
|
10
|
+
}
|
11
|
+
|
12
|
+
.graph {
|
13
|
+
flex-grow: 1;
|
14
|
+
height: 100%;
|
15
|
+
width: unset;
|
16
|
+
|
17
|
+
border-radius: 5px;
|
18
|
+
border: solid 1px var(--bit-border-color-lightest, #ededed);
|
19
|
+
background: var(--bit-bg-dent, #f6f6f6);
|
20
|
+
}
|
21
|
+
|
22
|
+
.summery {
|
23
|
+
margin-bottom: 24px;
|
24
|
+
}
|
25
|
+
|
26
|
+
.filters {
|
27
|
+
position: absolute;
|
28
|
+
top: 8px;
|
29
|
+
right: 8px;
|
30
|
+
padding: 8px;
|
31
|
+
|
32
|
+
font-size: 0.75em;
|
33
|
+
box-shadow: var(--bit-shadow-faint);
|
34
|
+
z-index: 8; // position above the abs positioned graph items
|
35
|
+
}
|