@emotion/cache
Advanced tools
Comparing version 11.0.0-next.0 to 11.0.0-next.6
# @emotion/cache | ||
## 11.0.0-next.6 | ||
### Minor Changes | ||
- [`4a891bf6`](https://github.com/emotion-js/emotion/commit/4a891bf6a30e3bb37f8f32031fa75a571c637d9c) [#1473](https://github.com/emotion-js/emotion/pull/1473) Thanks [@jcharry](https://github.com/jcharry)! - Accept new `prepend` option to allow for adding style tags at the beginning of the specified DOM container. | ||
### Patch Changes | ||
- Updated dependencies [[`4a891bf6`](https://github.com/emotion-js/emotion/commit/4a891bf6a30e3bb37f8f32031fa75a571c637d9c)]: | ||
- @emotion/sheet@0.10.0-next.0 | ||
## 11.0.0-next.0 | ||
@@ -4,0 +15,0 @@ |
@@ -206,3 +206,4 @@ 'use strict'; | ||
nonce: options.nonce, | ||
speedy: options.speedy | ||
speedy: options.speedy, | ||
prepend: options.prepend | ||
}), | ||
@@ -209,0 +210,0 @@ nonce: options.nonce, |
@@ -200,3 +200,4 @@ import { StyleSheet } from '@emotion/sheet'; | ||
nonce: options.nonce, | ||
speedy: options.speedy | ||
speedy: options.speedy, | ||
prepend: options.prepend | ||
}), | ||
@@ -203,0 +204,0 @@ nonce: options.nonce, |
@@ -289,3 +289,4 @@ 'use strict'; | ||
nonce: options.nonce, | ||
speedy: options.speedy | ||
speedy: options.speedy, | ||
prepend: options.prepend | ||
}), | ||
@@ -292,0 +293,0 @@ nonce: options.nonce, |
@@ -50,10 +50,10 @@ "use strict"; | ||
if (1 === context && 108 === content.charCodeAt(0) && 98 === content.charCodeAt(2)) return ""; | ||
}, isBrowser = "undefined" != typeof document, rootServerStylisCache = {}, getServerStylisCache = isBrowser ? void 0 : weakMemoize(function() { | ||
var getCache = weakMemoize(function() { | ||
}, isBrowser = "undefined" != typeof document, rootServerStylisCache = {}, getServerStylisCache = isBrowser ? void 0 : weakMemoize((function() { | ||
var getCache = weakMemoize((function() { | ||
return {}; | ||
}), prefixTrueCache = {}, prefixFalseCache = {}; | ||
})), prefixTrueCache = {}, prefixFalseCache = {}; | ||
return function(prefix) { | ||
return void 0 === prefix || !0 === prefix ? prefixTrueCache : !1 === prefix ? prefixFalseCache : getCache(prefix); | ||
}; | ||
}), createCache = function(options) { | ||
})), createCache = function(options) { | ||
void 0 === options && (options = {}); | ||
@@ -68,7 +68,7 @@ var stylisOptions, key = options.key || "css"; | ||
var nodes = document.querySelectorAll("style[data-emotion-" + key + "]"); | ||
Array.prototype.forEach.call(nodes, function(node) { | ||
node.getAttribute("data-emotion-" + key).split(" ").forEach(function(id) { | ||
Array.prototype.forEach.call(nodes, (function(node) { | ||
node.getAttribute("data-emotion-" + key).split(" ").forEach((function(id) { | ||
inserted[id] = !0; | ||
}), node.parentNode !== container && container.appendChild(node); | ||
}); | ||
})), node.parentNode !== container && container.appendChild(node); | ||
})); | ||
} | ||
@@ -98,3 +98,4 @@ if (isBrowser) stylis.use(options.stylisPlugins)(ruleSheet), _insert = function(selector, serialized, sheet, shouldCache) { | ||
nonce: options.nonce, | ||
speedy: options.speedy | ||
speedy: options.speedy, | ||
prepend: options.prepend | ||
}), | ||
@@ -101,0 +102,0 @@ nonce: options.nonce, |
@@ -283,3 +283,4 @@ import { StyleSheet } from '@emotion/sheet'; | ||
nonce: options.nonce, | ||
speedy: options.speedy | ||
speedy: options.speedy, | ||
prepend: options.prepend | ||
}), | ||
@@ -286,0 +287,0 @@ nonce: options.nonce, |
{ | ||
"name": "@emotion/cache", | ||
"version": "11.0.0-next.0", | ||
"version": "11.0.0-next.6", | ||
"description": "emotion's cache", | ||
@@ -18,3 +18,3 @@ "main": "dist/cache.cjs.js", | ||
"dependencies": { | ||
"@emotion/sheet": "0.9.3", | ||
"@emotion/sheet": "0.10.0-next.0", | ||
"@emotion/stylis": "0.8.4", | ||
@@ -21,0 +21,0 @@ "@emotion/utils": "0.11.2", |
@@ -59,1 +59,7 @@ # @emotion/cache | ||
A DOM node that emotion will insert all of its style tags into. This is useful for inserting styles into iframes. | ||
### `prepend` | ||
`boolean` | ||
A string representing whether to prepend rather than append style tags into the specified container DOM node. |
@@ -22,3 +22,4 @@ // @flow | ||
container?: HTMLElement, | ||
speedy?: boolean | ||
speedy?: boolean, | ||
prepend?: boolean | ||
} | ||
@@ -244,3 +245,4 @@ | ||
nonce: options.nonce, | ||
speedy: options.speedy | ||
speedy: options.speedy, | ||
prepend: options.prepend | ||
}), | ||
@@ -247,0 +249,0 @@ nonce: options.nonce, |
@@ -15,4 +15,5 @@ // Definitions by: Junyoung Clare Jang <https://github.com/Ailrun> | ||
speedy?: boolean | ||
prepend?: boolean | ||
} | ||
export default function createCache(options?: Options): EmotionCache |
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
47459
1344
65
+ Added@emotion/sheet@0.10.0-next.0(transitive)
- Removed@emotion/sheet@0.9.3(transitive)
Updated@emotion/sheet@0.10.0-next.0