Commit Graph

118 Commits

Author SHA1 Message Date
Keavon Chambers 60f16d72a5
Refactor IndexedDB document persistence to reuse data structures of desktop persistence (#4020)
* Switch indexedDb document serialized struct from camelCase to snake_case

* Refactor and migrate old indexedDb format to the same shape as desktop persistence

* Avoid duplicate struct definitions in the desktop crate

* Refactor frontend message handling to consolidate auto-save document loading

* Code review

* Review

---------

Co-authored-by: Timon <me@timon.zip>
2026-04-15 02:29:23 -07:00
Timon 661e8bc569
Remove surface and window from ApplicationIo (#3941)
* Remove surface and window from ApplicationIo

* Seperate Wasm and Native ApplicationIo

* Fix warnings

* Fix tests

* Remove redundant PlatformApplicationIo::new_offscreen

* Fixup

* Remove unused From implementaitions for ApplicationIo
2026-04-09 20:12:53 +00:00
Keavon Chambers b100892bfa
Add support for persistent storage of panel layouts, sizes, and active tabs (#4017)
* Add persistence to panel layouts

* Fix and persist the Window > Focus Document mode

* Add a Window > Reset Workspace action

* workspace_layout.json -> workspace_layout.ron

* Fix native app hole punch

* Cleanup review pass
2026-04-08 21:05:58 -07:00
Keavon Chambers 848ff5fd52
Add support for dragging panel tabs docked into other panel tab bars (#4006)
* Add support for dragging panel tabs docked into other panel tab bars

* Fix terminology

* Add Group suffix to PanelGroupId enums variants

* Code review
2026-04-04 06:28:53 -07:00
Timon 4a37ce4576
Desktop: Open file dialogs in the folder containing the document (#3934)
Desktop: Open save file dialogs in document parent folder
2026-03-23 01:36:25 +00:00
Timon 35b812ccfe
Desktop: Fix SVG Preview render mode (#3877)
Desktop: Fix svg preview mode
2026-03-10 12:16:34 +00:00
Keavon Chambers 52d2b38a82 Refactor the TypeScript data flow for full type safety and auto-generation of Rust types (#3865)
* Migrate Specta to Tsify to auto-generate messages.ts, working except colors and widgets

* Adopt the generated FillColor/Color/GradientStops

* Fix widget typing

* Separate WidgetGroup enum variants into wrapper structs

* Small rename

* Simplify widgets further

* Clean up message type references

* Switch type imports to the auto-generated file

* Remove lowercase serde rename

* Fix FillChoice deserialization

* Fix small regression from #3837

* Improve type safety

* Make WidgetSpan type-safe

* More cleanup and type safety

* More type safety

* More type safety

* Get the rest to type-check without errors; improve widget builder macro to have optional icons; improve Svelte 5 configs

* Cargo fmt

* Fix imports

* Update outdated readme info

* Fix lint command rename references

* Fix typos

* One more typos fix

* Remove unnecessary dep: prefix from the edited Cargo.toml files

* Remove excess parts from Cargo.toml

* Fix compiling on desktop

* Revert "Remove excess parts from Cargo.toml"

This reverts commit 6b711117b3a5d5d8a3ee20f36a43bc74930b7c82.

* Update dev docs with simpler, more accurate instructions
2026-03-09 16:35:04 -07:00
Keavon Chambers 8a1dfb9d8f
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
2026-03-05 01:43:21 -08:00
Keavon Chambers e62771845f
Add an in-viewport color picker to the Gradient tool when double-clicking a color stop (#3834)
* Hide batched blocked debug print messages

* Implement the color picker on double-clicking stops

* Code review
2026-02-25 21:03:12 -08:00
Timon 3f999bf231
Desktop: Add "Disable UI Acceleration" to preferences (#3774)
* Deskltop: Add Disable UI Accelaration preference

* Fixup

* Fix typo

* Code review and update strings

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-02-19 01:54:01 +00:00
Ayush Amawate 9ae13634d0
Simplify the Layers panel tree structure Rust -> JS encoding (#3744)
* replace custom layer structure encoding with simple JSON tree

* add leftover files

* Renames

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-02-12 20:06:58 +00:00
Timon 5fd1a24f16
Desktop: Add Eyedropper tool support with native Vello (#3684)
* mostly done

* fix

* kinda works but tilt and flip broken

* fix footprint

Co-authored-by: James Lindsay <78500760+0HyperCube@users.noreply.github.com>

* Code review

* fix cursor hiding

* Remove console.log

---------

Co-authored-by: James Lindsay <78500760+0HyperCube@users.noreply.github.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-01-27 01:24:09 +00:00
Timon 2be7790d4d
Improve UX of importing vs. opening files (#3661)
* wip

* fix drag and drop

* fix

* fix tests

* fix tests

* fix warning

* Partial code review

* add dialog

* fix web

* fix web

* push back release candidate expiry

* Code review

* Reduce code duplication for pasting files in frontend

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-01-22 01:37:49 -08:00
Timon 07fbcd489c
Desktop: Add fullscreen window mode (#3625) 2026-01-19 16:32:03 +00:00
Adam Gerhant c13647aef4
Fix regression where tooltip node descriptions in the graph stopped showing (#3639)
* Fix tooltips

* Convert DefinitionIdentifier to string in JavaScript

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-01-15 23:30:16 -08:00
Timon 73682b482b
Desktop: Implement pointer lock for NumberInput (#3638)
* Desktop: Implement pointer lock for NumberInput

* add shift and ctrl modifiers

* fixup
2026-01-15 11:27:31 +00:00
Adam Gerhant a6052c5819
Replace node definition string-based lookups with DefinitionIdentifier instances (#3451)
* create definition identifier and integrate it

* Bug fixes and code review

* formatting

* Fix migrations

* Fix remove handles migration

* formatting

* Fix test

* Fix tests 2

* fix deserialization

* Code review

* Small fixes

* Consolidate 'Morph' node migrations

* Add old SamplePointsNode name to migrations list

* Fix tests

* Unrelated small fix

* Fix migration crashes

* Fix tests

* Final code review

* fmt

* Add metadata

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-01-12 23:09:43 -08:00
Keavon Chambers 9f25c50ca1 Prep for the RC1 release of the desktop app 2025-12-24 22:45:08 -08:00
Keavon Chambers f1e8ebefc5
Improve tooltip docs with Markdown styling and refined math node explanations (#3488) 2025-12-20 01:05:15 -08:00
Keavon Chambers 2d6d054359
Make font selection show a live preview on hover; move its code to the backend (#3487)
* Remove FontInput.svelte

* Move font picking to the backend

* Fix Text tool font choice style turning to "-" on font that doesn't support previous style
2025-12-19 22:17:28 -08:00
Timon 820865389c
Desktop: UI scale preference (#3475)
* ui scale preference

* cleanup

* add update ui scale message to SIDE_EFFECT_FREE_MESSAGES

* fix mac title bar height

* hide UI preference section on web

* set % as unit of ui scale
2025-12-15 14:11:43 +00:00
Timon 7532bd7260
Desktop: Hide menu bar in fullscreen mode on Mac (#3464)
hide menu bar in fullscreen mode on mac
2025-12-12 13:09:31 +00:00
Timon 6d852f11af
Desktop: Text clipboard support (#3461)
* gray background for viewport texture

* cust copy paste support

* connect clipboard read on web

* fix eyedropper bounds

* cleanup

* add missing char events for some named keys like enter
2025-12-12 00:16:35 +00:00
Keavon Chambers 5b472a64b2 Remove the "coming soon" dialog and hide not-yet-ready features/tools 2025-12-05 04:17:44 -08:00
Keavon Chambers 2ee8e56cef Fix sending platform-specific shortcut keys to frontend before editor is initialized with the platform set 2025-12-04 15:35:30 -08:00
Keavon Chambers 3c4ad8b720 Refactor the WidgetLayout struct to remove SubLayout and avoid sending LayoutTarget to frontend 2025-12-04 02:44:54 -08:00
Keavon Chambers 810ce40e9b
Restyle and refactor shortcut labels to send hints bar and welcome screen layouts from Rust (#3447)
* Restyle UserInputLabel and refactor its usages to have all input its data sent from Rust

* Replace the welcome screen quick buttons with ones sent by backend

* Add the ShortcutLabel widget to the backend

* Replace hints bar with a backend-controlled layout; show mouse icons in place of mouse labels
2025-12-04 01:04:14 -08:00
Keavon Chambers 600fb5c28f
Refactor the old menu bar plumbing to use standard TextButtons (#3444)
* Refactor the old menu bar plumbing to use standard TextButtons

* WIP: Fix Mac native menu bar

* WIP: fix desktop menu bar mac

* Refactor menu bar definitions to use the builder pattern

* WIP: fixup desktop

* cleanup

* fix linux

* Remove dead code that was failing to lint

---------

Co-authored-by: Timon Schelling <me@timon.zip>
2025-12-03 12:41:54 +00:00
Timon bb4516e377
Desktop: Add app menu for Mac (#3428)
* add mac app menu

* review fixup

* Remove "About Graphite" ellipsis, add "Show All", make it say "Quit Graphite"

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-11-28 23:42:14 +00:00
Adam Gerhant 7afbeaa1f9
Separate graph error diagnostics from frontend node metadata (#3385)
* Separate error popup from node

* Improve context menu data

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-11-24 08:55:30 +00:00
Timon 881ec0b193
Split out viewport handling into its own message handler (#3331)
* extract viewport handeling

* fix web overlays

* some cleanup

* remove some physical conversions

* fix resize snapping

* fixup

* apply some review feedback

* make viewport api more ergonomic

* fix

* fix web overlay canvas clear size

* clear workaround for canvas

* rename trigger message

---------

Co-authored-by: Dennis Kobert <dennis@kobert.dev>
2025-11-08 08:59:38 +00:00
Mateo 497758c273
Desktop: Add simple cli interface (#3059)
* Open document from cli and add some files to .gitignore

* Revert .gitignore

* Revert .gitignore

* Implement cli properly

* Add ui-accelerated-painting option

* Format code

* Revert changes in .vscode folder

* Don't use global variables for cli

* Apply suggested changes

* Make ready for merge

* Improve names

* remove comment

---------

Co-authored-by: Timon <me@timon.zip>
2025-10-13 21:09:40 +00:00
Timon 46d5928724
Desktop: Fix window maximize and minimize (#3200)
Fix window maximize and minimize state
2025-09-20 23:48:47 +00:00
Timon 944a6eeea2
Desktop: Hook up native window controls (#3161)
* Implement window controls

* Fix drag target size

* Maximize with drag area double click
2025-09-13 20:15:52 +00:00
Timon 083dfa5f49
Clean up autosave persistence (#3115)
* Set auto save state to false on document rename

* Update open document list on transaction commit and aboard

* Use current network to compute hash

Was using the last element in undo
Before artworks where not auto saved when the had no undo history

* Refactor persistence
2025-09-02 13:27:38 +00:00
Adam Gerhant f1a1275601
Add support for adding/removing a graph's primary imports/exports separately from the secondary (#3089)
* Primary Import/Export

* Primary Import/Export

* Complete import exports

* Final changes

* Improve line width

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-08-29 20:57:15 +00:00
Timon c5991c6f61
Desktop: show platform specific window buttons (#3078)
Implement app window button functionality and set platform
2025-08-25 14:15:31 +00:00
Keavon Chambers 0e467907e2
Improve font import; replace Inconsolata with Source Code Pro; show third-party licenses in editor dialog (#3079)
* Improve font import; replace Inconsolata with Source Code Pro; show third-party licenses in editor dialog

* Code review
2025-08-21 11:57:04 -07:00
Mohd Mohsin 17d70dc60e
Add struct field visualization to the editor message hierarchy tree visualization on the website (#2917)
* Fix Message Tree: Enforce Structure and Visibility

* Code review

* fix the erroreous ouputs

* error handling for MessageHandler

* Fix website visualization HTML generation

* error handling for tuple-style message enum variant

* cleanup

* Update messages

* Normalize BroadcastEvent

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-08-18 21:04:29 -07:00
Keavon Chambers 2bb4509647
Replace the Spreadsheet panel with an improved Data panel (#3037)
* Improve the table data panel

* Add the "Window" menu bar section and polish everything
2025-08-10 07:46:42 -07:00
Timon 96a1b12a05
Desktop: Unify save file handling and add file dialog for export (#3008)
* Prepare save file unification

* Desktop add save file dialog
2025-08-06 16:07:53 +00:00
Timon 7cb42b9523
Desktop: Add native file dialogs (#2939)
* Add native open file dialog

* Add native save file dialog

* Fix integer underflow in defer message handler

* Update nix flake

* Cleanup

---------

Co-authored-by: Dennis Kobert <dennis@kobert.dev>
2025-08-04 13:58:33 +00:00
Timon 67123f55dc
Use target family insted of target arch (#2975)
* Replace cfg target_arch wasm32 with target_family wasm

* Fix warnings in test builds from previous pr
2025-08-03 10:28:53 +00:00
Timon 34a8b9b6f1
Desktop: Render overlays with vello (#2965)
* Render overlays with vello

* Fix nix flake comments

* Rendering refactor with better names and code location

* Remove unnecessary overlay renders

* Post rebase fix
2025-08-02 14:27:24 +00:00
Dennis Kobert 35ab266bbb
Add handler for deferred execution of messages (#2951)
* Add Handler for defered execution of messages

* Cleanup

* Track graph execution id to associate messages with their corresponding execution id

* Rename ViewportReady -> NavigationReady

* Defer layer deselection
2025-07-29 01:57:11 +02:00
Keavon Chambers 66cd7a3b76
Desktop: Add the transparent viewport hole punch and hook up window button plumbing (#2949) 2025-07-28 02:13:32 -07:00
Salman Abuhaimed 85021fd9e0
Add text alignment to the Text node (#2920)
* Add text alignment to Text node

* Lots of renames and improvements

* Add text alignment to the Text tool

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-07-25 22:04:12 -07:00
mTvare 72f1047a27
Display images in the SVG viewport renderer via canvases instead of base64 PNGs (#2903)
* add: move images as rendered canvases to node_graph_executor

* add: added the frontend message

* fix: bytemuck stuff

* fix: canvas element breaking

* fix: width issues

* fix: remove the old message

* npm: run lint-fix

* fix

* works finally

* fix transforms

* Fix self closing tag

* fix: reuse id

* fix: have it working with repeat instance

* cargo: fmt

* fix

* Avoid "canvas" prefix to IDs

* fix

* fix: vello issue from 6111440

* fix: gpu stuff

* fix: vello bbox

* Code review

---------

Co-authored-by: hypercube <0hypercube@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-07-24 17:14:38 -07:00
Adam Gerhant f57163c795
Port node graph wires to the backend and improve graph UI performance (#2795)
* Improve node graph performance

* Fix wire bugs, add type default for properties.

* Grid aligned wire paths

* remove type source

* node from exposed input

* Refresh wires on preference change

* merge fixes

* Code review

* Fix names

* Code review

* Fix wires on redo/undo

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-07-04 22:53:37 -07:00
Keavon Chambers 1a4d7aa23c Refactor the document upgrading code into a separate migrations file 2025-06-26 18:10:29 -07:00