@kotao/storefront 0.2.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 (66) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +34 -0
  3. package/dist/cart-documents-CwwRTvm8.d.ts +21 -0
  4. package/dist/cart-documents.d.ts +2 -0
  5. package/dist/cart-documents.js +3 -0
  6. package/dist/cart-documents.js.map +1 -0
  7. package/dist/chunk-2IWNUDSZ.js +104 -0
  8. package/dist/chunk-2IWNUDSZ.js.map +1 -0
  9. package/dist/chunk-3YQXJNR7.js +70 -0
  10. package/dist/chunk-3YQXJNR7.js.map +1 -0
  11. package/dist/chunk-5QOFKGKD.js +51 -0
  12. package/dist/chunk-5QOFKGKD.js.map +1 -0
  13. package/dist/chunk-GCQI6OKH.js +239 -0
  14. package/dist/chunk-GCQI6OKH.js.map +1 -0
  15. package/dist/chunk-ISAFEOR2.js +214 -0
  16. package/dist/chunk-ISAFEOR2.js.map +1 -0
  17. package/dist/chunk-MYDKIJRH.js +81 -0
  18. package/dist/chunk-MYDKIJRH.js.map +1 -0
  19. package/dist/chunk-OGWYTYYS.js +72 -0
  20. package/dist/chunk-OGWYTYYS.js.map +1 -0
  21. package/dist/chunk-PXZ737N3.js +439 -0
  22. package/dist/chunk-PXZ737N3.js.map +1 -0
  23. package/dist/chunk-QOEEUTHQ.js +110 -0
  24. package/dist/chunk-QOEEUTHQ.js.map +1 -0
  25. package/dist/chunk-U5677AEA.js +1690 -0
  26. package/dist/chunk-U5677AEA.js.map +1 -0
  27. package/dist/chunk-XMTWFJCZ.js +138 -0
  28. package/dist/chunk-XMTWFJCZ.js.map +1 -0
  29. package/dist/client-D9YYA2w6.d.ts +159 -0
  30. package/dist/customer-account-api-types.d.ts +144 -0
  31. package/dist/customer-account-api-types.js +3 -0
  32. package/dist/customer-account-api-types.js.map +1 -0
  33. package/dist/editor.d.ts +112 -0
  34. package/dist/editor.js +3 -0
  35. package/dist/editor.js.map +1 -0
  36. package/dist/image.d.ts +89 -0
  37. package/dist/image.js +3 -0
  38. package/dist/image.js.map +1 -0
  39. package/dist/index.d.ts +183 -0
  40. package/dist/index.js +208 -0
  41. package/dist/index.js.map +1 -0
  42. package/dist/pagination-CPgH3fAa.d.ts +77 -0
  43. package/dist/product.d.ts +105 -0
  44. package/dist/product.js +4 -0
  45. package/dist/product.js.map +1 -0
  46. package/dist/react-router.d.ts +29 -0
  47. package/dist/react-router.js +33 -0
  48. package/dist/react-router.js.map +1 -0
  49. package/dist/react.d.ts +299 -0
  50. package/dist/react.js +1813 -0
  51. package/dist/react.js.map +1 -0
  52. package/dist/routing-BfUp49o8.d.ts +302 -0
  53. package/dist/seo.d.ts +155 -0
  54. package/dist/seo.js +4 -0
  55. package/dist/seo.js.map +1 -0
  56. package/dist/settings.d.ts +87 -0
  57. package/dist/settings.js +3 -0
  58. package/dist/settings.js.map +1 -0
  59. package/dist/shop-DkQmro-Y.d.ts +202 -0
  60. package/dist/store-DQK1nhob.d.ts +67 -0
  61. package/dist/storefront-api-types.d.ts +312 -0
  62. package/dist/storefront-api-types.js +3 -0
  63. package/dist/storefront-api-types.js.map +1 -0
  64. package/dist/types-BDhHWZsP.d.ts +77 -0
  65. package/dist/types-Df3bGbKU.d.ts +167 -0
  66. package/package.json +82 -0
