Merge origin/master into the async record refactor

Scaffolding merge for the reconcile; the final series to master is
authored fresh. Rank plumbing resolves to our axis-IR model, the node
macro and the LaneSource render walk stay ours, master's vector
restructure and gradient vocabulary are adopted, and the paint and
appearance adoption is deliberately deferred behind our fill and stroke
markers.
This commit is contained in:
Dennis Kobert
2026-09-08 15:03:57 +00:00
385 changed files with 34669 additions and 20078 deletions

View File

@@ -177,13 +177,9 @@ fn write_inputs(page: &mut std::fs::File, valid_input_types: &[Vec<core_types::T
{
let default_value = default_value.trim_end_matches('.').trim_end_matches(".0"); // Display whole-number floats as integers
let render_color = |color| format!(r#"<span style="padding-right: 100px; border: 2px solid var(--color-fog); background: {color}"></span>"#);
let default_value = match default_value {
"Color::BLACK" => render_color("black"),
"GradientStops([(0.0, Color { red: 0.0, green: 0.0, blue: 0.0, alpha: 1.0 }), (1.0, Color { red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0 })])" => {
render_color("linear-gradient(to right, black, white)")
}
_ => format!("`{default_value}{}`", field.unit.unwrap_or_default()),
let default_value = match field.default_colors {
Some(colors) => color_swatch(colors),
None => format!("`{default_value}{}`", field.unit.unwrap_or_default()),
};
details.push(format!("<p>*Default:*&nbsp;{default_value}</p>"));
@@ -210,6 +206,17 @@ fn write_inputs(page: &mut std::fs::File, valid_input_types: &[Vec<core_types::T
}
}
/// A bordered swatch painted with one color, or with several as the stops of a left-to-right gradient.
fn color_swatch(colors: &[core_types::Color]) -> String {
let hex: Vec<String> = colors.iter().map(|&color| format!("#{}", core_types::color::SRGBA8::from(color).to_rgba_hex())).collect();
let background = match hex.as_slice() {
[single] => single.clone(),
multiple => format!("linear-gradient(to right, {})", multiple.join(", ")),
};
format!(r#"<span style="padding-right: 100px; border: 2px solid var(--color-fog); background: {background}"></span>"#)
}
fn write_outputs(page: &mut std::fs::File, valid_primary_outputs: &[core_types::Type]) {
// Product
let product = "Result";

View File

@@ -7,19 +7,22 @@ pub fn category_description(category: &str) -> &str {
match category {
"Animation" => indoc!(
"
Nodes in this category enable the creation of animated, real-time, and interactive motion graphics involving paramters that change over time.
Nodes in this category enable the creation of animated, real-time, and interactive motion graphics involving parameters that change over time.
These nodes require that playback is activated by pressing the play button above the viewport.
"
),
"Attributes: Read" => "Nodes in this category read the values of a named attribute stored on the items of a list, outputting them as a new list of the requested data type.",
"Attributes: Write" => "Nodes in this category store a named attribute on the items of a list, with a value that is calculated individually for each item.",
"Blending" => "Nodes in this category control how overlapping graphical content is composited together, considering blend modes, opacity, and clipping.",
"Color" => "Nodes in this category deal with selecting and manipulating colors, gradients, and palettes.",
"Color" => "Nodes in this category deal with selecting and manipulating colors and palettes.",
"Debug" => indoc!(
"
Nodes in this category are temporarily included for debugging purposes by Graphite's developers. They may have rare potential uses for advanced users, but are not intended for general use and will be removed in future releases.
"
),
"General" => "Nodes in this category deal with general data handling, such as merging and flattening graphical elements.",
"Gradient" => "Nodes in this category build gradients and adjust the placement of their color stops, as well as the shape and repetition of the transition between them.",
"Context" => "Nodes in this category read data from the evaluation context supplied by downstream nodes, such as the current loop iteration index.",
"Repeat" => "Nodes in this category enable the duplication, arrangement, and looped generation of graphical elements.",
"Math: Arithmetic" => "Nodes in this category perform common arithmetic operations on numerical values (and where applicable, `vec2` values).",
@@ -27,8 +30,9 @@ pub fn category_description(category: &str) -> &str {
"Math: Numeric" => "Nodes in this category perform discontinuous numeric operations such as rounding, clamping, mapping, and randomization.",
"Math: Transform" => "Nodes in this category perform transformations on graphical elements and calculations involving transformation matrices.",
"Math: Trig" => "Nodes in this category perform trigonometric operations such as sine, cosine, tangent, and their inverses.",
"Math: Vector" => "Nodes in this category perform operations involving `vec2` values (points or arrows in 2D space) such as the dot product, normalization, and distance calculations.",
"Math: Vec2" => "Nodes in this category perform operations involving `vec2` values (points or arrows in 2D space) such as the dot product, normalization, and distance calculations.",
"Raster: Adjustment" => "Nodes in this category perform per-pixel color adjustments on raster graphics, such as brightness and contrast modifications.",
"Raster: Brush" => "Nodes in this category paint raster imagery from the strokes drawn with the Brush tool, controlling the size, hardness, flow, and color of the marks they leave behind.",
"Raster: Channels" => "Nodes in this category enable channel-specific manipulation of the RGB and alpha channels of raster graphics.",
"Raster: Filter" => "Nodes in this category apply filtering effects to raster graphics such as blurs and sharpening.",
"Raster: Pattern" => "Nodes in this category generate procedural raster patterns, fractals, textures, and noise.",
@@ -36,6 +40,7 @@ pub fn category_description(category: &str) -> &str {
"Text" => "Nodes in this category support the manipulation, formatting, and rendering of text strings.",
"Text: Regex" => "Nodes in this category perform string operations involving regular expressions, such as pattern matching and replacement.",
"Text: JSON" => "Nodes in this category perform string operations involving JSON data, such as parsing and stringifying.",
"Type Assertion" => "Nodes in this category assert that a value is of a specific data type, which may be used to invoke automatic conversions to the desired type.",
"Value" => "Nodes in this category supply data values of common types such as numbers, colors, booleans, and strings.",
"Vector: Measure" => "Nodes in this category perform measurements and analysis on vector graphics, such as length/area calculations, path traversal, and hit testing.",
"Vector: Modifier" => "Nodes in this category modify the geometry of vector graphics, such as boolean operations, smoothing, and morphing.",