mono-jsx 0.8.0 → 0.8.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.
@@ -71,7 +71,7 @@ var Signal = class extends Reactive {
71
71
  onAbort(abortSignal, this.#scope[$watch](this.#key, callback));
72
72
  }
73
73
  };
74
- var Compute = class extends Reactive {
74
+ var Computed = class extends Reactive {
75
75
  #scope;
76
76
  #compute;
77
77
  #deps;
@@ -202,7 +202,7 @@ var createScope = (slots, abortSignal) => {
202
202
  throw new TypeError("setter is not allowed");
203
203
  }
204
204
  if (get) {
205
- target[key2] = new Compute(receiver, get);
205
+ target[key2] = new Computed(receiver, get);
206
206
  } else {
207
207
  if (key2 === "effect") {
208
208
  if (isFunction(value)) {
@@ -216,8 +216,8 @@ var createScope = (slots, abortSignal) => {
216
216
  return receiver;
217
217
  };
218
218
  case "$":
219
- case "compute":
220
- return (fn) => new Compute(receiver, fn);
219
+ case "computed":
220
+ return (fn) => new Computed(receiver, fn);
221
221
  case "effect":
222
222
  return (callback) => {
223
223
  queueMicrotask(() => {
@@ -384,7 +384,7 @@ var render = (scope, child, root, abortSignal) => {
384
384
  }, abortSignal);
385
385
  onAbort(abortSignal, () => ac?.abort());
386
386
  } else {
387
- console.warn("[mono-jsx] <" + tag + "> The `when` prop is not a signal/compute.");
387
+ console.warn("[mono-jsx] <" + tag + "> The `when` prop is not a signal/computed.");
388
388
  if (when) {
389
389
  renderChildren(scope, children, root, abortSignal);
390
390
  }
package/jsx-runtime.mjs CHANGED
@@ -176,7 +176,7 @@ var $vnode = Symbol.for("jsx.vnode");
176
176
  var $setup = Symbol.for("mono.setup");
177
177
 
178
178
  // version.ts
179
- var VERSION = "0.8.0";
179
+ var VERSION = "0.8.1";
180
180
 
181
181
  // render.ts
182
182
  var FunctionIdGenerator = class extends Map {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mono-jsx",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "description": "`<html>` as a `Response`.",
5
5
  "type": "module",
6
6
  "module": "./index.mjs",