@griffel/react
Advanced tools
Comparing version 1.5.4 to 1.5.5
{ | ||
"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
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
83130
801
636
134025
45
1
1
0
8
+ Added@griffel/core@1.18.1(transitive)
- Removed@griffel/core@1.18.2(transitive)
Updated@griffel/core@^1.10.0