@apps-in-toss/framework 1.2.0 → 1.2.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.
- package/dist/index.cjs +330 -259
- package/dist/index.d.cts +42 -2
- package/dist/index.d.ts +42 -2
- package/dist/index.js +289 -221
- package/package.json +13 -13
package/dist/index.d.cts
CHANGED
|
@@ -10,7 +10,7 @@ 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/tds-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'];
|
|
@@ -105,6 +105,46 @@ type UseGeolocationOptions = Omit<StartUpdateLocationOptions, 'callback'>;
|
|
|
105
105
|
*/
|
|
106
106
|
declare function useGeolocation({ accuracy, distanceInterval, timeInterval }: UseGeolocationOptions): Location | null;
|
|
107
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
|
+
|
|
108
148
|
declare const env: {
|
|
109
149
|
getDeploymentId: () => string | undefined;
|
|
110
150
|
};
|
|
@@ -118,4 +158,4 @@ declare const Analytics: {
|
|
|
118
158
|
Area: ({ children, params: _params, ...props }: _apps_in_toss_analytics.LoggingAreaProps) => react_jsx_runtime.JSX.Element;
|
|
119
159
|
};
|
|
120
160
|
|
|
121
|
-
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
|
@@ -10,7 +10,7 @@ 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/tds-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'];
|
|
@@ -105,6 +105,46 @@ type UseGeolocationOptions = Omit<StartUpdateLocationOptions, 'callback'>;
|
|
|
105
105
|
*/
|
|
106
106
|
declare function useGeolocation({ accuracy, distanceInterval, timeInterval }: UseGeolocationOptions): Location | null;
|
|
107
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
|
+
|
|
108
148
|
declare const env: {
|
|
109
149
|
getDeploymentId: () => string | undefined;
|
|
110
150
|
};
|
|
@@ -118,4 +158,4 @@ declare const Analytics: {
|
|
|
118
158
|
Area: ({ children, params: _params, ...props }: _apps_in_toss_analytics.LoggingAreaProps) => react_jsx_runtime.JSX.Element;
|
|
119
159
|
};
|
|
120
160
|
|
|
121
|
-
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 };
|