Refactor messages.ts by removing class-transformer and JS classes (#3858)

* Fix gamma correction with HTML-based editable Text tool text

* Migrate simple, undecorated classes to types

* Remove TupleToVec2 transformation

* Remove @Transform from tooltips

* Cleanup: replace value.toString() with String(value) everywhere

* Convert documentId from string to bigint

* Migrate the rest of the easy @Transform/@Type decorations

* Migrate FillChoice

* Migrate WidgetDiffUpdate

* Migrate WidgetInstance

* Migrate away from classes that extend WidgetProps

* Remove class-transformer and all classes in messages.ts

* Migrate UI layout passing

* Remove dead code

* Remove unnecessary export and readonly prefixes

* Remove HSVA type

* Break out Color, Gradient, and FillChoice functions into a utility-functions file

* Move widget helper functions from messages.ts into a new utility-functions file; restructure type imports

* Reduce internal type defs

* Rename JsMessage to FrontendMessage

* Code review fixes

* Fix other usages

* Tidying up
This commit is contained in:
Keavon Chambers
2026-03-05 01:43:21 -08:00
committed by GitHub
parent f00a15a4c9
commit 8a1dfb9d8f
64 changed files with 1436 additions and 2093 deletions

View File

@@ -32,9 +32,7 @@
},
"//": "NOTE: `source-sans-pro` is never to be upgraded to 3.x because that renders a pixel above its intended position.",
"dependencies": {
"class-transformer": "^0.5.1",
"idb-keyval": "^6.2.2",
"reflect-metadata": "^0.2.2",
"source-code-pro": "2.42.0",
"source-sans-pro": "2.45.0"
},
@@ -53,18 +51,18 @@
"globals": "^17.0.0",
"license-checker-rseidelsohn": "^4.4.2",
"postcss": "^8.5.6",
"prettier-plugin-svelte": "^3.4.1",
"prettier": "^3.8.0",
"prettier-plugin-svelte": "^3.4.1",
"process": "^0.11.10",
"sass": "^1.97.2",
"svelte-preprocess": "^6.0.3",
"svelte": "5.47.1",
"svelte-preprocess": "^6.0.3",
"tar": "^7.5.4",
"ts-node": "^10.9.2",
"typescript-eslint": "^8.53.1",
"typescript": "^5.9.3",
"vite-multiple-assets": "2.2.6",
"vite": "^7.3.1"
"typescript-eslint": "^8.53.1",
"vite": "^7.3.1",
"vite-multiple-assets": "2.2.6"
},
"homepage": "https://graphite.art",
"license": "Apache-2.0",