@replohq/sdk 1.7.1 → 1.7.3

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 (246) hide show
  1. package/_vendor/replo-utils/lib/string.d.ts +0 -2
  2. package/_vendor/schemas/errors.d.ts +2 -3
  3. package/_vendor/schemas/generated/errors.d.ts +3 -0
  4. package/_vendor/schemas/loaderKeys.mjs +0 -1
  5. package/_vendor/schemas/money.d.ts +1 -1
  6. package/_vendor/schemas/money.mjs +1 -7
  7. package/_vendor/schemas/routing/locale.mjs +1 -1
  8. package/_vendor/schemas/routing/rules.mjs +1 -2
  9. package/analytics/analytics-provider.js +0 -1
  10. package/analytics/analytics-sink.js +0 -1
  11. package/analytics/get-analytics-sinks.js +0 -1
  12. package/analytics/hooks/use-product-viewed-analytics.js +0 -1
  13. package/analytics/replo-first-party-pixel.js +0 -1
  14. package/analytics/replo-pixel-script.js +0 -1
  15. package/analytics/sinks/converge-event-mapper.js +0 -1
  16. package/analytics/sinks/converge-sink.js +0 -1
  17. package/analytics/sinks/elevar-sink.js +0 -1
  18. package/analytics/sinks/ga4-sink.js +0 -4
  19. package/analytics/sinks/meta-sink.js +0 -4
  20. package/analytics/sinks/northbeam-sink.js +0 -1
  21. package/analytics/sinks/pinterest-sink.js +0 -4
  22. package/analytics/sinks/reddit-sink.js +0 -4
  23. package/analytics/sinks/replo-sink.js +0 -2
  24. package/analytics/sinks/snapchat-sink.js +0 -4
  25. package/analytics/sinks/tiktok-sink.js +0 -4
  26. package/analytics/sinks/window-sink.js +0 -3
  27. package/analytics/utils/analytics-utils.js +0 -1
  28. package/analytics/utils/navigation-tracker.js +0 -1
  29. package/analytics/utils/shopify-funnel-gate.js +0 -1
  30. package/cart/buy-now-action.js +0 -3
  31. package/cart/cart-actions.js +0 -1
  32. package/cart/cart-loader.js +0 -1
  33. package/cart/cart-provider.js +1 -2
  34. package/cart/cart-schema.js +0 -1
  35. package/cart/cart-types.js +0 -1
  36. package/cart/gateways/cart-constants.js +0 -2
  37. package/cart/gateways/cart-gateway.js +0 -1
  38. package/cart/gateways/cookie-cart-gateway.js +0 -5
  39. package/cart/gateways/default-cart-gateway.js +0 -1
  40. package/cart/gateways/resolver-cart-gateway.js +0 -5
  41. package/cart/gateways/stripe-cart-gateway.js +0 -1
  42. package/cart/hooks/use-add-to-cart.js +0 -4
  43. package/cart/hooks/use-buy-now.js +0 -1
  44. package/cart/return-urls.js +0 -1
  45. package/cart/storefront-urls.js +0 -1
  46. package/cart/utils/cart-adjustments.js +0 -1
  47. package/cart/utils/cart-analytics.js +0 -1
  48. package/cart/utils/cart-error.js +0 -1
  49. package/cart/utils/cart-utils.js +0 -1
  50. package/cart/utils/cookie-cart-persistence.js +0 -1
  51. package/cart/utils/variant-to-cart-line.js +0 -6
  52. package/chunk-7OPH5UFQ.mjs +0 -1
  53. package/chunk-AL3F36PH.mjs +5 -127
  54. package/chunk-EUQVEPSD.mjs +0 -1
  55. package/chunk-GV5FY7ZZ.mjs +0 -11
  56. package/chunk-UJCSKKID.mjs +0 -4
  57. package/chunk-VKO7P3ED.mjs +0 -2
  58. package/chunk-VPEVERWE.mjs +0 -1
  59. package/{chunk-5M7VU32I.mjs → chunk-YJQVNUW7.mjs} +1 -12
  60. package/consent/consent-action.js +0 -1
  61. package/consent/consent-actions.js +0 -1
  62. package/consent/consent-platform.js +0 -3
  63. package/consent/consent-store.js +0 -5
  64. package/consent/cookie.js +0 -1
  65. package/consent/inject-script-descriptors.js +0 -1
  66. package/consent/replo-scripts.js +0 -1
  67. package/consent/script-registration-store.js +0 -2
  68. package/consent/script-snippets.js +0 -7
  69. package/consent/types.js +0 -1
  70. package/consent/window-api.js +0 -1
  71. package/content.js +0 -1
  72. package/env.js +0 -1
  73. package/gateways/canopy-api.js +0 -10
  74. package/hooks/use-client-value.d.ts +1 -1
  75. package/hooks/use-client-value.js +0 -1
  76. package/hooks/use-formatted-price.js +0 -1
  77. package/lib/buildMetadata.js +3 -3
  78. package/lib/canopy-error.js +0 -1
  79. package/lib/external-navigation.d.ts +1 -1
  80. package/lib/external-navigation.js +0 -1
  81. package/lib/get-query-client.js +0 -1
  82. package/lib/integration-utils.js +0 -1
  83. package/lib/shopify-utils.js +0 -1
  84. package/lib/url-utils.js +0 -1
  85. package/loaders/collection-loader-args.js +0 -1
  86. package/loaders/collection-loader.js +0 -1
  87. package/loaders/collection-products-loader-args.js +0 -1
  88. package/loaders/collection-products-loader.js +0 -1
  89. package/loaders/contentful-entries-loader.js +0 -1
  90. package/loaders/contentful-entry-loader.js +0 -1
  91. package/loaders/invoke-loader-action.js +0 -1
  92. package/loaders/invoke-loader-server.js +0 -1
  93. package/loaders/invoke-loader.js +0 -1
  94. package/loaders/judgeme-review-aggregate-loader.js +0 -1
  95. package/loaders/judgeme-reviews-loader.js +0 -1
  96. package/loaders/levanta-product-loader.js +0 -1
  97. package/loaders/loader-error-boundary.d.ts +11 -2
  98. package/loaders/loader-error-boundary.js +52 -9
  99. package/loaders/loader-error-details.d.ts +2 -0
  100. package/loaders/loader-error-details.js +7 -0
  101. package/loaders/loader-keys.js +0 -1
  102. package/loaders/loader-schemas.js +0 -4
  103. package/loaders/loox-review-aggregate-loader.js +0 -1
  104. package/loaders/loox-reviews-loader.js +0 -1
  105. package/loaders/metaobject-loader.js +0 -1
  106. package/loaders/metaobjects-loader.js +0 -1
  107. package/loaders/okendo-review-aggregate-loader.js +0 -1
  108. package/loaders/okendo-reviews-loader.js +0 -1
  109. package/loaders/prefetch-loaders.js +0 -1
  110. package/loaders/preview-placeholder.js +0 -5
  111. package/loaders/product-loader-args.js +0 -1
  112. package/loaders/product-loader.js +0 -1
  113. package/loaders/rebuy-recommendations-loader.js +0 -1
  114. package/loaders/reviews-io-review-aggregate-loader.js +0 -1
  115. package/loaders/reviews-io-reviews-loader.js +0 -1
  116. package/loaders/smile-earning-rules-loader.js +0 -1
  117. package/loaders/smile-rewards-loader.js +0 -1
  118. package/loaders/smile-vip-tiers-loader.js +0 -1
  119. package/loaders/statsig-experiment-loader.js +0 -1
  120. package/loaders/yotpo-review-aggregate-loader.js +0 -1
  121. package/loaders/yotpo-reviews-loader.js +0 -1
  122. package/money.js +0 -1
  123. package/next/config.js +0 -18
  124. package/next/image-loader.js +6 -5
  125. package/next/open-next.js +0 -1
  126. package/orders/order-status-schema.js +0 -4
  127. package/orders/order-status.js +0 -3
  128. package/package.json +4 -4
  129. package/providers/query-provider.js +0 -1
  130. package/providers/replo-provider.js +4 -3
  131. package/routing/evaluate.js +0 -1
  132. package/routing/geo.js +0 -1
  133. package/routing/locale.js +0 -1
  134. package/routing/rules.js +0 -1
  135. package/analytics/analytics-provider.js.map +0 -7
  136. package/analytics/analytics-sink.js.map +0 -7
  137. package/analytics/get-analytics-sinks.js.map +0 -7
  138. package/analytics/hooks/use-product-viewed-analytics.js.map +0 -7
  139. package/analytics/replo-first-party-pixel.js.map +0 -7
  140. package/analytics/replo-pixel-script.js.map +0 -7
  141. package/analytics/sinks/converge-event-mapper.js.map +0 -7
  142. package/analytics/sinks/converge-sink.js.map +0 -7
  143. package/analytics/sinks/elevar-sink.js.map +0 -7
  144. package/analytics/sinks/ga4-sink.js.map +0 -7
  145. package/analytics/sinks/meta-sink.js.map +0 -7
  146. package/analytics/sinks/northbeam-sink.js.map +0 -7
  147. package/analytics/sinks/pinterest-sink.js.map +0 -7
  148. package/analytics/sinks/reddit-sink.js.map +0 -7
  149. package/analytics/sinks/replo-sink.js.map +0 -7
  150. package/analytics/sinks/snapchat-sink.js.map +0 -7
  151. package/analytics/sinks/tiktok-sink.js.map +0 -7
  152. package/analytics/sinks/window-sink.js.map +0 -7
  153. package/analytics/utils/analytics-utils.js.map +0 -7
  154. package/analytics/utils/navigation-tracker.js.map +0 -7
  155. package/analytics/utils/shopify-funnel-gate.js.map +0 -7
  156. package/cart/buy-now-action.js.map +0 -7
  157. package/cart/cart-actions.js.map +0 -7
  158. package/cart/cart-loader.js.map +0 -7
  159. package/cart/cart-provider.js.map +0 -7
  160. package/cart/cart-schema.js.map +0 -7
  161. package/cart/cart-types.js.map +0 -7
  162. package/cart/gateways/cart-constants.js.map +0 -7
  163. package/cart/gateways/cart-gateway.js.map +0 -7
  164. package/cart/gateways/cookie-cart-gateway.js.map +0 -7
  165. package/cart/gateways/default-cart-gateway.js.map +0 -7
  166. package/cart/gateways/resolver-cart-gateway.js.map +0 -7
  167. package/cart/gateways/stripe-cart-gateway.js.map +0 -7
  168. package/cart/hooks/use-add-to-cart.js.map +0 -7
  169. package/cart/hooks/use-buy-now.js.map +0 -7
  170. package/cart/return-urls.js.map +0 -7
  171. package/cart/storefront-urls.js.map +0 -7
  172. package/cart/utils/cart-adjustments.js.map +0 -7
  173. package/cart/utils/cart-analytics.js.map +0 -7
  174. package/cart/utils/cart-error.js.map +0 -7
  175. package/cart/utils/cart-utils.js.map +0 -7
  176. package/cart/utils/cookie-cart-persistence.js.map +0 -7
  177. package/cart/utils/variant-to-cart-line.js.map +0 -7
  178. package/consent/consent-action.js.map +0 -7
  179. package/consent/consent-actions.js.map +0 -7
  180. package/consent/consent-platform.js.map +0 -7
  181. package/consent/consent-store.js.map +0 -7
  182. package/consent/cookie.js.map +0 -7
  183. package/consent/inject-script-descriptors.js.map +0 -7
  184. package/consent/replo-scripts.js.map +0 -7
  185. package/consent/script-registration-store.js.map +0 -7
  186. package/consent/script-snippets.js.map +0 -7
  187. package/consent/types.js.map +0 -7
  188. package/consent/window-api.js.map +0 -7
  189. package/content.js.map +0 -7
  190. package/env.js.map +0 -7
  191. package/gateways/canopy-api.js.map +0 -7
  192. package/hooks/use-client-value.js.map +0 -7
  193. package/hooks/use-formatted-price.js.map +0 -7
  194. package/lib/buildMetadata.js.map +0 -7
  195. package/lib/canopy-error.js.map +0 -7
  196. package/lib/external-navigation.js.map +0 -7
  197. package/lib/get-query-client.js.map +0 -7
  198. package/lib/integration-utils.js.map +0 -7
  199. package/lib/shopify-utils.js.map +0 -7
  200. package/lib/url-utils.js.map +0 -7
  201. package/loaders/collection-loader-args.js.map +0 -7
  202. package/loaders/collection-loader.js.map +0 -7
  203. package/loaders/collection-products-loader-args.js.map +0 -7
  204. package/loaders/collection-products-loader.js.map +0 -7
  205. package/loaders/contentful-entries-loader.js.map +0 -7
  206. package/loaders/contentful-entry-loader.js.map +0 -7
  207. package/loaders/invoke-loader-action.js.map +0 -7
  208. package/loaders/invoke-loader-server.js.map +0 -7
  209. package/loaders/invoke-loader.js.map +0 -7
  210. package/loaders/judgeme-review-aggregate-loader.js.map +0 -7
  211. package/loaders/judgeme-reviews-loader.js.map +0 -7
  212. package/loaders/levanta-product-loader.js.map +0 -7
  213. package/loaders/loader-error-boundary.js.map +0 -7
  214. package/loaders/loader-keys.js.map +0 -7
  215. package/loaders/loader-schemas.js.map +0 -7
  216. package/loaders/loox-review-aggregate-loader.js.map +0 -7
  217. package/loaders/loox-reviews-loader.js.map +0 -7
  218. package/loaders/metaobject-loader.js.map +0 -7
  219. package/loaders/metaobjects-loader.js.map +0 -7
  220. package/loaders/okendo-review-aggregate-loader.js.map +0 -7
  221. package/loaders/okendo-reviews-loader.js.map +0 -7
  222. package/loaders/prefetch-loaders.js.map +0 -7
  223. package/loaders/preview-placeholder.js.map +0 -7
  224. package/loaders/product-loader-args.js.map +0 -7
  225. package/loaders/product-loader.js.map +0 -7
  226. package/loaders/rebuy-recommendations-loader.js.map +0 -7
  227. package/loaders/reviews-io-review-aggregate-loader.js.map +0 -7
  228. package/loaders/reviews-io-reviews-loader.js.map +0 -7
  229. package/loaders/smile-earning-rules-loader.js.map +0 -7
  230. package/loaders/smile-rewards-loader.js.map +0 -7
  231. package/loaders/smile-vip-tiers-loader.js.map +0 -7
  232. package/loaders/statsig-experiment-loader.js.map +0 -7
  233. package/loaders/yotpo-review-aggregate-loader.js.map +0 -7
  234. package/loaders/yotpo-reviews-loader.js.map +0 -7
  235. package/money.js.map +0 -7
  236. package/next/config.js.map +0 -7
  237. package/next/image-loader.js.map +0 -7
  238. package/next/open-next.js.map +0 -7
  239. package/orders/order-status-schema.js.map +0 -7
  240. package/orders/order-status.js.map +0 -7
  241. package/providers/query-provider.js.map +0 -7
  242. package/providers/replo-provider.js.map +0 -7
  243. package/routing/evaluate.js.map +0 -7
  244. package/routing/geo.js.map +0 -7
  245. package/routing/locale.js.map +0 -7
  246. package/routing/rules.js.map +0 -7
