@nihinmedia/medgen-react-native 1.0.12

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/LICENSE ADDED
@@ -0,0 +1,62 @@
1
+ MedGen Japan React Native SDK — Partner License Agreement
2
+
3
+ Copyright (c) 2026 Nihin Media K. K., Ltd. All rights reserved.
4
+
5
+ This software ("SDK") is licensed, not sold, to organisations ("Partner") that
6
+ hold a current written integration agreement with Nihin Media K. K., Ltd.
7
+ ("MedGen JAPAN"). If you do not hold such an agreement, you have no licence to this
8
+ SDK and must not use, copy or distribute it.
9
+
10
+ 1. GRANT
11
+ Subject to the integration agreement and to these terms, MedGen JAPAN grants
12
+ Partner a non-exclusive, non-transferable, revocable licence to install and
13
+ use the SDK solely to embed the MedGen JAPAN clinical assistant inside Partner's
14
+ own applications.
15
+
16
+ 2. RESTRICTIONS
17
+ Partner must not:
18
+ (a) sublicense, resell, or redistribute the SDK on its own, whether or not
19
+ for a fee, except as embedded within Partner's own application;
20
+ (b) reverse engineer, decompile or disassemble the SDK, except to the extent
21
+ that restriction is prohibited by applicable law;
22
+ (c) remove or obscure MedGen JAPAN attribution, except where the
23
+ `hide_attribution` capability has been granted in writing;
24
+ (d) use the SDK to build a competing clinical question-answering service; or
25
+ (e) use the SDK other than through its documented public interface.
26
+
27
+ 3. CREDENTIALS AND KEYS
28
+ Partner is responsible for the security of its signing keys and must keep
29
+ the assertion signing key on Partner-controlled servers. Signing keys must
30
+ never be embedded in an application binary. Partner must notify MedGen JAPAN
31
+ without undue delay on becoming aware of any compromise.
32
+
33
+ 4. DATA PROTECTION
34
+ The SDK transmits clinical queries and identity assertions to MedGen JAPAN.
35
+ Partner must ensure it has the lawful basis and any consents required to do
36
+ so, and must comply with the Act on the Protection of Personal Information
37
+ (APPI) and any other applicable law. Handling of personal data between the
38
+ parties is governed by the integration agreement.
39
+
40
+ 5. NO WARRANTY
41
+ THE SDK IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
42
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
43
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. THE SDK IS NOT A
44
+ MEDICAL DEVICE AND MUST NOT BE RELIED ON AS THE SOLE BASIS FOR ANY CLINICAL
45
+ DECISION.
46
+
47
+ 6. LIMITATION OF LIABILITY
48
+ TO THE MAXIMUM EXTENT PERMITTED BY LAW, MEDGEN JAPAN SHALL NOT BE LIABLE FOR ANY
49
+ INDIRECT, INCIDENTAL, SPECIAL OR CONSEQUENTIAL DAMAGES, OR FOR LOST PROFITS
50
+ OR DATA, ARISING OUT OF OR RELATING TO THE SDK. Nothing in this licence
51
+ excludes liability that cannot lawfully be excluded.
52
+
53
+ 7. TERMINATION
54
+ This licence terminates automatically on termination of the integration
55
+ agreement, or on Partner's breach of these terms. On termination Partner
56
+ must cease distributing applications containing the SDK in new releases.
57
+
58
+ 8. GOVERNING LAW
59
+ This licence is governed by the laws of Japan, with exclusive jurisdiction
60
+ in the Tokyo District Court.
61
+
62
+ Contact: partners@nihinmedia.jp
package/README.md ADDED
@@ -0,0 +1,221 @@
1
+ # @nihinmedia/medgen-react-native
2
+
3
+ Embed MedGen's clinical assistant inside your React Native app. Your users
4
+ reach MedGen without creating a separate account: your backend signs a short
5
+ assertion, MedGen exchanges it for its own session.
6
+
7
+ > **New here?** The quick start below gets the surface open, but you also need
8
+ > a server-side endpoint that signs the assertion. Ask your MedGen
9
+ > representative for the full integration guide, which covers that endpoint,
10
+ > every error code and a pre-launch checklist.
11
+
12
+ ## Install
13
+
14
+ ```sh
15
+ npm install @nihinmedia/medgen-react-native react-native-webview react-native-keychain
16
+ cd ios && pod install
17
+ ```
18
+
19
+ The package is public on npm, but **use requires a current integration
20
+ agreement with Nihin Media**. You also need partner
21
+ credentials (a `partnerId` and a key pair) before the SDK will do anything:
22
+ without them every exchange fails with `PARTNER_NOT_ENABLED`.
23
+
24
+ ## Quick start
25
+
26
+ ```tsx
27
+ import { MedGen, MedGenHost, MedGenEnvironment } from '@nihinmedia/medgen-react-native';
28
+
29
+ MedGen.initialize({
30
+ partnerId: 'your-partner-id',
31
+ environment: MedGenEnvironment.Production,
32
+ // Must call YOUR server. Never sign in the app.
33
+ assertionProvider: async () => {
34
+ const res = await fetch('https://your-api.example.com/medgen/assertion', {
35
+ headers: { Authorization: `Bearer ${yourSessionToken}` },
36
+ });
37
+ const { assertion } = await res.json();
38
+ return assertion;
39
+ },
40
+ });
41
+
42
+ // Mount once, near the root.
43
+ export default function App() {
44
+ return (
45
+ <>
46
+ <YourApp />
47
+ <MedGenHost />
48
+ </>
49
+ );
50
+ }
51
+
52
+ // Open the surface.
53
+ await MedGen.present();
54
+ ```
55
+
56
+ ## The one rule that matters
57
+
58
+ **Never ship the private key in the app.** A key inside an app binary can be
59
+ extracted and must be assumed public. `assertionProvider` exists so signing
60
+ stays on your server, where the key is.
61
+
62
+ Assertions are **single-use**. Return a fresh one every call — a cached
63
+ assertion fails with `ASSERTION_REPLAYED`.
64
+
65
+ ## Sign out
66
+
67
+ ```tsx
68
+ await MedGen.signOut(); // call this from YOUR logout
69
+ ```
70
+
71
+ Skipping it leaves a valid MedGen session on the device. On a shared clinical
72
+ device the next user reaches the previous doctor's account and history.
73
+
74
+ ## Capabilities
75
+
76
+ MedGen grants capabilities per partner. Read them rather than assuming:
77
+
78
+ ```tsx
79
+ MedGen.initialize({
80
+ /* ... */
81
+ onEvent: (e) => {
82
+ if (e.name === 'exchange.succeeded') analytics.track('medgen_opened');
83
+ },
84
+ });
85
+ ```
86
+
87
+ The surface hides controls it has no native support for, so a feature you have
88
+ not wired up does not appear as a dead button.
89
+
90
+ ## Native features
91
+
92
+ The SDK performs share, copy and PDF export itself — but it cannot load the
93
+ native modules those need, because they are *your* peer dependencies and
94
+ Metro resolves a `require` relative to the package containing it. Pass in the
95
+ ones you installed:
96
+
97
+ ```bash
98
+ npm install @react-native-clipboard/clipboard react-native-share \
99
+ react-native-blob-util
100
+ npm install react-native-html-to-pdf@^0.12.0 # NOT 1.x on the old architecture
101
+ ```
102
+
103
+ ```tsx
104
+ MedGen.initialize({
105
+ /* ... */
106
+ nativeModules: {
107
+ clipboard: require('@react-native-clipboard/clipboard'),
108
+ share: require('react-native-share'),
109
+ htmlToPdf: require('react-native-html-to-pdf'),
110
+ blobUtil: require('react-native-blob-util'),
111
+ },
112
+ });
113
+ ```
114
+
115
+ Omit any you have not installed; the matching control then reports
116
+ `UNAVAILABLE` rather than failing.
117
+
118
+ `nativeHandlers` remains, as an **override** — use it to take an action over,
119
+ for example filing the PDF into your own records system instead of offering
120
+ the share sheet:
121
+
122
+ ```tsx
123
+ nativeHandlers: {
124
+ onSavePdf: async ({ html, fileName }) => fileIntoRecords(html, fileName),
125
+ }
126
+ ```
127
+
128
+ ### Platform configuration
129
+
130
+ iOS — the surface's share menu composes mail, and since iOS 9 `canOpenURL`
131
+ returns `NO` for any undeclared scheme:
132
+
133
+ ```xml
134
+ <key>LSApplicationQueriesSchemes</key>
135
+ <array>
136
+ <string>mailto</string>
137
+ </array>
138
+ ```
139
+
140
+ Android 11+ filters which apps yours can see, so `canOpenURL` returns false
141
+ for `mailto:` without these. Package visibility, not a permission:
142
+
143
+ ```xml
144
+ <queries>
145
+ <intent><action android:name="android.intent.action.SENDTO" />
146
+ <data android:scheme="mailto" /></intent>
147
+ <intent><action android:name="android.intent.action.VIEW" />
148
+ <data android:scheme="https" /></intent>
149
+ </queries>
150
+ ```
151
+
152
+ Android — only for `download_to_device`, and only on API 28 and below:
153
+
154
+ ```xml
155
+ <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
156
+ android:maxSdkVersion="28" />
157
+ ```
158
+
159
+ ### Known limitations
160
+
161
+ - `rich_clipboard` has no effect: `@react-native-clipboard/clipboard` has no
162
+ HTML flavour on either platform, so copy is always plain text.
163
+ - iOS has no public Downloads folder. `download_to_device` is Android-only;
164
+ on iOS the share sheet's **Save to Files** is the equivalent.
165
+
166
+ ## Attestation
167
+
168
+ Required only if MedGen has enabled it for you:
169
+
170
+ ```tsx
171
+ attestationProvider: async (challenge) => {
172
+ // iOS: DCAppAttestService attestation object, base64
173
+ // Android: Play Integrity token
174
+ return await YourAttestationModule.getToken(challenge);
175
+ },
176
+ ```
177
+
178
+ `challenge` is the assertion JWT itself, which binds the attestation to this
179
+ exchange — a captured token cannot be replayed against a different one. Pass it
180
+ to the platform API **unchanged**; the server hashes it itself, so hashing or
181
+ re-encoding it here breaks verification.
182
+
183
+ ## Errors
184
+
185
+ Every failure is a `MedGenError` with a `code` and a `retryable` flag:
186
+
187
+ ```tsx
188
+ try {
189
+ await MedGen.present();
190
+ } catch (e) {
191
+ if (e.code === 'EMAIL_COLLISION_PENDING') { /* not an error — see below */ }
192
+ else if (e.retryable) showRetry();
193
+ else showSupport(e.supportReference);
194
+ }
195
+ ```
196
+
197
+ **`emailCollisionPending` is a success, not a failure.** It means the asserted
198
+ email already belongs to a MedGen account you did not create. The session is
199
+ valid and the doctor can use MedGen immediately; MedGen offers account linking
200
+ from inside the surface. Do not block on it.
201
+
202
+ ## Requirements
203
+
204
+ | | |
205
+ |---|---|
206
+ | React Native | ≥ 0.71 |
207
+ | iOS | 13.4+ |
208
+ | Android | API 24+ |
209
+
210
+ ## Support
211
+
212
+ Contact your MedGen representative with the `supportReference` from any error,
213
+ or email **contact@nihinmedia.jp**.
214
+
215
+ Security reports go to the same address. Please report privately rather than in
216
+ any public forum.
217
+
218
+ ## Licence
219
+
220
+ Proprietary — Nihin Media Co., Ltd. Use requires a current integration
221
+ agreement. The full terms are in the `LICENSE` file inside this package.
package/SECURITY.md ADDED
@@ -0,0 +1,101 @@
1
+ # Security Policy
2
+
3
+ ## Reporting a vulnerability
4
+
5
+ Email **contact@nihinmedia.jp** with `[MedGen RN SDK]` in the subject.
6
+ Please report privately by email rather than in any public forum.
7
+
8
+ Include where you can: affected SDK version, platform (iOS/Android), a
9
+ description of the issue, and the steps or proof-of-concept needed to
10
+ reproduce it.
11
+
12
+ | | |
13
+ |---|---|
14
+ | Acknowledgement | within 2 business days |
15
+ | Initial assessment | within 5 business days |
16
+ | Fix target — critical / high | 7 / 30 days |
17
+
18
+ We will keep you updated through triage and tell you when a fix ships. We are
19
+ happy to credit you in the release notes unless you would rather stay
20
+ anonymous. Please give us a reasonable window to release a fix before any
21
+ public disclosure.
22
+
23
+ ## Supported versions
24
+
25
+ | Version | Supported |
26
+ |---|---|
27
+ | 1.x | ✅ |
28
+ | < 1.0 | ❌ |
29
+
30
+ ## Security model — what the SDK guarantees, and what you must do
31
+
32
+ The SDK is one half of the security boundary. Several properties depend on the
33
+ partner's own integration, and no SDK change can enforce them for you.
34
+
35
+ ### The SDK's side
36
+
37
+ - **Assertion signing never happens in the app.** The SDK has no signing key
38
+ and cannot mint an assertion; it can only call your `assertionProvider`.
39
+ - **Credentials are stored in the platform secure store** (Keychain /
40
+ Android Keystore, via `react-native-keychain`), with
41
+ `AFTER_FIRST_UNLOCK_THIS_DEVICE_ONLY` so a session cannot travel to another
42
+ device in a cloud backup.
43
+ - **Session tokens never appear in a URL.** Only the single-use, ~30-second
44
+ handoff code is put in the embed URL, because URLs leak into logs, history
45
+ and `Referer` headers.
46
+ - **The WebView is locked to MedGen origins.** External links — citations,
47
+ references — are handed to the system browser rather than rendered inside
48
+ the authenticated surface.
49
+ - **The native bridge is an allowlist.** Only the documented methods are
50
+ dispatched; anything else is ignored, so a compromised page cannot reach
51
+ arbitrary native functionality. Capability-gated methods additionally check
52
+ the grants returned by the server.
53
+ - **Local file access is disabled** in the WebView, along with mixed content
54
+ and automatic window opening.
55
+
56
+ ### Your side
57
+
58
+ - **Keep the signing key on your server.** A private key inside an app binary
59
+ can be extracted and must be assumed public. This is the single most
60
+ important rule in the integration.
61
+ - **Authenticate the user before minting an assertion.** Your assertion
62
+ endpoint asserts an identity to MedGen; if it can be called without a valid
63
+ session of your own, anyone can impersonate any of your users.
64
+ - **Return a fresh assertion every call.** They are single-use and live 120
65
+ seconds.
66
+ - **Call `MedGen.signOut()` from your own logout.** Skipping it leaves a valid
67
+ MedGen session on the device — a real exposure on shared clinical devices,
68
+ where the next user would reach the previous doctor's account and history.
69
+ - **Do not point `apiBaseUrl` / `embedBaseUrl` at a non-MedGen host** in a
70
+ production build. They exist for MedGen-supplied test environments. They
71
+ also relax nothing on their own — but a host you do not control receives the
72
+ assertion.
73
+ - **Keep the SDK up to date**, and treat `react-native-webview` updates as
74
+ security updates.
75
+
76
+ ## Requirements on the MedGen embed host
77
+
78
+ These are MedGen's own obligations, recorded here because the SDK's guarantees
79
+ depend on them:
80
+
81
+ - **Emit lowercase host URLs.** `react-native-webview` matches its origin
82
+ whitelist case-sensitively while normalising elsewhere, so a mixed-case
83
+ redirect can cause the library to open the authenticated surface in the
84
+ system browser before the SDK's handler runs.
85
+ - **Do not embed cross-origin iframes in the surface.** The bridge nonce is
86
+ injected main-frame-only and a subframe cannot reach it, but a hostile frame
87
+ remains an unnecessary foothold.
88
+ - **Treat the handoff code as single-use with a short TTL.**
89
+
90
+ ## Audit
91
+
92
+ The SDK was independently audited before its first partner release. All
93
+ findings were remediated prior to publication. Partners under an integration
94
+ agreement can request the full report from their MedGen representative.
95
+
96
+ ## Handling of clinical data
97
+
98
+ Queries typed into the surface are transmitted to MedGen for answering. The
99
+ SDK itself persists no clinical content on the device; the chat history lives
100
+ in the MedGen session. Your obligations for personal data are set out in your
101
+ integration agreement and in APPI.
@@ -0,0 +1,201 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ exports.originOf = exports.isSameOrigin = exports.decideNavigation = exports.MedGenWebView = void 0;
8
+
9
+ var _react = _interopRequireWildcard(require("react"));
10
+
11
+ var _reactNative = require("react-native");
12
+
13
+ var _reactNativeWebview = require("react-native-webview");
14
+
15
+ var _bridge = require("./bridge");
16
+
17
+ var _client = require("./client");
18
+
19
+ function _interopRequireWildcard(e, t) {
20
+ if ("function" == typeof WeakMap) var r = new WeakMap, n = new WeakMap;
21
+ return (_interopRequireWildcard = function(e, t) {
22
+ if (!t && e && e.__esModule) return e;
23
+ var o, i, f = {
24
+ __proto__: null,
25
+ default: e
26
+ };
27
+ if (null === e || "object" != typeof e && "function" != typeof e) return f;
28
+ if (o = t ? n : r) {
29
+ if (o.has(e)) return o.get(e);
30
+ o.set(e, f);
31
+ }
32
+ for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]);
33
+ return f;
34
+ })(e, t);
35
+ }
36
+
37
+ const WebView = _reactNativeWebview.WebView;
38
+
39
+ const originOf = u => {
40
+ const m = /^[a-z][a-z0-9+.-]*:\/\/[^/?#]+/i.exec(u);
41
+ return m ? m[0].toLowerCase() : "";
42
+ };
43
+
44
+ exports.originOf = originOf;
45
+
46
+ const decideNavigation = (url, base, isTopFrame) => {
47
+ if (isSameOrigin(url, base)) return "load";
48
+ if (isTopFrame === false) return "block";
49
+ if (/^(mailto|tel|sms):/i.test(url)) return "external";
50
+ if (!/^https?:\/\//i.test(url)) return "block";
51
+ return "external";
52
+ };
53
+
54
+ exports.decideNavigation = decideNavigation;
55
+
56
+ const openExternally = async url => {
57
+ try {
58
+ if (!await _reactNative.Linking.canOpenURL(url)) {
59
+ (0, _client.emit)("surface.externalLinkFailed", {
60
+ url: url,
61
+ reason: "unsupported"
62
+ });
63
+ return false;
64
+ }
65
+ await _reactNative.Linking.openURL(url);
66
+ (0, _client.emit)("surface.externalLinkOpened", {
67
+ url: url
68
+ });
69
+ return true;
70
+ } catch (error) {
71
+ (0, _client.emit)("surface.externalLinkFailed", {
72
+ url: url,
73
+ reason: error instanceof Error ? error.message : "unknown"
74
+ });
75
+ return false;
76
+ }
77
+ };
78
+
79
+ const makeNonce = () => `${Date.now().toString(36)}.${Math.random().toString(36).slice(2)}${Math.random().toString(36).slice(2)}`;
80
+
81
+ const isSameOrigin = (target, base) => {
82
+ if (target === "about:blank") return true;
83
+ const b = originOf(base);
84
+ return b !== "" && originOf(target) === b;
85
+ };
86
+
87
+ exports.isSameOrigin = isSameOrigin;
88
+
89
+ const MedGenWebView = ({url: url, handlers: handlers, capabilities: capabilities, onClose: onClose}) => {
90
+ const ref = (0, _react.useRef)(null);
91
+ const nonce = (0, _react.useMemo)(() => makeNonce(), [ url ]);
92
+ const isMedGenOrigin = (0, _react.useCallback)(target => isSameOrigin(target, (0,
93
+ _client.embedBase)()), []);
94
+ const onShouldStartLoadWithRequest = (0, _react.useCallback)(req => {
95
+ const decision = decideNavigation(req.url, (0, _client.embedBase)(), req.isTopFrame);
96
+ if (decision === "load") return true;
97
+ if (decision === "external") void openExternally(req.url);
98
+ return false;
99
+ }, [ isMedGenOrigin ]);
100
+ const onMessage = (0, _react.useCallback)(event => {
101
+ if (typeof __DEV__ !== "undefined" && __DEV__) {
102
+ try {
103
+ const probe = JSON.parse(event.nativeEvent.data);
104
+ if (probe?.__medgenLog) {
105
+ const {level: level = "log", args: args = []} = probe.__medgenLog;
106
+ console[level === "error" ? "error" : "warn"]("[MedGen surface]", ...args);
107
+ return;
108
+ }
109
+ } catch {}
110
+ }
111
+ if (!isMedGenOrigin(event.nativeEvent.url)) {
112
+ if (typeof __DEV__ !== "undefined" && __DEV__) {
113
+ console.warn("[MedGen] message rejected — origin not allowed:", event.nativeEvent.url);
114
+ }
115
+ return;
116
+ }
117
+ void (0, _bridge.handleBridgeMessage)(event.nativeEvent.data, replyJson => {
118
+ const safe = JSON.stringify(replyJson).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029");
119
+ ref.current?.injectJavaScript(`window.__medgen && window.__medgen.receive(${safe}); true;`);
120
+ }, {
121
+ handlers: handlers,
122
+ capabilities: capabilities,
123
+ onClose: onClose,
124
+ nonce: nonce
125
+ });
126
+ }, [ isMedGenOrigin, handlers, capabilities, onClose, nonce ]);
127
+ return _react.default.createElement(WebView, {
128
+ ref: ref,
129
+ source: {
130
+ uri: url
131
+ },
132
+ style: styles.web,
133
+ injectedJavaScriptBeforeContentLoaded: `window.__medgenNonce=${JSON.stringify(nonce)};` + (typeof __DEV__ !== "undefined" && __DEV__ ? `(function(){var p=window.ReactNativeWebView&&window.ReactNativeWebView.postMessage;` + `if(!p)return;['log','warn','error'].forEach(function(l){var o=console[l];` + `console[l]=function(){try{p.call(window.ReactNativeWebView,JSON.stringify(` + `{__medgenLog:{level:l,args:Array.prototype.slice.call(arguments).map(String)}}));}` + `catch(e){}o&&o.apply(console,arguments);};});})();` : "") + `true;`,
134
+ injectedJavaScriptBeforeContentLoadedForMainFrameOnly: true,
135
+ originWhitelist: [ originOf((0, _client.embedBase)()) ],
136
+ onShouldStartLoadWithRequest: onShouldStartLoadWithRequest,
137
+ onMessage: onMessage,
138
+ allowFileAccess: false,
139
+ allowUniversalAccessFromFileURLs: false,
140
+ mixedContentMode: "never",
141
+ javaScriptCanOpenWindowsAutomatically: false,
142
+ setSupportMultipleWindows: false,
143
+ onOpenWindow: event => {
144
+ const url = event?.nativeEvent?.targetUrl;
145
+ if (!url) return;
146
+ const decision = decideNavigation(url, (0, _client.embedBase)(), true);
147
+ if (decision === "load") {
148
+ ref.current?.injectJavaScript(`window.location.assign(${JSON.stringify(url)});true;`);
149
+ } else if (decision === "external") {
150
+ void openExternally(url);
151
+ }
152
+ },
153
+ onError: event => {
154
+ (0, _client.emit)("surface.loadFailed", {
155
+ description: event?.nativeEvent?.description,
156
+ code: event?.nativeEvent?.code
157
+ });
158
+ },
159
+ onHttpError: event => {
160
+ (0, _client.emit)("surface.loadFailed", {
161
+ statusCode: event?.nativeEvent?.statusCode
162
+ });
163
+ },
164
+ automaticallyAdjustContentInsets: false,
165
+ contentInsetAdjustmentBehavior: "never",
166
+ keyboardDisplayRequiresUserAction: false,
167
+ androidLayerType: "hardware",
168
+ onContentProcessDidTerminate: () => {
169
+ (0, _client.emit)("surface.loadFailed", {
170
+ reason: "content_process_terminated"
171
+ });
172
+ ref.current?.reload();
173
+ },
174
+ allowsInlineMediaPlayback: true,
175
+ allowsLinkPreview: false,
176
+ applicationNameForUserAgent: `MedGenSDK/${_client.SDK_VERSION}`,
177
+ sharedCookiesEnabled: true,
178
+ thirdPartyCookiesEnabled: false,
179
+ startInLoadingState: true,
180
+ renderLoading: () => _react.default.createElement(_reactNative.View, {
181
+ style: styles.loading
182
+ }, _react.default.createElement(_reactNative.ActivityIndicator, {
183
+ size: "large"
184
+ })),
185
+ bounces: false,
186
+ overScrollMode: "never"
187
+ });
188
+ };
189
+
190
+ exports.MedGenWebView = MedGenWebView;
191
+
192
+ const styles = _reactNative.StyleSheet.create({
193
+ web: {
194
+ flex: 1
195
+ },
196
+ loading: {
197
+ ..._reactNative.StyleSheet.absoluteFillObject,
198
+ alignItems: "center",
199
+ justifyContent: "center"
200
+ }
201
+ });