mnfst 0.5.262 → 0.5.264
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.charts.js +20 -3
- package/lib/manifest.colorpicker.js +26 -9
- package/lib/manifest.combobox.js +20 -3
- package/lib/manifest.css +15 -8
- package/lib/manifest.data.js +38 -17
- package/lib/manifest.datepicker.js +20 -3
- package/lib/manifest.dialog.css +15 -8
- package/lib/manifest.integrity.json +11 -11
- package/lib/manifest.js +11 -2
- package/lib/manifest.min.css +1 -1
- package/lib/manifest.status.js +21 -4
- package/lib/manifest.sw.js +1 -1
- package/lib/manifest.tailwind.js +2 -2
- package/lib/manifest.virtual.js +30 -7
- package/package.json +1 -1
package/lib/manifest.charts.js
CHANGED
|
@@ -13,6 +13,23 @@
|
|
|
13
13
|
if (!window.ManifestUI) {
|
|
14
14
|
window.ManifestUI = {
|
|
15
15
|
/* Loaded data sources (current locale); never force-loads others. */
|
|
16
|
+
// One cached evaluator per expression: each Alpine.evaluate would register a cleanup on <body>, never run
|
|
17
|
+
_eval(expr) {
|
|
18
|
+
const A = window.Alpine;
|
|
19
|
+
// Magics registered after an evaluator was built stay invisible to it, so a registration drops the cache
|
|
20
|
+
if (!A.magic.__manifestMagicCounted) {
|
|
21
|
+
const magic = A.magic;
|
|
22
|
+
A.magic = function () { window.__manifestMagicVersion = (window.__manifestMagicVersion || 0) + 1; return magic.apply(this, arguments); };
|
|
23
|
+
A.magic.__manifestMagicCounted = true;
|
|
24
|
+
}
|
|
25
|
+
const version = window.__manifestMagicVersion || 0;
|
|
26
|
+
if (!this._evals || this._evalsVersion !== version) { this._evals = new Map(); this._evalsVersion = version; }
|
|
27
|
+
let fn = this._evals.get(expr);
|
|
28
|
+
if (!fn) this._evals.set(expr, fn = A.evaluateLater(document.body, expr));
|
|
29
|
+
let out;
|
|
30
|
+
fn(v => { out = v; });
|
|
31
|
+
return out;
|
|
32
|
+
},
|
|
16
33
|
_loadedSourceNames() {
|
|
17
34
|
try {
|
|
18
35
|
const store = window.ManifestDataStore && window.ManifestDataStore.rawDataStore;
|
|
@@ -24,11 +41,11 @@
|
|
|
24
41
|
resolve(component, fallbacks) {
|
|
25
42
|
const merged = JSON.parse(JSON.stringify(fallbacks || {}));
|
|
26
43
|
try {
|
|
27
|
-
if (!window.Alpine || typeof Alpine.
|
|
28
|
-
try {
|
|
44
|
+
if (!window.Alpine || typeof Alpine.evaluateLater !== 'function') return merged;
|
|
45
|
+
try { this._eval('typeof $locale !== "undefined" && $locale.current'); } catch (_) { } // dep → re-resolve on locale switch
|
|
29
46
|
for (const name of this._loadedSourceNames()) {
|
|
30
47
|
let ui;
|
|
31
|
-
try { ui =
|
|
48
|
+
try { ui = this._eval(`$x['${name}'] && $x['${name}']._ui && $x['${name}']._ui['${component}']`); } catch (_) { ui = null; }
|
|
32
49
|
if (ui && typeof ui === 'object' && !Array.isArray(ui)) this._deepOverlay(merged, ui);
|
|
33
50
|
}
|
|
34
51
|
} catch (_) { }
|
|
@@ -10,6 +10,23 @@ function initializeColorpickerPlugin() {
|
|
|
10
10
|
if (!window.ManifestUI) {
|
|
11
11
|
window.ManifestUI = {
|
|
12
12
|
// Names of loaded data sources (current locale); never force-loads others.
|
|
13
|
+
// One cached evaluator per expression: each Alpine.evaluate would register a cleanup on <body>, never run
|
|
14
|
+
_eval(expr) {
|
|
15
|
+
const A = window.Alpine;
|
|
16
|
+
// Magics registered after an evaluator was built stay invisible to it, so a registration drops the cache
|
|
17
|
+
if (!A.magic.__manifestMagicCounted) {
|
|
18
|
+
const magic = A.magic;
|
|
19
|
+
A.magic = function () { window.__manifestMagicVersion = (window.__manifestMagicVersion || 0) + 1; return magic.apply(this, arguments); };
|
|
20
|
+
A.magic.__manifestMagicCounted = true;
|
|
21
|
+
}
|
|
22
|
+
const version = window.__manifestMagicVersion || 0;
|
|
23
|
+
if (!this._evals || this._evalsVersion !== version) { this._evals = new Map(); this._evalsVersion = version; }
|
|
24
|
+
let fn = this._evals.get(expr);
|
|
25
|
+
if (!fn) this._evals.set(expr, fn = A.evaluateLater(document.body, expr));
|
|
26
|
+
let out;
|
|
27
|
+
fn(v => { out = v; });
|
|
28
|
+
return out;
|
|
29
|
+
},
|
|
13
30
|
_loadedSourceNames() {
|
|
14
31
|
try {
|
|
15
32
|
const store = window.ManifestDataStore && window.ManifestDataStore.rawDataStore;
|
|
@@ -22,11 +39,11 @@ function initializeColorpickerPlugin() {
|
|
|
22
39
|
resolve(component, fallbacks) {
|
|
23
40
|
const merged = JSON.parse(JSON.stringify(fallbacks || {}));
|
|
24
41
|
try {
|
|
25
|
-
if (!window.Alpine || typeof Alpine.
|
|
26
|
-
try {
|
|
42
|
+
if (!window.Alpine || typeof Alpine.evaluateLater !== 'function') return merged;
|
|
43
|
+
try { this._eval('typeof $locale !== "undefined" && $locale.current'); } catch (_) { } // dep → re-resolve on locale switch
|
|
27
44
|
for (const name of this._loadedSourceNames()) {
|
|
28
45
|
let ui;
|
|
29
|
-
try { ui =
|
|
46
|
+
try { ui = this._eval(`$x['${name}'] && $x['${name}']._ui && $x['${name}']._ui['${component}']`); } catch (_) { ui = null; }
|
|
30
47
|
if (ui && typeof ui === 'object' && !Array.isArray(ui)) this._deepOverlay(merged, ui);
|
|
31
48
|
}
|
|
32
49
|
} catch (_) { }
|
|
@@ -563,7 +580,7 @@ function initializeColorpickerPlugin() {
|
|
|
563
580
|
try {
|
|
564
581
|
if (window.Alpine?.evaluate) {
|
|
565
582
|
const expr = isBareRef && !hasInterp ? trimmed : '`' + trimmed + '`';
|
|
566
|
-
const out = Alpine.evaluate(document.body, expr);
|
|
583
|
+
const out = window.ManifestUI?._eval ? window.ManifestUI._eval(expr) : Alpine.evaluate(document.body, expr);
|
|
567
584
|
if (out == null) return val;
|
|
568
585
|
return typeof out === 'string' ? out : String(out);
|
|
569
586
|
}
|
|
@@ -1646,12 +1663,12 @@ function initializeColorpickerPlugin() {
|
|
|
1646
1663
|
// `colorpicker` key flagged on the data entry itself (back-compat).
|
|
1647
1664
|
const names = [];
|
|
1648
1665
|
try {
|
|
1649
|
-
const ptr = Alpine.evaluate(evalCtx, '$x && $x.manifest && $x.manifest.colorpicker');
|
|
1666
|
+
const ptr = (window.ManifestUI?._eval ? (x) => window.ManifestUI._eval(x) : (x) => Alpine.evaluate(evalCtx, x))('$x && $x.manifest && $x.manifest.colorpicker');
|
|
1650
1667
|
if (typeof ptr === 'string' && ptr) names.push(ptr);
|
|
1651
1668
|
else if (Array.isArray(ptr)) ptr.forEach(n => { if (typeof n === 'string' && n) names.push(n); });
|
|
1652
1669
|
} catch {}
|
|
1653
1670
|
let dataMap = null;
|
|
1654
|
-
try { dataMap = Alpine.evaluate(evalCtx, '$x && $x.manifest && $x.manifest.data'); } catch {}
|
|
1671
|
+
try { dataMap = (window.ManifestUI?._eval ? (x) => window.ManifestUI._eval(x) : (x) => Alpine.evaluate(evalCtx, x))('$x && $x.manifest && $x.manifest.data'); } catch {}
|
|
1655
1672
|
if (dataMap && typeof dataMap === 'object') {
|
|
1656
1673
|
for (const name of Object.keys(dataMap)) {
|
|
1657
1674
|
if (name.startsWith('$') || name.startsWith('_')) continue;
|
|
@@ -1665,7 +1682,7 @@ function initializeColorpickerPlugin() {
|
|
|
1665
1682
|
}
|
|
1666
1683
|
}
|
|
1667
1684
|
const collected = names.map(name => {
|
|
1668
|
-
try { return Alpine.evaluate(evalCtx, '$x.' + name); } catch { return null; }
|
|
1685
|
+
try { return (window.ManifestUI?._eval ? (x) => window.ManifestUI._eval(x) : (x) => Alpine.evaluate(evalCtx, x))('$x.' + name); } catch { return null; }
|
|
1669
1686
|
});
|
|
1670
1687
|
const ready = names.length === 0 || collected.every(src => {
|
|
1671
1688
|
if (!src || typeof src !== 'object') return false;
|
|
@@ -1691,8 +1708,8 @@ function initializeColorpickerPlugin() {
|
|
|
1691
1708
|
|
|
1692
1709
|
// Reactive deps trigger re-runs on locale switch / manifest load.
|
|
1693
1710
|
this._effects.push(Alpine.effect(() => {
|
|
1694
|
-
try { Alpine.evaluate(evalCtx, 'typeof $locale !== "undefined" && $locale.current'); } catch {}
|
|
1695
|
-
try { Alpine.evaluate(evalCtx, '$x && $x.manifest && $x.manifest._loadedFrom'); } catch {}
|
|
1711
|
+
try { (window.ManifestUI?._eval ? (x) => window.ManifestUI._eval(x) : (x) => Alpine.evaluate(evalCtx, x))('typeof $locale !== "undefined" && $locale.current'); } catch {}
|
|
1712
|
+
try { (window.ManifestUI?._eval ? (x) => window.ManifestUI._eval(x) : (x) => Alpine.evaluate(evalCtx, x))('$x && $x.manifest && $x.manifest._loadedFrom'); } catch {}
|
|
1696
1713
|
runDiscovery();
|
|
1697
1714
|
// Re-localize the whole picker on locale switch.
|
|
1698
1715
|
this._applyUi(this.rootEl);
|
package/lib/manifest.combobox.js
CHANGED
|
@@ -12,6 +12,23 @@
|
|
|
12
12
|
* ------------------------------------------------------------------ */
|
|
13
13
|
if (!window.ManifestUI) {
|
|
14
14
|
window.ManifestUI = {
|
|
15
|
+
// One cached evaluator per expression: each Alpine.evaluate would register a cleanup on <body>, never run
|
|
16
|
+
_eval(expr) {
|
|
17
|
+
const A = window.Alpine;
|
|
18
|
+
// Magics registered after an evaluator was built stay invisible to it, so a registration drops the cache
|
|
19
|
+
if (!A.magic.__manifestMagicCounted) {
|
|
20
|
+
const magic = A.magic;
|
|
21
|
+
A.magic = function () { window.__manifestMagicVersion = (window.__manifestMagicVersion || 0) + 1; return magic.apply(this, arguments); };
|
|
22
|
+
A.magic.__manifestMagicCounted = true;
|
|
23
|
+
}
|
|
24
|
+
const version = window.__manifestMagicVersion || 0;
|
|
25
|
+
if (!this._evals || this._evalsVersion !== version) { this._evals = new Map(); this._evalsVersion = version; }
|
|
26
|
+
let fn = this._evals.get(expr);
|
|
27
|
+
if (!fn) this._evals.set(expr, fn = A.evaluateLater(document.body, expr));
|
|
28
|
+
let out;
|
|
29
|
+
fn(v => { out = v; });
|
|
30
|
+
return out;
|
|
31
|
+
},
|
|
15
32
|
_loadedSourceNames() {
|
|
16
33
|
try {
|
|
17
34
|
const store = window.ManifestDataStore && window.ManifestDataStore.rawDataStore;
|
|
@@ -22,11 +39,11 @@ if (!window.ManifestUI) {
|
|
|
22
39
|
resolve(component, fallbacks) {
|
|
23
40
|
const merged = JSON.parse(JSON.stringify(fallbacks || {}));
|
|
24
41
|
try {
|
|
25
|
-
if (!window.Alpine || typeof Alpine.
|
|
26
|
-
try {
|
|
42
|
+
if (!window.Alpine || typeof Alpine.evaluateLater !== 'function') return merged;
|
|
43
|
+
try { this._eval('typeof $locale !== "undefined" && $locale.current'); } catch (_) { }
|
|
27
44
|
for (const name of this._loadedSourceNames()) {
|
|
28
45
|
let ui;
|
|
29
|
-
try { ui =
|
|
46
|
+
try { ui = this._eval(`$x['${name}'] && $x['${name}']._ui && $x['${name}']._ui['${component}']`); } catch (_) { ui = null; }
|
|
30
47
|
if (ui && typeof ui === 'object' && !Array.isArray(ui)) this._deepOverlay(merged, ui);
|
|
31
48
|
}
|
|
32
49
|
} catch (_) { }
|
package/lib/manifest.css
CHANGED
|
@@ -2580,14 +2580,21 @@
|
|
|
2580
2580
|
background-color: rgba(0, 0, 0, 0.35)
|
|
2581
2581
|
}
|
|
2582
2582
|
|
|
2583
|
-
/* Hide dropdowns when dialogs are open */
|
|
2583
|
+
/* Hide dropdowns when dialogs are open: <html> sets flags, menus read them via style queries */
|
|
2584
2584
|
html:has(dialog:popover-open) {
|
|
2585
|
+
--dialog-open: 1;
|
|
2586
|
+
}
|
|
2585
2587
|
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2588
|
+
html:has(dialog:popover-open ~ dialog:popover-open) {
|
|
2589
|
+
--dialog-stacked: 1;
|
|
2590
|
+
}
|
|
2591
|
+
|
|
2592
|
+
/* Hide dropdowns outside of any dialog. A generated popover (a datepicker
|
|
2593
|
+
calendar, a colorpicker panel) is appended to <body>, so DOM position alone
|
|
2594
|
+
can't tell page chrome from a menu the dialog itself opened —
|
|
2595
|
+
data-popover-nested marks the latter, which CSS has no way to work out. */
|
|
2596
|
+
@container style(--dialog-open: 1) {
|
|
2597
|
+
menu[popover]:not(dialog *):not([data-popover-nested]) {
|
|
2591
2598
|
opacity: 0;
|
|
2592
2599
|
scale: .9;
|
|
2593
2600
|
pointer-events: none;
|
|
@@ -2600,8 +2607,8 @@
|
|
|
2600
2607
|
}
|
|
2601
2608
|
|
|
2602
2609
|
/* When multiple dialogs are open, hide dropdowns in all but closest dialog */
|
|
2603
|
-
|
|
2604
|
-
|
|
2610
|
+
@container style(--dialog-stacked: 1) {
|
|
2611
|
+
dialog:popover-open:not(:last-of-type) menu[popover] {
|
|
2605
2612
|
opacity: 0;
|
|
2606
2613
|
scale: .9;
|
|
2607
2614
|
pointer-events: none;
|
package/lib/manifest.data.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
(function () {
|
|
4
4
|
|
|
5
|
-
const MANIFEST_BUILD_VERSION = '0.5.
|
|
5
|
+
const MANIFEST_BUILD_VERSION = '0.5.264';
|
|
6
6
|
|
|
7
7
|
/* Manifest Data Sources - Configuration */
|
|
8
8
|
|
|
@@ -784,7 +784,8 @@ function createReactiveReferences(data, dataSourceName = null) {
|
|
|
784
784
|
dataSourceName,
|
|
785
785
|
data.$id,
|
|
786
786
|
bucketName,
|
|
787
|
-
columnName
|
|
787
|
+
columnName,
|
|
788
|
+
{ owner: newObj }
|
|
788
789
|
);
|
|
789
790
|
|
|
790
791
|
// Assign computed array to entry
|
|
@@ -6011,13 +6012,9 @@ const routeProxyCache = new Map();
|
|
|
6011
6012
|
// Clear route proxy cache for a specific data source (called when store updates)
|
|
6012
6013
|
function clearRouteProxyCacheForDataSource(dataSourceName) {
|
|
6013
6014
|
if (!dataSourceName) return;
|
|
6014
|
-
const
|
|
6015
|
-
|
|
6016
|
-
if (key.startsWith(`${dataSourceName}:`)) {
|
|
6017
|
-
keysToDelete.push(key);
|
|
6018
|
-
}
|
|
6015
|
+
for (const [key, entry] of routeProxyCache.entries()) {
|
|
6016
|
+
if (key.startsWith(`${dataSourceName}:`)) entry.stale = true;
|
|
6019
6017
|
}
|
|
6020
|
-
keysToDelete.forEach(key => routeProxyCache.delete(key));
|
|
6021
6018
|
}
|
|
6022
6019
|
|
|
6023
6020
|
// Create proxy for route-specific lookups
|
|
@@ -6025,8 +6022,13 @@ function createRouteProxy(dataSourceData, pathKey, dataSourceName) {
|
|
|
6025
6022
|
// Use cache if dataSourceName is provided to avoid recreating proxies
|
|
6026
6023
|
if (dataSourceName && pathKey) {
|
|
6027
6024
|
const cacheKey = `${dataSourceName}:${pathKey}`;
|
|
6028
|
-
|
|
6029
|
-
|
|
6025
|
+
const cached = routeProxyCache.get(cacheKey);
|
|
6026
|
+
if (cached) {
|
|
6027
|
+
if (cached.stale) {
|
|
6028
|
+
cached.stale = false;
|
|
6029
|
+
cached.refresh(dataSourceData);
|
|
6030
|
+
}
|
|
6031
|
+
return cached.proxy;
|
|
6030
6032
|
}
|
|
6031
6033
|
}
|
|
6032
6034
|
|
|
@@ -6271,7 +6273,15 @@ function createRouteProxy(dataSourceData, pathKey, dataSourceName) {
|
|
|
6271
6273
|
// Cache the proxy if dataSourceName and pathKey are provided
|
|
6272
6274
|
if (dataSourceName && pathKey) {
|
|
6273
6275
|
const cacheKey = `${dataSourceName}:${pathKey}`;
|
|
6274
|
-
routeProxyCache.set(cacheKey,
|
|
6276
|
+
routeProxyCache.set(cacheKey, {
|
|
6277
|
+
proxy,
|
|
6278
|
+
stale: false,
|
|
6279
|
+
refresh(data) {
|
|
6280
|
+
dataSourceData = data;
|
|
6281
|
+
lastUpdateUrl = null;
|
|
6282
|
+
updateReactiveTarget();
|
|
6283
|
+
}
|
|
6284
|
+
});
|
|
6275
6285
|
}
|
|
6276
6286
|
|
|
6277
6287
|
return proxy;
|
|
@@ -6299,7 +6309,10 @@ const reactiveFileManagers = new Map();
|
|
|
6299
6309
|
|
|
6300
6310
|
// Create a computed files array for an entry that filters the bucket array by fileIds
|
|
6301
6311
|
// This is the new single-source-of-truth approach
|
|
6302
|
-
|
|
6312
|
+
// owner: the row object holding this array; the effect releases itself once the row leaves its table
|
|
6313
|
+
function createComputedFilesArray(tableName, entryId, bucketName, columnName = 'fileIds', options = {}) {
|
|
6314
|
+
const owner = options.owner || null;
|
|
6315
|
+
|
|
6303
6316
|
if (typeof Alpine === 'undefined') {
|
|
6304
6317
|
// Return empty array proxy if Alpine not available
|
|
6305
6318
|
return new Proxy([], {
|
|
@@ -6405,8 +6418,9 @@ function createComputedFilesArray(tableName, entryId, bucketName, columnName = '
|
|
|
6405
6418
|
};
|
|
6406
6419
|
|
|
6407
6420
|
// Set up Alpine effect to watch both bucket array and entry's fileIds
|
|
6421
|
+
let filesEffect = null;
|
|
6408
6422
|
if (typeof Alpine !== 'undefined' && Alpine.effect) {
|
|
6409
|
-
Alpine.effect(() => {
|
|
6423
|
+
filesEffect = Alpine.effect(() => {
|
|
6410
6424
|
// Access store to track changes
|
|
6411
6425
|
const store = Alpine.store('data');
|
|
6412
6426
|
if (!store) {
|
|
@@ -6414,6 +6428,14 @@ function createComputedFilesArray(tableName, entryId, bucketName, columnName = '
|
|
|
6414
6428
|
return;
|
|
6415
6429
|
}
|
|
6416
6430
|
|
|
6431
|
+
if (owner) {
|
|
6432
|
+
const rows = store[tableName];
|
|
6433
|
+
if (Array.isArray(rows) && !rows.some(row => (Alpine.raw ? Alpine.raw(row) : row) === owner)) {
|
|
6434
|
+
queueMicrotask(() => { if (filesEffect) Alpine.release(filesEffect); });
|
|
6435
|
+
return;
|
|
6436
|
+
}
|
|
6437
|
+
}
|
|
6438
|
+
|
|
6417
6439
|
// Track bucket array changes - access the array itself and iterate to track all elements
|
|
6418
6440
|
const bucketFiles = store[bucketName];
|
|
6419
6441
|
if (bucketFiles && Array.isArray(bucketFiles)) {
|
|
@@ -6460,7 +6482,7 @@ function createComputedFilesArray(tableName, entryId, bucketName, columnName = '
|
|
|
6460
6482
|
recomputeFiles();
|
|
6461
6483
|
|
|
6462
6484
|
// Create proxy that adds loading/error properties
|
|
6463
|
-
|
|
6485
|
+
const computedProxy = new Proxy(computedFiles, {
|
|
6464
6486
|
get(target, key) {
|
|
6465
6487
|
if (key === '$loading') return loadingState.value;
|
|
6466
6488
|
if (key === '$error') return errorState.value;
|
|
@@ -6475,6 +6497,7 @@ function createComputedFilesArray(tableName, entryId, bucketName, columnName = '
|
|
|
6475
6497
|
return key in target || key === '$loading' || key === '$error';
|
|
6476
6498
|
}
|
|
6477
6499
|
});
|
|
6500
|
+
return computedProxy;
|
|
6478
6501
|
}
|
|
6479
6502
|
|
|
6480
6503
|
// Create reactive file array that watches a function/expression for entryId changes
|
|
@@ -6908,9 +6931,7 @@ function createReactiveFileManager(tableName, entryId, bucketName, columnName) {
|
|
|
6908
6931
|
});
|
|
6909
6932
|
|
|
6910
6933
|
unsubscribeCallbacks.push(() => {
|
|
6911
|
-
if (unwatch
|
|
6912
|
-
unwatch();
|
|
6913
|
-
}
|
|
6934
|
+
if (unwatch) Alpine.release(unwatch);
|
|
6914
6935
|
});
|
|
6915
6936
|
};
|
|
6916
6937
|
|
|
@@ -62,6 +62,23 @@
|
|
|
62
62
|
if (!window.ManifestUI) {
|
|
63
63
|
window.ManifestUI = {
|
|
64
64
|
/* Loaded data-source names only — never force-loads others to scan them. */
|
|
65
|
+
// One cached evaluator per expression: each Alpine.evaluate would register a cleanup on <body>, never run
|
|
66
|
+
_eval(expr) {
|
|
67
|
+
const A = window.Alpine;
|
|
68
|
+
// Magics registered after an evaluator was built stay invisible to it, so a registration drops the cache
|
|
69
|
+
if (!A.magic.__manifestMagicCounted) {
|
|
70
|
+
const magic = A.magic;
|
|
71
|
+
A.magic = function () { window.__manifestMagicVersion = (window.__manifestMagicVersion || 0) + 1; return magic.apply(this, arguments); };
|
|
72
|
+
A.magic.__manifestMagicCounted = true;
|
|
73
|
+
}
|
|
74
|
+
const version = window.__manifestMagicVersion || 0;
|
|
75
|
+
if (!this._evals || this._evalsVersion !== version) { this._evals = new Map(); this._evalsVersion = version; }
|
|
76
|
+
let fn = this._evals.get(expr);
|
|
77
|
+
if (!fn) this._evals.set(expr, fn = A.evaluateLater(document.body, expr));
|
|
78
|
+
let out;
|
|
79
|
+
fn(v => { out = v; });
|
|
80
|
+
return out;
|
|
81
|
+
},
|
|
65
82
|
_loadedSourceNames() {
|
|
66
83
|
try {
|
|
67
84
|
const store = window.ManifestDataStore && window.ManifestDataStore.rawDataStore;
|
|
@@ -73,11 +90,11 @@
|
|
|
73
90
|
resolve(component, fallbacks) {
|
|
74
91
|
const merged = JSON.parse(JSON.stringify(fallbacks || {}));
|
|
75
92
|
try {
|
|
76
|
-
if (!window.Alpine || typeof Alpine.
|
|
77
|
-
try {
|
|
93
|
+
if (!window.Alpine || typeof Alpine.evaluateLater !== 'function') return merged;
|
|
94
|
+
try { this._eval('typeof $locale !== "undefined" && $locale.current'); } catch (_) { } // dep → re-resolve on locale switch
|
|
78
95
|
for (const name of this._loadedSourceNames()) {
|
|
79
96
|
let ui;
|
|
80
|
-
try { ui =
|
|
97
|
+
try { ui = this._eval(`$x['${name}'] && $x['${name}']._ui && $x['${name}']._ui['${component}']`); } catch (_) { ui = null; }
|
|
81
98
|
if (ui && typeof ui === 'object' && !Array.isArray(ui)) this._deepOverlay(merged, ui);
|
|
82
99
|
}
|
|
83
100
|
} catch (_) { }
|
package/lib/manifest.dialog.css
CHANGED
|
@@ -103,14 +103,21 @@
|
|
|
103
103
|
background-color: rgba(0, 0, 0, 0.35)
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
/* Hide dropdowns when dialogs are open */
|
|
106
|
+
/* Hide dropdowns when dialogs are open: <html> sets flags, menus read them via style queries */
|
|
107
107
|
html:has(dialog:popover-open) {
|
|
108
|
+
--dialog-open: 1;
|
|
109
|
+
}
|
|
108
110
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
111
|
+
html:has(dialog:popover-open ~ dialog:popover-open) {
|
|
112
|
+
--dialog-stacked: 1;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/* Hide dropdowns outside of any dialog. A generated popover (a datepicker
|
|
116
|
+
calendar, a colorpicker panel) is appended to <body>, so DOM position alone
|
|
117
|
+
can't tell page chrome from a menu the dialog itself opened —
|
|
118
|
+
data-popover-nested marks the latter, which CSS has no way to work out. */
|
|
119
|
+
@container style(--dialog-open: 1) {
|
|
120
|
+
menu[popover]:not(dialog *):not([data-popover-nested]) {
|
|
114
121
|
opacity: 0;
|
|
115
122
|
scale: .9;
|
|
116
123
|
pointer-events: none;
|
|
@@ -123,8 +130,8 @@
|
|
|
123
130
|
}
|
|
124
131
|
|
|
125
132
|
/* When multiple dialogs are open, hide dropdowns in all but closest dialog */
|
|
126
|
-
|
|
127
|
-
|
|
133
|
+
@container style(--dialog-stacked: 1) {
|
|
134
|
+
dialog:popover-open:not(:last-of-type) menu[popover] {
|
|
128
135
|
opacity: 0;
|
|
129
136
|
scale: .9;
|
|
130
137
|
pointer-events: none;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"manifest.appwrite.auth.js": "sha384-9WNhIeSEzxxJm+yP7cV41kV2xyzyXgFCNpThqiREcNbb6tnIW6O7VRZPL2jwy9Nk",
|
|
3
|
-
"manifest.appwrite.data.js": "sha384-
|
|
3
|
+
"manifest.appwrite.data.js": "sha384-eV1YxeLMCf9zm5onq75vkiJwNB5ykd6Fv4ZPKz4L9DME2ZvEmef5FQSq4HMRbAEK",
|
|
4
4
|
"manifest.appwrite.presences.js": "sha384-/CagPsgWhO1sWEevCNGJmZ/ezRK9YCjLjvF7hxNSM4gVlJmEVtfSLfF7wnsRq441",
|
|
5
5
|
"manifest.bindings.js": "sha384-lPtMf8Ykaic9gNVZKq8Scia1881ZeMAyxer3WCIkUNwwrgzGBWto1OXADUwjvORF",
|
|
6
|
-
"manifest.charts.js": "sha384-
|
|
6
|
+
"manifest.charts.js": "sha384-AFbP7mQnigy7DU1s+YE30yKTeQAKfgNazhbfSNbfd9ZpLgeulZKaPi/fAq3gJHDO",
|
|
7
7
|
"manifest.chat.js": "sha384-88DfMfJLoi2oxclVD2iIMDkIGAExMXq5k47mekUredlicLaP3oZY5bwtwqs+TqDF",
|
|
8
8
|
"manifest.code.js": "sha384-WGPlZE5Sp9GygUzJSmCdpLyYQTgvmEKc9BQS9Hmq1VTQwkqYJzPSWibHvPekcres",
|
|
9
9
|
"manifest.color.js": "sha384-6Rv3LxyTcZNjrhtayQfqRdCx0uSZ4BiEbgEI98I62eTvp8Aw7LBIoNJ0Je1oktwL",
|
|
10
|
-
"manifest.colorpicker.js": "sha384-
|
|
11
|
-
"manifest.combobox.js": "sha384
|
|
10
|
+
"manifest.colorpicker.js": "sha384-P+Zx0QzhMGfku8s3yEskTte4/iXCGVX3zdhu42IGNfFcSmhOW+nqVK7w+uczWRGY",
|
|
11
|
+
"manifest.combobox.js": "sha384-/lJo6vaxKjgnBSRs/dzkhK1dzGk3GBw8FISoNJZB70mwAVwu1k5veZyBXjOb4keS",
|
|
12
12
|
"manifest.components.js": "sha384-BUFA8h+G5Plr82sV7bKzO42pPoiRZwRQcKj1lt2ROFiKjjlkayU/vmkAFqEsdBA+",
|
|
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-f3ncx+C3dVh8WQfzsMqLzP+f7r6aAtrTJ/yzz7jKA8SV743cq4rPr10COtH22J2e",
|
|
15
|
+
"manifest.datepicker.js": "sha384-EzlMwvIxlla/0BuyhAEqxN0M8TGcWIWgEIg840V0akKQQK1uY648wPWMkobvtq/o",
|
|
16
16
|
"manifest.defer.js": "sha384-5cHzFTbx+cZmGpk9FuiUtW3ciC9NvvHwJeHP7xL5yiZVp9PhMWVdQ7L9y6ju2yoo",
|
|
17
17
|
"manifest.device.js": "sha384-YeQaS56L8IILqrQNBSeAOLwIh5DuAOrE60cYLK1+46qJtUrXlAvqGe2j5mbV4Vq7",
|
|
18
18
|
"manifest.dropdowns.js": "sha384-TlFrYVWTXvpUmGnYaAk2til4lu0p6w5YcmWWEzZAokzd2qlmoyRLLXXVuYAK/AlR",
|
|
@@ -26,15 +26,15 @@
|
|
|
26
26
|
"manifest.rich.text.js": "sha384-ZBV9jXmu2nmprEHicddRE/m7nR4RPZtVc969Jte0+EJYBcVph7itkjcgN/61PyeC",
|
|
27
27
|
"manifest.router.js": "sha384-9LMIkwrgnxmmFDv70TND2MRJF1z6Nl4yqG7fH5DbJ8oUIhdu/u4yUPSime1/EYhP",
|
|
28
28
|
"manifest.slides.js": "sha384-3uRTkyK9XPLmnxI2+igZlpi4EyPlU/7IHj5j3BZJJ2KN455vXyk99fiXV3feO/XY",
|
|
29
|
-
"manifest.status.js": "sha384-
|
|
29
|
+
"manifest.status.js": "sha384-ofu7nBnVIGZ1U1o2R9d2H3V8aEMPUCVbl5FO3gIToXqi0oa36fTviEdh5UU7Kitw",
|
|
30
30
|
"manifest.svg.js": "sha384-qr/8H9+2cIhSXNbRWRtIdrDlTOxKlNJqwEefHvCYoiBNW/kKhPTFa109Orv/EBnb",
|
|
31
|
-
"manifest.sw.js": "sha384-
|
|
31
|
+
"manifest.sw.js": "sha384-1YhTn8oZZM4IrB59KqwQ7zk7P+KIAoMT4POZaz08NpQqhwJh4qDEERuKDT9jro1N",
|
|
32
32
|
"manifest.tabs.js": "sha384-otU09H7jnawVKQdLAYpMCd3jx00tgyPVr42D2hLIBzN5dG4se505YesavdnMqEi1",
|
|
33
|
-
"manifest.tailwind.js": "sha384-
|
|
33
|
+
"manifest.tailwind.js": "sha384-yuP3LEvWU+QVjxjkZ0YhErtC9RrGmhOmHjjFjhS9obqZbp5/KTIEnSR0CXDvHE0B",
|
|
34
34
|
"manifest.toasts.js": "sha384-3zkWxzw693pxg3QDFsoYCA3CqYaLKmBaMArULXODD66Utolpewl0OAeTB92aWUVv",
|
|
35
35
|
"manifest.tooltips.js": "sha384-hXGp5j0s6p2kGZY/hqLPEbaUv68ca63kFCjYiZqK3DcC12mpHTBy1vz3kuApyf4p",
|
|
36
36
|
"manifest.url.parameters.js": "sha384-J2aSVBOPsoqsbafHndrWLHEDpKb4AKJAoQnVmKA4gZh5P/8HHjFWHO/lkusmG84l",
|
|
37
37
|
"manifest.utilities.js": "sha384-h17EquaRtNcEW0yfhk7R+a+2+CzTlBxPuFryO6i9NV/OiIRMihREoyzQ77QawoQ7",
|
|
38
|
-
"manifest.virtual.js": "sha384-
|
|
39
|
-
"manifest.js": "sha384-
|
|
38
|
+
"manifest.virtual.js": "sha384-ru/eYigBWgJHcHCP0yGKRaF1FNsKisWN61LBWaH16+8ZIh5H8fWtP3aMe0s9/mrg",
|
|
39
|
+
"manifest.js": "sha384-qMp2SeZUWYE/Lth8sguzlCAzXxn72gBDBPYUZ1iDlQVvzYuCc8/NPgw1gUJR88u1"
|
|
40
40
|
}
|
package/lib/manifest.js
CHANGED
|
@@ -771,6 +771,9 @@
|
|
|
771
771
|
if (typeof document !== 'undefined') document.addEventListener('alpine:initialized', () => { window.__manifestAlpineStarted = true; }, { once: true });
|
|
772
772
|
// Framework web components — <x-*> tags that are NOT project components.
|
|
773
773
|
const FRAMEWORK_TAG_RE = /^x-(code|code-group)$/;
|
|
774
|
+
// Attribute values seen to hold no usage magic at all; repeated rows hit this instead of the regexes
|
|
775
|
+
const USAGE_ANY_RE = new RegExp('\\$(' + USAGE_PLUGINS.map(u => u.magic.slice(1)).join('|') + ')\\b');
|
|
776
|
+
const usageClean = new Set();
|
|
774
777
|
function detectUsagePlugins(alreadyLoaded, root = typeof document === 'undefined' ? null : document) {
|
|
775
778
|
const wanted = USAGE_PLUGINS.filter(u => !alreadyLoaded.includes(u.plugin));
|
|
776
779
|
// <x-*> tags load the components plugin even with nothing registered in
|
|
@@ -778,7 +781,8 @@
|
|
|
778
781
|
const wantComponents = !alreadyLoaded.includes('components');
|
|
779
782
|
if ((wanted.length === 0 && !wantComponents) || !root) return [];
|
|
780
783
|
const found = new Set();
|
|
781
|
-
const
|
|
784
|
+
const target = new Set(wanted.map(u => u.plugin)).size + (wantComponents ? 1 : 0);
|
|
785
|
+
const done = () => found.size === target;
|
|
782
786
|
|
|
783
787
|
for (const s of root.querySelectorAll('script:not([src])')) {
|
|
784
788
|
const t = s.textContent || '';
|
|
@@ -794,7 +798,12 @@
|
|
|
794
798
|
for (const attr of el.attributes || []) {
|
|
795
799
|
for (const u of wanted) if (u.attr && !found.has(u.plugin) && attr.name.startsWith(u.attr)) found.add(u.plugin);
|
|
796
800
|
const v = attr.value;
|
|
797
|
-
if (!v || v.indexOf('$') === -1) continue;
|
|
801
|
+
if (!v || v.indexOf('$') === -1 || usageClean.has(v)) continue;
|
|
802
|
+
if (!USAGE_ANY_RE.test(v)) {
|
|
803
|
+
if (usageClean.size > 20000) usageClean.clear();
|
|
804
|
+
usageClean.add(v);
|
|
805
|
+
continue;
|
|
806
|
+
}
|
|
798
807
|
for (const u of wanted) if (!found.has(u.plugin) && u.re.test(v)) found.add(u.plugin);
|
|
799
808
|
}
|
|
800
809
|
};
|