@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.
- package/_vendor/replo-utils/lib/string.d.ts +0 -2
- package/_vendor/schemas/errors.d.ts +2 -3
- package/_vendor/schemas/generated/errors.d.ts +3 -0
- package/_vendor/schemas/loaderKeys.mjs +0 -1
- package/_vendor/schemas/money.d.ts +1 -1
- package/_vendor/schemas/money.mjs +1 -7
- package/_vendor/schemas/routing/locale.mjs +1 -1
- package/_vendor/schemas/routing/rules.mjs +1 -2
- package/analytics/analytics-provider.js +0 -1
- package/analytics/analytics-sink.js +0 -1
- package/analytics/get-analytics-sinks.js +0 -1
- package/analytics/hooks/use-product-viewed-analytics.js +0 -1
- package/analytics/replo-first-party-pixel.js +0 -1
- package/analytics/replo-pixel-script.js +0 -1
- package/analytics/sinks/converge-event-mapper.js +0 -1
- package/analytics/sinks/converge-sink.js +0 -1
- package/analytics/sinks/elevar-sink.js +0 -1
- package/analytics/sinks/ga4-sink.js +0 -4
- package/analytics/sinks/meta-sink.js +0 -4
- package/analytics/sinks/northbeam-sink.js +0 -1
- package/analytics/sinks/pinterest-sink.js +0 -4
- package/analytics/sinks/reddit-sink.js +0 -4
- package/analytics/sinks/replo-sink.js +0 -2
- package/analytics/sinks/snapchat-sink.js +0 -4
- package/analytics/sinks/tiktok-sink.js +0 -4
- package/analytics/sinks/window-sink.js +0 -3
- package/analytics/utils/analytics-utils.js +0 -1
- package/analytics/utils/navigation-tracker.js +0 -1
- package/analytics/utils/shopify-funnel-gate.js +0 -1
- package/cart/buy-now-action.js +0 -3
- package/cart/cart-actions.js +0 -1
- package/cart/cart-loader.js +0 -1
- package/cart/cart-provider.js +1 -2
- package/cart/cart-schema.js +0 -1
- package/cart/cart-types.js +0 -1
- package/cart/gateways/cart-constants.js +0 -2
- package/cart/gateways/cart-gateway.js +0 -1
- package/cart/gateways/cookie-cart-gateway.js +0 -5
- package/cart/gateways/default-cart-gateway.js +0 -1
- package/cart/gateways/resolver-cart-gateway.js +0 -5
- package/cart/gateways/stripe-cart-gateway.js +0 -1
- package/cart/hooks/use-add-to-cart.js +0 -4
- package/cart/hooks/use-buy-now.js +0 -1
- package/cart/return-urls.js +0 -1
- package/cart/storefront-urls.js +0 -1
- package/cart/utils/cart-adjustments.js +0 -1
- package/cart/utils/cart-analytics.js +0 -1
- package/cart/utils/cart-error.js +0 -1
- package/cart/utils/cart-utils.js +0 -1
- package/cart/utils/cookie-cart-persistence.js +0 -1
- package/cart/utils/variant-to-cart-line.js +0 -6
- package/chunk-7OPH5UFQ.mjs +0 -1
- package/chunk-AL3F36PH.mjs +5 -127
- package/chunk-EUQVEPSD.mjs +0 -1
- package/chunk-GV5FY7ZZ.mjs +0 -11
- package/chunk-UJCSKKID.mjs +0 -4
- package/chunk-VKO7P3ED.mjs +0 -2
- package/chunk-VPEVERWE.mjs +0 -1
- package/{chunk-5M7VU32I.mjs → chunk-YJQVNUW7.mjs} +1 -12
- package/consent/consent-action.js +0 -1
- package/consent/consent-actions.js +0 -1
- package/consent/consent-platform.js +0 -3
- package/consent/consent-store.js +0 -5
- package/consent/cookie.js +0 -1
- package/consent/inject-script-descriptors.js +0 -1
- package/consent/replo-scripts.js +0 -1
- package/consent/script-registration-store.js +0 -2
- package/consent/script-snippets.js +0 -7
- package/consent/types.js +0 -1
- package/consent/window-api.js +0 -1
- package/content.js +0 -1
- package/env.js +0 -1
- package/gateways/canopy-api.js +0 -10
- package/hooks/use-client-value.d.ts +1 -1
- package/hooks/use-client-value.js +0 -1
- package/hooks/use-formatted-price.js +0 -1
- package/lib/buildMetadata.js +3 -3
- package/lib/canopy-error.js +0 -1
- package/lib/external-navigation.d.ts +1 -1
- package/lib/external-navigation.js +0 -1
- package/lib/get-query-client.js +0 -1
- package/lib/integration-utils.js +0 -1
- package/lib/shopify-utils.js +0 -1
- package/lib/url-utils.js +0 -1
- package/loaders/collection-loader-args.js +0 -1
- package/loaders/collection-loader.js +0 -1
- package/loaders/collection-products-loader-args.js +0 -1
- package/loaders/collection-products-loader.js +0 -1
- package/loaders/contentful-entries-loader.js +0 -1
- package/loaders/contentful-entry-loader.js +0 -1
- package/loaders/invoke-loader-action.js +0 -1
- package/loaders/invoke-loader-server.js +0 -1
- package/loaders/invoke-loader.js +0 -1
- package/loaders/judgeme-review-aggregate-loader.js +0 -1
- package/loaders/judgeme-reviews-loader.js +0 -1
- package/loaders/levanta-product-loader.js +0 -1
- package/loaders/loader-error-boundary.d.ts +11 -2
- package/loaders/loader-error-boundary.js +52 -9
- package/loaders/loader-error-details.d.ts +2 -0
- package/loaders/loader-error-details.js +7 -0
- package/loaders/loader-keys.js +0 -1
- package/loaders/loader-schemas.js +0 -4
- package/loaders/loox-review-aggregate-loader.js +0 -1
- package/loaders/loox-reviews-loader.js +0 -1
- package/loaders/metaobject-loader.js +0 -1
- package/loaders/metaobjects-loader.js +0 -1
- package/loaders/okendo-review-aggregate-loader.js +0 -1
- package/loaders/okendo-reviews-loader.js +0 -1
- package/loaders/prefetch-loaders.js +0 -1
- package/loaders/preview-placeholder.js +0 -5
- package/loaders/product-loader-args.js +0 -1
- package/loaders/product-loader.js +0 -1
- package/loaders/rebuy-recommendations-loader.js +0 -1
- package/loaders/reviews-io-review-aggregate-loader.js +0 -1
- package/loaders/reviews-io-reviews-loader.js +0 -1
- package/loaders/smile-earning-rules-loader.js +0 -1
- package/loaders/smile-rewards-loader.js +0 -1
- package/loaders/smile-vip-tiers-loader.js +0 -1
- package/loaders/statsig-experiment-loader.js +0 -1
- package/loaders/yotpo-review-aggregate-loader.js +0 -1
- package/loaders/yotpo-reviews-loader.js +0 -1
- package/money.js +0 -1
- package/next/config.js +0 -18
- package/next/image-loader.js +6 -5
- package/next/open-next.js +0 -1
- package/orders/order-status-schema.js +0 -4
- package/orders/order-status.js +0 -3
- package/package.json +4 -4
- package/providers/query-provider.js +0 -1
- package/providers/replo-provider.js +4 -3
- package/routing/evaluate.js +0 -1
- package/routing/geo.js +0 -1
- package/routing/locale.js +0 -1
- package/routing/rules.js +0 -1
- package/analytics/analytics-provider.js.map +0 -7
- package/analytics/analytics-sink.js.map +0 -7
- package/analytics/get-analytics-sinks.js.map +0 -7
- package/analytics/hooks/use-product-viewed-analytics.js.map +0 -7
- package/analytics/replo-first-party-pixel.js.map +0 -7
- package/analytics/replo-pixel-script.js.map +0 -7
- package/analytics/sinks/converge-event-mapper.js.map +0 -7
- package/analytics/sinks/converge-sink.js.map +0 -7
- package/analytics/sinks/elevar-sink.js.map +0 -7
- package/analytics/sinks/ga4-sink.js.map +0 -7
- package/analytics/sinks/meta-sink.js.map +0 -7
- package/analytics/sinks/northbeam-sink.js.map +0 -7
- package/analytics/sinks/pinterest-sink.js.map +0 -7
- package/analytics/sinks/reddit-sink.js.map +0 -7
- package/analytics/sinks/replo-sink.js.map +0 -7
- package/analytics/sinks/snapchat-sink.js.map +0 -7
- package/analytics/sinks/tiktok-sink.js.map +0 -7
- package/analytics/sinks/window-sink.js.map +0 -7
- package/analytics/utils/analytics-utils.js.map +0 -7
- package/analytics/utils/navigation-tracker.js.map +0 -7
- package/analytics/utils/shopify-funnel-gate.js.map +0 -7
- package/cart/buy-now-action.js.map +0 -7
- package/cart/cart-actions.js.map +0 -7
- package/cart/cart-loader.js.map +0 -7
- package/cart/cart-provider.js.map +0 -7
- package/cart/cart-schema.js.map +0 -7
- package/cart/cart-types.js.map +0 -7
- package/cart/gateways/cart-constants.js.map +0 -7
- package/cart/gateways/cart-gateway.js.map +0 -7
- package/cart/gateways/cookie-cart-gateway.js.map +0 -7
- package/cart/gateways/default-cart-gateway.js.map +0 -7
- package/cart/gateways/resolver-cart-gateway.js.map +0 -7
- package/cart/gateways/stripe-cart-gateway.js.map +0 -7
- package/cart/hooks/use-add-to-cart.js.map +0 -7
- package/cart/hooks/use-buy-now.js.map +0 -7
- package/cart/return-urls.js.map +0 -7
- package/cart/storefront-urls.js.map +0 -7
- package/cart/utils/cart-adjustments.js.map +0 -7
- package/cart/utils/cart-analytics.js.map +0 -7
- package/cart/utils/cart-error.js.map +0 -7
- package/cart/utils/cart-utils.js.map +0 -7
- package/cart/utils/cookie-cart-persistence.js.map +0 -7
- package/cart/utils/variant-to-cart-line.js.map +0 -7
- package/consent/consent-action.js.map +0 -7
- package/consent/consent-actions.js.map +0 -7
- package/consent/consent-platform.js.map +0 -7
- package/consent/consent-store.js.map +0 -7
- package/consent/cookie.js.map +0 -7
- package/consent/inject-script-descriptors.js.map +0 -7
- package/consent/replo-scripts.js.map +0 -7
- package/consent/script-registration-store.js.map +0 -7
- package/consent/script-snippets.js.map +0 -7
- package/consent/types.js.map +0 -7
- package/consent/window-api.js.map +0 -7
- package/content.js.map +0 -7
- package/env.js.map +0 -7
- package/gateways/canopy-api.js.map +0 -7
- package/hooks/use-client-value.js.map +0 -7
- package/hooks/use-formatted-price.js.map +0 -7
- package/lib/buildMetadata.js.map +0 -7
- package/lib/canopy-error.js.map +0 -7
- package/lib/external-navigation.js.map +0 -7
- package/lib/get-query-client.js.map +0 -7
- package/lib/integration-utils.js.map +0 -7
- package/lib/shopify-utils.js.map +0 -7
- package/lib/url-utils.js.map +0 -7
- package/loaders/collection-loader-args.js.map +0 -7
- package/loaders/collection-loader.js.map +0 -7
- package/loaders/collection-products-loader-args.js.map +0 -7
- package/loaders/collection-products-loader.js.map +0 -7
- package/loaders/contentful-entries-loader.js.map +0 -7
- package/loaders/contentful-entry-loader.js.map +0 -7
- package/loaders/invoke-loader-action.js.map +0 -7
- package/loaders/invoke-loader-server.js.map +0 -7
- package/loaders/invoke-loader.js.map +0 -7
- package/loaders/judgeme-review-aggregate-loader.js.map +0 -7
- package/loaders/judgeme-reviews-loader.js.map +0 -7
- package/loaders/levanta-product-loader.js.map +0 -7
- package/loaders/loader-error-boundary.js.map +0 -7
- package/loaders/loader-keys.js.map +0 -7
- package/loaders/loader-schemas.js.map +0 -7
- package/loaders/loox-review-aggregate-loader.js.map +0 -7
- package/loaders/loox-reviews-loader.js.map +0 -7
- package/loaders/metaobject-loader.js.map +0 -7
- package/loaders/metaobjects-loader.js.map +0 -7
- package/loaders/okendo-review-aggregate-loader.js.map +0 -7
- package/loaders/okendo-reviews-loader.js.map +0 -7
- package/loaders/prefetch-loaders.js.map +0 -7
- package/loaders/preview-placeholder.js.map +0 -7
- package/loaders/product-loader-args.js.map +0 -7
- package/loaders/product-loader.js.map +0 -7
- package/loaders/rebuy-recommendations-loader.js.map +0 -7
- package/loaders/reviews-io-review-aggregate-loader.js.map +0 -7
- package/loaders/reviews-io-reviews-loader.js.map +0 -7
- package/loaders/smile-earning-rules-loader.js.map +0 -7
- package/loaders/smile-rewards-loader.js.map +0 -7
- package/loaders/smile-vip-tiers-loader.js.map +0 -7
- package/loaders/statsig-experiment-loader.js.map +0 -7
- package/loaders/yotpo-review-aggregate-loader.js.map +0 -7
- package/loaders/yotpo-reviews-loader.js.map +0 -7
- package/money.js.map +0 -7
- package/next/config.js.map +0 -7
- package/next/image-loader.js.map +0 -7
- package/next/open-next.js.map +0 -7
- package/orders/order-status-schema.js.map +0 -7
- package/orders/order-status.js.map +0 -7
- package/providers/query-provider.js.map +0 -7
- package/providers/replo-provider.js.map +0 -7
- package/routing/evaluate.js.map +0 -7
- package/routing/geo.js.map +0 -7
- package/routing/locale.js.map +0 -7
- package/routing/rules.js.map +0 -7
|
@@ -4,8 +4,6 @@ export declare function metafieldContainsHtml(metafieldValue: string): boolean;
|
|
|
4
4
|
export declare function capitalizeFirstLetter(inputString: string): string;
|
|
5
5
|
/**
|
|
6
6
|
* Get url without query params.
|
|
7
|
-
*
|
|
8
|
-
* @author Kurt 2024-10-14
|
|
9
7
|
*/
|
|
10
8
|
export declare const getUrlWithoutQueryParams: (url: string) => string | undefined;
|
|
11
9
|
/**
|
|
@@ -186,9 +186,6 @@ export type ErrorDetails = {
|
|
|
186
186
|
* Map of error keys to custom user-facing details. Should ONLY be used
|
|
187
187
|
* in cases where we want to override the default behavior of ErrorUserFacingDetails
|
|
188
188
|
* from the backend.
|
|
189
|
-
*
|
|
190
|
-
* TODO (Noah, 2024-01-15): Clean up these custom configs, all of them
|
|
191
|
-
* are only used by Django (and 'base' can be moved directly into the reducer function)
|
|
192
189
|
*/
|
|
193
190
|
export declare const CUSTOM_ERROR_KEY_TO_PROPS: {
|
|
194
191
|
"shopifyArticle.failedToPublish": () => {
|
|
@@ -261,6 +258,7 @@ export declare const errorUserFacingDetailsMessageSchema: z.ZodObject<{
|
|
|
261
258
|
isRecoverable: z.ZodOptional<z.ZodBoolean>;
|
|
262
259
|
detail: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString>, z.ZodString]>>;
|
|
263
260
|
key: z.ZodString;
|
|
261
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
264
262
|
usage: z.ZodOptional<z.ZodObject<{
|
|
265
263
|
current: z.ZodNumber;
|
|
266
264
|
maximum: z.ZodNumber;
|
|
@@ -327,6 +325,7 @@ export declare const errorUserFacingDetailsSchema: z.ZodDiscriminatedUnion<[z.Zo
|
|
|
327
325
|
isRecoverable: z.ZodOptional<z.ZodBoolean>;
|
|
328
326
|
detail: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodString>, z.ZodString]>>;
|
|
329
327
|
key: z.ZodString;
|
|
328
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
330
329
|
usage: z.ZodOptional<z.ZodObject<{
|
|
331
330
|
current: z.ZodNumber;
|
|
332
331
|
maximum: z.ZodNumber;
|
|
@@ -15,7 +15,7 @@ export declare function fromMajorUnitsToMinorUnits({ amount, currencyCode, }: {
|
|
|
15
15
|
currencyCode: string;
|
|
16
16
|
}): number;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* safe companion to fromMajorUnitsToMinorUnits for
|
|
19
19
|
* possibly-blank or user/CSV/provider-entered decimal strings — returns null
|
|
20
20
|
* for blank or non-numeric input instead of throwing. Callers with a
|
|
21
21
|
* source-specific cleaning or validation policy sanitize first, then convert
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { ReploError } from '../../chunk-
|
|
1
|
+
import { ReploError } from '../../chunk-YJQVNUW7.mjs';
|
|
2
2
|
import '../../chunk-AL3F36PH.mjs';
|
|
3
3
|
import '../../chunk-GV5FY7ZZ.mjs';
|
|
4
4
|
import { __commonJS, __toESM } from '../../chunk-UJCSKKID.mjs';
|
|
5
5
|
import { z } from 'zod';
|
|
6
6
|
|
|
7
|
-
// ../../node_modules/.pnpm/first-match@0.0.1/node_modules/first-match/index.js
|
|
8
7
|
var require_first_match = __commonJS({
|
|
9
8
|
"../../node_modules/.pnpm/first-match@0.0.1/node_modules/first-match/index.js"(exports, module) {
|
|
10
9
|
function truthy(d) {
|
|
@@ -20,7 +19,6 @@ var require_first_match = __commonJS({
|
|
|
20
19
|
}
|
|
21
20
|
});
|
|
22
21
|
|
|
23
|
-
// ../../node_modules/.pnpm/nub@0.0.0/node_modules/nub/index.js
|
|
24
22
|
var require_nub = __commonJS({
|
|
25
23
|
"../../node_modules/.pnpm/nub@0.0.0/node_modules/nub/index.js"(exports, module) {
|
|
26
24
|
var nub = module.exports = function(xs, cmp) {
|
|
@@ -75,7 +73,6 @@ var require_nub = __commonJS({
|
|
|
75
73
|
}
|
|
76
74
|
});
|
|
77
75
|
|
|
78
|
-
// ../../node_modules/.pnpm/currency-codes@2.2.0/node_modules/currency-codes/data.js
|
|
79
76
|
var require_data = __commonJS({
|
|
80
77
|
"../../node_modules/.pnpm/currency-codes@2.2.0/node_modules/currency-codes/data.js"(exports, module) {
|
|
81
78
|
module.exports = [
|
|
@@ -1792,14 +1789,12 @@ var require_data = __commonJS({
|
|
|
1792
1789
|
}
|
|
1793
1790
|
});
|
|
1794
1791
|
|
|
1795
|
-
// ../../node_modules/.pnpm/currency-codes@2.2.0/node_modules/currency-codes/iso-4217-publish-date.js
|
|
1796
1792
|
var require_iso_4217_publish_date = __commonJS({
|
|
1797
1793
|
"../../node_modules/.pnpm/currency-codes@2.2.0/node_modules/currency-codes/iso-4217-publish-date.js"(exports, module) {
|
|
1798
1794
|
module.exports = "2024-06-25";
|
|
1799
1795
|
}
|
|
1800
1796
|
});
|
|
1801
1797
|
|
|
1802
|
-
// ../../node_modules/.pnpm/currency-codes@2.2.0/node_modules/currency-codes/index.js
|
|
1803
1798
|
var require_currency_codes = __commonJS({
|
|
1804
1799
|
"../../node_modules/.pnpm/currency-codes@2.2.0/node_modules/currency-codes/index.js"(exports) {
|
|
1805
1800
|
var first = require_first_match();
|
|
@@ -1859,7 +1854,6 @@ var require_currency_codes = __commonJS({
|
|
|
1859
1854
|
}
|
|
1860
1855
|
});
|
|
1861
1856
|
|
|
1862
|
-
// ../schemas/money.ts
|
|
1863
1857
|
var import_currency_codes = __toESM(require_currency_codes());
|
|
1864
1858
|
var InvalidAmountError = class extends ReploError {
|
|
1865
1859
|
};
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { getParamSegment, getRouteParams, hasRouteParam, matchSource } from '../../../chunk-VPEVERWE.mjs';
|
|
2
|
-
import { ReploError } from '../../../chunk-
|
|
2
|
+
import { ReploError } from '../../../chunk-YJQVNUW7.mjs';
|
|
3
3
|
import '../../../chunk-AL3F36PH.mjs';
|
|
4
4
|
import '../../../chunk-GV5FY7ZZ.mjs';
|
|
5
5
|
import '../../../chunk-UJCSKKID.mjs';
|
|
6
6
|
import { z } from 'zod';
|
|
7
7
|
|
|
8
|
-
// ../replo-utils/lib/url.ts
|
|
9
8
|
function parseUrl(value, base) {
|
|
10
9
|
try {
|
|
11
10
|
return new URL(value, base);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=analytics-sink.js.map
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { createEventQueue } from "../utils/analytics-utils";
|
|
2
2
|
class GA4Sink {
|
|
3
|
-
// oxlint-disable-next-line typescript/no-explicit-any -- legacy any, may or may not be needed
|
|
4
3
|
send;
|
|
5
4
|
constructor() {
|
|
6
5
|
this.send = createEventQueue(
|
|
7
|
-
// Legacy cast - may or may not be necessary
|
|
8
|
-
// oxlint-disable-next-line replo/no-as-cast, typescript/no-explicit-any -- legacy any/cast, may or may not be needed
|
|
9
6
|
() => typeof window !== "undefined" && Boolean(window.gtag),
|
|
10
7
|
(event, params) => {
|
|
11
8
|
const gtag = window.gtag;
|
|
@@ -57,4 +54,3 @@ class GA4Sink {
|
|
|
57
54
|
export {
|
|
58
55
|
GA4Sink
|
|
59
56
|
};
|
|
60
|
-
//# sourceMappingURL=ga4-sink.js.map
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { createEventQueue } from "../utils/analytics-utils";
|
|
2
2
|
class MetaSink {
|
|
3
|
-
// oxlint-disable-next-line typescript/no-explicit-any -- legacy any, may or may not be needed
|
|
4
3
|
track;
|
|
5
4
|
constructor() {
|
|
6
5
|
this.track = createEventQueue(
|
|
7
|
-
// Legacy cast - may or may not be necessary
|
|
8
|
-
// oxlint-disable-next-line replo/no-as-cast, typescript/no-explicit-any -- legacy any/cast, may or may not be needed
|
|
9
6
|
() => typeof window !== "undefined" && Boolean(window.fbq),
|
|
10
7
|
(event, params) => {
|
|
11
8
|
const fbq = window.fbq;
|
|
@@ -53,4 +50,3 @@ class MetaSink {
|
|
|
53
50
|
export {
|
|
54
51
|
MetaSink
|
|
55
52
|
};
|
|
56
|
-
//# sourceMappingURL=meta-sink.js.map
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { createEventQueue } from "../utils/analytics-utils";
|
|
2
2
|
class PinterestSink {
|
|
3
|
-
// oxlint-disable-next-line typescript/no-explicit-any -- legacy any, may or may not be needed
|
|
4
3
|
track;
|
|
5
4
|
constructor() {
|
|
6
5
|
this.track = createEventQueue(
|
|
7
|
-
// Legacy cast - may or may not be necessary
|
|
8
|
-
// oxlint-disable-next-line replo/no-as-cast, typescript/no-explicit-any -- legacy any/cast, may or may not be needed
|
|
9
6
|
() => typeof window !== "undefined" && Boolean(window.pintrk),
|
|
10
7
|
(event, params) => {
|
|
11
8
|
const pintrk = window.pintrk;
|
|
@@ -73,4 +70,3 @@ class PinterestSink {
|
|
|
73
70
|
export {
|
|
74
71
|
PinterestSink
|
|
75
72
|
};
|
|
76
|
-
//# sourceMappingURL=pinterest-sink.js.map
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { createEventQueue } from "../utils/analytics-utils";
|
|
2
2
|
class RedditSink {
|
|
3
|
-
// oxlint-disable-next-line typescript/no-explicit-any -- legacy any, may or may not be needed
|
|
4
3
|
track;
|
|
5
4
|
constructor() {
|
|
6
5
|
this.track = createEventQueue(
|
|
7
|
-
// Legacy cast - may or may not be necessary
|
|
8
|
-
// oxlint-disable-next-line replo/no-as-cast, typescript/no-explicit-any -- legacy any/cast, may or may not be needed
|
|
9
6
|
() => typeof window !== "undefined" && Boolean(window.rdt),
|
|
10
7
|
(event, params) => {
|
|
11
8
|
const rdt = window.rdt;
|
|
@@ -77,4 +74,3 @@ class RedditSink {
|
|
|
77
74
|
export {
|
|
78
75
|
RedditSink
|
|
79
76
|
};
|
|
80
|
-
//# sourceMappingURL=reddit-sink.js.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { createMethodQueue } from "../utils/analytics-utils";
|
|
2
2
|
class ReploSink {
|
|
3
|
-
// oxlint-disable-next-line typescript/no-explicit-any -- legacy any, may or may not be needed
|
|
4
3
|
forward;
|
|
5
4
|
constructor() {
|
|
6
5
|
this.forward = createMethodQueue(
|
|
@@ -54,4 +53,3 @@ class ReploSink {
|
|
|
54
53
|
export {
|
|
55
54
|
ReploSink
|
|
56
55
|
};
|
|
57
|
-
//# sourceMappingURL=replo-sink.js.map
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { createEventQueue } from "../utils/analytics-utils";
|
|
2
2
|
class SnapchatSink {
|
|
3
|
-
// oxlint-disable-next-line typescript/no-explicit-any -- legacy any, may or may not be needed
|
|
4
3
|
track;
|
|
5
4
|
constructor() {
|
|
6
5
|
this.track = createEventQueue(
|
|
7
|
-
// Legacy cast - may or may not be necessary
|
|
8
|
-
// oxlint-disable-next-line replo/no-as-cast, typescript/no-explicit-any -- legacy any/cast, may or may not be needed
|
|
9
6
|
() => typeof window !== "undefined" && Boolean(window.snaptr),
|
|
10
7
|
(event, params) => {
|
|
11
8
|
const snaptr = window.snaptr;
|
|
@@ -64,4 +61,3 @@ class SnapchatSink {
|
|
|
64
61
|
export {
|
|
65
62
|
SnapchatSink
|
|
66
63
|
};
|
|
67
|
-
//# sourceMappingURL=snapchat-sink.js.map
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { createEventQueue } from "../utils/analytics-utils";
|
|
2
2
|
class TikTokSink {
|
|
3
|
-
// oxlint-disable-next-line typescript/no-explicit-any -- legacy any, may or may not be needed
|
|
4
3
|
track;
|
|
5
4
|
constructor() {
|
|
6
5
|
this.track = createEventQueue(
|
|
7
|
-
// Legacy cast - may or may not be necessary
|
|
8
|
-
// oxlint-disable-next-line replo/no-as-cast, typescript/no-explicit-any -- legacy any/cast, may or may not be needed
|
|
9
6
|
() => typeof window !== "undefined" && Boolean(window.ttq),
|
|
10
7
|
(event, params) => {
|
|
11
8
|
const ttq = window.ttq;
|
|
@@ -76,4 +73,3 @@ class TikTokSink {
|
|
|
76
73
|
export {
|
|
77
74
|
TikTokSink
|
|
78
75
|
};
|
|
79
|
-
//# sourceMappingURL=tiktok-sink.js.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
class WindowSink {
|
|
2
|
-
// oxlint-disable-next-line typescript/no-explicit-any -- legacy any, may or may not be needed
|
|
3
2
|
dispatch(eventType, payload) {
|
|
4
3
|
window.dispatchEvent(
|
|
5
4
|
new CustomEvent("replo:analytics", {
|
|
@@ -11,7 +10,6 @@ class WindowSink {
|
|
|
11
10
|
})
|
|
12
11
|
);
|
|
13
12
|
}
|
|
14
|
-
// oxlint-disable-next-line typescript/no-explicit-any -- legacy any, may or may not be needed
|
|
15
13
|
async pageView(payload) {
|
|
16
14
|
this.dispatch("page_viewed", payload);
|
|
17
15
|
}
|
|
@@ -43,4 +41,3 @@ class WindowSink {
|
|
|
43
41
|
export {
|
|
44
42
|
WindowSink
|
|
45
43
|
};
|
|
46
|
-
//# sourceMappingURL=window-sink.js.map
|
package/cart/buy-now-action.js
CHANGED
|
@@ -59,8 +59,6 @@ async function buyNowWithRecoveryAction(input) {
|
|
|
59
59
|
properties: line.properties
|
|
60
60
|
})),
|
|
61
61
|
projectId: env.PROJECT_ID,
|
|
62
|
-
// canopy appends session_id={CHECKOUT_SESSION_ID} at session creation;
|
|
63
|
-
// the success route resolves it into the order status page.
|
|
64
62
|
successUrl: `${origin}/checkout/success`,
|
|
65
63
|
cancelUrl
|
|
66
64
|
};
|
|
@@ -131,4 +129,3 @@ export {
|
|
|
131
129
|
buyNowAction,
|
|
132
130
|
buyNowWithRecoveryAction
|
|
133
131
|
};
|
|
134
|
-
//# sourceMappingURL=buy-now-action.js.map
|
package/cart/cart-actions.js
CHANGED
package/cart/cart-loader.js
CHANGED
package/cart/cart-provider.js
CHANGED
|
@@ -43,7 +43,7 @@ function addLineToCart({
|
|
|
43
43
|
lineId
|
|
44
44
|
}) {
|
|
45
45
|
const existingLineIndex = cart.lines.findIndex((existingLine) => {
|
|
46
|
-
return existingLine.merchandise?.id === line.id &&
|
|
46
|
+
return existingLine.merchandise?.id === line.id &&
|
|
47
47
|
(line.sellingPlanId ?? null) === (existingLine.sellingPlanAllocation?.sellingPlan.id ?? null);
|
|
48
48
|
});
|
|
49
49
|
if (existingLineIndex >= 0) {
|
|
@@ -470,4 +470,3 @@ export {
|
|
|
470
470
|
useCart,
|
|
471
471
|
useCartInternal
|
|
472
472
|
};
|
|
473
|
-
//# sourceMappingURL=cart-provider.js.map
|
package/cart/cart-schema.js
CHANGED
package/cart/cart-types.js
CHANGED
|
@@ -2,7 +2,6 @@ const REPLO_CART_COOKIE_NAME = "replo_cart_v2";
|
|
|
2
2
|
function getCartCookieOptions() {
|
|
3
3
|
const sharedOptions = {
|
|
4
4
|
maxAge: 60 * 60 * 24 * 30,
|
|
5
|
-
// 30 days
|
|
6
5
|
httpOnly: true,
|
|
7
6
|
path: "/"
|
|
8
7
|
};
|
|
@@ -24,4 +23,3 @@ export {
|
|
|
24
23
|
REPLO_CART_COOKIE_NAME,
|
|
25
24
|
getCartCookieOptions
|
|
26
25
|
};
|
|
27
|
-
//# sourceMappingURL=cart-constants.js.map
|
|
@@ -8,8 +8,6 @@ import {
|
|
|
8
8
|
updateCartLineItemWithPersistence
|
|
9
9
|
} from "../utils/cookie-cart-persistence";
|
|
10
10
|
class CookieBasedCartGateway {
|
|
11
|
-
// Fails open (null) when the catalog can't answer: a canopy blip must not
|
|
12
|
-
// block cart writes — checkout still enforces stock and price.
|
|
13
11
|
async fetchReconciledLines(cart) {
|
|
14
12
|
const reconcileLines = this.config.reconcileLines;
|
|
15
13
|
if (!reconcileLines) {
|
|
@@ -31,8 +29,6 @@ class CookieBasedCartGateway {
|
|
|
31
29
|
return null;
|
|
32
30
|
}
|
|
33
31
|
}
|
|
34
|
-
// Catalog fetch failures fail open inside fetchReconciledLines; a
|
|
35
|
-
// reconciliation mismatch from the apply still throws.
|
|
36
32
|
async reconcile(cart, { clampQuantities }) {
|
|
37
33
|
const reconciledLines = await this.fetchReconciledLines(cart);
|
|
38
34
|
if (!reconciledLines) {
|
|
@@ -157,4 +153,3 @@ class CookieBasedCartGateway {
|
|
|
157
153
|
export {
|
|
158
154
|
CookieBasedCartGateway
|
|
159
155
|
};
|
|
160
|
-
//# sourceMappingURL=cookie-cart-gateway.js.map
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
"use server";
|
|
2
2
|
import { getCanopyApiGateway } from "../../gateways/canopy-api";
|
|
3
3
|
class ResolverCartGateway {
|
|
4
|
-
// Shopify carts are fetched from Shopify on every read — already reconciled.
|
|
5
4
|
async reconcileStoredCart(cart) {
|
|
6
5
|
return cart;
|
|
7
6
|
}
|
|
8
|
-
// Returns the gateway's wire-parsed Cart where the client Cart is expected.
|
|
9
|
-
// Safe because client = wire + widenings only — enforced by the widening
|
|
10
|
-
// assertions in cart-schema.spec.ts.
|
|
11
7
|
async getCart(cartId) {
|
|
12
8
|
try {
|
|
13
9
|
const gateway = await getCanopyApiGateway();
|
|
@@ -110,4 +106,3 @@ async function createResolverCartGateway() {
|
|
|
110
106
|
export {
|
|
111
107
|
createResolverCartGateway
|
|
112
108
|
};
|
|
113
|
-
//# sourceMappingURL=resolver-cart-gateway.js.map
|
|
@@ -36,9 +36,6 @@ function getMerchandiseFromProduct({
|
|
|
36
36
|
sellingPlanGroups: product.sellingPlanGroups ?? []
|
|
37
37
|
},
|
|
38
38
|
title: matchingVariant.title ?? "",
|
|
39
|
-
// NOTE (Max, 2026-08-03): loader prices are decimal MoneyV2 strings, but the
|
|
40
|
-
// cart is integer minor units, so convert at this storefront→cart boundary —
|
|
41
|
-
// a raw parseFloat would store "19.99" as 19 minor units (~100× too cheap).
|
|
42
39
|
price: matchingVariant.price ? fromMajorUnitsToMinorUnits(matchingVariant.price) : 0,
|
|
43
40
|
compareAtPrice: matchingVariant.compareAtPrice ? fromMajorUnitsToMinorUnits(matchingVariant.compareAtPrice) : null,
|
|
44
41
|
image: image ? { url: image.url, altText: image.altText } : null,
|
|
@@ -128,4 +125,3 @@ export {
|
|
|
128
125
|
findMerchandiseInQueryCache,
|
|
129
126
|
useAddToCart
|
|
130
127
|
};
|
|
131
|
-
//# sourceMappingURL=use-add-to-cart.js.map
|
package/cart/return-urls.js
CHANGED
package/cart/storefront-urls.js
CHANGED
package/cart/utils/cart-error.js
CHANGED
package/cart/utils/cart-utils.js
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import { fromMajorUnitsToMinorUnits } from "../../_vendor/schemas/money.mjs";
|
|
2
2
|
function applyPriceAdjustment(variantPrice, adjustment, currencyCode) {
|
|
3
3
|
switch (adjustment.valueType) {
|
|
4
|
-
// NOTE (Max, 2026-08-03): variantPrice is integer minor units, but the
|
|
5
|
-
// loader emits money-typed adjustments as decimal major units (its
|
|
6
|
-
// storefront contract), so the price/fixedAmount arms convert here at the
|
|
7
|
-
// cart boundary. Percentage is unitless and needs no conversion.
|
|
8
4
|
case "price":
|
|
9
5
|
return fromMajorUnitsToMinorUnits({
|
|
10
6
|
amount: adjustment.value,
|
|
@@ -89,7 +85,6 @@ function getCartLineSubscriptionInfo(cartLine) {
|
|
|
89
85
|
isSubscription: true,
|
|
90
86
|
frequency: cartLine.sellingPlanAllocation.sellingPlan.name,
|
|
91
87
|
discount: 0,
|
|
92
|
-
// Shopify calculates this from price adjustments when available
|
|
93
88
|
sellingPlan: cartLine.sellingPlanAllocation.sellingPlan
|
|
94
89
|
};
|
|
95
90
|
}
|
|
@@ -159,4 +154,3 @@ export {
|
|
|
159
154
|
getCartLineSpecialInfo,
|
|
160
155
|
getCartLineSubscriptionInfo
|
|
161
156
|
};
|
|
162
|
-
//# sourceMappingURL=variant-to-cart-line.js.map
|
package/chunk-7OPH5UFQ.mjs
CHANGED
|
@@ -138,7 +138,6 @@ function convertLegacyContentEntryDocument(raw) {
|
|
|
138
138
|
return { legacyStatus: null, content: raw };
|
|
139
139
|
}
|
|
140
140
|
return {
|
|
141
|
-
// An unrecognized status value publishes nothing rather than guessing.
|
|
142
141
|
legacyStatus: LEGACY_CONTENT_ENTRY_STATUSES.find((candidate) => candidate === status) ?? "draft",
|
|
143
142
|
content: serializeContentEntryDocument({
|
|
144
143
|
values,
|