@draftbit/core 50.6.4-8a5d9a.2 → 50.6.4-d8eff0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "50.6.4-8a5d9a.2+8a5d9ab",
3
+ "version": "50.6.4-d8eff0.2+d8eff0f",
4
4
  "description": "Core (non-native) Components",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "types": "lib/typescript/src/index.d.ts",
@@ -42,7 +42,7 @@
42
42
  "@date-io/date-fns": "^1.3.13",
43
43
  "@dotlottie/react-player": "1.6.1",
44
44
  "@draftbit/react-theme-provider": "^2.1.1",
45
- "@draftbit/theme": "^50.6.4-8a5d9a.2+8a5d9ab",
45
+ "@draftbit/theme": "^50.6.4-d8eff0.2+d8eff0f",
46
46
  "@expo/vector-icons": "^14.0.0",
47
47
  "@gorhom/bottom-sheet": "5.0.0-alpha.7",
48
48
  "@lottiefiles/react-lottie-player": "3.5.3",
@@ -123,5 +123,5 @@
123
123
  ],
124
124
  "testEnvironment": "node"
125
125
  },
126
- "gitHead": "8a5d9ab55d163bde410cbac7ceaaf9711289504f"
126
+ "gitHead": "d8eff0f36889ae8e9532c4017cd46ca5a2cec401"
127
127
  }
@@ -37,7 +37,7 @@ const resizeModeToContentFit = (resizeMode) => {
37
37
  };
38
38
  return (_a = mapping[resizeMode]) !== null && _a !== void 0 ? _a : "cover";
39
39
  };
