@apps-in-toss/framework 2.9.1 → 2.9.3

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.
Files changed (3) hide show
  1. package/dist/index.cjs +225 -122
  2. package/dist/index.js +135 -32
  3. package/package.json +7 -7
package/dist/index.cjs CHANGED
@@ -56,7 +56,7 @@ var import_analytics2 = require("@apps-in-toss/analytics");
56
56
  var import_analytics = require("@apps-in-toss/analytics");
57
57
  var import_native_modules10 = require("@apps-in-toss/native-modules");
58
58
  var import_react_native27 = require("@granite-js/react-native");
59
- var import_tds_react_native11 = require("@toss/tds-react-native");
59
+ var import_tds_react_native12 = require("@toss/tds-react-native");
60
60
  var import_react_native28 = require("react-native");
61
61
 
62
62
  // src/core/components/AppEvent.tsx
@@ -185,7 +185,7 @@ function useNavigationBarContext() {
185
185
 
186
186
  // src/components/RNAppContainer.tsx
187
187
  var import_native_modules9 = require("@apps-in-toss/native-modules");
188
- var import_react16 = require("react");
188
+ var import_react17 = require("react");
189
189
  var import_react_native26 = require("react-native");
190
190
 
191
191
  // src/components/GameInitializer.tsx
@@ -657,7 +657,28 @@ function useHardwareBackPress(handler) {
657
657
 
658
658
  // src/components/NavigationBar/RNNavigationBar/hooks/useNavigationEvent.ts
659
659
  var import_react_native13 = require("@granite-js/react-native");
660
+ var import_react13 = require("react");
661
+
662
+ // src/components/NavigationBar/RNNavigationBar/hooks/useCloseConfirm.ts
663
+ var import_tds_react_native5 = require("@toss/tds-react-native");
664
+ var import_es_hangul2 = require("es-hangul");
660
665
  var import_react12 = require("react");
666
+ function useCloseConfirm() {
667
+ const { brandDisplayName } = getAppsInTossGlobals();
668
+ const { openConfirm } = (0, import_tds_react_native5.useDialog)();
669
+ return (0, import_react12.useCallback)(
670
+ async ({ onEntered }) => {
671
+ return await openConfirm({
672
+ title: `${(0, import_es_hangul2.josa)(brandDisplayName, "\uC744/\uB97C")} \uC885\uB8CC\uD560\uAE4C\uC694?`,
673
+ leftButton: "\uB2EB\uAE30",
674
+ rightButton: "\uC885\uB8CC\uD558\uAE30",
675
+ closeOnDimmerClick: true,
676
+ onEntered
677
+ });
678
+ },
679
+ [brandDisplayName, openConfirm]
680
+ );
681
+ }
661
682
 
662
683
  // src/utils/eventEmitter.ts
663
684
  var EventEmitter = class {
@@ -703,8 +724,12 @@ var safeAreaInsetsChange = createEvent("safeAreaInsetsChange");
703
724
  var import_react_native12 = require("@granite-js/react-native");
704
725
  var NAVI_BAR_IMPRESSION_SCHEMA_ID = 1596837;
705
726
  var NAVI_BAR_IMPRESSION_LOG_NAME = "appsintoss_app_visit__common_module::impression__navigation_bar";
727
+ var CLOSE_POPUP_SHOW_SCHEMA_ID = 1644490;
728
+ var CLOSE_POPUP_SHOW_LOG_NAME = "appsintoss_app_visit__common_module::popup__close_app";
706
729
  var CLOSE_BUTTON_CLICK_SCHEMA_ID = 1596831;
707
730
  var CLOSE_BUTTON_CLICK_LOG_NAME = "appsintoss_app_visit__common_module::click__icon_close";
731
+ var CLOSE_POPUP_CTA_CLICK_SCHEMA_ID = 1644492;
732
+ var CLOSE_POPUP_CTA_CLICK_LOG_NAME = "appsintoss_app_visit__common_module::popup__close_app::click__cta";
708
733
  var HOME_BUTTON_CLICK_SCHEMA_ID = 1596839;
709
734
  var HOME_BUTTON_CLICK_LOG_NAME = "appsintoss_app_visit__common_module::click__icon_home";
710
735
  function useNavigationBarLogging() {
@@ -747,8 +772,32 @@ function useNavigationBarLogging() {
747
772
  }
748
773
  });
749
774
  };
775
+ const logClosePopupShow = () => {
776
+ sendLog({
777
+ log_name: CLOSE_POPUP_SHOW_LOG_NAME,
778
+ log_type: "popup",
779
+ params: {
780
+ ...baseParams,
781
+ schema_id: CLOSE_POPUP_SHOW_SCHEMA_ID
782
+ }
783
+ });
784
+ };
785
+ const logClosePopupCtaClick = (confirm) => {
786
+ sendLog({
787
+ log_name: CLOSE_POPUP_CTA_CLICK_LOG_NAME,
788
+ log_type: "event",
789
+ params: {
790
+ ...baseParams,
791
+ close_yn: confirm ? "Y" : "N",
792
+ schema_id: CLOSE_POPUP_CTA_CLICK_SCHEMA_ID,
793
+ event_type: "click"
794
+ }
795
+ });
796
+ };
750
797
  return {
751
798
  navBarImpression: logNavBarImpression,
799
+ closePopupShow: logClosePopupShow,
800
+ closePopupCtaClick: logClosePopupCtaClick,
752
801
  closeButtonClick: logCloseButtonClick,
753
802
  homeButtonClick: logHomeButtonClick
754
803
  };
@@ -759,15 +808,30 @@ function useNavigationEvent() {
759
808
  const backEventContext = (0, import_react_native13.useBackEventContext)();
760
809
  const logging = useNavigationBarLogging();
761
810
  const navigation = (0, import_react_native13.useNavigation)();
762
- return (0, import_react12.useMemo)(
763
- () => ({
811
+ const closeConfirm = useCloseConfirm();
812
+ const global2 = getAppsInTossGlobals();
813
+ return (0, import_react13.useMemo)(() => {
814
+ const close = async () => {
815
+ if (global2.appType !== "game") {
816
+ (0, import_react_native13.closeView)();
817
+ return;
818
+ }
819
+ const hasConfirmed = await closeConfirm({
820
+ onEntered: logging.closePopupShow
821
+ });
822
+ logging.closePopupCtaClick(hasConfirmed);
823
+ if (hasConfirmed) {
824
+ (0, import_react_native13.closeView)();
825
+ }
826
+ };
827
+ return {
764
828
  handleBack: () => {
765
829
  if (backEventContext.hasBackEvent) {
766
830
  backEventContext.onBack();
767
831
  } else if (navigation.canGoBack()) {
768
832
  navigation.goBack();
769
833
  } else {
770
- (0, import_react_native13.closeView)();
834
+ close();
771
835
  }
772
836
  },
773
837
  handleHomeButtonClick: () => {
@@ -780,27 +844,26 @@ function useNavigationEvent() {
780
844
  },
781
845
  handleCloseButtonClick: () => {
782
846
  logging.closeButtonClick();
783
- (0, import_react_native13.closeView)();
847
+ close();
784
848
  }
785
- }),
786
- [backEventContext, navigation, logging]
787
- );
849
+ };
850
+ }, [global2.appType, backEventContext, navigation, closeConfirm, logging]);
788
851
  }
789
852
 
790
853
  // src/core/hooks/useMoreButtonBottomSheet/index.tsx
791
854
  var import_native_modules8 = require("@apps-in-toss/native-modules");
792
855
  var import_react_native18 = require("@granite-js/react-native");
793
- var import_tds_react_native7 = require("@toss/tds-react-native");
856
+ var import_tds_react_native8 = require("@toss/tds-react-native");
794
857
  var import_private4 = require("@toss/tds-react-native/private");
795
- var import_react13 = require("react");
858
+ var import_react14 = require("react");
796
859
 
797
860
  // src/core/hooks/useMoreButtonBottomSheet/AppShareListMenu.tsx
798
861
  var import_native_modules5 = require("@apps-in-toss/native-modules");
799
862
  var import_react_native16 = require("@granite-js/react-native");
800
- var import_tds_react_native6 = require("@toss/tds-react-native");
863
+ var import_tds_react_native7 = require("@toss/tds-react-native");
801
864
 
802
865
  // src/core/hooks/useMoreButtonBottomSheet/Menu.tsx
803
- var import_tds_react_native5 = require("@toss/tds-react-native");
866
+ var import_tds_react_native6 = require("@toss/tds-react-native");
804
867
  var import_private3 = require("@toss/tds-react-native/private");
805
868
  var import_react_native15 = require("react-native");
806
869
 
@@ -882,7 +945,7 @@ function Menu({ title, iconURL, onPress }) {
882
945
  const brandPrimaryColorRGB = hexToRGB(globals.brandPrimaryColor);
883
946
  const iconBackgroundColor = brandPrimaryColorRGB ? `rgba(${brandPrimaryColorRGB.join(",")},0.1)` : adaptive.grey100;
884
947
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
885
- import_tds_react_native5.ListRow,
948
+ import_tds_react_native6.ListRow,
886
949
  {
887
950
  left: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
888
951
  import_react_native15.View,
@@ -897,10 +960,10 @@ function Menu({ title, iconURL, onPress }) {
897
960
  marginRight: 16,
898
961
  backgroundColor: iconBackgroundColor
899
962
  },
900
- children: iconName ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_tds_react_native5.Asset.Icon, { frameShape: { width: 20, height: 20 }, color: globals.brandPrimaryColor, name: iconName }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_tds_react_native5.Asset.Image, { frameShape: { width: 20, height: 20 }, source: { uri: iconURL } })
963
+ children: iconName ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_tds_react_native6.Asset.Icon, { frameShape: { width: 20, height: 20 }, color: globals.brandPrimaryColor, name: iconName }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_tds_react_native6.Asset.Image, { frameShape: { width: 20, height: 20 }, source: { uri: iconURL } })
901
964
  }
902
965
  ),
