* Remove FontInput.svelte
* Move font picking to the backend
* Fix Text tool font choice style turning to "-" on font that doesn't support previous style
* ui scale preference
* cleanup
* add update ui scale message to SIDE_EFFECT_FREE_MESSAGES
* fix mac title bar height
* hide UI preference section on web
* set % as unit of ui scale
* gray background for viewport texture
* cust copy paste support
* connect clipboard read on web
* fix eyedropper bounds
* cleanup
* add missing char events for some named keys like enter
* okayish solution
should be improved at some point but for now it works well enough.
* do leftover renames
* better solution
* less weird resize frames
* move surface reconfiguration
* fix recent desktop mac breakages
* better looking resize on mac
* fix background color
* Fix blank screen on window initialization
* cleanup
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Restyle UserInputLabel and refactor its usages to have all input its data sent from Rust
* Replace the welcome screen quick buttons with ones sent by backend
* Add the ShortcutLabel widget to the backend
* Replace hints bar with a backend-controlled layout; show mouse icons in place of mouse labels
* only allow single instance
* more reliable CEF cache cleanup
* some cleanup
* fix lock file location
* add simple signal handling
* fix skew handles on desktop
* mac remove unused helpers
* Refactor the old menu bar plumbing to use standard TextButtons
* WIP: Fix Mac native menu bar
* WIP: fix desktop menu bar mac
* Refactor menu bar definitions to use the builder pattern
* WIP: fixup desktop
* cleanup
* fix linux
* Remove dead code that was failing to lint
---------
Co-authored-by: Timon Schelling <me@timon.zip>
* Replace the title attribute with custom FloatingMenu tooltips
* Separate tooltip labels and descriptions into two styled blocks
* Move keyboard shortcut tooltips to a separate section at the bottom
* Update shortcut key styling in tooltips and hints bar
* Fix .to_string()
- Add the 'Reset Transform' and 'Replace Transform' nodes
- Add the 'Count Points' and 'Index Points' nodes
- Make the 'Index Elements' node support negative indexing from the end
- Make the 'Flatten Vector' node's implementation reusable
- Fix crash displaying 0x0 raster image in the Data panel
- Fix the 'Points to Polyline' node not working on two-point objects
* Fix 'Mask' node missing Properties widget; fix crash with 'Brightness/Contrast Classic' node
Also clean up dead code and improve tooltip for the "-" Properties panel widget fallback.
* format type
---------
Co-authored-by: Adam <adamgerhant@gmail.com>
* add browser debug port env
* mac use option as alt
* fix cef texture double sRGB conversion by using cef-rs fork with fix
* fix keyboard input on mac
* add missing frontend messages
* fixup
* fix keyboard input mac
* dbg
* re implement keyboard mapping
Co-authored-by: csmoe <csmoe@msn.com>
* Fix double arrow keys
* try fix for non mac
* test
* Revert "test"
This reverts commit c7cde9c597e24ef7270ccc69c93a382939a2ce0f.
* fix mac
* some cleanup
* fix zoom in shortcut on mac introduced in #3377
* disable menu shortcut display
* fixup
* macos native menu bar
* fix nix build
* Add shortcut symbols to menu
* fix fmt
* fix vendoring
* cleanup intercept frontend message
* accept into editor message in queue function
* Cache calculation of bounding boxes with transforms
* Reuse bounding boxes across for the same rotation
* Cleanup code and add documentation
* Add tests
* Open document from cli and add some files to .gitignore
* Revert .gitignore
* Revert .gitignore
* Implement cli properly
* Add ui-accelerated-painting option
* Format code
* Revert changes in .vscode folder
* Don't use global variables for cli
* Apply suggested changes
* Make ready for merge
* Improve names
* remove comment
---------
Co-authored-by: Timon <me@timon.zip>
* One annoying debugging session later
Discovered that the editor handles frontend messages differently from other messages.
It requires all frontend messages to be fully processed before dispatching any resulting messages.
In the web frontend, this behavior happened implicitly because message dispatch is queued at the current end of the JavaScript execution queue.
For the desktop frontend, I added a vector to collect all responses until the entire batch of frontend messages is handled, and then dispatch them afterwards.
* Fix double click travel
* Make the Transform node use degrees not radians
* Migration script
* Migrate skew value input to store degrees
* Add comments
* Fix migrations to account for the old deprecated "Pivot" parameter
* Fix tooling interactions with degrees-based transforms
* Upgrade demo art
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* made spiral node
* number of turns in decimal and arc-angle implementation
* logarithmic spiral
* unified log and arc spiral into spiral node
* add spiral shape in shape tool
* fix min value and degree unit
* make it compile
* updated the api
* changed the function_name
* [/] to update the turns widget in shape tool
* Code review
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Prevent panic if env GRAPHITE_GIT_COMMIT_HASH is less than 8 chars long
* Improve release info build script
* Nits
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Set auto save state to false on document rename
* Update open document list on transaction commit and aboard
* Use current network to compute hash
Was using the last element in undo
Before artworks where not auto saved when the had no undo history
* Refactor persistence
* cargo: remove unused `editor/ron` feature
* cargo: add wgpu-executor as a member, sort list
* cargo: test every crate by default
* cargo: disable testing of `graphite-proc-macros`
* graster-nodes: change `Table<Color>` params to `Color` where only one value is used
* Re-add support for Color and Option<Color>
* Add warning when a default value isn't parsed
---------
Co-authored-by: hypercube <0hypercube@gmail.com>
* Make manual_compositon non optional and rename to call_argument
* Fix clippy warnings
* Remove automatic composition compiler infrastructure
* Implement document migration
* Fix tests
* Fix compilation on web
* Fix doble number test
* Remove extra parens
* Cleanup
* Update demo artwork
* Remove last compose node mention
* Remove last mention of manual composition
* Make file name and document name identical
* Add save as action
* Fix test errors
* Add missing save as action
* Desktop fix drop file open document file message
* Address review comments
* Replace file save suffix with file extension
* Add comment specifying that the upload function takes a html input accept string
* Fix remove file extension in web
* Use let
* Don't show save as menu entry in web
* Don't add SaveDocumentAs in web
* Remove file extension on all open document file calls
---------
Co-authored-by: Dennis Kobert <dennis@kobert.dev>
* Feat: Point sliding on G G
* Code cleanup
* Fix gg sliding behaviour
* Fix build after merge conflict resolution
* Fix slide point and add hints
* Fix history in segment insertion
* Code review
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Reduce code duplication in bounding box impls on Table
* Working Table<Color> rendering in the graph
* Implement color and fix other rendering with Vello and polish
* Rename VectorData to Vector
* Rename other VectorData* types to Vector*
* Move assorted data types out of vector_data.rs into misc.rs
* Rename vector_data.rs to vector_types.rs and remove the vector_types module folder
* Rename other references to "vector data"
* Remove label widgets for raster/vector/group to use "-" instead
* Rename RasterData to Raster
* Rename GraphicGroup to Group
* Fix migrations and rename graphic_element.rs -> graphic.rs
* Rename TaggedValue::ArtboardGroup -> TaggedValue::Artboard
* Instances -> Table
* instances.rs -> table.rs
* Rename occurrances of the word "instances"
* .instance -> .element
* Instance* -> TableRow*
* Rename Table and TableRow methods to not say "instance"
* Remove presumed unused serde defaults now that tables default to length 0 not 1
* Rename occurences of the word "instance"
* Un-alias the RasterDataTable<Storage>, VectorDataTable, GraphicGroupTable, ArtboardGroupTable typedefs
* Move artboard type and node code out of graphic_element.rs to a new artboard.rs
* Organize the TaggedValues
* Fix tests
* Fix prior regression with Image Value node not upgrading
* Render overlays with vello
* Fix nix flake comments
* Rendering refactor with better names and code location
* Remove unnecessary overlay renders
* Post rebase fix
* merged with circle and impl inner radius gizmo for arc
* impl radius-gizmo for arc
* fix only one gizmo shown at a time
* Code review
* make hints update when changing shape,add default behaviour when dragging to make circle earlier fixed to from center
* fixed arc-radius hover threshold and show arc-endpoint when hover over arc-radius gizmo
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Stub vello based overlay implementation
* Fix warnings
* Don't panic on non implemented functions to allow the tests to pass
* Don't draw overlays for tests
* Add Handler for defered execution of messages
* Cleanup
* Track graph execution id to associate messages with their corresponding execution id
* Rename ViewportReady -> NavigationReady
* Defer layer deselection
* Fix a single layer twice selected hiding the properties
* Comment that the same node appears several times
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Add text alignment to Text node
* Lots of renames and improvements
* Add text alignment to the Text tool
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* raster-nodes: remove commented out index node
* raster-nodes: move `CubicSplines` to separate mod
* raster-nodes: create `mod blending_nodes` and move assoc nodes
* raster-nodes: move node `gradient_map` to its own mod
* Added ghost outline clearing when moving outlines via Path Tool
* Fix ghost outline staying fixed during drag by storing it in document space
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Add graph message for adding a path
* Disable options when adding path tool is not possible
* Move Layer menu entry location
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Separate glyphs into Vector data rows
* Fix `String Length` node
- Properly count characters with
`str.chars().count()` instead of bytes `str.len()`
- Change `String Length` node's output to `u32`
* Apply transform on instance instead of applying it when drawing the glyph
* Add checkbox to enable/disable per-glyph instances
* Tooltips
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Added initial version of this feature for the path tool
* Removed debug statements
* Thickened the overlay width
* Added hover highlighting for path tool
* Experimental switch to path tool at leaf layer
* Ghost outline initial implementation
* Added tab swap for select tool -> path tool
* Minor fix for Select Tool dbl click -> Path Tool
* Added support for ghosts when using GRS in the path tool
* Fixed GRS undo bug, vastly improved hover behavior and now clearly visualize next double click target
* Fixed unused import warnings
* Updated behavior to handle mouse movement cases, reverted line width to 1px
* Fixed merge behavioral issues
* Disabled Select Tool to Path Tool double click toggle, fixed single click drill through for special case
* Clean up of unused consts and comment
* Properly cancel the drill through state when the mouse moves
* Fix some stuff
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* migration: make document migration use ProtoNodeIdentifier
* migration: NodeReplacement struct for better formatting
* migration: test for duplicates and fix them
* Feat: implement the hierarchical tree for visualization
* rename HierarchicalTree trait function
* feat: change the HierarchicalTree from String to DebugMessageTree struct
* Nits
* feat: impliment proc macro to extract field from messagedata structs
* update the hierarchical-tree for hanlder data
* feat: added message handler struct to hierarchical tree
* feat: add the line number to message handler struct
* feat: added handler path to tree and NITS
* clean the white spaces in type string
* fixes some white spaces
* feat: added path to message enum in hierarchical tree
* feat: add file creation of hierarchical message system tree
* cleanup
* Code review
* Add todo comment for deferred change
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* fix warnings on master
* make the `ProtoNodeIdentifier` of a Node be accessible and always a borrowed `&'static str`
* always generate `node_name::identifier()`, even with `skip_impl`
* make `FrontendNodeType` use Cow
* remove broken `DocumentNodeDefinition`s for old GPU nodes
* don't reexport `graphic_element` in it's entirety, only data structures
* adjust everything to use the new `node_name::identifier()`
* fixup imports for wasm
* turn identifier fn into a constant
* Make String Value node input a TextArea
Signed-off-by: ezbaze <68749104+Ezbaze@users.noreply.github.com>
* Replace link to Tauri
Signed-off-by: ezbaze <68749104+Ezbaze@users.noreply.github.com>
* Make String Concatenate node & Replace String node inputs into a TextArea
Signed-off-by: ezbaze <68749104+Ezbaze@users.noreply.github.com>
---------
Signed-off-by: ezbaze <68749104+Ezbaze@users.noreply.github.com>
* fix `BoundingBox for Raster<GPU>` when `wgpu` feature is disabled
* fix `tinyvec` crate not being `std` by default
* fixup migration for `CoordinateValueNode`
* fixup migration for raster nodes
* Fix unit usages
* Add node and parameter doc comments
* Fix the parameters panel for the 'Line' node when added from the graph
* Clean up nodes
* Fix tests
* Update the demo artwork
* replace rustybuzz with parley for text layout handling
change text input direction based on text direction
* Code review
* change default character spacing to 0
* add shear to text node
this also adds migration code for documents that don't have shear
* shear migration for text node
- add shear property
- set character spacing to 0
* use old max_width and max_height in text migration if available
* Final code review pass
* Add units to the parameters
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* fixed double-click on anchor connected to linear segments
* fix when scaling when anchor
* Nit
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* move `trait AsU32` from `gcore::vector::misc` to `gcore`
* move blending and gradient to their own modules
* fix unused warnings
* move `Quad`, `Rect` and `BBox` to `gcore::math`
* extract `ReferencePoint` and transform nodes from `transform`
* move color-related code to `mod color`
* fix unused warning in test code
* move blending-related nodes and code to `mod blending_nodes`
* move ClickTarget code to `mod vector::click_target`
* Prototype document network level into node insertion
* Implement Convert trait / node for places we can't use Into
* Add isize/usize and i128/u128 implementations for Convert trait
* Factor out substitutions into preprocessor crate
* Simplify layer node further
* Code review
* Mark preprocessed networks as generated
* Revert changes to layer node definition
* Skip generated flag for serialization
* Don't expand for tests
* Code review
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Added Count point Radio button to property pannel
* Implemented on Count radio button functionality
* Fixed linting and Title case problem
* Fixing more linting problem
* Instance tables refactor part 8: Make repeater nodes use pivot not bbox and output instance type not group; rename 'Flatten Vector Elements' to 'Flatten Path' and add 'Flatten Vector' (#2697)
Make repeater nodes use pivot not bbox and output instance type not group; rename 'Flatten Vector Elements' to 'Flatten Path' and add 'Flatten Vector'
* Refactor the 'Bounding Box' node to use Kurbo instead of Bezier-rs (#2662)
* use kurbo's default accuracy constant
* fix append_bezpath() method
* refactor bounding box node
* fix append bezpath implementation.
* comments
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Add overlays for free-floating anchors on hovered/selected vector layers (#2630)
* Add selection overlay for free-floating anchors
* Add hover overlay for free-floating anchors
* Refactor outline_free_floating anchor
* Add single-anchor click targets on VectorData
* Modify ClickTarget to adapt for Subpath and PointGroup
* Fix Rust formatting
* Remove debug statements
* Add point groups support in VectorDataTable::add_upstream_click_targets
* Improve overlay for free floating anchors
* Remove datatype for nodes_to_shift
* Fix formatting in select_tool.rs
* Lints
* Code review
* Remove references to point_group
* Refactor ManipulatorGroup for FreePoint in ClickTargetGroup
* Rename ClickTargetGroup to ClickTargetType
* Refactor outline_free_floating_anchors into outline
* Adapt TransformCage to disable dragging and rotating on a single anchor layer
* Fix hover on single points
* Fix comments
* Lints
* Code review pass
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Add anchor sliding along adjacent segments in the Path tool (#2682)
* Improved comments
* Add point sliding with approximate t value
* Add similarity calculation
* Numerical approach to fit the curve
* Reliable point sliding for cubic segments
* Fix formatting and clean comments
* Fix cubic with one handle logic
* Cancel on right click and escape
* Two parameter optimization
* Esc/ Right click cancellation
* Code review
* Fix dynamic hints
* Revert selected_points_counts and fix comments
* Code review
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Fix Sample Points node to avoid duplicating endpoints instead of closing its sampled paths (#2714)
* Skip duplicate endpoint and close sampled paths in Sample Points node
Closes#2713
* Comment
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Implemented on Count radio button functionality
* Fixed linting and Title case problem
* The sample count can now work with adaptive spacing
* Readying for production
* Rename to 'Sample Polyline' and add migration
* Upgrade demo artwork
* Add monomorphization
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
Co-authored-by: Priyanshu <indierusty@gmail.com>
Co-authored-by: seam0s <153828136+seam0s-dev@users.noreply.github.com>
Co-authored-by: Adesh Gupta <148623820+4adex@users.noreply.github.com>
Co-authored-by: Ezbaze <68749104+Ezbaze@users.noreply.github.com>
* Change node categories
Signed-off-by: ezbaze <rybitwamateusz3@gmail.com>
* Restore Ezbaze's other work that was lost in the rebase
---------
Signed-off-by: ezbaze <rybitwamateusz3@gmail.com>
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* Ignore tauri gen
* Deny warnings on CI
* Fix all warnings in current nightly rustc
* Disable DWARF debug info for development builds
* Fix typo
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* no trait ,not to fix line
* add hints
* line modification even when other shapes are selected
* added transform and anchor overlays
* removed old code
* fixed transform added hints need to fix modifier keys use
* refactored select-tool
* add point-handle-gizmo
* fix rotate bug
* implement angle snapping gizmo , fix overlay and refactor the code
* implement snapping for point-handle gizmo and implement no of point gizmo need to refactor
* implemented the gizmo for polygon, added tests , brackets to increase sides
* formatting-fix
* small nit-picks
* Make it compile
* Code review
---------
Co-authored-by: Keavon Chambers <keavon@keavon.com>
* graph-craft: fix direct wasm build
* graph-craft: fix no serde feature failing to compile
* graph-craft: make wgpu-executor properly optional
* workspace: unify `image` formats in workspace
* workspace: turn most dependencies into workspace deps, no actual changes
* workspace: unify dependency features in workspace dep