@fayz-ai/storefront 0.9.0 → 0.11.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 -3
- package/dist/app/createStorefrontApp.d.ts +65 -0
- package/dist/app/createStorefrontApp.d.ts.map +1 -0
- package/dist/{define.d.ts → app/define.d.ts} +3 -3
- package/dist/app/define.d.ts.map +1 -0
- package/dist/app/hydration.d.ts +37 -0
- package/dist/app/hydration.d.ts.map +1 -0
- package/dist/app/prerender.d.ts +57 -0
- package/dist/app/prerender.d.ts.map +1 -0
- package/dist/{router.d.ts → app/router.d.ts} +140 -113
- package/dist/app/router.d.ts.map +1 -0
- package/dist/{scaffold.d.ts → app/scaffold.d.ts} +2 -2
- package/dist/app/scaffold.d.ts.map +1 -0
- package/dist/app/serving.d.ts +70 -0
- package/dist/app/serving.d.ts.map +1 -0
- package/dist/app/static-render.d.ts +46 -0
- package/dist/app/static-render.d.ts.map +1 -0
- package/dist/blocks/block-at-path.d.ts +59 -0
- package/dist/blocks/block-at-path.d.ts.map +1 -0
- package/dist/blocks/page-blocks.d.ts +163 -0
- package/dist/blocks/page-blocks.d.ts.map +1 -0
- package/dist/blocks/page-data.d.ts +105 -0
- package/dist/blocks/page-data.d.ts.map +1 -0
- package/dist/{blocks.d.ts → blocks/registry.d.ts} +1 -1
- package/dist/blocks/registry.d.ts.map +1 -0
- package/dist/{sections.d.ts → blocks/sections.d.ts} +40 -2
- package/dist/blocks/sections.d.ts.map +1 -0
- package/dist/chunk-6IXTENLB.js +162 -0
- package/dist/chunk-6IXTENLB.js.map +1 -0
- package/dist/chunk-SX3J3QIT.js +11046 -0
- package/dist/chunk-SX3J3QIT.js.map +1 -0
- package/dist/components/PaymentTerms.d.ts +34 -0
- package/dist/components/PaymentTerms.d.ts.map +1 -0
- package/dist/components/Skeleton.d.ts +17 -0
- package/dist/components/Skeleton.d.ts.map +1 -0
- package/dist/components/SmoothImage.d.ts +1 -1
- package/dist/components/SmoothImage.d.ts.map +1 -1
- package/dist/components/account/CustomerAccountShell.d.ts +17 -0
- package/dist/components/account/CustomerAccountShell.d.ts.map +1 -0
- package/dist/components/account/SignInModal.d.ts.map +1 -0
- package/dist/components/account/section.d.ts +15 -0
- package/dist/components/account/section.d.ts.map +1 -0
- package/dist/components/cart/CartDrawer.d.ts.map +1 -0
- package/dist/components/cart/QuantityInput.d.ts.map +1 -0
- package/dist/components/checkout/CheckoutPayment.d.ts +17 -0
- package/dist/components/checkout/CheckoutPayment.d.ts.map +1 -0
- package/dist/components/checkout/CheckoutSteps.d.ts +9 -0
- package/dist/components/checkout/CheckoutSteps.d.ts.map +1 -0
- package/dist/components/checkout/DeliveryEstimator.d.ts.map +1 -0
- package/dist/components/collection/CategoryShowcase.d.ts +44 -0
- package/dist/components/collection/CategoryShowcase.d.ts.map +1 -0
- package/dist/components/collection/FiltersPanel.d.ts +19 -0
- package/dist/components/collection/FiltersPanel.d.ts.map +1 -0
- package/dist/components/collection/ProductGrid.d.ts.map +1 -0
- package/dist/components/layout/PageBodyBlocks.d.ts +40 -0
- package/dist/components/layout/PageBodyBlocks.d.ts.map +1 -0
- package/dist/components/layout/SearchOverlay.d.ts +13 -0
- package/dist/components/layout/SearchOverlay.d.ts.map +1 -0
- package/dist/components/layout/StorefrontErrorBoundary.d.ts.map +1 -0
- package/dist/components/layout/StorefrontFooter.d.ts.map +1 -0
- package/dist/components/layout/StorefrontHeader.d.ts.map +1 -0
- package/dist/components/layout/Toaster.d.ts.map +1 -0
- package/dist/components/marketing/CollectionSections.d.ts +463 -0
- package/dist/components/marketing/CollectionSections.d.ts.map +1 -0
- package/dist/components/marketing/ConversionSections.d.ts +221 -0
- package/dist/components/marketing/ConversionSections.d.ts.map +1 -0
- package/dist/components/marketing/EditorialSections.d.ts +248 -0
- package/dist/components/marketing/EditorialSections.d.ts.map +1 -0
- package/dist/components/marketing/EntityList.d.ts +97 -0
- package/dist/components/marketing/EntityList.d.ts.map +1 -0
- package/dist/components/marketing/FormBlock.d.ts +167 -0
- package/dist/components/marketing/FormBlock.d.ts.map +1 -0
- package/dist/components/marketing/HeroSection.d.ts +125 -0
- package/dist/components/marketing/HeroSection.d.ts.map +1 -0
- package/dist/components/marketing/MediaCarousel.d.ts +135 -0
- package/dist/components/marketing/MediaCarousel.d.ts.map +1 -0
- package/dist/components/marketing/MiscSections.d.ts +252 -0
- package/dist/components/marketing/MiscSections.d.ts.map +1 -0
- package/dist/components/order/OrderTrackingTimeline.d.ts.map +1 -0
- package/dist/components/order/SuccessMark.d.ts +10 -0
- package/dist/components/order/SuccessMark.d.ts.map +1 -0
- package/dist/components/product/ProductCard.d.ts +14 -0
- package/dist/components/product/ProductCard.d.ts.map +1 -0
- package/dist/components/product/ProductEnquiryForm.d.ts.map +1 -0
- package/dist/components/product/ProductGallery.d.ts +36 -0
- package/dist/components/product/ProductGallery.d.ts.map +1 -0
- package/dist/components/{ProductOptionSelector.d.ts → product/ProductOptionSelector.d.ts} +1 -1
- package/dist/components/product/ProductOptionSelector.d.ts.map +1 -0
- package/dist/components/product/ProductRail.d.ts +93 -0
- package/dist/components/product/ProductRail.d.ts.map +1 -0
- package/dist/components/product/ProductReviews.d.ts +39 -0
- package/dist/components/product/ProductReviews.d.ts.map +1 -0
- package/dist/components/product/ProductSlider.d.ts +169 -0
- package/dist/components/product/ProductSlider.d.ts.map +1 -0
- package/dist/components/product/ProductSpecs.d.ts.map +1 -0
- package/dist/components/product/RelatedProducts.d.ts.map +1 -0
- package/dist/{auth.d.ts → data/auth.d.ts} +9 -0
- package/dist/data/auth.d.ts.map +1 -0
- package/dist/data/facets.d.ts +39 -0
- package/dist/data/facets.d.ts.map +1 -0
- package/dist/data/loaders.d.ts +52 -0
- package/dist/data/loaders.d.ts.map +1 -0
- package/dist/data/local-orders.d.ts +5 -0
- package/dist/data/local-orders.d.ts.map +1 -0
- package/dist/data/order-status.d.ts.map +1 -0
- package/dist/data/product-options.d.ts +36 -0
- package/dist/data/product-options.d.ts.map +1 -0
- package/dist/data/shipping-items.d.ts +20 -0
- package/dist/data/shipping-items.d.ts.map +1 -0
- package/dist/diagnostics/seo-audit.d.ts +54 -0
- package/dist/diagnostics/seo-audit.d.ts.map +1 -0
- package/dist/diagnostics/seo-audit.js +3 -0
- package/dist/diagnostics/seo-audit.js.map +1 -0
- package/dist/document/change.d.ts +100 -0
- package/dist/document/change.d.ts.map +1 -0
- package/dist/document/config.d.ts +311 -0
- package/dist/document/config.d.ts.map +1 -0
- package/dist/document/describe.d.ts +135 -0
- package/dist/document/describe.d.ts.map +1 -0
- package/dist/document/overlay.d.ts +58 -0
- package/dist/document/overlay.d.ts.map +1 -0
- package/dist/{presets.d.ts → document/presets.d.ts} +2 -2
- package/dist/document/presets.d.ts.map +1 -0
- package/dist/document/render.d.ts +171 -0
- package/dist/document/render.d.ts.map +1 -0
- package/dist/document/round-trip.d.ts +46 -0
- package/dist/document/round-trip.d.ts.map +1 -0
- package/dist/document/sections.d.ts +194 -0
- package/dist/document/sections.d.ts.map +1 -0
- package/dist/document/store-policy.d.ts +29 -0
- package/dist/document/store-policy.d.ts.map +1 -0
- package/dist/document/upgrade.d.ts +112 -0
- package/dist/document/upgrade.d.ts.map +1 -0
- package/dist/document/validate.d.ts +24 -0
- package/dist/document/validate.d.ts.map +1 -0
- package/dist/{component-contracts.d.ts → extend/component-contracts.d.ts} +74 -22
- package/dist/extend/component-contracts.d.ts.map +1 -0
- package/dist/extend/component-override.d.ts +38 -0
- package/dist/extend/component-override.d.ts.map +1 -0
- package/dist/extend/component-selectors.d.ts.map +1 -0
- package/dist/extend/editor-bridge.d.ts +59 -0
- package/dist/extend/editor-bridge.d.ts.map +1 -0
- package/dist/extend/extension-points.d.ts +103 -0
- package/dist/extend/extension-points.d.ts.map +1 -0
- package/dist/extend/slots.d.ts +216 -0
- package/dist/extend/slots.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +25 -6
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/use-address.d.ts +26 -0
- package/dist/hooks/use-address.d.ts.map +1 -0
- package/dist/hooks/use-cart.d.ts +3 -0
- package/dist/hooks/use-cart.d.ts.map +1 -0
- package/dist/hooks/use-catalog.d.ts +24 -0
- package/dist/hooks/use-catalog.d.ts.map +1 -0
- package/dist/hooks/use-categories.d.ts +19 -0
- package/dist/hooks/use-categories.d.ts.map +1 -0
- package/dist/hooks/use-checkout.d.ts +41 -0
- package/dist/hooks/use-checkout.d.ts.map +1 -0
- package/dist/hooks/use-discount-validator.d.ts +20 -0
- package/dist/hooks/use-discount-validator.d.ts.map +1 -0
- package/dist/hooks/use-enquiry.d.ts +7 -0
- package/dist/hooks/use-enquiry.d.ts.map +1 -0
- package/dist/hooks/{useMyOrders.d.ts → use-my-orders.d.ts} +1 -1
- package/dist/hooks/use-my-orders.d.ts.map +1 -0
- package/dist/hooks/use-order.d.ts +17 -0
- package/dist/hooks/use-order.d.ts.map +1 -0
- package/dist/hooks/use-payment-methods.d.ts +19 -0
- package/dist/hooks/use-payment-methods.d.ts.map +1 -0
- package/dist/hooks/use-policies.d.ts +25 -0
- package/dist/hooks/use-policies.d.ts.map +1 -0
- package/dist/hooks/use-product.d.ts +15 -0
- package/dist/hooks/use-product.d.ts.map +1 -0
- package/dist/hooks/{useProducts.d.ts → use-products.d.ts} +1 -1
- package/dist/hooks/use-products.d.ts.map +1 -0
- package/dist/hooks/use-region.d.ts +15 -0
- package/dist/hooks/use-region.d.ts.map +1 -0
- package/dist/hooks/use-shipping.d.ts +32 -0
- package/dist/hooks/use-shipping.d.ts.map +1 -0
- package/dist/hooks/use-storefront-actions.d.ts +12 -0
- package/dist/hooks/use-storefront-actions.d.ts.map +1 -0
- package/dist/hooks/use-storefront-head.d.ts +19 -0
- package/dist/hooks/use-storefront-head.d.ts.map +1 -0
- package/dist/hooks/use-storefront.d.ts +3 -0
- package/dist/hooks/use-storefront.d.ts.map +1 -0
- package/dist/index.d.ts +124 -54
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1310 -5010
- package/dist/index.js.map +1 -1
- package/dist/lib/errors.d.ts +9 -0
- package/dist/lib/errors.d.ts.map +1 -0
- package/dist/lib/format.d.ts.map +1 -0
- package/dist/lib/motion.d.ts.map +1 -0
- package/dist/lib/seo.d.ts +26 -0
- package/dist/lib/seo.d.ts.map +1 -0
- package/dist/{testids.d.ts → lib/testids.d.ts} +33 -0
- package/dist/lib/testids.d.ts.map +1 -0
- package/dist/{theme.d.ts → lib/theme.d.ts} +41 -3
- package/dist/lib/theme.d.ts.map +1 -0
- package/dist/render.d.ts +5 -0
- package/dist/render.d.ts.map +1 -0
- package/dist/render.js +359 -0
- package/dist/render.js.map +1 -0
- package/dist/stores/cart.store.d.ts +34 -2
- package/dist/stores/cart.store.d.ts.map +1 -1
- package/dist/stores/catalog.store.d.ts +11 -0
- package/dist/stores/catalog.store.d.ts.map +1 -1
- package/dist/stores/delivery.store.d.ts +9 -0
- package/dist/stores/delivery.store.d.ts.map +1 -1
- package/dist/views/CatalogPage.d.ts.map +1 -0
- package/dist/views/CheckoutPage.d.ts.map +1 -0
- package/dist/views/ContentPage.d.ts +11 -0
- package/dist/views/ContentPage.d.ts.map +1 -0
- package/dist/views/HomePage.d.ts +9 -0
- package/dist/views/HomePage.d.ts.map +1 -0
- package/dist/views/MyPurchasesPage.d.ts.map +1 -0
- package/dist/views/NotFoundPage.d.ts.map +1 -0
- package/dist/views/OrderConfirmationPage.d.ts.map +1 -0
- package/dist/{pages → views}/PolicyPage.d.ts.map +1 -1
- package/dist/views/ProductDetailPage.d.ts.map +1 -0
- package/dist/views/StorefrontPage.d.ts +35 -0
- package/dist/views/StorefrontPage.d.ts.map +1 -0
- package/dist/workflows/checkout.d.ts +1 -1
- package/dist/workflows/checkout.d.ts.map +1 -1
- package/package.json +21 -14
- package/dist/auth.d.ts.map +0 -1
- package/dist/blocks.d.ts.map +0 -1
- package/dist/component-contracts.d.ts.map +0 -1
- package/dist/component-selectors.d.ts.map +0 -1
- package/dist/components/CartDrawer.d.ts.map +0 -1
- package/dist/components/CustomerAccountShell.d.ts +0 -13
- package/dist/components/CustomerAccountShell.d.ts.map +0 -1
- package/dist/components/DeliveryEstimator.d.ts.map +0 -1
- package/dist/components/FiltersPanel.d.ts +0 -3
- package/dist/components/FiltersPanel.d.ts.map +0 -1
- package/dist/components/OrderTrackingTimeline.d.ts.map +0 -1
- package/dist/components/ProductCard.d.ts +0 -4
- package/dist/components/ProductCard.d.ts.map +0 -1
- package/dist/components/ProductEnquiryForm.d.ts.map +0 -1
- package/dist/components/ProductGallery.d.ts +0 -22
- package/dist/components/ProductGallery.d.ts.map +0 -1
- package/dist/components/ProductGrid.d.ts.map +0 -1
- package/dist/components/ProductOptionSelector.d.ts.map +0 -1
- package/dist/components/ProductSpecs.d.ts.map +0 -1
- package/dist/components/QuantityInput.d.ts.map +0 -1
- package/dist/components/RelatedProducts.d.ts.map +0 -1
- package/dist/components/SignInModal.d.ts.map +0 -1
- package/dist/components/StorefrontErrorBoundary.d.ts.map +0 -1
- package/dist/components/StorefrontFooter.d.ts.map +0 -1
- package/dist/components/StorefrontHeader.d.ts.map +0 -1
- package/dist/components/Toaster.d.ts.map +0 -1
- package/dist/components/sections/CategoryShowcase.d.ts +0 -6
- package/dist/components/sections/CategoryShowcase.d.ts.map +0 -1
- package/dist/components/sections/HeroSection.d.ts +0 -9
- package/dist/components/sections/HeroSection.d.ts.map +0 -1
- package/dist/components/sections/MediaCarousel.d.ts +0 -11
- package/dist/components/sections/MediaCarousel.d.ts.map +0 -1
- package/dist/components/sections/MiscSections.d.ts +0 -33
- package/dist/components/sections/MiscSections.d.ts.map +0 -1
- package/dist/components/sections/ProductRail.d.ts +0 -9
- package/dist/components/sections/ProductRail.d.ts.map +0 -1
- package/dist/components/sections/ProductSlider.d.ts +0 -15
- package/dist/components/sections/ProductSlider.d.ts.map +0 -1
- package/dist/config.d.ts +0 -174
- package/dist/config.d.ts.map +0 -1
- package/dist/createStorefrontApp.d.ts +0 -28
- package/dist/createStorefrontApp.d.ts.map +0 -1
- package/dist/define.d.ts.map +0 -1
- package/dist/format.d.ts.map +0 -1
- package/dist/hooks/useCategories.d.ts +0 -6
- package/dist/hooks/useCategories.d.ts.map +0 -1
- package/dist/hooks/useDiscountValidator.d.ts +0 -14
- package/dist/hooks/useDiscountValidator.d.ts.map +0 -1
- package/dist/hooks/useMyOrders.d.ts.map +0 -1
- package/dist/hooks/useProduct.d.ts +0 -7
- package/dist/hooks/useProduct.d.ts.map +0 -1
- package/dist/hooks/useProducts.d.ts.map +0 -1
- package/dist/hooks/useStorefront.d.ts +0 -35
- package/dist/hooks/useStorefront.d.ts.map +0 -1
- package/dist/hooks/useStorefrontHead.d.ts +0 -11
- package/dist/hooks/useStorefrontHead.d.ts.map +0 -1
- package/dist/motion.d.ts.map +0 -1
- package/dist/order-status.d.ts.map +0 -1
- package/dist/pages/CatalogPage.d.ts.map +0 -1
- package/dist/pages/CheckoutPage.d.ts.map +0 -1
- package/dist/pages/HomePage.d.ts +0 -9
- package/dist/pages/HomePage.d.ts.map +0 -1
- package/dist/pages/MyPurchasesPage.d.ts.map +0 -1
- package/dist/pages/NotFoundPage.d.ts.map +0 -1
- package/dist/pages/OrderConfirmationPage.d.ts.map +0 -1
- package/dist/pages/ProductDetailPage.d.ts.map +0 -1
- package/dist/presets.d.ts.map +0 -1
- package/dist/product-options.d.ts +0 -12
- package/dist/product-options.d.ts.map +0 -1
- package/dist/router.d.ts.map +0 -1
- package/dist/scaffold.d.ts.map +0 -1
- package/dist/sections.d.ts.map +0 -1
- package/dist/testids.d.ts.map +0 -1
- package/dist/theme.d.ts.map +0 -1
- package/src/auth.ts +0 -227
- package/src/blocks.tsx +0 -51
- package/src/catalog.ts +0 -3
- package/src/component-contracts.ts +0 -154
- package/src/component-selectors.ts +0 -31
- package/src/components/CartDrawer.tsx +0 -279
- package/src/components/CustomerAccountShell.tsx +0 -102
- package/src/components/DeliveryEstimator.tsx +0 -157
- package/src/components/FiltersPanel.tsx +0 -109
- package/src/components/OrderTrackingTimeline.tsx +0 -135
- package/src/components/Price.tsx +0 -32
- package/src/components/ProductCard.tsx +0 -120
- package/src/components/ProductEnquiryForm.tsx +0 -175
- package/src/components/ProductGallery.tsx +0 -174
- package/src/components/ProductGrid.tsx +0 -43
- package/src/components/ProductOptionSelector.tsx +0 -50
- package/src/components/ProductSpecs.tsx +0 -75
- package/src/components/QuantityInput.tsx +0 -52
- package/src/components/RelatedProducts.tsx +0 -40
- package/src/components/SignInModal.tsx +0 -120
- package/src/components/SmoothImage.tsx +0 -59
- package/src/components/StorefrontErrorBoundary.tsx +0 -51
- package/src/components/StorefrontFooter.tsx +0 -110
- package/src/components/StorefrontHeader.tsx +0 -477
- package/src/components/Toaster.tsx +0 -60
- package/src/components/sections/CategoryShowcase.tsx +0 -80
- package/src/components/sections/HeroSection.tsx +0 -193
- package/src/components/sections/MediaCarousel.tsx +0 -141
- package/src/components/sections/MiscSections.tsx +0 -158
- package/src/components/sections/ProductRail.tsx +0 -81
- package/src/components/sections/ProductSlider.tsx +0 -119
- package/src/config.ts +0 -229
- package/src/createStorefrontApp.tsx +0 -247
- package/src/define.ts +0 -34
- package/src/format.ts +0 -7
- package/src/hooks/index.ts +0 -6
- package/src/hooks/useCategories.ts +0 -26
- package/src/hooks/useDiscountValidator.ts +0 -43
- package/src/hooks/useMyOrders.ts +0 -41
- package/src/hooks/useProduct.ts +0 -36
- package/src/hooks/useProducts.ts +0 -39
- package/src/hooks/useStorefront.ts +0 -58
- package/src/hooks/useStorefrontHead.ts +0 -25
- package/src/index.ts +0 -202
- package/src/motion.tsx +0 -94
- package/src/order-status.ts +0 -33
- package/src/pages/CatalogPage.tsx +0 -118
- package/src/pages/CheckoutPage.tsx +0 -689
- package/src/pages/HomePage.tsx +0 -16
- package/src/pages/MyPurchasesPage.tsx +0 -311
- package/src/pages/NotFoundPage.tsx +0 -25
- package/src/pages/OrderConfirmationPage.tsx +0 -190
- package/src/pages/PolicyPage.tsx +0 -47
- package/src/pages/ProductDetailPage.tsx +0 -264
- package/src/presets.ts +0 -324
- package/src/product-options.ts +0 -63
- package/src/router.ts +0 -49
- package/src/scaffold.tsx +0 -115
- package/src/sections.ts +0 -116
- package/src/shop.ts +0 -4
- package/src/stores/cart.store.ts +0 -185
- package/src/stores/catalog.store.ts +0 -39
- package/src/stores/delivery.store.ts +0 -152
- package/src/stores/session.store.ts +0 -28
- package/src/stores/toast.store.ts +0 -43
- package/src/testids.ts +0 -136
- package/src/theme.ts +0 -194
- package/src/ui.ts +0 -5
- package/src/workflows/checkout.ts +0 -119
- /package/dist/components/{SignInModal.d.ts → account/SignInModal.d.ts} +0 -0
- /package/dist/components/{CartDrawer.d.ts → cart/CartDrawer.d.ts} +0 -0
- /package/dist/components/{QuantityInput.d.ts → cart/QuantityInput.d.ts} +0 -0
- /package/dist/components/{DeliveryEstimator.d.ts → checkout/DeliveryEstimator.d.ts} +0 -0
- /package/dist/components/{ProductGrid.d.ts → collection/ProductGrid.d.ts} +0 -0
- /package/dist/components/{StorefrontErrorBoundary.d.ts → layout/StorefrontErrorBoundary.d.ts} +0 -0
- /package/dist/components/{StorefrontFooter.d.ts → layout/StorefrontFooter.d.ts} +0 -0
- /package/dist/components/{StorefrontHeader.d.ts → layout/StorefrontHeader.d.ts} +0 -0
- /package/dist/components/{Toaster.d.ts → layout/Toaster.d.ts} +0 -0
- /package/dist/components/{OrderTrackingTimeline.d.ts → order/OrderTrackingTimeline.d.ts} +0 -0
- /package/dist/components/{ProductEnquiryForm.d.ts → product/ProductEnquiryForm.d.ts} +0 -0
- /package/dist/components/{ProductSpecs.d.ts → product/ProductSpecs.d.ts} +0 -0
- /package/dist/components/{RelatedProducts.d.ts → product/RelatedProducts.d.ts} +0 -0
- /package/dist/{order-status.d.ts → data/order-status.d.ts} +0 -0
- /package/dist/{component-selectors.d.ts → extend/component-selectors.d.ts} +0 -0
- /package/dist/{format.d.ts → lib/format.d.ts} +0 -0
- /package/dist/{motion.d.ts → lib/motion.d.ts} +0 -0
- /package/dist/{pages → views}/CatalogPage.d.ts +0 -0
- /package/dist/{pages → views}/CheckoutPage.d.ts +0 -0
- /package/dist/{pages → views}/MyPurchasesPage.d.ts +0 -0
- /package/dist/{pages → views}/NotFoundPage.d.ts +0 -0
- /package/dist/{pages → views}/OrderConfirmationPage.d.ts +0 -0
- /package/dist/{pages → views}/PolicyPage.d.ts +0 -0
- /package/dist/{pages → views}/ProductDetailPage.d.ts +0 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { PostalAddress } from '@fayz-ai/core';
|
|
2
|
+
export type AddressLookupStatus = 'idle' | 'loading' | 'found' | 'not-found' | 'error';
|
|
3
|
+
export interface UseAddress {
|
|
4
|
+
postalCode: string;
|
|
5
|
+
/** The same code formatted for display (`01311-000`). */
|
|
6
|
+
display: string;
|
|
7
|
+
address: PostalAddress | null;
|
|
8
|
+
status: AddressLookupStatus;
|
|
9
|
+
error: string | null;
|
|
10
|
+
/** Set the code and look it up once it is complete. Partial input never calls out. */
|
|
11
|
+
setPostalCode: (value: string) => void;
|
|
12
|
+
clear: () => void;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* A postal code, and the address it resolves to.
|
|
16
|
+
*
|
|
17
|
+
* The lookup fires on the code being COMPLETE rather than on every keystroke —
|
|
18
|
+
* a debounce would still send `0`, `01`, `013`… and each is a request that can
|
|
19
|
+
* only fail. The last completed lookup wins: a shopper who corrects a typo mid
|
|
20
|
+
* flight must not have the stale response overwrite the new one.
|
|
21
|
+
*
|
|
22
|
+
* This is the address half of checkout, separated from `useShipping` on purpose:
|
|
23
|
+
* a store that does not ship still asks for a billing address.
|
|
24
|
+
*/
|
|
25
|
+
export declare function useAddress(initial?: string): UseAddress;
|
|
26
|
+
//# sourceMappingURL=use-address.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-address.d.ts","sourceRoot":"","sources":["../../src/hooks/use-address.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAElD,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,WAAW,GAAG,OAAO,CAAA;AAEtF,MAAM,WAAW,UAAU;IACzB,UAAU,EAAE,MAAM,CAAA;IAClB,yDAAyD;IACzD,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,aAAa,GAAG,IAAI,CAAA;IAC7B,MAAM,EAAE,mBAAmB,CAAA;IAC3B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,sFAAsF;IACtF,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACtC,KAAK,EAAE,MAAM,IAAI,CAAA;CAClB;AAID;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,OAAO,SAAK,GAAG,UAAU,CAoDnD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-cart.d.ts","sourceRoot":"","sources":["../../src/hooks/use-cart.ts"],"names":[],"mappings":"AAEA,8CAA8C;AAC9C,wBAAgB,OAAO,2BAEtB"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** The catalog store, plus the config a listing page needs to render a link. */
|
|
2
|
+
export declare function useCatalog(): {
|
|
3
|
+
catalogPath: string;
|
|
4
|
+
config: import("..").ResolvedStorefrontConfig;
|
|
5
|
+
search: string;
|
|
6
|
+
categoryId: string | null;
|
|
7
|
+
collection: string | null;
|
|
8
|
+
facets: import("..").CatalogFacets;
|
|
9
|
+
priceMin: number | null;
|
|
10
|
+
priceMax: number | null;
|
|
11
|
+
inStockOnly: boolean;
|
|
12
|
+
sort: import("..").CatalogSort;
|
|
13
|
+
setSearch(search: string): void;
|
|
14
|
+
setCategoryId(categoryId: string | null): void;
|
|
15
|
+
setCollection(collection: string | null): void;
|
|
16
|
+
setFacet(key: string, value: string | null): void;
|
|
17
|
+
clearFacets(): void;
|
|
18
|
+
setPriceMin(priceMin: number | null): void;
|
|
19
|
+
setPriceMax(priceMax: number | null): void;
|
|
20
|
+
setInStockOnly(inStockOnly: boolean): void;
|
|
21
|
+
setSort(sort: import("..").CatalogSort): void;
|
|
22
|
+
reset(): void;
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=use-catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-catalog.d.ts","sourceRoot":"","sources":["../../src/hooks/use-catalog.ts"],"names":[],"mappings":"AAGA,gFAAgF;AAChF,wBAAgB,UAAU;;;;;;;;;;;;;;;;;;;;;EAIzB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Category } from '@fayz-ai/shop/types';
|
|
2
|
+
/**
|
|
3
|
+
* Every catalog category, in store order.
|
|
4
|
+
*
|
|
5
|
+
* Reads through the declared `categories.list` loader instead of calling
|
|
6
|
+
* `getShopProvider().listCategories()` from an effect. Same provider, same
|
|
7
|
+
* query, same result — but a read that goes through the port is deduped with
|
|
8
|
+
* any block on the page asking the same question, and it can be resolved ahead
|
|
9
|
+
* of render. That second property is why the change matters: the footer's
|
|
10
|
+
* category column is on every page of every store, and a read that only exists
|
|
11
|
+
* inside an effect is permanently empty in a headless render (M8) and in any
|
|
12
|
+
* future SSR pass (L4). A read that reaches the provider directly can be
|
|
13
|
+
* neither deduped nor pre-resolved.
|
|
14
|
+
*/
|
|
15
|
+
export declare function useCategories(): {
|
|
16
|
+
categories: Category[];
|
|
17
|
+
loading: boolean;
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=use-categories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-categories.d.ts","sourceRoot":"","sources":["../../src/hooks/use-categories.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAEnD;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,IAAI;IAAE,UAAU,EAAE,QAAQ,EAAE,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAG5E"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { PaymentMethodKind, ShippingAddressInput } from '@fayz-ai/shop/types';
|
|
2
|
+
import type { PlaceStorefrontOrderResult, StorefrontCheckoutAddress, StorefrontCheckoutCustomer } from '../workflows/checkout';
|
|
3
|
+
export interface CheckoutTotals {
|
|
4
|
+
count: number;
|
|
5
|
+
subtotal: number;
|
|
6
|
+
discountTotal: number;
|
|
7
|
+
shipping: number;
|
|
8
|
+
total: number;
|
|
9
|
+
}
|
|
10
|
+
export interface CheckoutSubmission {
|
|
11
|
+
customer: StorefrontCheckoutCustomer;
|
|
12
|
+
address?: StorefrontCheckoutAddress;
|
|
13
|
+
shippingAddress?: ShippingAddressInput;
|
|
14
|
+
paymentMethod?: PaymentMethodKind;
|
|
15
|
+
markPaid?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface UseCheckout {
|
|
18
|
+
/** False when the store sells by catalog or enquiry — there is no checkout to render. */
|
|
19
|
+
enabled: boolean;
|
|
20
|
+
/** True when the cart has nothing in it: the reason an enabled checkout still cannot proceed. */
|
|
21
|
+
empty: boolean;
|
|
22
|
+
totals: CheckoutTotals;
|
|
23
|
+
placing: boolean;
|
|
24
|
+
error: string | null;
|
|
25
|
+
placeOrder: (input: CheckoutSubmission) => Promise<PlaceStorefrontOrderResult | null>;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The checkout, with the cart, session and config already bound.
|
|
29
|
+
*
|
|
30
|
+
* `placeOrder` takes only what the shopper typed. Everything the server needs
|
|
31
|
+
* to be told about — lines, discount, totals, the customer session — is read
|
|
32
|
+
* here from the stores, because a caller assembling that payload is a caller
|
|
33
|
+
* that can assemble it wrongly, and the prices in it are exactly the numbers a
|
|
34
|
+
* client must not be trusted with. `shop_place_order` recomputes from the
|
|
35
|
+
* catalog regardless; this keeps the two from disagreeing on screen.
|
|
36
|
+
*
|
|
37
|
+
* `placing` is guarded rather than advisory: a double-submitted checkout is two
|
|
38
|
+
* orders and two charges, and the button being disabled is not a guarantee.
|
|
39
|
+
*/
|
|
40
|
+
export declare function useCheckout(): UseCheckout;
|
|
41
|
+
//# sourceMappingURL=use-checkout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-checkout.d.ts","sourceRoot":"","sources":["../../src/hooks/use-checkout.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAYlF,OAAO,KAAK,EACV,0BAA0B,EAC1B,yBAAyB,EACzB,0BAA0B,EAC3B,MAAM,uBAAuB,CAAA;AAE9B,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,aAAa,EAAE,MAAM,CAAA;IACrB,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,0BAA0B,CAAA;IACpC,OAAO,CAAC,EAAE,yBAAyB,CAAA;IACnC,eAAe,CAAC,EAAE,oBAAoB,CAAA;IACtC,aAAa,CAAC,EAAE,iBAAiB,CAAA;IACjC,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,MAAM,WAAW,WAAW;IAC1B,yFAAyF;IACzF,OAAO,EAAE,OAAO,CAAA;IAChB,iGAAiG;IACjG,KAAK,EAAE,OAAO,CAAA;IACd,MAAM,EAAE,cAAc,CAAA;IACtB,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,UAAU,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,OAAO,CAAC,0BAA0B,GAAG,IAAI,CAAC,CAAA;CACtF;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,IAAI,WAAW,CAqDzC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface DiscountValidation {
|
|
2
|
+
valid: boolean;
|
|
3
|
+
percent: number;
|
|
4
|
+
message?: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Storefront coupon validator, backed by the RULE ENGINE (spine M6): a store's
|
|
8
|
+
* `{code, percent}` config entries and its document `promotions` section are
|
|
9
|
+
* both Promotions — one eligibility rule on `code` plus an application method
|
|
10
|
+
* — gated by the same evaluator path the server mirrors. The hardcoded
|
|
11
|
+
* "trust config.discounts directly" branch this hook used to carry is retired.
|
|
12
|
+
*
|
|
13
|
+
* Codes the local document does not know still go through the provider-backed
|
|
14
|
+
* validateDiscount primitive (status/date-window/usage-limit on the discount
|
|
15
|
+
* table), translated through the same adapter. The storefront cart models a
|
|
16
|
+
* discount as a percentage, so non-percentage codes are rejected for
|
|
17
|
+
* client-side preview — the server still honors them at checkout.
|
|
18
|
+
*/
|
|
19
|
+
export declare function useDiscountValidator(): (code: string) => Promise<DiscountValidation>;
|
|
20
|
+
//# sourceMappingURL=use-discount-validator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-discount-validator.d.ts","sourceRoot":"","sources":["../../src/hooks/use-discount-validator.ts"],"names":[],"mappings":"AAWA,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,OAAO,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AA0BD;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,IAAI,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,kBAAkB,CAAC,CAoDpF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CreateProductEnquiryInput } from '@fayz-ai/shop/types';
|
|
2
|
+
/** The enquiry path, for stores that take orders as conversations rather than checkouts. */
|
|
3
|
+
export declare function useEnquiry(): {
|
|
4
|
+
enquiry: Required<Pick<import("..").StorefrontEnquiryConfig, "label" | "successMessage" | "subjectPrefix">> & Omit<import("..").StorefrontEnquiryConfig, "label" | "successMessage" | "subjectPrefix">;
|
|
5
|
+
createProductEnquiry: (input: CreateProductEnquiryInput) => Promise<import("@fayz-ai/shop").ProductEnquiry>;
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=use-enquiry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-enquiry.d.ts","sourceRoot":"","sources":["../../src/hooks/use-enquiry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAA;AAGpE,4FAA4F;AAC5F,wBAAgB,UAAU;;kCAGmB,yBAAyB;EASrE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-my-orders.d.ts","sourceRoot":"","sources":["../../src/hooks/use-my-orders.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAIhD,wBAAgB,WAAW,IAAI;IAAE,MAAM,EAAE,KAAK,EAAE,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,CAiDxF"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Order } from '@fayz-ai/shop/types';
|
|
2
|
+
export interface UseOrder {
|
|
3
|
+
order: Order | null;
|
|
4
|
+
loading: boolean;
|
|
5
|
+
error: string | null;
|
|
6
|
+
reload: () => void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* One order by id — the confirmation page, and the link a shopper is emailed.
|
|
10
|
+
*
|
|
11
|
+
* A null id is a legitimate state (the route matched before the id resolved),
|
|
12
|
+
* not an error: it settles to `loading: false` with no order rather than
|
|
13
|
+
* reporting a failure the shopper cannot act on. The last request wins, so a
|
|
14
|
+
* fast reload cannot leave the previous order on screen.
|
|
15
|
+
*/
|
|
16
|
+
export declare function useOrder(orderId: string | null | undefined): UseOrder;
|
|
17
|
+
//# sourceMappingURL=use-order.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-order.d.ts","sourceRoot":"","sources":["../../src/hooks/use-order.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAEhD,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAA;IACnB,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,MAAM,EAAE,MAAM,IAAI,CAAA;CACnB;AAED;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,QAAQ,CAsCrE"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { PaymentMethodKind } from '@fayz-ai/shop/types';
|
|
2
|
+
export interface UsePaymentMethods {
|
|
3
|
+
/** The kinds this store offers, in the order it declared them. */
|
|
4
|
+
methods: readonly PaymentMethodKind[];
|
|
5
|
+
/** The default selection: the first declared method, or null when none are. */
|
|
6
|
+
preferred: PaymentMethodKind | null;
|
|
7
|
+
supports: (method: PaymentMethodKind) => boolean;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Which payment methods the store offers.
|
|
11
|
+
*
|
|
12
|
+
* Deliberately provider-agnostic. A method is a declared KIND (`pix`,
|
|
13
|
+
* `credit_card`, `cash`) — never a Stripe or Mercado Pago object — because the
|
|
14
|
+
* canonical rule is that no storefront code imports a provider client. Which
|
|
15
|
+
* gateway settles a `pix` is the backend's business, and swapping it must not
|
|
16
|
+
* change a line here.
|
|
17
|
+
*/
|
|
18
|
+
export declare function usePaymentMethods(): UsePaymentMethods;
|
|
19
|
+
//# sourceMappingURL=use-payment-methods.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-payment-methods.d.ts","sourceRoot":"","sources":["../../src/hooks/use-payment-methods.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAG5D,MAAM,WAAW,iBAAiB;IAChC,kEAAkE;IAClE,OAAO,EAAE,SAAS,iBAAiB,EAAE,CAAA;IACrC,+EAA+E;IAC/E,SAAS,EAAE,iBAAiB,GAAG,IAAI,CAAA;IACnC,QAAQ,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,OAAO,CAAA;CACjD;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,IAAI,iBAAiB,CAQrD"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type PolicyKind = 'privacy' | 'terms' | 'returns';
|
|
2
|
+
export interface StorefrontPolicy {
|
|
3
|
+
kind: PolicyKind;
|
|
4
|
+
title: string;
|
|
5
|
+
path: string;
|
|
6
|
+
/** The store's own text, or null when it has not published this one yet. */
|
|
7
|
+
content: string | null;
|
|
8
|
+
published: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface UsePolicies {
|
|
11
|
+
policies: StorefrontPolicy[];
|
|
12
|
+
/** True when every policy has text — what a payment processor asks for at go-live. */
|
|
13
|
+
complete: boolean;
|
|
14
|
+
contactEmail?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The institutional pages, as data.
|
|
18
|
+
*
|
|
19
|
+
* All three are always listed, published or not: the routes and footer links
|
|
20
|
+
* have to exist before the store writes its policies, because a 404 where a
|
|
21
|
+
* processor expects a returns policy blocks go-live. `published` is what a
|
|
22
|
+
* checklist reads; the page itself renders a placeholder.
|
|
23
|
+
*/
|
|
24
|
+
export declare function usePolicies(): UsePolicies;
|
|
25
|
+
//# sourceMappingURL=use-policies.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-policies.d.ts","sourceRoot":"","sources":["../../src/hooks/use-policies.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAA;AAExD,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,UAAU,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,4EAA4E;IAC5E,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,SAAS,EAAE,OAAO,CAAA;CACnB;AAQD,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,gBAAgB,EAAE,CAAA;IAC5B,sFAAsF;IACtF,QAAQ,EAAE,OAAO,CAAA;IACjB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,IAAI,WAAW,CAWzC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Product } from '@fayz-ai/shop/types';
|
|
2
|
+
/**
|
|
3
|
+
* One active product by slug — the `products.bySlug` loader, by hook.
|
|
4
|
+
*
|
|
5
|
+
* On a composed product page the page-level resolver already answered this
|
|
6
|
+
* (productBody declares `{ slug: { $param: 'slug' } }`), so the hook consumes
|
|
7
|
+
* the resolved entry and no second request happens. Anywhere else it resolves
|
|
8
|
+
* the loader itself, through the same provider port (I11).
|
|
9
|
+
*/
|
|
10
|
+
export declare function useProduct(slug: string): {
|
|
11
|
+
product: Product | null;
|
|
12
|
+
loading: boolean;
|
|
13
|
+
error: string | null;
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=use-product.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-product.d.ts","sourceRoot":"","sources":["../../src/hooks/use-product.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAGlD;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG;IACxC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAA;IACvB,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;CACrB,CAOA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-products.d.ts","sourceRoot":"","sources":["../../src/hooks/use-products.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAEvE,wBAAgB,WAAW,CAAC,IAAI,EAAE,mBAAmB,GAAG;IACtD,QAAQ,EAAE,OAAO,EAAE,CAAA;IACnB,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,MAAM,EAAE,MAAM,IAAI,CAAA;CACnB,CA6BA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface StorefrontRegion {
|
|
2
|
+
currency: string;
|
|
3
|
+
locale: string;
|
|
4
|
+
/** Money formatted for this store, so a caller never re-derives the pair. */
|
|
5
|
+
format: (value: number) => string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Currency and locale, with the formatter already bound to them.
|
|
9
|
+
*
|
|
10
|
+
* Returning the bound formatter is the point: `formatMoney` defaults to BRL and
|
|
11
|
+
* pt-BR, so every call site that passes only a number silently formats a
|
|
12
|
+
* non-Brazilian store's prices as reais.
|
|
13
|
+
*/
|
|
14
|
+
export declare function useRegion(): StorefrontRegion;
|
|
15
|
+
//# sourceMappingURL=use-region.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-region.d.ts","sourceRoot":"","sources":["../../src/hooks/use-region.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,6EAA6E;IAC7E,MAAM,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;CAClC;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,IAAI,gBAAgB,CAG5C"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ShippingQuoteOption } from '@fayz-ai/shop/types';
|
|
2
|
+
import type { DeliveryStatus } from '../stores/delivery.store';
|
|
3
|
+
export interface UseShipping {
|
|
4
|
+
postalCode: string;
|
|
5
|
+
status: DeliveryStatus;
|
|
6
|
+
error: string | null;
|
|
7
|
+
options: ShippingQuoteOption[];
|
|
8
|
+
selectedZoneId: string | null;
|
|
9
|
+
/** What the current cart would be charged, quote or flat rate. */
|
|
10
|
+
rate: number;
|
|
11
|
+
/** False when nothing in the cart travels (0046). The delivery block is not
|
|
12
|
+
* shown at all — a download has no address, and "Grátis" implies one. */
|
|
13
|
+
requiresShipping: boolean;
|
|
14
|
+
/** True when the flat-rate free-above threshold is already met. */
|
|
15
|
+
free: boolean;
|
|
16
|
+
/** How much more the shopper must add to ship free, or null when there is no threshold. */
|
|
17
|
+
amountToFreeShipping: number | null;
|
|
18
|
+
quote: (postalCode: string) => Promise<void>;
|
|
19
|
+
selectZone: (zoneId: string) => void;
|
|
20
|
+
clear: () => void;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* What delivery costs for the cart as it stands.
|
|
24
|
+
*
|
|
25
|
+
* The quote is asked for against the CURRENT subtotal and is never persisted —
|
|
26
|
+
* a price restored from localStorage is a price the shopper can edit with
|
|
27
|
+
* devtools. The order is charged from `shop_place_order`, which recomputes from
|
|
28
|
+
* the same zones and ignores anything the client sends; this hook exists to
|
|
29
|
+
* show a number, not to decide one.
|
|
30
|
+
*/
|
|
31
|
+
export declare function useShipping(): UseShipping;
|
|
32
|
+
//# sourceMappingURL=use-shipping.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-shipping.d.ts","sourceRoot":"","sources":["../../src/hooks/use-shipping.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAI9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAE9D,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,cAAc,CAAA;IACtB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,OAAO,EAAE,mBAAmB,EAAE,CAAA;IAC9B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,kEAAkE;IAClE,IAAI,EAAE,MAAM,CAAA;IACZ;8EAC0E;IAC1E,gBAAgB,EAAE,OAAO,CAAA;IACzB,mEAAmE;IACnE,IAAI,EAAE,OAAO,CAAA;IACb,2FAA2F;IAC3F,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAA;IACnC,KAAK,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IAC5C,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;IACpC,KAAK,EAAE,MAAM,IAAI,CAAA;CAClB;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,IAAI,WAAW,CAwBzC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Product } from '@fayz-ai/shop/types';
|
|
2
|
+
import { navigateTo } from '../app/router';
|
|
3
|
+
import type { ProductOptionSelection } from '../data/product-options';
|
|
4
|
+
/** The verbs a block calls — bound so a block never reaches into a store directly. */
|
|
5
|
+
export declare function useStorefrontActions(): {
|
|
6
|
+
navigateTo: typeof navigateTo;
|
|
7
|
+
addToCart: (product: Product, quantity?: number, options?: ProductOptionSelection) => void;
|
|
8
|
+
openCart: () => void;
|
|
9
|
+
closeCart: () => void;
|
|
10
|
+
createProductEnquiry: (input: import("@fayz-ai/shop").CreateProductEnquiryInput) => Promise<import("@fayz-ai/shop").ProductEnquiry>;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=use-storefront-actions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-storefront-actions.d.ts","sourceRoot":"","sources":["../../src/hooks/use-storefront-actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAE1C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAA;AAGrE,sFAAsF;AACtF,wBAAgB,oBAAoB;;yBAQX,OAAO,aAAa,MAAM,YAAY,sBAAsB;;;;EAMpF"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { StaticHeadInput } from '../app/static-render';
|
|
2
|
+
/**
|
|
3
|
+
* Minimal per-route head manager: sets document.title and meta description so
|
|
4
|
+
* each storefront page (product, catalog, account, checkout) has its own title
|
|
5
|
+
* and shareable description instead of one static SPA title. A real SSR/prerender
|
|
6
|
+
* pass (M12) layers OG/canonical on top; this covers the client-rendered baseline.
|
|
7
|
+
*
|
|
8
|
+
* Under a static render (`renderStore`, spine M8) there is no document and no
|
|
9
|
+
* effect phase, so the same declaration is reported to the render pass instead.
|
|
10
|
+
* That is how headless HTML gets the title THIS route sets, rather than a title
|
|
11
|
+
* the renderer guessed by re-deriving the routing table on the server.
|
|
12
|
+
*
|
|
13
|
+
* Canonical, image, type and JSON-LD are static-render only by design: they
|
|
14
|
+
* matter to a crawler reading the served HTML, and a client-side page that
|
|
15
|
+
* injected them after hydration would be describing a URL that, under hash
|
|
16
|
+
* addressing, is not its own anyway.
|
|
17
|
+
*/
|
|
18
|
+
export declare function useStorefrontHead(input: StaticHeadInput): void;
|
|
19
|
+
//# sourceMappingURL=use-storefront-head.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-storefront-head.d.ts","sourceRoot":"","sources":["../../src/hooks/use-storefront-head.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAE3D;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI,CAkB9D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-storefront.d.ts","sourceRoot":"","sources":["../../src/hooks/use-storefront.ts"],"names":[],"mappings":"AAEA,8EAA8E;AAC9E,wBAAgB,aAAa,0CAE5B"}
|