@apps-in-toss/framework 1.1.3 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -5,7 +5,7 @@ import { Analytics as InternalAnalytics } from "@apps-in-toss/analytics";
5
5
  import { Analytics } from "@apps-in-toss/analytics";
6
6
  import { isMinVersionSupported as isMinVersionSupported2, setIosSwipeGestureEnabled, eventLog } from "@apps-in-toss/native-modules";
7
7
  import { Granite as Granite6 } from "@granite-js/react-native";
8
- import { TDSProvider } from "@toss-design-system/react-native";
8
+ import { TDSProvider } from "@toss/tds-react-native";
9
9
  import { AppRegistry } from "react-native";
10
10
 
11
11
  // src/core/components/AppEvent.tsx
@@ -151,7 +151,7 @@ function AppUpdate() {
151
151
 
152
152
  // src/core/hooks/useAppsInTossBridge.ts
153
153
  import { appsInTossEvent } from "@apps-in-toss/native-modules";
154
- import { useBridge } from "@toss-design-system/react-native";
154
+ import { useBridge } from "@toss/tds-react-native";
155
155
  import { useEffect as useEffect4 } from "react";
156
156
 
157
157
  // src/core/utils/getAppsInTossGlobals.ts
@@ -189,8 +189,8 @@ function useAppsInTossBridge() {
189
189
 
190
190
  // src/components/NavigationBar/RNNavigationBar.tsx
191
191
  import { closeView, useBackEventContext, useNavigation } from "@granite-js/react-native";
192
- import { useDialog as useDialog2 } from "@toss-design-system/react-native";
193
- import { NavigationBackButton, NavigationLeft, TopNavigation } from "@toss-design-system/react-native/private";
192
+ import { useDialog as useDialog3 } from "@toss/tds-react-native";
193
+ import { NavigationBackButton, NavigationLeft, TopNavigation } from "@toss/tds-react-native/private";
194
194
  import { josa } from "es-hangul";
195
195
  import { useCallback as useCallback3, useEffect as useEffect7 } from "react";
196
196
  import { BackHandler } from "react-native";
@@ -302,10 +302,17 @@ function NavigationBarImpressionArea({
302
302
  // src/core/hooks/useMoreButtonBottomSheet/index.tsx
303
303
  import { INTERNAL__appBridgeHandler, isMinVersionSupported } from "@apps-in-toss/native-modules";
304
304
  import { openURL as openURL3 } from "@granite-js/react-native";
305
- import { BottomSheet, List, ListHeader, ListRow } from "@toss-design-system/react-native";
306
- import { useAdaptive, useOverlay } from "@toss-design-system/react-native/private";
305
+ import { BottomSheet, List, ListHeader, ListRow as ListRow2 } from "@toss/tds-react-native";
306
+ import { useAdaptive as useAdaptive2, useOverlay } from "@toss/tds-react-native/private";
307
307
  import { useEffect as useEffect6, useState } from "react";
308
308
 
309
+ // src/core/hooks/useMoreButtonBottomSheet/AppShareListMenu.tsx
310
+ import { getOperationalEnvironment } from "@apps-in-toss/native-modules";
311
+ import { getSchemeUri as getSchemeUri4 } from "@granite-js/react-native";
312
+ import { ListRow, useDialog } from "@toss/tds-react-native";
313
+ import { useAdaptive } from "@toss/tds-react-native/private";
314
+ import { NativeModules } from "react-native";
315
+
309
316
  // src/core/hooks/useMoreButtonBottomSheet/useMoreButtonBottomSheetLogging.tsx
310
317
  import { INTERNAL__module as INTERNAL__module4 } from "@apps-in-toss/native-modules";
311
318
  import { Granite as Granite4 } from "@granite-js/react-native";
@@ -375,10 +382,77 @@ function useMoreButtonBottomSheetLogging() {
375
382
  };
376
383
  }
377
384
 
385
+ // src/core/utils/url.ts
386
+ function addParamsToUrl(url, params) {
387
+ const urlObj = new URL(url);
388
+ for (const [key, value] of Object.entries(params)) {
389
+ urlObj.searchParams.set(key, value);
390
+ }
391
+ return urlObj.toString();
392
+ }
393
+
394
+ // src/core/hooks/useMoreButtonBottomSheet/AppShareListMenu.tsx
395
+ import { jsx as jsx3 } from "react/jsx-runtime";
396
+ var SHARE_SCHEME_REFERRER = "appsintoss.common_module_share";
397
+ var APP_SHARE_MENU_INFO = {
398
+ contactItemName: "\uACF5\uC720\uD558\uAE30",
399
+ contactIconUrl: "https://static.toss.im/icons/png/4x/icon-share-dots-mono.png"
400
+ };
401
+ function AppShareListMenu() {
402
+ const globals = getAppsInTossGlobals();
403
+ const adaptive = useAdaptive();
404
+ const logging = useMoreButtonBottomSheetLogging();
405
+ const initialScheme = getSchemeUri4();
406
+ const isSandbox = getOperationalEnvironment() === "sandbox";
407
+ const { openConfirm } = useDialog();
408
+ const schemeForShare = addParamsToUrl(initialScheme, {
409
+ referrer: SHARE_SCHEME_REFERRER
410
+ });
411
+ return /* @__PURE__ */ jsx3(
412
+ ListRow,
413
+ {
414
+ left: /* @__PURE__ */ jsx3(
415
+ ListRow.Icon,
416
+ {
417
+ color: globals.brandPrimaryColor,
418
+ source: { uri: APP_SHARE_MENU_INFO.contactIconUrl },
419
+ type: "background"
420
+ }
421
+ ),
422
+ contents: /* @__PURE__ */ jsx3(
423
+ ListRow.Texts,
424
+ {
425
+ type: "1RowTypeA",
426
+ top: APP_SHARE_MENU_INFO.contactItemName,
427
+ topProps: { color: adaptive.grey700 }
428
+ }
429
+ ),
430
+ verticalPadding: "extraSmall",
431
+ onPress: () => {
432
+ if (isSandbox) {
433
+ openConfirm({
434
+ title: "\uACF5\uC720\uD558\uAE30 \uAE30\uB2A5 \uBBF8\uC9C0\uC6D0",
435
+ description: "\uC0CC\uB4DC\uBC15\uC2A4 \uD658\uACBD\uC5D0\uC11C\uB294 \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC5B4\uC694. \uCF58\uC194\uC744 \uD1B5\uD574 \uD1A0\uC2A4\uC571\uC5D0\uC11C \uD14C\uC2A4\uD2B8\uD574 \uC8FC\uC138\uC694.",
436
+ rightButton: "\uD655\uC778",
437
+ closeOnDimmerClick: true
438
+ });
439
+ return;
440
+ }
441
+ logging.menuClick({ title: APP_SHARE_MENU_INFO.contactItemName });
442
+ NativeModules.AppsInTossModule.shareWithScheme({
443
+ params: {
444
+ schemeURL: schemeForShare
445
+ }
446
+ });
447
+ }
448
+ }
449
+ );
450
+ }
451
+
378
452
  // src/hooks/useAppUpdateDialog.tsx
379
453
  import { INTERNAL__module as INTERNAL__module5 } from "@apps-in-toss/native-modules";
380
454
  import { Granite as Granite5, openURL as openURL2 } from "@granite-js/react-native";
381
- import { useDialog } from "@toss-design-system/react-native";
455
+ import { useDialog as useDialog2 } from "@toss/tds-react-native";
382
456
  import { useCallback as useCallback2 } from "react";
383
457
 
384
458
  // src/utils/market.ts
@@ -391,7 +465,7 @@ var getMarketLink = () => {
391
465
 
392
466
  // src/hooks/useAppUpdateDialog.tsx
393
467
  function useAppUpdateDialog() {
394
- const { openConfirm } = useDialog();
468
+ const { openConfirm } = useDialog2();
395
469
  const logging = useAppUpdateDialogLogging();
396
470
  const openAppUpdateDialog = useCallback2(
397
471
  async ({
@@ -478,22 +552,30 @@ function ensureValue(value, name) {
478
552
  }
479
553
 
480
554
  // src/core/hooks/useMoreButtonBottomSheet/index.tsx
481
- import { Fragment as Fragment3, jsx as jsx3 } from "react/jsx-runtime";
555
+ import { Fragment as Fragment3, jsx as jsx4, jsxs } from "react/jsx-runtime";
482
556
  var APP_BRIDGE_METHOD_NAME = "getMiniAppsSupportContact";
557
+ var MIN_VERSION = {
558
+ BOTTOM_SHEET: {
559
+ android: "5.226.0",
560
+ ios: "5.226.0"
561
+ },
562
+ SHARE_LIST_MENU: {
563
+ android: "5.230.0",
564
+ ios: "5.230.0"
565
+ }
566
+ };
483
567
  function useMoreButtonBottomSheet() {
484
568
  const globals = getAppsInTossGlobals();
485
- const adaptive = useAdaptive();
569
+ const adaptive = useAdaptive2();
486
570
  const [itemList, setItemList] = useState([]);
487
571
  const appUpdateDialog = useAppUpdateDialog();
488
572
  const logging = useMoreButtonBottomSheetLogging();
489
573
  const overlay = useOverlay();
490
574
  const title = ensureValue(globals.brandDisplayName, "displayName");
491
- const isSupported = isMinVersionSupported({
492
- android: "5.226.0",
493
- ios: "5.226.0"
494
- });
575
+ const isBottomSheetSupported = isMinVersionSupported(MIN_VERSION.BOTTOM_SHEET);
576
+ const isShareListMenuSupported = isMinVersionSupported(MIN_VERSION.SHARE_LIST_MENU);
495
577
  useEffect6(() => {
496
- if (!isSupported) {
578
+ if (!isBottomSheetSupported) {
497
579
  return;
498
580
  }
499
581
  INTERNAL__appBridgeHandler.invokeAppBridgeMethod(
@@ -504,10 +586,10 @@ function useMoreButtonBottomSheet() {
504
586
  onError: (error) => console.error("\uBA54\uB274 \uBAA9\uB85D\uC744 \uAC00\uC838\uC624\uB294 \uB370 \uC2E4\uD328\uD588\uC5B4\uC694:", error)
505
587
  }
506
588
  );
507
- }, [isSupported]);
589
+ }, [isBottomSheetSupported]);
508
590
  const onClickHandler = async () => {
509
591
  logging.open();
510
- if (!isSupported) {
592
+ if (!isBottomSheetSupported) {
511
593
  await appUpdateDialog.open({
512
594
  title: `\uC774 \uAE30\uB2A5\uC744 \uC4F0\uB824\uBA74 \uC571 \uC5C5\uB370\uC774\uD2B8\uAC00 \uD544\uC694\uD574\uC694`,
513
595
  description: `\uBB38\uC758, \uAD8C\uD55C \uC124\uC815, \uC2E0\uACE0 \uB4F1 \uAE30\uB2A5\uC744 \uC4F8 \uC218 \uC788\uC5B4\uC694`
@@ -519,17 +601,17 @@ function useMoreButtonBottomSheet() {
519
601
  logging.close();
520
602
  close();
521
603
  };
522
- return /* @__PURE__ */ jsx3(BottomSheetImpressionArea, { children: /* @__PURE__ */ jsx3(
604
+ return /* @__PURE__ */ jsx4(BottomSheetImpressionArea, { children: /* @__PURE__ */ jsx4(
523
605
  BottomSheet.Root,
524
606
  {
525
- header: /* @__PURE__ */ jsx3(
607
+ header: /* @__PURE__ */ jsx4(
526
608
  ListHeader,
527
609
  {
528
- title: /* @__PURE__ */ jsx3(ListHeader.TitleParagraph, { color: adaptive.grey800, fontWeight: "bold", typography: "t5", children: title })
610
+ title: /* @__PURE__ */ jsx4(ListHeader.TitleParagraph, { color: adaptive.grey800, fontWeight: "bold", typography: "t5", children: title })
529
611
  }
530
612
  ),
531
613
  open: isOpen,
532
- cta: /* @__PURE__ */ jsx3(
614
+ cta: /* @__PURE__ */ jsx4(
533
615
  BottomSheet.CTA,
534
616
  {
535
617
  size: "large",
@@ -543,35 +625,38 @@ function useMoreButtonBottomSheet() {
543
625
  ),
544
626
  onClose: handleClose,
545
627
  onExited: exit,
546
- children: /* @__PURE__ */ jsx3(List, { rowSeparator: "none", children: itemList.map((item) => {
547
- return /* @__PURE__ */ jsx3(
548
- ListRow,
549
- {
550
- left: /* @__PURE__ */ jsx3(
551
- ListRow.Icon,
552
- {
553
- color: globals.brandPrimaryColor,
554
- source: { uri: item.contactIconUrl },
555
- type: "background"
556
- }
557
- ),
558
- contents: /* @__PURE__ */ jsx3(
559
- ListRow.Texts,
560
- {
561
- type: "1RowTypeA",
562
- top: item.contactItemName,
563
- topProps: { color: adaptive.grey700 }
628
+ children: /* @__PURE__ */ jsxs(List, { rowSeparator: "none", children: [
629
+ itemList.map((item) => {
630
+ return /* @__PURE__ */ jsx4(
631
+ ListRow2,
632
+ {
633
+ left: /* @__PURE__ */ jsx4(
634
+ ListRow2.Icon,
635
+ {
636
+ color: globals.brandPrimaryColor,
637
+ source: { uri: item.contactIconUrl },
638
+ type: "background"
639
+ }
640
+ ),
641
+ contents: /* @__PURE__ */ jsx4(
642
+ ListRow2.Texts,
643
+ {
644
+ type: "1RowTypeA",
645
+ top: item.contactItemName,
646
+ topProps: { color: adaptive.grey700 }
647
+ }
648
+ ),
649
+ verticalPadding: "extraSmall",
650
+ onPress: () => {
651
+ logging.menuClick({ title: item.contactItemName });
652
+ openURL3(item.contactUri);
564
653
  }
565
- ),
566
- verticalPadding: "extraSmall",
567
- onPress: () => {
568
- logging.menuClick({ title: item.contactItemName });
569
- openURL3(item.contactUri);
570
- }
571
- },
572
- item.contactItemName
573
- );
574
- }) })
654
+ },
655
+ item.contactItemName
656
+ );
657
+ }),
658
+ isShareListMenuSupported && /* @__PURE__ */ jsx4(AppShareListMenu, {})
659
+ ] })
575
660
  }
576
661
  ) });
577
662
  });
@@ -583,7 +668,7 @@ function BottomSheetImpressionArea({ children }) {
583
668
  useEffect6(() => {
584
669
  logging.show();
585
670
  }, [logging]);
586
- return /* @__PURE__ */ jsx3(Fragment3, { children });
671
+ return /* @__PURE__ */ jsx4(Fragment3, { children });
587
672
  }
588
673
 
589
674
  // src/core/utils/safeParseNavigationBar.ts
@@ -599,12 +684,12 @@ function safeParseNavigationBar(navigationBar) {
599
684
  }
600
685
 
601
686
  // src/components/NavigationBar/RNNavigationBar.tsx
602
- import { jsx as jsx4 } from "react/jsx-runtime";
687
+ import { jsx as jsx5 } from "react/jsx-runtime";
603
688
  function RNNavigationBar() {
604
689
  const globals = getAppsInTossGlobals();
605
690
  const { captureExitLog } = useCaptureExitLog();
606
691
  const logging = useNavigationBarLogging();
607
- const { openConfirm } = useDialog2();
692
+ const { openConfirm } = useDialog3();
608
693
  const { open: openMoreButtonBottomSheet } = useMoreButtonBottomSheet();
609
694
  const parsedNavigationBar = globals.navigationBar != null ? safeParseNavigationBar(globals.navigationBar) : null;
610
695
  const withHomeButton = parsedNavigationBar?.withHomeButton ?? false;
@@ -649,7 +734,7 @@ function RNNavigationBar() {
649
734
  BackHandler.removeEventListener("hardwareBackPress", handleAndroidBackEvent);
650
735
  };
651
736
  }, [handleBack]);
652
- return /* @__PURE__ */ jsx4(NavigationBarImpressionArea, { withHomeButton, children: /* @__PURE__ */ jsx4(
737
+ return /* @__PURE__ */ jsx5(NavigationBarImpressionArea, { withHomeButton, children: /* @__PURE__ */ jsx5(
653
738
  TopNavigation,
654
739
  {
655
740
  title: globals.brandDisplayName,
@@ -664,7 +749,7 @@ function RNNavigationBar() {
664
749
  icon: initialAccessoryButton.icon,
665
750
  id: initialAccessoryButton.id
666
751
  } : void 0,
667
- children: /* @__PURE__ */ jsx4(NavigationLeft, { visible: withBackButton, children: /* @__PURE__ */ jsx4(NavigationBackButton, { onPress: handleBack, canGoBack: false }) })
752
+ children: /* @__PURE__ */ jsx5(NavigationLeft, { visible: withBackButton, children: /* @__PURE__ */ jsx5(NavigationBackButton, { onPress: handleBack, canGoBack: false }) })
668
753
  }
669
754
  ) });
670
755
  }
@@ -682,28 +767,28 @@ function useBackOrCloseNavigation() {
682
767
  }
683
768
 
684
769
  // src/core/registerApp.tsx
685
- import { Fragment as Fragment4, jsx as jsx5, jsxs } from "react/jsx-runtime";
770
+ import { Fragment as Fragment4, jsx as jsx6, jsxs as jsxs2 } from "react/jsx-runtime";
686
771
  function AppsInTossContainer(Container, { children, ...initialProps }) {
687
772
  if (!isMinVersionSupported2({
688
773
  android: "5.220.0",
689
774
  ios: "5.221.0"
690
775
  })) {
691
- return /* @__PURE__ */ jsxs(Fragment4, { children: [
692
- /* @__PURE__ */ jsx5(AppEvent.Entry, {}),
693
- /* @__PURE__ */ jsx5(AppEvent.System, { ...initialProps }),
694
- /* @__PURE__ */ jsx5(AppUpdate, {})
776
+ return /* @__PURE__ */ jsxs2(Fragment4, { children: [
777
+ /* @__PURE__ */ jsx6(AppEvent.Entry, {}),
778
+ /* @__PURE__ */ jsx6(AppEvent.System, { ...initialProps }),
779
+ /* @__PURE__ */ jsx6(AppUpdate, {})
695
780
  ] });
696
781
  }
697
- return /* @__PURE__ */ jsxs(Fragment4, { children: [
698
- /* @__PURE__ */ jsx5(AppEvent.StayTime, {}),
699
- /* @__PURE__ */ jsx5(AppEvent.Entry, {}),
700
- /* @__PURE__ */ jsx5(AppEvent.System, { ...initialProps }),
701
- /* @__PURE__ */ jsx5(Container, { ...initialProps, children: /* @__PURE__ */ jsx5(TDSProvider, { colorPreference: "light", token: { color: { primary: getAppsInTossGlobals().brandPrimaryColor } }, children: /* @__PURE__ */ jsx5(TDSContainer, { ...initialProps, children }) }) })
782
+ return /* @__PURE__ */ jsxs2(Fragment4, { children: [
783
+ /* @__PURE__ */ jsx6(AppEvent.StayTime, {}),
784
+ /* @__PURE__ */ jsx6(AppEvent.Entry, {}),
785
+ /* @__PURE__ */ jsx6(AppEvent.System, { ...initialProps }),
786
+ /* @__PURE__ */ jsx6(Container, { ...initialProps, children: /* @__PURE__ */ jsx6(TDSProvider, { colorPreference: "light", token: { color: { primary: getAppsInTossGlobals().brandPrimaryColor } }, children: /* @__PURE__ */ jsx6(TDSContainer, { ...initialProps, children }) }) })
702
787
  ] });
703
788
  }
704
789
  function TDSContainer({ children }) {
705
790
  useAppsInTossBridge();
706
- return /* @__PURE__ */ jsx5(Fragment4, { children });
791
+ return /* @__PURE__ */ jsx6(Fragment4, { children });
707
792
  }
708
793
  function registerApp(container, { context, analytics }) {
709
794
  const appName = getAppName();
@@ -730,8 +815,8 @@ function registerApp(container, { context, analytics }) {
730
815
  }
731
816
  function AppsInTossScreenContainer({ children }) {
732
817
  const isReactNativeService = getAppsInTossGlobals().webViewType == null;
733
- return /* @__PURE__ */ jsxs(Analytics.Screen, { children: [
734
- isReactNativeService && /* @__PURE__ */ jsx5(RNNavigationBar, {}),
818
+ return /* @__PURE__ */ jsxs2(Analytics.Screen, { children: [
819
+ isReactNativeService && /* @__PURE__ */ jsx6(RNNavigationBar, {}),
735
820
  children
736
821
  ] });
737
822
  }
@@ -763,16 +848,14 @@ import {
763
848
  import * as appsInTossAsyncBridges from "@apps-in-toss/native-modules/async-bridges";
764
849
  import * as appsInTossConstantBridges from "@apps-in-toss/native-modules/constant-bridges";
765
850
  import * as appsInTossEventBridges from "@apps-in-toss/native-modules/event-bridges";
766
- import { getSchemeUri as getSchemeUri5, useGraniteEvent } from "@granite-js/react-native";
767
- import * as graniteAsyncBridges from "@granite-js/react-native/async-bridges";
768
- import * as graniteConstantBridges from "@granite-js/react-native/constant-bridges";
769
- import { ExternalWebViewScreen, tdsEvent } from "@toss-design-system/react-native";
770
- import { useSafeAreaBottom, useSafeAreaTop as useSafeAreaTop2, useTopNavigation } from "@toss-design-system/react-native/private";
851
+ import { getSchemeUri as getSchemeUri6, useGraniteEvent } from "@granite-js/react-native";
852
+ import { ExternalWebViewScreen, tdsEvent } from "@toss/tds-react-native";
853
+ import { useSafeAreaBottom, useSafeAreaTop as useSafeAreaTop2, useTopNavigation } from "@toss/tds-react-native/private";
771
854
  import { useMemo as useMemo4, useState as useState5 } from "react";
772
855
  import { Platform as Platform4 } from "react-native";
773
856
 
774
857
  // src/components/GameWebView.tsx
775
- import { setIosSwipeGestureEnabled as setIosSwipeGestureEnabled2, appsInTossEvent as appsInTossEvent2, getOperationalEnvironment } from "@apps-in-toss/native-modules";
858
+ import { setIosSwipeGestureEnabled as setIosSwipeGestureEnabled2, appsInTossEvent as appsInTossEvent2, getOperationalEnvironment as getOperationalEnvironment2 } from "@apps-in-toss/native-modules";
776
859
  import {
777
860
  WebView as PlainWebView
778
861
  } from "@granite-js/native/react-native-webview";
@@ -781,7 +864,7 @@ import { Platform as Platform3 } from "react-native";
781
864
 
782
865
  // src/components/GameProfile.tsx
783
866
  import { getGameCenterGameProfile as getGameCenterGameProfile2, isMinVersionSupported as isMinVersionSupported3 } from "@apps-in-toss/native-modules";
784
- import { Loader } from "@toss-design-system/react-native";
867
+ import { Loader } from "@toss/tds-react-native";
785
868
  import { useEffect as useEffect8 } from "react";
786
869
  import { Pressable, View } from "react-native";
787
870
 
@@ -795,20 +878,20 @@ var GAME_CENTER_MIN_VERSION = {
795
878
  // src/hooks/useGameCenterProfile.ts
796
879
  import { getGameCenterGameProfile } from "@apps-in-toss/native-modules";
797
880
  import { closeView as closeView2, openURL as openURL5 } from "@granite-js/react-native";
798
- import { useDialog as useDialog3 } from "@toss-design-system/react-native";
881
+ import { useDialog as useDialog4 } from "@toss/tds-react-native";
799
882
  import { josa as josa2 } from "es-hangul";
800
883
  import { useCallback as useCallback4, useRef as useRef3, useState as useState2 } from "react";
801
884
 
802
885
  // src/components/GameProfileToast.tsx
803
- import { Asset, Toast } from "@toss-design-system/react-native";
804
- import { AdaptiveColorProvider, ColorPreferenceProvider, useOverlay as useOverlay2 } from "@toss-design-system/react-native/private";
805
- import { jsx as jsx6 } from "react/jsx-runtime";
886
+ import { Asset, Toast } from "@toss/tds-react-native";
887
+ import { AdaptiveColorProvider, ColorPreferenceProvider, useOverlay as useOverlay2 } from "@toss/tds-react-native/private";
888
+ import { jsx as jsx7 } from "react/jsx-runtime";
806
889
  var useGameProfileToast = () => {
807
890
  const overlay = useOverlay2();
808
891
  const openGameProfileToast = (nickname, profileImageUri) => {
809
892
  return new Promise((resolve) => {
810
893
  overlay.open(({ isOpen, close, exit }) => {
811
- return /* @__PURE__ */ jsx6(ColorPreferenceProvider, { colorPreference: "dark", children: /* @__PURE__ */ jsx6(AdaptiveColorProvider, { children: /* @__PURE__ */ jsx6(
894
+ return /* @__PURE__ */ jsx7(ColorPreferenceProvider, { colorPreference: "dark", children: /* @__PURE__ */ jsx7(AdaptiveColorProvider, { children: /* @__PURE__ */ jsx7(
812
895
  Toast,
813
896
  {
814
897
  open: isOpen,
@@ -819,7 +902,7 @@ var useGameProfileToast = () => {
819
902
  onExited: exit,
820
903
  position: "top",
821
904
  text: `${nickname}\uB2D8 \uBC18\uAC00\uC6CC\uC694!`,
822
- icon: /* @__PURE__ */ jsx6(
905
+ icon: /* @__PURE__ */ jsx7(
823
906
  Asset.Image,
824
907
  {
825
908
  style: { borderRadius: 64, overflow: "hidden" },
@@ -889,7 +972,7 @@ var useGameCenterProfile = (isReadyForProfileUI) => {
889
972
  const canShowBottomSheetOrToast = !isProfileDataLoading && isReadyForProfileUI;
890
973
  const [isWebviewLoading, setIsWebviewLoading] = useState2(false);
891
974
  const isCompletedProfileFlow = useRef3(false);
892
- const { openAlert, openConfirm } = useDialog3();
975
+ const { openAlert, openConfirm } = useDialog4();
893
976
  const { openGameProfileToast } = useGameProfileToast();
894
977
  const openErrorAlert = useCallback4(async () => {
895
978
  await openAlert({
@@ -974,7 +1057,7 @@ var Z_INDEX = {
974
1057
  };
975
1058
 
976
1059
  // src/components/GameProfile.tsx
977
- import { Fragment as Fragment5, jsx as jsx7, jsxs as jsxs2 } from "react/jsx-runtime";
1060
+ import { Fragment as Fragment5, jsx as jsx8, jsxs as jsxs3 } from "react/jsx-runtime";
978
1061
  var GameProfile = ({ children, isReadyForProfileUI }) => {
979
1062
  const {
980
1063
  profileData,
@@ -1034,9 +1117,9 @@ var GameProfile = ({ children, isReadyForProfileUI }) => {
1034
1117
  updateAppToSupportedMinVersion
1035
1118
  ]);
1036
1119
  if (!isMinVersionSupported3(GAME_CENTER_MIN_VERSION)) {
1037
- return /* @__PURE__ */ jsxs2(Fragment5, { children: [
1038
- /* @__PURE__ */ jsx7(View, { style: { flex: 1, position: "relative" }, children }),
1039
- /* @__PURE__ */ jsx7(
1120
+ return /* @__PURE__ */ jsxs3(Fragment5, { children: [
1121
+ /* @__PURE__ */ jsx8(View, { style: { flex: 1, position: "relative" }, children }),
1122
+ /* @__PURE__ */ jsx8(
1040
1123
  Pressable,
1041
1124
  {
1042
1125
  style: {
@@ -1050,9 +1133,9 @@ var GameProfile = ({ children, isReadyForProfileUI }) => {
1050
1133
  ] });
1051
1134
  }
1052
1135
  if (shouldShowLoadingOverlay || isProfileDataRefetching) {
1053
- return /* @__PURE__ */ jsxs2(Fragment5, { children: [
1054
- /* @__PURE__ */ jsx7(View, { style: { flex: 1, position: "relative" }, children }),
1055
- /* @__PURE__ */ jsx7(
1136
+ return /* @__PURE__ */ jsxs3(Fragment5, { children: [
1137
+ /* @__PURE__ */ jsx8(View, { style: { flex: 1, position: "relative" }, children }),
1138
+ /* @__PURE__ */ jsx8(
1056
1139
  View,
1057
1140
  {
1058
1141
  style: {
@@ -1061,15 +1144,15 @@ var GameProfile = ({ children, isReadyForProfileUI }) => {
1061
1144
  alignItems: "center",
1062
1145
  backgroundColor: "rgba(0, 0, 0, 0.2)"
1063
1146
  },
1064
- children: /* @__PURE__ */ jsx7(Loader, { size: "large", type: "light" })
1147
+ children: /* @__PURE__ */ jsx8(Loader, { size: "large", type: "light" })
1065
1148
  }
1066
1149
  )
1067
1150
  ] });
1068
1151
  }
1069
1152
  if (shouldShowProfileNotFoundOverlay) {
1070
- return /* @__PURE__ */ jsxs2(Fragment5, { children: [
1071
- /* @__PURE__ */ jsx7(View, { style: { flex: 1, position: "relative" }, children }),
1072
- shouldShowProfileNotFoundOverlay && /* @__PURE__ */ jsx7(
1153
+ return /* @__PURE__ */ jsxs3(Fragment5, { children: [
1154
+ /* @__PURE__ */ jsx8(View, { style: { flex: 1, position: "relative" }, children }),
1155
+ shouldShowProfileNotFoundOverlay && /* @__PURE__ */ jsx8(
1073
1156
  Pressable,
1074
1157
  {
1075
1158
  style: {
@@ -1082,7 +1165,7 @@ var GameProfile = ({ children, isReadyForProfileUI }) => {
1082
1165
  )
1083
1166
  ] });
1084
1167
  }
1085
- return /* @__PURE__ */ jsx7(Fragment5, { children: /* @__PURE__ */ jsx7(View, { style: { flex: 1, position: "relative" }, children }) });
1168
+ return /* @__PURE__ */ jsx8(Fragment5, { children: /* @__PURE__ */ jsx8(View, { style: { flex: 1, position: "relative" }, children }) });
1086
1169
  };
1087
1170
  var overlayStyle = {
1088
1171
  position: "absolute",
@@ -1095,15 +1178,15 @@ var overlayStyle = {
1095
1178
 
1096
1179
  // src/components/NavigationBar/GameWebviewNavigationBar.tsx
1097
1180
  import { closeView as closeView3 } from "@granite-js/react-native";
1098
- import { PageNavbar, useDialog as useDialog4 } from "@toss-design-system/react-native";
1099
- import { NavigationRightContent, useSafeAreaTop } from "@toss-design-system/react-native/private";
1181
+ import { PageNavbar, useDialog as useDialog5 } from "@toss/tds-react-native";
1182
+ import { NavigationRightContent, useSafeAreaTop } from "@toss/tds-react-native/private";
1100
1183
  import { josa as josa3 } from "es-hangul";
1101
1184
  import { useCallback as useCallback5, useEffect as useEffect9 } from "react";
1102
1185
  import { BackHandler as BackHandler2, Platform as Platform2, View as View2 } from "react-native";
1103
- import { Fragment as Fragment6, jsx as jsx8, jsxs as jsxs3 } from "react/jsx-runtime";
1186
+ import { Fragment as Fragment6, jsx as jsx9, jsxs as jsxs4 } from "react/jsx-runtime";
1104
1187
  function GameWebviewNavigationBar() {
1105
1188
  const safeAreaTop = useSafeAreaTop();
1106
- const { openConfirm } = useDialog4();
1189
+ const { openConfirm } = useDialog5();
1107
1190
  const { captureExitLog } = useCaptureExitLog();
1108
1191
  const global2 = getAppsInTossGlobals();
1109
1192
  const logging = useNavigationBarLogging();
@@ -1132,9 +1215,9 @@ function GameWebviewNavigationBar() {
1132
1215
  BackHandler2.addEventListener("hardwareBackPress", handleAndroidBackEvent);
1133
1216
  return () => BackHandler2.removeEventListener("hardwareBackPress", handleAndroidBackEvent);
1134
1217
  }, [handleGameWebviewClose]);
1135
- return /* @__PURE__ */ jsxs3(Fragment6, { children: [
1136
- /* @__PURE__ */ jsx8(PageNavbar, { preference: { type: "none" } }),
1137
- /* @__PURE__ */ jsx8(
1218
+ return /* @__PURE__ */ jsxs4(Fragment6, { children: [
1219
+ /* @__PURE__ */ jsx9(PageNavbar, { preference: { type: "none" } }),
1220
+ /* @__PURE__ */ jsx9(
1138
1221
  View2,
1139
1222
  {
1140
1223
  style: {
@@ -1150,7 +1233,7 @@ function GameWebviewNavigationBar() {
1150
1233
  paddingRight: 10
1151
1234
  },
1152
1235
  pointerEvents: "box-none",
1153
- children: /* @__PURE__ */ jsx8(
1236
+ children: /* @__PURE__ */ jsx9(
1154
1237
  NavigationRightContent,
1155
1238
  {
1156
1239
  fixedRightButton: initialAccessoryButton,
@@ -1168,7 +1251,7 @@ function GameWebviewNavigationBar() {
1168
1251
  }
1169
1252
 
1170
1253
  // src/components/GameWebView.tsx
1171
- import { Fragment as Fragment7, jsx as jsx9, jsxs as jsxs4 } from "react/jsx-runtime";
1254
+ import { Fragment as Fragment7, jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
1172
1255
  var GameWebView = forwardRef(function GameWebView2(props, ref) {
1173
1256
  const [isEntryMessageExited, setIsEntryMessageExited] = useState3(false);
1174
1257
  useEffect10(() => {
@@ -1187,9 +1270,9 @@ var GameWebView = forwardRef(function GameWebView2(props, ref) {
1187
1270
  }
1188
1271
  });
1189
1272
  }, []);
1190
- return /* @__PURE__ */ jsxs4(Fragment7, { children: [
1191
- /* @__PURE__ */ jsx9(GameWebviewNavigationBar, {}),
1192
- getOperationalEnvironment() === "toss" ? /* @__PURE__ */ jsx9(GameProfile, { isReadyForProfileUI: isEntryMessageExited, children: /* @__PURE__ */ jsx9(PlainWebView, { ref, ...props }) }) : /* @__PURE__ */ jsx9(PlainWebView, { ref, ...props })
1273
+ return /* @__PURE__ */ jsxs5(Fragment7, { children: [
1274
+ /* @__PURE__ */ jsx10(GameWebviewNavigationBar, {}),
1275
+ getOperationalEnvironment2() === "toss" ? /* @__PURE__ */ jsx10(GameProfile, { isReadyForProfileUI: isEntryMessageExited, children: /* @__PURE__ */ jsx10(PlainWebView, { ref, ...props }) }) : /* @__PURE__ */ jsx10(PlainWebView, { ref, ...props })
1193
1276
  ] });
1194
1277
  });
1195
1278
 
@@ -1203,16 +1286,16 @@ import { BackHandler as BackHandler3 } from "react-native";
1203
1286
 
1204
1287
  // src/components/NavigationBar/PartnerWebviewNavigationBar.tsx
1205
1288
  import { closeView as closeView4 } from "@granite-js/react-native";
1206
- import { useDialog as useDialog5 } from "@toss-design-system/react-native";
1207
- import { NavigationBackButton as NavigationBackButton2, NavigationLeft as NavigationLeft2, TopNavigation as TopNavigation2 } from "@toss-design-system/react-native/private";
1289
+ import { useDialog as useDialog6 } from "@toss/tds-react-native";
1290
+ import { NavigationBackButton as NavigationBackButton2, NavigationLeft as NavigationLeft2, TopNavigation as TopNavigation2 } from "@toss/tds-react-native/private";
1208
1291
  import { josa as josa4 } from "es-hangul";
1209
1292
  import { useCallback as useCallback6 } from "react";
1210
- import { jsx as jsx10 } from "react/jsx-runtime";
1293
+ import { jsx as jsx11 } from "react/jsx-runtime";
1211
1294
  function PartnerWebviewNavigationBar({ handleBackEvent, handleHomeIconButtonClick }) {
1212
1295
  const globals = getAppsInTossGlobals();
1213
1296
  const { captureExitLog } = useCaptureExitLog();
1214
1297
  const logging = useNavigationBarLogging();
1215
- const { openConfirm } = useDialog5();
1298
+ const { openConfirm } = useDialog6();
1216
1299
  const { open: openMoreButtonBottomSheet } = useMoreButtonBottomSheet();
1217
1300
  const parsedNavigationBar = globals.navigationBar != null ? safeParseNavigationBar(globals.navigationBar) : null;
1218
1301
  const withHomeButton = parsedNavigationBar?.withHomeButton ?? false;
@@ -1237,7 +1320,7 @@ function PartnerWebviewNavigationBar({ handleBackEvent, handleHomeIconButtonClic
1237
1320
  closeView4();
1238
1321
  }
1239
1322
  }, [captureExitLog, globals.brandDisplayName, logging, openConfirm]);
1240
- return /* @__PURE__ */ jsx10(NavigationBarImpressionArea, { withHomeButton, children: /* @__PURE__ */ jsx10(
1323
+ return /* @__PURE__ */ jsx11(NavigationBarImpressionArea, { withHomeButton, children: /* @__PURE__ */ jsx11(
1241
1324
  TopNavigation2,
1242
1325
  {
1243
1326
  title: globals.brandDisplayName,
@@ -1248,7 +1331,7 @@ function PartnerWebviewNavigationBar({ handleBackEvent, handleHomeIconButtonClic
1248
1331
  onPressClose: handleClose,
1249
1332
  withHome: withHomeButton,
1250
1333
  fixedRightButton: initialAccessoryButton,
1251
- children: /* @__PURE__ */ jsx10(NavigationLeft2, { visible: withBackButton, children: /* @__PURE__ */ jsx10(NavigationBackButton2, { onPress: handleBackEvent, canGoBack: false }) })
1334
+ children: /* @__PURE__ */ jsx11(NavigationLeft2, { visible: withBackButton, children: /* @__PURE__ */ jsx11(NavigationBackButton2, { onPress: handleBackEvent, canGoBack: false }) })
1252
1335
  }
1253
1336
  ) });
1254
1337
  }
@@ -1312,7 +1395,7 @@ function useWebViewHistory() {
1312
1395
 
1313
1396
  // src/utils/log.ts
1314
1397
  import { eventLog as eventLogNative } from "@apps-in-toss/native-modules";
1315
- import { getSchemeUri as getSchemeUri4 } from "@granite-js/react-native";
1398
+ import { getSchemeUri as getSchemeUri5 } from "@granite-js/react-native";
1316
1399
 
1317
1400
  // src/utils/extractDateFromUUIDv7.ts
1318
1401
  var extractDateFromUUIDv7 = (uuid) => {
@@ -1338,7 +1421,7 @@ var getGroupId = (url) => {
1338
1421
  };
1339
1422
  var getReferrer = () => {
1340
1423
  try {
1341
- const referrer = new URL(getSchemeUri4());
1424
+ const referrer = new URL(getSchemeUri5());
1342
1425
  return referrer.searchParams.get("referrer");
1343
1426
  } catch {
1344
1427
  return "";
@@ -1360,7 +1443,7 @@ var trackScreen = (url) => {
1360
1443
  };
1361
1444
 
1362
1445
  // src/components/PartnerWebView.tsx
1363
- import { Fragment as Fragment8, jsx as jsx11, jsxs as jsxs5 } from "react/jsx-runtime";
1446
+ import { Fragment as Fragment8, jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
1364
1447
  var PartnerWebView = forwardRef2(
1365
1448
  function PartnerWebViewScreen(webViewProps, ref) {
1366
1449
  const webViewRef = useRef4(null);
@@ -1412,15 +1495,15 @@ var PartnerWebView = forwardRef2(
1412
1495
  },
1413
1496
  [onNavigationStateChange]
1414
1497
  );
1415
- return /* @__PURE__ */ jsxs5(Fragment8, { children: [
1416
- /* @__PURE__ */ jsx11(
1498
+ return /* @__PURE__ */ jsxs6(Fragment8, { children: [
1499
+ /* @__PURE__ */ jsx12(
1417
1500
  PartnerWebviewNavigationBar,
1418
1501
  {
1419
1502
  handleBackEvent,
1420
1503
  handleHomeIconButtonClick
1421
1504
  }
1422
1505
  ),
1423
- /* @__PURE__ */ jsx11(
1506
+ /* @__PURE__ */ jsx12(
1424
1507
  PlainWebView2,
1425
1508
  {
1426
1509
  ref: refs,
@@ -1749,7 +1832,7 @@ function useGeolocation({ accuracy, distanceInterval, timeInterval }) {
1749
1832
  }
1750
1833
 
1751
1834
  // src/components/WebView.tsx
1752
- import { jsx as jsx12 } from "react/jsx-runtime";
1835
+ import { jsx as jsx13 } from "react/jsx-runtime";
1753
1836
  var operationalEnvironment = appsInTossConstantBridges.getOperationalEnvironment();
1754
1837
  var TYPES = ["partner", "external", "game"];
1755
1838
  var WEBVIEW_TYPES = {
@@ -1759,7 +1842,7 @@ var WEBVIEW_TYPES = {
1759
1842
  };
1760
1843
  function mergeSchemeQueryParamsInto(url) {
1761
1844
  const baseUrl = new URL(url);
1762
- const schemeUrl = new URL(getSchemeUri5());
1845
+ const schemeUrl = new URL(getSchemeUri6());
1763
1846
  baseUrl.pathname = schemeUrl.pathname;
1764
1847
  for (const [key, value] of schemeUrl.searchParams.entries()) {
1765
1848
  baseUrl.searchParams.set(key, value);
@@ -1824,7 +1907,6 @@ function WebView({ type, local, onMessage, ...props }) {
1824
1907
  requestOneTimePurchase
1825
1908
  },
1826
1909
  constantHandlerMap: {
1827
- ...graniteConstantBridges,
1828
1910
  ...appsInTossConstantBridges,
1829
1911
  getSafeAreaTop: () => top,
1830
1912
  getSafeAreaBottom: () => bottom,
@@ -1841,7 +1923,6 @@ function WebView({ type, local, onMessage, ...props }) {
1841
1923
  getDeploymentId: env.getDeploymentId
1842
1924
  },
1843
1925
  asyncHandlerMap: {
1844
- ...graniteAsyncBridges,
1845
1926
  ...appsInTossAsyncBridges,
1846
1927
  setIosSwipeGestureEnabled: (options) => {
1847
1928
  setAllowsBackForwardNavigationGestures(options.isEnabled);
@@ -1867,7 +1948,9 @@ function WebView({ type, local, onMessage, ...props }) {
1867
1948
  /** IAP */
1868
1949
  iapGetProductItemList: IAP.getProductItemList,
1869
1950
  iapCreateOneTimePurchaseOrder,
1870
- processProductGrant
1951
+ processProductGrant,
1952
+ getPendingOrders: IAP.getPendingOrders,
1953
+ getCompletedOrRefundedOrders: IAP.getCompletedOrRefundedOrders
1871
1954
  }
1872
1955
  });
1873
1956
  const headerPropForExternalWebView = useMemo4(() => {
@@ -1890,7 +1973,7 @@ function WebView({ type, local, onMessage, ...props }) {
1890
1973
  const userAgent = useCreateUserAgent({
1891
1974
  colorPreference: "light"
1892
1975
  });
1893
- return /* @__PURE__ */ jsx12(
1976
+ return /* @__PURE__ */ jsx13(
1894
1977
  BaseWebView,
1895
1978
  {
1896
1979
  ref: handler.ref,
@@ -1918,7 +2001,7 @@ function WebView({ type, local, onMessage, ...props }) {
1918
2001
 
1919
2002
  // src/index.ts
1920
2003
  export * from "@apps-in-toss/analytics";
1921
- import { useTopNavigation as useTopNavigation2 } from "@toss-design-system/react-native/private";
2004
+ import { useTopNavigation as useTopNavigation2 } from "@toss/tds-react-native/private";
1922
2005
  export * from "@apps-in-toss/native-modules";
1923
2006
  export * from "@apps-in-toss/types";
1924
2007
  var Analytics2 = {