@apps-in-toss/framework 0.0.0-dev.1764816865438 → 0.0.0-dev.1765876894045

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.d.cts CHANGED
@@ -181,10 +181,10 @@ interface LoadFullScreenAdParams {
181
181
  onEvent: (data: LoadFullScreenAdEvent) => void;
182
182
  onError: (err: unknown) => void;
183
183
  }
184
- declare function loadFullScreenAd(params: LoadFullScreenAdParams): () => void;
185
- declare namespace loadFullScreenAd {
186
- var isSupported: () => boolean;
187
- }
184
+ declare const loadFullScreenAd: {
185
+ (params: LoadFullScreenAdParams): () => void;
186
+ isSupported: () => boolean;
187
+ };
188
188
  interface ShowFullScreenAdOptions {
189
189
  adGroupId: string;
190
190
  }
@@ -226,6 +226,8 @@ declare namespace showFullScreenAd {
226
226
 
227
227
  interface FetchTossAdOptions {
228
228
  adGroupId: string;
229
+ sdkId: string;
230
+ availableStyleIds: string[];
229
231
  }
230
232
 
231
233
  interface TossAdEventLogParams {
package/dist/index.d.ts CHANGED
@@ -181,10 +181,10 @@ interface LoadFullScreenAdParams {
181
181
  onEvent: (data: LoadFullScreenAdEvent) => void;
182
182
  onError: (err: unknown) => void;
183
183
  }
184
- declare function loadFullScreenAd(params: LoadFullScreenAdParams): () => void;
185
- declare namespace loadFullScreenAd {
186
- var isSupported: () => boolean;
187
- }
184
+ declare const loadFullScreenAd: {
185
+ (params: LoadFullScreenAdParams): () => void;
186
+ isSupported: () => boolean;
187
+ };
188
188
  interface ShowFullScreenAdOptions {
189
189
  adGroupId: string;
190
190
  }
@@ -226,6 +226,8 @@ declare namespace showFullScreenAd {
226
226
 
227
227
  interface FetchTossAdOptions {
228
228
  adGroupId: string;
229
+ sdkId: string;
230
+ availableStyleIds: string[];
229
231
  }
230
232
 
231
233
  interface TossAdEventLogParams {
package/dist/index.js CHANGED
@@ -217,37 +217,9 @@ function useNavigationBarContext() {
217
217
  return context;
218
218
  }
219
219
 
220
- // src/core/hooks/useAppsInTossBridge.ts
221
- import { appsInTossEvent } from "@apps-in-toss/native-modules";
222
- import { useBridge } from "@toss/tds-react-native";
223
- import { useEffect as useEffect4 } from "react";
224
-
225
- // src/core/utils/toIcon.ts
226
- function toIcon(source) {
227
- return source.startsWith("http") ? { source: { uri: source } } : { name: source };
228
- }
229
-
230
- // src/core/hooks/useAppsInTossBridge.ts
231
- function useAppsInTossBridge() {
232
- const controller = useBridge();
233
- const appsInTossGlobals = getAppsInTossGlobals();
234
- useEffect4(() => {
235
- const isGameApp = appsInTossGlobals.webViewType === "game" || appsInTossGlobals.appType === "game";
236
- controller.open({
237
- serviceName: appsInTossGlobals.brandDisplayName,
238
- icon: toIcon(appsInTossGlobals.brandIcon),
239
- color: appsInTossGlobals.brandPrimaryColor,
240
- colorMode: isGameApp ? "inverted" : appsInTossGlobals.brandBridgeColorMode,
241
- onExited: () => {
242
- appsInTossEvent.emit("entryMessageExited", void 0);
243
- }
244
- });
245
- }, []);
246
- }
247
-
248
220
  // src/components/RNAppContainer.tsx
249
- import { appsInTossEvent as appsInTossEvent2, setIosSwipeGestureEnabled } from "@apps-in-toss/native-modules";
250
- import { useEffect as useEffect9, useState as useState5 } from "react";
221
+ import { setIosSwipeGestureEnabled } from "@apps-in-toss/native-modules";
222
+ import { useEffect as useEffect8 } from "react";
251
223
  import { Platform as Platform3 } from "react-native";
252
224
 
253
225
  // src/components/GameInitializer.tsx
@@ -255,7 +227,7 @@ import { isMinVersionSupported } from "@apps-in-toss/native-modules";
255
227
  import { closeView as closeView2 } from "@granite-js/react-native";
256
228
  import { Loader } from "@toss/tds-react-native";
257
229
  import { josa } from "es-hangul";
258
- import { useEffect as useEffect5, useRef as useRef2 } from "react";
230
+ import { useEffect as useEffect4, useRef as useRef2 } from "react";
259
231
  import { Pressable, View } from "react-native";
260
232
 
261
233
  // src/constant/game-center.ts
@@ -506,13 +478,13 @@ var useGameProfileToast = () => {
506
478
  };
507
479
 
508
480
  // src/hooks/useGameCenterProfile.ts
509
- var useGameCenterProfile = (isReadyForProfileUI) => {
481
+ var useGameCenterProfile = () => {
510
482
  const [profileData, setProfileData] = useState3(void 0);
511
483
  const [isProfileDataLoading, setIsProfileDataLoading] = useState3(true);
512
484
  const [isProfileDataRefetching, setIsProfileDataRefetching] = useState3(false);
513
- const shouldShowProfileLoadingOverlay = isProfileDataLoading && isReadyForProfileUI || isProfileDataRefetching;
514
- const shouldShowProfileNotFoundOverlay = profileData?.statusCode === "PROFILE_NOT_FOUND" && isReadyForProfileUI && !isProfileDataRefetching;
515
- const canShowBottomSheetOrToast = !isProfileDataLoading && isReadyForProfileUI;
485
+ const shouldShowProfileLoadingOverlay = isProfileDataLoading || isProfileDataRefetching;
486
+ const shouldShowProfileNotFoundOverlay = profileData?.statusCode === "PROFILE_NOT_FOUND" && !isProfileDataRefetching;
487
+ const canShowBottomSheetOrToast = !isProfileDataLoading;
516
488
  const { openGameProfileToast } = useGameProfileToast();
517
489
  const { open: openErrorAlert } = useErrorAlert();
518
490
  const { open: openTransparentWebView2 } = useTransparentWebview();
@@ -574,7 +546,7 @@ var Z_INDEX = {
574
546
 
575
547
  // src/components/GameInitializer.tsx
576
548
  import { Fragment as Fragment2, jsx as jsx4, jsxs } from "react/jsx-runtime";
577
- var GameInitializer = ({ children, isReadyForProfileUI }) => {
549
+ var GameInitializer = ({ children }) => {
578
550
  const {
579
551
  profileData,
580
552
  shouldShowProfileLoadingOverlay,
@@ -583,13 +555,13 @@ var GameInitializer = ({ children, isReadyForProfileUI }) => {
583
555
  openProfileWebview,
584
556
  openGameProfileToast,
585
557
  fetchProfileData
586
- } = useGameCenterProfile(isReadyForProfileUI);
558
+ } = useGameCenterProfile();
587
559
  const isCompletedFlow = useRef2(false);
588
560
  const { open: openAppUpdateDialog } = useAppUpdateDialog();
589
- useEffect5(() => {
561
+ useEffect4(() => {
590
562
  fetchProfileData();
591
563
  }, []);
592
- useEffect5(() => {
564
+ useEffect4(() => {
593
565
  const handleGameProfileFlow = async () => {
594
566
  if (!canShowBottomSheetOrToast) {
595
567
  return;
@@ -695,10 +667,10 @@ var overlayStyle = {
695
667
  import { NavigationBackButton, NavigationLeft, TopNavigation } from "@toss/tds-react-native/private";
696
668
 
697
669
  // src/components/NavigationBar/RNNavigationBar/hooks/useHardwareBackPress.ts
698
- import { useEffect as useEffect6 } from "react";
670
+ import { useEffect as useEffect5 } from "react";
699
671
  import { BackHandler } from "react-native";
700
672
  function useHardwareBackPress(handler) {
701
- useEffect6(() => {
673
+ useEffect5(() => {
702
674
  const handleBackPress = () => {
703
675
  handler();
704
676
  return true;
@@ -859,7 +831,7 @@ import { INTERNAL__appBridgeHandler, isMinVersionSupported as isMinVersionSuppor
859
831
  import { openURL as openURL5 } from "@granite-js/react-native";
860
832
  import { BottomSheet, List, ListHeader } from "@toss/tds-react-native";
861
833
  import { useAdaptive as useAdaptive2, useOverlay as useOverlay2 } from "@toss/tds-react-native/private";
862
- import { useEffect as useEffect7, useState as useState4 } from "react";
834
+ import { useEffect as useEffect6, useState as useState4 } from "react";
863
835
 
864
836
  // src/core/hooks/useMoreButtonBottomSheet/AppShareListMenu.tsx
865
837
  import { getOperationalEnvironment } from "@apps-in-toss/native-modules";
@@ -1120,7 +1092,7 @@ function useMoreButtonBottomSheet() {
1120
1092
  const isBottomSheetSupported = isMinVersionSupported2(MIN_VERSION.BOTTOM_SHEET);
1121
1093
  const isShareListMenuSupported = isMinVersionSupported2(MIN_VERSION.SHARE_LIST_MENU);
1122
1094
  const [isPermissionsMenuSupported, setIsPermissionsMenuSupported] = useState4(false);
1123
- useEffect7(() => {
1095
+ useEffect6(() => {
1124
1096
  if (!isBottomSheetSupported) {
1125
1097
  return;
1126
1098
  }
@@ -1204,14 +1176,19 @@ function useMoreButtonBottomSheet() {
1204
1176
  }
1205
1177
  function BottomSheetImpressionArea({ children }) {
1206
1178
  const logging = useMoreButtonBottomSheetLogging();
1207
- useEffect7(() => {
1179
+ useEffect6(() => {
1208
1180
  logging.show();
1209
1181
  }, [logging]);
1210
1182
  return /* @__PURE__ */ jsx8(Fragment3, { children });
1211
1183
  }
1212
1184
 
1185
+ // src/core/utils/toIcon.ts
1186
+ function toIcon(source) {
1187
+ return source.startsWith("http") ? { source: { uri: source } } : { name: source };
1188
+ }
1189
+
1213
1190
  // src/components/NavigationBar/common/NavigationBarImpressionArea.tsx
1214
- import { useEffect as useEffect8, useRef as useRef3 } from "react";
1191
+ import { useEffect as useEffect7, useRef as useRef3 } from "react";
1215
1192
  import { Fragment as Fragment4, jsx as jsx9 } from "react/jsx-runtime";
1216
1193
  function NavigationBarImpressionArea({
1217
1194
  children,
@@ -1219,7 +1196,7 @@ function NavigationBarImpressionArea({
1219
1196
  }) {
1220
1197
  const hasLogged = useRef3(false);
1221
1198
  const logging = useNavigationBarLogging();
1222
- useEffect8(() => {
1199
+ useEffect7(() => {
1223
1200
  if (hasLogged.current === false) {
1224
1201
  logging.navBarImpression({ home_icon_yn: withHomeButton ? "Y" : "N" });
1225
1202
  hasLogged.current = true;
@@ -1329,8 +1306,7 @@ function RNAppContainer({ children }) {
1329
1306
  }
1330
1307
  }
1331
1308
  function GameAppContainer({ children }) {
1332
- const [isEntryMessageExited, setIsEntryMessageExited] = useState5(false);
1333
- useEffect9(() => {
1309
+ useEffect8(() => {
1334
1310
  if (Platform3.OS === "ios") {
1335
1311
  setIosSwipeGestureEnabled({ isEnabled: false });
1336
1312
  return () => {
@@ -1339,16 +1315,9 @@ function GameAppContainer({ children }) {
1339
1315
  }
1340
1316
  return;
1341
1317
  }, []);
1342
- useEffect9(() => {
1343
- appsInTossEvent2.addEventListener("entryMessageExited", {
1344
- onEvent: () => {
1345
- setIsEntryMessageExited(true);
1346
- }
1347
- });
1348
- }, []);
1349
1318
  return /* @__PURE__ */ jsxs4(Fragment6, { children: [
1350
1319
  /* @__PURE__ */ jsx12(RNNavigationBar.Game, {}),
1351
- (0, bridge_entry_exports.getOperationalEnvironment)() === "toss" ? /* @__PURE__ */ jsx12(GameInitializer, { isReadyForProfileUI: isEntryMessageExited, children }) : children
1320
+ (0, bridge_entry_exports.getOperationalEnvironment)() === "toss" ? /* @__PURE__ */ jsx12(GameInitializer, { children }) : children
1352
1321
  ] });
1353
1322
  }
1354
1323
  function GeneralAppContainer({ children }) {
@@ -1375,13 +1344,9 @@ function AppsInTossContainer(Container, { children, ...initialProps }) {
1375
1344
  /* @__PURE__ */ jsx13(AppEvent.StayTime, {}),
1376
1345
  /* @__PURE__ */ jsx13(AppEvent.Entry, {}),
1377
1346
  /* @__PURE__ */ jsx13(AppEvent.System, { ...initialProps }),
1378
- /* @__PURE__ */ jsx13(Container, { ...initialProps, children: /* @__PURE__ */ jsx13(TDSProvider, { colorPreference: "light", token: { color: { primary: getAppsInTossGlobals().brandPrimaryColor } }, children: /* @__PURE__ */ jsx13(TDSContainer, { ...initialProps, children }) }) })
1347
+ /* @__PURE__ */ jsx13(Container, { ...initialProps, children: /* @__PURE__ */ jsx13(TDSProvider, { colorPreference: "light", token: { color: { primary: getAppsInTossGlobals().brandPrimaryColor } }, children }) })
1379
1348
  ] });
1380
1349
  }
1381
- function TDSContainer({ children }) {
1382
- useAppsInTossBridge();
1383
- return /* @__PURE__ */ jsx13(Fragment7, { children });
1384
- }
1385
1350
  function registerApp(container, { context, analytics }) {
1386
1351
  const appName = getAppName();
1387
1352
  const isRegistered = AppRegistry.getAppKeys().includes(appName);
@@ -1429,7 +1394,7 @@ import {
1429
1394
  GoogleAdMob as GoogleAdMob2,
1430
1395
  IAP,
1431
1396
  Storage,
1432
- appsInTossEvent as appsInTossEvent4,
1397
+ appsInTossEvent,
1433
1398
  iapCreateOneTimePurchaseOrder,
1434
1399
  processProductGrant,
1435
1400
  requestOneTimePurchase
@@ -1441,15 +1406,15 @@ import { useSafeAreaInsets as useSafeAreaInsets4 } from "@granite-js/native/reac
1441
1406
  import { getSchemeUri as getSchemeUri8 } from "@granite-js/react-native";
1442
1407
  import { ExternalWebViewScreen, tdsEvent } from "@toss/tds-react-native";
1443
1408
  import { useSafeAreaBottom, useSafeAreaTop as useSafeAreaTop3 } from "@toss/tds-react-native/private";
1444
- import { useEffect as useEffect14, useMemo as useMemo7, useRef as useRef6, useState as useState8 } from "react";
1409
+ import { useEffect as useEffect13, useMemo as useMemo7, useRef as useRef6, useState as useState6 } from "react";
1445
1410
  import { BackHandler as BackHandler2, Linking, Platform as Platform6 } from "react-native";
1446
1411
 
1447
1412
  // src/components/GameWebView.tsx
1448
- import { setIosSwipeGestureEnabled as setIosSwipeGestureEnabled3, appsInTossEvent as appsInTossEvent3, getOperationalEnvironment as getOperationalEnvironment4 } from "@apps-in-toss/native-modules";
1413
+ import { setIosSwipeGestureEnabled as setIosSwipeGestureEnabled3, getOperationalEnvironment as getOperationalEnvironment4 } from "@apps-in-toss/native-modules";
1449
1414
  import {
1450
1415
  WebView as PlainWebView
1451
1416
  } from "@granite-js/native/react-native-webview";
1452
- import { forwardRef, useEffect as useEffect10, useState as useState6 } from "react";
1417
+ import { forwardRef, useEffect as useEffect9 } from "react";
1453
1418
  import { Platform as Platform5 } from "react-native";
1454
1419
 
1455
1420
  // src/components/NavigationBar/GameWebviewNavigationBar.tsx
@@ -1522,8 +1487,7 @@ function GameWebviewNavigationBar() {
1522
1487
  // src/components/GameWebView.tsx
1523
1488
  import { Fragment as Fragment9, jsx as jsx15, jsxs as jsxs7 } from "react/jsx-runtime";
1524
1489
  var GameWebView = forwardRef(function GameWebView2(props, ref) {
1525
- const [isEntryMessageExited, setIsEntryMessageExited] = useState6(false);
1526
- useEffect10(() => {
1490
+ useEffect9(() => {
1527
1491
  if (Platform5.OS === "ios") {
1528
1492
  setIosSwipeGestureEnabled3({ isEnabled: false });
1529
1493
  return () => {
@@ -1532,16 +1496,9 @@ var GameWebView = forwardRef(function GameWebView2(props, ref) {
1532
1496
  }
1533
1497
  return;
1534
1498
  }, []);
1535
- useEffect10(() => {
1536
- appsInTossEvent3.addEventListener("entryMessageExited", {
1537
- onEvent: () => {
1538
- setIsEntryMessageExited(true);
1539
- }
1540
- });
1541
- }, []);
1542
1499
  return /* @__PURE__ */ jsxs7(Fragment9, { children: [
1543
1500
  /* @__PURE__ */ jsx15(GameWebviewNavigationBar, {}),
1544
- getOperationalEnvironment4() === "toss" ? /* @__PURE__ */ jsx15(GameInitializer, { isReadyForProfileUI: isEntryMessageExited, children: /* @__PURE__ */ jsx15(PlainWebView, { ref, ...props }) }) : /* @__PURE__ */ jsx15(PlainWebView, { ref, ...props })
1501
+ getOperationalEnvironment4() === "toss" ? /* @__PURE__ */ jsx15(GameInitializer, { children: /* @__PURE__ */ jsx15(PlainWebView, { ref, ...props }) }) : /* @__PURE__ */ jsx15(PlainWebView, { ref, ...props })
1545
1502
  ] });
1546
1503
  });
1547
1504
 
@@ -1623,7 +1580,11 @@ function convertIntentURL(url) {
1623
1580
  }
1624
1581
 
1625
1582
  // src/ads/fetchTossAd.ts
1626
- import { getOperationalEnvironment as getOperationalEnvironment5, INTERNAL__appBridgeHandler as INTERNAL__appBridgeHandler2, isMinVersionSupported as isMinVersionSupported4 } from "@apps-in-toss/native-modules";
1583
+ import {
1584
+ getOperationalEnvironment as getOperationalEnvironment5,
1585
+ INTERNAL__appBridgeHandler as INTERNAL__appBridgeHandler2,
1586
+ isMinVersionSupported as isMinVersionSupported4
1587
+ } from "@apps-in-toss/native-modules";
1627
1588
 
1628
1589
  // ../../.yarn/cache/es-toolkit-npm-1.34.1-4cd6371dcb-aab6d07be3.zip/node_modules/es-toolkit/dist/function/noop.mjs
1629
1590
  function noop() {
@@ -1642,8 +1603,8 @@ function generateSessionId() {
1642
1603
  var sessionId = generateSessionId();
1643
1604
 
1644
1605
  // src/ads/fetchTossAd.ts
1645
- var ANDROID_FETCH_TOSS_AD_SUPPORTED_VERSION = "5.239.0";
1646
- var IOS_FETCH_TOSS_AD_SUPPORTED_VERSION = "5.239.0";
1606
+ var ANDROID_FETCH_TOSS_AD_SUPPORTED_VERSION = "5.241.0";
1607
+ var IOS_FETCH_TOSS_AD_SUPPORTED_VERSION = "5.241.0";
1647
1608
  var UNSUPPORTED_ERROR_MESSAGE = "This feature is not supported in the current environment";
1648
1609
  var ENVIRONMENT = getOperationalEnvironment5();
1649
1610
  function fetchTossAd(params) {
@@ -1655,7 +1616,7 @@ function fetchTossAd(params) {
1655
1616
  const { adGroupId } = options;
1656
1617
  const unregisterCallbacks = INTERNAL__appBridgeHandler2.invokeAppBridgeMethod(
1657
1618
  "fetchTossAd",
1658
- { spaceUnitId: adGroupId, sessionId },
1619
+ { spaceUnitId: adGroupId, sessionId, sdkId: options.sdkId, availableStyleIds: options.availableStyleIds },
1659
1620
  {
1660
1621
  onSuccess: (response) => {
1661
1622
  onEvent(response);
@@ -1746,8 +1707,8 @@ function postEventTracking(params) {
1746
1707
 
1747
1708
  // src/ads/integratedAd.ts
1748
1709
  var INTEGRATED_AD_SDK_VERSION = "0.0.0";
1749
- var ANDROID_INTEGRATED_AD_SUPPORTED_VERSION = "5.239.0";
1750
- var IOS_INTEGRATED_AD_SUPPORTED_VERSION = "5.239.0";
1710
+ var ANDROID_INTEGRATED_AD_SUPPORTED_VERSION = "5.241.0";
1711
+ var IOS_INTEGRATED_AD_SUPPORTED_VERSION = "5.241.0";
1751
1712
  var UNSUPPORTED_ERROR_MESSAGE2 = "This feature is not supported in the current environment";
1752
1713
  var INTG_AD_ADM_FALLBACK_RID_MAP = {};
1753
1714
  function integratedAdIsSupported() {
@@ -1756,65 +1717,70 @@ function integratedAdIsSupported() {
1756
1717
  ios: IOS_INTEGRATED_AD_SUPPORTED_VERSION
1757
1718
  });
1758
1719
  }
1759
- function loadFullScreenAd(params) {
1760
- if (!GoogleAdMob.loadAppsInTossAdMob.isSupported()) {
1761
- params.onError(new Error(UNSUPPORTED_ERROR_MESSAGE2));
1762
- return noop;
1763
- }
1764
- if (!integratedAdIsSupported()) {
1765
- return GoogleAdMob.loadAppsInTossAdMob({
1766
- ...params,
1767
- onEvent: (event) => {
1768
- if (event.type === "loaded") {
1769
- const requestId = generateRequestId();
1770
- INTG_AD_ADM_FALLBACK_RID_MAP[params.options.adGroupId] = requestId;
1720
+ function generateLoadFullScreenAd(sdkId) {
1721
+ const fn = (params) => {
1722
+ if (!GoogleAdMob.loadAppsInTossAdMob.isSupported()) {
1723
+ params.onError(new Error(UNSUPPORTED_ERROR_MESSAGE2));
1724
+ return noop;
1725
+ }
1726
+ if (!integratedAdIsSupported()) {
1727
+ return GoogleAdMob.loadAppsInTossAdMob({
1728
+ ...params,
1729
+ onEvent: (event) => {
1730
+ if (event.type === "loaded") {
1731
+ const requestId = generateRequestId();
1732
+ INTG_AD_ADM_FALLBACK_RID_MAP[params.options.adGroupId] = requestId;
1733
+ postEventTracking({
1734
+ eventName: "LOAD",
1735
+ spaceUnitId: params.options.adGroupId,
1736
+ requestId,
1737
+ responseId: event.data.responseInfo.responseId,
1738
+ mediationType: "ADMOB",
1739
+ format: "",
1740
+ adSourceName: event.data.responseInfo.loadedAdNetworkInfo?.adSourceName ?? "",
1741
+ sdkVer: INTEGRATED_AD_SDK_VERSION
1742
+ });
1743
+ }
1744
+ return params.onEvent(event);
1745
+ },
1746
+ onError: (error) => {
1747
+ const requestId = INTG_AD_ADM_FALLBACK_RID_MAP[params.options.adGroupId] ?? "";
1771
1748
  postEventTracking({
1772
- eventName: "LOAD",
1749
+ eventName: "FAILED_TO_LOAD",
1773
1750
  spaceUnitId: params.options.adGroupId,
1774
1751
  requestId,
1775
- responseId: event.data.responseInfo.responseId,
1752
+ responseId: "",
1776
1753
  mediationType: "ADMOB",
1777
1754
  format: "",
1778
- adSourceName: event.data.responseInfo.loadedAdNetworkInfo?.adSourceName ?? "",
1755
+ adSourceName: "",
1779
1756
  sdkVer: INTEGRATED_AD_SDK_VERSION
1780
1757
  });
1758
+ return params.onError(error);
1781
1759
  }
1782
- return params.onEvent(event);
1783
- },
1784
- onError: (error) => {
1785
- const requestId = INTG_AD_ADM_FALLBACK_RID_MAP[params.options.adGroupId] ?? "";
1786
- postEventTracking({
1787
- eventName: "FAILED_TO_LOAD",
1788
- spaceUnitId: params.options.adGroupId,
1789
- requestId,
1790
- responseId: "",
1791
- mediationType: "ADMOB",
1792
- format: "",
1793
- adSourceName: "",
1794
- sdkVer: INTEGRATED_AD_SDK_VERSION
1795
- });
1796
- return params.onError(error);
1797
- }
1798
- });
1799
- }
1800
- const { onEvent, onError, options } = params;
1801
- const { adGroupId } = options;
1802
- const referrer = getReferrer();
1803
- const unregisterCallbacks = INTERNAL__appBridgeHandler3.invokeAppBridgeMethod(
1804
- "loadTossAdOrAdmob",
1805
- { spaceUnitId: adGroupId, referrer, sessionId },
1806
- {
1807
- onSuccess: () => {
1808
- onEvent({ type: "loaded" });
1809
- },
1810
- onError: (error) => {
1811
- onError(error);
1812
- }
1760
+ });
1813
1761
  }
1814
- );
1815
- return unregisterCallbacks;
1762
+ const { onEvent, onError, options } = params;
1763
+ const { adGroupId } = options;
1764
+ const referrer = getReferrer();
1765
+ const unregisterCallbacks = INTERNAL__appBridgeHandler3.invokeAppBridgeMethod(
1766
+ "loadTossAdOrAdmob",
1767
+ { spaceUnitId: adGroupId, referrer, sessionId, sdkId },
1768
+ {
1769
+ onSuccess: () => {
1770
+ onEvent({ type: "loaded" });
1771
+ },
1772
+ onError: (error) => {
1773
+ onError(error);
1774
+ }
1775
+ }
1776
+ );
1777
+ return unregisterCallbacks;
1778
+ };
1779
+ fn.isSupported = GoogleAdMob.loadAppsInTossAdMob.isSupported;
1780
+ return fn;
1816
1781
  }
1817
- loadFullScreenAd.isSupported = GoogleAdMob.loadAppsInTossAdMob.isSupported;
1782
+ var loadFullScreenAd = generateLoadFullScreenAd("107");
1783
+ var loadFullScreenAdForWeb = generateLoadFullScreenAd("107");
1818
1784
  function showFullScreenAd(params) {
1819
1785
  if (!GoogleAdMob.showAppsInTossAdMob.isSupported()) {
1820
1786
  params.onError(new Error(UNSUPPORTED_ERROR_MESSAGE2));
@@ -1972,7 +1938,7 @@ async function tossAdEventLog(params) {
1972
1938
  }
1973
1939
 
1974
1940
  // src/bridge-handler/useBridgeHandler.tsx
1975
- import { useCallback as useCallback10, useEffect as useEffect11, useMemo as useMemo3, useRef as useRef4 } from "react";
1941
+ import { useCallback as useCallback10, useEffect as useEffect10, useMemo as useMemo3, useRef as useRef4 } from "react";
1976
1942
  function serializeError(error) {
1977
1943
  return JSON.stringify(error, (_, value) => {
1978
1944
  if (value instanceof Error) {
@@ -2037,7 +2003,7 @@ function useBridgeHandler({
2037
2003
  )};`,
2038
2004
  [constantHandlerMap]
2039
2005
  );
2040
- useEffect11(() => {
2006
+ useEffect10(() => {
2041
2007
  ref.current?.injectJavaScript(injectedJavaScript);
2042
2008
  }, [injectedJavaScript]);
2043
2009
  const createHandleOnEvent = (functionName, eventId) => (response) => {
@@ -2111,7 +2077,7 @@ function parseNativeEventData(data) {
2111
2077
 
2112
2078
  // src/core/hooks/useSafeAreaInsetsEmitter.tsx
2113
2079
  import { useSafeAreaInsets as useSafeAreaInsets3 } from "@granite-js/native/react-native-safe-area-context";
2114
- import { useEffect as useEffect12, useMemo as useMemo4 } from "react";
2080
+ import { useEffect as useEffect11, useMemo as useMemo4 } from "react";
2115
2081
  var EventEmitter = class {
2116
2082
  listeners = {};
2117
2083
  on(event, listener) {
@@ -2136,7 +2102,7 @@ var EventEmitter = class {
2136
2102
  function useSafeAreaInsetsEmitter() {
2137
2103
  const insets = useSafeAreaInsets3();
2138
2104
  const emitter = useMemo4(() => new EventEmitter(), []);
2139
- useEffect12(() => {
2105
+ useEffect11(() => {
2140
2106
  emitter.emit("safeAreaInsetsChange", insets);
2141
2107
  return () => {
2142
2108
  emitter.off("safeAreaInsetsChange", (listener) => listener(insets));
@@ -2454,11 +2420,11 @@ function useCreateUserAgent({
2454
2420
  // src/hooks/useGeolocation.ts
2455
2421
  import { startUpdateLocation } from "@apps-in-toss/native-modules";
2456
2422
  import { useVisibility as useVisibility3 } from "@granite-js/react-native";
2457
- import { useEffect as useEffect13, useState as useState7 } from "react";
2423
+ import { useEffect as useEffect12, useState as useState5 } from "react";
2458
2424
  function useGeolocation({ accuracy, distanceInterval, timeInterval }) {
2459
2425
  const isVisible = useVisibility3();
2460
- const [location, setLocation] = useState7(null);
2461
- useEffect13(() => {
2426
+ const [location, setLocation] = useState5(null);
2427
+ useEffect12(() => {
2462
2428
  if (!isVisible) {
2463
2429
  return;
2464
2430
  }
@@ -2607,7 +2573,7 @@ function WebView({ type, local, onMessage, ...props }) {
2607
2573
  const global2 = getAppsInTossGlobals();
2608
2574
  const navigationBarContext = useNavigationBarContext();
2609
2575
  const safeAreaInsetsEmitter = useSafeAreaInsetsEmitter();
2610
- const [allowsBackForwardNavigationGestures, setAllowsBackForwardNavigationGestures] = useState8(
2576
+ const [allowsBackForwardNavigationGestures, setAllowsBackForwardNavigationGestures] = useState6(
2611
2577
  props.allowsBackForwardNavigationGestures
2612
2578
  );
2613
2579
  const handler = useBridgeHandler({
@@ -2621,8 +2587,7 @@ function WebView({ type, local, onMessage, ...props }) {
2621
2587
  webBackHandler.removeEventListener(onEvent);
2622
2588
  };
2623
2589
  },
2624
- entryMessageExited: ({ onEvent, onError }) => appsInTossEvent4.addEventListener("entryMessageExited", { onEvent, onError }),
2625
- updateLocationEvent: ({ onEvent, onError, options }) => appsInTossEvent4.addEventListener("updateLocationEvent", { onEvent, onError, options }),
2590
+ updateLocationEvent: ({ onEvent, onError, options }) => appsInTossEvent.addEventListener("updateLocationEvent", { onEvent, onError, options }),
2626
2591
  safeAreaInsetsChange: ({ onEvent }) => {
2627
2592
  safeAreaInsetsEmitter.on("safeAreaInsetsChange", onEvent);
2628
2593
  return () => {
@@ -2630,7 +2595,7 @@ function WebView({ type, local, onMessage, ...props }) {
2630
2595
  };
2631
2596
  },
2632
2597
  /** @internal */
2633
- appBridgeCallbackEvent: ({ onEvent, onError, options }) => appsInTossEvent4.addEventListener("appBridgeCallbackEvent", { onEvent, onError, options }),
2598
+ appBridgeCallbackEvent: ({ onEvent, onError, options }) => appsInTossEvent.addEventListener("appBridgeCallbackEvent", { onEvent, onError, options }),
2634
2599
  /** AdMob */
2635
2600
  loadAdMobInterstitialAd: GoogleAdMob2.loadAdMobInterstitialAd,
2636
2601
  showAdMobInterstitialAd: GoogleAdMob2.showAdMobInterstitialAd,
@@ -2640,7 +2605,7 @@ function WebView({ type, local, onMessage, ...props }) {
2640
2605
  loadAppsInTossAdMob: GoogleAdMob2.loadAppsInTossAdMob,
2641
2606
  showAppsInTossAdMob: GoogleAdMob2.showAppsInTossAdMob,
2642
2607
  /** IntegratedAd */
2643
- loadFullScreenAd,
2608
+ loadFullScreenAd: loadFullScreenAdForWeb,
2644
2609
  showFullScreenAd,
2645
2610
  /** TossAd */
2646
2611
  fetchTossAd,
@@ -2664,7 +2629,7 @@ function WebView({ type, local, onMessage, ...props }) {
2664
2629
  loadAppsInTossAdMob_isSupported: GoogleAdMob2.loadAppsInTossAdMob.isSupported,
2665
2630
  showAppsInTossAdMob_isSupported: GoogleAdMob2.showAppsInTossAdMob.isSupported,
2666
2631
  /** IntegratedAd */
2667
- loadFullScreenAd_isSupported: loadFullScreenAd.isSupported,
2632
+ loadFullScreenAd_isSupported: loadFullScreenAdForWeb.isSupported,
2668
2633
  showFullScreenAd_isSupported: showFullScreenAd.isSupported,
2669
2634
  /** TossAd */
2670
2635
  fetchTossAd_isSupported: fetchTossAd.isSupported,
@@ -2726,7 +2691,7 @@ function WebView({ type, local, onMessage, ...props }) {
2726
2691
  colorPreference: "light"
2727
2692
  });
2728
2693
  const refs = mergeRefs(handler.ref, webViewRef);
2729
- useEffect14(() => {
2694
+ useEffect13(() => {
2730
2695
  const callback = () => {
2731
2696
  webBackHandler.handleWebBack();
2732
2697
  return true;
@@ -2780,7 +2745,15 @@ function WebView({ type, local, onMessage, ...props }) {
2780
2745
  return false;
2781
2746
  }
2782
2747
  },
2783
- originWhitelist: ["https://*", "http://*", "intoss://*", "intoss-private://*", "servicetoss://*", "supertoss://*", "intent://*"]
2748
+ originWhitelist: [
2749
+ "https://*",
2750
+ "http://*",
2751
+ "intoss://*",
2752
+ "intoss-private://*",
2753
+ "servicetoss://*",
2754
+ "supertoss://*",
2755
+ "intent://*"
2756
+ ]
2784
2757
  }
2785
2758
  );
2786
2759
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@apps-in-toss/framework",
3
3
  "type": "module",
4
- "version": "0.0.0-dev.1764816865438",
4
+ "version": "0.0.0-dev.1765876894045",
5
5
  "description": "The framework for Apps In Toss",
6
6
  "scripts": {
7
7
  "prepack": "yarn build",
@@ -56,11 +56,11 @@
56
56
  "ait": "./bin/ait.js"
57
57
  },
58
58
  "dependencies": {
59
- "@apps-in-toss/analytics": "0.0.0-dev.1764816865438",
60
- "@apps-in-toss/cli": "0.0.0-dev.1764816865438",
61
- "@apps-in-toss/native-modules": "0.0.0-dev.1764816865438",
62
- "@apps-in-toss/plugins": "0.0.0-dev.1764816865438",
63
- "@apps-in-toss/types": "0.0.0-dev.1764816865438",
59
+ "@apps-in-toss/analytics": "0.0.0-dev.1765876894045",
60
+ "@apps-in-toss/cli": "0.0.0-dev.1765876894045",
61
+ "@apps-in-toss/native-modules": "0.0.0-dev.1765876894045",
62
+ "@apps-in-toss/plugins": "0.0.0-dev.1765876894045",
63
+ "@apps-in-toss/types": "0.0.0-dev.1765876894045",
64
64
  "es-hangul": "^2.3.2"
65
65
  },
66
66
  "devDependencies": {
@@ -96,5 +96,5 @@
96
96
  "publishConfig": {
97
97
  "access": "public"
98
98
  },
99
- "gitHead": "d72f564708d831e445bf0ae4e1b9f8cce536dc16"
99
+ "gitHead": "90c26c9a29c75e0f88fe7cc78f42b91455a4aa83"
100
100
  }