@jsenv/navi 0.29.482 → 0.29.484

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.
@@ -158,6 +158,23 @@ where a separator would leave a stray gap next to something invisible; and
158
158
  `preventSpaceUnderlines`, which `Link` sets, so an underline stops at the text
159
159
  instead of running under the spaces.
160
160
 
161
+ ## Faces
162
+
163
+ The document writes in the browser's control face: navi sets it as
164
+ `font-family` on `:root`, in its layer, so a page that says nothing gets its
165
+ text and its buttons in one face, and the app's own `font-family` there wins.
166
+
167
+ Controls carry no face of their own: they write in `inherit`, so what a
168
+ container says reaches the button, the field and the picker inside it. To give
169
+ them one, set `--navi-control-font-family` — on `:root` for the whole app, or
170
+ on a subtree. A `Button` reads `--button-font-family`, which defaults to that
171
+ token; a bare or text `Picker` writes in its container's face whatever the
172
+ token says, its drawing being the caller's.
173
+
174
+ A popup keeps the face of what opened it — a picker's popup, the picker's — so
175
+ a menu needs no font of its own (see
176
+ [what reaches a popup from its opener](./css_architecture.md#a-surface-is-a-new-paper-what-reaches-a-popup-from-its-opener)).
177
+
161
178
  ## Emoji
162
179
 
163
180
  **An emoji is not a character the layout can absorb.** The system emoji fonts
@@ -6,6 +6,19 @@ document. An app that starts a transition of its own runs into a handful of
6
6
  browser facts no component can absorb for it; they are collected here so that
7
7
  they are met once.
8
8
 
9
+ Two of them are absorbed by the function navi starts its own with, and an app
10
+ starts its own with it too. `ensureDocumentStartViewTransition()` installs
11
+ `document.startViewTransition` where the browser has none and returns the
12
+ function to call: it runs the update whatever happens, and swallows the
13
+ rejection a skipped transition leaves behind (see
14
+ [below](#ready-rejects-when-the-transition-is-skipped-finished-when-the-update-fails)).
15
+ Ending it still takes both ways of `finished`:
16
+
17
+ ```js
18
+ const startViewTransition = ensureDocumentStartViewTransition();
19
+ startViewTransition(() => setItems(next)).finished.then(done, done);
20
+ ```
21
+
9
22
  - [A name is unique per document](#a-name-is-unique-per-document)
10
23
  - [Nested groups, and the fallback fade](#nested-groups-and-the-fallback-fade)
11
24
  - [Rendering is suspended for the whole callback](#rendering-is-suspended-for-the-whole-callback)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/navi",
3
- "version": "0.29.482",
3
+ "version": "0.29.484",
4
4
  "type": "module",
5
5
  "description": "Library of components including navigation to create frontend applications",
6
6
  "repository": {
@@ -34,8 +34,8 @@
34
34
  "preact": "^11.0.0-rc.2"
35
35
  },
36
36
  "dependencies": {
37
- "@jsenv/dom": "0.17.95",
38
- "@jsenv/humanize": "1.8.9",
37
+ "@jsenv/dom": "0.17.96",
38
+ "@jsenv/humanize": "1.8.10",
39
39
  "@jsenv/validity": "0.4.7"
40
40
  },
41
41
  "devDependencies": {