@swiftbrowser/web 0.9.8 → 0.9.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swiftbrowser/web",
3
- "version": "0.9.8",
3
+ "version": "0.9.9",
4
4
  "type": "module",
5
5
  "description": "SwiftBrowser web renderer and dev server: applies render ops from a Swift/Wasm app to the DOM inside an iPhone frame.",
6
6
  "repository": {
package/src/protocol.ts CHANGED
@@ -2314,6 +2314,12 @@ export interface ScrollToCommand {
2314
2314
  anchor: UnitPoint | null;
2315
2315
  /** Increases with every request (across readers); the page carries out each serial once. */
2316
2316
  serial: number;
2317
+ /**
2318
+ * The axes to scroll on; both when omitted. `.scrollPosition(id:)` names
2319
+ * its scroll view's axes, so setting it scrolls that view alone and not a
2320
+ * list the view sits in.
2321
+ */
2322
+ axes?: ScrollAxes;
2317
2323
  }
2318
2324
 
2319
2325
  export interface Style {
package/src/scrollTo.ts CHANGED
@@ -82,8 +82,9 @@ export function scrollToTarget(
82
82
  const target = result.chrome.get(id)?.['row'] ?? result.frames.get(id);
83
83
  if (!target) return 0;
84
84
  const anchor = anchorOf(command);
85
- let horizontalDone = false;
86
- let verticalDone = false;
85
+ // Axes the command leaves out are done before they start.
86
+ let horizontalDone = command?.axes === 'vertical';
87
+ let verticalDone = command?.axes === 'horizontal';
87
88
  let scrolled = 0;
88
89
  for (let at = ctx.parents.get(id); at !== undefined && at !== 0; at = ctx.parents.get(at)) {
89
90
  const node = ctx.nodes.get(at);