@tamagui/image 1.88.22 → 1.88.23
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/esm/Image.native.js +18 -35
- package/dist/esm/Image.native.js.map +2 -2
- package/dist/esm/index.native.js +1 -19
- package/dist/esm/index.native.js.map +1 -1
- package/dist/jsx/Image.native.js +18 -35
- package/dist/jsx/Image.native.js.map +2 -2
- package/dist/jsx/index.native.js +1 -19
- package/dist/jsx/index.native.js.map +1 -1
- package/package.json +4 -4
package/dist/esm/Image.native.js
CHANGED
|
@@ -1,46 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
-
return to;
|
|
14
|
-
};
|
|
15
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
16
|
-
var Image_exports = {};
|
|
17
|
-
__export(Image_exports, {
|
|
18
|
-
Image: () => Image
|
|
19
|
-
});
|
|
20
|
-
module.exports = __toCommonJS(Image_exports);
|
|
21
|
-
var import_constants = require("@tamagui/constants"), import_core = require("@tamagui/core"), import_react = require("react"), import_react_native = require("react-native"), import_jsx_runtime = require("react/jsx-runtime");
|
|
22
|
-
const StyledImage = (0, import_core.styled)(import_react_native.Image, {
|
|
1
|
+
import { isWeb } from "@tamagui/constants";
|
|
2
|
+
import { styled, usePropsAndStyle } from "@tamagui/core";
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
import { Image as RNImage } from "react-native";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
const StyledImage = styled(RNImage, {
|
|
23
7
|
name: "Image"
|
|
24
8
|
});
|
|
25
9
|
let hasWarned = !1;
|
|
26
10
|
const Image = StyledImage.extractable(
|
|
27
|
-
|
|
28
|
-
const [props, style] =
|
|
11
|
+
forwardRef((inProps, ref) => {
|
|
12
|
+
const [props, style] = usePropsAndStyle(inProps), { src, source, ...rest } = props;
|
|
29
13
|
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(
|
|
30
14
|
'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
15
|
)));
|
|
32
|
-
let finalSource = typeof src == "string" ? { uri: src, ...
|
|
33
|
-
return finalSource && typeof finalSource == "object" && (Array.isArray(finalSource) || typeof finalSource.uri == "number" && (finalSource = finalSource.uri, source && typeof source == "object" && !Array.isArray(source) && (style.width ?? (style.width = source.width), style.height ?? (style.height = source.height))), finalSource.default && (finalSource = finalSource.default)), /* @__PURE__ */
|
|
16
|
+
let finalSource = typeof src == "string" ? { uri: src, ...isWeb && { width: props.width, height: props.height } } : source ?? src;
|
|
17
|
+
return finalSource && typeof finalSource == "object" && (Array.isArray(finalSource) || typeof finalSource.uri == "number" && (finalSource = finalSource.uri, source && typeof source == "object" && !Array.isArray(source) && (style.width ?? (style.width = source.width), style.height ?? (style.height = source.height))), finalSource.default && (finalSource = finalSource.default)), /* @__PURE__ */ jsx(StyledImage, { ref, source: finalSource, style, ...rest });
|
|
34
18
|
})
|
|
35
19
|
);
|
|
36
|
-
Image.getSize =
|
|
37
|
-
Image.getSizeWithHeaders =
|
|
38
|
-
Image.prefetch =
|
|
39
|
-
Image.prefetchWithMetadata =
|
|
40
|
-
Image.abortPrefetch =
|
|
41
|
-
Image.queryCache =
|
|
42
|
-
|
|
43
|
-
0 && (module.exports = {
|
|
20
|
+
Image.getSize = RNImage.getSize;
|
|
21
|
+
Image.getSizeWithHeaders = RNImage.getSizeWithHeaders;
|
|
22
|
+
Image.prefetch = RNImage.prefetch;
|
|
23
|
+
Image.prefetchWithMetadata = RNImage.prefetchWithMetadata;
|
|
24
|
+
Image.abortPrefetch = RNImage.abortPrefetch;
|
|
25
|
+
Image.queryCache = RNImage.queryCache;
|
|
26
|
+
export {
|
|
44
27
|
Image
|
|
45
|
-
}
|
|
28
|
+
};
|
|
46
29
|
//# sourceMappingURL=Image.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Image.tsx"],
|
|
4
|
-
"mappings": "
|
|
5
|
-
"names": [
|
|
4
|
+
"mappings": "AAAA,SAAS,aAAa;AAQtB,SAAS,QAAQ,wBAAwB;AACzC,SAAgB,kBAAkB;AAClC,SAAS,SAAS,eAAe;AAoFtB;AAlFX,MAAM,cAAc,OAAO,SAAS;AAAA,EAClC,MAAM;AACR,CAAC;AA6BD,IAAI,YAAY;AAET,MAAM,QAAQ,YAAY;AAAA,EAC/B,WAAW,CAAC,SAAqB,QAAQ;AACvC,UAAM,CAAC,OAAO,KAAK,IAAI,iBAAiB,OAAO,GACzC,EAAE,KAAK,QAAQ,GAAG,KAAK,IAAI;AAEjC,IAAI,QAAQ,IAAI,aAAa,iBACvB,OAAO,OAAQ,aAEd,OAAO,MAAM,SAAU,YAAY,MAAM,MAAM,CAAC,MAAM,OACtD,OAAO,MAAM,UAAW,YAAY,MAAM,OAAO,CAAC,MAAM,SAEpD,cACH,YAAY,IACZ,QAAQ;AAAA,MACN;AAAA,IACF;AAMR,QAAI,cACF,OAAO,OAAQ,WACX,EAAE,KAAK,KAAK,GAAI,SAAS,EAAE,OAAO,MAAM,OAAO,QAAQ,MAAM,OAAO,EAAG,IACvE,UAAU;AAEhB,WAAI,eAAe,OAAO,eAAgB,aAGjC,MAAM,QAAQ,WAAW,KACxB,OAAO,YAAY,OAAQ,aAC7B,cAAc,YAAY,KACtB,UAAU,OAAO,UAAW,YAAY,CAAC,MAAM,QAAQ,MAAM,MAE/D,MAAM,UAAN,MAAM,QAAU,OAAO,QAEvB,MAAM,WAAN,MAAM,SAAW,OAAO,WAO5B,YAAY,YACd,cAAc,YAAY,WAKvB,oBAAC,eAAY,KAAU,QAAQ,aAAa,OAAe,GAAI,MAAc;AAAA,EACtF,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
6
|
}
|
package/dist/esm/index.native.js
CHANGED
|
@@ -1,20 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
-
return to;
|
|
11
|
-
}, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
12
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
13
|
-
var src_exports = {};
|
|
14
|
-
module.exports = __toCommonJS(src_exports);
|
|
15
|
-
__reExport(src_exports, require("./Image"), module.exports);
|
|
16
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
17
|
-
0 && (module.exports = {
|
|
18
|
-
...require("./Image")
|
|
19
|
-
});
|
|
1
|
+
export * from "./Image";
|
|
20
2
|
//# sourceMappingURL=index.js.map
|
package/dist/jsx/Image.native.js
CHANGED
|
@@ -1,46 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
-
return to;
|
|
14
|
-
};
|
|
15
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
16
|
-
var Image_exports = {};
|
|
17
|
-
__export(Image_exports, {
|
|
18
|
-
Image: () => Image
|
|
19
|
-
});
|
|
20
|
-
module.exports = __toCommonJS(Image_exports);
|
|
21
|
-
var import_constants = require("@tamagui/constants"), import_core = require("@tamagui/core"), import_react = require("react"), import_react_native = require("react-native"), import_jsx_runtime = require("react/jsx-runtime");
|
|
22
|
-
const StyledImage = (0, import_core.styled)(import_react_native.Image, {
|
|
1
|
+
import { isWeb } from "@tamagui/constants";
|
|
2
|
+
import { styled, usePropsAndStyle } from "@tamagui/core";
|
|
3
|
+
import { forwardRef } from "react";
|
|
4
|
+
import { Image as RNImage } from "react-native";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
const StyledImage = styled(RNImage, {
|
|
23
7
|
name: "Image"
|
|
24
8
|
});
|
|
25
9
|
let hasWarned = !1;
|
|
26
10
|
const Image = StyledImage.extractable(
|
|
27
|
-
|
|
28
|
-
const [props, style] =
|
|
11
|
+
forwardRef((inProps, ref) => {
|
|
12
|
+
const [props, style] = usePropsAndStyle(inProps), { src, source, ...rest } = props;
|
|
29
13
|
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(
|
|
30
14
|
'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
15
|
)));
|
|
32
|
-
let finalSource = typeof src == "string" ? { uri: src, ...
|
|
33
|
-
return finalSource && typeof finalSource == "object" && (Array.isArray(finalSource) || typeof finalSource.uri == "number" && (finalSource = finalSource.uri, source && typeof source == "object" && !Array.isArray(source) && (style.width ?? (style.width = source.width), style.height ?? (style.height = source.height))), finalSource.default && (finalSource = finalSource.default)), /* @__PURE__ */
|
|
16
|
+
let finalSource = typeof src == "string" ? { uri: src, ...isWeb && { width: props.width, height: props.height } } : source ?? src;
|
|
17
|
+
return finalSource && typeof finalSource == "object" && (Array.isArray(finalSource) || typeof finalSource.uri == "number" && (finalSource = finalSource.uri, source && typeof source == "object" && !Array.isArray(source) && (style.width ?? (style.width = source.width), style.height ?? (style.height = source.height))), finalSource.default && (finalSource = finalSource.default)), /* @__PURE__ */ jsx(StyledImage, { ref, source: finalSource, style, ...rest });
|
|
34
18
|
})
|
|
35
19
|
);
|
|
36
|
-
Image.getSize =
|
|
37
|
-
Image.getSizeWithHeaders =
|
|
38
|
-
Image.prefetch =
|
|
39
|
-
Image.prefetchWithMetadata =
|
|
40
|
-
Image.abortPrefetch =
|
|
41
|
-
Image.queryCache =
|
|
42
|
-
|
|
43
|
-
0 && (module.exports = {
|
|
20
|
+
Image.getSize = RNImage.getSize;
|
|
21
|
+
Image.getSizeWithHeaders = RNImage.getSizeWithHeaders;
|
|
22
|
+
Image.prefetch = RNImage.prefetch;
|
|
23
|
+
Image.prefetchWithMetadata = RNImage.prefetchWithMetadata;
|
|
24
|
+
Image.abortPrefetch = RNImage.abortPrefetch;
|
|
25
|
+
Image.queryCache = RNImage.queryCache;
|
|
26
|
+
export {
|
|
44
27
|
Image
|
|
45
|
-
}
|
|
28
|
+
};
|
|
46
29
|
//# sourceMappingURL=Image.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Image.tsx"],
|
|
4
|
-
"mappings": "
|
|
5
|
-
"names": [
|
|
4
|
+
"mappings": "AAAA,SAAS,aAAa;AAQtB,SAAS,QAAQ,wBAAwB;AACzC,SAAgB,kBAAkB;AAClC,SAAS,SAAS,eAAe;AAoFtB;AAlFX,MAAM,cAAc,OAAO,SAAS;AAAA,EAClC,MAAM;AACR,CAAC;AA6BD,IAAI,YAAY;AAET,MAAM,QAAQ,YAAY;AAAA,EAC/B,WAAW,CAAC,SAAqB,QAAQ;AACvC,UAAM,CAAC,OAAO,KAAK,IAAI,iBAAiB,OAAO,GACzC,EAAE,KAAK,QAAQ,GAAG,KAAK,IAAI;AAEjC,IAAI,QAAQ,IAAI,aAAa,iBACvB,OAAO,OAAQ,aAEd,OAAO,MAAM,SAAU,YAAY,MAAM,MAAM,CAAC,MAAM,OACtD,OAAO,MAAM,UAAW,YAAY,MAAM,OAAO,CAAC,MAAM,SAEpD,cACH,YAAY,IACZ,QAAQ;AAAA,MACN;AAAA,IACF;AAMR,QAAI,cACF,OAAO,OAAQ,WACX,EAAE,KAAK,KAAK,GAAI,SAAS,EAAE,OAAO,MAAM,OAAO,QAAQ,MAAM,OAAO,EAAG,IACvE,UAAU;AAEhB,WAAI,eAAe,OAAO,eAAgB,aAGjC,MAAM,QAAQ,WAAW,KACxB,OAAO,YAAY,OAAQ,aAC7B,cAAc,YAAY,KACtB,UAAU,OAAO,UAAW,YAAY,CAAC,MAAM,QAAQ,MAAM,MAE/D,MAAM,UAAN,MAAM,QAAU,OAAO,QAEvB,MAAM,WAAN,MAAM,SAAW,OAAO,WAO5B,YAAY,YACd,cAAc,YAAY,WAKvB,oBAAC,eAAY,KAAU,QAAQ,aAAa,OAAe,GAAI,MAAc;AAAA,EACtF,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
6
|
}
|
package/dist/jsx/index.native.js
CHANGED
|
@@ -1,20 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
-
return to;
|
|
11
|
-
}, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
12
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
13
|
-
var src_exports = {};
|
|
14
|
-
module.exports = __toCommonJS(src_exports);
|
|
15
|
-
__reExport(src_exports, require("./Image"), module.exports);
|
|
16
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
17
|
-
0 && (module.exports = {
|
|
18
|
-
...require("./Image")
|
|
19
|
-
});
|
|
1
|
+
export * from "./Image";
|
|
20
2
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/image",
|
|
3
|
-
"version": "1.88.
|
|
3
|
+
"version": "1.88.23",
|
|
4
4
|
"sideEffects": [
|
|
5
5
|
"*.css"
|
|
6
6
|
],
|
|
@@ -23,15 +23,15 @@
|
|
|
23
23
|
"clean:build": "tamagui-build clean:build"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@tamagui/constants": "1.88.
|
|
27
|
-
"@tamagui/core": "1.88.
|
|
26
|
+
"@tamagui/constants": "1.88.23",
|
|
27
|
+
"@tamagui/core": "1.88.23"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"react": "*",
|
|
31
31
|
"react-native": "*"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@tamagui/build": "1.88.
|
|
34
|
+
"@tamagui/build": "1.88.23",
|
|
35
35
|
"react": "^18.2.0",
|
|
36
36
|
"react-native": "^0.72.6"
|
|
37
37
|
},
|