Commit Graph

1508 Commits

Author SHA1 Message Date
Keavon Chambers 84fb901b5a Add useful attributes to the JSON and Regex nodes (#4069)
* Add useful attributes to the JSON and Regex nodes

* Code review fix
2026-04-28 14:11:34 -07:00
Keavon Chambers b396d17211 Migrate remaining node graph data types from Vec to Table (#4067)
* Move Vec<String> to Table<String>

* Remove old VecDVec2

* Move Vec<u8> to Table<u8>

* Move Vec<f64> to Table<f64>

* Move [f64; 4] to Table<f64>

* Move Vec<NodeId> to Table<NodeId>

* Tidy up the TaggedValue variants

* Move Vec<BrushStroke> to Table<BrushStroke>

* Add missing type implementations

* Fix tests

---------
2026-04-28 13:44:25 -07:00
Keavon Chambers cf150b5cff Make the Data panel able to display data from selected nodes living in subgraphs (#4064)
Enable the Data panel to display data from selected nodes living in subgraphs
2026-04-28 12:55:13 -07:00
Keavon Chambers df8c2125d9 Migrate 'Scatter Points' and 'Boolean Operation' from subgraphs to memoized proto nodes (#4066) 2026-04-28 12:40:03 -07:00
Dennis Kobert e0368435b9 Add the "memoize" attribute to the node macro (#4065)
* Add memoization attribute to node macro

* Fix memoization insertion for networks without conversion nodes
2026-04-28 11:55:38 +00:00
Keavon Chambers 3eba762135 Migrate 'Sample Polylines' from a subgraph to a proto node (#4063) 2026-04-28 04:20:47 -07:00
Keavon Chambers 881784ba66 Make the Data panel show type-driven widgets for attributes (#4062) 2026-04-28 03:52:04 -07:00
Keavon Chambers afc2c9178e Move source_node_id to "editor:layer" and Vector<Upstream> to "editor:merged_layers", backed by a new 'Write Attribute' node (#4061)
* Fix click target propagation with the Rasterize node

* Add the 'Write Attribute' node

* Remove tag_layer in favor of the new Write Attribute node, prune redundant attribute writes

* Replace the Vector<Upstream> type argument with the "editor:merged_layers" attribute
2026-04-28 03:28:31 -07:00
Keavon Chambers 76938eb69a Implement dynamic table attributes to generalize the graphic-specific Table type (#4050)
* Feature-gate serde derives behind cfg_attr in all runtime node graph type crates

* Refactor Table to move its hard-coded fields into an attributes field

* Encapsulate TableRow/TableRowRef/TableRowMut attribute fields behind accessor methods

* Remove TaggedValue::GraphicUnused

* Refactor Table<T> to use dynamic attributes instead fixed names

* Fix code review soundness concerns

* Add todo work

* Replace row-oriented Table<T> API with column-oriented access

* Fix attribute propagation bugs

---------
2026-04-28 03:25:16 -07:00
Dennis Kobert 3d84e63ef9
Migrate usage of the Hash trait for cache invalidation to the dedicated CacheHash trait (#4051)
* WIP start migrating usages of hash for cache invalidadion to dedicated trait

* Finish migrating usages

* Code review

* Add comments clearifying the reasoning for using random ids in the VectorModification cach hash impl

* Fix some remaining hash violations

* Finish migration and fix compilation

* Fix import ordering

* Cleanup

* Fix code review stuff

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-04-27 05:18:47 +00:00
Keavon Chambers c9c76df40c
New nodes: 'Regex Contains', 'Regex Replace', 'Regex Find', 'Regex Find All', and 'Regex Split' (#4045)
* Add a family of 5 regex nodes for string processing

* Fix unstaged change
2026-04-24 00:55:24 -07:00
Keavon Chambers c32c808d5b
New nodes: 'Format JSON', 'Query JSON', and 'Query JSON All', replacing the 'JSON Get' node (#4044)
* New nodes: 'Format JSON', 'Query JSON', and 'Query JSON All', replacing the 'JSON Get' node

* Fix bugs
2026-04-24 00:26:29 -07:00
Keavon Chambers 6c0af72053
Add a family of 14 new string processing nodes (#4010)
* Add new string processing nodes

* Remove the IntegerCount = u32 type alias

* Add the 'Format Number' node

* Add "Up To" parameter to the 'String Pad' node

* Fix 'String Capitalization' behavior

* Add 'Map String' and 'Read String' nodes

* Add separator_escaping to 'String Repeat'

* Add 'Regex Replace'

* Add 'Regex Match' node

* Regex Find and Regex Find All

* Code review

* Add the 'Escape String' node

* Improve implementations

* Move nodes from logic.rs to text/src/lib.rs

* Clean up migrations

* Fix #[{hard, soft}_{min, max}(...)] node macro attribute

* Improve Data panel number and text display

* Add the 'Query JSON' and 'Query JSON All' nodes

* Add the 'Lorem Ipsum' node and Ipsum library

* Add the 14 nodes back in their final state

* Add handling for fixed decimal places in number formatting

* Code review fixes
2026-04-23 22:46:20 -07:00
Keavon Chambers 328c4f272b
New node: 'String Capitalization' (#4043)
* New node: 'String Capitalization'

* Clarify comment
2026-04-23 19:12:00 -07:00
Keavon Chambers a59fed9d1c
Move the "Text" category nodes from gcore/src/logic.rs to text/src/lib.rs (#4042)
Move the String category nodes from gcore/src/logic.rs to text/src/lib.rs
2026-04-23 18:12:28 -07:00
Keavon Chambers f42d12da9e
Improve type handling for ints/floats with the #[hard/soft_min/max(...)] node macro parameter attributes (#4041) 2026-04-23 15:49:30 -07:00
Keavon Chambers fcf9396a71
Improve the Data panel's data display with monospaced text and copyable number values (#4040)
* Improve the Data panel's data display with monospaced text and copyable number values

* Revert attempted fix for dropdown menus appearing lower in scrolled Properties panel, since it makes other floating menus freeze the app

* Code review
2026-04-23 15:32:18 -07:00
Keavon Chambers d3f36a95cf
Rename 'Image Value' node to 'Image' and have its input value be an image not a raster table (#4037)
* Rename 'Image Value' node to 'Image' and have its input value be Image<Color> not Table<Raster<CPU>>

* Add a Properties panel widget labeling "width x height" for images in the Image node

* Add Image<Color> node registry entry for MonitorNode

* Code review
2026-04-22 16:00:03 -07:00
Keavon Chambers c2e1208d82
Add Path node differential edit summary widget, and store imported SVG content in that VectorModification struct (#4036)
* Make paste/import SVG store as the Path node's VectorModification not Table<Vector>

* Add a migration from Table<Vector> to VectorModification for existing documents

* Add a VectorModification widget to visualize change counts

* Refactor VectorModification to compute per-category counts for additions, removals, and modifications
2026-04-22 12:08:53 -07:00
Timon 6c5e3c97f8
Refactor persistence to combine document handling and workspace layout (#4031)
* Unify editor state persistence

* Review

* Fix

* Remove redundant DocumentDetails

* LoadDocumentContent indirection
2026-04-19 09:31:21 +00:00
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
YohYamasaki 79d778a535
Add support for setting the spread method for gradient fills (#3953)
* Add spread method support for gradients

* Add GradientSpreadMethod enum (Pad, Repeat, Reflect) to vector-types

* Add radio buttons to gradient tool and fill properties panel

* Convert spread method when importing SVGs via usvg

* Sync backup gradient input when changing spread method

* Table<GradientStops> rendering is not yet updated for spread method

* Sync gradient tool options with layer's gradient

* Sync gradient_type and spread_method from the selected
  layer's existing gradient to the tool options bar when
  switching to the gradient tool

* Refactor has_gradient_on_selected_layers
  to reuse a new get_gradient_on_selected_layer helper

* Swap Reflect and Repeat order in UI radio buttons

* Fix alignment of the radio buttons in right panel

* Fix the position of the radio buttons in the tool

* Rename SpreadMethod to SetSpreadMethod

* Move default spread method omission logic
2026-04-14 08:09:57 +00:00
Keavon Chambers da45ab2f87
Add a checkered background to transparent artboards and the infinite canvas (#4022)
* Add checkered transparency rendering to infinite canvas and artboards

* Enable artboard clipping by default

* Make new infinite canvas documents begin with a white background layer

* Remove the export dialog's transparency option now that it's redundant

* Make exporting transparent JPGs use white not black

* Code review
2026-04-10 03:21:21 -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 b099e2faca
Add support for interactive panel docking (#4015)
* Add interactive panel docking

* Preserve active tab when a panel group is docked

* Add inter-panel gutter hover color

* Code review fixes

* More code review
2026-04-08 06:09:20 -07:00
Keavon Chambers 39656d4c73
Refactor panel layouts to generalize recursive panel group subdivision splits (#4014)
* Generalize recursive panel group splits

* Code review
2026-04-08 00:44: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
Keavon Chambers 4360359d60
Finalize and unify the design of the 'Morph' and 'Blend' nodes (#3974)
* Fix Morph node transform interpolation and preservation in the table

* Fix click target positions for Morph's nested layers by pre-compensating upstream_data transforms

* Redesign Morph node (v3) with control path input and uniformly spaced progression, and fix Stroke::lerp interpolation weights

* Add migration from Morph node v2 to v3

* Redesign the 'Blend Shapes' node behavior and subgraph definition

* Add the Layer > Blend menu entry to easily set up a blend

* Optimize the Morph node

* Refactor the Morph node to remove the roundtrip through BezPath

* Fine-tune Morph node Bezier order promotion and handle interpolation

* Add the Layer > Morph menu bar entry

* Fix NaN and guard against other potential NaN bugs breaking the editor

* Add InterpolationDistribution parameter to Morph with weighted progression, swap parameter orders, and rename shear to skew

* Add the Reverse parameter to the Morph node

* Update the order of the inputs to Blend Shapes for consistency with Morph

* Make Layer > Morph create the Morph Path control layer

* Fix migrations

* Move 10 to a constant

* Avoid division by 0 in the Blend Shapes node internals

* Rename nodes 'Blend' -> 'Mix' and 'Blend Shapes' to 'Blend'

* Fix a crash encountered while testing

* Final code review

* Make domain push dupe checks debug-only and use push_unchecked in the Morph node

* Pre-allocate for pushes to the vector domains

* Add fast path at t=0

* Inline reserve()

* Set up the control path layer above not below, and starting collapsed

* Review fixes

---------

Co-authored-by: Timon <me@timon.zip>
2026-04-03 20:45:58 -07:00
Keavon Chambers b52bf7b7d4
Add support for reordering document tabs (#3999)
* Add support for reordering document tabs

* Fix tab bar scrolling

* Close tab without activating it on pointerdown
2026-04-03 06:35:52 -07:00
Keavon Chambers 55115d89d5 Fix several cases of errors appearing in the console
One appeared on load (a deprecated meta tag). One appeared when adding an Identity (Passthrough) node. One appeared when exposing the the Weight parameter of the Stroke node. This also fixes the intended behavior of the bisect script, which was involved when finding the prevenance of these errors.
2026-04-03 03:20:04 -07:00
Keavon Chambers 87bd3d41df Make Alt+click on a handle in the Path tool split it from its colinear pair 2026-04-01 23:04:56 -07:00
Keavon Chambers 1543d974ac
Fix 'Jitter Points' and 'Sample Polylines' working incorrectly with X or Y scale of 0 content (#3984)
* Fix NaN points produced by Sample Polylines on 0-scaled input

* Fix Jitter Points inverse transform for zero-scale axes and stop resetting stroke transform

* Remove a couple confusing Debug nodes

* Fix edge case

* Update demo art

* Fix order change in Jitter Points causing different results from earlier

* Fix bug in bisect tool

* Break out functionality into helper functions
2026-04-01 22:51:48 -07:00
Keavon Chambers 211b9113a1
Add the "Along Normals" parameter to the 'Jitter Points' node (#3983)
* Add the "Along Normals" parameter to the 'Jitter Points' node

* Fix the edge case of a self-loops
2026-04-01 05:18:56 -07:00
Keavon Chambers d41883a942
Add Layers panel support for displaying multiple groups with instances of the same children layers (#3982)
* Add Layers panel support for displaying multiple groups with instances of the same children layers

* Fix insert folder box drawing
2026-04-01 00:13:42 -07:00
Keavon Chambers a3ea6ab0af
Refactor transform decomposition API with skew support, add 'Decompose Skew' node, and fix stroke transform interpolation (#3973)
* Refactor transform decomposition API with skew support, add Decompose Skew node, and fix stroke transform interpolation

* Fix bug in master with skew changing Area node calculated value

* Code review simplification

* More code review fixes

* Rename cases where "shear" terminology was used in place of "skew"
2026-03-28 20:47:32 -07:00
Keavon Chambers 6388a32ac5
Fix an assortment of small bugs (#3968)
* Fix an assertion failure bug when scaling a line in the transform cage

* Fix missing defaults on node gradient inputs

* Fix Blend Shapes path input wire not updating to show in the UI after Layer > Blend

* Fix assertion failure due to browser non-monotonic timestamp

* Fix SVG renderer drawing 1px strokes as half-width when using stroke alignment

* Fix incorrect appearance of the ColorInput widget when set to "none" and "disabled"

* Fix lerp function in Fill enum to handle None cases correctly

* Fix stroke alignment bug
2026-03-28 17:12:13 -07:00
Keavon Chambers 11b7af61ef
Fix image and SVG import transform bugs (#3942)
* Fix half-pixel offset on imported images

* Break out reused function

* Fix SVG/image open flow placing content with unnecessary Transform nodes

* Fix redundant Transform nodes when opening SVG/image files as documents

* Offset the parent to its destination position not the child objects

* Fix SVG/image File > Open artboard dimensions, origin, and clipping

* Fix the SVG to drag in at the mouse position relative to its visible center

* Fix importing images into offset artboards so they don't get offset as well

* Code review
2026-03-23 16:26:10 -07:00
Keavon Chambers a10092c10c
Fix abysmal O(n^2) SVG import performance (#3938)
* Remove O(n^2) import by disabling bumping

* Add an import mode to avoid acyclic checks

* Rebuild the layer tree at the end, not after each step

* Incrementally update outward wires instead of repeatedly rebuilding them

* Add import->export direct connection guard

* Code review fixes

* Replace magic number offsets with consts

* Add consts for magic numbers

* Improve code structuring
2026-03-22 23:33:58 -07:00
Timon 9727e14fe9 Add the re-labeled node display name to its Properties panel section header (#3930)
* Show nodes display name in properties panel if set

* Review
2026-03-22 20:20:32 -07:00
Timon 9a23b9908e
Add missing 'Copy to Points' migration (#3922)
Add Copy to Points migration
2026-03-23 01:48:39 +00: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 5b1e1cb2fb
Fix artboards not exporting with transparency using Vello (#3921)
* Fix hide artboard for raster render mode

* Desktop: Fix transparent viewport blending

* Fix vello render using wrong color space conversion for background

* Review
2026-03-23 01:20:54 +00:00
Jatin Bharti bf486b4cb5 Fix bug where nodes (like Text) with a non-visible primary input would gain a primary input when shaken (#3899)
* fix: Shaking a Text layer breaks its type signature

* Add a second fix for the same issue

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-03-22 00:11:19 -07:00
Keavon Chambers d5d10fe548
Rename /frontend/wasm -> /frontend/wrapper (#3927) 2026-03-21 03:46:47 -07:00
Keavon Chambers 087b4cd71f
Rename EditorHandle -> EditorWrapper and organize editor_api.rs (#3925)
* Rename EditorHandle -> EditorWrapper and organize editor_api.rs

* pub -> pub(crate)
2026-03-21 03:27:57 -07:00
Keavon Chambers 2e2c4fe180
Restructure frontend TS files so managers/stores export destructors instead of returning them from their constructors (#3919)
* Replace parameter passing with getContext and extract destroy functions to module-level exports

* Resend layouts from Rust when editor is re-mounted on HMR

* Code review
2026-03-19 18:25:34 -07:00
Timon 2e842cb425
Desktop: fix Mac restart dialog to show all changes to preferences requiring restart (#3903)
* Desktop: Fix restart dialog on Mac

* Fix

* Fix

* Fix

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-03-19 02:51:26 +00:00
Keavon Chambers a3f88b0f96 Prep for the RC4 release of the desktop app 2026-03-11 14:53:47 -07:00
Timon a18b7ff79d
Desktop: Add an 'Enable V-Sync' preference on Mac (#3887)
* add vsync pref

* account for physical scale in pixel preview passthru check

* change allow to expect attr

* Update user-facing v-sync text

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-03-11 21:32:37 +00:00