diff --git a/package.json b/package.json index 6f57f7e7c..07ebdaf5c 100644 --- a/package.json +++ b/package.json @@ -78,8 +78,8 @@ "autorelease": "node scripts/autorelease.js", "prerelease:excalidraw": "node scripts/prerelease.js", "release:excalidraw": "node scripts/release.js", - "rm:build": "rm -rf excalidraw-app/{build,dist,dev-dist} && rm -rf packages/*/{dist,build} && rm -rf examples/*/{build,dist}", - "rm:node_modules": "rm -rf node_modules && rm -rf excalidraw-app/node_modules && rm -rf packages/*/node_modules", + "rm:build": "rimraf excalidraw-app/{build,dist,dev-dist} && rimraf packages/*/{dist,build} && rimraf examples/*/{build,dist}", + "rm:node_modules": "rimraf node_modules && rimraf excalidraw-app/node_modules && rimraf packages/*/node_modules", "clean-install": "yarn rm:node_modules && yarn install" }, "resolutions": { diff --git a/packages/common/package.json b/packages/common/package.json index 3e5f6413a..32cffc717 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -50,7 +50,7 @@ "bugs": "https://github.com/excalidraw/excalidraw/issues", "repository": "https://github.com/excalidraw/excalidraw", "scripts": { - "gen:types": "rm -rf types && tsc", - "build:esm": "rm -rf dist && node ../../scripts/buildBase.js && yarn gen:types" + "gen:types": "rimraf types && tsc", + "build:esm": "rimraf dist && node ../../scripts/buildBase.js && yarn gen:types" } } diff --git a/packages/element/package.json b/packages/element/package.json index ae810e374..1eec60742 100644 --- a/packages/element/package.json +++ b/packages/element/package.json @@ -50,7 +50,7 @@ "bugs": "https://github.com/excalidraw/excalidraw/issues", "repository": "https://github.com/excalidraw/excalidraw", "scripts": { - "gen:types": "rm -rf types && tsc", - "build:esm": "rm -rf dist && node ../../scripts/buildBase.js && yarn gen:types" + "gen:types": "rimraf types && tsc", + "build:esm": "rimraf dist && node ../../scripts/buildBase.js && yarn gen:types" } } diff --git a/packages/excalidraw/components/App.tsx b/packages/excalidraw/components/App.tsx index 0381a2e39..26a2d30ee 100644 --- a/packages/excalidraw/components/App.tsx +++ b/packages/excalidraw/components/App.tsx @@ -2960,7 +2960,8 @@ class App extends React.Component { this.scheduleImageRefresh(); }; - private onScroll = debounce(() => { + private onScroll = () => { + debugger; const { offsetTop, offsetLeft } = this.getCanvasOffsets(); this.setState((state) => { if (state.offsetLeft === offsetLeft && state.offsetTop === offsetTop) { @@ -2968,7 +2969,7 @@ class App extends React.Component { } return { offsetTop, offsetLeft }; }); - }, SCROLL_TIMEOUT); + }; // Copy/paste diff --git a/packages/excalidraw/components/TTDDialog/TTDDialogInput.tsx b/packages/excalidraw/components/TTDDialog/TTDDialogInput.tsx index 9bd80b681..df8dd61b0 100644 --- a/packages/excalidraw/components/TTDDialog/TTDDialogInput.tsx +++ b/packages/excalidraw/components/TTDDialog/TTDDialogInput.tsx @@ -28,6 +28,7 @@ export const TTDDialogInput = ({ } const textarea = ref.current; if (textarea) { + textarea.focus(); const handleKeyDown = (event: KeyboardEvent) => { if (event[KEYS.CTRL_OR_CMD] && event.key === KEYS.ENTER) { event.preventDefault(); @@ -47,7 +48,6 @@ export const TTDDialogInput = ({ onChange={onChange} value={input} placeholder={placeholder} - autoFocus ref={ref} /> ); diff --git a/packages/excalidraw/package.json b/packages/excalidraw/package.json index 27fae8455..7ebaed742 100644 --- a/packages/excalidraw/package.json +++ b/packages/excalidraw/package.json @@ -129,7 +129,7 @@ "bugs": "https://github.com/excalidraw/excalidraw/issues", "homepage": "https://github.com/excalidraw/excalidraw/tree/master/packages/excalidraw", "scripts": { - "gen:types": "rm -rf types && tsc", - "build:esm": "rm -rf dist && node ../../scripts/buildPackage.js && yarn gen:types" + "gen:types": "rimraf types && tsc", + "build:esm": "rimraf dist && node ../../scripts/buildPackage.js && yarn gen:types" } } diff --git a/packages/math/package.json b/packages/math/package.json index f8b411891..e9f5fd8da 100644 --- a/packages/math/package.json +++ b/packages/math/package.json @@ -54,7 +54,7 @@ "bugs": "https://github.com/excalidraw/excalidraw/issues", "repository": "https://github.com/excalidraw/excalidraw", "scripts": { - "gen:types": "rm -rf types && tsc", - "build:esm": "rm -rf dist && node ../../scripts/buildBase.js && yarn gen:types" + "gen:types": "rimraf types && tsc", + "build:esm": "rimraf dist && node ../../scripts/buildBase.js && yarn gen:types" } } diff --git a/packages/utils/package.json b/packages/utils/package.json index ca3eee23e..2dc54c59c 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -69,7 +69,7 @@ "bugs": "https://github.com/excalidraw/excalidraw/issues", "repository": "https://github.com/excalidraw/excalidraw", "scripts": { - "gen:types": "rm -rf types && tsc", - "build:esm": "rm -rf dist && node ../../scripts/buildUtils.js && yarn gen:types" + "gen:types": "rimraf types && tsc", + "build:esm": "rimraf dist && node ../../scripts/buildUtils.js && yarn gen:types" } }