@tldraw/tldraw 5.3.0-next.fc37bd96825b → 5.4.0-canary.074b19f2c11f
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/dist-cjs/index.js +1 -1
- package/dist-esm/index.mjs +1 -1
- package/package.json +2 -2
- package/tldraw.css +69 -20
package/dist-cjs/index.js
CHANGED
|
@@ -19,7 +19,7 @@ var import_tldraw = require("tldraw");
|
|
|
19
19
|
__reExport(index_exports, require("tldraw"), module.exports);
|
|
20
20
|
(0, import_tldraw.registerTldrawLibraryVersion)(
|
|
21
21
|
"@tldraw/tldraw",
|
|
22
|
-
"5.
|
|
22
|
+
"5.4.0-canary.074b19f2c11f",
|
|
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/tldraw",
|
|
3
3
|
"description": "A tiny little drawing editor.",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.4.0-canary.074b19f2c11f",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "tldraw Inc.",
|
|
7
7
|
"email": "hello@tldraw.com"
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"src"
|
|
48
48
|
],
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"tldraw": "5.
|
|
50
|
+
"tldraw": "5.4.0-canary.074b19f2c11f"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"react": "^18.2.0 || ^19.2.1",
|
package/tldraw.css
CHANGED
|
@@ -33,15 +33,20 @@
|
|
|
33
33
|
* background, grid, shapes, overlays, and blocker are all children of .tl-canvas,
|
|
34
34
|
* so their z-indices are relative to the canvas, not the container.
|
|
35
35
|
*
|
|
36
|
-
* watermark and canvas-in-front are siblings of .tl-canvas
|
|
37
|
-
* so they compete with the UI layer (.tlui-layout at z-index 300).
|
|
36
|
+
* collaborators, watermark, and canvas-in-front are siblings of .tl-canvas
|
|
37
|
+
* (outside it), so they compete with the UI layer (.tlui-layout at z-index 300).
|
|
38
38
|
* canvas-in-front must be below the UI layer (300) to sit between
|
|
39
|
-
* the canvas and the UI
|
|
39
|
+
* the canvas and the UI; collaborator cursors sit above canvas content
|
|
40
|
+
* (and layers that anchor to it, like comment pins) but below the
|
|
41
|
+
* in-front content and the UI panels. The watermark (a licensing element)
|
|
42
|
+
* sits above that content so it can't be occluded, but still below the
|
|
43
|
+
* in-front content and the UI.
|
|
40
44
|
*/
|
|
41
45
|
--tl-layer-canvas-hidden: -999999;
|
|
42
46
|
--tl-layer-canvas-background: 100;
|
|
43
47
|
--tl-layer-canvas-grid: 150;
|
|
44
|
-
--tl-layer-
|
|
48
|
+
--tl-layer-collaborators: 245;
|
|
49
|
+
--tl-layer-watermark: 248;
|
|
45
50
|
--tl-layer-canvas-in-front: 250;
|
|
46
51
|
--tl-layer-canvas-shapes: 300;
|
|
47
52
|
--tl-layer-canvas-overlays: 500;
|
|
@@ -90,6 +95,10 @@
|
|
|
90
95
|
url("data:image/svg+xml,<svg height='32' width='32' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg' style='color: black;'><defs><filter id='shadow' y='-40%' x='-40%' width='180px' height='180%' color-interpolation-filters='sRGB'><feDropShadow dx='1' dy='1' stdDeviation='1.2' flood-opacity='.5'/></filter></defs><g fill='none' transform='rotate(0 16 16)' filter='url(%23shadow)'><path d='m25 16h-6.01v-6h-2.98v6h-6.01v3h6.01v6h2.98v-6h6.01z' fill='white'/><path d='m23.9902 17.0103h-6v-6.01h-.98v6.01h-6v.98h6v6.01h.98v-6.01h6z' fill='%23231f1f'/></g></svg>")
|
|
91
96
|
16 16,
|
|
92
97
|
crosshair;
|
|
98
|
+
--tl-cursor-comment:
|
|
99
|
+
url("data:image/svg+xml,<svg height='32' width='32' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'><defs><filter id='shadow' y='-40%' x='-40%' width='180px' height='180%' color-interpolation-filters='sRGB'><feDropShadow dx='1' dy='1' stdDeviation='1.2' flood-opacity='.5'/></filter></defs><g filter='url(%23shadow)'><path d='M5 19.5 L5 11 A8 8 0 0 1 13 3 A8 8 0 0 1 21 11 A8 8 0 0 1 13 19 Z' fill='white' stroke='black' stroke-width='1' stroke-linejoin='round'/></g></svg>")
|
|
100
|
+
5 19,
|
|
101
|
+
crosshair;
|
|
93
102
|
--tl-cursor-move:
|
|
94
103
|
url("data:image/svg+xml,<svg height='32' width='32' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg' style='color: black;'><defs><filter id='shadow' y='-40%' x='-40%' width='180px' height='180%' color-interpolation-filters='sRGB'><feDropShadow dx='1' dy='1' stdDeviation='1.2' flood-opacity='.5'/></filter></defs><g fill='none' transform='rotate(0 16 16)' filter='url(%23shadow)'><path d='m19 14h1v1h-1zm1 6h-1v-1h1zm-5-5h-1v-1h1zm0 5h-1v-1h1zm2-10.987-7.985 7.988 5.222 5.221 2.763 2.763 7.984-7.985z' fill='white'/><g fill='black'><path d='m23.5664 16.9971-2.557-2.809v1.829h-4.009-4.001v-1.829l-2.571 2.809 2.572 2.808-.001-1.808h4.001 4.009l-.001 1.808z'/><path d='m17.9873 17h.013v-4.001l1.807.001-2.807-2.571-2.809 2.57h1.809v4.001h.008v4.002l-1.828-.001 2.807 2.577 2.805-2.576h-1.805z'/></g></g></svg>")
|
|
95
104
|
16 16,
|
|
@@ -290,6 +299,12 @@
|
|
|
290
299
|
outline: 1px solid var(--tl-color-low);
|
|
291
300
|
}
|
|
292
301
|
|
|
302
|
+
/* The host for <EditorPortal>, last among the container's children. It's a position in the DOM
|
|
303
|
+
rather than a box: `display: contents` keeps what it holds positioned against the container. */
|
|
304
|
+
.tl-portal-host {
|
|
305
|
+
display: contents;
|
|
306
|
+
}
|
|
307
|
+
|
|
293
308
|
input,
|
|
294
309
|
*[contenteditable],
|
|
295
310
|
*[contenteditable] * {
|
|
@@ -376,6 +391,30 @@ input,
|
|
|
376
391
|
contain: layout style size;
|
|
377
392
|
}
|
|
378
393
|
|
|
394
|
+
/* The collaborator cursor layer: a sibling of .tl-canvas, above all canvas content, below the
|
|
395
|
+
in-front layer (250) and the UI panels (300). Display-only — pointer events pass through. */
|
|
396
|
+
.tl-collaborators {
|
|
397
|
+
position: absolute;
|
|
398
|
+
inset: 0px;
|
|
399
|
+
z-index: var(--tl-layer-collaborators);
|
|
400
|
+
pointer-events: none;
|
|
401
|
+
overflow: clip;
|
|
402
|
+
contain: layout style size;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
.tl-collaborators__item {
|
|
406
|
+
position: absolute;
|
|
407
|
+
top: 0px;
|
|
408
|
+
left: 0px;
|
|
409
|
+
overflow: visible;
|
|
410
|
+
pointer-events: none;
|
|
411
|
+
transform-origin: top left;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
.tl-cursor {
|
|
415
|
+
overflow: visible;
|
|
416
|
+
}
|
|
417
|
+
|
|
379
418
|
/* --------------- Overlay Stack --------------- */
|
|
380
419
|
|
|
381
420
|
/* -------------- Selection foreground -------------- */
|
|
@@ -2123,6 +2162,14 @@ it from receiving any pointer events or affecting the cursor. */
|
|
|
2123
2162
|
flex-shrink: 0;
|
|
2124
2163
|
}
|
|
2125
2164
|
|
|
2165
|
+
/* The label is a fixed bit of chrome next to the input; it should never be squeezed. Without this,
|
|
2166
|
+
an inherited `overflow-wrap: anywhere` (e.g. from .tlui-dialog__body) drops its min-content width
|
|
2167
|
+
to a single character and short labels wrap mid-word, e.g. "URL" breaking after "UR". */
|
|
2168
|
+
.tlui-input__wrapper > label {
|
|
2169
|
+
flex-shrink: 0;
|
|
2170
|
+
overflow-wrap: normal;
|
|
2171
|
+
}
|
|
2172
|
+
|
|
2126
2173
|
/* If mobile use 16px as font size */
|
|
2127
2174
|
/* On iOS, font size under 16px in an input will make the page zoom into the input 🤦♂️ */
|
|
2128
2175
|
/* https://css-tricks.com/16px-or-larger-text-prevents-ios-form-zoom/ */
|
|
@@ -2344,6 +2391,16 @@ it from receiving any pointer events or affecting the cursor. */
|
|
|
2344
2391
|
-ms-overflow-style: none;
|
|
2345
2392
|
}
|
|
2346
2393
|
|
|
2394
|
+
.tlui-hover-card__content {
|
|
2395
|
+
position: relative;
|
|
2396
|
+
margin: 0px;
|
|
2397
|
+
border: none;
|
|
2398
|
+
border-radius: var(--tl-radius-3);
|
|
2399
|
+
background-color: var(--tl-color-panel);
|
|
2400
|
+
box-shadow: var(--tl-shadow-3);
|
|
2401
|
+
z-index: var(--tl-layer-menus);
|
|
2402
|
+
}
|
|
2403
|
+
|
|
2347
2404
|
/* -------------------- Menu Zone ------------------- */
|
|
2348
2405
|
|
|
2349
2406
|
.tlui-menu-zone {
|
|
@@ -2814,6 +2871,7 @@ tldraw? probably.
|
|
|
2814
2871
|
.tlui-layout__bottom {
|
|
2815
2872
|
grid-row: 2;
|
|
2816
2873
|
width: 100%;
|
|
2874
|
+
min-width: 0px;
|
|
2817
2875
|
}
|
|
2818
2876
|
|
|
2819
2877
|
.tlui-layout__bottom__main {
|
|
@@ -3668,7 +3726,8 @@ tldraw? probably.
|
|
|
3668
3726
|
align-items: center;
|
|
3669
3727
|
}
|
|
3670
3728
|
|
|
3671
|
-
.tlui-people-menu__user__color
|
|
3729
|
+
.tlui-people-menu__user__color,
|
|
3730
|
+
.tlui-people-menu__user__edit {
|
|
3672
3731
|
flex-shrink: 0;
|
|
3673
3732
|
}
|
|
3674
3733
|
|
|
@@ -3714,7 +3773,8 @@ tldraw? probably.
|
|
|
3714
3773
|
}
|
|
3715
3774
|
|
|
3716
3775
|
.tlui-people-menu__item {
|
|
3717
|
-
|
|
3776
|
+
display: flex;
|
|
3777
|
+
align-items: center;
|
|
3718
3778
|
}
|
|
3719
3779
|
|
|
3720
3780
|
.tlui-people-menu__item:last-of-type .tlui-button__menu {
|
|
@@ -3722,7 +3782,8 @@ tldraw? probably.
|
|
|
3722
3782
|
}
|
|
3723
3783
|
|
|
3724
3784
|
.tlui-people-menu__item__button {
|
|
3725
|
-
padding:
|
|
3785
|
+
padding-inline-start: 12px;
|
|
3786
|
+
padding-inline-end: 0px;
|
|
3726
3787
|
overflow: hidden;
|
|
3727
3788
|
}
|
|
3728
3789
|
|
|
@@ -3732,7 +3793,7 @@ tldraw? probably.
|
|
|
3732
3793
|
align-items: auto;
|
|
3733
3794
|
justify-content: flex-start;
|
|
3734
3795
|
flex-grow: 2;
|
|
3735
|
-
gap:
|
|
3796
|
+
gap: 12px;
|
|
3736
3797
|
}
|
|
3737
3798
|
|
|
3738
3799
|
.tlui-people-menu__name {
|
|
@@ -3743,18 +3804,9 @@ tldraw? probably.
|
|
|
3743
3804
|
}
|
|
3744
3805
|
|
|
3745
3806
|
.tlui-people-menu__item__follow {
|
|
3746
|
-
position: absolute;
|
|
3747
|
-
top: 0px;
|
|
3748
|
-
inset-inline-end: 0px;
|
|
3749
|
-
max-width: 40px;
|
|
3750
3807
|
flex-shrink: 0;
|
|
3751
3808
|
}
|
|
3752
3809
|
|
|
3753
|
-
.tlui-people-menu__item[data-follow='true'],
|
|
3754
|
-
.tlui-people-menu__item:has(.tlui-button:focus-visible) {
|
|
3755
|
-
padding-inline-end: 36px;
|
|
3756
|
-
}
|
|
3757
|
-
|
|
3758
3810
|
.tlui-people-menu__item[data-follow='true'] .tlui-people-menu__item__follow,
|
|
3759
3811
|
.tlui-people-menu__item:has(.tlui-button:focus-visible) .tlui-people-menu__item__follow {
|
|
3760
3812
|
opacity: 1;
|
|
@@ -3765,9 +3817,6 @@ tldraw? probably.
|
|
|
3765
3817
|
opacity: 0;
|
|
3766
3818
|
}
|
|
3767
3819
|
|
|
3768
|
-
.tlui-people-menu__item:hover {
|
|
3769
|
-
padding-right: 36px;
|
|
3770
|
-
}
|
|
3771
3820
|
.tlui-people-menu__item:hover .tlui-people-menu__item__follow {
|
|
3772
3821
|
opacity: 1;
|
|
3773
3822
|
}
|