@stacksjs/mobile 0.70.375 → 0.70.377
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 +0 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var T=((j)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(j,{get:(q,E)=>(typeof require<"u"?require:q)[E]}):j)(function(j){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+j+'" is not supported')});var G;function I(){if(G)return G;try{G=T("craft-native/mobile")}catch{throw Error("craft-native is required for the native mobile surfaces. Install it with `bun add craft-native` (>=0.0.65, the first release exporting ./mobile).")}return G}function B(j){return new Proxy({},{get:(q,E)=>I()[j]?.[E],has:(q,E)=>(E in(I()[j]??{}))})}var V=B("biometrics"),W=B("camera"),O=B("device"),H=B("haptics"),X=B("lifecycle"),Y=B("location"),Z=B("notifications"),_=B("permissions"),$=B("secureStorage"),x=B("share"),C=B("appReview"),J=B("deepLinks");function K(j){if(typeof j==="string")return j.trim()||null;if(!j||typeof j!=="object")return null;let q=j.url;return typeof q==="string"&&q.trim()?q:null}var F={async getInitialURL(){return K(await J.getInitialURL?.())},onLink(j){return J.onLink?.((q)=>{let E=K(q);if(E)j(E)})??(()=>{})}},g=B("keepAwake"),A=B("network"),U=B("pushNotifications"),z=B("health"),D=B("liveActivities"),R=B("watchConnectivity");function P(){if(typeof globalThis>"u")return;return globalThis}function w(){let j=P();return Boolean(j?.craft)&&O.isMobile()}function N(j){let q=P();if(!q)return()=>{};if(q.craft)return queueMicrotask(()=>j(new Event("craftReady"))),()=>{};let E=(Q)=>j(Q);return q.addEventListener("craftReady",E,{once:!0}),()=>q.removeEventListener("craftReady",E)}async function y(j){await H.impact("light");try{let q=await j();return await H.notification("success"),q}catch(q){throw await H.notification("error"),q}}var d={biometrics:V,camera:W,device:O,haptics:H,lifecycle:X,location:Y,notifications:Z,permissions:_,secureStorage:$,share:x,appReview:C,deepLinks:F,keepAwake:g,network:A,pushNotifications:U,health:z,liveActivities:D,watchConnectivity:R,isNativeMobile:w,onReady:N,withFeedback:y};export{y as withNativeFeedback,R as watchConnectivity,x as share,$ as secureStorage,U as pushNotifications,_ as permissions,N as onMobileReady,Z as notifications,K as normalizeDeepLinkURL,A as network,d as mobile,Y as location,D as liveActivities,X as lifecycle,g as keepAwake,w as isNativeMobile,z as health,H as haptics,O as device,F as deepLinks,W as camera,V as biometrics,C as appReview};
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@stacksjs/mobile",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "0.70.
|
|
5
|
+
"version": "0.70.377",
|
|
6
6
|
"description": "Craft-powered native mobile runtime for Stacks and STX applications",
|
|
7
7
|
"author": "Chris Breuer",
|
|
8
8
|
"license": "MIT",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"test": "bun test"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@stacksjs/build": "0.70.
|
|
35
|
+
"@stacksjs/build": "0.70.377",
|
|
36
36
|
"better-dx": "^0.2.17",
|
|
37
37
|
"craft-native": ">=0.0.55"
|
|
38
38
|
},
|