@tamagui/image 1.138.2 → 1.138.3

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.
Files changed (56) hide show
  1. package/package.json +4 -4
  2. package/dist/cjs/types.cjs +0 -16
  3. package/dist/cjs/types.js +0 -14
  4. package/dist/cjs/types.js.map +0 -6
  5. package/dist/cjs/types.native.js +0 -19
  6. package/dist/cjs/types.native.js.map +0 -1
  7. package/dist/cjs/v1/Image.cjs +0 -86
  8. package/dist/cjs/v1/Image.js +0 -72
  9. package/dist/cjs/v1/Image.js.map +0 -6
  10. package/dist/cjs/v1/Image.native.js +0 -105
  11. package/dist/cjs/v1/Image.native.js.map +0 -1
  12. package/dist/cjs/v1/index.cjs +0 -18
  13. package/dist/cjs/v1/index.js +0 -15
  14. package/dist/cjs/v1/index.js.map +0 -6
  15. package/dist/cjs/v1/index.native.js +0 -21
  16. package/dist/cjs/v1/index.native.js.map +0 -1
  17. package/dist/esm/types.js +0 -1
  18. package/dist/esm/types.js.map +0 -6
  19. package/dist/esm/types.mjs +0 -2
  20. package/dist/esm/types.mjs.map +0 -1
  21. package/dist/esm/types.native.js +0 -2
  22. package/dist/esm/types.native.js.map +0 -1
  23. package/dist/esm/v1/Image.js +0 -52
  24. package/dist/esm/v1/Image.js.map +0 -6
  25. package/dist/esm/v1/Image.mjs +0 -52
  26. package/dist/esm/v1/Image.mjs.map +0 -1
  27. package/dist/esm/v1/Image.native.js +0 -68
  28. package/dist/esm/v1/Image.native.js.map +0 -1
  29. package/dist/esm/v1/index.js +0 -2
  30. package/dist/esm/v1/index.js.map +0 -6
  31. package/dist/esm/v1/index.mjs +0 -2
  32. package/dist/esm/v1/index.mjs.map +0 -1
  33. package/dist/esm/v1/index.native.js +0 -2
  34. package/dist/esm/v1/index.native.js.map +0 -1
  35. package/dist/jsx/types.js +0 -1
  36. package/dist/jsx/types.js.map +0 -6
  37. package/dist/jsx/types.mjs +0 -2
  38. package/dist/jsx/types.mjs.map +0 -1
  39. package/dist/jsx/types.native.js +0 -19
  40. package/dist/jsx/types.native.js.map +0 -1
  41. package/dist/jsx/v1/Image.js +0 -52
  42. package/dist/jsx/v1/Image.js.map +0 -6
  43. package/dist/jsx/v1/Image.mjs +0 -52
  44. package/dist/jsx/v1/Image.mjs.map +0 -1
  45. package/dist/jsx/v1/Image.native.js +0 -105
  46. package/dist/jsx/v1/Image.native.js.map +0 -1
  47. package/dist/jsx/v1/index.js +0 -2
  48. package/dist/jsx/v1/index.js.map +0 -6
  49. package/dist/jsx/v1/index.mjs +0 -2
  50. package/dist/jsx/v1/index.mjs.map +0 -1
  51. package/dist/jsx/v1/index.native.js +0 -21
  52. package/dist/jsx/v1/index.native.js.map +0 -1
  53. package/types/Image.native.d.ts.map +0 -1
  54. package/types/types.d.ts.map +0 -1
  55. package/types/v1/Image.d.ts.map +0 -1
  56. package/types/v1/index.d.ts.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/image",
3
- "version": "1.138.2",
3
+ "version": "1.138.3",
4
4
  "type": "module",
5
5
  "sideEffects": [
6
6
  "*.css"
@@ -37,15 +37,15 @@
37
37
  }
38
38
  },
39
39
  "dependencies": {
40
- "@tamagui/constants": "1.138.2",
41
- "@tamagui/core": "1.138.2"
40
+ "@tamagui/constants": "1.138.3",
41
+ "@tamagui/core": "1.138.3"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "react": "*",
45
45
  "react-native": "*"
46
46
  },
47
47
  "devDependencies": {
48
- "@tamagui/build": "1.138.2",
48
+ "@tamagui/build": "1.138.3",
49
49
  "react": "*",
50
50
  "react-native": "0.81.5"
51
51
  },
