@tonar/react 0.1.0-beta.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/LICENSE +21 -0
- package/README.md +38 -0
- package/dist/index.esm.js +2 -0
- package/dist/types/index.d.ts +2 -0
- package/package.json +52 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 sonion
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# @tonar/react
|
|
2
|
+
|
|
3
|
+
`@tonar/react` 是 Tonar 面向 React 项目的使用入口,适合在 React 应用中使用 Tonar 的 React 能力和通用工具函数。
|
|
4
|
+
|
|
5
|
+
`@tonar/react` is the Tonar entry for React applications, designed for using Tonar's React features and general utilities in React projects.
|
|
6
|
+
|
|
7
|
+
- ✅ 支持 React 18+
|
|
8
|
+
- ✅ TypeScript 类型支持
|
|
9
|
+
- ✅ 仅支持 ESM(不支持 CommonJS)
|
|
10
|
+
- ✅ 支持 Tree-shaking
|
|
11
|
+
|
|
12
|
+
## 📦 Installation / 安装
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
npm install @tonar/react@latest
|
|
16
|
+
pnpm add @tonar/react
|
|
17
|
+
yarn add @tonar/react
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## 🚀 Usage / 使用方法
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
import { Carousel, debounce, useDistinctState } from '@tonar/react';
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## 📚 Related documentation / 相关文档
|
|
27
|
+
|
|
28
|
+
具体能力列表请查看真正提供能力的子包 README:
|
|
29
|
+
|
|
30
|
+
- React 组件和 Hooks:[`@tonar/react-kit`](../react-kit)
|
|
31
|
+
- 通用工具函数:[`@tonar/utils`](../utils)
|
|
32
|
+
|
|
33
|
+
## 📝 License / 许可证
|
|
34
|
+
|
|
35
|
+
MIT © Sonion
|
|
36
|
+
|
|
37
|
+
欢迎 [Pull Requests](https://github.com/sonion028/gonar/pulls) 和 [Issues](https://github.com/sonion028/gonar/issues)
|
|
38
|
+
源码仓库:[https://github.com/sonion028/gonar](https://github.com/sonion028/gonar)
|
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@tonar/react",
|
|
3
|
+
"version": "0.1.0-beta.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "@tonar/react: Tonar entry for React applications with React components, hooks, and general utilities.",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"components",
|
|
8
|
+
"hooks",
|
|
9
|
+
"react",
|
|
10
|
+
"utils"
|
|
11
|
+
],
|
|
12
|
+
"bugs": "https://github.com/sonion028/gonar/issues",
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"author": "sonion",
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "https://github.com/sonion028/gonar"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist",
|
|
21
|
+
"package.json",
|
|
22
|
+
"README.md",
|
|
23
|
+
"LICENSE"
|
|
24
|
+
],
|
|
25
|
+
"type": "module",
|
|
26
|
+
"sideEffects": false,
|
|
27
|
+
"module": "dist/index.esm.js",
|
|
28
|
+
"types": "dist/types/index.d.ts",
|
|
29
|
+
"exports": {
|
|
30
|
+
".": {
|
|
31
|
+
"import": "./dist/index.esm.js",
|
|
32
|
+
"types": "./dist/types/index.d.ts"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@tonar/react-kit": "0.1.0-beta.0",
|
|
37
|
+
"@tonar/utils": "0.1.0-beta.0"
|
|
38
|
+
},
|
|
39
|
+
"peerDependencies": {
|
|
40
|
+
"react": "^18.0.0",
|
|
41
|
+
"react-dom": "^18.0.0"
|
|
42
|
+
},
|
|
43
|
+
"devEngines": {
|
|
44
|
+
"packageManager": {
|
|
45
|
+
"name": "pnpm",
|
|
46
|
+
"onFail": "error"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"scripts": {
|
|
50
|
+
"build": "rimraf dist && vite build"
|
|
51
|
+
}
|
|
52
|
+
}
|