create-tanqory-theme 0.0.0-stage → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +55 -2
- package/bin/create-tanqory-theme.mjs +13 -0
- package/lib/agents.mjs +118 -0
- package/lib/create.mjs +245 -0
- package/package.json +39 -4
- package/templates/blank/README.md +13 -0
- package/templates/blank/config/settings.json +3 -0
- package/templates/blank/locales/en.json +22 -0
- package/templates/blank/locales/th.json +22 -0
- package/templates/blank/package.json +34 -0
- package/templates/blank/regions/footer.json +35 -0
- package/templates/blank/regions/header.json +13 -0
- package/templates/blank/scripts/build.mjs +193 -0
- package/templates/blank/scripts/probe.ts +4 -0
- package/templates/blank/src/bundle.ts +15 -0
- package/templates/blank/src/components/parts.tsx +32 -0
- package/templates/blank/src/entry.client.tsx +6 -0
- package/templates/blank/src/entry.server.tsx +13 -0
- package/templates/blank/src/sections/chrome.tsx +132 -0
- package/templates/blank/src/sections/commerce.tsx +242 -0
- package/templates/blank/src/sections/content.tsx +111 -0
- package/templates/blank/src/sections/editorial.tsx +107 -0
- package/templates/blank/src/settings.ts +15 -0
- package/templates/blank/src/styles/theme.css +195 -0
- package/templates/blank/src/templates.ts +14 -0
- package/templates/blank/src/theme.tsx +76 -0
- package/templates/blank/template.json +24 -0
- package/templates/blank/templates/404.json +14 -0
- package/templates/blank/templates/account.json +14 -0
- package/templates/blank/templates/article.json +14 -0
- package/templates/blank/templates/blog.json +14 -0
- package/templates/blank/templates/cart.json +14 -0
- package/templates/blank/templates/collection.json +14 -0
- package/templates/blank/templates/index.json +36 -0
- package/templates/blank/templates/page.contact.json +18 -0
- package/templates/blank/templates/page.json +14 -0
- package/templates/blank/templates/product.json +18 -0
- package/templates/blank/templates/search.json +14 -0
- package/templates/blank/tests/theme.test.ts +49 -0
- package/templates/blank/tsconfig.json +17 -0
- package/templates/blank/vite.client.config.ts +17 -0
- package/templates/blank/vite.probe.config.ts +16 -0
- package/templates/blank/vite.server.config.ts +32 -0
- package/templates/blank/vitest.config.ts +9 -0
- package/templates/common/.claude/settings.json +8 -0
- package/templates/common/.codex/config.toml +4 -0
- package/templates/common/.gemini/settings.json +12 -0
- package/templates/common/.github/workflows/theme-check.yml +44 -0
- package/templates/common/.mcp.json +12 -0
- package/templates/common/.vscode/mcp.json +9 -0
- package/templates/common/_gitignore +9 -0
- package/templates/common/scripts/check.mjs +44 -0
- package/templates/common/scripts/dev.mjs +30 -0
- package/templates/common/tanqory.config.json +6 -0
- package/templates/nova/.gitattributes +3 -0
- package/templates/nova/.tanqory/contracts/LOCK.json +66 -0
- package/templates/nova/.tanqory/contracts/nova-01.json +1092 -0
- package/templates/nova/.tanqory/contracts/nova-12A.json +2674 -0
- package/templates/nova/.tanqory/contracts/nova-12B.json +2285 -0
- package/templates/nova/.tanqory/contracts/nova-12C.json +2848 -0
- package/templates/nova/.tanqory/contracts/nova-12D.json +3039 -0
- package/templates/nova/.tanqory/contracts/nova-12E.json +1473 -0
- package/templates/nova/.tanqory/contracts/nova-12F.json +1670 -0
- package/templates/nova/.tanqory/contracts/nova-12G.json +1661 -0
- package/templates/nova/.tanqory/contracts/nova-13.json +301 -0
- package/templates/nova/.tanqory/contracts/nova-14.json +172 -0
- package/templates/nova/.tanqory/legacy-settings.json +1121 -0
- package/templates/nova/README.md +150 -0
- package/templates/nova/_gitignore +28 -0
- package/templates/nova/assets/ai-tokens.css +6 -0
- package/templates/nova/assets/starter/starter-art-1200x800-0b773ac4.svg +1 -0
- package/templates/nova/assets/starter/starter-art-1200x900-59600290.svg +1 -0
- package/templates/nova/assets/starter/starter-art-1200x900-c549d496.svg +1 -0
- package/templates/nova/assets/starter/starter-art-1600x900-8f979fcb.svg +1 -0
- package/templates/nova/assets/starter/starter-art-2100x900-cbb71bfd.svg +1 -0
- package/templates/nova/config/legacy-settings.json +438 -0
- package/templates/nova/config/promotion-popup.schema.ts +29 -0
- package/templates/nova/config/settings.json +23 -0
- package/templates/nova/config/settings.schema.ts +231 -0
- package/templates/nova/entry.abi.tsx +27 -0
- package/templates/nova/groups/footer.json +39 -0
- package/templates/nova/groups/header.json +11 -0
- package/templates/nova/lib/abi/abi.css +41 -0
- package/templates/nova/lib/bundle-core.ts +35 -0
- package/templates/nova/lib/bundle.client.ts +15 -0
- package/templates/nova/lib/bundle.ts +15 -0
- package/templates/nova/lib/legacy-settings.ts +104 -0
- package/templates/nova/locales/ar.json +590 -0
- package/templates/nova/locales/en.json +590 -0
- package/templates/nova/locales/th.json +590 -0
- package/templates/nova/main.abi.tsx +12 -0
- package/templates/nova/package.json +44 -0
- package/templates/nova/scripts/abi/build.mjs +145 -0
- package/templates/nova/scripts/abi/check-content.mjs +99 -0
- package/templates/nova/scripts/abi/jcs.mjs +27 -0
- package/templates/nova/scripts/abi/local-host.mjs +294 -0
- package/templates/nova/scripts/abi/manifest.mjs +392 -0
- package/templates/nova/scripts/abi/starter-assets.mjs +32 -0
- package/templates/nova/scripts/compiler/checks/check-a11y.mjs +88 -0
- package/templates/nova/scripts/compiler/checks/check-layout-sanity.mjs +169 -0
- package/templates/nova/scripts/compiler/checks/check-page-headings.mjs +67 -0
- package/templates/nova/scripts/compiler/checks/check-product-jsonld.mjs +80 -0
- package/templates/nova/scripts/compiler/checks/theme-spec/check.mjs +88 -0
- package/templates/nova/scripts/compiler/contracts/extract.mjs +188 -0
- package/templates/nova/scripts/compiler/contracts/index.ts +125 -0
- package/templates/nova/scripts/compiler/contracts/validate.ts +347 -0
- package/templates/nova/scripts/compiler/manifest/gen-manifest.mjs +156 -0
- package/templates/nova/scripts/compiler/manifest/manifest-entry.ts +386 -0
- package/templates/nova/scripts/compiler/manifest/manifest-sections.ts +247 -0
- package/templates/nova/scripts/compiler/migrate/migrate-content.mjs +171 -0
- package/templates/nova/scripts/compiler/migrate/migrate-groups.mjs +159 -0
- package/templates/nova/scripts/parity/case-shim.ts +14 -0
- package/templates/nova/scripts/parity/emit.ts +206 -0
- package/templates/nova/scripts/parity/index.html +12 -0
- package/templates/nova/scripts/parity/main.tsx +23 -0
- package/templates/nova/scripts/parity/pages.tsx +123 -0
- package/templates/nova/scripts/parity/vite.config.ts +29 -0
- package/templates/nova/src/components/base/Accordion.css +20 -0
- package/templates/nova/src/components/base/Accordion.tsx +50 -0
- package/templates/nova/src/components/base/Badge.css +17 -0
- package/templates/nova/src/components/base/Badge.tsx +26 -0
- package/templates/nova/src/components/base/Button.css +73 -0
- package/templates/nova/src/components/base/Button.tsx +64 -0
- package/templates/nova/src/components/base/Checkbox.tsx +18 -0
- package/templates/nova/src/components/base/Chip.css +20 -0
- package/templates/nova/src/components/base/Chip.tsx +33 -0
- package/templates/nova/src/components/base/Divider.css +6 -0
- package/templates/nova/src/components/base/Divider.tsx +28 -0
- package/templates/nova/src/components/base/IconButton.css +34 -0
- package/templates/nova/src/components/base/IconButton.tsx +41 -0
- package/templates/nova/src/components/base/Input.css +21 -0
- package/templates/nova/src/components/base/Input.tsx +24 -0
- package/templates/nova/src/components/base/Link.css +15 -0
- package/templates/nova/src/components/base/Link.tsx +23 -0
- package/templates/nova/src/components/base/Radio.tsx +13 -0
- package/templates/nova/src/components/base/Select.css +18 -0
- package/templates/nova/src/components/base/Select.tsx +34 -0
- package/templates/nova/src/components/base/Skeleton.css +17 -0
- package/templates/nova/src/components/base/Skeleton.tsx +23 -0
- package/templates/nova/src/components/base/Spinner.css +13 -0
- package/templates/nova/src/components/base/Spinner.tsx +8 -0
- package/templates/nova/src/components/base/Switch.tsx +16 -0
- package/templates/nova/src/components/base/Tabs.css +24 -0
- package/templates/nova/src/components/base/Tabs.tsx +61 -0
- package/templates/nova/src/components/base/Textarea.css +1 -0
- package/templates/nova/src/components/base/Textarea.tsx +8 -0
- package/templates/nova/src/components/base/choice-props.ts +9 -0
- package/templates/nova/src/components/base/choice.css +69 -0
- package/templates/nova/src/components/commerce/AddToCart.css +4 -0
- package/templates/nova/src/components/commerce/AddToCart.tsx +77 -0
- package/templates/nova/src/components/commerce/CartLine.css +26 -0
- package/templates/nova/src/components/commerce/CartLine.tsx +82 -0
- package/templates/nova/src/components/commerce/CartSummary.css +23 -0
- package/templates/nova/src/components/commerce/CartSummary.tsx +120 -0
- package/templates/nova/src/components/commerce/CollectionCard.css +66 -0
- package/templates/nova/src/components/commerce/CollectionCard.tsx +57 -0
- package/templates/nova/src/components/commerce/ComparisonTable.css +33 -0
- package/templates/nova/src/components/commerce/ComparisonTable.tsx +113 -0
- package/templates/nova/src/components/commerce/EarnHint.css +3 -0
- package/templates/nova/src/components/commerce/EarnHint.tsx +31 -0
- package/templates/nova/src/components/commerce/Hotspot.css +16 -0
- package/templates/nova/src/components/commerce/Hotspot.tsx +64 -0
- package/templates/nova/src/components/commerce/ListingParts.css +79 -0
- package/templates/nova/src/components/commerce/ListingParts.tsx +211 -0
- package/templates/nova/src/components/commerce/LookItem.css +19 -0
- package/templates/nova/src/components/commerce/LookItem.tsx +41 -0
- package/templates/nova/src/components/commerce/MiniCartLine.css +20 -0
- package/templates/nova/src/components/commerce/MiniCartLine.tsx +93 -0
- package/templates/nova/src/components/commerce/PaymentMark.css +2 -0
- package/templates/nova/src/components/commerce/PaymentMark.tsx +55 -0
- package/templates/nova/src/components/commerce/Price.css +27 -0
- package/templates/nova/src/components/commerce/Price.tsx +55 -0
- package/templates/nova/src/components/commerce/ProductCard.css +66 -0
- package/templates/nova/src/components/commerce/ProductCard.tsx +117 -0
- package/templates/nova/src/components/commerce/ProductGallery.css +72 -0
- package/templates/nova/src/components/commerce/ProductGallery.tsx +98 -0
- package/templates/nova/src/components/commerce/QuantitySelector.css +23 -0
- package/templates/nova/src/components/commerce/QuantitySelector.tsx +45 -0
- package/templates/nova/src/components/commerce/Reviews.css +34 -0
- package/templates/nova/src/components/commerce/Reviews.tsx +112 -0
- package/templates/nova/src/components/commerce/Stars.css +7 -0
- package/templates/nova/src/components/commerce/Stars.tsx +38 -0
- package/templates/nova/src/components/commerce/VariantPicker.css +31 -0
- package/templates/nova/src/components/commerce/VariantPicker.tsx +122 -0
- package/templates/nova/src/components/commerce/blocks/Badge.css +6 -0
- package/templates/nova/src/components/commerce/blocks/Badge.tsx +33 -0
- package/templates/nova/src/components/commerce/blocks/PaymentIcons.tsx +43 -0
- package/templates/nova/src/components/commerce/blocks/Swatches.tsx +17 -0
- package/templates/nova/src/components/commerce/blocks/payment.css +2 -0
- package/templates/nova/src/components/commerce/cart-limit.ts +11 -0
- package/templates/nova/src/components/commerce/money.ts +34 -0
- package/templates/nova/src/components/commerce/swatch.ts +54 -0
- package/templates/nova/src/components/content/ArticleCard.css +22 -0
- package/templates/nova/src/components/content/ArticleCard.tsx +53 -0
- package/templates/nova/src/components/content/BeforeAfterSlider.css +38 -0
- package/templates/nova/src/components/content/BeforeAfterSlider.tsx +87 -0
- package/templates/nova/src/components/content/CardRow.css +80 -0
- package/templates/nova/src/components/content/CardRow.tsx +140 -0
- package/templates/nova/src/components/content/CarouselControls.css +61 -0
- package/templates/nova/src/components/content/CarouselControls.tsx +90 -0
- package/templates/nova/src/components/content/ContentsNav.css +16 -0
- package/templates/nova/src/components/content/ContentsNav.tsx +55 -0
- package/templates/nova/src/components/content/Countdown.css +24 -0
- package/templates/nova/src/components/content/Countdown.tsx +115 -0
- package/templates/nova/src/components/content/HeroCopy.css +92 -0
- package/templates/nova/src/components/content/HeroCopy.tsx +148 -0
- package/templates/nova/src/components/content/HeroFrame.css +75 -0
- package/templates/nova/src/components/content/HeroFrame.tsx +49 -0
- package/templates/nova/src/components/content/HeroMedia.css +40 -0
- package/templates/nova/src/components/content/HeroMedia.tsx +170 -0
- package/templates/nova/src/components/content/LongForm.css +40 -0
- package/templates/nova/src/components/content/LongForm.tsx +56 -0
- package/templates/nova/src/components/content/MediaFrame.css +5 -0
- package/templates/nova/src/components/content/MediaFrame.tsx +52 -0
- package/templates/nova/src/components/content/RichText.tsx +30 -0
- package/templates/nova/src/components/content/SectionHead.css +8 -0
- package/templates/nova/src/components/content/SectionHead.tsx +34 -0
- package/templates/nova/src/components/content/ShareButtons.css +2 -0
- package/templates/nova/src/components/content/ShareButtons.tsx +40 -0
- package/templates/nova/src/components/content/StoreCard.css +14 -0
- package/templates/nova/src/components/content/StoreCard.tsx +60 -0
- package/templates/nova/src/components/content/TestimonialCard.css +36 -0
- package/templates/nova/src/components/content/TestimonialCard.tsx +102 -0
- package/templates/nova/src/components/content/UgcTile.css +8 -0
- package/templates/nova/src/components/content/UgcTile.tsx +33 -0
- package/templates/nova/src/components/content/blocks/Button.tsx +36 -0
- package/templates/nova/src/components/content/blocks/Column.tsx +30 -0
- package/templates/nova/src/components/content/blocks/Heading.tsx +31 -0
- package/templates/nova/src/components/content/blocks/Icon.tsx +25 -0
- package/templates/nova/src/components/content/blocks/Image.tsx +42 -0
- package/templates/nova/src/components/content/blocks/Text.tsx +26 -0
- package/templates/nova/src/components/content/blocks/Video.tsx +44 -0
- package/templates/nova/src/components/content/blocks/content.css +25 -0
- package/templates/nova/src/components/content/blocks/shared.ts +5 -0
- package/templates/nova/src/components/forms/ContactForm.css +19 -0
- package/templates/nova/src/components/forms/ContactForm.tsx +139 -0
- package/templates/nova/src/components/forms/FormField.css +15 -0
- package/templates/nova/src/components/forms/FormField.tsx +77 -0
- package/templates/nova/src/components/forms/GatewayFields.tsx +79 -0
- package/templates/nova/src/components/forms/NewsletterForm.css +9 -0
- package/templates/nova/src/components/forms/NewsletterForm.tsx +141 -0
- package/templates/nova/src/components/forms/SearchField.css +7 -0
- package/templates/nova/src/components/forms/SearchField.tsx +68 -0
- package/templates/nova/src/components/forms/blocks/Newsletter.css +5 -0
- package/templates/nova/src/components/forms/blocks/Newsletter.tsx +71 -0
- package/templates/nova/src/components/forms/validate.ts +4 -0
- package/templates/nova/src/components/listing/ProductListing.tsx +200 -0
- package/templates/nova/src/components/navigation/BrandLogo.tsx +35 -0
- package/templates/nova/src/components/navigation/Breadcrumb.css +16 -0
- package/templates/nova/src/components/navigation/Breadcrumb.tsx +59 -0
- package/templates/nova/src/components/navigation/LineAddFriend.css +5 -0
- package/templates/nova/src/components/navigation/LineAddFriend.tsx +42 -0
- package/templates/nova/src/components/navigation/LocaleSelector.css +33 -0
- package/templates/nova/src/components/navigation/LocaleSelector.tsx +64 -0
- package/templates/nova/src/components/navigation/Menu.tsx +26 -0
- package/templates/nova/src/components/navigation/Pagination.css +24 -0
- package/templates/nova/src/components/navigation/Pagination.tsx +74 -0
- package/templates/nova/src/components/navigation/RecoveryLinks.css +8 -0
- package/templates/nova/src/components/navigation/RecoveryLinks.tsx +23 -0
- package/templates/nova/src/components/navigation/SocialLinks.css +5 -0
- package/templates/nova/src/components/navigation/SocialLinks.tsx +51 -0
- package/templates/nova/src/components/navigation/blocks/SocialLinks.tsx +23 -0
- package/templates/nova/src/components/overlays/AccountMenu.css +11 -0
- package/templates/nova/src/components/overlays/AccountMenu.tsx +91 -0
- package/templates/nova/src/components/overlays/CartDrawer.css +17 -0
- package/templates/nova/src/components/overlays/CartDrawer.tsx +118 -0
- package/templates/nova/src/components/overlays/ConfirmationDialog.tsx +49 -0
- package/templates/nova/src/components/overlays/CookieConsent.css +56 -0
- package/templates/nova/src/components/overlays/CookieConsent.tsx +170 -0
- package/templates/nova/src/components/overlays/Drawer.css +38 -0
- package/templates/nova/src/components/overlays/Drawer.tsx +66 -0
- package/templates/nova/src/components/overlays/FriendOfferPanel.tsx +79 -0
- package/templates/nova/src/components/overlays/MarketSelector.css +111 -0
- package/templates/nova/src/components/overlays/MarketSelector.tsx +450 -0
- package/templates/nova/src/components/overlays/Menu.css +9 -0
- package/templates/nova/src/components/overlays/Menu.tsx +124 -0
- package/templates/nova/src/components/overlays/MobileNavDrawer.css +28 -0
- package/templates/nova/src/components/overlays/MobileNavDrawer.tsx +166 -0
- package/templates/nova/src/components/overlays/Modal.css +52 -0
- package/templates/nova/src/components/overlays/Modal.tsx +88 -0
- package/templates/nova/src/components/overlays/Popover.css +4 -0
- package/templates/nova/src/components/overlays/Popover.tsx +115 -0
- package/templates/nova/src/components/overlays/ProductLightbox.css +20 -0
- package/templates/nova/src/components/overlays/ProductLightbox.tsx +70 -0
- package/templates/nova/src/components/overlays/PromoPopup.css +32 -0
- package/templates/nova/src/components/overlays/PromoPopup.tsx +198 -0
- package/templates/nova/src/components/overlays/QuickView.css +31 -0
- package/templates/nova/src/components/overlays/QuickView.tsx +127 -0
- package/templates/nova/src/components/overlays/ReferralPanel.css +16 -0
- package/templates/nova/src/components/overlays/ReferralPanel.tsx +138 -0
- package/templates/nova/src/components/overlays/RewardsLauncher.css +22 -0
- package/templates/nova/src/components/overlays/RewardsLauncher.tsx +270 -0
- package/templates/nova/src/components/overlays/SearchModal.css +48 -0
- package/templates/nova/src/components/overlays/SearchModal.tsx +302 -0
- package/templates/nova/src/components/overlays/Sheet.css +16 -0
- package/templates/nova/src/components/overlays/Sheet.tsx +48 -0
- package/templates/nova/src/components/overlays/SizeGuide.css +8 -0
- package/templates/nova/src/components/overlays/SizeGuide.tsx +74 -0
- package/templates/nova/src/components/overlays/Toast.css +20 -0
- package/templates/nova/src/components/overlays/Toast.tsx +164 -0
- package/templates/nova/src/components/overlays/Tooltip.css +6 -0
- package/templates/nova/src/components/overlays/Tooltip.tsx +59 -0
- package/templates/nova/src/components/overlays/use-dialog.ts +74 -0
- package/templates/nova/src/components/section/shared.css +42 -0
- package/templates/nova/src/components/section/shared.ts +120 -0
- package/templates/nova/src/components/section/shell.tsx +29 -0
- package/templates/nova/src/components/states/Alert.css +10 -0
- package/templates/nova/src/components/states/Alert.tsx +50 -0
- package/templates/nova/src/components/states/EditorFrame.css +31 -0
- package/templates/nova/src/components/states/EditorFrame.tsx +43 -0
- package/templates/nova/src/components/states/MediaState.css +1 -0
- package/templates/nova/src/components/states/MediaState.tsx +49 -0
- package/templates/nova/src/components/states/OfflineNotice.css +4 -0
- package/templates/nova/src/components/states/OfflineNotice.tsx +24 -0
- package/templates/nova/src/components/states/SkeletonLayout.css +22 -0
- package/templates/nova/src/components/states/SkeletonLayout.tsx +104 -0
- package/templates/nova/src/components/states/StateBlock.css +22 -0
- package/templates/nova/src/components/states/StateBlock.tsx +39 -0
- package/templates/nova/src/components/states/media/MediaError.css +6 -0
- package/templates/nova/src/components/states/media/MediaError.tsx +49 -0
- package/templates/nova/src/components/states/media/MediaPlaceholder.css +24 -0
- package/templates/nova/src/components/states/media/MediaPlaceholder.tsx +101 -0
- package/templates/nova/src/components/states/media/placeholder-art.ts +142 -0
- package/templates/nova/src/layouts/Main.tsx +80 -0
- package/templates/nova/src/sections/Account/Account.tsx +109 -0
- package/templates/nova/src/sections/Account/index.ts +22 -0
- package/templates/nova/src/sections/Account/presets.ts +6 -0
- package/templates/nova/src/sections/Account/schema.ts +29 -0
- package/templates/nova/src/sections/AnnouncementBar/AnnouncementBar.css +37 -0
- package/templates/nova/src/sections/AnnouncementBar/AnnouncementBar.tsx +151 -0
- package/templates/nova/src/sections/AnnouncementBar/index.ts +20 -0
- package/templates/nova/src/sections/AnnouncementBar/presets.ts +10 -0
- package/templates/nova/src/sections/AnnouncementBar/schema.ts +26 -0
- package/templates/nova/src/sections/ArticleBody/ArticleBody.tsx +129 -0
- package/templates/nova/src/sections/ArticleBody/index.ts +21 -0
- package/templates/nova/src/sections/ArticleBody/presets.ts +10 -0
- package/templates/nova/src/sections/ArticleBody/schema.ts +40 -0
- package/templates/nova/src/sections/BeforeAfter/BeforeAfter.tsx +47 -0
- package/templates/nova/src/sections/BeforeAfter/blocks/Comparison.tsx +20 -0
- package/templates/nova/src/sections/BeforeAfter/index.ts +28 -0
- package/templates/nova/src/sections/BeforeAfter/presets.ts +10 -0
- package/templates/nova/src/sections/BeforeAfter/schema.ts +34 -0
- package/templates/nova/src/sections/BlogPosts/BlogPosts.tsx +106 -0
- package/templates/nova/src/sections/BlogPosts/index.ts +30 -0
- package/templates/nova/src/sections/BlogPosts/presets.ts +10 -0
- package/templates/nova/src/sections/BlogPosts/schema.ts +42 -0
- package/templates/nova/src/sections/Breadcrumbs/Breadcrumbs.css +10 -0
- package/templates/nova/src/sections/Breadcrumbs/Breadcrumbs.tsx +41 -0
- package/templates/nova/src/sections/Breadcrumbs/index.ts +20 -0
- package/templates/nova/src/sections/Breadcrumbs/presets.ts +6 -0
- package/templates/nova/src/sections/Breadcrumbs/schema.ts +24 -0
- package/templates/nova/src/sections/CartItems/CartItems.tsx +170 -0
- package/templates/nova/src/sections/CartItems/blocks/CartBadge.tsx +14 -0
- package/templates/nova/src/sections/CartItems/index.ts +37 -0
- package/templates/nova/src/sections/CartItems/presets.ts +8 -0
- package/templates/nova/src/sections/CartItems/schema.ts +34 -0
- package/templates/nova/src/sections/CollectionBanner/CollectionBanner.tsx +120 -0
- package/templates/nova/src/sections/CollectionBanner/index.ts +25 -0
- package/templates/nova/src/sections/CollectionBanner/presets.ts +10 -0
- package/templates/nova/src/sections/CollectionBanner/schema.ts +37 -0
- package/templates/nova/src/sections/CollectionLinks/CollectionLinks.tsx +47 -0
- package/templates/nova/src/sections/CollectionLinks/index.ts +20 -0
- package/templates/nova/src/sections/CollectionLinks/presets.ts +8 -0
- package/templates/nova/src/sections/CollectionLinks/schema.ts +33 -0
- package/templates/nova/src/sections/CollectionList/CollectionList.tsx +89 -0
- package/templates/nova/src/sections/CollectionList/blocks/CollectionItem.tsx +25 -0
- package/templates/nova/src/sections/CollectionList/index.ts +33 -0
- package/templates/nova/src/sections/CollectionList/presets.ts +10 -0
- package/templates/nova/src/sections/CollectionList/schema.ts +41 -0
- package/templates/nova/src/sections/ComparisonTable/ComparisonTable.tsx +52 -0
- package/templates/nova/src/sections/ComparisonTable/blocks/CompareItem.tsx +26 -0
- package/templates/nova/src/sections/ComparisonTable/index.ts +31 -0
- package/templates/nova/src/sections/ComparisonTable/presets.ts +8 -0
- package/templates/nova/src/sections/ComparisonTable/schema.ts +31 -0
- package/templates/nova/src/sections/ContactForm/ContactForm.tsx +83 -0
- package/templates/nova/src/sections/ContactForm/blocks/ContactDetail.tsx +13 -0
- package/templates/nova/src/sections/ContactForm/index.ts +29 -0
- package/templates/nova/src/sections/ContactForm/presets.ts +8 -0
- package/templates/nova/src/sections/ContactForm/schema.ts +34 -0
- package/templates/nova/src/sections/Divider/Divider.css +17 -0
- package/templates/nova/src/sections/Divider/Divider.tsx +21 -0
- package/templates/nova/src/sections/Divider/index.ts +20 -0
- package/templates/nova/src/sections/Divider/presets.ts +10 -0
- package/templates/nova/src/sections/Divider/schema.ts +24 -0
- package/templates/nova/src/sections/Faq/Faq.tsx +51 -0
- package/templates/nova/src/sections/Faq/blocks/FaqItem.tsx +13 -0
- package/templates/nova/src/sections/Faq/index.ts +28 -0
- package/templates/nova/src/sections/Faq/presets.ts +8 -0
- package/templates/nova/src/sections/Faq/schema.ts +32 -0
- package/templates/nova/src/sections/FeatureGridBlocks/FeatureGridBlocks.tsx +90 -0
- package/templates/nova/src/sections/FeatureGridBlocks/index.ts +35 -0
- package/templates/nova/src/sections/FeatureGridBlocks/presets.ts +8 -0
- package/templates/nova/src/sections/FeatureGridBlocks/schema.ts +35 -0
- package/templates/nova/src/sections/FeatureHighlights/FeatureHighlights.tsx +56 -0
- package/templates/nova/src/sections/FeatureHighlights/index.ts +20 -0
- package/templates/nova/src/sections/FeatureHighlights/presets.ts +6 -0
- package/templates/nova/src/sections/FeatureHighlights/schema.ts +27 -0
- package/templates/nova/src/sections/FeaturedCollection/FeaturedCollection.tsx +67 -0
- package/templates/nova/src/sections/FeaturedCollection/index.ts +21 -0
- package/templates/nova/src/sections/FeaturedCollection/presets.ts +10 -0
- package/templates/nova/src/sections/FeaturedCollection/schema.ts +39 -0
- package/templates/nova/src/sections/FeaturedProduct/FeaturedProduct.tsx +107 -0
- package/templates/nova/src/sections/FeaturedProduct/index.ts +23 -0
- package/templates/nova/src/sections/FeaturedProduct/presets.ts +8 -0
- package/templates/nova/src/sections/FeaturedProduct/schema.ts +35 -0
- package/templates/nova/src/sections/Footer/Footer.css +81 -0
- package/templates/nova/src/sections/Footer/Footer.tsx +256 -0
- package/templates/nova/src/sections/Footer/blocks/FooterBrand.tsx +40 -0
- package/templates/nova/src/sections/Footer/blocks/FooterLine.tsx +11 -0
- package/templates/nova/src/sections/Footer/blocks/FooterMenu.tsx +14 -0
- package/templates/nova/src/sections/Footer/blocks/FooterText.tsx +8 -0
- package/templates/nova/src/sections/Footer/blocks/footer.css +7 -0
- package/templates/nova/src/sections/Footer/index.ts +38 -0
- package/templates/nova/src/sections/Footer/presets.ts +10 -0
- package/templates/nova/src/sections/Footer/schema.ts +27 -0
- package/templates/nova/src/sections/Group/Group.css +59 -0
- package/templates/nova/src/sections/Group/Group.tsx +167 -0
- package/templates/nova/src/sections/Group/blocks/Accordion.tsx +26 -0
- package/templates/nova/src/sections/Group/blocks/JumboText.tsx +20 -0
- package/templates/nova/src/sections/Group/blocks/Spacer.tsx +16 -0
- package/templates/nova/src/sections/Group/index.ts +36 -0
- package/templates/nova/src/sections/Group/presets.ts +12 -0
- package/templates/nova/src/sections/Group/schema.ts +35 -0
- package/templates/nova/src/sections/Header/Header.css +185 -0
- package/templates/nova/src/sections/Header/Header.tsx +478 -0
- package/templates/nova/src/sections/Header/index.ts +32 -0
- package/templates/nova/src/sections/Header/presets.ts +10 -0
- package/templates/nova/src/sections/Header/schema.ts +32 -0
- package/templates/nova/src/sections/Hero/Hero.tsx +128 -0
- package/templates/nova/src/sections/Hero/index.ts +24 -0
- package/templates/nova/src/sections/Hero/presets.ts +16 -0
- package/templates/nova/src/sections/Hero/schema.ts +56 -0
- package/templates/nova/src/sections/ImageGallery/ImageGallery.tsx +86 -0
- package/templates/nova/src/sections/ImageGallery/index.ts +28 -0
- package/templates/nova/src/sections/ImageGallery/presets.ts +10 -0
- package/templates/nova/src/sections/ImageGallery/schema.ts +34 -0
- package/templates/nova/src/sections/ImageWithText/ImageWithText.tsx +62 -0
- package/templates/nova/src/sections/ImageWithText/index.ts +23 -0
- package/templates/nova/src/sections/ImageWithText/presets.ts +12 -0
- package/templates/nova/src/sections/ImageWithText/schema.ts +45 -0
- package/templates/nova/src/sections/LineAddFriend/LineAddFriend.tsx +25 -0
- package/templates/nova/src/sections/LineAddFriend/index.ts +20 -0
- package/templates/nova/src/sections/LineAddFriend/presets.ts +3 -0
- package/templates/nova/src/sections/LineAddFriend/schema.ts +25 -0
- package/templates/nova/src/sections/LogoList/LogoList.tsx +40 -0
- package/templates/nova/src/sections/LogoList/blocks/Logo.tsx +18 -0
- package/templates/nova/src/sections/LogoList/index.ts +29 -0
- package/templates/nova/src/sections/LogoList/presets.ts +8 -0
- package/templates/nova/src/sections/LogoList/schema.ts +29 -0
- package/templates/nova/src/sections/MainCollection/MainCollection.tsx +51 -0
- package/templates/nova/src/sections/MainCollection/index.ts +26 -0
- package/templates/nova/src/sections/MainCollection/presets.ts +10 -0
- package/templates/nova/src/sections/MainCollection/schema.ts +29 -0
- package/templates/nova/src/sections/Marquee/Marquee.tsx +114 -0
- package/templates/nova/src/sections/Marquee/index.ts +20 -0
- package/templates/nova/src/sections/Marquee/presets.ts +10 -0
- package/templates/nova/src/sections/Marquee/schema.ts +23 -0
- package/templates/nova/src/sections/Multicolumn/Multicolumn.tsx +56 -0
- package/templates/nova/src/sections/Multicolumn/index.ts +25 -0
- package/templates/nova/src/sections/Multicolumn/presets.ts +8 -0
- package/templates/nova/src/sections/Multicolumn/schema.ts +34 -0
- package/templates/nova/src/sections/Newsletter/Newsletter.tsx +64 -0
- package/templates/nova/src/sections/Newsletter/index.ts +20 -0
- package/templates/nova/src/sections/Newsletter/presets.ts +10 -0
- package/templates/nova/src/sections/Newsletter/schema.ts +36 -0
- package/templates/nova/src/sections/NotFound/NotFound.tsx +41 -0
- package/templates/nova/src/sections/NotFound/index.ts +20 -0
- package/templates/nova/src/sections/NotFound/presets.ts +6 -0
- package/templates/nova/src/sections/NotFound/schema.ts +30 -0
- package/templates/nova/src/sections/PageBody/PageBody.tsx +35 -0
- package/templates/nova/src/sections/PageBody/index.ts +21 -0
- package/templates/nova/src/sections/PageBody/presets.ts +6 -0
- package/templates/nova/src/sections/PageBody/schema.ts +29 -0
- package/templates/nova/src/sections/PolicyPage/PolicyPage.tsx +62 -0
- package/templates/nova/src/sections/PolicyPage/index.ts +23 -0
- package/templates/nova/src/sections/PolicyPage/presets.ts +6 -0
- package/templates/nova/src/sections/PolicyPage/schema.ts +27 -0
- package/templates/nova/src/sections/ProductDetails/ProductDetails.tsx +269 -0
- package/templates/nova/src/sections/ProductDetails/blocks/AddToCartBlock.tsx +15 -0
- package/templates/nova/src/sections/ProductDetails/blocks/ProductDescription.tsx +15 -0
- package/templates/nova/src/sections/ProductDetails/blocks/ProductInventory.tsx +38 -0
- package/templates/nova/src/sections/ProductDetails/blocks/ProductPrice.tsx +19 -0
- package/templates/nova/src/sections/ProductDetails/blocks/ProductSku.tsx +15 -0
- package/templates/nova/src/sections/ProductDetails/blocks/ProductTitle.tsx +17 -0
- package/templates/nova/src/sections/ProductDetails/blocks/Quantity.tsx +14 -0
- package/templates/nova/src/sections/ProductDetails/blocks/Tab.tsx +23 -0
- package/templates/nova/src/sections/ProductDetails/blocks/VariantPickerBlock.tsx +44 -0
- package/templates/nova/src/sections/ProductDetails/blocks/commerce-blocks.css +13 -0
- package/templates/nova/src/sections/ProductDetails/index.ts +44 -0
- package/templates/nova/src/sections/ProductDetails/presets.ts +10 -0
- package/templates/nova/src/sections/ProductDetails/schema.ts +44 -0
- package/templates/nova/src/sections/ProductGrid/ProductGrid.tsx +38 -0
- package/templates/nova/src/sections/ProductGrid/index.ts +25 -0
- package/templates/nova/src/sections/ProductGrid/presets.ts +6 -0
- package/templates/nova/src/sections/ProductGrid/schema.ts +37 -0
- package/templates/nova/src/sections/ProductRecommendations/ProductRecommendations.tsx +45 -0
- package/templates/nova/src/sections/ProductRecommendations/index.ts +20 -0
- package/templates/nova/src/sections/ProductRecommendations/presets.ts +8 -0
- package/templates/nova/src/sections/ProductRecommendations/schema.ts +28 -0
- package/templates/nova/src/sections/ProductReviews/ProductReviews.tsx +136 -0
- package/templates/nova/src/sections/ProductReviews/index.ts +22 -0
- package/templates/nova/src/sections/ProductReviews/presets.ts +6 -0
- package/templates/nova/src/sections/ProductReviews/schema.ts +31 -0
- package/templates/nova/src/sections/PromoBanner/PromoBanner.tsx +78 -0
- package/templates/nova/src/sections/PromoBanner/index.ts +20 -0
- package/templates/nova/src/sections/PromoBanner/presets.ts +10 -0
- package/templates/nova/src/sections/PromoBanner/schema.ts +38 -0
- package/templates/nova/src/sections/RecentlyViewed/RecentlyViewed.tsx +53 -0
- package/templates/nova/src/sections/RecentlyViewed/index.ts +20 -0
- package/templates/nova/src/sections/RecentlyViewed/presets.ts +6 -0
- package/templates/nova/src/sections/RecentlyViewed/schema.ts +26 -0
- package/templates/nova/src/sections/RichText/RichText.tsx +38 -0
- package/templates/nova/src/sections/RichText/index.ts +20 -0
- package/templates/nova/src/sections/RichText/presets.ts +10 -0
- package/templates/nova/src/sections/RichText/schema.ts +37 -0
- package/templates/nova/src/sections/SearchResults/SearchResults.tsx +112 -0
- package/templates/nova/src/sections/SearchResults/index.ts +26 -0
- package/templates/nova/src/sections/SearchResults/presets.ts +8 -0
- package/templates/nova/src/sections/SearchResults/schema.ts +30 -0
- package/templates/nova/src/sections/ShopTheLook/ShopTheLook.tsx +112 -0
- package/templates/nova/src/sections/ShopTheLook/blocks/Hotspot.tsx +22 -0
- package/templates/nova/src/sections/ShopTheLook/index.ts +33 -0
- package/templates/nova/src/sections/ShopTheLook/presets.ts +8 -0
- package/templates/nova/src/sections/ShopTheLook/schema.ts +31 -0
- package/templates/nova/src/sections/Slideshow/Slideshow.tsx +199 -0
- package/templates/nova/src/sections/Slideshow/blocks/Slide.tsx +93 -0
- package/templates/nova/src/sections/Slideshow/index.ts +30 -0
- package/templates/nova/src/sections/Slideshow/presets.ts +10 -0
- package/templates/nova/src/sections/Slideshow/schema.ts +36 -0
- package/templates/nova/src/sections/StoreLocator/StoreLocator.tsx +66 -0
- package/templates/nova/src/sections/StoreLocator/index.ts +20 -0
- package/templates/nova/src/sections/StoreLocator/presets.ts +6 -0
- package/templates/nova/src/sections/StoreLocator/schema.ts +34 -0
- package/templates/nova/src/sections/TeamFounders/TeamFounders.tsx +74 -0
- package/templates/nova/src/sections/TeamFounders/blocks/Person.tsx +28 -0
- package/templates/nova/src/sections/TeamFounders/index.ts +28 -0
- package/templates/nova/src/sections/TeamFounders/presets.ts +10 -0
- package/templates/nova/src/sections/TeamFounders/schema.ts +36 -0
- package/templates/nova/src/sections/Testimonials/Testimonials.tsx +83 -0
- package/templates/nova/src/sections/Testimonials/blocks/Testimonial.tsx +30 -0
- package/templates/nova/src/sections/Testimonials/index.ts +29 -0
- package/templates/nova/src/sections/Testimonials/presets.ts +10 -0
- package/templates/nova/src/sections/Testimonials/schema.ts +35 -0
- package/templates/nova/src/sections/Timeline/Timeline.tsx +43 -0
- package/templates/nova/src/sections/Timeline/blocks/Step.tsx +19 -0
- package/templates/nova/src/sections/Timeline/index.ts +28 -0
- package/templates/nova/src/sections/Timeline/presets.ts +8 -0
- package/templates/nova/src/sections/Timeline/schema.ts +31 -0
- package/templates/nova/src/sections/TrustBadges/TrustBadges.tsx +42 -0
- package/templates/nova/src/sections/TrustBadges/index.ts +29 -0
- package/templates/nova/src/sections/TrustBadges/presets.ts +8 -0
- package/templates/nova/src/sections/TrustBadges/schema.ts +29 -0
- package/templates/nova/src/sections/UgcGallery/UgcGallery.tsx +58 -0
- package/templates/nova/src/sections/UgcGallery/blocks/UgcImage.tsx +27 -0
- package/templates/nova/src/sections/UgcGallery/index.ts +31 -0
- package/templates/nova/src/sections/UgcGallery/presets.ts +8 -0
- package/templates/nova/src/sections/UgcGallery/schema.ts +35 -0
- package/templates/nova/src/sections/VideoHero/VideoHero.tsx +75 -0
- package/templates/nova/src/sections/VideoHero/index.ts +22 -0
- package/templates/nova/src/sections/VideoHero/presets.ts +8 -0
- package/templates/nova/src/sections/VideoHero/schema.ts +43 -0
- package/templates/nova/src/sections/data.ts +115 -0
- package/templates/nova/src/sections/shipped-copy.ts +25 -0
- package/templates/nova/src/sections/starter.ts +49 -0
- package/templates/nova/src/styles/Container.css +6 -0
- package/templates/nova/src/styles/Container.tsx +13 -0
- package/templates/nova/src/styles/Icon.css +2 -0
- package/templates/nova/src/styles/Icon.tsx +101 -0
- package/templates/nova/src/styles/NovaProvider.tsx +91 -0
- package/templates/nova/src/styles/base.css +142 -0
- package/templates/nova/src/styles/blocks.css +6 -0
- package/templates/nova/src/styles/fonts/OFL.txt +93 -0
- package/templates/nova/src/styles/fonts/geist-cyrillic-ext.woff2 +0 -0
- package/templates/nova/src/styles/fonts/geist-cyrillic.woff2 +0 -0
- package/templates/nova/src/styles/fonts/geist-latin-ext.woff2 +0 -0
- package/templates/nova/src/styles/fonts/geist-latin.woff2 +0 -0
- package/templates/nova/src/styles/fonts/geist-mono-cyrillic-ext.woff2 +0 -0
- package/templates/nova/src/styles/fonts/geist-mono-cyrillic.woff2 +0 -0
- package/templates/nova/src/styles/fonts/geist-mono-latin-ext.woff2 +0 -0
- package/templates/nova/src/styles/fonts/geist-mono-latin.woff2 +0 -0
- package/templates/nova/src/styles/fonts/geist-mono-vietnamese.woff2 +0 -0
- package/templates/nova/src/styles/fonts/geist-vietnamese.woff2 +0 -0
- package/templates/nova/src/styles/fonts.css +95 -0
- package/templates/nova/src/styles/global-settings.css +88 -0
- package/templates/nova/src/styles/index.css +6 -0
- package/templates/nova/src/styles/motion.ts +53 -0
- package/templates/nova/src/styles/scroll.ts +24 -0
- package/templates/nova/src/styles/sections/commerce.css +147 -0
- package/templates/nova/src/styles/sections/content.css +304 -0
- package/templates/nova/src/styles/sections/editorial.css +131 -0
- package/templates/nova/src/styles/sections/promotion.css +336 -0
- package/templates/nova/src/styles/sections/trust.css +117 -0
- package/templates/nova/src/styles/sections/utility.css +190 -0
- package/templates/nova/src/styles/strings.ts +492 -0
- package/templates/nova/src/styles/text.ts +4 -0
- package/templates/nova/src/styles/theme.ts +171 -0
- package/templates/nova/src/styles/tokens.css +600 -0
- package/templates/nova/src/styles/viewport.ts +23 -0
- package/templates/nova/template.json +94 -0
- package/templates/nova/templates/404.json +30 -0
- package/templates/nova/templates/account.json +15 -0
- package/templates/nova/templates/article.json +41 -0
- package/templates/nova/templates/article.longform.json +17 -0
- package/templates/nova/templates/blog.featured.json +22 -0
- package/templates/nova/templates/blog.json +29 -0
- package/templates/nova/templates/cart.json +67 -0
- package/templates/nova/templates/collection.featured.json +43 -0
- package/templates/nova/templates/collection.json +30 -0
- package/templates/nova/templates/contact.json +65 -0
- package/templates/nova/templates/index.json +167 -0
- package/templates/nova/templates/list-collections.json +19 -0
- package/templates/nova/templates/page.about.json +134 -0
- package/templates/nova/templates/page.contact.json +27 -0
- package/templates/nova/templates/page.json +27 -0
- package/templates/nova/templates/policy.json +23 -0
- package/templates/nova/templates/product.bundle.json +145 -0
- package/templates/nova/templates/product.json +119 -0
- package/templates/nova/templates/search.json +17 -0
- package/templates/nova/tests/abi-ai-contract.test.ts +99 -0
- package/templates/nova/tests/abi-forms.test.tsx +269 -0
- package/templates/nova/tests/abi-inventory.test.tsx +197 -0
- package/templates/nova/tests/abi-legacy-settings.test.tsx +105 -0
- package/templates/nova/tests/abi-opt-in.test.tsx +100 -0
- package/templates/nova/tests/abi-parity.test.tsx +95 -0
- package/templates/nova/tests/abi-r5-store-settings.test.tsx +337 -0
- package/templates/nova/tests/abi-render.test.tsx +178 -0
- package/templates/nova/tests/abi-shop-links.test.tsx +141 -0
- package/templates/nova/tests/abi-storefront-basics.test.tsx +233 -0
- package/templates/nova/tests/abi-variant-url.test.tsx +73 -0
- package/templates/nova/tests/add-refused-no-success.test.tsx +193 -0
- package/templates/nova/tests/architecture.test.ts +63 -0
- package/templates/nova/tests/architecture.ts +160 -0
- package/templates/nova/tests/audit-guards.test.ts +31 -0
- package/templates/nova/tests/bundle-split.test.ts +29 -0
- package/templates/nova/tests/cart-limit-message.test.tsx +212 -0
- package/templates/nova/tests/cart-link-message.test.tsx +98 -0
- package/templates/nova/tests/cases/components/Overview.cases.tsx +8 -0
- package/templates/nova/tests/cases/components/base/Accordion.cases.tsx +40 -0
- package/templates/nova/tests/cases/components/base/Badge.cases.tsx +30 -0
- package/templates/nova/tests/cases/components/base/Button.cases.tsx +73 -0
- package/templates/nova/tests/cases/components/base/Checkbox.cases.tsx +27 -0
- package/templates/nova/tests/cases/components/base/Chip.cases.tsx +37 -0
- package/templates/nova/tests/cases/components/base/Divider.cases.tsx +26 -0
- package/templates/nova/tests/cases/components/base/IconButton.cases.tsx +28 -0
- package/templates/nova/tests/cases/components/base/Input.cases.tsx +28 -0
- package/templates/nova/tests/cases/components/base/Link.cases.tsx +27 -0
- package/templates/nova/tests/cases/components/base/Radio.cases.tsx +27 -0
- package/templates/nova/tests/cases/components/base/Select.cases.tsx +26 -0
- package/templates/nova/tests/cases/components/base/Skeleton.cases.tsx +29 -0
- package/templates/nova/tests/cases/components/base/Spinner.cases.tsx +16 -0
- package/templates/nova/tests/cases/components/base/Switch.cases.tsx +26 -0
- package/templates/nova/tests/cases/components/base/Tabs.cases.tsx +39 -0
- package/templates/nova/tests/cases/components/base/Textarea.cases.tsx +17 -0
- package/templates/nova/tests/cases/components/commerce/AddToCart.cases.tsx +36 -0
- package/templates/nova/tests/cases/components/commerce/CartLine.cases.tsx +20 -0
- package/templates/nova/tests/cases/components/commerce/CartSummary.cases.tsx +16 -0
- package/templates/nova/tests/cases/components/commerce/CollectionCard.cases.tsx +19 -0
- package/templates/nova/tests/cases/components/commerce/ComparisonTable.cases.tsx +19 -0
- package/templates/nova/tests/cases/components/commerce/Hotspot.cases.tsx +25 -0
- package/templates/nova/tests/cases/components/commerce/LookItem.cases.tsx +19 -0
- package/templates/nova/tests/cases/components/commerce/PaymentMark.cases.tsx +16 -0
- package/templates/nova/tests/cases/components/commerce/Price.cases.tsx +27 -0
- package/templates/nova/tests/cases/components/commerce/ProductCard.cases.tsx +67 -0
- package/templates/nova/tests/cases/components/commerce/ProductGallery.cases.tsx +39 -0
- package/templates/nova/tests/cases/components/commerce/QuantitySelector.cases.tsx +31 -0
- package/templates/nova/tests/cases/components/commerce/Reviews.cases.tsx +35 -0
- package/templates/nova/tests/cases/components/commerce/Stars.cases.tsx +16 -0
- package/templates/nova/tests/cases/components/commerce/VariantPicker.cases.tsx +38 -0
- package/templates/nova/tests/cases/components/commerce/blocks/Badge.cases.tsx +17 -0
- package/templates/nova/tests/cases/components/commerce/blocks/PaymentIcons.cases.tsx +17 -0
- package/templates/nova/tests/cases/components/commerce/blocks/Swatches.cases.tsx +22 -0
- package/templates/nova/tests/cases/components/content/ArticleCard.cases.tsx +17 -0
- package/templates/nova/tests/cases/components/content/BeforeAfterSlider.cases.tsx +18 -0
- package/templates/nova/tests/cases/components/content/CardRow.cases.tsx +23 -0
- package/templates/nova/tests/cases/components/content/CarouselControls.cases.tsx +48 -0
- package/templates/nova/tests/cases/components/content/ContentsNav.cases.tsx +17 -0
- package/templates/nova/tests/cases/components/content/Countdown.cases.tsx +28 -0
- package/templates/nova/tests/cases/components/content/HeroCopy.cases.tsx +42 -0
- package/templates/nova/tests/cases/components/content/HeroFrame.cases.tsx +22 -0
- package/templates/nova/tests/cases/components/content/HeroMedia.cases.tsx +18 -0
- package/templates/nova/tests/cases/components/content/LongForm.cases.tsx +17 -0
- package/templates/nova/tests/cases/components/content/MediaFrame.cases.tsx +32 -0
- package/templates/nova/tests/cases/components/content/RichText.cases.tsx +19 -0
- package/templates/nova/tests/cases/components/content/SectionHead.cases.tsx +19 -0
- package/templates/nova/tests/cases/components/content/ShareButtons.cases.tsx +24 -0
- package/templates/nova/tests/cases/components/content/StoreCard.cases.tsx +17 -0
- package/templates/nova/tests/cases/components/content/TestimonialCard.cases.tsx +19 -0
- package/templates/nova/tests/cases/components/content/UgcTile.cases.tsx +18 -0
- package/templates/nova/tests/cases/components/content/blocks/Button.cases.tsx +20 -0
- package/templates/nova/tests/cases/components/content/blocks/Column.cases.tsx +17 -0
- package/templates/nova/tests/cases/components/content/blocks/Heading.cases.tsx +18 -0
- package/templates/nova/tests/cases/components/content/blocks/Icon.cases.tsx +17 -0
- package/templates/nova/tests/cases/components/content/blocks/Image.cases.tsx +22 -0
- package/templates/nova/tests/cases/components/content/blocks/Text.cases.tsx +18 -0
- package/templates/nova/tests/cases/components/content/blocks/Video.cases.tsx +18 -0
- package/templates/nova/tests/cases/components/forms/ContactForm.cases.tsx +29 -0
- package/templates/nova/tests/cases/components/forms/FormField.cases.tsx +61 -0
- package/templates/nova/tests/cases/components/forms/NewsletterForm.cases.tsx +17 -0
- package/templates/nova/tests/cases/components/forms/SearchField.cases.tsx +25 -0
- package/templates/nova/tests/cases/components/forms/blocks/Newsletter.cases.tsx +19 -0
- package/templates/nova/tests/cases/components/navigation/BrandLogo.cases.tsx +29 -0
- package/templates/nova/tests/cases/components/navigation/Breadcrumb.cases.tsx +19 -0
- package/templates/nova/tests/cases/components/navigation/LocaleSelector.cases.tsx +32 -0
- package/templates/nova/tests/cases/components/navigation/Menu.cases.tsx +27 -0
- package/templates/nova/tests/cases/components/navigation/Pagination.cases.tsx +25 -0
- package/templates/nova/tests/cases/components/navigation/RecoveryLinks.cases.tsx +16 -0
- package/templates/nova/tests/cases/components/navigation/SocialLinks.cases.tsx +18 -0
- package/templates/nova/tests/cases/components/navigation/blocks/SocialLinks.cases.tsx +17 -0
- package/templates/nova/tests/cases/components/overlays/AccountMenu.cases.tsx +28 -0
- package/templates/nova/tests/cases/components/overlays/CartDrawer.cases.tsx +30 -0
- package/templates/nova/tests/cases/components/overlays/ConfirmationDialog.cases.tsx +16 -0
- package/templates/nova/tests/cases/components/overlays/CookieConsent.cases.tsx +23 -0
- package/templates/nova/tests/cases/components/overlays/CookiePreferences.cases.tsx +16 -0
- package/templates/nova/tests/cases/components/overlays/Drawer.cases.tsx +52 -0
- package/templates/nova/tests/cases/components/overlays/MarketSelector.cases.tsx +82 -0
- package/templates/nova/tests/cases/components/overlays/Menu.cases.tsx +27 -0
- package/templates/nova/tests/cases/components/overlays/MobileNavDrawer.cases.tsx +32 -0
- package/templates/nova/tests/cases/components/overlays/Modal.cases.tsx +71 -0
- package/templates/nova/tests/cases/components/overlays/Popover.cases.tsx +50 -0
- package/templates/nova/tests/cases/components/overlays/PromoPopup.cases.tsx +19 -0
- package/templates/nova/tests/cases/components/overlays/QuickView.cases.tsx +18 -0
- package/templates/nova/tests/cases/components/overlays/SearchModal.cases.tsx +60 -0
- package/templates/nova/tests/cases/components/overlays/Sheet.cases.tsx +32 -0
- package/templates/nova/tests/cases/components/overlays/SizeGuide.cases.tsx +27 -0
- package/templates/nova/tests/cases/components/overlays/Toast.cases.tsx +48 -0
- package/templates/nova/tests/cases/components/overlays/Tooltip.cases.tsx +33 -0
- package/templates/nova/tests/cases/components/states/Alert.cases.tsx +27 -0
- package/templates/nova/tests/cases/components/states/EditorFrame.cases.tsx +36 -0
- package/templates/nova/tests/cases/components/states/Empty.cases.tsx +30 -0
- package/templates/nova/tests/cases/components/states/Error.cases.tsx +38 -0
- package/templates/nova/tests/cases/components/states/Loading.cases.tsx +15 -0
- package/templates/nova/tests/cases/components/states/MediaState.cases.tsx +29 -0
- package/templates/nova/tests/cases/components/states/SkeletonLayout.cases.tsx +20 -0
- package/templates/nova/tests/cases/components/states/Unavailable.cases.tsx +16 -0
- package/templates/nova/tests/cases/components/states/media/MediaError.cases.tsx +18 -0
- package/templates/nova/tests/cases/components/states/media/MediaPlaceholder.cases.tsx +87 -0
- package/templates/nova/tests/cases/sections/Overview.cases.tsx +8 -0
- package/templates/nova/tests/cases/sections/commerce/collection-list/CollectionList.cases.tsx +46 -0
- package/templates/nova/tests/cases/sections/commerce/collection-list/blocks/CollectionItem.cases.tsx +18 -0
- package/templates/nova/tests/cases/sections/commerce/featured-collection/FeaturedCollection.cases.tsx +46 -0
- package/templates/nova/tests/cases/sections/commerce/featured-product/FeaturedProduct.cases.tsx +40 -0
- package/templates/nova/tests/cases/sections/commerce/main-collection/MainCollection.cases.tsx +81 -0
- package/templates/nova/tests/cases/sections/commerce/product-details/ProductDetails.cases.tsx +110 -0
- package/templates/nova/tests/cases/sections/commerce/product-details/blocks/AddToCartBlock.cases.tsx +21 -0
- package/templates/nova/tests/cases/sections/commerce/product-details/blocks/ProductDescription.cases.tsx +17 -0
- package/templates/nova/tests/cases/sections/commerce/product-details/blocks/ProductInventory.cases.tsx +17 -0
- package/templates/nova/tests/cases/sections/commerce/product-details/blocks/ProductPrice.cases.tsx +17 -0
- package/templates/nova/tests/cases/sections/commerce/product-details/blocks/ProductSku.cases.tsx +17 -0
- package/templates/nova/tests/cases/sections/commerce/product-details/blocks/ProductTitle.cases.tsx +17 -0
- package/templates/nova/tests/cases/sections/commerce/product-details/blocks/Quantity.cases.tsx +20 -0
- package/templates/nova/tests/cases/sections/commerce/product-details/blocks/Tab.cases.tsx +29 -0
- package/templates/nova/tests/cases/sections/commerce/product-details/blocks/VariantPickerBlock.cases.tsx +32 -0
- package/templates/nova/tests/cases/sections/commerce/product-grid/ProductGrid.cases.tsx +48 -0
- package/templates/nova/tests/cases/sections/commerce/product-recommendations/ProductRecommendations.cases.tsx +27 -0
- package/templates/nova/tests/cases/sections/commerce/recently-viewed/RecentlyViewed.cases.tsx +36 -0
- package/templates/nova/tests/cases/sections/content/article-body/ArticleBody.cases.tsx +32 -0
- package/templates/nova/tests/cases/sections/content/before-after/BeforeAfter.cases.tsx +40 -0
- package/templates/nova/tests/cases/sections/content/before-after/blocks/Comparison.cases.tsx +17 -0
- package/templates/nova/tests/cases/sections/content/blog-posts/BlogPosts.cases.tsx +47 -0
- package/templates/nova/tests/cases/sections/content/collection-links/CollectionLinks.cases.tsx +36 -0
- package/templates/nova/tests/cases/sections/content/faq/Faq.cases.tsx +38 -0
- package/templates/nova/tests/cases/sections/content/faq/blocks/FaqItem.cases.tsx +17 -0
- package/templates/nova/tests/cases/sections/content/feature-grid-blocks/FeatureGridBlocks.cases.tsx +31 -0
- package/templates/nova/tests/cases/sections/content/feature-highlights/FeatureHighlights.cases.tsx +26 -0
- package/templates/nova/tests/cases/sections/content/image-gallery/ImageGallery.cases.tsx +31 -0
- package/templates/nova/tests/cases/sections/content/image-with-text/ImageWithText.cases.tsx +35 -0
- package/templates/nova/tests/cases/sections/content/multicolumn/Multicolumn.cases.tsx +32 -0
- package/templates/nova/tests/cases/sections/content/page-body/PageBody.cases.tsx +31 -0
- package/templates/nova/tests/cases/sections/content/rich-text/RichTextSection.cases.tsx +33 -0
- package/templates/nova/tests/cases/sections/content/team-founders/TeamFounders.cases.tsx +31 -0
- package/templates/nova/tests/cases/sections/content/team-founders/blocks/Person.cases.tsx +18 -0
- package/templates/nova/tests/cases/sections/content/timeline/Timeline.cases.tsx +27 -0
- package/templates/nova/tests/cases/sections/content/timeline/blocks/Step.cases.tsx +17 -0
- package/templates/nova/tests/cases/sections/layout/announcement-bar/AnnouncementBar.cases.tsx +119 -0
- package/templates/nova/tests/cases/sections/layout/breadcrumbs/Breadcrumbs.cases.tsx +73 -0
- package/templates/nova/tests/cases/sections/layout/divider/Divider.cases.tsx +81 -0
- package/templates/nova/tests/cases/sections/layout/footer/Footer.cases.tsx +116 -0
- package/templates/nova/tests/cases/sections/layout/footer/blocks/FooterBrand.cases.tsx +27 -0
- package/templates/nova/tests/cases/sections/layout/footer/blocks/FooterMenu.cases.tsx +22 -0
- package/templates/nova/tests/cases/sections/layout/footer/blocks/FooterText.cases.tsx +20 -0
- package/templates/nova/tests/cases/sections/layout/group/Group.cases.tsx +185 -0
- package/templates/nova/tests/cases/sections/layout/group/blocks/Accordion.cases.tsx +17 -0
- package/templates/nova/tests/cases/sections/layout/group/blocks/JumboText.cases.tsx +17 -0
- package/templates/nova/tests/cases/sections/layout/group/blocks/Spacer.cases.tsx +33 -0
- package/templates/nova/tests/cases/sections/layout/header/Header.cases.tsx +277 -0
- package/templates/nova/tests/cases/sections/marketing/collection-banner/CollectionBanner.cases.tsx +62 -0
- package/templates/nova/tests/cases/sections/marketing/hero/Hero.cases.tsx +138 -0
- package/templates/nova/tests/cases/sections/marketing/marquee/Marquee.cases.tsx +63 -0
- package/templates/nova/tests/cases/sections/marketing/promo-banner/PromoBanner.cases.tsx +87 -0
- package/templates/nova/tests/cases/sections/marketing/slideshow/Slideshow.cases.tsx +113 -0
- package/templates/nova/tests/cases/sections/marketing/slideshow/blocks/Slide.cases.tsx +26 -0
- package/templates/nova/tests/cases/sections/marketing/video-hero/VideoHero.cases.tsx +72 -0
- package/templates/nova/tests/cases/sections/trust/comparison-table/ComparisonTableSection.cases.tsx +42 -0
- package/templates/nova/tests/cases/sections/trust/comparison-table/blocks/CompareItem.cases.tsx +17 -0
- package/templates/nova/tests/cases/sections/trust/logo-list/LogoList.cases.tsx +29 -0
- package/templates/nova/tests/cases/sections/trust/logo-list/blocks/Logo.cases.tsx +17 -0
- package/templates/nova/tests/cases/sections/trust/product-reviews/ProductReviews.cases.tsx +51 -0
- package/templates/nova/tests/cases/sections/trust/shop-the-look/ShopTheLook.cases.tsx +51 -0
- package/templates/nova/tests/cases/sections/trust/shop-the-look/blocks/Hotspot.cases.tsx +17 -0
- package/templates/nova/tests/cases/sections/trust/testimonials/Testimonials.cases.tsx +61 -0
- package/templates/nova/tests/cases/sections/trust/testimonials/blocks/Testimonial.cases.tsx +17 -0
- package/templates/nova/tests/cases/sections/trust/trust-badges/TrustBadges.cases.tsx +30 -0
- package/templates/nova/tests/cases/sections/trust/ugc-gallery/UgcGallery.cases.tsx +32 -0
- package/templates/nova/tests/cases/sections/trust/ugc-gallery/blocks/UgcImage.cases.tsx +17 -0
- package/templates/nova/tests/cases/sections/utility/account/Account.cases.tsx +44 -0
- package/templates/nova/tests/cases/sections/utility/cart-items/CartItems.cases.tsx +43 -0
- package/templates/nova/tests/cases/sections/utility/cart-items/blocks/CartBadge.cases.tsx +16 -0
- package/templates/nova/tests/cases/sections/utility/contact-form/ContactFormSection.cases.tsx +52 -0
- package/templates/nova/tests/cases/sections/utility/contact-form/blocks/ContactDetail.cases.tsx +17 -0
- package/templates/nova/tests/cases/sections/utility/newsletter/NewsletterSection.cases.tsx +109 -0
- package/templates/nova/tests/cases/sections/utility/not-found/NotFound.cases.tsx +28 -0
- package/templates/nova/tests/cases/sections/utility/policy-page/PolicyPage.cases.tsx +29 -0
- package/templates/nova/tests/cases/sections/utility/search-results/SearchResultsSection.cases.tsx +39 -0
- package/templates/nova/tests/cases/sections/utility/store-locator/StoreLocator.cases.tsx +40 -0
- package/templates/nova/tests/cases/styles/Borders.cases.tsx +10 -0
- package/templates/nova/tests/cases/styles/Breakpoints.cases.tsx +10 -0
- package/templates/nova/tests/cases/styles/Colors.cases.tsx +10 -0
- package/templates/nova/tests/cases/styles/Elevation.cases.tsx +10 -0
- package/templates/nova/tests/cases/styles/Icon.cases.tsx +23 -0
- package/templates/nova/tests/cases/styles/Layout.cases.tsx +8 -0
- package/templates/nova/tests/cases/styles/Motion.cases.tsx +10 -0
- package/templates/nova/tests/cases/styles/Overview.cases.tsx +8 -0
- package/templates/nova/tests/cases/styles/Radius.cases.tsx +10 -0
- package/templates/nova/tests/cases/styles/SharedThemeSettings.cases.tsx +19 -0
- package/templates/nova/tests/cases/styles/Spacing.cases.tsx +10 -0
- package/templates/nova/tests/cases/styles/Typography.cases.tsx +10 -0
- package/templates/nova/tests/cases.test.tsx +38 -0
- package/templates/nova/tests/components/PromoPopup.test.ts +21 -0
- package/templates/nova/tests/components/RichText.test.tsx +65 -0
- package/templates/nova/tests/components/formatDate.test.ts +10 -0
- package/templates/nova/tests/contract-locks.test.ts +23 -0
- package/templates/nova/tests/contracts.test.ts +153 -0
- package/templates/nova/tests/cookie-consent-privacy.test.tsx +128 -0
- package/templates/nova/tests/empty-store.test.tsx +81 -0
- package/templates/nova/tests/fixtures/commerce.ts +128 -0
- package/templates/nova/tests/fixtures/content.ts +58 -0
- package/templates/nova/tests/fixtures/index.ts +8 -0
- package/templates/nova/tests/fixtures/merch.ts +161 -0
- package/templates/nova/tests/fixtures/navigation.ts +125 -0
- package/templates/nova/tests/fixtures/promotion.ts +43 -0
- package/templates/nova/tests/fixtures/sample-store.json +1674 -0
- package/templates/nova/tests/fixtures/shop.ts +88 -0
- package/templates/nova/tests/fixtures/stress.ts +21 -0
- package/templates/nova/tests/inert.test.tsx +285 -0
- package/templates/nova/tests/line-add-friend.test.tsx +108 -0
- package/templates/nova/tests/localized-copy.test.ts +330 -0
- package/templates/nova/tests/product-template-blocks.test.ts +28 -0
- package/templates/nova/tests/rewards-launcher.test.tsx +401 -0
- package/templates/nova/tests/schema.test.ts +65 -0
- package/templates/nova/tests/schema.typetest.ts +7 -0
- package/templates/nova/tests/section-groups.test.ts +189 -0
- package/templates/nova/tests/sections/Group.test.tsx +37 -0
- package/templates/nova/tests/setup.ts +30 -0
- package/templates/nova/tests/starter.test.ts +56 -0
- package/templates/nova/tests/storefront-click-path.test.tsx +157 -0
- package/templates/nova/tests/styles/button-brand.test.ts +24 -0
- package/templates/nova/tests/styles/theme.test.ts +43 -0
- package/templates/nova/tests/styles/tokens.test.ts +35 -0
- package/templates/nova/tests/support/abi-ctx.ts +136 -0
- package/templates/nova/tests/support/block-stories.tsx +13 -0
- package/templates/nova/tests/support/case.tsx +102 -0
- package/templates/nova/tests/support/contracts.ts +30 -0
- package/templates/nova/tests/support/foundation-pages.tsx +260 -0
- package/templates/nova/tests/support/ia-pages.tsx +154 -0
- package/templates/nova/tests/support/listing-demo.tsx +29 -0
- package/templates/nova/tests/support/presets.ts +14 -0
- package/templates/nova/tests/support/sections.ts +36 -0
- package/templates/nova/tests/support/story-content.ts +321 -0
- package/templates/nova/tests/support/story-helpers.tsx +37 -0
- package/templates/nova/tests/support/with-nova.tsx +26 -0
- package/templates/nova/tests/theme-config.test.ts +82 -0
- package/templates/nova/tests/theme-integrity.test.ts +315 -0
- package/templates/nova/theme.config.ts +134 -0
- package/templates/nova/theme.manifest.json +17495 -0
- package/templates/nova/tsconfig.json +19 -0
- package/templates/nova/vite.abi-ssr.config.ts +37 -0
- package/templates/nova/vite.abi.config.ts +26 -0
- package/templates/nova/vitest.config.ts +20 -0
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GENERATED from the approved Nova 14 · Media & System States canvas
|
|
3
|
+
* ("COLOUR · one tonal family per type, five steps each"). Do not hand-edit:
|
|
4
|
+
* the SVG art and palettes are the design package's.
|
|
5
|
+
*/
|
|
6
|
+
export const PLACEHOLDER_ART = {
|
|
7
|
+
"product": {
|
|
8
|
+
"label": "Product · warm sand studio",
|
|
9
|
+
"viewBox": "0 0 400 400",
|
|
10
|
+
"tokens": {
|
|
11
|
+
"--ph-0": "#EFE9E1",
|
|
12
|
+
"--ph-1": "#E6DDD1",
|
|
13
|
+
"--ph-2": "#D9CCBB",
|
|
14
|
+
"--ph-3": "#C9B8A3",
|
|
15
|
+
"--ph-4": "#F7F3EE",
|
|
16
|
+
"--ph-play": "#FFFFFF",
|
|
17
|
+
"--ph-ink": "#111111",
|
|
18
|
+
"--ph-scrim": "#111111"
|
|
19
|
+
},
|
|
20
|
+
"inner": "<rect data-dc-tpl=\"103\" width=\"400\" height=\"400\" style=\"fill: var(--ph-0);\"></rect><rect data-dc-tpl=\"104\" y=\"262\" width=\"400\" height=\"138\" style=\"fill: var(--ph-1);\"></rect><ellipse data-dc-tpl=\"105\" cx=\"200\" cy=\"240\" rx=\"100\" ry=\"9\" opacity=\".5\" style=\"fill: var(--ph-3);\"></ellipse><rect data-dc-tpl=\"106\" x=\"92\" y=\"236\" width=\"216\" height=\"64\" rx=\"8\" style=\"fill: var(--ph-2);\"></rect><rect data-dc-tpl=\"107\" x=\"92\" y=\"236\" width=\"216\" height=\"10\" rx=\"5\" style=\"fill: var(--ph-4);\"></rect><rect data-dc-tpl=\"108\" x=\"138\" y=\"116\" width=\"66\" height=\"124\" rx=\"16\" style=\"fill: var(--ph-3);\"></rect><circle data-dc-tpl=\"109\" cx=\"248\" cy=\"204\" r=\"34\" style=\"fill: var(--ph-2);\"></circle><circle data-dc-tpl=\"110\" cx=\"237\" cy=\"193\" r=\"10\" opacity=\".8\" style=\"fill: var(--ph-4);\"></circle>"
|
|
21
|
+
},
|
|
22
|
+
"collection": {
|
|
23
|
+
"label": "Collection · stone + sage, structural",
|
|
24
|
+
"viewBox": "0 0 400 400",
|
|
25
|
+
"tokens": {
|
|
26
|
+
"--ph-0": "#E9EAE4",
|
|
27
|
+
"--ph-1": "#DEE1D8",
|
|
28
|
+
"--ph-2": "#CDD3C6",
|
|
29
|
+
"--ph-3": "#B8C0B0",
|
|
30
|
+
"--ph-4": "#F4F5F1",
|
|
31
|
+
"--ph-play": "#FFFFFF",
|
|
32
|
+
"--ph-ink": "#111111",
|
|
33
|
+
"--ph-scrim": "#111111"
|
|
34
|
+
},
|
|
35
|
+
"inner": "<rect data-dc-tpl=\"121\" width=\"400\" height=\"400\" style=\"fill: var(--ph-0);\"></rect><path data-dc-tpl=\"122\" d=\"M72 306V160a128 128 0 0 1 256 0v146z\" style=\"fill: var(--ph-1);\"></path><rect data-dc-tpl=\"123\" y=\"306\" width=\"400\" height=\"94\" style=\"fill: var(--ph-2);\"></rect><ellipse data-dc-tpl=\"124\" cx=\"200\" cy=\"306\" rx=\"150\" ry=\"8\" opacity=\".45\" style=\"fill: var(--ph-3);\"></ellipse><rect data-dc-tpl=\"125\" x=\"92\" y=\"208\" width=\"58\" height=\"98\" rx=\"12\" style=\"fill: var(--ph-3);\"></rect><rect data-dc-tpl=\"126\" x=\"162\" y=\"172\" width=\"48\" height=\"134\" rx=\"24\" style=\"fill: var(--ph-2);\"></rect><rect data-dc-tpl=\"127\" x=\"162\" y=\"172\" width=\"48\" height=\"16\" rx=\"8\" opacity=\".7\" style=\"fill: var(--ph-4);\"></rect><circle data-dc-tpl=\"128\" cx=\"252\" cy=\"272\" r=\"34\" style=\"fill: var(--ph-3);\"></circle><rect data-dc-tpl=\"129\" x=\"290\" y=\"236\" width=\"40\" height=\"70\" rx=\"8\" style=\"fill: var(--ph-2);\"></rect>"
|
|
36
|
+
},
|
|
37
|
+
"hero": {
|
|
38
|
+
"label": "Hero · mist blue, atmospheric",
|
|
39
|
+
"viewBox": "0 0 1200 500",
|
|
40
|
+
"tokens": {
|
|
41
|
+
"--ph-0": "#E6EAEC",
|
|
42
|
+
"--ph-1": "#DCE2E4",
|
|
43
|
+
"--ph-2": "#CCD4D7",
|
|
44
|
+
"--ph-3": "#B5C0C4",
|
|
45
|
+
"--ph-4": "#F4F6F6",
|
|
46
|
+
"--ph-play": "#FFFFFF",
|
|
47
|
+
"--ph-ink": "#111111",
|
|
48
|
+
"--ph-scrim": "#111111"
|
|
49
|
+
},
|
|
50
|
+
"inner": "<rect data-dc-tpl=\"140\" width=\"1200\" height=\"500\" style=\"fill: var(--ph-0);\"></rect><path data-dc-tpl=\"141\" d=\"M760 360V190a150 150 0 0 1 300 0v170z\" style=\"fill: var(--ph-4);\"></path><rect data-dc-tpl=\"142\" x=\"908\" y=\"40\" width=\"4\" height=\"320\" style=\"fill: var(--ph-1);\"></rect><rect data-dc-tpl=\"143\" x=\"760\" y=\"250\" width=\"300\" height=\"4\" style=\"fill: var(--ph-1);\"></rect><rect data-dc-tpl=\"144\" y=\"360\" width=\"1200\" height=\"140\" style=\"fill: var(--ph-1);\"></rect><ellipse data-dc-tpl=\"145\" cx=\"910\" cy=\"420\" rx=\"250\" ry=\"30\" opacity=\".7\" style=\"fill: var(--ph-4);\"></ellipse><rect data-dc-tpl=\"146\" x=\"120\" y=\"298\" width=\"480\" height=\"16\" rx=\"8\" style=\"fill: var(--ph-3);\"></rect><rect data-dc-tpl=\"147\" x=\"160\" y=\"314\" width=\"12\" height=\"64\" style=\"fill: var(--ph-3);\"></rect><rect data-dc-tpl=\"148\" x=\"548\" y=\"314\" width=\"12\" height=\"64\" style=\"fill: var(--ph-3);\"></rect><rect data-dc-tpl=\"149\" x=\"200\" y=\"198\" width=\"62\" height=\"100\" rx=\"14\" style=\"fill: var(--ph-2);\"></rect><circle data-dc-tpl=\"150\" cx=\"332\" cy=\"266\" r=\"32\" style=\"fill: var(--ph-3);\"></circle><rect data-dc-tpl=\"151\" x=\"400\" y=\"234\" width=\"92\" height=\"64\" rx=\"10\" style=\"fill: var(--ph-2);\"></rect>"
|
|
51
|
+
},
|
|
52
|
+
"editorial": {
|
|
53
|
+
"label": "Editorial · paper + taupe",
|
|
54
|
+
"viewBox": "0 0 400 300",
|
|
55
|
+
"tokens": {
|
|
56
|
+
"--ph-0": "#ECE6DD",
|
|
57
|
+
"--ph-1": "#E3DCD2",
|
|
58
|
+
"--ph-2": "#D3C8BA",
|
|
59
|
+
"--ph-3": "#BFB2A2",
|
|
60
|
+
"--ph-4": "#FAF7F2",
|
|
61
|
+
"--ph-play": "#FFFFFF",
|
|
62
|
+
"--ph-ink": "#111111",
|
|
63
|
+
"--ph-scrim": "#111111"
|
|
64
|
+
},
|
|
65
|
+
"inner": "<rect data-dc-tpl=\"162\" width=\"400\" height=\"300\" style=\"fill: var(--ph-1);\"></rect><g data-dc-tpl=\"163\" transform=\"rotate(-6 200 150)\"><rect data-dc-tpl=\"164\" x=\"66\" y=\"48\" width=\"268\" height=\"206\" rx=\"6\" style=\"fill: var(--ph-4);\"></rect><rect data-dc-tpl=\"165\" x=\"199\" y=\"48\" width=\"2\" height=\"206\" style=\"fill: var(--ph-2);\"></rect><rect data-dc-tpl=\"166\" x=\"84\" y=\"66\" width=\"100\" height=\"122\" rx=\"4\" style=\"fill: var(--ph-2);\"></rect><rect data-dc-tpl=\"167\" x=\"84\" y=\"200\" width=\"92\" height=\"8\" rx=\"4\" style=\"fill: var(--ph-2);\"></rect><rect data-dc-tpl=\"168\" x=\"84\" y=\"214\" width=\"70\" height=\"8\" rx=\"4\" style=\"fill: var(--ph-2);\"></rect><rect data-dc-tpl=\"169\" x=\"216\" y=\"68\" width=\"100\" height=\"12\" rx=\"6\" style=\"fill: var(--ph-3);\"></rect><rect data-dc-tpl=\"170\" x=\"216\" y=\"96\" width=\"100\" height=\"6\" rx=\"3\" style=\"fill: var(--ph-2);\"></rect><rect data-dc-tpl=\"171\" x=\"216\" y=\"112\" width=\"92\" height=\"6\" rx=\"3\" style=\"fill: var(--ph-2);\"></rect><rect data-dc-tpl=\"172\" x=\"216\" y=\"128\" width=\"100\" height=\"6\" rx=\"3\" style=\"fill: var(--ph-2);\"></rect><rect data-dc-tpl=\"173\" x=\"216\" y=\"144\" width=\"78\" height=\"6\" rx=\"3\" style=\"fill: var(--ph-2);\"></rect><rect data-dc-tpl=\"174\" x=\"216\" y=\"160\" width=\"90\" height=\"6\" rx=\"3\" style=\"fill: var(--ph-2);\"></rect><rect data-dc-tpl=\"175\" x=\"216\" y=\"178\" width=\"100\" height=\"58\" rx=\"4\" style=\"fill: var(--ph-2);\"></rect></g><circle data-dc-tpl=\"176\" cx=\"344\" cy=\"64\" r=\"32\" style=\"fill: var(--ph-3);\"></circle><circle data-dc-tpl=\"177\" cx=\"344\" cy=\"64\" r=\"23\" style=\"fill: var(--ph-2);\"></circle>"
|
|
66
|
+
},
|
|
67
|
+
"avatar": {
|
|
68
|
+
"label": "Avatar · soft clay",
|
|
69
|
+
"viewBox": "0 0 300 300",
|
|
70
|
+
"tokens": {
|
|
71
|
+
"--ph-0": "#EFE7E3",
|
|
72
|
+
"--ph-1": "#E7DCD7",
|
|
73
|
+
"--ph-2": "#D8C8C0",
|
|
74
|
+
"--ph-3": "#C9B3A9",
|
|
75
|
+
"--ph-4": "#F6F0ED",
|
|
76
|
+
"--ph-play": "#FFFFFF",
|
|
77
|
+
"--ph-ink": "#111111",
|
|
78
|
+
"--ph-scrim": "#111111"
|
|
79
|
+
},
|
|
80
|
+
"inner": "<rect data-dc-tpl=\"188\" width=\"300\" height=\"300\" style=\"fill: var(--ph-1);\"></rect><circle data-dc-tpl=\"189\" cx=\"150\" cy=\"128\" r=\"112\" opacity=\".6\" style=\"fill: var(--ph-4);\"></circle><circle data-dc-tpl=\"190\" cx=\"150\" cy=\"122\" r=\"50\" style=\"fill: var(--ph-3);\"></circle><path data-dc-tpl=\"191\" d=\"M36 300c10-72 58-108 114-108s104 36 114 108z\" style=\"fill: var(--ph-3);\"></path>"
|
|
81
|
+
},
|
|
82
|
+
"store": {
|
|
83
|
+
"label": "Store · eucalyptus interior",
|
|
84
|
+
"viewBox": "0 0 400 300",
|
|
85
|
+
"tokens": {
|
|
86
|
+
"--ph-0": "#E5EAE6",
|
|
87
|
+
"--ph-1": "#DAE1DC",
|
|
88
|
+
"--ph-2": "#C8D3CC",
|
|
89
|
+
"--ph-3": "#AFBDB4",
|
|
90
|
+
"--ph-4": "#F2F5F2",
|
|
91
|
+
"--ph-play": "#FFFFFF",
|
|
92
|
+
"--ph-ink": "#111111",
|
|
93
|
+
"--ph-scrim": "#111111"
|
|
94
|
+
},
|
|
95
|
+
"inner": "<rect data-dc-tpl=\"202\" width=\"400\" height=\"300\" style=\"fill: var(--ph-0);\"></rect><rect data-dc-tpl=\"203\" x=\"40\" y=\"58\" width=\"320\" height=\"242\" style=\"fill: var(--ph-1);\"></rect><rect data-dc-tpl=\"204\" x=\"130\" y=\"70\" width=\"140\" height=\"12\" rx=\"6\" style=\"fill: var(--ph-2);\"></rect><rect data-dc-tpl=\"205\" x=\"30\" y=\"92\" width=\"340\" height=\"26\" rx=\"4\" style=\"fill: var(--ph-3);\"></rect><circle data-dc-tpl=\"206\" cx=\"40\" cy=\"118\" r=\"10\" style=\"fill: var(--ph-3);\"></circle><circle data-dc-tpl=\"207\" cx=\"60\" cy=\"118\" r=\"10\" style=\"fill: var(--ph-3);\"></circle><circle data-dc-tpl=\"208\" cx=\"80\" cy=\"118\" r=\"10\" style=\"fill: var(--ph-3);\"></circle><circle data-dc-tpl=\"209\" cx=\"100\" cy=\"118\" r=\"10\" style=\"fill: var(--ph-3);\"></circle><circle data-dc-tpl=\"210\" cx=\"120\" cy=\"118\" r=\"10\" style=\"fill: var(--ph-3);\"></circle><circle data-dc-tpl=\"211\" cx=\"140\" cy=\"118\" r=\"10\" style=\"fill: var(--ph-3);\"></circle><circle data-dc-tpl=\"212\" cx=\"160\" cy=\"118\" r=\"10\" style=\"fill: var(--ph-3);\"></circle><circle data-dc-tpl=\"213\" cx=\"180\" cy=\"118\" r=\"10\" style=\"fill: var(--ph-3);\"></circle><circle data-dc-tpl=\"214\" cx=\"200\" cy=\"118\" r=\"10\" style=\"fill: var(--ph-3);\"></circle><circle data-dc-tpl=\"215\" cx=\"220\" cy=\"118\" r=\"10\" style=\"fill: var(--ph-3);\"></circle><circle data-dc-tpl=\"216\" cx=\"240\" cy=\"118\" r=\"10\" style=\"fill: var(--ph-3);\"></circle><circle data-dc-tpl=\"217\" cx=\"260\" cy=\"118\" r=\"10\" style=\"fill: var(--ph-3);\"></circle><circle data-dc-tpl=\"218\" cx=\"280\" cy=\"118\" r=\"10\" style=\"fill: var(--ph-3);\"></circle><circle data-dc-tpl=\"219\" cx=\"300\" cy=\"118\" r=\"10\" style=\"fill: var(--ph-3);\"></circle><circle data-dc-tpl=\"220\" cx=\"320\" cy=\"118\" r=\"10\" style=\"fill: var(--ph-3);\"></circle><circle data-dc-tpl=\"221\" cx=\"340\" cy=\"118\" r=\"10\" style=\"fill: var(--ph-3);\"></circle><circle data-dc-tpl=\"222\" cx=\"360\" cy=\"118\" r=\"10\" style=\"fill: var(--ph-3);\"></circle><rect data-dc-tpl=\"223\" x=\"64\" y=\"142\" width=\"178\" height=\"120\" rx=\"4\" style=\"fill: var(--ph-4);\"></rect><rect data-dc-tpl=\"224\" x=\"88\" y=\"198\" width=\"30\" height=\"64\" rx=\"6\" style=\"fill: var(--ph-2);\"></rect><circle data-dc-tpl=\"225\" cx=\"160\" cy=\"238\" r=\"22\" style=\"fill: var(--ph-2);\"></circle><rect data-dc-tpl=\"226\" x=\"194\" y=\"214\" width=\"30\" height=\"48\" rx=\"4\" style=\"fill: var(--ph-3);\"></rect><rect data-dc-tpl=\"227\" x=\"262\" y=\"142\" width=\"76\" height=\"158\" rx=\"4\" style=\"fill: var(--ph-2);\"></rect><circle data-dc-tpl=\"228\" cx=\"324\" cy=\"224\" r=\"4\" style=\"fill: var(--ph-3);\"></circle><rect data-dc-tpl=\"229\" y=\"290\" width=\"400\" height=\"10\" style=\"fill: var(--ph-2);\"></rect>"
|
|
96
|
+
},
|
|
97
|
+
"video": {
|
|
98
|
+
"label": "Video · slate, cinematic",
|
|
99
|
+
"viewBox": "0 0 1200 675",
|
|
100
|
+
"tokens": {
|
|
101
|
+
"--ph-0": "#D9DDE0",
|
|
102
|
+
"--ph-1": "#CDD2D6",
|
|
103
|
+
"--ph-2": "#BBC2C7",
|
|
104
|
+
"--ph-3": "#A4ADB3",
|
|
105
|
+
"--ph-4": "#E8EBED",
|
|
106
|
+
"--ph-play": "#FFFFFF",
|
|
107
|
+
"--ph-ink": "#111111",
|
|
108
|
+
"--ph-scrim": "#1B2126"
|
|
109
|
+
},
|
|
110
|
+
"inner": "<rect data-dc-tpl=\"240\" width=\"1200\" height=\"675\" style=\"fill: var(--ph-0);\"></rect><rect data-dc-tpl=\"241\" y=\"470\" width=\"1200\" height=\"205\" style=\"fill: var(--ph-1);\"></rect><path data-dc-tpl=\"242\" d=\"M700 470V250a170 170 0 0 1 340 0v220z\" style=\"fill: var(--ph-4);\"></path><rect data-dc-tpl=\"243\" x=\"180\" y=\"400\" width=\"420\" height=\"16\" rx=\"8\" style=\"fill: var(--ph-3);\"></rect><rect data-dc-tpl=\"244\" x=\"240\" y=\"300\" width=\"66\" height=\"100\" rx=\"14\" style=\"fill: var(--ph-2);\"></rect><circle data-dc-tpl=\"245\" cx=\"380\" cy=\"368\" r=\"32\" style=\"fill: var(--ph-3);\"></circle><rect data-dc-tpl=\"246\" x=\"0\" y=\"480\" width=\"1200\" height=\"195\" opacity=\".06\" style=\"fill: var(--ph-scrim);\"></rect><circle data-dc-tpl=\"247\" cx=\"600\" cy=\"320\" r=\"58\" opacity=\".94\" style=\"fill: var(--ph-play);\"></circle><path data-dc-tpl=\"248\" d=\"M584 292l46 28-46 28z\" style=\"fill: var(--ph-ink);\"></path><rect data-dc-tpl=\"249\" x=\"60\" y=\"618\" width=\"1080\" height=\"6\" rx=\"3\" opacity=\".5\" style=\"fill: var(--ph-play);\"></rect><rect data-dc-tpl=\"250\" x=\"60\" y=\"618\" width=\"0\" height=\"6\" rx=\"3\" style=\"fill: var(--ph-play);\"></rect><rect data-dc-tpl=\"251\" x=\"60\" y=\"590\" width=\"80\" height=\"14\" rx=\"7\" opacity=\".7\" style=\"fill: var(--ph-play);\"></rect>"
|
|
111
|
+
},
|
|
112
|
+
"ugc": {
|
|
113
|
+
"label": "UGC · lavender-grey",
|
|
114
|
+
"viewBox": "0 0 400 400",
|
|
115
|
+
"tokens": {
|
|
116
|
+
"--ph-0": "#EAE7EC",
|
|
117
|
+
"--ph-1": "#E0DCE4",
|
|
118
|
+
"--ph-2": "#CFC8D6",
|
|
119
|
+
"--ph-3": "#BBB2C4",
|
|
120
|
+
"--ph-4": "#F5F3F7",
|
|
121
|
+
"--ph-play": "#FFFFFF",
|
|
122
|
+
"--ph-ink": "#111111",
|
|
123
|
+
"--ph-scrim": "#111111"
|
|
124
|
+
},
|
|
125
|
+
"inner": "<rect data-dc-tpl=\"262\" width=\"400\" height=\"400\" style=\"fill: var(--ph-1);\"></rect><g data-dc-tpl=\"263\" transform=\"rotate(-8 170 200)\"><rect data-dc-tpl=\"264\" x=\"70\" y=\"80\" width=\"200\" height=\"248\" rx=\"14\" style=\"fill: var(--ph-4);\"></rect><rect data-dc-tpl=\"265\" x=\"86\" y=\"96\" width=\"168\" height=\"172\" rx=\"8\" style=\"fill: var(--ph-2);\"></rect><rect data-dc-tpl=\"266\" x=\"86\" y=\"220\" width=\"168\" height=\"48\" rx=\"0\" opacity=\".6\" style=\"fill: var(--ph-3);\"></rect><circle data-dc-tpl=\"267\" cx=\"170\" cy=\"190\" r=\"30\" style=\"fill: var(--ph-3);\"></circle><rect data-dc-tpl=\"268\" x=\"86\" y=\"284\" width=\"96\" height=\"8\" rx=\"4\" style=\"fill: var(--ph-2);\"></rect></g><g data-dc-tpl=\"269\" transform=\"rotate(7 250 180)\"><rect data-dc-tpl=\"270\" x=\"150\" y=\"56\" width=\"200\" height=\"248\" rx=\"14\" style=\"fill: var(--ph-4);\"></rect><rect data-dc-tpl=\"271\" x=\"166\" y=\"72\" width=\"168\" height=\"172\" rx=\"8\" style=\"fill: var(--ph-3);\"></rect><rect data-dc-tpl=\"272\" x=\"206\" y=\"140\" width=\"40\" height=\"84\" rx=\"10\" style=\"fill: var(--ph-2);\"></rect><circle data-dc-tpl=\"273\" cx=\"286\" cy=\"200\" r=\"24\" style=\"fill: var(--ph-2);\"></circle><rect data-dc-tpl=\"274\" x=\"166\" y=\"260\" width=\"110\" height=\"8\" rx=\"4\" style=\"fill: var(--ph-2);\"></rect><circle data-dc-tpl=\"275\" cx=\"322\" cy=\"264\" r=\"7\" style=\"fill: var(--ph-2);\"></circle></g>"
|
|
126
|
+
},
|
|
127
|
+
"generic": {
|
|
128
|
+
"label": "Generic · neutral stone",
|
|
129
|
+
"viewBox": "0 0 400 300",
|
|
130
|
+
"tokens": {
|
|
131
|
+
"--ph-0": "#ECEAE6",
|
|
132
|
+
"--ph-1": "#E3E0DA",
|
|
133
|
+
"--ph-2": "#D5D0C8",
|
|
134
|
+
"--ph-3": "#C4BDB3",
|
|
135
|
+
"--ph-4": "#F6F5F2",
|
|
136
|
+
"--ph-play": "#FFFFFF",
|
|
137
|
+
"--ph-ink": "#111111",
|
|
138
|
+
"--ph-scrim": "#111111"
|
|
139
|
+
},
|
|
140
|
+
"inner": "<rect data-dc-tpl=\"286\" width=\"400\" height=\"300\" style=\"fill: var(--ph-0);\"></rect><path data-dc-tpl=\"287\" d=\"M220 212V124a60 60 0 0 1 120 0v88z\" style=\"fill: var(--ph-4);\"></path><rect data-dc-tpl=\"288\" y=\"212\" width=\"400\" height=\"88\" style=\"fill: var(--ph-1);\"></rect><ellipse data-dc-tpl=\"289\" cx=\"130\" cy=\"212\" rx=\"70\" ry=\"6\" opacity=\".5\" style=\"fill: var(--ph-3);\"></ellipse><rect data-dc-tpl=\"290\" x=\"82\" y=\"130\" width=\"50\" height=\"82\" rx=\"12\" style=\"fill: var(--ph-2);\"></rect><circle data-dc-tpl=\"291\" cx=\"164\" cy=\"188\" r=\"24\" style=\"fill: var(--ph-3);\"></circle>"
|
|
141
|
+
}
|
|
142
|
+
} as const
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { useState, type ReactNode } from 'react'
|
|
2
|
+
import { useSearchSuggestions, useThemeActions, useThemeContext, type Money } from '@tanqory/theme-kit'
|
|
3
|
+
import { CartDrawer } from '../components/overlays/CartDrawer'
|
|
4
|
+
import { SearchModal } from '../components/overlays/SearchModal'
|
|
5
|
+
import { CookieConsent } from '../components/overlays/CookieConsent'
|
|
6
|
+
import { RewardsLauncher } from '../components/overlays/RewardsLauncher'
|
|
7
|
+
import { FriendOfferPanel } from '../components/overlays/FriendOfferPanel'
|
|
8
|
+
import { ToastStack } from '../components/overlays/Toast'
|
|
9
|
+
import { useNova } from '../styles/NovaProvider'
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* The page layout: the page's sections (header zone → <main> → footer zone, as
|
|
13
|
+
* the platform resolves them) and the overlays every page shares — the cart
|
|
14
|
+
* drawer, the search modal, the cookie banner, the rewards launcher, the friend offer and toasts.
|
|
15
|
+
*/
|
|
16
|
+
export function Main({ children }: { children: ReactNode }): JSX.Element {
|
|
17
|
+
const page = useThemeContext()
|
|
18
|
+
const actions = useThemeActions()
|
|
19
|
+
const { strings } = useNova()
|
|
20
|
+
return (
|
|
21
|
+
<>
|
|
22
|
+
{children}
|
|
23
|
+
<div className="nv-overlay-root" data-nv-overlay-root="">
|
|
24
|
+
{page.settings.enableCartDrawer !== false && (
|
|
25
|
+
<CartDrawer
|
|
26
|
+
open={page.overlay === 'cart'}
|
|
27
|
+
onClose={actions.overlays.close}
|
|
28
|
+
cart={page.cart}
|
|
29
|
+
checkoutUrl={page.checkoutUrl}
|
|
30
|
+
cartUrl="/cart"
|
|
31
|
+
updatingLineIds={page.busyLines}
|
|
32
|
+
failedLineIds={page.failedLines}
|
|
33
|
+
refusedLines={page.refusedLines}
|
|
34
|
+
onQuantity={(line, quantity) => void actions.cart.setQuantity(line.id, quantity)}
|
|
35
|
+
onRemove={(line) => void actions.cart.remove(line.id)}
|
|
36
|
+
onRetry={(line) => void actions.cart.setQuantity(line.id, line.quantity)}
|
|
37
|
+
justAdded={page.justAddedToCart}
|
|
38
|
+
emptyAction={{ label: strings.continueShopping, href: '/collections/all' }}
|
|
39
|
+
freeShipping={freeShippingProgress(page.shop?.freeShippingThreshold, page.cart?.subtotal)}
|
|
40
|
+
note={page.shop?.taxesIncluded ? strings.taxIncludedShippingAtCheckout : undefined}
|
|
41
|
+
/>
|
|
42
|
+
)}
|
|
43
|
+
{page.settings.enableSearchModal !== false && <Search open={page.overlay === 'search'} onClose={actions.overlays.close} />}
|
|
44
|
+
{/* Browser-only: the consent answer is read after hydration, so the banner lives in a client slot. */}
|
|
45
|
+
<div className="nv-consent-slot" data-tq-client-slot="consent">
|
|
46
|
+
{page.consentRequired && <CookieConsent open privacyUrl={page.privacyPolicyUrl} config={page.shop?.consentBanner} onDecide={(choice) => actions.consent.decide(choice)} />}
|
|
47
|
+
</div>
|
|
48
|
+
{/* Browser-only: the loyalty state is read after hydration; off (renders nothing) without a program. */}
|
|
49
|
+
<div className="nv-rewards-slot" data-tq-client-slot="rewards">
|
|
50
|
+
<RewardsLauncher />
|
|
51
|
+
</div>
|
|
52
|
+
{/* Browser-only too: a `?ref=` visit's friend offer (army #7751); nothing without one. */}
|
|
53
|
+
<div className="nv-referral-slot" data-tq-client-slot="friend-offer">
|
|
54
|
+
<FriendOfferPanel />
|
|
55
|
+
</div>
|
|
56
|
+
<ToastStack toasts={page.toasts.map((t) => ({ id: t.id, tone: t.tone, title: t.message }))} onDismiss={actions.toasts.dismiss} />
|
|
57
|
+
</div>
|
|
58
|
+
</>
|
|
59
|
+
)
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* The cart drawer's free-shipping bar: the store's lowest "free over" threshold for the shopper's
|
|
64
|
+
* country, against the cart subtotal. None when the zone has no threshold, or the two are not in one
|
|
65
|
+
* currency (never converted).
|
|
66
|
+
*/
|
|
67
|
+
export function freeShippingProgress(threshold: Money | undefined, subtotal: Money | undefined): { remaining: Money; progress: number } | null {
|
|
68
|
+
if (!threshold || !subtotal || threshold.currencyCode !== subtotal.currencyCode) return null
|
|
69
|
+
if (threshold.amount <= 0) return { remaining: { amount: 0, currencyCode: threshold.currencyCode }, progress: 1 }
|
|
70
|
+
const remaining = Math.max(0, threshold.amount - subtotal.amount)
|
|
71
|
+
return { remaining: { amount: remaining, currencyCode: threshold.currencyCode }, progress: Math.min(1, subtotal.amount / threshold.amount) }
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function Search({ open, onClose }: { open: boolean; onClose: () => void }): JSX.Element {
|
|
75
|
+
const [query, setQuery] = useState('')
|
|
76
|
+
const { results, loading } = useSearchSuggestions(query)
|
|
77
|
+
return <SearchModal open={open} onClose={onClose} onQuery={setQuery} results={results} loading={loading} searchUrl="/search" />
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export default Main
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { type SettingsOf } from '@tanqory/theme-kit'
|
|
2
|
+
import { formatMoney } from '../../components/commerce/money'
|
|
3
|
+
import { formatDate } from '../../components/content/ArticleCard'
|
|
4
|
+
import { RichText } from '../../components/content/RichText'
|
|
5
|
+
import { Pagination } from '../../components/navigation/Pagination'
|
|
6
|
+
import { Button } from '../../components/base/Button'
|
|
7
|
+
import { useNova } from '../../styles/NovaProvider'
|
|
8
|
+
import { fmt } from '../../styles/strings'
|
|
9
|
+
import type { CustomerAccount, NovaImage } from '@tanqory/theme-kit'
|
|
10
|
+
import { Shell } from '../../components/section/shell'
|
|
11
|
+
import '../../components/section/shared.css'
|
|
12
|
+
import '../../styles/sections/utility.css'
|
|
13
|
+
import { accountSchema } from './schema'
|
|
14
|
+
|
|
15
|
+
export type AccountSettings = SettingsOf<typeof accountSchema>
|
|
16
|
+
export interface AccountProps extends Omit<AccountSettings, 'loginImage'> {
|
|
17
|
+
/**
|
|
18
|
+
* The Account BFF URL the page frames (Theme ABI v2 §4, the account slot): sign-in, orders and addresses render
|
|
19
|
+
* inside `<iframe data-tq-slot="account">`, on the platform's account origin. Customer credentials and data never
|
|
20
|
+
* pass through the theme (ABI Act-1, D6). Present on the customer route of a storefront.
|
|
21
|
+
*/
|
|
22
|
+
accountUrl?: string
|
|
23
|
+
/** Whether the shopper has a customer session (never who); the heading follows it. */
|
|
24
|
+
signedIn?: boolean
|
|
25
|
+
/** A customer's account data, only from a host that hands it to the theme (ABI v2 does not: the frame shows it). */
|
|
26
|
+
customer?: CustomerAccount | null
|
|
27
|
+
loginImage?: NovaImage | null
|
|
28
|
+
signOutUrl?: string
|
|
29
|
+
shopUrl?: string
|
|
30
|
+
page?: number
|
|
31
|
+
pageHref?: (page: number) => string
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** The platform's account area: everything a customer signs in to, reads or edits renders inside it. */
|
|
35
|
+
function AccountSlot({ url, title }: { url: string; title: string }): JSX.Element {
|
|
36
|
+
return <iframe className="nv-account__slot" data-tq-slot="account" src={url} sandbox="allow-scripts allow-forms allow-same-origin" title={title} />
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function Account(props: AccountProps): JSX.Element {
|
|
40
|
+
const { loginLayout, showOrderHistory, ordersPerPage, sectionWidth, contentWidth, heading, description, headerSize, accountUrl, signedIn, customer, loginImage, signOutUrl = '/account/logout', shopUrl = '/collections/all', page = 1, pageHref } = props
|
|
41
|
+
const { strings, locale, mode } = useNova()
|
|
42
|
+
|
|
43
|
+
if (!customer) {
|
|
44
|
+
const split = loginLayout === 'split' && Boolean(loginImage)
|
|
45
|
+
return (
|
|
46
|
+
<Shell props={props} type="account" width={sectionWidth} className="nv-account" data-layout={split ? 'split' : 'stacked'}>
|
|
47
|
+
<div className="nv-account__signin">
|
|
48
|
+
{split && (
|
|
49
|
+
<div className="nv-account__media">
|
|
50
|
+
<img src={loginImage!.src} alt={loginImage!.alt ?? ''} width={loginImage!.width} height={loginImage!.height} loading="lazy" decoding="async" />
|
|
51
|
+
</div>
|
|
52
|
+
)}
|
|
53
|
+
<div className="nv-account__panel">
|
|
54
|
+
<h1 className="nv-utility__title" data-size={headerSize}>{signedIn ? strings.myAccount : heading.trim() || strings.signIn}</h1>
|
|
55
|
+
{description.trim() && <RichText html={description} className="nv-account__desc" />}
|
|
56
|
+
{accountUrl && <AccountSlot url={accountUrl} title={strings.account} />}
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
</Shell>
|
|
60
|
+
)
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const per = Number(ordersPerPage)
|
|
64
|
+
const orders = customer.orders.slice((page - 1) * per, page * per)
|
|
65
|
+
const pages = Math.ceil(customer.orders.length / per)
|
|
66
|
+
return (
|
|
67
|
+
<Shell props={props} type="account" width={sectionWidth} className="nv-account" data-layout="signed-in">
|
|
68
|
+
<div className="nv-account__home" data-measure={contentWidth}>
|
|
69
|
+
<div className="nv-account__head">
|
|
70
|
+
<h1 className="nv-utility__title" data-size={headerSize}>{fmt(strings.greeting, { name: customer.firstName })}</h1>
|
|
71
|
+
<a className="nv-account__signout" href={signOutUrl}>
|
|
72
|
+
{strings.signOut}
|
|
73
|
+
</a>
|
|
74
|
+
</div>
|
|
75
|
+
{description.trim() && <RichText html={description} className="nv-account__desc" />}
|
|
76
|
+
{showOrderHistory &&
|
|
77
|
+
(customer.orders.length ? (
|
|
78
|
+
<>
|
|
79
|
+
<h2 className="nv-visually-hidden">{strings.orders}</h2>
|
|
80
|
+
<ul className="nv-account__orders">
|
|
81
|
+
{orders.map((o) => {
|
|
82
|
+
const row = (
|
|
83
|
+
<>
|
|
84
|
+
<span className="nv-account__order-id">
|
|
85
|
+
<span className="nv-account__number">{o.number}</span>
|
|
86
|
+
<time dateTime={o.processedAt}>{formatDate(o.processedAt, locale)}</time>
|
|
87
|
+
</span>
|
|
88
|
+
<span className="nv-account__items">{o.itemCount === 1 ? strings.itemsOne : fmt(strings.itemsMany, { count: o.itemCount })}</span>
|
|
89
|
+
<span className="nv-account__total nv-tabular">{formatMoney(o.total, locale)}</span>
|
|
90
|
+
</>
|
|
91
|
+
)
|
|
92
|
+
return <li key={o.id}>{o.url ? <a href={o.url} aria-label={fmt(strings.orderNumber, { number: o.number })}>{row}</a> : <div>{row}</div>}</li>
|
|
93
|
+
})}
|
|
94
|
+
</ul>
|
|
95
|
+
{pages > 1 && pageHref && <Pagination page={page} pages={pages} href={pageHref} />}
|
|
96
|
+
</>
|
|
97
|
+
) : (
|
|
98
|
+
<div className="nv-account__none">
|
|
99
|
+
<p>{strings.noOrders}</p>
|
|
100
|
+
<Button href={shopUrl} variant="secondary">
|
|
101
|
+
{strings.startShopping}
|
|
102
|
+
</Button>
|
|
103
|
+
</div>
|
|
104
|
+
))}
|
|
105
|
+
{mode === 'editor' && <p className="nv-utility__editor-note">{strings.editorOrdersBlocked}</p>}
|
|
106
|
+
</div>
|
|
107
|
+
</Shell>
|
|
108
|
+
)
|
|
109
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { defineSection, imageFor, resolveSettings } from '@tanqory/theme-kit'
|
|
2
|
+
import { Account } from './Account'
|
|
3
|
+
import { presets } from './presets'
|
|
4
|
+
import { accountSchema } from './schema'
|
|
5
|
+
|
|
6
|
+
export default defineSection({
|
|
7
|
+
id: 'account',
|
|
8
|
+
schema: accountSchema,
|
|
9
|
+
component: Account,
|
|
10
|
+
category: 'commerce',
|
|
11
|
+
zone: 'main',
|
|
12
|
+
title: 'Account',
|
|
13
|
+
description: 'Sign-in, orders and saved addresses for the customer.',
|
|
14
|
+
icon: 'user',
|
|
15
|
+
requiresContext: ['customer'],
|
|
16
|
+
presets,
|
|
17
|
+
data: (node, store) => {
|
|
18
|
+
const r = resolveSettings(accountSchema, node.settings)
|
|
19
|
+
const { loginImage: _handle, ...settings } = r.settings as typeof r.settings & { loginImage?: string }
|
|
20
|
+
return { ...settings, accountUrl: store.accountUrl, signedIn: store.customer?.signedIn === true, customer: store.account ?? null, loginImage: imageFor(store, r.handles.loginImage) }
|
|
21
|
+
},
|
|
22
|
+
})
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { SectionPreset } from '@tanqory/theme-kit'
|
|
2
|
+
/** What "Add section" offers as starting points. */
|
|
3
|
+
export const presets: readonly SectionPreset[] = [
|
|
4
|
+
// Signed-out entry with brand image
|
|
5
|
+
{"name": "account-split", "label": "Account", "settings": {"loginLayout": "split", "showOrderHistory": true}, "blocks": []},
|
|
6
|
+
]
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { defineSchema, field } from '@tanqory/theme-kit'
|
|
2
|
+
import { shared } from '../../components/section/shared'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* 12G · 03 account (EXISTING · CHANGED) — the theme's entry to the accounts
|
|
6
|
+
* app (full flows in 07C · D24). Signed out: sign in with an emailed code,
|
|
7
|
+
* split beside the loginImage (no image → stacked). Signed in: a greeting
|
|
8
|
+
* and order history (rows 56, mono number, total at the end). Order status
|
|
9
|
+
* and returns show only when the accounts app provides them.
|
|
10
|
+
*/
|
|
11
|
+
export const accountSchema = defineSchema(
|
|
12
|
+
{ kind: 'section', name: 'account', family: '12G' },
|
|
13
|
+
{
|
|
14
|
+
loginLayout: field.select(['split', 'stacked'], 'split'),
|
|
15
|
+
loginImage: field.resource('image'),
|
|
16
|
+
showOrderHistory: field.boolean(true),
|
|
17
|
+
ordersPerPage: field.select(['10', '20'], '10'),
|
|
18
|
+
// Shared Nova 12 vocabulary (12A · 00) — sharedApplicability APPLIES.
|
|
19
|
+
sectionWidth: shared.sectionWidth('standard'),
|
|
20
|
+
contentWidth: shared.contentWidth('content'),
|
|
21
|
+
spacingTop: shared.spacingTop('large'),
|
|
22
|
+
spacingBottom: shared.spacingBottom('large'),
|
|
23
|
+
background: shared.background('surface'),
|
|
24
|
+
heading: shared.heading('Sign in'),
|
|
25
|
+
description: shared.description(),
|
|
26
|
+
headerSize: shared.headerSize('medium'),
|
|
27
|
+
anchorId: shared.anchorId(),
|
|
28
|
+
},
|
|
29
|
+
)
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
.nv-announcement {
|
|
2
|
+
--nv-ann-bg: var(--color-bg-muted);
|
|
3
|
+
--nv-ann-fg: var(--color-fg);
|
|
4
|
+
background: var(--nv-ann-bg);
|
|
5
|
+
color: var(--nv-ann-fg);
|
|
6
|
+
font-size: var(--type-body-sm);
|
|
7
|
+
line-height: 1.4;
|
|
8
|
+
}
|
|
9
|
+
.nv-announcement[data-bg='inverse'] { --nv-ann-bg: var(--color-bg-inverse); --nv-ann-fg: var(--color-fg-inverse); }
|
|
10
|
+
.nv-announcement[data-bg='brand'] { --nv-ann-bg: var(--color-brand); --nv-ann-fg: var(--color-brand-contrast); }
|
|
11
|
+
.nv-announcement[data-empty] { padding: var(--space-1) var(--page-gutter); }
|
|
12
|
+
/* Hidden controls keep their 88px slot so the message never shifts. */
|
|
13
|
+
.nv-announcement__inner {
|
|
14
|
+
display: grid;
|
|
15
|
+
grid-template-columns: 88px minmax(0, 1fr) 88px;
|
|
16
|
+
align-items: center;
|
|
17
|
+
min-height: 44px;
|
|
18
|
+
max-width: calc(var(--container-standard) + 2 * var(--page-gutter));
|
|
19
|
+
margin-inline: auto;
|
|
20
|
+
padding-inline: var(--space-1);
|
|
21
|
+
}
|
|
22
|
+
.nv-announcement__start { display: flex; }
|
|
23
|
+
.nv-announcement__end { display: flex; justify-content: flex-end; }
|
|
24
|
+
.nv-announcement .nv-icon-btn { color: inherit; }
|
|
25
|
+
.nv-announcement .nv-icon-btn:hover { background: color-mix(in srgb, currentColor 10%, transparent); }
|
|
26
|
+
.nv-announcement__messages { text-align: center; padding-block: var(--space-2); }
|
|
27
|
+
.nv-announcement__message:not([hidden]) { animation: nv-ann-fade 200ms var(--ease-standard); text-wrap: balance; }
|
|
28
|
+
.nv-announcement__link { color: inherit; }
|
|
29
|
+
.nv-announcement__link { text-decoration: none; }
|
|
30
|
+
.nv-announcement__link:hover { text-decoration: underline; text-underline-offset: var(--underline-offset); }
|
|
31
|
+
.nv-announcement__more { text-decoration: underline; text-underline-offset: var(--underline-offset); }
|
|
32
|
+
@keyframes nv-ann-fade { from { opacity: 0; } }
|
|
33
|
+
@media (min-width: 640px) {
|
|
34
|
+
.nv-announcement__inner { min-height: 40px; padding-inline: var(--page-gutter); }
|
|
35
|
+
.nv-announcement .nv-icon-btn { width: 36px; height: 36px; }
|
|
36
|
+
.nv-announcement__inner { grid-template-columns: 88px minmax(0, 1fr) 88px; }
|
|
37
|
+
}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { sx, sxJoin } from '@tanqory/theme-kit'
|
|
2
|
+
import { useEffect, useMemo, useRef, useState, type CSSProperties } from 'react'
|
|
3
|
+
import { type SettingsOf } from '@tanqory/theme-kit'
|
|
4
|
+
import { IconButton } from '../../components/base/IconButton'
|
|
5
|
+
import { useNova } from '../../styles/NovaProvider'
|
|
6
|
+
import { EditorFrame } from '../../components/states/EditorFrame'
|
|
7
|
+
import { bestLabel } from '../../styles/theme'
|
|
8
|
+
import '../../components/section/shared.css'
|
|
9
|
+
import './AnnouncementBar.css'
|
|
10
|
+
import { announcementBarSchema } from './schema'
|
|
11
|
+
|
|
12
|
+
export type AnnouncementBarSettings = SettingsOf<typeof announcementBarSchema>
|
|
13
|
+
export interface AnnouncementBarProps extends AnnouncementBarSettings {
|
|
14
|
+
/** The brand colour, when the bar is "brand", to pick the label (auto contrast). */
|
|
15
|
+
brandColor?: string
|
|
16
|
+
/** Session storage key scope (a store id); dismissal is per session and per message set. */
|
|
17
|
+
storageKey?: string
|
|
18
|
+
/** Start paused / on a message — stories and tests. */
|
|
19
|
+
initialIndex?: number
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const ROTATE_MS = 5000
|
|
23
|
+
|
|
24
|
+
function hash(s: string): string {
|
|
25
|
+
let h = 0
|
|
26
|
+
for (let i = 0; i < s.length; i++) h = (h * 31 + s.charCodeAt(i)) | 0
|
|
27
|
+
return (h >>> 0).toString(36)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export function AnnouncementBar(props: AnnouncementBarProps): JSX.Element | null {
|
|
31
|
+
const { text, link, text2, link2, text3, link3, background, rotation, showArrows, dismissible, brandColor, storageKey = 'nv', initialIndex = 0 } = props
|
|
32
|
+
const { mode, strings } = useNova()
|
|
33
|
+
const messages = useMemo(
|
|
34
|
+
() => [
|
|
35
|
+
{ text, link },
|
|
36
|
+
{ text: text2, link: link2 },
|
|
37
|
+
{ text: text3, link: link3 },
|
|
38
|
+
].filter((m) => m.text.trim()),
|
|
39
|
+
[text, link, text2, link2, text3, link3],
|
|
40
|
+
)
|
|
41
|
+
const many = messages.length >= 2
|
|
42
|
+
const [index, setIndex] = useState(Math.min(initialIndex, Math.max(0, messages.length - 1)))
|
|
43
|
+
const [paused, setPaused] = useState(false)
|
|
44
|
+
const [hover, setHover] = useState(false)
|
|
45
|
+
const [reduced, setReduced] = useState(false)
|
|
46
|
+
const [dismissed, setDismissed] = useState(false)
|
|
47
|
+
const root = useRef<HTMLElement>(null)
|
|
48
|
+
// Changing any message re-shows a dismissed bar: the key includes the text.
|
|
49
|
+
const key = `nova:announcement:${storageKey}:${hash(messages.map((m) => m.text).join('|'))}`
|
|
50
|
+
|
|
51
|
+
useEffect(() => {
|
|
52
|
+
if (!dismissible) return
|
|
53
|
+
try {
|
|
54
|
+
setDismissed(sessionStorage.getItem(key) === '1')
|
|
55
|
+
} catch {
|
|
56
|
+
/* storage unavailable: show the bar */
|
|
57
|
+
}
|
|
58
|
+
}, [dismissible, key])
|
|
59
|
+
|
|
60
|
+
useEffect(() => {
|
|
61
|
+
const mq = window.matchMedia?.('(prefers-reduced-motion: reduce)')
|
|
62
|
+
const forced = Boolean(root.current?.closest('[data-motion="reduced"]'))
|
|
63
|
+
setReduced(Boolean(mq?.matches) || forced)
|
|
64
|
+
}, [messages.length])
|
|
65
|
+
|
|
66
|
+
useEffect(() => setIndex((i) => (i >= messages.length ? 0 : i)), [messages.length])
|
|
67
|
+
|
|
68
|
+
const rotating = rotation && many && !reduced
|
|
69
|
+
useEffect(() => {
|
|
70
|
+
if (!rotating || paused || hover) return
|
|
71
|
+
const id = window.setInterval(() => setIndex((i) => (i + 1) % messages.length), ROTATE_MS)
|
|
72
|
+
return () => window.clearInterval(id)
|
|
73
|
+
}, [rotating, paused, hover, messages.length])
|
|
74
|
+
|
|
75
|
+
if (!messages.length) {
|
|
76
|
+
return mode === 'editor' ? (
|
|
77
|
+
<div className="nv-announcement" data-bg="muted" data-empty="">
|
|
78
|
+
<EditorFrame section="announcement-bar" title={strings.editorAddMessage} compact />
|
|
79
|
+
</div>
|
|
80
|
+
) : null
|
|
81
|
+
}
|
|
82
|
+
if (dismissed) return null
|
|
83
|
+
|
|
84
|
+
const style = background === 'brand' && brandColor ? ({ '--nv-ann-fg': bestLabel(brandColor) } as CSSProperties) : undefined
|
|
85
|
+
const go = (d: 1 | -1) => setIndex((i) => (i + d + messages.length) % messages.length)
|
|
86
|
+
const arrows = showArrows && many
|
|
87
|
+
|
|
88
|
+
return (
|
|
89
|
+
<section
|
|
90
|
+
ref={root}
|
|
91
|
+
className={sxJoin("nv-announcement", sx(style))}
|
|
92
|
+
data-bg={background}
|
|
93
|
+
aria-label={strings.announcements}
|
|
94
|
+
aria-roledescription={many ? 'carousel' : undefined}
|
|
95
|
+
onMouseEnter={() => setHover(true)}
|
|
96
|
+
onMouseLeave={() => setHover(false)}
|
|
97
|
+
onFocus={() => setHover(true)}
|
|
98
|
+
onBlur={(e) => !e.currentTarget.contains(e.relatedTarget as Node) && setHover(false)}
|
|
99
|
+
>
|
|
100
|
+
<div className="nv-announcement__inner">
|
|
101
|
+
<div className="nv-announcement__start">
|
|
102
|
+
{arrows && (
|
|
103
|
+
<>
|
|
104
|
+
<IconButton icon="chevron-left" label={strings.previous} onClick={() => go(-1)} />
|
|
105
|
+
<IconButton icon="chevron-right" label={strings.next} onClick={() => go(1)} />
|
|
106
|
+
</>
|
|
107
|
+
)}
|
|
108
|
+
</div>
|
|
109
|
+
<div className="nv-announcement__messages" aria-live={rotating && !paused ? 'off' : 'polite'} aria-atomic="true">
|
|
110
|
+
{messages.map((m, i) => (
|
|
111
|
+
<p key={i} className="nv-announcement__message" hidden={i !== index} aria-roledescription={many ? 'slide' : undefined}>
|
|
112
|
+
{m.link ? (
|
|
113
|
+
<a href={m.link} className="nv-announcement__link">
|
|
114
|
+
{m.text}
|
|
115
|
+
{/* "Learn more" suffix only if the message has none. */}
|
|
116
|
+
{!/·\s*\S/.test(m.text) && (
|
|
117
|
+
<>
|
|
118
|
+
{' · '}
|
|
119
|
+
<span className="nv-announcement__more">{strings.learnMore}</span>
|
|
120
|
+
</>
|
|
121
|
+
)}
|
|
122
|
+
</a>
|
|
123
|
+
) : (
|
|
124
|
+
m.text
|
|
125
|
+
)}
|
|
126
|
+
</p>
|
|
127
|
+
))}
|
|
128
|
+
</div>
|
|
129
|
+
<div className="nv-announcement__end">
|
|
130
|
+
{rotating && (
|
|
131
|
+
<IconButton icon={paused ? 'play' : 'pause'} label={paused ? strings.play : strings.pause} aria-pressed={paused} onClick={() => setPaused((p) => !p)} />
|
|
132
|
+
)}
|
|
133
|
+
{dismissible && (
|
|
134
|
+
<IconButton
|
|
135
|
+
icon="close"
|
|
136
|
+
label={strings.dismiss}
|
|
137
|
+
onClick={() => {
|
|
138
|
+
setDismissed(true)
|
|
139
|
+
try {
|
|
140
|
+
sessionStorage.setItem(key, '1')
|
|
141
|
+
} catch {
|
|
142
|
+
/* not persisted; dismissed for this render only */
|
|
143
|
+
}
|
|
144
|
+
}}
|
|
145
|
+
/>
|
|
146
|
+
)}
|
|
147
|
+
</div>
|
|
148
|
+
</div>
|
|
149
|
+
</section>
|
|
150
|
+
)
|
|
151
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { defineSection, resolveSettings } from '@tanqory/theme-kit'
|
|
2
|
+
import { AnnouncementBar } from './AnnouncementBar'
|
|
3
|
+
import { presets } from './presets'
|
|
4
|
+
import { announcementBarSchema } from './schema'
|
|
5
|
+
|
|
6
|
+
export default defineSection({
|
|
7
|
+
id: 'announcement-bar',
|
|
8
|
+
schema: announcementBarSchema,
|
|
9
|
+
component: AnnouncementBar,
|
|
10
|
+
category: 'layout',
|
|
11
|
+
zone: 'header',
|
|
12
|
+
title: 'Announcement bar',
|
|
13
|
+
description: 'A one-line message across the top of every page.',
|
|
14
|
+
icon: '▔',
|
|
15
|
+
presets,
|
|
16
|
+
data: (node, store) => {
|
|
17
|
+
const r = resolveSettings(announcementBarSchema, node.settings)
|
|
18
|
+
return { ...r.settings, brandColor: store.brandColor }
|
|
19
|
+
},
|
|
20
|
+
})
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { SectionPreset } from '@tanqory/theme-kit'
|
|
2
|
+
/** What "Add section" offers as starting points. */
|
|
3
|
+
export const presets: readonly SectionPreset[] = [
|
|
4
|
+
// One persistent service message
|
|
5
|
+
{"name": "announcement-shipping", "label": "Shipping promise", "settings": {"background": "muted", "rotation": false, "showArrows": false}, "blocks": []},
|
|
6
|
+
// Up to three short messages
|
|
7
|
+
{"name": "announcement-rotating", "label": "Rotating offers", "settings": {"background": "muted", "rotation": true, "showArrows": true}, "blocks": []},
|
|
8
|
+
// Time-bound sale notice
|
|
9
|
+
{"name": "announcement-sale", "label": "Sale alert", "settings": {"background": "inverse", "rotation": false, "dismissible": true}, "blocks": []},
|
|
10
|
+
]
|