@replohq/sdk 1.21.0 → 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.
Files changed (54) hide show
  1. package/_vendor/schemas/contentCollection.d.ts +1 -1
  2. package/_vendor/schemas/contentCollection.mjs +1 -1
  3. package/_vendor/schemas/contentEntry.d.ts +1 -1
  4. package/_vendor/schemas/contentEntry.mjs +2 -2
  5. package/_vendor/schemas/contentManifest.d.ts +1 -1
  6. package/_vendor/schemas/contentManifest.mjs +3 -3
  7. package/_vendor/schemas/errors.d.ts +2 -2
  8. package/_vendor/schemas/money.d.ts +1 -1
  9. package/_vendor/schemas/money.mjs +5 -5
  10. package/_vendor/schemas/routing/locale.d.ts +1 -1
  11. package/_vendor/schemas/routing/locale.mjs +2 -2
  12. package/_vendor/schemas/routing/rules.d.ts +1 -1
  13. package/_vendor/schemas/routing/rules.mjs +2 -2
  14. package/analytics/sinks/converge-event-mapper.js +1 -1
  15. package/analytics/sinks/elevar-sink.js +1 -1
  16. package/analytics/sinks/x-sink.js +1 -1
  17. package/analytics/utils/analytics-products.d.ts +1 -1
  18. package/analytics/utils/analytics-products.js +1 -1
  19. package/cart/buy-now-action.js +1 -1
  20. package/cart/cart-schema.d.ts +1 -1
  21. package/cart/cart-schema.js +1 -1
  22. package/{chunk-NDJ5N6HI.mjs → chunk-AQG3256R.mjs} +1 -1
  23. package/{chunk-GZWV5XKV.mjs → chunk-CQYCPDPI.mjs} +20 -20
  24. package/{chunk-EUQVEPSD.mjs → chunk-RQ76VK3L.mjs} +1 -1
  25. package/consent/consent-platform.js +1 -1
  26. package/consent/cookie.js +1 -1
  27. package/content.d.ts +1 -1
  28. package/content.js +1 -1
  29. package/env.js +1 -1
  30. package/gateways/canopy-api.d.ts +1 -1
  31. package/gateways/canopy-api.js +1 -1
  32. package/integrations/mailchimp.d.ts +1 -1
  33. package/integrations/mailchimp.js +1 -1
  34. package/lib/buildMetadata.js +3 -3
  35. package/loaders/loader-schemas.d.ts +1 -1
  36. package/loaders/loader-schemas.js +1 -1
  37. package/loaders/okendo-review-aggregate-loader.d.ts +1 -1
  38. package/loaders/okendo-review-aggregate-loader.js +1 -1
  39. package/loaders/okendo-reviews-loader.d.ts +1 -1
  40. package/loaders/okendo-reviews-loader.js +1 -1
  41. package/loaders/preview-placeholder.js +1 -1
  42. package/loaders/rebuy-recommendations-loader.d.ts +1 -1
  43. package/loaders/rebuy-recommendations-loader.js +1 -1
  44. package/loaders/smile-earning-rules-loader.d.ts +1 -1
  45. package/loaders/smile-earning-rules-loader.js +1 -1
  46. package/loaders/smile-rewards-loader.d.ts +1 -1
  47. package/loaders/smile-rewards-loader.js +1 -1
  48. package/loaders/smile-vip-tiers-loader.d.ts +1 -1
  49. package/loaders/smile-vip-tiers-loader.js +1 -1
  50. package/next/config.js +4 -0
  51. package/next/image-loader.js +3 -3
  52. package/orders/order-status-schema.d.ts +1 -1
  53. package/orders/order-status-schema.js +1 -1
  54. package/package.json +4 -4
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import * as z from "zod";
2
2
  /**
3
3
  * The shared app-root manifest that bundles `content/**` for production
4
4
  * builds (published Workers have no filesystem). Scaffolded as a placeholder
@@ -1,2 +1,2 @@
1
- export { CONTENT_BUILTIN_FIELD_ROLES, CONTENT_COLLECTION_SCHEMA_FILENAME, CONTENT_COUPLED_VALUE_PARENTS, CONTENT_DIRNAME, CONTENT_ENTRY_FILE_EXTENSION, CONTENT_ENTRY_PUBLISHED_FILE_EXTENSION, CONTENT_MANIFEST_FILENAME, CONTENT_MAX_SLUG_LENGTH, CONTENT_PRIVATE_VALUE_KEYS, CONTENT_RELATED_VALUE_STORAGE_KEY, CONTENT_RESERVED_COLLECTION_SLUGS, CONTENT_RESERVED_ENTRY_SLUGS, CONTENT_SEO_VALUE_KEYS, CONTENT_SLUG_PATTERN, LEGACY_CONTENT_ENTRY_STATUSES, contentCollectionColorSchema, contentCollectionFieldSchema, contentCollectionFieldTypeSchema, contentCollectionFileSchema, contentSlugSchema, formatContentEntryRef, getContentEntryFileSlug, getContentEntryPublishState, getContentEntryRoute, getContentFieldRole, getContentFieldValueSchema, getOrderedContentFields, getPublishedContentFields, isContentPrivateValueKey, isContentReservedCollectionSlug, isContentReservedEntrySlug, isContentSeoValueKey, isSafeContentUrl, isValidContentSlug, parseContentEntryRef } from '../../chunk-EUQVEPSD.mjs';
1
+ export { CONTENT_BUILTIN_FIELD_ROLES, CONTENT_COLLECTION_SCHEMA_FILENAME, CONTENT_COUPLED_VALUE_PARENTS, CONTENT_DIRNAME, CONTENT_ENTRY_FILE_EXTENSION, CONTENT_ENTRY_PUBLISHED_FILE_EXTENSION, CONTENT_MANIFEST_FILENAME, CONTENT_MAX_SLUG_LENGTH, CONTENT_PRIVATE_VALUE_KEYS, CONTENT_RELATED_VALUE_STORAGE_KEY, CONTENT_RESERVED_COLLECTION_SLUGS, CONTENT_RESERVED_ENTRY_SLUGS, CONTENT_SEO_VALUE_KEYS, CONTENT_SLUG_PATTERN, LEGACY_CONTENT_ENTRY_STATUSES, contentCollectionColorSchema, contentCollectionFieldSchema, contentCollectionFieldTypeSchema, contentCollectionFileSchema, contentSlugSchema, formatContentEntryRef, getContentEntryFileSlug, getContentEntryPublishState, getContentEntryRoute, getContentFieldRole, getContentFieldValueSchema, getOrderedContentFields, getPublishedContentFields, isContentPrivateValueKey, isContentReservedCollectionSlug, isContentReservedEntrySlug, isContentSeoValueKey, isSafeContentUrl, isValidContentSlug, parseContentEntryRef } from '../../chunk-RQ76VK3L.mjs';
2
2
  import '../../chunk-UJCSKKID.mjs';
@@ -1,5 +1,5 @@
1
1
  import type { contentCollectionFieldSchema, LegacyContentEntryStatus } from "./contentCollection";
2
- import { z } from "zod";
2
+ import * as z from "zod";
3
3
  export declare const CONTENT_MANAGED_ENTRY_VALUE_KEYS: readonly ["slug", "title", "status", "author", "authorInitials", "excerpt", "coverImage", "coverImageAlt", "tags", "updatedAt", "publishedAt", "archivedAt", "seoTitle", "seoDescription", "related", "scratchpad", "backlinks"];
4
4
  export declare const contentEntryFrontmatterSchema: z.ZodObject<{
5
5
  slug: z.ZodOptional<z.ZodUnknown>;
@@ -1,5 +1,5 @@
1
- export { CONTENT_MANAGED_ENTRY_VALUE_KEYS, contentEntryFrontmatterSchema, convertLegacyContentEntryDocument, getContentEntryFieldValidationIssues, getContentRenderableEntryValues, parseContentEntryDocument, serializeContentEntryDocument } from '../../chunk-GZWV5XKV.mjs';
2
- import '../../chunk-EUQVEPSD.mjs';
1
+ export { CONTENT_MANAGED_ENTRY_VALUE_KEYS, contentEntryFrontmatterSchema, convertLegacyContentEntryDocument, getContentEntryFieldValidationIssues, getContentRenderableEntryValues, parseContentEntryDocument, serializeContentEntryDocument } from '../../chunk-CQYCPDPI.mjs';
2
+ import '../../chunk-RQ76VK3L.mjs';
3
3
  import '../../chunk-ACQS4AG5.mjs';
4
4
  import '../../chunk-SSBIMQES.mjs';
5
5
  import '../../chunk-UJCSKKID.mjs';
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import * as z from "zod";
2
2
  export declare const contentManifestSchema: z.ZodObject<{
3
3
  files: z.ZodRecord<z.ZodString, z.ZodString>;
4
4
  }, z.core.$strip>;
@@ -1,12 +1,12 @@
1
- import { parseContentEntryDocument, getContentRenderableEntryValues, getContentEntryFieldValidationIssues } from '../../chunk-GZWV5XKV.mjs';
2
- import { isValidContentSlug, CONTENT_COLLECTION_SCHEMA_FILENAME, CONTENT_ENTRY_FILE_EXTENSION, contentCollectionFileSchema, CONTENT_ENTRY_PUBLISHED_FILE_EXTENSION } from '../../chunk-EUQVEPSD.mjs';
1
+ import { parseContentEntryDocument, getContentRenderableEntryValues, getContentEntryFieldValidationIssues } from '../../chunk-CQYCPDPI.mjs';
2
+ import { isValidContentSlug, CONTENT_COLLECTION_SCHEMA_FILENAME, CONTENT_ENTRY_FILE_EXTENSION, contentCollectionFileSchema, CONTENT_ENTRY_PUBLISHED_FILE_EXTENSION } from '../../chunk-RQ76VK3L.mjs';
3
3
  import { parseJsonOrNull } from '../../chunk-C37TXOGI.mjs';
4
4
  import '../../chunk-VVB7BEDE.mjs';
5
5
  import '../../chunk-ACQS4AG5.mjs';
6
6
  import '../../chunk-EUIVDITZ.mjs';
7
7
  import '../../chunk-SSBIMQES.mjs';
8
8
  import '../../chunk-UJCSKKID.mjs';
9
- import { z } from 'zod';
9
+ import * as z from 'zod';
10
10
 
11
11
  var contentManifestSchema = z.object({
12
12
  files: z.record(z.string(), z.string())
@@ -1,5 +1,5 @@
1
1
  import type { ErrorUserFacingDetails, ErrorUserFacingDetailsWithMessage } from "./generated/errors";
2
- import { z, ZodError } from "zod";
2
+ import * as z from "zod";
3
3
  /**
4
4
  * Config to use for any standard error we throw in Replo
5
5
  */
