@ascentsparksoftware/react-image-editor 1.0.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.
@@ -0,0 +1,1766 @@
1
+ .asp-icon {
2
+ display: inline-flex;
3
+ line-height: 0;
4
+ }
5
+
6
+ .asp-image-editor {
7
+ display: block;
8
+ /* Establish a query container so the editor's own width — not the viewport —
9
+ drives the responsive layout (correct even when embedded in a sidebar). */
10
+ container-type: inline-size;
11
+ container-name: aspeditor;
12
+ /* Positioning context for the error toast overlay. */
13
+ position: relative;
14
+ background: var(--asp-bg);
15
+ color: var(--asp-ink);
16
+ font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
17
+ --asp-stage-checker-a: var(--asp-surface-sunk);
18
+ --asp-stage-checker-b: var(--asp-surface-2);
19
+ }
20
+
21
+ .asp-image-editor .asp-card {
22
+ background: var(--asp-surface);
23
+ border: 1px solid var(--asp-line);
24
+ border-radius: var(--asp-radius-lg);
25
+ }
26
+
27
+ /* ---- error toast ---- */
28
+ .asp-image-editor .asp-toast {
29
+ position: absolute;
30
+ left: 50%;
31
+ bottom: 18px;
32
+ transform: translateX(-50%);
33
+ z-index: 40;
34
+ display: flex;
35
+ align-items: center;
36
+ gap: 9px;
37
+ max-width: min(440px, calc(100% - 28px));
38
+ padding: 10px 12px 10px 14px;
39
+ border-radius: var(--asp-radius-md);
40
+ background: var(--asp-error, #c0392b);
41
+ color: #fff;
42
+ box-shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
43
+ font-size: 13px;
44
+ line-height: 1.35;
45
+ }
46
+ .asp-image-editor .asp-toast__msg {
47
+ flex: 1;
48
+ }
49
+ .asp-image-editor .asp-toast__close {
50
+ flex: none;
51
+ display: inline-flex;
52
+ border: 0;
53
+ background: transparent;
54
+ color: inherit;
55
+ cursor: pointer;
56
+ padding: 2px;
57
+ border-radius: var(--asp-radius-sm);
58
+ opacity: 0.85;
59
+ }
60
+ .asp-image-editor .asp-toast__close:hover {
61
+ opacity: 1;
62
+ }
63
+ @media (prefers-reduced-motion: no-preference) {
64
+ .asp-image-editor .asp-toast {
65
+ animation: asp-toast-in 160ms ease-out;
66
+ }
67
+ }
68
+ @keyframes asp-toast-in {
69
+ from {
70
+ opacity: 0;
71
+ transform: translate(-50%, 8px);
72
+ }
73
+ }
74
+
75
+ .asp-image-editor .asp-workspace {
76
+ display: grid;
77
+ grid-template-columns: 84px minmax(0, 1fr) 268px;
78
+ /* Bound the row to the container height so a tall options panel (e.g. Text)
79
+ scrolls inside its column instead of stretching the row — which would grow
80
+ the stage and trigger a canvas resize/flicker on tool switches. */
81
+ grid-template-rows: minmax(0, 1fr);
82
+ gap: 14px;
83
+ height: 100%;
84
+ min-height: 540px;
85
+ }
86
+
87
+ .asp-image-editor .asp-workspace__rail {
88
+ min-height: 0;
89
+ }
90
+
91
+ .asp-image-editor .asp-workspace__canvas {
92
+ display: flex;
93
+ flex-direction: column;
94
+ overflow: hidden;
95
+ min-width: 0;
96
+ }
97
+
98
+ .asp-image-editor .asp-workspace__panel {
99
+ display: flex;
100
+ flex-direction: column;
101
+ overflow: hidden;
102
+ }
103
+
104
+ .asp-image-editor .asp-workspace__options {
105
+ flex: 1;
106
+ min-height: 0;
107
+ }
108
+
109
+ /* ---- top bar ---- */
110
+ .asp-image-editor .asp-topbar {
111
+ flex: none;
112
+ display: flex;
113
+ align-items: center;
114
+ gap: 8px;
115
+ padding: 11px 14px;
116
+ border-bottom: 1px solid var(--asp-line);
117
+ flex-wrap: wrap;
118
+ }
119
+
120
+ .asp-image-editor .asp-iconbtn {
121
+ width: 34px;
122
+ height: 34px;
123
+ border: 1px solid var(--asp-line-strong);
124
+ background: var(--asp-surface);
125
+ cursor: pointer;
126
+ border-radius: var(--asp-radius-sm);
127
+ color: var(--asp-ink-700);
128
+ display: flex;
129
+ align-items: center;
130
+ justify-content: center;
131
+ }
132
+ .asp-image-editor .asp-iconbtn:hover:not(:disabled) {
133
+ background: var(--asp-surface-sunk);
134
+ }
135
+ .asp-image-editor .asp-iconbtn:disabled {
136
+ opacity: 0.4;
137
+ cursor: not-allowed;
138
+ }
139
+ .asp-image-editor .asp-iconbtn--on {
140
+ background: var(--asp-accent-soft);
141
+ border-color: var(--asp-accent);
142
+ color: var(--asp-accent);
143
+ }
144
+ .asp-image-editor .asp-iconbtn--on:hover:not(:disabled) {
145
+ background: var(--asp-accent-soft);
146
+ }
147
+
148
+ .asp-image-editor .asp-divider {
149
+ width: 1px;
150
+ height: 22px;
151
+ background: var(--asp-line);
152
+ margin: 0 2px;
153
+ }
154
+
155
+ .asp-image-editor .asp-zoom {
156
+ display: flex;
157
+ align-items: center;
158
+ gap: 1px;
159
+ background: var(--asp-surface-sunk);
160
+ border-radius: var(--asp-radius-md);
161
+ padding: 2px;
162
+ }
163
+ .asp-image-editor .asp-zoom__btn {
164
+ width: 28px;
165
+ height: 26px;
166
+ border: 0;
167
+ background: transparent;
168
+ cursor: pointer;
169
+ border-radius: var(--asp-radius-sm);
170
+ color: var(--asp-ink-700);
171
+ display: flex;
172
+ align-items: center;
173
+ justify-content: center;
174
+ }
175
+ .asp-image-editor .asp-zoom__btn:hover {
176
+ background: var(--asp-surface);
177
+ }
178
+ .asp-image-editor .asp-zoom__label {
179
+ min-width: 46px;
180
+ text-align: center;
181
+ font-family: var(--asp-font-mono);
182
+ font-size: 11.5px;
183
+ font-weight: 600;
184
+ color: var(--asp-ink);
185
+ }
186
+
187
+ .asp-image-editor .asp-spacer {
188
+ flex: 1;
189
+ }
190
+
191
+ .asp-image-editor .asp-btn-line {
192
+ height: 34px;
193
+ padding: 0 12px;
194
+ border: 1px solid var(--asp-line-strong);
195
+ background: var(--asp-surface);
196
+ cursor: pointer;
197
+ border-radius: var(--asp-radius-sm);
198
+ color: var(--asp-ink-700);
199
+ font: inherit;
200
+ font-size: 12.5px;
201
+ font-weight: 600;
202
+ display: inline-flex;
203
+ align-items: center;
204
+ gap: 7px;
205
+ }
206
+ .asp-image-editor .asp-btn-line:hover {
207
+ background: var(--asp-surface-sunk);
208
+ }
209
+
210
+ .asp-image-editor .asp-btn-accent {
211
+ height: 34px;
212
+ padding: 0 14px;
213
+ border: 0;
214
+ background: var(--asp-accent);
215
+ color: var(--asp-accent-ink);
216
+ cursor: pointer;
217
+ border-radius: var(--asp-radius-sm);
218
+ font: inherit;
219
+ font-size: 12.5px;
220
+ font-weight: 700;
221
+ display: inline-flex;
222
+ align-items: center;
223
+ gap: 7px;
224
+ }
225
+ .asp-image-editor .asp-btn-accent:hover {
226
+ background: var(--asp-accent-hover);
227
+ }
228
+
229
+ .asp-image-editor .asp-iconbtn:focus-visible,
230
+ .asp-image-editor .asp-zoom__btn:focus-visible,
231
+ .asp-image-editor .asp-btn-line:focus-visible,
232
+ .asp-image-editor .asp-btn-accent:focus-visible,
233
+ .asp-image-editor .asp-fmt:focus-visible,
234
+ .asp-image-editor .asp-sample:focus-visible,
235
+ .asp-image-editor .asp-upload:focus-within {
236
+ outline: none;
237
+ box-shadow: 0 0 0 3px var(--asp-ring);
238
+ }
239
+
240
+ /* ---- popovers ---- */
241
+ .asp-image-editor .asp-pop {
242
+ position: relative;
243
+ }
244
+ .asp-image-editor .asp-pop__scrim {
245
+ position: fixed;
246
+ inset: 0;
247
+ z-index: 18;
248
+ border: 0;
249
+ padding: 0;
250
+ background: transparent;
251
+ cursor: default;
252
+ }
253
+ .asp-image-editor .asp-menu {
254
+ position: absolute;
255
+ top: calc(100% + 6px);
256
+ z-index: 19;
257
+ width: 230px;
258
+ background: var(--asp-surface);
259
+ border: 1px solid var(--asp-line);
260
+ border-radius: var(--asp-radius-md);
261
+ box-shadow: 0 14px 38px rgba(0, 0, 0, 0.2);
262
+ padding: 12px;
263
+ }
264
+ .asp-image-editor .asp-menu--right {
265
+ right: 0;
266
+ }
267
+ .asp-image-editor .asp-menu--export {
268
+ width: 248px;
269
+ padding: 14px;
270
+ }
271
+ .asp-image-editor .asp-menu--history {
272
+ left: 0;
273
+ width: 240px;
274
+ max-height: 340px;
275
+ overflow-y: auto;
276
+ padding: 4px 0;
277
+ }
278
+ .asp-image-editor .asp-menu--history .asp-history-list {
279
+ border-top: none;
280
+ max-height: none;
281
+ }
282
+ .asp-image-editor .asp-menu__title {
283
+ font-size: 10.5px;
284
+ font-weight: 700;
285
+ letter-spacing: 0.08em;
286
+ text-transform: uppercase;
287
+ color: var(--asp-ink-muted);
288
+ margin-bottom: 9px;
289
+ }
290
+ .asp-image-editor .asp-menu__label {
291
+ font-size: 12px;
292
+ font-weight: 600;
293
+ color: var(--asp-ink);
294
+ }
295
+ .asp-image-editor .asp-menu__row {
296
+ display: flex;
297
+ align-items: center;
298
+ justify-content: space-between;
299
+ margin: 14px 0 7px;
300
+ }
301
+ .asp-image-editor .asp-menu__value {
302
+ font-family: var(--asp-font-mono);
303
+ font-size: 12px;
304
+ color: var(--asp-ink-700);
305
+ }
306
+
307
+ .asp-image-editor .asp-sample-grid {
308
+ display: grid;
309
+ grid-template-columns: 1fr 1fr;
310
+ gap: 8px;
311
+ margin-bottom: 11px;
312
+ }
313
+ .asp-image-editor .asp-sample {
314
+ width: 100%;
315
+ aspect-ratio: 1.5 / 1;
316
+ border-radius: var(--asp-radius-sm);
317
+ border: 2px solid transparent;
318
+ cursor: pointer;
319
+ background-size: cover;
320
+ background-position: center;
321
+ }
322
+ .asp-image-editor .asp-sample:hover {
323
+ border-color: var(--asp-accent);
324
+ }
325
+
326
+ .asp-image-editor .asp-upload {
327
+ display: flex;
328
+ align-items: center;
329
+ justify-content: center;
330
+ gap: 7px;
331
+ height: 34px;
332
+ border: 1px dashed var(--asp-line-strong);
333
+ border-radius: var(--asp-radius-sm);
334
+ cursor: pointer;
335
+ font-size: 12.5px;
336
+ font-weight: 600;
337
+ color: var(--asp-ink-700);
338
+ position: relative;
339
+ }
340
+ .asp-image-editor .asp-upload:hover {
341
+ border-color: var(--asp-accent);
342
+ color: var(--asp-accent);
343
+ }
344
+ .asp-image-editor .asp-upload input {
345
+ position: absolute;
346
+ inset: 0;
347
+ opacity: 0;
348
+ cursor: pointer;
349
+ }
350
+
351
+ .asp-image-editor .asp-menu__divider {
352
+ height: 1px;
353
+ background: var(--asp-line);
354
+ margin: 12px 0;
355
+ }
356
+ .asp-image-editor .asp-mt-sm {
357
+ margin-top: 8px;
358
+ }
359
+ .asp-image-editor .asp-upload--btn {
360
+ width: 100%;
361
+ margin-bottom: 8px;
362
+ font: inherit;
363
+ font-size: 12.5px;
364
+ font-weight: 600;
365
+ }
366
+
367
+ .asp-image-editor .asp-fmt-row {
368
+ display: flex;
369
+ gap: 6px;
370
+ margin: 8px 0 4px;
371
+ }
372
+ .asp-image-editor .asp-fmt {
373
+ flex: 1;
374
+ padding: 7px 0;
375
+ border-radius: var(--asp-radius-sm);
376
+ border: 1px solid var(--asp-line-strong);
377
+ background: var(--asp-surface);
378
+ color: var(--asp-ink-700);
379
+ font: inherit;
380
+ font-size: 12px;
381
+ font-weight: 600;
382
+ cursor: pointer;
383
+ }
384
+ .asp-image-editor .asp-fmt--active {
385
+ border-color: var(--asp-accent);
386
+ background: var(--asp-accent-soft);
387
+ color: var(--asp-accent-soft-ink);
388
+ }
389
+ .asp-image-editor .asp-range {
390
+ width: 100%;
391
+ accent-color: var(--asp-accent);
392
+ }
393
+ .asp-image-editor .asp-download {
394
+ width: 100%;
395
+ justify-content: center;
396
+ margin-top: 13px;
397
+ height: var(--asp-ctl-h);
398
+ }
399
+
400
+ /* ---- stage / canvas ---- */
401
+ /* Wrapper that frames the stage with measurement rulers when enabled. With
402
+ rulers off it is a transparent flex passthrough; on, it becomes a grid with
403
+ an 18px ruler track on the top and left plus a clickable corner. */
404
+ .asp-image-editor .asp-stagewrap {
405
+ flex: 1;
406
+ min-height: 0;
407
+ display: flex;
408
+ flex-direction: column;
409
+ }
410
+ .asp-image-editor .asp-stagewrap--rulers {
411
+ display: grid;
412
+ grid-template-columns: 18px 1fr;
413
+ grid-template-rows: 18px 1fr;
414
+ }
415
+ .asp-image-editor .asp-stagewrap--rulers .asp-stage {
416
+ grid-column: 2;
417
+ grid-row: 2;
418
+ }
419
+ .asp-image-editor .asp-ruler {
420
+ box-sizing: border-box;
421
+ display: block;
422
+ width: 100%;
423
+ height: 100%;
424
+ background: var(--asp-surface-sunk);
425
+ touch-action: none;
426
+ }
427
+ .asp-image-editor .asp-ruler--h {
428
+ grid-column: 2;
429
+ grid-row: 1;
430
+ border-bottom: 1px solid var(--asp-line);
431
+ cursor: row-resize;
432
+ }
433
+ .asp-image-editor .asp-ruler--v {
434
+ grid-column: 1;
435
+ grid-row: 2;
436
+ border-right: 1px solid var(--asp-line);
437
+ cursor: col-resize;
438
+ }
439
+ .asp-image-editor .asp-ruler-corner {
440
+ grid-column: 1;
441
+ grid-row: 1;
442
+ border: 0;
443
+ border-right: 1px solid var(--asp-line);
444
+ border-bottom: 1px solid var(--asp-line);
445
+ background: var(--asp-surface-sunk);
446
+ cursor: pointer;
447
+ padding: 0;
448
+ position: relative;
449
+ }
450
+ .asp-image-editor .asp-ruler-corner::after {
451
+ content: '';
452
+ position: absolute;
453
+ inset: 4px;
454
+ border-right: 1.5px solid var(--asp-ink-faint);
455
+ border-bottom: 1.5px solid var(--asp-ink-faint);
456
+ border-radius: 0 0 3px 0;
457
+ }
458
+ .asp-image-editor .asp-ruler-corner:hover::after {
459
+ border-color: var(--asp-accent);
460
+ }
461
+
462
+ .asp-image-editor .asp-stage {
463
+ flex: 1;
464
+ min-height: 0;
465
+ overflow: hidden;
466
+ display: flex;
467
+ align-items: center;
468
+ justify-content: center;
469
+ position: relative;
470
+ background: repeating-conic-gradient(
471
+ var(--asp-stage-checker-a) 0% 25%,
472
+ var(--asp-stage-checker-b) 0% 50%
473
+ )
474
+ 50% / 22px 22px;
475
+ }
476
+ .asp-image-editor .asp-stage canvas {
477
+ display: block;
478
+ }
479
+
480
+ .asp-image-editor .asp-guides-overlay {
481
+ position: absolute;
482
+ inset: 0;
483
+ width: 100%;
484
+ height: 100%;
485
+ pointer-events: none;
486
+ z-index: 1;
487
+ }
488
+
489
+ .asp-image-editor .asp-crop-overlay {
490
+ position: absolute;
491
+ inset: 0;
492
+ pointer-events: none;
493
+ z-index: 2;
494
+ }
495
+ .asp-image-editor .asp-crop-overlay__v {
496
+ position: absolute;
497
+ top: 0;
498
+ bottom: 0;
499
+ width: 1px;
500
+ background: rgba(255, 255, 255, 0.5);
501
+ }
502
+ .asp-image-editor .asp-crop-overlay__h {
503
+ position: absolute;
504
+ left: 0;
505
+ right: 0;
506
+ height: 1px;
507
+ background: rgba(255, 255, 255, 0.5);
508
+ }
509
+
510
+ .asp-image-editor .asp-placeholder {
511
+ padding: 40px;
512
+ text-align: center;
513
+ color: var(--asp-ink-muted);
514
+ }
515
+
516
+ /* ---- viewer layout ---- */
517
+ .asp-image-editor .asp-viewer {
518
+ display: flex;
519
+ flex-direction: column;
520
+ overflow: hidden;
521
+ height: 100%;
522
+ min-height: 360px;
523
+ }
524
+
525
+ /* ---- basic modal layout ---- */
526
+ .asp-image-editor .asp-basic {
527
+ display: flex;
528
+ flex-direction: column;
529
+ overflow: hidden;
530
+ width: 100%;
531
+ max-width: 520px;
532
+ margin: 0 auto;
533
+ }
534
+ .asp-image-editor .asp-basic__head {
535
+ flex: none;
536
+ display: flex;
537
+ align-items: center;
538
+ justify-content: space-between;
539
+ padding: 15px 20px;
540
+ border-bottom: 1px solid var(--asp-line);
541
+ }
542
+ .asp-image-editor .asp-basic__title {
543
+ font-size: 15.5px;
544
+ font-weight: 700;
545
+ color: var(--asp-ink);
546
+ }
547
+ .asp-image-editor .asp-iconbtn-plain {
548
+ width: 32px;
549
+ height: 32px;
550
+ border: 0;
551
+ cursor: pointer;
552
+ border-radius: var(--asp-radius-sm);
553
+ background: transparent;
554
+ color: var(--asp-ink-muted);
555
+ display: flex;
556
+ align-items: center;
557
+ justify-content: center;
558
+ }
559
+ .asp-image-editor .asp-iconbtn-plain:hover {
560
+ background: var(--asp-surface-sunk);
561
+ }
562
+ .asp-image-editor .asp-iconbtn-plain:focus-visible {
563
+ outline: none;
564
+ box-shadow: 0 0 0 3px var(--asp-ring);
565
+ }
566
+ .asp-image-editor .asp-basic__body {
567
+ flex: 1;
568
+ overflow-y: auto;
569
+ padding: 20px;
570
+ display: flex;
571
+ flex-direction: column;
572
+ gap: 16px;
573
+ }
574
+ .asp-image-editor .asp-stage--rounded {
575
+ border-radius: var(--asp-radius-md);
576
+ min-height: 260px;
577
+ flex: none;
578
+ height: 280px;
579
+ }
580
+ .asp-image-editor .asp-basic__hint {
581
+ margin: 2px 0 0;
582
+ text-align: center;
583
+ font-size: 12px;
584
+ color: var(--asp-ink-muted);
585
+ }
586
+ .asp-image-editor .asp-basic__controls {
587
+ display: flex;
588
+ align-items: center;
589
+ gap: 8px;
590
+ flex-wrap: wrap;
591
+ }
592
+ .asp-image-editor .asp-zoomslider {
593
+ flex: 1;
594
+ display: flex;
595
+ align-items: center;
596
+ gap: 9px;
597
+ min-width: 140px;
598
+ color: var(--asp-ink-muted);
599
+ }
600
+ .asp-image-editor .asp-basic__foot {
601
+ flex: none;
602
+ display: flex;
603
+ justify-content: flex-end;
604
+ gap: 8px;
605
+ padding: 14px 20px;
606
+ border-top: 1px solid var(--asp-line);
607
+ }
608
+
609
+ /* shared chip + section-label + inline upload (also used by the basic layout) */
610
+ .asp-image-editor .asp-section-label {
611
+ font-size: 11px;
612
+ font-weight: 700;
613
+ letter-spacing: 0.06em;
614
+ text-transform: uppercase;
615
+ color: var(--asp-ink-muted);
616
+ margin-bottom: 8px;
617
+ }
618
+ .asp-image-editor .asp-chip-row {
619
+ display: flex;
620
+ flex-wrap: wrap;
621
+ gap: 7px;
622
+ }
623
+ .asp-image-editor .asp-chip {
624
+ padding: 7px 12px;
625
+ border-radius: var(--asp-radius-sm);
626
+ border: 1px solid var(--asp-line-strong);
627
+ background: var(--asp-surface);
628
+ color: var(--asp-ink-700);
629
+ font: inherit;
630
+ font-size: 12px;
631
+ font-weight: 600;
632
+ cursor: pointer;
633
+ }
634
+ .asp-image-editor .asp-chip:hover {
635
+ background: var(--asp-surface-sunk);
636
+ }
637
+ .asp-image-editor .asp-chip--active,
638
+ .asp-image-editor .asp-chip--active:hover {
639
+ border-color: var(--asp-accent);
640
+ background: var(--asp-accent-soft);
641
+ color: var(--asp-accent-soft-ink);
642
+ }
643
+ .asp-image-editor .asp-chip:focus-visible {
644
+ outline: none;
645
+ box-shadow: 0 0 0 3px var(--asp-ring);
646
+ }
647
+ .asp-image-editor .asp-upload--inline {
648
+ flex: none;
649
+ width: auto;
650
+ padding: 0 13px;
651
+ height: 38px;
652
+ }
653
+
654
+ /* ---- responsive (driven by the editor's own width) ---- */
655
+
656
+ /* Tablet-ish: tighten the rail and options column so the canvas keeps room. */
657
+ @container aspeditor (max-width: 880px) {
658
+ .asp-image-editor .asp-workspace {
659
+ grid-template-columns: 68px minmax(0, 1fr) 232px;
660
+ gap: 10px;
661
+ }
662
+ }
663
+
664
+ /* Narrow / mobile: stack the rail, canvas, and panel into one scrolling column.
665
+ The host scrolls; children keep their natural height (the canvas a comfortable
666
+ fixed height) so nothing gets squished. The rail is a sticky tool strip. */
667
+ @container aspeditor (max-width: 600px) {
668
+ .asp-image-editor {
669
+ overflow-y: auto;
670
+ -webkit-overflow-scrolling: touch;
671
+ }
672
+ .asp-image-editor .asp-workspace {
673
+ display: flex;
674
+ flex-direction: column;
675
+ height: auto;
676
+ min-height: 100%;
677
+ gap: 10px;
678
+ }
679
+ .asp-image-editor .asp-workspace__rail {
680
+ position: sticky;
681
+ top: 0;
682
+ z-index: 6;
683
+ }
684
+ .asp-image-editor .asp-workspace__canvas {
685
+ flex: none;
686
+ height: clamp(300px, 52cqh, 460px);
687
+ }
688
+ .asp-image-editor .asp-workspace__panel {
689
+ flex: none;
690
+ overflow: visible;
691
+ }
692
+ /* The options panel must take its natural height here (not flex:1, whose 0%
693
+ basis collapses it in a content-height column and clips the sliders). */
694
+ .asp-image-editor .asp-workspace__options {
695
+ flex: none;
696
+ }
697
+ }
698
+
699
+ .asp-tool-rail {
700
+ display: flex;
701
+ flex-direction: column;
702
+ gap: 2px;
703
+ padding: 8px 7px;
704
+ overflow-y: auto;
705
+ background: var(--asp-surface);
706
+ border: 1px solid var(--asp-line);
707
+ border-radius: var(--asp-radius-lg);
708
+ }
709
+
710
+ .asp-tool-rail .asp-rail__slot {
711
+ position: relative;
712
+ }
713
+
714
+ .asp-tool-rail .asp-rail__tool {
715
+ display: flex;
716
+ flex-direction: column;
717
+ align-items: center;
718
+ gap: 5px;
719
+ width: 100%;
720
+ padding: 10px 4px;
721
+ border: 0;
722
+ cursor: pointer;
723
+ font: inherit;
724
+ font-size: 10.5px;
725
+ font-weight: 600;
726
+ border-radius: var(--asp-radius-md);
727
+ background: transparent;
728
+ color: var(--asp-ink-muted);
729
+ transition: background 0.14s, color 0.14s;
730
+ }
731
+ .asp-tool-rail .asp-rail__tool:hover {
732
+ background: var(--asp-surface-sunk);
733
+ color: var(--asp-ink-700);
734
+ }
735
+ .asp-tool-rail .asp-rail__tool:focus-visible,
736
+ .asp-tool-rail .asp-rail__flyout-toggle:focus-visible {
737
+ outline: none;
738
+ box-shadow: 0 0 0 3px var(--asp-ring);
739
+ }
740
+ .asp-tool-rail .asp-rail__tool--active,
741
+ .asp-tool-rail .asp-rail__tool--active:hover {
742
+ background: var(--asp-accent-soft);
743
+ color: var(--asp-accent-soft-ink);
744
+ font-weight: 700;
745
+ }
746
+ .asp-tool-rail .asp-rail__label {
747
+ line-height: 1;
748
+ text-align: center;
749
+ }
750
+
751
+ /* Flyout affordance — a Photoshop-style filled triangle tucked into the slot's
752
+ bottom-right corner. Universally read as "this slot holds more tools". */
753
+ .asp-tool-rail .asp-rail__flyout-toggle {
754
+ position: absolute;
755
+ bottom: 0;
756
+ right: 0;
757
+ width: 18px;
758
+ height: 18px;
759
+ border: 0;
760
+ padding: 0;
761
+ background: transparent;
762
+ cursor: pointer;
763
+ border-radius: 0 0 var(--asp-radius-md) 0;
764
+ }
765
+ .asp-tool-rail .asp-rail__flyout-toggle::after {
766
+ content: '';
767
+ position: absolute;
768
+ bottom: 3px;
769
+ right: 3px;
770
+ width: 7px;
771
+ height: 7px;
772
+ background: var(--asp-ink-muted);
773
+ clip-path: polygon(100% 0, 100% 100%, 0 100%);
774
+ transition: background 0.14s, transform 0.14s;
775
+ }
776
+ .asp-tool-rail .asp-rail__flyout-toggle:hover::after,
777
+ .asp-tool-rail .asp-rail__flyout-toggle--open::after {
778
+ background: var(--asp-accent);
779
+ }
780
+ .asp-tool-rail .asp-rail__flyout-toggle--open::after {
781
+ transform: scale(1.25);
782
+ }
783
+ /* On the active (accent-soft) slot, keep the triangle legible. */
784
+ .asp-tool-rail .asp-rail__tool--active ~ .asp-rail__flyout-toggle::after {
785
+ background: var(--asp-accent);
786
+ }
787
+
788
+ .asp-tool-rail .asp-rail__scrim {
789
+ position: fixed;
790
+ inset: 0;
791
+ z-index: 28;
792
+ border: 0;
793
+ padding: 0;
794
+ background: transparent;
795
+ cursor: default;
796
+ }
797
+ .asp-tool-rail .asp-rail__flyout {
798
+ position: fixed;
799
+ z-index: 29;
800
+ min-width: 150px;
801
+ background: var(--asp-surface);
802
+ border: 1px solid var(--asp-line);
803
+ border-radius: var(--asp-radius-md);
804
+ box-shadow: 0 14px 38px rgba(0, 0, 0, 0.2);
805
+ padding: 6px;
806
+ display: flex;
807
+ flex-direction: column;
808
+ gap: 2px;
809
+ }
810
+ .asp-tool-rail .asp-rail__flyout-item {
811
+ display: flex;
812
+ align-items: center;
813
+ gap: 9px;
814
+ padding: 8px 10px;
815
+ border: 0;
816
+ background: transparent;
817
+ cursor: pointer;
818
+ font: inherit;
819
+ font-size: 12.5px;
820
+ font-weight: 600;
821
+ color: var(--asp-ink-700);
822
+ border-radius: var(--asp-radius-sm);
823
+ text-align: left;
824
+ }
825
+ .asp-tool-rail .asp-rail__flyout-item:hover {
826
+ background: var(--asp-surface-sunk);
827
+ }
828
+ .asp-tool-rail .asp-rail__flyout-item--active {
829
+ background: var(--asp-accent-soft);
830
+ color: var(--asp-accent-soft-ink);
831
+ }
832
+ .asp-tool-rail .asp-rail__flyout-item:focus-visible {
833
+ outline: none;
834
+ box-shadow: 0 0 0 3px var(--asp-ring);
835
+ }
836
+
837
+ /* Narrow editor: the rail becomes a horizontal tool grid that wraps onto two
838
+ rows, so every tool stays visible (no horizontal scrolling to discover them). */
839
+ @container aspeditor (max-width: 600px) {
840
+ .asp-tool-rail {
841
+ flex-direction: row;
842
+ flex-wrap: wrap;
843
+ justify-content: center;
844
+ gap: 4px;
845
+ padding: 6px 8px;
846
+ overflow: visible;
847
+ }
848
+ .asp-tool-rail .asp-rail__slot {
849
+ flex: 1 1 auto;
850
+ min-width: 56px;
851
+ max-width: 96px;
852
+ }
853
+ .asp-tool-rail .asp-rail__tool {
854
+ padding: 7px 4px;
855
+ }
856
+ }
857
+
858
+ @media (prefers-reduced-motion: reduce) {
859
+ .asp-tool-rail .asp-rail__tool {
860
+ transition: none;
861
+ }
862
+ }
863
+
864
+ .asp-options-panel {
865
+ display: flex;
866
+ flex-direction: column;
867
+ overflow: hidden;
868
+ min-height: 0;
869
+ }
870
+
871
+ .asp-options-panel .asp-panel__head {
872
+ flex: none;
873
+ display: flex;
874
+ align-items: center;
875
+ justify-content: space-between;
876
+ padding: 13px 15px;
877
+ border-bottom: 1px solid var(--asp-line);
878
+ }
879
+
880
+ .asp-options-panel .asp-panel__title {
881
+ font-size: 13.5px;
882
+ font-weight: 700;
883
+ color: var(--asp-ink);
884
+ }
885
+
886
+ .asp-options-panel .asp-panel__reset {
887
+ display: inline-flex;
888
+ align-items: center;
889
+ gap: 4px;
890
+ font: inherit;
891
+ font-size: 11.5px;
892
+ font-weight: 600;
893
+ color: var(--asp-ink-muted);
894
+ background: transparent;
895
+ border: 0;
896
+ cursor: pointer;
897
+ }
898
+ .asp-options-panel .asp-panel__reset:hover {
899
+ color: var(--asp-accent);
900
+ }
901
+ .asp-options-panel .asp-panel__reset:focus-visible {
902
+ outline: none;
903
+ box-shadow: 0 0 0 3px var(--asp-ring);
904
+ border-radius: var(--asp-radius-sm);
905
+ }
906
+
907
+ .asp-options-panel .asp-panel__body {
908
+ flex: 1;
909
+ overflow-y: auto;
910
+ padding: 16px;
911
+ }
912
+
913
+ /* Narrow editor: the whole workspace scrolls as one column, so the options
914
+ panel flows at its natural height instead of being an internal scroll pane. */
915
+ @container aspeditor (max-width: 600px) {
916
+ .asp-options-panel {
917
+ overflow: visible;
918
+ }
919
+ .asp-options-panel .asp-panel__body {
920
+ overflow-y: visible;
921
+ }
922
+ }
923
+
924
+ .asp-options-panel .asp-stack {
925
+ display: flex;
926
+ flex-direction: column;
927
+ gap: 15px;
928
+ }
929
+
930
+ .asp-options-panel .asp-mt {
931
+ display: block;
932
+ margin-top: 8px;
933
+ }
934
+
935
+ /* segmented tabs (Color: Adjust | Filters) */
936
+ .asp-options-panel .asp-tabs {
937
+ display: flex;
938
+ gap: 2px;
939
+ padding: 3px;
940
+ background: var(--asp-surface-sunk);
941
+ border-radius: var(--asp-radius-md);
942
+ margin-bottom: 16px;
943
+ }
944
+ .asp-options-panel .asp-tab {
945
+ flex: 1;
946
+ height: 30px;
947
+ border: 0;
948
+ background: transparent;
949
+ cursor: pointer;
950
+ font: inherit;
951
+ font-size: 12.5px;
952
+ font-weight: 600;
953
+ color: var(--asp-ink-700);
954
+ border-radius: var(--asp-radius-sm);
955
+ }
956
+ .asp-options-panel .asp-tab--active {
957
+ background: var(--asp-surface);
958
+ color: var(--asp-ink);
959
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
960
+ }
961
+ .asp-options-panel .asp-tab:focus-visible {
962
+ outline: none;
963
+ box-shadow: 0 0 0 3px var(--asp-ring);
964
+ }
965
+
966
+ /* fields + sliders */
967
+ .asp-options-panel .asp-field-row {
968
+ display: flex;
969
+ align-items: center;
970
+ justify-content: space-between;
971
+ margin-bottom: 6px;
972
+ }
973
+ .asp-options-panel .asp-field-label {
974
+ font-size: 12px;
975
+ font-weight: 600;
976
+ color: var(--asp-ink);
977
+ }
978
+ .asp-options-panel .asp-field-value {
979
+ font-family: var(--asp-font-mono);
980
+ font-size: 11px;
981
+ color: var(--asp-ink-muted);
982
+ }
983
+ .asp-options-panel .asp-range {
984
+ width: 100%;
985
+ accent-color: var(--asp-accent);
986
+ }
987
+
988
+ /* filters grid */
989
+ .asp-options-panel .asp-filter-grid {
990
+ display: grid;
991
+ grid-template-columns: 1fr 1fr;
992
+ gap: 9px;
993
+ }
994
+ .asp-options-panel .asp-filter {
995
+ border: 2px solid transparent;
996
+ border-radius: var(--asp-radius-md);
997
+ padding: 3px;
998
+ cursor: pointer;
999
+ background: transparent;
1000
+ font: inherit;
1001
+ }
1002
+ .asp-options-panel .asp-filter--active {
1003
+ border-color: var(--asp-accent);
1004
+ }
1005
+ .asp-options-panel .asp-filter:focus-visible {
1006
+ outline: none;
1007
+ box-shadow: 0 0 0 3px var(--asp-ring);
1008
+ }
1009
+ .asp-options-panel .asp-filter__thumb {
1010
+ display: block;
1011
+ width: 100%;
1012
+ aspect-ratio: 1.4 / 1;
1013
+ border-radius: var(--asp-radius-sm);
1014
+ background: linear-gradient(135deg, #f59e0b, #ec4899, #7c3aed);
1015
+ }
1016
+ .asp-options-panel .asp-filter__thumb--none {
1017
+ filter: none;
1018
+ }
1019
+ .asp-options-panel .asp-filter__thumb[data-look='grayscale'] {
1020
+ filter: grayscale(1);
1021
+ }
1022
+ .asp-options-panel .asp-filter__thumb[data-look='sepia'] {
1023
+ filter: sepia(0.7);
1024
+ }
1025
+ .asp-options-panel .asp-filter__thumb[data-look='invert'] {
1026
+ filter: invert(1);
1027
+ }
1028
+ .asp-options-panel .asp-filter__thumb[data-look='sharpen'] {
1029
+ filter: contrast(1.4) saturate(1.1);
1030
+ }
1031
+ .asp-options-panel .asp-filter__thumb[data-look='blendColor'] {
1032
+ filter: sepia(0.4) hue-rotate(170deg) saturate(1.4);
1033
+ }
1034
+ .asp-options-panel .asp-filter__label {
1035
+ display: block;
1036
+ text-align: center;
1037
+ font-size: 11px;
1038
+ font-weight: 600;
1039
+ color: var(--asp-ink-700);
1040
+ margin-top: 5px;
1041
+ }
1042
+
1043
+ /* chips */
1044
+ .asp-options-panel .asp-section-label {
1045
+ font-size: 11px;
1046
+ font-weight: 700;
1047
+ letter-spacing: 0.06em;
1048
+ text-transform: uppercase;
1049
+ color: var(--asp-ink-muted);
1050
+ margin-bottom: 10px;
1051
+ }
1052
+ .asp-options-panel .asp-chip-row,
1053
+ .asp-options-panel .asp-btn-row {
1054
+ display: flex;
1055
+ flex-wrap: wrap;
1056
+ gap: 7px;
1057
+ }
1058
+ .asp-options-panel .asp-chip {
1059
+ padding: 7px 12px;
1060
+ border-radius: var(--asp-radius-sm);
1061
+ border: 1px solid var(--asp-line-strong);
1062
+ background: var(--asp-surface);
1063
+ color: var(--asp-ink-700);
1064
+ font: inherit;
1065
+ font-size: 12px;
1066
+ font-weight: 600;
1067
+ cursor: pointer;
1068
+ }
1069
+ .asp-options-panel .asp-chip:hover {
1070
+ background: var(--asp-surface-sunk);
1071
+ }
1072
+ .asp-options-panel .asp-chip--active,
1073
+ .asp-options-panel .asp-chip--active:hover {
1074
+ border-color: var(--asp-accent);
1075
+ background: var(--asp-accent-soft);
1076
+ color: var(--asp-accent-soft-ink);
1077
+ }
1078
+ .asp-options-panel .asp-chip:focus-visible,
1079
+ .asp-options-panel .asp-btn-line:focus-visible,
1080
+ .asp-options-panel .asp-icon-btn:focus-visible,
1081
+ .asp-options-panel .asp-btn-accent:focus-visible {
1082
+ outline: none;
1083
+ box-shadow: 0 0 0 3px var(--asp-ring);
1084
+ }
1085
+
1086
+ /* outline buttons */
1087
+ .asp-options-panel .asp-btn-line {
1088
+ flex: 1;
1089
+ height: var(--asp-ctl-h);
1090
+ border: 1px solid var(--asp-line-strong);
1091
+ background: var(--asp-surface);
1092
+ cursor: pointer;
1093
+ border-radius: var(--asp-radius-sm);
1094
+ color: var(--asp-ink-700);
1095
+ font: inherit;
1096
+ font-size: 12.5px;
1097
+ font-weight: 600;
1098
+ display: inline-flex;
1099
+ align-items: center;
1100
+ justify-content: center;
1101
+ gap: 6px;
1102
+ }
1103
+ .asp-options-panel .asp-btn-line:hover {
1104
+ background: var(--asp-surface-sunk);
1105
+ }
1106
+ .asp-options-panel .asp-btn-danger {
1107
+ color: var(--asp-error);
1108
+ border-color: color-mix(in oklab, var(--asp-error) 40%, var(--asp-line-strong));
1109
+ }
1110
+
1111
+ .asp-options-panel .asp-shape-grid {
1112
+ display: grid;
1113
+ grid-template-columns: repeat(5, 1fr);
1114
+ gap: 6px;
1115
+ }
1116
+ .asp-options-panel .asp-shape-grid .asp-icon-btn {
1117
+ flex: none;
1118
+ }
1119
+
1120
+ .asp-options-panel .asp-icon-btn {
1121
+ flex: 1;
1122
+ height: 36px;
1123
+ border: 1px solid var(--asp-line-strong);
1124
+ background: var(--asp-surface);
1125
+ border-radius: var(--asp-radius-sm);
1126
+ color: var(--asp-ink-700);
1127
+ cursor: pointer;
1128
+ display: flex;
1129
+ align-items: center;
1130
+ justify-content: center;
1131
+ }
1132
+ .asp-options-panel .asp-icon-btn:hover {
1133
+ background: var(--asp-surface-sunk);
1134
+ }
1135
+ .asp-options-panel .asp-icon-btn--on,
1136
+ .asp-options-panel .asp-icon-btn--on:hover {
1137
+ background: var(--asp-accent-soft);
1138
+ color: var(--asp-accent-soft-ink);
1139
+ border-color: var(--asp-accent);
1140
+ }
1141
+
1142
+ /* text add */
1143
+ .asp-options-panel .asp-text-add {
1144
+ display: flex;
1145
+ gap: 8px;
1146
+ margin-top: 6px;
1147
+ }
1148
+ .asp-options-panel .asp-input {
1149
+ flex: 1;
1150
+ height: var(--asp-ctl-h);
1151
+ background: var(--asp-surface-2);
1152
+ border: 1px solid var(--asp-line-strong);
1153
+ border-radius: var(--asp-radius-sm);
1154
+ padding: 0 12px;
1155
+ font: inherit;
1156
+ font-size: 13px;
1157
+ color: var(--asp-ink);
1158
+ outline: 0;
1159
+ }
1160
+ .asp-options-panel .asp-input:focus {
1161
+ border-color: var(--asp-accent);
1162
+ box-shadow: 0 0 0 3px var(--asp-ring);
1163
+ }
1164
+ .asp-options-panel .asp-btn-accent {
1165
+ height: var(--asp-ctl-h);
1166
+ padding: 0 14px;
1167
+ border: 0;
1168
+ cursor: pointer;
1169
+ border-radius: var(--asp-radius-sm);
1170
+ background: var(--asp-accent);
1171
+ color: var(--asp-accent-ink);
1172
+ font: inherit;
1173
+ font-weight: 700;
1174
+ font-size: 12.5px;
1175
+ }
1176
+ .asp-options-panel .asp-btn-accent:hover {
1177
+ background: var(--asp-accent-hover);
1178
+ }
1179
+
1180
+ .asp-options-panel .asp-redact-apply {
1181
+ width: 100%;
1182
+ justify-content: center;
1183
+ }
1184
+
1185
+ .asp-options-panel .asp-select {
1186
+ width: 100%;
1187
+ margin-top: 6px;
1188
+ cursor: pointer;
1189
+ }
1190
+ .asp-options-panel .asp-select:focus-visible {
1191
+ outline: none;
1192
+ box-shadow: 0 0 0 3px var(--asp-ring);
1193
+ }
1194
+
1195
+ /* colors */
1196
+ .asp-options-panel .asp-color-row {
1197
+ display: flex;
1198
+ align-items: center;
1199
+ gap: 9px;
1200
+ }
1201
+ .asp-options-panel .asp-color-row__label {
1202
+ flex: 1;
1203
+ }
1204
+ .asp-options-panel .asp-swatches {
1205
+ display: flex;
1206
+ gap: 5px;
1207
+ }
1208
+ .asp-options-panel .asp-swatch {
1209
+ width: 22px;
1210
+ height: 22px;
1211
+ border-radius: 50%;
1212
+ border: 0;
1213
+ cursor: pointer;
1214
+ padding: 0;
1215
+ }
1216
+ .asp-options-panel .asp-swatch--white {
1217
+ border: 1px solid var(--asp-line-strong);
1218
+ }
1219
+ .asp-options-panel .asp-swatch--active {
1220
+ box-shadow: 0 0 0 2px var(--asp-surface), 0 0 0 3px var(--asp-accent);
1221
+ }
1222
+ .asp-options-panel .asp-swatches--wrap {
1223
+ flex-wrap: wrap;
1224
+ }
1225
+ .asp-options-panel .asp-swatch--lg {
1226
+ width: 32px;
1227
+ height: 32px;
1228
+ border-radius: var(--asp-radius-sm);
1229
+ }
1230
+ .asp-options-panel .asp-swatch--transparent {
1231
+ background: repeating-conic-gradient(var(--asp-surface-sunk) 0% 25%, var(--asp-surface-2) 0% 50%) 50% /
1232
+ 10px 10px;
1233
+ border: 1px solid var(--asp-line-strong);
1234
+ }
1235
+ .asp-options-panel .asp-swatch:focus-visible {
1236
+ outline: none;
1237
+ box-shadow: 0 0 0 3px var(--asp-ring);
1238
+ }
1239
+
1240
+ /* frame */
1241
+ .asp-options-panel .asp-frame-grid {
1242
+ display: grid;
1243
+ grid-template-columns: 1fr 1fr;
1244
+ gap: 9px;
1245
+ }
1246
+ .asp-options-panel .asp-frame {
1247
+ height: var(--asp-ctl-h);
1248
+ display: inline-flex;
1249
+ align-items: center;
1250
+ justify-content: center;
1251
+ }
1252
+
1253
+ .asp-options-panel .asp-upload {
1254
+ display: flex;
1255
+ align-items: center;
1256
+ justify-content: center;
1257
+ gap: 7px;
1258
+ height: var(--asp-ctl-h);
1259
+ border: 1px dashed var(--asp-line-strong);
1260
+ border-radius: var(--asp-radius-sm);
1261
+ cursor: pointer;
1262
+ font-size: 12.5px;
1263
+ font-weight: 600;
1264
+ color: var(--asp-ink-700);
1265
+ position: relative;
1266
+ }
1267
+ .asp-options-panel .asp-upload:hover {
1268
+ border-color: var(--asp-accent);
1269
+ color: var(--asp-accent);
1270
+ }
1271
+ .asp-options-panel .asp-upload input {
1272
+ position: absolute;
1273
+ inset: 0;
1274
+ opacity: 0;
1275
+ cursor: pointer;
1276
+ }
1277
+
1278
+ .asp-options-panel .asp-hint {
1279
+ font-size: 11.5px;
1280
+ color: var(--asp-ink-muted);
1281
+ line-height: 1.5;
1282
+ background: var(--asp-surface-2);
1283
+ border: 1px dashed var(--asp-line-strong);
1284
+ border-radius: var(--asp-radius-sm);
1285
+ padding: 9px 11px;
1286
+ margin: 0;
1287
+ display: flex;
1288
+ gap: 4px;
1289
+ align-items: flex-start;
1290
+ }
1291
+
1292
+ /* Custom artboard width × height entry. */
1293
+ .asp-options-panel .asp-dim-row {
1294
+ display: flex;
1295
+ align-items: center;
1296
+ gap: 6px;
1297
+ margin-top: 8px;
1298
+ }
1299
+ .asp-options-panel .asp-dim-input {
1300
+ width: 0;
1301
+ flex: 1 1 0;
1302
+ min-width: 0;
1303
+ height: var(--asp-ctl-h);
1304
+ padding: 0 8px;
1305
+ border: 1px solid var(--asp-line-strong);
1306
+ border-radius: var(--asp-radius-sm);
1307
+ background: var(--asp-surface);
1308
+ color: var(--asp-ink-900);
1309
+ font: inherit;
1310
+ font-size: 12.5px;
1311
+ }
1312
+ .asp-options-panel .asp-dim-input:focus-visible {
1313
+ outline: 2px solid var(--asp-accent);
1314
+ outline-offset: 1px;
1315
+ }
1316
+ .asp-options-panel .asp-dim-x {
1317
+ color: var(--asp-ink-muted);
1318
+ font-size: 12px;
1319
+ }
1320
+ .asp-options-panel .asp-dim-row .asp-btn-line {
1321
+ flex: 0 0 auto;
1322
+ padding: 0 12px;
1323
+ }
1324
+
1325
+ /* Web-font loading indicator next to the Font label. */
1326
+ .asp-options-panel .asp-font-loading {
1327
+ display: inline-flex;
1328
+ align-items: center;
1329
+ gap: 6px;
1330
+ font-size: 11px;
1331
+ font-weight: 600;
1332
+ color: var(--asp-ink-muted);
1333
+ }
1334
+ .asp-options-panel .asp-spinner {
1335
+ width: 12px;
1336
+ height: 12px;
1337
+ border: 2px solid var(--asp-line-strong);
1338
+ border-top-color: var(--asp-accent);
1339
+ border-radius: 50%;
1340
+ animation: asp-spin 0.7s linear infinite;
1341
+ }
1342
+ @keyframes asp-spin {
1343
+ to {
1344
+ transform: rotate(360deg);
1345
+ }
1346
+ }
1347
+ @media (prefers-reduced-motion: reduce) {
1348
+ .asp-options-panel .asp-spinner {
1349
+ animation-duration: 1.6s;
1350
+ }
1351
+ }
1352
+
1353
+ /* AI operation progress bar. */
1354
+ .asp-options-panel .asp-ai-bar {
1355
+ height: 6px;
1356
+ border-radius: 999px;
1357
+ background: var(--asp-surface-sunk);
1358
+ overflow: hidden;
1359
+ }
1360
+ .asp-options-panel .asp-ai-bar > span {
1361
+ display: block;
1362
+ height: 100%;
1363
+ background: var(--asp-accent);
1364
+ transition: width 0.2s ease;
1365
+ }
1366
+
1367
+ .asp-history-list {
1368
+ display: flex;
1369
+ flex-direction: column;
1370
+ flex: none;
1371
+ border-top: 1px solid var(--asp-line);
1372
+ padding: 11px 12px;
1373
+ max-height: 166px;
1374
+ }
1375
+
1376
+ .asp-history-list .asp-history__head {
1377
+ display: flex;
1378
+ align-items: center;
1379
+ justify-content: space-between;
1380
+ width: 100%;
1381
+ background: transparent;
1382
+ border: 0;
1383
+ padding: 0 0 7px;
1384
+ cursor: pointer;
1385
+ color: var(--asp-ink-muted);
1386
+ }
1387
+ .asp-history-list .asp-history__head:focus-visible {
1388
+ outline: none;
1389
+ box-shadow: 0 0 0 3px var(--asp-ring);
1390
+ border-radius: var(--asp-radius-sm);
1391
+ }
1392
+ .asp-history-list .asp-history__title {
1393
+ font-size: 10.5px;
1394
+ font-weight: 700;
1395
+ letter-spacing: 0.08em;
1396
+ text-transform: uppercase;
1397
+ color: var(--asp-ink-muted);
1398
+ }
1399
+
1400
+ .asp-history-list .asp-history__scroll {
1401
+ overflow-y: auto;
1402
+ display: flex;
1403
+ flex-direction: column;
1404
+ gap: 1px;
1405
+ }
1406
+
1407
+ .asp-history-list .asp-history__row {
1408
+ display: flex;
1409
+ align-items: center;
1410
+ gap: 9px;
1411
+ padding: 7px 10px;
1412
+ border-radius: var(--asp-radius-sm);
1413
+ font-size: 12px;
1414
+ font-weight: 500;
1415
+ color: var(--asp-ink);
1416
+ }
1417
+
1418
+ .asp-history-list .asp-history__row--current {
1419
+ font-weight: 700;
1420
+ background: var(--asp-accent-soft);
1421
+ color: var(--asp-accent-soft-ink);
1422
+ }
1423
+
1424
+ .asp-history-list .asp-history__row--future {
1425
+ color: var(--asp-ink-faint);
1426
+ }
1427
+
1428
+ .asp-history-list .asp-history__label {
1429
+ overflow: hidden;
1430
+ text-overflow: ellipsis;
1431
+ white-space: nowrap;
1432
+ }
1433
+
1434
+ .asp-layer-list {
1435
+ display: flex;
1436
+ flex-direction: column;
1437
+ flex: none;
1438
+ border-top: 1px solid var(--asp-line);
1439
+ min-height: 0;
1440
+ max-height: 42%;
1441
+ }
1442
+
1443
+ /* When the editor is narrow the whole workspace scrolls as one column, so the
1444
+ layer list flows at its natural height (a capped, internally-scrolling list)
1445
+ rather than fighting for a 42% share of an auto-height panel. */
1446
+ @container aspeditor (max-width: 600px) {
1447
+ .asp-layer-list {
1448
+ max-height: 320px;
1449
+ }
1450
+ }
1451
+
1452
+ .asp-layer-list .asp-layers__head {
1453
+ flex: none;
1454
+ display: flex;
1455
+ align-items: center;
1456
+ justify-content: space-between;
1457
+ width: 100%;
1458
+ padding: 11px 14px;
1459
+ background: transparent;
1460
+ border: 0;
1461
+ cursor: pointer;
1462
+ color: var(--asp-ink);
1463
+ }
1464
+ .asp-layer-list .asp-layers__head:focus-visible {
1465
+ outline: none;
1466
+ box-shadow: 0 0 0 3px var(--asp-ring);
1467
+ }
1468
+ .asp-layer-list .asp-layers__title {
1469
+ font-size: 12px;
1470
+ font-weight: 700;
1471
+ letter-spacing: 0.04em;
1472
+ text-transform: uppercase;
1473
+ color: var(--asp-ink-muted);
1474
+ }
1475
+
1476
+ /* object-ops */
1477
+ .asp-layer-list .asp-layers__ops {
1478
+ flex: none;
1479
+ padding: 0 12px 10px;
1480
+ border-bottom: 1px solid var(--asp-line);
1481
+ }
1482
+ .asp-layer-list .asp-layers__opsrow {
1483
+ display: flex;
1484
+ gap: 4px;
1485
+ margin-bottom: 10px;
1486
+ }
1487
+ .asp-layer-list .asp-layers__op {
1488
+ flex: 1;
1489
+ height: 30px;
1490
+ border: 1px solid var(--asp-line-strong);
1491
+ background: var(--asp-surface);
1492
+ border-radius: var(--asp-radius-sm);
1493
+ color: var(--asp-ink-700);
1494
+ cursor: pointer;
1495
+ display: flex;
1496
+ align-items: center;
1497
+ justify-content: center;
1498
+ }
1499
+ .asp-layer-list .asp-layers__op:hover:not(:disabled) {
1500
+ background: var(--asp-surface-sunk);
1501
+ }
1502
+ .asp-layer-list .asp-layers__op:disabled {
1503
+ opacity: 0.4;
1504
+ cursor: not-allowed;
1505
+ }
1506
+ .asp-layer-list .asp-layers__op--danger:hover:not(:disabled) {
1507
+ color: var(--asp-error);
1508
+ }
1509
+ .asp-layer-list .asp-layers__op:focus-visible {
1510
+ outline: none;
1511
+ box-shadow: 0 0 0 3px var(--asp-ring);
1512
+ }
1513
+
1514
+ .asp-layer-list .asp-layers__align {
1515
+ position: relative;
1516
+ flex: 1;
1517
+ display: flex;
1518
+ }
1519
+ .asp-layer-list .asp-layers__align .asp-layers__op {
1520
+ width: 100%;
1521
+ }
1522
+ .asp-layer-list .asp-layers__scrim {
1523
+ position: fixed;
1524
+ inset: 0;
1525
+ z-index: 18;
1526
+ border: 0;
1527
+ background: transparent;
1528
+ cursor: default;
1529
+ }
1530
+ .asp-layer-list .asp-layers__alignmenu {
1531
+ position: absolute;
1532
+ /* The align button sits at the top of the panel (just under the Layers
1533
+ header), so the menu opens DOWNWARD over the layer list. Opening upward
1534
+ pushed it out of the panel into the canvas band, where the panel's
1535
+ overflow:hidden clipped it and the canvas painted over it. */
1536
+ top: calc(100% + 4px);
1537
+ left: 0;
1538
+ z-index: 30;
1539
+ display: grid;
1540
+ grid-template-columns: 1fr 1fr 1fr;
1541
+ gap: 2px;
1542
+ background: var(--asp-surface);
1543
+ border: 1px solid var(--asp-line);
1544
+ border-radius: var(--asp-radius-md);
1545
+ box-shadow: 0 14px 38px rgba(0, 0, 0, 0.2);
1546
+ padding: 6px;
1547
+ width: 180px;
1548
+ }
1549
+ .asp-layer-list .asp-layers__alignmenu button {
1550
+ border: 0;
1551
+ background: transparent;
1552
+ cursor: pointer;
1553
+ font: inherit;
1554
+ font-size: 11.5px;
1555
+ font-weight: 600;
1556
+ color: var(--asp-ink-700);
1557
+ padding: 7px 4px;
1558
+ border-radius: var(--asp-radius-sm);
1559
+ }
1560
+ .asp-layer-list .asp-layers__alignmenu button:hover {
1561
+ background: var(--asp-surface-sunk);
1562
+ }
1563
+
1564
+ .asp-layer-list .asp-layers__opacity {
1565
+ display: flex;
1566
+ align-items: center;
1567
+ gap: 9px;
1568
+ }
1569
+ .asp-layer-list .asp-layers__opacity-label {
1570
+ font-size: 12px;
1571
+ font-weight: 600;
1572
+ color: var(--asp-ink);
1573
+ }
1574
+ .asp-layer-list .asp-layers__opacity .asp-range {
1575
+ flex: 1;
1576
+ accent-color: var(--asp-accent);
1577
+ }
1578
+ .asp-layer-list .asp-layers__opacity-value {
1579
+ font-family: var(--asp-font-mono);
1580
+ font-size: 11px;
1581
+ color: var(--asp-ink-muted);
1582
+ min-width: 22px;
1583
+ text-align: right;
1584
+ }
1585
+
1586
+ .asp-layer-list .asp-layers__scroll {
1587
+ flex: 1;
1588
+ overflow-y: auto;
1589
+ padding: 8px;
1590
+ display: flex;
1591
+ flex-direction: column;
1592
+ gap: 2px;
1593
+ }
1594
+ .asp-layer-list .asp-layers__row {
1595
+ position: relative;
1596
+ display: flex;
1597
+ align-items: center;
1598
+ gap: 4px;
1599
+ padding: 4px 6px;
1600
+ border-radius: var(--asp-radius-sm);
1601
+ border: 1px solid transparent;
1602
+ }
1603
+ .asp-layer-list .asp-layers__row--selected {
1604
+ background: var(--asp-accent-soft);
1605
+ border-color: var(--asp-accent);
1606
+ }
1607
+ .asp-layer-list .asp-layers__row--dragging {
1608
+ opacity: 0.45;
1609
+ }
1610
+ /* Drop indicator: a 2px accent line on the relevant edge of the hovered row. */
1611
+ .asp-layer-list .asp-layers__row--drop-above::before,
1612
+ .asp-layer-list .asp-layers__row--drop-below::after {
1613
+ content: '';
1614
+ position: absolute;
1615
+ left: 4px;
1616
+ right: 4px;
1617
+ height: 2px;
1618
+ background: var(--asp-accent);
1619
+ border-radius: 2px;
1620
+ }
1621
+ .asp-layer-list .asp-layers__row--drop-above::before {
1622
+ top: -2px;
1623
+ }
1624
+ .asp-layer-list .asp-layers__row--drop-below::after {
1625
+ bottom: -2px;
1626
+ }
1627
+
1628
+ .asp-layer-list .asp-layers__grip {
1629
+ flex: none;
1630
+ display: flex;
1631
+ align-items: center;
1632
+ justify-content: center;
1633
+ width: 16px;
1634
+ color: var(--asp-ink-faint);
1635
+ cursor: grab;
1636
+ }
1637
+ .asp-layer-list .asp-layers__row:hover .asp-layers__grip {
1638
+ color: var(--asp-ink-muted);
1639
+ }
1640
+
1641
+ .asp-layer-list .asp-layers__rename-input {
1642
+ flex: 1;
1643
+ min-width: 0;
1644
+ font: inherit;
1645
+ font-size: 12.5px;
1646
+ font-weight: 600;
1647
+ color: var(--asp-ink);
1648
+ padding: 5px 6px;
1649
+ border: 1px solid var(--asp-accent);
1650
+ border-radius: var(--asp-radius-sm);
1651
+ background: var(--asp-surface);
1652
+ outline: none;
1653
+ }
1654
+ .asp-layer-list .asp-layers__name {
1655
+ flex: 1;
1656
+ min-width: 0;
1657
+ text-align: left;
1658
+ background: transparent;
1659
+ border: 0;
1660
+ cursor: pointer;
1661
+ font: inherit;
1662
+ font-size: 12.5px;
1663
+ font-weight: 600;
1664
+ color: var(--asp-ink);
1665
+ padding: 6px 4px;
1666
+ overflow: hidden;
1667
+ text-overflow: ellipsis;
1668
+ white-space: nowrap;
1669
+ }
1670
+ .asp-layer-list .asp-layers__row--selected .asp-layers__name {
1671
+ color: var(--asp-accent-soft-ink);
1672
+ }
1673
+ .asp-layer-list .asp-layers__name:disabled {
1674
+ color: var(--asp-ink-faint);
1675
+ cursor: not-allowed;
1676
+ }
1677
+ .asp-layer-list .asp-layers__actions {
1678
+ display: flex;
1679
+ align-items: center;
1680
+ gap: 1px;
1681
+ flex: none;
1682
+ }
1683
+ .asp-layer-list .asp-layers__btn {
1684
+ width: 26px;
1685
+ height: 26px;
1686
+ border: 0;
1687
+ background: transparent;
1688
+ cursor: pointer;
1689
+ border-radius: var(--asp-radius-sm);
1690
+ color: var(--asp-ink-muted);
1691
+ display: flex;
1692
+ align-items: center;
1693
+ justify-content: center;
1694
+ }
1695
+ .asp-layer-list .asp-layers__btn:hover {
1696
+ background: var(--asp-surface-sunk);
1697
+ color: var(--asp-ink-700);
1698
+ }
1699
+ .asp-layer-list .asp-layers__btn--on {
1700
+ color: var(--asp-accent);
1701
+ }
1702
+ .asp-layer-list .asp-layers__btn:focus-visible {
1703
+ outline: none;
1704
+ box-shadow: 0 0 0 3px var(--asp-ring);
1705
+ }
1706
+
1707
+ .asp-color-field {
1708
+ display: block;
1709
+ }
1710
+
1711
+ .asp-color-field .asp-cf {
1712
+ display: flex;
1713
+ align-items: center;
1714
+ gap: 6px;
1715
+ flex-wrap: wrap;
1716
+ }
1717
+
1718
+ .asp-color-field .asp-cf__swatch {
1719
+ width: 24px;
1720
+ height: 24px;
1721
+ border-radius: 50%;
1722
+ border: 0;
1723
+ padding: 0;
1724
+ cursor: pointer;
1725
+ }
1726
+ .asp-color-field .asp-cf__swatch--white {
1727
+ border: 1px solid var(--asp-line-strong);
1728
+ }
1729
+ .asp-color-field .asp-cf__swatch--transparent {
1730
+ background: repeating-conic-gradient(var(--asp-surface-sunk) 0% 25%, var(--asp-surface-2) 0% 50%) 50% /
1731
+ 10px 10px;
1732
+ border: 1px solid var(--asp-line-strong);
1733
+ }
1734
+ .asp-color-field .asp-cf__swatch--active {
1735
+ box-shadow: 0 0 0 2px var(--asp-surface), 0 0 0 3px var(--asp-accent);
1736
+ }
1737
+ .asp-color-field .asp-cf__swatch:focus-visible {
1738
+ outline: none;
1739
+ box-shadow: 0 0 0 3px var(--asp-ring);
1740
+ }
1741
+
1742
+ /* Custom-color control: a rainbow ring with the native picker layered on top. */
1743
+ .asp-color-field .asp-cf__custom {
1744
+ position: relative;
1745
+ width: 24px;
1746
+ height: 24px;
1747
+ border-radius: 50%;
1748
+ cursor: pointer;
1749
+ background: conic-gradient(red, yellow, lime, aqua, blue, magenta, red);
1750
+ border: 1px solid var(--asp-line-strong);
1751
+ display: inline-block;
1752
+ }
1753
+ .asp-color-field .asp-cf__custom input {
1754
+ position: absolute;
1755
+ inset: 0;
1756
+ width: 100%;
1757
+ height: 100%;
1758
+ opacity: 0;
1759
+ cursor: pointer;
1760
+ border: 0;
1761
+ padding: 0;
1762
+ }
1763
+ .asp-color-field .asp-cf__custom:focus-within {
1764
+ outline: none;
1765
+ box-shadow: 0 0 0 3px var(--asp-ring);
1766
+ }