mnfst 0.5.52 → 0.5.53

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/README.md CHANGED
@@ -6,7 +6,7 @@ Manifest is a frontend framework extending HTML for rapid, feature-rich website
6
6
  - A CSS library, compatible with Tailwind CSS
7
7
 
8
8
  **With Manifest:**
9
- - Skip the build steps
9
+ - Build steps optional
10
10
  - Use only what you need
11
11
  - Stack with other frameworks & libraries
12
12
 
@@ -11720,6 +11720,30 @@ async function initializeDataSourcesPlugin() {
11720
11720
  filterFilesByScope // Export for use by getFilesForEntry
11721
11721
  };
11722
11722
 
11723
+ // Listen for manifest:dev-reload (fired by mnfst-run when a data file changes).
11724
+ // Re-fetches all local data sources and updates the Alpine store reactively.
11725
+ window.addEventListener('manifest:dev-reload', async () => {
11726
+ const manifest = await window.ManifestDataConfig.ensureManifest();
11727
+ if (!manifest?.data) return;
11728
+
11729
+ const locale = document.documentElement.lang ||
11730
+ (typeof Alpine !== 'undefined' && Alpine.store('locale')?.current) || 'en';
11731
+
11732
+ const { dataSourceCache, loadingPromises } = window.ManifestDataStore;
11733
+ const isAppwriteCollection = window.ManifestDataConfig.isAppwriteCollection;
11734
+
11735
+ for (const [name, source] of Object.entries(manifest.data)) {
11736
+ if (isAppwriteCollection(source)) continue;
11737
+ if (source && typeof source === 'object' && source.url) continue;
11738
+
11739
+ const cacheKey = `${name}:${locale}`;
11740
+ dataSourceCache.delete(cacheKey);
11741
+ loadingPromises.delete(cacheKey);
11742
+
11743
+ try { await loadDataSource(name, locale); } catch { /* skip failed sources */ }
11744
+ }
11745
+ });
11746
+
11723
11747
  // Initialize dataSources after magic method is registered
11724
11748
  if (window.ManifestDataStore.isInitializing || window.ManifestDataStore.initializationComplete) return;
11725
11749
  setIsInitializing(true);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mnfst",
3
- "version": "0.5.52",
3
+ "version": "0.5.53",
4
4
  "private": false,
5
5
  "workspaces": [
6
6
  "templates/starter",
@@ -17,15 +17,16 @@
17
17
  "clean": "rimraf src/scripts/manifest.js src/scripts/manifest.render.mjs src/styles/manifest.css src/styles/manifest.min.css src/styles/manifest.code.min.css lib",
18
18
  "build": "cd src && node scripts/build.mjs",
19
19
  "build:docs": "echo 'Docs is a static website - no build needed'",
20
- "start:src": "cd src && browser-sync start --config bs-config.js",
21
- "start:docs": "cd docs && browser-sync start --config bs-config.js",
22
- "start:starter": "cd templates/starter && browser-sync start --config bs-config.js --port 3001",
23
- "start:dist": "cd src && browser-sync start --config dist-bs-config.js --port 5003",
20
+ "start:src": "node packages/run/serve.mjs src",
21
+ "start:docs": "node packages/run/serve.mjs docs",
22
+ "start:starter": "node packages/run/serve.mjs templates/starter --port 3001",
23
+ "start:dist": "node packages/run/serve.mjs src/test-prerender --port 5003",
24
24
  "prerender": "node src/scripts/manifest.render.mjs --root src",
25
25
  "prerender:docs": "node src/scripts/manifest.render.mjs --root docs",
26
26
  "prerender:starter": "node src/scripts/manifest.render.mjs --root templates/starter",
27
27
  "render": "node src/scripts/manifest.render.mjs --root src",
28
28
  "publish:starter": "cd packages/create-starter && npm publish --auth-type=web",
29
+ "publish:run": "cd packages/run && npm publish --auth-type=web",
29
30
  "publish:render": "cd packages/render && npm publish --auth-type=web",
30
31
  "prepublishOnly": "npm run build",
31
32
  "test": "vitest run",
@@ -35,7 +36,6 @@
35
36
  "@rollup/plugin-commonjs": "^28.0.1",
36
37
  "@rollup/plugin-node-resolve": "^15.3.0",
37
38
  "@rollup/plugin-terser": "^0.4.4",
38
- "browser-sync": "^3.0.3",
39
39
  "cssnano": "^7.1.1",
40
40
  "glob": "^11.0.2",
41
41
  "puppeteer": "^24.15.0",