@@ -0,0 +1,29 @@
1
+ import { K as KotaoEnv, a as KotaoContext } from './routing-BfUp49o8.js';
2
+ export { b as KotaoSession, s as stripLocalePrefixFromRequest } from './routing-BfUp49o8.js';
3
+ import { H as HydrogenSession } from './types-Df3bGbKU.js';
4
+ import './client-D9YYA2w6.js';
5
+
6
+ type JsonInit = ResponseInit | number;
7
+ interface JsonResponse<T> {
8
+ readonly type: string;
9
+ readonly data: T;
10
+ readonly init: ResponseInit | null;
11
+ }
12
+ type AwaitedDeferred<T> = T extends Record<string, unknown> ? {
13
+ [K in keyof T]: Awaited<T[K]>;
14
+ } : Awaited<T>;
15
+ declare function json<T>(data: T, init?: JsonInit): JsonResponse<T>;
16
+ declare function defer<T>(data: T, _init?: JsonInit): Promise<AwaitedDeferred<T>>;
17
+
18
+ interface KotaoLoadContextDeps {
19
+ readonly openCache?: (name: string) => Promise<Cache>;
20
+ readonly session?: HydrogenSession;
21
+ }
22
+ /**
23
+ * Build the React Router 7 load context for a storefront request. Call from the RR7 server
24
+ * entry's `getLoadContext`. Isolated here so the SDK core stays framework-agnostic (a TanStack
25
+ * Start binding can be added alongside without touching the core).
26
+ */
27
+ declare const getKotaoLoadContext: (request: Request, env: KotaoEnv, executionCtx: ExecutionContext, deps?: KotaoLoadContextDeps) => Promise<KotaoContext>;
28
+
29
+ export { KotaoContext, KotaoEnv, defer, getKotaoLoadContext, json };
@@ -0,0 +1,33 @@
1
+ import { createKotaoContext } from './chunk-U5677AEA.js';
2
+ export { stripLocalePrefixFromRequest } from './chunk-U5677AEA.js';
3
+ import './chunk-OGWYTYYS.js';
4
+
5
+ // src/react-router/compat.ts
6
+ function normalizeJsonInit(init) {
7
+ return typeof init === "number" ? { status: init } : init;
8
+ }
9
+ function isRecord(value) {
10
+ return value !== null && typeof value === "object" && !Array.isArray(value);
11
+ }
12
+ function isPromiseLike(value) {
13
+ return isRecord(value) && typeof value.then === "function";
14
+ }
15
+ function json(data, init) {
16
+ return Response.json(data, normalizeJsonInit(init));
17
+ }
18
+ async function defer(data, _init) {
19
+ if (isRecord(data) && !isPromiseLike(data)) {
20
+ const entries = await Promise.all(
21
+ Object.entries(data).map(async ([key, value]) => [key, await value])
22
+ );
23
+ return Object.fromEntries(entries);
24
+ }
25
+ return await data;
26
+ }
27
+
28
+ // src/react-router/binding.ts
29
+ var getKotaoLoadContext = (request, env, executionCtx, deps) => createKotaoContext(request, env, executionCtx, deps);
30
+
31
+ export { defer, getKotaoLoadContext, json };
32
+ //# sourceMappingURL=react-router.js.map
33
+ //# sourceMappingURL=react-router.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/react-router/compat.ts","../src/react-router/binding.ts"],"names":[],"mappings":";;;;;AAUA,SAAS,kBAAkB,IAAA,EAA2C;AACpE,EAAA,OAAO,OAAO,IAAA,KAAS,QAAA,GAAW,EAAE,MAAA,EAAQ,MAAK,GAAI,IAAA;AACvD;AAEA,SAAS,SAAS,KAAA,EAAkD;AAClE,EAAA,OAAO,KAAA,KAAU,QAAQ,OAAO,KAAA,KAAU,YAAY,CAAC,KAAA,CAAM,QAAQ,KAAK,CAAA;AAC5E;AAEA,SAAS,cAAc,KAAA,EAA+C;AACpE,EAAA,OAAO,QAAA,CAAS,KAAK,CAAA,IAAK,OAAO,MAAM,IAAA,KAAS,UAAA;AAClD;AAEO,SAAS,IAAA,CAAQ,MAAS,IAAA,EAAkC;AACjE,EAAA,OAAO,QAAA,CAAS,IAAA,CAAK,IAAA,EAAM,iBAAA,CAAkB,IAAI,CAAC,CAAA;AACpD;AAEA,eAAsB,KAAA,CAAS,MAAS,KAAA,EAA+C;AACrF,EAAA,IAAI,SAAS,IAAI,CAAA,IAAK,CAAC,aAAA,CAAc,IAAI,CAAA,EAAG;AAC1C,IAAA,MAAM,OAAA,GAAU,MAAM,OAAA,CAAQ,GAAA;AAAA,MAC5B,MAAA,CAAO,OAAA,CAAQ,IAAI,CAAA,CAAE,IAAI,OAAO,CAAC,GAAA,EAAK,KAAK,CAAA,KAAM,CAAC,GAAA,EAAK,MAAM,KAAK,CAAU;AAAA,KAC9E;AACA,IAAA,OAAO,MAAA,CAAO,YAAY,OAAO,CAAA;AAAA,EACnC;AAEA,EAAA,OAAQ,MAAM,IAAA;AAChB;;;ACrBO,IAAM,mBAAA,GAAsB,CACjC,OAAA,EACA,GAAA,EACA,YAAA,EACA,SAC0B,kBAAA,CAAmB,OAAA,EAAS,GAAA,EAAK,YAAA,EAAc,IAAI","file":"react-router.js","sourcesContent":["type JsonInit = ResponseInit | number\nexport interface JsonResponse<T> {\n readonly type: string\n readonly data: T\n readonly init: ResponseInit | null\n}\n\ntype AwaitedDeferred<T> =\n T extends Record<string, unknown> ? { [K in keyof T]: Awaited<T[K]> } : Awaited<T>\n\nfunction normalizeJsonInit(init?: JsonInit): ResponseInit | undefined {\n return typeof init === 'number' ? { status: init } : init\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return value !== null && typeof value === 'object' && !Array.isArray(value)\n}\n\nfunction isPromiseLike(value: unknown): value is PromiseLike<unknown> {\n return isRecord(value) && typeof value.then === 'function'\n}\n\nexport function json<T>(data: T, init?: JsonInit): JsonResponse<T> {\n return Response.json(data, normalizeJsonInit(init)) as unknown as JsonResponse<T>\n}\n\nexport async function defer<T>(data: T, _init?: JsonInit): Promise<AwaitedDeferred<T>> {\n if (isRecord(data) && !isPromiseLike(data)) {\n const entries = await Promise.all(\n Object.entries(data).map(async ([key, value]) => [key, await value] as const),\n )\n return Object.fromEntries(entries) as AwaitedDeferred<T>\n }\n\n return (await data) as AwaitedDeferred<T>\n}\n","import type { HydrogenSession } from '../cart/types'\nimport { createKotaoContext, type KotaoContext, type KotaoEnv } from '../context/context'\nexport { stripLocalePrefixFromRequest } from '../localization/routing'\n\nexport interface KotaoLoadContextDeps {\n readonly openCache?: (name: string) => Promise<Cache>\n readonly session?: HydrogenSession\n}\n\n/**\n * Build the React Router 7 load context for a storefront request. Call from the RR7 server\n * entry's `getLoadContext`. Isolated here so the SDK core stays framework-agnostic (a TanStack\n * Start binding can be added alongside without touching the core).\n */\nexport const getKotaoLoadContext = (\n request: Request,\n env: KotaoEnv,\n executionCtx: ExecutionContext,\n deps?: KotaoLoadContextDeps,\n): Promise<KotaoContext> => createKotaoContext(request, env, executionCtx, deps)\n"]}
@@ -0,0 +1,299 @@
1
+ import { ReactNode, ReactElement, ImgHTMLAttributes, VideoHTMLAttributes, ElementType, AnchorHTMLAttributes, CSSProperties } from 'react';
2
+ import { FetcherWithComponents } from 'react-router';
3
+ import { C as CartFormAction, b as CartLineInput } from './types-Df3bGbKU.js';
4
+ import { M as getCartFormInput, v as ShopAnalytics, d as AnalyticsContext, a as ConsentState, e as AnalyticsEmitter, b as AnalyticsBus } from './shop-DkQmro-Y.js';
5
+ export { N as useNonce } from './shop-DkQmro-Y.js';
6
+ import { Cart } from './storefront-api-types.js';
7
+ import { ImageAttrsOptions, ImageData, ImageCrop, ImageFormat } from './image.js';
8
+ import { C as Connection, b as PaginationInfo } from './pagination-CPgH3fAa.js';
9
+ import { S as SeoConfig } from './types-BDhHWZsP.js';
10
+ import { c as ThemeSettingsStore, b as ResolvedSettings, T as ThemeSettingsSnapshot } from './store-DQK1nhob.js';
11
+ import { SmartCartMountConfig, CartAdapter } from '@kotao/smart-cart';
12
+ export { R as REACT_SEAM_CART_DOCUMENTS, c as createStorefrontApiCartAdapter } from './cart-documents-CwwRTvm8.js';
13
+
14
+ type CartFormInputValue = unknown;
15
+ type CartFormFetcher = FetcherWithComponents<unknown>;
16
+ interface CartFormProps {
17
+ readonly action: CartFormAction;
18
+ readonly inputs?: Readonly<Record<string, CartFormInputValue>>;
19
+ readonly route?: string;
20
+ readonly children?: ReactNode | ((fetcher: CartFormFetcher) => ReactNode);
21
+ }
22
+ type OptimisticCartLineInput = CartLineInput;
23
+ type OptimisticInputData = Readonly<Record<string, unknown>>;
24
+ type CartReturn = Cart;
25
+ interface CartQueryDataReturn {
26
+ readonly cart: CartReturn;
27
+ readonly errors?: readonly unknown[];
28
+ readonly userErrors?: readonly unknown[];
29
+ }
30
+ declare const CartForm: (({ action, inputs, route, children }: CartFormProps) => ReactElement) & {
31
+ ACTIONS: Readonly<{
32
+ readonly LinesAdd: "LinesAdd";
33
+ readonly LinesUpdate: "LinesUpdate";
34
+ readonly LinesRemove: "LinesRemove";
35
+ readonly DiscountCodesUpdate: "DiscountCodesUpdate";
36
+ readonly GiftCardCodesAdd: "GiftCardCodesAdd";
37
+ readonly GiftCardCodesRemove: "GiftCardCodesRemove";
38
+ readonly BuyerIdentityUpdate: "BuyerIdentityUpdate";
39
+ readonly NoteUpdate: "NoteUpdate";
40
+ readonly AttributesUpdate: "AttributesUpdate";
41
+ readonly MetafieldsSet: "MetafieldsSet";
42
+ readonly MetafieldsDelete: "MetafieldsDelete";
43
+ readonly DeliveryAddressesReplace: "DeliveryAddressesReplace";
44
+ readonly SelectedDeliveryOptionsUpdate: "SelectedDeliveryOptionsUpdate";
45
+ }>;
46
+ getFormInput: typeof getCartFormInput;
47
+ };
48
+ interface OptimisticInputProps {
49
+ readonly id: string;
50
+ readonly data: OptimisticInputData;
51
+ }
52
+ declare function OptimisticInput({ id, data }: OptimisticInputProps): ReactElement;
53
+ declare function useOptimisticData<T>(_id: string | null | undefined): T | undefined;
54
+
55
+ interface AnalyticsContextValue {
56
+ readonly subscribe: AnalyticsEmitter['subscribe'];
57
+ readonly publish: AnalyticsBus['publish'];
58
+ readonly consent: ConsentState;
59
+ readonly setConsent: (patch: Partial<ConsentState>) => void;
60
+ readonly decided: boolean;
61
+ readonly mounted: boolean;
62
+ }
63
+ interface AnalyticsProviderProps {
64
+ readonly cart?: unknown;
65
+ readonly consent?: {
66
+ readonly checkoutDomain?: string;
67
+ readonly storefrontAccessToken?: string;
68
+ readonly withPrivacyBanner?: boolean;
69
+ };
70
+ readonly shopId?: string;
71
+ readonly shop?: ShopAnalytics;
72
+ readonly geo?: AnalyticsContext['geo'];
73
+ /** Current page URL; changing it auto-emits `page_viewed` (themes pass it from RR7 navigation). */
74
+ readonly url?: string;
75
+ /** Same-origin pixel endpoint (default '/api/storefront/pixel'). */
76
+ readonly pixelEndpoint?: string;
77
+ readonly children: ReactNode;
78
+ }
79
+ /**
80
+ * `<AnalyticsProvider>` (Hydrogen-shaped) — wires the consent-gated analytics bus and exposes it via
81
+ * `useAnalytics`. The visible consent UI is disabled for now; analytics starts granted while the public
82
+ * API remains in place for the replacement flow.
83
+ */
84
+ declare function AnalyticsProvider(props: AnalyticsProviderProps): ReactElement;
85
+ declare function useAnalytics(): AnalyticsContextValue;
86
+ interface ConsentBannerRenderProps {
87
+ readonly acceptAll: () => void;
88
+ readonly rejectAll: () => void;
89
+ readonly setConsent: (patch: Partial<ConsentState>) => void;
90
+ }
91
+ interface ConsentBannerProps {
92
+ /** Render-prop for full theme control. Omit for a minimal, unstyled accessible fallback. */
93
+ readonly children?: (api: ConsentBannerRenderProps) => ReactNode;
94
+ }
95
+ /**
96
+ * Legacy no-op. Kept so existing themes do not fail imports while the consent UI is removed.
97
+ */
98
+ declare function ConsentBanner({ children }: ConsentBannerProps): ReactElement | null;
99
+ interface AnalyticsCartViewProps {
100
+ readonly data?: {
101
+ readonly cart?: {
102
+ readonly id?: string | null;
103
+ } | null;
104
+ readonly id?: string | null;
105
+ };
106
+ }
107
+ declare function AnalyticsCartView({ data }: AnalyticsCartViewProps): null;
108
+ interface AnalyticsProductViewProps {
109
+ readonly data?: {
110
+ readonly products?: readonly {
111
+ readonly handle?: string | null;
112
+ readonly id?: string | null;
113
+ readonly price?: string | null;
114
+ readonly productId?: string | null;
115
+ readonly quantity?: number | null;
116
+ readonly title?: string | null;
117
+ readonly variantId?: string | null;
118
+ readonly variantTitle?: string | null;
119
+ readonly vendor?: string | null;
120
+ }[];
121
+ };
122
+ }
123
+ declare function AnalyticsProductView({ data }: AnalyticsProductViewProps): null;
124
+ interface AnalyticsCollectionViewProps {
125
+ readonly data?: {
126
+ readonly collection?: {
127
+ readonly handle?: string | null;
128
+ readonly id?: string | null;
129
+ } | null;
130
+ };
131
+ }
132
+ declare function AnalyticsCollectionView({ data }: AnalyticsCollectionViewProps): null;
133
+ interface AnalyticsSearchViewProps {
134
+ readonly data?: {
135
+ readonly searchResults?: unknown;
136
+ readonly searchTerm?: string | null;
137
+ };
138
+ }
139
+ declare function AnalyticsSearchView({ data }: AnalyticsSearchViewProps): null;
140
+ declare const Analytics: Readonly<{
141
+ Provider: typeof AnalyticsProvider;
142
+ CartView: typeof AnalyticsCartView;
143
+ CollectionView: typeof AnalyticsCollectionView;
144
+ ProductView: typeof AnalyticsProductView;
145
+ SearchView: typeof AnalyticsSearchView;
146
+ }>;
147
+
148
+ /** Passthrough `<img>` attributes — the SDK owns the computed ones (src/srcSet/sizes/width/height/loading). */
149
+ type PassthroughImgProps = Omit<ImgHTMLAttributes<HTMLImageElement>, 'src' | 'srcSet' | 'sizes' | 'width' | 'height' | 'loading'>;
150
+ type HydrogenImageData = Omit<ImageData, 'url'> & {
151
+ readonly url?: string | undefined;
152
+ };
153
+ interface ImageProps extends Omit<ImageAttrsOptions, 'data'>, PassthroughImgProps {
154
+ readonly data?: HydrogenImageData | null | undefined;
155
+ }
156
+ /**
157
+ * Hydrogen-shaped `<Image>` (ADR-0003 §SDK). A thin wrapper: it computes the responsive `<img>`
158
+ * attributes via `buildImageAttrs` (src/srcSet over `/kotao-cdn/*`, CLS-safe via aspect-ratio) and
159
+ * spreads any extra `<img>` props through. All logic lives in `buildImageAttrs` (unit-tested).
160
+ */
161
+ declare function Image(props: ImageProps): ReactElement;
162
+
163
+ interface ShopifyMediaSource {
164
+ readonly url: string;
165
+ readonly mimeType?: string | null;
166
+ }
167
+ interface ShopifyMediaData {
168
+ readonly alt?: string | null;
169
+ readonly image?: ImageData | null;
170
+ readonly mediaContentType?: string | null;
171
+ readonly previewImage?: ImageData | null;
172
+ readonly sources?: readonly ShopifyMediaSource[] | null;
173
+ readonly url?: string | null;
174
+ }
175
+ interface MediaFileImageOptions {
176
+ readonly alt?: string;
177
+ readonly aspectRatio?: string;
178
+ readonly crop?: ImageCrop;
179
+ readonly format?: ImageFormat;
180
+ readonly height?: number;
181
+ readonly loading?: 'eager' | 'lazy';
182
+ readonly quality?: number;
183
+ readonly sizes?: string;
184
+ readonly srcSetWidths?: number[];
185
+ readonly width?: number;
186
+ }
187
+ interface MediaFileVideoOptions extends Omit<VideoHTMLAttributes<HTMLVideoElement>, 'children' | 'className'> {
188
+ readonly previewImageOptions?: {
189
+ readonly src?: string;
190
+ };
191
+ }
192
+ interface MediaFileProps {
193
+ readonly className?: string;
194
+ readonly data: ShopifyMediaData;
195
+ readonly mediaOptions?: {
196
+ readonly image?: MediaFileImageOptions;
197
+ readonly video?: MediaFileVideoOptions;
198
+ };
199
+ }
200
+ declare function MediaFile({ className, data, mediaOptions }: MediaFileProps): ReactElement | null;
201
+
202
+ interface MoneyData {
203
+ readonly amount: string | number;
204
+ readonly currencyCode: string;
205
+ }
206
+ interface UseMoneyValue {
207
+ readonly amount: string;
208
+ readonly currencyCode: string;
209
+ readonly currencyName: string;
210
+ readonly currencyNarrowSymbol: string;
211
+ readonly currencySymbol: string;
212
+ readonly localizedString: string;
213
+ readonly withoutTrailingZeros: string;
214
+ readonly withoutTrailingZerosAndCurrency: string;
215
+ }
216
+ interface MoneyProps {
217
+ readonly data?: MoneyData | null;
218
+ readonly as?: ElementType;
219
+ readonly withoutTrailingZeros?: boolean;
220
+ readonly withoutCurrency?: boolean;
221
+ readonly [prop: string]: unknown;
222
+ }
223
+ /**
224
+ * Hydrogen-shaped money formatter. It is intentionally pure: themes can call it during render without
225
+ * depending on browser APIs beyond `Intl`, and `<Money>` is a thin wrapper over this function.
226
+ */
227
+ declare function useMoney(data: MoneyData): UseMoneyValue;
228
+ declare function Money({ as: Component, data, withoutCurrency, withoutTrailingZeros, ...passthrough }: MoneyProps): ReactElement;
229
+
230
+ type PaginationLinkProps = AnchorHTMLAttributes<HTMLAnchorElement>;
231
+ interface HydrogenPaginationInfo<T = any> extends PaginationInfo<T> {
232
+ readonly isLoading: boolean;
233
+ readonly state: 'idle';
234
+ readonly PreviousLink: (props: PaginationLinkProps) => ReactElement;
235
+ readonly NextLink: (props: PaginationLinkProps) => ReactElement;
236
+ }
237
+ interface PaginationProps<T = any> {
238
+ connection: Connection<T>;
239
+ /** The current request URL. Hydrogen reads it from the router; pass it in to keep this framework-agnostic. */
240
+ currentUrl?: URL | string;
241
+ /** Isolates URL params when several paginations share a page. */
242
+ namespace?: string;
243
+ children: (state: HydrogenPaginationInfo<T>) => ReactNode;
244
+ }
245
+ /**
246
+ * Hydrogen-shaped `<Pagination>` (ADR-0003 §SDK). A thin render-props wrapper over `getPaginationInfo`:
247
+ * it hands the theme the current page's `nodes` + ready-built `nextPageUrl`/`prevPageUrl`. All logic
248
+ * lives in `getPaginationInfo` (unit-tested); this just calls the render prop.
249
+ */
250
+ declare function Pagination<T = any>({ connection, currentUrl, namespace, children, }: PaginationProps<T>): ReactElement;
251
+
252
+ interface SeoProps {
253
+ /** One or more SEO configs, merged root → leaf (deeper/later wins per field). */
254
+ readonly config: SeoConfig | readonly SeoConfig[];
255
+ }
256
+ /**
257
+ * Hydrogen-shaped `<Seo/>` (ADR-0003 §SDK) — renders the head descriptors `getSeoMeta` produces
258
+ * (title, meta, canonical/alternate links, JSON-LD). Themes can use this OR return `getSeoMeta(...)`
259
+ * from a route `meta` export. All merge/emit logic lives in `getSeoMeta` (unit-tested).
260
+ */
261
+ declare function Seo({ config }: SeoProps): ReactElement;
262
+
263
+ type AnchorProps = Omit<AnchorHTMLAttributes<HTMLAnchorElement>, 'href' | 'children'>;
264
+ interface ShopPayButtonProps extends AnchorProps {
265
+ readonly storeDomain?: string;
266
+ readonly variantIds: readonly string[];
267
+ readonly width?: CSSProperties['width'];
268
+ }
269
+ declare function ShopPayButton({ storeDomain, style, variantIds, width, ...props }: ShopPayButtonProps): ReactElement | null;
270
+
271
+ interface ThemeSettingsProviderProps {
272
+ readonly store: ThemeSettingsStore;
273
+ readonly children: ReactNode;
274
+ }
275
+ declare function ThemeSettingsProvider({ store, children, }: ThemeSettingsProviderProps): ReactElement;
276
+ /** The merged theme settings; re-renders on live editor patches (`useSyncExternalStore`). */
277
+ declare function useThemeSettings(): ThemeSettingsSnapshot;
278
+ /** Merged settings for one section instance (undefined if the instance is absent). */
279
+ declare function useSectionSettings(instanceId: string): ResolvedSettings | undefined;
280
+ /** The merged global theme tokens (logo, colors, fonts). */
281
+ declare function useGlobalThemeTokens(): ResolvedSettings;
282
+
283
+ /** Opens the active Smart Cart drawer (no-op if none is mounted). Wire to explicit cart-button clicks. */
284
+ declare function openSmartCart(): void;
285
+
286
+ interface CartDrawerOverlayProps {
287
+ /** Per-storefront Smart Cart config (selectors/branding). Pass shop.smartCart-derived config here. */
288
+ readonly config: SmartCartMountConfig;
289
+ /** Cart data seam — typically createStorefrontApiCartAdapter(...). */
290
+ readonly adapter: CartAdapter;
291
+ }
292
+ /**
293
+ * Mounts the framework-agnostic Smart Cart drawer for a custom (Hydrogen/SDK) theme. Client-only:
294
+ * renders null on the server and mounts the Web Component after hydration. Memoize `config`/`adapter`
295
+ * in the theme so the effect doesn't remount on every render.
296
+ */
297
+ declare function CartDrawerOverlay({ config, adapter }: CartDrawerOverlayProps): null;
298
+
299
+ export { Analytics, AnalyticsCartView, type AnalyticsCartViewProps, AnalyticsCollectionView, type AnalyticsCollectionViewProps, AnalyticsProductView, type AnalyticsProductViewProps, AnalyticsProvider, type AnalyticsProviderProps, AnalyticsSearchView, type AnalyticsSearchViewProps, CartDrawerOverlay, type CartDrawerOverlayProps, CartForm, type CartFormFetcher, type CartFormProps, type CartQueryDataReturn, type CartReturn, ConsentBanner, type ConsentBannerProps, type ConsentBannerRenderProps, Image, type ImageProps, MediaFile, type MediaFileImageOptions, type MediaFileProps, type MediaFileVideoOptions, Money, type MoneyData, type MoneyProps, type OptimisticCartLineInput, OptimisticInput, type OptimisticInputData, type OptimisticInputProps, Pagination, type PaginationProps, Seo, type SeoProps, ShopPayButton, type ShopPayButtonProps, ThemeSettingsProvider, type ThemeSettingsProviderProps, type UseMoneyValue, openSmartCart, useAnalytics, useGlobalThemeTokens, useMoney, useOptimisticData, useSectionSettings, useThemeSettings };