@tamagui/image 1.26.0 → 1.26.1
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 +3 -3
- package/dist/esm/Image.mjs +0 -49
- package/dist/esm/Image.mjs.map +0 -6
- package/dist/esm/index.mjs +0 -2
- package/dist/esm/index.mjs.map +0 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/image",
|
|
3
|
-
"version": "1.26.
|
|
3
|
+
"version": "1.26.1",
|
|
4
4
|
"sideEffects": [
|
|
5
5
|
"*.css"
|
|
6
6
|
],
|
|
@@ -23,14 +23,14 @@
|
|
|
23
23
|
"clean:build": "tamagui-build clean:build"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@tamagui/core": "1.26.
|
|
26
|
+
"@tamagui/core": "1.26.1"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"react": "*",
|
|
30
30
|
"react-native": "*"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@tamagui/build": "1.26.
|
|
33
|
+
"@tamagui/build": "1.26.1",
|
|
34
34
|
"react": "^18.2.0",
|
|
35
35
|
"react-native": "^0.71.7"
|
|
36
36
|
},
|
package/dist/esm/Image.mjs
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
isWeb,
|
|
4
|
-
setupReactNative,
|
|
5
|
-
styled,
|
|
6
|
-
useProps
|
|
7
|
-
} from "@tamagui/core";
|
|
8
|
-
import { forwardRef } from "react";
|
|
9
|
-
import { Image as RNImage } from "react-native";
|
|
10
|
-
setupReactNative({
|
|
11
|
-
Image: RNImage
|
|
12
|
-
});
|
|
13
|
-
const StyledImage = styled(RNImage, {
|
|
14
|
-
name: "Image",
|
|
15
|
-
position: "relative",
|
|
16
|
-
source: { uri: "" },
|
|
17
|
-
zIndex: 1
|
|
18
|
-
});
|
|
19
|
-
let hasWarned = false;
|
|
20
|
-
const Image = StyledImage.extractable(
|
|
21
|
-
forwardRef((inProps, ref) => {
|
|
22
|
-
const props = useProps(inProps);
|
|
23
|
-
const { src, source, ...rest } = props;
|
|
24
|
-
if (process.env.NODE_ENV === "development") {
|
|
25
|
-
if (typeof src === "string") {
|
|
26
|
-
if (typeof props.width === "string" && props.width[0] !== "$" || typeof props.height === "string" && props.height[0] !== "$") {
|
|
27
|
-
if (!hasWarned) {
|
|
28
|
-
hasWarned = true;
|
|
29
|
-
console.warn(
|
|
30
|
-
`React Native expects a numerical width/height. If you want to use a percent you must define the "source" prop with width, height, and uri.`
|
|
31
|
-
);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
const finalSource = typeof src === "string" ? { uri: src, ...isWeb && { width: props.width, height: props.height } } : source ?? src;
|
|
37
|
-
return /* @__PURE__ */ jsx(StyledImage, { ref, source: finalSource, ...rest });
|
|
38
|
-
})
|
|
39
|
-
);
|
|
40
|
-
Image.getSize = RNImage.getSize;
|
|
41
|
-
Image.getSizeWithHeaders = RNImage.getSizeWithHeaders;
|
|
42
|
-
Image.prefetch = RNImage.prefetch;
|
|
43
|
-
Image.prefetchWithMetadata = RNImage.prefetchWithMetadata;
|
|
44
|
-
Image.abortPrefetch = RNImage.abortPrefetch;
|
|
45
|
-
Image.queryCache = RNImage.queryCache;
|
|
46
|
-
export {
|
|
47
|
-
Image
|
|
48
|
-
};
|
|
49
|
-
//# sourceMappingURL=Image.mjs.map
|
package/dist/esm/Image.mjs.map
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/Image.tsx"],
|
|
4
|
-
"mappings": "AAiFW;AAjFX;AAAA,EAME;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAgB,k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