@apps-in-toss/framework 2.4.7 → 2.5.1
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 +76 -40
- package/dist/index.js +52 -15
- package/package.json +13 -13
package/dist/index.cjs
CHANGED
|
@@ -1391,7 +1391,25 @@ function registerApp(container, { context, analytics }) {
|
|
|
1391
1391
|
}
|
|
1392
1392
|
function AppsInTossScreenContainer({ children }) {
|
|
1393
1393
|
const isRNApp = getAppsInTossGlobals().webViewType == null;
|
|
1394
|
-
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(NavigationBarContextProvider, { children: isRNApp ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1394
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(NavigationBarContextProvider, { children: isRNApp ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1395
|
+
import_analytics.Analytics.Screen,
|
|
1396
|
+
{
|
|
1397
|
+
onLog: (params) => sendLog(
|
|
1398
|
+
{
|
|
1399
|
+
log_type: params.log_type,
|
|
1400
|
+
log_name: "appsintoss_app_visit__appssintoss_systemlog",
|
|
1401
|
+
params: {
|
|
1402
|
+
...params.params,
|
|
1403
|
+
schema_id: 5175906,
|
|
1404
|
+
app_name: import_react_native21.Granite.appName,
|
|
1405
|
+
log_name: params.log_name
|
|
1406
|
+
}
|
|
1407
|
+
},
|
|
1408
|
+
{ pipelines: ["core"] }
|
|
1409
|
+
),
|
|
1410
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(RNAppContainer, { children })
|
|
1411
|
+
}
|
|
1412
|
+
) : children });
|
|
1395
1413
|
}
|
|
1396
1414
|
function getAppName() {
|
|
1397
1415
|
try {
|
|
@@ -1408,7 +1426,7 @@ var AppsInToss = {
|
|
|
1408
1426
|
};
|
|
1409
1427
|
|
|
1410
1428
|
// src/components/WebView.tsx
|
|
1411
|
-
var
|
|
1429
|
+
var import_native_modules18 = require("@apps-in-toss/native-modules");
|
|
1412
1430
|
var appsInTossAsyncBridges = __toESM(require("@apps-in-toss/native-modules/async-bridges"), 1);
|
|
1413
1431
|
var appsInTossConstantBridges = __toESM(require("@apps-in-toss/native-modules/constant-bridges"), 1);
|
|
1414
1432
|
var appsInTossEventBridges = __toESM(require("@apps-in-toss/native-modules/event-bridges"), 1);
|
|
@@ -2507,7 +2525,6 @@ function webViewDebugLog(logName, params) {
|
|
|
2507
2525
|
}
|
|
2508
2526
|
|
|
2509
2527
|
// src/utils/log.ts
|
|
2510
|
-
var import_native_modules18 = require("@apps-in-toss/native-modules");
|
|
2511
2528
|
var import_react_native35 = require("@granite-js/react-native");
|
|
2512
2529
|
|
|
2513
2530
|
// src/utils/extractDateFromUUIDv7.ts
|
|
@@ -2542,18 +2559,36 @@ var getReferrer2 = () => {
|
|
|
2542
2559
|
};
|
|
2543
2560
|
var trackScreen = (url, title) => {
|
|
2544
2561
|
const { groupId, search } = getGroupId(url);
|
|
2545
|
-
const
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
}
|
|
2562
|
+
const logType = "screen";
|
|
2563
|
+
const logName = `${groupId}::screen`;
|
|
2564
|
+
const params = {
|
|
2565
|
+
search,
|
|
2566
|
+
referrer: getReferrer2(),
|
|
2567
|
+
document_title: title,
|
|
2568
|
+
app_name: import_react_native35.Granite.appName,
|
|
2569
|
+
deployment_id: env.getDeploymentId(),
|
|
2570
|
+
deployment_timestamp: extractDateFromUUIDv7(env.getDeploymentId()).getTime()
|
|
2555
2571
|
};
|
|
2556
|
-
|
|
2572
|
+
sendLog(
|
|
2573
|
+
{
|
|
2574
|
+
log_type: logType,
|
|
2575
|
+
log_name: logName,
|
|
2576
|
+
params
|
|
2577
|
+
},
|
|
2578
|
+
{ pipelines: ["partner"] }
|
|
2579
|
+
);
|
|
2580
|
+
sendLog(
|
|
2581
|
+
{
|
|
2582
|
+
log_type: logType,
|
|
2583
|
+
log_name: "appsintoss_app_visit__appssintoss_systemlog",
|
|
2584
|
+
params: {
|
|
2585
|
+
...params,
|
|
2586
|
+
schema_id: 5175906,
|
|
2587
|
+
log_name: logName
|
|
2588
|
+
}
|
|
2589
|
+
},
|
|
2590
|
+
{ pipelines: ["core"] }
|
|
2591
|
+
);
|
|
2557
2592
|
};
|
|
2558
2593
|
|
|
2559
2594
|
// src/components/WebView.tsx
|
|
@@ -2582,7 +2617,7 @@ function getWebViewURL(local) {
|
|
|
2582
2617
|
const devUrl = `http://${local.host}:${local.port}`;
|
|
2583
2618
|
return mergeSchemeQueryParamsInto(devUrl);
|
|
2584
2619
|
}
|
|
2585
|
-
const { url: rawUrl } = (0,
|
|
2620
|
+
const { url: rawUrl } = (0, import_native_modules18.safeSyncPostMessage)("getWebBundleURL", {});
|
|
2586
2621
|
const url = mergeSchemeQueryParamsInto(rawUrl);
|
|
2587
2622
|
const deploymentId = env.getDeploymentId();
|
|
2588
2623
|
if (deploymentId) {
|
|
@@ -2618,22 +2653,23 @@ function WebView({ type, local, onMessage, ...props }) {
|
|
|
2618
2653
|
};
|
|
2619
2654
|
},
|
|
2620
2655
|
homeEvent: ({ onEvent }) => homeEvent.subscribe(onEvent),
|
|
2621
|
-
updateLocationEvent: ({ onEvent, onError, options }) =>
|
|
2656
|
+
updateLocationEvent: ({ onEvent, onError, options }) => import_native_modules18.appsInTossEvent.addEventListener("updateLocationEvent", { onEvent, onError, options }),
|
|
2622
2657
|
safeAreaInsetsChange: ({ onEvent }) => safeAreaInsetsEvent.subscribe(onEvent),
|
|
2623
2658
|
/** @internal */
|
|
2624
|
-
appBridgeCallbackEvent: ({ onEvent, onError, options }) =>
|
|
2659
|
+
appBridgeCallbackEvent: ({ onEvent, onError, options }) => import_native_modules18.appsInTossEvent.addEventListener("appBridgeCallbackEvent", { onEvent, onError, options }),
|
|
2625
2660
|
/** AdMobV2 */
|
|
2626
|
-
loadAppsInTossAdMob:
|
|
2627
|
-
showAppsInTossAdMob:
|
|
2661
|
+
loadAppsInTossAdMob: import_native_modules18.GoogleAdMob.loadAppsInTossAdMob,
|
|
2662
|
+
showAppsInTossAdMob: import_native_modules18.GoogleAdMob.showAppsInTossAdMob,
|
|
2628
2663
|
/** IntegratedAd */
|
|
2629
2664
|
loadFullScreenAd: loadFullScreenAdForWeb,
|
|
2630
2665
|
showFullScreenAd,
|
|
2631
2666
|
/** TossAd */
|
|
2632
2667
|
fetchTossAd,
|
|
2633
2668
|
/** IAP */
|
|
2634
|
-
iapCreateOneTimePurchaseOrder:
|
|
2635
|
-
requestSubscriptionPurchase:
|
|
2636
|
-
requestOneTimePurchase:
|
|
2669
|
+
iapCreateOneTimePurchaseOrder: import_native_modules18.IAP.createOneTimePurchaseOrder,
|
|
2670
|
+
requestSubscriptionPurchase: import_native_modules18.IAP.createSubscriptionPurchaseOrder,
|
|
2671
|
+
requestOneTimePurchase: import_native_modules18.requestOneTimePurchase,
|
|
2672
|
+
requestNotificationAgreement: import_native_modules18.requestNotificationAgreement
|
|
2637
2673
|
},
|
|
2638
2674
|
constantHandlerMap: {
|
|
2639
2675
|
...appsInTossConstantBridges,
|
|
@@ -2644,12 +2680,12 @@ function WebView({ type, local, onMessage, ...props }) {
|
|
|
2644
2680
|
right: insets.right
|
|
2645
2681
|
}),
|
|
2646
2682
|
...Object.fromEntries(Object.entries(global2).map(([key, value]) => [key, () => value])),
|
|
2647
|
-
getServerTime_isSupported:
|
|
2648
|
-
requestReview_isSupported:
|
|
2683
|
+
getServerTime_isSupported: import_native_modules18.getServerTime.isSupported,
|
|
2684
|
+
requestReview_isSupported: import_native_modules18.requestReview.isSupported,
|
|
2649
2685
|
/** AdMobV2 */
|
|
2650
|
-
loadAppsInTossAdMob_isSupported:
|
|
2651
|
-
showAppsInTossAdMob_isSupported:
|
|
2652
|
-
isAppsInTossAdMobLoaded_isSupported:
|
|
2686
|
+
loadAppsInTossAdMob_isSupported: import_native_modules18.GoogleAdMob.loadAppsInTossAdMob.isSupported,
|
|
2687
|
+
showAppsInTossAdMob_isSupported: import_native_modules18.GoogleAdMob.showAppsInTossAdMob.isSupported,
|
|
2688
|
+
isAppsInTossAdMobLoaded_isSupported: import_native_modules18.GoogleAdMob.isAppsInTossAdMobLoaded.isSupported,
|
|
2653
2689
|
/** IntegratedAd */
|
|
2654
2690
|
loadFullScreenAd_isSupported: loadFullScreenAdForWeb.isSupported,
|
|
2655
2691
|
showFullScreenAd_isSupported: showFullScreenAd.isSupported,
|
|
@@ -2662,7 +2698,7 @@ function WebView({ type, local, onMessage, ...props }) {
|
|
|
2662
2698
|
},
|
|
2663
2699
|
asyncHandlerMap: {
|
|
2664
2700
|
...appsInTossAsyncBridges,
|
|
2665
|
-
getServerTime:
|
|
2701
|
+
getServerTime: import_native_modules18.getServerTime,
|
|
2666
2702
|
setIosSwipeGestureEnabled: (options) => {
|
|
2667
2703
|
setAllowsBackForwardNavigationGestures(options.isEnabled);
|
|
2668
2704
|
return appsInTossAsyncBridges.setIosSwipeGestureEnabled(options);
|
|
@@ -2680,20 +2716,20 @@ function WebView({ type, local, onMessage, ...props }) {
|
|
|
2680
2716
|
getCurrentLocation: appsInTossAsyncBridges.getCurrentLocation,
|
|
2681
2717
|
openCamera: appsInTossAsyncBridges.openCamera,
|
|
2682
2718
|
/** Storage */
|
|
2683
|
-
getStorageItem:
|
|
2684
|
-
setStorageItem:
|
|
2685
|
-
removeStorageItem:
|
|
2686
|
-
clearItems:
|
|
2719
|
+
getStorageItem: import_native_modules18.Storage.getItem,
|
|
2720
|
+
setStorageItem: import_native_modules18.Storage.setItem,
|
|
2721
|
+
removeStorageItem: import_native_modules18.Storage.removeItem,
|
|
2722
|
+
clearItems: import_native_modules18.Storage.clearItems,
|
|
2687
2723
|
/** IAP */
|
|
2688
|
-
iapGetProductItemList:
|
|
2689
|
-
iapCreateOneTimePurchaseOrder:
|
|
2690
|
-
processProductGrant:
|
|
2691
|
-
getPendingOrders:
|
|
2692
|
-
getCompletedOrRefundedOrders:
|
|
2693
|
-
completeProductGrant:
|
|
2694
|
-
getSubscriptionInfo:
|
|
2724
|
+
iapGetProductItemList: import_native_modules18.IAP.getProductItemList,
|
|
2725
|
+
iapCreateOneTimePurchaseOrder: import_native_modules18.iapCreateOneTimePurchaseOrder,
|
|
2726
|
+
processProductGrant: import_native_modules18.processProductGrant,
|
|
2727
|
+
getPendingOrders: import_native_modules18.IAP.getPendingOrders,
|
|
2728
|
+
getCompletedOrRefundedOrders: import_native_modules18.IAP.getCompletedOrRefundedOrders,
|
|
2729
|
+
completeProductGrant: import_native_modules18.IAP.completeProductGrant,
|
|
2730
|
+
getSubscriptionInfo: import_native_modules18.IAP.getSubscriptionInfo,
|
|
2695
2731
|
/** AdMobV2 */
|
|
2696
|
-
isAppsInTossAdMobLoaded:
|
|
2732
|
+
isAppsInTossAdMobLoaded: import_native_modules18.GoogleAdMob.isAppsInTossAdMobLoaded,
|
|
2697
2733
|
/** Toss Ads */
|
|
2698
2734
|
tossAdEventLog,
|
|
2699
2735
|
/** Private */
|
package/dist/index.js
CHANGED
|
@@ -1357,7 +1357,25 @@ function registerApp(container, { context, analytics }) {
|
|
|
1357
1357
|
}
|
|
1358
1358
|
function AppsInTossScreenContainer({ children }) {
|
|
1359
1359
|
const isRNApp = getAppsInTossGlobals().webViewType == null;
|
|
1360
|
-
return /* @__PURE__ */ jsx14(NavigationBarContextProvider, { children: isRNApp ? /* @__PURE__ */ jsx14(
|
|
1360
|
+
return /* @__PURE__ */ jsx14(NavigationBarContextProvider, { children: isRNApp ? /* @__PURE__ */ jsx14(
|
|
1361
|
+
Analytics.Screen,
|
|
1362
|
+
{
|
|
1363
|
+
onLog: (params) => sendLog(
|
|
1364
|
+
{
|
|
1365
|
+
log_type: params.log_type,
|
|
1366
|
+
log_name: "appsintoss_app_visit__appssintoss_systemlog",
|
|
1367
|
+
params: {
|
|
1368
|
+
...params.params,
|
|
1369
|
+
schema_id: 5175906,
|
|
1370
|
+
app_name: Granite6.appName,
|
|
1371
|
+
log_name: params.log_name
|
|
1372
|
+
}
|
|
1373
|
+
},
|
|
1374
|
+
{ pipelines: ["core"] }
|
|
1375
|
+
),
|
|
1376
|
+
children: /* @__PURE__ */ jsx14(RNAppContainer, { children })
|
|
1377
|
+
}
|
|
1378
|
+
) : children });
|
|
1361
1379
|
}
|
|
1362
1380
|
function getAppName() {
|
|
1363
1381
|
try {
|
|
@@ -1381,6 +1399,7 @@ import {
|
|
|
1381
1399
|
appsInTossEvent,
|
|
1382
1400
|
getServerTime,
|
|
1383
1401
|
requestReview,
|
|
1402
|
+
requestNotificationAgreement,
|
|
1384
1403
|
iapCreateOneTimePurchaseOrder,
|
|
1385
1404
|
processProductGrant,
|
|
1386
1405
|
requestOneTimePurchase,
|
|
@@ -2492,8 +2511,7 @@ function webViewDebugLog(logName, params) {
|
|
|
2492
2511
|
}
|
|
2493
2512
|
|
|
2494
2513
|
// src/utils/log.ts
|
|
2495
|
-
import {
|
|
2496
|
-
import { getSchemeUri as getSchemeUri8 } from "@granite-js/react-native";
|
|
2514
|
+
import { getSchemeUri as getSchemeUri8, Granite as Granite9 } from "@granite-js/react-native";
|
|
2497
2515
|
|
|
2498
2516
|
// src/utils/extractDateFromUUIDv7.ts
|
|
2499
2517
|
var extractDateFromUUIDv7 = (uuid) => {
|
|
@@ -2527,18 +2545,36 @@ var getReferrer2 = () => {
|
|
|
2527
2545
|
};
|
|
2528
2546
|
var trackScreen = (url, title) => {
|
|
2529
2547
|
const { groupId, search } = getGroupId(url);
|
|
2530
|
-
const
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
}
|
|
2548
|
+
const logType = "screen";
|
|
2549
|
+
const logName = `${groupId}::screen`;
|
|
2550
|
+
const params = {
|
|
2551
|
+
search,
|
|
2552
|
+
referrer: getReferrer2(),
|
|
2553
|
+
document_title: title,
|
|
2554
|
+
app_name: Granite9.appName,
|
|
2555
|
+
deployment_id: env.getDeploymentId(),
|
|
2556
|
+
deployment_timestamp: extractDateFromUUIDv7(env.getDeploymentId()).getTime()
|
|
2540
2557
|
};
|
|
2541
|
-
|
|
2558
|
+
sendLog(
|
|
2559
|
+
{
|
|
2560
|
+
log_type: logType,
|
|
2561
|
+
log_name: logName,
|
|
2562
|
+
params
|
|
2563
|
+
},
|
|
2564
|
+
{ pipelines: ["partner"] }
|
|
2565
|
+
);
|
|
2566
|
+
sendLog(
|
|
2567
|
+
{
|
|
2568
|
+
log_type: logType,
|
|
2569
|
+
log_name: "appsintoss_app_visit__appssintoss_systemlog",
|
|
2570
|
+
params: {
|
|
2571
|
+
...params,
|
|
2572
|
+
schema_id: 5175906,
|
|
2573
|
+
log_name: logName
|
|
2574
|
+
}
|
|
2575
|
+
},
|
|
2576
|
+
{ pipelines: ["core"] }
|
|
2577
|
+
);
|
|
2542
2578
|
};
|
|
2543
2579
|
|
|
2544
2580
|
// src/components/WebView.tsx
|
|
@@ -2618,7 +2654,8 @@ function WebView({ type, local, onMessage, ...props }) {
|
|
|
2618
2654
|
/** IAP */
|
|
2619
2655
|
iapCreateOneTimePurchaseOrder: IAP.createOneTimePurchaseOrder,
|
|
2620
2656
|
requestSubscriptionPurchase: IAP.createSubscriptionPurchaseOrder,
|
|
2621
|
-
requestOneTimePurchase
|
|
2657
|
+
requestOneTimePurchase,
|
|
2658
|
+
requestNotificationAgreement
|
|
2622
2659
|
},
|
|
2623
2660
|
constantHandlerMap: {
|
|
2624
2661
|
...appsInTossConstantBridges,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apps-in-toss/framework",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.5.1",
|
|
5
5
|
"description": "The framework for Apps In Toss",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"typecheck": "tsc --noEmit",
|
|
@@ -55,26 +55,26 @@
|
|
|
55
55
|
"ait": "./bin/ait.js"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@apps-in-toss/analytics": "2.
|
|
59
|
-
"@apps-in-toss/cli": "2.
|
|
60
|
-
"@apps-in-toss/native-modules": "2.
|
|
61
|
-
"@apps-in-toss/plugins": "2.
|
|
62
|
-
"@apps-in-toss/types": "2.
|
|
63
|
-
"@apps-in-toss/user-scripts": "^2.
|
|
58
|
+
"@apps-in-toss/analytics": "2.5.1",
|
|
59
|
+
"@apps-in-toss/cli": "2.5.1",
|
|
60
|
+
"@apps-in-toss/native-modules": "2.5.1",
|
|
61
|
+
"@apps-in-toss/plugins": "2.5.1",
|
|
62
|
+
"@apps-in-toss/types": "2.5.1",
|
|
63
|
+
"@apps-in-toss/user-scripts": "^2.5.1",
|
|
64
64
|
"es-hangul": "^2.3.2"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"@apps-in-toss/ait-format": "1.0.0",
|
|
68
68
|
"@babel/runtime": "^7",
|
|
69
|
-
"@granite-js/mpack": "1.0.
|
|
70
|
-
"@granite-js/native": "1.0.
|
|
71
|
-
"@granite-js/plugin-core": "1.0.
|
|
72
|
-
"@granite-js/react-native": "1.0.
|
|
73
|
-
"@granite-js/utils": "1.0.
|
|
69
|
+
"@granite-js/mpack": "1.0.20",
|
|
70
|
+
"@granite-js/native": "1.0.20",
|
|
71
|
+
"@granite-js/plugin-core": "1.0.20",
|
|
72
|
+
"@granite-js/react-native": "1.0.20",
|
|
73
|
+
"@granite-js/utils": "1.0.20",
|
|
74
74
|
"@toss/tds-react-native": "2.0.3",
|
|
75
75
|
"@types/kill-port": "2.0.1",
|
|
76
76
|
"@types/react": "19.2.3",
|
|
77
|
-
"brick-module": "0.5.
|
|
77
|
+
"brick-module": "0.5.2",
|
|
78
78
|
"es-toolkit": "^1.34.1",
|
|
79
79
|
"eslint": "^9.7.0",
|
|
80
80
|
"execa": "9.3.0",
|