@godaddy/gd-commerce-storefront 0.1.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.
package/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 GoDaddy Operating Company, LLC.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,144 @@
1
+ # Commerce storefront
2
+
3
+ `@godaddy/gd-commerce-storefront` provides complete React storefront templates: a catalog, product details with variant selection, a shared cart, and a cart drawer. Applications import compiled components instead of copying and maintaining their implementation.
4
+
5
+ This is an opinionated package for React applications that use React Router 7 or 8.3+, TanStack Query 5, and the documented same-origin Commerce API. It works with the host application’s router and query provider and does not require Tailwind configuration.
6
+
7
+ ## Installation
8
+
9
+ This package is not published yet. Use the local workspace example while reviewing this branch. After the first release, install it with:
10
+
11
+ ```sh
12
+ pnpm add @godaddy/gd-commerce-storefront @tanstack/react-query react react-dom react-router
13
+ ```
14
+
15
+ Import the stylesheet once. Mount `CommerceStorefront` once inside your application's existing router and query provider. It owns the commerce state and renders one cart drawer. Keep your header and page routes inside it so cart buttons share that state.
16
+
17
+ #### Example application
18
+
19
+ ```tsx
20
+ import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
21
+ import { BrowserRouter, Route, Routes } from 'react-router';
22
+ import {
23
+ Catalog, CartButton, CommerceStorefront, ProductDetails,
24
+ } from '@godaddy/gd-commerce-storefront';
25
+ import '@godaddy/gd-commerce-storefront/styles.css';
26
+
27
+ const client = new QueryClient();
28
+
29
+ export function App() {
30
+ return (
31
+ <QueryClientProvider client={client}>
32
+ <BrowserRouter>
33
+ <CommerceStorefront>
34
+ <header><a href='/'>My store</a><CartButton /></header>
35
+ <main>
36
+ <Routes>
37
+ <Route path='/shop' element={<Catalog />} />
38
+ <Route path='/products/:productId' element={<ProductDetails />} />
39
+ </Routes>
40
+ </main>
41
+ </CommerceStorefront>
42
+ </BrowserRouter>
43
+ </QueryClientProvider>
44
+ );
45
+ }
46
+ ```
47
+
48
+ Use the providers your application already has; do not create another router or query client for this package. Your server must implement the [server API contract](docs/server-api.md) before these components can load products. Express hosts can mount `@godaddy/gd-commerce-server`; custom servers can implement the contract directly. The host owns store credentials, merchant provisioning, payment readiness, and runtime configuration.
49
+
50
+ ## Configuration
51
+
52
+ | Option | Default | Meaning |
53
+ | --- | --- | --- |
54
+ | `catalogPath` | `/shop` | Same-origin catalog route |
55
+ | `productPath` | `/products` | Same-origin prefix for product links; register `${productPath}/:productId` |
56
+ | `checkoutSuccessPath` | unset | Same-origin return route; enables checkout UI only when supplied |
57
+ | `theme` | neutral palette | CSS custom properties applied to storefront surfaces and the portalled drawer |
58
+
59
+ Provide root-relative paths without a trailing slash. Enable `checkoutSuccessPath` only after your server supports checkout and validates merchant readiness. Mount a corresponding return page. A redirect back from checkout is **not proof of payment**; that page must obtain authoritative payment status from your server. This package does not provide a payment receipt page or merchant onboarding.
60
+
61
+ `GET /api/commerce/config` supplies the currency and opaque cart scope. The scope must change when the store, channel, or currency binding changes. The draft-order cart displays its subtotal and explains that shipping, taxes, and discounts are calculated at checkout. The explanation has the stable `commerce-cart-checkout-adjustments-note` class so applications can hide it when needed. The cart does not create a checkout session or calculate adjustments. Applications do not pass store IDs or credentials into the browser package. One storefront binding is supported per page and query client.
62
+
63
+ A connection failure leaves the surrounding application and its state mounted. Catalog and product surfaces show the connection error and retry action. Custom integrations can render `CommerceStatus` or inspect `useCommerce().connection`.
64
+
65
+ #### Example appearance and copy
66
+
67
+ ```tsx
68
+ <CommerceStorefront
69
+ catalogPath='/collection'
70
+ productPath='/item'
71
+ theme={{
72
+ '--commerce-accent': '#174c3c',
73
+ '--commerce-accent-hover': '#10362b',
74
+ '--commerce-on-accent': '#ffffff',
75
+ '--commerce-surface': '#ffffff',
76
+ '--commerce-text': '#171717',
77
+ '--commerce-radius': '0.75rem',
78
+ }}
79
+ >
80
+ {/* Register /collection and /item/:productId in your router. */}
81
+ <Catalog title='Our collection' description='Made for everyday use.' />
82
+ </CommerceStorefront>
83
+ ```
84
+
85
+ The stylesheet includes all required utilities and scopes them to the package's surfaces. The build removes CSS layer wrappers in their declared order, so the exported CSS can pass through a host Tailwind v3 PostCSS pipeline without `@tailwind` directives. Import it directly; consumers do not need to copy or rewrite the CSS. It does not add a global reset or require dependency scanning by a host Tailwind build. The `theme` prop reaches the drawer even though it is portalled into `document.body`. Keep text, controls and focus indicators accessible when changing colors. Utility class names and internal markup are not a customization API.
86
+
87
+ The first release uses English UI text and `en-US` currency formatting. Catalog title and description are configurable. Full localization and arbitrary component slots are outside this initial API.
88
+
89
+ ## Compatibility
90
+
91
+ The package supports React Router 7 and React Router 8.3 or later in the 8.x series. The host still owns the router and query client; no integration API changes are needed between these versions.
92
+
93
+ The repository example uses React Router 7. Follow each router version's own React and browser requirements.
94
+
95
+ ## Components and hooks
96
+
97
+ | Export | Purpose |
98
+ | --- | --- |
99
+ | `CommerceStorefront` | Recommended integration: provider and one drawer |
100
+ | `Catalog` | Six products per cursor page, with `title`, `description`, and `showHeader` props |
101
+ | `ProductDetails` | Reads `:productId`; validates URL option selections against catalog results |
102
+ | `ProductCard` | Renders one `SKUGroup` with direct add or a product-details link |
103
+ | `CartButton` | Opens the shared drawer and displays item count |
104
+ | `AddToCartButton` | Adds a verified `sku`, `name`, and optional integer `quantity` |
105
+ | `CommerceStatus` | Connection progress/error/retry for custom layouts |
106
+ | `useCommerce` | Cart, connection, pending/error state and serialized cart actions |
107
+ | `CommerceProvider`, `CartDrawer` | Lower-level composition when the recommended wrapper does not fit; mount each once |
108
+
109
+ The package exports TypeScript catalog/cart response types and selection/summary helpers for custom product layouts. `useCommerce` actions return `Promise<boolean>`: `false` means an operation failed or its connection became stale. Inspect `error` for active-session failures. Do not automatically retry a failed mutation: the server may have committed it before the response failed. `applyDiscount(code)` is available to custom layouts; the default drawer does not render a promotion form.
110
+
111
+ `Catalog` renders its `title` as an H1 by default. When the host page owns its semantic heading, render that page H1 and pass `showHeader={false}` so the document still has exactly one H1.
112
+
113
+ ## How it works
114
+
115
+ Products are SKU groups. The package purchases only an unambiguous SKU, verifies all selected attributes through the server, uses SKU prices/images, and distinguishes untracked inventory from sold-out inventory. Server-side inventory and pricing checks remain mandatory.
116
+
117
+ Cart mutations share one queue, including initial cart creation. The cart ID is saved under `godaddy:commerce-storefront:cart:<scope>`. Browser Web Locks coordinate tabs where supported; storage/focus events refresh the cart. If storage fails, the current page keeps the cart ID in memory and shows a warning. Browsers without Web Locks have only per-provider serialization; the server must handle concurrent writes correctly.
118
+
119
+ Changing the server-provided cart scope resets cart state and prevents old responses from affecting the new connection. A failed configuration refresh temporarily disables commerce and also invalidates pending responses. Normal configuration loading and failures do not unmount host content.
120
+
121
+ ## Guides
122
+
123
+ - [Server API contract](docs/server-api.md)
124
+ - [Independent Vite consumer](../../examples/commerce-storefront/README.md)
125
+
126
+ ## Commands
127
+
128
+ From the repository root, with Node 24:
129
+
130
+ ```sh
131
+ pnpm install
132
+ pnpm --filter @godaddy/gd-commerce-storefront build
133
+ pnpm --filter @godaddy/gd-commerce-storefront typecheck
134
+ pnpm --filter @godaddy/gd-commerce-storefront lint
135
+ pnpm --filter @godaddy/gd-commerce-storefront test
136
+ pnpm --filter commerce-storefront-example build
137
+ pnpm --filter commerce-storefront-example dev
138
+ ```
139
+
140
+ Build before testing: artifact tests check the compiled JavaScript and shipped CSS as well as source behavior. The build uses local locked tool versions. Nothing in these commands publishes the package.
141
+
142
+ ## License
143
+
144
+ [MIT](LICENSE.md).
@@ -0,0 +1,395 @@
1
+ import { CSSProperties, ReactElement, ReactNode } from "react";
2
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
3
+
4
+ //#region src/api.d.ts
5
+ interface StorefrontConfig {
6
+ cartScope: string;
7
+ currencyCode: string;
8
+ catalogPath: string;
9
+ productPath: string;
10
+ checkoutSuccessPath?: string;
11
+ }
12
+ declare class ApiError extends Error {
13
+ readonly status: number;
14
+ constructor(message: string, status: number, options?: ErrorOptions);
15
+ }
16
+ declare function money(value: number, currency: string): string;
17
+ //#endregion
18
+ //#region src/cart-model.d.ts
19
+ interface Money {
20
+ value?: number | null;
21
+ currencyCode?: string | null;
22
+ }
23
+ interface DraftOrderContext {
24
+ storeId?: string | null;
25
+ channelId?: string | null;
26
+ owner?: string | null;
27
+ }
28
+ interface OrderTotals {
29
+ subTotal?: Money | null;
30
+ shippingTotal?: Money | null;
31
+ taxTotal?: Money | null;
32
+ discountTotal?: Money | null;
33
+ productDiscountTotal?: Money | null;
34
+ shippingDiscountTotal?: Money | null;
35
+ feeTotal?: Money | null;
36
+ total?: Money | null;
37
+ }
38
+ interface LineItemTotals {
39
+ subTotal?: Money | null;
40
+ taxTotal?: Money | null;
41
+ discountTotal?: Money | null;
42
+ feeTotal?: Money | null;
43
+ }
44
+ interface CartSelectedOption {
45
+ attribute?: string | null;
46
+ values?: string[] | null;
47
+ }
48
+ interface CartSelectedAddonValue {
49
+ name?: string | null;
50
+ costAdjustment?: Money | null;
51
+ }
52
+ interface CartSelectedAddon {
53
+ attribute?: string | null;
54
+ sku?: string | null;
55
+ values?: CartSelectedAddonValue[] | null;
56
+ }
57
+ interface CartLineItemDetails {
58
+ productAssetUrl?: string | null;
59
+ sku?: string | null;
60
+ unitOfMeasure?: string | null;
61
+ selectedOptions?: CartSelectedOption[] | null;
62
+ selectedAddons?: CartSelectedAddon[] | null;
63
+ }
64
+ interface CartDiscount {
65
+ id?: string | null;
66
+ name?: string | null;
67
+ code?: string | null;
68
+ amount?: Money | null;
69
+ ratePercentage?: string | null;
70
+ appliedBeforeTax?: boolean | null;
71
+ }
72
+ interface CartTax {
73
+ id?: string | null;
74
+ name?: string | null;
75
+ amount?: Money | null;
76
+ ratePercentage?: string | null;
77
+ included?: boolean | null;
78
+ exempted?: boolean | null;
79
+ }
80
+ interface CartNote {
81
+ id?: string | null;
82
+ content?: string | null;
83
+ author?: string | null;
84
+ authorType?: string | null;
85
+ createdAt?: string | null;
86
+ }
87
+ interface CartLineItem {
88
+ id?: string | null;
89
+ name?: string | null;
90
+ quantity?: number | null;
91
+ skuId?: string | null;
92
+ type?: string | null;
93
+ fulfillmentMode?: string | null;
94
+ details?: CartLineItemDetails | null;
95
+ totals?: LineItemTotals | null;
96
+ discounts?: CartDiscount[] | null;
97
+ taxes?: CartTax[] | null;
98
+ notes?: CartNote[] | null;
99
+ createdAt?: string | null;
100
+ updatedAt?: string | null;
101
+ }
102
+ interface CartAddress {
103
+ addressLine1?: string | null;
104
+ addressLine2?: string | null;
105
+ addressLine3?: string | null;
106
+ adminArea1?: string | null;
107
+ adminArea2?: string | null;
108
+ adminArea3?: string | null;
109
+ adminArea4?: string | null;
110
+ postalCode?: string | null;
111
+ countryCode?: string | null;
112
+ }
113
+ interface CartShippingInfo {
114
+ firstName?: string | null;
115
+ lastName?: string | null;
116
+ email?: string | null;
117
+ phone?: string | null;
118
+ companyName?: string | null;
119
+ address?: CartAddress | null;
120
+ }
121
+ interface CartOrder {
122
+ id?: string | null;
123
+ customerId?: string | null;
124
+ createdAt?: string | null;
125
+ updatedAt?: string | null;
126
+ context?: DraftOrderContext | null;
127
+ lineItems?: CartLineItem[] | null;
128
+ totals?: OrderTotals | null;
129
+ discounts?: CartDiscount[] | null;
130
+ taxes?: CartTax[] | null;
131
+ shipping?: CartShippingInfo | null;
132
+ notes?: CartNote[] | null;
133
+ tags?: string[] | null;
134
+ }
135
+ interface AddToCartItemInput {
136
+ skuId: string;
137
+ name: string;
138
+ quantity: number;
139
+ }
140
+ interface CartSummaryTotals {
141
+ itemCount: number;
142
+ currencyCode: string;
143
+ subtotal: number;
144
+ shipping: number;
145
+ taxes: number;
146
+ discount: number;
147
+ total: number;
148
+ }
149
+ declare function addToCart(cartId: string | null, item: AddToCartItemInput, fetchFn?: typeof globalThis.fetch): Promise<{
150
+ cart: CartOrder | null;
151
+ }>;
152
+ declare function getCartSummaryTotals(order: CartOrder | null | undefined): CartSummaryTotals;
153
+ //#endregion
154
+ //#region src/catalog-model.d.ts
155
+ interface PageInfo {
156
+ hasNextPage?: boolean | null;
157
+ hasPreviousPage?: boolean | null;
158
+ startCursor?: string | null;
159
+ endCursor?: string | null;
160
+ }
161
+ interface ConnectionEdge<T> {
162
+ cursor?: string | null;
163
+ node?: T | null;
164
+ }
165
+ interface Connection<T> {
166
+ edges?: Array<ConnectionEdge<T> | null> | null;
167
+ pageInfo?: PageInfo | null;
168
+ totalCount?: number | null;
169
+ }
170
+ interface PriceRange {
171
+ min?: number | null;
172
+ max?: number | null;
173
+ }
174
+ interface MediaObject {
175
+ id?: string | null;
176
+ url?: string | null;
177
+ type?: string | null;
178
+ label?: string | null;
179
+ position?: number | null;
180
+ }
181
+ interface InventoryCount {
182
+ id?: string | null;
183
+ quantity?: number | null;
184
+ type?: string | null;
185
+ }
186
+ interface SKUGroupAttributeValue {
187
+ id?: string | null;
188
+ name?: string | null;
189
+ label?: string | null;
190
+ }
191
+ interface SKUGroupAttribute {
192
+ id?: string | null;
193
+ name?: string | null;
194
+ label?: string | null;
195
+ description?: string | null;
196
+ htmlDescription?: string | null;
197
+ values?: Connection<SKUGroupAttributeValue> | null;
198
+ }
199
+ type SKUGroupSKU = SKU;
200
+ interface SKUGroup {
201
+ id?: string | null;
202
+ status?: string | null;
203
+ name?: string | null;
204
+ label?: string | null;
205
+ description?: string | null;
206
+ htmlDescription?: string | null;
207
+ type?: string | null;
208
+ priceRange?: PriceRange | null;
209
+ compareAtPriceRange?: PriceRange | null;
210
+ mediaObjects?: Connection<MediaObject> | null;
211
+ attributes?: Connection<SKUGroupAttribute> | null;
212
+ skus?: Connection<SKUGroupSKU> | null;
213
+ }
214
+ interface SKUPrice {
215
+ id?: string | null;
216
+ value?: Money | null;
217
+ compareAtValue?: Money | null;
218
+ }
219
+ interface SKUAttributeValue {
220
+ id?: string | null;
221
+ name?: string | null;
222
+ label?: string | null;
223
+ }
224
+ interface SKU {
225
+ id?: string | null;
226
+ label?: string | null;
227
+ name?: string | null;
228
+ description?: string | null;
229
+ htmlDescription?: string | null;
230
+ code?: string | null;
231
+ prices?: Connection<SKUPrice> | null;
232
+ inventoryCounts?: Connection<InventoryCount> | null;
233
+ mediaObjects?: Connection<MediaObject> | null;
234
+ attributeValues?: Connection<SKUAttributeValue> | null;
235
+ }
236
+ interface StringInFilter {
237
+ in: string[];
238
+ }
239
+ interface LabelFilter {
240
+ contains: string;
241
+ }
242
+ interface SkuGroupsVariables {
243
+ first?: number | null;
244
+ after?: string | null;
245
+ id?: StringInFilter;
246
+ listId?: StringInFilter;
247
+ label?: LabelFilter;
248
+ }
249
+ interface SkuGroupVariables {
250
+ id: string;
251
+ first?: number | null;
252
+ /** Attribute value `name` fields — the catalog API's `has` filter matches by `name`, not `id`. */
253
+ attributeValues?: string[];
254
+ }
255
+ interface SkuVariables {
256
+ id: string;
257
+ }
258
+ interface SkuGroupsResult {
259
+ skuGroups?: Connection<SKUGroup> | null;
260
+ }
261
+ interface SkuGroupResult {
262
+ skuGroup?: SKUGroup | null;
263
+ }
264
+ interface SkuResult {
265
+ sku?: SKU | null;
266
+ }
267
+ interface ProductGridVariablesInput {
268
+ first?: number | null;
269
+ after?: string | null;
270
+ productIds?: readonly string[];
271
+ categoryIds?: readonly string[];
272
+ searchQuery?: string;
273
+ }
274
+ interface ProductDetailsVariablesInput {
275
+ productId: string;
276
+ /** Attribute value `name` fields, not `id`. */
277
+ selectedAttributeValues?: readonly string[];
278
+ /** Number of SKUs to request before attributes are selected. Defaults to 50. */
279
+ skuGroupFirst?: number;
280
+ }
281
+ interface StorefrontProductAttributeValue {
282
+ id: string;
283
+ name: string;
284
+ label: string;
285
+ }
286
+ interface StorefrontProductAttribute {
287
+ id: string;
288
+ name: string;
289
+ label: string;
290
+ values: StorefrontProductAttributeValue[];
291
+ }
292
+ type InventoryCountContainer = {
293
+ inventoryCounts?: Connection<InventoryCount> | null;
294
+ };
295
+ type MediaObjectContainer = {
296
+ mediaObjects?: Connection<MediaObject> | null;
297
+ };
298
+ declare function getSingleMatchedSkuId(skuGroup: SKUGroup | null | undefined): string | null;
299
+ declare function getSingleMatchedSku(skuGroup: SKUGroup | null | undefined): SKU | null;
300
+ declare function getLabeledSkuOptions(skuGroup: SKUGroup | null | undefined): SKU[];
301
+ declare function getAvailableInventoryQuantity(item: InventoryCountContainer | null | undefined): number | null;
302
+ declare function getImageUrls(item: MediaObjectContainer | null | undefined): string[];
303
+ declare function getPrimaryImageUrl(item: MediaObjectContainer | null | undefined): string | null;
304
+ declare function getProductAttributes(skuGroup: SKUGroup | null | undefined): StorefrontProductAttribute[];
305
+ //#endregion
306
+ //#region src/cart.d.ts
307
+ declare function CartButton(): ReactElement;
308
+ declare function AddToCartButton({
309
+ sku,
310
+ name,
311
+ quantity
312
+ }: {
313
+ sku: SKU;
314
+ name: string;
315
+ quantity?: number;
316
+ }): ReactElement;
317
+ declare function CartDrawer(): ReactElement;
318
+ //#endregion
319
+ //#region src/catalog.d.ts
320
+ declare function ProductCard({
321
+ product
322
+ }: {
323
+ product: SKUGroup;
324
+ }): ReactElement;
325
+ interface CatalogProps {
326
+ title?: string;
327
+ description?: string;
328
+ showHeader?: boolean;
329
+ }
330
+ declare function Catalog(props: CatalogProps): ReactElement;
331
+ //#endregion
332
+ //#region src/commerce-provider.d.ts
333
+ interface CommerceContextValue {
334
+ connection: 'loading' | 'ready' | 'error';
335
+ connectionError: string | null;
336
+ retryConnection: () => void;
337
+ theme: StorefrontTheme;
338
+ config: StorefrontConfig;
339
+ cart: CartOrder | null;
340
+ open: boolean;
341
+ setOpen: (open: boolean) => void;
342
+ /** Restores the initiating control after the cart drawer closes. */
343
+ restoreFocus: () => void;
344
+ pending: boolean;
345
+ hydrating: boolean;
346
+ error: string | null;
347
+ storageWarning: string | null;
348
+ announcement: string;
349
+ addItem: (item: AddToCartItemInput) => Promise<boolean>;
350
+ changeQuantity: (itemId: string, quantity: number) => Promise<boolean>;
351
+ removeItem: (itemId: string) => Promise<boolean>;
352
+ applyDiscount: (code: string) => Promise<boolean>;
353
+ refresh: () => Promise<boolean>;
354
+ checkout: () => Promise<boolean>;
355
+ }
356
+ declare function useCommerce(): CommerceContextValue;
357
+ type StorefrontTheme = CSSProperties & {
358
+ '--commerce-accent'?: string;
359
+ '--commerce-accent-hover'?: string;
360
+ '--commerce-on-accent'?: string;
361
+ '--commerce-surface'?: string;
362
+ '--commerce-text'?: string;
363
+ '--commerce-radius'?: string;
364
+ };
365
+ interface CommerceProviderProps {
366
+ children: ReactNode;
367
+ catalogPath?: string;
368
+ productPath?: string;
369
+ /** Applied to storefront surfaces and the portalled cart drawer. */
370
+ theme?: StorefrontTheme;
371
+ /** Set only when your server has enabled checkout and this return route exists. */
372
+ checkoutSuccessPath?: string;
373
+ }
374
+ declare function CommerceProvider({
375
+ children,
376
+ catalogPath,
377
+ productPath,
378
+ checkoutSuccessPath,
379
+ theme
380
+ }: CommerceProviderProps): ReactElement;
381
+ //#endregion
382
+ //#region src/commerce-storefront.d.ts
383
+ /** Mount once inside the application's Router and QueryClientProvider. */
384
+ declare function CommerceStorefront({
385
+ children,
386
+ ...props
387
+ }: CommerceProviderProps): react_jsx_runtime0.JSX.Element;
388
+ //#endregion
389
+ //#region src/product-details.d.ts
390
+ declare function ProductDetails(): ReactElement;
391
+ //#endregion
392
+ //#region src/storefront-surface.d.ts
393
+ declare function CommerceStatus(): ReactElement | null;
394
+ //#endregion
395
+ export { AddToCartButton, AddToCartItemInput, ApiError, CartAddress, CartButton, CartDiscount, CartDrawer, CartLineItem, CartLineItemDetails, CartNote, CartOrder, CartSelectedAddon, CartSelectedAddonValue, CartSelectedOption, CartShippingInfo, CartSummaryTotals, CartTax, Catalog, type CatalogProps, type CommerceContextValue, CommerceProvider, type CommerceProviderProps, CommerceStatus, CommerceStorefront, Connection, ConnectionEdge, DraftOrderContext, InventoryCount, LabelFilter, LineItemTotals, MediaObject, Money, OrderTotals, PageInfo, PriceRange, ProductCard, ProductDetails, ProductDetailsVariablesInput, ProductGridVariablesInput, SKU, SKUAttributeValue, SKUGroup, SKUGroupAttribute, SKUGroupAttributeValue, SKUGroupSKU, SKUPrice, SkuGroupResult, SkuGroupVariables, SkuGroupsResult, SkuGroupsVariables, SkuResult, SkuVariables, type StorefrontConfig, StorefrontProductAttribute, StorefrontProductAttributeValue, type StorefrontTheme, StringInFilter, addToCart, getAvailableInventoryQuantity, getCartSummaryTotals, getImageUrls, getLabeledSkuOptions, getPrimaryImageUrl, getProductAttributes, getSingleMatchedSku, getSingleMatchedSkuId, money, useCommerce };