Skip to content

chore: release version 2.1.0-alpha02#102

Merged
akshay2211 merged 3 commits into
mainfrom
release/2.1.0-alpha02
Jul 7, 2026
Merged

chore: release version 2.1.0-alpha02#102
akshay2211 merged 3 commits into
mainfrom
release/2.1.0-alpha02

Conversation

@akshay2211

Copy link
Copy Markdown
Owner

Second 2.1 pre-release. Two additive seams for hosts that want to layer on
top of DrawBoxController (an intents SharedFlow and an overlay slot on
DrawBox), plus a fix for finger-drawn strokes on WASM/browser and for
translucent pen colours rendering as beaded dots.

No breaking changes on top of 2.1.0-alpha01. New surfaces stay under the
alpha stability bucket described in that release.

Added

  • DrawBoxController.intents: SharedFlow<Intent> — observable stream of
    processed intents. Emission happens after the reducer runs and state has
    been updated, so subscribers can read state.value at emission time and
    see the resulting state. Unblocks layered controllers (brush), collaboration
    transports, and analytics recorders without subclassing or state-diffing.
    Buffered so slow subscribers don't back-pressure the drawing loop. (Open extension seams on DrawBoxController + DrawBox for brush and future collab v2 #99)
  • overlay slot on DrawBox — new overlay: @Composable BoxScope.() -> Unit
    parameter, composed inside the canvas Box above strokes and selection
    chrome. Renders in screen space; hosts anchor to world coordinates via
    state.viewport. Default is a no-op, so existing call sites are
    unchanged. (Open extension seams on DrawBoxController + DrawBox for brush and future collab v2 #99)

Fixed

  • Finger strokes halved on WASM/browser (Inconsistent line size #98). Pointer pressure is now
    trusted only from Stylus and Eraser input types. WASM/browser touch
    reports the W3C default 0.5 when there is no pressure sensor, which
    was silently halving finger strokes. Mouse and capacitive touch now fall
    back to unit pressure.
  • Translucent pen strokes beading into dots (wrong lines when color has alpha channel  #97). The same touch
    pressure jitter was pushing uniform strokes into the variable-width
    branch, where per-segment round caps stacked alpha and beaded
    translucent colours. Also composites the variable-width path through
    canvas.saveLayer when alpha < 1, so a legitimate pen stroke with a
    translucent colour renders as a single translucent line instead of a
    chain of overlapping dots. (fix: ignore touch/mouse pressure and composite alpha strokes via layer #101)

@akshay2211 akshay2211 self-assigned this Jul 7, 2026
@akshay2211 akshay2211 merged commit 6d33730 into main Jul 7, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant