@apps-in-toss/web-framework 1.0.1 → 1.0.2

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.
@@ -11400,6 +11400,81 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
11400
11400
  });
11401
11401
  };
11402
11402
  }
11403
+ function loadAppsInTossAdMob(params) {
11404
+ if (!loadAppsInTossAdMob.isSupported()) {
11405
+ params.onError(new Error(UNSUPPORTED_ERROR_MESSAGE2));
11406
+ return noop3;
11407
+ }
11408
+ var onEvent = params.onEvent, onError2 = params.onError, options = params.options;
11409
+ var unregisterCallbacks = INTERNAL__appBridgeHandler.invokeAppBridgeMethod("loadAppsInTossAdmob", options, {
11410
+ onSuccess: function(result) {
11411
+ return onEvent({
11412
+ type: "loaded",
11413
+ data: result
11414
+ });
11415
+ },
11416
+ onError: onError2
11417
+ });
11418
+ return unregisterCallbacks;
11419
+ }
11420
+ function showAppsInTossAdMob(params) {
11421
+ if (!showAppsInTossAdMob.isSupported()) {
11422
+ params.onError(new Error(UNSUPPORTED_ERROR_MESSAGE2));
11423
+ return noop3;
11424
+ }
11425
+ var onEvent = params.onEvent, onError2 = params.onError, options = params.options;
11426
+ var unregisterCallbacks = INTERNAL__appBridgeHandler.invokeAppBridgeMethod("showAppsInTossAdmob", options, {
11427
+ onAdClicked: function() {
11428
+ onEvent({
11429
+ type: "clicked"
11430
+ });
11431
+ },
11432
+ onAdDismissed: function() {
11433
+ onEvent({
11434
+ type: "dismissed"
11435
+ });
11436
+ },
11437
+ onAdFailedToShow: function() {
11438
+ onEvent({
11439
+ type: "failedToShow"
11440
+ });
11441
+ },
11442
+ onAdImpression: function() {
11443
+ onEvent({
11444
+ type: "impression"
11445
+ });
11446
+ },
11447
+ onAdShow: function() {
11448
+ onEvent({
11449
+ type: "show"
11450
+ });
11451
+ },
11452
+ onUserEarnedReward: function(data) {
11453
+ onEvent({
11454
+ type: "userEarnedReward",
11455
+ data
11456
+ });
11457
+ },
11458
+ onSuccess: function() {
11459
+ return onEvent({
11460
+ type: "requested"
11461
+ });
11462
+ },
11463
+ onError: onError2
11464
+ });
11465
+ return unregisterCallbacks;
11466
+ }
11467
+ function createIsSupported2() {
11468
+ return function() {
11469
+ if (ENVIRONMENT2 !== "toss") {
11470
+ return false;
11471
+ }
11472
+ return isMinVersionSupported({
11473
+ android: ANDROID_GOOGLE_AD_MOB_SUPPORTED_VERSION2,
11474
+ ios: IOS_GOOGLE_AD_MOB_SUPPORTED_VERSION2
11475
+ });
11476
+ };
11477
+ }
11403
11478
  function normalizeParams(params) {
11404
11479
  return Object.fromEntries(Object.entries(params).filter(function(param) {
11405
11480
  var _param = _sliced_to_array(param, 2), value = _param[1];
@@ -11583,7 +11658,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
11583
11658
  }
11584
11659
  });
11585
11660
  }
