virtua 0.49.2 → 0.50.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.
Files changed (59) hide show
  1. package/README.md +39 -5
  2. package/lib/angular/ListItem.d.ts +1 -0
  3. package/lib/angular/VList.d.ts +85 -0
  4. package/lib/angular/Virtualizer.d.ts +141 -0
  5. package/lib/angular/WindowVirtualizer.d.ts +103 -0
  6. package/lib/angular/index.d.ts +6 -0
  7. package/lib/angular/index.js +1148 -0
  8. package/lib/angular/index.js.map +1 -0
  9. package/lib/angular/utils.d.ts +19 -0
  10. package/lib/core/index.cjs +237 -233
  11. package/lib/core/index.cjs.map +1 -1
  12. package/lib/core/index.d.ts +6 -6
  13. package/lib/core/index.js +272 -272
  14. package/lib/core/index.js.map +1 -1
  15. package/lib/index.cjs +529 -499
  16. package/lib/index.cjs.map +1 -1
  17. package/lib/index.d.ts +2 -2
  18. package/lib/index.js +321 -315
  19. package/lib/index.js.map +1 -1
  20. package/lib/react/VGrid.d.ts +2 -2
  21. package/lib/react/VList.d.ts +3 -3
  22. package/lib/react/Virtualizer.d.ts +3 -3
  23. package/lib/react/WindowVirtualizer.d.ts +3 -3
  24. package/lib/react/index.d.ts +9 -9
  25. package/lib/react/types.d.ts +1 -1
  26. package/lib/solid/VList.d.ts +3 -6
  27. package/lib/solid/Virtualizer.d.ts +2 -5
  28. package/lib/solid/WindowVirtualizer.d.ts +2 -5
  29. package/lib/solid/index.cjs +331 -323
  30. package/lib/solid/index.cjs.map +1 -1
  31. package/lib/solid/index.d.ts +7 -7
  32. package/lib/solid/index.js +249 -257
  33. package/lib/solid/index.js.map +1 -1
  34. package/lib/solid/index.jsx +1224 -1566
  35. package/lib/solid/index.jsx.map +1 -1
  36. package/lib/solid/types.d.ts +1 -1
  37. package/lib/svelte/ListItem.svelte +12 -2
  38. package/lib/svelte/VList.svelte +2 -0
  39. package/lib/svelte/VList.type.d.ts +3 -3
  40. package/lib/svelte/Virtualizer.svelte +2 -0
  41. package/lib/svelte/Virtualizer.type.d.ts +8 -3
  42. package/lib/svelte/WindowVirtualizer.type.d.ts +2 -2
  43. package/lib/svelte/index.d.ts +6 -6
  44. package/lib/svelte/index.js +4 -4
  45. package/lib/svelte/types.d.ts +1 -1
  46. package/lib/svelte/utils.d.ts +7 -0
  47. package/lib/svelte/utils.js +11 -11
  48. package/lib/svelte/utils.js.map +1 -1
  49. package/lib/vue/VList.d.ts +2 -3
  50. package/lib/vue/Virtualizer.d.ts +3 -4
  51. package/lib/vue/WindowVirtualizer.d.ts +2 -3
  52. package/lib/vue/index.cjs +327 -317
  53. package/lib/vue/index.cjs.map +1 -1
  54. package/lib/vue/index.d.ts +6 -6
  55. package/lib/vue/index.js +284 -284
  56. package/lib/vue/index.js.map +1 -1
  57. package/lib/vue/utils.d.ts +1 -1
  58. package/package.json +40 -17
  59. package/lib/svelte/index.js.map +0 -1
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "virtua",
3
- "version": "0.49.2",
4
- "description": "A zero-config, fast and small (~3kB) virtual list (and grid) component for React, Vue, Solid and Svelte.",
3
+ "version": "0.50.0",
4
+ "description": "A zero-config, fast and small (~3kB) virtual list (and grid) component for React, Vue, Solid, Svelte and Angular.",
5
5
  "main": "lib/index.cjs",
6
6
  "module": "lib/index.js",
7
7
  "types": "lib/index.d.ts",
@@ -29,6 +29,10 @@
29
29
  "svelte": "./lib/svelte/index.js",
30
30
  "default": "./lib/svelte/index.js"
31
31
  },
32
+ "./angular": {
33
+ "types": "./lib/angular/index.d.ts",
34
+ "default": "./lib/angular/index.js"
35
+ },
32
36
  "./unstable_core": {
33
37
  "types": "./lib/core/index.d.ts",
34
38
  "require": "./lib/core/index.cjs",
@@ -40,31 +44,44 @@
40
44
  ],
