@tldraw/tldraw 4.6.0-next.5a871ec02ff3 → 4.6.0-next.6594d48ace27

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 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
- "4.6.0-next.5a871ec02ff3",
22
+ "4.6.0-next.6594d48ace27",
23
23
  "cjs"
24
24
  );
25
25
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/index.ts"],
4
- "sourcesContent": ["import { registerTldrawLibraryVersion } from 'tldraw'\n// eslint-disable-next-line local/no-export-star\nexport * from 'tldraw'\n\nregisterTldrawLibraryVersion(\n\t(globalThis as any).TLDRAW_LIBRARY_NAME,\n\t(globalThis as any).TLDRAW_LIBRARY_VERSION,\n\t(globalThis as any).TLDRAW_LIBRARY_MODULES\n)\n"],
4
+ "sourcesContent": ["import { registerTldrawLibraryVersion } from 'tldraw'\n// eslint-disable-next-line tldraw/no-export-star\nexport * from 'tldraw'\n\nregisterTldrawLibraryVersion(\n\t(globalThis as any).TLDRAW_LIBRARY_NAME,\n\t(globalThis as any).TLDRAW_LIBRARY_VERSION,\n\t(globalThis as any).TLDRAW_LIBRARY_MODULES\n)\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,oBAA6C;AAE7C,0BAAc,mBAFd;AAAA,IAIA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AACF;",
6
6
  "names": []
7
7
  }
@@ -2,7 +2,7 @@ import { registerTldrawLibraryVersion } from "tldraw";
2
2
  export * from "tldraw";
3
3
  registerTldrawLibraryVersion(
4
4
  "@tldraw/tldraw",
5
- "4.6.0-next.5a871ec02ff3",
5
+ "4.6.0-next.6594d48ace27",
6
6
  "esm"
7
7
  );
8
8
  //# sourceMappingURL=index.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/index.ts"],
4
- "sourcesContent": ["import { registerTldrawLibraryVersion } from 'tldraw'\n// eslint-disable-next-line local/no-export-star\nexport * from 'tldraw'\n\nregisterTldrawLibraryVersion(\n\t(globalThis as any).TLDRAW_LIBRARY_NAME,\n\t(globalThis as any).TLDRAW_LIBRARY_VERSION,\n\t(globalThis as any).TLDRAW_LIBRARY_MODULES\n)\n"],
4
+ "sourcesContent": ["import { registerTldrawLibraryVersion } from 'tldraw'\n// eslint-disable-next-line tldraw/no-export-star\nexport * from 'tldraw'\n\nregisterTldrawLibraryVersion(\n\t(globalThis as any).TLDRAW_LIBRARY_NAME,\n\t(globalThis as any).TLDRAW_LIBRARY_VERSION,\n\t(globalThis as any).TLDRAW_LIBRARY_MODULES\n)\n"],
5
5
  "mappings": "AAAA,SAAS,oCAAoC;AAE7C,cAAc;AAEd;AAAA,EACE;AAAA,EACA;AAAA,EACA;AACF;",
6
6
  "names": []
7
7
  }
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.6.0-next.5a871ec02ff3",
4
+ "version": "4.6.0-next.6594d48ace27",
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": "4.6.0-next.5a871ec02ff3"
50
+ "tldraw": "4.6.0-next.6594d48ace27"
51
51
  },
