mnfst 0.5.190 → 0.5.192
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/lib/manifest.integrity.json +2 -2
- package/lib/manifest.js +4 -2
- package/lib/manifest.utilities.js +23 -6
- package/package.json +1 -1
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"manifest.toasts.js": "sha384-/OV32LLMJl0Iw8NoNQJ+5lgntLxjIJq/YNj5JAKS/+nUhVx4MMB9h1FOqP7zuj2M",
|
|
29
29
|
"manifest.tooltips.js": "sha384-uXVVQADl6pY2Pj9i/UaSclZN7dzbKhLkmevv7Ad0+wXR8LgqodALNFrc5jZJjlwm",
|
|
30
30
|
"manifest.url.parameters.js": "sha384-J2aSVBOPsoqsbafHndrWLHEDpKb4AKJAoQnVmKA4gZh5P/8HHjFWHO/lkusmG84l",
|
|
31
|
-
"manifest.utilities.js": "sha384-
|
|
31
|
+
"manifest.utilities.js": "sha384-hdY+KpPRMlSC39Z6hjQ0CoobyhCOMOSpa08LakDLlOLYhXSAK1VU21Jk+Jt46Q4n",
|
|
32
32
|
"manifest.virtual.js": "sha384-OPHiW1zQxunoL+yJrCxFU3AzTfTlZQfUf6X3XSRrSyNDPlr3BvsYe6vZa0DlOjoY",
|
|
33
|
-
"manifest.js": "sha384-
|
|
33
|
+
"manifest.js": "sha384-Dgmw+Iaek5GSdW3qwRgTJ6Rzv1c+CEpRF38e7a4+Wo5ST32IxBXCDFXMEtVH1ZRA"
|
|
34
34
|
}
|
package/lib/manifest.js
CHANGED
|
@@ -790,6 +790,7 @@
|
|
|
790
790
|
let fired = false;
|
|
791
791
|
let quietTimer = null;
|
|
792
792
|
const mdIdle = () => !(window.__manifestMarkdownPending > 0);
|
|
793
|
+
const utilIdle = () => !(window.__manifestUtilitiesPending > 0);
|
|
793
794
|
const fire = () => {
|
|
794
795
|
if (fired) return;
|
|
795
796
|
fired = true;
|
|
@@ -798,14 +799,15 @@
|
|
|
798
799
|
};
|
|
799
800
|
const check = () => {
|
|
800
801
|
if (fired) return;
|
|
801
|
-
if (!state.data || !state.utilities || !mdIdle()) return;
|
|
802
|
+
if (!state.data || !state.utilities || !mdIdle() || !utilIdle()) return;
|
|
802
803
|
clearTimeout(quietTimer);
|
|
803
804
|
quietTimer = setTimeout(() => {
|
|
804
|
-
if (state.data && state.utilities && mdIdle()) fire();
|
|
805
|
+
if (state.data && state.utilities && mdIdle() && utilIdle()) fire();
|
|
805
806
|
}, 300);
|
|
806
807
|
};
|
|
807
808
|
window.addEventListener('manifest:render-ready', () => { state.data = true; check(); });
|
|
808
809
|
window.addEventListener('manifest:utilities-ready', () => { state.utilities = true; check(); });
|
|
810
|
+
window.addEventListener('manifest:utilities-idle', check);
|
|
809
811
|
window.addEventListener('manifest:markdown-idle', check);
|
|
810
812
|
setTimeout(fire, 15000);
|
|
811
813
|
check();
|
|
@@ -3148,17 +3148,27 @@ TailwindCompiler.prototype.compile = async function () {
|
|
|
3148
3148
|
const compileStart = performance.now();
|
|
3149
3149
|
|
|
3150
3150
|
try {
|
|
3151
|
-
//
|
|
3151
|
+
// Throttled or busy: don't DROP the request — queue exactly one retry
|
|
3152
|
+
// so late-discovered classes (md: variants on swapped-in components)
|
|
3153
|
+
// always get compiled. The pending counter lets manifest:ready and the
|
|
3154
|
+
// prerenderer's settle hold until utilities are actually current.
|
|
3152
3155
|
const now = Date.now();
|
|
3153
|
-
if (now - this.lastCompileTime < this.minCompileInterval) {
|
|
3156
|
+
if (now - this.lastCompileTime < this.minCompileInterval || this.isCompiling) {
|
|
3157
|
+
if (!this._retryQueued) {
|
|
3158
|
+
this._retryQueued = true;
|
|
3159
|
+
window.__manifestUtilitiesPending = (window.__manifestUtilitiesPending || 0) + 1;
|
|
3160
|
+
setTimeout(() => {
|
|
3161
|
+
this._retryQueued = false;
|
|
3162
|
+
window.__manifestUtilitiesPending = Math.max(0, (window.__manifestUtilitiesPending || 1) - 1);
|
|
3163
|
+
this.compile();
|
|
3164
|
+
}, this.minCompileInterval + 50);
|
|
3165
|
+
}
|
|
3154
3166
|
return;
|
|
3155
3167
|
}
|
|
3156
3168
|
this.lastCompileTime = now;
|
|
3157
|
-
|
|
3158
|
-
if (this.isCompiling) {
|
|
3159
|
-
return;
|
|
3160
|
-
}
|
|
3161
3169
|
this.isCompiling = true;
|
|
3170
|
+
window.__manifestUtilitiesPending = (window.__manifestUtilitiesPending || 0) + 1;
|
|
3171
|
+
this._compileCounted = true;
|
|
3162
3172
|
|
|
3163
3173
|
// On first run, scan static classes and CSS variables
|
|
3164
3174
|
if (!this.hasScannedStatic) {
|
|
@@ -3323,6 +3333,13 @@ TailwindCompiler.prototype.compile = async function () {
|
|
|
3323
3333
|
console.error('[Manifest Utilities] Error compiling Tailwind CSS:', error);
|
|
3324
3334
|
} finally {
|
|
3325
3335
|
this.isCompiling = false;
|
|
3336
|
+
if (this._compileCounted) {
|
|
3337
|
+
this._compileCounted = false;
|
|
3338
|
+
window.__manifestUtilitiesPending = Math.max(0, (window.__manifestUtilitiesPending || 1) - 1);
|
|
3339
|
+
if (!window.__manifestUtilitiesPending) {
|
|
3340
|
+
window.dispatchEvent(new CustomEvent('manifest:utilities-idle'));
|
|
3341
|
+
}
|
|
3342
|
+
}
|
|
3326
3343
|
// First-compile settle signal for the manifest:ready coordinator.
|
|
3327
3344
|
if (!window.__manifestUtilitiesReady) {
|
|
3328
3345
|
window.__manifestUtilitiesReady = true;
|