@tarojs/rn-runner 3.8.0-canary.0 → 4.0.0-alpha.2

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 CHANGED
@@ -158,3 +158,17 @@ MIT (stencil-vue2-output-target):
158
158
  The following files embed [stencil-vue2-output-target](https://github.com/diondree/stencil-vue2-output-target) MIT:
159
159
  `/packages/taro-components-library-vue2/src/vue-component-lib/utils.ts`
160
160
  See `/LICENSE` for details of the license.
161
+
162
+ ==================
163
+
164
+ MIT (weui):
165
+ The following files embed [stencil-vue2-output-target](https://github.com/Tencent/weui) MIT:
166
+ `/packages/taro-components/src/components/*.scss`
167
+ See `/LICENSE.txt` for details of the license.
168
+
169
+ ==================
170
+
171
+ Apache-2.0 (intersection-observer):
172
+ The following files embed [intersection-observer](https://github.com/GoogleChromeLabs/intersection-observer) Apache-2.0:
173
+ `/packages/taro-api/src/polyfill/intersection-observer.ts`
174
+ See `/LICENSE.txt` for details of the license.
@@ -51,7 +51,7 @@ var _indexScssStyleSheet = StyleSheet.create({
51
51
  }
52
52
  });
53
53
 
54
- function _mergeEleStyles(){return [].concat.apply([],arguments).reduce((pre,cur)=>Object.assign(pre,cur),{});}var _styleSheet=_indexScssStyleSheet;console.log({taro:taro});function Cell(_ref){var children=_ref.children,style=_ref.style;var childs=Array.isArray(children)?children:[children];return jsx(View,{style:_mergeEleStyles(_styleSheet["cellGroup"],Object.assign({},style)),children:childs.map(function(it,i){return [it].concat(i===children.length-1?[]:jsx(View,{style:_styleSheet["cellItem__line"]},"line-"+i));})});}function Item(_ref2){var title=_ref2.title,children=_ref2.children,style=_ref2.style;return jsxs(View,{style:_mergeEleStyles(_styleSheet["cellItem"],Object.assign({},style)),children:[jsx(Text,{style:_styleSheet["cellItem__title"],children:title}),jsx(View,{style:_styleSheet["cellItem__content"],children:children})]});}Cell.Item=Item;
54
+ function _mergeEleStyles(){return [].concat.apply([],arguments).reduce((pre,cur)=>Object.assign(pre,cur),{});}var _styleSheet=_indexScssStyleSheet;console.log({taro:taro});function Cell(_ref){var children=_ref.children,style=_ref.style;var childs=Array.isArray(children)?children:[children];return jsx(View,{style:_mergeEleStyles(_styleSheet["cellGroup"],Object.assign({},style)),children:childs.map(function(it,i){return [it].concat(i===children.length-1?[]:jsx(View,{style:_styleSheet["cellItem__line"]},\`line-\${i}\`));})});}function Item(_ref2){var title=_ref2.title,children=_ref2.children,style=_ref2.style;return jsxs(View,{style:_mergeEleStyles(_styleSheet["cellItem"],Object.assign({},style)),children:[jsx(Text,{style:_styleSheet["cellItem__title"],children:title}),jsx(View,{style:_styleSheet["cellItem__content"],children:children})]});}Cell.Item=Item;
55
55
 
56
56
  export { Cell as default };
57
57
  ",
@@ -146,7 +146,7 @@ var _indexScssStyleSheet = StyleSheet.create({
146
146
  }
147
147
  });
148
148
 
149
- function _mergeEleStyles(){return [].concat.apply([],arguments).reduce((pre,cur)=>Object.assign(pre,cur),{});}var _styleSheet=_indexScssStyleSheet;console.log({taro:taro});function Cell(_ref){var children=_ref.children,style=_ref.style;var childs=Array.isArray(children)?children:[children];return jsx(View,{style:_mergeEleStyles(_styleSheet["cellGroup"],Object.assign({},style)),children:childs.map(function(it,i){return [it].concat(i===children.length-1?[]:jsx(View,{style:_styleSheet["cellItem__line"]},"line-"+i));})});}function Item(_ref2){var title=_ref2.title,children=_ref2.children,style=_ref2.style;return jsxs(View,{style:_mergeEleStyles(_styleSheet["cellItem"],Object.assign({},style)),children:[jsx(Text,{style:_styleSheet["cellItem__title"],children:title}),jsx(View,{style:_styleSheet["cellItem__content"],children:children})]});}Cell.Item=Item;
149
+ function _mergeEleStyles(){return [].concat.apply([],arguments).reduce((pre,cur)=>Object.assign(pre,cur),{});}var _styleSheet=_indexScssStyleSheet;console.log({taro:taro});function Cell(_ref){var children=_ref.children,style=_ref.style;var childs=Array.isArray(children)?children:[children];return jsx(View,{style:_mergeEleStyles(_styleSheet["cellGroup"],Object.assign({},style)),children:childs.map(function(it,i){return [it].concat(i===children.length-1?[]:jsx(View,{style:_styleSheet["cellItem__line"]},\`line-\${i}\`));})});}function Item(_ref2){var title=_ref2.title,children=_ref2.children,style=_ref2.style;return jsxs(View,{style:_mergeEleStyles(_styleSheet["cellItem"],Object.assign({},style)),children:[jsx(Text,{style:_styleSheet["cellItem__title"],children:title}),jsx(View,{style:_styleSheet["cellItem__content"],children:children})]});}Cell.Item=Item;
150
150
 
151
151
  export { Cell as default };
152
152
  ",
@@ -207,10 +207,7 @@ export { Navbar as default };
207
207
 
208
208
  exports[`build_components named export 1`] = `
209
209
  [
210
- "import { Platform as Platform$1, NativeModules, NativeEventEmitter } from 'react-native';
211
- import 'react-native/Libraries/EventEmitter/RCTDeviceEventEmitter';
212
- import 'react';
213
- import require$$0 from 'crypto';
210
+ "import { Platform as Platform$2, NativeModules, NativeEventEmitter } from 'react-native';
214
211
 
215
212
  function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}
216
213
 
@@ -236,18 +233,12 @@ function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var inf
236
233
 
237
234
  function _defineProperty(obj,key,value){key=_toPropertyKey(key);if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else {obj[key]=value;}return obj;}
238
235
 
239
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
240
-
241
236
  var invariant=function(condition,format,a,b,c,d,e,f){if(!condition){var error;if(format===undefined){error=new Error('Minified exception occurred; use the non-minified dev environment '+'for the full error message and additional helpful warnings.');}else {var args=[a,b,c,d,e,f];var argIndex=0;error=new Error(format.replace(/%s/g,function(){return args[argIndex++];}));error.name='Invariant Violation';}error.framesToPop=1;throw error;}};var invariant_1=invariant;
242
237
 
243
- var nativeEmitterSubscriptionKey='@@nativeEmitterSubscription@@';var EventEmitter=function(){function EventEmitter(nativeModule){_classCallCheck(this,EventEmitter);this._listenerCount=0;if(nativeModule.__expo_module_name__&&NativeModules.EXReactNativeEventEmitter){nativeModule.addListener=function(){var _NativeModules$EXReac;for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}return (_NativeModules$EXReac=NativeModules.EXReactNativeEventEmitter).addProxiedListener.apply(_NativeModules$EXReac,[nativeModule.__expo_module_name__].concat(args));};nativeModule.removeListeners=function(){var _NativeModules$EXReac2;for(var _len2=arguments.length,args=new Array(_len2),_key2=0;_key2<_len2;_key2++){args[_key2]=arguments[_key2];}return (_NativeModules$EXReac2=NativeModules.EXReactNativeEventEmitter).removeProxiedListeners.apply(_NativeModules$EXReac2,[nativeModule.__expo_module_name__].concat(args));};}this._nativeModule=nativeModule;this._eventEmitter=new NativeEventEmitter(nativeModule);}_createClass(EventEmitter,[{key:"addListener",value:function addListener(eventName,listener){var _this=this,_subscription;if(!this._listenerCount&&Platform$1.OS!=='ios'&&this._nativeModule.startObserving){this._nativeModule.startObserving();}this._listenerCount++;var nativeEmitterSubscription=this._eventEmitter.addListener(eventName,listener);var subscription=(_subscription={},_defineProperty(_subscription,nativeEmitterSubscriptionKey,nativeEmitterSubscription),_defineProperty(_subscription,"remove",function remove(){_this.removeSubscription(subscription);}),_subscription);return subscription;}},{key:"removeAllListeners",value:function removeAllListeners(eventName){var removedListenerCount=this._eventEmitter.listenerCount?this._eventEmitter.listenerCount(eventName):this._eventEmitter.listeners(eventName).length;this._eventEmitter.removeAllListeners(eventName);this._listenerCount-=removedListenerCount;invariant_1(this._listenerCount>=0,"EventEmitter must have a non-negative number of listeners");if(!this._listenerCount&&Platform$1.OS!=='ios'&&this._nativeModule.stopObserving){this._nativeModule.stopObserving();}}},{key:"removeSubscription",value:function removeSubscription(subscription){var nativeEmitterSubscription=subscription[nativeEmitterSubscriptionKey];if(!nativeEmitterSubscription){return;}if('remove'in nativeEmitterSubscription){nativeEmitterSubscription.remove();}else if('removeSubscription'in this._eventEmitter){this._eventEmitter.removeSubscription(nativeEmitterSubscription);}this._listenerCount--;delete subscription[nativeEmitterSubscriptionKey];subscription.remove=function(){};if(!this._listenerCount&&Platform$1.OS!=='ios'&&this._nativeModule.stopObserving){this._nativeModule.stopObserving();}}},{key:"emit",value:function emit(eventName){var _this$_eventEmitter;for(var _len3=arguments.length,params=new Array(_len3>1?_len3-1:0),_key3=1;_key3<_len3;_key3++){params[_key3-1]=arguments[_key3];}(_this$_eventEmitter=this._eventEmitter).emit.apply(_this$_eventEmitter,[eventName].concat(params));}}]);return EventEmitter;}();
238
+ var nativeEmitterSubscriptionKey='@@nativeEmitterSubscription@@';var EventEmitter=function(){function EventEmitter(nativeModule){_classCallCheck(this,EventEmitter);this._listenerCount=0;if(nativeModule.__expo_module_name__&&NativeModules.EXReactNativeEventEmitter){nativeModule.addListener=function(){var _NativeModules$EXReac;for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}return (_NativeModules$EXReac=NativeModules.EXReactNativeEventEmitter).addProxiedListener.apply(_NativeModules$EXReac,[nativeModule.__expo_module_name__].concat(args));};nativeModule.removeListeners=function(){var _NativeModules$EXReac2;for(var _len2=arguments.length,args=new Array(_len2),_key2=0;_key2<_len2;_key2++){args[_key2]=arguments[_key2];}return (_NativeModules$EXReac2=NativeModules.EXReactNativeEventEmitter).removeProxiedListeners.apply(_NativeModules$EXReac2,[nativeModule.__expo_module_name__].concat(args));};}this._nativeModule=nativeModule;this._eventEmitter=new NativeEventEmitter(nativeModule);}_createClass(EventEmitter,[{key:"addListener",value:function addListener(eventName,listener){var _this=this,_subscription;if(!this._listenerCount&&Platform$2.OS!=='ios'&&this._nativeModule.startObserving){this._nativeModule.startObserving();}this._listenerCount++;var nativeEmitterSubscription=this._eventEmitter.addListener(eventName,listener);var subscription=(_subscription={},_defineProperty(_subscription,nativeEmitterSubscriptionKey,nativeEmitterSubscription),_defineProperty(_subscription,"remove",function remove(){_this.removeSubscription(subscription);}),_subscription);return subscription;}},{key:"removeAllListeners",value:function removeAllListeners(eventName){var removedListenerCount=this._eventEmitter.listenerCount?this._eventEmitter.listenerCount(eventName):this._eventEmitter.listeners(eventName).length;this._eventEmitter.removeAllListeners(eventName);this._listenerCount-=removedListenerCount;invariant_1(this._listenerCount>=0,\`EventEmitter must have a non-negative number of listeners\`);if(!this._listenerCount&&Platform$2.OS!=='ios'&&this._nativeModule.stopObserving){this._nativeModule.stopObserving();}}},{key:"removeSubscription",value:function removeSubscription(subscription){var nativeEmitterSubscription=subscription[nativeEmitterSubscriptionKey];if(!nativeEmitterSubscription){return;}if('remove'in nativeEmitterSubscription){nativeEmitterSubscription.remove();}this._listenerCount--;delete subscription[nativeEmitterSubscriptionKey];subscription.remove=function(){};if(!this._listenerCount&&Platform$2.OS!=='ios'&&this._nativeModule.stopObserving){this._nativeModule.stopObserving();}}},{key:"emit",value:function emit(eventName){var _this$_eventEmitter;for(var _len3=arguments.length,params=new Array(_len3>1?_len3-1:0),_key3=1;_key3<_len3;_key3++){params[_key3-1]=arguments[_key3];}(_this$_eventEmitter=this._eventEmitter).emit.apply(_this$_eventEmitter,[eventName].concat(params));}}]);return EventEmitter;}();
244
239
 
245
240
  var NativeModulesProxy = {};
246
241
 
247
- var isDOMAvailable=false;var canUseEventListeners=false;var canUseViewport=false;var isAsyncDebugging=false;if(__DEV__){isAsyncDebugging=!global.nativeExtensions&&!global.nativeCallSyncHook&&!global.RN$Bridgeless;}
248
-
249
- var Platform={OS:Platform$1.OS,select:Platform$1.select,isDOMAvailable:isDOMAvailable,canUseEventListeners:canUseEventListeners,canUseViewport:canUseViewport,isAsyncDebugging:isAsyncDebugging};
250
-
251
242
  function _isNativeFunction(fn){return Function.toString.call(fn).indexOf("[native code]")!==-1;}
252
243
 
253
244
  function _isNativeReflectConstruct$3(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}
@@ -258,44 +249,36 @@ function _wrapNativeSuper(Class){var _cache=typeof Map==="function"?new Map():un
258
249
 
259
250
  function _createSuper$2(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct$2();return function(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else {result=Super.apply(this,arguments);}return _possibleConstructorReturn(this,result);};}function _isNativeReflectConstruct$2(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}var CodedError=function(_Error){_inherits(CodedError,_Error);var _super=_createSuper$2(CodedError);function CodedError(code,message){var _this;_classCallCheck(this,CodedError);_this=_super.call(this,message);_this.code=code;return _this;}return _createClass(CodedError);}(_wrapNativeSuper(Error));
260
251
 
261
- function _createSuper$1(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct$1();return function(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else {result=Super.apply(this,arguments);}return _possibleConstructorReturn(this,result);};}function _isNativeReflectConstruct$1(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}var UnavailabilityError=function(_CodedError){_inherits(UnavailabilityError,_CodedError);var _super=_createSuper$1(UnavailabilityError);function UnavailabilityError(moduleName,propertyName){_classCallCheck(this,UnavailabilityError);return _super.call(this,'ERR_UNAVAILABLE',"The method or property "+moduleName+"."+propertyName+" is not available on "+Platform.OS+", are you sure you've linked all the native dependencies properly?");}return _createClass(UnavailabilityError);}(CodedError);
262
-
263
- var NativeErrorManager = NativeModulesProxy.ExpoModulesCoreErrorManager;
264
-
265
- if(__DEV__&&Platform.OS==='android'&&NativeErrorManager){var onNewException='ExpoModulesCoreErrorManager.onNewException';var eventEmitter=new EventEmitter(NativeErrorManager);eventEmitter.addListener(onNewException,function(_ref){var message=_ref.message;console.error(message);});}global.ExpoModulesCore_CodedError=CodedError;
252
+ var isDOMAvailable=false;var canUseEventListeners=false;var canUseViewport=false;var isAsyncDebugging=false;if(__DEV__){isAsyncDebugging=!global.nativeExtensions&&!global.nativeCallSyncHook&&!global.RN$Bridgeless;}
266
253
 
267
- var compareVersions = {exports: {}};
254
+ var Platform={OS:Platform$2.OS,select:Platform$2.select,isDOMAvailable:isDOMAvailable,canUseEventListeners:canUseEventListeners,canUseViewport:canUseViewport,isAsyncDebugging:isAsyncDebugging};var Platform$1 = Platform;
268
255
 
269
- (function(module){(function(root,factory){module.exports=factory();})(commonjsGlobal,function(){var semver=/^v?(?:\\d+)(\\.(?:[x*]|\\d+)(\\.(?:[x*]|\\d+)(\\.(?:[x*]|\\d+))?(?:-[\\da-z\\-]+(?:\\.[\\da-z\\-]+)*)?(?:\\+[\\da-z\\-]+(?:\\.[\\da-z\\-]+)*)?)?)?$/i;function indexOrEnd(str,q){return str.indexOf(q)===-1?str.length:str.indexOf(q);}function split(v){var c=v.replace(/^v/,'').replace(/\\+.*$/,'');var patchIndex=indexOrEnd(c,'-');var arr=c.substring(0,patchIndex).split('.');arr.push(c.substring(patchIndex+1));return arr;}function tryParse(v){return isNaN(Number(v))?v:Number(v);}function validate(version){if(typeof version!=='string'){throw new TypeError('Invalid argument expected string');}if(!semver.test(version)){throw new Error('Invalid argument not valid semver (\\''+version+'\\' received)');}}function compareVersions(v1,v2){[v1,v2].forEach(validate);var s1=split(v1);var s2=split(v2);for(var i=0;i<Math.max(s1.length-1,s2.length-1);i++){var n1=parseInt(s1[i]||0,10);var n2=parseInt(s2[i]||0,10);if(n1>n2)return 1;if(n2>n1)return -1;}var sp1=s1[s1.length-1];var sp2=s2[s2.length-1];if(sp1&&sp2){var p1=sp1.split('.').map(tryParse);var p2=sp2.split('.').map(tryParse);for(i=0;i<Math.max(p1.length,p2.length);i++){if(p1[i]===undefined||typeof p2[i]==='string'&&typeof p1[i]==='number')return -1;if(p2[i]===undefined||typeof p1[i]==='string'&&typeof p2[i]==='number')return 1;if(p1[i]>p2[i])return 1;if(p2[i]>p1[i])return -1;}}else if(sp1||sp2){return sp1?-1:1;}return 0;}var allowedOperators=['>','>=','=','<','<='];var operatorResMap={'>':[1],'>=':[0,1],'=':[0],'<=':[-1,0],'<':[-1]};function validateOperator(op){if(typeof op!=='string'){throw new TypeError('Invalid operator type, expected string but got '+typeof op);}if(allowedOperators.indexOf(op)===-1){throw new TypeError('Invalid operator, expected one of '+allowedOperators.join('|'));}}compareVersions.validate=function(version){return typeof version==='string'&&semver.test(version);};compareVersions.compare=function(v1,v2,operator){validateOperator(operator);var res=compareVersions(v1,v2);return operatorResMap[operator].indexOf(res)>-1;};return compareVersions;});})(compareVersions);
256
+ function _createSuper$1(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct$1();return function(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else {result=Super.apply(this,arguments);}return _possibleConstructorReturn(this,result);};}function _isNativeReflectConstruct$1(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}var UnavailabilityError=function(_CodedError){_inherits(UnavailabilityError,_CodedError);var _super=_createSuper$1(UnavailabilityError);function UnavailabilityError(moduleName,propertyName){_classCallCheck(this,UnavailabilityError);return _super.call(this,'ERR_UNAVAILABLE',\`The method or property \${moduleName}.\${propertyName} is not available on \${Platform$1.OS}, are you sure you've linked all the native dependencies properly?\`);}return _createClass(UnavailabilityError);}(CodedError);
270
257
 
271
- var PermissionStatus;(function(PermissionStatus){PermissionStatus["GRANTED"]="granted";PermissionStatus["UNDETERMINED"]="undetermined";PermissionStatus["DENIED"]="denied";})(PermissionStatus||(PermissionStatus={}));
258
+ var NativeErrorManager = NativeModulesProxy.ExpoModulesCoreErrorManager;
272
259
 
273
- var crypto=require$$0;var rng$2=function(){return crypto.randomBytes(16);};
260
+ if(__DEV__&&Platform$1.OS==='android'&&NativeErrorManager){var onNewException='ExpoModulesCoreErrorManager.onNewException';var onNewWarning='ExpoModulesCoreErrorManager.onNewWarning';var eventEmitter=new EventEmitter(NativeErrorManager);eventEmitter.addListener(onNewException,function(_ref){var message=_ref.message;console.error(message);});eventEmitter.addListener(onNewWarning,function(_ref2){var message=_ref2.message;console.warn(message);});}globalThis.ExpoModulesCore_CodedError=CodedError;
274
261
 
275
- var byteToHex=[];for(var i=0;i<256;++i){byteToHex[i]=(i+0x100).toString(16).substr(1);}function bytesToUuid$2(buf,offset){var i=offset||0;var bth=byteToHex;return [bth[buf[i++]],bth[buf[i++]],bth[buf[i++]],bth[buf[i++]],'-',bth[buf[i++]],bth[buf[i++]],'-',bth[buf[i++]],bth[buf[i++]],'-',bth[buf[i++]],bth[buf[i++]],'-',bth[buf[i++]],bth[buf[i++]],bth[buf[i++]],bth[buf[i++]],bth[buf[i++]],bth[buf[i++]]].join('');}var bytesToUuid_1=bytesToUuid$2;
262
+ var byteToHex=[];for(var i=0;i<256;++i){byteToHex[i]=(i+0x100).toString(16).substr(1);}function bytesToUuid(buf,offset){var i=offset||0;var bth=byteToHex;return [bth[buf[i++]],bth[buf[i++]],bth[buf[i++]],bth[buf[i++]],'-',bth[buf[i++]],bth[buf[i++]],'-',bth[buf[i++]],bth[buf[i++]],'-',bth[buf[i++]],bth[buf[i++]],'-',bth[buf[i++]],bth[buf[i++]],bth[buf[i++]],bth[buf[i++]],bth[buf[i++]],bth[buf[i++]]].join('');}
276
263
 
277
- var rng$1=rng$2;var bytesToUuid$1=bytesToUuid_1;var _nodeId;var _clockseq;var _lastMSecs=0;var _lastNSecs=0;function v1$1(options,buf,offset){var i=buf&&offset||0;var b=buf||[];options=options||{};var node=options.node||_nodeId;var clockseq=options.clockseq!==undefined?options.clockseq:_clockseq;if(node==null||clockseq==null){var seedBytes=rng$1();if(node==null){node=_nodeId=[seedBytes[0]|0x01,seedBytes[1],seedBytes[2],seedBytes[3],seedBytes[4],seedBytes[5]];}if(clockseq==null){clockseq=_clockseq=(seedBytes[6]<<8|seedBytes[7])&0x3fff;}}var msecs=options.msecs!==undefined?options.msecs:new Date().getTime();var nsecs=options.nsecs!==undefined?options.nsecs:_lastNSecs+1;var dt=msecs-_lastMSecs+(nsecs-_lastNSecs)/10000;if(dt<0&&options.clockseq===undefined){clockseq=clockseq+1&0x3fff;}if((dt<0||msecs>_lastMSecs)&&options.nsecs===undefined){nsecs=0;}if(nsecs>=10000){throw new Error('uuid.v1(): Can\\'t create more than 10M uuids/sec');}_lastMSecs=msecs;_lastNSecs=nsecs;_clockseq=clockseq;msecs+=12219292800000;var tl=((msecs&0xfffffff)*10000+nsecs)%0x100000000;b[i++]=tl>>>24&0xff;b[i++]=tl>>>16&0xff;b[i++]=tl>>>8&0xff;b[i++]=tl&0xff;var tmh=msecs/0x100000000*10000&0xfffffff;b[i++]=tmh>>>8&0xff;b[i++]=tmh&0xff;b[i++]=tmh>>>24&0xf|0x10;b[i++]=tmh>>>16&0xff;b[i++]=clockseq>>>8|0x80;b[i++]=clockseq&0xff;for(var n=0;n<6;++n){b[i+n]=node[n];}return buf?buf:bytesToUuid$1(b);}var v1_1=v1$1;
264
+ var Uuidv5Namespace;(function(Uuidv5Namespace){Uuidv5Namespace["dns"]="6ba7b810-9dad-11d1-80b4-00c04fd430c8";Uuidv5Namespace["url"]="6ba7b811-9dad-11d1-80b4-00c04fd430c8";Uuidv5Namespace["oid"]="6ba7b812-9dad-11d1-80b4-00c04fd430c8";Uuidv5Namespace["x500"]="6ba7b814-9dad-11d1-80b4-00c04fd430c8";})(Uuidv5Namespace||(Uuidv5Namespace={}));
278
265
 
279
- var rng=rng$2;var bytesToUuid=bytesToUuid_1;function v4$1(options,buf,offset){var i=buf&&offset||0;if(typeof options=='string'){buf=options==='binary'?new Array(16):null;options=null;}options=options||{};var rnds=options.random||(options.rng||rng)();rnds[6]=rnds[6]&0x0f|0x40;rnds[8]=rnds[8]&0x3f|0x80;if(buf){for(var ii=0;ii<16;++ii){buf[i+ii]=rnds[ii];}}return buf||bytesToUuid(rnds);}var v4_1=v4$1;
266
+ var _globalThis$expo,_globalThis$expo2;var nativeUuidv4=globalThis==null?void 0:(_globalThis$expo=globalThis.expo)==null?void 0:_globalThis$expo.uuidv4;var nativeUuidv5=globalThis==null?void 0:(_globalThis$expo2=globalThis.expo)==null?void 0:_globalThis$expo2.uuidv5;function uuidv4(){if(!nativeUuidv4){throw Error("Native UUID version 4 generator implementation wasn't found in \`expo-modules-core\`");}return nativeUuidv4();}function uuidv5(name,namespace){var parsedNamespace=Array.isArray(namespace)&&namespace.length===16?bytesToUuid(namespace):namespace;if(Array.isArray(parsedNamespace)){throw new Error('\`namespace\` must be a valid UUID string or an Array of 16 byte values');}if(!nativeUuidv5){throw Error("Native UUID type 5 generator implementation wasn't found in \`expo-modules-core\`");}return nativeUuidv5(name,parsedNamespace);}var uuid={v4:uuidv4,v5:uuidv5,namespace:Uuidv5Namespace};var uuid$1 = uuid;
280
267
 
281
- var v1=v1_1;var v4=v4_1;var uuid=v4;uuid.v1=v1;uuid.v4=v4;var uuid_1=uuid;
268
+ function requireOptionalNativeModule(moduleName){var _ref,_ref2,_globalThis$expo$modu,_globalThis$expo,_globalThis$expo$modu2,_globalThis$ExpoModul;ensureNativeModulesAreInstalled();return (_ref=(_ref2=(_globalThis$expo$modu=(_globalThis$expo=globalThis.expo)==null?void 0:(_globalThis$expo$modu2=_globalThis$expo.modules)==null?void 0:_globalThis$expo$modu2[moduleName])!=null?_globalThis$expo$modu:(_globalThis$ExpoModul=globalThis.ExpoModules)==null?void 0:_globalThis$ExpoModul[moduleName])!=null?_ref2:NativeModulesProxy[moduleName])!=null?_ref:null;}function ensureNativeModulesAreInstalled(){if(globalThis.expo){return;}try{var _NativeModules$ExpoMo;(_NativeModules$ExpoMo=NativeModules.ExpoModulesCore)==null?void 0:_NativeModules$ExpoMo.installModules();}catch(error){console.error(\`Unable to install Expo modules: \${error}\`);}}
282
269
 
283
- var platformModule$1={get name(){return 'ExponentFileSystem';},get documentDirectory(){return null;},get cacheDirectory(){return null;},get bundledAssets(){return null;},get bundleDirectory(){return null;},addListener:function addListener(){},removeListeners:function removeListeners(){}};var ExponentFileSystemShim = platformModule$1;
270
+ var platformModule={get name(){return 'ExponentFileSystem';},get documentDirectory(){return null;},get cacheDirectory(){return null;},get bundleDirectory(){return null;},addListener:function addListener(){},removeListeners:function removeListeners(){}};var ExponentFileSystemShim = platformModule;
284
271
 
285
- var platformModule;if(NativeModulesProxy.ExponentFileSystem){platformModule=NativeModulesProxy.ExponentFileSystem;}else {platformModule=ExponentFileSystemShim;}var ExponentFileSystem = platformModule;
272
+ var _requireOptionalNativ;var ExponentFileSystem = (_requireOptionalNativ=requireOptionalNativeModule('ExponentFileSystem'))!=null?_requireOptionalNativ:ExponentFileSystemShim;
286
273
 
287
274
  var FileSystemSessionType;(function(FileSystemSessionType){FileSystemSessionType[FileSystemSessionType["BACKGROUND"]=0]="BACKGROUND";FileSystemSessionType[FileSystemSessionType["FOREGROUND"]=1]="FOREGROUND";})(FileSystemSessionType||(FileSystemSessionType={}));var FileSystemUploadType;(function(FileSystemUploadType){FileSystemUploadType[FileSystemUploadType["BINARY_CONTENT"]=0]="BINARY_CONTENT";FileSystemUploadType[FileSystemUploadType["MULTIPART"]=1]="MULTIPART";})(FileSystemUploadType||(FileSystemUploadType={}));var EncodingType;(function(EncodingType){EncodingType["UTF8"]="utf8";EncodingType["Base64"]="base64";})(EncodingType||(EncodingType={}));
288
275
 
289
- function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else {result=Super.apply(this,arguments);}return _possibleConstructorReturn(this,result);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}if(!ExponentFileSystem){console.warn("No native ExponentFileSystem module found, are you sure the expo-file-system's module is linked properly?");}new EventEmitter(ExponentFileSystem);function normalizeEndingSlash(p){if(p!=null){return p.replace(/\\/*$/,'')+'/';}return null;}var documentDirectory=normalizeEndingSlash(ExponentFileSystem.documentDirectory);var cacheDirectory=normalizeEndingSlash(ExponentFileSystem.cacheDirectory);var bundledAssets=ExponentFileSystem.bundledAssets,bundleDirectory=ExponentFileSystem.bundleDirectory;function getInfoAsync(){return _getInfoAsync.apply(this,arguments);}function _getInfoAsync(){_getInfoAsync=_asyncToGenerator(function*(fileUri){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(!ExponentFileSystem.getInfoAsync){throw new UnavailabilityError('expo-file-system','getInfoAsync');}return yield ExponentFileSystem.getInfoAsync(fileUri,options);});return _getInfoAsync.apply(this,arguments);}function readAsStringAsync(){return _readAsStringAsync.apply(this,arguments);}function _readAsStringAsync(){_readAsStringAsync=_asyncToGenerator(function*(fileUri,options){if(!ExponentFileSystem.readAsStringAsync){throw new UnavailabilityError('expo-file-system','readAsStringAsync');}return yield ExponentFileSystem.readAsStringAsync(fileUri,options||{});});return _readAsStringAsync.apply(this,arguments);}function getContentUriAsync(){return _getContentUriAsync.apply(this,arguments);}function _getContentUriAsync(){_getContentUriAsync=_asyncToGenerator(function*(fileUri){if(Platform$1.OS==='android'){if(!ExponentFileSystem.getContentUriAsync){throw new UnavailabilityError('expo-file-system','getContentUriAsync');}return yield ExponentFileSystem.getContentUriAsync(fileUri);}else {return new Promise(function(resolve){resolve(fileUri);});}});return _getContentUriAsync.apply(this,arguments);}function writeAsStringAsync(){return _writeAsStringAsync.apply(this,arguments);}function _writeAsStringAsync(){_writeAsStringAsync=_asyncToGenerator(function*(fileUri,contents){var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};if(!ExponentFileSystem.writeAsStringAsync){throw new UnavailabilityError('expo-file-system','writeAsStringAsync');}return yield ExponentFileSystem.writeAsStringAsync(fileUri,contents,options);});return _writeAsStringAsync.apply(this,arguments);}function deleteAsync(){return _deleteAsync.apply(this,arguments);}function _deleteAsync(){_deleteAsync=_asyncToGenerator(function*(fileUri){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(!ExponentFileSystem.deleteAsync){throw new UnavailabilityError('expo-file-system','deleteAsync');}return yield ExponentFileSystem.deleteAsync(fileUri,options);});return _deleteAsync.apply(this,arguments);}function deleteLegacyDocumentDirectoryAndroid(){return _deleteLegacyDocumentDirectoryAndroid.apply(this,arguments);}function _deleteLegacyDocumentDirectoryAndroid(){_deleteLegacyDocumentDirectoryAndroid=_asyncToGenerator(function*(){if(Platform$1.OS!=='android'||documentDirectory==null){return;}return yield deleteAsync(documentDirectory+"ExperienceData/",{idempotent:true});});return _deleteLegacyDocumentDirectoryAndroid.apply(this,arguments);}function moveAsync(){return _moveAsync.apply(this,arguments);}function _moveAsync(){_moveAsync=_asyncToGenerator(function*(options){if(!ExponentFileSystem.moveAsync){throw new UnavailabilityError('expo-file-system','moveAsync');}return yield ExponentFileSystem.moveAsync(options);});return _moveAsync.apply(this,arguments);}function copyAsync(){return _copyAsync.apply(this,arguments);}function _copyAsync(){_copyAsync=_asyncToGenerator(function*(options){if(!ExponentFileSystem.copyAsync){throw new UnavailabilityError('expo-file-system','copyAsync');}return yield ExponentFileSystem.copyAsync(options);});return _copyAsync.apply(this,arguments);}function makeDirectoryAsync(){return _makeDirectoryAsync.apply(this,arguments);}function _makeDirectoryAsync(){_makeDirectoryAsync=_asyncToGenerator(function*(fileUri){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(!ExponentFileSystem.makeDirectoryAsync){throw new UnavailabilityError('expo-file-system','makeDirectoryAsync');}return yield ExponentFileSystem.makeDirectoryAsync(fileUri,options);});return _makeDirectoryAsync.apply(this,arguments);}function readDirectoryAsync(){return _readDirectoryAsync.apply(this,arguments);}function _readDirectoryAsync(){_readDirectoryAsync=_asyncToGenerator(function*(fileUri){if(!ExponentFileSystem.readDirectoryAsync){throw new UnavailabilityError('expo-file-system','readDirectoryAsync');}return yield ExponentFileSystem.readDirectoryAsync(fileUri,{});});return _readDirectoryAsync.apply(this,arguments);}function getFreeDiskStorageAsync(){return _getFreeDiskStorageAsync.apply(this,arguments);}function _getFreeDiskStorageAsync(){_getFreeDiskStorageAsync=_asyncToGenerator(function*(){if(!ExponentFileSystem.getFreeDiskStorageAsync){throw new UnavailabilityError('expo-file-system','getFreeDiskStorageAsync');}return yield ExponentFileSystem.getFreeDiskStorageAsync();});return _getFreeDiskStorageAsync.apply(this,arguments);}function getTotalDiskCapacityAsync(){return _getTotalDiskCapacityAsync.apply(this,arguments);}function _getTotalDiskCapacityAsync(){_getTotalDiskCapacityAsync=_asyncToGenerator(function*(){if(!ExponentFileSystem.getTotalDiskCapacityAsync){throw new UnavailabilityError('expo-file-system','getTotalDiskCapacityAsync');}return yield ExponentFileSystem.getTotalDiskCapacityAsync();});return _getTotalDiskCapacityAsync.apply(this,arguments);}function downloadAsync(){return _downloadAsync.apply(this,arguments);}function _downloadAsync(){_downloadAsync=_asyncToGenerator(function*(uri,fileUri){var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};if(!ExponentFileSystem.downloadAsync){throw new UnavailabilityError('expo-file-system','downloadAsync');}return yield ExponentFileSystem.downloadAsync(uri,fileUri,Object.assign({sessionType:FileSystemSessionType.BACKGROUND},options));});return _downloadAsync.apply(this,arguments);}function uploadAsync(){return _uploadAsync.apply(this,arguments);}function _uploadAsync(){_uploadAsync=_asyncToGenerator(function*(url,fileUri){var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};if(!ExponentFileSystem.uploadAsync){throw new UnavailabilityError('expo-file-system','uploadAsync');}return yield ExponentFileSystem.uploadAsync(url,fileUri,Object.assign({sessionType:FileSystemSessionType.BACKGROUND,uploadType:FileSystemUploadType.BINARY_CONTENT},options,{httpMethod:(options.httpMethod||'POST').toUpperCase()}));});return _uploadAsync.apply(this,arguments);}function createDownloadResumable(uri,fileUri,options,callback,resumeData){return new DownloadResumable(uri,fileUri,options,callback,resumeData);}function createUploadTask(url,fileUri,options,callback){return new UploadTask(url,fileUri,options,callback);}var FileSystemCancellableNetworkTask=function(){function FileSystemCancellableNetworkTask(){_classCallCheck(this,FileSystemCancellableNetworkTask);this._uuid=uuid_1.v4();this.taskWasCanceled=false;this.emitter=new EventEmitter(ExponentFileSystem);}_createClass(FileSystemCancellableNetworkTask,[{key:"cancelAsync",value:function(){var _cancelAsync=_asyncToGenerator(function*(){if(!ExponentFileSystem.networkTaskCancelAsync){throw new UnavailabilityError('expo-file-system','networkTaskCancelAsync');}this.removeSubscription();this.taskWasCanceled=true;return yield ExponentFileSystem.networkTaskCancelAsync(this.uuid);});function cancelAsync(){return _cancelAsync.apply(this,arguments);}return cancelAsync;}()},{key:"isTaskCancelled",value:function isTaskCancelled(){if(this.taskWasCanceled){console.warn('This task was already canceled.');return true;}return false;}},{key:"uuid",get:function get(){return this._uuid;}},{key:"addSubscription",value:function addSubscription(){var _this=this;if(this.subscription){return;}this.subscription=this.emitter.addListener(this.getEventName(),function(event){if(event.uuid===_this.uuid){var callback=_this.getCallback();if(callback){callback(event.data);}}});}},{key:"removeSubscription",value:function removeSubscription(){if(!this.subscription){return;}this.emitter.removeSubscription(this.subscription);this.subscription=null;}}]);return FileSystemCancellableNetworkTask;}();var UploadTask=function(_FileSystemCancellabl){_inherits(UploadTask,_FileSystemCancellabl);var _super=_createSuper(UploadTask);function UploadTask(url,fileUri,options,callback){var _options$httpMethod;var _this2;_classCallCheck(this,UploadTask);_this2=_super.call(this);_this2.url=url;_this2.fileUri=fileUri;_this2.callback=callback;var httpMethod=(options==null?void 0:(_options$httpMethod=options.httpMethod)==null?void 0:_options$httpMethod.toUpperCase())||'POST';_this2.options=Object.assign({sessionType:FileSystemSessionType.BACKGROUND,uploadType:FileSystemUploadType.BINARY_CONTENT},options,{httpMethod:httpMethod});return _this2;}_createClass(UploadTask,[{key:"getEventName",value:function getEventName(){return 'expo-file-system.uploadProgress';}},{key:"getCallback",value:function getCallback(){return this.callback;}},{key:"uploadAsync",value:function(){var _uploadAsync2=_asyncToGenerator(function*(){if(!ExponentFileSystem.uploadTaskStartAsync){throw new UnavailabilityError('expo-file-system','uploadTaskStartAsync');}if(this.isTaskCancelled()){return;}this.addSubscription();var result=yield ExponentFileSystem.uploadTaskStartAsync(this.url,this.fileUri,this.uuid,this.options);this.removeSubscription();return result;});function uploadAsync(){return _uploadAsync2.apply(this,arguments);}return uploadAsync;}()}]);return UploadTask;}(FileSystemCancellableNetworkTask);var DownloadResumable=function(_FileSystemCancellabl2){_inherits(DownloadResumable,_FileSystemCancellabl2);var _super2=_createSuper(DownloadResumable);function DownloadResumable(url,_fileUri){var _this3;var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var callback=arguments.length>3?arguments[3]:undefined;var resumeData=arguments.length>4?arguments[4]:undefined;_classCallCheck(this,DownloadResumable);_this3=_super2.call(this);_this3.url=url;_this3._fileUri=_fileUri;_this3.options=options;_this3.callback=callback;_this3.resumeData=resumeData;return _this3;}_createClass(DownloadResumable,[{key:"fileUri",get:function get(){return this._fileUri;}},{key:"getEventName",value:function getEventName(){return 'expo-file-system.downloadProgress';}},{key:"getCallback",value:function getCallback(){return this.callback;}},{key:"downloadAsync",value:function(){var _downloadAsync2=_asyncToGenerator(function*(){if(!ExponentFileSystem.downloadResumableStartAsync){throw new UnavailabilityError('expo-file-system','downloadResumableStartAsync');}if(this.isTaskCancelled()){return;}this.addSubscription();return yield ExponentFileSystem.downloadResumableStartAsync(this.url,this._fileUri,this.uuid,this.options,this.resumeData);});function downloadAsync(){return _downloadAsync2.apply(this,arguments);}return downloadAsync;}()},{key:"pauseAsync",value:function(){var _pauseAsync=_asyncToGenerator(function*(){if(!ExponentFileSystem.downloadResumablePauseAsync){throw new UnavailabilityError('expo-file-system','downloadResumablePauseAsync');}if(this.isTaskCancelled()){return {fileUri:this._fileUri,options:this.options,url:this.url};}var pauseResult=yield ExponentFileSystem.downloadResumablePauseAsync(this.uuid);this.removeSubscription();if(pauseResult){this.resumeData=pauseResult.resumeData;return this.savable();}else {throw new Error('Unable to generate a savable pause state');}});function pauseAsync(){return _pauseAsync.apply(this,arguments);}return pauseAsync;}()},{key:"resumeAsync",value:function(){var _resumeAsync=_asyncToGenerator(function*(){if(!ExponentFileSystem.downloadResumableStartAsync){throw new UnavailabilityError('expo-file-system','downloadResumableStartAsync');}if(this.isTaskCancelled()){return;}this.addSubscription();return yield ExponentFileSystem.downloadResumableStartAsync(this.url,this.fileUri,this.uuid,this.options,this.resumeData);});function resumeAsync(){return _resumeAsync.apply(this,arguments);}return resumeAsync;}()},{key:"savable",value:function savable(){return {url:this.url,fileUri:this.fileUri,options:this.options,resumeData:this.resumeData};}}]);return DownloadResumable;}(FileSystemCancellableNetworkTask);var baseReadAsStringAsync=readAsStringAsync;var baseWriteAsStringAsync=writeAsStringAsync;var baseDeleteAsync=deleteAsync;var baseMoveAsync=moveAsync;var baseCopyAsync=copyAsync;var StorageAccessFramework;(function(StorageAccessFramework){StorageAccessFramework.getUriForDirectoryInRoot=function getUriForDirectoryInRoot(folderName){return "content://com.android.externalstorage.documents/tree/primary:"+folderName+"/document/primary:"+folderName;};function requestDirectoryPermissionsAsync(){return _requestDirectoryPermissionsAsync.apply(this,arguments);}function _requestDirectoryPermissionsAsync(){_requestDirectoryPermissionsAsync=_asyncToGenerator(function*(){var initialFileUrl=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;if(!ExponentFileSystem.requestDirectoryPermissionsAsync){throw new UnavailabilityError('expo-file-system','StorageAccessFramework.requestDirectoryPermissionsAsync');}return yield ExponentFileSystem.requestDirectoryPermissionsAsync(initialFileUrl);});return _requestDirectoryPermissionsAsync.apply(this,arguments);}StorageAccessFramework.requestDirectoryPermissionsAsync=requestDirectoryPermissionsAsync;function readDirectoryAsync(_x16){return _readDirectoryAsync2.apply(this,arguments);}function _readDirectoryAsync2(){_readDirectoryAsync2=_asyncToGenerator(function*(dirUri){if(!ExponentFileSystem.readSAFDirectoryAsync){throw new UnavailabilityError('expo-file-system','StorageAccessFramework.readDirectoryAsync');}return yield ExponentFileSystem.readSAFDirectoryAsync(dirUri,{});});return _readDirectoryAsync2.apply(this,arguments);}StorageAccessFramework.readDirectoryAsync=readDirectoryAsync;function makeDirectoryAsync(_x17,_x18){return _makeDirectoryAsync2.apply(this,arguments);}function _makeDirectoryAsync2(){_makeDirectoryAsync2=_asyncToGenerator(function*(parentUri,dirName){if(!ExponentFileSystem.makeSAFDirectoryAsync){throw new UnavailabilityError('expo-file-system','StorageAccessFramework.makeDirectoryAsync');}return yield ExponentFileSystem.makeSAFDirectoryAsync(parentUri,dirName);});return _makeDirectoryAsync2.apply(this,arguments);}StorageAccessFramework.makeDirectoryAsync=makeDirectoryAsync;function createFileAsync(_x19,_x20,_x21){return _createFileAsync.apply(this,arguments);}function _createFileAsync(){_createFileAsync=_asyncToGenerator(function*(parentUri,fileName,mimeType){if(!ExponentFileSystem.createSAFFileAsync){throw new UnavailabilityError('expo-file-system','StorageAccessFramework.createFileAsync');}return yield ExponentFileSystem.createSAFFileAsync(parentUri,fileName,mimeType);});return _createFileAsync.apply(this,arguments);}StorageAccessFramework.createFileAsync=createFileAsync;StorageAccessFramework.writeAsStringAsync=baseWriteAsStringAsync;StorageAccessFramework.readAsStringAsync=baseReadAsStringAsync;StorageAccessFramework.deleteAsync=baseDeleteAsync;StorageAccessFramework.moveAsync=baseMoveAsync;StorageAccessFramework.copyAsync=baseCopyAsync;})(StorageAccessFramework||(StorageAccessFramework={}));
276
+ function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else {result=Super.apply(this,arguments);}return _possibleConstructorReturn(this,result);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}if(!ExponentFileSystem){console.warn("No native ExponentFileSystem module found, are you sure the expo-file-system's module is linked properly?");}new EventEmitter(ExponentFileSystem);function normalizeEndingSlash(p){if(p!=null){return p.replace(/\\/*$/,'')+'/';}return null;}var documentDirectory=normalizeEndingSlash(ExponentFileSystem.documentDirectory);var cacheDirectory=normalizeEndingSlash(ExponentFileSystem.cacheDirectory);var bundleDirectory=normalizeEndingSlash(ExponentFileSystem.bundleDirectory);function getInfoAsync(){return _getInfoAsync.apply(this,arguments);}function _getInfoAsync(){_getInfoAsync=_asyncToGenerator(function*(fileUri){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(!ExponentFileSystem.getInfoAsync){throw new UnavailabilityError('expo-file-system','getInfoAsync');}return yield ExponentFileSystem.getInfoAsync(fileUri,options);});return _getInfoAsync.apply(this,arguments);}function readAsStringAsync(){return _readAsStringAsync.apply(this,arguments);}function _readAsStringAsync(){_readAsStringAsync=_asyncToGenerator(function*(fileUri){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(!ExponentFileSystem.readAsStringAsync){throw new UnavailabilityError('expo-file-system','readAsStringAsync');}return yield ExponentFileSystem.readAsStringAsync(fileUri,options);});return _readAsStringAsync.apply(this,arguments);}function getContentUriAsync(){return _getContentUriAsync.apply(this,arguments);}function _getContentUriAsync(){_getContentUriAsync=_asyncToGenerator(function*(fileUri){if(Platform$2.OS==='android'){if(!ExponentFileSystem.getContentUriAsync){throw new UnavailabilityError('expo-file-system','getContentUriAsync');}return yield ExponentFileSystem.getContentUriAsync(fileUri);}else {return fileUri;}});return _getContentUriAsync.apply(this,arguments);}function writeAsStringAsync(){return _writeAsStringAsync.apply(this,arguments);}function _writeAsStringAsync(){_writeAsStringAsync=_asyncToGenerator(function*(fileUri,contents){var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};if(!ExponentFileSystem.writeAsStringAsync){throw new UnavailabilityError('expo-file-system','writeAsStringAsync');}return yield ExponentFileSystem.writeAsStringAsync(fileUri,contents,options);});return _writeAsStringAsync.apply(this,arguments);}function deleteAsync(){return _deleteAsync.apply(this,arguments);}function _deleteAsync(){_deleteAsync=_asyncToGenerator(function*(fileUri){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(!ExponentFileSystem.deleteAsync){throw new UnavailabilityError('expo-file-system','deleteAsync');}return yield ExponentFileSystem.deleteAsync(fileUri,options);});return _deleteAsync.apply(this,arguments);}function deleteLegacyDocumentDirectoryAndroid(){return _deleteLegacyDocumentDirectoryAndroid.apply(this,arguments);}function _deleteLegacyDocumentDirectoryAndroid(){_deleteLegacyDocumentDirectoryAndroid=_asyncToGenerator(function*(){if(Platform$2.OS!=='android'||documentDirectory==null){return;}return yield deleteAsync(\`\${documentDirectory}ExperienceData/\`,{idempotent:true});});return _deleteLegacyDocumentDirectoryAndroid.apply(this,arguments);}function moveAsync(){return _moveAsync.apply(this,arguments);}function _moveAsync(){_moveAsync=_asyncToGenerator(function*(options){if(!ExponentFileSystem.moveAsync){throw new UnavailabilityError('expo-file-system','moveAsync');}return yield ExponentFileSystem.moveAsync(options);});return _moveAsync.apply(this,arguments);}function copyAsync(){return _copyAsync.apply(this,arguments);}function _copyAsync(){_copyAsync=_asyncToGenerator(function*(options){if(!ExponentFileSystem.copyAsync){throw new UnavailabilityError('expo-file-system','copyAsync');}return yield ExponentFileSystem.copyAsync(options);});return _copyAsync.apply(this,arguments);}function makeDirectoryAsync(){return _makeDirectoryAsync.apply(this,arguments);}function _makeDirectoryAsync(){_makeDirectoryAsync=_asyncToGenerator(function*(fileUri){var options=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(!ExponentFileSystem.makeDirectoryAsync){throw new UnavailabilityError('expo-file-system','makeDirectoryAsync');}return yield ExponentFileSystem.makeDirectoryAsync(fileUri,options);});return _makeDirectoryAsync.apply(this,arguments);}function readDirectoryAsync(){return _readDirectoryAsync.apply(this,arguments);}function _readDirectoryAsync(){_readDirectoryAsync=_asyncToGenerator(function*(fileUri){if(!ExponentFileSystem.readDirectoryAsync){throw new UnavailabilityError('expo-file-system','readDirectoryAsync');}return yield ExponentFileSystem.readDirectoryAsync(fileUri);});return _readDirectoryAsync.apply(this,arguments);}function getFreeDiskStorageAsync(){return _getFreeDiskStorageAsync.apply(this,arguments);}function _getFreeDiskStorageAsync(){_getFreeDiskStorageAsync=_asyncToGenerator(function*(){if(!ExponentFileSystem.getFreeDiskStorageAsync){throw new UnavailabilityError('expo-file-system','getFreeDiskStorageAsync');}return yield ExponentFileSystem.getFreeDiskStorageAsync();});return _getFreeDiskStorageAsync.apply(this,arguments);}function getTotalDiskCapacityAsync(){return _getTotalDiskCapacityAsync.apply(this,arguments);}function _getTotalDiskCapacityAsync(){_getTotalDiskCapacityAsync=_asyncToGenerator(function*(){if(!ExponentFileSystem.getTotalDiskCapacityAsync){throw new UnavailabilityError('expo-file-system','getTotalDiskCapacityAsync');}return yield ExponentFileSystem.getTotalDiskCapacityAsync();});return _getTotalDiskCapacityAsync.apply(this,arguments);}function downloadAsync(){return _downloadAsync.apply(this,arguments);}function _downloadAsync(){_downloadAsync=_asyncToGenerator(function*(uri,fileUri){var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};if(!ExponentFileSystem.downloadAsync){throw new UnavailabilityError('expo-file-system','downloadAsync');}return yield ExponentFileSystem.downloadAsync(uri,fileUri,Object.assign({sessionType:FileSystemSessionType.BACKGROUND},options));});return _downloadAsync.apply(this,arguments);}function uploadAsync(){return _uploadAsync.apply(this,arguments);}function _uploadAsync(){_uploadAsync=_asyncToGenerator(function*(url,fileUri){var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};if(!ExponentFileSystem.uploadAsync){throw new UnavailabilityError('expo-file-system','uploadAsync');}return yield ExponentFileSystem.uploadAsync(url,fileUri,Object.assign({sessionType:FileSystemSessionType.BACKGROUND,uploadType:FileSystemUploadType.BINARY_CONTENT},options,{httpMethod:(options.httpMethod||'POST').toUpperCase()}));});return _uploadAsync.apply(this,arguments);}function createDownloadResumable(uri,fileUri,options,callback,resumeData){return new DownloadResumable(uri,fileUri,options,callback,resumeData);}function createUploadTask(url,fileUri,options,callback){return new UploadTask(url,fileUri,options,callback);}var FileSystemCancellableNetworkTask=function(){function FileSystemCancellableNetworkTask(){_classCallCheck(this,FileSystemCancellableNetworkTask);this._uuid=uuid$1.v4();this.taskWasCanceled=false;this.emitter=new EventEmitter(ExponentFileSystem);}_createClass(FileSystemCancellableNetworkTask,[{key:"cancelAsync",value:function(){var _cancelAsync=_asyncToGenerator(function*(){if(!ExponentFileSystem.networkTaskCancelAsync){throw new UnavailabilityError('expo-file-system','networkTaskCancelAsync');}this.removeSubscription();this.taskWasCanceled=true;return yield ExponentFileSystem.networkTaskCancelAsync(this.uuid);});function cancelAsync(){return _cancelAsync.apply(this,arguments);}return cancelAsync;}()},{key:"isTaskCancelled",value:function isTaskCancelled(){if(this.taskWasCanceled){console.warn('This task was already canceled.');return true;}return false;}},{key:"uuid",get:function get(){return this._uuid;}},{key:"addSubscription",value:function addSubscription(){var _this=this;if(this.subscription){return;}this.subscription=this.emitter.addListener(this.getEventName(),function(event){if(event.uuid===_this.uuid){var callback=_this.getCallback();if(callback){callback(event.data);}}});}},{key:"removeSubscription",value:function removeSubscription(){if(!this.subscription){return;}this.emitter.removeSubscription(this.subscription);this.subscription=null;}}]);return FileSystemCancellableNetworkTask;}();var UploadTask=function(_FileSystemCancellabl){_inherits(UploadTask,_FileSystemCancellabl);var _super=_createSuper(UploadTask);function UploadTask(url,fileUri,options,callback){var _options$httpMethod;var _this2;_classCallCheck(this,UploadTask);_this2=_super.call(this);_this2.url=url;_this2.fileUri=fileUri;_this2.callback=callback;var httpMethod=(options==null?void 0:(_options$httpMethod=options.httpMethod)==null?void 0:_options$httpMethod.toUpperCase())||'POST';_this2.options=Object.assign({sessionType:FileSystemSessionType.BACKGROUND,uploadType:FileSystemUploadType.BINARY_CONTENT},options,{httpMethod:httpMethod});return _this2;}_createClass(UploadTask,[{key:"getEventName",value:function getEventName(){return 'expo-file-system.uploadProgress';}},{key:"getCallback",value:function getCallback(){return this.callback;}},{key:"uploadAsync",value:function(){var _uploadAsync2=_asyncToGenerator(function*(){if(!ExponentFileSystem.uploadTaskStartAsync){throw new UnavailabilityError('expo-file-system','uploadTaskStartAsync');}if(this.isTaskCancelled()){return;}this.addSubscription();var result=yield ExponentFileSystem.uploadTaskStartAsync(this.url,this.fileUri,this.uuid,this.options);this.removeSubscription();return result;});function uploadAsync(){return _uploadAsync2.apply(this,arguments);}return uploadAsync;}()}]);return UploadTask;}(FileSystemCancellableNetworkTask);var DownloadResumable=function(_FileSystemCancellabl2){_inherits(DownloadResumable,_FileSystemCancellabl2);var _super2=_createSuper(DownloadResumable);function DownloadResumable(url,_fileUri){var _this3;var options=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var callback=arguments.length>3?arguments[3]:undefined;var resumeData=arguments.length>4?arguments[4]:undefined;_classCallCheck(this,DownloadResumable);_this3=_super2.call(this);_this3.url=url;_this3._fileUri=_fileUri;_this3.options=options;_this3.callback=callback;_this3.resumeData=resumeData;return _this3;}_createClass(DownloadResumable,[{key:"fileUri",get:function get(){return this._fileUri;}},{key:"getEventName",value:function getEventName(){return 'expo-file-system.downloadProgress';}},{key:"getCallback",value:function getCallback(){return this.callback;}},{key:"downloadAsync",value:function(){var _downloadAsync2=_asyncToGenerator(function*(){if(!ExponentFileSystem.downloadResumableStartAsync){throw new UnavailabilityError('expo-file-system','downloadResumableStartAsync');}if(this.isTaskCancelled()){return;}this.addSubscription();return yield ExponentFileSystem.downloadResumableStartAsync(this.url,this._fileUri,this.uuid,this.options,this.resumeData);});function downloadAsync(){return _downloadAsync2.apply(this,arguments);}return downloadAsync;}()},{key:"pauseAsync",value:function(){var _pauseAsync=_asyncToGenerator(function*(){if(!ExponentFileSystem.downloadResumablePauseAsync){throw new UnavailabilityError('expo-file-system','downloadResumablePauseAsync');}if(this.isTaskCancelled()){return {fileUri:this._fileUri,options:this.options,url:this.url};}var pauseResult=yield ExponentFileSystem.downloadResumablePauseAsync(this.uuid);this.removeSubscription();if(pauseResult){this.resumeData=pauseResult.resumeData;return this.savable();}else {throw new Error('Unable to generate a savable pause state');}});function pauseAsync(){return _pauseAsync.apply(this,arguments);}return pauseAsync;}()},{key:"resumeAsync",value:function(){var _resumeAsync=_asyncToGenerator(function*(){if(!ExponentFileSystem.downloadResumableStartAsync){throw new UnavailabilityError('expo-file-system','downloadResumableStartAsync');}if(this.isTaskCancelled()){return;}this.addSubscription();return yield ExponentFileSystem.downloadResumableStartAsync(this.url,this.fileUri,this.uuid,this.options,this.resumeData);});function resumeAsync(){return _resumeAsync.apply(this,arguments);}return resumeAsync;}()},{key:"savable",value:function savable(){return {url:this.url,fileUri:this.fileUri,options:this.options,resumeData:this.resumeData};}}]);return DownloadResumable;}(FileSystemCancellableNetworkTask);var baseReadAsStringAsync=readAsStringAsync;var baseWriteAsStringAsync=writeAsStringAsync;var baseDeleteAsync=deleteAsync;var baseMoveAsync=moveAsync;var baseCopyAsync=copyAsync;var StorageAccessFramework;(function(StorageAccessFramework){StorageAccessFramework.getUriForDirectoryInRoot=function getUriForDirectoryInRoot(folderName){return \`content://com.android.externalstorage.documents/tree/primary:\${folderName}/document/primary:\${folderName}\`;};function requestDirectoryPermissionsAsync(){return _requestDirectoryPermissionsAsync.apply(this,arguments);}function _requestDirectoryPermissionsAsync(){_requestDirectoryPermissionsAsync=_asyncToGenerator(function*(){var initialFileUrl=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;if(!ExponentFileSystem.requestDirectoryPermissionsAsync){throw new UnavailabilityError('expo-file-system','StorageAccessFramework.requestDirectoryPermissionsAsync');}return yield ExponentFileSystem.requestDirectoryPermissionsAsync(initialFileUrl);});return _requestDirectoryPermissionsAsync.apply(this,arguments);}StorageAccessFramework.requestDirectoryPermissionsAsync=requestDirectoryPermissionsAsync;function readDirectoryAsync(_x15){return _readDirectoryAsync2.apply(this,arguments);}function _readDirectoryAsync2(){_readDirectoryAsync2=_asyncToGenerator(function*(dirUri){if(!ExponentFileSystem.readSAFDirectoryAsync){throw new UnavailabilityError('expo-file-system','StorageAccessFramework.readDirectoryAsync');}return yield ExponentFileSystem.readSAFDirectoryAsync(dirUri);});return _readDirectoryAsync2.apply(this,arguments);}StorageAccessFramework.readDirectoryAsync=readDirectoryAsync;function makeDirectoryAsync(_x16,_x17){return _makeDirectoryAsync2.apply(this,arguments);}function _makeDirectoryAsync2(){_makeDirectoryAsync2=_asyncToGenerator(function*(parentUri,dirName){if(!ExponentFileSystem.makeSAFDirectoryAsync){throw new UnavailabilityError('expo-file-system','StorageAccessFramework.makeDirectoryAsync');}return yield ExponentFileSystem.makeSAFDirectoryAsync(parentUri,dirName);});return _makeDirectoryAsync2.apply(this,arguments);}StorageAccessFramework.makeDirectoryAsync=makeDirectoryAsync;function createFileAsync(_x18,_x19,_x20){return _createFileAsync.apply(this,arguments);}function _createFileAsync(){_createFileAsync=_asyncToGenerator(function*(parentUri,fileName,mimeType){if(!ExponentFileSystem.createSAFFileAsync){throw new UnavailabilityError('expo-file-system','StorageAccessFramework.createFileAsync');}return yield ExponentFileSystem.createSAFFileAsync(parentUri,fileName,mimeType);});return _createFileAsync.apply(this,arguments);}StorageAccessFramework.createFileAsync=createFileAsync;StorageAccessFramework.writeAsStringAsync=baseWriteAsStringAsync;StorageAccessFramework.readAsStringAsync=baseReadAsStringAsync;StorageAccessFramework.deleteAsync=baseDeleteAsync;StorageAccessFramework.moveAsync=baseMoveAsync;StorageAccessFramework.copyAsync=baseCopyAsync;})(StorageAccessFramework||(StorageAccessFramework={}));
290
277
 
291
278
  var fileBuild = /*#__PURE__*/Object.freeze({
292
279
  __proto__: null,
293
- get EncodingType () { return EncodingType; },
294
- get FileSystemSessionType () { return FileSystemSessionType; },
295
- get FileSystemUploadType () { return FileSystemUploadType; },
296
280
  documentDirectory: documentDirectory,
297
281
  cacheDirectory: cacheDirectory,
298
- bundledAssets: bundledAssets,
299
282
  bundleDirectory: bundleDirectory,
300
283
  getInfoAsync: getInfoAsync,
301
284
  readAsStringAsync: readAsStringAsync,
@@ -360,7 +343,7 @@ var _indexScssStyleSheet = StyleSheet.create({
360
343
  }
361
344
  });
362
345
 
363
- function _mergeEleStyles(){return [].concat.apply([],arguments).reduce((pre,cur)=>Object.assign(pre,cur),{});}var _styleSheet=_indexScssStyleSheet;console.log({taro:taro});function Cell(_ref){var children=_ref.children,style=_ref.style;var childs=Array.isArray(children)?children:[children];return jsx(View,{style:_mergeEleStyles(_styleSheet["cellGroup"],Object.assign({},style)),children:childs.map(function(it,i){return [it].concat(i===children.length-1?[]:jsx(View,{style:_styleSheet["cellItem__line"]},"line-"+i));})});}function Item(_ref2){var title=_ref2.title,children=_ref2.children,style=_ref2.style;return jsxs(View,{style:_mergeEleStyles(_styleSheet["cellItem"],Object.assign({},style)),children:[jsx(Text,{style:_styleSheet["cellItem__title"],children:title}),jsx(View,{style:_styleSheet["cellItem__content"],children:children})]});}Cell.Item=Item;
346
+ function _mergeEleStyles(){return [].concat.apply([],arguments).reduce((pre,cur)=>Object.assign(pre,cur),{});}var _styleSheet=_indexScssStyleSheet;console.log({taro:taro});function Cell(_ref){var children=_ref.children,style=_ref.style;var childs=Array.isArray(children)?children:[children];return jsx(View,{style:_mergeEleStyles(_styleSheet["cellGroup"],Object.assign({},style)),children:childs.map(function(it,i){return [it].concat(i===children.length-1?[]:jsx(View,{style:_styleSheet["cellItem__line"]},\`line-\${i}\`));})});}function Item(_ref2){var title=_ref2.title,children=_ref2.children,style=_ref2.style;return jsxs(View,{style:_mergeEleStyles(_styleSheet["cellItem"],Object.assign({},style)),children:[jsx(Text,{style:_styleSheet["cellItem__title"],children:title}),jsx(View,{style:_styleSheet["cellItem__content"],children:children})]});}Cell.Item=Item;
364
347
 
365
348
  export { Cell as default };
366
349
  ",
@@ -369,9 +352,8 @@ export { Cell as default };
369
352
 
370
353
  exports[`build_components require react-native component 1`] = `
371
354
  [
372
- "import { Children, Component } from 'react';
373
- import { AppRegistry } from 'react-native';
374
- import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
355
+ "import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
356
+ import { Children, Component } from 'react';
375
357
 
376
358
  function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}
377
359
 
@@ -399,11 +381,11 @@ function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getProt
399
381
 
400
382
  function _createSuper$1(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct$1();return function(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else {result=Super.apply(this,arguments);}return _possibleConstructorReturn(this,result);};}function _isNativeReflectConstruct$1(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}var _default$1=function(_Component){_inherits(_default,_Component);var _super=_createSuper$1(_default);function _default(){_classCallCheck(this,_default);return _super.apply(this,arguments);}_createClass(_default,[{key:"shouldComponentUpdate",value:function shouldComponentUpdate(nextProps){return nextProps.shouldUpdate;}},{key:"render",value:function render(){var child=this.props.children;return child===null||child===false?null:Children.only(child);}}]);return _default;}(Component);
401
383
 
402
- function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else {result=Super.apply(this,arguments);}return _possibleConstructorReturn(this,result);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}var _default=function(_Component){_inherits(_default,_Component);var _super=_createSuper(_default);function _default(props){var _this;_classCallCheck(this,_default);_this=_super.call(this,props);_this.siblingsPool=[];_this.updatedSiblings=new Set();_this.unmounted=false;_this.state={siblings:[]};return _this;}_createClass(_default,[{key:"componentDidMount",value:function componentDidMount(){var _this2=this;this.props.controller.setCallback(function(id,change){setImmediate(function(){return _this2.commitChange(id,change);});});}},{key:"componentDidUpdate",value:function componentDidUpdate(){this.updatedSiblings.clear();}},{key:"componentWillUnmount",value:function componentWillUnmount(){this.unmounted=true;}},{key:"commitChange",value:function commitChange(id,_ref){var _this3=this;var change=_ref.change,element=_ref.element,updateCallback=_ref.updateCallback;if(this.unmounted){return;}var siblings=Array.from(this.siblingsPool);var index=siblings.findIndex(function(sibling){return sibling.id===id;});if(change===RootControllerChanges.Remove){if(index>-1){siblings.splice(index,1);}else {this.invokeCallback(updateCallback);return;}}else if(change===RootControllerChanges.Update){if(index>-1){siblings.splice(index,1,{element:element,id:id});this.updatedSiblings.add(id);}else {this.invokeCallback(updateCallback);return;}}else {if(index>-1){siblings.splice(index,1);}siblings.push({element:element,id:id});this.updatedSiblings.add(id);}this.siblingsPool=siblings;this.setState({siblings:siblings},function(){return _this3.invokeCallback(updateCallback);});}},{key:"invokeCallback",value:function invokeCallback(callback){if(callback){callback();}}},{key:"renderSiblings",value:function renderSiblings(){var _this4=this;return this.state.siblings.map(function(_ref2){var id=_ref2.id,element=_ref2.element;return jsx(_default$1,{shouldUpdate:_this4.updatedSiblings.has(id),children:_this4.wrapSibling(element)},"root-sibling-"+id);});}},{key:"wrapSibling",value:function wrapSibling(element){var renderSibling=this.props.renderSibling;if(renderSibling){return renderSibling(element);}else {return element;}}},{key:"render",value:function render(){return jsxs(Fragment,{children:[this.props.children,this.renderSiblings()]});}}]);return _default;}(Component);
384
+ function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else {result=Super.apply(this,arguments);}return _possibleConstructorReturn(this,result);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}var _default=function(_Component){_inherits(_default,_Component);var _super=_createSuper(_default);function _default(props){var _this;_classCallCheck(this,_default);_this=_super.call(this,props);_this.updatedSiblings=new Set();_this.siblingsPool=[];_this.state={siblings:[]};return _this;}_createClass(_default,[{key:"componentDidMount",value:function componentDidMount(){var _this2=this;this.props.controller.setCallback(function(id,change){setTimeout(function(){return _this2.commitChange(id,change);});});}},{key:"componentDidUpdate",value:function componentDidUpdate(){this.updatedSiblings.clear();}},{key:"render",value:function render(){return jsxs(Fragment,{children:[this.props.children,this.renderSiblings()]});}},{key:"commitChange",value:function commitChange(id,_ref){var _this3=this;var change=_ref.change,element=_ref.element,updateCallback=_ref.updateCallback;var siblings=Array.from(this.siblingsPool);var index=siblings.findIndex(function(sibling){return sibling.id===id;});if(change===RootControllerChanges.Remove){if(index>-1){siblings.splice(index,1);}else {this.invokeCallback(updateCallback);return;}}else if(change===RootControllerChanges.Update){if(index>-1){siblings.splice(index,1,{element:element,id:id});this.updatedSiblings.add(id);}else {this.invokeCallback(updateCallback);return;}}else {if(index>-1){siblings.splice(index,1);}siblings.push({element:element,id:id});this.updatedSiblings.add(id);}this.siblingsPool=siblings;this.setState({siblings:siblings},function(){return _this3.invokeCallback(updateCallback);});}},{key:"invokeCallback",value:function invokeCallback(callback){if(callback){callback();}}},{key:"renderSiblings",value:function renderSiblings(){var _this4=this;return this.state.siblings.map(function(_ref2){var id=_ref2.id,element=_ref2.element;return jsx(_default$1,{shouldUpdate:_this4.updatedSiblings.has(id),children:_this4.wrapSibling(element)},\`root-sibling-\${id}\`);});}},{key:"wrapSibling",value:function wrapSibling(element){var renderSibling=this.props.renderSibling;if(renderSibling){return renderSibling(element);}else {return element;}}}]);return _default;}(Component);
403
385
 
404
386
  function wrapRootComponent(_Root,renderSibling){var controller=new RootController();return {Root:function Root(props){return jsx(_default,{controller:controller,renderSibling:renderSibling,children:jsx(_Root,Object.assign({},props))});},manager:{update:function update(id,element,callback){controller.update(id,element,callback);},destroy:function destroy(id,callback){controller.destroy(id,callback);}}};}
405
387
 
406
- var siblingWrapper=function(sibling){return sibling;};function renderSibling(sibling){return siblingWrapper(sibling);}if(!global.__rootSiblingsInjected&&!global.__rootSiblingsDisabled){AppRegistry.setWrapperComponentProvider(function(){return Root;});global.__rootSiblingsInjected=true;}var _wrapRootComponent=wrapRootComponent(ChildrenWrapper,renderSibling),Root=_wrapRootComponent.Root,defaultManager=_wrapRootComponent.manager;var uuid=0;var managerStack=[defaultManager];var inactiveManagers=new Set();function getActiveManager(){for(var i=managerStack.length-1;i>=0;i--){var manager=managerStack[i];if(!inactiveManagers.has(manager)){return manager;}}return defaultManager;}var RootSiblingsManager=function(){function RootSiblingsManager(element,callback){_classCallCheck(this,RootSiblingsManager);this.id="root-sibling-"+(uuid+1);this.manager=getActiveManager();this.manager.update(this.id,element,callback);uuid++;}_createClass(RootSiblingsManager,[{key:"update",value:function update(element,callback){this.manager.update(this.id,element,callback);}},{key:"destroy",value:function destroy(callback){this.manager.destroy(this.id,callback);}}]);return RootSiblingsManager;}();
388
+ var siblingWrapper=function(sibling){return sibling;};function renderSibling(sibling){return siblingWrapper(sibling);}var _wrapRootComponent=wrapRootComponent(ChildrenWrapper,renderSibling),defaultManager=_wrapRootComponent.manager;var uuid=0;var managerStack=[defaultManager];var inactiveManagers=new Set();function getActiveManager(){for(var i=managerStack.length-1;i>=0;i--){var manager=managerStack[i];if(!inactiveManagers.has(manager)){return manager;}}return defaultManager;}var RootSiblingsManager=function(){function RootSiblingsManager(element,callback){_classCallCheck(this,RootSiblingsManager);this.id=\`root-sibling-\${uuid+1}\`;this.manager=getActiveManager();this.manager.update(this.id,element,callback);uuid++;}_createClass(RootSiblingsManager,[{key:"update",value:function update(element,callback){this.manager.update(this.id,element,callback);}},{key:"destroy",value:function destroy(callback){this.manager.destroy(this.id,callback);}}]);return RootSiblingsManager;}();
407
389
 
408
390
  console.log({silblings:RootSiblingsManager});
409
391
  ",
@@ -446,24 +428,9 @@ var _indexScssStyleSheet = StyleSheet.create({
446
428
  }
447
429
  });
448
430
 
449
- function _mergeEleStyles(){return [].concat.apply([],arguments).reduce((pre,cur)=>Object.assign(pre,cur),{});}var _styleSheet=_indexScssStyleSheet;console.log({taro:taro});function Cell(_ref){var children=_ref.children,style=_ref.style;var childs=Array.isArray(children)?children:[children];return jsx(View,{style:_mergeEleStyles(_styleSheet["cellGroup"],Object.assign({},style)),children:childs.map(function(it,i){return [it].concat(i===children.length-1?[]:jsx(View,{style:_styleSheet["cellItem__line"]},"line-"+i));})});}function Item(_ref2){var title=_ref2.title,children=_ref2.children,style=_ref2.style;return jsxs(View,{style:_mergeEleStyles(_styleSheet["cellItem"],Object.assign({},style)),children:[jsx(Text,{style:_styleSheet["cellItem__title"],children:title}),jsx(View,{style:_styleSheet["cellItem__content"],children:children})]});}Cell.Item=Item;
431
+ function _mergeEleStyles(){return [].concat.apply([],arguments).reduce((pre,cur)=>Object.assign(pre,cur),{});}var _styleSheet=_indexScssStyleSheet;console.log({taro:taro});function Cell(_ref){var children=_ref.children,style=_ref.style;var childs=Array.isArray(children)?children:[children];return jsx(View,{style:_mergeEleStyles(_styleSheet["cellGroup"],Object.assign({},style)),children:childs.map(function(it,i){return [it].concat(i===children.length-1?[]:jsx(View,{style:_styleSheet["cellItem__line"]},\`line-\${i}\`));})});}function Item(_ref2){var title=_ref2.title,children=_ref2.children,style=_ref2.style;return jsxs(View,{style:_mergeEleStyles(_styleSheet["cellItem"],Object.assign({},style)),children:[jsx(Text,{style:_styleSheet["cellItem__title"],children:title}),jsx(View,{style:_styleSheet["cellItem__content"],children:children})]});}Cell.Item=Item;
450
432
 
451
433
  export { Cell as default };
452
434
  ",
453
435
  ]
454
436
  `;
455
-
456
- exports[`build_components svg transform 1`] = `
457
- [
458
- "import 'react';
459
- import { jsx } from 'react/jsx-runtime';
460
-
461
- var Logo = require('./assets/rollup-logo-a3c30bf4.svg');
462
-
463
- function index(){return jsx(Logo,{className:"logo",width:120,height:40});}
464
-
465
- export { index as default };
466
- ",
467
- undefined,
468
- ]
469
- `;
@@ -50,7 +50,7 @@ describe('build_components', () => {
50
50
  return {
51
51
  ...others,
52
52
  input: Object.entries(input as Record<string, string>).reduce(
53
- (pre, cur) => Object.assign(pre, { [cur[0].replace('components/', '')]: cur[1] }),
53
+ (pre, cur) => Object.assign(pre, { [cur[0].replace('components' + path.sep, '')]: cur[1] }),
54
54
  {}
55
55
  ),
56
56
  output: { dir: path.resolve(__dirname, './mock/dist/modify-config') }
@@ -68,7 +68,7 @@ describe('build_components', () => {
68
68
  external: ['react', 'react-native', /@tarojs\/components-rn/, /@tarojs\/taro-rn/, /@babel\/runtime/],
69
69
  externalResolve: () => {}
70
70
  })
71
- expect(getCode(result)).toMatchSnapshot()
71
+ expect(getCode(result))
72
72
  })
73
73
 
74
74
  it('named export', async () => {
package/dist/index.js CHANGED
@@ -67,7 +67,12 @@ function build(_appPath, config) {
67
67
  cliParams.push('--port', config.port);
68
68
  }
69
69
  try {
70
- (0, child_process_1.spawn)(npxCmd, ['react-native', 'start'].concat(cliParams), {
70
+ (0, child_process_1.spawn)(npxCmd, [
71
+ 'react-native',
72
+ 'start',
73
+ '--custom-log-reporter-path',
74
+ '@tarojs/rn-supporter/TerminalReporter'
75
+ ].concat(cliParams), {
71
76
  stdio: 'inherit'
72
77
  });
73
78
  if (config.qr) {
@@ -78,6 +83,7 @@ function build(_appPath, config) {
78
83
  onFinish(null);
79
84
  }
80
85
  catch (e) {
86
+ console.error(e);
81
87
  onFinish(e);
82
88
  }
83
89
  }
@@ -127,6 +133,7 @@ function build(_appPath, config) {
127
133
  onFinish(null);
128
134
  }
129
135
  catch (e) {
136
+ console.error(e);
130
137
  onFinish(e);
131
138
  }
132
139
  }
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,uDAA8D;AAC9D,iDAAqC;AACrC,2BAAwC;AACxC,gCAA+B;AAC/B,+BAAoC;AAEpC,8DAAqD;AAErD,uCAAuC;AACvC,MAAM,KAAK,GAAG,CAAC,iBAAiB,EAAE,UAAU,CAAC,CAAA;AAC7C,SAAS,YAAY;IACnB,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QACnB,MAAM,QAAQ,GAAG,IAAA,WAAI,EAAC,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,CAAA;QAC1C,IAAA,aAAQ,EAAC,IAAA,WAAI,EAAC,SAAS,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,CAAC,EAAE,QAAQ,EAAE,cAAS,CAAC,aAAa,EAAE,GAAG,CAAC,EAAE;YAC1F,IAAI,GAAG,EAAE;gBACP,IAAI,GAAG,CAAC,IAAI,KAAK,QAAQ,EAAE;oBACzB,YAAY;oBACZ,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;iBACjB;aACF;iBAAM;gBACL,OAA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AC,eAAe,EAAE,UAAU,CAAC,CAAA;YAC3C,GAAG,CAAC,aAAa,CAAC,UAAU,CAAC,CAAA;YAE7B,IAAI;gBACF,IAAA,qBAAK,EAAC,MAAM,EAAE;oBACZ,cAAc;oBACd,QAAQ;oBACR,YAAY;oBACZ,MAAM,CAAC,UAAU;oBACjB,OAAO;oBACP,OAAO;oBACP,cAAc;oBACd,UAAU;iBACX,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE;oBACnB,KAAK,EAAE,SAAS;iBACjB,CAAC,CAAA;gBACF,IAAI,MAAM,CAAC,EAAE,EAAE;oBACb,OAAO,CAAC,EAAE,CAAC,YAAY,EAAE,GAAG,EAAE;wBAC5B,IAAA,0BAAW,EAAC;4BACV,GAAG,EAAE,YAAY;4BACjB,QAAQ,EAAE,MAAM,CAAC,UAAU;4BAC3B,UAAU,EAAE,UAAU;yBACvB,CAAC,CAAA;oBACJ,CAAC,CAAC,CAAA;iBACH;gBACD,QAAQ,CAAC,IAAI,CAAC,CAAA;aACf;YAAC,OAAO,CAAC,EAAE;gBACV,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;gBAChB,QAAQ,CAAC,CAAC,CAAC,CAAA;aACZ;SACF;IACH,CAAC;CAAA;AAxGD,wBAwGC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tarojs/rn-runner",
3
- "version": "3.8.0-canary.0",
3
+ "version": "4.0.0-alpha.2",
4
4
  "description": "ReactNative build tool for taro",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -17,11 +17,11 @@
17
17
  },
18
18
  "homepage": "https://github.com/NervJS/taro#readme",
19
19
  "engines": {
20
- "node": ">=12.0.0",
21
- "npm": ">=6.0.0"
20
+ "node": ">= 18",
21
+ "npm": ">= 6"
22
22
  },
23
23
  "dependencies": {
24
- "@rollup/plugin-babel": "^5.3.1",
24
+ "@rollup/plugin-babel": "^6.0.3",
25
25
  "@rollup/plugin-commonjs": "^20.0.0",
26
26
  "@rollup/plugin-json": "^4.1.0",
27
27
  "@rollup/plugin-node-resolve": "^13.3.0",
@@ -30,10 +30,10 @@
30
30
  "fs-extra": "^8.0.1",
31
31
  "lodash": "^4.17.21",
32
32
  "rollup-plugin-image-file": "^1.0.2",
33
- "@tarojs/helper": "3.8.0-canary.0",
34
- "@tarojs/rn-style-transformer": "3.8.0-canary.0",
35
- "@tarojs/rn-supporter": "3.8.0-canary.0",
36
- "@tarojs/rn-transformer": "3.8.0-canary.0"
33
+ "@tarojs/helper": "4.0.0-alpha.2",
34
+ "@tarojs/rn-style-transformer": "4.0.0-alpha.2",
35
+ "@tarojs/rn-transformer": "4.0.0-alpha.2",
36
+ "@tarojs/rn-supporter": "4.0.0-alpha.2"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@babel/core": "^7.14.5",
@@ -41,28 +41,29 @@
41
41
  "acorn": "^8.0.4",
42
42
  "babel-plugin-global-define": "1.0.3",
43
43
  "babel-plugin-jsx-attributes-array-to-object": "0.3.0",
44
- "expo": "~47.0.3",
45
- "expo-file-system": "~15.1.1",
44
+ "expo": "~50.0.2",
45
+ "expo-file-system": "~16.0.0",
46
46
  "jest": "^29.3.1",
47
47
  "jest-cli": "^29.3.1",
48
48
  "jest-environment-node": "^29.5.0",
49
- "react": "18.1.0",
49
+ "react": "18.2.0",
50
50
  "react-is": "^16.13.0",
51
- "react-native": "^0.70.5",
52
- "react-native-root-siblings": "^4.1.1",
53
- "react-test-renderer": "18.1.0",
51
+ "react-native": "^0.73.1",
52
+ "react-native-root-siblings": "^5.0.1",
53
+ "react-test-renderer": "18.2.0",
54
54
  "rollup": "^2.79.0",
55
55
  "ts-jest": "^29.0.5",
56
56
  "typescript": "^4.7.4",
57
- "babel-plugin-transform-react-jsx-to-rn-stylesheet": "3.8.0-canary.0"
57
+ "babel-plugin-transform-react-jsx-to-rn-stylesheet": "4.0.0-alpha.2"
58
58
  },
59
59
  "scripts": {
60
60
  "build": "tsc",
61
61
  "dev": "tsc --watch",
62
62
  "lint": "eslint .",
63
63
  "test": "jest --silent",
64
- "test:ci": "jest --ci --silent --coverage false",
64
+ "test:ci": "jest --ci -i --coverage --silent",
65
65
  "test:coverage": "jest --coverage",
66
- "test:dev": "jest --watch"
66
+ "test:dev": "jest --watch",
67
+ "updateSnapshot": "jest --updateSnapshot"
67
68
  }
68
69
  }
package/src/index.ts CHANGED
@@ -60,16 +60,22 @@ export default async function build (_appPath: string, config: any): Promise<any
60
60
  cliParams.push('--port', config.port)
61
61
  }
62
62
  try {
63
- spawn(npxCmd, ['react-native', 'start'].concat(cliParams), {
63
+ spawn(npxCmd, [
64
+ 'react-native',
65
+ 'start',
66
+ '--custom-log-reporter-path',
67
+ '@tarojs/rn-supporter/TerminalReporter'
68
+ ].concat(cliParams), {
64
69
  stdio: 'inherit'
65
70
  })
66
- if(config.qr) {
71
+ if (config.qr) {
67
72
  previewDev({
68
73
  port: parseInt(config.port) || 8081,
69
74
  })
70
75
  }
71
76
  onFinish(null)
72
- } catch(e) {
77
+ } catch (e) {
78
+ console.error(e)
73
79
  onFinish(e)
74
80
  }
75
81
  } else {
@@ -110,7 +116,7 @@ export default async function build (_appPath: string, config: any): Promise<any
110
116
  ].concat(cliParams), {
111
117
  stdio: 'inherit'
112
118
  })
113
- if(config.qr) {
119
+ if (config.qr) {
114
120
  process.on('beforeExit', () => {
115
121
  previewProd({
116
122
  out: bundleOutput,
@@ -120,7 +126,8 @@ export default async function build (_appPath: string, config: any): Promise<any
120
126
  })
121
127
  }
122
128
  onFinish(null)
123
- } catch(e) {
129
+ } catch (e) {
130
+ console.error(e)
124
131
  onFinish(e)
125
132
  }
126
133
  }
@@ -1,10 +1,14 @@
1
- const { mergeConfig } = require('metro-config')
1
+ const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config')
2
2
  const { getMetroConfig } = require('@tarojs/rn-supporter')
3
3
 
4
+ /**
5
+ * Metro configuration
6
+ * https://facebook.github.io/metro/docs/configuration
7
+ *
8
+ * @type {import('metro-config').MetroConfig}
9
+ */
10
+ const config = {}
11
+
4
12
  module.exports = (async function (){
5
- return mergeConfig({
6
- // custom your metro config here
7
- // https://facebook.github.io/metro/docs/configuration
8
- resolver: {}
9
- }, await getMetroConfig())
13
+ return mergeConfig(getDefaultConfig(__dirname), await getMetroConfig(), config)
10
14
  })()