@lynx-js/web-constants 0.10.0 → 0.10.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,16 @@
1
1
  # @lynx-js/web-constants
2
2
 
3
+ ## 0.10.1
4
+
5
+ ### Patch Changes
6
+
7
+ - feat: onNapiModulesCall function add new param: `dispatchNapiModules`, napiModulesMap val add new param: `handleDispatch`. ([#414](https://github.com/lynx-family/lynx-stack/pull/414))
8
+
9
+ Now you can use them to actively communicate to napiModules (background thread) in onNapiModulesCall (ui thread).
10
+
11
+ - Updated dependencies []:
12
+ - @lynx-js/web-worker-rpc@0.10.1
13
+
3
14
  ## 0.10.0
4
15
 
5
16
  ### Minor Changes
@@ -55,3 +55,4 @@ export declare const triggerComponentEventEndpoint: import("@lynx-js/web-worker-
55
55
  }]>;
56
56
  export declare const selectComponentEndpoint: import("@lynx-js/web-worker-rpc/dist/RpcEndpoint.js").RpcEndpointAsync<[componentId: string, idSelector: string, single: boolean], void>;
57
57
  export declare const dispatchLynxViewEventEndpoint: import("@lynx-js/web-worker-rpc/dist/RpcEndpoint.js").RpcEndpointAsync<[eventType: string, detail: CloneableObject], void>;
58
+ export declare const dispatchNapiModuleEndpoint: import("@lynx-js/web-worker-rpc/dist/RpcEndpoint.js").RpcEndpointAsyncVoid<[data: Cloneable]>;
package/dist/endpoints.js CHANGED
@@ -31,4 +31,5 @@ export const postTimingFlagsEndpoint = createRpcEndpoint('postTimingFlags', fals
31
31
  export const triggerComponentEventEndpoint = createRpcEndpoint('__triggerComponentEvent', false, false);
32
32
  export const selectComponentEndpoint = createRpcEndpoint('__selectComponent', false, true);
33
33
  export const dispatchLynxViewEventEndpoint = createRpcEndpoint('dispatchLynxViewEvent', false, true);
34
+ export const dispatchNapiModuleEndpoint = createRpcEndpoint('dispatchNapiModule', false, false);
34
35
  //# sourceMappingURL=endpoints.js.map
@@ -1,5 +1,6 @@
1
+ import type { Cloneable } from './Cloneable.js';
1
2
  export type NapiModulesMap = Record<string, string>;
2
- export type NapiModulesCall = (name: string, data: any, moduleName: string) => Promise<{
3
+ export type NapiModulesCall = (name: string, data: any, moduleName: string, dispatchNapiModules: (data: Cloneable) => void) => Promise<{
3
4
  data: unknown;
4
5
  transfer?: unknown[];
5
6
  }> | {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/web-constants",
3
- "version": "0.10.0",
3
+ "version": "0.10.1",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [],
@@ -23,7 +23,7 @@
23
23
  "**/*.css"
24
24
  ],
25
25
  "dependencies": {
26
- "@lynx-js/web-worker-rpc": "0.10.0"
26
+ "@lynx-js/web-worker-rpc": "0.10.1"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@lynx-js/offscreen-document": "0.0.0"