@lynx-js/react-canary 0.116.2-canary-20260129-d02a6062 → 0.116.2-canary-20260130-c68aecc6
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
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
# @lynx-js/react
|
|
2
2
|
|
|
3
|
-
## 0.116.2-canary-
|
|
3
|
+
## 0.116.2-canary-20260130095940-c68aecc649285fbc34bb2075aff69a9cc9c49821
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
7
|
- Fix "TypeError: not a function" error caused by `replaceAll` not supported in ES5. ([#2142](https://github.com/lynx-family/lynx-stack/pull/2142))
|
|
8
8
|
|
|
9
|
+
- Bump `swc_core` to `56.0.0`. ([#2154](https://github.com/lynx-family/lynx-stack/pull/2154))
|
|
10
|
+
|
|
11
|
+
- Fix memory leak by clearing list callbacks when \_\_DestroyLifetime event is triggered. ([#2112](https://github.com/lynx-family/lynx-stack/pull/2112))
|
|
12
|
+
|
|
9
13
|
- Bump `swc_core` v53. ([#2071](https://github.com/lynx-family/lynx-stack/pull/2071))
|
|
10
14
|
|
|
11
15
|
## 0.116.1
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/react-canary",
|
|
3
|
-
"version": "0.116.2-canary-
|
|
3
|
+
"version": "0.116.2-canary-20260130-c68aecc6",
|
|
4
4
|
"description": "ReactLynx is a framework for developing Lynx applications with familiar React.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -9,6 +9,11 @@ export function snapshotCreateList(pageId, _ctx, _expIndex) {
|
|
|
9
9
|
const [componentAtIndex, componentAtIndexes] = componentAtIndexFactory([], hydrate);
|
|
10
10
|
const list = __CreateList(pageId, componentAtIndex, enqueueComponentFactory(), {}, componentAtIndexes);
|
|
11
11
|
const listID = __GetElementUniqueID(list);
|
|
12
|
+
if (typeof lynx !== 'undefined' && typeof lynx.getNative === 'function') {
|
|
13
|
+
lynx.getNative()?.addEventListener('__DestroyLifetime', () => {
|
|
14
|
+
__UpdateListCallbacks(list, null, null, null);
|
|
15
|
+
});
|
|
16
|
+
}
|
|
12
17
|
gSignMap[listID] = signMap;
|
|
13
18
|
gRecycleMap[listID] = recycleMap;
|
|
14
19
|
return list;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../src/snapshot/list.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAE1D,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGrG,MAAM,UAAU,kBAAkB,CAChC,MAAc,EACd,IAAsB,EACtB,SAAiB;IAEjB,MAAM,OAAO,GAAG,IAAI,GAAG,EAA4B,CAAC;IACpD,MAAM,UAAU,GAAG,IAAI,GAAG,EAAyC,CAAC;IACpE,MAAM,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,GAAG,uBAAuB,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;IACpF,MAAM,IAAI,GAAG,YAAY,CACvB,MAAM,EACN,gBAAgB,EAChB,uBAAuB,EAAE,EACzB,EAAE,EACF,kBAAkB,CACnB,CAAC;IACF,MAAM,MAAM,GAAG,oBAAoB,CAAC,IAAI,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../src/snapshot/list.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,yEAAyE;AACzE,0DAA0D;AAE1D,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGrG,MAAM,UAAU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) {
|
|
|
423
423
|
target.__TESTING_FORCE_RENDER_TO_OPCODE__ = false;
|
|
424
424
|
target.__ENABLE_SSR__ = false;
|
|
425
425
|
target.globDynamicComponentEntry = '__Card__';
|
|
426
|
+
const native = {
|
|
427
|
+
_listeners: {},
|
|
428
|
+
onTriggerEvent: void 0,
|
|
429
|
+
postMessage: (_message)=>{},
|
|
430
|
+
addEventListener: (type, listener)=>{
|
|
431
|
+
if (!native._listeners[type]) native._listeners[type] = [];
|
|
432
|
+
native._listeners[type].push(listener);
|
|
433
|
+
},
|
|
434
|
+
removeEventListener: (type, listener)=>{
|
|
435
|
+
if (native._listeners[type]) native._listeners[type] = native._listeners[type].filter((l)=>l !== listener);
|
|
436
|
+
},
|
|
437
|
+
dispatchEvent: (event)=>{
|
|
438
|
+
const listeners = native._listeners[event.type];
|
|
439
|
+
if (listeners) listeners.forEach((listener)=>listener(event));
|
|
440
|
+
return {
|
|
441
|
+
canceled: false
|
|
442
|
+
};
|
|
443
|
+
}
|
|
444
|
+
};
|
|
426
445
|
target.lynx = {
|
|
427
446
|
performance,
|
|
447
|
+
getNative: ()=>native,
|
|
428
448
|
getCoreContext: ()=>CoreContext,
|
|
429
449
|
getJSContext: ()=>JsContext,
|
|
430
450
|
reportError: (e)=>{
|