b88a2370b3
Removes `propsForNextShape` and replaces it with the new styles API. Changes in here: - New custom style example - `setProp` is now `setStyle` and takes a `StyleProp` instead of a string - `Editor.props` and `Editor.opacity` are now `Editor.sharedStyles` and `Editor.sharedOpacity` - They return an object that flags mixed vs shared types instead of using null to signal mixed types - `Editor.styles` returns a `SharedStyleMap` - keyed on `StyleProp` instead of `string` - `StateNode.shapeType` is now the shape util rather than just a string. This lets us pull the styles from the shape type directly. - `color` is no longer a core part of the editor set on the shape parent. Individual child shapes have to use color directly. - `propsForNextShape` is now `stylesForNextShape` - `InstanceRecordType` is created at runtime in the same way `ShapeRecordType` is. This is so it can pull style validators out of shape defs for `stylesForNextShape` - Shape type are now defined by their props rather than having separate validators & type defs ### Change Type - [x] `major` — Breaking change ### Test Plan 1. Big time regression testing around styles! 2. Check UI works as intended for all shape/style/tool combos - [x] Unit Tests - [ ] End to end tests ### Release Notes - --------- Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
58 lines
1.4 KiB
JSON
58 lines
1.4 KiB
JSON
{
|
|
"name": "examples.tldraw.com",
|
|
"description": "A tiny little drawing app (development).",
|
|
"version": "2.0.0-alpha.11",
|
|
"private": true,
|
|
"packageManager": "yarn@3.5.0",
|
|
"author": {
|
|
"name": "tldraw GB Ltd.",
|
|
"email": "hello@tldraw.com"
|
|
},
|
|
"homepage": "https://tldraw.dev",
|
|
"license": "Apache-2.0",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/tldraw/tldraw"
|
|
},
|
|
"bugs": {
|
|
"url": "https://github.com/tldraw/tldraw/issues"
|
|
},
|
|
"keywords": [
|
|
"tldraw",
|
|
"drawing",
|
|
"app",
|
|
"development",
|
|
"whiteboard",
|
|
"canvas",
|
|
"infinite"
|
|
],
|
|
"scripts": {
|
|
"dev": "concurrently \"vite\" \"HOST=localhost PORT=1234 npx y-websocket\" --kill-others",
|
|
"build": "vite build",
|
|
"lint": "yarn run -T tsx ../../scripts/lint.ts",
|
|
"e2e": "playwright test -c ./e2e/playwright.config.ts",
|
|
"e2e-ui": "playwright test --ui -c ./e2e/playwright.config.ts"
|
|
},
|
|
"dependencies": {
|
|
"@babel/plugin-proposal-decorators": "^7.21.0",
|
|
"@playwright/test": "^1.34.3",
|
|
"@tldraw/assets": "workspace:*",
|
|
"@tldraw/tldraw": "workspace:*",
|
|
"@tldraw/utils": "workspace:*",
|
|
"@tldraw/validate": "workspace:*",
|
|
"@vercel/analytics": "^1.0.1",
|
|
"lazyrepo": "0.0.0-alpha.27",
|
|
"react": "^18.2.0",
|
|
"react-dom": "^18.2.0",
|
|
"react-router-dom": "^6.9.0",
|
|
"signia": "0.1.4",
|
|
"signia-react": "0.1.4",
|
|
"vite": "^4.3.4",
|
|
"y-websocket": "^1.5.0",
|
|
"yjs": "^13.6.2"
|
|
},
|
|
"devDependencies": {
|
|
"concurrently": "^8.1.0",
|
|
"dotenv": "^16.0.3"
|
|
}
|
|
}
|