Three fixes for the power-app SPA running as a go-base plugin (sandboxed iframe, origin 'null' — where localStorage throws and root-absolute asset paths misresolve under the /plugin-assets/<name>/ subpath): - localStorage: wrap every theme/preference read+write in try/catch across the library (ProfileLoader, useMapTheme, uiStore). `typeof localStorage` is not enough — in a sandbox the object exists but ACCESS throws SecurityError. Sandboxed maps now boot themeless instead of crashing. - assets: the SPA shell now injects an absolute assetsBase (derived from its own document.baseURI) into every mounted element's profile-config, so bundles fetch tables/vendor (Tabulator) from the correct subpath instead of a root-absolute /assets that 404s under /plugin-assets/doxa-maps-spa/. - nav: revert the Prayer Mobilization section icon to 'heart' (the prayer glyph read as a header it is not). Rebuilds every bundle (library-wide localStorage change). |
||
|---|---|---|
| .. | ||
| app-wrapper-material | ||
| pane-wrapper | ||
| README.md | ||
layouts/ — app wrappers
Each folder here is an app wrapper: a host shell that composes doxa-maps app-profiles (the independently-built custom elements) into one application.
layouts/<wrapper>/ ← the HOST page (not a bundle)
┌──────────┬──────────────────────────────┐
│ sidebar │ mounts an app-profile here │
│ (nav.js) │ ┌──────────────┐ │
│ ├ item │ │ <doxa-map> │ ← a │
│ ├ section│ │ (a bundle) │ micro- │
│ └ folder │ └──────────────┘ frontend │
└──────────┴──────────────────────────────┘
- app-profile = a self-contained custom element (the micro-frontend). app wrapper = the host that mounts them and provides nav/chrome. A wrapper is a host page, not a bundle-in-a-bundle.
- Wrappers today:
app-wrapper-material/,pane-wrapper/. - Icons are inline SVG only (no CDN) — an F-Droid/offline hard requirement.
Sidebar contract, target filtering, sidebar modes, staging: ../docs/architecture/app-wrappers.md.