@rn-bridge-tools/expo 0.0.8 → 0.0.9
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/dist/WebViewBridge.d.ts +2 -2
- package/dist/WebViewBridge.d.ts.map +1 -1
- package/dist/index.d.ts +21 -21
- package/dist/index.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/WebViewBridge.tsx +1 -1
- package/src/createHandlers.ts +17 -17
- package/src/index.ts +21 -21
package/dist/WebViewBridge.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { WebViewProps } from 'react-native-webview';
|
|
3
3
|
import type { BridgeToolsAction, BridgeToolsEvents, BridgeToolsEvent } from '@rn-bridge-tools/core';
|
|
4
|
-
import type { HandlerFn, HandlerMap } from './createHandlers
|
|
4
|
+
import type { HandlerFn, HandlerMap } from './createHandlers';
|
|
5
5
|
export interface WebViewBridgeProps extends Omit<WebViewProps, 'ref'> {
|
|
6
6
|
handlers: HandlerMap;
|
|
7
7
|
customHandlers?: Partial<Record<BridgeToolsAction, HandlerFn>>;
|
|
@@ -13,7 +13,7 @@ export declare function createBridgeWebView(handlers: HandlerMap, customHandlers
|
|
|
13
13
|
postMessage: <EventName extends string | number | symbol, Args extends EventName extends string | number | symbol ? import("@webview-bridge/react-native").ParserSchema<any>[EventName]["validate"] extends (data: unknown) => unknown ? ReturnType<import("@webview-bridge/react-native").ParserSchema<any>[EventName]["validate"]> : import("@webview-bridge/react-native").Primitive | Record<string, import("@webview-bridge/react-native").Primitive> : never>(eventName: EventName, args: Args, options?: {
|
|
14
14
|
broadcast: boolean;
|
|
15
15
|
}) => void;
|
|
16
|
-
WebView: React.ForwardRefExoticComponent<import("react-native-webview/lib/WebViewTypes
|
|
16
|
+
WebView: React.ForwardRefExoticComponent<import("react-native-webview/lib/WebViewTypes").IOSWebViewProps & import("react-native-webview/lib/WebViewTypes").AndroidWebViewProps & import("react-native-webview/lib/WebViewTypes").WindowsWebViewProps & React.RefAttributes<import("@webview-bridge/react-native").BridgeWebView>>;
|
|
17
17
|
linkWebMethod<T>(): {
|
|
18
18
|
current: import("@webview-bridge/react-native").WebMethod<T>;
|
|
19
19
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebViewBridge.d.ts","sourceRoot":"","sources":["../src/WebViewBridge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEpG,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"WebViewBridge.d.ts","sourceRoot":"","sources":["../src/WebViewBridge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEpG,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9D,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,YAAY,EAAE,KAAK,CAAC;IACnE,QAAQ,EAAE,UAAU,CAAC;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,iBAAiB,EAAE,SAAS,CAAC,CAAC,CAAC;CAChE;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,CAAC,CAAC,SAAS,gBAAgB,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,iBAAiB,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;CAClF;AAED,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,UAAU,EACpB,cAAc,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,iBAAiB,EAAE,SAAS,CAAC,CAAC;;;;;;;;EAgB/D;AAED,eAAO,MAAM,aAAa,6FAqBzB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
export { WebViewBridge, createBridgeWebView } from './WebViewBridge
|
|
2
|
-
export type { WebViewBridgeProps, WebViewBridgeRef } from './WebViewBridge
|
|
3
|
-
export { createDefaultHandlers } from './createHandlers
|
|
4
|
-
export type { HandlerFn, HandlerMap } from './createHandlers
|
|
5
|
-
export { cameraHandlers } from './handlers/camera
|
|
6
|
-
export { locationHandlers } from './handlers/location
|
|
7
|
-
export { fileHandlers } from './handlers/file
|
|
8
|
-
export { shareHandlers } from './handlers/share
|
|
9
|
-
export { deviceHandlers } from './handlers/device
|
|
10
|
-
export { statusbarHandlers } from './handlers/statusbar
|
|
11
|
-
export { keyboardHandlers } from './handlers/keyboard
|
|
12
|
-
export { hapticHandlers } from './handlers/haptic
|
|
13
|
-
export { clipboardHandlers } from './handlers/clipboard
|
|
14
|
-
export { scannerHandlers } from './handlers/scanner
|
|
15
|
-
export { authHandlers } from './handlers/auth
|
|
16
|
-
export { iapHandlers } from './handlers/iap
|
|
17
|
-
export { pushHandlers } from './handlers/push
|
|
18
|
-
export { permissionHandlers } from './handlers/permission
|
|
19
|
-
export { preferenceHandlers } from './handlers/preference
|
|
20
|
-
export { navigationHandlers } from './handlers/navigation
|
|
21
|
-
export { browserHandlers } from './handlers/browser
|
|
1
|
+
export { WebViewBridge, createBridgeWebView } from './WebViewBridge';
|
|
2
|
+
export type { WebViewBridgeProps, WebViewBridgeRef } from './WebViewBridge';
|
|
3
|
+
export { createDefaultHandlers } from './createHandlers';
|
|
4
|
+
export type { HandlerFn, HandlerMap } from './createHandlers';
|
|
5
|
+
export { cameraHandlers } from './handlers/camera';
|
|
6
|
+
export { locationHandlers } from './handlers/location';
|
|
7
|
+
export { fileHandlers } from './handlers/file';
|
|
8
|
+
export { shareHandlers } from './handlers/share';
|
|
9
|
+
export { deviceHandlers } from './handlers/device';
|
|
10
|
+
export { statusbarHandlers } from './handlers/statusbar';
|
|
11
|
+
export { keyboardHandlers } from './handlers/keyboard';
|
|
12
|
+
export { hapticHandlers } from './handlers/haptic';
|
|
13
|
+
export { clipboardHandlers } from './handlers/clipboard';
|
|
14
|
+
export { scannerHandlers } from './handlers/scanner';
|
|
15
|
+
export { authHandlers } from './handlers/auth';
|
|
16
|
+
export { iapHandlers } from './handlers/iap';
|
|
17
|
+
export { pushHandlers } from './handlers/push';
|
|
18
|
+
export { permissionHandlers } from './handlers/permission';
|
|
19
|
+
export { preferenceHandlers } from './handlers/preference';
|
|
20
|
+
export { navigationHandlers } from './handlers/navigation';
|
|
21
|
+
export { browserHandlers } from './handlers/browser';
|
|
22
22
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACrE,YAAY,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACzD,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAG9D,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rn-bridge-tools/expo",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"description": "Expo/React Native WebView bridge component and handlers for bridge-tools",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"dist"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@rn-bridge-tools/core": "0.0.
|
|
18
|
+
"@rn-bridge-tools/core": "0.0.9"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"@react-native-async-storage/async-storage": "*",
|
package/src/WebViewBridge.tsx
CHANGED
|
@@ -3,7 +3,7 @@ import { bridge, createWebView } from '@webview-bridge/react-native';
|
|
|
3
3
|
import type { WebViewProps } from 'react-native-webview';
|
|
4
4
|
import type { BridgeToolsAction, BridgeToolsEvents, BridgeToolsEvent } from '@rn-bridge-tools/core';
|
|
5
5
|
|
|
6
|
-
import type { HandlerFn, HandlerMap } from './createHandlers
|
|
6
|
+
import type { HandlerFn, HandlerMap } from './createHandlers';
|
|
7
7
|
|
|
8
8
|
export interface WebViewBridgeProps extends Omit<WebViewProps, 'ref'> {
|
|
9
9
|
handlers: HandlerMap;
|
package/src/createHandlers.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import type { HandlerOptions } from '@rn-bridge-tools/core';
|
|
2
|
-
import { cameraHandlers } from './handlers/camera
|
|
3
|
-
import { locationHandlers } from './handlers/location
|
|
4
|
-
import { fileHandlers } from './handlers/file
|
|
5
|
-
import { shareHandlers } from './handlers/share
|
|
6
|
-
import { deviceHandlers } from './handlers/device
|
|
7
|
-
import { statusbarHandlers } from './handlers/statusbar
|
|
8
|
-
import { keyboardHandlers } from './handlers/keyboard
|
|
9
|
-
import { hapticHandlers } from './handlers/haptic
|
|
10
|
-
import { clipboardHandlers } from './handlers/clipboard
|
|
11
|
-
import { scannerHandlers } from './handlers/scanner
|
|
12
|
-
import { authHandlers } from './handlers/auth
|
|
13
|
-
import { iapHandlers } from './handlers/iap
|
|
14
|
-
import { pushHandlers } from './handlers/push
|
|
15
|
-
import { permissionHandlers } from './handlers/permission
|
|
16
|
-
import { preferenceHandlers } from './handlers/preference
|
|
17
|
-
import { navigationHandlers } from './handlers/navigation
|
|
18
|
-
import { browserHandlers } from './handlers/browser
|
|
2
|
+
import { cameraHandlers } from './handlers/camera';
|
|
3
|
+
import { locationHandlers } from './handlers/location';
|
|
4
|
+
import { fileHandlers } from './handlers/file';
|
|
5
|
+
import { shareHandlers } from './handlers/share';
|
|
6
|
+
import { deviceHandlers } from './handlers/device';
|
|
7
|
+
import { statusbarHandlers } from './handlers/statusbar';
|
|
8
|
+
import { keyboardHandlers } from './handlers/keyboard';
|
|
9
|
+
import { hapticHandlers } from './handlers/haptic';
|
|
10
|
+
import { clipboardHandlers } from './handlers/clipboard';
|
|
11
|
+
import { scannerHandlers } from './handlers/scanner';
|
|
12
|
+
import { authHandlers } from './handlers/auth';
|
|
13
|
+
import { iapHandlers } from './handlers/iap';
|
|
14
|
+
import { pushHandlers } from './handlers/push';
|
|
15
|
+
import { permissionHandlers } from './handlers/permission';
|
|
16
|
+
import { preferenceHandlers } from './handlers/preference';
|
|
17
|
+
import { navigationHandlers } from './handlers/navigation';
|
|
18
|
+
import { browserHandlers } from './handlers/browser';
|
|
19
19
|
|
|
20
20
|
export type HandlerFn = (payload: never) => Promise<unknown> | unknown;
|
|
21
21
|
export type HandlerMap = Record<string, HandlerFn>;
|
package/src/index.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
export { WebViewBridge, createBridgeWebView } from './WebViewBridge
|
|
2
|
-
export type { WebViewBridgeProps, WebViewBridgeRef } from './WebViewBridge
|
|
3
|
-
export { createDefaultHandlers } from './createHandlers
|
|
4
|
-
export type { HandlerFn, HandlerMap } from './createHandlers
|
|
1
|
+
export { WebViewBridge, createBridgeWebView } from './WebViewBridge';
|
|
2
|
+
export type { WebViewBridgeProps, WebViewBridgeRef } from './WebViewBridge';
|
|
3
|
+
export { createDefaultHandlers } from './createHandlers';
|
|
4
|
+
export type { HandlerFn, HandlerMap } from './createHandlers';
|
|
5
5
|
|
|
6
6
|
// Re-export handler maps for advanced usage
|
|
7
|
-
export { cameraHandlers } from './handlers/camera
|
|
8
|
-
export { locationHandlers } from './handlers/location
|
|
9
|
-
export { fileHandlers } from './handlers/file
|
|
10
|
-
export { shareHandlers } from './handlers/share
|
|
11
|
-
export { deviceHandlers } from './handlers/device
|
|
12
|
-
export { statusbarHandlers } from './handlers/statusbar
|
|
13
|
-
export { keyboardHandlers } from './handlers/keyboard
|
|
14
|
-
export { hapticHandlers } from './handlers/haptic
|
|
15
|
-
export { clipboardHandlers } from './handlers/clipboard
|
|
16
|
-
export { scannerHandlers } from './handlers/scanner
|
|
17
|
-
export { authHandlers } from './handlers/auth
|
|
18
|
-
export { iapHandlers } from './handlers/iap
|
|
19
|
-
export { pushHandlers } from './handlers/push
|
|
20
|
-
export { permissionHandlers } from './handlers/permission
|
|
21
|
-
export { preferenceHandlers } from './handlers/preference
|
|
22
|
-
export { navigationHandlers } from './handlers/navigation
|
|
23
|
-
export { browserHandlers } from './handlers/browser
|
|
7
|
+
export { cameraHandlers } from './handlers/camera';
|
|
8
|
+
export { locationHandlers } from './handlers/location';
|
|
9
|
+
export { fileHandlers } from './handlers/file';
|
|
10
|
+
export { shareHandlers } from './handlers/share';
|
|
11
|
+
export { deviceHandlers } from './handlers/device';
|
|
12
|
+
export { statusbarHandlers } from './handlers/statusbar';
|
|
13
|
+
export { keyboardHandlers } from './handlers/keyboard';
|
|
14
|
+
export { hapticHandlers } from './handlers/haptic';
|
|
15
|
+
export { clipboardHandlers } from './handlers/clipboard';
|
|
16
|
+
export { scannerHandlers } from './handlers/scanner';
|
|
17
|
+
export { authHandlers } from './handlers/auth';
|
|
18
|
+
export { iapHandlers } from './handlers/iap';
|
|
19
|
+
export { pushHandlers } from './handlers/push';
|
|
20
|
+
export { permissionHandlers } from './handlers/permission';
|
|
21
|
+
export { preferenceHandlers } from './handlers/preference';
|
|
22
|
+
export { navigationHandlers } from './handlers/navigation';
|
|
23
|
+
export { browserHandlers } from './handlers/browser';
|