pageturn 0.0.0-stage → 0.1.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/CHANGELOG.md +44 -0
- package/LICENSE +21 -0
- package/README.md +766 -2
- package/dist/Head.astro +13 -0
- package/dist/astro.js +115 -0
- package/dist/chunks/chunk-237GNQNZ.js +37 -0
- package/dist/chunks/chunk-7LMNJ25V.js +244 -0
- package/dist/chunks/chunk-QC36TQP3.js +24 -0
- package/dist/chunks/chunk-QJ7GGFM4.js +24 -0
- package/dist/chunks/chunk-WTHN3UIQ.js +1000 -0
- package/dist/chunks/chunk-YBAP3PHO.js +247 -0
- package/dist/core.js +18 -0
- package/dist/head-core.js +1 -0
- package/dist/head-morph-route.js +10 -0
- package/dist/head-route.js +10 -0
- package/dist/head-string.d.ts +11 -0
- package/dist/head-string.js +6 -0
- package/dist/head.js +1 -0
- package/dist/index.js +20 -0
- package/dist/middleware-external.js +10 -0
- package/dist/middleware-inline.js +7 -0
- package/dist/middleware.js +29 -0
- package/dist/morph-head.js +1 -0
- package/dist/morph-markup.js +32 -0
- package/dist/morph.js +599 -0
- package/dist/native.js +2 -0
- package/dist/no-native.css +1 -0
- package/dist/pageturn-morph.js +1 -0
- package/dist/pageturn.css +1 -0
- package/dist/pageturn.js +1 -0
- package/dist/prefetch.js +2 -0
- package/dist/router.js +187 -0
- package/dist/testing.js +58 -0
- package/dist/types/astro/integration.d.ts +27 -0
- package/dist/types/common/page.d.ts +19 -0
- package/dist/types/common/registry.d.ts +33 -0
- package/dist/types/common/session.d.ts +8 -0
- package/dist/types/common/types.d.ts +214 -0
- package/dist/types/default-move/native.d.ts +10 -0
- package/dist/types/head/storage.d.ts +62 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/kernel/arrival.d.ts +9 -0
- package/dist/types/kernel/cap.d.ts +12 -0
- package/dist/types/kernel/core.d.ts +39 -0
- package/dist/types/kernel/kernel.d.ts +11 -0
- package/dist/types/kernel/leaving.d.ts +7 -0
- package/dist/types/kernel/turn.d.ts +10 -0
- package/dist/types/morph/back.d.ts +8 -0
- package/dist/types/morph/behind.d.ts +13 -0
- package/dist/types/morph/copy.d.ts +7 -0
- package/dist/types/morph/define.d.ts +22 -0
- package/dist/types/morph/end.d.ts +30 -0
- package/dist/types/morph/finders.d.ts +9 -0
- package/dist/types/morph/frame.d.ts +13 -0
- package/dist/types/morph/index.d.ts +18 -0
- package/dist/types/morph/layer.d.ts +26 -0
- package/dist/types/morph/link-back.d.ts +8 -0
- package/dist/types/morph/markup.d.ts +1 -0
- package/dist/types/morph/peek.d.ts +11 -0
- package/dist/types/morph/picture.d.ts +9 -0
- package/dist/types/morph/place.d.ts +112 -0
- package/dist/types/morph/shadow.d.ts +10 -0
- package/dist/types/morph/text.d.ts +45 -0
- package/dist/types/morph/timing.d.ts +4 -0
- package/dist/types/morph/turned.d.ts +8 -0
- package/dist/types/morph/types.d.ts +216 -0
- package/dist/types/morph/way.d.ts +114 -0
- package/dist/types/prefetch/prefetch.d.ts +1 -0
- package/dist/types/router/router.d.ts +40 -0
- package/dist/types/testing/testing.d.ts +37 -0
- package/package.json +123 -4
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# pageturn
|
|
2
|
+
|
|
3
|
+
## 0.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- d71215f: A fuller package description and keywords, so pageturn is found on npm.
|
|
8
|
+
|
|
9
|
+
## 0.1.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- c494ce8: First release.
|
|
14
|
+
|
|
15
|
+
- **The default move.** Every same-origin link plays a short leave and arrival on
|
|
16
|
+
`<main>`. Where the browser has cross-document view transitions it plays them
|
|
17
|
+
natively; elsewhere (Firefox) the package plays the same move. `pageturn.css`, or
|
|
18
|
+
`no-native.css` to play the package's everywhere.
|
|
19
|
+
- **Named moves in CSS.** `data-turn="name"` on a link; `data-turn-leaving` and
|
|
20
|
+
`data-turn-arriving` on `<html>` for your rules. `data-turn="none"` opts out.
|
|
21
|
+
- **Moves in code.** `defineMove(name, { match, leave, arrive, stay })`: run code before
|
|
22
|
+
the page goes, hand data to the next page (`arrival()`, `--turn-<key>`,
|
|
23
|
+
`data-turn-with`), play a return on Back (`returnAs`, `remember`, `whenLeft`).
|
|
24
|
+
- **Arrivals that end by themselves**, once their animations have; `data-turn-entering`
|
|
25
|
+
for a page shown anew; `pageturn:leaving`, `pageturn:stayed`, `pageturn:arrived`.
|
|
26
|
+
- **`pageturn/morph`.** One element travels to its place on the next page, and back on
|
|
27
|
+
Back or a link back. From the markup with `data-turn-morph`, or in code with
|
|
28
|
+
`defineMorph` and its parts: `seen`, `here`, `peek`, `copy`, `text`, `turned`,
|
|
29
|
+
`shadow`, `back`, `linkBack`, `behind`.
|
|
30
|
+
- **Astro integration** (`pageturn/astro`), **classic scripts** for sites without a
|
|
31
|
+
bundler (`pageturn.js`, `pageturn-morph.js`), a strict Content-Security-Policy
|
|
32
|
+
(`pageturn/head` and its hashes), and `pageturn/testing` for Playwright.
|
|
33
|
+
- c494ce8: `pageturn/router`: the engine that plays pageturn's moves on a client router's
|
|
34
|
+
navigations, for the adapters to drive (`startNavigation`, then `left`, `swapped` or
|
|
35
|
+
`cancelled`). `Visit` gains `via`, and `Stay.reason` can be `"cancelled"` or
|
|
36
|
+
`"superseded"`.
|
|
37
|
+
|
|
38
|
+
### Patch Changes
|
|
39
|
+
|
|
40
|
+
- c9ce823: pageturn/morph reads each corner as it is seen: a parent that clips the picture (a card
|
|
41
|
+
with `overflow: hidden` and round corners) rounds the layer's corners too, so the travel
|
|
42
|
+
no longer starts square and ends with the corners popping in. An end's `radius` may now
|
|
43
|
+
be four corners, from the top-left clockwise; a site's `ends` that does arithmetic on
|
|
44
|
+
it should read it through `typeof radius === "number"`.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Théo Benoit
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|