@kontextso/sdk-react-native 3.0.3 → 3.0.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 +5 -5
- package/dist/index.mjs +6 -6
- package/package.json +2 -2
- package/src/context/AdsProvider.tsx +3 -3
- package/src/formats/Format.tsx +1 -1
package/dist/index.js
CHANGED
|
@@ -118,7 +118,7 @@ var Format = ({ code, messageId, wrapper, onEvent, ...otherParams }) => {
|
|
|
118
118
|
const bid = (0, import_sdk_react.useBid)({ code, messageId });
|
|
119
119
|
const [height, setHeight] = (0, import_react2.useState)(0);
|
|
120
120
|
const cachedContent = getCachedContent(context, bid?.bidId);
|
|
121
|
-
const iframeUrl = (0, import_sdk_react.useIframeUrl)(
|
|
121
|
+
const iframeUrl = (0, import_sdk_react.useIframeUrl)(bid, code, messageId, "sdk-react-native", otherParams.theme, cachedContent);
|
|
122
122
|
const modalUrl = iframeUrl.replace("/api/frame/", "/api/modal/");
|
|
123
123
|
const [showIframe, setShowIframe] = (0, import_react2.useState)(false);
|
|
124
124
|
const [iframeLoaded, setIframeLoaded] = (0, import_react2.useState)(false);
|
|
@@ -457,13 +457,13 @@ var import_sdk_react2 = require("@kontextso/sdk-react");
|
|
|
457
457
|
var import_react_native3 = require("react-native");
|
|
458
458
|
var import_react_native_device_info = __toESM(require("react-native-device-info"));
|
|
459
459
|
|
|
460
|
+
// package.json
|
|
461
|
+
var version = "3.0.5";
|
|
462
|
+
|
|
460
463
|
// src/NativeRNKontext.ts
|
|
461
464
|
var import_react_native2 = require("react-native");
|
|
462
465
|
var NativeRNKontext_default = import_react_native2.TurboModuleRegistry.getEnforcing("RNKontext");
|
|
463
466
|
|
|
464
|
-
// package.json
|
|
465
|
-
var version = "3.0.3";
|
|
466
|
-
|
|
467
467
|
// src/context/AdsProvider.tsx
|
|
468
468
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
469
469
|
ErrorUtils.setGlobalHandler((error, isFatal) => {
|
|
@@ -496,7 +496,7 @@ var getDevice = async () => {
|
|
|
496
496
|
return {
|
|
497
497
|
hardware: {
|
|
498
498
|
brand: import_react_native_device_info.default.getBrand(),
|
|
499
|
-
model: import_react_native_device_info.default.
|
|
499
|
+
model: import_react_native_device_info.default.getDeviceId(),
|
|
500
500
|
type: mapDeviceTypeToHardwareType()
|
|
501
501
|
// bootTime: Not available without native module
|
|
502
502
|
// sdCardAvailable: Not available without native module
|
package/dist/index.mjs
CHANGED
|
@@ -87,7 +87,7 @@ var Format = ({ code, messageId, wrapper, onEvent, ...otherParams }) => {
|
|
|
87
87
|
const bid = useBid({ code, messageId });
|
|
88
88
|
const [height, setHeight] = useState(0);
|
|
89
89
|
const cachedContent = getCachedContent(context, bid?.bidId);
|
|
90
|
-
const iframeUrl = useIframeUrl(
|
|
90
|
+
const iframeUrl = useIframeUrl(bid, code, messageId, "sdk-react-native", otherParams.theme, cachedContent);
|
|
91
91
|
const modalUrl = iframeUrl.replace("/api/frame/", "/api/modal/");
|
|
92
92
|
const [showIframe, setShowIframe] = useState(false);
|
|
93
93
|
const [iframeLoaded, setIframeLoaded] = useState(false);
|
|
@@ -423,16 +423,16 @@ var InlineAd_default = InlineAd;
|
|
|
423
423
|
|
|
424
424
|
// src/context/AdsProvider.tsx
|
|
425
425
|
import { AdsProviderInternal, log } from "@kontextso/sdk-react";
|
|
426
|
-
import {
|
|
426
|
+
import { Appearance, Dimensions, PixelRatio, Platform } from "react-native";
|
|
427
427
|
import DeviceInfo from "react-native-device-info";
|
|
428
428
|
|
|
429
|
+
// package.json
|
|
430
|
+
var version = "3.0.5";
|
|
431
|
+
|
|
429
432
|
// src/NativeRNKontext.ts
|
|
430
433
|
import { TurboModuleRegistry } from "react-native";
|
|
431
434
|
var NativeRNKontext_default = TurboModuleRegistry.getEnforcing("RNKontext");
|
|
432
435
|
|
|
433
|
-
// package.json
|
|
434
|
-
var version = "3.0.3";
|
|
435
|
-
|
|
436
436
|
// src/context/AdsProvider.tsx
|
|
437
437
|
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
438
438
|
ErrorUtils.setGlobalHandler((error, isFatal) => {
|
|
@@ -465,7 +465,7 @@ var getDevice = async () => {
|
|
|
465
465
|
return {
|
|
466
466
|
hardware: {
|
|
467
467
|
brand: DeviceInfo.getBrand(),
|
|
468
|
-
model: DeviceInfo.
|
|
468
|
+
model: DeviceInfo.getDeviceId(),
|
|
469
469
|
type: mapDeviceTypeToHardwareType()
|
|
470
470
|
// bootTime: Not available without native module
|
|
471
471
|
// sdCardAvailable: Not available without native module
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kontextso/sdk-react-native",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.5",
|
|
4
4
|
"description": "Kontext SDK for React Native",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"react-native-webview": "^13.10.0"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@kontextso/sdk-react": "^3.0.
|
|
54
|
+
"@kontextso/sdk-react": "^3.0.5"
|
|
55
55
|
},
|
|
56
56
|
"files": [
|
|
57
57
|
"dist/*",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { AdsProviderProps, AppConfig, DeviceConfig, SDKConfig } from '@kontextso/sdk-react'
|
|
2
2
|
import { AdsProviderInternal, log } from '@kontextso/sdk-react'
|
|
3
|
-
import {
|
|
3
|
+
import { Appearance, Dimensions, PixelRatio, Platform } from 'react-native'
|
|
4
4
|
import DeviceInfo, { type DeviceType } from 'react-native-device-info'
|
|
5
|
-
import KontextSDK from '../NativeRNKontext'
|
|
6
5
|
import { version } from '../../package.json'
|
|
6
|
+
import KontextSDK from '../NativeRNKontext'
|
|
7
7
|
|
|
8
8
|
ErrorUtils.setGlobalHandler((error, isFatal) => {
|
|
9
9
|
if (!isFatal) {
|
|
@@ -38,7 +38,7 @@ const getDevice = async (): Promise<DeviceConfig> => {
|
|
|
38
38
|
return {
|
|
39
39
|
hardware: {
|
|
40
40
|
brand: DeviceInfo.getBrand(),
|
|
41
|
-
model: DeviceInfo.
|
|
41
|
+
model: DeviceInfo.getDeviceId(),
|
|
42
42
|
type: mapDeviceTypeToHardwareType(),
|
|
43
43
|
// bootTime: Not available without native module
|
|
44
44
|
// sdCardAvailable: Not available without native module
|
package/src/formats/Format.tsx
CHANGED
|
@@ -52,7 +52,7 @@ const Format = ({ code, messageId, wrapper, onEvent, ...otherParams }: FormatPro
|
|
|
52
52
|
|
|
53
53
|
const cachedContent = getCachedContent(context, bid?.bidId)
|
|
54
54
|
|
|
55
|
-
const iframeUrl = useIframeUrl(
|
|
55
|
+
const iframeUrl = useIframeUrl(bid, code, messageId, 'sdk-react-native', otherParams.theme, cachedContent)
|
|
56
56
|
const modalUrl = iframeUrl.replace('/api/frame/', '/api/modal/')
|
|
57
57
|
|
|
58
58
|
const [showIframe, setShowIframe] = useState<boolean>(false)
|