52
52
  "peerDependencies": {
53
53
  "react": "^18.2.0 || ^19.2.1",
package/src/index.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { registerTldrawLibraryVersion } from 'tldraw'
2
- // eslint-disable-next-line local/no-export-star
2
+ // eslint-disable-next-line tldraw/no-export-star
3
3
  export * from 'tldraw'
4
4
 
5
5
  registerTldrawLibraryVersion(
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,19 +157,15 @@
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%);
172
168
  --tl-color-low-border: hsl(204, 16%, 92%);
173
- --tl-color-culled: hsl(204, 14%, 93%);
174
169
  --tl-color-muted-none: hsl(0, 0%, 0%, 0%);
175
170
  --tl-color-muted-0: hsl(0, 0%, 0%, 2%);
176
171
  --tl-color-muted-1: hsl(0, 0%, 0%, 10%);
@@ -200,7 +195,7 @@
200
195
  --tl-color-info: hsl(201, 98%, 41%);
201
196
  --tl-color-warning: hsl(27, 98%, 47%);
202
197
  --tl-color-danger: hsl(0, 90%, 43%);
203
- --tl-color-laser: hsl(0, 100%, 50%);
198
+
204
199
  /* Shadows */
205
200
  --tl-shadow-1: 0px 1px 2px hsl(0, 0%, 0%, 25%), 0px 1px 3px hsl(0, 0%, 0%, 9%);
206
201
  --tl-shadow-2:
@@ -216,19 +211,15 @@
216
211
 
217
212
  .tl-theme__dark {
218
213
  /* Canvas */
219
- --tl-color-snap: hsl(0, 76%, 60%);
220
214
  --tl-color-selection-fill: hsl(209, 100%, 57%, 20%);
221
215
  --tl-color-selection-stroke: hsl(214, 84%, 56%);
222
216
  --tl-color-background: hsl(240, 5%, 6.5%);
223
217
  /* if you ever update --tl-color-background, update the hardcoded values in theme-init.js and globals.css
224
218
  they're there to make sure the background color matches the user's preference before the actual app loads*/
225
- --tl-color-brush-fill: hsl(0, 0%, 71%, 5.1%);
226
- --tl-color-brush-stroke: hsl(0, 0%, 71%, 25.1%);
227
219
  --tl-color-grid: hsl(0, 0%, 40%);
228
220
  /* UI */
229
221
  --tl-color-low: hsl(260, 4.5%, 10.5%);
230
222
  --tl-color-low-border: hsl(207, 10%, 10%);
231
- --tl-color-culled: hsl(210, 11%, 19%);
232
223
  --tl-color-muted-none: hsl(0, 0%, 100%, 0%);
233
224
  --tl-color-muted-0: hsl(0, 0%, 100%, 2%);
234
225
  --tl-color-muted-1: hsl(0, 0%, 100%, 10%);
@@ -258,7 +249,7 @@
258
249
  --tl-color-info: hsl(199, 92%, 56%);
259
250
  --tl-color-warning: hsl(36, 100%, 57%);
260
251
  --tl-color-danger: hsl(0, 82%, 66%);
261
- --tl-color-laser: hsl(0, 100%, 50%);
252
+
262
253
  /* Shadows */
263
254
  --tl-shadow-1:
264
255
  0px 1px 2px hsl(0, 0%, 0%, 16.1%), 0px 1px 3px hsl(0, 0%, 0%, 22%),
@@ -405,62 +396,6 @@ input,
405
396
 
406
397
  /* --------------- Overlay Stack --------------- */
407
398
 
408
- /* back of the stack, behind user's stuff */
409
- .tl-collaborator__scribble {
410
- z-index: var(--tl-layer-overlays-collaborator-scribble);
411
- }
412
-
413
- .tl-collaborator__brush {
414
- z-index: var(--tl-layer-overlays-collaborator-brush);
415
- }
416
-
417
- .tl-collaborator__shape-indicator {
418
- z-index: var(--tl-layer-overlays-collaborator-shape-indicator);
419
- }
420
-
421
- .tl-user-scribble {
422
- z-index: var(--tl-layer-overlays-user-scribble);
423
- }
424
-
425
- .tl-user-brush {
426
- z-index: var(--tl-layer-overlays-user-brush);
427
- }
428
-
429
- .tl-user-handles {
430
- z-index: var(--tl-layer-overlays-user-handles);
431
- }
432
-
433
- .tl-user-snapline {
434
- z-index: var(--tl-layer-overlays-user-snapline);
435
- }
436
-
437
- .tl-selection__fg {
438
- pointer-events: none;
439
- z-index: var(--tl-layer-overlays-selection-fg);
440
- }
441
-
442
- .tl-user-indicator__hint {
443
- z-index: var(--tl-layer-overlays-user-indicator-hint);
444
- stroke-width: calc(2.5px * var(--tl-scale));
445
- }
446
-
447
- .tl-custom-overlays {
448
- z-index: var(--tl-layer-overlays-custom);
449
- }
450
-
451
- /* behind collaborator cursor */
452
- .tl-collaborator__cursor-hint {
453
- z-index: var(--tl-layer-overlays-collaborator-cursor-hint);
454
- }
455
-
456
- .tl-collaborator__cursor {
457
- z-index: var(--tl-layer-overlays-collaborator-cursor);
458
- }
459
-
460
- .tl-cursor {
461
- overflow: visible;
462
- }
463
-
464
399
  /* -------------- Selection foreground -------------- */
465
400
 
466
401
  .tl-selection__bg {
@@ -472,49 +407,6 @@ input,
472
407
  pointer-events: all;
473
408
  }
474
409
 
475
- .tl-selection__fg__outline {
476
- fill: none;
477
- pointer-events: none;
478
- stroke: var(--tl-color-selection-stroke);
479
- stroke-width: calc(1.5px * var(--tl-scale));
480
- }
481
-
482
- .tl-corner-handle {
483
- pointer-events: none;
484
- stroke: var(--tl-color-selection-stroke);
485
- fill: var(--tl-color-background);
486
- stroke-width: calc(1.5px * var(--tl-scale));
487
- }
488
-
489
- .tl-text-handle {
490
- pointer-events: none;
491
- fill: var(--tl-color-selection-stroke);
492
- }
493
-
494
- .tl-corner-crop-handle {
495
- pointer-events: none;
496
- fill: none;
497
- stroke: var(--tl-color-selection-stroke);
498
- }
499
-
500
- .tl-corner-crop-edge-handle {
501
- pointer-events: none;
502
- fill: none;
503
- stroke: var(--tl-color-selection-stroke);
504
- }
505
-
506
- .tl-mobile-rotate__bg {
507
- pointer-events: all;
508
- cursor: var(--tl-cursor-grab);
509
- }
510
-
511
- .tl-mobile-rotate__fg {
512
- pointer-events: none;
513
- stroke: var(--tl-color-selection-stroke);
514
- fill: var(--tl-color-background);
515
- stroke-width: calc(1.5px * var(--tl-scale));
516
- }
517
-
518
410
  .tl-transparent {
519
411
  fill: transparent;
520
412
  stroke: transparent;
@@ -540,7 +432,6 @@ input,
540
432
  overflow: hidden;
541
433
  text-overflow: ellipsis;
542
434
  font-size: 12px;
543
- font-family: var(--font-body);
544
435
  border-radius: var(--tl-radius-2);
545
436
  color: var(--tl-color-selected-contrast);
546
437
  }
@@ -558,7 +449,6 @@ input,
558
449
  overflow: hidden;
559
450
  text-overflow: ellipsis;
560
451
  font-size: 12px;
561
- font-family: var(--font-body);
562
452
  text-shadow: var(--tl-text-outline);
563
453
  color: var(--tl-color-selected-contrast);
564
454
  }
@@ -574,7 +464,6 @@ input,
574
464
  position: absolute;
575
465
  padding: 3px 6px;
576
466
  font-size: 12px;
577
- font-family: var(--font-body);
578
467
  opacity: 1;
579
468
  border-radius: var(--tl-radius-2);
580
469
  }
