hyperscript-rxjs 1.2.7 → 1.3.1
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/dist/hyperscript-rxjs.d.ts +1253 -0
- package/dist/hyperscript-rxjs.js +1 -1
- package/dist/tsdoc-metadata.json +11 -0
- package/package.json +39 -22
- package/readme.md +129 -23
package/package.json
CHANGED
@@ -1,34 +1,47 @@
|
|
1
1
|
{
|
2
|
-
"dependencies": {},
|
3
2
|
"devDependencies": {
|
4
|
-
"
|
5
|
-
"@babel/
|
6
|
-
"@
|
7
|
-
"@
|
8
|
-
"
|
9
|
-
"
|
10
|
-
"@babel/preset-env": "7.16.11",
|
11
|
-
"@webpack-cli/serve": "1.6.1",
|
12
|
-
"babel-jest": "27.5.1",
|
13
|
-
"babel-loader": "8.2.3",
|
3
|
+
"@babel/core": "7.27.1",
|
4
|
+
"@babel/preset-env": "7.27.2",
|
5
|
+
"@microsoft/api-extractor": "7.52.8",
|
6
|
+
"@webpack-cli/serve": "3.0.1",
|
7
|
+
"babel-jest": "29.7.0",
|
8
|
+
"babel-loader": "10.0.0",
|
14
9
|
"clean-webpack-plugin": "4.0.0",
|
15
|
-
"core-js": "3.
|
16
|
-
"jest": "
|
17
|
-
"
|
18
|
-
"
|
19
|
-
"
|
20
|
-
"
|
21
|
-
"
|
10
|
+
"core-js": "3.42.0",
|
11
|
+
"jest": "29.7.0",
|
12
|
+
"jest-environment-jsdom": "29.7.0",
|
13
|
+
"jsdom": "26.1.0",
|
14
|
+
"node-fetch": "3.3.2",
|
15
|
+
"regenerator-runtime": "0.14.1",
|
16
|
+
"rxjs": "7.8.2",
|
17
|
+
"tslib": "2.8.1",
|
18
|
+
"typescript": "5.8.3",
|
19
|
+
"webpack": "5.99.8",
|
20
|
+
"webpack-cli": "6.0.1",
|
21
|
+
"webpack-dev-server": "5.2.1",
|
22
|
+
"webpack-merge": "6.0.1"
|
23
|
+
},
|
24
|
+
"jest": {
|
25
|
+
"testEnvironment": "jsdom",
|
26
|
+
"transform": {
|
27
|
+
"^.+\\.jsx?$": "babel-jest"
|
28
|
+
},
|
29
|
+
"transformIgnorePatterns": [
|
30
|
+
"/node_modules/(?!rxjs)"
|
31
|
+
]
|
22
32
|
},
|
23
33
|
"scripts": {
|
24
34
|
"build": "webpack --config webpack.prod.js",
|
25
35
|
"start": "webpack serve --config webpack.dev.js",
|
26
|
-
"test": "jest"
|
36
|
+
"test": "jest",
|
37
|
+
"dts:build": "tsc",
|
38
|
+
"dts:extract": "api-extractor run --local"
|
27
39
|
},
|
28
40
|
"name": "hyperscript-rxjs",
|
29
|
-
"description": "A js UI library that uses rxjs to
|
41
|
+
"description": "A js UI library that uses rxjs to handle dom directly.",
|
30
42
|
"main": "dist/hyperscript-rxjs.js",
|
31
|
-
"
|
43
|
+
"types": "dist/hyperscript-rxjs.d.ts",
|
44
|
+
"version": "1.3.1",
|
32
45
|
"author": "cuishengli<34696643@qq.com>",
|
33
46
|
"keywords": [
|
34
47
|
"ui",
|
@@ -40,5 +53,9 @@
|
|
40
53
|
"type": "git",
|
41
54
|
"url": "https://github.com/xp44mm/hyperscript-rxjs"
|
42
55
|
},
|
43
|
-
"license": "LGPL-3.0-or-later"
|
56
|
+
"license": "LGPL-3.0-or-later",
|
57
|
+
"files": [
|
58
|
+
"dist",
|
59
|
+
"README.md"
|
60
|
+
]
|
44
61
|
}
|
package/readme.md
CHANGED
@@ -1,45 +1,151 @@
|
|
1
|
-
`hyperscript-rxjs`是一个直接操作DOM的js前端框架库。`hyperscript-rxjs`具有如下特点:
|
2
1
|
|
3
|
-
|
2
|
+
# hyperscript-rxjs
|
4
3
|
|
5
|
-
|
4
|
+
A JavaScript UI library that uses RxJS to handle DOM directly.
|
6
5
|
|
7
|
-
|
6
|
+
## Features
|
8
7
|
|
9
|
-
|
8
|
+
- Reactive programming with RxJS.
|
9
|
+
- Direct DOM manipulation.
|
10
|
+
- Lightweight and flexible.
|
10
11
|
|
11
|
-
|
12
|
+
---
|
12
13
|
|
13
|
-
|
14
|
+
## Installation
|
14
15
|
|
15
|
-
|
16
|
+
Install the library via npm:
|
16
17
|
|
17
|
-
|
18
|
+
```bash
|
19
|
+
npm install hyperscript-rxjs
|
20
|
+
```
|
21
|
+
|
22
|
+
---
|
23
|
+
|
24
|
+
## Usage
|
25
|
+
|
26
|
+
### Basic Example
|
27
|
+
|
28
|
+
```javascript
|
29
|
+
import { Comparer } from "hyperscript-rxjs";
|
30
|
+
|
31
|
+
const comparer = new Comparer((a, b) => a - b);
|
32
|
+
console.log(comparer.sort([3, 1, 2])); // Output: [1, 2, 3]
|
33
|
+
```
|
34
|
+
|
35
|
+
### Importing Specific Modules
|
36
|
+
|
37
|
+
You can import specific modules as needed:
|
38
|
+
|
39
|
+
```javascript
|
40
|
+
import { nestedCombineLatest } from "hyperscript-rxjs";
|
41
|
+
```
|
42
|
+
|
43
|
+
---
|
44
|
+
|
45
|
+
## API
|
46
|
+
|
47
|
+
### Exported Modules
|
48
|
+
|
49
|
+
#### Comparers
|
50
|
+
- `Comparer`
|
51
|
+
- `defaultComparer`
|
52
|
+
- `keyComparer`
|
53
|
+
- `keyPathComparer`
|
54
|
+
- `entryComparer`
|
55
|
+
|
56
|
+
#### Reactive Utilities
|
57
|
+
- `isRxType`
|
58
|
+
- `ObservableArray`
|
59
|
+
|
60
|
+
#### Other Utilities
|
61
|
+
- `Deep`
|
62
|
+
- `nodes`
|
63
|
+
- `object`
|
64
|
+
- `props`
|
65
|
+
- `ramda`
|
66
|
+
- `structures`
|
67
|
+
- `unquoted-json`
|
68
|
+
|
69
|
+
---
|
70
|
+
|
71
|
+
## Development
|
72
|
+
|
73
|
+
### Prerequisites
|
74
|
+
|
75
|
+
Ensure you have the following installed:
|
76
|
+
- Node.js (>= 14.x)
|
77
|
+
- npm (>= 6.x)
|
18
78
|
|
19
|
-
|
79
|
+
### Clone the Repository
|
20
80
|
|
21
|
-
|
81
|
+
```bash
|
82
|
+
git clone https://github.com/xp44mm/hyperscript-rxjs.git
|
83
|
+
cd hyperscript-rxjs
|
84
|
+
```
|
85
|
+
|
86
|
+
### Install Dependencies
|
87
|
+
|
88
|
+
```bash
|
89
|
+
npm install
|
90
|
+
```
|
22
91
|
|
23
|
-
|
92
|
+
### Build the Project
|
24
93
|
|
25
|
-
```
|
26
|
-
|
27
|
-
export function hello() { return p('hello world!'); }
|
94
|
+
```bash
|
95
|
+
npm run build
|
28
96
|
```
|
29
97
|
|
30
|
-
|
98
|
+
The build output will be located in the `dist/` directory.
|
99
|
+
|
100
|
+
---
|
31
101
|
|
32
|
-
##
|
102
|
+
## Testing
|
33
103
|
|
34
|
-
|
104
|
+
### Run Tests
|
35
105
|
|
36
|
-
|
106
|
+
```bash
|
107
|
+
npm test
|
108
|
+
```
|
37
109
|
|
38
|
-
|
110
|
+
### Watch Tests
|
111
|
+
|
112
|
+
```bash
|
113
|
+
npm run test:watch
|
114
|
+
```
|
115
|
+
|
116
|
+
### Test Coverage
|
117
|
+
|
118
|
+
```bash
|
119
|
+
npm run test:coverage
|
120
|
+
```
|
39
121
|
|
40
|
-
|
122
|
+
---
|
41
123
|
|
42
|
-
|
124
|
+
## Contributing
|
43
125
|
|
44
|
-
|
126
|
+
Contributions are welcome! Please follow these steps:
|
45
127
|
|
128
|
+
1. Fork the repository.
|
129
|
+
2. Create a new branch for your feature or bugfix.
|
130
|
+
3. Commit your changes and push the branch.
|
131
|
+
4. Submit a pull request.
|
132
|
+
|
133
|
+
---
|
134
|
+
|
135
|
+
## License
|
136
|
+
|
137
|
+
This project is licensed under the **LGPL-3.0-or-later** license. See the [LICENSE](LICENSE) file for details.
|
138
|
+
|
139
|
+
---
|
140
|
+
|
141
|
+
## Repository
|
142
|
+
|
143
|
+
[GitHub Repository](https://github.com/xp44mm/hyperscript-rxjs)
|
144
|
+
|
145
|
+
---
|
146
|
+
|
147
|
+
## Author
|
148
|
+
|
149
|
+
**cuishengli**
|
150
|
+
Email: 34696643@qq.com
|
151
|
+
```
|