@getforma/core 0.1.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 (47) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +48 -0
  3. package/dist/chunk-27QSSN4E.cjs +1773 -0
  4. package/dist/chunk-27QSSN4E.cjs.map +1 -0
  5. package/dist/chunk-DB2ULMOM.js +1750 -0
  6. package/dist/chunk-DB2ULMOM.js.map +1 -0
  7. package/dist/chunk-FPSLC62A.cjs +31 -0
  8. package/dist/chunk-FPSLC62A.cjs.map +1 -0
  9. package/dist/chunk-KX5WRZH7.js +27 -0
  10. package/dist/chunk-KX5WRZH7.js.map +1 -0
  11. package/dist/formajs-runtime-hardened.global.js +2 -0
  12. package/dist/formajs-runtime-hardened.global.js.map +1 -0
  13. package/dist/formajs-runtime.global.js +2 -0
  14. package/dist/formajs-runtime.global.js.map +1 -0
  15. package/dist/formajs.global.js +2 -0
  16. package/dist/formajs.global.js.map +1 -0
  17. package/dist/index.cjs +1626 -0
  18. package/dist/index.cjs.map +1 -0
  19. package/dist/index.d.cts +1382 -0
  20. package/dist/index.d.ts +1382 -0
  21. package/dist/index.js +1482 -0
  22. package/dist/index.js.map +1 -0
  23. package/dist/runtime-hardened.cjs +2805 -0
  24. package/dist/runtime-hardened.cjs.map +1 -0
  25. package/dist/runtime-hardened.js +2786 -0
  26. package/dist/runtime-hardened.js.map +1 -0
  27. package/dist/runtime.cjs +2531 -0
  28. package/dist/runtime.cjs.map +1 -0
  29. package/dist/runtime.d.cts +86 -0
  30. package/dist/runtime.d.ts +86 -0
  31. package/dist/runtime.js +2512 -0
  32. package/dist/runtime.js.map +1 -0
  33. package/dist/signal-CfLDwMyg.d.cts +29 -0
  34. package/dist/signal-CfLDwMyg.d.ts +29 -0
  35. package/dist/ssr/index.cjs +381 -0
  36. package/dist/ssr/index.cjs.map +1 -0
  37. package/dist/ssr/index.d.cts +154 -0
  38. package/dist/ssr/index.d.ts +154 -0
  39. package/dist/ssr/index.js +371 -0
  40. package/dist/ssr/index.js.map +1 -0
  41. package/dist/tc39-compat.cjs +45 -0
  42. package/dist/tc39-compat.cjs.map +1 -0
  43. package/dist/tc39-compat.d.cts +50 -0
  44. package/dist/tc39-compat.d.ts +50 -0
  45. package/dist/tc39-compat.js +42 -0
  46. package/dist/tc39-compat.js.map +1 -0
  47. package/package.json +122 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Forma
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,48 @@
1
+ # FormaJS
2
+
3
+ [![CI](https://github.com/getforma-dev/formajs/actions/workflows/ci.yml/badge.svg)](https://github.com/getforma-dev/formajs/actions/workflows/ci.yml)
4
+ [![npm](https://img.shields.io/npm/v/@getforma/core)](https://www.npmjs.com/package/@getforma/core)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
+
7
+ Reactive DOM library with fine-grained signals, islands architecture, and SSR hydration. ~15KB gzipped.
8
+
9
+ ## Install
10
+
11
+ ```bash
12
+ npm install @getforma/core
13
+ ```
14
+
15
+ ## Quick Start
16
+
17
+ ```typescript
18
+ import { createSignal, h, mount } from '@getforma/core';
19
+
20
+ const [count, setCount] = createSignal(0);
21
+
22
+ mount(() =>
23
+ h('button', { onClick: () => setCount(count() + 1) },
24
+ () => `Clicked ${count()} times`
25
+ ),
26
+ '#app'
27
+ );
28
+ ```
29
+
30
+ ## Features
31
+
32
+ - **Fine-grained reactivity** — signals, effects, computed values via alien-signals
33
+ - **Virtual DOM** — `h()` function with reactive attribute and text binding
34
+ - **Islands architecture** — `activateIslands()` for partial hydration of server-rendered HTML
35
+ - **Conditional rendering** — `createShow()`, `createSwitch()` with cached branches
36
+ - **List rendering** — `createList()` with keyed reconciliation, handles 50K+ rows
37
+ - **State management** — `createStore()` with deep reactivity, history, persistence
38
+ - **SSR support** — server-side rendering runtime with hydration
39
+
40
+ ## Ecosystem
41
+
42
+ - [forma](https://github.com/getforma-dev/forma) — Rust server framework (forma-ir + forma-server)
43
+ - [forma-tools](https://github.com/getforma-dev/forma-tools) — Build tooling (@getforma/compiler + @getforma/build)
44
+ - [create-forma-app](https://github.com/getforma-dev/create-forma-app) — CLI scaffolder
45
+
46
+ ## License
47
+
48
+ MIT