@@ -485,6 +485,6 @@ export declare class IframeRpcChannelConfigurationError extends IframeRpcChannel
485
485
  export declare class IframeRpcChannelInvalidInputError extends IframeRpcChannelError {
486
486
  constructor({ method, cause }: {
487
487
  method: string;
488
- cause: ZodError;
488
+ cause: z.ZodError;
489
489
  });
490
490
  }
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import * as z from "zod";
2
2
  import { ReploError } from "./errors";
3
3
  export declare class InvalidAmountError extends ReploError {
4
4
  }
@@ -1,9 +1,9 @@
1
- import { ReploError } from '../../chunk-NDJ5N6HI.mjs';
1
+ import { ReploError } from '../../chunk-AQG3256R.mjs';
2
2
  import '../../chunk-HFKL4ZR5.mjs';
3
3
  import '../../chunk-EUIVDITZ.mjs';
4
4
  import '../../chunk-SSBIMQES.mjs';
5
5
  import { __commonJS, __toESM } from '../../chunk-UJCSKKID.mjs';
6
- import { z } from 'zod';
6
+ import * as z from 'zod';
7
7
 
8
8
  var require_first_match = __commonJS({
9
9
  "../../node_modules/.pnpm/first-match@0.0.1/node_modules/first-match/index.js"(exports, module) {
@@ -1816,9 +1816,9 @@ var require_currency_codes = __commonJS({
1816
1816
  }) || []).indexOf(country2) > -1;
1817
1817
  });
