@tldraw/commenting 5.7.0-canary.fb3426ffa934 → 5.7.0-internal.5fe8922939ec
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 +277 -275
- package/dist-cjs/canvas/canvas-events.js +25 -1
- package/dist-cjs/canvas/canvas-events.js.map +2 -2
- package/dist-cjs/canvas/comment-mutations.js +5 -0
- package/dist-cjs/canvas/comment-mutations.js.map +2 -2
- package/dist-cjs/canvas/comment-tool.js +29 -28
- 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 +1 -0
- package/dist-cjs/canvas/comments-overlay.js.map +2 -2
- package/dist-cjs/canvas/comments-sidebar.js +15 -3
- 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/options.js +12 -0
- package/dist-cjs/canvas/options.js.map +2 -2
- package/dist-cjs/canvas/pending-composer.js +139 -9
- 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 +20 -4
- package/dist-cjs/canvas/thread-pin.js.map +2 -2
- package/dist-cjs/canvas/thread-view.js +134 -58
- package/dist-cjs/canvas/thread-view.js.map +2 -2
- package/dist-cjs/index.d.ts +46 -12
- package/dist-cjs/index.js +1 -1
- package/dist-cjs/ui/byline.js +2 -2
- package/dist-cjs/ui/byline.js.map +2 -2
- package/dist-cjs/ui/comment-card.js +3 -1
- package/dist-cjs/ui/comment-card.js.map +2 -2
- package/dist-cjs/ui/comment-extensions.js +4 -1
- package/dist-cjs/ui/comment-extensions.js.map +2 -2
- package/dist-cjs/ui/comments-list.js +6 -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 +2 -2
- 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-mutations.mjs +5 -0
- package/dist-esm/canvas/comment-mutations.mjs.map +2 -2
- package/dist-esm/canvas/comment-tool.mjs +30 -29
- 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 +1 -0
- package/dist-esm/canvas/comments-overlay.mjs.map +2 -2
- package/dist-esm/canvas/comments-sidebar.mjs +16 -4
- 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/options.mjs +12 -0
- package/dist-esm/canvas/options.mjs.map +2 -2
- package/dist-esm/canvas/pending-composer.mjs +150 -11
- 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 +22 -6
- package/dist-esm/canvas/thread-pin.mjs.map +2 -2
- package/dist-esm/canvas/thread-view.mjs +145 -60
- package/dist-esm/canvas/thread-view.mjs.map +2 -2
- package/dist-esm/index.d.mts +46 -12
- package/dist-esm/index.mjs +1 -1
- package/dist-esm/ui/byline.mjs +2 -2
- package/dist-esm/ui/byline.mjs.map +2 -2
- package/dist-esm/ui/comment-card.mjs +3 -1
- package/dist-esm/ui/comment-card.mjs.map +2 -2
- package/dist-esm/ui/comment-extensions.mjs +11 -2
- package/dist-esm/ui/comment-extensions.mjs.map +2 -2
- package/dist-esm/ui/comments-list.mjs +6 -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 +2 -2
- 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-mutations.test.ts +51 -0
- package/src/canvas/comment-mutations.ts +14 -0
- package/src/canvas/comment-render.test.ts +8 -1
- package/src/canvas/comment-tool.test.ts +34 -44
- package/src/canvas/comment-tool.tsx +51 -55
- package/src/canvas/comments-filter-menu.tsx +19 -6
- package/src/canvas/comments-overflow-menu.tsx +12 -18
- package/src/canvas/comments-overlay.tsx +5 -2
- package/src/canvas/comments-sidebar.tsx +20 -5
- package/src/canvas/comments-visibility-toggle.tsx +1 -1
- package/src/canvas/options.test.ts +23 -1
- package/src/canvas/options.ts +41 -3
- package/src/canvas/pending-composer.tsx +190 -19
- package/src/canvas/region-box.tsx +192 -42
- package/src/canvas/thread-pin.tsx +28 -6
- package/src/canvas/thread-view.test.ts +39 -0
- package/src/canvas/thread-view.tsx +192 -72
- package/src/ui/byline.tsx +5 -2
- package/src/ui/comment-card.tsx +7 -1
- package/src/ui/comment-extensions.ts +18 -5
- package/src/ui/comments-list.tsx +23 -17
- package/src/ui/comments.css +175 -201
- package/src/ui/icons.tsx +5 -5
- package/src/ui/reaction-picker.tsx +2 -2
- package/src/ui/send-button.tsx +2 -2
package/commenting.css
CHANGED
|
@@ -28,56 +28,48 @@
|
|
|
28
28
|
border-radius: 4px;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
/* mention picker
|
|
32
|
-
.tlui-
|
|
31
|
+
/* mention picker — row size, highlight, panel and shadow come from .tlui-menu and
|
|
32
|
+
.tlui-button__menu; these rules only lay out the row's contents. */
|
|
33
|
+
.tlui-menu.tlui-cmt-mention-list {
|
|
33
34
|
display: flex;
|
|
34
35
|
flex-direction: column;
|
|
35
|
-
gap: 4px;
|
|
36
|
-
padding: 4px;
|
|
37
36
|
width: 100%;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
color: var(--tl-color-text-1
|
|
42
|
-
background: var(--tl-color-panel, #fff);
|
|
43
|
-
border-radius: 10px;
|
|
44
|
-
/* shadow-3 (like the context menu) already carries a 1px inset edge — a separate `border`
|
|
45
|
-
on top of it double-outlines the popup. */
|
|
46
|
-
box-shadow: var(--tl-shadow-3, 0 2px 12px rgba(0, 0, 0, 0.14));
|
|
37
|
+
/* Fits MAX_SUGGESTIONS (8) menu rows: .tlui-menu hides its scrollbar and the active row
|
|
38
|
+
isn't scrolled into view, so a cut-off last row would be unreachable. */
|
|
39
|
+
max-height: 296px;
|
|
40
|
+
color: var(--tl-color-text-1);
|
|
47
41
|
}
|
|
48
42
|
|
|
49
|
-
.tlui-cmt-mention-list__item {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
border-radius: 6px;
|
|
57
|
-
cursor: pointer;
|
|
58
|
-
text-align: left;
|
|
59
|
-
color: var(--tl-color-text-1);
|
|
60
|
-
font: inherit;
|
|
43
|
+
.tlui-cmt-mention-list .tlui-cmt-mention-list__item {
|
|
44
|
+
/* min-height rather than the menu row's fixed 40px, so a taller renderMember row can grow. */
|
|
45
|
+
height: auto;
|
|
46
|
+
min-height: 40px;
|
|
47
|
+
flex-shrink: 0;
|
|
48
|
+
justify-content: flex-start;
|
|
49
|
+
text-align: start;
|
|
61
50
|
}
|
|
62
51
|
|
|
63
|
-
.tlui-cmt-mention-list__item
|
|
64
|
-
|
|
65
|
-
|
|
52
|
+
.tlui-cmt-mention-list__item .tlui-cmt-avatar {
|
|
53
|
+
width: 20px;
|
|
54
|
+
height: 20px;
|
|
55
|
+
font-size: 10px;
|
|
66
56
|
}
|
|
67
57
|
|
|
58
|
+
/* Name and secondary share one line so a row never outgrows the menu-row height. */
|
|
68
59
|
.tlui-cmt-mention-list__text {
|
|
69
60
|
display: flex;
|
|
70
|
-
|
|
61
|
+
align-items: baseline;
|
|
62
|
+
gap: 6px;
|
|
71
63
|
min-width: 0;
|
|
72
|
-
line-height: 1.3;
|
|
73
64
|
}
|
|
74
65
|
|
|
75
66
|
.tlui-cmt-mention-list__name {
|
|
76
67
|
font-size: 12px;
|
|
77
|
-
font-weight: 500;
|
|
78
68
|
white-space: nowrap;
|
|
79
69
|
overflow: hidden;
|
|
80
70
|
text-overflow: ellipsis;
|
|
71
|
+
flex-shrink: 0;
|
|
72
|
+
max-width: 100%;
|
|
81
73
|
}
|
|
82
74
|
|
|
83
75
|
.tlui-cmt-mention-list__you {
|
|
@@ -94,12 +86,13 @@
|
|
|
94
86
|
text-overflow: ellipsis;
|
|
95
87
|
}
|
|
96
88
|
|
|
97
|
-
.tlui-cmt-mention-list--empty {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
89
|
+
.tlui-menu.tlui-cmt-mention-list--empty {
|
|
90
|
+
flex-direction: row;
|
|
91
|
+
align-items: center;
|
|
92
|
+
height: 40px;
|
|
93
|
+
padding: 0 12px;
|
|
101
94
|
color: var(--tl-color-text-3);
|
|
102
|
-
font-size:
|
|
95
|
+
font-size: 12px;
|
|
103
96
|
}
|
|
104
97
|
|
|
105
98
|
/* the @-picker popup — anchored under the editor field, positioned by the suggestion plugin */
|
|
@@ -108,8 +101,6 @@
|
|
|
108
101
|
z-index: var(--tl-layer-menus);
|
|
109
102
|
}
|
|
110
103
|
|
|
111
|
-
/* Real comment UI components. Co-located so styles travel to any view (studio,
|
|
112
|
-
canvas), and themed via tldraw's --tl-color tokens so they follow light/dark. */
|
|
113
104
|
.tlui-cmt-card {
|
|
114
105
|
position: relative;
|
|
115
106
|
display: flex;
|
|
@@ -128,7 +119,6 @@
|
|
|
128
119
|
padding-left: calc(28px + 6px);
|
|
129
120
|
}
|
|
130
121
|
|
|
131
|
-
/* hover-revealed controls (edit, react…) stacked at the card's top-right */
|
|
132
122
|
.tlui-cmt-card__actions {
|
|
133
123
|
position: absolute;
|
|
134
124
|
top: 6px;
|
|
@@ -138,12 +128,22 @@
|
|
|
138
128
|
opacity: 0;
|
|
139
129
|
}
|
|
140
130
|
.tlui-cmt-card:hover .tlui-cmt-card__actions,
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
131
|
+
/* Keyboard focus, not any focus: closing an edit hands focus back to the card's ⋯ button, and that
|
|
132
|
+
alone mustn't leave the controls up for a pointer that has moved away. */
|
|
133
|
+
.tlui-cmt-card:has(:focus-visible) .tlui-cmt-card__actions,
|
|
134
|
+
/* an open menu is portaled out of the card, so neither :hover nor focus survives moving the
|
|
135
|
+
pointer into it — keep the controls up while their menu is open */
|
|
144
136
|
.tlui-cmt-card__actions:has([data-state='open']) {
|
|
145
137
|
opacity: 1;
|
|
146
138
|
}
|
|
139
|
+
/* The editor only rings a focused button once Tab or an arrow key has turned its focus ring on, but
|
|
140
|
+
leaving an edit with Escape or Enter hands keyboard focus to the card's ⋯ button without either,
|
|
141
|
+
which would leave the keyboard user nothing showing where focus went. Same ring as the editor's. */
|
|
142
|
+
.tlui-cmt-card__actions .tlui-button:focus-visible {
|
|
143
|
+
border-radius: 10px;
|
|
144
|
+
outline: 2px solid var(--tl-color-focus);
|
|
145
|
+
outline-offset: -5px;
|
|
146
|
+
}
|
|
147
147
|
|
|
148
148
|
.tlui-cmt-body {
|
|
149
149
|
flex: 1;
|
|
@@ -154,12 +154,13 @@
|
|
|
154
154
|
display: flex;
|
|
155
155
|
align-items: center;
|
|
156
156
|
gap: 6px;
|
|
157
|
+
margin-bottom: -4px;
|
|
157
158
|
}
|
|
158
159
|
|
|
159
160
|
.tlui-cmt-author {
|
|
160
161
|
font-weight: 500;
|
|
161
162
|
font-size: 12px;
|
|
162
|
-
color: var(--tl-color-text
|
|
163
|
+
color: var(--tl-color-text);
|
|
163
164
|
/* a long name ellipsizes rather than pushing the time out or running under the actions */
|
|
164
165
|
min-width: 0;
|
|
165
166
|
overflow: hidden;
|
|
@@ -174,8 +175,6 @@
|
|
|
174
175
|
white-space: nowrap;
|
|
175
176
|
}
|
|
176
177
|
|
|
177
|
-
/* In the hover preview a long comment truncates with an ellipsis rather than growing the card —
|
|
178
|
-
~7 lines (≈120px at this line height). Preview only. */
|
|
179
178
|
.tlui-cmt-canvas-preview--thread .tlui-cmt-text {
|
|
180
179
|
display: -webkit-box;
|
|
181
180
|
-webkit-box-orient: vertical;
|
|
@@ -202,13 +201,53 @@
|
|
|
202
201
|
-webkit-user-select: text;
|
|
203
202
|
user-select: text;
|
|
204
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
|
+
}
|
|
205
246
|
|
|
206
247
|
.tlui-cmt-edited {
|
|
207
248
|
font-style: italic;
|
|
208
249
|
}
|
|
209
250
|
|
|
210
|
-
/* rendered rich text inside a comment body — bare tags emitted by the comment renderer
|
|
211
|
-
(paragraphs, lists, code, highlight, links), matching the limited comment extension set. */
|
|
212
251
|
.tlui-cmt-text p {
|
|
213
252
|
margin: 0;
|
|
214
253
|
}
|
|
@@ -248,9 +287,7 @@
|
|
|
248
287
|
|
|
249
288
|
/* Avatar and mention styles live in @tldraw/mentions and are imported by commenting.css. */
|
|
250
289
|
|
|
251
|
-
/*
|
|
252
|
-
Formatting is applied via markdown and keyboard shortcuts (no toolbar). The avatar aligns to the
|
|
253
|
-
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. */
|
|
254
291
|
.tlui-cmt-composer {
|
|
255
292
|
display: flex;
|
|
256
293
|
align-items: flex-start;
|
|
@@ -282,7 +319,6 @@
|
|
|
282
319
|
the full width and the send button drops to its own row, right-aligned. */
|
|
283
320
|
.tlui-cmt-composer__field--expanded {
|
|
284
321
|
flex-wrap: wrap;
|
|
285
|
-
/* No vertical gap between the input and the send-button row it wraps onto. */
|
|
286
322
|
row-gap: 0;
|
|
287
323
|
}
|
|
288
324
|
.tlui-cmt-composer__field--expanded .tlui-cmt-composer__input-wrap {
|
|
@@ -295,7 +331,6 @@
|
|
|
295
331
|
margin-left: auto;
|
|
296
332
|
}
|
|
297
333
|
|
|
298
|
-
/* the editable area, with the placeholder overlaid while it's empty */
|
|
299
334
|
.tlui-cmt-composer__input-wrap {
|
|
300
335
|
position: relative;
|
|
301
336
|
flex: 1;
|
|
@@ -365,8 +400,6 @@
|
|
|
365
400
|
}
|
|
366
401
|
}
|
|
367
402
|
|
|
368
|
-
/* A bare up-arrow icon button (matching the placement composer): no fill by default, a grey square
|
|
369
|
-
on hover, grey while there's nothing to send and dark once there is. */
|
|
370
403
|
.tlui-cmt-send {
|
|
371
404
|
flex-shrink: 0;
|
|
372
405
|
display: inline-flex;
|
|
@@ -408,8 +441,9 @@
|
|
|
408
441
|
}
|
|
409
442
|
|
|
410
443
|
/* The shared marker treatment. To the pointer a comment pin and a count badge are the same
|
|
411
|
-
object — a token sitting on the canvas — so
|
|
412
|
-
|
|
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. */
|
|
413
447
|
.tlui-cmt-marker {
|
|
414
448
|
box-shadow: var(--tlui-cmt-marker-shadow);
|
|
415
449
|
cursor: pointer;
|
|
@@ -422,52 +456,45 @@
|
|
|
422
456
|
transform: scale(var(--tlui-cmt-marker-hover-scale));
|
|
423
457
|
}
|
|
424
458
|
|
|
425
|
-
/* The hover shadow is for closed markers only — an open one keeps its selection ring, which this
|
|
426
|
-
box-shadow would otherwise override (the hover selector outranks the --open rule). */
|
|
427
459
|
.tlui-cmt-marker:not(.tlui-cmt-marker--open):hover {
|
|
428
460
|
box-shadow: var(--tlui-cmt-marker-shadow-hover);
|
|
429
461
|
}
|
|
430
462
|
|
|
431
|
-
/* Count badges don't react to hover — no scale, no shadow lift. Only pins do. */
|
|
432
463
|
.tlui-cmt-count-badge:hover {
|
|
433
464
|
transform: none;
|
|
434
|
-
box-shadow: var(--tlui-cmt-marker-shadow);
|
|
465
|
+
box-shadow: var(--tlui-cmt-marker-shadow-hover);
|
|
435
466
|
}
|
|
436
467
|
|
|
437
|
-
/*
|
|
468
|
+
/* A pin's own :hover doesn't scale it; on the canvas, canvas.css scales it from the hit layer. */
|
|
438
469
|
.tlui-cmt-pin:hover {
|
|
439
470
|
transform: none;
|
|
440
471
|
}
|
|
441
472
|
|
|
442
|
-
/* open: the thread (or a stack's list) is showing — the active marker just keeps its lift shadow,
|
|
443
|
-
no selection ring. */
|
|
444
473
|
.tlui-cmt-marker--open {
|
|
445
|
-
box-shadow: var(--tlui-cmt-marker-shadow);
|
|
474
|
+
box-shadow: var(--tlui-cmt-marker-shadow-hover);
|
|
446
475
|
}
|
|
447
476
|
|
|
448
|
-
/* pin — a canvas marker: a white teardrop holding the author's avatar circle, so a thread is
|
|
449
|
-
identifiable at a glance. */
|
|
450
477
|
.tlui-cmt-pin {
|
|
451
478
|
--tlui-cmt-marker-size: var(--tlui-cmt-pin-size);
|
|
452
479
|
width: var(--tlui-cmt-marker-size);
|
|
453
480
|
height: var(--tlui-cmt-marker-size);
|
|
454
481
|
border-radius: 50% 50% 50% 0;
|
|
455
482
|
background: var(--tl-color-panel);
|
|
456
|
-
color:
|
|
483
|
+
color: var(--tl-color-panel-contrast);
|
|
457
484
|
display: flex;
|
|
458
485
|
align-items: center;
|
|
459
486
|
justify-content: center;
|
|
460
487
|
font-size: 14px;
|
|
461
488
|
font-weight: 600;
|
|
462
489
|
}
|
|
463
|
-
/* The pin holds the author's 22px avatar circle, centred in its 28px face. */
|
|
464
490
|
.tlui-cmt-pin .tlui-cmt-avatar {
|
|
465
491
|
width: 22px;
|
|
466
492
|
height: 22px;
|
|
493
|
+
box-shadow: inset 0px 0px 0px 1px var(--tl-color-hint);
|
|
467
494
|
}
|
|
468
495
|
|
|
469
|
-
/* resolved: a solid, muted grey
|
|
470
|
-
|
|
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. */
|
|
471
498
|
.tlui-cmt-pin--resolved {
|
|
472
499
|
background: #dfe0e1;
|
|
473
500
|
color: hsl(214, 8%, 42%);
|
|
@@ -477,7 +504,6 @@
|
|
|
477
504
|
color: hsl(0, 0%, 72%);
|
|
478
505
|
}
|
|
479
506
|
|
|
480
|
-
/* count badge — the same marker as a pin. */
|
|
481
507
|
.tlui-cmt-count-badge {
|
|
482
508
|
width: var(--tlui-cmt-marker-size);
|
|
483
509
|
height: var(--tlui-cmt-marker-size);
|
|
@@ -492,12 +518,13 @@
|
|
|
492
518
|
user-select: none;
|
|
493
519
|
}
|
|
494
520
|
|
|
495
|
-
/* reactions */
|
|
496
521
|
.tlui-cmt-reactions {
|
|
497
522
|
display: flex;
|
|
498
523
|
flex-wrap: wrap;
|
|
499
524
|
gap: 4px;
|
|
500
|
-
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;
|
|
501
528
|
}
|
|
502
529
|
|
|
503
530
|
.tlui-cmt-reaction {
|
|
@@ -507,7 +534,7 @@
|
|
|
507
534
|
padding: 2px 6px;
|
|
508
535
|
border: none;
|
|
509
536
|
border-radius: var(--tl-radius-1);
|
|
510
|
-
background:
|
|
537
|
+
background: none;
|
|
511
538
|
font: inherit;
|
|
512
539
|
font-size: 10px;
|
|
513
540
|
font-weight: 400;
|
|
@@ -520,20 +547,8 @@ button.tlui-cmt-reaction {
|
|
|
520
547
|
cursor: pointer;
|
|
521
548
|
}
|
|
522
549
|
|
|
523
|
-
/* Hover deepens the grey — no border to tint now. Mixing toward the text colour is theme-aware:
|
|
524
|
-
it darkens the fill in light mode and lightens it in dark, tracking the pill's own contrast. */
|
|
525
550
|
button.tlui-cmt-reaction:hover {
|
|
526
|
-
background: var(--tl-color-muted-
|
|
527
|
-
}
|
|
528
|
-
|
|
529
|
-
/* a reaction you're part of fills with the selection colour, so "I reacted with this" stands out
|
|
530
|
-
from the grey pills of reactions you haven't joined. */
|
|
531
|
-
.tlui-cmt-reaction--active {
|
|
532
|
-
background: color-mix(in srgb, var(--tl-color-selected) 28%, var(--tl-color-panel));
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
button.tlui-cmt-reaction--active:hover {
|
|
536
|
-
background: color-mix(in srgb, var(--tl-color-selected) 38%, var(--tl-color-panel));
|
|
551
|
+
background: var(--tl-color-muted-2);
|
|
537
552
|
}
|
|
538
553
|
|
|
539
554
|
/* The emoji renders larger than the 10px count, but its pinned line-height keeps the pill the
|
|
@@ -550,14 +565,16 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
550
565
|
|
|
551
566
|
.tlui-cmt-reaction--active .tlui-cmt-reaction__count {
|
|
552
567
|
color: var(--tl-color-text-1);
|
|
568
|
+
font-weight: 700;
|
|
553
569
|
}
|
|
554
570
|
|
|
555
|
-
/*
|
|
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. */
|
|
556
573
|
.tlui-cmt-emoji-picker {
|
|
557
574
|
display: grid;
|
|
558
|
-
grid-template-columns: repeat(5,
|
|
575
|
+
grid-template-columns: repeat(5, 36px);
|
|
559
576
|
gap: 0;
|
|
560
|
-
padding:
|
|
577
|
+
padding: 2px;
|
|
561
578
|
}
|
|
562
579
|
|
|
563
580
|
.tlui-cmt-emoji-picker__item {
|
|
@@ -567,6 +584,7 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
567
584
|
justify-content: center;
|
|
568
585
|
width: 40px;
|
|
569
586
|
height: 40px;
|
|
587
|
+
margin: -2px;
|
|
570
588
|
padding: 0;
|
|
571
589
|
border: none;
|
|
572
590
|
background: none;
|
|
@@ -576,12 +594,11 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
576
594
|
cursor: pointer;
|
|
577
595
|
}
|
|
578
596
|
|
|
579
|
-
/*
|
|
580
|
-
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. */
|
|
581
598
|
.tlui-cmt-emoji-picker__item::after {
|
|
582
599
|
content: '';
|
|
583
600
|
position: absolute;
|
|
584
|
-
inset:
|
|
601
|
+
inset: 4px;
|
|
585
602
|
z-index: -1;
|
|
586
603
|
border-radius: var(--tl-radius-2);
|
|
587
604
|
}
|
|
@@ -596,7 +613,6 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
596
613
|
background: color-mix(in srgb, var(--tl-color-selected) 28%, var(--tl-color-panel));
|
|
597
614
|
}
|
|
598
615
|
|
|
599
|
-
/* empty state */
|
|
600
616
|
.tlui-cmt-empty {
|
|
601
617
|
display: flex;
|
|
602
618
|
flex-direction: column;
|
|
@@ -618,8 +634,6 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
618
634
|
line-height: 1.4;
|
|
619
635
|
}
|
|
620
636
|
|
|
621
|
-
/* a comment thread: an elevated panel holding a header, an optional resolved banner, the
|
|
622
|
-
comments, and a reply composer */
|
|
623
637
|
/* The thread panel's layout metrics live on the container because two separate portals need them:
|
|
624
638
|
the panel itself, and the canvas hover preview, which has to land its first comment on exactly
|
|
625
639
|
the pixel the panel would. Deriving the preview's offset from these means the two can't drift —
|
|
@@ -634,16 +648,20 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
634
648
|
stops at the marker's edge instead of covering it. Mirrored by `MARKER_SIZE` in
|
|
635
649
|
thread-view.tsx. */
|
|
636
650
|
--tlui-cmt-marker-size: var(--tlui-cmt-pin-size);
|
|
637
|
-
/* How a marker
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
--tlui-cmt-marker-shadow:
|
|
641
|
-
|
|
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);
|
|
642
660
|
--tlui-cmt-marker-hover-scale: 1.08;
|
|
643
661
|
--tlui-cmt-marker-transition: 0.08s ease;
|
|
644
662
|
--tlui-cmt-thread-padding: 12px;
|
|
645
663
|
--tlui-cmt-thread-gap: 0px;
|
|
646
|
-
/* 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). */
|
|
647
665
|
--tlui-cmt-thread-action-size: 40px;
|
|
648
666
|
/* A floating pill's edge — its hairline ring is the only thing separating it from the panel it
|
|
649
667
|
overlaps, so the ring is a theme token rather than a literal black: a near-black hairline
|
|
@@ -661,7 +679,6 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
661
679
|
border-radius: var(--tl-radius-4);
|
|
662
680
|
box-shadow: var(--tl-shadow-3);
|
|
663
681
|
}
|
|
664
|
-
/* A pill of its own, floating above the panel's top-right corner and overlapping its top edge. */
|
|
665
682
|
.tlui-cmt-thread__header {
|
|
666
683
|
position: absolute;
|
|
667
684
|
right: 10px;
|
|
@@ -674,17 +691,17 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
674
691
|
box-shadow: var(--tlui-cmt-pill-shadow);
|
|
675
692
|
transition: opacity 0.1s ease;
|
|
676
693
|
}
|
|
677
|
-
/* The first comment's hover actions surface right
|
|
678
|
-
|
|
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. */
|
|
679
696
|
.tlui-cmt-thread:has(.tlui-cmt-thread__list > :first-child:hover)
|
|
680
697
|
.tlui-cmt-thread__header:not(:has(.tlui-cmt-thread__title)) {
|
|
681
698
|
opacity: 0;
|
|
682
699
|
pointer-events: none;
|
|
683
700
|
}
|
|
684
|
-
/* A title puts the header back in the panel, in flow
|
|
685
|
-
|
|
686
|
-
would grow leftwards off the panel's edge
|
|
687
|
-
|
|
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. */
|
|
688
705
|
.tlui-cmt-thread__header:has(.tlui-cmt-thread__title) {
|
|
689
706
|
position: static;
|
|
690
707
|
align-items: center;
|
|
@@ -695,24 +712,22 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
695
712
|
}
|
|
696
713
|
.tlui-cmt-thread__title {
|
|
697
714
|
padding: 10px 12px;
|
|
698
|
-
|
|
699
|
-
line-height: 20px;
|
|
700
|
-
font-weight: 500;
|
|
701
|
-
color: var(--tl-color-text-1);
|
|
715
|
+
color: var(--tl-color-text);
|
|
702
716
|
}
|
|
703
717
|
.tlui-cmt-thread__actions {
|
|
704
718
|
display: flex;
|
|
705
719
|
gap: 0;
|
|
706
|
-
/* Right-align the actions whether or not the header has a title (
|
|
707
|
-
|
|
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). */
|
|
708
722
|
margin-left: auto;
|
|
709
723
|
}
|
|
710
|
-
/*
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
a toolbar button are set here, at .tlui-button's specificity + 1 so stylesheet order can't
|
|
714
|
-
decide the winner.
|
|
715
|
-
.
|
|
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) {
|
|
716
731
|
width: 40px;
|
|
717
732
|
padding: 0;
|
|
718
733
|
border-radius: 6px;
|
|
@@ -721,13 +736,31 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
721
736
|
line-height: 1;
|
|
722
737
|
}
|
|
723
738
|
/* Overlap each button 4px into the previous so the 32px visual squares sit 4px apart, not 8px.
|
|
724
|
-
|
|
725
|
-
.tlui-cmt-
|
|
726
|
-
|
|
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
|
+
}
|
|
727
748
|
}
|
|
728
|
-
.tlui-button
|
|
749
|
+
.tlui-button:is(
|
|
750
|
+
.tlui-cmt-icon-btn,
|
|
751
|
+
.tlui-cmt-thread__action,
|
|
752
|
+
.tlui-cmt-header-btn
|
|
753
|
+
)[data-state='open'] {
|
|
729
754
|
color: var(--tl-color-text-1);
|
|
730
755
|
}
|
|
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);
|
|
762
|
+
opacity: 1;
|
|
763
|
+
}
|
|
731
764
|
.tlui-cmt-thread__resolved {
|
|
732
765
|
margin: 4px 12px;
|
|
733
766
|
padding: 6px 10px;
|
|
@@ -758,7 +791,8 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
758
791
|
.tlui-cmt-thread .tlui-cmt-avatar,
|
|
759
792
|
.tlui-cmt-canvas-preview--thread .tlui-cmt-avatar,
|
|
760
793
|
.tlui-cmt-canvas-preview--list .tlui-cmt-avatar,
|
|
761
|
-
.tlui-cmt-stack-list .tlui-cmt-avatar
|
|
794
|
+
.tlui-cmt-stack-list .tlui-cmt-avatar,
|
|
795
|
+
.tlui-cmt-list .tlui-cmt-avatar {
|
|
762
796
|
width: 12px;
|
|
763
797
|
height: 12px;
|
|
764
798
|
font-size: 0;
|
|
@@ -771,35 +805,17 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
771
805
|
display: none;
|
|
772
806
|
}
|
|
773
807
|
|
|
774
|
-
/* The sidebar's rows use the same small colour dot as the thread view. */
|
|
775
|
-
.tlui-cmt-list .tlui-cmt-avatar {
|
|
776
|
-
width: 14px;
|
|
777
|
-
height: 14px;
|
|
778
|
-
font-size: 0;
|
|
779
|
-
margin-top: 2px;
|
|
780
|
-
}
|
|
781
|
-
/* The sidebar row already leads with its own avatar (the flex row's first column); the byline's
|
|
782
|
-
avatar — added for the canvas thread views — would double it, so hide the byline's inside a row. */
|
|
783
|
-
.tlui-cmt-list .tlui-cmt-head .tlui-cmt-avatar {
|
|
784
|
-
display: none;
|
|
785
|
-
}
|
|
786
|
-
|
|
787
|
-
/* The dot treatment is for colour-only identity — an image avatar stays full size. */
|
|
788
808
|
.tlui-cmt-thread .tlui-cmt-avatar--image,
|
|
789
809
|
.tlui-cmt-canvas-preview--thread .tlui-cmt-avatar--image,
|
|
790
810
|
.tlui-cmt-canvas-preview--list .tlui-cmt-avatar--image,
|
|
791
|
-
.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 {
|
|
792
813
|
/* Match the 12px colour dot's width so the body's calc(12px + 6px) indent still lines up under
|
|
793
814
|
the byline name when the author has an image rather than a dot. */
|
|
794
815
|
width: 12px;
|
|
795
816
|
height: 12px;
|
|
796
817
|
margin-top: 0;
|
|
797
818
|
}
|
|
798
|
-
.tlui-cmt-list .tlui-cmt-avatar--image {
|
|
799
|
-
width: 24px;
|
|
800
|
-
height: 24px;
|
|
801
|
-
margin-top: 0;
|
|
802
|
-
}
|
|
803
819
|
|
|
804
820
|
/* inside the panel, comments are plain content — no surrounding box; the composer's field carries
|
|
805
821
|
its own surface. The hover preview is the same panel without a header, so its comment is laid
|
|
@@ -816,31 +832,30 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
816
832
|
.tlui-cmt-thread .tlui-cmt-body,
|
|
817
833
|
.tlui-cmt-canvas-preview--thread .tlui-cmt-body,
|
|
818
834
|
.tlui-cmt-canvas-preview--list .tlui-cmt-body,
|
|
819
|
-
.tlui-cmt-stack-list .tlui-cmt-body
|
|
835
|
+
.tlui-cmt-stack-list .tlui-cmt-body,
|
|
836
|
+
.tlui-cmt-list .tlui-cmt-body {
|
|
820
837
|
padding-left: calc(12px + 6px);
|
|
821
838
|
}
|
|
822
|
-
/* Inside a panel the actions float as their own pill — the same pill the thread header is, in the
|
|
823
|
-
same corner (which is why the header hides while the first comment is hovered). It sits just
|
|
824
|
-
above the card's top edge rather than on the byline. */
|
|
825
839
|
/* Line the card actions up with the header actions: flush to the full-width card's right edge (the
|
|
826
|
-
panel edge,
|
|
840
|
+
panel edge, under the header's ⋯) and flush on the 40px byline row, so the 40px buttons fill it. */
|
|
827
841
|
.tlui-cmt-thread .tlui-cmt-card .tlui-cmt-card__actions {
|
|
828
842
|
top: 0;
|
|
829
843
|
right: 0;
|
|
830
844
|
}
|
|
831
|
-
/* The byline row is 40px: on the opened thread it fits the action
|
|
832
|
-
|
|
833
|
-
|
|
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. */
|
|
834
848
|
.tlui-cmt-thread .tlui-cmt-card .tlui-cmt-head,
|
|
835
849
|
.tlui-cmt-canvas-preview--thread .tlui-cmt-card .tlui-cmt-head,
|
|
836
850
|
.tlui-cmt-canvas-preview--list .tlui-cmt-card .tlui-cmt-head,
|
|
837
|
-
.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 {
|
|
838
853
|
min-height: 40px;
|
|
839
854
|
}
|
|
840
|
-
/* Reserve head room only for
|
|
841
|
-
is a permissions question (canModifyComment), not ownership, and empty slots (read-only
|
|
842
|
-
keep the full row. Sized from the 40px hit areas (4px overlap), minus the card padding
|
|
843
|
-
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. */
|
|
844
859
|
.tlui-cmt-thread .tlui-cmt-card:has(.tlui-cmt-card__actions > *) .tlui-cmt-head {
|
|
845
860
|
padding-right: calc(var(--tlui-cmt-thread-action-size) - var(--tlui-cmt-thread-padding));
|
|
846
861
|
}
|
|
@@ -850,7 +865,6 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
850
865
|
);
|
|
851
866
|
}
|
|
852
867
|
|
|
853
|
-
/* comments list — thread summaries, one per row (used by the canvas sidebar) */
|
|
854
868
|
.tlui-cmt-list {
|
|
855
869
|
display: flex;
|
|
856
870
|
flex-direction: column;
|
|
@@ -863,99 +877,45 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
863
877
|
align-items: center;
|
|
864
878
|
justify-content: space-between;
|
|
865
879
|
gap: 8px;
|
|
866
|
-
|
|
867
|
-
|
|
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;
|
|
868
885
|
}
|
|
869
886
|
.tlui-cmt-list__header-title {
|
|
870
887
|
font-size: 12px;
|
|
871
|
-
|
|
872
|
-
color: var(--tl-color-text-1);
|
|
888
|
+
color: var(--tl-color-text);
|
|
873
889
|
}
|
|
874
890
|
|
|
875
|
-
/* An icon button in the sidebar header (filter funnel, overflow …). Sized like the thread actions:
|
|
876
|
-
a TldrawUiButton (type="icon") left at its native 40px box, with .tlui-button's 32px ::after
|
|
877
|
-
square carrying the hover wash. Only the bits that differ are set here, at .tlui-button's
|
|
878
|
-
specificity + 1 so stylesheet order can't decide the winner. */
|
|
879
|
-
.tlui-button.tlui-cmt-header-btn {
|
|
880
|
-
width: 40px;
|
|
881
|
-
padding: 0;
|
|
882
|
-
border-radius: 6px;
|
|
883
|
-
color: var(--tl-color-text-2);
|
|
884
|
-
}
|
|
885
|
-
/* Overlap each button 4px into the previous so the 32px visual squares sit 4px apart, not 8px —
|
|
886
|
-
the same tiling the thread actions use. */
|
|
887
|
-
.tlui-cmt-header-btn + .tlui-cmt-header-btn {
|
|
888
|
-
margin-left: -4px;
|
|
889
|
-
}
|
|
890
|
-
.tlui-button.tlui-cmt-header-btn:hover,
|
|
891
|
-
.tlui-button.tlui-cmt-header-btn[data-state='open'] {
|
|
892
|
-
color: var(--tl-color-text-1);
|
|
893
|
-
}
|
|
894
891
|
.tlui-cmt-list__header-actions {
|
|
895
892
|
display: flex;
|
|
896
893
|
align-items: center;
|
|
897
894
|
}
|
|
898
895
|
|
|
899
|
-
/* The commenting dropdowns' surface — a little air between the items and the menu edge. */
|
|
900
|
-
.tlui-cmt-menu {
|
|
901
|
-
min-width: 100px;
|
|
902
|
-
padding: 4px;
|
|
903
|
-
}
|
|
904
|
-
|
|
905
|
-
/* a menu row with a label and a right-aligned shortcut hint (overflow menu) */
|
|
906
|
-
.tlui-cmt-menu-item {
|
|
907
|
-
position: relative;
|
|
908
|
-
display: flex;
|
|
909
|
-
align-items: center;
|
|
910
|
-
justify-content: space-between;
|
|
911
|
-
gap: 24px;
|
|
912
|
-
width: 100%;
|
|
913
|
-
min-height: 40px;
|
|
914
|
-
padding: 0 10px;
|
|
915
|
-
border: none;
|
|
916
|
-
background: transparent;
|
|
917
|
-
font: inherit;
|
|
918
|
-
font-size: 12px;
|
|
919
|
-
color: var(--tl-color-text-1);
|
|
920
|
-
cursor: pointer;
|
|
921
|
-
}
|
|
922
|
-
/* 36px visual inset within the 40px row — the hover wash the action and emoji buttons use. */
|
|
923
|
-
.tlui-cmt-menu-item::after {
|
|
924
|
-
content: '';
|
|
925
|
-
position: absolute;
|
|
926
|
-
inset: 2px;
|
|
927
|
-
border-radius: var(--tl-radius-2);
|
|
928
|
-
}
|
|
929
|
-
.tlui-cmt-menu-item:hover::after {
|
|
930
|
-
background: var(--tl-color-muted-2);
|
|
931
|
-
}
|
|
932
|
-
/* Destructive menu entries (delete) — the same danger colour as tldraw's danger buttons. */
|
|
933
|
-
.tlui-cmt-menu-item--danger {
|
|
934
|
-
color: var(--tl-color-danger);
|
|
935
|
-
}
|
|
936
|
-
|
|
937
|
-
.tlui-cmt-menu-item__shortcut {
|
|
938
|
-
color: var(--tl-color-text-3);
|
|
939
|
-
font-size: 12px;
|
|
940
|
-
}
|
|
941
896
|
.tlui-cmt-list__items {
|
|
942
897
|
flex: 1;
|
|
943
898
|
min-height: 0;
|
|
944
899
|
overflow-y: auto;
|
|
900
|
+
/* A row's hover wash has no bottom inset, so rows tile; this is the last row's 4px. */
|
|
901
|
+
padding-bottom: 4px;
|
|
945
902
|
}
|
|
946
903
|
.tlui-cmt-list__empty {
|
|
947
|
-
|
|
948
|
-
|
|
904
|
+
/* extra 2px at the bottom of the list */
|
|
905
|
+
padding: 12px 12px 14px 12px;
|
|
906
|
+
font-weight: 400;
|
|
949
907
|
font-size: 12px;
|
|
908
|
+
min-height: 40px;
|
|
950
909
|
}
|
|
951
910
|
.tlui-cmt-list__item {
|
|
952
911
|
position: relative;
|
|
953
912
|
display: flex;
|
|
954
913
|
gap: 10px;
|
|
955
914
|
width: 100%;
|
|
956
|
-
padding:
|
|
915
|
+
/* No top padding: the 40px byline row supplies the space above the name, as on a thread card.
|
|
916
|
+
The 6px bottom matches the thread card text's trailing margin, so a row is as tall as a card. */
|
|
917
|
+
padding: 0 12px 6px;
|
|
957
918
|
border: none;
|
|
958
|
-
border-bottom: 1px solid var(--tl-color-divider);
|
|
959
919
|
background: transparent;
|
|
960
920
|
font: inherit;
|
|
961
921
|
text-align: left;
|
|
@@ -969,7 +929,7 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
969
929
|
.tlui-cmt-list__item::after {
|
|
970
930
|
content: '';
|
|
971
931
|
position: absolute;
|
|
972
|
-
inset: 4px;
|
|
932
|
+
inset: 4px 4px 0px 4px;
|
|
973
933
|
border-radius: var(--tl-radius-2);
|
|
974
934
|
pointer-events: none;
|
|
975
935
|
}
|
|
@@ -997,8 +957,8 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
997
957
|
min-width: 0;
|
|
998
958
|
}
|
|
999
959
|
.tlui-cmt-list__item-preview {
|
|
1000
|
-
margin-top: 2px;
|
|
1001
960
|
font-size: 12px;
|
|
961
|
+
line-height: 1.4;
|
|
1002
962
|
color: var(--tl-color-text-1);
|
|
1003
963
|
overflow: hidden;
|
|
1004
964
|
text-overflow: ellipsis;
|
|
@@ -1009,7 +969,6 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
1009
969
|
mid-string — same treatment as the card body. */
|
|
1010
970
|
overflow-wrap: anywhere;
|
|
1011
971
|
}
|
|
1012
|
-
/* meta line under the preview: page label and/or a resolved marker */
|
|
1013
972
|
.tlui-cmt-list__item-meta {
|
|
1014
973
|
display: flex;
|
|
1015
974
|
align-items: center;
|
|
@@ -1020,22 +979,30 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
1020
979
|
}
|
|
1021
980
|
.tlui-cmt-list__item-resolved {
|
|
1022
981
|
display: inline-flex;
|
|
982
|
+
flex-shrink: 0;
|
|
1023
983
|
align-items: center;
|
|
1024
984
|
gap: 3px;
|
|
1025
|
-
font-weight: 600;
|
|
1026
985
|
}
|
|
986
|
+
/* Block, not flex: an ellipsis only applies to text in a block container, not to a flex item's
|
|
987
|
+
anonymous text. */
|
|
1027
988
|
.tlui-cmt-list__item-page {
|
|
1028
|
-
display:
|
|
1029
|
-
|
|
989
|
+
display: block;
|
|
990
|
+
min-width: 0;
|
|
991
|
+
overflow: hidden;
|
|
992
|
+
text-overflow: ellipsis;
|
|
993
|
+
white-space: nowrap;
|
|
1030
994
|
padding: 1px 6px;
|
|
1031
995
|
border-radius: 4px;
|
|
1032
|
-
|
|
996
|
+
}
|
|
997
|
+
/* Same alignment as the reactions row; only when it leads, since "Resolved" has no padding. */
|
|
998
|
+
.tlui-cmt-list__item-page:first-child {
|
|
999
|
+
margin-left: -6px;
|
|
1033
1000
|
}
|
|
1034
1001
|
.tlui-cmt-list__item-replies {
|
|
1035
1002
|
display: inline-flex;
|
|
1003
|
+
flex-shrink: 0;
|
|
1036
1004
|
align-items: center;
|
|
1037
1005
|
}
|
|
1038
|
-
/* reply count under a preview card's opening comment — the thread continues past what's shown */
|
|
1039
1006
|
.tlui-cmt-card__replies {
|
|
1040
1007
|
display: block;
|
|
1041
1008
|
margin-top: 6px;
|
|
@@ -1106,10 +1073,6 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
1106
1073
|
outline: 2px solid var(--tl-color-selected);
|
|
1107
1074
|
outline-offset: 2px;
|
|
1108
1075
|
}
|
|
1109
|
-
/* Focus should read like hover, so the pin lifts the same way when tabbed to. */
|
|
1110
|
-
.tlui-cmt-canvas-pin__marker:focus-visible .tlui-cmt-marker {
|
|
1111
|
-
transform: scale(var(--tlui-cmt-marker-hover-scale));
|
|
1112
|
-
}
|
|
1113
1076
|
|
|
1114
1077
|
.tlui-cmt-cluster-fade {
|
|
1115
1078
|
opacity: 1;
|
|
@@ -1144,6 +1107,10 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
1144
1107
|
.tlui-cmt-canvas-pin--open {
|
|
1145
1108
|
z-index: 1;
|
|
1146
1109
|
}
|
|
1110
|
+
/* A pin being dragged rides over everything it passes, the open thread's pin included. */
|
|
1111
|
+
.tlui-cmt-canvas-pin--dragging {
|
|
1112
|
+
z-index: 2;
|
|
1113
|
+
}
|
|
1147
1114
|
|
|
1148
1115
|
/* The count badge standing in for a stack of coincident pins — same face as a cluster badge,
|
|
1149
1116
|
but clicking opens the stack's thread list rather than zooming (no zoom can separate them).
|
|
@@ -1164,7 +1131,6 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
1164
1131
|
.tlui-cmt-canvas-stack-badge:focus-visible .tlui-cmt-marker {
|
|
1165
1132
|
outline: 2px solid var(--tl-color-selected);
|
|
1166
1133
|
outline-offset: 2px;
|
|
1167
|
-
transform: scale(var(--tlui-cmt-marker-hover-scale));
|
|
1168
1134
|
}
|
|
1169
1135
|
|
|
1170
1136
|
/* The stack's popover content: one card per thread, the expanded thread inline among them. */
|
|
@@ -1318,31 +1284,39 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
1318
1284
|
cursor: pointer;
|
|
1319
1285
|
}
|
|
1320
1286
|
|
|
1321
|
-
/* Every card surface that
|
|
1322
|
-
the single-comment preview panel. One rule, because they're the same object to the eye.
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1287
|
+
/* Every card surface that highlights on hover — a collapsed thread in a stack list, a preview
|
|
1288
|
+
card, and the single-comment preview panel. One rule, because they're the same object to the eye.
|
|
1289
|
+
The highlight is an inset, rounded wash like a menu item's, not a tint of the whole surface: the
|
|
1290
|
+
card stays panel-white and a wash sits 4px inside its edge, its corners following the card's.
|
|
1291
|
+
It paints behind the content (`isolation` keeps the -1 z-index above the card's own fill). */
|
|
1292
|
+
.tlui-cmt-stack-list__card,
|
|
1293
|
+
.tlui-cmt-preview-card--selectable,
|
|
1294
|
+
.tlui-cmt-canvas-preview__panel--thread.tlui-cmt-canvas-preview__panel--selectable {
|
|
1295
|
+
position: relative;
|
|
1296
|
+
isolation: isolate;
|
|
1297
|
+
}
|
|
1298
|
+
.tlui-cmt-stack-list__card::after,
|
|
1299
|
+
.tlui-cmt-preview-card--selectable::after,
|
|
1300
|
+
.tlui-cmt-canvas-preview__panel--thread.tlui-cmt-canvas-preview__panel--selectable::after {
|
|
1301
|
+
content: '';
|
|
1302
|
+
position: absolute;
|
|
1303
|
+
inset: 4px;
|
|
1304
|
+
z-index: -1;
|
|
1305
|
+
/* The cards' 12px radius, less the inset. */
|
|
1306
|
+
border-radius: 8px;
|
|
1307
|
+
pointer-events: none;
|
|
1308
|
+
}
|
|
1309
|
+
.tlui-cmt-canvas-preview__panel--thread.tlui-cmt-canvas-preview__panel--selectable::after {
|
|
1310
|
+
border-radius: calc(var(--tl-radius-4) - 4px);
|
|
1311
|
+
}
|
|
1312
|
+
.tlui-cmt-stack-list__card:hover::after,
|
|
1313
|
+
.tlui-cmt-preview-card--selectable:hover::after,
|
|
1314
|
+
.tlui-cmt-canvas-preview__panel--thread.tlui-cmt-canvas-preview__panel--selectable:hover::after {
|
|
1315
|
+
background: var(--tl-color-muted-2);
|
|
1316
|
+
}
|
|
1334
1317
|
.tlui-cmt-stack-list__card:hover,
|
|
1335
1318
|
.tlui-cmt-preview-card--selectable:hover,
|
|
1336
1319
|
.tlui-cmt-canvas-preview__panel--thread.tlui-cmt-canvas-preview__panel--selectable:hover {
|
|
1337
|
-
--tlui-cmt-preview-hover-surface: color-mix(
|
|
1338
|
-
in srgb,
|
|
1339
|
-
var(--tl-color-low) 50%,
|
|
1340
|
-
var(--tl-color-panel)
|
|
1341
|
-
);
|
|
1342
|
-
background: var(--tlui-cmt-preview-hover-surface);
|
|
1343
|
-
box-shadow:
|
|
1344
|
-
inset 0 0 0 1px var(--tlui-cmt-preview-hover-surface),
|
|
1345
|
-
var(--tl-shadow-3);
|
|
1346
1320
|
cursor: pointer;
|
|
1347
1321
|
}
|
|
1348
1322
|
|
|
@@ -1386,23 +1360,45 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
1386
1360
|
.tlui-cmt-canvas-region {
|
|
1387
1361
|
position: absolute;
|
|
1388
1362
|
pointer-events: none;
|
|
1389
|
-
border: 2px dashed var(--tl-color-selected);
|
|
1390
|
-
border-radius: 6px;
|
|
1391
1363
|
background: color-mix(in srgb, var(--tl-color-selected) 10%, transparent);
|
|
1392
1364
|
}
|
|
1365
|
+
.tlui-cmt-canvas-region__outline {
|
|
1366
|
+
position: absolute;
|
|
1367
|
+
inset: 0;
|
|
1368
|
+
overflow: visible;
|
|
1369
|
+
fill: none;
|
|
1370
|
+
stroke: var(--tl-color-selection-stroke);
|
|
1371
|
+
stroke-width: 1.5px;
|
|
1372
|
+
stroke-linecap: round;
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
.tlui-cmt-canvas-region-handles {
|
|
1376
|
+
display: contents;
|
|
1377
|
+
}
|
|
1393
1378
|
|
|
1394
|
-
/* Corner resize handles on a region box (three corners; the pin corner is the move handle).
|
|
1379
|
+
/* Corner resize handles on a region box (three corners; the pin corner is the move handle). The
|
|
1380
|
+
element is the hit square, sized from the selection's corner hit area (see
|
|
1381
|
+
`selectionCornerSizing`); the visible square is drawn like a selection corner: an 8px fill with a
|
|
1382
|
+
1.5px stroke centred on its edge. */
|
|
1395
1383
|
.tlui-cmt-canvas-region-handle {
|
|
1396
1384
|
position: absolute;
|
|
1397
|
-
width: 9px;
|
|
1398
|
-
height: 9px;
|
|
1399
1385
|
transform: translate(-50%, -50%);
|
|
1400
|
-
background: var(--tl-color-panel);
|
|
1401
|
-
border: 1.5px solid var(--tl-color-selected);
|
|
1402
|
-
border-radius: 2px;
|
|
1403
1386
|
pointer-events: auto;
|
|
1404
1387
|
touch-action: none;
|
|
1405
1388
|
}
|
|
1389
|
+
.tlui-cmt-canvas-region-handle::before {
|
|
1390
|
+
content: '';
|
|
1391
|
+
position: absolute;
|
|
1392
|
+
left: 50%;
|
|
1393
|
+
top: 50%;
|
|
1394
|
+
/* Not covered by the container's `*` border-box rule, which doesn't match pseudo-elements. */
|
|
1395
|
+
box-sizing: border-box;
|
|
1396
|
+
width: 9.5px;
|
|
1397
|
+
height: 9.5px;
|
|
1398
|
+
transform: translate(-50%, -50%);
|
|
1399
|
+
background: var(--tl-color-background);
|
|
1400
|
+
border: 1.5px solid var(--tl-color-selection-stroke);
|
|
1401
|
+
}
|
|
1406
1402
|
|
|
1407
1403
|
/* Anchor the pin by its bottom-left corner, so the marker's one sharp corner (the pin shape's
|
|
1408
1404
|
3px bottom-left) points at the exact anchor point. */
|
|
@@ -1534,14 +1530,20 @@ button.tlui-cmt-reaction--active:hover {
|
|
|
1534
1530
|
.tlui-cmt-canvas-composer .tlui-cmt-input__placeholder {
|
|
1535
1531
|
left: 12px;
|
|
1536
1532
|
}
|
|
1537
|
-
/* The draft avatar previews the pin it becomes
|
|
1538
|
-
|
|
1539
|
-
hover affordances (scale + shadow bump), but keeps a 40×40 hit area (the ::after below). */
|
|
1533
|
+
/* The draft avatar previews the pin it becomes and is the draft's drag handle. It keeps a 40×40 hit
|
|
1534
|
+
area (the ::after below). */
|
|
1540
1535
|
.tlui-cmt-canvas-composer .tlui-cmt-pin {
|
|
1541
1536
|
position: relative;
|
|
1542
1537
|
box-shadow: var(--tl-shadow-2);
|
|
1543
1538
|
cursor: default;
|
|
1544
1539
|
}
|
|
1540
|
+
.tlui-cmt-canvas-composer__handle {
|
|
1541
|
+
touch-action: none;
|
|
1542
|
+
}
|
|
1543
|
+
.tlui-cmt-canvas-composer--dragging .tlui-cmt-canvas-composer__handle,
|
|
1544
|
+
.tlui-cmt-canvas-composer--dragging .tlui-cmt-pin {
|
|
1545
|
+
cursor: var(--tl-cursor-move);
|
|
1546
|
+
}
|
|
1545
1547
|
.tlui-cmt-canvas-composer .tlui-cmt-pin::after {
|
|
1546
1548
|
content: '';
|
|
1547
1549
|
position: absolute;
|