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

nuke-text

Package Overview
Dependencies
Maintainers
2
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nuke-text - npm Package Compare versions

Comparing version 2.0.5 to 2.0.6

2

build/deps.json

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

{"npm/nuke-helper/2.0.2/index.cmd":{"requires":[]},"npm/nuke-helper/2.0.2/index.native.cmd":{"requires":[]},"npm/nuke-helper/2.0.3/index.cmd":{"requires":[]},"npm/nuke-helper/2.0.3/index.native.cmd":{"requires":[]},"npm/nuke-text/2.0.3/index.cmd":{"requires":["npm/nuke-helper/2.0.3/index.cmd"]},"npm/nuke-text/2.0.3/index.native.cmd":{"requires":["npm/nuke-helper/2.0.3/index.native.cmd"]},"npm/nuke-text/2.0.4/index.native.cmd":{"requires":["npm/nuke-helper/2.0.3/index.native.cmd"]},"npm/nuke-text/2.0.4/index.cmd":{"requires":["npm/nuke-helper/2.0.3/index.cmd"]},"npm/nuke-text/2.0.5/index.cmd":{"requires":["npm/nuke-helper/2.0.3/index.cmd"]},"npm/nuke-text/2.0.5/index.native.cmd":{"requires":["npm/nuke-helper/2.0.3/index.native.cmd"]}}
{"npm/nuke-helper/2.0.2/index.cmd":{"requires":[]},"npm/nuke-helper/2.0.2/index.native.cmd":{"requires":[]},"npm/nuke-helper/2.0.3/index.cmd":{"requires":[]},"npm/nuke-helper/2.0.3/index.native.cmd":{"requires":[]},"npm/nuke-text/2.0.3/index.cmd":{"requires":["npm/nuke-helper/2.0.3/index.cmd"]},"npm/nuke-text/2.0.3/index.native.cmd":{"requires":["npm/nuke-helper/2.0.3/index.native.cmd"]},"npm/nuke-text/2.0.4/index.native.cmd":{"requires":["npm/nuke-helper/2.0.3/index.native.cmd"]},"npm/nuke-text/2.0.4/index.cmd":{"requires":["npm/nuke-helper/2.0.3/index.cmd"]},"npm/nuke-text/2.0.5/index.cmd":{"requires":["npm/nuke-helper/2.0.3/index.cmd"]},"npm/nuke-text/2.0.5/index.native.cmd":{"requires":["npm/nuke-helper/2.0.3/index.native.cmd"]},"npm/nuke-text/2.0.6/index.cmd":{"requires":["npm/nuke-helper/2.0.3/index.cmd"]}}
// {"framework" : "Rax"}
define("nuke-text",["rax"],function(e,t,n){n.exports=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="/build/",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(1),c=n(2),u=r(c),y=n(3),d=r(y),h=function(e){return Math.ceil(9.24*Math.pow(10,-5)*Math.pow(e,2)+1.492*e+2.174)},b="function"!=typeof callNative,v=function(e){function t(e,n){i(this,t);var r=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.fixedFont=n.commonConfigs&&n.commonConfigs.fixedFont,r.optimizeLineHeight=n.commonConfigs&&n.commonConfigs.optimizeLineHeight,"fixedFont"in e&&(r.fixedFont=e.fixedFont),"optimizeLineHeight"in e&&(r.optimizeLineHeight=e.optimizeLineHeight),r}return f(t,e),s(t,[{key:"calcLineHeight",value:function(e){var t=this.props.lineHeightOptimizer,n=parseInt(e.fontSize,10),r=t(n);return r&&!e.lineHeight&&(this.fixedFont&&"number"==typeof r?e.lineHeight=r+(b?"px":"wx"):e.lineHeight=r),e}},{key:"render",value:function(){var e=this.props,t=e.onPress,n=e.onClick,r=e.style,i=o(e,["onPress","onClick","style"]),a=Object.assign({fontSize:32,wordWrap:"break-word"},r);return a=this.fixedFont?(0,u.default)(a):a,a=this.optimizeLineHeight?this.calcLineHeight(a):a,(0,l.createElement)(d.default,p({},i,{style:a,onClick:t||n}))}}]),t}(l.Component);v.contextTypes={androidConfigs:l.PropTypes.any,commonConfigs:l.PropTypes.any},v.propTypes={optimizeLineHeight:l.PropTypes.boolean,fixedFont:l.PropTypes.boolean,style:l.PropTypes.any,onPress:l.PropTypes.func,onClick:l.PropTypes.func,lineHeightOptimizer:l.PropTypes.func},v.defaultProps={style:{},lineHeightOptimizer:h},t.default=v,e.exports=t.default},function(t,n){t.exports=e("rax")},function(e,t){"use strict";function n(e){var t=r({},e),n=e.fontSize;return("string"==typeof n&&n.indexOf("rem")>0||"number"==typeof n)&&(n=parseInt(n,10)),"string"==typeof n&&n.indexOf("px")>0&&(n=2*parseInt(n,10)),t.fontSize=n,t}Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o="function"!=typeof callNative,i=void 0;if(o)i=navigator.userAgent.indexOf("iPad")>-1;else{var a="string"!=typeof WXEnvironment?WXEnvironment:{};i="ios"===a.platform.toLowerCase()&&a.deviceModel.toLowerCase().indexOf("ipad")>-1}t.default=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e||!e.fontSize||!t)return e;if(i&&a)return n(e);var f=r({},e),p=e.fontSize;return("string"==typeof p&&p.indexOf("rem")>0||"number"==typeof p)&&(p=Math.floor(parseInt(p,10)/2)),"string"==typeof p&&p.indexOf("px")>0&&(p=parseInt(p,10)),f.fontSize=p+(o?"px":"wx"),f},e.exports=t.default},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e,t){var n=e.type,r=e.props,o=r.children;if("function"==typeof n){var i=new n;return i.props=r,o&&(i.props.children=f(o,t)),i.context=t.getChildContext(),i.render()}return e}function f(e,t){var n=[];Array.isArray(e)||(e=[e]);for(var r=0;r<e.length;r++){var o=e[r];"string"==typeof o?n.push(o):"object"===("undefined"==typeof o?"undefined":p(o))&&n.push(a(o,t))}return n}Object.defineProperty(t,"__esModule",{value:!0});var p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),u="function"==typeof callNative,y=function(e){function t(){var e,n,i,a;r(this,t);for(var p=arguments.length,l=Array(p),y=0;y<p;y++)l[y]=arguments[y];return n=i=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),i.renderText=function(){var e=i.props,t=s({},e,{style:e.style||{}}),n="";if(null!=e.children&&(n=Array.isArray(e.children)?e.children.join(""):e.children.toString()),i.context.isInAParentText)return(0,c.createElement)("span",t,n);if(e.onPress&&(t.onClick=e.onPress),u)return e.numberOfLines&&(t.style.lines=e.numberOfLines),t.value=n,(0,c.createElement)("text",t);var r=s({},d.text,t.style),o=e.numberOfLines;return o&&(1===parseInt(o)?r.whiteSpace="nowrap":(r.display="-webkit-box",r.webkitBoxOrient="vertical",r.webkitLineClamp=String(o)),r.overflow="hidden"),(0,c.createElement)("span",s({},t,{style:r}),n)},i.renderRichText=function(){var e=i.props,t=e.children,n=s({},e,{style:e.style||{}}),r=s({},d.richtext,n.style);return u&&(t=f(t,i)),(0,c.createElement)("p",s({},n,{style:r}),t)},a=n,o(i,a)}return i(t,e),l(t,[{key:"getChildContext",value:function(){return{isInAParentText:!0}}},{key:"render",value:function(){var e=this.props,t=e.children;Array.isArray(t)||(t=[t]);for(var n=!1,r=0;r<t.length;r++){var o=t[r];if(o&&"object"===("undefined"==typeof o?"undefined":p(o))){n=!0;break}}return n?this.renderRichText():this.renderText()}}]),t}(c.Component);y.propTypes={},y.contextTypes={isInAParentText:c.PropTypes.bool},y.childContextTypes={isInAParentText:c.PropTypes.bool};var d={text:{border:"0 solid black",position:"relative",boxSizing:"border-box",display:"block",flexDirection:"column",alignContent:"flex-start",flexShrink:0,fontSize:32},richtext:{marginTop:0,marginBottom:0}};t.default=y,e.exports=t.default}])});
define("nuke-text",["rax"],function(e,t,n){n.exports=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="/build/",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=n(1),s=n(!function(){var e=new Error('Cannot find module "nuke-helper/src/calc-fixed-font"');throw e.code="MODULE_NOT_FOUND",e}()),u=r(s),y=n(2),h=r(y),d=function(e){return Math.ceil(9.24*Math.pow(10,-5)*Math.pow(e,2)+1.492*e+2.174)},b="function"!=typeof callNative,m=function(e){function t(e,n){i(this,t);var r=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.fixedFont=n.commonConfigs&&n.commonConfigs.fixedFont,r.optimizeLineHeight=n.commonConfigs&&n.commonConfigs.optimizeLineHeight,"fixedFont"in e&&(r.fixedFont=e.fixedFont),"optimizeLineHeight"in e&&(r.optimizeLineHeight=e.optimizeLineHeight),r}return l(t,e),p(t,[{key:"calcLineHeight",value:function(e){var t=this.props.lineHeightOptimizer,n=parseInt(e.fontSize,10),r=t(n);return r&&!e.lineHeight&&(this.fixedFont&&"number"==typeof r?e.lineHeight=r+(b?"px":"wx"):e.lineHeight=r),e}},{key:"render",value:function(){var e=this.props,t=e.onPress,n=e.onClick,r=e.style,i=o(e,["onPress","onClick","style"]),a=Object.assign({fontSize:32,wordWrap:"break-word"},r);return delete i.optimizeLineHeight,a=this.fixedFont?(0,u.default)(a):a,a=this.optimizeLineHeight?this.calcLineHeight(a):a,(0,f.createElement)(h.default,c({},i,{style:a,onClick:t||n}))}}]),t}(f.Component);m.contextTypes={androidConfigs:f.PropTypes.any,commonConfigs:f.PropTypes.any},m.propTypes={optimizeLineHeight:f.PropTypes.boolean,fixedFont:f.PropTypes.boolean,style:f.PropTypes.any,onPress:f.PropTypes.func,onClick:f.PropTypes.func,lineHeightOptimizer:f.PropTypes.func},m.defaultProps={style:{},lineHeightOptimizer:d},t.default=m,e.exports=t.default},function(t,n){t.exports=e("rax")},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e,t){var n=e.type,r=e.props,o=r.children;if("function"==typeof n){var i=new n;return i.props=r,o&&(i.props.children=l(o,t)),i.context=t.getChildContext(),i.render()}return e}function l(e,t){var n=[];Array.isArray(e)||(e=[e]);for(var r=0;r<e.length;r++){var o=e[r];"string"==typeof o?n.push(o):"object"===("undefined"==typeof o?"undefined":c(o))&&n.push(a(o,t))}return n}Object.defineProperty(t,"__esModule",{value:!0});var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),u="function"==typeof callNative,y=function(e){function t(){var e,n,i,a;r(this,t);for(var c=arguments.length,f=Array(c),y=0;y<c;y++)f[y]=arguments[y];return n=i=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(f))),i.renderText=function(){var e=i.props,t=p({},e,{style:e.style||{}}),n="";if(null!=e.children&&(n=Array.isArray(e.children)?e.children.join(""):e.children.toString()),i.context.isInAParentText)return(0,s.createElement)("span",t,n);if(e.onPress&&(t.onClick=e.onPress),u)return e.numberOfLines&&(t.style.lines=e.numberOfLines),t.value=n,(0,s.createElement)("text",t);var r=p({},h.text,t.style),o=e.numberOfLines;return o&&(1===parseInt(o)?r.whiteSpace="nowrap":(r.display="-webkit-box",r.webkitBoxOrient="vertical",r.webkitLineClamp=String(o)),r.overflow="hidden"),(0,s.createElement)("span",p({},t,{style:r}),n)},i.renderRichText=function(){var e=i.props,t=e.children,n=p({},e,{style:e.style||{}}),r=p({},h.richtext,n.style);return u&&(t=l(t,i)),(0,s.createElement)("p",p({},n,{style:r}),t)},a=n,o(i,a)}return i(t,e),f(t,[{key:"getChildContext",value:function(){return{isInAParentText:!0}}},{key:"render",value:function(){var e=this.props,t=e.children;Array.isArray(t)||(t=[t]);for(var n=!1,r=0;r<t.length;r++){var o=t[r];if(o&&"object"===("undefined"==typeof o?"undefined":c(o))){n=!0;break}}return n?this.renderRichText():this.renderText()}}]),t}(s.Component);y.propTypes={},y.contextTypes={isInAParentText:s.PropTypes.bool},y.childContextTypes={isInAParentText:s.PropTypes.bool};var h={text:{border:"0 solid black",position:"relative",boxSizing:"border-box",display:"block",flexDirection:"column",alignContent:"flex-start",flexShrink:0,fontSize:32},richtext:{marginTop:0,marginBottom:0}};t.default=y,e.exports=t.default}])});
// {"framework" : "Rax"}
define("nuke-text",["rax"],function(e,t,n){n.exports=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="/build/",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(1),c=n(2),u=r(c),y=n(3),d=r(y),h=function(e){return Math.ceil(9.24*Math.pow(10,-5)*Math.pow(e,2)+1.492*e+2.174)},b="function"!=typeof callNative,v=function(e){function t(e,n){i(this,t);var r=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.fixedFont=n.commonConfigs&&n.commonConfigs.fixedFont,r.optimizeLineHeight=n.commonConfigs&&n.commonConfigs.optimizeLineHeight,"fixedFont"in e&&(r.fixedFont=e.fixedFont),"optimizeLineHeight"in e&&(r.optimizeLineHeight=e.optimizeLineHeight),r}return f(t,e),s(t,[{key:"calcLineHeight",value:function(e){var t=this.props.lineHeightOptimizer,n=parseInt(e.fontSize,10),r=t(n);return r&&!e.lineHeight&&(this.fixedFont&&"number"==typeof r?e.lineHeight=r+(b?"px":"wx"):e.lineHeight=r),e}},{key:"render",value:function(){var e=this.props,t=e.onPress,n=e.onClick,r=e.style,i=o(e,["onPress","onClick","style"]),a=Object.assign({fontSize:32,wordWrap:"break-word"},r);return a=this.fixedFont?(0,u.default)(a):a,a=this.optimizeLineHeight?this.calcLineHeight(a):a,(0,l.createElement)(d.default,p({},i,{style:a,onClick:t||n}))}}]),t}(l.Component);v.contextTypes={androidConfigs:l.PropTypes.any,commonConfigs:l.PropTypes.any},v.propTypes={optimizeLineHeight:l.PropTypes.boolean,fixedFont:l.PropTypes.boolean,style:l.PropTypes.any,onPress:l.PropTypes.func,onClick:l.PropTypes.func,lineHeightOptimizer:l.PropTypes.func},v.defaultProps={style:{},lineHeightOptimizer:h},t.default=v,e.exports=t.default},function(t,n){t.exports=e("rax")},function(e,t){"use strict";function n(e){var t=r({},e),n=e.fontSize;return("string"==typeof n&&n.indexOf("rem")>0||"number"==typeof n)&&(n=parseInt(n,10)),"string"==typeof n&&n.indexOf("px")>0&&(n=2*parseInt(n,10)),t.fontSize=n,t}Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o="function"!=typeof callNative,i=void 0;if(o)i=navigator.userAgent.indexOf("iPad")>-1;else{var a="string"!=typeof WXEnvironment?WXEnvironment:{};i="ios"===a.platform.toLowerCase()&&a.deviceModel.toLowerCase().indexOf("ipad")>-1}t.default=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e||!e.fontSize||!t)return e;if(i&&a)return n(e);var f=r({},e),p=e.fontSize;return("string"==typeof p&&p.indexOf("rem")>0||"number"==typeof p)&&(p=Math.floor(parseInt(p,10)/2)),"string"==typeof p&&p.indexOf("px")>0&&(p=parseInt(p,10)),f.fontSize=p+(o?"px":"wx"),f},e.exports=t.default},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e,t){var n=e.type,r=e.props,o=r.children;if("function"==typeof n){var i=new n;return i.props=r,o&&(i.props.children=f(o,t)),i.context=t.getChildContext(),i.render()}return e}function f(e,t){var n=[];Array.isArray(e)||(e=[e]);for(var r=0;r<e.length;r++){var o=e[r];"string"==typeof o?n.push(o):"object"===("undefined"==typeof o?"undefined":p(o))&&n.push(a(o,t))}return n}Object.defineProperty(t,"__esModule",{value:!0});var p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),u="function"==typeof callNative,y=function(e){function t(){var e,n,i,a;r(this,t);for(var p=arguments.length,l=Array(p),y=0;y<p;y++)l[y]=arguments[y];return n=i=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),i.renderText=function(){var e=i.props,t=s({},e,{style:e.style||{}}),n="";if(null!=e.children&&(n=Array.isArray(e.children)?e.children.join(""):e.children.toString()),i.context.isInAParentText)return(0,c.createElement)("span",t,n);if(e.onPress&&(t.onClick=e.onPress),u)return e.numberOfLines&&(t.style.lines=e.numberOfLines),t.value=n,(0,c.createElement)("text",t);var r=s({},d.text,t.style),o=e.numberOfLines;return o&&(1===parseInt(o)?r.whiteSpace="nowrap":(r.display="-webkit-box",r.webkitBoxOrient="vertical",r.webkitLineClamp=String(o)),r.overflow="hidden"),(0,c.createElement)("span",s({},t,{style:r}),n)},i.renderRichText=function(){var e=i.props,t=e.children,n=s({},e,{style:e.style||{}}),r=s({},d.richtext,n.style);return u&&(t=f(t,i)),(0,c.createElement)("p",s({},n,{style:r}),t)},a=n,o(i,a)}return i(t,e),l(t,[{key:"getChildContext",value:function(){return{isInAParentText:!0}}},{key:"render",value:function(){var e=this.props,t=e.children;Array.isArray(t)||(t=[t]);for(var n=!1,r=0;r<t.length;r++){var o=t[r];if(o&&"object"===("undefined"==typeof o?"undefined":p(o))){n=!0;break}}return n?this.renderRichText():this.renderText()}}]),t}(c.Component);y.propTypes={},y.contextTypes={isInAParentText:c.PropTypes.bool},y.childContextTypes={isInAParentText:c.PropTypes.bool};var d={text:{border:"0 solid black",position:"relative",boxSizing:"border-box",display:"block",flexDirection:"column",alignContent:"flex-start",flexShrink:0,fontSize:32},richtext:{marginTop:0,marginBottom:0}};t.default=y,e.exports=t.default}])});
define("nuke-text",["rax"],function(e,t,n){n.exports=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="/build/",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=n(1),s=n(!function(){var e=new Error('Cannot find module "nuke-helper/src/calc-fixed-font"');throw e.code="MODULE_NOT_FOUND",e}()),u=r(s),y=n(2),h=r(y),d=function(e){return Math.ceil(9.24*Math.pow(10,-5)*Math.pow(e,2)+1.492*e+2.174)},b="function"!=typeof callNative,m=function(e){function t(e,n){i(this,t);var r=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.fixedFont=n.commonConfigs&&n.commonConfigs.fixedFont,r.optimizeLineHeight=n.commonConfigs&&n.commonConfigs.optimizeLineHeight,"fixedFont"in e&&(r.fixedFont=e.fixedFont),"optimizeLineHeight"in e&&(r.optimizeLineHeight=e.optimizeLineHeight),r}return l(t,e),p(t,[{key:"calcLineHeight",value:function(e){var t=this.props.lineHeightOptimizer,n=parseInt(e.fontSize,10),r=t(n);return r&&!e.lineHeight&&(this.fixedFont&&"number"==typeof r?e.lineHeight=r+(b?"px":"wx"):e.lineHeight=r),e}},{key:"render",value:function(){var e=this.props,t=e.onPress,n=e.onClick,r=e.style,i=o(e,["onPress","onClick","style"]),a=Object.assign({fontSize:32,wordWrap:"break-word"},r);return delete i.optimizeLineHeight,a=this.fixedFont?(0,u.default)(a):a,a=this.optimizeLineHeight?this.calcLineHeight(a):a,(0,f.createElement)(h.default,c({},i,{style:a,onClick:t||n}))}}]),t}(f.Component);m.contextTypes={androidConfigs:f.PropTypes.any,commonConfigs:f.PropTypes.any},m.propTypes={optimizeLineHeight:f.PropTypes.boolean,fixedFont:f.PropTypes.boolean,style:f.PropTypes.any,onPress:f.PropTypes.func,onClick:f.PropTypes.func,lineHeightOptimizer:f.PropTypes.func},m.defaultProps={style:{},lineHeightOptimizer:d},t.default=m,e.exports=t.default},function(t,n){t.exports=e("rax")},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e,t){var n=e.type,r=e.props,o=r.children;if("function"==typeof n){var i=new n;return i.props=r,o&&(i.props.children=l(o,t)),i.context=t.getChildContext(),i.render()}return e}function l(e,t){var n=[];Array.isArray(e)||(e=[e]);for(var r=0;r<e.length;r++){var o=e[r];"string"==typeof o?n.push(o):"object"===("undefined"==typeof o?"undefined":c(o))&&n.push(a(o,t))}return n}Object.defineProperty(t,"__esModule",{value:!0});var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),u="function"==typeof callNative,y=function(e){function t(){var e,n,i,a;r(this,t);for(var c=arguments.length,f=Array(c),y=0;y<c;y++)f[y]=arguments[y];return n=i=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(f))),i.renderText=function(){var e=i.props,t=p({},e,{style:e.style||{}}),n="";if(null!=e.children&&(n=Array.isArray(e.children)?e.children.join(""):e.children.toString()),i.context.isInAParentText)return(0,s.createElement)("span",t,n);if(e.onPress&&(t.onClick=e.onPress),u)return e.numberOfLines&&(t.style.lines=e.numberOfLines),t.value=n,(0,s.createElement)("text",t);var r=p({},h.text,t.style),o=e.numberOfLines;return o&&(1===parseInt(o)?r.whiteSpace="nowrap":(r.display="-webkit-box",r.webkitBoxOrient="vertical",r.webkitLineClamp=String(o)),r.overflow="hidden"),(0,s.createElement)("span",p({},t,{style:r}),n)},i.renderRichText=function(){var e=i.props,t=e.children,n=p({},e,{style:e.style||{}}),r=p({},h.richtext,n.style);return u&&(t=l(t,i)),(0,s.createElement)("p",p({},n,{style:r}),t)},a=n,o(i,a)}return i(t,e),f(t,[{key:"getChildContext",value:function(){return{isInAParentText:!0}}},{key:"render",value:function(){var e=this.props,t=e.children;Array.isArray(t)||(t=[t]);for(var n=!1,r=0;r<t.length;r++){var o=t[r];if(o&&"object"===("undefined"==typeof o?"undefined":c(o))){n=!0;break}}return n?this.renderRichText():this.renderText()}}]),t}(s.Component);y.propTypes={},y.contextTypes={isInAParentText:s.PropTypes.bool},y.childContextTypes={isInAParentText:s.PropTypes.bool};var h={text:{border:"0 solid black",position:"relative",boxSizing:"border-box",display:"block",flexDirection:"column",alignContent:"flex-start",flexShrink:0,fontSize:32},richtext:{marginTop:0,marginBottom:0}};t.default=y,e.exports=t.default}])});
// {"framework" : "Rax"}
define("nuke-text",["rax"],function(e,t,n){n.exports=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="/build/",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(1),c=n(2),u=r(c),y=n(3),d=r(y),h=function(e){return Math.ceil(9.24*Math.pow(10,-5)*Math.pow(e,2)+1.492*e+2.174)},b="function"!=typeof callNative,v=function(e){function t(e,n){i(this,t);var r=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.fixedFont=n.commonConfigs&&n.commonConfigs.fixedFont,r.optimizeLineHeight=n.commonConfigs&&n.commonConfigs.optimizeLineHeight,"fixedFont"in e&&(r.fixedFont=e.fixedFont),"optimizeLineHeight"in e&&(r.optimizeLineHeight=e.optimizeLineHeight),r}return f(t,e),s(t,[{key:"calcLineHeight",value:function(e){var t=this.props.lineHeightOptimizer,n=parseInt(e.fontSize,10),r=t(n);return r&&!e.lineHeight&&(this.fixedFont&&"number"==typeof r?e.lineHeight=r+(b?"px":"wx"):e.lineHeight=r),e}},{key:"render",value:function(){var e=this.props,t=e.onPress,n=e.onClick,r=e.style,i=o(e,["onPress","onClick","style"]),a=Object.assign({fontSize:32,wordWrap:"break-word"},r);return a=this.fixedFont?(0,u.default)(a):a,a=this.optimizeLineHeight?this.calcLineHeight(a):a,(0,l.createElement)(d.default,p({},i,{style:a,onClick:t||n}))}}]),t}(l.Component);v.contextTypes={androidConfigs:l.PropTypes.any,commonConfigs:l.PropTypes.any},v.propTypes={optimizeLineHeight:l.PropTypes.boolean,fixedFont:l.PropTypes.boolean,style:l.PropTypes.any,onPress:l.PropTypes.func,onClick:l.PropTypes.func,lineHeightOptimizer:l.PropTypes.func},v.defaultProps={style:{},lineHeightOptimizer:h},t.default=v,e.exports=t.default},function(t,n){t.exports=e("rax")},function(e,t){"use strict";function n(e){var t=r({},e),n=e.fontSize;return("string"==typeof n&&n.indexOf("rem")>0||"number"==typeof n)&&(n=parseInt(n,10)),"string"==typeof n&&n.indexOf("px")>0&&(n=2*parseInt(n,10)),t.fontSize=n,t}Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o="function"!=typeof callNative,i=void 0;if(o)i=navigator.userAgent.indexOf("iPad")>-1;else{var a="string"!=typeof WXEnvironment?WXEnvironment:{};i="ios"===a.platform.toLowerCase()&&a.deviceModel.toLowerCase().indexOf("ipad")>-1}t.default=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!e||!e.fontSize||!t)return e;if(i&&a)return n(e);var f=r({},e),p=e.fontSize;return("string"==typeof p&&p.indexOf("rem")>0||"number"==typeof p)&&(p=Math.floor(parseInt(p,10)/2)),"string"==typeof p&&p.indexOf("px")>0&&(p=parseInt(p,10)),f.fontSize=p+(o?"px":"wx"),f},e.exports=t.default},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e,t){var n=e.type,r=e.props,o=r.children;if("function"==typeof n){var i=new n;return i.props=r,o&&(i.props.children=f(o,t)),i.context=t.getChildContext(),i.render()}return e}function f(e,t){var n=[];Array.isArray(e)||(e=[e]);for(var r=0;r<e.length;r++){var o=e[r];"string"==typeof o?n.push(o):"object"===("undefined"==typeof o?"undefined":p(o))&&n.push(a(o,t))}return n}Object.defineProperty(t,"__esModule",{value:!0});var p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(1),u="function"==typeof callNative,y=function(e){function t(){var e,n,i,a;r(this,t);for(var p=arguments.length,l=Array(p),y=0;y<p;y++)l[y]=arguments[y];return n=i=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(l))),i.renderText=function(){var e=i.props,t=s({},e,{style:e.style||{}}),n="";if(null!=e.children&&(n=Array.isArray(e.children)?e.children.join(""):e.children.toString()),i.context.isInAParentText)return(0,c.createElement)("span",t,n);if(e.onPress&&(t.onClick=e.onPress),u)return e.numberOfLines&&(t.style.lines=e.numberOfLines),t.value=n,(0,c.createElement)("text",t);var r=s({},d.text,t.style),o=e.numberOfLines;return o&&(1===parseInt(o)?r.whiteSpace="nowrap":(r.display="-webkit-box",r.webkitBoxOrient="vertical",r.webkitLineClamp=String(o)),r.overflow="hidden"),(0,c.createElement)("span",s({},t,{style:r}),n)},i.renderRichText=function(){var e=i.props,t=e.children,n=s({},e,{style:e.style||{}}),r=s({},d.richtext,n.style);return u&&(t=f(t,i)),(0,c.createElement)("p",s({},n,{style:r}),t)},a=n,o(i,a)}return i(t,e),l(t,[{key:"getChildContext",value:function(){return{isInAParentText:!0}}},{key:"render",value:function(){var e=this.props,t=e.children;Array.isArray(t)||(t=[t]);for(var n=!1,r=0;r<t.length;r++){var o=t[r];if(o&&"object"===("undefined"==typeof o?"undefined":p(o))){n=!0;break}}return n?this.renderRichText():this.renderText()}}]),t}(c.Component);y.propTypes={},y.contextTypes={isInAParentText:c.PropTypes.bool},y.childContextTypes={isInAParentText:c.PropTypes.bool};var d={text:{border:"0 solid black",position:"relative",boxSizing:"border-box",display:"block",flexDirection:"column",alignContent:"flex-start",flexShrink:0,fontSize:32},richtext:{marginTop:0,marginBottom:0}};t.default=y,e.exports=t.default}])});
define("nuke-text",["rax"],function(e,t,n){n.exports=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="/build/",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=n(1),s=n(!function(){var e=new Error('Cannot find module "nuke-helper/src/calc-fixed-font"');throw e.code="MODULE_NOT_FOUND",e}()),u=r(s),y=n(2),h=r(y),d=function(e){return Math.ceil(9.24*Math.pow(10,-5)*Math.pow(e,2)+1.492*e+2.174)},b="function"!=typeof callNative,m=function(e){function t(e,n){i(this,t);var r=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.fixedFont=n.commonConfigs&&n.commonConfigs.fixedFont,r.optimizeLineHeight=n.commonConfigs&&n.commonConfigs.optimizeLineHeight,"fixedFont"in e&&(r.fixedFont=e.fixedFont),"optimizeLineHeight"in e&&(r.optimizeLineHeight=e.optimizeLineHeight),r}return l(t,e),p(t,[{key:"calcLineHeight",value:function(e){var t=this.props.lineHeightOptimizer,n=parseInt(e.fontSize,10),r=t(n);return r&&!e.lineHeight&&(this.fixedFont&&"number"==typeof r?e.lineHeight=r+(b?"px":"wx"):e.lineHeight=r),e}},{key:"render",value:function(){var e=this.props,t=e.onPress,n=e.onClick,r=e.style,i=o(e,["onPress","onClick","style"]),a=Object.assign({fontSize:32,wordWrap:"break-word"},r);return delete i.optimizeLineHeight,a=this.fixedFont?(0,u.default)(a):a,a=this.optimizeLineHeight?this.calcLineHeight(a):a,(0,f.createElement)(h.default,c({},i,{style:a,onClick:t||n}))}}]),t}(f.Component);m.contextTypes={androidConfigs:f.PropTypes.any,commonConfigs:f.PropTypes.any},m.propTypes={optimizeLineHeight:f.PropTypes.boolean,fixedFont:f.PropTypes.boolean,style:f.PropTypes.any,onPress:f.PropTypes.func,onClick:f.PropTypes.func,lineHeightOptimizer:f.PropTypes.func},m.defaultProps={style:{},lineHeightOptimizer:d},t.default=m,e.exports=t.default},function(t,n){t.exports=e("rax")},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e,t){var n=e.type,r=e.props,o=r.children;if("function"==typeof n){var i=new n;return i.props=r,o&&(i.props.children=l(o,t)),i.context=t.getChildContext(),i.render()}return e}function l(e,t){var n=[];Array.isArray(e)||(e=[e]);for(var r=0;r<e.length;r++){var o=e[r];"string"==typeof o?n.push(o):"object"===("undefined"==typeof o?"undefined":c(o))&&n.push(a(o,t))}return n}Object.defineProperty(t,"__esModule",{value:!0});var c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),s=n(1),u="function"==typeof callNative,y=function(e){function t(){var e,n,i,a;r(this,t);for(var c=arguments.length,f=Array(c),y=0;y<c;y++)f[y]=arguments[y];return n=i=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(f))),i.renderText=function(){var e=i.props,t=p({},e,{style:e.style||{}}),n="";if(null!=e.children&&(n=Array.isArray(e.children)?e.children.join(""):e.children.toString()),i.context.isInAParentText)return(0,s.createElement)("span",t,n);if(e.onPress&&(t.onClick=e.onPress),u)return e.numberOfLines&&(t.style.lines=e.numberOfLines),t.value=n,(0,s.createElement)("text",t);var r=p({},h.text,t.style),o=e.numberOfLines;return o&&(1===parseInt(o)?r.whiteSpace="nowrap":(r.display="-webkit-box",r.webkitBoxOrient="vertical",r.webkitLineClamp=String(o)),r.overflow="hidden"),(0,s.createElement)("span",p({},t,{style:r}),n)},i.renderRichText=function(){var e=i.props,t=e.children,n=p({},e,{style:e.style||{}}),r=p({},h.richtext,n.style);return u&&(t=l(t,i)),(0,s.createElement)("p",p({},n,{style:r}),t)},a=n,o(i,a)}return i(t,e),f(t,[{key:"getChildContext",value:function(){return{isInAParentText:!0}}},{key:"render",value:function(){var e=this.props,t=e.children;Array.isArray(t)||(t=[t]);for(var n=!1,r=0;r<t.length;r++){var o=t[r];if(o&&"object"===("undefined"==typeof o?"undefined":c(o))){n=!0;break}}return n?this.renderRichText():this.renderText()}}]),t}(s.Component);y.propTypes={},y.contextTypes={isInAParentText:s.PropTypes.bool},y.childContextTypes={isInAParentText:s.PropTypes.bool};var h={text:{border:"0 solid black",position:"relative",boxSizing:"border-box",display:"block",flexDirection:"column",alignContent:"flex-start",flexShrink:0,fontSize:32},richtext:{marginTop:0,marginBottom:0}};t.default=y,e.exports=t.default}])});

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

