html-overlay-node 0.1.0

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/index.css ADDED
@@ -0,0 +1,232 @@
1
+ html,
2
+ body {
3
+ height: 100%;
4
+ margin: 0;
5
+ overflow: hidden;
6
+ /* Prevent page scroll */
7
+ }
8
+
9
+ #wrap {
10
+ height: 100%;
11
+ width: 100%;
12
+ display: flex;
13
+ overflow: hidden;
14
+ /* Prevent grid overflow */
15
+ }
16
+
17
+ .content-root {
18
+ width: 100%;
19
+ height: 100%;
20
+ position: relative;
21
+ overflow: hidden;
22
+ /* KEY FIX: Prevent scroll on zoom/pan */
23
+ }
24
+
25
+ #cv {
26
+ width: 100%;
27
+ height: 100%;
28
+ display: block;
29
+ position: absolute;
30
+ top: 0;
31
+ left: 0;
32
+ }
33
+
34
+ button {
35
+ margin-right: 8px;
36
+ }
37
+
38
+ /* Toolbar buttons */
39
+ #toolbar button {
40
+ padding: 6px 12px;
41
+ background: #6366f1;
42
+ color: #fff;
43
+ border: none;
44
+ border-radius: 4px;
45
+ font-size: 12px;
46
+ font-weight: 500;
47
+ cursor: pointer;
48
+ transition: all 0.2s ease;
49
+ display: flex;
50
+ align-items: center;
51
+ gap: 4px;
52
+ margin: 0;
53
+ }
54
+
55
+ #toolbar button:hover {
56
+ background: #818cf8;
57
+ transform: translateY(-1px);
58
+ box-shadow: 0 2px 4px rgba(99, 102, 241, 0.3);
59
+ }
60
+
61
+ #toolbar button:active {
62
+ transform: translateY(0);
63
+ }
64
+
65
+ /* Toolbar */
66
+ #toolbar {
67
+ z-index: 1000;
68
+ position: absolute;
69
+ top: 20px;
70
+ left: 20px;
71
+ display: flex;
72
+ gap: 12px;
73
+ align-items: center;
74
+ padding: 12px 16px;
75
+ background: rgba(30, 30, 36, 0.95);
76
+ border-radius: 8px;
77
+ border: 1px solid #444;
78
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
79
+ font-family:
80
+ system-ui,
81
+ -apple-system,
82
+ sans-serif;
83
+ font-size: 13px;
84
+ color: #e9e9ef;
85
+ }
86
+
87
+ #toolbar label {
88
+ display: flex;
89
+ align-items: center;
90
+ gap: 6px;
91
+ cursor: pointer;
92
+ }
93
+
94
+ #toolbar select {
95
+ padding: 4px 8px;
96
+ background: #1a1a1e;
97
+ border: 1px solid #555;
98
+ border-radius: 4px;
99
+ color: #e9e9ef;
100
+ font-size: 12px;
101
+ }
102
+
103
+ .indicator {
104
+ padding: 4px 8px;
105
+ background: #2a2a31;
106
+ border-radius: 4px;
107
+ font-size: 11px;
108
+ font-weight: 500;
109
+ }
110
+
111
+ .indicator.active {
112
+ background: #3a4a5a;
113
+ color: #6cf;
114
+ }
115
+
116
+ /* Help Overlay */
117
+ #helpOverlay {
118
+ position: absolute;
119
+ bottom: 20px;
120
+ left: 20px;
121
+ width: 320px;
122
+ max-height: 500px;
123
+ background: rgba(20, 20, 23, 0.95);
124
+ border: 2px solid #444;
125
+ border-radius: 8px;
126
+ padding: 16px;
127
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
128
+ font-family:
129
+ system-ui,
130
+ -apple-system,
131
+ sans-serif;
132
+ font-size: 13px;
133
+ color: #e9e9ef;
134
+ overflow-y: auto;
135
+ display: none;
136
+ z-index: 1000;
137
+ /* Ensure it appears above canvas */
138
+ }
139
+
140
+ #helpOverlay.visible {
141
+ display: block;
142
+ }
143
+
144
+ #helpOverlay h3 {
145
+ margin: 0 0 12px 0;
146
+ font-size: 16px;
147
+ color: #6cf;
148
+ border-bottom: 1px solid #444;
149
+ padding-bottom: 8px;
150
+ display: flex;
151
+ justify-content: space-between;
152
+ align-items: center;
153
+ }
154
+
155
+ #helpOverlay .close-btn {
156
+ cursor: pointer;
157
+ font-size: 24px;
158
+ line-height: 1;
159
+ color: #888;
160
+ transition: color 0.2s;
161
+ background: none;
162
+ border: none;
163
+ padding: 0;
164
+ width: 24px;
165
+ height: 24px;
166
+ display: flex;
167
+ align-items: center;
168
+ justify-content: center;
169
+ }
170
+
171
+ #helpOverlay .close-btn:hover {
172
+ color: #6cf;
173
+ }
174
+
175
+ #helpOverlay h4 {
176
+ margin: 16px 0 8px 0;
177
+ font-size: 13px;
178
+ color: #8aa1ff;
179
+ font-weight: 600;
180
+ }
181
+
182
+ .shortcut-item {
183
+ display: flex;
184
+ justify-content: space-between;
185
+ align-items: center;
186
+ padding: 6px 8px;
187
+ margin: 4px 0;
188
+ background: rgba(42, 42, 49, 0.5);
189
+ border-radius: 4px;
190
+ }
191
+
192
+ .shortcut-key {
193
+ font-family: monospace;
194
+ font-weight: bold;
195
+ padding: 2px 6px;
196
+ background: #1a1a1e;
197
+ border: 1px solid #555;
198
+ border-radius: 3px;
199
+ font-size: 11px;
200
+ color: #6cf;
201
+ }
202
+
203
+ #helpToggle {
204
+ position: absolute;
205
+ bottom: 20px;
206
+ left: 20px;
207
+ width: 40px;
208
+ height: 40px;
209
+ background: rgba(30, 30, 36, 0.95);
210
+ border: 2px solid #444;
211
+ border-radius: 50%;
212
+ display: flex;
213
+ align-items: center;
214
+ justify-content: center;
215
+ font-size: 20px;
216
+ font-weight: bold;
217
+ color: #6cf;
218
+ cursor: pointer;
219
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
220
+ transition: all 0.2s ease;
221
+ z-index: 1000;
222
+ /* Ensure it appears above canvas */
223
+ }
224
+
225
+ #helpToggle:hover {
226
+ background: rgba(42, 42, 49, 0.95);
227
+ transform: scale(1.05);
228
+ }
229
+
230
+ #helpToggle.active {
231
+ background: #3a4a5a;
232
+ }
package/package.json ADDED
@@ -0,0 +1,65 @@
1
+ {
2
+ "name": "html-overlay-node",
3
+ "version": "0.1.0",
4
+ "description": "A customizable, LiteGraph-style node editor library with canvas rendering, HTML overlays, and flexible execution control",
5
+ "main": "dist/html-overlay-node.umd.js",
6
+ "module": "dist/html-overlay-node.es.js",
7
+ "type": "module",
8
+ "exports": {
9
+ ".": {
10
+ "import": "./dist/html-overlay-node.es.js",
11
+ "require": "./dist/html-overlay-node.umd.js"
12
+ }
13
+ },
14
+ "files": [
15
+ "dist",
16
+ "src",
17
+ "index.css",
18
+ "README.md",
19
+ "LICENSE"
20
+ ],
21
+ "scripts": {
22
+ "dev": "vite",
23
+ "build": "vite build",
24
+ "test": "vitest run",
25
+ "test:watch": "vitest",
26
+ "test:coverage": "vitest run --coverage",
27
+ "lint": "eslint src/**/*.js",
28
+ "lint:fix": "eslint src/**/*.js --fix",
29
+ "format": "prettier --write \"src/**/*.js\" \"*.md\" \"*.json\"",
30
+ "format:check": "prettier --check \"src/**/*.js\" \"*.md\" \"*.json\"",
31
+ "prepare": "npm run build"
32
+ },
33
+ "keywords": [
34
+ "node-editor",
35
+ "graph-editor",
36
+ "visual-programming",
37
+ "canvas",
38
+ "litegraph",
39
+ "node-graph",
40
+ "data-flow",
41
+ "workflow",
42
+ "visual-scripting"
43
+ ],
44
+ "author": "cheonghakim",
45
+ "license": "ISC",
46
+ "repository": {
47
+ "type": "git",
48
+ "url": "https://github.com/cheonghakim/html-overlay-node.git"
49
+ },
50
+ "bugs": {
51
+ "url": "https://github.com/cheonghakim/html-overlay-node/issues"
52
+ },
53
+ "homepage": "https://github.com/cheonghakim/html-overlay-node#readme",
54
+ "dependencies": {},
55
+ "devDependencies": {
56
+ "@eslint/js": "^9.39.1",
57
+ "@vitest/coverage-v8": "^2.1.8",
58
+ "eslint": "^9.17.0",
59
+ "jsdom": "^27.2.0",
60
+ "prettier": "^3.4.2",
61
+ "terser": "^5.43.1",
62
+ "vite": "^6.3.5",
63
+ "vitest": "^2.1.8"
64
+ }
65
+ }