mnfst 0.5.213 → 0.5.215

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.
@@ -16,14 +16,16 @@
16
16
 
17
17
  // Build stamps the published version here; unstamped (dev) falls back to the
18
18
  // registration URL's `v`, then 'dev'.
19
- const BUILD_VERSION = '0.5.213';
19
+ const BUILD_VERSION = '0.5.215';
20
20
  const CACHE_PREFIX = 'mnfst-sw:';
21
21
  const META_CACHE = CACHE_PREFIX + 'meta';
22
- const SWR_CAP = 200;
22
+ // Sized to hold a full precache.json warm-up (PRECACHE_MAX_ENTRIES server-side)
23
+ // so precached media isn't evicted before it's ever used offline.
24
+ const SWR_CAP = 500;
23
25
  const PRECACHE_PATH = '/precache.json';
24
26
  const PRECACHE_CONCURRENCY = 4;
25
27
 
26
- const STATIC_EXT = /\.(css|js|mjs|json|csv|tsv|ya?ml|md|txt|xml|svg|png|jpe?g|gif|webp|avif|ico|bmp|woff2?|ttf|otf|eot|mp3|mp4|webm|ogg|wav|wasm|webmanifest|map)$/i;
28
+ const STATIC_EXT = /\.(css|js|mjs|json|csv|tsv|ya?ml|md|txt|xml|svg|png|jpe?g|gif|webp|avif|ico|bmp|woff2?|ttf|otf|eot|mp3|mp4|webm|ogg|wav|flac|m4a|wasm|webmanifest|map)$/i;
27
29
  const SKIP_PATH = /^\/(sw\.js$|precache\.json$|v1\/|_appwrite\/|_ai\/|__mnfst|__edit)/;
28
30
  const CDN_HOST = /^(cdn\.manifestx\.dev|cdn\.jsdelivr\.net|unpkg\.com|esm\.run)$/;
29
31
  const ICONIFY_HOST = /^api\.(iconify\.design|simplesvg\.com|unisvg\.com)$/;
@@ -123,7 +123,11 @@
123
123
  border-radius: var(--radius, 0.5rem)
124
124
  }
125
125
 
126
- /* Badges */
126
+ /* Badges. Leading is normal so descenders clear the bottom edge, padding
127
+ comes off --spacing rather than ch (0.65ch crowds the first letter), and
128
+ the radius follows --radius instead of a hard pill. The semantic surface
129
+ stays solid: tinting it and keeping --color-field-inverse drops dark-mode
130
+ contrast to ~1.1, and moving to --color-content-stark only reaches ~3. */
127
131
  :where(.badge) {
128
132
  display: inline-flex;
129
133
  justify-content: center;
@@ -131,17 +135,27 @@
131
135
  gap: 0.25rem;
132
136
  width: fit-content;
133
137
  height: fit-content;
134
- padding: 0.35ch 0.65ch;
138
+ padding: calc(var(--spacing, 0.25rem) * 0.5) calc(var(--spacing, 0.25rem) * 2);
135
139
  font-weight: 500;
136
140
  font-size: 0.75rem;
137
- line-height: 1;
141
+ line-height: 1.25;
138
142
  color: var(--color-field-inverse, oklch(43.9% 0 0));
139
143
  background-color: var(--color-field-surface, color-mix(in oklch, oklch(97% 0 0) 10%, transparent));
140
- border-radius: 100px;
144
+ border-radius: calc(var(--radius, 0.5rem) * 0.6);
145
+
146
+ /* Solo icons square up, as buttons do. (The old :only-child here keyed
147
+ off the badge's siblings, so an icon badge next to anything got word
148
+ padding.) */
149
+ &[x-icon] {
150
+ padding: calc(var(--spacing, 0.25rem) * 0.5);
151
+ aspect-ratio: 1
152
+ }
141
153
 
142
- /* Solo icons */
143
- &:only-child[x-icon] {
144
- padding: 0.35ch
154
+ /* Same for a badge wrapping a bare <svg>. Its own rule so the plain
155
+ selector above still lands without :has(). */
156
+ &:has(> svg:only-child) {
157
+ padding: calc(var(--spacing, 0.25rem) * 0.5);
158
+ aspect-ratio: 1
145
159
  }
146
160
  }
147
161
 
@@ -275,7 +275,12 @@
275
275
  margin-top: calc(3rem)
276
276
  }
277
277
 
278
- &>details:last-child,
278
+ &>details:last-child {
279
+ margin-bottom: calc(3rem)
280
+ }
281
+
282
+ /* Own rule — :not() is not forgiving either, so an unsupported :has()
283
+ inside it would take :last-child above down with it. */
279
284
  &>details:not(:last-child):not(:has(+ details, + hr)) {
280
285
  margin-bottom: calc(3rem)
281
286
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mnfst",
3
- "version": "0.5.213",
3
+ "version": "0.5.215",
4
4
  "private": false,
5
5
  "workspaces": [
6
6
  "templates/starter",