@draftbit/core 50.7.2-f22838.2 → 50.8.1-e42b65.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/lib/commonjs/components/ExpoImage.js +1 -1
- package/lib/commonjs/components/FlatList.js +1 -1
- package/lib/typescript/src/components/ExpoImage.js +8 -1
- package/lib/typescript/src/components/ExpoImage.js.map +1 -1
- package/lib/typescript/src/components/FlatList.d.ts +2 -2
- package/lib/typescript/src/components/FlatList.js +2 -2
- package/lib/typescript/src/components/FlatList.js.map +1 -1
- package/lib/typescript/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/components/ExpoImage.js +8 -1
- package/src/components/ExpoImage.js.map +1 -1
- package/src/components/ExpoImage.tsx +10 -1
- package/src/components/FlatList.js +2 -2
- package/src/components/FlatList.js.map +1 -1
- package/src/components/FlatList.tsx +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["source","resizeMode","style","transitionDuration","transitionEffect","transitionTiming","contentFit","contentPosition","cachePolicy","allowDownscaling","blurRadius","blurhash"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/ExpoImage.tsx";import React from"react";import{Image}from"expo-image";import Config from"./Config";import{jsx as _jsx}from"react/jsx-runtime";var resizeModeToContentFit=function resizeModeToContentFit(resizeMode){var _mapping$resizeMode;var mapping={cover:"cover",contain:"contain",stretch:"fill",repeat:"none",center:"scale-down"};return(_mapping$resizeMode=mapping[resizeMode])!=null?_mapping$resizeMode:"cover";};var ExpoImage=function ExpoImage(_ref){var source=_ref.source,_ref$resizeMode=_ref.resizeMode,resizeMode=_ref$resizeMode===void 0?"cover":_ref$resizeMode,style=_ref.style,_ref$transitionDurati=_ref.transitionDuration,transitionDuration=_ref$transitionDurati===void 0?300:_ref$transitionDurati,_ref$transitionEffect=_ref.transitionEffect,transitionEffect=_ref$transitionEffect===void 0?"cross-dissolve":_ref$transitionEffect,_ref$transitionTiming=_ref.transitionTiming,transitionTiming=_ref$transitionTiming===void 0?"ease-in-out":_ref$transitionTiming,_ref$contentFit=_ref.contentFit,contentFit=_ref$contentFit===void 0?"cover":_ref$contentFit,_ref$contentPosition=_ref.contentPosition,contentPosition=_ref$contentPosition===void 0?"center":_ref$contentPosition,_ref$cachePolicy=_ref.cachePolicy,cachePolicy=_ref$cachePolicy===void 0?"memory-disk":_ref$cachePolicy,_ref$allowDownscaling=_ref.allowDownscaling,allowDownscaling=_ref$allowDownscaling===void 0?true:_ref$allowDownscaling,blurRadius=_ref.blurRadius,blurhash=_ref.blurhash,props=_objectWithoutProperties(_ref,_excluded);var imageSource=source!=null?source:Config.placeholderImageURL;var finalContentFit=resizeMode?resizeModeToContentFit(resizeMode):contentFit;var transition={timing:transitionTiming,duration:transitionDuration,effect:transitionEffect};return _jsx(Image,Object.assign({},props,{source:imageSource,contentFit:finalContentFit,placeholder:{blurhash:blurhash},transition:transition,contentPosition:contentPosition,cachePolicy:cachePolicy,allowDownscaling:allowDownscaling,blurRadius:blurRadius,style:style}));};export default ExpoImage;
|
|
1
|
+
import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["source","resizeMode","style","transitionDuration","transitionEffect","transitionTiming","contentFit","contentPosition","cachePolicy","allowDownscaling","blurRadius","blurhash"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/ExpoImage.tsx";import React from"react";import{Image}from"expo-image";import Config from"./Config";import{jsx as _jsx}from"react/jsx-runtime";var resizeModeToContentFit=function resizeModeToContentFit(resizeMode){var _mapping$resizeMode;var mapping={cover:"cover",contain:"contain",stretch:"fill",repeat:"none",center:"scale-down"};return(_mapping$resizeMode=mapping[resizeMode])!=null?_mapping$resizeMode:"cover";};var ExpoImage=function ExpoImage(_ref){var source=_ref.source,_ref$resizeMode=_ref.resizeMode,resizeMode=_ref$resizeMode===void 0?"cover":_ref$resizeMode,style=_ref.style,_ref$transitionDurati=_ref.transitionDuration,transitionDuration=_ref$transitionDurati===void 0?300:_ref$transitionDurati,_ref$transitionEffect=_ref.transitionEffect,transitionEffect=_ref$transitionEffect===void 0?"cross-dissolve":_ref$transitionEffect,_ref$transitionTiming=_ref.transitionTiming,transitionTiming=_ref$transitionTiming===void 0?"ease-in-out":_ref$transitionTiming,_ref$contentFit=_ref.contentFit,contentFit=_ref$contentFit===void 0?"cover":_ref$contentFit,_ref$contentPosition=_ref.contentPosition,contentPosition=_ref$contentPosition===void 0?"center":_ref$contentPosition,_ref$cachePolicy=_ref.cachePolicy,cachePolicy=_ref$cachePolicy===void 0?"memory-disk":_ref$cachePolicy,_ref$allowDownscaling=_ref.allowDownscaling,allowDownscaling=_ref$allowDownscaling===void 0?true:_ref$allowDownscaling,blurRadius=_ref.blurRadius,blurhash=_ref.blurhash,props=_objectWithoutProperties(_ref,_excluded);var imageSource=source!=null?source:Config.placeholderImageURL;if(source&&typeof source==="object"&&"uri"in source&&!/^(http|https):\/\//.test(source.uri||"")){imageSource={uri:""};}var finalContentFit=resizeMode?resizeModeToContentFit(resizeMode):contentFit;var transition={timing:transitionTiming,duration:transitionDuration,effect:transitionEffect};return _jsx(Image,Object.assign({},props,{source:imageSource,contentFit:finalContentFit,placeholder:{blurhash:blurhash},transition:transition,contentPosition:contentPosition,cachePolicy:cachePolicy,allowDownscaling:allowDownscaling,blurRadius:blurRadius,style:style}));};export default ExpoImage;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["numColumns"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/FlatList.tsx";import React from"react";import{FlatList as
|
|
1
|
+
import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["numColumns"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/FlatList.tsx";import React from"react";import{FlatList as FlatListComponent}from"react-native-gesture-handler";import{jsx as _jsx}from"react/jsx-runtime";var FlatList=React.forwardRef(function(_ref,ref){var numColumns=_ref.numColumns,rest=_objectWithoutProperties(_ref,_excluded);return _jsx(FlatListComponent,Object.assign({numColumns:numColumns,ref:ref},rest),numColumns);});export default FlatList;
|
|
@@ -13,7 +13,14 @@ const resizeModeToContentFit = (resizeMode) => {
|
|
|
13
13
|
return (_a = mapping[resizeMode]) !== null && _a !== void 0 ? _a : "cover";
|
|
14
14
|
};
|
|
15
15
|
const ExpoImage = ({ source, resizeMode = "cover", style, transitionDuration = 300, transitionEffect = "cross-dissolve", transitionTiming = "ease-in-out", contentFit = "cover", contentPosition = "center", cachePolicy = "memory-disk", allowDownscaling = true, blurRadius, blurhash, ...props }) => {
|
|
16
|
-
|
|
16
|
+
let imageSource = source !== null && source !== void 0 ? source : Config.placeholderImageURL;
|
|
17
|
+
// Prevent crash in Expo 50 when using expo-image with non-http/https URIs
|
|
18
|
+
if (source &&
|
|
19
|
+
typeof source === "object" &&
|
|
20
|
+
"uri" in source &&
|
|
21
|
+
!/^(http|https):\/\//.test(source.uri || "")) {
|
|
22
|
+
imageSource = { uri: "" };
|
|
23
|
+
}
|
|
17
24
|
const finalContentFit = resizeMode
|
|
18
25
|
? resizeModeToContentFit(resizeMode)
|
|
19
26
|
: contentFit;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpoImage.js","sourceRoot":"","sources":["../../../../src/components/ExpoImage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,KAAK,GAIN,MAAM,YAAY,CAAC;AACpB,OAAO,MAAM,MAAM,UAAU,CAAC;AAqB9B,MAAM,sBAAsB,GAAG,CAC7B,UAAiE,EAChD,EAAE;;IACnB,MAAM,OAAO,GAA+C;QAC1D,KAAK,EAAE,OAAO;QACd,OAAO,EAAE,SAAS;QAClB,OAA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AAI,EACvB,UAAU,EACV,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,EAAE;IACH,IAAI,WAAW,GAAG,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,MAAM,CAAC,mBAAmB,CAAC;IACvD,0EAA0E;IAC1E,IACE,MAAM;QACN,OAAO,MAAM,KAAK,QAAQ;QAC1B,KAAK,IAAI,MAAM;QACf,CAAC,oBAAoB,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,EAAE,CAAC,EAC5C;QACA,WAAW,GAAG,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC;KAC3B;IACD,MAAM,eAAe,GAAG,UAAU;QAChC,CAAC,CAAC,sBAAsB,CAAC,UAAU,CAAC;QACpC,CAAC,CAAC,UAAU,CAAC;IAEf,MAAM,UAAU,GAAG;QACjB,MAAM,EAAE,gBAAgB;QACxB,QAAQ,EAAE,kBAAkB;QAC5B,MAAM,EAAE,gBAAgB;KACzB,CAAC;IAEF,OAAO,CACL,oBAAC,KAAK,OACA,KAAK,EACT,MAAM,EAAE,WAAW,EACnB,UAAU,EAAE,eAAe,EAC3B,WAAW,EAAE;YACX,QAAQ;SACT,EACD,UAAU,EAAE,UAAU,EACtB,eAAe,EAAE,eAAe,EAChC,WAAW,EAAE,WAAW,EACxB,gBAAgB,EAAE,gBAAgB,EAClC,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,KAAK,GACZ,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { FlatList as
|
|
2
|
+
import { FlatList as FlatListComponent } from "react-native-gesture-handler";
|
|
3
3
|
import type { FlatListProps } from "react-native";
|
|
4
|
-
declare const FlatList: React.ForwardRefExoticComponent<FlatListProps<any> & React.RefAttributes<
|
|
4
|
+
declare const FlatList: React.ForwardRefExoticComponent<FlatListProps<any> & React.RefAttributes<FlatListComponent<any>>>;
|
|
5
5
|
export default FlatList;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { FlatList as
|
|
2
|
+
import { FlatList as FlatListComponent } from "react-native-gesture-handler";
|
|
3
3
|
const FlatList = React.forwardRef(({ numColumns, ...rest }, ref) => {
|
|
4
|
-
return (React.createElement(
|
|
4
|
+
return (React.createElement(FlatListComponent, { key: numColumns, numColumns: numColumns, ref: ref, ...rest }));
|
|
5
5
|
});
|
|
6
6
|
export default FlatList;
|
|
7
7
|
//# sourceMappingURL=FlatList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlatList.js","sourceRoot":"","sources":["../../../../src/components/FlatList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,IAAI,
|
|
1
|
+
{"version":3,"file":"FlatList.js","sourceRoot":"","sources":["../../../../src/components/FlatList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAG7E,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CAC/B,CACE,EAAE,UAAU,EAAE,GAAG,IAAI,EAAoB,EACzC,GAAiC,EACjC,EAAE;IACF,OAAO,CACL,oBAAC,iBAAiB,IAChB,GAAG,EAAE,UAAU,EACf,UAAU,EAAE,UAAU,EACtB,GAAG,EAAE,GAAG,KACJ,IAAI,GACR,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|