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

View File

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

View File

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