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>
54 lines
1.1 KiB
JSON
54 lines
1.1 KiB
JSON
{
|
|
"name": "@tldraw/scripts",
|
|
"description": "build scripts",
|
|
"version": "2.0.0-alpha.8",
|
|
"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"
|
|
],
|
|
"devDependencies": {
|
|
"@auto-it/core": "^10.45.0",
|
|
"@types/is-ci": "^3.0.0",
|
|
"@types/node": "^18.13.0",
|
|
"@typescript-eslint/utils": "^5.59.0",
|
|
"ast-types": "^0.14.2",
|
|
"cross-fetch": "^3.1.5",
|
|
"esbuild": "^0.18.3",
|
|
"glob": "^8.0.3",
|
|
"is-ci": "^3.0.1",
|
|
"kleur": "^4.1.5",
|
|
"lazyrepo": "0.0.0-alpha.27",
|
|
"prettier": "^2.8.7",
|
|
"recast": "^0.22.0",
|
|
"rimraf": "^4.4.0",
|
|
"semver": "^7.3.8",
|
|
"svgo": "^3.0.2",
|
|
"typescript": "^4.5.2"
|
|
},
|
|
"scripts": {
|
|
"lint": "yarn run -T tsx lint.ts"
|
|
},
|
|
"dependencies": {
|
|
"ignore": "^5.2.4"
|
|
}
|
|
}
|