@apps-in-toss/framework 2.7.1 → 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.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 useEffect7 } from "react";
152
- import { Platform as Platform3 } from "react-native";
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/core/utils/toIcon.ts
1115
- function toIcon(source) {
1116
- return source.startsWith("http") ? { source: { uri: source } } : { name: source };
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 useEffect6, useRef as useRef2 } from "react";
1121
- import { Fragment as Fragment4, jsx as jsx10 } from "react/jsx-runtime";
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
- useEffect6(() => {
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__ */ jsx10(Fragment4, { children });
1374
+ return /* @__PURE__ */ jsx15(Fragment5, { children });
1135
1375
  }
1136
1376
 
1137
1377
  // src/components/NavigationBar/RNNavigationBar/Default.tsx
1138
- import { jsx as jsx11 } from "react/jsx-runtime";
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__ */ jsx11(NavigationBarImpressionArea, { withHomeButton, children: /* @__PURE__ */ jsx11(
1389
+ return /* @__PURE__ */ jsx16(NavigationBarImpressionArea, { withHomeButton, children: /* @__PURE__ */ jsx16(
1149
1390
  TopNavigation,
1150
1391
  {
1151
- title: globals.brandDisplayName,
1152
- icon: toIcon(globals.brandIcon),
1153
- onPressDots: openMoreButtonBottomSheet,
1154
- contentVisible: true,
1155
- onPressTitle: withHomeButton ? navigationEvent.handleHomeButtonClick : void 0,
1156
- onPressClose: navigationEvent.handleCloseButtonClick,
1157
- withHome: withHomeButton,
1158
- fixedRightButton: navigationRightButton,
1159
- leftVisible: withBackButton,
1160
- children: /* @__PURE__ */ jsx11(NavigationLeft, { visible: withBackButton, children: /* @__PURE__ */ jsx11(NavigationBackButton, { onPress: navigationEvent.handleBack, canGoBack: false }) })
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 { useSafeAreaInsets } from "@granite-js/native/react-native-safe-area-context";
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 { right: safeAreaRight } = useSafeAreaInsets();
1413
+ const { navigationBar } = getAppsInTossGlobals();
1414
+ const parsedNavigationBar = navigationBar ? safeParseNavigationBar(navigationBar) : null;
1177
1415
  useHardwareBackPress(navigationEvent.handleBack);
1178
- return /* @__PURE__ */ jsxs3(Fragment5, { children: [
1179
- /* @__PURE__ */ jsx12(PageNavbar, { preference: { type: "none" } }),
1180
- /* @__PURE__ */ jsx12(
1181
- View3,
1182
- {
1183
- style: {
1184
- width: "100%",
1185
- // TODO: UI관련 스타일 설정은 TDS로 이관
1186
- height: Platform2.OS === "ios" ? 44 : 54,
1187
- flexDirection: "row",
1188
- alignItems: "center",
1189
- justifyContent: "flex-end",
1190
- position: "absolute",
1191
- zIndex: Z_INDEX.CLOSE_BUTTON,
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 jsx13, jsxs as jsxs4 } from "react/jsx-runtime";
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__ */ jsx13(GameAppContainer, { children });
1453
+ return /* @__PURE__ */ jsx18(GameAppContainer, { children });
1232
1454
  case "general":
1233
1455
  default:
1234
- return /* @__PURE__ */ jsx13(GeneralAppContainer, { children });
1456
+ return /* @__PURE__ */ jsx18(GeneralAppContainer, { children });
1235
1457
  }
1236
1458
  }
1237
1459
  function GameAppContainer({ children }) {
1238
- useEffect7(() => {
1239
- if (Platform3.OS === "ios") {
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__ */ jsxs4(Fragment6, { children: [
1248
- /* @__PURE__ */ jsx13(RNNavigationBar.Game, {}),
1249
- (0, bridge_entry_exports.getOperationalEnvironment)() === "toss" ? /* @__PURE__ */ jsx13(GameInitializer, { children }) : children
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__ */ jsxs4(Fragment6, { children: [
1254
- /* @__PURE__ */ jsx13(RNNavigationBar.Default, {}),
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 jsx14, jsxs as jsxs5 } from "react/jsx-runtime";
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__ */ jsxs5(Fragment7, { children: [
1267
- /* @__PURE__ */ jsx14(AppEvent.System, { ...initialProps }),
1268
- /* @__PURE__ */ jsx14(AppUpdate, {})
1488
+ return /* @__PURE__ */ jsxs8(Fragment7, { children: [
1489
+ /* @__PURE__ */ jsx19(AppEvent.System, { ...initialProps }),
1490
+ /* @__PURE__ */ jsx19(AppUpdate, {})
1269
1491
  ] });
1270
1492
  }
1271
- return /* @__PURE__ */ jsxs5(Fragment7, { children: [
1272
- /* @__PURE__ */ jsx14(AppEvent.System, { ...initialProps }),
1273
- /* @__PURE__ */ jsx14(Container, { ...initialProps, children: /* @__PURE__ */ jsx14(TDSProvider, { colorPreference: "light", token: { color: { primary: getAppsInTossGlobals().brandPrimaryColor } }, children }) })
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__ */ jsx14(NavigationBarContextProvider, { children: isRNApp ? /* @__PURE__ */ jsx14(
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__ */ jsx14(RNAppContainer, { children })
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 useSafeAreaInsets4 } from "@granite-js/native/react-native-safe-area-context";
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 { useSafeAreaBottom, useSafeAreaTop as useSafeAreaTop3 } from "@toss/tds-react-native/private";
1359
- import { useEffect as useEffect12, useMemo as useMemo6, useRef as useRef5, useState as useState6 } from "react";
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 useEffect8 } from "react";
1368
- import { Platform as Platform5 } from "react-native";
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 { PageNavbar as PageNavbar2, useDialog as useDialog4 } from "@toss/tds-react-native";
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 { Platform as Platform4, View as View4 } from "react-native";
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 { right: safeAreaRight } = useSafeAreaInsets2();
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__ */ jsxs6(Fragment8, { children: [
1390
- /* @__PURE__ */ jsx15(PageNavbar2, { preference: { type: "none" } }),
1391
- /* @__PURE__ */ jsx15(
1392
- View4,
1393
- {
1394
- style: {
1395
- width: "100%",
1396
- // TODO: UI관련 스타일 설정은 TDS로 이관
1397
- height: Platform4.OS === "ios" ? 44 : 54,
1398
- flexDirection: "row",
1399
- alignItems: "center",
1400
- justifyContent: "flex-end",
1401
- position: "absolute",
1402
- zIndex: Z_INDEX.CLOSE_BUTTON,
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 Fragment9, jsx as jsx16, jsxs as jsxs7 } from "react/jsx-runtime";
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
- useEffect8(() => {
1427
- if (Platform5.OS === "ios") {
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__ */ jsxs7(Fragment9, { children: [
1436
- /* @__PURE__ */ jsx16(GameWebviewNavigationBar, {}),
1437
- getOperationalEnvironment5() === "toss" ? /* @__PURE__ */ jsx16(GameInitializer, { children: /* @__PURE__ */ jsx16(PlainWebView, { ref, ...props }) }) : /* @__PURE__ */ jsx16(PlainWebView, { ref, ...props })
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 jsx17 } from "react/jsx-runtime";
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__ */ jsx17(NavigationBarImpressionArea, { withHomeButton, children: /* @__PURE__ */ jsx17(
1465
- TopNavigation2,
1665
+ return /* @__PURE__ */ jsx22(NavigationBarImpressionArea, { withHomeButton, children: /* @__PURE__ */ jsx22(
1666
+ TopNavigation,
1466
1667
  {
1467
- title: globals.brandDisplayName,
1468
- icon: toIcon(globals.brandIcon),
1469
- onPressDots: openMoreButtonBottomSheet,
1470
- contentVisible: true,
1471
- onPressTitle: withHomeButton ? onHomeButtonClick : void 0,
1472
- onPressClose: handleClose,
1473
- withHome: withHomeButton,
1474
- fixedRightButton: navigationRightButton,
1475
- leftVisible: withBackButton,
1476
- children: /* @__PURE__ */ jsx17(NavigationLeft2, { visible: withBackButton, children: /* @__PURE__ */ jsx17(NavigationBackButton2, { onPress: onBackButtonClick, canGoBack: false }) })
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 Fragment10, jsx as jsx18, jsxs as jsxs8 } from "react/jsx-runtime";
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__ */ jsxs8(Fragment10, { children: [
1485
- /* @__PURE__ */ jsx18(PartnerWebviewNavigationBar, { onBackButtonClick, onHomeButtonClick }),
1486
- /* @__PURE__ */ jsx18(PlainWebView2, { ref, ...webViewProps, style: { flex: 1 } })
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
 
@@ -1909,7 +2111,7 @@ async function tossAdEventLog(params) {
1909
2111
  }
1910
2112
 
1911
2113
  // src/bridge-handler/useBridgeHandler.tsx
1912
- import { useCallback as useCallback8, useEffect as useEffect9, useMemo as useMemo3, useRef as useRef3 } from "react";
2114
+ import { useCallback as useCallback8, useEffect as useEffect10, useMemo as useMemo3, useRef as useRef3 } from "react";
1913
2115
  function serializeError(error) {
1914
2116
  return JSON.stringify(error, (_, value) => {
1915
2117
  if (value instanceof Error) {
@@ -1974,7 +2176,7 @@ function useBridgeHandler({
1974
2176
  )};`,
1975
2177
  [constantHandlerMap]
1976
2178
  );
1977
- useEffect9(() => {
2179
+ useEffect10(() => {
1978
2180
  ref.current?.injectJavaScript(injectedJavaScript);
1979
2181
  }, [injectedJavaScript]);
1980
2182
  const createHandleOnEvent = (functionName, eventId) => (response) => {
@@ -2047,14 +2249,14 @@ function parseNativeEventData(data) {
2047
2249
  }
2048
2250
 
2049
2251
  // src/core/hooks/useSafeAreaInsetsEvent.tsx
2050
- import { useSafeAreaInsets as useSafeAreaInsets3 } from "@granite-js/native/react-native-safe-area-context";
2051
- import { useEffect as useEffect10 } from "react";
2252
+ import { useSafeAreaInsets as useSafeAreaInsets2 } from "@granite-js/native/react-native-safe-area-context";
2253
+ import { useEffect as useEffect11 } from "react";
2052
2254
  function useSafeAreaInsetsEvent() {
2053
- const insets = useSafeAreaInsets3();
2054
- useEffect10(() => {
2255
+ const insets = useSafeAreaInsets2();
2256
+ useEffect11(() => {
2055
2257
  safeAreaInsetsChange.emit(insets);
2056
2258
  }, [insets]);
2057
- useEffect10(() => {
2259
+ useEffect11(() => {
2058
2260
  return () => safeAreaInsetsChange.clearSubscriptions();
2059
2261
  }, []);
2060
2262
  return safeAreaInsetsChange;
@@ -2335,11 +2537,11 @@ function useCreateUserAgent({
2335
2537
  // src/hooks/useGeolocation.ts
2336
2538
  import { startUpdateLocation } from "@apps-in-toss/native-modules";
2337
2539
  import { useVisibility } from "@granite-js/react-native";
2338
- import { useEffect as useEffect11, useState as useState5 } from "react";
2540
+ import { useEffect as useEffect12, useState as useState5 } from "react";
2339
2541
  function useGeolocation({ accuracy, distanceInterval, timeInterval }) {
2340
2542
  const isVisible = useVisibility();
2341
2543
  const [location, setLocation] = useState5(null);
2342
- useEffect11(() => {
2544
+ useEffect12(() => {
2343
2545
  if (!isVisible) {
2344
2546
  return;
2345
2547
  }
@@ -2357,11 +2559,11 @@ function useGeolocation({ accuracy, distanceInterval, timeInterval }) {
2357
2559
  }
2358
2560
 
2359
2561
  // src/hooks/useWaitForReturnNavigator.tsx
2360
- import { useNavigation as useNavigation2, useVisibilityChange } from "@granite-js/react-native";
2562
+ import { useNavigation as useNavigation3, useVisibilityChange } from "@granite-js/react-native";
2361
2563
  import { useCallback as useCallback11, useRef as useRef4 } from "react";
2362
2564
  function useWaitForReturnNavigator() {
2363
2565
  const callbacks = useRef4([]).current;
2364
- const navigation = useNavigation2();
2566
+ const navigation = useNavigation3();
2365
2567
  const startNavigating = useCallback11(
2366
2568
  (route, params) => {
2367
2569
  return new Promise((resolve) => {
@@ -2499,7 +2701,7 @@ var trackScreen = (url, title) => {
2499
2701
  };
2500
2702
 
2501
2703
  // src/components/WebView.tsx
2502
- import { jsx as jsx19 } from "react/jsx-runtime";
2704
+ import { jsx as jsx24 } from "react/jsx-runtime";
2503
2705
  var operationalEnvironment = appsInTossConstantBridges.getOperationalEnvironment();
2504
2706
  var TYPES = ["partner", "external", "game"];
2505
2707
  var WEBVIEW_TYPES = {
@@ -2539,10 +2741,8 @@ function WebView({ type, local, onMessage, ...props }) {
2539
2741
  const webViewRef = useRef5(null);
2540
2742
  const url = useMemo6(() => getWebViewURL(local), [local]);
2541
2743
  const webBackHandler = useWebBackHandler(url, webViewRef);
2542
- const top = useSafeAreaTop3();
2543
- const bottom = useSafeAreaBottom();
2544
- const insets = useSafeAreaInsets4();
2545
2744
  const global2 = getAppsInTossGlobals();
2745
+ const insets = useSafeAreaInsets3();
2546
2746
  const navigationBarContext = useNavigationBarContext();
2547
2747
  const safeAreaInsetsEvent = useSafeAreaInsetsEvent();
2548
2748
  const [allowsBackForwardNavigationGestures, setAllowsBackForwardNavigationGestures] = useState6(
@@ -2552,7 +2752,7 @@ function WebView({ type, local, onMessage, ...props }) {
2552
2752
  onMessage,
2553
2753
  eventListenerMap: {
2554
2754
  ...appsInTossEventBridges,
2555
- navigationAccessoryEvent: ({ onEvent, onError }) => tdsEvent.addEventListener("navigationAccessoryEvent", { onEvent, onError }),
2755
+ navigationAccessoryEvent: ({ onEvent, onError }) => tdsEvent2.addEventListener("navigationAccessoryEvent", { onEvent, onError }),
2556
2756
  backEvent: ({ onEvent }) => {
2557
2757
  webBackHandler.addEventListener(onEvent);
2558
2758
  return () => {
@@ -2580,12 +2780,7 @@ function WebView({ type, local, onMessage, ...props }) {
2580
2780
  },
2581
2781
  constantHandlerMap: {
2582
2782
  ...appsInTossConstantBridges,
2583
- getSafeAreaInsets: () => ({
2584
- top,
2585
- bottom,
2586
- left: insets.left,
2587
- right: insets.right
2588
- }),
2783
+ getSafeAreaInsets: () => insets,
2589
2784
  ...Object.fromEntries(Object.entries(global2).map(([key, value]) => [key, () => value])),
2590
2785
  getServerTime_isSupported: getServerTime.isSupported,
2591
2786
  requestReview_isSupported: requestReview.isSupported,
@@ -2667,7 +2862,7 @@ function WebView({ type, local, onMessage, ...props }) {
2667
2862
  colorPreference: "light"
2668
2863
  });
2669
2864
  const refs = mergeRefs(handler.ref, webViewRef);
2670
- useEffect12(() => {
2865
+ useEffect13(() => {
2671
2866
  const callback = () => {
2672
2867
  webBackHandler.handleWebBack();
2673
2868
  return true;
@@ -2676,7 +2871,7 @@ function WebView({ type, local, onMessage, ...props }) {
2676
2871
  return () => subscription.remove();
2677
2872
  }, [webBackHandler]);
2678
2873
  const handleWebViewProcessDidTerminate = useHandleWebViewProcessDidTerminate(webViewRef);
2679
- return /* @__PURE__ */ jsx19(
2874
+ return /* @__PURE__ */ jsx24(
2680
2875
  BaseWebView,
2681
2876
  {
2682
2877
  ref: refs,
@@ -2699,14 +2894,14 @@ function WebView({ type, local, onMessage, ...props }) {
2699
2894
  webBackHandler.onNavigationStateChange(event);
2700
2895
  },
2701
2896
  textZoom: 100,
2702
- userAgent: Platform6.OS === "ios" ? userAgent : void 0,
2897
+ userAgent: Platform4.OS === "ios" ? userAgent : void 0,
2703
2898
  sharedCookiesEnabled: true,
2704
2899
  webviewDebuggingEnabled: webViewDebuggingEnabled,
2705
2900
  thirdPartyCookiesEnabled: true,
2706
2901
  onMessage: handler.onMessage,
2707
2902
  injectedJavaScript: afterDocumentLoad,
2708
2903
  injectedJavaScriptBeforeContentLoaded: [handler.injectedJavaScript, beforeDocumentLoad].join("\n"),
2709
- decelerationRate: Platform6.OS === "ios" ? 1 : void 0,
2904
+ decelerationRate: Platform4.OS === "ios" ? 1 : void 0,
2710
2905
  allowsBackForwardNavigationGestures,
2711
2906
  onShouldStartLoadWithRequest: (event) => {
2712
2907
  try {
@@ -2746,8 +2941,8 @@ import { StartUpdateLocationPermissionError } from "@apps-in-toss/types";
2746
2941
 
2747
2942
  // src/ads/inlineAd/InlineAd.tsx
2748
2943
  import { ImpressionArea, useVisibilityChange as useVisibilityChange2 } from "@granite-js/react-native";
2749
- import { useEffect as useEffect13, useRef as useRef8, useState as useState7 } from "react";
2750
- import { StyleSheet as StyleSheet3, View as View7, useColorScheme } from "react-native";
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";
2751
2946
 
2752
2947
  // src/ads/inlineAd/constants.ts
2753
2948
  var SDK_ID = "106";
@@ -3132,13 +3327,13 @@ import { useRef as useRef6 } from "react";
3132
3327
  import {
3133
3328
  Animated,
3134
3329
  Easing,
3135
- Image,
3330
+ Image as Image2,
3136
3331
  Pressable as Pressable2,
3137
3332
  StyleSheet,
3138
- Text,
3139
- View as View5
3333
+ Text as Text2,
3334
+ View as View7
3140
3335
  } from "react-native";
3141
- import { jsx as jsx20, jsxs as jsxs9 } from "react/jsx-runtime";
3336
+ import { jsx as jsx25, jsxs as jsxs11 } from "react/jsx-runtime";
3142
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";
3143
3338
  function FeedBannerAdView({
3144
3339
  brandName,
@@ -3150,7 +3345,7 @@ function FeedBannerAdView({
3150
3345
  ctaTextColor,
3151
3346
  ctaBackgroundColor,
3152
3347
  adClearanceText,
3153
- colors,
3348
+ colors: colors4,
3154
3349
  isAdBadgeEnabled,
3155
3350
  paddingStyle,
3156
3351
  onPress
@@ -3172,7 +3367,7 @@ function FeedBannerAdView({
3172
3367
  };
3173
3368
  const resolvedCtaBackground = ctaBackgroundColor ?? "#3081F9";
3174
3369
  const resolvedCtaTextColor = ctaTextColor ?? "#ffffff";
3175
- return /* @__PURE__ */ jsx20(
3370
+ return /* @__PURE__ */ jsx25(
3176
3371
  Pressable2,
3177
3372
  {
3178
3373
  accessibilityRole: "button",
@@ -3180,10 +3375,10 @@ function FeedBannerAdView({
3180
3375
  onPressIn: handlePressIn,
3181
3376
  onPressOut: handlePressOut,
3182
3377
  style: styles.pressable,
3183
- children: /* @__PURE__ */ jsxs9(Animated.View, { style: [styles.container, paddingStyle, { transform: [{ scale }] }], children: [
3184
- /* @__PURE__ */ jsxs9(View5, { style: styles.profileContainer, children: [
3185
- /* @__PURE__ */ jsxs9(View5, { style: styles.brandArea, children: [
3186
- /* @__PURE__ */ jsx20(
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(
3187
3382
  Pressable2,
3188
3383
  {
3189
3384
  accessibilityRole: "button",
@@ -3191,59 +3386,59 @@ function FeedBannerAdView({
3191
3386
  onPressIn: handlePressIn,
3192
3387
  onPressOut: handlePressOut,
3193
3388
  style: styles.logoContainer,
3194
- children: /* @__PURE__ */ jsxs9(View5, { style: [styles.logoWrapper, { backgroundColor: colors.brandLogoBg }], children: [
3195
- brandLogoUri ? /* @__PURE__ */ jsx20(Image, { source: { uri: brandLogoUri }, style: styles.logoImage, resizeMode: "cover" }) : null,
3196
- /* @__PURE__ */ jsx20(View5, { style: [styles.logoOverlay, { borderColor: colors.brandLogoBorder }] })
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 }] })
3197
3392
  ] })
3198
3393
  }
3199
3394
  ),
3200
- /* @__PURE__ */ jsxs9(View5, { style: styles.brandTextContainer, children: [
3201
- /* @__PURE__ */ jsx20(
3395
+ /* @__PURE__ */ jsxs11(View7, { style: styles.brandTextContainer, children: [
3396
+ /* @__PURE__ */ jsx25(
3202
3397
  Pressable2,
3203
3398
  {
3204
3399
  accessibilityRole: "button",
3205
3400
  onPress: () => onPress("103"),
3206
3401
  onPressIn: handlePressIn,
3207
3402
  onPressOut: handlePressOut,
3208
- children: /* @__PURE__ */ jsx20(
3209
- Text,
3403
+ children: /* @__PURE__ */ jsx25(
3404
+ Text2,
3210
3405
  {
3211
3406
  allowFontScaling: false,
3212
3407
  numberOfLines: 1,
3213
- style: [styles.brandName, { color: colors.brandName }],
3408
+ style: [styles.brandName, { color: colors4.brandName }],
3214
3409
  children: brandName
3215
3410
  }
3216
3411
  )
3217
3412
  }
3218
3413
  ),
3219
- isAdBadgeEnabled ? /* @__PURE__ */ jsx20(Text, { allowFontScaling: false, numberOfLines: 1, style: [styles.adBadge, { color: colors.adBadge }], children: "\uAD11\uACE0" }) : null
3414
+ isAdBadgeEnabled ? /* @__PURE__ */ jsx25(Text2, { allowFontScaling: false, numberOfLines: 1, style: [styles.adBadge, { color: colors4.adBadge }], children: "\uAD11\uACE0" }) : null
3220
3415
  ] })
3221
3416
  ] }),
3222
- /* @__PURE__ */ jsxs9(View5, { style: styles.textArea, children: [
3223
- /* @__PURE__ */ jsx20(
3417
+ /* @__PURE__ */ jsxs11(View7, { style: styles.textArea, children: [
3418
+ /* @__PURE__ */ jsx25(
3224
3419
  Pressable2,
3225
3420
  {
3226
3421
  accessibilityRole: "button",
3227
3422
  onPress: () => onPress("101"),
3228
3423
  onPressIn: handlePressIn,
3229
3424
  onPressOut: handlePressOut,
3230
- children: /* @__PURE__ */ jsx20(Text, { allowFontScaling: false, style: [styles.title, { color: colors.title }], children: title })
3425
+ children: /* @__PURE__ */ jsx25(Text2, { allowFontScaling: false, style: [styles.title, { color: colors4.title }], children: title })
3231
3426
  }
3232
3427
  ),
3233
- /* @__PURE__ */ jsx20(
3428
+ /* @__PURE__ */ jsx25(
3234
3429
  Pressable2,
3235
3430
  {
3236
3431
  accessibilityRole: "button",
3237
3432
  onPress: () => onPress("102"),
3238
3433
  onPressIn: handlePressIn,
3239
3434
  onPressOut: handlePressOut,
3240
- children: /* @__PURE__ */ jsx20(Text, { allowFontScaling: false, style: [styles.subtitle, { color: colors.subtitle }], children: subtitle })
3435
+ children: /* @__PURE__ */ jsx25(Text2, { allowFontScaling: false, style: [styles.subtitle, { color: colors4.subtitle }], children: subtitle })
3241
3436
  }
3242
3437
  )
3243
3438
  ] })
3244
3439
  ] }),
3245
- /* @__PURE__ */ jsxs9(View5, { style: styles.card, children: [
3246
- /* @__PURE__ */ jsx20(
3440
+ /* @__PURE__ */ jsxs11(View7, { style: styles.card, children: [
3441
+ /* @__PURE__ */ jsx25(
3247
3442
  Pressable2,
3248
3443
  {
3249
3444
  accessibilityRole: "button",
@@ -3251,10 +3446,10 @@ function FeedBannerAdView({
3251
3446
  onPressIn: handlePressIn,
3252
3447
  onPressOut: handlePressOut,
3253
3448
  style: styles.imageButton,
3254
- children: /* @__PURE__ */ jsx20(View5, { style: styles.imageContainer, children: mainImageUri ? /* @__PURE__ */ jsx20(Image, { source: { uri: mainImageUri }, style: styles.mainImage, resizeMode: "cover" }) : null })
3449
+ children: /* @__PURE__ */ jsx25(View7, { style: styles.imageContainer, children: mainImageUri ? /* @__PURE__ */ jsx25(Image2, { source: { uri: mainImageUri }, style: styles.mainImage, resizeMode: "cover" }) : null })
3255
3450
  }
3256
3451
  ),
3257
- /* @__PURE__ */ jsxs9(
3452
+ /* @__PURE__ */ jsxs11(
3258
3453
  Pressable2,
3259
3454
  {
3260
3455
  accessibilityRole: "button",
@@ -3263,14 +3458,14 @@ function FeedBannerAdView({
3263
3458
  onPressOut: handlePressOut,
3264
3459
  style: [styles.cta, { backgroundColor: resolvedCtaBackground }],
3265
3460
  children: [
3266
- /* @__PURE__ */ jsx20(Text, { allowFontScaling: false, style: [styles.ctaText, { color: resolvedCtaTextColor }], children: ctaText }),
3267
- /* @__PURE__ */ jsx20(Svg, { width: 20, height: 20, viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx20(Path, { d: ARROW_PATH, fill: resolvedCtaTextColor }) })
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 }) })
3268
3463
  ]
3269
3464
  }
3270
3465
  ),
3271
- /* @__PURE__ */ jsx20(View5, { style: [styles.cardOverlay, { borderColor: colors.imageOverlayBorder }] })
3466
+ /* @__PURE__ */ jsx25(View7, { style: [styles.cardOverlay, { borderColor: colors4.imageOverlayBorder }] })
3272
3467
  ] }),
3273
- adClearanceText ? /* @__PURE__ */ jsx20(Text, { allowFontScaling: false, style: [styles.adClearance, { color: colors.adClearance }], children: adClearanceText }) : null
3468
+ adClearanceText ? /* @__PURE__ */ jsx25(Text2, { allowFontScaling: false, style: [styles.adClearance, { color: colors4.adClearance }], children: adClearanceText }) : null
3274
3469
  ] })
3275
3470
  }
3276
3471
  );
@@ -3392,8 +3587,8 @@ var styles = StyleSheet.create({
3392
3587
  // src/ads/inlineAd/ui/ListBannerAdView.tsx
3393
3588
  import { ClipPath, Defs, Image as SvgImage, Path as Path2, Svg as Svg2 } from "@granite-js/native/react-native-svg";
3394
3589
  import { useRef as useRef7 } from "react";
3395
- import { Animated as Animated2, Easing as Easing2, Pressable as Pressable3, StyleSheet as StyleSheet2, Text as Text2, View as View6 } from "react-native";
3396
- import { jsx as jsx21, jsxs as jsxs10 } from "react/jsx-runtime";
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";
3397
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";
3398
3593
  function ListBannerAdView({
3399
3594
  title,
@@ -3402,7 +3597,7 @@ function ListBannerAdView({
3402
3597
  adClearanceFontSize,
3403
3598
  imageUri,
3404
3599
  paddingStyle,
3405
- colors,
3600
+ colors: colors4,
3406
3601
  onPress
3407
3602
  }) {
3408
3603
  const scale = useRef7(new Animated2.Value(1)).current;
@@ -3421,7 +3616,7 @@ function ListBannerAdView({
3421
3616
  const handlePressOut = () => {
3422
3617
  animateScale(1);
3423
3618
  };
3424
- return /* @__PURE__ */ jsx21(
3619
+ return /* @__PURE__ */ jsx26(
3425
3620
  Pressable3,
3426
3621
  {
3427
3622
  accessibilityRole: "button",
@@ -3429,9 +3624,9 @@ function ListBannerAdView({
3429
3624
  onPressIn: handlePressIn,
3430
3625
  onPressOut: handlePressOut,
3431
3626
  style: styles2.pressable,
3432
- children: /* @__PURE__ */ jsxs10(Animated2.View, { style: [styles2.container, paddingStyle, { transform: [{ scale }] }], children: [
3433
- /* @__PURE__ */ jsxs10(View6, { style: styles2.titleRow, children: [
3434
- /* @__PURE__ */ jsx21(
3627
+ children: /* @__PURE__ */ jsxs12(Animated2.View, { style: [styles2.container, paddingStyle, { transform: [{ scale }] }], children: [
3628
+ /* @__PURE__ */ jsxs12(View8, { style: styles2.titleRow, children: [
3629
+ /* @__PURE__ */ jsx26(
3435
3630
  Pressable3,
3436
3631
  {
3437
3632
  accessibilityRole: "button",
@@ -3439,10 +3634,10 @@ function ListBannerAdView({
3439
3634
  onPressIn: handlePressIn,
3440
3635
  onPressOut: handlePressOut,
3441
3636
  style: styles2.iconWrapper,
3442
- children: /* @__PURE__ */ jsxs10(Svg2, { width: 36, height: 36, viewBox: "0 0 36 36", children: [
3443
- /* @__PURE__ */ jsx21(Defs, { children: /* @__PURE__ */ jsx21(ClipPath, { id: clipIdRef.current, children: /* @__PURE__ */ jsx21(Path2, { d: SQUIRCLE_PATH }) }) }),
3444
- /* @__PURE__ */ jsx21(Path2, { d: SQUIRCLE_PATH, fill: colors.iconBg }),
3445
- imageUri ? /* @__PURE__ */ jsx21(
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(
3446
3641
  SvgImage,
3447
3642
  {
3448
3643
  href: { uri: imageUri },
@@ -3452,12 +3647,12 @@ function ListBannerAdView({
3452
3647
  clipPath: `url(#${clipIdRef.current})`
3453
3648
  }
3454
3649
  ) : null,
3455
- /* @__PURE__ */ jsx21(
3650
+ /* @__PURE__ */ jsx26(
3456
3651
  Path2,
3457
3652
  {
3458
3653
  d: SQUIRCLE_PATH,
3459
3654
  fill: "none",
3460
- stroke: colors.iconBorder,
3655
+ stroke: colors4.iconBorder,
3461
3656
  strokeWidth: 2,
3462
3657
  clipPath: `url(#${clipIdRef.current})`
3463
3658
  }
@@ -3465,37 +3660,37 @@ function ListBannerAdView({
3465
3660
  ] })
3466
3661
  }
3467
3662
  ),
3468
- /* @__PURE__ */ jsxs10(View6, { style: styles2.textWrapper, children: [
3469
- /* @__PURE__ */ jsx21(
3663
+ /* @__PURE__ */ jsxs12(View8, { style: styles2.textWrapper, children: [
3664
+ /* @__PURE__ */ jsx26(
3470
3665
  Pressable3,
3471
3666
  {
3472
3667
  accessibilityRole: "button",
3473
3668
  onPress: () => onPress("101"),
3474
3669
  onPressIn: handlePressIn,
3475
3670
  onPressOut: handlePressOut,
3476
- children: /* @__PURE__ */ jsx21(Text2, { allowFontScaling: false, style: [styles2.title, { color: colors.title }], children: title })
3671
+ children: /* @__PURE__ */ jsx26(Text3, { allowFontScaling: false, style: [styles2.title, { color: colors4.title }], children: title })
3477
3672
  }
3478
3673
  ),
3479
- /* @__PURE__ */ jsx21(
3674
+ /* @__PURE__ */ jsx26(
3480
3675
  Pressable3,
3481
3676
  {
3482
3677
  accessibilityRole: "button",
3483
3678
  onPress: () => onPress("102"),
3484
3679
  onPressIn: handlePressIn,
3485
3680
  onPressOut: handlePressOut,
3486
- children: /* @__PURE__ */ jsx21(Text2, { allowFontScaling: false, style: [styles2.subtitle, { color: colors.subtitle }], children: subtitle })
3681
+ children: /* @__PURE__ */ jsx26(Text3, { allowFontScaling: false, style: [styles2.subtitle, { color: colors4.subtitle }], children: subtitle })
3487
3682
  }
3488
3683
  )
3489
3684
  ] })
3490
3685
  ] }),
3491
- adClearanceText ? /* @__PURE__ */ jsx21(
3492
- Text2,
3686
+ adClearanceText ? /* @__PURE__ */ jsx26(
3687
+ Text3,
3493
3688
  {
3494
3689
  allowFontScaling: false,
3495
3690
  style: [
3496
3691
  styles2.adClearance,
3497
3692
  {
3498
- color: colors.adClearance,
3693
+ color: colors4.adClearance,
3499
3694
  fontSize: adClearanceFontSize,
3500
3695
  lineHeight: adClearanceFontSize * 1.2
3501
3696
  }
@@ -3626,7 +3821,7 @@ function buildNoFillPayload(slotId, adGroupId) {
3626
3821
  }
3627
3822
 
3628
3823
  // src/ads/inlineAd/InlineAd.tsx
3629
- import { jsx as jsx22, jsxs as jsxs11 } from "react/jsx-runtime";
3824
+ import { jsx as jsx27, jsxs as jsxs13 } from "react/jsx-runtime";
3630
3825
  var themePalette = {
3631
3826
  light: {
3632
3827
  title: "#4e5968",
@@ -3742,7 +3937,7 @@ function InlineAd(props) {
3742
3937
  const resolvedTheme = selectedTheme === "auto" ? colorScheme === "dark" ? "dark" : "light" : selectedTheme;
3743
3938
  const resolvedTone = tone ?? DEFAULT_INLINE_AD_TONE;
3744
3939
  const resolvedVariant = variant ?? DEFAULT_INLINE_AD_VARIANT;
3745
- const colors = themePalette[resolvedTheme];
3940
+ const colors4 = themePalette[resolvedTheme];
3746
3941
  const feedColors = feedThemePalette[resolvedTheme];
3747
3942
  const backgroundColor = resolvedTone === "grey" ? resolvedTheme === "dark" ? "#101013" : "#f2f4f7" : resolvedTheme === "dark" ? "#17171c" : "#ffffff";
3748
3943
  callbacksRef.current = {
@@ -3753,7 +3948,7 @@ function InlineAd(props) {
3753
3948
  onAdFailedToRender,
3754
3949
  onNoFill
3755
3950
  };
3756
- useEffect13(() => {
3951
+ useEffect14(() => {
3757
3952
  isMountedRef.current = true;
3758
3953
  return () => {
3759
3954
  isMountedRef.current = false;
@@ -3763,7 +3958,7 @@ function InlineAd(props) {
3763
3958
  }
3764
3959
  };
3765
3960
  }, []);
3766
- useEffect13(() => {
3961
+ useEffect14(() => {
3767
3962
  const normalizedAdGroupId = normalizeAdGroupId(adGroupId);
3768
3963
  const loadAdRequest = () => {
3769
3964
  if (loadingRef.current) {
@@ -3848,7 +4043,7 @@ function InlineAd(props) {
3848
4043
  loadRef.current?.();
3849
4044
  }
3850
4045
  });
3851
- useEffect13(() => {
4046
+ useEffect14(() => {
3852
4047
  if (!ad || hasRenderedRef.current) {
3853
4048
  return;
3854
4049
  }
@@ -3933,28 +4128,28 @@ function InlineAd(props) {
3933
4128
  callbacksRef.current.onAdClicked?.(basePayload);
3934
4129
  }
3935
4130
  };
3936
- return /* @__PURE__ */ jsx22(
4131
+ return /* @__PURE__ */ jsx27(
3937
4132
  ImpressionArea,
3938
4133
  {
3939
4134
  style: styles3.impressionArea,
3940
4135
  onImpressionStart: handleImpression1px,
3941
4136
  areaThreshold: 0,
3942
4137
  UNSAFE__impressFallbackOnMount: Boolean(impressFallbackOnMount),
3943
- children: /* @__PURE__ */ jsx22(
4138
+ children: /* @__PURE__ */ jsx27(
3944
4139
  ImpressionArea,
3945
4140
  {
3946
4141
  onImpressionStart: handleImpression100p,
3947
4142
  areaThreshold: 1,
3948
4143
  UNSAFE__impressFallbackOnMount: Boolean(impressFallbackOnMount),
3949
- children: /* @__PURE__ */ jsx22(
4144
+ children: /* @__PURE__ */ jsx27(
3950
4145
  ImpressionArea,
3951
4146
  {
3952
4147
  onImpressionStart: handleViewableStart,
3953
4148
  onImpressionEnd: handleViewableEnd,
3954
4149
  areaThreshold: 0.5,
3955
4150
  UNSAFE__impressFallbackOnMount: Boolean(impressFallbackOnMount),
3956
- children: /* @__PURE__ */ jsx22(View7, { style: [styles3.wrapper, resolvedVariant === "card" && styles3.cardWrapper], children: /* @__PURE__ */ jsxs11(View7, { style: [styles3.surface, { backgroundColor }, resolvedVariant === "card" && styles3.cardSurface], children: [
3957
- isListBanner && listCreative ? /* @__PURE__ */ jsx22(
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(
3958
4153
  ListBannerAdView,
3959
4154
  {
3960
4155
  title: listCreative.title,
@@ -3963,11 +4158,11 @@ function InlineAd(props) {
3963
4158
  adClearanceFontSize,
3964
4159
  imageUri,
3965
4160
  paddingStyle,
3966
- colors,
4161
+ colors: colors4,
3967
4162
  onPress: handleClick
3968
4163
  }
3969
4164
  ) : null,
3970
- isFeedBanner && feedCreative ? /* @__PURE__ */ jsx22(
4165
+ isFeedBanner && feedCreative ? /* @__PURE__ */ jsx27(
3971
4166
  FeedBannerAdView,
3972
4167
  {
3973
4168
  brandName: feedCreative.brandName,