mnfst 0.5.239 → 0.5.240
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.appwrite.data.js +1 -1
- package/lib/manifest.data.js +1 -1
- package/lib/manifest.integrity.json +4 -4
- package/lib/manifest.js +105 -22
- package/lib/manifest.sw.js +1 -1
- package/package.json +1 -1
package/lib/manifest.data.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifest.appwrite.auth.js": "sha384-dsIWnH0qCAGSzAXMGrd8fvOrVl4tOIE6j5tC35JPTrQXZ56qLD36ARyvhR7vi3Id",
|
|
3
|
-
"manifest.appwrite.data.js": "sha384-
|
|
3
|
+
"manifest.appwrite.data.js": "sha384-F73BvcB8ih1vCMLgrJI6+PQf2KnGIMyuuAldRe5Lv6KFRSyX36nId6T8Su6aXUHF",
|
|
4
4
|
"manifest.appwrite.presences.js": "sha384-JyVDWFT69b7Svq8J8p9tNWe2v9PZNQBY5UyhtOl1vnuHFAX0CRQ3MA9SiKq5wzNh",
|
|
5
5
|
"manifest.bindings.js": "sha384-lPtMf8Ykaic9gNVZKq8Scia1881ZeMAyxer3WCIkUNwwrgzGBWto1OXADUwjvORF",
|
|
6
6
|
"manifest.charts.js": "sha384-gEAv/98+29RbhvNkiNWTNyBPbLTFr2Ld15wLu29FLCL57j1cwGChRrL9Pfk7dBtT",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"manifest.combobox.js": "sha384-MILTkrgsTzsYUjGo4ZuADqV85Xs4GmfB4xexfe9vbJMIoQTZ42W4zs+DTaVSPEsx",
|
|
12
12
|
"manifest.components.js": "sha384-JalISaBBWNFl3ggx92Hb3B52EpwwG3gzgra6Q+js0OgZ8vrFKMD48CuBox2N9A5T",
|
|
13
13
|
"manifest.computed.js": "sha384-GYML/e81gQfN+iDbqhPUgny8bINCyL+SrbTofoGk4hlCnLLjv51mCv42JMqq+ku5",
|
|
14
|
-
"manifest.data.js": "sha384-
|
|
14
|
+
"manifest.data.js": "sha384-1+l0N0eCERH88WwGgklBovPC2VEj5nbdfI6dvvj/lm+t4g6MhMn1XjlRHbJUTMoP",
|
|
15
15
|
"manifest.datepicker.js": "sha384-XnbeURni2X91ozVzatQcSjYYIS4MoW12dBRJnYAGBr0nCQ624heH5s+xtQSpLZX6",
|
|
16
16
|
"manifest.defer.js": "sha384-pMRGqQKiEoJhpUcD40QeM4jEHau7sz9Xn/YCpiUamT1T4xJBZDSiYX+xnVrSWoq+",
|
|
17
17
|
"manifest.device.js": "sha384-g+txmrEszYtuOvRelTp/c1wSNR2AtllVI9rx5NPPD7DzhVUnMNughonZykv2xlBW",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"manifest.slides.js": "sha384-3uRTkyK9XPLmnxI2+igZlpi4EyPlU/7IHj5j3BZJJ2KN455vXyk99fiXV3feO/XY",
|
|
29
29
|
"manifest.status.js": "sha384-MBO345ab7H6Uq1X2dZLt4Ge1Gcra+Z2qYApvlAeIV8CJhDDJrz2FPXpp+Kcp8zcM",
|
|
30
30
|
"manifest.svg.js": "sha384-qr/8H9+2cIhSXNbRWRtIdrDlTOxKlNJqwEefHvCYoiBNW/kKhPTFa109Orv/EBnb",
|
|
31
|
-
"manifest.sw.js": "sha384-
|
|
31
|
+
"manifest.sw.js": "sha384-v57876ZQ8S05eevNRKLI9rfeCdiLz1VafEFf4jFtvdnrSt84G7Gb/2dKsiqebszs",
|
|
32
32
|
"manifest.tabs.js": "sha384-OIIcyaQnGS0eNYk4zgAFEDboNYect7THvUd9D0V6nqCeDOxQcoiqLrBEmmWVTTet",
|
|
33
33
|
"manifest.tailwind.js": "sha384-r/Jvqb+Piz21jUts10BbVAJoKkShOdJRVFpywyi4HPIi/OfOJq5CtPyWAPbdkMgt",
|
|
34
34
|
"manifest.toasts.js": "sha384-3zkWxzw693pxg3QDFsoYCA3CqYaLKmBaMArULXODD66Utolpewl0OAeTB92aWUVv",
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"manifest.url.parameters.js": "sha384-J2aSVBOPsoqsbafHndrWLHEDpKb4AKJAoQnVmKA4gZh5P/8HHjFWHO/lkusmG84l",
|
|
37
37
|
"manifest.utilities.js": "sha384-L5uXMLFBIF6LUM1haRjd4eGjHSWuqsCYSpPZRPYosNfJsMC5U5TnmjBxIhrZRe2d",
|
|
38
38
|
"manifest.virtual.js": "sha384-ZDNoF9QVhVcVpkjIK6NH15S6I5c6OBshiJpXSOYjNsIB+298I0a7g3aFO+jyq4Vb",
|
|
39
|
-
"manifest.js": "sha384-
|
|
39
|
+
"manifest.js": "sha384-awBD5RsuSptlguWJ5H1+89A9coKlT3lx4+i2PLZdRxeCymaG7SYBeQ7OhbCCnZGA"
|
|
40
40
|
}
|
package/lib/manifest.js
CHANGED
|
@@ -124,43 +124,126 @@
|
|
|
124
124
|
/*
|
|
125
125
|
* Reconcile baked x-for/x-if clones kept for crawlers — their <template> is still
|
|
126
126
|
* live, so Alpine would render duplicates. x-if clones are adopted via
|
|
127
|
-
* `_x_currentIfEl` (avoids re-rendering heavy content)
|
|
127
|
+
* `_x_currentIfEl` (avoids re-rendering heavy content) and stay inert until
|
|
128
|
+
* their guard holds; x-for clones are removed.
|
|
128
129
|
* Runs on alpine:init so a page without Alpine keeps its baked content.
|
|
129
130
|
*/
|
|
131
|
+
const adoptedIfs = new Set();
|
|
132
|
+
const adoptedTpls = new WeakSet();
|
|
133
|
+
let settleQueued = false;
|
|
134
|
+
function settleAdopted() {
|
|
135
|
+
for (const a of [...adoptedIfs]) a.settle();
|
|
136
|
+
}
|
|
137
|
+
function queueSettle() {
|
|
138
|
+
if (settleQueued) return;
|
|
139
|
+
settleQueued = true;
|
|
140
|
+
queueMicrotask(() => { settleQueued = false; settleAdopted(); });
|
|
141
|
+
}
|
|
142
|
+
function underIgnore(node) {
|
|
143
|
+
for (let n = node.parentNode; n; n = n.parentNode) if (n._x_ignore) return true;
|
|
144
|
+
return false;
|
|
145
|
+
}
|
|
130
146
|
function adoptIfClone(tpl, el) {
|
|
131
147
|
const A = window.Alpine;
|
|
132
|
-
|
|
148
|
+
const expr = tpl.getAttribute('x-if');
|
|
149
|
+
// No Alpine root above: never walked, so the clone binds as before.
|
|
150
|
+
let live = !tpl.closest('[x-data],[x-init]');
|
|
151
|
+
let pending = false;
|
|
152
|
+
let stopWatch = null;
|
|
153
|
+
const guard = () => !!A.evaluate(tpl, expr);
|
|
154
|
+
const unwatch = () => {
|
|
155
|
+
if (stopWatch) { stopWatch(); stopWatch = null; }
|
|
156
|
+
};
|
|
157
|
+
const forget = () => {
|
|
158
|
+
adoptedIfs.delete(entry);
|
|
159
|
+
unwatch();
|
|
160
|
+
};
|
|
161
|
+
// On screen, unbound, until a settle or an outer activation.
|
|
162
|
+
const park = () => {
|
|
163
|
+
live = false;
|
|
164
|
+
pending = false;
|
|
165
|
+
unwatch();
|
|
166
|
+
el._x_ignore = true;
|
|
167
|
+
adoptedIfs.add(entry);
|
|
168
|
+
};
|
|
169
|
+
// Mirrors Alpine's x-if hide() bookkeeping.
|
|
133
170
|
const undo = () => {
|
|
171
|
+
forget();
|
|
134
172
|
A.mutateDom(() => {
|
|
135
173
|
A.destroyTree(el);
|
|
136
174
|
el.remove();
|
|
137
175
|
});
|
|
138
176
|
delete tpl._x_currentIfEl;
|
|
139
177
|
delete tpl._x_lastRenderedEl;
|
|
178
|
+
queueSettle();
|
|
140
179
|
};
|
|
141
|
-
//
|
|
142
|
-
|
|
143
|
-
|
|
180
|
+
// Bound only while the guard holds; adopted clones inside follow.
|
|
181
|
+
const activate = () => {
|
|
182
|
+
if (live || tpl._x_currentIfEl !== el || !el.isConnected || underIgnore(tpl)) return;
|
|
183
|
+
live = true;
|
|
184
|
+
pending = false;
|
|
185
|
+
forget();
|
|
186
|
+
delete el._x_ignore;
|
|
187
|
+
A.initTree(el);
|
|
188
|
+
settleAdopted();
|
|
189
|
+
};
|
|
190
|
+
const watch = () => {
|
|
191
|
+
if (stopWatch || !pending || tpl._x_currentIfEl !== el || underIgnore(tpl)) return;
|
|
192
|
+
const check = A.evaluateLater(tpl, expr);
|
|
193
|
+
const fx = A.effect(() => check((v) => { if (v) queueMicrotask(() => { if (pending && guard()) activate(); }); }));
|
|
194
|
+
stopWatch = () => A.release(fx);
|
|
195
|
+
};
|
|
196
|
+
const entry = {
|
|
197
|
+
settle() {
|
|
198
|
+
if (live || pending) return;
|
|
199
|
+
if (tpl._x_currentIfEl !== el) return forget();
|
|
200
|
+
if (!el.isConnected) {
|
|
201
|
+
// Stashed in a template (defer) waits; removed with an ancestor is dropped.
|
|
202
|
+
if (!(el.getRootNode() instanceof DocumentFragment)) forget();
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
if (tpl._x_marker && !underIgnore(tpl) && guard()) activate();
|
|
206
|
+
},
|
|
207
|
+
};
|
|
208
|
+
// Boot-time false (e.g. data still loading) keeps the clone on screen,
|
|
209
|
+
// unbound, until the guard holds or manifest:ready — no blank frame.
|
|
144
210
|
const adoptedUndo = () => {
|
|
145
211
|
if (window.__manifestReady || !window.__manifestReadyCoordinator) return undo();
|
|
146
|
-
queueMicrotask(() => {
|
|
212
|
+
queueMicrotask(() => {
|
|
213
|
+
if (tpl._x_currentIfEl !== el) return;
|
|
214
|
+
tpl._x_undoIf = adoptedUndo;
|
|
215
|
+
watch();
|
|
216
|
+
});
|
|
217
|
+
// Torn down with an outer clone: its guard may no longer evaluate.
|
|
218
|
+
if (underIgnore(tpl)) return park();
|
|
219
|
+
if (live) {
|
|
220
|
+
live = false;
|
|
221
|
+
el._x_ignore = true;
|
|
222
|
+
A.destroyTree(el);
|
|
223
|
+
adoptedIfs.add(entry);
|
|
224
|
+
}
|
|
147
225
|
if (pending) return;
|
|
148
226
|
pending = true;
|
|
149
227
|
window.addEventListener('manifest:ready', () => {
|
|
150
|
-
if (tpl._x_currentIfEl !== el) return;
|
|
151
|
-
if (
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
228
|
+
if (!pending || tpl._x_currentIfEl !== el) return;
|
|
229
|
+
if (tpl.isConnected && underIgnore(tpl)) return park();
|
|
230
|
+
if (tpl.isConnected && guard()) return activate();
|
|
231
|
+
undo();
|
|
232
|
+
delete tpl._x_undoIf;
|
|
155
233
|
}, { once: true });
|
|
156
234
|
};
|
|
157
235
|
tpl._x_currentIfEl = el;
|
|
158
236
|
tpl._x_lastRenderedEl = el;
|
|
159
237
|
tpl._x_undoIf = adoptedUndo;
|
|
238
|
+
adoptedTpls.add(tpl);
|
|
239
|
+
if (!live) {
|
|
240
|
+
el._x_ignore = true;
|
|
241
|
+
adoptedIfs.add(entry);
|
|
242
|
+
}
|
|
160
243
|
}
|
|
161
244
|
function reconcilePrerenderClones() {
|
|
162
245
|
if (typeof document === 'undefined' || !document.querySelectorAll) return;
|
|
163
|
-
|
|
246
|
+
let adopted = 0;
|
|
164
247
|
document.querySelectorAll('[data-mnfst-prerender-clone]').forEach((el) => {
|
|
165
248
|
if (el.closest && el.closest('[data-hydrate]')) return;
|
|
166
249
|
el.removeAttribute('data-mnfst-prerender-clone');
|
|
@@ -168,20 +251,20 @@
|
|
|
168
251
|
if (tpl && tpl.tagName === 'TEMPLATE' && tpl.hasAttribute('x-if')) {
|
|
169
252
|
// Alpine's x-if show() returns early when _x_currentIfEl is set.
|
|
170
253
|
adoptIfClone(tpl, el);
|
|
171
|
-
adopted
|
|
254
|
+
adopted++;
|
|
172
255
|
} else {
|
|
173
256
|
el.remove();
|
|
174
257
|
}
|
|
175
258
|
});
|
|
176
|
-
if (!adopted
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
259
|
+
if (!adopted) return;
|
|
260
|
+
const A = window.Alpine;
|
|
261
|
+
// Templates walked after start (deferred subtrees) settle once their x-if ran.
|
|
262
|
+
if (typeof A.interceptInit === 'function') {
|
|
263
|
+
A.interceptInit((node) => {
|
|
264
|
+
if (adoptedTpls.has(node) && adoptedIfs.size) queueSettle();
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
document.addEventListener('alpine:initialized', settleAdopted, { once: true });
|
|
185
268
|
}
|
|
186
269
|
if (typeof document !== 'undefined') {
|
|
187
270
|
document.addEventListener('alpine:init', reconcilePrerenderClones, { once: true });
|
package/lib/manifest.sw.js
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
// Build stamps the published version here; unstamped (dev) falls back to the
|
|
18
18
|
// registration URL's `v`, then 'dev'.
|
|
19
|
-
const BUILD_VERSION = '0.5.
|
|
19
|
+
const BUILD_VERSION = '0.5.240';
|
|
20
20
|
const CACHE_PREFIX = 'mnfst-sw:';
|
|
21
21
|
const META_CACHE = CACHE_PREFIX + 'meta';
|
|
22
22
|
// Sized to hold a full precache.json warm-up (PRECACHE_MAX_ENTRIES server-side)
|