@apps-in-toss/web-framework 0.0.8 → 0.0.10
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/LICENSE +674 -0
- package/README.md +20 -0
- package/bin.js +2 -1
- package/dist/chunk-CH3CIAIW.js +7688 -0
- package/dist/chunk-DI2VGQ6M.js +53 -0
- package/dist/chunk-HL7M3JLX.js +53 -0
- package/dist/chunk-I3ZDGLIW.js +19 -0
- package/dist/chunk-LJBVSTWE.js +7687 -0
- package/dist/chunk-TZCMTMV7.js +38 -0
- package/dist/{chunk-MHAJE5QI.js → cli/chunk-HDRFXOPA.js} +30 -1
- package/dist/cli/chunk-RUDG2MMT.js +173587 -0
- package/dist/cli/index.cjs +644 -0
- package/dist/cli/index.d.cts +2 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +96448 -0
- package/dist/{lib-EUN4APCZ.js → cli/lib-NMFBQRQ2.js} +1 -1
- package/dist/cli/typescript-THSIDFIK.js +6 -0
- package/dist/cli.cjs +480 -4518
- package/dist/cli.d.cts +1 -2
- package/dist/cli.d.ts +1 -2
- package/dist/cli.js +446 -3492
- package/dist/closeView.d.ts +24 -0
- package/dist/config/index.d.ts +47 -60
- package/dist/config/index.js +6 -7974
- package/dist/fetchAlbumPhotos.d.ts +75 -0
- package/dist/fetchContacts.d.ts +92 -0
- package/dist/generateHapticFeedback.d.ts +52 -0
- package/dist/getClipboardText.d.ts +42 -0
- package/dist/getCurrentLocation.d.ts +109 -0
- package/dist/getDeviceId.d.ts +32 -0
- package/dist/getLocale.d.ts +31 -0
- package/dist/getNetworkStatus.d.ts +55 -0
- package/dist/getSchemeUri.d.ts +26 -0
- package/dist/index.cjs +18 -0
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +1 -0
- package/dist/openCamera.d.ts +75 -0
- package/dist/plugins/index.cjs +7682 -0
- package/dist/plugins/index.d.cts +15 -0
- package/dist/plugins/index.d.ts +15 -0
- package/dist/plugins/index.js +11 -0
- package/dist/prebuilt/dev.android.js +155792 -0
- package/dist/prebuilt/dev.ios.js +155733 -0
- package/dist/prebuilt/prod.android.js +20 -0
- package/dist/prebuilt/prod.ios.js +20 -0
- package/dist/prebuilt/prod.json +14 -0
- package/dist/setClipboardText.d.ts +34 -0
- package/dist/setScreenAwakeMode.d.ts +69 -0
- package/dist/setSecureScreen.d.ts +34 -0
- package/dist/share.d.ts +37 -0
- package/dist/startUpdateLocation.d.ts +151 -0
- package/hermesc/0_72_6/linux64-bin/hermesc +0 -0
- package/hermesc/0_72_6/osx-bin/hermesc +0 -0
- package/hermesc/0_72_6/win64-bin/hermesc.exe +0 -0
- package/hermesc/0_72_6/win64-bin/icudt64.dll +0 -0
- package/hermesc/0_72_6/win64-bin/icuin64.dll +0 -0
- package/hermesc/0_72_6/win64-bin/icuio64.dll +0 -0
- package/hermesc/0_72_6/win64-bin/icutest64.dll +0 -0
- package/hermesc/0_72_6/win64-bin/icutu64.dll +0 -0
- package/hermesc/0_72_6/win64-bin/icuuc64.dll +0 -0
- package/hermesc/0_72_6/win64-bin/msvcp140.dll +0 -0
- package/hermesc/0_72_6/win64-bin/vcruntime140.dll +0 -0
- package/hermesc/0_72_6/win64-bin/vcruntime140_1.dll +0 -0
- package/package.json +52 -29
- package/src-web/appLogin.d.ts +30 -0
- package/src-web/closeView.d.ts +1 -2
- package/src-web/fetchAlbumPhotos.d.ts +2 -4
- package/src-web/fetchContacts.d.ts +1 -3
- package/src-web/generateHapticFeedback.d.ts +24 -27
- package/src-web/getClipboardText.d.ts +1 -3
- package/src-web/getCurrentLocation.d.ts +48 -13
- package/src-web/getDeviceId.d.ts +1 -2
- package/src-web/getLocale.d.ts +1 -2
- package/src-web/getNetworkStatus.d.ts +1 -2
- package/src-web/getOperationalEnvironment.d.ts +35 -0
- package/src-web/getPlatformOS.d.ts +28 -0
- package/src-web/getSchemeUri.d.ts +1 -2
- package/src-web/index.d.ts +3 -0
- package/src-web/index.js +1 -1
- package/src-web/openCamera.d.ts +1 -3
- package/src-web/setClipboardText.d.ts +1 -3
- package/src-web/setScreenAwakeMode.d.ts +1 -2
- package/src-web/setSecureScreen.d.ts +1 -2
- package/src-web/share.d.ts +1 -2
- package/src-web/startUpdateLocation.d.ts +45 -13
- package/dist/chunk-5AYTRYXW.js +0 -27
- package/dist/lib-OD73GAMK.js +0 -1007
- package/react-native/.babelrc +0 -41
- package/react-native/ait.d.ts +0 -8
- package/react-native/context.ts +0 -10
- package/react-native/index.ts +0 -4
- package/react-native/pages/_404.tsx +0 -1
- package/react-native/pages/index.tsx +0 -10
- package/react-native/react-native.config.cjs +0 -3
- package/react-native/src/_app.tsx +0 -12
package/src-web/index.d.ts
CHANGED
|
@@ -7,10 +7,13 @@ export * from './getNetworkStatus';
|
|
|
7
7
|
export * from './getLocale';
|
|
8
8
|
export * from './getSchemeUri';
|
|
9
9
|
export * from './getDeviceId';
|
|
10
|
+
export * from './getPlatformOS';
|
|
10
11
|
export * from './setClipboardText';
|
|
11
12
|
export * from './getClipboardText';
|
|
12
13
|
export * from './fetchContacts';
|
|
13
14
|
export * from './fetchAlbumPhotos';
|
|
14
15
|
export * from './getCurrentLocation';
|
|
15
16
|
export * from './openCamera';
|
|
17
|
+
export * from './appLogin';
|
|
18
|
+
export * from './getOperationalEnvironment';
|
|
16
19
|
export * from './startUpdateLocation';
|
package/src-web/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const createEvents=()=>({emit(event,args){for(let callbacks=this.events[event]||[],i=0,length=callbacks.length;i<length;i++){callbacks[i](args)}},events:{},on(event,cb){var _this_events,_event;((_this_events=this.events)[_event=event]||(_this_events[_event]=[])).push(cb);return()=>{var _this_events_event;this.events[event]=(_this_events_event=this.events[event])===null||_this_events_event===void 0?void 0:_this_events_event.filter(i=>cb!==i)}}});const createEventId=()=>Math.random().toString(36).substring(2,15);const deserializeError=value=>{if(value&&value.__isError){const err=new Error(value.message);err.name=value.name;err.stack=value.stack;return err}return value};window.__BEDROCK_NATIVE_EMITTER=createEvents();export function closeView(...args){if(!window.ReactNativeWebView){throw new Error("This closeView is not available in browser environment")}const eventId=createEventId();const emitters=[];const unsubscribe=()=>{for(const emitter of emitters){emitter()}};return new Promise((resolve,reject)=>{emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`closeView/resolve/${eventId}`,args=>{unsubscribe();resolve(args)}));emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`closeView/reject/${eventId}`,error=>{unsubscribe();reject(deserializeError(error))}));window.ReactNativeWebView.postMessage(JSON.stringify({type:"method",functionName:"closeView",eventId,args}))})}export function generateHapticFeedback(...args){if(!window.ReactNativeWebView){throw new Error("This generateHapticFeedback is not available in browser environment")}const eventId=createEventId();const emitters=[];const unsubscribe=()=>{for(const emitter of emitters){emitter()}};return new Promise((resolve,reject)=>{emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`generateHapticFeedback/resolve/${eventId}`,args=>{unsubscribe();resolve(args)}));emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`generateHapticFeedback/reject/${eventId}`,error=>{unsubscribe();reject(deserializeError(error))}));window.ReactNativeWebView.postMessage(JSON.stringify({type:"method",functionName:"generateHapticFeedback",eventId,args}))})}export function share(...args){if(!window.ReactNativeWebView){throw new Error("This share is not available in browser environment")}const eventId=createEventId();const emitters=[];const unsubscribe=()=>{for(const emitter of emitters){emitter()}};return new Promise((resolve,reject)=>{emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`share/resolve/${eventId}`,args=>{unsubscribe();resolve(args)}));emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`share/reject/${eventId}`,error=>{unsubscribe();reject(deserializeError(error))}));window.ReactNativeWebView.postMessage(JSON.stringify({type:"method",functionName:"share",eventId,args}))})}export function setSecureScreen(...args){if(!window.ReactNativeWebView){throw new Error("This setSecureScreen is not available in browser environment")}const eventId=createEventId();const emitters=[];const unsubscribe=()=>{for(const emitter of emitters){emitter()}};return new Promise((resolve,reject)=>{emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`setSecureScreen/resolve/${eventId}`,args=>{unsubscribe();resolve(args)}));emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`setSecureScreen/reject/${eventId}`,error=>{unsubscribe();reject(deserializeError(error))}));window.ReactNativeWebView.postMessage(JSON.stringify({type:"method",functionName:"setSecureScreen",eventId,args}))})}export function setScreenAwakeMode(...args){if(!window.ReactNativeWebView){throw new Error("This setScreenAwakeMode is not available in browser environment")}const eventId=createEventId();const emitters=[];const unsubscribe=()=>{for(const emitter of emitters){emitter()}};return new Promise((resolve,reject)=>{emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`setScreenAwakeMode/resolve/${eventId}`,args=>{unsubscribe();resolve(args)}));emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`setScreenAwakeMode/reject/${eventId}`,error=>{unsubscribe();reject(deserializeError(error))}));window.ReactNativeWebView.postMessage(JSON.stringify({type:"method",functionName:"setScreenAwakeMode",eventId,args}))})}export function getNetworkStatus(...args){if(!window.ReactNativeWebView){throw new Error("This getNetworkStatus is not available in browser environment")}const eventId=createEventId();const emitters=[];const unsubscribe=()=>{for(const emitter of emitters){emitter()}};return new Promise((resolve,reject)=>{emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`getNetworkStatus/resolve/${eventId}`,args=>{unsubscribe();resolve(args)}));emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`getNetworkStatus/reject/${eventId}`,error=>{unsubscribe();reject(deserializeError(error))}));window.ReactNativeWebView.postMessage(JSON.stringify({type:"method",functionName:"getNetworkStatus",eventId,args}))})}export function getLocale(){if(!window.ReactNativeWebView){throw new Error("This getLocale is not available in browser environment")}if("getLocale"in window.__CONSTANT_HANDLER_MAP){return window.__CONSTANT_HANDLER_MAP["getLocale"]}throw new Error("getLocale is not a constant handler")}export function getSchemeUri(){if(!window.ReactNativeWebView){throw new Error("This getSchemeUri is not available in browser environment")}if("getSchemeUri"in window.__CONSTANT_HANDLER_MAP){return window.__CONSTANT_HANDLER_MAP["getSchemeUri"]}throw new Error("getSchemeUri is not a constant handler")}export function getDeviceId(){if(!window.ReactNativeWebView){throw new Error("This getDeviceId is not available in browser environment")}if("getDeviceId"in window.__CONSTANT_HANDLER_MAP){return window.__CONSTANT_HANDLER_MAP["getDeviceId"]}throw new Error("getDeviceId is not a constant handler")}export function setClipboardText(...args){if(!window.ReactNativeWebView){throw new Error("This setClipboardText is not available in browser environment")}const eventId=createEventId();const emitters=[];const unsubscribe=()=>{for(const emitter of emitters){emitter()}};return new Promise((resolve,reject)=>{emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`setClipboardText/resolve/${eventId}`,args=>{unsubscribe();resolve(args)}));emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`setClipboardText/reject/${eventId}`,error=>{unsubscribe();reject(deserializeError(error))}));window.ReactNativeWebView.postMessage(JSON.stringify({type:"method",functionName:"setClipboardText",eventId,args}))})}export function getClipboardText(...args){if(!window.ReactNativeWebView){throw new Error("This getClipboardText is not available in browser environment")}const eventId=createEventId();const emitters=[];const unsubscribe=()=>{for(const emitter of emitters){emitter()}};return new Promise((resolve,reject)=>{emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`getClipboardText/resolve/${eventId}`,args=>{unsubscribe();resolve(args)}));emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`getClipboardText/reject/${eventId}`,error=>{unsubscribe();reject(deserializeError(error))}));window.ReactNativeWebView.postMessage(JSON.stringify({type:"method",functionName:"getClipboardText",eventId,args}))})}export function fetchContacts(...args){if(!window.ReactNativeWebView){throw new Error("This fetchContacts is not available in browser environment")}const eventId=createEventId();const emitters=[];const unsubscribe=()=>{for(const emitter of emitters){emitter()}};return new Promise((resolve,reject)=>{emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`fetchContacts/resolve/${eventId}`,args=>{unsubscribe();resolve(args)}));emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`fetchContacts/reject/${eventId}`,error=>{unsubscribe();reject(deserializeError(error))}));window.ReactNativeWebView.postMessage(JSON.stringify({type:"method",functionName:"fetchContacts",eventId,args}))})}export function fetchAlbumPhotos(...args){if(!window.ReactNativeWebView){throw new Error("This fetchAlbumPhotos is not available in browser environment")}const eventId=createEventId();const emitters=[];const unsubscribe=()=>{for(const emitter of emitters){emitter()}};return new Promise((resolve,reject)=>{emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`fetchAlbumPhotos/resolve/${eventId}`,args=>{unsubscribe();resolve(args)}));emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`fetchAlbumPhotos/reject/${eventId}`,error=>{unsubscribe();reject(deserializeError(error))}));window.ReactNativeWebView.postMessage(JSON.stringify({type:"method",functionName:"fetchAlbumPhotos",eventId,args}))})}export var Accuracy=function(Accuracy){Accuracy[Accuracy["Lowest"]=1]="Lowest";Accuracy[Accuracy["Low"]=2]="Low";Accuracy[Accuracy["Balanced"]=3]="Balanced";Accuracy[Accuracy["High"]=4]="High";Accuracy[Accuracy["Highest"]=5]="Highest";Accuracy[Accuracy["BestForNavigation"]=6]="BestForNavigation";return Accuracy}({});export function getCurrentLocation(...args){if(!window.ReactNativeWebView){throw new Error("This getCurrentLocation is not available in browser environment")}const eventId=createEventId();const emitters=[];const unsubscribe=()=>{for(const emitter of emitters){emitter()}};return new Promise((resolve,reject)=>{emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`getCurrentLocation/resolve/${eventId}`,args=>{unsubscribe();resolve(args)}));emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`getCurrentLocation/reject/${eventId}`,error=>{unsubscribe();reject(deserializeError(error))}));window.ReactNativeWebView.postMessage(JSON.stringify({type:"method",functionName:"getCurrentLocation",eventId,args}))})}export function openCamera(...args){if(!window.ReactNativeWebView){throw new Error("This openCamera is not available in browser environment")}const eventId=createEventId();const emitters=[];const unsubscribe=()=>{for(const emitter of emitters){emitter()}};return new Promise((resolve,reject)=>{emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`openCamera/resolve/${eventId}`,args=>{unsubscribe();resolve(args)}));emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`openCamera/reject/${eventId}`,error=>{unsubscribe();reject(deserializeError(error))}));window.ReactNativeWebView.postMessage(JSON.stringify({type:"method",functionName:"openCamera",eventId,args}))})}export function startUpdateLocation({onEvent,onError,options}){if(!window.ReactNativeWebView){onError(new Error("This startUpdateLocation is not available in browser environment"));return()=>{}}const eventId=createEventId();const removes=[window.__BEDROCK_NATIVE_EMITTER.on(`startUpdateLocation/onEvent/${eventId}`,response=>{onEvent(response)}),window.__BEDROCK_NATIVE_EMITTER.on(`startUpdateLocation/onError/${eventId}`,error=>{onError(deserializeError(error))})];window.ReactNativeWebView.postMessage(JSON.stringify({type:"addEventListener",functionName:"startUpdateLocation",eventId,args:options}));return()=>{window.ReactNativeWebView.postMessage(JSON.stringify({type:"removeEventListener",functionName:"startUpdateLocation",eventId}));for(const remove of removes){remove()}}}
|
|
1
|
+
export const createEvents=()=>({emit(event,args){for(let callbacks=this.events[event]||[],i=0,length=callbacks.length;i<length;i++){callbacks[i](args)}},events:{},on(event,cb){var _this_events,_event;((_this_events=this.events)[_event=event]||(_this_events[_event]=[])).push(cb);return()=>{var _this_events_event;this.events[event]=(_this_events_event=this.events[event])===null||_this_events_event===void 0?void 0:_this_events_event.filter(i=>cb!==i)}}});const createEventId=()=>Math.random().toString(36).substring(2,15);const deserializeError=value=>{if(value&&value.__isError){const err=new Error(value.message);err.name=value.name;err.stack=value.stack;return err}return value};window.__BEDROCK_NATIVE_EMITTER=createEvents();export function closeView(...args){if(!window.ReactNativeWebView){throw new Error("This closeView is not available in browser environment")}const eventId=createEventId();const emitters=[];const unsubscribe=()=>{for(const emitter of emitters){emitter()}};return new Promise((resolve,reject)=>{emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`closeView/resolve/${eventId}`,args=>{unsubscribe();resolve(args)}));emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`closeView/reject/${eventId}`,error=>{unsubscribe();reject(deserializeError(error))}));window.ReactNativeWebView.postMessage(JSON.stringify({type:"method",functionName:"closeView",eventId,args}))})}export function generateHapticFeedback(...args){if(!window.ReactNativeWebView){throw new Error("This generateHapticFeedback is not available in browser environment")}const eventId=createEventId();const emitters=[];const unsubscribe=()=>{for(const emitter of emitters){emitter()}};return new Promise((resolve,reject)=>{emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`generateHapticFeedback/resolve/${eventId}`,args=>{unsubscribe();resolve(args)}));emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`generateHapticFeedback/reject/${eventId}`,error=>{unsubscribe();reject(deserializeError(error))}));window.ReactNativeWebView.postMessage(JSON.stringify({type:"method",functionName:"generateHapticFeedback",eventId,args}))})}export function share(...args){if(!window.ReactNativeWebView){throw new Error("This share is not available in browser environment")}const eventId=createEventId();const emitters=[];const unsubscribe=()=>{for(const emitter of emitters){emitter()}};return new Promise((resolve,reject)=>{emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`share/resolve/${eventId}`,args=>{unsubscribe();resolve(args)}));emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`share/reject/${eventId}`,error=>{unsubscribe();reject(deserializeError(error))}));window.ReactNativeWebView.postMessage(JSON.stringify({type:"method",functionName:"share",eventId,args}))})}export function setSecureScreen(...args){if(!window.ReactNativeWebView){throw new Error("This setSecureScreen is not available in browser environment")}const eventId=createEventId();const emitters=[];const unsubscribe=()=>{for(const emitter of emitters){emitter()}};return new Promise((resolve,reject)=>{emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`setSecureScreen/resolve/${eventId}`,args=>{unsubscribe();resolve(args)}));emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`setSecureScreen/reject/${eventId}`,error=>{unsubscribe();reject(deserializeError(error))}));window.ReactNativeWebView.postMessage(JSON.stringify({type:"method",functionName:"setSecureScreen",eventId,args}))})}export function setScreenAwakeMode(...args){if(!window.ReactNativeWebView){throw new Error("This setScreenAwakeMode is not available in browser environment")}const eventId=createEventId();const emitters=[];const unsubscribe=()=>{for(const emitter of emitters){emitter()}};return new Promise((resolve,reject)=>{emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`setScreenAwakeMode/resolve/${eventId}`,args=>{unsubscribe();resolve(args)}));emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`setScreenAwakeMode/reject/${eventId}`,error=>{unsubscribe();reject(deserializeError(error))}));window.ReactNativeWebView.postMessage(JSON.stringify({type:"method",functionName:"setScreenAwakeMode",eventId,args}))})}export function getNetworkStatus(...args){if(!window.ReactNativeWebView){throw new Error("This getNetworkStatus is not available in browser environment")}const eventId=createEventId();const emitters=[];const unsubscribe=()=>{for(const emitter of emitters){emitter()}};return new Promise((resolve,reject)=>{emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`getNetworkStatus/resolve/${eventId}`,args=>{unsubscribe();resolve(args)}));emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`getNetworkStatus/reject/${eventId}`,error=>{unsubscribe();reject(deserializeError(error))}));window.ReactNativeWebView.postMessage(JSON.stringify({type:"method",functionName:"getNetworkStatus",eventId,args}))})}export function getLocale(){if(!window.ReactNativeWebView){throw new Error("This getLocale is not available in browser environment")}if("getLocale"in window.__CONSTANT_HANDLER_MAP){return window.__CONSTANT_HANDLER_MAP["getLocale"]}throw new Error("getLocale is not a constant handler")}export function getSchemeUri(){if(!window.ReactNativeWebView){throw new Error("This getSchemeUri is not available in browser environment")}if("getSchemeUri"in window.__CONSTANT_HANDLER_MAP){return window.__CONSTANT_HANDLER_MAP["getSchemeUri"]}throw new Error("getSchemeUri is not a constant handler")}export function getDeviceId(){if(!window.ReactNativeWebView){throw new Error("This getDeviceId is not available in browser environment")}if("getDeviceId"in window.__CONSTANT_HANDLER_MAP){return window.__CONSTANT_HANDLER_MAP["getDeviceId"]}throw new Error("getDeviceId is not a constant handler")}export function getPlatformOS(){if(!window.ReactNativeWebView){throw new Error("This getPlatformOS is not available in browser environment")}if("getPlatformOS"in window.__CONSTANT_HANDLER_MAP){return window.__CONSTANT_HANDLER_MAP["getPlatformOS"]}throw new Error("getPlatformOS is not a constant handler")}export function setClipboardText(...args){if(!window.ReactNativeWebView){throw new Error("This setClipboardText is not available in browser environment")}const eventId=createEventId();const emitters=[];const unsubscribe=()=>{for(const emitter of emitters){emitter()}};return new Promise((resolve,reject)=>{emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`setClipboardText/resolve/${eventId}`,args=>{unsubscribe();resolve(args)}));emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`setClipboardText/reject/${eventId}`,error=>{unsubscribe();reject(deserializeError(error))}));window.ReactNativeWebView.postMessage(JSON.stringify({type:"method",functionName:"setClipboardText",eventId,args}))})}export function getClipboardText(...args){if(!window.ReactNativeWebView){throw new Error("This getClipboardText is not available in browser environment")}const eventId=createEventId();const emitters=[];const unsubscribe=()=>{for(const emitter of emitters){emitter()}};return new Promise((resolve,reject)=>{emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`getClipboardText/resolve/${eventId}`,args=>{unsubscribe();resolve(args)}));emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`getClipboardText/reject/${eventId}`,error=>{unsubscribe();reject(deserializeError(error))}));window.ReactNativeWebView.postMessage(JSON.stringify({type:"method",functionName:"getClipboardText",eventId,args}))})}export function fetchContacts(...args){if(!window.ReactNativeWebView){throw new Error("This fetchContacts is not available in browser environment")}const eventId=createEventId();const emitters=[];const unsubscribe=()=>{for(const emitter of emitters){emitter()}};return new Promise((resolve,reject)=>{emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`fetchContacts/resolve/${eventId}`,args=>{unsubscribe();resolve(args)}));emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`fetchContacts/reject/${eventId}`,error=>{unsubscribe();reject(deserializeError(error))}));window.ReactNativeWebView.postMessage(JSON.stringify({type:"method",functionName:"fetchContacts",eventId,args}))})}export function fetchAlbumPhotos(...args){if(!window.ReactNativeWebView){throw new Error("This fetchAlbumPhotos is not available in browser environment")}const eventId=createEventId();const emitters=[];const unsubscribe=()=>{for(const emitter of emitters){emitter()}};return new Promise((resolve,reject)=>{emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`fetchAlbumPhotos/resolve/${eventId}`,args=>{unsubscribe();resolve(args)}));emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`fetchAlbumPhotos/reject/${eventId}`,error=>{unsubscribe();reject(deserializeError(error))}));window.ReactNativeWebView.postMessage(JSON.stringify({type:"method",functionName:"fetchAlbumPhotos",eventId,args}))})}export var Accuracy=function(Accuracy){Accuracy[Accuracy["Lowest"]=1]="Lowest";Accuracy[Accuracy["Low"]=2]="Low";Accuracy[Accuracy["Balanced"]=3]="Balanced";Accuracy[Accuracy["High"]=4]="High";Accuracy[Accuracy["Highest"]=5]="Highest";Accuracy[Accuracy["BestForNavigation"]=6]="BestForNavigation";return Accuracy}({});export function getCurrentLocation(...args){if(!window.ReactNativeWebView){throw new Error("This getCurrentLocation is not available in browser environment")}const eventId=createEventId();const emitters=[];const unsubscribe=()=>{for(const emitter of emitters){emitter()}};return new Promise((resolve,reject)=>{emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`getCurrentLocation/resolve/${eventId}`,args=>{unsubscribe();resolve(args)}));emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`getCurrentLocation/reject/${eventId}`,error=>{unsubscribe();reject(deserializeError(error))}));window.ReactNativeWebView.postMessage(JSON.stringify({type:"method",functionName:"getCurrentLocation",eventId,args}))})}export function openCamera(...args){if(!window.ReactNativeWebView){throw new Error("This openCamera is not available in browser environment")}const eventId=createEventId();const emitters=[];const unsubscribe=()=>{for(const emitter of emitters){emitter()}};return new Promise((resolve,reject)=>{emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`openCamera/resolve/${eventId}`,args=>{unsubscribe();resolve(args)}));emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`openCamera/reject/${eventId}`,error=>{unsubscribe();reject(deserializeError(error))}));window.ReactNativeWebView.postMessage(JSON.stringify({type:"method",functionName:"openCamera",eventId,args}))})}export function appLogin(...args){if(!window.ReactNativeWebView){throw new Error("This appLogin is not available in browser environment")}const eventId=createEventId();const emitters=[];const unsubscribe=()=>{for(const emitter of emitters){emitter()}};return new Promise((resolve,reject)=>{emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`appLogin/resolve/${eventId}`,args=>{unsubscribe();resolve(args)}));emitters.push(window.__BEDROCK_NATIVE_EMITTER.on(`appLogin/reject/${eventId}`,error=>{unsubscribe();reject(deserializeError(error))}));window.ReactNativeWebView.postMessage(JSON.stringify({type:"method",functionName:"appLogin",eventId,args}))})}export function getOperationalEnvironment(){if(!window.ReactNativeWebView){throw new Error("This getOperationalEnvironment is not available in browser environment")}if("getOperationalEnvironment"in window.__CONSTANT_HANDLER_MAP){return window.__CONSTANT_HANDLER_MAP["getOperationalEnvironment"]}throw new Error("getOperationalEnvironment is not a constant handler")}export function startUpdateLocation({onEvent,onError,options}){if(!window.ReactNativeWebView){onError(new Error("This startUpdateLocation is not available in browser environment"));return()=>{}}const eventId=createEventId();const removes=[window.__BEDROCK_NATIVE_EMITTER.on(`startUpdateLocation/onEvent/${eventId}`,response=>{onEvent(response)}),window.__BEDROCK_NATIVE_EMITTER.on(`startUpdateLocation/onError/${eventId}`,error=>{onError(deserializeError(error))})];window.ReactNativeWebView.postMessage(JSON.stringify({type:"addEventListener",functionName:"startUpdateLocation",eventId,args:options}));return()=>{window.ReactNativeWebView.postMessage(JSON.stringify({type:"removeEventListener",functionName:"startUpdateLocation",eventId}));for(const remove of removes){remove()}}}
|
package/src-web/openCamera.d.ts
CHANGED
|
@@ -23,9 +23,7 @@ export interface OpenCameraOptions {
|
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* @public
|
|
26
|
-
* @
|
|
27
|
-
* @category AppsInTossModules
|
|
28
|
-
* @kind function
|
|
26
|
+
* @category 카메라
|
|
29
27
|
* @name openCamera
|
|
30
28
|
* @description 카메라를 실행해서 촬영된 이미지를 반환하는 함수예요.
|
|
31
29
|
* @param {OpenCameraOptions} options - 카메라 실행 시 사용되는 옵션 객체예요.
|
package/src-web/share.d.ts
CHANGED
|
@@ -30,6 +30,12 @@ declare enum Accuracy {
|
|
|
30
30
|
*/
|
|
31
31
|
BestForNavigation
|
|
32
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* @public
|
|
35
|
+
* @category 위치 정보
|
|
36
|
+
* @name Location
|
|
37
|
+
* @description 위치 정보를 나타내는 객체예요.
|
|
38
|
+
*/
|
|
33
39
|
export interface Location {
|
|
34
40
|
/**
|
|
35
41
|
* Android에서만 지원하는 옵션이에요.
|
|
@@ -44,14 +50,42 @@ export interface Location {
|
|
|
44
50
|
* 위치가 업데이트된 시점의 유닉스 타임스탬프예요.
|
|
45
51
|
*/
|
|
46
52
|
timestamp: number;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
/**
|
|
54
|
+
* @description 위치 정보를 나타내는 객체예요. 자세한 내용은 [LocationCoords](/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;
|
|
55
89
|
}
|
|
56
90
|
export interface StartUpdateLocationOptions {
|
|
57
91
|
/**
|
|
@@ -83,9 +117,7 @@ export interface UpdateLocationEventEmitter extends EventEmitterSchema<"updateLo
|
|
|
83
117
|
}
|
|
84
118
|
/**
|
|
85
119
|
* @public
|
|
86
|
-
* @
|
|
87
|
-
* @category AppsInTossModules
|
|
88
|
-
* @kind function
|
|
120
|
+
* @category 위치 정보
|
|
89
121
|
* @name startUpdateLocation
|
|
90
122
|
* @description 디바이스의 위치 정보를 지속적으로 감지하고, 위치가 변경되면 콜백을 실행하는 함수예요. 콜백 함수를 등록하면 위치가 변경될 때마다 자동으로 호출돼요.
|
|
91
123
|
* 실시간 위치 추적이 필요한 기능을 구현할 때 사용할 수 있어요. 예를 들어 지도 앱에서 사용자의 현재 위치를 실시간으로 업데이트할 때, 운동 앱에서 사용자의 이동 거리를 기록할 때 등이에요.
|
|
@@ -95,7 +127,7 @@ export interface UpdateLocationEventEmitter extends EventEmitterSchema<"updateLo
|
|
|
95
127
|
* @param {number} [options.accuracy] 위치 정확도를 설정해요.
|
|
96
128
|
* @param {number} [options.timeInterval] 위치 정보를 업데이트하는 최소 주기로, 단위는 밀리초(ms)예요. 이 값은 위치 업데이트가 발생하는 가장 짧은 간격을 설정하지만, 시스템이나 환경의 영향을 받아 지정한 주기보다 더 긴 간격으로 업데이트될 수 있어요.
|
|
97
129
|
* @param {number} [options.distanceInterval] 위치 변경 거리를 미터(m) 단위로 설정해요.
|
|
98
|
-
* @param {(location: Location) => void} [options.callback] 위치 정보가 변경될 때 호출되는 콜백 함수예요.
|
|
130
|
+
* @param {(location: Location) => void} [options.callback] 위치 정보가 변경될 때 호출되는 콜백 함수예요. 자세한 내용은 [Location](/reference/framework/Types/Location.html)을 참고해주세요.
|
|
99
131
|
*
|
|
100
132
|
* @example
|
|
101
133
|
* ### 위치 정보 변경 감지하기
|
|
@@ -112,7 +144,7 @@ export interface UpdateLocationEventEmitter extends EventEmitterSchema<"updateLo
|
|
|
112
144
|
* useEffect(() => {
|
|
113
145
|
* return startUpdateLocation({
|
|
114
146
|
* options: {
|
|
115
|
-
* accuracy: Accuracy.
|
|
147
|
+
* accuracy: Accuracy.Balanced,
|
|
116
148
|
* timeInterval: 3000,
|
|
117
149
|
* distanceInterval: 10,
|
|
118
150
|
* },
|
package/dist/chunk-5AYTRYXW.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { createRequire } from 'module'; const require = createRequire(import.meta.url);
|
|
2
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
3
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
4
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
5
|
-
}) : x)(function(x) {
|
|
6
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
7
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
8
|
-
});
|
|
9
|
-
var __esm = (fn, res) => function __init() {
|
|
10
|
-
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
11
|
-
};
|
|
12
|
-
var __commonJS = (cb, mod) => function __require2() {
|
|
13
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
// ../../.yarn/__virtual__/tsup-virtual-7254073ea3/0/cache/tsup-npm-8.3.5-ed25596739-7794953cbc.zip/node_modules/tsup/assets/esm_shims.js
|
|
17
|
-
var init_esm_shims = __esm({
|
|
18
|
-
"../../.yarn/__virtual__/tsup-virtual-7254073ea3/0/cache/tsup-npm-8.3.5-ed25596739-7794953cbc.zip/node_modules/tsup/assets/esm_shims.js"() {
|
|
19
|
-
"use strict";
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
export {
|
|
24
|
-
__require,
|
|
25
|
-
__commonJS,
|
|
26
|
-
init_esm_shims
|
|
27
|
-
};
|