41
45
  "sideEffects": false,
42
46
  "scripts": {
43
- "build": "rollup -c",
47
+ "build": "rimraf lib && vite build -c vite.build.config.ts -m react && vite build -c vite.build.config.ts -m vue && vite build -c vite.build.config.ts -m solid && vite build -c vite.build.config.ts -m solid-ssr && vite build -c vite.build.config.ts -m core && vite build -c vite.build.config.ts -m svelte && vite build -c vite.build.config.ts -m angular && ngc -p tsconfig.angular.build.json && node scripts/copy-angular-dts.js",
44
48
  "tsc": "tsc -p . --noEmit",
45
- "test": "vitest run --project=unit --project=react --project=vue --project=solid --project=svelte",
49
+ "test": "vitest run --project=unit --project=react --project=vue --project=solid --project=svelte --project=angular",
46
50
  "lint": "eslint '{src,e2e}/**/*.{js,jsx,ts,tsx}' --cache",
47
51
  "format": "prettier '**/*.{js,ts,jsx,tsx,vue,svelte}' --write --cache",
48
52
  "format:ci": "prettier '**/*.{js,ts,jsx,tsx,vue,svelte}' -l",
49
53
  "check:svelte": "svelte-check --tsconfig ./tsconfig.svelte.json",
54
+ "check:angular": "ngc -p tsconfig.angular.json --noEmit",
50
55
  "storybook": "storybook dev -p 6006",
51
56
  "storybook:rtl": "STORYBOOK_RTL=1 npm run storybook",
52
57
  "storybook:vue": "STORYBOOK_VUE=1 npm run storybook",
53
58
  "storybook:solid": "STORYBOOK_SOLID=1 npm run storybook",
54
59
  "storybook:svelte": "STORYBOOK_SVELTE=1 npm run storybook",
60
+ "storybook:angular": "STORYBOOK_ANGULAR=1 npm run storybook",
55
61
  "storybook:build": "storybook build",
56
- "storybook:deploy": "STORYBOOK_DEPLOY=1 npm run storybook:build && STORYBOOK_VUE=1 npm run storybook:build -- -o storybook-static/vue && STORYBOOK_SOLID=1 npm run storybook:build -- -o storybook-static/solid && STORYBOOK_SVELTE=1 npm run storybook:build -- -o storybook-static/svelte",
62
+ "storybook:deploy": "STORYBOOK_DEPLOY=1 npm run storybook:build && STORYBOOK_VUE=1 npm run storybook:build -- -o storybook-static/vue && STORYBOOK_SOLID=1 npm run storybook:build -- -o storybook-static/solid && STORYBOOK_SVELTE=1 npm run storybook:build -- -o storybook-static/svelte && STORYBOOK_ANGULAR=1 npm run storybook:build -- -o storybook-static/angular",
57
63
  "storybook:test": "vitest run --project=storybook",
58
64
  "e2e": "npx playwright test",
59
65
  "typedoc": "typedoc",
60
66
  "size": "size-limit",
61
- "prepublishOnly": "npm run typedoc && rimraf lib && npm run build"
67
+ "prepublishOnly": "npm run typedoc && npm run build"
62
68
  },
