mnfst 0.5.208 → 0.5.209
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.combobox.js
CHANGED
|
@@ -168,8 +168,41 @@ function initializeComboboxPlugin() {
|
|
|
168
168
|
setTimeout(() => build(el, modifiers, expression || '', cleanup), 0);
|
|
169
169
|
});
|
|
170
170
|
|
|
171
|
+
// Resolve the menu's owning top-layer context fresh, every time — never cache it.
|
|
172
|
+
// A [popover]/dialog ancestor can be mid-restash (manifest.defer's idle prewarm/evict
|
|
173
|
+
// cycle moving a still-closed container's subtree back into its <template> stash)
|
|
174
|
+
// at any point after build(), so the target must be re-read at each attach, not
|
|
175
|
+
// assumed stable from build time.
|
|
176
|
+
// The menu belongs in its field's top-layer context, but that ancestor can be
|
|
177
|
+
// mid-restash (defer moving a closed container's subtree back into its <template>),
|
|
178
|
+
// so re-resolve at every attach — and never attach into a detached tree, or
|
|
179
|
+
// showPopover() throws InvalidStateError and leaves the field dead.
|
|
180
|
+
let warnedDetached = false;
|
|
181
|
+
const attachTarget = (el) => {
|
|
182
|
+
const owner = el.closest('[popover]');
|
|
183
|
+
if (owner && owner.isConnected) return owner;
|
|
184
|
+
if (owner && !warnedDetached) {
|
|
185
|
+
warnedDetached = true;
|
|
186
|
+
console.warn('[Manifest Combobox] the field\'s popover ancestor was detached when its menu was attached; ' +
|
|
187
|
+
'using document.body so the field keeps working. Please report this with the field id:', el.id || el);
|
|
188
|
+
}
|
|
189
|
+
return document.body;
|
|
190
|
+
};
|
|
191
|
+
const reattach = (el, menu) => {
|
|
192
|
+
const target = attachTarget(el);
|
|
193
|
+
if (menu.parentNode !== target) target.appendChild(menu);
|
|
194
|
+
};
|
|
195
|
+
|
|
171
196
|
function build(el, modifiers, expression, cleanup) {
|
|
172
|
-
if (el.__mnfstCombobox)
|
|
197
|
+
if (el.__mnfstCombobox) {
|
|
198
|
+
// Already built. If manifest.defer's idle prewarm/evict cycle raced this very
|
|
199
|
+
// build (stashing the owning [popover] between directive init and the setTimeout
|
|
200
|
+
// below), the generated menu was appended into a since-detached tree — reattach
|
|
201
|
+
// it into wherever the owner lives now. Harmless no-op otherwise.
|
|
202
|
+
const m = el.__mnfstComboboxMenu;
|
|
203
|
+
if (m) reattach(el, m);
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
173
206
|
el.__mnfstCombobox = true;
|
|
174
207
|
|
|
175
208
|
// If a mount path bypassed the strip (x-if/x-for via Alpine's internal initTree)
|
|
@@ -409,8 +442,10 @@ function initializeComboboxPlugin() {
|
|
|
409
442
|
}
|
|
410
443
|
// Nearest popover host, so an outer auto popover isn't light-dismissed
|
|
411
444
|
// by listbox clicks; body otherwise (out of overflow contexts either way).
|
|
412
|
-
(
|
|
445
|
+
// Re-resolved (not just attached once) at every open — see reattach().
|
|
446
|
+
reattach(el, menu);
|
|
413
447
|
generatedMenu = menu; // tracked so cleanup() can remove it on re-render
|
|
448
|
+
el.__mnfstComboboxMenu = menu; // tracked so a re-entrant build() can reattach it
|
|
414
449
|
if (src) src.style.setProperty('display', 'none', 'important');
|
|
415
450
|
menu.setAttribute('popover', 'manual');
|
|
416
451
|
menu.setAttribute('x-defer.off', ''); // options are built here, not by directives
|
|
@@ -459,8 +494,22 @@ function initializeComboboxPlugin() {
|
|
|
459
494
|
if (!menu || menu.matches(':popover-open') || atCap()) return;
|
|
460
495
|
// Re-stashed since build (x-defer.discard) — re-hydrate before showing.
|
|
461
496
|
if (src && window.ManifestDefer?.isPending(src)) { options = readOptions(src); setOptions(options); }
|
|
497
|
+
// Lazy re-resolve: the owning [popover]/dialog may have been (re-)stashed and
|
|
498
|
+
// rendered since build(), or build() itself raced a defer restash and attached
|
|
499
|
+
// into a tree that's since gone disconnected. A real open only ever happens
|
|
500
|
+
// once the field itself is genuinely connected/visible, so this always has a
|
|
501
|
+
// valid target.
|
|
502
|
+
reattach(el, menu);
|
|
462
503
|
menu.style.minWidth = wrap.offsetWidth + 'px';
|
|
463
|
-
|
|
504
|
+
try {
|
|
505
|
+
menu.showPopover();
|
|
506
|
+
} catch (_) {
|
|
507
|
+
// Belt-and-suspenders: resolve once more and retry, then give up quietly —
|
|
508
|
+
// an uncaught error here would abort whatever handler called openMenu() and
|
|
509
|
+
// can strand the containing dialog's own dismiss handling mid-flight.
|
|
510
|
+
reattach(el, menu);
|
|
511
|
+
try { menu.showPopover(); } catch (_) { return; }
|
|
512
|
+
}
|
|
464
513
|
el.setAttribute('aria-expanded', 'true');
|
|
465
514
|
}
|
|
466
515
|
function closeMenu() {
|
package/lib/manifest.data.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifest.appwrite.auth.js": "sha384-HMJmRXnvdDBWyuteXL+DTxWM2llSCdjl4EDamEI7iHNAVlqeOCE4GDTm8ZHipPRj",
|
|
3
|
-
"manifest.appwrite.data.js": "sha384-
|
|
3
|
+
"manifest.appwrite.data.js": "sha384-QPhleLv3IIOHioJFz+aIieAStcvqMApPC68lipDajRqxyym9am6rKFXEkHZTJdGo",
|
|
4
4
|
"manifest.appwrite.presences.js": "sha384-JyVDWFT69b7Svq8J8p9tNWe2v9PZNQBY5UyhtOl1vnuHFAX0CRQ3MA9SiKq5wzNh",
|
|
5
5
|
"manifest.bindings.js": "sha384-lPtMf8Ykaic9gNVZKq8Scia1881ZeMAyxer3WCIkUNwwrgzGBWto1OXADUwjvORF",
|
|
6
6
|
"manifest.charts.js": "sha384-qQrjhWkIDi4oU5uQrpy8DdlMjY+gfiivBuX6mssNiFdkawgkVBvKneGgp+nd3PYJ",
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
"manifest.code.js": "sha384-aoQ4E26vrhNe/+tL7K0h90c8/0ies7e8oIR6Ay92he2X3dnWZ+OPcn2Dna8fmc+c",
|
|
9
9
|
"manifest.color.js": "sha384-6Rv3LxyTcZNjrhtayQfqRdCx0uSZ4BiEbgEI98I62eTvp8Aw7LBIoNJ0Je1oktwL",
|
|
10
10
|
"manifest.colorpicker.js": "sha384-1+ZV5Hhjf7WnGP7b71Cqa5h3BKW8UgGT5V14i8Q+aF5zH8Xxwowt/ibSUVsiIHSm",
|
|
11
|
-
"manifest.combobox.js": "sha384-
|
|
11
|
+
"manifest.combobox.js": "sha384-5DaKDWkWF7zxS80h7G1AcZG9hr+uGqJ1+B09aaVIVF+z0Qn4j8+9KEg7gys/ABQG",
|
|
12
12
|
"manifest.components.js": "sha384-DLGSqCbnGkS87AWJ8GpKoAFP4nCosgC5SFSg6C10hH/nWu/MxI+0ntHlnFEfs++u",
|
|
13
13
|
"manifest.computed.js": "sha384-GYML/e81gQfN+iDbqhPUgny8bINCyL+SrbTofoGk4hlCnLLjv51mCv42JMqq+ku5",
|
|
14
|
-
"manifest.data.js": "sha384-
|
|
14
|
+
"manifest.data.js": "sha384-YCCrZNKVJGLpTqE8BpI4Co6/vjyOXATVioLdaLSkKQ5oNKTv3ZFN+CqM7lQmObjI",
|
|
15
15
|
"manifest.datepicker.js": "sha384-8vTJYkLqqvgXgm1w1becuaRR/jUEpiLBjBJ6RsRbUr+ZkypvspD6EsssuDrX4SQq",
|
|
16
16
|
"manifest.defer.js": "sha384-wXa60M2OHigi5rBurXQ7Oa8eyr5WTKs7EUn2GOru62KMdfs/LDyNegxCc9MNJFSe",
|
|
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-nwvUSbT+gpRMqhYx6MeBYswUMH72rY92mjgxv0vrSG7Ht7l83XYpEB6fCTbXjjfK",
|
|
30
30
|
"manifest.svg.js": "sha384-qr/8H9+2cIhSXNbRWRtIdrDlTOxKlNJqwEefHvCYoiBNW/kKhPTFa109Orv/EBnb",
|
|
31
|
-
"manifest.sw.js": "sha384
|
|
31
|
+
"manifest.sw.js": "sha384-rHHARfDDIo3jE+zWkse6dVR1EwdUASiDFvlskzn/KjmhC6mJgtlSfLbL+FhWRLz1",
|
|
32
32
|
"manifest.tabs.js": "sha384-OIIcyaQnGS0eNYk4zgAFEDboNYect7THvUd9D0V6nqCeDOxQcoiqLrBEmmWVTTet",
|
|
33
33
|
"manifest.tailwind.js": "sha384-r/Jvqb+Piz21jUts10BbVAJoKkShOdJRVFpywyi4HPIi/OfOJq5CtPyWAPbdkMgt",
|
|
34
34
|
"manifest.text.edit.js": "sha384-pfhc4IPKNJokj6ldlgD+KwGLN4UoM21CNeVf2sVq/34X1Un2PUhEuyTg5itmtsXS",
|
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.209';
|
|
20
20
|
const CACHE_PREFIX = 'mnfst-sw:';
|
|
21
21
|
const META_CACHE = CACHE_PREFIX + 'meta';
|
|
22
22
|
const SWR_CAP = 200;
|