maverick-wave 5.10.0 → 5.11.0
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/.claude/skills/mw-maverick-wave/SKILL.md +6 -4
- package/.claude/skills/mw-maverick-wave/examples/static-landing-page.md +2 -2
- package/.claude/skills/mw-maverick-wave/references/javascript.md +13 -13
- package/.claude/skills/mw-maverick-wave/references/layout.md +21 -6
- package/CHANGELOG.md +10 -0
- package/README.md +2 -2
- package/index.html +31 -0
- package/maverick-wave.min.css +2 -2
- package/package.json +2 -2
- package/src/js/main.js +3 -2
- package/src/partials/parallax-container.html +20 -1
- package/src/scss/components/_timelines.scss +1 -0
- package/src/scss/layout/_header-reveal.scss +5 -5
- package/src/scss/layout/_parallax.scss +55 -9
- package/src/scss/utilities/_reveal.scss +5 -5
|
@@ -44,14 +44,14 @@ Load the one you need - do not read them all up front.
|
|
|
44
44
|
```html
|
|
45
45
|
<link
|
|
46
46
|
rel="stylesheet"
|
|
47
|
-
href="https://cdn.jsdelivr.net/npm/maverick-wave@5.
|
|
47
|
+
href="https://cdn.jsdelivr.net/npm/maverick-wave@5.11.0/maverick-wave.min.css"
|
|
48
48
|
/>
|
|
49
49
|
<link
|
|
50
50
|
rel="stylesheet"
|
|
51
51
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css"
|
|
52
52
|
/>
|
|
53
53
|
...
|
|
54
|
-
<script src="https://cdn.jsdelivr.net/npm/maverick-wave@5.
|
|
54
|
+
<script src="https://cdn.jsdelivr.net/npm/maverick-wave@5.11.0/maverick-wave.min.js"></script>
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
Pin the version. The JS file is optional and only for server-rendered/static pages -
|
|
@@ -265,7 +265,7 @@ feature frame) ·
|
|
|
265
265
|
`mw-section` (+ `mw-section-intro`) · `mw-page-header` · `mw-grid-*` ·
|
|
266
266
|
`mw-columns-2/3` · `mw-row-split` · `mw-hero` (+ `mw-scroll-hint`, `-end`) ·
|
|
267
267
|
`mw-parallax` (+ `-media`, `-content`, `-dimmed`, `-sticky`, `-rise`,
|
|
268
|
-
`-pattern`) · `mw-footer`
|
|
268
|
+
`-slow`, `-pattern`) · `mw-footer`
|
|
269
269
|
|
|
270
270
|
**Utilities** (`references/layout.md`) `mw-sr-only` / `mw-sr-only-focusable` /
|
|
271
271
|
`mw-skip-link` · `mw-row-split` (+ `center`) · `mw-text-numeric` /
|
|
@@ -424,4 +424,6 @@ feature frame) ·
|
|
|
424
424
|
reaches that content as a _sibling_. Put the class on the hero itself and
|
|
425
425
|
nothing pins and nothing covers - no error, no effect, and the picture shows
|
|
426
426
|
through every transparent section below. `mw-parallax` and the
|
|
427
|
-
`mw-parallax-media` child stay where the image is: on the container.
|
|
427
|
+
`mw-parallax-media` child stay where the image is: on the container. Same
|
|
428
|
+
split for `mw-parallax-slow`, and `--mw-parallax-slow-travel` goes with the
|
|
429
|
+
class on the section - on the inner block it never reaches the animation.
|
|
@@ -20,7 +20,7 @@ accordion FAQ.
|
|
|
20
20
|
|
|
21
21
|
<link
|
|
22
22
|
rel="stylesheet"
|
|
23
|
-
href="https://cdn.jsdelivr.net/npm/maverick-wave@5.
|
|
23
|
+
href="https://cdn.jsdelivr.net/npm/maverick-wave@5.11.0/maverick-wave.min.css"
|
|
24
24
|
/>
|
|
25
25
|
<link
|
|
26
26
|
rel="stylesheet"
|
|
@@ -487,7 +487,7 @@ accordion FAQ.
|
|
|
487
487
|
<div class="mw-modal-backdrop" onclick="closeModal('demo')"></div>
|
|
488
488
|
</div>
|
|
489
489
|
|
|
490
|
-
<script src="https://cdn.jsdelivr.net/npm/maverick-wave@5.
|
|
490
|
+
<script src="https://cdn.jsdelivr.net/npm/maverick-wave@5.11.0/maverick-wave.min.js"></script>
|
|
491
491
|
<script>
|
|
492
492
|
// The only thing the shipped script does not cover: opening a modal.
|
|
493
493
|
// Closing works through .mw-modal-close, the backdrop is wired above.
|
|
@@ -47,23 +47,23 @@ classes are the entire contract.
|
|
|
47
47
|
| Color swatches | Showcase-only (prints computed hex values); exposes `window.mwRefreshColorSwatches` to read them again after a root colour changed | Not needed |
|
|
48
48
|
| Dropdown | Delegated to the document: closes the open `mw-dropdown` on Escape, on a click elsewhere and on a click on a `mw-dropdown-item`, and returns focus to the `summary` | The `<details>` does the opening, the keyboard and the state on its own. Rebuild only the two behaviours markup cannot express - or bind `[attr.open]` and keep them in the component |
|
|
49
49
|
| Language switcher | Keeps the trigger's flag and code in step with the chosen item, moves `mw-active` and `aria-current`, and fires `mw-language-change` (`detail: { lang, name }`) on the switcher | Bind the trigger from your locale signal and switch the language in your own i18n service; the menu itself is a `<details>` and needs nothing |
|
|
50
|
-
| Scroll reveal |
|
|
51
|
-
| Header reveal |
|
|
52
|
-
| Parallax |
|
|
50
|
+
| Scroll reveal | Older browsers only: an `IntersectionObserver` adds `mw-reveal-hidden` to what is still below the fold and swaps it for `mw-reveal-run` on entry, with an `animation-delay` per grid column | A directive per element - see `examples/angular-services.md` |
|
|
51
|
+
| Header reveal | Older browsers only: toggles `mw-header-away` and `mw-announcement-away` past 270px of scroll, and adds the transition class one frame later so the bar does not slide away on load | The same two classes bound to a scroll signal, behind the same guard |
|
|
52
|
+
| Parallax | Older browsers only: writes `--mw-parallax-progress` (0 to 1) on every `mw-parallax-media` from a `requestAnimationFrame` loop | The same, reading every layer's rect before writing to any of them |
|
|
53
53
|
|
|
54
54
|
## Scroll-driven animations
|
|
55
55
|
|
|
56
56
|
Four things ride the browser's own scroll timeline: `mw-reveal`,
|
|
57
|
-
`mw-header-reveal`, `mw-parallax` and the `mw-progress-fill` scrub.
|
|
58
|
-
Edge
|
|
59
|
-
|
|
60
|
-
`CSS.supports('animation-timeline', ...)` first and does nothing
|
|
61
|
-
browser has it.
|
|
62
|
-
|
|
63
|
-
Without the script
|
|
64
|
-
place, the picture holds still. The exception is `mw-header-reveal`,
|
|
65
|
-
bar then sits over the hero from the first paint - a layout
|
|
66
|
-
missing effect.
|
|
57
|
+
`mw-header-reveal`, `mw-parallax` and the `mw-progress-fill` scrub. Chrome and
|
|
58
|
+
Edge have had timelines since 115, Firefox since 158 and Safari since 26, and
|
|
59
|
+
there they need no script at all. Older versions get the shipped JS instead.
|
|
60
|
+
Each one checks `CSS.supports('animation-timeline', ...)` first and does nothing
|
|
61
|
+
where the browser has it.
|
|
62
|
+
|
|
63
|
+
Without the script an older browser loses the motion and nothing else: cards
|
|
64
|
+
stand in place, the picture holds still. The exception is `mw-header-reveal`,
|
|
65
|
+
where the bar then sits over the hero from the first paint - a layout
|
|
66
|
+
difference, not a missing effect.
|
|
67
67
|
|
|
68
68
|
## Modals and progress bars
|
|
69
69
|
|
|
@@ -323,10 +323,10 @@ is taken on a phone. The bobbing stops under `prefers-reduced-motion`.
|
|
|
323
323
|
**Parallax** - `mw-parallax` on the container plus a `mw-parallax-media` child
|
|
324
324
|
moves the picture into its own layer. The container drops its own background and
|
|
325
325
|
the layer reads `--mw-hero-background`, so the image stays configured in one
|
|
326
|
-
place.
|
|
327
|
-
`background-attachment: fixed`, which iOS ignores.
|
|
328
|
-
there the shipped JS moves the layers instead, and without it the
|
|
329
|
-
sits still (`javascript.md`).
|
|
326
|
+
place. Every mode runs on the browser's scroll timeline, and on no
|
|
327
|
+
`background-attachment: fixed`, which iOS ignores. Older Safari and Firefox have
|
|
328
|
+
no timelines; there the shipped JS moves the layers instead, and without it the
|
|
329
|
+
picture simply sits still (`javascript.md`).
|
|
330
330
|
|
|
331
331
|
```html
|
|
332
332
|
<header class="mw-header mw-header-reveal">...</header>
|
|
@@ -356,7 +356,9 @@ through the viewport, so its `view()` timeline stands still with it.
|
|
|
356
356
|
`mw-parallax-rise` puts it at `12vh` and runs the layer on the document's own
|
|
357
357
|
scroll instead - the picture lifts, the text stays put. That works out to the
|
|
358
358
|
same travel per scrolled pixel as a drifting band at `20vh`, which is measured
|
|
359
|
-
over a much longer range.
|
|
359
|
+
over a much longer range. It is a hero move only: the range is the first screen
|
|
360
|
+
of document scroll, so further down a page the picture holds still. Several
|
|
361
|
+
pinned blocks on one page are fine, each takes over from the one before.
|
|
360
362
|
|
|
361
363
|
A second `mw-parallax-media` carrying `mw-parallax-pattern` puts a pattern over
|
|
362
364
|
the picture. It travels a third of the distance the layer below it does, and
|
|
@@ -370,7 +372,20 @@ reads `$mw-hero-image`; anywhere else set `--mw-parallax-pattern-image` on it.
|
|
|
370
372
|
Outside a hero the same classes build a standalone band: `mw-parallax`
|
|
371
373
|
(`min-height: 42vh`), `mw-parallax-media` as an `<img>` or a div with a
|
|
372
374
|
background image, `mw-parallax-content` for what sits on top, and
|
|
373
|
-
`mw-parallax-dimmed` to turn the picture down and the text light.
|
|
375
|
+
`mw-parallax-dimmed` to turn the picture down and the text light. Drop the
|
|
376
|
+
`mw-container` between section and block and the picture runs full width, with
|
|
377
|
+
a `mw-container` inside `mw-parallax-content` around the text instead.
|
|
378
|
+
|
|
379
|
+
`mw-parallax-slow` is the third mode and the one for a band mid-page: the block
|
|
380
|
+
keeps its place in the flow and travels slower than the page, so picture and
|
|
381
|
+
text are still moving while the next section closes in from below. Pinning is
|
|
382
|
+
the same move with the tempo at zero. `--mw-parallax-slow-travel` (`45vh`) reads
|
|
383
|
+
against the block's own height - half the height is half speed, the full height
|
|
384
|
+
stands still, past it the block runs backwards. The dial belongs on the element
|
|
385
|
+
carrying `mw-parallax-slow`, the height on the `mw-parallax` block inside it;
|
|
386
|
+
put the dial on the inner block and it never reaches the animation. Everything
|
|
387
|
+
after it gets the same page background and layer that a pinned block gives its
|
|
388
|
+
siblings.
|
|
374
389
|
|
|
375
390
|
Without scroll timelines, or under `prefers-reduced-motion`, the picture stands
|
|
376
391
|
still and nothing else changes.
|
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,16 @@ Patch releases are only for test purposes - here I only document major and minor
|
|
|
6
6
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
7
7
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
8
8
|
|
|
9
|
+
## [5.11.0] - 2026-09-13
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
|
|
13
|
+
- showcase parallax effect
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- small fixes
|
|
18
|
+
|
|
9
19
|
## [5.10.0] - 2026-09-13
|
|
10
20
|
|
|
11
21
|
### Fixed
|
package/README.md
CHANGED
|
@@ -42,12 +42,12 @@ The result is a framework that balances utility with simplicity, offering develo
|
|
|
42
42
|
<title>My MaverickWave Project</title>
|
|
43
43
|
<link
|
|
44
44
|
rel="stylesheet"
|
|
45
|
-
href="https://cdn.jsdelivr.net/npm/maverick-wave@5.
|
|
45
|
+
href="https://cdn.jsdelivr.net/npm/maverick-wave@5.11.0/maverick-wave.min.css"
|
|
46
46
|
/>
|
|
47
47
|
</head>
|
|
48
48
|
<body>
|
|
49
49
|
<!-- Your content here -->
|
|
50
|
-
<script src="https://cdn.jsdelivr.net/npm/maverick-wave@5.
|
|
50
|
+
<script src="https://cdn.jsdelivr.net/npm/maverick-wave@5.11.0/maverick-wave.min.js"></script>
|
|
51
51
|
</body>
|
|
52
52
|
</html>
|
|
53
53
|
```
|
package/index.html
CHANGED
|
@@ -97,6 +97,21 @@
|
|
|
97
97
|
);
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
+
/* The travel has to sit on the animated section, the height on the block
|
|
101
|
+
inside it */
|
|
102
|
+
.parallax-band-demo {
|
|
103
|
+
--mw-parallax-slow-travel: 60vh;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.parallax-band-demo .mw-parallax {
|
|
107
|
+
min-height: 75vh;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/* Reuses the hero picture through the token, not a second download */
|
|
111
|
+
.parallax-band-demo .mw-parallax-media {
|
|
112
|
+
background-image: var(--mw-hero-background);
|
|
113
|
+
}
|
|
114
|
+
|
|
100
115
|
/* A calendar fills its container; across the full page that stretches the
|
|
101
116
|
cells to 150px, so the demos get a realistic column instead */
|
|
102
117
|
.calendar-demo {
|
|
@@ -701,6 +716,22 @@
|
|
|
701
716
|
</div>
|
|
702
717
|
</section>
|
|
703
718
|
|
|
719
|
+
<!-- Parallax band -->
|
|
720
|
+
<section class="mw-parallax-slow parallax-band-demo">
|
|
721
|
+
<div class="mw-parallax mw-parallax-dimmed">
|
|
722
|
+
<div class="mw-parallax-media"></div>
|
|
723
|
+
<div class="mw-parallax-content mw-text-center">
|
|
724
|
+
<div class="mw-container">
|
|
725
|
+
<h2>The page rides over the picture</h2>
|
|
726
|
+
<p class="mw-mb-0">
|
|
727
|
+
This band travels at a quarter of your scrolling. The components
|
|
728
|
+
close in from below.
|
|
729
|
+
</p>
|
|
730
|
+
</div>
|
|
731
|
+
</div>
|
|
732
|
+
</div>
|
|
733
|
+
</section>
|
|
734
|
+
|
|
704
735
|
<!-- Components section -->
|
|
705
736
|
<section id="components" class="mw-section">
|
|
706
737
|
<div class="mw-container">
|