@tldraw/commenting 0.0.0-bootstrap → 5.3.0-internal.c5c7f1d817d0

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.
Files changed (125) hide show
  1. package/commenting.css +131 -131
  2. package/dist-cjs/canvas/comment-body.js +1 -1
  3. package/dist-cjs/canvas/comment-body.js.map +2 -2
  4. package/dist-cjs/canvas/comments-filter-menu.js +1 -1
  5. package/dist-cjs/canvas/comments-filter-menu.js.map +1 -1
  6. package/dist-cjs/canvas/comments-overflow-menu.js +3 -3
  7. package/dist-cjs/canvas/comments-overflow-menu.js.map +2 -2
  8. package/dist-cjs/canvas/comments-overlay.js +65 -50
  9. package/dist-cjs/canvas/comments-overlay.js.map +2 -2
  10. package/dist-cjs/canvas/comments-sidebar.js +2 -2
  11. package/dist-cjs/canvas/comments-sidebar.js.map +2 -2
  12. package/dist-cjs/clustering/runtime.js +119 -7
  13. package/dist-cjs/clustering/runtime.js.map +2 -2
  14. package/dist-cjs/index.d.ts +28 -8
  15. package/dist-cjs/index.js +1 -1
  16. package/dist-cjs/ui/avatar.js +10 -2
  17. package/dist-cjs/ui/avatar.js.map +2 -2
  18. package/dist-cjs/ui/byline.js +4 -4
  19. package/dist-cjs/ui/byline.js.map +2 -2
  20. package/dist-cjs/ui/comment-card.js +3 -3
  21. package/dist-cjs/ui/comment-card.js.map +2 -2
  22. package/dist-cjs/ui/comment-composer.js +30 -24
  23. package/dist-cjs/ui/comment-composer.js.map +2 -2
  24. package/dist-cjs/ui/comment-mention.js +1 -1
  25. package/dist-cjs/ui/comment-mention.js.map +2 -2
  26. package/dist-cjs/ui/comment-pin.js +5 -1
  27. package/dist-cjs/ui/comment-pin.js.map +2 -2
  28. package/dist-cjs/ui/comment-text.js +1 -1
  29. package/dist-cjs/ui/comment-text.js.map +2 -2
  30. package/dist-cjs/ui/comment-thread.js +6 -6
  31. package/dist-cjs/ui/comment-thread.js.map +2 -2
  32. package/dist-cjs/ui/comments-list.js +11 -11
  33. package/dist-cjs/ui/comments-list.js.map +2 -2
  34. package/dist-cjs/ui/count-badge.js +1 -1
  35. package/dist-cjs/ui/count-badge.js.map +2 -2
  36. package/dist-cjs/ui/empty-state.js +3 -3
  37. package/dist-cjs/ui/empty-state.js.map +2 -2
  38. package/dist-cjs/ui/mention-list.js +7 -7
  39. package/dist-cjs/ui/mention-list.js.map +2 -2
  40. package/dist-cjs/ui/mention-suggestion.js +3 -3
  41. package/dist-cjs/ui/mention-suggestion.js.map +2 -2
  42. package/dist-cjs/ui/mention.js +1 -1
  43. package/dist-cjs/ui/mention.js.map +2 -2
  44. package/dist-cjs/ui/reaction.js +11 -4
  45. package/dist-cjs/ui/reaction.js.map +2 -2
  46. package/dist-cjs/ui/reactions.js +10 -2
  47. package/dist-cjs/ui/reactions.js.map +2 -2
  48. package/dist-cjs/ui/send-button.js +1 -1
  49. package/dist-cjs/ui/send-button.js.map +2 -2
  50. package/dist-esm/canvas/comment-body.mjs +1 -1
  51. package/dist-esm/canvas/comment-body.mjs.map +2 -2
  52. package/dist-esm/canvas/comments-filter-menu.mjs +1 -1
  53. package/dist-esm/canvas/comments-filter-menu.mjs.map +1 -1
  54. package/dist-esm/canvas/comments-overflow-menu.mjs +3 -3
  55. package/dist-esm/canvas/comments-overflow-menu.mjs.map +2 -2
  56. package/dist-esm/canvas/comments-overlay.mjs +65 -50
  57. package/dist-esm/canvas/comments-overlay.mjs.map +2 -2
  58. package/dist-esm/canvas/comments-sidebar.mjs +2 -2
  59. package/dist-esm/canvas/comments-sidebar.mjs.map +2 -2
  60. package/dist-esm/clustering/runtime.mjs +119 -7
  61. package/dist-esm/clustering/runtime.mjs.map +2 -2
  62. package/dist-esm/index.d.mts +28 -8
  63. package/dist-esm/index.mjs +1 -1
  64. package/dist-esm/ui/avatar.mjs +10 -2
  65. package/dist-esm/ui/avatar.mjs.map +2 -2
  66. package/dist-esm/ui/byline.mjs +4 -4
  67. package/dist-esm/ui/byline.mjs.map +2 -2
  68. package/dist-esm/ui/comment-card.mjs +3 -3
  69. package/dist-esm/ui/comment-card.mjs.map +2 -2
  70. package/dist-esm/ui/comment-composer.mjs +30 -24
  71. package/dist-esm/ui/comment-composer.mjs.map +2 -2
  72. package/dist-esm/ui/comment-mention.mjs +1 -1
  73. package/dist-esm/ui/comment-mention.mjs.map +2 -2
  74. package/dist-esm/ui/comment-pin.mjs +5 -1
  75. package/dist-esm/ui/comment-pin.mjs.map +2 -2
  76. package/dist-esm/ui/comment-text.mjs +1 -1
  77. package/dist-esm/ui/comment-text.mjs.map +2 -2
  78. package/dist-esm/ui/comment-thread.mjs +6 -6
  79. package/dist-esm/ui/comment-thread.mjs.map +2 -2
  80. package/dist-esm/ui/comments-list.mjs +11 -11
  81. package/dist-esm/ui/comments-list.mjs.map +2 -2
  82. package/dist-esm/ui/count-badge.mjs +1 -1
  83. package/dist-esm/ui/count-badge.mjs.map +2 -2
  84. package/dist-esm/ui/empty-state.mjs +3 -3
  85. package/dist-esm/ui/empty-state.mjs.map +2 -2
  86. package/dist-esm/ui/mention-list.mjs +7 -7
  87. package/dist-esm/ui/mention-list.mjs.map +2 -2
  88. package/dist-esm/ui/mention-suggestion.mjs +3 -3
  89. package/dist-esm/ui/mention-suggestion.mjs.map +2 -2
  90. package/dist-esm/ui/mention.mjs +1 -1
  91. package/dist-esm/ui/mention.mjs.map +2 -2
  92. package/dist-esm/ui/reaction.mjs +11 -4
  93. package/dist-esm/ui/reaction.mjs.map +2 -2
  94. package/dist-esm/ui/reactions.mjs +10 -2
  95. package/dist-esm/ui/reactions.mjs.map +2 -2
  96. package/dist-esm/ui/send-button.mjs +1 -1
  97. package/dist-esm/ui/send-button.mjs.map +2 -2
  98. package/package.json +3 -3
  99. package/src/canvas/canvas.css +25 -25
  100. package/src/canvas/comment-body.tsx +1 -1
  101. package/src/canvas/comment-render.test.ts +1 -1
  102. package/src/canvas/comments-filter-menu.tsx +1 -1
  103. package/src/canvas/comments-overflow-menu.tsx +3 -3
  104. package/src/canvas/comments-overlay.tsx +109 -76
  105. package/src/canvas/comments-sidebar.tsx +2 -2
  106. package/src/clustering/runtime.test.ts +183 -7
  107. package/src/clustering/runtime.ts +164 -15
  108. package/src/ui/avatar.tsx +9 -2
  109. package/src/ui/byline.tsx +4 -4
  110. package/src/ui/comment-card.tsx +3 -3
  111. package/src/ui/comment-composer.tsx +49 -30
  112. package/src/ui/comment-mention.ts +2 -2
  113. package/src/ui/comment-pin.tsx +5 -1
  114. package/src/ui/comment-text.tsx +1 -1
  115. package/src/ui/comment-thread.tsx +8 -6
  116. package/src/ui/comments-list.tsx +16 -12
  117. package/src/ui/comments.css +106 -106
  118. package/src/ui/count-badge.tsx +1 -1
  119. package/src/ui/empty-state.tsx +3 -3
  120. package/src/ui/mention-list.tsx +8 -8
  121. package/src/ui/mention-suggestion.tsx +3 -3
  122. package/src/ui/mention.tsx +1 -1
  123. package/src/ui/reaction.tsx +6 -3
  124. package/src/ui/reactions.tsx +6 -2
  125. package/src/ui/send-button.tsx +1 -1
