react-base-virtual-list 1.1.0 → 1.2.5

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/README.md +5 -9
  2. package/package.json +19 -13
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
- # react-base-virtual-list ![GitHub License](https://img.shields.io/github/license/phphe/react-base-virtual-list) ![NPM Version](https://img.shields.io/npm/v/react-base-virtual-list) ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/phphe/react-base-virtual-list/build.yml) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/react-base-virtual-list)
1
+ # react-base-virtual-list ![License](https://img.shields.io/github/license/phphe/react-base-virtual-list) ![NPM Version](https://img.shields.io/npm/v/react-base-virtual-list) ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/phphe/react-base-virtual-list/publish.yml) [![Changelog](https://img.shields.io/badge/changelog-latest-blue.svg)](./CHANGELOG.md)
2
2
 
3
3
  [中文](README_CN.md)
4
4
 
5
- React basic virtual list, supports common features and is easy to customize. [Online Demo](https://phphe.github.io/react-base-virtual-list/)
5
+ React basic virtual list, supports common features and is easy to customize. Support React 18, 19. [Online Demo](https://phphe.github.io/react-base-virtual-list/) | [Changelog](./CHANGELOG.md)
6
6
 
7
7
  ## Features
8
8
 
@@ -111,7 +111,7 @@ Irrelevant parts are omitted in the above code. `VirtualListHandle` is a `typesc
111
111
  interface VirtualListHandle {
112
112
  scrollToIndex(
113
113
  index: number,
114
- block?: "start" | "end" | "center" | "nearest"
114
+ block?: "start" | "end" | "center" | "nearest",
115
115
  ): void;
116
116
  getRootElement(): HTMLElement;
117
117
  forceUpdate(): void;
@@ -142,10 +142,6 @@ You can also use the following third-party CDN url to include it.
142
142
  ## Development
143
143
 
144
144
  - `lib`: The main files, also the files that are packaged into the library. Running `npm run build` will package the files in this directory into the `dist` folder. The corresponding Vite configuration file is `vite.build.ts`.
145
- - `src`: The files used for development and debugging. Running `npm run dev` will run the code in this directory in the browser. Running `npm run build:web` will package the code in this directory into the `dist` folder. The corresponding Vite configuration file is `vite.config.ts`.
145
+ - `src`: The files used for development and debugging. Running `npm run dev` will run the code in this directory in the browser. Running `npm run demo:build` will package the code in this directory into the `dist-demo` folder. The corresponding Vite configuration file is `vite.config.ts`.
146
146
  - `uno.config.ts`: [unocss](https://github.com/unocss/unocss) configuration file. `unocss` only works in the `src` folder. With the current configuration, you can use `Tailwindcss` style class names.
147
- - `.github/workflows/build.yml`: Some automated actions performed when publishing to GitHub. You can delete or modify it.
148
-
149
- ## Changelog
150
-
151
- https://github.com/phphe/react-base-virtual-list/releases
147
+ - `.github/workflows/publish.yml`: Some automated actions performed when publishing to GitHub pages and npmjs.com. You can delete or modify it.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-base-virtual-list",
3
- "version": "1.1.0",
3
+ "version": "1.2.5",
4
4
  "license": "MIT",
5
5
  "author": "phphe <phphe@outlook.com> (https://github.com/phphe)",
6
6
  "description": "React base virtual list component.",
@@ -26,21 +26,12 @@
26
26
  "files": [
27
27
  "dist"
28
28
  ],
29
- "scripts": {
30
- "dev": "vite",
31
- "build": "vite build --config vite.build.js && vite build --config vite.build.js -- --iife && rm -rf dist/src",
32
- "build:web": "tsc && vite build",
33
- "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
34
- "preview": "vite preview"
35
- },
36
- "dependencies": {},
37
29
  "peerDependencies": {
38
- "react": "^18",
39
- "react-dom": "^18"
30
+ "react": "^18 || ^19",
31
+ "react-dom": "^18 || ^19"
40
32
  },
41
33
  "devDependencies": {
42
- "react": "^18.2.0",
43
- "react-dom": "^18.2.0",
34
+ "@changesets/cli": "^2.29.8",
44
35
  "@types/react": "^18.2.43",
45
36
  "@types/react-dom": "^18.2.17",
46
37
  "@typescript-eslint/eslint-plugin": "^6.14.0",
@@ -50,9 +41,24 @@
50
41
  "eslint": "^8.55.0",
51
42
  "eslint-plugin-react-hooks": "^4.6.0",
52
43
  "eslint-plugin-react-refresh": "^0.4.5",
44
+ "react": "^18.2.0",
45
+ "react-dom": "^18.2.0",
53
46
  "typescript": "^5.2.2",
54
47
  "unocss": "^0.58.4",
55
48
  "vite": "^5.0.8",
56
49
  "vite-plugin-dts": "^3.7.2"
50
+ },
51
+ "publishConfig": {
52
+ "access": "public",
53
+ "provenance": true
54
+ },
55
+ "scripts": {
56
+ "dev": "vite",
57
+ "build": "vite build --config vite.build.js && vite build --config vite.build.js -- --iife && rm -rf dist/src",
58
+ "demo:build": "tsc && vite build",
59
+ "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
60
+ "preview": "vite preview",
61
+ "change": "changeset",
62
+ "version": "changeset version"
57
63
  }
58
64
  }