Mercurial
diff mrjunejune/src/public/composer-lab.html @ 273:e02e2036ef84 default tip
add Layer 2 JRPG component system
Add reusable content and window modals, an isolated component sandbox, shared cyberpunk scroll areas, production-safe cache freshness, and server-rendered JRPG panel state.
Co-authored-by: Copilot <[email protected]>
| author | MrJuneJune <me@mrjunejune.com> |
|---|---|
| date | Sat, 08 Aug 2026 02:08:08 -0700 |
| parents | 41a49c29a28f |
| children |
line wrap: on
line diff
--- a/mrjunejune/src/public/composer-lab.html Fri Aug 07 16:05:29 2026 -0700 +++ b/mrjunejune/src/public/composer-lab.html Sat Aug 08 02:08:08 2026 -0700 @@ -7,9 +7,21 @@ <link rel="stylesheet" href="/public/design-system/styles/tokens.css"> <link rel="stylesheet" href="/public/design-system/styles/themes.css"> <link rel="stylesheet" href="/public/design-system/styles/components.css"> - <link rel="stylesheet" href="/public/mjj-composer.css"> <script type="module" src="/public/design-system/components/index.js"></script> - <script type="module" src="/public/mjj-composer.js"></script> + <script type="module"> + const version = Date.now(); + const link = document.createElement("link"); + link.rel = "stylesheet"; + link.href = `/public/mjj-composer.css?sandbox=${version}`; + await new Promise((resolve, reject) => { + link.addEventListener("load", resolve, { once: true }); + link.addEventListener("error", reject, { once: true }); + document.head.append(link); + }); + await import(`/public/mjj-composer.js?sandbox=${version}`); + void navigator.serviceWorker?.getRegistration() + .then(registration => registration?.update()); + </script> <style> body { box-sizing: border-box;