gesso-core 0.5.1 → 0.6.1
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 +33 -0
- package/dist/{CanvasSurface-Dok8FuyX.js → CanvasSurface-Bxu_gNmc.js} +643 -205
- package/dist/CanvasSurface-Bxu_gNmc.js.map +1 -0
- package/dist/{index-B3zydgF2.d.ts → index-BlgkuO3e.d.ts} +235 -17
- package/dist/index.d.ts +2 -2
- package/dist/index.js +80 -42
- package/dist/index.js.map +1 -1
- package/dist/testing.d.ts +1 -1
- package/dist/testing.js +2 -1
- package/dist/testing.js.map +1 -1
- package/package.json +1 -1
- package/dist/CanvasSurface-Dok8FuyX.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# gesso-core
|
|
2
2
|
|
|
3
|
+
## 0.6.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 45f3ffe: Copying a selection over truncated text now copies the text the truncation hides, as a browser does with `text-overflow`. A `<text>` with `maxLines` or `textOverflow="ellipsis"` used to copy only the glyphs it drew, so a title shown as "Brand Story & Brand…" copied as "Brand Story & Brand".
|
|
8
|
+
|
|
9
|
+
A selection that stays inside the drawn glyphs still copies just those. One that reaches the end of a truncated line, onto the far half of the ellipsis or past the last glyph, copies through the end of the string, and so do select all, a selection that runs through a truncated node on its way to the next, and a triple click on the line. A double click on a word the ellipsis cuts takes the whole word. The ellipsis is highlighted whenever the selection includes text it hides.
|
|
10
|
+
|
|
11
|
+
`ParagraphGeometry` gains `source`, the whole text, and `sourceEnd`, the offset a selection may run to; `offsetAtPointIn` can answer `sourceEnd` and `selectionRectsIn` includes the ellipsis box for a range that reaches past `end`.
|
|
12
|
+
|
|
13
|
+
## 0.6.0
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- bf21b17: A `Dialog` dims the page behind it, as a browser draws `<dialog>::backdrop`. Palettes have a new `scrim` token, a colour with alpha: the light page's ink at 40% in `lightColors`, black at 60% in `darkColors`, and left alone by high contrast. A custom palette written out in full needs one. Overlay entries take `scrim`, on by default for a `modal` entry and off for every other, so a menu or a list of suggestions never dims the page; the scrim takes its theme from the entry's `environment` and fades in at a dialog's pace, or appears at once under reduced motion. `Dialog` takes `scrim={false}` to leave the page undimmed; its backdrop still keeps the page from presses.
|
|
18
|
+
- 013e064: `color` cascades, as the property reference always said it did: text that names no colour takes the `color` of the nearest ancestor that set one, unless a nearer `textStyle` brings its own. A theme token travels as a name and is resolved where the text is painted, so `<box theme={darkTheme} color="text">` draws its plain text in the dark palette's `text`, and a card inside it that provides another theme draws in that theme's. Until now a node's own `color` reached nothing below it, and plain text under a dark root drew in the default style's near-black on the dark background. Text that already names a colour or a role is unchanged; text that names neither, under a container that sets a `color`, now takes that colour. Changing a cascaded colour repaints the subtree without laying it out again. `UiEnvironmentKeys.color` is the new key the colour travels on, and an overlay carries it from where it was declared.
|
|
19
|
+
- 684d68a: The text style properties cascade, as the property reference always said they did: `fontFamily`, `fontSize`, `fontWeight`, `lineHeight`, `letterSpacing`, `textAlign`, `textDirection`, `fontStyle`, `fontStretch`, `fontVariant`, `fontKerning` and `textDecoration` set on a container now reach the text below it. Until now they were inherited only from the nearest `textStyle`, so `<row fontSize={12}>` left every text in the row at the default 14. A container's fields are laid over the style in scope, so `<box textStyle="body" fontWeight={600}>` gives its text the body style in a heavier weight, and a text that sets a field itself keeps its own. A container that sets `fontSize` without `lineHeight` gives the text below it a normal line for that size, 1.2 times it, as it already did for itself. Text under a container that sets one of these now draws, and measures, with it. Changing a cascaded underline, alignment or direction repaints the subtree without laying it out again.
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- 3b20918: An absolutely positioned node is placed again when its containing block changes size, even when its parent keeps its box. A panel pinned to the window's corner from inside a column used to stay where that corner was when the window was resized, because nothing placed the column, and so the panel, again.
|
|
24
|
+
- e9f86a2: An anchored overlay (a tooltip, a menu, a popover) now opens beside where its anchor is drawn when an ancestor of the anchor has a `transform`. A card on a panned and zoomed canvas used to get its tooltip where the card would be at zoom 1 with no pan, often nowhere near it; the anchor is now carried through every ancestor's translate, scale and rotation, as well as the scroll offsets it already followed, and an overlay that lives under a transform of its own is placed in that space. The accessibility mirror puts its elements over the same drawn boxes, so a screen reader's outline and touch exploration find the card where it is. A node's own transform still takes no part, so a turning spinner neither shakes its tooltip nor moves its element. `LayoutEngine.screenBox(node)` answers the question for anything else that needs it.
|
|
25
|
+
- a81d551: A row or column without a size of its own no longer comes out wider than the space it was given because a `flex: 1` child holds long content. It wrapped around that content's whole line, past its own maximum, and nothing flexed: in a fixed-size button, which centres its content, a long label was pushed off both edges and the first words of it were clipped. The container now stops at the space there is, and the flexible child takes what is left, wrapping or truncating its text there.
|
|
26
|
+
- 820aee8: Everything that measures a node against the canvas now takes the `transform` of every ancestor into account, as painting and hit testing always have. Under a panned and zoomed parent (cards on a map inside a "camera" box) several things used to work from where the node would be drawn at zoom 1 with no pan:
|
|
27
|
+
|
|
28
|
+
- A press from the accessibility mirror or an automation tool, and Enter or Space on a focused button, now click the centre the node is drawn at rather than a point that could be off the node entirely.
|
|
29
|
+
- A modifier's `layoutBox()` and the box `onLayout` reports are the drawn box, so a slider, split pane or colour picker on a zoomed card turns a press into the right value, and `onLayout` hears when a pan above the node moves it on screen. Its size is the drawn size, so a fraction of it stays a fraction; `flowBox()` keeps the laid-out size, and the motion pivot, `breakpoint`, `sizeContainer` and `publishInset` now read that, so a zoom neither shifts a pivot nor crosses a breakpoint. The new `measureFlow` modifier is `measure` for the laid-out box; a virtual list's reveal and a `DataTable`'s sticky header use it, so they scroll by the right amount under a zoom.
|
|
30
|
+
- The caret rectangle handed to the shell, which positions the hidden text field and the IME candidate window, follows the caret where it is drawn.
|
|
31
|
+
- A press beside the fields of an editing group, a drag across them, and a text selection dragged past the end of a line find the field or line nearest the pointer on screen.
|
|
32
|
+
- The mirror's box for a focused node that is scrolled out of view, and the layout inspector's highlight and heatmap, are drawn over the node where it is.
|
|
33
|
+
|
|
34
|
+
`LayoutEngine.screenBox(node, part?)` takes an optional rectangle in the node's own coordinates and answers where that part of it is drawn. `EditingHost` and `SelectionHost` take an optional `screenBox`; a host without one behaves as before. With no transform above a node, every answer is the same as before.
|
|
35
|
+
|
|
3
36
|
## 0.5.1
|
|
4
37
|
|
|
5
38
|
### Patch Changes
|