akanjs 3.3.0-rc.46 → 3.3.0-rc.47

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/CHANGELOG.md CHANGED
@@ -600,6 +600,14 @@
600
600
 
601
601
  Nothing to do. A workspace on an older `akanjs` without the `akanjs/client` entry builds as it did.
602
602
 
603
+ - 9a3e6b0: In a native app (the CSR runtime), a push that changes only the query stays on its page, and a closing `Dialog.Modal` can play a leave animation.
604
+
605
+ `router.push` or a `Link` to the page already on screen, with only a different query or hash, used to add a copy of that page to the CSR stack: a record opened over a list with `?id=`, a calendar stepped to the next week, a filter changed. Back then showed the same screen again, once per push. Such a push now rewrites the entry it is on, as `router.replace` does, so one back leaves the page. A push to another path stacks as before, and a web page served by the server is unchanged.
606
+
607
+ What changes for an app: a screen that opens something with a query push and closes it with `router.back()` now leaves the page when it closes, because the push stacked nothing; `{ shallow: true }` makes no difference. Open and close it with `router.replace`, or give it a route of its own.
608
+
609
+ `Dialog.Modal` unmounted the moment it closed. It now marks its panel and backdrop `data-leaving` and stays drawn while an animation plays on the panel, so `data-leaving:animate-…` on the modal's `className` is its leave animation. It waits 600 ms at most, the backdrop fades and takes no taps meanwhile, and a sheet dragged shut leaves from where the finger let go. A modal with no such animation unmounts at once, as before.
610
+
603
611
  - bf582c1: A page stored in the HTML cache is kept as the bytes it streamed, instead of being decoded to text and encoded again before compression. Storing a 600 KB page takes about a fifth of the main-thread time it did, and the stored page and every response from it are unchanged.
604
612
  - 8bbe7c8: Every response from `/_akan/image` carries `X-Content-Type-Options: nosniff`, `Referrer-Policy` and a sandboxing `Content-Security-Policy` (`script-src 'none'; frame-src 'none'; sandbox;`), and an image response carries `Content-Disposition: attachment` named after its source file. An SVG an app allows with `dangerouslyAllowSVG` still shows in an `<img>`, and runs no script when its URL is opened on its own.
605
613
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "akanjs",
3
- "version": "3.3.0-rc.46",
3
+ "version": "3.3.0-rc.47",
4
4
  "sourceType": "module",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -128,8 +128,8 @@ export const Modal = ({
128
128
  }, [registerDismiss]);
129
129
 
130
130
  useEffect(() => {
131
- if (!drawn) setDragY(0);
132
- }, [drawn]);
131
+ if (!leaving) setDragY(0);
132
+ }, [leaving]);
133
133
 
134
134
  if (!drawn || !portalElement) return null;
135
135