11586
- var import_react_native42, import_react_native43, import_react_native46, import_react_native48, import_react_native49, import_react_native50, import_react_native51, import_react_native52, import_react_native53, EntryMessageExitedEvent, Module, AppsInTossModuleInstance, AppsInTossModule, nativeEventEmitter2, UpdateLocationEvent, INTERNAL__callbacks, INTERNAL__appBridgeHandler, UNSAFE__nativeEventEmitter, AppBridgeCallbackEvent, VisibilityChangedByTransparentServiceWebEvent, appsInTossEvent, SEMVER_REGEX, isWildcard, tryParse, coerceTypes, compareValues, parseVersion, compareSegments, compareVersions, ANDROID_GOOGLE_AD_MOB_SUPPORTED_VERSION, IOS_GOOGLE_AD_MOB_SUPPORTED_VERSION, UNSUPPORTED_ERROR_MESSAGE, ENVIRONMENT, IAP, Storage, GAME_CENTER_MIN_VERSION, GoogleAdMob, BedrockModule, BedrockCoreModule, TossCoreModule, INTERNAL__module;
11661
+ var import_react_native42, import_react_native43, import_react_native46, import_react_native48, import_react_native49, import_react_native50, import_react_native51, import_react_native52, import_react_native53, EntryMessageExitedEvent, Module, AppsInTossModuleInstance, AppsInTossModule, nativeEventEmitter2, UpdateLocationEvent, INTERNAL__callbacks, INTERNAL__appBridgeHandler, UNSAFE__nativeEventEmitter, AppBridgeCallbackEvent, VisibilityChangedByTransparentServiceWebEvent, appsInTossEvent, SEMVER_REGEX, isWildcard, tryParse, coerceTypes, compareValues, parseVersion, compareSegments, compareVersions, ANDROID_GOOGLE_AD_MOB_SUPPORTED_VERSION, IOS_GOOGLE_AD_MOB_SUPPORTED_VERSION, UNSUPPORTED_ERROR_MESSAGE, ENVIRONMENT, ANDROID_GOOGLE_AD_MOB_SUPPORTED_VERSION2, IOS_GOOGLE_AD_MOB_SUPPORTED_VERSION2, UNSUPPORTED_ERROR_MESSAGE2, ENVIRONMENT2, IAP, Storage, GAME_CENTER_MIN_VERSION, GoogleAdMob, BedrockModule, BedrockCoreModule, TossCoreModule, INTERNAL__module;
11587
11662
  var init_dist5 = __esm({
11588
11663
  "../../.yarn/__virtual__/@apps-in-toss-native-modules-virtual-86e9653158/1/apps-in-toss-packages/native-modules/dist/index.js"() {
11589
11664
  "use strict";
@@ -11608,6 +11683,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
11608
11683
  init_src3();
11609
11684
  import_react_native46 = __toESM(require_react_native(), 1);
11610
11685
  init_dist4();
11686
+ init_dist4();
11611
11687
  init_src3();
11612
11688
  import_react_native48 = __toESM(require_react_native(), 1);
11613
11689
  import_react_native49 = __toESM(require_react_native(), 1);
@@ -11897,6 +11973,12 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
11897
11973
  loadAdMobRewardedAd.isSupported = createIsSupported();
11898
11974
  showAdMobInterstitialAd.isSupported = createIsSupported();
11899
11975
  showAdMobRewardedAd.isSupported = createIsSupported();
11976
+ ANDROID_GOOGLE_AD_MOB_SUPPORTED_VERSION2 = "5.227.0";
11977
+ IOS_GOOGLE_AD_MOB_SUPPORTED_VERSION2 = "5.227.0";
11978
+ UNSUPPORTED_ERROR_MESSAGE2 = "This feature is not supported in the current environment";
11979
+ ENVIRONMENT2 = getOperationalEnvironment();
11980
+ loadAppsInTossAdMob.isSupported = createIsSupported2();
11981
+ showAppsInTossAdMob.isSupported = createIsSupported2();
11900
11982
  IAP = {
11901
11983
  createOneTimePurchaseOrder,
11902
11984
  getProductItemList
@@ -11915,7 +11997,9 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
11915
11997
  loadAdMobInterstitialAd,
11916
11998
  showAdMobInterstitialAd,
11917
11999
  loadAdMobRewardedAd,
11918
- showAdMobRewardedAd
12000
+ showAdMobRewardedAd,
12001
+ loadAppsInTossAdMob,
12002
+ showAppsInTossAdMob
11919
12003
  };
11920
12004
  BedrockModule = import_react_native48.NativeModules.BedrockModule;
11921
12005
  BedrockCoreModule = import_react_native52.NativeModules.BedrockCoreModule;
@@ -41797,7 +41881,10 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
41797
41881
  loadAdMobInterstitialAd: GoogleAdMob.loadAdMobInterstitialAd,
41798
41882
  showAdMobInterstitialAd: GoogleAdMob.showAdMobInterstitialAd,
41799
41883
  loadAdMobRewardedAd: GoogleAdMob.loadAdMobRewardedAd,
41800
- showAdMobRewardedAd: GoogleAdMob.showAdMobRewardedAd
41884
+ showAdMobRewardedAd: GoogleAdMob.showAdMobRewardedAd,
41885
+ /** AdMobV2 */
41886
+ loadAppsInTossAdMob: GoogleAdMob.loadAppsInTossAdMob,
41887
+ showAppsInTossAdMob: GoogleAdMob.showAppsInTossAdMob
41801
41888
  }),
41802
41889
  constantHandlerMap: _object_spread_props(_object_spread(_object_spread_props(_object_spread({}, constant_bridges_exports2, constant_bridges_exports), {
41803
41890
  getSafeAreaTop: function() {
@@ -41820,6 +41907,9 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
41820
41907
  showAdMobInterstitialAd_isSupported: GoogleAdMob.showAdMobInterstitialAd.isSupported,
41821
41908
  loadAdMobRewardedAd_isSupported: GoogleAdMob.loadAdMobRewardedAd.isSupported,
41822
41909
  showAdMobRewardedAd_isSupported: GoogleAdMob.showAdMobRewardedAd.isSupported,
41910
+ /** AdMobV2 */
41911
+ loadAppsInTossAdMob_isSupported: GoogleAdMob.loadAppsInTossAdMob.isSupported,
41912
+ showAppsInTossAdMob_isSupported: GoogleAdMob.showAppsInTossAdMob.isSupported,
41823
41913
  /** env */
41824
41914
  getDeploymentId: env.getDeploymentId
41825
41915
  }),
@@ -11409,6 +11409,81 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
11409
11409
  });
11410
11410
  };
11411
11411
  }
