@davidcal/frosth 1.6.0 → 1.6.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # Frosth - Yet another UI framework
2
2
 
3
- **Latest version**: v1.6.0
3
+ **Latest version**: v1.6.1
4
4
 
5
5
  ## Motivation
6
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@davidcal/frosth",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "description": "Async-first CRUD-last UI framework that treats encapsulation as a solved problem.",
5
5
  "type": "module",
6
6
  "main": "./src/sigew.js",
@@ -19,14 +19,14 @@ export const create_producer = () => {
19
19
  return result;
20
20
  };
21
21
 
22
- result.emit = (calldata) => {
23
- return result.emit_many([calldata]);
22
+ result.emit = (message) => {
23
+ return result.emit_many([message]);
24
24
  };
25
25
 
26
- result.emit_many = (calldatas) => {
27
- for (const calldata of calldatas) {
26
+ result.emit_many = (messages) => {
27
+ for (const message of messages) {
28
28
  for (const handler of subscriptions) {
29
- handler(calldata);
29
+ handler(message);
30
30
  }
31
31
  }
32
32
  };
@@ -25,6 +25,10 @@ class Self {
25
25
  return create_self(this, run_effect, options);
26
26
  }
27
27
 
28
+ _is_effectfully_useful() {
29
+ return this._run_effect !== undefined;
30
+ }
31
+
28
32
  create_effect(callback) {
29
33
  let child;
30
34
 
package/src/sigew.js CHANGED
@@ -8,6 +8,11 @@ import { MARK_INSTALLABLE } from "./constants.js";
8
8
  import { create_memo } from "./create_memo.js";
9
9
  import { create_beacon } from "./create_beacon.js";
10
10
  import { create_stream } from "./create_stream.js";
11
+ import { create_producer } from "./create_producer.js";
12
+ import { stream_filter } from "./stream_filter.js";
13
+ import { stream_map } from "./stream_map.js";
14
+ import { stream_reduce } from "./stream_reduce.js";
15
+ import { stream_latest } from "./stream_latest.js";
11
16
 
12
17
  export { create_self };
13
18
  export { create_signal };
@@ -15,6 +20,11 @@ export { h };
15
20
  export { create_memo };
16
21
  export { create_beacon };
17
22
  export { create_stream };
23
+ export { create_producer };
24
+ export { stream_filter };
25
+ export { stream_map };
26
+ export { stream_reduce };
27
+ export { stream_latest };
18
28
 
19
29
  export const installarea = (s) => {
20
30
  const storage = s.create_housed_signal(() => undefined);