3056 Commits

Author SHA1 Message Date
Dennis Kobert
b56af15e5e Add graph-storage crate (#4198)
* Add graph-storage crate

* Split graph-storage lib.rs into smaller modules

* Make graph_craft/core_types dependency optional

* Fix CRDT correctness issues flagged in graph-storage PR review

* Treat trailing empty export slots as value-equal in Network::value_equal

* Address graph-storage review: parameterize CrdtError, reject hot-log corruption, drop LamportClock Default

* Address graph-storage review: fix root-delta history walk, validate cross-network refs, make compute_deltas deterministic, harden Priority, index nodes by network

* Address graph-storage review: sort sources on deserialize, treat inputs_attributes length as structural, dedupe demo-artwork loader

* Add opt-in Delta rev validation, dedup resource sources on deserialize, fix doc grammar

* Persist scope injections through storage; harden gesture-end and embedded-source checks

* Review

* Review

* Review

* Use new types for NodeId and NetworkId

* Adress minor review comments

---------

Co-authored-by: Timon <me@timon.zip>
2026-06-13 16:47:04 +00:00
Keavon Chambers
cde8dd78e6 Remove stray float literal .0 suffixes in lieu of just ending with a point (#4233)
Remove the .0 suffix on floats in lieu of just ending with a point
2026-06-12 19:47:36 -07:00
YohYamasaki
2b8ef42086 Add renderer support for painting vector with "fill" and "stroke" attributes with graphic List<T> types (#4111)
* Add conversion from Fill to Table<Graphic>

* Refactor Vector vello renderer for Gradient / Color

* Refactor Vector SVG renderer for Gradient / Color

* Fix conflicts

* Add basic clipping-based fill for SVG rendering

* Use Cow to avoid cloning graphic list for fill

* Cleanup for Cow usage

* format code

* Use `<pattern>` instead of `<clipPath>` for clip

This simplifies the future implementation of clipping-based rendering
for strokes, as the stroke does not support the use of a clip path but
rather paint sources from a paint server.

* Move svg pattern rendering function to RenderExt

* Fix comment

* Fix empty fill list rendering as default black

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>

* Move opaque check function to Graphic impl

* Add color converter and debug node to use graphic

* WIP: Use List<Graphic> to render Color & Gradient

* Use `Arc<List<Vector>>` for vector_data metadata

This exposes List's attributes to message handlers, enabling them to
access the necessary attribute data such as ATTR_STROKE_PAINT_GRAPHIC
as `Fill` and `Stroke` will not have paint information in the future.

* Recurse opacity checks on nested `Graphic`

Also extracts `fill_graphic_list_at` /
`stroke_paint_graphic_list_at` to share the row-attribute
lookup across the existing call sites.

* Fix fill and stroke visibility check degradation

* Fix clipping based stroke paint positioning

* Refactor vello renderer for stroke to use graphic

* Reduce `Fill` / `Stroke.color` to `List<Graphic>` allocations

* Revert "Use `Arc<List<Vector>>` for vector_data metadata"

This reverts commit 4285243a5d

* Expose paint row attributes as dedicated metadata for vectors

Add `fill_attributes` / `stroke_paint_attributes` to `DocumentMetadata`
so the `ExpandFillStrokeOnSelectedLayers` handler can read row paint
visibility without exposing entire `List<Vector>`.

* Fix transparency check to consider fill opacity

* Fix consistency of gradient placement for SVG stroke

* Rename `stroke_paint_..` to `stroke_..`

* Remove debug nodes

* Allow to use any graphic type without casting

* Rename `fill_graphic` / `stroke_graphic` to `fill` / `stroke`

* Fix SVG pattern placement when stroke transform differs from item transform

* Fix click target fill check for empty list in graphic

* Fix blank fill/stroke attribute masking legacy style

* Fix SVG's paint order trick for vector/raster fills

* Add zero-division guard for pattern wraparound prevention

* Code review

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-06-12 23:29:34 +00:00
Timon
e524dff1a7 Add node macro support for injecting nodes into global scope (#4221)
* Macro support

* Preprocessor support

* Allow Cow str as scope name

* Use Passthrough node to work around compiler auto wrapping the producer node and invalidating the node id

* Stable NodeIds

* Less hacky but with bad performace

* Remove Cow from RegistryValueSource::Scope

* Connect scope injections to the inner network export

---------

Co-authored-by: Dennis Kobert <dennis@kobert.dev>
2026-06-11 18:14:58 +00:00
Timon
05d3d66587 Desktop: Block network requests in CEF that are not explicitly allowlisted (#4225) 2026-06-11 15:32:53 +00:00
YohYamasaki
26a0b901d4 Unify the gradient chain lookup used by the stops and attribute reads (#4223) 2026-06-11 05:36:43 +00:00
Keavon Chambers
97324cd852 Fix the Gradient tool breaking the layer deletion hotkey (#4224)
* Fix the Gradient tool breaking the layer deletion hotkey

* Fix
2026-06-10 22:32:39 -07:00
Keavon Chambers
f658665d4a Fix CI deploying all PR preview builds to dev.graphite.art
Fixes a regression introduced in 9dccc526b
2026-06-10 16:18:41 -07:00
Keavon Chambers
a7171f5939 Stop flatten_graphic_list() from adding unused attributes (#4220) 2026-06-10 14:37:14 -07:00
Vishnu Tejas
f2c83d2278 Desktop: Fix double-clicking top bar not toggling maximize on Linux (#3940)
Fix double-clicking top bar not toggling maximize in linux
2026-06-10 10:19:19 +00:00
Keavon Chambers
863b1f9993 Fix opacity attributes from defaulting to 0 rather than 1 (#4219)
* Fix opacity attribute padding to default to 1 instead of 0

* Perf fixes
2026-06-09 23:00:57 -07:00
Keavon Chambers
02a40a860f Add a wave propagation ripple effect to the website navbar (#4150)
* WIP: Website navbar ripple

* Fix performance and other bugs

* Make the navbar ripple's active button explicitly inert
2026-06-08 23:15:12 -07:00
Keavon Chambers
b4e04e616a Fix the SVG renderer not representing skewed raster images (#4218)
Fix the SVG renderer not skewing raster images to fit their bounds
2026-06-08 21:28:38 -07:00
Keavon Chambers
bc1f63ccc6 Add Alt+drag layer duplication to the Layers panel (#4216)
* Add Alt+drag layer duplication to the Layers panel

* Code review
2026-06-08 21:08:16 -07:00
Keavon Chambers
04bca4a877 Fix the Pen tool's preview being misplaced and angle-locked after undo or redo (#4215)
* Fix the Pen tool's preview being misplaced and angle-locked after undo or redo

* Clear the Pen tool's stale angle-lock flag after undo or redo
2026-06-08 13:28:57 -07:00
Vatsal Kumar
cc7d700bfd Fix the Pen tool preview segment disappearing during repeated undo (#3791)
* fix preview line to be visible on multiple undo

* fixed regression issue for last anchor

* Remove unneeded preview-state resync from the Pen tool undo handler

* Prevent a transient vector gap from ending the Pen tool drawing session

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-06-08 11:46:10 -07:00
Jatin Bharti
2835c3b536 Fix the Fill node not restoring its solid color after switching to gradient and back (#4159)
* fix: Fill node solid colour backup update

* chore: refactor
2026-06-08 04:18:10 +00:00
Keavon Chambers
7a6e4f6f25 Fix new nodes being added in the wrong place near graph edges (#4211) 2026-06-07 19:22:30 -07:00
Hemu
b645871dbc Fix duplicated dropdown selection styling when multiple entries have identical labels (#4180)
* Fix dropdown select if options have identical labels

* update other uses of label in favor of value

* simplify null checks
2026-06-07 17:53:58 -07:00
Keavon Chambers
85ee5e41b9 Fix strokes with inside/outside alignment not being selectable when above other layers (#4207) 2026-06-07 17:08:04 -07:00
Dennis Kobert
d5c67eeb55 Drop MemoHash's std Hash impl and route cache-identity hashing through CacheHash (#4209) 2026-06-07 17:49:56 +00:00
Keavon Chambers
2c29d2c406 Fix Gradient tool inserting new nodes in the wrong position when updating a Fill node's gradient chain (#4203)
* Fix Gradient tool inserting new nodes in the wrong position when updating a Fill node's gradient chain

* Improve robustness
2026-06-05 21:02:42 -07:00
YohYamasaki
a3b62dac00 Make the Gradient tool work with gradient node chains feeding a Fill node (#4177)
* Add Gradient node

* Add support of new Gradient node for Gradient tool

* Adapt gemini reviews

* Add tests

* Bring back visibility check

* Remove the 'Gradient' node since it's unwanted after all

* Formatting

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
2026-06-06 03:23:14 +00:00
Timon
9d2071ce6a Desktop: Disable UI acceleration by default on Linux (#4201) 2026-06-05 22:16:37 +00:00
Dennis Kobert
6fe1af3afe Add document-container crate (#4191)
* Add document-container crate: container backends and archive codecs

* Address PR review: path/prefix split, safe size casts, OPFS stream aborts

* Address PR review round 2: mmap read check, UTF8 entry names, prefix normalization

* Make MmappedBytes::new fallible so mmap reads can't silently degrade

* Address PR review round 3: backend contract uniformity (symlinks, remove, list)

* Apply symlink-component check to FolderBackend listing paths

* Address PR review: idempotent OPFS delete logging, tar default-features, shared entry-size cap

* Fix validate_path doc: dotfiles pass, CurDir/ParentDir rejected

* Omit symlink entries from FolderBackend listings for consistency with resolve

* Preserve zip I/O errors and reject non-canonical paths in validate_path

* Extend archive apis to return the archive writer

* Rename document/document-container directory to document/container

* Add archive format sniffing and deserialize_auto

* Drop temporal hedge from checked_entry_size comment

* Tighten verbose doc comments in document-container

* Coalesce consecutive same-path OPFS appends to avoid O(n^2) file copies

* Review

* Update document-container for the deserialize/store_non_blocking renames

---------

Co-authored-by: Timon <me@timon.zip>
2026-06-05 13:28:02 -04:00
Timon
08c6d02e5b Introduce network request handler (#4194)
* Impl NetworkMessageHandler

* Repalce Frontend fetch like messages with NetworkMessage

* Reimpl resource loading with NetworkMessage

* Fix wasm

* dedublicate resource requests

* Embedd font resources created by migration

* Fixup

* Fix tests

* Fix font catalog not loading

* Cleanup

* Fix layouts not updating when font catalog is loaded

* Review

* Review

* Cleanup
2026-06-05 13:27:45 -04:00
Timon
cd8ea1f554 Migrate fonts to be stored as resources (#4165)
* Good start

* Impl

* allow responses.add(async { Message::NoOp });

* Fix

* Cache font blob in text node

* Refactor font handling to use Font struct direcly

* Fix fmt

* Embedd Font Resources by default

* Review

* Review

* Cache font info based on ResourceHash
2026-06-05 13:27:25 -04:00
Dennis Kobert
7b9c480a8d Make ResourceStorage trait &self-based and remove 'static requirement (#4188)
* Make ResourceStorage trait &self-based with elided-lifetime ResourceFuture

* Adress review comments
2026-06-01 10:37:05 +00:00
Timon
e32ff4b7f0 Make Resource aware of its own hash (#4187)
* Fix future message handler field name

* Add Resource::hash()

* Move all remaining resource types from core-types to graphene-resources

* Review
2026-05-31 23:08:01 +00:00
Dennis Kobert
78679a5ba2 Implement editor level future message handler (#4182)
* Implement proper editor level async message handler

* Take application_io and wake callback as Editor::new arguments

* Rename AsyncMessage -> FutureMessage

* add DesktopWrapperMessage::Wake

---------

Co-authored-by: Timon <me@timon.zip>
2026-05-31 21:26:29 +00:00
Timon
51427bef5f Fix CI profiling compile failure (#4184) 2026-05-31 20:32:34 +00:00
Timon
a40e0d2887 Use ResourceId for referring to Resources (#4176)
* Use ResourceId for referring to Resources

* Use Doc

* use error for preprocessor ResourceId replacement failure

* Keep hashes in DocumentInfo

* Migrate with less mem copy

* Global ResourceMessage -> ResourceStorageMessage

* Add document ResourceMessage

* Move embedding logic

* Fix

* Cleanup

* Review

* Fix
2026-05-29 10:56:32 +00:00
Timon
bbbe04903f Define data types for ID-based resource handling (#4168)
* Add resource lib

* rename ResourceSource to ResourceInput

* Rename ResourceInput -> DataSource and improve API

* Review

---------

Co-authored-by: Dennis Kobert <dennis@kobert.dev>
2026-05-25 10:50:57 +00:00
Keavon Chambers
d0d9a350c7 Add new May 2026 release update video to website home page 2026-05-23 02:04:59 -04:00
Keavon Chambers
9dccc526bb Add the May 2026 release message to the welcome screen 2026-05-23 01:41:42 -04:00
Keavon Chambers
96be4ec351 Add an "Initializing Renderer…" overlay when Vello shader compilation is slow on web 2026-05-23 01:07:26 -04:00
Keavon Chambers
62287d7893 Add a recovery path for autosaved documents that don't open successfully (#4157)
* Add a recovery path for autosaved documents that don't open successfully

* Fix file naming edge case

* Add edge cases for Windows zip names

* Simplify comments and remove desktop portion
2026-05-22 21:14:28 -07:00
Timon
c3b0c87cfe Antialias checkered artboard background edges (#4163)
* Antialias checkered artboard background edges

* Review
2026-05-22 16:48:05 +00:00
Timon
2770df7567 Implement content-addressed resource storage for raster images (#4148)
* Implement content-addressed resource storage

* Implement OPFS resource storage

* Remove ResourceStorage::read

* Review
2026-05-21 19:31:07 +00:00
Keavon Chambers
21d2994059 Fix 'Solidify Strokes' node to produce dashed segments in an ordered sequence per open subpath (#3820)
Fix the ordering of dashed segments of open paths with the 'Solidify Stroke' node
2026-05-17 10:56:40 -07:00
Timon
d5f0140f26 Upgrade WGPU and Linebender dependencies (#4154) 2026-05-17 15:36:59 +00:00
Keavon Chambers
c4a978009a Fix SVG import treating gamma-encoded colors as linear-light 2026-05-16 05:37:01 -07:00
Keavon Chambers
256dd26b99 Recognize ExtractPosition/InjectPosition in the node macro context analyzer
Also, fix migration missing alias
2026-05-16 01:40:49 -07:00
Keavon Chambers
06e2a049de Implement dragging layers into the group/new/delete buttons in the Layers panel (#4153) 2026-05-15 15:39:01 -07:00
Keavon Chambers
79df7cfa87 Implement dragging the visibility/lock icons in the Layers panel to toggle each (#4152)
* Implement dragging the visibility/lock icons in the Layers panel to toggle each

* Code review fixes
2026-05-15 15:16:40 -07:00
Keavon Chambers
16c7544d96 Add the Layer > Expand Fill/Stroke menu action (#4151)
* Add the Layer > Expand Fill/Stroke menu action

* Code review feedback
2026-05-15 13:10:50 -07:00
Keavon Chambers
a56746c6bf Deprecate all usages of the Color struct representing gamma space values, fixing round-trip precision bugs (#4149)
* Deprecate all usages of the Color struct representing gamma space values, fixing round-trip precision bugs

* Code review fixes
2026-05-14 22:48:33 -07:00
gamma0987
456a7c868d Migrate iai-callgrind to the renamed successor gungraun (#4056)
* Add .nvim.lua to gitignore

* Migrate from iai-callgrind to the renamed successor gungraun

---------

Co-authored-by: Dennis Kobert <dennis@kobert.dev>
2026-05-14 08:18:59 +00:00
Keavon Chambers
1c9c19a697 Simplify and standardize how data types are presented in user-facing strings (#4147)
* User-facing type formatting

* Parse unicode not ASCII chars
2026-05-14 00:56:43 -07:00
Keavon Chambers
696b625a3e Fix hover transfer bugs occurring with the color picker popover (#4146)
* Fix hover transfer bugs occurring with the color picker popover

* Code review fix
2026-05-13 20:19:56 -07:00