@tldraw/tldraw 5.3.0-next.299378752aaf → 5.3.0-next.3c51ad27dbd8
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 +77 -4
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.3.0-next.
|
|
22
|
+
"5.3.0-next.3c51ad27dbd8",
|
|
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.3.0-next.
|
|
4
|
+
"version": "5.3.0-next.3c51ad27dbd8",
|
|
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.3.0-next.
|
|
50
|
+
"tldraw": "5.3.0-next.3c51ad27dbd8"
|
|
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 -------------- */
|
|
@@ -789,6 +828,16 @@ input,
|
|
|
789
828
|
.tl-rich-text h6 {
|
|
790
829
|
margin-top: 5px;
|
|
791
830
|
margin-bottom: 10px;
|
|
831
|
+
/**
|
|
832
|
+
* Headings render at a larger font-size than the body text (via the browser's
|
|
833
|
+
* default h1–h6 sizing), so they can't inherit the container's resolved
|
|
834
|
+
* whole-pixel line-height — that value is derived from the base font size and
|
|
835
|
+
* would cram the taller lines together. Instead, scale line-height with each
|
|
836
|
+
* heading's own font-size using tldraw's unitless line-height multiplier, which
|
|
837
|
+
* the rich-text render/measure paths expose here. The 1.35 fallback mirrors the
|
|
838
|
+
* default theme line-height (see defaultThemes.ts).
|
|
839
|
+
*/
|
|
840
|
+
line-height: var(--tl-rich-text-heading-line-height, 1.35);
|
|
792
841
|
}
|
|
793
842
|
|
|
794
843
|
.tl-rich-text a {
|
|
@@ -2113,6 +2162,14 @@ it from receiving any pointer events or affecting the cursor. */
|
|
|
2113
2162
|
flex-shrink: 0;
|
|
2114
2163
|
}
|
|
2115
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
|
+
|
|
2116
2173
|
/* If mobile use 16px as font size */
|
|
2117
2174
|
/* On iOS, font size under 16px in an input will make the page zoom into the input 🤦♂️ */
|
|
2118
2175
|
/* https://css-tricks.com/16px-or-larger-text-prevents-ios-form-zoom/ */
|
|
@@ -2334,6 +2391,16 @@ it from receiving any pointer events or affecting the cursor. */
|
|
|
2334
2391
|
-ms-overflow-style: none;
|
|
2335
2392
|
}
|
|
2336
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
|
+
|
|
2337
2404
|
/* -------------------- Menu Zone ------------------- */
|
|
2338
2405
|
|
|
2339
2406
|
.tlui-menu-zone {
|
|
@@ -2804,6 +2871,7 @@ tldraw? probably.
|
|
|
2804
2871
|
.tlui-layout__bottom {
|
|
2805
2872
|
grid-row: 2;
|
|
2806
2873
|
width: 100%;
|
|
2874
|
+
min-width: 0px;
|
|
2807
2875
|
}
|
|
2808
2876
|
|
|
2809
2877
|
.tlui-layout__bottom__main {
|
|
@@ -3177,6 +3245,7 @@ tldraw? probably.
|
|
|
3177
3245
|
.tlui-toast__main {
|
|
3178
3246
|
flex-grow: 2;
|
|
3179
3247
|
max-width: 280px;
|
|
3248
|
+
min-width: 0;
|
|
3180
3249
|
}
|
|
3181
3250
|
|
|
3182
3251
|
.tlui-toast__content {
|
|
@@ -3185,6 +3254,7 @@ tldraw? probably.
|
|
|
3185
3254
|
line-height: 1.4;
|
|
3186
3255
|
flex-direction: column;
|
|
3187
3256
|
gap: var(--tl-space-3);
|
|
3257
|
+
min-width: 0;
|
|
3188
3258
|
}
|
|
3189
3259
|
|
|
3190
3260
|
.tlui-toast__main[data-actions='true'] .tlui-toast__content {
|
|
@@ -3196,6 +3266,7 @@ tldraw? probably.
|
|
|
3196
3266
|
color: var(--tl-color-text-1);
|
|
3197
3267
|
/* this makes the default toast look better */
|
|
3198
3268
|
line-height: 16px;
|
|
3269
|
+
overflow-wrap: anywhere;
|
|
3199
3270
|
}
|
|
3200
3271
|
|
|
3201
3272
|
.tlui-toast__description {
|
|
@@ -3203,6 +3274,7 @@ tldraw? probably.
|
|
|
3203
3274
|
padding: var(--tl-space-3);
|
|
3204
3275
|
margin: 0px;
|
|
3205
3276
|
padding: 0px;
|
|
3277
|
+
overflow-wrap: anywhere;
|
|
3206
3278
|
}
|
|
3207
3279
|
|
|
3208
3280
|
.tlui-toast__icon + .tlui-toast__main > .tlui-toast__actions {
|
|
@@ -3329,6 +3401,7 @@ tldraw? probably.
|
|
|
3329
3401
|
color: var(--tl-color-text-1);
|
|
3330
3402
|
user-select: all;
|
|
3331
3403
|
-webkit-user-select: text;
|
|
3404
|
+
overflow-wrap: anywhere;
|
|
3332
3405
|
}
|
|
3333
3406
|
.tlui-dialog__body a {
|
|
3334
3407
|
color: var(--tl-color-selected);
|