@swiftbrowser/react 0.9.12 → 0.9.13
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/README.md +13 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/modifiers.d.ts +11 -1
- package/dist/modifiers.d.ts.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -230,7 +230,11 @@ another sidebar row adds one (the first choice does not), and back or
|
|
|
230
230
|
forward selects the row the entry recorded, through the row's own tap. The
|
|
231
231
|
URL is left alone: an app that maps screens to paths sets them with
|
|
232
232
|
`history.replaceState` on the entry the renderer made (a `pushState` of its
|
|
233
|
-
own would add a second entry for the same screen).
|
|
233
|
+
own would add a second entry for the same screen). When the app pops on its
|
|
234
|
+
own (the bar's back button), the renderer's step back is asynchronous and
|
|
235
|
+
the app's `replaceState` for what it shows now runs before it lands; the
|
|
236
|
+
renderer sets that URL again on the entry it arrives at, so the address bar
|
|
237
|
+
follows either back button.
|
|
234
238
|
On a phone, a `fill` island follows the on-screen keyboard (`keyboard`,
|
|
235
239
|
on by default for `fill`, or `mount(..., { keyboard: true })`): its height
|
|
236
240
|
becomes a bottom inset, so a field, a bottom search field or a chat's
|
|
@@ -262,6 +266,10 @@ swapped item (`{playing ? <ToolbarItem>…stop…</ToolbarItem> :
|
|
|
262
266
|
<ToolbarItem placement="bottomBar">{toolButtons}</ToolbarItem>
|
|
263
267
|
```
|
|
264
268
|
|
|
269
|
+
`placement="largeTitle"` (iOS 26) puts a view in the large title row in
|
|
270
|
+
place of the title's text, a logo beside the screen's name say; it scrolls
|
|
271
|
+
away with the content and the bar shows `navigationTitle` once it has.
|
|
272
|
+
|
|
265
273
|
```tsx
|
|
266
274
|
<List
|
|
267
275
|
navigationTitle="Notes"
|
|
@@ -337,6 +345,10 @@ scroll view's leading edge (or `scrollPositionAnchor`), and setting it
|
|
|
337
345
|
scrolls there, on that scroll view's axes only. `proxy.scrollTo(id, anchor,
|
|
338
346
|
{ axes: 'horizontal' })` limits a reader's scroll the same way, so a pager
|
|
339
347
|
inside a list leaves the list where it is.
|
|
348
|
+
`onScrollVisibilityChange={(visible) => …}` (or `{ threshold, action }`,
|
|
349
|
+
0.5 by default) is `.onScrollVisibilityChange`: it hears when that share
|
|
350
|
+
of the view comes into its scroll view's visible area, below a bar the
|
|
351
|
+
view scrolls under, or leaves it.
|
|
340
352
|
Name a coordinate space with `coordinateSpace="page"` on the `ScrollView`
|
|
341
353
|
(or any view), and a `GeometryReader` inside reads its frame there with
|
|
342
354
|
`proxy.frame({ named: 'page' })`, updated as the page scrolls.
|
package/dist/index.js
CHANGED
|
@@ -1676,6 +1676,8 @@ function toolbarPlacement(name) {
|
|
|
1676
1676
|
return "leading";
|
|
1677
1677
|
case "principal":
|
|
1678
1678
|
return "principal";
|
|
1679
|
+
case "largeTitle":
|
|
1680
|
+
return "largeTitle";
|
|
1679
1681
|
case "bottomBar":
|
|
1680
1682
|
return "bottom";
|
|
1681
1683
|
case "secondaryAction":
|
|
@@ -1752,6 +1754,7 @@ const MODIFIER_KEYS = /* @__PURE__ */ new Set([
|
|
|
1752
1754
|
"alert",
|
|
1753
1755
|
"confirmationDialog",
|
|
1754
1756
|
"presentationDetents",
|
|
1757
|
+
"onScrollVisibilityChange",
|
|
1755
1758
|
"onTapGesture",
|
|
1756
1759
|
"dragGesture",
|
|
1757
1760
|
"magnifyGesture",
|
|
@@ -2093,6 +2096,10 @@ function apply(key, value, node, sides) {
|
|
|
2093
2096
|
case "presentationDetents":
|
|
2094
2097
|
sides.push(presentationDetents(value));
|
|
2095
2098
|
return node;
|
|
2099
|
+
case "onScrollVisibilityChange": {
|
|
2100
|
+
const spec = typeof value === "function" ? { action: value } : value;
|
|
2101
|
+
return sb("styled", { style: { scrollVisibility: { threshold: spec.threshold ?? 0.5 } } }, { scrollvisibility: (event) => spec.action(event.visible) }, node);
|
|
2102
|
+
}
|
|
2096
2103
|
case "onTapGesture":
|
|
2097
2104
|
return sb("tapgesture", {}, { tap: value }, node);
|
|
2098
2105
|
case "dragGesture": {
|