@stevejtrettel/shader-sandbox 0.1.0 → 0.1.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.
@@ -0,0 +1,208 @@
1
+ /**
2
+ * App Styles - FPS counter and shader error overlay
3
+ */
4
+
5
+ /* ===== FPS Counter ===== */
6
+ .fps-counter {
7
+ position: absolute;
8
+ bottom: 8px;
9
+ left: 8px;
10
+ padding: 6px 10px;
11
+ background: rgba(0, 0, 0, 0.75);
12
+ color: white;
13
+ font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
14
+ font-size: 12px;
15
+ font-weight: 500;
16
+ border-radius: 4px;
17
+ pointer-events: none;
18
+ user-select: none;
19
+ z-index: 1000;
20
+ backdrop-filter: blur(4px);
21
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
22
+ }
23
+
24
+ /* ===== Playback Controls ===== */
25
+ .playback-controls {
26
+ position: absolute;
27
+ bottom: 8px;
28
+ right: 8px;
29
+ display: flex;
30
+ gap: 8px;
31
+ z-index: 1000;
32
+ }
33
+
34
+ .control-button {
35
+ padding: 6px 8px;
36
+ background: rgba(0, 0, 0, 0.75);
37
+ color: white;
38
+ border: none;
39
+ border-radius: 4px;
40
+ cursor: pointer;
41
+ backdrop-filter: blur(4px);
42
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
43
+ transition: all 0.2s ease;
44
+ display: flex;
45
+ align-items: center;
46
+ justify-content: center;
47
+ width: 32px;
48
+ height: 32px;
49
+ }
50
+
51
+ .control-button:hover {
52
+ background: rgba(0, 0, 0, 0.85);
53
+ transform: scale(1.05);
54
+ }
55
+
56
+ .control-button:active {
57
+ transform: scale(0.95);
58
+ }
59
+
60
+ .control-button svg {
61
+ width: 16px;
62
+ height: 16px;
63
+ fill: currentColor;
64
+ }
65
+
66
+ /* ===== Shader Error Overlay ===== */
67
+ .shader-error-overlay {
68
+ position: absolute;
69
+ top: 0;
70
+ left: 0;
71
+ right: 0;
72
+ bottom: 0;
73
+ background: rgba(0, 0, 0, 0.95);
74
+ backdrop-filter: blur(8px);
75
+ display: flex;
76
+ align-items: center;
77
+ justify-content: center;
78
+ z-index: 2000;
79
+ padding: 60px;
80
+ overflow-y: auto;
81
+ }
82
+
83
+ .error-overlay-content {
84
+ background: #1a1a1a;
85
+ border-radius: 6px;
86
+ max-width: 900px;
87
+ width: 100%;
88
+ display: flex;
89
+ flex-direction: column;
90
+ box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 1px rgba(255, 255, 255, 0.1);
91
+ border: 1px solid #2a2a2a;
92
+ max-height: calc(100vh - 120px);
93
+ }
94
+
95
+ .error-header {
96
+ display: flex;
97
+ align-items: center;
98
+ justify-content: space-between;
99
+ padding: 18px 24px;
100
+ background: linear-gradient(135deg, #c62828 0%, #b71c1c 100%);
101
+ color: white;
102
+ border-radius: 6px 6px 0 0;
103
+ border-bottom: 1px solid rgba(0, 0, 0, 0.3);
104
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
105
+ }
106
+
107
+ .error-title {
108
+ font-size: 15px;
109
+ font-weight: 600;
110
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
111
+ display: flex;
112
+ align-items: center;
113
+ gap: 8px;
114
+ letter-spacing: -0.01em;
115
+ }
116
+
117
+ .error-close {
118
+ background: transparent;
119
+ border: none;
120
+ color: rgba(255, 255, 255, 0.9);
121
+ font-size: 24px;
122
+ line-height: 1;
123
+ cursor: pointer;
124
+ padding: 0;
125
+ width: 32px;
126
+ height: 32px;
127
+ display: flex;
128
+ align-items: center;
129
+ justify-content: center;
130
+ border-radius: 4px;
131
+ transition: all 0.2s ease;
132
+ opacity: 0.8;
133
+ }
134
+
135
+ .error-close:hover {
136
+ background: rgba(255, 255, 255, 0.15);
137
+ opacity: 1;
138
+ transform: scale(1.05);
139
+ }
140
+
141
+ .error-body {
142
+ padding: 24px;
143
+ overflow-y: auto;
144
+ flex: 1;
145
+ }
146
+
147
+ .error-section {
148
+ margin-bottom: 24px;
149
+ }
150
+
151
+ .error-section:last-child {
152
+ margin-bottom: 0;
153
+ }
154
+
155
+ .error-pass-name {
156
+ font-size: 13px;
157
+ font-weight: 600;
158
+ color: #ffa726;
159
+ font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
160
+ margin-bottom: 10px;
161
+ padding-bottom: 6px;
162
+ border-bottom: 1px solid #2a2a2a;
163
+ letter-spacing: 0.02em;
164
+ }
165
+
166
+ .error-content {
167
+ margin: 0;
168
+ padding: 14px 16px;
169
+ background: #0f0f0f;
170
+ border-radius: 4px;
171
+ color: #ff6b6b;
172
+ font-size: 13px;
173
+ font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
174
+ line-height: 1.6;
175
+ overflow-x: auto;
176
+ border: 1px solid #2a2a2a;
177
+ white-space: pre-wrap;
178
+ word-break: break-word;
179
+ }
180
+
181
+ .error-code-context {
182
+ margin: 12px 0 0 0;
183
+ padding: 14px 16px;
184
+ background: #0d0d0d;
185
+ border-radius: 4px;
186
+ color: #b0b0b0;
187
+ font-size: 12px;
188
+ font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
189
+ line-height: 1.6;
190
+ overflow-x: auto;
191
+ border: 1px solid #2a2a2a;
192
+ white-space: pre;
193
+ }
194
+
195
+ .error-code-context .context-line {
196
+ color: #666;
197
+ display: block;
198
+ }
199
+
200
+ .error-code-context .error-line-highlight {
201
+ color: #ffffff;
202
+ background: rgba(198, 40, 40, 0.25);
203
+ display: block;
204
+ font-weight: 600;
205
+ border-left: 3px solid #c62828;
206
+ margin-left: -16px;
207
+ padding-left: 13px;
208
+ }
@@ -0,0 +1,175 @@
1
+ /**
2
+ * Editor Panel Styles
3
+ */
4
+
5
+ /* Toolbar with tabs and recompile button */
6
+ .editor-toolbar {
7
+ display: flex;
8
+ align-items: center;
9
+ background: #f8f8f8;
10
+ border-bottom: 1px solid #e0e0e0;
11
+ padding-right: 8px;
12
+ }
13
+
14
+ .editor-tab-bar {
15
+ display: flex;
16
+ flex: 1;
17
+ overflow-x: auto;
18
+ scrollbar-width: thin;
19
+ }
20
+
21
+ .editor-tab-button {
22
+ background: transparent;
23
+ border: none;
24
+ color: #666;
25
+ padding: 10px 16px;
26
+ cursor: pointer;
27
+ font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
28
+ font-size: 12px;
29
+ white-space: nowrap;
30
+ border-bottom: 2px solid transparent;
31
+ transition: color 0.15s, border-color 0.15s;
32
+ }
33
+
34
+ .editor-tab-button:hover {
35
+ color: #333;
36
+ }
37
+
38
+ .editor-tab-button.active {
39
+ color: #000;
40
+ border-bottom-color: #4a9eff;
41
+ }
42
+
43
+ .editor-tab-button.image-tab {
44
+ color: #7c4dff;
45
+ }
46
+
47
+ .editor-tab-button.image-tab.active {
48
+ color: #7c4dff;
49
+ border-bottom-color: #7c4dff;
50
+ }
51
+
52
+ /* Copy button (icon only) */
53
+ .editor-copy-button {
54
+ display: flex;
55
+ align-items: center;
56
+ justify-content: center;
57
+ background: transparent;
58
+ border: 1px solid #ccc;
59
+ color: #666;
60
+ width: 32px;
61
+ height: 32px;
62
+ border-radius: 4px;
63
+ cursor: pointer;
64
+ transition: background 0.15s, border-color 0.15s, color 0.15s;
65
+ flex-shrink: 0;
66
+ margin-right: 6px;
67
+ }
68
+
69
+ .editor-copy-button:hover {
70
+ background: #f0f0f0;
71
+ border-color: #999;
72
+ color: #333;
73
+ }
74
+
75
+ .editor-copy-button:active {
76
+ background: #e0e0e0;
77
+ }
78
+
79
+ .editor-copy-button.copied {
80
+ background: #e8f5e9;
81
+ border-color: #4caf50;
82
+ color: #4caf50;
83
+ }
84
+
85
+ .editor-copy-button svg {
86
+ flex-shrink: 0;
87
+ }
88
+
89
+ /* Recompile button */
90
+ .editor-recompile-button {
91
+ display: flex;
92
+ align-items: center;
93
+ gap: 6px;
94
+ background: #4a9eff;
95
+ border: none;
96
+ color: #fff;
97
+ padding: 6px 12px;
98
+ border-radius: 4px;
99
+ cursor: pointer;
100
+ font-family: inherit;
101
+ font-size: 12px;
102
+ font-weight: 500;
103
+ transition: background 0.15s;
104
+ flex-shrink: 0;
105
+ }
106
+
107
+ .editor-recompile-button:hover {
108
+ background: #3a8eef;
109
+ }
110
+
111
+ .editor-recompile-button:active {
112
+ background: #2a7edf;
113
+ }
114
+
115
+ .editor-recompile-button svg {
116
+ flex-shrink: 0;
117
+ }
118
+
119
+ /* Content area */
120
+ .editor-content-area {
121
+ flex: 1;
122
+ overflow: hidden;
123
+ position: relative;
124
+ background: #ffffff;
125
+ }
126
+
127
+ .editor-prism-container {
128
+ height: 100%;
129
+ width: 100%;
130
+ }
131
+
132
+ /* Fallback textarea */
133
+ .editor-fallback-textarea {
134
+ width: 100%;
135
+ height: 100%;
136
+ background: #ffffff;
137
+ color: #000;
138
+ border: none;
139
+ padding: 12px;
140
+ font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
141
+ font-size: 13px;
142
+ resize: none;
143
+ outline: none;
144
+ }
145
+
146
+ /* Image viewer */
147
+ .editor-image-viewer {
148
+ display: flex;
149
+ align-items: center;
150
+ justify-content: center;
151
+ height: 100%;
152
+ background: #f5f5f5;
153
+ padding: 20px;
154
+ }
155
+
156
+ .editor-image-viewer img {
157
+ max-width: 100%;
158
+ max-height: 100%;
159
+ object-fit: contain;
160
+ border-radius: 4px;
161
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
162
+ }
163
+
164
+ /* Error display */
165
+ .editor-error-display {
166
+ background: #fff0f0;
167
+ color: #c00;
168
+ padding: 10px 14px;
169
+ font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
170
+ font-size: 12px;
171
+ white-space: pre-wrap;
172
+ overflow: auto;
173
+ max-height: 120px;
174
+ border-top: 1px solid #fcc;
175
+ }
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Default Layout Styles
3
+ */
4
+
5
+ .layout-default {
6
+ width: 100%;
7
+ height: 100%;
8
+ display: flex;
9
+ align-items: center;
10
+ justify-content: center;
11
+ padding: 60px;
12
+ }
13
+
14
+ .layout-default .canvas-container {
15
+ position: relative;
16
+ width: 800px;
17
+ height: 600px;
18
+ background: #000;
19
+ border-radius: 8px;
20
+ box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25), 0 5px 15px rgba(0, 0, 0, 0.15);
21
+ overflow: hidden;
22
+ }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Fullscreen Layout Styles
3
+ */
4
+
5
+ .layout-fullscreen {
6
+ width: 100%;
7
+ height: 100%;
8
+ }
9
+
10
+ .layout-fullscreen .canvas-container {
11
+ position: relative;
12
+ width: 100%;
13
+ height: 100%;
14
+ background: #000;
15
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Embed Styles - Scoped to shader container only
3
+ */
4
+
5
+ .shader-demo {
6
+ position: relative;
7
+ width: 100%;
8
+ }
9
+
10
+ .shader-demo canvas {
11
+ display: block;
12
+ width: 100%;
13
+ height: 100%;
14
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stevejtrettel/shader-sandbox",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Local Shadertoy-compatible GLSL shader development environment with live editing",
5
5
  "type": "module",
6
6
  "main": "./dist-lib/index.js",