@lynx-js/web-mainthread-apis-canary 0.19.6-canary-20260122-5b589ab5 → 0.19.6-canary-20260122-f7133c13

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,17 +1,21 @@
1
1
  # @lynx-js/web-mainthread-apis
2
2
 
3
- ## 0.19.6-canary-20260122112014-5b589ab53b01a8e2357d3ccbb159edab004086d3
3
+ ## 0.19.6-canary-20260122140843-f7133c137f094063e991dfa0e993ea92177aa173
4
4
 
5
5
  ### Patch Changes
6
6
 
7
7
  - feat: add main-thread API: \_\_QuerySelector ([#2115](https://github.com/lynx-family/lynx-stack/pull/2115))
8
8
 
9
+ - fix: when a list-item is deleted from list, the deleted list-item is still showed incorrectly. ([#1092](https://github.com/lynx-family/lynx-stack/pull/1092))
10
+
11
+ This is because the `enqueueComponent` method does not delete the node from the Element Tree. It is only to maintain the display node on RL, and lynx web needs to delete the dom additionally.
12
+
9
13
  - feat: support main thread invoke ui method ([#2104](https://github.com/lynx-family/lynx-stack/pull/2104))
10
14
 
11
15
  - fix: mts && bts events can be binded both ([#2121](https://github.com/lynx-family/lynx-stack/pull/2121))
12
16
 
13
- - Updated dependencies [[`179f984`](https://github.com/lynx-family/lynx-stack/commit/179f9844adf00ff4b2cd450ffb943649441c87d3), [`6c2b51a`](https://github.com/lynx-family/lynx-stack/commit/6c2b51a661ae244eb40671f63f29ee971e084ed4), [`5b589ab`](https://github.com/lynx-family/lynx-stack/commit/5b589ab53b01a8e2357d3ccbb159edab004086d3)]:
14
- - @lynx-js/web-constants@0.19.6-canary-20260122112014-5b589ab53b01a8e2357d3ccbb159edab004086d3
17
+ - Updated dependencies [[`179f984`](https://github.com/lynx-family/lynx-stack/commit/179f9844adf00ff4b2cd450ffb943649441c87d3), [`f7133c1`](https://github.com/lynx-family/lynx-stack/commit/f7133c137f094063e991dfa0e993ea92177aa173), [`6c2b51a`](https://github.com/lynx-family/lynx-stack/commit/6c2b51a661ae244eb40671f63f29ee971e084ed4), [`5b589ab`](https://github.com/lynx-family/lynx-stack/commit/5b589ab53b01a8e2357d3ccbb159edab004086d3)]:
18
+ - @lynx-js/web-constants@0.19.6-canary-20260122140843-f7133c137f094063e991dfa0e993ea92177aa173
15
19
 
16
20
  ## 0.19.5
17
21
 
@@ -311,11 +311,26 @@ export function createMainThreadGlobalThis(config) {
311
311
  const componentAtIndex = runtimeInfo.componentAtIndex;
312
312
  const enqueueComponent = runtimeInfo.enqueueComponent;
313
313
  const uniqueId = __GetElementUniqueID(element);
314
+ removeAction.forEach((position, i) => {
315
+ // remove list-item
316
+ const removedEle = element.children[position - i];
317
+ if (removedEle) {
318
+ const sign = __GetElementUniqueID(removedEle);
319
+ enqueueComponent?.(element, uniqueId, sign);
320
+ element.removeChild(removedEle);
321
+ }
322
+ });
314
323
  for (const action of insertAction) {
315
- componentAtIndex?.(element, uniqueId, action.position, 0, false);
316
- }
317
- for (const action of removeAction) {
318
- enqueueComponent?.(element, uniqueId, action.position);
324
+ const childSign = componentAtIndex?.(element, uniqueId, action.position, 0, false);
325
+ if (typeof childSign === 'number') {
326
+ const childElement = lynxUniqueIdToElement[childSign]?.deref();
327
+ if (childElement) {
328
+ const referenceNode = element.children[action.position];
329
+ if (referenceNode !== childElement) {
330
+ element.insertBefore(childElement, referenceNode || null);
331
+ }
332
+ }
333
+ }
319
334
  }
320
335
  }
321
336
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/web-mainthread-apis-canary",
3
- "version": "0.19.6-canary-20260122-5b589ab5",
3
+ "version": "0.19.6-canary-20260122-f7133c13",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [],
@@ -26,7 +26,7 @@
26
26
  "**/*.css"
27
27
  ],
28
28
  "dependencies": {
29
- "@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.19.6-canary-20260122-5b589ab5",
29
+ "@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.19.6-canary-20260122-f7133c13",
30
30
  "hyphenate-style-name": "^1.1.0",
31
31
  "wasm-feature-detect": "^1.8.0"
32
32
  },