@apps-in-toss/web-bridge 1.6.2 → 1.7.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/CHANGELOG.md +4 -0
- package/built/index.cjs +4 -264
- package/built/index.d.cts +3 -270
- package/built/index.d.ts +3 -270
- package/built/index.js +20 -280
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
package/built/index.cjs
CHANGED
|
@@ -377,12 +377,9 @@ var IAP = {
|
|
|
377
377
|
|
|
378
378
|
// src/getSafeAreaInsets.ts
|
|
379
379
|
var import_bridge_core4 = require("@apps-in-toss/bridge-core");
|
|
380
|
-
var
|
|
381
|
-
var getSafeAreaTop = (0, import_bridge_core4.createConstantBridge)("getSafeAreaTop");
|
|
382
|
-
var getSafeAreaLeft = (0, import_bridge_core4.createConstantBridge)("getSafeAreaLeft");
|
|
383
|
-
var getSafeAreaRight = (0, import_bridge_core4.createConstantBridge)("getSafeAreaRight");
|
|
380
|
+
var _getSafeAreaInsets = (0, import_bridge_core4.createConstantBridge)("getSafeAreaInsets");
|
|
384
381
|
function getSafeAreaInsets() {
|
|
385
|
-
return
|
|
382
|
+
return _getSafeAreaInsets();
|
|
386
383
|
}
|
|
387
384
|
|
|
388
385
|
// src/safeAreaInsets.ts
|
|
@@ -394,272 +391,15 @@ function subscribeSafeAreaInsets({ onEvent }) {
|
|
|
394
391
|
}
|
|
395
392
|
});
|
|
396
393
|
}
|
|
394
|
+
var _getSafeAreaInsets2 = (0, import_bridge_core5.createConstantBridge)("getSafeAreaInsets");
|
|
397
395
|
var SafeAreaInsets = {
|
|
398
|
-
get:
|
|
396
|
+
get: _getSafeAreaInsets2,
|
|
399
397
|
subscribe: subscribeSafeAreaInsets
|
|
400
398
|
};
|
|
401
399
|
|
|
402
400
|
// src/googleAdMob.ts
|
|
403
401
|
var import_bridge_core6 = require("@apps-in-toss/bridge-core");
|
|
404
402
|
var GoogleAdMob = {
|
|
405
|
-
/**
|
|
406
|
-
* @public
|
|
407
|
-
* @category 광고
|
|
408
|
-
* @name loadAdMobInterstitialAd
|
|
409
|
-
* @deprecated 이 함수는 더 이상 사용되지 않습니다. 대신 {@link GoogleAdMob.loadAppsInTossAdMob}를 사용해주세요.
|
|
410
|
-
*
|
|
411
|
-
* @example
|
|
412
|
-
* ### 뷰 진입 시 광고 불러오기 (loadAppsInTossAdMob로 변경 예제)
|
|
413
|
-
* ```tsx
|
|
414
|
-
* import { GoogleAdMob } from '@apps-in-toss/framework';
|
|
415
|
-
* import { useEffect } from 'react';
|
|
416
|
-
* import { View, Text } from 'react-native';
|
|
417
|
-
*
|
|
418
|
-
* const AD_GROUP_ID = '<AD_GROUP_ID>';
|
|
419
|
-
*
|
|
420
|
-
* function Page() {
|
|
421
|
-
* useEffect(() => {
|
|
422
|
-
* if (GoogleAdMob.loadAppsInTossAdMob.isSupported() !== true) {
|
|
423
|
-
* return;
|
|
424
|
-
* }
|
|
425
|
-
*
|
|
426
|
-
* const cleanup = GoogleAdMob.loadAppsInTossAdMob({
|
|
427
|
-
* options: {
|
|
428
|
-
* adGroupId: AD_GROUP_ID,
|
|
429
|
-
* },
|
|
430
|
-
* onEvent: (event) => {
|
|
431
|
-
* switch (event.type) {
|
|
432
|
-
* case 'loaded':
|
|
433
|
-
* console.log('광고 로드 성공', event.data);
|
|
434
|
-
* break;
|
|
435
|
-
* }
|
|
436
|
-
* },
|
|
437
|
-
* onError: (error) => {
|
|
438
|
-
* console.error('광고 불러오기 실패', error);
|
|
439
|
-
* },
|
|
440
|
-
* });
|
|
441
|
-
*
|
|
442
|
-
* return cleanup;
|
|
443
|
-
* }, []);
|
|
444
|
-
*
|
|
445
|
-
* return (
|
|
446
|
-
* <View>
|
|
447
|
-
* <Text>Page</Text>
|
|
448
|
-
* </View>
|
|
449
|
-
* );
|
|
450
|
-
* }
|
|
451
|
-
* ```
|
|
452
|
-
*/
|
|
453
|
-
loadAdMobInterstitialAd: Object.assign(
|
|
454
|
-
(0, import_bridge_core6.createEventBridge)("loadAdMobInterstitialAd"),
|
|
455
|
-
{
|
|
456
|
-
isSupported: (0, import_bridge_core6.createConstantBridge)("loadAdMobInterstitialAd_isSupported")
|
|
457
|
-
}
|
|
458
|
-
),
|
|
459
|
-
/**
|
|
460
|
-
* @public
|
|
461
|
-
* @category 광고
|
|
462
|
-
* @name showAdMobInterstitialAd
|
|
463
|
-
* @deprecated 이 함수는 더 이상 사용되지 않습니다. 대신 {@link GoogleAdMob.showAppsInTossAdMob}를 사용해주세요.
|
|
464
|
-
*
|
|
465
|
-
* @example
|
|
466
|
-
* ### 버튼 눌러 불러온 광고 보여주기 (showAppsInTossAdMob로 대체 사용)
|
|
467
|
-
* ```tsx
|
|
468
|
-
* import { GoogleAdMob } from '@apps-in-toss/framework';
|
|
469
|
-
* import { View, Text, Button } from 'react-native';
|
|
470
|
-
*
|
|
471
|
-
* const AD_GROUP_ID = '<AD_GROUP_ID>';
|
|
472
|
-
*
|
|
473
|
-
* function Page() {
|
|
474
|
-
* const handlePress = () => {
|
|
475
|
-
* if (GoogleAdMob.showAppsInTossAdMob.isSupported() !== true) {
|
|
476
|
-
* return;
|
|
477
|
-
* }
|
|
478
|
-
*
|
|
479
|
-
* GoogleAdMob.showAppsInTossAdMob({
|
|
480
|
-
* options: {
|
|
481
|
-
* adGroupId: AD_GROUP_ID,
|
|
482
|
-
* },
|
|
483
|
-
* onEvent: (event) => {
|
|
484
|
-
* switch (event.type) {
|
|
485
|
-
* case 'requested':
|
|
486
|
-
* console.log('광고 보여주기 요청 완료');
|
|
487
|
-
* break;
|
|
488
|
-
*
|
|
489
|
-
* case 'clicked':
|
|
490
|
-
* console.log('광고 클릭');
|
|
491
|
-
* break;
|
|
492
|
-
*
|
|
493
|
-
* case 'dismissed':
|
|
494
|
-
* console.log('광고 닫힘');
|
|
495
|
-
* navigation.navigate('/examples/google-admob-interstitial-ad-landing');
|
|
496
|
-
* break;
|
|
497
|
-
*
|
|
498
|
-
* case 'failedToShow':
|
|
499
|
-
* console.log('광고 보여주기 실패');
|
|
500
|
-
* break;
|
|
501
|
-
*
|
|
502
|
-
* case 'impression':
|
|
503
|
-
* console.log('광고 노출');
|
|
504
|
-
* break;
|
|
505
|
-
*
|
|
506
|
-
* case 'userEarnedReward':
|
|
507
|
-
* console.log('광고 보상 획득 unitType:', event.data.unitType);
|
|
508
|
-
* console.log('광고 보상 획득 unitAmount:', event.data.unitAmount);
|
|
509
|
-
* break;
|
|
510
|
-
*
|
|
511
|
-
* case 'show':
|
|
512
|
-
* console.log('광고 컨텐츠 보여졌음');
|
|
513
|
-
* break;
|
|
514
|
-
* }
|
|
515
|
-
* },
|
|
516
|
-
* onError: (error) => {
|
|
517
|
-
* console.error('광고 보여주기 실패', error);
|
|
518
|
-
* },
|
|
519
|
-
* });
|
|
520
|
-
* }
|
|
521
|
-
*
|
|
522
|
-
* return (
|
|
523
|
-
* <Button onPress={handlePress} title="광고 보기" />
|
|
524
|
-
* );
|
|
525
|
-
* }
|
|
526
|
-
* ```
|
|
527
|
-
*/
|
|
528
|
-
showAdMobInterstitialAd: Object.assign(
|
|
529
|
-
(0, import_bridge_core6.createEventBridge)("showAdMobInterstitialAd"),
|
|
530
|
-
{
|
|
531
|
-
isSupported: (0, import_bridge_core6.createConstantBridge)("showAdMobInterstitialAd_isSupported")
|
|
532
|
-
}
|
|
533
|
-
),
|
|
534
|
-
/**
|
|
535
|
-
* @public
|
|
536
|
-
* @category 광고
|
|
537
|
-
* @name loadAdMobRewardedAd
|
|
538
|
-
* @deprecated 이 함수는 더 이상 사용되지 않습니다. 대신 {@link GoogleAdMob.loadAppsInTossAdMob}를 사용해주세요.
|
|
539
|
-
*
|
|
540
|
-
* @example
|
|
541
|
-
* ### 뷰 진입 시 광고 불러오기 (loadAppsInTossAdMob로 변경 예제)
|
|
542
|
-
* ```tsx
|
|
543
|
-
* import { GoogleAdMob } from '@apps-in-toss/framework';
|
|
544
|
-
* import { useEffect } from 'react';
|
|
545
|
-
* import { View, Text } from 'react-native';
|
|
546
|
-
*
|
|
547
|
-
* const AD_GROUP_ID = '<AD_GROUP_ID>';
|
|
548
|
-
*
|
|
549
|
-
* function Page() {
|
|
550
|
-
* useEffect(() => {
|
|
551
|
-
* if (GoogleAdMob.loadAppsInTossAdMob.isSupported() !== true) {
|
|
552
|
-
* return;
|
|
553
|
-
* }
|
|
554
|
-
*
|
|
555
|
-
* const cleanup = GoogleAdMob.loadAppsInTossAdMob({
|
|
556
|
-
* options: {
|
|
557
|
-
* adGroupId: AD_GROUP_ID,
|
|
558
|
-
* },
|
|
559
|
-
* onEvent: (event) => {
|
|
560
|
-
* switch (event.type) {
|
|
561
|
-
* case 'loaded':
|
|
562
|
-
* console.log('광고 로드 성공', event.data);
|
|
563
|
-
* break;
|
|
564
|
-
* }
|
|
565
|
-
* },
|
|
566
|
-
* onError: (error) => {
|
|
567
|
-
* console.error('광고 불러오기 실패', error);
|
|
568
|
-
* },
|
|
569
|
-
* });
|
|
570
|
-
*
|
|
571
|
-
* return cleanup;
|
|
572
|
-
* }, []);
|
|
573
|
-
*
|
|
574
|
-
* return (
|
|
575
|
-
* <View>
|
|
576
|
-
* <Text>Page</Text>
|
|
577
|
-
* </View>
|
|
578
|
-
* );
|
|
579
|
-
* }
|
|
580
|
-
* ```
|
|
581
|
-
*/
|
|
582
|
-
loadAdMobRewardedAd: Object.assign(
|
|
583
|
-
(0, import_bridge_core6.createEventBridge)("loadAdMobRewardedAd"),
|
|
584
|
-
{
|
|
585
|
-
isSupported: (0, import_bridge_core6.createConstantBridge)("loadAdMobRewardedAd_isSupported")
|
|
586
|
-
}
|
|
587
|
-
),
|
|
588
|
-
/**
|
|
589
|
-
* @public
|
|
590
|
-
* @category 광고
|
|
591
|
-
* @name showAdMobRewardedAd
|
|
592
|
-
* @deprecated 이 함수는 더 이상 사용되지 않습니다. 대신 {@link GoogleAdMob.showAppsInTossAdMob}를 사용해주세요.
|
|
593
|
-
*
|
|
594
|
-
* @example
|
|
595
|
-
* ### 버튼 눌러 불러온 광고 보여주기 (showAppsInTossAdMob로 대체 사용)
|
|
596
|
-
* ```tsx
|
|
597
|
-
* import { GoogleAdMob } from '@apps-in-toss/framework';
|
|
598
|
-
* import { View, Text, Button } from 'react-native';
|
|
599
|
-
*
|
|
600
|
-
* const AD_GROUP_ID = '<AD_GROUP_ID>';
|
|
601
|
-
*
|
|
602
|
-
* function Page() {
|
|
603
|
-
* const handlePress = () => {
|
|
604
|
-
* if (GoogleAdMob.showAppsInTossAdMob.isSupported() !== true) {
|
|
605
|
-
* return;
|
|
606
|
-
* }
|
|
607
|
-
*
|
|
608
|
-
* GoogleAdMob.showAppsInTossAdMob({
|
|
609
|
-
* options: {
|
|
610
|
-
* adGroupId: AD_GROUP_ID,
|
|
611
|
-
* },
|
|
612
|
-
* onEvent: (event) => {
|
|
613
|
-
* switch (event.type) {
|
|
614
|
-
* case 'requested':
|
|
615
|
-
* console.log('광고 보여주기 요청 완료');
|
|
616
|
-
* break;
|
|
617
|
-
*
|
|
618
|
-
* case 'clicked':
|
|
619
|
-
* console.log('광고 클릭');
|
|
620
|
-
* break;
|
|
621
|
-
*
|
|
622
|
-
* case 'dismissed':
|
|
623
|
-
* console.log('광고 닫힘');
|
|
624
|
-
* navigation.navigate('/examples/google-admob-interstitial-ad-landing');
|
|
625
|
-
* break;
|
|
626
|
-
*
|
|
627
|
-
* case 'failedToShow':
|
|
628
|
-
* console.log('광고 보여주기 실패');
|
|
629
|
-
* break;
|
|
630
|
-
*
|
|
631
|
-
* case 'impression':
|
|
632
|
-
* console.log('광고 노출');
|
|
633
|
-
* break;
|
|
634
|
-
*
|
|
635
|
-
* case 'userEarnedReward':
|
|
636
|
-
* console.log('광고 보상 획득 unitType:', event.data.unitType);
|
|
637
|
-
* console.log('광고 보상 획득 unitAmount:', event.data.unitAmount);
|
|
638
|
-
* break;
|
|
639
|
-
*
|
|
640
|
-
* case 'show':
|
|
641
|
-
* console.log('광고 컨텐츠 보여졌음');
|
|
642
|
-
* break;
|
|
643
|
-
* }
|
|
644
|
-
* },
|
|
645
|
-
* onError: (error) => {
|
|
646
|
-
* console.error('광고 보여주기 실패', error);
|
|
647
|
-
* },
|
|
648
|
-
* });
|
|
649
|
-
* }
|
|
650
|
-
*
|
|
651
|
-
* return (
|
|
652
|
-
* <Button onPress={handlePress} title="광고 보기" />
|
|
653
|
-
* );
|
|
654
|
-
* }
|
|
655
|
-
* ```
|
|
656
|
-
*/
|
|
657
|
-
showAdMobRewardedAd: Object.assign(
|
|
658
|
-
(0, import_bridge_core6.createEventBridge)("showAdMobRewardedAd"),
|
|
659
|
-
{
|
|
660
|
-
isSupported: (0, import_bridge_core6.createConstantBridge)("showAdMobRewardedAd_isSupported")
|
|
661
|
-
}
|
|
662
|
-
),
|
|
663
403
|
/**
|
|
664
404
|
* @public
|
|
665
405
|
* @category 광고
|
package/built/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from './bridge';
|
|
2
2
|
export * from '@apps-in-toss/bridge-core';
|
|
3
|
-
import {
|
|
3
|
+
import { LoadAdMobEvent, LoadAdMobOptions, ShowAdMobEvent, ShowAdMobOptions, LoadFullScreenAdEvent, LoadFullScreenAdOptions, ShowFullScreenAdEvent, ShowFullScreenAdOptions } from '@apps-in-toss/framework';
|
|
4
4
|
import * as _apps_in_toss_types from '@apps-in-toss/types';
|
|
5
5
|
import { FetchAlbumPhotos, FetchContacts, GetCurrentLocation, OpenCamera, SetClipboardText, GetClipboardText, StartUpdateLocationEventParams } from '@apps-in-toss/types';
|
|
6
6
|
export * from '@apps-in-toss/types';
|
|
@@ -310,12 +310,7 @@ declare const IAP: {
|
|
|
310
310
|
*
|
|
311
311
|
* @deprecated 이 함수는 더 이상 사용되지 않습니다. 대신 {@link SafeAreaInsets.get}를 사용해주세요.
|
|
312
312
|
*/
|
|
313
|
-
declare function getSafeAreaInsets():
|
|
314
|
-
top: number;
|
|
315
|
-
bottom: number;
|
|
316
|
-
left: number;
|
|
317
|
-
right: number;
|
|
318
|
-
};
|
|
313
|
+
declare function getSafeAreaInsets(): number;
|
|
319
314
|
|
|
320
315
|
/**
|
|
321
316
|
* @public
|
|
@@ -351,273 +346,11 @@ interface SafeAreaInsets$1 {
|
|
|
351
346
|
right: number;
|
|
352
347
|
}
|
|
353
348
|
declare const SafeAreaInsets$1: {
|
|
354
|
-
get:
|
|
349
|
+
get: () => SafeAreaInsets$1;
|
|
355
350
|
subscribe: typeof subscribeSafeAreaInsets;
|
|
356
351
|
};
|
|
357
352
|
|
|
358
353
|
declare const GoogleAdMob: {
|
|
359
|
-
/**
|
|
360
|
-
* @public
|
|
361
|
-
* @category 광고
|
|
362
|
-
* @name loadAdMobInterstitialAd
|
|
363
|
-
* @deprecated 이 함수는 더 이상 사용되지 않습니다. 대신 {@link GoogleAdMob.loadAppsInTossAdMob}를 사용해주세요.
|
|
364
|
-
*
|
|
365
|
-
* @example
|
|
366
|
-
* ### 뷰 진입 시 광고 불러오기 (loadAppsInTossAdMob로 변경 예제)
|
|
367
|
-
* ```tsx
|
|
368
|
-
* import { GoogleAdMob } from '@apps-in-toss/framework';
|
|
369
|
-
* import { useEffect } from 'react';
|
|
370
|
-
* import { View, Text } from 'react-native';
|
|
371
|
-
*
|
|
372
|
-
* const AD_GROUP_ID = '<AD_GROUP_ID>';
|
|
373
|
-
*
|
|
374
|
-
* function Page() {
|
|
375
|
-
* useEffect(() => {
|
|
376
|
-
* if (GoogleAdMob.loadAppsInTossAdMob.isSupported() !== true) {
|
|
377
|
-
* return;
|
|
378
|
-
* }
|
|
379
|
-
*
|
|
380
|
-
* const cleanup = GoogleAdMob.loadAppsInTossAdMob({
|
|
381
|
-
* options: {
|
|
382
|
-
* adGroupId: AD_GROUP_ID,
|
|
383
|
-
* },
|
|
384
|
-
* onEvent: (event) => {
|
|
385
|
-
* switch (event.type) {
|
|
386
|
-
* case 'loaded':
|
|
387
|
-
* console.log('광고 로드 성공', event.data);
|
|
388
|
-
* break;
|
|
389
|
-
* }
|
|
390
|
-
* },
|
|
391
|
-
* onError: (error) => {
|
|
392
|
-
* console.error('광고 불러오기 실패', error);
|
|
393
|
-
* },
|
|
394
|
-
* });
|
|
395
|
-
*
|
|
396
|
-
* return cleanup;
|
|
397
|
-
* }, []);
|
|
398
|
-
*
|
|
399
|
-
* return (
|
|
400
|
-
* <View>
|
|
401
|
-
* <Text>Page</Text>
|
|
402
|
-
* </View>
|
|
403
|
-
* );
|
|
404
|
-
* }
|
|
405
|
-
* ```
|
|
406
|
-
*/
|
|
407
|
-
loadAdMobInterstitialAd: ((args: {
|
|
408
|
-
onEvent: (data: LoadAdMobInterstitialAdEvent) => void;
|
|
409
|
-
onError: (error: Error) => void;
|
|
410
|
-
options?: LoadAdMobInterstitialAdOptions | undefined;
|
|
411
|
-
}) => () => void) & {
|
|
412
|
-
isSupported: () => boolean;
|
|
413
|
-
};
|
|
414
|
-
/**
|
|
415
|
-
* @public
|
|
416
|
-
* @category 광고
|
|
417
|
-
* @name showAdMobInterstitialAd
|
|
418
|
-
* @deprecated 이 함수는 더 이상 사용되지 않습니다. 대신 {@link GoogleAdMob.showAppsInTossAdMob}를 사용해주세요.
|
|
419
|
-
*
|
|
420
|
-
* @example
|
|
421
|
-
* ### 버튼 눌러 불러온 광고 보여주기 (showAppsInTossAdMob로 대체 사용)
|
|
422
|
-
* ```tsx
|
|
423
|
-
* import { GoogleAdMob } from '@apps-in-toss/framework';
|
|
424
|
-
* import { View, Text, Button } from 'react-native';
|
|
425
|
-
*
|
|
426
|
-
* const AD_GROUP_ID = '<AD_GROUP_ID>';
|
|
427
|
-
*
|
|
428
|
-
* function Page() {
|
|
429
|
-
* const handlePress = () => {
|
|
430
|
-
* if (GoogleAdMob.showAppsInTossAdMob.isSupported() !== true) {
|
|
431
|
-
* return;
|
|
432
|
-
* }
|
|
433
|
-
*
|
|
434
|
-
* GoogleAdMob.showAppsInTossAdMob({
|
|
435
|
-
* options: {
|
|
436
|
-
* adGroupId: AD_GROUP_ID,
|
|
437
|
-
* },
|
|
438
|
-
* onEvent: (event) => {
|
|
439
|
-
* switch (event.type) {
|
|
440
|
-
* case 'requested':
|
|
441
|
-
* console.log('광고 보여주기 요청 완료');
|
|
442
|
-
* break;
|
|
443
|
-
*
|
|
444
|
-
* case 'clicked':
|
|
445
|
-
* console.log('광고 클릭');
|
|
446
|
-
* break;
|
|
447
|
-
*
|
|
448
|
-
* case 'dismissed':
|
|
449
|
-
* console.log('광고 닫힘');
|
|
450
|
-
* navigation.navigate('/examples/google-admob-interstitial-ad-landing');
|
|
451
|
-
* break;
|
|
452
|
-
*
|
|
453
|
-
* case 'failedToShow':
|
|
454
|
-
* console.log('광고 보여주기 실패');
|
|
455
|
-
* break;
|
|
456
|
-
*
|
|
457
|
-
* case 'impression':
|
|
458
|
-
* console.log('광고 노출');
|
|
459
|
-
* break;
|
|
460
|
-
*
|
|
461
|
-
* case 'userEarnedReward':
|
|
462
|
-
* console.log('광고 보상 획득 unitType:', event.data.unitType);
|
|
463
|
-
* console.log('광고 보상 획득 unitAmount:', event.data.unitAmount);
|
|
464
|
-
* break;
|
|
465
|
-
*
|
|
466
|
-
* case 'show':
|
|
467
|
-
* console.log('광고 컨텐츠 보여졌음');
|
|
468
|
-
* break;
|
|
469
|
-
* }
|
|
470
|
-
* },
|
|
471
|
-
* onError: (error) => {
|
|
472
|
-
* console.error('광고 보여주기 실패', error);
|
|
473
|
-
* },
|
|
474
|
-
* });
|
|
475
|
-
* }
|
|
476
|
-
*
|
|
477
|
-
* return (
|
|
478
|
-
* <Button onPress={handlePress} title="광고 보기" />
|
|
479
|
-
* );
|
|
480
|
-
* }
|
|
481
|
-
* ```
|
|
482
|
-
*/
|
|
483
|
-
showAdMobInterstitialAd: ((args: {
|
|
484
|
-
onEvent: (data: ShowAdMobInterstitialAdEvent) => void;
|
|
485
|
-
onError: (error: Error) => void;
|
|
486
|
-
options?: ShowAdMobInterstitialAdOptions | undefined;
|
|
487
|
-
}) => () => void) & {
|
|
488
|
-
isSupported: () => boolean;
|
|
489
|
-
};
|
|
490
|
-
/**
|
|
491
|
-
* @public
|
|
492
|
-
* @category 광고
|
|
493
|
-
* @name loadAdMobRewardedAd
|
|
494
|
-
* @deprecated 이 함수는 더 이상 사용되지 않습니다. 대신 {@link GoogleAdMob.loadAppsInTossAdMob}를 사용해주세요.
|
|
495
|
-
*
|
|
496
|
-
* @example
|
|
497
|
-
* ### 뷰 진입 시 광고 불러오기 (loadAppsInTossAdMob로 변경 예제)
|
|
498
|
-
* ```tsx
|
|
499
|
-
* import { GoogleAdMob } from '@apps-in-toss/framework';
|
|
500
|
-
* import { useEffect } from 'react';
|
|
501
|
-
* import { View, Text } from 'react-native';
|
|
502
|
-
*
|
|
503
|
-
* const AD_GROUP_ID = '<AD_GROUP_ID>';
|
|
504
|
-
*
|
|
505
|
-
* function Page() {
|
|
506
|
-
* useEffect(() => {
|
|
507
|
-
* if (GoogleAdMob.loadAppsInTossAdMob.isSupported() !== true) {
|
|
508
|
-
* return;
|
|
509
|
-
* }
|
|
510
|
-
*
|
|
511
|
-
* const cleanup = GoogleAdMob.loadAppsInTossAdMob({
|
|
512
|
-
* options: {
|
|
513
|
-
* adGroupId: AD_GROUP_ID,
|
|
514
|
-
* },
|
|
515
|
-
* onEvent: (event) => {
|
|
516
|
-
* switch (event.type) {
|
|
517
|
-
* case 'loaded':
|
|
518
|
-
* console.log('광고 로드 성공', event.data);
|
|
519
|
-
* break;
|
|
520
|
-
* }
|
|
521
|
-
* },
|
|
522
|
-
* onError: (error) => {
|
|
523
|
-
* console.error('광고 불러오기 실패', error);
|
|
524
|
-
* },
|
|
525
|
-
* });
|
|
526
|
-
*
|
|
527
|
-
* return cleanup;
|
|
528
|
-
* }, []);
|
|
529
|
-
*
|
|
530
|
-
* return (
|
|
531
|
-
* <View>
|
|
532
|
-
* <Text>Page</Text>
|
|
533
|
-
* </View>
|
|
534
|
-
* );
|
|
535
|
-
* }
|
|
536
|
-
* ```
|
|
537
|
-
*/
|
|
538
|
-
loadAdMobRewardedAd: ((args: {
|
|
539
|
-
onEvent: (data: LoadAdMobRewardedAdEvent) => void;
|
|
540
|
-
onError: (error: Error) => void;
|
|
541
|
-
options?: LoadAdMobRewardedAdOptions | undefined;
|
|
542
|
-
}) => () => void) & {
|
|
543
|
-
isSupported: () => boolean;
|
|
544
|
-
};
|
|
545
|
-
/**
|
|
546
|
-
* @public
|
|
547
|
-
* @category 광고
|
|
548
|
-
* @name showAdMobRewardedAd
|
|
549
|
-
* @deprecated 이 함수는 더 이상 사용되지 않습니다. 대신 {@link GoogleAdMob.showAppsInTossAdMob}를 사용해주세요.
|
|
550
|
-
*
|
|
551
|
-
* @example
|
|
552
|
-
* ### 버튼 눌러 불러온 광고 보여주기 (showAppsInTossAdMob로 대체 사용)
|
|
553
|
-
* ```tsx
|
|
554
|
-
* import { GoogleAdMob } from '@apps-in-toss/framework';
|
|
555
|
-
* import { View, Text, Button } from 'react-native';
|
|
556
|
-
*
|
|
557
|
-
* const AD_GROUP_ID = '<AD_GROUP_ID>';
|
|
558
|
-
*
|
|
559
|
-
* function Page() {
|
|
560
|
-
* const handlePress = () => {
|
|
561
|
-
* if (GoogleAdMob.showAppsInTossAdMob.isSupported() !== true) {
|
|
562
|
-
* return;
|
|
563
|
-
* }
|
|
564
|
-
*
|
|
565
|
-
* GoogleAdMob.showAppsInTossAdMob({
|
|
566
|
-
* options: {
|
|
567
|
-
* adGroupId: AD_GROUP_ID,
|
|
568
|
-
* },
|
|
569
|
-
* onEvent: (event) => {
|
|
570
|
-
* switch (event.type) {
|
|
571
|
-
* case 'requested':
|
|
572
|
-
* console.log('광고 보여주기 요청 완료');
|
|
573
|
-
* break;
|
|
574
|
-
*
|
|
575
|
-
* case 'clicked':
|
|
576
|
-
* console.log('광고 클릭');
|
|
577
|
-
* break;
|
|
578
|
-
*
|
|
579
|
-
* case 'dismissed':
|
|
580
|
-
* console.log('광고 닫힘');
|
|
581
|
-
* navigation.navigate('/examples/google-admob-interstitial-ad-landing');
|
|
582
|
-
* break;
|
|
583
|
-
*
|
|
584
|
-
* case 'failedToShow':
|
|
585
|
-
* console.log('광고 보여주기 실패');
|
|
586
|
-
* break;
|
|
587
|
-
*
|
|
588
|
-
* case 'impression':
|
|
589
|
-
* console.log('광고 노출');
|
|
590
|
-
* break;
|
|
591
|
-
*
|
|
592
|
-
* case 'userEarnedReward':
|
|
593
|
-
* console.log('광고 보상 획득 unitType:', event.data.unitType);
|
|
594
|
-
* console.log('광고 보상 획득 unitAmount:', event.data.unitAmount);
|
|
595
|
-
* break;
|
|
596
|
-
*
|
|
597
|
-
* case 'show':
|
|
598
|
-
* console.log('광고 컨텐츠 보여졌음');
|
|
599
|
-
* break;
|
|
600
|
-
* }
|
|
601
|
-
* },
|
|
602
|
-
* onError: (error) => {
|
|
603
|
-
* console.error('광고 보여주기 실패', error);
|
|
604
|
-
* },
|
|
605
|
-
* });
|
|
606
|
-
* }
|
|
607
|
-
*
|
|
608
|
-
* return (
|
|
609
|
-
* <Button onPress={handlePress} title="광고 보기" />
|
|
610
|
-
* );
|
|
611
|
-
* }
|
|
612
|
-
* ```
|
|
613
|
-
*/
|
|
614
|
-
showAdMobRewardedAd: ((args: {
|
|
615
|
-
onEvent: (data: ShowAdMobRewardedAdEvent) => void;
|
|
616
|
-
onError: (error: Error) => void;
|
|
617
|
-
options?: ShowAdMobRewardedAdOptions | undefined;
|
|
618
|
-
}) => () => void) & {
|
|
619
|
-
isSupported: () => boolean;
|
|
620
|
-
};
|
|
621
354
|
/**
|
|
622
355
|
* @public
|
|
623
356
|
* @category 광고
|
package/built/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from './bridge';
|
|
2
2
|
export * from '@apps-in-toss/bridge-core';
|
|
3
|
-
import {
|
|
3
|
+
import { LoadAdMobEvent, LoadAdMobOptions, ShowAdMobEvent, ShowAdMobOptions, LoadFullScreenAdEvent, LoadFullScreenAdOptions, ShowFullScreenAdEvent, ShowFullScreenAdOptions } from '@apps-in-toss/framework';
|
|
4
4
|
import * as _apps_in_toss_types from '@apps-in-toss/types';
|
|
5
5
|
import { FetchAlbumPhotos, FetchContacts, GetCurrentLocation, OpenCamera, SetClipboardText, GetClipboardText, StartUpdateLocationEventParams } from '@apps-in-toss/types';
|
|
6
6
|
export * from '@apps-in-toss/types';
|
|
@@ -310,12 +310,7 @@ declare const IAP: {
|
|
|
310
310
|
*
|
|
311
311
|
* @deprecated 이 함수는 더 이상 사용되지 않습니다. 대신 {@link SafeAreaInsets.get}를 사용해주세요.
|
|
312
312
|
*/
|
|
313
|
-
declare function getSafeAreaInsets():
|
|
314
|
-
top: number;
|
|
315
|
-
bottom: number;
|
|
316
|
-
left: number;
|
|
317
|
-
right: number;
|
|
318
|
-
};
|
|
313
|
+
declare function getSafeAreaInsets(): number;
|
|
319
314
|
|
|
320
315
|
/**
|
|
321
316
|
* @public
|
|
@@ -351,273 +346,11 @@ interface SafeAreaInsets$1 {
|
|
|
351
346
|
right: number;
|
|
352
347
|
}
|
|
353
348
|
declare const SafeAreaInsets$1: {
|
|
354
|
-
get:
|
|
349
|
+
get: () => SafeAreaInsets$1;
|
|
355
350
|
subscribe: typeof subscribeSafeAreaInsets;
|
|
356
351
|
};
|
|
357
352
|
|
|
358
353
|
declare const GoogleAdMob: {
|
|
359
|
-
/**
|
|
360
|
-
* @public
|
|
361
|
-
* @category 광고
|
|
362
|
-
* @name loadAdMobInterstitialAd
|
|
363
|
-
* @deprecated 이 함수는 더 이상 사용되지 않습니다. 대신 {@link GoogleAdMob.loadAppsInTossAdMob}를 사용해주세요.
|
|
364
|
-
*
|
|
365
|
-
* @example
|
|
366
|
-
* ### 뷰 진입 시 광고 불러오기 (loadAppsInTossAdMob로 변경 예제)
|
|
367
|
-
* ```tsx
|
|
368
|
-
* import { GoogleAdMob } from '@apps-in-toss/framework';
|
|
369
|
-
* import { useEffect } from 'react';
|
|
370
|
-
* import { View, Text } from 'react-native';
|
|
371
|
-
*
|
|
372
|
-
* const AD_GROUP_ID = '<AD_GROUP_ID>';
|
|
373
|
-
*
|
|
374
|
-
* function Page() {
|
|
375
|
-
* useEffect(() => {
|
|
376
|
-
* if (GoogleAdMob.loadAppsInTossAdMob.isSupported() !== true) {
|
|
377
|
-
* return;
|
|
378
|
-
* }
|
|
379
|
-
*
|
|
380
|
-
* const cleanup = GoogleAdMob.loadAppsInTossAdMob({
|
|
381
|
-
* options: {
|
|
382
|
-
* adGroupId: AD_GROUP_ID,
|
|
383
|
-
* },
|
|
384
|
-
* onEvent: (event) => {
|
|
385
|
-
* switch (event.type) {
|
|
386
|
-
* case 'loaded':
|
|
387
|
-
* console.log('광고 로드 성공', event.data);
|
|
388
|
-
* break;
|
|
389
|
-
* }
|
|
390
|
-
* },
|
|
391
|
-
* onError: (error) => {
|
|
392
|
-
* console.error('광고 불러오기 실패', error);
|
|
393
|
-
* },
|
|
394
|
-
* });
|
|
395
|
-
*
|
|
396
|
-
* return cleanup;
|
|
397
|
-
* }, []);
|
|
398
|
-
*
|
|
399
|
-
* return (
|
|
400
|
-
* <View>
|
|
401
|
-
* <Text>Page</Text>
|
|
402
|
-
* </View>
|
|
403
|
-
* );
|
|
404
|
-
* }
|
|
405
|
-
* ```
|
|
406
|
-
*/
|
|
407
|
-
loadAdMobInterstitialAd: ((args: {
|
|
408
|
-
onEvent: (data: LoadAdMobInterstitialAdEvent) => void;
|
|
409
|
-
onError: (error: Error) => void;
|
|
410
|
-
options?: LoadAdMobInterstitialAdOptions | undefined;
|
|
411
|
-
}) => () => void) & {
|
|
412
|
-
isSupported: () => boolean;
|
|
413
|
-
};
|
|
414
|
-
/**
|
|
415
|
-
* @public
|
|
416
|
-
* @category 광고
|
|
417
|
-
* @name showAdMobInterstitialAd
|
|
418
|
-
* @deprecated 이 함수는 더 이상 사용되지 않습니다. 대신 {@link GoogleAdMob.showAppsInTossAdMob}를 사용해주세요.
|
|
419
|
-
*
|
|
420
|
-
* @example
|
|
421
|
-
* ### 버튼 눌러 불러온 광고 보여주기 (showAppsInTossAdMob로 대체 사용)
|
|
422
|
-
* ```tsx
|
|
423
|
-
* import { GoogleAdMob } from '@apps-in-toss/framework';
|
|
424
|
-
* import { View, Text, Button } from 'react-native';
|
|
425
|
-
*
|
|
426
|
-
* const AD_GROUP_ID = '<AD_GROUP_ID>';
|
|
427
|
-
*
|
|
428
|
-
* function Page() {
|
|
429
|
-
* const handlePress = () => {
|
|
430
|
-
* if (GoogleAdMob.showAppsInTossAdMob.isSupported() !== true) {
|
|
431
|
-
* return;
|
|
432
|
-
* }
|
|
433
|
-
*
|
|
434
|
-
* GoogleAdMob.showAppsInTossAdMob({
|
|
435
|
-
* options: {
|
|
436
|
-
* adGroupId: AD_GROUP_ID,
|
|
437
|
-
* },
|
|
438
|
-
* onEvent: (event) => {
|
|
439
|
-
* switch (event.type) {
|
|
440
|
-
* case 'requested':
|
|
441
|
-
* console.log('광고 보여주기 요청 완료');
|
|
442
|
-
* break;
|
|
443
|
-
*
|
|
444
|
-
* case 'clicked':
|
|
445
|
-
* console.log('광고 클릭');
|
|
446
|
-
* break;
|
|
447
|
-
*
|
|
448
|
-
* case 'dismissed':
|
|
449
|
-
* console.log('광고 닫힘');
|
|
450
|
-
* navigation.navigate('/examples/google-admob-interstitial-ad-landing');
|
|
451
|
-
* break;
|
|
452
|
-
*
|
|
453
|
-
* case 'failedToShow':
|
|
454
|
-
* console.log('광고 보여주기 실패');
|
|
455
|
-
* break;
|
|
456
|
-
*
|
|
457
|
-
* case 'impression':
|
|
458
|
-
* console.log('광고 노출');
|
|
459
|
-
* break;
|
|
460
|
-
*
|
|
461
|
-
* case 'userEarnedReward':
|
|
462
|
-
* console.log('광고 보상 획득 unitType:', event.data.unitType);
|
|
463
|
-
* console.log('광고 보상 획득 unitAmount:', event.data.unitAmount);
|
|
464
|
-
* break;
|
|
465
|
-
*
|
|
466
|
-
* case 'show':
|
|
467
|
-
* console.log('광고 컨텐츠 보여졌음');
|
|
468
|
-
* break;
|
|
469
|
-
* }
|
|
470
|
-
* },
|
|
471
|
-
* onError: (error) => {
|
|
472
|
-
* console.error('광고 보여주기 실패', error);
|
|
473
|
-
* },
|
|
474
|
-
* });
|
|
475
|
-
* }
|
|
476
|
-
*
|
|
477
|
-
* return (
|
|
478
|
-
* <Button onPress={handlePress} title="광고 보기" />
|
|
479
|
-
* );
|
|
480
|
-
* }
|
|
481
|
-
* ```
|
|
482
|
-
*/
|
|
483
|
-
showAdMobInterstitialAd: ((args: {
|
|
484
|
-
onEvent: (data: ShowAdMobInterstitialAdEvent) => void;
|
|
485
|
-
onError: (error: Error) => void;
|
|
486
|
-
options?: ShowAdMobInterstitialAdOptions | undefined;
|
|
487
|
-
}) => () => void) & {
|
|
488
|
-
isSupported: () => boolean;
|
|
489
|
-
};
|
|
490
|
-
/**
|
|
491
|
-
* @public
|
|
492
|
-
* @category 광고
|
|
493
|
-
* @name loadAdMobRewardedAd
|
|
494
|
-
* @deprecated 이 함수는 더 이상 사용되지 않습니다. 대신 {@link GoogleAdMob.loadAppsInTossAdMob}를 사용해주세요.
|
|
495
|
-
*
|
|
496
|
-
* @example
|
|
497
|
-
* ### 뷰 진입 시 광고 불러오기 (loadAppsInTossAdMob로 변경 예제)
|
|
498
|
-
* ```tsx
|
|
499
|
-
* import { GoogleAdMob } from '@apps-in-toss/framework';
|
|
500
|
-
* import { useEffect } from 'react';
|
|
501
|
-
* import { View, Text } from 'react-native';
|
|
502
|
-
*
|
|
503
|
-
* const AD_GROUP_ID = '<AD_GROUP_ID>';
|
|
504
|
-
*
|
|
505
|
-
* function Page() {
|
|
506
|
-
* useEffect(() => {
|
|
507
|
-
* if (GoogleAdMob.loadAppsInTossAdMob.isSupported() !== true) {
|
|
508
|
-
* return;
|
|
509
|
-
* }
|
|
510
|
-
*
|
|
511
|
-
* const cleanup = GoogleAdMob.loadAppsInTossAdMob({
|
|
512
|
-
* options: {
|
|
513
|
-
* adGroupId: AD_GROUP_ID,
|
|
514
|
-
* },
|
|
515
|
-
* onEvent: (event) => {
|
|
516
|
-
* switch (event.type) {
|
|
517
|
-
* case 'loaded':
|
|
518
|
-
* console.log('광고 로드 성공', event.data);
|
|
519
|
-
* break;
|
|
520
|
-
* }
|
|
521
|
-
* },
|
|
522
|
-
* onError: (error) => {
|
|
523
|
-
* console.error('광고 불러오기 실패', error);
|
|
524
|
-
* },
|
|
525
|
-
* });
|
|
526
|
-
*
|
|
527
|
-
* return cleanup;
|
|
528
|
-
* }, []);
|
|
529
|
-
*
|
|
530
|
-
* return (
|
|
531
|
-
* <View>
|
|
532
|
-
* <Text>Page</Text>
|
|
533
|
-
* </View>
|
|
534
|
-
* );
|
|
535
|
-
* }
|
|
536
|
-
* ```
|
|
537
|
-
*/
|
|
538
|
-
loadAdMobRewardedAd: ((args: {
|
|
539
|
-
onEvent: (data: LoadAdMobRewardedAdEvent) => void;
|
|
540
|
-
onError: (error: Error) => void;
|
|
541
|
-
options?: LoadAdMobRewardedAdOptions | undefined;
|
|
542
|
-
}) => () => void) & {
|
|
543
|
-
isSupported: () => boolean;
|
|
544
|
-
};
|
|
545
|
-
/**
|
|
546
|
-
* @public
|
|
547
|
-
* @category 광고
|
|
548
|
-
* @name showAdMobRewardedAd
|
|
549
|
-
* @deprecated 이 함수는 더 이상 사용되지 않습니다. 대신 {@link GoogleAdMob.showAppsInTossAdMob}를 사용해주세요.
|
|
550
|
-
*
|
|
551
|
-
* @example
|
|
552
|
-
* ### 버튼 눌러 불러온 광고 보여주기 (showAppsInTossAdMob로 대체 사용)
|
|
553
|
-
* ```tsx
|
|
554
|
-
* import { GoogleAdMob } from '@apps-in-toss/framework';
|
|
555
|
-
* import { View, Text, Button } from 'react-native';
|
|
556
|
-
*
|
|
557
|
-
* const AD_GROUP_ID = '<AD_GROUP_ID>';
|
|
558
|
-
*
|
|
559
|
-
* function Page() {
|
|
560
|
-
* const handlePress = () => {
|
|
561
|
-
* if (GoogleAdMob.showAppsInTossAdMob.isSupported() !== true) {
|
|
562
|
-
* return;
|
|
563
|
-
* }
|
|
564
|
-
*
|
|
565
|
-
* GoogleAdMob.showAppsInTossAdMob({
|
|
566
|
-
* options: {
|
|
567
|
-
* adGroupId: AD_GROUP_ID,
|
|
568
|
-
* },
|
|
569
|
-
* onEvent: (event) => {
|
|
570
|
-
* switch (event.type) {
|
|
571
|
-
* case 'requested':
|
|
572
|
-
* console.log('광고 보여주기 요청 완료');
|
|
573
|
-
* break;
|
|
574
|
-
*
|
|
575
|
-
* case 'clicked':
|
|
576
|
-
* console.log('광고 클릭');
|
|
577
|
-
* break;
|
|
578
|
-
*
|
|
579
|
-
* case 'dismissed':
|
|
580
|
-
* console.log('광고 닫힘');
|
|
581
|
-
* navigation.navigate('/examples/google-admob-interstitial-ad-landing');
|
|
582
|
-
* break;
|
|
583
|
-
*
|
|
584
|
-
* case 'failedToShow':
|
|
585
|
-
* console.log('광고 보여주기 실패');
|
|
586
|
-
* break;
|
|
587
|
-
*
|
|
588
|
-
* case 'impression':
|
|
589
|
-
* console.log('광고 노출');
|
|
590
|
-
* break;
|
|
591
|
-
*
|
|
592
|
-
* case 'userEarnedReward':
|
|
593
|
-
* console.log('광고 보상 획득 unitType:', event.data.unitType);
|
|
594
|
-
* console.log('광고 보상 획득 unitAmount:', event.data.unitAmount);
|
|
595
|
-
* break;
|
|
596
|
-
*
|
|
597
|
-
* case 'show':
|
|
598
|
-
* console.log('광고 컨텐츠 보여졌음');
|
|
599
|
-
* break;
|
|
600
|
-
* }
|
|
601
|
-
* },
|
|
602
|
-
* onError: (error) => {
|
|
603
|
-
* console.error('광고 보여주기 실패', error);
|
|
604
|
-
* },
|
|
605
|
-
* });
|
|
606
|
-
* }
|
|
607
|
-
*
|
|
608
|
-
* return (
|
|
609
|
-
* <Button onPress={handlePress} title="광고 보기" />
|
|
610
|
-
* );
|
|
611
|
-
* }
|
|
612
|
-
* ```
|
|
613
|
-
*/
|
|
614
|
-
showAdMobRewardedAd: ((args: {
|
|
615
|
-
onEvent: (data: ShowAdMobRewardedAdEvent) => void;
|
|
616
|
-
onError: (error: Error) => void;
|
|
617
|
-
options?: ShowAdMobRewardedAdOptions | undefined;
|
|
618
|
-
}) => () => void) & {
|
|
619
|
-
isSupported: () => boolean;
|
|
620
|
-
};
|
|
621
354
|
/**
|
|
622
355
|
* @public
|
|
623
356
|
* @category 광고
|
package/built/index.js
CHANGED
|
@@ -332,16 +332,13 @@ var IAP = {
|
|
|
332
332
|
|
|
333
333
|
// src/getSafeAreaInsets.ts
|
|
334
334
|
import { createConstantBridge as createConstantBridge2 } from "@apps-in-toss/bridge-core";
|
|
335
|
-
var
|
|
336
|
-
var getSafeAreaTop = createConstantBridge2("getSafeAreaTop");
|
|
337
|
-
var getSafeAreaLeft = createConstantBridge2("getSafeAreaLeft");
|
|
338
|
-
var getSafeAreaRight = createConstantBridge2("getSafeAreaRight");
|
|
335
|
+
var _getSafeAreaInsets = createConstantBridge2("getSafeAreaInsets");
|
|
339
336
|
function getSafeAreaInsets() {
|
|
340
|
-
return
|
|
337
|
+
return _getSafeAreaInsets();
|
|
341
338
|
}
|
|
342
339
|
|
|
343
340
|
// src/safeAreaInsets.ts
|
|
344
|
-
import { createEventBridge as createEventBridge2 } from "@apps-in-toss/bridge-core";
|
|
341
|
+
import { createEventBridge as createEventBridge2, createConstantBridge as createConstantBridge3 } from "@apps-in-toss/bridge-core";
|
|
345
342
|
function subscribeSafeAreaInsets({ onEvent }) {
|
|
346
343
|
return createEventBridge2("safeAreaInsetsChange")({
|
|
347
344
|
onEvent,
|
|
@@ -349,272 +346,15 @@ function subscribeSafeAreaInsets({ onEvent }) {
|
|
|
349
346
|
}
|
|
350
347
|
});
|
|
351
348
|
}
|
|
349
|
+
var _getSafeAreaInsets2 = createConstantBridge3("getSafeAreaInsets");
|
|
352
350
|
var SafeAreaInsets = {
|
|
353
|
-
get:
|
|
351
|
+
get: _getSafeAreaInsets2,
|
|
354
352
|
subscribe: subscribeSafeAreaInsets
|
|
355
353
|
};
|
|
356
354
|
|
|
357
355
|
// src/googleAdMob.ts
|
|
358
|
-
import { createConstantBridge as
|
|
356
|
+
import { createConstantBridge as createConstantBridge4, createEventBridge as createEventBridge3 } from "@apps-in-toss/bridge-core";
|
|
359
357
|
var GoogleAdMob = {
|
|
360
|
-
/**
|
|
361
|
-
* @public
|
|
362
|
-
* @category 광고
|
|
363
|
-
* @name loadAdMobInterstitialAd
|
|
364
|
-
* @deprecated 이 함수는 더 이상 사용되지 않습니다. 대신 {@link GoogleAdMob.loadAppsInTossAdMob}를 사용해주세요.
|
|
365
|
-
*
|
|
366
|
-
* @example
|
|
367
|
-
* ### 뷰 진입 시 광고 불러오기 (loadAppsInTossAdMob로 변경 예제)
|
|
368
|
-
* ```tsx
|
|
369
|
-
* import { GoogleAdMob } from '@apps-in-toss/framework';
|
|
370
|
-
* import { useEffect } from 'react';
|
|
371
|
-
* import { View, Text } from 'react-native';
|
|
372
|
-
*
|
|
373
|
-
* const AD_GROUP_ID = '<AD_GROUP_ID>';
|
|
374
|
-
*
|
|
375
|
-
* function Page() {
|
|
376
|
-
* useEffect(() => {
|
|
377
|
-
* if (GoogleAdMob.loadAppsInTossAdMob.isSupported() !== true) {
|
|
378
|
-
* return;
|
|
379
|
-
* }
|
|
380
|
-
*
|
|
381
|
-
* const cleanup = GoogleAdMob.loadAppsInTossAdMob({
|
|
382
|
-
* options: {
|
|
383
|
-
* adGroupId: AD_GROUP_ID,
|
|
384
|
-
* },
|
|
385
|
-
* onEvent: (event) => {
|
|
386
|
-
* switch (event.type) {
|
|
387
|
-
* case 'loaded':
|
|
388
|
-
* console.log('광고 로드 성공', event.data);
|
|
389
|
-
* break;
|
|
390
|
-
* }
|
|
391
|
-
* },
|
|
392
|
-
* onError: (error) => {
|
|
393
|
-
* console.error('광고 불러오기 실패', error);
|
|
394
|
-
* },
|
|
395
|
-
* });
|
|
396
|
-
*
|
|
397
|
-
* return cleanup;
|
|
398
|
-
* }, []);
|
|
399
|
-
*
|
|
400
|
-
* return (
|
|
401
|
-
* <View>
|
|
402
|
-
* <Text>Page</Text>
|
|
403
|
-
* </View>
|
|
404
|
-
* );
|
|
405
|
-
* }
|
|
406
|
-
* ```
|
|
407
|
-
*/
|
|
408
|
-
loadAdMobInterstitialAd: Object.assign(
|
|
409
|
-
createEventBridge3("loadAdMobInterstitialAd"),
|
|
410
|
-
{
|
|
411
|
-
isSupported: createConstantBridge3("loadAdMobInterstitialAd_isSupported")
|
|
412
|
-
}
|
|
413
|
-
),
|
|
414
|
-
/**
|
|
415
|
-
* @public
|
|
416
|
-
* @category 광고
|
|
417
|
-
* @name showAdMobInterstitialAd
|
|
418
|
-
* @deprecated 이 함수는 더 이상 사용되지 않습니다. 대신 {@link GoogleAdMob.showAppsInTossAdMob}를 사용해주세요.
|
|
419
|
-
*
|
|
420
|
-
* @example
|
|
421
|
-
* ### 버튼 눌러 불러온 광고 보여주기 (showAppsInTossAdMob로 대체 사용)
|
|
422
|
-
* ```tsx
|
|
423
|
-
* import { GoogleAdMob } from '@apps-in-toss/framework';
|
|
424
|
-
* import { View, Text, Button } from 'react-native';
|
|
425
|
-
*
|
|
426
|
-
* const AD_GROUP_ID = '<AD_GROUP_ID>';
|
|
427
|
-
*
|
|
428
|
-
* function Page() {
|
|
429
|
-
* const handlePress = () => {
|
|
430
|
-
* if (GoogleAdMob.showAppsInTossAdMob.isSupported() !== true) {
|
|
431
|
-
* return;
|
|
432
|
-
* }
|
|
433
|
-
*
|
|
434
|
-
* GoogleAdMob.showAppsInTossAdMob({
|
|
435
|
-
* options: {
|
|
436
|
-
* adGroupId: AD_GROUP_ID,
|
|
437
|
-
* },
|
|
438
|
-
* onEvent: (event) => {
|
|
439
|
-
* switch (event.type) {
|
|
440
|
-
* case 'requested':
|
|
441
|
-
* console.log('광고 보여주기 요청 완료');
|
|
442
|
-
* break;
|
|
443
|
-
*
|
|
444
|
-
* case 'clicked':
|
|
445
|
-
* console.log('광고 클릭');
|
|
446
|
-
* break;
|
|
447
|
-
*
|
|
448
|
-
* case 'dismissed':
|
|
449
|
-
* console.log('광고 닫힘');
|
|
450
|
-
* navigation.navigate('/examples/google-admob-interstitial-ad-landing');
|
|
451
|
-
* break;
|
|
452
|
-
*
|
|
453
|
-
* case 'failedToShow':
|
|
454
|
-
* console.log('광고 보여주기 실패');
|
|
455
|
-
* break;
|
|
456
|
-
*
|
|
457
|
-
* case 'impression':
|
|
458
|
-
* console.log('광고 노출');
|
|
459
|
-
* break;
|
|
460
|
-
*
|
|
461
|
-
* case 'userEarnedReward':
|
|
462
|
-
* console.log('광고 보상 획득 unitType:', event.data.unitType);
|
|
463
|
-
* console.log('광고 보상 획득 unitAmount:', event.data.unitAmount);
|
|
464
|
-
* break;
|
|
465
|
-
*
|
|
466
|
-
* case 'show':
|
|
467
|
-
* console.log('광고 컨텐츠 보여졌음');
|
|
468
|
-
* break;
|
|
469
|
-
* }
|
|
470
|
-
* },
|
|
471
|
-
* onError: (error) => {
|
|
472
|
-
* console.error('광고 보여주기 실패', error);
|
|
473
|
-
* },
|
|
474
|
-
* });
|
|
475
|
-
* }
|
|
476
|
-
*
|
|
477
|
-
* return (
|
|
478
|
-
* <Button onPress={handlePress} title="광고 보기" />
|
|
479
|
-
* );
|
|
480
|
-
* }
|
|
481
|
-
* ```
|
|
482
|
-
*/
|
|
483
|
-
showAdMobInterstitialAd: Object.assign(
|
|
484
|
-
createEventBridge3("showAdMobInterstitialAd"),
|
|
485
|
-
{
|
|
486
|
-
isSupported: createConstantBridge3("showAdMobInterstitialAd_isSupported")
|
|
487
|
-
}
|
|
488
|
-
),
|
|
489
|
-
/**
|
|
490
|
-
* @public
|
|
491
|
-
* @category 광고
|
|
492
|
-
* @name loadAdMobRewardedAd
|
|
493
|
-
* @deprecated 이 함수는 더 이상 사용되지 않습니다. 대신 {@link GoogleAdMob.loadAppsInTossAdMob}를 사용해주세요.
|
|
494
|
-
*
|
|
495
|
-
* @example
|
|
496
|
-
* ### 뷰 진입 시 광고 불러오기 (loadAppsInTossAdMob로 변경 예제)
|
|
497
|
-
* ```tsx
|
|
498
|
-
* import { GoogleAdMob } from '@apps-in-toss/framework';
|
|
499
|
-
* import { useEffect } from 'react';
|
|
500
|
-
* import { View, Text } from 'react-native';
|
|
501
|
-
*
|
|
502
|
-
* const AD_GROUP_ID = '<AD_GROUP_ID>';
|
|
503
|
-
*
|
|
504
|
-
* function Page() {
|
|
505
|
-
* useEffect(() => {
|
|
506
|
-
* if (GoogleAdMob.loadAppsInTossAdMob.isSupported() !== true) {
|
|
507
|
-
* return;
|
|
508
|
-
* }
|
|
509
|
-
*
|
|
510
|
-
* const cleanup = GoogleAdMob.loadAppsInTossAdMob({
|
|
511
|
-
* options: {
|
|
512
|
-
* adGroupId: AD_GROUP_ID,
|
|
513
|
-
* },
|
|
514
|
-
* onEvent: (event) => {
|
|
515
|
-
* switch (event.type) {
|
|
516
|
-
* case 'loaded':
|
|
517
|
-
* console.log('광고 로드 성공', event.data);
|
|
518
|
-
* break;
|
|
519
|
-
* }
|
|
520
|
-
* },
|
|
521
|
-
* onError: (error) => {
|
|
522
|
-
* console.error('광고 불러오기 실패', error);
|
|
523
|
-
* },
|
|
524
|
-
* });
|
|
525
|
-
*
|
|
526
|
-
* return cleanup;
|
|
527
|
-
* }, []);
|
|
528
|
-
*
|
|
529
|
-
* return (
|
|
530
|
-
* <View>
|
|
531
|
-
* <Text>Page</Text>
|
|
532
|
-
* </View>
|
|
533
|
-
* );
|
|
534
|
-
* }
|
|
535
|
-
* ```
|
|
536
|
-
*/
|
|
537
|
-
loadAdMobRewardedAd: Object.assign(
|
|
538
|
-
createEventBridge3("loadAdMobRewardedAd"),
|
|
539
|
-
{
|
|
540
|
-
isSupported: createConstantBridge3("loadAdMobRewardedAd_isSupported")
|
|
541
|
-
}
|
|
542
|
-
),
|
|
543
|
-
/**
|
|
544
|
-
* @public
|
|
545
|
-
* @category 광고
|
|
546
|
-
* @name showAdMobRewardedAd
|
|
547
|
-
* @deprecated 이 함수는 더 이상 사용되지 않습니다. 대신 {@link GoogleAdMob.showAppsInTossAdMob}를 사용해주세요.
|
|
548
|
-
*
|
|
549
|
-
* @example
|
|
550
|
-
* ### 버튼 눌러 불러온 광고 보여주기 (showAppsInTossAdMob로 대체 사용)
|
|
551
|
-
* ```tsx
|
|
552
|
-
* import { GoogleAdMob } from '@apps-in-toss/framework';
|
|
553
|
-
* import { View, Text, Button } from 'react-native';
|
|
554
|
-
*
|
|
555
|
-
* const AD_GROUP_ID = '<AD_GROUP_ID>';
|
|
556
|
-
*
|
|
557
|
-
* function Page() {
|
|
558
|
-
* const handlePress = () => {
|
|
559
|
-
* if (GoogleAdMob.showAppsInTossAdMob.isSupported() !== true) {
|
|
560
|
-
* return;
|
|
561
|
-
* }
|
|
562
|
-
*
|
|
563
|
-
* GoogleAdMob.showAppsInTossAdMob({
|
|
564
|
-
* options: {
|
|
565
|
-
* adGroupId: AD_GROUP_ID,
|
|
566
|
-
* },
|
|
567
|
-
* onEvent: (event) => {
|
|
568
|
-
* switch (event.type) {
|
|
569
|
-
* case 'requested':
|
|
570
|
-
* console.log('광고 보여주기 요청 완료');
|
|
571
|
-
* break;
|
|
572
|
-
*
|
|
573
|
-
* case 'clicked':
|
|
574
|
-
* console.log('광고 클릭');
|
|
575
|
-
* break;
|
|
576
|
-
*
|
|
577
|
-
* case 'dismissed':
|
|
578
|
-
* console.log('광고 닫힘');
|
|
579
|
-
* navigation.navigate('/examples/google-admob-interstitial-ad-landing');
|
|
580
|
-
* break;
|
|
581
|
-
*
|
|
582
|
-
* case 'failedToShow':
|
|
583
|
-
* console.log('광고 보여주기 실패');
|
|
584
|
-
* break;
|
|
585
|
-
*
|
|
586
|
-
* case 'impression':
|
|
587
|
-
* console.log('광고 노출');
|
|
588
|
-
* break;
|
|
589
|
-
*
|
|
590
|
-
* case 'userEarnedReward':
|
|
591
|
-
* console.log('광고 보상 획득 unitType:', event.data.unitType);
|
|
592
|
-
* console.log('광고 보상 획득 unitAmount:', event.data.unitAmount);
|
|
593
|
-
* break;
|
|
594
|
-
*
|
|
595
|
-
* case 'show':
|
|
596
|
-
* console.log('광고 컨텐츠 보여졌음');
|
|
597
|
-
* break;
|
|
598
|
-
* }
|
|
599
|
-
* },
|
|
600
|
-
* onError: (error) => {
|
|
601
|
-
* console.error('광고 보여주기 실패', error);
|
|
602
|
-
* },
|
|
603
|
-
* });
|
|
604
|
-
* }
|
|
605
|
-
*
|
|
606
|
-
* return (
|
|
607
|
-
* <Button onPress={handlePress} title="광고 보기" />
|
|
608
|
-
* );
|
|
609
|
-
* }
|
|
610
|
-
* ```
|
|
611
|
-
*/
|
|
612
|
-
showAdMobRewardedAd: Object.assign(
|
|
613
|
-
createEventBridge3("showAdMobRewardedAd"),
|
|
614
|
-
{
|
|
615
|
-
isSupported: createConstantBridge3("showAdMobRewardedAd_isSupported")
|
|
616
|
-
}
|
|
617
|
-
),
|
|
618
358
|
/**
|
|
619
359
|
* @public
|
|
620
360
|
* @category 광고
|
|
@@ -670,7 +410,7 @@ var GoogleAdMob = {
|
|
|
670
410
|
* ```
|
|
671
411
|
*/
|
|
672
412
|
loadAppsInTossAdMob: Object.assign(createEventBridge3("loadAppsInTossAdMob"), {
|
|
673
|
-
isSupported:
|
|
413
|
+
isSupported: createConstantBridge4("loadAppsInTossAdMob_isSupported")
|
|
674
414
|
}),
|
|
675
415
|
/**
|
|
676
416
|
* @public
|
|
@@ -748,7 +488,7 @@ var GoogleAdMob = {
|
|
|
748
488
|
* ```
|
|
749
489
|
*/
|
|
750
490
|
showAppsInTossAdMob: Object.assign(createEventBridge3("showAppsInTossAdMob"), {
|
|
751
|
-
isSupported:
|
|
491
|
+
isSupported: createConstantBridge4("showAppsInTossAdMob_isSupported")
|
|
752
492
|
})
|
|
753
493
|
};
|
|
754
494
|
|
|
@@ -783,17 +523,17 @@ var appsInTossEvent = {
|
|
|
783
523
|
};
|
|
784
524
|
|
|
785
525
|
// src/env.ts
|
|
786
|
-
import { createConstantBridge as
|
|
526
|
+
import { createConstantBridge as createConstantBridge5 } from "@apps-in-toss/bridge-core";
|
|
787
527
|
var env = {
|
|
788
|
-
getDeploymentId:
|
|
528
|
+
getDeploymentId: createConstantBridge5("getDeploymentId")
|
|
789
529
|
};
|
|
790
530
|
|
|
791
531
|
// src/global.ts
|
|
792
|
-
import { createConstantBridge as
|
|
793
|
-
var deploymentId =
|
|
794
|
-
var brandDisplayName =
|
|
795
|
-
var brandIcon =
|
|
796
|
-
var brandPrimaryColor =
|
|
532
|
+
import { createConstantBridge as createConstantBridge6 } from "@apps-in-toss/bridge-core";
|
|
533
|
+
var deploymentId = createConstantBridge6("deploymentId");
|
|
534
|
+
var brandDisplayName = createConstantBridge6("brandDisplayName");
|
|
535
|
+
var brandIcon = createConstantBridge6("brandIcon");
|
|
536
|
+
var brandPrimaryColor = createConstantBridge6("brandPrimaryColor");
|
|
797
537
|
var getAppsInTossGlobals = () => {
|
|
798
538
|
return {
|
|
799
539
|
deploymentId: deploymentId(),
|
|
@@ -1021,22 +761,22 @@ startUpdateLocation.getPermission = () => getPermission2({ name: "geolocation",
|
|
|
1021
761
|
startUpdateLocation.openPermissionDialog = () => openPermissionDialog2({ name: "geolocation", access: "access" });
|
|
1022
762
|
|
|
1023
763
|
// src/integratedAd.ts
|
|
1024
|
-
import { createConstantBridge as
|
|
764
|
+
import { createConstantBridge as createConstantBridge7, createEventBridge as createEventBridge8 } from "@apps-in-toss/bridge-core";
|
|
1025
765
|
var loadFullScreenAd = Object.assign(
|
|
1026
766
|
createEventBridge8("loadFullScreenAd"),
|
|
1027
767
|
{
|
|
1028
|
-
isSupported:
|
|
768
|
+
isSupported: createConstantBridge7("loadFullScreenAd_isSupported")
|
|
1029
769
|
}
|
|
1030
770
|
);
|
|
1031
771
|
var showFullScreenAd = Object.assign(
|
|
1032
772
|
createEventBridge8("showFullScreenAd"),
|
|
1033
773
|
{
|
|
1034
|
-
isSupported:
|
|
774
|
+
isSupported: createConstantBridge7("showFullScreenAd_isSupported")
|
|
1035
775
|
}
|
|
1036
776
|
);
|
|
1037
777
|
|
|
1038
778
|
// src/toss-ad/index.ts
|
|
1039
|
-
import { createAsyncBridge as createAsyncBridge13, createConstantBridge as
|
|
779
|
+
import { createAsyncBridge as createAsyncBridge13, createConstantBridge as createConstantBridge8, createEventBridge as createEventBridge9 } from "@apps-in-toss/bridge-core";
|
|
1040
780
|
|
|
1041
781
|
// src/toss-ad/opener.ts
|
|
1042
782
|
import { createAsyncBridge as createAsyncBridge12 } from "@apps-in-toss/bridge-core";
|
|
@@ -1112,7 +852,7 @@ function loadAdsSdk() {
|
|
|
1112
852
|
|
|
1113
853
|
// src/toss-ad/index.ts
|
|
1114
854
|
var fetchTossAd = Object.assign(createEventBridge9("fetchTossAd"), {
|
|
1115
|
-
isSupported:
|
|
855
|
+
isSupported: createConstantBridge8("fetchTossAd_isSupported")
|
|
1116
856
|
});
|
|
1117
857
|
var tossAdEventLog = createAsyncBridge13("tossAdEventLog");
|
|
1118
858
|
var SUPPORTED_STYLE_IDS = /* @__PURE__ */ new Set(["1", "2"]);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@apps-in-toss/web-bridge",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.7.1",
|
|
5
5
|
"description": "Web Bridge for Apps In Toss",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"typecheck": "tsc --noEmit",
|
|
@@ -27,11 +27,11 @@
|
|
|
27
27
|
"built"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@apps-in-toss/types": "1.
|
|
30
|
+
"@apps-in-toss/types": "1.7.1"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@apps-in-toss/bridge-core": "1.
|
|
34
|
-
"@apps-in-toss/framework": "1.
|
|
33
|
+
"@apps-in-toss/bridge-core": "1.7.1",
|
|
34
|
+
"@apps-in-toss/framework": "1.7.1",
|
|
35
35
|
"@swc/core": "^1.12.7",
|
|
36
36
|
"picocolors": "^1.1.1",
|
|
37
37
|
"ts-morph": "^26.0.0",
|