@replohq/sdk 1.21.1 → 1.22.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.
@@ -1,7 +1,7 @@
1
1
  export const BUILD_METADATA = {
2
2
  "packageName": "@replohq/sdk",
3
- "version": "1.21.1",
3
+ "version": "1.22.0",
4
4
  "branch": "HEAD",
5
- "commit": "c2722877665042cdbb579483c39be734395d2833",
6
- "builtAt": "2026-10-18T22:08:53.056Z"
5
+ "commit": "cce09bc70f0a5638a8b527e5351534efe9bfcdf7",
6
+ "builtAt": "2026-10-19T20:42:49.578Z"
7
7
  };
package/next/config.js CHANGED
@@ -18,6 +18,8 @@ const PLATFORM_SERVER_ACTION_ORIGINS = [
18
18
  "*.preview.reploapi.com",
19
19
  "*.preview-staging.reploapi.com"
20
20
  ];
21
+ const PLATFORM_DEVICE_SIZES = [640, 828, 1080, 1200, 1920, 2048, 3840];
22
+ const PLATFORM_IMAGE_SIZES = [32, 48, 96, 128, 256, 384];
21
23
  const DEFAULT_PAGE_EXTENSIONS = ["tsx", "ts", "jsx", "js"];
22
24
  const DEVELOPMENT_ONLY_PAGE_EXTENSIONS = ["dev.jsx", "dev.tsx"];
23
25
  const BUILD_ONLY_PAGE_EXTENSIONS = ["published.tsx"];
@@ -66,6 +68,8 @@ function siteConfig(overrides = {}) {
66
68
  ),
67
69
  images: {
68
70
  ...overrideImages,
71
+ deviceSizes: overrideImages?.deviceSizes ?? PLATFORM_DEVICE_SIZES,
72
+ imageSizes: overrideImages?.imageSizes ?? PLATFORM_IMAGE_SIZES,
69
73
  loader: "custom",
70
74
  loaderFile: "./image-loader.ts",
71
75
  remotePatterns: overrideImages?.remotePatterns ?? [
@@ -2,9 +2,9 @@ const REPLO_IMAGE_CDN = "https://assets.replocdn.com";
2
2
  function isContentfulImagesCdn(hostname) {
3
3
  return /^images(?:\.[a-z]+)?\.ctfassets\.net$/i.test(hostname);
4
4
  }
5
- function isAvifSource(src) {
5
+ function isPassthroughSource(src) {
6
6
  try {
7
- return new URL(src, REPLO_IMAGE_CDN).pathname.toLowerCase().endsWith(".avif");
7
+ return /\.(avif|svg)$/i.test(new URL(src, REPLO_IMAGE_CDN).pathname);
8
8
  } catch {
9
9
  return false;
10
10
  }
@@ -27,7 +27,7 @@ function cloudflareLoader({
27
27
  width,
28
28
  quality
29
29
  }) {
30
- if (isAvifSource(src)) {
30
+ if (isPassthroughSource(src)) {
31
31
  return src;
32
32
  }
33
33
  const isDevelopment = process.env.NODE_ENV === "development";
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@replohq/sdk",
3
- "version": "1.21.1",
3
+ "version": "1.22.0",
4
4
  "reploBuild": {
5
5
  "packageName": "@replohq/sdk",
6
- "version": "1.21.1",
6
+ "version": "1.22.0",
7
7
  "branch": "HEAD",
8
- "commit": "c2722877665042cdbb579483c39be734395d2833",
9
- "builtAt": "2026-10-18T22:08:53.056Z"
8
+ "commit": "cce09bc70f0a5638a8b527e5351534efe9bfcdf7",
9
+ "builtAt": "2026-10-19T20:42:49.578Z"
10
10
  },
11
11
  "description": "Replo SDK — cart, analytics, and data loaders for agent-built Next.js sites.",
12
12
  "license": "SEE LICENSE IN LICENSE",