Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nuke-image

Package Overview
Dependencies
Maintainers
2
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nuke-image - npm Package Compare versions

Comparing version 2.0.5 to 2.0.6

2

build/deps.json

@@ -1,1 +0,1 @@

{"npm/nuke-env/2.0.2/index.cmd":{"requires":[]},"npm/nuke-env/2.0.2/index.native.cmd":{"requires":[]},"npm/nuke-view/2.0.2/index.cmd":{"requires":[]},"npm/nuke-image/2.0.0/index.native.cmd":{"requires":["npm/nuke-env/2.0.2/index.native.cmd","npm/nuke-view/2.0.2/index.cmd"]},"npm/nuke-image/2.0.0/index.cmd":{"requires":["npm/nuke-env/2.0.2/index.cmd","npm/nuke-view/2.0.2/index.cmd"]},"npm/nuke-image/2.0.1/index.native.cmd":{"requires":["npm/nuke-env/2.0.2/index.native.cmd","npm/nuke-view/2.0.2/index.cmd"]},"npm/nuke-image/2.0.1/index.cmd":{"requires":["npm/nuke-env/2.0.2/index.cmd","npm/nuke-view/2.0.2/index.cmd"]},"npm/nuke-image/2.0.2/index.cmd":{"requires":["npm/nuke-env/2.0.2/index.cmd"]},"npm/nuke-image/2.0.2/index.native.cmd":{"requires":["npm/nuke-env/2.0.2/index.native.cmd"]},"npm/nuke-image/2.0.3/index.cmd":{"requires":["npm/nuke-env/2.0.2/index.cmd"]},"npm/nuke-image/2.0.3/index.native.cmd":{"requires":["npm/nuke-env/2.0.2/index.native.cmd"]},"npm/nuke-image/2.0.4/index.cmd":{"requires":["npm/nuke-env/2.0.2/index.cmd"]},"npm/nuke-image/2.0.4/index.native.cmd":{"requires":["npm/nuke-env/2.0.2/index.native.cmd"]},"npm/nuke-image/2.0.5/index.cmd":{"requires":[]},"npm/nuke-image/2.0.5/index.native.cmd":{"requires":[]}}
{"npm/nuke-env/2.0.2/index.cmd":{"requires":[]},"npm/nuke-env/2.0.2/index.native.cmd":{"requires":[]},"npm/nuke-view/2.0.2/index.cmd":{"requires":[]},"npm/nuke-image/2.0.0/index.native.cmd":{"requires":["npm/nuke-env/2.0.2/index.native.cmd","npm/nuke-view/2.0.2/index.cmd"]},"npm/nuke-image/2.0.0/index.cmd":{"requires":["npm/nuke-env/2.0.2/index.cmd","npm/nuke-view/2.0.2/index.cmd"]},"npm/nuke-image/2.0.1/index.native.cmd":{"requires":["npm/nuke-env/2.0.2/index.native.cmd","npm/nuke-view/2.0.2/index.cmd"]},"npm/nuke-image/2.0.1/index.cmd":{"requires":["npm/nuke-env/2.0.2/index.cmd","npm/nuke-view/2.0.2/index.cmd"]},"npm/nuke-image/2.0.2/index.cmd":{"requires":["npm/nuke-env/2.0.2/index.cmd"]},"npm/nuke-image/2.0.2/index.native.cmd":{"requires":["npm/nuke-env/2.0.2/index.native.cmd"]},"npm/nuke-image/2.0.3/index.cmd":{"requires":["npm/nuke-env/2.0.2/index.cmd"]},"npm/nuke-image/2.0.3/index.native.cmd":{"requires":["npm/nuke-env/2.0.2/index.native.cmd"]},"npm/nuke-image/2.0.4/index.cmd":{"requires":["npm/nuke-env/2.0.2/index.cmd"]},"npm/nuke-image/2.0.4/index.native.cmd":{"requires":["npm/nuke-env/2.0.2/index.native.cmd"]},"npm/nuke-image/2.0.5/index.cmd":{"requires":[]},"npm/nuke-image/2.0.5/index.native.cmd":{"requires":[]},"npm/nuke-image/2.0.6/index.cmd":{"requires":[]},"npm/nuke-image/2.0.6/index.native.cmd":{"requires":[]}}
// {"framework" : "Rax"}
define("nuke-image",["rax"],function(t,e,o){o.exports=function(t){function e(r){if(o[r])return o[r].exports;var n=o[r]={exports:{},id:r,loaded:!1};return t[r].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var o={};return e.m=t,e.c=o,e.p="/build/",e(0)}([function(t,e,o){"use strict";function r(t,e){var o={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(o[r]=t[r]);return o}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(t[r]=o[r])}return t},l=function(){function t(t,e){for(var o=0;o<e.length;o++){var r=e[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,o,r){return o&&t(e.prototype,o),r&&t(e,r),e}}(),u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c=o(1),d="object"===("undefined"==typeof navigator?"undefined":u(navigator))&&("Mozilla"===navigator.appCodeName||"Gecko"===navigator.product),p=1,h=1,f=function(t){function e(t){n(this,e);var o=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return o.state={width:p,height:h},o.load=o.load.bind(o),o}return a(e,t),l(e,[{key:"convertToRem",value:function(t){var e=void 0;return e=d?document.documentElement.clientWidth*devicePixelRatio:WXEnvironment.deviceWidth,Math.round(750*t/e)}},{key:"load",value:function(t){var e=void 0,o=void 0;d?t.target&&(e=this.convertToRem(t.target.naturalWidth),o=this.convertToRem(t.target.naturalHeight),t.size={naturalWidth:e,naturalHeight:o}):t.size&&t.size.naturalWidth>0&&t.size.naturalHeight>0&&(e=this.convertToRem(t.size.naturalWidth),o=this.convertToRem(t.size.naturalHeight)),this.props.autoFit&&e&&o&&this.setState({width:e,height:o}),this.props.onLoad&&this.props.onLoad(t)}},{key:"render",value:function(){var t=this.props,e=t.style,o=t.autoFit,n=t.src,i=t.source,a=void 0===i?{}:i,l=t.resizeMode,u=(t.onLoad,r(t,["style","autoFit","src","source","resizeMode","onLoad"])),f=a.uri,y=a.width,v=void 0===y?p:y,b=a.height,g=void 0===b?h:b;if(!n&&!f)return null;var m=void 0;m=d?"img":"image";var w=s({src:n||f,quality:"original",style:s({width:o?this.state.width:v,height:o?this.state.height:g},e),onLoad:this.load},u);w.style.flex&&(w.style.width===p&&delete w.style.width,w.style.height===h&&delete w.style.height);var x=l||w.style.resizeMode;return x&&(d?(delete w.style.flex,w.style.width=w.style.width||"100%",w.style.height=w.style.height||"100%",w.style.objectFit=x):(w.resize=x,w.style.resizeMode=x)),(0,c.createElement)(m,w)}}]),e}(c.Component);f.propTypes={src:c.PropTypes.string,style:c.PropTypes.object},f.defaultProps={style:{},autoFit:!1},e.default=f,t.exports=e.default},function(e,o){e.exports=t("rax")}])});
define("nuke-image",["rax"],function(t,e,o){o.exports=function(t){function e(r){if(o[r])return o[r].exports;var n=o[r]={exports:{},id:r,loaded:!1};return t[r].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var o={};return e.m=t,e.c=o,e.p="/build/",e(0)}([function(t,e,o){"use strict";function r(t,e){var o={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(o[r]=t[r]);return o}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(t[r]=o[r])}return t},l=function(){function t(t,e){for(var o=0;o<e.length;o++){var r=e[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,o,r){return o&&t(e.prototype,o),r&&t(e,r),e}}(),u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c=o(1),d="object"===("undefined"==typeof navigator?"undefined":u(navigator))&&("Mozilla"===navigator.appCodeName||"Gecko"===navigator.product),p=1,h=1,f=function(t){function e(t){n(this,e);var o=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return o.state={width:p,height:h},o.load=o.load.bind(o),o}return a(e,t),l(e,[{key:"convertToRem",value:function(t){var e=void 0;return e=d?document.documentElement.clientWidth*devicePixelRatio:WXEnvironment.deviceWidth,Math.round(750*t/e)}},{key:"load",value:function(t){var e=void 0,o=void 0;d?t.target&&(e=this.convertToRem(t.target.naturalWidth),o=this.convertToRem(t.target.naturalHeight),t.size={naturalWidth:e,naturalHeight:o}):t.size&&t.size.naturalWidth>0&&t.size.naturalHeight>0&&(e=this.convertToRem(t.size.naturalWidth),o=this.convertToRem(t.size.naturalHeight)),this.props.autoFit&&e&&o&&this.setState({width:e,height:o}),this.props.onLoad&&this.props.onLoad(t)}},{key:"render",value:function(){var t=this.props,e=t.style,o=t.autoFit,n=t.src,i=t.source,a=void 0===i?{}:i,l=t.resizeMode,u=(t.onLoad,t.onPress),f=t.onClick,y=r(t,["style","autoFit","src","source","resizeMode","onLoad","onPress","onClick"]),v=a.uri,b=a.width,g=void 0===b?p:b,m=a.height,w=void 0===m?h:m;if(!n&&!v)return null;var x=void 0;x=d?"img":"image";var O=s({src:n||v,quality:"original",style:s({width:o?this.state.width:g,height:o?this.state.height:w},e),onLoad:this.load},y);(u||f)&&(O.onClick=u||f),O.style.flex&&(O.style.width===p&&delete O.style.width,O.style.height===h&&delete O.style.height);var j=l||O.style.resizeMode;return j&&(d?(delete O.style.flex,O.style.width=O.style.width||"100%",O.style.height=O.style.height||"100%",O.style.objectFit=j):(O.resize=j,O.style.resizeMode=j)),(0,c.createElement)(x,O)}}]),e}(c.Component);f.propTypes={src:c.PropTypes.string,style:c.PropTypes.object},f.defaultProps={style:{},autoFit:!1},e.default=f,t.exports=e.default},function(e,o){e.exports=t("rax")}])});
// {"framework" : "Rax"}
define("nuke-image",["rax"],function(t,e,o){o.exports=function(t){function e(r){if(o[r])return o[r].exports;var n=o[r]={exports:{},id:r,loaded:!1};return t[r].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var o={};return e.m=t,e.c=o,e.p="/build/",e(0)}([function(t,e,o){"use strict";function r(t,e){var o={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(o[r]=t[r]);return o}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(t[r]=o[r])}return t},l=function(){function t(t,e){for(var o=0;o<e.length;o++){var r=e[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,o,r){return o&&t(e.prototype,o),r&&t(e,r),e}}(),u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c=o(1),d="object"===("undefined"==typeof navigator?"undefined":u(navigator))&&("Mozilla"===navigator.appCodeName||"Gecko"===navigator.product),p=1,h=1,f=function(t){function e(t){n(this,e);var o=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return o.state={width:p,height:h},o.load=o.load.bind(o),o}return a(e,t),l(e,[{key:"convertToRem",value:function(t){var e=void 0;return e=d?document.documentElement.clientWidth*devicePixelRatio:WXEnvironment.deviceWidth,Math.round(750*t/e)}},{key:"load",value:function(t){var e=void 0,o=void 0;d?t.target&&(e=this.convertToRem(t.target.naturalWidth),o=this.convertToRem(t.target.naturalHeight),t.size={naturalWidth:e,naturalHeight:o}):t.size&&t.size.naturalWidth>0&&t.size.naturalHeight>0&&(e=this.convertToRem(t.size.naturalWidth),o=this.convertToRem(t.size.naturalHeight)),this.props.autoFit&&e&&o&&this.setState({width:e,height:o}),this.props.onLoad&&this.props.onLoad(t)}},{key:"render",value:function(){var t=this.props,e=t.style,o=t.autoFit,n=t.src,i=t.source,a=void 0===i?{}:i,l=t.resizeMode,u=(t.onLoad,r(t,["style","autoFit","src","source","resizeMode","onLoad"])),f=a.uri,y=a.width,v=void 0===y?p:y,b=a.height,g=void 0===b?h:b;if(!n&&!f)return null;var m=void 0;m=d?"img":"image";var w=s({src:n||f,quality:"original",style:s({width:o?this.state.width:v,height:o?this.state.height:g},e),onLoad:this.load},u);w.style.flex&&(w.style.width===p&&delete w.style.width,w.style.height===h&&delete w.style.height);var x=l||w.style.resizeMode;return x&&(d?(delete w.style.flex,w.style.width=w.style.width||"100%",w.style.height=w.style.height||"100%",w.style.objectFit=x):(w.resize=x,w.style.resizeMode=x)),(0,c.createElement)(m,w)}}]),e}(c.Component);f.propTypes={src:c.PropTypes.string,style:c.PropTypes.object},f.defaultProps={style:{},autoFit:!1},e.default=f,t.exports=e.default},function(e,o){e.exports=t("rax")}])});
define("nuke-image",["rax"],function(t,e,o){o.exports=function(t){function e(r){if(o[r])return o[r].exports;var n=o[r]={exports:{},id:r,loaded:!1};return t[r].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var o={};return e.m=t,e.c=o,e.p="/build/",e(0)}([function(t,e,o){"use strict";function r(t,e){var o={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(o[r]=t[r]);return o}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(t[r]=o[r])}return t},l=function(){function t(t,e){for(var o=0;o<e.length;o++){var r=e[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,o,r){return o&&t(e.prototype,o),r&&t(e,r),e}}(),u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c=o(1),d="object"===("undefined"==typeof navigator?"undefined":u(navigator))&&("Mozilla"===navigator.appCodeName||"Gecko"===navigator.product),p=1,h=1,f=function(t){function e(t){n(this,e);var o=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return o.state={width:p,height:h},o.load=o.load.bind(o),o}return a(e,t),l(e,[{key:"convertToRem",value:function(t){var e=void 0;return e=d?document.documentElement.clientWidth*devicePixelRatio:WXEnvironment.deviceWidth,Math.round(750*t/e)}},{key:"load",value:function(t){var e=void 0,o=void 0;d?t.target&&(e=this.convertToRem(t.target.naturalWidth),o=this.convertToRem(t.target.naturalHeight),t.size={naturalWidth:e,naturalHeight:o}):t.size&&t.size.naturalWidth>0&&t.size.naturalHeight>0&&(e=this.convertToRem(t.size.naturalWidth),o=this.convertToRem(t.size.naturalHeight)),this.props.autoFit&&e&&o&&this.setState({width:e,height:o}),this.props.onLoad&&this.props.onLoad(t)}},{key:"render",value:function(){var t=this.props,e=t.style,o=t.autoFit,n=t.src,i=t.source,a=void 0===i?{}:i,l=t.resizeMode,u=(t.onLoad,t.onPress),f=t.onClick,y=r(t,["style","autoFit","src","source","resizeMode","onLoad","onPress","onClick"]),v=a.uri,b=a.width,g=void 0===b?p:b,m=a.height,w=void 0===m?h:m;if(!n&&!v)return null;var x=void 0;x=d?"img":"image";var O=s({src:n||v,quality:"original",style:s({width:o?this.state.width:g,height:o?this.state.height:w},e),onLoad:this.load},y);(u||f)&&(O.onClick=u||f),O.style.flex&&(O.style.width===p&&delete O.style.width,O.style.height===h&&delete O.style.height);var j=l||O.style.resizeMode;return j&&(d?(delete O.style.flex,O.style.width=O.style.width||"100%",O.style.height=O.style.height||"100%",O.style.objectFit=j):(O.resize=j,O.style.resizeMode=j)),(0,c.createElement)(x,O)}}]),e}(c.Component);f.propTypes={src:c.PropTypes.string,style:c.PropTypes.object},f.defaultProps={style:{},autoFit:!1},e.default=f,t.exports=e.default},function(e,o){e.exports=t("rax")}])});
// {"framework" : "Rax"}
define("nuke-image",["rax"],function(t,e,o){o.exports=function(t){function e(r){if(o[r])return o[r].exports;var n=o[r]={exports:{},id:r,loaded:!1};return t[r].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var o={};return e.m=t,e.c=o,e.p="/build/",e(0)}([function(t,e,o){"use strict";function r(t,e){var o={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(o[r]=t[r]);return o}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(t[r]=o[r])}return t},l=function(){function t(t,e){for(var o=0;o<e.length;o++){var r=e[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,o,r){return o&&t(e.prototype,o),r&&t(e,r),e}}(),u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c=o(1),d="object"===("undefined"==typeof navigator?"undefined":u(navigator))&&("Mozilla"===navigator.appCodeName||"Gecko"===navigator.product),p=1,h=1,f=function(t){function e(t){n(this,e);var o=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return o.state={width:p,height:h},o.load=o.load.bind(o),o}return a(e,t),l(e,[{key:"convertToRem",value:function(t){var e=void 0;return e=d?document.documentElement.clientWidth*devicePixelRatio:WXEnvironment.deviceWidth,Math.round(750*t/e)}},{key:"load",value:function(t){var e=void 0,o=void 0;d?t.target&&(e=this.convertToRem(t.target.naturalWidth),o=this.convertToRem(t.target.naturalHeight),t.size={naturalWidth:e,naturalHeight:o}):t.size&&t.size.naturalWidth>0&&t.size.naturalHeight>0&&(e=this.convertToRem(t.size.naturalWidth),o=this.convertToRem(t.size.naturalHeight)),this.props.autoFit&&e&&o&&this.setState({width:e,height:o}),this.props.onLoad&&this.props.onLoad(t)}},{key:"render",value:function(){var t=this.props,e=t.style,o=t.autoFit,n=t.src,i=t.source,a=void 0===i?{}:i,l=t.resizeMode,u=(t.onLoad,r(t,["style","autoFit","src","source","resizeMode","onLoad"])),f=a.uri,y=a.width,v=void 0===y?p:y,b=a.height,g=void 0===b?h:b;if(!n&&!f)return null;var m=void 0;m=d?"img":"image";var w=s({src:n||f,quality:"original",style:s({width:o?this.state.width:v,height:o?this.state.height:g},e),onLoad:this.load},u);w.style.flex&&(w.style.width===p&&delete w.style.width,w.style.height===h&&delete w.style.height);var x=l||w.style.resizeMode;return x&&(d?(delete w.style.flex,w.style.width=w.style.width||"100%",w.style.height=w.style.height||"100%",w.style.objectFit=x):(w.resize=x,w.style.resizeMode=x)),(0,c.createElement)(m,w)}}]),e}(c.Component);f.propTypes={src:c.PropTypes.string,style:c.PropTypes.object},f.defaultProps={style:{},autoFit:!1},e.default=f,t.exports=e.default},function(e,o){e.exports=t("rax")}])});
define("nuke-image",["rax"],function(t,e,o){o.exports=function(t){function e(r){if(o[r])return o[r].exports;var n=o[r]={exports:{},id:r,loaded:!1};return t[r].call(n.exports,n,n.exports,e),n.loaded=!0,n.exports}var o={};return e.m=t,e.c=o,e.p="/build/",e(0)}([function(t,e,o){"use strict";function r(t,e){var o={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(o[r]=t[r]);return o}function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(t[r]=o[r])}return t},l=function(){function t(t,e){for(var o=0;o<e.length;o++){var r=e[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,o,r){return o&&t(e.prototype,o),r&&t(e,r),e}}(),u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c=o(1),d="object"===("undefined"==typeof navigator?"undefined":u(navigator))&&("Mozilla"===navigator.appCodeName||"Gecko"===navigator.product),p=1,h=1,f=function(t){function e(t){n(this,e);var o=i(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return o.state={width:p,height:h},o.load=o.load.bind(o),o}return a(e,t),l(e,[{key:"convertToRem",value:function(t){var e=void 0;return e=d?document.documentElement.clientWidth*devicePixelRatio:WXEnvironment.deviceWidth,Math.round(750*t/e)}},{key:"load",value:function(t){var e=void 0,o=void 0;d?t.target&&(e=this.convertToRem(t.target.naturalWidth),o=this.convertToRem(t.target.naturalHeight),t.size={naturalWidth:e,naturalHeight:o}):t.size&&t.size.naturalWidth>0&&t.size.naturalHeight>0&&(e=this.convertToRem(t.size.naturalWidth),o=this.convertToRem(t.size.naturalHeight)),this.props.autoFit&&e&&o&&this.setState({width:e,height:o}),this.props.onLoad&&this.props.onLoad(t)}},{key:"render",value:function(){var t=this.props,e=t.style,o=t.autoFit,n=t.src,i=t.source,a=void 0===i?{}:i,l=t.resizeMode,u=(t.onLoad,t.onPress),f=t.onClick,y=r(t,["style","autoFit","src","source","resizeMode","onLoad","onPress","onClick"]),v=a.uri,b=a.width,g=void 0===b?p:b,m=a.height,w=void 0===m?h:m;if(!n&&!v)return null;var x=void 0;x=d?"img":"image";var O=s({src:n||v,quality:"original",style:s({width:o?this.state.width:g,height:o?this.state.height:w},e),onLoad:this.load},y);(u||f)&&(O.onClick=u||f),O.style.flex&&(O.style.width===p&&delete O.style.width,O.style.height===h&&delete O.style.height);var j=l||O.style.resizeMode;return j&&(d?(delete O.style.flex,O.style.width=O.style.width||"100%",O.style.height=O.style.height||"100%",O.style.objectFit=j):(O.resize=j,O.style.resizeMode=j)),(0,c.createElement)(x,O)}}]),e}(c.Component);f.propTypes={src:c.PropTypes.string,style:c.PropTypes.object},f.defaultProps={style:{},autoFit:!1},e.default=f,t.exports=e.default},function(e,o){e.exports=t("rax")}])});

@@ -1,1 +0,1 @@

{"npm/nuke-env/2.0.2/index.cmd":{"requires":[]},"npm/nuke-env/2.0.2/index.native.cmd":{"requires":[]},"npm/nuke-view/2.0.2/index.cmd":{"requires":[]},"npm/nuke-image/2.0.0/index.native.cmd":{"requires":["npm/nuke-env/2.0.2/index.native.cmd","npm/nuke-view/2.0.2/index.cmd"]},"npm/nuke-image/2.0.0/index.cmd":{"requires":["npm/nuke-env/2.0.2/index.cmd","npm/nuke-view/2.0.2/index.cmd"]},"npm/nuke-image/2.0.1/index.native.cmd":{"requires":["npm/nuke-env/2.0.2/index.native.cmd","npm/nuke-view/2.0.2/index.cmd"]},"npm/nuke-image/2.0.1/index.cmd":{"requires":["npm/nuke-env/2.0.2/index.cmd","npm/nuke-view/2.0.2/index.cmd"]},"npm/nuke-image/2.0.2/index.cmd":{"requires":["npm/nuke-env/2.0.2/index.cmd"]},"npm/nuke-image/2.0.2/index.native.cmd":{"requires":["npm/nuke-env/2.0.2/index.native.cmd"]},"npm/nuke-image/2.0.3/index.cmd":{"requires":["npm/nuke-env/2.0.2/index.cmd"]},"npm/nuke-image/2.0.3/index.native.cmd":{"requires":["npm/nuke-env/2.0.2/index.native.cmd"]},"npm/nuke-image/2.0.4/index.cmd":{"requires":["npm/nuke-env/2.0.2/index.cmd"]},"npm/nuke-image/2.0.4/index.native.cmd":{"requires":["npm/nuke-env/2.0.2/index.native.cmd"]},"npm/nuke-image/2.0.5/index.cmd":{"requires":[]},"npm/nuke-image/2.0.5/index.native.cmd":{"requires":[]}}
{"npm/nuke-env/2.0.2/index.cmd":{"requires":[]},"npm/nuke-env/2.0.2/index.native.cmd":{"requires":[]},"npm/nuke-view/2.0.2/index.cmd":{"requires":[]},"npm/nuke-image/2.0.0/index.native.cmd":{"requires":["npm/nuke-env/2.0.2/index.native.cmd","npm/nuke-view/2.0.2/index.cmd"]},"npm/nuke-image/2.0.0/index.cmd":{"requires":["npm/nuke-env/2.0.2/index.cmd","npm/nuke-view/2.0.2/index.cmd"]},"npm/nuke-image/2.0.1/index.native.cmd":{"requires":["npm/nuke-env/2.0.2/index.native.cmd","npm/nuke-view/2.0.2/index.cmd"]},"npm/nuke-image/2.0.1/index.cmd":{"requires":["npm/nuke-env/2.0.2/index.cmd","npm/nuke-view/2.0.2/index.cmd"]},"npm/nuke-image/2.0.2/index.cmd":{"requires":["npm/nuke-env/2.0.2/index.cmd"]},"npm/nuke-image/2.0.2/index.native.cmd":{"requires":["npm/nuke-env/2.0.2/index.native.cmd"]},"npm/nuke-image/2.0.3/index.cmd":{"requires":["npm/nuke-env/2.0.2/index.cmd"]},"npm/nuke-image/2.0.3/index.native.cmd":{"requires":["npm/nuke-env/2.0.2/index.native.cmd"]},"npm/nuke-image/2.0.4/index.cmd":{"requires":["npm/nuke-env/2.0.2/index.cmd"]},"npm/nuke-image/2.0.4/index.native.cmd":{"requires":["npm/nuke-env/2.0.2/index.native.cmd"]},"npm/nuke-image/2.0.5/index.cmd":{"requires":[]},"npm/nuke-image/2.0.5/index.native.cmd":{"requires":[]},"npm/nuke-image/2.0.6/index.cmd":{"requires":[]},"npm/nuke-image/2.0.6/index.native.cmd":{"requires":[]}}
# Image Demo
* order: 0
- order: 0

@@ -52,3 +52,3 @@ 自适应宽高、强制设置宽高 demo

newData[index].height = Math.round(
600 * e.size.naturalHeight / e.size.naturalWidth
(600 * e.size.naturalHeight) / e.size.naturalWidth
);

@@ -74,2 +74,5 @@ } else {

}}
onPress={() => {
alert('333');
}}
/>

@@ -76,0 +79,0 @@ </View>

# Changelog
## 2.0.6 / 2018-07-05
* [[71b434b](http://gitlab.alibaba-inc.com/nuke/image/commit/71b434b35ad73b85034d3c3c2a2a7d6b2b90ea99)] - `fix` fix onPress event rename
## 2.0.5 / 2018-05-15

@@ -5,0 +9,0 @@

@@ -100,3 +100,5 @@ /* @jsx createElement */

onLoad = _props.onLoad,
others = _objectWithoutProperties(_props, ['style', 'autoFit', 'src', 'source', 'resizeMode', 'onLoad']);
onPress = _props.onPress,
onClick = _props.onClick,
others = _objectWithoutProperties(_props, ['style', 'autoFit', 'src', 'source', 'resizeMode', 'onLoad', 'onPress', 'onClick']);

@@ -130,2 +132,5 @@ var uri = source.uri,

}, others);
if (onPress || onClick) {
nativeProps.onClick = onPress || onClick;
}
/**

@@ -132,0 +137,0 @@ * if flex is defined, delete width 1, height 1

{
"name": "nuke-image",
"version": "2.0.5",
"version": "2.0.6",
"description": "图片",

@@ -63,5 +63,5 @@ "main": "lib/index",

"publishConfig": {
"registry": "http://registry.npmjs.org"
"registry": "https://registry.npmjs.org"
},
"license": "Apache"
}

@@ -70,2 +70,4 @@ /* @jsx createElement */

onLoad,
onPress,
onClick,
...others

@@ -102,2 +104,5 @@ } = this.props;

};
if (onPress || onClick) {
nativeProps.onClick = onPress || onClick;
}
/**

@@ -104,0 +109,0 @@ * if flex is defined, delete width 1, height 1

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc