mnfst 0.5.302 → 0.5.304
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.components.js +3 -0
- package/lib/manifest.data.js +1 -1
- package/lib/manifest.datepicker.js +36 -5
- package/lib/manifest.integrity.json +6 -6
- package/lib/manifest.router.js +13 -3
- package/lib/manifest.sw.js +1 -1
- package/package.json +2 -1
|
@@ -452,6 +452,8 @@ window.ManifestComponentsProcessor = {
|
|
|
452
452
|
// The file this markup came from (Edit writes regions authored in it back there)
|
|
453
453
|
rootElement._manifestComponent = name;
|
|
454
454
|
rootElement._manifestHost = host;
|
|
455
|
+
// The router's hide record travels with the copied inline display
|
|
456
|
+
if (element.__manifestRouteDisplay) rootElement.__manifestRouteDisplay = { ...element.__manifestRouteDisplay };
|
|
455
457
|
// Set data-component=instanceId if provided
|
|
456
458
|
if (instanceId) {
|
|
457
459
|
rootElement.setAttribute('data-component', instanceId);
|
|
@@ -795,6 +797,7 @@ window.ManifestComponentsRouting = (function () {
|
|
|
795
797
|
const clone = placeholder.cloneNode(true);
|
|
796
798
|
clone.setAttribute('data-original-placeholder', '');
|
|
797
799
|
clone.setAttribute('data-component', instanceId);
|
|
800
|
+
if (placeholder.__manifestRouteDisplay) clone.__manifestRouteDisplay = { ...placeholder.__manifestRouteDisplay };
|
|
798
801
|
placeholderMap.set(instanceId, clone);
|
|
799
802
|
}
|
|
800
803
|
// Log before swap
|
package/lib/manifest.data.js
CHANGED
|
@@ -398,7 +398,7 @@
|
|
|
398
398
|
// Write the value out to: x-model, hidden input, and the field display.
|
|
399
399
|
// Model shape: single → ISO string ('yyyy-mm-dd' or '…THH:mm');
|
|
400
400
|
// range → { start, end }; multiple → ISO[]; time-only → 'HH:mm'.
|
|
401
|
-
syncOut() {
|
|
401
|
+
syncOut(writeModel = true) {
|
|
402
402
|
let modelVal, hiddenVal;
|
|
403
403
|
if (this.selectionMode === 'range') {
|
|
404
404
|
const s = this.rangeStart ? D.toISO(this.rangeStart) : '', e = this.rangeEnd ? D.toISO(this.rangeEnd) : '';
|
|
@@ -411,7 +411,7 @@
|
|
|
411
411
|
const iso = this._primaryValue();
|
|
412
412
|
modelVal = iso; hiddenVal = iso;
|
|
413
413
|
}
|
|
414
|
-
if (this.modelSet) { try { this.modelSet(modelVal); } catch (_) { } }
|
|
414
|
+
if (writeModel && this.modelSet) { try { this.modelSet(modelVal); } catch (_) { } }
|
|
415
415
|
if (this.hiddenInput) {
|
|
416
416
|
this.hiddenInput.value = hiddenVal;
|
|
417
417
|
this.hiddenInput.dispatchEvent(new Event('input', { bubbles: true }));
|
|
@@ -431,6 +431,36 @@
|
|
|
431
431
|
}
|
|
432
432
|
},
|
|
433
433
|
|
|
434
|
+
// Mirror an external model value; anything unparseable is empty. Returns true if the selection changed.
|
|
435
|
+
applyModel(v) {
|
|
436
|
+
const prev = this._primaryValue();
|
|
437
|
+
if (v instanceof Date) v = D.toISO(v);
|
|
438
|
+
if (this.timeOnly) {
|
|
439
|
+
const m = typeof v === 'string' && v.match(/^(\d{2}):(\d{2})/);
|
|
440
|
+
if (m) { this.time = m[1] + ':' + m[2]; this.timeSet = true; } else this.timeSet = false;
|
|
441
|
+
} else if (this.selectionMode === 'range') {
|
|
442
|
+
let s = '', e = '';
|
|
443
|
+
if (v && typeof v === 'object' && !Array.isArray(v)) { s = v.start; e = v.end; }
|
|
444
|
+
else if (typeof v === 'string') [s, e] = v.split('/');
|
|
445
|
+
this.rangeStart = D.fromISO(s); this.rangeEnd = this.rangeStart ? D.fromISO(e) : null;
|
|
446
|
+
} else if (this.selectionMode === 'multiple') {
|
|
447
|
+
const arr = Array.isArray(v) ? v : (typeof v === 'string' && v ? v.split(',') : []);
|
|
448
|
+
this.selectedDates = arr.map(x => D.fromISO(x)).filter(Boolean).sort((a, b) => D.compare(a, b));
|
|
449
|
+
} else {
|
|
450
|
+
const iso = typeof v === 'string' ? v : '';
|
|
451
|
+
const tm = iso.match(/T(\d{2}:\d{2})/);
|
|
452
|
+
if (tm) { this.time = tm[1]; this.timeSet = true; }
|
|
453
|
+
this.selected = D.fromISO(iso);
|
|
454
|
+
}
|
|
455
|
+
if (this._primaryValue() === prev) return false;
|
|
456
|
+
this.rangeHover = null;
|
|
457
|
+
const first = this.selectionMode === 'range' ? this.rangeStart : this.selectionMode === 'multiple' ? this.selectedDates[0] : this.selected;
|
|
458
|
+
const d = first || D.today();
|
|
459
|
+
this.view = { y: d.getFullYear(), m: d.getMonth() + 1 };
|
|
460
|
+
if (!this._primaryValue()) this.close();
|
|
461
|
+
return true;
|
|
462
|
+
},
|
|
463
|
+
|
|
434
464
|
// Pull an initial value from x-model, then hidden input, then value attr.
|
|
435
465
|
seed() {
|
|
436
466
|
let raw;
|
|
@@ -1026,7 +1056,8 @@
|
|
|
1026
1056
|
const first = state._uiKey === undefined;
|
|
1027
1057
|
state._uiKey = key;
|
|
1028
1058
|
if (state._destroyed || first) return; // initial render happens at mount
|
|
1029
|
-
|
|
1059
|
+
// Display only: the model holds ISO, which a locale change never alters.
|
|
1060
|
+
if (state._mounted) { state.render(); state.syncOut(false); }
|
|
1030
1061
|
}));
|
|
1031
1062
|
}
|
|
1032
1063
|
|
|
@@ -1034,8 +1065,8 @@
|
|
|
1034
1065
|
const read = Alpine.evaluateLater(el, modelExpr);
|
|
1035
1066
|
state.modelGet = (cb) => { let out; read(v => { out = v; if (cb) cb(v); }); return out; };
|
|
1036
1067
|
state.modelSet = (v) => { try { Alpine.evaluate(el, `${modelExpr} = ${JSON.stringify(v)}`); } catch (_) { } };
|
|
1037
|
-
//
|
|
1038
|
-
state._effects.push(Alpine.effect(() => { read(v => {
|
|
1068
|
+
// Mirror external model changes; never write back (the model already holds the value).
|
|
1069
|
+
state._effects.push(Alpine.effect(() => { read(v => { if (!state.applyModel(v)) return; state.bump(); if (state._mounted) { state.render(); state.syncOut(false); } }); }));
|
|
1039
1070
|
}
|
|
1040
1071
|
|
|
1041
1072
|
// Global effects stay subscribed to the stores (and pin the calendar) until released.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifest.appwrite.auth.js": "sha384-gWLSeVPqCLMiUZB8MU7GqMg3x2yULFUsp8nTTZrPp/9Dlkix42rBn9yIimvwrHqZ",
|
|
3
|
-
"manifest.appwrite.data.js": "sha384-
|
|
3
|
+
"manifest.appwrite.data.js": "sha384-stRpjv9noawdm/y7vTYfgmQMtGOMkzuRIf/2P7wMQ9nsQcQG2/UCMD5GAoMUzj23",
|
|
4
4
|
"manifest.appwrite.presences.js": "sha384-LINPhIPTCK+rA8zd+HPUzMSEgH6Sl2vQMEyItT97bnEE2FYGYKqjXX+CWdt6nl9z",
|
|
5
5
|
"manifest.bindings.js": "sha384-lPtMf8Ykaic9gNVZKq8Scia1881ZeMAyxer3WCIkUNwwrgzGBWto1OXADUwjvORF",
|
|
6
6
|
"manifest.charts.js": "sha384-BnTxO3ncLxg82aV+64tQMS3ssN+RKZ69Dic6Oruz0pw+/UIK2MAZicg8+ooHF2ZA",
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
"manifest.color.js": "sha384-tLmmr7KwPIjznXr2tJfJtuAOV9pohdr+Ojj4L4BaOZ8WngCNOPUp27Dfz47YqU2R",
|
|
10
10
|
"manifest.colorpicker.js": "sha384-P+Zx0QzhMGfku8s3yEskTte4/iXCGVX3zdhu42IGNfFcSmhOW+nqVK7w+uczWRGY",
|
|
11
11
|
"manifest.combobox.js": "sha384-/lJo6vaxKjgnBSRs/dzkhK1dzGk3GBw8FISoNJZB70mwAVwu1k5veZyBXjOb4keS",
|
|
12
|
-
"manifest.components.js": "sha384-
|
|
12
|
+
"manifest.components.js": "sha384-t2qgBbcGPMoTYpMffOHW2dM07UWIq3pU3PYqLGrS6QP2hzCer4ofgaIKA+7hW558",
|
|
13
13
|
"manifest.computed.js": "sha384-GYML/e81gQfN+iDbqhPUgny8bINCyL+SrbTofoGk4hlCnLLjv51mCv42JMqq+ku5",
|
|
14
|
-
"manifest.data.js": "sha384-
|
|
15
|
-
"manifest.datepicker.js": "sha384-
|
|
14
|
+
"manifest.data.js": "sha384-LAqsTjMOTap++uM5JWzPa8K5nbzv9nUCI3iMvBQY5VvlZ2+7M5pA2F2ly2dNZwQs",
|
|
15
|
+
"manifest.datepicker.js": "sha384-pZUQhUK6u5cl6g0myBXND/Wtrs1RTovYmy/ETQLUV0JujvTvUdRNc/XjPpVhtK16",
|
|
16
16
|
"manifest.defer.js": "sha384-PRp7+dCZHnnl55rX2xrHutLrQnszHo7o5o9Tq28M/yjLZPuXDzcwQNxCdvbtCYSz",
|
|
17
17
|
"manifest.device.js": "sha384-YeQaS56L8IILqrQNBSeAOLwIh5DuAOrE60cYLK1+46qJtUrXlAvqGe2j5mbV4Vq7",
|
|
18
18
|
"manifest.dropdowns.js": "sha384-TlFrYVWTXvpUmGnYaAk2til4lu0p6w5YcmWWEzZAokzd2qlmoyRLLXXVuYAK/AlR",
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
"manifest.native.js": "sha384-YeQaS56L8IILqrQNBSeAOLwIh5DuAOrE60cYLK1+46qJtUrXlAvqGe2j5mbV4Vq7",
|
|
25
25
|
"manifest.payments.js": "sha384-p10n6EHBWFKVW9KhI2A+RpkwqrwD068D+wvOJ7D3Gklz1MvmIlqv1lLG1R0cUqbw",
|
|
26
26
|
"manifest.rich.text.js": "sha384-ZBV9jXmu2nmprEHicddRE/m7nR4RPZtVc969Jte0+EJYBcVph7itkjcgN/61PyeC",
|
|
27
|
-
"manifest.router.js": "sha384-
|
|
27
|
+
"manifest.router.js": "sha384-fnFIDMwehZjaLiZwwtry63AXX9qlyxzRJjKHi4SORgwW4hhZ5eiItTHc4J1mKagU",
|
|
28
28
|
"manifest.slides.js": "sha384-3uRTkyK9XPLmnxI2+igZlpi4EyPlU/7IHj5j3BZJJ2KN455vXyk99fiXV3feO/XY",
|
|
29
29
|
"manifest.status.js": "sha384-ofu7nBnVIGZ1U1o2R9d2H3V8aEMPUCVbl5FO3gIToXqi0oa36fTviEdh5UU7Kitw",
|
|
30
30
|
"manifest.submissions.js": "sha384-v9eS47ytAfTGIKAyVnbd0QWegucVS7yduvigqfsxxoqXmbaEoy0M2y+BiI4xeZBd",
|
|
31
31
|
"manifest.svg.js": "sha384-qr/8H9+2cIhSXNbRWRtIdrDlTOxKlNJqwEefHvCYoiBNW/kKhPTFa109Orv/EBnb",
|
|
32
|
-
"manifest.sw.js": "sha384-
|
|
32
|
+
"manifest.sw.js": "sha384-NiJ7sMGHRa2y0rzIxUj5WL+DqqjJOPYmSLNrd0xcGzyb8z6YT2Ip3lTdSznX6LEo",
|
|
33
33
|
"manifest.tabs.js": "sha384-otU09H7jnawVKQdLAYpMCd3jx00tgyPVr42D2hLIBzN5dG4se505YesavdnMqEi1",
|
|
34
34
|
"manifest.tailwind.js": "sha384-yuP3LEvWU+QVjxjkZ0YhErtC9RrGmhOmHjjFjhS9obqZbp5/KTIEnSR0CXDvHE0B",
|
|
35
35
|
"manifest.toasts.js": "sha384-UpOz9fAdGeGUhL0NamBg5iPepEfIy73p9HYdcxfOQC5b7CVsl7Our0skdZzaLNcC",
|
package/lib/manifest.router.js
CHANGED
|
@@ -804,19 +804,29 @@ function hasXShow(element) {
|
|
|
804
804
|
// Activation hook fires before the route becomes visible so deferred content renders first
|
|
805
805
|
function showRoute(element) {
|
|
806
806
|
element.dispatchEvent(new CustomEvent('manifest:route-activate'));
|
|
807
|
-
|
|
807
|
+
const wasHidden = element.hasAttribute('hidden');
|
|
808
|
+
if (wasHidden) element.removeAttribute('hidden');
|
|
808
809
|
const prior = element.__manifestRouteDisplay;
|
|
809
810
|
if (prior) {
|
|
810
811
|
element.__manifestRouteDisplay = null;
|
|
811
812
|
// x-show added since (tabs panels, components) now owns the inline display
|
|
812
813
|
if (!hasXShow(element) && element.style.display === 'none') element.style.setProperty('display', prior.value, prior.priority);
|
|
814
|
+
} else if (wasHidden && !hasXShow(element) && element.style.display === 'none') {
|
|
815
|
+
// Route-hidden markup cloned or copied without its record (component placeholders and roots)
|
|
816
|
+
element.style.removeProperty('display');
|
|
813
817
|
}
|
|
814
818
|
}
|
|
815
819
|
|
|
816
820
|
// Skip no-op writes: each one is a mutation record for every observer
|
|
817
821
|
function hideRoute(element) {
|
|
818
|
-
|
|
819
|
-
if (
|
|
822
|
+
const wasHidden = element.hasAttribute('hidden');
|
|
823
|
+
if (!wasHidden) element.setAttribute('hidden', '');
|
|
824
|
+
if (hasXShow(element)) return;
|
|
825
|
+
// An author's own display:none is recorded too, so showRoute puts it back
|
|
826
|
+
if (element.style.display === 'none') {
|
|
827
|
+
if (!wasHidden && !element.__manifestRouteDisplay) element.__manifestRouteDisplay = { value: 'none', priority: element.style.getPropertyPriority('display') };
|
|
828
|
+
return;
|
|
829
|
+
}
|
|
820
830
|
// Restored on show, so an author's own inline display survives
|
|
821
831
|
element.__manifestRouteDisplay = { value: element.style.display, priority: element.style.getPropertyPriority('display') };
|
|
822
832
|
element.style.display = 'none';
|
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.304';
|
|
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)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mnfst",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.304",
|
|
4
4
|
"private": false,
|
|
5
5
|
"workspaces": [
|
|
6
6
|
"templates/starter",
|
|
@@ -58,6 +58,7 @@
|
|
|
58
58
|
"test:e2e:components-router-race": "node tests/e2e/components-router-race.e2e.mjs",
|
|
59
59
|
"test:e2e:components-ancestor-gate": "node tests/e2e/components-ancestor-gate.e2e.mjs",
|
|
60
60
|
"test:e2e:route-head": "node tests/e2e/route-head.e2e.mjs",
|
|
61
|
+
"test:e2e:route-display": "node tests/e2e/components-route-display.e2e.mjs",
|
|
61
62
|
"test:e2e:prerender-patch": "node tests/e2e/utilities-prerender-patch.e2e.mjs",
|
|
62
63
|
"test:e2e:hidden-responsive": "node tests/e2e/utilities-hidden-responsive.e2e.mjs",
|
|
63
64
|
"test:e2e:tailwind-dark": "node tests/e2e/tailwind-dark-variant.e2e.mjs",
|