tldraw/package.json
alex b88a2370b3
Styles API (#1580)
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>
2023-06-16 10:33:47 +00:00

102 lines
2.8 KiB
JSON

{
"name": "@tldraw/monorepo",
"description": "A tiny little drawing app (monorepo).",
"version": "0.0.0",
"private": true,
"author": {
"name": "tldraw GB Ltd.",
"email": "hello@tldraw.com"
},
"homepage": "https://tldraw.dev",
"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"
],
"workspaces": [
"apps/*",
"packages/*",
"apps/vscode/*",
"e2e",
"config",
"scripts"
],
"scripts": {
"clean": "scripts/clean.sh",
"postinstall": "husky install && yarn refresh-assets",
"refresh-assets": "lazy refresh-assets",
"build": "lazy build",
"build-docs": "lazy build --filter='{,bublic/}apps/docs'",
"dev": "lazy run dev --filter='{,bublic/}apps/examples' --filter='{,bublic/}packages/tldraw'",
"dev-docs": "lazy run dev --filter='{,bublic/}apps/docs'",
"dev-vscode": "code ./apps/vscode/extension && lazy run dev --filter='{,bublic/}apps/vscode/{extension,editor}'",
"build-types": "lazy inherit",
"build-api": "lazy build-api",
"build-package": "lazy build-package",
"lint": "lazy lint",
"format": "prettier --write \"**/*.{ts,tsx,js,jsx,json}\"",
"typecheck": "yarn refresh-assets && tsx scripts/typecheck.ts",
"check-scripts": "tsx scripts/check-scripts.ts",
"api-check": "lazy api-check",
"test": "lazy test",
"e2e": "lazy e2e --filter='{,bublic/}apps/examples'"
},
"engines": {
"npm": ">=7.0.0"
},
"packageManager": "yarn@3.5.0",
"lint-staged": {
"*.{js,jsx,ts,tsx,json}": [
"prettier --write"
]
},
"dependencies": {
"@next/eslint-plugin-next": "^13.3.0",
"@types/jest": "^28.1.2",
"@types/node": "18.7.3",
"@types/react": "^18.0.24",
"@types/react-dom": "^18.0.6",
"@typescript-eslint/eslint-plugin": "^5.57.0",
"@typescript-eslint/parser": "^5.57.0",
"auto": "^10.46.0",
"eslint": "^8.37.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-local": "^1.0.0",
"eslint-plugin-no-only-tests": "^3.1.0",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"husky": "^8.0.0",
"jest": "^28.1.1",
"lint-staged": ">=10",
"prettier": "^2.8.6",
"prettier-plugin-organize-imports": "^3.2.2",
"typescript": "^5.0.2"
},
"devDependencies": {
"@microsoft/api-extractor": "^7.35.4",
"@swc/core": "^1.3.55",
"@swc/jest": "^0.2.26",
"@types/glob": "^8.1.0",
"fs-extra": "^11.1.0",
"json5": "^2.2.3",
"lazyrepo": "0.0.0-alpha.27",
"rimraf": "^4.4.0",
"tsx": "^3.12.2",
"vercel": "^28.16.15"
},
"resolutions": {
"@microsoft/api-extractor@^7.35.4": "patch:@microsoft/api-extractor@npm%3A7.35.4#./.yarn/patches/@microsoft-api-extractor-npm-7.35.4-5f4f0357b4.patch"
}
}