@kehto/paja 0.21.0 → 0.21.1

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
@@ -467,6 +467,16 @@ for current events; legacy identities keep their original aggregate. Both paths
467
467
  verify signatures and bytes before runtime injection and `srcdoc` execution.
468
468
  For the schema and removal boundary, see [event migration](https://kehto.github.io/web/docs/migrations/NIP-5D-EVENT-SCHEMA.html).
469
469
 
470
+
471
+ Paja loads napplets that declare unknown or unavailable domains. Optional `O`
472
+ integrations load quietly so the napplet can gracefully degrade. For unavailable
473
+ required `R` domains (or legacy `requires` declarations), Paja logs a warning per
474
+ frame navigation that full functionality may be unavailable, then continues.
475
+ Declarations never grant capabilities: unsupported or disabled domain objects
476
+ remain absent from `window.napplet`. Check namespace presence before using an
477
+ experimental integration. Paja does not implement an experimental protocol merely
478
+ because a manifest names it.
479
+
470
480
  ## NAP-INTENT links and lifecycle
471
481
 
472
482
  This follows [NAP-INTENT PR #106](https://github.com/napplet/naps/blob/fc121fc264615482143eda86125863d2e1f741a2/naps/NAP-INTENT.md) at `fc121fc264615482143eda86125863d2e1f741a2` and NIP-5D PR #2303 at `020cb8b33a9e4c6b8ca4b2f9d0ed0a67843b68f7`.
@@ -21848,13 +21848,13 @@ async function navigateFrame(frame, config, generation, adapter, resolvedTarget,
21848
21848
  frame.srcdoc = "<!doctype html><html><body></body></html>";
21849
21849
  return null;
21850
21850
  }
21851
+ if (isCurrent && !isCurrent()) return null;
21851
21852
  if (!isPajaLocalTarget(resolvedTarget)) {
21852
21853
  const missing = resolvedTarget.manifest.requires.filter((domain) => domain !== "shell" && !domains.includes(domain));
21853
21854
  if (missing.length > 0) {
21854
- throw new Error(`Napplet requires unsupported NAP capabilities: ${missing.join(", ")}`);
21855
+ console.warn(`[paja] Napplet requires unsupported NAP capabilities: ${missing.join(", ")}; full functionality may be unavailable.`);
21855
21856
  }
21856
21857
  }
21857
- if (isCurrent && !isCurrent()) return null;
21858
21858
  const srcdoc = prepareNappletSrcdoc(resolvedTarget.indexHtml, {
21859
21859
  domains,
21860
21860
  csp: {