Commit Graph

1553 Commits

Author SHA1 Message Date
Timon 35b812ccfe
Desktop: Fix SVG Preview render mode (#3877)
Desktop: Fix svg preview mode
2026-03-10 12:16:34 +00:00
Kulcode 3a7a5f5953
Fix incorrect transform space for Select tool origin pivot visualization ball (#3850)
Fix
2026-03-10 11:19:44 +00:00
Jatin Bharti b1933e3bcb
Fix node graph export sometimes not sticking to right edge of graph (#3852)
fix : Canvas Label Positioning in Node Graph
2026-03-10 10:42:51 +00:00
Keavon Chambers 2910e50b2f
Improve Shape tool arrow mode interactive drawing with angle modifier keys and endpoint gizmos (#3874)
* Make the order of Shape tool shape types consistent

* Add Arrow shape modifier keys and snapping support

* Add endpoint dragging to arrows

* Show the default cursor when hovering line/arrow endpoints

* Reduce duplicated function

* Fix incorrect coordinate spaces

* Improve endpoint dragging clarity
2026-03-10 03:41:35 -07:00
Ayush Amawate e7a2800665
Fix Shape tool type dropdown not persisting selection and not excluding Line/Rectangle/Ellipse (#3731)
* fix Shape tool dropdown resetting to Polygon when switching tools

* add sync for rectangle/ellipse and line

* fix build issues
2026-03-10 08:25:44 +00:00
Keavon Chambers 9f9dd71e91
Fix vector drawing tool transform space handling (#3872)
* Fix vector drawing tool transform space handling

* Review fixes

* Fix test
2026-03-10 00:58:51 -07:00
Ayush Amawate 20501cac96
Fix Shape tool layer creation to not make the Transform node to appear after the Stroke node (#3854)
Fix shape stroke thickness

remove redundant call

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-03-10 01:41:43 +00:00
Timon 4300a885dc
Fix raster export scale factor (#3870)
* fix export scale factor

* export scale increment step 0.5

* fix svg to raster export on web
2026-03-10 01:23:42 +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 ead914ec2b
Fix regression where Vello doesn't render new document opened after closing all documents (#3849)
* Fix regression where Vello doesn't render new document opened after closing all documents

* Remove last_svg_canvas and do this logic in the frontend
2026-03-05 09:54:31 +00: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 8a75c0c1e1
Add layer locked toggle icon and context menu entry to node graph (#3855)
* Add layer locked toggle icon and context menu entry to node graph

* Simplify logic
2026-03-04 06:30:04 +00:00
Mohan 54a02dedd5
Fix thumbnails not being updated for layers when they become empty (#3624)
* fix: thumbnail render for empty layers

* removed self import

* fix: rename

* Cleanup

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-03-03 06:45:19 +00:00
Keavon Chambers 7cc3097acd
Make the Outline render mode draw with consistent stroke thickness at any viewport zoom (#3848)
* Remove dead code for now-retired SVG implementation

* Implement viewport zoom compensation for thickness
2026-03-02 20:13:05 -08:00
Keavon Chambers a8b5203d6c
Clean up code for drawing overlays to accept sRGB hex codes instead of Color structs (#3839)
* Clean up code for drawing overlays to accept sRGB hex codes instead of Color structs

* Consolidate hex code parsing functions
2026-02-27 14:08:58 -08:00
Keavon Chambers 9ecbfb7110
New nodes: RGBA to Color, HSVA to Color, Hex to Color, and Read Gradient (#3838)
* New nodes: RGBA to Color, HSVA to Color, Hex to Color, and Read Gradient

* Simplify
2026-02-26 18:22:04 -08:00
Keavon Chambers f1cbc4b396
Make the node graph use Table<GradientStops> instead of GradientStops (#3837)
* Switch from GradientStops to Table<GradientStops> in all nodes

* Remove TaggedValue::ColorNotInTable

* Fix bug

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

* Add migrations

* Fix default gradient on empty table

* Update demo artwork

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-02-26 14:07:31 -08:00
Keavon Chambers cde7d5f951
New nodes: Colors to Gradient, Flatten Color, and Flatten Gradient (#3835)
* New nodes: Colors to Gradient, Flatten Color, and Flatten Gradient

* Fix Data panel not showing GradientStops

* Fix wrong category
2026-02-26 03:44:12 -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
Keavon Chambers 8117ddcdb3
Add Gradient tool control bar buttons, Reverse Stops and Reverse Direction (#3830)
* Add Gradient tool control bar buttons, Reverse Stops and Reverse Direction

* Consolidate reused gradient line updating code
2026-02-25 00:48:21 -08:00
Keavon Chambers b4679b0675
Improve Gradient tool dragging behavior and make hints reactive to current interaction state (#3828)
* Improve Gradient tool dragging behavior and make hints reactive to current interaction state

* Reduce code duplication for drawing stops

* Fix coordinate system issue when PTZ'ing document during drag or autopan
2026-02-24 22:17:29 -08:00
Keavon Chambers 4a6cdffd84
Add draggable diamond midpoint gizmos to the Gradient tool (#3826) 2026-02-24 20:25:15 -08:00
Kulcode 3b91d02fff
Add snapping to endpoints and stops in the Gradient tool (#3732)
* snapping

* Cleanup

* fix

* Fix snapping failing sometimes on newly drawn gradient lines

* Code cleanup

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-02-24 04:48:28 +00:00
Keavon Chambers 691d965bcf
Add support for gradients with midpoints and add draggable diamonds to the color picker dialog (#3813)
* Refactor GradientStops to use struct-of-arrays and include midpoint

* Implement interaction and rendering

* Make color picker saturation-value color picking snap to original position and show both axis lines

Make color picker saturation-value color picking snap to original position and show both axis lines

* Add graphite:midpoint attribute to SVG exports

* Add graphite:midpoint parsing to SVG importer
2026-02-23 19:21:51 -08:00
Keavon Chambers 9f2c8713ff
Add the SVG Preview render mode in place of the Vello option in the preferences (#3797)
* Remove Vello from preferences

* Add the Render Mode: SVG Preview radio button

* Remove SVG outline renderer

* Add a tooltip explaination when disabled in unsupported browsers

* Fix Eyedropper tool to support Outline render mode

* Use #[allow(clippy::too_many_arguments)] instead of tuple

* Rerun nodegraph when max render area is changed

---------

Co-authored-by: Dennis Kobert <dennis@kobert.dev>
2026-02-22 20:27:26 +00:00
Timon a2d3b3f410
Desktop: Make shutdown more robust and fix panic caused by invalid viewport scale (#3783)
* Fix panic caused by invalid viewport scale

* Make shutdown more robust
2026-02-22 17:28:35 +00:00
Dennis Kobert 0531769c41
Cache Vello render output as stitchable textures (#3722)
* WIP render caching

* Hook up render cache to render pipeline

* Fixed offsets

* Initial cleanup

* Integrate cache with context invalidation

* Cleanup

* Improve rounding and reduce tile size to fix vello not rendering

* Include pointer position in cache key

* Avoid unwraps and zero sized textures

* Destroy textures after blitting to surface

* Fix context dependencies

* Exclude footprint from render params

* Batch animation frame messages

* Add vello max render size to preference dialogue

* Remove unused import

* Reorder vello preference

* Clean up preferences dialog

* Apply review suggestions

* Cap max render region size

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-02-22 10:12:50 +00:00
Keavon Chambers 7ca6470656
Rename the repeat nodes to replace "Instance" terminology with "Repeat" (#3794)
* WIP

* Move the Mirror node from the module 'vector' to 'graphic'

* Update demo art

* Fix failing tests

Fix tests
2026-02-20 22:10:59 -08:00
Dennis Kobert ba177c4c5d
Generalize the 'Map Vector' node as 'Map' with support for all graphical types (#3793)
* Rename Map Vector to Map

* Fix compilation errors

* Move to the Graphic module and add Read {Graphic, Raster, Color} nodes

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-02-20 21:33:02 +00:00
Keavon Chambers bd1c54907d
Rename nodes from "Instance ___" -> "Read ___" and "Instance Map" -> "Map Vector" (#3792)
* Rename nodes from "Instance ___" -> "Read ___" and "Instance Map" -> "Map Vector"

* Update leftover references and demo artwork

* Simplify logic

* Fix test
2026-02-20 08:52:36 +00:00
Keavon Chambers da278e0264 New node: Map Points
Also resolves #3217
2026-02-19 14:37:35 -08:00
Keavon Chambers 258748ec51
Swap the default placement order of Fill and Stroke nodes in layers (#3789) 2026-02-19 13:15:11 -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
Kulcode b433ddd007
Add button in Properties panel to select the node connected to an exposed parameter (#3720)
* Navigation-Shortcut

* Fix as rec

* cleanup

* Update labels

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-02-18 10:25:02 +00:00
Jatin Bharti e5827f2b81
Fix crash opening File > Export if it previously was set to the bounds of a now-deleted artboard (#3577)
fix : Crash loading export dialogue
2026-02-17 23:24:13 -08:00
Aniket giri f801ed72bb
Clean up DocumentMessageHandler by breaking out several lengthy handlers into helper functions (#3568)
refactor(document): extract large match arms into helper methods

Part of #2740 - Code quality refactors.

This commit addresses the 'Match statements' section of the tracking
issue by extracting three large match arms from process_message() into
dedicated helper methods:

- handle_group_selected_layers: Handles layer grouping in both artboard
  and non-artboard workflows (~50 lines extracted)
- handle_move_selected_layers_to: Handles layer movement with proper
  transform preservation (~85 lines extracted)
- handle_nudge_selected_layers: Handles keyboard nudging with optional
  resize mode (~75 lines extracted)

The main match statement in DocumentMessageHandler is now ~210 lines
shorter and more readable. Logic and behavior remain unchanged.
2026-02-17 22:01:32 +00:00
Timon 3571c0d577
Fix Vello canvas on web not being transparent by using premultiplied alpha mode (#3770)
Fix canvas not being transparent by using Premultiplied alpha mode
2026-02-17 20:48:16 +00:00
Kulcode 2fe0cf7a4c
Fix holding Ctrl in the graph not allowing for selecting nodes unless some are in a layer (#3778)
* Fix

* Fix-2

* Formatting

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-02-17 20:20:57 +00:00
Ashish Mohapatra 723f7b14ea
Respect artboard clipping when computing canvas scrollbars (#3387) 2026-02-17 00:32:33 +00:00
Oliver Davies 20e12edd45
New node: Pack Strips (#3246)
* Added basic pack by bounds node

Apply suggestion from @Keavon

Co-authored-by: Keavon Chambers <keavon@keavon.com>

* Add support for choosing rows/columns strip direction

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-02-16 09:07:03 +00:00
Austin Henlotter 5b92901715
Fix Path tool not displaying its hints during G/R/S modes (#3222)
* Path tool no longer overrides other hints

* Related cleanup

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-02-16 04:23:47 +00:00
Austin Henlotter f186465220
Fix Spline tool aborting after placing only 1 point so it removes the incomplete layer (#3220)
* right click now correctly cancels spline extend

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-02-16 01:01:11 +00:00
Mohd Mohsin b697cc8131
Add line numbers to file paths in the website editor structure docs (#3130)
* added the line number to existing path

* Update JS parser to use line numbers

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-02-15 23:59:27 +00:00
Vatsal Kumar 82f7dc7062
Improve the Shape tool's arrow drawing controls (#3650)
* fixed the arrow's parameters

Signed-off-by: krVatsal <kumarvatsal34@gmail.com>

* shifted the arrow's origin to its tail

Signed-off-by: krVatsal <kumarvatsal34@gmail.com>

* modified arrow shapetype fucntion to be like other shapes

* fixed rust formatting

* Remove misleading part of comment referencing the origin

---------

Signed-off-by: krVatsal <kumarvatsal34@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-02-15 21:35:20 +00:00
Keavon Chambers c574f58ecd Fix debug assert failure from selecting zero-sized objects 2026-02-15 00:01:09 -08:00
Keavon Chambers 8738e59c21
Improve the QR Code node (#3765) 2026-02-14 20:53:29 +00:00
Timon 8b67840f0c Desktop: Fix Eyedropper tool (#3764) 2026-02-14 16:44:52 +00:00
Adam Gerhant 1b1400b989
Fix insertion or creation of layers at top of a stack with multiple top output wires (#3680)
Fix layer insertion
2026-02-13 20:45:36 -08:00
Adam Gerhant 011bd724bc
Fix node shaking not working correctly when connected to graph imports (#3678)
Fix shaking node
2026-02-14 00:49:54 +00:00
Kulcode b5b896f89f
Add SVG import support for gradients with gradientUnits="userSpaceOnUse" (#3741)
* fix

* error corrected

* Cleanup

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-02-13 15:28:17 -08:00
Ayush Amawate 119a554260
Fix the Path tool adding a Path node but not applying the change until a second attempt due to wrong segment IDs (#3727)
* Fix SegmentIds lost when no Path node exists

* fix import order

* Use Arc<Vector> in vector_data for regression
2026-02-13 14:40:38 -08:00
Kulcode e606efd008
Improve the Gradient tool by visualizing color stops (#3698)
* Gradient

* improvement

* removed unnecessary code

* corrected error

* Partical changes

* Improveded

* remove from advertised actions

* Mousedown

* Partial code review

* changes as per recommendation

* corrected error

* corrected error -2

* changes as per recommendation

* error corrected

* changes as suggested

* Bug Fix

* Fix hints

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-02-13 00:25:15 +00:00
0SlowPoke0 ea68d62ec4
Add gizmos for interacting with the Spiral node (#2851)
* made spiral node

* number of turns in decimal and arc-angle implementation

* logarithmic spiral

* unified log and arc spiral into spiral node

* add spiral shape in shape tool

* fix min value and degree unit

* make it compile

* impl turns handle gizmo

* chore : Refactoring PR #2851 for current code base with some fixes

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
Co-authored-by: Annonnymmousss <jatin02012006@gmail.com>
2026-02-12 22:33:40 +00:00
Ayush Amawate cd241095a2
Fix history steps not being given to Line tool endpoint movements (#3739)
start transaction when dragging line endpoints to enable abort
2026-02-12 20:33:19 +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
Jatin Bharti bb6fea95e4
Fix regression preventing the selection of other pivot modes (#3751)
fix : custom pivot's origin selection not updating
2026-02-12 19:10:49 +00:00
Jatin Bharti a1a9abd6a2
Fix the Gradient tool's linear/radial type toggle resetting the gradient color stops (#3499)
* fix : sync the linear/radial option in menu bar and property panal

* fix : fmt

* Promote vector meshes from experimental by removing it from preferences

* fix : change reverting bug

* chore : refactor

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-02-11 13:49:23 -08:00
Timon 4cdfbb22e8 Desktop: Fix new document offset on first startup (#3738)
Desktop: Fix new document offset
2026-02-11 13:08:17 -08:00
Dennis Kobert 5efa81df85
Store click targets in Arc (#3726) 2026-02-06 12:35:32 +00:00
Timon 9c56c852ca
Desktop: Snap overlays to physical instead of logical pixels (#3493)
WIP
2026-02-04 07:24:16 +00:00
Timon c7e3d01e2b
Improve font loading (#3705)
Fix fonts not loading
2026-02-04 07:23:50 +00:00
Kulcode ba361cdd6a
Add "Exclude Layers" Ctrl modifier when dragging to box select in the node graph (#3665)
* Added Ctrl modifier that filters selection to include only child nodes

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-02-02 14:19:43 -08:00
Jatin Bharti da518857ad
Fix selection jumping back to previously selected node after its drag abort, upon clicking to select a new node (#3696)
* fix : Selection jumps back to previously selected node after its drag abort, upon clicking to select new node

* fix : Selection jumps back to previously selected node after its drag abort via esc key, upon clicking to select new node
2026-01-28 14:36:17 -08:00
Keavon Chambers 390004897b
Add "Loop Level" to the Position context reader node (#3679)
* Add "Loop Level" to the Position context reader node

* Remove InjectPosition
2026-01-28 10:52:39 +00:00
Keavon Chambers 84e9d8c192 Prep for the RC3 release of the desktop app 2026-01-26 17:32:58 -08: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
Keavon Chambers a88342b8da
Add the "Rate" multiplier parameter to the Animation Time node (#3685) 2026-01-26 00:37:15 -08:00
Keavon Chambers 568831bd2f
Fix regression breaking Into/Convert node type coercion (#3681) 2026-01-25 16:26:05 -08:00
Timon 7a5790744f
Add focus document toggle (#3672) 2026-01-23 15:28:02 +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
Keavon Chambers 781fa7ae95
Move contributor docs editor message structure tree generator from test to tools directory (#3663) 2026-01-20 23:53:15 -08:00
Keavon Chambers 7af60e02a3
Add the auto-generated node catalog to the website's user manual (#3662)
* Generate the MVP node catalog in the manual (with some placeholders)

* Implement nearly the rest of everything

* Move to the tools directory and make it generate nicer default values

* Add category descriptions

* Organize file structure and improve type naming

* Improve book table of contents code

* Add collapsing chapter navigation to the book template

* Add to build workflow

* Clean up site structure
2026-01-20 22:52:03 -08:00
Timon 95d3556204
Replace globals with editor environment (#3656)
Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-01-19 17:06:02 +00:00
Timon 07fbcd489c
Desktop: Add fullscreen window mode (#3625) 2026-01-19 16:32:03 +00:00
Keavon Chambers 3b55064f44
Add tooltip documentation to the Text node and tidy up node catalog categorization (#3645)
* Add more node doc comments

* Tidy up node categories
2026-01-16 01:27:56 -08: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
Adam Gerhant c60ddcf875
Fix the Text node's Max Width/Height parameters with OptionalF64 losing the value when unticked (#3643)
* WIP

* Fix widget

* Fix migration

* Remove OptionalF64

* Custom attributes for optional f64 widget

* Code review

* Move comments to another PR

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-01-16 06:13:32 +00: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
Timon 6616d1bfb1
Desktop: Add commit info to binaries build with Nix (#3635) 2026-01-15 10:34:01 +00:00
James Lindsay c46060db44
Add a Select tool overlay for the layer origin (#3471)
* Add blue layer origin cross overlay

* Apply suggestion from @Keavon

* Skip layers without local transforms

* Disable the Custom Pivot by default

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-01-14 01:50:03 -08: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
Vatsal Kumar 4fea2b0fe7
Add an arrow to the Shape tool (#3343)
* add arrow shape feature in editor

Signed-off-by: krVatsal <kumarvatsal34@gmail.com>

* fix the arrow tool to show arrow in viewport space

Signed-off-by: krVatsal <kumarvatsal34@gmail.com>

* fix the direction of arrow and make the new arrow node

Signed-off-by: krVatsal <kumarvatsal34@gmail.com>

* updated arrow tool to hae start and end points

Signed-off-by: krVatsal <kumarvatsal34@gmail.com>

* fixed calculate point bug

Signed-off-by: krVatsal <kumarvatsal34@gmail.com>

* fixed some bugs of arrow positioning

Signed-off-by: krVatsal <kumarvatsal34@gmail.com>

* fixed formatting in whole codebase and added fill to arrow

Signed-off-by: krVatsal <kumarvatsal34@gmail.com>

* fix

---------

Signed-off-by: krVatsal <kumarvatsal34@gmail.com>
Co-authored-by: Timon <me@timon.zip>
2026-01-12 00:58:28 +00:00
Ayush Amawate 5dd11bf138
Ignore out-of-range mouse button values using from_bits_truncate (#3541)
* fix: ignore out-of-range mouse button values using from_bits_truncate

* Apply suggestion from @TrueDoctor

* Fix formatting

---------

Co-authored-by: Dennis Kobert <dennis@kobert.dev>
2026-01-11 22:31:15 +00:00
Ayush Amawate 33e3a88458
Fix joining paths from different layers with Ctrl+J fails (#3534)
* fix: handle PointId remapping when joining paths from different layers

When using Ctrl+J to join two points from different layers, the operation
failed because PointIds change during merge due to collision resolution.

The fix uses index-based point tracking instead of PointIds:
1. Before merge: Record the index of each selected point in its layer
2. Calculate post-merge indices using the point offset from layer1
3. After merge: Retrieve the actual PointIds at those indices
4. Create the connecting segment using the resolved PointIds

This works because Vector::concat() preserves point ordering during merge,
so we can use exact index arithmetic to find points after remapping.

Fixes #3519

* fix: use position-based lookup when joining paths from different layers

* fix cmd + g group case

* fix check for grouped folder

* add in the single layer inside a group case

* use ApplyPointDelta instead of creating a dummy segment

* Update editor/src/messages/tool/common_functionality/shape_editor.rs

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

* Update editor/src/messages/tool/common_functionality/shape_editor.rs

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

* encapsulate point connection logic in defer_connect_points_by_position

* reduce tolerance to 1e-6

* remove wrong comments

---------

Co-authored-by: James Lindsay <78500760+0HyperCube@users.noreply.github.com>
2026-01-11 12:56:48 +00:00
Ayush Amawate d98f19bf4a
Add artboard name to the export when exporting a single artboard (#3613)
* add artboard name to the export

* change file name to {docname}-{artboard} for more than 1 arboard

* add switch statement instead of if else
2026-01-11 13:28:19 +01:00
Keavon Chambers 1b91198b28
Fix 'Regular Polygon' and 'Star' shapes incorrectly having cubic handles, not linear (#3606)
Fix shape nodes creating cubic-curved polylines
2026-01-06 20:58:08 -08:00
Ayush Amawate f808e6d37c
Fix freehand tool showing all anchors in overlay (#3585)
Use anchor_endpoints() instead of anchor_points() in path_endpoint_overlays() to only show overlays at true path endpoints, not intermediate points
2026-01-06 20:04:38 +01:00
Ayush Amawate fcf32b3cff
Fix PNG exports being off by 1 pixel (#3582)
use round() instead of as_uvec2() while exporting
2026-01-06 13:50:32 +00:00
Keavon Chambers 02e3293e72 Prep for the RC2 release of the desktop app 2026-01-06 04:38:52 +01:00
Keavon Chambers 2fa958aa79 Remove generics from the user-facing name for the Vector data type 2026-01-01 21:26:02 -08:00
Keavon Chambers fa45efa9e2
New node: Pointer Position (#3535)
* New node: Pointer Position

* Fix test
2025-12-27 16:02:23 -08:00
Jatin Bharti 0b38beb79b
Fix Pen tool anchor point overlays disappearing forever after viewing the node graph (#3523)
* Promote vector meshes from experimental by removing it from preferences

* fix : pen tool anchor point issue with node graph open/close

* fix : Memory allocation by removing .collct()

* fix : remove the reduntant if condition

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
Co-authored-by: Adesh Gupta <148623820+4adex@users.noreply.github.com>
2025-12-25 05:43:26 -08:00
Keavon Chambers 9f25c50ca1 Prep for the RC1 release of the desktop app 2025-12-24 22:45:08 -08:00
Keavon Chambers 63217feac6 Organize the categories of widget component props 2025-12-23 21:23:13 -08:00
Keavon Chambers 2f880fa035 Fix missing artboard layer icon 2025-12-23 14:43:13 -08:00
Keavon Chambers 9d26c040e9
Box the `widget: Widget` field of `WidgetInstance` (#3506)
Box the `pub widget: Box<Widget>` field of `WidgetInstance`
2025-12-22 04:18:33 -08:00
Keavon Chambers 64ed21f694 Clean up code with better naming 2025-12-21 23:35:00 -08:00
Keavon Chambers 123108c813 Promote vector meshes from experimental by removing it from preferences 2025-12-21 19:33:42 -08:00
Jatin Bharti d16fd46399
Fix disabled state of Layer > Make Path Editable menu action getting out of sync (#3497)
* fix : sync the make path editable option

* fix : control the call with state

* fix : fix the call

* fix : redundancy

* fix : fmt
2025-12-20 17:06:34 -08:00
Keavon Chambers 0a5e65bc9d Fix the Brush tool being accessible while disabled in preferences 2025-12-20 03:48:41 -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 2c21e1a90b Desktop: Clean up the UI scale setting in the Preferences dialog 2025-12-20 00:20:50 -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
Adam Gerhant 6733a24e47
Use more specific node input indexing when displaying invalid input errors (#3415)
* Reduce displayed invalid inputs

* Correct error offset for convert node

* Apply suggestions from code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-12-18 10:48:25 +00:00
Timon b97978e91d
Fix regression where Ctrl+X is copying not cutting (#3486)
fix nodegraph cut regression
2025-12-18 00:40:54 -08:00
Timon b4fc3d0580
Desktop: Fix pivot and axis constraint overlays (#3463)
* fix pivot gizmo native dowel_pin overlay

* fix native snapping overlay
2025-12-15 14:53:43 +00: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 d6c06da878
Move the MenuBarMessage up from within PortfolioMessage to the root Message (#3459)
Move the MenuBarMessage up from within PortfolioMessage
2025-12-08 20:49:35 -08:00
Dennis Kobert 532dc30028
Fix checkboxes by using deterministic widget IDs instead of random ones to make the diffing easier (#3457)
* Move diffing to trait

* Add deterministic widget ids

* Cleanup
2025-12-08 12:30:29 +00:00
Keavon Chambers 90c91db550 Disable the Brush tool by default and add it to preferences under experimental 2025-12-08 04:02:50 -08:00
Adam Gerhant bba771bd08
Add mitigation for inability to connect graph import directly to export by auto-inserting a Passthrough node (#3449)
insert passthrough
2025-12-07 19:19:55 +00:00
Adam Gerhant 9fc98cf03f
Desktop: Remove web_sys text measuring to fix node graph layer widths (#3455)
* Remove web_sys text measuring

* Improve export

* Fix top of layer stack
2025-12-07 12:11:42 +00:00
Adam Gerhant 3926337b44
Fix traversal when deleting nodes (#3358)
* Fix deletion

* Fix traversal over primary
2025-12-07 03:41:23 -08:00
Keavon Chambers fb0fab0622 Update links from graphite.rs to graphite.art 2025-12-06 18:10:27 -08:00
Timon 2e4481880e
Desktop: Fix missing resize events causing all-gray window on Mac after launch (#3445)
* okayish solution

should be improved at some point but for now it works well enough.

* do leftover renames

* better solution

* less weird resize frames

* move surface reconfiguration

* fix recent desktop mac breakages

* better looking resize on mac

* fix background color

* Fix blank screen on window initialization

* cleanup

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-12-06 23:11:47 +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 74d9c911bd Fix ShortcutLabel drawing of consecutive key labels 2025-12-04 22:04:37 -08:00
Yuxiang Huang 8ca546c164
Fix using Esc to abort box selection and wire dragging causing the graph to close (#3409)
* Implement proper node graph interaction aborting when pressing Escape

* Fixes

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-12-05 01:42:00 +00: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 783ea0b437
Unwrap the Layout enum to replace it with the WidgetLayout struct now called Layout (#3448) 2025-12-04 15:24:40 -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 4581689d9c Rename WidgetHolder to WidgetInstance 2025-12-04 01:10:22 -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 6ed42d06bb
Fix horizontal scrolling on Mac when holding Shift (#3446) 2025-12-03 20:06:00 -08:00
Timon 39b5229df7
Desktop: Limit application to a single instance (#3441)
* only allow single instance

* more reliable CEF cache cleanup

* some cleanup

* fix lock file location

* add simple signal handling

* fix skew handles on desktop

* mac remove unused helpers
2025-12-03 19:13:15 +01: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 3fd0460d03
Desktop: Update CEF to 142 (#3431)
* update CEF to 142

* fix win

* fixup

* post merge fix

* use getter instead
2025-11-30 23:23:31 +00:00
Keavon Chambers e8ebcc2c21
Replace text-only tooltips with custom richly styled tooltips (#3436)
* Replace the title attribute with custom FloatingMenu tooltips

* Separate tooltip labels and descriptions into two styled blocks

* Move keyboard shortcut tooltips to a separate section at the bottom

* Update shortcut key styling in tooltips and hints bar

* Fix .to_string()
2025-11-30 13:32:58 -08: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
Keavon Chambers 221c2e9b47 Update the user manual's most outdated parts and improve its table styling 2025-11-28 03:00:32 -08:00
James Lindsay 8383a3afac
New node: 'Extrude' (#3414)
* Add extrude node

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-11-26 18:50:10 -08:00
Keavon Chambers 9eb8835bd5
Add the 'Blend Shapes' and 'Origins to Polyline' nodes; generalize the 'Morph' node to >2 states (#3405)
* New nodes: 'Morph' and 'Multi-Morph'

* Blend Shapes node

* Add the 'Index Points' node

* Fix failing test
2025-11-25 22:17:55 -08:00
Keavon Chambers eb0f019b15
New nodes: 'Reset Transform', 'Replace Transform', 'Count Points', 'Index Points' (#3420)
- Add the 'Reset Transform' and 'Replace Transform' nodes
- Add the 'Count Points' and 'Index Points' nodes
- Make the 'Index Elements' node support negative indexing from the end
- Make the 'Flatten Vector' node's implementation reusable
- Fix crash displaying 0x0 raster image in the Data panel
- Fix the 'Points to Polyline' node not working on two-point objects
2025-11-25 20:41:59 -08:00
James Lindsay 117ce301b0
Fix regressions with G/R/S (#3355)
* Better local grab

* Formatting

* Multiply by document_to_viewport.matrix2.y_axis.length()

* Fix logic errors

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-11-25 15:26:19 -08:00
Dennis Kobert a932eaedcf
Render artwork at correct resolution when using vello on wasm (#3416)
* Work on fixing rendering for wasm+vello

* Render vello canvas in wasm at the correct resolution

* Cleanup unused surface rendering code

* Remove vector to raster conversion

* Remove desktop changes

* Revert window.rs changes

* Don't round logical coordinates

* Fix desktop compilation + don't round logical coordinates for svg rendering

* Further cleanup

* Compute logical size from acutal physical sizes
2025-11-24 14:23:27 +00:00
Keavon Chambers 6e66c79392
Fix 'Mask' node missing Properties widget; fix crash with 'Brightness/Contrast Classic' node (#3404)
* Fix 'Mask' node missing Properties widget; fix crash with 'Brightness/Contrast Classic' node

Also clean up dead code and improve tooltip for the "-" Properties panel widget fallback.

* format type

---------

Co-authored-by: Adam <adamgerhant@gmail.com>
2025-11-24 09:21:07 +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
Adam Gerhant 06484ef4e0
Show red connectors on a type-erroring node and accurate connector colors upstream of it (#3110)
* Refactor TypeSource

* Add complete valid types

* Add invalid type

* Improve valid/complete types and disconnecting

* Code review

* Return types on error

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-11-19 03:00:32 +00:00
Dennis Kobert 57b0b9c7ed
Restructure node crates (#3384)
* Restructure node-graph folder

* Fix wasm compilation

* Move node definitions out of *-types crates

* Cleanup

* Fix warnings

* Fix warnings

* Start adding migrations

* Add migrations and move memo nodes to gcore

* Move nodes/gsvg-render -> rendering

* Replace some hard coded identifiers and fix automatic conversion

* Fix Vec2Value node migration

* Fix formatting

* Add more migrations

* Cleanup features

* Fix core_types::raster import

* Update demo artwork (to make profile ci work)

* Move *-types to node-graph/libraries folder

* Add missing node migrations

* Migrate more nodes

* Remove impure memo node

* More fixes and remove warning

* Migrate context and add a few missing migrations

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2025-11-18 10:21:54 +00:00
Adam Gerhant 85965c8b6a
Fix export edge distance (#3386) 2025-11-17 17:22:05 +00:00
Timon e751979e5c
Desktop: Mac fix keyboard input (#3371)
* add browser debug port env

* mac use option as alt

* fix cef texture double sRGB conversion by using cef-rs fork with fix

* fix keyboard input on mac

* add missing frontend messages

* fixup

* fix keyboard input mac

* dbg

* re implement keyboard mapping

Co-authored-by: csmoe <csmoe@msn.com>

* Fix double arrow keys

* try fix for non mac

* test

* Revert "test"

This reverts commit c7cde9c597e24ef7270ccc69c93a382939a2ce0f.

* fix mac

* some cleanup

* fix zoom in shortcut on mac introduced in #3377

* disable menu shortcut display

* fixup
2025-11-17 11:51:59 +00:00
Dennis Kobert 181c30bc0a
Fix assorted Clippy lints (#3390) 2025-11-17 07:58:31 +00:00
Wade Cheng 94414adaf8
Add selection subtracting to the node graph view (#3290)
Add selection subtracting for node graph
2025-11-14 20:09:43 +00:00
Timon 3871b6c4cf
Fix graph UI culling on-screen nodes (#3380)
* fix

* review fixup
2025-11-13 21:25:27 -08:00
Keavon Chambers ca5785bc8f
Show a "Ctrl +" label instead of "Ctrl =" for View > Zoom In (#3377) 2025-11-13 17:24:04 -08:00
Keavon Chambers ac74bd9903 Allow the Stroke node to receive "Dash Lengths" values from the node graph 2025-11-12 01:14:17 -08:00
James Lindsay 4e65887b90
Fix the Artboard tool drawing the first artboard on an infinite canvas with layers present (#3356)
Improve creating the first artboard
2025-11-10 13:36:30 -08:00
James Lindsay 7f10a4258e
Fix copying nodes sometimes failing when no OutputConnector exists (#3365)
* Fix copy nodes sometimes failing when no OutputConnector exists

* Add test for copying a node
2025-11-10 20:26:25 +00:00