mnfst 0.5.298 → 0.5.300
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.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.300';
|
|
6
6
|
|
|
7
7
|
/* Manifest Data Sources - Configuration */
|
|
8
8
|
|
|
@@ -1284,7 +1284,7 @@ function setupTeamChangeListener() {
|
|
|
1284
1284
|
}
|
|
1285
1285
|
|
|
1286
1286
|
// Find team-scoped data sources (both "team" and "teams" scopes, including dual scope)
|
|
1287
|
-
const teamScopedDataSources = Object.
|
|
1287
|
+
const teamScopedDataSources = Object.getOwnPropertyNames(manifest.data).map(name => [name, manifest.data[name]])
|
|
1288
1288
|
.filter(([name, config]) => {
|
|
1289
1289
|
if (typeof config === 'object' && config.scope) {
|
|
1290
1290
|
const scope = config.scope;
|
|
@@ -6654,6 +6654,16 @@ function createComputedFilesArray(tableName, entryId, bucketName, columnName = '
|
|
|
6654
6654
|
});
|
|
6655
6655
|
}
|
|
6656
6656
|
|
|
6657
|
+
// Inline mapping: read a hidden bucket source, loaded once per bucket on first read
|
|
6658
|
+
const inlineSource = inlineBucketSource(tableName, bucketName);
|
|
6659
|
+
if (inlineSource) bucketName = inlineSource;
|
|
6660
|
+
let inlineRequested = !inlineSource;
|
|
6661
|
+
const requestInline = () => {
|
|
6662
|
+
if (inlineRequested) return;
|
|
6663
|
+
inlineRequested = true;
|
|
6664
|
+
loadInlineBucket(inlineSource);
|
|
6665
|
+
};
|
|
6666
|
+
|
|
6657
6667
|
// Create a reactive array that will be computed from bucket and fileIds
|
|
6658
6668
|
const computedFiles = typeof Alpine !== 'undefined' && Alpine.reactive
|
|
6659
6669
|
? Alpine.reactive([])
|
|
@@ -6806,6 +6816,7 @@ function createComputedFilesArray(tableName, entryId, bucketName, columnName = '
|
|
|
6806
6816
|
// Create proxy that adds loading/error properties
|
|
6807
6817
|
const computedProxy = new Proxy(computedFiles, {
|
|
6808
6818
|
get(target, key) {
|
|
6819
|
+
if (key !== 'toJSON') requestInline();
|
|
6809
6820
|
if (key === '$loading') return loadingState.value;
|
|
6810
6821
|
if (key === '$error') return errorState.value;
|
|
6811
6822
|
if (key === Symbol.iterator) return target[Symbol.iterator].bind(target);
|
|
@@ -6816,12 +6827,43 @@ function createComputedFilesArray(tableName, entryId, bucketName, columnName = '
|
|
|
6816
6827
|
return undefined;
|
|
6817
6828
|
},
|
|
6818
6829
|
has(target, key) {
|
|
6830
|
+
requestInline();
|
|
6819
6831
|
return key in target || key === '$loading' || key === '$error';
|
|
6820
6832
|
}
|
|
6821
6833
|
});
|
|
6822
6834
|
return computedProxy;
|
|
6823
6835
|
}
|
|
6824
6836
|
|
|
6837
|
+
// Hidden bucket source for an inline mapping ({ appwriteBucketId }): non-enumerable on manifest.data,
|
|
6838
|
+
// so loadDataSource, resetSource and identity resets treat it as a named bucket
|
|
6839
|
+
function inlineBucketSource(tableName, bucketName) {
|
|
6840
|
+
const manifest = window.ManifestDataConfig?.getManifest?.();
|
|
6841
|
+
const table = manifest?.data?.[tableName];
|
|
6842
|
+
const mapping = table?.storage?.[bucketName];
|
|
6843
|
+
if (!mapping || typeof mapping !== 'object' || !mapping.appwriteBucketId) return null;
|
|
6844
|
+
const scope = mapping.scope ? [].concat(mapping.scope).join('+') : '';
|
|
6845
|
+
const name = `_inline_${mapping.appwriteBucketId}${scope ? `_${scope}` : ''}`;
|
|
6846
|
+
if (!Object.prototype.hasOwnProperty.call(manifest.data, name)) {
|
|
6847
|
+
const config = { appwriteBucketId: mapping.appwriteBucketId };
|
|
6848
|
+
if (mapping.scope) config.scope = mapping.scope;
|
|
6849
|
+
for (const key of ['appwriteProjectId', 'appwriteEndpoint', 'appwriteDevKey']) {
|
|
6850
|
+
if (table[key]) config[key] = table[key];
|
|
6851
|
+
}
|
|
6852
|
+
Object.defineProperty(manifest.data, name, { value: config, enumerable: false, configurable: true, writable: true });
|
|
6853
|
+
}
|
|
6854
|
+
return name;
|
|
6855
|
+
}
|
|
6856
|
+
|
|
6857
|
+
// Load a hidden bucket source unless loaded or loading (resets reload it themselves)
|
|
6858
|
+
function loadInlineBucket(name) {
|
|
6859
|
+
const store = typeof Alpine !== 'undefined' ? Alpine.store('data') : null;
|
|
6860
|
+
const raw = window.ManifestDataStore?.rawOf ? window.ManifestDataStore.rawOf(store) : store;
|
|
6861
|
+
const state = raw?.[`_${name}_state`];
|
|
6862
|
+
if (state && (state.loading || state.ready || state.error)) return;
|
|
6863
|
+
const locale = document.documentElement.lang || Alpine.store('locale')?.current || 'en';
|
|
6864
|
+
Promise.resolve(window.ManifestDataMain?.loadDataSource?.(name, locale)).catch(() => { /* $error carries it */ });
|
|
6865
|
+
}
|
|
6866
|
+
|
|
6825
6867
|
// Create reactive file array that watches a function/expression for entryId changes
|
|
6826
6868
|
function createReactiveFileArrayFromGetter(tableName, entryIdGetter, bucketName, columnName) {
|
|
6827
6869
|
if (typeof Alpine === 'undefined') {
|
|
@@ -11036,7 +11078,8 @@ function setupAuthResetListener() {
|
|
|
11036
11078
|
const store = typeof Alpine !== 'undefined' ? Alpine.store('data') : null;
|
|
11037
11079
|
if (!manifest || !ds?.resetSource || !store) return;
|
|
11038
11080
|
const raw = ds.rawOf ? ds.rawOf(store) : store;
|
|
11039
|
-
const configs = { ...(manifest.appwrite || {})
|
|
11081
|
+
const configs = { ...(manifest.appwrite || {}) };
|
|
11082
|
+
for (const name of Object.getOwnPropertyNames(manifest.data || {})) configs[name] = manifest.data[name]; // incl. hidden inline buckets
|
|
11040
11083
|
const locale = liveLocale();
|
|
11041
11084
|
for (const [name, config] of Object.entries(configs)) {
|
|
11042
11085
|
if (!isIdentityBound(config) || raw[`_${name}_state`] === undefined) continue;
|
|
@@ -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-c3rIozRRbzc4IDJFYiGh1IjGhG3OrQsSfPHgyDv/wLpENWhI/H+R2VI0eYKZhviY",
|
|
4
4
|
"manifest.appwrite.presences.js": "sha384-LINPhIPTCK+rA8zd+HPUzMSEgH6Sl2vQMEyItT97bnEE2FYGYKqjXX+CWdt6nl9z",
|
|
5
5
|
"manifest.bindings.js": "sha384-lPtMf8Ykaic9gNVZKq8Scia1881ZeMAyxer3WCIkUNwwrgzGBWto1OXADUwjvORF",
|
|
6
6
|
"manifest.charts.js": "sha384-cf1N+ssSR5IL2qufv8noB5QOJrSvL7J0sLKgbJmyTDl1HodQ/Bkyf/QntO6Iynvi",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"manifest.combobox.js": "sha384-/lJo6vaxKjgnBSRs/dzkhK1dzGk3GBw8FISoNJZB70mwAVwu1k5veZyBXjOb4keS",
|
|
12
12
|
"manifest.components.js": "sha384-7lu4Nw2GqpAUn63c3gYEvgfM58PYsdoPv3wzqPQfZ5bravqOY/lfE8HFKHsKflQj",
|
|
13
13
|
"manifest.computed.js": "sha384-GYML/e81gQfN+iDbqhPUgny8bINCyL+SrbTofoGk4hlCnLLjv51mCv42JMqq+ku5",
|
|
14
|
-
"manifest.data.js": "sha384-
|
|
14
|
+
"manifest.data.js": "sha384-gB8Y3Dox2Yc1DfyuiynEjsCYdmh2ZQns6uBd/urznLKoRr2DxDuHYJXxL7vV6ojf",
|
|
15
15
|
"manifest.datepicker.js": "sha384-EzlMwvIxlla/0BuyhAEqxN0M8TGcWIWgEIg840V0akKQQK1uY648wPWMkobvtq/o",
|
|
16
16
|
"manifest.defer.js": "sha384-PRp7+dCZHnnl55rX2xrHutLrQnszHo7o5o9Tq28M/yjLZPuXDzcwQNxCdvbtCYSz",
|
|
17
17
|
"manifest.device.js": "sha384-YeQaS56L8IILqrQNBSeAOLwIh5DuAOrE60cYLK1+46qJtUrXlAvqGe2j5mbV4Vq7",
|
|
@@ -29,13 +29,13 @@
|
|
|
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-GeqajA7Wqj4902PrA1Wda/C2hrZJb/C7Mu3HFr+9cobcv7NShBXDvwyq9Y7jVNSm",
|
|
33
33
|
"manifest.tabs.js": "sha384-otU09H7jnawVKQdLAYpMCd3jx00tgyPVr42D2hLIBzN5dG4se505YesavdnMqEi1",
|
|
34
34
|
"manifest.tailwind.js": "sha384-yuP3LEvWU+QVjxjkZ0YhErtC9RrGmhOmHjjFjhS9obqZbp5/KTIEnSR0CXDvHE0B",
|
|
35
35
|
"manifest.toasts.js": "sha384-UpOz9fAdGeGUhL0NamBg5iPepEfIy73p9HYdcxfOQC5b7CVsl7Our0skdZzaLNcC",
|
|
36
36
|
"manifest.tooltips.js": "sha384-hXGp5j0s6p2kGZY/hqLPEbaUv68ca63kFCjYiZqK3DcC12mpHTBy1vz3kuApyf4p",
|
|
37
37
|
"manifest.url.parameters.js": "sha384-J2aSVBOPsoqsbafHndrWLHEDpKb4AKJAoQnVmKA4gZh5P/8HHjFWHO/lkusmG84l",
|
|
38
|
-
"manifest.utilities.js": "sha384-
|
|
38
|
+
"manifest.utilities.js": "sha384-J6NZCPmeHPo12kcsUzJNJmjxX67MASCwdHUoLvV3Ty003zOi09quLrf5ghpzfw8a",
|
|
39
39
|
"manifest.virtual.js": "sha384-PtIDx042i29mkxEYZH+y3whBzKgBgV01CU1XzzeEl/8TBPl9qvny4ppyXgYI5DsM",
|
|
40
40
|
"manifest.js": "sha384-7+hNmvzD6OPQt6q4pZEDoqf5C8LHucIqlfKJQAAH6b4tsmvpX0viCvdYqqGOjqET"
|
|
41
41
|
}
|
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.300';
|
|
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)
|
|
@@ -4397,6 +4397,9 @@ detectOS();
|
|
|
4397
4397
|
function injectTailwindVariants() {
|
|
4398
4398
|
try {
|
|
4399
4399
|
if (document.getElementById('manifest-tailwind-variants')) return;
|
|
4400
|
+
// Dark follows $color's .dark class; an author's own declaration wins
|
|
4401
|
+
const authorDark = Array.from(document.querySelectorAll('style[type="text/tailwindcss"]'))
|
|
4402
|
+
.some(s => /@custom-variant\s+dark[\s({]/.test(s.textContent || ''));
|
|
4400
4403
|
const style = document.createElement('style');
|
|
4401
4404
|
style.id = 'manifest-tailwind-variants';
|
|
4402
4405
|
style.setAttribute('type', 'text/tailwindcss');
|
|
@@ -4414,7 +4417,8 @@ function injectTailwindVariants() {
|
|
|
4414
4417
|
'@custom-variant offline (&:where([data-online="false"] *));',
|
|
4415
4418
|
'@custom-variant standalone (&:where([data-standalone] *));',
|
|
4416
4419
|
'@custom-variant native (&:where([data-native] *));',
|
|
4417
|
-
'@custom-variant web (&:where(html:not([data-native]) *));'
|
|
4420
|
+
'@custom-variant web (&:where(html:not([data-native]) *));',
|
|
4421
|
+
...(authorDark ? [] : ['@custom-variant dark (&:where(.dark, .dark *));'])
|
|
4418
4422
|
].join('\n');
|
|
4419
4423
|
(document.head || document.documentElement).appendChild(style);
|
|
4420
4424
|
} catch (e) {
|
|
@@ -3160,7 +3160,8 @@ const TAILWIND_CUSTOM_VARIANTS = [
|
|
|
3160
3160
|
'@custom-variant offline (&:where([data-online="false"] *));',
|
|
3161
3161
|
'@custom-variant standalone (&:where([data-standalone] *));',
|
|
3162
3162
|
'@custom-variant native (&:where([data-native] *));',
|
|
3163
|
-
'@custom-variant web (&:where(html:not([data-native]) *));'
|
|
3163
|
+
'@custom-variant web (&:where(html:not([data-native]) *));',
|
|
3164
|
+
'@custom-variant dark (&:where(.dark, .dark *));'
|
|
3164
3165
|
].join('\n');
|
|
3165
3166
|
|
|
3166
3167
|
/** Balanced-brace extraction of a top-level `@layer <name> { ... }` body —
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mnfst",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.300",
|
|
4
4
|
"private": false,
|
|
5
5
|
"workspaces": [
|
|
6
6
|
"templates/starter",
|
|
@@ -60,6 +60,7 @@
|
|
|
60
60
|
"test:e2e:route-head": "node tests/e2e/route-head.e2e.mjs",
|
|
61
61
|
"test:e2e:prerender-patch": "node tests/e2e/utilities-prerender-patch.e2e.mjs",
|
|
62
62
|
"test:e2e:hidden-responsive": "node tests/e2e/utilities-hidden-responsive.e2e.mjs",
|
|
63
|
+
"test:e2e:tailwind-dark": "node tests/e2e/tailwind-dark-variant.e2e.mjs",
|
|
63
64
|
"lint": "echo 'No linting configured'",
|
|
64
65
|
"release:docs": "npm test && node scripts/release-bump.mjs packages/docs && cd packages/docs && npm publish --auth-type=web",
|
|
65
66
|
"release:check": "node scripts/release-check.mjs"
|