@measured/puck-plugin-emotion-cache 0.17.2-canary.f323610 → 0.17.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -905,14 +905,16 @@ var createEmotionCachePlugin = (key) => {
905
905
  iframe: ({ children, document: document2 }) => {
906
906
  const [cache, setCache] = (0, import_react2.useState)(null);
907
907
  (0, import_react2.useEffect)(() => {
908
- if (document2) {
909
- setCache(
910
- createCache({
911
- key,
912
- container: document2.head
913
- })
914
- );
915
- }
908
+ setTimeout(() => {
909
+ if (document2) {
910
+ setCache(
911
+ createCache({
912
+ key,
913
+ container: document2.head
914
+ })
915
+ );
916
+ }
917
+ }, 0);
916
918
  }, [document2, key]);
917
919
  if (cache) {
918
920
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react3.CacheProvider, { value: cache, children });
package/dist/index.mjs CHANGED
@@ -869,14 +869,16 @@ var createEmotionCachePlugin = (key) => {
869
869
  iframe: ({ children, document: document2 }) => {
870
870
  const [cache, setCache] = useState(null);
871
871
  useEffect(() => {
872
- if (document2) {
873
- setCache(
874
- createCache({
875
- key,
876
- container: document2.head
877
- })
878
- );
879
- }
872
+ setTimeout(() => {
873
+ if (document2) {
874
+ setCache(
875
+ createCache({
876
+ key,
877
+ container: document2.head
878
+ })
879
+ );
880
+ }
881
+ }, 0);
880
882
  }, [document2, key]);
881
883
  if (cache) {
882
884
  return /* @__PURE__ */ jsx(CacheProvider, { value: cache, children });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@measured/puck-plugin-emotion-cache",
3
- "version": "0.17.2-canary.f323610",
3
+ "version": "0.17.2",
4
4
  "author": "Measured Corporation Ltd <hello@measured.co>",
5
5
  "repository": "measuredco/puck",
6
6
  "bugs": "https://github.com/measuredco/puck/issues",
@@ -23,7 +23,7 @@
23
23
  ],
24
24
  "devDependencies": {
25
25
  "@emotion/react": "^11.13.3",
26
- "@measured/puck": "^0.17.2-canary.f323610",
26
+ "@measured/puck": "^0.17.2",
27
27
  "@types/react": "^19.0.1",
28
28
  "@types/react-dom": "^19.0.2",
29
29
  "eslint": "^7.32.0",