@@ -1,16 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __copyProps = (to, from, except, desc) => {
6
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
7
- get: () => from[key],
8
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
9
- });
10
- return to;
11
- };
12
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
13
- value: !0
14
- }), mod);
15
- var types_exports = {};
16
- module.exports = __toCommonJS(types_exports);
package/dist/cjs/types.js DELETED
@@ -1,14 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __copyProps = (to, from, except, desc) => {
6
- if (from && typeof from == "object" || typeof from == "function")
7
- for (let key of __getOwnPropNames(from))
8
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
9
- return to;
10
- };
11
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
12
- var types_exports = {};
13
- module.exports = __toCommonJS(types_exports);
14
- //# sourceMappingURL=types.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/types.ts"],
4
- "mappings": ";;;;;;;;;;;AAAA;AAAA;",
5
- "names": []
6
- }
@@ -1,19 +0,0 @@
1
- "use strict";
2
-
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __copyProps = (to, from, except, desc) => {
8
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
9
- get: () => from[key],
10
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
11
- });
12
- return to;
13
- };
14
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
15
- value: !0
16
- }), mod);
17
- var types_exports = {};
18
- module.exports = __toCommonJS(types_exports);
19
- //# sourceMappingURL=types.native.js.map
@@ -1 +0,0 @@
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":[]}
@@ -1,86 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf,
6
- __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: !0
11
- });
12
- },
13
- __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
15
- get: () => from[key],
16
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
- });
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
26
- value: mod,
27
- enumerable: !0
28
- }) : target, mod)),
29
- __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
30
- value: !0
31
- }), mod);
32
- var Image_exports = {};
33
- __export(Image_exports, {
34
- Image: () => Image
35
- });
36
- module.exports = __toCommonJS(Image_exports);
37
- var import_react = __toESM(require("react"), 1),
38
- import_constants = require("@tamagui/constants"),
39
- import_web = require("@tamagui/web"),
40
- import_react_native = require("react-native-web"),
41
- import_jsx_runtime = require("react/jsx-runtime");
42
- const StyledImage = (0, import_web.styled)(import_react_native.Image, {
43
- name: "Image"
44
- });
45
- let hasWarned = !1;
46
- const Image = StyledImage.styleable((inProps, ref) => {
47
- const [props, style] = (0, import_web.usePropsAndStyle)(inProps),
48
- {
49
- src,
50
- source,
51
- objectFit,
52
- ...rest
53
- } = props;
54
- 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('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.')));
55
- let finalSource = typeof src == "string" ? {
56
- uri: src,
57
- ...(import_constants.isWeb && {
58
- width: props.width || style?.width,
59
- height: props.height || style?.height
60
- })
61
- } : source ?? src;
62
- return finalSource && typeof finalSource == "object" && (process.env.NODE_ENV === "development" && process.env.TAMAGUI_IMAGE_CHECK_ERROR && import_react.default.useEffect(() => {
63
- async function run() {
64
- if (typeof src == "string") try {
65
- await fetch(src).then(res => res.text());
66
- } catch {
67
- console.error(`Error loading image: ${src}`, {
68
- props
69
- });
70
- }
71
- }
72
- run();
73
- }, [src]), finalSource.default && (finalSource = finalSource.default)), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react_native.Image, {
74
- resizeMode: objectFit,
75
- ref,
76
- source: finalSource,
77
- style,
78
- ...rest
79
- });
80
- });
81
- Image.getSize = import_react_native.Image.getSize;
82
- Image.getSizeWithHeaders = import_react_native.Image.getSizeWithHeaders;
83
- Image.prefetch = import_react_native.Image.prefetch;
84
- Image.prefetchWithMetadata = import_react_native.Image.prefetchWithMetadata;
85
- Image.abortPrefetch = import_react_native.Image.abortPrefetch;
86
- Image.queryCache = import_react_native.Image.queryCache;
@@ -1,72 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf, __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
16
- // If the importer is in node compatibility mode or this is not an ESM
17
- // file that has been converted to a CommonJS file using a Babel-
18
- // compatible transform (i.e. "__esModule" has not been set), then set
19
- // "default" to the CommonJS "module.exports" for node compatibility.
20
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
21
- mod
22
- )), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
23
- var Image_exports = {};
24
- __export(Image_exports, {
25
- Image: () => Image
26
- });
27
- module.exports = __toCommonJS(Image_exports);
28
- var import_react = __toESM(require("react"), 1), import_constants = require("@tamagui/constants"), import_web = require("@tamagui/web"), import_react_native = require("react-native-web"), import_jsx_runtime = require("react/jsx-runtime");
29
- const StyledImage = (0, import_web.styled)(import_react_native.Image, {
30
- name: "Image"
31
- });
32
- let hasWarned = !1;
33
- const Image = StyledImage.styleable((inProps, ref) => {
34
- const [props, style] = (0, import_web.usePropsAndStyle)(inProps), { src, source, objectFit, ...rest } = props;
35
- 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(
36
- '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.'
37
- )));
38
- let finalSource = typeof src == "string" ? {
39
- uri: src,
40
- ...import_constants.isWeb && {
41
- width: props.width || style?.width,
42
- height: props.height || style?.height
43
- }
44
- } : source ?? src;
45
- return finalSource && typeof finalSource == "object" && (process.env.NODE_ENV === "development" && process.env.TAMAGUI_IMAGE_CHECK_ERROR && import_react.default.useEffect(() => {
46
- async function run() {
47
- if (typeof src == "string")
48
- try {
49
- await fetch(src).then((res) => res.text());
50
- } catch {
51
- console.error(`Error loading image: ${src}`, { props });
52
- }
53
- }
54
- run();
55
- }, [src]), finalSource.default && (finalSource = finalSource.default)), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
56
- import_react_native.Image,
57
- {
58
- resizeMode: objectFit,
59
- ref,
60
- source: finalSource,
61
- style,
62
- ...rest
63
- }
64
- );
65
- });
66
- Image.getSize = import_react_native.Image.getSize;
67
- Image.getSizeWithHeaders = import_react_native.Image.getSizeWithHeaders;
68
- Image.prefetch = import_react_native.Image.prefetch;
69
- Image.prefetchWithMetadata = import_react_native.Image.prefetchWithMetadata;
70
- Image.abortPrefetch = import_react_native.Image.abortPrefetch;
71
- Image.queryCache = import_react_native.Image.queryCache;
72
- //# sourceMappingURL=Image.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/v1/Image.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB,8BAClB,mBAAsB,+BAQtB,aAAyC,yBAEzC,sBAAiC,yBAqH7B;AAnHJ,MAAM,kBAAc,mBAAO,oBAAAA,OAAS;AAAA,EAClC,MAAM;AACR,CAAC;AAmCD,IAAI,YAAY;AAMT,MAAM,QAAQ,YAAY,UAAsB,CAAC,SAAS,QAAQ;AACvE,QAAM,CAAC,OAAO,KAAK,QAAI,6BAAiB,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": ["RNImage", "React"]
6
- }
@@ -1,105 +0,0 @@
1
- "use strict";
2
-
3
- var __create = Object.create;
4
- var __defProp = Object.defineProperty;
5
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getProtoOf = Object.getPrototypeOf,
8
- __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __export = (target, all) => {
10
- for (var name in all) __defProp(target, name, {
11
- get: all[name],
12
- enumerable: !0
13
- });
14
- },
15
- __copyProps = (to, from, except, desc) => {
16
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
17
- get: () => from[key],
18
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
- });
20
- return to;
21
- };
22
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
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: !0
30
- }) : target, mod)),
31
- __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
32
- value: !0
33
- }), mod);
34
- var Image_exports = {};
35
- __export(Image_exports, {
36
- Image: () => Image
37
- });
38
- module.exports = __toCommonJS(Image_exports);
39
- var import_jsx_runtime = require("react/jsx-runtime"),
40
- import_react = __toESM(require("react"), 1),
41
- import_constants = require("@tamagui/constants"),
42
- import_web = require("@tamagui/web"),
43
- import_react_native = require("react-native");
44
- function _type_of(obj) {
45
- "@swc/helpers - typeof";
46
-
47
- return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
48
- }
49
- var StyledImage = (0, import_web.styled)(import_react_native.Image, {
50
- name: "Image"
51
- }),
52
- hasWarned = !1,
53
- Image = StyledImage.styleable(function (inProps, ref) {
54
- var [props, style] = (0, import_web.usePropsAndStyle)(inProps),
55
- {
56
- src,
57
- source,
58
- objectFit,
59
- ...rest
60
- } = props;
61
- 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('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
- var finalSource = typeof src == "string" ? {
63
- uri: src,
64
- ...(import_constants.isWeb && {
65
- width: props.width || style?.width,
66
- height: props.height || style?.height
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);
75
- }
76
- process.env.NODE_ENV === "development" && process.env.TAMAGUI_IMAGE_CHECK_ERROR && import_react.default.useEffect(function () {
77
- async function run() {
78
- if (typeof src == "string") try {
79
- await fetch(src).then(function (res) {
80
- return res.text();
81
- });
82
- } catch {
83
- console.error(`Error loading image: ${src}`, {
84
- props
85
- });
86
- }
87
- }
88
- run();
89
- }, [src]), finalSource.default && (finalSource = finalSource.default);
90
- }
91
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react_native.Image, {
92
- resizeMode: objectFit,
93
- ref,
94
- source: finalSource,
95
- style,
96
- ...rest
97
- });
98
- });
99
- Image.getSize = import_react_native.Image.getSize;
100
- Image.getSizeWithHeaders = import_react_native.Image.getSizeWithHeaders;
101
- Image.prefetch = import_react_native.Image.prefetch;
102
- Image.prefetchWithMetadata = import_react_native.Image.prefetchWithMetadata;
103
- Image.abortPrefetch = import_react_native.Image.abortPrefetch;
104
- Image.queryCache = import_react_native.Image.queryCache;
105
- //# sourceMappingURL=Image.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","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","error","jsx"],"sources":["../../../src/v1/Image.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAA;EAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;IAAAC,KAAA;EAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,QAAA,CAAAD,aAAA;EAAAE,KAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAAkB,CAAAK,aAAA;AAalB,IAAAK,kBAAM,GAAcC,OAAA,oBAAO;EAAAC,YAAA,GAASC,OAAA,CAAAF,OAAA;EAAAG,gBAAA,GAAAH,OAAA;EAAAI,UAAA,GAAAJ,OAAA;EAAAK,mBAAA,GAAAL,OAAA;AAAA,SAC5BM,SAAAC,GAAA;EACP;;EAmCD,OAAIA,GAAA,IAAY,OAAAC,MAAA,UAAAD,GAAA,CAAAE,WAAA,KAAAD,MAAA,qBAAAD,GAAA;AAMT;AACL,IAAAG,WAAO,GAAO,IAAKN,UAAI,CAAAO,MAAA,EAAAN,mBAAiB,CAAAT,KAAO,EACzC;IAEFgB,IAAA;EAQY;EACNC,SAAA;EAAAjB,KAAA,GAAAc,WAAA,CAAAI,SAAA,WAAAC,OAAA,EAAAC,GAAA;IACF,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,MAAA,GAAAP,MAAA,CAAAO,MAAA;MAAA;MAG5DJ,OAAA,CAAAC,GAAA,CAAAC,QAAA,sBAAAF,OAAA,CAAAC,GAAA,CAAAe,yBAAA,IAAAvC,YAAA,CAAAwC,OAAA,CAAAC,SAAA;QAEA,eAAIC,IAAA;UACF,IAAI,OAINvB,GAAA,IAAY,UAOf;YAAA,MAAAwB,KAAA,CAAAxB,GAAA,EAAAyB,IAAA,WAAAC,GAAA;cACC,OAAYA,GAAA,CAAAC,IAAA;YACZ;UACA,QAAQ;YACRlB,OAAA,CAAAmB,KAAA,yBAAA5B,GAAA;cACKH;YAAA;UACP;QAEH;QAEK0B,GAAA;MACN,GAAM,CACAvB,GAAA,CACN,CAAM,EAAAW,WAAA,CAAAU,OAAA,KAAuBV,WAAA,GAAAA,WAAQ,CAAAU,OAAA;IACrC;IACA,OAAM,eAAa,IAAA1C,kBAAQ,CAAAkD,GAAA,EAAA5C,mBAAA,CAAAT,KAAA","ignoreList":[]}
@@ -1,18 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __copyProps = (to, from, except, desc) => {
6
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
7
- get: () => from[key],
8
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
9
- });
10
- return to;
11
- },
12
- __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
13
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
14
- value: !0
15
- }), mod);
16
- var v1_exports = {};
17
- module.exports = __toCommonJS(v1_exports);
18
- __reExport(v1_exports, require("./Image.cjs"), module.exports);
@@ -1,15 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __copyProps = (to, from, except, desc) => {
6
- if (from && typeof from == "object" || typeof from == "function")
7
- for (let key of __getOwnPropNames(from))
8
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
9
- return to;
10
- }, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
11
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
12
- var v1_exports = {};
13
- module.exports = __toCommonJS(v1_exports);
14
- __reExport(v1_exports, require("./Image"), module.exports);
15
- //# sourceMappingURL=index.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/v1/index.ts"],
4
- "mappings": ";;;;;;;;;;;AAAA;AAAA;AAAA,uBAAc,oBAAd;",
5
- "names": []
6
- }
@@ -1,21 +0,0 @@
1
- "use strict";
2
-
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __copyProps = (to, from, except, desc) => {
8
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
9
- get: () => from[key],
10
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
11
- });
12
- return to;
13
- },
14
- __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
16
- value: !0
17
- }), mod);
18
- var v1_exports = {};
19
- module.exports = __toCommonJS(v1_exports);
20
- __reExport(v1_exports, require("./Image.native.js"), module.exports);
21
- //# sourceMappingURL=index.native.js.map
@@ -1 +0,0 @@
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/types.js DELETED
@@ -1 +0,0 @@
1
- //# sourceMappingURL=types.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": [],
4
- "mappings": "",
5
- "names": []
6
- }
@@ -1,2 +0,0 @@
1
-
2
- //# sourceMappingURL=types.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":[],"sourcesContent":[],"mappings":"","ignoreList":[]}
@@ -1,2 +0,0 @@
1
-
2
- //# sourceMappingURL=types.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":[],"sourcesContent":[],"mappings":"","ignoreList":[]}
@@ -1,52 +0,0 @@
1
- import React from "react";
2
- import { isWeb } from "@tamagui/constants";
3
- import { styled, usePropsAndStyle } from "@tamagui/web";
4
- import { Image as RNImage } from "react-native-web";
5
- import { jsx } from "react/jsx-runtime";
6
- const StyledImage = styled(RNImage, {
7
- name: "Image"
8
- });
9
- let hasWarned = !1;
10
- const Image = StyledImage.styleable((inProps, ref) => {
11
- const [props, style] = usePropsAndStyle(inProps), { src, source, objectFit, ...rest } = props;
12
- 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(
13
- '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.'
14
- )));
15
- let finalSource = typeof src == "string" ? {
16
- uri: src,
17
- ...isWeb && {
18
- width: props.width || style?.width,
19
- height: props.height || style?.height
20
- }
21
- } : source ?? src;
22
- return finalSource && typeof finalSource == "object" && (process.env.NODE_ENV === "development" && process.env.TAMAGUI_IMAGE_CHECK_ERROR && React.useEffect(() => {
23
- async function run() {
24
- if (typeof src == "string")
25
- try {
26
- await fetch(src).then((res) => res.text());
27
- } catch {
28
- console.error(`Error loading image: ${src}`, { props });
29
- }
30
- }
31
- run();
32
- }, [src]), finalSource.default && (finalSource = finalSource.default)), /* @__PURE__ */ jsx(
33
- RNImage,
34
- {
35
- resizeMode: objectFit,
36
- ref,
37
- source: finalSource,
38
- style,
39
- ...rest
40
- }
41
- );
42
- });
43
- Image.getSize = RNImage.getSize;
44
- Image.getSizeWithHeaders = RNImage.getSizeWithHeaders;
45
- Image.prefetch = RNImage.prefetch;
46
- Image.prefetchWithMetadata = RNImage.prefetchWithMetadata;
47
- Image.abortPrefetch = RNImage.abortPrefetch;
48
- Image.queryCache = RNImage.queryCache;
49
- export {
50
- Image
51
- };
52
- //# sourceMappingURL=Image.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/v1/Image.tsx"],
4
- "mappings": "AAAA,OAAO,WAAW;AAClB,SAAS,aAAa;AAQtB,SAAS,QAAQ,wBAAwB;AAEzC,SAAS,SAAS,eAAe;AAqH7B;AAnHJ,MAAM,cAAc,OAAO,SAAS;AAAA,EAClC,MAAM;AACR,CAAC;AAmCD,IAAI,YAAY;AAMT,MAAM,QAAQ,YAAY,UAAsB,CAAC,SAAS,QAAQ;AACvE,QAAM,CAAC,OAAO,KAAK,IAAI,iBAAiB,OAAO,GACzC,EAAE,KAAK,QAAQ,WAAW,GAAG,KAAK,IAAI;AAE5C,EAAI,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,IACN;AAAA,EACF;AAMR,MAAI,cACF,OAAO,OAAQ,WACX;AAAA,IACE,KAAK;AAAA,IACL,GAAI,SAAS;AAAA,MACX,OAAO,MAAM,SAAS,OAAO;AAAA,MAC7B,QAAQ,MAAM,UAAU,OAAO;AAAA,IACjC;AAAA,EACF,IACC,UAAU;AAEjB,SAAI,eAAe,OAAO,eAAgB,aAgBpC,QAAQ,IAAI,aAAa,iBAAiB,QAAQ,IAAI,6BAExD,MAAM,UAAU,MAAM;AACpB,mBAAe,MAAM;AACnB,UAAI,OAAO,OAAQ;AACjB,YAAI;AACF,gBAAM,MAAM,GAAG,EAAE,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC;AAAA,QAC3C,QAAc;AACZ,kBAAQ,MAAM,wBAAwB,GAAG,IAAI,EAAE,MAAM,CAAC;AAAA,QACxD;AAAA,IAEJ;AAEA,QAAI;AAAA,EACN,GAAG,CAAC,GAAG,CAAC,GAIN,YAAY,YACd,cAAc,YAAY,WAM5B;AAAA,IAAC;AAAA;AAAA,MACC,YAAY;AAAA,MACZ;AAAA,MACA,QAAQ;AAAA,MACR;AAAA,MACC,GAAI;AAAA;AAAA,EACP;AAEJ,CAAC;AAED,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,52 +0,0 @@
1
- import React from "react";
2
- import { isWeb } from "@tamagui/constants";
3
- import { styled, usePropsAndStyle } from "@tamagui/web";
4
- import { Image as RNImage } from "react-native-web";
5
- import { jsx } from "react/jsx-runtime";
6
- const StyledImage = styled(RNImage, {
7
- name: "Image"
8
- });
9
- let hasWarned = !1;
10
- const Image = StyledImage.styleable((inProps, ref) => {
11
- const [props, style] = usePropsAndStyle(inProps),
12
- {
13
- src,
14
- source,
15
- objectFit,
16
- ...rest
17
- } = props;
18
- 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('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.')));
19
- let finalSource = typeof src == "string" ? {
20
- uri: src,
21
- ...(isWeb && {
22
- width: props.width || style?.width,
23
- height: props.height || style?.height
24
- })
25
- } : source ?? src;
26
- return finalSource && typeof finalSource == "object" && (process.env.NODE_ENV === "development" && process.env.TAMAGUI_IMAGE_CHECK_ERROR && React.useEffect(() => {
27
- async function run() {
28
- if (typeof src == "string") try {
29
- await fetch(src).then(res => res.text());
30
- } catch {
31
- console.error(`Error loading image: ${src}`, {
32
- props
33
- });
34
- }
35
- }
36
- run();
37
- }, [src]), finalSource.default && (finalSource = finalSource.default)), /* @__PURE__ */jsx(RNImage, {
38
- resizeMode: objectFit,
39
- ref,
40
- source: finalSource,
41
- style,
42
- ...rest
43
- });
44
- });
45
- Image.getSize = RNImage.getSize;
46
- Image.getSizeWithHeaders = RNImage.getSizeWithHeaders;
47
- Image.prefetch = RNImage.prefetch;
48
- Image.prefetchWithMetadata = RNImage.prefetchWithMetadata;
49
- Image.abortPrefetch = RNImage.abortPrefetch;
50
- Image.queryCache = RNImage.queryCache;
51
- export { Image };
52
- //# sourceMappingURL=Image.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","isWeb","styled","usePropsAndStyle","Image","RNImage","jsx","StyledImage","name","hasWarned","styleable","inProps","ref","props","style","src","source","objectFit","rest","process","env","NODE_ENV","width","height","console","warn","finalSource","uri","TAMAGUI_IMAGE_CHECK_ERROR","useEffect","run","fetch","then","res","text","error","default","resizeMode","getSize","getSizeWithHeaders","prefetch","prefetchWithMetadata","abortPrefetch","queryCache"],"sources":["../../../src/v1/Image.tsx"],"sourcesContent":[null],"mappings":"AAAA,O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ACpB,eAAeC,IAAA,EAAM;MACnB,IAAI,OAAOf,GAAA,IAAQ,UACjB,IAAI;QACF,MAAMgB,KAAA,CAAMhB,GAAG,EAAEiB,IAAA,CAAMC,GAAA,IAAQA,GAAA,CAAIC,IAAA,CAAK,CAAC;MAC3C,QAAc;QACZV,OAAA,CAAQW,KAAA,CAAM,wBAAwBpB,GAAG,IAAI;UAAEF;QAAM,CAAC;MACxD;IAEJ;IAEAiB,GAAA,CAAI;EACN,GAAG,CAACf,GAAG,CAAC,GAINW,WAAA,CAAYU,OAAA,KACdV,WAAA,GAAcA,WAAA,CAAYU,OAAA,IAM5B,eAAA9B,GAAA,CAACD,OAAA;IACCgC,UAAA,EAAYpB,SAAA;IACZL,GAAA;IACAI,MAAA,EAAQU,WAAA;IACRZ,KAAA;IACC,GAAII;EAAA,CACP;AAEJ,CAAC;AAEDd,KAAA,CAAMkC,OAAA,GAAUjC,OAAA,CAAQiC,OAAA;AACxBlC,KAAA,CAAMmC,kBAAA,GAAqBlC,OAAA,CAAQkC,kBAAA;AACnCnC,KAAA,CAAMoC,QAAA,GAAWnC,OAAA,CAAQmC,QAAA;AACzBpC,KAAA,CAAMqC,oBAAA,GAAuBpC,OAAA,CAAQoC,oBAAA;AACrCrC,KAAA,CAAMsC,aAAA,GAAgBrC,OAAA,CAAQqC,aAAA;AAC9BtC,KAAA,CAAMuC,UAAA,GAAatC,OAAA,CAAQsC,UAAA","ignoreList":[]}
@@ -1,68 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import React from "react";
3
- import { isWeb } from "@tamagui/constants";
4
- import { styled, usePropsAndStyle } from "@tamagui/web";
5
- import { Image as RNImage } from "react-native";
6
- function _type_of(obj) {
7
- "@swc/helpers - typeof";
8
-
9
- return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
10
- }
11
- var StyledImage = styled(RNImage, {
12
- name: "Image"
13
- }),
14
- hasWarned = !1,
15
- Image = StyledImage.styleable(function (inProps, ref) {
16
- var [props, style] = usePropsAndStyle(inProps),
17
- {
18
- src,
19
- source,
20
- objectFit,
21
- ...rest
22
- } = props;
23
- 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('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.')));
24
- var finalSource = typeof src == "string" ? {
25
- uri: src,
26
- ...(isWeb && {
27
- width: props.width || style?.width,
28
- height: props.height || style?.height
29
- })
30
- } : source ?? src;
31
- if (finalSource && (typeof finalSource > "u" ? "undefined" : _type_of(finalSource)) === "object") {
32
- if (!Array.isArray(finalSource) && typeof finalSource.uri == "number" && (finalSource = finalSource.uri, source && (typeof source > "u" ? "undefined" : _type_of(source)) === "object" && !Array.isArray(source))) {
33
- var _style, _style1, _width;
34
- (_width = (_style = style).width) !== null && _width !== void 0 || (_style.width = source.width);
35
- var _height;
36
- (_height = (_style1 = style).height) !== null && _height !== void 0 || (_style1.height = source.height);
37
- }
38
- process.env.NODE_ENV === "development" && process.env.TAMAGUI_IMAGE_CHECK_ERROR && React.useEffect(function () {
39
- async function run() {
40
- if (typeof src == "string") try {
41
- await fetch(src).then(function (res) {
42
- return res.text();
43
- });
44
- } catch {
45
- console.error(`Error loading image: ${src}`, {
46
- props
47
- });
48
- }
49
- }
50
- run();
51
- }, [src]), finalSource.default && (finalSource = finalSource.default);
52
- }
53
- return /* @__PURE__ */_jsx(RNImage, {
54
- resizeMode: objectFit,
55
- ref,
56
- source: finalSource,
57
- style,
58
- ...rest
59
- });
60
- });
61
- Image.getSize = RNImage.getSize;
62
- Image.getSizeWithHeaders = RNImage.getSizeWithHeaders;
63
- Image.prefetch = RNImage.prefetch;
64
- Image.prefetchWithMetadata = RNImage.prefetchWithMetadata;
65
- Image.abortPrefetch = RNImage.abortPrefetch;
66
- Image.queryCache = RNImage.queryCache;
67
- export { Image };
68
- //# sourceMappingURL=Image.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["jsx","_jsx","React","isWeb","styled","usePropsAndStyle","Image","RNImage","_type_of","obj","Symbol","constructor","StyledImage","name","hasWarned","styleable","inProps","ref","props","style","src","source","objectFit","rest","process","env","NODE_ENV","width","height","console","warn","finalSource","uri","Array","isArray","_style","_style1","_width","_height","TAMAGUI_IMAGE_CHECK_ERROR","useEffect","run","fetch","then","res","text","error","default","resizeMode"],"sources":["../../../src/v1/Image.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAAOA,GAAA,IAAAC,IAAW;AAClB,OAAAC,KAAS,aAAa;AAQtB,SAASC,KAAA,QAAQ,oBAAwB;AAEzC,SAASC,MAAA,EAAAC,gBAAwB;AAqH7B,SAAAC,KAAA,IAAAC,OAAA;AAnHJ,SAAMC,SAAAC,GAAc;EAClB,uBAAM;;EACP,OAAAA,GAAA,WAAAC,MAAA,UAAAD,GAAA,CAAAE,WAAA,KAAAD,MAAA,qBAAAD,GAAA;AAmCD;AAMO,IAAAG,WAAc,GAAAR,MAAA,CAAAG,OAAY;IAC/BM,IAAA,EAAM;EAGN,EAAI;EAAAC,SAAQ,GAAI;EAAAR,KAAA,GAAaM,WAAA,CAAAG,SACvB,WAAeC,OAAA,EAAAC,GAEd;IAKS,IACN,CAAAC,KAAA,EAAAC,KAAA,IAAAd,gBAAA,CAAAW,OAAA;MAAA;QAAAI,GAAA;QAAAC,MAAA;QAAAC,SAAA;QAAA,GAAAC;MAAA,IAAAL,KAAA;IACFM,OAAA,CAAAC,GAAA,CAAAC,QAAA,6BAAAN,GAAA,wBAAAF,KAAA,CAAAS,KAAA,gBAAAT,KAAA,CAAAS,KAAA,sBAAAT,KAAA,CAAAU,MAAA,gBAAAV,KAAA,CAAAU,MAAA,iBAAAd,SAAA,KAAAA,SAAA,OAAAe,OAAA,CAAAC,IAAA;IAMR,IAAIC,WAAA,GACF,OAAOX,GAAA,IAAQ,WACX;MACEY,GAAA,EAAKZ,GAAA;MACL,IAAIjB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AAAA,WAAA,CAAAgB,OAAA;IACzB;IACA,OAAM,eAAgB9C,IAAA,CAAQM,OAAA;MAC9ByC,UAAM,EAAA1B,SAAa","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- export * from "./Image";
2
- //# sourceMappingURL=index.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/v1/index.ts"],
4
- "mappings": "AAAA,cAAc;",
5
- "names": []
6
- }
@@ -1,2 +0,0 @@
1
- export * from "./Image.mjs";
2
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["../../../src/v1/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- export * from "./Image.native.js";
2
- //# sourceMappingURL=index.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["../../../src/v1/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc","ignoreList":[]}
package/dist/jsx/types.js DELETED
@@ -1 +0,0 @@
1
- //# sourceMappingURL=types.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": [],
4
- "mappings": "",
5
- "names": []
6
- }
@@ -1,2 +0,0 @@
1
-
2
- //# sourceMappingURL=types.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":[],"sourcesContent":[],"mappings":"","ignoreList":[]}
@@ -1,19 +0,0 @@
1
- "use strict";
2
-
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __copyProps = (to, from, except, desc) => {
8
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
9
- get: () => from[key],
10
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
11
- });
12
- return to;
13
- };
14
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
15
- value: !0
16
- }), mod);
17
- var types_exports = {};
18
- module.exports = __toCommonJS(types_exports);
19
- //# sourceMappingURL=types.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":[],"sourcesContent":[],"mappings":"","ignoreList":[]}
@@ -1,52 +0,0 @@
1
- import React from "react";
2
- import { isWeb } from "@tamagui/constants";
3
- import { styled, usePropsAndStyle } from "@tamagui/web";
4
- import { Image as RNImage } from "react-native-web";
5
- import { jsx } from "react/jsx-runtime";
6
- const StyledImage = styled(RNImage, {
7
- name: "Image"
8
- });
9
- let hasWarned = !1;
10
- const Image = StyledImage.styleable((inProps, ref) => {
11
- const [props, style] = usePropsAndStyle(inProps), { src, source, objectFit, ...rest } = props;
12
- 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(
13
- '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.'
14
- )));
15
- let finalSource = typeof src == "string" ? {
16
- uri: src,
17
- ...isWeb && {
18
- width: props.width || style?.width,
19
- height: props.height || style?.height
20
- }
21
- } : source ?? src;
22
- return finalSource && typeof finalSource == "object" && (process.env.NODE_ENV === "development" && process.env.TAMAGUI_IMAGE_CHECK_ERROR && React.useEffect(() => {
23
- async function run() {
24
- if (typeof src == "string")
25
- try {
26
- await fetch(src).then((res) => res.text());
27
- } catch {
28
- console.error(`Error loading image: ${src}`, { props });
29
- }
30
- }
31
- run();
32
- }, [src]), finalSource.default && (finalSource = finalSource.default)), /* @__PURE__ */ jsx(
33
- RNImage,
34
- {
35
- resizeMode: objectFit,
36
- ref,
37
- source: finalSource,
38
- style,
39
- ...rest
40
- }
41
- );
42
- });
43
- Image.getSize = RNImage.getSize;
44
- Image.getSizeWithHeaders = RNImage.getSizeWithHeaders;
45
- Image.prefetch = RNImage.prefetch;
46
- Image.prefetchWithMetadata = RNImage.prefetchWithMetadata;
47
- Image.abortPrefetch = RNImage.abortPrefetch;
48
- Image.queryCache = RNImage.queryCache;
49
- export {
50
- Image
51
- };
52
- //# sourceMappingURL=Image.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/v1/Image.tsx"],
4
- "mappings": "AAAA,OAAO,WAAW;AAClB,SAAS,aAAa;AAQtB,SAAS,QAAQ,wBAAwB;AAEzC,SAAS,SAAS,eAAe;AAqH7B;AAnHJ,MAAM,cAAc,OAAO,SAAS;AAAA,EAClC,MAAM;AACR,CAAC;AAmCD,IAAI,YAAY;AAMT,MAAM,QAAQ,YAAY,UAAsB,CAAC,SAAS,QAAQ;AACvE,QAAM,CAAC,OAAO,KAAK,IAAI,iBAAiB,OAAO,GACzC,EAAE,KAAK,QAAQ,WAAW,GAAG,KAAK,IAAI;AAE5C,EAAI,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,IACN;AAAA,EACF;AAMR,MAAI,cACF,OAAO,OAAQ,WACX;AAAA,IACE,KAAK;AAAA,IACL,GAAI,SAAS;AAAA,MACX,OAAO,MAAM,SAAS,OAAO;AAAA,MAC7B,QAAQ,MAAM,UAAU,OAAO;AAAA,IACjC;AAAA,EACF,IACC,UAAU;AAEjB,SAAI,eAAe,OAAO,eAAgB,aAgBpC,QAAQ,IAAI,aAAa,iBAAiB,QAAQ,IAAI,6BAExD,MAAM,UAAU,MAAM;AACpB,mBAAe,MAAM;AACnB,UAAI,OAAO,OAAQ;AACjB,YAAI;AACF,gBAAM,MAAM,GAAG,EAAE,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC;AAAA,QAC3C,QAAc;AACZ,kBAAQ,MAAM,wBAAwB,GAAG,IAAI,EAAE,MAAM,CAAC;AAAA,QACxD;AAAA,IAEJ;AAEA,QAAI;AAAA,EACN,GAAG,CAAC,GAAG,CAAC,GAIN,YAAY,YACd,cAAc,YAAY,WAM5B;AAAA,IAAC;AAAA;AAAA,MACC,YAAY;AAAA,MACZ;AAAA,MACA,QAAQ;AAAA,MACR;AAAA,MACC,GAAI;AAAA;AAAA,EACP;AAEJ,CAAC;AAED,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,52 +0,0 @@
1
- import React from "react";
2
- import { isWeb } from "@tamagui/constants";
3
- import { styled, usePropsAndStyle } from "@tamagui/web";
4
- import { Image as RNImage } from "react-native-web";
5
- import { jsx } from "react/jsx-runtime";
6
- const StyledImage = styled(RNImage, {
7
- name: "Image"
8
- });
9
- let hasWarned = !1;
10
- const Image = StyledImage.styleable((inProps, ref) => {
11
- const [props, style] = usePropsAndStyle(inProps),
12
- {
13
- src,
14
- source,
15
- objectFit,
16
- ...rest
17
- } = props;
18
- 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('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.')));
19
- let finalSource = typeof src == "string" ? {
20
- uri: src,
21
- ...(isWeb && {
22
- width: props.width || style?.width,
23
- height: props.height || style?.height
24
- })
25
- } : source ?? src;
26
- return finalSource && typeof finalSource == "object" && (process.env.NODE_ENV === "development" && process.env.TAMAGUI_IMAGE_CHECK_ERROR && React.useEffect(() => {
27
- async function run() {
28
- if (typeof src == "string") try {
29
- await fetch(src).then(res => res.text());
30
- } catch {
31
- console.error(`Error loading image: ${src}`, {
32
- props
33
- });
34
- }
35
- }
36
- run();
37
- }, [src]), finalSource.default && (finalSource = finalSource.default)), /* @__PURE__ */jsx(RNImage, {
38
- resizeMode: objectFit,
39
- ref,
40
- source: finalSource,
41
- style,
42
- ...rest
43
- });
44
- });
45
- Image.getSize = RNImage.getSize;
46
- Image.getSizeWithHeaders = RNImage.getSizeWithHeaders;
47
- Image.prefetch = RNImage.prefetch;
48
- Image.prefetchWithMetadata = RNImage.prefetchWithMetadata;
49
- Image.abortPrefetch = RNImage.abortPrefetch;
50
- Image.queryCache = RNImage.queryCache;
51
- export { Image };
52
- //# sourceMappingURL=Image.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","isWeb","styled","usePropsAndStyle","Image","RNImage","jsx","StyledImage","name","hasWarned","styleable","inProps","ref","props","style","src","source","objectFit","rest","process","env","NODE_ENV","width","height","console","warn","finalSource","uri","TAMAGUI_IMAGE_CHECK_ERROR","useEffect","run","fetch","then","res","text","error","default","resizeMode","getSize","getSizeWithHeaders","prefetch","prefetchWithMetadata","abortPrefetch","queryCache"],"sources":["../../../src/v1/Image.tsx"],"sourcesContent":[null],"mappings":"AAAA,OAAOA,KAAA,MAAW;AAClB,SAASC,KAAA,QAAa;AAQtB,SAASC,MAAA,EAAQC,gBAAA,QAAwB;AAEzC,SAASC,KAAA,IAASC,OAAA,QAAe;AAqH7B,SAAAC,GAAA;AAnHJ,MAAMC,WAAA,GAAcL,MAAA,CAAOG,OAAA,EAAS;EAClCG,IAAA,EAAM;AACR,CAAC;AAmCD,IAAIC,SAAA,GAAY;AAMT,MAAML,KAAA,GAAQG,WAAA,CAAYG,SAAA,CAAsB,CAACC,OAAA,EAASC,GAAA,KAAQ;EACvE,MAAM,CAACC,KAAA,EAAOC,KAAK,IAAIX,gBAAA,CAAiBQ,OAAO;IACzC;MAAEI,GAAA;MAAKC,MAAA;MAAQC,SAAA;MAAW,GAAGC;IAAK,IAAIL,KAAA;EAExCM,OAAA,CAAQC,GAAA,CAAIC,QAAA,KAAa,iBACv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Dd,KAAA,CAAMkC,OAAA,GAAUjC,OAAA,CAAQiC,OAAA;AACxBlC,KAAA,CAAMmC,kBAAA,GAAqBlC,OAAA,CAAQkC,kBAAA;AACnCnC,KAAA,CAAMoC,QAAA,GAAWnC,OAAA,CAAQmC,QAAA;AACzBpC,KAAA,CAAMqC,oBAAA,GAAuBpC,OAAA,CAAQoC,oBAAA;AACrCrC,KAAA,CAAMsC,aAAA,GAAgBrC,OAAA,CAAQqC,aAAA;AAC9BtC,KAAA,CAAMuC,UAAA,GAAatC,OAAA,CAAQsC,UAAA","ignoreList":[]}
@@ -1,105 +0,0 @@
1
- "use strict";
2
-
3
- var __create = Object.create;
4
- var __defProp = Object.defineProperty;
5
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getProtoOf = Object.getPrototypeOf,
8
- __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __export = (target, all) => {
10
- for (var name in all) __defProp(target, name, {
11
- get: all[name],
12
- enumerable: !0
13
- });
14
- },
15
- __copyProps = (to, from, except, desc) => {
16
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
17
- get: () => from[key],
18
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
- });
20
- return to;
21
- };
22
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
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: !0
30
- }) : target, mod)),
31
- __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
32
- value: !0
33
- }), mod);
34
- var Image_exports = {};
35
- __export(Image_exports, {
36
- Image: () => Image
37
- });
38
- module.exports = __toCommonJS(Image_exports);
39
- var import_jsx_runtime = require("react/jsx-runtime"),
40
- import_react = __toESM(require("react"), 1),
41
- import_constants = require("@tamagui/constants"),
42
- import_web = require("@tamagui/web"),
43
- import_react_native = require("react-native");
44
- function _type_of(obj) {
45
- "@swc/helpers - typeof";
46
-
47
- return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
48
- }
49
- var StyledImage = (0, import_web.styled)(import_react_native.Image, {
50
- name: "Image"
51
- }),
52
- hasWarned = !1,
53
- Image = StyledImage.styleable(function (inProps, ref) {
54
- var [props, style] = (0, import_web.usePropsAndStyle)(inProps),
55
- {
56
- src,
57
- source,
58
- objectFit,
59
- ...rest
60
- } = props;
61
- 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('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
- var finalSource = typeof src == "string" ? {
63
- uri: src,
64
- ...(import_constants.isWeb && {
65
- width: props.width || style?.width,
66
- height: props.height || style?.height
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);
75
- }
76
- process.env.NODE_ENV === "development" && process.env.TAMAGUI_IMAGE_CHECK_ERROR && import_react.default.useEffect(function () {
77
- async function run() {
78
- if (typeof src == "string") try {
79
- await fetch(src).then(function (res) {
80
- return res.text();
81
- });
82
- } catch {
83
- console.error(`Error loading image: ${src}`, {
84
- props
85
- });
86
- }
87
- }
88
- run();
89
- }, [src]), finalSource.default && (finalSource = finalSource.default);
90
- }
91
- return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react_native.Image, {
92
- resizeMode: objectFit,
93
- ref,
94
- source: finalSource,
95
- style,
96
- ...rest
97
- });
98
- });
99
- Image.getSize = import_react_native.Image.getSize;
100
- Image.getSizeWithHeaders = import_react_native.Image.getSizeWithHeaders;
101
- Image.prefetch = import_react_native.Image.prefetch;
102
- Image.prefetchWithMetadata = import_react_native.Image.prefetchWithMetadata;
103
- Image.abortPrefetch = import_react_native.Image.abortPrefetch;
104
- Image.queryCache = import_react_native.Image.queryCache;
105
- //# sourceMappingURL=Image.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["__create","Object","create","__defProp","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__getProtoOf","getPrototypeOf","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toESM","mod","isNodeMode","__esModule","value","__toCommonJS","Image_exports","Image","module","exports","import_jsx_runtime","require","import_react","import_constants","import_web","import_react_native","_type_of","obj","Symbol","constructor","StyledImage","styled","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"],"sources":["../../../src/v1/Image.tsx"],"sourcesContent":[null],"mappings":"AAAA,YAAO;;AACP,IAAAA,QAAS,GAAAC,MAAA,CAAaC,MAAA;AAQtB,IAAAC,SAAS,GAAAF,MAAQ,CAAAG,cAAA;AAEjB,IAAAC,gBAAkB,GAAAJ,MAAA,CAAAK,wBAAe;AAqH7B,IAAAC,iBAAA,GAAAN,MAAA,CAAAO,mBAAA;AAnHJ,IAAAC,YAAM,GAAAR,MAAc,CAAAS,cAAgB;EAAAC,YAAA,GAAAV,MAAA,CAAAW,SAAA,CAAAC,cAAA;A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,YAAAA,WAAA,CAAAC,GAAA,iBAAAD,WAAA,GAAAA,WAAA,CAAAC,GAAA,EAAAX,MAAA,YAAAA,MAAA,uBAAAd,QAAA,CAAAc,MAAA,oBAAAa,KAAA,CAAAC,OAAA,CAAAd,MAAA;QACxB,IAAAe,MAAA,EAAAC,OAAa,EAAQC,MAAA","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- export * from "./Image";
2
- //# sourceMappingURL=index.js.map
@@ -1,6 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/v1/index.ts"],
4
- "mappings": "AAAA,cAAc;",
5
- "names": []
6
- }
@@ -1,2 +0,0 @@
1
- export * from "./Image.mjs";
2
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["../../../src/v1/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc","ignoreList":[]}
@@ -1,21 +0,0 @@
1
- "use strict";
2
-
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __copyProps = (to, from, except, desc) => {
8
- if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
9
- get: () => from[key],
10
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
11
- });
12
- return to;
13
- },
14
- __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
16
- value: !0
17
- }), mod);
18
- var v1_exports = {};
19
- module.exports = __toCommonJS(v1_exports);
20
- __reExport(v1_exports, require("./Image.native.js"), module.exports);
21
- //# sourceMappingURL=index.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["../../../src/v1/index.ts"],"sourcesContent":[null],"mappings":"AAAA","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Image.native.d.ts","sourceRoot":"","sources":["../src/Image.native.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAc,SAAS,EAAE,MAAM,SAAS,CAAA;AAMpD,eAAO,MAAM,KAAK,EAqFD,SAAS,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAC7C,OAAO,KAAK,EACV,eAAe,EACf,mBAAmB,EACnB,KAAK,IAAI,OAAO,EAChB,UAAU,IAAI,YAAY,EAC3B,MAAM,cAAc,CAAA;AAErB,KAAK,WAAW,GAAG,OAAO,OAAO,CAAA;AAEjC,KAAK,cAAc,GAAG,MAAM,SAAS,CAAA;AAErC,MAAM,MAAM,UAAU,GAAG,SAAS,GAChC,IAAI,CAAC,YAAY,EAAE,cAAc,GAAG,QAAQ,GAAG,YAAY,GAAG,OAAO,CAAC,GAAG;IACvE;;;OAGG;IACH,MAAM,CAAC,EAAE,mBAAmB,CAAA;IAC5B;;;OAGG;IACH,UAAU,CAAC,EAAE,eAAe,CAAA;IAC5B,SAAS,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,CAAA;IAC5C,cAAc,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAA;CACvD,GAAG,IAAI,CACN,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,EACzC,OAAO,GAAG,QAAQ,GAAG,cAAc,CACpC,GACD,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC,CAAA;AAE/E,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,GAAG;IACtD,OAA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