Socket
Socket
Sign inDemoInstall

rax-text

Package Overview
Dependencies
Maintainers
2
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rax-text - npm Package Compare versions

Comparing version 0.4.9 to 0.4.10

22

dist/text.factory.js

@@ -84,4 +84,2 @@ module.exports = function(require, exports, module) {

var _class, _temp2;
var _rax = __webpack_require__(1);

@@ -97,3 +95,3 @@

var Text = (_temp2 = _class = function (_Component) {
var Text = function (_Component) {
_inherits(Text, _Component);

@@ -221,7 +219,11 @@

return Text;
}(_rax.Component), _class.propTypes = {}, _class.contextTypes = {
}(_rax.Component);
Text.propTypes = {};
Text.contextTypes = {
isInAParentText: _rax.PropTypes.bool
}, _class.childContextTypes = {
};
Text.childContextTypes = {
isInAParentText: _rax.PropTypes.bool
}, _temp2);
};

@@ -300,4 +302,2 @@

var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
Object.defineProperty(exports, "__esModule", {

@@ -307,7 +307,3 @@ value: true

var _typeof = typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol" ? function (obj) {
return typeof obj === "undefined" ? "undefined" : _typeof2(obj);
} : function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof2(obj);
};
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

@@ -314,0 +310,0 @@ // https://www.w3.org/TR/html5/webappapis.html#dom-navigator-appcodename

@@ -106,4 +106,2 @@

var _class, _temp2;
var _rax = __webpack_require__(1);

@@ -119,3 +117,3 @@

var Text = (_temp2 = _class = function (_Component) {
var Text = function (_Component) {
_inherits(Text, _Component);

@@ -243,7 +241,11 @@

return Text;
}(_rax.Component), _class.propTypes = {}, _class.contextTypes = {
}(_rax.Component);
Text.propTypes = {};
Text.contextTypes = {
isInAParentText: _rax.PropTypes.bool
}, _class.childContextTypes = {
};
Text.childContextTypes = {
isInAParentText: _rax.PropTypes.bool
}, _temp2);
};

@@ -322,4 +324,2 @@

var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
Object.defineProperty(exports, "__esModule", {

@@ -329,7 +329,3 @@ value: true

var _typeof = typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol" ? function (obj) {
return typeof obj === "undefined" ? "undefined" : _typeof2(obj);
} : function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj === "undefined" ? "undefined" : _typeof2(obj);
};
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

@@ -336,0 +332,0 @@ // https://www.w3.org/TR/html5/webappapis.html#dom-navigator-appcodename

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

!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define)define("rax-text",function(t,n,r){r.exports=e()});else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:this,t.RaxText=e()}}(function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([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 f(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=u(o,t)),i.context=t.getChildContext(),i.render()}return e}function u(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"===(void 0===o?"undefined":a(o))&&n.push(f(o,t))}return n}Object.defineProperty(t,"__esModule",{value:!0});var c,l,a="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},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}}(),y=n(1),d=n(2),b=(l=c=function(e){function t(){var e,n,i,f;r(this,t);for(var c=arguments.length,l=Array(c),a=0;a<c;a++)l[a]=arguments[a];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,y.createElement)("span",t,n);if(e.onPress&&(t.onClick=e.onPress),d.isWeex)return e.numberOfLines&&(t.style.lines=e.numberOfLines),t.value=n,(0,y.createElement)("text",t);var r=s({},v.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,y.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({},v.richtext,n.style);return d.isWeex&&(t=u(t,i)),(0,y.createElement)("p",s({},n,{style:r}),t)},f=n,o(i,f)}return i(t,e),p(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"===(void 0===o?"undefined":a(o))){n=!0;break}}return n?this.renderRichText():this.renderText()}}]),t}(y.Component),c.propTypes={},c.contextTypes={isInAParentText:y.PropTypes.bool},c.childContextTypes={isInAParentText:y.PropTypes.bool},l),v={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=b,e.exports=t.default},function(e,t){e.exports=function(){var e;if(!e)try{e=require("rax")}catch(e){}return e}()},function(e,t,n){"use strict";var r="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};Object.defineProperty(t,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"===r(Symbol.iterator)?function(e){return void 0===e?"undefined":r(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":r(e)};t.isWeb="object"===("undefined"==typeof navigator?"undefined":o(navigator))&&("Mozilla"===navigator.appCodeName||"Gecko"===navigator.product),t.isNode="undefined"!=typeof process&&!(!process.versions||!process.versions.node),t.isWeex="function"==typeof callNative,t.isReactNative="undefined"!=typeof __fbBatchedBridgeConfig}])});
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define)define("rax-text",function(t,n,r){r.exports=e()});else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:this,t.RaxText=e()}}(function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([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 f(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=a(o,t)),i.context=t.getChildContext(),i.render()}return e}function a(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"===(void 0===o?"undefined":u(o))&&n.push(f(o,t))}return n}Object.defineProperty(t,"__esModule",{value:!0});var u="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},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},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}}(),s=n(1),p=n(2),y=function(e){function t(){var e,n,i,f;r(this,t);for(var u=arguments.length,l=Array(u),y=0;y<u;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=c({},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),p.isWeex)return e.numberOfLines&&(t.style.lines=e.numberOfLines),t.value=n,(0,s.createElement)("text",t);var r=c({},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,s.createElement)("span",c({},t,{style:r}),n)},i.renderRichText=function(){var e=i.props,t=e.children,n=c({},e,{style:e.style||{}}),r=c({},d.richtext,n.style);return p.isWeex&&(t=a(t,i)),(0,s.createElement)("p",c({},n,{style:r}),t)},f=n,o(i,f)}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"===(void 0===o?"undefined":u(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 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},function(e,t){e.exports=function(){var e;if(!e)try{e=require("rax")}catch(e){}return e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="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};t.isWeb="object"===("undefined"==typeof navigator?"undefined":r(navigator))&&("Mozilla"===navigator.appCodeName||"Gecko"===navigator.product),t.isNode="undefined"!=typeof process&&!(!process.versions||!process.versions.node),t.isWeex="function"==typeof callNative,t.isReactNative="undefined"!=typeof __fbBatchedBridgeConfig}])});

@@ -13,4 +13,2 @@ 'use strict';

var _class, _temp2;
var _rax = require('rax');

@@ -26,3 +24,3 @@

var Text = (_temp2 = _class = function (_Component) {
var Text = function (_Component) {
_inherits(Text, _Component);

@@ -150,7 +148,11 @@

return Text;
}(_rax.Component), _class.propTypes = {}, _class.contextTypes = {
}(_rax.Component);
Text.propTypes = {};
Text.contextTypes = {
isInAParentText: _rax.PropTypes.bool
}, _class.childContextTypes = {
};
Text.childContextTypes = {
isInAParentText: _rax.PropTypes.bool
}, _temp2);
};

@@ -157,0 +159,0 @@

{
"name": "rax-text",
"version": "0.4.9",
"version": "0.4.10",
"description": "Text component for Rax.",

@@ -24,3 +24,3 @@ "license": "BSD-3-Clause",

"dependencies": {
"universal-env": "^0.4.9"
"universal-env": "^0.4.10"
},

@@ -31,4 +31,4 @@ "peerDependencies": {

"devDependencies": {
"rax-test-renderer": "^0.4.9"
"rax-test-renderer": "^0.4.10"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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