@pdanpdan/virtual-scroll 0.1.0 → 0.2.0

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,10 +1,19 @@
1
1
  {
2
2
  "name": "@pdanpdan/virtual-scroll",
3
3
  "type": "module",
4
- "version": "0.1.0",
4
+ "version": "0.2.0",
5
5
  "description": "A high-performance virtual scroll component for Vue 3",
6
6
  "author": "",
7
7
  "license": "MIT",
8
+ "homepage": "https://github.com/pdanpdan/virtual-scroll#readme",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/pdanpdan/virtual-scroll",
12
+ "directory": "packages/virtual-scroll"
13
+ },
14
+ "bugs": {
15
+ "url": "https://github.com/pdanpdan/virtual-scroll/issues"
16
+ },
8
17
  "keywords": [
9
18
  "vue",
10
19
  "virtual-scroll",
@@ -26,16 +35,14 @@
26
35
  "src"
27
36
  ],
28
37
  "scripts": {
29
- "build": "pnpm build:lib && pnpm build:types",
30
- "build:lib": "vite build",
31
- "build:types": "vue-tsc --emitDeclarationOnly --declaration",
38
+ "build": "vite build",
32
39
  "prepublishOnly": "pnpm build",
33
40
  "lint": "pnpm --dir ../.. lint",
34
41
  "lint:fix": "pnpm --dir ../.. lint:fix",
35
42
  "test": "vitest run",
36
43
  "test:ui": "vitest --ui --coverage.enabled --coverage.reporter=html",
37
44
  "test:watch": "vitest",
38
- "test:types": "vue-tsc --noEmit",
45
+ "test:types": "vue-tsc -p tsconfig.app.json --noEmit",
39
46
  "test:coverage": "vitest run --coverage",
40
47
  "test:all": "pnpm run lint && pnpm run test:types && pnpm run test:coverage"
41
48
  },
@@ -43,7 +50,8 @@
43
50
  "vue": "^3.0.0"
44
51
  },
45
52
  "publishConfig": {
46
- "access": "public"
53
+ "access": "public",
54
+ "registry": "https://registry.npmjs.org/"
47
55
  },
48
56
  "devDependencies": {
49
57
  "@vitejs/plugin-vue": "catalog:",
@@ -52,6 +60,7 @@
52
60
  "jsdom": "catalog:",
53
61
  "typescript": "catalog:",
54
62
  "vite": "catalog:",
63
+ "vite-plugin-dts": "catalog:",
55
64
  "vitest": "catalog:",
56
65
  "vue": "catalog:",
57
66
  "vue-tsc": "catalog:"
@@ -5,12 +5,12 @@ import type {
5
5
  ScrollAlignmentOptions,
6
6
  ScrollDetails,
7
7
  VirtualScrollProps,
8
- } from '../composables/useVirtualScroll.js';
8
+ } from '../composables/useVirtualScroll';
9
9
 
10
10
  import { computed, onMounted, onUnmounted, ref, watch } from 'vue';
11
11
 
12
- import { useVirtualScroll } from '../composables/useVirtualScroll.js';
13
- import { getPaddingX, getPaddingY } from '../utils/scroll.js';
12
+ import { useVirtualScroll } from '../composables/useVirtualScroll';
13
+ import { getPaddingX, getPaddingY } from '../utils/scroll';
14
14
 
15
15
  export interface Props<T = unknown> {
16
16
  /** Array of items to be virtualized. */
@@ -3,8 +3,8 @@ import type { Ref } from 'vue';
3
3
  /* global ScrollToOptions */
4
4
  import { computed, getCurrentInstance, nextTick, onMounted, onUnmounted, reactive, ref, watch } from 'vue';
5
5
 
6
- import { FenwickTree } from '../utils/fenwick-tree.js';
7
- import { getPaddingX, getPaddingY, isElement, isScrollableElement, isScrollToIndexOptions } from '../utils/scroll.js';
6
+ import { FenwickTree } from '../utils/fenwick-tree';
7
+ import { getPaddingX, getPaddingY, isElement, isScrollableElement, isScrollToIndexOptions } from '../utils/scroll';
8
8
 
9
9
  export const DEFAULT_ITEM_SIZE = 50;
10
10
  export const DEFAULT_COLUMN_WIDTH = 150;
package/src/index.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export { default as VirtualScroll } from './components/VirtualScroll.vue';
2
- export * from './composables/useVirtualScroll.js';
3
- export * from './utils/fenwick-tree.js';
4
- export * from './utils/scroll.js';
2
+ export * from './composables/useVirtualScroll';
3
+ export * from './utils/fenwick-tree';
4
+ export * from './utils/scroll';
@@ -1,4 +1,4 @@
1
- import type { ScrollDirection, ScrollToIndexOptions } from '../composables/useVirtualScroll.js';
1
+ import type { ScrollDirection, ScrollToIndexOptions } from '../composables/useVirtualScroll';
2
2
 
3
3
  /**
4
4
  * Checks if the container has a bounding client rect method.