@apps-in-toss/framework 1.14.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +126 -124
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +32 -31
- package/package.json +19 -17
package/dist/index.cjs
CHANGED
|
@@ -36,6 +36,7 @@ __export(src_exports, {
|
|
|
36
36
|
INTERNAL__onVisibilityChangedByTransparentServiceWeb: () => INTERNAL__onVisibilityChangedByTransparentServiceWeb,
|
|
37
37
|
InlineAd: () => InlineAd,
|
|
38
38
|
OverlayProvider: () => import_private10.OverlayProvider,
|
|
39
|
+
StartUpdateLocationPermissionError: () => import_types.StartUpdateLocationPermissionError,
|
|
39
40
|
WebView: () => WebView,
|
|
40
41
|
env: () => env,
|
|
41
42
|
homeEvent: () => homeEvent,
|
|
@@ -54,9 +55,9 @@ var import_analytics2 = require("@apps-in-toss/analytics");
|
|
|
54
55
|
// src/core/registerApp.tsx
|
|
55
56
|
var import_analytics = require("@apps-in-toss/analytics");
|
|
56
57
|
var import_native_modules14 = require("@apps-in-toss/native-modules");
|
|
57
|
-
var
|
|
58
|
+
var import_react_native23 = require("@granite-js/react-native");
|
|
58
59
|
var import_tds_react_native10 = require("@toss/tds-react-native");
|
|
59
|
-
var
|
|
60
|
+
var import_react_native24 = require("react-native");
|
|
60
61
|
|
|
61
62
|
// src/core/components/AppEvent.tsx
|
|
62
63
|
var import_native_modules2 = require("@apps-in-toss/native-modules");
|
|
@@ -258,7 +259,7 @@ function useNavigationBarContext() {
|
|
|
258
259
|
// src/components/RNAppContainer.tsx
|
|
259
260
|
var import_native_modules13 = require("@apps-in-toss/native-modules");
|
|
260
261
|
var import_react17 = require("react");
|
|
261
|
-
var
|
|
262
|
+
var import_react_native22 = require("react-native");
|
|
262
263
|
|
|
263
264
|
// src/components/GameInitializer.tsx
|
|
264
265
|
var import_native_modules6 = require("@apps-in-toss/native-modules");
|
|
@@ -713,8 +714,8 @@ function useHardwareBackPress(handler) {
|
|
|
713
714
|
handler();
|
|
714
715
|
return true;
|
|
715
716
|
};
|
|
716
|
-
import_react_native12.BackHandler.addEventListener("hardwareBackPress", handleBackPress);
|
|
717
|
-
return () =>
|
|
717
|
+
const backHandler = import_react_native12.BackHandler.addEventListener("hardwareBackPress", handleBackPress);
|
|
718
|
+
return () => backHandler.remove();
|
|
718
719
|
}, [handler]);
|
|
719
720
|
}
|
|
720
721
|
|
|
@@ -913,7 +914,7 @@ function useNavigationEvent() {
|
|
|
913
914
|
|
|
914
915
|
// src/core/hooks/useMoreButtonBottomSheet/index.tsx
|
|
915
916
|
var import_native_modules12 = require("@apps-in-toss/native-modules");
|
|
916
|
-
var
|
|
917
|
+
var import_react_native20 = require("@granite-js/react-native");
|
|
917
918
|
var import_tds_react_native8 = require("@toss/tds-react-native");
|
|
918
919
|
var import_private4 = require("@toss/tds-react-native/private");
|
|
919
920
|
var import_react15 = require("react");
|
|
@@ -922,7 +923,6 @@ var import_react15 = require("react");
|
|
|
922
923
|
var import_native_modules9 = require("@apps-in-toss/native-modules");
|
|
923
924
|
var import_react_native17 = require("@granite-js/react-native");
|
|
924
925
|
var import_tds_react_native7 = require("@toss/tds-react-native");
|
|
925
|
-
var import_react_native18 = require("react-native");
|
|
926
926
|
|
|
927
927
|
// src/core/hooks/useMoreButtonBottomSheet/Menu.tsx
|
|
928
928
|
var import_tds_react_native6 = require("@toss/tds-react-native");
|
|
@@ -1092,11 +1092,7 @@ function AppShareListMenu() {
|
|
|
1092
1092
|
});
|
|
1093
1093
|
return;
|
|
1094
1094
|
}
|
|
1095
|
-
|
|
1096
|
-
params: {
|
|
1097
|
-
schemeURL: schemeForShare
|
|
1098
|
-
}
|
|
1099
|
-
});
|
|
1095
|
+
(0, import_native_modules9.shareWithScheme)({ schemeURL: schemeForShare });
|
|
1100
1096
|
}
|
|
1101
1097
|
}
|
|
1102
1098
|
);
|
|
@@ -1104,7 +1100,7 @@ function AppShareListMenu() {
|
|
|
1104
1100
|
|
|
1105
1101
|
// src/core/hooks/useMoreButtonBottomSheet/HomeShortcutMenu.tsx
|
|
1106
1102
|
var import_native_modules10 = require("@apps-in-toss/native-modules");
|
|
1107
|
-
var
|
|
1103
|
+
var import_react_native18 = require("react-native");
|
|
1108
1104
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
1109
1105
|
function HomeShortcutMenu() {
|
|
1110
1106
|
const isSandbox = (0, import_native_modules10.getOperationalEnvironment)() === "sandbox";
|
|
@@ -1118,7 +1114,7 @@ function HomeShortcutMenu() {
|
|
|
1118
1114
|
title: "\uD648 \uD654\uBA74\uC5D0 \uCD94\uAC00",
|
|
1119
1115
|
iconURL: "https://static.toss.im/icons/png/4x/icon-plus-circle-mono.png",
|
|
1120
1116
|
onPress: () => {
|
|
1121
|
-
|
|
1117
|
+
import_react_native18.NativeModules.AppsInTossModule.addMiniAppShortcut({
|
|
1122
1118
|
title: globals.brandDisplayName,
|
|
1123
1119
|
appName: global.__granite.app.name,
|
|
1124
1120
|
iconUrl: globals.brandIcon,
|
|
@@ -1131,7 +1127,7 @@ function HomeShortcutMenu() {
|
|
|
1131
1127
|
|
|
1132
1128
|
// src/core/hooks/useMoreButtonBottomSheet/SettingsMenu.tsx
|
|
1133
1129
|
var import_native_modules11 = require("@apps-in-toss/native-modules");
|
|
1134
|
-
var
|
|
1130
|
+
var import_react_native19 = require("@granite-js/react-native");
|
|
1135
1131
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1136
1132
|
function SettingsMenu() {
|
|
1137
1133
|
const globals = getAppsInTossGlobals();
|
|
@@ -1143,8 +1139,8 @@ function SettingsMenu() {
|
|
|
1143
1139
|
{
|
|
1144
1140
|
title: "\uC124\uC815",
|
|
1145
1141
|
iconURL: "https://static.toss.im/icons/png/4x/icon-setting-mono.png",
|
|
1146
|
-
onPress: () => (0,
|
|
1147
|
-
`servicetoss://apps-in-toss-menu/settings?appName=${
|
|
1142
|
+
onPress: () => (0, import_react_native19.openURL)(
|
|
1143
|
+
`servicetoss://apps-in-toss-menu/settings?appName=${import_react_native19.Granite.appName}&displayAppName=${globals.brandDisplayName}`
|
|
1148
1144
|
)
|
|
1149
1145
|
}
|
|
1150
1146
|
);
|
|
@@ -1248,7 +1244,7 @@ function useMoreButtonBottomSheet() {
|
|
|
1248
1244
|
{
|
|
1249
1245
|
title: item.contactItemName,
|
|
1250
1246
|
iconURL: item.contactIconUrl,
|
|
1251
|
-
onPress: () => (0,
|
|
1247
|
+
onPress: () => (0, import_react_native20.openURL)(item.contactUri)
|
|
1252
1248
|
},
|
|
1253
1249
|
item.contactItemName
|
|
1254
1250
|
)),
|
|
@@ -1325,7 +1321,7 @@ function DefaultNavigationBar() {
|
|
|
1325
1321
|
var import_react_native_safe_area_context = require("@granite-js/native/react-native-safe-area-context");
|
|
1326
1322
|
var import_tds_react_native9 = require("@toss/tds-react-native");
|
|
1327
1323
|
var import_private6 = require("@toss/tds-react-native/private");
|
|
1328
|
-
var
|
|
1324
|
+
var import_react_native21 = require("react-native");
|
|
1329
1325
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1330
1326
|
function GameNavigationBar() {
|
|
1331
1327
|
const safeAreaTop = (0, import_private6.useSafeAreaTop)();
|
|
@@ -1337,12 +1333,12 @@ function GameNavigationBar() {
|
|
|
1337
1333
|
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
|
|
1338
1334
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_tds_react_native9.PageNavbar, { preference: { type: "none" } }),
|
|
1339
1335
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1340
|
-
|
|
1336
|
+
import_react_native21.View,
|
|
1341
1337
|
{
|
|
1342
1338
|
style: {
|
|
1343
1339
|
width: "100%",
|
|
1344
1340
|
// TODO: UI관련 스타일 설정은 TDS로 이관
|
|
1345
|
-
height:
|
|
1341
|
+
height: import_react_native21.Platform.OS === "ios" ? 44 : 54,
|
|
1346
1342
|
flexDirection: "row",
|
|
1347
1343
|
alignItems: "center",
|
|
1348
1344
|
justifyContent: "flex-end",
|
|
@@ -1392,7 +1388,7 @@ function RNAppContainer({ children }) {
|
|
|
1392
1388
|
}
|
|
1393
1389
|
function GameAppContainer({ children }) {
|
|
1394
1390
|
(0, import_react17.useEffect)(() => {
|
|
1395
|
-
if (
|
|
1391
|
+
if (import_react_native22.Platform.OS === "ios") {
|
|
1396
1392
|
(0, import_native_modules13.setIosSwipeGestureEnabled)({ isEnabled: false });
|
|
1397
1393
|
return () => {
|
|
1398
1394
|
(0, import_native_modules13.setIosSwipeGestureEnabled)({ isEnabled: true });
|
|
@@ -1434,15 +1430,16 @@ function AppsInTossContainer(Container, { children, ...initialProps }) {
|
|
|
1434
1430
|
}
|
|
1435
1431
|
function registerApp(container, { context, analytics }) {
|
|
1436
1432
|
const appName = getAppName();
|
|
1437
|
-
const isRegistered =
|
|
1433
|
+
const isRegistered = import_react_native24.AppRegistry.getAppKeys().includes(appName);
|
|
1438
1434
|
if (!isRegistered) {
|
|
1439
1435
|
import_analytics.Analytics.init({
|
|
1440
1436
|
logger: (params) => void (0, import_native_modules14.eventLog)(params),
|
|
1441
1437
|
debug: analytics?.debug ?? __DEV__
|
|
1442
1438
|
});
|
|
1443
|
-
const App =
|
|
1439
|
+
const App = import_react_native23.Granite.registerApp(AppsInTossContainer.bind(null, container), {
|
|
1444
1440
|
appName,
|
|
1445
1441
|
context,
|
|
1442
|
+
initialScheme: (0, import_native_modules14.getSchemeUri)(),
|
|
1446
1443
|
setIosSwipeGestureEnabled: import_native_modules14.setIosSwipeGestureEnabled,
|
|
1447
1444
|
router: {
|
|
1448
1445
|
screenContainer: AppsInTossScreenContainer,
|
|
@@ -1480,26 +1477,26 @@ var appsInTossConstantBridges = __toESM(require("@apps-in-toss/native-modules/co
|
|
|
1480
1477
|
var appsInTossEventBridges = __toESM(require("@apps-in-toss/native-modules/event-bridges"), 1);
|
|
1481
1478
|
var import_user_scripts = require("@apps-in-toss/user-scripts");
|
|
1482
1479
|
var import_react_native_safe_area_context4 = require("@granite-js/native/react-native-safe-area-context");
|
|
1483
|
-
var
|
|
1480
|
+
var import_react_native38 = require("@granite-js/react-native");
|
|
1484
1481
|
var import_tds_react_native15 = require("@toss/tds-react-native");
|
|
1485
1482
|
var import_private9 = require("@toss/tds-react-native/private");
|
|
1486
1483
|
var import_react28 = require("react");
|
|
1487
|
-
var
|
|
1484
|
+
var import_react_native39 = require("react-native");
|
|
1488
1485
|
|
|
1489
1486
|
// src/components/GameWebView.tsx
|
|
1490
1487
|
var import_native_modules15 = require("@apps-in-toss/native-modules");
|
|
1491
1488
|
var import_react_native_webview = require("@granite-js/native/react-native-webview");
|
|
1492
1489
|
var import_react19 = require("react");
|
|
1493
|
-
var
|
|
1490
|
+
var import_react_native27 = require("react-native");
|
|
1494
1491
|
|
|
1495
1492
|
// src/components/NavigationBar/GameWebviewNavigationBar.tsx
|
|
1496
1493
|
var import_react_native_safe_area_context2 = require("@granite-js/native/react-native-safe-area-context");
|
|
1497
|
-
var
|
|
1494
|
+
var import_react_native25 = require("@granite-js/react-native");
|
|
1498
1495
|
var import_tds_react_native11 = require("@toss/tds-react-native");
|
|
1499
1496
|
var import_private7 = require("@toss/tds-react-native/private");
|
|
1500
1497
|
var import_es_hangul3 = require("es-hangul");
|
|
1501
1498
|
var import_react18 = require("react");
|
|
1502
|
-
var
|
|
1499
|
+
var import_react_native26 = require("react-native");
|
|
1503
1500
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1504
1501
|
function GameWebviewNavigationBar() {
|
|
1505
1502
|
const safeAreaTop = (0, import_private7.useSafeAreaTop)();
|
|
@@ -1522,18 +1519,18 @@ function GameWebviewNavigationBar() {
|
|
|
1522
1519
|
logging.closePopupCtaClick(isConfirmed);
|
|
1523
1520
|
if (isConfirmed) {
|
|
1524
1521
|
captureExitLog(Date.now());
|
|
1525
|
-
(0,
|
|
1522
|
+
(0, import_react_native25.closeView)();
|
|
1526
1523
|
}
|
|
1527
1524
|
}, [captureExitLog, global2.brandDisplayName, logging, openConfirm]);
|
|
1528
1525
|
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
1529
1526
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_tds_react_native11.PageNavbar, { preference: { type: "none" } }),
|
|
1530
1527
|
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1531
|
-
|
|
1528
|
+
import_react_native26.View,
|
|
1532
1529
|
{
|
|
1533
1530
|
style: {
|
|
1534
1531
|
width: "100%",
|
|
1535
1532
|
// TODO: UI관련 스타일 설정은 TDS로 이관
|
|
1536
|
-
height:
|
|
1533
|
+
height: import_react_native26.Platform.OS === "ios" ? 44 : 54,
|
|
1537
1534
|
flexDirection: "row",
|
|
1538
1535
|
alignItems: "center",
|
|
1539
1536
|
justifyContent: "flex-end",
|
|
@@ -1563,7 +1560,7 @@ function GameWebviewNavigationBar() {
|
|
|
1563
1560
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1564
1561
|
var GameWebView = (0, import_react19.forwardRef)(function GameWebView2(props, ref) {
|
|
1565
1562
|
(0, import_react19.useEffect)(() => {
|
|
1566
|
-
if (
|
|
1563
|
+
if (import_react_native27.Platform.OS === "ios") {
|
|
1567
1564
|
(0, import_native_modules15.setIosSwipeGestureEnabled)({ isEnabled: false });
|
|
1568
1565
|
return () => {
|
|
1569
1566
|
(0, import_native_modules15.setIosSwipeGestureEnabled)({ isEnabled: true });
|
|
@@ -1582,7 +1579,7 @@ var import_react_native_webview2 = require("@granite-js/native/react-native-webv
|
|
|
1582
1579
|
var import_react21 = require("react");
|
|
1583
1580
|
|
|
1584
1581
|
// src/components/NavigationBar/PartnerWebviewNavigationBar.tsx
|
|
1585
|
-
var
|
|
1582
|
+
var import_react_native28 = require("@granite-js/react-native");
|
|
1586
1583
|
var import_tds_react_native12 = require("@toss/tds-react-native");
|
|
1587
1584
|
var import_private8 = require("@toss/tds-react-native/private");
|
|
1588
1585
|
var import_es_hangul4 = require("es-hangul");
|
|
@@ -1610,7 +1607,7 @@ function PartnerWebviewNavigationBar({ onBackButtonClick, onHomeButtonClick }) {
|
|
|
1610
1607
|
logging.closePopupCtaClick(isConfirmed);
|
|
1611
1608
|
if (isConfirmed) {
|
|
1612
1609
|
captureExitLog(Date.now());
|
|
1613
|
-
(0,
|
|
1610
|
+
(0, import_react_native28.closeView)();
|
|
1614
1611
|
}
|
|
1615
1612
|
}, [captureExitLog, globals.brandDisplayName, logging, openConfirm]);
|
|
1616
1613
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(NavigationBarImpressionArea, { withHomeButton, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
@@ -1718,10 +1715,10 @@ function generateRequestId() {
|
|
|
1718
1715
|
}
|
|
1719
1716
|
|
|
1720
1717
|
// src/ads/getReferrer.ts
|
|
1721
|
-
var
|
|
1718
|
+
var import_react_native29 = require("@granite-js/react-native");
|
|
1722
1719
|
function getReferrer() {
|
|
1723
1720
|
try {
|
|
1724
|
-
return new URL((0,
|
|
1721
|
+
return new URL((0, import_react_native29.getSchemeUri)()).searchParams.get("referrer");
|
|
1725
1722
|
} catch {
|
|
1726
1723
|
return null;
|
|
1727
1724
|
}
|
|
@@ -1731,10 +1728,10 @@ function getReferrer() {
|
|
|
1731
1728
|
var import_native_modules17 = require("@apps-in-toss/native-modules");
|
|
1732
1729
|
|
|
1733
1730
|
// src/ads/getIsDev.ts
|
|
1734
|
-
var
|
|
1731
|
+
var import_react_native30 = require("@granite-js/react-native");
|
|
1735
1732
|
function getIsDev() {
|
|
1736
1733
|
try {
|
|
1737
|
-
return new URL((0,
|
|
1734
|
+
return new URL((0, import_react_native30.getSchemeUri)()).searchParams.get("isDev") === "true";
|
|
1738
1735
|
} catch {
|
|
1739
1736
|
return false;
|
|
1740
1737
|
}
|
|
@@ -1988,10 +1985,10 @@ showFullScreenAd.isSupported = import_native_modules18.GoogleAdMob.showAppsInTos
|
|
|
1988
1985
|
|
|
1989
1986
|
// src/ads/tossAdEventLog.ts
|
|
1990
1987
|
var import_native_modules19 = require("@apps-in-toss/native-modules");
|
|
1991
|
-
var
|
|
1988
|
+
var import_react_native31 = require("@granite-js/react-native");
|
|
1992
1989
|
async function tossAdEventLog(params) {
|
|
1993
1990
|
const referrer = getReferrer();
|
|
1994
|
-
const appName =
|
|
1991
|
+
const appName = import_react_native31.Granite.appName;
|
|
1995
1992
|
const eventLogParams = {
|
|
1996
1993
|
...params,
|
|
1997
1994
|
params: {
|
|
@@ -2156,7 +2153,7 @@ function useSafeAreaInsetsEvent() {
|
|
|
2156
2153
|
}
|
|
2157
2154
|
|
|
2158
2155
|
// src/core/hooks/useWebBackHandler.tsx
|
|
2159
|
-
var
|
|
2156
|
+
var import_react_native32 = require("@granite-js/react-native");
|
|
2160
2157
|
var import_tds_react_native13 = require("@toss/tds-react-native");
|
|
2161
2158
|
var import_es_hangul5 = require("es-hangul");
|
|
2162
2159
|
var import_react25 = require("react");
|
|
@@ -2214,7 +2211,7 @@ function useWebBackHandler(webViewInitialURL, webViewRef) {
|
|
|
2214
2211
|
hasBackEvent: hasWebBackEvent,
|
|
2215
2212
|
addEventListener: addWebBackEventListener,
|
|
2216
2213
|
removeEventListener: removeWebBackEventListener
|
|
2217
|
-
} = (0,
|
|
2214
|
+
} = (0, import_react_native32.useBackEventState)();
|
|
2218
2215
|
const logging = useNavigationBarLogging();
|
|
2219
2216
|
const { openConfirm } = (0, import_tds_react_native13.useDialog)();
|
|
2220
2217
|
const global2 = getAppsInTossGlobals();
|
|
@@ -2250,7 +2247,7 @@ function useWebBackHandler(webViewInitialURL, webViewRef) {
|
|
|
2250
2247
|
logging.closePopupCtaClick(isConfirmed);
|
|
2251
2248
|
if (isConfirmed) {
|
|
2252
2249
|
captureExitLog(Date.now());
|
|
2253
|
-
(0,
|
|
2250
|
+
(0, import_react_native32.closeView)();
|
|
2254
2251
|
}
|
|
2255
2252
|
}
|
|
2256
2253
|
}, [
|
|
@@ -2297,7 +2294,7 @@ function mergeRefs(...refs) {
|
|
|
2297
2294
|
|
|
2298
2295
|
// src/hooks/useCreateUserAgent.ts
|
|
2299
2296
|
var import_native_modules20 = require("@apps-in-toss/native-modules");
|
|
2300
|
-
var
|
|
2297
|
+
var import_react_native33 = require("react-native");
|
|
2301
2298
|
var FontA11yCategory = {
|
|
2302
2299
|
Large: "Large",
|
|
2303
2300
|
xLarge: "xLarge",
|
|
@@ -2432,7 +2429,7 @@ function useCreateUserAgent({
|
|
|
2432
2429
|
}) {
|
|
2433
2430
|
const platform = (0, import_native_modules20.getPlatformOS)();
|
|
2434
2431
|
const appVersion = (0, import_native_modules20.getTossAppVersion)();
|
|
2435
|
-
const { fontScale } = (0,
|
|
2432
|
+
const { fontScale } = (0, import_react_native33.useWindowDimensions)();
|
|
2436
2433
|
const platformString = platform === "ios" ? "iPhone" : "Android phone";
|
|
2437
2434
|
const fontA11y = mapFontScaleToCategory(fontScale, platform);
|
|
2438
2435
|
const normalizedFontScale = convertToAndroidStyleScale(fontScale, platform);
|
|
@@ -2454,10 +2451,10 @@ function useCreateUserAgent({
|
|
|
2454
2451
|
|
|
2455
2452
|
// src/hooks/useGeolocation.ts
|
|
2456
2453
|
var import_native_modules21 = require("@apps-in-toss/native-modules");
|
|
2457
|
-
var
|
|
2454
|
+
var import_react_native34 = require("@granite-js/react-native");
|
|
2458
2455
|
var import_react26 = require("react");
|
|
2459
2456
|
function useGeolocation({ accuracy, distanceInterval, timeInterval }) {
|
|
2460
|
-
const isVisible = (0,
|
|
2457
|
+
const isVisible = (0, import_react_native34.useVisibility)();
|
|
2461
2458
|
const [location, setLocation] = (0, import_react26.useState)(null);
|
|
2462
2459
|
(0, import_react26.useEffect)(() => {
|
|
2463
2460
|
if (!isVisible) {
|
|
@@ -2477,11 +2474,11 @@ function useGeolocation({ accuracy, distanceInterval, timeInterval }) {
|
|
|
2477
2474
|
}
|
|
2478
2475
|
|
|
2479
2476
|
// src/hooks/useWaitForReturnNavigator.tsx
|
|
2480
|
-
var
|
|
2477
|
+
var import_react_native35 = require("@granite-js/react-native");
|
|
2481
2478
|
var import_react27 = require("react");
|
|
2482
2479
|
function useWaitForReturnNavigator() {
|
|
2483
2480
|
const callbacks = (0, import_react27.useRef)([]).current;
|
|
2484
|
-
const navigation = (0,
|
|
2481
|
+
const navigation = (0, import_react_native35.useNavigation)();
|
|
2485
2482
|
const startNavigating = (0, import_react27.useCallback)(
|
|
2486
2483
|
(route, params) => {
|
|
2487
2484
|
return new Promise((resolve) => {
|
|
@@ -2502,7 +2499,7 @@ function useWaitForReturnNavigator() {
|
|
|
2502
2499
|
},
|
|
2503
2500
|
[callbacks]
|
|
2504
2501
|
);
|
|
2505
|
-
(0,
|
|
2502
|
+
(0, import_react_native35.useVisibilityChange)(handleVisibilityChange);
|
|
2506
2503
|
return startNavigating;
|
|
2507
2504
|
}
|
|
2508
2505
|
|
|
@@ -2517,7 +2514,7 @@ function useTopNavigation() {
|
|
|
2517
2514
|
|
|
2518
2515
|
// src/hooks/useWebViewMemoryDebug.tsx
|
|
2519
2516
|
var import_native_modules22 = require("@apps-in-toss/native-modules");
|
|
2520
|
-
var
|
|
2517
|
+
var import_react_native36 = require("@granite-js/react-native");
|
|
2521
2518
|
var import_tds_react_native14 = require("@toss/tds-react-native");
|
|
2522
2519
|
function useHandleWebViewProcessDidTerminate(webViewRef) {
|
|
2523
2520
|
const toast = (0, import_tds_react_native14.useToast)();
|
|
@@ -2540,7 +2537,7 @@ function webViewDebugLog(logName, params) {
|
|
|
2540
2537
|
log_type: "debug",
|
|
2541
2538
|
params: {
|
|
2542
2539
|
...params,
|
|
2543
|
-
app_name:
|
|
2540
|
+
app_name: import_react_native36.Granite.appName,
|
|
2544
2541
|
deployment_id: global2.deploymentId
|
|
2545
2542
|
}
|
|
2546
2543
|
};
|
|
@@ -2553,7 +2550,7 @@ function webViewDebugLog(logName, params) {
|
|
|
2553
2550
|
|
|
2554
2551
|
// src/utils/log.ts
|
|
2555
2552
|
var import_native_modules23 = require("@apps-in-toss/native-modules");
|
|
2556
|
-
var
|
|
2553
|
+
var import_react_native37 = require("@granite-js/react-native");
|
|
2557
2554
|
|
|
2558
2555
|
// src/utils/extractDateFromUUIDv7.ts
|
|
2559
2556
|
var extractDateFromUUIDv7 = (uuid) => {
|
|
@@ -2579,7 +2576,7 @@ var getGroupId = (url) => {
|
|
|
2579
2576
|
};
|
|
2580
2577
|
var getReferrer2 = () => {
|
|
2581
2578
|
try {
|
|
2582
|
-
const referrer = new URL((0,
|
|
2579
|
+
const referrer = new URL((0, import_react_native37.getSchemeUri)());
|
|
2583
2580
|
return referrer.searchParams.get("referrer");
|
|
2584
2581
|
} catch {
|
|
2585
2582
|
return "";
|
|
@@ -2611,19 +2608,22 @@ var WEBVIEW_TYPES = {
|
|
|
2611
2608
|
};
|
|
2612
2609
|
function mergeSchemeQueryParamsInto(url) {
|
|
2613
2610
|
const baseUrl = new URL(url);
|
|
2614
|
-
const schemeUrl = new URL((0,
|
|
2615
|
-
|
|
2611
|
+
const schemeUrl = new URL((0, import_react_native38.getSchemeUri)());
|
|
2612
|
+
const resultUrl = new URL(schemeUrl.pathname, baseUrl.origin);
|
|
2613
|
+
for (const [key, value] of baseUrl.searchParams.entries()) {
|
|
2614
|
+
resultUrl.searchParams.set(key, value);
|
|
2615
|
+
}
|
|
2616
2616
|
for (const [key, value] of schemeUrl.searchParams.entries()) {
|
|
2617
|
-
|
|
2617
|
+
resultUrl.searchParams.set(key, value);
|
|
2618
2618
|
}
|
|
2619
|
-
return
|
|
2619
|
+
return resultUrl;
|
|
2620
2620
|
}
|
|
2621
2621
|
function getWebViewURL(local) {
|
|
2622
2622
|
if (__DEV__) {
|
|
2623
2623
|
const devUrl = `http://${local.host}:${local.port}`;
|
|
2624
2624
|
return mergeSchemeQueryParamsInto(devUrl);
|
|
2625
2625
|
}
|
|
2626
|
-
const { url: rawUrl } = import_native_modules24.
|
|
2626
|
+
const { url: rawUrl } = (0, import_native_modules24.safeSyncPostMessage)("getWebBundleURL", {});
|
|
2627
2627
|
const url = mergeSchemeQueryParamsInto(rawUrl);
|
|
2628
2628
|
const deploymentId = env.getDeploymentId();
|
|
2629
2629
|
if (deploymentId) {
|
|
@@ -2738,8 +2738,8 @@ function WebView({ type, local, onMessage, ...props }) {
|
|
|
2738
2738
|
/** Private */
|
|
2739
2739
|
memoryDebugLog: webViewMemoryDebugLog,
|
|
2740
2740
|
debugLog: async (event) => {
|
|
2741
|
-
|
|
2742
|
-
|
|
2741
|
+
import_react_native39.NativeModules.AppsInTossModule?.eventLog(event);
|
|
2742
|
+
import_react_native39.NativeModules.TossCoreModule?.eventLog({ params: event });
|
|
2743
2743
|
}
|
|
2744
2744
|
}
|
|
2745
2745
|
});
|
|
@@ -2769,8 +2769,8 @@ function WebView({ type, local, onMessage, ...props }) {
|
|
|
2769
2769
|
webBackHandler.handleWebBack();
|
|
2770
2770
|
return true;
|
|
2771
2771
|
};
|
|
2772
|
-
|
|
2773
|
-
return () =>
|
|
2772
|
+
const subscription = import_react_native39.BackHandler.addEventListener("hardwareBackPress", callback);
|
|
2773
|
+
return () => subscription.remove();
|
|
2774
2774
|
}, [webBackHandler]);
|
|
2775
2775
|
const handleWebViewProcessDidTerminate = useHandleWebViewProcessDidTerminate(webViewRef);
|
|
2776
2776
|
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
@@ -2795,14 +2795,14 @@ function WebView({ type, local, onMessage, ...props }) {
|
|
|
2795
2795
|
props.onNavigationStateChange?.(event);
|
|
2796
2796
|
webBackHandler.onNavigationStateChange(event);
|
|
2797
2797
|
},
|
|
2798
|
-
userAgent:
|
|
2798
|
+
userAgent: import_react_native39.Platform.OS === "ios" ? userAgent : void 0,
|
|
2799
2799
|
sharedCookiesEnabled: true,
|
|
2800
2800
|
webviewDebuggingEnabled: webViewDebuggingEnabled,
|
|
2801
2801
|
thirdPartyCookiesEnabled: true,
|
|
2802
2802
|
onMessage: handler.onMessage,
|
|
2803
2803
|
injectedJavaScript: import_user_scripts.afterDocumentLoad,
|
|
2804
2804
|
injectedJavaScriptBeforeContentLoaded: [handler.injectedJavaScript, import_user_scripts.beforeDocumentLoad].join("\n"),
|
|
2805
|
-
decelerationRate:
|
|
2805
|
+
decelerationRate: import_react_native39.Platform.OS === "ios" ? 1 : void 0,
|
|
2806
2806
|
allowsBackForwardNavigationGestures,
|
|
2807
2807
|
onShouldStartLoadWithRequest: (event) => {
|
|
2808
2808
|
try {
|
|
@@ -2810,7 +2810,7 @@ function WebView({ type, local, onMessage, ...props }) {
|
|
|
2810
2810
|
if (["https:", "http:"].includes(url2.protocol) || url2.href === "about:blank") {
|
|
2811
2811
|
return true;
|
|
2812
2812
|
} else {
|
|
2813
|
-
|
|
2813
|
+
import_react_native39.Linking.openURL(convertIntentURL(url2) ?? url2.href);
|
|
2814
2814
|
return false;
|
|
2815
2815
|
}
|
|
2816
2816
|
} catch (error) {
|
|
@@ -2838,11 +2838,12 @@ __reExport(src_exports, require("@apps-in-toss/analytics"), module.exports);
|
|
|
2838
2838
|
var import_private10 = require("@toss/tds-react-native/private");
|
|
2839
2839
|
__reExport(src_exports, require("@apps-in-toss/native-modules"), module.exports);
|
|
2840
2840
|
__reExport(src_exports, require("@apps-in-toss/types"), module.exports);
|
|
2841
|
+
var import_types = require("@apps-in-toss/types");
|
|
2841
2842
|
|
|
2842
2843
|
// src/ads/inlineAd/InlineAd.tsx
|
|
2843
|
-
var
|
|
2844
|
+
var import_react_native43 = require("@granite-js/react-native");
|
|
2844
2845
|
var import_react31 = require("react");
|
|
2845
|
-
var
|
|
2846
|
+
var import_react_native44 = require("react-native");
|
|
2846
2847
|
|
|
2847
2848
|
// src/ads/inlineAd/constants.ts
|
|
2848
2849
|
var SDK_ID = "106";
|
|
@@ -3103,7 +3104,7 @@ async function loadAd(adGroupId) {
|
|
|
3103
3104
|
}
|
|
3104
3105
|
|
|
3105
3106
|
// src/ads/inlineAd/opener.ts
|
|
3106
|
-
var
|
|
3107
|
+
var import_react_native40 = require("@granite-js/react-native");
|
|
3107
3108
|
function isSafeUrl(url) {
|
|
3108
3109
|
try {
|
|
3109
3110
|
const parsed = new URL(url);
|
|
@@ -3135,7 +3136,7 @@ function openLandingUrl(url) {
|
|
|
3135
3136
|
return;
|
|
3136
3137
|
}
|
|
3137
3138
|
try {
|
|
3138
|
-
(0,
|
|
3139
|
+
(0, import_react_native40.openURL)(getWebSchemeOrUri(url));
|
|
3139
3140
|
} catch (error) {
|
|
3140
3141
|
console.error("[InlineAd] Failed to open landing URL:", error);
|
|
3141
3142
|
}
|
|
@@ -3223,7 +3224,7 @@ var EventTracker = class {
|
|
|
3223
3224
|
// src/ads/inlineAd/ui/FeedBannerAdView.tsx
|
|
3224
3225
|
var import_react_native_svg = require("@granite-js/native/react-native-svg");
|
|
3225
3226
|
var import_react29 = require("react");
|
|
3226
|
-
var
|
|
3227
|
+
var import_react_native41 = require("react-native");
|
|
3227
3228
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
3228
3229
|
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";
|
|
3229
3230
|
function FeedBannerAdView({
|
|
@@ -3241,12 +3242,12 @@ function FeedBannerAdView({
|
|
|
3241
3242
|
paddingStyle,
|
|
3242
3243
|
onPress
|
|
3243
3244
|
}) {
|
|
3244
|
-
const scale = (0, import_react29.useRef)(new
|
|
3245
|
+
const scale = (0, import_react29.useRef)(new import_react_native41.Animated.Value(1)).current;
|
|
3245
3246
|
const animateScale = (toValue) => {
|
|
3246
|
-
|
|
3247
|
+
import_react_native41.Animated.timing(scale, {
|
|
3247
3248
|
toValue,
|
|
3248
3249
|
duration: 100,
|
|
3249
|
-
easing:
|
|
3250
|
+
easing: import_react_native41.Easing.inOut(import_react_native41.Easing.ease),
|
|
3250
3251
|
useNativeDriver: true
|
|
3251
3252
|
}).start();
|
|
3252
3253
|
};
|
|
@@ -3259,81 +3260,81 @@ function FeedBannerAdView({
|
|
|
3259
3260
|
const resolvedCtaBackground = ctaBackgroundColor ?? "#3081F9";
|
|
3260
3261
|
const resolvedCtaTextColor = ctaTextColor ?? "#ffffff";
|
|
3261
3262
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3262
|
-
|
|
3263
|
+
import_react_native41.Pressable,
|
|
3263
3264
|
{
|
|
3264
3265
|
accessibilityRole: "button",
|
|
3265
3266
|
onPress: () => onPress(null),
|
|
3266
3267
|
onPressIn: handlePressIn,
|
|
3267
3268
|
onPressOut: handlePressOut,
|
|
3268
3269
|
style: styles.pressable,
|
|
3269
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
3270
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
3271
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
3270
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native41.Animated.View, { style: [styles.container, paddingStyle, { transform: [{ scale }] }], children: [
|
|
3271
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native41.View, { style: styles.profileContainer, children: [
|
|
3272
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native41.View, { style: styles.brandArea, children: [
|
|
3272
3273
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3273
|
-
|
|
3274
|
+
import_react_native41.Pressable,
|
|
3274
3275
|
{
|
|
3275
3276
|
accessibilityRole: "button",
|
|
3276
3277
|
onPress: () => onPress("202"),
|
|
3277
3278
|
onPressIn: handlePressIn,
|
|
3278
3279
|
onPressOut: handlePressOut,
|
|
3279
3280
|
style: styles.logoContainer,
|
|
3280
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
3281
|
-
brandLogoUri ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3282
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3281
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native41.View, { style: [styles.logoWrapper, { backgroundColor: colors.brandLogoBg }], children: [
|
|
3282
|
+
brandLogoUri ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native41.Image, { source: { uri: brandLogoUri }, style: styles.logoImage, resizeMode: "cover" }) : null,
|
|
3283
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native41.View, { style: [styles.logoOverlay, { borderColor: colors.brandLogoBorder }] })
|
|
3283
3284
|
] })
|
|
3284
3285
|
}
|
|
3285
3286
|
),
|
|
3286
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
3287
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native41.View, { style: styles.brandTextContainer, children: [
|
|
3287
3288
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3288
|
-
|
|
3289
|
+
import_react_native41.Pressable,
|
|
3289
3290
|
{
|
|
3290
3291
|
accessibilityRole: "button",
|
|
3291
3292
|
onPress: () => onPress("103"),
|
|
3292
3293
|
onPressIn: handlePressIn,
|
|
3293
3294
|
onPressOut: handlePressOut,
|
|
3294
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3295
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native41.Text, { numberOfLines: 1, style: [styles.brandName, { color: colors.brandName }], children: brandName })
|
|
3295
3296
|
}
|
|
3296
3297
|
),
|
|
3297
|
-
isAdBadgeEnabled ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3298
|
+
isAdBadgeEnabled ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native41.Text, { numberOfLines: 1, style: [styles.adBadge, { color: colors.adBadge }], children: "\uAD11\uACE0" }) : null
|
|
3298
3299
|
] })
|
|
3299
3300
|
] }),
|
|
3300
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
3301
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native41.View, { style: styles.textArea, children: [
|
|
3301
3302
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3302
|
-
|
|
3303
|
+
import_react_native41.Pressable,
|
|
3303
3304
|
{
|
|
3304
3305
|
accessibilityRole: "button",
|
|
3305
3306
|
onPress: () => onPress("101"),
|
|
3306
3307
|
onPressIn: handlePressIn,
|
|
3307
3308
|
onPressOut: handlePressOut,
|
|
3308
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3309
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native41.Text, { style: [styles.title, { color: colors.title }], children: title })
|
|
3309
3310
|
}
|
|
3310
3311
|
),
|
|
3311
3312
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3312
|
-
|
|
3313
|
+
import_react_native41.Pressable,
|
|
3313
3314
|
{
|
|
3314
3315
|
accessibilityRole: "button",
|
|
3315
3316
|
onPress: () => onPress("102"),
|
|
3316
3317
|
onPressIn: handlePressIn,
|
|
3317
3318
|
onPressOut: handlePressOut,
|
|
3318
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3319
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native41.Text, { style: [styles.subtitle, { color: colors.subtitle }], children: subtitle })
|
|
3319
3320
|
}
|
|
3320
3321
|
)
|
|
3321
3322
|
] })
|
|
3322
3323
|
] }),
|
|
3323
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
3324
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native41.View, { style: styles.card, children: [
|
|
3324
3325
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3325
|
-
|
|
3326
|
+
import_react_native41.Pressable,
|
|
3326
3327
|
{
|
|
3327
3328
|
accessibilityRole: "button",
|
|
3328
3329
|
onPress: () => onPress("201"),
|
|
3329
3330
|
onPressIn: handlePressIn,
|
|
3330
3331
|
onPressOut: handlePressOut,
|
|
3331
3332
|
style: styles.imageButton,
|
|
3332
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3333
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native41.View, { style: styles.imageContainer, children: mainImageUri ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native41.Image, { source: { uri: mainImageUri }, style: styles.mainImage, resizeMode: "cover" }) : null })
|
|
3333
3334
|
}
|
|
3334
3335
|
),
|
|
3335
3336
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
3336
|
-
|
|
3337
|
+
import_react_native41.Pressable,
|
|
3337
3338
|
{
|
|
3338
3339
|
accessibilityRole: "button",
|
|
3339
3340
|
onPress: () => onPress("0"),
|
|
@@ -3341,19 +3342,19 @@ function FeedBannerAdView({
|
|
|
3341
3342
|
onPressOut: handlePressOut,
|
|
3342
3343
|
style: [styles.cta, { backgroundColor: resolvedCtaBackground }],
|
|
3343
3344
|
children: [
|
|
3344
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3345
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native41.Text, { style: [styles.ctaText, { color: resolvedCtaTextColor }], children: ctaText }),
|
|
3345
3346
|
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native_svg.Svg, { width: 20, height: 20, viewBox: "0 0 24 24", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native_svg.Path, { d: ARROW_PATH, fill: resolvedCtaTextColor }) })
|
|
3346
3347
|
]
|
|
3347
3348
|
}
|
|
3348
3349
|
),
|
|
3349
|
-
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3350
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native41.View, { style: [styles.cardOverlay, { borderColor: colors.imageOverlayBorder }] })
|
|
3350
3351
|
] }),
|
|
3351
|
-
adClearanceText ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
3352
|
+
adClearanceText ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native41.Text, { style: [styles.adClearance, { color: colors.adClearance }], children: adClearanceText }) : null
|
|
3352
3353
|
] })
|
|
3353
3354
|
}
|
|
3354
3355
|
);
|
|
3355
3356
|
}
|
|
3356
|
-
var styles =
|
|
3357
|
+
var styles = import_react_native41.StyleSheet.create({
|
|
3357
3358
|
pressable: {
|
|
3358
3359
|
width: "100%"
|
|
3359
3360
|
},
|
|
@@ -3392,7 +3393,7 @@ var styles = import_react_native42.StyleSheet.create({
|
|
|
3392
3393
|
borderRadius: 18
|
|
3393
3394
|
},
|
|
3394
3395
|
logoOverlay: {
|
|
3395
|
-
...
|
|
3396
|
+
...import_react_native41.StyleSheet.absoluteFillObject,
|
|
3396
3397
|
borderWidth: 1,
|
|
3397
3398
|
borderRadius: 18
|
|
3398
3399
|
},
|
|
@@ -3455,7 +3456,7 @@ var styles = import_react_native42.StyleSheet.create({
|
|
|
3455
3456
|
lineHeight: 22.5
|
|
3456
3457
|
},
|
|
3457
3458
|
cardOverlay: {
|
|
3458
|
-
...
|
|
3459
|
+
...import_react_native41.StyleSheet.absoluteFillObject,
|
|
3459
3460
|
borderWidth: 2,
|
|
3460
3461
|
borderRadius: 12,
|
|
3461
3462
|
pointerEvents: "none"
|
|
@@ -3470,7 +3471,7 @@ var styles = import_react_native42.StyleSheet.create({
|
|
|
3470
3471
|
// src/ads/inlineAd/ui/ListBannerAdView.tsx
|
|
3471
3472
|
var import_react_native_svg2 = require("@granite-js/native/react-native-svg");
|
|
3472
3473
|
var import_react30 = require("react");
|
|
3473
|
-
var
|
|
3474
|
+
var import_react_native42 = require("react-native");
|
|
3474
3475
|
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
3475
3476
|
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";
|
|
3476
3477
|
function ListBannerAdView({
|
|
@@ -3483,13 +3484,13 @@ function ListBannerAdView({
|
|
|
3483
3484
|
colors,
|
|
3484
3485
|
onPress
|
|
3485
3486
|
}) {
|
|
3486
|
-
const scale = (0, import_react30.useRef)(new
|
|
3487
|
+
const scale = (0, import_react30.useRef)(new import_react_native42.Animated.Value(1)).current;
|
|
3487
3488
|
const clipIdRef = (0, import_react30.useRef)(`clip-${Math.random().toString(36).slice(2)}`);
|
|
3488
3489
|
const animateScale = (toValue) => {
|
|
3489
|
-
|
|
3490
|
+
import_react_native42.Animated.timing(scale, {
|
|
3490
3491
|
toValue,
|
|
3491
3492
|
duration: 100,
|
|
3492
|
-
easing:
|
|
3493
|
+
easing: import_react_native42.Easing.inOut(import_react_native42.Easing.ease),
|
|
3493
3494
|
useNativeDriver: true
|
|
3494
3495
|
}).start();
|
|
3495
3496
|
};
|
|
@@ -3500,17 +3501,17 @@ function ListBannerAdView({
|
|
|
3500
3501
|
animateScale(1);
|
|
3501
3502
|
};
|
|
3502
3503
|
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3503
|
-
|
|
3504
|
+
import_react_native42.Pressable,
|
|
3504
3505
|
{
|
|
3505
3506
|
accessibilityRole: "button",
|
|
3506
3507
|
onPress: () => onPress(null),
|
|
3507
3508
|
onPressIn: handlePressIn,
|
|
3508
3509
|
onPressOut: handlePressOut,
|
|
3509
3510
|
style: styles2.pressable,
|
|
3510
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
3511
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
3511
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react_native42.Animated.View, { style: [styles2.container, paddingStyle, { transform: [{ scale }] }], children: [
|
|
3512
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react_native42.View, { style: styles2.titleRow, children: [
|
|
3512
3513
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3513
|
-
|
|
3514
|
+
import_react_native42.Pressable,
|
|
3514
3515
|
{
|
|
3515
3516
|
accessibilityRole: "button",
|
|
3516
3517
|
onPress: () => onPress("202"),
|
|
@@ -3543,31 +3544,31 @@ function ListBannerAdView({
|
|
|
3543
3544
|
] })
|
|
3544
3545
|
}
|
|
3545
3546
|
),
|
|
3546
|
-
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
3547
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react_native42.View, { style: styles2.textWrapper, children: [
|
|
3547
3548
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3548
|
-
|
|
3549
|
+
import_react_native42.Pressable,
|
|
3549
3550
|
{
|
|
3550
3551
|
accessibilityRole: "button",
|
|
3551
3552
|
onPress: () => onPress("101"),
|
|
3552
3553
|
onPressIn: handlePressIn,
|
|
3553
3554
|
onPressOut: handlePressOut,
|
|
3554
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3555
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native42.Text, { style: [styles2.title, { color: colors.title }], children: title })
|
|
3555
3556
|
}
|
|
3556
3557
|
),
|
|
3557
3558
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3558
|
-
|
|
3559
|
+
import_react_native42.Pressable,
|
|
3559
3560
|
{
|
|
3560
3561
|
accessibilityRole: "button",
|
|
3561
3562
|
onPress: () => onPress("102"),
|
|
3562
3563
|
onPressIn: handlePressIn,
|
|
3563
3564
|
onPressOut: handlePressOut,
|
|
3564
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3565
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native42.Text, { style: [styles2.subtitle, { color: colors.subtitle }], children: subtitle })
|
|
3565
3566
|
}
|
|
3566
3567
|
)
|
|
3567
3568
|
] })
|
|
3568
3569
|
] }),
|
|
3569
3570
|
adClearanceText ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
3570
|
-
|
|
3571
|
+
import_react_native42.Text,
|
|
3571
3572
|
{
|
|
3572
3573
|
style: [
|
|
3573
3574
|
styles2.adClearance,
|
|
@@ -3584,7 +3585,7 @@ function ListBannerAdView({
|
|
|
3584
3585
|
}
|
|
3585
3586
|
);
|
|
3586
3587
|
}
|
|
3587
|
-
var styles2 =
|
|
3588
|
+
var styles2 = import_react_native42.StyleSheet.create({
|
|
3588
3589
|
pressable: {
|
|
3589
3590
|
width: "100%"
|
|
3590
3591
|
},
|
|
@@ -3814,7 +3815,7 @@ function InlineAd(props) {
|
|
|
3814
3815
|
onNoFill
|
|
3815
3816
|
});
|
|
3816
3817
|
const isMountedRef = (0, import_react31.useRef)(false);
|
|
3817
|
-
const colorScheme = (0,
|
|
3818
|
+
const colorScheme = (0, import_react_native44.useColorScheme)();
|
|
3818
3819
|
const selectedTheme = theme ?? DEFAULT_INLINE_AD_THEME;
|
|
3819
3820
|
const resolvedTheme = selectedTheme === "auto" ? colorScheme === "dark" ? "dark" : "light" : selectedTheme;
|
|
3820
3821
|
const resolvedTone = tone ?? DEFAULT_INLINE_AD_TONE;
|
|
@@ -3910,7 +3911,7 @@ function InlineAd(props) {
|
|
|
3910
3911
|
loadRef.current = null;
|
|
3911
3912
|
};
|
|
3912
3913
|
}, [adGroupId]);
|
|
3913
|
-
(0,
|
|
3914
|
+
(0, import_react_native43.useVisibilityChange)((documentVisibility) => {
|
|
3914
3915
|
if (documentVisibility !== "visible") {
|
|
3915
3916
|
return;
|
|
3916
3917
|
}
|
|
@@ -4009,26 +4010,26 @@ function InlineAd(props) {
|
|
|
4009
4010
|
}
|
|
4010
4011
|
};
|
|
4011
4012
|
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
4012
|
-
|
|
4013
|
+
import_react_native43.ImpressionArea,
|
|
4013
4014
|
{
|
|
4014
4015
|
style: styles3.impressionArea,
|
|
4015
4016
|
onImpressionStart: handleImpression1px,
|
|
4016
4017
|
areaThreshold: 0,
|
|
4017
4018
|
UNSAFE__impressFallbackOnMount: Boolean(impressFallbackOnMount),
|
|
4018
4019
|
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
4019
|
-
|
|
4020
|
+
import_react_native43.ImpressionArea,
|
|
4020
4021
|
{
|
|
4021
4022
|
onImpressionStart: handleImpression100p,
|
|
4022
4023
|
areaThreshold: 1,
|
|
4023
4024
|
UNSAFE__impressFallbackOnMount: Boolean(impressFallbackOnMount),
|
|
4024
4025
|
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
4025
|
-
|
|
4026
|
+
import_react_native43.ImpressionArea,
|
|
4026
4027
|
{
|
|
4027
4028
|
onImpressionStart: handleViewableStart,
|
|
4028
4029
|
onImpressionEnd: handleViewableEnd,
|
|
4029
4030
|
areaThreshold: 0.5,
|
|
4030
4031
|
UNSAFE__impressFallbackOnMount: Boolean(impressFallbackOnMount),
|
|
4031
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
4032
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_react_native44.View, { style: [styles3.wrapper, resolvedVariant === "card" && styles3.cardWrapper], children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_react_native44.View, { style: [styles3.surface, { backgroundColor }, resolvedVariant === "card" && styles3.cardSurface], children: [
|
|
4032
4033
|
isListBanner && listCreative ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
4033
4034
|
ListBannerAdView,
|
|
4034
4035
|
{
|
|
@@ -4069,7 +4070,7 @@ function InlineAd(props) {
|
|
|
4069
4070
|
impressionKey
|
|
4070
4071
|
);
|
|
4071
4072
|
}
|
|
4072
|
-
var styles3 =
|
|
4073
|
+
var styles3 = import_react_native44.StyleSheet.create({
|
|
4073
4074
|
impressionArea: {
|
|
4074
4075
|
width: "100%"
|
|
4075
4076
|
},
|
|
@@ -4102,6 +4103,7 @@ var Analytics2 = {
|
|
|
4102
4103
|
INTERNAL__onVisibilityChangedByTransparentServiceWeb,
|
|
4103
4104
|
InlineAd,
|
|
4104
4105
|
OverlayProvider,
|
|
4106
|
+
StartUpdateLocationPermissionError,
|
|
4105
4107
|
WebView,
|
|
4106
4108
|
env,
|
|
4107
4109
|
homeEvent,
|
package/dist/index.d.cts
CHANGED
|
@@ -8,7 +8,7 @@ import { WebViewProps as WebViewProps$1 } from '@granite-js/native/react-native-
|
|
|
8
8
|
import { ExternalWebViewScreenProps } from '@toss/tds-react-native';
|
|
9
9
|
import { StartUpdateLocationOptions, Location, LoadFullScreenAdParams, ShowFullScreenAdParams } from '@apps-in-toss/types';
|
|
10
10
|
export * from '@apps-in-toss/types';
|
|
11
|
-
export { FetchTossAdOptions, LoadFullScreenAdEvent, LoadFullScreenAdOptions, LoadFullScreenAdParams, ShowFullScreenAdEvent, ShowFullScreenAdOptions, ShowFullScreenAdParams, TossAdEventLogParams } from '@apps-in-toss/types';
|
|
11
|
+
export { FetchTossAdOptions, LoadFullScreenAdEvent, LoadFullScreenAdOptions, LoadFullScreenAdParams, ShowFullScreenAdEvent, ShowFullScreenAdOptions, ShowFullScreenAdParams, StartUpdateLocationPermissionError, TossAdEventLogParams } from '@apps-in-toss/types';
|
|
12
12
|
import { EdgeInsets } from '@granite-js/native/react-native-safe-area-context';
|
|
13
13
|
import { onVisibilityChangedByTransparentServiceWeb } from '@apps-in-toss/native-modules';
|
|
14
14
|
export * from '@apps-in-toss/native-modules';
|
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { WebViewProps as WebViewProps$1 } from '@granite-js/native/react-native-
|
|
|
8
8
|
import { ExternalWebViewScreenProps } from '@toss/tds-react-native';
|
|
9
9
|
import { StartUpdateLocationOptions, Location, LoadFullScreenAdParams, ShowFullScreenAdParams } from '@apps-in-toss/types';
|
|
10
10
|
export * from '@apps-in-toss/types';
|
|
11
|
-
export { FetchTossAdOptions, LoadFullScreenAdEvent, LoadFullScreenAdOptions, LoadFullScreenAdParams, ShowFullScreenAdEvent, ShowFullScreenAdOptions, ShowFullScreenAdParams, TossAdEventLogParams } from '@apps-in-toss/types';
|
|
11
|
+
export { FetchTossAdOptions, LoadFullScreenAdEvent, LoadFullScreenAdOptions, LoadFullScreenAdParams, ShowFullScreenAdEvent, ShowFullScreenAdOptions, ShowFullScreenAdParams, StartUpdateLocationPermissionError, TossAdEventLogParams } from '@apps-in-toss/types';
|
|
12
12
|
import { EdgeInsets } from '@granite-js/native/react-native-safe-area-context';
|
|
13
13
|
import { onVisibilityChangedByTransparentServiceWeb } from '@apps-in-toss/native-modules';
|
|
14
14
|
export * from '@apps-in-toss/native-modules';
|
package/dist/index.js
CHANGED
|
@@ -17,7 +17,7 @@ import { Analytics as InternalAnalytics } from "@apps-in-toss/analytics";
|
|
|
17
17
|
|
|
18
18
|
// src/core/registerApp.tsx
|
|
19
19
|
import { Analytics } from "@apps-in-toss/analytics";
|
|
20
|
-
import { isMinVersionSupported as isMinVersionSupported3, setIosSwipeGestureEnabled as setIosSwipeGestureEnabled2, eventLog } from "@apps-in-toss/native-modules";
|
|
20
|
+
import { isMinVersionSupported as isMinVersionSupported3, setIosSwipeGestureEnabled as setIosSwipeGestureEnabled2, eventLog, getSchemeUri as getSchemeUri5 } from "@apps-in-toss/native-modules";
|
|
21
21
|
import { Granite as Granite7 } from "@granite-js/react-native";
|
|
22
22
|
import { TDSProvider } from "@toss/tds-react-native";
|
|
23
23
|
import { AppRegistry } from "react-native";
|
|
@@ -677,8 +677,8 @@ function useHardwareBackPress(handler) {
|
|
|
677
677
|
handler();
|
|
678
678
|
return true;
|
|
679
679
|
};
|
|
680
|
-
BackHandler.addEventListener("hardwareBackPress", handleBackPress);
|
|
681
|
-
return () =>
|
|
680
|
+
const backHandler = BackHandler.addEventListener("hardwareBackPress", handleBackPress);
|
|
681
|
+
return () => backHandler.remove();
|
|
682
682
|
}, [handler]);
|
|
683
683
|
}
|
|
684
684
|
|
|
@@ -883,10 +883,9 @@ import { useAdaptive as useAdaptive2, useOverlay as useOverlay2 } from "@toss/td
|
|
|
883
883
|
import { useEffect as useEffect6, useState as useState4 } from "react";
|
|
884
884
|
|
|
885
885
|
// src/core/hooks/useMoreButtonBottomSheet/AppShareListMenu.tsx
|
|
886
|
-
import { getOperationalEnvironment } from "@apps-in-toss/native-modules";
|
|
886
|
+
import { getOperationalEnvironment, shareWithScheme } from "@apps-in-toss/native-modules";
|
|
887
887
|
import { getSchemeUri as getSchemeUri4 } from "@granite-js/react-native";
|
|
888
888
|
import { useDialog as useDialog4 } from "@toss/tds-react-native";
|
|
889
|
-
import { NativeModules } from "react-native";
|
|
890
889
|
|
|
891
890
|
// src/core/hooks/useMoreButtonBottomSheet/Menu.tsx
|
|
892
891
|
import { ListRow, Asset as Asset2 } from "@toss/tds-react-native";
|
|
@@ -1056,11 +1055,7 @@ function AppShareListMenu() {
|
|
|
1056
1055
|
});
|
|
1057
1056
|
return;
|
|
1058
1057
|
}
|
|
1059
|
-
|
|
1060
|
-
params: {
|
|
1061
|
-
schemeURL: schemeForShare
|
|
1062
|
-
}
|
|
1063
|
-
});
|
|
1058
|
+
shareWithScheme({ schemeURL: schemeForShare });
|
|
1064
1059
|
}
|
|
1065
1060
|
}
|
|
1066
1061
|
);
|
|
@@ -1068,7 +1063,7 @@ function AppShareListMenu() {
|
|
|
1068
1063
|
|
|
1069
1064
|
// src/core/hooks/useMoreButtonBottomSheet/HomeShortcutMenu.tsx
|
|
1070
1065
|
import { getOperationalEnvironment as getOperationalEnvironment2 } from "@apps-in-toss/native-modules";
|
|
1071
|
-
import { NativeModules
|
|
1066
|
+
import { NativeModules } from "react-native";
|
|
1072
1067
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
1073
1068
|
function HomeShortcutMenu() {
|
|
1074
1069
|
const isSandbox = getOperationalEnvironment2() === "sandbox";
|
|
@@ -1082,7 +1077,7 @@ function HomeShortcutMenu() {
|
|
|
1082
1077
|
title: "\uD648 \uD654\uBA74\uC5D0 \uCD94\uAC00",
|
|
1083
1078
|
iconURL: "https://static.toss.im/icons/png/4x/icon-plus-circle-mono.png",
|
|
1084
1079
|
onPress: () => {
|
|
1085
|
-
|
|
1080
|
+
NativeModules.AppsInTossModule.addMiniAppShortcut({
|
|
1086
1081
|
title: globals.brandDisplayName,
|
|
1087
1082
|
appName: global.__granite.app.name,
|
|
1088
1083
|
iconUrl: globals.brandIcon,
|
|
@@ -1410,6 +1405,7 @@ function registerApp(container, { context, analytics }) {
|
|
|
1410
1405
|
const App = Granite7.registerApp(AppsInTossContainer.bind(null, container), {
|
|
1411
1406
|
appName,
|
|
1412
1407
|
context,
|
|
1408
|
+
initialScheme: getSchemeUri5(),
|
|
1413
1409
|
setIosSwipeGestureEnabled: setIosSwipeGestureEnabled2,
|
|
1414
1410
|
router: {
|
|
1415
1411
|
screenContainer: AppsInTossScreenContainer,
|
|
@@ -1442,7 +1438,6 @@ var AppsInToss = {
|
|
|
1442
1438
|
|
|
1443
1439
|
// src/components/WebView.tsx
|
|
1444
1440
|
import {
|
|
1445
|
-
AppsInTossModule,
|
|
1446
1441
|
GoogleAdMob as GoogleAdMob2,
|
|
1447
1442
|
IAP,
|
|
1448
1443
|
Storage,
|
|
@@ -1450,18 +1445,19 @@ import {
|
|
|
1450
1445
|
getServerTime,
|
|
1451
1446
|
iapCreateOneTimePurchaseOrder,
|
|
1452
1447
|
processProductGrant,
|
|
1453
|
-
requestOneTimePurchase
|
|
1448
|
+
requestOneTimePurchase,
|
|
1449
|
+
safeSyncPostMessage
|
|
1454
1450
|
} from "@apps-in-toss/native-modules";
|
|
1455
1451
|
import * as appsInTossAsyncBridges from "@apps-in-toss/native-modules/async-bridges";
|
|
1456
1452
|
import * as appsInTossConstantBridges from "@apps-in-toss/native-modules/constant-bridges";
|
|
1457
1453
|
import * as appsInTossEventBridges from "@apps-in-toss/native-modules/event-bridges";
|
|
1458
1454
|
import { afterDocumentLoad, beforeDocumentLoad } from "@apps-in-toss/user-scripts";
|
|
1459
1455
|
import { useSafeAreaInsets as useSafeAreaInsets4 } from "@granite-js/native/react-native-safe-area-context";
|
|
1460
|
-
import { getSchemeUri as
|
|
1456
|
+
import { getSchemeUri as getSchemeUri9 } from "@granite-js/react-native";
|
|
1461
1457
|
import { ExternalWebViewScreen, tdsEvent } from "@toss/tds-react-native";
|
|
1462
1458
|
import { useSafeAreaBottom, useSafeAreaTop as useSafeAreaTop3 } from "@toss/tds-react-native/private";
|
|
1463
1459
|
import { useEffect as useEffect13, useMemo as useMemo6, useRef as useRef6, useState as useState6 } from "react";
|
|
1464
|
-
import { BackHandler as BackHandler2, Linking, NativeModules as
|
|
1460
|
+
import { BackHandler as BackHandler2, Linking, NativeModules as NativeModules2, Platform as Platform6 } from "react-native";
|
|
1465
1461
|
|
|
1466
1462
|
// src/components/GameWebView.tsx
|
|
1467
1463
|
import { setIosSwipeGestureEnabled as setIosSwipeGestureEnabled3, getOperationalEnvironment as getOperationalEnvironment5 } from "@apps-in-toss/native-modules";
|
|
@@ -1703,10 +1699,10 @@ function generateRequestId() {
|
|
|
1703
1699
|
}
|
|
1704
1700
|
|
|
1705
1701
|
// src/ads/getReferrer.ts
|
|
1706
|
-
import { getSchemeUri as
|
|
1702
|
+
import { getSchemeUri as getSchemeUri6 } from "@granite-js/react-native";
|
|
1707
1703
|
function getReferrer() {
|
|
1708
1704
|
try {
|
|
1709
|
-
return new URL(
|
|
1705
|
+
return new URL(getSchemeUri6()).searchParams.get("referrer");
|
|
1710
1706
|
} catch {
|
|
1711
1707
|
return null;
|
|
1712
1708
|
}
|
|
@@ -1716,10 +1712,10 @@ function getReferrer() {
|
|
|
1716
1712
|
import { getOperationalEnvironment as getOperationalEnvironment7, getPlatformOS, getTossAppVersion } from "@apps-in-toss/native-modules";
|
|
1717
1713
|
|
|
1718
1714
|
// src/ads/getIsDev.ts
|
|
1719
|
-
import { getSchemeUri as
|
|
1715
|
+
import { getSchemeUri as getSchemeUri7 } from "@granite-js/react-native";
|
|
1720
1716
|
function getIsDev() {
|
|
1721
1717
|
try {
|
|
1722
|
-
return new URL(
|
|
1718
|
+
return new URL(getSchemeUri7()).searchParams.get("isDev") === "true";
|
|
1723
1719
|
} catch {
|
|
1724
1720
|
return false;
|
|
1725
1721
|
}
|
|
@@ -2538,7 +2534,7 @@ function webViewDebugLog(logName, params) {
|
|
|
2538
2534
|
|
|
2539
2535
|
// src/utils/log.ts
|
|
2540
2536
|
import { eventLog as eventLogNative } from "@apps-in-toss/native-modules";
|
|
2541
|
-
import { getSchemeUri as
|
|
2537
|
+
import { getSchemeUri as getSchemeUri8 } from "@granite-js/react-native";
|
|
2542
2538
|
|
|
2543
2539
|
// src/utils/extractDateFromUUIDv7.ts
|
|
2544
2540
|
var extractDateFromUUIDv7 = (uuid) => {
|
|
@@ -2564,7 +2560,7 @@ var getGroupId = (url) => {
|
|
|
2564
2560
|
};
|
|
2565
2561
|
var getReferrer2 = () => {
|
|
2566
2562
|
try {
|
|
2567
|
-
const referrer = new URL(
|
|
2563
|
+
const referrer = new URL(getSchemeUri8());
|
|
2568
2564
|
return referrer.searchParams.get("referrer");
|
|
2569
2565
|
} catch {
|
|
2570
2566
|
return "";
|
|
@@ -2596,19 +2592,22 @@ var WEBVIEW_TYPES = {
|
|
|
2596
2592
|
};
|
|
2597
2593
|
function mergeSchemeQueryParamsInto(url) {
|
|
2598
2594
|
const baseUrl = new URL(url);
|
|
2599
|
-
const schemeUrl = new URL(
|
|
2600
|
-
|
|
2595
|
+
const schemeUrl = new URL(getSchemeUri9());
|
|
2596
|
+
const resultUrl = new URL(schemeUrl.pathname, baseUrl.origin);
|
|
2597
|
+
for (const [key, value] of baseUrl.searchParams.entries()) {
|
|
2598
|
+
resultUrl.searchParams.set(key, value);
|
|
2599
|
+
}
|
|
2601
2600
|
for (const [key, value] of schemeUrl.searchParams.entries()) {
|
|
2602
|
-
|
|
2601
|
+
resultUrl.searchParams.set(key, value);
|
|
2603
2602
|
}
|
|
2604
|
-
return
|
|
2603
|
+
return resultUrl;
|
|
2605
2604
|
}
|
|
2606
2605
|
function getWebViewURL(local) {
|
|
2607
2606
|
if (__DEV__) {
|
|
2608
2607
|
const devUrl = `http://${local.host}:${local.port}`;
|
|
2609
2608
|
return mergeSchemeQueryParamsInto(devUrl);
|
|
2610
2609
|
}
|
|
2611
|
-
const { url: rawUrl } =
|
|
2610
|
+
const { url: rawUrl } = safeSyncPostMessage("getWebBundleURL", {});
|
|
2612
2611
|
const url = mergeSchemeQueryParamsInto(rawUrl);
|
|
2613
2612
|
const deploymentId = env.getDeploymentId();
|
|
2614
2613
|
if (deploymentId) {
|
|
@@ -2723,8 +2722,8 @@ function WebView({ type, local, onMessage, ...props }) {
|
|
|
2723
2722
|
/** Private */
|
|
2724
2723
|
memoryDebugLog: webViewMemoryDebugLog,
|
|
2725
2724
|
debugLog: async (event) => {
|
|
2726
|
-
|
|
2727
|
-
|
|
2725
|
+
NativeModules2.AppsInTossModule?.eventLog(event);
|
|
2726
|
+
NativeModules2.TossCoreModule?.eventLog({ params: event });
|
|
2728
2727
|
}
|
|
2729
2728
|
}
|
|
2730
2729
|
});
|
|
@@ -2754,8 +2753,8 @@ function WebView({ type, local, onMessage, ...props }) {
|
|
|
2754
2753
|
webBackHandler.handleWebBack();
|
|
2755
2754
|
return true;
|
|
2756
2755
|
};
|
|
2757
|
-
BackHandler2.addEventListener("hardwareBackPress", callback);
|
|
2758
|
-
return () =>
|
|
2756
|
+
const subscription = BackHandler2.addEventListener("hardwareBackPress", callback);
|
|
2757
|
+
return () => subscription.remove();
|
|
2759
2758
|
}, [webBackHandler]);
|
|
2760
2759
|
const handleWebViewProcessDidTerminate = useHandleWebViewProcessDidTerminate(webViewRef);
|
|
2761
2760
|
return /* @__PURE__ */ jsx19(
|
|
@@ -2823,6 +2822,7 @@ export * from "@apps-in-toss/analytics";
|
|
|
2823
2822
|
import { useOverlay as useOverlay3, OverlayProvider } from "@toss/tds-react-native/private";
|
|
2824
2823
|
export * from "@apps-in-toss/native-modules";
|
|
2825
2824
|
export * from "@apps-in-toss/types";
|
|
2825
|
+
import { StartUpdateLocationPermissionError } from "@apps-in-toss/types";
|
|
2826
2826
|
|
|
2827
2827
|
// src/ads/inlineAd/InlineAd.tsx
|
|
2828
2828
|
import { ImpressionArea, useVisibilityChange as useVisibilityChange2 } from "@granite-js/react-native";
|
|
@@ -4094,6 +4094,7 @@ export {
|
|
|
4094
4094
|
INTERNAL__onVisibilityChangedByTransparentServiceWeb,
|
|
4095
4095
|
InlineAd,
|
|
4096
4096
|
OverlayProvider,
|
|
4097
|
+
StartUpdateLocationPermissionError,
|
|
4097
4098
|
WebView,
|
|
4098
4099
|
env,
|
|
4099
4100
|
homeEvent,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apps-in-toss/framework",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "2.0.0",
|
|
5
5
|
"description": "The framework for Apps In Toss",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"typecheck": "tsc --noEmit",
|
|
@@ -55,32 +55,33 @@
|
|
|
55
55
|
"ait": "./bin/ait.js"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@apps-in-toss/analytics": "
|
|
59
|
-
"@apps-in-toss/cli": "
|
|
60
|
-
"@apps-in-toss/native-modules": "
|
|
61
|
-
"@apps-in-toss/plugins": "
|
|
62
|
-
"@apps-in-toss/types": "
|
|
63
|
-
"@apps-in-toss/user-scripts": "^
|
|
58
|
+
"@apps-in-toss/analytics": "2.0.0",
|
|
59
|
+
"@apps-in-toss/cli": "2.0.0",
|
|
60
|
+
"@apps-in-toss/native-modules": "2.0.0",
|
|
61
|
+
"@apps-in-toss/plugins": "2.0.0",
|
|
62
|
+
"@apps-in-toss/types": "2.0.0",
|
|
63
|
+
"@apps-in-toss/user-scripts": "^2.0.0",
|
|
64
64
|
"es-hangul": "^2.3.2"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@apps-in-toss/ait-format": "
|
|
67
|
+
"@apps-in-toss/ait-format": "1.0.0",
|
|
68
68
|
"@babel/runtime": "^7",
|
|
69
|
-
"@granite-js/mpack": "0.
|
|
70
|
-
"@granite-js/native": "0.
|
|
71
|
-
"@granite-js/plugin-core": "0.
|
|
72
|
-
"@granite-js/react-native": "0.
|
|
73
|
-
"@granite-js/utils": "0.
|
|
74
|
-
"@toss/tds-react-native": "
|
|
69
|
+
"@granite-js/mpack": "1.0.4",
|
|
70
|
+
"@granite-js/native": "1.0.4",
|
|
71
|
+
"@granite-js/plugin-core": "1.0.4",
|
|
72
|
+
"@granite-js/react-native": "1.0.4",
|
|
73
|
+
"@granite-js/utils": "1.0.4",
|
|
74
|
+
"@toss/tds-react-native": "2.0.1",
|
|
75
75
|
"@types/kill-port": "2.0.1",
|
|
76
|
-
"@types/react": "
|
|
76
|
+
"@types/react": "19.2.3",
|
|
77
|
+
"brick-module": "0.5.0",
|
|
77
78
|
"es-toolkit": "^1.34.1",
|
|
78
79
|
"eslint": "^9.7.0",
|
|
79
80
|
"execa": "9.3.0",
|
|
80
81
|
"jsdom": "^25.0.1",
|
|
81
82
|
"kill-port": "2.0.1",
|
|
82
|
-
"react": "
|
|
83
|
-
"react-native": "0.
|
|
83
|
+
"react": "19.2.3",
|
|
84
|
+
"react-native": "0.84.0",
|
|
84
85
|
"tsup": "^8.3.5",
|
|
85
86
|
"typescript": "5.8.3",
|
|
86
87
|
"vitest": "^3.0.3",
|
|
@@ -91,6 +92,7 @@
|
|
|
91
92
|
"@granite-js/react-native": "*",
|
|
92
93
|
"@toss/tds-react-native": ">=1.3.6",
|
|
93
94
|
"@types/react": "*",
|
|
95
|
+
"brick-module": "*",
|
|
94
96
|
"react": "*",
|
|
95
97
|
"react-native": "*"
|
|
96
98
|
}
|