valyrian.js 8.1.12 → 9.0.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/README.md +103 -10
- package/dist/forms/index.js +1972 -0
- package/dist/forms/index.js.map +7 -0
- package/dist/forms/index.min.js +1 -0
- package/dist/forms/index.min.js.map +1 -0
- package/dist/forms/index.mjs +1951 -0
- package/dist/forms/index.mjs.map +7 -0
- package/dist/lib/forms/index.d.ts +49 -0
- package/dist/lib/forms/index.d.ts.map +1 -0
- package/dist/lib/money/index.d.ts +37 -0
- package/dist/lib/money/index.d.ts.map +1 -0
- package/dist/lib/network/index.d.ts +65 -0
- package/dist/lib/network/index.d.ts.map +1 -0
- package/dist/lib/node/utils/inline.d.ts.map +1 -1
- package/dist/lib/node/utils/tree-adapter.d.ts.map +1 -1
- package/dist/lib/offline/index.d.ts +76 -0
- package/dist/lib/offline/index.d.ts.map +1 -0
- package/dist/lib/query/index.d.ts +69 -0
- package/dist/lib/query/index.d.ts.map +1 -0
- package/dist/lib/request/index.d.ts +26 -1
- package/dist/lib/request/index.d.ts.map +1 -1
- package/dist/lib/router/index.d.ts +18 -0
- package/dist/lib/router/index.d.ts.map +1 -1
- package/dist/lib/sw/index.d.ts +38 -1
- package/dist/lib/sw/index.d.ts.map +1 -1
- package/dist/lib/tasks/index.d.ts +37 -0
- package/dist/lib/tasks/index.d.ts.map +1 -0
- package/dist/lib/translate/index.d.ts +0 -13
- package/dist/lib/translate/index.d.ts.map +1 -1
- package/dist/lib/utils/index.d.ts +1 -0
- package/dist/lib/utils/index.d.ts.map +1 -1
- package/dist/lib/utils/validators.d.ts +18 -0
- package/dist/lib/utils/validators.d.ts.map +1 -0
- package/dist/money/index.js +168 -0
- package/dist/money/index.js.map +7 -0
- package/dist/money/index.min.js +1 -0
- package/dist/money/index.min.js.map +1 -0
- package/dist/money/index.mjs +147 -0
- package/dist/money/index.mjs.map +7 -0
- package/dist/network/index.js +184 -0
- package/dist/network/index.js.map +7 -0
- package/dist/network/index.min.js +1 -0
- package/dist/network/index.min.js.map +1 -0
- package/dist/network/index.mjs +163 -0
- package/dist/network/index.mjs.map +7 -0
- package/dist/node/index.js +22 -2
- package/dist/node/index.js.map +3 -3
- package/dist/node/index.mjs +23 -3
- package/dist/node/index.mjs.map +4 -4
- package/dist/offline/index.js +230 -0
- package/dist/offline/index.js.map +7 -0
- package/dist/offline/index.min.js +1 -0
- package/dist/offline/index.min.js.map +1 -0
- package/dist/offline/index.mjs +209 -0
- package/dist/offline/index.mjs.map +7 -0
- package/dist/query/index.js +361 -0
- package/dist/query/index.js.map +7 -0
- package/dist/query/index.min.js +1 -0
- package/dist/query/index.min.js.map +1 -0
- package/dist/query/index.mjs +340 -0
- package/dist/query/index.mjs.map +7 -0
- package/dist/request/index.js +147 -55
- package/dist/request/index.js.map +2 -2
- package/dist/request/index.min.js +1 -1
- package/dist/request/index.min.js.map +1 -1
- package/dist/request/index.mjs +148 -56
- package/dist/request/index.mjs.map +2 -2
- package/dist/router/index.js +180 -43
- package/dist/router/index.js.map +2 -2
- package/dist/router/index.min.js +1 -1
- package/dist/router/index.min.js.map +1 -1
- package/dist/router/index.mjs +181 -43
- package/dist/router/index.mjs.map +2 -2
- package/dist/sw/index.js +134 -4
- package/dist/sw/index.js.map +2 -2
- package/dist/sw/index.min.js +1 -1
- package/dist/sw/index.min.js.map +1 -1
- package/dist/sw/index.mjs +134 -4
- package/dist/sw/index.mjs.map +2 -2
- package/dist/tasks/index.js +139 -0
- package/dist/tasks/index.js.map +7 -0
- package/dist/tasks/index.min.js +1 -0
- package/dist/tasks/index.min.js.map +1 -0
- package/dist/tasks/index.mjs +118 -0
- package/dist/tasks/index.mjs.map +7 -0
- package/dist/translate/index.js +5 -65
- package/dist/translate/index.js.map +2 -2
- package/dist/translate/index.min.js +1 -1
- package/dist/translate/index.min.js.map +1 -1
- package/dist/translate/index.mjs +6 -66
- package/dist/translate/index.mjs.map +2 -2
- package/dist/utils/index.js +103 -0
- package/dist/utils/index.js.map +3 -3
- package/dist/utils/index.min.js +1 -1
- package/dist/utils/index.min.js.map +1 -1
- package/dist/utils/index.mjs +103 -0
- package/dist/utils/index.mjs.map +3 -3
- package/lib/forms/index.ts +525 -0
- package/lib/money/index.ts +192 -0
- package/lib/network/index.ts +236 -0
- package/lib/node/utils/inline.ts +2 -1
- package/lib/node/utils/tree-adapter.ts +3 -1
- package/lib/offline/index.ts +301 -0
- package/lib/query/index.ts +464 -0
- package/lib/request/index.ts +206 -74
- package/lib/router/index.ts +235 -45
- package/lib/sw/index.ts +208 -4
- package/lib/tasks/index.ts +180 -0
- package/lib/translate/index.ts +6 -80
- package/lib/utils/index.ts +1 -0
- package/lib/utils/validators.ts +112 -0
- package/package.json +4 -2
- package/dist/hooks/index.js +0 -152
- package/dist/hooks/index.js.map +0 -7
- package/dist/hooks/index.min.js +0 -1
- package/dist/hooks/index.min.js.map +0 -1
- package/dist/hooks/index.mjs +0 -131
- package/dist/hooks/index.mjs.map +0 -7
- package/dist/lib/hooks/index.d.ts +0 -18
- package/dist/lib/hooks/index.d.ts.map +0 -1
- package/lib/hooks/index.ts +0 -176
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
<img src="assets/logo.png" style="width: 60%"/>
|
|
4
4
|
|
|
5
|
-
<p>
|
|
5
|
+
<p>
|
|
6
6
|
|
|
7
7
|
[](https://npmjs.org/package/valyrian.js "View this project on npm")
|
|
8
8
|

|
|
@@ -28,29 +28,122 @@
|
|
|
28
28
|
|
|
29
29
|
# Valyrian.js
|
|
30
30
|
|
|
31
|
-
Lightweight steel to forge
|
|
31
|
+
Lightweight steel to forge modern web apps.
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
<https://valyrianjs.dev/> (In development)
|
|
33
|
+
Valyrian.js is a runtime-first, isomorphic micro-framework. Render UI, add routing, manage state, and ship SSR with one mental model and minimal stack glue.
|
|
36
34
|
|
|
37
35
|
## Table of Contents
|
|
38
36
|
|
|
37
|
+
* [Quick Start](#quick-start)
|
|
38
|
+
* [Browser (CDN)](#browser-cdn)
|
|
39
|
+
* [Node (npm)](#node-npm)
|
|
40
|
+
* [Choose Your Path](#choose-your-path)
|
|
41
|
+
* [First 5 Minutes (Recommended)](#first-5-minutes-recommended)
|
|
42
|
+
* [Documentation](#documentation)
|
|
43
|
+
* [Why Valyrian.js](#why-valyrianjs)
|
|
44
|
+
* [Testing Philosophy](#testing-philosophy)
|
|
39
45
|
* [Tests](#tests)
|
|
46
|
+
* [More Guides](#more-guides)
|
|
40
47
|
* [Contributing](#contributing)
|
|
41
48
|
* [Legal](#legal)
|
|
42
49
|
|
|
50
|
+
## Quick Start
|
|
51
|
+
|
|
52
|
+
Get a working screen first. Start with the CDN path for the fastest feedback loop.
|
|
53
|
+
|
|
54
|
+
### Browser (CDN)
|
|
55
|
+
|
|
56
|
+
```html
|
|
57
|
+
<script type="module">
|
|
58
|
+
import "https://unpkg.com/valyrian.js";
|
|
59
|
+
const { mount } = Valyrian;
|
|
60
|
+
mount("body", () => "Hello from Valyrian.js");
|
|
61
|
+
</script>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Expected result: the text appears in the page body.
|
|
65
|
+
|
|
66
|
+
### Node (npm)
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
npm install valyrian.js
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Then follow [docs/2-getting-started.md](docs/2-getting-started.md) for the `inline` build flow and first TSX/JSX setup.
|
|
73
|
+
|
|
74
|
+
## Choose Your Path
|
|
75
|
+
|
|
76
|
+
* **Try it now (no install):** use the CDN snippet above.
|
|
77
|
+
* **Build with TSX/JSX:** start at [docs/2-getting-started.md](docs/2-getting-started.md) (Node path).
|
|
78
|
+
* **Ship SSR/isomorphic behavior:** complete chapters 1-3, then go to [docs/7-full-stack-capability.md](docs/7-full-stack-capability.md).
|
|
79
|
+
|
|
80
|
+
## First 5 Minutes (Recommended)
|
|
81
|
+
|
|
82
|
+
1. Copy the CDN snippet into an `index.html` file.
|
|
83
|
+
2. Open it in your browser and confirm the UI renders.
|
|
84
|
+
3. Change the mounted text to verify the update loop.
|
|
85
|
+
4. Continue with [docs/3-the-essentials.md](docs/3-the-essentials.md).
|
|
86
|
+
|
|
87
|
+
If this works, you already have the core Valyrian mental model.
|
|
88
|
+
|
|
89
|
+
## Documentation
|
|
90
|
+
|
|
91
|
+
* Start here: [docs/toc.md](docs/toc.md)
|
|
92
|
+
* Introduction: [docs/1-introduction.md](docs/1-introduction.md)
|
|
93
|
+
* Getting Started (No-Build First): [docs/2-getting-started.md](docs/2-getting-started.md)
|
|
94
|
+
* The Essentials: [docs/3-the-essentials.md](docs/3-the-essentials.md)
|
|
95
|
+
* Runtime core API reference: [docs/3-runtime-core.md](docs/3-runtime-core.md)
|
|
96
|
+
* Building Single Page Applications (SPA Hub): [docs/4-building-spa.md](docs/4-building-spa.md)
|
|
97
|
+
* Advanced State Management (Hub): [docs/5-advanced-state-management.md](docs/5-advanced-state-management.md)
|
|
98
|
+
* The Full-Stack Capability (Isomorphism Hub): [docs/7-full-stack-capability.md](docs/7-full-stack-capability.md)
|
|
99
|
+
* Utilities and Ecosystem (Hub): [docs/8-utilities-and-ecosystem.md](docs/8-utilities-and-ecosystem.md)
|
|
100
|
+
* Website: <https://valyrianjs.dev/>
|
|
101
|
+
|
|
102
|
+
## Why Valyrian.js
|
|
103
|
+
|
|
104
|
+
* One runtime model across browser and server.
|
|
105
|
+
* Built-in modules for routing, request, state, forms, offline, and SSR tooling.
|
|
106
|
+
* Minimal dependencies and explicit control of rendering behavior.
|
|
107
|
+
* Can run with or without a traditional bundler workflow.
|
|
108
|
+
|
|
109
|
+
Good fit:
|
|
110
|
+
|
|
111
|
+
* You want a smaller stack with fewer moving parts.
|
|
112
|
+
* You prefer explicit updates and clear runtime behavior.
|
|
113
|
+
* You want browser and server flows with a shared mental model.
|
|
114
|
+
|
|
115
|
+
Not the best fit:
|
|
116
|
+
|
|
117
|
+
* You need a huge plugin ecosystem as your primary decision factor.
|
|
118
|
+
* You require a fully opinionated meta-framework workflow out of the box.
|
|
119
|
+
|
|
120
|
+
## Testing Philosophy
|
|
121
|
+
|
|
122
|
+
Valyrian.js tests are behavior-first and API-contract driven. Public modules validate happy paths, edge cases, and runtime consistency across browser-like and Node-like environments. Documentation examples are kept aligned with tested behavior.
|
|
123
|
+
|
|
43
124
|
## Tests
|
|
44
125
|
|
|
45
|
-
|
|
126
|
+
```bash
|
|
127
|
+
npm test
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
For development mode:
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
npm run dev:test
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## More Guides
|
|
46
137
|
|
|
47
|
-
|
|
138
|
+
* Recipes and integrations: [docs/9-recipes-and-integrations.md](docs/9-recipes-and-integrations.md)
|
|
139
|
+
* Meta-framework CLI: [docs/10-meta-framework-cli.md](docs/10-meta-framework-cli.md)
|
|
140
|
+
* Roadmap and contribution model: [docs/11-roadmap-and-contribution.md](docs/11-roadmap-and-contribution.md)
|
|
48
141
|
|
|
49
142
|
## Contributing
|
|
50
143
|
|
|
51
|
-
*
|
|
52
|
-
* Add tests for
|
|
53
|
-
* Update
|
|
144
|
+
* Run lint/format checks before opening a PR.
|
|
145
|
+
* Add or update tests for new behavior.
|
|
146
|
+
* Update docs in `docs/` whenever public behavior changes.
|
|
54
147
|
|
|
55
148
|
## Legal
|
|
56
149
|
|