image-to-pixel 3.0.1 → 3.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/README.md +69 -69
- package/dist/editor.css +1 -1
- package/dist/editor.css.map +2 -2
- package/dist/editor.esm.js +60 -60
- package/dist/editor.esm.js.map +4 -4
- package/dist/image-to-pixel.bundle.esm.js +10 -10
- package/dist/image-to-pixel.bundle.esm.js.map +3 -3
- package/dist/image-to-pixel.cjs +2 -2
- package/dist/image-to-pixel.cjs.map +2 -2
- package/dist/image-to-pixel.esm.js +2 -2
- package/dist/image-to-pixel.esm.js.map +2 -2
- package/dist/image-to-pixel.js +2 -2
- package/dist/image-to-pixel.js.map +2 -2
- package/dist/image-to-pixel.min.js +9 -9
- package/dist/image-to-pixel.min.js.map +3 -3
- package/dist/video.esm.js +2 -2
- package/dist/video.esm.js.map +4 -4
- package/lib/core/video/audio.js +159 -0
- package/lib/core/video/frames.js +182 -144
- package/lib/core/video/mux-mp4.js +320 -131
- package/lib/core/video/mux-webm.js +168 -127
- package/lib/editor/exporter.js +225 -185
- package/lib/editor/icons.js +65 -61
- package/lib/editor/index.js +1002 -793
- package/lib/editor/inspector.js +343 -328
- package/lib/editor/library.js +188 -182
- package/lib/editor/styles/editor.css +418 -385
- package/lib/editor/workspace.js +62 -0
- package/lib/index.js +31 -31
- package/lib/video.js +122 -92
- package/package.json +92 -92
- package/types/video.d.ts +99 -43
|
@@ -1,385 +1,418 @@
|
|
|
1
|
-
@import "./tokens.css";
|
|
2
|
-
|
|
3
|
-
/* ---- base -------------------------------------------------------------- */
|
|
4
|
-
.itp, .itp * { box-sizing: border-box; }
|
|
5
|
-
.itp [hidden], .itp[hidden] { display: none !important; }
|
|
6
|
-
.itp {
|
|
7
|
-
color: var(--text);
|
|
8
|
-
font: 400 var(--fs-md)/1.45 var(--font-ui);
|
|
9
|
-
font-feature-settings: "ss01", "cv11";
|
|
10
|
-
-webkit-font-smoothing: antialiased;
|
|
11
|
-
}
|
|
12
|
-
.itp-app {
|
|
13
|
-
position: relative;
|
|
14
|
-
height: 100%;
|
|
15
|
-
min-height: 0;
|
|
16
|
-
display: grid;
|
|
17
|
-
grid-template-rows: 48px minmax(0, 1fr);
|
|
18
|
-
grid-template-columns: var(--lib-w, 268px) minmax(0, 1fr) var(--insp-w, 312px);
|
|
19
|
-
grid-template-areas: "top top top" "lib stage insp";
|
|
20
|
-
background: var(--bg);
|
|
21
|
-
overflow: hidden;
|
|
22
|
-
}
|
|
23
|
-
.itp-app[data-lib="closed"] { --lib-w: 0px; }
|
|
24
|
-
.itp-app[data-insp="closed"] { --insp-w: 0px; }
|
|
25
|
-
.itp button, .itp input, .itp select, .itp textarea { font: inherit; color: inherit; }
|
|
26
|
-
.itp :focus { outline: none; }
|
|
27
|
-
.itp :focus-visible { box-shadow: var(--focus); border-radius: var(--r-sm); }
|
|
28
|
-
.itp .num, .itp output { font-variant-numeric: tabular-nums; }
|
|
29
|
-
.itp .mono { font-family: var(--font-mono); font-size: 0.92em; letter-spacing: -0.01em; }
|
|
30
|
-
.itp .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
|
|
31
|
-
.itp svg.i { width: 16px; height: 16px; max-width: none; flex: none; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
|
|
32
|
-
.itp .muted { color: var(--muted); }
|
|
33
|
-
.itp hr { border: 0; border-top: 1px solid var(--line); margin: 0; }
|
|
34
|
-
|
|
35
|
-
/* ---- buttons ----------------------------------------------------------- */
|
|
36
|
-
.itp-btn {
|
|
37
|
-
display: inline-flex; align-items: center; justify-content: center; gap: 6px;
|
|
38
|
-
height: 30px; padding: 0 10px;
|
|
39
|
-
border: 1px solid transparent; border-radius: var(--r-sm);
|
|
40
|
-
background: transparent; color: var(--text-2);
|
|
41
|
-
cursor: pointer; white-space: nowrap; user-select: none;
|
|
42
|
-
transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
|
|
43
|
-
}
|
|
44
|
-
.itp-btn:hover { background: var(--raised); color: var(--text); }
|
|
45
|
-
.itp-btn[aria-pressed="true"] { background: var(--raised-2); color: var(--text); }
|
|
46
|
-
.itp-btn:disabled { opacity: 0.4; cursor: default; background: transparent; }
|
|
47
|
-
.itp-btn.icon { width: 30px; padding: 0; }
|
|
48
|
-
.itp-btn.outline { border-color: var(--line-strong); color: var(--text); }
|
|
49
|
-
.itp-btn.outline:hover { border-color: var(--faint); }
|
|
50
|
-
.itp-btn.primary { background: var(--accent); color: var(--accent-ink); font-weight: 550; padding: 0 12px; }
|
|
51
|
-
.itp-btn.primary:hover { background: var(--accent-strong); color: var(--accent-ink); }
|
|
52
|
-
.itp-btn.small { height: 26px; font-size: var(--fs-sm); padding: 0 8px; }
|
|
53
|
-
.itp-btn.small.icon { width: 26px; padding: 0; }
|
|
54
|
-
.itp-btn.block { width: 100%; }
|
|
55
|
-
.itp-btn.danger:hover { color: var(--danger); }
|
|
56
|
-
.itp-link { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; font-size: var(--fs-sm); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
|
|
57
|
-
.itp-link:hover { color: var(--text); text-decoration-color: currentColor; }
|
|
58
|
-
.itp kbd { font: 500 10.5px/1 var(--font-mono); padding: 3px 5px; border-radius: 4px; border: 1px solid var(--line-strong); color: var(--muted); background: var(--raised); }
|
|
59
|
-
|
|
60
|
-
/* ---- top bar ----------------------------------------------------------- */
|
|
61
|
-
.itp-top {
|
|
62
|
-
grid-area: top;
|
|
63
|
-
display: flex; align-items: center; gap: 4px;
|
|
64
|
-
padding: 0 10px 0 8px;
|
|
65
|
-
border-bottom: 1px solid var(--line);
|
|
66
|
-
background: var(--panel);
|
|
67
|
-
min-width: 0;
|
|
68
|
-
}
|
|
69
|
-
.itp-brand { display: flex; align-items: center; gap: 9px; padding: 0 6px; height: 32px; border-radius: var(--r-sm); color: var(--text); text-decoration: none; font-weight: 600; letter-spacing: -0.01em; }
|
|
70
|
-
.itp-brand:hover { background: var(--raised); }
|
|
71
|
-
.itp-mark { width: 18px; height: 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; }
|
|
72
|
-
.itp-mark i { background: var(--text); border-radius: 1px; }
|
|
73
|
-
.itp-mark i:nth-child(2), .itp-mark i:nth-child(4), .itp-mark i:nth-child(9) { background: var(--accent); }
|
|
74
|
-
.itp-mark i:nth-child(6), .itp-mark i:nth-child(7) { opacity: 0.35; }
|
|
75
|
-
.itp-top .sep { width: 1px; height: 18px; background: var(--line); margin: 0 6px; flex: none; }
|
|
76
|
-
.itp-file { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--text-2); }
|
|
77
|
-
.itp-file .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 28ch; }
|
|
78
|
-
.itp-file .
|
|
79
|
-
.itp-
|
|
80
|
-
.itp-
|
|
81
|
-
.itp-
|
|
82
|
-
.itp-top .
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
.itp-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
.itp-
|
|
95
|
-
.itp-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
.itp-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
.itp-seg
|
|
112
|
-
.itp-seg.
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
.itp-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
.itp-
|
|
125
|
-
.itp-
|
|
126
|
-
.itp-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
.itp
|
|
131
|
-
|
|
132
|
-
/*
|
|
133
|
-
.itp-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}
|
|
142
|
-
.itp-
|
|
143
|
-
.itp-
|
|
144
|
-
.itp-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
.itp-
|
|
148
|
-
.itp
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
.itp-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
.itp-
|
|
155
|
-
.itp-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
.itp-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
}
|
|
165
|
-
.itp-
|
|
166
|
-
.itp-
|
|
167
|
-
.itp-
|
|
168
|
-
.itp-
|
|
169
|
-
.itp-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
.itp-
|
|
173
|
-
.itp-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
.itp-
|
|
178
|
-
.itp-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
.itp-
|
|
186
|
-
.itp-
|
|
187
|
-
.itp-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
.itp-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
.itp-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
}
|
|
199
|
-
.itp-
|
|
200
|
-
.itp-
|
|
201
|
-
|
|
202
|
-
/*
|
|
203
|
-
.itp-
|
|
204
|
-
.itp-
|
|
205
|
-
.itp-
|
|
206
|
-
.itp-
|
|
207
|
-
.itp-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
.itp-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
.itp-
|
|
218
|
-
.itp-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
.itp-
|
|
222
|
-
.itp-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
/*
|
|
228
|
-
.itp-
|
|
229
|
-
.itp-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
.itp-
|
|
236
|
-
.itp-
|
|
237
|
-
.itp-
|
|
238
|
-
.itp-
|
|
239
|
-
.itp-
|
|
240
|
-
.itp-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
}
|
|
249
|
-
.itp-
|
|
250
|
-
.itp-
|
|
251
|
-
.itp-
|
|
252
|
-
.itp-
|
|
253
|
-
|
|
254
|
-
.itp-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
.itp-
|
|
261
|
-
.itp-
|
|
262
|
-
.itp .
|
|
263
|
-
.itp-
|
|
264
|
-
.itp-
|
|
265
|
-
.itp-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
.itp-
|
|
270
|
-
.itp-
|
|
271
|
-
.itp-
|
|
272
|
-
.itp
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
.itp
|
|
277
|
-
.itp
|
|
278
|
-
.itp
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
.itp
|
|
283
|
-
.itp
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
.itp-
|
|
287
|
-
.itp-
|
|
288
|
-
.itp-
|
|
289
|
-
.itp-
|
|
290
|
-
.itp-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
.itp-
|
|
294
|
-
.itp-
|
|
295
|
-
.itp
|
|
296
|
-
.itp-
|
|
297
|
-
.itp-
|
|
298
|
-
.itp-
|
|
299
|
-
.itp-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
.itp-
|
|
303
|
-
|
|
304
|
-
.itp-
|
|
305
|
-
.itp
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
.itp-
|
|
311
|
-
.itp-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
}
|
|
315
|
-
.itp
|
|
316
|
-
.itp
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
.itp-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
.itp-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
}
|
|
327
|
-
.itp-
|
|
328
|
-
.itp-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
}
|
|
332
|
-
.itp-
|
|
333
|
-
.itp-
|
|
334
|
-
.itp-
|
|
335
|
-
.itp-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
.itp-
|
|
339
|
-
.itp-
|
|
340
|
-
.itp-
|
|
341
|
-
.itp-
|
|
342
|
-
|
|
343
|
-
.itp-
|
|
344
|
-
.itp-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
.itp-
|
|
349
|
-
.itp-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
.itp-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
1
|
+
@import "./tokens.css";
|
|
2
|
+
|
|
3
|
+
/* ---- base -------------------------------------------------------------- */
|
|
4
|
+
.itp, .itp * { box-sizing: border-box; }
|
|
5
|
+
.itp [hidden], .itp[hidden] { display: none !important; }
|
|
6
|
+
.itp {
|
|
7
|
+
color: var(--text);
|
|
8
|
+
font: 400 var(--fs-md)/1.45 var(--font-ui);
|
|
9
|
+
font-feature-settings: "ss01", "cv11";
|
|
10
|
+
-webkit-font-smoothing: antialiased;
|
|
11
|
+
}
|
|
12
|
+
.itp-app {
|
|
13
|
+
position: relative;
|
|
14
|
+
height: 100%;
|
|
15
|
+
min-height: 0;
|
|
16
|
+
display: grid;
|
|
17
|
+
grid-template-rows: 48px minmax(0, 1fr);
|
|
18
|
+
grid-template-columns: var(--lib-w, 268px) minmax(0, 1fr) var(--insp-w, 312px);
|
|
19
|
+
grid-template-areas: "top top top" "lib stage insp";
|
|
20
|
+
background: var(--bg);
|
|
21
|
+
overflow: hidden;
|
|
22
|
+
}
|
|
23
|
+
.itp-app[data-lib="closed"] { --lib-w: 0px; }
|
|
24
|
+
.itp-app[data-insp="closed"] { --insp-w: 0px; }
|
|
25
|
+
.itp button, .itp input, .itp select, .itp textarea { font: inherit; color: inherit; }
|
|
26
|
+
.itp :focus { outline: none; }
|
|
27
|
+
.itp :focus-visible { box-shadow: var(--focus); border-radius: var(--r-sm); }
|
|
28
|
+
.itp .num, .itp output { font-variant-numeric: tabular-nums; }
|
|
29
|
+
.itp .mono { font-family: var(--font-mono); font-size: 0.92em; letter-spacing: -0.01em; }
|
|
30
|
+
.itp .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
|
|
31
|
+
.itp svg.i { width: 16px; height: 16px; max-width: none; flex: none; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
|
|
32
|
+
.itp .muted { color: var(--muted); }
|
|
33
|
+
.itp hr { border: 0; border-top: 1px solid var(--line); margin: 0; }
|
|
34
|
+
|
|
35
|
+
/* ---- buttons ----------------------------------------------------------- */
|
|
36
|
+
.itp-btn {
|
|
37
|
+
display: inline-flex; align-items: center; justify-content: center; gap: 6px;
|
|
38
|
+
height: 30px; padding: 0 10px;
|
|
39
|
+
border: 1px solid transparent; border-radius: var(--r-sm);
|
|
40
|
+
background: transparent; color: var(--text-2);
|
|
41
|
+
cursor: pointer; white-space: nowrap; user-select: none;
|
|
42
|
+
transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease);
|
|
43
|
+
}
|
|
44
|
+
.itp-btn:hover { background: var(--raised); color: var(--text); }
|
|
45
|
+
.itp-btn[aria-pressed="true"] { background: var(--raised-2); color: var(--text); }
|
|
46
|
+
.itp-btn:disabled { opacity: 0.4; cursor: default; background: transparent; }
|
|
47
|
+
.itp-btn.icon { width: 30px; padding: 0; }
|
|
48
|
+
.itp-btn.outline { border-color: var(--line-strong); color: var(--text); }
|
|
49
|
+
.itp-btn.outline:hover { border-color: var(--faint); }
|
|
50
|
+
.itp-btn.primary { background: var(--accent); color: var(--accent-ink); font-weight: 550; padding: 0 12px; }
|
|
51
|
+
.itp-btn.primary:hover { background: var(--accent-strong); color: var(--accent-ink); }
|
|
52
|
+
.itp-btn.small { height: 26px; font-size: var(--fs-sm); padding: 0 8px; }
|
|
53
|
+
.itp-btn.small.icon { width: 26px; padding: 0; }
|
|
54
|
+
.itp-btn.block { width: 100%; }
|
|
55
|
+
.itp-btn.danger:hover { color: var(--danger); }
|
|
56
|
+
.itp-link { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; font-size: var(--fs-sm); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
|
|
57
|
+
.itp-link:hover { color: var(--text); text-decoration-color: currentColor; }
|
|
58
|
+
.itp kbd { font: 500 10.5px/1 var(--font-mono); padding: 3px 5px; border-radius: 4px; border: 1px solid var(--line-strong); color: var(--muted); background: var(--raised); }
|
|
59
|
+
|
|
60
|
+
/* ---- top bar ----------------------------------------------------------- */
|
|
61
|
+
.itp-top {
|
|
62
|
+
grid-area: top;
|
|
63
|
+
display: flex; align-items: center; gap: 4px;
|
|
64
|
+
padding: 0 10px 0 8px;
|
|
65
|
+
border-bottom: 1px solid var(--line);
|
|
66
|
+
background: var(--panel);
|
|
67
|
+
min-width: 0;
|
|
68
|
+
}
|
|
69
|
+
.itp-brand { display: flex; align-items: center; gap: 9px; padding: 0 6px; height: 32px; border-radius: var(--r-sm); color: var(--text); text-decoration: none; font-weight: 600; letter-spacing: -0.01em; }
|
|
70
|
+
.itp-brand:hover { background: var(--raised); }
|
|
71
|
+
.itp-mark { width: 18px; height: 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; }
|
|
72
|
+
.itp-mark i { background: var(--text); border-radius: 1px; }
|
|
73
|
+
.itp-mark i:nth-child(2), .itp-mark i:nth-child(4), .itp-mark i:nth-child(9) { background: var(--accent); }
|
|
74
|
+
.itp-mark i:nth-child(6), .itp-mark i:nth-child(7) { opacity: 0.35; }
|
|
75
|
+
.itp-top .sep { width: 1px; height: 18px; background: var(--line); margin: 0 6px; flex: none; }
|
|
76
|
+
.itp-file { display: flex; align-items: center; gap: 6px; min-width: 0; color: var(--text-2); }
|
|
77
|
+
.itp-file .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 28ch; cursor: text; padding: 2px 4px; margin: 0 -4px; border-radius: var(--r-sm); }
|
|
78
|
+
.itp-file .name:hover { background: var(--raised); color: var(--text); }
|
|
79
|
+
.itp-file .name[hidden] { display: none; }
|
|
80
|
+
.itp-name-input { height: 26px; min-width: 0; max-width: 40ch; padding: 0 6px; border: 1px solid var(--accent); border-radius: var(--r-sm); background: var(--bg); color: var(--text); font: inherit; outline: none; }
|
|
81
|
+
.itp-file .meta { color: var(--faint); white-space: nowrap; }
|
|
82
|
+
.itp-top .spacer { flex: 1; }
|
|
83
|
+
.itp-zoom { min-width: 64px; justify-content: space-between; }
|
|
84
|
+
.itp-top .collapse-only { display: none; }
|
|
85
|
+
.itp-top .contents { display: contents; }
|
|
86
|
+
|
|
87
|
+
/* ---- side panels ------------------------------------------------------- */
|
|
88
|
+
.itp-lib, .itp-insp {
|
|
89
|
+
min-width: 0; min-height: 0;
|
|
90
|
+
display: flex; flex-direction: column;
|
|
91
|
+
background: var(--panel);
|
|
92
|
+
overflow: hidden;
|
|
93
|
+
}
|
|
94
|
+
.itp-lib { grid-area: lib; border-right: 1px solid var(--line); }
|
|
95
|
+
.itp-insp { grid-area: insp; border-left: 1px solid var(--line); }
|
|
96
|
+
.itp-app[data-lib="closed"] .itp-lib, .itp-app[data-insp="closed"] .itp-insp { border: 0; visibility: hidden; }
|
|
97
|
+
.itp-panel-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px 8px; }
|
|
98
|
+
.itp-panel-body { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
|
|
99
|
+
|
|
100
|
+
/* tabs: segmented control */
|
|
101
|
+
.itp-seg {
|
|
102
|
+
display: inline-flex; padding: 2px; gap: 2px;
|
|
103
|
+
background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-md);
|
|
104
|
+
width: 100%;
|
|
105
|
+
}
|
|
106
|
+
.itp-seg button {
|
|
107
|
+
flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
|
|
108
|
+
height: 26px; padding: 0 8px; border: 0; border-radius: var(--r-sm);
|
|
109
|
+
background: transparent; color: var(--muted); cursor: pointer; font-size: var(--fs-sm); white-space: nowrap;
|
|
110
|
+
}
|
|
111
|
+
.itp-seg button:hover { color: var(--text); }
|
|
112
|
+
.itp-seg button[aria-selected="true"], .itp-seg button[aria-pressed="true"] { background: var(--panel); color: var(--text); box-shadow: 0 0 0 1px var(--line-strong); }
|
|
113
|
+
:root[data-theme="dark"] .itp-seg button[aria-selected="true"], :root[data-theme="dark"] .itp-seg button[aria-pressed="true"] { background: var(--raised-2); }
|
|
114
|
+
.itp-seg .count { color: var(--faint); font-variant-numeric: tabular-nums; }
|
|
115
|
+
.itp-lib { container-type: inline-size; }
|
|
116
|
+
/* the library tabs shrink in steps as the panel narrows: tighter spacing and smaller words first,
|
|
117
|
+
then only the open tab keeps its word and the others become icons (their names stay as tooltips) */
|
|
118
|
+
.itp-seg button span { overflow: hidden; text-overflow: ellipsis; }
|
|
119
|
+
.itp-seg button svg { flex: none; }
|
|
120
|
+
@container (max-width: 310px) {
|
|
121
|
+
.itp-lib .itp-seg button { gap: 4px; padding: 0 5px; font-size: 12px; }
|
|
122
|
+
}
|
|
123
|
+
@container (max-width: 250px) {
|
|
124
|
+
.itp-lib .itp-seg button { flex: 0 0 auto; min-width: 34px; }
|
|
125
|
+
.itp-lib .itp-seg button[aria-selected="true"] { flex: 1 1 auto; }
|
|
126
|
+
.itp-lib .itp-seg button:not([aria-selected="true"]) span {
|
|
127
|
+
position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
.itp-seg.compact { width: auto; }
|
|
131
|
+
|
|
132
|
+
/* search field */
|
|
133
|
+
.itp-search { position: relative; margin: 0 12px 8px; }
|
|
134
|
+
.itp-search svg { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); color: var(--faint); }
|
|
135
|
+
.itp-input, .itp-search input, .itp-select {
|
|
136
|
+
width: 100%; height: 30px; padding: 0 9px;
|
|
137
|
+
border: 1px solid var(--line); border-radius: var(--r-sm);
|
|
138
|
+
background: var(--bg); color: var(--text);
|
|
139
|
+
transition: border-color var(--dur) var(--ease);
|
|
140
|
+
}
|
|
141
|
+
.itp-search input { padding-left: 30px; }
|
|
142
|
+
.itp-input:hover, .itp-select:hover, .itp-search input:hover { border-color: var(--line-strong); }
|
|
143
|
+
.itp-input:focus-visible, .itp-select:focus-visible, .itp-search input:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
|
|
144
|
+
.itp-select { appearance: none; padding-right: 26px; cursor: pointer;
|
|
145
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2384868f' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
|
|
146
|
+
background-repeat: no-repeat; background-position: right 8px center; }
|
|
147
|
+
.itp-select option, .itp-select optgroup { background: var(--panel); color: var(--text); }
|
|
148
|
+
.itp textarea.itp-input { height: auto; padding: 7px 9px; resize: vertical; font-family: var(--font-mono); font-size: var(--fs-sm); line-height: 1.5; }
|
|
149
|
+
|
|
150
|
+
/* group labels in lists */
|
|
151
|
+
.itp-group { padding: 14px 14px 6px; font-size: var(--fs-xs); font-weight: 500; color: var(--faint); letter-spacing: 0.01em; display: flex; align-items: center; justify-content: space-between; }
|
|
152
|
+
|
|
153
|
+
/* library: files */
|
|
154
|
+
.itp-files { list-style: none; margin: 0; padding: 0 8px 8px; display: flex; flex-direction: column; gap: 1px; }
|
|
155
|
+
.itp-file-row {
|
|
156
|
+
display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 10px;
|
|
157
|
+
padding: 6px 6px; border-radius: var(--r-md); cursor: pointer; color: var(--text-2);
|
|
158
|
+
border: 1px solid transparent;
|
|
159
|
+
}
|
|
160
|
+
.itp-file-row:hover { background: var(--raised); color: var(--text); }
|
|
161
|
+
.itp-file-row[aria-current="true"] { background: var(--raised-2); color: var(--text); border-color: var(--line); }
|
|
162
|
+
.itp-file-row .thumb { width: 36px; height: 36px; border-radius: 5px; object-fit: cover; image-rendering: pixelated; background: var(--raised-2); border: 1px solid var(--line); }
|
|
163
|
+
.itp-file-row .title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
164
|
+
.itp-file-row .sub { font-size: var(--fs-xs); color: var(--faint); font-variant-numeric: tabular-nums; }
|
|
165
|
+
.itp-file-row .actions { display: flex; gap: 0; }
|
|
166
|
+
.itp-file-row .actions .itp-btn { opacity: 0; }
|
|
167
|
+
.itp-file-row:hover .actions .itp-btn, .itp-file-row:focus-within .actions .itp-btn, .itp-file-row[aria-current="true"] .actions .itp-btn { opacity: 1; }
|
|
168
|
+
.itp-file-row .sub { display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; }
|
|
169
|
+
.itp-own { display: inline-flex; align-items: center; gap: 3px; color: var(--accent); font-size: var(--fs-xs); white-space: nowrap; }
|
|
170
|
+
.itp-own svg.i { width: 12px; height: 12px; }
|
|
171
|
+
@media (hover: none) { .itp-file-row .actions .itp-btn { opacity: 1; } }
|
|
172
|
+
.itp-badge { display: inline-flex; align-items: center; height: 18px; min-width: 18px; padding: 0 5px; border-radius: 9px; font-size: 10.5px; font-weight: 600; font-variant-numeric: tabular-nums; background: var(--raised-2); color: var(--muted); justify-content: center; }
|
|
173
|
+
.itp-badge.accent { background: var(--accent); color: var(--accent-ink); }
|
|
174
|
+
.itp-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; }
|
|
175
|
+
|
|
176
|
+
/* library: presets grid */
|
|
177
|
+
.itp-presets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 0 12px 12px; }
|
|
178
|
+
.itp-preset {
|
|
179
|
+
display: flex; flex-direction: column; gap: 6px; padding: 0 0 8px; text-align: left;
|
|
180
|
+
border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg); cursor: pointer; overflow: hidden; color: var(--text-2);
|
|
181
|
+
transition: border-color var(--dur) var(--ease);
|
|
182
|
+
}
|
|
183
|
+
.itp-preset:hover { border-color: var(--line-strong); color: var(--text); }
|
|
184
|
+
.itp-preset[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
|
|
185
|
+
.itp-preset canvas, .itp-preset .ph { width: 100%; aspect-ratio: 4 / 3; image-rendering: pixelated; display: block; background: var(--raised); border-bottom: 1px solid var(--line); object-fit: cover; }
|
|
186
|
+
.itp-preset .t { padding: 0 8px; font-size: var(--fs-sm); font-weight: 500; color: var(--text); }
|
|
187
|
+
.itp-preset .d { padding: 0 8px; font-size: var(--fs-xs); color: var(--muted); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
|
|
188
|
+
|
|
189
|
+
/* palette lists */
|
|
190
|
+
.itp-pal-list { list-style: none; margin: 0; padding: 0 8px 12px; display: flex; flex-direction: column; gap: 1px; }
|
|
191
|
+
.itp-pal {
|
|
192
|
+
display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: var(--r-md); cursor: pointer; border: 1px solid transparent; color: var(--text-2);
|
|
193
|
+
}
|
|
194
|
+
.itp-pal:hover { background: var(--raised); color: var(--text); }
|
|
195
|
+
.itp-pal[aria-pressed="true"] { background: var(--raised-2); border-color: var(--line); color: var(--text); }
|
|
196
|
+
.itp-pal .row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
|
|
197
|
+
.itp-pal .row span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
198
|
+
.itp-pal .n { font-size: var(--fs-xs); color: var(--faint); font-variant-numeric: tabular-nums; }
|
|
199
|
+
.itp-strip { display: flex; height: 10px; border-radius: 3px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(127, 127, 127, 0.15); }
|
|
200
|
+
.itp-strip i { flex: 1; }
|
|
201
|
+
|
|
202
|
+
/* ---- stage ------------------------------------------------------------- */
|
|
203
|
+
.itp-stage { grid-area: stage; position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--stage); }
|
|
204
|
+
.itp-view { position: relative; flex: 1; min-height: 0; overflow: hidden; cursor: grab; touch-action: none; }
|
|
205
|
+
.itp-view.panning { cursor: grabbing; }
|
|
206
|
+
.itp-view.picking { cursor: crosshair; }
|
|
207
|
+
.itp-view canvas.screen { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
|
|
208
|
+
.itp-split {
|
|
209
|
+
position: absolute; top: 0; bottom: 0; width: 0; pointer-events: none;
|
|
210
|
+
}
|
|
211
|
+
.itp-split::before { content: ""; position: absolute; top: 0; bottom: 0; left: -0.5px; width: 1px; background: rgba(255, 255, 255, 0.85); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25); }
|
|
212
|
+
.itp-split button {
|
|
213
|
+
pointer-events: auto; position: absolute; top: 50%; left: 0; transform: translate(-50%, -50%);
|
|
214
|
+
width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.2); background: #fff; color: #222; cursor: ew-resize;
|
|
215
|
+
display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
|
|
216
|
+
}
|
|
217
|
+
.itp-split .lbl { position: absolute; top: 12px; font-size: var(--fs-xs); padding: 2px 7px; border-radius: 4px; background: rgba(0, 0, 0, 0.55); color: #fff; white-space: nowrap; }
|
|
218
|
+
.itp-split .lbl.l { right: 10px; } .itp-split .lbl.r { left: 10px; }
|
|
219
|
+
|
|
220
|
+
/* floating view controls */
|
|
221
|
+
.itp-float { position: absolute; display: flex; gap: 2px; padding: 3px; border-radius: var(--r-md); background: color-mix(in srgb, var(--panel) 88%, transparent); border: 1px solid var(--line); backdrop-filter: blur(8px); }
|
|
222
|
+
.itp-float.br { right: 12px; bottom: 12px; }
|
|
223
|
+
.itp-float.bl { left: 12px; bottom: 12px; align-items: center; padding: 3px 10px; gap: 10px; color: var(--muted); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; height: 32px; }
|
|
224
|
+
.itp-float.bl b { color: var(--text-2); font-weight: 500; }
|
|
225
|
+
.itp-busy { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); }
|
|
226
|
+
|
|
227
|
+
/* empty state */
|
|
228
|
+
.itp-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; }
|
|
229
|
+
.itp-drop {
|
|
230
|
+
width: min(520px, 100%); padding: 28px; border: 1px dashed var(--line-strong); border-radius: var(--r-lg);
|
|
231
|
+
display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; background: color-mix(in srgb, var(--panel) 60%, transparent);
|
|
232
|
+
}
|
|
233
|
+
.itp-drop h2 { margin: 0; font-size: var(--fs-lg); font-weight: 600; letter-spacing: -0.01em; }
|
|
234
|
+
.itp-drop p { margin: 0; color: var(--muted); max-width: 46ch; }
|
|
235
|
+
.itp-drop .actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
|
|
236
|
+
.itp-drop .samples { display: flex; gap: 8px; margin-top: 4px; }
|
|
237
|
+
.itp-drop .samples button { width: 64px; height: 48px; padding: 0; border-radius: var(--r-sm); border: 1px solid var(--line); overflow: hidden; cursor: pointer; background: var(--raised); }
|
|
238
|
+
.itp-drop .samples button:hover { border-color: var(--accent); }
|
|
239
|
+
.itp-drop .samples img { width: 100%; height: 100%; object-fit: cover; display: block; }
|
|
240
|
+
.itp-dragging .itp-view::after {
|
|
241
|
+
content: "Drop to add"; position: absolute; inset: 12px; border: 2px dashed var(--accent); border-radius: var(--r-lg);
|
|
242
|
+
display: grid; place-items: center; color: var(--text); background: var(--accent-soft); font-weight: 500; pointer-events: none;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/* transport (video) */
|
|
246
|
+
.itp-transport { display: none; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border-top: 1px solid var(--line); background: var(--panel); }
|
|
247
|
+
.itp-stage[data-video="true"] .itp-transport { display: flex; }
|
|
248
|
+
.itp-time { font-variant-numeric: tabular-nums; color: var(--text-2); font-size: var(--fs-sm); white-space: nowrap; min-width: 108px; }
|
|
249
|
+
.itp-time span { color: var(--faint); }
|
|
250
|
+
.itp-scrub { flex: 1; }
|
|
251
|
+
.itp-sound { position: relative; display: flex; align-items: center; }
|
|
252
|
+
.itp-sound[hidden] { display: none; }
|
|
253
|
+
/* volume: a vertical slider that pops up above the speaker button (all the way down = muted) */
|
|
254
|
+
.itp-volpop {
|
|
255
|
+
position: absolute; bottom: calc(100% + 10px); left: 50%; transform: translateX(-50%); z-index: 20;
|
|
256
|
+
display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 6px 10px;
|
|
257
|
+
background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-pop);
|
|
258
|
+
font-size: var(--fs-xs); color: var(--muted); min-width: 36px;
|
|
259
|
+
}
|
|
260
|
+
.itp-volpop[hidden] { display: none; }
|
|
261
|
+
.itp-vslider { --v: 0%; width: 28px; height: 108px; display: flex; justify-content: center; cursor: pointer; touch-action: none; border-radius: var(--r-sm); }
|
|
262
|
+
.itp-vslider .track { position: relative; width: 4px; height: 100%; border-radius: 2px; background: var(--line-strong); }
|
|
263
|
+
.itp-vslider .fill { position: absolute; left: 0; right: 0; bottom: 0; height: var(--v); border-radius: 2px; background: var(--accent); }
|
|
264
|
+
.itp-vslider .thumb { position: absolute; left: 50%; bottom: var(--v); width: 12px; height: 12px; border-radius: 50%; background: var(--text); transform: translate(-50%, 50%); box-shadow: 0 0 0 2px var(--panel); }
|
|
265
|
+
.itp-vslider:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
|
|
266
|
+
|
|
267
|
+
/* ---- inspector --------------------------------------------------------- */
|
|
268
|
+
.itp-insp-head { padding: 12px 14px 0; display: flex; flex-direction: column; gap: 10px; }
|
|
269
|
+
.itp-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
|
|
270
|
+
.itp-stat { padding: 7px 10px; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
|
|
271
|
+
.itp-stat + .itp-stat { border-left: 1px solid var(--line); }
|
|
272
|
+
.itp-stat .k { font-size: var(--fs-xs); color: var(--faint); }
|
|
273
|
+
.itp-stat .v { font-weight: 550; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
274
|
+
.itp-stat .v small { font-weight: 400; color: var(--muted); font-size: var(--fs-xs); margin-left: 3px; }
|
|
275
|
+
|
|
276
|
+
.itp-sec { border-bottom: 1px solid var(--line); }
|
|
277
|
+
.itp-sec-head { display: flex; align-items: center; gap: 2px; padding-right: 8px; }
|
|
278
|
+
.itp-sec-toggle {
|
|
279
|
+
flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 12px 6px 12px 14px;
|
|
280
|
+
border: 0; background: none; text-align: left; cursor: pointer; user-select: none; color: var(--text);
|
|
281
|
+
}
|
|
282
|
+
.itp-sec-toggle .title { font-weight: 550; white-space: nowrap; }
|
|
283
|
+
.itp-sec-toggle .hint { color: var(--faint); font-weight: 400; font-size: var(--fs-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
|
|
284
|
+
.itp-sec-toggle .chev { margin-left: auto; color: var(--faint); display: inline-flex; transition: transform var(--dur) var(--ease); }
|
|
285
|
+
.itp-sec[data-open="true"] .itp-sec-toggle .chev { transform: rotate(90deg); }
|
|
286
|
+
.itp-sec-toggle:hover .chev { color: var(--text); }
|
|
287
|
+
.itp-sec-toggle:focus-visible { border-radius: var(--r-sm); }
|
|
288
|
+
.itp-sec-reset { color: var(--faint); }
|
|
289
|
+
.itp-sec-reset:hover { color: var(--text); }
|
|
290
|
+
.itp-sec .body { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 12px; }
|
|
291
|
+
|
|
292
|
+
.itp-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
|
|
293
|
+
.itp-field > .lab { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--text-2); font-size: var(--fs-sm); }
|
|
294
|
+
.itp-field > .lab .val { color: var(--text); font-variant-numeric: tabular-nums; }
|
|
295
|
+
.itp .help { color: var(--faint); font-size: var(--fs-xs); line-height: 1.4; }
|
|
296
|
+
.itp-row { display: flex; gap: 8px; align-items: center; }
|
|
297
|
+
.itp-row > * { min-width: 0; }
|
|
298
|
+
.itp-row .grow { flex: 1; }
|
|
299
|
+
.itp-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
|
|
300
|
+
|
|
301
|
+
/* slider with value */
|
|
302
|
+
.itp-slider { display: grid; grid-template-columns: minmax(0, 1fr) 56px; gap: 8px; align-items: center; }
|
|
303
|
+
.itp-slider input[type="number"] { height: 26px; padding: 0 6px; text-align: right; font-size: var(--fs-sm); border-radius: 5px; }
|
|
304
|
+
.itp-slider input[type="number"]::-webkit-inner-spin-button { opacity: 0.4; }
|
|
305
|
+
.itp input[type="range"] {
|
|
306
|
+
-webkit-appearance: none; appearance: none; width: 100%; height: 20px; background: transparent; cursor: pointer; margin: 0;
|
|
307
|
+
--p: 50%;
|
|
308
|
+
}
|
|
309
|
+
.itp input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--accent) var(--p), var(--raised-2) var(--p)); }
|
|
310
|
+
.itp input[type="range"]::-moz-range-track { height: 4px; border-radius: 2px; background: var(--raised-2); }
|
|
311
|
+
.itp input[type="range"]::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--accent); }
|
|
312
|
+
.itp input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%; background: var(--text); border: 3px solid var(--panel); box-shadow: 0 0 0 1px var(--line-strong); }
|
|
313
|
+
.itp input[type="range"]::-moz-range-thumb { width: 10px; height: 10px; border-radius: 50%; background: var(--text); border: 3px solid var(--panel); box-shadow: 0 0 0 1px var(--line-strong); }
|
|
314
|
+
.itp input[type="range"]:focus-visible { box-shadow: none; }
|
|
315
|
+
.itp input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 2px var(--accent); }
|
|
316
|
+
.itp input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 2px var(--accent); }
|
|
317
|
+
|
|
318
|
+
/* switch */
|
|
319
|
+
.itp-switch { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; color: var(--text-2); font-size: var(--fs-sm); }
|
|
320
|
+
.itp-switch input { appearance: none; width: 28px; height: 16px; border-radius: 8px; background: var(--raised-2); border: 1px solid var(--line-strong); position: relative; cursor: pointer; flex: none; transition: background var(--dur) var(--ease); margin: 0; }
|
|
321
|
+
.itp-switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); transition: transform var(--dur) var(--ease), background var(--dur) var(--ease); }
|
|
322
|
+
.itp-switch input:checked { background: var(--accent); border-color: var(--accent); }
|
|
323
|
+
.itp-switch input:checked::after { transform: translateX(12px); background: var(--accent-ink); }
|
|
324
|
+
|
|
325
|
+
/* swatches */
|
|
326
|
+
.itp-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(22px, 1fr)); gap: 4px; }
|
|
327
|
+
.itp-swatch { aspect-ratio: 1; border-radius: 4px; border: 0; padding: 0; cursor: pointer; position: relative; box-shadow: inset 0 0 0 1px rgba(127, 127, 127, 0.25); }
|
|
328
|
+
.itp-swatch:hover { transform: scale(1.12); z-index: 1; }
|
|
329
|
+
.itp-swatch.add { background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--muted); display: grid; place-items: center; }
|
|
330
|
+
.itp-swatch.add:hover { color: var(--text); }
|
|
331
|
+
.itp-color { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 8px 0 4px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); cursor: pointer; }
|
|
332
|
+
.itp-color input[type="color"] { width: 22px; height: 22px; padding: 0; border: 0; border-radius: 4px; background: none; cursor: pointer; }
|
|
333
|
+
.itp-color input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
|
|
334
|
+
.itp-color input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(127, 127, 127, 0.3); }
|
|
335
|
+
.itp-color input[type="color"]::-moz-color-swatch { border: 0; border-radius: 4px; }
|
|
336
|
+
|
|
337
|
+
.itp-scope { display: flex; flex-direction: column; gap: 6px; }
|
|
338
|
+
.itp-scope .lab { display: flex; justify-content: space-between; align-items: center; font-size: var(--fs-sm); color: var(--text-2); }
|
|
339
|
+
.itp-scope-note { color: var(--faint); font-size: var(--fs-xs); }
|
|
340
|
+
.itp-insp[data-scope="own"] .itp-scope-note { color: var(--accent); }
|
|
341
|
+
.itp-insp[data-scope="own"] .itp-scope .itp-seg button[aria-pressed="true"] { box-shadow: 0 0 0 1px var(--accent); color: var(--text); }
|
|
342
|
+
|
|
343
|
+
.itp-aspects { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
|
|
344
|
+
.itp-aspects button {
|
|
345
|
+
display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; height: 52px;
|
|
346
|
+
border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); color: var(--muted); cursor: pointer; font-size: var(--fs-xs);
|
|
347
|
+
}
|
|
348
|
+
.itp-aspects button:hover { border-color: var(--line-strong); color: var(--text); }
|
|
349
|
+
.itp-aspects button[aria-pressed="true"] { border-color: var(--accent); color: var(--text); background: var(--accent-soft); }
|
|
350
|
+
.itp-aspects i { display: block; border: 1.5px solid currentColor; border-radius: 2px; }
|
|
351
|
+
.itp-aspects i.orig { border-style: dashed; }
|
|
352
|
+
|
|
353
|
+
.itp-insp-foot { padding: 12px 14px 14px; display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid var(--line); }
|
|
354
|
+
|
|
355
|
+
/* ---- popovers, dialogs, toasts ---------------------------------------- */
|
|
356
|
+
.itp-menu {
|
|
357
|
+
position: fixed; z-index: 50; min-width: 240px; max-width: calc(100vw - 16px); padding: 5px; border-radius: var(--r-lg);
|
|
358
|
+
background: var(--panel); box-shadow: var(--shadow-pop); display: flex; flex-direction: column;
|
|
359
|
+
}
|
|
360
|
+
.itp-menu[hidden] { display: none; }
|
|
361
|
+
.itp-menu .mi {
|
|
362
|
+
display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 9px; border-radius: var(--r-sm);
|
|
363
|
+
border: 0; background: none; text-align: left; cursor: pointer; color: var(--text-2);
|
|
364
|
+
}
|
|
365
|
+
.itp-menu .mi:hover, .itp-menu .mi:focus-visible { background: var(--raised); color: var(--text); box-shadow: none; }
|
|
366
|
+
.itp-menu .mi:disabled { opacity: 0.4; cursor: default; background: none; }
|
|
367
|
+
.itp-menu .mi small { display: block; color: var(--faint); font-size: var(--fs-xs); }
|
|
368
|
+
.itp-menu .mlabel { padding: 8px 9px 4px; font-size: var(--fs-xs); color: var(--faint); }
|
|
369
|
+
.itp-menu hr { margin: 5px 4px; }
|
|
370
|
+
|
|
371
|
+
.itp-dialog { border: 0; padding: 0; border-radius: var(--r-lg); background: var(--panel); color: var(--text); box-shadow: var(--shadow-pop); width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 48px); }
|
|
372
|
+
.itp-dialog::backdrop { background: rgba(0, 0, 0, 0.45); }
|
|
373
|
+
.itp-dialog header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); }
|
|
374
|
+
.itp-dialog header h2 { margin: 0; font-size: var(--fs-lg); font-weight: 600; }
|
|
375
|
+
.itp-dialog .content { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 14px; overflow: auto; }
|
|
376
|
+
.itp-dialog footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
|
|
377
|
+
.itp-keys { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 24px; }
|
|
378
|
+
.itp-keys div { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); color: var(--text-2); }
|
|
379
|
+
.itp-keys div span:last-child { display: flex; gap: 3px; }
|
|
380
|
+
|
|
381
|
+
.itp-toasts { position: fixed; z-index: 60; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
|
|
382
|
+
.itp-toast {
|
|
383
|
+
pointer-events: auto; display: flex; align-items: center; gap: 10px; min-width: 240px; max-width: min(520px, calc(100vw - 24px));
|
|
384
|
+
padding: 9px 10px 9px 12px; border-radius: var(--r-md); background: var(--raised); color: var(--text); box-shadow: var(--shadow-pop); font-size: var(--fs-sm);
|
|
385
|
+
animation: itp-in 160ms var(--ease);
|
|
386
|
+
}
|
|
387
|
+
.itp-toast .msg { flex: 1; }
|
|
388
|
+
.itp-toast.error .itp-dot { background: var(--danger); }
|
|
389
|
+
.itp-toast.ok .itp-dot { background: var(--ok); }
|
|
390
|
+
.itp-toast.info .itp-dot { background: var(--accent); }
|
|
391
|
+
.itp-progress { height: 3px; border-radius: 2px; background: var(--raised-2); overflow: hidden; margin-top: 6px; }
|
|
392
|
+
.itp-progress i { display: block; height: 100%; background: var(--accent); width: 0; transition: width 120ms linear; }
|
|
393
|
+
@keyframes itp-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
|
|
394
|
+
|
|
395
|
+
.itp-spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--accent); animation: itp-spin 700ms linear infinite; }
|
|
396
|
+
@keyframes itp-spin { to { transform: rotate(360deg); } }
|
|
397
|
+
|
|
398
|
+
/* ---- responsive -------------------------------------------------------- */
|
|
399
|
+
@media (max-width: 1100px) {
|
|
400
|
+
.itp-app { --lib-w: 232px; --insp-w: 288px; }
|
|
401
|
+
}
|
|
402
|
+
@media (max-width: 900px) {
|
|
403
|
+
/* tablet: library becomes an overlay drawer */
|
|
404
|
+
.itp-app { grid-template-columns: 0 minmax(0, 1fr) var(--insp-w, 288px); }
|
|
405
|
+
.itp-lib { position: absolute; z-index: 30; top: 0; bottom: 0; left: 0; width: 280px; box-shadow: var(--shadow-pop); transform: translateX(-100%); transition: transform 180ms var(--ease); visibility: hidden; }
|
|
406
|
+
.itp-app[data-lib="open"] .itp-lib { transform: none; visibility: visible; }
|
|
407
|
+
.itp-top .collapse-only { display: inline-flex; }
|
|
408
|
+
.itp-file .meta { display: none; }
|
|
409
|
+
}
|
|
410
|
+
@media (max-width: 680px) {
|
|
411
|
+
/* phone: stage on top, inspector as a bottom sheet */
|
|
412
|
+
.itp-app { grid-template-columns: minmax(0, 1fr); grid-template-rows: 48px minmax(0, 1fr) auto; grid-template-areas: "top" "stage" "insp"; }
|
|
413
|
+
.itp-insp { border-left: 0; border-top: 1px solid var(--line); max-height: 46vh; }
|
|
414
|
+
.itp-app[data-insp="closed"] .itp-insp { max-height: 0; }
|
|
415
|
+
.itp-top .hide-sm { display: none; }
|
|
416
|
+
.itp-file .name { max-width: 14ch; }
|
|
417
|
+
.itp-float.bl { display: none; }
|
|
418
|
+
}
|