@apps-in-toss/web-framework 0.0.35 → 0.0.37
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/cli/index.js +369 -27
- package/dist/prebuilt/dev.android.js +174 -98
- package/dist/prebuilt/dev.ios.js +174 -98
- package/dist/prebuilt/prod.android.js +136 -46
- package/dist/prebuilt/prod.ios.js +136 -46
- package/dist/prebuilt/prod.json +4 -4
- package/package.json +10 -8
|
@@ -38418,6 +38418,15 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
|
|
|
38418
38418
|
});
|
|
38419
38419
|
|
|
38420
38420
|
// ../../.yarn/__virtual__/@apps-in-toss-framework-virtual-574b136add/1/apps-in-toss-packages/framework/dist/index.js
|
|
38421
|
+
function useReferrer() {
|
|
38422
|
+
return (0, import_react159.useMemo)(function() {
|
|
38423
|
+
try {
|
|
38424
|
+
return new URL(getSchemeUri()).searchParams.get("referrer");
|
|
38425
|
+
} catch (e4) {
|
|
38426
|
+
return null;
|
|
38427
|
+
}
|
|
38428
|
+
}, []);
|
|
38429
|
+
}
|
|
38421
38430
|
function getOperationalEnvironment() {
|
|
38422
38431
|
return AppsInTossModule.operationalEnvironment;
|
|
38423
38432
|
}
|
|
@@ -38457,15 +38466,6 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
|
|
|
38457
38466
|
}
|
|
38458
38467
|
});
|
|
38459
38468
|
}
|
|
38460
|
-
function useReferrer() {
|
|
38461
|
-
return (0, import_react158.useMemo)(function() {
|
|
38462
|
-
try {
|
|
38463
|
-
return new URL(getSchemeUri()).searchParams.get("referrer");
|
|
38464
|
-
} catch (e4) {
|
|
38465
|
-
return null;
|
|
38466
|
-
}
|
|
38467
|
-
}, []);
|
|
38468
|
-
}
|
|
38469
38469
|
function isPrivateScheme() {
|
|
38470
38470
|
try {
|
|
38471
38471
|
return new URL(getSchemeUri()).protocol === "intoss-private:";
|
|
@@ -38473,6 +38473,44 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
|
|
|
38473
38473
|
return false;
|
|
38474
38474
|
}
|
|
38475
38475
|
}
|
|
38476
|
+
function useCaptureExitLog() {
|
|
38477
|
+
var referrer2 = useReferrer();
|
|
38478
|
+
var visible = useVisibility();
|
|
38479
|
+
var enterTime = (0, import_react158.useRef)(void 0);
|
|
38480
|
+
(0, import_react158.useEffect)(function() {
|
|
38481
|
+
if (visible === true) {
|
|
38482
|
+
enterTime.current = Date.now();
|
|
38483
|
+
}
|
|
38484
|
+
}, [
|
|
38485
|
+
visible
|
|
38486
|
+
]);
|
|
38487
|
+
var captureExitLog = (0, import_react158.useCallback)(function(exitTime) {
|
|
38488
|
+
if (enterTime.current == null) {
|
|
38489
|
+
return;
|
|
38490
|
+
}
|
|
38491
|
+
var stayTime = Math.floor(exitTime - enterTime.current);
|
|
38492
|
+
tossCoreEventLog({
|
|
38493
|
+
log_name: EXIT_IMPRESSION_LOG_NAME,
|
|
38494
|
+
log_type: "event",
|
|
38495
|
+
params: {
|
|
38496
|
+
schema_id: EXIT_IMPRESSION_SCHEMA_ID,
|
|
38497
|
+
event_type: "impression",
|
|
38498
|
+
referrer: referrer2,
|
|
38499
|
+
deployment_id: env.getDeploymentId(),
|
|
38500
|
+
app_name: Bedrock.appName,
|
|
38501
|
+
is_private: isPrivateScheme(),
|
|
38502
|
+
stay_time: stayTime.toString(),
|
|
38503
|
+
exit_time: exitTime.toString()
|
|
38504
|
+
}
|
|
38505
|
+
});
|
|
38506
|
+
enterTime.current = void 0;
|
|
38507
|
+
}, [
|
|
38508
|
+
referrer2
|
|
38509
|
+
]);
|
|
38510
|
+
return {
|
|
38511
|
+
captureExitLog
|
|
38512
|
+
};
|
|
38513
|
+
}
|
|
38476
38514
|
function EntryAppEvent() {
|
|
38477
38515
|
var _useReferrer;
|
|
38478
38516
|
var referrer2 = (_useReferrer = useReferrer()) !== null && _useReferrer !== void 0 ? _useReferrer : "";
|
|
@@ -38512,6 +38550,19 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
|
|
|
38512
38550
|
]);
|
|
38513
38551
|
return null;
|
|
38514
38552
|
}
|
|
38553
|
+
function StayTimeAppEvent() {
|
|
38554
|
+
var visible = useVisibility();
|
|
38555
|
+
var captureExitLog = useCaptureExitLog().captureExitLog;
|
|
38556
|
+
(0, import_react157.useEffect)(function() {
|
|
38557
|
+
if (visible === false) {
|
|
38558
|
+
captureExitLog(Date.now());
|
|
38559
|
+
}
|
|
38560
|
+
}, [
|
|
38561
|
+
visible,
|
|
38562
|
+
captureExitLog
|
|
38563
|
+
]);
|
|
38564
|
+
return null;
|
|
38565
|
+
}
|
|
38515
38566
|
function getPermission(permission) {
|
|
38516
38567
|
return AppsInTossModule.getPermission(permission);
|
|
38517
38568
|
}
|
|
@@ -38644,7 +38695,7 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
|
|
|
38644
38695
|
function useAppsInTossBridge() {
|
|
38645
38696
|
var controller = useBridge();
|
|
38646
38697
|
var appsInTossGlobals2 = getAppsInTossGlobals();
|
|
38647
|
-
(0,
|
|
38698
|
+
(0, import_react160.useEffect)(function() {
|
|
38648
38699
|
var commonProps = {
|
|
38649
38700
|
serviceName: appsInTossGlobals2.brandDisplayName,
|
|
38650
38701
|
icon: toIcon(appsInTossGlobals2.brandIcon),
|
|
@@ -39126,6 +39177,7 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
|
|
|
39126
39177
|
]);
|
|
39127
39178
|
return /* @__PURE__ */ (0, import_jsx_runtime187.jsxs)(import_jsx_runtime187.Fragment, {
|
|
39128
39179
|
children: [
|
|
39180
|
+
/* @__PURE__ */ (0, import_jsx_runtime187.jsx)(AppEvent.StayTime, {}),
|
|
39129
39181
|
/* @__PURE__ */ (0, import_jsx_runtime187.jsx)(AppEvent.Entry, {}),
|
|
39130
39182
|
/* @__PURE__ */ (0, import_jsx_runtime187.jsx)(AppEvent.System, _object_spread({}, initialProps)),
|
|
39131
39183
|
/* @__PURE__ */ (0, import_jsx_runtime187.jsx)(Container, _object_spread_props(_object_spread({}, initialProps), {
|
|
@@ -39557,14 +39609,14 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
|
|
|
39557
39609
|
}
|
|
39558
39610
|
function useBridgeHandler(param) {
|
|
39559
39611
|
var onMessage = param.onMessage, constantHandlerMap = param.constantHandlerMap, asyncHandlerMap = param.asyncHandlerMap, eventListenerMap = param.eventListenerMap, originalInjectedJavaScript = param.injectedJavaScript;
|
|
39560
|
-
var ref = (0,
|
|
39561
|
-
var injectedJavaScript = (0,
|
|
39612
|
+
var ref = (0, import_react165.useRef)(null);
|
|
39613
|
+
var injectedJavaScript = (0, import_react165.useMemo)(function() {
|
|
39562
39614
|
return [
|
|
39563
39615
|
"window.__CONSTANT_HANDLER_MAP = ".concat(JSON.stringify(Object.entries(constantHandlerMap).reduce(function(acc, param2) {
|
|
39564
39616
|
var _param = _sliced_to_array(param2, 2), key = _param[0], value = _param[1];
|
|
39565
39617
|
acc[key] = typeof value === "function" ? value() : value;
|
|
39566
39618
|
return acc;
|
|
39567
|
-
}, {}))),
|
|
39619
|
+
}, {})), ";"),
|
|
39568
39620
|
originalInjectedJavaScript,
|
|
39569
39621
|
"true"
|
|
39570
39622
|
].join("\n");
|
|
@@ -39584,7 +39636,7 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
|
|
|
39584
39636
|
(_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.injectJavaScript("\n window.__BEDROCK_NATIVE_EMITTER.emit('".concat(functionName, "/onError/").concat(eventId, "', ").concat(JSON.stringify(error, null, 0), ");\n "));
|
|
39585
39637
|
};
|
|
39586
39638
|
};
|
|
39587
|
-
var $onMessage = (0,
|
|
39639
|
+
var $onMessage = (0, import_react165.useCallback)(
|
|
39588
39640
|
function() {
|
|
39589
39641
|
var _ref = _async_to_generator(function(e4) {
|
|
39590
39642
|
var data, _eventListenerMap_data_functionName, handleOnEvent, handleOnError, remove, key, remove1, _ref_current;
|
|
@@ -39867,7 +39919,7 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
|
|
|
39867
39919
|
throw new Error("Invalid WebView type: '".concat(type, "'"));
|
|
39868
39920
|
}
|
|
39869
39921
|
var bedrockEvent = useBedrockEvent();
|
|
39870
|
-
var uri = (0,
|
|
39922
|
+
var uri = (0, import_react161.useMemo)(function() {
|
|
39871
39923
|
return getWebViewUri(local);
|
|
39872
39924
|
}, [
|
|
39873
39925
|
local
|
|
@@ -39876,8 +39928,12 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
|
|
|
39876
39928
|
var bottom = useSafeAreaBottom();
|
|
39877
39929
|
var global2 = getAppsInTossGlobals();
|
|
39878
39930
|
var partner = usePartnerNavigation();
|
|
39931
|
+
var disableTextSelectionCSS = "\n (function() {\n const style = document.createElement('style');\n style.textContent = '*:not(input):not(textarea) { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; -webkit-touch-callout: none; }';\n document.head.appendChild(style);\n })();\n ";
|
|
39879
39932
|
var handler = useBridgeHandler({
|
|
39880
39933
|
onMessage,
|
|
39934
|
+
injectedJavaScript: [
|
|
39935
|
+
disableTextSelectionCSS
|
|
39936
|
+
].join("\n"),
|
|
39881
39937
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
39882
39938
|
eventListenerMap: _object_spread_props(_object_spread({}, event_bridges_exports), {
|
|
39883
39939
|
navigationAccessoryEvent: function(param) {
|
|
@@ -39983,7 +40039,7 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
|
|
|
39983
40039
|
iapGetProductItemList: IAP.getProductItemList
|
|
39984
40040
|
})
|
|
39985
40041
|
});
|
|
39986
|
-
var baseProps = (0,
|
|
40042
|
+
var baseProps = (0, import_react161.useMemo)(function() {
|
|
39987
40043
|
switch (type) {
|
|
39988
40044
|
case "partner": {
|
|
39989
40045
|
var headerOnlyProp = {
|
|
@@ -40013,14 +40069,39 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
|
|
|
40013
40069
|
]);
|
|
40014
40070
|
var BaseWebView = WEBVIEW_TYPES[type];
|
|
40015
40071
|
var webViewDebuggingEnabled = operationalEnvironment === "sandbox";
|
|
40016
|
-
var
|
|
40072
|
+
var _useState4 = _sliced_to_array((0, import_react161.useState)(false), 2), canHistoryGoBack = _useState4[0], setCanHistoryGoBack = _useState4[1];
|
|
40073
|
+
var handleNavigationStateChange = (0, import_react161.useCallback)(function(event) {
|
|
40017
40074
|
if (event.url) {
|
|
40018
40075
|
trackScreen(event.url);
|
|
40019
40076
|
}
|
|
40020
|
-
|
|
40077
|
+
setCanHistoryGoBack(event.canGoBack);
|
|
40078
|
+
}, [
|
|
40079
|
+
setCanHistoryGoBack
|
|
40080
|
+
]);
|
|
40021
40081
|
var userAgent = useCreateUserAgent({
|
|
40022
40082
|
colorPreference: "light"
|
|
40023
40083
|
});
|
|
40084
|
+
var backEvent = useBackEvent();
|
|
40085
|
+
var handleBackEvent = (0, import_react161.useCallback)(function() {
|
|
40086
|
+
if (canHistoryGoBack) {
|
|
40087
|
+
var _handler_ref_current;
|
|
40088
|
+
(_handler_ref_current = handler.ref.current) === null || _handler_ref_current === void 0 ? void 0 : _handler_ref_current.goBack();
|
|
40089
|
+
} else {
|
|
40090
|
+
closeView();
|
|
40091
|
+
}
|
|
40092
|
+
}, [
|
|
40093
|
+
canHistoryGoBack,
|
|
40094
|
+
handler
|
|
40095
|
+
]);
|
|
40096
|
+
(0, import_react161.useEffect)(function() {
|
|
40097
|
+
backEvent.addEventListener(handleBackEvent);
|
|
40098
|
+
return function() {
|
|
40099
|
+
return backEvent.removeEventListener(handleBackEvent);
|
|
40100
|
+
};
|
|
40101
|
+
}, [
|
|
40102
|
+
backEvent,
|
|
40103
|
+
handleBackEvent
|
|
40104
|
+
]);
|
|
40024
40105
|
return /* @__PURE__ */ (0, import_jsx_runtime193.jsx)(BaseWebView, _object_spread_props(_object_spread({
|
|
40025
40106
|
ref: handler.ref
|
|
40026
40107
|
}, props, baseProps), {
|
|
@@ -40048,7 +40129,7 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
|
|
|
40048
40129
|
}
|
|
40049
40130
|
return value;
|
|
40050
40131
|
}
|
|
40051
|
-
var import_react157, import_react_native138, import_react_native139, import_react_native140,
|
|
40132
|
+
var import_react157, import_react158, import_react159, import_react_native138, import_react_native139, import_react_native140, import_react160, import_react_native142, import_jsx_runtime187, import_react161, import_react_native144, import_react162, import_react_native146, import_react163, import_react_native148, import_react164, import_jsx_runtime188, import_react_native151, import_jsx_runtime189, import_react_native153, import_react_native154, import_react_native155, import_jsx_runtime190, import_react_native156, import_jsx_runtime191, import_jsx_runtime192, import_react165, import_react_native157, import_react166, import_jsx_runtime193, __defProp2, __export2, env, AppsInTossModuleInstance, AppsInTossModule, SEMVER_REGEX, isWildcard, tryParse, coerceTypes, compareValues, parseVersion, compareSegments, compareVersions, TossCoreModule, EXIT_IMPRESSION_LOG_NAME, EXIT_IMPRESSION_SCHEMA_ID, ENTRY_APP_EVENT_SCHEMA_ID, AppEvent, EntryMessageExitedEvent, nativeEventEmitter2, UpdateLocationEvent, INTERNAL__callbacks, INTERNAL__appBridgeHandler, UNSAFE__nativeEventEmitter, AppBridgeCallbackEvent, VisibilityChangedByTransparentServiceWebEvent, appsInTossEvent, async_bridges_exports2, DEFAULT_MAX_COUNT, DEFAULT_MAX_WIDTH, GAME_PROFILE_WEBVIEW_URL, GAME_CENTER_MIN_VERSION, AppsInToss, ANDROID_GOOGLE_AD_MOB_SUPPORTED_VERSION, IOS_GOOGLE_AD_MOB_SUPPORTED_VERSION, UNSUPPORTED_ERROR_MESSAGE, ENVIRONMENT, IAP, Storage, GoogleAdMob, useGameProfileToast, DEFAULT_ERROR, PLAYSTORE_LINK, APPSTORE_LINK, getMarketLink, INTERNAL__onVisibilityChangedByTransparentServiceWeb, openTransparentWebView, useGameCenterProfile, Z_INDEX, GameProfile, overlayStyle, RIGHT_MARGIN2, IOS_DEFAULT_MARGIN2, styles36, originXML, GameWebView, globalEventListenerMap, constant_bridges_exports2, event_bridges_exports, FontA11yCategory, androidFontScaleMap, iosScaleToAndroidScale, extractDateFromUUIDv7, getGroupId, getReferrer, trackScreen, appsInTossGlobals, operationalEnvironment, TYPES, WEBVIEW_TYPES, Analytics2;
|
|
40052
40133
|
var init_dist4 = __esm({
|
|
40053
40134
|
"../../.yarn/__virtual__/@apps-in-toss-framework-virtual-574b136add/1/apps-in-toss-packages/framework/dist/index.js"() {
|
|
40054
40135
|
"use strict";
|
|
@@ -40073,13 +40154,16 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
|
|
|
40073
40154
|
init_src4();
|
|
40074
40155
|
import_react157 = __toESM(require_react(), 1);
|
|
40075
40156
|
init_src4();
|
|
40157
|
+
import_react158 = __toESM(require_react(), 1);
|
|
40158
|
+
init_src4();
|
|
40159
|
+
import_react159 = __toESM(require_react(), 1);
|
|
40160
|
+
init_src4();
|
|
40076
40161
|
import_react_native138 = __toESM(require_react_native(), 1);
|
|
40077
40162
|
import_react_native139 = __toESM(require_react_native(), 1);
|
|
40078
40163
|
import_react_native140 = __toESM(require_react_native(), 1);
|
|
40079
|
-
import_react158 = __toESM(require_react(), 1);
|
|
40080
40164
|
init_src4();
|
|
40081
40165
|
init_esm8();
|
|
40082
|
-
|
|
40166
|
+
import_react160 = __toESM(require_react(), 1);
|
|
40083
40167
|
init_src4();
|
|
40084
40168
|
init_src4();
|
|
40085
40169
|
init_src4();
|
|
@@ -40090,7 +40174,7 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
|
|
|
40090
40174
|
import_jsx_runtime187 = __toESM(require_jsx_runtime(), 1);
|
|
40091
40175
|
init_esm8();
|
|
40092
40176
|
init_private2();
|
|
40093
|
-
|
|
40177
|
+
import_react161 = __toESM(require_react(), 1);
|
|
40094
40178
|
import_react_native144 = __toESM(require_react_native(), 1);
|
|
40095
40179
|
init_src4();
|
|
40096
40180
|
init_async_bridges();
|
|
@@ -40098,15 +40182,15 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
|
|
|
40098
40182
|
init_react_native_webview();
|
|
40099
40183
|
init_esm8();
|
|
40100
40184
|
init_dist3();
|
|
40101
|
-
|
|
40185
|
+
import_react162 = __toESM(require_react(), 1);
|
|
40102
40186
|
import_react_native146 = __toESM(require_react_native(), 1);
|
|
40103
40187
|
init_src4();
|
|
40104
40188
|
init_esm8();
|
|
40105
|
-
|
|
40189
|
+
import_react163 = __toESM(require_react(), 1);
|
|
40106
40190
|
import_react_native148 = __toESM(require_react_native(), 1);
|
|
40107
40191
|
init_esm8();
|
|
40108
40192
|
init_dist3();
|
|
40109
|
-
|
|
40193
|
+
import_react164 = __toESM(require_react(), 1);
|
|
40110
40194
|
init_src4();
|
|
40111
40195
|
init_esm8();
|
|
40112
40196
|
init_private2();
|
|
@@ -40124,10 +40208,10 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
|
|
|
40124
40208
|
import_react_native156 = __toESM(require_react_native(), 1);
|
|
40125
40209
|
import_jsx_runtime191 = __toESM(require_jsx_runtime(), 1);
|
|
40126
40210
|
import_jsx_runtime192 = __toESM(require_jsx_runtime(), 1);
|
|
40127
|
-
|
|
40211
|
+
import_react165 = __toESM(require_react(), 1);
|
|
40128
40212
|
import_react_native157 = __toESM(require_react_native(), 1);
|
|
40129
40213
|
init_src4();
|
|
40130
|
-
|
|
40214
|
+
import_react166 = __toESM(require_react(), 1);
|
|
40131
40215
|
init_src4();
|
|
40132
40216
|
init_src4();
|
|
40133
40217
|
import_jsx_runtime193 = __toESM(require_jsx_runtime(), 1);
|
|
@@ -40233,10 +40317,13 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
|
|
|
40233
40317
|
return 0;
|
|
40234
40318
|
};
|
|
40235
40319
|
TossCoreModule = import_react_native138.NativeModules.TossCoreModule;
|
|
40320
|
+
EXIT_IMPRESSION_LOG_NAME = "appsintoss_app_visit__common_module::impression__stay_time";
|
|
40321
|
+
EXIT_IMPRESSION_SCHEMA_ID = 1631628;
|
|
40236
40322
|
ENTRY_APP_EVENT_SCHEMA_ID = 1562181;
|
|
40237
40323
|
AppEvent = {
|
|
40238
40324
|
Entry: EntryAppEvent,
|
|
40239
|
-
System: SystemAppEvent
|
|
40325
|
+
System: SystemAppEvent,
|
|
40326
|
+
StayTime: StayTimeAppEvent
|
|
40240
40327
|
};
|
|
40241
40328
|
EntryMessageExitedEvent = /* @__PURE__ */ function(BedrockEventDefinition3) {
|
|
40242
40329
|
"use strict";
|
|
@@ -40581,17 +40668,17 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
|
|
|
40581
40668
|
openURL(url.toString());
|
|
40582
40669
|
};
|
|
40583
40670
|
useGameCenterProfile = function(isReadyForProfileUI) {
|
|
40584
|
-
var _useState = _sliced_to_array((0,
|
|
40585
|
-
var _useState1 = _sliced_to_array((0,
|
|
40586
|
-
var _useState2 = _sliced_to_array((0,
|
|
40671
|
+
var _useState = _sliced_to_array((0, import_react164.useState)(void 0), 2), profileData = _useState[0], setProfileData = _useState[1];
|
|
40672
|
+
var _useState1 = _sliced_to_array((0, import_react164.useState)(true), 2), isProfileDataLoading = _useState1[0], setIsProfileDataLoading = _useState1[1];
|
|
40673
|
+
var _useState2 = _sliced_to_array((0, import_react164.useState)(false), 2), isProfileDataRefetching = _useState2[0], setIsProfileDataRefetching = _useState2[1];
|
|
40587
40674
|
var shouldShowLoadingOverlay = isProfileDataLoading && isReadyForProfileUI;
|
|
40588
40675
|
var shouldShowProfileNotFoundOverlay = (profileData === null || profileData === void 0 ? void 0 : profileData.statusCode) === "PROFILE_NOT_FOUND" && isReadyForProfileUI && !isProfileDataRefetching;
|
|
40589
40676
|
var canShowBottomSheetOrToast = !isProfileDataLoading && isReadyForProfileUI;
|
|
40590
|
-
var _useState3 = _sliced_to_array((0,
|
|
40591
|
-
var isCompletedProfileFlow = (0,
|
|
40677
|
+
var _useState3 = _sliced_to_array((0, import_react164.useState)(false), 2), isWebviewLoading = _useState3[0], setIsWebviewLoading = _useState3[1];
|
|
40678
|
+
var isCompletedProfileFlow = (0, import_react164.useRef)(false);
|
|
40592
40679
|
var _useDialog = useDialog(), openAlert = _useDialog.openAlert, openConfirm = _useDialog.openConfirm;
|
|
40593
40680
|
var openGameProfileToast = useGameProfileToast().openGameProfileToast;
|
|
40594
|
-
var openErrorAlert = (0,
|
|
40681
|
+
var openErrorAlert = (0, import_react164.useCallback)(/* @__PURE__ */ _async_to_generator(function() {
|
|
40595
40682
|
return __generator(this, function(_state) {
|
|
40596
40683
|
switch (_state.label) {
|
|
40597
40684
|
case 0:
|
|
@@ -40613,7 +40700,7 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
|
|
|
40613
40700
|
}), [
|
|
40614
40701
|
openAlert
|
|
40615
40702
|
]);
|
|
40616
|
-
var openProfileWebview = (0,
|
|
40703
|
+
var openProfileWebview = (0, import_react164.useCallback)(function() {
|
|
40617
40704
|
if (isWebviewLoading) {
|
|
40618
40705
|
return;
|
|
40619
40706
|
}
|
|
@@ -40683,7 +40770,7 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
|
|
|
40683
40770
|
openGameProfileToast,
|
|
40684
40771
|
openErrorAlert
|
|
40685
40772
|
]);
|
|
40686
|
-
var updateAppToSupportedMinVersion = (0,
|
|
40773
|
+
var updateAppToSupportedMinVersion = (0, import_react164.useCallback)(/* @__PURE__ */ _async_to_generator(function() {
|
|
40687
40774
|
var upddateConfirmDialogLabel, isConfirmed, STORE_SCHEME;
|
|
40688
40775
|
return __generator(this, function(_state) {
|
|
40689
40776
|
switch (_state.label) {
|
|
@@ -40746,7 +40833,7 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
|
|
|
40746
40833
|
GameProfile = function(param) {
|
|
40747
40834
|
var children = param.children, isReadyForProfileUI = param.isReadyForProfileUI;
|
|
40748
40835
|
var _useGameCenterProfile = useGameCenterProfile(isReadyForProfileUI), profileData = _useGameCenterProfile.profileData, isProfileDataRefetching = _useGameCenterProfile.isProfileDataRefetching, shouldShowLoadingOverlay = _useGameCenterProfile.shouldShowLoadingOverlay, shouldShowProfileNotFoundOverlay = _useGameCenterProfile.shouldShowProfileNotFoundOverlay, canShowBottomSheetOrToast = _useGameCenterProfile.canShowBottomSheetOrToast, isCompletedProfileFlow = _useGameCenterProfile.isCompletedProfileFlow, openProfileWebview = _useGameCenterProfile.openProfileWebview, updateAppToSupportedMinVersion = _useGameCenterProfile.updateAppToSupportedMinVersion, setIsProfileDataLoading = _useGameCenterProfile.setIsProfileDataLoading, setProfileData = _useGameCenterProfile.setProfileData, openErrorAlert = _useGameCenterProfile.openErrorAlert, openGameProfileToast = _useGameCenterProfile.openGameProfileToast;
|
|
40749
|
-
(0,
|
|
40836
|
+
(0, import_react163.useEffect)(function() {
|
|
40750
40837
|
try {
|
|
40751
40838
|
var getProfileData = function() {
|
|
40752
40839
|
var _ref = _async_to_generator(function() {
|
|
@@ -40778,7 +40865,7 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
|
|
|
40778
40865
|
setIsProfileDataLoading(false);
|
|
40779
40866
|
}
|
|
40780
40867
|
}, []);
|
|
40781
|
-
(0,
|
|
40868
|
+
(0, import_react163.useEffect)(function() {
|
|
40782
40869
|
var handleGameProfileFlow = function() {
|
|
40783
40870
|
var _ref = _async_to_generator(function() {
|
|
40784
40871
|
return __generator(this, function(_state) {
|
|
@@ -40918,11 +41005,12 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
|
|
|
40918
41005
|
}
|
|
40919
41006
|
});
|
|
40920
41007
|
originXML = '<svg fill="none" height="30" viewBox="0 0 30 30" width="30" xmlns="https://www.w3.org/2000/svg"><rect fill="#031832" fill-opacity=".46" height="30" rx="15" width="30"/><rect height="29.5" rx="14.75" stroke="#d9d9ff" stroke-opacity=".11" stroke-width=".5" width="29.5" x=".25" y=".25"/><path clip-rule="evenodd" d="m16.5119 15.0014 4.7092-4.7092c.0929-.0928.1666-.2031.2169-.32441.0503-.12134.0762-.25141.0762-.38276.0001-.13136-.0258-.26144-.076-.38281s-.1239-.23166-.2167-.32457c-.0929-.09291-.2031-.16662-.3245-.21692-.1213-.05031-.2514-.07622-.3827-.07626-.1314-.00004-.2615.0258-.3828.07603-.1214.05023-.2317.12388-.3246.21673l-4.7092 4.70997-4.71-4.70997c-.1897-.17718-.4408-.27373-.70034-.26927s-.5072.10959-.69069.2932c-.1835.1836-.28848.43132-.29279.69087-.00432.25954.09238.51057.26968.70017l4.71004 4.7092-4.71004 4.7092c-.1392.1401-.23385.3183-.27204.5121-.0382.1939-.01823.3946.05739.5771s.20351.3386.36759.4486.35702.169.55456.1697c.25583 0 .51164-.0975.70664-.2925l4.71-4.71 4.7092 4.71c.0927.093.2029.1668.3243.2172.1213.0504.2514.0763.3828.0763s.2614-.0259.3828-.0763c.1213-.0504.2315-.1242.3243-.2172.0929-.0929.1667-.2032.217-.3246s.0762-.2515.0762-.3829-.0259-.2616-.0762-.383-.1241-.2317-.217-.3245z" fill="#fdfdfe" fill-opacity=".89" fill-rule="evenodd"/></svg>';
|
|
40921
|
-
GameWebView = /* @__PURE__ */ (0,
|
|
41008
|
+
GameWebView = /* @__PURE__ */ (0, import_react162.forwardRef)(function GameWebView2(props, ref) {
|
|
40922
41009
|
var openConfirm = useDialog().openConfirm;
|
|
40923
41010
|
var brandDisplayName = getAppsInTossGlobals().brandDisplayName;
|
|
40924
|
-
var
|
|
40925
|
-
var
|
|
41011
|
+
var captureExitLog = useCaptureExitLog().captureExitLog;
|
|
41012
|
+
var _useState2 = _sliced_to_array((0, import_react162.useState)(false), 2), isEntryMessageExited = _useState2[0], setIsEntryMessageExited = _useState2[1];
|
|
41013
|
+
var handleClose = (0, import_react162.useCallback)(/* @__PURE__ */ _async_to_generator(function() {
|
|
40926
41014
|
var isConfirmed;
|
|
40927
41015
|
return __generator(this, function(_state) {
|
|
40928
41016
|
switch (_state.label) {
|
|
@@ -40939,6 +41027,7 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
|
|
|
40939
41027
|
case 1:
|
|
40940
41028
|
isConfirmed = _state.sent();
|
|
40941
41029
|
if (isConfirmed) {
|
|
41030
|
+
captureExitLog(Date.now());
|
|
40942
41031
|
closeView();
|
|
40943
41032
|
}
|
|
40944
41033
|
return [
|
|
@@ -40948,9 +41037,10 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
|
|
|
40948
41037
|
});
|
|
40949
41038
|
}), [
|
|
40950
41039
|
brandDisplayName,
|
|
41040
|
+
captureExitLog,
|
|
40951
41041
|
openConfirm
|
|
40952
41042
|
]);
|
|
40953
|
-
(0,
|
|
41043
|
+
(0, import_react162.useEffect)(function() {
|
|
40954
41044
|
if (import_react_native146.Platform.OS === "ios") {
|
|
40955
41045
|
setIosSwipeGestureEnabled({
|
|
40956
41046
|
isEnabled: false
|
|
@@ -40963,7 +41053,7 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
|
|
|
40963
41053
|
}
|
|
40964
41054
|
return;
|
|
40965
41055
|
}, []);
|
|
40966
|
-
(0,
|
|
41056
|
+
(0, import_react162.useEffect)(function() {
|
|
40967
41057
|
var backHandler = function() {
|
|
40968
41058
|
handleClose();
|
|
40969
41059
|
return true;
|
|
@@ -40975,7 +41065,7 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
|
|
|
40975
41065
|
}, [
|
|
40976
41066
|
handleClose
|
|
40977
41067
|
]);
|
|
40978
|
-
(0,
|
|
41068
|
+
(0, import_react162.useEffect)(function() {
|
|
40979
41069
|
appsInTossEvent.addEventListener("entryMessageExited", {
|
|
40980
41070
|
onEvent: function() {
|
|
40981
41071
|
setIsEntryMessageExited(true);
|
|
@@ -41153,13 +41243,13 @@ window.__bedrock.app = { name: Ait.appName, buildNumber: Ait.buildNumber };
|
|
|
41153
41243
|
})
|
|
41154
41244
|
});
|
|
41155
41245
|
}
|
|
41156
|
-
var import_jsx_runtime194,
|
|
41246
|
+
var import_jsx_runtime194, import_react167, import_react_native158, getInitialAccessoryButtons;
|
|
41157
41247
|
var init_pages = __esm({
|
|
41158
41248
|
"react-native/pages/index.tsx"() {
|
|
41159
41249
|
"use strict";
|
|
41160
41250
|
import_jsx_runtime194 = __toESM(require_jsx_runtime(), 1);
|
|
41161
41251
|
init_dist4();
|
|
41162
|
-
|
|
41252
|
+
import_react167 = __toESM(require_react(), 1);
|
|
41163
41253
|
import_react_native158 = __toESM(require_react_native(), 1);
|
|
41164
41254
|
getInitialAccessoryButtons = function() {
|
|
41165
41255
|
try {
|
package/dist/prebuilt/prod.json
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
{
|
|
3
3
|
"platform": "ios",
|
|
4
4
|
"totalModuleCount": 1622,
|
|
5
|
-
"duration":
|
|
6
|
-
"size":
|
|
5
|
+
"duration": 1086.202166,
|
|
6
|
+
"size": 1616080
|
|
7
7
|
},
|
|
8
8
|
{
|
|
9
9
|
"platform": "android",
|
|
10
10
|
"totalModuleCount": 1622,
|
|
11
|
-
"duration":
|
|
12
|
-
"size":
|
|
11
|
+
"duration": 1072.5127080000002,
|
|
12
|
+
"size": 1614439
|
|
13
13
|
}
|
|
14
14
|
]
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apps-in-toss/web-framework",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.37",
|
|
5
5
|
"description": "Web Framework for Apps In Toss",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"prepack": "yarn build",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"config.d.ts"
|
|
52
52
|
],
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@apps-in-toss/framework": "0.0.
|
|
54
|
+
"@apps-in-toss/framework": "0.0.37",
|
|
55
55
|
"@babel/plugin-proposal-class-properties": "^7.16.7",
|
|
56
56
|
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.16.7",
|
|
57
57
|
"@babel/plugin-proposal-numeric-separator": "^7.16.7",
|
|
@@ -72,6 +72,7 @@
|
|
|
72
72
|
"@react-native-bedrock/mpack-next": "0.0.25",
|
|
73
73
|
"@react-native-bedrock/native": "0.0.25",
|
|
74
74
|
"@react-native-bedrock/plugin-core": "0.0.25",
|
|
75
|
+
"@ryoppippi/unplugin-typia": "^2.1.3",
|
|
75
76
|
"@toss-design-system/react-native": "0.7.2",
|
|
76
77
|
"@types/babel__core": "^7.20.5",
|
|
77
78
|
"@types/babel__traverse": "^7",
|
|
@@ -95,6 +96,7 @@
|
|
|
95
96
|
"react-native-bedrock": "0.0.25",
|
|
96
97
|
"tsup": "^8.3.5",
|
|
97
98
|
"typescript": "5.8.3",
|
|
99
|
+
"typia": "^8.0.4",
|
|
98
100
|
"uuidv7": "^1.0.2",
|
|
99
101
|
"vitest": "^3.0.5",
|
|
100
102
|
"wait-port": "^1.1.0",
|
|
@@ -102,16 +104,16 @@
|
|
|
102
104
|
"zod": "3.24.4"
|
|
103
105
|
},
|
|
104
106
|
"dependencies": {
|
|
105
|
-
"@apps-in-toss/bridge-core": "0.0.
|
|
106
|
-
"@apps-in-toss/cli": "0.0.
|
|
107
|
-
"@apps-in-toss/plugins": "0.0.
|
|
108
|
-
"@apps-in-toss/web-analytics": "0.0.
|
|
109
|
-
"@apps-in-toss/web-bridge": "0.0.
|
|
107
|
+
"@apps-in-toss/bridge-core": "0.0.37",
|
|
108
|
+
"@apps-in-toss/cli": "0.0.37",
|
|
109
|
+
"@apps-in-toss/plugins": "0.0.37",
|
|
110
|
+
"@apps-in-toss/web-analytics": "0.0.37",
|
|
111
|
+
"@apps-in-toss/web-bridge": "0.0.37",
|
|
110
112
|
"@babel/core": "7.23.9",
|
|
111
113
|
"@react-native-bedrock/utils": "0.0.25"
|
|
112
114
|
},
|
|
113
115
|
"publishConfig": {
|
|
114
116
|
"access": "public"
|
|
115
117
|
},
|
|
116
|
-
"gitHead": "
|
|
118
|
+
"gitHead": "009779504a353e1b39160e813bf80514cbf7278b"
|
|
117
119
|
}
|