bobe 0.0.57 → 0.0.58
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/dist/bobe.cjs.js +45 -1
- package/dist/bobe.cjs.js.map +1 -1
- package/dist/bobe.compiler.cjs.js +45 -1
- package/dist/bobe.compiler.cjs.js.map +1 -1
- package/dist/bobe.compiler.esm.js +45 -1
- package/dist/bobe.compiler.esm.js.map +1 -1
- package/dist/bobe.esm.js +45 -1
- package/dist/bobe.esm.js.map +1 -1
- package/dist/index.umd.js +45 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +3 -3
|
@@ -2413,7 +2413,51 @@ class Interpreter {
|
|
|
2413
2413
|
hookI = _this$tokenizer$_hook4[2];
|
|
2414
2414
|
const rawVal = data[aoye.Keys.Raw][value];
|
|
2415
2415
|
const isFn = typeof rawVal === 'function';
|
|
2416
|
-
if (key === '
|
|
2416
|
+
if (key === 'props') {
|
|
2417
|
+
let prevKeys = new Set();
|
|
2418
|
+
const savedDefaults = new Map();
|
|
2419
|
+
new this.Effect(() => {
|
|
2420
|
+
const props = isFn ? rawVal : Reflect.has(data[aoye.Keys.Raw], value) ? data[value] : this.getFn(data, value)();
|
|
2421
|
+
const isComponent = _node.__logicType & TokenizerSwitcherBit;
|
|
2422
|
+
const rawTarget = isComponent ? _node.data[aoye.Keys.Raw] : null;
|
|
2423
|
+
const cleanupKeys = keysToClean => {
|
|
2424
|
+
for (const k of keysToClean) {
|
|
2425
|
+
if (k.startsWith('on')) continue;
|
|
2426
|
+
if (isComponent) {
|
|
2427
|
+
_node.data[k] = savedDefaults.has(k) ? savedDefaults.get(k) : undefined;
|
|
2428
|
+
} else {
|
|
2429
|
+
this.setProp(_node, k, undefined, hookI);
|
|
2430
|
+
}
|
|
2431
|
+
}
|
|
2432
|
+
};
|
|
2433
|
+
if (!props || typeof props !== 'object') {
|
|
2434
|
+
cleanupKeys(prevKeys);
|
|
2435
|
+
prevKeys.clear();
|
|
2436
|
+
return;
|
|
2437
|
+
}
|
|
2438
|
+
props[aoye.Keys.Iterator];
|
|
2439
|
+
const raw = props[aoye.Keys.Raw] || props;
|
|
2440
|
+
const keys = Object.keys(raw);
|
|
2441
|
+
const newKeys = new Set();
|
|
2442
|
+
for (let i = 0; i < keys.length; i++) {
|
|
2443
|
+
const k = keys[i];
|
|
2444
|
+
newKeys.add(k);
|
|
2445
|
+
prevKeys.delete(k);
|
|
2446
|
+
if (isComponent) {
|
|
2447
|
+
const savedK = savedDefaults.has(k);
|
|
2448
|
+
if (!savedK && Object.prototype.hasOwnProperty.call(rawTarget, k)) {
|
|
2449
|
+
savedDefaults.set(k, rawTarget[k]);
|
|
2450
|
+
}
|
|
2451
|
+
const val = props[k];
|
|
2452
|
+
_node.data[k] = val === undefined && savedK ? savedDefaults.get(k) : val;
|
|
2453
|
+
} else {
|
|
2454
|
+
this.onePropParsed(props, _node, k, k, true, false, hookI);
|
|
2455
|
+
}
|
|
2456
|
+
}
|
|
2457
|
+
cleanupKeys(prevKeys);
|
|
2458
|
+
prevKeys = newKeys;
|
|
2459
|
+
}, aoye.ScheduleType.Render);
|
|
2460
|
+
} else if (key === 'ref') {
|
|
2417
2461
|
const valueIsMapKey = Reflect.has(data[aoye.Keys.Raw], value);
|
|
2418
2462
|
let refValue = _node;
|
|
2419
2463
|
if (_node.__logicType & TokenizerSwitcherBit) {
|