@kontextso/sdk-react-native 0.0.10-rc.3 → 0.0.10-rc.5

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 CHANGED
@@ -651,7 +651,10 @@ async function* readDataStream(reader, {
651
651
  const chunks = [];
652
652
  let totalLength = 0;
653
653
  while (true) {
654
- const { value } = await reader.read();
654
+ let { value } = await reader.read();
655
+ if (typeof value === "number") {
656
+ value = new Uint8Array([value]);
657
+ }
655
658
  if (value) {
656
659
  chunks.push(value);
657
660
  totalLength += value.length;
@@ -1495,16 +1498,15 @@ var ErrorBoundary = class extends import_react11.default.Component {
1495
1498
  };
1496
1499
 
1497
1500
  // src/context/AdsProvider.tsx
1498
- var import_fetch = require("expo/fetch");
1499
1501
  var import_encoding = require("react-native-polyfill-globals/src/encoding");
1500
1502
  var import_readable_stream = require("react-native-polyfill-globals/src/readable-stream");
1501
- var import_fetch2 = require("react-native-polyfill-globals/src/fetch");
1503
+ var import_fetch = require("react-native-polyfill-globals/src/fetch");
1502
1504
  var import_react_native5 = require("react-native");
1503
1505
  var import_jsx_runtime6 = require("react/jsx-runtime");
1504
1506
  if (import_react_native5.Platform.OS !== "web") {
1505
1507
  (0, import_encoding.polyfill)();
1506
1508
  (0, import_readable_stream.polyfill)();
1507
- (0, import_fetch2.polyfill)();
1509
+ (0, import_fetch.polyfill)();
1508
1510
  console.log("Polyfilled fetch.");
1509
1511
  }
1510
1512
  var VISITOR_ID_KEY2 = "brain-visitor-id";
@@ -1561,7 +1563,7 @@ var AdsProvider = ({
1561
1563
  onAdView,
1562
1564
  onAdClick,
1563
1565
  reactNativePropStyles: styles,
1564
- customFetch: import_fetch.fetch,
1566
+ customFetch: fetch,
1565
1567
  isReactNative: true
1566
1568
  }
1567
1569
  )
package/dist/index.mjs CHANGED
@@ -619,7 +619,10 @@ async function* readDataStream(reader, {
619
619
  const chunks = [];
620
620
  let totalLength = 0;
621
621
  while (true) {
622
- const { value } = await reader.read();
622
+ let { value } = await reader.read();
623
+ if (typeof value === "number") {
624
+ value = new Uint8Array([value]);
625
+ }
623
626
  if (value) {
624
627
  chunks.push(value);
625
628
  totalLength += value.length;
@@ -1463,7 +1466,6 @@ var ErrorBoundary = class extends React5.Component {
1463
1466
  };
1464
1467
 
1465
1468
  // src/context/AdsProvider.tsx
1466
- import { fetch as fetch2 } from "expo/fetch";
1467
1469
  import { polyfill as polyfillEncoding } from "react-native-polyfill-globals/src/encoding";
1468
1470
  import { polyfill as polyfillReadableStream } from "react-native-polyfill-globals/src/readable-stream";
1469
1471
  import { polyfill as polyfillFetch } from "react-native-polyfill-globals/src/fetch";
@@ -1529,7 +1531,7 @@ var AdsProvider = ({
1529
1531
  onAdView,
1530
1532
  onAdClick,
1531
1533
  reactNativePropStyles: styles,
1532
- customFetch: fetch2,
1534
+ customFetch: fetch,
1533
1535
  isReactNative: true
1534
1536
  }
1535
1537
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kontextso/sdk-react-native",
3
- "version": "0.0.10-rc.3",
3
+ "version": "0.0.10-rc.5",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",