@@ -1,6 +1,6 @@
1
1
  /* Real comment UI components. Co-located so styles travel to any view (studio,
2
2
  canvas), and themed via tldraw's --tl-color tokens so they follow light/dark. */
3
- .cmt-card {
3
+ .tlui-cmt-card {
4
4
  position: relative;
5
5
  display: flex;
6
6
  gap: 10px;
@@ -12,7 +12,7 @@
12
12
  }
13
13
 
14
14
  /* hover-revealed controls (edit…) at the card's top-right */
15
- .cmt-card__actions {
15
+ .tlui-cmt-card__actions {
16
16
  position: absolute;
17
17
  top: 6px;
18
18
  right: 6px;
@@ -20,65 +20,65 @@
20
20
  gap: 2px;
21
21
  opacity: 0;
22
22
  }
23
- .cmt-card:hover .cmt-card__actions,
24
- .cmt-card:focus-within .cmt-card__actions {
23
+ .tlui-cmt-card:hover .tlui-cmt-card__actions,
24
+ .tlui-cmt-card:focus-within .tlui-cmt-card__actions {
25
25
  opacity: 1;
26
26
  }
27
27
 
28
- .cmt-body {
28
+ .tlui-cmt-body {
29
29
  flex: 1;
30
30
  min-width: 0;
31
31
  }
32
32
 
33
- .cmt-head {
33
+ .tlui-cmt-head {
34
34
  display: flex;
35
35
  align-items: baseline;
36
36
  gap: 6px;
37
37
  }
38
38
 
39
- .cmt-author {
39
+ .tlui-cmt-author {
40
40
  font-weight: 600;
41
41
  font-size: 13px;
42
42
  color: var(--tl-color-text-1);
43
43
  }
44
44
 
45
- .cmt-time {
45
+ .tlui-cmt-time {
46
46
  font-size: 11px;
47
47
  color: var(--tl-color-text-3);
48
48
  }
49
49
 
50
- .cmt-text {
50
+ .tlui-cmt-text {
51
51
  margin: 3px 0 0;
52
52
  font-size: 13px;
53
53
  line-height: 1.4;
54
54
  color: var(--tl-color-text-1);
55
55
  }
56
56
 
57
- .cmt-edited {
57
+ .tlui-cmt-edited {
58
58
  font-style: italic;
59
59
  }
60
60
 
61
61
  /* rendered rich text inside a comment body — bare tags emitted by the comment renderer
62
62
  (paragraphs, lists, code, highlight, links), matching the limited comment extension set. */
63
- .cmt-text p {
63
+ .tlui-cmt-text p {
64
64
  margin: 0;
65
65
  }
66
66
 
67
- .cmt-text p + p,
68
- .cmt-text p + ul,
69
- .cmt-text p + ol,
70
- .cmt-text ul + p,
71
- .cmt-text ol + p {
67
+ .tlui-cmt-text p + p,
68
+ .tlui-cmt-text p + ul,
69
+ .tlui-cmt-text p + ol,
70
+ .tlui-cmt-text ul + p,
71
+ .tlui-cmt-text ol + p {
72
72
  margin-top: 6px;
73
73
  }
74
74
 
75
- .cmt-text ul,
76
- .cmt-text ol {
75
+ .tlui-cmt-text ul,
76
+ .tlui-cmt-text ol {
77
77
  margin: 0;
78
78
  padding-left: 18px;
79
79
  }
80
80
 
81
- .cmt-text code {
81
+ .tlui-cmt-text code {
82
82
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
83
83
  font-size: 0.92em;
84
84
  background: var(--tl-color-muted-2);
@@ -86,18 +86,18 @@
86
86
  padding: 0 3px;
87
87
  }
88
88
 
89
- .cmt-text mark {
89
+ .tlui-cmt-text mark {
90
90
  background: color-mix(in srgb, #ffeb3b 60%, transparent);
91
91
  color: inherit;
92
92
  border-radius: 2px;
93
93
  }
94
94
 
95
- .cmt-text a {
95
+ .tlui-cmt-text a {
96
96
  color: var(--tl-color-selected);
97
97
  text-decoration: underline;
98
98
  }
99
99
 
100
- .cmt-avatar {
100
+ .tlui-cmt-avatar {
101
101
  width: 28px;
102
102
  height: 28px;
103
103
  border-radius: 50%;
@@ -111,7 +111,7 @@
111
111
  flex-shrink: 0;
112
112
  }
113
113
 
114
- .cmt-avatar--image {
114
+ .tlui-cmt-avatar--image {
115
115
  object-fit: cover;
116
116
  background: none;
117
117
  }
@@ -119,14 +119,14 @@
119
119
  /* composer — an avatar beside a rounded-rect field holding the rich-text input and the send button.
120
120
  Formatting is applied via markdown and keyboard shortcuts (no toolbar). The avatar aligns to the
121
121
  top so it stays put as the field grows to multiple lines. */
122
- .cmt-composer {
122
+ .tlui-cmt-composer {
123
123
  display: flex;
124
124
  align-items: flex-start;
125
125
  gap: 10px;
126
126
  padding: 4px 0 8px 4px;
127
127
  }
128
128
 
129
- .cmt-composer__field {
129
+ .tlui-cmt-composer__field {
130
130
  flex: 1;
131
131
  min-width: 0;
132
132
  display: flex;
@@ -138,19 +138,19 @@
138
138
  border-radius: var(--tl-radius-3);
139
139
  }
140
140
 
141
- .cmt-composer__field:focus-within {
141
+ .tlui-cmt-composer__field:focus-within {
142
142
  border-color: var(--tl-color-selected);
143
143
  }
144
144
 
145
145
  /* the editable area, with the placeholder overlaid while it's empty */
146
- .cmt-composer__input-wrap {
146
+ .tlui-cmt-composer__input-wrap {
147
147
  position: relative;
148
148
  flex: 1;
149
149
  min-width: 0;
150
150
  padding: 3px 0;
151
151
  }
152
152
 
153
- .cmt-input {
153
+ .tlui-cmt-input {
154
154
  font: inherit;
155
155
  font-size: 13px;
156
156
  line-height: 1.4;
@@ -163,23 +163,23 @@
163
163
  word-break: break-word;
164
164
  }
165
165
 
166
- .cmt-input p {
166
+ .tlui-cmt-input p {
167
167
  margin: 0;
168
168
  }
169
169
 
170
- .cmt-input p + p,
171
- .cmt-input p + ul,
172
- .cmt-input p + ol {
170
+ .tlui-cmt-input p + p,
171
+ .tlui-cmt-input p + ul,
172
+ .tlui-cmt-input p + ol {
173
173
  margin-top: 4px;
174
174
  }
175
175
 
176
- .cmt-input ul,
177
- .cmt-input ol {
176
+ .tlui-cmt-input ul,
177
+ .tlui-cmt-input ol {
178
178
  margin: 0;
179
179
  padding-left: 18px;
180
180
  }
181
181
 
182
- .cmt-input__placeholder {
182
+ .tlui-cmt-input__placeholder {
183
183
  position: absolute;
184
184
  top: 3px;
185
185
  left: 0;
@@ -189,7 +189,7 @@
189
189
  pointer-events: none;
190
190
  }
191
191
 
192
- .cmt-send {
192
+ .tlui-cmt-send {
193
193
  border: 0;
194
194
  border-radius: var(--tl-radius-2);
195
195
  background: var(--tl-color-selected);
@@ -202,29 +202,29 @@
202
202
  align-self: flex-end;
203
203
  }
204
204
 
205
- .cmt-send:hover,
206
- .pseudo-hover .cmt-send {
205
+ .tlui-cmt-send:hover,
206
+ .pseudo-hover .tlui-cmt-send {
207
207
  background: color-mix(in srgb, var(--tl-color-selected) 88%, black);
208
208
  }
209
209
 
210
- .cmt-send:active,
211
- .pseudo-active .cmt-send {
210
+ .tlui-cmt-send:active,
211
+ .pseudo-active .tlui-cmt-send {
212
212
  background: color-mix(in srgb, var(--tl-color-selected) 78%, black);
213
213
  }
214
214
 
215
- .cmt-send:focus-visible,
216
- .pseudo-focus-visible .cmt-send {
215
+ .tlui-cmt-send:focus-visible,
216
+ .pseudo-focus-visible .tlui-cmt-send {
217
217
  outline: 2px solid var(--tl-color-selected);
218
218
  outline-offset: 2px;
219
219
  }
220
220
 
221
- .cmt-send:disabled {
221
+ .tlui-cmt-send:disabled {
222
222
  opacity: 0.45;
223
223
  cursor: not-allowed;
224
224
  }
225
225
 
226
226
  /* pin */
227
- .cmt-pin {
227
+ .tlui-cmt-pin {
228
228
  width: 34px;
229
229
  height: 34px;
230
230
  border-radius: 50% 50% 50% 3px;
@@ -242,14 +242,14 @@
242
242
  box-shadow 0.08s ease;
243
243
  }
244
244
 
245
- .cmt-pin:hover,
246
- .pseudo-hover .cmt-pin {
245
+ .tlui-cmt-pin:hover,
246
+ .pseudo-hover .tlui-cmt-pin {
247
247
  transform: scale(1.08);
248
248
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.32);
249
249
  }
250
250
 
251
251
  /* open: the thread is showing — a selection ring marks the active pin */
252
- .cmt-pin--open {
252
+ .tlui-cmt-pin--open {
253
253
  box-shadow:
254
254
  0 0 0 3px var(--tl-color-panel),
255
255
  0 0 0 5px var(--tl-color-selected),
@@ -258,17 +258,17 @@
258
258
 
259
259
  /* resolved: a solid, muted grey (the default --tl-color-muted-1 is 10% black, so it goes
260
260
  translucent over the canvas). Dark mode gets its own grey — the token's dark value is near-black. */
261
- .cmt-pin--resolved {
261
+ .tlui-cmt-pin--resolved {
262
262
  background: #dfe0e1;
263
263
  color: hsl(214, 8%, 42%);
264
264
  }
265
- .tl-theme__dark .cmt-pin--resolved {
265
+ .tl-theme__dark .tlui-cmt-pin--resolved {
266
266
  background: hsl(240, 5%, 30%);
267
267
  color: hsl(0, 0%, 72%);
268
268
  }
269
269
 
270
270
  /* count badge */
271
- .cmt-count-badge {
271
+ .tlui-cmt-count-badge {
272
272
  width: 34px;
273
273
  height: 34px;
274
274
  border-radius: 50%;
@@ -284,14 +284,14 @@
284
284
  }
285
285
 
286
286
  /* thread */
287
- .cmt-thread {
287
+ .tlui-cmt-thread {
288
288
  display: flex;
289
289
  flex-direction: column;
290
290
  gap: 8px;
291
291
  width: 300px;
292
292
  }
293
293
 
294
- .cmt-thread__head {
294
+ .tlui-cmt-thread__head {
295
295
  display: flex;
296
296
  align-items: center;
297
297
  gap: 8px;
@@ -302,7 +302,7 @@
302
302
  letter-spacing: 0.04em;
303
303
  }
304
304
 
305
- .cmt-badge {
305
+ .tlui-cmt-badge {
306
306
  font-size: 10px;
307
307
  font-weight: 600;
308
308
  text-transform: none;
@@ -314,12 +314,12 @@
314
314
  }
315
315
 
316
316
  /* reactions */
317
- .cmt-reactions {
317
+ .tlui-cmt-reactions {
318
318
  display: flex;
319
319
  gap: 6px;
320
320
  }
321
321
 
322
- .cmt-reaction {
322
+ .tlui-cmt-reaction {
323
323
  display: inline-flex;
324
324
  align-items: center;
325
325
  gap: 5px;
@@ -333,27 +333,27 @@
333
333
  cursor: pointer;
334
334
  }
335
335
 
336
- .cmt-reaction:hover,
337
- .pseudo-hover .cmt-reaction {
336
+ .tlui-cmt-reaction:hover,
337
+ .pseudo-hover .tlui-cmt-reaction {
338
338
  border-color: var(--tl-color-selected);
339
339
  }
340
340
 
341
- .cmt-reaction--active {
341
+ .tlui-cmt-reaction--active {
342
342
  border-color: var(--tl-color-selected);
343
343
  background: color-mix(in srgb, var(--tl-color-selected) 12%, var(--tl-color-panel));
344
344
  }
345
345
 
346
- .cmt-reaction__count {
346
+ .tlui-cmt-reaction__count {
347
347
  color: var(--tl-color-text-3);
348
348
  }
349
349
 
350
- .cmt-reaction--add {
350
+ .tlui-cmt-reaction--add {
351
351
  color: var(--tl-color-text-3);
352
352
  font-weight: 600;
353
353
  }
354
354
 
355
355
  /* mention */
356
- .cmt-mention {
356
+ .tlui-cmt-mention {
357
357
  color: var(--tl-color-selected);
358
358
  font-weight: 600;
359
359
  background: color-mix(in srgb, var(--tl-color-selected) 12%, transparent);
@@ -362,7 +362,7 @@
362
362
  }
363
363
 
364
364
  /* mention picker */
365
- .cmt-mention-list {
365
+ .tlui-cmt-mention-list {
366
366
  display: flex;
367
367
  flex-direction: column;
368
368
  gap: 1px;
@@ -378,7 +378,7 @@
378
378
  box-shadow: var(--tl-shadow-2, 0 2px 12px rgba(0, 0, 0, 0.14));
379
379
  }
380
380
 
381
- .cmt-mention-list__item {
381
+ .tlui-cmt-mention-list__item {
382
382
  display: flex;
383
383
  align-items: center;
384
384
  gap: 8px;
@@ -392,19 +392,19 @@
392
392
  font: inherit;
393
393
  }
394
394
 
395
- .cmt-mention-list__item--active,
396
- .cmt-mention-list__item:hover {
395
+ .tlui-cmt-mention-list__item--active,
396
+ .tlui-cmt-mention-list__item:hover {
397
397
  background: var(--tl-color-muted-2, rgba(0, 0, 0, 0.06));
398
398
  }
399
399
 
400
- .cmt-mention-list__text {
400
+ .tlui-cmt-mention-list__text {
401
401
  display: flex;
402
402
  flex-direction: column;
403
403
  min-width: 0;
404
404
  line-height: 1.3;
405
405
  }
406
406
 
407
- .cmt-mention-list__name {
407
+ .tlui-cmt-mention-list__name {
408
408
  font-size: 13px;
409
409
  font-weight: 500;
410
410
  white-space: nowrap;
@@ -412,13 +412,13 @@
412
412
  text-overflow: ellipsis;
413
413
  }
414
414
 
415
- .cmt-mention-list__you {
415
+ .tlui-cmt-mention-list__you {
416
416
  margin-left: 4px;
417
417
  font-weight: 400;
418
418
  color: var(--tl-color-text-3);
419
419
  }
420
420
 
421
- .cmt-mention-list__secondary {
421
+ .tlui-cmt-mention-list__secondary {
422
422
  font-size: 12px;
423
423
  color: var(--tl-color-text-3);
424
424
  white-space: nowrap;
@@ -426,7 +426,7 @@
426
426
  text-overflow: ellipsis;
427
427
  }
428
428
 
429
- .cmt-mention-list--empty {
429
+ .tlui-cmt-mention-list--empty {
430
430
  padding: 8px 10px;
431
431
  width: 100%;
432
432
  box-sizing: border-box;
@@ -435,13 +435,13 @@
435
435
  }
436
436
 
437
437
  /* the @-picker popup — caret-anchored above the page, positioned by the suggestion plugin */
438
- .cmt-mention-popup {
438
+ .tlui-cmt-mention-popup {
439
439
  position: fixed;
440
440
  z-index: var(--tl-layer-menus);
441
441
  }
442
442
 
443
443
  /* empty state */
444
- .cmt-empty {
444
+ .tlui-cmt-empty {
445
445
  display: flex;
446
446
  flex-direction: column;
447
447
  align-items: center;
@@ -451,11 +451,11 @@
451
451
  width: 240px;
452
452
  }
453
453
 
454
- .cmt-empty__icon {
454
+ .tlui-cmt-empty__icon {
455
455
  font-size: 28px;
456
456
  }
457
457
 
458
- .cmt-empty__message {
458
+ .tlui-cmt-empty__message {
459
459
  margin: 0;
460
460
  color: var(--tl-color-text-3);
461
461
  font-size: 13px;
@@ -464,7 +464,7 @@
464
464
 
465
465
  /* a comment thread: an elevated panel — the same surface treatment as the toolbar — holding a
466
466
  header, an optional resolved banner, the comments, and a reply composer */
467
- .cmt-thread {
467
+ .tlui-cmt-thread {
468
468
  display: flex;
469
469
  flex-direction: column;
470
470
  gap: 6px;
@@ -474,22 +474,22 @@
474
474
  border-radius: var(--tl-radius-4);
475
475
  box-shadow: var(--tl-shadow-2);
476
476
  }
477
- .cmt-thread__header {
477
+ .tlui-cmt-thread__header {
478
478
  display: flex;
479
479
  align-items: center;
480
480
  justify-content: space-between;
481
481
  padding: 2px 2px 2px 4px;
482
482
  }
483
- .cmt-thread__title {
483
+ .tlui-cmt-thread__title {
484
484
  font-size: 12px;
485
485
  font-weight: 600;
486
486
  color: var(--tl-color-text-1);
487
487
  }
488
- .cmt-thread__actions {
488
+ .tlui-cmt-thread__actions {
489
489
  display: flex;
490
490
  gap: 2px;
491
491
  }
492
- .cmt-thread__action {
492
+ .tlui-cmt-thread__action {
493
493
  display: flex;
494
494
  align-items: center;
495
495
  justify-content: center;
@@ -504,25 +504,25 @@
504
504
  line-height: 1;
505
505
  cursor: pointer;
506
506
  }
507
- .cmt-thread__action:hover {
507
+ .tlui-cmt-thread__action:hover {
508
508
  background: var(--tl-color-muted-2);
509
509
  color: var(--tl-color-text-1);
510
510
  }
511
- .cmt-thread__resolved {
511
+ .tlui-cmt-thread__resolved {
512
512
  padding: 6px 10px;
513
513
  border-radius: 8px;
514
514
  background: var(--tl-color-muted-2);
515
515
  font-size: 12px;
516
516
  color: var(--tl-color-text-3);
517
517
  }
518
- .cmt-thread__list {
518
+ .tlui-cmt-thread__list {
519
519
  display: flex;
520
520
  flex-direction: column;
521
521
  gap: 6px;
522
522
  }
523
523
  /* inside the panel, comments are plain content — no surrounding box; the composer's field carries
524
524
  its own surface. */
525
- .cmt-thread .cmt-card {
525
+ .tlui-cmt-thread .tlui-cmt-card {
526
526
  width: 100%;
527
527
  padding: 6px 0 6px 4px;
528
528
  background: transparent;
@@ -530,13 +530,13 @@
530
530
  }
531
531
 
532
532
  /* comments list — thread summaries, one per row (used by the canvas sidebar) */
533
- .cmt-list {
533
+ .tlui-cmt-list {
534
534
  display: flex;
535
535
  flex-direction: column;
536
536
  width: 100%;
537
537
  min-height: 0;
538
538
  }
539
- .cmt-list__header {
539
+ .tlui-cmt-list__header {
540
540
  flex-shrink: 0;
541
541
  display: flex;
542
542
  align-items: center;
@@ -545,7 +545,7 @@
545
545
  padding: 6px 6px 6px 14px;
546
546
  border-bottom: 1px solid var(--tl-color-divider);
547
547
  }
548
- .cmt-list__header-title {
548
+ .tlui-cmt-list__header-title {
549
549
  font-size: 11px;
550
550
  font-weight: 600;
551
551
  letter-spacing: 0.06em;
@@ -554,7 +554,7 @@
554
554
  }
555
555
 
556
556
  /* a small square icon button in the sidebar header (filter funnel, overflow …) */
557
- .cmt-header-btn {
557
+ .tlui-cmt-header-btn {
558
558
  display: flex;
559
559
  align-items: center;
560
560
  justify-content: center;
@@ -567,19 +567,19 @@
567
567
  color: var(--tl-color-text-2);
568
568
  cursor: pointer;
569
569
  }
570
- .cmt-header-btn:hover,
571
- .cmt-header-btn[data-state='open'] {
570
+ .tlui-cmt-header-btn:hover,
571
+ .tlui-cmt-header-btn[data-state='open'] {
572
572
  background: var(--tl-color-muted-2);
573
573
  color: var(--tl-color-text-1);
574
574
  }
575
- .cmt-list__header-actions {
575
+ .tlui-cmt-list__header-actions {
576
576
  display: flex;
577
577
  align-items: center;
578
578
  gap: 2px;
579
579
  }
580
580
 
581
581
  /* a menu row with a label and a right-aligned shortcut hint (overflow menu) */
582
- .cmt-menu-item {
582
+ .tlui-cmt-menu-item {
583
583
  display: flex;
584
584
  align-items: center;
585
585
  justify-content: space-between;
@@ -594,24 +594,24 @@
594
594
  color: var(--tl-color-text-1);
595
595
  cursor: pointer;
596
596
  }
597
- .cmt-menu-item:hover {
597
+ .tlui-cmt-menu-item:hover {
598
598
  background: var(--tl-color-muted-2);
599
599
  }
600
- .cmt-menu-item__shortcut {
600
+ .tlui-cmt-menu-item__shortcut {
601
601
  color: var(--tl-color-text-3);
602
602
  font-size: 12px;
603
603
  }
604
- .cmt-list__items {
604
+ .tlui-cmt-list__items {
605
605
  flex: 1;
606
606
  min-height: 0;
607
607
  overflow-y: auto;
608
608
  }
609
- .cmt-list__empty {
609
+ .tlui-cmt-list__empty {
610
610
  padding: 20px 14px;
611
611
  color: var(--tl-color-text-3);
612
612
  font-size: 13px;
613
613
  }
614
- .cmt-list__item {
614
+ .tlui-cmt-list__item {
615
615
  display: flex;
616
616
  gap: 10px;
617
617
  width: 100%;
@@ -623,22 +623,22 @@
623
623
  text-align: left;
624
624
  cursor: pointer;
625
625
  }
626
- .cmt-list__item:hover {
626
+ .tlui-cmt-list__item:hover {
627
627
  background: var(--tl-color-muted-2);
628
628
  }
629
- .cmt-list__item--selected {
629
+ .tlui-cmt-list__item--selected {
630
630
  background: var(--tl-color-muted-1);
631
631
  }
632
632
  /* resolved rows mute their content but keep the "Resolved" marker legible */
633
- .cmt-list__item[data-resolved] .cmt-head,
634
- .cmt-list__item[data-resolved] .cmt-list__item-preview {
633
+ .tlui-cmt-list__item[data-resolved] .tlui-cmt-head,
634
+ .tlui-cmt-list__item[data-resolved] .tlui-cmt-list__item-preview {
635
635
  opacity: 0.55;
636
636
  }
637
- .cmt-list__item-body {
637
+ .tlui-cmt-list__item-body {
638
638
  flex: 1;
639
639
  min-width: 0;
640
640
  }
641
- .cmt-list__item-preview {
641
+ .tlui-cmt-list__item-preview {
642
642
  margin-top: 2px;
643
643
  font-size: 13px;
644
644
  color: var(--tl-color-text-1);
@@ -649,7 +649,7 @@
649
649
  -webkit-box-orient: vertical;
650
650
  }
651
651
  /* meta line under the preview: page label and/or a resolved marker */
652
- .cmt-list__item-meta {
652
+ .tlui-cmt-list__item-meta {
653
653
  display: flex;
654
654
  align-items: center;
655
655
  gap: 8px;
@@ -657,20 +657,20 @@
657
657
  font-size: 11px;
658
658
  color: var(--tl-color-text-3);
659
659
  }
660
- .cmt-list__item-resolved {
660
+ .tlui-cmt-list__item-resolved {
661
661
  display: inline-flex;
662
662
  align-items: center;
663
663
  gap: 3px;
664
664
  font-weight: 600;
665
665
  }
666
- .cmt-list__item-page {
666
+ .tlui-cmt-list__item-page {
667
667
  display: inline-flex;
668
668
  align-items: center;
669
669
  padding: 1px 6px;
670
670
  border-radius: 4px;
671
671
  background: var(--tl-color-muted-2);
672
672
  }
673
- .cmt-list__item-count {
673
+ .tlui-cmt-list__item-count {
674
674
  flex-shrink: 0;
675
675
  align-self: center;
676
676
  font-size: 12px;
@@ -5,5 +5,5 @@ export interface CountBadgeProps {
5
5
 
6
6
  /** @public @react */
7
7
  export function CountBadge({ count }: CountBadgeProps) {
8
- return <div className="cmt-count-badge">{count}</div>
8
+ return <div className="tlui-cmt-count-badge">{count}</div>
9
9
  }
@@ -6,11 +6,11 @@ export interface EmptyStateProps {
6
6
  /** The empty state shown when a thread has no comments yet. @public @react */
7
7
  export function EmptyState({ message }: EmptyStateProps) {
8
8
  return (
9
- <div className="cmt-empty">
10
- <div className="cmt-empty__icon" aria-hidden="true">
9
+ <div className="tlui-cmt-empty">
10
+ <div className="tlui-cmt-empty__icon" aria-hidden="true">
11
11
  💬
12
12
  </div>
13
- <p className="cmt-empty__message">{message}</p>
13
+ <p className="tlui-cmt-empty__message">{message}</p>
14
14
  </div>
15
15
  )
16
16
  }