Commit Graph

50 Commits

Author SHA1 Message Date
Keavon Chambers
a41b362fe2 Adopt the cascading "appearance" attribute in place of Vector::stroke and the "fill"/"paint" attributes (#4433)
Reimplemented on the record model in place of upstream d117c3eace.

Co-authored-by: Dennis Kobert <dennis@kobert.dev>
2026-09-15 14:49:57 +02:00
Keavon Chambers
d7f35259c9 Make the 'Boolean Operation' node ignore raster, color, and gradient content (#4430)
Stop the Boolean Operation flattener fabricating operands from non-path content
2026-09-15 14:40:39 +02:00
Keavon Chambers
b9a8065eb8 Rename gradient type to gradient form (#4405)
* Rename gradient type to gradient form

* Update the demo art for the gradient form rename

* Say form not type in the Gradient Form node's doc comment
2026-09-15 14:39:04 +02:00
Keavon Chambers
d5e31c23bb Rename spread method to gradient spread so it matches the other gradient attribute names (#4404)
* Rename spread method to gradient spread so it matches the other gradient attribute names

* Keep the legacy gradient struct's spread method field name matching its on-disk key
2026-09-15 14:38:59 +02:00
Keavon Chambers
8e233d3229 Add Graphic::None and store paint choices as plain color, gradient, and no-paint values 2026-09-15 14:35:04 +02:00
Keavon Chambers
9dd1e2bdf9 Rename GradientStops to Gradient and the legacy Gradient/Fill structs to LegacyGradient/LegacyFill 2026-09-15 14:34:59 +02:00
Dennis Kobert
8918c43b08 Carry the boolean operation kernels through lane 0 map_element 2026-09-15 14:34:40 +02:00
Dennis Kobert
9f0e0ebc96 Clear the remaining clippy warnings on the diff surface 2026-09-06 16:25:17 +00:00
Dennis Kobert
9d3abe385f Sweep the data-flow wire and edge wording to input and source 2026-09-06 15:14:55 +00:00
Dennis Kobert
38d479bdfa Key the paint list park sites so a group-free paint moves 2026-09-05 13:12:17 +00:00
Dennis Kobert
a955d6b458 Run cargo fmt 2026-08-29 18:40:02 +00:00
Dennis Kobert
e5b910f840 Adopt serving lifetimes and the safe record surfaces in the node crates 2026-08-28 13:30:06 +00:00
Dennis Kobert
d814b610da Migrate test sources and assertions onto the safe record builders 2026-08-27 21:17:31 +00:00
Dennis Kobert
e8aea0728a Build native groups at the legacy conversion seams 2026-08-27 20:22:24 +00:00
Dennis Kobert
ba84e2a968 De-table the graphic leaf variants 2026-08-27 18:55:32 +00:00
Dennis Kobert
048a4c4b70 Flatten boolean content natively 2026-08-27 15:45:36 +00:00
Dennis Kobert
54c140e4f3 Walk groups natively with lane paint threaded down 2026-08-26 19:43:32 +00:00
Dennis Kobert
d9533de9ea Look up paint through the paint markers instead of string keys 2026-08-26 17:47:38 +00:00
Dennis Kobert
2c84bb478f Derive pushed index levels per input and pop them when lifting requirements 2026-08-24 17:06:07 +00:00
Dennis Kobert
d70eae205d Quiet the clippy type-complexity and closure lints on the record kernels 2026-08-24 11:07:14 +00:00
Dennis Kobert
ed6922d7eb Read the layer path in its owned form and retarget the introspection tests 2026-08-24 10:26:24 +00:00
Dennis Kobert
8c67ad508f Restore pre-flip color parity: rng replay, typed wrap, boolean marker paints 2026-08-24 00:43:44 +00:00
Dennis Kobert
e9a18a6437 Emit boolean results as elements with parked attributes 2026-08-22 17:29:51 +00:00
Dennis Kobert
98dabd7ff5 Materialize the boolean operation's content level 2026-08-22 14:36:42 +00:00
Dennis Kobert
e4adf16eba Move the paint and merged-layer markers to graphic-types as optional references 2026-08-22 10:23:02 +00:00
Dennis Kobert
a8d257e7d6 Move the downstream-typed attribute markers to their value types' crates 2026-08-22 09:34:24 +00:00
Dennis Kobert
b5c4aa4598 Add the group variant to Graphic with typed run walks 2026-08-21 19:34:03 +00:00
Dennis Kobert
81a319430b Cut over to the graphene execution model 2026-07-31 23:19:42 +02:00
YohYamasaki
6a54dcb5da Remove the legacy Fill, Gradient, and PathStyle types now that paints live in attributes (#4297)
* Remove `Stroke.color`

* Remove legacy Gradient struct usage

* Fix gradient tool tests

* Remove `Fill` enum

* Fix direction of `gradient_orientation_rightward`

* Remove `Gradient` struct

* Remove `PathStyle` struct

* Fix old `VectorData` migration

* Refactor

- Remove unnecessary wrapper functions
- Use `as_ref` instead of `clone` for stroke if possible
- Comment cleanup

* Clean up stale style comments and bindings left by the paint attribute migration

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-07-04 23:08:06 -07:00
YohYamasaki
9f9899cfd0 Refactor the 'Fill' and 'Stroke' nodes to set "fill" and "stroke" attributes for paints (#4257)
* Allow using any graphics type for fill

* Adapt gradient/fill property panels and tools to handle List<T>

* Make the initial gradient transform covers the target's bounding box

* Introduce AnyGraphicListDyn to avoid combinatorial explosion

* Allow using any graphics type for stroke paint

* Add FIll node migration

* Add `for_each_vector_list_mut` instead of `set_paint_attribute`

* Adapt paint flow to read and write attributes instead of legacy Fill/Stroke.color

* Fix responsibilities of paint related node input setters

* Fix Morph by storing List<Graphic> for attributes rather than the concrete types

Store fill/stroke paints as List<Graphic> so Color/Gradient transitions
do not hit set_attribute_value_dyn's type-mismatch fallback to default paint.

* Preserve paint attributes in vector editing ops

* Enhance the clarity between direct and chained fill gradients

* Update demo arts

* Consolidate Fill node gradient appearance inputs

* Fix after the cubic review

* Revert "Consolidate Fill node gradient appearance inputs"

This reverts commit 9622feb20196e2c4da99e98ca95dcc2e34c2c98e.

* Replace AnyGraphicListDyn with generic paint connectors on the Fill and Stroke nodes

* Canonicalize paint attribute storage to List<Graphic> with a single write helper

* Fix Solidify Stroke missing fills stored in the legacy style

* Fix Solidify Stroke producing invisible strokes for legacy-only stroke colors

* Fix the initial gradient transform ignoring the bounding box's vertical extent

* Step paint at the morph midpoint instead of dropping it for unmixable pairings

* Remove migration-stage comments

* Clarify the initial gradient transform helper's doc and name

* Correct the bake_paint_transforms doc and prune dead tolerance arms

* Delete the unused Gradient::lerp

* Fix a comment typo

* Thread network paths through the legacy gradient bake so nested fills migrate

* Restore the legacy fill fallback in Expand Fill and Stroke

* Read gradient stops from the node's own input in the Fill properties panel

* Use the transform input constant instead of a hardcoded index

* Remove the unreachable wired color fallback in the Fill properties solid branch

* Narrow the fill overlay redraw check to actual fill inputs

* Coalesce the fill setter's graph runs into a single dispatch

* Position the Gradient Value node inserted for gradient stops

* Bake backup gradient placement during migration

* Persist pending gradient bakes so unfinished migrations retry on reopen

* Migrate the backup gradient's type and spread method

* Harden the gradient-migration pass against document switches and stale bakes

* Keep the Fill properties UI for layerless and nested Fill nodes

* Leave a wired gradient transform input connected instead of overwriting it

* Refuse to start a gradient chain ahead of existing layer content

* Decode a Fill node's gradient through one shared reader

* Nudge a degenerate bounding box so the Fill gradient transform stays invertible

* Broadcast Fill and Stroke paint with a single attribute-column pass

* Fix Morph stepping the target's stroke in near the source instead of the target

* Tidy conventions: clippy get_first, comment periods, sentence-case test messages

* Reattach the gradient orientation doc to its function

* Re-save demo artwork

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-07-04 23:08:21 +00:00
jneem
57ee2b00ca Bump linesweeper to 0.4 (#4273)
* Bump linesweeper to 0.4

* Avoid crash if there's an indexing bug

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-06-23 00:15:55 +00:00
YohYamasaki
7bc0f042ce Transition gradients from bbox-relative to document-absolute space (#4241)
* Use userSpaceOnUse to render gradient on SVG

* Allow non-uniform transform to radial gradient on vello

* Position gradients absolutely instead of by bbox

* Fix SVG import by removing multiplication of bound's inverse transform

* Represent sheared linear gradients via their equivalent gradient line

* Migration

* Fix migration for radial (elliptical) gradients

* Fix boolean operation gradients

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-06-20 21:21:28 +00:00
Jatin Bharti
5f100946f2 Add String[] as a graphic type for typography (#4141)
* feat: Render List<String> as raw paths in SVG and Vell mode

* chore: code review

* chore: change the hardcoded layout bounds to parley's

* chore: code review

* feat: Split text node to text_layer and text_to_vector node

* fix: CI fail because of difference in nature of Mac and github action

* chore: fix

* chore: replace FontStack as it got removed in parley 0.9

* chore: fmt

* chore: migrate the rendering as of new resource architechture

* chore: add text_layer node to text tool for testing

* code review

* Make boolean ops support the Text type

* chore: Move fallback_font_resource authority from editor to text node

* Fix 'Text Layer' node missing font dropdown

* Change node doc comments from Vec<T> to T[]

* Add migrations from the old Text node to Text -> Text to Vector

* Consolidate

* Rename the text attributes and reorder tilt to come before max_width/height

* Detect legacy Text nodes in the split migration by their trailing separate_glyphs input

* Code review

* Frame Text layer thumbnails by laying out their text for bounds

* Give Text layers click targets and selection outlines via collect_metadata

* Route Text tool through Text to Vector with fill, fixing editing-preview placement

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-06-19 19:39:52 +00:00
Keavon Chambers
a28b9437aa Rename the "Table" type to "List" everywhere (#4133)
* Rename the "Table" type to "List" everywhere

* Fix a few missed ones

* Re-save demo artwork
2026-05-09 01:33:39 -07:00
Keavon Chambers
6b3e4757de Rename the Table type's "rows" -> "items" and "columns" -> "attributes" everywhere (#4130)
* Rename TableRow -> Item

* Rename row -> item and column -> attribute throughout

* Fix a few missed ones

* Format
2026-05-08 23:11:33 -07:00
Keavon Chambers
eeb1f85e25 Fix 'Boolean Operation' node outputs having the reversed winding direction (#4091) 2026-05-01 19:23:44 -07:00
Keavon Chambers
4474de4662 Replace the AlphaBlending struct with separate attributes (#4086)
* Replace the AlphaBlending struct with separate attributes

* Fix bug

* Fix bug
2026-05-01 03:27:42 -07:00
Keavon Chambers
0847d7b0ab Centralize attribute strings in consts and rename "editor:layer" to "editor:layer_path" (#4076)
* Rename "editor:layer" to "editor:layer_path" and centralize it in a const

* Centralize "editor:merged_layers" in a const

* Centralize all other attributes in consts

* Rename consts with ATTR_ prefix

* Format
2026-04-28 21:53:30 -07:00
Keavon Chambers
5774ec215d Replace deprecated row/cell/instance terminology with "item" and "value" terms (#4075) 2026-04-28 19:12:59 -07:00
Keavon Chambers
6b11b47753 Improve the Data panel with type-specific detail pages and nested-layer support (#4070)
* Improve the Data panel with more type-specific detail pages

* Add network_path to SetDisplayName so renames target any network depth

* Track nested layers via full editor:layer paths and rename parent_layer to path_of_subgraph

* Polish the data panel NodeId leaf page with an editable name field

* Make lock and visibility toggles work for layers in nested subgraphs

* Fix formatting

* Fix connected_to_output running in the wrong network for nested-layer toggles
2026-04-28 15:37:07 -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
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
90533e656f Remove the path-bool library (#3882) 2026-03-11 08:55:03 +01:00
jneem
58aae4f87b Replace the Boolean Operations node's algorithm with the Linesweeper library (#2670)
* Attempt one-shot n-ary ops

* Make it not crash

* Try to remove more path_bool

* Add quantization

* Update to latest

* Nits

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-03-10 22:00:49 -07: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
Jo
e3ad59ad9c Add tooltip documentation to web request and brush related nodes (#3427)
* Add tooltip documentation to web request, text, and brush nodes

  - Add descriptive tooltips to web request nodes (GET/POST, string/image conversion, resource loading, image decoding)
  - Add tooltip to GPU rasterization node explaining footprint usage
  - Improve text node tooltip with clearer per_glyph_instances parameter explanation
  - Add tooltips to brush stamp generator and blit operations explaining their internal roles
  - Fix typos in tooltip and variable names (it's→its, perview→preview, instnace→instance)

* Fixed 2 issues with previous changes. Reversed order of documentation about per_glyph_instances. Can it be 3 lines?

* Improve post_request node documentation

Change doc comment to describe the node's purpose rather than focusing
only on the "Discard Result" parameter. Now clearly states this is an
HTTP POST operation with optional async behavior.

* Fix post_request documentation error

Corrected doc comment to say "HTTP POST" instead of "HTTP GET" since
this function performs POST requests with binary data.

* Review changes

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-01-13 08:35:14 +00: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
Keavon Chambers
fb0fab0622 Update links from graphite.rs to graphite.art 2025-12-06 18:10:27 -08: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