@37signals/lexxy 0.7.6-beta → 0.8.2-beta
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 +7 -1
- package/dist/lexxy.esm.js +3178 -1703
- package/dist/lexxy_helpers.esm.js +10 -1
- package/dist/stylesheets/lexxy-content.css +177 -140
- package/dist/stylesheets/lexxy-editor.css +404 -201
- package/package.json +28 -17
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
@supports (min-block-size: attr(rows lh)) {
|
|
7
7
|
--lexxy-editor-rows: attr(rows lh, 8lh);
|
|
8
8
|
}
|
|
9
|
-
|
|
10
9
|
--lexxy-toolbar-gap: 2px;
|
|
11
10
|
--lexxy-toolbar-spacing: 0.5ch;
|
|
12
11
|
|
|
@@ -35,7 +34,7 @@
|
|
|
35
34
|
outline-offset: var(--lexxy-focus-ring-offset);
|
|
36
35
|
}
|
|
37
36
|
}
|
|
38
|
-
|
|
37
|
+
|
|
39
38
|
summary {
|
|
40
39
|
list-style: none;
|
|
41
40
|
|
|
@@ -65,19 +64,19 @@
|
|
|
65
64
|
}
|
|
66
65
|
|
|
67
66
|
.node--selected {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
outline: var(--lexxy-focus-ring-size) solid var(--lexxy-focus-ring-color);
|
|
71
|
-
outline-offset: var(--lexxy-focus-ring-offset);
|
|
72
|
-
}
|
|
67
|
+
outline: var(--lexxy-focus-ring-size) solid var(--lexxy-focus-ring-color);
|
|
68
|
+
outline-offset: var(--lexxy-focus-ring-offset);
|
|
73
69
|
}
|
|
74
70
|
|
|
71
|
+
/* Tables */
|
|
72
|
+
/* ------------------------------------------------------------------------ */
|
|
73
|
+
|
|
75
74
|
table {
|
|
76
75
|
th, td {
|
|
77
76
|
position: relative;
|
|
78
77
|
transition: all 0.1s ease-in-out;
|
|
79
78
|
|
|
80
|
-
/* Used for column and row adding
|
|
79
|
+
/* Used for column and row adding visualizations */
|
|
81
80
|
&:after {
|
|
82
81
|
box-shadow: 0 0 0 0 transparent, 0 0 0 0 transparent inset;
|
|
83
82
|
content: "";
|
|
@@ -145,7 +144,7 @@
|
|
|
145
144
|
}
|
|
146
145
|
&[data-action="toggle"] {
|
|
147
146
|
background-color: var(--lexxy-color-table-cell-toggle);
|
|
148
|
-
|
|
147
|
+
|
|
149
148
|
&:after { box-shadow: 0 0 0 0 transparent; }
|
|
150
149
|
}
|
|
151
150
|
}
|
|
@@ -173,14 +172,122 @@
|
|
|
173
172
|
}
|
|
174
173
|
}
|
|
175
174
|
|
|
175
|
+
[data-lexical-linebreak] {
|
|
176
|
+
block-size: 0;
|
|
177
|
+
display: contents;
|
|
178
|
+
inline-size: 0;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/* Attachments */
|
|
182
|
+
/* ------------------------------------------------------------------------ */
|
|
183
|
+
|
|
176
184
|
action-text-attachment {
|
|
177
185
|
cursor: pointer;
|
|
178
186
|
}
|
|
187
|
+
|
|
188
|
+
.attachment {
|
|
189
|
+
progress {
|
|
190
|
+
max-inline-size: 10ch;
|
|
191
|
+
margin: auto;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
&.attachment--preview {
|
|
195
|
+
progress {
|
|
196
|
+
inset-block-start: 2ch;
|
|
197
|
+
inset-inline-start: 0;
|
|
198
|
+
inset-inline-end: 0;
|
|
199
|
+
position: absolute;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
lexxy-node-delete-button {
|
|
203
|
+
inset-block-start: 1.5ch;
|
|
204
|
+
inset-inline-end: 1.5ch;
|
|
205
|
+
inset-inline-start: unset;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.attachment:hover:not(.node--selected) {
|
|
211
|
+
outline: var(--lexxy-focus-ring-size) solid color-mix(in oklch, var(--lexxy-focus-ring-color) 30%, transparent);
|
|
212
|
+
outline-offset: var(--lexxy-focus-ring-offset);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.attachment--file {
|
|
216
|
+
lexxy-node-delete-button {
|
|
217
|
+
inset-block-start: 50%;
|
|
218
|
+
inset-inline-end: 1ch;
|
|
219
|
+
inset-inline-start: unset;
|
|
220
|
+
transform: translate(0, -50%);
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/* Image galleries */
|
|
225
|
+
/* ------------------------------------------------------------------------ */
|
|
226
|
+
|
|
227
|
+
.attachment-gallery {
|
|
228
|
+
--lexxy-attachment-gallery-gap: 0.4ch;
|
|
229
|
+
--lexxy-focus-ring-offset: -6px;
|
|
230
|
+
|
|
231
|
+
display: block;
|
|
232
|
+
padding: 0;
|
|
233
|
+
|
|
234
|
+
.attachment {
|
|
235
|
+
margin: var(--lexxy-attachment-gallery-gap);
|
|
236
|
+
padding: 0;
|
|
237
|
+
padding-block-end: var(--lexxy-attachment-gap);
|
|
238
|
+
vertical-align: top;
|
|
239
|
+
|
|
240
|
+
&.attachment--error {
|
|
241
|
+
padding: 2ch;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
img {
|
|
245
|
+
box-sizing: border-box;
|
|
246
|
+
padding: 1ch;
|
|
247
|
+
padding-block-end: 0;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.attachment__caption {
|
|
253
|
+
textarea {
|
|
254
|
+
background: transparent;
|
|
255
|
+
block-size: fit-content;
|
|
256
|
+
border: 0;
|
|
257
|
+
border-radius: var(--lexxy-radius);
|
|
258
|
+
box-sizing: border-box;
|
|
259
|
+
color: inherit;
|
|
260
|
+
display: block;
|
|
261
|
+
font-size: inherit;
|
|
262
|
+
font-family: inherit;
|
|
263
|
+
inline-size: 100%;
|
|
264
|
+
max-inline-size: 100%;
|
|
265
|
+
padding: 0;
|
|
266
|
+
resize: none;
|
|
267
|
+
text-align: center;
|
|
268
|
+
|
|
269
|
+
&:focus {
|
|
270
|
+
background: var(--lexxy-color-canvas);
|
|
271
|
+
outline: 0;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
&:placeholder-shown {
|
|
275
|
+
overflow: hidden;
|
|
276
|
+
text-overflow: ellipsis;
|
|
277
|
+
white-space: nowrap;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
@supports (field-sizing: content) {
|
|
281
|
+
field-sizing: content;
|
|
282
|
+
inline-size: 100%;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
}
|
|
179
286
|
}
|
|
180
287
|
|
|
181
288
|
/* Placeholder */
|
|
182
289
|
:where(.lexxy-editor--empty) {
|
|
183
|
-
.lexxy-editor__content:not(:has(ul, ol))::before {
|
|
290
|
+
.lexxy-editor__content:not(:has(h1, h2, h3, h4, h5, h6, table, ul, ol, figure, .attachment-gallery))::before {
|
|
184
291
|
content: attr(placeholder);
|
|
185
292
|
color: currentColor;
|
|
186
293
|
cursor: text;
|
|
@@ -221,7 +328,7 @@
|
|
|
221
328
|
/* Toolbar */
|
|
222
329
|
|
|
223
330
|
:where(lexxy-toolbar) {
|
|
224
|
-
--lexxy-toolbar-icon-size:
|
|
331
|
+
--lexxy-toolbar-icon-size: 1.125em;
|
|
225
332
|
|
|
226
333
|
border-block-end: 1px solid var(--lexxy-color-ink-lighter);
|
|
227
334
|
color: currentColor;
|
|
@@ -235,41 +342,61 @@
|
|
|
235
342
|
&[data-attachments="false"] button[name="upload"]{
|
|
236
343
|
display: none;
|
|
237
344
|
}
|
|
238
|
-
}
|
|
239
345
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
346
|
+
.lexxy-editor__toolbar-button {
|
|
347
|
+
aspect-ratio: 1;
|
|
348
|
+
block-size: var(--lexxy-toolbar-button-size);
|
|
349
|
+
border: 0;
|
|
350
|
+
border-radius: var(--lexxy-radius);
|
|
351
|
+
color: currentColor;
|
|
352
|
+
display: grid;
|
|
353
|
+
line-height: inherit;
|
|
354
|
+
place-items: center;
|
|
246
355
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
356
|
+
&:is(:active):not([aria-disabled="true"]),
|
|
357
|
+
&[aria-pressed="true"] {
|
|
358
|
+
background-color: var(--lexxy-color-selected);
|
|
250
359
|
|
|
251
|
-
|
|
252
|
-
|
|
360
|
+
&:hover {
|
|
361
|
+
background-color: var(--lexxy-color-selected-hover);
|
|
362
|
+
}
|
|
253
363
|
}
|
|
254
|
-
}
|
|
255
364
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
365
|
+
&[aria-disabled="true"] {
|
|
366
|
+
cursor: default;
|
|
367
|
+
opacity: 0.3;
|
|
368
|
+
}
|
|
260
369
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
370
|
+
svg {
|
|
371
|
+
-webkit-touch-callout: none;
|
|
372
|
+
block-size: var(--lexxy-toolbar-icon-size);
|
|
373
|
+
fill: currentColor;
|
|
374
|
+
grid-area: 1/1;
|
|
375
|
+
inline-size: var(--lexxy-toolbar-icon-size);
|
|
376
|
+
user-select: none;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
&.lexxy-editor__toolbar-group-end {
|
|
380
|
+
position: relative;
|
|
381
|
+
margin-inline-end: calc(var(--lexxy-toolbar-spacing) + 1px);
|
|
382
|
+
|
|
383
|
+
&:after {
|
|
384
|
+
background-color: var(--lexxy-color-ink-lighter);
|
|
385
|
+
content: "";
|
|
386
|
+
display: block;
|
|
387
|
+
width: 1px;
|
|
388
|
+
height: 60%;
|
|
389
|
+
inset-inline-end: calc(-1 * var(--lexxy-toolbar-spacing));
|
|
390
|
+
inset-block-start: 20%;
|
|
391
|
+
position: absolute;
|
|
392
|
+
pointer-events: none;
|
|
393
|
+
}
|
|
394
|
+
}
|
|
268
395
|
}
|
|
269
|
-
}
|
|
270
396
|
|
|
271
|
-
|
|
272
|
-
|
|
397
|
+
.lexxy-editor__toolbar-spacer {
|
|
398
|
+
flex: 1;
|
|
399
|
+
}
|
|
273
400
|
}
|
|
274
401
|
|
|
275
402
|
/* --------------------------------------------------------------------------
|
|
@@ -303,7 +430,7 @@
|
|
|
303
430
|
background-color: var(--lexxy-color-selected-hover);
|
|
304
431
|
}
|
|
305
432
|
}
|
|
306
|
-
|
|
433
|
+
|
|
307
434
|
[overflowing] &:not(.lexxy-editor__toolbar-overflow) summary ~ * {
|
|
308
435
|
inset-inline-end: var(--lexxy-toolbar-spacing);
|
|
309
436
|
inset-inline-start: var(--lexxy-toolbar-spacing);
|
|
@@ -317,6 +444,7 @@
|
|
|
317
444
|
}
|
|
318
445
|
}
|
|
319
446
|
|
|
447
|
+
|
|
320
448
|
/* --------------------------------------------------------------------------
|
|
321
449
|
/* Overflow menu */
|
|
322
450
|
|
|
@@ -324,7 +452,7 @@
|
|
|
324
452
|
display: none;
|
|
325
453
|
justify-self: flex-end;
|
|
326
454
|
z-index: 1;
|
|
327
|
-
|
|
455
|
+
|
|
328
456
|
summary ~ * {
|
|
329
457
|
border-start-end-radius: 0;
|
|
330
458
|
display: grid;
|
|
@@ -333,6 +461,7 @@
|
|
|
333
461
|
}
|
|
334
462
|
}
|
|
335
463
|
|
|
464
|
+
|
|
336
465
|
/* --------------------------------------------------------------------------
|
|
337
466
|
/* Link dropdown */
|
|
338
467
|
|
|
@@ -392,6 +521,7 @@
|
|
|
392
521
|
}
|
|
393
522
|
}
|
|
394
523
|
|
|
524
|
+
|
|
395
525
|
/* --------------------------------------------------------------------------
|
|
396
526
|
/* Color dropdown */
|
|
397
527
|
|
|
@@ -442,7 +572,7 @@
|
|
|
442
572
|
&[aria-pressed="true"] {
|
|
443
573
|
background-color: transparent;
|
|
444
574
|
box-shadow: 0 0 0 2px currentColor inset;
|
|
445
|
-
|
|
575
|
+
|
|
446
576
|
&:after {
|
|
447
577
|
content: "✓";
|
|
448
578
|
}
|
|
@@ -457,217 +587,244 @@
|
|
|
457
587
|
display: none;
|
|
458
588
|
}
|
|
459
589
|
}
|
|
460
|
-
|
|
461
|
-
[overflowing] & {
|
|
462
|
-
.lexxy-highlight-colors {
|
|
463
|
-
button {
|
|
464
|
-
}
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
590
|
}
|
|
468
591
|
}
|
|
469
592
|
|
|
470
|
-
/*
|
|
471
|
-
/*
|
|
472
|
-
|
|
473
|
-
:where(lexxy-table-tools) {
|
|
593
|
+
/* --------------------------------------------------------------------------
|
|
594
|
+
/* Floating controls */
|
|
595
|
+
:where(.lexxy-floating-controls) {
|
|
474
596
|
--button-size: 2.3lh;
|
|
475
|
-
--
|
|
597
|
+
--floating-tools-radius: calc(var(--lexxy-radius) * 1.5);
|
|
476
598
|
|
|
477
599
|
color: var(--lexxy-color-ink-inverted);
|
|
478
|
-
display: none;
|
|
479
|
-
flex-direction: row;
|
|
480
600
|
font-size: var(--lexxy-text-small);
|
|
481
|
-
gap: 0.25ch;
|
|
482
|
-
inset-inline-start: var(--lexxy-editor-padding);
|
|
483
601
|
line-height: 1;
|
|
484
602
|
position: absolute;
|
|
485
|
-
transform: translate(-50%, -120%);
|
|
486
603
|
z-index: 2;
|
|
487
604
|
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
605
|
+
button,
|
|
606
|
+
summary {
|
|
607
|
+
align-items: center;
|
|
608
|
+
background: transparent;
|
|
609
|
+
block-size: var(--button-size);
|
|
610
|
+
color: var(--lexxy-color-ink-inverted);
|
|
492
611
|
display: flex;
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
summary {
|
|
500
|
-
align-items: center;
|
|
501
|
-
background-color: transparent;
|
|
502
|
-
border: 0;
|
|
503
|
-
border-radius: var(--lexxy-radius);
|
|
504
|
-
color: var(--lexxy-color-ink-inverted);
|
|
505
|
-
cursor: pointer;
|
|
506
|
-
display: flex;
|
|
507
|
-
justify-content: center;
|
|
508
|
-
line-height: 1;
|
|
509
|
-
min-block-size: var(--button-size);
|
|
510
|
-
min-inline-size: var(--button-size);
|
|
511
|
-
user-select: none;
|
|
512
|
-
-webkit-user-select: none;
|
|
612
|
+
justify-content: center;
|
|
613
|
+
line-height: inherit;
|
|
614
|
+
min-block-size: var(--button-size);
|
|
615
|
+
min-inline-size: var(--button-size);
|
|
616
|
+
user-select: none;
|
|
617
|
+
-webkit-user-select: none;
|
|
513
618
|
|
|
514
|
-
|
|
619
|
+
@media(any-hover: hover) {
|
|
620
|
+
&:hover:not([aria-disabled="true"]),
|
|
515
621
|
[open] &:is(summary) {
|
|
516
|
-
background
|
|
622
|
+
background: var(--lexxy-color-ink-medium);
|
|
623
|
+
|
|
624
|
+
svg {
|
|
625
|
+
opacity: 1;
|
|
626
|
+
}
|
|
517
627
|
}
|
|
518
628
|
|
|
519
629
|
&:focus-visible {
|
|
520
630
|
outline-color: var(--lexxy-focus-ring-color);
|
|
521
631
|
}
|
|
522
632
|
}
|
|
633
|
+
}
|
|
523
634
|
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
svg {
|
|
529
|
-
block-size: 1em;
|
|
530
|
-
inline-size: 1em;
|
|
531
|
-
fill: currentColor;
|
|
532
|
-
opacity: 0.8;
|
|
533
|
-
padding: 1px; /* Fixes weird Safari SVG clipping issue */
|
|
534
|
-
}
|
|
635
|
+
button {
|
|
636
|
+
aspect-ratio: 1 / 1;
|
|
637
|
+
font-weight: bold;
|
|
535
638
|
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
639
|
+
svg {
|
|
640
|
+
block-size: 1.125em;
|
|
641
|
+
inline-size: 1.125em;
|
|
642
|
+
fill: currentColor;
|
|
643
|
+
opacity: 0.8;
|
|
644
|
+
padding: 1px; /* Fixes weird Safari SVG clipping issue */
|
|
539
645
|
}
|
|
540
646
|
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
padding: 0 1.25ch;
|
|
647
|
+
span {
|
|
648
|
+
display: none;
|
|
544
649
|
}
|
|
650
|
+
}
|
|
545
651
|
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
652
|
+
summary {
|
|
653
|
+
box-shadow: 0 0 0 1px inset rgba(128, 128, 128, 0.3);
|
|
654
|
+
padding: 0 1.25ch;
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
.lexxy-floating-controls__group {
|
|
658
|
+
background-color: var(--lexxy-color-ink);
|
|
659
|
+
border-radius: var(--floating-tools-radius);
|
|
660
|
+
padding: 0.25ch;
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
|
|
664
|
+
/* --------------------------------------------------------------------------
|
|
665
|
+
/* Table Tools */
|
|
666
|
+
|
|
667
|
+
&:is(lexxy-table-tools) {
|
|
668
|
+
flex-direction: row;
|
|
669
|
+
gap: 0.25ch;
|
|
670
|
+
inset-inline-start: var(--lexxy-editor-padding);
|
|
671
|
+
transform: translate(-50%, -120%);
|
|
672
|
+
|
|
673
|
+
.lexxy-table-control {
|
|
674
|
+
align-items: stretch;
|
|
675
|
+
display: flex;
|
|
676
|
+
flex-direction: row;
|
|
677
|
+
gap: 0.25ch;
|
|
678
|
+
white-space: nowrap;
|
|
679
|
+
|
|
680
|
+
.lexxy-table-control__more-menu {
|
|
681
|
+
gap: 0;
|
|
682
|
+
position: relative;
|
|
683
|
+
|
|
684
|
+
.lexxy-table-control__more-menu-details {
|
|
685
|
+
background: var(--lexxy-color-ink);
|
|
686
|
+
border-radius: var(--floating-tools-radius);
|
|
687
|
+
display: flex;
|
|
688
|
+
flex-direction: column;
|
|
689
|
+
gap: 0.25ch;
|
|
690
|
+
inset-block-start: 110%;
|
|
691
|
+
inset-inline-start: 50%;
|
|
692
|
+
padding: 0.25ch;
|
|
693
|
+
position: absolute;
|
|
694
|
+
transform: translateX(-50%);
|
|
695
|
+
|
|
696
|
+
button {
|
|
697
|
+
aspect-ratio: unset;
|
|
698
|
+
flex-direction: row;
|
|
699
|
+
font-weight: normal;
|
|
700
|
+
gap: 1ch;
|
|
701
|
+
justify-content: flex-start;
|
|
702
|
+
padding: 0.75ch;
|
|
703
|
+
padding-inline-end: 1.5ch;
|
|
704
|
+
white-space: nowrap;
|
|
705
|
+
|
|
706
|
+
span {
|
|
707
|
+
display: inline-block;
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
svg {
|
|
711
|
+
block-size: 1.3lh;
|
|
712
|
+
inline-size: 1.3lh;
|
|
713
|
+
fill: currentColor;
|
|
714
|
+
}
|
|
580
715
|
}
|
|
581
716
|
}
|
|
582
717
|
}
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
.lexxy-table-control__button--delete-table {
|
|
586
|
-
align-items: center;
|
|
587
|
-
aspect-ratio: unset;
|
|
588
|
-
block-size: auto;
|
|
589
|
-
font-weight: normal;
|
|
590
|
-
justify-content: center;
|
|
591
|
-
padding: 0 1ch;
|
|
592
|
-
|
|
593
|
-
svg {
|
|
594
|
-
min-block-size: 1em;
|
|
595
|
-
min-inline-size: 1em;
|
|
596
|
-
}
|
|
597
718
|
|
|
598
|
-
|
|
719
|
+
.lexxy-table-control__button--delete-table {
|
|
599
720
|
align-items: center;
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
color: color-mix(in srgb, var(--lexxy-color-ink-inverted) 80%, transparent);
|
|
603
|
-
display: flex;
|
|
604
|
-
inset-inline-end: calc(var(--button-size) + 1ch);
|
|
605
|
-
inset-block-start: 0;
|
|
606
|
-
inset-block-end: 0;
|
|
607
|
-
inset-inline-start: 0;
|
|
721
|
+
block-size: auto;
|
|
722
|
+
font-weight: normal;
|
|
608
723
|
justify-content: center;
|
|
609
|
-
padding: 0.5ch 1ch;
|
|
610
|
-
position: absolute;
|
|
611
|
-
transition: all 0.2s ease-out;
|
|
612
|
-
opacity: 0;
|
|
613
|
-
pointer-events: none;
|
|
614
|
-
white-space: nowrap;
|
|
615
|
-
}
|
|
616
724
|
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
725
|
+
svg {
|
|
726
|
+
block-size: 1.125em;
|
|
727
|
+
inline-size: 1.125em;
|
|
728
|
+
min-block-size: 1.125em;
|
|
729
|
+
min-inline-size: 1.125em;
|
|
730
|
+
}
|
|
621
731
|
|
|
622
732
|
span {
|
|
623
|
-
|
|
733
|
+
align-items: center;
|
|
734
|
+
background: var(--lexxy-color-ink);
|
|
735
|
+
border-radius: var(--floating-tools-radius);
|
|
736
|
+
color: color-mix(in srgb, var(--lexxy-color-ink-inverted) 80%, transparent);
|
|
737
|
+
display: flex;
|
|
738
|
+
inset-inline-end: calc(var(--button-size) + 1ch);
|
|
739
|
+
inset-block-start: 0;
|
|
740
|
+
inset-block-end: 0;
|
|
741
|
+
inset-inline-start: 0;
|
|
742
|
+
justify-content: center;
|
|
743
|
+
padding: 0.5ch 1ch;
|
|
744
|
+
position: absolute;
|
|
745
|
+
transition: all 0.2s ease-out;
|
|
746
|
+
opacity: 0;
|
|
747
|
+
pointer-events: none;
|
|
748
|
+
white-space: nowrap;
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
&:hover {
|
|
752
|
+
background-color: var(--lexxy-color-red);
|
|
753
|
+
|
|
754
|
+
svg { color: var(--lexxy-color-ink-inverted); }
|
|
755
|
+
|
|
756
|
+
span {
|
|
757
|
+
opacity: 1;
|
|
758
|
+
}
|
|
624
759
|
}
|
|
625
760
|
}
|
|
626
761
|
}
|
|
627
762
|
}
|
|
628
|
-
}
|
|
629
763
|
|
|
630
764
|
|
|
631
|
-
/*
|
|
632
|
-
/*
|
|
765
|
+
/* --------------------------------------------------------------------------
|
|
766
|
+
/* Attachment delete button */
|
|
633
767
|
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
768
|
+
&:is(lexxy-node-delete-button) {
|
|
769
|
+
inset-block-start: 0;
|
|
770
|
+
inset-inline-start: 100%;
|
|
771
|
+
opacity: 0;
|
|
772
|
+
pointer-events: none;
|
|
637
773
|
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m12 19.5c-.7 0-1.3-.3-1.7-.8l-9.8-11.1c-.7-.8-.6-1.9.2-2.6.8-.6 1.9-.6 2.5.2l8.6 9.8c0 .1.2.1.4 0l8.6-9.8c.7-.8 1.8-.9 2.6-.2s.9 1.8.2 2.6l-9.8 11.1c-.4.5-1.1.8-1.7.8z' fill='%23000'/%3E%3C/svg%3E");
|
|
643
|
-
background-position: center right 1ch;
|
|
644
|
-
background-repeat: no-repeat;
|
|
645
|
-
background-size: 1ch;
|
|
646
|
-
block-size: 1.5lh;
|
|
647
|
-
border: 1px solid var(--lexxy-color-ink-lighter);
|
|
648
|
-
border-radius: var(--lexxy-radius);
|
|
649
|
-
color: var(--lexxy-color-ink);
|
|
650
|
-
font-family: var(--lexxy-font-base);
|
|
651
|
-
font-size: var(--lexxy-text-small);
|
|
652
|
-
font-weight: normal;
|
|
653
|
-
margin: 0.5ch 0.5ch 0 -0.5ch;
|
|
654
|
-
padding: 0 2ch 0 1ch;
|
|
655
|
-
text-align: start;
|
|
774
|
+
.node--selected & {
|
|
775
|
+
opacity: 1;
|
|
776
|
+
pointer-events: auto;
|
|
777
|
+
}
|
|
656
778
|
|
|
657
|
-
|
|
658
|
-
background-
|
|
779
|
+
.lexxy-node-delete:hover {
|
|
780
|
+
background-color: var(--lexxy-color-red);
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
|
|
785
|
+
/* --------------------------------------------------------------------------
|
|
786
|
+
/* Language picker */
|
|
787
|
+
|
|
788
|
+
&:is(lexxy-code-language-picker) {
|
|
789
|
+
inset-inline-end: var(--lexxy-editor-padding);
|
|
790
|
+
|
|
791
|
+
select {
|
|
792
|
+
-webkit-appearance: none;
|
|
793
|
+
appearance: none;
|
|
794
|
+
background-color: var(--lexxy-color-canvas);
|
|
795
|
+
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m12 19.5c-.7 0-1.3-.3-1.7-.8l-9.8-11.1c-.7-.8-.6-1.9.2-2.6.8-.6 1.9-.6 2.5.2l8.6 9.8c0 .1.2.1.4 0l8.6-9.8c.7-.8 1.8-.9 2.6-.2s.9 1.8.2 2.6l-9.8 11.1c-.4.5-1.1.8-1.7.8z' fill='%23000'/%3E%3C/svg%3E");
|
|
796
|
+
background-position: center right 1ch;
|
|
797
|
+
background-repeat: no-repeat;
|
|
798
|
+
background-size: 1ch;
|
|
799
|
+
block-size: 1.5lh;
|
|
800
|
+
border: 1px solid var(--lexxy-color-ink-lighter);
|
|
801
|
+
border-radius: var(--lexxy-radius);
|
|
802
|
+
color: var(--lexxy-color-ink);
|
|
803
|
+
font-family: var(--lexxy-font-base);
|
|
804
|
+
font-size: var(--lexxy-text-small);
|
|
805
|
+
font-weight: normal;
|
|
806
|
+
margin: 0.5ch 0.5ch 0 -0.5ch;
|
|
807
|
+
padding: 0 2ch 0 1ch;
|
|
808
|
+
text-align: start;
|
|
809
|
+
|
|
810
|
+
@media (prefers-color-scheme: dark) {
|
|
811
|
+
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m12 19.5c-.7 0-1.3-.3-1.7-.8l-9.8-11.1c-.7-.8-.6-1.9.2-2.6.8-.6 1.9-.6 2.5.2l8.6 9.8c0 .1.2.1.4 0l8.6-9.8c.7-.8 1.8-.9 2.6-.2s.9 1.8.2 2.6l-9.8 11.1c-.4.5-1.1.8-1.7.8z' fill='%23fff'/%3E%3C/svg%3E");
|
|
812
|
+
}
|
|
659
813
|
}
|
|
660
814
|
}
|
|
661
815
|
}
|
|
662
816
|
|
|
663
|
-
|
|
664
|
-
/*
|
|
817
|
+
|
|
818
|
+
/* --------------------------------------------------------------------------
|
|
819
|
+
/* Prompt */
|
|
665
820
|
|
|
666
821
|
:where(.lexxy-prompt-menu) {
|
|
667
822
|
--lexxy-prompt-avatar-size: 24px;
|
|
668
|
-
--lexxy-prompt-min-width: 20ch;
|
|
669
823
|
--lexxy-prompt-padding: 0.5ch;
|
|
670
824
|
|
|
825
|
+
--lexxy-prompt-offset-x: 0;
|
|
826
|
+
--lexxy-prompt-offset-y: 0;
|
|
827
|
+
|
|
671
828
|
background-color: var(--lexxy-color-canvas);
|
|
672
829
|
border-radius: calc(var(--lexxy-prompt-padding) * 2);
|
|
673
830
|
box-shadow: var(--lexxy-shadow);
|
|
@@ -675,13 +832,27 @@
|
|
|
675
832
|
font-family: var(--lexxy-font-base);
|
|
676
833
|
font-size: var(--lexxy-text-small);
|
|
677
834
|
list-style: none;
|
|
835
|
+
inset-block-start: var(--lexxy-prompt-offset-y);
|
|
836
|
+
inset-inline-start: var(--lexxy-prompt-offset-x);
|
|
678
837
|
margin: 0;
|
|
679
838
|
max-block-size: 200px;
|
|
680
|
-
|
|
839
|
+
max-inline-size: min(20ch, calc(100% - var(--lexxy-prompt-offset-x)));
|
|
840
|
+
min-inline-size: 20ch;
|
|
681
841
|
overflow: auto;
|
|
682
842
|
padding: var(--lexxy-prompt-padding);
|
|
843
|
+
position: absolute;
|
|
683
844
|
visibility: hidden;
|
|
684
845
|
z-index: var(--lexxy-z-popup);
|
|
846
|
+
|
|
847
|
+
&[data-clipped-at-right] {
|
|
848
|
+
inset-inline-start: unset;
|
|
849
|
+
inset-inline-end: 1ch;
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
&[data-clipped-at-bottom] {
|
|
853
|
+
inset-block-start: unset;
|
|
854
|
+
inset-block-end: var(--lexxy-prompt-offset-y);
|
|
855
|
+
}
|
|
685
856
|
}
|
|
686
857
|
|
|
687
858
|
:where(.lexxy-prompt-menu--visible) {
|
|
@@ -695,7 +866,6 @@
|
|
|
695
866
|
display: flex;
|
|
696
867
|
gap: var(--lexxy-prompt-padding);
|
|
697
868
|
padding: var(--lexxy-prompt-padding);
|
|
698
|
-
white-space: nowrap;
|
|
699
869
|
|
|
700
870
|
&:hover {
|
|
701
871
|
background-color: var(--lexxy-color-ink-lightest);
|
|
@@ -722,3 +892,36 @@
|
|
|
722
892
|
color: var(--lexxy-color-ink-medium);
|
|
723
893
|
padding: var(--lexxy-prompt-padding);
|
|
724
894
|
}
|
|
895
|
+
|
|
896
|
+
|
|
897
|
+
/* --------------------------------------------------------------------------
|
|
898
|
+
/* Custom attachments */
|
|
899
|
+
action-text-attachment[content-type^="application/vnd.actiontext"] {
|
|
900
|
+
&.node--selected {
|
|
901
|
+
--lexxy-attachment-bg-color: var(--lexxy-color-accent-dark);
|
|
902
|
+
--lexxy-attachment-text-color: var(--lexxy-color-ink-inverted);
|
|
903
|
+
|
|
904
|
+
outline: none;
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
lexxy-node-delete-button {
|
|
908
|
+
display: none;
|
|
909
|
+
inset-inline-start: 0;
|
|
910
|
+
line-height: 1lh;
|
|
911
|
+
|
|
912
|
+
.lexxy-floating-controls__group {
|
|
913
|
+
--button-size: 1lh;
|
|
914
|
+
|
|
915
|
+
background-color: var(--lexxy-color-accent-dark);
|
|
916
|
+
padding: 0;
|
|
917
|
+
|
|
918
|
+
button {
|
|
919
|
+
border-radius: 50%;
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
&.node--selected lexxy-node-delete-button {
|
|
925
|
+
display: block;
|
|
926
|
+
}
|
|
927
|
+
}
|