@apps-in-toss/web-framework 0.0.0-dev.1762248930136 → 0.0.0-dev.1763432540119

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.
@@ -491,6 +491,36 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
491
491
  }
492
492
  });
493
493
 
494
+ // ../../.yarn/cache/@swc-helpers-npm-0.5.13-710c6c1e6e-b9df578401.zip/node_modules/@swc/helpers/esm/_class_call_check.js
495
+ function _class_call_check(instance, Constructor) {
496
+ if (!_instanceof1(instance, Constructor)) throw new TypeError("Cannot call a class as a function");
497
+ }
498
+ var init_class_call_check = __esm({
499
+ "../../.yarn/cache/@swc-helpers-npm-0.5.13-710c6c1e6e-b9df578401.zip/node_modules/@swc/helpers/esm/_class_call_check.js"() {
500
+ init_instanceof();
501
+ }
502
+ });
503
+
504
+ // ../../.yarn/cache/@swc-helpers-npm-0.5.13-710c6c1e6e-b9df578401.zip/node_modules/@swc/helpers/esm/_create_class.js
505
+ function _defineProperties(target, props) {
506
+ for (var i60 = 0; i60 < props.length; i60++) {
507
+ var descriptor = props[i60];
508
+ descriptor.enumerable = descriptor.enumerable || false;
509
+ descriptor.configurable = true;
510
+ if ("value" in descriptor) descriptor.writable = true;
511
+ Object.defineProperty(target, descriptor.key, descriptor);
512
+ }
513
+ }
514
+ function _create_class(Constructor, protoProps, staticProps) {
515
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
516
+ if (staticProps) _defineProperties(Constructor, staticProps);
517
+ return Constructor;
518
+ }
519
+ var init_create_class = __esm({
520
+ "../../.yarn/cache/@swc-helpers-npm-0.5.13-710c6c1e6e-b9df578401.zip/node_modules/@swc/helpers/esm/_create_class.js"() {
521
+ }
522
+ });
523
+
494
524
  // ../../.yarn/cache/@swc-helpers-npm-0.5.13-710c6c1e6e-b9df578401.zip/node_modules/@swc/helpers/esm/_extends.js
495
525
  function _extends() {
496
526
  _extends = Object.assign || function assign(target) {
@@ -2316,36 +2346,6 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
2316
2346
  }
2317
2347
  });
2318
2348
 
2319
- // ../../.yarn/cache/@swc-helpers-npm-0.5.13-710c6c1e6e-b9df578401.zip/node_modules/@swc/helpers/esm/_class_call_check.js
2320
- function _class_call_check(instance, Constructor) {
2321
- if (!_instanceof1(instance, Constructor)) throw new TypeError("Cannot call a class as a function");
2322
- }
2323
- var init_class_call_check = __esm({
2324
- "../../.yarn/cache/@swc-helpers-npm-0.5.13-710c6c1e6e-b9df578401.zip/node_modules/@swc/helpers/esm/_class_call_check.js"() {
2325
- init_instanceof();
2326
- }
2327
- });
2328
-
2329
- // ../../.yarn/cache/@swc-helpers-npm-0.5.13-710c6c1e6e-b9df578401.zip/node_modules/@swc/helpers/esm/_create_class.js
2330
- function _defineProperties(target, props) {
2331
- for (var i60 = 0; i60 < props.length; i60++) {
2332
- var descriptor = props[i60];
2333
- descriptor.enumerable = descriptor.enumerable || false;
2334
- descriptor.configurable = true;
2335
- if ("value" in descriptor) descriptor.writable = true;
2336
- Object.defineProperty(target, descriptor.key, descriptor);
2337
- }
2338
- }
2339
- function _create_class(Constructor, protoProps, staticProps) {
2340
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
2341
- if (staticProps) _defineProperties(Constructor, staticProps);
2342
- return Constructor;
2343
- }
2344
- var init_create_class = __esm({
2345
- "../../.yarn/cache/@swc-helpers-npm-0.5.13-710c6c1e6e-b9df578401.zip/node_modules/@swc/helpers/esm/_create_class.js"() {
2346
- }
2347
- });
2348
-
2349
2349
  // ../../.yarn/cache/webidl-conversions-npm-5.0.0-5fd5be45a0-bf31df332e.zip/node_modules/webidl-conversions/lib/index.js
