@tldraw/editor 3.11.0-canary.60a92b7ae377 → 3.11.0-canary.66b785c62816

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.
@@ -1,8 +1,8 @@
1
- const version = "3.11.0-canary.60a92b7ae377";
1
+ const version = "3.11.0-canary.66b785c62816";
2
2
  const publishDates = {
3
3
  major: "2024-09-13T14:36:29.063Z",
4
- minor: "2025-03-18T17:03:02.056Z",
5
- patch: "2025-03-18T17:03:02.056Z"
4
+ minor: "2025-03-20T14:44:09.695Z",
5
+ patch: "2025-03-20T14:44:09.695Z"
6
6
  };
7
7
  export {
8
8
  publishDates,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/version.ts"],
4
- "sourcesContent": ["// This file is automatically generated by internal/scripts/refresh-assets.ts.\n// Do not edit manually. Or do, I'm a comment, not a cop.\n\nexport const version = '3.11.0-canary.60a92b7ae377'\nexport const publishDates = {\n\tmajor: '2024-09-13T14:36:29.063Z',\n\tminor: '2025-03-18T17:03:02.056Z',\n\tpatch: '2025-03-18T17:03:02.056Z',\n}\n"],
4
+ "sourcesContent": ["// This file is automatically generated by internal/scripts/refresh-assets.ts.\n// Do not edit manually. Or do, I'm a comment, not a cop.\n\nexport const version = '3.11.0-canary.66b785c62816'\nexport const publishDates = {\n\tmajor: '2024-09-13T14:36:29.063Z',\n\tminor: '2025-03-20T14:44:09.695Z',\n\tpatch: '2025-03-20T14:44:09.695Z',\n}\n"],
5
5
  "mappings": "AAGO,MAAM,UAAU;AAChB,MAAM,eAAe;AAAA,EAC3B,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AACR;",
6
6
  "names": []
7
7
  }
package/editor.css CHANGED
@@ -917,6 +917,7 @@ input,
917
917
  * However, that was from 8 years ago and the browser caret issue
918
918
  * it mentions seems to be fixed. So, we're re-enabling it.
919
919
  * We'll tell ProseMirror maybe to get rid of this on their end.
920
+ *
920
921
  */
921
922
  -webkit-font-variant-ligatures: inherit;
922
923
  font-variant-ligatures: inherit;
@@ -953,6 +954,15 @@ input,
953
954
  .tl-rich-text ol {
954
955
  text-align: left;
955
956
  margin: 0;
957
+ padding-left: 3.25ch;
958
+ }
959
+
960
+ .tl-rich-text ol:has(> li:nth-child(10)) {
961
+ padding-left: 4.25ch;
962
+ }
963
+
964
+ .tl-rich-text ol:has(> li:nth-child(100)) {
965
+ padding-left: 5.25ch;
956
966
  }
957
967
 
958
968
  .tl-rich-text h1,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tldraw/editor",
3
3
  "description": "A tiny little drawing app (editor).",
