Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

styleq

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

styleq - npm Package Compare versions

Comparing version 0.0.0-9b91201 to 0.0.0-bb0573f

dist/styleq.js

8

package.json
{
"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",

15

README.md

@@ -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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc