@kontextso/sdk-react-native 0.0.10-rc.9 → 0.1.0
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/index.js +7 -2
- package/dist/index.mjs +13 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3234,9 +3234,14 @@ var ErrorBoundary = class extends import_react11.default.Component {
|
|
|
3234
3234
|
};
|
|
3235
3235
|
|
|
3236
3236
|
// src/context/AdsProvider.tsx
|
|
3237
|
-
var
|
|
3237
|
+
var import_react_native5 = require("react-native");
|
|
3238
3238
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
3239
3239
|
var VISITOR_ID_KEY2 = "brain-visitor-id";
|
|
3240
|
+
var customFetch = fetch;
|
|
3241
|
+
if (import_react_native5.Platform.OS !== "web") {
|
|
3242
|
+
const reactNativeFetchApi = require("react-native-fetch-api");
|
|
3243
|
+
customFetch = reactNativeFetchApi.fetch;
|
|
3244
|
+
}
|
|
3240
3245
|
ErrorUtils.setGlobalHandler((error, isFatal) => {
|
|
3241
3246
|
if (!isFatal) {
|
|
3242
3247
|
log.warn(error);
|
|
@@ -3290,7 +3295,7 @@ var AdsProvider = ({
|
|
|
3290
3295
|
onAdView,
|
|
3291
3296
|
onAdClick,
|
|
3292
3297
|
reactNativePropStyles: styles,
|
|
3293
|
-
customFetch: (input, init) => (
|
|
3298
|
+
customFetch: (input, init) => customFetch(input, { ...init, reactNative: { stream: true } }),
|
|
3294
3299
|
isReactNative: true
|
|
3295
3300
|
}
|
|
3296
3301
|
)
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
2
|
+
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
3
|
+
}) : x)(function(x) {
|
|
4
|
+
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
5
|
+
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
6
|
+
});
|
|
7
|
+
|
|
1
8
|
// src/formats/InlineAd.tsx
|
|
2
9
|
import { useContext as useContext6, useEffect as useEffect8, useState as useState7 } from "react";
|
|
3
10
|
import {
|
|
@@ -3202,9 +3209,14 @@ var ErrorBoundary = class extends React5.Component {
|
|
|
3202
3209
|
};
|
|
3203
3210
|
|
|
3204
3211
|
// src/context/AdsProvider.tsx
|
|
3205
|
-
import {
|
|
3212
|
+
import { Platform as Platform2 } from "react-native";
|
|
3206
3213
|
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
3207
3214
|
var VISITOR_ID_KEY2 = "brain-visitor-id";
|
|
3215
|
+
var customFetch = fetch;
|
|
3216
|
+
if (Platform2.OS !== "web") {
|
|
3217
|
+
const reactNativeFetchApi = __require("react-native-fetch-api");
|
|
3218
|
+
customFetch = reactNativeFetchApi.fetch;
|
|
3219
|
+
}
|
|
3208
3220
|
ErrorUtils.setGlobalHandler((error, isFatal) => {
|
|
3209
3221
|
if (!isFatal) {
|
|
3210
3222
|
log.warn(error);
|