@semi-kit/hooks 1.0.8 → 1.0.9

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 +41 -7
  2. package/package.json +1 -13
package/README.md CHANGED
@@ -1,23 +1,57 @@
1
- # tsdown-starter
1
+ # @semi-kit/hooks
2
2
 
3
- A starter for creating a TypeScript package.
3
+ Commonly used Hooks collection
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @semi-kit/hooks
9
+ # or
10
+ pnpm add @semi-kit/hooks
11
+ # or
12
+ yarn add @semi-kit/hooks
13
+ ```
14
+
15
+ ## Usage
16
+
17
+ ### Basic Hooks
18
+
19
+ ```typescript
20
+ import { ... } from '@semi-kit/hooks';
21
+ ```
22
+
23
+ ### Sortable Hooks
24
+
25
+ 如果需要使用 sortable 相关功能,需要额外安装 `sortablejs`:
26
+
27
+ ```bash
28
+ npm install sortablejs
29
+ # or
30
+ pnpm add sortablejs
31
+ ```
32
+
33
+ 然后使用:
34
+
35
+ ```typescript
36
+ import { useSortable } from '@semi-kit/hooks/sortable';
37
+ ```
4
38
 
5
39
  ## Development
6
40
 
7
41
  - Install dependencies:
8
42
 
9
43
  ```bash
10
- npm install
44
+ pnpm install
11
45
  ```
12
46
 
13
- - Run the unit tests:
47
+ - Build the library:
14
48
 
15
49
  ```bash
16
- npm run test
50
+ pnpm run build
17
51
  ```
18
52
 
19
- - Build the library:
53
+ - Watch mode:
20
54
 
21
55
  ```bash
22
- npm run build
56
+ pnpm run dev
23
57
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@semi-kit/hooks",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "Commonly used Hooks collection",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -33,17 +33,5 @@
33
33
  "typescript": "^5.9.3",
34
34
  "@types/sortablejs": "^1.15.9",
35
35
  "sortablejs": "^1.15.6"
36
- },
37
- "peerDependencies": {
38
- "sortablejs": "*",
39
- "@types/sortablejs": "*"
40
- },
41
- "peerDependenciesMeta": {
42
- "sortablejs": {
43
- "optional": true
44
- },
45
- "@types/sortablejs": {
46
- "optional": true
47
- }
48
36
  }
49
37
  }