903
- contents: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_tds_react_native5.ListRow.Texts, { type: "1RowTypeA", top: title, topProps: { color: adaptive.grey700 } }),
966
+ contents: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_tds_react_native6.ListRow.Texts, { type: "1RowTypeA", top: title, topProps: { color: adaptive.grey700 } }),
904
967
  verticalPadding: "extraSmall",
905
968
  onPress: () => {
906
969
  logging.menuClick({ title });
@@ -947,7 +1010,7 @@ var APP_SHARE_MENU_INFO = {
947
1010
  function AppShareListMenu() {
948
1011
  const initialScheme = (0, import_react_native16.getSchemeUri)();
949
1012
  const isSandbox = (0, import_native_modules5.getOperationalEnvironment)() === "sandbox";
950
- const { openConfirm } = (0, import_tds_react_native6.useDialog)();
1013
+ const { openConfirm } = (0, import_tds_react_native7.useDialog)();
951
1014
  const schemeForShare = addParamsToUrl(initialScheme, {
952
1015
  referrer: SHARE_SCHEME_REFERRER
953
1016
  });
@@ -1057,7 +1120,7 @@ var MIN_VERSION = {
1057
1120
  function useMoreButtonBottomSheet() {
1058
1121
  const globals = getAppsInTossGlobals();
1059
1122
  const adaptive = (0, import_private4.useAdaptive)();
1060
- const [itemList, setItemList] = (0, import_react13.useState)([]);
1123
+ const [itemList, setItemList] = (0, import_react14.useState)([]);
1061
1124
  const appUpdateDialog = useAppUpdateDialog();
1062
1125
  const logging = useMoreButtonBottomSheetLogging();
1063
1126
  const overlay = (0, import_private4.useOverlay)();
@@ -1066,7 +1129,7 @@ function useMoreButtonBottomSheet() {
1066
1129
  const isBottomSheetSupported = (0, import_native_modules8.isMinVersionSupported)(MIN_VERSION.BOTTOM_SHEET);
1067
1130
  const isShareListMenuSupported = (0, import_native_modules8.isMinVersionSupported)(MIN_VERSION.SHARE_LIST_MENU);
1068
1131
  const isSettingsMenuSupported = (0, import_native_modules8.isMinVersionSupported)(MIN_VERSION.SETTINGS_MENU);
1069
- (0, import_react13.useEffect)(() => {
1132
+ (0, import_react14.useEffect)(() => {
1070
1133
  if (!isBottomSheetSupported) {
1071
1134
  return;
1072
1135
  }
@@ -1094,17 +1157,17 @@ function useMoreButtonBottomSheet() {
1094
1157
  close();
1095
1158
  };
1096
1159
  return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(BottomSheetImpressionArea, { children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1097
- import_tds_react_native7.BottomSheet.Root,
1160
+ import_tds_react_native8.BottomSheet.Root,
1098
1161
  {
1099
1162
  header: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1100
- import_tds_react_native7.ListHeader,
1163
+ import_tds_react_native8.ListHeader,
1101
1164
  {
1102
- title: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_tds_react_native7.ListHeader.TitleParagraph, { color: adaptive.grey800, fontWeight: "bold", typography: "t5", children: title })
1165
+ title: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_tds_react_native8.ListHeader.TitleParagraph, { color: adaptive.grey800, fontWeight: "bold", typography: "t5", children: title })
1103
1166
  }
1104
1167
  ),
1105
1168
  open: isOpen,
1106
1169
  cta: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1107
- import_tds_react_native7.BottomSheet.CTA,
1170
+ import_tds_react_native8.BottomSheet.CTA,
1108
1171
  {
1109
1172
  size: "large",
1110
1173
  type: "dark",
@@ -1117,7 +1180,7 @@ function useMoreButtonBottomSheet() {
1117
1180
  ),
1118
1181
  onClose: handleClose,
1119
1182
  onExited: exit,
1120
- children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_tds_react_native7.List, { rowSeparator: "none", children: [
1183
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_tds_react_native8.List, { rowSeparator: "none", children: [
1121
1184
  itemList.map((item) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1122
1185
  Menu,
1123
1186
  {
@@ -1139,7 +1202,7 @@ function useMoreButtonBottomSheet() {
1139
1202
  }
1140
1203
  function BottomSheetImpressionArea({ children }) {
1141
1204
  const logging = useMoreButtonBottomSheetLogging();
1142
- (0, import_react13.useEffect)(() => {
1205
+ (0, import_react14.useEffect)(() => {
1143
1206
  logging.show();
1144
1207
  }, [logging]);
1145
1208
  return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, { children });
@@ -1148,14 +1211,14 @@ function BottomSheetImpressionArea({ children }) {
1148
1211
  // src/components/NavigationBar/TopNavigation/TopNavigation.tsx
1149
1212
  var import_react_native_safe_area_context = require("@granite-js/native/react-native-safe-area-context");
1150
1213
  var import_react_native19 = require("@granite-js/react-native");
1151
- var import_tds_react_native8 = require("@toss/tds-react-native");
1152
- var import_react14 = require("react");
1214
+ var import_tds_react_native9 = require("@toss/tds-react-native");
1215
+ var import_react15 = require("react");
1153
1216
  var import_react_native20 = require("react-native");
1154
1217
  var import_jsx_runtime10 = require("react/jsx-runtime");
1155
1218
  function TopNavigation({ left, center, right }) {
1156
1219
  const insets = (0, import_react_native_safe_area_context.useSafeAreaInsets)();
1157
1220
  const navigation = (0, import_react_native19.useNavigation)();
1158
- (0, import_react14.useEffect)(() => {
1221
+ (0, import_react15.useEffect)(() => {
1159
1222
  const { navigationBar } = getAppsInTossGlobals();
1160
1223
  const parsedNavigationBar = navigationBar ? safeParseNavigationBar(navigationBar) : null;
1161
1224
  const transparent = parsedNavigationBar?.transparentBackground ?? false;
@@ -1167,7 +1230,7 @@ function TopNavigation({ left, center, right }) {
1167
1230
  {
1168
1231
  style: {
1169
1232
  width: "100%",
1170
- backgroundColor: transparent ? void 0 : theme === "light" ? import_tds_react_native8.colors.lightThemeBackground : import_tds_react_native8.colors.darkThemeBackground
1233
+ backgroundColor: transparent ? void 0 : theme === "light" ? import_tds_react_native9.colors.lightThemeBackground : import_tds_react_native9.colors.darkThemeBackground
1171
1234
  },
1172
1235
  pointerEvents: "box-none",
1173
1236
  children: [
@@ -1251,7 +1314,7 @@ function BackButton({ theme = "light", onPress, ...restProps }) {
1251
1314
  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>`;
1252
1315
 
1253
1316
  // src/components/NavigationBar/TopNavigation/HomeButton.tsx
1254
- var import_tds_react_native9 = require("@toss/tds-react-native");
1317
+ var import_tds_react_native10 = require("@toss/tds-react-native");
1255
1318
  var import_react_native22 = require("react-native");
1256
1319
  var import_jsx_runtime12 = require("react/jsx-runtime");
1257
1320
  function HomeButton({ theme = "light", onPress, children }) {
@@ -1266,12 +1329,12 @@ function HomeButton({ theme = "light", onPress, children }) {
1266
1329
  height: 34,
1267
1330
  paddingLeft: 10,
1268
1331
  paddingRight: 10,
1269
- backgroundColor: theme === "light" ? import_tds_react_native9.colors.greyOpacity50 : "rgba(0, 0, 1, 0.58)",
1332
+ backgroundColor: theme === "light" ? import_tds_react_native10.colors.greyOpacity50 : "rgba(0, 0, 1, 0.58)",
1270
1333
  borderRadius: 99
1271
1334
  },
1272
1335
  children: [
1273
1336
  children,
1274
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_tds_react_native9.Icon, { name: "icon-home-mono", size: 18 })
1337
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_tds_react_native10.Icon, { name: "icon-home-mono", size: 18 })
1275
1338
  ]
1276
1339
  }
1277
1340
  );
@@ -1322,12 +1385,12 @@ function AppTitle({ title, iconUrl, theme = "light" }) {
1322
1385
  }
1323
1386
 
1324
1387
  // src/components/NavigationBar/TopNavigation/Menu.tsx
1325
- var import_tds_react_native10 = require("@toss/tds-react-native");
1388
+ var import_tds_react_native11 = require("@toss/tds-react-native");
1326
1389
  var import_react_native25 = require("react-native");
1327
1390
  var import_jsx_runtime14 = require("react/jsx-runtime");
1328
1391
  function Menu2({ theme = "light", accessoryButton, onPressDots, onLongPressDots, onPressClose }) {
1329
- const backgroundColor = theme === "light" ? import_tds_react_native10.colors.greyOpacity50 : "rgba(0, 0, 1, 0.58)";
1330
- const iconColor = theme === "light" ? import_tds_react_native10.colors.greyOpacity600 : "rgba(253, 253, 255, 0.75)";
1392
+ const backgroundColor = theme === "light" ? import_tds_react_native11.colors.greyOpacity50 : "rgba(0, 0, 1, 0.58)";
1393
+ const iconColor = theme === "light" ? import_tds_react_native11.colors.greyOpacity600 : "rgba(253, 253, 255, 0.75)";
1331
1394
  return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react_native25.View, { style: { flexDirection: "row", alignItems: "center", gap: 4 }, children: [
1332
1395
  accessoryButton && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1333
1396
  import_react_native25.View,
@@ -1345,12 +1408,12 @@ function Menu2({ theme = "light", accessoryButton, onPressDots, onLongPressDots,
1345
1408
  backgroundColor
1346
1409
  },
1347
1410
  onPress: () => {
1348
- import_tds_react_native10.tdsEvent.emit("navigationAccessoryEvent", { id: accessoryButton.id });
1411
+ import_tds_react_native11.tdsEvent.emit("navigationAccessoryEvent", { id: accessoryButton.id });
1349
1412
  accessoryButton.onPress?.();
1350
1413
  },
1351
1414
  disabled: accessoryButton.disabled,
1352
1415
  children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1353
- import_tds_react_native10.Icon,
1416
+ import_tds_react_native11.Icon,
1354
1417
  {
1355
1418
  name: accessoryButton.icon.name ?? "",
1356
1419
  accessibilityLabel: accessoryButton.title,
@@ -1375,18 +1438,18 @@ function Menu2({ theme = "light", accessoryButton, onPressDots, onLongPressDots,
1375
1438
  backgroundColor
1376
1439
  },
1377
1440
  children: [
1378
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native25.TouchableOpacity, { onPress: onPressDots, onLongPress: onLongPressDots, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_tds_react_native10.Icon, { name: "icon-dots-mono", accessibilityLabel: "\uB354\uBCF4\uAE30", color: iconColor, size: 20 }) }),
1441
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native25.TouchableOpacity, { onPress: onPressDots, onLongPress: onLongPressDots, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_tds_react_native11.Icon, { name: "icon-dots-mono", accessibilityLabel: "\uB354\uBCF4\uAE30", color: iconColor, size: 20 }) }),
1379
1442
  /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1380
1443
  import_react_native25.View,
1381
1444
  {
1382
1445
  style: {
1383
1446
  width: 1,
1384
1447
  height: 16,
1385
- backgroundColor: theme === "light" ? import_tds_react_native10.colors.greyOpacity200 : "rgba(222, 222, 255, 0.19)"
1448
+ backgroundColor: theme === "light" ? import_tds_react_native11.colors.greyOpacity200 : "rgba(222, 222, 255, 0.19)"
1386
1449
  }
1387
1450
  }
1388
1451
  ),
1389
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native25.TouchableOpacity, { onPress: onPressClose, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_tds_react_native10.Icon, { name: "icon-appsintoss-close-mono", accessibilityLabel: "\uB2EB\uAE30", color: iconColor, size: 20 }) })
1452
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native25.TouchableOpacity, { onPress: onPressClose, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_tds_react_native11.Icon, { name: "icon-appsintoss-close-mono", accessibilityLabel: "\uB2EB\uAE30", color: iconColor, size: 20 }) })
1390
1453
  ]
1391
1454
  }
1392
1455
  ) })
@@ -1394,15 +1457,15 @@ function Menu2({ theme = "light", accessoryButton, onPressDots, onLongPressDots,
1394
1457
  }
1395
1458
 
1396
1459
  // src/components/NavigationBar/common/NavigationBarImpressionArea.tsx
1397
- var import_react15 = require("react");
1460
+ var import_react16 = require("react");
1398
1461
  var import_jsx_runtime15 = require("react/jsx-runtime");
1399
1462
  function NavigationBarImpressionArea({
1400
1463
  children,
1401
1464
  withHomeButton
1402
1465
  }) {
1403
- const hasLogged = (0, import_react15.useRef)(false);
1466
+ const hasLogged = (0, import_react16.useRef)(false);
1404
1467
  const logging = useNavigationBarLogging();
1405
- (0, import_react15.useEffect)(() => {
1468
+ (0, import_react16.useEffect)(() => {
1406
1469
  if (hasLogged.current === false) {
1407
1470
  logging.navBarImpression({ home_icon_yn: withHomeButton ? "Y" : "N" });
1408
1471
  hasLogged.current = true;
@@ -1491,7 +1554,7 @@ function RNAppContainer({ children }) {
1491
1554
  }
1492
1555
  }
1493
1556
  function GameAppContainer({ children }) {
1494
- (0, import_react16.useEffect)(() => {
1557
+ (0, import_react17.useEffect)(() => {
1495
1558
  if (import_react_native26.Platform.OS === "ios") {
1496
1559
  (0, import_native_modules9.setIosSwipeGestureEnabled)({ isEnabled: false });
1497
1560
  return () => {
@@ -1526,7 +1589,7 @@ function AppsInTossContainer(Container, { children, ...initialProps }) {
1526
1589
  }
1527
1590
  return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
1528
1591
  /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(AppEvent.System, { ...initialProps }),
1529
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Container, { ...initialProps, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_tds_react_native11.TDSProvider, { colorPreference: "light", token: { color: { primary: getAppsInTossGlobals().brandPrimaryColor } }, children }) })
1592
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Container, { ...initialProps, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_tds_react_native12.TDSProvider, { colorPreference: "light", token: { color: { primary: getAppsInTossGlobals().brandPrimaryColor } }, children }) })
1530
1593
  ] });
1531
1594
  }
1532
1595
  function registerApp(container, { context, analytics }) {
@@ -1598,32 +1661,44 @@ var appsInTossEventBridges = __toESM(require("@apps-in-toss/native-modules/event
1598
1661
  var import_user_scripts = require("@apps-in-toss/user-scripts");
1599
1662
  var import_react_native_safe_area_context3 = require("@granite-js/native/react-native-safe-area-context");
1600
1663
  var import_react_native41 = require("@granite-js/react-native");
1601
- var import_tds_react_native14 = require("@toss/tds-react-native");
1602
- var import_react27 = require("react");
1664
+ var import_tds_react_native16 = require("@toss/tds-react-native");
1665
+ var import_react28 = require("react");
1603
1666
  var import_react_native42 = require("react-native");
1604
1667
 
1605
1668
  // src/components/GameWebView.tsx
1606
1669
  var import_native_modules11 = require("@apps-in-toss/native-modules");
1607
1670
  var import_react_native_webview = require("@granite-js/native/react-native-webview");
1608
- var import_react18 = require("react");
1671
+ var import_react19 = require("react");
1609
1672
  var import_react_native30 = require("react-native");
1610
1673
 
1611
1674
  // src/components/NavigationBar/GameWebviewNavigationBar.tsx
1612
1675
  var import_react_native29 = require("@granite-js/react-native");
1613
- var import_tds_react_native12 = require("@toss/tds-react-native");
1614
- var import_react17 = require("react");
1676
+ var import_tds_react_native13 = require("@toss/tds-react-native");
1677
+ var import_es_hangul3 = require("es-hangul");
1678
+ var import_react18 = require("react");
1615
1679
  var import_jsx_runtime20 = require("react/jsx-runtime");
1616
1680
  function GameWebviewNavigationBar() {
1617
- const { openConfirm } = (0, import_tds_react_native12.useDialog)();
1681
+ const { openConfirm } = (0, import_tds_react_native13.useDialog)();
1682
+ const global2 = getAppsInTossGlobals();
1618
1683
  const logging = useNavigationBarLogging();
1619
1684
  const { open: openMoreButtonBottomSheet } = useMoreButtonBottomSheet();
1620
1685
  const { navigationRightButton } = useNavigationBarContext();
1621
1686
  const { navigationBar } = getAppsInTossGlobals();
1622
1687
  const parsedNavigationBar = navigationBar ? safeParseNavigationBar(navigationBar) : null;
1623
- const handleGameWebviewClose = (0, import_react17.useCallback)(async () => {
1688
+ const handleGameWebviewClose = (0, import_react18.useCallback)(async () => {
1624
1689
  logging.closeButtonClick();
1625
- (0, import_react_native29.closeView)();
1626
- }, [logging, openConfirm]);
1690
+ const isConfirmed = await openConfirm({
1691
+ title: `${(0, import_es_hangul3.josa)(global2.brandDisplayName, "\uC744/\uB97C")} \uC885\uB8CC\uD560\uAE4C\uC694?`,
1692
+ leftButton: "\uB2EB\uAE30",
1693
+ rightButton: "\uC885\uB8CC\uD558\uAE30",
1694
+ closeOnDimmerClick: true,
1695
+ onEntered: logging.closePopupShow
1696
+ });
1697
+ logging.closePopupCtaClick(isConfirmed);
1698
+ if (isConfirmed) {
1699
+ (0, import_react_native29.closeView)();
1700
+ }
1701
+ }, [global2.brandDisplayName, logging, openConfirm]);
1627
1702
  return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1628
1703
  TopNavigation,
1629
1704
  {
@@ -1642,8 +1717,8 @@ function GameWebviewNavigationBar() {
1642
1717
 
1643
1718
  // src/components/GameWebView.tsx
1644
1719
  var import_jsx_runtime21 = require("react/jsx-runtime");
1645
- var GameWebView = (0, import_react18.forwardRef)(function GameWebView2(props, ref) {
1646
- (0, import_react18.useEffect)(() => {
1720
+ var GameWebView = (0, import_react19.forwardRef)(function GameWebView2(props, ref) {
1721
+ (0, import_react19.useEffect)(() => {
1647
1722
  if (import_react_native30.Platform.OS === "ios") {
1648
1723
  (0, import_native_modules11.setIosSwipeGestureEnabled)({ isEnabled: false });
1649
1724
  return () => {
@@ -1660,11 +1735,11 @@ var GameWebView = (0, import_react18.forwardRef)(function GameWebView2(props, re
1660
1735
 
1661
1736
  // src/components/PartnerWebView.tsx
1662
1737
  var import_react_native_webview2 = require("@granite-js/native/react-native-webview");
1663
- var import_react20 = require("react");
1738
+ var import_react21 = require("react");
1664
1739
 
1665
1740
  // src/components/NavigationBar/PartnerWebviewNavigationBar.tsx
1666
1741
  var import_react_native31 = require("@granite-js/react-native");
1667
- var import_react19 = require("react");
1742
+ var import_react20 = require("react");
1668
1743
  var import_jsx_runtime22 = require("react/jsx-runtime");
1669
1744
  function PartnerWebviewNavigationBar({ onBackButtonClick, onHomeButtonClick }) {
1670
1745
  const globals = getAppsInTossGlobals();
@@ -1675,7 +1750,7 @@ function PartnerWebviewNavigationBar({ onBackButtonClick, onHomeButtonClick }) {
1675
1750
  const withBackButton = parsedNavigationBar?.withBackButton ?? true;
1676
1751
  const theme = parsedNavigationBar?.theme ?? "light";
1677
1752
  const { navigationRightButton } = useNavigationBarContext();
1678
- const handleClose = (0, import_react19.useCallback)(async () => {
1753
+ const handleClose = (0, import_react20.useCallback)(async () => {
1679
1754
  logging.closeButtonClick();
1680
1755
  (0, import_react_native31.closeView)();
1681
1756
  }, [logging]);
@@ -1699,7 +1774,7 @@ function PartnerWebviewNavigationBar({ onBackButtonClick, onHomeButtonClick }) {
1699
1774
 
1700
1775
  // src/components/PartnerWebView.tsx
1701
1776
  var import_jsx_runtime23 = require("react/jsx-runtime");
1702
- var PartnerWebView = (0, import_react20.forwardRef)(function PartnerWebViewScreen({ onBackButtonClick, onHomeButtonClick, ...webViewProps }, ref) {
1777
+ var PartnerWebView = (0, import_react21.forwardRef)(function PartnerWebViewScreen({ onBackButtonClick, onHomeButtonClick, ...webViewProps }, ref) {
1703
1778
  return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
1704
1779
  /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(PartnerWebviewNavigationBar, { onBackButtonClick, onHomeButtonClick }),
1705
1780
  /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_native_webview2.WebView, { ref, ...webViewProps, style: { flex: 1 } })
@@ -2093,7 +2168,8 @@ function showFullScreenAd(params) {
2093
2168
  onEvent({ type: "show" });
2094
2169
  },
2095
2170
  onUserEarnedReward: (data) => {
2096
- onEvent({ type: "userEarnedReward", data });
2171
+ const normalized = "type" in data ? { unitType: data.type, unitAmount: data.amount } : data;
2172
+ onEvent({ type: "userEarnedReward", data: normalized });
2097
2173
  },
2098
2174
  onSuccess: () => {
2099
2175
  onEvent({ type: "requested" });
@@ -2124,7 +2200,7 @@ async function tossAdEventLog(params) {
2124
2200
  }
2125
2201
 
2126
2202
  // src/bridge-handler/useBridgeHandler.tsx
2127
- var import_react21 = require("react");
2203
+ var import_react22 = require("react");
2128
2204
  function serializeError(error) {
2129
2205
  return JSON.stringify(error, (_, value) => {
2130
2206
  if (value instanceof Error) {
@@ -2176,8 +2252,8 @@ function useBridgeHandler({
2176
2252
  asyncHandlerMap,
2177
2253
  eventListenerMap
2178
2254
  }) {
2179
- const ref = (0, import_react21.useRef)(null);
2180
- const injectedJavaScript = (0, import_react21.useMemo)(
2255
+ const ref = (0, import_react22.useRef)(null);
2256
+ const injectedJavaScript = (0, import_react22.useMemo)(
2181
2257
  () => `window.__CONSTANT_HANDLER_MAP = ${JSON.stringify(
2182
2258
  Object.entries(constantHandlerMap).reduce(
2183
2259
  (acc, [key, value]) => {
@@ -2189,7 +2265,7 @@ function useBridgeHandler({
2189
2265
  )};`,
2190
2266
  [constantHandlerMap]
2191
2267
  );
2192
- (0, import_react21.useEffect)(() => {
2268
+ (0, import_react22.useEffect)(() => {
2193
2269
  ref.current?.injectJavaScript(injectedJavaScript);
2194
2270
  }, [injectedJavaScript]);
2195
2271
  const createHandleOnEvent = (functionName, eventId) => (response) => {
@@ -2203,7 +2279,7 @@ function useBridgeHandler({
2203
2279
  window.__GRANITE_NATIVE_EMITTER.emit('${functionName}/onError/${eventId}', ${serializedError});
2204
2280
  `);
2205
2281
  };
2206
- const $onMessage = (0, import_react21.useCallback)(
2282
+ const $onMessage = (0, import_react22.useCallback)(
2207
2283
  async (e) => {
2208
2284
  onMessage?.(e);
2209
2285
  const data = parseNativeEventData(e.nativeEvent.data);
@@ -2263,13 +2339,13 @@ function parseNativeEventData(data) {
2263
2339
 
2264
2340
  // src/core/hooks/useSafeAreaInsetsEvent.tsx
2265
2341
  var import_react_native_safe_area_context2 = require("@granite-js/native/react-native-safe-area-context");
2266
- var import_react22 = require("react");
2342
+ var import_react23 = require("react");
2267
2343
  function useSafeAreaInsetsEvent() {
2268
2344
  const insets = (0, import_react_native_safe_area_context2.useSafeAreaInsets)();
2269
- (0, import_react22.useEffect)(() => {
2345
+ (0, import_react23.useEffect)(() => {
2270
2346
  safeAreaInsetsChange.emit(insets);
2271
2347
  }, [insets]);
2272
- (0, import_react22.useEffect)(() => {
2348
+ (0, import_react23.useEffect)(() => {
2273
2349
  return () => safeAreaInsetsChange.clearSubscriptions();
2274
2350
  }, []);
2275
2351
  return safeAreaInsetsChange;
@@ -2277,10 +2353,12 @@ function useSafeAreaInsetsEvent() {
2277
2353
 
2278
2354
  // src/core/hooks/useWebBackHandler.tsx
2279
2355
  var import_react_native35 = require("@granite-js/react-native");
2280
- var import_react24 = require("react");
2356
+ var import_tds_react_native14 = require("@toss/tds-react-native");
2357
+ var import_es_hangul4 = require("es-hangul");
2358
+ var import_react25 = require("react");
2281
2359
 
2282
2360
  // src/hooks/useWebviewHistoryStack.tsx
2283
- var import_react23 = require("react");
2361
+ var import_react24 = require("react");
2284
2362
  var INITIAL_STATE = { stack: [], index: -1 };
2285
2363
  function reducer(state, action) {
2286
2364
  switch (action.type) {
@@ -2311,11 +2389,11 @@ function reducer(state, action) {
2311
2389
  }
2312
2390
  }
2313
2391
  function useWebViewHistory() {
2314
- const [state, dispatch] = (0, import_react23.useReducer)(reducer, INITIAL_STATE);
2315
- const onNavigationStateChange = (0, import_react23.useCallback)(({ url, canGoForward: canGoForward2 }) => {
2392
+ const [state, dispatch] = (0, import_react24.useReducer)(reducer, INITIAL_STATE);
2393
+ const onNavigationStateChange = (0, import_react24.useCallback)(({ url, canGoForward: canGoForward2 }) => {
2316
2394
  dispatch({ type: "NAVIGATION_CHANGE", url, canGoForward: canGoForward2 });
2317
2395
  }, []);
2318
- const { canGoBack, canGoForward } = (0, import_react23.useMemo)(() => {
2396
+ const { canGoBack, canGoForward } = (0, import_react24.useMemo)(() => {
2319
2397
  const canBack = state.index > 0;
2320
2398
  const canFwd = state.index >= 0 && state.index < state.stack.length - 1;
2321
2399
  return { canGoBack: canBack, canGoForward: canFwd };
@@ -2333,19 +2411,21 @@ function useWebBackHandler(webViewInitialURL, webViewRef) {
2333
2411
  removeEventListener: removeWebBackEventListener
2334
2412
  } = (0, import_react_native35.useBackEventState)();
2335
2413
  const logging = useNavigationBarLogging();
2336
- const addEventListener = (0, import_react24.useCallback)(
2414
+ const { openConfirm } = (0, import_tds_react_native14.useDialog)();
2415
+ const global2 = getAppsInTossGlobals();
2416
+ const addEventListener = (0, import_react25.useCallback)(
2337
2417
  (handler) => {
2338
2418
  addWebBackEventListener(handler);
2339
2419
  },
2340
2420
  [addWebBackEventListener]
2341
2421
  );
2342
- const removeEventListener = (0, import_react24.useCallback)(
2422
+ const removeEventListener = (0, import_react25.useCallback)(
2343
2423
  (handler) => {
2344
2424
  removeWebBackEventListener(handler);
2345
2425
  },
2346
2426
  [removeWebBackEventListener]
2347
2427
  );
2348
- const handleWebBack = (0, import_react24.useCallback)(async () => {
2428
+ const handleWebBack = (0, import_react25.useCallback)(async () => {
2349
2429
  if (hasWebBackEvent) {
2350
2430
  for (const handler of webBackHandlersRef) {
2351
2431
  handler();
@@ -2355,10 +2435,33 @@ function useWebBackHandler(webViewInitialURL, webViewRef) {
2355
2435
  if (hasHistory) {
2356
2436
  webViewRef.current?.injectJavaScript("window.history.back();");
2357
2437
  } else {
2358
- (0, import_react_native35.closeView)();
2438
+ if (global2.webViewType !== "game") {
2439
+ (0, import_react_native35.closeView)();
2440
+ return;
2441
+ }
2442
+ const isConfirmed = await openConfirm({
2443
+ title: `${(0, import_es_hangul4.josa)(global2.brandDisplayName, "\uC744/\uB97C")} \uC885\uB8CC\uD560\uAE4C\uC694?`,
2444
+ leftButton: "\uB2EB\uAE30",
2445
+ rightButton: "\uC885\uB8CC\uD558\uAE30",
2446
+ closeOnDimmerClick: true,
2447
+ onEntered: logging.closePopupShow
2448
+ });
2449
+ logging.closePopupCtaClick(isConfirmed);
2450
+ if (isConfirmed) {
2451
+ (0, import_react_native35.closeView)();
2452
+ }
2359
2453
  }
2360
- }, [hasHistory, hasWebBackEvent, webBackHandlersRef, logging, webViewRef]);
2361
- const handleWebHome = (0, import_react24.useCallback)(() => {
2454
+ }, [
2455
+ global2.webViewType,
2456
+ global2.brandDisplayName,
2457
+ hasHistory,
2458
+ hasWebBackEvent,
2459
+ webBackHandlersRef,
2460
+ logging,
2461
+ openConfirm,
2462
+ webViewRef
2463
+ ]);
2464
+ const handleWebHome = (0, import_react25.useCallback)(() => {
2362
2465
  logging.homeButtonClick();
2363
2466
  if (homeEvent.hasSubscriptions()) {
2364
2467
  homeEvent.emit({});
@@ -2371,7 +2474,7 @@ function useWebBackHandler(webViewInitialURL, webViewRef) {
2371
2474
  })();
2372
2475
  `);
2373
2476
  }, [hasWebBackEvent, webBackHandlersRef, logging, webViewInitialURL, webViewRef]);
2374
- return (0, import_react24.useMemo)(
2477
+ return (0, import_react25.useMemo)(
2375
2478
  () => ({ addEventListener, removeEventListener, handleWebBack, handleWebHome, onNavigationStateChange }),
2376
2479
  [addEventListener, removeEventListener, handleWebBack, handleWebHome, onNavigationStateChange]
2377
2480
  );
@@ -2550,11 +2653,11 @@ function useCreateUserAgent({
2550
2653
  // src/hooks/useGeolocation.ts
2551
2654
  var import_native_modules16 = require("@apps-in-toss/native-modules");
2552
2655
  var import_react_native37 = require("@granite-js/react-native");
2553
- var import_react25 = require("react");
2656
+ var import_react26 = require("react");
2554
2657
  function useGeolocation({ accuracy, distanceInterval, timeInterval }) {
2555
2658
  const isVisible = (0, import_react_native37.useVisibility)();
2556
- const [location, setLocation] = (0, import_react25.useState)(null);
2557
- (0, import_react25.useEffect)(() => {
2659
+ const [location, setLocation] = (0, import_react26.useState)(null);
2660
+ (0, import_react26.useEffect)(() => {
2558
2661
  if (!isVisible) {
2559
2662
  return;
2560
2663
  }
@@ -2573,11 +2676,11 @@ function useGeolocation({ accuracy, distanceInterval, timeInterval }) {
2573
2676
 
2574
2677
  // src/hooks/useWaitForReturnNavigator.tsx
2575
2678
  var import_react_native38 = require("@granite-js/react-native");
2576
- var import_react26 = require("react");
2679
+ var import_react27 = require("react");
2577
2680
  function useWaitForReturnNavigator() {
2578
- const callbacks = (0, import_react26.useRef)([]).current;
2681
+ const callbacks = (0, import_react27.useRef)([]).current;
2579
2682
  const navigation = (0, import_react_native38.useNavigation)();
2580
- const startNavigating = (0, import_react26.useCallback)(
2683
+ const startNavigating = (0, import_react27.useCallback)(
2581
2684
  (route, params) => {
2582
2685
  return new Promise((resolve) => {
2583
2686
  callbacks.push(resolve);
@@ -2586,7 +2689,7 @@ function useWaitForReturnNavigator() {
2586
2689
  },
2587
2690
  [callbacks, navigation]
2588
2691
  );
2589
- const handleVisibilityChange = (0, import_react26.useCallback)(
2692
+ const handleVisibilityChange = (0, import_react27.useCallback)(
2590
2693
  (state) => {
2591
2694
  if (state === "visible" && callbacks.length > 0) {
2592
2695
  for (const callback of callbacks) {
@@ -2613,9 +2716,9 @@ function useTopNavigation() {
2613
2716
  // src/hooks/useWebViewMemoryDebug.tsx
2614
2717
  var import_native_modules17 = require("@apps-in-toss/native-modules");
2615
2718
  var import_react_native39 = require("@granite-js/react-native");
2616
- var import_tds_react_native13 = require("@toss/tds-react-native");
2719
+ var import_tds_react_native15 = require("@toss/tds-react-native");
2617
2720
  function useHandleWebViewProcessDidTerminate(webViewRef) {
2618
- const toast = (0, import_tds_react_native13.useToast)();
2721
+ const toast = (0, import_tds_react_native15.useToast)();
2619
2722
  return () => {
2620
2723
  webViewDebugLog("AppsInTossWebViewProcessDidTerminate", {});
2621
2724
  toast.open("\uBB38\uC81C\uAC00 \uC0DD\uACA8\uC11C \uBBF8\uB2C8\uC571\uC744 \uB2E4\uC2DC \uC2DC\uC791\uD588\uC5B4\uC694.", {
@@ -2719,7 +2822,7 @@ var operationalEnvironment = appsInTossConstantBridges.getOperationalEnvironment
2719
2822
  var TYPES = ["partner", "external", "game"];
2720
2823
  var WEBVIEW_TYPES = {
2721
2824
  partner: PartnerWebView,
2722
- external: import_tds_react_native14.ExternalWebViewScreen,
2825
+ external: import_tds_react_native16.ExternalWebViewScreen,
2723
2826
  game: GameWebView
2724
2827
  };
2725
2828
  function mergeSchemeQueryParamsInto(url) {
@@ -2751,21 +2854,21 @@ function WebView({ type, local, onMessage, ...props }) {
2751
2854
  if (!TYPES.includes(type)) {
2752
2855
  throw new Error(`Invalid WebView type: '${type}'`);
2753
2856
  }
2754
- const webViewRef = (0, import_react27.useRef)(null);
2755
- const url = (0, import_react27.useMemo)(() => getWebViewURL(local), [local]);
2857
+ const webViewRef = (0, import_react28.useRef)(null);
2858
+ const url = (0, import_react28.useMemo)(() => getWebViewURL(local), [local]);
2756
2859
  const webBackHandler = useWebBackHandler(url, webViewRef);
2757
2860
  const global2 = getAppsInTossGlobals();
2758
2861
  const insets = (0, import_react_native_safe_area_context3.useSafeAreaInsets)();
2759
2862
  const navigationBarContext = useNavigationBarContext();
2760
2863
  const safeAreaInsetsEvent = useSafeAreaInsetsEvent();
2761
- const [allowsBackForwardNavigationGestures, setAllowsBackForwardNavigationGestures] = (0, import_react27.useState)(
2864
+ const [allowsBackForwardNavigationGestures, setAllowsBackForwardNavigationGestures] = (0, import_react28.useState)(
2762
2865
  props.allowsBackForwardNavigationGestures
2763
2866
  );
2764
2867
  const handler = useBridgeHandler({
2765
2868
  onMessage,
2766
2869
  eventListenerMap: {
2767
2870
  ...appsInTossEventBridges,
2768
- navigationAccessoryEvent: ({ onEvent, onError }) => import_tds_react_native14.tdsEvent.addEventListener("navigationAccessoryEvent", { onEvent, onError }),
2871
+ navigationAccessoryEvent: ({ onEvent, onError }) => import_tds_react_native16.tdsEvent.addEventListener("navigationAccessoryEvent", { onEvent, onError }),
2769
2872
  backEvent: ({ onEvent }) => {
2770
2873
  webBackHandler.addEventListener(onEvent);
2771
2874
  return () => {
@@ -2854,7 +2957,7 @@ function WebView({ type, local, onMessage, ...props }) {
2854
2957
  }
2855
2958
  }
2856
2959
  });
2857
- const headerPropForExternalWebView = (0, import_react27.useMemo)(() => {
2960
+ const headerPropForExternalWebView = (0, import_react28.useMemo)(() => {
2858
2961
  const parsedNavigationBar = global2.navigationBar != null ? safeParseNavigationBar(global2.navigationBar) : null;
2859
2962
  const initialAccessoryButton = parsedNavigationBar?.initialAccessoryButton;
2860
2963
  const withBackButton = parsedNavigationBar?.withBackButton ?? true;
@@ -2875,7 +2978,7 @@ function WebView({ type, local, onMessage, ...props }) {
2875
2978
  colorPreference: "light"
2876
2979
  });
2877
2980
  const refs = mergeRefs(handler.ref, webViewRef);
2878
- (0, import_react27.useEffect)(() => {
2981
+ (0, import_react28.useEffect)(() => {
2879
2982
  const callback = () => {
2880
2983
  webBackHandler.handleWebBack();
2881
2984
  return true;
@@ -2954,7 +3057,7 @@ var import_types = require("@apps-in-toss/types");
2954
3057
 
2955
3058
  // src/ads/inlineAd/InlineAd.tsx
2956
3059
  var import_react_native46 = require("@granite-js/react-native");
2957
- var import_react30 = require("react");
3060
+ var import_react31 = require("react");
2958
3061
  var import_react_native47 = require("react-native");
2959
3062
 
2960
3063
  // src/ads/inlineAd/constants.ts
@@ -3336,7 +3439,7 @@ var EventTracker = class {
3336
3439
 
3337
3440
  // src/ads/inlineAd/ui/FeedBannerAdView.tsx
3338
3441
  var import_react_native_svg2 = require("@granite-js/native/react-native-svg");
3339
- var import_react28 = require("react");
3442
+ var import_react29 = require("react");
3340
3443
  var import_react_native44 = require("react-native");
3341
3444
  var import_jsx_runtime25 = require("react/jsx-runtime");
3342
3445
  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";
@@ -3355,7 +3458,7 @@ function FeedBannerAdView({
3355
3458
  paddingStyle,
3356
3459
  onPress
3357
3460
  }) {
3358
- const scale = (0, import_react28.useRef)(new import_react_native44.Animated.Value(1)).current;
3461
+ const scale = (0, import_react29.useRef)(new import_react_native44.Animated.Value(1)).current;
3359
3462
  const animateScale = (toValue) => {
3360
3463
  import_react_native44.Animated.timing(scale, {
3361
3464
  toValue,
@@ -3591,7 +3694,7 @@ var styles = import_react_native44.StyleSheet.create({
3591
3694
 
3592
3695
  // src/ads/inlineAd/ui/ListBannerAdView.tsx
3593
3696
  var import_react_native_svg3 = require("@granite-js/native/react-native-svg");
3594
- var import_react29 = require("react");
3697
+ var import_react30 = require("react");
3595
3698
  var import_react_native45 = require("react-native");
3596
3699
  var import_jsx_runtime26 = require("react/jsx-runtime");
3597
3700
  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";
@@ -3605,8 +3708,8 @@ function ListBannerAdView({
3605
3708
  colors: colors4,
3606
3709
  onPress
3607
3710
  }) {
3608
- const scale = (0, import_react29.useRef)(new import_react_native45.Animated.Value(1)).current;
3609
- const clipIdRef = (0, import_react29.useRef)(`clip-${Math.random().toString(36).slice(2)}`);
3711
+ const scale = (0, import_react30.useRef)(new import_react_native45.Animated.Value(1)).current;
3712
+ const clipIdRef = (0, import_react30.useRef)(`clip-${Math.random().toString(36).slice(2)}`);
3610
3713
  const animateScale = (toValue) => {
3611
3714
  import_react_native45.Animated.timing(scale, {
3612
3715
  toValue,
@@ -3914,21 +4017,21 @@ function InlineAd(props) {
3914
4017
  onAdFailedToRender,
3915
4018
  onNoFill
3916
4019
  } = props;
3917
- const slotIdRef = (0, import_react30.useRef)(createSlotId());
3918
- const [ad, setAd] = (0, import_react30.useState)(null);
3919
- const [isAdBadgeEnabled, setIsAdBadgeEnabled] = (0, import_react30.useState)(true);
3920
- const eventTrackerRef = (0, import_react30.useRef)(null);
3921
- const eventPayloadRef = (0, import_react30.useRef)(null);
3922
- const hasRenderedRef = (0, import_react30.useRef)(false);
3923
- const hasLoggedImp1pxRef = (0, import_react30.useRef)(false);
3924
- const hasLoggedImp100pRef = (0, import_react30.useRef)(false);
3925
- const hasNotifiedViewableRef = (0, import_react30.useRef)(false);
3926
- const viewableTimerRef = (0, import_react30.useRef)(null);
3927
- const refetchIntervalMsRef = (0, import_react30.useRef)(null);
3928
- const lastImp1pxAtRef = (0, import_react30.useRef)(null);
3929
- const loadingRef = (0, import_react30.useRef)(false);
3930
- const loadRef = (0, import_react30.useRef)(null);
3931
- const callbacksRef = (0, import_react30.useRef)({
4020
+ const slotIdRef = (0, import_react31.useRef)(createSlotId());
4021
+ const [ad, setAd] = (0, import_react31.useState)(null);
4022
+ const [isAdBadgeEnabled, setIsAdBadgeEnabled] = (0, import_react31.useState)(true);
4023
+ const eventTrackerRef = (0, import_react31.useRef)(null);
4024
+ const eventPayloadRef = (0, import_react31.useRef)(null);
4025
+ const hasRenderedRef = (0, import_react31.useRef)(false);
4026
+ const hasLoggedImp1pxRef = (0, import_react31.useRef)(false);
4027
+ const hasLoggedImp100pRef = (0, import_react31.useRef)(false);
4028
+ const hasNotifiedViewableRef = (0, import_react31.useRef)(false);
4029
+ const viewableTimerRef = (0, import_react31.useRef)(null);
4030
+ const refetchIntervalMsRef = (0, import_react31.useRef)(null);
4031
+ const lastImp1pxAtRef = (0, import_react31.useRef)(null);
4032
+ const loadingRef = (0, import_react31.useRef)(false);
4033
+ const loadRef = (0, import_react31.useRef)(null);
4034
+ const callbacksRef = (0, import_react31.useRef)({
3932
4035
  onAdRendered,
3933
4036
  onAdViewable,
3934
4037
  onAdClicked,
@@ -3936,7 +4039,7 @@ function InlineAd(props) {
3936
4039
  onAdFailedToRender,
3937
4040
  onNoFill
3938
4041
  });
3939
- const isMountedRef = (0, import_react30.useRef)(false);
4042
+ const isMountedRef = (0, import_react31.useRef)(false);
3940
4043
  const colorScheme = (0, import_react_native47.useColorScheme)();
3941
4044
  const selectedTheme = theme ?? DEFAULT_INLINE_AD_THEME;
3942
4045
  const resolvedTheme = selectedTheme === "auto" ? colorScheme === "dark" ? "dark" : "light" : selectedTheme;
@@ -3953,7 +4056,7 @@ function InlineAd(props) {
3953
4056
  onAdFailedToRender,
3954
4057
  onNoFill
3955
4058
  };
3956
- (0, import_react30.useEffect)(() => {
4059
+ (0, import_react31.useEffect)(() => {
3957
4060
  isMountedRef.current = true;
3958
4061
  return () => {
3959
4062
  isMountedRef.current = false;
@@ -3963,7 +4066,7 @@ function InlineAd(props) {
3963
4066
  }
3964
4067
  };
3965
4068
  }, []);
3966
- (0, import_react30.useEffect)(() => {
4069
+ (0, import_react31.useEffect)(() => {
3967
4070
  const normalizedAdGroupId = normalizeAdGroupId(adGroupId);
3968
4071
  const loadAdRequest = () => {
3969
4072
  if (loadingRef.current) {
@@ -4048,7 +4151,7 @@ function InlineAd(props) {
4048
4151
  loadRef.current?.();
4049
4152
  }
4050
4153
  });
4051
- (0, import_react30.useEffect)(() => {
4154
+ (0, import_react31.useEffect)(() => {
4052
4155
  if (!ad || hasRenderedRef.current) {
4053
4156
  return;
4054
4157
  }
package/dist/index.js CHANGED
@@ -622,6 +622,27 @@ function useHardwareBackPress(handler) {
622
622
  import { closeView as closeView3, useBackEventContext, useNavigation } from "@granite-js/react-native";
623
623
  import { useMemo as useMemo2 } from "react";
624
624
 
625
+ // src/components/NavigationBar/RNNavigationBar/hooks/useCloseConfirm.ts
626
+ import { useDialog as useDialog3 } from "@toss/tds-react-native";
627
+ import { josa as josa2 } from "es-hangul";
628
+ import { useCallback as useCallback6 } from "react";
629
+ function useCloseConfirm() {
630
+ const { brandDisplayName } = getAppsInTossGlobals();
631
+ const { openConfirm } = useDialog3();
632
+ return useCallback6(
633
+ async ({ onEntered }) => {
634
+ return await openConfirm({
635
+ title: `${josa2(brandDisplayName, "\uC744/\uB97C")} \uC885\uB8CC\uD560\uAE4C\uC694?`,
636
+ leftButton: "\uB2EB\uAE30",
637
+ rightButton: "\uC885\uB8CC\uD558\uAE30",
638
+ closeOnDimmerClick: true,
639
+ onEntered
640
+ });
641
+ },
642
+ [brandDisplayName, openConfirm]
643
+ );
644
+ }
645
+
625
646
  // src/utils/eventEmitter.ts
626
647
  var EventEmitter = class {
627
648
  listeners = {};
@@ -666,8 +687,12 @@ var safeAreaInsetsChange = createEvent("safeAreaInsetsChange");
666
687
  import { Granite as Granite3 } from "@granite-js/react-native";
667
688
  var NAVI_BAR_IMPRESSION_SCHEMA_ID = 1596837;
668
689
  var NAVI_BAR_IMPRESSION_LOG_NAME = "appsintoss_app_visit__common_module::impression__navigation_bar";
690
+ var CLOSE_POPUP_SHOW_SCHEMA_ID = 1644490;
691
+ var CLOSE_POPUP_SHOW_LOG_NAME = "appsintoss_app_visit__common_module::popup__close_app";
669
692
  var CLOSE_BUTTON_CLICK_SCHEMA_ID = 1596831;
670
693
  var CLOSE_BUTTON_CLICK_LOG_NAME = "appsintoss_app_visit__common_module::click__icon_close";
694
+ var CLOSE_POPUP_CTA_CLICK_SCHEMA_ID = 1644492;
695
+ var CLOSE_POPUP_CTA_CLICK_LOG_NAME = "appsintoss_app_visit__common_module::popup__close_app::click__cta";
671
696
  var HOME_BUTTON_CLICK_SCHEMA_ID = 1596839;
672
697
  var HOME_BUTTON_CLICK_LOG_NAME = "appsintoss_app_visit__common_module::click__icon_home";
673
698
  function useNavigationBarLogging() {
@@ -710,8 +735,32 @@ function useNavigationBarLogging() {
710
735
  }
711
736
  });
712
737
  };
738
+ const logClosePopupShow = () => {
739
+ sendLog({
740
+ log_name: CLOSE_POPUP_SHOW_LOG_NAME,
741
+ log_type: "popup",
742
+ params: {
743
+ ...baseParams,
744
+ schema_id: CLOSE_POPUP_SHOW_SCHEMA_ID
745
+ }
746
+ });
747
+ };
748
+ const logClosePopupCtaClick = (confirm) => {
749
+ sendLog({
750
+ log_name: CLOSE_POPUP_CTA_CLICK_LOG_NAME,
751
+ log_type: "event",
752
+ params: {
753
+ ...baseParams,
754
+ close_yn: confirm ? "Y" : "N",
755
+ schema_id: CLOSE_POPUP_CTA_CLICK_SCHEMA_ID,
756
+ event_type: "click"
757
+ }
758
+ });
759
+ };
713
760
  return {
714
761
  navBarImpression: logNavBarImpression,
762
+ closePopupShow: logClosePopupShow,
763
+ closePopupCtaClick: logClosePopupCtaClick,
715
764
  closeButtonClick: logCloseButtonClick,
716
765
  homeButtonClick: logHomeButtonClick
717
766
  };
@@ -722,15 +771,30 @@ function useNavigationEvent() {
722
771
  const backEventContext = useBackEventContext();
723
772
  const logging = useNavigationBarLogging();
724
773
  const navigation = useNavigation();
725
- return useMemo2(
726
- () => ({
774
+ const closeConfirm = useCloseConfirm();
775
+ const global2 = getAppsInTossGlobals();
776
+ return useMemo2(() => {
777
+ const close = async () => {
778
+ if (global2.appType !== "game") {
779
+ closeView3();
780
+ return;
781
+ }
782
+ const hasConfirmed = await closeConfirm({
783
+ onEntered: logging.closePopupShow
784
+ });
785
+ logging.closePopupCtaClick(hasConfirmed);
786
+ if (hasConfirmed) {
787
+ closeView3();
788
+ }
789
+ };
790
+ return {
727
791
  handleBack: () => {
728
792
  if (backEventContext.hasBackEvent) {
729
793
  backEventContext.onBack();
730
794
  } else if (navigation.canGoBack()) {
731
795
  navigation.goBack();
732
796
  } else {
733
- closeView3();
797
+ close();
734
798
  }
735
799
  },
736
800
  handleHomeButtonClick: () => {
@@ -743,11 +807,10 @@ function useNavigationEvent() {
743
807
  },
744
808
  handleCloseButtonClick: () => {
745
809
  logging.closeButtonClick();
746
- closeView3();
810
+ close();
747
811
  }
748
- }),
749
- [backEventContext, navigation, logging]
750
- );
812
+ };
813
+ }, [global2.appType, backEventContext, navigation, closeConfirm, logging]);
751
814
  }
752
815
 
753
816
  // src/core/hooks/useMoreButtonBottomSheet/index.tsx
@@ -760,7 +823,7 @@ import { useEffect as useEffect5, useState as useState4 } from "react";
760
823
  // src/core/hooks/useMoreButtonBottomSheet/AppShareListMenu.tsx
761
824
  import { getOperationalEnvironment, shareWithScheme } from "@apps-in-toss/native-modules";
762
825
  import { getSchemeUri as getSchemeUri4 } from "@granite-js/react-native";
763
- import { useDialog as useDialog3 } from "@toss/tds-react-native";
826
+ import { useDialog as useDialog4 } from "@toss/tds-react-native";
764
827
 
765
828
  // src/core/hooks/useMoreButtonBottomSheet/Menu.tsx
766
829
  import { ListRow, Asset as Asset2 } from "@toss/tds-react-native";
@@ -910,7 +973,7 @@ var APP_SHARE_MENU_INFO = {
910
973
  function AppShareListMenu() {
911
974
  const initialScheme = getSchemeUri4();
912
975
  const isSandbox = getOperationalEnvironment() === "sandbox";
913
- const { openConfirm } = useDialog3();
976
+ const { openConfirm } = useDialog4();
914
977
  const schemeForShare = addParamsToUrl(initialScheme, {
915
978
  referrer: SHARE_SCHEME_REFERRER
916
979
  });
@@ -1591,20 +1654,32 @@ import { Platform as Platform3 } from "react-native";
1591
1654
 
1592
1655
  // src/components/NavigationBar/GameWebviewNavigationBar.tsx
1593
1656
  import { closeView as closeView4 } from "@granite-js/react-native";
1594
- import { useDialog as useDialog4 } from "@toss/tds-react-native";
1595
- import { useCallback as useCallback6 } from "react";
1657
+ import { useDialog as useDialog5 } from "@toss/tds-react-native";
1658
+ import { josa as josa3 } from "es-hangul";
1659
+ import { useCallback as useCallback7 } from "react";
1596
1660
  import { jsx as jsx20 } from "react/jsx-runtime";
1597
1661
  function GameWebviewNavigationBar() {
1598
- const { openConfirm } = useDialog4();
1662
+ const { openConfirm } = useDialog5();
1663
+ const global2 = getAppsInTossGlobals();
1599
1664
  const logging = useNavigationBarLogging();
1600
1665
  const { open: openMoreButtonBottomSheet } = useMoreButtonBottomSheet();
1601
1666
  const { navigationRightButton } = useNavigationBarContext();
1602
1667
  const { navigationBar } = getAppsInTossGlobals();
1603
1668
  const parsedNavigationBar = navigationBar ? safeParseNavigationBar(navigationBar) : null;
1604
- const handleGameWebviewClose = useCallback6(async () => {
1669
+ const handleGameWebviewClose = useCallback7(async () => {
1605
1670
  logging.closeButtonClick();
1606
- closeView4();
1607
- }, [logging, openConfirm]);
1671
+ const isConfirmed = await openConfirm({
1672
+ title: `${josa3(global2.brandDisplayName, "\uC744/\uB97C")} \uC885\uB8CC\uD560\uAE4C\uC694?`,
1673
+ leftButton: "\uB2EB\uAE30",
1674
+ rightButton: "\uC885\uB8CC\uD558\uAE30",
1675
+ closeOnDimmerClick: true,
1676
+ onEntered: logging.closePopupShow
1677
+ });
1678
+ logging.closePopupCtaClick(isConfirmed);
1679
+ if (isConfirmed) {
1680
+ closeView4();
1681
+ }
1682
+ }, [global2.brandDisplayName, logging, openConfirm]);
1608
1683
  return /* @__PURE__ */ jsx20(
1609
1684
  TopNavigation,
1610
1685
  {
@@ -1647,7 +1722,7 @@ import { forwardRef as forwardRef2 } from "react";
1647
1722
 
1648
1723
  // src/components/NavigationBar/PartnerWebviewNavigationBar.tsx
1649
1724
  import { closeView as closeView5 } from "@granite-js/react-native";
1650
- import { useCallback as useCallback7 } from "react";
1725
+ import { useCallback as useCallback8 } from "react";
1651
1726
  import { jsx as jsx22 } from "react/jsx-runtime";
1652
1727
  function PartnerWebviewNavigationBar({ onBackButtonClick, onHomeButtonClick }) {
1653
1728
  const globals = getAppsInTossGlobals();
@@ -1658,7 +1733,7 @@ function PartnerWebviewNavigationBar({ onBackButtonClick, onHomeButtonClick }) {
1658
1733
  const withBackButton = parsedNavigationBar?.withBackButton ?? true;
1659
1734
  const theme = parsedNavigationBar?.theme ?? "light";
1660
1735
  const { navigationRightButton } = useNavigationBarContext();
1661
- const handleClose = useCallback7(async () => {
1736
+ const handleClose = useCallback8(async () => {
1662
1737
  logging.closeButtonClick();
1663
1738
  closeView5();
1664
1739
  }, [logging]);
@@ -2080,7 +2155,8 @@ function showFullScreenAd(params) {
2080
2155
  onEvent({ type: "show" });
2081
2156
  },
2082
2157
  onUserEarnedReward: (data) => {
2083
- onEvent({ type: "userEarnedReward", data });
2158
+ const normalized = "type" in data ? { unitType: data.type, unitAmount: data.amount } : data;
2159
+ onEvent({ type: "userEarnedReward", data: normalized });
2084
2160
  },
2085
2161
  onSuccess: () => {
2086
2162
  onEvent({ type: "requested" });
@@ -2111,7 +2187,7 @@ async function tossAdEventLog(params) {
2111
2187
  }
2112
2188
 
2113
2189
  // src/bridge-handler/useBridgeHandler.tsx
2114
- import { useCallback as useCallback8, useEffect as useEffect10, useMemo as useMemo3, useRef as useRef3 } from "react";
2190
+ import { useCallback as useCallback9, useEffect as useEffect10, useMemo as useMemo3, useRef as useRef3 } from "react";
2115
2191
  function serializeError(error) {
2116
2192
  return JSON.stringify(error, (_, value) => {
2117
2193
  if (value instanceof Error) {
@@ -2190,7 +2266,7 @@ function useBridgeHandler({
2190
2266
  window.__GRANITE_NATIVE_EMITTER.emit('${functionName}/onError/${eventId}', ${serializedError});
2191
2267
  `);
2192
2268
  };
2193
- const $onMessage = useCallback8(
2269
+ const $onMessage = useCallback9(
2194
2270
  async (e) => {
2195
2271
  onMessage?.(e);
2196
2272
  const data = parseNativeEventData(e.nativeEvent.data);
@@ -2264,10 +2340,12 @@ function useSafeAreaInsetsEvent() {
2264
2340
 
2265
2341
  // src/core/hooks/useWebBackHandler.tsx
2266
2342
  import { closeView as closeView6, useBackEventState } from "@granite-js/react-native";
2267
- import { useCallback as useCallback10, useMemo as useMemo5 } from "react";
2343
+ import { useDialog as useDialog6 } from "@toss/tds-react-native";
2344
+ import { josa as josa4 } from "es-hangul";
2345
+ import { useCallback as useCallback11, useMemo as useMemo5 } from "react";
2268
2346
 
2269
2347
  // src/hooks/useWebviewHistoryStack.tsx
2270
- import { useCallback as useCallback9, useMemo as useMemo4, useReducer } from "react";
2348
+ import { useCallback as useCallback10, useMemo as useMemo4, useReducer } from "react";
2271
2349
  var INITIAL_STATE = { stack: [], index: -1 };
2272
2350
  function reducer(state, action) {
2273
2351
  switch (action.type) {
@@ -2299,7 +2377,7 @@ function reducer(state, action) {
2299
2377
  }
2300
2378
  function useWebViewHistory() {
2301
2379
  const [state, dispatch] = useReducer(reducer, INITIAL_STATE);
2302
- const onNavigationStateChange = useCallback9(({ url, canGoForward: canGoForward2 }) => {
2380
+ const onNavigationStateChange = useCallback10(({ url, canGoForward: canGoForward2 }) => {
2303
2381
  dispatch({ type: "NAVIGATION_CHANGE", url, canGoForward: canGoForward2 });
2304
2382
  }, []);
2305
2383
  const { canGoBack, canGoForward } = useMemo4(() => {
@@ -2320,19 +2398,21 @@ function useWebBackHandler(webViewInitialURL, webViewRef) {
2320
2398
  removeEventListener: removeWebBackEventListener
2321
2399
  } = useBackEventState();
2322
2400
  const logging = useNavigationBarLogging();
2323
- const addEventListener = useCallback10(
2401
+ const { openConfirm } = useDialog6();
2402
+ const global2 = getAppsInTossGlobals();
2403
+ const addEventListener = useCallback11(
2324
2404
  (handler) => {
2325
2405
  addWebBackEventListener(handler);
2326
2406
  },
2327
2407
  [addWebBackEventListener]
2328
2408
  );
2329
- const removeEventListener = useCallback10(
2409
+ const removeEventListener = useCallback11(
2330
2410
  (handler) => {
2331
2411
  removeWebBackEventListener(handler);
2332
2412
  },
2333
2413
  [removeWebBackEventListener]
2334
2414
  );
2335
- const handleWebBack = useCallback10(async () => {
2415
+ const handleWebBack = useCallback11(async () => {
2336
2416
  if (hasWebBackEvent) {
2337
2417
  for (const handler of webBackHandlersRef) {
2338
2418
  handler();
@@ -2342,10 +2422,33 @@ function useWebBackHandler(webViewInitialURL, webViewRef) {
2342
2422
  if (hasHistory) {
2343
2423
  webViewRef.current?.injectJavaScript("window.history.back();");
2344
2424
  } else {
2345
- closeView6();
2425
+ if (global2.webViewType !== "game") {
2426
+ closeView6();
2427
+ return;
2428
+ }
2429
+ const isConfirmed = await openConfirm({
2430
+ title: `${josa4(global2.brandDisplayName, "\uC744/\uB97C")} \uC885\uB8CC\uD560\uAE4C\uC694?`,
2431
+ leftButton: "\uB2EB\uAE30",
2432
+ rightButton: "\uC885\uB8CC\uD558\uAE30",
2433
+ closeOnDimmerClick: true,
2434
+ onEntered: logging.closePopupShow
2435
+ });
2436
+ logging.closePopupCtaClick(isConfirmed);
2437
+ if (isConfirmed) {
2438
+ closeView6();
2439
+ }
2346
2440
  }
2347
- }, [hasHistory, hasWebBackEvent, webBackHandlersRef, logging, webViewRef]);
2348
- const handleWebHome = useCallback10(() => {
2441
+ }, [
2442
+ global2.webViewType,
2443
+ global2.brandDisplayName,
2444
+ hasHistory,
2445
+ hasWebBackEvent,
2446
+ webBackHandlersRef,
2447
+ logging,
2448
+ openConfirm,
2449
+ webViewRef
2450
+ ]);
2451
+ const handleWebHome = useCallback11(() => {
2349
2452
  logging.homeButtonClick();
2350
2453
  if (homeEvent.hasSubscriptions()) {
2351
2454
  homeEvent.emit({});
@@ -2560,11 +2663,11 @@ function useGeolocation({ accuracy, distanceInterval, timeInterval }) {
2560
2663
 
2561
2664
  // src/hooks/useWaitForReturnNavigator.tsx
2562
2665
  import { useNavigation as useNavigation3, useVisibilityChange } from "@granite-js/react-native";
2563
- import { useCallback as useCallback11, useRef as useRef4 } from "react";
2666
+ import { useCallback as useCallback12, useRef as useRef4 } from "react";
2564
2667
  function useWaitForReturnNavigator() {
2565
2668
  const callbacks = useRef4([]).current;
2566
2669
  const navigation = useNavigation3();
2567
- const startNavigating = useCallback11(
2670
+ const startNavigating = useCallback12(
2568
2671
  (route, params) => {
2569
2672
  return new Promise((resolve) => {
2570
2673
  callbacks.push(resolve);
@@ -2573,7 +2676,7 @@ function useWaitForReturnNavigator() {
2573
2676
  },
2574
2677
  [callbacks, navigation]
2575
2678
  );
2576
- const handleVisibilityChange = useCallback11(
2679
+ const handleVisibilityChange = useCallback12(
2577
2680
  (state) => {
2578
2681
  if (state === "visible" && callbacks.length > 0) {
2579
2682
  for (const callback of callbacks) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@apps-in-toss/framework",
3
3
  "type": "module",
4
- "version": "2.9.1",
4
+ "version": "2.9.3",
5
5
  "description": "The framework for Apps In Toss",
6
6
  "scripts": {
7
7
  "typecheck": "tsc --noEmit",
@@ -55,12 +55,12 @@
55
55
  "ait": "./bin/ait.js"
56
56
  },
57
57
  "dependencies": {
58
- "@apps-in-toss/analytics": "2.9.1",
59
- "@apps-in-toss/cli": "2.9.1",
60
- "@apps-in-toss/native-modules": "2.9.1",
61
- "@apps-in-toss/plugins": "2.9.1",
62
- "@apps-in-toss/types": "2.9.1",
63
- "@apps-in-toss/user-scripts": "^2.9.1",
58
+ "@apps-in-toss/analytics": "2.9.3",
59
+ "@apps-in-toss/cli": "2.9.3",
60
+ "@apps-in-toss/native-modules": "2.9.3",
61
+ "@apps-in-toss/plugins": "2.9.3",
62
+ "@apps-in-toss/types": "2.9.3",
63
+ "@apps-in-toss/user-scripts": "^2.9.3",
64
64
  "es-hangul": "^2.3.2"
65
65
  },
66
66
  "devDependencies": {