@apps-in-toss/framework 0.0.0-dev.1758198081085 → 0.0.0-dev.1760064876537

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.d.cts CHANGED
@@ -5,12 +5,12 @@ import * as _apps_in_toss_analytics from '@apps-in-toss/analytics';
5
5
  export * from '@apps-in-toss/analytics';
6
6
  import { InitialProps, GraniteProps } from '@granite-js/react-native';
7
7
  import { WebViewProps as WebViewProps$1 } from '@granite-js/native/react-native-webview';
8
- import { ExternalWebViewScreenProps } from '@toss-design-system/react-native';
8
+ import { ExternalWebViewScreenProps } from '@toss/tds-react-native';
9
9
  import { StartUpdateLocationOptions, Location } from '@apps-in-toss/types';
10
10
  export * from '@apps-in-toss/types';
11
11
  import { onVisibilityChangedByTransparentServiceWeb } from '@apps-in-toss/native-modules';
12
12
  export * from '@apps-in-toss/native-modules';
13
- export { useTopNavigation } from '@toss-design-system/react-native/private';
13
+ export { OverlayProvider, useOverlay, useTopNavigation } from '@toss/tds-react-native/private';
14
14
 
15
15
  interface AppsInTossProps {
16
16
  context: GraniteProps['context'];
@@ -27,9 +27,7 @@ declare const AppsInToss: {
27
27
  registerApp: typeof registerApp;
28
28
  };
29
29
 
30
- type GameWebViewProps$1 = WebViewProps$1 & {
31
- canHistoryGoBack: boolean;
32
- };
30
+ type GameWebViewProps$1 = WebViewProps$1;
33
31
 
34
32
  type WebViewProps = PartnerWebViewProps | ExternalWebViewProps | GameWebViewProps;
35
33
  interface PartnerWebViewProps extends Omit<WebViewProps$1, InternalProps> {
@@ -107,6 +105,46 @@ type UseGeolocationOptions = Omit<StartUpdateLocationOptions, 'callback'>;
107
105
  */
108
106
  declare function useGeolocation({ accuracy, distanceInterval, timeInterval }: UseGeolocationOptions): Location | null;
109
107
 
108
+ /**
109
+ * @public
110
+ * @category 화면 제어
111
+ * @name useWaitForReturnNavigator
112
+ * @description
113
+ * 화면 전환을 하고 돌아왔을 때 다음 코드를 동기적으로 실행할 수 있도록 도와주는 Hook 이에요.
114
+ * 화면 이동은 [@react-navigation/native `useNavigation`의 `navigate`](https://reactnavigation.org/docs/6.x/navigation-prop#navigate)를 사용해요.
115
+ *
116
+ * 예를 들어, 사용자가 다른 화면으로 이동했다가 돌아왔다는 로그를 남기고 싶을 때 사용해요.
117
+ *
118
+ * @example
119
+ * ### 화면 이동 후 돌아왔을 때 코드가 실행되는 예제
120
+ *
121
+ * **"이동하기"** 버튼을 누르면 다른 화면으로 이동하고, 돌아왔을 때 로그가 남겨져요.
122
+ *
123
+ * ```tsx
124
+ * import { Button } from 'react-native';
125
+ * import { useWaitForReturnNavigator } from 'react-native-bedrock';
126
+ *
127
+ * export function UseWaitForReturnNavigator() {
128
+ * const navigate = useWaitForReturnNavigator();
129
+ *
130
+ * return (
131
+ * <>
132
+ * <Button
133
+ * title="이동하기"
134
+ * onPress={async () => {
135
+ * console.log(1);
136
+ * await navigate('/examples/use-visibility');
137
+ * // 화면에 돌아오면 이 코드가 실행됩니다.
138
+ * console.log(2);
139
+ * }}
140
+ * />
141
+ * </>
142
+ * );
143
+ * }
144
+ * ```
145
+ */
146
+ declare function useWaitForReturnNavigator<T extends Record<string, object | undefined>>(): <RouteName extends keyof T>(route: RouteName, params?: T[RouteName]) => Promise<void>;
147
+
110
148
  declare const env: {
111
149
  getDeploymentId: () => string | undefined;
112
150
  };
@@ -120,4 +158,4 @@ declare const Analytics: {
120
158
  Area: ({ children, params: _params, ...props }: _apps_in_toss_analytics.LoggingAreaProps) => react_jsx_runtime.JSX.Element;
121
159
  };
122
160
 
123
- export { Analytics, AppsInToss, type ExternalWebViewProps, type GameWebViewProps, INTERNAL__onVisibilityChangedByTransparentServiceWeb, type PartnerWebViewProps, type UseGeolocationOptions, WebView, type WebViewProps, env, useCreateUserAgent, useGeolocation };
161
+ export { Analytics, AppsInToss, type ExternalWebViewProps, type GameWebViewProps, INTERNAL__onVisibilityChangedByTransparentServiceWeb, type PartnerWebViewProps, type UseGeolocationOptions, WebView, type WebViewProps, env, useCreateUserAgent, useGeolocation, useWaitForReturnNavigator };
package/dist/index.d.ts CHANGED
@@ -5,12 +5,12 @@ import * as _apps_in_toss_analytics from '@apps-in-toss/analytics';
5
5
  export * from '@apps-in-toss/analytics';
6
6
  import { InitialProps, GraniteProps } from '@granite-js/react-native';
7
7
  import { WebViewProps as WebViewProps$1 } from '@granite-js/native/react-native-webview';
8
- import { ExternalWebViewScreenProps } from '@toss-design-system/react-native';
8
+ import { ExternalWebViewScreenProps } from '@toss/tds-react-native';
9
9
  import { StartUpdateLocationOptions, Location } from '@apps-in-toss/types';
10
10
  export * from '@apps-in-toss/types';
11
11
  import { onVisibilityChangedByTransparentServiceWeb } from '@apps-in-toss/native-modules';
12
12
  export * from '@apps-in-toss/native-modules';
13
- export { useTopNavigation } from '@toss-design-system/react-native/private';
13
+ export { OverlayProvider, useOverlay, useTopNavigation } from '@toss/tds-react-native/private';
14
14
 
15
15
  interface AppsInTossProps {
16
16
  context: GraniteProps['context'];
@@ -27,9 +27,7 @@ declare const AppsInToss: {
27
27
  registerApp: typeof registerApp;
28
28
  };
29
29
 
30
- type GameWebViewProps$1 = WebViewProps$1 & {
31
- canHistoryGoBack: boolean;
32
- };
30
+ type GameWebViewProps$1 = WebViewProps$1;
33
31
 
34
32
  type WebViewProps = PartnerWebViewProps | ExternalWebViewProps | GameWebViewProps;
35
33
  interface PartnerWebViewProps extends Omit<WebViewProps$1, InternalProps> {
@@ -107,6 +105,46 @@ type UseGeolocationOptions = Omit<StartUpdateLocationOptions, 'callback'>;
107
105
  */
108
106
  declare function useGeolocation({ accuracy, distanceInterval, timeInterval }: UseGeolocationOptions): Location | null;
109
107
 
108
+ /**
109
+ * @public
110
+ * @category 화면 제어
111
+ * @name useWaitForReturnNavigator
112
+ * @description
113
+ * 화면 전환을 하고 돌아왔을 때 다음 코드를 동기적으로 실행할 수 있도록 도와주는 Hook 이에요.
114
+ * 화면 이동은 [@react-navigation/native `useNavigation`의 `navigate`](https://reactnavigation.org/docs/6.x/navigation-prop#navigate)를 사용해요.
115
+ *
116
+ * 예를 들어, 사용자가 다른 화면으로 이동했다가 돌아왔다는 로그를 남기고 싶을 때 사용해요.
117
+ *
118
+ * @example
119
+ * ### 화면 이동 후 돌아왔을 때 코드가 실행되는 예제
120
+ *
121
+ * **"이동하기"** 버튼을 누르면 다른 화면으로 이동하고, 돌아왔을 때 로그가 남겨져요.
122
+ *
123
+ * ```tsx
124
+ * import { Button } from 'react-native';
125
+ * import { useWaitForReturnNavigator } from 'react-native-bedrock';
126
+ *
127
+ * export function UseWaitForReturnNavigator() {
128
+ * const navigate = useWaitForReturnNavigator();
129
+ *
130
+ * return (
131
+ * <>
132
+ * <Button
133
+ * title="이동하기"
134
+ * onPress={async () => {
135
+ * console.log(1);
136
+ * await navigate('/examples/use-visibility');
137
+ * // 화면에 돌아오면 이 코드가 실행됩니다.
138
+ * console.log(2);
139
+ * }}
140
+ * />
141
+ * </>
142
+ * );
143
+ * }
144
+ * ```
145
+ */
146
+ declare function useWaitForReturnNavigator<T extends Record<string, object | undefined>>(): <RouteName extends keyof T>(route: RouteName, params?: T[RouteName]) => Promise<void>;
147
+
110
148
  declare const env: {
111
149
  getDeploymentId: () => string | undefined;
112
150
  };
@@ -120,4 +158,4 @@ declare const Analytics: {
120
158
  Area: ({ children, params: _params, ...props }: _apps_in_toss_analytics.LoggingAreaProps) => react_jsx_runtime.JSX.Element;
121
159
  };
122
160
 
123
- export { Analytics, AppsInToss, type ExternalWebViewProps, type GameWebViewProps, INTERNAL__onVisibilityChangedByTransparentServiceWeb, type PartnerWebViewProps, type UseGeolocationOptions, WebView, type WebViewProps, env, useCreateUserAgent, useGeolocation };
161
+ export { Analytics, AppsInToss, type ExternalWebViewProps, type GameWebViewProps, INTERNAL__onVisibilityChangedByTransparentServiceWeb, type PartnerWebViewProps, type UseGeolocationOptions, WebView, type WebViewProps, env, useCreateUserAgent, useGeolocation, useWaitForReturnNavigator };