@stacksjs/mobile 0.74.51 → 0.74.52
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.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/types.d.ts +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -255,7 +255,7 @@ export declare interface LocationApi {
|
|
|
255
255
|
readRecording: () => Promise<Location[]>
|
|
256
256
|
}
|
|
257
257
|
export declare interface ShareApi {
|
|
258
|
-
share: (options: ShareOptions) => Promise<
|
|
258
|
+
share: (options: ShareOptions) => Promise<boolean>
|
|
259
259
|
isAvailable: () => boolean
|
|
260
260
|
}
|
|
261
261
|
export declare interface LifecycleApi {
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import
|
|
1
|
+
import{appReview as p,biometrics as f,camera as l,deepLinks as a,device as u,haptics as A,health as v,keepAwake as d,lifecycle as m,liveActivities as w,location as y,network as h,notifications as k,permissions as x,pushNotifications as L,secureStorage as b,share as g,watchConnectivity as R}from"craft-native/mobile";var C=f,N=l,E=u,o=A,S=m,H=y,M=k,P=x,B=b,D=g,j=p;function c(t){if(typeof t==="string")return t.trim()||null;if(!t||typeof t!=="object")return null;let e=t.url;return typeof e==="string"&&e.trim()?e:null}var T={async getInitialURL(){return c(await a.getInitialURL?.())},onLink(t){return a.onLink?.((e)=>{let i=c(e);if(i)t(i)})??(()=>{})}},K=d,U=h,W=L,F=v,I=w,O=R;function s(){if(typeof window>"u")return;return window}function n(){let t=s()?.craft;if(!t||typeof t!=="object")return null;if(!("platform"in t)||t.platform!=="ios"&&t.platform!=="android")return null;let e="capabilities"in t?t.capabilities:void 0,i=e&&typeof e==="object"&&!Array.isArray(e)?Object.fromEntries(Object.entries(e).filter(([,r])=>typeof r==="boolean")):{};return{platform:t.platform,capabilities:i}}function q(){return n()!==null}function z(t){let e=s();if(!e)return()=>{};if(n()){let r=!1;return queueMicrotask(()=>{if(!r)t(new Event("craftReady"))}),()=>{r=!0}}let i=(r)=>{if(!n())return;e.removeEventListener("craftReady",i),t(r)};return e.addEventListener("craftReady",i),()=>e.removeEventListener("craftReady",i)}async function G(t){await o.impact("light");try{let e=await t();return await o.notification("success"),e}catch(e){throw await o.notification("error"),e}}var Q={get nativeBridge(){return n()},biometrics:C,camera:N,device:E,haptics:o,lifecycle:S,location:H,notifications:M,permissions:P,secureStorage:B,share:D,appReview:j,deepLinks:T,keepAwake:K,network:U,pushNotifications:W,health:F,liveActivities:I,watchConnectivity:O,isNativeMobile:q,onReady:z,withFeedback:G};export{j as appReview,C as biometrics,N as camera,T as deepLinks,E as device,n as getNativeMobileBridge,o as haptics,F as health,q as isNativeMobile,K as keepAwake,S as lifecycle,I as liveActivities,H as location,Q as mobile,U as network,c as normalizeDeepLinkURL,M as notifications,z as onMobileReady,P as permissions,W as pushNotifications,B as secureStorage,D as share,O as watchConnectivity,G as withNativeFeedback};
|
package/dist/types.d.ts
CHANGED
|
@@ -204,7 +204,7 @@ export declare interface LocationApi {
|
|
|
204
204
|
readRecording: () => Promise<Location[]>
|
|
205
205
|
}
|
|
206
206
|
export declare interface ShareApi {
|
|
207
|
-
share: (options: ShareOptions) => Promise<
|
|
207
|
+
share: (options: ShareOptions) => Promise<boolean>
|
|
208
208
|
isAvailable: () => boolean
|
|
209
209
|
}
|
|
210
210
|
export declare interface LifecycleApi {
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@stacksjs/mobile",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "0.74.
|
|
5
|
+
"version": "0.74.52",
|
|
6
6
|
"description": "Craft-powered native mobile runtime for Stacks and STX applications",
|
|
7
7
|
"author": "Chris Breuer",
|
|
8
8
|
"license": "MIT",
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
"test": "bun test"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"craft-native": ">=0.0.
|
|
35
|
+
"craft-native": ">=0.0.92"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@stacksjs/build": "0.74.
|
|
38
|
+
"@stacksjs/build": "0.74.52",
|
|
39
39
|
"better-dx": "^0.2.24"
|
|
40
40
|
}
|
|
41
41
|
}
|