@flowgram.ai/renderer 0.1.0-alpha.10
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/esm/index.js +3074 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/index.d.mts +686 -0
- package/dist/index.d.ts +686 -0
- package/dist/index.js +3025 -0
- package/dist/index.js.map +1 -0
- package/index.module.less +167 -0
- package/package.json +60 -0
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
:root {
|
|
7
|
+
--g-selection-background: #336df4;
|
|
8
|
+
--g-editor-background: #f2f3f5;
|
|
9
|
+
--g-playground-select: var(--g-selection-background);
|
|
10
|
+
--g-playground-hover: var(--g-selection-background);
|
|
11
|
+
--g-playground-line: var(--g-selection-background);
|
|
12
|
+
--g-playground-blur: #999;
|
|
13
|
+
--g-playground-ruler-select: #3794ff;
|
|
14
|
+
--g-playground-selectBox-outline: var(--g-selection-background);
|
|
15
|
+
--g-playground-selectBox-background: rgba(51, 109, 244, 0.1);
|
|
16
|
+
--g-playground-select-hover-background: rgba(51, 109, 244, 0.1);
|
|
17
|
+
--g-playground-select-control-size: 12px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
:global {
|
|
21
|
+
.gedit-playground {
|
|
22
|
+
position: absolute;
|
|
23
|
+
width: 100%;
|
|
24
|
+
height: 100%;
|
|
25
|
+
left: 0;
|
|
26
|
+
top: 0;
|
|
27
|
+
z-index: 10;
|
|
28
|
+
overflow: hidden;
|
|
29
|
+
user-select: none;
|
|
30
|
+
outline: none;
|
|
31
|
+
box-sizing: border-box;
|
|
32
|
+
background-color: var(--g-editor-background);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.gedit-playground-scroll-right {
|
|
36
|
+
position: absolute;
|
|
37
|
+
right: 2px;
|
|
38
|
+
height: 100vh;
|
|
39
|
+
width: 7px;
|
|
40
|
+
z-index: 10;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.gedit-playground-scroll-bottom {
|
|
44
|
+
position: absolute;
|
|
45
|
+
bottom: 2px;
|
|
46
|
+
width: 100vw;
|
|
47
|
+
height: 7px;
|
|
48
|
+
z-index: 10;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.gedit-playground-scroll-right-block {
|
|
52
|
+
position: absolute;
|
|
53
|
+
opacity: 0.3;
|
|
54
|
+
border-radius: 3.5px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.gedit-playground-scroll-right-block:hover {
|
|
58
|
+
opacity: 0.6;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.gedit-playground-scroll-bottom-block {
|
|
62
|
+
position: absolute;
|
|
63
|
+
opacity: 0.3;
|
|
64
|
+
border-radius: 3.5px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.gedit-playground-scroll-bottom-block:hover {
|
|
68
|
+
opacity: 0.6;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.gedit-playground-scroll-hidden {
|
|
72
|
+
opacity: 0;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.gedit-playground * {
|
|
76
|
+
box-sizing: border-box;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.gedit-playground-loading {
|
|
80
|
+
position: absolute;
|
|
81
|
+
color: white;
|
|
82
|
+
left: 50%;
|
|
83
|
+
top: 50%;
|
|
84
|
+
z-index: 100;
|
|
85
|
+
display: flex;
|
|
86
|
+
justify-content: center;
|
|
87
|
+
align-items: center;
|
|
88
|
+
transition: opacity 0.8s;
|
|
89
|
+
flex-direction: column;
|
|
90
|
+
text-align: center;
|
|
91
|
+
opacity: 0.8;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.gedit-hidden {
|
|
95
|
+
display: none;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.gedit-playground-pipeline {
|
|
99
|
+
position: absolute;
|
|
100
|
+
overflow: visible;
|
|
101
|
+
width: 100%;
|
|
102
|
+
height: 100%;
|
|
103
|
+
left: 0;
|
|
104
|
+
top: 0;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.gedit-playground-pipeline::before {
|
|
108
|
+
content: '';
|
|
109
|
+
position: absolute;
|
|
110
|
+
width: 1px;
|
|
111
|
+
height: 100%;
|
|
112
|
+
left: 0;
|
|
113
|
+
top: 0;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.gedit-playground-layer {
|
|
117
|
+
position: absolute;
|
|
118
|
+
overflow: visible;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.gedit-selector-box {
|
|
122
|
+
position: absolute;
|
|
123
|
+
left: 0;
|
|
124
|
+
top: 0;
|
|
125
|
+
width: 0;
|
|
126
|
+
height: 0;
|
|
127
|
+
z-index: 33;
|
|
128
|
+
outline: 1px solid var(--g-playground-selectBox-outline);
|
|
129
|
+
background-color: var(--g-playground-selectBox-background);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.gedit-selector-box-block {
|
|
133
|
+
position: absolute;
|
|
134
|
+
left: 0;
|
|
135
|
+
top: 0;
|
|
136
|
+
width: 0;
|
|
137
|
+
height: 0;
|
|
138
|
+
z-index: 9999;
|
|
139
|
+
display: none;
|
|
140
|
+
background-color: rgba(0, 0, 0, 0);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.gedit-selector-bounds-background {
|
|
144
|
+
position: absolute;
|
|
145
|
+
left: 0;
|
|
146
|
+
top: 0;
|
|
147
|
+
width: 0;
|
|
148
|
+
height: 0;
|
|
149
|
+
outline: 1px solid var(--g-playground-selectBox-outline);
|
|
150
|
+
background-color: #f0f4ff;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.gedit-selector-bounds-foreground {
|
|
154
|
+
position: absolute;
|
|
155
|
+
left: 0;
|
|
156
|
+
top: 0;
|
|
157
|
+
width: 0;
|
|
158
|
+
height: 0;
|
|
159
|
+
z-index: 33;
|
|
160
|
+
background: rgba(255, 255, 255, 0);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.gedit-flow-activity-node {
|
|
164
|
+
position: absolute;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@flowgram.ai/renderer",
|
|
3
|
+
"version": "0.1.0-alpha.10",
|
|
4
|
+
"homepage": "https://flowgram.ai/",
|
|
5
|
+
"repository": "https://github.com/bytedance/flowgram.ai",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"exports": {
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"import": "./dist/esm/index.js",
|
|
10
|
+
"require": "./dist/index.js"
|
|
11
|
+
},
|
|
12
|
+
"main": "./dist/index.js",
|
|
13
|
+
"module": "./dist/esm/index.js",
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"index.module.less"
|
|
18
|
+
],
|
|
19
|
+
"dependencies": {
|
|
20
|
+
"inversify": "^6.0.1",
|
|
21
|
+
"lodash": "^4.17.21",
|
|
22
|
+
"reflect-metadata": "~0.2.2",
|
|
23
|
+
"@flowgram.ai/core": "0.1.0-alpha.10",
|
|
24
|
+
"@flowgram.ai/i18n": "0.1.0-alpha.10",
|
|
25
|
+
"@flowgram.ai/utils": "0.1.0-alpha.10",
|
|
26
|
+
"@flowgram.ai/document": "0.1.0-alpha.10"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@testing-library/react": "^12",
|
|
30
|
+
"@testing-library/react-hooks": "^8.0.1",
|
|
31
|
+
"@types/lodash": "^4.14.137",
|
|
32
|
+
"@types/react": "^18",
|
|
33
|
+
"@types/react-dom": "^18",
|
|
34
|
+
"@vitest/coverage-v8": "^0.32.0",
|
|
35
|
+
"eslint": "^8.54.0",
|
|
36
|
+
"tsup": "^8.0.1",
|
|
37
|
+
"typescript": "^5.0.4",
|
|
38
|
+
"vitest": "^0.34.6",
|
|
39
|
+
"@flowgram.ai/eslint-config": "0.1.0-alpha.10",
|
|
40
|
+
"@flowgram.ai/ts-config": "0.1.0-alpha.10"
|
|
41
|
+
},
|
|
42
|
+
"peerDependencies": {
|
|
43
|
+
"react": ">=16.8",
|
|
44
|
+
"react-dom": ">=16.8"
|
|
45
|
+
},
|
|
46
|
+
"publishConfig": {
|
|
47
|
+
"access": "public",
|
|
48
|
+
"registry": "https://registry.npmjs.org/"
|
|
49
|
+
},
|
|
50
|
+
"scripts": {
|
|
51
|
+
"build": "npm run build:fast -- --dts-resolve",
|
|
52
|
+
"build:fast": "tsup src/index.ts --format cjs,esm --sourcemap --legacy-output",
|
|
53
|
+
"build:watch": "npm run build:fast -- --dts-resolve",
|
|
54
|
+
"clean": "rimraf dist",
|
|
55
|
+
"test": "vitest run",
|
|
56
|
+
"test:cov": "vitest run --coverage",
|
|
57
|
+
"ts-check": "tsc --noEmit",
|
|
58
|
+
"watch": "npm run build:fast -- --dts-resolve --watch --ignore-watch dist"
|
|
59
|
+
}
|
|
60
|
+
}
|