gesso-core 0.6.18 → 0.6.20

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,26 @@
1
1
  # gesso-core
2
2
 
3
+ ## 0.6.20
4
+
5
+ ### Patch Changes
6
+
7
+ - `recycle: true` keys a lazy list's items by slot, as a native list recycles its cells: an item leaving the window frees its slot and the next item to come takes it, so its node is reconciled with the new index rather than built, and the component it renders keeps its instance. Once the overscan has filled, a scroll no longer builds or removes rows. A node moved among its siblings, as a recycled row is on every frame, is relinked in place (`UiGraph.moveWithin`) rather than detached and inserted, which walked its whole subtree to re-inherit what its unchanged parent already gave it.
8
+ - A scroll layer is kept through a lazy list's scroll and redraws only what changed. It was dropped by any change inside its container and by any change anywhere that moved a box, so a lazy list, which mounts rows on nearly every frame of a scroll, never kept one. Changes inside the container are now damage, item by item, so a scrolling list redraws only the strip the scroll exposed; an ancestor marked for paint alone no longer drops the layer; nodes dirtied after collection (an editor's scroll listener) are added to the frame's `changes` rather than withholding them; and the layer follows a trackpad's fractional offset, snapped to a device pixel. In Easel the editor keeps one layer through a whole flick, and the renderer's time per frame in Chrome went from 1.94 ms to 1.41.
9
+ - `scrollbars: 'none'` gives a scroll container no scrollbars: neither renderer draws a thumb and none can be grabbed. It is for a container moved by code rather than by the person, such as a minimap's window onto its picture, which flashed an overlay scrollbar claiming it could be scrolled.
10
+ - A node or component whose definition is the same object as last time is skipped when reconciled again. A lazy list hands back the element it made for an index on every scroll, so each row entering the window reconciled every row already in it; in Gesso Code's editor that was 2 to 7 ms of a 120 Hz frame on a fast flick. Row building on a flick went from 1.4 ms a frame to 0.7 at the median.
11
+ - The Canvas2D renderer keeps static text as pixels. A text is drawn once into a canvas of its own, at the device scale and fraction of a pixel it lands on, and copied onto each frame while nothing it was drawn from changes, so a scroll neither draws its glyphs nor lays it out again; the copy is the pixels a direct draw would have made. Text that changes on most frames is drawn directly, and text not drawn for two seconds is let go of. Flicking through a file in Easel, the renderer's time per frame went from 4.1 ms to 1.9 in Chrome and from 3.9 ms to 1.6 in WKWebView. The Canvas2D renderer option `textCache: false` draws every glyph every frame, as before.
12
+ - A trackpad scrolls evenly. A Mac trackpad reaches the page as whole pixels at uneven times, delivered 6 to 14 ms after they happened, and the velocity read off the last few steps carried all of that into the frames, so a slow scroll moved 2.5, 1, 0, 3 pixels a frame. Each frame now reads a line fitted through the last 48 ms of steps, at 12 ms before the frame as a browser resamples, so it runs through steps that have arrived rather than guessing past them; until there are three steps the page eases toward where they add up to. On a display faster than the trackpad the prediction is no longer cut short, which made a flick stutter in 2- and 17-pixel frames. Replayed from recorded flicks on a 165 Hz display, frame-to-frame variation went from 85% to 13% at the median. A lone wheel step still lands on the next frame.
13
+ - A render worker whose own refreshes keep no display's time draws on the display's beat. WebKit gives a worker a `requestAnimationFrame` from a timer near 65 Hz, so on a 120 Hz display frames fell 15 to 16.4 ms apart and a scroll juddered. The shell now measures the display's interval and sends it to the worker; once the worker's refreshes show themselves slower, the frame clock follows the shell's refreshes, stamps each frame with its refresh on the worker's own clock, and gives a frame too costly for one refresh an even two, so the pace does not change mid-scroll.
14
+
15
+ The stride between refreshes also follows the typical frame rather than the slow ones: it lengthens when the median frame passes three quarters of its refreshes and shortens once the median of the last thirty fits in six tenths of one fewer. It held Easel at 82 frames a second on a 165 Hz display whose typical frame took under half a refresh; measured since, 861 of 1,018 frames come a refresh apart, against 15.
16
+
17
+ ## 0.6.19
18
+
19
+ ### Patch Changes
20
+
21
+ - c047559: An empty lazy list laid out at no size, as one not shown yet is, no longer counts toward the warning that a list's viewport is the size of its content. Zero against zero said nothing about the list, but it was one of the two landings the warning waits for, so a single resize that happened to match the content later was enough to warn about a list that was bounded all along.
22
+ - `pointerEvents` now inherits the way CSS's `pointer-events` does. A node under `pointerEvents: 'none'` is passed over by hit testing, but its children are still tested, and one that sets `pointerEvents: 'auto'` takes presses again. Before, `'none'` cut the whole subtree out with no way back, so a popup set to `'auto'` inside an overlay set to `'none'` (to let presses through to what is under it) could never be clicked: the press went through it to whatever was beneath. Focus and the keyboard are unchanged: `'none'` on a node itself still keeps it from both. `pointerEventsOf(node)` gives a node's inherited value.
23
+
3
24
  ## 0.6.18
4
25
 
5
26
  ### Patch Changes