4
- "version": "3.11.0-canary.60a92b7ae377",
4
+ "version": "3.11.0-canary.66b785c62816",
5
5
  "author": {
6
6
  "name": "tldraw Inc.",
7
7
  "email": "hello@tldraw.com"
@@ -48,12 +48,12 @@
48
48
  "@tiptap/core": "^2.9.1",
49
49
  "@tiptap/pm": "^2.9.1",
50
50
  "@tiptap/react": "^2.9.1",
51
- "@tldraw/state": "3.11.0-canary.60a92b7ae377",
52
- "@tldraw/state-react": "3.11.0-canary.60a92b7ae377",
53
- "@tldraw/store": "3.11.0-canary.60a92b7ae377",
54
- "@tldraw/tlschema": "3.11.0-canary.60a92b7ae377",
55
- "@tldraw/utils": "3.11.0-canary.60a92b7ae377",
56
- "@tldraw/validate": "3.11.0-canary.60a92b7ae377",
51
+ "@tldraw/state": "3.11.0-canary.66b785c62816",
52
+ "@tldraw/state-react": "3.11.0-canary.66b785c62816",
53
+ "@tldraw/store": "3.11.0-canary.66b785c62816",
54
+ "@tldraw/tlschema": "3.11.0-canary.66b785c62816",
55
+ "@tldraw/utils": "3.11.0-canary.66b785c62816",
56
+ "@tldraw/validate": "3.11.0-canary.66b785c62816",
57
57
  "@types/core-js": "^2.5.8",
58
58
  "@use-gesture/react": "^10.3.1",
59
59
  "classnames": "^2.5.1",
@@ -30,14 +30,17 @@ export const DefaultShapeIndicators = memo(function DefaultShapeIndicators({
30
30
  const prev = rPreviousSelectedShapeIds.current
31
31
  const next = new Set<TLShapeId>()
32
32
 
33
- const isChangingStyle = editor.getInstanceState().isChangingStyle
33
+ const instanceState = editor.getInstanceState()
34
+
35
+ const isChangingStyle = instanceState.isChangingStyle
34
36
 
35
37
  // todo: this is tldraw specific and is duplicated at the tldraw layer. What should we do here instead?
38
+
39
+ const isIdleOrEditing = editor.isInAny('select.idle', 'select.editing_shape')
40
+
36
41
  const isInSelectState = editor.isInAny(
37
- 'select.idle',
38
42
  'select.brushing',
39
43
  'select.scribble_brushing',
40
- 'select.editing_shape',
41
44
  'select.pointing_shape',
42
45
  'select.pointing_selection',
43
46
  'select.pointing_handle'
@@ -45,24 +48,20 @@ export const DefaultShapeIndicators = memo(function DefaultShapeIndicators({
45
48
 
46
49
  // We hide all indicators if we're changing style or in certain interactions
47
50
  // todo: move this to some kind of Tool.hideIndicators property
48
- if (isChangingStyle || !isInSelectState) {
51
+ if (isChangingStyle || !(isIdleOrEditing || isInSelectState)) {
49
52
  rPreviousSelectedShapeIds.current = next
50
53
  return next
51
54
  }
52
55
 
53
56
  // We always want to show indicators for the selected shapes, if any
54
- const selected = editor.getSelectedShapeIds()
55
- for (const id of selected) {
57
+ for (const id of editor.getSelectedShapeIds()) {
56
58
  next.add(id)
57
59
  }
58
60
 
59
61
  // If we're idle or editing a shape, we want to also show an indicator for the hovered shape, if any
60
- if (editor.isInAny('select.idle', 'select.editing_shape')) {
61
- const instanceState = editor.getInstanceState()
62
- if (instanceState.isHoveringCanvas && !instanceState.isCoarsePointer) {
63
- const hovered = editor.getHoveredShapeId()
64
- if (hovered) next.add(hovered)
65
- }
62
+ if (isIdleOrEditing && instanceState.isHoveringCanvas && !instanceState.isCoarsePointer) {
63
+ const hovered = editor.getHoveredShapeId()
64
+ if (hovered) next.add(hovered)
66
65
  }
67
66
 
68
67
  // Ok, has anything changed?
@@ -73,7 +72,7 @@ export const DefaultShapeIndicators = memo(function DefaultShapeIndicators({
73
72
  return next
74
73
  }
75
74
 
76
- // If any of the new ids are not in the previous set, then the selection has changed
75
+ // Set difference check
77
76
  for (const id of next) {
78
77
  if (!prev.has(id)) {
79
78
  rPreviousSelectedShapeIds.current = next
@@ -81,7 +80,6 @@ export const DefaultShapeIndicators = memo(function DefaultShapeIndicators({
81
80
  }
82
81
  }
83
82
 
84
- // If nothing has changed, then return the previous value
85
83
  return prev
86
84
  },
87
85
  [editor]
@@ -2102,12 +2102,6 @@ export class Editor extends EventEmitter<TLEventMap> {
2102
2102
  * @public
2103
2103
  */
2104
2104
  setRichTextEditor(textEditor: TiptapEditor | null) {
2105
- // If the new editor is different from the current one, destroy the current one
2106
- const current = this._currentRichTextEditor.__unsafe__getWithoutCapture()
2107
- if (current !== textEditor) {
2108
- current?.destroy()
2109
- }
2110
-
2111
2105
  this._currentRichTextEditor.set(textEditor)
2112
2106
  return this
2113
2107
  }
package/src/version.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  // This file is automatically generated by internal/scripts/refresh-assets.ts.
2
2
  // Do not edit manually. Or do, I'm a comment, not a cop.
3
3
 
4
- export const version = '3.11.0-canary.60a92b7ae377'
4
+ export const version = '3.11.0-canary.66b785c62816'
5
5
  export const publishDates = {
6
6
  major: '2024-09-13T14:36:29.063Z',
7
- minor: '2025-03-18T17:03:02.056Z',
8
- patch: '2025-03-18T17:03:02.056Z',
7
+ minor: '2025-03-20T14:44:09.695Z',
8
+ patch: '2025-03-20T14:44:09.695Z',
9
9
  }