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.
Files changed (121) hide show
  1. package/README.md +103 -10
  2. package/dist/forms/index.js +1972 -0
  3. package/dist/forms/index.js.map +7 -0
  4. package/dist/forms/index.min.js +1 -0
  5. package/dist/forms/index.min.js.map +1 -0
  6. package/dist/forms/index.mjs +1951 -0
  7. package/dist/forms/index.mjs.map +7 -0
  8. package/dist/lib/forms/index.d.ts +49 -0
  9. package/dist/lib/forms/index.d.ts.map +1 -0
  10. package/dist/lib/money/index.d.ts +37 -0
  11. package/dist/lib/money/index.d.ts.map +1 -0
  12. package/dist/lib/network/index.d.ts +65 -0
  13. package/dist/lib/network/index.d.ts.map +1 -0
  14. package/dist/lib/node/utils/inline.d.ts.map +1 -1
  15. package/dist/lib/node/utils/tree-adapter.d.ts.map +1 -1
  16. package/dist/lib/offline/index.d.ts +76 -0
  17. package/dist/lib/offline/index.d.ts.map +1 -0
  18. package/dist/lib/query/index.d.ts +69 -0
  19. package/dist/lib/query/index.d.ts.map +1 -0
  20. package/dist/lib/request/index.d.ts +26 -1
  21. package/dist/lib/request/index.d.ts.map +1 -1
  22. package/dist/lib/router/index.d.ts +18 -0
  23. package/dist/lib/router/index.d.ts.map +1 -1
  24. package/dist/lib/sw/index.d.ts +38 -1
  25. package/dist/lib/sw/index.d.ts.map +1 -1
  26. package/dist/lib/tasks/index.d.ts +37 -0
  27. package/dist/lib/tasks/index.d.ts.map +1 -0
  28. package/dist/lib/translate/index.d.ts +0 -13
  29. package/dist/lib/translate/index.d.ts.map +1 -1
  30. package/dist/lib/utils/index.d.ts +1 -0
  31. package/dist/lib/utils/index.d.ts.map +1 -1
  32. package/dist/lib/utils/validators.d.ts +18 -0
  33. package/dist/lib/utils/validators.d.ts.map +1 -0
  34. package/dist/money/index.js +168 -0
  35. package/dist/money/index.js.map +7 -0
  36. package/dist/money/index.min.js +1 -0
  37. package/dist/money/index.min.js.map +1 -0
  38. package/dist/money/index.mjs +147 -0
  39. package/dist/money/index.mjs.map +7 -0
  40. package/dist/network/index.js +184 -0
  41. package/dist/network/index.js.map +7 -0
  42. package/dist/network/index.min.js +1 -0
  43. package/dist/network/index.min.js.map +1 -0
  44. package/dist/network/index.mjs +163 -0
  45. package/dist/network/index.mjs.map +7 -0
  46. package/dist/node/index.js +22 -2
  47. package/dist/node/index.js.map +3 -3
  48. package/dist/node/index.mjs +23 -3
  49. package/dist/node/index.mjs.map +4 -4
  50. package/dist/offline/index.js +230 -0
  51. package/dist/offline/index.js.map +7 -0
  52. package/dist/offline/index.min.js +1 -0
  53. package/dist/offline/index.min.js.map +1 -0
  54. package/dist/offline/index.mjs +209 -0
  55. package/dist/offline/index.mjs.map +7 -0
  56. package/dist/query/index.js +361 -0
  57. package/dist/query/index.js.map +7 -0
  58. package/dist/query/index.min.js +1 -0
  59. package/dist/query/index.min.js.map +1 -0
  60. package/dist/query/index.mjs +340 -0
  61. package/dist/query/index.mjs.map +7 -0
  62. package/dist/request/index.js +147 -55
  63. package/dist/request/index.js.map +2 -2
  64. package/dist/request/index.min.js +1 -1
  65. package/dist/request/index.min.js.map +1 -1
  66. package/dist/request/index.mjs +148 -56
  67. package/dist/request/index.mjs.map +2 -2
  68. package/dist/router/index.js +180 -43
  69. package/dist/router/index.js.map +2 -2
  70. package/dist/router/index.min.js +1 -1
  71. package/dist/router/index.min.js.map +1 -1
  72. package/dist/router/index.mjs +181 -43
  73. package/dist/router/index.mjs.map +2 -2
  74. package/dist/sw/index.js +134 -4
  75. package/dist/sw/index.js.map +2 -2
  76. package/dist/sw/index.min.js +1 -1
  77. package/dist/sw/index.min.js.map +1 -1
  78. package/dist/sw/index.mjs +134 -4
  79. package/dist/sw/index.mjs.map +2 -2
  80. package/dist/tasks/index.js +139 -0
  81. package/dist/tasks/index.js.map +7 -0
  82. package/dist/tasks/index.min.js +1 -0
  83. package/dist/tasks/index.min.js.map +1 -0
  84. package/dist/tasks/index.mjs +118 -0
  85. package/dist/tasks/index.mjs.map +7 -0
  86. package/dist/translate/index.js +5 -65
  87. package/dist/translate/index.js.map +2 -2
  88. package/dist/translate/index.min.js +1 -1
  89. package/dist/translate/index.min.js.map +1 -1
  90. package/dist/translate/index.mjs +6 -66
  91. package/dist/translate/index.mjs.map +2 -2
  92. package/dist/utils/index.js +103 -0
  93. package/dist/utils/index.js.map +3 -3
  94. package/dist/utils/index.min.js +1 -1
  95. package/dist/utils/index.min.js.map +1 -1
  96. package/dist/utils/index.mjs +103 -0
  97. package/dist/utils/index.mjs.map +3 -3
  98. package/lib/forms/index.ts +525 -0
  99. package/lib/money/index.ts +192 -0
  100. package/lib/network/index.ts +236 -0
  101. package/lib/node/utils/inline.ts +2 -1
  102. package/lib/node/utils/tree-adapter.ts +3 -1
  103. package/lib/offline/index.ts +301 -0
  104. package/lib/query/index.ts +464 -0
  105. package/lib/request/index.ts +206 -74
  106. package/lib/router/index.ts +235 -45
  107. package/lib/sw/index.ts +208 -4
  108. package/lib/tasks/index.ts +180 -0
  109. package/lib/translate/index.ts +6 -80
  110. package/lib/utils/index.ts +1 -0
  111. package/lib/utils/validators.ts +112 -0
  112. package/package.json +4 -2
  113. package/dist/hooks/index.js +0 -152
  114. package/dist/hooks/index.js.map +0 -7
  115. package/dist/hooks/index.min.js +0 -1
  116. package/dist/hooks/index.min.js.map +0 -1
  117. package/dist/hooks/index.mjs +0 -131
  118. package/dist/hooks/index.mjs.map +0 -7
  119. package/dist/lib/hooks/index.d.ts +0 -18
  120. package/dist/lib/hooks/index.d.ts.map +0 -1
  121. 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
  [![npm version](https://img.shields.io/npm/v/valyrian.js)](https://npmjs.org/package/valyrian.js "View this project on npm")
8
8
  ![node-current](https://img.shields.io/node/v/valyrian.js)
@@ -28,29 +28,122 @@
28
28
 
29
29
  # Valyrian.js
30
30
 
31
- Lightweight steel to forge PWAs. (Minimal Frontend Framework with server side rendering and other capabilities)
31
+ Lightweight steel to forge modern web apps.
32
32
 
33
- ## Documentation
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
- `yarn test`
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
- For development use `yarn dev:test`
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
- * Use prettify and eslint to lint your code.
52
- * Add tests for any new or changed functionality.
53
- * Update the readme with an example if you add or change any functionality.
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