tldraw/packages/editor/package.json
Orange Mug 77175a9dc4
Added pHYs to import/export of png images (#1200)
Added the following

 - Always export pngs with a pixel-ratio of `2`
- Added the `pHYs` png metadata chunk describing the pixel ratio so it
opens with the correct size
 - When importing PNGs read the `pHYs` chunk for the sizing info
 
All the exporting is done via just modifying the bytes from the browsers
native image handling.


https://user-images.githubusercontent.com/235915/234309015-19f39f3a-66ce-4ec2-b7d0-b34a07ed346b.mov

I've also added `ANALYZE=true` option to get the build metadata from
esbuild on boot of `yarn dev` which allow me to see the bundle size info
in https://esbuild.github.io/analyze/

![esbuild github
io_analyze_](https://user-images.githubusercontent.com/235915/234310302-c6fe8109-c82d-480a-8c65-c7638b09e71e.png)

You can see that `crc` adds about `4.4kb`

<img width="280" alt="Screenshot 2023-04-25 at 15 33 26"
src="https://user-images.githubusercontent.com/235915/234310669-99e3e787-ddca-4ad2-81cf-b4a541631d62.png">

---------

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2023-04-29 22:10:01 +00:00

113 lines
3 KiB
JSON

{
"name": "@tldraw/editor",
"description": "A tiny little drawing app (editor).",
"version": "2.0.0-alpha.12",
"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"
],
"/* NOTE */": "These `main` and `types` fields are rewritten by the build script. They are not the actual values we publish",
"main": "./src/index.ts",
"types": "./.tsbuild/index.d.ts",
"style": "./editor.css",
"/* GOTCHA */": "files will include ./dist and index.d.ts by default, add any others you want to include in here",
"files": [
"editor.css"
],
"scripts": {
"test": "lazy inherit",
"benchmark": "yarn run -T tsx ./scripts/benchmark.ts",
"test:coverage": "lazy inherit",
"build": "lazy build:package",
"build:package": "yarn run -T tsx ../../scripts/build-package.ts",
"build:api": "yarn run -T tsx ../../scripts/build-api.ts",
"prepack": "yarn run -T tsx ../../scripts/prepack.ts",
"postpack": "../../scripts/postpack.sh",
"pack-tarball": "yarn pack",
"lint": "yarn run -T tsx ../../scripts/lint.ts"
},
"dependencies": {
"@tldraw/primitives": "workspace:*",
"@tldraw/tlschema": "workspace:*",
"@tldraw/tlstore": "workspace:*",
"@tldraw/tlvalidate": "workspace:*",
"@tldraw/utils": "workspace:*",
"@use-gesture/react": "^10.2.24",
"classnames": "^2.3.2",
"crc": "^4.3.2",
"escape-string-regexp": "^5.0.0",
"eventemitter3": "^4.0.7",
"is-plain-object": "^5.0.0",
"lodash.throttle": "^4.1.1",
"lodash.uniq": "^4.5.0",
"nanoid": "^3.0.0"
},
"peerDependencies": {
"react": "^18",
"react-dom": "^18",
"signia": "*",
"signia-react": "*"
},
"devDependencies": {
"@peculiar/webcrypto": "^1.4.0",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^14.0.0",
"@types/benchmark": "^2.1.2",
"@types/crc": "^3.8.0",
"@types/lodash.throttle": "^4.1.7",
"@types/lodash.uniq": "^4.5.7",
"@types/react-test-renderer": "^18.0.0",
"@types/wicg-file-system-access": "^2020.9.5",
"benchmark": "^2.1.4",
"fake-indexeddb": "^4.0.0",
"gzip-size": "^7.0.0",
"jest-canvas-mock": "^2.4.0",
"jest-environment-jsdom": "^29.4.3",
"lazyrepo": "0.0.0-alpha.22",
"react-test-renderer": "^18.2.0",
"resize-observer-polyfill": "^1.5.1"
},
"jest": {
"preset": "config/jest/node",
"testEnvironment": "jsdom",
"fakeTimers": {
"enableGlobally": true
},
"testPathIgnorePatterns": [
"^.+\\.*.css$"
],
"transformIgnorePatterns": [
"node_modules/(?!(nanoid|escape-string-regexp)/)"
],
"moduleNameMapper": {
"^~(.*)": "<rootDir>/src/$1",
"\\.(css|less|scss|sass)$": "identity-obj-proxy"
},
"setupFiles": [
"raf/polyfill",
"<rootDir>/setupTests.js"
],
"setupFilesAfterEnv": [
"../../config/setupJest.ts"
]
}
}