create-cartbase 0.1.15 → 0.1.16

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-cartbase",
3
- "version": "0.1.15",
3
+ "version": "0.1.16",
4
4
  "description": "Scaffold a Cartbase storefront: npm create cartbase my-store",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -765,8 +765,12 @@ components read copy only through the context or explicit `labels` props).
765
765
  - **SDK calls** — none (props: `product.thumbnail` / `product.images`).
766
766
  - **Props** — `size: "small"|"medium"|"large"|"full"|"square"` (aspect +
767
767
  width), `isFeatured` (11/14 aspect), `className`.
768
- - **Mount rules** — server-safe; uses `next/image` (host must allow the
769
- media domain in `next.config` images).
768
+ - **Mount rules** — server-safe; renders through `StoreImage`
769
+ (`@cartbase/storefront/lib/media-image`), `next/image` with resizing on
770
+ for the Cartbase media CDN (`cartbase.cloud`, allowed in the scaffold's
771
+ `next.config` images) and off for any other host, so a picture from
772
+ elsewhere renders as it is instead of failing the page. Use `StoreImage`
773
+ for your own pictures too, or add your hosts to `remotePatterns`.
770
774
 
771
775
  ### `<PreviewPrice price />` — `products/preview-price`
772
776
 
@@ -5,10 +5,12 @@ const nextConfig: NextConfig = {
5
5
  // build transpiles it.
6
6
  transpilePackages: ["@cartbase/storefront"],
7
7
  images: {
8
- // Product images come from the Cartbase media CDN and, until you
9
- // allowlist your own hosts under remotePatterns, from anywhere the
10
- // catalog points. Tighten this when the media domain is known.
11
- unoptimized: true,
8
+ // Product pictures live on the Cartbase media CDN and Next resizes them
9
+ // on this project, per device, in the modern formats. A picture from
10
+ // any other host renders as it is: the package's image components
11
+ // switch resizing off for hosts not listed here. Add your own hosts to
12
+ // resize them too.
13
+ remotePatterns: [{ protocol: "https", hostname: "cartbase.cloud" }],
12
14
  },
13
15
  // The Cartbase store API ships NO CORS headers — browser-side SDK calls
14
16
  // must be same-origin. Proxy them through the app origin (the browser
@@ -9,7 +9,7 @@
9
9
  "typecheck": "tsc --noEmit"
10
10
  },
11
11
  "dependencies": {
12
- "@cartbase/storefront": "^0.16.0",
12
+ "@cartbase/storefront": "^0.17.0",
13
13
  "next": "16.2.4",
14
14
  "react": "19.2.4",
15
15
  "react-dom": "19.2.4"