@editorcn/editor 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +457 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -1
- package/dist/index.d.ts +12 -1
- package/dist/index.js +452 -7
- package/dist/index.js.map +1 -1
- package/dist/style.css +375 -39
- package/package.json +63 -58
package/dist/style.css
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
/* ── Main Editor Wrapper ── */
|
|
1
2
|
.rte-root {
|
|
2
3
|
position: relative;
|
|
3
4
|
border-radius: var(--radius);
|
|
4
5
|
border: 1px solid var(--border);
|
|
5
6
|
background-color: var(--background);
|
|
7
|
+
transition:
|
|
8
|
+
border-color 150ms ease-out,
|
|
9
|
+
box-shadow 150ms ease-out;
|
|
6
10
|
}
|
|
7
11
|
|
|
8
12
|
.rte-editor-icon {
|
|
@@ -18,8 +22,17 @@ button.rte-control-button {
|
|
|
18
22
|
height: 2rem;
|
|
19
23
|
width: 2rem;
|
|
20
24
|
padding: 0;
|
|
25
|
+
transition:
|
|
26
|
+
background-color 150ms ease-out,
|
|
27
|
+
color 150ms ease-out,
|
|
28
|
+
transform 100ms ease-out;
|
|
21
29
|
}
|
|
22
30
|
|
|
31
|
+
button.rte-control-button:active {
|
|
32
|
+
transform: scale(0.96);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* ── Editor Content ── */
|
|
23
36
|
.rte-content .ProseMirror {
|
|
24
37
|
outline: 0;
|
|
25
38
|
padding: var(--spacing, 0.75rem);
|
|
@@ -37,6 +50,7 @@ button.rte-control-button {
|
|
|
37
50
|
float: left;
|
|
38
51
|
height: 0;
|
|
39
52
|
color: var(--muted-foreground);
|
|
53
|
+
transition: opacity 150ms ease-out;
|
|
40
54
|
}
|
|
41
55
|
|
|
42
56
|
.rte-content .ProseMirror p {
|
|
@@ -62,7 +76,6 @@ button.rte-control-button {
|
|
|
62
76
|
margin-bottom: 1rem;
|
|
63
77
|
margin-top: 1.5rem;
|
|
64
78
|
}
|
|
65
|
-
|
|
66
79
|
.rte-content .ProseMirror h1:first-child {
|
|
67
80
|
margin-top: 0;
|
|
68
81
|
}
|
|
@@ -74,7 +87,6 @@ button.rte-control-button {
|
|
|
74
87
|
margin-bottom: 0.75rem;
|
|
75
88
|
margin-top: 1.25rem;
|
|
76
89
|
}
|
|
77
|
-
|
|
78
90
|
.rte-content .ProseMirror h2:first-child {
|
|
79
91
|
margin-top: 0;
|
|
80
92
|
}
|
|
@@ -85,7 +97,6 @@ button.rte-control-button {
|
|
|
85
97
|
margin-bottom: 0.5rem;
|
|
86
98
|
margin-top: 1rem;
|
|
87
99
|
}
|
|
88
|
-
|
|
89
100
|
.rte-content .ProseMirror h3:first-child {
|
|
90
101
|
margin-top: 0;
|
|
91
102
|
}
|
|
@@ -96,7 +107,6 @@ button.rte-control-button {
|
|
|
96
107
|
margin-bottom: 0.5rem;
|
|
97
108
|
margin-top: 0.75rem;
|
|
98
109
|
}
|
|
99
|
-
|
|
100
110
|
.rte-content .ProseMirror h4:first-child {
|
|
101
111
|
margin-top: 0;
|
|
102
112
|
}
|
|
@@ -107,7 +117,6 @@ button.rte-control-button {
|
|
|
107
117
|
margin-bottom: 0.5rem;
|
|
108
118
|
margin-top: 0.75rem;
|
|
109
119
|
}
|
|
110
|
-
|
|
111
120
|
.rte-content .ProseMirror h5:first-child {
|
|
112
121
|
margin-top: 0;
|
|
113
122
|
}
|
|
@@ -118,7 +127,6 @@ button.rte-control-button {
|
|
|
118
127
|
margin-bottom: 0.5rem;
|
|
119
128
|
margin-top: 0.75rem;
|
|
120
129
|
}
|
|
121
|
-
|
|
122
130
|
.rte-content .ProseMirror h6:first-child {
|
|
123
131
|
margin-top: 0;
|
|
124
132
|
}
|
|
@@ -157,14 +165,11 @@ button.rte-control-button {
|
|
|
157
165
|
font-style: italic;
|
|
158
166
|
}
|
|
159
167
|
|
|
160
|
-
.rte-content .ProseMirror code {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
font-family: var(--font-mono);
|
|
166
|
-
font-size: 0.875em;
|
|
167
|
-
border: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
|
|
168
|
+
.rte-content .ProseMirror pre code {
|
|
169
|
+
color: inherit;
|
|
170
|
+
background: none;
|
|
171
|
+
padding: 0;
|
|
172
|
+
font-weight: 400;
|
|
168
173
|
}
|
|
169
174
|
|
|
170
175
|
.rte-content .ProseMirror pre {
|
|
@@ -200,19 +205,25 @@ button.rte-control-button {
|
|
|
200
205
|
text-decoration: underline;
|
|
201
206
|
text-underline-offset: 4px;
|
|
202
207
|
cursor: pointer;
|
|
208
|
+
transition:
|
|
209
|
+
color 150ms ease-out,
|
|
210
|
+
text-decoration-color 150ms ease-out;
|
|
211
|
+
text-decoration-color: color-mix(in srgb, var(--primary) 40%, transparent);
|
|
203
212
|
}
|
|
204
213
|
|
|
205
214
|
.rte-content .ProseMirror a:hover {
|
|
206
215
|
color: color-mix(in srgb, var(--primary) 80%, transparent);
|
|
216
|
+
text-decoration-color: color-mix(in srgb, var(--primary) 80%, transparent);
|
|
207
217
|
}
|
|
208
218
|
|
|
209
219
|
.rte-content .ProseMirror ::selection {
|
|
210
220
|
background-color: color-mix(in srgb, var(--primary) 15%, transparent);
|
|
211
221
|
}
|
|
212
222
|
|
|
223
|
+
/* Syntax Highlighting */
|
|
213
224
|
.rte-content .ProseMirror pre .hljs-comment,
|
|
214
225
|
.rte-content .ProseMirror pre .hljs-quote {
|
|
215
|
-
color:
|
|
226
|
+
color: #6c7086;
|
|
216
227
|
}
|
|
217
228
|
|
|
218
229
|
.rte-content .ProseMirror pre .hljs-variable,
|
|
@@ -224,7 +235,7 @@ button.rte-control-button {
|
|
|
224
235
|
.rte-content .ProseMirror pre .hljs-name,
|
|
225
236
|
.rte-content .ProseMirror pre .hljs-selector-id,
|
|
226
237
|
.rte-content .ProseMirror pre .hljs-selector-class {
|
|
227
|
-
color:
|
|
238
|
+
color: #89b4fa;
|
|
228
239
|
}
|
|
229
240
|
|
|
230
241
|
.rte-content .ProseMirror pre .hljs-number,
|
|
@@ -234,33 +245,86 @@ button.rte-control-button {
|
|
|
234
245
|
.rte-content .ProseMirror pre .hljs-literal,
|
|
235
246
|
.rte-content .ProseMirror pre .hljs-type,
|
|
236
247
|
.rte-content .ProseMirror pre .hljs-params {
|
|
237
|
-
color:
|
|
248
|
+
color: #fab387;
|
|
238
249
|
}
|
|
239
250
|
|
|
240
251
|
.rte-content .ProseMirror pre .hljs-string,
|
|
241
252
|
.rte-content .ProseMirror pre .hljs-symbol,
|
|
242
253
|
.rte-content .ProseMirror pre .hljs-bullet {
|
|
243
|
-
color:
|
|
254
|
+
color: #a6e3a1;
|
|
244
255
|
}
|
|
245
256
|
|
|
246
257
|
.rte-content .ProseMirror pre .hljs-title,
|
|
247
258
|
.rte-content .ProseMirror pre .hljs-section {
|
|
248
|
-
color:
|
|
259
|
+
color: #f9e2af;
|
|
249
260
|
}
|
|
250
261
|
|
|
251
262
|
.rte-content .ProseMirror pre .hljs-keyword,
|
|
252
263
|
.rte-content .ProseMirror pre .hljs-selector-tag {
|
|
253
|
-
color:
|
|
264
|
+
color: #cba6f7;
|
|
254
265
|
}
|
|
255
266
|
|
|
256
|
-
|
|
267
|
+
/* Object/JSON keys & HTML/XML attribute names (previously missing) */
|
|
268
|
+
.rte-content .ProseMirror pre .hljs-attr {
|
|
269
|
+
color: #89b4fa;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/* JSDoc-style tags, e.g. @param, @returns */
|
|
273
|
+
.rte-content .ProseMirror pre .hljs-doctag {
|
|
274
|
+
color: #f38ba8;
|
|
275
|
+
font-weight: 600;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/* Operators & punctuation (finer-grained grammars) */
|
|
279
|
+
.rte-content .ProseMirror pre .hljs-operator,
|
|
280
|
+
.rte-content .ProseMirror pre .hljs-punctuation {
|
|
281
|
+
color: #9399b2;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
/* CSS selector attributes/pseudo-classes, e.g. [type="text"], :hover */
|
|
285
|
+
.rte-content .ProseMirror pre .hljs-selector-attr,
|
|
286
|
+
.rte-content .ProseMirror pre .hljs-selector-pseudo {
|
|
287
|
+
color: #94e2d5;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/* Language-level variables, e.g. this, super */
|
|
291
|
+
.rte-content .ProseMirror pre .hljs-variable.language_ {
|
|
292
|
+
color: #cba6f7;
|
|
257
293
|
font-style: italic;
|
|
258
294
|
}
|
|
259
295
|
|
|
296
|
+
/* Template literal substitutions, e.g. ${...} */
|
|
297
|
+
.rte-content .ProseMirror pre .hljs-subst {
|
|
298
|
+
color: #cdd6f4;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.rte-content .ProseMirror pre .hljs-emphasis {
|
|
302
|
+
font-style: italic;
|
|
303
|
+
}
|
|
260
304
|
.rte-content .ProseMirror pre .hljs-strong {
|
|
261
305
|
font-weight: 700;
|
|
262
306
|
}
|
|
263
307
|
|
|
308
|
+
.rte-content .ProseMirror pre .hljs-addition {
|
|
309
|
+
color: #a6e3a1;
|
|
310
|
+
background-color: color-mix(in srgb, #a6e3a1 10%, transparent);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.rte-content .ProseMirror pre .hljs-deletion {
|
|
314
|
+
color: #f38ba8;
|
|
315
|
+
background-color: color-mix(in srgb, #f38ba8 10%, transparent);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.rte-content .ProseMirror code {
|
|
319
|
+
font-size: 0.875em;
|
|
320
|
+
font-weight: 500;
|
|
321
|
+
background: color-mix(in srgb, var(--muted) 70%, transparent);
|
|
322
|
+
padding: 0.125rem 0.375rem;
|
|
323
|
+
border-radius: calc(var(--radius) - 4px);
|
|
324
|
+
transition: background-color 150ms ease-out;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/* ── Toolbars and Footer ── */
|
|
264
328
|
.rte-toolbar {
|
|
265
329
|
display: flex;
|
|
266
330
|
align-items: center;
|
|
@@ -274,10 +338,26 @@ button.rte-control-button {
|
|
|
274
338
|
border-start-start-radius: var(--radius);
|
|
275
339
|
border-bottom: 1px solid var(--border);
|
|
276
340
|
padding: 0.5rem 0.75rem;
|
|
341
|
+
transition:
|
|
342
|
+
box-shadow 150ms ease-out,
|
|
343
|
+
background-color 150ms ease-out;
|
|
277
344
|
}
|
|
278
345
|
|
|
279
346
|
.rte-toolbar[data-sticky] {
|
|
280
347
|
position: sticky;
|
|
348
|
+
background-color: color-mix(in srgb, var(--background) 85%, transparent);
|
|
349
|
+
backdrop-filter: blur(8px);
|
|
350
|
+
box-shadow:
|
|
351
|
+
0px 0px 0px 1px oklch(0 0 0 / 0.04),
|
|
352
|
+
0px 4px 12px 0px oklch(0 0 0 / 0.05);
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
@media (prefers-color-scheme: dark) {
|
|
356
|
+
.rte-toolbar[data-sticky] {
|
|
357
|
+
box-shadow:
|
|
358
|
+
0px 0px 0px 1px oklch(1 0 0 / 0.06),
|
|
359
|
+
0px 4px 12px 0px oklch(0 0 0 / 0.3);
|
|
360
|
+
}
|
|
281
361
|
}
|
|
282
362
|
|
|
283
363
|
.rte-footer {
|
|
@@ -298,6 +378,20 @@ button.rte-control-button {
|
|
|
298
378
|
|
|
299
379
|
.rte-footer[data-sticky] {
|
|
300
380
|
position: sticky;
|
|
381
|
+
bottom: 0;
|
|
382
|
+
background-color: color-mix(in srgb, var(--background) 85%, transparent);
|
|
383
|
+
backdrop-filter: blur(8px);
|
|
384
|
+
box-shadow:
|
|
385
|
+
0px 0px 0px 1px oklch(0 0 0 / 0.04),
|
|
386
|
+
0px -4px 12px 0px oklch(0 0 0 / 0.05);
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
@media (prefers-color-scheme: dark) {
|
|
390
|
+
.rte-footer[data-sticky] {
|
|
391
|
+
box-shadow:
|
|
392
|
+
0px 0px 0px 1px oklch(1 0 0 / 0.06),
|
|
393
|
+
0px -4px 12px 0px oklch(0 0 0 / 0.3);
|
|
394
|
+
}
|
|
301
395
|
}
|
|
302
396
|
|
|
303
397
|
.rte-footer-word-count {
|
|
@@ -307,7 +401,6 @@ button.rte-control-button {
|
|
|
307
401
|
.rte-toolbar--subtle + .rte-content + .rte-footer {
|
|
308
402
|
background-color: var(--muted);
|
|
309
403
|
}
|
|
310
|
-
|
|
311
404
|
.rte-toolbar--compact + .rte-content + .rte-footer {
|
|
312
405
|
background-color: var(--muted);
|
|
313
406
|
}
|
|
@@ -320,6 +413,7 @@ button.rte-control-button {
|
|
|
320
413
|
scrollbar-width: none;
|
|
321
414
|
-ms-overflow-style: none;
|
|
322
415
|
-webkit-overflow-scrolling: touch;
|
|
416
|
+
mask-image: linear-gradient(to right, black 95%, transparent 100%);
|
|
323
417
|
}
|
|
324
418
|
.rte-toolbar::-webkit-scrollbar {
|
|
325
419
|
display: none;
|
|
@@ -337,8 +431,11 @@ button.rte-control-button {
|
|
|
337
431
|
min-width: 1.625rem;
|
|
338
432
|
height: 1.625rem;
|
|
339
433
|
background-color: var(--background);
|
|
434
|
+
transition: background-color 150ms ease-out, color 150ms ease-out, box-shadow 150ms ease-out;
|
|
340
435
|
}
|
|
341
|
-
.rte-root[data-variant="default"]
|
|
436
|
+
.rte-root[data-variant="default"]
|
|
437
|
+
.rte-controls-group
|
|
438
|
+
> button:not(:last-of-type) {
|
|
342
439
|
border-inline-end-width: 0;
|
|
343
440
|
}
|
|
344
441
|
.rte-root[data-variant="default"] .rte-controls-group > button:first-of-type {
|
|
@@ -354,15 +451,20 @@ button.rte-control-button {
|
|
|
354
451
|
color: var(--accent-foreground);
|
|
355
452
|
}
|
|
356
453
|
.rte-root[data-variant="default"] .rte-controls-group > button[data-state="on"],
|
|
357
|
-
.rte-root[data-variant="default"]
|
|
454
|
+
.rte-root[data-variant="default"]
|
|
455
|
+
.rte-controls-group
|
|
456
|
+
> button[aria-pressed="true"] {
|
|
358
457
|
background-color: var(--accent);
|
|
359
458
|
color: var(--accent-foreground);
|
|
459
|
+
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04);
|
|
360
460
|
}
|
|
361
461
|
|
|
362
462
|
/* ── Subtle variant: elevated card with soft toolbar ── */
|
|
363
463
|
.rte-root[data-variant="subtle"] {
|
|
364
464
|
border-color: transparent;
|
|
365
|
-
box-shadow:
|
|
465
|
+
box-shadow:
|
|
466
|
+
0 1px 3px rgba(0, 0, 0, 0.06),
|
|
467
|
+
0 1px 2px rgba(0, 0, 0, 0.04);
|
|
366
468
|
}
|
|
367
469
|
.rte-toolbar--subtle {
|
|
368
470
|
border-bottom: 1px solid var(--border);
|
|
@@ -383,14 +485,17 @@ button.rte-control-button {
|
|
|
383
485
|
min-width: 2rem;
|
|
384
486
|
height: 2rem;
|
|
385
487
|
background-color: transparent;
|
|
488
|
+
transition: background-color 150ms ease-out, color 150ms ease-out;
|
|
386
489
|
}
|
|
387
490
|
.rte-root[data-variant="subtle"] .rte-controls-group > button:hover {
|
|
388
491
|
background-color: var(--accent);
|
|
389
492
|
color: var(--accent-foreground);
|
|
390
493
|
}
|
|
391
494
|
.rte-root[data-variant="subtle"] .rte-controls-group > button[data-state="on"],
|
|
392
|
-
.rte-root[data-variant="subtle"]
|
|
393
|
-
|
|
495
|
+
.rte-root[data-variant="subtle"]
|
|
496
|
+
.rte-controls-group
|
|
497
|
+
> button[aria-pressed="true"] {
|
|
498
|
+
background-color: color-mix(in srgb, var(--accent) 90%, black 5%);
|
|
394
499
|
color: var(--accent-foreground);
|
|
395
500
|
}
|
|
396
501
|
|
|
@@ -418,13 +523,16 @@ button.rte-control-button {
|
|
|
418
523
|
min-width: 1.5rem;
|
|
419
524
|
height: 1.5rem;
|
|
420
525
|
background-color: transparent;
|
|
526
|
+
transition: background-color 150ms ease-out, color 150ms ease-out;
|
|
421
527
|
}
|
|
422
528
|
.rte-root[data-variant="compact"] .rte-controls-group > button:hover {
|
|
423
529
|
background-color: var(--accent);
|
|
424
530
|
color: var(--accent-foreground);
|
|
425
531
|
}
|
|
426
532
|
.rte-root[data-variant="compact"] .rte-controls-group > button[data-state="on"],
|
|
427
|
-
.rte-root[data-variant="compact"]
|
|
533
|
+
.rte-root[data-variant="compact"]
|
|
534
|
+
.rte-controls-group
|
|
535
|
+
> button[aria-pressed="true"] {
|
|
428
536
|
background-color: var(--accent);
|
|
429
537
|
color: var(--accent-foreground);
|
|
430
538
|
}
|
|
@@ -455,6 +563,7 @@ button.rte-control-button {
|
|
|
455
563
|
border-end-start-radius: 0;
|
|
456
564
|
}
|
|
457
565
|
|
|
566
|
+
/* ── Task Lists ── */
|
|
458
567
|
.rte-task-list {
|
|
459
568
|
list-style-type: none;
|
|
460
569
|
padding: 0;
|
|
@@ -467,6 +576,11 @@ button.rte-control-button {
|
|
|
467
576
|
display: flex;
|
|
468
577
|
align-items: flex-start;
|
|
469
578
|
gap: 0.5rem;
|
|
579
|
+
transition: opacity 150ms ease-out;
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
.rte-task-list li[data-checked] {
|
|
583
|
+
opacity: 0.6;
|
|
470
584
|
}
|
|
471
585
|
|
|
472
586
|
.rte-task-list li[data-checked] > div {
|
|
@@ -500,6 +614,14 @@ button.rte-control-button {
|
|
|
500
614
|
vertical-align: middle;
|
|
501
615
|
position: relative;
|
|
502
616
|
flex-shrink: 0;
|
|
617
|
+
transition:
|
|
618
|
+
background-color 150ms ease-out,
|
|
619
|
+
border-color 150ms ease-out,
|
|
620
|
+
transform 100ms ease-out;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
.rte-task-list input[type="checkbox"]:active {
|
|
624
|
+
transform: scale(0.96);
|
|
503
625
|
}
|
|
504
626
|
|
|
505
627
|
.rte-task-list input[type="checkbox"]:checked {
|
|
@@ -507,20 +629,42 @@ button.rte-control-button {
|
|
|
507
629
|
border-color: var(--primary);
|
|
508
630
|
}
|
|
509
631
|
|
|
632
|
+
@keyframes checkmark-in {
|
|
633
|
+
0% {
|
|
634
|
+
transform: scale(0.5) rotate(-15deg);
|
|
635
|
+
opacity: 0;
|
|
636
|
+
}
|
|
637
|
+
100% {
|
|
638
|
+
transform: scale(1) rotate(0);
|
|
639
|
+
opacity: 1;
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
.rte-task-list input[type="checkbox"]:checked::before {
|
|
644
|
+
position: absolute;
|
|
645
|
+
content: "";
|
|
646
|
+
inset: 0;
|
|
647
|
+
background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCAxMCA3Ij48cGF0aCBmaWxsPSIjZmZmIiBkPSJNNCA0LjU4NkwxLjcwNyAyLjI5M0ExIDEgMCAxMC4yOTMgMy43MDdsMyAzYS45OTcuOTk3IDAgMDAxLjQxNCAwbDUtNUExIDEgMCAxMDguMjkzLjI5M0w0IDQuNTg2eiIvPjwvc3ZnPg==");
|
|
648
|
+
background-repeat: no-repeat;
|
|
649
|
+
background-size: 10px;
|
|
650
|
+
background-position: center;
|
|
651
|
+
animation: checkmark-in 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
|
|
652
|
+
}
|
|
653
|
+
|
|
510
654
|
/* ── Embed nodes ── */
|
|
511
655
|
.rte-embed-wrapper {
|
|
512
656
|
margin: 1rem 0;
|
|
513
|
-
transition:
|
|
657
|
+
transition:
|
|
658
|
+
opacity 150ms ease-out,
|
|
659
|
+
transform 150ms ease-out;
|
|
514
660
|
}
|
|
515
661
|
|
|
516
662
|
.rte-embed-wrapper[data-align="left"] {
|
|
517
663
|
text-align: left;
|
|
518
664
|
}
|
|
519
|
-
|
|
520
665
|
.rte-embed-wrapper[data-align="center"] {
|
|
521
666
|
text-align: center;
|
|
522
667
|
}
|
|
523
|
-
|
|
524
668
|
.rte-embed-wrapper[data-align="right"] {
|
|
525
669
|
text-align: right;
|
|
526
670
|
}
|
|
@@ -529,6 +673,7 @@ button.rte-control-button {
|
|
|
529
673
|
outline: 2px solid var(--primary);
|
|
530
674
|
outline-offset: 2px;
|
|
531
675
|
border-radius: var(--radius);
|
|
676
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
|
532
677
|
}
|
|
533
678
|
|
|
534
679
|
.rte-embed {
|
|
@@ -537,6 +682,9 @@ button.rte-control-button {
|
|
|
537
682
|
border-radius: var(--radius);
|
|
538
683
|
background: var(--muted);
|
|
539
684
|
display: inline-block;
|
|
685
|
+
transition:
|
|
686
|
+
outline-color 150ms ease-out,
|
|
687
|
+
box-shadow 150ms ease-out;
|
|
540
688
|
}
|
|
541
689
|
|
|
542
690
|
.rte-embed-iframe {
|
|
@@ -551,6 +699,17 @@ button.rte-control-button {
|
|
|
551
699
|
padding: 2rem;
|
|
552
700
|
text-align: center;
|
|
553
701
|
color: var(--muted-foreground);
|
|
702
|
+
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
@keyframes pulse {
|
|
706
|
+
0%,
|
|
707
|
+
100% {
|
|
708
|
+
opacity: 1;
|
|
709
|
+
}
|
|
710
|
+
50% {
|
|
711
|
+
opacity: 0.5;
|
|
712
|
+
}
|
|
554
713
|
}
|
|
555
714
|
|
|
556
715
|
/* ── Resize handles for embeds ── */
|
|
@@ -558,7 +717,9 @@ button.rte-control-button {
|
|
|
558
717
|
position: absolute;
|
|
559
718
|
z-index: 10;
|
|
560
719
|
opacity: 0;
|
|
561
|
-
transition:
|
|
720
|
+
transition:
|
|
721
|
+
opacity 150ms ease-out,
|
|
722
|
+
background-color 150ms ease-out;
|
|
562
723
|
}
|
|
563
724
|
|
|
564
725
|
.rte-embed-wrapper[data-selected] .rte-resize-handle {
|
|
@@ -581,6 +742,14 @@ button.rte-control-button {
|
|
|
581
742
|
width: 2px;
|
|
582
743
|
background: var(--primary);
|
|
583
744
|
border-radius: 1px;
|
|
745
|
+
transition:
|
|
746
|
+
width 150ms ease-out,
|
|
747
|
+
inset 150ms ease-out;
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
.rte-resize-handle--right:hover::after {
|
|
751
|
+
width: 4px;
|
|
752
|
+
inset: 4px 0;
|
|
584
753
|
}
|
|
585
754
|
|
|
586
755
|
.rte-resize-handle--bottom {
|
|
@@ -601,6 +770,14 @@ button.rte-control-button {
|
|
|
601
770
|
background: var(--primary);
|
|
602
771
|
border-radius: 1px;
|
|
603
772
|
bottom: 1px;
|
|
773
|
+
transition:
|
|
774
|
+
height 150ms ease-out,
|
|
775
|
+
bottom 150ms ease-out;
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
.rte-resize-handle--bottom:hover::after {
|
|
779
|
+
height: 4px;
|
|
780
|
+
bottom: 0;
|
|
604
781
|
}
|
|
605
782
|
|
|
606
783
|
.rte-resize-handle--corner {
|
|
@@ -612,14 +789,173 @@ button.rte-control-button {
|
|
|
612
789
|
background: var(--primary);
|
|
613
790
|
border: 2px solid var(--background);
|
|
614
791
|
border-radius: 2px;
|
|
792
|
+
transition: transform 150ms ease-out;
|
|
615
793
|
}
|
|
616
794
|
|
|
617
|
-
.rte-
|
|
618
|
-
|
|
619
|
-
|
|
795
|
+
.rte-resize-handle--corner:hover {
|
|
796
|
+
transform: scale(1.15);
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
/* ── Bubble Menu ── */
|
|
800
|
+
@keyframes rte-bubble-pop-in {
|
|
801
|
+
0% { opacity: 0; transform: scale(0.96) translateY(4px); }
|
|
802
|
+
100% { opacity: 1; transform: scale(1) translateY(0); }
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
.rte-bubble-menu {
|
|
806
|
+
display: flex;
|
|
807
|
+
align-items: center;
|
|
808
|
+
height: 2.25rem;
|
|
809
|
+
background: var(--popover);
|
|
810
|
+
border: 1px solid var(--border);
|
|
811
|
+
border-radius: var(--radius);
|
|
812
|
+
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
|
|
813
|
+
padding: 0 0.25rem;
|
|
814
|
+
animation: rte-bubble-pop-in 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
.rte-bubble-group {
|
|
818
|
+
display: flex;
|
|
819
|
+
align-items: center;
|
|
820
|
+
gap: 1px;
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
.rte-bubble-separator {
|
|
824
|
+
width: 1px;
|
|
825
|
+
height: 1.25rem;
|
|
826
|
+
background: var(--border);
|
|
827
|
+
margin: 0 0.125rem;
|
|
828
|
+
flex-shrink: 0;
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
.rte-bubble-btn {
|
|
832
|
+
display: flex;
|
|
833
|
+
align-items: center;
|
|
834
|
+
gap: 0.25rem;
|
|
835
|
+
height: 1.75rem;
|
|
836
|
+
padding: 0 0.375rem;
|
|
837
|
+
border: none;
|
|
838
|
+
border-radius: calc(var(--radius) - 4px);
|
|
839
|
+
background: transparent;
|
|
840
|
+
color: var(--popover-foreground);
|
|
841
|
+
cursor: pointer;
|
|
842
|
+
font-size: 0.8125rem;
|
|
843
|
+
white-space: nowrap;
|
|
844
|
+
transition: background-color 150ms ease-out, color 150ms ease-out, transform 100ms ease-out;
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
.rte-bubble-btn:hover {
|
|
848
|
+
background: var(--accent);
|
|
849
|
+
color: var(--accent-foreground);
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
.rte-bubble-btn:active {
|
|
853
|
+
transform: scale(0.96);
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
.rte-bubble-btn--active {
|
|
857
|
+
color: var(--primary);
|
|
858
|
+
background: var(--accent);
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
.rte-bubble-btn-icon {
|
|
862
|
+
display: flex;
|
|
863
|
+
align-items: center;
|
|
864
|
+
justify-content: center;
|
|
865
|
+
flex-shrink: 0;
|
|
866
|
+
width: 1rem;
|
|
867
|
+
height: 1rem;
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
.rte-bubble-btn-icon svg {
|
|
871
|
+
width: 100%;
|
|
872
|
+
height: 100%;
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
.rte-bubble-btn-text {
|
|
876
|
+
max-width: 5rem;
|
|
877
|
+
overflow: hidden;
|
|
878
|
+
text-overflow: ellipsis;
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
.rte-bubble-overlay {
|
|
882
|
+
position: fixed;
|
|
620
883
|
inset: 0;
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
884
|
+
z-index: 999;
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
.rte-bubble-dropdown {
|
|
888
|
+
position: absolute;
|
|
889
|
+
top: 100%;
|
|
890
|
+
left: 0;
|
|
891
|
+
z-index: 1000;
|
|
892
|
+
min-width: 150px;
|
|
893
|
+
background: var(--popover);
|
|
894
|
+
border: 1px solid var(--border);
|
|
895
|
+
border-radius: var(--radius);
|
|
896
|
+
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
|
|
897
|
+
padding: 0.25rem;
|
|
898
|
+
margin-top: 4px;
|
|
899
|
+
transform-origin: top left;
|
|
900
|
+
animation: rte-bubble-pop-in 0.15s cubic-bezier(0.16, 1, 0.3, 1) forwards;
|
|
901
|
+
}
|
|
902
|
+
|
|
903
|
+
.rte-bubble-dropdown--language {
|
|
904
|
+
min-width: 160px;
|
|
905
|
+
max-height: 320px;
|
|
906
|
+
overflow-y: auto;
|
|
907
|
+
scrollbar-width: thin;
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
.rte-bubble-dropdown-item {
|
|
911
|
+
display: flex;
|
|
912
|
+
align-items: center;
|
|
913
|
+
justify-content:flex-start;
|
|
914
|
+
gap: 0.5rem;
|
|
915
|
+
width: 100%;
|
|
916
|
+
padding: 0.375rem 0.5rem;
|
|
917
|
+
font-size: 0.8125rem;
|
|
918
|
+
color: var(--popover-foreground);
|
|
919
|
+
background: transparent;
|
|
920
|
+
border: none;
|
|
921
|
+
border-radius: calc(var(--radius) - 4px);
|
|
922
|
+
cursor: pointer;
|
|
923
|
+
text-align: left;
|
|
924
|
+
transition: background-color 100ms ease-out, color 100ms ease-out;
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
.rte-bubble-dropdown-item:hover {
|
|
928
|
+
background: var(--accent);
|
|
929
|
+
color: var(--accent-foreground);
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
.rte-bubble-dropdown-item--active {
|
|
933
|
+
color: var(--primary);
|
|
934
|
+
background-color: color-mix(in srgb, var(--primary) 10%, transparent);
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
.rte-bubble-dropdown-icon {
|
|
938
|
+
display: flex;
|
|
939
|
+
align-items: center;
|
|
940
|
+
justify-content: center;
|
|
941
|
+
flex-shrink: 0;
|
|
942
|
+
color: var(--muted-foreground);
|
|
943
|
+
width: 1rem;
|
|
944
|
+
height: 1rem;
|
|
625
945
|
}
|
|
946
|
+
|
|
947
|
+
.rte-bubble-dropdown-icon svg {
|
|
948
|
+
width: 100%;
|
|
949
|
+
height: 100%;
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
.rte-bubble-dropdown-item--active .rte-bubble-dropdown-icon {
|
|
953
|
+
color: var(--primary);
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
/* ── Suppress transitions on theme switch ── */
|
|
957
|
+
.rte-theme-transitioning *,
|
|
958
|
+
.rte-theme-transitioning *::before,
|
|
959
|
+
.rte-theme-transitioning *::after {
|
|
960
|
+
transition: none !important;
|
|
961
|
+
}
|