@sealpixel/ui 1.0.0-rc.21 → 1.0.0-rc.23

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.
Files changed (70) hide show
  1. package/dist/components/editor/empty-state.d.ts +14 -0
  2. package/dist/components/editor/empty-state.js +38 -0
  3. package/dist/components/editor/empty-state.js.map +1 -0
  4. package/dist/components/editor/json-attribute.d.ts +5 -0
  5. package/dist/components/editor/json-attribute.js +18 -0
  6. package/dist/components/editor/json-attribute.js.map +1 -0
  7. package/dist/components/editor/panel-fit.d.ts +20 -0
  8. package/dist/components/editor/panel-fit.js +60 -0
  9. package/dist/components/editor/panel-fit.js.map +1 -0
  10. package/dist/components/editor/styles.d.ts +2 -0
  11. package/dist/components/editor/styles.js +697 -0
  12. package/dist/components/editor/styles.js.map +1 -0
  13. package/dist/components/editor/toast.d.ts +8 -0
  14. package/dist/components/editor/toast.js +21 -0
  15. package/dist/components/editor/toast.js.map +1 -0
  16. package/dist/components/sealpixel-editor.d.ts +9 -44
  17. package/dist/components/sealpixel-editor.js +45 -888
  18. package/dist/components/sealpixel-editor.js.map +1 -1
  19. package/dist/components/sealpixel-stage.js +11 -2
  20. package/dist/components/sealpixel-stage.js.map +1 -1
  21. package/dist/controllers/history-shortcuts-controller.d.ts +18 -0
  22. package/dist/controllers/history-shortcuts-controller.js +68 -0
  23. package/dist/controllers/history-shortcuts-controller.js.map +1 -0
  24. package/dist/locales/de.js +16 -0
  25. package/dist/locales/de.js.map +1 -1
  26. package/dist/locales/en.js +16 -0
  27. package/dist/locales/en.js.map +1 -1
  28. package/dist/locales/es.js +16 -0
  29. package/dist/locales/es.js.map +1 -1
  30. package/dist/locales/fr.js +16 -0
  31. package/dist/locales/fr.js.map +1 -1
  32. package/dist/locales/ja.js +16 -0
  33. package/dist/locales/ja.js.map +1 -1
  34. package/dist/locales/pt.js +16 -0
  35. package/dist/locales/pt.js.map +1 -1
  36. package/dist/tools/annotate.d.ts +58 -0
  37. package/dist/tools/annotate.js +136 -12
  38. package/dist/tools/annotate.js.map +1 -1
  39. package/dist/tools/assist.d.ts +3 -0
  40. package/dist/tools/assist.js +44 -9
  41. package/dist/tools/assist.js.map +1 -1
  42. package/dist/tools/crop-mask.d.ts +2 -0
  43. package/dist/tools/crop-mask.js +11 -0
  44. package/dist/tools/crop-mask.js.map +1 -1
  45. package/dist/tools/crop.d.ts +9 -0
  46. package/dist/tools/crop.js +117 -48
  47. package/dist/tools/crop.js.map +1 -1
  48. package/dist/tools/filter.js +41 -19
  49. package/dist/tools/filter.js.map +1 -1
  50. package/dist/tools/finetune.js +10 -7
  51. package/dist/tools/finetune.js.map +1 -1
  52. package/dist/tools/frame.js +10 -10
  53. package/dist/tools/frame.js.map +1 -1
  54. package/dist/tools/instance-state.d.ts +8 -0
  55. package/dist/tools/instance-state.js +32 -0
  56. package/dist/tools/instance-state.js.map +1 -0
  57. package/dist/tools/keys.d.ts +95 -3
  58. package/dist/tools/keys.js +135 -2
  59. package/dist/tools/keys.js.map +1 -1
  60. package/dist/tools/redact.d.ts +18 -10
  61. package/dist/tools/redact.js +233 -35
  62. package/dist/tools/redact.js.map +1 -1
  63. package/dist/tools/region-transform.d.ts +23 -14
  64. package/dist/tools/region-transform.js +45 -32
  65. package/dist/tools/region-transform.js.map +1 -1
  66. package/dist/tools/resize.js +11 -9
  67. package/dist/tools/resize.js.map +1 -1
  68. package/dist/tools/sticker.js +7 -3
  69. package/dist/tools/sticker.js.map +1 -1
  70. package/package.json +4 -4