@@ -1,6 +1,5 @@
1
1
  import { z } from 'zod';
2
2
 
3
- // ../schemas/contentCollection.ts
4
3
  var CONTENT_MANIFEST_FILENAME = "content-manifest.generated.json";
5
4
  var CONTENT_DIRNAME = "content";
6
5
  var CONTENT_COLLECTION_SCHEMA_FILENAME = "_collection.json";
@@ -1,28 +1,22 @@
1
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObject.js
2
1
  function isObject(value) {
3
2
  var type = typeof value;
4
3
  return value != null && (type == "object" || type == "function");
5
4
  }
6
5
  var isObject_default = isObject;
7
6
 
8
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isArray.js
9
7
  var isArray = Array.isArray;
10
8
  var isArray_default = isArray;
11
9
 
12
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_freeGlobal.js
13
10
  var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
14
11
  var freeGlobal_default = freeGlobal;
15
12
 
16
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_root.js
17
13
  var freeSelf = typeof self == "object" && self && self.Object === Object && self;
18
14
  var root = freeGlobal_default || freeSelf || Function("return this")();
19
15
  var root_default = root;
20
16
 
21
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_Symbol.js
22
17
  var Symbol = root_default.Symbol;
23
18
  var Symbol_default = Symbol;
24
19
 