{"npm/nuke-helper/2.0.2/index.cmd":{"requires":[]},"npm/nuke-helper/2.0.2/index.native.cmd":{"requires":[]},"npm/nuke-helper/2.0.3/index.cmd":{"requires":[]},"npm/nuke-helper/2.0.3/index.native.cmd":{"requires":[]},"npm/nuke-text/2.0.3/index.cmd":{"requires":["npm/nuke-helper/2.0.3/index.cmd"]},"npm/nuke-text/2.0.3/index.native.cmd":{"requires":["npm/nuke-helper/2.0.3/index.native.cmd"]},"npm/nuke-text/2.0.4/index.native.cmd":{"requires":["npm/nuke-helper/2.0.3/index.native.cmd"]},"npm/nuke-text/2.0.4/index.cmd":{"requires":["npm/nuke-helper/2.0.3/index.cmd"]},"npm/nuke-text/2.0.5/index.cmd":{"requires":["npm/nuke-helper/2.0.3/index.cmd"]},"npm/nuke-text/2.0.5/index.native.cmd":{"requires":["npm/nuke-helper/2.0.3/index.native.cmd"]}}
{"npm/nuke-helper/2.0.2/index.cmd":{"requires":[]},"npm/nuke-helper/2.0.2/index.native.cmd":{"requires":[]},"npm/nuke-helper/2.0.3/index.cmd":{"requires":[]},"npm/nuke-helper/2.0.3/index.native.cmd":{"requires":[]},"npm/nuke-text/2.0.3/index.cmd":{"requires":["npm/nuke-helper/2.0.3/index.cmd"]},"npm/nuke-text/2.0.3/index.native.cmd":{"requires":["npm/nuke-helper/2.0.3/index.native.cmd"]},"npm/nuke-text/2.0.4/index.native.cmd":{"requires":["npm/nuke-helper/2.0.3/index.native.cmd"]},"npm/nuke-text/2.0.4/index.cmd":{"requires":["npm/nuke-helper/2.0.3/index.cmd"]},"npm/nuke-text/2.0.5/index.cmd":{"requires":["npm/nuke-helper/2.0.3/index.cmd"]},"npm/nuke-text/2.0.5/index.native.cmd":{"requires":["npm/nuke-helper/2.0.3/index.native.cmd"]},"npm/nuke-text/2.0.6/index.cmd":{"requires":["npm/nuke-helper/2.0.3/index.cmd"]},"npm/nuke-text/2.0.6/index.native.cmd":{"requires":["npm/nuke-helper/2.0.3/index.native.cmd"]}}
# Text Demo
* order: 0
- order: 0