@@ -0,0 +1,697 @@
1
+ import { css } from 'lit';
2
+ /** The styles of `<sealpixel-editor>`: the shell grid, the settings bar, the toast and the empty state. */
3
+ export const editorStyles = css `
4
+ :host {
5
+ display: block;
6
+ container-type: inline-size;
7
+ background: var(--sealpixel-color-bg);
8
+ color: var(--sealpixel-color-fg);
9
+ height: 100%;
10
+ min-height: 480px;
11
+ min-width: 0;
12
+ overflow: hidden;
13
+ }
14
+ :host(:focus) {
15
+ outline: none;
16
+ }
17
+ .root {
18
+ position: relative;
19
+ display: grid;
20
+ height: 100%;
21
+ min-width: 0;
22
+ grid-template:
23
+ 'nav' auto
24
+ 'stage' 1fr
25
+ 'panel' auto
26
+ 'toolbar' auto / 1fr;
27
+ padding-bottom: env(safe-area-inset-bottom);
28
+ }
29
+ .root > * {
30
+ min-width: 0;
31
+ min-height: 0;
32
+ }
33
+ sealpixel-stage {
34
+ grid-area: stage;
35
+ min-height: 160px;
36
+ }
37
+ sealpixel-nav {
38
+ grid-area: nav;
39
+ }
40
+ sealpixel-toolbar {
41
+ grid-area: toolbar;
42
+ }
43
+ .panel {
44
+ grid-area: panel;
45
+ background: var(--sealpixel-color-surface);
46
+ border-top: 1px solid var(--sealpixel-color-border);
47
+ padding: var(--sealpixel-space) calc(var(--sealpixel-space) * 1.5);
48
+ /*
49
+ * The configured height, not a fitted one: a bar that grew and shrank
50
+ * as the user moved between tools would resize the stage under them,
51
+ * and the image would shift every time they changed their mind.
52
+ *
53
+ * The exception is a tool whose settings do not fit at all. Then the
54
+ * bar takes the height they need, measured by syncPanelFit(), because
55
+ * the alternative is worse: a fixed-height wrapping flex container has
56
+ * no scrollable cross-axis overflow, so nothing scrolls and the sticky
57
+ * choice row is pulled up over the settings. 34cqh caps both heights,
58
+ * so a busy tool can never take the stage on a short viewport.
59
+ */
60
+ height: min(34cqh, max(var(--sealpixel-panel-size), var(--sealpixel-panel-fit, 0px)));
61
+ overflow: auto;
62
+ /*
63
+ * A bottom bar lays its blocks across the width and wraps, where the
64
+ * old right-hand column stacked them. Stacking five blocks in a bar
65
+ * that is one or two rows tall would push the last of them out of
66
+ * sight, so a block takes a full row only when it asks for one.
67
+ */
68
+ display: flex;
69
+ flex-wrap: wrap;
70
+ /*
71
+ * Safe centring places the blocks in the middle while they fit and
72
+ * at the start once they do not. Plain centring overflows a fixed bar
73
+ * at both ends, and nothing scrolls back to what sits above the top.
74
+ */
75
+ align-items: center;
76
+ align-content: safe center;
77
+ justify-content: safe center;
78
+ gap: var(--sealpixel-space) calc(var(--sealpixel-space) * 2);
79
+ scrollbar-width: thin;
80
+ scroll-behavior: smooth;
81
+ }
82
+ /*
83
+ * A tool whose panel lays out to nothing gets no bar. Without this the
84
+ * fixed height above reserves an empty surface and takes it off the
85
+ * stage; see syncPanelFill(), which sets the attribute.
86
+ */
87
+ .panel[data-empty] {
88
+ height: 0;
89
+ padding: 0;
90
+ border-top: 0;
91
+ overflow: hidden;
92
+ }
93
+ /*
94
+ * A dial needs room to be worth dragging, but it must not grow into all
95
+ * of it: a dial that stretches pushes the controls beside it against the
96
+ * two edges of the bar, and they stop reading as one group.
97
+ */
98
+ .panel > sealpixel-slider {
99
+ flex: 0 1 360px;
100
+ min-width: 240px;
101
+ }
102
+ /* Chips, presets and asset libraries always get their own full row. */
103
+ .panel > .strip,
104
+ .panel > .grid {
105
+ flex: 1 1 100%;
106
+ }
107
+ .panel > .row,
108
+ .panel > .rows,
109
+ .panel > .field,
110
+ .panel > .hint {
111
+ flex: 0 1 auto;
112
+ }
113
+ /*
114
+ * A tool panel has two kinds of control: the choice of what to work with
115
+ * (a shape, a frame style, a preset, a parameter) and the settings for
116
+ * whatever is chosen. The choice belongs at the bottom, next to the tool
117
+ * rail it continues, and its settings appear above it. Side by side they
118
+ * read as one undifferentiated row of buttons and it is not obvious which
119
+ * of them changes what.
120
+ *
121
+ * Ordering here rather than in each tool keeps a panel's source in
122
+ * reading order and lets a third-party tool join in with one class.
123
+ */
124
+ .panel > * {
125
+ order: 1;
126
+ }
127
+ /*
128
+ * Switching tools rebuilds the panel, so the rows rise on the new
129
+ * children and never on a value change inside the open tool, where Lit
130
+ * patches the same nodes.
131
+ *
132
+ * Transform only, deliberately. A fade would put the labels at partial
133
+ * opacity for a moment, and a contrast audit that samples the panel
134
+ * during that moment reports text it can read on screen as failing.
135
+ * Transform also keeps the panel's own height still, which the layout
136
+ * around it is measured against.
137
+ */
138
+ .panel > * {
139
+ animation: sealpixel-panel-in var(--sealpixel-duration) var(--sealpixel-ease-out) both;
140
+ }
141
+ .panel > *:nth-child(2) {
142
+ animation-delay: 25ms;
143
+ }
144
+ .panel > *:nth-child(n + 3) {
145
+ animation-delay: 50ms;
146
+ }
147
+ @keyframes sealpixel-panel-in {
148
+ from {
149
+ transform: translateY(8px);
150
+ }
151
+ }
152
+ /* Phones: option grids become one horizontal strip so the stage keeps its height. */
153
+ .panel .grid,
154
+ .panel .strip {
155
+ display: flex;
156
+ gap: var(--sealpixel-space);
157
+ overflow-x: auto;
158
+ scrollbar-width: none;
159
+ padding-bottom: 2px;
160
+ scroll-snap-type: x proximity;
161
+ }
162
+ .panel .grid::-webkit-scrollbar,
163
+ .panel .strip::-webkit-scrollbar {
164
+ display: none;
165
+ }
166
+ .panel .grid > *,
167
+ .panel .strip > * {
168
+ flex: 0 0 auto;
169
+ min-width: 96px;
170
+ scroll-snap-align: start;
171
+ }
172
+ .panel .strip > * {
173
+ min-width: 0;
174
+ }
175
+ /*
176
+ * The strip centres while it fits and scrolls from the first item once
177
+ * it does not, so a short row of presets is not stranded at the left
178
+ * edge of a wide bar.
179
+ */
180
+ .panel .strip {
181
+ justify-content: safe center;
182
+ align-items: end;
183
+ scroll-behavior: smooth;
184
+ }
185
+ .panel .chips {
186
+ gap: 2px;
187
+ }
188
+ /*
189
+ * A segmented control: one pill holds the row, the segments share it. Six
190
+ * separate buttons put six borders in a row and made the choice look like
191
+ * six unrelated actions; one container says they are one decision with
192
+ * one answer at a time.
193
+ */
194
+ .panel .group {
195
+ display: inline-flex;
196
+ gap: 2px;
197
+ padding: 2px;
198
+ background: var(--sealpixel-color-surface-2);
199
+ border-radius: var(--sealpixel-radius-pill);
200
+ flex: 0 0 auto;
201
+ }
202
+ .panel .group sealpixel-button::part(button) {
203
+ background: transparent;
204
+ border-color: transparent;
205
+ min-height: calc(var(--sealpixel-control-height) - 4px);
206
+ min-width: calc(var(--sealpixel-control-height) - 4px);
207
+ padding: 0 calc(var(--sealpixel-space) * 1.25);
208
+ }
209
+ .panel .group sealpixel-button:hover::part(button) {
210
+ background: color-mix(in srgb, var(--sealpixel-color-fg) 7%, transparent);
211
+ }
212
+ .panel .group sealpixel-button[pressed]::part(button) {
213
+ background: var(--sealpixel-color-surface);
214
+ color: var(--sealpixel-color-accent);
215
+ box-shadow: var(--sealpixel-shadow-sm, none);
216
+ }
217
+
218
+ /* Filter tiles: the image is the control, the label only names it. */
219
+ .panel .tiles {
220
+ gap: calc(var(--sealpixel-space) * 0.75);
221
+ }
222
+ /*
223
+ * The one control in the bar that gets bigger. Everywhere else the chrome
224
+ * shrank; here the chrome is the point, because a preset is judged by
225
+ * looking at it.
226
+ */
227
+ .panel .thumb {
228
+ display: block;
229
+ width: 100%;
230
+ height: 64px;
231
+ object-fit: cover;
232
+ border-radius: var(--sealpixel-radius);
233
+ background: var(--sealpixel-color-surface-2);
234
+ box-shadow: 0 0 0 1px var(--sealpixel-color-border);
235
+ transition:
236
+ box-shadow var(--sealpixel-duration) var(--sealpixel-ease),
237
+ transform var(--sealpixel-duration) var(--sealpixel-ease-spring);
238
+ }
239
+ .panel .tiles sealpixel-button {
240
+ min-width: 84px;
241
+ max-width: 84px;
242
+ }
243
+ .panel .tiles sealpixel-button::part(button) {
244
+ flex-direction: column;
245
+ gap: 6px;
246
+ padding: 0;
247
+ min-height: 0;
248
+ height: auto;
249
+ font-size: calc(var(--sealpixel-font-size) * 11 / 14);
250
+ background: transparent;
251
+ color: var(--sealpixel-color-fg-muted);
252
+ }
253
+ .panel .tiles sealpixel-button:hover .thumb {
254
+ transform: translateY(-2px);
255
+ }
256
+ .panel .tiles sealpixel-button[pressed] .thumb {
257
+ box-shadow:
258
+ 0 0 0 2px var(--sealpixel-color-surface),
259
+ 0 0 0 4px var(--sealpixel-color-accent);
260
+ }
261
+ .panel .tiles sealpixel-button[pressed]::part(button) {
262
+ background: transparent;
263
+ border-color: transparent;
264
+ color: var(--sealpixel-color-fg);
265
+ }
266
+ /* Separates the untouched image from the presets. */
267
+ .panel .divider {
268
+ flex: 0 0 auto;
269
+ align-self: stretch;
270
+ width: 1px;
271
+ min-width: 1px;
272
+ margin: 6px calc(var(--sealpixel-space) * 0.5);
273
+ background: var(--sealpixel-color-border);
274
+ opacity: 0.55;
275
+ }
276
+ .panel .row.compact > sealpixel-button {
277
+ flex: 0 0 auto;
278
+ min-width: 72px;
279
+ }
280
+ /* Phones: sibling groups share one line and hints make room for the stage. */
281
+ .panel .rows {
282
+ display: flex;
283
+ gap: var(--sealpixel-space);
284
+ align-items: end;
285
+ }
286
+ /*
287
+ * Content width, not an equal share. An equal share squeezed a text field
288
+ * and a colour well down to a few pixels each and their labels ran into
289
+ * one another; only a dial has a reason to take the leftover room.
290
+ */
291
+ .panel .rows > * {
292
+ flex: 0 1 auto;
293
+ min-width: 0;
294
+ }
295
+ /*
296
+ * A dial needs travel to be worth dragging. Inside a settings row it was
297
+ * sharing the width equally with a colour swatch and a checkbox and ended
298
+ * up a few ticks wide, which is not a control any more. The row grows to
299
+ * give it that width instead of shrinking to its contents.
300
+ */
301
+ /*
302
+ * A settings row scrolls sideways when it is wider than the bar, the way
303
+ * the choice row does. Letting it overflow instead left the last control
304
+ * cut off at the edge with nothing to say it was there.
305
+ */
306
+ .panel > .rows {
307
+ flex: 0 1 auto;
308
+ max-width: 100%;
309
+ overflow-x: auto;
310
+ overflow-y: hidden;
311
+ scrollbar-width: none;
312
+ scroll-behavior: smooth;
313
+ padding-bottom: 1px;
314
+ }
315
+ .panel > .rows::-webkit-scrollbar {
316
+ display: none;
317
+ }
318
+ .panel > .rows > * {
319
+ flex-shrink: 0;
320
+ }
321
+ .panel .rows > sealpixel-slider {
322
+ flex: 0 1 260px;
323
+ min-width: 220px;
324
+ }
325
+ .panel .rows .row {
326
+ flex-wrap: nowrap;
327
+ }
328
+ .panel .rows .row > sealpixel-button {
329
+ flex: 1 1 0;
330
+ min-width: 0;
331
+ }
332
+ /*
333
+ * A field fills its label, but never shrinks to nothing: a text box a
334
+ * few pixels wide hides what was typed into it, and a select that narrow
335
+ * hides which option is chosen.
336
+ */
337
+ .panel .rows select,
338
+ .panel .rows input:not([type='checkbox']):not([type='color']) {
339
+ width: 100%;
340
+ min-width: 7em;
341
+ }
342
+ .panel .rows input[type='text'],
343
+ .panel .rows textarea {
344
+ min-width: 11em;
345
+ }
346
+ .panel .rows > .field:has(input[type='color']),
347
+ .panel .rows > .field.check {
348
+ flex: 0 0 auto;
349
+ }
350
+ /* A colour well is square, which makes the disc round. */
351
+ .panel .rows > .field:has(input[type='color']) input {
352
+ width: var(--sealpixel-control-height);
353
+ aspect-ratio: 1;
354
+ }
355
+ .panel .swatches {
356
+ display: flex;
357
+ flex-wrap: wrap;
358
+ gap: 6px;
359
+ margin-bottom: 6px;
360
+ }
361
+ .panel .swatch {
362
+ width: 24px;
363
+ height: 24px;
364
+ border-radius: 50%;
365
+ border: 0;
366
+ box-shadow: 0 0 0 1px var(--sealpixel-color-border);
367
+ cursor: pointer;
368
+ padding: 0;
369
+ transition:
370
+ transform var(--sealpixel-duration) var(--sealpixel-ease-spring),
371
+ border-color var(--sealpixel-transition),
372
+ box-shadow var(--sealpixel-duration) var(--sealpixel-ease);
373
+ }
374
+ .panel .swatch:hover {
375
+ transform: scale(1.12);
376
+ }
377
+ .panel .swatch:active {
378
+ transform: scale(0.94);
379
+ }
380
+ /* The ring sits off the disc, so the colour itself is never covered. */
381
+ .panel .swatch[aria-pressed='true'] {
382
+ box-shadow:
383
+ 0 0 0 2px var(--sealpixel-color-surface),
384
+ 0 0 0 3.5px var(--sealpixel-color-accent);
385
+ }
386
+ .panel:empty {
387
+ display: none;
388
+ }
389
+ .toast {
390
+ position: absolute;
391
+ left: 50%;
392
+ bottom: calc(var(--sealpixel-toolbar-size) + var(--sealpixel-space) * 2);
393
+ /* Sits above the stage, never over the bar the user is working in. */
394
+ transform: translateX(-50%);
395
+ display: flex;
396
+ align-items: center;
397
+ gap: var(--sealpixel-space);
398
+ max-width: calc(100% - var(--sealpixel-space) * 4);
399
+ padding: calc(var(--sealpixel-space) * 1.25) calc(var(--sealpixel-space) * 2);
400
+ border-radius: 999px;
401
+ background: color-mix(in srgb, var(--sealpixel-color-surface) 92%, transparent);
402
+ border: 1px solid var(--sealpixel-color-border);
403
+ box-shadow: var(--sealpixel-shadow, 0 8px 24px rgba(0, 0, 0, 0.3));
404
+ color: var(--sealpixel-color-fg);
405
+ font-size: calc(var(--sealpixel-font-size) * 13 / 14);
406
+ white-space: nowrap;
407
+ backdrop-filter: blur(8px);
408
+ cursor: pointer;
409
+ z-index: 2;
410
+ animation: sealpixel-toast-in var(--sealpixel-duration) var(--sealpixel-ease-out) both;
411
+ }
412
+ .toast:hover {
413
+ border-color: var(--sealpixel-color-fg-muted);
414
+ }
415
+ .toast code {
416
+ font: 12px ui-monospace, SFMono-Regular, Menlo, monospace;
417
+ color: var(--sealpixel-color-fg-muted);
418
+ padding: 2px 8px;
419
+ border-radius: 999px;
420
+ background: var(--sealpixel-color-surface-2);
421
+ }
422
+ @keyframes sealpixel-toast-in {
423
+ from {
424
+ opacity: 0;
425
+ transform: translate(-50%, 12px) scale(0.96);
426
+ }
427
+ }
428
+ /*
429
+ * Wide layouts move the tool rail to the left edge and nothing else. The
430
+ * panel stays a bottom bar at every width, so a control sits in the same
431
+ * place on a phone and on a desktop, and the stage keeps the full width
432
+ * it needs for a landscape image.
433
+ */
434
+ @container (min-width: 48rem) {
435
+ /*
436
+ * The rail runs the full height beside both the stage and the bar.
437
+ * Stopping it above the bar cost it the bar's height, and with ten or
438
+ * more tools the last of them ended up scrolled out of sight behind
439
+ * the settings of the one already open.
440
+ */
441
+ .root {
442
+ grid-template:
443
+ 'nav nav' auto
444
+ 'toolbar stage' 1fr
445
+ 'toolbar panel' auto / var(--sealpixel-toolbar-size) 1fr;
446
+ }
447
+ .panel {
448
+ height: max(var(--sealpixel-panel-size), var(--sealpixel-panel-fit, 0px));
449
+ padding: var(--sealpixel-space) calc(var(--sealpixel-space) * 2);
450
+ }
451
+ .panel[data-empty] {
452
+ height: 0;
453
+ padding: 0;
454
+ }
455
+ .toast {
456
+ bottom: calc(var(--sealpixel-space) * 2);
457
+ }
458
+ }
459
+ .panel .row {
460
+ display: flex;
461
+ gap: var(--sealpixel-space);
462
+ flex-wrap: wrap;
463
+ }
464
+ .panel > .choice {
465
+ order: 2;
466
+ flex: 1 1 100%;
467
+ justify-content: safe center;
468
+ /*
469
+ * Pinned to the foot of the bar. The choice is what gets the user out
470
+ * of the tool they are in, so it has to stay reachable even when a
471
+ * busy panel scrolls its settings.
472
+ */
473
+ position: sticky;
474
+ bottom: 0;
475
+ z-index: 1;
476
+ background: var(--sealpixel-color-surface);
477
+ padding-top: 4px;
478
+ /*
479
+ * One line that scrolls, never two that wrap. A wrapped second line
480
+ * falls below the bar and takes whatever was on it out of reach, and
481
+ * on a phone that was the reset button.
482
+ */
483
+ flex-wrap: nowrap;
484
+ overflow-x: auto;
485
+ overflow-y: hidden;
486
+ scrollbar-width: none;
487
+ scroll-behavior: smooth;
488
+ }
489
+ .panel > .choice::-webkit-scrollbar {
490
+ display: none;
491
+ }
492
+ .panel > .choice > * {
493
+ flex-shrink: 0;
494
+ }
495
+ .panel .field {
496
+ display: grid;
497
+ gap: 3px;
498
+ justify-items: center;
499
+ color: var(--sealpixel-color-fg-muted);
500
+ }
501
+ /* The label names the control; it is not the thing being read. */
502
+ .panel .field > span,
503
+ .panel .field > .lab {
504
+ font-size: calc(var(--sealpixel-font-size) * 11 / 14);
505
+ letter-spacing: 0.012em;
506
+ line-height: 1.2;
507
+ }
508
+ .panel .hint {
509
+ margin: 0;
510
+ color: var(--sealpixel-color-fg-muted);
511
+ font-size: calc(var(--sealpixel-font-size) * 12 / 14);
512
+ }
513
+ /*
514
+ * Width and height are one measurement, so they sit against the link that
515
+ * binds them rather than being two fields that happen to be adjacent.
516
+ */
517
+ .panel .dims {
518
+ display: inline-flex;
519
+ align-items: center;
520
+ gap: 4px;
521
+ }
522
+ .panel .dims input[type='number'] {
523
+ width: 5.5em;
524
+ min-width: 0;
525
+ text-align: center;
526
+ font-variant-numeric: tabular-nums;
527
+ appearance: textfield;
528
+ }
529
+ .panel .dims input::-webkit-outer-spin-button,
530
+ .panel .dims input::-webkit-inner-spin-button {
531
+ appearance: none;
532
+ margin: 0;
533
+ }
534
+ /* A value the link worked out, not one that was typed. */
535
+ .panel .dims input.derived {
536
+ color: var(--sealpixel-color-fg-muted);
537
+ font-weight: 400;
538
+ }
539
+ .panel .dims sealpixel-button::part(button) {
540
+ min-width: calc(var(--sealpixel-control-height) - 6px);
541
+ min-height: calc(var(--sealpixel-control-height) - 6px);
542
+ padding: 0;
543
+ background: transparent;
544
+ color: var(--sealpixel-color-fg-muted);
545
+ }
546
+ .panel .dims sealpixel-button[pressed]::part(button) {
547
+ background: var(--sealpixel-color-accent-soft);
548
+ color: var(--sealpixel-color-accent);
549
+ }
550
+ .panel .anchors {
551
+ display: grid;
552
+ grid-template-columns: repeat(3, 1fr);
553
+ gap: 4px;
554
+ max-width: 180px;
555
+ }
556
+ .panel .field.check {
557
+ grid-template-columns: auto 1fr;
558
+ align-items: center;
559
+ }
560
+ .panel textarea {
561
+ font: inherit;
562
+ color: var(--sealpixel-color-fg);
563
+ background: var(--sealpixel-color-surface-2);
564
+ border: 1px solid var(--sealpixel-color-border);
565
+ border-radius: var(--sealpixel-radius-sm);
566
+ padding: var(--sealpixel-space);
567
+ resize: vertical;
568
+ }
569
+ /* A colour is a disc, not a box: it shows the colour and nothing else. */
570
+ .panel input[type='color'] {
571
+ /* Without this the engine keeps its own swatch metrics inside the box
572
+ and the disc comes out an ellipse. */
573
+ appearance: none;
574
+ min-height: var(--sealpixel-control-height);
575
+ height: var(--sealpixel-control-height);
576
+ width: var(--sealpixel-control-height);
577
+ padding: 0;
578
+ border: 0;
579
+ border-radius: 50%;
580
+ background: transparent;
581
+ cursor: pointer;
582
+ overflow: hidden;
583
+ }
584
+ /* The swatch has to be told to fill the box; it does not by default. */
585
+ .panel input[type='color']::-webkit-color-swatch-wrapper {
586
+ padding: 0;
587
+ width: 100%;
588
+ height: 100%;
589
+ }
590
+ .panel input[type='color']::-webkit-color-swatch {
591
+ width: 100%;
592
+ height: 100%;
593
+ border: 0;
594
+ border-radius: 50%;
595
+ box-shadow: 0 0 0 1px var(--sealpixel-color-border);
596
+ }
597
+ .panel input[type='color']::-moz-color-swatch {
598
+ width: 100%;
599
+ height: 100%;
600
+ border: 0;
601
+ border-radius: 50%;
602
+ box-shadow: 0 0 0 1px var(--sealpixel-color-border);
603
+ }
604
+ .panel input:not([type='checkbox']):not([type='color']),
605
+ .panel select {
606
+ font: inherit;
607
+ font-size: calc(var(--sealpixel-font-size) * 13 / 14);
608
+ color: var(--sealpixel-color-fg);
609
+ background: var(--sealpixel-color-surface-2);
610
+ border: 1px solid transparent;
611
+ border-radius: var(--sealpixel-radius-pill);
612
+ min-height: var(--sealpixel-control-height);
613
+ padding: 0 calc(var(--sealpixel-space) * 1.5);
614
+ }
615
+ /*
616
+ * The chevron is drawn rather than left to the platform, so a select sits
617
+ * next to a pill button instead of looking like a form field that walked
618
+ * in from another page. The right padding keeps the text off it.
619
+ */
620
+ .panel select {
621
+ appearance: none;
622
+ padding-right: calc(var(--sealpixel-space) * 3);
623
+ background-image:
624
+ linear-gradient(45deg, transparent 50%, currentColor 50%),
625
+ linear-gradient(135deg, currentColor 50%, transparent 50%);
626
+ background-size: 5px 5px, 5px 5px;
627
+ background-position:
628
+ right 14px top 52%,
629
+ right 10px top 52%;
630
+ background-repeat: no-repeat;
631
+ color: var(--sealpixel-color-fg);
632
+ }
633
+ .empty {
634
+ grid-area: stage;
635
+ display: grid;
636
+ place-content: center;
637
+ gap: var(--sealpixel-space);
638
+ text-align: center;
639
+ color: var(--sealpixel-color-fg-muted);
640
+ padding: var(--sealpixel-space);
641
+ }
642
+ .empty {
643
+ transition:
644
+ background var(--sealpixel-duration) var(--sealpixel-ease),
645
+ color var(--sealpixel-duration) var(--sealpixel-ease);
646
+ }
647
+ .empty.dragover {
648
+ outline: 2px dashed var(--sealpixel-color-accent);
649
+ outline-offset: -8px;
650
+ background: var(--sealpixel-color-accent-soft, transparent);
651
+ color: var(--sealpixel-color-fg);
652
+ }
653
+ /*
654
+ * A source is loading: the mark, its core breathing. The outer square
655
+ * stands still and the inner one swells and fades, in the muted
656
+ * foreground so nothing reads as a warning. It stops under
657
+ * prefers-reduced-motion and still reads as the mark.
658
+ */
659
+ .empty.loading {
660
+ justify-items: center;
661
+ gap: calc(var(--sealpixel-space) * 2);
662
+ }
663
+ .empty.loading p {
664
+ margin: 0;
665
+ }
666
+ .mark {
667
+ display: block;
668
+ width: 40px;
669
+ height: 40px;
670
+ color: var(--sealpixel-color-fg-muted);
671
+ }
672
+ .mark .core {
673
+ transform-origin: 16px 16px;
674
+ animation: sealpixel-loading-breathe 1.8s var(--sealpixel-ease) infinite;
675
+ }
676
+ @keyframes sealpixel-loading-breathe {
677
+ 50% {
678
+ opacity: 0.45;
679
+ transform: scale(0.62);
680
+ }
681
+ }
682
+ .error {
683
+ grid-area: nav;
684
+ align-self: end;
685
+ justify-self: center;
686
+ margin-top: calc(var(--sealpixel-toolbar-size) + 4px);
687
+ z-index: 1;
688
+ padding: 6px 10px;
689
+ border-radius: var(--sealpixel-radius);
690
+ background: var(--sealpixel-color-danger);
691
+ color: white;
692
+ font-size: calc(var(--sealpixel-font-size) * 12 / 14);
693
+ box-shadow: var(--sealpixel-shadow-raised, none);
694
+ animation: sealpixel-panel-in var(--sealpixel-duration) var(--sealpixel-ease-out) both;
695
+ }
696
+ `;
697
+ //# sourceMappingURL=styles.js.map