gesso-core 0.2.0 → 0.3.0

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,71 @@
1
1
  # gesso-core
2
2
 
3
+ ## 0.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 025321a: **`fanOut`, for when every node wants its own slice.** One source, N things on
8
+ screen, each reading one part of it: a grid, a timeline, a log viewer all arrive
9
+ at this shape, and the natural spelling does not scale. A pipe per slice runs N
10
+ pipelines on every emission whatever changed, and RxJS removes an observer from a
11
+ Subject by scanning its list, so tearing down a window of N is quadratic.
12
+
13
+ `fanOut(source, read, { initial })` holds one subscription for the whole registry
14
+ and hands out a stable cell per key. Its `changed` hint is where a frame is won: a
15
+ source that knows which keys a patch touched reads only those. Ten thousand live
16
+ keys, measured against a pipe per key: mount 29.8 ms to 10.7 ms, teardown 9.7 ms
17
+ to 3.7 ms, and one key changing 2.2 ms to 0.1 ms.
18
+
19
+ Reach for it when N is large _and each emission touches few of them_. A source
20
+ that republishes its whole window on every scroll gets the cheaper mount and
21
+ teardown and nothing from `changed`, because every key really did change.
22
+
23
+ It compares by reference where `select` and `derive` compare by content, which is
24
+ the opposite default for the opposite reason: those run once per emission and this
25
+ runs once per live key per emission. And a registry that has grown past a couple
26
+ of thousand keys having released none of them says so once, because `release` is
27
+ the caller's and forgetting it is the one thing here that goes wrong silently.
28
+
29
+ **`tabStop`, which is `tabindex="-1"`.** Focusable, reachable by a press and by
30
+ `focus()`, skipped by the Tab cycle. `focusable` only ever answered "may this node
31
+ hold focus", which is the wrong question for a container: `UiFocusManager.settleScope`
32
+ blurred when a scope held nothing focusable, so a `Dialog` whose content is a
33
+ sentence handed the keyboard to nothing and could not be dismissed with Escape.
34
+ `settleScope` now falls back to the scope root before blurring, and `Dialog` sets
35
+ `focusable: true, tabStop: false` on its body. Both halves are needed and neither
36
+ is enough alone.
37
+
38
+ **`borders()`, a border per edge, as paint.** `borderWidth` is one number and
39
+ `borderColor` one colour, so a node could not have a heavy bottom edge and a
40
+ hairline top. A border here is paint-only and a decoration is already a coloured
41
+ rectangle in the node's own paint pass, so four edges are four draw instances and
42
+ no extra nodes. `DecorationBox` gains `right` and `bottom` to put them: any two of
43
+ near edge, size and far edge fix an axis, which is CSS's rule for an absolutely
44
+ positioned box, and the only one that can express a side edge spanning between two
45
+ horizontal ones.
46
+
47
+ **`menuBarStep`, a menu bar's keyboard, as a peer of `Menu`.** `Menu` traps focus,
48
+ which is right for a popup opened by a button and wrong for a bar: with focus in
49
+ the panel, ArrowLeft cannot reach the bar to move to the menu next door, and that
50
+ is most of what makes a bar a bar. A pure function, generic in the command type,
51
+ that returns null for a key it does not claim, so a bar can still be tabbed out of.
52
+
53
+ ### Patch Changes
54
+
55
+ - 025321a: **A finger can scroll a surface on both of its axes.** `UiTouchScroller` picked one
56
+ axis per container from its flex direction, exactly as `UiWheelController` did
57
+ before it was fixed, and dropped the other. So a viewport whose content overflows
58
+ in both directions — a spreadsheet's, which is one `ScrollView` over content wider
59
+ and taller than itself — could not be dragged sideways at all.
60
+
61
+ Each axis is now asked separately whether the container has room, through a
62
+ `hasScrollRoom` the wheel and the touch paths share rather than write twice, so
63
+ the two cannot drift on which container takes a gesture. A fling coasts per axis
64
+ and each axis passes the threshold on its own, so a diagonal throw coasts on both
65
+ and a vertical one does not drift sideways by whatever the thumb happened to do.
66
+
67
+ ## 0.2.1
68
+
3
69
  ## 0.2.0
4
70
 
5
71
  ### Minor Changes