@fayz-ai/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 (175) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +39 -0
  3. package/dist/auth.d.ts +29 -0
  4. package/dist/auth.d.ts.map +1 -0
  5. package/dist/blocks.d.ts +6 -0
  6. package/dist/blocks.d.ts.map +1 -0
  7. package/dist/components/CartDrawer.d.ts +3 -0
  8. package/dist/components/CartDrawer.d.ts.map +1 -0
  9. package/dist/components/CustomerAccountShell.d.ts +13 -0
  10. package/dist/components/CustomerAccountShell.d.ts.map +1 -0
  11. package/dist/components/FiltersPanel.d.ts +3 -0
  12. package/dist/components/FiltersPanel.d.ts.map +1 -0
  13. package/dist/components/OrderTrackingTimeline.d.ts +7 -0
  14. package/dist/components/OrderTrackingTimeline.d.ts.map +1 -0
  15. package/dist/components/Price.d.ts +11 -0
  16. package/dist/components/Price.d.ts.map +1 -0
  17. package/dist/components/ProductCard.d.ts +7 -0
  18. package/dist/components/ProductCard.d.ts.map +1 -0
  19. package/dist/components/ProductGrid.d.ts +7 -0
  20. package/dist/components/ProductGrid.d.ts.map +1 -0
  21. package/dist/components/ProductOptionSelector.d.ts +9 -0
  22. package/dist/components/ProductOptionSelector.d.ts.map +1 -0
  23. package/dist/components/ProductSpecs.d.ts +8 -0
  24. package/dist/components/ProductSpecs.d.ts.map +1 -0
  25. package/dist/components/QuantityInput.d.ts +12 -0
  26. package/dist/components/QuantityInput.d.ts.map +1 -0
  27. package/dist/components/RelatedProducts.d.ts +9 -0
  28. package/dist/components/RelatedProducts.d.ts.map +1 -0
  29. package/dist/components/SignInModal.d.ts +19 -0
  30. package/dist/components/SignInModal.d.ts.map +1 -0
  31. package/dist/components/StorefrontErrorBoundary.d.ts +20 -0
  32. package/dist/components/StorefrontErrorBoundary.d.ts.map +1 -0
  33. package/dist/components/StorefrontFooter.d.ts +3 -0
  34. package/dist/components/StorefrontFooter.d.ts.map +1 -0
  35. package/dist/components/StorefrontHeader.d.ts +3 -0
  36. package/dist/components/StorefrontHeader.d.ts.map +1 -0
  37. package/dist/components/Toaster.d.ts +3 -0
  38. package/dist/components/Toaster.d.ts.map +1 -0
  39. package/dist/components/sections/CategoryShowcase.d.ts +6 -0
  40. package/dist/components/sections/CategoryShowcase.d.ts.map +1 -0
  41. package/dist/components/sections/HeroSection.d.ts +9 -0
  42. package/dist/components/sections/HeroSection.d.ts.map +1 -0
  43. package/dist/components/sections/MiscSections.d.ts +33 -0
  44. package/dist/components/sections/MiscSections.d.ts.map +1 -0
  45. package/dist/components/sections/ProductRail.d.ts +9 -0
  46. package/dist/components/sections/ProductRail.d.ts.map +1 -0
  47. package/dist/config.d.ts +149 -0
  48. package/dist/config.d.ts.map +1 -0
  49. package/dist/createStorefrontApp.d.ts +16 -0
  50. package/dist/createStorefrontApp.d.ts.map +1 -0
  51. package/dist/format.d.ts +3 -0
  52. package/dist/format.d.ts.map +1 -0
  53. package/dist/hooks/index.d.ts +6 -0
  54. package/dist/hooks/index.d.ts.map +1 -0
  55. package/dist/hooks/useCategories.d.ts +6 -0
  56. package/dist/hooks/useCategories.d.ts.map +1 -0
  57. package/dist/hooks/useDiscountValidator.d.ts +14 -0
  58. package/dist/hooks/useDiscountValidator.d.ts.map +1 -0
  59. package/dist/hooks/useMyOrders.d.ts +7 -0
  60. package/dist/hooks/useMyOrders.d.ts.map +1 -0
  61. package/dist/hooks/useProduct.d.ts +7 -0
  62. package/dist/hooks/useProduct.d.ts.map +1 -0
  63. package/dist/hooks/useProducts.d.ts +8 -0
  64. package/dist/hooks/useProducts.d.ts.map +1 -0
  65. package/dist/hooks/useStorefrontHead.d.ts +11 -0
  66. package/dist/hooks/useStorefrontHead.d.ts.map +1 -0
  67. package/dist/index.cjs +4186 -0
  68. package/dist/index.cjs.map +1 -0
  69. package/dist/index.d.ts +55 -0
  70. package/dist/index.d.ts.map +1 -0
  71. package/dist/index.js +4085 -0
  72. package/dist/index.js.map +1 -0
  73. package/dist/motion.d.ts +19 -0
  74. package/dist/motion.d.ts.map +1 -0
  75. package/dist/order-status.d.ts +10 -0
  76. package/dist/order-status.d.ts.map +1 -0
  77. package/dist/pages/CatalogPage.d.ts +3 -0
  78. package/dist/pages/CatalogPage.d.ts.map +1 -0
  79. package/dist/pages/CheckoutPage.d.ts +3 -0
  80. package/dist/pages/CheckoutPage.d.ts.map +1 -0
  81. package/dist/pages/HomePage.d.ts +6 -0
  82. package/dist/pages/HomePage.d.ts.map +1 -0
  83. package/dist/pages/MyPurchasesPage.d.ts +3 -0
  84. package/dist/pages/MyPurchasesPage.d.ts.map +1 -0
  85. package/dist/pages/NotFoundPage.d.ts +4 -0
  86. package/dist/pages/NotFoundPage.d.ts.map +1 -0
  87. package/dist/pages/OrderConfirmationPage.d.ts +5 -0
  88. package/dist/pages/OrderConfirmationPage.d.ts.map +1 -0
  89. package/dist/pages/PolicyPage.d.ts +15 -0
  90. package/dist/pages/PolicyPage.d.ts.map +1 -0
  91. package/dist/pages/ProductDetailPage.d.ts +5 -0
  92. package/dist/pages/ProductDetailPage.d.ts.map +1 -0
  93. package/dist/presets.d.ts +33 -0
  94. package/dist/presets.d.ts.map +1 -0
  95. package/dist/product-options.d.ts +12 -0
  96. package/dist/product-options.d.ts.map +1 -0
  97. package/dist/router.d.ts +285 -0
  98. package/dist/router.d.ts.map +1 -0
  99. package/dist/scaffold.d.ts +14 -0
  100. package/dist/scaffold.d.ts.map +1 -0
  101. package/dist/sections.d.ts +84 -0
  102. package/dist/sections.d.ts.map +1 -0
  103. package/dist/slot-contracts.d.ts +34 -0
  104. package/dist/slot-contracts.d.ts.map +1 -0
  105. package/dist/stores/cart.store.d.ts +58 -0
  106. package/dist/stores/cart.store.d.ts.map +1 -0
  107. package/dist/stores/catalog.store.d.ts +18 -0
  108. package/dist/stores/catalog.store.d.ts.map +1 -0
  109. package/dist/stores/session.store.d.ts +23 -0
  110. package/dist/stores/session.store.d.ts.map +1 -0
  111. package/dist/stores/toast.store.d.ts +27 -0
  112. package/dist/stores/toast.store.d.ts.map +1 -0
  113. package/dist/testids.d.ts +93 -0
  114. package/dist/testids.d.ts.map +1 -0
  115. package/dist/theme.d.ts +59 -0
  116. package/dist/theme.d.ts.map +1 -0
  117. package/dist/workflows/checkout.d.ts +33 -0
  118. package/dist/workflows/checkout.d.ts.map +1 -0
  119. package/package.json +56 -0
  120. package/src/auth.ts +134 -0
  121. package/src/blocks.tsx +47 -0
  122. package/src/components/CartDrawer.tsx +250 -0
  123. package/src/components/CustomerAccountShell.tsx +102 -0
  124. package/src/components/FiltersPanel.tsx +109 -0
  125. package/src/components/OrderTrackingTimeline.tsx +135 -0
  126. package/src/components/Price.tsx +32 -0
  127. package/src/components/ProductCard.tsx +104 -0
  128. package/src/components/ProductGrid.tsx +34 -0
  129. package/src/components/ProductOptionSelector.tsx +50 -0
  130. package/src/components/ProductSpecs.tsx +75 -0
  131. package/src/components/QuantityInput.tsx +52 -0
  132. package/src/components/RelatedProducts.tsx +31 -0
  133. package/src/components/SignInModal.tsx +120 -0
  134. package/src/components/StorefrontErrorBoundary.tsx +51 -0
  135. package/src/components/StorefrontFooter.tsx +100 -0
  136. package/src/components/StorefrontHeader.tsx +342 -0
  137. package/src/components/Toaster.tsx +60 -0
  138. package/src/components/sections/CategoryShowcase.tsx +79 -0
  139. package/src/components/sections/HeroSection.tsx +177 -0
  140. package/src/components/sections/MiscSections.tsx +157 -0
  141. package/src/components/sections/ProductRail.tsx +73 -0
  142. package/src/config.ts +176 -0
  143. package/src/createStorefrontApp.tsx +171 -0
  144. package/src/format.ts +7 -0
  145. package/src/hooks/index.ts +5 -0
  146. package/src/hooks/useCategories.ts +26 -0
  147. package/src/hooks/useDiscountValidator.ts +43 -0
  148. package/src/hooks/useMyOrders.ts +41 -0
  149. package/src/hooks/useProduct.ts +36 -0
  150. package/src/hooks/useProducts.ts +39 -0
  151. package/src/hooks/useStorefrontHead.ts +25 -0
  152. package/src/index.ts +132 -0
  153. package/src/motion.tsx +94 -0
  154. package/src/order-status.ts +33 -0
  155. package/src/pages/CatalogPage.tsx +118 -0
  156. package/src/pages/CheckoutPage.tsx +578 -0
  157. package/src/pages/HomePage.tsx +12 -0
  158. package/src/pages/MyPurchasesPage.tsx +310 -0
  159. package/src/pages/NotFoundPage.tsx +25 -0
  160. package/src/pages/OrderConfirmationPage.tsx +189 -0
  161. package/src/pages/PolicyPage.tsx +47 -0
  162. package/src/pages/ProductDetailPage.tsx +184 -0
  163. package/src/presets.ts +258 -0
  164. package/src/product-options.ts +63 -0
  165. package/src/router.ts +49 -0
  166. package/src/scaffold.tsx +109 -0
  167. package/src/sections.ts +69 -0
  168. package/src/slot-contracts.ts +20 -0
  169. package/src/stores/cart.store.ts +149 -0
  170. package/src/stores/catalog.store.ts +39 -0
  171. package/src/stores/session.store.ts +28 -0
  172. package/src/stores/toast.store.ts +43 -0
  173. package/src/testids.ts +103 -0
  174. package/src/theme.ts +160 -0
  175. package/src/workflows/checkout.ts +91 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Faya Labs
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,39 @@
1
+ # @fayz-ai/storefront
2
+
3
+ > Shopify-style customer-facing storefront, assembled from data — hero, products, cart, checkout, all themeable.
4
+
5
+ [![npm](https://img.shields.io/npm/v/@fayz-ai/storefront.svg)](https://www.npmjs.com/package/@fayz-ai/storefront)
6
+ [![license](https://img.shields.io/npm/l/@fayz-ai/storefront.svg)](https://github.com/FayaLabs/fayz-sdk/blob/main/LICENSE)
7
+
8
+ `@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
+
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/customization-ladder.md) — never by editing this package.
11
+
12
+ ## What's inside
13
+ - **Scaffold** — `defineStorefront(config)` + `StorefrontScaffold` rendered by `renderApp`
14
+ - **Block system** — `registerStorefrontBlocks`, `sectionsToBlocks` (sections as registry blocks)
15
+ - **Factory path** — `createStorefrontApp`, `initStorefrontRuntime`, `StorefrontShell`
16
+ - **Routing** — hash router (`Link`, `navigateTo`, `useHashPath`, `matchPath`)
17
+ - **Config hook** — `useStorefrontConfig`
18
+
19
+ ## Install
20
+ ```bash
21
+ npm install @fayz-ai/storefront
22
+ ```
23
+ Peer deps: `@fayz-ai/core`, `@fayz-ai/ui`, `@fayz-ai/shop`, `@fayz-ai/auth` (+ react, react-dom).
24
+
25
+ ## Usage
26
+ ```tsx
27
+ import { renderApp } from '@fayz-ai/core'
28
+ import { defineStorefront } from '@fayz-ai/storefront'
29
+
30
+ export function App() {
31
+ return renderApp(defineStorefront(config), { surface: 'storefront' })
32
+ }
33
+ ```
34
+
35
+ ## Part of the Fayz SDK
36
+ The storefront surface over `@fayz-ai/shop`. The admin counterpart is built with `@fayz-ai/saas`; both are surfaces of one manifest.
37
+
38
+ ## Roadmap & contributing
39
+ Built and evolving in the open. See the [Fayz SDK roadmap](../../docs/ROADMAP.md).
package/dist/auth.d.ts ADDED
@@ -0,0 +1,29 @@
1
+ import type { AuthAdapter } from '@fayz-ai/core';
2
+ export type StorefrontAuthAdapter = AuthAdapter | 'mock' | 'supabase';
3
+ export declare function resolveAuthAdapter(configured: StorefrontAuthAdapter | undefined): AuthAdapter;
4
+ /** Called once by createStorefrontApp. Restores any persisted session. */
5
+ export declare function initCustomerAuth(adapter: AuthAdapter): void;
6
+ export declare function getCustomerAuthAdapter(): AuthAdapter;
7
+ export interface EstablishSessionOptions {
8
+ /** Provided → adapter.signIn; omitted → passwordless customer identity via signUp (mock-friendly). */
9
+ password?: string;
10
+ name?: string;
11
+ }
12
+ /**
13
+ * Sign a customer in through the auth adapter and link the ShopCustomer.
14
+ * Used by the account page sign-in AND by checkout (so a buyer is signed in
15
+ * for "my purchases" immediately after purchase) — one auth path, two doors.
16
+ */
17
+ export declare function establishCustomerSession(email: string, opts?: EstablishSessionOptions): Promise<{
18
+ customerId: string;
19
+ }>;
20
+ /** Convenience wrapper — passwordless email sign-in (guest checkout path). */
21
+ export declare function signInByEmail(email: string, name?: string): Promise<{
22
+ customerId: string;
23
+ }>;
24
+ /** Explicit account creation (account page "Criar conta" form). */
25
+ export declare function signUpCustomer(email: string, password: string, name: string): Promise<{
26
+ customerId: string;
27
+ }>;
28
+ export declare function signOutCustomer(): Promise<void>;
29
+ //# sourceMappingURL=auth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAY,MAAM,eAAe,CAAA;AAa1D,MAAM,MAAM,qBAAqB,GAAG,WAAW,GAAG,MAAM,GAAG,UAAU,CAAA;AAIrE,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,qBAAqB,GAAG,SAAS,GAC5C,WAAW,CAQb;AAED,0EAA0E;AAC1E,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,CAgB3D;AAED,wBAAgB,sBAAsB,IAAI,WAAW,CAGpD;AAgCD,MAAM,WAAW,uBAAuB;IACtC,sGAAsG;IACtG,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED;;;;GAIG;AACH,wBAAsB,wBAAwB,CAC5C,KAAK,EAAE,MAAM,EACb,IAAI,CAAC,EAAE,uBAAuB,GAC7B,OAAO,CAAC;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC,CAWjC;AAED,8EAA8E;AAC9E,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC,CAE3F;AAED,mEAAmE;AACnE,wBAAsB,cAAc,CAClC,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,GACX,OAAO,CAAC;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC,CAKjC;AAED,wBAAsB,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC,CAMrD"}
@@ -0,0 +1,6 @@
1
+ import type { BlockNode } from '@fayz-ai/core';
2
+ import type { HomeSection } from './sections';
3
+ export declare function registerStorefrontBlocks(): void;
4
+ /** Convert the legacy HomeSection[] blueprint into a generic block tree. */
5
+ export declare function sectionsToBlocks(sections: HomeSection[]): BlockNode[];
6
+ //# sourceMappingURL=blocks.d.ts.map
@@ -0,0 +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,WAAW,EAAE,MAAM,YAAY,CAAA;AAsB7C,wBAAgB,wBAAwB,IAAI,IAAI,CAW/C;AAKD,4EAA4E;AAC5E,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,WAAW,EAAE,GAAG,SAAS,EAAE,CAKrE"}
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare function CartDrawer(): React.JSX.Element | null;
3
+ //# sourceMappingURL=CartDrawer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CartDrawer.d.ts","sourceRoot":"","sources":["../../src/components/CartDrawer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAA;AAiBlD,wBAAgB,UAAU,6BAwOzB"}
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ export type AccountSection = 'profile' | 'orders' | 'addresses' | 'payments';
3
+ interface CustomerAccountShellProps {
4
+ title: string;
5
+ subtitle?: string;
6
+ active: AccountSection;
7
+ /** Switch the active section in-place. */
8
+ onSelect?: (section: AccountSection) => void;
9
+ children: React.ReactNode;
10
+ }
11
+ export declare function CustomerAccountShell({ title, subtitle, active, onSelect, children }: CustomerAccountShellProps): React.JSX.Element;
12
+ export {};
13
+ //# sourceMappingURL=CustomerAccountShell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CustomerAccountShell.d.ts","sourceRoot":"","sources":["../../src/components/CustomerAccountShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAQzB,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,QAAQ,GAAG,WAAW,GAAG,UAAU,CAAA;AAE5E,UAAU,yBAAyB;IACjC,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,cAAc,CAAA;IACtB,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAA;IAC5C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B;AASD,wBAAgB,oBAAoB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,yBAAyB,qBA2E9G"}
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare function FiltersPanel(): React.JSX.Element;
3
+ //# sourceMappingURL=FiltersPanel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FiltersPanel.d.ts","sourceRoot":"","sources":["../../src/components/FiltersPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,wBAAgB,YAAY,sBAsG3B"}
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import type { Order } from '@fayz-ai/shop/types';
3
+ export declare function OrderTrackingTimeline({ order, compact }: {
4
+ order: Order;
5
+ compact?: boolean;
6
+ }): React.JSX.Element;
7
+ //# sourceMappingURL=OrderTrackingTimeline.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OrderTrackingTimeline.d.ts","sourceRoot":"","sources":["../../src/components/OrderTrackingTimeline.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAgFhD,wBAAgB,qBAAqB,CAAC,EAAE,KAAK,EAAE,OAAe,EAAE,EAAE;IAAE,KAAK,EAAE,KAAK,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,qBAoDpG"}
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ export interface PriceProps {
3
+ value: number;
4
+ compareAt?: number | null;
5
+ testId?: string;
6
+ compareTestId?: string;
7
+ className?: string;
8
+ }
9
+ /** Formatted money. Always carries data-price so tests assert raw numbers, never locale strings. */
10
+ export declare function Price({ value, compareAt, testId, compareTestId, className }: PriceProps): React.JSX.Element;
11
+ //# sourceMappingURL=Price.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Price.d.ts","sourceRoot":"","sources":["../../src/components/Price.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,oGAAoG;AACpG,wBAAgB,KAAK,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,SAAS,EAAE,EAAE,UAAU,qBAkBvF"}
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import type { Product } from '@fayz-ai/shop/types';
3
+ export interface ProductCardProps {
4
+ product: Product;
5
+ }
6
+ export declare function ProductCard({ product }: ProductCardProps): React.JSX.Element;
7
+ //# sourceMappingURL=ProductCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProductCard.d.ts","sourceRoot":"","sources":["../../src/components/ProductCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AASlD,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAA;CACjB;AAED,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,EAAE,gBAAgB,qBAwFxD"}
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import type { Product } from '@fayz-ai/shop/types';
3
+ export declare function ProductGrid({ products, loading }: {
4
+ products: Product[];
5
+ loading: boolean;
6
+ }): React.JSX.Element;
7
+ //# sourceMappingURL=ProductGrid.d.ts.map
@@ -0,0 +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;AAKlD,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE;IAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,qBA2B3F"}
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { ProductOptionGroup, ProductOptionSelection } from '../product-options';
3
+ export interface ProductOptionSelectorProps {
4
+ groups: ProductOptionGroup[];
5
+ value: ProductOptionSelection;
6
+ onChange: (value: ProductOptionSelection) => void;
7
+ }
8
+ export declare function ProductOptionSelector({ groups, value, onChange }: ProductOptionSelectorProps): React.JSX.Element | null;
9
+ //# sourceMappingURL=ProductOptionSelector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProductOptionSelector.d.ts","sourceRoot":"","sources":["../../src/components/ProductOptionSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AAGpF,MAAM,WAAW,0BAA0B;IACzC,MAAM,EAAE,kBAAkB,EAAE,CAAA;IAC5B,KAAK,EAAE,sBAAsB,CAAA;IAC7B,QAAQ,EAAE,CAAC,KAAK,EAAE,sBAAsB,KAAK,IAAI,CAAA;CAClD;AAED,wBAAgB,qBAAqB,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,0BAA0B,4BAuC5F"}
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import type { Product } from '@fayz-ai/shop/types';
3
+ /** Real product specs from standard fields + scalar metadata. Renders nothing
4
+ * when there's nothing to show. No invented data. */
5
+ export declare function ProductSpecs({ product }: {
6
+ product: Product;
7
+ }): React.JSX.Element | null;
8
+ //# sourceMappingURL=ProductSpecs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProductSpecs.d.ts","sourceRoot":"","sources":["../../src/components/ProductSpecs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AA8ClD;sDACsD;AACtD,wBAAgB,YAAY,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,4BAyB7D"}
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ export interface QuantityInputProps {
3
+ value: number;
4
+ onChange(next: number): void;
5
+ min?: number;
6
+ max?: number;
7
+ testId?: string;
8
+ incTestId?: string;
9
+ decTestId?: string;
10
+ }
11
+ export declare function QuantityInput({ value, onChange, min, max, testId, incTestId, decTestId }: QuantityInputProps): React.JSX.Element;
12
+ //# sourceMappingURL=QuantityInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QuantityInput.d.ts","sourceRoot":"","sources":["../../src/components/QuantityInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAO,EAAE,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,kBAAkB,qBAsChH"}
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { Product } from '@fayz-ai/shop/types';
3
+ /** "Você também pode gostar" — products from the same category, excluding the
4
+ * current one. Renders through the store's configured card slot for visual
5
+ * consistency with the catalog. Hidden when there's nothing relevant. */
6
+ export declare function RelatedProducts({ product }: {
7
+ product: Product;
8
+ }): React.JSX.Element | null;
9
+ //# sourceMappingURL=RelatedProducts.d.ts.map
@@ -0,0 +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;AAKvE;;0EAE0E;AAC1E,wBAAgB,eAAe,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,4BAqBhE"}
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ interface SignInModalProps {
3
+ /** Prefill the email field (e.g. from a checkout contact field). */
4
+ defaultEmail?: string;
5
+ onClose: () => void;
6
+ /** Called after a successful sign-in, with the resolved session. */
7
+ onSignedIn?: (session: {
8
+ email: string | null;
9
+ name: string | null;
10
+ }) => void;
11
+ }
12
+ /**
13
+ * Customer sign-in as a focused modal dialog. Used from checkout ("Já tem
14
+ * conta? Entrar") so a returning buyer can authenticate without leaving the
15
+ * page. Auth goes through the shared establishCustomerSession path.
16
+ */
17
+ export declare function SignInModal({ defaultEmail, onClose, onSignedIn }: SignInModalProps): React.JSX.Element;
18
+ export {};
19
+ //# sourceMappingURL=SignInModal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SignInModal.d.ts","sourceRoot":"","sources":["../../src/components/SignInModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAA;AAMlD,UAAU,gBAAgB;IACxB,oEAAoE;IACpE,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,oEAAoE;IACpE,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,KAAK,IAAI,CAAA;CAC9E;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,EAAE,YAAiB,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,gBAAgB,qBAoGvF"}
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ interface Props {
3
+ children: React.ReactNode;
4
+ }
5
+ interface State {
6
+ error: Error | null;
7
+ }
8
+ /**
9
+ * Catches render/runtime errors in the storefront tree so a single thrown
10
+ * error (e.g. a provider failure) shows a recoverable fallback instead of a
11
+ * blank white screen. Key it by route to auto-clear on navigation.
12
+ */
13
+ export declare class StorefrontErrorBoundary extends React.Component<Props, State> {
14
+ state: State;
15
+ static getDerivedStateFromError(error: Error): State;
16
+ componentDidCatch(error: Error, info: React.ErrorInfo): void;
17
+ render(): React.ReactNode;
18
+ }
19
+ export {};
20
+ //# sourceMappingURL=StorefrontErrorBoundary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StorefrontErrorBoundary.d.ts","sourceRoot":"","sources":["../../src/components/StorefrontErrorBoundary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,UAAU,KAAK;IACb,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B;AAED,UAAU,KAAK;IACb,KAAK,EAAE,KAAK,GAAG,IAAI,CAAA;CACpB;AAED;;;;GAIG;AACH,qBAAa,uBAAwB,SAAQ,KAAK,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC;IACxE,KAAK,EAAE,KAAK,CAAkB;IAE9B,MAAM,CAAC,wBAAwB,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK;IAIpD,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,SAAS,GAAG,IAAI;IAK5D,MAAM,IAAI,KAAK,CAAC,SAAS;CAuB1B"}
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare function StorefrontFooter(): React.JSX.Element;
3
+ //# sourceMappingURL=StorefrontFooter.d.ts.map
@@ -0,0 +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,sBA6F/B"}
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare function StorefrontHeader(): React.JSX.Element;
3
+ //# sourceMappingURL=StorefrontHeader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StorefrontHeader.d.ts","sourceRoot":"","sources":["../../src/components/StorefrontHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AA8QvC,wBAAgB,gBAAgB,sBAuE/B"}
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ export declare function Toaster(): React.JSX.Element | null;
3
+ //# sourceMappingURL=Toaster.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Toaster.d.ts","sourceRoot":"","sources":["../../src/components/Toaster.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAA;AAiDxC,wBAAgB,OAAO,6BAUtB"}
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ export declare function CategoryShowcase({ style, title }: {
3
+ style: 'bubbles' | 'tiles';
4
+ title?: string;
5
+ }): React.JSX.Element | null;
6
+ //# sourceMappingURL=CategoryShowcase.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CategoryShowcase.d.ts","sourceRoot":"","sources":["../../../src/components/sections/CategoryShowcase.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AASzB,wBAAgB,gBAAgB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,4BAqEhG"}
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { HeroSlide } from '../../sections';
3
+ import type { HeroVariant } from '../../theme';
4
+ export declare function HeroSection({ variant, slides, height, }: {
5
+ variant: HeroVariant;
6
+ slides: HeroSlide[];
7
+ height?: 'tall' | 'medium';
8
+ }): React.JSX.Element | null;
9
+ //# sourceMappingURL=HeroSection.d.ts.map
@@ -0,0 +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;AA6C9C,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,4BAwHA"}
@@ -0,0 +1,33 @@
1
+ import React from 'react';
2
+ export declare function BenefitsRow({ items }: {
3
+ items: Array<{
4
+ icon: string;
5
+ title: string;
6
+ text?: string;
7
+ }>;
8
+ }): React.JSX.Element;
9
+ export declare function PromoBanner({ title, subtitle, eyebrow, cta, href, image, hue, }: {
10
+ title: string;
11
+ subtitle?: string;
12
+ eyebrow?: string;
13
+ cta?: string;
14
+ href?: string;
15
+ image?: string;
16
+ hue?: number;
17
+ }): React.JSX.Element;
18
+ export declare function ManifestoBlock({ title, text }: {
19
+ title?: string;
20
+ text: string;
21
+ }): React.JSX.Element;
22
+ export declare function Testimonials({ title, items }: {
23
+ title?: string;
24
+ items: Array<{
25
+ quote: string;
26
+ author: string;
27
+ }>;
28
+ }): React.JSX.Element;
29
+ export declare function NewsletterBand({ title, subtitle }: {
30
+ title?: string;
31
+ subtitle?: string;
32
+ }): React.JSX.Element;
33
+ //# sourceMappingURL=MiscSections.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MiscSections.d.ts","sourceRoot":"","sources":["../../../src/components/sections/MiscSections.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAYvC,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"}
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ export declare function ProductRail({ title, subtitle, eyebrow, filter, limit, }: {
3
+ title: string;
4
+ subtitle?: string;
5
+ eyebrow?: string;
6
+ filter?: 'sale' | 'new' | 'all';
7
+ limit?: number;
8
+ }): React.JSX.Element | null;
9
+ //# sourceMappingURL=ProductRail.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProductRail.d.ts","sourceRoot":"","sources":["../../../src/components/sections/ProductRail.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAA;AAQtC,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,4BAoDA"}
@@ -0,0 +1,149 @@
1
+ import React from 'react';
2
+ import type { Product } from '@fayz-ai/shop/types';
3
+ import type { ShopProvider } from '@fayz-ai/shop/provider';
4
+ import type { MockShopSeed } from '@fayz-ai/shop/mock';
5
+ import type { StorefrontTheme } from './theme';
6
+ import type { HomeConfig, NavLink, FooterConfig } from './sections';
7
+ import type { StorefrontAuthAdapter } from './auth';
8
+ export interface ProductCardSlotProps {
9
+ product: Product;
10
+ }
11
+ export type StorefrontRouteKind = 'home' | 'catalog' | 'product' | 'checkout' | 'account' | 'order' | 'custom';
12
+ export type StorefrontRouteParams = Record<string, string>;
13
+ export interface StorefrontRouteComponentProps {
14
+ path: string;
15
+ params: StorefrontRouteParams;
16
+ config: ResolvedStorefrontConfig;
17
+ }
18
+ export type StorefrontRouteChrome = 'default' | 'focused';
19
+ export interface StorefrontRouteDefinition {
20
+ /**
21
+ * Stable identifier for generated-code diffs, QA reports, and route ownership.
22
+ */
23
+ id: string;
24
+ /**
25
+ * Hash route pattern. Supports the same params as matchPath, e.g. '/checkout'
26
+ * or '/collections/:slug'. Custom routes are matched before SDK defaults.
27
+ */
28
+ path: string;
29
+ /**
30
+ * Intent label for agents and manifests. It does not change matching behavior.
31
+ */
32
+ kind?: StorefrontRouteKind;
33
+ /**
34
+ * Shell chrome for the route. `focused` hides storefront nav/footer/cart
35
+ * around high-intent flows such as checkout.
36
+ */
37
+ chrome?: StorefrontRouteChrome;
38
+ /**
39
+ * App-owned screen/workflow that can still use storefront/shop primitives.
40
+ */
41
+ component: React.ComponentType<StorefrontRouteComponentProps>;
42
+ }
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
+ export interface StorefrontDiscountConfig {
53
+ code: string;
54
+ percent: number;
55
+ title?: string;
56
+ }
57
+ export interface StorefrontConfig {
58
+ /** Store display name (header, page title) */
59
+ name: string;
60
+ /** Optional logo node; defaults to the store name */
61
+ logo?: React.ReactNode;
62
+ /** ISO 4217 — default 'BRL' */
63
+ currency?: string;
64
+ /** Intl locale for money/date formatting — default 'pt-BR' */
65
+ locale?: string;
66
+ /** Visual identity: colors, fonts, radius, header/card personality */
67
+ theme?: StorefrontTheme;
68
+ /** Promo message above the header (e.g. 'FRETE GRÁTIS ACIMA DE R$ 300') */
69
+ announcement?: string;
70
+ /** Home page blueprint. When set, `/` renders it and the catalog moves to /catalog. */
71
+ home?: HomeConfig;
72
+ /** Header nav links — defaults derived from home/catalog routing */
73
+ nav?: NavLink[];
74
+ /** Footer content (about text, contact, social) */
75
+ footer?: FooterConfig;
76
+ /** Preferred backend descriptor for manifest/scaffold metadata. */
77
+ backend?: {
78
+ provider?: 'mock' | 'fayz-api' | 'fayz-shop' | 'custom';
79
+ url?: string;
80
+ };
81
+ /** @deprecated Use backend/provider adapters. Storefront no longer creates Supabase clients. */
82
+ supabaseUrl?: string;
83
+ /** @deprecated Use backend/provider adapters. Storefront no longer creates Supabase clients. */
84
+ supabaseAnonKey?: string;
85
+ /** Explicit provider override (tests, custom backends) */
86
+ provider?: ShopProvider;
87
+ /** Per-store mock catalog (products/categories/discounts) for mock mode */
88
+ catalog?: MockShopSeed;
89
+ /** Store-level discount codes available regardless of provider backend. */
90
+ discounts?: StorefrontDiscountConfig[];
91
+ /**
92
+ * Institutional/legal page content (privacy, terms, returns). Plain text —
93
+ * blank lines separate paragraphs. Unset pages render a placeholder so the
94
+ * routes (and footer links) exist even before the store writes its policy.
95
+ */
96
+ legal?: {
97
+ privacy?: string;
98
+ terms?: string;
99
+ returns?: string;
100
+ };
101
+ /** Customer auth — same AuthAdapter contract as createSaasApp. Default: mock. */
102
+ auth?: {
103
+ adapter?: StorefrontAuthAdapter;
104
+ };
105
+ /** Shipping pricing — default { flatRate: 0 } */
106
+ shipping?: {
107
+ flatRate?: number;
108
+ freeAbove?: number;
109
+ };
110
+ /**
111
+ * Payment behavior. v1 default 'mock' instantly marks orders paid with NO
112
+ * real charge (demo). M4 sets 'pix-mercadopago' so orders stay pending until
113
+ * a real payment webhook confirms settlement.
114
+ */
115
+ payments?: {
116
+ mode?: 'mock' | 'pix-mercadopago';
117
+ };
118
+ /** Feature toggles — discounts default off; accounts default on */
119
+ features?: {
120
+ discounts?: boolean;
121
+ accounts?: boolean;
122
+ };
123
+ /** Code-level customization slots. Kept out of serialized manifests. */
124
+ slots?: StorefrontSlots;
125
+ /** Code-level route overrides/custom routes. Kept out of serialized manifests. */
126
+ routes?: StorefrontRouteDefinition[];
127
+ }
128
+ export interface ResolvedStorefrontConfig extends StorefrontConfig {
129
+ currency: string;
130
+ locale: string;
131
+ shipping: {
132
+ flatRate: number;
133
+ freeAbove?: number;
134
+ };
135
+ payments: {
136
+ mode: 'mock' | 'pix-mercadopago';
137
+ };
138
+ features: {
139
+ discounts: boolean;
140
+ accounts: boolean;
141
+ };
142
+ /** Where the full product list lives ('/' without a home page, '/catalog' with one) */
143
+ catalogPath: string;
144
+ nav: NavLink[];
145
+ }
146
+ export declare function resolveConfig(config: StorefrontConfig): ResolvedStorefrontConfig;
147
+ export declare const StorefrontConfigProvider: React.Provider<ResolvedStorefrontConfig | null>;
148
+ export declare function useStorefrontConfig(): ResolvedStorefrontConfig;
149
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import type { StorefrontConfig } from './config';
3
+ export declare function initStorefrontRuntime(config: StorefrontConfig): void;
4
+ /** The inner storefront UI. Reads everything from the config context, so it is
5
+ * shared by createStorefrontApp and the manifest-driven StorefrontScaffold. */
6
+ export declare function StorefrontShell(): React.JSX.Element;
7
+ /**
8
+ * Declarative storefront factory — the customer-facing counterpart of
9
+ * createSaasApp. Sugar over the manifest path: it is equivalent to
10
+ * renderApp(defineStorefront(config)), sharing initStorefrontRuntime +
11
+ * StorefrontShell with the scaffold.
12
+ *
13
+ * const App = createStorefrontApp({ name: 'Aurora Goods', currency: 'BRL' })
14
+ */
15
+ export declare function createStorefrontApp(config: StorefrontConfig): React.ComponentType;
16
+ //# sourceMappingURL=createStorefrontApp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createStorefrontApp.d.ts","sourceRoot":"","sources":["../src/createStorefrontApp.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,OAAO,KAAK,EAAE,gBAAgB,EAA4B,MAAM,UAAU,CAAA;AA0G1E,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI,CAcpE;AAED;gFACgF;AAChF,wBAAgB,eAAe,sBAgB9B;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,gBAAgB,GAAG,KAAK,CAAC,aAAa,CAajF"}
@@ -0,0 +1,3 @@
1
+ export declare function formatMoney(value: number, currency?: string, locale?: string): string;
2
+ export declare function roundCents(value: number): number;
3
+ //# sourceMappingURL=format.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../src/format.ts"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,SAAQ,EAAE,MAAM,SAAU,GAAG,MAAM,CAErF;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEhD"}
@@ -0,0 +1,6 @@
1
+ export { useProducts } from './useProducts';
2
+ export { useProduct } from './useProduct';
3
+ export { useCategories } from './useCategories';
4
+ export { useMyOrders } from './useMyOrders';
5
+ export { useDiscountValidator } from './useDiscountValidator';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA"}