@@ -31,2 +31,4 @@ 包含字号,颜色,字重,固定单位等

const rtlText = 'مرحبا كيف حالك؟';
class TextDemo extends Component {

@@ -39,5 +41,2 @@ constructor() {

<Page title="Text">
<Text>111</Text>
<Text>2222</Text>
<Text>3333</Text>
<Page.Intro main="Normal" />

@@ -64,2 +63,19 @@

})}
<Page.Intro main="国际化" sub="RTL" />
<View style={styles.textLine}>
<View style={styles.label}>
<Text style={styles.labelText}>阿拉伯语</Text>
</View>
<View style={styles.result}>
<Text
fixedFont={true}
style={[
styles.resultText,
{ fontSize: 28, textAlign: 'right', direction: 'rtl' }
]}
>
{rtlText}
</Text>
</View>
</View>
<Page.Intro

@@ -66,0 +82,0 @@ main="固定字号,第一行固定,第二行自适应"

# Changelog
## 2.0.6 / 2018-06-08
* [[222353ac](http://gitlab.alibaba-inc.com/nuke/text/commit/222353ac6de1afee3f9c7afcbfd17a599ce3411a)] - `feat` add rtl demo
## 2.0.5 / 2018-04-25

@@ -23,2 +27,3 @@

* [[bc1bdc73](http://gitlab.alibaba-inc.com/nuke/text/commit/bc1bdc73be8d64c942ed6517fd2a5256b12fb851)] - `fix` expose src folder
* [[ee958093](http://gitlab.alibaba-inc.com/nuke/text/commit/ee958093f5edc35d69f28e748014665a478041ba)] - `fix` module & license

@@ -25,0 +30,0 @@ ## 0.0.19 / 2018-03-03

@@ -91,2 +91,3 @@ /** @jsx createElement */

var textStyle = Object.assign({ fontSize: 32, wordWrap: 'break-word' }, style);
delete others.optimizeLineHeight;
textStyle = this.fixedFont ? (0, _calcFixedFont2.default)(textStyle) : textStyle;

@@ -93,0 +94,0 @@ textStyle = this.optimizeLineHeight ? this.calcLineHeight(textStyle) : textStyle;

{
"name": "nuke-text",
"version": "2.0.5",
"version": "2.0.6",
"description": "文本",

@@ -54,4 +54,4 @@ "main": "lib/index",

"devDependencies": {
"nuke-page": "^1.x.x",
"nuke-view": "^1.x.x",
"nuke-page": "^2.x.x",
"nuke-view": "^2.x.x",
"eslint": "3.19.0",

@@ -65,5 +65,5 @@ "babel-eslint": "^7.2.3",

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

@@ -44,2 +44,4 @@ # Text

### 关于 fixedFont

@@ -66,1 +68,12 @@

native 端的 `dp` `pt` 确保了字号在任何不同 dpi 的手机屏幕上显示不会发生改变。
### RTL
RTL 排版与国际化 demo
```
const rtlText = 'مرحبا كيف حالك؟';
<Text style={{ fontSize: 28, textAlign: 'right', direction: 'rtl' }}>
{rtlText}
</Text>
```

@@ -54,2 +54,3 @@ /** @jsx createElement */

);
delete others.optimizeLineHeight;
textStyle = this.fixedFont ? calcTextSize(textStyle) : textStyle;

@@ -56,0 +57,0 @@ textStyle = this.optimizeLineHeight

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