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>
59 lines
1.5 KiB
JSON
59 lines
1.5 KiB
JSON
{
|
|
"name": "@tldraw/vscode-editor",
|
|
"description": "An an editor for the tldraw vscode extension.",
|
|
"version": "2.0.0-alpha.0",
|
|
"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": {
|
|
"build": "yarn run -T tsx scripts/build.ts",
|
|
"dev": "yarn run -T tsx scripts/dev.ts",
|
|
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
|
|
"lint": "yarn run -T tsx ../../../scripts/lint.ts"
|
|
},
|
|
"devDependencies": {
|
|
"@tldraw/assets": "workspace:*",
|
|
"@tldraw/editor": "workspace:*",
|
|
"@tldraw/file-format": "workspace:*",
|
|
"@tldraw/tldraw": "workspace:*",
|
|
"@tldraw/ui": "workspace:*",
|
|
"@tldraw/utils": "workspace:*",
|
|
"@types/fs-extra": "^11.0.1",
|
|
"@types/node": "^17.0.14",
|
|
"@types/react": "^18.0.24",
|
|
"@types/react-dom": "^18.0.6",
|
|
"@types/react-router-dom": "^5.1.8",
|
|
"concurrently": "7.0.0",
|
|
"create-serve": "1.0.1",
|
|
"dotenv": "^16.0.3",
|
|
"esbuild": "^0.18.3",
|
|
"fs-extra": "^11.1.0",
|
|
"lazyrepo": "0.0.0-alpha.27",
|
|
"nanoid": "4.0.2",
|
|
"react": "^18.2.0",
|
|
"react-dom": "^18.2.0",
|
|
"tslib": "^2.4.0"
|
|
},
|
|
"gitHead": "a7dac0f83ad998e205c2aab58182cb4ba4e099a6"
|
|
}
|