@tldraw/commenting 5.7.0-canary.9751764b0f69 → 5.7.0-canary.98770694aa48
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/commenting.css +230 -242
- package/dist-cjs/canvas/canvas-events.js +25 -1
- package/dist-cjs/canvas/canvas-events.js.map +2 -2
- package/dist-cjs/canvas/comment-tool.js +22 -24
- package/dist-cjs/canvas/comment-tool.js.map +2 -2
- package/dist-cjs/canvas/comments-filter-menu.js +55 -38
- package/dist-cjs/canvas/comments-filter-menu.js.map +2 -2
- package/dist-cjs/canvas/comments-overflow-menu.js +6 -24
- package/dist-cjs/canvas/comments-overflow-menu.js.map +2 -2
- package/dist-cjs/canvas/comments-overlay.js.map +1 -1
- package/dist-cjs/canvas/comments-sidebar.js +3 -1
- package/dist-cjs/canvas/comments-sidebar.js.map +2 -2
- package/dist-cjs/canvas/comments-visibility-toggle.js +1 -1
- package/dist-cjs/canvas/comments-visibility-toggle.js.map +1 -1
- package/dist-cjs/canvas/pending-composer.js +115 -4
- package/dist-cjs/canvas/pending-composer.js.map +2 -2
- package/dist-cjs/canvas/region-box.js +150 -35
- package/dist-cjs/canvas/region-box.js.map +3 -3
- package/dist-cjs/canvas/thread-pin.js +18 -3
- package/dist-cjs/canvas/thread-pin.js.map +2 -2
- package/dist-cjs/canvas/thread-view.js +52 -28
- package/dist-cjs/canvas/thread-view.js.map +2 -2
- package/dist-cjs/index.d.ts +8 -8
- package/dist-cjs/index.js +1 -1
- package/dist-cjs/ui/comments-list.js +5 -7
- package/dist-cjs/ui/comments-list.js.map +2 -2
- package/dist-cjs/ui/icons.js +4 -4
- package/dist-cjs/ui/icons.js.map +2 -2
- package/dist-cjs/ui/reaction-picker.js +1 -1
- package/dist-cjs/ui/reaction-picker.js.map +1 -1
- package/dist-cjs/ui/send-button.js.map +1 -1
- package/dist-esm/canvas/canvas-events.mjs +25 -1
- package/dist-esm/canvas/canvas-events.mjs.map +2 -2
- package/dist-esm/canvas/comment-tool.mjs +23 -25
- package/dist-esm/canvas/comment-tool.mjs.map +2 -2
- package/dist-esm/canvas/comments-filter-menu.mjs +57 -39
- package/dist-esm/canvas/comments-filter-menu.mjs.map +2 -2
- package/dist-esm/canvas/comments-overflow-menu.mjs +8 -24
- package/dist-esm/canvas/comments-overflow-menu.mjs.map +2 -2
- package/dist-esm/canvas/comments-overlay.mjs.map +1 -1
- package/dist-esm/canvas/comments-sidebar.mjs +4 -2
- package/dist-esm/canvas/comments-sidebar.mjs.map +2 -2
- package/dist-esm/canvas/comments-visibility-toggle.mjs +1 -1
- package/dist-esm/canvas/comments-visibility-toggle.mjs.map +1 -1
- package/dist-esm/canvas/pending-composer.mjs +125 -5
- package/dist-esm/canvas/pending-composer.mjs.map +2 -2
- package/dist-esm/canvas/region-box.mjs +161 -38
- package/dist-esm/canvas/region-box.mjs.map +3 -3
- package/dist-esm/canvas/thread-pin.mjs +19 -4
- package/dist-esm/canvas/thread-pin.mjs.map +2 -2
- package/dist-esm/canvas/thread-view.mjs +62 -29
- package/dist-esm/canvas/thread-view.mjs.map +2 -2
- package/dist-esm/index.d.mts +8 -8
- package/dist-esm/index.mjs +1 -1
- package/dist-esm/ui/comments-list.mjs +5 -7
- package/dist-esm/ui/comments-list.mjs.map +2 -2
- package/dist-esm/ui/icons.mjs +4 -4
- package/dist-esm/ui/icons.mjs.map +2 -2
- package/dist-esm/ui/reaction-picker.mjs +1 -1
- package/dist-esm/ui/reaction-picker.mjs.map +1 -1
- package/dist-esm/ui/send-button.mjs.map +1 -1
- package/package.json +5 -5
- package/src/canvas/canvas-events.ts +39 -2
- package/src/canvas/canvas.css +73 -38
- package/src/canvas/comment-tool.test.ts +36 -47
- package/src/canvas/comment-tool.tsx +45 -52
- package/src/canvas/comments-filter-menu.tsx +18 -5
- package/src/canvas/comments-overflow-menu.tsx +12 -18
- package/src/canvas/comments-overlay.tsx +2 -2
- package/src/canvas/comments-sidebar.tsx +5 -2
- package/src/canvas/comments-visibility-toggle.tsx +1 -1
- package/src/canvas/pending-composer.tsx +159 -15
- package/src/canvas/region-box.tsx +192 -42
- package/src/canvas/thread-pin.tsx +23 -4
- package/src/canvas/thread-view.tsx +74 -24
- package/src/ui/comments-list.tsx +20 -17
- package/src/ui/comments.css +157 -204
- package/src/ui/icons.tsx +5 -5
- package/src/ui/reaction-picker.tsx +1 -1
- package/src/ui/send-button.tsx +2 -2
package/commenting.css
CHANGED
|
@@ -101,8 +101,6 @@
|
|
|
101
101
|
z-index: var(--tl-layer-menus);
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
/* Real comment UI components. Co-located so styles travel to any view (studio,
|
|
105
|
-
canvas), and themed via tldraw's --tl-color tokens so they follow light/dark. */
|
|
106
104
|
.tlui-cmt-card {
|
|
107
105
|
position: relative;
|
|
108
106
|
display: flex;
|
|
@@ -121,7 +119,6 @@
|
|
|
121
119
|
padding-left: calc(28px + 6px);
|
|
122
120
|
}
|
|
123
121
|
|
|
124
|
-
/* hover-revealed controls (edit, react…) stacked at the card's top-right */
|
|
125
122
|
.tlui-cmt-card__actions {
|
|
126
123
|
position: absolute;
|
|
127
124
|
top: 6px;
|
|
@@ -157,12 +154,13 @@
|
|
|
157
154
|
display: flex;
|
|
158
155
|
align-items: center;
|
|
159
156
|
gap: 6px;
|
|
157
|
+
margin-bottom: -4px;
|
|
160
158
|
}
|
|
161
159
|
|
|
162
160
|
.tlui-cmt-author {
|
|
163
161
|
font-weight: 500;
|
|
164
162
|
font-size: 12px;
|
|
165
|
-
color: var(--tl-color-text
|
|
163
|
+
color: var(--tl-color-text);
|
|
166
164
|
/* a long name ellipsizes rather than pushing the time out or running under the actions */
|
|
167
165
|
min-width: 0;
|
|
168
166
|
overflow: hidden;
|
|
@@ -177,8 +175,6 @@
|
|
|
177
175
|
white-space: nowrap;
|
|
178
176
|
}
|
|
179
177
|
|
|
180
|
-
/* In the hover preview a long comment truncates with an ellipsis rather than growing the card —
|
|
181
|
-
~7 lines (≈120px at this line height). Preview only. */
|
|
182
178
|
.tlui-cmt-canvas-preview--thread .tlui-cmt-text {
|
|
183
179
|
display: -webkit-box;
|
|
184
180
|
-webkit-box-orient: vertical;
|
|
@@ -205,13 +201,53 @@
|
|
|
205
201
|
-webkit-user-select: text;
|
|
206
202
|
user-select: text;
|
|
207
203
|
}
|
|
204
|
+
/* In an opened thread the byline, the resolved banner and a host's own `CommentBody` (which may not
|
|
205
|
+
use .tlui-cmt-text) are selectable too, so a quote can be copied with its author and time. Rows
|
|
206
|
+
in the list stay unselectable: they're click targets, and a drag there would select instead. */
|
|
207
|
+
.tlui-cmt-thread :is(.tlui-cmt-author, .tlui-cmt-time, .tlui-cmt-body, .tlui-cmt-thread__resolved),
|
|
208
|
+
.tlui-cmt-thread
|
|
209
|
+
:is(.tlui-cmt-author, .tlui-cmt-time, .tlui-cmt-body, .tlui-cmt-thread__resolved)
|
|
210
|
+
* {
|
|
211
|
+
-webkit-user-select: text;
|
|
212
|
+
user-select: text;
|
|
213
|
+
}
|
|
214
|
+
/* …but not the controls inside them (reaction pills, See more), whose labels aren't content. */
|
|
215
|
+
.tlui-cmt-thread .tlui-cmt-body :is(button, button *) {
|
|
216
|
+
-webkit-user-select: none;
|
|
217
|
+
user-select: none;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/* A long comment in the thread view, clamped to 10 lines until expanded. A line clamp, not a max
|
|
221
|
+
height, so it always ends on a whole line: paragraph gaps would leave a height cut mid-line. */
|
|
222
|
+
.tlui-cmt-collapsible--collapsed {
|
|
223
|
+
display: -webkit-box;
|
|
224
|
+
-webkit-box-orient: vertical;
|
|
225
|
+
-webkit-line-clamp: 10;
|
|
226
|
+
line-clamp: 10;
|
|
227
|
+
overflow: hidden;
|
|
228
|
+
}
|
|
229
|
+
/* Styled as the byline's time ("now"), so it reads as metadata rather than a button. */
|
|
230
|
+
.tlui-cmt-see-more {
|
|
231
|
+
display: block;
|
|
232
|
+
/* The clamped body's own bottom margin is clipped with its overflow. */
|
|
233
|
+
margin: 4px 0 6px;
|
|
234
|
+
padding: 0;
|
|
235
|
+
border: none;
|
|
236
|
+
background: none;
|
|
237
|
+
font: inherit;
|
|
238
|
+
font-size: 12px;
|
|
239
|
+
font-weight: normal;
|
|
240
|
+
color: var(--tl-color-text-3);
|
|
241
|
+
cursor: pointer;
|
|
242
|
+
}
|
|
243
|
+
.tlui-cmt-see-more:hover {
|
|
244
|
+
color: var(--tl-color-text-1);
|
|
245
|
+
}
|
|
208
246
|
|
|
209
247
|
.tlui-cmt-edited {
|
|
210
248
|
font-style: italic;
|
|
211
249
|
}
|
|
212
250
|
|
|
213
|
-
/* rendered rich text inside a comment body — bare tags emitted by the comment renderer
|
|
214
|
-
(paragraphs, lists, code, highlight, links), matching the limited comment extension set. */
|
|
215
251
|
.tlui-cmt-text p {
|
|
216
252
|
margin: 0;
|
|
217
253
|
}
|
|
@@ -251,9 +287,7 @@
|
|
|
251
287
|
|
|
252
288
|
/* Avatar and mention styles live in @tldraw/mentions and are imported by commenting.css. */
|
|
253
289
|
|
|
254
|
-
/*
|
|
255
|
-
Formatting is applied via markdown and keyboard shortcuts (no toolbar). The avatar aligns to the
|
|
256
|
-
top so it stays put as the field grows to multiple lines. */
|
|
290
|
+
/* The avatar aligns to the top so it stays put as the field grows to multiple lines. */
|
|
257
291
|
.tlui-cmt-composer {
|
|
258
292
|
display: flex;
|
|
259
293
|
align-items: flex-start;
|
|
@@ -285,7 +319,6 @@
|
|
|
285
319
|
the full width and the send button drops to its own row, right-aligned. */
|
|
286
320
|
.tlui-cmt-composer__field--expanded {
|
|
287
321
|
flex-wrap: wrap;
|
|
288
|
-
/* No vertical gap between the input and the send-button row it wraps onto. */
|
|
289
322
|
row-gap: 0;
|
|
290
323
|
}
|
|
291
324
|
.tlui-cmt-composer__field--expanded .tlui-cmt-composer__input-wrap {
|
|
@@ -298,7 +331,6 @@
|
|
|
298
331
|
margin-left: auto;
|
|
299
332
|
}
|
|
300
333
|
|
|
301
|
-
/* the editable area, with the placeholder overlaid while it's empty */
|
|
302
334
|
.tlui-cmt-composer__input-wrap {
|
|
303
335
|
position: relative;
|
|
304
336
|
flex: 1;
|
|
@@ -368,8 +400,6 @@
|
|
|
368
400
|
}
|
|
369
401
|
}
|
|
370
402
|
|
|
371
|
-
/* A bare up-arrow icon button (matching the placement composer): no fill by default, a grey square
|
|
372
|
-
on hover, grey while there's nothing to send and dark once there is. */
|
|
373
403
|
.tlui-cmt-send {
|
|
374
404
|
flex-shrink: 0;
|
|
375
405
|
display: inline-flex;
|
|
@@ -411,8 +441,9 @@
|
|
|
411
441
|
}
|
|
412
442
|
|
|
413
443
|
/* The shared marker treatment. To the pointer a comment pin and a count badge are the same
|
|
414
|
-
object — a token sitting on the canvas — so
|
|
415
|
-
|
|
444
|
+
object — a token sitting on the canvas — so their resting and hover shadows live here, where the
|
|
445
|
+
two can't drift apart. Each opts out of the hover scale below; a canvas pin gets it back from
|
|
446
|
+
canvas.css, keyed off its hit layer. */
|
|
416
447
|
.tlui-cmt-marker {
|
|
417
448
|
box-shadow: var(--tlui-cmt-marker-shadow);
|
|
418
449
|
cursor: pointer;
|
|
@@ -425,52 +456,45 @@
|
|
|
425
456
|
transform: scale(var(--tlui-cmt-marker-hover-scale));
|
|
426
457
|
}
|
|
427
458
|
|
|
428
|
-
/* The hover shadow is for closed markers only — an open one keeps its selection ring, which this
|
|
429
|
-
box-shadow would otherwise override (the hover selector outranks the --open rule). */
|
|
430
459
|
.tlui-cmt-marker:not(.tlui-cmt-marker--open):hover {
|
|
431
460
|
box-shadow: var(--tlui-cmt-marker-shadow-hover);
|
|
432
461
|
}
|
|
433
462
|
|
|
434
|
-
/* Count badges don't react to hover — no scale, no shadow lift. Only pins do. */
|
|
435
463
|
.tlui-cmt-count-badge:hover {
|
|
436
464
|
transform: none;
|
|
437
|
-
box-shadow: var(--tlui-cmt-marker-shadow);
|
|
465
|
+
box-shadow: var(--tlui-cmt-marker-shadow-hover);
|
|
438
466
|
}
|
|
439
467
|
|
|
440
|
-
/*
|
|
468
|
+
/* A pin's own :hover doesn't scale it; on the canvas, canvas.css scales it from the hit layer. */
|
|
441
469
|
.tlui-cmt-pin:hover {
|
|
442
470
|
transform: none;
|
|
443
471
|
}
|
|
444
472
|
|
|
445
|
-
/* open: the thread (or a stack's list) is showing — the active marker just keeps its lift shadow,
|
|
446
|
-
no selection ring. */
|
|
447
473
|
.tlui-cmt-marker--open {
|
|
448
|
-
box-shadow: var(--tlui-cmt-marker-shadow);
|
|
474
|
+
box-shadow: var(--tlui-cmt-marker-shadow-hover);
|
|
449
475
|
}
|
|
450
476
|
|
|
451
|
-
/* pin — a canvas marker: a white teardrop holding the author's avatar circle, so a thread is
|
|
452
|
-
identifiable at a glance. */
|
|
453
477
|
.tlui-cmt-pin {
|
|
454
478
|
--tlui-cmt-marker-size: var(--tlui-cmt-pin-size);
|
|
455
479
|
width: var(--tlui-cmt-marker-size);
|
|
456
480
|
height: var(--tlui-cmt-marker-size);
|
|
457
481
|
border-radius: 50% 50% 50% 0;
|
|
458
482
|
background: var(--tl-color-panel);
|
|
459
|
-
color:
|
|
483
|
+
color: var(--tl-color-panel-contrast);
|
|
460
484
|
display: flex;
|
|
461
485
|
align-items: center;
|
|
462
486
|
justify-content: center;
|
|
463
487
|
font-size: 14px;
|
|
464
488
|
font-weight: 600;
|
|
465
489
|
}
|
|
466
|
-
/* The pin holds the author's 22px avatar circle, centred in its 28px face. */
|
|
467
490
|
.tlui-cmt-pin .tlui-cmt-avatar {
|
|
468
491
|
width: 22px;
|
|
469
492
|
height: 22px;
|
|
493
|
+
box-shadow: inset 0px 0px 0px 1px var(--tl-color-hint);
|
|
470
494
|
}
|
|
471
495
|
|
|
472
|
-
/* resolved: a solid, muted grey
|
|
473
|
-
|
|
496
|
+
/* resolved: a solid, muted grey per theme. The muted tokens are translucent (10% black, or 10% white
|
|
497
|
+
in dark mode), so the canvas would show through a pin filled with one. */
|
|
474
498
|
.tlui-cmt-pin--resolved {
|
|
475
499
|
background: #dfe0e1;
|
|
476
500
|
color: hsl(214, 8%, 42%);
|
|
@@ -480,7 +504,6 @@
|
|
|
480
504
|
color: hsl(0, 0%, 72%);
|
|
481
505
|
}
|
|
482
506
|
|
|
483
|
-
/* count badge — the same marker as a pin. */
|
|
484
507
|
.tlui-cmt-count-badge {
|
|
485
508
|
width: var(--tlui-cmt-marker-size);
|
|
486
509
|
height: var(--tlui-cmt-marker-size);
|
|
@@ -495,12 +518,13 @@
|
|
|
495
518
|
user-select: none;
|
|
496
519
|
}
|
|
497
520
|
|
|
498
|
-
/* reactions */
|
|
499
521
|
.tlui-cmt-reactions {
|
|
500
522
|
display: flex;
|
|
501
523
|
flex-wrap: wrap;
|
|
502
524
|
gap: 4px;
|
|
503
|
-
margin-top:
|
|
525
|
+
margin-top: 4px;
|
|
526
|
+
/* Pull the row left by the pill's inline padding so the first emoji lines up with the text above. */
|
|
527
|
+
margin-left: -6px;
|
|
504
528
|
}
|
|
505
529
|
|
|
506
530
|
.tlui-cmt-reaction {
|
|
@@ -510,7 +534,7 @@
|
|
|
510
534
|
padding: 2px 6px;
|
|
511
535
|
border: none;
|
|
512
536
|
border-radius: var(--tl-radius-1);
|
|
513
|
-
background:
|
|
537
|
+
background: none;
|
|
514
538
|
font: inherit;
|
|
515
539
|
font-size: 10px;
|
|
516
540
|
font-weight: 400;
|
|
@@ -523,20 +547,8 @@ button.tlui-cmt-reaction {
|
|
|
523
547
|
cursor: pointer;
|
|
524
548
|
}
|
|
525
549
|
|
|
526
|
-
/* Hover deepens the grey — no border to tint now. Mixing toward the text colour is theme-aware:
|
|
527
|
-
it darkens the fill in light mode and lightens it in dark, tracking the pill's own contrast. */
|
|
528
550
|
button.tlui-cmt-reaction:hover {
|
|
529
|
-
background: var(--tl-color-muted-
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
/* a reaction you're part of fills with the selection colour, so "I reacted with this" stands out
|
|
533
|
-
from the grey pills of reactions you haven't joined. */
|
|
534
|
-
.tlui-cmt-reaction--active {
|
|
535
|
-
background: color-mix(in srgb, var(--tl-color-selected) 28%, var(--tl-color-panel));
|
|
536
|
-
}
|
|
537
|
-
|
|
538
|
-
button.tlui-cmt-reaction--active:hover {
|
|
539
|
-
background: color-mix(in srgb, var(--tl-color-selected) 38%, var(--tl-color-panel));
|
|
551
|
+
background: var(--tl-color-muted-2);
|
|
540
552
|
}
|
|
541
553
|
|
|
542
554
|
/* The emoji renders larger than the 10px count, but its pinned line-height keeps the pill the
|
|
@@ -553,14 +565,16 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
553
565
|
|
|
554
566
|
.tlui-cmt-reaction--active .tlui-cmt-reaction__count {
|
|
555
567
|
color: var(--tl-color-text-1);
|
|
568
|
+
font-weight: 700;
|
|
556
569
|
}
|
|
557
570
|
|
|
558
|
-
/*
|
|
571
|
+
/* Laid out like tldraw's .tlui-grid (the actions menu): 40px hit areas overlapping 2px on every
|
|
572
|
+
side, so the 32px hover squares sit 4px apart and 4px in from the panel edge. */
|
|
559
573
|
.tlui-cmt-emoji-picker {
|
|
560
574
|
display: grid;
|
|
561
|
-
grid-template-columns: repeat(5,
|
|
575
|
+
grid-template-columns: repeat(5, 36px);
|
|
562
576
|
gap: 0;
|
|
563
|
-
padding:
|
|
577
|
+
padding: 2px;
|
|
564
578
|
}
|
|
565
579
|
|
|
566
580
|
.tlui-cmt-emoji-picker__item {
|
|
@@ -570,6 +584,7 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
570
584
|
justify-content: center;
|
|
571
585
|
width: 40px;
|
|
572
586
|
height: 40px;
|
|
587
|
+
margin: -2px;
|
|
573
588
|
padding: 0;
|
|
574
589
|
border: none;
|
|
575
590
|
background: none;
|
|
@@ -579,12 +594,11 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
579
594
|
cursor: pointer;
|
|
580
595
|
}
|
|
581
596
|
|
|
582
|
-
/*
|
|
583
|
-
like the thread action buttons. Sits under the emoji so an opaque selected fill can't hide it. */
|
|
597
|
+
/* Sits under the emoji so an opaque selected fill can't hide it. */
|
|
584
598
|
.tlui-cmt-emoji-picker__item::after {
|
|
585
599
|
content: '';
|
|
586
600
|
position: absolute;
|
|
587
|
-
inset:
|
|
601
|
+
inset: 4px;
|
|
588
602
|
z-index: -1;
|
|
589
603
|
border-radius: var(--tl-radius-2);
|
|
590
604
|
}
|
|
@@ -599,7 +613,6 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
599
613
|
background: color-mix(in srgb, var(--tl-color-selected) 28%, var(--tl-color-panel));
|
|
600
614
|
}
|
|
601
615
|
|
|
602
|
-
/* empty state */
|
|
603
616
|
.tlui-cmt-empty {
|
|
604
617
|
display: flex;
|
|
605
618
|
flex-direction: column;
|
|
@@ -621,8 +634,6 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
621
634
|
line-height: 1.4;
|
|
622
635
|
}
|
|
623
636
|
|
|
624
|
-
/* a comment thread: an elevated panel holding a header, an optional resolved banner, the
|
|
625
|
-
comments, and a reply composer */
|
|
626
637
|
/* The thread panel's layout metrics live on the container because two separate portals need them:
|
|
627
638
|
the panel itself, and the canvas hover preview, which has to land its first comment on exactly
|
|
628
639
|
the pixel the panel would. Deriving the preview's offset from these means the two can't drift —
|
|
@@ -637,16 +648,20 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
637
648
|
stops at the marker's edge instead of covering it. Mirrored by `MARKER_SIZE` in
|
|
638
649
|
thread-view.tsx. */
|
|
639
650
|
--tlui-cmt-marker-size: var(--tlui-cmt-pin-size);
|
|
640
|
-
/* How a marker
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
--tlui-cmt-marker-shadow:
|
|
644
|
-
|
|
651
|
+
/* How a marker rests and lifts. Shared so a pin and a badge respond identically. shadow-3's
|
|
652
|
+
depth without its `inset 1px panel-contrast` edge, which would ring the text-coloured count
|
|
653
|
+
badge in the panel's contrast colour. */
|
|
654
|
+
--tlui-cmt-marker-shadow:
|
|
655
|
+
0px 1px 2px hsl(0, 0%, 0%, 28%), 0px 2px 6px hsl(0, 0%, 0%, 14%),
|
|
656
|
+
inset 0px 0px 0px 1px var(--tl-color-panel-contrast);
|
|
657
|
+
--tlui-cmt-marker-shadow-hover:
|
|
658
|
+
0px 1px 2px hsl(0, 0%, 0%, 32%), 0px 2px 6px hsl(0, 0%, 0%, 14%),
|
|
659
|
+
inset 0px 0px 0px 1px var(--tl-color-panel-contrast);
|
|
645
660
|
--tlui-cmt-marker-hover-scale: 1.08;
|
|
646
661
|
--tlui-cmt-marker-transition: 0.08s ease;
|
|
647
662
|
--tlui-cmt-thread-padding: 12px;
|
|
648
663
|
--tlui-cmt-thread-gap: 0px;
|
|
649
|
-
/* Hit-area width of one .tlui-cmt-
|
|
664
|
+
/* Hit-area width of one .tlui-cmt-icon-btn button (drawn as a 32px square inset 4px). */
|
|
650
665
|
--tlui-cmt-thread-action-size: 40px;
|
|
651
666
|
/* A floating pill's edge — its hairline ring is the only thing separating it from the panel it
|
|
652
667
|
overlaps, so the ring is a theme token rather than a literal black: a near-black hairline
|
|
@@ -664,7 +679,6 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
664
679
|
border-radius: var(--tl-radius-4);
|
|
665
680
|
box-shadow: var(--tl-shadow-3);
|
|
666
681
|
}
|
|
667
|
-
/* A pill of its own, floating above the panel's top-right corner and overlapping its top edge. */
|
|
668
682
|
.tlui-cmt-thread__header {
|
|
669
683
|
position: absolute;
|
|
670
684
|
right: 10px;
|
|
@@ -677,17 +691,17 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
677
691
|
box-shadow: var(--tlui-cmt-pill-shadow);
|
|
678
692
|
transition: opacity 0.1s ease;
|
|
679
693
|
}
|
|
680
|
-
/* The first comment's hover actions surface right
|
|
681
|
-
|
|
694
|
+
/* The first comment's hover actions surface right under the header pill, so hide the pill while
|
|
695
|
+
that comment is hovered — one set of actions in the corner, never two stacked. */
|
|
682
696
|
.tlui-cmt-thread:has(.tlui-cmt-thread__list > :first-child:hover)
|
|
683
697
|
.tlui-cmt-thread__header:not(:has(.tlui-cmt-thread__title)) {
|
|
684
698
|
opacity: 0;
|
|
685
699
|
pointer-events: none;
|
|
686
700
|
}
|
|
687
|
-
/* A title puts the header back in the panel, in flow
|
|
688
|
-
|
|
689
|
-
would grow leftwards off the panel's edge
|
|
690
|
-
|
|
701
|
+
/* A title puts the header back in the panel, in flow — the case tldraw's own thread view uses
|
|
702
|
+
("Comment"). The pill above suits an actions-only header: right-anchored and only as wide as its
|
|
703
|
+
buttons, so a title inside it would grow leftwards off the panel's edge. `header` is public API
|
|
704
|
+
(see `CommentThreadProps`), so both layouts have to hold up. */
|
|
691
705
|
.tlui-cmt-thread__header:has(.tlui-cmt-thread__title) {
|
|
692
706
|
position: static;
|
|
693
707
|
align-items: center;
|
|
@@ -698,24 +712,22 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
698
712
|
}
|
|
699
713
|
.tlui-cmt-thread__title {
|
|
700
714
|
padding: 10px 12px;
|
|
701
|
-
|
|
702
|
-
line-height: 20px;
|
|
703
|
-
font-weight: 500;
|
|
704
|
-
color: var(--tl-color-text-1);
|
|
715
|
+
color: var(--tl-color-text);
|
|
705
716
|
}
|
|
706
717
|
.tlui-cmt-thread__actions {
|
|
707
718
|
display: flex;
|
|
708
719
|
gap: 0;
|
|
709
|
-
/* Right-align the actions whether or not the header has a title (
|
|
710
|
-
|
|
720
|
+
/* Right-align the actions whether or not the header has a title (with none, space-between alone
|
|
721
|
+
would leave them at the left). */
|
|
711
722
|
margin-left: auto;
|
|
712
723
|
}
|
|
713
|
-
/*
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
a toolbar button are set here, at .tlui-button's specificity + 1 so stylesheet order can't
|
|
717
|
-
decide the winner.
|
|
718
|
-
.
|
|
724
|
+
/* Every icon button in the comment UI: thread and sidebar headers, and a comment's own actions.
|
|
725
|
+
These are TldrawUiButtons (type="icon"), so the 40px box, the 32px ::after square carrying the
|
|
726
|
+
hover wash, and the hover z-index flip all come from .tlui-button. Only the bits that differ
|
|
727
|
+
from a toolbar button are set here, at .tlui-button's specificity + 1 so stylesheet order can't
|
|
728
|
+
decide the winner. `.tlui-cmt-thread__action` and `.tlui-cmt-header-btn` are the class's former
|
|
729
|
+
names, kept so a host's own buttons still pick the styles up. */
|
|
730
|
+
.tlui-button:is(.tlui-cmt-icon-btn, .tlui-cmt-thread__action, .tlui-cmt-header-btn) {
|
|
719
731
|
width: 40px;
|
|
720
732
|
padding: 0;
|
|
721
733
|
border-radius: 6px;
|
|
@@ -724,19 +736,29 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
724
736
|
line-height: 1;
|
|
725
737
|
}
|
|
726
738
|
/* Overlap each button 4px into the previous so the 32px visual squares sit 4px apart, not 8px.
|
|
727
|
-
|
|
728
|
-
.tlui-cmt-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
739
|
+
On the leading side only, so the last button's hit area still stops at its row's edge. */
|
|
740
|
+
:is(.tlui-cmt-icon-btn, .tlui-cmt-thread__action, .tlui-cmt-header-btn)
|
|
741
|
+
+ :is(.tlui-cmt-icon-btn, .tlui-cmt-thread__action, .tlui-cmt-header-btn) {
|
|
742
|
+
margin-inline-start: -4px;
|
|
743
|
+
}
|
|
744
|
+
@media (hover: hover) {
|
|
745
|
+
.tlui-button:is(.tlui-cmt-icon-btn, .tlui-cmt-thread__action, .tlui-cmt-header-btn):hover {
|
|
746
|
+
color: var(--tl-color-text-1);
|
|
747
|
+
}
|
|
733
748
|
}
|
|
734
|
-
|
|
735
|
-
.tlui-
|
|
749
|
+
.tlui-button:is(
|
|
750
|
+
.tlui-cmt-icon-btn,
|
|
751
|
+
.tlui-cmt-thread__action,
|
|
752
|
+
.tlui-cmt-header-btn
|
|
753
|
+
)[data-state='open'] {
|
|
736
754
|
color: var(--tl-color-text-1);
|
|
737
755
|
}
|
|
738
|
-
.tlui-button
|
|
739
|
-
|
|
756
|
+
.tlui-button:is(
|
|
757
|
+
.tlui-cmt-icon-btn,
|
|
758
|
+
.tlui-cmt-thread__action,
|
|
759
|
+
.tlui-cmt-header-btn
|
|
760
|
+
)[data-state='open']::after {
|
|
761
|
+
background: var(--tl-muted-gradient-to-bottom);
|
|
740
762
|
opacity: 1;
|
|
741
763
|
}
|
|
742
764
|
.tlui-cmt-thread__resolved {
|
|
@@ -769,7 +791,8 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
769
791
|
.tlui-cmt-thread .tlui-cmt-avatar,
|
|
770
792
|
.tlui-cmt-canvas-preview--thread .tlui-cmt-avatar,
|
|
771
793
|
.tlui-cmt-canvas-preview--list .tlui-cmt-avatar,
|
|
772
|
-
.tlui-cmt-stack-list .tlui-cmt-avatar
|
|
794
|
+
.tlui-cmt-stack-list .tlui-cmt-avatar,
|
|
795
|
+
.tlui-cmt-list .tlui-cmt-avatar {
|
|
773
796
|
width: 12px;
|
|
774
797
|
height: 12px;
|
|
775
798
|
font-size: 0;
|
|
@@ -782,35 +805,17 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
782
805
|
display: none;
|
|
783
806
|
}
|
|
784
807
|
|
|
785
|
-
/* The sidebar's rows use the same small colour dot as the thread view. */
|
|
786
|
-
.tlui-cmt-list .tlui-cmt-avatar {
|
|
787
|
-
width: 14px;
|
|
788
|
-
height: 14px;
|
|
789
|
-
font-size: 0;
|
|
790
|
-
margin-top: 2px;
|
|
791
|
-
}
|
|
792
|
-
/* The sidebar row already leads with its own avatar (the flex row's first column); the byline's
|
|
793
|
-
avatar — added for the canvas thread views — would double it, so hide the byline's inside a row. */
|
|
794
|
-
.tlui-cmt-list .tlui-cmt-head .tlui-cmt-avatar {
|
|
795
|
-
display: none;
|
|
796
|
-
}
|
|
797
|
-
|
|
798
|
-
/* The dot treatment is for colour-only identity — an image avatar stays full size. */
|
|
799
808
|
.tlui-cmt-thread .tlui-cmt-avatar--image,
|
|
800
809
|
.tlui-cmt-canvas-preview--thread .tlui-cmt-avatar--image,
|
|
801
810
|
.tlui-cmt-canvas-preview--list .tlui-cmt-avatar--image,
|
|
802
|
-
.tlui-cmt-stack-list .tlui-cmt-avatar--image
|
|
811
|
+
.tlui-cmt-stack-list .tlui-cmt-avatar--image,
|
|
812
|
+
.tlui-cmt-list .tlui-cmt-avatar--image {
|
|
803
813
|
/* Match the 12px colour dot's width so the body's calc(12px + 6px) indent still lines up under
|
|
804
814
|
the byline name when the author has an image rather than a dot. */
|
|
805
815
|
width: 12px;
|
|
806
816
|
height: 12px;
|
|
807
817
|
margin-top: 0;
|
|
808
818
|
}
|
|
809
|
-
.tlui-cmt-list .tlui-cmt-avatar--image {
|
|
810
|
-
width: 24px;
|
|
811
|
-
height: 24px;
|
|
812
|
-
margin-top: 0;
|
|
813
|
-
}
|
|
814
819
|
|
|
815
820
|
/* inside the panel, comments are plain content — no surrounding box; the composer's field carries
|
|
816
821
|
its own surface. The hover preview is the same panel without a header, so its comment is laid
|
|
@@ -827,31 +832,30 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
827
832
|
.tlui-cmt-thread .tlui-cmt-body,
|
|
828
833
|
.tlui-cmt-canvas-preview--thread .tlui-cmt-body,
|
|
829
834
|
.tlui-cmt-canvas-preview--list .tlui-cmt-body,
|
|
830
|
-
.tlui-cmt-stack-list .tlui-cmt-body
|
|
835
|
+
.tlui-cmt-stack-list .tlui-cmt-body,
|
|
836
|
+
.tlui-cmt-list .tlui-cmt-body {
|
|
831
837
|
padding-left: calc(12px + 6px);
|
|
832
838
|
}
|
|
833
|
-
/* Inside a panel the actions float as their own pill — the same pill the thread header is, in the
|
|
834
|
-
same corner (which is why the header hides while the first comment is hovered). It sits just
|
|
835
|
-
above the card's top edge rather than on the byline. */
|
|
836
839
|
/* Line the card actions up with the header actions: flush to the full-width card's right edge (the
|
|
837
|
-
panel edge,
|
|
840
|
+
panel edge, under the header's ⋯) and flush on the 40px byline row, so the 40px buttons fill it. */
|
|
838
841
|
.tlui-cmt-thread .tlui-cmt-card .tlui-cmt-card__actions {
|
|
839
842
|
top: 0;
|
|
840
843
|
right: 0;
|
|
841
844
|
}
|
|
842
|
-
/* The byline row is 40px: on the opened thread it fits the action
|
|
843
|
-
|
|
844
|
-
|
|
845
|
+
/* The byline row is 40px: on the opened thread it fits the action buttons (⋯ menu, react) in its
|
|
846
|
+
corner without the text running underneath; previews and stack lists carry the same height so
|
|
847
|
+
every comment row reads identically, solo or in a stack. */
|
|
845
848
|
.tlui-cmt-thread .tlui-cmt-card .tlui-cmt-head,
|
|
846
849
|
.tlui-cmt-canvas-preview--thread .tlui-cmt-card .tlui-cmt-head,
|
|
847
850
|
.tlui-cmt-canvas-preview--list .tlui-cmt-card .tlui-cmt-head,
|
|
848
|
-
.tlui-cmt-stack-list .tlui-cmt-card .tlui-cmt-head
|
|
851
|
+
.tlui-cmt-stack-list .tlui-cmt-card .tlui-cmt-head,
|
|
852
|
+
.tlui-cmt-list__item .tlui-cmt-head {
|
|
849
853
|
min-height: 40px;
|
|
850
854
|
}
|
|
851
|
-
/* Reserve head room only for
|
|
852
|
-
is a permissions question (canModifyComment), not ownership, and empty slots (read-only
|
|
853
|
-
keep the full row. Sized from the 40px hit areas (4px overlap), minus the card padding
|
|
854
|
-
right:0
|
|
855
|
+
/* Reserve head room only for buttons that actually rendered (one child / two children) — the count
|
|
856
|
+
is a permissions question (see canModifyComment), not ownership, and empty slots (read-only
|
|
857
|
+
viewers) keep the full row. Sized from the 40px hit areas (4px overlap), minus the card padding
|
|
858
|
+
the right:0 buttons sit over; text stops 4px shy of the visible square. */
|
|
855
859
|
.tlui-cmt-thread .tlui-cmt-card:has(.tlui-cmt-card__actions > *) .tlui-cmt-head {
|
|
856
860
|
padding-right: calc(var(--tlui-cmt-thread-action-size) - var(--tlui-cmt-thread-padding));
|
|
857
861
|
}
|
|
@@ -861,7 +865,6 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
861
865
|
);
|
|
862
866
|
}
|
|
863
867
|
|
|
864
|
-
/* comments list — thread summaries, one per row (used by the canvas sidebar) */
|
|
865
868
|
.tlui-cmt-list {
|
|
866
869
|
display: flex;
|
|
867
870
|
flex-direction: column;
|
|
@@ -874,99 +877,42 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
874
877
|
align-items: center;
|
|
875
878
|
justify-content: space-between;
|
|
876
879
|
gap: 8px;
|
|
877
|
-
|
|
878
|
-
|
|
880
|
+
/* Flush top and right, like the thread popover's header: the 40px buttons' 32px hover squares
|
|
881
|
+
then sit 4px in from the panel edge, and the title shares the popover's 12px inset. The
|
|
882
|
+
divider is an inset shadow, not a border, so the header stays the buttons' 40px tall. */
|
|
883
|
+
height: 40px;
|
|
884
|
+
padding: 0 0 0 12px;
|
|
879
885
|
}
|
|
880
886
|
.tlui-cmt-list__header-title {
|
|
881
887
|
font-size: 12px;
|
|
882
|
-
|
|
883
|
-
color: var(--tl-color-text-1);
|
|
888
|
+
color: var(--tl-color-text);
|
|
884
889
|
}
|
|
885
890
|
|
|
886
|
-
/* An icon button in the sidebar header (filter funnel, overflow …). Sized like the thread actions:
|
|
887
|
-
a TldrawUiButton (type="icon") left at its native 40px box, with .tlui-button's 32px ::after
|
|
888
|
-
square carrying the hover wash. Only the bits that differ are set here, at .tlui-button's
|
|
889
|
-
specificity + 1 so stylesheet order can't decide the winner. */
|
|
890
|
-
.tlui-button.tlui-cmt-header-btn {
|
|
891
|
-
width: 40px;
|
|
892
|
-
padding: 0;
|
|
893
|
-
border-radius: 6px;
|
|
894
|
-
color: var(--tl-color-text-2);
|
|
895
|
-
}
|
|
896
|
-
/* Overlap each button 4px into the previous so the 32px visual squares sit 4px apart, not 8px —
|
|
897
|
-
the same tiling the thread actions use. */
|
|
898
|
-
.tlui-cmt-header-btn + .tlui-cmt-header-btn {
|
|
899
|
-
margin-left: -4px;
|
|
900
|
-
}
|
|
901
|
-
.tlui-button.tlui-cmt-header-btn:hover,
|
|
902
|
-
.tlui-button.tlui-cmt-header-btn[data-state='open'] {
|
|
903
|
-
color: var(--tl-color-text-1);
|
|
904
|
-
}
|
|
905
891
|
.tlui-cmt-list__header-actions {
|
|
906
892
|
display: flex;
|
|
907
893
|
align-items: center;
|
|
908
894
|
}
|
|
909
895
|
|
|
910
|
-
/* The commenting dropdowns' surface — a little air between the items and the menu edge. */
|
|
911
|
-
.tlui-cmt-menu {
|
|
912
|
-
min-width: 100px;
|
|
913
|
-
padding: 4px;
|
|
914
|
-
}
|
|
915
|
-
|
|
916
|
-
/* a menu row with a label and a right-aligned shortcut hint (overflow menu) */
|
|
917
|
-
.tlui-cmt-menu-item {
|
|
918
|
-
position: relative;
|
|
919
|
-
display: flex;
|
|
920
|
-
align-items: center;
|
|
921
|
-
justify-content: space-between;
|
|
922
|
-
gap: 24px;
|
|
923
|
-
width: 100%;
|
|
924
|
-
min-height: 40px;
|
|
925
|
-
padding: 0 10px;
|
|
926
|
-
border: none;
|
|
927
|
-
background: transparent;
|
|
928
|
-
font: inherit;
|
|
929
|
-
font-size: 12px;
|
|
930
|
-
color: var(--tl-color-text-1);
|
|
931
|
-
cursor: pointer;
|
|
932
|
-
}
|
|
933
|
-
/* 36px visual inset within the 40px row — the hover wash the action and emoji buttons use. */
|
|
934
|
-
.tlui-cmt-menu-item::after {
|
|
935
|
-
content: '';
|
|
936
|
-
position: absolute;
|
|
937
|
-
inset: 2px;
|
|
938
|
-
border-radius: var(--tl-radius-2);
|
|
939
|
-
}
|
|
940
|
-
.tlui-cmt-menu-item:hover::after {
|
|
941
|
-
background: var(--tl-color-muted-2);
|
|
942
|
-
}
|
|
943
|
-
/* Destructive menu entries (delete) — the same danger colour as tldraw's danger buttons. */
|
|
944
|
-
.tlui-cmt-menu-item--danger {
|
|
945
|
-
color: var(--tl-color-danger);
|
|
946
|
-
}
|
|
947
|
-
|
|
948
|
-
.tlui-cmt-menu-item__shortcut {
|
|
949
|
-
color: var(--tl-color-text-3);
|
|
950
|
-
font-size: 12px;
|
|
951
|
-
}
|
|
952
896
|
.tlui-cmt-list__items {
|
|
953
897
|
flex: 1;
|
|
954
898
|
min-height: 0;
|
|
955
899
|
overflow-y: auto;
|
|
956
900
|
}
|
|
957
901
|
.tlui-cmt-list__empty {
|
|
958
|
-
|
|
959
|
-
|
|
902
|
+
/* extra 2px at the bottom of the list */
|
|
903
|
+
padding: 12px 12px 14px 12px;
|
|
904
|
+
font-weight: 400;
|
|
960
905
|
font-size: 12px;
|
|
906
|
+
min-height: 40px;
|
|
961
907
|
}
|
|
962
908
|
.tlui-cmt-list__item {
|
|
963
909
|
position: relative;
|
|
964
910
|
display: flex;
|
|
965
911
|
gap: 10px;
|
|
966
912
|
width: 100%;
|
|
967
|
-
padding:
|
|
913
|
+
/* No top padding: the 40px byline row supplies the space above the name, as on a thread card. */
|
|
914
|
+
padding: 0 12px 8px;
|
|
968
915
|
border: none;
|
|
969
|
-
border-bottom: 1px solid var(--tl-color-divider);
|
|
970
916
|
background: transparent;
|
|
971
917
|
font: inherit;
|
|
972
918
|
text-align: left;
|
|
@@ -980,7 +926,7 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
980
926
|
.tlui-cmt-list__item::after {
|
|
981
927
|
content: '';
|
|
982
928
|
position: absolute;
|
|
983
|
-
inset: 4px;
|
|
929
|
+
inset: 4px 4px 0px 4px;
|
|
984
930
|
border-radius: var(--tl-radius-2);
|
|
985
931
|
pointer-events: none;
|
|
986
932
|
}
|
|
@@ -1008,8 +954,8 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
1008
954
|
min-width: 0;
|
|
1009
955
|
}
|
|
1010
956
|
.tlui-cmt-list__item-preview {
|
|
1011
|
-
margin-top: 2px;
|
|
1012
957
|
font-size: 12px;
|
|
958
|
+
line-height: 1.4;
|
|
1013
959
|
color: var(--tl-color-text-1);
|
|
1014
960
|
overflow: hidden;
|
|
1015
961
|
text-overflow: ellipsis;
|
|
@@ -1020,7 +966,6 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
1020
966
|
mid-string — same treatment as the card body. */
|
|
1021
967
|
overflow-wrap: anywhere;
|
|
1022
968
|
}
|
|
1023
|
-
/* meta line under the preview: page label and/or a resolved marker */
|
|
1024
969
|
.tlui-cmt-list__item-meta {
|
|
1025
970
|
display: flex;
|
|
1026
971
|
align-items: center;
|
|
@@ -1031,22 +976,30 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
1031
976
|
}
|
|
1032
977
|
.tlui-cmt-list__item-resolved {
|
|
1033
978
|
display: inline-flex;
|
|
979
|
+
flex-shrink: 0;
|
|
1034
980
|
align-items: center;
|
|
1035
981
|
gap: 3px;
|
|
1036
|
-
font-weight: 600;
|
|
1037
982
|
}
|
|
983
|
+
/* Block, not flex: an ellipsis only applies to text in a block container, not to a flex item's
|
|
984
|
+
anonymous text. */
|
|
1038
985
|
.tlui-cmt-list__item-page {
|
|
1039
|
-
display:
|
|
1040
|
-
|
|
986
|
+
display: block;
|
|
987
|
+
min-width: 0;
|
|
988
|
+
overflow: hidden;
|
|
989
|
+
text-overflow: ellipsis;
|
|
990
|
+
white-space: nowrap;
|
|
1041
991
|
padding: 1px 6px;
|
|
1042
992
|
border-radius: 4px;
|
|
1043
|
-
|
|
993
|
+
}
|
|
994
|
+
/* Same alignment as the reactions row; only when it leads, since "Resolved" has no padding. */
|
|
995
|
+
.tlui-cmt-list__item-page:first-child {
|
|
996
|
+
margin-left: -6px;
|
|
1044
997
|
}
|
|
1045
998
|
.tlui-cmt-list__item-replies {
|
|
1046
999
|
display: inline-flex;
|
|
1000
|
+
flex-shrink: 0;
|
|
1047
1001
|
align-items: center;
|
|
1048
1002
|
}
|
|
1049
|
-
/* reply count under a preview card's opening comment — the thread continues past what's shown */
|
|
1050
1003
|
.tlui-cmt-card__replies {
|
|
1051
1004
|
display: block;
|
|
1052
1005
|
margin-top: 6px;
|
|
@@ -1117,10 +1070,6 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
1117
1070
|
outline: 2px solid var(--tl-color-selected);
|
|
1118
1071
|
outline-offset: 2px;
|
|
1119
1072
|
}
|
|
1120
|
-
/* Focus should read like hover, so the pin lifts the same way when tabbed to. */
|
|
1121
|
-
.tlui-cmt-canvas-pin__marker:focus-visible .tlui-cmt-marker {
|
|
1122
|
-
transform: scale(var(--tlui-cmt-marker-hover-scale));
|
|
1123
|
-
}
|
|
1124
1073
|
|
|
1125
1074
|
.tlui-cmt-cluster-fade {
|
|
1126
1075
|
opacity: 1;
|
|
@@ -1155,6 +1104,10 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
1155
1104
|
.tlui-cmt-canvas-pin--open {
|
|
1156
1105
|
z-index: 1;
|
|
1157
1106
|
}
|
|
1107
|
+
/* A pin being dragged rides over everything it passes, the open thread's pin included. */
|
|
1108
|
+
.tlui-cmt-canvas-pin--dragging {
|
|
1109
|
+
z-index: 2;
|
|
1110
|
+
}
|
|
1158
1111
|
|
|
1159
1112
|
/* The count badge standing in for a stack of coincident pins — same face as a cluster badge,
|
|
1160
1113
|
but clicking opens the stack's thread list rather than zooming (no zoom can separate them).
|
|
@@ -1175,7 +1128,6 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
1175
1128
|
.tlui-cmt-canvas-stack-badge:focus-visible .tlui-cmt-marker {
|
|
1176
1129
|
outline: 2px solid var(--tl-color-selected);
|
|
1177
1130
|
outline-offset: 2px;
|
|
1178
|
-
transform: scale(var(--tlui-cmt-marker-hover-scale));
|
|
1179
1131
|
}
|
|
1180
1132
|
|
|
1181
1133
|
/* The stack's popover content: one card per thread, the expanded thread inline among them. */
|
|
@@ -1329,31 +1281,39 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
1329
1281
|
cursor: pointer;
|
|
1330
1282
|
}
|
|
1331
1283
|
|
|
1332
|
-
/* Every card surface that
|
|
1333
|
-
the single-comment preview panel. One rule, because they're the same object to the eye.
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1284
|
+
/* Every card surface that highlights on hover — a collapsed thread in a stack list, a preview
|
|
1285
|
+
card, and the single-comment preview panel. One rule, because they're the same object to the eye.
|
|
1286
|
+
The highlight is an inset, rounded wash like a menu item's, not a tint of the whole surface: the
|
|
1287
|
+
card stays panel-white and a wash sits 4px inside its edge, its corners following the card's.
|
|
1288
|
+
It paints behind the content (`isolation` keeps the -1 z-index above the card's own fill). */
|
|
1289
|
+
.tlui-cmt-stack-list__card,
|
|
1290
|
+
.tlui-cmt-preview-card--selectable,
|
|
1291
|
+
.tlui-cmt-canvas-preview__panel--thread.tlui-cmt-canvas-preview__panel--selectable {
|
|
1292
|
+
position: relative;
|
|
1293
|
+
isolation: isolate;
|
|
1294
|
+
}
|
|
1295
|
+
.tlui-cmt-stack-list__card::after,
|
|
1296
|
+
.tlui-cmt-preview-card--selectable::after,
|
|
1297
|
+
.tlui-cmt-canvas-preview__panel--thread.tlui-cmt-canvas-preview__panel--selectable::after {
|
|
1298
|
+
content: '';
|
|
1299
|
+
position: absolute;
|
|
1300
|
+
inset: 4px;
|
|
1301
|
+
z-index: -1;
|
|
1302
|
+
/* The cards' 12px radius, less the inset. */
|
|
1303
|
+
border-radius: 8px;
|
|
1304
|
+
pointer-events: none;
|
|
1305
|
+
}
|
|
1306
|
+
.tlui-cmt-canvas-preview__panel--thread.tlui-cmt-canvas-preview__panel--selectable::after {
|
|
1307
|
+
border-radius: calc(var(--tl-radius-4) - 4px);
|
|
1308
|
+
}
|
|
1309
|
+
.tlui-cmt-stack-list__card:hover::after,
|
|
1310
|
+
.tlui-cmt-preview-card--selectable:hover::after,
|
|
1311
|
+
.tlui-cmt-canvas-preview__panel--thread.tlui-cmt-canvas-preview__panel--selectable:hover::after {
|
|
1312
|
+
background: var(--tl-color-muted-2);
|
|
1313
|
+
}
|
|
1345
1314
|
.tlui-cmt-stack-list__card:hover,
|
|
1346
1315
|
.tlui-cmt-preview-card--selectable:hover,
|
|
1347
1316
|
.tlui-cmt-canvas-preview__panel--thread.tlui-cmt-canvas-preview__panel--selectable:hover {
|
|
1348
|
-
--tlui-cmt-preview-hover-surface: color-mix(
|
|
1349
|
-
in srgb,
|
|
1350
|
-
var(--tl-color-low) 50%,
|
|
1351
|
-
var(--tl-color-panel)
|
|
1352
|
-
);
|
|
1353
|
-
background: var(--tlui-cmt-preview-hover-surface);
|
|
1354
|
-
box-shadow:
|
|
1355
|
-
inset 0 0 0 1px var(--tlui-cmt-preview-hover-surface),
|
|
1356
|
-
var(--tl-shadow-3);
|
|
1357
1317
|
cursor: pointer;
|
|
1358
1318
|
}
|
|
1359
1319
|
|
|
@@ -1397,23 +1357,45 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
1397
1357
|
.tlui-cmt-canvas-region {
|
|
1398
1358
|
position: absolute;
|
|
1399
1359
|
pointer-events: none;
|
|
1400
|
-
border: 2px dashed var(--tl-color-selected);
|
|
1401
|
-
border-radius: 6px;
|
|
1402
1360
|
background: color-mix(in srgb, var(--tl-color-selected) 10%, transparent);
|
|
1403
1361
|
}
|
|
1362
|
+
.tlui-cmt-canvas-region__outline {
|
|
1363
|
+
position: absolute;
|
|
1364
|
+
inset: 0;
|
|
1365
|
+
overflow: visible;
|
|
1366
|
+
fill: none;
|
|
1367
|
+
stroke: var(--tl-color-selection-stroke);
|
|
1368
|
+
stroke-width: 1.5px;
|
|
1369
|
+
stroke-linecap: round;
|
|
1370
|
+
}
|
|
1404
1371
|
|
|
1405
|
-
|
|
1372
|
+
.tlui-cmt-canvas-region-handles {
|
|
1373
|
+
display: contents;
|
|
1374
|
+
}
|
|
1375
|
+
|
|
1376
|
+
/* Corner resize handles on a region box (three corners; the pin corner is the move handle). The
|
|
1377
|
+
element is the hit square, sized from the selection's corner hit area (see
|
|
1378
|
+
`selectionCornerSizing`); the visible square is drawn like a selection corner: an 8px fill with a
|
|
1379
|
+
1.5px stroke centred on its edge. */
|
|
1406
1380
|
.tlui-cmt-canvas-region-handle {
|
|
1407
1381
|
position: absolute;
|
|
1408
|
-
width: 9px;
|
|
1409
|
-
height: 9px;
|
|
1410
1382
|
transform: translate(-50%, -50%);
|
|
1411
|
-
background: var(--tl-color-panel);
|
|
1412
|
-
border: 1.5px solid var(--tl-color-selected);
|
|
1413
|
-
border-radius: 2px;
|
|
1414
1383
|
pointer-events: auto;
|
|
1415
1384
|
touch-action: none;
|
|
1416
1385
|
}
|
|
1386
|
+
.tlui-cmt-canvas-region-handle::before {
|
|
1387
|
+
content: '';
|
|
1388
|
+
position: absolute;
|
|
1389
|
+
left: 50%;
|
|
1390
|
+
top: 50%;
|
|
1391
|
+
/* Not covered by the container's `*` border-box rule, which doesn't match pseudo-elements. */
|
|
1392
|
+
box-sizing: border-box;
|
|
1393
|
+
width: 9.5px;
|
|
1394
|
+
height: 9.5px;
|
|
1395
|
+
transform: translate(-50%, -50%);
|
|
1396
|
+
background: var(--tl-color-background);
|
|
1397
|
+
border: 1.5px solid var(--tl-color-selection-stroke);
|
|
1398
|
+
}
|
|
1417
1399
|
|
|
1418
1400
|
/* Anchor the pin by its bottom-left corner, so the marker's one sharp corner (the pin shape's
|
|
1419
1401
|
3px bottom-left) points at the exact anchor point. */
|
|
@@ -1545,14 +1527,20 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
1545
1527
|
.tlui-cmt-canvas-composer .tlui-cmt-input__placeholder {
|
|
1546
1528
|
left: 12px;
|
|
1547
1529
|
}
|
|
1548
|
-
/* The draft avatar previews the pin it becomes
|
|
1549
|
-
|
|
1550
|
-
hover affordances (scale + shadow bump), but keeps a 40×40 hit area (the ::after below). */
|
|
1530
|
+
/* The draft avatar previews the pin it becomes and is the draft's drag handle. It keeps a 40×40 hit
|
|
1531
|
+
area (the ::after below). */
|
|
1551
1532
|
.tlui-cmt-canvas-composer .tlui-cmt-pin {
|
|
1552
1533
|
position: relative;
|
|
1553
1534
|
box-shadow: var(--tl-shadow-2);
|
|
1554
1535
|
cursor: default;
|
|
1555
1536
|
}
|
|
1537
|
+
.tlui-cmt-canvas-composer__handle {
|
|
1538
|
+
touch-action: none;
|
|
1539
|
+
}
|
|
1540
|
+
.tlui-cmt-canvas-composer--dragging .tlui-cmt-canvas-composer__handle,
|
|
1541
|
+
.tlui-cmt-canvas-composer--dragging .tlui-cmt-pin {
|
|
1542
|
+
cursor: var(--tl-cursor-move);
|
|
1543
|
+
}
|
|
1556
1544
|
.tlui-cmt-canvas-composer .tlui-cmt-pin::after {
|
|
1557
1545
|
content: '';
|
|
1558
1546
|
position: absolute;
|