bump version, use auth, stick to 512x512

This commit is contained in:
Lu[ke] Wilson 2023-11-28 10:42:30 +00:00
parent 873231d892
commit c2a8cf3422
4 changed files with 5780 additions and 5781 deletions

11486
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,34 +1,34 @@
{
"name": "tldraw-fal",
"version": "0.1.0",
"private": true,
"license": "AGPL-3.0-or-later",
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
"format": "prettier --write ."
},
"dependencies": {
"@fal-ai/serverless-client": "^0.6.0-alpha.4",
"@fal-ai/serverless-proxy": "^0.5.0",
"@tldraw/tldraw": "^2.0.0-canary.ba4091c59418",
"next": "14.0.3",
"react": "^18",
"react-dom": "^18"
},
"devDependencies": {
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"autoprefixer": "^10.0.1",
"eslint": "^8",
"eslint-config-next": "14.0.3",
"postcss": "^8",
"prettier": "^3.1.0",
"prettier-plugin-organize-imports": "^3.2.4",
"tailwindcss": "^3.3.0",
"typescript": "^5"
}
}
"name": "tldraw-fal",
"version": "0.1.0",
"private": true,
"license": "AGPL-3.0-or-later",
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint",
"format": "prettier --write ."
},
"dependencies": {
"@fal-ai/serverless-client": "^0.6.0",
"@fal-ai/serverless-proxy": "^0.6.0",
"@tldraw/tldraw": "^2.0.0-canary.ba4091c59418",
"next": "14.0.3",
"react": "^18",
"react-dom": "^18"
},
"devDependencies": {
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"autoprefixer": "^10.0.1",
"eslint": "^8",
"eslint-config-next": "14.0.3",
"postcss": "^8",
"prettier": "^3.1.0",
"prettier-plugin-organize-imports": "^3.2.4",
"tailwindcss": "^3.3.0",
"typescript": "^5"
}
}

View File

@ -58,8 +58,9 @@ export class LiveImageShapeUtil extends ShapeUtil<LiveImageShape> {
static type = 'live-image' as any
override canBind = () => true
override canUnmount = () => false
override canEdit = () => true
override isAspectRatioLocked = () => true
getDefaultProps() {
return {
@ -77,8 +78,6 @@ export class LiveImageShapeUtil extends ShapeUtil<LiveImageShape> {
})
}
canUnmount = () => false
override canReceiveNewChildrenOfType = (shape: TLShape, _type: TLShape['type']) => {
return !shape.isLocked
}
@ -155,7 +154,7 @@ export class LiveImageShapeUtil extends ShapeUtil<LiveImageShape> {
useLiveImage(shape.id, {
debounceTime: 0,
appId: '110602490-lcm-plexed-sd15-i2i',
appId: '110602490-lcm-sd15-i2i',
})
const bounds = this.editor.getShapeGeometry(shape).bounds

View File

@ -111,7 +111,7 @@ export function useLiveImage(
const image = await getSvgAsImage(svg, editor.environment.isSafari, {
type: 'png',
quality: 1,
scale: 1,
scale: 512 / shape.props.w,
})
// We might be stale
if (iteration <= finishedIteration.current) return