11412
+ function loadAppsInTossAdMob(params) {
11413
+ if (!loadAppsInTossAdMob.isSupported()) {
11414
+ params.onError(new Error(UNSUPPORTED_ERROR_MESSAGE2));
11415
+ return noop3;
11416
+ }
11417
+ var onEvent = params.onEvent, onError2 = params.onError, options = params.options;
11418
+ var unregisterCallbacks = INTERNAL__appBridgeHandler.invokeAppBridgeMethod("loadAppsInTossAdmob", options, {
11419
+ onSuccess: function(result) {
11420
+ return onEvent({
11421
+ type: "loaded",
11422
+ data: result
11423
+ });
11424
+ },
11425
+ onError: onError2
11426
+ });
11427
+ return unregisterCallbacks;
11428
+ }
11429
+ function showAppsInTossAdMob(params) {
11430
+ if (!showAppsInTossAdMob.isSupported()) {
11431
+ params.onError(new Error(UNSUPPORTED_ERROR_MESSAGE2));
11432
+ return noop3;
11433
+ }
11434
+ var onEvent = params.onEvent, onError2 = params.onError, options = params.options;
11435
+ var unregisterCallbacks = INTERNAL__appBridgeHandler.invokeAppBridgeMethod("showAppsInTossAdmob", options, {
11436
+ onAdClicked: function() {
11437
+ onEvent({
11438
+ type: "clicked"
11439
+ });
11440
+ },
11441
+ onAdDismissed: function() {
11442
+ onEvent({
11443
+ type: "dismissed"
11444
+ });
11445
+ },
11446
+ onAdFailedToShow: function() {
11447
+ onEvent({
11448
+ type: "failedToShow"
11449
+ });
11450
+ },
11451
+ onAdImpression: function() {
11452
+ onEvent({
11453
+ type: "impression"
11454
+ });
11455
+ },
11456
+ onAdShow: function() {
11457
+ onEvent({
11458
+ type: "show"
11459
+ });
11460
+ },
11461
+ onUserEarnedReward: function(data) {
11462
+ onEvent({
11463
+ type: "userEarnedReward",
11464
+ data
11465
+ });
11466
+ },
11467
+ onSuccess: function() {
11468
+ return onEvent({
11469
+ type: "requested"
11470
+ });
11471
+ },
11472
+ onError: onError2
11473
+ });
11474
+ return unregisterCallbacks;
11475
+ }
11476
+ function createIsSupported2() {
11477
+ return function() {
11478
+ if (ENVIRONMENT2 !== "toss") {
11479
+ return false;
11480
+ }
11481
+ return isMinVersionSupported({
11482
+ android: ANDROID_GOOGLE_AD_MOB_SUPPORTED_VERSION2,
11483
+ ios: IOS_GOOGLE_AD_MOB_SUPPORTED_VERSION2
11484
+ });
11485
+ };
11486
+ }
11412
11487
  function normalizeParams(params) {
11413
11488
  return Object.fromEntries(Object.entries(params).filter(function(param) {
11414
11489
  var _param = _sliced_to_array(param, 2), value = _param[1];
@@ -11592,7 +11667,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
11592
11667
  }
11593
11668
  });
11594
11669
  }
