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
package/dist/index.umd.js
CHANGED
|
@@ -2387,7 +2387,51 @@
|
|
|
2387
2387
|
hookI = _this$tokenizer$_hook4[2];
|
|
2388
2388
|
const rawVal = data[aoye.Keys.Raw][value];
|
|
2389
2389
|
const isFn = typeof rawVal === 'function';
|
|
2390
|
-
if (key === '
|
|
2390
|
+
if (key === 'props') {
|
|
2391
|
+
let prevKeys = new Set();
|
|
2392
|
+
const savedDefaults = new Map();
|
|
2393
|
+
new this.Effect(() => {
|
|
2394
|
+
const props = isFn ? rawVal : Reflect.has(data[aoye.Keys.Raw], value) ? data[value] : this.getFn(data, value)();
|
|
2395
|
+
const isComponent = _node.__logicType & TokenizerSwitcherBit;
|
|
2396
|
+
const rawTarget = isComponent ? _node.data[aoye.Keys.Raw] : null;
|
|
2397
|
+
const cleanupKeys = keysToClean => {
|
|
2398
|
+
for (const k of keysToClean) {
|
|
2399
|
+
if (k.startsWith('on')) continue;
|
|
2400
|
+
if (isComponent) {
|
|
2401
|
+
_node.data[k] = savedDefaults.has(k) ? savedDefaults.get(k) : undefined;
|
|
2402
|
+
} else {
|
|
2403
|
+
this.setProp(_node, k, undefined, hookI);
|
|
2404
|
+
}
|
|
2405
|
+
}
|
|
2406
|
+
};
|
|
2407
|
+
if (!props || typeof props !== 'object') {
|
|
2408
|
+
cleanupKeys(prevKeys);
|
|
2409
|
+
prevKeys.clear();
|
|
2410
|
+
return;
|
|
2411
|
+
}
|
|
2412
|
+
props[aoye.Keys.Iterator];
|
|
2413
|
+
const raw = props[aoye.Keys.Raw] || props;
|
|
2414
|
+
const keys = Object.keys(raw);
|
|
2415
|
+
const newKeys = new Set();
|
|
2416
|
+
for (let i = 0; i < keys.length; i++) {
|
|
2417
|
+
const k = keys[i];
|
|
2418
|
+
newKeys.add(k);
|
|
2419
|
+
prevKeys.delete(k);
|
|
2420
|
+
if (isComponent) {
|
|
2421
|
+
const savedK = savedDefaults.has(k);
|
|
2422
|
+
if (!savedK && Object.prototype.hasOwnProperty.call(rawTarget, k)) {
|
|
2423
|
+
savedDefaults.set(k, rawTarget[k]);
|
|
2424
|
+
}
|
|
2425
|
+
const val = props[k];
|
|
2426
|
+
_node.data[k] = val === undefined && savedK ? savedDefaults.get(k) : val;
|
|
2427
|
+
} else {
|
|
2428
|
+
this.onePropParsed(props, _node, k, k, true, false, hookI);
|
|
2429
|
+
}
|
|
2430
|
+
}
|
|
2431
|
+
cleanupKeys(prevKeys);
|
|
2432
|
+
prevKeys = newKeys;
|
|
2433
|
+
}, aoye.ScheduleType.Render);
|
|
2434
|
+
} else if (key === 'ref') {
|
|
2391
2435
|
const valueIsMapKey = Reflect.has(data[aoye.Keys.Raw], value);
|
|
2392
2436
|
let refValue = _node;
|
|
2393
2437
|
if (_node.__logicType & TokenizerSwitcherBit) {
|