@tldraw/editor
Advanced tools
Comparing version 3.8.0-canary.c860b352eedb to 3.8.0-canary.cd989361f969
@@ -178,2 +178,3 @@ "use strict"; | ||
resizeBox: () => import_resizeBox.resizeBox, | ||
resizeScaled: () => import_resizeScaled.resizeScaled, | ||
rotateSelectionHandle: () => import_Box.rotateSelectionHandle, | ||
@@ -245,2 +246,3 @@ runtime: () => import_runtime.runtime, | ||
var import_state_react = require("@tldraw/state-react"); | ||
var import_resizeScaled = require("./lib/editor/shapes/shared/resizeScaled"); | ||
var import_LocalIndexedDb = require("./lib/utils/sync/LocalIndexedDb"); | ||
@@ -368,5 +370,5 @@ __reExport(src_exports, require("@tldraw/store"), module.exports); | ||
"@tldraw/editor", | ||
"3.8.0-canary.c860b352eedb", | ||
"3.8.0-canary.cd989361f969", | ||
"cjs" | ||
); | ||
//# sourceMappingURL=index.js.map |
@@ -158,3 +158,2 @@ "use strict"; | ||
debugGeometry ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_GeometryDebuggingView.GeometryDebuggingView, {}) : null, | ||
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(HandlesWrapper, {}), | ||
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(BrushWrapper, {}), | ||
@@ -167,2 +166,3 @@ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ScribbleWrapper, {}), | ||
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(SelectionForegroundWrapper, {}), | ||
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(HandlesWrapper, {}), | ||
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_LiveCollaborators.LiveCollaborators, {}) | ||
@@ -169,0 +169,0 @@ ] }) }), |
@@ -68,4 +68,5 @@ "use strict"; | ||
createTextOnCanvasDoubleClick: true, | ||
exportProvider: import_react.Fragment | ||
exportProvider: import_react.Fragment, | ||
noteShapeResizeMode: "none" | ||
}; | ||
//# sourceMappingURL=options.js.map |
@@ -25,8 +25,8 @@ "use strict"; | ||
module.exports = __toCommonJS(version_exports); | ||
const version = "3.8.0-canary.c860b352eedb"; | ||
const version = "3.8.0-canary.cd989361f969"; | ||
const publishDates = { | ||
major: "2024-09-13T14:36:29.063Z", | ||
minor: "2025-01-22T13:36:17.024Z", | ||
patch: "2025-01-22T13:36:17.024Z" | ||
minor: "2025-01-29T10:55:09.718Z", | ||
patch: "2025-01-29T10:55:09.718Z" | ||
}; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@tldraw/editor", | ||
"description": "A tiny little drawing app (editor).", | ||
"version": "3.8.0-canary.c860b352eedb", | ||
"version": "3.8.0-canary.cd989361f969", | ||
"author": { | ||
@@ -48,8 +48,8 @@ "name": "tldraw Inc.", | ||
"dependencies": { | ||
"@tldraw/state": "3.8.0-canary.c860b352eedb", | ||
"@tldraw/state-react": "3.8.0-canary.c860b352eedb", | ||
"@tldraw/store": "3.8.0-canary.c860b352eedb", | ||
"@tldraw/tlschema": "3.8.0-canary.c860b352eedb", | ||
"@tldraw/utils": "3.8.0-canary.c860b352eedb", | ||
"@tldraw/validate": "3.8.0-canary.c860b352eedb", | ||
"@tldraw/state": "3.8.0-canary.cd989361f969", | ||
"@tldraw/state-react": "3.8.0-canary.cd989361f969", | ||
"@tldraw/store": "3.8.0-canary.cd989361f969", | ||
"@tldraw/tlschema": "3.8.0-canary.cd989361f969", | ||
"@tldraw/utils": "3.8.0-canary.cd989361f969", | ||
"@tldraw/validate": "3.8.0-canary.cd989361f969", | ||
"@types/core-js": "^2.5.5", | ||
@@ -56,0 +56,0 @@ "@use-gesture/react": "^10.2.27", |
@@ -28,2 +28,3 @@ import { registerTldrawLibraryVersion } from '@tldraw/utils' | ||
} from '@tldraw/state-react' | ||
export { resizeScaled } from './lib/editor/shapes/shared/resizeScaled' | ||
export { LocalIndexedDb, Table, type StoreName } from './lib/utils/sync/LocalIndexedDb' | ||
@@ -186,2 +187,3 @@ // eslint-disable-next-line local/no-export-star | ||
ShapeUtil, | ||
type TLCropInfo, | ||
type TLHandleDragInfo, | ||
@@ -188,0 +190,0 @@ type TLResizeInfo, |
@@ -8,2 +8,3 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ | ||
TLShape, | ||
TLShapeCrop, | ||
TLShapePartial, | ||
@@ -13,3 +14,3 @@ TLUnknownShape, | ||
import { ReactElement } from 'react' | ||
import { Box } from '../../primitives/Box' | ||
import { Box, SelectionHandle } from '../../primitives/Box' | ||
import { Vec } from '../../primitives/Vec' | ||
@@ -425,2 +426,15 @@ import { Geometry2d } from '../../primitives/geometry/Geometry2d' | ||
/** | ||
* A callback called when a shape changes from a crop. | ||
* | ||
* @param shape - The shape at the start of the crop. | ||
* @param info - Info about the crop. | ||
* @returns A change to apply to the shape, or void. | ||
* @public | ||
*/ | ||
onCrop?( | ||
shape: Shape, | ||
info: TLCropInfo<Shape> | ||
): Omit<TLShapePartial<Shape>, 'id' | 'type'> | undefined | void | ||
/** | ||
* A callback called when some other shapes are dragged over this one. | ||
@@ -623,2 +637,17 @@ * | ||
/** | ||
* Info about a crop. | ||
* @param handle - The handle being dragged. | ||
* @param change - The distance the handle is moved. | ||
* @param initialShape - The shape at the start of the resize. | ||
* @public | ||
*/ | ||
export interface TLCropInfo<T extends TLShape> { | ||
handle: SelectionHandle | ||
change: Vec | ||
crop: TLShapeCrop | ||
uncroppedSize: { w: number; h: number } | ||
initialShape: T | ||
} | ||
/** | ||
* The type of resize. | ||
@@ -625,0 +654,0 @@ * |
@@ -69,2 +69,7 @@ import { ComponentType, Fragment } from 'react' | ||
readonly exportProvider: ComponentType<{ children: React.ReactNode }> | ||
/** | ||
* How should the note shape resize? By default it does not resize (except automatically based on its text content), | ||
* but you can set it to be user-resizable using scale. | ||
*/ | ||
readonly noteShapeResizeMode: 'none' | 'scale' | ||
} | ||
@@ -115,2 +120,3 @@ | ||
exportProvider: Fragment, | ||
noteShapeResizeMode: 'none', | ||
} as const satisfies TldrawOptions |
// This file is automatically generated by internal/scripts/refresh-assets.ts. | ||
// Do not edit manually. Or do, I'm a comment, not a cop. | ||
export const version = '3.8.0-canary.c860b352eedb' | ||
export const version = '3.8.0-canary.cd989361f969' | ||
export const publishDates = { | ||
major: '2024-09-13T14:36:29.063Z', | ||
minor: '2025-01-22T13:36:17.024Z', | ||
patch: '2025-01-22T13:36:17.024Z', | ||
minor: '2025-01-29T10:55:09.718Z', | ||
patch: '2025-01-29T10:55:09.718Z', | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
6151649
875
85267
+ Added@tldraw/state@3.8.0-canary.cd989361f969(transitive)
+ Added@tldraw/state-react@3.8.0-canary.cd989361f969(transitive)
+ Added@tldraw/store@3.8.0-canary.cd989361f969(transitive)
+ Added@tldraw/tlschema@3.8.0-canary.cd989361f969(transitive)
+ Added@tldraw/utils@3.8.0-canary.cd989361f969(transitive)
+ Added@tldraw/validate@3.8.0-canary.cd989361f969(transitive)
- Removed@tldraw/state@3.8.0-canary.c860b352eedb(transitive)
- Removed@tldraw/state-react@3.8.0-canary.c860b352eedb(transitive)
- Removed@tldraw/store@3.8.0-canary.c860b352eedb(transitive)
- Removed@tldraw/tlschema@3.8.0-canary.c860b352eedb(transitive)
- Removed@tldraw/utils@3.8.0-canary.c860b352eedb(transitive)
- Removed@tldraw/validate@3.8.0-canary.c860b352eedb(transitive)