@tamagui/image 2.0.0-rc.4 → 2.0.0-rc.40
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.cjs +42 -40
- package/dist/cjs/Image.native.js +17 -15
- package/dist/cjs/Image.native.js.map +1 -1
- package/dist/cjs/createImage.cjs +123 -88
- package/dist/cjs/createImage.native.js +128 -95
- package/dist/cjs/createImage.native.js.map +1 -1
- package/dist/cjs/index.cjs +7 -5
- package/dist/cjs/index.native.js +7 -5
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/types.cjs +7 -5
- package/dist/cjs/types.native.js +7 -5
- package/dist/cjs/types.native.js.map +1 -1
- package/dist/cjs/v1/Image.cjs +63 -48
- package/dist/cjs/v1/Image.native.js +91 -73
- package/dist/cjs/v1/Image.native.js.map +1 -1
- package/dist/cjs/v1/index.cjs +7 -5
- package/dist/cjs/v1/index.native.js +7 -5
- package/dist/cjs/v1/index.native.js.map +1 -1
- package/dist/esm/Image.mjs +28 -28
- package/dist/esm/Image.mjs.map +1 -1
- package/dist/esm/createImage.mjs +109 -76
- package/dist/esm/createImage.mjs.map +1 -1
- package/dist/esm/createImage.native.js +113 -82
- package/dist/esm/createImage.native.js.map +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -6
- package/dist/esm/v1/Image.mjs +34 -21
- package/dist/esm/v1/Image.mjs.map +1 -1
- package/dist/esm/v1/Image.native.js +62 -46
- package/dist/esm/v1/Image.native.js.map +1 -1
- package/dist/jsx/Image.mjs +28 -28
- package/dist/jsx/Image.mjs.map +1 -1
- package/dist/jsx/Image.native.js +17 -15
- package/dist/jsx/Image.native.js.map +1 -1
- package/dist/jsx/createImage.mjs +109 -76
- package/dist/jsx/createImage.mjs.map +1 -1
- package/dist/jsx/createImage.native.js +128 -95
- package/dist/jsx/createImage.native.js.map +1 -1
- package/dist/jsx/index.js +2 -2
- package/dist/jsx/index.js.map +1 -6
- package/dist/jsx/index.native.js +7 -5
- package/dist/jsx/types.native.js +7 -5
- package/dist/jsx/v1/Image.mjs +34 -21
- package/dist/jsx/v1/Image.mjs.map +1 -1
- package/dist/jsx/v1/Image.native.js +91 -73
- package/dist/jsx/v1/Image.native.js.map +1 -1
- package/dist/jsx/v1/index.native.js +7 -5
- package/package.json +9 -12
- package/src/createImage.tsx +20 -6
- package/src/types.ts +1 -1
- package/types/Image.native.d.ts +1 -1
- package/types/createImage.d.ts +2 -2
- package/types/createImage.d.ts.map +1 -1
- package/types/types.d.ts +1 -1
- package/types/types.d.ts.map +1 -1
- package/dist/cjs/Image.js +0 -55
- package/dist/cjs/Image.js.map +0 -6
- package/dist/cjs/createImage.js +0 -127
- package/dist/cjs/createImage.js.map +0 -6
- package/dist/cjs/index.js +0 -16
- package/dist/cjs/index.js.map +0 -6
- package/dist/cjs/types.js +0 -14
- package/dist/cjs/types.js.map +0 -6
- package/dist/cjs/v1/Image.js +0 -72
- package/dist/cjs/v1/Image.js.map +0 -6
- package/dist/cjs/v1/index.js +0 -15
- package/dist/cjs/v1/index.js.map +0 -6
- package/dist/esm/Image.js +0 -40
- package/dist/esm/Image.js.map +0 -6
- package/dist/esm/createImage.js +0 -112
- package/dist/esm/createImage.js.map +0 -6
- package/dist/esm/types.js +0 -1
- package/dist/esm/types.js.map +0 -6
- package/dist/esm/v1/Image.js +0 -52
- package/dist/esm/v1/Image.js.map +0 -6
- package/dist/esm/v1/index.js +0 -2
- package/dist/esm/v1/index.js.map +0 -6
- package/dist/jsx/Image.js +0 -40
- package/dist/jsx/Image.js.map +0 -6
- package/dist/jsx/createImage.js +0 -112
- package/dist/jsx/createImage.js.map +0 -6
- package/dist/jsx/types.js +0 -1
- package/dist/jsx/types.js.map +0 -6
- package/dist/jsx/v1/Image.js +0 -52
- package/dist/jsx/v1/Image.js.map +0 -6
- package/dist/jsx/v1/index.js +0 -2
- package/dist/jsx/v1/index.js.map +0 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","createImage_exports","__export","createImage","module","exports","import_jsx_runtime","require","import_web","defaultObjectFitMap","objectFit","defaultTransformSource","props","src","source","width","height","uri","options","Component","mapObjectFitToResizeMode","resizeModePropName","objectPositionPropName","transformSource","inlinePropsSet","Set","StyledImage","styled","name","inlineProps","ImageComponent","styleable","incomingProps","ref","objectPosition","decoding","elementTiming","fetchpriority","isMap","loading","sizes","useMap","onLoad","onError","rest","resolvedWidth","getTokenValue","resolvedHeight","finalSource","
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","createImage_exports","__export","createImage","module","exports","import_jsx_runtime","require","import_web","defaultObjectFitMap","objectFit","defaultTransformSource","props","src","source","width","height","uri","options","Component","mapObjectFitToResizeMode","resizeModePropName","objectPositionPropName","transformSource","inlinePropsSet","Set","StyledImage","styled","name","inlineProps","ImageComponent","styleable","incomingProps","ref","borderRadius","objectPosition","decoding","elementTiming","fetchpriority","isMap","loading","sizes","useMap","onLoad","onError","rest","resolvedWidth","getTokenValue","resolvedHeight","finalSource","incomingStyle","Array","isArray","style","Object","assign","flat","resolvedBorderRadius","finalProps","e","_e_nativeEvent","nativeEvent","target","naturalHeight","naturalWidth","type","jsx","comp","getSize","getSizeWithHeaders","prefetch","prefetchWithMetadata","abortPrefetch","queryCache"],"sources":["../../src/createImage.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,mBAAA;AAAAC,QAAA,CAAAD,mBAAA;EAAAE,WAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAsCT,YAAA,CAAAK,mBAAA;AAuO3B,IAAAK,kBAAA,GAAAC,OAAA;AA7LX,IAAAC,UAAM,GAAAD,OAAA,eAAuB;AAC3B,IAAAE,m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ACEmB,MAAM;YACNC,aAAO,EAAAjD,MAAA,aAAAA,MAAA,uBAAAA,MAAA,CAAAE,MAAA;YACLgD,YAAQ,EAAAlD,MAAA,aAAAA,MAAA,uBAAAA,MAAA,CAAAC;UAAA;UACiBkD,IACvB;QAAsB,EACxB;MAAA;IACM;IACA,IACVrB,OAAA;MACFc,UAAA,CAAAd,OAAA;QAGIA,OAAA;UACFqB,IAAA;QACE;MAAQ;IACA;IACA,OACV,mBAAA3D,kBAAA,CAAA4D,GAAA,EAAA/C,SAAA;MACFc,GAAA;MAGA,GAAAyB;IACD;EAGD;EACA,IAAAS,IAAA,GAAAhD,SAAe;EAAkCW,cAAA,CAAAsC,OAAA,GAAAD,IAAA,CAAAC,OAAA,iBACjD;EAAuEtC,cAAA,CAAAuC,kBAAA,GAAAF,IAAA,CAAAE,kBAAA,iBACvE;EAAmDvC,cAAA,CAAAwC,QAAA,GAAAH,IAAA,CAAAG,QAAA,iBACnD;EAA2ExC,cAAA,CAAAyC,oBAAA,GAAAJ,IAAA,CAAAI,oBAAA,iBAC3E;EAA6DzC,cAAA,CAAA0C,aAAA,GAAAL,IAAA,CAAAK,aAAA,iBAC7D;EAAuD1C,cAAA,CAAA2C,UAAA,GAAAN,IAAA,CAAAM,UAAA,iBAEvD;EACF,OAAA3C,cAAA","ignoreList":[]}
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -3,15 +3,17 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
5
|
var __copyProps = (to, from, except, desc) => {
|
|
6
|
-
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
7
8
|
get: () => from[key],
|
|
8
9
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
9
10
|
});
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
13
15
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
14
|
-
value:
|
|
16
|
+
value: true
|
|
15
17
|
}), mod);
|
|
16
18
|
var index_exports = {};
|
|
17
19
|
module.exports = __toCommonJS(index_exports);
|
package/dist/cjs/index.native.js
CHANGED
|
@@ -5,15 +5,17 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __copyProps = (to, from, except, desc) => {
|
|
8
|
-
|
|
8
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
9
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
9
10
|
get: () => from[key],
|
|
10
11
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
11
12
|
});
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
17
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
16
|
-
value:
|
|
18
|
+
value: true
|
|
17
19
|
}), mod);
|
|
18
20
|
var index_exports = {};
|
|
19
21
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","module","exports","__reExport","require"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","module","exports","__reExport","require"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAP,YAAc,CAAAK,aAAA;AACdG,UAAA,CAAAH,aAAA,EAAcI,OAAA,uBAAAH,MADd,CAAAC,OAAA","ignoreList":[]}
|
package/dist/cjs/types.cjs
CHANGED
|
@@ -3,14 +3,16 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
5
|
var __copyProps = (to, from, except, desc) => {
|
|
6
|
-
if (from && typeof from
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
8
|
+
get: () => from[key],
|
|
9
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
10
|
+
});
|
|
11
|
+
}
|
|
10
12
|
return to;
|
|
11
13
|
};
|
|
12
14
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
13
|
-
value:
|
|
15
|
+
value: true
|
|
14
16
|
}), mod);
|
|
15
17
|
var types_exports = {};
|
|
16
18
|
module.exports = __toCommonJS(types_exports);
|
package/dist/cjs/types.native.js
CHANGED
|
@@ -5,14 +5,16 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __copyProps = (to, from, except, desc) => {
|
|
8
|
-
if (from && typeof from
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
9
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
10
|
+
get: () => from[key],
|
|
11
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
12
|
+
});
|
|
13
|
+
}
|
|
12
14
|
return to;
|
|
13
15
|
};
|
|
14
16
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
15
|
-
value:
|
|
17
|
+
value: true
|
|
16
18
|
}), mod);
|
|
17
19
|
var types_exports = {};
|
|
18
20
|
module.exports = __toCommonJS(types_exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","types_exports"],"sources":["../../src/types.ts"],"sourcesContent":[null],"mappings":"
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","types_exports"],"sources":["../../src/types.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA","ignoreList":[]}
|
package/dist/cjs/v1/Image.cjs
CHANGED
|
@@ -2,75 +2,90 @@ var __create = Object.create;
|
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf
|
|
6
|
-
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
15
16
|
get: () => from[key],
|
|
16
17
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
18
|
});
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
20
22
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
23
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
24
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
25
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
28
|
+
value: mod,
|
|
29
|
+
enumerable: true
|
|
30
|
+
}) : target, mod));
|
|
31
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
32
|
+
value: true
|
|
33
|
+
}), mod);
|
|
32
34
|
var Image_exports = {};
|
|
33
35
|
__export(Image_exports, {
|
|
34
36
|
Image: () => Image
|
|
35
37
|
});
|
|
36
38
|
module.exports = __toCommonJS(Image_exports);
|
|
37
|
-
var import_react = __toESM(require("react"), 1)
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
var import_react = __toESM(require("react"), 1);
|
|
40
|
+
var import_constants = require("@tamagui/constants");
|
|
41
|
+
var import_web = require("@tamagui/web");
|
|
42
|
+
var import_react_native = require("react-native-web");
|
|
43
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
42
44
|
const StyledImage = (0, import_web.styled)(import_react_native.Image, {
|
|
43
45
|
name: "Image"
|
|
44
46
|
});
|
|
45
|
-
let hasWarned =
|
|
47
|
+
let hasWarned = false;
|
|
46
48
|
const Image = StyledImage.styleable((inProps, ref) => {
|
|
47
|
-
const [props, style] = (0, import_web.usePropsAndStyle)(inProps)
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
process.env.NODE_ENV === "development"
|
|
55
|
-
|
|
49
|
+
const [props, style] = (0, import_web.usePropsAndStyle)(inProps);
|
|
50
|
+
const {
|
|
51
|
+
src,
|
|
52
|
+
source,
|
|
53
|
+
objectFit,
|
|
54
|
+
...rest
|
|
55
|
+
} = props;
|
|
56
|
+
if (process.env.NODE_ENV === "development") {
|
|
57
|
+
if (typeof src === "string") {
|
|
58
|
+
if (typeof props.width === "string" && props.width[0] !== "$" || typeof props.height === "string" && props.height[0] !== "$") {
|
|
59
|
+
if (!hasWarned) {
|
|
60
|
+
hasWarned = true;
|
|
61
|
+
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.`);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
let finalSource = typeof src === "string" ? {
|
|
56
67
|
uri: src,
|
|
57
68
|
...(import_constants.isWeb && {
|
|
58
69
|
width: props.width || style?.width,
|
|
59
70
|
height: props.height || style?.height
|
|
60
71
|
})
|
|
61
72
|
} : source ?? src;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
73
|
+
if (finalSource && typeof finalSource === "object") {
|
|
74
|
+
if (process.env.NODE_ENV === "development" && process.env.TAMAGUI_IMAGE_CHECK_ERROR) import_react.default.useEffect(() => {
|
|
75
|
+
async function run() {
|
|
76
|
+
if (typeof src === "string") try {
|
|
77
|
+
await fetch(src).then(res => res.text());
|
|
78
|
+
} catch (err) {
|
|
79
|
+
console.error(`Error loading image: ${src}`, {
|
|
80
|
+
props
|
|
81
|
+
});
|
|
82
|
+
}
|
|
70
83
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
84
|
+
run();
|
|
85
|
+
}, [src]);
|
|
86
|
+
if (finalSource["default"]) finalSource = finalSource["default"];
|
|
87
|
+
}
|
|
88
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react_native.Image, {
|
|
74
89
|
resizeMode: objectFit,
|
|
75
90
|
ref,
|
|
76
91
|
source: finalSource,
|
|
@@ -4,98 +4,116 @@ var __create = Object.create;
|
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf
|
|
8
|
-
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
9
|
var __export = (target, all) => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
for (var name in all) __defProp(target, name, {
|
|
11
|
+
get: all[name],
|
|
12
|
+
enumerable: true
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
var __copyProps = (to, from, except, desc) => {
|
|
16
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
17
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
17
18
|
get: () => from[key],
|
|
18
19
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
20
|
});
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
}
|
|
22
|
+
return to;
|
|
23
|
+
};
|
|
22
24
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
25
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
26
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
27
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
28
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
29
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
30
|
+
value: mod,
|
|
31
|
+
enumerable: true
|
|
32
|
+
}) : target, mod));
|
|
33
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
34
|
+
value: true
|
|
35
|
+
}), mod);
|
|
34
36
|
var Image_exports = {};
|
|
35
37
|
__export(Image_exports, {
|
|
36
38
|
Image: () => Image
|
|
37
39
|
});
|
|
38
40
|
module.exports = __toCommonJS(Image_exports);
|
|
39
|
-
var import_jsx_runtime = require("react/jsx-runtime")
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
42
|
+
var import_react = __toESM(require("react"), 1);
|
|
43
|
+
var import_constants = require("@tamagui/constants");
|
|
44
|
+
var import_web = require("@tamagui/web");
|
|
45
|
+
var import_react_native = require("react-native");
|
|
44
46
|
function _type_of(obj) {
|
|
45
47
|
"@swc/helpers - typeof";
|
|
46
48
|
|
|
47
|
-
return obj && typeof Symbol
|
|
49
|
+
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
48
50
|
}
|
|
49
51
|
var StyledImage = (0, import_web.styled)(import_react_native.Image, {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
} : source ?? src;
|
|
69
|
-
if (finalSource && (typeof finalSource > "u" ? "undefined" : _type_of(finalSource)) === "object") {
|
|
70
|
-
if (!Array.isArray(finalSource) && typeof finalSource.uri == "number" && (finalSource = finalSource.uri, source && (typeof source > "u" ? "undefined" : _type_of(source)) === "object" && !Array.isArray(source))) {
|
|
71
|
-
var _style, _style1, _width;
|
|
72
|
-
(_width = (_style = style).width) !== null && _width !== void 0 || (_style.width = source.width);
|
|
73
|
-
var _height;
|
|
74
|
-
(_height = (_style1 = style).height) !== null && _height !== void 0 || (_style1.height = source.height);
|
|
52
|
+
name: "Image"
|
|
53
|
+
});
|
|
54
|
+
var hasWarned = false;
|
|
55
|
+
var Image = StyledImage.styleable(function (inProps, ref) {
|
|
56
|
+
var [props, style] = (0, import_web.usePropsAndStyle)(inProps);
|
|
57
|
+
var {
|
|
58
|
+
src,
|
|
59
|
+
source,
|
|
60
|
+
objectFit,
|
|
61
|
+
...rest
|
|
62
|
+
} = props;
|
|
63
|
+
if (process.env.NODE_ENV === "development") {
|
|
64
|
+
if (typeof src === "string") {
|
|
65
|
+
if (typeof props.width === "string" && props.width[0] !== "$" || typeof props.height === "string" && props.height[0] !== "$") {
|
|
66
|
+
if (!hasWarned) {
|
|
67
|
+
hasWarned = true;
|
|
68
|
+
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.`);
|
|
69
|
+
}
|
|
75
70
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
var finalSource = typeof src === "string" ? {
|
|
74
|
+
uri: src,
|
|
75
|
+
...(import_constants.isWeb && {
|
|
76
|
+
width: props.width || (style === null || style === void 0 ? void 0 : style.width),
|
|
77
|
+
height: props.height || (style === null || style === void 0 ? void 0 : style.height)
|
|
78
|
+
})
|
|
79
|
+
} : source !== null && source !== void 0 ? source : src;
|
|
80
|
+
if (finalSource && (typeof finalSource === "undefined" ? "undefined" : _type_of(finalSource)) === "object") {
|
|
81
|
+
if (!Array.isArray(finalSource)) {
|
|
82
|
+
if (typeof finalSource.uri === "number") {
|
|
83
|
+
finalSource = finalSource.uri;
|
|
84
|
+
if (source && (typeof source === "undefined" ? "undefined" : _type_of(source)) === "object" && !Array.isArray(source)) {
|
|
85
|
+
var _style, _style1;
|
|
86
|
+
var _width;
|
|
87
|
+
(_width = (_style = style).width) !== null && _width !== void 0 || (_style.width = source.width);
|
|
88
|
+
var _height;
|
|
89
|
+
(_height = (_style1 = style).height) !== null && _height !== void 0 || (_style1.height = source.height);
|
|
87
90
|
}
|
|
88
|
-
|
|
89
|
-
}, [src]), finalSource.default && (finalSource = finalSource.default);
|
|
91
|
+
}
|
|
90
92
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
93
|
+
if (process.env.NODE_ENV === "development" && process.env.TAMAGUI_IMAGE_CHECK_ERROR) import_react.default.useEffect(function () {
|
|
94
|
+
async function run() {
|
|
95
|
+
if (typeof src === "string") try {
|
|
96
|
+
await fetch(src).then(function (res) {
|
|
97
|
+
return res.text();
|
|
98
|
+
});
|
|
99
|
+
} catch (err) {
|
|
100
|
+
console.error(`Error loading image: ${src}`, {
|
|
101
|
+
props
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
run();
|
|
106
|
+
}, [src]);
|
|
107
|
+
if (finalSource["default"]) finalSource = finalSource["default"];
|
|
108
|
+
}
|
|
109
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react_native.Image, {
|
|
110
|
+
resizeMode: objectFit,
|
|
111
|
+
ref,
|
|
112
|
+
source: finalSource,
|
|
113
|
+
style,
|
|
114
|
+
...rest
|
|
98
115
|
});
|
|
116
|
+
});
|
|
99
117
|
Image.getSize = import_react_native.Image.getSize;
|
|
100
118
|
Image.getSizeWithHeaders = import_react_native.Image.getSizeWithHeaders;
|
|
101
119
|
Image.prefetch = import_react_native.Image.prefetch;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["isNodeMode","mod","__esModule","__defProp","target","value","enumerable","__toCommonJS","__copyProps","Image_exports","__export","Image","module","exports","import_jsx_runtime","require","import_react","__toESM","import_constants","import_web","import_react_native","_type_of","obj","Symbol","constructor","StyledImage","styled","name","hasWarned","styleable","inProps","ref","props","style","usePropsAndStyle","src","source","objectFit","rest","process","env","NODE_ENV","width","height","console","warn","finalSource","uri","isWeb","Array","isArray","_style","_style1","_width","_height","TAMAGUI_IMAGE_CHECK_ERROR","default","useEffect","run","fetch","then","res","text","err","error","jsx","resizeMode","getSize","getSizeWithHeaders","prefetch","prefetchWithMetadata","abortPrefetch","queryCache"],"sources":["../../../src/v1/Image.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAAA,UAAA,KAAAC,GAAA,KAAAA,GAAA,CAAAC,UAAA,GAAAC,SAAA,CAAAC,MAAA;EAAAC,KAAA,EAAAJ,GAAA;EAAAK,UAAA;AAAA,KAAAF,MAAA,EAAAH,GAAA;AACA,IAAAM,YAAA,GAAAN,GAAsB,IAAAO,WAAA,CA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,IAAA;UAEA;QAAI,EACN,OAAOC,GAAC;UACVnB,OAAA,CAAAoB,KAAA,yBAAA7B,GAAA;YAAAH;UAAA;QAGA;MACE;MAAmC0B,GACrC;IACF,IAAAvB,GAAA;IAGA,IAAAW,WACE,aAAAA,WAAA,GAAAA,WAAA;EAAA;EAAC,0BAAAhC,kBAAA,CAAAmD,GAAA,EAAA7C,mBAAA,CAAAT,KAAA;IAAAuD,UACC,EAAA7B,SAAY;IAAAN,GAAA;IACZK,MACA,EAAAU,WAAQ;IAAAb,KACR;IAAA,GAAAK;EACK;AAAA,EACP;AAEJ3B,KAAC,CAAAwD,OAAA,GAAA/C,mBAAA,CAAAT,KAAA,CAAAwD,OAAA;AAEDxD,KAAA,CAAMyD,kBAAU,GAAAhD,mBAAQ,CAAAT,KAAA,CAAAyD,kBAAA;AACxBzD,KAAA,CAAM0D,QAAA,GAAAjD,mBAAqB,CAAAT,KAAA,CAAA0D,QAAA;AAC3B1D,KAAA,CAAM2D,oBAAW,GAAAlD,mBAAQ,CAAAT,KAAA,CAAA2D,oBAAA;AACzB3D,KAAA,CAAM4D,aAAA,GAAAnD,mBAAuB,CAAAT,KAAA,CAAA4D,aAAQ;AACrC5D,KAAA,CAAM6D,UAAA,GAAApD,mBAAgB,CAAAT,KAAA,CAAA6D,UAAQ","ignoreList":[]}
|
package/dist/cjs/v1/index.cjs
CHANGED
|
@@ -3,15 +3,17 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
5
|
var __copyProps = (to, from, except, desc) => {
|
|
6
|
-
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
7
8
|
get: () => from[key],
|
|
8
9
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
9
10
|
});
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
13
15
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
14
|
-
value:
|
|
16
|
+
value: true
|
|
15
17
|
}), mod);
|
|
16
18
|
var v1_exports = {};
|
|
17
19
|
module.exports = __toCommonJS(v1_exports);
|
|
@@ -5,15 +5,17 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __copyProps = (to, from, except, desc) => {
|
|
8
|
-
|
|
8
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
9
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
9
10
|
get: () => from[key],
|
|
10
11
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
11
12
|
});
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
17
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
16
|
-
value:
|
|
18
|
+
value: true
|
|
17
19
|
}), mod);
|
|
18
20
|
var v1_exports = {};
|
|
19
21
|
module.exports = __toCommonJS(v1_exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","v1_exports","module","exports"],"sources":["../../../src/v1/index.ts"],"sourcesContent":[null],"mappings":"
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","v1_exports","module","exports"],"sources":["../../../src/v1/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,UAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAP,YAAc,CAAAK,UAAA","ignoreList":[]}
|
package/dist/esm/Image.mjs
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import { View, styled } from "@tamagui/web";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
const StyledImage = styled(View, {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
4
|
+
name: "Image",
|
|
5
|
+
render: "img"
|
|
6
|
+
});
|
|
7
|
+
const Image = StyledImage.styleable((inProps, ref) => {
|
|
8
|
+
const {
|
|
9
|
+
// exclude native only props
|
|
10
|
+
blurRadius,
|
|
11
|
+
capInsets,
|
|
12
|
+
defaultSource,
|
|
13
|
+
fadeDuration,
|
|
14
|
+
loadingIndicatorSource,
|
|
15
|
+
onLoadEnd,
|
|
16
|
+
onPartialLoad,
|
|
17
|
+
progressiveRenderingEnabled,
|
|
18
|
+
resizeMethod,
|
|
19
|
+
tintColor,
|
|
20
|
+
...rest
|
|
21
|
+
} = inProps;
|
|
22
|
+
return /* @__PURE__ */jsx(StyledImage, {
|
|
23
|
+
ref,
|
|
24
|
+
...rest
|
|
25
|
+
});
|
|
26
|
+
}, {
|
|
27
|
+
staticConfig: {
|
|
28
|
+
memo: true
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
const func = () => {};
|
|
32
32
|
Image.getSize = func;
|
|
33
33
|
Image.getSizeWithHeaders = func;
|
|
34
34
|
Image.prefetch = func;
|