@panphora/sapjs 0.2.0 → 0.2.1
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 +5 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
Sap is a tiny reactive layer for hand-written HTML files. You declare state, formulas, and paints as plain attributes; Sap rebuilds everything from the live DOM on every change. The DOM is the only store, so the file you save *is* the app: open it in any browser, it runs.
|
|
6
6
|
|
|
7
7
|
```html
|
|
8
|
-
<script src="https://cdn.jsdelivr.net/npm/sapjs/dist/sap.min.js"></script>
|
|
8
|
+
<script src="https://cdn.jsdelivr.net/npm/@panphora/sapjs/dist/sap.min.js"></script>
|
|
9
9
|
|
|
10
10
|
<main sap>
|
|
11
11
|
<input type="number" bind="qty" value="3">
|
|
@@ -47,17 +47,17 @@ Reads are expressions over `state` (the nearest scope) and `item` (the nearest r
|
|
|
47
47
|
Drop-in (auto-mounts every `[sap]` on load):
|
|
48
48
|
|
|
49
49
|
```html
|
|
50
|
-
<script src="https://cdn.jsdelivr.net/npm/sapjs/dist/sap.min.js"></script>
|
|
50
|
+
<script src="https://cdn.jsdelivr.net/npm/@panphora/sapjs/dist/sap.min.js"></script>
|
|
51
51
|
```
|
|
52
52
|
|
|
53
53
|
Or as a module:
|
|
54
54
|
|
|
55
55
|
```js
|
|
56
|
-
import Sap from "sapjs";
|
|
56
|
+
import Sap from "@panphora/sapjs";
|
|
57
57
|
```
|
|
58
58
|
|
|
59
59
|
```bash
|
|
60
|
-
npm install sapjs
|
|
60
|
+
npm install @panphora/sapjs
|
|
61
61
|
```
|
|
62
62
|
|
|
63
63
|
Importing the module also auto-mounts every `[sap]` on `DOMContentLoaded`. Call `Sap.mount(rootOrSelector)` to mount a root added later, or `Sap.mount()` to rescan; `Sap.config({ formats })` registers custom formats as a config-object alternative to `Sap.formats.x`.
|
|
@@ -81,7 +81,7 @@ That regenerates `docs/sapjs-explained.html` and refreshes the inlined engine fr
|
|
|
81
81
|
A complete todo app, with no JavaScript at all. Copy it into a `.html` file and open it.
|
|
82
82
|
|
|
83
83
|
```html
|
|
84
|
-
<script src="https://cdn.jsdelivr.net/npm/sapjs/dist/sap.min.js"></script>
|
|
84
|
+
<script src="https://cdn.jsdelivr.net/npm/@panphora/sapjs/dist/sap.min.js"></script>
|
|
85
85
|
|
|
86
86
|
<main sap>
|
|
87
87
|
<form trigger-add="todos">
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panphora/sapjs",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "A reactive HTML library where the DOM is the only state store. Structure-first, one write path, transient rebuild. An Alpine alternative built for malleable, self-saving HTML.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/sap.js",
|