@fayz-ai/storefront 0.6.0 → 0.8.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/README.md +3 -1
- package/dist/auth.d.ts +12 -2
- package/dist/auth.d.ts.map +1 -1
- package/dist/blocks.d.ts +3 -3
- package/dist/blocks.d.ts.map +1 -1
- package/dist/component-contracts.d.ts +124 -0
- package/dist/component-contracts.d.ts.map +1 -0
- package/dist/component-selectors.d.ts +61 -0
- package/dist/component-selectors.d.ts.map +1 -0
- package/dist/components/CartDrawer.d.ts.map +1 -1
- package/dist/components/ProductCard.d.ts +2 -5
- package/dist/components/ProductCard.d.ts.map +1 -1
- package/dist/components/ProductEnquiryForm.d.ts +8 -0
- package/dist/components/ProductEnquiryForm.d.ts.map +1 -0
- package/dist/components/ProductGrid.d.ts.map +1 -1
- package/dist/components/RelatedProducts.d.ts +1 -1
- package/dist/components/RelatedProducts.d.ts.map +1 -1
- package/dist/components/SmoothImage.d.ts +7 -0
- package/dist/components/SmoothImage.d.ts.map +1 -0
- package/dist/components/StorefrontFooter.d.ts.map +1 -1
- package/dist/components/StorefrontHeader.d.ts.map +1 -1
- package/dist/components/sections/CategoryShowcase.d.ts.map +1 -1
- package/dist/components/sections/HeroSection.d.ts.map +1 -1
- package/dist/components/sections/MediaCarousel.d.ts +11 -0
- package/dist/components/sections/MediaCarousel.d.ts.map +1 -0
- package/dist/components/sections/MiscSections.d.ts.map +1 -1
- package/dist/components/sections/ProductRail.d.ts.map +1 -1
- package/dist/components/sections/ProductSlider.d.ts +15 -0
- package/dist/components/sections/ProductSlider.d.ts.map +1 -0
- package/dist/config.d.ts +38 -21
- package/dist/config.d.ts.map +1 -1
- package/dist/createStorefrontApp.d.ts +12 -0
- package/dist/createStorefrontApp.d.ts.map +1 -1
- package/dist/define.d.ts +17 -0
- package/dist/define.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/useStorefront.d.ts +35 -0
- package/dist/hooks/useStorefront.d.ts.map +1 -0
- package/dist/index.cjs +1113 -277
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +21 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1006 -188
- package/dist/index.js.map +1 -1
- package/dist/pages/CheckoutPage.d.ts.map +1 -1
- package/dist/pages/HomePage.d.ts +5 -2
- package/dist/pages/HomePage.d.ts.map +1 -1
- package/dist/pages/MyPurchasesPage.d.ts.map +1 -1
- package/dist/pages/OrderConfirmationPage.d.ts.map +1 -1
- package/dist/pages/ProductDetailPage.d.ts.map +1 -1
- package/dist/presets.d.ts +5 -0
- package/dist/presets.d.ts.map +1 -1
- package/dist/sections.d.ts +45 -2
- package/dist/sections.d.ts.map +1 -1
- package/dist/stores/cart.store.d.ts +5 -0
- package/dist/stores/cart.store.d.ts.map +1 -1
- package/dist/testids.d.ts +21 -0
- package/dist/testids.d.ts.map +1 -1
- package/dist/theme.d.ts +21 -1
- package/dist/theme.d.ts.map +1 -1
- package/dist/workflows/checkout.d.ts.map +1 -1
- package/package.json +10 -6
- package/src/auth.ts +47 -10
- package/src/blocks.tsx +7 -3
- package/src/component-contracts.ts +140 -0
- package/src/component-selectors.ts +31 -0
- package/src/components/CartDrawer.tsx +2 -1
- package/src/components/ProductCard.tsx +39 -23
- package/src/components/ProductEnquiryForm.tsx +175 -0
- package/src/components/ProductGrid.tsx +12 -3
- package/src/components/RelatedProducts.tsx +13 -4
- package/src/components/SmoothImage.tsx +59 -0
- package/src/components/StorefrontFooter.tsx +24 -14
- package/src/components/StorefrontHeader.tsx +74 -42
- package/src/components/sections/CategoryShowcase.tsx +3 -2
- package/src/components/sections/HeroSection.tsx +18 -2
- package/src/components/sections/MediaCarousel.tsx +141 -0
- package/src/components/sections/MiscSections.tsx +2 -1
- package/src/components/sections/ProductRail.tsx +11 -3
- package/src/components/sections/ProductSlider.tsx +119 -0
- package/src/config.ts +65 -24
- package/src/createStorefrontApp.tsx +80 -10
- package/src/define.ts +34 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useStorefront.ts +58 -0
- package/src/index.ts +62 -11
- package/src/pages/CheckoutPage.tsx +2 -1
- package/src/pages/HomePage.tsx +6 -2
- package/src/pages/MyPurchasesPage.tsx +2 -1
- package/src/pages/OrderConfirmationPage.tsx +2 -1
- package/src/pages/ProductDetailPage.tsx +138 -62
- package/src/presets.ts +66 -0
- package/src/scaffold.tsx +1 -1
- package/src/sections.ts +49 -2
- package/src/stores/cart.store.ts +16 -1
- package/src/testids.ts +21 -0
- package/src/theme.ts +36 -2
- package/src/workflows/checkout.ts +5 -2
- package/dist/slot-contracts.d.ts +0 -34
- package/dist/slot-contracts.d.ts.map +0 -1
- package/src/slot-contracts.ts +0 -20
package/README.md
CHANGED
|
@@ -5,9 +5,11 @@
|
|
|
5
5
|
[](https://www.npmjs.com/package/@fayz-ai/storefront)
|
|
6
6
|
[](https://github.com/FayaLabs/fayz-sdk/blob/main/LICENSE)
|
|
7
7
|
|
|
8
|
+
**Status:** beta — published to npm and used across Fayz dogfood apps. Pre-1.0: minor APIs may change before 1.0.
|
|
9
|
+
|
|
8
10
|
`@fayz-ai/storefront` is the customer-facing surface of the Fayz SDK: a storefront scaffold that renders a page as a tree of **blocks** (hero, products, manifesto, cart, …) defined in the app manifest. Two completely different brands come out of the same template with zero custom components — the storefront is *data*, not a fork.
|
|
9
11
|
|
|
10
|
-
It reads commerce from `@fayz-ai/shop`, so the same engine powering an admin also powers the public store. Customize from labels to a fully bespoke section via the [customization ladder](../../docs/
|
|
12
|
+
It reads commerce from `@fayz-ai/shop`, so the same engine powering an admin also powers the public store. Customize from labels to a fully bespoke section via the [customization ladder](../../docs/CUSTOMIZATION.md) — never by editing this package.
|
|
11
13
|
|
|
12
14
|
## What's inside
|
|
13
15
|
- **Scaffold** — `defineStorefront(config)` + `StorefrontScaffold` rendered by `renderApp`
|
package/dist/auth.d.ts
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import type { AuthAdapter } from '@fayz-ai/core';
|
|
2
|
-
|
|
3
|
-
export
|
|
2
|
+
import { type AuthPluginOptions } from '@fayz-ai/plugin-auth';
|
|
3
|
+
export type StorefrontAuthAdapter = AuthAdapter | 'mock' | 'supabase' | (string & {});
|
|
4
|
+
export interface StorefrontAuthConfig {
|
|
5
|
+
adapter?: AuthPluginOptions['adapter'];
|
|
6
|
+
provider?: AuthPluginOptions['provider'];
|
|
7
|
+
routes?: AuthPluginOptions['routes'];
|
|
8
|
+
supabase?: AuthPluginOptions['supabase'];
|
|
9
|
+
}
|
|
10
|
+
export declare function resolveAuthAdapter(configured: StorefrontAuthAdapter | StorefrontAuthConfig | undefined, fallback?: {
|
|
11
|
+
supabaseUrl?: string;
|
|
12
|
+
supabaseAnonKey?: string;
|
|
13
|
+
}): AuthAdapter;
|
|
4
14
|
/** Called once by createStorefrontApp. Restores any persisted session. */
|
|
5
15
|
export declare function initCustomerAuth(adapter: AuthAdapter): void;
|
|
6
16
|
export declare function getCustomerAuthAdapter(): AuthAdapter;
|
package/dist/auth.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAY,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAY,MAAM,eAAe,CAAA;AAC1D,OAAO,EAGL,KAAK,iBAAiB,EACvB,MAAM,sBAAsB,CAAA;AAY7B,MAAM,MAAM,qBAAqB,GAAG,WAAW,GAAG,MAAM,GAAG,UAAU,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAA;AAErF,MAAM,WAAW,oBAAoB;IACnC,OAAO,CAAC,EAAE,iBAAiB,CAAC,SAAS,CAAC,CAAA;IACtC,QAAQ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from '@fayz-ai/core';
|
|
2
|
-
import type {
|
|
2
|
+
import type { StorefrontSection } from './sections';
|
|
3
3
|
export declare function registerStorefrontBlocks(): void;
|
|
4
|
-
/** Convert the
|
|
5
|
-
export declare function sectionsToBlocks(sections:
|
|
4
|
+
/** Convert the typed storefront section blueprint into a generic block tree. */
|
|
5
|
+
export declare function sectionsToBlocks(sections: readonly StorefrontSection[]): BlockNode[];
|
|
6
6
|
//# sourceMappingURL=blocks.d.ts.map
|
package/dist/blocks.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blocks.d.ts","sourceRoot":"","sources":["../src/blocks.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"blocks.d.ts","sourceRoot":"","sources":["../src/blocks.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAwBnD,wBAAgB,wBAAwB,IAAI,IAAI,CAa/C;AAKD,gFAAgF;AAChF,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,SAAS,iBAAiB,EAAE,GAAG,SAAS,EAAE,CAKpF"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { Category, CreateProductEnquiryInput, Product, ProductEnquiry, ProductImage } from '@fayz-ai/shop/types';
|
|
3
|
+
import type { ProductOptionGroup, ProductOptionSelection } from './product-options';
|
|
4
|
+
import type { ResolvedStorefrontConfig, StorefrontCommerceMode } from './config';
|
|
5
|
+
import type { MediaCarouselItem } from './sections';
|
|
6
|
+
export interface StorefrontComponentBaseProps {
|
|
7
|
+
config: ResolvedStorefrontConfig;
|
|
8
|
+
commerceMode: StorefrontCommerceMode;
|
|
9
|
+
className?: string;
|
|
10
|
+
testId?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface StorefrontActions {
|
|
13
|
+
navigateTo: (to: string) => void;
|
|
14
|
+
addToCart: (product: Product, quantity?: number, options?: ProductOptionSelection) => void;
|
|
15
|
+
openCart: () => void;
|
|
16
|
+
closeCart: () => void;
|
|
17
|
+
createProductEnquiry: (input: CreateProductEnquiryInput) => Promise<ProductEnquiry>;
|
|
18
|
+
}
|
|
19
|
+
export interface ProductCardProps extends StorefrontComponentBaseProps {
|
|
20
|
+
product: Product;
|
|
21
|
+
actions: Pick<StorefrontActions, 'navigateTo' | 'addToCart' | 'openCart'>;
|
|
22
|
+
}
|
|
23
|
+
export interface ProductDetailProps extends StorefrontComponentBaseProps {
|
|
24
|
+
product: Product;
|
|
25
|
+
primaryImage?: ProductImage;
|
|
26
|
+
optionGroups: ProductOptionGroup[];
|
|
27
|
+
selectedOptions: ProductOptionSelection;
|
|
28
|
+
setSelectedOptions: React.Dispatch<React.SetStateAction<ProductOptionSelection>>;
|
|
29
|
+
quantity: number;
|
|
30
|
+
setQuantity: React.Dispatch<React.SetStateAction<number>>;
|
|
31
|
+
soldOut: boolean;
|
|
32
|
+
lowStock: boolean;
|
|
33
|
+
actions: Pick<StorefrontActions, 'addToCart' | 'createProductEnquiry' | 'navigateTo'>;
|
|
34
|
+
addToCart: () => void;
|
|
35
|
+
openEnquiry: () => void;
|
|
36
|
+
}
|
|
37
|
+
export interface ProductGalleryProps extends StorefrontComponentBaseProps {
|
|
38
|
+
product: Product;
|
|
39
|
+
images: ProductImage[];
|
|
40
|
+
primaryImage?: ProductImage;
|
|
41
|
+
}
|
|
42
|
+
export interface ProductPriceProps extends StorefrontComponentBaseProps {
|
|
43
|
+
product: Product;
|
|
44
|
+
value: number;
|
|
45
|
+
compareAt?: number | null;
|
|
46
|
+
}
|
|
47
|
+
export interface ProductActionsProps extends StorefrontComponentBaseProps {
|
|
48
|
+
product: Product;
|
|
49
|
+
quantity: number;
|
|
50
|
+
setQuantity: React.Dispatch<React.SetStateAction<number>>;
|
|
51
|
+
soldOut: boolean;
|
|
52
|
+
actions: Pick<StorefrontActions, 'addToCart' | 'createProductEnquiry' | 'navigateTo'>;
|
|
53
|
+
addToCart: () => void;
|
|
54
|
+
openEnquiry: () => void;
|
|
55
|
+
}
|
|
56
|
+
export interface ProductEnquiryFormContractProps extends StorefrontComponentBaseProps {
|
|
57
|
+
product: Product;
|
|
58
|
+
onSuccess?: () => void;
|
|
59
|
+
}
|
|
60
|
+
export interface CategoryCardProps extends StorefrontComponentBaseProps {
|
|
61
|
+
category: Category;
|
|
62
|
+
actions: Pick<StorefrontActions, 'navigateTo'>;
|
|
63
|
+
}
|
|
64
|
+
export interface CollectionSectionProps extends StorefrontComponentBaseProps {
|
|
65
|
+
title: string;
|
|
66
|
+
subtitle?: string;
|
|
67
|
+
products: Product[];
|
|
68
|
+
category?: Category;
|
|
69
|
+
children?: React.ReactNode;
|
|
70
|
+
}
|
|
71
|
+
export interface HeroSectionContractProps extends StorefrontComponentBaseProps {
|
|
72
|
+
title: string;
|
|
73
|
+
subtitle?: string;
|
|
74
|
+
eyebrow?: string;
|
|
75
|
+
image?: string;
|
|
76
|
+
cta?: string;
|
|
77
|
+
href?: string;
|
|
78
|
+
children?: React.ReactNode;
|
|
79
|
+
}
|
|
80
|
+
export interface MediaCarouselProps extends StorefrontComponentBaseProps {
|
|
81
|
+
items: MediaCarouselItem[];
|
|
82
|
+
height?: 'medium' | 'tall' | 'screen';
|
|
83
|
+
autoplayMs?: number;
|
|
84
|
+
overlay?: 'dark' | 'soft' | 'none';
|
|
85
|
+
}
|
|
86
|
+
export interface ProductSliderProps extends StorefrontComponentBaseProps {
|
|
87
|
+
title: string;
|
|
88
|
+
subtitle?: string;
|
|
89
|
+
eyebrow?: string;
|
|
90
|
+
filter?: 'sale' | 'new' | 'all';
|
|
91
|
+
categoryName?: string;
|
|
92
|
+
collection?: string;
|
|
93
|
+
limit?: number;
|
|
94
|
+
cta?: string;
|
|
95
|
+
href?: string;
|
|
96
|
+
}
|
|
97
|
+
export interface StorefrontChromeProps extends StorefrontComponentBaseProps {
|
|
98
|
+
children?: React.ReactNode;
|
|
99
|
+
}
|
|
100
|
+
export interface StorefrontStateProps extends StorefrontComponentBaseProps {
|
|
101
|
+
title?: string;
|
|
102
|
+
message?: string;
|
|
103
|
+
children?: React.ReactNode;
|
|
104
|
+
}
|
|
105
|
+
export interface StorefrontComponents {
|
|
106
|
+
ProductCard?: React.ComponentType<ProductCardProps>;
|
|
107
|
+
ProductDetail?: React.ComponentType<ProductDetailProps>;
|
|
108
|
+
ProductGallery?: React.ComponentType<ProductGalleryProps>;
|
|
109
|
+
ProductPrice?: React.ComponentType<ProductPriceProps>;
|
|
110
|
+
ProductActions?: React.ComponentType<ProductActionsProps>;
|
|
111
|
+
ProductEnquiryForm?: React.ComponentType<ProductEnquiryFormContractProps>;
|
|
112
|
+
CategoryCard?: React.ComponentType<CategoryCardProps>;
|
|
113
|
+
CollectionSection?: React.ComponentType<CollectionSectionProps>;
|
|
114
|
+
HeroSection?: React.ComponentType<HeroSectionContractProps>;
|
|
115
|
+
MediaCarousel?: React.ComponentType<MediaCarouselProps>;
|
|
116
|
+
ProductSlider?: React.ComponentType<ProductSliderProps>;
|
|
117
|
+
Header?: React.ComponentType<StorefrontChromeProps>;
|
|
118
|
+
Footer?: React.ComponentType<StorefrontChromeProps>;
|
|
119
|
+
Shell?: React.ComponentType<StorefrontChromeProps>;
|
|
120
|
+
EmptyState?: React.ComponentType<StorefrontStateProps>;
|
|
121
|
+
LoadingState?: React.ComponentType<StorefrontStateProps>;
|
|
122
|
+
ErrorState?: React.ComponentType<StorefrontStateProps>;
|
|
123
|
+
}
|
|
124
|
+
//# sourceMappingURL=component-contracts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-contracts.d.ts","sourceRoot":"","sources":["../src/component-contracts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AA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E,KAAK,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAA;IACnD,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,qBAAqB,CAAC,CAAA;IAClD,UAAU,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,oBAAoB,CAAC,CAAA;IACtD,YAAY,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,oBAAoB,CAAC,CAAA;IACxD,UAAU,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,oBAAoB,CAAC,CAAA;CAEvD"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stable selectors that custom storefront components must preserve.
|
|
3
|
+
*
|
|
4
|
+
* Apps can fully customize the visual tree, but replacement components still
|
|
5
|
+
* need these anchors so smoke tests, QA, and agents can operate stores.
|
|
6
|
+
*/
|
|
7
|
+
export declare const productCardComponentContract: {
|
|
8
|
+
readonly root: {
|
|
9
|
+
readonly 'data-testid': "product-card";
|
|
10
|
+
};
|
|
11
|
+
readonly name: {
|
|
12
|
+
readonly 'data-testid': "product-card-name";
|
|
13
|
+
};
|
|
14
|
+
readonly priceTestId: "product-card-price";
|
|
15
|
+
readonly addButton: {
|
|
16
|
+
readonly 'data-testid': "product-card-add";
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
export declare const storefrontComponentContracts: {
|
|
20
|
+
readonly productCard: {
|
|
21
|
+
readonly root: {
|
|
22
|
+
readonly 'data-testid': "product-card";
|
|
23
|
+
};
|
|
24
|
+
readonly name: {
|
|
25
|
+
readonly 'data-testid': "product-card-name";
|
|
26
|
+
};
|
|
27
|
+
readonly priceTestId: "product-card-price";
|
|
28
|
+
readonly addButton: {
|
|
29
|
+
readonly 'data-testid': "product-card-add";
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
readonly productDetail: {
|
|
33
|
+
readonly root: {
|
|
34
|
+
readonly 'data-testid': "pdp-root";
|
|
35
|
+
};
|
|
36
|
+
readonly gallery: {
|
|
37
|
+
readonly 'data-testid': "pdp-gallery";
|
|
38
|
+
};
|
|
39
|
+
readonly name: {
|
|
40
|
+
readonly 'data-testid': "pdp-name";
|
|
41
|
+
};
|
|
42
|
+
readonly description: {
|
|
43
|
+
readonly 'data-testid': "pdp-description";
|
|
44
|
+
};
|
|
45
|
+
readonly actions: {
|
|
46
|
+
readonly 'data-testid': "pdp-actions";
|
|
47
|
+
};
|
|
48
|
+
readonly addButton: {
|
|
49
|
+
readonly 'data-testid': "pdp-add-to-cart";
|
|
50
|
+
};
|
|
51
|
+
readonly enquiryButton: {
|
|
52
|
+
readonly 'data-testid': "pdp-enquiry-button";
|
|
53
|
+
};
|
|
54
|
+
readonly enquiryForm: {
|
|
55
|
+
readonly 'data-testid': "enquiry-form";
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
export type ProductCardComponentContract = typeof productCardComponentContract;
|
|
60
|
+
export type ProductDetailComponentContract = typeof storefrontComponentContracts.productDetail;
|
|
61
|
+
//# sourceMappingURL=component-selectors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-selectors.d.ts","sourceRoot":"","sources":["../src/component-selectors.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;CAK/B,CAAA;AAEV,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAY/B,CAAA;AAEV,MAAM,MAAM,4BAA4B,GAAG,OAAO,4BAA4B,CAAA;AAC9E,MAAM,MAAM,8BAA8B,GAAG,OAAO,4BAA4B,CAAC,aAAa,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CartDrawer.d.ts","sourceRoot":"","sources":["../../src/components/CartDrawer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"CartDrawer.d.ts","sourceRoot":"","sources":["../../src/components/CartDrawer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAA;AAkBlD,wBAAgB,UAAU,6BAwOzB"}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type {
|
|
3
|
-
export
|
|
4
|
-
product: Product;
|
|
5
|
-
}
|
|
6
|
-
export declare function ProductCard({ product }: ProductCardProps): React.JSX.Element;
|
|
2
|
+
import type { ProductCardProps } from '../component-contracts';
|
|
3
|
+
export declare function ProductCard({ product, config: providedConfig, actions: providedActions }: ProductCardProps): React.JSX.Element;
|
|
7
4
|
//# sourceMappingURL=ProductCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductCard.d.ts","sourceRoot":"","sources":["../../src/components/ProductCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"ProductCard.d.ts","sourceRoot":"","sources":["../../src/components/ProductCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AASzB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAG9D,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,eAAe,EAAE,EAAE,gBAAgB,qBA2G1G"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Product } from '@fayz-ai/shop/types';
|
|
3
|
+
export interface ProductEnquiryFormProps {
|
|
4
|
+
product: Product;
|
|
5
|
+
onSuccess?: () => void;
|
|
6
|
+
}
|
|
7
|
+
export declare function ProductEnquiryForm({ product, onSuccess }: ProductEnquiryFormProps): React.JSX.Element;
|
|
8
|
+
//# sourceMappingURL=ProductEnquiryForm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductEnquiryForm.d.ts","sourceRoot":"","sources":["../../src/components/ProductEnquiryForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAGvC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAKlD,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,OAAO,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;CACvB;AAYD,wBAAgB,kBAAkB,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,uBAAuB,qBAuJjF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductGrid.d.ts","sourceRoot":"","sources":["../../src/components/ProductGrid.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"ProductGrid.d.ts","sourceRoot":"","sources":["../../src/components/ProductGrid.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAMlD,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE;IAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,qBAmC3F"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { Product } from '@fayz-ai/shop/types';
|
|
3
3
|
/** "Você também pode gostar" — products from the same category, excluding the
|
|
4
|
-
* current one. Renders through the store's configured card
|
|
4
|
+
* current one. Renders through the store's configured card component for visual
|
|
5
5
|
* consistency with the catalog. Hidden when there's nothing relevant. */
|
|
6
6
|
export declare function RelatedProducts({ product }: {
|
|
7
7
|
product: Product;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RelatedProducts.d.ts","sourceRoot":"","sources":["../../src/components/RelatedProducts.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAuB,OAAO,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"RelatedProducts.d.ts","sourceRoot":"","sources":["../../src/components/RelatedProducts.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAuB,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAMvE;;0EAE0E;AAC1E,wBAAgB,eAAe,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,4BA6BhE"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type StorefrontImageLoadingConfig } from '../config';
|
|
3
|
+
export interface SmoothImageProps extends React.ImgHTMLAttributes<HTMLImageElement> {
|
|
4
|
+
imageLoading?: StorefrontImageLoadingConfig;
|
|
5
|
+
}
|
|
6
|
+
export declare function SmoothImage({ imageLoading, loading, decoding, onLoad, style, ...props }: SmoothImageProps): React.JSX.Element;
|
|
7
|
+
//# sourceMappingURL=SmoothImage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SmoothImage.d.ts","sourceRoot":"","sources":["../../src/components/SmoothImage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAA+B,KAAK,4BAA4B,EAAE,MAAM,WAAW,CAAA;AAE1F,MAAM,WAAW,gBAAiB,SAAQ,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC;IACjF,YAAY,CAAC,EAAE,4BAA4B,CAAA;CAC5C;AAED,wBAAgB,WAAW,CAAC,EAC1B,YAAY,EACZ,OAAgB,EAChB,QAAkB,EAClB,MAAM,EACN,KAAK,EACL,GAAG,KAAK,EACT,EAAE,gBAAgB,qBA4ClB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StorefrontFooter.d.ts","sourceRoot":"","sources":["../../src/components/StorefrontFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,wBAAgB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"StorefrontFooter.d.ts","sourceRoot":"","sources":["../../src/components/StorefrontFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,wBAAgB,gBAAgB,sBAuG/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StorefrontHeader.d.ts","sourceRoot":"","sources":["../../src/components/StorefrontHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"StorefrontHeader.d.ts","sourceRoot":"","sources":["../../src/components/StorefrontHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AA0SvC,wBAAgB,gBAAgB,sBA2E/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CategoryShowcase.d.ts","sourceRoot":"","sources":["../../../src/components/sections/CategoryShowcase.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"CategoryShowcase.d.ts","sourceRoot":"","sources":["../../../src/components/sections/CategoryShowcase.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAUzB,wBAAgB,gBAAgB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,4BAqEhG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeroSection.d.ts","sourceRoot":"","sources":["../../../src/components/sections/HeroSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAA;AAE1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"HeroSection.d.ts","sourceRoot":"","sources":["../../../src/components/sections/HeroSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAA;AAE1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AA+C9C,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,MAAM,EACN,MAAe,GAChB,EAAE;IACD,OAAO,EAAE,WAAW,CAAA;IACpB,MAAM,EAAE,SAAS,EAAE,CAAA;IACnB,MAAM,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAA;CAC3B,4BAsIA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { MediaCarouselItem } from '../../sections';
|
|
3
|
+
export interface MediaCarouselProps {
|
|
4
|
+
items: MediaCarouselItem[];
|
|
5
|
+
height?: 'medium' | 'tall' | 'screen';
|
|
6
|
+
autoplayMs?: number;
|
|
7
|
+
overlay?: 'dark' | 'soft' | 'none';
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function MediaCarousel({ items, height, autoplayMs, overlay, className, }: MediaCarouselProps): React.JSX.Element | null;
|
|
11
|
+
//# sourceMappingURL=MediaCarousel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MediaCarousel.d.ts","sourceRoot":"","sources":["../../../src/components/sections/MediaCarousel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAA;AAK1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAGvD,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,iBAAiB,EAAE,CAAA;IAC1B,MAAM,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAA;IACrC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;IAClC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAcD,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,MAAe,EACf,UAAiB,EACjB,OAAgB,EAChB,SAAc,GACf,EAAE,kBAAkB,4BA0GpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MiscSections.d.ts","sourceRoot":"","sources":["../../../src/components/sections/MiscSections.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"MiscSections.d.ts","sourceRoot":"","sources":["../../../src/components/sections/MiscSections.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAavC,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,qBAkBtG;AAED,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,QAAQ,EACR,OAAO,EACP,GAAG,EACH,IAAI,EACJ,KAAK,EACL,GAAS,GACV,EAAE;IACD,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,qBA4BA;AAED,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,qBAO/E;AAED,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,qBA0BjH;AAED,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,qBAyCxF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductRail.d.ts","sourceRoot":"","sources":["../../../src/components/sections/ProductRail.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"ProductRail.d.ts","sourceRoot":"","sources":["../../../src/components/sections/ProductRail.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAA;AAStC,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,QAAQ,EACR,OAAO,EACP,MAAc,EACd,KAAS,GACV,EAAE;IACD,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,KAAK,CAAA;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,4BA2DA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ProductSliderProps {
|
|
3
|
+
title: string;
|
|
4
|
+
subtitle?: string;
|
|
5
|
+
eyebrow?: string;
|
|
6
|
+
filter?: 'sale' | 'new' | 'all';
|
|
7
|
+
categoryName?: string;
|
|
8
|
+
collection?: string;
|
|
9
|
+
limit?: number;
|
|
10
|
+
cta?: string;
|
|
11
|
+
href?: string;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function ProductSlider({ title, subtitle, eyebrow, filter, categoryName, collection, limit, cta, href, className, }: ProductSliderProps): React.JSX.Element | null;
|
|
15
|
+
//# sourceMappingURL=ProductSlider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProductSlider.d.ts","sourceRoot":"","sources":["../../../src/components/sections/ProductSlider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0B,MAAM,OAAO,CAAA;AAS9C,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,KAAK,CAAA;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,QAAQ,EACR,OAAO,EACP,MAAc,EACd,YAAY,EACZ,UAAU,EACV,KAAU,EACV,GAAgB,EAChB,IAAI,EACJ,SAAc,GACf,EAAE,kBAAkB,4BAqFpB"}
|
package/dist/config.d.ts
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { Product } from '@fayz-ai/shop/types';
|
|
3
2
|
import type { ShopProvider } from '@fayz-ai/shop/provider';
|
|
4
3
|
import type { MockShopSeed } from '@fayz-ai/shop/mock';
|
|
5
4
|
import type { StorefrontTheme } from './theme';
|
|
6
5
|
import type { HomeConfig, NavLink, FooterConfig } from './sections';
|
|
7
|
-
import type {
|
|
8
|
-
|
|
9
|
-
product: Product;
|
|
10
|
-
}
|
|
6
|
+
import type { StorefrontAuthConfig } from './auth';
|
|
7
|
+
import type { StorefrontComponents } from './component-contracts';
|
|
11
8
|
export type StorefrontRouteKind = 'home' | 'catalog' | 'product' | 'checkout' | 'account' | 'order' | 'custom';
|
|
12
9
|
export type StorefrontRouteParams = Record<string, string>;
|
|
13
10
|
export interface StorefrontRouteComponentProps {
|
|
@@ -16,6 +13,14 @@ export interface StorefrontRouteComponentProps {
|
|
|
16
13
|
config: ResolvedStorefrontConfig;
|
|
17
14
|
}
|
|
18
15
|
export type StorefrontRouteChrome = 'default' | 'focused';
|
|
16
|
+
export type StorefrontCommerceMode = 'checkout' | 'catalog' | 'enquiry';
|
|
17
|
+
export type StorefrontImageLoadingMode = 'fade' | 'none';
|
|
18
|
+
export interface StorefrontImageLoadingConfig {
|
|
19
|
+
mode?: StorefrontImageLoadingMode;
|
|
20
|
+
durationMs?: number;
|
|
21
|
+
easing?: string;
|
|
22
|
+
blur?: boolean;
|
|
23
|
+
}
|
|
19
24
|
export interface StorefrontRouteDefinition {
|
|
20
25
|
/**
|
|
21
26
|
* Stable identifier for generated-code diffs, QA reports, and route ownership.
|
|
@@ -40,20 +45,19 @@ export interface StorefrontRouteDefinition {
|
|
|
40
45
|
*/
|
|
41
46
|
component: React.ComponentType<StorefrontRouteComponentProps>;
|
|
42
47
|
}
|
|
43
|
-
export interface StorefrontSlots {
|
|
44
|
-
/**
|
|
45
|
-
* Product card renderer used by catalog grids and product rails.
|
|
46
|
-
*
|
|
47
|
-
* Custom renderers must preserve `productCardSlotContract` selectors so
|
|
48
|
-
* checkout smoke tests, QA, and agents can still operate the storefront.
|
|
49
|
-
*/
|
|
50
|
-
ProductCard?: React.ComponentType<ProductCardSlotProps>;
|
|
51
|
-
}
|
|
52
48
|
export interface StorefrontDiscountConfig {
|
|
53
49
|
code: string;
|
|
54
50
|
percent: number;
|
|
55
51
|
title?: string;
|
|
56
52
|
}
|
|
53
|
+
export interface StorefrontEnquiryConfig {
|
|
54
|
+
label?: string;
|
|
55
|
+
successMessage?: string;
|
|
56
|
+
subjectPrefix?: string;
|
|
57
|
+
email?: string;
|
|
58
|
+
whatsappUrl?: string;
|
|
59
|
+
requirePhone?: boolean;
|
|
60
|
+
}
|
|
57
61
|
export interface StorefrontConfig {
|
|
58
62
|
/** Store display name (header, page title) */
|
|
59
63
|
name: string;
|
|
@@ -65,6 +69,8 @@ export interface StorefrontConfig {
|
|
|
65
69
|
locale?: string;
|
|
66
70
|
/** Visual identity: colors, fonts, radius, header/card personality */
|
|
67
71
|
theme?: StorefrontTheme;
|
|
72
|
+
/** Checkout-first default, catalog-only browsing, or product enquiry flow. */
|
|
73
|
+
commerceMode?: StorefrontCommerceMode;
|
|
68
74
|
/** Promo message above the header (e.g. 'FRETE GRÁTIS ACIMA DE R$ 300') */
|
|
69
75
|
announcement?: string;
|
|
70
76
|
/** Home page blueprint. When set, `/` renders it and the catalog moves to /catalog. */
|
|
@@ -99,9 +105,7 @@ export interface StorefrontConfig {
|
|
|
99
105
|
returns?: string;
|
|
100
106
|
};
|
|
101
107
|
/** Customer auth — same AuthAdapter contract as createSaasApp. Default: mock. */
|
|
102
|
-
auth?:
|
|
103
|
-
adapter?: StorefrontAuthAdapter;
|
|
104
|
-
};
|
|
108
|
+
auth?: StorefrontAuthConfig;
|
|
105
109
|
/** Shipping pricing — default { flatRate: 0 } */
|
|
106
110
|
shipping?: {
|
|
107
111
|
flatRate?: number;
|
|
@@ -115,15 +119,21 @@ export interface StorefrontConfig {
|
|
|
115
119
|
payments?: {
|
|
116
120
|
mode?: 'mock' | 'pix-mercadopago';
|
|
117
121
|
};
|
|
118
|
-
/**
|
|
122
|
+
/** Product enquiry behavior for catalog/enquiry stores. */
|
|
123
|
+
enquiry?: StorefrontEnquiryConfig;
|
|
124
|
+
/** Feature toggles — defaults depend on commerceMode. */
|
|
119
125
|
features?: {
|
|
120
126
|
discounts?: boolean;
|
|
121
127
|
accounts?: boolean;
|
|
128
|
+
cart?: boolean;
|
|
129
|
+
checkout?: boolean;
|
|
122
130
|
};
|
|
123
|
-
/**
|
|
124
|
-
|
|
131
|
+
/** Global storefront image reveal behavior. Default is a soft fade. */
|
|
132
|
+
imageLoading?: StorefrontImageLoadingConfig;
|
|
133
|
+
/** Code-level component replacements. Kept out of serialized manifests. */
|
|
134
|
+
components?: StorefrontComponents;
|
|
125
135
|
/** Code-level route overrides/custom routes. Kept out of serialized manifests. */
|
|
126
|
-
routes?: StorefrontRouteDefinition[];
|
|
136
|
+
routes?: readonly StorefrontRouteDefinition[];
|
|
127
137
|
}
|
|
128
138
|
export interface ResolvedStorefrontConfig extends StorefrontConfig {
|
|
129
139
|
currency: string;
|
|
@@ -135,10 +145,15 @@ export interface ResolvedStorefrontConfig extends StorefrontConfig {
|
|
|
135
145
|
payments: {
|
|
136
146
|
mode: 'mock' | 'pix-mercadopago';
|
|
137
147
|
};
|
|
148
|
+
commerceMode: StorefrontCommerceMode;
|
|
149
|
+
enquiry: Required<Pick<StorefrontEnquiryConfig, 'label' | 'successMessage' | 'subjectPrefix'>> & Omit<StorefrontEnquiryConfig, 'label' | 'successMessage' | 'subjectPrefix'>;
|
|
138
150
|
features: {
|
|
139
151
|
discounts: boolean;
|
|
140
152
|
accounts: boolean;
|
|
153
|
+
cart: boolean;
|
|
154
|
+
checkout: boolean;
|
|
141
155
|
};
|
|
156
|
+
imageLoading: Required<StorefrontImageLoadingConfig>;
|
|
142
157
|
/** Where the full product list lives ('/' without a home page, '/catalog' with one) */
|
|
143
158
|
catalogPath: string;
|
|
144
159
|
nav: NavLink[];
|
|
@@ -146,4 +161,6 @@ export interface ResolvedStorefrontConfig extends StorefrontConfig {
|
|
|
146
161
|
export declare function resolveConfig(config: StorefrontConfig): ResolvedStorefrontConfig;
|
|
147
162
|
export declare const StorefrontConfigProvider: React.Provider<ResolvedStorefrontConfig | null>;
|
|
148
163
|
export declare function useStorefrontConfig(): ResolvedStorefrontConfig;
|
|
164
|
+
export declare function useStorefrontConfigOptional(): ResolvedStorefrontConfig | null;
|
|
165
|
+
export declare function getStorefrontComponents(config: ResolvedStorefrontConfig): StorefrontComponents;
|
|
149
166
|
//# sourceMappingURL=config.d.ts.map
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAA;AACxD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAA;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAC9C,OAAO,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACnE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,QAAQ,CAAA;AAClD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAA;AAEjE,MAAM,MAAM,mBAAmB,GAC3B,MAAM,GACN,SAAS,GACT,SAAS,GACT,UAAU,GACV,SAAS,GACT,OAAO,GACP,QAAQ,CAAA;AAEZ,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAE1D,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,qBAAqB,CAAA;IAC7B,MA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wBAAgB,aAAa,CAAC,MAAM,EAAE,gBAAgB,GAAG,wBAAwB,CA8ChF;AAID,eAAO,MAAM,wBAAwB,iDAAmC,CAAA;AAExE,wBAAgB,mBAAmB,IAAI,wBAAwB,CAI9D;AAED,wBAAgB,2BAA2B,IAAI,wBAAwB,GAAG,IAAI,CAE7E;AAED,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,wBAAwB,GAAG,oBAAoB,CAE9F"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { ShopProvider } from '@fayz-ai/shop/provider';
|
|
2
3
|
import type { StorefrontConfig } from './config';
|
|
4
|
+
import type { StorefrontComponents } from './component-contracts';
|
|
5
|
+
import type { StorefrontSection } from './sections';
|
|
3
6
|
export declare function initStorefrontRuntime(config: StorefrontConfig): void;
|
|
4
7
|
/** The inner storefront UI. Reads everything from the config context, so it is
|
|
5
8
|
* shared by createStorefrontApp and the manifest-driven StorefrontScaffold. */
|
|
@@ -13,4 +16,13 @@ export declare function StorefrontShell(): React.JSX.Element;
|
|
|
13
16
|
* const App = createStorefrontApp({ name: 'Aurora Goods', currency: 'BRL' })
|
|
14
17
|
*/
|
|
15
18
|
export declare function createStorefrontApp(config: StorefrontConfig): React.ComponentType;
|
|
19
|
+
export interface CreateStorefrontOptions {
|
|
20
|
+
config: StorefrontConfig;
|
|
21
|
+
provider?: ShopProvider;
|
|
22
|
+
components?: StorefrontComponents;
|
|
23
|
+
routes?: StorefrontConfig['routes'];
|
|
24
|
+
pages?: StorefrontConfig['routes'];
|
|
25
|
+
sections?: readonly StorefrontSection[];
|
|
26
|
+
}
|
|
27
|
+
export declare function createStorefront(options: CreateStorefrontOptions): React.ComponentType;
|
|
16
28
|
//# sourceMappingURL=createStorefrontApp.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createStorefrontApp.d.ts","sourceRoot":"","sources":["../src/createStorefrontApp.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"createStorefrontApp.d.ts","sourceRoot":"","sources":["../src/createStorefrontApp.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAA;AAG1D,OAAO,KAAK,EAAE,gBAAgB,EAA4B,MAAM,UAAU,CAAA;AAC1E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAA;AACjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AA2GnD,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI,CAmCpE;AAED;gFACgF;AAChF,wBAAgB,eAAe,sBAkC9B;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,gBAAgB,GAAG,KAAK,CAAC,aAAa,CAajF;AAED,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,gBAAgB,CAAA;IACxB,QAAQ,CAAC,EAAE,YAAY,CAAA;IACvB,UAAU,CAAC,EAAE,oBAAoB,CAAA;IACjC,MAAM,CAAC,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAA;IACnC,KAAK,CAAC,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAA;IAClC,QAAQ,CAAC,EAAE,SAAS,iBAAiB,EAAE,CAAA;CACxC;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,uBAAuB,GAAG,KAAK,CAAC,aAAa,CAgBtF"}
|
package/dist/define.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { StorefrontConfig, StorefrontRouteDefinition } from './config';
|
|
2
|
+
import type { StorefrontComponents } from './component-contracts';
|
|
3
|
+
import type { StorefrontSection } from './sections';
|
|
4
|
+
import type { CreateStorefrontOptions } from './createStorefrontApp';
|
|
5
|
+
/**
|
|
6
|
+
* Identity helpers for generated/custom storefronts.
|
|
7
|
+
*
|
|
8
|
+
* They do not add runtime behavior; they make the intended client-app shape
|
|
9
|
+
* explicit and keep TypeScript inference tight across config, components, routes,
|
|
10
|
+
* sections and app creation options.
|
|
11
|
+
*/
|
|
12
|
+
export declare function defineStorefrontConfig<const T extends StorefrontConfig>(config: T): T;
|
|
13
|
+
export declare function defineStorefrontComponents<const T extends StorefrontComponents>(components: T): T;
|
|
14
|
+
export declare function defineStorefrontRoutes<const T extends readonly StorefrontRouteDefinition[]>(routes: T): T;
|
|
15
|
+
export declare function defineStorefrontSections<const T extends readonly StorefrontSection[]>(sections: T): T;
|
|
16
|
+
export declare function defineStorefrontApp<const T extends CreateStorefrontOptions>(options: T): T;
|
|
17
|
+
//# sourceMappingURL=define.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define.d.ts","sourceRoot":"","sources":["../src/define.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,yBAAyB,EAC1B,MAAM,UAAU,CAAA;AACjB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAA;AACjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AACnD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAA;AAEpE;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,CAAC,CAAC,SAAS,gBAAgB,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,CAErF;AAED,wBAAgB,0BAA0B,CAAC,KAAK,CAAC,CAAC,SAAS,oBAAoB,EAAE,UAAU,EAAE,CAAC,GAAG,CAAC,CAEjG;AAED,wBAAgB,sBAAsB,CAAC,KAAK,CAAC,CAAC,SAAS,SAAS,yBAAyB,EAAE,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,CAEzG;AAED,wBAAgB,wBAAwB,CAAC,KAAK,CAAC,CAAC,SAAS,SAAS,iBAAiB,EAAE,EAAE,QAAQ,EAAE,CAAC,GAAG,CAAC,CAErG;AAED,wBAAgB,mBAAmB,CAAC,KAAK,CAAC,CAAC,SAAS,uBAAuB,EAAE,OAAO,EAAE,CAAC,GAAG,CAAC,CAE1F"}
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { useProducts } from './useProducts';
|
|
2
2
|
export { useProduct } from './useProduct';
|
|
3
3
|
export { useCategories } from './useCategories';
|
|
4
|
+
export { useStorefront, useCatalog, useCart, useEnquiry, useStorefrontActions } from './useStorefront';
|
|
4
5
|
export { useMyOrders } from './useMyOrders';
|
|
5
6
|
export { useDiscountValidator } from './useDiscountValidator';
|
|
6
7
|
//# sourceMappingURL=index.d.ts.map
|