@tamagui/image
Advanced tools
Comparing version 1.105.2 to 1.105.3
@@ -26,3 +26,3 @@ var __defProp = Object.defineProperty; | ||
const Image = StyledImage.styleable((inProps, ref) => { | ||
const [props, style] = (0, import_core.usePropsAndStyle)(inProps), { src, source, ...rest } = props; | ||
const [props, style] = (0, import_core.usePropsAndStyle)(inProps), { src, source, objectFit, ...rest } = props; | ||
process.env.NODE_ENV === "development" && typeof src == "string" && (typeof props.width == "string" && props.width[0] !== "$" || typeof props.height == "string" && props.height[0] !== "$") && (hasWarned || (hasWarned = !0, console.warn( | ||
@@ -48,3 +48,12 @@ '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.' | ||
run(); | ||
}, [src]), finalSource.default && (finalSource = finalSource.default)), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.Image, { ref, source: finalSource, style, ...rest }); | ||
}, [src]), finalSource.default && (finalSource = finalSource.default)), /* @__PURE__ */ (0, import_jsx_runtime.jsx)( | ||
import_react_native.Image, | ||
{ | ||
resizeMode: objectFit, | ||
ref, | ||
source: finalSource, | ||
style, | ||
...rest | ||
} | ||
); | ||
}); | ||
@@ -51,0 +60,0 @@ Image.getSize = import_react_native.Image.getSize; |
@@ -216,5 +216,6 @@ "use strict"; | ||
}), hasWarned = !1, Image = StyledImage.styleable(function(inProps, ref) { | ||
var _usePropsAndStyle = _sliced_to_array((0, import_core.usePropsAndStyle)(inProps), 2), props = _usePropsAndStyle[0], style = _usePropsAndStyle[1], src = props.src, source = props.source, rest = _object_without_properties(props, [ | ||
var _usePropsAndStyle = _sliced_to_array((0, import_core.usePropsAndStyle)(inProps), 2), props = _usePropsAndStyle[0], style = _usePropsAndStyle[1], src = props.src, source = props.source, objectFit = props.objectFit, rest = _object_without_properties(props, [ | ||
"src", | ||
"source" | ||
"source", | ||
"objectFit" | ||
]); | ||
@@ -288,2 +289,3 @@ process.env.NODE_ENV === "development" && typeof src == "string" && (typeof props.width == "string" && props.width[0] !== "$" || typeof props.height == "string" && props.height[0] !== "$") && (hasWarned || (hasWarned = !0, console.warn('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.'))); | ||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.Image, _object_spread({ | ||
resizeMode: objectFit, | ||
ref, | ||
@@ -290,0 +292,0 @@ source: finalSource, |
@@ -11,3 +11,3 @@ import { isWeb } from "@tamagui/constants"; | ||
const Image = StyledImage.styleable((inProps, ref) => { | ||
const [props, style] = usePropsAndStyle(inProps), { src, source, ...rest } = props; | ||
const [props, style] = usePropsAndStyle(inProps), { src, source, objectFit, ...rest } = props; | ||
process.env.NODE_ENV === "development" && typeof src == "string" && (typeof props.width == "string" && props.width[0] !== "$" || typeof props.height == "string" && props.height[0] !== "$") && (hasWarned || (hasWarned = !0, console.warn( | ||
@@ -33,3 +33,12 @@ '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.' | ||
run(); | ||
}, [src]), finalSource.default && (finalSource = finalSource.default)), /* @__PURE__ */ jsx(RNImage, { ref, source: finalSource, style, ...rest }); | ||
}, [src]), finalSource.default && (finalSource = finalSource.default)), /* @__PURE__ */ jsx( | ||
RNImage, | ||
{ | ||
resizeMode: objectFit, | ||
ref, | ||
source: finalSource, | ||
style, | ||
...rest | ||
} | ||
); | ||
}); | ||
@@ -36,0 +45,0 @@ Image.getSize = RNImage.getSize; |
@@ -200,5 +200,6 @@ import { jsx as _jsx } from "react/jsx-runtime"; | ||
}), hasWarned = !1, Image = StyledImage.styleable(function(inProps, ref) { | ||
var _usePropsAndStyle = _sliced_to_array(usePropsAndStyle(inProps), 2), props = _usePropsAndStyle[0], style = _usePropsAndStyle[1], src = props.src, source = props.source, rest = _object_without_properties(props, [ | ||
var _usePropsAndStyle = _sliced_to_array(usePropsAndStyle(inProps), 2), props = _usePropsAndStyle[0], style = _usePropsAndStyle[1], src = props.src, source = props.source, objectFit = props.objectFit, rest = _object_without_properties(props, [ | ||
"src", | ||
"source" | ||
"source", | ||
"objectFit" | ||
]); | ||
@@ -272,2 +273,3 @@ process.env.NODE_ENV === "development" && typeof src == "string" && (typeof props.width == "string" && props.width[0] !== "$" || typeof props.height == "string" && props.height[0] !== "$") && (hasWarned || (hasWarned = !0, console.warn('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.'))); | ||
return /* @__PURE__ */ _jsx(RNImage, _object_spread({ | ||
resizeMode: objectFit, | ||
ref, | ||
@@ -274,0 +276,0 @@ source: finalSource, |
@@ -11,3 +11,3 @@ import { isWeb } from "@tamagui/constants"; | ||
const Image = StyledImage.styleable((inProps, ref) => { | ||
const [props, style] = usePropsAndStyle(inProps), { src, source, ...rest } = props; | ||
const [props, style] = usePropsAndStyle(inProps), { src, source, objectFit, ...rest } = props; | ||
process.env.NODE_ENV === "development" && typeof src == "string" && (typeof props.width == "string" && props.width[0] !== "$" || typeof props.height == "string" && props.height[0] !== "$") && (hasWarned || (hasWarned = !0, console.warn( | ||
@@ -33,3 +33,12 @@ '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.' | ||
run(); | ||
}, [src]), finalSource.default && (finalSource = finalSource.default)), /* @__PURE__ */ jsx(RNImage, { ref, source: finalSource, style, ...rest }); | ||
}, [src]), finalSource.default && (finalSource = finalSource.default)), /* @__PURE__ */ jsx( | ||
RNImage, | ||
{ | ||
resizeMode: objectFit, | ||
ref, | ||
source: finalSource, | ||
style, | ||
...rest | ||
} | ||
); | ||
}); | ||
@@ -36,0 +45,0 @@ Image.getSize = RNImage.getSize; |
@@ -200,5 +200,6 @@ import { jsx as _jsx } from "react/jsx-runtime"; | ||
}), hasWarned = !1, Image = StyledImage.styleable(function(inProps, ref) { | ||
var _usePropsAndStyle = _sliced_to_array(usePropsAndStyle(inProps), 2), props = _usePropsAndStyle[0], style = _usePropsAndStyle[1], src = props.src, source = props.source, rest = _object_without_properties(props, [ | ||
var _usePropsAndStyle = _sliced_to_array(usePropsAndStyle(inProps), 2), props = _usePropsAndStyle[0], style = _usePropsAndStyle[1], src = props.src, source = props.source, objectFit = props.objectFit, rest = _object_without_properties(props, [ | ||
"src", | ||
"source" | ||
"source", | ||
"objectFit" | ||
]); | ||
@@ -272,2 +273,3 @@ process.env.NODE_ENV === "development" && typeof src == "string" && (typeof props.width == "string" && props.width[0] !== "$" || typeof props.height == "string" && props.height[0] !== "$") && (hasWarned || (hasWarned = !0, console.warn('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.'))); | ||
return /* @__PURE__ */ _jsx(RNImage, _object_spread({ | ||
resizeMode: objectFit, | ||
ref, | ||
@@ -274,0 +276,0 @@ source: finalSource, |
{ | ||
"name": "@tamagui/image", | ||
"version": "1.105.2", | ||
"version": "1.105.3", | ||
"sideEffects": [ | ||
@@ -35,4 +35,4 @@ "*.css" | ||
"dependencies": { | ||
"@tamagui/constants": "1.105.2", | ||
"@tamagui/core": "1.105.2" | ||
"@tamagui/constants": "1.105.3", | ||
"@tamagui/core": "1.105.3" | ||
}, | ||
@@ -43,3 +43,3 @@ "peerDependencies": { | ||
"devDependencies": { | ||
"@tamagui/build": "1.105.2", | ||
"@tamagui/build": "1.105.3", | ||
"react": "^18.2.0", | ||
@@ -46,0 +46,0 @@ "react-native": "0.74.1" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
71584
1357
+ Added@tamagui/compose-refs@1.105.3(transitive)
+ Added@tamagui/constants@1.105.3(transitive)
+ Added@tamagui/core@1.105.3(transitive)
+ Added@tamagui/helpers@1.105.3(transitive)
+ Added@tamagui/normalize-css-color@1.105.3(transitive)
+ Added@tamagui/react-native-use-pressable@1.105.3(transitive)
+ Added@tamagui/react-native-use-responder-events@1.105.3(transitive)
+ Added@tamagui/simple-hash@1.105.3(transitive)
+ Added@tamagui/timer@1.105.3(transitive)
+ Added@tamagui/types@1.105.3(transitive)
+ Added@tamagui/use-did-finish-ssr@1.105.3(transitive)
+ Added@tamagui/use-event@1.105.3(transitive)
+ Added@tamagui/use-force-update@1.105.3(transitive)
+ Added@tamagui/web@1.105.3(transitive)
- Removed@tamagui/compose-refs@1.105.2(transitive)
- Removed@tamagui/constants@1.105.2(transitive)
- Removed@tamagui/core@1.105.2(transitive)
- Removed@tamagui/helpers@1.105.2(transitive)
- Removed@tamagui/normalize-css-color@1.105.2(transitive)
- Removed@tamagui/react-native-use-pressable@1.105.2(transitive)
- Removed@tamagui/react-native-use-responder-events@1.105.2(transitive)
- Removed@tamagui/simple-hash@1.105.2(transitive)
- Removed@tamagui/timer@1.105.2(transitive)
- Removed@tamagui/types@1.105.2(transitive)
- Removed@tamagui/use-did-finish-ssr@1.105.2(transitive)
- Removed@tamagui/use-event@1.105.2(transitive)
- Removed@tamagui/use-force-update@1.105.2(transitive)
- Removed@tamagui/web@1.105.2(transitive)
Updated@tamagui/constants@1.105.3
Updated@tamagui/core@1.105.3