@sarimarcus/content-sites-core 0.22.2 → 0.23.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/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  All packages in the platform release in lockstep; entries are per release version.
4
4
 
5
+ ## 0.23.0 (2026-10-04)
6
+
7
+ - `./images`: `IMAGE_LADDER` gains 160 and 240 (now 160, 240, 320, 480, 640, 960, 1280). Thumbnails shown at 64-160 CSS px used to download the 320 file; they now get a 160 or 240 one, which cuts their bytes by about two thirds on desktop at 1x and about a third on phones at 2x. Every srcset gains the two entries, and an off-ladder width at or under 240 (an avatar's `width={64}`) now snaps to the 160 or 240 file instead of 320 (SLA-2958).
8
+
9
+ ### Breaking
10
+
11
+ - A site's build fails with `Missing image variant …-160.webp` until it has the new rungs. Migration: run `npm run images:variants` in the site after the pin bump and commit `image-variants/` with the pins (SLA-2958).
12
+
5
13
  ## 0.22.2 (2026-10-04)
6
14
 
7
15
  - `./schema`: `offer`, `placeNode`, `siteOrganizationNode`, `siteWebsiteNode`, `isFreeEntry` and `renderSchemaPolicy` (with the `SchemaPolicy` type) replace node skeletons repeated across builders and site adapters (SLA-2918).
package/README.md CHANGED
@@ -24,7 +24,7 @@ for byte, key order included. It also holds the opening-hours model (`generateOp
24
24
  `assertedOpenDays`, `hoursStringOpenDays`) that `scripts/validate-opening-hours.mjs` imports. The factory scripts
25
25
  load `dist/`; `scripts/lib/core-dist.mjs` rebuilds it when it is missing or older than `src/`.
26
26
 
27
- `images` holds the one responsive width ladder (`IMAGE_LADDER`: 320, 480, 640, 960, 1280; WebP only) and the image
27
+ `images` holds the one responsive width ladder (`IMAGE_LADDER`: 160, 240, 320, 480, 640, 960, 1280; WebP only) and the image
28
28
  service `defineSiteConfig` installs. The service never encodes: it serves committed variants from the site's
29
29
  `image-variants/` (keyed by the source's content hash, listed in `manifest.json`) and the source bytes for the native
30
30
  width, and caps each srcset at the source width. A call site asks for a responsive image with
@@ -1,5 +1,5 @@
1
1
  /** The one width ladder every responsive image uses. WebP only. Not frozen: Astro sorts `widths` in place. */
2
- export const IMAGE_LADDER = [320, 480, 640, 960, 1280];
2
+ export const IMAGE_LADDER = [160, 240, 320, 480, 640, 960, 1280];
3
3
  /** Where a site keeps its committed variants, relative to the site root. */
4
4
  export const VARIANTS_DIR = 'image-variants';
5
5
  export const MANIFEST_FILE = 'manifest.json';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sarimarcus/content-sites-core",
3
- "version": "0.22.2",
3
+ "version": "0.23.0",
4
4
  "description": "Non-visual utilities, Astro config builders and SEO schema assembly shared by the content sites.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -1,5 +1,5 @@
1
1
  /** The one width ladder every responsive image uses. WebP only. Not frozen: Astro sorts `widths` in place. */
2
- export const IMAGE_LADDER: number[] = [320, 480, 640, 960, 1280];
2
+ export const IMAGE_LADDER: number[] = [160, 240, 320, 480, 640, 960, 1280];
3
3
 
4
4
  /** Where a site keeps its committed variants, relative to the site root. */
5
5
  export const VARIANTS_DIR = 'image-variants';