@tldraw/tldraw 5.3.0-next.299378752aaf → 5.3.0-next.2fa9c61a8de6

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
- "5.3.0-next.299378752aaf",
22
+ "5.3.0-next.2fa9c61a8de6",
23
23
  "cjs"
24
24
  );
25
25
  //# sourceMappingURL=index.js.map
@@ -2,7 +2,7 @@ import { registerTldrawLibraryVersion } from "tldraw";
2
2
  export * from "tldraw";
3
3
  registerTldrawLibraryVersion(
4
4
  "@tldraw/tldraw",
5
- "5.3.0-next.299378752aaf",
5
+ "5.3.0-next.2fa9c61a8de6",
6
6
  "esm"
7
7
  );
8
8
  //# sourceMappingURL=index.mjs.map
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.299378752aaf",
4
+ "version": "5.3.0-next.2fa9c61a8de6",
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.299378752aaf"
50
+ "tldraw": "5.3.0-next.2fa9c61a8de6"
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 (outside it),
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-watermark: 200;
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,
@@ -376,6 +385,30 @@ input,
376
385
  contain: layout style size;
377
386
  }
378
387
 
388
+ /* The collaborator cursor layer: a sibling of .tl-canvas, above all canvas content, below the
389
+ in-front layer (250) and the UI panels (300). Display-only — pointer events pass through. */
390
+ .tl-collaborators {
391
+ position: absolute;
392
+ inset: 0px;
393
+ z-index: var(--tl-layer-collaborators);
394
+ pointer-events: none;
395
+ overflow: clip;
396
+ contain: layout style size;
397
+ }
398
+
399
+ .tl-collaborators__item {
400
+ position: absolute;
401
+ top: 0px;
402
+ left: 0px;
403
+ overflow: visible;
404
+ pointer-events: none;
405
+ transform-origin: top left;
406
+ }
407
+
408
+ .tl-cursor {
409
+ overflow: visible;
410
+ }
411
+
379
412
  /* --------------- Overlay Stack --------------- */
380
413
 
381
414
  /* -------------- Selection foreground -------------- */
@@ -789,6 +822,16 @@ input,
789
822
  .tl-rich-text h6 {
790
823
  margin-top: 5px;
791
824
  margin-bottom: 10px;
825
+ /**
826
+ * Headings render at a larger font-size than the body text (via the browser's
827
+ * default h1–h6 sizing), so they can't inherit the container's resolved
828
+ * whole-pixel line-height — that value is derived from the base font size and
829
+ * would cram the taller lines together. Instead, scale line-height with each
830
+ * heading's own font-size using tldraw's unitless line-height multiplier, which
831
+ * the rich-text render/measure paths expose here. The 1.35 fallback mirrors the
832
+ * default theme line-height (see defaultThemes.ts).
833
+ */
834
+ line-height: var(--tl-rich-text-heading-line-height, 1.35);
792
835
  }
793
836
 
794
837
  .tl-rich-text a {
@@ -2113,6 +2156,14 @@ it from receiving any pointer events or affecting the cursor. */
2113
2156
  flex-shrink: 0;
2114
2157
  }
2115
2158
 
2159
+ /* The label is a fixed bit of chrome next to the input; it should never be squeezed. Without this,
2160
+ an inherited `overflow-wrap: anywhere` (e.g. from .tlui-dialog__body) drops its min-content width
2161
+ to a single character and short labels wrap mid-word, e.g. "URL" breaking after "UR". */
2162
+ .tlui-input__wrapper > label {
2163
+ flex-shrink: 0;
2164
+ overflow-wrap: normal;
2165
+ }
2166
+
2116
2167
  /* If mobile use 16px as font size */
2117
2168
  /* On iOS, font size under 16px in an input will make the page zoom into the input 🤦‍♂️ */
2118
2169
  /* https://css-tricks.com/16px-or-larger-text-prevents-ios-form-zoom/ */
@@ -2334,6 +2385,16 @@ it from receiving any pointer events or affecting the cursor. */
2334
2385
  -ms-overflow-style: none;
2335
2386
  }
2336
2387
 
2388
+ .tlui-hover-card__content {
2389
+ position: relative;
2390
+ margin: 0px;
2391
+ border: none;
2392
+ border-radius: var(--tl-radius-3);
2393
+ background-color: var(--tl-color-panel);
2394
+ box-shadow: var(--tl-shadow-3);
2395
+ z-index: var(--tl-layer-menus);
2396
+ }
2397
+
2337
2398
  /* -------------------- Menu Zone ------------------- */
2338
2399
 
2339
2400
  .tlui-menu-zone {
@@ -2804,6 +2865,7 @@ tldraw? probably.
2804
2865
  .tlui-layout__bottom {
2805
2866
  grid-row: 2;
2806
2867
  width: 100%;
2868
+ min-width: 0px;
2807
2869
  }
2808
2870
 
2809
2871
  .tlui-layout__bottom__main {
@@ -3177,6 +3239,7 @@ tldraw? probably.
3177
3239
  .tlui-toast__main {
3178
3240
  flex-grow: 2;
3179
3241
  max-width: 280px;
3242
+ min-width: 0;
3180
3243
  }
3181
3244
 
3182
3245
  .tlui-toast__content {
@@ -3185,6 +3248,7 @@ tldraw? probably.
3185
3248
  line-height: 1.4;
3186
3249
  flex-direction: column;
3187
3250
  gap: var(--tl-space-3);
3251
+ min-width: 0;
3188
3252
  }
3189
3253
 
3190
3254
  .tlui-toast__main[data-actions='true'] .tlui-toast__content {
@@ -3196,6 +3260,7 @@ tldraw? probably.
3196
3260
  color: var(--tl-color-text-1);
3197
3261
  /* this makes the default toast look better */
3198
3262
  line-height: 16px;
3263
+ overflow-wrap: anywhere;
3199
3264
  }
3200
3265
 
3201
3266
  .tlui-toast__description {
@@ -3203,6 +3268,7 @@ tldraw? probably.
3203
3268
  padding: var(--tl-space-3);
3204
3269
  margin: 0px;
3205
3270
  padding: 0px;
3271
+ overflow-wrap: anywhere;
3206
3272
  }
3207
3273
 
3208
3274
  .tlui-toast__icon + .tlui-toast__main > .tlui-toast__actions {
@@ -3329,6 +3395,7 @@ tldraw? probably.
3329
3395
  color: var(--tl-color-text-1);
3330
3396
  user-select: all;
3331
3397
  -webkit-user-select: text;
3398
+ overflow-wrap: anywhere;
3332
3399
  }
3333
3400
  .tlui-dialog__body a {
3334
3401
  color: var(--tl-color-selected);