mnfst 0.5.231 → 0.5.232

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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  (function () {
4
4
 
5
- const MANIFEST_BUILD_VERSION = '0.5.231';
5
+ const MANIFEST_BUILD_VERSION = '0.5.232';
6
6
 
7
7
  /* Manifest Data Sources - Appwrite Integration */
8
8
 
@@ -167,6 +167,10 @@ window.ManifestComponentsLoader = {
167
167
  console.warn('[Manifest] Component', name, 'at', path, 'returned a full HTML document (SPA fallback?) — treated as missing');
168
168
  return null;
169
169
  }
170
+ // On-use plugins the component references load before it is inserted
171
+ if (window.Manifest && typeof window.Manifest.loadUsed === 'function') {
172
+ try { await window.Manifest.loadUsed(content); } catch (_) { /* never blocks the component */ }
173
+ }
170
174
  this.cache[name] = content;
171
175
  if (convention) registry.registered.add(name);
172
176
  return content;
@@ -378,6 +382,7 @@ window.ManifestComponentsProcessor = {
378
382
  };
379
383
  topLevelElements.forEach(processElementProps);
380
384
  // Apply attributes from placeholder to root elements
385
+ const host = { roots: topLevelElements };
381
386
  topLevelElements.forEach(rootElement => {
382
387
  Array.from(element.attributes).forEach(attr => {
383
388
  if (attr.name === 'class') {
@@ -394,6 +399,9 @@ window.ManifestComponentsProcessor = {
394
399
  rootElement.setAttribute(attr.name, attr.value);
395
400
  }
396
401
  });
402
+ // The file this markup came from (Edit writes regions authored in it back there)
403
+ rootElement._manifestComponent = name;
404
+ rootElement._manifestHost = host;
397
405
  // Set data-component=instanceId if provided
398
406
  if (instanceId) {
399
407
  rootElement.setAttribute('data-component', instanceId);