@@ -585,7 +474,6 @@ input,
585
474
  white-space: nowrap;
586
475
  padding: 3px 6px;
587
476
  font-size: 12px;
588
- font-family: var(--font-body);
589
477
  pointer-events: none;
590
478
  z-index: var(--tl-layer-cursor);
591
479
  margin-top: 16px;
@@ -629,37 +517,6 @@ input,
629
517
  overflow-wrap: break-word;
630
518
  }
631
519
 
632
- .tl-text-wrapper[data-font='draw'] {
633
- font-family: var(--tl-font-draw);
634
- }
635
-
636
- .tl-text-wrapper[data-font='sans'] {
637
- font-family: var(--tl-font-sans);
638
- }
639
-
640
- .tl-text-wrapper[data-font='serif'] {
641
- font-family: var(--tl-font-serif);
642
- }
643
-
644
- .tl-text-wrapper[data-font='mono'] {
645
- font-family: var(--tl-font-mono);
646
- }
647
-
648
- .tl-text-wrapper[data-align='start'],
649
- .tl-text-wrapper[data-align='start-legacy'] {
650
- text-align: left;
651
- }
652
-
653
- .tl-text-wrapper[data-align='middle'],
654
- .tl-text-wrapper[data-align='middle-legacy'] {
655
- text-align: center;
656
- }
657
-
658
- .tl-text-wrapper[data-align='end'],
659
- .tl-text-wrapper[data-align='end-legacy'] {
660
- text-align: right;
661
- }
662
-
663
520
  .tl-plain-text-wrapper[data-isediting='true'] .tl-text-content {
664
521
  opacity: 0;
665
522
  }
@@ -1044,41 +901,6 @@ input,
1044
901
  }
1045
902
  }
1046
903
 
1047
- /* ---------------------- Brush --------------------- */
1048
-
1049
- .tl-brush {
1050
- stroke-width: calc(var(--tl-scale) * 1px);
1051
- contain: size layout;
1052
- }
1053
-
1054
- .tl-brush__default {
1055
- stroke: var(--tl-color-brush-stroke);
1056
- fill: var(--tl-color-brush-fill);
1057
- }
1058
-
1059
- /* -------------------- Scribble -------------------- */
1060
-
1061
- .tl-scribble {
1062
- stroke-linejoin: round;
1063
- stroke-linecap: round;
1064
- pointer-events: none;
1065
- contain: size layout;
1066
- }
1067
-
1068
- /* ---------------------- Snaps --------------------- */
1069
-
1070
- .tl-snap-indicator {
1071
- stroke: var(--tl-color-snap);
1072
- stroke-width: calc(1px * var(--tl-scale));
1073
- fill: none;
1074
- }
1075
-
1076
- .tl-snap-point {
1077
- stroke: var(--tl-color-snap);
1078
- stroke-width: calc(1px * var(--tl-scale));
1079
- fill: none;
1080
- }
1081
-
1082
904
  /* ---------------- Hyperlink Button ---------------- */
1083
905
 
