flarp 1.0.0 → 1.0.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 +10 -4
- package/package.json +2 -4
package/README.md
CHANGED
|
@@ -77,7 +77,7 @@ Or use directly:
|
|
|
77
77
|
### `<f-state>` — The Store
|
|
78
78
|
|
|
79
79
|
```html
|
|
80
|
-
<f-state
|
|
80
|
+
<f-state
|
|
81
81
|
key="myapp" <!-- Persistence key -->
|
|
82
82
|
autosave="500" <!-- Debounce ms -->
|
|
83
83
|
src="/api/data" <!-- Load from URL -->
|
|
@@ -165,7 +165,7 @@ Components don't need to be nested inside `<f-state>`. Flarp searches siblings a
|
|
|
165
165
|
<f-state id="app">
|
|
166
166
|
<User><n>Alice</n></User>
|
|
167
167
|
</f-state>
|
|
168
|
-
|
|
168
|
+
|
|
169
169
|
<main>
|
|
170
170
|
<!-- Finds sibling f-state automatically -->
|
|
171
171
|
<f-text path="User.Name"></f-text>
|
|
@@ -256,10 +256,10 @@ import { findStore } from 'flarp';
|
|
|
256
256
|
class UserCard extends HTMLElement {
|
|
257
257
|
connectedCallback() {
|
|
258
258
|
const store = findStore(this);
|
|
259
|
-
|
|
259
|
+
|
|
260
260
|
store.state.when('ready', () => {
|
|
261
261
|
const name = store.at('User.Name');
|
|
262
|
-
|
|
262
|
+
|
|
263
263
|
name.subscribe(v => {
|
|
264
264
|
this.innerHTML = `<h2>${v}</h2>`;
|
|
265
265
|
});
|
|
@@ -330,3 +330,9 @@ MIT
|
|
|
330
330
|
---
|
|
331
331
|
|
|
332
332
|
*Built for developers who believe state management can be simple.*
|
|
333
|
+
|
|
334
|
+
## Name
|
|
335
|
+
|
|
336
|
+
flarp (from Jargon File)
|
|
337
|
+
|
|
338
|
+
/flarp/ [Rutgers University] Yet another metasyntactic variable (see foo). Among those who use it, it is associated with a legend that any program not containing the word "flarp" somewhere will not work. The legend is discreetly silent on the reliability of programs which *do* contain the magic word.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flarp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "DOM-native XML state management for Web Components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"src"
|
|
18
18
|
],
|
|
19
19
|
"scripts": {
|
|
20
|
+
"save": "git add .; git commit -m 'Updated Release'; npm version patch; npm publish; git push --follow-tags;",
|
|
20
21
|
"dev": "http-server -c-1 -o",
|
|
21
22
|
"start": "http-server -c-1 -o"
|
|
22
23
|
},
|
|
@@ -28,8 +29,6 @@
|
|
|
28
29
|
"web-components",
|
|
29
30
|
"dom"
|
|
30
31
|
],
|
|
31
|
-
|
|
32
|
-
|
|
33
32
|
"author": "catpea (https://github.com/catpea)",
|
|
34
33
|
"license": "MIT",
|
|
35
34
|
"repository": {
|
|
@@ -44,5 +43,4 @@
|
|
|
44
43
|
"type": "github",
|
|
45
44
|
"url": "https://github.com/sponsors/catpea"
|
|
46
45
|
}
|
|
47
|
-
|
|
48
46
|
}
|