Comparing version 1.2.14 to 1.2.15
@@ -5,2 +5,8 @@ # Changelog | ||
## [1.2.15] 2018-05-04 | ||
### Fixed | ||
- Fixed props type definition | ||
## [1.2.14] 2018-04-06 | ||
@@ -7,0 +13,0 @@ |
@@ -1,5 +0,5 @@ | ||
import buildStyles from './css/render'; | ||
import createStyler from './styler'; | ||
import { Styler, Props } from './styler/types'; | ||
export default function (nodeOrSelector: Element | string, props: Props): Styler; | ||
import buildStyles from "./css/render"; | ||
import createStyler from "./styler"; | ||
import { Styler, Props } from "./styler/types"; | ||
export default function (nodeOrSelector: Element | string, props?: Props): Styler; | ||
export { createStyler, Styler, buildStyles }; |
@@ -11,9 +11,11 @@ "use strict"; | ||
var createDOMStyler = function (node, props) { | ||
var styler = (node instanceof SVGElement) ? svg_1.default(node) : css_1.default(node, props); | ||
var styler = node instanceof SVGElement ? svg_1.default(node) : css_1.default(node, props); | ||
cache.set(node, styler); | ||
return styler; | ||
}; | ||
var getStyler = function (node, props) { return cache.has(node) ? cache.get(node) : createDOMStyler(node, props); }; | ||
var getStyler = function (node, props) { | ||
return cache.has(node) ? cache.get(node) : createDOMStyler(node, props); | ||
}; | ||
function default_1(nodeOrSelector, props) { | ||
var node = (typeof nodeOrSelector === 'string') | ||
var node = typeof nodeOrSelector === "string" | ||
? document.querySelector(nodeOrSelector) | ||
@@ -20,0 +22,0 @@ : nodeOrSelector; |
{ | ||
"name": "stylefire", | ||
"version": "1.2.14", | ||
"description": "Performant, simplified stylers for CSS, SVG, path and DOM scroll.", | ||
"version": "1.2.15", | ||
"description": | ||
"Performant, simplified stylers for CSS, SVG, path and DOM scroll.", | ||
"main": "index.js", | ||
"types": "index.d.ts", | ||
"files": [ | ||
"css", | ||
"svg", | ||
"index.js", | ||
"styler", | ||
"scroll", | ||
"index.d.ts", | ||
"dist" | ||
], | ||
"files": ["css", "svg", "index.js", "styler", "scroll", "index.d.ts", "dist"], | ||
"scripts": { | ||
@@ -22,3 +15,3 @@ "watch": "tsc -w", | ||
"measure": "gzip -c dist/stylefire.min.js | wc -c", | ||
"prepublishOnly": "npm run lint && tsc" | ||
"prepublishOnly": "npm run build && npm run lint" | ||
}, | ||
@@ -29,10 +22,3 @@ "repository": { | ||
}, | ||
"keywords": [ | ||
"css", | ||
"svg", | ||
"svg", | ||
"path", | ||
"scroll", | ||
"animation" | ||
], | ||
"keywords": ["css", "svg", "svg", "path", "scroll", "animation"], | ||
"author": "Matt Perry", | ||
@@ -51,7 +37,3 @@ "license": "MIT", | ||
"jest": { | ||
"moduleFileExtensions": [ | ||
"ts", | ||
"tsx", | ||
"js" | ||
], | ||
"moduleFileExtensions": ["ts", "tsx", "js"], | ||
"transform": { | ||
@@ -65,3 +47,7 @@ ".(ts|tsx)$": "<rootDir>/node_modules/ts-jest/preprocessor.js" | ||
"style-value-types": "^1.0.4" | ||
}, | ||
"prettier": { | ||
"parser": "typescript", | ||
"singleQuote": true | ||
} | ||
} | ||
} |
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
60689
565