@editorcn/editor 0.4.1 → 0.4.2
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 +3 -3
- package/dist/index.cjs +6 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/style.css +229 -199
- package/package.json +1 -1
package/dist/style.css
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
|
+
@layer theme, base, components, utilities;
|
|
2
|
+
|
|
1
3
|
/* ── Main Editor Wrapper ── */
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
border-
|
|
9
|
-
|
|
4
|
+
@layer components {
|
|
5
|
+
.rte-root {
|
|
6
|
+
--rte-hairline: color-mix(in srgb, var(--border) 60%, transparent);
|
|
7
|
+
--rte-strip: color-mix(in srgb, var(--muted) 50%, var(--background));
|
|
8
|
+
--rte-float-shadow: 0 8px 30px -12px rgb(0 0 0 / 0.15);
|
|
9
|
+
position: relative;
|
|
10
|
+
border-radius: calc(var(--radius) + 4px);
|
|
11
|
+
border: 1px solid var(--rte-hairline);
|
|
12
|
+
background-color: var(--background);
|
|
13
|
+
transition: border-color 150ms ease-out;
|
|
14
|
+
}
|
|
10
15
|
}
|
|
11
16
|
|
|
12
17
|
.rte-editor-icon {
|
|
@@ -22,6 +27,7 @@ button.rte-control-button {
|
|
|
22
27
|
height: 2rem;
|
|
23
28
|
min-width: 2rem;
|
|
24
29
|
padding: 0;
|
|
30
|
+
border-radius: calc(var(--radius) - 2px);
|
|
25
31
|
transition:
|
|
26
32
|
background-color 150ms ease-out,
|
|
27
33
|
color 150ms ease-out,
|
|
@@ -71,7 +77,7 @@ button.rte-control-button:active {
|
|
|
71
77
|
|
|
72
78
|
.rte-content .ProseMirror h1 {
|
|
73
79
|
font-size: 1.5rem;
|
|
74
|
-
font-weight:
|
|
80
|
+
font-weight: 600;
|
|
75
81
|
letter-spacing: -0.025em;
|
|
76
82
|
margin-bottom: 1rem;
|
|
77
83
|
margin-top: 1.5rem;
|
|
@@ -157,7 +163,7 @@ button.rte-control-button:active {
|
|
|
157
163
|
}
|
|
158
164
|
|
|
159
165
|
.rte-content .ProseMirror blockquote {
|
|
160
|
-
border-left:
|
|
166
|
+
border-left: 2px solid var(--border);
|
|
161
167
|
padding-left: 1rem;
|
|
162
168
|
margin-top: 1rem;
|
|
163
169
|
margin-bottom: 1rem;
|
|
@@ -166,10 +172,10 @@ button.rte-control-button:active {
|
|
|
166
172
|
}
|
|
167
173
|
|
|
168
174
|
.rte-content .ProseMirror :where(pre) {
|
|
169
|
-
background:
|
|
170
|
-
color:
|
|
175
|
+
background: color-mix(in srgb, var(--muted) 50%, var(--background));
|
|
176
|
+
color: var(--foreground);
|
|
171
177
|
border-radius: var(--radius);
|
|
172
|
-
border: 1px solid var(--border);
|
|
178
|
+
border: 1px solid var(--rte-hairline, var(--border));
|
|
173
179
|
padding: 1rem;
|
|
174
180
|
margin-top: 1rem;
|
|
175
181
|
margin-bottom: 1rem;
|
|
@@ -225,34 +231,21 @@ button.rte-control-button:active {
|
|
|
225
231
|
align-items: center;
|
|
226
232
|
justify-content: center;
|
|
227
233
|
flex-wrap: wrap;
|
|
228
|
-
gap: 0.
|
|
234
|
+
gap: 0.25rem;
|
|
229
235
|
top: var(--rte-sticky-offset, 0px);
|
|
230
|
-
background-color:
|
|
236
|
+
background-color: var(--rte-strip);
|
|
231
237
|
z-index: 1;
|
|
232
|
-
border-start-end-radius: var(--radius);
|
|
233
|
-
border-start-start-radius: var(--radius);
|
|
234
|
-
border-bottom: 1px solid var(--
|
|
235
|
-
padding: 0.
|
|
236
|
-
transition:
|
|
237
|
-
box-shadow 150ms ease-out,
|
|
238
|
-
background-color 150ms ease-out;
|
|
238
|
+
border-start-end-radius: calc(var(--radius) + 3px);
|
|
239
|
+
border-start-start-radius: calc(var(--radius) + 3px);
|
|
240
|
+
border-bottom: 1px solid var(--rte-hairline);
|
|
241
|
+
padding: 0.375rem 0.5rem;
|
|
242
|
+
transition: background-color 150ms ease-out;
|
|
239
243
|
}
|
|
240
244
|
|
|
241
245
|
.rte-toolbar[data-sticky] {
|
|
242
246
|
position: sticky;
|
|
243
|
-
background-color: color-mix(in srgb, var(--
|
|
244
|
-
backdrop-filter: blur(
|
|
245
|
-
box-shadow:
|
|
246
|
-
0px 0px 0px 1px oklch(0 0 0 / 0.04),
|
|
247
|
-
0px 4px 12px 0px oklch(0 0 0 / 0.05);
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
@media (prefers-color-scheme: dark) {
|
|
251
|
-
.rte-toolbar[data-sticky] {
|
|
252
|
-
box-shadow:
|
|
253
|
-
0px 0px 0px 1px oklch(1 0 0 / 0.06),
|
|
254
|
-
0px 4px 12px 0px oklch(0 0 0 / 0.3);
|
|
255
|
-
}
|
|
247
|
+
background-color: color-mix(in srgb, var(--rte-strip) 80%, transparent);
|
|
248
|
+
backdrop-filter: blur(16px);
|
|
256
249
|
}
|
|
257
250
|
|
|
258
251
|
.rte-footer {
|
|
@@ -261,12 +254,13 @@ button.rte-control-button:active {
|
|
|
261
254
|
justify-content: space-between;
|
|
262
255
|
flex-wrap: wrap;
|
|
263
256
|
gap: 0.5rem;
|
|
264
|
-
|
|
257
|
+
min-height: 2.25rem;
|
|
258
|
+
background-color: var(--rte-strip);
|
|
265
259
|
z-index: 1;
|
|
266
|
-
border-end-end-radius: var(--radius);
|
|
267
|
-
border-end-start-radius: var(--radius);
|
|
268
|
-
border-top: 1px solid var(--
|
|
269
|
-
padding: 0.
|
|
260
|
+
border-end-end-radius: calc(var(--radius) + 3px);
|
|
261
|
+
border-end-start-radius: calc(var(--radius) + 3px);
|
|
262
|
+
border-top: 1px solid var(--rte-hairline);
|
|
263
|
+
padding: 0.375rem 0.75rem;
|
|
270
264
|
font-size: 0.75rem;
|
|
271
265
|
color: var(--muted-foreground);
|
|
272
266
|
}
|
|
@@ -274,19 +268,8 @@ button.rte-control-button:active {
|
|
|
274
268
|
.rte-footer[data-sticky] {
|
|
275
269
|
position: sticky;
|
|
276
270
|
bottom: 0;
|
|
277
|
-
background-color: color-mix(in srgb, var(--
|
|
278
|
-
backdrop-filter: blur(
|
|
279
|
-
box-shadow:
|
|
280
|
-
0px 0px 0px 1px oklch(0 0 0 / 0.04),
|
|
281
|
-
0px -4px 12px 0px oklch(0 0 0 / 0.05);
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
@media (prefers-color-scheme: dark) {
|
|
285
|
-
.rte-footer[data-sticky] {
|
|
286
|
-
box-shadow:
|
|
287
|
-
0px 0px 0px 1px oklch(1 0 0 / 0.06),
|
|
288
|
-
0px -4px 12px 0px oklch(0 0 0 / 0.3);
|
|
289
|
-
}
|
|
271
|
+
background-color: color-mix(in srgb, var(--rte-strip) 80%, transparent);
|
|
272
|
+
backdrop-filter: blur(16px);
|
|
290
273
|
}
|
|
291
274
|
|
|
292
275
|
.rte-footer-word-count {
|
|
@@ -295,7 +278,6 @@ button.rte-control-button:active {
|
|
|
295
278
|
gap: 0.375rem;
|
|
296
279
|
white-space: nowrap;
|
|
297
280
|
font-size: 0.75rem;
|
|
298
|
-
letter-spacing: 0.01em;
|
|
299
281
|
}
|
|
300
282
|
|
|
301
283
|
.rte-footer-word-count-stat {
|
|
@@ -305,7 +287,7 @@ button.rte-control-button:active {
|
|
|
305
287
|
}
|
|
306
288
|
|
|
307
289
|
.rte-footer-word-count-number {
|
|
308
|
-
font-weight:
|
|
290
|
+
font-weight: 500;
|
|
309
291
|
font-variant-numeric: tabular-nums;
|
|
310
292
|
color: var(--foreground);
|
|
311
293
|
}
|
|
@@ -326,13 +308,6 @@ button.rte-control-button:active {
|
|
|
326
308
|
);
|
|
327
309
|
}
|
|
328
310
|
|
|
329
|
-
.rte-toolbar--subtle + .rte-content + .rte-footer {
|
|
330
|
-
background-color: var(--muted);
|
|
331
|
-
}
|
|
332
|
-
.rte-toolbar--compact + .rte-content + .rte-footer {
|
|
333
|
-
background-color: var(--muted);
|
|
334
|
-
}
|
|
335
|
-
|
|
336
311
|
@media (max-width: 640px) {
|
|
337
312
|
.rte-toolbar {
|
|
338
313
|
flex-wrap: nowrap;
|
|
@@ -390,16 +365,41 @@ button.rte-control-button:active {
|
|
|
390
365
|
}
|
|
391
366
|
}
|
|
392
367
|
|
|
393
|
-
|
|
394
|
-
|
|
368
|
+
@layer components {
|
|
369
|
+
.rte-root[data-variant="default"] {
|
|
370
|
+
padding: 0.25rem;
|
|
371
|
+
background-color: var(--rte-strip);
|
|
372
|
+
}
|
|
395
373
|
}
|
|
396
374
|
.rte-root[data-variant="default"] .rte-toolbar {
|
|
397
375
|
gap: 0.25rem;
|
|
398
|
-
padding: 0
|
|
399
|
-
|
|
376
|
+
padding: 0 0 0.25rem;
|
|
377
|
+
border-bottom: none;
|
|
378
|
+
border-radius: 0;
|
|
379
|
+
background-color: transparent;
|
|
380
|
+
}
|
|
381
|
+
.rte-root[data-variant="default"] .rte-toolbar[data-sticky] {
|
|
382
|
+
margin-inline: -0.25rem;
|
|
383
|
+
margin-top: -0.25rem;
|
|
384
|
+
padding: 0.25rem 0.25rem 0.25rem;
|
|
385
|
+
border-start-start-radius: calc(var(--radius) + 3px);
|
|
386
|
+
border-start-end-radius: calc(var(--radius) + 3px);
|
|
387
|
+
background-color: color-mix(in srgb, var(--rte-strip) 85%, transparent);
|
|
388
|
+
}
|
|
389
|
+
.rte-root[data-variant="default"] .rte-content {
|
|
390
|
+
border: 1px solid var(--rte-hairline);
|
|
391
|
+
border-radius: var(--radius);
|
|
392
|
+
background-color: var(--card, var(--background));
|
|
400
393
|
}
|
|
401
394
|
.rte-root[data-variant="default"] .rte-content .ProseMirror {
|
|
402
|
-
padding: 1.25rem
|
|
395
|
+
padding: 1rem 1.25rem;
|
|
396
|
+
}
|
|
397
|
+
.rte-root[data-variant="default"] .rte-footer {
|
|
398
|
+
min-height: 2rem;
|
|
399
|
+
padding: 0.25rem 0.5rem 0;
|
|
400
|
+
border-top: none;
|
|
401
|
+
border-radius: 0;
|
|
402
|
+
background-color: transparent;
|
|
403
403
|
}
|
|
404
404
|
.rte-root[data-variant="default"] .rte-controls-group {
|
|
405
405
|
display: flex;
|
|
@@ -411,7 +411,7 @@ button.rte-control-button:active {
|
|
|
411
411
|
+ .rte-controls-group::before {
|
|
412
412
|
content: "";
|
|
413
413
|
width: 1px;
|
|
414
|
-
height:
|
|
414
|
+
height: 1rem;
|
|
415
415
|
margin-inline: 0.25rem;
|
|
416
416
|
background-color: var(--border);
|
|
417
417
|
flex-shrink: 0;
|
|
@@ -430,36 +430,28 @@ button.rte-control-button:active {
|
|
|
430
430
|
.rte-root[data-variant="default"]
|
|
431
431
|
.rte-controls-group
|
|
432
432
|
> button:hover:not(:disabled) {
|
|
433
|
-
background-color: var(--
|
|
433
|
+
background-color: color-mix(in srgb, var(--foreground) 5%, transparent);
|
|
434
|
+
color: var(--foreground);
|
|
434
435
|
}
|
|
435
436
|
.rte-root[data-variant="default"] .rte-controls-group > button:disabled {
|
|
436
437
|
opacity: 0.4;
|
|
437
438
|
cursor: not-allowed;
|
|
438
439
|
}
|
|
439
440
|
.rte-root[data-variant="default"] .rte-controls-group > button:focus-visible {
|
|
440
|
-
outline: 2px solid color-mix(in srgb, var(--
|
|
441
|
+
outline: 2px solid color-mix(in srgb, var(--ring) 50%, transparent);
|
|
441
442
|
outline-offset: 1px;
|
|
442
443
|
}
|
|
443
444
|
.rte-root[data-variant="default"] .rte-controls-group > button[data-state="on"],
|
|
444
445
|
.rte-root[data-variant="default"]
|
|
445
446
|
.rte-controls-group
|
|
446
447
|
> button[aria-pressed="true"] {
|
|
447
|
-
background-color: var(--
|
|
448
|
-
color: var(--
|
|
448
|
+
background-color: color-mix(in srgb, var(--foreground) 8%, transparent);
|
|
449
|
+
color: var(--foreground);
|
|
449
450
|
}
|
|
450
451
|
|
|
451
|
-
/* ── Subtle variant: elevated card with soft toolbar ── */
|
|
452
|
-
.rte-root[data-variant="subtle"] {
|
|
453
|
-
border-color: transparent;
|
|
454
|
-
box-shadow:
|
|
455
|
-
0 1px 3px rgba(0, 0, 0, 0.06),
|
|
456
|
-
0 1px 2px rgba(0, 0, 0, 0.04);
|
|
457
|
-
}
|
|
458
452
|
.rte-toolbar--subtle {
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
gap: 0.375rem;
|
|
462
|
-
background-color: var(--muted);
|
|
453
|
+
padding: 0.25rem 0.375rem;
|
|
454
|
+
gap: 0.25rem;
|
|
463
455
|
}
|
|
464
456
|
.rte-root[data-variant="subtle"] .rte-content .ProseMirror {
|
|
465
457
|
padding: 0.875rem;
|
|
@@ -490,34 +482,42 @@ button.rte-control-button:active {
|
|
|
490
482
|
color 150ms ease-out;
|
|
491
483
|
}
|
|
492
484
|
.rte-root[data-variant="subtle"] .rte-controls-group > button:hover {
|
|
493
|
-
background-color: var(--
|
|
494
|
-
color: var(--
|
|
485
|
+
background-color: var(--muted);
|
|
486
|
+
color: var(--foreground);
|
|
495
487
|
}
|
|
496
488
|
.rte-root[data-variant="subtle"] .rte-controls-group > button:focus-visible {
|
|
497
|
-
outline: 2px solid color-mix(in srgb, var(--
|
|
489
|
+
outline: 2px solid color-mix(in srgb, var(--ring) 50%, transparent);
|
|
498
490
|
outline-offset: 1px;
|
|
499
|
-
background-color: var(--accent);
|
|
500
|
-
color: var(--accent-foreground);
|
|
501
491
|
}
|
|
502
492
|
.rte-root[data-variant="subtle"] .rte-controls-group > button[data-state="on"],
|
|
503
493
|
.rte-root[data-variant="subtle"]
|
|
504
494
|
.rte-controls-group
|
|
505
495
|
> button[aria-pressed="true"] {
|
|
506
|
-
background-color:
|
|
507
|
-
color: var(--
|
|
508
|
-
box-shadow: inset 0 0 0 1px
|
|
509
|
-
color-mix(in srgb, var(--primary) 25%, transparent);
|
|
496
|
+
background-color: var(--muted);
|
|
497
|
+
color: var(--foreground);
|
|
510
498
|
}
|
|
511
499
|
|
|
512
500
|
/* ── Compact variant: inline fused toolbar-content ── */
|
|
513
|
-
|
|
514
|
-
|
|
501
|
+
@layer components {
|
|
502
|
+
.rte-root[data-variant="compact"] {
|
|
503
|
+
border-radius: var(--radius);
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
.rte-root[data-variant="compact"] .rte-toolbar,
|
|
507
|
+
.rte-root[data-variant="compact"] .rte-footer {
|
|
508
|
+
border-radius: 0;
|
|
509
|
+
}
|
|
510
|
+
.rte-root[data-variant="compact"] .rte-toolbar:first-child {
|
|
511
|
+
border-start-start-radius: calc(var(--radius) - 1px);
|
|
512
|
+
border-start-end-radius: calc(var(--radius) - 1px);
|
|
513
|
+
}
|
|
514
|
+
.rte-root[data-variant="compact"] .rte-footer:last-child {
|
|
515
|
+
border-end-start-radius: calc(var(--radius) - 1px);
|
|
516
|
+
border-end-end-radius: calc(var(--radius) - 1px);
|
|
515
517
|
}
|
|
516
518
|
.rte-toolbar--compact {
|
|
517
519
|
padding: 0.25rem 0.375rem;
|
|
518
|
-
gap: 0.
|
|
519
|
-
border-bottom: none;
|
|
520
|
-
background-color: var(--muted);
|
|
520
|
+
gap: 0.125rem;
|
|
521
521
|
}
|
|
522
522
|
.rte-root[data-variant="compact"] .rte-content .ProseMirror {
|
|
523
523
|
padding: 0.5rem 0.625rem;
|
|
@@ -539,9 +539,9 @@ button.rte-control-button:active {
|
|
|
539
539
|
}
|
|
540
540
|
.rte-root[data-variant="compact"] .rte-controls-group > button {
|
|
541
541
|
border: none;
|
|
542
|
-
border-radius: calc(var(--radius) -
|
|
543
|
-
min-width: 1.
|
|
544
|
-
height: 1.
|
|
542
|
+
border-radius: calc(var(--radius) - 4px);
|
|
543
|
+
min-width: 1.75rem;
|
|
544
|
+
height: 1.75rem;
|
|
545
545
|
background-color: transparent;
|
|
546
546
|
color: var(--muted-foreground);
|
|
547
547
|
transition:
|
|
@@ -549,23 +549,19 @@ button.rte-control-button:active {
|
|
|
549
549
|
color 150ms ease-out;
|
|
550
550
|
}
|
|
551
551
|
.rte-root[data-variant="compact"] .rte-controls-group > button:hover {
|
|
552
|
-
background-color: var(--
|
|
553
|
-
color: var(--
|
|
552
|
+
background-color: var(--muted);
|
|
553
|
+
color: var(--foreground);
|
|
554
554
|
}
|
|
555
555
|
.rte-root[data-variant="compact"] .rte-controls-group > button:focus-visible {
|
|
556
|
-
outline: 2px solid color-mix(in srgb, var(--
|
|
556
|
+
outline: 2px solid color-mix(in srgb, var(--ring) 50%, transparent);
|
|
557
557
|
outline-offset: 1px;
|
|
558
|
-
background-color: var(--accent);
|
|
559
|
-
color: var(--accent-foreground);
|
|
560
558
|
}
|
|
561
559
|
.rte-root[data-variant="compact"] .rte-controls-group > button[data-state="on"],
|
|
562
560
|
.rte-root[data-variant="compact"]
|
|
563
561
|
.rte-controls-group
|
|
564
562
|
> button[aria-pressed="true"] {
|
|
565
|
-
background-color:
|
|
566
|
-
color: var(--
|
|
567
|
-
box-shadow: inset 0 0 0 1px
|
|
568
|
-
color-mix(in srgb, var(--primary) 25%, transparent);
|
|
563
|
+
background-color: var(--muted);
|
|
564
|
+
color: var(--foreground);
|
|
569
565
|
}
|
|
570
566
|
.rte-root[data-variant="compact"] .rte-editor-icon {
|
|
571
567
|
height: 0.875rem;
|
|
@@ -578,6 +574,11 @@ button.rte-control-button:active {
|
|
|
578
574
|
align-items: center;
|
|
579
575
|
}
|
|
580
576
|
|
|
577
|
+
.rte-root .rte-controls-group:empty,
|
|
578
|
+
.rte-root[data-variant] .rte-controls-group:empty {
|
|
579
|
+
display: none;
|
|
580
|
+
}
|
|
581
|
+
|
|
581
582
|
.rte-link-editor {
|
|
582
583
|
display: flex;
|
|
583
584
|
align-items: center;
|
|
@@ -638,10 +639,10 @@ button.rte-control-button:active {
|
|
|
638
639
|
.rte-task-list input[type="checkbox"] {
|
|
639
640
|
cursor: pointer;
|
|
640
641
|
appearance: none;
|
|
641
|
-
width:
|
|
642
|
-
height:
|
|
643
|
-
border: 1px solid var(--border);
|
|
644
|
-
border-radius: calc(var(--radius) -
|
|
642
|
+
width: 16px;
|
|
643
|
+
height: 16px;
|
|
644
|
+
border: 1px solid var(--input, var(--border));
|
|
645
|
+
border-radius: calc(var(--radius) - 6px);
|
|
645
646
|
background-color: var(--background);
|
|
646
647
|
vertical-align: middle;
|
|
647
648
|
position: relative;
|
|
@@ -663,11 +664,11 @@ button.rte-control-button:active {
|
|
|
663
664
|
|
|
664
665
|
@keyframes checkmark-in {
|
|
665
666
|
0% {
|
|
666
|
-
transform: scale(0.
|
|
667
|
+
transform: scale(0.8);
|
|
667
668
|
opacity: 0;
|
|
668
669
|
}
|
|
669
670
|
100% {
|
|
670
|
-
transform: scale(1)
|
|
671
|
+
transform: scale(1);
|
|
671
672
|
opacity: 1;
|
|
672
673
|
}
|
|
673
674
|
}
|
|
@@ -676,11 +677,12 @@ button.rte-control-button:active {
|
|
|
676
677
|
position: absolute;
|
|
677
678
|
content: "";
|
|
678
679
|
inset: 0;
|
|
679
|
-
background-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
680
|
+
background-color: var(--primary-foreground);
|
|
681
|
+
mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAxMCA3Ij48cGF0aCBmaWxsPSIjZmZmIiBkPSJNNCA0LjU4NkwxLjcwNyAyLjI5M0ExIDEgMCAxMC4yOTMgMy43MDdsMyAzYS45OTcuOTk3IDAgMDAxLjQxNCAwbDUtNUExIDEgMCAxMDguMjkzLjI5M0w0IDQuNTg2eiIvPjwvc3ZnPg==");
|
|
682
|
+
mask-repeat: no-repeat;
|
|
683
|
+
mask-size: 9px;
|
|
684
|
+
mask-position: center;
|
|
685
|
+
animation: checkmark-in 150ms ease-out forwards;
|
|
684
686
|
}
|
|
685
687
|
|
|
686
688
|
/* ── Embed nodes ── */
|
|
@@ -708,10 +710,9 @@ button.rte-control-button:active {
|
|
|
708
710
|
}
|
|
709
711
|
|
|
710
712
|
.rte-embed-wrapper[data-selected] .rte-embed {
|
|
711
|
-
outline: 2px solid var(--
|
|
713
|
+
outline: 2px solid var(--ring);
|
|
712
714
|
outline-offset: 2px;
|
|
713
715
|
border-radius: var(--radius);
|
|
714
|
-
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
|
715
716
|
}
|
|
716
717
|
|
|
717
718
|
.rte-embed {
|
|
@@ -720,9 +721,7 @@ button.rte-control-button:active {
|
|
|
720
721
|
border-radius: var(--radius);
|
|
721
722
|
background: var(--muted);
|
|
722
723
|
display: inline-block;
|
|
723
|
-
transition:
|
|
724
|
-
outline-color 150ms ease-out,
|
|
725
|
-
box-shadow 150ms ease-out;
|
|
724
|
+
transition: outline-color 150ms ease-out;
|
|
726
725
|
}
|
|
727
726
|
|
|
728
727
|
.rte-embed-iframe {
|
|
@@ -760,15 +759,15 @@ button.rte-control-button:active {
|
|
|
760
759
|
z-index: 50;
|
|
761
760
|
display: flex;
|
|
762
761
|
align-items: center;
|
|
763
|
-
height: 2.
|
|
762
|
+
height: 2.5rem;
|
|
764
763
|
background: var(--popover);
|
|
765
|
-
border: 1px solid var(--border);
|
|
764
|
+
border: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
|
|
766
765
|
border-radius: var(--radius);
|
|
767
|
-
box-shadow: 0
|
|
768
|
-
padding: 0 0.
|
|
766
|
+
box-shadow: 0 8px 30px -12px rgb(0 0 0 / 0.15);
|
|
767
|
+
padding: 0 0.25rem;
|
|
769
768
|
gap: 0.25rem;
|
|
770
769
|
white-space: nowrap;
|
|
771
|
-
animation: rte-bubble-pop-in
|
|
770
|
+
animation: rte-bubble-pop-in 180ms ease-out forwards;
|
|
772
771
|
pointer-events: auto;
|
|
773
772
|
}
|
|
774
773
|
|
|
@@ -780,7 +779,7 @@ button.rte-control-button:active {
|
|
|
780
779
|
|
|
781
780
|
.rte-embed-selector-divider {
|
|
782
781
|
width: 1px;
|
|
783
|
-
height:
|
|
782
|
+
height: 1rem;
|
|
784
783
|
background: var(--border);
|
|
785
784
|
margin: 0 0.125rem;
|
|
786
785
|
flex-shrink: 0;
|
|
@@ -790,9 +789,9 @@ button.rte-control-button:active {
|
|
|
790
789
|
display: inline-flex;
|
|
791
790
|
align-items: center;
|
|
792
791
|
justify-content: center;
|
|
793
|
-
height:
|
|
794
|
-
min-width:
|
|
795
|
-
padding: 0 0.
|
|
792
|
+
height: 2rem;
|
|
793
|
+
min-width: 2rem;
|
|
794
|
+
padding: 0 0.5rem;
|
|
796
795
|
border: none;
|
|
797
796
|
border-radius: calc(var(--radius) - 4px);
|
|
798
797
|
background: transparent;
|
|
@@ -807,8 +806,13 @@ button.rte-control-button:active {
|
|
|
807
806
|
}
|
|
808
807
|
|
|
809
808
|
.rte-embed-selector-btn:hover {
|
|
810
|
-
background: var(--
|
|
811
|
-
color: var(--
|
|
809
|
+
background: var(--muted);
|
|
810
|
+
color: var(--foreground);
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
.rte-embed-selector-btn:focus-visible {
|
|
814
|
+
outline: 2px solid color-mix(in srgb, var(--ring) 50%, transparent);
|
|
815
|
+
outline-offset: -2px;
|
|
812
816
|
}
|
|
813
817
|
|
|
814
818
|
.rte-embed-selector-btn:active {
|
|
@@ -816,14 +820,14 @@ button.rte-control-button:active {
|
|
|
816
820
|
}
|
|
817
821
|
|
|
818
822
|
.rte-embed-selector-btn--active {
|
|
819
|
-
color: var(--
|
|
820
|
-
background:
|
|
823
|
+
color: var(--foreground);
|
|
824
|
+
background: var(--muted);
|
|
821
825
|
}
|
|
822
826
|
|
|
823
827
|
.rte-embed-selector-btn--preset {
|
|
824
|
-
font-weight:
|
|
825
|
-
font-size: 0.
|
|
826
|
-
|
|
828
|
+
font-weight: 500;
|
|
829
|
+
font-size: 0.75rem;
|
|
830
|
+
font-variant-numeric: tabular-nums;
|
|
827
831
|
}
|
|
828
832
|
|
|
829
833
|
.rte-embed-selector-btn--danger:hover {
|
|
@@ -837,7 +841,7 @@ button.rte-control-button:active {
|
|
|
837
841
|
padding: 0 0.5rem;
|
|
838
842
|
}
|
|
839
843
|
.rte-embed-selector-btn--save:hover {
|
|
840
|
-
background: color-mix(in srgb, var(--primary)
|
|
844
|
+
background: color-mix(in srgb, var(--primary) 85%, transparent);
|
|
841
845
|
color: var(--primary-foreground);
|
|
842
846
|
}
|
|
843
847
|
|
|
@@ -848,19 +852,23 @@ button.rte-control-button:active {
|
|
|
848
852
|
}
|
|
849
853
|
|
|
850
854
|
.rte-embed-selector-input {
|
|
851
|
-
height:
|
|
855
|
+
height: 2rem;
|
|
852
856
|
width: 220px;
|
|
853
|
-
padding: 0 0.
|
|
854
|
-
font-size: 0.
|
|
855
|
-
border-radius: calc(var(--radius) -
|
|
856
|
-
border: 1px solid var(--border);
|
|
857
|
+
padding: 0 0.625rem;
|
|
858
|
+
font-size: 0.8125rem;
|
|
859
|
+
border-radius: calc(var(--radius) - 2px);
|
|
860
|
+
border: 1px solid var(--input, var(--border));
|
|
857
861
|
background: var(--background);
|
|
858
862
|
color: var(--foreground);
|
|
859
863
|
outline: none;
|
|
864
|
+
transition:
|
|
865
|
+
border-color 150ms ease-out,
|
|
866
|
+
box-shadow 150ms ease-out;
|
|
860
867
|
}
|
|
861
868
|
|
|
862
869
|
.rte-embed-selector-input:focus {
|
|
863
|
-
border-color: var(--
|
|
870
|
+
border-color: var(--ring);
|
|
871
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 50%, transparent);
|
|
864
872
|
}
|
|
865
873
|
|
|
866
874
|
.rte-embed-resize-badge {
|
|
@@ -868,12 +876,13 @@ button.rte-control-button:active {
|
|
|
868
876
|
bottom: 8px;
|
|
869
877
|
right: 8px;
|
|
870
878
|
z-index: 40;
|
|
871
|
-
background:
|
|
872
|
-
color:
|
|
873
|
-
font-size: 0.
|
|
874
|
-
font-weight:
|
|
879
|
+
background: color-mix(in srgb, var(--foreground) 85%, transparent);
|
|
880
|
+
color: var(--background);
|
|
881
|
+
font-size: 0.75rem;
|
|
882
|
+
font-weight: 500;
|
|
883
|
+
font-variant-numeric: tabular-nums;
|
|
875
884
|
padding: 2px 6px;
|
|
876
|
-
border-radius: 4px;
|
|
885
|
+
border-radius: calc(var(--radius) - 4px);
|
|
877
886
|
pointer-events: none;
|
|
878
887
|
backdrop-filter: blur(4px);
|
|
879
888
|
font-family: var(--font-mono, monospace);
|
|
@@ -978,7 +987,7 @@ button.rte-control-button:active {
|
|
|
978
987
|
height: 12px;
|
|
979
988
|
background: var(--primary);
|
|
980
989
|
border: 2px solid var(--background);
|
|
981
|
-
border-radius:
|
|
990
|
+
border-radius: 3px;
|
|
982
991
|
transition: transform 150ms ease-out;
|
|
983
992
|
}
|
|
984
993
|
|
|
@@ -995,14 +1004,14 @@ button.rte-control-button:active {
|
|
|
995
1004
|
}
|
|
996
1005
|
|
|
997
1006
|
.rte-resize-handle--corner:hover {
|
|
998
|
-
transform: scale(1.
|
|
1007
|
+
transform: scale(1.1);
|
|
999
1008
|
}
|
|
1000
1009
|
|
|
1001
1010
|
/* ── Bubble Menu ── */
|
|
1002
1011
|
@keyframes rte-bubble-pop-in {
|
|
1003
1012
|
0% {
|
|
1004
1013
|
opacity: 0;
|
|
1005
|
-
transform: scale(0.98) translateY(
|
|
1014
|
+
transform: scale(0.98) translateY(4px);
|
|
1006
1015
|
}
|
|
1007
1016
|
100% {
|
|
1008
1017
|
opacity: 1;
|
|
@@ -1013,24 +1022,25 @@ button.rte-control-button:active {
|
|
|
1013
1022
|
.rte-bubble-menu {
|
|
1014
1023
|
display: flex;
|
|
1015
1024
|
align-items: center;
|
|
1016
|
-
height: 2.
|
|
1025
|
+
height: 2.5rem;
|
|
1017
1026
|
background: var(--popover);
|
|
1018
|
-
|
|
1027
|
+
color: var(--popover-foreground);
|
|
1028
|
+
border: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
|
|
1019
1029
|
border-radius: var(--radius);
|
|
1020
|
-
box-shadow: 0
|
|
1030
|
+
box-shadow: 0 8px 30px -12px rgb(0 0 0 / 0.15);
|
|
1021
1031
|
padding: 0 0.25rem;
|
|
1022
|
-
animation: rte-bubble-pop-in
|
|
1032
|
+
animation: rte-bubble-pop-in 180ms ease-out forwards;
|
|
1023
1033
|
}
|
|
1024
1034
|
|
|
1025
1035
|
.rte-bubble-group {
|
|
1026
1036
|
display: flex;
|
|
1027
1037
|
align-items: center;
|
|
1028
|
-
gap:
|
|
1038
|
+
gap: 2px;
|
|
1029
1039
|
}
|
|
1030
1040
|
|
|
1031
1041
|
.rte-bubble-separator {
|
|
1032
1042
|
width: 1px;
|
|
1033
|
-
height:
|
|
1043
|
+
height: 1rem;
|
|
1034
1044
|
background: var(--border);
|
|
1035
1045
|
margin: 0 0.125rem;
|
|
1036
1046
|
flex-shrink: 0;
|
|
@@ -1040,14 +1050,17 @@ button.rte-control-button:active {
|
|
|
1040
1050
|
display: flex;
|
|
1041
1051
|
align-items: center;
|
|
1042
1052
|
gap: 0.25rem;
|
|
1043
|
-
height:
|
|
1044
|
-
|
|
1053
|
+
height: 2rem;
|
|
1054
|
+
min-width: 2rem;
|
|
1055
|
+
justify-content: center;
|
|
1056
|
+
padding: 0 0.5rem;
|
|
1045
1057
|
border: none;
|
|
1046
|
-
border-radius: calc(var(--radius) -
|
|
1058
|
+
border-radius: calc(var(--radius) - 2px);
|
|
1047
1059
|
background: transparent;
|
|
1048
1060
|
color: var(--popover-foreground);
|
|
1049
1061
|
cursor: pointer;
|
|
1050
1062
|
font-size: 0.8125rem;
|
|
1063
|
+
font-weight: 500;
|
|
1051
1064
|
white-space: nowrap;
|
|
1052
1065
|
transition:
|
|
1053
1066
|
background-color 150ms ease-out,
|
|
@@ -1056,8 +1069,13 @@ button.rte-control-button:active {
|
|
|
1056
1069
|
}
|
|
1057
1070
|
|
|
1058
1071
|
.rte-bubble-btn:hover {
|
|
1059
|
-
background: var(--
|
|
1060
|
-
color: var(--
|
|
1072
|
+
background: var(--muted);
|
|
1073
|
+
color: var(--foreground);
|
|
1074
|
+
}
|
|
1075
|
+
|
|
1076
|
+
.rte-bubble-btn:focus-visible {
|
|
1077
|
+
outline: 2px solid color-mix(in srgb, var(--ring) 50%, transparent);
|
|
1078
|
+
outline-offset: -2px;
|
|
1061
1079
|
}
|
|
1062
1080
|
|
|
1063
1081
|
.rte-bubble-btn:active {
|
|
@@ -1065,8 +1083,8 @@ button.rte-control-button:active {
|
|
|
1065
1083
|
}
|
|
1066
1084
|
|
|
1067
1085
|
.rte-bubble-btn--active {
|
|
1068
|
-
color: var(--
|
|
1069
|
-
background: var(--
|
|
1086
|
+
color: var(--foreground);
|
|
1087
|
+
background: var(--muted);
|
|
1070
1088
|
}
|
|
1071
1089
|
|
|
1072
1090
|
.rte-bubble-btn-icon {
|
|
@@ -1100,15 +1118,16 @@ button.rte-control-button:active {
|
|
|
1100
1118
|
top: 100%;
|
|
1101
1119
|
left: 0;
|
|
1102
1120
|
z-index: 1000;
|
|
1103
|
-
min-width:
|
|
1121
|
+
min-width: 160px;
|
|
1104
1122
|
background: var(--popover);
|
|
1105
|
-
|
|
1123
|
+
color: var(--popover-foreground);
|
|
1124
|
+
border: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
|
|
1106
1125
|
border-radius: var(--radius);
|
|
1107
|
-
box-shadow: 0 8px
|
|
1126
|
+
box-shadow: 0 8px 30px -12px rgb(0 0 0 / 0.15);
|
|
1108
1127
|
padding: 0.25rem;
|
|
1109
|
-
margin-top:
|
|
1128
|
+
margin-top: 6px;
|
|
1110
1129
|
transform-origin: top left;
|
|
1111
|
-
animation: rte-bubble-pop-in
|
|
1130
|
+
animation: rte-bubble-pop-in 180ms ease-out forwards;
|
|
1112
1131
|
}
|
|
1113
1132
|
|
|
1114
1133
|
.rte-bubble-dropdown--language {
|
|
@@ -1126,7 +1145,8 @@ button.rte-control-button:active {
|
|
|
1126
1145
|
position: relative;
|
|
1127
1146
|
z-index: 1;
|
|
1128
1147
|
width: 100%;
|
|
1129
|
-
|
|
1148
|
+
height: 2rem;
|
|
1149
|
+
padding: 0 0.5rem;
|
|
1130
1150
|
font-size: 0.8125rem;
|
|
1131
1151
|
color: var(--muted-foreground);
|
|
1132
1152
|
background: transparent;
|
|
@@ -1134,9 +1154,10 @@ button.rte-control-button:active {
|
|
|
1134
1154
|
border-radius: calc(var(--radius) - 4px);
|
|
1135
1155
|
cursor: pointer;
|
|
1136
1156
|
text-align: left;
|
|
1157
|
+
outline: none;
|
|
1137
1158
|
transition:
|
|
1138
|
-
background-color
|
|
1139
|
-
color
|
|
1159
|
+
background-color 150ms ease-out,
|
|
1160
|
+
color 150ms ease-out;
|
|
1140
1161
|
}
|
|
1141
1162
|
|
|
1142
1163
|
.rte-bubble-dropdown-item:hover,
|
|
@@ -1151,13 +1172,13 @@ button.rte-control-button:active {
|
|
|
1151
1172
|
z-index: 0;
|
|
1152
1173
|
pointer-events: none;
|
|
1153
1174
|
border-radius: calc(var(--radius) - 4px);
|
|
1154
|
-
background:
|
|
1175
|
+
background: var(--muted);
|
|
1155
1176
|
opacity: 0;
|
|
1156
1177
|
transition:
|
|
1157
|
-
top
|
|
1158
|
-
left
|
|
1159
|
-
width
|
|
1160
|
-
height
|
|
1178
|
+
top 180ms ease-out,
|
|
1179
|
+
left 180ms ease-out,
|
|
1180
|
+
width 180ms ease-out,
|
|
1181
|
+
height 180ms ease-out,
|
|
1161
1182
|
opacity 150ms ease-out;
|
|
1162
1183
|
}
|
|
1163
1184
|
|
|
@@ -1166,8 +1187,9 @@ button.rte-control-button:active {
|
|
|
1166
1187
|
}
|
|
1167
1188
|
|
|
1168
1189
|
.rte-bubble-dropdown-item--active {
|
|
1169
|
-
color: var(--
|
|
1170
|
-
|
|
1190
|
+
color: var(--foreground);
|
|
1191
|
+
font-weight: 500;
|
|
1192
|
+
background-color: var(--muted);
|
|
1171
1193
|
}
|
|
1172
1194
|
|
|
1173
1195
|
.rte-bubble-dropdown-icon {
|
|
@@ -1185,14 +1207,15 @@ button.rte-control-button:active {
|
|
|
1185
1207
|
height: 100%;
|
|
1186
1208
|
}
|
|
1187
1209
|
|
|
1210
|
+
.rte-bubble-dropdown-item:hover .rte-bubble-dropdown-icon,
|
|
1188
1211
|
.rte-bubble-dropdown-item--active .rte-bubble-dropdown-icon {
|
|
1189
|
-
color: var(--
|
|
1212
|
+
color: var(--foreground);
|
|
1190
1213
|
}
|
|
1191
1214
|
|
|
1192
1215
|
.rte-bubble-dropdown-divider {
|
|
1193
1216
|
height: 1px;
|
|
1194
|
-
background: var(--border);
|
|
1195
|
-
margin: 0.25rem 0;
|
|
1217
|
+
background: color-mix(in srgb, var(--border) 60%, transparent);
|
|
1218
|
+
margin: 0.25rem -0.25rem;
|
|
1196
1219
|
}
|
|
1197
1220
|
|
|
1198
1221
|
.rte-bubble-dropdown--color {
|
|
@@ -1201,7 +1224,7 @@ button.rte-control-button:active {
|
|
|
1201
1224
|
}
|
|
1202
1225
|
|
|
1203
1226
|
.rte-bubble-dropdown--color .rte-bubble-dropdown-divider {
|
|
1204
|
-
margin: 0.
|
|
1227
|
+
margin: 0.625rem -0.5rem 0.5rem;
|
|
1205
1228
|
}
|
|
1206
1229
|
|
|
1207
1230
|
.rte-bubble-color-section {
|
|
@@ -1214,7 +1237,7 @@ button.rte-control-button:active {
|
|
|
1214
1237
|
padding: 0 0.125rem;
|
|
1215
1238
|
color: var(--muted-foreground);
|
|
1216
1239
|
font-size: 0.75rem;
|
|
1217
|
-
font-weight:
|
|
1240
|
+
font-weight: 500;
|
|
1218
1241
|
line-height: 1;
|
|
1219
1242
|
}
|
|
1220
1243
|
|
|
@@ -1239,19 +1262,16 @@ button.rte-control-button:active {
|
|
|
1239
1262
|
width: 1.5rem;
|
|
1240
1263
|
height: 1.5rem;
|
|
1241
1264
|
padding: 0;
|
|
1242
|
-
border-radius:
|
|
1265
|
+
border-radius: calc(var(--radius) - 4px);
|
|
1243
1266
|
border: 1px solid transparent;
|
|
1244
1267
|
cursor: pointer;
|
|
1245
1268
|
transition:
|
|
1246
|
-
transform
|
|
1247
|
-
|
|
1248
|
-
border-color 100ms ease-out,
|
|
1249
|
-
color 100ms ease-out,
|
|
1250
|
-
box-shadow 120ms ease-out;
|
|
1269
|
+
transform 150ms ease-out,
|
|
1270
|
+
opacity 150ms ease-out;
|
|
1251
1271
|
}
|
|
1252
1272
|
|
|
1253
1273
|
.rte-bubble-color-swatch:hover {
|
|
1254
|
-
|
|
1274
|
+
opacity: 0.85;
|
|
1255
1275
|
}
|
|
1256
1276
|
|
|
1257
1277
|
.rte-bubble-color-swatch:active {
|
|
@@ -1259,7 +1279,7 @@ button.rte-control-button:active {
|
|
|
1259
1279
|
}
|
|
1260
1280
|
|
|
1261
1281
|
.rte-bubble-color-swatch:focus-visible {
|
|
1262
|
-
outline: 2px solid var(--ring);
|
|
1282
|
+
outline: 2px solid color-mix(in srgb, var(--ring) 50%, transparent);
|
|
1263
1283
|
outline-offset: 1px;
|
|
1264
1284
|
}
|
|
1265
1285
|
|
|
@@ -1287,8 +1307,8 @@ button.rte-control-button:active {
|
|
|
1287
1307
|
}
|
|
1288
1308
|
|
|
1289
1309
|
.rte-bubble-color-glyph {
|
|
1290
|
-
font-size: 0.
|
|
1291
|
-
font-weight:
|
|
1310
|
+
font-size: 0.6875rem;
|
|
1311
|
+
font-weight: 600;
|
|
1292
1312
|
line-height: 1;
|
|
1293
1313
|
}
|
|
1294
1314
|
|
|
@@ -1312,3 +1332,13 @@ button.rte-control-button:active {
|
|
|
1312
1332
|
.rte-theme-transitioning *::after {
|
|
1313
1333
|
transition: none !important;
|
|
1314
1334
|
}
|
|
1335
|
+
|
|
1336
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1337
|
+
.rte-root *,
|
|
1338
|
+
.rte-bubble-menu,
|
|
1339
|
+
.rte-bubble-dropdown,
|
|
1340
|
+
.rte-embed-selector {
|
|
1341
|
+
animation-duration: 1ms !important;
|
|
1342
|
+
transition-duration: 1ms !important;
|
|
1343
|
+
}
|
|
1344
|
+
}
|