25
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_getRawTag.js
26
20
  var objectProto = Object.prototype;
27
21
  var hasOwnProperty = objectProto.hasOwnProperty;
28
22
  var nativeObjectToString = objectProto.toString;
@@ -46,7 +40,6 @@ function getRawTag(value) {
46
40
  }
47
41
  var getRawTag_default = getRawTag;
48
42
 
49
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_objectToString.js
50
43
  var objectProto2 = Object.prototype;
51
44
  var nativeObjectToString2 = objectProto2.toString;
52
45
  function objectToString(value) {
@@ -54,7 +47,6 @@ function objectToString(value) {
54
47
  }
55
48
  var objectToString_default = objectToString;
56
49
 
57
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/_baseGetTag.js
58
50
  var nullTag = "[object Null]";
59
51
  var undefinedTag = "[object Undefined]";
60
52
  var symToStringTag2 = Symbol_default ? Symbol_default.toStringTag : void 0;
@@ -66,20 +58,17 @@ function baseGetTag(value) {
66
58
  }
67
59
  var baseGetTag_default = baseGetTag;
68
60
 
69
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isObjectLike.js
70
61
  function isObjectLike(value) {
71
62
  return value != null && typeof value == "object";
72
63
  }
73
64
  var isObjectLike_default = isObjectLike;
74
65
 
75
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isNumber.js
76
66
  var numberTag = "[object Number]";
77
67
  function isNumber(value) {
78
68
  return typeof value == "number" || isObjectLike_default(value) && baseGetTag_default(value) == numberTag;
79
69
  }
80
70
  var isNumber_default = isNumber;
81
71
 
82
- // ../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/isString.js
83
72
  var stringTag = "[object String]";
84
73
  function isString(value) {
85
74
  return typeof value == "string" || !isArray_default(value) && isObjectLike_default(value) && baseGetTag_default(value) == stringTag;
@@ -16,10 +16,6 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
19
- // If the importer is in node compatibility mode or this is not an ESM
20
- // file that has been converted to a CommonJS file using a Babel-
21
- // compatible transform (i.e. "__esModule" has not been set), then set
22
- // "default" to the CommonJS "module.exports" for node compatibility.
23
19
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
24
20
  mod
25
21
  ));
