@ashley-shrok/viewmodel-shell 3.0.0 → 3.0.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.
Files changed (2) hide show
  1. package/dist/browser.js +6 -1
  2. package/package.json +1 -1
package/dist/browser.js CHANGED
@@ -116,7 +116,12 @@ export class BrowserAdapter {
116
116
  el.scrollLeft = left;
117
117
  }
118
118
  });
119
- window.scrollTo(winScrollX, winScrollY);
119
+ // Only restore window scroll when the page was actually scrolled — restoring
120
+ // to (0,0) is a no-op, and skipping it avoids jsdom's noisy "Not implemented:
121
+ // window.scrollTo" virtual-console log in unit tests (jsdom never scrolls, so
122
+ // the captured offsets are 0). Mirrors the `el.scrollTop !== 0` guard above.
123
+ if (winScrollX !== 0 || winScrollY !== 0)
124
+ window.scrollTo(winScrollX, winScrollY);
120
125
  // 1.2.0 — restore collapsible-section open state after node() rebuild +
121
126
  // after focus/scroll restore. Keys absent from the new tree are
122
127
  // naturally dropped (querySelectorAll just doesn't find them); new
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ashley-shrok/viewmodel-shell",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "A server-driven UI framework where the wire format is structured enough that agents can build full-stack apps without ever opening a browser and all UI tests are pure unit tests with no browser runtime. Server returns a JSON tree of typed nodes; a thin TypeScript adapter renders it to DOM. Backend-agnostic — a .NET reference backend ships with the repo, but any language can produce the JSON contract.",
5
5
  "type": "module",
6
6
  "license": "MIT",