@apps-in-toss/web-framework 0.0.22 → 0.0.24
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/cli/{chunk-RUDG2MMT.js → chunk-34QS4NNF.js} +1 -1
- package/dist/cli/{chunk-HDRFXOPA.js → chunk-AZQN2M6D.js} +2 -2
- package/dist/cli/index.js +3853 -15
- package/dist/cli/{lib-NMFBQRQ2.js → lib-GNFDOQZX.js} +1 -1
- package/dist/cli/{typescript-THSIDFIK.js → typescript-YVXHBAAI.js} +2 -2
- package/dist/prebuilt/dev.android.js +36148 -34816
- package/dist/prebuilt/dev.ios.js +36899 -35567
- package/dist/prebuilt/prod.android.js +38400 -1
- package/dist/prebuilt/prod.ios.js +38464 -1
- package/dist/prebuilt/prod.json +6 -6
- package/dist-web/index.d.ts +2 -104
- package/dist-web/index.js +2 -104
- package/package.json +16 -15
- package/dist-web/appLogin.d.ts +0 -30
- package/dist-web/bridge.d.ts +0 -25
- package/dist-web/bridge.js +0 -1
- package/dist-web/checkoutPayment.d.ts +0 -125
- package/dist-web/closeView.d.ts +0 -23
- package/dist-web/executePayment.d.ts +0 -266
- package/dist-web/fetchAlbumPhotos.d.ts +0 -78
- package/dist-web/fetchContacts.d.ts +0 -109
- package/dist-web/generateHapticFeedback.d.ts +0 -49
- package/dist-web/getClipboardText.d.ts +0 -40
- package/dist-web/getCurrentLocation.d.ts +0 -144
- package/dist-web/getDeviceId.d.ts +0 -31
- package/dist-web/getLocale.d.ts +0 -30
- package/dist-web/getNetworkStatus.d.ts +0 -54
- package/dist-web/getOperationalEnvironment.d.ts +0 -35
- package/dist-web/getPlatformOS.d.ts +0 -35
- package/dist-web/getSchemeUri.d.ts +0 -25
- package/dist-web/getTossAppVersion.d.ts +0 -31
- package/dist-web/getTossShareLink.d.ts +0 -31
- package/dist-web/openCamera.d.ts +0 -78
- package/dist-web/openURL.d.ts +0 -38
- package/dist-web/setClipboardText.d.ts +0 -32
- package/dist-web/setIosSwipeGestureEnabled.d.ts +0 -39
- package/dist-web/setScreenAwakeMode.d.ts +0 -68
- package/dist-web/setSecureScreen.d.ts +0 -33
- package/dist-web/share.d.ts +0 -36
- package/dist-web/startUpdateLocation.d.ts +0 -183
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export interface EventEmitterSchema<K extends string, P extends unknown[]> {
|
|
4
|
-
name: K;
|
|
5
|
-
params: P;
|
|
6
|
-
}
|
|
7
|
-
declare enum Accuracy {
|
|
8
|
-
/**
|
|
9
|
-
* 오차범위 3KM 이내
|
|
10
|
-
*/
|
|
11
|
-
Lowest = 1,
|
|
12
|
-
/**
|
|
13
|
-
* 오차범위 1KM 이내
|
|
14
|
-
*/
|
|
15
|
-
Low,
|
|
16
|
-
/**
|
|
17
|
-
* 오차범위 몇 백미터 이내
|
|
18
|
-
*/
|
|
19
|
-
Balanced,
|
|
20
|
-
/**
|
|
21
|
-
* 오차범위 10M 이내
|
|
22
|
-
*/
|
|
23
|
-
High,
|
|
24
|
-
/**
|
|
25
|
-
* 가장 높은 정확도
|
|
26
|
-
*/
|
|
27
|
-
Highest,
|
|
28
|
-
/**
|
|
29
|
-
* 네비게이션을 위한 최고 정확도
|
|
30
|
-
*/
|
|
31
|
-
BestForNavigation
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* @public
|
|
35
|
-
* @category 위치 정보
|
|
36
|
-
* @name Location
|
|
37
|
-
* @description 위치 정보를 나타내는 객체예요.
|
|
38
|
-
*/
|
|
39
|
-
export interface Location {
|
|
40
|
-
/**
|
|
41
|
-
* Android에서만 지원하는 옵션이에요.
|
|
42
|
-
*
|
|
43
|
-
* - `FINE`: 정확한 위치
|
|
44
|
-
* - `COARSE`: 대략적인 위치
|
|
45
|
-
*
|
|
46
|
-
* @see https://developer.android.com/codelabs/approximate-location
|
|
47
|
-
*/
|
|
48
|
-
accessLocation?: "FINE" | "COARSE";
|
|
49
|
-
/**
|
|
50
|
-
* 위치가 업데이트된 시점의 유닉스 타임스탬프예요.
|
|
51
|
-
*/
|
|
52
|
-
timestamp: number;
|
|
53
|
-
/**
|
|
54
|
-
* @description 위치 정보를 나타내는 객체예요. 자세한 내용은 [LocationCoords](/react-native/reference/framework/Types/LocationCoords.html)을 참고해주세요.
|
|
55
|
-
*/
|
|
56
|
-
coords: LocationCoords;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* @public
|
|
60
|
-
* @category 위치 정보
|
|
61
|
-
* @name LocationCoords
|
|
62
|
-
* @description 세부 위치 정보를 나타내는 객체예요.
|
|
63
|
-
*/
|
|
64
|
-
export interface LocationCoords {
|
|
65
|
-
/**
|
|
66
|
-
* 위도
|
|
67
|
-
*/
|
|
68
|
-
latitude: number;
|
|
69
|
-
/**
|
|
70
|
-
* 경도
|
|
71
|
-
*/
|
|
72
|
-
longitude: number;
|
|
73
|
-
/**
|
|
74
|
-
* 높이
|
|
75
|
-
*/
|
|
76
|
-
altitude: number;
|
|
77
|
-
/**
|
|
78
|
-
* 위치 정확도
|
|
79
|
-
*/
|
|
80
|
-
accuracy: number;
|
|
81
|
-
/**
|
|
82
|
-
* 고도 정확도
|
|
83
|
-
*/
|
|
84
|
-
altitudeAccuracy: number;
|
|
85
|
-
/**
|
|
86
|
-
* 방향
|
|
87
|
-
*/
|
|
88
|
-
heading: number;
|
|
89
|
-
}
|
|
90
|
-
export interface StartUpdateLocationOptions {
|
|
91
|
-
/**
|
|
92
|
-
* 위치 정확도를 설정해요.
|
|
93
|
-
*/
|
|
94
|
-
accuracy: Accuracy;
|
|
95
|
-
/**
|
|
96
|
-
* 위치 업데이트 주기를 밀리초(ms) 단위로 설정해요.
|
|
97
|
-
*/
|
|
98
|
-
timeInterval: number;
|
|
99
|
-
/**
|
|
100
|
-
* 위치 변경 거리를 미터(m) 단위로 설정해요.
|
|
101
|
-
*/
|
|
102
|
-
distanceInterval: number;
|
|
103
|
-
}
|
|
104
|
-
export interface StartUpdateLocationSubscription extends EmitterSubscription {
|
|
105
|
-
remove: () => Promise<void>;
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* @name UpdateLocationEventEmitter
|
|
109
|
-
* @kind typedef
|
|
110
|
-
* @description
|
|
111
|
-
* 디바이스의 위치 정보 변경을 감지해요
|
|
112
|
-
* @extends {EventEmitterSchema<'updateLocation', [Location]>}
|
|
113
|
-
*/
|
|
114
|
-
export interface UpdateLocationEventEmitter extends EventEmitterSchema<"updateLocation", [
|
|
115
|
-
Location
|
|
116
|
-
]> {
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* @public
|
|
120
|
-
* @category 위치 정보
|
|
121
|
-
* @name startUpdateLocation
|
|
122
|
-
* @description 디바이스의 위치 정보를 지속적으로 감지하고, 위치가 변경되면 콜백을 실행하는 함수예요. 콜백 함수를 등록하면 위치가 변경될 때마다 자동으로 호출돼요.
|
|
123
|
-
* 실시간 위치 추적이 필요한 기능을 구현할 때 사용할 수 있어요. 예를 들어 지도 앱에서 사용자의 현재 위치를 실시간으로 업데이트할 때, 운동 앱에서 사용자의 이동 거리를 기록할 때 등이에요.
|
|
124
|
-
* 위치 업데이트 주기와 정확도를 조정해 배터리 소모를 최소화하면서도 필요한 정보를 얻을 수 있어요.
|
|
125
|
-
*
|
|
126
|
-
* @param {StartUpdateLocationOptions} options - 위치 정보 감지에 필요한 설정 객체에요.
|
|
127
|
-
* @param {number} [options.accuracy] 위치 정확도를 설정해요.
|
|
128
|
-
* @param {number} [options.timeInterval] 위치 정보를 업데이트하는 최소 주기로, 단위는 밀리초(ms)예요. 이 값은 위치 업데이트가 발생하는 가장 짧은 간격을 설정하지만, 시스템이나 환경의 영향을 받아 지정한 주기보다 더 긴 간격으로 업데이트될 수 있어요.
|
|
129
|
-
* @param {number} [options.distanceInterval] 위치 변경 거리를 미터(m) 단위로 설정해요.
|
|
130
|
-
* @param {(location: Location) => void} [options.callback] 위치 정보가 변경될 때 호출되는 콜백 함수예요. 자세한 내용은 [Location](/react-native/reference/framework/Types/Location.html)을 참고해주세요.
|
|
131
|
-
*
|
|
132
|
-
* @example
|
|
133
|
-
* ### 위치 정보 변경 감지하기
|
|
134
|
-
*
|
|
135
|
-
* ```tsx
|
|
136
|
-
* import React, { useState, useEffect } from 'react';
|
|
137
|
-
*
|
|
138
|
-
* import { startUpdateLocation } from '@apps-in-toss/web-framework';
|
|
139
|
-
*
|
|
140
|
-
* // 위치 정보 변경 감지하기
|
|
141
|
-
* function LocationWatcher() {
|
|
142
|
-
* const [location, setLocation] = useState(null);
|
|
143
|
-
*
|
|
144
|
-
* useEffect(() => {
|
|
145
|
-
* return startUpdateLocation({
|
|
146
|
-
* options: {
|
|
147
|
-
* accuracy: Accuracy.Balanced,
|
|
148
|
-
* timeInterval: 3000,
|
|
149
|
-
* distanceInterval: 10,
|
|
150
|
-
* },
|
|
151
|
-
* onEvent: (location) => {
|
|
152
|
-
* setLocation(location);
|
|
153
|
-
* },
|
|
154
|
-
* onError: (error) => {
|
|
155
|
-
* console.error('위치 정보를 가져오는데 실패했어요:', error);
|
|
156
|
-
* },
|
|
157
|
-
* });
|
|
158
|
-
* }, []);
|
|
159
|
-
*
|
|
160
|
-
* if (location == null) {
|
|
161
|
-
* return <span>위치 정보를 가져오는 중이에요...</span>;
|
|
162
|
-
* }
|
|
163
|
-
*
|
|
164
|
-
* return (
|
|
165
|
-
* <div>
|
|
166
|
-
* <span>위도: {location.coords.latitude}</span>
|
|
167
|
-
* <span>경도: {location.coords.longitude}</span>
|
|
168
|
-
* <span>위치 정확도: {location.coords.accuracy}m</span>
|
|
169
|
-
* <span>높이: {location.coords.altitude}m</span>
|
|
170
|
-
* <span>고도 정확도: {location.coords.altitudeAccuracy}m</span>
|
|
171
|
-
* <span>방향: {location.coords.heading}°</span>
|
|
172
|
-
* </div>
|
|
173
|
-
* );
|
|
174
|
-
* }
|
|
175
|
-
* ```
|
|
176
|
-
*/
|
|
177
|
-
export declare function startUpdateLocation(eventParams: {
|
|
178
|
-
onEvent: (response: Location) => void;
|
|
179
|
-
onError: (error: unknown) => void;
|
|
180
|
-
options: StartUpdateLocationOptions;
|
|
181
|
-
}): () => void;
|
|
182
|
-
|
|
183
|
-
export {};
|