hyperscript-rxjs 1.3.5 → 1.3.7
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.js +1 -1
- package/package.json +4 -13
- package/readme.md +33 -23
- package/dist/hyperscript-rxjs.d.ts +0 -1252
- package/dist/tsdoc-metadata.json +0 -11
package/package.json
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
{
|
2
2
|
"devDependencies": {
|
3
|
-
"@babel/core": "7.27.
|
3
|
+
"@babel/core": "7.27.4",
|
4
4
|
"@babel/preset-env": "7.27.2",
|
5
5
|
"@microsoft/api-extractor": "7.52.8",
|
6
|
+
"@types/jest": "^29.5.14",
|
6
7
|
"@webpack-cli/serve": "3.0.1",
|
7
8
|
"babel-jest": "29.7.0",
|
8
9
|
"babel-loader": "10.0.0",
|
9
|
-
"clean-webpack-plugin": "4.0.0",
|
10
10
|
"core-js": "3.42.0",
|
11
11
|
"jest": "29.7.0",
|
12
12
|
"jest-environment-jsdom": "29.7.0",
|
@@ -18,18 +18,9 @@
|
|
18
18
|
"typescript": "5.8.3",
|
19
19
|
"webpack": "5.99.9",
|
20
20
|
"webpack-cli": "6.0.1",
|
21
|
-
"webpack-dev-server": "5.2.
|
21
|
+
"webpack-dev-server": "5.2.2",
|
22
22
|
"webpack-merge": "6.0.1"
|
23
23
|
},
|
24
|
-
"jest": {
|
25
|
-
"testEnvironment": "jsdom",
|
26
|
-
"transform": {
|
27
|
-
"^.+\\.jsx?$": "babel-jest"
|
28
|
-
},
|
29
|
-
"transformIgnorePatterns": [
|
30
|
-
"/node_modules/(?!rxjs)"
|
31
|
-
]
|
32
|
-
},
|
33
24
|
"scripts": {
|
34
25
|
"build": "webpack --config webpack.prod.js",
|
35
26
|
"start": "webpack serve --config webpack.dev.js",
|
@@ -41,7 +32,7 @@
|
|
41
32
|
"description": "A js UI library that uses rxjs to handle dom directly.",
|
42
33
|
"main": "dist/hyperscript-rxjs.js",
|
43
34
|
"types": "dist/hyperscript-rxjs.d.ts",
|
44
|
-
"version": "1.3.
|
35
|
+
"version": "1.3.7",
|
45
36
|
"author": "cuishengli<34696643@qq.com>",
|
46
37
|
"keywords": [
|
47
38
|
"ui",
|
package/readme.md
CHANGED
@@ -1,7 +1,9 @@
|
|
1
|
-
#
|
1
|
+
# Hyperscript-RxJS
|
2
2
|
|
3
3
|
A reactive JavaScript UI library that uses RxJS for direct DOM manipulation with observable data binding.
|
4
4
|
|
5
|
+
[](https://www.gnu.org/licenses/lgpl-3.0)
|
6
|
+
|
5
7
|
## Features
|
6
8
|
|
7
9
|
- **Reactive DOM Elements**: Create HTML elements with built-in RxJS observable support
|
@@ -10,11 +12,12 @@ A reactive JavaScript UI library that uses RxJS for direct DOM manipulation with
|
|
10
12
|
- **Observable Utilities**: Specialized classes like `ObservableArray` for reactive collections
|
11
13
|
- **Deep Data Handling**: `Deep` class for nested observable structures
|
12
14
|
- **Type Safe**: Full TypeScript support with detailed type definitions
|
15
|
+
- **RxJS 7.8.2 Integration**: Full compatibility with latest RxJS version
|
13
16
|
|
14
17
|
## Installation
|
15
18
|
|
16
19
|
```bash
|
17
|
-
npm install hyperscript-rxjs
|
20
|
+
npm install hyperscript-rxjs@1.3.6
|
18
21
|
```
|
19
22
|
|
20
23
|
## Quick Start
|
@@ -58,23 +61,25 @@ select(), table(), textarea(), video(), ...and more
|
|
58
61
|
```
|
59
62
|
|
60
63
|
### Specialized Components
|
61
|
-
- `tabControl()` - Reactive tab components
|
62
|
-
- `textbox()`, `checkbox()`, `radio()`, `select()` - Form controls with binding
|
63
|
-
- `
|
64
|
-
- `
|
64
|
+
- `tabControl()` - Reactive tab components with `BehaviorSubject` binding
|
65
|
+
- `textbox()`, `checkbox()`, `radio()`, `select()`, `multiselect()` - Form controls with two-way binding
|
66
|
+
- `numberbox()` - Numeric input with observable binding
|
67
|
+
- `ObservableArray` - Reactive array with change notifications (`insertBefore$`, `removeChild$`, `replaceChild$`)
|
68
|
+
- `Deep` - Nested observable data structures with advanced manipulation methods
|
69
|
+
- `collapse()` - Observable-controlled visibility
|
70
|
+
- `flip()` - Toggle between two elements based on observable
|
71
|
+
- `choice()` - Dynamic element display based on observable value
|
65
72
|
|
66
73
|
### Reactive Utilities
|
67
|
-
- `bindTabIndex()` - Tab navigation binding
|
68
|
-
- `
|
69
|
-
- `flip()` - Toggle between two elements
|
70
|
-
- `pipeEvent()` - RxJS-powered event handling
|
74
|
+
- `bindTabIndex()` - Tab navigation binding with `BehaviorSubject`
|
75
|
+
- `pipeEvent()` - RxJS-powered event handling pipelines
|
71
76
|
- `subscribeProp()` - Bind observables to element properties
|
77
|
+
- `pickBehaviorSubject()` - Extract BehaviorSubject values from nested objects
|
78
|
+
- `restore()` - Deep observable updates for complex state management
|
72
79
|
|
73
80
|
### Data Transformation
|
74
|
-
- `Comparer` -
|
75
|
-
- `
|
76
|
-
- `restore()` - Deep observable updates
|
77
|
-
- `tojs()` - Convert flat data to nested objects
|
81
|
+
- `Comparer` - Advanced sorting and collection utilities with custom comparison
|
82
|
+
- `queryStringify` - Query string serialization
|
78
83
|
|
79
84
|
## Advanced Usage
|
80
85
|
|
@@ -90,24 +95,28 @@ const btn = button('Click me')
|
|
90
95
|
|
91
96
|
### Observable Arrays
|
92
97
|
```typescript
|
93
|
-
const items = new ObservableArray<string>();
|
98
|
+
const items = new ObservableArray<string>(()=>"");
|
94
99
|
items.insertBefore('New Item');
|
95
100
|
items.action$.subscribe(change => {
|
96
101
|
console.log('Array changed:', change);
|
97
102
|
});
|
98
103
|
```
|
99
104
|
|
100
|
-
|
105
|
+
### Deep Nested Observables
|
106
|
+
```typescript
|
107
|
+
const deepData = new Deep([
|
108
|
+
[['user', 'name'], 'John'],
|
109
|
+
[['user', 'age'], 30]
|
110
|
+
]);
|
101
111
|
|
102
|
-
|
103
|
-
|
104
|
-
|
112
|
+
deepData.entries.forEach(([path, value]) => {
|
113
|
+
console.log(`Path: ${path.join('.')}, Value: ${value}`);
|
114
|
+
});
|
105
115
|
```
|
106
116
|
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
```
|
117
|
+
## Dependencies
|
118
|
+
|
119
|
+
- RxJS 7.8.2
|
111
120
|
|
112
121
|
## License
|
113
122
|
|
@@ -121,3 +130,4 @@ LGPL-3.0-or-later
|
|
121
130
|
|
122
131
|
**cuishengli**
|
123
132
|
Email: 34696643@qq.com
|
133
|
+
|