@tldraw/collaboration 5.3.0-next.2fa9c61a8de6 → 5.3.0-next.7654e7ac2a02
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/collaboration.css +63 -71
- package/dist-cjs/index.js +1 -1
- package/dist-esm/index.mjs +1 -1
- package/package.json +3 -3
package/collaboration.css
CHANGED
|
@@ -311,8 +311,6 @@
|
|
|
311
311
|
pointer-events: none;
|
|
312
312
|
white-space: nowrap;
|
|
313
313
|
width: max-content;
|
|
314
|
-
max-height: none;
|
|
315
|
-
overflow: visible;
|
|
316
314
|
}
|
|
317
315
|
|
|
318
316
|
.tlui-cmt-input {
|
|
@@ -352,6 +350,17 @@
|
|
|
352
350
|
pointer-events: none;
|
|
353
351
|
}
|
|
354
352
|
|
|
353
|
+
/* iOS Safari zooms the whole page in when a text input with a sub-16px font takes focus, and doesn't
|
|
354
|
+
zoom back out. Raising the font to 16px on touch devices suppresses that without disabling
|
|
355
|
+
pinch-zoom of the canvas (which a `maximum-scale` viewport lock would). Must come after both base
|
|
356
|
+
rules above: a media query adds no specificity, so it only wins the placeholder on source order. */
|
|
357
|
+
@media (pointer: coarse) {
|
|
358
|
+
.tlui-cmt-input,
|
|
359
|
+
.tlui-cmt-input__placeholder {
|
|
360
|
+
font-size: 16px;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
|
|
355
364
|
/* A bare up-arrow icon button (matching the placement composer): no fill by default, a grey square
|
|
356
365
|
on hover, grey while there's nothing to send and dark once there is. */
|
|
357
366
|
.tlui-cmt-send {
|
|
@@ -528,12 +537,17 @@
|
|
|
528
537
|
font-size: 10px;
|
|
529
538
|
font-weight: 400;
|
|
530
539
|
color: var(--tl-color-text-1);
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
/* An inert pill renders as a span (e.g. in a notification row); only the button variant is
|
|
543
|
+
clickable, so only it gets the pointer cursor and hover shade. */
|
|
544
|
+
button.tlui-cmt-reaction {
|
|
531
545
|
cursor: pointer;
|
|
532
546
|
}
|
|
533
547
|
|
|
534
548
|
/* Hover deepens the grey — no border to tint now. Mixing toward the text colour is theme-aware:
|
|
535
549
|
it darkens the fill in light mode and lightens it in dark, tracking the pill's own contrast. */
|
|
536
|
-
.tlui-cmt-reaction:hover {
|
|
550
|
+
button.tlui-cmt-reaction:hover {
|
|
537
551
|
background: var(--tl-color-muted-1);
|
|
538
552
|
}
|
|
539
553
|
|
|
@@ -543,14 +557,15 @@
|
|
|
543
557
|
background: color-mix(in srgb, var(--tl-color-selected) 28%, var(--tl-color-panel));
|
|
544
558
|
}
|
|
545
559
|
|
|
546
|
-
.tlui-cmt-reaction--active:hover {
|
|
560
|
+
button.tlui-cmt-reaction--active:hover {
|
|
547
561
|
background: color-mix(in srgb, var(--tl-color-selected) 38%, var(--tl-color-panel));
|
|
548
562
|
}
|
|
549
563
|
|
|
550
|
-
/*
|
|
564
|
+
/* The emoji renders larger than the 10px count, but its pinned line-height keeps the pill the
|
|
565
|
+
count's height — the glyph overflows the line box rather than growing it. */
|
|
551
566
|
.tlui-cmt-reaction__emoji {
|
|
552
|
-
font-size:
|
|
553
|
-
line-height:
|
|
567
|
+
font-size: 13px;
|
|
568
|
+
line-height: 10px;
|
|
554
569
|
}
|
|
555
570
|
|
|
556
571
|
.tlui-cmt-reaction__count {
|
|
@@ -653,7 +668,8 @@
|
|
|
653
668
|
--tlui-cmt-marker-transition: 0.08s ease;
|
|
654
669
|
--tlui-cmt-thread-padding: 12px;
|
|
655
670
|
--tlui-cmt-thread-gap: 0px;
|
|
656
|
-
|
|
671
|
+
/* Hit-area width of one .tlui-cmt-thread__action button (drawn as a 32px square inset 4px). */
|
|
672
|
+
--tlui-cmt-thread-action-size: 40px;
|
|
657
673
|
/* A floating pill's edge — its hairline ring is the only thing separating it from the panel it
|
|
658
674
|
overlaps, so the ring is a theme token rather than a literal black: a near-black hairline
|
|
659
675
|
vanishes on a dark panel, where the divider token lightens instead. The drop below it stays
|
|
@@ -716,47 +732,28 @@
|
|
|
716
732
|
space-between alone would leave them at the left). */
|
|
717
733
|
margin-left: auto;
|
|
718
734
|
}
|
|
719
|
-
/*
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
.
|
|
724
|
-
|
|
725
|
-
display: flex;
|
|
726
|
-
align-items: center;
|
|
727
|
-
justify-content: center;
|
|
735
|
+
/* These are TldrawUiButtons (type="icon"), so the 40px box, the 32px ::after square carrying the
|
|
736
|
+
hover wash, and the hover z-index flip all come from .tlui-button — the hit area (not the
|
|
737
|
+
::after) is what's clickable, and it never reaches past its row. Only the bits that differ from
|
|
738
|
+
a toolbar button are set here, at .tlui-button's specificity + 1 so stylesheet order can't
|
|
739
|
+
decide the winner. */
|
|
740
|
+
.tlui-button.tlui-cmt-thread__action {
|
|
728
741
|
width: 40px;
|
|
729
|
-
height: 40px;
|
|
730
742
|
padding: 0;
|
|
731
|
-
border: none;
|
|
732
743
|
border-radius: 6px;
|
|
733
|
-
background: transparent;
|
|
734
744
|
color: var(--tl-color-text-3);
|
|
735
745
|
font-size: 14px;
|
|
736
746
|
line-height: 1;
|
|
737
|
-
cursor: pointer;
|
|
738
747
|
}
|
|
739
748
|
/* Overlap each button 4px into the previous so the 32px visual squares sit 4px apart, not 8px.
|
|
740
749
|
Left-only, so the last button's hit area still stops at its row's right edge. */
|
|
741
750
|
.tlui-cmt-thread__action + .tlui-cmt-thread__action {
|
|
742
751
|
margin-left: -4px;
|
|
743
752
|
}
|
|
744
|
-
.tlui-cmt-thread__action
|
|
745
|
-
content: '';
|
|
746
|
-
position: absolute;
|
|
747
|
-
inset: 4px;
|
|
748
|
-
border-radius: var(--tl-radius-2);
|
|
749
|
-
}
|
|
750
|
-
.tlui-cmt-thread__action:hover {
|
|
753
|
+
.tlui-button.tlui-cmt-thread__action:hover {
|
|
751
754
|
color: var(--tl-color-text-1);
|
|
752
|
-
/* Raise the hovered button above its overlapping neighbours so its 40px hit area wins the
|
|
753
|
-
overlap zone — the same z-index flip tldraw's own toolbar buttons use. */
|
|
754
|
-
z-index: 1;
|
|
755
755
|
}
|
|
756
|
-
.tlui-cmt-thread__action:hover
|
|
757
|
-
background: var(--tl-color-muted-2);
|
|
758
|
-
}
|
|
759
|
-
.tlui-cmt-thread__action--danger:hover {
|
|
756
|
+
.tlui-button.tlui-cmt-thread__action--danger:hover {
|
|
760
757
|
color: var(--tl-color-danger);
|
|
761
758
|
}
|
|
762
759
|
.tlui-cmt-thread__resolved {
|
|
@@ -839,7 +836,7 @@
|
|
|
839
836
|
.tlui-cmt-canvas-preview--thread .tlui-cmt-card {
|
|
840
837
|
width: 100%;
|
|
841
838
|
gap: 0;
|
|
842
|
-
padding: 0
|
|
839
|
+
padding: 0 var(--tlui-cmt-thread-padding);
|
|
843
840
|
background: transparent;
|
|
844
841
|
border: none;
|
|
845
842
|
}
|
|
@@ -868,14 +865,17 @@
|
|
|
868
865
|
.tlui-cmt-stack-list .tlui-cmt-card .tlui-cmt-head {
|
|
869
866
|
min-height: 40px;
|
|
870
867
|
}
|
|
871
|
-
/*
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
868
|
+
/* Reserve head room only for pills that actually rendered (one child / two children) — pill count
|
|
869
|
+
is a permissions question (canModifyComment), not ownership, and empty slots (read-only viewers)
|
|
870
|
+
keep the full row. Sized from the 40px hit areas (4px overlap), minus the card padding the
|
|
871
|
+
right:0 pills sit over; text stops 4px shy of the visible square. */
|
|
872
|
+
.tlui-cmt-thread .tlui-cmt-card:has(.tlui-cmt-card__actions > *) .tlui-cmt-head {
|
|
873
|
+
padding-right: calc(var(--tlui-cmt-thread-action-size) - var(--tlui-cmt-thread-padding));
|
|
876
874
|
}
|
|
877
|
-
.tlui-cmt-thread .tlui-cmt-card
|
|
878
|
-
padding-right: calc(
|
|
875
|
+
.tlui-cmt-thread .tlui-cmt-card:has(.tlui-cmt-card__actions > * + *) .tlui-cmt-head {
|
|
876
|
+
padding-right: calc(
|
|
877
|
+
2 * var(--tlui-cmt-thread-action-size) - 4px - var(--tlui-cmt-thread-padding)
|
|
878
|
+
);
|
|
879
879
|
}
|
|
880
880
|
|
|
881
881
|
/* comments list — thread summaries, one per row (used by the canvas sidebar) */
|
|
@@ -900,36 +900,34 @@
|
|
|
900
900
|
color: var(--tl-color-text-1);
|
|
901
901
|
}
|
|
902
902
|
|
|
903
|
-
/*
|
|
904
|
-
.tlui-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
justify-content: center;
|
|
903
|
+
/* A small square icon button in the sidebar header (filter funnel, overflow …). Also a
|
|
904
|
+
TldrawUiButton, but a bespoke 26px size — so it has to override .tlui-button's 40px box, and
|
|
905
|
+
`min-width` in particular would otherwise beat `width`. Selectors carry .tlui-button so
|
|
906
|
+
stylesheet order can't decide the winner. */
|
|
907
|
+
.tlui-button.tlui-cmt-header-btn {
|
|
909
908
|
width: 26px;
|
|
909
|
+
min-width: 26px;
|
|
910
910
|
height: 26px;
|
|
911
911
|
padding: 0;
|
|
912
|
-
border: none;
|
|
913
912
|
border-radius: 6px;
|
|
914
|
-
background: transparent;
|
|
915
913
|
color: var(--tl-color-text-2);
|
|
916
|
-
cursor: pointer;
|
|
917
914
|
}
|
|
918
915
|
/* Same hit-target expansion as the thread actions, tiled the same way — this row's gap is 2px too
|
|
919
|
-
(see `.tlui-cmt-list__header-actions`).
|
|
920
|
-
.tlui-
|
|
921
|
-
|
|
922
|
-
|
|
916
|
+
(see `.tlui-cmt-list__header-actions`). Unlike the thread actions, the hover fill sits on the
|
|
917
|
+
button itself, so .tlui-button's ::after wash is cleared and the pseudo-element is left doing
|
|
918
|
+
nothing but widening the hit area. */
|
|
919
|
+
.tlui-button.tlui-cmt-header-btn::after {
|
|
923
920
|
inset: -6px -1px;
|
|
921
|
+
background: none;
|
|
924
922
|
}
|
|
925
|
-
.tlui-cmt-header-btn:first-child::after {
|
|
923
|
+
.tlui-button.tlui-cmt-header-btn:first-child::after {
|
|
926
924
|
left: -6px;
|
|
927
925
|
}
|
|
928
|
-
.tlui-cmt-header-btn:last-child::after {
|
|
926
|
+
.tlui-button.tlui-cmt-header-btn:last-child::after {
|
|
929
927
|
right: -6px;
|
|
930
928
|
}
|
|
931
|
-
.tlui-cmt-header-btn:hover,
|
|
932
|
-
.tlui-cmt-header-btn[data-state='open'] {
|
|
929
|
+
.tlui-button.tlui-cmt-header-btn:hover,
|
|
930
|
+
.tlui-button.tlui-cmt-header-btn[data-state='open'] {
|
|
933
931
|
background: var(--tl-color-muted-2);
|
|
934
932
|
color: var(--tl-color-text-1);
|
|
935
933
|
}
|
|
@@ -1076,10 +1074,11 @@
|
|
|
1076
1074
|
color: var(--tl-color-text-3);
|
|
1077
1075
|
}
|
|
1078
1076
|
|
|
1079
|
-
/* The comments layer
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1077
|
+
/* The comments layer renders through `EditorPortal`, so its pieces can pick their own layer rather
|
|
1078
|
+
than the one the component is mounted in. Pins live in the canvas-in-front layer (beneath the UI
|
|
1079
|
+
panels at z-index 300), so the toolbar and style panel draw over them; the open thread's popover
|
|
1080
|
+
goes to the menus layer instead (`.tlui-cmt-canvas-popover`) so it isn't clipped. Click-through
|
|
1081
|
+
except on its own children. */
|
|
1083
1082
|
.tlui-cmt-canvas-layer {
|
|
1084
1083
|
position: absolute;
|
|
1085
1084
|
inset: 0;
|
|
@@ -1423,13 +1422,6 @@
|
|
|
1423
1422
|
background: color-mix(in srgb, var(--tl-color-selected) 10%, transparent);
|
|
1424
1423
|
}
|
|
1425
1424
|
|
|
1426
|
-
/* A movable region body (the 'body'/'both' move modes): draggable to translate the whole region.
|
|
1427
|
-
Interactive, so it captures the interior while shown — the tradeoff of dragging the body. */
|
|
1428
|
-
.tlui-cmt-canvas-region--movable {
|
|
1429
|
-
pointer-events: auto;
|
|
1430
|
-
cursor: move;
|
|
1431
|
-
}
|
|
1432
|
-
|
|
1433
1425
|
/* Corner resize handles on a region box (three corners; the pin corner is the move handle). */
|
|
1434
1426
|
.tlui-cmt-canvas-region-handle {
|
|
1435
1427
|
position: absolute;
|
package/dist-cjs/index.js
CHANGED
|
@@ -19,7 +19,7 @@ var import_utils = require("@tldraw/utils");
|
|
|
19
19
|
__reExport(index_exports, require("@tldraw/commenting"), module.exports);
|
|
20
20
|
(0, import_utils.registerTldrawLibraryVersion)(
|
|
21
21
|
"@tldraw/collaboration",
|
|
22
|
-
"5.3.0-next.
|
|
22
|
+
"5.3.0-next.7654e7ac2a02",
|
|
23
23
|
"cjs"
|
|
24
24
|
);
|
|
25
25
|
//# sourceMappingURL=index.js.map
|
package/dist-esm/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tldraw/collaboration",
|
|
3
3
|
"description": "tldraw collaboration umbrella package.",
|
|
4
|
-
"version": "5.3.0-next.
|
|
4
|
+
"version": "5.3.0-next.7654e7ac2a02",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "tldraw Inc.",
|
|
7
7
|
"email": "hello@tldraw.com"
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"node": ">=22.12.0"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@tldraw/commenting": "5.3.0-next.
|
|
55
|
-
"@tldraw/utils": "5.3.0-next.
|
|
54
|
+
"@tldraw/commenting": "5.3.0-next.7654e7ac2a02",
|
|
55
|
+
"@tldraw/utils": "5.3.0-next.7654e7ac2a02"
|
|
56
56
|
},
|
|
57
57
|
"module": "dist-esm/index.mjs",
|
|
58
58
|
"source": "src/index.ts",
|