1084
906
  .tl-hyperlink-button {
@@ -1132,51 +954,6 @@ input,
1132
954
  display: none;
1133
955
  }
1134
956
 
1135
- /* --------------------- Handles -------------------- */
1136
-
1137
- .tl-handle {
1138
- pointer-events: all;
1139
- }
1140
-
1141
- .tl-handle__bg {
1142
- fill: transparent;
1143
- stroke: transparent;
1144
- pointer-events: all;
1145
- }
1146
-
1147
- .tl-handle__fg {
1148
- fill: var(--tl-color-selected-contrast);
1149
- stroke: var(--tl-color-selection-stroke);
1150
- stroke-width: calc(1.5px * var(--tl-scale));
1151
- pointer-events: none;
1152
- }
1153
-
1154
- .tl-handle__create {
1155
- opacity: 0;
1156
- }
1157
-
1158
- .tl-handle__clone > .tl-handle__fg {
1159
- fill: var(--tl-color-selection-stroke);
1160
- stroke: none;
1161
- }
1162
-
1163
- .tl-handle__bg:active {
1164
- fill: none;
1165
- }
1166
-
1167
- .tl-container[data-coarse='true'] .tl-handle__bg:active {
1168
- fill: var(--tl-color-selection-fill);
1169
- }
1170
-
1171
- .tl-container[data-coarse='true'] .tl-handle__create {
1172
- opacity: 1;
1173
- }
1174
-
1175
- .tl-rotate-corner:not(:hover),
1176
- .tl-resize-handle:not(:hover) {
1177
- cursor: none;
1178
- }
1179
-
1180
957
  /* ----------------- Shape indicator ---------------- */
1181
958
 
1182
959
  .tl-shape-indicator {
@@ -1186,7 +963,7 @@ input,
1186
963
  contain: size layout;
1187
964
  }
1188
965
 
1189
- .tl-canvas-indicators {
966
+ .tl-canvas-overlays {
1190
967
  position: absolute;
1191
968
  inset: 0;
1192
969
  pointer-events: none;
@@ -1264,36 +1041,6 @@ input,
1264
1041
  height: max-content;
1265
1042
  }
1266
1043
 
1267
- .tl-arrow-hint {
1268
- stroke: var(--tl-color-text-1);
1269
- fill: none;
1270
- stroke-linecap: round;
1271
- overflow: visible;
1272
- }
1273
-
1274
- .tl-arrow-hint-handle {
1275
- fill: var(--tl-color-selected-contrast);
1276
- stroke: var(--tl-color-selection-stroke);
1277
- stroke-width: calc(1.5px * var(--tl-scale));
1278
- r: calc(4px * var(--tl-scale));
1279
- }
1280
-
1281
- .tl-arrow-hint-snap {
1282
- stroke: transparent;
1283
- fill: var(--tl-color-selection-fill);
1284
- r: calc(12px * var(--tl-scale));
1285
- }
1286
-
1287
- .tl-arrow-hint-snap__none,
1288
- .tl-arrow-hint-snap__center,
1289
- .tl-arrow-hint-snap__axis {
1290
- display: none;
1291
- }
1292
-
1293
- .tl-arrow-hint-snap__edge {
1294
- r: calc(8px * var(--tl-scale));
1295
- }
1296
-
1297
1044
  /* ------------------- Bookmark shape ------------------- */
1298
1045
 
1299
1046
  .tl-bookmark__container {
@@ -1482,6 +1229,19 @@ input,
1482
1229
  color: currentColor;
1483
1230
  }
1484
1231
 
1232
+ .tl-note__attribution {
1233
+ position: absolute;
1234
+ bottom: calc(4px * var(--note-attribution-scale, 1));
1235
+ right: calc(8px * var(--note-attribution-scale, 1));
1236
+ font-family: var(--tl-font-sans);
1237
+ pointer-events: auto;
1238
+ white-space: nowrap;
1239
+ overflow: hidden;
1240
+ text-overflow: ellipsis;
1241
+ max-width: 60%;
1242
+ z-index: 1;
1243
+ }
1244
+
1485
1245
  /* ------------------- Frame shape ------------------- */
1486
1246
 
1487
1247
  .tl-frame__body {
@@ -2841,6 +2601,14 @@ it from receiving any pointer events or affecting the cursor. */
2841
2601
  left: 8px;
2842
2602
  }
2843
2603
 
2604
+ /*
2605
+ * focusing skip-to-main-content hide top ui buttons to make sure we avoid
2606
+ * z-index clashes on hover (see issue #8328)
2607
+ */
2608
+ .tl-skip-to-main-content:focus + .tlui-layout__top .tlui-helper-buttons {
2609
+ display: none;
2610
+ }
2611
+
2844
2612
  /* ---------------- Offline indicator --------------- */
2845
2613
 
2846
2614
  .tlui-offline-indicator {