40
- const ExpoImage = ({ source, resizeMode = "cover", style, placeholder, transition = 300, contentFit = "cover", contentPosition = "center", cachePolicy = "memory-disk", allowDownscaling = true, recyclingKey, ...props }) => {
40
+ const ExpoImage = ({ source, resizeMode = "cover", style, transition = 300, contentFit = "cover", contentPosition = "center", cachePolicy = "memory-disk", allowDownscaling = true, blurRadius, blurhash, ...props }) => {
41
41
  let imageSource = source === null || source === undefined
42
42
  ? Config.placeholderImageURL
43
43
  : source;
@@ -48,7 +48,9 @@ const ExpoImage = ({ source, resizeMode = "cover", style, placeholder, transitio
48
48
  : contentFit;
49
49
  if (aspectRatio) {
50
50
  return (React.createElement(AspectRatio, { style: [style, { width, height, aspectRatio }] },
51
- React.createElement(Image, { ...props, source: imageSource, contentFit: finalContentFit, placeholder: placeholder, transition: transition, contentPosition: contentPosition, cachePolicy: cachePolicy, allowDownscaling: allowDownscaling, recyclingKey: recyclingKey, style: [
51
+ React.createElement(Image, { ...props, source: imageSource, contentFit: finalContentFit, placeholder: {
52
+ blurhash,
53
+ }, transition: transition, contentPosition: contentPosition, cachePolicy: cachePolicy, allowDownscaling: allowDownscaling, blurRadius: blurRadius, style: [
52
54
  style,
53
55
  {
54
56
  height: "100%",
@@ -56,7 +58,9 @@ const ExpoImage = ({ source, resizeMode = "cover", style, placeholder, transitio
56
58
  },
57
59
  ] })));
58
60
  }
59
- return (React.createElement(Image, { ...props, source: source, contentFit: finalContentFit, placeholder: placeholder, transition: transition, contentPosition: contentPosition, cachePolicy: cachePolicy, allowDownscaling: allowDownscaling, recyclingKey: recyclingKey, style: style }));
61
+ return (React.createElement(Image, { ...props, source: source, contentFit: finalContentFit, placeholder: {
62
+ blurhash,
63
+ }, transition: transition, contentPosition: contentPosition, cachePolicy: cachePolicy, allowDownscaling: allowDownscaling, blurRadius: blurRadius, style: style }));
60
64
  };
61
65
  export default ExpoImage;
62
66
  //# sourceMappingURL=ExpoImage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExpoImage.js","sourceRoot":"","sources":["ExpoImage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAuC,MAAM,cAAc,CAAC;AAC/E,OAAO,EACL,KAAK,GAIN,MAAM,YAAY,CAAC;AACpB,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,WAAW,MAAM,eAAe,CAAC;AAkCxC,MAAM,kBAAkB,GAAG,CAAC,EAC1B,WAAW,E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,CAAC,CAAC,MAAM,CAAC;IAEb,MAAM,MAAM,GAAG,UAAU,CAAC,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC;IAC/C,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,kBAAkB,CACvD,MAAwB,CACzB,CAAC;IAEF,MAAM,eAAe,GAAG,UAAU;QAChC,CAAC,CAAC,sBAAsB,CAAC,UAAU,CAAC;QACpC,CAAC,CAAC,UAAU,CAAC;IAEf,IAAI,WAAW,EAAE;QACf,OAAO,CACL,oBAAC,WAAW,IAAC,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;YACzD,oBAAC,KAAK,OACA,KAAK,EACT,MAAM,EAAE,WAAkC,EAC1C,UAAU,EAAE,eAAe,EAC3B,WAAW,EAAE;oBACX,QAAQ;iBACT,EACD,UAAU,EAAE,UAAU,EACtB,eAAe,EAAE,eAAe,EAChC,WAAW,EAAE,WAAW,EACxB,gBAAgB,EAAE,gBAAgB,EAClC,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE;oBACL,KAAK;oBACL;wBACE,MAAM,EAAE,MAAM;wBACd,KAAK,EAAE,MAAM;qBACd;iBACF,GACD,CACU,CACf,CAAC;KACH;IAED,OAAO,CACL,oBAAC,KAAK,OACA,KAAK,EACT,MAAM,EAAE,MAA6B,EACrC,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"}
@@ -16,10 +16,6 @@ type ImageStyleProp = {
16
16
  };
17
17
 
18
18
  interface ExtendedImageProps extends ExpoImageProps {
19
- placeholder?: {
20
- blurhash?: string;
21
- thumbhash?: string;
22
- };
23
19
  transition?:
24
20
  | number
25
21
  | {
@@ -38,7 +34,8 @@ interface ExtendedImageProps extends ExpoImageProps {
38
34
  contentPosition?: ImageContentPosition;
39
35
  cachePolicy?: "none" | "disk" | "memory" | "memory-disk";
40
36
  allowDownscaling?: boolean;
41
- recyclingKey?: string;
37
+ blurRadius?: number;
38
+ blurhash?: string;
42
39
  }
43
40
 
44
41
  const generateDimensions = ({
@@ -93,13 +90,13 @@ const ExpoImage: React.FC<ExtendedImageProps> = ({
93
90
  source,
94
91
  resizeMode = "cover",
95
92
  style,
96
- placeholder,
97
93
  transition = 300,
98
94
  contentFit = "cover",
99
95
  contentPosition = "center",
100
96
  cachePolicy = "memory-disk",
101
97
  allowDownscaling = true,
102
- recyclingKey,
98
+ blurRadius,
99
+ blurhash,
103
100
  ...props
104
101
  }) => {
105
102
  let imageSource =
@@ -123,12 +120,14 @@ const ExpoImage: React.FC<ExtendedImageProps> = ({
123
120
  {...props}
124
121
  source={imageSource as ImageSourcePropType}
125
122
  contentFit={finalContentFit}
126
- placeholder={placeholder}
123
+ placeholder={{
124
+ blurhash,
125
+ }}
127
126
  transition={transition}
128
127
  contentPosition={contentPosition}
129
128
  cachePolicy={cachePolicy}
130
129
  allowDownscaling={allowDownscaling}
131
- recyclingKey={recyclingKey}
130
+ blurRadius={blurRadius}
132
131
  style={[
133
132
  style,
134
133
  {
@@ -146,12 +145,14 @@ const ExpoImage: React.FC<ExtendedImageProps> = ({
146
145
  {...props}
147
146
  source={source as ImageSourcePropType}
148
147
  contentFit={finalContentFit}
149
- placeholder={placeholder}
148
+ placeholder={{
149
+ blurhash,
150
+ }}
150
151
  transition={transition}
151
152
  contentPosition={contentPosition}
152
153
  cachePolicy={cachePolicy}
153
154
  allowDownscaling={allowDownscaling}
154
- recyclingKey={recyclingKey}
155
+ blurRadius={blurRadius}
155
156
  style={style}
156
157
  />
157
158
  );