@magic-sdk/react-native-expo 13.1.0 → 13.1.1-eebe81d

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/README.md CHANGED
@@ -36,7 +36,7 @@ Please note that splitting the `Expo` and `Bare React Native` Magic package is a
36
36
  ```tsx
37
37
  import React from 'react';
38
38
  import { Magic } from '@magic-sdk/react-native-expo';
39
- const magic = new Magic('YOUR_API_KEY');
39
+ const magic = new Magic('YOUR_API_KEY ');
40
40
  export default function App() {
41
41
  return <>
42
42
  {/* Render the Magic iframe! */}
package/dist/cjs/index.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var Et=Object.create;var V=Object.defineProperty,Lt=Object.defineProperties,_t=Object.getOwnPropertyDescriptor,Ot=Object.getOwnPropertyDescriptors,At=Object.getOwnPropertyNames,it=Object.getOwnPropertySymbols,Rt=Object.getPrototypeOf,st=Object.prototype.hasOwnProperty,Mt=Object.prototype.propertyIsEnumerable;var at=(n,a,i)=>a in n?V(n,a,{enumerable:!0,configurable:!0,writable:!0,value:i}):n[a]=i,ct=(n,a)=>{for(var i in a||(a={}))st.call(a,i)&&at(n,i,a[i]);if(it)for(var i of it(a))Mt.call(a,i)&&at(n,i,a[i]);return n},lt=(n,a)=>Lt(n,Ot(a));var Gt=(n,a)=>()=>(a||n((a={exports:{}}).exports,a),a.exports),Vt=(n,a)=>{for(var i in a)V(n,i,{get:a[i],enumerable:!0})},D=(n,a,i,p)=>{if(a&&typeof a=="object"||typeof a=="function")for(let c of At(a))!st.call(n,c)&&c!==i&&V(n,c,{get:()=>a[c],enumerable:!(p=_t(a,c))||p.enumerable});return n},u=(n,a,i)=>(D(n,a,"default"),i&&D(i,a,"default")),R=(n,a,i)=>(i=n!=null?Et(Rt(n)):{},D(a||!n||!n.__esModule?V(i,"default",{value:n,enumerable:!0}):i,n)),Nt=n=>D(V({},"__esModule",{value:!0}),n);var T=(n,a,i)=>new Promise((p,c)=>{var E=g=>{try{L(i.next(g))}catch(v){c(v)}},h=g=>{try{L(i.throw(g))}catch(v){c(v)}},L=g=>g.done?p(g.value):Promise.resolve(g.value).then(E,h);L((i=i.apply(n,a)).next())});var ft=Gt((Ct,Q)=>{var X=function(n){"use strict";var a=Object.prototype,i=a.hasOwnProperty,p=Object.defineProperty||function(e,t,r){e[t]=r.value},c,E=typeof Symbol=="function"?Symbol:{},h=E.iterator||"@@iterator",L=E.asyncIterator||"@@asyncIterator",g=E.toStringTag||"@@toStringTag";function v(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{v({},"")}catch{v=function(t,r,s){return t[r]=s}}function _(e,t,r,s){var o=t&&t.prototype instanceof B?t:B,l=Object.create(o.prototype),m=new x(s||[]);return p(l,"_invoke",{value:bt(e,r,m)}),l}n.wrap=_;function K(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(s){return{type:"throw",arg:s}}}var tt="suspendedStart",wt="suspendedYield",et="executing",N="completed",S={};function B(){}function P(){}function O(){}var z={};v(z,h,function(){return this});var F=Object.getPrototypeOf,k=F&&F(F(H([])));k&&k!==a&&i.call(k,h)&&(z=k);var M=O.prototype=B.prototype=Object.create(z);P.prototype=O,p(M,"constructor",{value:O,configurable:!0}),p(O,"constructor",{value:P,configurable:!0}),P.displayName=v(O,g,"GeneratorFunction");function rt(e){["next","throw","return"].forEach(function(t){v(e,t,function(r){return this._invoke(t,r)})})}n.isGeneratorFunction=function(e){var t=typeof e=="function"&&e.constructor;return t?t===P||(t.displayName||t.name)==="GeneratorFunction":!1},n.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,O):(e.__proto__=O,v(e,g,"GeneratorFunction")),e.prototype=Object.create(M),e},n.awrap=function(e){return{__await:e}};function I(e,t){function r(l,m,d,b){var y=K(e[l],e,m);if(y.type==="throw")b(y.arg);else{var q=y.arg,G=q.value;return G&&typeof G=="object"&&i.call(G,"__await")?t.resolve(G.__await).then(function(A){r("next",A,d,b)},function(A){r("throw",A,d,b)}):t.resolve(G).then(function(A){q.value=A,d(q)},function(A){return r("throw",A,d,b)})}}var s;function o(l,m){function d(){return new t(function(b,y){r(l,m,b,y)})}return s=s?s.then(d,d):d()}p(this,"_invoke",{value:o})}rt(I.prototype),v(I.prototype,L,function(){return this}),n.AsyncIterator=I,n.async=function(e,t,r,s,o){o===void 0&&(o=Promise);var l=new I(_(e,t,r,s),o);return n.isGeneratorFunction(t)?l:l.next().then(function(m){return m.done?m.value:l.next()})};function bt(e,t,r){var s=tt;return function(l,m){if(s===et)throw new Error("Generator is already running");if(s===N){if(l==="throw")throw m;return ot()}for(r.method=l,r.arg=m;;){var d=r.delegate;if(d){var b=nt(d,r);if(b){if(b===S)continue;return b}}if(r.method==="next")r.sent=r._sent=r.arg;else if(r.method==="throw"){if(s===tt)throw s=N,r.arg;r.dispatchException(r.arg)}else r.method==="return"&&r.abrupt("return",r.arg);s=et;var y=K(e,t,r);if(y.type==="normal"){if(s=r.done?N:wt,y.arg===S)continue;return{value:y.arg,done:r.done}}else y.type==="throw"&&(s=N,r.method="throw",r.arg=y.arg)}}}function nt(e,t){var r=t.method,s=e.iterator[r];if(s===c)return t.delegate=null,r==="throw"&&e.iterator.return&&(t.method="return",t.arg=c,nt(e,t),t.method==="throw")||r!=="return"&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),S;var o=K(s,e.iterator,t.arg);if(o.type==="throw")return t.method="throw",t.arg=o.arg,t.delegate=null,S;var l=o.arg;if(!l)return t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,S;if(l.done)t[e.resultName]=l.value,t.next=e.nextLoc,t.method!=="return"&&(t.method="next",t.arg=c);else return l;return t.delegate=null,S}rt(M),v(M,g,"Generator"),v(M,h,function(){return this}),v(M,"toString",function(){return"[object Generator]"});function St(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function J(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(St,this),this.reset(!0)}n.keys=function(e){var t=Object(e),r=[];for(var s in t)r.push(s);return r.reverse(),function o(){for(;r.length;){var l=r.pop();if(l in t)return o.value=l,o.done=!1,o}return o.done=!0,o}};function H(e){if(e){var t=e[h];if(t)return t.call(e);if(typeof e.next=="function")return e;if(!isNaN(e.length)){var r=-1,s=function o(){for(;++r<e.length;)if(i.call(e,r))return o.value=e[r],o.done=!1,o;return o.value=c,o.done=!0,o};return s.next=s}}return{next:ot}}n.values=H;function ot(){return{value:c,done:!0}}return x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=c,this.done=!1,this.delegate=null,this.method="next",this.arg=c,this.tryEntries.forEach(J),!e)for(var t in this)t.charAt(0)==="t"&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=c)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if(t.type==="throw")throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(b,y){return l.type="throw",l.arg=e,t.next=b,y&&(t.method="next",t.arg=c),!!y}for(var s=this.tryEntries.length-1;s>=0;--s){var o=this.tryEntries[s],l=o.completion;if(o.tryLoc==="root")return r("end");if(o.tryLoc<=this.prev){var m=i.call(o,"catchLoc"),d=i.call(o,"finallyLoc");if(m&&d){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(m){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else if(d){if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var s=this.tryEntries[r];if(s.tryLoc<=this.prev&&i.call(s,"finallyLoc")&&this.prev<s.finallyLoc){var o=s;break}}o&&(e==="break"||e==="continue")&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var l=o?o.completion:{};return l.type=e,l.arg=t,o?(this.method="next",this.next=o.finallyLoc,S):this.complete(l)},complete:function(e,t){if(e.type==="throw")throw e.arg;return e.type==="break"||e.type==="continue"?this.next=e.arg:e.type==="return"?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):e.type==="normal"&&t&&(this.next=t),S},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),J(r),S}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var s=r.completion;if(s.type==="throw"){var o=s.arg;J(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:H(e),resultName:t,nextLoc:r},this.method==="next"&&(this.arg=c),S}},n}(typeof Q=="object"?Q.exports:{});try{regeneratorRuntime=X}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=X:Function("r","regeneratorRuntime = r")(X)}});var f={};Vt(f,{Magic:()=>Dt});module.exports=Nt(f);var Yt=R(ft()),vt=require("@magic-sdk/provider"),It=R(require("process")),mt=R(require("localforage")),U=require("whatwg-url"),$=require("buffer"),dt=R(require("lodash")),yt=R(require("expo-application")),gt=require("@aveq-research/localforage-asyncstorage-driver"),Z=R(require("localforage-driver-memory"));var w=R(require("react")),W=require("react-native"),ut=require("react-native-webview"),j=require("@magic-sdk/provider"),ht=require("lodash");var Pt="MAGIC_PAYLOAD_FLAG_TYPED_ARRAY";function kt(){return W.StyleSheet.create({"magic-webview":{flex:1,backgroundColor:"transparent"},"webview-container":{flex:1,width:"100%",backgroundColor:"transparent",position:"absolute",top:0,left:0,right:0,bottom:0},show:{zIndex:1e4,elevation:1e4},hide:{zIndex:-1e4,elevation:0}})}var C=class extends j.ViewController{constructor(){super(...arguments);this.Relayer=()=>{let[i,p]=(0,w.useState)(!1),c=(0,w.useCallback)(_=>{this.webView=_},[]),E=(0,w.useCallback)(_=>{this.container=lt(ct({},_),{showOverlay:h,hideOverlay:L})},[]),h=(0,w.useCallback)(()=>{p(!0)},[]),L=(0,w.useCallback)(()=>{p(!1)},[]),g=(0,w.useMemo)(()=>[this.styles["webview-container"],i?this.styles.show:this.styles.hide],[i]),v=(0,w.useCallback)(_=>{this.handleReactNativeWebViewMessage(_)},[]);return w.default.createElement(W.View,{ref:E,style:g},w.default.createElement(ut.WebView,{ref:c,source:{uri:`${this.endpoint}/send/?params=${encodeURIComponent(this.parameters)}`},onMessage:v,style:this.styles["magic-webview"]}))}}init(){this.webView=null,this.container=null,this.styles=kt()}handleReactNativeWebViewMessage(i){var p;if(i.nativeEvent&&typeof i.nativeEvent.data=="string"&&(i.nativeEvent.url===`${this.endpoint}/send/?params=${encodeURIComponent(this.parameters)}`||i.nativeEvent.url===`${this.endpoint}/send/?params=${this.parameters}`)){let c=JSON.parse(i.nativeEvent.data,(E,h)=>{try{if(h&&typeof h=="object"&&h.flag&&h.flag==="MAGIC_PAYLOAD_FLAG_TYPED_ARRAY")return new global[h.constructor](h.data.split(","))}catch(L){}return h});if(c&&c.msgType&&this.messageHandlers.size){c.response=(p=c.response)!=null?p:{};let E={data:c};for(let h of this.messageHandlers.values())h(E)}}}hideOverlay(){this.container&&this.container.hideOverlay()}showOverlay(){this.container&&this.container.showOverlay()}_post(i){return T(this,null,function*(){if(this.webView&&this.webView.postMessage)this.webView.postMessage(JSON.stringify(i,(p,c)=>(0,ht.isTypedArray)(c)?{constructor:c.constructor.name,data:c.toString(),flag:Pt}:c),this.endpoint);else throw(0,j.createModalNotReadyError)()})}};var pt=require("@magic-sdk/provider"),Y=class extends pt.SDKBase{get Relayer(){return this.overlay.Relayer}};u(f,require("@magic-sdk/commons"),module.exports);global.process=dt.merge(global.process,It);global.process.browser=!1;global.Buffer=$.Buffer;global.URL=U.URL;global.URLSearchParams=U.URLSearchParams;global.btoa=n=>$.Buffer.from(n,"binary").toString("base64");global.atob=n=>$.Buffer.from(n,"base64").toString("binary");var Dt=(0,vt.createSDK)(Y,{platform:"react-native",sdkName:"@magic-sdk/react-native-expo",version:"13.1.0",bundleId:yt.applicationId,defaultEndpoint:"https://box.magic.link/",ViewController:C,configureStorage:()=>T(void 0,null,function*(){let n=mt.default.createInstance({name:"MagicAuthLocalStorageDB",storeName:"MagicAuthLocalStorage"}),a=(0,gt.driverWithoutSerialization)();return yield Promise.all([n.defineDriver(a),n.defineDriver(Z)]),yield n.setDriver([a._driver,Z._driver]),n})});0&&(module.exports={Magic});
1
+ "use strict";var Et=Object.create;var V=Object.defineProperty,Lt=Object.defineProperties,_t=Object.getOwnPropertyDescriptor,Ot=Object.getOwnPropertyDescriptors,At=Object.getOwnPropertyNames,it=Object.getOwnPropertySymbols,Rt=Object.getPrototypeOf,st=Object.prototype.hasOwnProperty,Mt=Object.prototype.propertyIsEnumerable;var at=(n,a,i)=>a in n?V(n,a,{enumerable:!0,configurable:!0,writable:!0,value:i}):n[a]=i,ct=(n,a)=>{for(var i in a||(a={}))st.call(a,i)&&at(n,i,a[i]);if(it)for(var i of it(a))Mt.call(a,i)&&at(n,i,a[i]);return n},lt=(n,a)=>Lt(n,Ot(a));var Gt=(n,a)=>()=>(a||n((a={exports:{}}).exports,a),a.exports),Vt=(n,a)=>{for(var i in a)V(n,i,{get:a[i],enumerable:!0})},D=(n,a,i,p)=>{if(a&&typeof a=="object"||typeof a=="function")for(let c of At(a))!st.call(n,c)&&c!==i&&V(n,c,{get:()=>a[c],enumerable:!(p=_t(a,c))||p.enumerable});return n},u=(n,a,i)=>(D(n,a,"default"),i&&D(i,a,"default")),R=(n,a,i)=>(i=n!=null?Et(Rt(n)):{},D(a||!n||!n.__esModule?V(i,"default",{value:n,enumerable:!0}):i,n)),Nt=n=>D(V({},"__esModule",{value:!0}),n);var T=(n,a,i)=>new Promise((p,c)=>{var E=g=>{try{L(i.next(g))}catch(v){c(v)}},h=g=>{try{L(i.throw(g))}catch(v){c(v)}},L=g=>g.done?p(g.value):Promise.resolve(g.value).then(E,h);L((i=i.apply(n,a)).next())});var ft=Gt((Ct,Q)=>{var X=function(n){"use strict";var a=Object.prototype,i=a.hasOwnProperty,p=Object.defineProperty||function(e,t,r){e[t]=r.value},c,E=typeof Symbol=="function"?Symbol:{},h=E.iterator||"@@iterator",L=E.asyncIterator||"@@asyncIterator",g=E.toStringTag||"@@toStringTag";function v(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{v({},"")}catch{v=function(t,r,s){return t[r]=s}}function _(e,t,r,s){var o=t&&t.prototype instanceof B?t:B,l=Object.create(o.prototype),m=new x(s||[]);return p(l,"_invoke",{value:bt(e,r,m)}),l}n.wrap=_;function K(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(s){return{type:"throw",arg:s}}}var tt="suspendedStart",wt="suspendedYield",et="executing",N="completed",S={};function B(){}function P(){}function O(){}var z={};v(z,h,function(){return this});var F=Object.getPrototypeOf,k=F&&F(F(H([])));k&&k!==a&&i.call(k,h)&&(z=k);var M=O.prototype=B.prototype=Object.create(z);P.prototype=O,p(M,"constructor",{value:O,configurable:!0}),p(O,"constructor",{value:P,configurable:!0}),P.displayName=v(O,g,"GeneratorFunction");function rt(e){["next","throw","return"].forEach(function(t){v(e,t,function(r){return this._invoke(t,r)})})}n.isGeneratorFunction=function(e){var t=typeof e=="function"&&e.constructor;return t?t===P||(t.displayName||t.name)==="GeneratorFunction":!1},n.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,O):(e.__proto__=O,v(e,g,"GeneratorFunction")),e.prototype=Object.create(M),e},n.awrap=function(e){return{__await:e}};function I(e,t){function r(l,m,d,b){var y=K(e[l],e,m);if(y.type==="throw")b(y.arg);else{var q=y.arg,G=q.value;return G&&typeof G=="object"&&i.call(G,"__await")?t.resolve(G.__await).then(function(A){r("next",A,d,b)},function(A){r("throw",A,d,b)}):t.resolve(G).then(function(A){q.value=A,d(q)},function(A){return r("throw",A,d,b)})}}var s;function o(l,m){function d(){return new t(function(b,y){r(l,m,b,y)})}return s=s?s.then(d,d):d()}p(this,"_invoke",{value:o})}rt(I.prototype),v(I.prototype,L,function(){return this}),n.AsyncIterator=I,n.async=function(e,t,r,s,o){o===void 0&&(o=Promise);var l=new I(_(e,t,r,s),o);return n.isGeneratorFunction(t)?l:l.next().then(function(m){return m.done?m.value:l.next()})};function bt(e,t,r){var s=tt;return function(l,m){if(s===et)throw new Error("Generator is already running");if(s===N){if(l==="throw")throw m;return ot()}for(r.method=l,r.arg=m;;){var d=r.delegate;if(d){var b=nt(d,r);if(b){if(b===S)continue;return b}}if(r.method==="next")r.sent=r._sent=r.arg;else if(r.method==="throw"){if(s===tt)throw s=N,r.arg;r.dispatchException(r.arg)}else r.method==="return"&&r.abrupt("return",r.arg);s=et;var y=K(e,t,r);if(y.type==="normal"){if(s=r.done?N:wt,y.arg===S)continue;return{value:y.arg,done:r.done}}else y.type==="throw"&&(s=N,r.method="throw",r.arg=y.arg)}}}function nt(e,t){var r=t.method,s=e.iterator[r];if(s===c)return t.delegate=null,r==="throw"&&e.iterator.return&&(t.method="return",t.arg=c,nt(e,t),t.method==="throw")||r!=="return"&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),S;var o=K(s,e.iterator,t.arg);if(o.type==="throw")return t.method="throw",t.arg=o.arg,t.delegate=null,S;var l=o.arg;if(!l)return t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,S;if(l.done)t[e.resultName]=l.value,t.next=e.nextLoc,t.method!=="return"&&(t.method="next",t.arg=c);else return l;return t.delegate=null,S}rt(M),v(M,g,"Generator"),v(M,h,function(){return this}),v(M,"toString",function(){return"[object Generator]"});function St(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function J(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(St,this),this.reset(!0)}n.keys=function(e){var t=Object(e),r=[];for(var s in t)r.push(s);return r.reverse(),function o(){for(;r.length;){var l=r.pop();if(l in t)return o.value=l,o.done=!1,o}return o.done=!0,o}};function H(e){if(e){var t=e[h];if(t)return t.call(e);if(typeof e.next=="function")return e;if(!isNaN(e.length)){var r=-1,s=function o(){for(;++r<e.length;)if(i.call(e,r))return o.value=e[r],o.done=!1,o;return o.value=c,o.done=!0,o};return s.next=s}}return{next:ot}}n.values=H;function ot(){return{value:c,done:!0}}return x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=c,this.done=!1,this.delegate=null,this.method="next",this.arg=c,this.tryEntries.forEach(J),!e)for(var t in this)t.charAt(0)==="t"&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=c)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if(t.type==="throw")throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(b,y){return l.type="throw",l.arg=e,t.next=b,y&&(t.method="next",t.arg=c),!!y}for(var s=this.tryEntries.length-1;s>=0;--s){var o=this.tryEntries[s],l=o.completion;if(o.tryLoc==="root")return r("end");if(o.tryLoc<=this.prev){var m=i.call(o,"catchLoc"),d=i.call(o,"finallyLoc");if(m&&d){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(m){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else if(d){if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var s=this.tryEntries[r];if(s.tryLoc<=this.prev&&i.call(s,"finallyLoc")&&this.prev<s.finallyLoc){var o=s;break}}o&&(e==="break"||e==="continue")&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var l=o?o.completion:{};return l.type=e,l.arg=t,o?(this.method="next",this.next=o.finallyLoc,S):this.complete(l)},complete:function(e,t){if(e.type==="throw")throw e.arg;return e.type==="break"||e.type==="continue"?this.next=e.arg:e.type==="return"?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):e.type==="normal"&&t&&(this.next=t),S},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),J(r),S}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var s=r.completion;if(s.type==="throw"){var o=s.arg;J(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:H(e),resultName:t,nextLoc:r},this.method==="next"&&(this.arg=c),S}},n}(typeof Q=="object"?Q.exports:{});try{regeneratorRuntime=X}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=X:Function("r","regeneratorRuntime = r")(X)}});var f={};Vt(f,{Magic:()=>Dt});module.exports=Nt(f);var Yt=R(ft()),vt=require("@magic-sdk/provider"),It=R(require("process")),mt=R(require("localforage")),U=require("whatwg-url"),$=require("buffer"),dt=R(require("lodash")),yt=R(require("expo-application")),gt=require("@aveq-research/localforage-asyncstorage-driver"),Z=R(require("localforage-driver-memory"));var w=R(require("react")),W=require("react-native"),ut=require("react-native-webview"),j=require("@magic-sdk/provider"),ht=require("lodash");var Pt="MAGIC_PAYLOAD_FLAG_TYPED_ARRAY";function kt(){return W.StyleSheet.create({"magic-webview":{flex:1,backgroundColor:"transparent"},"webview-container":{flex:1,width:"100%",backgroundColor:"transparent",position:"absolute",top:0,left:0,right:0,bottom:0},show:{zIndex:1e4,elevation:1e4},hide:{zIndex:-1e4,elevation:0}})}var C=class extends j.ViewController{constructor(){super(...arguments);this.Relayer=()=>{let[i,p]=(0,w.useState)(!1),c=(0,w.useCallback)(_=>{this.webView=_},[]),E=(0,w.useCallback)(_=>{this.container=lt(ct({},_),{showOverlay:h,hideOverlay:L})},[]),h=(0,w.useCallback)(()=>{p(!0)},[]),L=(0,w.useCallback)(()=>{p(!1)},[]),g=(0,w.useMemo)(()=>[this.styles["webview-container"],i?this.styles.show:this.styles.hide],[i]),v=(0,w.useCallback)(_=>{this.handleReactNativeWebViewMessage(_)},[]);return w.default.createElement(W.View,{ref:E,style:g},w.default.createElement(ut.WebView,{ref:c,source:{uri:`${this.endpoint}/send/?params=${encodeURIComponent(this.parameters)}`},onMessage:v,style:this.styles["magic-webview"]}))}}init(){this.webView=null,this.container=null,this.styles=kt()}handleReactNativeWebViewMessage(i){var p;if(i.nativeEvent&&typeof i.nativeEvent.data=="string"&&(i.nativeEvent.url===`${this.endpoint}/send/?params=${encodeURIComponent(this.parameters)}`||i.nativeEvent.url===`${this.endpoint}/send/?params=${this.parameters}`)){let c=JSON.parse(i.nativeEvent.data,(E,h)=>{try{if(h&&typeof h=="object"&&h.flag&&h.flag==="MAGIC_PAYLOAD_FLAG_TYPED_ARRAY")return new global[h.constructor](h.data.split(","))}catch(L){}return h});if(c&&c.msgType&&this.messageHandlers.size){c.response=(p=c.response)!=null?p:{};let E={data:c};for(let h of this.messageHandlers.values())h(E)}}}hideOverlay(){this.container&&this.container.hideOverlay()}showOverlay(){this.container&&this.container.showOverlay()}_post(i){return T(this,null,function*(){if(this.webView&&this.webView.postMessage)this.webView.postMessage(JSON.stringify(i,(p,c)=>(0,ht.isTypedArray)(c)?{constructor:c.constructor.name,data:c.toString(),flag:Pt}:c),this.endpoint);else throw(0,j.createModalNotReadyError)()})}};var pt=require("@magic-sdk/provider"),Y=class extends pt.SDKBase{get Relayer(){return this.overlay.Relayer}};u(f,require("@magic-sdk/commons"),module.exports);global.process=dt.merge(global.process,It);global.process.browser=!1;global.Buffer=$.Buffer;global.URL=U.URL;global.URLSearchParams=U.URLSearchParams;global.btoa=n=>$.Buffer.from(n,"binary").toString("base64");global.atob=n=>$.Buffer.from(n,"base64").toString("binary");var Dt=(0,vt.createSDK)(Y,{platform:"react-native",sdkName:"@magic-sdk/react-native-expo",version:"13.0.3",bundleId:yt.applicationId,defaultEndpoint:"https://box.magic.link/",ViewController:C,configureStorage:()=>T(void 0,null,function*(){let n=mt.default.createInstance({name:"MagicAuthLocalStorageDB",storeName:"MagicAuthLocalStorage"}),a=(0,gt.driverWithoutSerialization)();return yield Promise.all([n.defineDriver(a),n.defineDriver(Z)]),yield n.setDriver([a._driver,Z._driver]),n})});0&&(module.exports={Magic});
2
2
  //# sourceMappingURL=index.js.map
package/dist/es/index.js CHANGED
@@ -1,2 +1,2 @@
1
- var ft=Object.create;var $=Object.defineProperty,ut=Object.defineProperties,ht=Object.getOwnPropertyDescriptor,pt=Object.getOwnPropertyDescriptors,vt=Object.getOwnPropertyNames,Q=Object.getOwnPropertySymbols,mt=Object.getPrototypeOf,tt=Object.prototype.hasOwnProperty,dt=Object.prototype.propertyIsEnumerable;var Z=(o,s,i)=>s in o?$(o,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):o[s]=i,et=(o,s)=>{for(var i in s||(s={}))tt.call(s,i)&&Z(o,i,s[i]);if(Q)for(var i of Q(s))dt.call(s,i)&&Z(o,i,s[i]);return o},rt=(o,s)=>ut(o,pt(s));var yt=(o,s)=>()=>(s||o((s={exports:{}}).exports,s),s.exports);var gt=(o,s,i,u)=>{if(s&&typeof s=="object"||typeof s=="function")for(let c of vt(s))!tt.call(o,c)&&c!==i&&$(o,c,{get:()=>s[c],enumerable:!(u=ht(s,c))||u.enumerable});return o};var wt=(o,s,i)=>(i=o!=null?ft(mt(o)):{},gt(s||!o||!o.__esModule?$(i,"default",{value:o,enumerable:!0}):i,o));var N=(o,s,i)=>new Promise((u,c)=>{var w=d=>{try{b(i.next(d))}catch(h){c(h)}},f=d=>{try{b(i.throw(d))}catch(h){c(h)}},b=d=>d.done?u(d.value):Promise.resolve(d.value).then(w,f);b((i=i.apply(o,s)).next())});var nt=yt((Wt,B)=>{var K=function(o){"use strict";var s=Object.prototype,i=s.hasOwnProperty,u=Object.defineProperty||function(e,t,r){e[t]=r.value},c,w=typeof Symbol=="function"?Symbol:{},f=w.iterator||"@@iterator",b=w.asyncIterator||"@@asyncIterator",d=w.toStringTag||"@@toStringTag";function h(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{h({},"")}catch{h=function(t,r,a){return t[r]=a}}function S(e,t,r,a){var n=t&&t.prototype instanceof D?t:D,l=Object.create(n.prototype),p=new j(a||[]);return u(l,"_invoke",{value:ct(e,r,p)}),l}o.wrap=S;function I(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(a){return{type:"throw",arg:a}}}var J="suspendedStart",st="suspendedYield",x="executing",R="completed",g={};function D(){}function M(){}function E(){}var T={};h(T,f,function(){return this});var C=Object.getPrototypeOf,G=C&&C(C(Y([])));G&&G!==s&&i.call(G,f)&&(T=G);var _=E.prototype=D.prototype=Object.create(T);M.prototype=E,u(_,"constructor",{value:E,configurable:!0}),u(E,"constructor",{value:M,configurable:!0}),M.displayName=h(E,d,"GeneratorFunction");function H(e){["next","throw","return"].forEach(function(t){h(e,t,function(r){return this._invoke(t,r)})})}o.isGeneratorFunction=function(e){var t=typeof e=="function"&&e.constructor;return t?t===M||(t.displayName||t.name)==="GeneratorFunction":!1},o.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,E):(e.__proto__=E,h(e,d,"GeneratorFunction")),e.prototype=Object.create(_),e},o.awrap=function(e){return{__await:e}};function V(e,t){function r(l,p,v,y){var m=I(e[l],e,p);if(m.type==="throw")y(m.arg);else{var U=m.arg,O=U.value;return O&&typeof O=="object"&&i.call(O,"__await")?t.resolve(O.__await).then(function(L){r("next",L,v,y)},function(L){r("throw",L,v,y)}):t.resolve(O).then(function(L){U.value=L,v(U)},function(L){return r("throw",L,v,y)})}}var a;function n(l,p){function v(){return new t(function(y,m){r(l,p,y,m)})}return a=a?a.then(v,v):v()}u(this,"_invoke",{value:n})}H(V.prototype),h(V.prototype,b,function(){return this}),o.AsyncIterator=V,o.async=function(e,t,r,a,n){n===void 0&&(n=Promise);var l=new V(S(e,t,r,a),n);return o.isGeneratorFunction(t)?l:l.next().then(function(p){return p.done?p.value:l.next()})};function ct(e,t,r){var a=J;return function(l,p){if(a===x)throw new Error("Generator is already running");if(a===R){if(l==="throw")throw p;return X()}for(r.method=l,r.arg=p;;){var v=r.delegate;if(v){var y=q(v,r);if(y){if(y===g)continue;return y}}if(r.method==="next")r.sent=r._sent=r.arg;else if(r.method==="throw"){if(a===J)throw a=R,r.arg;r.dispatchException(r.arg)}else r.method==="return"&&r.abrupt("return",r.arg);a=x;var m=I(e,t,r);if(m.type==="normal"){if(a=r.done?R:st,m.arg===g)continue;return{value:m.arg,done:r.done}}else m.type==="throw"&&(a=R,r.method="throw",r.arg=m.arg)}}}function q(e,t){var r=t.method,a=e.iterator[r];if(a===c)return t.delegate=null,r==="throw"&&e.iterator.return&&(t.method="return",t.arg=c,q(e,t),t.method==="throw")||r!=="return"&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var n=I(a,e.iterator,t.arg);if(n.type==="throw")return t.method="throw",t.arg=n.arg,t.delegate=null,g;var l=n.arg;if(!l)return t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,g;if(l.done)t[e.resultName]=l.value,t.next=e.nextLoc,t.method!=="return"&&(t.method="next",t.arg=c);else return l;return t.delegate=null,g}H(_),h(_,d,"Generator"),h(_,f,function(){return this}),h(_,"toString",function(){return"[object Generator]"});function lt(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function W(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(lt,this),this.reset(!0)}o.keys=function(e){var t=Object(e),r=[];for(var a in t)r.push(a);return r.reverse(),function n(){for(;r.length;){var l=r.pop();if(l in t)return n.value=l,n.done=!1,n}return n.done=!0,n}};function Y(e){if(e){var t=e[f];if(t)return t.call(e);if(typeof e.next=="function")return e;if(!isNaN(e.length)){var r=-1,a=function n(){for(;++r<e.length;)if(i.call(e,r))return n.value=e[r],n.done=!1,n;return n.value=c,n.done=!0,n};return a.next=a}}return{next:X}}o.values=Y;function X(){return{value:c,done:!0}}return j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=c,this.done=!1,this.delegate=null,this.method="next",this.arg=c,this.tryEntries.forEach(W),!e)for(var t in this)t.charAt(0)==="t"&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=c)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if(t.type==="throw")throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(y,m){return l.type="throw",l.arg=e,t.next=y,m&&(t.method="next",t.arg=c),!!m}for(var a=this.tryEntries.length-1;a>=0;--a){var n=this.tryEntries[a],l=n.completion;if(n.tryLoc==="root")return r("end");if(n.tryLoc<=this.prev){var p=i.call(n,"catchLoc"),v=i.call(n,"finallyLoc");if(p&&v){if(this.prev<n.catchLoc)return r(n.catchLoc,!0);if(this.prev<n.finallyLoc)return r(n.finallyLoc)}else if(p){if(this.prev<n.catchLoc)return r(n.catchLoc,!0)}else if(v){if(this.prev<n.finallyLoc)return r(n.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&i.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var n=a;break}}n&&(e==="break"||e==="continue")&&n.tryLoc<=t&&t<=n.finallyLoc&&(n=null);var l=n?n.completion:{};return l.type=e,l.arg=t,n?(this.method="next",this.next=n.finallyLoc,g):this.complete(l)},complete:function(e,t){if(e.type==="throw")throw e.arg;return e.type==="break"||e.type==="continue"?this.next=e.arg:e.type==="return"?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):e.type==="normal"&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),W(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var a=r.completion;if(a.type==="throw"){var n=a.arg;W(r)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:Y(e),resultName:t,nextLoc:r},this.method==="next"&&(this.arg=c),g}},o}(typeof B=="object"?B.exports:{});try{regeneratorRuntime=K}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=K:Function("r","regeneratorRuntime = r")(K)}});var Jt=wt(nt());import{createSDK as Nt}from"@magic-sdk/provider";import*as Pt from"process";import kt from"localforage";import{URL as It,URLSearchParams as Dt}from"whatwg-url";import{Buffer as z}from"buffer";import*as it from"lodash";import*as at from"expo-application";import{driverWithoutSerialization as Tt}from"@aveq-research/localforage-asyncstorage-driver";import*as F from"localforage-driver-memory";import ot,{useState as bt,useCallback as A,useMemo as St}from"react";import{StyleSheet as Et,View as Lt}from"react-native";import{WebView as _t}from"react-native-webview";import{ViewController as Ot,createModalNotReadyError as At}from"@magic-sdk/provider";import{isTypedArray as Rt}from"lodash";var Mt="MAGIC_PAYLOAD_FLAG_TYPED_ARRAY";function Gt(){return Et.create({"magic-webview":{flex:1,backgroundColor:"transparent"},"webview-container":{flex:1,width:"100%",backgroundColor:"transparent",position:"absolute",top:0,left:0,right:0,bottom:0},show:{zIndex:1e4,elevation:1e4},hide:{zIndex:-1e4,elevation:0}})}var P=class extends Ot{constructor(){super(...arguments);this.Relayer=()=>{let[i,u]=bt(!1),c=A(S=>{this.webView=S},[]),w=A(S=>{this.container=rt(et({},S),{showOverlay:f,hideOverlay:b})},[]),f=A(()=>{u(!0)},[]),b=A(()=>{u(!1)},[]),d=St(()=>[this.styles["webview-container"],i?this.styles.show:this.styles.hide],[i]),h=A(S=>{this.handleReactNativeWebViewMessage(S)},[]);return ot.createElement(Lt,{ref:w,style:d},ot.createElement(_t,{ref:c,source:{uri:`${this.endpoint}/send/?params=${encodeURIComponent(this.parameters)}`},onMessage:h,style:this.styles["magic-webview"]}))}}init(){this.webView=null,this.container=null,this.styles=Gt()}handleReactNativeWebViewMessage(i){var u;if(i.nativeEvent&&typeof i.nativeEvent.data=="string"&&(i.nativeEvent.url===`${this.endpoint}/send/?params=${encodeURIComponent(this.parameters)}`||i.nativeEvent.url===`${this.endpoint}/send/?params=${this.parameters}`)){let c=JSON.parse(i.nativeEvent.data,(w,f)=>{try{if(f&&typeof f=="object"&&f.flag&&f.flag==="MAGIC_PAYLOAD_FLAG_TYPED_ARRAY")return new global[f.constructor](f.data.split(","))}catch(b){}return f});if(c&&c.msgType&&this.messageHandlers.size){c.response=(u=c.response)!=null?u:{};let w={data:c};for(let f of this.messageHandlers.values())f(w)}}}hideOverlay(){this.container&&this.container.hideOverlay()}showOverlay(){this.container&&this.container.showOverlay()}_post(i){return N(this,null,function*(){if(this.webView&&this.webView.postMessage)this.webView.postMessage(JSON.stringify(i,(u,c)=>Rt(c)?{constructor:c.constructor.name,data:c.toString(),flag:Mt}:c),this.endpoint);else throw At()})}};import{SDKBase as Vt}from"@magic-sdk/provider";var k=class extends Vt{get Relayer(){return this.overlay.Relayer}};export*from"@magic-sdk/commons";global.process=it.merge(global.process,Pt);global.process.browser=!1;global.Buffer=z;global.URL=It;global.URLSearchParams=Dt;global.btoa=o=>z.from(o,"binary").toString("base64");global.atob=o=>z.from(o,"base64").toString("binary");var ne=Nt(k,{platform:"react-native",sdkName:"@magic-sdk/react-native-expo",version:"13.1.0",bundleId:at.applicationId,defaultEndpoint:"https://box.magic.link/",ViewController:P,configureStorage:()=>N(void 0,null,function*(){let o=kt.createInstance({name:"MagicAuthLocalStorageDB",storeName:"MagicAuthLocalStorage"}),s=Tt();return yield Promise.all([o.defineDriver(s),o.defineDriver(F)]),yield o.setDriver([s._driver,F._driver]),o})});export{ne as Magic};
1
+ var ft=Object.create;var $=Object.defineProperty,ut=Object.defineProperties,ht=Object.getOwnPropertyDescriptor,pt=Object.getOwnPropertyDescriptors,vt=Object.getOwnPropertyNames,Q=Object.getOwnPropertySymbols,mt=Object.getPrototypeOf,tt=Object.prototype.hasOwnProperty,dt=Object.prototype.propertyIsEnumerable;var Z=(o,s,i)=>s in o?$(o,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):o[s]=i,et=(o,s)=>{for(var i in s||(s={}))tt.call(s,i)&&Z(o,i,s[i]);if(Q)for(var i of Q(s))dt.call(s,i)&&Z(o,i,s[i]);return o},rt=(o,s)=>ut(o,pt(s));var yt=(o,s)=>()=>(s||o((s={exports:{}}).exports,s),s.exports);var gt=(o,s,i,u)=>{if(s&&typeof s=="object"||typeof s=="function")for(let c of vt(s))!tt.call(o,c)&&c!==i&&$(o,c,{get:()=>s[c],enumerable:!(u=ht(s,c))||u.enumerable});return o};var wt=(o,s,i)=>(i=o!=null?ft(mt(o)):{},gt(s||!o||!o.__esModule?$(i,"default",{value:o,enumerable:!0}):i,o));var N=(o,s,i)=>new Promise((u,c)=>{var w=d=>{try{b(i.next(d))}catch(h){c(h)}},f=d=>{try{b(i.throw(d))}catch(h){c(h)}},b=d=>d.done?u(d.value):Promise.resolve(d.value).then(w,f);b((i=i.apply(o,s)).next())});var nt=yt((Wt,B)=>{var K=function(o){"use strict";var s=Object.prototype,i=s.hasOwnProperty,u=Object.defineProperty||function(e,t,r){e[t]=r.value},c,w=typeof Symbol=="function"?Symbol:{},f=w.iterator||"@@iterator",b=w.asyncIterator||"@@asyncIterator",d=w.toStringTag||"@@toStringTag";function h(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{h({},"")}catch{h=function(t,r,a){return t[r]=a}}function S(e,t,r,a){var n=t&&t.prototype instanceof D?t:D,l=Object.create(n.prototype),p=new j(a||[]);return u(l,"_invoke",{value:ct(e,r,p)}),l}o.wrap=S;function I(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(a){return{type:"throw",arg:a}}}var J="suspendedStart",st="suspendedYield",x="executing",R="completed",g={};function D(){}function M(){}function E(){}var T={};h(T,f,function(){return this});var C=Object.getPrototypeOf,G=C&&C(C(Y([])));G&&G!==s&&i.call(G,f)&&(T=G);var _=E.prototype=D.prototype=Object.create(T);M.prototype=E,u(_,"constructor",{value:E,configurable:!0}),u(E,"constructor",{value:M,configurable:!0}),M.displayName=h(E,d,"GeneratorFunction");function H(e){["next","throw","return"].forEach(function(t){h(e,t,function(r){return this._invoke(t,r)})})}o.isGeneratorFunction=function(e){var t=typeof e=="function"&&e.constructor;return t?t===M||(t.displayName||t.name)==="GeneratorFunction":!1},o.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,E):(e.__proto__=E,h(e,d,"GeneratorFunction")),e.prototype=Object.create(_),e},o.awrap=function(e){return{__await:e}};function V(e,t){function r(l,p,v,y){var m=I(e[l],e,p);if(m.type==="throw")y(m.arg);else{var U=m.arg,O=U.value;return O&&typeof O=="object"&&i.call(O,"__await")?t.resolve(O.__await).then(function(L){r("next",L,v,y)},function(L){r("throw",L,v,y)}):t.resolve(O).then(function(L){U.value=L,v(U)},function(L){return r("throw",L,v,y)})}}var a;function n(l,p){function v(){return new t(function(y,m){r(l,p,y,m)})}return a=a?a.then(v,v):v()}u(this,"_invoke",{value:n})}H(V.prototype),h(V.prototype,b,function(){return this}),o.AsyncIterator=V,o.async=function(e,t,r,a,n){n===void 0&&(n=Promise);var l=new V(S(e,t,r,a),n);return o.isGeneratorFunction(t)?l:l.next().then(function(p){return p.done?p.value:l.next()})};function ct(e,t,r){var a=J;return function(l,p){if(a===x)throw new Error("Generator is already running");if(a===R){if(l==="throw")throw p;return X()}for(r.method=l,r.arg=p;;){var v=r.delegate;if(v){var y=q(v,r);if(y){if(y===g)continue;return y}}if(r.method==="next")r.sent=r._sent=r.arg;else if(r.method==="throw"){if(a===J)throw a=R,r.arg;r.dispatchException(r.arg)}else r.method==="return"&&r.abrupt("return",r.arg);a=x;var m=I(e,t,r);if(m.type==="normal"){if(a=r.done?R:st,m.arg===g)continue;return{value:m.arg,done:r.done}}else m.type==="throw"&&(a=R,r.method="throw",r.arg=m.arg)}}}function q(e,t){var r=t.method,a=e.iterator[r];if(a===c)return t.delegate=null,r==="throw"&&e.iterator.return&&(t.method="return",t.arg=c,q(e,t),t.method==="throw")||r!=="return"&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var n=I(a,e.iterator,t.arg);if(n.type==="throw")return t.method="throw",t.arg=n.arg,t.delegate=null,g;var l=n.arg;if(!l)return t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,g;if(l.done)t[e.resultName]=l.value,t.next=e.nextLoc,t.method!=="return"&&(t.method="next",t.arg=c);else return l;return t.delegate=null,g}H(_),h(_,d,"Generator"),h(_,f,function(){return this}),h(_,"toString",function(){return"[object Generator]"});function lt(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function W(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(lt,this),this.reset(!0)}o.keys=function(e){var t=Object(e),r=[];for(var a in t)r.push(a);return r.reverse(),function n(){for(;r.length;){var l=r.pop();if(l in t)return n.value=l,n.done=!1,n}return n.done=!0,n}};function Y(e){if(e){var t=e[f];if(t)return t.call(e);if(typeof e.next=="function")return e;if(!isNaN(e.length)){var r=-1,a=function n(){for(;++r<e.length;)if(i.call(e,r))return n.value=e[r],n.done=!1,n;return n.value=c,n.done=!0,n};return a.next=a}}return{next:X}}o.values=Y;function X(){return{value:c,done:!0}}return j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=c,this.done=!1,this.delegate=null,this.method="next",this.arg=c,this.tryEntries.forEach(W),!e)for(var t in this)t.charAt(0)==="t"&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=c)},stop:function(){this.done=!0;var e=this.tryEntries[0],t=e.completion;if(t.type==="throw")throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(y,m){return l.type="throw",l.arg=e,t.next=y,m&&(t.method="next",t.arg=c),!!m}for(var a=this.tryEntries.length-1;a>=0;--a){var n=this.tryEntries[a],l=n.completion;if(n.tryLoc==="root")return r("end");if(n.tryLoc<=this.prev){var p=i.call(n,"catchLoc"),v=i.call(n,"finallyLoc");if(p&&v){if(this.prev<n.catchLoc)return r(n.catchLoc,!0);if(this.prev<n.finallyLoc)return r(n.finallyLoc)}else if(p){if(this.prev<n.catchLoc)return r(n.catchLoc,!0)}else if(v){if(this.prev<n.finallyLoc)return r(n.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&i.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var n=a;break}}n&&(e==="break"||e==="continue")&&n.tryLoc<=t&&t<=n.finallyLoc&&(n=null);var l=n?n.completion:{};return l.type=e,l.arg=t,n?(this.method="next",this.next=n.finallyLoc,g):this.complete(l)},complete:function(e,t){if(e.type==="throw")throw e.arg;return e.type==="break"||e.type==="continue"?this.next=e.arg:e.type==="return"?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):e.type==="normal"&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),W(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var a=r.completion;if(a.type==="throw"){var n=a.arg;W(r)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:Y(e),resultName:t,nextLoc:r},this.method==="next"&&(this.arg=c),g}},o}(typeof B=="object"?B.exports:{});try{regeneratorRuntime=K}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=K:Function("r","regeneratorRuntime = r")(K)}});var Jt=wt(nt());import{createSDK as Nt}from"@magic-sdk/provider";import*as Pt from"process";import kt from"localforage";import{URL as It,URLSearchParams as Dt}from"whatwg-url";import{Buffer as z}from"buffer";import*as it from"lodash";import*as at from"expo-application";import{driverWithoutSerialization as Tt}from"@aveq-research/localforage-asyncstorage-driver";import*as F from"localforage-driver-memory";import ot,{useState as bt,useCallback as A,useMemo as St}from"react";import{StyleSheet as Et,View as Lt}from"react-native";import{WebView as _t}from"react-native-webview";import{ViewController as Ot,createModalNotReadyError as At}from"@magic-sdk/provider";import{isTypedArray as Rt}from"lodash";var Mt="MAGIC_PAYLOAD_FLAG_TYPED_ARRAY";function Gt(){return Et.create({"magic-webview":{flex:1,backgroundColor:"transparent"},"webview-container":{flex:1,width:"100%",backgroundColor:"transparent",position:"absolute",top:0,left:0,right:0,bottom:0},show:{zIndex:1e4,elevation:1e4},hide:{zIndex:-1e4,elevation:0}})}var P=class extends Ot{constructor(){super(...arguments);this.Relayer=()=>{let[i,u]=bt(!1),c=A(S=>{this.webView=S},[]),w=A(S=>{this.container=rt(et({},S),{showOverlay:f,hideOverlay:b})},[]),f=A(()=>{u(!0)},[]),b=A(()=>{u(!1)},[]),d=St(()=>[this.styles["webview-container"],i?this.styles.show:this.styles.hide],[i]),h=A(S=>{this.handleReactNativeWebViewMessage(S)},[]);return ot.createElement(Lt,{ref:w,style:d},ot.createElement(_t,{ref:c,source:{uri:`${this.endpoint}/send/?params=${encodeURIComponent(this.parameters)}`},onMessage:h,style:this.styles["magic-webview"]}))}}init(){this.webView=null,this.container=null,this.styles=Gt()}handleReactNativeWebViewMessage(i){var u;if(i.nativeEvent&&typeof i.nativeEvent.data=="string"&&(i.nativeEvent.url===`${this.endpoint}/send/?params=${encodeURIComponent(this.parameters)}`||i.nativeEvent.url===`${this.endpoint}/send/?params=${this.parameters}`)){let c=JSON.parse(i.nativeEvent.data,(w,f)=>{try{if(f&&typeof f=="object"&&f.flag&&f.flag==="MAGIC_PAYLOAD_FLAG_TYPED_ARRAY")return new global[f.constructor](f.data.split(","))}catch(b){}return f});if(c&&c.msgType&&this.messageHandlers.size){c.response=(u=c.response)!=null?u:{};let w={data:c};for(let f of this.messageHandlers.values())f(w)}}}hideOverlay(){this.container&&this.container.hideOverlay()}showOverlay(){this.container&&this.container.showOverlay()}_post(i){return N(this,null,function*(){if(this.webView&&this.webView.postMessage)this.webView.postMessage(JSON.stringify(i,(u,c)=>Rt(c)?{constructor:c.constructor.name,data:c.toString(),flag:Mt}:c),this.endpoint);else throw At()})}};import{SDKBase as Vt}from"@magic-sdk/provider";var k=class extends Vt{get Relayer(){return this.overlay.Relayer}};export*from"@magic-sdk/commons";global.process=it.merge(global.process,Pt);global.process.browser=!1;global.Buffer=z;global.URL=It;global.URLSearchParams=Dt;global.btoa=o=>z.from(o,"binary").toString("base64");global.atob=o=>z.from(o,"base64").toString("binary");var ne=Nt(k,{platform:"react-native",sdkName:"@magic-sdk/react-native-expo",version:"13.0.3",bundleId:at.applicationId,defaultEndpoint:"https://box.magic.link/",ViewController:P,configureStorage:()=>N(void 0,null,function*(){let o=kt.createInstance({name:"MagicAuthLocalStorageDB",storeName:"MagicAuthLocalStorage"}),s=Tt();return yield Promise.all([o.defineDriver(s),o.defineDriver(F)]),yield o.setDriver([s._driver,F._driver]),o})});export{ne as Magic};
2
2
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magic-sdk/react-native-expo",
3
- "version": "13.1.0",
3
+ "version": "13.1.1-eebe81d",
4
4
  "description": "Passwordless authentication for React Native (Expo).",
5
5
  "author": "Magic Labs <team@magic.link> (https://magic.link/)",
6
6
  "license": "MIT",
@@ -48,5 +48,5 @@
48
48
  "react-native": ">=0.60",
49
49
  "react-native-webview": ">=8"
50
50
  },
51
- "gitHead": "d2439bad1fd448d1109b642b777db7220e7c3608"
51
+ "gitHead": "1ef062ea699d48d5e9a9375a93b7c147632b05ca"
52
52
  }
package/CHANGELOG.md DELETED
@@ -1,399 +0,0 @@
1
- # v13.1.0 (Fri Jan 06 2023)
2
-
3
- #### 🚀 Enhancement
4
-
5
- - Bare React Native / Expo React Native Package Split [#412](https://github.com/magiclabs/magic-js/pull/412) ([@Ariflo](https://github.com/Ariflo))
6
-
7
- #### 🐛 Bug Fix
8
-
9
- - Update core package versions ([@Ariflo](https://github.com/Ariflo))
10
- - Expo README Update ([@Ariflo](https://github.com/Ariflo))
11
- - fix lint errors ([@Ariflo](https://github.com/Ariflo))
12
- - Upates @magic-sdk/react-native-expo patch version ([@Ariflo](https://github.com/Ariflo))
13
- - Adds version patch to new SDKs ([@Ariflo](https://github.com/Ariflo))
14
- - Updates @magic-sdk/types SDK ([@Ariflo](https://github.com/Ariflo))
15
- - Create @magic-sdk/react-native-expo SDK ([@Ariflo](https://github.com/Ariflo))
16
-
17
- #### Authors: 1
18
-
19
- - Arian Flores ([@Ariflo](https://github.com/Ariflo))
20
-
21
- ---
22
-
23
- # v10.0.1 (Fri Sep 09 2022)
24
-
25
- #### 🐛 Bug Fix
26
-
27
- - Add RN TypedArray stringify conversion logic [#357](https://github.com/magiclabs/magic-js/pull/357) ([@Ethella](https://github.com/Ethella))
28
-
29
- #### Authors: 1
30
-
31
- - Jerry Liu ([@Ethella](https://github.com/Ethella))
32
-
33
- ---
34
-
35
- # v10.0.0 (Fri Aug 05 2022)
36
-
37
- #### 💥 Breaking Change
38
-
39
- - Revert "Revert "Enable bundle Id in Expo"" [#338](https://github.com/magiclabs/magic-js/pull/338) ([@Ethella](https://github.com/Ethella))
40
- - Enable bundle Id in Expo [#335](https://github.com/magiclabs/magic-js/pull/335) ([@Ethella](https://github.com/Ethella))
41
-
42
- #### 🐛 Bug Fix
43
-
44
- - Merge branch 'master' into early-access ([@bcleary06](https://github.com/bcleary06))
45
- - Update Readme and manual version bump for releases [#339](https://github.com/magiclabs/magic-js/pull/339) ([@Ethella](https://github.com/Ethella))
46
- - Revert "Enable bundle Id in Expo" [#337](https://github.com/magiclabs/magic-js/pull/337) ([@Ethella](https://github.com/Ethella))
47
-
48
- #### Authors: 2
49
-
50
- - Brian Cleary ([@bcleary06](https://github.com/bcleary06))
51
- - Jerry Liu ([@Ethella](https://github.com/Ethella))
52
-
53
- ---
54
-
55
- # v8.2.0 (Mon Mar 07 2022)
56
-
57
- #### 🐛 Bug Fix
58
-
59
- - Update READMEs with outdated context/hyperlinks ([@smithki](https://github.com/smithki))
60
- - Merge branch 'master' into smithki/better-build-system-documentation ([@smithki](https://github.com/smithki))
61
-
62
- #### 🏠 Internal
63
-
64
- - Internal documentation updates (`BUILD_SYSTEM.md`) [#283](https://github.com/magiclabs/magic-js/pull/283) ([@smithki](https://github.com/smithki))
65
-
66
- #### Authors: 1
67
-
68
- - Ian K Smith ([@smithki](https://github.com/smithki))
69
-
70
- ---
71
-
72
- # v8.1.0 (Mon Jan 31 2022)
73
-
74
- #### 🚀 Enhancement
75
-
76
- - Add special parsing logic to handle typed array in payload [#275](https://github.com/magiclabs/magic-js/pull/275) ([@Ethella](https://github.com/Ethella))
77
-
78
- #### Authors: 1
79
-
80
- - Jerry Liu ([@Ethella](https://github.com/Ethella))
81
-
82
- ---
83
-
84
- # v8.0.0 (Tue Jan 25 2022)
85
-
86
- #### 💥 Breaking Change
87
-
88
- - Switch from `microbundle` to `esbuild` [#220](https://github.com/magiclabs/magic-js/pull/220) ([@smithki](https://github.com/smithki))
89
-
90
- #### 🐛 Bug Fix
91
-
92
- - Merge with master ([@smithki](https://github.com/smithki))
93
- - Merge branch 'master' into feat/faster-builds ([@smithki](https://github.com/smithki))
94
- - Remove comments from README files ([@smithki](https://github.com/smithki))
95
-
96
- #### Authors: 1
97
-
98
- - Ian K Smith ([@smithki](https://github.com/smithki))
99
-
100
- ---
101
-
102
- # v6.1.4 (Thu Oct 21 2021)
103
-
104
- #### 🐛 Bug Fix
105
-
106
- - Revert to `.js` extension for ES module builds targeting webpack/CRA [#232](https://github.com/magiclabs/magic-js/pull/232) ([@smithki](https://github.com/smithki))
107
-
108
- #### Authors: 1
109
-
110
- - Ian K Smith ([@smithki](https://github.com/smithki))
111
-
112
- ---
113
-
114
- # v6.1.3 (Wed Oct 20 2021)
115
-
116
- #### ⚠️ Pushed to `master`
117
-
118
- - Fix dist files glob in package.json ([@smithki](https://github.com/smithki))
119
- - Merge branch 'master' of github.com:magiclabs/magic-js ([@smithki](https://github.com/smithki))
120
- - Force re-publish ([@smithki](https://github.com/smithki))
121
-
122
- #### Authors: 1
123
-
124
- - Ian K Smith ([@smithki](https://github.com/smithki))
125
-
126
- ---
127
-
128
- # v6.1.2 (Wed Oct 20 2021)
129
-
130
- #### 🐛 Bug Fix
131
-
132
- - Use '.mjs' extension for ESM build files [#230](https://github.com/magiclabs/magic-js/pull/230) ([@smithki](https://github.com/smithki))
133
-
134
- #### Authors: 1
135
-
136
- - Ian K Smith ([@smithki](https://github.com/smithki))
137
-
138
- ---
139
-
140
- # v6.0.6 (Thu Sep 23 2021)
141
-
142
- #### 🐛 Bug Fix
143
-
144
- - Port `@magic-ext/oauth`, `@magic-ext/react-native-oauth`, `@magic-ext/webauthn` extensions to Magic SDK monorepo [#218](https://github.com/magiclabs/magic-js/pull/218) ([@smithki](https://github.com/smithki))
145
- - Add `@magic-sdk/pnp` package for out-of-the-box login page UIs [#217](https://github.com/magiclabs/magic-js/pull/217) ([@smithki](https://github.com/smithki))
146
-
147
- #### Authors: 1
148
-
149
- - Ian K Smith ([@smithki](https://github.com/smithki))
150
-
151
- ---
152
-
153
- # v6.0.2 (Tue Sep 14 2021)
154
-
155
- #### 🐛 Bug Fix
156
-
157
- - Import regeneratorRuntime in Magic JS (non-CDN version) [#210](https://github.com/magiclabs/magic-js/pull/210) ([@smithki](https://github.com/smithki))
158
-
159
- #### Authors: 1
160
-
161
- - Ian K Smith ([@smithki](https://github.com/smithki))
162
-
163
- ---
164
-
165
- # v6.0.1 (Tue Sep 14 2021)
166
-
167
- #### 🐛 Bug Fix
168
-
169
- - Fix SemVer cyclic dependency issues with some hacks [#209](https://github.com/magiclabs/magic-js/pull/209) ([@smithki](https://github.com/smithki))
170
-
171
- #### Authors: 1
172
-
173
- - Ian K Smith ([@smithki](https://github.com/smithki))
174
-
175
- ---
176
-
177
- # v6.0.0 (Tue Sep 14 2021)
178
-
179
- #### 💥 Breaking Change
180
-
181
- - v6.0.0 [#208](https://github.com/magiclabs/magic-js/pull/208) ([@smithki](https://github.com/smithki))
182
-
183
- #### Authors: 1
184
-
185
- - Ian K Smith ([@smithki](https://github.com/smithki))
186
-
187
- ---
188
-
189
- # v4.4.2 (Mon Aug 16 2021)
190
-
191
- #### 🐛 Bug Fix
192
-
193
- - Migrate unit tests to Jest [#194](https://github.com/magiclabs/magic-js/pull/194) ([@smithki](https://github.com/smithki))
194
-
195
- #### Authors: 1
196
-
197
- - Ian K Smith ([@smithki](https://github.com/smithki))
198
-
199
- ---
200
-
201
- # v4.4.0 (Wed Jul 28 2021)
202
-
203
- #### 🚀 Enhancement
204
-
205
- - Add explicit JSDelivr entry-point for `magic-sdk` [#191](https://github.com/magiclabs/magic-js/pull/191) ([@smithki](https://github.com/smithki))
206
-
207
- #### Authors: 1
208
-
209
- - Ian K Smith ([@smithki](https://github.com/smithki))
210
-
211
- ---
212
-
213
- # v4.3.1 (Fri Jun 11 2021)
214
-
215
- #### 🐛 Bug Fix
216
-
217
- - Upgrade @aveq-research/localforage-asyncstorage-driver [#183](https://github.com/magiclabs/magic-js/pull/183) ([@Ethella](https://github.com/Ethella))
218
-
219
- #### Authors: 1
220
-
221
- - Jerry Liu ([@Ethella](https://github.com/Ethella))
222
-
223
- ---
224
-
225
- # v4.0.1 (Tue Dec 01 2020)
226
-
227
- #### 🐛 Bug Fix
228
-
229
- - Add 'importHelpers: true' to base tsconfig.json [#152](https://github.com/magiclabs/magic-js/pull/152) ([@smithki](https://github.com/smithki))
230
-
231
- #### 📝 Documentation
232
-
233
- - Fix incorrect TypeScript project references and update READMEs with changelog links [#151](https://github.com/magiclabs/magic-js/pull/151) ([@smithki](https://github.com/smithki))
234
-
235
- #### Authors: 1
236
-
237
- - Ian K Smith ([@smithki](https://github.com/smithki))
238
-
239
- ---
240
-
241
- # v4.0.0 (Tue Nov 17 2020)
242
-
243
- #### 💥 Breaking Change
244
-
245
- - [All packages] Internal API changes & Cleanups [#149](https://github.com/magiclabs/magic-js/pull/149) ([@smithki](https://github.com/smithki))
246
-
247
- #### 🐛 Bug Fix
248
-
249
- - Update CHANGELOGs and CONTRIBUTING guide [#146](https://github.com/magiclabs/magic-js/pull/146) ([@smithki](https://github.com/smithki))
250
-
251
- #### 🏠 Internal
252
-
253
- - Simplify scripts [#147](https://github.com/magiclabs/magic-js/pull/147) ([@smithki](https://github.com/smithki))
254
-
255
- #### Authors: 1
256
-
257
- - Ian K Smith ([@smithki](https://github.com/smithki))
258
-
259
- ---
260
-
261
- ## `3.0.1` - 10/21/2020
262
-
263
- #### Changed
264
-
265
- - Removed the following public methods and functions
266
- - `BaseExtension.utils.encodeQueryParameters`
267
- - `BaseExtension.utils.decodeQueryParameters`
268
-
269
- ## `2.8.0` - 09/24/2020
270
-
271
- #### Added
272
-
273
- - Adds a Magic SDK extensions runtime compatibility check, ensuring you're version of Magic SDK is designed for the extensions you have in use.
274
-
275
- ## `2.7.1` - 09/18/2020
276
-
277
- #### Fixed
278
-
279
- - Fix missing BigInt dependency #131
280
-
281
- ## `2.7.0` - 09/15/2020
282
-
283
- #### Added
284
-
285
- - New, optional `redirectURI` parameter for the `loginWithMagicLink` method
286
- - New `loginWithCredential` method for completing a magic link login with redirect: `await magic.auth.loginWithCredential()`
287
-
288
- ## `2.6.0` - 08/24/2020
289
-
290
- #### Added
291
-
292
- - New optional `locale` parameter to SDK constructor
293
-
294
- ## `2.5.1` - 08/20/2020
295
-
296
- #### Added
297
-
298
- - New RPC error code for the `loginWithMagicLink` method: `-10005`
299
-
300
- ## `2.4.6` - 07/22/2020
301
-
302
- #### Added
303
-
304
- - Export `PromiEvent` type and `isPromiEvent` utility from SDK entry-points (`magic-sdk` and `@magic-sdk/react-native`).
305
-
306
- ## `2.4.1` through `2.4.5` - 07/13/2020
307
-
308
- #### Fixed
309
-
310
- - Bug preventing NPM tarball from containing `/dist` files.
311
-
312
- ## `2.4.0` - 07/13/2020
313
-
314
- #### Changed
315
-
316
- - Updated build system to use TypeScript project references instead of Microbundle.
317
- - Pass `targetOrigin` parameter to `postMessage` calls.
318
-
319
- ## `2.3.1` - 07/08/2020
320
-
321
- #### Fixed
322
-
323
- - Bug affecting `localforage` type imports causing compilation failure in TypeScript.
324
-
325
- ## `2.3.0` - 07/08/2020
326
-
327
- #### Added
328
-
329
- - WebAuthn support.
330
- - `localforage` APIs for Magic SDK Extensions.
331
-
332
- ## `2.1.0` - 06/25/2020
333
-
334
- #### Changed
335
-
336
- - Update dependencies.
337
-
338
- #### Added
339
-
340
- - Add `ExtensionWarning` class.
341
-
342
- ## `2.0.5` - 06/23/2020
343
-
344
- #### Changed
345
-
346
- - Update dependencies.
347
-
348
- ## `2.0.4` - 06/23/2020
349
-
350
- #### Changed
351
-
352
- - Update dependencies.
353
-
354
- ## `2.0.3` - 06/23/2020
355
-
356
- #### Changed
357
-
358
- - Update dependencies.
359
-
360
- ## `2.0.2` - 06/22/2020
361
-
362
- #### Changed
363
-
364
- - Update dependencies.
365
-
366
- ## `2.0.1` - 06/16/2020
367
-
368
- #### Added
369
-
370
- - Introduce the `ExtensionError` type to ease handling of errors rising from Magic SDK Extensions.
371
-
372
- ## `2.0.0` - 06/12/2020
373
-
374
- #### Changed
375
-
376
- - Move "react-native-webivew" to peer dependencies
377
-
378
- ## `1.0.1` - 06/11/2020
379
-
380
- #### Changed
381
-
382
- - Update dependencies.
383
- - Circle CI tag in readme is broken after namechange from MagicHQ to MagicLabs
384
-
385
- ## `1.0.0` - 06/02/2020
386
-
387
- This is the first release our changelog records. Future updates will be logged in the following format:
388
-
389
- #### Fixed
390
-
391
- - Bug fixes and patches will be described here.
392
-
393
- #### Changed
394
-
395
- - Changes (breaking or otherwise) to current APIs will be described here.
396
-
397
- #### Added
398
-
399
- - New features or APIs will be described here.