@tamagui/image 1.1.11 → 1.1.12
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/dist/cjs/Image.js.map +2 -2
- package/dist/esm/Image.js.map +2 -2
- package/dist/jsx/Image.js.map +2 -2
- package/package.json +3 -3
- package/src/Image.tsx +4 -1
- package/types/Image.d.ts +4 -2
package/dist/cjs/Image.js.map
CHANGED
|
@@ -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
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;
|
|
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
|
}
|
package/dist/esm/Image.js.map
CHANGED
|
@@ -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
|
|
5
|
-
"mappings": "
|
|
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
|
}
|
package/dist/jsx/Image.js.map
CHANGED
|
@@ -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
|
|
5
|
-
"mappings": "AAAA;AAAA,
|
|
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.
|
|
3
|
+
"version": "1.1.12",
|
|
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.
|
|
26
|
+
"@tamagui/core": "^1.1.12"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
29
|
"react": "*",
|
|
30
30
|
"react-native": "*"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@tamagui/build": "^1.1.
|
|
33
|
+
"@tamagui/build": "^1.1.12",
|
|
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;
|