@hanzogui/image 3.0.1 → 7.0.0

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 (77) hide show
  1. package/package.json +10 -10
  2. package/src/createImage.tsx +14 -5
  3. package/src/v1/Image.tsx +3 -3
  4. package/types/Image.native.d.ts +2 -2
  5. package/types/createImage.d.ts +4 -4
  6. package/types/types.d.ts +1 -1
  7. package/types/v1/Image.d.ts +3 -3
  8. package/dist/cjs/Image.cjs +0 -62
  9. package/dist/cjs/Image.native.js +0 -33
  10. package/dist/cjs/Image.native.js.map +0 -1
  11. package/dist/cjs/createImage.cjs +0 -128
  12. package/dist/cjs/createImage.native.js +0 -134
  13. package/dist/cjs/createImage.native.js.map +0 -1
  14. package/dist/cjs/index.cjs +0 -19
  15. package/dist/cjs/index.native.js +0 -22
  16. package/dist/cjs/index.native.js.map +0 -1
  17. package/dist/cjs/types.cjs +0 -16
  18. package/dist/cjs/types.native.js +0 -19
  19. package/dist/cjs/types.native.js.map +0 -1
  20. package/dist/cjs/v1/Image.cjs +0 -86
  21. package/dist/cjs/v1/Image.native.js +0 -105
  22. package/dist/cjs/v1/Image.native.js.map +0 -1
  23. package/dist/cjs/v1/index.cjs +0 -18
  24. package/dist/cjs/v1/index.native.js +0 -21
  25. package/dist/cjs/v1/index.native.js.map +0 -1
  26. package/dist/esm/Image.mjs +0 -39
  27. package/dist/esm/Image.mjs.map +0 -1
  28. package/dist/esm/Image.native.js +0 -7
  29. package/dist/esm/Image.native.js.map +0 -1
  30. package/dist/esm/createImage.mjs +0 -105
  31. package/dist/esm/createImage.mjs.map +0 -1
  32. package/dist/esm/createImage.native.js +0 -108
  33. package/dist/esm/createImage.native.js.map +0 -1
  34. package/dist/esm/index.js +0 -3
  35. package/dist/esm/index.js.map +0 -1
  36. package/dist/esm/index.mjs +0 -3
  37. package/dist/esm/index.mjs.map +0 -1
  38. package/dist/esm/index.native.js +0 -3
  39. package/dist/esm/index.native.js.map +0 -1
  40. package/dist/esm/types.mjs +0 -2
  41. package/dist/esm/types.mjs.map +0 -1
  42. package/dist/esm/types.native.js +0 -2
  43. package/dist/esm/types.native.js.map +0 -1
  44. package/dist/esm/v1/Image.mjs +0 -52
  45. package/dist/esm/v1/Image.mjs.map +0 -1
  46. package/dist/esm/v1/Image.native.js +0 -68
  47. package/dist/esm/v1/Image.native.js.map +0 -1
  48. package/dist/esm/v1/index.mjs +0 -2
  49. package/dist/esm/v1/index.mjs.map +0 -1
  50. package/dist/esm/v1/index.native.js +0 -2
  51. package/dist/esm/v1/index.native.js.map +0 -1
  52. package/dist/jsx/Image.mjs +0 -39
  53. package/dist/jsx/Image.mjs.map +0 -1
  54. package/dist/jsx/Image.native.js +0 -33
  55. package/dist/jsx/Image.native.js.map +0 -1
  56. package/dist/jsx/createImage.mjs +0 -105
  57. package/dist/jsx/createImage.mjs.map +0 -1
  58. package/dist/jsx/createImage.native.js +0 -134
  59. package/dist/jsx/createImage.native.js.map +0 -1
  60. package/dist/jsx/index.js +0 -3
  61. package/dist/jsx/index.js.map +0 -1
  62. package/dist/jsx/index.mjs +0 -3
  63. package/dist/jsx/index.mjs.map +0 -1
  64. package/dist/jsx/index.native.js +0 -22
  65. package/dist/jsx/index.native.js.map +0 -1
  66. package/dist/jsx/types.mjs +0 -2
  67. package/dist/jsx/types.mjs.map +0 -1
  68. package/dist/jsx/types.native.js +0 -19
  69. package/dist/jsx/types.native.js.map +0 -1
  70. package/dist/jsx/v1/Image.mjs +0 -52
  71. package/dist/jsx/v1/Image.mjs.map +0 -1
  72. package/dist/jsx/v1/Image.native.js +0 -105
  73. package/dist/jsx/v1/Image.native.js.map +0 -1
  74. package/dist/jsx/v1/index.mjs +0 -2
  75. package/dist/jsx/v1/index.mjs.map +0 -1
  76. package/dist/jsx/v1/index.native.js +0 -21
  77. package/dist/jsx/v1/index.native.js.map +0 -1
