@hanzogui/image 3.0.2 → 7.3.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.
- package/LICENSE +40 -19
- package/dist/cjs/Image.cjs +43 -41
- package/dist/cjs/Image.native.js +17 -15
- package/dist/cjs/Image.native.js.map +1 -1
- package/dist/cjs/createImage.cjs +123 -94
- package/dist/cjs/createImage.native.js +128 -101
- 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 +65 -50
- package/dist/cjs/v1/Image.native.js +92 -74
- 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 -82
- package/dist/esm/createImage.mjs.map +1 -1
- package/dist/esm/createImage.native.js +113 -88
- package/dist/esm/createImage.native.js.map +1 -1
- 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 -82
- package/dist/jsx/createImage.mjs.map +1 -1
- package/dist/jsx/createImage.native.js +128 -101
- package/dist/jsx/createImage.native.js.map +1 -1
- 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 +92 -74
- package/dist/jsx/v1/Image.native.js.map +1 -1
- package/dist/jsx/v1/index.native.js +7 -5
- package/package.json +13 -10
- package/src/createImage.tsx +11 -2
- package/src/v1/Image.tsx +2 -2
- package/types/Image.d.ts.map +1 -0
- package/types/Image.native.d.ts +2 -2
- package/types/Image.native.d.ts.map +1 -0
- package/types/createImage.d.ts +3 -3
- package/types/createImage.d.ts.map +1 -0
- package/types/index.d.ts.map +1 -0
- package/types/types.d.ts +1 -1
- package/types/types.d.ts.map +1 -0
- package/types/v1/Image.d.ts +2 -2
- package/types/v1/Image.d.ts.map +1 -0
- package/types/v1/index.d.ts.map +1 -0
package/dist/jsx/v1/Image.mjs
CHANGED
|
@@ -6,35 +6,48 @@ import { jsx } from "react/jsx-runtime";
|
|
|
6
6
|
const StyledImage = styled(RNImage, {
|
|
7
7
|
name: "Image"
|
|
8
8
|
});
|
|
9
|
-
let hasWarned =
|
|
9
|
+
let hasWarned = false;
|
|
10
10
|
const Image = StyledImage.styleable((inProps, ref) => {
|
|
11
|
-
const [props, style] = usePropsAndStyle(inProps)
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
process.env.NODE_ENV === "development"
|
|
19
|
-
|
|
11
|
+
const [props, style] = usePropsAndStyle(inProps);
|
|
12
|
+
const {
|
|
13
|
+
src,
|
|
14
|
+
source,
|
|
15
|
+
objectFit,
|
|
16
|
+
...rest
|
|
17
|
+
} = props;
|
|
18
|
+
if (process.env.NODE_ENV === "development") {
|
|
19
|
+
if (typeof src === "string") {
|
|
20
|
+
if (typeof props.width === "string" && props.width[0] !== "$" || typeof props.height === "string" && props.height[0] !== "$") {
|
|
21
|
+
if (!hasWarned) {
|
|
22
|
+
hasWarned = true;
|
|
23
|
+
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
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
let finalSource = typeof src === "string" ? {
|
|
20
29
|
uri: src,
|
|
21
30
|
...(isWeb && {
|
|
22
31
|
width: props.width || style?.width,
|
|
23
32
|
height: props.height || style?.height
|
|
24
33
|
})
|
|
25
34
|
} : source ?? src;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
35
|
+
if (finalSource && typeof finalSource === "object") {
|
|
36
|
+
if (process.env.NODE_ENV === "development" && process.env.GUI_IMAGE_CHECK_ERROR) React.useEffect(() => {
|
|
37
|
+
async function run() {
|
|
38
|
+
if (typeof src === "string") try {
|
|
39
|
+
await fetch(src).then(res => res.text());
|
|
40
|
+
} catch (err) {
|
|
41
|
+
console.error(`Error loading image: ${src}`, {
|
|
42
|
+
props
|
|
43
|
+
});
|
|
44
|
+
}
|
|
34
45
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
46
|
+
run();
|
|
47
|
+
}, [src]);
|
|
48
|
+
if (finalSource["default"]) finalSource = finalSource["default"];
|
|
49
|
+
}
|
|
50
|
+
return /* @__PURE__ */jsx(RNImage, {
|
|
38
51
|
resizeMode: objectFit,
|
|
39
52
|
ref,
|
|
40
53
|
source: finalSource,
|
|
@@ -1 +1 @@
|
|
|
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","
|
|
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","GUI_IMAGE_CHECK_ERROR","useEffect","run","fetch","then","res","text","err","error","resizeMode","getSize","getSizeWithHeaders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AAA5B,KAAA,CAAA6B,SAAA;MAAA,eACjCC,IAAA;QACF,IACC,OAAAf,GAAU;UAEjB,MAAIgB,KAAA,CAAAhB,GAAA,CAAe,CAAAiB,IAAA,CAAOC,GAAA,IAAAA,GAAA,CAAAC,IAAgB;QACxC,SAAIC,GAAQ;UAEVX,OAAK,CAAAY,KAAM,yBAAsBrB,GAAA;YAAAF;UAAA;QAC/B;MACE;MACAiB,GAAA;IAEE,IAAAf,GAAA;IAEA,IAAAW,WAAA,CAAM,YAAWA,WAAO,GAAAA,WAAA;EAAA;EAC1B,OACF,eAAApB,GAAA,CAAAD,OAAA;IAAAgC,UACF,EAAApB,SAAA;IAAAL,GACF;IAEAI,MAAI,EAAAU,WAAY;IAEdZ,KAAA;IACE,GAAAI;EACE;AACE;AACEd,KAAA,CAAAkC,OAAA,GAAAjC,OAAM,CAAAiC,OAAW;AAAwBlC,KAAA,CAAAmC,kBAClC,GAAKlC,OAAA,CAAAkC,kBAAA;AACZnC,KAAA,CAAAoC,QAAA,GAAAnC,OAAQ,CAAAmC,QAAM;AAAwCpC,KAAA,CAAAqC,oBACxD,GAAApC,OAAA,CAAAoC,oBAAA;AAAArC,KAAA,CAAAsC,aACF,GAAArC,OAAA,CAAAqC,aAAA;AAAAtC,KAAA,CAAAuC,UACF,GAAAtC,OAAA,CAAAsC,UAAA;AAEA,SAAAvC,KAAI","ignoreList":[]}
|
|
@@ -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("@hanzogui/constants");
|
|
44
|
+
var import_web = require("@hanzogui/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
|
-
var StyledImage = (0,
|
|
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);
|
|
51
|
+
var StyledImage = (0, import_web.styled)(import_react_native.Image, {
|
|
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.GUI_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":["__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","
|
|
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","_height"],"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;AAAA,IAClCC,YAAM,GAAAV,MAAA,CAAAW,SAAA,CAAAC,cAAA;AACR,IAACC,QAAA,GAAAA,CAAAC,MAAA,EAAAC,GAAA;EAmCD,KAAI,IAAAC,IAAA,IAAYD,GAAA,EAAAb,SAAA,CAAAY,MAAA,EAAAE,IAAA;IAMTC,GAAA,EAAMF,GAAA,CAAAC,IAAQ;IACnBE,UAAO;EACP;AAEA;AACE,IAAAC,WAAW,GAAAA,CAAAC,EAAA,EAAQC,IAAA,EAAAC,MAAU,EAAAC,IAAA;EAC3B,IAAAF,IAAA,IACG,OAAOA,IAAM,aAAU,WAAYA,IAAM,KAAM,UAAO;IAGvD,SAAAG,GAAK,IAAAlB,iBAAW,CAAAe,IAAA,QAAAX,YAAA,CAAAe,IAAA,CAAAL,EAAA,EAAAI,GAAA,KAAAA,GAAA,KAAAF,MAAA,EAAApB,SAAA,CAAAkB,EAAA,EAAAI,GAAA;MACdP,GAAA,EAAAA,CAAA,KAAAI,IAAA,CAAAG,GAAY;MACZN,UAAA,IAAAK,IAAQ,GAAAnB,gBAAA,CAAAiB,I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GAAQnB,KAAA,EAAAU,MAAA,cAAAW,OAAA,gBAAAF,OAAA,CAAAT,MAAA,GAAAP,MAAA,CAAAO,MAAA","ignoreList":[]}
|
|
@@ -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);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzogui/image",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "7.3.0",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"files": [
|
|
6
6
|
"src",
|
|
@@ -30,18 +30,19 @@
|
|
|
30
30
|
"access": "public"
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|
|
33
|
-
"build": "
|
|
34
|
-
"watch": "
|
|
35
|
-
"clean": "
|
|
36
|
-
"clean:build": "
|
|
33
|
+
"build": "gui-build",
|
|
34
|
+
"watch": "gui-build --watch",
|
|
35
|
+
"clean": "gui-build clean",
|
|
36
|
+
"clean:build": "gui-build clean:build"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@hanzogui/constants": "3.0
|
|
40
|
-
"@hanzogui/core": "3.0
|
|
41
|
-
"@hanzogui/web": "3.0
|
|
39
|
+
"@hanzogui/constants": "7.3.0",
|
|
40
|
+
"@hanzogui/core": "7.3.0",
|
|
41
|
+
"@hanzogui/web": "7.3.0",
|
|
42
|
+
"expo-image": "^55.0.11"
|
|
42
43
|
},
|
|
43
44
|
"devDependencies": {
|
|
44
|
-
"@hanzogui/build": "3.0
|
|
45
|
+
"@hanzogui/build": "7.3.0",
|
|
45
46
|
"react": ">=19",
|
|
46
47
|
"react-native": "0.83.2"
|
|
47
48
|
},
|
|
@@ -49,5 +50,7 @@
|
|
|
49
50
|
"react": ">=19",
|
|
50
51
|
"react-native": "*"
|
|
51
52
|
},
|
|
52
|
-
"module:jsx": "dist/jsx"
|
|
53
|
+
"module:jsx": "dist/jsx",
|
|
54
|
+
"license": "BSD-3-Clause",
|
|
55
|
+
"author": "Hanzo AI <dev@hanzo.ai>"
|
|
53
56
|
}
|
package/src/createImage.tsx
CHANGED
|
@@ -144,6 +144,7 @@ export function createImage<C extends ComponentType<any>>(
|
|
|
144
144
|
src,
|
|
145
145
|
width,
|
|
146
146
|
height,
|
|
147
|
+
borderRadius,
|
|
147
148
|
objectFit,
|
|
148
149
|
objectPosition,
|
|
149
150
|
// web only props - filter out on native
|
|
@@ -160,10 +161,12 @@ export function createImage<C extends ComponentType<any>>(
|
|
|
160
161
|
} = props
|
|
161
162
|
|
|
162
163
|
const resolvedWidth =
|
|
163
|
-
typeof width === 'string' && width[0] === '$'
|
|
164
|
+
typeof width === 'string' && width[0] === '$'
|
|
165
|
+
? getTokenValue(width as any, 'size')
|
|
166
|
+
: width
|
|
164
167
|
const resolvedHeight =
|
|
165
168
|
typeof height === 'string' && height[0] === '$'
|
|
166
|
-
? getTokenValue(height as any)
|
|
169
|
+
? getTokenValue(height as any, 'size')
|
|
167
170
|
: height
|
|
168
171
|
|
|
169
172
|
const finalSource = transformSource({
|
|
@@ -176,11 +179,17 @@ export function createImage<C extends ComponentType<any>>(
|
|
|
176
179
|
? Object.assign({}, ...rest.style.flat())
|
|
177
180
|
: rest.style
|
|
178
181
|
|
|
182
|
+
const resolvedBorderRadius =
|
|
183
|
+
typeof borderRadius === 'string' && borderRadius[0] === '$'
|
|
184
|
+
? getTokenValue(borderRadius as any, 'radius')
|
|
185
|
+
: borderRadius
|
|
186
|
+
|
|
179
187
|
const finalProps: any = {
|
|
180
188
|
...rest,
|
|
181
189
|
source: finalSource,
|
|
182
190
|
style: {
|
|
183
191
|
...incomingStyle,
|
|
192
|
+
...(resolvedBorderRadius !== undefined && { borderRadius: resolvedBorderRadius }),
|
|
184
193
|
...(resolvedWidth !== undefined && { width: resolvedWidth }),
|
|
185
194
|
...(resolvedHeight !== undefined && { height: resolvedHeight }),
|
|
186
195
|
},
|
package/src/v1/Image.tsx
CHANGED
|
@@ -86,7 +86,7 @@ export const Image = StyledImage.styleable<ImageProps>((inProps, ref) => {
|
|
|
86
86
|
: (source ?? src)
|
|
87
87
|
|
|
88
88
|
if (finalSource && typeof finalSource === 'object') {
|
|
89
|
-
if (process.env.
|
|
89
|
+
if (process.env.GUI_TARGET === 'native') {
|
|
90
90
|
// fix: normalize import style images
|
|
91
91
|
if (!Array.isArray(finalSource)) {
|
|
92
92
|
if (typeof finalSource.uri === 'number') {
|
|
@@ -101,7 +101,7 @@ export const Image = StyledImage.styleable<ImageProps>((inProps, ref) => {
|
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
if (process.env.NODE_ENV === 'development' && process.env.
|
|
104
|
+
if (process.env.NODE_ENV === 'development' && process.env.GUI_IMAGE_CHECK_ERROR) {
|
|
105
105
|
// lets add an onload timeout and warning if it fails to load in console
|
|
106
106
|
React.useEffect(() => {
|
|
107
107
|
async function run() {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../src/Image.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAc,SAAS,EAAE,MAAM,SAAS,CAAA;AAOpD,eAAO,MAAM,KAAK,EAuBF,SAAS,CAAA"}
|
package/types/Image.native.d.ts
CHANGED
|
@@ -6,11 +6,11 @@ export declare const Image: import("react").FC<Partial<import("./types").ImagePr
|
|
|
6
6
|
prefetchWithMetadata: typeof RNImage.prefetchWithMetadata;
|
|
7
7
|
abortPrefetch: typeof RNImage.abortPrefetch | undefined;
|
|
8
8
|
queryCache: typeof RNImage.queryCache | undefined;
|
|
9
|
-
} & import("react").FC<import("@
|
|
9
|
+
} & import("react").FC<import("@hanzogui/web").StackNonStyleProps & import("@hanzogui/web").WithThemeValues<import("@hanzogui/web").StackStyleBase> & import("@hanzogui/web").WithShorthands<import("@hanzogui/web").WithThemeValues<import("@hanzogui/web").StackStyleBase>> & import("@hanzogui/web").WithPseudoProps<import("@hanzogui/web").WithThemeValues<import("@hanzogui/web").StackStyleBase> & import("@hanzogui/web").WithShorthands<import("@hanzogui/web").WithThemeValues<import("@hanzogui/web").StackStyleBase>>> & import("@hanzogui/web").WithMediaProps<import("@hanzogui/web").WithThemeShorthandsAndPseudos<import("@hanzogui/web").StackStyleBase, {}>> & Omit<import("react-native").ImageProps, `$${string}` | `$${number}` | import("@hanzogui/web").GroupMediaKeys | `$theme-${string}` | `$theme-${number}` | keyof import("@hanzogui/web").StackStyleBase | keyof import("@hanzogui/web").StackNonStyleProps | keyof import("@hanzogui/web").WithPseudoProps<import("@hanzogui/web").WithThemeValues<import("@hanzogui/web").StackStyleBase> & import("@hanzogui/web").WithShorthands<import("@hanzogui/web").WithThemeValues<import("@hanzogui/web").StackStyleBase>>> | "source" | "resizeMode"> & {
|
|
10
10
|
src?: string | number;
|
|
11
11
|
source?: import("react-native").ImageSourcePropType;
|
|
12
12
|
resizeMode?: import("react-native").ImageResizeMode;
|
|
13
13
|
objectFit?: React.CSSProperties["objectFit"];
|
|
14
14
|
objectPosition?: React.CSSProperties["objectPosition"];
|
|
15
|
-
} & Omit<import("react").ImgHTMLAttributes<HTMLImageElement>, `$${string}` | `$${number}` | import("@
|
|
15
|
+
} & Omit<import("react").ImgHTMLAttributes<HTMLImageElement>, `$${string}` | `$${number}` | import("@hanzogui/web").GroupMediaKeys | `$theme-${string}` | `$theme-${number}` | keyof import("@hanzogui/web").StackStyleBase | keyof import("@hanzogui/web").StackNonStyleProps | keyof import("@hanzogui/web").WithPseudoProps<import("@hanzogui/web").WithThemeValues<import("@hanzogui/web").StackStyleBase> & import("@hanzogui/web").WithShorthands<import("@hanzogui/web").WithThemeValues<import("@hanzogui/web").StackStyleBase>>> | "src"> & Omit<import("react").ImgHTMLAttributes<HTMLImageElement>, "style" | "height" | "width" | "src"> & Omit<import("react-native").ImageProps, `$${string}` | `$${number}` | import("@hanzogui/web").GroupMediaKeys | `$theme-${string}` | `$theme-${number}` | "onLayout" | "rel" | "dir" | keyof import("@hanzogui/web").StackStyleBase | keyof import("@hanzogui/web").StackNonStyleProps | keyof import("@hanzogui/web").WithPseudoProps<import("@hanzogui/web").WithThemeValues<import("@hanzogui/web").StackStyleBase> & import("@hanzogui/web").WithShorthands<import("@hanzogui/web").WithThemeValues<import("@hanzogui/web").StackStyleBase>>> | "source" | "resizeMode" | "onError" | "onLoad" | "onLoadEnd" | "onLoadStart" | "progressiveRenderingEnabled" | "src" | "srcSet" | "loadingIndicatorSource" | "defaultSource" | "alt" | "crossOrigin" | "tintColor" | "referrerPolicy" | "blurRadius" | "capInsets" | "onProgress" | "onPartialLoad" | "resizeMethod" | "fadeDuration" | "objectPosition" | "decoding" | "fetchPriority" | "loading" | "sizes" | "useMap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "draggable" | "enterKeyHint" | "hidden" | "lang" | "nonce" | "slot" | "spellCheck" | "title" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-dropeffect" | "aria-errormessage" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-level" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-setsize" | "aria-sort" | "onCopyCapture" | "onCutCapture" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInputCapture" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoadCapture" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenuCapture" | "onDoubleClickCapture" | "onDragCapture" | "onDragEndCapture" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeaveCapture" | "onDragOverCapture" | "onDragStartCapture" | "onDropCapture" | "onMouseDownCapture" | "onMouseMoveCapture" | "onMouseOutCapture" | "onMouseOverCapture" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancelCapture" | "onTouchMoveCapture" | "onTouchStartCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture">>;
|
|
16
16
|
//# sourceMappingURL=Image.native.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Image.native.d.ts","sourceRoot":"","sources":["../src/Image.native.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,OAAO,EAAE,MAAM,cAAc,CAAA;AAG/C,eAAO,MAAM,KAAK;;;;;;;;;;;;;k2KAEhB,CAAA"}
|
package/types/createImage.d.ts
CHANGED
|
@@ -42,7 +42,7 @@ export type CreateImageOptions<C extends ComponentType<any>> = {
|
|
|
42
42
|
* @example
|
|
43
43
|
* Using with expo-image
|
|
44
44
|
* import { Image as ExpoImage } from 'expo-image'
|
|
45
|
-
* import { createImage } from '@
|
|
45
|
+
* import { createImage } from '@hanzogui/image'
|
|
46
46
|
*
|
|
47
47
|
* export const Image = createImage({
|
|
48
48
|
* Component: ExpoImage,
|
|
@@ -66,12 +66,12 @@ export declare function createImage<C extends ComponentType<any>>(options: Creat
|
|
|
66
66
|
prefetchWithMetadata: typeof import("react-native").Image.prefetchWithMetadata;
|
|
67
67
|
abortPrefetch: typeof import("react-native").Image.abortPrefetch | undefined;
|
|
68
68
|
queryCache: typeof import("react-native").Image.queryCache | undefined;
|
|
69
|
-
} & import("react").FC<import("@
|
|
69
|
+
} & import("react").FC<import("@hanzogui/web").StackNonStyleProps & import("@hanzogui/web").WithThemeValues<import("@hanzogui/web").StackStyleBase> & import("@hanzogui/web").WithShorthands<import("@hanzogui/web").WithThemeValues<import("@hanzogui/web").StackStyleBase>> & import("@hanzogui/web").WithPseudoProps<import("@hanzogui/web").WithThemeValues<import("@hanzogui/web").StackStyleBase> & import("@hanzogui/web").WithShorthands<import("@hanzogui/web").WithThemeValues<import("@hanzogui/web").StackStyleBase>>> & import("@hanzogui/web").WithMediaProps<import("@hanzogui/web").WithThemeShorthandsAndPseudos<import("@hanzogui/web").StackStyleBase, {}>> & Omit<import("react-native").ImageProps, `$${string}` | `$${number}` | import("@hanzogui/web").GroupMediaKeys | `$theme-${string}` | `$theme-${number}` | keyof import("@hanzogui/web").StackStyleBase | keyof import("@hanzogui/web").StackNonStyleProps | keyof import("@hanzogui/web").WithPseudoProps<import("@hanzogui/web").WithThemeValues<import("@hanzogui/web").StackStyleBase> & import("@hanzogui/web").WithShorthands<import("@hanzogui/web").WithThemeValues<import("@hanzogui/web").StackStyleBase>>> | "source" | "resizeMode"> & {
|
|
70
70
|
src?: string | number;
|
|
71
71
|
source?: import("react-native").ImageSourcePropType;
|
|
72
72
|
resizeMode?: ImageResizeMode;
|
|
73
73
|
objectFit?: React.CSSProperties["objectFit"];
|
|
74
74
|
objectPosition?: React.CSSProperties["objectPosition"];
|
|
75
|
-
} & Omit<import("react").ImgHTMLAttributes<HTMLImageElement>, `$${string}` | `$${number}` | import("@
|
|
75
|
+
} & Omit<import("react").ImgHTMLAttributes<HTMLImageElement>, `$${string}` | `$${number}` | import("@hanzogui/web").GroupMediaKeys | `$theme-${string}` | `$theme-${number}` | keyof import("@hanzogui/web").StackStyleBase | keyof import("@hanzogui/web").StackNonStyleProps | keyof import("@hanzogui/web").WithPseudoProps<import("@hanzogui/web").WithThemeValues<import("@hanzogui/web").StackStyleBase> & import("@hanzogui/web").WithShorthands<import("@hanzogui/web").WithThemeValues<import("@hanzogui/web").StackStyleBase>>> | "src"> & Omit<import("react").ImgHTMLAttributes<HTMLImageElement>, "style" | "height" | "width" | "src"> & Omit<GetProps<C>, `$${string}` | `$${number}` | import("@hanzogui/web").GroupMediaKeys | `$theme-${string}` | `$theme-${number}` | "onLayout" | "rel" | "dir" | keyof import("@hanzogui/web").StackStyleBase | keyof import("@hanzogui/web").StackNonStyleProps | keyof import("@hanzogui/web").WithPseudoProps<import("@hanzogui/web").WithThemeValues<import("@hanzogui/web").StackStyleBase> & import("@hanzogui/web").WithShorthands<import("@hanzogui/web").WithThemeValues<import("@hanzogui/web").StackStyleBase>>> | "source" | "resizeMode" | "onError" | "onLoad" | "onLoadEnd" | "onLoadStart" | "progressiveRenderingEnabled" | "src" | "srcSet" | "loadingIndicatorSource" | "defaultSource" | "alt" | "crossOrigin" | "tintColor" | "referrerPolicy" | "blurRadius" | "capInsets" | "onProgress" | "onPartialLoad" | "resizeMethod" | "fadeDuration" | "objectPosition" | "decoding" | "fetchPriority" | "loading" | "sizes" | "useMap" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "draggable" | "enterKeyHint" | "hidden" | "lang" | "nonce" | "slot" | "spellCheck" | "title" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popover" | "popoverTargetAction" | "popoverTarget" | "inert" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-dropeffect" | "aria-errormessage" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-level" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-setsize" | "aria-sort" | "onCopyCapture" | "onCutCapture" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInputCapture" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoadCapture" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenuCapture" | "onDoubleClickCapture" | "onDragCapture" | "onDragEndCapture" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeaveCapture" | "onDragOverCapture" | "onDragStartCapture" | "onDropCapture" | "onMouseDownCapture" | "onMouseMoveCapture" | "onMouseOutCapture" | "onMouseOverCapture" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancelCapture" | "onTouchMoveCapture" | "onTouchStartCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScrollCapture" | "onScrollEnd" | "onScrollEndCapture" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onToggle" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture">>;
|
|
76
76
|
export {};
|
|
77
77
|
//# sourceMappingURL=createImage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createImage.d.ts","sourceRoot":"","sources":["../src/createImage.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAC1C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AACnD,OAAO,KAAK,EAAE,UAAU,EAAa,MAAM,SAAS,CAAA;AAEpD,KAAK,QAAQ,CAAC,CAAC,IAAI,CAAC,SAAS,aAAa,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAA;AAE/D,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,aAAa,CAAC,GAAG,CAAC,IAAI;IAC7D;;;OAGG;IACH,SAAS,EAAE,CAAC,CAAA;IACZ;;;OAGG;IACH,wBAAwB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,CAAA;IACxD;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B;;;;OAIG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B;;;OAGG;IACH,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE;QACxB,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;QACrB,MAAM,CAAC,EAAE,GAAG,CAAA;QACZ,KAAK,CAAC,EAAE,GAAG,CAAA;QACX,MAAM,CAAC,EAAE,GAAG,CAAA;KACb,KAAK,GAAG,CAAA;CACV,CAAA;AAiCD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,aAAa,CAAC,GAAG,CAAC,EACtD,OAAO,EAAE,kBAAkB,CAAC,CAAC,CAAC;;;;;;;;;;;;;60KAmJ/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,eAAe,CAAA;AAC7B,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA"}
|
package/types/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ViewProps } from '@
|
|
1
|
+
import type { ViewProps } from '@hanzogui/web';
|
|
2
2
|
import type { ImageResizeMode, ImageSourcePropType, Image as RNImage, ImageProps as RNImageProps } from 'react-native';
|
|
3
3
|
type RNImageType = typeof RNImage;
|
|
4
4
|
type KeyofViewProps = keyof ViewProps;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,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,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACrB;;;OAGG;IACH,MAAM,CAAC,EAAE,mBAAmB,CAAA;IAC5B;;;OAGG;IACH,UAAU,CAAC,EAAE,eAAe,CAAA;IAC5B;;;OAGG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,CAAA;IAC5C;;;;OAIG;IACH,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,GAAG,KAAK,CAC5C,GACD,IAAI,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