webdetta 0.1.233 → 0.1.235

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webdetta",
3
- "version": "0.1.233",
3
+ "version": "0.1.235",
4
4
  "author": "Fedot Kriutchenko <fodyadev@gmail.com>",
5
5
  "description": "",
6
6
  "license": "MIT",
@@ -76,7 +76,6 @@ export class Effect {
76
76
  this.readonly = readonly;
77
77
  if (parent) {
78
78
  this.errorHandler ??= parent.errorHandler;
79
- this.readonly ||= parent.readonly;
80
79
  (parent.children ??= []).push(this);
81
80
  }
82
81
  }
@@ -55,7 +55,7 @@ r.effect = (handler, {
55
55
  handler,
56
56
  errorHandler: onError,
57
57
  tracking: track,
58
- readonly: writes !== undefined ? !writes : parent?.readonly,
58
+ readonly: writes === undefined ? undefined : !writes
59
59
  });
60
60
  if (run) effect.run();
61
61
  return effect;
@@ -1,4 +1,4 @@
1
- import { isIterable, isObject, unwrapFn } from '../common/utils.js';
1
+ import { isIterable, isObject, callFn } from '../common/utils.js';
2
2
  import { once } from '../execution/index.js';
3
3
  import { r } from '../reactivity/index.js';
4
4
  import { Element, Operator, processItem } from './base.js';
@@ -20,7 +20,7 @@ const createContainer = (content) => {
20
20
 
21
21
  const nodes = [], operators = [];
22
22
  const contentEffect = r.effect(() => {
23
- const items = unwrapFn(content);
23
+ const items = callFn(content);
24
24
  processItem(items, o => operators.push(o), c => nodes.push(c), true);
25
25
  if (startNode) appendAfter(startNode);
26
26
  return () => {
@@ -69,7 +69,7 @@ export const createList = (itemsFn, renderItem, keyFn = listItemKey) => {
69
69
  });
70
70
 
71
71
  const effect = r.effect(() => {
72
- const items = unwrapFn(itemsFn);
72
+ const items = callFn(itemsFn);
73
73
  const entries = listItemsToEntries(items, keyFn);
74
74
 
75
75
  let last = root, i = 0;
@@ -104,7 +104,7 @@ export const createSlot = (content) => {
104
104
  export const createIf = () => {
105
105
  const conditions = [];
106
106
  const node = createSlot(() =>
107
- conditions.find(d => unwrapFn(d.cond))?.value
107
+ conditions.find(d => callFn(d.cond))?.value
108
108
  );
109
109
 
110
110
  node.elif = (cond, ...args) => {