@lynx-js/web-worker-runtime-canary 0.15.5-canary-20250807-ead12c97 → 0.15.5-canary-20250808-ed2ddcc3

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,13 +1,19 @@
1
1
  # @lynx-js/web-worker-runtime
2
2
 
3
- ## 0.15.5-canary-20250807131113-ead12c97f80c67fc146841ff75a450e866bf6f36
3
+ ## 0.15.5-canary-20250808031952-ed2ddcc34fc404ffebb895eb3c928a2fd8dd7959
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - Updated dependencies [[`29434ae`](https://github.com/lynx-family/lynx-stack/commit/29434aec853f14242f521316429cf07a93b8c371)]:
8
- - @lynx-js/web-mainthread-apis@0.15.5-canary-20250807131113-ead12c97f80c67fc146841ff75a450e866bf6f36
9
- - @lynx-js/web-constants@0.15.5-canary-20250807131113-ead12c97f80c67fc146841ff75a450e866bf6f36
10
- - @lynx-js/web-worker-rpc@0.15.5-canary-20250807131113-ead12c97f80c67fc146841ff75a450e866bf6f36
7
+ - feat: support path() for `createQuerySelector` ([#1456](https://github.com/lynx-family/lynx-stack/pull/1456))
8
+
9
+ - Added `getPathInfo` API to `NativeApp` and its cross-thread handler for retrieving the path from a DOM node to the root.
10
+ - Implemented endpoint and handler registration in both background and UI threads.
11
+ - Implemented `nativeApp.getPathInfo()`
12
+
13
+ - Updated dependencies [[`29434ae`](https://github.com/lynx-family/lynx-stack/commit/29434aec853f14242f521316429cf07a93b8c371), [`fb7096b`](https://github.com/lynx-family/lynx-stack/commit/fb7096bb3c79166cd619a407095b8206eccb7918)]:
14
+ - @lynx-js/web-mainthread-apis@0.15.5-canary-20250808031952-ed2ddcc34fc404ffebb895eb3c928a2fd8dd7959
15
+ - @lynx-js/web-constants@0.15.5-canary-20250808031952-ed2ddcc34fc404ffebb895eb3c928a2fd8dd7959
16
+ - @lynx-js/web-worker-rpc@0.15.5-canary-20250808031952-ed2ddcc34fc404ffebb895eb3c928a2fd8dd7959
11
17
 
12
18
  ## 0.15.4
13
19
 
@@ -10,6 +10,7 @@ import { registerSendGlobalEventHandler } from './crossThreadHandlers/registerSe
10
10
  import { createJSObjectDestructionObserver } from './crossThreadHandlers/createJSObjectDestructionObserver.js';
11
11
  import { registerUpdateGlobalPropsHandler } from './crossThreadHandlers/registerUpdateGlobalPropsHandler.js';
12
12
  import { registerUpdateI18nResource } from './crossThreadHandlers/registerUpdateI18nResource.js';
13
+ import { createGetPathInfo } from './crossThreadHandlers/createGetPathInfo.js';
13
14
  let nativeAppCount = 0;
14
15
  const sharedData = {};
15
16
  export async function createNativeApp(config) {
@@ -82,6 +83,7 @@ export async function createNativeApp(config) {
82
83
  },
83
84
  callLepusMethod,
84
85
  setNativeProps,
86
+ getPathInfo: createGetPathInfo(uiThreadRpc),
85
87
  invokeUIMethod: createInvokeUIMethod(uiThreadRpc),
86
88
  setCard(tt) {
87
89
  registerPublicComponentEventHandler(mainThreadRpc, tt);
@@ -0,0 +1,3 @@
1
+ import { type NativeApp } from '@lynx-js/web-constants';
2
+ import type { Rpc } from '@lynx-js/web-worker-rpc';
3
+ export declare function createGetPathInfo(rpc: Rpc): NativeApp['getPathInfo'];
@@ -0,0 +1,22 @@
1
+ // Copyright 2023 The Lynx Authors. All rights reserved.
2
+ // Licensed under the Apache License Version 2.0 that can be found in the
3
+ // LICENSE file in the root directory of this source tree.
4
+ import { ErrorCode, getPathInfoEndpoint, } from '@lynx-js/web-constants';
5
+ export function createGetPathInfo(rpc) {
6
+ return (type, identifier, component_id, first_only, callback, root_unique_id) => {
7
+ rpc.invoke(getPathInfoEndpoint, [
8
+ type,
9
+ identifier,
10
+ component_id,
11
+ first_only,
12
+ root_unique_id,
13
+ ]).then(callback).catch((error) => {
14
+ console.error(`[lynx-web] getPathInfo failed`, error);
15
+ callback({
16
+ code: ErrorCode.UNKNOWN,
17
+ data: error.message || '',
18
+ });
19
+ });
20
+ };
21
+ }
22
+ //# sourceMappingURL=createGetPathInfo.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/web-worker-runtime-canary",
3
- "version": "0.15.5-canary-20250807-ead12c97",
3
+ "version": "0.15.5-canary-20250808-ed2ddcc3",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [],
@@ -23,9 +23,9 @@
23
23
  ],
24
24
  "dependencies": {
25
25
  "@lynx-js/offscreen-document": "npm:@lynx-js/offscreen-document-canary@0.1.3",
26
- "@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.15.5-canary-20250807-ead12c97",
27
- "@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.15.5-canary-20250807-ead12c97",
28
- "@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.15.5-canary-20250807-ead12c97"
26
+ "@lynx-js/web-constants": "npm:@lynx-js/web-constants-canary@0.15.5-canary-20250808-ed2ddcc3",
27
+ "@lynx-js/web-mainthread-apis": "npm:@lynx-js/web-mainthread-apis-canary@0.15.5-canary-20250808-ed2ddcc3",
28
+ "@lynx-js/web-worker-rpc": "npm:@lynx-js/web-worker-rpc-canary@0.15.5-canary-20250808-ed2ddcc3"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@lynx-js/lynx-core": "0.1.2"