2350
2350
  var require_lib = __commonJS({
2351
2351
  "../../.yarn/cache/webidl-conversions-npm-5.0.0-5fd5be45a0-bf31df332e.zip/node_modules/webidl-conversions/lib/index.js"(exports) {
@@ -44041,7 +44041,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
44041
44041
  });
44042
44042
 
44043
44043
  // ../../.yarn/__virtual__/@apps-in-toss-native-modules-virtual-86e9653158/1/apps-in-toss-packages/native-modules/src/AppsInTossModule/constants.ts
44044
- var GAME_CENTER_MIN_VERSION2, GAME_USER_KEY_MIN_VERSION, GAME_PROMOTION_REWARD_MIN_VERSION;
44044
+ var GAME_CENTER_MIN_VERSION2, GAME_USER_KEY_MIN_VERSION, GAME_PROMOTION_REWARD_MIN_VERSION, GET_IS_TOSS_LOGIN_INTEGRATED_SERVICE_MIN_VERSION;
44045
44045
  var init_constants13 = __esm({
44046
44046
  "../../.yarn/__virtual__/@apps-in-toss-native-modules-virtual-86e9653158/1/apps-in-toss-packages/native-modules/src/AppsInTossModule/constants.ts"() {
44047
44047
  "use strict";
@@ -44057,6 +44057,10 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
44057
44057
  android: "5.232.0",
44058
44058
  ios: "5.232.0"
44059
44059
  };
44060
+ GET_IS_TOSS_LOGIN_INTEGRATED_SERVICE_MIN_VERSION = {
44061
+ android: "5.237.0",
44062
+ ios: "5.237.0"
44063
+ };
44060
44064
  }
44061
44065
  });
44062
44066
 
@@ -44237,6 +44241,48 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
44237
44241
  }
44238
44242
  });
44239
44243
 
44244
+ // ../../.yarn/__virtual__/@apps-in-toss-native-modules-virtual-86e9653158/1/apps-in-toss-packages/native-modules/src/AppsInTossModule/native-modules/getIsTossLoginIntegratedService.ts
44245
+ function getIsTossLoginIntegratedService() {
44246
+ return _getIsTossLoginIntegratedService.apply(this, arguments);
44247
+ }
44248
+ function _getIsTossLoginIntegratedService() {
44249
+ _getIsTossLoginIntegratedService = _async_to_generator(function() {
44250
+ var isSupported, response;
44251
+ return __generator(this, function(_state) {
44252
+ switch (_state.label) {
44253
+ case 0:
44254
+ isSupported = isMinVersionSupported2(GET_IS_TOSS_LOGIN_INTEGRATED_SERVICE_MIN_VERSION);
44255
+ if (!isSupported) {
44256
+ return [
44257
+ 2
44258
+ ];
44259
+ }
44260
+ return [
44261
+ 4,
44262
+ AppsInTossModule2.getIsTossLoginIntegratedService({})
44263
+ ];
44264
+ case 1:
44265
+ response = _state.sent();
44266
+ return [
44267
+ 2,
44268
+ response
44269
+ ];
44270
+ }
44271
+ });
44272
+ });
44273
+ return _getIsTossLoginIntegratedService.apply(this, arguments);
44274
+ }
44275
+ var init_getIsTossLoginIntegratedService = __esm({
44276
+ "../../.yarn/__virtual__/@apps-in-toss-native-modules-virtual-86e9653158/1/apps-in-toss-packages/native-modules/src/AppsInTossModule/native-modules/getIsTossLoginIntegratedService.ts"() {
44277
+ "use strict";
44278
+ init_async_to_generator();
44279
+ init_ts_generator();
44280
+ init_AppsInTossModule();
44281
+ init_isMinVersionSupported();
44282
+ init_constants13();
44283
+ }
44284
+ });
44285
+
44240
44286
  // ../../.yarn/__virtual__/@apps-in-toss-native-modules-virtual-86e9653158/1/apps-in-toss-packages/native-modules/src/AppsInTossModule/native-modules/grantPromotionRewardForGame.ts
44241
44287
  function isGrantPromotionRewardForGameError(error) {
44242
44288
  return (typeof error === "undefined" ? "undefined" : _type_of(error)) === "object" && error !== null && "code" in error && typeof error.code === "string" && "message" in error && typeof error.message === "string";
@@ -44355,6 +44401,9 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
44355
44401
  getGameCenterGameProfile: function() {
44356
44402
  return getGameCenterGameProfile2;
44357
44403
  },
44404
+ getIsTossLoginIntegratedService: function() {
44405
+ return getIsTossLoginIntegratedService;
44406
+ },
44358
44407
  getNetworkStatus: function() {
44359
44408
  return getNetworkStatus;
44360
44409
  },
@@ -44441,6 +44490,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
44441
44490
  init_openGameCenterLeaderboard();
44442
44491
  init_submitGameCenterLeaderBoardScore();
44443
44492
  init_getUserKeyForGame();
44493
+ init_getIsTossLoginIntegratedService();
44444
44494
  init_grantPromotionRewardForGame();
44445
44495
  }
44446
44496
  });
@@ -45279,6 +45329,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
45279
45329
  init_submitGameCenterLeaderBoardScore();
45280
45330
  init_getUserKeyForGame();
45281
45331
  init_grantPromotionRewardForGame();
45332
+ init_getIsTossLoginIntegratedService();
45282
45333
  init_contactsViral();
45283
45334
  init_appsInTossSignTossCert();
45284
45335
  }
@@ -46489,21 +46540,22 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
46489
46540
  });
46490
46541
  }
