@tamagui/image 1.1.11 → 1.1.13

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Image.tsx"],
4
- "sourcesContent": ["import {\n GetProps,\n StackProps,\n getExpandedShorthands,\n isWeb,\n setupReactNative,\n styled,\n} from '@tamagui/core'\nimport React from 'react'\nimport { Image as RNImage } from 'react-native'\n\nsetupReactNative({\n Image: RNImage,\n})\n\nconst StyledImage = styled(RNImage, {\n name: 'Image',\n position: 'relative',\n source: { uri: '' },\n zIndex: 1,\n})\n\ntype StyledImageProps = GetProps<typeof StyledImage>\n\ntype BaseProps = Omit<\n StyledImageProps,\n 'source' | 'width' | 'height' | 'style' | 'onLayout'\n> & {\n width: number | string\n height: number | string\n src: string | StyledImageProps['source']\n}\n\nexport type ImageProps = BaseProps & Omit<StackProps, keyof BaseProps>\n\nexport const Image: React.FC<ImageProps> = StyledImage.extractable((inProps) => {\n const props = getExpandedShorthands(inProps)\n const { src, ...rest } = props\n const source =\n typeof src === 'string'\n ? { uri: src, ...(isWeb && { width: props.width, height: props.height }) }\n : src\n\n // must set defaultSource to allow SSR, default it to the same as src\n return <StyledImage source={source} {...(rest as any)} />\n})\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA4CS;AA5CT,kBAOO;AAEP,0BAAiC;AAAA,IAEjC,8BAAiB;AAAA,EACf,OAAO,oBAAAA;AACT,CAAC;AAED,MAAM,kBAAc,oBAAO,oBAAAA,OAAS;AAAA,EAClC,MAAM;AAAA,EACN,UAAU;AAAA,EACV,QAAQ,EAAE,KAAK,GAAG;AAAA,EAClB,QAAQ;AACV,CAAC;AAeM,MAAM,QAA8B,YAAY,YAAY,CAAC,YAAY;AAC9E,QAAM,YAAQ,mCAAsB,OAAO;AAC3C,QAAM,EAAE,KAAK,GAAG,KAAK,IAAI;AACzB,QAAM,SACJ,OAAO,QAAQ,WACX,EAAE,KAAK,KAAK,GAAI,qBAAS,EAAE,OAAO,MAAM,OAAO,QAAQ,MAAM,OAAO,EAAG,IACvE;AAGN,SAAO,4CAAC,eAAY,QAAiB,GAAI,MAAc;AACzD,CAAC;",
4
+ "sourcesContent": ["import {\n GetProps,\n RadiusTokens,\n StackProps,\n getExpandedShorthands,\n isWeb,\n setupReactNative,\n styled,\n} from '@tamagui/core'\nimport React from 'react'\nimport { Image as RNImage } from 'react-native'\n\nsetupReactNative({\n Image: RNImage,\n})\n\nconst StyledImage = styled(RNImage, {\n name: 'Image',\n position: 'relative',\n source: { uri: '' },\n zIndex: 1,\n})\n\ntype StyledImageProps = Omit<GetProps<typeof StyledImage>, 'borderRadius'> & {\n borderRadius?: RadiusTokens\n}\n\ntype BaseProps = Omit<\n StyledImageProps,\n 'source' | 'width' | 'height' | 'style' | 'onLayout'\n> & {\n width: number | string\n height: number | string\n src: string | StyledImageProps['source']\n}\n\nexport type ImageProps = BaseProps & Omit<StackProps, keyof BaseProps>\n\nexport const Image: React.FC<ImageProps> = StyledImage.extractable((inProps) => {\n const props = getExpandedShorthands(inProps)\n const { src, ...rest } = props\n const source =\n typeof src === 'string'\n ? { uri: src, ...(isWeb && { width: props.width, height: props.height }) }\n : src\n\n // must set defaultSource to allow SSR, default it to the same as src\n return <StyledImage source={source} {...(rest as any)} />\n})\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA+CS;AA/CT,kBAQO;AAEP,0BAAiC;AAAA,IAEjC,8BAAiB;AAAA,EACf,OAAO,oBAAAA;AACT,CAAC;AAED,MAAM,kBAAc,oBAAO,oBAAAA,OAAS;AAAA,EAClC,MAAM;AAAA,EACN,UAAU;AAAA,EACV,QAAQ,EAAE,KAAK,GAAG;AAAA,EAClB,QAAQ;AACV,CAAC;AAiBM,MAAM,QAA8B,YAAY,YAAY,CAAC,YAAY;AAC9E,QAAM,YAAQ,mCAAsB,OAAO;AAC3C,QAAM,EAAE,KAAK,GAAG,KAAK,IAAI;AACzB,QAAM,SACJ,OAAO,QAAQ,WACX,EAAE,KAAK,KAAK,GAAI,qBAAS,EAAE,OAAO,MAAM,OAAO,QAAQ,MAAM,OAAO,EAAG,IACvE;AAGN,SAAO,4CAAC,eAAY,QAAiB,GAAI,MAAc;AACzD,CAAC;",
6
6
  "names": ["RNImage"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Image.tsx"],
4
- "sourcesContent": ["import {\n GetProps,\n StackProps,\n getExpandedShorthands,\n isWeb,\n setupReactNative,\n styled,\n} from '@tamagui/core'\nimport React from 'react'\nimport { Image as RNImage } from 'react-native'\n\nsetupReactNative({\n Image: RNImage,\n})\n\nconst StyledImage = styled(RNImage, {\n name: 'Image',\n position: 'relative',\n source: { uri: '' },\n zIndex: 1,\n})\n\ntype StyledImageProps = GetProps<typeof StyledImage>\n\ntype BaseProps = Omit<\n StyledImageProps,\n 'source' | 'width' | 'height' | 'style' | 'onLayout'\n> & {\n width: number | string\n height: number | string\n src: string | StyledImageProps['source']\n}\n\nexport type ImageProps = BaseProps & Omit<StackProps, keyof BaseProps>\n\nexport const Image: React.FC<ImageProps> = StyledImage.extractable((inProps) => {\n const props = getExpandedShorthands(inProps)\n const { src, ...rest } = props\n const source =\n typeof src === 'string'\n ? { uri: src, ...(isWeb && { width: props.width, height: props.height }) }\n : src\n\n // must set defaultSource to allow SSR, default it to the same as src\n return <StyledImage source={source} {...(rest as any)} />\n})\n"],
5
- "mappings": "AA4CS;AA5CT;AAAA,EAGE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,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;AAAA,EAClB,QAAQ;AACV,CAAC;AAeM,MAAM,QAA8B,YAAY,YAAY,CAAC,YAAY;AAC9E,QAAM,QAAQ,sBAAsB,OAAO;AAC3C,QAAM,EAAE,KAAK,GAAG,KAAK,IAAI;AACzB,QAAM,SACJ,OAAO,QAAQ,WACX,EAAE,KAAK,KAAK,GAAI,SAAS,EAAE,OAAO,MAAM,OAAO,QAAQ,MAAM,OAAO,EAAG,IACvE;AAGN,SAAO,oBAAC,eAAY,QAAiB,GAAI,MAAc;AACzD,CAAC;",
4
+ "sourcesContent": ["import {\n GetProps,\n RadiusTokens,\n StackProps,\n getExpandedShorthands,\n isWeb,\n setupReactNative,\n styled,\n} from '@tamagui/core'\nimport React from 'react'\nimport { Image as RNImage } from 'react-native'\n\nsetupReactNative({\n Image: RNImage,\n})\n\nconst StyledImage = styled(RNImage, {\n name: 'Image',\n position: 'relative',\n source: { uri: '' },\n zIndex: 1,\n})\n\ntype StyledImageProps = Omit<GetProps<typeof StyledImage>, 'borderRadius'> & {\n borderRadius?: RadiusTokens\n}\n\ntype BaseProps = Omit<\n StyledImageProps,\n 'source' | 'width' | 'height' | 'style' | 'onLayout'\n> & {\n width: number | string\n height: number | string\n src: string | StyledImageProps['source']\n}\n\nexport type ImageProps = BaseProps & Omit<StackProps, keyof BaseProps>\n\nexport const Image: React.FC<ImageProps> = StyledImage.extractable((inProps) => {\n const props = getExpandedShorthands(inProps)\n const { src, ...rest } = props\n const source =\n typeof src === 'string'\n ? { uri: src, ...(isWeb && { width: props.width, height: props.height }) }\n : src\n\n // must set defaultSource to allow SSR, default it to the same as src\n return <StyledImage source={source} {...(rest as any)} />\n})\n"],
5
+ "mappings": "AA+CS;AA/CT;AAAA,EAIE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,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;AAAA,EAClB,QAAQ;AACV,CAAC;AAiBM,MAAM,QAA8B,YAAY,YAAY,CAAC,YAAY;AAC9E,QAAM,QAAQ,sBAAsB,OAAO;AAC3C,QAAM,EAAE,KAAK,GAAG,KAAK,IAAI;AACzB,QAAM,SACJ,OAAO,QAAQ,WACX,EAAE,KAAK,KAAK,GAAI,SAAS,EAAE,OAAO,MAAM,OAAO,QAAQ,MAAM,OAAO,EAAG,IACvE;AAGN,SAAO,oBAAC,eAAY,QAAiB,GAAI,MAAc;AACzD,CAAC;",
6
6
  "names": []
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Image.tsx"],
4
- "sourcesContent": ["import {\n GetProps,\n StackProps,\n getExpandedShorthands,\n isWeb,\n setupReactNative,\n styled,\n} from '@tamagui/core'\nimport React from 'react'\nimport { Image as RNImage } from 'react-native'\n\nsetupReactNative({\n Image: RNImage,\n})\n\nconst StyledImage = styled(RNImage, {\n name: 'Image',\n position: 'relative',\n source: { uri: '' },\n zIndex: 1,\n})\n\ntype StyledImageProps = GetProps<typeof StyledImage>\n\ntype BaseProps = Omit<\n StyledImageProps,\n 'source' | 'width' | 'height' | 'style' | 'onLayout'\n> & {\n width: number | string\n height: number | string\n src: string | StyledImageProps['source']\n}\n\nexport type ImageProps = BaseProps & Omit<StackProps, keyof BaseProps>\n\nexport const Image: React.FC<ImageProps> = StyledImage.extractable((inProps) => {\n const props = getExpandedShorthands(inProps)\n const { src, ...rest } = props\n const source =\n typeof src === 'string'\n ? { uri: src, ...(isWeb && { width: props.width, height: props.height }) }\n : src\n\n // must set defaultSource to allow SSR, default it to the same as src\n return <StyledImage source={source} {...(rest as any)} />\n})\n"],
5
- "mappings": "AAAA;AAAA,EAGE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,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;AAAA,EAClB,QAAQ;AACV,CAAC;AAeM,MAAM,QAA8B,YAAY,YAAY,CAAC,YAAY;AAC9E,QAAM,QAAQ,sBAAsB,OAAO;AAC3C,QAAM,EAAE,KAAK,GAAG,KAAK,IAAI;AACzB,QAAM,SACJ,OAAO,QAAQ,WACX,EAAE,KAAK,KAAK,GAAI,SAAS,EAAE,OAAO,MAAM,OAAO,QAAQ,MAAM,OAAO,EAAG,IACvE;AAGN,SAAO,CAAC,YAAY,QAAQ,YAAa,MAAc;AACzD,CAAC;",
4
+ "sourcesContent": ["import {\n GetProps,\n RadiusTokens,\n StackProps,\n getExpandedShorthands,\n isWeb,\n setupReactNative,\n styled,\n} from '@tamagui/core'\nimport React from 'react'\nimport { Image as RNImage } from 'react-native'\n\nsetupReactNative({\n Image: RNImage,\n})\n\nconst StyledImage = styled(RNImage, {\n name: 'Image',\n position: 'relative',\n source: { uri: '' },\n zIndex: 1,\n})\n\ntype StyledImageProps = Omit<GetProps<typeof StyledImage>, 'borderRadius'> & {\n borderRadius?: RadiusTokens\n}\n\ntype BaseProps = Omit<\n StyledImageProps,\n 'source' | 'width' | 'height' | 'style' | 'onLayout'\n> & {\n width: number | string\n height: number | string\n src: string | StyledImageProps['source']\n}\n\nexport type ImageProps = BaseProps & Omit<StackProps, keyof BaseProps>\n\nexport const Image: React.FC<ImageProps> = StyledImage.extractable((inProps) => {\n const props = getExpandedShorthands(inProps)\n const { src, ...rest } = props\n const source =\n typeof src === 'string'\n ? { uri: src, ...(isWeb && { width: props.width, height: props.height }) }\n : src\n\n // must set defaultSource to allow SSR, default it to the same as src\n return <StyledImage source={source} {...(rest as any)} />\n})\n"],
5
+ "mappings": "AAAA;AAAA,EAIE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,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;AAAA,EAClB,QAAQ;AACV,CAAC;AAiBM,MAAM,QAA8B,YAAY,YAAY,CAAC,YAAY;AAC9E,QAAM,QAAQ,sBAAsB,OAAO;AAC3C,QAAM,EAAE,KAAK,GAAG,KAAK,IAAI;AACzB,QAAM,SACJ,OAAO,QAAQ,WACX,EAAE,KAAK,KAAK,GAAI,SAAS,EAAE,OAAO,MAAM,OAAO,QAAQ,MAAM,OAAO,EAAG,IACvE;AAGN,SAAO,CAAC,YAAY,QAAQ,YAAa,MAAc;AACzD,CAAC;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/image",
3
- "version": "1.1.11",
3
+ "version": "1.1.13",
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.1.11"
26
+ "@tamagui/core": "^1.1.13"
27
27
  },
28
28
  "peerDependencies": {
29
29
  "react": "*",
30
30
  "react-native": "*"
31
31
  },
32
32
  "devDependencies": {
33
- "@tamagui/build": "^1.1.11",
33
+ "@tamagui/build": "^1.1.13",
34
34
  "react": "^18.2.0",
35
35
  "react-native": "*"
36
36
  },
package/src/Image.tsx CHANGED
@@ -1,5 +1,6 @@
1
1
  import {
2
2
  GetProps,
3
+ RadiusTokens,
3
4
  StackProps,
4
5
  getExpandedShorthands,
5
6
  isWeb,
@@ -20,7 +21,9 @@ const StyledImage = styled(RNImage, {
20
21
  zIndex: 1,
21
22
  })
22
23
 
23
- type StyledImageProps = GetProps<typeof StyledImage>
24
+ type StyledImageProps = Omit<GetProps<typeof StyledImage>, 'borderRadius'> & {
25
+ borderRadius?: RadiusTokens
26
+ }
24
27
 
25
28
  type BaseProps = Omit<
26
29
  StyledImageProps,
package/types/Image.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { GetProps, StackProps } from '@tamagui/core';
1
+ import { GetProps, RadiusTokens, StackProps } from '@tamagui/core';
2
2
  import React from 'react';
3
3
  declare const StyledImage: import("@tamagui/core").TamaguiComponent<(import("react-native").ImageProps & Omit<StackProps, keyof import("react-native").ImageProps>) | (import("react-native").ImageProps & Omit<StackProps, keyof import("react-native").ImageProps> & Omit<{}, string | number> & {
4
4
  [x: string]: undefined;
@@ -9,7 +9,9 @@ declare const StyledImage: import("@tamagui/core").TamaguiComponent<(import("rea
9
9
  }>>), import("@tamagui/core").TamaguiElement, import("react-native").ImageProps & Omit<StackProps, keyof import("react-native").ImageProps>, {} | {
10
10
  [x: string]: undefined;
11
11
  }>;
12
- type StyledImageProps = GetProps<typeof StyledImage>;
12
+ type StyledImageProps = Omit<GetProps<typeof StyledImage>, 'borderRadius'> & {
13
+ borderRadius?: RadiusTokens;
14
+ };
13
15
  type BaseProps = Omit<StyledImageProps, 'source' | 'width' | 'height' | 'style' | 'onLayout'> & {
14
16
  width: number | string;
15
17
  height: number | string;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../src/Image.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,YAAY,EACZ,UAAU,EAKX,MAAM,eAAe,CAAA;AACtB,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,QAAA,MAAM,WAAW;;;;;;;;EAKf,CAAA;AAEF,KAAK,gBAAgB,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,WAAW,CAAC,EAAE,cAAc,CAAC,GAAG;IAC3E,YAAY,CAAC,EAAE,YAAY,CAAA;CAC5B,CAAA;AAED,KAAK,SAAS,GAAG,IAAI,CACnB,gBAAgB,EAChB,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,CACrD,GAAG;IACF,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;IACtB,MAAM,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAAC,QAAQ,CAAC,CAAA;CACzC,CAAA;AAED,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,IAAI,CAAC,UAAU,EAAE,MAAM,SAAS,CAAC,CAAA;AAEtE,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAUrC,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA"}