@tamagui/image 1.46.1 → 1.47.0

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": "@tamagui/image",
3
- "version": "1.46.1",
3
+ "version": "1.47.0",
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.46.1"
26
+ "@tamagui/core": "1.47.0"
27
27
  },
28
28
  "peerDependencies": {
29
29
  "react": "*",
30
30
  "react-native": "*"
31
31
  },
32
32
  "devDependencies": {
33
- "@tamagui/build": "1.46.1",
33
+ "@tamagui/build": "1.47.0",
34
34
  "react": "^18.2.0",
35
35
  "react-native": "^0.72.1"
36
36
  },
@@ -1,47 +0,0 @@
1
- import {
2
- isWeb,
3
- setupReactNative,
4
- styled,
5
- useProps
6
- } from "@tamagui/core";
7
- import { forwardRef } from "react";
8
- import { Image as RNImage } from "react-native";
9
- setupReactNative({
10
- Image: RNImage
11
- });
12
- const StyledImage = styled(RNImage, {
13
- name: "Image",
14
- position: "relative",
15
- source: { uri: "" }
16
- });
17
- let hasWarned = false;
18
- const Image = StyledImage.extractable(
19
- forwardRef((inProps, ref) => {
20
- const props = useProps(inProps);
21
- const { src, source, ...rest } = props;
22
- if (process.env.NODE_ENV === "development") {
23
- if (typeof src === "string") {
24
- if (typeof props.width === "string" && props.width[0] !== "$" || typeof props.height === "string" && props.height[0] !== "$") {
25
- if (!hasWarned) {
26
- hasWarned = true;
27
- console.warn(
28
- `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.`
29
- );
30
- }
31
- }
32
- }
33
- }
34
- const finalSource = typeof src === "string" ? { uri: src, ...isWeb && { width: props.width, height: props.height } } : source ?? src;
35
- return <StyledImage ref={ref} source={finalSource} {...rest} />;
36
- })
37
- );
38
- Image.getSize = RNImage.getSize;
39
- Image.getSizeWithHeaders = RNImage.getSizeWithHeaders;
40
- Image.prefetch = RNImage.prefetch;
41
- Image.prefetchWithMetadata = RNImage.prefetchWithMetadata;
42
- Image.abortPrefetch = RNImage.abortPrefetch;
43
- Image.queryCache = RNImage.queryCache;
44
- export {
45
- Image
46
- };
47
- //# sourceMappingURL=Image.mjs.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/Image.tsx"],
4
- "mappings": "AAAA;AAAA,EAME;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAgB,kBAAkB;AAClC,SAAS,SAAS,eAAe;AAEjC,iBAAiB;AAAA,EACf,OAAO;AACT,CAAC;AAED,MAAM,cAAc,OAAO,SAAS;AAAA,EAClC,MAAM;AAAA,EACN,UAAU;AAAA,EACV,QAAQ,EAAE,KAAK,GAAG;AACpB,CAAC;AA6BD,IAAI,YAAY;AAET,MAAM,QAAQ,YAAY;AAAA,EAC/B,WAAW,CAAC,SAAqB,QAAQ;AACvC,UAAM,QAAQ,SAAS,OAAO;AAC9B,UAAM,EAAE,KAAK,QAAQ,GAAG,KAAK,IAAI;AAEjC,QAAI,QAAQ,IAAI,aAAa,eAAe;AAC1C,UAAI,OAAO,QAAQ,UAAU;AAC3B,YACG,OAAO,MAAM,UAAU,YAAY,MAAM,MAAM,CAAC,MAAM,OACtD,OAAO,MAAM,WAAW,YAAY,MAAM,OAAO,CAAC,MAAM,KACzD;AACA,cAAI,CAAC,WAAW;AACd,wBAAY;AACZ,oBAAQ;AAAA,cACN;AAAA,YACF;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAEA,UAAM,cACJ,OAAO,QAAQ,WACX,EAAE,KAAK,KAAK,GAAI,SAAS,EAAE,OAAO,MAAM,OAAO,QAAQ,MAAM,OAAO,EAAG,IACvE,UAAU;AAGhB,WAAO,CAAC,YAAY,KAAK,KAAK,QAAQ,iBAAkB,MAAc;AAAA,EACxE,CAAC;AACH;AAEA,MAAM,UAAU,QAAQ;AACxB,MAAM,qBAAqB,QAAQ;AACnC,MAAM,WAAW,QAAQ;AACzB,MAAM,uBAAuB,QAAQ;AACrC,MAAM,gBAAgB,QAAQ;AAC9B,MAAM,aAAa,QAAQ;",
5
- "names": []
6
- }
@@ -1,2 +0,0 @@
1
- export * from "./Image";
2
- //# sourceMappingURL=index.mjs.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/index.ts"],
4
- "mappings": "AAAA,cAAc;",
5
- "names": []
6
- }