@replohq/sdk 1.9.5 → 1.10.1
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/schemas/errors.d.ts +7 -0
- package/_vendor/schemas/loaderKeys.mjs +1 -0
- package/_vendor/schemas/money.mjs +1 -1
- package/_vendor/schemas/routing/locale.mjs +1 -1
- package/_vendor/schemas/routing/rules.mjs +1 -1
- package/analytics/analytics-provider.js +1 -37
- package/analytics/combine-sinks.d.ts +2 -0
- package/analytics/combine-sinks.js +38 -0
- package/analytics/utils/analytics-log.d.ts +20 -0
- package/analytics/utils/analytics-log.js +6 -0
- package/analytics/utils/analytics-products.js +1 -2
- package/analytics/utils/analytics-utils.js +9 -11
- package/cart/cart-loader.js +1 -1
- package/cart/gateways/cart-constants.js +1 -1
- package/cart/hooks/use-buy-now.d.ts +3 -0
- package/cart/hooks/use-buy-now.js +1 -1
- package/content.js +2 -2
- package/env.js +1 -1
- package/gateways/canopy-api.js +2 -2
- package/lib/buildMetadata.js +3 -3
- package/loaders/kaching-bundles-loader.d.ts +23 -0
- package/loaders/kaching-bundles-loader.js +75 -0
- package/loaders/loader-error-boundary.js +2 -2
- package/loaders/loader-error-details.js +1 -1
- package/loaders/loader-keys.d.ts +1 -0
- package/loaders/loader-keys.js +1 -0
- package/loaders/loader-schemas.d.ts +4 -0
- package/loaders/loader-schemas.js +4 -0
- package/loaders/preview-placeholder.js +1 -1
- package/next/image-loader.js +1 -1
- package/package.json +9 -4
- /package/{chunk-YJQVNUW7.mjs → chunk-Y3AYABMK.mjs} +0 -0
|
@@ -120,6 +120,13 @@ export declare class Uncommon_GloballyMappedError extends ReploError {
|
|
|
120
120
|
userFacingDetails: ErrorUserFacingDetails;
|
|
121
121
|
});
|
|
122
122
|
}
|
|
123
|
+
/**
|
|
124
|
+
* The `userFacingDetails.key` publisher puts on its 404 for a missing project.
|
|
125
|
+
* It lives here rather than next to the error class because a caller across a
|
|
126
|
+
* service boundary (airlock) matches on it to tell "this project is gone" apart
|
|
127
|
+
* from any other 404 that URL could produce.
|
|
128
|
+
*/
|
|
129
|
+
export declare const PROJECT_NOT_FOUND_ERROR_KEY = "errors.project.notFound";
|
|
123
130
|
export declare class ReploValidationError extends ReploError {
|
|
124
131
|
constructor(message: string);
|
|
125
132
|
}
|
|
@@ -6,6 +6,7 @@ var DATA_LOADER_KEYS = {
|
|
|
6
6
|
SHOPIFY_COLLECTION_PRODUCTS: "shopify_storefront.collection_products",
|
|
7
7
|
SHOPIFY_METAOBJECT: "shopify_storefront.metaobject",
|
|
8
8
|
SHOPIFY_METAOBJECTS: "shopify_storefront.metaobjects",
|
|
9
|
+
SHOPIFY_KACHING_BUNDLES: "shopify_storefront.kaching_bundles",
|
|
9
10
|
REPLO_PRODUCT: "replo_products.product",
|
|
10
11
|
OKENDO_PRODUCT_REVIEWS: "okendo.product_reviews",
|
|
11
12
|
OKENDO_PRODUCT_REVIEW_AGGREGATE: "okendo.product_review_aggregate",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getParamSegment, getRouteParams, hasRouteParam, matchSource } from '../../../chunk-VPEVERWE.mjs';
|
|
2
|
-
import { ReploError } from '../../../chunk-
|
|
2
|
+
import { ReploError } from '../../../chunk-Y3AYABMK.mjs';
|
|
3
3
|
import '../../../chunk-ZKAX2FW3.mjs';
|
|
4
4
|
import '../../../chunk-EUIVDITZ.mjs';
|
|
5
5
|
import '../../../chunk-SSBIMQES.mjs';
|
|
@@ -3,45 +3,9 @@ import { jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { createContext, useContext, useEffect, useMemo, useRef } from "react";
|
|
4
4
|
import { useConsent } from "../consent/consent-store";
|
|
5
5
|
import { useRegisteredScripts } from "../consent/script-registration-store";
|
|
6
|
+
import { combineSinks } from "./combine-sinks";
|
|
6
7
|
import { getAnalyticsSinks } from "./get-analytics-sinks";
|
|
7
8
|
import { NavigationTracker } from "./utils/navigation-tracker";
|
|
8
|
-
function combineSinks(sinks) {
|
|
9
|
-
const broadcast = async (method, ...args) => {
|
|
10
|
-
if (typeof window !== "undefined") {
|
|
11
|
-
console.debug(
|
|
12
|
-
"[analytics] broadcast",
|
|
13
|
-
method,
|
|
14
|
-
"to",
|
|
15
|
-
sinks.length,
|
|
16
|
-
"sinks",
|
|
17
|
-
{ args }
|
|
18
|
-
);
|
|
19
|
-
}
|
|
20
|
-
await Promise.all(
|
|
21
|
-
sinks.map(async (sink) => {
|
|
22
|
-
try {
|
|
23
|
-
const sinkMethod = sink[method];
|
|
24
|
-
await sinkMethod.apply(sink, args);
|
|
25
|
-
} catch {
|
|
26
|
-
if (typeof window !== "undefined") {
|
|
27
|
-
console.warn("[analytics] sink error", { method, sink });
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
})
|
|
31
|
-
);
|
|
32
|
-
};
|
|
33
|
-
return {
|
|
34
|
-
pageView: (...args) => broadcast("pageView", ...args),
|
|
35
|
-
purchase: (...args) => broadcast("purchase", ...args),
|
|
36
|
-
click: (...args) => broadcast("click", ...args),
|
|
37
|
-
productViewed: (...args) => broadcast("productViewed", ...args),
|
|
38
|
-
addToCart: (...args) => broadcast("addToCart", ...args),
|
|
39
|
-
removeFromCart: (...args) => broadcast("removeFromCart", ...args),
|
|
40
|
-
viewCart: (...args) => broadcast("viewCart", ...args),
|
|
41
|
-
startCheckout: (...args) => broadcast("startCheckout", ...args),
|
|
42
|
-
viewCollection: (...args) => broadcast("viewCollection", ...args)
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
9
|
const AnalyticsContext = createContext(null);
|
|
46
10
|
function AnalyticsProvider({
|
|
47
11
|
children,
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { logAnalyticsActivity } from "./utils/analytics-log";
|
|
2
|
+
function combineSinks(sinks) {
|
|
3
|
+
const broadcast = async (method, ...args) => {
|
|
4
|
+
if (typeof window !== "undefined") {
|
|
5
|
+
logAnalyticsActivity({
|
|
6
|
+
kind: "broadcast",
|
|
7
|
+
method,
|
|
8
|
+
sinkCount: sinks.length
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
await Promise.all(
|
|
12
|
+
sinks.map(async (sink) => {
|
|
13
|
+
try {
|
|
14
|
+
const sinkMethod = sink[method];
|
|
15
|
+
await sinkMethod.apply(sink, args);
|
|
16
|
+
} catch {
|
|
17
|
+
if (typeof window !== "undefined") {
|
|
18
|
+
console.warn("[analytics] sink error", { method });
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
})
|
|
22
|
+
);
|
|
23
|
+
};
|
|
24
|
+
return {
|
|
25
|
+
pageView: (...args) => broadcast("pageView", ...args),
|
|
26
|
+
purchase: (...args) => broadcast("purchase", ...args),
|
|
27
|
+
click: (...args) => broadcast("click", ...args),
|
|
28
|
+
productViewed: (...args) => broadcast("productViewed", ...args),
|
|
29
|
+
addToCart: (...args) => broadcast("addToCart", ...args),
|
|
30
|
+
removeFromCart: (...args) => broadcast("removeFromCart", ...args),
|
|
31
|
+
viewCart: (...args) => broadcast("viewCart", ...args),
|
|
32
|
+
startCheckout: (...args) => broadcast("startCheckout", ...args),
|
|
33
|
+
viewCollection: (...args) => broadcast("viewCollection", ...args)
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export {
|
|
37
|
+
combineSinks
|
|
38
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
type AnalyticsActivity = {
|
|
2
|
+
kind: "broadcast";
|
|
3
|
+
method: string;
|
|
4
|
+
sinkCount: number;
|
|
5
|
+
} | {
|
|
6
|
+
kind: "flush";
|
|
7
|
+
eventCount: number;
|
|
8
|
+
queueName: string;
|
|
9
|
+
} | {
|
|
10
|
+
kind: "queueTimeout";
|
|
11
|
+
queueName: string;
|
|
12
|
+
} | {
|
|
13
|
+
kind: "drop";
|
|
14
|
+
queueName: string;
|
|
15
|
+
} | {
|
|
16
|
+
kind: "methodQueueTimeout";
|
|
17
|
+
queueName: string;
|
|
18
|
+
};
|
|
19
|
+
export declare function logAnalyticsActivity(activity: AnalyticsActivity): void;
|
|
20
|
+
export {};
|
|
@@ -31,8 +31,7 @@ function splitCollectionProducts(data) {
|
|
|
31
31
|
const lines = parseAnalyticsProductLines(products);
|
|
32
32
|
if (Array.isArray(products) && products.length > 0 && lines.length === 0) {
|
|
33
33
|
console.warn(
|
|
34
|
-
"[analytics] collection view products did not match the per-line shape and were dropped"
|
|
35
|
-
{ products }
|
|
34
|
+
"[analytics] collection view products did not match the per-line shape and were dropped"
|
|
36
35
|
);
|
|
37
36
|
}
|
|
38
37
|
return { products: lines, rest };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { logAnalyticsActivity } from "./analytics-log";
|
|
1
2
|
const QUEUE_TIMEOUT_MS = 3e4;
|
|
2
3
|
function createAnalyticsQueue({
|
|
3
4
|
isReady,
|
|
@@ -22,9 +23,11 @@ function createAnalyticsQueue({
|
|
|
22
23
|
if (!isReady()) {
|
|
23
24
|
return;
|
|
24
25
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
logAnalyticsActivity({
|
|
27
|
+
kind: "flush",
|
|
28
|
+
eventCount: queue.length,
|
|
29
|
+
queueName
|
|
30
|
+
});
|
|
28
31
|
try {
|
|
29
32
|
queue.forEach(send);
|
|
30
33
|
} finally {
|
|
@@ -40,16 +43,13 @@ function createAnalyticsQueue({
|
|
|
40
43
|
timeoutTimer = window.setTimeout(() => {
|
|
41
44
|
queue.length = 0;
|
|
42
45
|
permanentlyDisabled = true;
|
|
43
|
-
|
|
46
|
+
logAnalyticsActivity({ kind: "queueTimeout", queueName });
|
|
44
47
|
cleanup();
|
|
45
48
|
}, QUEUE_TIMEOUT_MS);
|
|
46
49
|
};
|
|
47
50
|
return (payload) => {
|
|
48
51
|
if (permanentlyDisabled) {
|
|
49
|
-
|
|
50
|
-
`[analytics] ${queueName} queue is disabled, dropping event`,
|
|
51
|
-
payload
|
|
52
|
-
);
|
|
52
|
+
logAnalyticsActivity({ kind: "drop", queueName });
|
|
53
53
|
return;
|
|
54
54
|
}
|
|
55
55
|
if (isReady()) {
|
|
@@ -113,9 +113,7 @@ function createMethodQueue(checkInstanceReady, options) {
|
|
|
113
113
|
queue.length = 0;
|
|
114
114
|
permanentlyDisabled = true;
|
|
115
115
|
if (typeof window !== "undefined") {
|
|
116
|
-
|
|
117
|
-
`[analytics] ${queueName} timed out and has been disabled`
|
|
118
|
-
);
|
|
116
|
+
logAnalyticsActivity({ kind: "methodQueueTimeout", queueName });
|
|
119
117
|
}
|
|
120
118
|
options?.onTimeout?.();
|
|
121
119
|
cleanup();
|
package/cart/cart-loader.js
CHANGED
|
@@ -6,7 +6,7 @@ async function CartLoader({
|
|
|
6
6
|
children,
|
|
7
7
|
country
|
|
8
8
|
}) {
|
|
9
|
-
const cart =
|
|
9
|
+
const cart = false ? null : await getCartAction().catch((error) => {
|
|
10
10
|
unstable_rethrow(error);
|
|
11
11
|
console.warn("[Replo] Failed to load cart:", error);
|
|
12
12
|
return null;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { CartLineAttribute } from "../cart-types";
|
|
1
2
|
/**
|
|
2
3
|
* What a `buyNow` call did. Out of stock is an expected storefront outcome
|
|
3
4
|
* (a buyer can race the last unit), so it rides the return value rather than
|
|
@@ -17,6 +18,8 @@ export interface VariantBuyNowInfo {
|
|
|
17
18
|
variantId: string;
|
|
18
19
|
quantity?: number;
|
|
19
20
|
sellingPlanId?: string | null;
|
|
21
|
+
/** Custom line item properties (appear on the order). */
|
|
22
|
+
properties?: CartLineAttribute[];
|
|
20
23
|
}
|
|
21
24
|
/**
|
|
22
25
|
* React hook that returns a `buyNow` function for express checkout flows.
|
|
@@ -32,7 +32,7 @@ function useBuyNow() {
|
|
|
32
32
|
variantId: variant.variantId,
|
|
33
33
|
quantity: variant.quantity ?? 1,
|
|
34
34
|
sellingPlanId: variant.sellingPlanId ?? null,
|
|
35
|
-
properties: []
|
|
35
|
+
properties: variant.properties ?? []
|
|
36
36
|
})),
|
|
37
37
|
discountCodes: options?.discountCodes ?? [],
|
|
38
38
|
pageUrl: window.location.href
|
package/content.js
CHANGED
|
@@ -370,7 +370,7 @@ async function getEntryListingStatus({
|
|
|
370
370
|
slug,
|
|
371
371
|
contentSource
|
|
372
372
|
}) {
|
|
373
|
-
if (
|
|
373
|
+
if (true) {
|
|
374
374
|
return "published";
|
|
375
375
|
}
|
|
376
376
|
const [draft, publishedCopy] = await Promise.all([
|
|
@@ -445,7 +445,7 @@ async function readVisibleEntry({
|
|
|
445
445
|
if (getContentEntryFieldValidationIssues({
|
|
446
446
|
fields: collectionSchema.fields,
|
|
447
447
|
values,
|
|
448
|
-
requireRequiredFields:
|
|
448
|
+
requireRequiredFields: true
|
|
449
449
|
}).length > 0) {
|
|
450
450
|
return null;
|
|
451
451
|
}
|
package/env.js
CHANGED
|
@@ -13,7 +13,7 @@ const wranglerConfigSchema = z.object({ vars: envSchema });
|
|
|
13
13
|
class MissingWranglerConfigError extends CanopyError {
|
|
14
14
|
}
|
|
15
15
|
const isDeployedWorker = () => {
|
|
16
|
-
return process.env.
|
|
16
|
+
return process.env.BUILD_ENV !== "build" && process.env.NEXT_PHASE !== "phase-production-build";
|
|
17
17
|
};
|
|
18
18
|
const getEnv = async () => {
|
|
19
19
|
if (isDeployedWorker()) {
|
package/gateways/canopy-api.js
CHANGED
|
@@ -78,7 +78,7 @@ class CanopyApiGateway {
|
|
|
78
78
|
});
|
|
79
79
|
} catch (error) {
|
|
80
80
|
let message = `Failed to POST to canopy-api at ${url}: ${error}`;
|
|
81
|
-
if (
|
|
81
|
+
if (false) {
|
|
82
82
|
message += `
|
|
83
83
|
|
|
84
84
|
apiHost: ${this.apiHost}
|
|
@@ -98,7 +98,7 @@ If you're running locally, make sure the canopy-api cloudflare worker is running
|
|
|
98
98
|
return await fetch(url, { signal: abortController.signal });
|
|
99
99
|
} catch (error) {
|
|
100
100
|
let message = `Failed to GET from canopy-api at ${url}: ${error}`;
|
|
101
|
-
if (
|
|
101
|
+
if (false) {
|
|
102
102
|
message += `
|
|
103
103
|
|
|
104
104
|
apiHost: ${this.apiHost}
|
package/lib/buildMetadata.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export const BUILD_METADATA = {
|
|
2
2
|
"packageName": "@replohq/sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.1",
|
|
4
4
|
"branch": "HEAD",
|
|
5
|
-
"commit": "
|
|
6
|
-
"builtAt": "2026-09-
|
|
5
|
+
"commit": "bad30733ed6d9f37c3fe49876e818d01dad78e77",
|
|
6
|
+
"builtAt": "2026-09-20T21:19:55.438Z"
|
|
7
7
|
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { AddToCartItem } from "../cart/hooks/use-add-to-cart";
|
|
3
|
+
type KachingBundlesLoaderProps = {
|
|
4
|
+
loaderKey: string;
|
|
5
|
+
productId: string;
|
|
6
|
+
dealBlockId?: string;
|
|
7
|
+
country?: string;
|
|
8
|
+
language?: string;
|
|
9
|
+
selectedVariantId?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Rendered under Kaching's widget with the shopper's current pick. The lines
|
|
12
|
+
* are ready for `addToCart` and carry the Kaching line attributes that
|
|
13
|
+
* Checkout uses to apply the discount; they are empty until the shopper picks.
|
|
14
|
+
*/
|
|
15
|
+
children: (bundle: {
|
|
16
|
+
lines: AddToCartItem[];
|
|
17
|
+
}) => ReactNode;
|
|
18
|
+
fallback?: ReactNode;
|
|
19
|
+
/** Rendered instead of the widget when Kaching has no active deal for this product. */
|
|
20
|
+
noDealFallback?: ReactNode;
|
|
21
|
+
};
|
|
22
|
+
export declare function KachingBundlesLoader({ loaderKey, productId, dealBlockId, country, language, selectedVariantId, children, fallback, noDealFallback, }: KachingBundlesLoaderProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Suspense, useState } from "react";
|
|
4
|
+
import { KachingBundle } from "@kachingappz/bundles-react";
|
|
5
|
+
import { useSuspenseQuery } from "@tanstack/react-query";
|
|
6
|
+
import { invokeLoader } from "./invoke-loader";
|
|
7
|
+
import { LoaderErrorBoundary } from "./loader-error-boundary";
|
|
8
|
+
import { shopifyKachingBundlesLoaderOutputSchema } from "./loader-schemas";
|
|
9
|
+
function KachingBundlesLoaderInner({
|
|
10
|
+
loaderKey,
|
|
11
|
+
args,
|
|
12
|
+
selectedVariantId,
|
|
13
|
+
children,
|
|
14
|
+
noDealFallback
|
|
15
|
+
}) {
|
|
16
|
+
const [lines, setLines] = useState([]);
|
|
17
|
+
const { data } = useSuspenseQuery({
|
|
18
|
+
queryKey: [loaderKey, args],
|
|
19
|
+
queryFn: async () => {
|
|
20
|
+
const loadedData = await invokeLoader({ loaderKey, args });
|
|
21
|
+
return shopifyKachingBundlesLoaderOutputSchema.parse(loadedData);
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
if (data.bundles === null) {
|
|
25
|
+
return /* @__PURE__ */ jsx(Fragment, { children: noDealFallback ?? null });
|
|
26
|
+
}
|
|
27
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
28
|
+
/* @__PURE__ */ jsx(
|
|
29
|
+
KachingBundle,
|
|
30
|
+
{
|
|
31
|
+
data: data.bundles,
|
|
32
|
+
selectedVariantId,
|
|
33
|
+
onLinesChange: (widgetLines) => {
|
|
34
|
+
setLines(
|
|
35
|
+
widgetLines.map((line) => ({
|
|
36
|
+
merchandiseId: line.merchandiseId,
|
|
37
|
+
quantity: line.quantity,
|
|
38
|
+
sellingPlanId: line.sellingPlanId ?? null,
|
|
39
|
+
properties: line.attributes
|
|
40
|
+
}))
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
),
|
|
45
|
+
children({ lines })
|
|
46
|
+
] });
|
|
47
|
+
}
|
|
48
|
+
function KachingBundlesLoader({
|
|
49
|
+
loaderKey,
|
|
50
|
+
productId,
|
|
51
|
+
dealBlockId,
|
|
52
|
+
country,
|
|
53
|
+
language,
|
|
54
|
+
selectedVariantId,
|
|
55
|
+
children,
|
|
56
|
+
fallback,
|
|
57
|
+
noDealFallback
|
|
58
|
+
}) {
|
|
59
|
+
const args = { productId, dealBlockId, country, language };
|
|
60
|
+
const instanceKey = `${loaderKey}:${JSON.stringify(args)}`;
|
|
61
|
+
return /* @__PURE__ */ jsx(LoaderErrorBoundary, { fallback: fallback ?? null, resetKey: instanceKey, children: /* @__PURE__ */ jsx(Suspense, { fallback: fallback ?? null, children: /* @__PURE__ */ jsx(
|
|
62
|
+
KachingBundlesLoaderInner,
|
|
63
|
+
{
|
|
64
|
+
loaderKey,
|
|
65
|
+
args,
|
|
66
|
+
selectedVariantId,
|
|
67
|
+
noDealFallback,
|
|
68
|
+
children
|
|
69
|
+
},
|
|
70
|
+
instanceKey
|
|
71
|
+
) }) });
|
|
72
|
+
}
|
|
73
|
+
export {
|
|
74
|
+
KachingBundlesLoader
|
|
75
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
const LoaderErrorDetailsContext = React.createContext(false);
|
|
5
5
|
function LoaderErrorDetailsProvider({
|
|
@@ -52,7 +52,7 @@ class LoaderErrorBoundary extends React.Component {
|
|
|
52
52
|
if (!this.state.hasError) {
|
|
53
53
|
return this.props.children;
|
|
54
54
|
}
|
|
55
|
-
if (
|
|
55
|
+
if (false) {
|
|
56
56
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
57
57
|
this.props.fallback,
|
|
58
58
|
/* @__PURE__ */ jsx(LoaderErrorDetails, { error: this.state.error })
|
package/loaders/loader-keys.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export declare const DATA_LOADER_KEYS: {
|
|
|
15
15
|
readonly SHOPIFY_COLLECTION_PRODUCTS: "shopify_storefront.collection_products";
|
|
16
16
|
readonly SHOPIFY_METAOBJECT: "shopify_storefront.metaobject";
|
|
17
17
|
readonly SHOPIFY_METAOBJECTS: "shopify_storefront.metaobjects";
|
|
18
|
+
readonly SHOPIFY_KACHING_BUNDLES: "shopify_storefront.kaching_bundles";
|
|
18
19
|
readonly REPLO_PRODUCT: "replo_products.product";
|
|
19
20
|
readonly OKENDO_PRODUCT_REVIEWS: "okendo.product_reviews";
|
|
20
21
|
readonly OKENDO_PRODUCT_REVIEW_AGGREGATE: "okendo.product_review_aggregate";
|
package/loaders/loader-keys.js
CHANGED
|
@@ -4,6 +4,7 @@ const DATA_LOADER_KEYS = {
|
|
|
4
4
|
SHOPIFY_COLLECTION_PRODUCTS: "shopify_storefront.collection_products",
|
|
5
5
|
SHOPIFY_METAOBJECT: "shopify_storefront.metaobject",
|
|
6
6
|
SHOPIFY_METAOBJECTS: "shopify_storefront.metaobjects",
|
|
7
|
+
SHOPIFY_KACHING_BUNDLES: "shopify_storefront.kaching_bundles",
|
|
7
8
|
REPLO_PRODUCT: "replo_products.product",
|
|
8
9
|
OKENDO_PRODUCT_REVIEWS: "okendo.product_reviews",
|
|
9
10
|
OKENDO_PRODUCT_REVIEW_AGGREGATE: "okendo.product_review_aggregate",
|
|
@@ -1011,6 +1011,10 @@ export declare const shopifyMetaobjectsLoaderOutputSchema: z.ZodObject<{
|
|
|
1011
1011
|
endCursor: z.ZodNullable<z.ZodString>;
|
|
1012
1012
|
}, z.core.$strip>;
|
|
1013
1013
|
}, z.core.$strip>;
|
|
1014
|
+
export declare const shopifyKachingBundlesLoaderOutputSchema: z.ZodObject<{
|
|
1015
|
+
bundles: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1016
|
+
}, z.core.$strip>;
|
|
1017
|
+
export type ShopifyKachingBundlesLoaderOutput = z.infer<typeof shopifyKachingBundlesLoaderOutputSchema>;
|
|
1014
1018
|
export type StorefrontMetaobject = z.infer<typeof storefrontMetaobjectSchema>;
|
|
1015
1019
|
export type ShopifyMetaobjectLoaderOutput = z.infer<typeof shopifyMetaobjectLoaderOutputSchema>;
|
|
1016
1020
|
export type ShopifyMetaobjectsLoaderOutput = z.infer<typeof shopifyMetaobjectsLoaderOutputSchema>;
|
|
@@ -347,6 +347,9 @@ const shopifyMetaobjectsLoaderOutputSchema = z.object({
|
|
|
347
347
|
endCursor: z.string().nullable()
|
|
348
348
|
})
|
|
349
349
|
}).describe("ShopifyMetaobjectsLoaderOutput");
|
|
350
|
+
const shopifyKachingBundlesLoaderOutputSchema = z.object({
|
|
351
|
+
bundles: z.record(z.string(), z.unknown()).nullable()
|
|
352
|
+
}).describe("ShopifyKachingBundles");
|
|
350
353
|
export {
|
|
351
354
|
contentfulAssetObjectSchema,
|
|
352
355
|
contentfulEntriesLoaderOutputSchema,
|
|
@@ -385,6 +388,7 @@ export {
|
|
|
385
388
|
sellingPlanOptionValueSchema,
|
|
386
389
|
sellingPlanPriceAdjustmentSchema,
|
|
387
390
|
sellingPlanSchema,
|
|
391
|
+
shopifyKachingBundlesLoaderOutputSchema,
|
|
388
392
|
shopifyMetaobjectLoaderOutputSchema,
|
|
389
393
|
shopifyMetaobjectsLoaderOutputSchema,
|
|
390
394
|
statsigExperimentLoaderOutputSchema,
|
|
@@ -180,7 +180,7 @@ function resolvePreviewPlaceholderData({
|
|
|
180
180
|
return null;
|
|
181
181
|
}
|
|
182
182
|
if (typeof window === "undefined") {
|
|
183
|
-
return
|
|
183
|
+
return false ? placeholderData : null;
|
|
184
184
|
}
|
|
185
185
|
return window.parent === window ? null : placeholderData;
|
|
186
186
|
}
|
package/next/image-loader.js
CHANGED
|
@@ -20,7 +20,7 @@ function cloudflareLoader({
|
|
|
20
20
|
width,
|
|
21
21
|
quality
|
|
22
22
|
}) {
|
|
23
|
-
const isDevelopment =
|
|
23
|
+
const isDevelopment = false;
|
|
24
24
|
const params = [`width=${width}`, `quality=${quality ?? 75}`, "format=auto"];
|
|
25
25
|
if (/^https:\/\//i.test(src)) {
|
|
26
26
|
let hostname;
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@replohq/sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.10.1",
|
|
4
4
|
"reploBuild": {
|
|
5
5
|
"packageName": "@replohq/sdk",
|
|
6
|
-
"version": "1.
|
|
6
|
+
"version": "1.10.1",
|
|
7
7
|
"branch": "HEAD",
|
|
8
|
-
"commit": "
|
|
9
|
-
"builtAt": "2026-09-
|
|
8
|
+
"commit": "bad30733ed6d9f37c3fe49876e818d01dad78e77",
|
|
9
|
+
"builtAt": "2026-09-20T21:19:55.438Z"
|
|
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",
|
|
@@ -117,6 +117,10 @@
|
|
|
117
117
|
"types": "./loaders/judgeme-reviews-loader.d.ts",
|
|
118
118
|
"default": "./loaders/judgeme-reviews-loader.js"
|
|
119
119
|
},
|
|
120
|
+
"./loaders/kaching-bundles-loader": {
|
|
121
|
+
"types": "./loaders/kaching-bundles-loader.d.ts",
|
|
122
|
+
"default": "./loaders/kaching-bundles-loader.js"
|
|
123
|
+
},
|
|
120
124
|
"./loaders/levanta-product-loader": {
|
|
121
125
|
"types": "./loaders/levanta-product-loader.d.ts",
|
|
122
126
|
"default": "./loaders/levanta-product-loader.js"
|
|
@@ -269,6 +273,7 @@
|
|
|
269
273
|
},
|
|
270
274
|
"dependencies": {
|
|
271
275
|
"@formatjs/intl-localematcher": "^0.8.13",
|
|
276
|
+
"@kachingappz/bundles-react": "0.5.3",
|
|
272
277
|
"negotiator": "^1.0.0",
|
|
273
278
|
"react-markdown": "^9.1.0",
|
|
274
279
|
"remark-gfm": "^4.0.1",
|
|
File without changes
|