@lynx-js/web-worker-runtime 0.13.0 → 0.13.1

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,28 @@
1
1
  # @lynx-js/web-worker-runtime
2
2
 
3
+ ## 0.13.1
4
+
5
+ ### Patch Changes
6
+
7
+ - feat: support for using `lynx.queueMicrotask`. ([#702](https://github.com/lynx-family/lynx-stack/pull/702))
8
+
9
+ - feat: support touch events for MTS ([#641](https://github.com/lynx-family/lynx-stack/pull/641))
10
+
11
+ now we support
12
+
13
+ - main-thread:bindtouchstart
14
+ - main-thread:bindtouchend
15
+ - main-thread:bindtouchmove
16
+ - main-thread:bindtouchcancel
17
+
18
+ - feat: provide comments for `@lynx-js/web-platform-rsbuild-plugin`. ([#668](https://github.com/lynx-family/lynx-stack/pull/668))
19
+
20
+ - Updated dependencies [[`c9ccad6`](https://github.com/lynx-family/lynx-stack/commit/c9ccad6b574c98121149d3e9d4a9a7e97af63d91), [`9ad394e`](https://github.com/lynx-family/lynx-stack/commit/9ad394ea9ef28688a3b810b4051868b2a28eb7de), [`c9ccad6`](https://github.com/lynx-family/lynx-stack/commit/c9ccad6b574c98121149d3e9d4a9a7e97af63d91)]:
21
+ - @lynx-js/offscreen-document@0.0.2
22
+ - @lynx-js/web-mainthread-apis@0.13.1
23
+ - @lynx-js/web-constants@0.13.1
24
+ - @lynx-js/web-worker-rpc@0.13.1
25
+
3
26
  ## 0.13.0
4
27
 
5
28
  ### Patch Changes
@@ -11,4 +11,5 @@ export declare function createBackgroundLynx(config: CreateLynxConfig, nativeApp
11
11
  getCoreContext(): LynxCrossThreadContext;
12
12
  getCustomSectionSync(key: string): Cloneable;
13
13
  getCustomSection: (key: string, callback: (object: Cloneable) => void) => void;
14
+ queueMicrotask: (callback: () => void) => void;
14
15
  };
@@ -23,6 +23,9 @@ export function createBackgroundLynx(config, nativeApp, mainThreadRpc) {
23
23
  return config.customSections[key];
24
24
  },
25
25
  getCustomSection: createGetCustomSection(mainThreadRpc, config.customSections),
26
+ queueMicrotask: (callback) => {
27
+ queueMicrotask(callback);
28
+ },
26
29
  };
27
30
  }
28
31
  //# sourceMappingURL=createBackgroundLynx.js.map
@@ -24,7 +24,7 @@ export async function createNativeApp(config) {
24
24
  lynxCoreInject.tt.lynxCoreInject = lynxCoreInject;
25
25
  lynxCoreInject.tt.globalThis ??= lynxCoreInject;
26
26
  Object.assign(lynxCoreInject.tt, {
27
- SystemInfo: { ...systemInfo, pixelRatio: browserConfig.pixelRatio },
27
+ SystemInfo: { ...systemInfo, ...browserConfig },
28
28
  });
29
29
  const ret = entry?.(lynxCoreInject.tt);
30
30
  return ret;
@@ -1,6 +1,7 @@
1
1
  // Copyright 2023 The Lynx Authors. All rights reserved.
2
2
  // Licensed under the Apache License Version 2.0 that can be found in the
3
3
  // LICENSE file in the root directory of this source tree.
4
+ /* LYNX_NATIVE_MODULES_IMPORT */
4
5
  import { nativeModulesCallEndpoint, switchExposureServiceEndpoint, } from '@lynx-js/web-constants';
5
6
  export async function createNativeModules(uiThreadRpc, mainThreadRpc, nativeModulesMap) {
6
7
  const switchExposure = mainThreadRpc.createCall(switchExposureServiceEndpoint);
@@ -21,6 +22,7 @@ export async function createNativeModules(uiThreadRpc, mainThreadRpc, nativeModu
21
22
  const nativeModules = {};
22
23
  const customNativeModules = {};
23
24
  await Promise.all(Object.entries(nativeModulesMap).map(([moduleName, moduleStr]) => import(/* webpackIgnore: true */ moduleStr).then(module => customNativeModules[moduleName] = module?.default?.(nativeModules, (name, data) => nativeModulesCall(name, data, moduleName)))));
25
+ /* LYNX_NATIVE_MODULES_ADD */
24
26
  return Object.assign(nativeModules, {
25
27
  bridge: bridgeModule,
26
28
  LynxExposureModule: lynxExposureModule,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/web-worker-runtime",
3
- "version": "0.13.0",
3
+ "version": "0.13.1",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [],
@@ -22,10 +22,10 @@
22
22
  "README.md"
23
23
  ],
24
24
  "dependencies": {
25
- "@lynx-js/offscreen-document": "0.0.1",
26
- "@lynx-js/web-constants": "0.13.0",
27
- "@lynx-js/web-mainthread-apis": "0.13.0",
28
- "@lynx-js/web-worker-rpc": "0.13.0"
25
+ "@lynx-js/offscreen-document": "0.0.2",
26
+ "@lynx-js/web-constants": "0.13.1",
27
+ "@lynx-js/web-mainthread-apis": "0.13.1",
28
+ "@lynx-js/web-worker-rpc": "0.13.1"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@lynx-js/lynx-core": "0.1.2"