fix output

This commit is contained in:
2026-01-27 16:47:33 +03:30
parent c122b00647
commit a99c6aa051
4582 changed files with 389930 additions and 2514 deletions
+66
View File
@@ -0,0 +1,66 @@
import { elementScroll, observeElementOffset, observeElementRect, windowScroll, observeWindowOffset, observeWindowRect, Virtualizer } from "@tanstack/virtual-core";
export * from "@tanstack/virtual-core";
import { computed, unref, shallowRef, watch, triggerRef, onScopeDispose } from "vue";
function useVirtualizerBase(options) {
const virtualizer = new Virtualizer(unref(options));
const state = shallowRef(virtualizer);
const cleanup = virtualizer._didMount();
watch(
() => unref(options).getScrollElement(),
(el) => {
if (el) {
virtualizer._willUpdate();
}
},
{
immediate: true
}
);
watch(
() => unref(options),
(options2) => {
virtualizer.setOptions({
...options2,
onChange: (instance, sync) => {
var _a;
triggerRef(state);
(_a = options2.onChange) == null ? void 0 : _a.call(options2, instance, sync);
}
});
virtualizer._willUpdate();
triggerRef(state);
},
{
immediate: true
}
);
onScopeDispose(cleanup);
return state;
}
function useVirtualizer(options) {
return useVirtualizerBase(
computed(() => ({
observeElementRect,
observeElementOffset,
scrollToFn: elementScroll,
...unref(options)
}))
);
}
function useWindowVirtualizer(options) {
return useVirtualizerBase(
computed(() => ({
getScrollElement: () => typeof document !== "undefined" ? window : null,
observeElementRect: observeWindowRect,
observeElementOffset: observeWindowOffset,
scrollToFn: windowScroll,
initialOffset: () => typeof document !== "undefined" ? window.scrollY : 0,
...unref(options)
}))
);
}
export {
useVirtualizer,
useWindowVirtualizer
};
//# sourceMappingURL=index.js.map
+1
View File
@@ -0,0 +1 @@
../../../.nitro/vue@3.5.22
+68
View File
@@ -0,0 +1,68 @@
{
"name": "@tanstack/vue-virtual",
"version": "3.13.12",
"description": "Headless UI for virtualizing scrollable elements in Vue",
"author": "Tanner Linsley",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/TanStack/virtual.git",
"directory": "packages/vue-virtual"
},
"homepage": "https://tanstack.com/virtual",
"publishConfig": {
"registry": "https://registry.npmjs.org/"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/tannerlinsley"
},
"keywords": [
"react",
"vue",
"solid",
"svelte",
"virtual",
"virtual-core",
"datagrid"
],
"type": "module",
"types": "dist/esm/index.d.ts",
"main": "dist/cjs/index.cjs",
"module": "dist/esm/index.js",
"exports": {
".": {
"import": {
"types": "./dist/esm/index.d.ts",
"default": "./dist/esm/index.js"
},
"require": {
"types": "./dist/cjs/index.d.cts",
"default": "./dist/cjs/index.cjs"
}
},
"./package.json": "./package.json"
},
"sideEffects": false,
"files": [
"dist",
"src"
],
"dependencies": {
"@tanstack/virtual-core": "3.13.12"
},
"devDependencies": {
"@vitejs/plugin-vue": "^5.2.4",
"vue": "^3.5.16"
},
"peerDependencies": {
"vue": "^2.7.0 || ^3.0.0"
},
"scripts": {
"clean": "premove ./dist ./coverage",
"test:eslint": "eslint ./src",
"test:types": "tsc",
"test:build": "publint --strict",
"build": "vite build"
}
}