aesthetic-adapter-glamor
Advanced tools
Comparing version 0.5.2 to 0.5.4
@@ -13,2 +13,6 @@ 'use strict'; | ||
exports.default = _NativeAdapter2.default; | ||
exports.default = _NativeAdapter2.default; /** | ||
* @copyright 2017, Miles Johnson | ||
* @license https://opensource.org/licenses/MIT | ||
* | ||
*/ |
@@ -17,4 +17,10 @@ 'use strict'; | ||
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); } 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; } | ||
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); } 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; } /** | ||
* @copyright 2017, Miles Johnson | ||
* @license https://opensource.org/licenses/MIT | ||
* | ||
*/ | ||
/*:: import type { StyleDeclarationMap, TransformedStylesMap } from '../../types';*/ | ||
var GlamorAdapter = function (_Adapter) { | ||
@@ -31,3 +37,3 @@ _inherits(GlamorAdapter, _Adapter); | ||
key: 'transform', | ||
value: function transform(styleName, declarations) { | ||
value: function transform(styleName /*: string*/, declarations /*: StyleDeclarationMap*/) /*: TransformedStylesMap*/ { | ||
var _this2 = this; | ||
@@ -43,3 +49,3 @@ | ||
Object.keys(declarations).forEach(function (setName) { | ||
Object.keys(declarations).forEach(function (setName /*: string*/) { | ||
var value = declarations[setName]; | ||
@@ -46,0 +52,0 @@ |
{ | ||
"name": "aesthetic-adapter-glamor", | ||
"version": "0.5.2", | ||
"version": "0.5.4", | ||
"description": "Glamor support for Aesthetic.", | ||
@@ -18,12 +18,12 @@ "keywords": [ | ||
"dependencies": { | ||
"aesthetic-utils": "^0.4.1" | ||
"aesthetic-utils": "^0.4.2" | ||
}, | ||
"peerDependencies": { | ||
"aesthetic": "^0.5.2", | ||
"aesthetic": "^0.6.1", | ||
"glamor": "^2.20.20" | ||
}, | ||
"devDependencies": { | ||
"aesthetic": "^0.5.2", | ||
"glamor": "^2.20.23" | ||
"aesthetic": "^0.6.1", | ||
"glamor": "^2.20.24" | ||
} | ||
} |
@@ -13,2 +13,6 @@ 'use strict'; | ||
exports.default = _UnifiedAdapter2.default; | ||
exports.default = _UnifiedAdapter2.default; /** | ||
* @copyright 2017, Miles Johnson | ||
* @license https://opensource.org/licenses/MIT | ||
* | ||
*/ |
@@ -29,4 +29,10 @@ 'use strict'; | ||
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); } 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; } | ||
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); } 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; } /** | ||
* @copyright 2017, Miles Johnson | ||
* @license https://opensource.org/licenses/MIT | ||
* | ||
*/ | ||
/*:: import type { StyleDeclarationMap, TransformedStylesMap, CSSStyle } from '../../types';*/ | ||
var UnifiedGlamorAdapter = function (_GlamorAdapter) { | ||
@@ -36,3 +42,3 @@ _inherits(UnifiedGlamorAdapter, _GlamorAdapter); | ||
function UnifiedGlamorAdapter() { | ||
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | ||
var options /*: Object*/ = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | ||
@@ -43,3 +49,4 @@ _classCallCheck(this, UnifiedGlamorAdapter); | ||
_this.onDeclaration = function (setName, properties) { | ||
_this.onDeclaration = function (setName /*: string*/, properties /*: CSSStyle*/) { | ||
// Animation keyframes | ||
if ('animationName' in properties) { | ||
@@ -49,2 +56,3 @@ properties.animationName = _this.syntax.keyframeNames[String(properties.animationName)]; | ||
// Media queries | ||
if (_this.syntax.mediaQueries[setName]) { | ||
@@ -54,2 +62,3 @@ (0, _aestheticUtils.injectAtRules)(properties, '@media', _this.syntax.mediaQueries[setName]); | ||
// Fallbacks | ||
if (_this.syntax.fallbacks[setName]) { | ||
@@ -60,7 +69,7 @@ (0, _aestheticUtils.injectFallbacks)(properties, _this.syntax.fallbacks[setName]); | ||
_this.onFontFace = function (setName, familyName, properties) { | ||
_this.onFontFace = function (setName /*: string*/, familyName /*: string*/, properties /*: CSSStyle*/) { | ||
_this.syntax.fontFaceNames[familyName] = _glamor.css.fontFace(properties); | ||
}; | ||
_this.onKeyframe = function (setName, animationName, properties) { | ||
_this.onKeyframe = function (setName /*: string*/, animationName /*: string*/, properties /*: CSSStyle*/) { | ||
_this.syntax.keyframeNames[animationName] = _glamor.css.keyframes(animationName, properties); | ||
@@ -76,3 +85,3 @@ }; | ||
key: 'convert', | ||
value: function convert(declarations) { | ||
value: function convert(declarations /*: StyleDeclarationMap*/) /*: StyleDeclarationMap*/ { | ||
return this.syntax.convert(declarations); | ||
@@ -82,3 +91,3 @@ } | ||
key: 'transform', | ||
value: function transform(styleName, declarations) { | ||
value: function transform(styleName /*: string*/, declarations /*: StyleDeclarationMap*/) /*: TransformedStylesMap*/ { | ||
return _get(UnifiedGlamorAdapter.prototype.__proto__ || Object.getPrototypeOf(UnifiedGlamorAdapter.prototype), 'transform', this).call(this, styleName, this.convert(declarations)); | ||
@@ -85,0 +94,0 @@ } |
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
14865
135
+ Addedaesthetic@0.6.2(transitive)
- Removedaesthetic@0.5.2(transitive)
Updatedaesthetic-utils@^0.4.2