polite-media 0.3.0 → 0.3.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 +5 -0
- package/README.md +12 -13
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
Notable changes, newest first. Versions follow [semver](https://semver.org); while
|
|
4
4
|
this is `0.x`, a minor bump may still break things and will say so here.
|
|
5
5
|
|
|
6
|
+
## 0.3.1 (2026-09-02)
|
|
7
|
+
|
|
8
|
+
Documentation only. `src/` is identical to 0.3.0; this republishes so the npm
|
|
9
|
+
page carries the rewritten README.
|
|
10
|
+
|
|
6
11
|
## 0.3.0 (2026-09-02)
|
|
7
12
|
|
|
8
13
|
### Changed
|
package/README.md
CHANGED
|
@@ -2,19 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Background video, image reveals and next-page image warming. No dependencies, no framework.
|
|
4
4
|
|
|
5
|
-
Three independent entry points, imported separately, because they share almost
|
|
6
|
-
nothing. Bundled, minified and gzipped, which is what `pnpm size` enforces:
|
|
7
|
-
|
|
8
|
-
| | JavaScript | stylesheet | total |
|
|
9
|
-
| -------------------- | ---------- | ---------- | ---------- |
|
|
10
|
-
| `polite-media/video` | 3,926 B | 194 B | **4.1 KB** |
|
|
11
|
-
| `polite-media/image` | 630 B | 202 B | **830 B** |
|
|
12
|
-
| `polite-media/warm` | 615 B | none | **615 B** |
|
|
13
|
-
|
|
14
|
-
`polite-media/layer.css` is a third, optional stylesheet: **137 B** for the
|
|
15
|
-
standard poster-over-video stack. An image-only page never pays for the video
|
|
16
|
-
coordinator.
|
|
17
|
-
|
|
18
5
|
It doesn't flash, doesn't hog the decoder, doesn't eat data on a metered
|
|
19
6
|
connection, doesn't ignore reduced motion, and doesn't autoplay without giving
|
|
20
7
|
anyone a way to stop it.
|
|
@@ -60,6 +47,18 @@ import 'polite-media/image.css';
|
|
|
60
47
|
revealImages('.card img');
|
|
61
48
|
```
|
|
62
49
|
|
|
50
|
+
## What it costs
|
|
51
|
+
|
|
52
|
+
Three independent entry points, imported separately, because they share almost
|
|
53
|
+
nothing. Gzipped and including its stylesheet, `polite-media/video` is around
|
|
54
|
+
4 KB, and `polite-media/image` and `polite-media/warm` are under 1 KB each.
|
|
55
|
+
`polite-media/layer.css` is a third, optional stylesheet for the standard
|
|
56
|
+
poster-over-video stack.
|
|
57
|
+
|
|
58
|
+
An image-only page never pays for the video coordinator, and nothing here has a
|
|
59
|
+
runtime dependency. Each entry point is held to a budget by `pnpm size`, which
|
|
60
|
+
prints the exact figures.
|
|
61
|
+
|
|
63
62
|
## Recipes
|
|
64
63
|
|
|
65
64
|
Each is a demo page in this repo that the end-to-end suite drives, so the markup
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "polite-media",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Background video, image reveals and next-page image warming. Reveals on the frame that actually painted, plays only what is on screen, respects data and motion.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"video",
|