46491
46542
  function useBridgeHandler(param) {
46492
- var onMessage = param.onMessage, constantHandlerMap = param.constantHandlerMap, asyncHandlerMap = param.asyncHandlerMap, eventListenerMap = param.eventListenerMap, originalInjectedJavaScript = param.injectedJavaScript;
46543
+ var onMessage = param.onMessage, constantHandlerMap = param.constantHandlerMap, asyncHandlerMap = param.asyncHandlerMap, eventListenerMap = param.eventListenerMap;
46493
46544
  var ref = (0, import_react232.useRef)(null);
46494
46545
  var injectedJavaScript = (0, import_react232.useMemo)(function() {
46495
- return [
46496
- "window.__CONSTANT_HANDLER_MAP = ".concat(JSON.stringify(Object.entries(constantHandlerMap).reduce(function(acc, param2) {
46497
- var _param = _sliced_to_array(param2, 2), key = _param[0], value = _param[1];
46498
- acc[key] = typeof value === "function" ? value() : value;
46499
- return acc;
46500
- }, {})), ";"),
46501
- originalInjectedJavaScript,
46502
- "true"
46503
- ].join("\n");
46546
+ return "window.__CONSTANT_HANDLER_MAP = ".concat(JSON.stringify(Object.entries(constantHandlerMap).reduce(function(acc, param2) {
46547
+ var _param = _sliced_to_array(param2, 2), key = _param[0], value = _param[1];
46548
+ acc[key] = typeof value === "function" ? value() : value;
46549
+ return acc;
46550
+ }, {})), ";");
46504
46551
  }, [
46505
- constantHandlerMap,
46506
- originalInjectedJavaScript
46552
+ constantHandlerMap
46553
+ ]);
46554
+ (0, import_react232.useEffect)(function() {
46555
+ var _ref_current;
46556
+ (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.injectJavaScript(injectedJavaScript);
46557
+ }, [
46558
+ injectedJavaScript
46507
46559
  ]);
46508
46560
  var createHandleOnEvent = function(functionName, eventId) {
46509
46561
  return function(response) {
@@ -46524,7 +46576,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
46524
46576
  var data, _eventListenerMap_data_functionName, handleOnEvent, handleOnError, remove, key, remove1, _ref_current;
46525
46577
  return __generator(this, function(_state) {
46526
46578
  onMessage === null || onMessage === void 0 ? void 0 : onMessage(e59);
46527
- data = JSON.parse(e59.nativeEvent.data);
46579
+ data = parseNativeEventData(e59.nativeEvent.data);
46528
46580
  if ((typeof data === "undefined" ? "undefined" : _type_of(data)) !== "object" || data === null || typeof data.functionName !== "string" || typeof data.eventId !== "string" || typeof data.type !== "string" || ![
46529
46581
  "addEventListener",
46530
46582
  "removeEventListener",
@@ -46588,6 +46640,32 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
46588
46640
  onMessage: $onMessage
46589
46641
  };
46590
46642
  }
46643
+ function parseNativeEventData(data) {
46644
+ try {
46645
+ return JSON.parse(data);
46646
+ } catch (error) {
46647
+ console.error(error);
46648
+ return null;
46649
+ }
46650
+ }
46651
+ function useSafeAreaInsetsEmitter() {
46652
+ var insets = (0, react_native_safe_area_context_exports.useSafeAreaInsets)();
46653
+ var emitter = (0, import_react233.useMemo)(function() {
46654
+ return new EventEmitter();
46655
+ }, []);
46656
+ (0, import_react233.useEffect)(function() {
46657
+ emitter.emit("safeAreaInsetsChange", insets);
46658
+ return function() {
46659
+ emitter.off("safeAreaInsetsChange", function(listener) {
46660
+ return listener(insets);
46661
+ });
46662
+ };
46663
+ }, [
46664
+ emitter,
46665
+ insets
46666
+ ]);
46667
+ return emitter;
46668
+ }
46591
46669
  function reducer(state, action) {
46592
46670
  switch (action.type) {
46593
46671
  case "NAVIGATION_CHANGE": {
@@ -46631,8 +46709,8 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
46631
46709
  }
46632
46710
  }
46633
46711
  function useWebViewHistory() {
46634
- var _useReducer = _sliced_to_array((0, import_react234.useReducer)(reducer, INITIAL_STATE), 2), state = _useReducer[0], dispatch = _useReducer[1];
46635
- var onNavigationStateChange = (0, import_react234.useCallback)(function(param) {
46712
+ var _useReducer = _sliced_to_array((0, import_react235.useReducer)(reducer, INITIAL_STATE), 2), state = _useReducer[0], dispatch = _useReducer[1];
46713
+ var onNavigationStateChange = (0, import_react235.useCallback)(function(param) {
46636
46714
  var url = param.url, canGoForward2 = param.canGoForward;
46637
46715
  dispatch({
46638
46716
  type: "NAVIGATION_CHANGE",
@@ -46640,7 +46718,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
46640
46718
  canGoForward: canGoForward2
46641
46719
  });
46642
46720
  }, []);
46643
- var _useMemo4 = (0, import_react234.useMemo)(function() {
46721
+ var _useMemo5 = (0, import_react235.useMemo)(function() {
46644
46722
  var canBack = state.index > 0;
46645
46723
  var canFwd = state.index >= 0 && state.index < state.stack.length - 1;
46646
46724
  return {
@@ -46650,7 +46728,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
46650
46728
  }, [
46651
46729
  state.index,
46652
46730
  state.stack.length
46653
- ]), canGoBack = _useMemo4.canGoBack, canGoForward = _useMemo4.canGoForward;
46731
+ ]), canGoBack = _useMemo5.canGoBack, canGoForward = _useMemo5.canGoForward;
46654
46732
  return {
46655
46733
  onNavigationStateChange,
46656
46734
  hasHistory: canGoBack,
@@ -46664,17 +46742,17 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
46664
46742
  var logging = useNavigationBarLogging();
46665
46743
  var openConfirm = useDialog().openConfirm;
46666
46744
  var global2 = getAppsInTossGlobals();
46667
- var addEventListener = (0, import_react233.useCallback)(function(handler) {
46745
+ var addEventListener = (0, import_react234.useCallback)(function(handler) {
46668
46746
  addWebBackEventListener(handler);
46669
46747
  }, [
46670
46748
  addWebBackEventListener
46671
46749
  ]);
46672
- var removeEventListener = (0, import_react233.useCallback)(function(handler) {
46750
+ var removeEventListener = (0, import_react234.useCallback)(function(handler) {
46673
46751
  removeWebBackEventListener(handler);
46674
46752
  }, [
46675
46753
  removeWebBackEventListener
46676
46754
  ]);
46677
- var handleWebBack = (0, import_react233.useCallback)(/* @__PURE__ */ _async_to_generator(function() {
46755
+ var handleWebBack = (0, import_react234.useCallback)(/* @__PURE__ */ _async_to_generator(function() {
46678
46756
  var _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, handler, _webViewRef_current, isConfirmed;
46679
46757
  return __generator(this, function(_state) {
46680
46758
  switch (_state.label) {
@@ -46748,7 +46826,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
46748
46826
  openConfirm,
46749
46827
  webViewRef
46750
46828
  ]);
46751
- var handleWebHome = (0, import_react233.useCallback)(function() {
46829
+ var handleWebHome = (0, import_react234.useCallback)(function() {
46752
46830
  var _webViewRef_current;
46753
46831
  logging.homeButtonClick();
46754
46832
  if (hasWebBackEvent) {
@@ -46781,7 +46859,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
46781
46859
  logging,
46782
46860
  webViewRef
46783
46861
  ]);
46784
- return (0, import_react233.useMemo)(function() {
46862
+ return (0, import_react234.useMemo)(function() {
46785
46863
  return {
46786
46864
  addEventListener,
46787
46865
  removeEventListener,
@@ -47032,15 +47110,13 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
47032
47110
  ]);
47033
47111
  var top = useSafeAreaTop();
47034
47112
  var bottom = useSafeAreaBottom();
47113
+ var insets = (0, react_native_safe_area_context_exports.useSafeAreaInsets)();
47035
47114
  var global2 = getAppsInTossGlobals();
47036
47115
  var navigationBarContext = useNavigationBarContext();
47037
- 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 ";
47116
+ var safeAreaInsetsEmitter = useSafeAreaInsetsEmitter();
47038
47117
  var _useState8 = _sliced_to_array((0, import_react227.useState)(props.allowsBackForwardNavigationGestures), 2), allowsBackForwardNavigationGestures = _useState8[0], setAllowsBackForwardNavigationGestures = _useState8[1];
47039
47118
  var handler = useBridgeHandler({
47040
47119
  onMessage,
47041
- injectedJavaScript: [
47042
- disableTextSelectionCSS
47043
- ].join("\n"),
47044
47120
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
47045
47121
  eventListenerMap: _object_spread_props(_object_spread({}, event_bridges_exports), {
47046
47122
  navigationAccessoryEvent: function(param) {
@@ -47072,6 +47148,13 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
47072
47148
  options
47073
47149
  });
47074
47150
  },
47151
+ safeAreaInsetsChange: function(param) {
47152
+ var onEvent = param.onEvent;
47153
+ safeAreaInsetsEmitter.on("safeAreaInsetsChange", onEvent);
47154
+ return function() {
47155
+ safeAreaInsetsEmitter.off("safeAreaInsetsChange", onEvent);
47156
+ };
47157
+ },
47075
47158
  /** @internal */
47076
47159
  appBridgeCallbackEvent: function(param) {
47077
47160
  var onEvent = param.onEvent, onError2 = param.onError, options = param.options;
@@ -47099,6 +47182,12 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
47099
47182
  },
47100
47183
  getSafeAreaBottom: function() {
47101
47184
  return bottom;
47185
+ },
47186
+ getSafeAreaLeft: function() {
47187
+ return insets.left;
47188
+ },
47189
+ getSafeAreaRight: function() {
47190
+ return insets.right;
47102
47191
  }
47103
47192
  }), Object.fromEntries(Object.entries(global2).map(function(param) {
47104
47193
  var _$_param = _sliced_to_array(param, 2), key = _$_param[0], value = _$_param[1];
@@ -47207,6 +47296,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
47207
47296
  }, [
47208
47297
  webBackHandler
47209
47298
  ]);
47299
+ var globalScripts = useGlobalScripts();
47210
47300
  return /* @__PURE__ */ (0, import_jsx_runtime232.jsx)(BaseWebView, _object_spread_props(_object_spread({
47211
47301
  ref: refs
47212
47302
  }, props, headerPropForExternalWebView), {
@@ -47232,17 +47322,36 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
47232
47322
  webviewDebuggingEnabled: webViewDebuggingEnabled,
47233
47323
  thirdPartyCookiesEnabled: true,
47234
47324
  onMessage: handler.onMessage,
47235
- injectedJavaScript: handler.injectedJavaScript,
47236
- injectedJavaScriptBeforeContentLoaded: handler.injectedJavaScript,
47325
+ injectedJavaScript: globalScripts.afterLoad,
47326
+ injectedJavaScriptBeforeContentLoaded: mergeScripts(handler.injectedJavaScript, globalScripts.beforeLoad),
47237
47327
  decelerationRate: import_react_native221.Platform.OS === "ios" ? 1 : void 0,
47238
47328
  allowsBackForwardNavigationGestures
47239
47329
  }));
47240
47330
  }
47241
- var import_react_native199, import_react209, import_react210, import_react211, import_react212, import_jsx_runtime217, import_react213, import_jsx_runtime218, import_react214, import_react215, import_react_native205, import_react216, import_react_native207, import_react217, import_react_native209, import_react218, import_react219, import_react220, import_react221, import_jsx_runtime219, import_jsx_runtime220, import_react222, import_react_native212, import_react223, import_react224, import_react225, import_react_native217, import_jsx_runtime221, import_jsx_runtime222, import_react226, import_jsx_runtime223, import_jsx_runtime224, import_react_native219, import_jsx_runtime225, import_jsx_runtime226, import_jsx_runtime227, import_react227, import_react_native221, import_react228, import_react_native222, import_react229, import_react_native224, import_jsx_runtime228, import_jsx_runtime229, import_react230, import_react231, import_jsx_runtime230, import_jsx_runtime231, import_react232, import_react233, import_react234, import_react_native227, import_react235, import_react236, import_jsx_runtime232, __defProp2, __getOwnPropDesc2, __getOwnPropNames2, __hasOwnProp2, __copyProps2, __reExport2, env, EXIT_IMPRESSION_LOG_NAME, EXIT_IMPRESSION_SCHEMA_ID, ENTRY_APP_EVENT_SCHEMA_ID, AppEvent, UPDATE_SCHEME, NavigationBarContext, GAME_PROFILE_WEBVIEW_URL, GAME_MIN_VERSION, PLAYSTORE_LINK, APPSTORE_LINK, getMarketLink, UPDATE_DIALOG_SCHEMA_ID, UPDATE_DIALOG_LOG_NAME, UPDATE_DIALOG_CTA_CLICK_SCHEMA_ID, UPDATE_DIALOG_CTA_CLICK_LOG_NAME, DEFAULT_ERROR, useErrorAlert, INTERNAL__onVisibilityChangedByTransparentServiceWeb, openTransparentWebView, useTransparentWebview, useGameProfileToast, useGameCenterProfile, Z_INDEX, GameInitializer, overlayStyle, NAVI_BAR_IMPRESSION_SCHEMA_ID, NAVI_BAR_IMPRESSION_LOG_NAME, CLOSE_POPUP_SHOW_SCHEMA_ID, CLOSE_POPUP_SHOW_LOG_NAME, CLOSE_BUTTON_CLICK_SCHEMA_ID, CLOSE_BUTTON_CLICK_LOG_NAME, CLOSE_POPUP_CTA_CLICK_SCHEMA_ID, CLOSE_POPUP_CTA_CLICK_LOG_NAME, HOME_BUTTON_CLICK_SCHEMA_ID, HOME_BUTTON_CLICK_LOG_NAME, BOTTOM_SHEET_SCHEMA_ID, BOTTOM_SHEET_LOG_NAME, BOTTOM_SHEET_OPEN_SCHEMA_ID, BOTTOM_SHEET_OPEN_LOG_NAME, BOTTOM_SHEET_CLOSE_CLICK_SCHEMA_ID, BOTTOM_SHEET_CLOSE_CLICK_LOG_NAME, BOTTOM_SHEET_MENU_CLICK_SCHEMA_ID, BOTTOM_SHEET_MENU_CLICK_LOG_NAME, SHARE_SCHEME_REFERRER, APP_SHARE_MENU_INFO, APP_BRIDGE_METHOD_NAME, MIN_VERSION, RNNavigationBar, bridge_entry_exports, AppsInToss, GameWebView, PartnerWebView, globalEventListenerMap, INITIAL_STATE, HISTORY_BACK_SCRIPT, HISTORY_HOME_SCRIPT, FontA11yCategory, androidFontScaleMap, iosScaleToAndroidScale, extractDateFromUUIDv7, getGroupId, getReferrer3, trackScreen, operationalEnvironment, TYPES, WEBVIEW_TYPES, Analytics2;
47331
+ function useGlobalScripts() {
47332
+ var global2 = getAppsInTossGlobals();
47333
+ var disableTextSelectionCSS = "\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 ";
47334
+ var applyGameResourcesCache = "\n (function () {\n if (typeof caches === 'undefined') {\n return;\n }\n const cacheKeyPrefix = '@apps-in-toss/caches/';\n const cacheKey = `${cacheKeyPrefix}".concat(global2.deploymentId, "`;\n window.addEventListener('load', async () => {\n const keys = await caches.keys();\n for (const key of keys) {\n if (key.startsWith(cacheKeyPrefix) && key !== cacheKey) {\n await caches.delete(key);\n }\n }\n });\n window.fetch = new Proxy(window.fetch, {\n async apply(originalFetch, thisArg, args) {\n const request = new Request(args[0], args[1]);\n if (!/\\.(data|wasm|framework\\.js)(?:\\.gz|\\.br|\\.unityweb)?$/.test(request.url)) {\n return await originalFetch.call(thisArg, request);\n }\n const cache = await caches.open(cacheKey);\n const cached = await cache.match(request);\n if (cached) {\n const eTag = cached.headers.get('ETag');\n const lastModified = cached.headers.get('Last-Modified');\n if (eTag) {\n request.headers.set('If-None-Match', eTag);\n }\n if (lastModified) {\n request.headers.set('If-Modified-Since', lastModified);\n }\n const revalidated = await originalFetch.call(thisArg, request);\n if (revalidated.status === 304) {\n return cached;\n }\n cache.put(request, revalidated.clone());\n return revalidated;\n }\n const response = await originalFetch.call(thisArg, request);\n cache.put(request, response.clone());\n return response;\n },\n });\n })();\n ");
47335
+ return {
47336
+ beforeLoad: mergeScripts(global2.webViewType === "game" && applyGameResourcesCache),
47337
+ afterLoad: mergeScripts(disableTextSelectionCSS)
47338
+ };
47339
+ }
47340
+ function mergeScripts() {
47341
+ for (var _len = arguments.length, scripts = new Array(_len), _key = 0; _key < _len; _key++) {
47342
+ scripts[_key] = arguments[_key];
47343
+ }
47344
+ return scripts.filter(function(script) {
47345
+ return typeof script === "string";
47346
+ }).join("\n");
47347
+ }
47348
+ var import_react_native199, import_react209, import_react210, import_react211, import_react212, import_jsx_runtime217, import_react213, import_jsx_runtime218, import_react214, import_react215, import_react_native205, import_react216, import_react_native207, import_react217, import_react_native209, import_react218, import_react219, import_react220, import_react221, import_jsx_runtime219, import_jsx_runtime220, import_react222, import_react_native212, import_react223, import_react224, import_react225, import_react_native217, import_jsx_runtime221, import_jsx_runtime222, import_react226, import_jsx_runtime223, import_jsx_runtime224, import_react_native219, import_jsx_runtime225, import_jsx_runtime226, import_jsx_runtime227, import_react227, import_react_native221, import_react228, import_react_native222, import_react229, import_react_native224, import_jsx_runtime228, import_jsx_runtime229, import_react230, import_react231, import_jsx_runtime230, import_jsx_runtime231, import_react232, import_react233, import_react234, import_react235, import_react_native227, import_react236, import_react237, import_jsx_runtime232, __defProp2, __getOwnPropDesc2, __getOwnPropNames2, __hasOwnProp2, __copyProps2, __reExport2, env, EXIT_IMPRESSION_LOG_NAME, EXIT_IMPRESSION_SCHEMA_ID, ENTRY_APP_EVENT_SCHEMA_ID, AppEvent, UPDATE_SCHEME, NavigationBarContext, GAME_PROFILE_WEBVIEW_URL, GAME_MIN_VERSION, PLAYSTORE_LINK, APPSTORE_LINK, getMarketLink, UPDATE_DIALOG_SCHEMA_ID, UPDATE_DIALOG_LOG_NAME, UPDATE_DIALOG_CTA_CLICK_SCHEMA_ID, UPDATE_DIALOG_CTA_CLICK_LOG_NAME, DEFAULT_ERROR, useErrorAlert, INTERNAL__onVisibilityChangedByTransparentServiceWeb, openTransparentWebView, useTransparentWebview, useGameProfileToast, useGameCenterProfile, Z_INDEX, GameInitializer, overlayStyle, NAVI_BAR_IMPRESSION_SCHEMA_ID, NAVI_BAR_IMPRESSION_LOG_NAME, CLOSE_POPUP_SHOW_SCHEMA_ID, CLOSE_POPUP_SHOW_LOG_NAME, CLOSE_BUTTON_CLICK_SCHEMA_ID, CLOSE_BUTTON_CLICK_LOG_NAME, CLOSE_POPUP_CTA_CLICK_SCHEMA_ID, CLOSE_POPUP_CTA_CLICK_LOG_NAME, HOME_BUTTON_CLICK_SCHEMA_ID, HOME_BUTTON_CLICK_LOG_NAME, BOTTOM_SHEET_SCHEMA_ID, BOTTOM_SHEET_LOG_NAME, BOTTOM_SHEET_OPEN_SCHEMA_ID, BOTTOM_SHEET_OPEN_LOG_NAME, BOTTOM_SHEET_CLOSE_CLICK_SCHEMA_ID, BOTTOM_SHEET_CLOSE_CLICK_LOG_NAME, BOTTOM_SHEET_MENU_CLICK_SCHEMA_ID, BOTTOM_SHEET_MENU_CLICK_LOG_NAME, SHARE_SCHEME_REFERRER, APP_SHARE_MENU_INFO, APP_BRIDGE_METHOD_NAME, MIN_VERSION, RNNavigationBar, bridge_entry_exports, AppsInToss, GameWebView, PartnerWebView, globalEventListenerMap, EventEmitter, INITIAL_STATE, HISTORY_BACK_SCRIPT, HISTORY_HOME_SCRIPT, FontA11yCategory, androidFontScaleMap, iosScaleToAndroidScale, extractDateFromUUIDv7, getGroupId, getReferrer3, trackScreen, operationalEnvironment, TYPES, WEBVIEW_TYPES, Analytics2;
47242
47349
  var init_dist8 = __esm({
47243
47350
  "../../.yarn/__virtual__/@apps-in-toss-framework-virtual-574b136add/1/apps-in-toss-packages/framework/dist/index.js"() {
47244
47351
  "use strict";
47245
47352
  init_async_to_generator();
47353
+ init_class_call_check();
47354
+ init_create_class();
47246
47355
  init_extends();
47247
47356
  init_instanceof();
47248
47357
  init_object_destructuring_empty();
@@ -47344,6 +47453,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
47344
47453
  init_async_bridges();
47345
47454
  init_constant_bridges2();
47346
47455
  init_event_bridges();
47456
+ init_react_native_safe_area_context();
47347
47457
  init_src3();
47348
47458
  init_esm8();
47349
47459
  init_private2();
@@ -47372,16 +47482,18 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
47372
47482
  import_jsx_runtime230 = __toESM(require_jsx_runtime(), 1);
47373
47483
  import_jsx_runtime231 = __toESM(require_jsx_runtime(), 1);
47374
47484
  import_react232 = __toESM(require_react(), 1);
47485
+ init_react_native_safe_area_context();
47486
+ import_react233 = __toESM(require_react(), 1);
47375
47487
  init_src3();
47376
47488
  init_esm8();
47377
47489
  init_dist7();
47378
- import_react233 = __toESM(require_react(), 1);
47379
47490
  import_react234 = __toESM(require_react(), 1);
47491
+ import_react235 = __toESM(require_react(), 1);
47380
47492
  init_dist6();
47381
47493
  import_react_native227 = __toESM(require_react_native(), 1);
47382
47494
  init_dist6();
47383
- import_react235 = __toESM(require_react(), 1);
47384
47495
  import_react236 = __toESM(require_react(), 1);
47496
+ import_react237 = __toESM(require_react(), 1);
47385
47497
  init_dist6();
47386
47498
  init_src3();
47387
47499
  import_jsx_runtime232 = __toESM(require_jsx_runtime(), 1);
@@ -47980,6 +48092,50 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
47980
48092
  });
47981
48093
  });
47982
48094
  globalEventListenerMap = /* @__PURE__ */ new Map();
48095
+ EventEmitter = /* @__PURE__ */ function() {
48096
+ "use strict";
48097
+ function EventEmitter2() {
48098
+ _class_call_check(this, EventEmitter2);
48099
+ this.listeners = {};
48100
+ }
48101
+ _create_class(EventEmitter2, [
48102
+ {
48103
+ key: "on",
48104
+ value: function on3(event, listener) {
48105
+ if (!this.listeners[event]) {
48106
+ this.listeners[event] = [];
48107
+ }
48108
+ this.listeners[event].push(listener);
48109
+ }
48110
+ },
48111
+ {
48112
+ key: "emit",
48113
+ value: function emit(event) {
48114
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
48115
+ args[_key - 1] = arguments[_key];
48116
+ }
48117
+ if (!this.listeners[event]) {
48118
+ return;
48119
+ }
48120
+ this.listeners[event].forEach(function(listener) {
48121
+ return listener.apply(void 0, _to_consumable_array(args));
48122
+ });
48123
+ }
48124
+ },
48125
+ {
48126
+ key: "off",
48127
+ value: function off(event, listener) {
48128
+ if (!this.listeners[event]) {
48129
+ return;
48130
+ }
48131
+ this.listeners[event] = this.listeners[event].filter(function(l48) {
48132
+ return l48 !== listener;
48133
+ });
48134
+ }
48135
+ }
48136
+ ]);
48137
+ return EventEmitter2;
48138
+ }();
47983
48139
  INITIAL_STATE = {
47984
48140
  stack: [],
47985
48141
  index: -1
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.0-dev.1762248930136",
4
+ "version": "0.0.0-dev.1763432540119",
5
5
  "description": "Web Framework for Apps In Toss",
6
6
  "scripts": {
7
7
  "prepack": "yarn build",
@@ -87,12 +87,12 @@
87
87
  "zod": "3.24.4"
88
88
  },
89
89
  "dependencies": {
90
- "@apps-in-toss/bridge-core": "0.0.0-dev.1762248930136",
91
- "@apps-in-toss/cli": "0.0.0-dev.1762248930136",
92
- "@apps-in-toss/framework": "0.0.0-dev.1762248930136",
93
- "@apps-in-toss/plugins": "0.0.0-dev.1762248930136",
94
- "@apps-in-toss/web-analytics": "0.0.0-dev.1762248930136",
95
- "@apps-in-toss/web-bridge": "0.0.0-dev.1762248930136",
90
+ "@apps-in-toss/bridge-core": "0.0.0-dev.1763432540119",
91
+ "@apps-in-toss/cli": "0.0.0-dev.1763432540119",
92
+ "@apps-in-toss/framework": "0.0.0-dev.1763432540119",
93
+ "@apps-in-toss/plugins": "0.0.0-dev.1763432540119",
94
+ "@apps-in-toss/web-analytics": "0.0.0-dev.1763432540119",
95
+ "@apps-in-toss/web-bridge": "0.0.0-dev.1763432540119",
96
96
  "@babel/core": "7.23.9",
97
97
  "@granite-js/cli": "0.1.28",
98
98
  "@granite-js/mpack": "0.1.28",
@@ -104,5 +104,5 @@
104
104
  "publishConfig": {
105
105
  "access": "public"
106
106
  },
107
- "gitHead": "970b425f3274c6990a1aa01b708003cc0a2de743"
107
+ "gitHead": "3f902e3347692904f0e31afd7c246d8ad3b07218"
108
108
  }
@@ -1,63 +0,0 @@
1
- import { createRequire } from 'module'; const require = createRequire(import.meta.url);
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
9
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
10
- }) : x)(function(x) {
11
- if (typeof require !== "undefined") return require.apply(this, arguments);
12
- throw Error('Dynamic require of "' + x + '" is not supported');
13
- });
14
- var __esm = (fn, res) => function __init() {
15
- return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
16
- };
17
- var __commonJS = (cb, mod) => function __require2() {
18
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
19
- };
20
- var __export = (target, all) => {
21
- for (var name in all)
22
- __defProp(target, name, { get: all[name], enumerable: true });
23
- };
24
- var __copyProps = (to, from, except, desc) => {
25
- if (from && typeof from === "object" || typeof from === "function") {
26
- for (let key of __getOwnPropNames(from))
27
- if (!__hasOwnProp.call(to, key) && key !== except)
28
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
29
- }
30
- return to;
31
- };
32
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
33
- // If the importer is in node compatibility mode or this is not an ESM
34
- // file that has been converted to a CommonJS file using a Babel-
35
- // compatible transform (i.e. "__esModule" has not been set), then set
36
- // "default" to the CommonJS "module.exports" for node compatibility.
37
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
38
- mod
39
- ));
40
-
41
- // ../../.yarn/__virtual__/tsup-virtual-7863592962/0/cache/tsup-npm-8.3.5-ed25596739-7794953cbc.zip/node_modules/tsup/assets/esm_shims.js
42
- import { fileURLToPath } from "url";
43
- import path from "path";
44
- var getFilename, getDirname, __dirname, __filename;
45
- var init_esm_shims = __esm({
46
- "../../.yarn/__virtual__/tsup-virtual-7863592962/0/cache/tsup-npm-8.3.5-ed25596739-7794953cbc.zip/node_modules/tsup/assets/esm_shims.js"() {
47
- "use strict";
48
- getFilename = () => fileURLToPath(import.meta.url);
49
- getDirname = () => path.dirname(getFilename());
50
- __dirname = /* @__PURE__ */ getDirname();
51
- __filename = /* @__PURE__ */ getFilename();
52
- }
53
- });
54
-
55
- export {
56
- __require,
57
- __commonJS,
58
- __export,
59
- __toESM,
60
- __dirname,
61
- __filename,
62
- init_esm_shims
63
- };