@hazem3500/palette 0.9.114 → 0.9.115

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
@@ -473,9 +473,9 @@ if (import.meta.env.DEV && isShell(palette.project)) {
473
473
 
474
474
  - **Free in production.** `@hazem3500/palette/shell` is side-effect free and reads nothing until `isShell()` is called, so a build-time guard such as `import.meta.env.DEV && isShell(…)` drops it, and the shell branch, from production builds. Palette's package checks verify this on a minified build.
475
475
  - **Only Palette makes a shell.** `isShell(project)` is true only when Palette set a random nonce in this tab's sessionStorage and the URL carries the same one, for the same project and origin. A link with `?komo-shell=…` alone, or a flag left by another project, returns false, so a crafted link can't blank your app. If Palette doesn't start within 4 seconds (`isShell(project, { timeout })`), the shell clears itself and loads the normal page.
476
- - **Reloads.** Turning it on asks first, because the reload drops unsaved state in the app and Design previews you haven't posted. Your app's own `beforeunload` guard can also refuse the reload. Cancel or a refused reload keeps the second copy instead. A remembered Frame reopens in the shell on load without asking. Turning it off, Floating, closing Frame or a frame that can't load all reload the normal page on the frame's route.
476
+ - **Reloads.** Turning it on asks first, because the reload drops unsaved state in the app and Design previews you haven't posted. Your app's own `beforeunload` guard can also refuse the reload. Cancel or a refused reload keeps the current app without starting another copy. Storage, startup and frame-load failures also keep the normal page, show the failure, and require an explicit retry of **Simulate real viewport**. A remembered Frame reopens in the shell on load without asking. Turning it off, Floating, closing Frame or a frame that can't load all reload the normal page on the frame's route.
477
477
  - **URL.** The shell's URL follows the frame's route, so reloading or sharing it stays on the same page. The frame's own URL never carries the nonce.
478
- - **Two copies again.** If a shell ends early (Palette didn't start, or the frame couldn't load), the tab keeps the two-copy simulated viewport until the reviewer turns it on again. Server-rendered markup the guard can't skip still paints in the shell.
478
+ - **Single-copy boundary.** `shell: true` never falls back to loading a second app. The early `isShell()` guard must run before mounting; server-rendered markup the guard cannot skip still paints in the shell. Reloads do not transfer in-memory auth or app state: the host must restore that state in the framed document.
479
479
 
480
480
  `frame: { scale: true }` explicitly opts into shrinking the original viewport instead. A CSS transform changes visual rectangles without changing local layout dimensions, so arbitrary coordinate-sensitive host handlers may select the wrong value under scaling. This option requires host controls that already account for transforms; Palette does not rewrite native events or browser prototypes. Use the default unscaled Frame or Floating for interactive pages that do not support scaling.
481
481