cloudflare-next-intl 0.9.60 → 0.9.61

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.
@@ -55,7 +55,17 @@ export default function HelperScript() {
55
55
  if (!document.getElementById(overlayStyleId)) {
56
56
  var st = document.createElement('style');
57
57
  st.id = overlayStyleId;
58
- st.textContent = 'html{background:#ffffff !important}body>*:not(#' + overlayId + '){visibility:hidden !important}';
58
+ st.textContent = [
59
+ 'html,body{background:#ffffff !important}',
60
+ 'body>*:not(#' + overlayId + '){visibility:hidden !important}',
61
+ // Until <body> exists there is nowhere to put
62
+ // the spinner element, and a blank screen reads
63
+ // as a hang. A pseudo-element needs no host, so
64
+ // it covers that gap and steps aside as soon as
65
+ // the real overlay is in the document.
66
+ 'html:not(:has(#' + overlayId + '))::after{content:"";position:fixed;top:50%;left:50%;width:2.25rem;height:2.25rem;margin:-1.125rem 0 0 -1.125rem;border:0.1875rem solid #e5e7eb;border-top-color:#17181b;border-radius:50%;animation:cfni-spin 0.8s linear infinite;z-index:2147483647}',
67
+ '@keyframes cfni-spin{to{transform:rotate(360deg)}}'
68
+ ].join('');
59
69
  (document.head || document.documentElement).appendChild(st);
60
70
  }
61
71
  if (document.getElementById(overlayId)) return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloudflare-next-intl",
3
- "version": "0.9.60",
3
+ "version": "0.9.61",
4
4
  "description": "Optimized Next Intl Package Special for App Router and Cloudflare",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",