@kontextso/sdk-react-native 0.0.8 → 0.0.9
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 +9 -8
- package/dist/index.mjs +9 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -52,7 +52,7 @@ var import_react5 = __toESM(require("react"));
|
|
|
52
52
|
var import_react = require("react");
|
|
53
53
|
|
|
54
54
|
// src/utils.ts
|
|
55
|
-
var UNRETRIABLE_ERRORS = [403, 429];
|
|
55
|
+
var UNRETRIABLE_ERRORS = [400, 403, 429];
|
|
56
56
|
var fetchWithTimeout = async (input, init) => {
|
|
57
57
|
const { timeout = 16e3 } = init || {};
|
|
58
58
|
const controller = new AbortController();
|
|
@@ -278,11 +278,11 @@ var log = new Logger();
|
|
|
278
278
|
var log_default = log;
|
|
279
279
|
|
|
280
280
|
// package.json
|
|
281
|
-
var version = "0.0.
|
|
281
|
+
var version = "0.0.9";
|
|
282
282
|
|
|
283
283
|
// src/hooks/useInitializeAds.tsx
|
|
284
|
-
var
|
|
285
|
-
var
|
|
284
|
+
var RETRY_PERIOD_MS = 500;
|
|
285
|
+
var INIT_RETRIES = 3;
|
|
286
286
|
async function initialize(adServerUrl, publisherToken, userId, conversationId, legacyVisitorId, character) {
|
|
287
287
|
log_default.log("[BRAIN] init ads started");
|
|
288
288
|
const response = await fetchRetry(
|
|
@@ -300,8 +300,8 @@ async function initialize(adServerUrl, publisherToken, userId, conversationId, l
|
|
|
300
300
|
character
|
|
301
301
|
})
|
|
302
302
|
},
|
|
303
|
-
|
|
304
|
-
|
|
303
|
+
INIT_RETRIES,
|
|
304
|
+
RETRY_PERIOD_MS
|
|
305
305
|
);
|
|
306
306
|
const {
|
|
307
307
|
sessionId,
|
|
@@ -1130,8 +1130,9 @@ function MarkdownText({
|
|
|
1130
1130
|
style: ({ pressed }) => [{ opacity: pressed ? 0.8 : 1 }],
|
|
1131
1131
|
hitSlop: { top: 20, bottom: 20, left: 10, right: 10 },
|
|
1132
1132
|
onStartShouldSetResponder: () => true,
|
|
1133
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.Text, { style: styles?.link, children: t.text }
|
|
1134
|
-
}
|
|
1133
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.Text, { style: styles?.link, children: t.text })
|
|
1134
|
+
},
|
|
1135
|
+
i + "link"
|
|
1135
1136
|
);
|
|
1136
1137
|
} else if (t.textType === "themed") {
|
|
1137
1138
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.Text, { style: styles?.em, children: t.text }, i + "em");
|
package/dist/index.mjs
CHANGED
|
@@ -26,7 +26,7 @@ import React2, { useState as useState4 } from "react";
|
|
|
26
26
|
import { useEffect, useState } from "react";
|
|
27
27
|
|
|
28
28
|
// src/utils.ts
|
|
29
|
-
var UNRETRIABLE_ERRORS = [403, 429];
|
|
29
|
+
var UNRETRIABLE_ERRORS = [400, 403, 429];
|
|
30
30
|
var fetchWithTimeout = async (input, init) => {
|
|
31
31
|
const { timeout = 16e3 } = init || {};
|
|
32
32
|
const controller = new AbortController();
|
|
@@ -252,11 +252,11 @@ var log = new Logger();
|
|
|
252
252
|
var log_default = log;
|
|
253
253
|
|
|
254
254
|
// package.json
|
|
255
|
-
var version = "0.0.
|
|
255
|
+
var version = "0.0.9";
|
|
256
256
|
|
|
257
257
|
// src/hooks/useInitializeAds.tsx
|
|
258
|
-
var
|
|
259
|
-
var
|
|
258
|
+
var RETRY_PERIOD_MS = 500;
|
|
259
|
+
var INIT_RETRIES = 3;
|
|
260
260
|
async function initialize(adServerUrl, publisherToken, userId, conversationId, legacyVisitorId, character) {
|
|
261
261
|
log_default.log("[BRAIN] init ads started");
|
|
262
262
|
const response = await fetchRetry(
|
|
@@ -274,8 +274,8 @@ async function initialize(adServerUrl, publisherToken, userId, conversationId, l
|
|
|
274
274
|
character
|
|
275
275
|
})
|
|
276
276
|
},
|
|
277
|
-
|
|
278
|
-
|
|
277
|
+
INIT_RETRIES,
|
|
278
|
+
RETRY_PERIOD_MS
|
|
279
279
|
);
|
|
280
280
|
const {
|
|
281
281
|
sessionId,
|
|
@@ -1104,8 +1104,9 @@ function MarkdownText({
|
|
|
1104
1104
|
style: ({ pressed }) => [{ opacity: pressed ? 0.8 : 1 }],
|
|
1105
1105
|
hitSlop: { top: 20, bottom: 20, left: 10, right: 10 },
|
|
1106
1106
|
onStartShouldSetResponder: () => true,
|
|
1107
|
-
children: /* @__PURE__ */ jsx2(Text, { style: styles?.link, children: t.text }
|
|
1108
|
-
}
|
|
1107
|
+
children: /* @__PURE__ */ jsx2(Text, { style: styles?.link, children: t.text })
|
|
1108
|
+
},
|
|
1109
|
+
i + "link"
|
|
1109
1110
|
);
|
|
1110
1111
|
} else if (t.textType === "themed") {
|
|
1111
1112
|
return /* @__PURE__ */ jsx2(Text, { style: styles?.em, children: t.text }, i + "em");
|