397 Commits
Author SHA1 Message Date
FredAppsandDylan M. Taylor 4a75c49e3b refactor(svg): read SVG text and path data through craft-svg (#386)
* refactor(svg): read SVG text and path data through craft-svg

SVG import now decodes its bytes with craft-svg (SVGZ, UTF-16 and Latin-1,
within the shared size limit) and refuses entity bombs, very wide elements
and deep nesting with craft-svg's guards before anicraft_xml builds a tree.

Path data (SVG import, the path.d and motion path commands, the interface
icons) is read by craft_svg::path_data. anicraft-geom keeps only the
elliptical-arc-to-cubic geometry; its own tokenizer is removed.

craft-svg is pinned to craft-libs main 57288eda.

Refs storytold/craft-libs#778, storytold/craft-libs#789

* refactor(svg): pin craft-svg to #1848 and parse colours through it

craft-svg is now at craft-libs main b836a718 (#1848), with default features
off, so the lock no longer pulls vectorcraft or the image codecs. Colours
go through parse_color_alpha; transparent stays in the app because the
shared parser rejects it. Percentage rgb channels follow the shared
parser's 8-bit rounding (50% is 128/255).

* fix(svg): clip out-of-range rgb() and bound decoded text

parse_color_alpha rejects rgb(300,0,0); CSS clips that to red, and so
did the previous local parser. If the shared parser fails, clip rgb()
channels and try once more. Also refuse text that grows past the 64 MiB
limit after Latin-1 or UTF-16 decoding, which svgz::text does not count.

* refactor(svg): pin craft-svg to #1878

craft-svg is now at craft-libs main c7a872e2 (#1878), which bounds the
entity-declaration scan and resets smooth-control history after Z.
default-features stays false. The other craft-libs pins are unchanged.

* fix(svg): bound rgb() components and emit integer channels

clipped_rgb now stops at a fifth component instead of collecting an
unbounded comma list, and number-form channels are retried as integers
so a value such as 127.5 is accepted by the shared parser.

* fix(svg): finish parser routing and reject missing moveto

Route the newer Continue Path entry point through the shared adapter. Require an initial moveto and assert precise preflight refusal variants. Focused geom/SVG tests: 137 + 31 passed. Quadratic gradient parity remains a separate merge blocker.

---------

Co-authored-by: Dylan M. Taylor <dylan@dylanmtaylor.com>
2026-11-18 15:14:56 -05:00
Tanish Manku a8b43fd8c8 feat(audio): Convert Audio to Keyframes and Auto Lip-Sync note when the sound is not Stream-synced (M8) 2026-11-18 06:36:26 -07:00
Tanish Manku f90a3c45c1 docs: ADR 0117 (user themes from a folder), the guide, UI guidelines, roadmap, changelog and attribution (M8) 2026-11-18 06:27:11 -07:00
Tanish Manku 0a5547b6b1 feat(shell): user themes from a folder, checked for contrast, with two-tone icons and accent bars (M8) 2026-11-18 06:26:30 -07:00
Tanish Manku 2128f16c2c chore: merge main (pen and keep area, layer parenting) into audio to keyframes (M5) 2026-11-18 05:48:09 -07:00
Tanish Manku 1c31c9959b Merge remote-tracking branch 'origin/main' into HEAD 2026-11-18 04:49:55 -07:00
Tanish Manku f9712cbbbb fix(shell): the dialog's pickers take a widget id, not something a scanner reads as a cryptographic salt (M5) 2026-11-18 04:31:00 -07:00
Tanish Manku c978a60ab7 test: lint fixes in the sound analysis tests and the dialog (M5) 2026-11-18 04:31:00 -07:00
Tanish Manku d2238584ab feat(shell): Convert Audio to Keyframes and Auto Lip-Sync dialog with a live graph and stage preview, from Modify › Timeline and Properties (M5) 2026-11-18 04:30:42 -07:00
Tanish Manku dd31814668 fix(shell): the graphics-health test works on its own state, so app frames on other test threads can't take its news (M5) 2026-11-18 04:30:42 -07:00
mocenigo 309634a67c Fix the macOS crash when a file dialog is resized: show it as a sheet (#128)
Show macOS file dialogs as sheets so resizing them no longer crashes.
Finder and Dock opens wait while a file dialog, Save As question, or
plug-in Browse sheet is up. After document tabs landed, CloseFlow also
waits while the deferred system Save As panel is pending.
2026-11-18 18:23:40 +07:00
Tanish Manku 059642a9ef test: lint-clean Motion Editor footer (M1) 2026-11-18 04:07:55 -07:00
Tanish Manku e51292e7fd feat(shell): screenshot states for Keep area and the Pen on a path; the Motion Editor explains a following axis (M1) 2026-11-18 03:56:47 -07:00
Tanish Manku 47f7a8d585 feat(shell): the Pen breaks, adjusts, continues, adds and deletes points, with Shift steps and pointer marks (M1) 2026-11-18 03:54:33 -07:00
Tanish Manku 5ae4143df2 feat(shell): Keep area in Properties and the Motion Editor, which draws the derived scale curve (M1) 2026-11-18 03:45:53 -07:00
Tanish Manku ce8315ddda feat(shell): the timeline's parenting view: a parent column with draggable dots, a parent menu, the arm sample (M7) 2026-11-18 02:30:59 -07:00
Tanish Manku b70d0fb1dd docs: ADR 0112, the guide's document tabs, copying between documents and recovery sections, its pictures, roadmap and changelog (M8) 2026-11-18 01:25:26 -07:00
Tanish Manku 0f90ef98bc feat(shell): document tabs above the stage, each with its own session, view and autosave; New and Open bring a tab, closing asks about unsaved changes, quitting asks once for all (M8) 2026-11-18 01:24:58 -07:00
Tanish Manku 7f4e33b95e fix(stage): the drawn rotate cursor on a turned box, and the command reference after the rebase (M1) 2026-11-17 23:42:31 -07:00
Tanish Manku 9d7c925bf3 test: accessibility sweep, snapping and layer properties expectations for the transformation point and layer opacity; the command reference (M1) 2026-11-17 23:33:06 -07:00
Tanish Manku 963de39541 feat(shell): Free Transform's turned box, a draggable transformation point, and layer opacity in Layer Properties and the timeline (M1) 2026-11-17 23:33:06 -07:00
Tanish Manku 20ac637cc6 feat(doc): an instance's transformation point in tweens, and layer opacity as a fade group (M1) 2026-11-17 23:32:53 -07:00
Tanish Manku bd3fb93138 chore: merge main (shape commands, issue requests) into the editing issue fixes (M1)
Pasting keeps its float parameter beside the transform-origin parameters; the stage keeps the
resize tracking and the picker's eyedropper.
2026-11-17 22:46:56 -07:00
Tanish Manku 0566b715b9 chore: merge main into the editing issue batch (M1)
# Conflicts:
#	CHANGELOG.md
#	docs/guide/drawing.md
#	docs/roadmap.md
2026-11-17 21:50:44 -07:00
Tanish Manku 9249fb2fee docs: ADR 0109, the guide's drawing chapter, roadmap and changelog for the shape commands, picker eyedropper and transformation origins (M1)
The ADR file now holds number 0109, so its reservation row is gone. Context
help (F1) opens the guide at the new section from the two dialogs.
2026-11-17 21:21:57 -07:00
Tanish Manku cb366ee6bb feat(shell): Modify › Shape dialogs, the picker's eyedropper and Transform about (M1)
Expand Fill and Soften Fill Edges ask for a distance, direction and steps and
remember them; the Modify › Shape items are enabled by what the selection has.
While a colour picker popup is open the stage is its eyedropper: a chip shows
the colour under the pointer, a click gives it to the picker, Esc closes it.
Free Transform sends the transformation origin with turns, scales and skews,
marks each object's own point, and Properties shows Transform about.
2026-11-17 21:21:34 -07:00
Tanish Manku 6c1d1459d2 chore: merge main into the editing issue batch (M1)
# Conflicts:
#	CHANGELOG.md
2026-11-17 20:15:36 -07:00
Tanish Manku 199d7af539 docs: ADR 0108, the guide, changelog and roadmap for the editing issue batch (M1)
Floating paste, pictures from the system clipboard, refused merges and the
Fill/Stroke memory are recorded in ADR 0108. The command reference is
regenerated; clippy findings in the new tests are fixed.
2026-11-17 20:15:27 -07:00
Tanish Manku 10b742ef11 fix(stage): artwork on a masked layer hides selection stipple only where its mask shows it (M1)
Masked artwork hid nothing, so the stipple of a selection under it showed
through even where the artwork covers it. The idea is from the follow-up
commits of outside PR #404 (Untoldent); main's faster pass works on row spans,
so it is done there: the spans a mask does not show are set aside, the rest go
behind the artwork, with no path booleans, and a mask is outlined once a frame.
Soft masks still hide nothing. The PR's other follow-up (a symbol instance
below full opacity hides nothing) already holds on main: such an instance is a
group, and grouped artwork is never an occluder.

Measured (selection_overlay_cost, 720 selected raw pieces): 6.24 ms a frame,
as before (6.50 ms when the pass was rewritten); the same drawing under an
opaque sheet behind a 48-shape mask: 6.28 ms.
2026-11-17 20:07:40 -07:00
Tanish Manku 09c5ac371f fix(panels): the Scale row stays beside its label with the lock and a mixed selection (M8)
Whole percentages show without a decimal, and a mixed scale is one faint mark with the
explanation on hover, so the row no longer wraps under its label at the dock's default width.
2026-11-17 20:04:23 -07:00
Tanish Manku cec0f3dab1 feat(shell): Paste takes a picture copied in another app (M1)
Paste only knew AniCraft's own clipboard, so a picture copied in Paint.NET or
Aseprite, or a screenshot, gave 'the clipboard is empty', and Ctrl+V did nothing
at all: egui-winit turns that key into a paste event only when the clipboard
holds text. Paste (menu, context menu and Ctrl/Cmd+V) now places the system
clipboard's picture as a bitmap in the middle of the view, in the Library too,
when it is newer than what AniCraft copied (its own Copy leaves a text note on
the system clipboard). The swallowed key is recognised by its release. Reading
the clipboard is platform code and uses arboard, the library eframe already
uses for text, so no crate is added. Desktop only; vectors from other apps are
not read yet.

Fixes #263
2026-11-17 20:02:12 -07:00
Tanish Manku 01348ae851 chore: merge main (outside UI batch, start-up fixes) into issue requests (M8) 2026-11-17 20:00:14 -07:00
Tanish Manku f3308cda05 fix(stage): Free Transform shows a rotate cursor outside the corners (M1)
Rotation was there (drag just outside a corner) but the pointer showed the
system's shortcut arrow, so nobody found it. No desktop has a rotate cursor, so
the app hides the system one there and draws a curved double arrow bent around
the box, also while turning.

Fixes #194
2026-11-17 19:42:36 -07:00
Tanish Manku 33bdebad51 fix(stage): a relaxed double-click counts, as on the desktop around the app (M1)
A double-click on a raw fill selects it with its outline (since #92), but egui
only counts two clicks up to 0.3 s apart, measured in frames: a relaxed
double-click, or a slow frame after the first click, made it two clicks. The
app now allows the half second Windows and macOS do.

Fixes #192
2026-11-17 19:40:11 -07:00
Tanish Manku 490da4908b fix(properties): Fill and Stroke turn back on as they were, and Fill on a raw outline fills it (M1)
* The Fill checkbox refilled a shape with white. Turning a fill or a stroke off
  now remembers it for the session (element.set_fill / set_stroke {on}), so on
  again brings back its colour, gradient, bitmap or line; with nothing to
  remember it takes the tool's.
* With only a raw outline selected (double-click on it), Fill put a fill with
  no area on each side. It now refills the fill the outline surrounds, or
  fills the area it closes off as the Paint Bucket does, and says what to do
  when the lines close off nothing.
* The Stroke row has a checkbox like Fill, and the width stops at a hairline
  (0.1) instead of removing the stroke at 0.

Fixes #291
Fixes #292
Fixes #393
2026-11-17 19:37:04 -07:00
Tanish Manku 895b842624 fix(engine): pasted raw artwork floats, selected, until it is deselected (M1)
Paste in Center and Paste in Place merged raw shapes into the drawing at once,
so a copy pasted over its original joined it before it could be dragged away.
The editor now pastes with float: the raw shapes stay whole and selected on
top, and go into the drawing when the selection lets go of them (or when they
are dropped after a move), as in Animate. The merge belongs to the step around
it, so undoing the paste restores the drawing from before it. Scripts that
paste without float still merge at once.

Fixes #391
2026-11-17 19:30:28 -07:00
Tanish Manku 4ccb7d789b fix(timeline): a selected keyframe shows the hand, and its own cell no longer resizes the span before it (M1)
Moving keyframes works as in Animate (click to select, then drag), but nothing
said so, and a press on the left third of a keyframe cell grabbed the span-end
handle of the span before it instead. The hand cursor now shows over selected
frames that hold keyframes (closed while they move, the copy cursor with Alt),
a drag that starts on an unselected keyframe says how to move one, and the
span-end handle lies inside the span's last frame.

Fixes #344
2026-11-17 19:21:20 -07:00
Tanish Manku 75b4ce7ed6 fix(stage): resizing the Timeline or a dock keeps the artwork where it is on screen (M1)
The pan is measured from the canvas centre, so a panel that grew or shrank moved
the artwork. A view the artist chose now takes up the centre's move; a view still
as Fit in Window left it goes on fitting. Idea from outside PR #424 (Call4han),
done for every canvas change rather than only while a dock edge is dragged.

Fixes #423
2026-11-17 19:18:07 -07:00
Tanish Manku 008cdd1b3e chore: merge main into fix/issues-start-files 2026-11-17 19:13:25 -07:00
Tanish Manku 968946ea0b chore: merge main (outside features batch: skew) into the outside UI batch (M8) 2026-11-17 18:30:16 -07:00
Tanish Manku 95273a0909 test(gpu): the gate's tests wait on what happened, not on the clock (M8)
On the macOS and Windows runners a helper thread had not started its
submission when the test closed the gate 20 ms later. The tests now wait for
the state they are about (a channel, the gate's own counts) and keep only the
lower time bounds, which hold on any machine.
2026-11-17 17:43:16 -07:00
Tanish Manku feda02ade4 feat(shell): drag layers to reorder, all-layer buttons, a draggable layer column, Size in Properties, brushes keep their settings (#407, #422, #384, #294, #331) (M8) 2026-11-17 17:37:10 -07:00
Tanish Manku afe700b4df feat(shell): symbol types listed Movie clip, Button, Graphic; a movie clip the first time (#419) (M8) 2026-11-17 17:37:10 -07:00
Tanish Manku cb31b3bf49 Merge origin/main into the outside pull request batch (M8)
# Conflicts:
#	AUTHORS.md
#	CHANGELOG.md
#	crates/engine/src/merge_tests.rs
#	src/panels.rs
2026-11-17 17:30:37 -07:00
Tanish Manku ef3fc8b2e0 chore: merge main (outside core batch) into the outside features batch (M8) 2026-11-17 17:11:07 -07:00
Tanish Manku 3e7d86568a fix(web): the web version keeps a third of the desktop's frame cache (M8)
The stage keeps drawn frames in a cache with a 768 MiB budget. In a browser
tab, whose memory is one block that only grows, a 24-frame document filled
it: 900 MB for one moving symbol (#314). The web build's budget is 256 MiB
(30 frames of a 1920 x 1080 stage); the desktop's is unchanged.

Measured on the desktop while here (Windows 10, debug build, the sample
open, 10 s): 0 ms of CPU while idle, 226 MB working set.
2026-11-17 16:53:17 -07:00
Tanish Manku 61bc938f34 fix(app): a way of opening the window that crashed a start stays last for several starts (M8)
A start that died inside a graphics driver made that way go last for the
next start only, so on a machine whose driver crashes the process (#335:
igvk64.dll, an access violation) AniCraft crashed on every second start.
The way now goes last for 5 starts, then gets its chance; dying again holds
it back for 25, then 100. Each way is remembered on its own, one that comes
up is forgotten, and a way that fails without killing the process (an error,
a caught panic) is held back the same way, so later starts don't flash a
window with it first. What --renderer asks for is still tried first.
2026-11-17 16:48:36 -07:00
Tanish Manku c81de6d649 fix(gpu): submit stage work on the window's device only inside a frame (M8)
The stage renderer shares the window's device and submitted its work from the
render service's threads at any time. A window reconfigures its surface when
it opens and when it is resized, and wgpu fails that when another thread
submits meanwhile: 'Surface::configure: Failed to wait for GPU to come idle
before reconfiguring the Surface'. In 0.2.1 that error was a panic, so
AniCraft closed at start-up or on a resize (#264, #309, and with them the
'won't open' reports #421 #412 #313 #286 #285 #268 #164); since ADR 0092 it
is survived, at the cost of a skipped frame, an autosave and a status line
blaming the graphics driver.

A SubmitGate (crates/gpu) is open while the window's thread runs the app's
frame and closed otherwise, also around windows drawn inside the frame (Test
Movie, floating panels). Work waits for it (asking for a frame), at most
250 ms; the renderer's starting self-test goes through it too.

Measured on Windows 10, RTX 5090, Vulkan, --screenshot starts: the error in
3 of 20 starts before, 0 of 20 after; 2.81 s and 2.80 s per run.
2026-11-17 16:48:36 -07:00
Tanish Manku 76942283c2 chore: merge main into fix/outside-batch-core 2026-11-17 16:26:38 -07:00
Tanish Manku 68898eb549 Merge origin/main into the outside pull request batch (M8)
# Conflicts:
#	CHANGELOG.md
2026-11-17 16:02:56 -07:00