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

react-fela

Package Overview
Dependencies
Maintainers
1
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-fela - npm Package Compare versions

Comparing version 2.0.1 to 2.1.0

Changelog.md

17

dist/react-fela.js

@@ -151,5 +151,20 @@ (function (global, factory) {

function createComponent(rule) {
var type = arguments.length <= 1 || arguments[1] === undefined ? 'div' : arguments[1];
var component = function component(props, _ref) {
var renderer = _ref.renderer;
return React.createElement(type, babelHelpers.extends({}, props, {
className: renderer.renderRule(rule, props)
}), props.children || null);
};
component.contextTypes = { renderer: rendererShape$1 };
return component;
}
var index = {
Provider: Provider,
connect: connect
connect: connect,
createComponent: createComponent
};

@@ -156,0 +171,0 @@

2

dist/react-fela.min.js

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

!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r(require("react"),require("fela")):"function"==typeof define&&define.amd?define(["react","fela"],r):e.ReactFela=r(e.React,e.Fela)}(this,function(e,r){"use strict";function t(r){return function(t){var i,u;return u=i=function(e){function i(){return o.classCallCheck(this,i),o.possibleConstructorReturn(this,Object.getPrototypeOf(i).apply(this,arguments))}return o.inherits(i,e),o.createClass(i,[{key:"render",value:function(){var e=r(this.props)(this.context.renderer);return n.createElement(t,o["extends"]({},this.props,{styles:e}))}}]),i}(e.Component),i.displayName=t.displayName||t.name||"Component",i.contextTypes=o["extends"]({},t.contextTypes,{renderer:s}),u}}var n="default"in e?e["default"]:e,o={};o.classCallCheck=function(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")},o.createClass=function(){function e(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(r,t,n){return t&&e(r.prototype,t),n&&e(r,n),r}}(),o["extends"]=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},o.inherits=function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)},o.possibleConstructorReturn=function(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!r||"object"!=typeof r&&"function"!=typeof r?e:r};var i=e.PropTypes.shape({renderFont:e.PropTypes.func.isRequired,renderStatic:e.PropTypes.func.isRequired,renderRule:e.PropTypes.func.isRequired,renderKeyframe:e.PropTypes.func.isRequired}),s=i.isRequired,u=function(e){function t(){return o.classCallCheck(this,t),o.possibleConstructorReturn(this,Object.getPrototypeOf(t).apply(this,arguments))}return o.inherits(t,e),o.createClass(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.mountNode,n=e.renderer;t&&r.render(n,t)}},{key:"getChildContext",value:function(){return{renderer:this.props.renderer}}},{key:"render",value:function(){return this.props.children}}]),t}(e.Component);u.propTypes={renderer:s},u.childContextTypes={renderer:s};var c={Provider:u,connect:t};return c});
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r(require("react"),require("fela")):"function"==typeof define&&define.amd?define(["react","fela"],r):e.ReactFela=r(e.React,e.Fela)}(this,function(e,r){"use strict";function t(r){return function(t){var n,s;return s=n=function(e){function n(){return i.classCallCheck(this,n),i.possibleConstructorReturn(this,Object.getPrototypeOf(n).apply(this,arguments))}return i.inherits(n,e),i.createClass(n,[{key:"render",value:function(){var e=r(this.props)(this.context.renderer);return o.createElement(t,i["extends"]({},this.props,{styles:e}))}}]),n}(e.Component),n.displayName=t.displayName||t.name||"Component",n.contextTypes=i["extends"]({},t.contextTypes,{renderer:u}),s}}function n(r){var t=arguments.length<=1||void 0===arguments[1]?"div":arguments[1],n=function(n,o){var s=o.renderer;return e.createElement(t,i["extends"]({},n,{className:s.renderRule(r,n)}),n.children||null)};return n.contextTypes={renderer:u},n}var o="default"in e?e["default"]:e,i={};i.classCallCheck=function(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")},i.createClass=function(){function e(e,r){for(var t=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(r,t,n){return t&&e(r.prototype,t),n&&e(r,n),r}}(),i["extends"]=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},i.inherits=function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function, not "+typeof r);e.prototype=Object.create(r&&r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),r&&(Object.setPrototypeOf?Object.setPrototypeOf(e,r):e.__proto__=r)},i.possibleConstructorReturn=function(e,r){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!r||"object"!=typeof r&&"function"!=typeof r?e:r};var s=e.PropTypes.shape({renderFont:e.PropTypes.func.isRequired,renderStatic:e.PropTypes.func.isRequired,renderRule:e.PropTypes.func.isRequired,renderKeyframe:e.PropTypes.func.isRequired}),u=s.isRequired,c=function(e){function t(){return i.classCallCheck(this,t),i.possibleConstructorReturn(this,Object.getPrototypeOf(t).apply(this,arguments))}return i.inherits(t,e),i.createClass(t,[{key:"componentDidMount",value:function(){var e=this.props,t=e.mountNode,n=e.renderer;t&&r.render(n,t)}},{key:"getChildContext",value:function(){return{renderer:this.props.renderer}}},{key:"render",value:function(){return this.props.children}}]),t}(e.Component);c.propTypes={renderer:u},c.childContextTypes={renderer:u};var a={Provider:c,connect:t,createComponent:n};return a});

@@ -15,2 +15,6 @@ 'use strict';

var _createComponent = require('./components/createComponent');
var _createComponent2 = _interopRequireDefault(_createComponent);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -20,4 +24,5 @@

Provider: _Provider2.default,
connect: _connect2.default
connect: _connect2.default,
createComponent: _createComponent2.default
};
module.exports = exports['default'];
{
"name": "react-fela",
"version": "2.0.1",
"version": "2.1.0",
"description": "React bindings for Fela",

@@ -5,0 +5,0 @@ "repository": "https://github.com/rofrischmann/react-fela/",

@@ -8,6 +8,6 @@ # React Fela

<img alt="npm downloads" src="https://img.shields.io/npm/dm/react-fela.svg">
<img alt="gzipped size" src="https://img.shields.io/badge/gzipped-~1.0kb-brightgreen.svg">
<img alt="gzipped size" src="https://img.shields.io/badge/gzipped-~1.16kb-brightgreen.svg">
This package only includes React bindings for [ Fela](http://github.com/rofrischmann/fela). <br>
This package only includes React bindings for [Fela](http://github.com/rofrischmann/fela). <br>
It assumes you already know about Fela and how to use it.

@@ -35,5 +35,6 @@

## Documentation
#### [API reference](docs/api)
* [`<Provider renderer [mountNode]>`](docs/api/Provider.md)
* [`connect(mapStylesToProps)`](docs/api/connect.md)
#### API reference
* [`<Provider renderer [mountNode]>`](docs/Provider.md)
* [`connect(mapStylesToProps)`](docs/connect.md)
* [`createComponent(rule, [type])`](docs/createComponent.md)

@@ -40,0 +41,0 @@ ## Usage

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