@tldraw/tldraw 4.6.0-next.fecc64eee134 → 5.0.0
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 +7 -246
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
|
-
"
|
|
22
|
+
"5.0.0",
|
|
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": "
|
|
4
|
+
"version": "5.0.0",
|
|
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": "
|
|
50
|
+
"tldraw": "5.0.0"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"react": "^18.2.0 || ^19.2.1",
|
package/tldraw.css
CHANGED
|
@@ -58,7 +58,6 @@
|
|
|
58
58
|
/* User handles need to be above selection edges / corners, matters for sticky note clone handles */
|
|
59
59
|
--tl-layer-overlays-user-handles: 105;
|
|
60
60
|
--tl-layer-overlays-user-indicator-hint: 110;
|
|
61
|
-
--tl-layer-overlays-custom: 115;
|
|
62
61
|
--tl-layer-overlays-collaborator-cursor-hint: 120;
|
|
63
62
|
--tl-layer-overlays-collaborator-cursor: 130;
|
|
64
63
|
|
|
@@ -158,14 +157,11 @@
|
|
|
158
157
|
|
|
159
158
|
.tl-theme__light {
|
|
160
159
|
/* Canvas */
|
|
161
|
-
--tl-color-snap: hsl(0, 76%, 60%);
|
|
162
160
|
--tl-color-selection-fill: hsl(210, 100%, 56%, 24%);
|
|
163
161
|
--tl-color-selection-stroke: hsl(214, 84%, 56%);
|
|
164
162
|
--tl-color-background: hsl(210, 20%, 98%);
|
|
165
163
|
/* if you ever update --tl-color-background, update the hardcoded values in theme-init.js and globals.css
|
|
166
164
|
they're there to make sure the background color matches the user's preference before the actual app loads*/
|
|
167
|
-
--tl-color-brush-fill: hsl(0, 0%, 56%, 10.2%);
|
|
168
|
-
--tl-color-brush-stroke: hsl(0, 0%, 56%, 25.1%);
|
|
169
165
|
--tl-color-grid: hsl(0, 0%, 43%);
|
|
170
166
|
/* UI */
|
|
171
167
|
--tl-color-low: hsl(204, 16%, 94%);
|
|
@@ -199,7 +195,7 @@
|
|
|
199
195
|
--tl-color-info: hsl(201, 98%, 41%);
|
|
200
196
|
--tl-color-warning: hsl(27, 98%, 47%);
|
|
201
197
|
--tl-color-danger: hsl(0, 90%, 43%);
|
|
202
|
-
|
|
198
|
+
|
|
203
199
|
/* Shadows */
|
|
204
200
|
--tl-shadow-1: 0px 1px 2px hsl(0, 0%, 0%, 25%), 0px 1px 3px hsl(0, 0%, 0%, 9%);
|
|
205
201
|
--tl-shadow-2:
|
|
@@ -215,14 +211,11 @@
|
|
|
215
211
|
|
|
216
212
|
.tl-theme__dark {
|
|
217
213
|
/* Canvas */
|
|
218
|
-
--tl-color-snap: hsl(0, 76%, 60%);
|
|
219
214
|
--tl-color-selection-fill: hsl(209, 100%, 57%, 20%);
|
|
220
215
|
--tl-color-selection-stroke: hsl(214, 84%, 56%);
|
|
221
216
|
--tl-color-background: hsl(240, 5%, 6.5%);
|
|
222
217
|
/* if you ever update --tl-color-background, update the hardcoded values in theme-init.js and globals.css
|
|
223
218
|
they're there to make sure the background color matches the user's preference before the actual app loads*/
|
|
224
|
-
--tl-color-brush-fill: hsl(0, 0%, 71%, 5.1%);
|
|
225
|
-
--tl-color-brush-stroke: hsl(0, 0%, 71%, 25.1%);
|
|
226
219
|
--tl-color-grid: hsl(0, 0%, 40%);
|
|
227
220
|
/* UI */
|
|
228
221
|
--tl-color-low: hsl(260, 4.5%, 10.5%);
|
|
@@ -256,7 +249,7 @@
|
|
|
256
249
|
--tl-color-info: hsl(199, 92%, 56%);
|
|
257
250
|
--tl-color-warning: hsl(36, 100%, 57%);
|
|
258
251
|
--tl-color-danger: hsl(0, 82%, 66%);
|
|
259
|
-
|
|
252
|
+
|
|
260
253
|
/* Shadows */
|
|
261
254
|
--tl-shadow-1:
|
|
262
255
|
0px 1px 2px hsl(0, 0%, 0%, 16.1%), 0px 1px 3px hsl(0, 0%, 0%, 22%),
|
|
@@ -328,26 +321,6 @@ input,
|
|
|
328
321
|
z-index: var(--tl-layer-canvas-shapes);
|
|
329
322
|
}
|
|
330
323
|
|
|
331
|
-
.tl-overlays {
|
|
332
|
-
position: absolute;
|
|
333
|
-
top: 0px;
|
|
334
|
-
left: 0px;
|
|
335
|
-
height: 100%;
|
|
336
|
-
width: 100%;
|
|
337
|
-
contain: strict;
|
|
338
|
-
pointer-events: none;
|
|
339
|
-
z-index: var(--tl-layer-canvas-overlays);
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
.tl-overlays__item {
|
|
343
|
-
position: absolute;
|
|
344
|
-
top: 0px;
|
|
345
|
-
left: 0px;
|
|
346
|
-
overflow: visible;
|
|
347
|
-
pointer-events: none;
|
|
348
|
-
transform-origin: top left;
|
|
349
|
-
}
|
|
350
|
-
|
|
351
324
|
.tl-svg-context {
|
|
352
325
|
position: absolute;
|
|
353
326
|
top: 0px;
|
|
@@ -403,62 +376,6 @@ input,
|
|
|
403
376
|
|
|
404
377
|
/* --------------- Overlay Stack --------------- */
|
|
405
378
|
|
|
406
|
-
/* back of the stack, behind user's stuff */
|
|
407
|
-
.tl-collaborator__scribble {
|
|
408
|
-
z-index: var(--tl-layer-overlays-collaborator-scribble);
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
.tl-collaborator__brush {
|
|
412
|
-
z-index: var(--tl-layer-overlays-collaborator-brush);
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
.tl-collaborator__shape-indicator {
|
|
416
|
-
z-index: var(--tl-layer-overlays-collaborator-shape-indicator);
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
.tl-user-scribble {
|
|
420
|
-
z-index: var(--tl-layer-overlays-user-scribble);
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
.tl-user-brush {
|
|
424
|
-
z-index: var(--tl-layer-overlays-user-brush);
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
.tl-user-handles {
|
|
428
|
-
z-index: var(--tl-layer-overlays-user-handles);
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
.tl-user-snapline {
|
|
432
|
-
z-index: var(--tl-layer-overlays-user-snapline);
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
.tl-selection__fg {
|
|
436
|
-
pointer-events: none;
|
|
437
|
-
z-index: var(--tl-layer-overlays-selection-fg);
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
.tl-user-indicator__hint {
|
|
441
|
-
z-index: var(--tl-layer-overlays-user-indicator-hint);
|
|
442
|
-
stroke-width: calc(2.5px * var(--tl-scale));
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
.tl-custom-overlays {
|
|
446
|
-
z-index: var(--tl-layer-overlays-custom);
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
/* behind collaborator cursor */
|
|
450
|
-
.tl-collaborator__cursor-hint {
|
|
451
|
-
z-index: var(--tl-layer-overlays-collaborator-cursor-hint);
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
.tl-collaborator__cursor {
|
|
455
|
-
z-index: var(--tl-layer-overlays-collaborator-cursor);
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
.tl-cursor {
|
|
459
|
-
overflow: visible;
|
|
460
|
-
}
|
|
461
|
-
|
|
462
379
|
/* -------------- Selection foreground -------------- */
|
|
463
380
|
|
|
464
381
|
.tl-selection__bg {
|
|
@@ -470,49 +387,6 @@ input,
|
|
|
470
387
|
pointer-events: all;
|
|
471
388
|
}
|
|
472
389
|
|
|
473
|
-
.tl-selection__fg__outline {
|
|
474
|
-
fill: none;
|
|
475
|
-
pointer-events: none;
|
|
476
|
-
stroke: var(--tl-color-selection-stroke);
|
|
477
|
-
stroke-width: calc(1.5px * var(--tl-scale));
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
.tl-corner-handle {
|
|
481
|
-
pointer-events: none;
|
|
482
|
-
stroke: var(--tl-color-selection-stroke);
|
|
483
|
-
fill: var(--tl-color-background);
|
|
484
|
-
stroke-width: calc(1.5px * var(--tl-scale));
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
.tl-text-handle {
|
|
488
|
-
pointer-events: none;
|
|
489
|
-
fill: var(--tl-color-selection-stroke);
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
.tl-corner-crop-handle {
|
|
493
|
-
pointer-events: none;
|
|
494
|
-
fill: none;
|
|
495
|
-
stroke: var(--tl-color-selection-stroke);
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
.tl-corner-crop-edge-handle {
|
|
499
|
-
pointer-events: none;
|
|
500
|
-
fill: none;
|
|
501
|
-
stroke: var(--tl-color-selection-stroke);
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
.tl-mobile-rotate__bg {
|
|
505
|
-
pointer-events: all;
|
|
506
|
-
cursor: var(--tl-cursor-grab);
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
.tl-mobile-rotate__fg {
|
|
510
|
-
pointer-events: none;
|
|
511
|
-
stroke: var(--tl-color-selection-stroke);
|
|
512
|
-
fill: var(--tl-color-background);
|
|
513
|
-
stroke-width: calc(1.5px * var(--tl-scale));
|
|
514
|
-
}
|
|
515
|
-
|
|
516
390
|
.tl-transparent {
|
|
517
391
|
fill: transparent;
|
|
518
392
|
stroke: transparent;
|
|
@@ -538,7 +412,6 @@ input,
|
|
|
538
412
|
overflow: hidden;
|
|
539
413
|
text-overflow: ellipsis;
|
|
540
414
|
font-size: 12px;
|
|
541
|
-
font-family: var(--font-body);
|
|
542
415
|
border-radius: var(--tl-radius-2);
|
|
543
416
|
color: var(--tl-color-selected-contrast);
|
|
544
417
|
}
|
|
@@ -556,7 +429,6 @@ input,
|
|
|
556
429
|
overflow: hidden;
|
|
557
430
|
text-overflow: ellipsis;
|
|
558
431
|
font-size: 12px;
|
|
559
|
-
font-family: var(--font-body);
|
|
560
432
|
text-shadow: var(--tl-text-outline);
|
|
561
433
|
color: var(--tl-color-selected-contrast);
|
|
562
434
|
}
|
|
@@ -572,7 +444,6 @@ input,
|
|
|
572
444
|
position: absolute;
|
|
573
445
|
padding: 3px 6px;
|
|
574
446
|
font-size: 12px;
|
|
575
|
-
font-family: var(--font-body);
|
|
576
447
|
opacity: 1;
|
|
577
448
|
border-radius: var(--tl-radius-2);
|
|
578
449
|
}
|
|
@@ -583,7 +454,6 @@ input,
|
|
|
583
454
|
white-space: nowrap;
|
|
584
455
|
padding: 3px 6px;
|
|
585
456
|
font-size: 12px;
|
|
586
|
-
font-family: var(--font-body);
|
|
587
457
|
pointer-events: none;
|
|
588
458
|
z-index: var(--tl-layer-cursor);
|
|
589
459
|
margin-top: 16px;
|
|
@@ -1011,41 +881,6 @@ input,
|
|
|
1011
881
|
}
|
|
1012
882
|
}
|
|
1013
883
|
|
|
1014
|
-
/* ---------------------- Brush --------------------- */
|
|
1015
|
-
|
|
1016
|
-
.tl-brush {
|
|
1017
|
-
stroke-width: calc(var(--tl-scale) * 1px);
|
|
1018
|
-
contain: size layout;
|
|
1019
|
-
}
|
|
1020
|
-
|
|
1021
|
-
.tl-brush__default {
|
|
1022
|
-
stroke: var(--tl-color-brush-stroke);
|
|
1023
|
-
fill: var(--tl-color-brush-fill);
|
|
1024
|
-
}
|
|
1025
|
-
|
|
1026
|
-
/* -------------------- Scribble -------------------- */
|
|
1027
|
-
|
|
1028
|
-
.tl-scribble {
|
|
1029
|
-
stroke-linejoin: round;
|
|
1030
|
-
stroke-linecap: round;
|
|
1031
|
-
pointer-events: none;
|
|
1032
|
-
contain: size layout;
|
|
1033
|
-
}
|
|
1034
|
-
|
|
1035
|
-
/* ---------------------- Snaps --------------------- */
|
|
1036
|
-
|
|
1037
|
-
.tl-snap-indicator {
|
|
1038
|
-
stroke: var(--tl-color-snap);
|
|
1039
|
-
stroke-width: calc(1px * var(--tl-scale));
|
|
1040
|
-
fill: none;
|
|
1041
|
-
}
|
|
1042
|
-
|
|
1043
|
-
.tl-snap-point {
|
|
1044
|
-
stroke: var(--tl-color-snap);
|
|
1045
|
-
stroke-width: calc(1px * var(--tl-scale));
|
|
1046
|
-
fill: none;
|
|
1047
|
-
}
|
|
1048
|
-
|
|
1049
884
|
/* ---------------- Hyperlink Button ---------------- */
|
|
1050
885
|
|
|
1051
886
|
.tl-hyperlink-button {
|
|
@@ -1099,51 +934,6 @@ input,
|
|
|
1099
934
|
display: none;
|
|
1100
935
|
}
|
|
1101
936
|
|
|
1102
|
-
/* --------------------- Handles -------------------- */
|
|
1103
|
-
|
|
1104
|
-
.tl-handle {
|
|
1105
|
-
pointer-events: all;
|
|
1106
|
-
}
|
|
1107
|
-
|
|
1108
|
-
.tl-handle__bg {
|
|
1109
|
-
fill: transparent;
|
|
1110
|
-
stroke: transparent;
|
|
1111
|
-
pointer-events: all;
|
|
1112
|
-
}
|
|
1113
|
-
|
|
1114
|
-
.tl-handle__fg {
|
|
1115
|
-
fill: var(--tl-color-selected-contrast);
|
|
1116
|
-
stroke: var(--tl-color-selection-stroke);
|
|
1117
|
-
stroke-width: calc(1.5px * var(--tl-scale));
|
|
1118
|
-
pointer-events: none;
|
|
1119
|
-
}
|
|
1120
|
-
|
|
1121
|
-
.tl-handle__create {
|
|
1122
|
-
opacity: 0;
|
|
1123
|
-
}
|
|
1124
|
-
|
|
1125
|
-
.tl-handle__clone > .tl-handle__fg {
|
|
1126
|
-
fill: var(--tl-color-selection-stroke);
|
|
1127
|
-
stroke: none;
|
|
1128
|
-
}
|
|
1129
|
-
|
|
1130
|
-
.tl-handle__bg:active {
|
|
1131
|
-
fill: none;
|
|
1132
|
-
}
|
|
1133
|
-
|
|
1134
|
-
.tl-container[data-coarse='true'] .tl-handle__bg:active {
|
|
1135
|
-
fill: var(--tl-color-selection-fill);
|
|
1136
|
-
}
|
|
1137
|
-
|
|
1138
|
-
.tl-container[data-coarse='true'] .tl-handle__create {
|
|
1139
|
-
opacity: 1;
|
|
1140
|
-
}
|
|
1141
|
-
|
|
1142
|
-
.tl-rotate-corner:not(:hover),
|
|
1143
|
-
.tl-resize-handle:not(:hover) {
|
|
1144
|
-
cursor: none;
|
|
1145
|
-
}
|
|
1146
|
-
|
|
1147
937
|
/* ----------------- Shape indicator ---------------- */
|
|
1148
938
|
|
|
1149
939
|
.tl-shape-indicator {
|
|
@@ -1153,10 +943,11 @@ input,
|
|
|
1153
943
|
contain: size layout;
|
|
1154
944
|
}
|
|
1155
945
|
|
|
1156
|
-
.tl-canvas-
|
|
946
|
+
.tl-canvas-overlays {
|
|
1157
947
|
position: absolute;
|
|
1158
948
|
inset: 0;
|
|
1159
949
|
pointer-events: none;
|
|
950
|
+
z-index: var(--tl-layer-canvas-overlays);
|
|
1160
951
|
}
|
|
1161
952
|
|
|
1162
953
|
/* ---------------------- Shape --------------------- */
|
|
@@ -1231,36 +1022,6 @@ input,
|
|
|
1231
1022
|
height: max-content;
|
|
1232
1023
|
}
|
|
1233
1024
|
|
|
1234
|
-
.tl-arrow-hint {
|
|
1235
|
-
stroke: var(--tl-color-text-1);
|
|
1236
|
-
fill: none;
|
|
1237
|
-
stroke-linecap: round;
|
|
1238
|
-
overflow: visible;
|
|
1239
|
-
}
|
|
1240
|
-
|
|
1241
|
-
.tl-arrow-hint-handle {
|
|
1242
|
-
fill: var(--tl-color-selected-contrast);
|
|
1243
|
-
stroke: var(--tl-color-selection-stroke);
|
|
1244
|
-
stroke-width: calc(1.5px * var(--tl-scale));
|
|
1245
|
-
r: calc(4px * var(--tl-scale));
|
|
1246
|
-
}
|
|
1247
|
-
|
|
1248
|
-
.tl-arrow-hint-snap {
|
|
1249
|
-
stroke: transparent;
|
|
1250
|
-
fill: var(--tl-color-selection-fill);
|
|
1251
|
-
r: calc(12px * var(--tl-scale));
|
|
1252
|
-
}
|
|
1253
|
-
|
|
1254
|
-
.tl-arrow-hint-snap__none,
|
|
1255
|
-
.tl-arrow-hint-snap__center,
|
|
1256
|
-
.tl-arrow-hint-snap__axis {
|
|
1257
|
-
display: none;
|
|
1258
|
-
}
|
|
1259
|
-
|
|
1260
|
-
.tl-arrow-hint-snap__edge {
|
|
1261
|
-
r: calc(8px * var(--tl-scale));
|
|
1262
|
-
}
|
|
1263
|
-
|
|
1264
1025
|
/* ------------------- Bookmark shape ------------------- */
|
|
1265
1026
|
|
|
1266
1027
|
.tl-bookmark__container {
|
|
@@ -3218,20 +2979,20 @@ tldraw? probably.
|
|
|
3218
2979
|
display: none;
|
|
3219
2980
|
}
|
|
3220
2981
|
.tlui-row.tlui-main-toolbar__group:not(:nth-last-child(-n + 1 of [data-toolbar-visible='true'])) {
|
|
3221
|
-
border-right: 1px solid var(--color-divider);
|
|
2982
|
+
border-right: 1px solid var(--tl-color-divider);
|
|
3222
2983
|
margin-right: 2px;
|
|
3223
2984
|
}
|
|
3224
2985
|
.tlui-column.tlui-main-toolbar__group:not(
|
|
3225
2986
|
:nth-last-child(-n + 1 of [data-toolbar-visible='true'])
|
|
3226
2987
|
) {
|
|
3227
|
-
border-bottom: 1px solid var(--color-divider);
|
|
2988
|
+
border-bottom: 1px solid var(--tl-color-divider);
|
|
3228
2989
|
margin-bottom: 2px;
|
|
3229
2990
|
}
|
|
3230
2991
|
.tlui-grid.tlui-main-toolbar__group {
|
|
3231
2992
|
grid-column: 1 / span 4;
|
|
3232
2993
|
}
|
|
3233
2994
|
.tlui-grid.tlui-main-toolbar__group:not(:nth-last-child(-n + 1 of [data-toolbar-visible='true'])) {
|
|
3234
|
-
border-bottom: 1px solid var(--color-divider);
|
|
2995
|
+
border-bottom: 1px solid var(--tl-color-divider);
|
|
3235
2996
|
margin-bottom: 2px;
|
|
3236
2997
|
}
|
|
3237
2998
|
|