@@ -1,134 +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 __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 __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: !0
22
- }), mod);
23
- var createImage_exports = {};
24
- __export(createImage_exports, {
25
- createImage: () => createImage
26
- });
27
- module.exports = __toCommonJS(createImage_exports);
28
- var import_jsx_runtime = require("react/jsx-runtime"),
29
- import_gui_web = require("@hanzogui/web"),
30
- defaultObjectFitMap = function (objectFit) {
31
- switch (objectFit) {
32
- case "fill":
33
- return "stretch";
34
- case "none":
35
- return "center";
36
- case "scale-down":
37
- return "contain";
38
- case "contain":
39
- return "contain";
40
- default:
41
- return "cover";
42
- }
43
- },
44
- defaultTransformSource = function (props) {
45
- var {
46
- src,
47
- source,
48
- width,
49
- height
50
- } = props;
51
- return source || (src && typeof src != "string" ? src : {
52
- uri: src,
53
- width,
54
- height
55
- });
56
- };
57
- function createImage(options) {
58
- var {
59
- Component,
60
- mapObjectFitToResizeMode = defaultObjectFitMap,
61
- resizeModePropName = "resizeMode",
62
- objectPositionPropName,
63
- transformSource = defaultTransformSource
64
- } = options,
65
- inlinePropsSet = /* @__PURE__ */new Set(["source", "placeholder", "transition", "contentFit", "contentPosition", "cachePolicy", "recyclingKey", "allowDownscaling", "autoplay", "blurRadius", "priority", "placeholderContentFit", "responsivePolicy", "onLoadStart", "onProgress", "onLoadEnd"]),
66
- StyledImage = (0, import_gui_web.styled)(Component, {
67
- name: "Image"
68
- }, {
69
- inlineProps: inlinePropsSet
70
- }),
71
- ImageComponent = StyledImage.styleable(function (incomingProps, ref) {
72
- var props = incomingProps,
73
- {
74
- src,
75
- width,
76
- height,
77
- objectFit,
78
- objectPosition,
79
- // web only props - filter out on native
80
- decoding,
81
- elementTiming,
82
- fetchpriority,
83
- isMap,
84
- loading,
85
- sizes,
86
- useMap,
87
- onLoad,
88
- onError,
89
- ...rest
90
- } = props,
91
- resolvedWidth = typeof width == "string" && width[0] === "$" ? (0, import_gui_web.getTokenValue)(width) : width,
92
- resolvedHeight = typeof height == "string" && height[0] === "$" ? (0, import_gui_web.getTokenValue)(height) : height,
93
- finalSource = transformSource({
94
- src,
95
- width: resolvedWidth,
96
- height: resolvedHeight
97
- }),
98
- incomingStyle = Array.isArray(rest.style) ? Object.assign({}, ...rest.style.flat()) : rest.style,
99
- finalProps = {
100
- ...rest,
101
- source: finalSource,
102
- style: {
103
- ...incomingStyle,
104
- ...(resolvedWidth !== void 0 && {
105
- width: resolvedWidth
106
- }),
107
- ...(resolvedHeight !== void 0 && {
108
- height: resolvedHeight
109
- })
110
- }
111
- };
112
- return objectFit && (finalProps[resizeModePropName] = mapObjectFitToResizeMode(objectFit)), objectPositionPropName && objectPosition && (finalProps[objectPositionPropName] = objectPosition), onLoad && (finalProps.onLoad = function (e) {
113
- var _e_nativeEvent,
114
- source = (e == null || (_e_nativeEvent = e.nativeEvent) === null || _e_nativeEvent === void 0 ? void 0 : _e_nativeEvent.source) || e?.source || {};
115
- onLoad({
116
- target: {
117
- naturalHeight: source?.height,
118
- naturalWidth: source?.width
119
- },
120
- type: "load"
121
- });
122
- }), onError && (finalProps.onError = function () {
123
- onError({
124
- type: "error"
125
- });
126
- }), /* @__PURE__ */(0, import_jsx_runtime.jsx)(Component, {
127
- ref,
128
- ...finalProps
129
- });
130
- }),
131
- comp = Component;
132
- return ImageComponent.getSize = comp.getSize || function () {}, ImageComponent.getSizeWithHeaders = comp.getSizeWithHeaders || function () {}, ImageComponent.prefetch = comp.prefetch || function () {}, ImageComponent.prefetchWithMetadata = comp.prefetchWithMetadata || function () {}, ImageComponent.abortPrefetch = comp.abortPrefetch || function () {}, ImageComponent.queryCache = comp.queryCache || function () {}, ImageComponent;
133
- }
134
- //# sourceMappingURL=createImage.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","createImage_exports","__export","createImage","module","exports","import_jsx_runtime","require","import_gui_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","incomingStyle","Array","isArray","style","Object","assign","flat","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,GAAAT,YAAsC,CAAAK,mBA8N3B;AApLX,IAAAK,kBAAM,GAAAC,OAAuB,oBAAuC;EAAAC,cAAA,GAAAD,OAAA;EAAAE,mBAAA,YAAAA,CAAAC,SAAA;IAClE,QAAQA,SAAA;MACN,KAAK;QACH,OAAO;MACT,KAAK;QACH,OAAO;MACT,KAAK;QACH,OAAO;MACT,KAAK;QACH,OAAO;MACT;QACE,OAAO;IACX;EACF;EAEMC,sBAAA,GAAyB,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,IAAA,CAAAG,QAAA,iBACb,GAAAtC,cAAA,CAAAuC,oBAA8B,GAAAJ,IAAA,CAAAI,oBAAkB,iBAAC,GAAAvC,cACjD,CAAAwC,aAAe,GAAAL,IAAA,CAAAK,aAA0B,iBAA8B,GAAAxC,cACvE,CAAAyC,UAAe,GAAWN,IAAK,CAAAM,UAAA,IAAa,YAAM,CAAC,GAAAzC,cACnD;AAA0E","ignoreList":[]}
@@ -1,19 +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 index_exports = {};
17
- module.exports = __toCommonJS(index_exports);
18
- __reExport(index_exports, require("./Image.cjs"), module.exports);
19
- __reExport(index_exports, require("./createImage.cjs"), module.exports);
@@ -1,22 +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 index_exports = {};
19
- module.exports = __toCommonJS(index_exports);
20
- __reExport(index_exports, require("./Image.native.js"), module.exports);
21
- __reExport(index_exports, require("./createImage.native.js"), module.exports);
22
- //# sourceMappingURL=index.native.js.map
@@ -1 +0,0 @@
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":[]}
@@ -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);
@@ -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_gui_constants = require("@hanzogui/constants"),
39
- import_gui_web = require("@hanzogui/web"),
40
- import_react_native = require("react-native-web"),
41
- import_jsx_runtime = require("react/jsx-runtime");
42
- const StyledImage = (0, import_gui_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_gui_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_gui_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.HANZO_GUI_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,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_gui_constants = require("@hanzogui/constants"),
42
- import_gui_web = require("@hanzogui/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_gui_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_gui_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_gui_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.HANZO_GUI_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_gui_constants","import_gui_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","HANZO_GUI_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,GAAAC,OAAS,CAAAF,OAAA;EAAAG,oBAAA,GAAAH,OAAA;EAAAI,cAAA,GAAAJ,OAAA;EAAAK,mBAAA,GAAAL,OAAA;AAAA,SAC5BM,SAAAC,GAAA;EAC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I,EAAAC,OAAA,EAAAC,MAAA;QACF,CAAAA,MAAA,GAAM,CAAAF,MAAM,GAAGlB,KAAE,EAAMS,KAAA,MAAQ,IAAI,IAAMW,MAAA,gBAAAF,MAAA,CAAAT,KAAA,GAAAN,MAAA,CAAAM,KAAA;QAAA,IAC3CY,OAAc;QACZ,CAAAA,OAAA,IAAQF,OAAM,GAAAnB,KAAA,EAAAU,MAAA,UAA2B,IAAIW,OAAE,KAAO,WAAAF,OAAA,CAAAT,MAAA,GAAAP,MAAA,CAAAO,MAAA;MAAA;MAG5DJ,OAAA,CAAAC,GAAA,CAAAC,QAAA,sBAAAF,OAAA,CAAAC,GAAA,CAAAe,2BAAA,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,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":[]}
@@ -1,39 +0,0 @@
1
- import { View, styled } from "@hanzogui/web";
2
- import { jsx } from "react/jsx-runtime";
3
- const StyledImage = styled(View, {
4
- name: "Image",
5
- render: "img"
6
- }),
7
- 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: !0
29
- }
30
- }),
31
- func = () => {};
32
- Image.getSize = func;
33
- Image.getSizeWithHeaders = func;
34
- Image.prefetch = func;
35
- Image.prefetchWithMetadata = func;
36
- Image.abortPrefetch = func;
37
- Image.queryCache = func;
38
- export { Image };
39
- //# sourceMappingURL=Image.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["View","styled","jsx","StyledImage","name","render","Image","styleable","inProps","ref","blurRadius","capInsets","defaultSource","fadeDuration","loadingIndicatorSource","onLoadEnd","onPartialLoad","progressiveRenderingEnabled","resizeMethod","tintColor","rest","staticConfig","memo","func","getSize","getSizeWithHeaders","prefetch","prefetchWithMetadata","abortPrefetch","queryCache"],"sources":["../../src/Image.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,IAAA,EAAMC,MAAA,QAAc;AAwBlB,SAAAC,GAAA;AArBX,MAAMC,WAAA,GAAcF,MAAA,CAAOD,IAAA,EAAM;IAC/BI,IAAA,EAAM;IACNC,MAAA,EAAQ;EACV,CAAC;EAEYC,KAAA,GAAQH,WAAA,CAAYI,SAAA,CAC/B,CAACC,OAAA,EAASC,GAAA,KAAQ;IAChB,MAAM;MAAA;MAEJC,UAAA;MACAC,SAAA;MACAC,aAAA;MACAC,YAAA;MACAC,sBAAA;MACAC,SAAA;MACAC,aAAA;MACAC,2BAAA;MACAC,YAAA;MACAC,SAAA;MACA,GAAGC;IACL,IAAIZ,OAAA;IACJ,OAAO,eAAAN,GAAA,CAACC,WAAA;MAAYM,GAAA;MAAW,GAAGW;IAAA,CAAM;EAC1C,GACA;IACEC,YAAA,EAAc;MACZC,IAAA,EAAM;IACR;EACF,CACF;EAEMC,IAAA,GAAQA,CAAA,KAAM,CAAC;AAErBjB,KAAA,CAAMkB,OAAA,GAAUD,IAAA;AAChBjB,KAAA,CAAMmB,kBAAA,GAAqBF,IAAA;AAC3BjB,KAAA,CAAMoB,QAAA,GAAWH,IAAA;AACjBjB,KAAA,CAAMqB,oBAAA,GAAuBJ,IAAA;AAC7BjB,KAAA,CAAMsB,aAAA,GAAgBL,IAAA;AACtBjB,KAAA,CAAMuB,UAAA,GAAaN,IAAA","ignoreList":[]}
@@ -1,7 +0,0 @@
1
- import { Image as RNImage } from "react-native";
2
- import { createImage } from "./createImage.native.js";
3
- var Image = createImage({
4
- Component: RNImage
5
- });
6
- export { Image };
7
- //# sourceMappingURL=Image.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["Image","RNImage","createImage","Component"],"sources":["../../src/Image.native.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,KAAA,IAASC,OAAA,QAAe;AACjC,SAASC,WAAA,QAAmB;AACrB,IAAIF,KAAA,GAAQE,WAAA,CAAY;EAC3BC,SAAA,EAAWF;AACf,CAAC","ignoreList":[]}
@@ -1,105 +0,0 @@
1
- import { getTokenValue, styled } from "@hanzogui/web";
2
- import { jsx } from "react/jsx-runtime";
3
- const defaultObjectFitMap = objectFit => {
4
- switch (objectFit) {
5
- case "fill":
6
- return "stretch";
7
- case "none":
8
- return "center";
9
- case "scale-down":
10
- return "contain";
11
- case "contain":
12
- return "contain";
13
- default:
14
- return "cover";
15
- }
16
- },
17
- defaultTransformSource = props => {
18
- const {
19
- src,
20
- source,
21
- width,
22
- height
23
- } = props;
24
- return source || (src && typeof src != "string" ? src : {
25
- uri: src,
26
- width,
27
- height
28
- });
29
- };
30
- function createImage(options) {
31
- const {
32
- Component,
33
- mapObjectFitToResizeMode = defaultObjectFitMap,
34
- resizeModePropName = "resizeMode",
35
- objectPositionPropName,
36
- transformSource = defaultTransformSource
37
- } = options,
38
- ImageComponent = styled(Component, {
39
- name: "Image"
40
- }, {
41
- inlineProps: /* @__PURE__ */new Set(["source", "placeholder", "transition", "contentFit", "contentPosition", "cachePolicy", "recyclingKey", "allowDownscaling", "autoplay", "blurRadius", "priority", "placeholderContentFit", "responsivePolicy", "onLoadStart", "onProgress", "onLoadEnd"])
42
- }).styleable((incomingProps, ref) => {
43
- const props = incomingProps,
44
- {
45
- src,
46
- width,
47
- height,
48
- objectFit,
49
- objectPosition,
50
- // web only props - filter out on native
51
- decoding,
52
- elementTiming,
53
- fetchpriority,
54
- isMap,
55
- loading,
56
- sizes,
57
- useMap,
58
- onLoad,
59
- onError,
60
- ...rest
61
- } = props,
62
- resolvedWidth = typeof width == "string" && width[0] === "$" ? getTokenValue(width) : width,
63
- resolvedHeight = typeof height == "string" && height[0] === "$" ? getTokenValue(height) : height,
64
- finalSource = transformSource({
65
- src,
66
- width: resolvedWidth,
67
- height: resolvedHeight
68
- }),
69
- incomingStyle = Array.isArray(rest.style) ? Object.assign({}, ...rest.style.flat()) : rest.style,
70
- finalProps = {
71
- ...rest,
72
- source: finalSource,
73
- style: {
74
- ...incomingStyle,
75
- ...(resolvedWidth !== void 0 && {
76
- width: resolvedWidth
77
- }),
78
- ...(resolvedHeight !== void 0 && {
79
- height: resolvedHeight
80
- })
81
- }
82
- };
83
- return objectFit && (finalProps[resizeModePropName] = mapObjectFitToResizeMode(objectFit)), objectPositionPropName && objectPosition && (finalProps[objectPositionPropName] = objectPosition), onLoad && (finalProps.onLoad = e => {
84
- const source = e?.nativeEvent?.source || e?.source || {};
85
- onLoad({
86
- target: {
87
- naturalHeight: source?.height,
88
- naturalWidth: source?.width
89
- },
90
- type: "load"
91
- });
92
- }), onError && (finalProps.onError = () => {
93
- onError({
94
- type: "error"
95
- });
96
- }), /* @__PURE__ */jsx(Component, {
97
- ref,
98
- ...finalProps
99
- });
100
- }),
101
- comp = Component;
102
- return ImageComponent.getSize = comp.getSize || (() => {}), ImageComponent.getSizeWithHeaders = comp.getSizeWithHeaders || (() => {}), ImageComponent.prefetch = comp.prefetch || (() => {}), ImageComponent.prefetchWithMetadata = comp.prefetchWithMetadata || (() => {}), ImageComponent.abortPrefetch = comp.abortPrefetch || (() => {}), ImageComponent.queryCache = comp.queryCache || (() => {}), ImageComponent;
103
- }
104
- export { createImage };
105
- //# sourceMappingURL=createImage.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["getTokenValue","styled","jsx","defaultObjectFitMap","objectFit","defaultTransformSource","props","src","source","width","height","uri","createImage","options","Component","mapObjectFitToResizeMode","resizeModePropName","objectPositionPropName","transformSource","ImageComponent","name","inlineProps","Set","styleable","incomingProps","ref","objectPosition","decoding","elementTiming","fetchpriority","isMap","loading","sizes","useMap","onLoad","onError","rest","resolvedWidth","resolvedHeight","finalSource","incomingStyle","Array","isArray","style","Object","assign","flat","finalProps","e","nativeEvent","target","naturalHeight","naturalWidth","type","comp","getSize","getSizeWithHeaders","prefetch","prefetchWithMetadata","abortPrefetch","queryCache"],"sources":["../../src/createImage.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,aAAA,EAAeC,MAAA,QAAc;AA8N3B,SAAAC,GAAA;AApLX,MAAMC,mBAAA,GAAuBC,SAAA,IAAuC;IAClE,QAAQA,SAAA;MACN,KAAK;QACH,OAAO;MACT,KAAK;QACH,OAAO;MACT,KAAK;QACH,OAAO;MACT,KAAK;QACH,OAAO;MACT;QACE,OAAO;IACX;EACF;EAEMC,sBAAA,GAA0BC,KAAA,IAK1B;IACJ,MAAM;MAAEC,GAAA;MAAKC,MAAA;MAAQC,KAAA;MAAOC;IAAO,IAAIJ,KAAA;IACvC,OAAIE,MAAA,KACAD,GAAA,IAAO,OAAOA,GAAA,IAAQ,WAAiBA,GAAA,GACpC;MACLI,GAAA,EAAKJ,GAAA;MACLE,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