@tldraw/tldraw 4.6.0-next.fe1474dc57d8 → 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 -242
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;
|
|
@@ -1007,41 +881,6 @@ input,
|
|
|
1007
881
|
}
|
|
1008
882
|
}
|
|
1009
883
|
|
|
1010
|
-
/* ---------------------- Brush --------------------- */
|
|
1011
|
-
|
|
1012
|
-
.tl-brush {
|
|
1013
|
-
stroke-width: calc(var(--tl-scale) * 1px);
|
|
1014
|
-
contain: size layout;
|
|
1015
|
-
}
|
|
1016
|
-
|
|
1017
|
-
.tl-brush__default {
|
|
1018
|
-
stroke: var(--tl-color-brush-stroke);
|
|
1019
|
-
fill: var(--tl-color-brush-fill);
|
|
1020
|
-
}
|
|
1021
|
-
|
|
1022
|
-
/* -------------------- Scribble -------------------- */
|
|
1023
|
-
|
|
1024
|
-
.tl-scribble {
|
|
1025
|
-
stroke-linejoin: round;
|
|
1026
|
-
stroke-linecap: round;
|
|
1027
|
-
pointer-events: none;
|
|
1028
|
-
contain: size layout;
|
|
1029
|
-
}
|
|
1030
|
-
|
|
1031
|
-
/* ---------------------- Snaps --------------------- */
|
|
1032
|
-
|
|
1033
|
-
.tl-snap-indicator {
|
|
1034
|
-
stroke: var(--tl-color-snap);
|
|
1035
|
-
stroke-width: calc(1px * var(--tl-scale));
|
|
1036
|
-
fill: none;
|
|
1037
|
-
}
|
|
1038
|
-
|
|
1039
|
-
.tl-snap-point {
|
|
1040
|
-
stroke: var(--tl-color-snap);
|
|
1041
|
-
stroke-width: calc(1px * var(--tl-scale));
|
|
1042
|
-
fill: none;
|
|
1043
|
-
}
|
|
1044
|
-
|
|
1045
884
|
/* ---------------- Hyperlink Button ---------------- */
|
|
1046
885
|
|
|
1047
886
|
.tl-hyperlink-button {
|
|
@@ -1095,51 +934,6 @@ input,
|
|
|
1095
934
|
display: none;
|
|
1096
935
|
}
|
|
1097
936
|
|
|
1098
|
-
/* --------------------- Handles -------------------- */
|
|
1099
|
-
|
|
1100
|
-
.tl-handle {
|
|
1101
|
-
pointer-events: all;
|
|
1102
|
-
}
|
|
1103
|
-
|
|
1104
|
-
.tl-handle__bg {
|
|
1105
|
-
fill: transparent;
|
|
1106
|
-
stroke: transparent;
|
|
1107
|
-
pointer-events: all;
|
|
1108
|
-
}
|
|
1109
|
-
|
|
1110
|
-
.tl-handle__fg {
|
|
1111
|
-
fill: var(--tl-color-selected-contrast);
|
|
1112
|
-
stroke: var(--tl-color-selection-stroke);
|
|
1113
|
-
stroke-width: calc(1.5px * var(--tl-scale));
|
|
1114
|
-
pointer-events: none;
|
|
1115
|
-
}
|
|
1116
|
-
|
|
1117
|
-
.tl-handle__create {
|
|
1118
|
-
opacity: 0;
|
|
1119
|
-
}
|
|
1120
|
-
|
|
1121
|
-
.tl-handle__clone > .tl-handle__fg {
|
|
1122
|
-
fill: var(--tl-color-selection-stroke);
|
|
1123
|
-
stroke: none;
|
|
1124
|
-
}
|
|
1125
|
-
|
|
1126
|
-
.tl-handle__bg:active {
|
|
1127
|
-
fill: none;
|
|
1128
|
-
}
|
|
1129
|
-
|
|
1130
|
-
.tl-container[data-coarse='true'] .tl-handle__bg:active {
|
|
1131
|
-
fill: var(--tl-color-selection-fill);
|
|
1132
|
-
}
|
|
1133
|
-
|
|
1134
|
-
.tl-container[data-coarse='true'] .tl-handle__create {
|
|
1135
|
-
opacity: 1;
|
|
1136
|
-
}
|
|
1137
|
-
|
|
1138
|
-
.tl-rotate-corner:not(:hover),
|
|
1139
|
-
.tl-resize-handle:not(:hover) {
|
|
1140
|
-
cursor: none;
|
|
1141
|
-
}
|
|
1142
|
-
|
|
1143
937
|
/* ----------------- Shape indicator ---------------- */
|
|
1144
938
|
|
|
1145
939
|
.tl-shape-indicator {
|
|
@@ -1149,10 +943,11 @@ input,
|
|
|
1149
943
|
contain: size layout;
|
|
1150
944
|
}
|
|
1151
945
|
|
|
1152
|
-
.tl-canvas-
|
|
946
|
+
.tl-canvas-overlays {
|
|
1153
947
|
position: absolute;
|
|
1154
948
|
inset: 0;
|
|
1155
949
|
pointer-events: none;
|
|
950
|
+
z-index: var(--tl-layer-canvas-overlays);
|
|
1156
951
|
}
|
|
1157
952
|
|
|
1158
953
|
/* ---------------------- Shape --------------------- */
|
|
@@ -1227,36 +1022,6 @@ input,
|
|
|
1227
1022
|
height: max-content;
|
|
1228
1023
|
}
|
|
1229
1024
|
|
|
1230
|
-
.tl-arrow-hint {
|
|
1231
|
-
stroke: var(--tl-color-text-1);
|
|
1232
|
-
fill: none;
|
|
1233
|
-
stroke-linecap: round;
|
|
1234
|
-
overflow: visible;
|
|
1235
|
-
}
|
|
1236
|
-
|
|
1237
|
-
.tl-arrow-hint-handle {
|
|
1238
|
-
fill: var(--tl-color-selected-contrast);
|
|
1239
|
-
stroke: var(--tl-color-selection-stroke);
|
|
1240
|
-
stroke-width: calc(1.5px * var(--tl-scale));
|
|
1241
|
-
r: calc(4px * var(--tl-scale));
|
|
1242
|
-
}
|
|
1243
|
-
|
|
1244
|
-
.tl-arrow-hint-snap {
|
|
1245
|
-
stroke: transparent;
|
|
1246
|
-
fill: var(--tl-color-selection-fill);
|
|
1247
|
-
r: calc(12px * var(--tl-scale));
|
|
1248
|
-
}
|
|
1249
|
-
|
|
1250
|
-
.tl-arrow-hint-snap__none,
|
|
1251
|
-
.tl-arrow-hint-snap__center,
|
|
1252
|
-
.tl-arrow-hint-snap__axis {
|
|
1253
|
-
display: none;
|
|
1254
|
-
}
|
|
1255
|
-
|
|
1256
|
-
.tl-arrow-hint-snap__edge {
|
|
1257
|
-
r: calc(8px * var(--tl-scale));
|
|
1258
|
-
}
|
|
1259
|
-
|
|
1260
1025
|
/* ------------------- Bookmark shape ------------------- */
|
|
1261
1026
|
|
|
1262
1027
|
.tl-bookmark__container {
|
|
@@ -3214,20 +2979,20 @@ tldraw? probably.
|
|
|
3214
2979
|
display: none;
|
|
3215
2980
|
}
|
|
3216
2981
|
.tlui-row.tlui-main-toolbar__group:not(:nth-last-child(-n + 1 of [data-toolbar-visible='true'])) {
|
|
3217
|
-
border-right: 1px solid var(--color-divider);
|
|
2982
|
+
border-right: 1px solid var(--tl-color-divider);
|
|
3218
2983
|
margin-right: 2px;
|
|
3219
2984
|
}
|
|
3220
2985
|
.tlui-column.tlui-main-toolbar__group:not(
|
|
3221
2986
|
:nth-last-child(-n + 1 of [data-toolbar-visible='true'])
|
|
3222
2987
|
) {
|
|
3223
|
-
border-bottom: 1px solid var(--color-divider);
|
|
2988
|
+
border-bottom: 1px solid var(--tl-color-divider);
|
|
3224
2989
|
margin-bottom: 2px;
|
|
3225
2990
|
}
|
|
3226
2991
|
.tlui-grid.tlui-main-toolbar__group {
|
|
3227
2992
|
grid-column: 1 / span 4;
|
|
3228
2993
|
}
|
|
3229
2994
|
.tlui-grid.tlui-main-toolbar__group:not(:nth-last-child(-n + 1 of [data-toolbar-visible='true'])) {
|
|
3230
|
-
border-bottom: 1px solid var(--color-divider);
|
|
2995
|
+
border-bottom: 1px solid var(--tl-color-divider);
|
|
3231
2996
|
margin-bottom: 2px;
|
|
3232
2997
|
}
|
|
3233
2998
|
|