1818
1818
  };
1819
- var number = function(number2) {
1819
+ var number2 = function(number3) {
1820
1820
  return first(data, function(c) {
1821
- return c.number === String(number2);
1821
+ return c.number === String(number3);
1822
1822
  });
1823
1823
  };
1824
1824
  var codes = function() {
@@ -1846,7 +1846,7 @@ var require_currency_codes = __commonJS({
1846
1846
  };
1847
1847
  exports.code = code;
1848
1848
  exports.country = country;
1849
- exports.number = number;
1849
+ exports.number = number2;
1850
1850
  exports.codes = codes;
1851
1851
  exports.numbers = numbers;
1852
1852
  exports.countries = countries;
@@ -1,5 +1,5 @@
1
1
  import { ReploError } from "../errors";
2
- import { z } from "zod";
2
+ import * as z from "zod";
3
3
  export declare class LocaleRoutingValidationError extends ReploError {
4
4
  }
5
5
  /**
@@ -1,9 +1,9 @@
1
- import { ReploError } from '../../../chunk-NDJ5N6HI.mjs';
1
+ import { ReploError } from '../../../chunk-AQG3256R.mjs';
2
2
  import '../../../chunk-HFKL4ZR5.mjs';
3
3
  import '../../../chunk-EUIVDITZ.mjs';
4
4
  import '../../../chunk-SSBIMQES.mjs';
5
5
  import '../../../chunk-UJCSKKID.mjs';
6
- import { z } from 'zod';
6
+ import * as z from 'zod';
7
7
 
8
8
  var LocaleRoutingValidationError = class extends ReploError {
9
9
  };
@@ -1,5 +1,5 @@
1
1
  import { ReploError } from "../errors";
2
- import { z } from "zod";
2
+ import * as z from "zod";
3
3
  export declare class RedirectRuleValidationError extends ReploError {
4
4
  }
5
5
  export declare const redirectStatusSchema: z.ZodUnion<readonly [z.ZodLiteral<301>, z.ZodLiteral<302>, z.ZodLiteral<307>, z.ZodLiteral<308>]>;
@@ -1,10 +1,10 @@
1
1
  import { getParamSegment, getRouteParams, hasRouteParam, matchSource } from '../../../chunk-VPEVERWE.mjs';
2
- import { ReploError } from '../../../chunk-NDJ5N6HI.mjs';
2
+ import { ReploError } from '../../../chunk-AQG3256R.mjs';
3
3
  import '../../../chunk-HFKL4ZR5.mjs';
4
4
  import '../../../chunk-EUIVDITZ.mjs';
5
5
  import '../../../chunk-SSBIMQES.mjs';
6
6
  import '../../../chunk-UJCSKKID.mjs';
7
- import { z } from 'zod';
7
+ import * as z from 'zod';
8
8
 
9
9
  function parseUrl(value, base) {
10
10
  try {
@@ -1,5 +1,5 @@
1
1
  import { filterUndefined } from "../../_vendor/replo-utils/lib/object.mjs";
2
- import { z } from "zod";
2
+ import * as z from "zod";
3
3
  const analyticsRecordSchema = z.record(z.string(), z.unknown());
4
4
  const nonEmptyStringSchema = z.union([
5
5
  z.string().min(1),
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import * as z from "zod";
2
2
  import { legacyResourceId } from "../utils/analytics-products";
3
3
  const GUEST_USER_PROPERTIES = { visitor_type: "guest" };
4
4
  const FALLBACK_CURRENCY_CODE = "USD";
@@ -1,5 +1,5 @@
1
1
  import { filterUndefined } from "../../_vendor/replo-utils/lib/object.mjs";
2
- import { z } from "zod";
2
+ import * as z from "zod";
3
3
  import { isXEventIdForPixel } from "../../consent/script-snippets";
4
4
  import { legacyResourceId } from "../utils/analytics-products";
5
5
  import { createEventQueue } from "../utils/analytics-utils";
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import * as z from "zod";
2
2
  /**
3
3
  * The flat per-product line the cart provider and the viewed hooks emit.
4
4
  * Prices are decimal major units.
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import * as z from "zod";
2
2
  const nonEmptyStringSchema = z.union([z.string().min(1), z.number().finite().transform(String)]).optional().catch(void 0);
3
3
  const finiteNumberSchema = z.union([
4
4
  z.number().finite(),
@@ -1,7 +1,7 @@
1
1
  "use server";
2
2
  import { headers } from "next/headers";
3
3
  import { v4 as uuidv4 } from "uuid";
4
- import { z } from "zod";
4
+ import * as z from "zod";
5
5
  import { getEnv } from "../env";
6
6
  import { CanopyError } from "../lib/canopy-error";
7
7
  import { getCheckoutProvider } from "../lib/integration-utils";
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import * as z from "zod";
2
2
  export declare const cartSchema: z.ZodObject<{
3
3
  id: z.ZodString;
4
4
  lines: z.ZodArray<z.ZodObject<{
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import * as z from "zod";
2
2
  const cartLineAttributeSchema = z.object({
3
3
  key: z.string(),
4
4
  value: z.union([z.string(), z.number(), z.boolean()])
@@ -1,5 +1,5 @@
1
1
  import { v4 } from 'uuid';
2
- import { z } from 'zod';
2
+ import * as z from 'zod';
3
3
 
4
4
  function randomUUID() {
5
5
  return v4();
@@ -1,9 +1,9 @@
1
- import { CONTENT_SEO_VALUE_KEYS, CONTENT_RELATED_VALUE_STORAGE_KEY, CONTENT_PRIVATE_VALUE_KEYS, isContentPrivateValueKey, LEGACY_CONTENT_ENTRY_STATUSES, getContentFieldValueSchema } from './chunk-EUQVEPSD.mjs';
1
+ import { CONTENT_SEO_VALUE_KEYS, CONTENT_RELATED_VALUE_STORAGE_KEY, CONTENT_PRIVATE_VALUE_KEYS, isContentPrivateValueKey, LEGACY_CONTENT_ENTRY_STATUSES, getContentFieldValueSchema } from './chunk-RQ76VK3L.mjs';
2
2
  import { pickBy_default } from './chunk-ACQS4AG5.mjs';
3
3
  import { stringify, parseDocument } from 'yaml';
4
- import { z } from 'zod';
4
+ import * as z2 from 'zod';
5
5
 
6
- var frontmatterDataSchema = z.record(z.string(), z.unknown());
6
+ var frontmatterDataSchema = z2.record(z2.string(), z2.unknown());
7
7
  var CONTENT_FRONTMATTER_PATTERN = /^---\r?\n([\s\S]*?)\r?\n---\r?\n?/u;
8
8
  function parseContentFrontmatterYaml(yamlText) {
9
9
  try {
@@ -55,23 +55,23 @@ var CONTENT_MANAGED_ENTRY_VALUE_KEYS = [
55
55
  CONTENT_RELATED_VALUE_STORAGE_KEY,
56
56
  ...CONTENT_PRIVATE_VALUE_KEYS
57
57
  ];
58
- var contentEntryFrontmatterSchema = z.object({
59
- slug: z.unknown().optional(),
60
- title: z.string().nullish(),
61
- author: z.string().nullish(),
62
- authorInitials: z.string().nullish(),
63
- excerpt: z.string().nullish(),
64
- coverImage: z.string().nullish(),
65
- coverImageAlt: z.string().nullish(),
66
- tags: z.array(z.string()).nullish(),
67
- updatedAt: z.string().nullish(),
68
- publishedAt: z.string().nullish(),
69
- archivedAt: z.string().nullish(),
70
- seoTitle: z.string().nullish(),
71
- seoDescription: z.string().nullish(),
72
- related: z.array(z.string()).nullish(),
73
- scratchpad: z.unknown().optional(),
74
- backlinks: z.unknown().optional()
58
+ var contentEntryFrontmatterSchema = z2.object({
59
+ slug: z2.unknown().optional(),
60
+ title: z2.string().nullish(),
61
+ author: z2.string().nullish(),
62
+ authorInitials: z2.string().nullish(),
63
+ excerpt: z2.string().nullish(),
64
+ coverImage: z2.string().nullish(),
65
+ coverImageAlt: z2.string().nullish(),
66
+ tags: z2.array(z2.string()).nullish(),
67
+ updatedAt: z2.string().nullish(),
68
+ publishedAt: z2.string().nullish(),
69
+ archivedAt: z2.string().nullish(),
70
+ seoTitle: z2.string().nullish(),
71
+ seoDescription: z2.string().nullish(),
72
+ related: z2.array(z2.string()).nullish(),
73
+ scratchpad: z2.unknown().optional(),
74
+ backlinks: z2.unknown().optional()
75
75
  }).passthrough();
76
76
  function parseContentEntryDocument(raw) {
77
77
  const frontmatter = parseContentFrontmatter(raw);
@@ -1,4 +1,4 @@
1
- import { z } from 'zod';
1
+ import * as z from 'zod';
2
2
 
3
3
  var CONTENT_MANIFEST_FILENAME = "content-manifest.generated.json";
4
4
  var CONTENT_DIRNAME = "content";
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import * as z from "zod";
2
2
  import { DENIED_CATEGORIES } from "./cookie";
3
3
  const COOKIEBOT_CATEGORY_BY_CONSENT = {
4
4
  analytics: "statistics",
package/consent/cookie.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { parseJsonOrNull } from "../_vendor/replo-utils/lib/json.mjs";
2
- import { z } from "zod";
2
+ import * as z from "zod";
3
3
  const CONSENT_COOKIE_NAME = "replo_consent";
4
4
  const CONSENT_COOKIE_VERSION = 1;
5
5
  const CONSENT_COOKIE_MAX_AGE_SECONDS = 60 * 60 * 24 * 180;
package/content.d.ts CHANGED
@@ -3,7 +3,7 @@ import type { Metadata } from "next";
3
3
  import type { ReactNode } from "react";
4
4
  import type { contentCollectionFieldSchema } from "./_vendor/schemas/contentCollection";
5
5
  import type { ContentManifest } from "./_vendor/schemas/contentManifest";
6
- import { z } from "zod";
6
+ import * as z from "zod";
7
7
  /** Public name for the shared collection-field contract. */
8
8
  export type ContentField = z.infer<typeof contentCollectionFieldSchema>;
9
9
  export interface ContentEntry {
package/content.js CHANGED
@@ -30,7 +30,7 @@ import {
30
30
  getContentManifestCollectionSlugs,
31
31
  getContentManifestEntrySlugs
32
32
  } from "./_vendor/schemas/contentManifest.mjs";
33
- import { z } from "zod";
33
+ import * as z from "zod";
34
34
  function createContentSource({
35
35
  contentDirectory = getDefaultContentDirectory(),
36
36
  contentManifest
package/env.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { getCloudflareContext } from "@opennextjs/cloudflare";
2
2
  import JSONC from "tiny-jsonc";
3
- import { z } from "zod";
3
+ import * as z from "zod";
4
4
  import { CanopyError } from "./lib/canopy-error";
5
5
  const envSchema = z.object({
6
6
  CANOPY_API_HOST: z.string().min(1),
@@ -1,6 +1,6 @@
1
1
  import type { Cart } from "../cart/cart-schema";
2
2
  import type { StorefrontCountryCode } from "../loaders/markets";
3
- import { z } from "zod";
3
+ import * as z from "zod";
4
4
  import { CanopyError } from "../lib/canopy-error";
5
5
  type CanopyApiGatewayErrorConfig = {
6
6
  message: string;
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import * as z from "zod";
2
2
  import { cartSchema } from "../cart/cart-schema";
3
3
  import { getEnv } from "../env";
4
4
  import { CanopyError } from "../lib/canopy-error";
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { z } from "zod";
2
+ import * as z from "zod";
3
3
  import { CanopyError } from "../lib/canopy-error";
4
4
  declare const mailchimpSubscribeErrorCodeSchema: z.ZodEnum<{
5
5
  notConnected: "notConnected";
@@ -2,7 +2,7 @@
2
2
  import React from "react";
3
3
  import { useMutation } from "@tanstack/react-query";
4
4
  import { parseJsonOrNull } from "../_vendor/replo-utils/lib/json.mjs";
5
- import { z } from "zod";
5
+ import * as z from "zod";
6
6
  import { CanopyError } from "../lib/canopy-error";
7
7
  import { useCanopyClientConfig } from "../providers/canopy-client-config";
8
8
  const mailchimpSubscribeErrorCodeSchema = z.enum([
@@ -1,7 +1,7 @@
1
1
  export const BUILD_METADATA = {
2
2
  "packageName": "@replohq/sdk",
3
- "version": "1.21.0",
3
+ "version": "1.22.0",
4
4
  "branch": "HEAD",
5
- "commit": "bd37110ed5ca1a7902f9975bafa8169dd3bd3068",
6
- "builtAt": "2026-10-17T07:52:13.133Z"
5
+ "commit": "cce09bc70f0a5638a8b527e5351534efe9bfcdf7",
6
+ "builtAt": "2026-10-19T20:42:49.578Z"
7
7
  };
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import * as z from "zod";
2
2
  export declare const imageSchema: z.ZodObject<{
3
3
  url: z.ZodString;
4
4
  altText: z.ZodNullable<z.ZodString>;
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import * as z from "zod";
2
2
  const imageSchema = z.object({
3
3
  url: z.string(),
4
4
  altText: z.string().nullable(),
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from "react";
2
- import { z } from "zod";
2
+ import * as z from "zod";
3
3
  declare const okendoReviewAggregateOutputSchema: z.ZodObject<{
4
4
  reviewCount: z.ZodNumber;
5
5
  reviewAverageValue: z.ZodNumber;
@@ -2,7 +2,7 @@
2
2
  import { Fragment, jsx } from "react/jsx-runtime";
3
3
  import { Suspense } from "react";
4
4
  import { useSuspenseQuery } from "@tanstack/react-query";
5
- import { z } from "zod";
5
+ import * as z from "zod";
6
6
  import { invokeLoader } from "./invoke-loader";
7
7
  import { LoaderErrorBoundary } from "./loader-error-boundary";
8
8
  const okendoReviewAggregateOutputSchema = z.object({
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from "react";
2
- import { z } from "zod";
2
+ import * as z from "zod";
3
3
  declare const okendoReviewsOutputSchema: z.ZodObject<{
4
4
  reviews: z.ZodArray<z.ZodObject<{
5
5
  id: z.ZodString;
@@ -2,7 +2,7 @@
2
2
  import { Fragment, jsx } from "react/jsx-runtime";
3
3
  import { Suspense } from "react";
4
4
  import { useSuspenseQuery } from "@tanstack/react-query";
5
- import { z } from "zod";
5
+ import * as z from "zod";
6
6
  import { invokeLoader } from "./invoke-loader";
7
7
  import { LoaderErrorBoundary } from "./loader-error-boundary";
8
8
  import { okendoReviewSchema } from "./loader-schemas";
@@ -1,5 +1,5 @@
1
1
  import { useEffect } from "react";
2
- import { z } from "zod";
2
+ import * as z from "zod";
3
3
  import { DATA_LOADER_KEYS } from "./loader-keys";
4
4
  const PLACEHOLDER_RENDER_MESSAGE_TYPE = "replo:preview:placeholder-render";
5
5
  const UNFILLED_ROUTE_PARAM_RE = /^\[{1,2}(?:\.\.\.)?[^\]]+\]{1,2}$/;
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from "react";
2
- import { z } from "zod";
2
+ import * as z from "zod";
3
3
  declare const rebuyRecommendationsOutputSchema: z.ZodObject<{
4
4
  products: z.ZodArray<z.ZodObject<{
5
5
  id: z.ZodString;
@@ -2,7 +2,7 @@
2
2
  import { Fragment, jsx } from "react/jsx-runtime";
3
3
  import { Suspense } from "react";
4
4
  import { useSuspenseQuery } from "@tanstack/react-query";
5
- import { z } from "zod";
5
+ import * as z from "zod";
6
6
  import { invokeLoader } from "./invoke-loader";
7
7
  import { LoaderErrorBoundary } from "./loader-error-boundary";
8
8
  import { productSchema } from "./loader-schemas";
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from "react";
2
- import { z } from "zod";
2
+ import * as z from "zod";
3
3
  declare const smileEarningRuleSchema: z.ZodObject<{
4
4
  id: z.ZodNumber;
5
5
  name: z.ZodString;
@@ -2,7 +2,7 @@
2
2
  import { Fragment, jsx } from "react/jsx-runtime";
3
3
  import { Suspense } from "react";
4
4
  import { useSuspenseQuery } from "@tanstack/react-query";
5
- import { z } from "zod";
5
+ import * as z from "zod";
6
6
  import { invokeLoader } from "./invoke-loader";
7
7
  import { LoaderErrorBoundary } from "./loader-error-boundary";
8
8
  const smileEarningRuleSchema = z.object({
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from "react";
2
- import { z } from "zod";
2
+ import * as z from "zod";
3
3
  declare const smileRewardSchema: z.ZodObject<{
4
4
  id: z.ZodNumber;
5
5
  name: z.ZodString;
@@ -2,7 +2,7 @@
2
2
  import { Fragment, jsx } from "react/jsx-runtime";
3
3
  import { Suspense } from "react";
4
4
  import { useSuspenseQuery } from "@tanstack/react-query";
5
- import { z } from "zod";
5
+ import * as z from "zod";
6
6
  import { invokeLoader } from "./invoke-loader";
7
7
  import { LoaderErrorBoundary } from "./loader-error-boundary";
8
8
  const smileRewardSchema = z.object({
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from "react";
2
- import { z } from "zod";
2
+ import * as z from "zod";
3
3
  declare const smileVipTierSchema: z.ZodObject<{
4
4
  id: z.ZodNumber;
5
5
  name: z.ZodString;
@@ -2,7 +2,7 @@
2
2
  import { Fragment, jsx } from "react/jsx-runtime";
3
3
  import { Suspense } from "react";
4
4
  import { useSuspenseQuery } from "@tanstack/react-query";
5
- import { z } from "zod";
5
+ import * as z from "zod";
6
6
  import { invokeLoader } from "./invoke-loader";
7
7
  import { LoaderErrorBoundary } from "./loader-error-boundary";
8
8
  const smileVipTierSchema = z.object({
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";
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import * as z from "zod";
2
2
  export declare const orderStatusAddressSchema: z.ZodObject<{
3
3
  name: z.ZodNullable<z.ZodString>;
4
4
  line1: z.ZodString;
@@ -1,4 +1,4 @@
1
- import { z } from "zod";
1
+ import * as z from "zod";
2
2
  const orderStatusAddressSchema = z.object({
3
3
  name: z.string().nullable(),
4
4
  line1: z.string(),
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@replohq/sdk",
3
- "version": "1.21.0",
3
+ "version": "1.22.0",
4
4
  "reploBuild": {
5
5
  "packageName": "@replohq/sdk",
6
- "version": "1.21.0",
6
+ "version": "1.22.0",
7
7
  "branch": "HEAD",
8
- "commit": "bd37110ed5ca1a7902f9975bafa8169dd3bd3068",
9
- "builtAt": "2026-10-17T07:52:13.133Z"
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",