Comparing version 0.0.0-9b91201 to 0.0.0-bb0573f
{ | ||
"version": "0.0.0-9b91201", | ||
"version": "0.0.0-bb0573f", | ||
"name": "styleq", | ||
"main": "styleq.js", | ||
"module": "dist/styleq.js", | ||
"sideEffects": false, | ||
"license": "MIT", | ||
@@ -10,2 +11,7 @@ "description": "A quick JavaScript runtime for Atomic CSS compilers.", | ||
"author": "Nicolas Gallagher", | ||
"files": [ | ||
"dist", | ||
"*.js", | ||
"*.ts" | ||
], | ||
"scripts": { | ||
@@ -12,0 +18,0 @@ "benchmark": "node test/benchmark.node.js", |
@@ -133,3 +133,3 @@ # styleQ · [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/necolas/styleq/blob/main/LICENSE) [![npm version](https://img.shields.io/npm/v/styleq.svg?style=flat)](https://www.npmjs.com/package/styleq) [![Build Status](https://github.com/necolas/styleq/workflows/tests/badge.svg)](https://github.com/necolas/styleq/actions) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/necolas/styleq/blob/master/.github/CONTRIBUTING.md) | ||
WARNING: Transforming compiled styles to support runtime dynamism while retaining excellent performance is possible, however, transforms must be done carefully to avoid creating merge operations that cannot be efficiently memoized. `WeakMap` is recommneded for memoizing the result of transforms, so that static objects are passed to styleq. | ||
WARNING: Transforming compiled styles to support runtime dynamism while retaining excellent performance is possible, however, transforms must be done carefully to avoid creating merge operations that cannot be efficiently memoized. `WeakMap` is recommended for memoizing the result of transforms, so that static objects are passed to styleq. | ||
@@ -247,3 +247,3 @@ ## Notes for compiler authors | ||
const reset = creacreateResetStyleteStyles({ | ||
const reset = createResetStyle({ | ||
display: 'flex', | ||
@@ -265,3 +265,3 @@ alignItems: 'stretch', | ||
function View(props) { | ||
const [ className, inlineStyle ] = styleq(styles.$reset, props.css); | ||
const [ className, inlineStyle ] = styleq(reset, props.css); | ||
return ( | ||
@@ -325,5 +325,8 @@ <div {...props} className={className} style={inlineStyle} /> | ||
const [ className, style ] = customStyleq( | ||
// The dynamic value is set to the custom property. | ||
// With static/dynamic mixing disabled, the position of the inline style | ||
// is irrelevant. However, with mixing enabled, the best performance is | ||
// achieved by placing inline styles earlier in the queue. | ||
{ '--opacity-xyz': props.opacity }, | ||
compiledStyle, | ||
// The dynamic value is set to the custom property | ||
{ '--opacity-xyz': props.opacity }, | ||
props.css | ||
@@ -384,3 +387,3 @@ ); | ||
$$css: true, | ||
'@@theme': 'theme-default' | ||
$$theme: 'theme-default' | ||
}; | ||
@@ -387,0 +390,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
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
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
493
1
27250
8
220
1