11595
- var import_react_native42, import_react_native43, import_react_native46, import_react_native48, import_react_native49, import_react_native50, import_react_native51, import_react_native52, import_react_native53, EntryMessageExitedEvent, Module, AppsInTossModuleInstance, AppsInTossModule, nativeEventEmitter2, UpdateLocationEvent, INTERNAL__callbacks, INTERNAL__appBridgeHandler, UNSAFE__nativeEventEmitter, AppBridgeCallbackEvent, VisibilityChangedByTransparentServiceWebEvent, appsInTossEvent, SEMVER_REGEX, isWildcard, tryParse, coerceTypes, compareValues, parseVersion, compareSegments, compareVersions, ANDROID_GOOGLE_AD_MOB_SUPPORTED_VERSION, IOS_GOOGLE_AD_MOB_SUPPORTED_VERSION, UNSUPPORTED_ERROR_MESSAGE, ENVIRONMENT, IAP, Storage, GAME_CENTER_MIN_VERSION, GoogleAdMob, BedrockModule, BedrockCoreModule, TossCoreModule, INTERNAL__module;
11670
+ var import_react_native42, import_react_native43, import_react_native46, import_react_native48, import_react_native49, import_react_native50, import_react_native51, import_react_native52, import_react_native53, EntryMessageExitedEvent, Module, AppsInTossModuleInstance, AppsInTossModule, nativeEventEmitter2, UpdateLocationEvent, INTERNAL__callbacks, INTERNAL__appBridgeHandler, UNSAFE__nativeEventEmitter, AppBridgeCallbackEvent, VisibilityChangedByTransparentServiceWebEvent, appsInTossEvent, SEMVER_REGEX, isWildcard, tryParse, coerceTypes, compareValues, parseVersion, compareSegments, compareVersions, ANDROID_GOOGLE_AD_MOB_SUPPORTED_VERSION, IOS_GOOGLE_AD_MOB_SUPPORTED_VERSION, UNSUPPORTED_ERROR_MESSAGE, ENVIRONMENT, ANDROID_GOOGLE_AD_MOB_SUPPORTED_VERSION2, IOS_GOOGLE_AD_MOB_SUPPORTED_VERSION2, UNSUPPORTED_ERROR_MESSAGE2, ENVIRONMENT2, IAP, Storage, GAME_CENTER_MIN_VERSION, GoogleAdMob, BedrockModule, BedrockCoreModule, TossCoreModule, INTERNAL__module;
11596
11671
  var init_dist5 = __esm({
11597
11672
  "../../.yarn/__virtual__/@apps-in-toss-native-modules-virtual-86e9653158/1/apps-in-toss-packages/native-modules/dist/index.js"() {
11598
11673
  "use strict";
@@ -11617,6 +11692,7 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
11617
11692
  init_src3();
11618
11693
  import_react_native46 = __toESM(require_react_native(), 1);
11619
11694
  init_dist4();
11695
+ init_dist4();
11620
11696
  init_src3();
11621
11697
  import_react_native48 = __toESM(require_react_native(), 1);
11622
11698
  import_react_native49 = __toESM(require_react_native(), 1);
@@ -11906,6 +11982,12 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
11906
11982
  loadAdMobRewardedAd.isSupported = createIsSupported();
11907
11983
  showAdMobInterstitialAd.isSupported = createIsSupported();
11908
11984
  showAdMobRewardedAd.isSupported = createIsSupported();
11985
+ ANDROID_GOOGLE_AD_MOB_SUPPORTED_VERSION2 = "5.227.0";
11986
+ IOS_GOOGLE_AD_MOB_SUPPORTED_VERSION2 = "5.227.0";
11987
+ UNSUPPORTED_ERROR_MESSAGE2 = "This feature is not supported in the current environment";
11988
+ ENVIRONMENT2 = getOperationalEnvironment();
11989
+ loadAppsInTossAdMob.isSupported = createIsSupported2();
11990
+ showAppsInTossAdMob.isSupported = createIsSupported2();
11909
11991
  IAP = {
11910
11992
  createOneTimePurchaseOrder,
11911
11993
  getProductItemList
@@ -11924,7 +12006,9 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
11924
12006
  loadAdMobInterstitialAd,
11925
12007
  showAdMobInterstitialAd,
11926
12008
  loadAdMobRewardedAd,
11927
- showAdMobRewardedAd
12009
+ showAdMobRewardedAd,
12010
+ loadAppsInTossAdMob,
12011
+ showAppsInTossAdMob
11928
12012
  };
11929
12013
  BedrockModule = import_react_native48.NativeModules.BedrockModule;
11930
12014
  BedrockCoreModule = import_react_native52.NativeModules.BedrockCoreModule;
@@ -41836,7 +41920,10 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
41836
41920
  loadAdMobInterstitialAd: GoogleAdMob.loadAdMobInterstitialAd,
41837
41921
  showAdMobInterstitialAd: GoogleAdMob.showAdMobInterstitialAd,
41838
41922
  loadAdMobRewardedAd: GoogleAdMob.loadAdMobRewardedAd,
41839
- showAdMobRewardedAd: GoogleAdMob.showAdMobRewardedAd
41923
+ showAdMobRewardedAd: GoogleAdMob.showAdMobRewardedAd,
41924
+ /** AdMobV2 */
41925
+ loadAppsInTossAdMob: GoogleAdMob.loadAppsInTossAdMob,
41926
+ showAppsInTossAdMob: GoogleAdMob.showAppsInTossAdMob
41840
41927
  }),
41841
41928
  constantHandlerMap: _object_spread_props(_object_spread(_object_spread_props(_object_spread({}, constant_bridges_exports2, constant_bridges_exports), {
41842
41929
  getSafeAreaTop: function() {
@@ -41859,6 +41946,9 @@ var global=typeof globalThis!=='undefined'?globalThis:typeof global!=='undefined
41859
41946
  showAdMobInterstitialAd_isSupported: GoogleAdMob.showAdMobInterstitialAd.isSupported,
41860
41947
  loadAdMobRewardedAd_isSupported: GoogleAdMob.loadAdMobRewardedAd.isSupported,
41861
41948
  showAdMobRewardedAd_isSupported: GoogleAdMob.showAdMobRewardedAd.isSupported,
41949
+ /** AdMobV2 */
41950
+ loadAppsInTossAdMob_isSupported: GoogleAdMob.loadAppsInTossAdMob.isSupported,
41951
+ showAppsInTossAdMob_isSupported: GoogleAdMob.showAppsInTossAdMob.isSupported,
41862
41952
  /** env */
41863
41953
  getDeploymentId: env.getDeploymentId
41864
41954
  }),
@@ -0,0 +1,14 @@
1
+ [
2
+ {
3
+ "platform": "ios",
4
+ "totalModuleCount": 1623,
5
+ "duration": 1518.0213749999998,
6
+ "size": 1683786
7
+ },
8
+ {
9
+ "platform": "android",
10
+ "totalModuleCount": 1623,
11
+ "duration": 1512.6528339999995,
12
+ "size": 1682146
13
+ }
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": "1.0.1",
4
+ "version": "1.0.2",
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": "1.0.1",
91
- "@apps-in-toss/cli": "1.0.1",
92
- "@apps-in-toss/framework": "1.0.1",
93
- "@apps-in-toss/plugins": "1.0.1",
94
- "@apps-in-toss/web-analytics": "1.0.1",
95
- "@apps-in-toss/web-bridge": "1.0.1",
90
+ "@apps-in-toss/bridge-core": "1.0.2",
91
+ "@apps-in-toss/cli": "1.0.2",
92
+ "@apps-in-toss/framework": "1.0.2",
93
+ "@apps-in-toss/plugins": "1.0.2",
94
+ "@apps-in-toss/web-analytics": "1.0.2",
95
+ "@apps-in-toss/web-bridge": "1.0.2",
96
96
  "@babel/core": "7.23.9",
97
97
  "@granite-js/cli": "0.1.21",
98
98
  "@granite-js/mpack": "0.1.21",
@@ -104,5 +104,5 @@
104
104
  "publishConfig": {
105
105
  "access": "public"
106
106
  },
107
- "gitHead": "c117f889c8e029797ebff63000beef65c0597e6f"
107
+ "gitHead": "6bcca89699f84625d384052501b8ea0d28cabccc"
108
108
  }