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

@griffel/react

Package Overview
Dependencies
Maintainers
6
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@griffel/react - npm Package Compare versions

Comparing version 1.5.4 to 1.5.5

src/__css.d.ts

8

package.json
{
"name": "@griffel/react",
"version": "1.5.4",
"version": "1.5.5",
"description": "React implementation of Atomic CSS-in-JS",

@@ -12,3 +12,3 @@ "license": "MIT",

"dependencies": {
"@griffel/core": "^1.9.2",
"@griffel/core": "^1.10.0",
"tslib": "^2.1.0"

@@ -19,5 +19,5 @@ },

},
"module": "./index.esm.js",
"main": "./index.cjs.js",
"module": "./index.esm.js",
"typings": "./index.d.ts"
"types": "./src/index.d.ts"
}

@@ -18,2 +18,3 @@ # Griffel for React.js

- [`createDOMRenderer()`, `RendererProvider`](#createdomrenderer-rendererprovider)
- [insertionPoint](#insertionpoint)
- [styleElementAttributes](#styleelementattributes)

@@ -379,2 +380,26 @@ - [`TextDirectionProvider`](#textdirectionprovider)

### insertionPoint
If specified, a renderer will insert created style tags after this element:
```js
import { createDOMRenderer } from '@griffel/react';
const insertionPoint = document.head.querySelector('#foo');
const renderer = createDOMRenderer(document, {
insertionPoint,
});
```
```html
<html>
<head>
<style id="foo" />
<!-- Style elements created by Griffel will be inserted after "#foo" element -->
<style data-make-styles-bucket="d" />
<style id="bar" />
</head>
</html>
```
### styleElementAttributes

@@ -387,3 +412,3 @@

const renderer = createDOMRenderer(targetDocument, {
const renderer = createDOMRenderer(document, {
styleElementAttributes: {

@@ -390,0 +415,0 @@ nonce: 'random',

@@ -57,5 +57,7 @@ 'use strict';

}
return /*#__PURE__*/React__namespace.createElement('style', Object.assign({
key: stylesheet.bucketName
}, stylesheet.elementAttributes, {
return /*#__PURE__*/React__namespace.createElement('style', {
key: stylesheet.bucketName,
// TODO: support "nonce"
// ...renderer.styleNodeAttributes,
...stylesheet.elementAttributes,
'data-make-styles-rehydration': 'true',

@@ -65,3 +67,3 @@ dangerouslySetInnerHTML: {

}
}));
});
}).filter(Boolean);

@@ -68,0 +70,0 @@ }

@@ -33,5 +33,7 @@ import { styleBucketOrdering } from '@griffel/core';

}
return /*#__PURE__*/React.createElement('style', Object.assign({
key: stylesheet.bucketName
}, stylesheet.elementAttributes, {
return /*#__PURE__*/React.createElement('style', {
key: stylesheet.bucketName,
// TODO: support "nonce"
// ...renderer.styleNodeAttributes,
...stylesheet.elementAttributes,
'data-make-styles-rehydration': 'true',

@@ -41,3 +43,3 @@ dangerouslySetInnerHTML: {

}
}));
});
}).filter(Boolean);

@@ -44,0 +46,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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