fela-plugin-hover-media
Advanced tools
Comparing version 11.7.0 to 12.0.0-rc.0
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
import isPlainObject from 'isobject'; | ||
import assignStyle from 'css-in-js-utils/lib/assignStyle'; | ||
import { assignStyle } from 'css-in-js-utils'; | ||
@@ -14,5 +14,4 @@ function resolveHoverStyles(style) { | ||
if (property === ':hover' || property === '&:hover') { | ||
style['@media (hover: hover)'] = _defineProperty({}, property, resolvedValue); | ||
style['@media (hover: hover)'] = _defineProperty({}, property, resolvedValue); // Remove the old hover style | ||
// Remove the old hover style | ||
delete style[property]; | ||
@@ -28,6 +27,4 @@ } else { | ||
export default function hoverMedia() { | ||
return function (style, type, renderer, props) { | ||
return resolveHoverStyles(style); | ||
}; | ||
} | ||
export default (function () { | ||
return resolveHoverStyles; | ||
}); |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
"use strict"; | ||
@@ -6,14 +6,10 @@ Object.defineProperty(exports, "__esModule", { | ||
}); | ||
exports.default = hoverMedia; | ||
exports["default"] = void 0; | ||
var _isobject = require('isobject'); | ||
var _isobject = _interopRequireDefault(require("isobject")); | ||
var _isobject2 = _interopRequireDefault(_isobject); | ||
var _cssInJsUtils = require("css-in-js-utils"); | ||
var _assignStyle = require('css-in-js-utils/lib/assignStyle'); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
var _assignStyle2 = _interopRequireDefault(_assignStyle); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
@@ -25,9 +21,8 @@ | ||
if ((0, _isobject2.default)(value)) { | ||
if ((0, _isobject["default"])(value)) { | ||
var resolvedValue = resolveHoverStyles(value); | ||
if (property === ':hover' || property === '&:hover') { | ||
style['@media (hover: hover)'] = _defineProperty({}, property, resolvedValue); | ||
style['@media (hover: hover)'] = _defineProperty({}, property, resolvedValue); // Remove the old hover style | ||
// Remove the old hover style | ||
delete style[property]; | ||
@@ -43,6 +38,6 @@ } else { | ||
function hoverMedia() { | ||
return function (style, type, renderer, props) { | ||
return resolveHoverStyles(style); | ||
}; | ||
} | ||
var _default = function _default() { | ||
return resolveHoverStyles; | ||
}; | ||
exports["default"] = _default; |
{ | ||
"name": "fela-plugin-hover-media", | ||
"version": "11.7.0", | ||
"version": "12.0.0-rc.0", | ||
"description": "Fela plugin to wrap :hover styles in @media (hover: hover)", | ||
@@ -13,4 +13,18 @@ "main": "lib/index.js", | ||
"lib/**", | ||
"es/**" | ||
"es/**", | ||
"umd/**" | ||
], | ||
"scripts": { | ||
"setup": "yarn build", | ||
"clean": "rimraf lib es coverage", | ||
"build": "yarn clean && yarn build:es && yarn build:lib", | ||
"build:es": "babel src --out-dir es --ignore **/__tests__", | ||
"build:lib": "cross-env BABEL_ENV=commonjs babel src --out-dir lib --ignore **/__tests__", | ||
"build:umd": "webpack --config webpack.config.js", | ||
"watch": "npm run watch:lib & npm run watch:es", | ||
"watch:lib": "BABEL_ENV=commonjs babel src -d lib -w", | ||
"watch:es": "babel src -d es -w", | ||
"test": "jest --config=jest.config.js", | ||
"coverage": "yarn test --coverage" | ||
}, | ||
"repository": "https://github.com/robinweser/fela/", | ||
@@ -33,3 +47,20 @@ "keywords": [ | ||
}, | ||
"gitHead": "e067b284984d3dbfc259fcbffde9bb50679fda9b" | ||
"devDependencies": { | ||
"@babel/cli": "^7.2.0", | ||
"@babel/core": "^7.2.2", | ||
"@babel/node": "^7.13.0", | ||
"@babel/plugin-transform-modules-commonjs": "^7.5.0", | ||
"@babel/polyfill": "^7.7.0", | ||
"@babel/preset-env": "^7.5.5", | ||
"babel-core": "7.0.0-bridge.0", | ||
"babel-jest": "^26.6.0", | ||
"babel-loader": "^8.2.3", | ||
"clean-webpack-plugin": "^3.0.0", | ||
"cross-env": "^6.0.3", | ||
"jest": "^26.6.0", | ||
"rimraf": "^3.0.0", | ||
"webpack": "^4.41.6", | ||
"webpack-cli": "^3.3.10" | ||
}, | ||
"gitHead": "00f02f410f17a7693479ea3349bb3a9f223359af" | ||
} |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
8695
6
57
15
2