@kontextso/sdk-react-native 0.0.8-rc.7 → 0.0.8-rc.8

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
@@ -278,7 +278,7 @@ var log = new Logger();
278
278
  var log_default = log;
279
279
 
280
280
  // package.json
281
- var version = "0.0.8-rc.6";
281
+ var version = "0.0.8-rc.8";
282
282
 
283
283
  // src/hooks/useInitializeAds.tsx
284
284
  var SINGLE_INIT_TIMEOUT_BUDGET_MS = 3e3;
@@ -1116,23 +1116,24 @@ function MarkdownText({
1116
1116
  const styles = context?.styles?.markdownText;
1117
1117
  const linkClickHandler = (href) => {
1118
1118
  onLinkClick();
1119
- import_react_native2.Linking.openURL(href).catch(
1120
- (err) => log_default.warn("Failed to open URL:", err)
1121
- );
1119
+ import_react_native2.Linking.openURL(href).catch((err) => log_default.warn("Failed to open URL:", err));
1122
1120
  return false;
1123
1121
  };
1124
1122
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, { children: textParts.map((t, i) => {
1125
1123
  if (t.textType === "link") {
1126
1124
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1127
- import_react_native2.Text,
1125
+ import_react_native2.Pressable,
1128
1126
  {
1129
- style: styles?.link,
1130
1127
  onPress: () => {
1131
1128
  linkClickHandler(t.url);
1132
1129
  },
1133
- children: t.text
1134
- },
1135
- i + "link"
1130
+ onLongPress: () => {
1131
+ linkClickHandler(t.url);
1132
+ },
1133
+ style: ({ pressed }) => [{ opacity: pressed ? 0.8 : 1 }],
1134
+ hitSlop: { top: 20, bottom: 20, left: 10, right: 10 },
1135
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.Text, { style: styles?.link, children: t.text }, i + "link")
1136
+ }
1136
1137
  );
1137
1138
  } else if (t.textType === "themed") {
1138
1139
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.Text, { style: styles?.em, children: t.text }, i + "em");
package/dist/index.mjs CHANGED
@@ -252,7 +252,7 @@ var log = new Logger();
252
252
  var log_default = log;
253
253
 
254
254
  // package.json
255
- var version = "0.0.8-rc.6";
255
+ var version = "0.0.8-rc.8";
256
256
 
257
257
  // src/hooks/useInitializeAds.tsx
258
258
  var SINGLE_INIT_TIMEOUT_BUDGET_MS = 3e3;
@@ -1079,10 +1079,7 @@ function useAdViewed(ad) {
1079
1079
 
1080
1080
  // src/components/MarkdownText.tsx
1081
1081
  import { useContext as useContext2 } from "react";
1082
- import {
1083
- Linking,
1084
- Text
1085
- } from "react-native";
1082
+ import { Linking, Pressable, Text } from "react-native";
1086
1083
  import { Fragment, jsx as jsx2 } from "react/jsx-runtime";
1087
1084
  function MarkdownText({
1088
1085
  content,
@@ -1093,23 +1090,24 @@ function MarkdownText({
1093
1090
  const styles = context?.styles?.markdownText;
1094
1091
  const linkClickHandler = (href) => {
1095
1092
  onLinkClick();
1096
- Linking.openURL(href).catch(
1097
- (err) => log_default.warn("Failed to open URL:", err)
1098
- );
1093
+ Linking.openURL(href).catch((err) => log_default.warn("Failed to open URL:", err));
1099
1094
  return false;
1100
1095
  };
1101
1096
  return /* @__PURE__ */ jsx2(Fragment, { children: textParts.map((t, i) => {
1102
1097
  if (t.textType === "link") {
1103
1098
  return /* @__PURE__ */ jsx2(
1104
- Text,
1099
+ Pressable,
1105
1100
  {
1106
- style: styles?.link,
1107
1101
  onPress: () => {
1108
1102
  linkClickHandler(t.url);
1109
1103
  },
1110
- children: t.text
1111
- },
1112
- i + "link"
1104
+ onLongPress: () => {
1105
+ linkClickHandler(t.url);
1106
+ },
1107
+ style: ({ pressed }) => [{ opacity: pressed ? 0.8 : 1 }],
1108
+ hitSlop: { top: 20, bottom: 20, left: 10, right: 10 },
1109
+ children: /* @__PURE__ */ jsx2(Text, { style: styles?.link, children: t.text }, i + "link")
1110
+ }
1113
1111
  );
1114
1112
  } else if (t.textType === "themed") {
1115
1113
  return /* @__PURE__ */ jsx2(Text, { style: styles?.em, children: t.text }, i + "em");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kontextso/sdk-react-native",
3
- "version": "0.0.8-rc.7",
3
+ "version": "0.0.8-rc.8",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",