63
69
  "devDependencies": {
70
+ "@analogjs/storybook-angular": "^2.6.4",
71
+ "@analogjs/vite-plugin-angular": "^2.6.4",
72
+ "@analogjs/vitest-angular": "^2.6.4",
73
+ "@angular/animations": "^22.0.0",
74
+ "@angular/common": "^22.0.0",
75
+ "@angular/compiler": "^22.0.0",
76
+ "@angular/compiler-cli": "^22.0.0",
77
+ "@angular/core": "^22.0.0",
78
+ "@angular/platform-browser": "^22.0.0",
79
+ "@angular/platform-server": "^22.0.0",
64
80
  "@atlaskit/pragmatic-drag-and-drop": "^1.7.9",
65
81
  "@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^2.1.5",
66
82
  "@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.1.0",
67
83
  "@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.2.12",
84
+ "@babel/core": "^7.29.7",
68
85
  "@base-ui/react": "^1.4.0",
69
86
  "@dnd-kit/core": "^6.3.1",
70
87
  "@dnd-kit/sortable": "^10.0.0",
@@ -78,13 +95,11 @@
78
95
  "@radix-ui/react-icons": "^1.3.2",
79
96
  "@radix-ui/react-scroll-area": "^1.2.10",
80
97
  "@radix-ui/react-select": "^2.2.6",
81
- "@rollup/plugin-babel": "^7.0.0",
82
- "@rollup/plugin-terser": "^1.0.0",
83
- "@rollup/plugin-typescript": "^12.0.0",
84
98
  "@size-limit/preset-small-lib": "^12.0.0",
85
99
  "@solidjs/testing-library": "^0.8.10",
86
100
  "@storybook/addon-docs": "^10.4.0",
87
101
  "@storybook/addon-vitest": "^10.4.0",
102
+ "@storybook/angular": "^10.4.0",
88
103
  "@storybook/react-vite": "^10.4.0",
89
104
  "@storybook/svelte-vite": "^10.4.0",
90
105
  "@storybook/vue3-vite": "^10.4.0",
@@ -92,6 +107,7 @@
92
107
  "@tanstack/react-virtual": "^3.13.24",
93
108
  "@testing-library/dom": "^10.4.0",
94
109
  "@testing-library/react": "^16.3.2",
110
+ "@testing-library/svelte": "^5.4.2",
95
111
  "@testing-library/vue": "^8.1.0",
96
112
  "@types/jsdom": "^28.0.0",
97
113
  "@types/react": "^19.2.0",
@@ -102,7 +118,6 @@
102
118
  "@vitejs/plugin-vue-jsx": "^5.1.5",
103
119
  "@vitest/browser-playwright": "^4.1.0",
104
120
  "@vitest/coverage-v8": "^4.1.0",
105
- "babel-preset-solid": "^1.9.10",
106
121
  "cmdk": "^1.1.1",
107
122
  "eslint": "^9.38.0",
108
123
  "eslint-import-resolver-typescript": "^4.3.5",
@@ -127,28 +142,29 @@
127
142
  "react-window": "^2.2.7",
128
143
  "remark-gfm": "^4.0.1",
129
144
  "rimraf": "^6.0.1",
130
- "rollup": "^4.54.0",
131
- "rollup-plugin-banner2": "^1.3.1",
132
- "rollup-plugin-copy": "^3.5.0",
133
145
  "size-limit": "^12.0.0",
134
146
  "solid-js": "^1.9.13",
135
147
  "storybook": "^10.4.0",
136
148
  "storybook-solidjs-vite": "^10.0.10",
137
149
  "svelte": "^5.38.9",
138
150
  "svelte-check": "^4.4.8",
151
+ "terser": "^5.49.0",
139
152
  "typedoc": "^0.28.4",
140
153
  "typedoc-plugin-markdown": "^4.6.3",
141
154
  "typescript": "^6.0.3",
142
155
  "typescript-eslint": "^8.46.2",
143
- "unplugin-vue-jsx": "^0.9.0",
156
+ "unplugin-vue-jsx": "^0.10.0",
144
157
  "virtua": "^0.49.0",
145
158
  "vite": "^8.0.13",
159
+ "vite-plugin-dts": "^5.0.3",
146
160
  "vite-plugin-solid": "^2.11.12",
147
161
  "vitest": "^4.1.6",
148
162
  "vue": "^3.5.34",
149
163
  "vue-eslint-parser": "^10.2.0"
150
164
  },
151
165
  "peerDependencies": {
166
+ "@angular/common": ">=20.0.0",
167
+ "@angular/core": ">=20.0.0",
152
168
  "react": ">=16.14.0",
153
169
  "react-dom": ">=16.14.0",
154
170
  "solid-js": ">=1.0",
@@ -156,13 +172,16 @@
156
172
  "vue": ">=3.2"
157
173
  },
158
174
  "peerDependenciesMeta": {
159
- "react": {
175
+ "@angular/common": {
160
176
  "optional": true
161
177
  },
162
- "react-dom": {
178
+ "@angular/core": {
163
179
  "optional": true
164
180
  },
165
- "vue": {
181
+ "react": {
182
+ "optional": true
183
+ },
184
+ "react-dom": {
166
185
  "optional": true
167
186
  },
168
187
  "solid-js": {
@@ -170,6 +189,9 @@
170
189
  },
171
190
  "svelte": {
172
191
  "optional": true
192
+ },
193
+ "vue": {
194
+ "optional": true
173
195
  }
174
196
  },
175
197
  "repository": {
@@ -182,6 +204,7 @@
182
204
  "vue",
183
205
  "solid",
184
206
  "svelte",
207
+ "angular",
185
208
  "ui",
186
209
  "headless",
187
210
  "list",
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}