@@ -1,4 +1,3 @@
1
- // ../replo-utils/lib/object.ts
2
1
  function omit(obj, keysToOmit) {
3
2
  const result = { ...obj };
4
3
  for (const key of keysToOmit) {
@@ -7,7 +6,6 @@ function omit(obj, keysToOmit) {
7
6
  return result;
8
7
  }
9
8
 
10
- // ../replo-utils/lib/json.ts
11
9
  function parseJsonOrNull(json) {
12
10
  try {
13
11
  return JSON.parse(json);
@@ -1,4 +1,3 @@
1
- // ../schemas/routing/match.ts
2
1
  function matchSource({
3
2
  source,
4
3
  pathname
@@ -1,7 +1,6 @@
1
1
  import { v4 } from 'uuid';
2
2
  import { z } from 'zod';
3
3
 
4
- // ../replo-utils/lib/crypto.ts
5
4
  function randomUUID() {
6
5
  return v4();
7
6
  }
@@ -33,7 +32,6 @@ var errorUserFacingDetailsMessageSchema = z.object({
33
32
  "billing.addPublishedElements",
34
33
  "billing.addShopifyThemeProject",
35
34
  "billing.addReploSite",
36
- // Agent Billing ONLY
37
35
  "agentBilling.shopifyThemeBuilder.publishedElements.exceeded",
38
36
  "agentBilling.shopifyThemeBuilder.projects.exceeded",
39
37
  "agentBilling.sites.exceeded",
@@ -42,10 +40,9 @@ var errorUserFacingDetailsMessageSchema = z.object({
42
40
  ]),
43
41
  message: z.string(),
44
42
  isRecoverable: z.boolean().optional(),
45
- // NOTE (Matt 2024-03-22): We support detail being an array of strings
46
- // in FullPageModal only.
47
43
  detail: z.array(z.string()).or(z.string()).optional(),
48
44
  key: z.string(),
45
+ details: z.record(z.string(), z.unknown()).optional(),
49
46
  usage: z.object({
50
47
  current: z.number(),
51
48
  maximum: z.number()
@@ -90,15 +87,7 @@ var errorUserFacingDetailsMessageSchema = z.object({
90
87
  ]).optional()
91
88
  }).describe("ErrorUserFacingDetailsWithMessage");
92
89
  z.discriminatedUnion("type", [
93
- /**
94
- * Normal errors, show error UI depending on the type
95
- */
96
90
  errorUserFacingDetailsMessageSchema,
97
- /**
98
- * Errors which should be ignored by the frontend. This is uncommon, usually
99
- * you want to show an error in the UI, and if you don't want to then you catch
100
- * the error in your route.
101
- */
102
91
  z.object({
103
92
  type: z.literal("uncommon_none"),
104
93
  key: z.string(),
@@ -22,4 +22,3 @@ function deriveConsentAction({
22
22
  export {
23
23
  deriveConsentAction
24
24
  };
25
- //# sourceMappingURL=consent-action.js.map
@@ -33,4 +33,3 @@ async function recordConsentAction(decision) {
33
33
  export {
34
34
  recordConsentAction
35
35
  };
36
- //# sourceMappingURL=consent-actions.js.map
@@ -16,8 +16,6 @@ function cookiebotPreset(identifier) {
16
16
  attributes: {
17
17
  id: "Cookiebot",
18
18
  "data-cbid": identifier
19
- // No data-blockingmode: uc.js only ever checks for "auto"; manual is
20
- // its coded default, so any other value (or absence) is identical.
21
19
  }
22
20
  }
23
21
  ],
@@ -220,4 +218,3 @@ export {
220
218
  setConsentPlatformReloadForTests,
221
219
  subscribeToConsentDelegation
222
220
  };
223
- //# sourceMappingURL=consent-platform.js.map
@@ -142,21 +142,18 @@ const consentStore = {
142
142
  listeners.delete(listener);
143
143
  };
144
144
  },
145
- /** Grant every consent category. */
146
145
  accept(options = {}) {
147
146
  commit({
148
147
  categories: GRANTED_CATEGORIES,
149
148
  policyVersion: options.policyVersion
150
149
  });
151
150
  },
152
- /** Deny every non-necessary category. */
153
151
  reject(options = {}) {
154
152
  commit({
155
153
  categories: DENIED_CATEGORIES,
156
154
  policyVersion: options.policyVersion
157
155
  });
158
156
  },
159
- /** Set a subset of categories, leaving the rest at their current value. */
160
157
  updateCategories({
161
158
  next,
162
159
  policyVersion
@@ -167,7 +164,6 @@ const consentStore = {
167
164
  policyVersion
168
165
  });
169
166
  },
170
- /** Test-only: reset cached state so the next read recomputes. */
171
167
  reset() {
172
168
  snapshot = null;
173
169
  }
@@ -209,4 +205,3 @@ export {
209
205
  isConsentAllowed,
210
206
  useConsent
211
207
  };
212
- //# sourceMappingURL=consent-store.js.map
package/consent/cookie.js CHANGED
@@ -79,4 +79,3 @@ export {
79
79
  parseConsentCookie,
80
80
  serializeConsentCookieValue
81
81
  };
82
- //# sourceMappingURL=cookie.js.map
@@ -48,4 +48,3 @@ function buildModuleShim(body) {
48
48
  export {
49
49
  injectScriptDescriptors
50
50
  };
51
- //# sourceMappingURL=inject-script-descriptors.js.map
@@ -155,4 +155,3 @@ export {
155
155
  InjectedScript,
156
156
  ReploScripts
157
157
  };
158
- //# sourceMappingURL=replo-scripts.js.map
@@ -35,7 +35,6 @@ const scriptRegistrationStore = {
35
35
  listeners.delete(listener);
36
36
  };
37
37
  },
38
- /** Test-only: clear the registry between cases. */
39
38
  reset() {
40
39
  registry.clear();
41
40
  listeners.clear();
@@ -62,4 +61,3 @@ export {
62
61
  unregisterScript,
63
62
  useRegisteredScripts
64
63
  };
65
- //# sourceMappingURL=script-registration-store.js.map
@@ -89,8 +89,6 @@ gtag('config', '${id}');`
89
89
  },
90
90
  Contentsquare: {
91
91
  defaultConsent: ["analytics"],
92
- // The UXA tag is a single async external script keyed by the 13-char tag id;
93
- // it bootstraps the Contentsquare `_uxa` queue itself once loaded.
94
92
  buildTags: (id) => [
95
93
  {
96
94
  kind: "external",
@@ -132,11 +130,7 @@ gtag('config', '${id}');`
132
130
  ]
133
131
  },
134
132
  Gorgias: {
135
- // Support chat stores the visitor's chat session, which is a functional
136
- // preference rather than analytics or ad tracking.
137
133
  defaultConsent: ["preferences"],
138
- // The id attribute matches Gorgias's official v3 install snippet; their
139
- // customization scripts and support tooling look the tag up by that id.
140
134
  buildTags: (id) => [
141
135
  {
142
136
  kind: "external",
@@ -159,4 +153,3 @@ export {
159
153
  buildScriptTags,
160
154
  defaultConsentFor
161
155
  };
162
- //# sourceMappingURL=script-snippets.js.map
package/consent/types.js CHANGED
@@ -1 +0,0 @@
1
- //# sourceMappingURL=types.js.map
@@ -73,4 +73,3 @@ export {
73
73
  CONSENT_CHANGE_EVENT,
74
74
  installConsentWindowApi
75
75
  };
76
- //# sourceMappingURL=window-api.js.map
package/content.js CHANGED
@@ -606,4 +606,3 @@ export {
606
606
  getContentSitemapEntries,
607
607
  getContentSitemapXml
608
608
  };
609
- //# sourceMappingURL=content.js.map
package/env.js CHANGED
@@ -39,4 +39,3 @@ const getEnv = async () => {
39
39
  export {
40
40
  getEnv
41
41
  };
42
- //# sourceMappingURL=env.js.map
@@ -129,12 +129,6 @@ If you're running locally, make sure the canopy-api cloudflare worker is running
129
129
  }
130
130
  return loaderInvokeResponseSchema.parse(await response.json());
131
131
  }
132
- /**
133
- * The catalog's current answer for a set of cookie-cart lines: per line,
134
- * the live price and how many units are actually purchasable. Used to
135
- * reconcile the client-persisted cart, which otherwise never re-reads the
136
- * catalog facts it snapshotted at add-to-cart time.
137
- */
138
132
  async reconcileCartLines({
139
133
  lines
140
134
  }) {
@@ -152,9 +146,6 @@ If you're running locally, make sure the canopy-api cloudflare worker is running
152
146
  }
153
147
  return reconcileCartLinesResponseSchema.parse(await response.json()).lines;
154
148
  }
155
- // ---------------------------------------------------------------------------
156
- // Cart operations (canopy-api-backed ExternalCart)
157
- // ---------------------------------------------------------------------------
158
149
  async _cartPost(path, body) {
159
150
  const env = await getEnv();
160
151
  const url = `${this.baseUrl}/api/v1/cart${path}`;
@@ -239,4 +230,3 @@ export {
239
230
  getCanopyApiGateway,
240
231
  shouldIncludeInactiveProducts
241
232
  };
242
- //# sourceMappingURL=canopy-api.js.map
@@ -1,5 +1,5 @@
1
1
  /**
2
- * NOTE (Max, 2025-09-15): This hook is to be used for values that aren't available on the server (such as window.location).
2
+ * This hook is to be used for values that aren't available on the server (such as window.location).
3
3
  *
4
4
  * This hook will use a dummy value both on the server & on hydration. Then,
5
5
  * after hydration, this useEffect will update the value to the actual value.
@@ -9,4 +9,3 @@ function useClientValue(readValue, initialValue) {
9
9
  export {
10
10
  useClientValue
11
11
  };
12
- //# sourceMappingURL=use-client-value.js.map
@@ -17,4 +17,3 @@ const useFormattedPrice = (price, currency) => {
17
17
  export {
18
18
  useFormattedPrice
19
19
  };
20
- //# sourceMappingURL=use-formatted-price.js.map
@@ -1,7 +1,7 @@
1
1
  export const BUILD_METADATA = {
2
2
  "packageName": "@replohq/sdk",
3
- "version": "1.7.1",
3
+ "version": "1.7.3",
4
4
  "branch": "HEAD",
5
- "commit": "02341f30e58f02e0d8482f829ff4346d95f3f3ec",
6
- "builtAt": "2026-09-11T19:49:03.840Z"
5
+ "commit": "d7ee0ec28234216b633c81e1a6d8683591c946f8",
6
+ "builtAt": "2026-09-15T17:30:06.396Z"
7
7
  };
@@ -21,4 +21,3 @@ class CanopyError extends Error {
21
21
  export {
22
22
  CanopyError
23
23
  };
24
- //# sourceMappingURL=canopy-error.js.map
@@ -1,5 +1,5 @@
1
1
  /**
2
- * NOTE (Max, 2026-08-26): A site can be hosted somewhere that owns outbound
2
+ * A site can be hosted somewhere that owns outbound
3
3
  * navigation. The Replo sandbox is the case that forces this: its preview runs
4
4
  * in an iframe that may not navigate away, and checkout providers refuse to be
5
5
  * framed, so the host opens the destination in a new tab instead. Sites that
@@ -10,4 +10,3 @@ export {
10
10
  EXTERNAL_NAVIGATION_HANDLER_KEY,
11
11
  navigateExternal
12
12
  };
13
- //# sourceMappingURL=external-navigation.js.map
@@ -31,4 +31,3 @@ function getQueryClient() {
31
31
  export {
32
32
  getQueryClient
33
33
  };
34
- //# sourceMappingURL=get-query-client.js.map
@@ -6,4 +6,3 @@ async function getCheckoutProvider() {
6
6
  export {
7
7
  getCheckoutProvider
8
8
  };
9
- //# sourceMappingURL=integration-utils.js.map
@@ -4,4 +4,3 @@ function convertLegacyResourceIdToGraphQLId(id, type) {
4
4
  export {
5
5
  convertLegacyResourceIdToGraphQLId
6
6
  };
7
- //# sourceMappingURL=shopify-utils.js.map
package/lib/url-utils.js CHANGED
@@ -5,4 +5,3 @@ function buildBaseUrl(apiHost) {
5
5
  export {
6
6
  buildBaseUrl
7
7
  };
8
- //# sourceMappingURL=url-utils.js.map
@@ -14,4 +14,3 @@ function buildCollectionLoaderArgs({
14
14
  export {
15
15
  buildCollectionLoaderArgs
16
16
  };
17
- //# sourceMappingURL=collection-loader-args.js.map
@@ -52,4 +52,3 @@ function CollectionLoader({
52
52
  export {
53
53
  CollectionLoader
54
54
  };
55
- //# sourceMappingURL=collection-loader.js.map
@@ -16,4 +16,3 @@ function buildCollectionProductsLoaderArgs({
16
16
  export {
17
17
  buildCollectionProductsLoaderArgs
18
18
  };
19
- //# sourceMappingURL=collection-products-loader-args.js.map
@@ -54,4 +54,3 @@ function CollectionProductsLoader({
54
54
  export {
55
55
  CollectionProductsLoader
56
56
  };
57
- //# sourceMappingURL=collection-products-loader.js.map
@@ -75,4 +75,3 @@ function ContentfulEntriesLoader({
75
75
  export {
76
76
  ContentfulEntriesLoader
77
77
  };
78
- //# sourceMappingURL=contentful-entries-loader.js.map
@@ -57,4 +57,3 @@ function ContentfulEntryLoader({
57
57
  export {
58
58
  ContentfulEntryLoader
59
59
  };
60
- //# sourceMappingURL=contentful-entry-loader.js.map
@@ -11,4 +11,3 @@ async function invokeLoaderAction({
11
11
  export {
12
12
  invokeLoaderAction
13
13
  };
14
- //# sourceMappingURL=invoke-loader-action.js.map
@@ -71,4 +71,3 @@ async function invokeLoaderServer({
71
71
  export {
72
72
  invokeLoaderServer
73
73
  };
74
- //# sourceMappingURL=invoke-loader-server.js.map
@@ -34,4 +34,3 @@ export {
34
34
  LoaderInvokeError,
35
35
  invokeLoader
36
36
  };
37
- //# sourceMappingURL=invoke-loader.js.map
@@ -47,4 +47,3 @@ function JudgemeReviewAggregateLoader({
47
47
  export {
48
48
  JudgemeReviewAggregateLoader
49
49
  };
50
- //# sourceMappingURL=judgeme-review-aggregate-loader.js.map
@@ -62,4 +62,3 @@ function JudgemeReviewsLoader({
62
62
  export {
63
63
  JudgemeReviewsLoader
64
64
  };
65
- //# sourceMappingURL=judgeme-reviews-loader.js.map
@@ -50,4 +50,3 @@ function LevantaProductLoader({
50
50
  export {
51
51
  LevantaProductLoader
52
52
  };
53
- //# sourceMappingURL=levanta-product-loader.js.map
@@ -2,24 +2,33 @@ import type { ReactNode } from "react";
2
2
  import * as React from "react";
3
3
  interface LoaderErrorBoundaryState {
4
4
  hasError: boolean;
5
+ error: unknown;
5
6
  resetKey: string;
6
7
  }
7
8
  type LoaderErrorBoundaryProps = React.PropsWithChildren<{
8
9
  fallback: ReactNode;
9
10
  resetKey: string;
10
11
  }>;
12
+ declare const LoaderErrorDetailsContext: React.Context<boolean>;
13
+ export declare function LoaderErrorDetailsProvider({ enabled, children, }: React.PropsWithChildren<{
14
+ enabled: boolean;
15
+ }>): import("react/jsx-runtime").JSX.Element;
11
16
  /**
12
17
  * Error boundary for loader components that renders the fallback instead of
13
18
  * crashing the page when a loader fails (e.g. product not published to the
14
19
  * Online Store sales channel, deleted collection, etc.).
15
20
  *
21
+ * On a local dev server it also renders the error beside the fallback.
22
+ *
16
23
  * When resetKey changes (e.g. navigating to a different product), the error
17
24
  * state is cleared so the new loader gets a chance to render.
18
25
  */
19
26
  export declare class LoaderErrorBoundary extends React.Component<LoaderErrorBoundaryProps, LoaderErrorBoundaryState> {
27
+ static contextType: React.Context<boolean>;
28
+ context: React.ContextType<typeof LoaderErrorDetailsContext>;
20
29
  state: LoaderErrorBoundaryState;
21
- static getDerivedStateFromError(): Partial<LoaderErrorBoundaryState>;
30
+ static getDerivedStateFromError(error: unknown): Partial<LoaderErrorBoundaryState>;
22
31
  static getDerivedStateFromProps(props: LoaderErrorBoundaryProps, state: LoaderErrorBoundaryState): Partial<LoaderErrorBoundaryState> | null;
23
- render(): ReactNode;
32
+ render(): string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
24
33
  }
25
34
  export {};
@@ -1,24 +1,67 @@
1
1
  "use client";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
2
3
  import * as React from "react";
4
+ const LoaderErrorDetailsContext = React.createContext(false);
5
+ function LoaderErrorDetailsProvider({
6
+ enabled,
7
+ children
8
+ }) {
9
+ return /* @__PURE__ */ jsx(LoaderErrorDetailsContext.Provider, { value: enabled, children });
10
+ }
11
+ function LoaderErrorDetails({ error }) {
12
+ return /* @__PURE__ */ jsxs(
13
+ "div",
14
+ {
15
+ role: "alert",
16
+ "data-replo-loader-error": "",
17
+ style: {
18
+ margin: "8px 0",
19
+ padding: "8px 12px",
20
+ border: "1px solid #dc2626",
21
+ borderRadius: 4,
22
+ background: "#fef2f2",
23
+ color: "#7f1d1d",
24
+ font: "12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace",
25
+ textAlign: "left"
26
+ },
27
+ children: [
28
+ /* @__PURE__ */ jsx("strong", { children: "Replo loader failed \u2014 rendering its fallback." }),
29
+ " Development only; production renders just the fallback.",
30
+ /* @__PURE__ */ jsx("pre", { style: { margin: "4px 0 0", whiteSpace: "pre-wrap" }, children: error instanceof Error ? error.message : String(error) })
31
+ ]
32
+ }
33
+ );
34
+ }
3
35
  class LoaderErrorBoundary extends React.Component {
4
- state = { hasError: false, resetKey: "" };
5
- static getDerivedStateFromError() {
6
- return { hasError: true };
36
+ static contextType = LoaderErrorDetailsContext;
37
+ state = {
38
+ hasError: false,
39
+ error: null,
40
+ resetKey: ""
41
+ };
42
+ static getDerivedStateFromError(error) {
43
+ return { hasError: true, error };
7
44
  }
8
45
  static getDerivedStateFromProps(props, state) {
9
46
  if (props.resetKey !== state.resetKey) {
10
- return { hasError: false, resetKey: props.resetKey };
47
+ return { hasError: false, error: null, resetKey: props.resetKey };
11
48
  }
12
49
  return null;
13
50
  }
14
51
  render() {
15
- if (this.state.hasError) {
16
- return this.props.fallback;
52
+ if (!this.state.hasError) {
53
+ return this.props.children;
54
+ }
55
+ if (process.env.NODE_ENV !== "production" && this.context) {
56
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
57
+ this.props.fallback,
58
+ /* @__PURE__ */ jsx(LoaderErrorDetails, { error: this.state.error })
59
+ ] });
17
60
  }
18
- return this.props.children;
61
+ return this.props.fallback;
19
62
  }
20
63
  }
21
64
  export {
22
- LoaderErrorBoundary
65
+ LoaderErrorBoundary,
66
+ LoaderErrorDetailsProvider
23
67
  };
24
- //# sourceMappingURL=loader-error-boundary.js.map
@@ -0,0 +1,2 @@
1
+ import "server-only";
2
+ export declare function shouldShowLoaderErrorDetails(): boolean;
@@ -0,0 +1,7 @@
1
+ import "server-only";
2
+ function shouldShowLoaderErrorDetails() {
3
+ return process.env.NODE_ENV === "development" && !process.env.IS_REPLO_SANDBOX;
4
+ }
5
+ export {
6
+ shouldShowLoaderErrorDetails
7
+ };
@@ -27,4 +27,3 @@ const DATA_LOADER_KEYS = {
27
27
  export {
28
28
  DATA_LOADER_KEYS
29
29
  };
30
- //# sourceMappingURL=loader-keys.js.map
@@ -120,9 +120,6 @@ const productSchema = z.object({
120
120
  description: z.string().nullish(),
121
121
  descriptionHtml: z.string().nullish(),
122
122
  availableForSale: z.boolean().optional(),
123
- // NOTE (Berkley, 2026-07-30): Admin-sourced status; Storefront loader data
124
- // never includes it. Kept in lockstep with `schemas/objectType` by the
125
- // drift-guard spec.
126
123
  status: z.enum(["ACTIVE", "DRAFT", "ARCHIVED", "UNLISTED"]).optional(),
127
124
  featuredImage: imageSchema.nullish(),
128
125
  options: z.array(productOptionSchema).optional(),
@@ -399,4 +396,3 @@ export {
399
396
  yotpoProductReviewsLoaderOutputSchema,
400
397
  yotpoReviewLoaderItemSchema
401
398
  };
402
- //# sourceMappingURL=loader-schemas.js.map
@@ -47,4 +47,3 @@ function LooxReviewAggregateLoader({
47
47
  export {
48
48
  LooxReviewAggregateLoader
49
49
  };
50
- //# sourceMappingURL=loox-review-aggregate-loader.js.map
@@ -47,4 +47,3 @@ function LooxReviewsLoader({
47
47
  export {
48
48
  LooxReviewsLoader
49
49
  };
50
- //# sourceMappingURL=loox-reviews-loader.js.map
@@ -51,4 +51,3 @@ function MetaobjectLoader({
51
51
  export {
52
52
  MetaobjectLoader
53
53
  };
54
- //# sourceMappingURL=metaobject-loader.js.map
@@ -57,4 +57,3 @@ function MetaobjectsLoader({
57
57
  export {
58
58
  MetaobjectsLoader
59
59
  };
60
- //# sourceMappingURL=metaobjects-loader.js.map