@zazz-ui/core 0.5.2 → 0.5.4
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/AUTHORING.md +2 -2
- package/CHANGELOG.md +18 -0
- package/README.md +2 -2
- package/dist/sri.json +10 -10
- package/dist/zazz.css +1 -1
- package/editor/zazz.css-data.json +4 -0
- package/package.json +1 -1
- package/src/base/_properties.css +3 -0
- package/src/base/_reset.css +2 -33
- package/src/base/_typography.css +3 -3
- package/src/base/_utilities-box.css +8 -0
- package/src/base/_utilities-tier-stuck.css +1 -1
- package/src/base/_view-transitions.css +7 -9
- package/src/base/navigation.d.ts.map +1 -1
- package/src/base/navigation.js +4 -3
- package/src/base/navigation.ts +4 -3
- package/src/base/utilities.d.ts.map +1 -1
- package/src/base/utilities.js +1 -0
- package/src/base/utilities.ts +1 -0
- package/src/primitives/lightbox/lightbox.css +1 -1
package/AUTHORING.md
CHANGED
|
@@ -101,7 +101,7 @@ Rules that bite:
|
|
|
101
101
|
2. **Breakpoints reach layout and color; states reach color and effects.** `--bg--md`, `--text--lg`, and `--px--md` exist; `--px--hover` and `--shadow--md` do not. On a color utility a state beats a breakpoint: `--bg--md: black; --bg--hover: gray` is gray on hover at any width.
|
|
102
102
|
3. **Keywords mix with numbers.** `--w: 4; --w--md: auto`, `--w: fit-content; --h: 4`, and `--grid-cols: 2; --grid-cols--md: subgrid` all work: each keyword-bearing utility has explicit keyword rules per tier until CSS `if()` can branch on the value. Keywords must be spelled exactly (`--w--md: auto`).
|
|
103
103
|
4. **A utility on a primitive flattens its states.** `--bg: red` on a button is red on hover too. To keep hover, add the tier (`--bg--hover: darkred`) or set the hook instead (below).
|
|
104
|
-
5. **Breakpoints read the nearest container, not the window.** A tier answers to the closest inline-size container: the page's `html`,
|
|
104
|
+
5. **Breakpoints read the nearest container, not the window.** A tier answers to the closest inline-size container: the page's `html`, a layout band's child (so tiers inside a `layout-md` band follow the band), or any `data-ui="container"`. Thresholds are character counts: `sm` 40ch, `md` 65ch, `lg` 90ch, `xl` 120ch, `2xl` 150ch. Mark a card, sidebar, or slot `data-ui="container"` and the tiers inside it follow its width. An element never queries itself: a container's own tiers read the container above it. A container cannot size itself from its content, so give it a definite or stretched width.
|
|
105
105
|
|
|
106
106
|
## Theming primitives: hooks
|
|
107
107
|
|
|
@@ -123,7 +123,7 @@ Order of preference for changing how a primitive looks: preset, then hook on a s
|
|
|
123
123
|
|
|
124
124
|
## Navigation
|
|
125
125
|
|
|
126
|
-
Pages navigate normally by default
|
|
126
|
+
Pages navigate normally by default, with no transition. To animate full loads, add `@view-transition { navigation: auto; }` to the site's own CSS; `_view-transitions.css` styles it. To keep state across pages (a toast stack, a playing video, an open mini-cart), opt in with `<html data-ui-navigation="swap">` on every page that should swap. A navigation between two opted-in pages replaces the whole `<body>` in place, except elements marked `data-ui-persist="<id>"` that both pages contain: those keep their live DOM, state, and scroll offsets, and their links take `aria-current` from the new page. Nothing else persists, so headers and footers come from the new page unless marked. The window scrolls to the top (or the target) instantly; back and forward restore it.
|
|
127
127
|
|
|
128
128
|
A region whose content depends on the page, such as a section sidebar, should not persist: give it `data-ui-persist-scroll="<id>"` instead. It renders from the new page and keeps only its scroll offset. Style current-page links with the `current` state (`aria-current`), so a persisted header updates too: `aria-current="page"` with `--bg: transparent; --bg--current: var(--color-muted)` on the link.
|
|
129
129
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
Notable changes to `@zazz-ui/core`, grouped by primitive or base scope under each version. The grouping is load-bearing: the `zazz-ui` CLI's `update` and `diff` print only the slice that touches the files you've vendored. Breaking entries are flagged **BREAKING** with a one-line migration note. During 0.x, a minor bump means at least one breaking entry (ADR-0010 has the full definition of "breaking").
|
|
2
2
|
|
|
3
|
+
## 0.5.4 (2026-10-08)
|
|
4
|
+
|
|
5
|
+
### base
|
|
6
|
+
|
|
7
|
+
- Cross-document view transitions are opt-in. The kit no longer declares `@view-transition { navigation: auto }`, which animated every same-origin navigation on any page that loaded it and couldn't be turned off for some pages. It ships in a patch because nothing breaks without it: pages that relied on it load without the crossfade. To keep page-load transitions, add `@view-transition { navigation: auto; }` to your own CSS; the kit's `::view-transition-*` styling still applies. Swap navigation (`data-ui-navigation="swap"`) is unchanged.
|
|
8
|
+
- `h4`, `h5`, `h6` and the `text-h4`, `text-h5`, `text-h6` roles default to `text-wrap: pretty` instead of `balance`; display and `h1`–`h3` stay balanced. `--text-wrap-heading` still sets every heading at once.
|
|
9
|
+
|
|
10
|
+
## 0.5.3 (2026-10-08)
|
|
11
|
+
|
|
12
|
+
### base
|
|
13
|
+
|
|
14
|
+
- **BREAKING** `body`, `main`, `header`, `footer`, `section`, and `article` are no longer inline-size query containers, and their container names (`body`, `main`, `section`, …) are gone; `html` is the only page-level container. Breakpoint tiers inside a narrow `section` that sits outside a layout now follow the page: add `data-ui="container"` to that section to keep them on its width. A named query such as `@container section (…)` matches nothing now; drop the name. A sticky sectioning element is no longer an inline-size container either: the stuck state makes it a scroll-state container only.
|
|
15
|
+
- New `--object-position` utility (box family, no tiers): any `object-position` value, such as `--object-position: top` or `--object-position: 25% 75%`. Pair it with `--object-fit: cover` to choose which part of an image stays in frame.
|
|
16
|
+
|
|
17
|
+
### lightbox
|
|
18
|
+
|
|
19
|
+
- The thumb strip drops to four columns in the nearest container 40rem or narrower, not only inside a `section`. A lightbox in a narrow `section` outside a layout now follows the page, so mark that section `data-ui="container"` to keep four columns there.
|
|
20
|
+
|
|
3
21
|
## 0.5.2 (2026-10-08)
|
|
4
22
|
|
|
5
23
|
### base
|
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ import "@zazz-ui/core"; // custom elements and shared behaviors
|
|
|
20
20
|
From a CDN, the script needs an import map for its dependencies and the Interest Invokers polyfill:
|
|
21
21
|
|
|
22
22
|
```html
|
|
23
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@zazz-ui/core@0.5.
|
|
23
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@zazz-ui/core@0.5.4/dist/zazz.css" />
|
|
24
24
|
<script type="importmap">
|
|
25
25
|
{
|
|
26
26
|
"imports": {
|
|
@@ -36,7 +36,7 @@ From a CDN, the script needs an import map for its dependencies and the Interest
|
|
|
36
36
|
type="module"
|
|
37
37
|
src="https://cdn.jsdelivr.net/npm/invokers@2.2.2/dist/esm/production/interest.js"
|
|
38
38
|
></script>
|
|
39
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@zazz-ui/core@0.5.
|
|
39
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/@zazz-ui/core@0.5.4/dist/zazz.js"></script>
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
Use an exact version in CDN URLs. The [installation guide](https://zazz.sh/docs/install/installation/) has the complete `<head>`, with fonts, the theme script, a per-primitive variant, and integrity hashes on every URL; `buildHead({ cdn: { version } })` from `@zazz-ui/core/head` returns the same markup. Each release also includes `dist/sri.json` with the SHA-384 hash of every published file.
|
package/dist/sri.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dist/scroll-state-C8mA5gq6.js": "sha384-m9uzgIAkSnk8Es+jgCbChIYFu4rPyr00IB7lrAR/8dcsPc3u75VA7Wq5LIEAvXpT",
|
|
3
|
-
"dist/zazz.css": "sha384-
|
|
3
|
+
"dist/zazz.css": "sha384-lPqQXCZPRGyt07w/czZXFPkrUmWaiDdtVfzNl4APkDfmz/28mANp5YKxMl2A6Egk",
|
|
4
4
|
"dist/zazz.js": "sha384-OpW5MvOX7FJBiG064atEDfRFSCnOY1SmrGAsaNo8430/SbGIJD2h8nGsmZwWDopL",
|
|
5
5
|
"src/base/_breakpoints.css": "sha384-vsvdoL+ZjTa5gyCiMp4DlNIbr9rxkLqfQjZ+W3YTp2Apuuu+1/Dd68ACtcBOip3v",
|
|
6
6
|
"src/base/_layers.css": "sha384-5DNbucvN9usFbR5WoM9jF0TkR+sHzIxz3IMOWIWIRSe46yec/ZNTk3OE/OKSdLJZ",
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
"src/base/_properties-starting.css": "sha384-4wQxw0R1KwmePtesc2CzUhxSf8O8vesIN5ZgJibheWIsjCiiQN785/89xSU1/v8B",
|
|
20
20
|
"src/base/_properties-stuck.css": "sha384-kILCZ8EqvYuHxAtGFdctXMM7K1In+eebT31U2lRS8Lv1YLAQ+ewpcVbPJ2djEWC7",
|
|
21
21
|
"src/base/_properties-xl.css": "sha384-1YUaLY4RD8EtS9iFWyfWiazGSk2rK/CkI93Lha1DSFyQeTpYDV6eXhcA9y3UWUiz",
|
|
22
|
-
"src/base/_properties.css": "sha384-
|
|
23
|
-
"src/base/_reset.css": "sha384-
|
|
22
|
+
"src/base/_properties.css": "sha384-dL0BooDwguPboeooBn48djkhQqcmZUqTyCJ/gpqfdGOnha/sc3Dd0kYIauCbC82H",
|
|
23
|
+
"src/base/_reset.css": "sha384-DLNIT+B0U6Ef0gVExm2NlxIsopEnMiE6YBLTqUHYb3D4XdOiblzVXRLL+EtcacAp",
|
|
24
24
|
"src/base/_switches.css": "sha384-AEvv3WNMKlSSZRYwstCBcxQ3UbRm0avgUtoHQZJYXIYnXXErsEyMkMRti+6Fk+c4",
|
|
25
|
-
"src/base/_typography.css": "sha384-
|
|
26
|
-
"src/base/_utilities-box.css": "sha384-
|
|
25
|
+
"src/base/_typography.css": "sha384-S9Rgf5LYQQI89fmhwz4lrMqV8BfvxnI1ucFchmbcxnyMoX3r6gZW13UG3tW0GnMf",
|
|
26
|
+
"src/base/_utilities-box.css": "sha384-eodP3OPkvsLqO1k73C2cw8twdBTvQ9CeniCKaLHx8fsd7aichCo7q6MMjUEk31lV",
|
|
27
27
|
"src/base/_utilities-color.css": "sha384-tnZ/BEb5Mu3Xo3HhuwqfYrb4bRTgVUUPRF+R1agdefJuGPdfbkNgwu7jp/8XmLYs",
|
|
28
28
|
"src/base/_utilities-effects.css": "sha384-x9BgrQCQAr6ocy6tN0gefa7YgoqiEs2KxmEn7E/xzxWihXXHpRmHPHL/33iUG+CH",
|
|
29
29
|
"src/base/_utilities-flow.css": "sha384-VtEL5oTxEC07IBvdw0MkvbzY2zaxN+UNqv13c23FGD5KvlOVSyClvjlB7FrfpwnY",
|
|
@@ -45,22 +45,22 @@
|
|
|
45
45
|
"src/base/_utilities-tier-open.css": "sha384-SPYaTEApf54Gy85jIxZjqBTJssV6t+GzMBDOAidVBsqY7eGo8SOM1QRRGLNUlVCH",
|
|
46
46
|
"src/base/_utilities-tier-sm.css": "sha384-YgcpSjdYcX33n2dSNH08lux7f1eOS1p1FFl8VBApU4WYvVMNCLKU4rcE+G932L91",
|
|
47
47
|
"src/base/_utilities-tier-starting.css": "sha384-oPrlRCAYbHdaWBhhbn898sMnkim+kbvboooVlzfqeeMvMDt/WB6P9DnQ/oM/a3wh",
|
|
48
|
-
"src/base/_utilities-tier-stuck.css": "sha384-
|
|
48
|
+
"src/base/_utilities-tier-stuck.css": "sha384-Gpff1MBJR1u9kVWfd2FuFaYQwEX7u+19uyY1WWGuiyrstIdn5fTjKYhX6GZ9kffJ",
|
|
49
49
|
"src/base/_utilities-tier-xl.css": "sha384-SoNEkcENI+cPkcNjeqhyn++UP2QcHrL+GMse43V2xizprzOHGM9G9ofPeSEArkTc",
|
|
50
50
|
"src/base/_utilities-typography.css": "sha384-3mlnfs8/nCHIX2FY92VchBznlSlgsSfev85m3AelHX8t0WKKTc5zYvIL9asj7A0H",
|
|
51
51
|
"src/base/_variables.css": "sha384-39e7qP4aLpARSqNJIhKZRy4+9lz1mXB74s12ml/MVWkinn7NYyBRQjn6IJ0bQs/l",
|
|
52
|
-
"src/base/_view-transitions.css": "sha384-
|
|
52
|
+
"src/base/_view-transitions.css": "sha384-0aNEjsjVLNa3+6y7ektne0C4vgbjg4Sg1m1vY6PCB6ysRbwyqngfy/D5b+BAsYWY",
|
|
53
53
|
"src/base/command-score.js": "sha384-o8BNVjYP6YWyVnMBzMJdBanMFwhsYbp3HsBK4FSYa32A2cWTwI79hm0dBo4z+ZW0",
|
|
54
54
|
"src/base/dialog-lifecycle.js": "sha384-4x7CIGZ4ynkMyD/Z8AMjjVQ1Q8k9q+j+YdXfCg1jqr3iOdHUbGkjudNR7ESAzYa1",
|
|
55
55
|
"src/base/embla.js": "sha384-pO7q7M5Z7rf9D9snHCn9C9gFQ4cFerhAgoKRTTVmcM+bHTyT7kH+GXtACA7VKBBX",
|
|
56
56
|
"src/base/hotkeys.js": "sha384-THU0JbWwkM9QAVJ2BwF5rwGHOIhCPLKHxfhmixYyyCBU0eNRi9kz6VxfNGaj8D8O",
|
|
57
|
-
"src/base/navigation.js": "sha384-
|
|
57
|
+
"src/base/navigation.js": "sha384-jmGCKBwybsxzFCKMvpnPV8C3HnnYbQFuLTr5xUhMyw9vKKM7YcxLwtXeMd9ZHlS1",
|
|
58
58
|
"src/base/reveal.js": "sha384-RLpaipZUT7bLSK7Bfazoe2xxkwVqInKrWqCtczlpxoYxNu+l1Ei58zJnCka0vcRM",
|
|
59
59
|
"src/base/scroll-state.js": "sha384-ql6E3qGCmO5nKrmORbRCrU9bVlbIpcYvQq+zr26VZhRNHdnqNuJGH9mK0hXy1vG1",
|
|
60
60
|
"src/base/signals.js": "sha384-N4p17bKbP9wixbRP1y8qH7XQ+FGKNzyFLMd63FCDE8qz3UKRx8csEQTLGodDCRBi",
|
|
61
61
|
"src/base/style-format.js": "sha384-ZecSvvPRExr6mAQcpdXSlMIXcaAlOqk8Z9LtmssaKs72mRomgVxVqoKnK8kom1dE",
|
|
62
62
|
"src/base/typeahead.js": "sha384-jh0mIkDn2KiL9y+7vBq8hPXymo+yXd0d4PG4dUHq29B3NEvOmnxinqaxTyoPWUiV",
|
|
63
|
-
"src/base/utilities.js": "sha384-
|
|
63
|
+
"src/base/utilities.js": "sha384-biIR2iftpaWta/K11lN8+Sy28HKOObAsxwXeNS6po3274boL6X+UB1nLqObXjW1R",
|
|
64
64
|
"src/base/utils.js": "sha384-ViPJZ9b6onUuHHgvcn2w1CHs0WTzbRKn6HD9FfoIWFQpX+ogZ34Zzb+JWohhT4O0",
|
|
65
65
|
"src/base/zazz-element.js": "sha384-UvckAl+GPm38SPS5B/V/ont0Pe9J5wb9K98ZB8+g2rd3ddlMHu3L27Mhv5ZfsQuw",
|
|
66
66
|
"src/head.js": "sha384-KPGI797+KY5jpuM8D8xlGU/XR8TAhmgEiDoNmMf7DwBRPQIBOTOGv0vFGs8SUBFR",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"src/primitives/input/input.css": "sha384-NGSKq7/EblDbDZreAVdUNUYuS+OphzsbxLweH5QMIMWIZ8MPepm1WSqkcx9NEww7",
|
|
94
94
|
"src/primitives/kbd/kbd.css": "sha384-cyoGDhAq4pb1ekOZw41xZY8Ibkdxh/KMxnRcM17IjtAuxoOA+8HcBbMe/tBLvxnR",
|
|
95
95
|
"src/primitives/layout/layout.css": "sha384-t14PB4WKl50yORZIlaWyrgnZqbEvY8JJgBe4gAgdnt0jzVrYm6KvqVod0iVtjHJa",
|
|
96
|
-
"src/primitives/lightbox/lightbox.css": "sha384-
|
|
96
|
+
"src/primitives/lightbox/lightbox.css": "sha384-x4DkJjpx+nUYJhErcc5DhBDzSJCoMZfn0l7BburOliVETrMXcbliuqo5PhE0Smb2",
|
|
97
97
|
"src/primitives/lightbox/lightbox.js": "sha384-NI4gOoEf6GDXeuiRPM+wt6DGlUtKtEG+YZv4H/kfKCCSjAD51fWI+1mHNvpMsQNb",
|
|
98
98
|
"src/primitives/menu/menu.css": "sha384-v18DY/M7zrJTYLfAvms9xyGNB0gDdS2kRfccbqRqT/xxueNYIQv8k4SL9oBj9+LD",
|
|
99
99
|
"src/primitives/menu/menu.js": "sha384-BiFyze9EnMICWT3lnXpb96ypDctDYk8oLq3Op3vnSMqY7/wK4cnmqSBq+6F5+eYZ",
|