@myop/react-native 0.0.1 → 0.0.2
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/MyopComponent.js
CHANGED
|
@@ -37,7 +37,7 @@ exports.MyopComponent = void 0;
|
|
|
37
37
|
const react_1 = __importStar(require("react"));
|
|
38
38
|
const react_native_1 = require("react-native");
|
|
39
39
|
const react_native_webview_1 = require("react-native-webview");
|
|
40
|
-
const
|
|
40
|
+
const componentHost_html_js_1 = require("./componentHost.html.js");
|
|
41
41
|
const MyopComponent = (props) => {
|
|
42
42
|
const webviewRef = (0, react_1.useRef)(null);
|
|
43
43
|
const myopComponent = (command) => {
|
|
@@ -85,7 +85,7 @@ const MyopComponent = (props) => {
|
|
|
85
85
|
fetchFromReactNative().then();
|
|
86
86
|
}, [webviewRef]);
|
|
87
87
|
return (react_1.default.createElement(react_native_1.View, { style: props.style ? props.style : styles.root },
|
|
88
|
-
react_1.default.createElement(react_native_webview_1.WebView, { ref: webviewRef, originWhitelist: ['*'], source: { html:
|
|
88
|
+
react_1.default.createElement(react_native_webview_1.WebView, { ref: webviewRef, originWhitelist: ['*'], source: { html: componentHost_html_js_1.HTML }, onMessage: onMessage, style: styles.webview, javaScriptEnabled: true, domStorageEnabled: true, mixedContentMode: "always" // allows HTTPS + HTTP content
|
|
89
89
|
, allowFileAccess: true, allowUniversalAccessFromFileURLs: true })));
|
|
90
90
|
};
|
|
91
91
|
exports.MyopComponent = MyopComponent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MyopComponent.js","sourceRoot":"","sources":["../src/MyopComponent.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA+C;AAC/C,+CAA8C;AAC9C,+DAA6C;AAG7C,
|
|
1
|
+
{"version":3,"file":"MyopComponent.js","sourceRoot":"","sources":["../src/MyopComponent.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;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YAC1B,MAAA,UAAU,CAAC,OAAO,0CAAE,gBAAgB,CAAC;sCACX,OAAO;aAChC,CAAC,CAAC;QAEP,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACX,OAAO,CAAC,KAAK,CAAC,eAAe,EAAE,GAAG,CAAC,CAAC;QACxC,CAAC;IACL,CAAC,CAAC;IAEF,IAAA,iBAAS,EAAC,GAAG,EAAE;QACX,IAAI,UAAU,CAAC,OAAO;YAClB,oBAAoB,EAAE,CAAC,IAAI,EAAE,CAAC;IACtC,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;IAEjB,OAAO,CACH,8BAAC,mBAAI,IAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI;QAChD,8BAAC,8BAAO,IACJ,GAAG,EAAE,UAAU,EACf,eAAe,EAAE,CAAC,GAAG,CAAC,EACtB,MAAM,EAAE,EAAC,IAAI,EAAE,4BAAI,EAAC,EACpB,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,MAAM,CAAC,OAAO,EACrB,iBAAiB,EAAE,IAAI,EACvB,iBAAiB,EAAE,IAAI,EACvB,gBAAgB,EAAC,QAAQ,CAAM,8BAA8B;cAC7D,eAAe,EAAE,IAAI,EACrB,gCAAgC,EAAE,IAAI,GACxC,CACC,CACV,CAAC;AACN,CAAC,CAAA;AArEY,QAAA,aAAa,iBAqEzB;AAED,MAAM,MAAM,GAAG,yBAAU,CAAC,MAAM,CAAC;IAC7B,IAAI,EAAE;QACF,IAAI,EAAE,CAAC;QACP,iDAAiD;KACpD;IACD,OAAO,EAAE;QACL,IAAI,EAAE,CAAC;QACP,4DAA4D;KAC/D;CACJ,CAAC,CAAC"}
|
package/package.json
CHANGED
package/src/MyopComponent.tsx
CHANGED
|
@@ -3,7 +3,7 @@ import {View, StyleSheet} from 'react-native';
|
|
|
3
3
|
import {WebView} from 'react-native-webview';
|
|
4
4
|
import {StyleProp, ViewStyle} from 'react-native';
|
|
5
5
|
import type {IComponentInstanceConfig} from './types';
|
|
6
|
-
import {HTML} from './componentHost.html';
|
|
6
|
+
import {HTML} from './componentHost.html.js';
|
|
7
7
|
|
|
8
8
|
interface IPropTypes {
|
|
9
9
|
style?: StyleProp<ViewStyle> | undefined;
|