@lynx-js/web-core 0.15.5 → 0.15.7

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,5 +1,33 @@
1
1
  # @lynx-js/web-core
2
2
 
3
+ ## 0.15.7
4
+
5
+ ### Patch Changes
6
+
7
+ - fix: fake uidisappear event ([#1539](https://github.com/lynx-family/lynx-stack/pull/1539))
8
+
9
+ - Updated dependencies [[`70863fb`](https://github.com/lynx-family/lynx-stack/commit/70863fbc311d8885ebda40855668097b0631f521)]:
10
+ - @lynx-js/web-mainthread-apis@0.15.7
11
+ - @lynx-js/web-constants@0.15.7
12
+ - @lynx-js/web-worker-runtime@0.15.7
13
+ - @lynx-js/web-worker-rpc@0.15.7
14
+
15
+ ## 0.15.6
16
+
17
+ ### Patch Changes
18
+
19
+ - fix: systeminfo in mts function ([#1537](https://github.com/lynx-family/lynx-stack/pull/1537))
20
+
21
+ - refactor: use utf-8 string ([#1473](https://github.com/lynx-family/lynx-stack/pull/1473))
22
+
23
+ - Fix mtsGlobalThis race condition in createRenderAllOnUI ([#1506](https://github.com/lynx-family/lynx-stack/pull/1506))
24
+
25
+ - Updated dependencies [[`405a917`](https://github.com/lynx-family/lynx-stack/commit/405a9170442ae32603b7687549b49ab4b34aff92), [`b8f89e2`](https://github.com/lynx-family/lynx-stack/commit/b8f89e25f106a15ba9d70f2df06dfb684cbb6633), [`f76aae9`](https://github.com/lynx-family/lynx-stack/commit/f76aae9ea06abdc7022ba508d22f9f4eb00864e8), [`b8b060b`](https://github.com/lynx-family/lynx-stack/commit/b8b060b9bef722bb47bd90c33fab3922160c711d), [`d8381a5`](https://github.com/lynx-family/lynx-stack/commit/d8381a58d12af6424cab4955617251e798bdc9f1), [`214898b`](https://github.com/lynx-family/lynx-stack/commit/214898bb9c74fc9b44e68cb220a4c02485102ce2), [`ab8cee4`](https://github.com/lynx-family/lynx-stack/commit/ab8cee4bab384fa905c045c4b4b93e5d4a95d57f)]:
26
+ - @lynx-js/web-mainthread-apis@0.15.6
27
+ - @lynx-js/web-constants@0.15.6
28
+ - @lynx-js/web-worker-runtime@0.15.6
29
+ - @lynx-js/web-worker-rpc@0.15.6
30
+
3
31
  ## 0.15.5
4
32
 
5
33
  ### Patch Changes
@@ -22,6 +22,7 @@ export function createRenderAllOnUI(mainToBackgroundRpc, shadowRoot, markTimingI
22
22
  return i18nResources;
23
23
  });
24
24
  let mtsGlobalThis;
25
+ const pendingUpdateCalls = [];
25
26
  const start = async (configs) => {
26
27
  if (ssrDumpInfo) {
27
28
  const lynxUniqueIdToElement = [];
@@ -56,9 +57,20 @@ export function createRenderAllOnUI(mainToBackgroundRpc, shadowRoot, markTimingI
56
57
  else {
57
58
  mtsGlobalThis = await startMainThread(configs);
58
59
  }
60
+ // Process any pending update calls that were queued while mtsGlobalThis was undefined
61
+ for (const args of pendingUpdateCalls) {
62
+ mtsGlobalThis.updatePage?.(...args);
63
+ }
64
+ pendingUpdateCalls.length = 0;
59
65
  };
60
66
  const updateDataMainThread = async (...args) => {
61
- mtsGlobalThis.updatePage?.(...args);
67
+ if (mtsGlobalThis) {
68
+ mtsGlobalThis.updatePage?.(...args);
69
+ }
70
+ else {
71
+ // Cache the call if mtsGlobalThis is not yet initialized
72
+ pendingUpdateCalls.push(args);
73
+ }
62
74
  };
63
75
  const updateI18nResourcesMainThread = (data) => {
64
76
  i18nResources.setData(data);
@@ -38,7 +38,7 @@ export function createExposureMonitor(rootDom) {
38
38
  sendExposureEvent(target, true, target.getAttribute('exposure-id'));
39
39
  exposedElements.add(target);
40
40
  }
41
- else {
41
+ else if (!isIntersecting && exposedElements.has(target)) {
42
42
  sendExposureEvent(target, false, target.getAttribute('exposure-id'));
43
43
  exposedElements.delete(target);
44
44
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/web-core",
3
- "version": "0.15.5",
3
+ "version": "0.15.7",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [],
@@ -25,17 +25,17 @@
25
25
  ],
26
26
  "dependencies": {
27
27
  "@lynx-js/offscreen-document": "0.1.3",
28
- "@lynx-js/web-constants": "0.15.5",
29
- "@lynx-js/web-mainthread-apis": "0.15.5",
30
- "@lynx-js/web-worker-rpc": "0.15.5",
31
- "@lynx-js/web-worker-runtime": "0.15.5"
28
+ "@lynx-js/web-constants": "0.15.7",
29
+ "@lynx-js/web-mainthread-apis": "0.15.7",
30
+ "@lynx-js/web-worker-rpc": "0.15.7",
31
+ "@lynx-js/web-worker-runtime": "0.15.7"
32
32
  },
33
33
  "devDependencies": {
34
- "@lynx-js/lynx-core": "0.1.2",
34
+ "@lynx-js/lynx-core": "0.1.3",
35
35
  "@lynx-js/web-elements": "0.8.4"
36
36
  },
37
37
  "peerDependencies": {
38
- "@lynx-js/lynx-core": "0.1.2",
38
+ "@lynx-js/lynx-core": "0.1.3",
39
39
  "@lynx-js/web-elements": ">0.7.7"
40
40
  }
41
41
  }