@tldraw/editor 3.8.0-canary.9d961047c9d7 → 3.8.0-canary.a5d08406113a

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.8.0-canary.9d961047c9d7";
1
+ const version = "3.8.0-canary.a5d08406113a";
2
2
  const publishDates = {
3
3
  major: "2024-09-13T14:36:29.063Z",
4
- minor: "2025-01-20T09:23:49.775Z",
5
- patch: "2025-01-20T09:23:49.775Z"
4
+ minor: "2025-01-20T11:49:42.423Z",
5
+ patch: "2025-01-20T11:49:42.423Z"
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.8.0-canary.9d961047c9d7'\nexport const publishDates = {\n\tmajor: '2024-09-13T14:36:29.063Z',\n\tminor: '2025-01-20T09:23:49.775Z',\n\tpatch: '2025-01-20T09:23:49.775Z',\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.8.0-canary.a5d08406113a'\nexport const publishDates = {\n\tmajor: '2024-09-13T14:36:29.063Z',\n\tminor: '2025-01-20T11:49:42.423Z',\n\tpatch: '2025-01-20T11:49:42.423Z',\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/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.8.0-canary.9d961047c9d7",
4
+ "version": "3.8.0-canary.a5d08406113a",
5
5
  "author": {
6
6
  "name": "tldraw Inc.",
7
7
  "email": "hello@tldraw.com"
@@ -45,12 +45,12 @@
45
45
  "lint": "yarn run -T tsx ../../internal/scripts/lint.ts"
46
46
  },
47
47
  "dependencies": {
48
- "@tldraw/state": "3.8.0-canary.9d961047c9d7",
49
- "@tldraw/state-react": "3.8.0-canary.9d961047c9d7",
50
- "@tldraw/store": "3.8.0-canary.9d961047c9d7",
51
- "@tldraw/tlschema": "3.8.0-canary.9d961047c9d7",
52
- "@tldraw/utils": "3.8.0-canary.9d961047c9d7",
53
- "@tldraw/validate": "3.8.0-canary.9d961047c9d7",
48
+ "@tldraw/state": "3.8.0-canary.a5d08406113a",
49
+ "@tldraw/state-react": "3.8.0-canary.a5d08406113a",
50
+ "@tldraw/store": "3.8.0-canary.a5d08406113a",
51
+ "@tldraw/tlschema": "3.8.0-canary.a5d08406113a",
52
+ "@tldraw/utils": "3.8.0-canary.a5d08406113a",
53
+ "@tldraw/validate": "3.8.0-canary.a5d08406113a",
54
54
  "@types/core-js": "^2.5.5",
55
55
  "@use-gesture/react": "^10.2.27",
56
56
  "classnames": "^2.3.2",
@@ -1218,18 +1218,7 @@ export class Editor extends EventEmitter<TLEventMap> {
1218
1218
  }
1219
1219
 
1220
1220
  /** @internal */
1221
- createErrorAnnotations(
1222
- origin: string,
1223
- willCrashApp: boolean | 'unknown'
1224
- ): {
1225
- tags: { origin: string; willCrashApp: boolean | 'unknown' }
1226
- extras: {
1227
- activeStateNode?: string
1228
- selectedShapes?: TLUnknownShape[]
1229
- editingShape?: TLUnknownShape
1230
- inputs?: Record<string, unknown>
1231
- }
1232
- } {
1221
+ createErrorAnnotations(origin: string, willCrashApp: boolean | 'unknown') {
1233
1222
  try {
1234
1223
  const editingShapeId = this.getEditingShapeId()
1235
1224
  return {
@@ -1239,9 +1228,20 @@ export class Editor extends EventEmitter<TLEventMap> {
1239
1228
  },
1240
1229
  extras: {
1241
1230
  activeStateNode: this.root.getPath(),
1242
- selectedShapes: this.getSelectedShapes(),
1231
+ selectedShapes: this.getSelectedShapes().map((s) => {
1232
+ const { props, ...rest } = s
1233
+ const { text: _text, richText: _richText, ...restProps } = props as any
1234
+ return {
1235
+ ...rest,
1236
+ props: restProps,
1237
+ }
1238
+ }),
1239
+ selectionCount: this.getSelectedShapes().length,
1243
1240
  editingShape: editingShapeId ? this.getShape(editingShapeId) : undefined,
1244
1241
  inputs: this.inputs,
1242
+ pageState: this.getCurrentPageState(),
1243
+ instanceState: this.getInstanceState(),
1244
+ collaboratorCount: this.getCollaboratorsOnCurrentPage().length,
1245
1245
  },
1246
1246
  }
1247
1247
  } catch {
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.8.0-canary.9d961047c9d7'
4
+ export const version = '3.8.0-canary.a5d08406113a'
5
5
  export const publishDates = {
6
6
  major: '2024-09-13T14:36:29.063Z',
7
- minor: '2025-01-20T09:23:49.775Z',
8
- patch: '2025-01-20T09:23:49.775Z',
7
+ minor: '2025-01-20T11:49:42.423Z',
8
+ patch: '2025-01-20T11:49:42.423Z',
9
9
  }