@lynx-js/react-canary 0.112.4-canary-20250821-1cf567f3 → 0.112.4-canary-20250822-56e62b43
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/CHANGELOG.md +1 -1
- package/package.json +1 -1
- package/refresh/.turbo/turbo-build.log +2 -2
- package/refresh/dist/index.js +16 -4
- package/refresh/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/react-canary",
|
|
3
|
-
"version": "0.112.4-canary-
|
|
3
|
+
"version": "0.112.4-canary-20250822-56e62b43",
|
|
4
4
|
"description": "ReactLynx is a framework for developing Lynx applications with familiar React.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
package/refresh/dist/index.js
CHANGED
|
@@ -7,13 +7,25 @@ const EFFECTS_LIST = '__h';
|
|
|
7
7
|
const RERENDER_COUNT = '__r';
|
|
8
8
|
const CATCH_ERROR_OPTION = '__e';
|
|
9
9
|
const COMPONENT_DIRTY = '__d';
|
|
10
|
+
const COMPONENT_BITS = '__g';
|
|
10
11
|
const HOOK_VALUE = '__';
|
|
11
12
|
const HOOK_ARGS = '__H';
|
|
12
13
|
const HOOK_CLEANUP = '__c';
|
|
14
|
+
const COMPONENT_DIRTY_BIT = 8;
|
|
15
|
+
const isDirty = (vnode)=>{
|
|
16
|
+
if (vnode[VNODE_COMPONENT] && vnode[VNODE_COMPONENT][COMPONENT_DIRTY]) return true;
|
|
17
|
+
if (vnode[VNODE_COMPONENT] && vnode[VNODE_COMPONENT][COMPONENT_BITS] & COMPONENT_DIRTY_BIT) return true;
|
|
18
|
+
};
|
|
19
|
+
const unsetDirty = (vnode)=>{
|
|
20
|
+
if (vnode[VNODE_COMPONENT]) {
|
|
21
|
+
if (vnode[VNODE_COMPONENT][COMPONENT_DIRTY]) vnode[VNODE_COMPONENT][COMPONENT_DIRTY] = false;
|
|
22
|
+
if (vnode[VNODE_COMPONENT][COMPONENT_BITS]) vnode[VNODE_COMPONENT][COMPONENT_BITS] &= ~COMPONENT_DIRTY_BIT;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
13
25
|
const oldCatchError = options[CATCH_ERROR_OPTION];
|
|
14
|
-
options[CATCH_ERROR_OPTION] = (error, vnode, oldVNode)=>{
|
|
15
|
-
if (vnode
|
|
16
|
-
if (oldCatchError) oldCatchError(error, vnode, oldVNode);
|
|
26
|
+
options[CATCH_ERROR_OPTION] = (error, vnode, oldVNode, info)=>{
|
|
27
|
+
if (isDirty(vnode)) unsetDirty(vnode);
|
|
28
|
+
if (oldCatchError) oldCatchError(error, vnode, oldVNode, info);
|
|
17
29
|
};
|
|
18
30
|
const defer = 'function' == typeof Promise ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout;
|
|
19
31
|
options.debounceRendering = (process)=>{
|
|
@@ -137,7 +149,7 @@ function replaceComponent(OldType, NewType, resetHookState) {
|
|
|
137
149
|
pendingUpdates = pendingUpdates.filter((p)=>p[0] !== OldType);
|
|
138
150
|
vnodes.forEach((node)=>{
|
|
139
151
|
let vnode = node;
|
|
140
|
-
if (!vnode.__c) {
|
|
152
|
+
if (vnode && vnode.__v && !vnode.__c) {
|
|
141
153
|
vnode = lastSeen.get(vnode.__v, vnode);
|
|
142
154
|
lastSeen["delete"](vnode.__v);
|
|
143
155
|
}
|