@tanstack/svelte-virtual 3.13.53 → 3.13.55

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/dist/index.js CHANGED
@@ -48,8 +48,8 @@ export function createWindowVirtualizer(options) {
48
48
  observeElementRect: observeWindowRect,
49
49
  observeElementOffset: observeWindowOffset,
50
50
  scrollToFn: windowScroll,
51
- initialOffset: () => typeof document !== 'undefined'
52
- ? options.horizontal
51
+ initialOffset: (instance) => typeof document !== 'undefined'
52
+ ? instance.options.horizontal
53
53
  ? window.scrollX
54
54
  : window.scrollY
55
55
  : 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/svelte-virtual",
3
- "version": "3.13.53",
3
+ "version": "3.13.55",
4
4
  "description": "Headless UI for virtualizing scrollable elements in Svelte",
5
5
  "author": "Tanner Linsley",
6
6
  "license": "MIT",
@@ -41,7 +41,7 @@
41
41
  "src"
42
42
  ],
43
43
  "dependencies": {
44
- "@tanstack/virtual-core": "3.19.12"
44
+ "@tanstack/virtual-core": "3.19.14"
45
45
  },
46
46
  "devDependencies": {
47
47
  "@sveltejs/package": "^2.3.11",
package/src/index.ts CHANGED
@@ -103,9 +103,9 @@ export function createWindowVirtualizer<TItemElement extends Element>(
103
103
  observeElementRect: observeWindowRect,
104
104
  observeElementOffset: observeWindowOffset,
105
105
  scrollToFn: windowScroll,
106
- initialOffset: () =>
106
+ initialOffset: (instance) =>
107
107
  typeof document !== 'undefined'
108
- ? options.horizontal
108
+ ? instance.options.horizontal
109
109
  ? window.scrollX
110
110
  : window.scrollY
111
111
  : 0,