@tldraw/editor 3.13.0-canary.b49b003c609e → 3.13.0-canary.bbc6785692f2
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.d.ts +1 -14
- package/dist-cjs/index.js +1 -1
- package/dist-cjs/lib/components/default-components/DefaultCanvas.js +1 -1
- package/dist-cjs/lib/components/default-components/DefaultCanvas.js.map +2 -2
- package/dist-cjs/lib/editor/Editor.js +9 -45
- package/dist-cjs/lib/editor/Editor.js.map +2 -2
- package/dist-cjs/lib/editor/shapes/group/GroupShapeUtil.js +3 -0
- package/dist-cjs/lib/editor/shapes/group/GroupShapeUtil.js.map +2 -2
- package/dist-cjs/version.js +3 -3
- package/dist-cjs/version.js.map +1 -1
- package/dist-esm/index.d.mts +1 -14
- package/dist-esm/index.mjs +1 -1
- package/dist-esm/lib/components/default-components/DefaultCanvas.mjs +1 -1
- package/dist-esm/lib/components/default-components/DefaultCanvas.mjs.map +2 -2
- package/dist-esm/lib/editor/Editor.mjs +9 -45
- package/dist-esm/lib/editor/Editor.mjs.map +2 -2
- package/dist-esm/lib/editor/shapes/group/GroupShapeUtil.mjs +3 -0
- package/dist-esm/lib/editor/shapes/group/GroupShapeUtil.mjs.map +2 -2
- package/dist-esm/version.mjs +3 -3
- package/dist-esm/version.mjs.map +1 -1
- package/editor.css +0 -5
- package/package.json +7 -7
- package/src/lib/components/default-components/DefaultCanvas.tsx +1 -2
- package/src/lib/editor/Editor.ts +9 -56
- package/src/lib/editor/shapes/group/GroupShapeUtil.tsx +4 -0
- package/src/version.ts +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/lib/editor/shapes/group/GroupShapeUtil.tsx"],
|
|
4
|
-
"sourcesContent": ["import { TLGroupShape, groupShapeMigrations, groupShapeProps } from '@tldraw/tlschema'\nimport { SVGContainer } from '../../../components/SVGContainer'\nimport { Geometry2d } from '../../../primitives/geometry/Geometry2d'\nimport { Group2d } from '../../../primitives/geometry/Group2d'\nimport { Rectangle2d } from '../../../primitives/geometry/Rectangle2d'\nimport { ShapeUtil } from '../ShapeUtil'\nimport { DashedOutlineBox } from './DashedOutlineBox'\n\n/** @public */\nexport class GroupShapeUtil extends ShapeUtil<TLGroupShape> {\n\tstatic override type = 'group' as const\n\tstatic override props = groupShapeProps\n\tstatic override migrations = groupShapeMigrations\n\n\toverride hideSelectionBoundsFg() {\n\t\treturn true\n\t}\n\n\toverride canBind() {\n\t\treturn false\n\t}\n\n\tgetDefaultProps(): TLGroupShape['props'] {\n\t\treturn {}\n\t}\n\n\tgetGeometry(shape: TLGroupShape): Geometry2d {\n\t\tconst children = this.editor.getSortedChildIdsForParent(shape.id)\n\t\tif (children.length === 0) {\n\t\t\treturn new Rectangle2d({ width: 1, height: 1, isFilled: false })\n\t\t}\n\n\t\treturn new Group2d({\n\t\t\tchildren: children.map((childId) => {\n\t\t\t\tconst shape = this.editor.getShape(childId)!\n\t\t\t\treturn this.editor\n\t\t\t\t\t.getShapeGeometry(childId)\n\t\t\t\t\t.transform(this.editor.getShapeLocalTransform(shape)!, { isLabel: false })\n\t\t\t}),\n\t\t})\n\t}\n\n\tcomponent(shape: TLGroupShape) {\n\t\tconst isErasing = this.editor.getErasingShapeIds().includes(shape.id)\n\n\t\tconst { hintingShapeIds } = this.editor.getCurrentPageState()\n\t\tconst isHintingOtherGroup =\n\t\t\thintingShapeIds.length > 0 &&\n\t\t\thintingShapeIds.some(\n\t\t\t\t(id) =>\n\t\t\t\t\tid !== shape.id &&\n\t\t\t\t\tthis.editor.isShapeOfType<TLGroupShape>(this.editor.getShape(id)!, 'group')\n\t\t\t)\n\n\t\tconst isFocused = this.editor.getCurrentPageState().focusedGroupId !== shape.id\n\n\t\tif (\n\t\t\t!isErasing && // always show the outline while we're erasing the group\n\t\t\t// show the outline while the group is focused unless something outside of the group is being hinted\n\t\t\t// this happens dropping shapes from a group onto some outside group\n\t\t\t(isFocused || isHintingOtherGroup)\n\t\t) {\n\t\t\treturn null\n\t\t}\n\n\t\tconst bounds = this.editor.getShapeGeometry(shape).bounds\n\n\t\treturn (\n\t\t\t<SVGContainer>\n\t\t\t\t<DashedOutlineBox className=\"tl-group\" bounds={bounds} />\n\t\t\t</SVGContainer>\n\t\t)\n\t}\n\n\tindicator(shape: TLGroupShape) {\n\t\t// Not a class component, but eslint can't tell that :(\n\t\tconst bounds = this.editor.getShapeGeometry(shape).bounds\n\t\treturn <DashedOutlineBox className=\"\" bounds={bounds} />\n\t}\n\n\toverride onChildrenChange(group: TLGroupShape) {\n\t\tconst children = this.editor.getSortedChildIdsForParent(group.id)\n\t\tif (children.length === 0) {\n\t\t\tif (this.editor.getCurrentPageState().focusedGroupId === group.id) {\n\t\t\t\tthis.editor.popFocusedGroupId()\n\t\t\t}\n\t\t\tthis.editor.deleteShapes([group.id])\n\t\t\treturn\n\t\t} else if (children.length === 1) {\n\t\t\tif (this.editor.getCurrentPageState().focusedGroupId === group.id) {\n\t\t\t\tthis.editor.popFocusedGroupId()\n\t\t\t}\n\t\t\tthis.editor.reparentShapes(children, group.parentId)\n\t\t\tthis.editor.deleteShapes([group.id])\n\t\t\treturn\n\t\t}\n\t}\n}\n"],
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import { TLGroupShape, groupShapeMigrations, groupShapeProps } from '@tldraw/tlschema'\nimport { SVGContainer } from '../../../components/SVGContainer'\nimport { Geometry2d } from '../../../primitives/geometry/Geometry2d'\nimport { Group2d } from '../../../primitives/geometry/Group2d'\nimport { Rectangle2d } from '../../../primitives/geometry/Rectangle2d'\nimport { ShapeUtil } from '../ShapeUtil'\nimport { DashedOutlineBox } from './DashedOutlineBox'\n\n/** @public */\nexport class GroupShapeUtil extends ShapeUtil<TLGroupShape> {\n\tstatic override type = 'group' as const\n\tstatic override props = groupShapeProps\n\tstatic override migrations = groupShapeMigrations\n\n\toverride canTabTo() {\n\t\treturn false\n\t}\n\n\toverride hideSelectionBoundsFg() {\n\t\treturn true\n\t}\n\n\toverride canBind() {\n\t\treturn false\n\t}\n\n\tgetDefaultProps(): TLGroupShape['props'] {\n\t\treturn {}\n\t}\n\n\tgetGeometry(shape: TLGroupShape): Geometry2d {\n\t\tconst children = this.editor.getSortedChildIdsForParent(shape.id)\n\t\tif (children.length === 0) {\n\t\t\treturn new Rectangle2d({ width: 1, height: 1, isFilled: false })\n\t\t}\n\n\t\treturn new Group2d({\n\t\t\tchildren: children.map((childId) => {\n\t\t\t\tconst shape = this.editor.getShape(childId)!\n\t\t\t\treturn this.editor\n\t\t\t\t\t.getShapeGeometry(childId)\n\t\t\t\t\t.transform(this.editor.getShapeLocalTransform(shape)!, { isLabel: false })\n\t\t\t}),\n\t\t})\n\t}\n\n\tcomponent(shape: TLGroupShape) {\n\t\tconst isErasing = this.editor.getErasingShapeIds().includes(shape.id)\n\n\t\tconst { hintingShapeIds } = this.editor.getCurrentPageState()\n\t\tconst isHintingOtherGroup =\n\t\t\thintingShapeIds.length > 0 &&\n\t\t\thintingShapeIds.some(\n\t\t\t\t(id) =>\n\t\t\t\t\tid !== shape.id &&\n\t\t\t\t\tthis.editor.isShapeOfType<TLGroupShape>(this.editor.getShape(id)!, 'group')\n\t\t\t)\n\n\t\tconst isFocused = this.editor.getCurrentPageState().focusedGroupId !== shape.id\n\n\t\tif (\n\t\t\t!isErasing && // always show the outline while we're erasing the group\n\t\t\t// show the outline while the group is focused unless something outside of the group is being hinted\n\t\t\t// this happens dropping shapes from a group onto some outside group\n\t\t\t(isFocused || isHintingOtherGroup)\n\t\t) {\n\t\t\treturn null\n\t\t}\n\n\t\tconst bounds = this.editor.getShapeGeometry(shape).bounds\n\n\t\treturn (\n\t\t\t<SVGContainer>\n\t\t\t\t<DashedOutlineBox className=\"tl-group\" bounds={bounds} />\n\t\t\t</SVGContainer>\n\t\t)\n\t}\n\n\tindicator(shape: TLGroupShape) {\n\t\t// Not a class component, but eslint can't tell that :(\n\t\tconst bounds = this.editor.getShapeGeometry(shape).bounds\n\t\treturn <DashedOutlineBox className=\"\" bounds={bounds} />\n\t}\n\n\toverride onChildrenChange(group: TLGroupShape) {\n\t\tconst children = this.editor.getSortedChildIdsForParent(group.id)\n\t\tif (children.length === 0) {\n\t\t\tif (this.editor.getCurrentPageState().focusedGroupId === group.id) {\n\t\t\t\tthis.editor.popFocusedGroupId()\n\t\t\t}\n\t\t\tthis.editor.deleteShapes([group.id])\n\t\t\treturn\n\t\t} else if (children.length === 1) {\n\t\t\tif (this.editor.getCurrentPageState().focusedGroupId === group.id) {\n\t\t\t\tthis.editor.popFocusedGroupId()\n\t\t\t}\n\t\t\tthis.editor.reparentShapes(children, group.parentId)\n\t\t\tthis.editor.deleteShapes([group.id])\n\t\t\treturn\n\t\t}\n\t}\n}\n"],
|
|
5
|
+
"mappings": "AAyEI;AAzEJ,SAAuB,sBAAsB,uBAAuB;AACpE,SAAS,oBAAoB;AAE7B,SAAS,eAAe;AACxB,SAAS,mBAAmB;AAC5B,SAAS,iBAAiB;AAC1B,SAAS,wBAAwB;AAG1B,MAAM,uBAAuB,UAAwB;AAAA,EAC3D,OAAgB,OAAO;AAAA,EACvB,OAAgB,QAAQ;AAAA,EACxB,OAAgB,aAAa;AAAA,EAEpB,WAAW;AACnB,WAAO;AAAA,EACR;AAAA,EAES,wBAAwB;AAChC,WAAO;AAAA,EACR;AAAA,EAES,UAAU;AAClB,WAAO;AAAA,EACR;AAAA,EAEA,kBAAyC;AACxC,WAAO,CAAC;AAAA,EACT;AAAA,EAEA,YAAY,OAAiC;AAC5C,UAAM,WAAW,KAAK,OAAO,2BAA2B,MAAM,EAAE;AAChE,QAAI,SAAS,WAAW,GAAG;AAC1B,aAAO,IAAI,YAAY,EAAE,OAAO,GAAG,QAAQ,GAAG,UAAU,MAAM,CAAC;AAAA,IAChE;AAEA,WAAO,IAAI,QAAQ;AAAA,MAClB,UAAU,SAAS,IAAI,CAAC,YAAY;AACnC,cAAMA,SAAQ,KAAK,OAAO,SAAS,OAAO;AAC1C,eAAO,KAAK,OACV,iBAAiB,OAAO,EACxB,UAAU,KAAK,OAAO,uBAAuBA,MAAK,GAAI,EAAE,SAAS,MAAM,CAAC;AAAA,MAC3E,CAAC;AAAA,IACF,CAAC;AAAA,EACF;AAAA,EAEA,UAAU,OAAqB;AAC9B,UAAM,YAAY,KAAK,OAAO,mBAAmB,EAAE,SAAS,MAAM,EAAE;AAEpE,UAAM,EAAE,gBAAgB,IAAI,KAAK,OAAO,oBAAoB;AAC5D,UAAM,sBACL,gBAAgB,SAAS,KACzB,gBAAgB;AAAA,MACf,CAAC,OACA,OAAO,MAAM,MACb,KAAK,OAAO,cAA4B,KAAK,OAAO,SAAS,EAAE,GAAI,OAAO;AAAA,IAC5E;AAED,UAAM,YAAY,KAAK,OAAO,oBAAoB,EAAE,mBAAmB,MAAM;AAE7E,QACC,CAAC;AAAA;AAAA;AAAA,KAGA,aAAa,sBACb;AACD,aAAO;AAAA,IACR;AAEA,UAAM,SAAS,KAAK,OAAO,iBAAiB,KAAK,EAAE;AAEnD,WACC,oBAAC,gBACA,8BAAC,oBAAiB,WAAU,YAAW,QAAgB,GACxD;AAAA,EAEF;AAAA,EAEA,UAAU,OAAqB;AAE9B,UAAM,SAAS,KAAK,OAAO,iBAAiB,KAAK,EAAE;AACnD,WAAO,oBAAC,oBAAiB,WAAU,IAAG,QAAgB;AAAA,EACvD;AAAA,EAES,iBAAiB,OAAqB;AAC9C,UAAM,WAAW,KAAK,OAAO,2BAA2B,MAAM,EAAE;AAChE,QAAI,SAAS,WAAW,GAAG;AAC1B,UAAI,KAAK,OAAO,oBAAoB,EAAE,mBAAmB,MAAM,IAAI;AAClE,aAAK,OAAO,kBAAkB;AAAA,MAC/B;AACA,WAAK,OAAO,aAAa,CAAC,MAAM,EAAE,CAAC;AACnC;AAAA,IACD,WAAW,SAAS,WAAW,GAAG;AACjC,UAAI,KAAK,OAAO,oBAAoB,EAAE,mBAAmB,MAAM,IAAI;AAClE,aAAK,OAAO,kBAAkB;AAAA,MAC/B;AACA,WAAK,OAAO,eAAe,UAAU,MAAM,QAAQ;AACnD,WAAK,OAAO,aAAa,CAAC,MAAM,EAAE,CAAC;AACnC;AAAA,IACD;AAAA,EACD;AACD;",
|
|
6
6
|
"names": ["shape"]
|
|
7
7
|
}
|
package/dist-esm/version.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
const version = "3.13.0-canary.
|
|
1
|
+
const version = "3.13.0-canary.bbc6785692f2";
|
|
2
2
|
const publishDates = {
|
|
3
3
|
major: "2024-09-13T14:36:29.063Z",
|
|
4
|
-
minor: "2025-05-
|
|
5
|
-
patch: "2025-05-
|
|
4
|
+
minor: "2025-05-12T09:17:36.290Z",
|
|
5
|
+
patch: "2025-05-12T09:17:36.290Z"
|
|
6
6
|
};
|
|
7
7
|
export {
|
|
8
8
|
publishDates,
|
package/dist-esm/version.mjs.map
CHANGED
|
@@ -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.13.0-canary.
|
|
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.13.0-canary.bbc6785692f2'\nexport const publishDates = {\n\tmajor: '2024-09-13T14:36:29.063Z',\n\tminor: '2025-05-12T09:17:36.290Z',\n\tpatch: '2025-05-12T09:17:36.290Z',\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
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.13.0-canary.
|
|
4
|
+
"version": "3.13.0-canary.bbc6785692f2",
|
|
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.13.0-canary.
|
|
52
|
-
"@tldraw/state-react": "3.13.0-canary.
|
|
53
|
-
"@tldraw/store": "3.13.0-canary.
|
|
54
|
-
"@tldraw/tlschema": "3.13.0-canary.
|
|
55
|
-
"@tldraw/utils": "3.13.0-canary.
|
|
56
|
-
"@tldraw/validate": "3.13.0-canary.
|
|
51
|
+
"@tldraw/state": "3.13.0-canary.bbc6785692f2",
|
|
52
|
+
"@tldraw/state-react": "3.13.0-canary.bbc6785692f2",
|
|
53
|
+
"@tldraw/store": "3.13.0-canary.bbc6785692f2",
|
|
54
|
+
"@tldraw/tlschema": "3.13.0-canary.bbc6785692f2",
|
|
55
|
+
"@tldraw/utils": "3.13.0-canary.bbc6785692f2",
|
|
56
|
+
"@tldraw/validate": "3.13.0-canary.bbc6785692f2",
|
|
57
57
|
"@types/core-js": "^2.5.8",
|
|
58
58
|
"@use-gesture/react": "^10.3.1",
|
|
59
59
|
"classnames": "^2.5.1",
|
|
@@ -365,8 +365,7 @@ function HandleWrapper({
|
|
|
365
365
|
return (
|
|
366
366
|
<g
|
|
367
367
|
role="button"
|
|
368
|
-
|
|
369
|
-
aria-label={handle.label || 'handle'}
|
|
368
|
+
aria-label="handle"
|
|
370
369
|
transform={`translate(${handle.x}, ${handle.y})`}
|
|
371
370
|
{...events}
|
|
372
371
|
>
|
package/src/lib/editor/Editor.ts
CHANGED
|
@@ -1815,28 +1815,9 @@ export class Editor extends EventEmitter<TLEventMap> {
|
|
|
1815
1815
|
return this
|
|
1816
1816
|
}
|
|
1817
1817
|
|
|
1818
|
-
/**
|
|
1819
|
-
* Select the next shape in the reading order or in cardinal order.
|
|
1820
|
-
*
|
|
1821
|
-
* @example
|
|
1822
|
-
* ```ts
|
|
1823
|
-
* editor.selectAdjacentShape('next')
|
|
1824
|
-
* ```
|
|
1825
|
-
*
|
|
1826
|
-
* @public
|
|
1827
|
-
*/
|
|
1828
1818
|
selectAdjacentShape(direction: TLAdjacentDirection) {
|
|
1819
|
+
const readingOrderShapes = this.getCurrentPageShapesInReadingOrder()
|
|
1829
1820
|
const selectedShapeIds = this.getSelectedShapeIds()
|
|
1830
|
-
const firstParentId = selectedShapeIds[0] ? this.getShape(selectedShapeIds[0])?.parentId : null
|
|
1831
|
-
const isSelectedWithinContainer =
|
|
1832
|
-
firstParentId &&
|
|
1833
|
-
selectedShapeIds.every((shapeId) => this.getShape(shapeId)?.parentId === firstParentId) &&
|
|
1834
|
-
!isPageId(firstParentId)
|
|
1835
|
-
const readingOrderShapes = isSelectedWithinContainer
|
|
1836
|
-
? this._getShapesInReadingOrder(
|
|
1837
|
-
this.getCurrentPageShapes().filter((shape) => shape.parentId === firstParentId)
|
|
1838
|
-
)
|
|
1839
|
-
: this.getCurrentPageShapesInReadingOrder()
|
|
1840
1821
|
const currentShapeId: TLShapeId | undefined =
|
|
1841
1822
|
selectedShapeIds.length === 1
|
|
1842
1823
|
? selectedShapeIds[0]
|
|
@@ -1858,7 +1839,13 @@ export class Editor extends EventEmitter<TLEventMap> {
|
|
|
1858
1839
|
const shape = this.getShape(adjacentShapeId)
|
|
1859
1840
|
if (!shape) return
|
|
1860
1841
|
|
|
1861
|
-
this.
|
|
1842
|
+
this.setSelectedShapes([shape.id])
|
|
1843
|
+
this.zoomToSelectionIfOffscreen(256, {
|
|
1844
|
+
animation: {
|
|
1845
|
+
duration: this.options.animationMediumMs,
|
|
1846
|
+
},
|
|
1847
|
+
inset: 0,
|
|
1848
|
+
})
|
|
1862
1849
|
}
|
|
1863
1850
|
|
|
1864
1851
|
/**
|
|
@@ -1868,14 +1855,10 @@ export class Editor extends EventEmitter<TLEventMap> {
|
|
|
1868
1855
|
* @public
|
|
1869
1856
|
*/
|
|
1870
1857
|
@computed getCurrentPageShapesInReadingOrder(): TLShape[] {
|
|
1871
|
-
const shapes = this.getCurrentPageShapes().filter((shape) => isPageId(shape.parentId))
|
|
1872
|
-
return this._getShapesInReadingOrder(shapes)
|
|
1873
|
-
}
|
|
1874
|
-
|
|
1875
|
-
private _getShapesInReadingOrder(shapes: TLShape[]): TLShape[] {
|
|
1876
1858
|
const SHALLOW_ANGLE = 20
|
|
1877
1859
|
const ROW_THRESHOLD = 100
|
|
1878
1860
|
|
|
1861
|
+
const shapes = this.getCurrentPageShapes()
|
|
1879
1862
|
const tabbableShapes = shapes.filter((shape) => this.getShapeUtil(shape).canTabTo(shape))
|
|
1880
1863
|
|
|
1881
1864
|
if (tabbableShapes.length <= 1) return tabbableShapes
|
|
@@ -2021,36 +2004,6 @@ export class Editor extends EventEmitter<TLEventMap> {
|
|
|
2021
2004
|
return lowestScoringShape!.shape.id
|
|
2022
2005
|
}
|
|
2023
2006
|
|
|
2024
|
-
selectParentShape() {
|
|
2025
|
-
const selectedShape = this.getOnlySelectedShape()
|
|
2026
|
-
if (!selectedShape) return
|
|
2027
|
-
const parentShape = this.getShape(selectedShape.parentId)
|
|
2028
|
-
if (!parentShape) return
|
|
2029
|
-
this._selectShapesAndZoom([parentShape.id])
|
|
2030
|
-
}
|
|
2031
|
-
|
|
2032
|
-
selectFirstChildShape() {
|
|
2033
|
-
const selectedShapes = this.getSelectedShapes()
|
|
2034
|
-
if (!selectedShapes.length) return
|
|
2035
|
-
const selectedShape = selectedShapes[0]
|
|
2036
|
-
const children = this.getSortedChildIdsForParent(selectedShape.id)
|
|
2037
|
-
.map((id) => this.getShape(id))
|
|
2038
|
-
.filter((i) => i) as TLShape[]
|
|
2039
|
-
const sortedChildren = this._getShapesInReadingOrder(children)
|
|
2040
|
-
if (sortedChildren.length === 0) return
|
|
2041
|
-
this._selectShapesAndZoom([sortedChildren[0].id])
|
|
2042
|
-
}
|
|
2043
|
-
|
|
2044
|
-
private _selectShapesAndZoom(ids: TLShapeId[]) {
|
|
2045
|
-
this.setSelectedShapes(ids)
|
|
2046
|
-
this.zoomToSelectionIfOffscreen(256, {
|
|
2047
|
-
animation: {
|
|
2048
|
-
duration: this.options.animationMediumMs,
|
|
2049
|
-
},
|
|
2050
|
-
inset: 0,
|
|
2051
|
-
})
|
|
2052
|
-
}
|
|
2053
|
-
|
|
2054
2007
|
/**
|
|
2055
2008
|
* Clear the selection.
|
|
2056
2009
|
*
|
|
@@ -12,6 +12,10 @@ export class GroupShapeUtil extends ShapeUtil<TLGroupShape> {
|
|
|
12
12
|
static override props = groupShapeProps
|
|
13
13
|
static override migrations = groupShapeMigrations
|
|
14
14
|
|
|
15
|
+
override canTabTo() {
|
|
16
|
+
return false
|
|
17
|
+
}
|
|
18
|
+
|
|
15
19
|
override hideSelectionBoundsFg() {
|
|
16
20
|
return true
|
|
17
21
|
}
|
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.13.0-canary.
|
|
4
|
+
export const version = '3.13.0-canary.bbc6785692f2'
|
|
5
5
|
export const publishDates = {
|
|
6
6
|
major: '2024-09-13T14:36:29.063Z',
|
|
7
|
-
minor: '2025-05-
|
|
8
|
-
patch: '2025-05-
|
|
7
|
+
minor: '2025-05-12T09:17:36.290Z',
|
|
8
|
+
patch: '2025-05-12T09:17:36.290Z',
|
|
9
9
|
}
|