react-fela
Advanced tools
Comparing version 4.3.3 to 4.3.4
@@ -5,6 +5,4 @@ (function (global, factory) { | ||
(global.ReactFela = factory(global.React)); | ||
}(this, function (require$$0) { 'use strict'; | ||
}(this, function (react) { 'use strict'; | ||
var require$$0__default = 'default' in require$$0 ? require$$0['default'] : require$$0; | ||
var babelHelpers = {}; | ||
@@ -222,3 +220,3 @@ babelHelpers.typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { | ||
var require$$0$1 = (emptyFunction && typeof emptyFunction === 'object' && 'default' in emptyFunction ? emptyFunction['default'] : emptyFunction); | ||
var require$$0 = (emptyFunction && typeof emptyFunction === 'object' && 'default' in emptyFunction ? emptyFunction['default'] : emptyFunction); | ||
@@ -237,3 +235,3 @@ var factoryWithThrowingShims = __commonjs(function (module) { | ||
var emptyFunction = require$$0$1; | ||
var emptyFunction = require$$0; | ||
var invariant = require$$2; | ||
@@ -295,3 +293,3 @@ | ||
var require$$0$3 = (ReactPropTypesSecret && typeof ReactPropTypesSecret === 'object' && 'default' in ReactPropTypesSecret ? ReactPropTypesSecret['default'] : ReactPropTypesSecret); | ||
var require$$0$2 = (ReactPropTypesSecret && typeof ReactPropTypesSecret === 'object' && 'default' in ReactPropTypesSecret ? ReactPropTypesSecret['default'] : ReactPropTypesSecret); | ||
@@ -311,3 +309,3 @@ var warning = __commonjs(function (module) { | ||
var emptyFunction = require$$0$1; | ||
var emptyFunction = require$$0; | ||
@@ -385,3 +383,3 @@ /** | ||
var warning = require$$1$1; | ||
var ReactPropTypesSecret = require$$0$3; | ||
var ReactPropTypesSecret = require$$0$2; | ||
var loggedTypeFailures = {}; | ||
@@ -435,3 +433,3 @@ } | ||
var require$$0$2 = (checkPropTypes && typeof checkPropTypes === 'object' && 'default' in checkPropTypes ? checkPropTypes['default'] : checkPropTypes); | ||
var require$$0$1 = (checkPropTypes && typeof checkPropTypes === 'object' && 'default' in checkPropTypes ? checkPropTypes['default'] : checkPropTypes); | ||
@@ -450,8 +448,8 @@ var factoryWithTypeCheckers = __commonjs(function (module) { | ||
var emptyFunction = require$$0$1; | ||
var emptyFunction = require$$0; | ||
var invariant = require$$2; | ||
var warning = require$$1$1; | ||
var ReactPropTypesSecret = require$$0$3; | ||
var checkPropTypes = require$$0$2; | ||
var ReactPropTypesSecret = require$$0$2; | ||
var checkPropTypes = require$$0$1; | ||
@@ -1020,7 +1018,7 @@ module.exports = function (isValidElement, throwOnDirectAccess) { | ||
value: function render() { | ||
return require$$0.Children.only(this.props.children); | ||
return react.Children.only(this.props.children); | ||
} | ||
}]); | ||
return Provider; | ||
}(require$$0.Component); | ||
}(react.Component); | ||
@@ -1030,361 +1028,60 @@ Provider.propTypes = { renderer: PropTypes.object.isRequired }; | ||
var invariant$1 = __commonjs(function (module) { | ||
/** | ||
* Copyright 2013-2015, Facebook, Inc. | ||
* All rights reserved. | ||
* | ||
* This source code is licensed under the BSD-style license found in the | ||
* LICENSE file in the root directory of this source tree. An additional grant | ||
* of patent rights can be found in the PATENTS file in the same directory. | ||
*/ | ||
function generateDisplayName(component) { | ||
var displayName = component.displayName || component.name; | ||
'use strict'; | ||
/** | ||
* Use invariant() to assert state which your program assumes to be true. | ||
* | ||
* Provide sprintf-style format (only %s is supported) and arguments | ||
* to provide information about what broke and what you were | ||
* expecting. | ||
* | ||
* The invariant message will be stripped in production, but the invariant | ||
* will remain to ensure logic does not differ in production. | ||
*/ | ||
var NODE_ENV = 'development'; | ||
var invariant = function invariant(condition, format, a, b, c, d, e, f) { | ||
if (NODE_ENV !== 'production') { | ||
if (format === undefined) { | ||
throw new Error('invariant requires an error message argument'); | ||
} | ||
if (displayName) { | ||
return 'Fela' + displayName; | ||
} | ||
if (!condition) { | ||
var error; | ||
if (format === undefined) { | ||
error = new Error('Minified exception occurred; use the non-minified dev environment ' + 'for the full error message and additional helpful warnings.'); | ||
} else { | ||
var args = [a, b, c, d, e, f]; | ||
var argIndex = 0; | ||
error = new Error(format.replace(/%s/g, function () { | ||
return args[argIndex++]; | ||
})); | ||
error.name = 'Invariant Violation'; | ||
} | ||
error.framesToPop = 1; // we don't care about invariant's own frame | ||
throw error; | ||
} | ||
}; | ||
module.exports = invariant; | ||
}); | ||
var require$$1$2 = (invariant$1 && typeof invariant$1 === 'object' && 'default' in invariant$1 ? invariant$1['default'] : invariant$1); | ||
var Subscriber$1 = __commonjs(function (module, exports) { | ||
'use strict'; | ||
exports.__esModule = true; | ||
var _invariant = require$$1$2; | ||
var _invariant2 = _interopRequireDefault(_invariant); | ||
var _react = require$$0__default; | ||
var _react2 = _interopRequireDefault(_react); | ||
function _interopRequireDefault(obj) { | ||
return obj && obj.__esModule ? obj : { default: obj }; | ||
return 'ConnectedFelaComponent'; | ||
} | ||
function _classCallCheck(instance, Constructor) { | ||
if (!(instance instanceof Constructor)) { | ||
throw new TypeError("Cannot call a class as a function"); | ||
} | ||
} | ||
function connectFactory(BaseComponent, createElement, contextTypes) { | ||
return function connect(mapStylesToProps) { | ||
return function (component) { | ||
var EnhancedComponent = function (_BaseComponent) { | ||
babelHelpers.inherits(EnhancedComponent, _BaseComponent); | ||
function _possibleConstructorReturn(self, call) { | ||
if (!self) { | ||
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | ||
}return call && ((typeof call === 'undefined' ? 'undefined' : babelHelpers.typeof(call)) === "object" || typeof call === "function") ? call : self; | ||
} | ||
function EnhancedComponent() { | ||
babelHelpers.classCallCheck(this, EnhancedComponent); | ||
return babelHelpers.possibleConstructorReturn(this, (EnhancedComponent.__proto__ || Object.getPrototypeOf(EnhancedComponent)).apply(this, arguments)); | ||
} | ||
function _inherits(subClass, superClass) { | ||
if (typeof superClass !== "function" && superClass !== null) { | ||
throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === 'undefined' ? 'undefined' : babelHelpers.typeof(superClass))); | ||
}subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; | ||
} | ||
babelHelpers.createClass(EnhancedComponent, [{ | ||
key: 'render', | ||
value: function render() { | ||
var _context = this.context, | ||
renderer = _context.renderer, | ||
theme = _context.theme; | ||
/** | ||
* A <Subscriber> pulls the value for a channel off of context.broadcasts | ||
* and passes it to its children function. | ||
*/ | ||
var Subscriber = function (_React$Component) { | ||
_inherits(Subscriber, _React$Component); | ||
function Subscriber() { | ||
var _temp, _this, _ret; | ||
var styles = mapStylesToProps(babelHelpers.extends({}, this.props, { | ||
theme: theme || {} | ||
}))(renderer); | ||
_classCallCheck(this, Subscriber); | ||
return createElement(component, babelHelpers.extends({}, this.props, { | ||
styles: styles | ||
})); | ||
} | ||
}]); | ||
return EnhancedComponent; | ||
}(BaseComponent); | ||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | ||
args[_key] = arguments[_key]; | ||
} | ||
EnhancedComponent.displayName = generateDisplayName(component); | ||
return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = { | ||
value: null | ||
}, _temp), _possibleConstructorReturn(_this, _ret); | ||
} | ||
Subscriber.prototype.componentWillMount = function componentWillMount() { | ||
var _this2 = this; | ||
var channel = this.props.channel; | ||
if (this.context.broadcasts) { | ||
var subscribe = this.context.broadcasts[channel]; | ||
!(typeof subscribe === 'function') ? (0, _invariant2.default)(false, '<Subscriber channel="%s"> must be rendered in the context of a <Broadcast channel="%s">', channel, channel) : void 0; | ||
this.unsubscribe = subscribe(function (value) { | ||
// This function will be called once immediately. | ||
_this2.setState({ value: value }); | ||
}); | ||
} | ||
}; | ||
Subscriber.prototype.componentWillUnmount = function componentWillUnmount() { | ||
if (this.unsubscribe) this.unsubscribe(); | ||
}; | ||
Subscriber.prototype.render = function render() { | ||
return this.props.children(this.state.value); | ||
}; | ||
return Subscriber; | ||
}(_react2.default.Component); | ||
Subscriber.contextTypes = { | ||
broadcasts: _react2.default.PropTypes.object | ||
}; | ||
if (true) { | ||
Subscriber.propTypes = { | ||
channel: _react.PropTypes.string.isRequired, | ||
children: _react.PropTypes.func.isRequired | ||
}; | ||
} | ||
exports.default = Subscriber; | ||
}); | ||
var require$$0$4 = (Subscriber$1 && typeof Subscriber$1 === 'object' && 'default' in Subscriber$1 ? Subscriber$1['default'] : Subscriber$1); | ||
var Broadcast$1 = __commonjs(function (module, exports) { | ||
'use strict'; | ||
exports.__esModule = true; | ||
var _extends = Object.assign || function (target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i];for (var key in source) { | ||
if (Object.prototype.hasOwnProperty.call(source, key)) { | ||
target[key] = source[key]; | ||
if (contextTypes) { | ||
EnhancedComponent.contextTypes = babelHelpers.extends({}, component.contextTypes, contextTypes); | ||
} | ||
} | ||
}return target; | ||
}; | ||
var _invariant = require$$1$2; | ||
var _invariant2 = _interopRequireDefault(_invariant); | ||
var _react = require$$0__default; | ||
var _react2 = _interopRequireDefault(_react); | ||
function _interopRequireDefault(obj) { | ||
return obj && obj.__esModule ? obj : { default: obj }; | ||
} | ||
function _classCallCheck(instance, Constructor) { | ||
if (!(instance instanceof Constructor)) { | ||
throw new TypeError("Cannot call a class as a function"); | ||
} | ||
} | ||
function _possibleConstructorReturn(self, call) { | ||
if (!self) { | ||
throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); | ||
}return call && ((typeof call === 'undefined' ? 'undefined' : babelHelpers.typeof(call)) === "object" || typeof call === "function") ? call : self; | ||
} | ||
function _inherits(subClass, superClass) { | ||
if (typeof superClass !== "function" && superClass !== null) { | ||
throw new TypeError("Super expression must either be null or a function, not " + (typeof superClass === 'undefined' ? 'undefined' : babelHelpers.typeof(superClass))); | ||
}subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; | ||
} | ||
var createBroadcast = function createBroadcast(initialValue) { | ||
var listeners = []; | ||
var currentValue = initialValue; | ||
return { | ||
publish: function publish(value) { | ||
currentValue = value; | ||
listeners.forEach(function (listener) { | ||
return listener(currentValue); | ||
}); | ||
}, | ||
subscribe: function subscribe(listener) { | ||
listeners.push(listener); | ||
// Publish to this subscriber once immediately. | ||
listener(currentValue); | ||
return function () { | ||
return listeners = listeners.filter(function (item) { | ||
return item !== listener; | ||
}); | ||
}; | ||
} | ||
}; | ||
}; | ||
/** | ||
* A <Broadcast> provides a generic way for descendants to "subscribe" | ||
* to some value that changes over time, bypassing any intermediate | ||
* shouldComponentUpdate's in the hierarchy. It puts all subscription | ||
* functions on context.broadcasts, keyed by "channel". | ||
* | ||
* To use it, a subscriber must opt-in to context.broadcasts. See the | ||
* <Subscriber> component for a reference implementation. | ||
*/ | ||
var Broadcast = function (_React$Component) { | ||
_inherits(Broadcast, _React$Component); | ||
function Broadcast() { | ||
var _temp, _this, _ret; | ||
_classCallCheck(this, Broadcast); | ||
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { | ||
args[_key] = arguments[_key]; | ||
} | ||
return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.broadcast = createBroadcast(_this.props.value), _temp), _possibleConstructorReturn(_this, _ret); | ||
} | ||
Broadcast.prototype.getBroadcastsContext = function getBroadcastsContext() { | ||
var _extends2; | ||
var channel = this.props.channel; | ||
var broadcasts = this.context.broadcasts; | ||
return _extends({}, broadcasts, (_extends2 = {}, _extends2[channel] = this.broadcast.subscribe, _extends2)); | ||
}; | ||
Broadcast.prototype.getChildContext = function getChildContext() { | ||
return { | ||
broadcasts: this.getBroadcastsContext() | ||
return EnhancedComponent; | ||
}; | ||
}; | ||
Broadcast.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) { | ||
!(this.props.channel === nextProps.channel) ? (0, _invariant2.default)(false, 'You cannot change <Broadcast channel>') : void 0; | ||
if (this.props.value !== nextProps.value) this.broadcast.publish(nextProps.value); | ||
}; | ||
Broadcast.prototype.render = function render() { | ||
return _react2.default.Children.only(this.props.children); | ||
}; | ||
return Broadcast; | ||
}(_react2.default.Component); | ||
Broadcast.contextTypes = { | ||
broadcasts: _react.PropTypes.object | ||
}; | ||
Broadcast.childContextTypes = { | ||
broadcasts: _react.PropTypes.object.isRequired | ||
}; | ||
if (true) { | ||
Broadcast.propTypes = { | ||
channel: _react.PropTypes.string.isRequired, | ||
children: _react.PropTypes.node.isRequired, | ||
value: _react.PropTypes.any | ||
}; | ||
} | ||
exports.default = Broadcast; | ||
var connect = connectFactory(react.Component, react.createElement, { | ||
renderer: PropTypes.object, | ||
theme: PropTypes.object | ||
}); | ||
var require$$1$3 = (Broadcast$1 && typeof Broadcast$1 === 'object' && 'default' in Broadcast$1 ? Broadcast$1['default'] : Broadcast$1); | ||
var index$2 = __commonjs(function (module, exports) { | ||
'use strict'; | ||
exports.__esModule = true; | ||
exports.Subscriber = exports.Broadcast = undefined; | ||
var _Broadcast2 = require$$1$3; | ||
var _Broadcast3 = _interopRequireDefault(_Broadcast2); | ||
var _Subscriber2 = require$$0$4; | ||
var _Subscriber3 = _interopRequireDefault(_Subscriber2); | ||
function _interopRequireDefault(obj) { | ||
return obj && obj.__esModule ? obj : { default: obj }; | ||
} | ||
exports.Broadcast = _Broadcast3.default; | ||
exports.Subscriber = _Subscriber3.default; | ||
}); | ||
var Subscriber = index$2.Subscriber; | ||
var Broadcast = index$2.Broadcast; | ||
function generateDisplayName(component) { | ||
var displayName = component.displayName || component.name; | ||
if (displayName) { | ||
return 'Fela' + displayName; | ||
} | ||
return 'ConnectedFelaComponent'; | ||
} | ||
var createVNode = Inferno.createVNode; | ||
function connect(mapStylesToProps) { | ||
return function (Component) { | ||
var ConnectedComponent = function ConnectedComponent(props, _ref) { | ||
var renderer = _ref.renderer; | ||
return createVNode(16, Subscriber, { | ||
'channel': 'felaTheme', | ||
children: function children() { | ||
var theme = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | ||
return createVNode(16, Component, babelHelpers.extends({}, props, { | ||
'styles': mapStylesToProps(babelHelpers.extends({}, props, { | ||
theme: theme | ||
}))(renderer) | ||
})); | ||
} | ||
}); | ||
}; | ||
ConnectedComponent.displayName = generateDisplayName(Component); | ||
ConnectedComponent.contextTypes = { renderer: PropTypes.object }; | ||
return ConnectedComponent; | ||
}; | ||
} | ||
function arrayReduce(array, iterator, initialValue) { | ||
@@ -1554,3 +1251,3 @@ for (var i = 0, len = array.length; i < len; ++i) { | ||
var createComponent = createComponentFactory(require$$0.createElement, { | ||
var createComponent = createComponentFactory(react.createElement, { | ||
renderer: PropTypes.object, | ||
@@ -1560,20 +1257,39 @@ theme: PropTypes.object | ||
var createVNode$1 = Inferno.createVNode; | ||
var Provider$1 = function (_Component) { | ||
babelHelpers.inherits(Provider, _Component); | ||
var ThemeProvider = function ThemeProvider(_ref, _ref2) { | ||
var _ref$overwrite = _ref.overwrite, | ||
overwrite = _ref$overwrite === undefined ? false : _ref$overwrite, | ||
theme = _ref.theme, | ||
children = _ref.children; | ||
var previousTheme = _ref2.theme; | ||
return createVNode$1(16, Broadcast, { | ||
'channel': 'felaTheme', | ||
'value': babelHelpers.extends({}, overwrite ? {} : previousTheme, theme), | ||
children: require$$0.Children.only(children) | ||
}); | ||
}; | ||
function Provider() { | ||
babelHelpers.classCallCheck(this, Provider); | ||
return babelHelpers.possibleConstructorReturn(this, (Provider.__proto__ || Object.getPrototypeOf(Provider)).apply(this, arguments)); | ||
} | ||
ThemeProvider.defaultProps = { overwrite: false }; | ||
ThemeProvider.contextTypes = { theme: PropTypes.object }; | ||
babelHelpers.createClass(Provider, [{ | ||
key: 'getChildContext', | ||
value: function getChildContext() { | ||
return { renderer: this.props.renderer }; | ||
} | ||
}, { | ||
key: 'componentDidMount', | ||
value: function componentDidMount() { | ||
var _props = this.props, | ||
mountNode = _props.mountNode, | ||
renderer = _props.renderer; | ||
if (mountNode) { | ||
render(renderer, mountNode); | ||
} | ||
} | ||
}, { | ||
key: 'render', | ||
value: function render() { | ||
return react.Children.only(this.props.children); | ||
} | ||
}]); | ||
return Provider; | ||
}(react.Component); | ||
Provider$1.propTypes = { renderer: PropTypes.object.isRequired }; | ||
Provider$1.childContextTypes = { renderer: PropTypes.object }; | ||
var index = { | ||
@@ -1583,3 +1299,3 @@ Provider: Provider, | ||
createComponent: createComponent, | ||
ThemeProvider: ThemeProvider | ||
ThemeProvider: Provider$1 | ||
}; | ||
@@ -1586,0 +1302,0 @@ |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):e.ReactFela=t(e.React)}(this,function(e){"use strict";function t(e,t){return t={exports:{}},e(t,t.exports),t.exports}function n(e,t){return function(n){if(n.type!==C||n.media)t.textContent=e.renderToString();else try{t.sheet.insertRule(n.selector+"{"+n.declaration+"}",t.sheet.cssRules.length)}catch(e){}}}function r(e){return e&&1===e.nodeType}function o(e,t){if(!r(t))throw new Error("You need to specify a valid element node (nodeType = 1) to render into.");t.setAttribute("data-fela-stylesheet","");var o=n(e,t);e.subscribe(o);var i=e.renderToString();t.textContent!==i&&(t.textContent=i)}function i(e){var t=e.displayName||e.name;return t?"Fela"+t:"ConnectedFelaComponent"}function u(e){return function(t){var n=function(n,r){var o=r.renderer;return B(16,q,{channel:"felaTheme",children:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return B(16,t,d.extends({},n,{styles:e(d.extends({},n,{theme:r}))(o)}))}})};return n.displayName=i(t),n.contextTypes={renderer:P.object},n}}function a(e,t,n){for(var r=0,o=e.length;r<o;++r)n=t(n,e[r]);return n}function f(e,t){return a(e,function(e,n){return e[n]=t[n],e},{})}function c(e,t){return"function"==typeof e?Object.keys(e(t)):e}function s(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return a(t,function(t,n){return D(t,n(e))},{})}}function l(e,t){return function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"div",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=function(t,i){var u=i.renderer,a=i.theme,l=t.children,p=t._felaRule,y=t.passThrough,h=void 0===y?[]:y,b=d.objectWithoutProperties(t,["children","_felaRule","passThrough"]);if(!u)throw new Error("createComponent() can't render styles without the renderer in the context. Missing react-fela's <Provider /> at the app root?");var v=p?s(n,p):n,m=[].concat(d.toConsumableArray(c(o,b)),d.toConsumableArray(c(h,b)));if(r._isFelaComponent)return e(r,d.extends({_felaRule:v,passThrough:m},b),l);var g=f(m,b);if(b.theme=a||{},u.isNativeRenderer){var j=u.renderRule(v,b);g.style=b.style?[b.style,j]:j}else{g.style=b.style;var w=b.className?b.className+" ":"";g.className=w+u.renderRule(v,b)}g.id=b.id,g.ref=b.innerRef;var x=b.is||r;return e(x,g,l)};return t&&(i.contextTypes=t),i.displayName=n.name?n.name:"FelaComponent",i._isFelaComponent=!0,i}}var p="default"in e?e.default:e,d={};d.typeof="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},d.classCallCheck=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},d.createClass=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}}(),d.defineProperty=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},d.extends=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},d.inherits=function(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)},d.objectWithoutProperties=function(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},d.possibleConstructorReturn=function(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},d.toConsumableArray=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)};var y=t(function(e){function t(e,t,r,o,i,u,a,f){if(n(t),!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[r,o,i,u,a,f],l=0;c=new Error(t.replace(/%s/g,function(){return s[l++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}}var n=function(e){};e.exports=t}),h=y&&"object"==typeof y&&"default"in y?y.default:y,b=t(function(e){function t(e){return function(){return e}}var n=function(){};n.thatReturns=t,n.thatReturnsFalse=t(!1),n.thatReturnsTrue=t(!0),n.thatReturnsNull=t(null),n.thatReturnsThis=function(){return this},n.thatReturnsArgument=function(e){return e},e.exports=n}),v=b&&"object"==typeof b&&"default"in b?b.default:b,m=t(function(e){var t=v,n=h;e.exports=function(){function e(){n(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function r(){return e}e.isRequired=e;var o={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r};return o.checkPropTypes=t,o.PropTypes=o,o}}),g=m&&"object"==typeof m&&"default"in m?m.default:m,j=t(function(e){var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";e.exports=t}),w=j&&"object"==typeof j&&"default"in j?j.default:j,x=t(function(e){var t=v,n=t;e.exports=n}),T=(x&&"object"==typeof x&&"default"in x?x.default:x,t(function(e){function t(e,t,n,r,o){}e.exports=t})),O=T&&"object"==typeof T&&"default"in T?T.default:T,_=(t(function(e){var t=v,n=h,r=w,o=O;e.exports=function(e,i){function u(e){var t=e&&(P&&e[P]||e[C]);if("function"==typeof t)return t}function a(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function f(e){this.message=e,this.stack=""}function c(e){function t(t,o,u,a,c,s,l){return a=a||R,s=s||u,l!==r&&i&&n(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"),null==o[u]?t?new f(null===o[u]?"The "+c+" `"+s+"` is marked as required "+("in `"+a+"`, but its value is `null`."):"The "+c+" `"+s+"` is marked as required in "+("`"+a+"`, but its value is `undefined`.")):null:e(o,u,a,c,s)}var o=t.bind(null,!1);return o.isRequired=t.bind(null,!0),o}function s(e){function t(t,n,r,o,i,u){var a=t[n],c=T(a);if(c!==e){var s=O(a);return new f("Invalid "+o+" `"+i+"` of type "+("`"+s+"` supplied to `"+r+"`, expected ")+("`"+e+"`."))}return null}return c(t)}function l(){return c(t.thatReturnsNull)}function p(e){function t(t,n,o,i,u){if("function"!=typeof e)return new f("Property `"+u+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var a=t[n];if(!Array.isArray(a)){var c=T(a);return new f("Invalid "+i+" `"+u+"` of type "+("`"+c+"` supplied to `"+o+"`, expected an array."))}for(var s=0;s<a.length;s++){var l=e(a,s,o,i,u+"["+s+"]",r);if(l instanceof Error)return l}return null}return c(t)}function y(){function t(t,n,r,o,i){var u=t[n];if(!e(u)){var a=T(u);return new f("Invalid "+o+" `"+i+"` of type "+("`"+a+"` supplied to `"+r+"`, expected a single ReactElement."))}return null}return c(t)}function h(e){function t(t,n,r,o,i){if(!(t[n]instanceof e)){var u=e.name||R,a=_(t[n]);return new f("Invalid "+o+" `"+i+"` of type "+("`"+a+"` supplied to `"+r+"`, expected ")+("instance of `"+u+"`."))}return null}return c(t)}function b(e){function n(t,n,r,o,i){for(var u=t[n],c=0;c<e.length;c++)if(a(u,e[c]))return null;var s=JSON.stringify(e);return new f("Invalid "+o+" `"+i+"` of value `"+u+"` "+("supplied to `"+r+"`, expected one of "+s+"."))}return Array.isArray(e)?c(n):t.thatReturnsNull}function v(e){function t(t,n,o,i,u){if("function"!=typeof e)return new f("Property `"+u+"` of component `"+o+"` has invalid PropType notation inside objectOf.");var a=t[n],c=T(a);if("object"!==c)return new f("Invalid "+i+" `"+u+"` of type "+("`"+c+"` supplied to `"+o+"`, expected an object."));for(var s in a)if(a.hasOwnProperty(s)){var l=e(a,s,o,i,u+"."+s,r);if(l instanceof Error)return l}return null}return c(t)}function m(e){function n(t,n,o,i,u){for(var a=0;a<e.length;a++){var c=e[a];if(null==c(t,n,o,i,u,r))return null}return new f("Invalid "+i+" `"+u+"` supplied to "+("`"+o+"`."))}return Array.isArray(e)?c(n):t.thatReturnsNull}function g(){function e(e,t,n,r,o){return w(e[t])?null:new f("Invalid "+r+" `"+o+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return c(e)}function j(e){function t(t,n,o,i,u){var a=t[n],c=T(a);if("object"!==c)return new f("Invalid "+i+" `"+u+"` of type `"+c+"` "+("supplied to `"+o+"`, expected `object`."));for(var s in e){var l=e[s];if(l){var p=l(a,s,o,i,u+"."+s,r);if(p)return p}}return null}return c(t)}function w(t){switch("undefined"==typeof t?"undefined":d.typeof(t)){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(w);if(null===t||e(t))return!0;var n=u(t);if(!n)return!1;var r,o=n.call(t);if(n!==t.entries){for(;!(r=o.next()).done;)if(!w(r.value))return!1}else for(;!(r=o.next()).done;){var i=r.value;if(i&&!w(i[1]))return!1}return!0;default:return!1}}function x(e,t){return"symbol"===e||("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}function T(e){var t="undefined"==typeof e?"undefined":d.typeof(e);return Array.isArray(e)?"array":e instanceof RegExp?"object":x(t,e)?"symbol":t}function O(e){var t=T(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function _(e){return e.constructor&&e.constructor.name?e.constructor.name:R}var P="function"==typeof Symbol&&Symbol.iterator,C="@@iterator",R="<<anonymous>>",A={array:s("array"),bool:s("boolean"),func:s("function"),number:s("number"),object:s("object"),string:s("string"),symbol:s("symbol"),any:l(),arrayOf:p,element:y(),instanceOf:h,node:g(),objectOf:v,oneOf:b,oneOfType:m,shape:j};return f.prototype=Error.prototype,A.checkPropTypes=o,A.PropTypes=A,A}}),t(function(e){e.exports=g()})),P=_&&"object"==typeof _&&"default"in _?_.default:_,C=1,R=function(t){function n(){return d.classCallCheck(this,n),d.possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return d.inherits(n,t),d.createClass(n,[{key:"getChildContext",value:function(){return{renderer:this.props.renderer}}},{key:"componentDidMount",value:function(){var e=this.props,t=e.mountNode,n=e.renderer;t&&o(n,t)}},{key:"render",value:function(){return e.Children.only(this.props.children)}}]),n}(e.Component);R.propTypes={renderer:P.object.isRequired},R.childContextTypes={renderer:P.object};var A=t(function(e){var t="production",n=function(e,n,r,o,i,u,a,f){if("production"!==t&&void 0===n)throw new Error("invariant requires an error message argument");if(!e){var c;if(void 0===n)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[r,o,i,u,a,f],l=0;c=new Error(n.replace(/%s/g,function(){return s[l++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}};e.exports=n}),S=A&&"object"==typeof A&&"default"in A?A.default:A,E=t(function(e,t){function n(e){return e&&e.__esModule?e:{default:e}}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"!==("undefined"==typeof t?"undefined":d.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 "+("undefined"==typeof t?"undefined":d.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)}t.__esModule=!0;var u=S,a=n(u),f=p,c=n(f),s=function(e){function t(){var n,i,u;r(this,t);for(var a=arguments.length,f=Array(a),c=0;c<a;c++)f[c]=arguments[c];return n=i=o(this,e.call.apply(e,[this].concat(f))),i.state={value:null},u=n,o(i,u)}return i(t,e),t.prototype.componentWillMount=function(){var e=this,t=this.props.channel;if(this.context.broadcasts){var n=this.context.broadcasts[t];"function"!=typeof n?(0,a.default)(!1):void 0,this.unsubscribe=n(function(t){e.setState({value:t})})}},t.prototype.componentWillUnmount=function(){this.unsubscribe&&this.unsubscribe()},t.prototype.render=function(){return this.props.children(this.state.value)},t}(c.default.Component);s.contextTypes={broadcasts:c.default.PropTypes.object},t.default=s}),k=E&&"object"==typeof E&&"default"in E?E.default:E,N=t(function(e,t){function n(e){return e&&e.__esModule?e:{default:e}}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"!==("undefined"==typeof t?"undefined":d.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 "+("undefined"==typeof t?"undefined":d.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)}t.__esModule=!0;var u=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},a=S,f=n(a),c=p,s=n(c),l=function(e){var t=[],n=e;return{publish:function(e){n=e,t.forEach(function(e){return e(n)})},subscribe:function(e){return t.push(e),e(n),function(){return t=t.filter(function(t){return t!==e})}}}},y=function(e){function t(){var n,i,u;r(this,t);for(var a=arguments.length,f=Array(a),c=0;c<a;c++)f[c]=arguments[c];return n=i=o(this,e.call.apply(e,[this].concat(f))),i.broadcast=l(i.props.value),u=n,o(i,u)}return i(t,e),t.prototype.getBroadcastsContext=function(){var e,t=this.props.channel,n=this.context.broadcasts;return u({},n,(e={},e[t]=this.broadcast.subscribe,e))},t.prototype.getChildContext=function(){return{broadcasts:this.getBroadcastsContext()}},t.prototype.componentWillReceiveProps=function(e){this.props.channel!==e.channel?(0,f.default)(!1):void 0,this.props.value!==e.value&&this.broadcast.publish(e.value)},t.prototype.render=function(){return s.default.Children.only(this.props.children)},t}(s.default.Component);y.contextTypes={broadcasts:c.PropTypes.object},y.childContextTypes={broadcasts:c.PropTypes.object.isRequired},t.default=y}),I=N&&"object"==typeof N&&"default"in N?N.default:N,M=t(function(e,t){function n(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.Subscriber=t.Broadcast=void 0;var r=I,o=n(r),i=k,u=n(i);t.Broadcast=o.default,t.Subscriber=u.default}),q=M.Subscriber,F=M.Broadcast,B=Inferno.createVNode,W=t(function(e,t){function n(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function r(e){for(var t=arguments.length,i=Array(t>1?t-1:0),u=1;u<t;u++)i[u-1]=arguments[u];for(var a=0,f=i.length;a<f;++a){var c=i[a];for(var s in c){var l=c[s],p=e[s];if("object"===("undefined"==typeof p?"undefined":o(p))){if(Array.isArray(p)){Array.isArray(l)?e[s]=[].concat(n(p),n(l)):e[s]=[].concat(n(p),[l]);continue}if("object"===("undefined"==typeof l?"undefined":o(l))&&!Array.isArray(l)){e[s]=r({},p,l);continue}}e[s]=l}}return e}Object.defineProperty(t,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"===d.typeof(Symbol.iterator)?function(e){return"undefined"==typeof e?"undefined":d.typeof(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":"undefined"==typeof e?"undefined":d.typeof(e)};t.default=r,e.exports=t.default}),D=W&&"object"==typeof W&&"default"in W?W.default:W,U=l(e.createElement,{renderer:P.object,theme:P.object}),V=Inferno.createVNode,L=function(t,n){var r=t.overwrite,o=void 0!==r&&r,i=t.theme,u=t.children,a=n.theme;return V(16,F,{channel:"felaTheme",value:d.extends({},o?{}:a,i),children:e.Children.only(u)})};L.defaultProps={overwrite:!1},L.contextTypes={theme:P.object};var Y={Provider:R,connect:u,createComponent:U,ThemeProvider:L};return Y}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):e.ReactFela=t(e.React)}(this,function(e){"use strict";function t(e,t){return t={exports:{}},e(t,t.exports),t.exports}function n(e,t){return function(n){if(n.type!==w||n.media)t.textContent=e.renderToString();else try{t.sheet.insertRule(n.selector+"{"+n.declaration+"}",t.sheet.cssRules.length)}catch(e){}}}function r(e){return e&&1===e.nodeType}function o(e,t){if(!r(t))throw new Error("You need to specify a valid element node (nodeType = 1) to render into.");t.setAttribute("data-fela-stylesheet","");var o=n(e,t);e.subscribe(o);var i=e.renderToString();t.textContent!==i&&(t.textContent=i)}function i(e){var t=e.displayName||e.name;return t?"Fela"+t:"ConnectedFelaComponent"}function u(e,t,n){return function(r){return function(o){var u=function(e){function n(){return p.classCallCheck(this,n),p.possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return p.inherits(n,e),p.createClass(n,[{key:"render",value:function(){var e=this.context,n=e.renderer,i=e.theme,u=r(p.extends({},this.props,{theme:i||{}}))(n);return t(o,p.extends({},this.props,{styles:u}))}}]),n}(e);return u.displayName=i(o),n&&(u.contextTypes=p.extends({},o.contextTypes,n)),u}}}function a(e,t,n){for(var r=0,o=e.length;r<o;++r)n=t(n,e[r]);return n}function f(e,t){return a(e,function(e,n){return e[n]=t[n],e},{})}function c(e,t){return"function"==typeof e?Object.keys(e(t)):e}function s(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return a(t,function(t,n){return k(t,n(e))},{})}}function l(e,t){return function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"div",o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=function(t,i){var u=i.renderer,a=i.theme,l=t.children,y=t._felaRule,d=t.passThrough,h=void 0===d?[]:d,v=p.objectWithoutProperties(t,["children","_felaRule","passThrough"]);if(!u)throw new Error("createComponent() can't render styles without the renderer in the context. Missing react-fela's <Provider /> at the app root?");var b=y?s(n,y):n,m=[].concat(p.toConsumableArray(c(o,v)),p.toConsumableArray(c(h,v)));if(r._isFelaComponent)return e(r,p.extends({_felaRule:b,passThrough:m},v),l);var g=f(m,v);if(v.theme=a||{},u.isNativeRenderer){var j=u.renderRule(b,v);g.style=v.style?[v.style,j]:j}else{g.style=v.style;var x=v.className?v.className+" ":"";g.className=x+u.renderRule(b,v)}g.id=v.id,g.ref=v.innerRef;var C=v.is||r;return e(C,g,l)};return t&&(i.contextTypes=t),i.displayName=n.name?n.name:"FelaComponent",i._isFelaComponent=!0,i}}var p={};p.typeof="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.classCallCheck=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},p.createClass=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}}(),p.defineProperty=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},p.extends=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.inherits=function(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)},p.objectWithoutProperties=function(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},p.possibleConstructorReturn=function(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},p.toConsumableArray=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)};var y=t(function(e){function t(e,t,r,o,i,u,a,f){if(n(t),!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var s=[r,o,i,u,a,f],l=0;c=new Error(t.replace(/%s/g,function(){return s[l++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}}var n=function(e){};e.exports=t}),d=y&&"object"==typeof y&&"default"in y?y.default:y,h=t(function(e){function t(e){return function(){return e}}var n=function(){};n.thatReturns=t,n.thatReturnsFalse=t(!1),n.thatReturnsTrue=t(!0),n.thatReturnsNull=t(null),n.thatReturnsThis=function(){return this},n.thatReturnsArgument=function(e){return e},e.exports=n}),v=h&&"object"==typeof h&&"default"in h?h.default:h,b=t(function(e){var t=v,n=d;e.exports=function(){function e(){n(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function r(){return e}e.isRequired=e;var o={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:r,element:e,instanceOf:r,node:e,objectOf:r,oneOf:r,oneOfType:r,shape:r};return o.checkPropTypes=t,o.PropTypes=o,o}}),m=b&&"object"==typeof b&&"default"in b?b.default:b,g=t(function(e){var t="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";e.exports=t}),j=g&&"object"==typeof g&&"default"in g?g.default:g,x=t(function(e){var t=v,n=t;e.exports=n}),C=(x&&"object"==typeof x&&"default"in x?x.default:x,t(function(e){function t(e,t,n,r,o){}e.exports=t})),T=C&&"object"==typeof C&&"default"in C?C.default:C,O=(t(function(e){var t=v,n=d,r=j,o=T;e.exports=function(e,i){function u(e){var t=e&&(w&&e[w]||e[P]);if("function"==typeof t)return t}function a(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function f(e){this.message=e,this.stack=""}function c(e){function t(t,o,u,a,c,s,l){return a=a||A,s=s||u,l!==r&&i&&n(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"),null==o[u]?t?new f(null===o[u]?"The "+c+" `"+s+"` is marked as required "+("in `"+a+"`, but its value is `null`."):"The "+c+" `"+s+"` is marked as required in "+("`"+a+"`, but its value is `undefined`.")):null:e(o,u,a,c,s)}var o=t.bind(null,!1);return o.isRequired=t.bind(null,!0),o}function s(e){function t(t,n,r,o,i,u){var a=t[n],c=T(a);if(c!==e){var s=O(a);return new f("Invalid "+o+" `"+i+"` of type "+("`"+s+"` supplied to `"+r+"`, expected ")+("`"+e+"`."))}return null}return c(t)}function l(){return c(t.thatReturnsNull)}function y(e){function t(t,n,o,i,u){if("function"!=typeof e)return new f("Property `"+u+"` of component `"+o+"` has invalid PropType notation inside arrayOf.");var a=t[n];if(!Array.isArray(a)){var c=T(a);return new f("Invalid "+i+" `"+u+"` of type "+("`"+c+"` supplied to `"+o+"`, expected an array."))}for(var s=0;s<a.length;s++){var l=e(a,s,o,i,u+"["+s+"]",r);if(l instanceof Error)return l}return null}return c(t)}function d(){function t(t,n,r,o,i){var u=t[n];if(!e(u)){var a=T(u);return new f("Invalid "+o+" `"+i+"` of type "+("`"+a+"` supplied to `"+r+"`, expected a single ReactElement."))}return null}return c(t)}function h(e){function t(t,n,r,o,i){if(!(t[n]instanceof e)){var u=e.name||A,a=R(t[n]);return new f("Invalid "+o+" `"+i+"` of type "+("`"+a+"` supplied to `"+r+"`, expected ")+("instance of `"+u+"`."))}return null}return c(t)}function v(e){function n(t,n,r,o,i){for(var u=t[n],c=0;c<e.length;c++)if(a(u,e[c]))return null;var s=JSON.stringify(e);return new f("Invalid "+o+" `"+i+"` of value `"+u+"` "+("supplied to `"+r+"`, expected one of "+s+"."))}return Array.isArray(e)?c(n):t.thatReturnsNull}function b(e){function t(t,n,o,i,u){if("function"!=typeof e)return new f("Property `"+u+"` of component `"+o+"` has invalid PropType notation inside objectOf.");var a=t[n],c=T(a);if("object"!==c)return new f("Invalid "+i+" `"+u+"` of type "+("`"+c+"` supplied to `"+o+"`, expected an object."));for(var s in a)if(a.hasOwnProperty(s)){var l=e(a,s,o,i,u+"."+s,r);if(l instanceof Error)return l}return null}return c(t)}function m(e){function n(t,n,o,i,u){for(var a=0;a<e.length;a++){var c=e[a];if(null==c(t,n,o,i,u,r))return null}return new f("Invalid "+i+" `"+u+"` supplied to "+("`"+o+"`."))}return Array.isArray(e)?c(n):t.thatReturnsNull}function g(){function e(e,t,n,r,o){return x(e[t])?null:new f("Invalid "+r+" `"+o+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return c(e)}function j(e){function t(t,n,o,i,u){var a=t[n],c=T(a);if("object"!==c)return new f("Invalid "+i+" `"+u+"` of type `"+c+"` "+("supplied to `"+o+"`, expected `object`."));for(var s in e){var l=e[s];if(l){var p=l(a,s,o,i,u+"."+s,r);if(p)return p}}return null}return c(t)}function x(t){switch("undefined"==typeof t?"undefined":p.typeof(t)){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(x);if(null===t||e(t))return!0;var n=u(t);if(!n)return!1;var r,o=n.call(t);if(n!==t.entries){for(;!(r=o.next()).done;)if(!x(r.value))return!1}else for(;!(r=o.next()).done;){var i=r.value;if(i&&!x(i[1]))return!1}return!0;default:return!1}}function C(e,t){return"symbol"===e||("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}function T(e){var t="undefined"==typeof e?"undefined":p.typeof(e);return Array.isArray(e)?"array":e instanceof RegExp?"object":C(t,e)?"symbol":t}function O(e){var t=T(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function R(e){return e.constructor&&e.constructor.name?e.constructor.name:A}var w="function"==typeof Symbol&&Symbol.iterator,P="@@iterator",A="<<anonymous>>",_={array:s("array"),bool:s("boolean"),func:s("function"),number:s("number"),object:s("object"),string:s("string"),symbol:s("symbol"),any:l(),arrayOf:y,element:d(),instanceOf:h,node:g(),objectOf:b,oneOf:v,oneOfType:m,shape:j};return f.prototype=Error.prototype,_.checkPropTypes=o,_.PropTypes=_,_}}),t(function(e){e.exports=m()})),R=O&&"object"==typeof O&&"default"in O?O.default:O,w=1,P=function(t){function n(){return p.classCallCheck(this,n),p.possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return p.inherits(n,t),p.createClass(n,[{key:"getChildContext",value:function(){return{renderer:this.props.renderer}}},{key:"componentDidMount",value:function(){var e=this.props,t=e.mountNode,n=e.renderer;t&&o(n,t)}},{key:"render",value:function(){return e.Children.only(this.props.children)}}]),n}(e.Component);P.propTypes={renderer:R.object.isRequired},P.childContextTypes={renderer:R.object};var A=u(e.Component,e.createElement,{renderer:R.object,theme:R.object}),_=t(function(e,t){function n(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function r(e){for(var t=arguments.length,i=Array(t>1?t-1:0),u=1;u<t;u++)i[u-1]=arguments[u];for(var a=0,f=i.length;a<f;++a){var c=i[a];for(var s in c){var l=c[s],p=e[s];if("object"===("undefined"==typeof p?"undefined":o(p))){if(Array.isArray(p)){Array.isArray(l)?e[s]=[].concat(n(p),n(l)):e[s]=[].concat(n(p),[l]);continue}if("object"===("undefined"==typeof l?"undefined":o(l))&&!Array.isArray(l)){e[s]=r({},p,l);continue}}e[s]=l}}return e}Object.defineProperty(t,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"===p.typeof(Symbol.iterator)?function(e){return"undefined"==typeof e?"undefined":p.typeof(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":"undefined"==typeof e?"undefined":p.typeof(e)};t.default=r,e.exports=t.default}),k=_&&"object"==typeof _&&"default"in _?_.default:_,S=l(e.createElement,{renderer:R.object,theme:R.object}),E=function(t){function n(){return p.classCallCheck(this,n),p.possibleConstructorReturn(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return p.inherits(n,t),p.createClass(n,[{key:"getChildContext",value:function(){return{renderer:this.props.renderer}}},{key:"componentDidMount",value:function(){var e=this.props,t=e.mountNode,n=e.renderer;t&&o(n,t)}},{key:"render",value:function(){return e.Children.only(this.props.children)}}]),n}(e.Component);E.propTypes={renderer:R.object.isRequired},E.childContextTypes={renderer:R.object};var N={Provider:P,connect:A,createComponent:S,ThemeProvider:E};return N}); |
{ | ||
"name": "react-fela", | ||
"version": "4.3.3", | ||
"version": "4.3.4", | ||
"description": "React bindings for Fela", | ||
@@ -26,8 +26,7 @@ "module": "index.es2015.js", | ||
"react": "*", | ||
"fela": "4.3.3" | ||
"fela": "4.3.4" | ||
}, | ||
"dependencies": { | ||
"prop-types": "^15.5.8", | ||
"react-broadcast": "0.1.2" | ||
"prop-types": "^15.5.8" | ||
} | ||
} |
@@ -6,3 +6,3 @@ # 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-5.03kb-brightgreen.svg"> | ||
<img alt="gzipped size" src="https://img.shields.io/badge/gzipped-4.22kb-brightgreen.svg"> | ||
@@ -23,5 +23,5 @@ This package only includes React bindings for [Fela](http://github.com/rofrischmann/fela).<br> | ||
<!-- Development build (with warnings) --> | ||
<script src="https://unpkg.com/react-fela@4.3.3/dist/react-fela.js"></script> | ||
<script src="https://unpkg.com/react-fela@4.3.4/dist/react-fela.js"></script> | ||
<!-- Production build (minified) --> | ||
<script src="https://unpkg.com/react-fela@4.3.3/dist/react-fela.min.js"></script> | ||
<script src="https://unpkg.com/react-fela@4.3.4/dist/react-fela.min.js"></script> | ||
``` | ||
@@ -28,0 +28,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
3
0
129246
1099
+ Addedfela@4.3.4(transitive)
- Removedreact-broadcast@0.1.2
- Removedasap@2.0.6(transitive)
- Removedcore-js@1.2.7(transitive)
- Removedcreate-react-class@15.7.0(transitive)
- Removedencoding@0.1.13(transitive)
- Removedfbjs@0.8.18(transitive)
- Removedfela@4.3.3(transitive)
- Removediconv-lite@0.6.3(transitive)
- Removedinvariant@2.2.4(transitive)
- Removedis-stream@1.1.0(transitive)
- Removedisomorphic-fetch@2.2.1(transitive)
- Removednode-fetch@1.7.3(transitive)
- Removedpromise@7.3.1(transitive)
- Removedreact@15.7.0(transitive)
- Removedreact-broadcast@0.1.2(transitive)
- Removedsafer-buffer@2.1.2(transitive)
- Removedsetimmediate@1.0.5(transitive)
- Removedua-parser-js@0.7.40(transitive)
- Removedwhatwg-fetch@3.6.20(transitive)