@apps-in-toss/framework 2.7.0 → 2.8.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.cjs +581 -369
- package/dist/index.d.cts +17 -15
- package/dist/index.d.ts +17 -15
- package/dist/index.js +459 -247
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -148,8 +148,8 @@ function useNavigationBarContext() {
|
|
|
148
148
|
|
|
149
149
|
// src/components/RNAppContainer.tsx
|
|
150
150
|
import { setIosSwipeGestureEnabled } from "@apps-in-toss/native-modules";
|
|
151
|
-
import { useEffect as
|
|
152
|
-
import { Platform as
|
|
151
|
+
import { useEffect as useEffect8 } from "react";
|
|
152
|
+
import { Platform as Platform2 } from "react-native";
|
|
153
153
|
|
|
154
154
|
// src/components/GameInitializer.tsx
|
|
155
155
|
import { isMinVersionSupported } from "@apps-in-toss/native-modules";
|
|
@@ -604,9 +604,6 @@ var overlayStyle = {
|
|
|
604
604
|
zIndex: Z_INDEX.PROFILE_OVERLAY
|
|
605
605
|
};
|
|
606
606
|
|
|
607
|
-
// src/components/NavigationBar/RNNavigationBar/Default.tsx
|
|
608
|
-
import { NavigationBackButton, NavigationLeft, TopNavigation } from "@toss/tds-react-native/private";
|
|
609
|
-
|
|
610
607
|
// src/components/NavigationBar/RNNavigationBar/hooks/useHardwareBackPress.ts
|
|
611
608
|
import { useEffect as useEffect4 } from "react";
|
|
612
609
|
import { BackHandler } from "react-native";
|
|
@@ -741,7 +738,7 @@ function useNavigationEvent() {
|
|
|
741
738
|
if (homeEvent.hasSubscriptions()) {
|
|
742
739
|
homeEvent.emit({});
|
|
743
740
|
} else {
|
|
744
|
-
navigation.navigate("/");
|
|
741
|
+
navigation.navigate("/", {}, { pop: true });
|
|
745
742
|
}
|
|
746
743
|
},
|
|
747
744
|
handleCloseButtonClick: () => {
|
|
@@ -1111,100 +1108,325 @@ function BottomSheetImpressionArea({ children }) {
|
|
|
1111
1108
|
return /* @__PURE__ */ jsx9(Fragment3, { children });
|
|
1112
1109
|
}
|
|
1113
1110
|
|
|
1114
|
-
// src/
|
|
1115
|
-
|
|
1116
|
-
|
|
1111
|
+
// src/components/NavigationBar/TopNavigation/TopNavigation.tsx
|
|
1112
|
+
import { useSafeAreaInsets } from "@granite-js/native/react-native-safe-area-context";
|
|
1113
|
+
import { useNavigation as useNavigation2 } from "@granite-js/react-native";
|
|
1114
|
+
import { colors } from "@toss/tds-react-native";
|
|
1115
|
+
import { useEffect as useEffect6 } from "react";
|
|
1116
|
+
import { View as View3 } from "react-native";
|
|
1117
|
+
import { Fragment as Fragment4, jsx as jsx10, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1118
|
+
function TopNavigation({ left, center, right }) {
|
|
1119
|
+
const insets = useSafeAreaInsets();
|
|
1120
|
+
const navigation = useNavigation2();
|
|
1121
|
+
useEffect6(() => {
|
|
1122
|
+
const { navigationBar } = getAppsInTossGlobals();
|
|
1123
|
+
const parsedNavigationBar = navigationBar ? safeParseNavigationBar(navigationBar) : null;
|
|
1124
|
+
const transparent = parsedNavigationBar?.transparentBackground ?? false;
|
|
1125
|
+
const theme = parsedNavigationBar?.theme ?? "light";
|
|
1126
|
+
navigation.setOptions({
|
|
1127
|
+
headerTransparent: transparent,
|
|
1128
|
+
header: () => /* @__PURE__ */ jsxs3(
|
|
1129
|
+
View3,
|
|
1130
|
+
{
|
|
1131
|
+
style: {
|
|
1132
|
+
width: "100%",
|
|
1133
|
+
backgroundColor: transparent ? void 0 : theme === "light" ? colors.lightThemeBackground : colors.darkThemeBackground
|
|
1134
|
+
},
|
|
1135
|
+
pointerEvents: "box-none",
|
|
1136
|
+
children: [
|
|
1137
|
+
/* @__PURE__ */ jsx10(View3, { style: { width: "100%", height: insets.top } }),
|
|
1138
|
+
/* @__PURE__ */ jsxs3(
|
|
1139
|
+
View3,
|
|
1140
|
+
{
|
|
1141
|
+
style: {
|
|
1142
|
+
width: "100%",
|
|
1143
|
+
height: 44,
|
|
1144
|
+
display: "flex",
|
|
1145
|
+
flexDirection: "row",
|
|
1146
|
+
alignItems: "center",
|
|
1147
|
+
paddingLeft: insets.left,
|
|
1148
|
+
paddingRight: insets.right
|
|
1149
|
+
},
|
|
1150
|
+
children: [
|
|
1151
|
+
/* @__PURE__ */ jsx10(View3, { children: left }),
|
|
1152
|
+
/* @__PURE__ */ jsx10(
|
|
1153
|
+
View3,
|
|
1154
|
+
{
|
|
1155
|
+
style: {
|
|
1156
|
+
flex: 1,
|
|
1157
|
+
display: "flex",
|
|
1158
|
+
flexDirection: "row",
|
|
1159
|
+
alignItems: "center"
|
|
1160
|
+
},
|
|
1161
|
+
children: center
|
|
1162
|
+
}
|
|
1163
|
+
),
|
|
1164
|
+
/* @__PURE__ */ jsx10(
|
|
1165
|
+
View3,
|
|
1166
|
+
{
|
|
1167
|
+
style: {
|
|
1168
|
+
flexDirection: "row",
|
|
1169
|
+
alignItems: "center"
|
|
1170
|
+
},
|
|
1171
|
+
children: right
|
|
1172
|
+
}
|
|
1173
|
+
)
|
|
1174
|
+
]
|
|
1175
|
+
}
|
|
1176
|
+
)
|
|
1177
|
+
]
|
|
1178
|
+
}
|
|
1179
|
+
)
|
|
1180
|
+
});
|
|
1181
|
+
}, [navigation, insets, left, center, right]);
|
|
1182
|
+
return /* @__PURE__ */ jsx10(Fragment4, {});
|
|
1183
|
+
}
|
|
1184
|
+
|
|
1185
|
+
// src/components/NavigationBar/TopNavigation/BackButton.tsx
|
|
1186
|
+
import { SvgXml } from "@granite-js/native/react-native-svg";
|
|
1187
|
+
import { TouchableOpacity, View as View4 } from "react-native";
|
|
1188
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
1189
|
+
function BackButton({ theme = "light", onPress, ...restProps }) {
|
|
1190
|
+
return /* @__PURE__ */ jsx11(
|
|
1191
|
+
TouchableOpacity,
|
|
1192
|
+
{
|
|
1193
|
+
hitSlop: { top: 10, right: 10, bottom: 10, left: 10 },
|
|
1194
|
+
style: {
|
|
1195
|
+
width: 24,
|
|
1196
|
+
height: 24,
|
|
1197
|
+
marginRight: 14
|
|
1198
|
+
},
|
|
1199
|
+
onPress,
|
|
1200
|
+
accessibilityRole: "button",
|
|
1201
|
+
accessibilityLabel: "\uB4A4\uB85C\uAC00\uAE30",
|
|
1202
|
+
...restProps,
|
|
1203
|
+
children: /* @__PURE__ */ jsx11(View4, { style: { width: 24, height: 24 }, children: /* @__PURE__ */ jsx11(
|
|
1204
|
+
SvgXml,
|
|
1205
|
+
{
|
|
1206
|
+
width: 24,
|
|
1207
|
+
height: 24,
|
|
1208
|
+
xml: BACK_BUTTON_XML.replace(/__COLOR__/g, theme === "light" ? "#191F28" : "#FFFFFF")
|
|
1209
|
+
}
|
|
1210
|
+
) })
|
|
1211
|
+
}
|
|
1212
|
+
);
|
|
1213
|
+
}
|
|
1214
|
+
var BACK_BUTTON_XML = `<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" viewBox="0 0 24 24"><path d="m20.8 20.7c-.3 0-.6-.1-.8-.4l-7.5-7.5c-.5-.5-.5-1.2 0-1.7l7.5-7.5c.5-.5 1.2-.5 1.7 0s.5 1.2 0 1.7l-6.8 6.7 6.7 6.7c.5.5.5 1.2 0 1.7-.2.2-.5.3-.8.3z" fill="__COLOR__"/></svg>`;
|
|
1215
|
+
|
|
1216
|
+
// src/components/NavigationBar/TopNavigation/HomeButton.tsx
|
|
1217
|
+
import { colors as colors2, Icon } from "@toss/tds-react-native";
|
|
1218
|
+
import { TouchableOpacity as TouchableOpacity2 } from "react-native";
|
|
1219
|
+
import { jsx as jsx12, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1220
|
+
function HomeButton({ theme = "light", onPress, children }) {
|
|
1221
|
+
return /* @__PURE__ */ jsxs4(
|
|
1222
|
+
TouchableOpacity2,
|
|
1223
|
+
{
|
|
1224
|
+
onPress,
|
|
1225
|
+
style: {
|
|
1226
|
+
flexDirection: "row",
|
|
1227
|
+
alignItems: "center",
|
|
1228
|
+
gap: 6,
|
|
1229
|
+
height: 34,
|
|
1230
|
+
paddingLeft: 10,
|
|
1231
|
+
paddingRight: 10,
|
|
1232
|
+
backgroundColor: theme === "light" ? colors2.greyOpacity50 : "rgba(0, 0, 1, 0.58)",
|
|
1233
|
+
borderRadius: 99
|
|
1234
|
+
},
|
|
1235
|
+
children: [
|
|
1236
|
+
children,
|
|
1237
|
+
/* @__PURE__ */ jsx12(Icon, { name: "icon-home-mono", size: 18 })
|
|
1238
|
+
]
|
|
1239
|
+
}
|
|
1240
|
+
);
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
// src/components/NavigationBar/TopNavigation/AppTitle.tsx
|
|
1244
|
+
import { Image } from "@granite-js/react-native";
|
|
1245
|
+
import { Text, View as View5 } from "react-native";
|
|
1246
|
+
import { jsx as jsx13, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1247
|
+
function AppTitle({ title, iconUrl, theme = "light" }) {
|
|
1248
|
+
return /* @__PURE__ */ jsxs5(
|
|
1249
|
+
View5,
|
|
1250
|
+
{
|
|
1251
|
+
style: {
|
|
1252
|
+
flexDirection: "row",
|
|
1253
|
+
alignItems: "center",
|
|
1254
|
+
gap: 6
|
|
1255
|
+
},
|
|
1256
|
+
children: [
|
|
1257
|
+
iconUrl != null && iconUrl !== "" && /* @__PURE__ */ jsx13(
|
|
1258
|
+
Image,
|
|
1259
|
+
{
|
|
1260
|
+
source: { uri: iconUrl },
|
|
1261
|
+
style: {
|
|
1262
|
+
width: 18,
|
|
1263
|
+
height: 18,
|
|
1264
|
+
borderRadius: 6,
|
|
1265
|
+
overflow: "hidden"
|
|
1266
|
+
}
|
|
1267
|
+
}
|
|
1268
|
+
),
|
|
1269
|
+
/* @__PURE__ */ jsx13(
|
|
1270
|
+
Text,
|
|
1271
|
+
{
|
|
1272
|
+
numberOfLines: 1,
|
|
1273
|
+
ellipsizeMode: "tail",
|
|
1274
|
+
style: {
|
|
1275
|
+
color: theme === "light" ? "#191F28" : "#FFFFFF",
|
|
1276
|
+
fontSize: 16,
|
|
1277
|
+
fontWeight: "600"
|
|
1278
|
+
},
|
|
1279
|
+
children: title
|
|
1280
|
+
}
|
|
1281
|
+
)
|
|
1282
|
+
]
|
|
1283
|
+
}
|
|
1284
|
+
);
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1287
|
+
// src/components/NavigationBar/TopNavigation/Menu.tsx
|
|
1288
|
+
import { colors as colors3, Icon as Icon2, tdsEvent } from "@toss/tds-react-native";
|
|
1289
|
+
import { TouchableOpacity as TouchableOpacity3, View as View6 } from "react-native";
|
|
1290
|
+
import { jsx as jsx14, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1291
|
+
function Menu2({ theme = "light", accessoryButton, onPressDots, onLongPressDots, onPressClose }) {
|
|
1292
|
+
const backgroundColor = theme === "light" ? colors3.greyOpacity50 : "rgba(0, 0, 1, 0.58)";
|
|
1293
|
+
const iconColor = theme === "light" ? colors3.greyOpacity600 : "rgba(253, 253, 255, 0.75)";
|
|
1294
|
+
return /* @__PURE__ */ jsxs6(View6, { style: { flexDirection: "row", alignItems: "center", gap: 4 }, children: [
|
|
1295
|
+
accessoryButton && /* @__PURE__ */ jsx14(
|
|
1296
|
+
View6,
|
|
1297
|
+
{
|
|
1298
|
+
style: {
|
|
1299
|
+
borderRadius: 99,
|
|
1300
|
+
overflow: "hidden"
|
|
1301
|
+
},
|
|
1302
|
+
children: /* @__PURE__ */ jsx14(
|
|
1303
|
+
TouchableOpacity3,
|
|
1304
|
+
{
|
|
1305
|
+
style: {
|
|
1306
|
+
paddingVertical: 7,
|
|
1307
|
+
paddingHorizontal: 12,
|
|
1308
|
+
backgroundColor
|
|
1309
|
+
},
|
|
1310
|
+
onPress: () => {
|
|
1311
|
+
tdsEvent.emit("navigationAccessoryEvent", { id: accessoryButton.id });
|
|
1312
|
+
accessoryButton.onPress?.();
|
|
1313
|
+
},
|
|
1314
|
+
disabled: accessoryButton.disabled,
|
|
1315
|
+
children: /* @__PURE__ */ jsx14(
|
|
1316
|
+
Icon2,
|
|
1317
|
+
{
|
|
1318
|
+
name: accessoryButton.icon.name ?? "",
|
|
1319
|
+
accessibilityLabel: accessoryButton.title,
|
|
1320
|
+
color: iconColor,
|
|
1321
|
+
size: 20
|
|
1322
|
+
}
|
|
1323
|
+
)
|
|
1324
|
+
}
|
|
1325
|
+
)
|
|
1326
|
+
}
|
|
1327
|
+
),
|
|
1328
|
+
/* @__PURE__ */ jsx14(View6, { style: { borderRadius: 99, overflow: "hidden", marginRight: 12 }, children: /* @__PURE__ */ jsxs6(
|
|
1329
|
+
View6,
|
|
1330
|
+
{
|
|
1331
|
+
style: {
|
|
1332
|
+
flexDirection: "row",
|
|
1333
|
+
justifyContent: "center",
|
|
1334
|
+
alignItems: "center",
|
|
1335
|
+
gap: 12,
|
|
1336
|
+
height: 34,
|
|
1337
|
+
paddingHorizontal: 12,
|
|
1338
|
+
backgroundColor
|
|
1339
|
+
},
|
|
1340
|
+
children: [
|
|
1341
|
+
/* @__PURE__ */ jsx14(TouchableOpacity3, { onPress: onPressDots, onLongPress: onLongPressDots, children: /* @__PURE__ */ jsx14(Icon2, { name: "icon-dots-mono", accessibilityLabel: "\uB354\uBCF4\uAE30", color: iconColor, size: 20 }) }),
|
|
1342
|
+
/* @__PURE__ */ jsx14(
|
|
1343
|
+
View6,
|
|
1344
|
+
{
|
|
1345
|
+
style: {
|
|
1346
|
+
width: 1,
|
|
1347
|
+
height: 16,
|
|
1348
|
+
backgroundColor: theme === "light" ? colors3.greyOpacity200 : "rgba(222, 222, 255, 0.19)"
|
|
1349
|
+
}
|
|
1350
|
+
}
|
|
1351
|
+
),
|
|
1352
|
+
/* @__PURE__ */ jsx14(TouchableOpacity3, { onPress: onPressClose, children: /* @__PURE__ */ jsx14(Icon2, { name: "icon-appsintoss-close-mono", accessibilityLabel: "\uB2EB\uAE30", color: iconColor, size: 20 }) })
|
|
1353
|
+
]
|
|
1354
|
+
}
|
|
1355
|
+
) })
|
|
1356
|
+
] });
|
|
1117
1357
|
}
|
|
1118
1358
|
|
|
1119
1359
|
// src/components/NavigationBar/common/NavigationBarImpressionArea.tsx
|
|
1120
|
-
import { useEffect as
|
|
1121
|
-
import { Fragment as
|
|
1360
|
+
import { useEffect as useEffect7, useRef as useRef2 } from "react";
|
|
1361
|
+
import { Fragment as Fragment5, jsx as jsx15 } from "react/jsx-runtime";
|
|
1122
1362
|
function NavigationBarImpressionArea({
|
|
1123
1363
|
children,
|
|
1124
1364
|
withHomeButton
|
|
1125
1365
|
}) {
|
|
1126
1366
|
const hasLogged = useRef2(false);
|
|
1127
1367
|
const logging = useNavigationBarLogging();
|
|
1128
|
-
|
|
1368
|
+
useEffect7(() => {
|
|
1129
1369
|
if (hasLogged.current === false) {
|
|
1130
1370
|
logging.navBarImpression({ home_icon_yn: withHomeButton ? "Y" : "N" });
|
|
1131
1371
|
hasLogged.current = true;
|
|
1132
1372
|
}
|
|
1133
1373
|
}, [logging, withHomeButton]);
|
|
1134
|
-
return /* @__PURE__ */
|
|
1374
|
+
return /* @__PURE__ */ jsx15(Fragment5, { children });
|
|
1135
1375
|
}
|
|
1136
1376
|
|
|
1137
1377
|
// src/components/NavigationBar/RNNavigationBar/Default.tsx
|
|
1138
|
-
import { jsx as
|
|
1378
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
1139
1379
|
function DefaultNavigationBar() {
|
|
1140
1380
|
const globals = getAppsInTossGlobals();
|
|
1141
1381
|
const { open: openMoreButtonBottomSheet } = useMoreButtonBottomSheet();
|
|
1142
1382
|
const parsedNavigationBar = globals.navigationBar != null ? safeParseNavigationBar(globals.navigationBar) : null;
|
|
1143
1383
|
const withHomeButton = parsedNavigationBar?.withHomeButton ?? false;
|
|
1144
1384
|
const withBackButton = parsedNavigationBar?.withBackButton ?? true;
|
|
1385
|
+
const theme = parsedNavigationBar?.theme ?? "light";
|
|
1145
1386
|
const { navigationRightButton } = useNavigationBarContext();
|
|
1146
1387
|
const navigationEvent = useNavigationEvent();
|
|
1147
1388
|
useHardwareBackPress(navigationEvent.handleBack);
|
|
1148
|
-
return /* @__PURE__ */
|
|
1389
|
+
return /* @__PURE__ */ jsx16(NavigationBarImpressionArea, { withHomeButton, children: /* @__PURE__ */ jsx16(
|
|
1149
1390
|
TopNavigation,
|
|
1150
1391
|
{
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1392
|
+
left: withBackButton ? /* @__PURE__ */ jsx16(BackButton, { theme, onPress: navigationEvent.handleBack }) : null,
|
|
1393
|
+
center: withHomeButton ? /* @__PURE__ */ jsx16(HomeButton, { theme, onPress: navigationEvent.handleHomeButtonClick, children: /* @__PURE__ */ jsx16(AppTitle, { theme, title: globals.brandDisplayName, iconUrl: globals.brandIcon }) }) : /* @__PURE__ */ jsx16(AppTitle, { theme, title: globals.brandDisplayName, iconUrl: globals.brandIcon }),
|
|
1394
|
+
right: /* @__PURE__ */ jsx16(
|
|
1395
|
+
Menu2,
|
|
1396
|
+
{
|
|
1397
|
+
theme,
|
|
1398
|
+
accessoryButton: navigationRightButton,
|
|
1399
|
+
onPressDots: openMoreButtonBottomSheet,
|
|
1400
|
+
onPressClose: navigationEvent.handleCloseButtonClick
|
|
1401
|
+
}
|
|
1402
|
+
)
|
|
1161
1403
|
}
|
|
1162
1404
|
) });
|
|
1163
1405
|
}
|
|
1164
1406
|
|
|
1165
1407
|
// src/components/NavigationBar/RNNavigationBar/Game.tsx
|
|
1166
|
-
import {
|
|
1167
|
-
import { PageNavbar } from "@toss/tds-react-native";
|
|
1168
|
-
import { NavigationRightContent, useSafeAreaTop } from "@toss/tds-react-native/private";
|
|
1169
|
-
import { Platform as Platform2, View as View3 } from "react-native";
|
|
1170
|
-
import { Fragment as Fragment5, jsx as jsx12, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1408
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1171
1409
|
function GameNavigationBar() {
|
|
1172
|
-
const safeAreaTop = useSafeAreaTop();
|
|
1173
1410
|
const { open: openMoreButtonBottomSheet } = useMoreButtonBottomSheet();
|
|
1174
1411
|
const navigationEvent = useNavigationEvent();
|
|
1175
1412
|
const { navigationRightButton } = useNavigationBarContext();
|
|
1176
|
-
const {
|
|
1413
|
+
const { navigationBar } = getAppsInTossGlobals();
|
|
1414
|
+
const parsedNavigationBar = navigationBar ? safeParseNavigationBar(navigationBar) : null;
|
|
1177
1415
|
useHardwareBackPress(navigationEvent.handleBack);
|
|
1178
|
-
return /* @__PURE__ */
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
marginTop: safeAreaTop,
|
|
1193
|
-
paddingRight: safeAreaRight + 10
|
|
1194
|
-
},
|
|
1195
|
-
pointerEvents: "box-none",
|
|
1196
|
-
children: /* @__PURE__ */ jsx12(
|
|
1197
|
-
NavigationRightContent,
|
|
1198
|
-
{
|
|
1199
|
-
fixedRightButton: navigationRightButton,
|
|
1200
|
-
onPressDots: openMoreButtonBottomSheet,
|
|
1201
|
-
onPressClose: navigationEvent.handleCloseButtonClick,
|
|
1202
|
-
theme: "dark"
|
|
1203
|
-
}
|
|
1204
|
-
)
|
|
1205
|
-
}
|
|
1206
|
-
)
|
|
1207
|
-
] });
|
|
1416
|
+
return /* @__PURE__ */ jsx17(
|
|
1417
|
+
TopNavigation,
|
|
1418
|
+
{
|
|
1419
|
+
right: /* @__PURE__ */ jsx17(
|
|
1420
|
+
Menu2,
|
|
1421
|
+
{
|
|
1422
|
+
theme: parsedNavigationBar?.theme ?? "dark",
|
|
1423
|
+
accessoryButton: navigationRightButton,
|
|
1424
|
+
onPressDots: openMoreButtonBottomSheet,
|
|
1425
|
+
onPressClose: navigationEvent.handleCloseButtonClick
|
|
1426
|
+
}
|
|
1427
|
+
)
|
|
1428
|
+
}
|
|
1429
|
+
);
|
|
1208
1430
|
}
|
|
1209
1431
|
|
|
1210
1432
|
// src/components/NavigationBar/RNNavigationBar/index.tsx
|
|
@@ -1223,20 +1445,20 @@ import * as constant_bridges_star from "@apps-in-toss/native-modules/constant-br
|
|
|
1223
1445
|
import * as event_bridges_star from "@apps-in-toss/native-modules/event-bridges";
|
|
1224
1446
|
|
|
1225
1447
|
// src/components/RNAppContainer.tsx
|
|
1226
|
-
import { Fragment as Fragment6, jsx as
|
|
1448
|
+
import { Fragment as Fragment6, jsx as jsx18, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1227
1449
|
function RNAppContainer({ children }) {
|
|
1228
1450
|
const global2 = getAppsInTossGlobals();
|
|
1229
1451
|
switch (global2.appType) {
|
|
1230
1452
|
case "game":
|
|
1231
|
-
return /* @__PURE__ */
|
|
1453
|
+
return /* @__PURE__ */ jsx18(GameAppContainer, { children });
|
|
1232
1454
|
case "general":
|
|
1233
1455
|
default:
|
|
1234
|
-
return /* @__PURE__ */
|
|
1456
|
+
return /* @__PURE__ */ jsx18(GeneralAppContainer, { children });
|
|
1235
1457
|
}
|
|
1236
1458
|
}
|
|
1237
1459
|
function GameAppContainer({ children }) {
|
|
1238
|
-
|
|
1239
|
-
if (
|
|
1460
|
+
useEffect8(() => {
|
|
1461
|
+
if (Platform2.OS === "ios") {
|
|
1240
1462
|
setIosSwipeGestureEnabled({ isEnabled: false });
|
|
1241
1463
|
return () => {
|
|
1242
1464
|
setIosSwipeGestureEnabled({ isEnabled: true });
|
|
@@ -1244,33 +1466,33 @@ function GameAppContainer({ children }) {
|
|
|
1244
1466
|
}
|
|
1245
1467
|
return;
|
|
1246
1468
|
}, []);
|
|
1247
|
-
return /* @__PURE__ */
|
|
1248
|
-
/* @__PURE__ */
|
|
1249
|
-
(0, bridge_entry_exports.getOperationalEnvironment)() === "toss" ? /* @__PURE__ */
|
|
1469
|
+
return /* @__PURE__ */ jsxs7(Fragment6, { children: [
|
|
1470
|
+
/* @__PURE__ */ jsx18(RNNavigationBar.Game, {}),
|
|
1471
|
+
(0, bridge_entry_exports.getOperationalEnvironment)() === "toss" ? /* @__PURE__ */ jsx18(GameInitializer, { children }) : children
|
|
1250
1472
|
] });
|
|
1251
1473
|
}
|
|
1252
1474
|
function GeneralAppContainer({ children }) {
|
|
1253
|
-
return /* @__PURE__ */
|
|
1254
|
-
/* @__PURE__ */
|
|
1475
|
+
return /* @__PURE__ */ jsxs7(Fragment6, { children: [
|
|
1476
|
+
/* @__PURE__ */ jsx18(RNNavigationBar.Default, {}),
|
|
1255
1477
|
children
|
|
1256
1478
|
] });
|
|
1257
1479
|
}
|
|
1258
1480
|
|
|
1259
1481
|
// src/core/registerApp.tsx
|
|
1260
|
-
import { Fragment as Fragment7, jsx as
|
|
1482
|
+
import { Fragment as Fragment7, jsx as jsx19, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1261
1483
|
function AppsInTossContainer(Container, { children, ...initialProps }) {
|
|
1262
1484
|
if (!isMinVersionSupported3({
|
|
1263
1485
|
android: "5.220.0",
|
|
1264
1486
|
ios: "5.221.0"
|
|
1265
1487
|
})) {
|
|
1266
|
-
return /* @__PURE__ */
|
|
1267
|
-
/* @__PURE__ */
|
|
1268
|
-
/* @__PURE__ */
|
|
1488
|
+
return /* @__PURE__ */ jsxs8(Fragment7, { children: [
|
|
1489
|
+
/* @__PURE__ */ jsx19(AppEvent.System, { ...initialProps }),
|
|
1490
|
+
/* @__PURE__ */ jsx19(AppUpdate, {})
|
|
1269
1491
|
] });
|
|
1270
1492
|
}
|
|
1271
|
-
return /* @__PURE__ */
|
|
1272
|
-
/* @__PURE__ */
|
|
1273
|
-
/* @__PURE__ */
|
|
1493
|
+
return /* @__PURE__ */ jsxs8(Fragment7, { children: [
|
|
1494
|
+
/* @__PURE__ */ jsx19(AppEvent.System, { ...initialProps }),
|
|
1495
|
+
/* @__PURE__ */ jsx19(Container, { ...initialProps, children: /* @__PURE__ */ jsx19(TDSProvider, { colorPreference: "light", token: { color: { primary: getAppsInTossGlobals().brandPrimaryColor } }, children }) })
|
|
1274
1496
|
] });
|
|
1275
1497
|
}
|
|
1276
1498
|
function registerApp(container, { context, analytics }) {
|
|
@@ -1289,7 +1511,8 @@ function registerApp(container, { context, analytics }) {
|
|
|
1289
1511
|
router: {
|
|
1290
1512
|
screenContainer: AppsInTossScreenContainer,
|
|
1291
1513
|
defaultScreenOption: {
|
|
1292
|
-
statusBarStyle: "dark"
|
|
1514
|
+
statusBarStyle: "dark",
|
|
1515
|
+
header: () => null
|
|
1293
1516
|
}
|
|
1294
1517
|
}
|
|
1295
1518
|
});
|
|
@@ -1299,7 +1522,7 @@ function registerApp(container, { context, analytics }) {
|
|
|
1299
1522
|
}
|
|
1300
1523
|
function AppsInTossScreenContainer({ children }) {
|
|
1301
1524
|
const isRNApp = getAppsInTossGlobals().webViewType == null;
|
|
1302
|
-
return /* @__PURE__ */
|
|
1525
|
+
return /* @__PURE__ */ jsx19(NavigationBarContextProvider, { children: isRNApp ? /* @__PURE__ */ jsx19(
|
|
1303
1526
|
Analytics.Screen,
|
|
1304
1527
|
{
|
|
1305
1528
|
onLog: (params) => sendLog(
|
|
@@ -1315,7 +1538,7 @@ function AppsInTossScreenContainer({ children }) {
|
|
|
1315
1538
|
},
|
|
1316
1539
|
{ pipelines: ["core"] }
|
|
1317
1540
|
),
|
|
1318
|
-
children: /* @__PURE__ */
|
|
1541
|
+
children: /* @__PURE__ */ jsx19(RNAppContainer, { children })
|
|
1319
1542
|
}
|
|
1320
1543
|
) : children });
|
|
1321
1544
|
}
|
|
@@ -1352,79 +1575,57 @@ import * as appsInTossAsyncBridges from "@apps-in-toss/native-modules/async-brid
|
|
|
1352
1575
|
import * as appsInTossConstantBridges from "@apps-in-toss/native-modules/constant-bridges";
|
|
1353
1576
|
import * as appsInTossEventBridges from "@apps-in-toss/native-modules/event-bridges";
|
|
1354
1577
|
import { afterDocumentLoad, beforeDocumentLoad } from "@apps-in-toss/user-scripts";
|
|
1355
|
-
import { useSafeAreaInsets as
|
|
1578
|
+
import { useSafeAreaInsets as useSafeAreaInsets3 } from "@granite-js/native/react-native-safe-area-context";
|
|
1356
1579
|
import { getSchemeUri as getSchemeUri9 } from "@granite-js/react-native";
|
|
1357
|
-
import { ExternalWebViewScreen, tdsEvent } from "@toss/tds-react-native";
|
|
1358
|
-
import {
|
|
1359
|
-
import {
|
|
1360
|
-
import { BackHandler as BackHandler2, Linking, Platform as Platform6 } from "react-native";
|
|
1580
|
+
import { ExternalWebViewScreen, tdsEvent as tdsEvent2 } from "@toss/tds-react-native";
|
|
1581
|
+
import { useEffect as useEffect13, useMemo as useMemo6, useRef as useRef5, useState as useState6 } from "react";
|
|
1582
|
+
import { BackHandler as BackHandler2, Linking, Platform as Platform4 } from "react-native";
|
|
1361
1583
|
|
|
1362
1584
|
// src/components/GameWebView.tsx
|
|
1363
1585
|
import { setIosSwipeGestureEnabled as setIosSwipeGestureEnabled3, getOperationalEnvironment as getOperationalEnvironment5 } from "@apps-in-toss/native-modules";
|
|
1364
1586
|
import {
|
|
1365
1587
|
WebView as PlainWebView
|
|
1366
1588
|
} from "@granite-js/native/react-native-webview";
|
|
1367
|
-
import { forwardRef, useEffect as
|
|
1368
|
-
import { Platform as
|
|
1589
|
+
import { forwardRef, useEffect as useEffect9 } from "react";
|
|
1590
|
+
import { Platform as Platform3 } from "react-native";
|
|
1369
1591
|
|
|
1370
1592
|
// src/components/NavigationBar/GameWebviewNavigationBar.tsx
|
|
1371
|
-
import { useSafeAreaInsets as useSafeAreaInsets2 } from "@granite-js/native/react-native-safe-area-context";
|
|
1372
1593
|
import { closeView as closeView4 } from "@granite-js/react-native";
|
|
1373
|
-
import {
|
|
1374
|
-
import { NavigationRightContent as NavigationRightContent2, useSafeAreaTop as useSafeAreaTop2 } from "@toss/tds-react-native/private";
|
|
1594
|
+
import { useDialog as useDialog4 } from "@toss/tds-react-native";
|
|
1375
1595
|
import { useCallback as useCallback6 } from "react";
|
|
1376
|
-
import {
|
|
1377
|
-
import { Fragment as Fragment8, jsx as jsx15, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1596
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
1378
1597
|
function GameWebviewNavigationBar() {
|
|
1379
|
-
const safeAreaTop = useSafeAreaTop2();
|
|
1380
1598
|
const { openConfirm } = useDialog4();
|
|
1381
1599
|
const logging = useNavigationBarLogging();
|
|
1382
1600
|
const { open: openMoreButtonBottomSheet } = useMoreButtonBottomSheet();
|
|
1383
1601
|
const { navigationRightButton } = useNavigationBarContext();
|
|
1384
|
-
const {
|
|
1602
|
+
const { navigationBar } = getAppsInTossGlobals();
|
|
1603
|
+
const parsedNavigationBar = navigationBar ? safeParseNavigationBar(navigationBar) : null;
|
|
1385
1604
|
const handleGameWebviewClose = useCallback6(async () => {
|
|
1386
1605
|
logging.closeButtonClick();
|
|
1387
1606
|
closeView4();
|
|
1388
1607
|
}, [logging, openConfirm]);
|
|
1389
|
-
return /* @__PURE__ */
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
marginTop: safeAreaTop,
|
|
1404
|
-
paddingRight: safeAreaRight + 10
|
|
1405
|
-
},
|
|
1406
|
-
pointerEvents: "box-none",
|
|
1407
|
-
children: /* @__PURE__ */ jsx15(
|
|
1408
|
-
NavigationRightContent2,
|
|
1409
|
-
{
|
|
1410
|
-
fixedRightButton: navigationRightButton,
|
|
1411
|
-
onPressDots: openMoreButtonBottomSheet,
|
|
1412
|
-
onPressClose: () => {
|
|
1413
|
-
handleGameWebviewClose();
|
|
1414
|
-
},
|
|
1415
|
-
theme: "dark"
|
|
1416
|
-
}
|
|
1417
|
-
)
|
|
1418
|
-
}
|
|
1419
|
-
)
|
|
1420
|
-
] });
|
|
1608
|
+
return /* @__PURE__ */ jsx20(
|
|
1609
|
+
TopNavigation,
|
|
1610
|
+
{
|
|
1611
|
+
right: /* @__PURE__ */ jsx20(
|
|
1612
|
+
Menu2,
|
|
1613
|
+
{
|
|
1614
|
+
theme: parsedNavigationBar?.theme ?? "dark",
|
|
1615
|
+
accessoryButton: navigationRightButton,
|
|
1616
|
+
onPressDots: openMoreButtonBottomSheet,
|
|
1617
|
+
onPressClose: handleGameWebviewClose
|
|
1618
|
+
}
|
|
1619
|
+
)
|
|
1620
|
+
}
|
|
1621
|
+
);
|
|
1421
1622
|
}
|
|
1422
1623
|
|
|
1423
1624
|
// src/components/GameWebView.tsx
|
|
1424
|
-
import { Fragment as
|
|
1625
|
+
import { Fragment as Fragment8, jsx as jsx21, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1425
1626
|
var GameWebView = forwardRef(function GameWebView2(props, ref) {
|
|
1426
|
-
|
|
1427
|
-
if (
|
|
1627
|
+
useEffect9(() => {
|
|
1628
|
+
if (Platform3.OS === "ios") {
|
|
1428
1629
|
setIosSwipeGestureEnabled3({ isEnabled: false });
|
|
1429
1630
|
return () => {
|
|
1430
1631
|
setIosSwipeGestureEnabled3({ isEnabled: true });
|
|
@@ -1432,9 +1633,9 @@ var GameWebView = forwardRef(function GameWebView2(props, ref) {
|
|
|
1432
1633
|
}
|
|
1433
1634
|
return;
|
|
1434
1635
|
}, []);
|
|
1435
|
-
return /* @__PURE__ */
|
|
1436
|
-
/* @__PURE__ */
|
|
1437
|
-
getOperationalEnvironment5() === "toss" ? /* @__PURE__ */
|
|
1636
|
+
return /* @__PURE__ */ jsxs9(Fragment8, { children: [
|
|
1637
|
+
/* @__PURE__ */ jsx21(GameWebviewNavigationBar, {}),
|
|
1638
|
+
getOperationalEnvironment5() === "toss" ? /* @__PURE__ */ jsx21(GameInitializer, { children: /* @__PURE__ */ jsx21(PlainWebView, { ref, ...props }) }) : /* @__PURE__ */ jsx21(PlainWebView, { ref, ...props })
|
|
1438
1639
|
] });
|
|
1439
1640
|
});
|
|
1440
1641
|
|
|
@@ -1446,9 +1647,8 @@ import { forwardRef as forwardRef2 } from "react";
|
|
|
1446
1647
|
|
|
1447
1648
|
// src/components/NavigationBar/PartnerWebviewNavigationBar.tsx
|
|
1448
1649
|
import { closeView as closeView5 } from "@granite-js/react-native";
|
|
1449
|
-
import { NavigationBackButton as NavigationBackButton2, NavigationLeft as NavigationLeft2, TopNavigation as TopNavigation2 } from "@toss/tds-react-native/private";
|
|
1450
1650
|
import { useCallback as useCallback7 } from "react";
|
|
1451
|
-
import { jsx as
|
|
1651
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
1452
1652
|
function PartnerWebviewNavigationBar({ onBackButtonClick, onHomeButtonClick }) {
|
|
1453
1653
|
const globals = getAppsInTossGlobals();
|
|
1454
1654
|
const logging = useNavigationBarLogging();
|
|
@@ -1456,34 +1656,36 @@ function PartnerWebviewNavigationBar({ onBackButtonClick, onHomeButtonClick }) {
|
|
|
1456
1656
|
const parsedNavigationBar = globals.navigationBar != null ? safeParseNavigationBar(globals.navigationBar) : null;
|
|
1457
1657
|
const withHomeButton = parsedNavigationBar?.withHomeButton ?? false;
|
|
1458
1658
|
const withBackButton = parsedNavigationBar?.withBackButton ?? true;
|
|
1659
|
+
const theme = parsedNavigationBar?.theme ?? "light";
|
|
1459
1660
|
const { navigationRightButton } = useNavigationBarContext();
|
|
1460
1661
|
const handleClose = useCallback7(async () => {
|
|
1461
1662
|
logging.closeButtonClick();
|
|
1462
1663
|
closeView5();
|
|
1463
1664
|
}, [logging]);
|
|
1464
|
-
return /* @__PURE__ */
|
|
1465
|
-
|
|
1665
|
+
return /* @__PURE__ */ jsx22(NavigationBarImpressionArea, { withHomeButton, children: /* @__PURE__ */ jsx22(
|
|
1666
|
+
TopNavigation,
|
|
1466
1667
|
{
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1668
|
+
left: withBackButton ? /* @__PURE__ */ jsx22(BackButton, { theme, onPress: onBackButtonClick }) : null,
|
|
1669
|
+
center: withHomeButton ? /* @__PURE__ */ jsx22(HomeButton, { theme, onPress: onHomeButtonClick, children: /* @__PURE__ */ jsx22(AppTitle, { theme, title: globals.brandDisplayName, iconUrl: globals.brandIcon }) }) : /* @__PURE__ */ jsx22(AppTitle, { theme, title: globals.brandDisplayName, iconUrl: globals.brandIcon }),
|
|
1670
|
+
right: /* @__PURE__ */ jsx22(
|
|
1671
|
+
Menu2,
|
|
1672
|
+
{
|
|
1673
|
+
theme,
|
|
1674
|
+
accessoryButton: navigationRightButton,
|
|
1675
|
+
onPressDots: openMoreButtonBottomSheet,
|
|
1676
|
+
onPressClose: handleClose
|
|
1677
|
+
}
|
|
1678
|
+
)
|
|
1477
1679
|
}
|
|
1478
1680
|
) });
|
|
1479
1681
|
}
|
|
1480
1682
|
|
|
1481
1683
|
// src/components/PartnerWebView.tsx
|
|
1482
|
-
import { Fragment as
|
|
1684
|
+
import { Fragment as Fragment9, jsx as jsx23, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1483
1685
|
var PartnerWebView = forwardRef2(function PartnerWebViewScreen({ onBackButtonClick, onHomeButtonClick, ...webViewProps }, ref) {
|
|
1484
|
-
return /* @__PURE__ */
|
|
1485
|
-
/* @__PURE__ */
|
|
1486
|
-
/* @__PURE__ */
|
|
1686
|
+
return /* @__PURE__ */ jsxs10(Fragment9, { children: [
|
|
1687
|
+
/* @__PURE__ */ jsx23(PartnerWebviewNavigationBar, { onBackButtonClick, onHomeButtonClick }),
|
|
1688
|
+
/* @__PURE__ */ jsx23(PlainWebView2, { ref, ...webViewProps, style: { flex: 1 } })
|
|
1487
1689
|
] });
|
|
1488
1690
|
});
|
|
1489
1691
|
|
|
@@ -1548,9 +1750,16 @@ function fetchTossAd(params) {
|
|
|
1548
1750
|
params.onError(createInvalidAdGroupIdError());
|
|
1549
1751
|
return noop;
|
|
1550
1752
|
}
|
|
1753
|
+
const wireHeaders = options.headers;
|
|
1551
1754
|
const unregisterCallbacks = INTERNAL__appBridgeHandler3.invokeAppBridgeMethod(
|
|
1552
1755
|
"fetchTossAd",
|
|
1553
|
-
{
|
|
1756
|
+
{
|
|
1757
|
+
spaceUnitId: adGroupId,
|
|
1758
|
+
sessionId,
|
|
1759
|
+
sdkId: options.sdkId,
|
|
1760
|
+
availableStyleIds: options.availableStyleIds,
|
|
1761
|
+
...wireHeaders ? { headers: wireHeaders } : {}
|
|
1762
|
+
},
|
|
1554
1763
|
{
|
|
1555
1764
|
onSuccess: (response) => {
|
|
1556
1765
|
onEvent(response);
|
|
@@ -1667,8 +1876,11 @@ function generateLoadFullScreenAd(sdkId) {
|
|
|
1667
1876
|
}
|
|
1668
1877
|
};
|
|
1669
1878
|
if (!integratedAdIsSupported()) {
|
|
1879
|
+
const fallbackOptions = { ...normalizedParams.options };
|
|
1880
|
+
delete fallbackOptions.headers;
|
|
1670
1881
|
return GoogleAdMob.loadAppsInTossAdMob({
|
|
1671
1882
|
...normalizedParams,
|
|
1883
|
+
options: fallbackOptions,
|
|
1672
1884
|
onEvent: (event) => {
|
|
1673
1885
|
if (event.type === "loaded") {
|
|
1674
1886
|
const requestId = generateRequestId();
|
|
@@ -1705,9 +1917,16 @@ function generateLoadFullScreenAd(sdkId) {
|
|
|
1705
1917
|
const { onEvent, onError, options } = normalizedParams;
|
|
1706
1918
|
const { adGroupId } = options;
|
|
1707
1919
|
const referrer = getReferrer();
|
|
1920
|
+
const wireHeaders = options.headers;
|
|
1708
1921
|
const unregisterCallbacks = INTERNAL__appBridgeHandler4.invokeAppBridgeMethod(
|
|
1709
1922
|
"loadTossAdOrAdmob",
|
|
1710
|
-
{
|
|
1923
|
+
{
|
|
1924
|
+
spaceUnitId: adGroupId,
|
|
1925
|
+
referrer,
|
|
1926
|
+
sessionId,
|
|
1927
|
+
sdkId,
|
|
1928
|
+
...wireHeaders ? { headers: wireHeaders } : {}
|
|
1929
|
+
},
|
|
1711
1930
|
{
|
|
1712
1931
|
onSuccess: () => {
|
|
1713
1932
|
onEvent({ type: "loaded" });
|
|
@@ -1892,7 +2111,7 @@ async function tossAdEventLog(params) {
|
|
|
1892
2111
|
}
|
|
1893
2112
|
|
|
1894
2113
|
// src/bridge-handler/useBridgeHandler.tsx
|
|
1895
|
-
import { useCallback as useCallback8, useEffect as
|
|
2114
|
+
import { useCallback as useCallback8, useEffect as useEffect10, useMemo as useMemo3, useRef as useRef3 } from "react";
|
|
1896
2115
|
function serializeError(error) {
|
|
1897
2116
|
return JSON.stringify(error, (_, value) => {
|
|
1898
2117
|
if (value instanceof Error) {
|
|
@@ -1957,7 +2176,7 @@ function useBridgeHandler({
|
|
|
1957
2176
|
)};`,
|
|
1958
2177
|
[constantHandlerMap]
|
|
1959
2178
|
);
|
|
1960
|
-
|
|
2179
|
+
useEffect10(() => {
|
|
1961
2180
|
ref.current?.injectJavaScript(injectedJavaScript);
|
|
1962
2181
|
}, [injectedJavaScript]);
|
|
1963
2182
|
const createHandleOnEvent = (functionName, eventId) => (response) => {
|
|
@@ -2030,14 +2249,14 @@ function parseNativeEventData(data) {
|
|
|
2030
2249
|
}
|
|
2031
2250
|
|
|
2032
2251
|
// src/core/hooks/useSafeAreaInsetsEvent.tsx
|
|
2033
|
-
import { useSafeAreaInsets as
|
|
2034
|
-
import { useEffect as
|
|
2252
|
+
import { useSafeAreaInsets as useSafeAreaInsets2 } from "@granite-js/native/react-native-safe-area-context";
|
|
2253
|
+
import { useEffect as useEffect11 } from "react";
|
|
2035
2254
|
function useSafeAreaInsetsEvent() {
|
|
2036
|
-
const insets =
|
|
2037
|
-
|
|
2255
|
+
const insets = useSafeAreaInsets2();
|
|
2256
|
+
useEffect11(() => {
|
|
2038
2257
|
safeAreaInsetsChange.emit(insets);
|
|
2039
2258
|
}, [insets]);
|
|
2040
|
-
|
|
2259
|
+
useEffect11(() => {
|
|
2041
2260
|
return () => safeAreaInsetsChange.clearSubscriptions();
|
|
2042
2261
|
}, []);
|
|
2043
2262
|
return safeAreaInsetsChange;
|
|
@@ -2318,11 +2537,11 @@ function useCreateUserAgent({
|
|
|
2318
2537
|
// src/hooks/useGeolocation.ts
|
|
2319
2538
|
import { startUpdateLocation } from "@apps-in-toss/native-modules";
|
|
2320
2539
|
import { useVisibility } from "@granite-js/react-native";
|
|
2321
|
-
import { useEffect as
|
|
2540
|
+
import { useEffect as useEffect12, useState as useState5 } from "react";
|
|
2322
2541
|
function useGeolocation({ accuracy, distanceInterval, timeInterval }) {
|
|
2323
2542
|
const isVisible = useVisibility();
|
|
2324
2543
|
const [location, setLocation] = useState5(null);
|
|
2325
|
-
|
|
2544
|
+
useEffect12(() => {
|
|
2326
2545
|
if (!isVisible) {
|
|
2327
2546
|
return;
|
|
2328
2547
|
}
|
|
@@ -2340,11 +2559,11 @@ function useGeolocation({ accuracy, distanceInterval, timeInterval }) {
|
|
|
2340
2559
|
}
|
|
2341
2560
|
|
|
2342
2561
|
// src/hooks/useWaitForReturnNavigator.tsx
|
|
2343
|
-
import { useNavigation as
|
|
2562
|
+
import { useNavigation as useNavigation3, useVisibilityChange } from "@granite-js/react-native";
|
|
2344
2563
|
import { useCallback as useCallback11, useRef as useRef4 } from "react";
|
|
2345
2564
|
function useWaitForReturnNavigator() {
|
|
2346
2565
|
const callbacks = useRef4([]).current;
|
|
2347
|
-
const navigation =
|
|
2566
|
+
const navigation = useNavigation3();
|
|
2348
2567
|
const startNavigating = useCallback11(
|
|
2349
2568
|
(route, params) => {
|
|
2350
2569
|
return new Promise((resolve) => {
|
|
@@ -2482,7 +2701,7 @@ var trackScreen = (url, title) => {
|
|
|
2482
2701
|
};
|
|
2483
2702
|
|
|
2484
2703
|
// src/components/WebView.tsx
|
|
2485
|
-
import { jsx as
|
|
2704
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
2486
2705
|
var operationalEnvironment = appsInTossConstantBridges.getOperationalEnvironment();
|
|
2487
2706
|
var TYPES = ["partner", "external", "game"];
|
|
2488
2707
|
var WEBVIEW_TYPES = {
|
|
@@ -2522,10 +2741,8 @@ function WebView({ type, local, onMessage, ...props }) {
|
|
|
2522
2741
|
const webViewRef = useRef5(null);
|
|
2523
2742
|
const url = useMemo6(() => getWebViewURL(local), [local]);
|
|
2524
2743
|
const webBackHandler = useWebBackHandler(url, webViewRef);
|
|
2525
|
-
const top = useSafeAreaTop3();
|
|
2526
|
-
const bottom = useSafeAreaBottom();
|
|
2527
|
-
const insets = useSafeAreaInsets4();
|
|
2528
2744
|
const global2 = getAppsInTossGlobals();
|
|
2745
|
+
const insets = useSafeAreaInsets3();
|
|
2529
2746
|
const navigationBarContext = useNavigationBarContext();
|
|
2530
2747
|
const safeAreaInsetsEvent = useSafeAreaInsetsEvent();
|
|
2531
2748
|
const [allowsBackForwardNavigationGestures, setAllowsBackForwardNavigationGestures] = useState6(
|
|
@@ -2535,7 +2752,7 @@ function WebView({ type, local, onMessage, ...props }) {
|
|
|
2535
2752
|
onMessage,
|
|
2536
2753
|
eventListenerMap: {
|
|
2537
2754
|
...appsInTossEventBridges,
|
|
2538
|
-
navigationAccessoryEvent: ({ onEvent, onError }) =>
|
|
2755
|
+
navigationAccessoryEvent: ({ onEvent, onError }) => tdsEvent2.addEventListener("navigationAccessoryEvent", { onEvent, onError }),
|
|
2539
2756
|
backEvent: ({ onEvent }) => {
|
|
2540
2757
|
webBackHandler.addEventListener(onEvent);
|
|
2541
2758
|
return () => {
|
|
@@ -2563,12 +2780,7 @@ function WebView({ type, local, onMessage, ...props }) {
|
|
|
2563
2780
|
},
|
|
2564
2781
|
constantHandlerMap: {
|
|
2565
2782
|
...appsInTossConstantBridges,
|
|
2566
|
-
getSafeAreaInsets: () =>
|
|
2567
|
-
top,
|
|
2568
|
-
bottom,
|
|
2569
|
-
left: insets.left,
|
|
2570
|
-
right: insets.right
|
|
2571
|
-
}),
|
|
2783
|
+
getSafeAreaInsets: () => insets,
|
|
2572
2784
|
...Object.fromEntries(Object.entries(global2).map(([key, value]) => [key, () => value])),
|
|
2573
2785
|
getServerTime_isSupported: getServerTime.isSupported,
|
|
2574
2786
|
requestReview_isSupported: requestReview.isSupported,
|
|
@@ -2650,7 +2862,7 @@ function WebView({ type, local, onMessage, ...props }) {
|
|
|
2650
2862
|
colorPreference: "light"
|
|
2651
2863
|
});
|
|
2652
2864
|
const refs = mergeRefs(handler.ref, webViewRef);
|
|
2653
|
-
|
|
2865
|
+
useEffect13(() => {
|
|
2654
2866
|
const callback = () => {
|
|
2655
2867
|
webBackHandler.handleWebBack();
|
|
2656
2868
|
return true;
|
|
@@ -2659,7 +2871,7 @@ function WebView({ type, local, onMessage, ...props }) {
|
|
|
2659
2871
|
return () => subscription.remove();
|
|
2660
2872
|
}, [webBackHandler]);
|
|
2661
2873
|
const handleWebViewProcessDidTerminate = useHandleWebViewProcessDidTerminate(webViewRef);
|
|
2662
|
-
return /* @__PURE__ */
|
|
2874
|
+
return /* @__PURE__ */ jsx24(
|
|
2663
2875
|
BaseWebView,
|
|
2664
2876
|
{
|
|
2665
2877
|
ref: refs,
|
|
@@ -2682,14 +2894,14 @@ function WebView({ type, local, onMessage, ...props }) {
|
|
|
2682
2894
|
webBackHandler.onNavigationStateChange(event);
|
|
2683
2895
|
},
|
|
2684
2896
|
textZoom: 100,
|
|
2685
|
-
userAgent:
|
|
2897
|
+
userAgent: Platform4.OS === "ios" ? userAgent : void 0,
|
|
2686
2898
|
sharedCookiesEnabled: true,
|
|
2687
2899
|
webviewDebuggingEnabled: webViewDebuggingEnabled,
|
|
2688
2900
|
thirdPartyCookiesEnabled: true,
|
|
2689
2901
|
onMessage: handler.onMessage,
|
|
2690
2902
|
injectedJavaScript: afterDocumentLoad,
|
|
2691
2903
|
injectedJavaScriptBeforeContentLoaded: [handler.injectedJavaScript, beforeDocumentLoad].join("\n"),
|
|
2692
|
-
decelerationRate:
|
|
2904
|
+
decelerationRate: Platform4.OS === "ios" ? 1 : void 0,
|
|
2693
2905
|
allowsBackForwardNavigationGestures,
|
|
2694
2906
|
onShouldStartLoadWithRequest: (event) => {
|
|
2695
2907
|
try {
|
|
@@ -2729,8 +2941,8 @@ import { StartUpdateLocationPermissionError } from "@apps-in-toss/types";
|
|
|
2729
2941
|
|
|
2730
2942
|
// src/ads/inlineAd/InlineAd.tsx
|
|
2731
2943
|
import { ImpressionArea, useVisibilityChange as useVisibilityChange2 } from "@granite-js/react-native";
|
|
2732
|
-
import { useEffect as
|
|
2733
|
-
import { StyleSheet as StyleSheet3, View as
|
|
2944
|
+
import { useEffect as useEffect14, useRef as useRef8, useState as useState7 } from "react";
|
|
2945
|
+
import { StyleSheet as StyleSheet3, View as View9, useColorScheme } from "react-native";
|
|
2734
2946
|
|
|
2735
2947
|
// src/ads/inlineAd/constants.ts
|
|
2736
2948
|
var SDK_ID = "106";
|
|
@@ -3115,13 +3327,13 @@ import { useRef as useRef6 } from "react";
|
|
|
3115
3327
|
import {
|
|
3116
3328
|
Animated,
|
|
3117
3329
|
Easing,
|
|
3118
|
-
Image,
|
|
3330
|
+
Image as Image2,
|
|
3119
3331
|
Pressable as Pressable2,
|
|
3120
3332
|
StyleSheet,
|
|
3121
|
-
Text,
|
|
3122
|
-
View as
|
|
3333
|
+
Text as Text2,
|
|
3334
|
+
View as View7
|
|
3123
3335
|
} from "react-native";
|
|
3124
|
-
import { jsx as
|
|
3336
|
+
import { jsx as jsx25, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
3125
3337
|
var ARROW_PATH = "m7.5 20.4c-.5-.5-.5-1.2 0-1.7l6.7-6.7-6.8-6.7c-.5-.5-.5-1.2 0-1.7s1.2-.5 1.7 0l7.5 7.5c.5.5.5 1.2 0 1.7l-7.5 7.5c-.2.3-.5.4-.8.4s-.6-.1-.8-.3z";
|
|
3126
3338
|
function FeedBannerAdView({
|
|
3127
3339
|
brandName,
|
|
@@ -3133,7 +3345,7 @@ function FeedBannerAdView({
|
|
|
3133
3345
|
ctaTextColor,
|
|
3134
3346
|
ctaBackgroundColor,
|
|
3135
3347
|
adClearanceText,
|
|
3136
|
-
colors,
|
|
3348
|
+
colors: colors4,
|
|
3137
3349
|
isAdBadgeEnabled,
|
|
3138
3350
|
paddingStyle,
|
|
3139
3351
|
onPress
|
|
@@ -3155,7 +3367,7 @@ function FeedBannerAdView({
|
|
|
3155
3367
|
};
|
|
3156
3368
|
const resolvedCtaBackground = ctaBackgroundColor ?? "#3081F9";
|
|
3157
3369
|
const resolvedCtaTextColor = ctaTextColor ?? "#ffffff";
|
|
3158
|
-
return /* @__PURE__ */
|
|
3370
|
+
return /* @__PURE__ */ jsx25(
|
|
3159
3371
|
Pressable2,
|
|
3160
3372
|
{
|
|
3161
3373
|
accessibilityRole: "button",
|
|
@@ -3163,10 +3375,10 @@ function FeedBannerAdView({
|
|
|
3163
3375
|
onPressIn: handlePressIn,
|
|
3164
3376
|
onPressOut: handlePressOut,
|
|
3165
3377
|
style: styles.pressable,
|
|
3166
|
-
children: /* @__PURE__ */
|
|
3167
|
-
/* @__PURE__ */
|
|
3168
|
-
/* @__PURE__ */
|
|
3169
|
-
/* @__PURE__ */
|
|
3378
|
+
children: /* @__PURE__ */ jsxs11(Animated.View, { style: [styles.container, paddingStyle, { transform: [{ scale }] }], children: [
|
|
3379
|
+
/* @__PURE__ */ jsxs11(View7, { style: styles.profileContainer, children: [
|
|
3380
|
+
/* @__PURE__ */ jsxs11(View7, { style: styles.brandArea, children: [
|
|
3381
|
+
/* @__PURE__ */ jsx25(
|
|
3170
3382
|
Pressable2,
|
|
3171
3383
|
{
|
|
3172
3384
|
accessibilityRole: "button",
|
|
@@ -3174,59 +3386,59 @@ function FeedBannerAdView({
|
|
|
3174
3386
|
onPressIn: handlePressIn,
|
|
3175
3387
|
onPressOut: handlePressOut,
|
|
3176
3388
|
style: styles.logoContainer,
|
|
3177
|
-
children: /* @__PURE__ */
|
|
3178
|
-
brandLogoUri ? /* @__PURE__ */
|
|
3179
|
-
/* @__PURE__ */
|
|
3389
|
+
children: /* @__PURE__ */ jsxs11(View7, { style: [styles.logoWrapper, { backgroundColor: colors4.brandLogoBg }], children: [
|
|
3390
|
+
brandLogoUri ? /* @__PURE__ */ jsx25(Image2, { source: { uri: brandLogoUri }, style: styles.logoImage, resizeMode: "cover" }) : null,
|
|
3391
|
+
/* @__PURE__ */ jsx25(View7, { style: [styles.logoOverlay, { borderColor: colors4.brandLogoBorder }] })
|
|
3180
3392
|
] })
|
|
3181
3393
|
}
|
|
3182
3394
|
),
|
|
3183
|
-
/* @__PURE__ */
|
|
3184
|
-
/* @__PURE__ */
|
|
3395
|
+
/* @__PURE__ */ jsxs11(View7, { style: styles.brandTextContainer, children: [
|
|
3396
|
+
/* @__PURE__ */ jsx25(
|
|
3185
3397
|
Pressable2,
|
|
3186
3398
|
{
|
|
3187
3399
|
accessibilityRole: "button",
|
|
3188
3400
|
onPress: () => onPress("103"),
|
|
3189
3401
|
onPressIn: handlePressIn,
|
|
3190
3402
|
onPressOut: handlePressOut,
|
|
3191
|
-
children: /* @__PURE__ */
|
|
3192
|
-
|
|
3403
|
+
children: /* @__PURE__ */ jsx25(
|
|
3404
|
+
Text2,
|
|
3193
3405
|
{
|
|
3194
3406
|
allowFontScaling: false,
|
|
3195
3407
|
numberOfLines: 1,
|
|
3196
|
-
style: [styles.brandName, { color:
|
|
3408
|
+
style: [styles.brandName, { color: colors4.brandName }],
|
|
3197
3409
|
children: brandName
|
|
3198
3410
|
}
|
|
3199
3411
|
)
|
|
3200
3412
|
}
|
|
3201
3413
|
),
|
|
3202
|
-
isAdBadgeEnabled ? /* @__PURE__ */
|
|
3414
|
+
isAdBadgeEnabled ? /* @__PURE__ */ jsx25(Text2, { allowFontScaling: false, numberOfLines: 1, style: [styles.adBadge, { color: colors4.adBadge }], children: "\uAD11\uACE0" }) : null
|
|
3203
3415
|
] })
|
|
3204
3416
|
] }),
|
|
3205
|
-
/* @__PURE__ */
|
|
3206
|
-
/* @__PURE__ */
|
|
3417
|
+
/* @__PURE__ */ jsxs11(View7, { style: styles.textArea, children: [
|
|
3418
|
+
/* @__PURE__ */ jsx25(
|
|
3207
3419
|
Pressable2,
|
|
3208
3420
|
{
|
|
3209
3421
|
accessibilityRole: "button",
|
|
3210
3422
|
onPress: () => onPress("101"),
|
|
3211
3423
|
onPressIn: handlePressIn,
|
|
3212
3424
|
onPressOut: handlePressOut,
|
|
3213
|
-
children: /* @__PURE__ */
|
|
3425
|
+
children: /* @__PURE__ */ jsx25(Text2, { allowFontScaling: false, style: [styles.title, { color: colors4.title }], children: title })
|
|
3214
3426
|
}
|
|
3215
3427
|
),
|
|
3216
|
-
/* @__PURE__ */
|
|
3428
|
+
/* @__PURE__ */ jsx25(
|
|
3217
3429
|
Pressable2,
|
|
3218
3430
|
{
|
|
3219
3431
|
accessibilityRole: "button",
|
|
3220
3432
|
onPress: () => onPress("102"),
|
|
3221
3433
|
onPressIn: handlePressIn,
|
|
3222
3434
|
onPressOut: handlePressOut,
|
|
3223
|
-
children: /* @__PURE__ */
|
|
3435
|
+
children: /* @__PURE__ */ jsx25(Text2, { allowFontScaling: false, style: [styles.subtitle, { color: colors4.subtitle }], children: subtitle })
|
|
3224
3436
|
}
|
|
3225
3437
|
)
|
|
3226
3438
|
] })
|
|
3227
3439
|
] }),
|
|
3228
|
-
/* @__PURE__ */
|
|
3229
|
-
/* @__PURE__ */
|
|
3440
|
+
/* @__PURE__ */ jsxs11(View7, { style: styles.card, children: [
|
|
3441
|
+
/* @__PURE__ */ jsx25(
|
|
3230
3442
|
Pressable2,
|
|
3231
3443
|
{
|
|
3232
3444
|
accessibilityRole: "button",
|
|
@@ -3234,10 +3446,10 @@ function FeedBannerAdView({
|
|
|
3234
3446
|
onPressIn: handlePressIn,
|
|
3235
3447
|
onPressOut: handlePressOut,
|
|
3236
3448
|
style: styles.imageButton,
|
|
3237
|
-
children: /* @__PURE__ */
|
|
3449
|
+
children: /* @__PURE__ */ jsx25(View7, { style: styles.imageContainer, children: mainImageUri ? /* @__PURE__ */ jsx25(Image2, { source: { uri: mainImageUri }, style: styles.mainImage, resizeMode: "cover" }) : null })
|
|
3238
3450
|
}
|
|
3239
3451
|
),
|
|
3240
|
-
/* @__PURE__ */
|
|
3452
|
+
/* @__PURE__ */ jsxs11(
|
|
3241
3453
|
Pressable2,
|
|
3242
3454
|
{
|
|
3243
3455
|
accessibilityRole: "button",
|
|
@@ -3246,14 +3458,14 @@ function FeedBannerAdView({
|
|
|
3246
3458
|
onPressOut: handlePressOut,
|
|
3247
3459
|
style: [styles.cta, { backgroundColor: resolvedCtaBackground }],
|
|
3248
3460
|
children: [
|
|
3249
|
-
/* @__PURE__ */
|
|
3250
|
-
/* @__PURE__ */
|
|
3461
|
+
/* @__PURE__ */ jsx25(Text2, { allowFontScaling: false, style: [styles.ctaText, { color: resolvedCtaTextColor }], children: ctaText }),
|
|
3462
|
+
/* @__PURE__ */ jsx25(Svg, { width: 20, height: 20, viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx25(Path, { d: ARROW_PATH, fill: resolvedCtaTextColor }) })
|
|
3251
3463
|
]
|
|
3252
3464
|
}
|
|
3253
3465
|
),
|
|
3254
|
-
/* @__PURE__ */
|
|
3466
|
+
/* @__PURE__ */ jsx25(View7, { style: [styles.cardOverlay, { borderColor: colors4.imageOverlayBorder }] })
|
|
3255
3467
|
] }),
|
|
3256
|
-
adClearanceText ? /* @__PURE__ */
|
|
3468
|
+
adClearanceText ? /* @__PURE__ */ jsx25(Text2, { allowFontScaling: false, style: [styles.adClearance, { color: colors4.adClearance }], children: adClearanceText }) : null
|
|
3257
3469
|
] })
|
|
3258
3470
|
}
|
|
3259
3471
|
);
|
|
@@ -3375,8 +3587,8 @@ var styles = StyleSheet.create({
|
|
|
3375
3587
|
// src/ads/inlineAd/ui/ListBannerAdView.tsx
|
|
3376
3588
|
import { ClipPath, Defs, Image as SvgImage, Path as Path2, Svg as Svg2 } from "@granite-js/native/react-native-svg";
|
|
3377
3589
|
import { useRef as useRef7 } from "react";
|
|
3378
|
-
import { Animated as Animated2, Easing as Easing2, Pressable as Pressable3, StyleSheet as StyleSheet2, Text as
|
|
3379
|
-
import { jsx as
|
|
3590
|
+
import { Animated as Animated2, Easing as Easing2, Pressable as Pressable3, StyleSheet as StyleSheet2, Text as Text3, View as View8 } from "react-native";
|
|
3591
|
+
import { jsx as jsx26, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
3380
3592
|
var SQUIRCLE_PATH = "M0 17.352C0 3.564 3.564 0 17.352 0H18.648C32.436 0 36 3.564 36 17.352V18.648C36 32.436 32.436 36 18.648 36H17.352C3.564 36 0 32.436 0 18.648V17.352Z";
|
|
3381
3593
|
function ListBannerAdView({
|
|
3382
3594
|
title,
|
|
@@ -3385,7 +3597,7 @@ function ListBannerAdView({
|
|
|
3385
3597
|
adClearanceFontSize,
|
|
3386
3598
|
imageUri,
|
|
3387
3599
|
paddingStyle,
|
|
3388
|
-
colors,
|
|
3600
|
+
colors: colors4,
|
|
3389
3601
|
onPress
|
|
3390
3602
|
}) {
|
|
3391
3603
|
const scale = useRef7(new Animated2.Value(1)).current;
|
|
@@ -3404,7 +3616,7 @@ function ListBannerAdView({
|
|
|
3404
3616
|
const handlePressOut = () => {
|
|
3405
3617
|
animateScale(1);
|
|
3406
3618
|
};
|
|
3407
|
-
return /* @__PURE__ */
|
|
3619
|
+
return /* @__PURE__ */ jsx26(
|
|
3408
3620
|
Pressable3,
|
|
3409
3621
|
{
|
|
3410
3622
|
accessibilityRole: "button",
|
|
@@ -3412,9 +3624,9 @@ function ListBannerAdView({
|
|
|
3412
3624
|
onPressIn: handlePressIn,
|
|
3413
3625
|
onPressOut: handlePressOut,
|
|
3414
3626
|
style: styles2.pressable,
|
|
3415
|
-
children: /* @__PURE__ */
|
|
3416
|
-
/* @__PURE__ */
|
|
3417
|
-
/* @__PURE__ */
|
|
3627
|
+
children: /* @__PURE__ */ jsxs12(Animated2.View, { style: [styles2.container, paddingStyle, { transform: [{ scale }] }], children: [
|
|
3628
|
+
/* @__PURE__ */ jsxs12(View8, { style: styles2.titleRow, children: [
|
|
3629
|
+
/* @__PURE__ */ jsx26(
|
|
3418
3630
|
Pressable3,
|
|
3419
3631
|
{
|
|
3420
3632
|
accessibilityRole: "button",
|
|
@@ -3422,10 +3634,10 @@ function ListBannerAdView({
|
|
|
3422
3634
|
onPressIn: handlePressIn,
|
|
3423
3635
|
onPressOut: handlePressOut,
|
|
3424
3636
|
style: styles2.iconWrapper,
|
|
3425
|
-
children: /* @__PURE__ */
|
|
3426
|
-
/* @__PURE__ */
|
|
3427
|
-
/* @__PURE__ */
|
|
3428
|
-
imageUri ? /* @__PURE__ */
|
|
3637
|
+
children: /* @__PURE__ */ jsxs12(Svg2, { width: 36, height: 36, viewBox: "0 0 36 36", children: [
|
|
3638
|
+
/* @__PURE__ */ jsx26(Defs, { children: /* @__PURE__ */ jsx26(ClipPath, { id: clipIdRef.current, children: /* @__PURE__ */ jsx26(Path2, { d: SQUIRCLE_PATH }) }) }),
|
|
3639
|
+
/* @__PURE__ */ jsx26(Path2, { d: SQUIRCLE_PATH, fill: colors4.iconBg }),
|
|
3640
|
+
imageUri ? /* @__PURE__ */ jsx26(
|
|
3429
3641
|
SvgImage,
|
|
3430
3642
|
{
|
|
3431
3643
|
href: { uri: imageUri },
|
|
@@ -3435,12 +3647,12 @@ function ListBannerAdView({
|
|
|
3435
3647
|
clipPath: `url(#${clipIdRef.current})`
|
|
3436
3648
|
}
|
|
3437
3649
|
) : null,
|
|
3438
|
-
/* @__PURE__ */
|
|
3650
|
+
/* @__PURE__ */ jsx26(
|
|
3439
3651
|
Path2,
|
|
3440
3652
|
{
|
|
3441
3653
|
d: SQUIRCLE_PATH,
|
|
3442
3654
|
fill: "none",
|
|
3443
|
-
stroke:
|
|
3655
|
+
stroke: colors4.iconBorder,
|
|
3444
3656
|
strokeWidth: 2,
|
|
3445
3657
|
clipPath: `url(#${clipIdRef.current})`
|
|
3446
3658
|
}
|
|
@@ -3448,37 +3660,37 @@ function ListBannerAdView({
|
|
|
3448
3660
|
] })
|
|
3449
3661
|
}
|
|
3450
3662
|
),
|
|
3451
|
-
/* @__PURE__ */
|
|
3452
|
-
/* @__PURE__ */
|
|
3663
|
+
/* @__PURE__ */ jsxs12(View8, { style: styles2.textWrapper, children: [
|
|
3664
|
+
/* @__PURE__ */ jsx26(
|
|
3453
3665
|
Pressable3,
|
|
3454
3666
|
{
|
|
3455
3667
|
accessibilityRole: "button",
|
|
3456
3668
|
onPress: () => onPress("101"),
|
|
3457
3669
|
onPressIn: handlePressIn,
|
|
3458
3670
|
onPressOut: handlePressOut,
|
|
3459
|
-
children: /* @__PURE__ */
|
|
3671
|
+
children: /* @__PURE__ */ jsx26(Text3, { allowFontScaling: false, style: [styles2.title, { color: colors4.title }], children: title })
|
|
3460
3672
|
}
|
|
3461
3673
|
),
|
|
3462
|
-
/* @__PURE__ */
|
|
3674
|
+
/* @__PURE__ */ jsx26(
|
|
3463
3675
|
Pressable3,
|
|
3464
3676
|
{
|
|
3465
3677
|
accessibilityRole: "button",
|
|
3466
3678
|
onPress: () => onPress("102"),
|
|
3467
3679
|
onPressIn: handlePressIn,
|
|
3468
3680
|
onPressOut: handlePressOut,
|
|
3469
|
-
children: /* @__PURE__ */
|
|
3681
|
+
children: /* @__PURE__ */ jsx26(Text3, { allowFontScaling: false, style: [styles2.subtitle, { color: colors4.subtitle }], children: subtitle })
|
|
3470
3682
|
}
|
|
3471
3683
|
)
|
|
3472
3684
|
] })
|
|
3473
3685
|
] }),
|
|
3474
|
-
adClearanceText ? /* @__PURE__ */
|
|
3475
|
-
|
|
3686
|
+
adClearanceText ? /* @__PURE__ */ jsx26(
|
|
3687
|
+
Text3,
|
|
3476
3688
|
{
|
|
3477
3689
|
allowFontScaling: false,
|
|
3478
3690
|
style: [
|
|
3479
3691
|
styles2.adClearance,
|
|
3480
3692
|
{
|
|
3481
|
-
color:
|
|
3693
|
+
color: colors4.adClearance,
|
|
3482
3694
|
fontSize: adClearanceFontSize,
|
|
3483
3695
|
lineHeight: adClearanceFontSize * 1.2
|
|
3484
3696
|
}
|
|
@@ -3609,7 +3821,7 @@ function buildNoFillPayload(slotId, adGroupId) {
|
|
|
3609
3821
|
}
|
|
3610
3822
|
|
|
3611
3823
|
// src/ads/inlineAd/InlineAd.tsx
|
|
3612
|
-
import { jsx as
|
|
3824
|
+
import { jsx as jsx27, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
3613
3825
|
var themePalette = {
|
|
3614
3826
|
light: {
|
|
3615
3827
|
title: "#4e5968",
|
|
@@ -3725,7 +3937,7 @@ function InlineAd(props) {
|
|
|
3725
3937
|
const resolvedTheme = selectedTheme === "auto" ? colorScheme === "dark" ? "dark" : "light" : selectedTheme;
|
|
3726
3938
|
const resolvedTone = tone ?? DEFAULT_INLINE_AD_TONE;
|
|
3727
3939
|
const resolvedVariant = variant ?? DEFAULT_INLINE_AD_VARIANT;
|
|
3728
|
-
const
|
|
3940
|
+
const colors4 = themePalette[resolvedTheme];
|
|
3729
3941
|
const feedColors = feedThemePalette[resolvedTheme];
|
|
3730
3942
|
const backgroundColor = resolvedTone === "grey" ? resolvedTheme === "dark" ? "#101013" : "#f2f4f7" : resolvedTheme === "dark" ? "#17171c" : "#ffffff";
|
|
3731
3943
|
callbacksRef.current = {
|
|
@@ -3736,7 +3948,7 @@ function InlineAd(props) {
|
|
|
3736
3948
|
onAdFailedToRender,
|
|
3737
3949
|
onNoFill
|
|
3738
3950
|
};
|
|
3739
|
-
|
|
3951
|
+
useEffect14(() => {
|
|
3740
3952
|
isMountedRef.current = true;
|
|
3741
3953
|
return () => {
|
|
3742
3954
|
isMountedRef.current = false;
|
|
@@ -3746,7 +3958,7 @@ function InlineAd(props) {
|
|
|
3746
3958
|
}
|
|
3747
3959
|
};
|
|
3748
3960
|
}, []);
|
|
3749
|
-
|
|
3961
|
+
useEffect14(() => {
|
|
3750
3962
|
const normalizedAdGroupId = normalizeAdGroupId(adGroupId);
|
|
3751
3963
|
const loadAdRequest = () => {
|
|
3752
3964
|
if (loadingRef.current) {
|
|
@@ -3831,7 +4043,7 @@ function InlineAd(props) {
|
|
|
3831
4043
|
loadRef.current?.();
|
|
3832
4044
|
}
|
|
3833
4045
|
});
|
|
3834
|
-
|
|
4046
|
+
useEffect14(() => {
|
|
3835
4047
|
if (!ad || hasRenderedRef.current) {
|
|
3836
4048
|
return;
|
|
3837
4049
|
}
|
|
@@ -3916,28 +4128,28 @@ function InlineAd(props) {
|
|
|
3916
4128
|
callbacksRef.current.onAdClicked?.(basePayload);
|
|
3917
4129
|
}
|
|
3918
4130
|
};
|
|
3919
|
-
return /* @__PURE__ */
|
|
4131
|
+
return /* @__PURE__ */ jsx27(
|
|
3920
4132
|
ImpressionArea,
|
|
3921
4133
|
{
|
|
3922
4134
|
style: styles3.impressionArea,
|
|
3923
4135
|
onImpressionStart: handleImpression1px,
|
|
3924
4136
|
areaThreshold: 0,
|
|
3925
4137
|
UNSAFE__impressFallbackOnMount: Boolean(impressFallbackOnMount),
|
|
3926
|
-
children: /* @__PURE__ */
|
|
4138
|
+
children: /* @__PURE__ */ jsx27(
|
|
3927
4139
|
ImpressionArea,
|
|
3928
4140
|
{
|
|
3929
4141
|
onImpressionStart: handleImpression100p,
|
|
3930
4142
|
areaThreshold: 1,
|
|
3931
4143
|
UNSAFE__impressFallbackOnMount: Boolean(impressFallbackOnMount),
|
|
3932
|
-
children: /* @__PURE__ */
|
|
4144
|
+
children: /* @__PURE__ */ jsx27(
|
|
3933
4145
|
ImpressionArea,
|
|
3934
4146
|
{
|
|
3935
4147
|
onImpressionStart: handleViewableStart,
|
|
3936
4148
|
onImpressionEnd: handleViewableEnd,
|
|
3937
4149
|
areaThreshold: 0.5,
|
|
3938
4150
|
UNSAFE__impressFallbackOnMount: Boolean(impressFallbackOnMount),
|
|
3939
|
-
children: /* @__PURE__ */
|
|
3940
|
-
isListBanner && listCreative ? /* @__PURE__ */
|
|
4151
|
+
children: /* @__PURE__ */ jsx27(View9, { style: [styles3.wrapper, resolvedVariant === "card" && styles3.cardWrapper], children: /* @__PURE__ */ jsxs13(View9, { style: [styles3.surface, { backgroundColor }, resolvedVariant === "card" && styles3.cardSurface], children: [
|
|
4152
|
+
isListBanner && listCreative ? /* @__PURE__ */ jsx27(
|
|
3941
4153
|
ListBannerAdView,
|
|
3942
4154
|
{
|
|
3943
4155
|
title: listCreative.title,
|
|
@@ -3946,11 +4158,11 @@ function InlineAd(props) {
|
|
|
3946
4158
|
adClearanceFontSize,
|
|
3947
4159
|
imageUri,
|
|
3948
4160
|
paddingStyle,
|
|
3949
|
-
colors,
|
|
4161
|
+
colors: colors4,
|
|
3950
4162
|
onPress: handleClick
|
|
3951
4163
|
}
|
|
3952
4164
|
) : null,
|
|
3953
|
-
isFeedBanner && feedCreative ? /* @__PURE__ */
|
|
4165
|
+
isFeedBanner && feedCreative ? /* @__PURE__ */ jsx27(
|
|
3954
4166
|
FeedBannerAdView,
|
|
3955
4167
|
{
|
|
3956
4168
|
brandName: feedCreative.brandName,
|