gatsby-core-theme 44.5.0-poc.2 → 44.5.0-poc.3
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/CHANGELOG.md +7 -0
- package/gatsby-browser.js +0 -22
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [44.5.0-poc.3](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.5.0-poc.2...v44.5.0-poc.3) (2025-09-09)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* remove yieldToMain ([4c2b852](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/commit/4c2b85257b3e69712db882f487ac9a6a9bd3a044))
|
|
7
|
+
|
|
1
8
|
# [44.5.0-poc.2](https://gitlab.com/g2m-gentoo/team-floyd/themes/gatsby-themes/compare/v44.5.0-poc.1...v44.5.0-poc.2) (2025-09-05)
|
|
2
9
|
|
|
3
10
|
|
package/gatsby-browser.js
CHANGED
|
@@ -16,17 +16,6 @@ require("./src/styles/base/_reset.scss");
|
|
|
16
16
|
require("./src/styles/base/_spacing.scss");
|
|
17
17
|
require("./src/styles/layouts/_grid.scss");
|
|
18
18
|
|
|
19
|
-
async function yieldToMain() {
|
|
20
|
-
if (globalThis.scheduler?.yield) {
|
|
21
|
-
return scheduler.yield();
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// Fall back to yielding with setTimeout.
|
|
25
|
-
return new Promise((resolve) => {
|
|
26
|
-
setTimeout(resolve, 0);
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
|
|
30
19
|
function initGTM() {
|
|
31
20
|
if (
|
|
32
21
|
window.loadGTM === false ||
|
|
@@ -142,7 +131,6 @@ const piguard = () => {
|
|
|
142
131
|
};
|
|
143
132
|
|
|
144
133
|
async function scrollEvent(event) {
|
|
145
|
-
await yieldToMain();
|
|
146
134
|
initGTM();
|
|
147
135
|
if (
|
|
148
136
|
!document.getElementById("piguard") &&
|
|
@@ -202,14 +190,4 @@ exports.onClientEntry = () => {
|
|
|
202
190
|
document.addEventListener("mousemove", scrollEvent);
|
|
203
191
|
document.addEventListener("touchstart", scrollEvent, { passive: true });
|
|
204
192
|
}
|
|
205
|
-
if (window.dataLayer && typeof window.dataLayer.push === "function") {
|
|
206
|
-
const originalPush = window.dataLayer.push.bind(window.dataLayer);
|
|
207
|
-
|
|
208
|
-
window.dataLayer.push = function (...args) {
|
|
209
|
-
(async () => {
|
|
210
|
-
await yieldToMain();
|
|
211
|
-
originalPush(...args);
|
|
212
|
-
})();
|
|
213
|
-
};
|
|
214
|
-
}
|
|
215
193
|
};
|