gesso-core 0.4.0 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,72 @@
1
1
  # gesso-core
2
2
 
3
+ ## 0.4.2
4
+
5
+ ### Patch Changes
6
+
7
+ - d27e076: **The wheel scrolls an editable that overflows.** A multiline field with a fixed
8
+ height, or an unwrapped one narrower than its line, followed the caret and
9
+ nothing else: a wheel over it did nothing. It now scrolls the field's text on
10
+ either axis, clamped where the caret-follow offset is and without moving the
11
+ caret, and a wheel the field has no room for chains to the scroll container
12
+ around it, as one from a scroll container's end does.
13
+
14
+ A multiline field also shows the overlay scrollbar a scroll container does,
15
+ fading when idle, revealed by hovering its edge, and draggable once it shows.
16
+ While hidden it takes no presses, so a click at the end of a line still places
17
+ the caret. A single-line field draws none.
18
+
19
+ `scrollRange(record, axis)` is the furthest a record can scroll, the one answer
20
+ the layout engine's clamp, the scrollbars and the scroll sinks now all read.
21
+
22
+ - d6c52da: **`scrollWith`: a container that scrolls in step with another node.** Binding a
23
+ container's `scrollY` to what `scrollPosition` reports leaves it a frame behind,
24
+ because the report arrives after the frame is laid out. A line-number gutter
25
+ beside a field, or a row header beside a grid, has to line up on every frame.
26
+ `scrollWith` names the node to follow and `scrollWithAxis` the axes (`both` by
27
+ default); the follower takes the leader's effective offset in the same layout
28
+ pass that settles it, whatever moved the leader. It ignores its own offset on a
29
+ followed axis, shows no scrollbar, and passes a wheel over it to the leader. An
30
+ `overflow="hidden"` box that follows is scrolled all the same, as script scrolls
31
+ one in CSS.
32
+
33
+ `scrollPosition` on an `<editabletext>` reports how far the field has scrolled
34
+ its own text, from the wheel, its scrollbar, the caret or a clamp.
35
+
36
+ ## 0.4.1
37
+
38
+ ### Patch Changes
39
+
40
+ - **Scroll layers: a scrolled container is shifted, not redrawn.** On Canvas2D,
41
+ when a frame's only change is a scroll container's offset by a whole number of
42
+ device pixels, the renderer copies the pixels it already drew inside it over by
43
+ the scroll distance and redraws only the strip that came into view —
44
+ pixel-for-pixel identical to a full redraw, and several times cheaper in
45
+ software rendering. A layer is built only after the container has scrolled on a
46
+ few quiet frames running (`scrollLayerSettleFrames`, default 3), so a
47
+ virtualised list that mounts rows as it scrolls never builds one. Anything else
48
+ — a fractional smooth-wheel offset, a zoom, content that changes as it scrolls,
49
+ a caret or video inside — is drawn directly as before.
50
+ `Canvas2DRendererOptions.scrollLayers` turns it off. WebGPU is unchanged.
51
+
52
+ **Pictures that change every frame are no longer rasterised every frame.** On
53
+ Canvas2D, a painter's recording whose drawing changed this frame is replayed
54
+ straight onto the frame and rasterised only once it has held still for four
55
+ frames, so a live layer is never turned into a bitmap it throws away. A picture
56
+ seen for the first time, resized or re-themed is still rasterised at once.
57
+ `PaintStats` counts the replays as `direct`.
58
+
59
+ **A held mouse click is still a click.** A mouse press held past the long-press
60
+ delay lost its Click, so a deliberate, slow press on a button did nothing. A
61
+ mouse long press is now claimed only when a listener takes it (`preventDefault`
62
+ on `LongPress`) or it moves into a Drag. A finger's hold is claimed as before.
63
+
64
+ **`overscrollBehavior="contain"` keeps the wheel in a mounted app.** It was read
65
+ from the tree's topmost node, which in a mounted app is the runtime's wrapper,
66
+ not the app's root, and mid-chain it was honoured only on scroll containers. It
67
+ is now honoured on any ancestor of the target, so a pan-and-zoom canvas can keep
68
+ a ctrl-wheel or trackpad pinch from zooming the page.
69
+
3
70
  ## 0.4.0
4
71
 
5
72
  ### Minor Changes