sigx 0.2.1 → 0.2.3
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/README.md +45 -0
- package/package.json +5 -5
package/README.md
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# SignalX
|
|
2
|
+
|
|
3
|
+
Lightweight reactive component framework with signals and TSX support. This is the main entry point that re-exports the public API from `@sigx/reactivity`, `@sigx/runtime-core`, and `@sigx/runtime-dom`.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install sigx
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
import { component, signal, render } from 'sigx';
|
|
15
|
+
|
|
16
|
+
const Counter = component(() => {
|
|
17
|
+
const count = signal(0);
|
|
18
|
+
|
|
19
|
+
return () => (
|
|
20
|
+
<div>
|
|
21
|
+
<p>Count: {count.value}</p>
|
|
22
|
+
<button onClick={() => count.value++}>Increment</button>
|
|
23
|
+
</div>
|
|
24
|
+
);
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
render(<Counter />, document.getElementById('app')!);
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Key Exports
|
|
31
|
+
|
|
32
|
+
- **Reactivity** — `signal`, `computed`, `effect`, `batch`, `watch`, `untrack`
|
|
33
|
+
- **Components** — `component`, `lazy`, `defineApp`
|
|
34
|
+
- **Lifecycle** — `onMounted`, `onUnmounted`, `onCreated`, `onUpdated`
|
|
35
|
+
- **Rendering** — `render`, `Portal`, `Suspense`, `Fragment`
|
|
36
|
+
- **Control Flow** — `Show`, `Switch`, `Match`
|
|
37
|
+
- **JSX** — `jsx`, `jsxs`, `jsxDEV`
|
|
38
|
+
|
|
39
|
+
## Documentation
|
|
40
|
+
|
|
41
|
+
Full documentation and guides are available at the [SignalX repository](https://github.com/signalxjs/core).
|
|
42
|
+
|
|
43
|
+
## License
|
|
44
|
+
|
|
45
|
+
[MIT](https://github.com/signalxjs/core/blob/main/LICENSE)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sigx",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"description": "SignalX - Lightweight reactive component framework with signals and TSX support",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/sigx.js",
|
|
@@ -49,14 +49,14 @@
|
|
|
49
49
|
"node": "^20.19.0 || >=22.12.0"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@sigx/reactivity": "^0.2.
|
|
53
|
-
"@sigx/runtime-
|
|
54
|
-
"@sigx/runtime-
|
|
52
|
+
"@sigx/reactivity": "^0.2.3",
|
|
53
|
+
"@sigx/runtime-dom": "^0.2.3",
|
|
54
|
+
"@sigx/runtime-core": "^0.2.3"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"typescript": "^5.9.3",
|
|
58
58
|
"vite": "^8.0.3",
|
|
59
|
-
"@sigx/vite": "^0.2.
|
|
59
|
+
"@sigx/vite": "^0.2.3"
|
|
60
60
|
},
|
|
61
61
|
"scripts": {
|
|
62
62
|
"build": "vite build && tsgo --emitDeclarationOnly",
|