Fixes a few last points

This commit is contained in:
Steve Ruiz 2021-08-29 14:46:58 +01:00
parent 9e8e99cb6f
commit c35f82bdcf
7 changed files with 22 additions and 2142 deletions

View file

@ -5,6 +5,10 @@ const esbuild = require('esbuild')
const name = process.env.npm_package_name || '' const name = process.env.npm_package_name || ''
async function main() { async function main() {
if (!fs.existsSync('./dist')) {
fs.mkdirSync('./dist')
}
try { try {
esbuild.buildSync({ esbuild.buildSync({
entryPoints: ['./src/index.ts'], entryPoints: ['./src/index.ts'],

View file

@ -1,17 +1,21 @@
/* eslint-disable */ /* eslint-disable */
const fs = require('fs')
const esbuild = require('esbuild') const esbuild = require('esbuild')
const name = process.env.npm_package_name || '' const name = process.env.npm_package_name || ''
async function main() { async function main() {
if (!fs.existsSync('./dist')) {
fs.mkdirSync('./dist')
}
esbuild.build({ esbuild.build({
entryPoints: ['./src/index.ts'], entryPoints: ['./src/index.ts'],
outdir: 'dist/cjs', outdir: 'dist/cjs',
minify: false, minify: false,
bundle: true, bundle: true,
format: 'cjs', format: 'cjs',
target: 'esnext', target: 'es6',
jsxFactory: 'React.createElement', jsxFactory: 'React.createElement',
jsxFragment: 'React.Fragment', jsxFragment: 'React.Fragment',
tsconfig: './tsconfig.json', tsconfig: './tsconfig.json',

View file

@ -61,4 +61,4 @@
"rko": "^0.5.18" "rko": "^0.5.18"
}, },
"gitHead": "4a7439ddf81b615ee49fddbe00802699975f9375" "gitHead": "4a7439ddf81b615ee49fddbe00802699975f9375"
} }

View file

@ -5,6 +5,10 @@ const esbuild = require('esbuild')
const name = process.env.npm_package_name || '' const name = process.env.npm_package_name || ''
async function main() { async function main() {
if (!fs.existsSync('./dist')) {
fs.mkdirSync('./dist')
}
try { try {
esbuild.buildSync({ esbuild.buildSync({
entryPoints: ['./src/index.ts'], entryPoints: ['./src/index.ts'],

View file

@ -1,17 +1,21 @@
/* eslint-disable */ /* eslint-disable */
const fs = require('fs')
const esbuild = require('esbuild') const esbuild = require('esbuild')
const name = process.env.npm_package_name || '' const name = process.env.npm_package_name || ''
async function main() { async function main() {
if (!fs.existsSync('./dist')) {
fs.mkdirSync('./dist')
}
esbuild.build({ esbuild.build({
entryPoints: ['./src/index.ts'], entryPoints: ['./src/index.ts'],
outdir: 'dist/cjs', outdir: 'dist/cjs',
minify: false, minify: false,
bundle: true, bundle: true,
format: 'cjs', format: 'cjs',
target: 'esnext', target: 'es6',
jsxFactory: 'React.createElement', jsxFactory: 'React.createElement',
jsxFragment: 'React.Fragment', jsxFragment: 'React.Fragment',
tsconfig: './tsconfig.build.json', tsconfig: './tsconfig.build.json',

File diff suppressed because it is too large Load diff

View file

@ -103,12 +103,10 @@ export class TLDrawState extends StateManager<Data> {
/* -------------------- Internal -------------------- */ /* -------------------- Internal -------------------- */
protected onStateWillChange = (state: Data, id: string): void => { protected onStateWillChange = (state: Data, id: string): void => {
if (!id.startsWith('patch')) {
if (id === "reset" || id.startsWith("command")) {
this.selectHistory.stack = [[]] this.selectHistory.stack = [[]]
this.selectHistory.pointer = 0 this.selectHistory.pointer = 0
} }
} }
protected onStateDidChange = (state: Data, id: string): void => { protected onStateDidChange = (state: Data, id: string): void => {