@dynamic-labs/react-native-extension 2.1.0-alpha.17 → 2.1.0-alpha.18
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/index.js +15 -11
- package/package.json +4 -4
- package/src/lib/ReactNativeExtension.d.ts +5 -1
package/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { Logger } from '@dynamic-labs/logger';
|
|
|
5
5
|
import { StyleSheet } from 'react-native';
|
|
6
6
|
import { jsx } from 'react/jsx-runtime';
|
|
7
7
|
|
|
8
|
-
var version$1 = "2.1.0-alpha.
|
|
8
|
+
var version$1 = "2.1.0-alpha.18";
|
|
9
9
|
|
|
10
10
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
11
11
|
|
|
@@ -1738,15 +1738,19 @@ const createWebView = props => {
|
|
|
1738
1738
|
const defaultWebviewUrl = `https://webview.dynamicauth.com/${version$1}`;
|
|
1739
1739
|
const ReactNativeExtension = ({
|
|
1740
1740
|
webviewUrl: _webviewUrl = defaultWebviewUrl,
|
|
1741
|
-
webviewDebuggingEnabled
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1741
|
+
webviewDebuggingEnabled,
|
|
1742
|
+
appOrigin
|
|
1743
|
+
} = {}) => (_, core) => {
|
|
1744
|
+
if (appOrigin) core.manifest.setAppOrigin(appOrigin);
|
|
1745
|
+
return {
|
|
1746
|
+
reactNative: {
|
|
1747
|
+
WebView: createWebView({
|
|
1748
|
+
core,
|
|
1749
|
+
webviewDebuggingEnabled,
|
|
1750
|
+
webviewUrl: _webviewUrl
|
|
1751
|
+
})
|
|
1752
|
+
}
|
|
1753
|
+
};
|
|
1754
|
+
};
|
|
1751
1755
|
|
|
1752
1756
|
export { ReactNativeExtension };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/react-native-extension",
|
|
3
|
-
"version": "2.1.0-alpha.
|
|
3
|
+
"version": "2.1.0-alpha.18",
|
|
4
4
|
"main": "./index.js",
|
|
5
5
|
"module": "./index.js",
|
|
6
6
|
"types": "./src/index.d.ts",
|
|
@@ -14,13 +14,13 @@
|
|
|
14
14
|
"./package.json": "./package.json"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@dynamic-labs/message-transport": "2.1.0-alpha.
|
|
18
|
-
"@dynamic-labs/logger": "2.1.0-alpha.
|
|
17
|
+
"@dynamic-labs/message-transport": "2.1.0-alpha.18",
|
|
18
|
+
"@dynamic-labs/logger": "2.1.0-alpha.18"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"react": "^18.2.0",
|
|
22
22
|
"react-native": "^0.73.6",
|
|
23
23
|
"react-native-webview": "^13.6.4",
|
|
24
|
-
"@dynamic-labs/client": "2.1.0-alpha.
|
|
24
|
+
"@dynamic-labs/client": "2.1.0-alpha.18"
|
|
25
25
|
}
|
|
26
26
|
}
|
|
@@ -9,11 +9,15 @@ type ReactNativeExtensionProps = {
|
|
|
9
9
|
* Enable debugging in the WebView.
|
|
10
10
|
*/
|
|
11
11
|
webviewDebuggingEnabled?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* The origin of the app.
|
|
14
|
+
*/
|
|
15
|
+
appOrigin?: string;
|
|
12
16
|
};
|
|
13
17
|
export type IReactNativeExtension = {
|
|
14
18
|
reactNative: {
|
|
15
19
|
WebView: () => JSX.Element;
|
|
16
20
|
};
|
|
17
21
|
};
|
|
18
|
-
export declare const ReactNativeExtension: ({ webviewUrl, webviewDebuggingEnabled, }?: ReactNativeExtensionProps) => Extension<IReactNativeExtension>;
|
|
22
|
+
export declare const ReactNativeExtension: ({ webviewUrl, webviewDebuggingEnabled, appOrigin, }?: ReactNativeExtensionProps) => Extension<IReactNativeExtension>;
|
|
19
23
|
export {};
|