Commit Graph

3424 Commits

Author SHA1 Message Date
Keavon Chambers
a66ae401e5 Dedupe code for BezPath emission, epsilon constants, and Polynomial internals (#4459) 2026-09-15 21:53:11 +02:00
Keavon Chambers
72c9c95281 Clean up the Vector struct implementations by privatizing and deleting unused APIs (#4458) 2026-09-15 21:35:21 +02:00
Keavon Chambers
6061a695e8 Port all remaining Subpath producers to BezPath and delete the legacy subpath module (#4457) 2026-09-15 20:52:14 +02:00
Keavon Chambers
c53c76a9fd Collapse ClickTargetType to a single multi-contour BezPath variant (#4456) 2026-09-15 20:18:06 +02:00
Keavon Chambers
07829c6e0c Replace the legacy Bezier struct with kurbo::PathSeg throughout (#4455) 2026-09-15 20:03:17 +02:00
Keavon Chambers
30333d6ec4 Remove remnant dead code across the Subpath, Vector, and editor geometry API surfaces (#4454) 2026-09-15 19:35:22 +02:00
Keavon Chambers
698e81ff3a Add the "Type Assertion" node catalog category (#4452) 2026-09-15 19:07:25 +02:00
Keavon Chambers
a1b8bff6cd Fix color and gradient list paints not rendering as stacks (#4439) 2026-09-15 18:25:14 +02:00
Keavon Chambers
1b81de3536 Fix the blend mode formulas for the Overlay, whole-color, and alpha-only modes (#4449) 2026-09-15 18:18:47 +02:00
Keavon Chambers
2e1a8caf63 Move the color blending helpers down beside Color and BlendMode in no-std-types (#4448) 2026-09-15 18:01:23 +02:00
Keavon Chambers
03262e1bab Replace the IntoPaint trait with direct Graphic-typed node inputs (#4442) 2026-09-15 17:50:14 +02:00
Keavon Chambers
a41fdb3d75 Split 'To Graphic' and 'Wrap Graphic' into the 'As Graphic' type assertion and 'Into Group' reducer nodes (#4441) 2026-09-15 16:46:03 +02:00
Keavon Chambers
f09eb73c08 Rename the Graphic enum wrapper variants with a "List" suffix (#4434)
Only the list-holding variant takes the suffix here: the record model already carries the rank-0 leaves upstream adds in #4437.

Co-authored-by: Dennis Kobert <dennis@kobert.dev>
pre-4435
2026-09-15 15:08:26 +02:00
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>
pre-4434
2026-09-15 14:49:57 +02:00
Dennis Kobert
28e5d1bdc9 Let vector modifier nodes operate on graphic content by recursing into groups 2026-09-15 14:40:47 +02:00
Dennis Kobert
64adde1ced Add a generic map over a graphic's leaves, reaching every depth 2026-09-15 14:40:43 +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
1c88592fa4 Fix clipping masks, click targets, and bounds when rendering Vector[] and flattened graphic wrappers (#4429)
* Honor clipping masks when rendering Vector[] lists, not just Graphic[] groups

* Keep per-layer click targets when a Vector[] round-trips through a Graphic[] wrapper

* Skip the rebuild and the merged-layers snapshot when flattening a lone anonymous graphic wrapper

* Fix a group's bounds excluding its raster children and stretching to the origin

* Fix SVG clipping masks landing in the wrong space when sibling layers differ in transform
2026-09-15 14:40:35 +02:00
Keavon Chambers
ae1ff71f45 Fix style controls corrupting stack nodes like Transform that can't host blending or paint nodes (#4428)
* Stop chain node insertion from stranding a node on layers without a chain

* Gate the Layers panel blending controls on whether the layer can host them

* Gate the fill and stroke setters on whether the layer can host paint nodes

* Make the tool options fill and stroke controls treat layers that cannot take paint as unselected

* Remove the unused first_selected_stroke_weight helper
2026-09-15 14:40:31 +02:00
Keavon Chambers
0e0687c8cb Make the 'Index Points' node index within each vector element instead of across the whole list (#4427) 2026-09-15 14:40:26 +02:00
Keavon Chambers
29540adc8f New node: 'Gradient to Colors' for unwrapping a gradient ramp into its colors (#4425)
* New node: 'Gradient to Colors' for unwrapping a gradient ramp into its colors

* Update 'Gradient Midpoints' wording
2026-09-15 14:40:23 +02:00
Keavon Chambers
1356139559 New nodes: 'Gradient Reverse', 'Gradient Shift', and 'Gradient Stretch' nodes for rearranging a ramp's stops (#4424)
* New nodes: 'Gradient Reverse', 'Gradient Shift', and 'Gradient Stretch' nodes for rearranging a ramp's stops

* Clip a lone out-of-range stop into the bake, and correct the docs that still promised edge-held stops
2026-09-15 14:40:18 +02:00
Keavon Chambers
35e77de9fe Fix read-only widget appearance and focus, and keep ColorInput picks surviving a layout diff (#4423) 2026-09-15 14:40:13 +02:00
Keavon Chambers
ca615fd6fc Rename the 'Sample Gradient' node to 'Evaluate Gradient' (#4422)
* Rename the 'Sample Gradient' node to 'Evaluate Gradient'

* Let the Evaluate Gradient node's position reach the out-of-range values its spread modes handle
2026-09-15 14:40:09 +02:00
Keavon Chambers
ed738b8e5c Drop CSS vendor prefixes and compat workarounds now obsolete in modern browsers (#4421) 2026-09-15 14:40:04 +02:00
Keavon Chambers
d2d372d875 Clean up CSS color opacity application to theme colors (#4420) 2026-09-15 14:40:00 +02:00
Keavon Chambers
da3ffa1721 Fix Vello rendering incompatibility with its gradients using premultiplied alpha instead of SVG's straight (#4419)
* Upgrade Vello to a git main revision that honors the brush's interpolation alpha space

* Interpolate Vello gradients with straight alpha, matching the SVG renderer

* Draw the gradient picker strip and fill swatches as SVG so transparency previews with straight alpha

* Keep gradient stop handles opaque so a transparent stop's RGB stays visible

* Paint a stopless gradient's picker strip and swatch black rather than transparent
2026-09-15 14:39:56 +02:00
Keavon Chambers
9181a62e99 Add a gradient interpolation attribute with Stepped, Linear (existing), and Smooth modes (#4418)
* Delete dead code function

* Add a Gradient Interpolation axis with Stepped, Linear, and Smooth paths through the stops

* Keep the gradient interpolation attached when dragging stops in the picker

* Give the gradient popover's dropdowns the same tooltips as their row labels

* Order the gradient popover with Intrp. above Space

* Hold gradient stops in place when the cyclic flag is toggled

* Fix wrong Smooth gradient colors around stops sitting on the ramp boundaries

* Consolidate gradient settings plumbing and fix bugs

* Bundle whole-ramp gradient settings into GradientSettings across the editor plumbing

* Name the Smooth gradient interpolation's spline type in its tooltip

* Linearize the gamma hex stop colors recovered from imported Graphite SVGs

* Code review

* Aim the Smooth bake's seam subdivision at the copied boundary color

* Add GradientEvaluator to build gradient sampling state once per loop instead of per sample

* Correct the gradient evaluator's documented setup cost to O(n log n)
2026-09-15 14:39:52 +02:00
Keavon Chambers
c00eb21a7f Add a "Cyclic" gradient option that closes the ramp into a seamless loop (#4416)
* Add a Cyclic gradient attribute that wraps the stop list through the 1|0 boundary back to the first stop

* Show the wrap segment's midpoint diamond in the color picker spectrum strip when cyclic

* Keep the wrap midpoint diamond tracking the pointer by a wrapped strip width when dragged past the ends

* Give the Gradient tool's viewport overlay the same cyclic wrap midpoint diamond and drag behavior

* Correct the docs claiming the final stop's midpoint is always ignored now that cyclic uses it

* Move the gradient cyclic toggle onto the Ends row as a Link icon checkbox

* Update labels

* Register GradientHueDirection with the Data panel so its attribute column renders

* Reword wrap segment to wrapped interval and stray segment usages to interval

* Clean up comments

* Fix the color picker write-back losing default position elision and the blend path guessing the cyclic flag
2026-09-15 14:39:48 +02:00
Keavon Chambers
be42a0aada Add the "Perceptual" and "Classic" families of gradient spaces with OkLab as the new default (#4415)
* Add an OkLab gradient interpolation space and make it the new default

* Fix the Properties panel fill row resetting the gradient interpolation space to the default

* Add OkLch, Lab, LCh, and HSL gradient interpolation spaces

* Add a hue direction attribute and picker choice for polar gradient interpolation spaces

* Add an HSV gradient interpolation space

* Rename the sRGB Linear and sRGB Gamma gradient spaces to RGB Linear and RGB Gamma

* Divide the gradient interpolation dropdown between absolute and relative color spaces

* Rename the OkLch gradient interpolation space to OkLCh for channel-notation capitalization

* Shorten the color picker popover's hue direction row label to Arc

* Call the Gradient Interpolation node's parameter Space and extend the picker tooltip title to match

* Rename the gradient interpolation attribute and type family to gradient space

* Rename the gradient tool's gradient space transform to gradient to viewport transform

* Add serde aliases and a node replacement covering the gradient space renames

* Give the gradient space choices artist-facing labels and reorder the dropdown sections

* Add a Gradient Hue Direction node and its attribute read node

* Say interpolate instead of blend for gradient stop color traversal in docs and tooltips

* Label the polar perceptual gradient spaces as Perceptual Hue and group the dropdown sections by geometry

* Add a migration alias covering the gradient space attribute reader rename

* Carry the gradient hue direction attribute through boolean operations

* Register GradientHueDirection wire types in the node registry
2026-09-15 14:39:44 +02:00
Keavon Chambers
11436cfc80 Make gradient evaluation follow the ramp's interpolation space attribute (#4414) 2026-09-15 14:39:40 +02:00
Keavon Chambers
a43b3eaa00 Give whole-expanse gradient layers a transform cage based on the gradient line (#4413) 2026-09-15 14:39:36 +02:00
Keavon Chambers
a1dfe52b70 Add a gradient interpolation space attribute with sRGB Gamma (existing) and sRGB Linear (new) (#4412)
* Build dropdown menu entries from choice type metadata

* Add a gradient interpolation color space attribute, blending stops in linear light by default

* Add a Space interpolation dropdown to the color picker popover

* Stamp legacy gradient ramps with their implicit gamma interpolation during deserialization

* Resolve color-interpolation from SVG style blocks and fix cascade order among repeated declarations
2026-09-15 14:39:32 +02:00
Keavon Chambers
65ba494b14 Fix node shaking causing an offset from the pointer for the rest of the drag (#4411) 2026-09-15 14:39:28 +02:00
Keavon Chambers
e54b348166 Add a Clear gradient spread that cuts off to transparency beyond the ends (#4410) 2026-09-15 14:39:24 +02:00
Keavon Chambers
fb6a0f9460 Bind the Gradient tool's spread to the gradient value's ramp instead of a Gradient Spread node (#4409) 2026-09-15 14:39:20 +02:00
Keavon Chambers
93a1b1f456 Build radio widget entries from choice type metadata so variants display their icons (#4408)
* Build radio widget entries from choice type metadata so variants display their icons

* Route the node properties enum radio through the shared choice type entry builder
2026-09-15 14:39:16 +02:00
Keavon Chambers
8a93b47788 Let the Fill and Gradient tools paint blank layers with whole-expanse colors and gradients (#4407)
* Let the Gradient and Fill tools paint blank layers with whole-expanse gradients and colors

* Make it work on layers with un-fed Transform nodes

* Show the Fill tool's hover pattern over the whole expanse of layers painted by a color chain

* Let the Fill and Gradient tools replace one another's whole-expanse paint on a selected layer

* Keep a shared paint node alive when a tool takes over a layer, and share the paint value lookup

* Stop a chain node from being shifted twice when a node is inserted in front of it
2026-09-15 14:39:08 +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
8d4f1346a1 Move the gradient-focused nodes from the Color category to a new Gradient category (#4403) 2026-09-15 14:38:53 +02:00
Keavon Chambers
26d67eb48b Move the gradient spread method into GradientRamp and the color picker popover (#4402)
* Add a spread method field to GradientRamp, carried at runtime as the gradient item's attribute

* Retire the Fill node's spread method input, folding its value into the gradient ramps on document upgrade

* Add an Ends spread method radio to the color picker popover, replacing the Gradient tool's control bar radio

* Update the demo art
2026-09-15 14:38:48 +02:00
Keavon Chambers
2196d308a7 Ban the null literal via ESLint and replace existing usages with undefined or truthiness checks (#4401) 2026-09-15 14:38:44 +02:00
Keavon Chambers
57c01ed413 Wrap serialized gradient stops in a new GradientRamp struct and unify FillChoice (#4400)
* Introduce the GradientRamp exchange struct as the serialized TaggedValue::Gradient payload

* Unify FillChoice and FillChoiceUI into one enum generic over color format, carrying GradientRamp stops

* Rename the TaggedValue::Gradient variant to GradientRamp to match its payload

* Move the Color variant into the tagged_value macro list since its stored and wire forms match
2026-09-15 14:38:39 +02:00
Keavon Chambers
a0df7c2513 Add a drill-in button beside Data panel gradient preview widgets (#4398) 2026-09-15 14:38:34 +02:00
Keavon Chambers
f6b4ce71e6 Rework Gradient into a newtype of List<Color> with optional position and midpoint attributes (#4397)
* Rework Gradient into a newtype of List<Color> with optional position and midpoint attributes

* Fix Vello stopless-gradient fallback coverage, empty legacy gradient tables, the node docs gradient swatch, NaN position elision, and wired setter input overwrites
2026-09-15 14:38:29 +02:00
Keavon Chambers
8504564f5d Remove custom (de)serializers from the DashPattern and BoxCorners TaggedValue variants (#4394)
Replace the DashPattern and BoxCorners custom serde impls with storage-shaped Vec<f64> TaggedValue payloads
2026-09-15 14:38:23 +02:00
Keavon Chambers
bf217169f6 Replace raw node input indices with compile-time parameter symbols (#4387)
* Remove the dead InputAccessor traits and the uncallable test helper built on them

* Replace raw node input indices with macro-generated parameter symbols across the editor

* Audit dynamic input index usage, converting to parameter symbols and named input position constants

* Abstract the remaining input index plumbing behind ParameterRef APIs and accessors

* Build SetInputValue messages as struct literals to keep message enums impl-free

* Delete the typed parameter markers in favor of explicit-output test introspection

* Wire the interpolation control path input per chain node type

* Return no input when a parameter symbol is read against the wrong node's parameter view
2026-09-15 14:38:16 +02:00
Keavon Chambers
5af465ce36 Fix the math parser's implicit multiplication precedence and other regressions from the rewrite (#4383)
* Fix parsing regressions, make parsing 2.5x faster than the old pest parser, and clean up the math-parser rewrite

* Fix review findings: whitespace-juxtaposed numbers, mixed real/complex logic, correctly rounded literals, unified NaN truthiness, and gcd/lcm range checks
2026-09-15 14:38:05 +02:00
urisinger
860174c08e Move the math expression parser from Pest to Chumsky and add more features (#2685)
Rewrite the math-parser library using a chumsky-based lexer and parser, adding functions, comparisons, logic, and conditionals
2026-09-15 14:38:00 +02:00