@tokenoftrust/storefront-runner 2.4.86 → 2.4.88
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/apps/storefront/dev-plugins/tenant-hot-reload.mjs +1 -1
- package/apps/storefront/env.d.ts +2 -2
- package/apps/storefront/perf/README.md +1 -1
- package/apps/storefront/public/shared/commerce-chrome.css +1 -1
- package/apps/storefront/public/shared/commerce-marketing.css +1 -1
- package/apps/storefront/src/components/{CollectionCard.astro → catalog/storefront/CollectionCard.astro} +1 -1
- package/apps/storefront/src/components/{ProductCard.astro → catalog/storefront/ProductCard.astro} +7 -7
- package/apps/storefront/src/components/{commerce → catalog/storefront/commerce}/BrandGrid.astro +1 -1
- package/apps/storefront/src/components/{commerce → catalog/storefront/commerce}/PriceDisplay.astro +3 -3
- package/apps/storefront/src/components/{commerce → catalog/storefront/commerce}/ProductCarousel.astro +3 -3
- package/apps/storefront/src/components/{commerce → catalog/storefront/commerce}/ProductGrid.astro +4 -4
- package/apps/storefront/src/components/{commerce → catalog/storefront/commerce}/ReviewList.astro +1 -1
- package/apps/storefront/src/components/{islands → catalog/storefront/islands}/ImageGallery.tsx +1 -1
- package/apps/storefront/src/components/{islands → catalog/storefront/islands}/QuickView.tsx +2 -2
- package/apps/storefront/src/components/{islands → catalog/storefront/islands}/RecentlyViewed.tsx +2 -2
- package/apps/storefront/src/components/{islands → catalog/storefront/islands}/SearchTypeahead.tsx +3 -3
- package/apps/storefront/src/components/{islands → catalog/storefront/islands}/VariantSelector.tsx +2 -2
- package/apps/storefront/src/components/{plp → catalog/storefront/plp}/FacetSidebar.astro +1 -1
- package/apps/storefront/src/components/compliance/{NicotineWarning.astro → storefront/compliance/NicotineWarning.astro} +1 -1
- package/apps/storefront/src/components/{islands → compliance/storefront/islands}/AgeGate.tsx +2 -2
- package/apps/storefront/src/components/{islands → compliance/storefront/islands}/CheckoutComplianceGate.tsx +1 -1
- package/apps/storefront/src/components/{islands → compliance/storefront/islands}/IsolatedAgeGate.tsx +1 -1
- package/apps/storefront/src/components/{AsyncStylesheet.astro → content/storefront/AsyncStylesheet.astro} +2 -2
- package/apps/storefront/src/components/{Breadcrumbs.astro → content/storefront/Breadcrumbs.astro} +3 -3
- package/apps/storefront/src/components/{Seo.astro → content/storefront/Seo.astro} +5 -5
- package/apps/storefront/src/components/{blog → content/storefront/blog}/BlogIndexView.astro +6 -6
- package/apps/storefront/src/components/{blog → content/storefront/blog}/BlogPaywall.astro +1 -1
- package/apps/storefront/src/components/{blog → content/storefront/blog}/BlogPostArticle.astro +7 -7
- package/apps/storefront/src/components/{blog → content/storefront/blog}/PostAccessBadge.astro +1 -1
- package/apps/storefront/src/components/{blog → content/storefront/blog}/PostGrid.astro +3 -3
- package/apps/storefront/src/components/{blog → content/storefront/blog}/ReactionBar.astro +1 -1
- package/apps/storefront/src/components/{blog → content/storefront/blog}/ShareRow.astro +1 -1
- package/apps/storefront/src/components/{chrome → content/storefront/chrome}/MegaMenu.astro +3 -3
- package/apps/storefront/src/components/{chrome → content/storefront/chrome}/NavDropdown.astro +2 -2
- package/apps/storefront/src/components/{chrome → content/storefront/chrome}/SiteFooter.astro +5 -5
- package/apps/storefront/src/components/{chrome → content/storefront/chrome}/SiteHeader.astro +9 -9
- package/apps/storefront/src/components/{chrome → content/storefront/chrome}/UtilityNav.astro +2 -2
- package/apps/storefront/src/components/content/{Callout.astro → storefront/content/Callout.astro} +1 -1
- package/apps/storefront/src/components/content/{PromoTiles.astro → storefront/content/PromoTiles.astro} +3 -3
- package/apps/storefront/src/components/content/{ProseSections.astro → storefront/content/ProseSections.astro} +3 -3
- package/apps/storefront/src/components/{home → content/storefront/home}/Hero.astro +4 -4
- package/apps/storefront/src/components/{islands → content/storefront/islands}/MobileNav.tsx +2 -2
- package/apps/storefront/src/components/{marketing → content/storefront/marketing}/CardGrid.astro +2 -2
- package/apps/storefront/src/components/{marketing → content/storefront/marketing}/CodeSample.astro +1 -1
- package/apps/storefront/src/components/{marketing → content/storefront/marketing}/CtaBand.astro +2 -2
- package/apps/storefront/src/components/{marketing → content/storefront/marketing}/Faq.astro +5 -5
- package/apps/storefront/src/components/{marketing → content/storefront/marketing}/Integrations.astro +3 -3
- package/apps/storefront/src/components/{marketing → content/storefront/marketing}/MarketingBlocks.astro +11 -11
- package/apps/storefront/src/components/{marketing → content/storefront/marketing}/MarketingCtas.astro +1 -1
- package/apps/storefront/src/components/{marketing → content/storefront/marketing}/MarketingHero.astro +2 -2
- package/apps/storefront/src/components/{marketing → content/storefront/marketing}/ProofStrip.astro +1 -1
- package/apps/storefront/src/components/{marketing → content/storefront/marketing}/SplitCompare.astro +2 -2
- package/apps/storefront/src/components/{marketing → content/storefront/marketing}/Steps.astro +2 -2
- package/apps/storefront/src/components/{marketing → content/storefront/marketing}/Testimonials.astro +2 -2
- package/apps/storefront/src/components/{marketing → content/storefront/marketing}/TrustBar.astro +1 -1
- package/apps/storefront/src/components/{style-guide → content/storefront/style-guide}/StyleGuideNav.astro +1 -1
- package/apps/storefront/src/components/{the-build → content/storefront/the-build}/TheBuildIndexView.astro +5 -5
- package/apps/storefront/src/components/customers/storefront/islands/SavedList.tsx +2 -2
- package/apps/storefront/src/components/{subscription → subscriptions/storefront/subscription}/HowItWorksSteps.astro +1 -1
- package/apps/storefront/src/components/{subscription → subscriptions/storefront/subscription}/ManageSubscriptionEntry.astro +1 -1
- package/apps/storefront/src/components/{subscription → subscriptions/storefront/subscription}/SavingsExplainer.astro +2 -2
- package/apps/storefront/src/layouts/Layout.astro +32 -32
- package/apps/storefront/src/lib/activity/alerts.ts +1 -1
- package/apps/storefront/src/lib/activity/candidateSubmitLease.ts +1 -1
- package/apps/storefront/src/lib/activity/fixtures/evidence.ts +2 -2
- package/apps/storefront/src/lib/activity/query.ts +2 -2
- package/apps/storefront/src/lib/activity/store.ts +1 -1
- package/apps/storefront/src/lib/admin/services/mock/index.ts +5 -5
- package/apps/storefront/src/lib/assets/shared/imageAttrs.ts +1 -1
- package/apps/storefront/src/lib/basePath.ts +1 -1
- package/apps/storefront/src/lib/{admin → catalog/admin}/catalogSettingsClient.ts +2 -2
- package/apps/storefront/src/lib/{admin → catalog/admin}/services/catalogProducts.ts +2 -2
- package/apps/storefront/src/lib/{d1 → catalog/d1}/catalog.ts +1 -1
- package/apps/storefront/src/lib/{admin/services/mock → catalog/fixtures}/products.ts +5 -5
- package/apps/storefront/src/lib/{search → catalog/search}/index.ts +1 -1
- package/apps/storefront/src/lib/{featuredProductsPresentation.ts → catalog/shared/featuredProductsPresentation.ts} +1 -1
- package/apps/storefront/src/lib/{priceBuckets.ts → catalog/shared/priceBuckets.ts} +1 -1
- package/apps/storefront/src/lib/{tot → catalog/tot}/ToTClient.ts +3 -3
- package/apps/storefront/src/lib/{tot → catalog/tot}/query.ts +1 -1
- package/apps/storefront/src/lib/{tot → catalog/tot}/syncState.ts +1 -1
- package/apps/storefront/src/lib/{tot → catalog/tot}/tenantCatalog.ts +1 -1
- package/apps/storefront/src/lib/{admin/services/mock → checkout/fixtures}/checkoutSettings.ts +2 -2
- package/apps/storefront/src/lib/{blog → content/blog}/collection.ts +9 -9
- package/apps/storefront/src/lib/{blog → content/blog}/postView.ts +3 -3
- package/apps/storefront/src/lib/{blog → content/blog}/provider.ts +7 -7
- package/apps/storefront/src/lib/{chrome → content/chrome}/footerLegal.ts +2 -2
- package/apps/storefront/src/lib/{chrome → content/chrome}/trackingPlacements.ts +1 -1
- package/apps/storefront/src/lib/content/index.ts +1 -1
- package/apps/storefront/src/lib/{seo → content/seo}/faqItems.ts +1 -1
- package/apps/storefront/src/lib/{seo → content/seo}/structuredData.ts +1 -1
- package/apps/storefront/src/lib/{breadcrumbs.ts → content/shared/breadcrumbs.ts} +1 -1
- package/apps/storefront/src/lib/{heroSlideshow.ts → content/shared/heroSlideshow.ts} +1 -1
- package/apps/storefront/src/lib/{homeVisualParity.ts → content/shared/homeVisualParity.ts} +1 -1
- package/apps/storefront/src/lib/{jsonld.ts → content/shared/jsonld.ts} +1 -1
- package/apps/storefront/src/lib/{rawChrome.ts → content/shared/rawChrome.ts} +14 -14
- package/apps/storefront/src/lib/{rawMarketingHtml.ts → content/shared/rawMarketingHtml.ts} +3 -3
- package/apps/storefront/src/lib/{sections.ts → content/shared/sections.ts} +2 -2
- package/apps/storefront/src/lib/{styleGuideThemes.ts → content/shared/styleGuideThemes.ts} +3 -3
- package/apps/storefront/src/lib/{storyblok → content/storyblok}/content-model.ts +1 -1
- package/apps/storefront/src/lib/{storyblok → content/storyblok}/provider.ts +26 -26
- package/apps/storefront/src/lib/{the-build → content/the-build}/provider.ts +1 -1
- package/apps/storefront/src/lib/{the-build → content/the-build}/toc.ts +1 -1
- package/apps/storefront/src/lib/d1/schema-apps.ts +2 -2
- package/apps/storefront/src/lib/email/candidateConflictEmail.ts +1 -1
- package/apps/storefront/src/lib/email/magicLinkInviteEmail.ts +1 -1
- package/apps/storefront/src/lib/{newsletter → engagement/newsletter}/digest.ts +2 -2
- package/apps/storefront/src/lib/{newsletter → engagement/newsletter}/resendClient.ts +1 -1
- package/apps/storefront/src/lib/{newsletter → engagement/newsletter}/send.ts +2 -2
- package/apps/storefront/src/lib/{newsletter → engagement/newsletter}/subscribers.ts +1 -1
- package/apps/storefront/src/lib/{social → engagement/social}/golive.ts +2 -2
- package/apps/storefront/src/lib/{social → engagement/social}/notify.ts +1 -1
- package/apps/storefront/src/lib/{social → engagement/social}/tokenStore.ts +3 -3
- package/apps/storefront/src/lib/env.ts +1 -1
- package/apps/storefront/src/lib/fulfillment/store.ts +1 -1
- package/apps/storefront/src/lib/integrations/apps/appVersionStore.ts +1 -1
- package/apps/storefront/src/lib/integrations/apps/credentials.ts +1 -1
- package/apps/storefront/src/lib/integrations/apps/orders/idempotency.ts +1 -1
- package/apps/storefront/src/lib/integrations/apps/registryAccess.ts +1 -1
- package/apps/storefront/src/lib/integrations/apps/registryService.ts +1 -1
- package/apps/storefront/src/lib/integrations/integration/managedInstallDeclarations.ts +1 -1
- package/apps/storefront/src/lib/integrations/webhooks/deliveryEngine.ts +1 -1
- package/apps/storefront/src/lib/integrations/webhooks/deliveryStore.ts +1 -1
- package/apps/storefront/src/lib/integrations/webhooks/emit.ts +1 -1
- package/apps/storefront/src/lib/integrations/webhooks/getDispatcher.ts +1 -1
- package/apps/storefront/src/lib/{apps/orders → measurement/attribution}/attributionService.ts +2 -2
- package/apps/storefront/src/lib/{apps/orders → measurement/attribution}/orderConversionD1.ts +2 -2
- package/apps/storefront/src/lib/{apps/orders → measurement/attribution}/verifiedProviderMeasurement.ts +2 -2
- package/apps/storefront/src/lib/{apps → measurement/consent}/consentConfigRead.ts +1 -1
- package/apps/storefront/src/lib/{tracking → measurement/tracking}/d1Control.ts +2 -2
- package/apps/storefront/src/lib/{tracking → measurement/tracking}/interactionCollector.ts +2 -2
- package/apps/storefront/src/lib/{tracking → measurement/tracking}/interactionStore.ts +0 -0
- package/apps/storefront/src/lib/{tracking → measurement/tracking}/pruneRollup.ts +2 -2
- package/apps/storefront/src/lib/{tracking → measurement/tracking}/publishSafetyNet.ts +1 -1
- package/apps/storefront/src/lib/{tracking → measurement/tracking}/tenantD1Registry.ts +2 -2
- package/apps/storefront/src/lib/monitoring/manifest.ts +1 -1
- package/apps/storefront/src/lib/{apps/orders → orders/data}/orderForwardReceiver.ts +1 -1
- package/apps/storefront/src/lib/{apps/orders → orders/data}/orderMapper.ts +1 -1
- package/apps/storefront/src/lib/{apps/orders → orders/data}/ordersStore.ts +1 -1
- package/apps/storefront/src/lib/{admin/services/mock → orders/fixtures}/orders.ts +5 -5
- package/apps/storefront/src/lib/previewReload.ts +1 -1
- package/apps/storefront/src/lib/publication/contentProvider.ts +7 -7
- package/apps/storefront/src/lib/publication/mountedDiscovery.ts +1 -1
- package/apps/storefront/src/lib/publication/rootDiscovery.ts +4 -4
- package/apps/storefront/src/lib/{admin/services/mock → subscriptions/fixtures}/subscriptions.ts +8 -8
- package/apps/storefront/src/lib/url.ts +1 -1
- package/apps/storefront/src/middleware/controlPlane.ts +2 -2
- package/apps/storefront/src/middleware/index.ts +2 -2
- package/apps/storefront/src/middleware/renderChain.ts +3 -3
- package/apps/storefront/src/pages/404.astro +1 -1
- package/apps/storefront/src/pages/[...slug].astro +13 -13
- package/apps/storefront/src/pages/api/activity.ts +1 -1
- package/apps/storefront/src/pages/api/admin/activity-alerts.ts +1 -1
- package/apps/storefront/src/pages/api/admin/interaction-insights.ts +4 -4
- package/apps/storefront/src/pages/api/admin/orders/[id].ts +2 -2
- package/apps/storefront/src/pages/api/admin/orders.ts +2 -2
- package/apps/storefront/src/pages/api/blog/[collection]/[slug]/react.ts +1 -1
- package/apps/storefront/src/pages/api/commerce/checkout-handoff.ts +2 -2
- package/apps/storefront/src/pages/api/commerce/final-cart-authorization.ts +2 -2
- package/apps/storefront/src/pages/api/compliance/preflight.ts +1 -1
- package/apps/storefront/src/pages/api/newsletter/[collection]/subscribe.ts +4 -4
- package/apps/storefront/src/pages/api/newsletter/confirm.ts +2 -2
- package/apps/storefront/src/pages/api/newsletter/unsubscribe.ts +2 -2
- package/apps/storefront/src/pages/api/rum/vitals.ts +1 -1
- package/apps/storefront/src/pages/api/tracking/interaction.ts +6 -6
- package/apps/storefront/src/pages/blog/[slug].astro +2 -2
- package/apps/storefront/src/pages/blog/author/[author].astro +8 -8
- package/apps/storefront/src/pages/blog/category/[category].astro +8 -8
- package/apps/storefront/src/pages/blog/index.astro +4 -4
- package/apps/storefront/src/pages/blog/page/[n].astro +4 -4
- package/apps/storefront/src/pages/blog/tag/[tag].astro +8 -8
- package/apps/storefront/src/pages/cart.ts +1 -1
- package/apps/storefront/src/pages/collections/[handle].astro +12 -12
- package/apps/storefront/src/pages/collections/index.astro +6 -6
- package/apps/storefront/src/pages/index.astro +14 -14
- package/apps/storefront/src/pages/llms.txt.ts +3 -3
- package/apps/storefront/src/pages/products/[handle].astro +22 -22
- package/apps/storefront/src/pages/saved.astro +2 -2
- package/apps/storefront/src/pages/search.astro +7 -7
- package/apps/storefront/src/pages/sitemap.xml.ts +9 -9
- package/apps/storefront/src/pages/style-guide/[tenant]/[theme].astro +58 -58
- package/apps/storefront/src/pages/style-guide/[tenant]/chrome/[theme].astro +2 -2
- package/apps/storefront/src/pages/style-guide/[tenant]/guide/[theme].astro +3 -3
- package/apps/storefront/src/pages/style-guide/[tenant]/index.astro +3 -3
- package/apps/storefront/src/pages/style-guide/index.astro +1 -1
- package/apps/storefront/src/pages/the-build/[slug].astro +10 -10
- package/apps/storefront/src/pages/the-build/index.astro +5 -5
- package/apps/storefront/src/pages/the-build/page/[n].astro +5 -5
- package/apps/storefront/src/pages/the-build/rss.xml.ts +4 -4
- package/docs/widget-library-guide.md +71 -71
- package/package.json +1 -1
- package/packages/public-runtime/src/chrome.ts +5 -5
- package/packages/public-runtime/src/tracking-id-derivation.ts +1 -1
- /package/apps/storefront/src/components/{commerce → catalog/storefront/commerce}/RatingStars.astro +0 -0
- /package/apps/storefront/src/components/{commerce → catalog/storefront/commerce}/ReviewSummary.astro +0 -0
- /package/apps/storefront/src/components/{commerce → catalog/storefront/commerce}/TagFilterCloud.astro +0 -0
- /package/apps/storefront/src/components/{plp → catalog/storefront/plp}/ActiveFilters.astro +0 -0
- /package/apps/storefront/src/components/{plp → catalog/storefront/plp}/Pagination.astro +0 -0
- /package/apps/storefront/src/components/{plp → catalog/storefront/plp}/SortSelect.astro +0 -0
- /package/apps/storefront/src/components/{commerce → checkout/storefront/commerce}/CartDrawerStyles.astro +0 -0
- /package/apps/storefront/src/components/{commerce → checkout/storefront/commerce}/CheckoutLoader.astro +0 -0
- /package/apps/storefront/src/components/compliance/{AdultSignatureNotice.astro → storefront/compliance/AdultSignatureNotice.astro} +0 -0
- /package/apps/storefront/src/components/compliance/{ComplianceNotice.astro → storefront/compliance/ComplianceNotice.astro} +0 -0
- /package/apps/storefront/src/components/compliance/{ExciseTaxNotice.astro → storefront/compliance/ExciseTaxNotice.astro} +0 -0
- /package/apps/storefront/src/components/compliance/{PactActNotice.astro → storefront/compliance/PactActNotice.astro} +0 -0
- /package/apps/storefront/src/components/compliance/{Prop65Warning.astro → storefront/compliance/Prop65Warning.astro} +0 -0
- /package/apps/storefront/src/components/compliance/{PurchaseLimitNotice.astro → storefront/compliance/PurchaseLimitNotice.astro} +0 -0
- /package/apps/storefront/src/components/compliance/{ShippingRestrictionNotice.astro → storefront/compliance/ShippingRestrictionNotice.astro} +0 -0
- /package/apps/storefront/src/components/compliance/{StateEligibilityNotice.astro → storefront/compliance/StateEligibilityNotice.astro} +0 -0
- /package/apps/storefront/src/components/{Badge.astro → content/storefront/Badge.astro} +0 -0
- /package/apps/storefront/src/components/{EmptyState.astro → content/storefront/EmptyState.astro} +0 -0
- /package/apps/storefront/src/components/{Section.astro → content/storefront/Section.astro} +0 -0
- /package/apps/storefront/src/components/{chrome → content/storefront/chrome}/AnnouncementBar.astro +0 -0
- /package/apps/storefront/src/components/{commerce → content/storefront/commerce}/ArticleCard.astro +0 -0
- /package/apps/storefront/src/components/content/{NeedsReviewCallout.astro → storefront/content/NeedsReviewCallout.astro} +0 -0
- /package/apps/storefront/src/components/content/{ProseToc.astro → storefront/content/ProseToc.astro} +0 -0
- /package/apps/storefront/src/components/content/{RichText.astro → storefront/content/RichText.astro} +0 -0
- /package/apps/storefront/src/components/content/{TrustStrip.astro → storefront/content/TrustStrip.astro} +0 -0
- /package/apps/storefront/src/lib/{admin → catalog/admin}/catalogSettingsPreview.ts +0 -0
- /package/apps/storefront/src/lib/{admin → catalog/admin}/catalogSettingsState.ts +0 -0
- /package/apps/storefront/src/lib/{admin → catalog/admin}/productSetupPhoto.ts +0 -0
- /package/apps/storefront/src/lib/{admin → catalog/admin}/productsTabClient.ts +0 -0
- /package/apps/storefront/src/lib/{admin → catalog/admin}/viewmodels/catalogProducts.ts +0 -0
- /package/apps/storefront/src/lib/{admin → catalog/admin}/viewmodels/products.ts +0 -0
- /package/apps/storefront/src/lib/{fixtures → catalog/fixtures}/sampleProducts.ts +0 -0
- /package/apps/storefront/src/lib/{tot → catalog/tot}/d1Client.ts +0 -0
- /package/apps/storefront/src/lib/{tot → catalog/tot}/totClientInterface.ts +0 -0
- /package/apps/storefront/src/lib/{admin → checkout/admin}/checkoutStyleInput.ts +0 -0
- /package/apps/storefront/src/lib/{admin → checkout/admin}/checkoutStyleTarget.ts +0 -0
- /package/apps/storefront/src/{components/islands → lib/checkout/browser}/useCheckoutHandoffCorrelation.ts +0 -0
- /package/apps/storefront/src/lib/{commerce → checkout/commerce}/checkoutHandoffCorrelation.ts +0 -0
- /package/apps/storefront/src/lib/{commerce → checkout/commerce}/checkoutSettings.ts +0 -0
- /package/apps/storefront/src/lib/{commerce → checkout/commerce}/finalCartAuthorization.ts +0 -0
- /package/apps/storefront/src/lib/{checkoutCommerce.ts → checkout/shared/checkoutCommerce.ts} +0 -0
- /package/apps/storefront/src/{components/islands → lib/compliance/browser}/checkoutVerificationFlow.ts +0 -0
- /package/apps/storefront/src/lib/{visitorRegionCookie.ts → compliance/shared/visitorRegionCookie.ts} +0 -0
- /package/apps/storefront/src/lib/{verification → compliance/verification}/totVerificationClient.ts +0 -0
- /package/apps/storefront/src/lib/{blog → content/blog}/access.ts +0 -0
- /package/apps/storefront/src/lib/{blog → content/blog}/collectionPaths.ts +0 -0
- /package/apps/storefront/src/lib/{blog → content/blog}/markdown.ts +0 -0
- /package/apps/storefront/src/lib/{blog → content/blog}/pagination.ts +0 -0
- /package/apps/storefront/src/lib/{blog → content/blog}/presentation.ts +0 -0
- /package/apps/storefront/src/lib/{blog → content/blog}/reactions.ts +0 -0
- /package/apps/storefront/src/lib/{blog → content/blog}/rss.ts +0 -0
- /package/apps/storefront/src/lib/{blog → content/blog}/teaser.ts +0 -0
- /package/apps/storefront/src/lib/{blog → content/blog}/types.ts +0 -0
- /package/apps/storefront/src/lib/{blog → content/blog}/viewCounts.ts +0 -0
- /package/apps/storefront/src/lib/{chrome → content/chrome}/ctaIdentity.ts +0 -0
- /package/apps/storefront/src/lib/{chrome → content/chrome}/examples/tokenoftrust.chrome-assignments.example.json +0 -0
- /package/apps/storefront/src/lib/{chrome → content/chrome}/examples/tokenoftrust.chrome.example.json +0 -0
- /package/apps/storefront/src/lib/{chrome → content/chrome}/managedCart.ts +0 -0
- /package/apps/storefront/src/lib/{chrome → content/chrome}/model.ts +0 -0
- /package/apps/storefront/src/lib/{chrome → content/chrome}/navCurrent.ts +0 -0
- /package/apps/storefront/src/lib/{chrome → content/chrome}/newsletterAgeAttestation.ts +0 -0
- /package/apps/storefront/src/lib/{chrome → content/chrome}/parseConfig.ts +0 -0
- /package/apps/storefront/src/lib/{chrome → content/chrome}/variant.ts +0 -0
- /package/apps/storefront/src/lib/{commerce → content/policies}/shippingPolicy.ts +0 -0
- /package/apps/storefront/src/lib/{seo → content/seo}/alternates.ts +0 -0
- /package/apps/storefront/src/lib/{seo → content/seo}/documentTitle.ts +0 -0
- /package/apps/storefront/src/lib/{seo → content/seo}/meta.ts +0 -0
- /package/apps/storefront/src/lib/{seo → content/seo}/urlForm.ts +0 -0
- /package/apps/storefront/src/lib/{asyncCss.ts → content/shared/asyncCss.ts} +0 -0
- /package/apps/storefront/src/lib/{colors.ts → content/shared/colors.ts} +0 -0
- /package/apps/storefront/src/lib/{format.ts → content/shared/format.ts} +0 -0
- /package/apps/storefront/src/lib/{i18n.ts → content/shared/i18n.ts} +0 -0
- /package/apps/storefront/src/lib/{jsonScript.ts → content/shared/jsonScript.ts} +0 -0
- /package/apps/storefront/src/lib/{placeholder.ts → content/shared/placeholder.ts} +0 -0
- /package/apps/storefront/src/lib/{styleGuidePaths.ts → content/shared/styleGuidePaths.ts} +0 -0
- /package/apps/storefront/src/lib/{the-build → content/the-build}/pagination.ts +0 -0
- /package/apps/storefront/src/lib/{the-build → content/the-build}/readingTime.ts +0 -0
- /package/apps/storefront/src/lib/{messaging → engagement/messaging}/messagesClient.ts +0 -0
- /package/apps/storefront/src/lib/{newsletter → engagement/newsletter}/confirmationEmail.ts +0 -0
- /package/apps/storefront/src/lib/{newsletter → engagement/newsletter}/consent.ts +0 -0
- /package/apps/storefront/src/lib/{admin → measurement/admin}/consentSettingsClient.ts +0 -0
- /package/apps/storefront/src/lib/{analytics → measurement/analytics}/index.ts +0 -0
- /package/apps/storefront/src/lib/{tracking → measurement/tracking}/collectorAllowlist.ts +0 -0
- /package/apps/storefront/src/lib/{tracking → measurement/tracking}/collectorIngest.ts +0 -0
- /package/apps/storefront/src/lib/{tracking → measurement/tracking}/interactionHealth.ts +0 -0
- /package/apps/storefront/src/lib/{tracking → measurement/tracking}/interactionSchema.ts +0 -0
- /package/apps/storefront/src/lib/{tracking → measurement/tracking}/tenantReadAccess.ts +0 -0
- /package/apps/storefront/src/lib/{tracking-writeback → measurement/tracking-writeback}/rewriteTrackingIds.ts +0 -0
- /package/apps/storefront/src/lib/{tracking-writeback → measurement/tracking-writeback}/writebackCandidate.ts +0 -0
- /package/apps/storefront/src/lib/{admin → orders/admin}/orderClient.ts +0 -0
- /package/apps/storefront/src/lib/{admin → orders/admin}/services/orders.ts +0 -0
- /package/apps/storefront/src/lib/{admin → orders/admin}/viewmodels/orders.ts +0 -0
- /package/apps/storefront/src/lib/{apps/orders → orders/providers}/foxyOrderClient.ts +0 -0
- /package/apps/storefront/src/lib/{admin → subscriptions/admin}/viewmodels/subscriptions.ts +0 -0
- /package/apps/storefront/src/lib/{subscription → subscriptions/subscription}/model.ts +0 -0
|
@@ -101,7 +101,7 @@ export interface CatalogSyncState {
|
|
|
101
101
|
// document, so the Worker has no runtime filesystem dependency — same pattern
|
|
102
102
|
// as productGlobs/collectionGlobs/reviewGlobs in ToTClient.ts.
|
|
103
103
|
const syncStateGlobs = import.meta.glob<CatalogSyncState>(
|
|
104
|
-
"
|
|
104
|
+
"../../../../../../packages/migration/out/catalog/*/sync-state.json",
|
|
105
105
|
{ import: "default" },
|
|
106
106
|
);
|
|
107
107
|
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
readCatalogListing,
|
|
27
27
|
type CatalogStore,
|
|
28
28
|
} from "@tot/public-runtime/catalog-files";
|
|
29
|
-
import { LocalContentProvider, type ContentProvider } from "
|
|
29
|
+
import { LocalContentProvider, type ContentProvider } from "../../content/storyblok/provider.js";
|
|
30
30
|
|
|
31
31
|
export type CatalogArtifactSource = Pick<
|
|
32
32
|
ContentProvider,
|
package/apps/storefront/src/lib/{admin/services/mock → checkout/fixtures}/checkoutSettings.ts
RENAMED
|
@@ -18,13 +18,13 @@ import { resolveManagedCheckout } from "@tot/public-runtime";
|
|
|
18
18
|
import type { TenantConfig } from "@tot/public-runtime";
|
|
19
19
|
import { referenceTheme } from "@/themes/reference";
|
|
20
20
|
import { mergeTheme } from "@/themes/schema";
|
|
21
|
-
import type { AdminTenantEnvelope } from "../../envelope";
|
|
21
|
+
import type { AdminTenantEnvelope } from "../../admin/envelope";
|
|
22
22
|
import {
|
|
23
23
|
buildCheckoutSettingsFields,
|
|
24
24
|
deriveCheckoutSettings,
|
|
25
25
|
type CheckoutSettingsOverrides,
|
|
26
26
|
type CheckoutSettingsField,
|
|
27
|
-
} from "@/lib/commerce/checkoutSettings";
|
|
27
|
+
} from "@/lib/checkout/commerce/checkoutSettings";
|
|
28
28
|
|
|
29
29
|
export interface CheckoutSettingsViewModel {
|
|
30
30
|
targetTenant: string;
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "@tot/public-runtime";
|
|
7
7
|
import type { AuthorBio, BlogPost, BlogPostSummary, BlogSettings, PostStatus } from "./types.js";
|
|
8
8
|
import type { ContentProvider } from "../storyblok/provider.js";
|
|
9
|
-
import { readEnv } from "
|
|
9
|
+
import { readEnv } from "../../env.js";
|
|
10
10
|
|
|
11
11
|
type ArtifactSource = Pick<ContentProvider, "readArtifact" | "listArtifactPaths">;
|
|
12
12
|
function canReadArtifacts(value: ArtifactSource | undefined): value is ArtifactSource {
|
|
@@ -29,29 +29,29 @@ export interface Collection {
|
|
|
29
29
|
// is the set of `posts/*.json` files — there is no hand-maintained index.json.
|
|
30
30
|
const postGlobs = import.meta.glob<BlogPost>(
|
|
31
31
|
[
|
|
32
|
-
"
|
|
33
|
-
"
|
|
32
|
+
"../../../../../../tenants/*/content/*/posts/*.json",
|
|
33
|
+
"../../../../../../tenants/e2e/*/content/*/posts/*.json",
|
|
34
34
|
],
|
|
35
35
|
{ import: "default" },
|
|
36
36
|
);
|
|
37
37
|
const redirectGlobs = import.meta.glob<Record<string, string>>(
|
|
38
38
|
[
|
|
39
|
-
"
|
|
40
|
-
"
|
|
39
|
+
"../../../../../../tenants/*/content/*/redirects.json",
|
|
40
|
+
"../../../../../../tenants/e2e/*/content/*/redirects.json",
|
|
41
41
|
],
|
|
42
42
|
{ import: "default" },
|
|
43
43
|
);
|
|
44
44
|
const authorsGlobs = import.meta.glob<Record<string, AuthorBio>>(
|
|
45
45
|
[
|
|
46
|
-
"
|
|
47
|
-
"
|
|
46
|
+
"../../../../../../tenants/*/content/*/authors.json",
|
|
47
|
+
"../../../../../../tenants/e2e/*/content/*/authors.json",
|
|
48
48
|
],
|
|
49
49
|
{ import: "default" },
|
|
50
50
|
);
|
|
51
51
|
const settingsGlobs = import.meta.glob<BlogSettings>(
|
|
52
52
|
[
|
|
53
|
-
"
|
|
54
|
-
"
|
|
53
|
+
"../../../../../../tenants/*/content/*/settings.json",
|
|
54
|
+
"../../../../../../tenants/e2e/*/content/*/settings.json",
|
|
55
55
|
],
|
|
56
56
|
{ import: "default" },
|
|
57
57
|
);
|
|
@@ -15,12 +15,12 @@ import {
|
|
|
15
15
|
type BlogPresentation,
|
|
16
16
|
type ShareLink,
|
|
17
17
|
} from "./presentation.js";
|
|
18
|
-
import { homeCrumbLabel, siteTrail, type Crumb } from "@/lib/breadcrumbs.js";
|
|
18
|
+
import { homeCrumbLabel, siteTrail, type Crumb } from "@/lib/content/shared/breadcrumbs.js";
|
|
19
19
|
import { viewerHasBlogAccess } from "./access.js";
|
|
20
20
|
import { articleBodyHtml } from "./teaser.js";
|
|
21
21
|
import { readViewerSession, safeNext } from "@/lib/auth/route.js";
|
|
22
|
-
import { buildAlternates, type Alternate } from "@/lib/seo/alternates.js";
|
|
23
|
-
import { breadcrumbLd, blogPostingLd } from "@/lib/jsonld.js";
|
|
22
|
+
import { buildAlternates, type Alternate } from "@/lib/content/seo/alternates.js";
|
|
23
|
+
import { breadcrumbLd, blogPostingLd } from "@/lib/content/shared/jsonld.js";
|
|
24
24
|
import { collectionPathsV1, blogPathOptsV1 } from "./collectionPaths.js";
|
|
25
25
|
import type { BlogPost } from "./types.js";
|
|
26
26
|
import type { SessionRecord } from "@/lib/auth/session.js";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
import { getIndexSettings, listPosts } from "./collection.js";
|
|
14
14
|
import type { BlogPost, BlogPostSummary, BlogSettings } from "./types.js";
|
|
15
15
|
import type { ContentProvider } from "../storyblok/provider.js";
|
|
16
|
-
import { readEnv } from "
|
|
16
|
+
import { readEnv } from "../../env.js";
|
|
17
17
|
|
|
18
18
|
/** The collection id `/blog` reads — the derived fallback's second argument. */
|
|
19
19
|
const BLOG_COLLECTION = "blog";
|
|
@@ -34,22 +34,22 @@ async function visibilityTimestamp(explicit?: string | null): Promise<string | n
|
|
|
34
34
|
// tenant's keys back up.
|
|
35
35
|
const indexGlobs = import.meta.glob<BlogPostSummary[]>(
|
|
36
36
|
[
|
|
37
|
-
"
|
|
38
|
-
"
|
|
37
|
+
"../../../../../../tenants/*/content/blog/index.json",
|
|
38
|
+
"../../../../../../tenants/e2e/*/content/blog/index.json",
|
|
39
39
|
],
|
|
40
40
|
{ import: "default" },
|
|
41
41
|
);
|
|
42
42
|
const postGlobs = import.meta.glob<BlogPost>(
|
|
43
43
|
[
|
|
44
|
-
"
|
|
45
|
-
"
|
|
44
|
+
"../../../../../../tenants/*/content/blog/posts/*.json",
|
|
45
|
+
"../../../../../../tenants/e2e/*/content/blog/posts/*.json",
|
|
46
46
|
],
|
|
47
47
|
{ import: "default" },
|
|
48
48
|
);
|
|
49
49
|
const redirectGlobs = import.meta.glob<Record<string, string>>(
|
|
50
50
|
[
|
|
51
|
-
"
|
|
52
|
-
"
|
|
51
|
+
"../../../../../../tenants/*/content/blog/redirects.json",
|
|
52
|
+
"../../../../../../tenants/e2e/*/content/blog/redirects.json",
|
|
53
53
|
],
|
|
54
54
|
{ import: "default" },
|
|
55
55
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The footer's Legal split — ONE source of truth for both renderers (the
|
|
3
|
-
* raw-string footer in lib/rawChrome.ts and the component footer in
|
|
4
|
-
* components/chrome/SiteFooter.astro), so a tenant's `Legal` column can never
|
|
3
|
+
* raw-string footer in lib/content/shared/rawChrome.ts and the component footer in
|
|
4
|
+
* components/content/storefront/chrome/SiteFooter.astro), so a tenant's `Legal` column can never
|
|
5
5
|
* land in the grid on one surface and in the bottom bar on the other.
|
|
6
6
|
*
|
|
7
7
|
* Contract, title-based (no extra schema field): a footer column titled
|
|
@@ -26,7 +26,7 @@ export const CHROME_PLACEMENT = {
|
|
|
26
26
|
/**
|
|
27
27
|
* Footer bottom legal/policy link row, on either surface — the links of a
|
|
28
28
|
* `Legal`-titled footer column, which both renderers move out of the grid and
|
|
29
|
-
* into the bottom bar (lib/chrome/footerLegal.ts). `ChromeFooter.bottom`
|
|
29
|
+
* into the bottom bar (lib/content/chrome/footerLegal.ts). `ChromeFooter.bottom`
|
|
30
30
|
* itself carries text only.
|
|
31
31
|
*/
|
|
32
32
|
footerBottom: "footer-bottom",
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* trust strip. Re-exported here alongside the tier/comparison contracts already
|
|
8
8
|
* defined in lib/membership/model, so a membership page and a policy page
|
|
9
9
|
* import from the same place. (The <BrandGrid> `Brand` contract lives with its
|
|
10
|
-
* component in components/commerce/BrandGrid.astro.)
|
|
10
|
+
* component in components/catalog/storefront/commerce/BrandGrid.astro.)
|
|
11
11
|
*/
|
|
12
12
|
export * from "./richtext.js";
|
|
13
13
|
export * from "./callout.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The question/answer pairs a page visibly carries, for a declared FAQPage node
|
|
3
|
-
* (lib/seo/structuredData.ts). Derived from the rendered content itself, so the markup can never
|
|
3
|
+
* (lib/content/seo/structuredData.ts). Derived from the rendered content itself, so the markup can never
|
|
4
4
|
* claim an answer the page does not show: a heading phrased as a question, answered by the text
|
|
5
5
|
* up to the next heading. Fewer than two pairs is not an FAQ.
|
|
6
6
|
*/
|
|
@@ -16,7 +16,7 @@ import type {
|
|
|
16
16
|
StructuredDataPageType,
|
|
17
17
|
TenantConfig,
|
|
18
18
|
} from "@tot/public-runtime";
|
|
19
|
-
import { productLd } from "../jsonld.js";
|
|
19
|
+
import { productLd } from "../shared/jsonld.js";
|
|
20
20
|
import { pageUrlForm } from "./urlForm.js";
|
|
21
21
|
|
|
22
22
|
type Node = Record<string, unknown>;
|
|
@@ -12,7 +12,7 @@ import type {
|
|
|
12
12
|
MembershipBandBlock,
|
|
13
13
|
NewsletterBlock,
|
|
14
14
|
PromoTilesBlock,
|
|
15
|
-
} from "@/lib/storyblok/content-model";
|
|
15
|
+
} from "@/lib/content/storyblok/content-model";
|
|
16
16
|
|
|
17
17
|
export type CommerceStaticResolved =
|
|
18
18
|
| { kind: "promo_tiles"; block: PromoTilesBlock }
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* BreadcrumbList, Organization. Kept pure so pages compose them and pass to <Seo>.
|
|
4
4
|
*/
|
|
5
5
|
import type { CatalogProduct, Review, TenantConfig } from "@tot/public-runtime";
|
|
6
|
-
import { isAvailable } from "
|
|
6
|
+
import { isAvailable } from "../../catalog/tot/query.js";
|
|
7
7
|
|
|
8
8
|
export function organizationLd(tenant: TenantConfig, base: string) {
|
|
9
9
|
// Logo sourced from the migrated brand assets (og image / logo), so the
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
* Canonical RAW chrome renderer.
|
|
3
3
|
*
|
|
4
4
|
* ONE platform-shipped chrome wrapper, driven entirely by a tenant's `chrome.json`
|
|
5
|
-
* (typed `ChromeConfig`, lib/chrome/model.ts) — CONTENT ONLY. It replaces the three
|
|
5
|
+
* (typed `ChromeConfig`, lib/content/chrome/model.ts) — CONTENT ONLY. It replaces the three
|
|
6
6
|
* divergent, hand-authored `content/<tenant>/chrome.html` documents with a single
|
|
7
7
|
* generator, so chrome lives in ONE place and a tenant supplies only data. The
|
|
8
8
|
* output is a full wrapper document carrying the splice markers the rawMarketingHtml
|
|
9
9
|
* pipeline understands (`<!--PAGE_HEAD-->` / `<!--PAGE_BODY-->`), so body-only page
|
|
10
|
-
* fragments get wrapped exactly as before (see lib/rawMarketingHtml.ts,
|
|
10
|
+
* fragments get wrapped exactly as before (see lib/content/shared/rawMarketingHtml.ts,
|
|
11
11
|
* wrapFragmentInChrome). Two governing constraints:
|
|
12
12
|
* - Single stylesheet: the wrapper LINKS the platform stylesheet
|
|
13
13
|
* (/shared/commerce-chrome.css) and emits NO inline chrome CSS — every
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
* defense-in-depth, not a sanitizer for untrusted input.
|
|
26
26
|
*/
|
|
27
27
|
import { CHROME_BODY_MARKER, CHROME_HEAD_MARKER } from "./rawMarketingHtml.js";
|
|
28
|
-
import { isCurrentNavHref } from "
|
|
29
|
-
import { ctaIdentityAttr } from "
|
|
30
|
-
import { CHROME_PLACEMENT } from "
|
|
31
|
-
import { LEGAL_NAV_LABEL, splitFooterLegal } from "
|
|
32
|
-
import { resolveNewsletterAgeAttestation } from "
|
|
28
|
+
import { isCurrentNavHref } from "../chrome/navCurrent.js";
|
|
29
|
+
import { ctaIdentityAttr } from "../chrome/ctaIdentity.js";
|
|
30
|
+
import { CHROME_PLACEMENT } from "../chrome/trackingPlacements.js";
|
|
31
|
+
import { LEGAL_NAV_LABEL, splitFooterLegal } from "../chrome/footerLegal.js";
|
|
32
|
+
import { resolveNewsletterAgeAttestation } from "../chrome/newsletterAgeAttestation.js";
|
|
33
33
|
import { trackingAttributesHtml } from "@tot/public-runtime";
|
|
34
34
|
import type {
|
|
35
35
|
ChromeAgeGate,
|
|
@@ -46,9 +46,9 @@ import type {
|
|
|
46
46
|
ChromeUtilityNav,
|
|
47
47
|
HeaderVariant,
|
|
48
48
|
SocialLink,
|
|
49
|
-
} from "
|
|
50
|
-
import { isSafeAgeGateHref, resolveAgeGateCopy, resolveChromeAssignment } from "
|
|
51
|
-
import { resolveHeaderVariant } from "
|
|
49
|
+
} from "../chrome/model.js";
|
|
50
|
+
import { isSafeAgeGateHref, resolveAgeGateCopy, resolveChromeAssignment } from "../chrome/model.js";
|
|
51
|
+
import { resolveHeaderVariant } from "../chrome/variant.js";
|
|
52
52
|
|
|
53
53
|
/** HTML-escape text/attribute content. Covers the five significant characters. */
|
|
54
54
|
function esc(value: string): string {
|
|
@@ -295,7 +295,7 @@ function renderSearchForm(search: ChromeSearch, inMenu = false): string {
|
|
|
295
295
|
|
|
296
296
|
/**
|
|
297
297
|
* Labelled header action links, in authored order. A `kind: "cart"` link carries
|
|
298
|
-
* the `cart` class, so bindManagedCartAnchors (lib/chrome/managedCart.ts) binds it
|
|
298
|
+
* the `cart` class, so bindManagedCartAnchors (lib/content/chrome/managedCart.ts) binds it
|
|
299
299
|
* to the managed checkout exactly like the icon cart.
|
|
300
300
|
*/
|
|
301
301
|
function renderActionLinks(links: ChromeHeaderActionLink[]): string {
|
|
@@ -431,7 +431,7 @@ function renderHeader(header: ChromeHeader, variant: HeaderVariant, currentPath?
|
|
|
431
431
|
/**
|
|
432
432
|
* Age-gate config, embedded as JSON. The CHROME_BEHAVIOR_JS mechanism
|
|
433
433
|
* reads this and builds the dialog itself inside a closed shadow root — the same
|
|
434
|
-
* tamper-resistance pattern components/islands/IsolatedAgeGate.tsx uses for
|
|
434
|
+
* tamper-resistance pattern components/compliance/storefront/islands/IsolatedAgeGate.tsx uses for
|
|
435
435
|
* component pages (see its header comment). `<` is escaped so an authored value
|
|
436
436
|
* can't close the tag early.
|
|
437
437
|
*/
|
|
@@ -526,7 +526,7 @@ function renderFooter(footer: ChromeFooter): string {
|
|
|
526
526
|
return ` <div class="footer-brand">${logo}${text}${news}</div>\n`;
|
|
527
527
|
})()
|
|
528
528
|
: "";
|
|
529
|
-
// A `Legal`-titled column moves to the bottom bar (lib/chrome/footerLegal.ts)
|
|
529
|
+
// A `Legal`-titled column moves to the bottom bar (lib/content/chrome/footerLegal.ts)
|
|
530
530
|
// — scope indices count RENDERED grid columns, so they describe where a link
|
|
531
531
|
// actually is rather than where it sat in the authored array.
|
|
532
532
|
const { gridColumns, legalLinks } = splitFooterLegal(footer.columns);
|
|
@@ -683,7 +683,7 @@ export const CHROME_BEHAVIOR_JS = `(function () {
|
|
|
683
683
|
}
|
|
684
684
|
|
|
685
685
|
// 21+ age gate — shadow-isolated. Only the host <div> lives in light
|
|
686
|
-
// DOM (data-tot-compliance, the same marker components/islands/IsolatedAgeGate.tsx
|
|
686
|
+
// DOM (data-tot-compliance, the same marker components/compliance/storefront/islands/IsolatedAgeGate.tsx
|
|
687
687
|
// uses); its contents sit behind a closed shadow root, so tenant CSS/JS can't
|
|
688
688
|
// select, restyle, or hide the dialog. A MutationObserver re-asserts the host the
|
|
689
689
|
// same way that component does. Config comes from the validated ChromeAgeGate
|
|
@@ -22,9 +22,9 @@ import {
|
|
|
22
22
|
type EffectivePlan,
|
|
23
23
|
type ConsentSnapshot,
|
|
24
24
|
} from "@tot/public-runtime";
|
|
25
|
-
import { reportTrackingChainHealth } from "
|
|
25
|
+
import { reportTrackingChainHealth } from "../../measurement/tracking/interactionHealth.js";
|
|
26
26
|
import { ASYNC_CSS_SWAP_JS } from "./asyncCss.js";
|
|
27
|
-
import { ROOT_SERVED_HREF_NAMESPACES } from "
|
|
27
|
+
import { ROOT_SERVED_HREF_NAMESPACES } from "../../basePath.js";
|
|
28
28
|
|
|
29
29
|
export { rawHtmlPolicy } from "@tot/public-runtime";
|
|
30
30
|
|
|
@@ -139,7 +139,7 @@ export function interactionTrackingScript(nonce: string): string {
|
|
|
139
139
|
/**
|
|
140
140
|
* Swaps every `data-async-css`-tagged `<link rel="preload">` to
|
|
141
141
|
* `rel="stylesheet"` once fetched — the raw-mount half of the
|
|
142
|
-
* `<AsyncStylesheet>` primitive (lib/asyncCss.ts; Layout.astro is the other,
|
|
142
|
+
* `<AsyncStylesheet>` primitive (lib/content/shared/asyncCss.ts; Layout.astro is the other,
|
|
143
143
|
* same one-engine-two-mounts discipline as {@link interactionTrackingScript}).
|
|
144
144
|
* A raw-HTML tenant hand-authors the plain `<link rel="preload" as="style"
|
|
145
145
|
* data-async-css>` + `<noscript>` markup directly (no Astro component
|
|
@@ -16,8 +16,8 @@ import {
|
|
|
16
16
|
type CatalogProduct,
|
|
17
17
|
type ProductSectionSource,
|
|
18
18
|
} from "@tot/public-runtime";
|
|
19
|
-
import type { ToTClient } from "@/lib/tot/ToTClient";
|
|
20
|
-
import { isOnSale } from "@/lib/tot/query";
|
|
19
|
+
import type { ToTClient } from "@/lib/catalog/tot/ToTClient";
|
|
20
|
+
import { isOnSale } from "@/lib/catalog/tot/query";
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Where a merchandising section gets its products. Exactly one shape per source.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { tenantDirSegment } from "@tot/public-runtime";
|
|
2
|
-
import type { ContentProvider } from "@/lib/storyblok/provider";
|
|
2
|
+
import type { ContentProvider } from "@/lib/content/storyblok/provider";
|
|
3
3
|
|
|
4
4
|
export type StyleGuideTheme = Record<string, unknown> & {
|
|
5
5
|
id: string;
|
|
@@ -11,8 +11,8 @@ export type StyleGuideTheme = Record<string, unknown> & {
|
|
|
11
11
|
|
|
12
12
|
const localThemeModules = import.meta.glob<Record<string, unknown>>(
|
|
13
13
|
[
|
|
14
|
-
"
|
|
15
|
-
"
|
|
14
|
+
"../../../../../../tenants/*/content/themes/*.json",
|
|
15
|
+
"../../../../../../tenants/e2e/*/content/themes/*.json",
|
|
16
16
|
],
|
|
17
17
|
{ eager: true, import: "default" },
|
|
18
18
|
);
|
|
@@ -354,6 +354,6 @@ export interface EditorialPage {
|
|
|
354
354
|
}
|
|
355
355
|
|
|
356
356
|
// Site chrome (header/footer) is the ONE consolidated schema in
|
|
357
|
-
// lib/chrome/model.ts (`ChromeConfig`) — see that file's header comment for
|
|
357
|
+
// lib/content/chrome/model.ts (`ChromeConfig`) — see that file's header comment for
|
|
358
358
|
// why the old `SiteChrome`/`SiteNavItem` pair that used to live here was
|
|
359
359
|
// retired.
|
|
@@ -33,10 +33,10 @@ import {
|
|
|
33
33
|
tenantDirRelative,
|
|
34
34
|
tenantDirSegment,
|
|
35
35
|
} from "@tot/public-runtime";
|
|
36
|
-
import { renderRawChrome } from "../rawChrome.js";
|
|
36
|
+
import { renderRawChrome } from "../shared/rawChrome.js";
|
|
37
37
|
import { parseChromeConfig } from "../chrome/parseConfig.js";
|
|
38
38
|
import { parseChromeAssignments } from "../chrome/model.js";
|
|
39
|
-
import { stampTrackingIdsAtPublish } from "
|
|
39
|
+
import { stampTrackingIdsAtPublish } from "../../measurement/tracking/publishSafetyNet.js";
|
|
40
40
|
import { readWithImagePreviewRewriteOverlay } from "@tot/public-runtime/image-preview-rewrite-overlay";
|
|
41
41
|
|
|
42
42
|
/** Safe, always-valid fallback when neither the tenant's own chrome.json nor
|
|
@@ -67,7 +67,7 @@ export interface ContentProvider {
|
|
|
67
67
|
/**
|
|
68
68
|
* The tenant's shared-chrome WRAPPER document (raw HTML), or null. A full
|
|
69
69
|
* document containing the CHROME_BODY_MARKER where a body-only page fragment is
|
|
70
|
-
* spliced in (see lib/rawMarketingHtml.ts). Lets raw pages stop duplicating
|
|
70
|
+
* spliced in (see lib/content/shared/rawMarketingHtml.ts). Lets raw pages stop duplicating
|
|
71
71
|
* chrome: chrome lives once here, pages become fragments. File:
|
|
72
72
|
* `content/<tenant>/chrome.html`. Tenant-owned (no cross-tenant fallback).
|
|
73
73
|
*
|
|
@@ -110,17 +110,17 @@ export interface DerivedArtifact {
|
|
|
110
110
|
// Per-tenant local content lives under the colocated repo-root layout
|
|
111
111
|
// tenants/<tenant_id>/content/. Vite globs bundle every tenant's JSON at build
|
|
112
112
|
// time; a file missing for a tenant falls back to the default scope, so a
|
|
113
|
-
// partially-adopted tenant still renders. Depth: from src/lib/storyblok/ the
|
|
114
|
-
// repo root is
|
|
113
|
+
// partially-adopted tenant still renders. Depth: from src/lib/content/storyblok/ the
|
|
114
|
+
// repo root is six levels up (storyblok→content→lib→src→storefront→apps→root).
|
|
115
115
|
const homeGlobs = import.meta.glob<HomeContent>([
|
|
116
|
-
"
|
|
117
|
-
"
|
|
116
|
+
"../../../../../../tenants/*/content/home.json",
|
|
117
|
+
"../../../../../../tenants/e2e/*/content/home.json",
|
|
118
118
|
], {
|
|
119
119
|
import: "default",
|
|
120
120
|
});
|
|
121
121
|
const chromeGlobs = import.meta.glob<unknown>([
|
|
122
|
-
"
|
|
123
|
-
"
|
|
122
|
+
"../../../../../../tenants/*/content/chrome.json",
|
|
123
|
+
"../../../../../../tenants/e2e/*/content/chrome.json",
|
|
124
124
|
], {
|
|
125
125
|
import: "default",
|
|
126
126
|
});
|
|
@@ -129,22 +129,22 @@ const chromeGlobs = import.meta.glob<unknown>([
|
|
|
129
129
|
// convention as chromeGlobs above.
|
|
130
130
|
const chromeAssignmentGlobs = import.meta.glob<unknown>(
|
|
131
131
|
[
|
|
132
|
-
"
|
|
133
|
-
"
|
|
132
|
+
"../../../../../../tenants/*/content/chrome-assignments.json",
|
|
133
|
+
"../../../../../../tenants/e2e/*/content/chrome-assignments.json",
|
|
134
134
|
],
|
|
135
135
|
{ import: "default" },
|
|
136
136
|
);
|
|
137
137
|
const pageGlobs = import.meta.glob<EditorialPage>([
|
|
138
|
-
"
|
|
139
|
-
"
|
|
138
|
+
"../../../../../../tenants/*/content/pages/*.json",
|
|
139
|
+
"../../../../../../tenants/e2e/*/content/pages/*.json",
|
|
140
140
|
], {
|
|
141
141
|
import: "default",
|
|
142
142
|
});
|
|
143
143
|
// Raw self-authored home documents (marketing tenants). `?raw` bundles the file
|
|
144
144
|
// as a string; a tenant with no home.html simply has no entry here.
|
|
145
145
|
const homeHtmlGlobs = import.meta.glob<string>([
|
|
146
|
-
"
|
|
147
|
-
"
|
|
146
|
+
"../../../../../../tenants/*/content/home.html",
|
|
147
|
+
"../../../../../../tenants/e2e/*/content/home.html",
|
|
148
148
|
], {
|
|
149
149
|
query: "?raw",
|
|
150
150
|
import: "default",
|
|
@@ -152,8 +152,8 @@ const homeHtmlGlobs = import.meta.glob<string>([
|
|
|
152
152
|
// Raw self-authored SUBPAGE documents: tenants/<tenant>/content/pages-html/<slug>.html
|
|
153
153
|
// (e.g. pages-html/pricing.html -> /pricing/). `**` supports nested slugs.
|
|
154
154
|
const pageHtmlGlobs = import.meta.glob<string>([
|
|
155
|
-
"
|
|
156
|
-
"
|
|
155
|
+
"../../../../../../tenants/*/content/pages-html/**/*.html",
|
|
156
|
+
"../../../../../../tenants/e2e/*/content/pages-html/**/*.html",
|
|
157
157
|
], {
|
|
158
158
|
query: "?raw",
|
|
159
159
|
import: "default",
|
|
@@ -161,15 +161,15 @@ const pageHtmlGlobs = import.meta.glob<string>([
|
|
|
161
161
|
// Shared-chrome wrapper document (marketing tenants that author body-only page
|
|
162
162
|
// fragments). One per tenant; a tenant without it keeps serving full documents.
|
|
163
163
|
const chromeHtmlGlobs = import.meta.glob<string>([
|
|
164
|
-
"
|
|
165
|
-
"
|
|
164
|
+
"../../../../../../tenants/*/content/chrome.html",
|
|
165
|
+
"../../../../../../tenants/e2e/*/content/chrome.html",
|
|
166
166
|
], {
|
|
167
167
|
query: "?raw",
|
|
168
168
|
import: "default",
|
|
169
169
|
});
|
|
170
170
|
const artifactGlobs = import.meta.glob<string>([
|
|
171
|
-
"
|
|
172
|
-
"
|
|
171
|
+
"../../../../../../tenants/*/content/**/*",
|
|
172
|
+
"../../../../../../tenants/e2e/*/content/**/*",
|
|
173
173
|
], {
|
|
174
174
|
query: "?raw",
|
|
175
175
|
import: "default",
|
|
@@ -251,10 +251,10 @@ async function readRawDevFile(scope: string, relative: string): Promise<string |
|
|
|
251
251
|
import("node:url"),
|
|
252
252
|
import("node:path"),
|
|
253
253
|
]);
|
|
254
|
-
// provider.ts lives at apps/storefront/src/lib/storyblok/ — the repo root is
|
|
255
|
-
// levels up, mirroring the import.meta.glob prefix ("
|
|
254
|
+
// provider.ts lives at apps/storefront/src/lib/content/storyblok/ — the repo root is six
|
|
255
|
+
// levels up, mirroring the import.meta.glob prefix ("../../../../../../tenants/...").
|
|
256
256
|
const here = dirname(fileURLToPath(import.meta.url));
|
|
257
|
-
const abs = resolve(here, "
|
|
257
|
+
const abs = resolve(here, "../../../../../..", ...tenantDirRelative(scope).split("/"), "content", relative);
|
|
258
258
|
return await readFile(abs, "utf8");
|
|
259
259
|
} catch {
|
|
260
260
|
return null;
|
|
@@ -305,7 +305,7 @@ export class LocalContentProvider implements ContentProvider {
|
|
|
305
305
|
if (loader) return loader();
|
|
306
306
|
// (2) No chrome.html: render the CANONICAL shared chrome from the
|
|
307
307
|
// tenant's chrome.json — but only when it validates whole against the
|
|
308
|
-
// consolidated ChromeConfig schema (lib/chrome/parseConfig.ts). Tenant-
|
|
308
|
+
// consolidated ChromeConfig schema (lib/content/chrome/parseConfig.ts). Tenant-
|
|
309
309
|
// owned only, like the raw HTML above (no cross-tenant fallback).
|
|
310
310
|
const config = await this.loadChromeConfig();
|
|
311
311
|
if (!config) return null;
|
|
@@ -708,7 +708,7 @@ export class PublishedContentProvider implements ContentProvider {
|
|
|
708
708
|
}
|
|
709
709
|
async getChrome(): Promise<ChromeConfig> {
|
|
710
710
|
// Runs through the SAME fail-closed schema validator as getChromeHtml's
|
|
711
|
-
// chrome.json branch (lib/chrome/parseConfig.ts) — a published artifact is
|
|
711
|
+
// chrome.json branch (lib/content/chrome/parseConfig.ts) — a published artifact is
|
|
712
712
|
// no longer trusted blind (was: JSON.parse + a raw cast to SiteChrome).
|
|
713
713
|
const config = parseChromeConfig(await this.published<unknown>("chrome.json"));
|
|
714
714
|
return config ?? ((await this.usesVersionedContent()) ? EMPTY_CHROME_CONFIG : this.base.getChrome());
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Thin wrapper binding the generic blog engine to the "the-build" collection.
|
|
2
|
-
// The engine (src/lib/blog/collection.ts) is the single implementation; this
|
|
2
|
+
// The engine (src/lib/content/blog/collection.ts) is the single implementation; this
|
|
3
3
|
// module only fixes the collection id so existing/downstream callers can import
|
|
4
4
|
// collection-bound helpers.
|
|
5
5
|
import { getIndexSettings, getPost, listPosts, resolveRedirect, type Collection } from "../blog/collection.js";
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// (`annotate`), so a render path can feed `htmlWithHeadingIds(post.contentHtml)`
|
|
6
6
|
// to `set:html` and `toc(post.contentHtml)` to the aside and the anchors line up.
|
|
7
7
|
import { parseFragment, serialize } from "parse5";
|
|
8
|
-
import { slugifyHeading } from "../
|
|
8
|
+
import { slugifyHeading } from "../prose.js";
|
|
9
9
|
|
|
10
10
|
/** Minimal structural view of a parse5 node (duck-typed, as scripts/dev/locate.mjs does). */
|
|
11
11
|
interface P5Node {
|
|
@@ -151,7 +151,7 @@ export const activityEvents = sqliteTable(
|
|
|
151
151
|
|
|
152
152
|
// --- Per-tenant raw-interaction store directory ------------------------------
|
|
153
153
|
// The DIRECTORY of per-tenant D1 databases that hold raw declarative-tracking
|
|
154
|
-
// interaction rows — one database per tenant (`lib/tracking/interactionSchema.ts`
|
|
154
|
+
// interaction rows — one database per tenant (`lib/measurement/tracking/interactionSchema.ts`
|
|
155
155
|
// is that database's schema). This table holds NO interaction data: only the
|
|
156
156
|
// `tenant_id → (database_name, database_uuid)` mapping the Worker needs to
|
|
157
157
|
// address a tenant's own database over the D1 REST API, since Worker bindings
|
|
@@ -177,7 +177,7 @@ export const trackingTenantDatabases = sqliteTable(
|
|
|
177
177
|
{
|
|
178
178
|
tenantId: text("tenant_id").primaryKey(),
|
|
179
179
|
// The Cloudflare D1 database name, derived deterministically from the tenant
|
|
180
|
-
// id (`lib/tracking/tenantD1Registry.ts`) — recorded so an operator can find
|
|
180
|
+
// id (`lib/measurement/tracking/tenantD1Registry.ts`) — recorded so an operator can find
|
|
181
181
|
// it in the dashboard without re-deriving.
|
|
182
182
|
databaseName: text("database_name").notNull(),
|
|
183
183
|
// The D1 UUID — what the REST data plane actually addresses.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* notification for that case — the author is pinged the MOMENT their change actually
|
|
7
7
|
* conflicts with someone else's merge, not at their own accept attempt.
|
|
8
8
|
*
|
|
9
|
-
* Rendered here (our brand), transmitted by tot20 (see lib/messaging/messagesClient.ts).
|
|
9
|
+
* Rendered here (our brand), transmitted by tot20 (see lib/engagement/messaging/messagesClient.ts).
|
|
10
10
|
* Email HTML rules: inline styles only, table-free simple layout, a visible fallback URL
|
|
11
11
|
* under the button.
|
|
12
12
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The storefront's OWN branded developer-invite email (magic-link flow). The storefront
|
|
3
3
|
* owns presentation now — this is our template, our brand, rendered here and handed to
|
|
4
|
-
* tot20 only for transport (see lib/messaging/messagesClient.ts). A single primary CTA
|
|
4
|
+
* tot20 only for transport (see lib/engagement/messaging/messagesClient.ts). A single primary CTA
|
|
5
5
|
* links to the GET-safe /auth/magic landing carrying the one-time token.
|
|
6
6
|
*
|
|
7
7
|
* Email HTML rules: inline styles only (no <style>/external CSS — mail clients strip them),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Hand-rolled newsletter digest HTML builder — the email analogue of
|
|
3
|
-
* `renderRssFeed` (src/lib/blog/rss.ts): pure string concatenation, no
|
|
3
|
+
* `renderRssFeed` (src/lib/content/blog/rss.ts): pure string concatenation, no
|
|
4
4
|
* templating dependency. Fed the engine's live-visible post list, so drafts /
|
|
5
5
|
* unlisted / not-yet-scheduled posts can never reach an inbox.
|
|
6
6
|
*
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* ESP (see send.ts). The RFC 8058 `List-Unsubscribe` headers are set on the
|
|
11
11
|
* SEND call, not in this HTML body.
|
|
12
12
|
*/
|
|
13
|
-
import type { BlogPostSummary } from "
|
|
13
|
+
import type { BlogPostSummary } from "../../content/blog/types.js";
|
|
14
14
|
|
|
15
15
|
/** Replaced per-recipient with the subscriber's opaque token at send time. */
|
|
16
16
|
export const UNSUBSCRIBE_TOKEN_PLACEHOLDER = "{{unsubscribe_token}}";
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* (`POST /emails/batch`, up to 100 messages/call); audience/consent/unsubscribe
|
|
6
6
|
* state stays first-party in our D1, never in a vendor list.
|
|
7
7
|
*/
|
|
8
|
-
import { readEnv } from "
|
|
8
|
+
import { readEnv } from "../../env.js";
|
|
9
9
|
|
|
10
10
|
/** Resend's batch limit: at most 100 messages per `/emails/batch` call. */
|
|
11
11
|
export const RESEND_BATCH_LIMIT = 100;
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
* per-subscriber diff. "New since last send" is computed once from the previous
|
|
19
19
|
* ledger row's `sent_at`, not per-subscriber.
|
|
20
20
|
*/
|
|
21
|
-
import type { Queryable } from "
|
|
22
|
-
import type { BlogPostSummary } from "
|
|
21
|
+
import type { Queryable } from "../../catalog/d1/catalog.js";
|
|
22
|
+
import type { BlogPostSummary } from "../../content/blog/types.js";
|
|
23
23
|
import {
|
|
24
24
|
sendBatch as realSendBatch,
|
|
25
25
|
RESEND_BATCH_LIMIT,
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* caller is responsible for resolving `tenantId` from the request host/session
|
|
10
10
|
* (NEVER a client body) — that is the multi-tenant isolation boundary.
|
|
11
11
|
*/
|
|
12
|
-
import type { Queryable } from "
|
|
12
|
+
import type { Queryable } from "../../catalog/d1/catalog.js";
|
|
13
13
|
|
|
14
14
|
export type SubscriberStatus = "pending" | "confirmed" | "unsubscribed" | "bounced";
|
|
15
15
|
|