@tokenoftrust/storefront-runner 6.3.0 → 6.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.
@@ -5,7 +5,7 @@
5
5
  * than a grey box, we synthesize a tasteful, aspect-correct SVG keyed by a
6
6
  * stable seed (image id or product handle) so each product gets a consistent,
7
7
  * on-brand gradient + monogram. The <Img> component swaps these out for real
8
- * rehosted URLs when CatalogImage.rehosted === true.
8
+ * rehosted URLs or content-addressed pool URLs.
9
9
  *
10
10
  * Palette is pulled from the theme's CSS vars at render time where possible, but
11
11
  * the SVG is self-contained (inlines colors) so it works as a data URI / <img src>.
@@ -91,6 +91,9 @@ export function placeholderDataUri(opts: PlaceholderOpts): string {
91
91
  export function isUsableImageUrl(url: string | undefined, rehosted?: boolean): boolean {
92
92
  if (!url) return false;
93
93
  if (rehosted) return true;
94
+ // Capture replaces image locators without changing catalog metadata. Pool
95
+ // originals render directly on both CDNs, including images with rehosted:false.
96
+ if (/^\/_a\/[0-9a-f]{64}(?:\.(?:avif|gif|jpe?g|png|svg|webp))?$/.test(url)) return true;
94
97
  // The synthetic apparel fixtures use a fake shop id (…/s/files/1/0001/…) whose
95
98
  // URLs 404 — draw placeholders for those. REAL store CDN URLs (e.g. a live POC
96
99
  // migration) are usable as-is.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tokenoftrust/storefront-runner",
3
- "version": "6.3.0",
3
+ "version": "6.3.1",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "description": "World-shareable storefront runner: multi-tenant renderer on Astro/Cloudflare. No control plane.",
6
6
  "packageManager": "pnpm@11.9.0",