@tokenoftrust/storefront-runner 2.4.87 → 2.4.89

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (331) hide show
  1. package/apps/storefront/astro.config.mjs +1 -1
  2. package/apps/storefront/dev-plugins/tenant-hot-reload.mjs +1 -1
  3. package/apps/storefront/env.d.ts +1 -1
  4. package/apps/storefront/perf/README.md +7 -7
  5. package/apps/storefront/perf/assert-budgets.ts +2 -2
  6. package/apps/storefront/public/shared/commerce-chrome.css +1 -1
  7. package/apps/storefront/public/shared/commerce-marketing.css +1 -1
  8. package/apps/storefront/src/components/catalog/storefront/CollectionCard.astro +1 -1
  9. package/apps/storefront/src/components/catalog/storefront/ProductCard.astro +4 -4
  10. package/apps/storefront/src/components/catalog/storefront/commerce/BrandGrid.astro +1 -1
  11. package/apps/storefront/src/components/catalog/storefront/commerce/PriceDisplay.astro +2 -2
  12. package/apps/storefront/src/components/catalog/storefront/commerce/ProductCarousel.astro +2 -2
  13. package/apps/storefront/src/components/catalog/storefront/commerce/ProductGrid.astro +3 -3
  14. package/apps/storefront/src/components/catalog/storefront/commerce/ReviewList.astro +1 -1
  15. package/apps/storefront/src/components/catalog/storefront/islands/ImageGallery.tsx +1 -1
  16. package/apps/storefront/src/components/catalog/storefront/islands/QuickView.tsx +2 -2
  17. package/apps/storefront/src/components/catalog/storefront/islands/RecentlyViewed.tsx +2 -2
  18. package/apps/storefront/src/components/catalog/storefront/islands/SearchTypeahead.tsx +2 -2
  19. package/apps/storefront/src/components/catalog/storefront/islands/VariantSelector.tsx +1 -1
  20. package/apps/storefront/src/components/compliance/storefront/islands/AgeGate.tsx +2 -2
  21. package/apps/storefront/src/components/compliance/storefront/islands/IsolatedAgeGate.tsx +1 -1
  22. package/apps/storefront/src/components/{AsyncStylesheet.astro → content/storefront/AsyncStylesheet.astro} +2 -2
  23. package/apps/storefront/src/components/{Breadcrumbs.astro → content/storefront/Breadcrumbs.astro} +3 -3
  24. package/apps/storefront/src/components/{Seo.astro → content/storefront/Seo.astro} +5 -5
  25. package/apps/storefront/src/components/{blog → content/storefront/blog}/BlogIndexView.astro +6 -6
  26. package/apps/storefront/src/components/{blog → content/storefront/blog}/BlogPaywall.astro +2 -2
  27. package/apps/storefront/src/components/{blog → content/storefront/blog}/BlogPostArticle.astro +7 -7
  28. package/apps/storefront/src/components/{blog → content/storefront/blog}/PostAccessBadge.astro +1 -1
  29. package/apps/storefront/src/components/{blog → content/storefront/blog}/PostGrid.astro +3 -3
  30. package/apps/storefront/src/components/{blog → content/storefront/blog}/ReactionBar.astro +1 -1
  31. package/apps/storefront/src/components/{blog → content/storefront/blog}/ShareRow.astro +1 -1
  32. package/apps/storefront/src/components/{chrome → content/storefront/chrome}/MegaMenu.astro +3 -3
  33. package/apps/storefront/src/components/{chrome → content/storefront/chrome}/NavDropdown.astro +2 -2
  34. package/apps/storefront/src/components/{chrome → content/storefront/chrome}/SiteFooter.astro +5 -5
  35. package/apps/storefront/src/components/{chrome → content/storefront/chrome}/SiteHeader.astro +8 -8
  36. package/apps/storefront/src/components/{chrome → content/storefront/chrome}/UtilityNav.astro +2 -2
  37. package/apps/storefront/src/components/content/{Callout.astro → storefront/content/Callout.astro} +1 -1
  38. package/apps/storefront/src/components/content/{PromoTiles.astro → storefront/content/PromoTiles.astro} +3 -3
  39. package/apps/storefront/src/components/content/{ProseSections.astro → storefront/content/ProseSections.astro} +3 -3
  40. package/apps/storefront/src/components/{home → content/storefront/home}/Hero.astro +4 -4
  41. package/apps/storefront/src/components/{islands → content/storefront/islands}/MobileNav.tsx +2 -2
  42. package/apps/storefront/src/components/{marketing → content/storefront/marketing}/CardGrid.astro +2 -2
  43. package/apps/storefront/src/components/{marketing → content/storefront/marketing}/CodeSample.astro +1 -1
  44. package/apps/storefront/src/components/{marketing → content/storefront/marketing}/CtaBand.astro +2 -2
  45. package/apps/storefront/src/components/{marketing → content/storefront/marketing}/Faq.astro +5 -5
  46. package/apps/storefront/src/components/{marketing → content/storefront/marketing}/Integrations.astro +3 -3
  47. package/apps/storefront/src/components/{marketing → content/storefront/marketing}/MarketingBlocks.astro +11 -11
  48. package/apps/storefront/src/components/{marketing → content/storefront/marketing}/MarketingCtas.astro +1 -1
  49. package/apps/storefront/src/components/{marketing → content/storefront/marketing}/MarketingHero.astro +2 -2
  50. package/apps/storefront/src/components/{marketing → content/storefront/marketing}/ProofStrip.astro +1 -1
  51. package/apps/storefront/src/components/{marketing → content/storefront/marketing}/SplitCompare.astro +2 -2
  52. package/apps/storefront/src/components/{marketing → content/storefront/marketing}/Steps.astro +2 -2
  53. package/apps/storefront/src/components/{marketing → content/storefront/marketing}/Testimonials.astro +2 -2
  54. package/apps/storefront/src/components/{marketing → content/storefront/marketing}/TrustBar.astro +1 -1
  55. package/apps/storefront/src/components/{style-guide → content/storefront/style-guide}/StyleGuideNav.astro +1 -1
  56. package/apps/storefront/src/components/{the-build → content/storefront/the-build}/TheBuildIndexView.astro +5 -5
  57. package/apps/storefront/src/components/customers/storefront/islands/SavedList.tsx +2 -2
  58. package/apps/storefront/src/config/adminTargetTenant.ts +1 -1
  59. package/apps/storefront/src/config/devTenants.ts +1 -1
  60. package/apps/storefront/src/config/resolver.ts +1 -1
  61. package/apps/storefront/src/layouts/Layout.astro +28 -28
  62. package/apps/storefront/src/lib/{admin → access/admin}/README.md +3 -3
  63. package/apps/storefront/src/lib/{admin → access/admin}/adminShell.ts +1 -1
  64. package/apps/storefront/src/lib/{admin → access/admin}/envelope.ts +2 -2
  65. package/apps/storefront/src/lib/{admin → access/admin}/viewmodels/settings.ts +2 -2
  66. package/apps/storefront/src/lib/{auth → access/auth}/adminApiGuard.ts +2 -2
  67. package/apps/storefront/src/lib/{auth → access/auth}/adminEntry.ts +2 -2
  68. package/apps/storefront/src/lib/{auth → access/auth}/adminLanding.ts +1 -1
  69. package/apps/storefront/src/lib/{auth → access/auth}/identityToken.ts +1 -1
  70. package/apps/storefront/src/lib/{auth → access/auth}/loginGate.ts +2 -2
  71. package/apps/storefront/src/lib/{auth → access/auth}/totAccessClient.ts +4 -4
  72. package/apps/storefront/src/lib/{dashboard → access/dashboard}/delegateGate.ts +2 -2
  73. package/apps/storefront/src/lib/{dashboard → access/dashboard}/staffAdmission.ts +1 -1
  74. package/apps/storefront/src/lib/{dashboard → access/dashboard}/tenantSelection.ts +1 -1
  75. package/apps/storefront/src/lib/{admin/services/mock → access/fixtures}/settings.ts +4 -4
  76. package/apps/storefront/src/lib/{email → access/notifications}/magicLinkInviteEmail.ts +1 -1
  77. package/apps/storefront/src/lib/{shared → access/shared}/accessExplain.ts +1 -1
  78. package/apps/storefront/src/lib/{adminTenantEnvelope.ts → access/shared/adminTenantEnvelope.ts} +3 -3
  79. package/apps/storefront/src/lib/{shared → access/shared}/developerInvites.ts +4 -4
  80. package/apps/storefront/src/lib/{shared → access/shared}/invitePreflight.ts +1 -1
  81. package/apps/storefront/src/lib/{shared → access/shared}/principalGrants.ts +2 -2
  82. package/apps/storefront/src/lib/{shared → access/shared}/viewerGrant.ts +1 -1
  83. package/apps/storefront/src/lib/activity/fixtures/evidence.ts +2 -2
  84. package/apps/storefront/src/lib/activity/uiActor.ts +4 -4
  85. package/apps/storefront/src/lib/activity/workerCommit.ts +1 -1
  86. package/apps/storefront/src/lib/admin/services/mock/index.ts +4 -4
  87. package/apps/storefront/src/lib/assets/shared/imageAttrs.ts +1 -1
  88. package/apps/storefront/src/lib/{admin → automation/admin}/viewmodels/aiWorkflows.ts +3 -3
  89. package/apps/storefront/src/lib/{admin → automation}/ai/askEnvelope.ts +1 -1
  90. package/apps/storefront/src/lib/{admin → automation}/ai/operationalRuns.ts +4 -4
  91. package/apps/storefront/src/lib/{admin/services/mock → automation/fixtures}/aiWorkflows.ts +4 -4
  92. package/apps/storefront/src/lib/basePath.ts +2 -2
  93. package/apps/storefront/src/lib/catalog/fixtures/products.ts +4 -4
  94. package/apps/storefront/src/lib/catalog/shared/featuredProductsPresentation.ts +1 -1
  95. package/apps/storefront/src/lib/catalog/tot/tenantCatalog.ts +1 -1
  96. package/apps/storefront/src/lib/checkout/admin/checkoutStyleTarget.ts +2 -2
  97. package/apps/storefront/src/lib/checkout/fixtures/checkoutSettings.ts +1 -1
  98. package/apps/storefront/src/lib/compliance/browser/checkoutVerificationFlow.ts +1 -1
  99. package/apps/storefront/src/lib/compliance/verification/totVerificationClient.ts +1 -1
  100. package/apps/storefront/src/lib/{blog → content/blog}/access.ts +1 -1
  101. package/apps/storefront/src/lib/{blog → content/blog}/collection.ts +9 -9
  102. package/apps/storefront/src/lib/{blog → content/blog}/postView.ts +5 -5
  103. package/apps/storefront/src/lib/{blog → content/blog}/provider.ts +7 -7
  104. package/apps/storefront/src/lib/{chrome → content/chrome}/footerLegal.ts +2 -2
  105. package/apps/storefront/src/lib/{chrome → content/chrome}/trackingPlacements.ts +1 -1
  106. package/apps/storefront/src/lib/{seo → content/seo}/faqItems.ts +1 -1
  107. package/apps/storefront/src/lib/{seo → content/seo}/structuredData.ts +1 -1
  108. package/apps/storefront/src/lib/{breadcrumbs.ts → content/shared/breadcrumbs.ts} +1 -1
  109. package/apps/storefront/src/lib/{heroSlideshow.ts → content/shared/heroSlideshow.ts} +1 -1
  110. package/apps/storefront/src/lib/{homeVisualParity.ts → content/shared/homeVisualParity.ts} +1 -1
  111. package/apps/storefront/src/lib/{jsonld.ts → content/shared/jsonld.ts} +1 -1
  112. package/apps/storefront/src/lib/{rawChrome.ts → content/shared/rawChrome.ts} +12 -12
  113. package/apps/storefront/src/lib/{rawMarketingHtml.ts → content/shared/rawMarketingHtml.ts} +3 -3
  114. package/apps/storefront/src/lib/{styleGuideThemes.ts → content/shared/styleGuideThemes.ts} +3 -3
  115. package/apps/storefront/src/lib/{storyblok → content/storyblok}/content-model.ts +1 -1
  116. package/apps/storefront/src/lib/{storyblok → content/storyblok}/provider.ts +27 -27
  117. package/apps/storefront/src/lib/{the-build → content/the-build}/provider.ts +1 -1
  118. package/apps/storefront/src/lib/{the-build → content/the-build}/toc.ts +1 -1
  119. package/apps/storefront/src/lib/customers/fixtures/customers.ts +3 -3
  120. package/apps/storefront/src/lib/d1/schema-apps.ts +2 -2
  121. package/apps/storefront/src/lib/{admin → developer-experience/admin}/memoizeByEnvelope.ts +1 -1
  122. package/apps/storefront/src/lib/{dev → developer-experience/dev}/activityIngestToken.ts +2 -2
  123. package/apps/storefront/src/lib/{dev → developer-experience/dev}/cliSignInCode.ts +3 -3
  124. package/apps/storefront/src/lib/{dev → developer-experience/dev}/livePreview.ts +1 -1
  125. package/apps/storefront/src/lib/{dev → developer-experience/dev}/previewStatus.ts +2 -2
  126. package/apps/storefront/src/lib/{dev → developer-experience/dev}/rendezvousBroker.ts +2 -2
  127. package/apps/storefront/src/lib/{dev → developer-experience/dev}/subjectReissue.ts +2 -2
  128. package/apps/storefront/src/lib/email/candidateConflictEmail.ts +1 -1
  129. package/apps/storefront/src/lib/{messaging → engagement/messaging}/messagesClient.ts +1 -1
  130. package/apps/storefront/src/lib/{newsletter → engagement/newsletter}/digest.ts +2 -2
  131. package/apps/storefront/src/lib/{newsletter → engagement/newsletter}/resendClient.ts +1 -1
  132. package/apps/storefront/src/lib/{newsletter → engagement/newsletter}/send.ts +2 -2
  133. package/apps/storefront/src/lib/{newsletter → engagement/newsletter}/subscribers.ts +1 -1
  134. package/apps/storefront/src/lib/{social → engagement/social}/golive.ts +2 -2
  135. package/apps/storefront/src/lib/{social → engagement/social}/notify.ts +1 -1
  136. package/apps/storefront/src/lib/{social → engagement/social}/tokenStore.ts +3 -3
  137. package/apps/storefront/src/lib/fulfillment/fulfillmentService.ts +3 -3
  138. package/apps/storefront/src/lib/integrations/integration/browserEnvironment.ts +1 -1
  139. package/apps/storefront/src/lib/{apps → measurement/consent}/consentConfigRead.ts +1 -1
  140. package/apps/storefront/src/lib/{tracking → measurement/tracking}/d1Control.ts +2 -2
  141. package/apps/storefront/src/lib/{tracking → measurement/tracking}/interactionCollector.ts +2 -2
  142. package/apps/storefront/src/lib/{tracking → measurement/tracking}/interactionStore.ts +0 -0
  143. package/apps/storefront/src/lib/{tracking → measurement/tracking}/pruneRollup.ts +2 -2
  144. package/apps/storefront/src/lib/{tracking → measurement/tracking}/publishSafetyNet.ts +1 -1
  145. package/apps/storefront/src/lib/{tracking → measurement/tracking}/tenantD1Registry.ts +2 -2
  146. package/apps/storefront/src/lib/{monitoring → observability/monitoring}/manifest.ts +2 -2
  147. package/apps/storefront/src/lib/{analytics → observability/performance}/budgets.json +1 -1
  148. package/apps/storefront/src/lib/orders/fixtures/orders.ts +4 -4
  149. package/apps/storefront/src/lib/previewReload.ts +1 -1
  150. package/apps/storefront/src/lib/publication/contentProvider.ts +7 -7
  151. package/apps/storefront/src/lib/publication/mountedDiscovery.ts +1 -1
  152. package/apps/storefront/src/lib/publication/rootDiscovery.ts +4 -4
  153. package/apps/storefront/src/lib/reporting/fixtures/reporting.ts +3 -3
  154. package/apps/storefront/src/lib/runtimeEnv.ts +1 -1
  155. package/apps/storefront/src/lib/subscriptions/fixtures/subscriptions.ts +3 -3
  156. package/apps/storefront/src/middleware/controlPlane.ts +7 -7
  157. package/apps/storefront/src/middleware/index.ts +11 -11
  158. package/apps/storefront/src/middleware/renderChain.ts +6 -6
  159. package/apps/storefront/src/pages/[...slug].astro +13 -13
  160. package/apps/storefront/src/pages/api/admin/activity-alerts.ts +1 -1
  161. package/apps/storefront/src/pages/api/admin/commerce-readiness.ts +1 -1
  162. package/apps/storefront/src/pages/api/admin/fulfillment/batches.ts +1 -1
  163. package/apps/storefront/src/pages/api/admin/fulfillment/orders/[id]/address.ts +1 -1
  164. package/apps/storefront/src/pages/api/admin/fulfillment/orders/[id].ts +1 -1
  165. package/apps/storefront/src/pages/api/admin/interaction-insights.ts +4 -4
  166. package/apps/storefront/src/pages/api/admin/orders/[id].ts +1 -1
  167. package/apps/storefront/src/pages/api/admin/orders.ts +1 -1
  168. package/apps/storefront/src/pages/api/auth/logout.ts +2 -2
  169. package/apps/storefront/src/pages/api/auth/magic-exchange.ts +6 -6
  170. package/apps/storefront/src/pages/api/auth/send.ts +2 -2
  171. package/apps/storefront/src/pages/api/auth/step-up-send.ts +1 -1
  172. package/apps/storefront/src/pages/api/auth/step-up-verify.ts +3 -3
  173. package/apps/storefront/src/pages/api/auth/verify.ts +4 -4
  174. package/apps/storefront/src/pages/api/blog/[collection]/[slug]/react.ts +2 -2
  175. package/apps/storefront/src/pages/api/newsletter/[collection]/subscribe.ts +4 -4
  176. package/apps/storefront/src/pages/api/newsletter/confirm.ts +1 -1
  177. package/apps/storefront/src/pages/api/newsletter/unsubscribe.ts +1 -1
  178. package/apps/storefront/src/pages/api/rum/vitals.ts +2 -2
  179. package/apps/storefront/src/pages/api/tracking/interaction.ts +5 -5
  180. package/apps/storefront/src/pages/auth/login.astro +2 -2
  181. package/apps/storefront/src/pages/auth/magic.astro +1 -1
  182. package/apps/storefront/src/pages/blog/[slug].astro +2 -2
  183. package/apps/storefront/src/pages/blog/author/[author].astro +8 -8
  184. package/apps/storefront/src/pages/blog/category/[category].astro +8 -8
  185. package/apps/storefront/src/pages/blog/index.astro +4 -4
  186. package/apps/storefront/src/pages/blog/page/[n].astro +4 -4
  187. package/apps/storefront/src/pages/blog/tag/[tag].astro +8 -8
  188. package/apps/storefront/src/pages/cart.ts +1 -1
  189. package/apps/storefront/src/pages/collections/[handle].astro +7 -7
  190. package/apps/storefront/src/pages/collections/index.astro +4 -4
  191. package/apps/storefront/src/pages/index.astro +10 -10
  192. package/apps/storefront/src/pages/llms.txt.ts +2 -2
  193. package/apps/storefront/src/pages/products/[handle].astro +11 -11
  194. package/apps/storefront/src/pages/saved.astro +2 -2
  195. package/apps/storefront/src/pages/search.astro +5 -5
  196. package/apps/storefront/src/pages/sitemap.xml.ts +8 -8
  197. package/apps/storefront/src/pages/style-guide/[tenant]/[theme].astro +24 -24
  198. package/apps/storefront/src/pages/style-guide/[tenant]/chrome/[theme].astro +2 -2
  199. package/apps/storefront/src/pages/style-guide/[tenant]/guide/[theme].astro +3 -3
  200. package/apps/storefront/src/pages/style-guide/[tenant]/index.astro +3 -3
  201. package/apps/storefront/src/pages/style-guide/index.astro +1 -1
  202. package/apps/storefront/src/pages/the-build/[slug].astro +10 -10
  203. package/apps/storefront/src/pages/the-build/index.astro +5 -5
  204. package/apps/storefront/src/pages/the-build/page/[n].astro +5 -5
  205. package/apps/storefront/src/pages/the-build/rss.xml.ts +4 -4
  206. package/docs/widget-library-guide.md +36 -36
  207. package/package.json +1 -1
  208. package/packages/public-runtime/src/chrome.ts +4 -4
  209. package/packages/public-runtime/src/tracking-id-derivation.ts +1 -1
  210. package/scripts/dev/locate.mjs +1 -1
  211. package/apps/storefront/src/lib/admin/ai/index.ts +0 -6
  212. /package/apps/storefront/src/components/{auth → access/storefront/auth}/AuthBadge.astro +0 -0
  213. /package/apps/storefront/src/components/{Badge.astro → content/storefront/Badge.astro} +0 -0
  214. /package/apps/storefront/src/components/{EmptyState.astro → content/storefront/EmptyState.astro} +0 -0
  215. /package/apps/storefront/src/components/{Section.astro → content/storefront/Section.astro} +0 -0
  216. /package/apps/storefront/src/components/{chrome → content/storefront/chrome}/AnnouncementBar.astro +0 -0
  217. /package/apps/storefront/src/components/{commerce → content/storefront/commerce}/ArticleCard.astro +0 -0
  218. /package/apps/storefront/src/components/content/{NeedsReviewCallout.astro → storefront/content/NeedsReviewCallout.astro} +0 -0
  219. /package/apps/storefront/src/components/content/{ProseToc.astro → storefront/content/ProseToc.astro} +0 -0
  220. /package/apps/storefront/src/components/content/{RichText.astro → storefront/content/RichText.astro} +0 -0
  221. /package/apps/storefront/src/components/content/{TrustStrip.astro → storefront/content/TrustStrip.astro} +0 -0
  222. /package/apps/storefront/src/lib/{auth → access/auth}/brokerAssertion.ts +0 -0
  223. /package/apps/storefront/src/lib/{auth → access/auth}/devAuth.ts +0 -0
  224. /package/apps/storefront/src/lib/{auth → access/auth}/gatePage.ts +0 -0
  225. /package/apps/storefront/src/lib/{auth → access/auth}/internalContentAuthority.ts +0 -0
  226. /package/apps/storefront/src/lib/{auth → access/auth}/mcpClientAssertion.ts +0 -0
  227. /package/apps/storefront/src/lib/{auth → access/auth}/operatorSession.ts +0 -0
  228. /package/apps/storefront/src/lib/{auth → access/auth}/route.ts +0 -0
  229. /package/apps/storefront/src/lib/{auth → access/auth}/session.ts +0 -0
  230. /package/apps/storefront/src/lib/{auth → access/auth}/stepUpChallenge.ts +0 -0
  231. /package/apps/storefront/src/lib/{dashboard → access/dashboard}/staffVendorAccess.ts +0 -0
  232. /package/apps/storefront/src/lib/{dashboard → access/dashboard}/vendorQuery.ts +0 -0
  233. /package/apps/storefront/src/lib/{admin/services/mock → access/fixtures}/tenants.ts +0 -0
  234. /package/apps/storefront/src/lib/{privacy → access/privacy}/emailHint.ts +0 -0
  235. /package/apps/storefront/src/lib/{rate → access/rate}/kvWindow.ts +0 -0
  236. /package/apps/storefront/src/lib/{shared → access/shared}/capability.ts +0 -0
  237. /package/apps/storefront/src/lib/{cspStaticHashes.ts → access/shared/cspStaticHashes.ts} +0 -0
  238. /package/apps/storefront/src/lib/{demoGate.ts → access/shared/demoGate.ts} +0 -0
  239. /package/apps/storefront/src/lib/{maintenance.ts → access/shared/maintenance.ts} +0 -0
  240. /package/apps/storefront/src/lib/{securityHeaders.ts → access/shared/securityHeaders.ts} +0 -0
  241. /package/apps/storefront/src/lib/{tenantOrigins.ts → access/shared/tenantOrigins.ts} +0 -0
  242. /package/apps/storefront/src/lib/{tenantRouting.ts → access/shared/tenantRouting.ts} +0 -0
  243. /package/apps/storefront/src/lib/{admin → automation}/ai/approvalMode.ts +0 -0
  244. /package/apps/storefront/src/lib/{admin → automation}/ai/audit.ts +0 -0
  245. /package/apps/storefront/src/lib/{admin → automation}/ai/recommendation.ts +0 -0
  246. /package/apps/storefront/src/lib/{blog → content/blog}/collectionPaths.ts +0 -0
  247. /package/apps/storefront/src/lib/{blog → content/blog}/markdown.ts +0 -0
  248. /package/apps/storefront/src/lib/{blog → content/blog}/pagination.ts +0 -0
  249. /package/apps/storefront/src/lib/{blog → content/blog}/presentation.ts +0 -0
  250. /package/apps/storefront/src/lib/{blog → content/blog}/reactions.ts +0 -0
  251. /package/apps/storefront/src/lib/{blog → content/blog}/rss.ts +0 -0
  252. /package/apps/storefront/src/lib/{blog → content/blog}/teaser.ts +0 -0
  253. /package/apps/storefront/src/lib/{blog → content/blog}/types.ts +0 -0
  254. /package/apps/storefront/src/lib/{blog → content/blog}/viewCounts.ts +0 -0
  255. /package/apps/storefront/src/lib/{chrome → content/chrome}/ctaIdentity.ts +0 -0
  256. /package/apps/storefront/src/lib/{chrome → content/chrome}/examples/tokenoftrust.chrome-assignments.example.json +0 -0
  257. /package/apps/storefront/src/lib/{chrome → content/chrome}/examples/tokenoftrust.chrome.example.json +0 -0
  258. /package/apps/storefront/src/lib/{chrome → content/chrome}/managedCart.ts +0 -0
  259. /package/apps/storefront/src/lib/{chrome → content/chrome}/model.ts +0 -0
  260. /package/apps/storefront/src/lib/{chrome → content/chrome}/navCurrent.ts +0 -0
  261. /package/apps/storefront/src/lib/{chrome → content/chrome}/newsletterAgeAttestation.ts +0 -0
  262. /package/apps/storefront/src/lib/{chrome → content/chrome}/parseConfig.ts +0 -0
  263. /package/apps/storefront/src/lib/{chrome → content/chrome}/variant.ts +0 -0
  264. /package/apps/storefront/src/lib/{commerce → content/policies}/shippingPolicy.ts +0 -0
  265. /package/apps/storefront/src/lib/{seo → content/seo}/alternates.ts +0 -0
  266. /package/apps/storefront/src/lib/{seo → content/seo}/documentTitle.ts +0 -0
  267. /package/apps/storefront/src/lib/{seo → content/seo}/meta.ts +0 -0
  268. /package/apps/storefront/src/lib/{seo → content/seo}/urlForm.ts +0 -0
  269. /package/apps/storefront/src/lib/{asyncCss.ts → content/shared/asyncCss.ts} +0 -0
  270. /package/apps/storefront/src/lib/{colors.ts → content/shared/colors.ts} +0 -0
  271. /package/apps/storefront/src/lib/{format.ts → content/shared/format.ts} +0 -0
  272. /package/apps/storefront/src/lib/{i18n.ts → content/shared/i18n.ts} +0 -0
  273. /package/apps/storefront/src/lib/{jsonScript.ts → content/shared/jsonScript.ts} +0 -0
  274. /package/apps/storefront/src/lib/{placeholder.ts → content/shared/placeholder.ts} +0 -0
  275. /package/apps/storefront/src/lib/{sections.ts → content/shared/sections.ts} +0 -0
  276. /package/apps/storefront/src/lib/{styleGuidePaths.ts → content/shared/styleGuidePaths.ts} +0 -0
  277. /package/apps/storefront/src/lib/{the-build → content/the-build}/pagination.ts +0 -0
  278. /package/apps/storefront/src/lib/{the-build → content/the-build}/readingTime.ts +0 -0
  279. /package/apps/storefront/src/lib/{admin → developer-experience/admin}/seed.ts +0 -0
  280. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/activityStore.ts +0 -0
  281. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/ai-widget-client.js +0 -0
  282. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/apiBase.ts +0 -0
  283. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/cockpit/ask.ts +0 -0
  284. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/cockpit/clickToSource.ts +0 -0
  285. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/cockpit/copyCommand.ts +0 -0
  286. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/cockpit/files.ts +0 -0
  287. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/cockpit/hostedActivity.ts +0 -0
  288. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/cockpit/infoPopover.ts +0 -0
  289. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/cockpit/mcpCopy.ts +0 -0
  290. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/cockpit/monitor.ts +0 -0
  291. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/cockpit/stepper.ts +0 -0
  292. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/cockpit/themeToggle.ts +0 -0
  293. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/devDraft.ts +0 -0
  294. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/obstacleStore.ts +0 -0
  295. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/runtimeStore.ts +0 -0
  296. /package/apps/storefront/src/lib/{dev → developer-experience/dev}/storeStatus.ts +0 -0
  297. /package/apps/storefront/src/lib/{fixtures → developer-experience/fixtures}/regulated-commerce-truth/index.ts +0 -0
  298. /package/apps/storefront/src/lib/{fixtures → developer-experience/fixtures}/ws3-readonly-clone-preflight/index.ts +0 -0
  299. /package/apps/storefront/src/lib/{http → developer-experience/http}/fetchTransport.ts +0 -0
  300. /package/apps/storefront/src/lib/{http → developer-experience/http}/mcpServiceCall.ts +0 -0
  301. /package/apps/storefront/src/lib/{memoryKv.ts → developer-experience/shared/memoryKv.ts} +0 -0
  302. /package/apps/storefront/src/lib/{cloudflare-workers.d.ts → developer-experience/types/cloudflare-workers.d.ts} +0 -0
  303. /package/apps/storefront/src/lib/{newsletter → engagement/newsletter}/confirmationEmail.ts +0 -0
  304. /package/apps/storefront/src/lib/{newsletter → engagement/newsletter}/consent.ts +0 -0
  305. /package/apps/storefront/src/lib/{admin → measurement/admin}/consentSettingsClient.ts +0 -0
  306. /package/apps/storefront/src/lib/{analytics → measurement/analytics}/index.ts +0 -0
  307. /package/apps/storefront/src/lib/{apps/orders → measurement/attribution}/attributionService.ts +0 -0
  308. /package/apps/storefront/src/lib/{apps/orders → measurement/attribution}/orderConversionD1.ts +0 -0
  309. /package/apps/storefront/src/lib/{apps/orders → measurement/attribution}/verifiedProviderMeasurement.ts +0 -0
  310. /package/apps/storefront/src/lib/{tracking → measurement/tracking}/collectorAllowlist.ts +0 -0
  311. /package/apps/storefront/src/lib/{tracking → measurement/tracking}/collectorIngest.ts +0 -0
  312. /package/apps/storefront/src/lib/{tracking → measurement/tracking}/interactionHealth.ts +0 -0
  313. /package/apps/storefront/src/lib/{tracking → measurement/tracking}/interactionSchema.ts +0 -0
  314. /package/apps/storefront/src/lib/{tracking → measurement/tracking}/tenantReadAccess.ts +0 -0
  315. /package/apps/storefront/src/lib/{tracking-writeback → measurement/tracking-writeback}/rewriteTrackingIds.ts +0 -0
  316. /package/apps/storefront/src/lib/{tracking-writeback → measurement/tracking-writeback}/writebackCandidate.ts +0 -0
  317. /package/apps/storefront/src/lib/{diag → observability/diag}/capture.ts +0 -0
  318. /package/apps/storefront/src/lib/{diag → observability/diag}/consoleLine.ts +0 -0
  319. /package/apps/storefront/src/lib/{diag → observability/diag}/debugConsole.ts +0 -0
  320. /package/apps/storefront/src/lib/{diag → observability/diag}/debugMode.ts +0 -0
  321. /package/apps/storefront/src/lib/{diag → observability/diag}/debugWindow.ts +0 -0
  322. /package/apps/storefront/src/lib/{diag → observability/diag}/redact.ts +0 -0
  323. /package/apps/storefront/src/lib/{diag → observability/diag}/reference.ts +0 -0
  324. /package/apps/storefront/src/lib/{diag → observability/diag}/referenceStore.ts +0 -0
  325. /package/apps/storefront/src/lib/{diag → observability/diag}/report.ts +0 -0
  326. /package/apps/storefront/src/lib/{diag → observability/diag}/session.ts +0 -0
  327. /package/apps/storefront/src/lib/{analytics → observability/performance}/lighthouseReport.ts +0 -0
  328. /package/apps/storefront/src/lib/{analytics → observability/performance}/perfBudgets.ts +0 -0
  329. /package/apps/storefront/src/lib/{analytics → observability/performance}/rumAlert.ts +0 -0
  330. /package/apps/storefront/src/lib/{analytics → observability/performance}/webVitals.ts +0 -0
  331. /package/apps/storefront/src/lib/{health.ts → observability/shared/health.ts} +0 -0
@@ -11,8 +11,8 @@
11
11
  * prefers-reduced-motion.
12
12
  */
13
13
  import { useCallback, useEffect, useRef, useState } from "preact/hooks";
14
- import { isCurrentNavHref } from "@/lib/chrome/navCurrent";
15
- import { CHROME_PLACEMENT } from "@/lib/chrome/trackingPlacements";
14
+ import { isCurrentNavHref } from "@/lib/content/chrome/navCurrent";
15
+ import { CHROME_PLACEMENT } from "@/lib/content/chrome/trackingPlacements";
16
16
  import { trackingAttributes } from "@tot/public-runtime";
17
17
 
18
18
  /**
@@ -4,8 +4,8 @@
4
4
  * component, three visual variants (density + emphasis). Cards may link
5
5
  * internally (base-path prefixed) or externally.
6
6
  */
7
- import Section from "@/components/Section.astro";
8
- import type { CardGridBlock } from "@/lib/storyblok/content-model";
7
+ import Section from "@/components/content/storefront/Section.astro";
8
+ import type { CardGridBlock } from "@/lib/content/storyblok/content-model";
9
9
  import { withBase } from "@/lib/basePath";
10
10
 
11
11
  interface Props {
@@ -5,7 +5,7 @@
5
5
  * inject markup or scripts. Samples must be public/server-side framed — never
6
6
  * embed secret keys or tokens (see the epic's D7 secret-scan guardrail).
7
7
  */
8
- import type { CodeSample } from "@/lib/storyblok/content-model";
8
+ import type { CodeSample } from "@/lib/content/storyblok/content-model";
9
9
  interface Props {
10
10
  sample: CodeSample;
11
11
  }
@@ -3,8 +3,8 @@
3
3
  * <CtaBand> — the final conversion band: a headline, optional subhead, and a
4
4
  * centered CTA row. Sits on the surface tone to close the page.
5
5
  */
6
- import type { CtaBandBlock } from "@/lib/storyblok/content-model";
7
- import MarketingCtas from "@/components/marketing/MarketingCtas.astro";
6
+ import type { CtaBandBlock } from "@/lib/content/storyblok/content-model";
7
+ import MarketingCtas from "@/components/content/storefront/marketing/MarketingCtas.astro";
8
8
  interface Props {
9
9
  block: CtaBandBlock;
10
10
  basePath: string;
@@ -3,13 +3,13 @@
3
3
  * <Faq> — a no-JS accordion of question/answer pairs using native
4
4
  * <details>/<summary>. Emits FAQPage JSON-LD so answers are eligible for rich
5
5
  * results — unless the tenant declares a structured-data profile, which owns every
6
- * JSON-LD node on the page (lib/seo/structuredData.ts). Answers are plain text
6
+ * JSON-LD node on the page (lib/content/seo/structuredData.ts). Answers are plain text
7
7
  * (auto-escaped).
8
8
  */
9
- import Section from "@/components/Section.astro";
10
- import type { FaqBlock } from "@/lib/storyblok/content-model";
11
- import { safeJsonScriptContent } from "@/lib/jsonScript";
12
- import { structuredDataProfile } from "@/lib/seo/structuredData";
9
+ import Section from "@/components/content/storefront/Section.astro";
10
+ import type { FaqBlock } from "@/lib/content/storyblok/content-model";
11
+ import { safeJsonScriptContent } from "@/lib/content/shared/jsonScript";
12
+ import { structuredDataProfile } from "@/lib/content/seo/structuredData";
13
13
  interface Props {
14
14
  block: FaqBlock;
15
15
  }
@@ -4,9 +4,9 @@
4
4
  * platform names/links, optional implementation points, and an optional safe
5
5
  * code sample. Platform links open externally when they carry an http href.
6
6
  */
7
- import Section from "@/components/Section.astro";
8
- import CodeSample from "@/components/marketing/CodeSample.astro";
9
- import type { IntegrationsBlock } from "@/lib/storyblok/content-model";
7
+ import Section from "@/components/content/storefront/Section.astro";
8
+ import CodeSample from "@/components/content/storefront/marketing/CodeSample.astro";
9
+ import type { IntegrationsBlock } from "@/lib/content/storyblok/content-model";
10
10
  import { withBase } from "@/lib/basePath";
11
11
 
12
12
  interface Props {
@@ -5,17 +5,17 @@
5
5
  * block is styled through theme tokens and reads its copy from tenant content.
6
6
  * Reused by the homepage and (future) marketing content pages.
7
7
  */
8
- import type { MarketingBlock } from "@/lib/storyblok/content-model";
9
- import MarketingHero from "@/components/marketing/MarketingHero.astro";
10
- import TrustBar from "@/components/marketing/TrustBar.astro";
11
- import SplitCompare from "@/components/marketing/SplitCompare.astro";
12
- import Steps from "@/components/marketing/Steps.astro";
13
- import CardGrid from "@/components/marketing/CardGrid.astro";
14
- import Integrations from "@/components/marketing/Integrations.astro";
15
- import ProofStrip from "@/components/marketing/ProofStrip.astro";
16
- import Testimonials from "@/components/marketing/Testimonials.astro";
17
- import Faq from "@/components/marketing/Faq.astro";
18
- import CtaBand from "@/components/marketing/CtaBand.astro";
8
+ import type { MarketingBlock } from "@/lib/content/storyblok/content-model";
9
+ import MarketingHero from "@/components/content/storefront/marketing/MarketingHero.astro";
10
+ import TrustBar from "@/components/content/storefront/marketing/TrustBar.astro";
11
+ import SplitCompare from "@/components/content/storefront/marketing/SplitCompare.astro";
12
+ import Steps from "@/components/content/storefront/marketing/Steps.astro";
13
+ import CardGrid from "@/components/content/storefront/marketing/CardGrid.astro";
14
+ import Integrations from "@/components/content/storefront/marketing/Integrations.astro";
15
+ import ProofStrip from "@/components/content/storefront/marketing/ProofStrip.astro";
16
+ import Testimonials from "@/components/content/storefront/marketing/Testimonials.astro";
17
+ import Faq from "@/components/content/storefront/marketing/Faq.astro";
18
+ import CtaBand from "@/components/content/storefront/marketing/CtaBand.astro";
19
19
 
20
20
  interface Props {
21
21
  blocks: MarketingBlock[];
@@ -5,7 +5,7 @@
5
5
  * a new tab with rel="noopener"; same-origin root-absolute hrefs get the tenant
6
6
  * base-path prefix so path-routed tenants stay in-tenant.
7
7
  */
8
- import type { MarketingCta } from "@/lib/storyblok/content-model";
8
+ import type { MarketingCta } from "@/lib/content/storyblok/content-model";
9
9
  import { withBase } from "@/lib/basePath";
10
10
 
11
11
  interface Props {
@@ -5,8 +5,8 @@
5
5
  * Right (optional): a "product moment" panel of demo/evidence log lines.
6
6
  * All copy is plain text (auto-escaped); no raw HTML is rendered.
7
7
  */
8
- import type { MarketingHeroBlock } from "@/lib/storyblok/content-model";
9
- import MarketingCtas from "@/components/marketing/MarketingCtas.astro";
8
+ import type { MarketingHeroBlock } from "@/lib/content/storyblok/content-model";
9
+ import MarketingCtas from "@/components/content/storefront/marketing/MarketingCtas.astro";
10
10
 
11
11
  interface Props {
12
12
  block: MarketingHeroBlock;
@@ -4,7 +4,7 @@
4
4
  * data"). A bold statement + supporting copy + a grid of proof bullets. Painted
5
5
  * in the primary color for a single strong moment. Plain text only.
6
6
  */
7
- import type { ProofStripBlock } from "@/lib/storyblok/content-model";
7
+ import type { ProofStripBlock } from "@/lib/content/storyblok/content-model";
8
8
  interface Props {
9
9
  block: ProofStripBlock;
10
10
  }
@@ -4,8 +4,8 @@
4
4
  * patchwork" vs "one platform"). The `before` column reads as the problem
5
5
  * (muted, ⚠) and `after` as the solution (accent, ✓).
6
6
  */
7
- import Section from "@/components/Section.astro";
8
- import type { SplitCompareBlock } from "@/lib/storyblok/content-model";
7
+ import Section from "@/components/content/storefront/Section.astro";
8
+ import type { SplitCompareBlock } from "@/lib/content/storyblok/content-model";
9
9
  interface Props {
10
10
  block: SplitCompareBlock;
11
11
  }
@@ -3,8 +3,8 @@
3
3
  * <Steps> — a numbered/emoji journey (e.g. the checkout verification flow).
4
4
  * Renders as a horizontal-scrolling rail on small screens, a wrapped row above.
5
5
  */
6
- import Section from "@/components/Section.astro";
7
- import type { StepsBlock } from "@/lib/storyblok/content-model";
6
+ import Section from "@/components/content/storefront/Section.astro";
7
+ import type { StepsBlock } from "@/lib/content/storyblok/content-model";
8
8
  interface Props {
9
9
  block: StepsBlock;
10
10
  }
@@ -3,8 +3,8 @@
3
3
  * <Testimonials> — outcome/quote cards with an optional stat lead-in and
4
4
  * attribution, plus an optional row of rating tokens. Plain text only.
5
5
  */
6
- import Section from "@/components/Section.astro";
7
- import type { TestimonialsBlock } from "@/lib/storyblok/content-model";
6
+ import Section from "@/components/content/storefront/Section.astro";
7
+ import type { TestimonialsBlock } from "@/lib/content/storyblok/content-model";
8
8
  interface Props {
9
9
  block: TestimonialsBlock;
10
10
  }
@@ -3,7 +3,7 @@
3
3
  * <TrustBar> — a quiet horizontal strip of proof tokens (countries, standards,
4
4
  * platform names, ratings). Plain text, dot-separated on small screens.
5
5
  */
6
- import type { TrustBarBlock } from "@/lib/storyblok/content-model";
6
+ import type { TrustBarBlock } from "@/lib/content/storyblok/content-model";
7
7
  interface Props {
8
8
  block: TrustBarBlock;
9
9
  }
@@ -14,7 +14,7 @@
14
14
  * aria-current="page". When `headings` is supplied (the guide's H2 outline) a
15
15
  * nested table of contents is rendered as in-page anchor links.
16
16
  */
17
- import { styleGuideHref } from "@/lib/styleGuidePaths";
17
+ import { styleGuideHref } from "@/lib/content/shared/styleGuidePaths";
18
18
 
19
19
  type Active = "index" | "tenant" | "components" | "chrome" | "guide";
20
20
 
@@ -5,11 +5,11 @@
5
5
  // implements, can't drift between the two routes (the-build sibling of fb-1791301493691-brzl6f —
6
6
  // mirrors @/components/blog/BlogIndexView.astro).
7
7
  import Layout from "@/layouts/Layout.astro";
8
- import PostAccessBadge from "@/components/blog/PostAccessBadge.astro";
9
- import type { BlogPostSummary } from "@/lib/blog/types.js";
10
- import type { TheBuildIndexCopy } from "@/lib/the-build/pagination.js";
11
- import type { BlogPresentation } from "@/lib/blog/presentation.js";
12
- import { collectionPathsV1 } from "@/lib/blog/collectionPaths.js";
8
+ import PostAccessBadge from "@/components/content/storefront/blog/PostAccessBadge.astro";
9
+ import type { BlogPostSummary } from "@/lib/content/blog/types.js";
10
+ import type { TheBuildIndexCopy } from "@/lib/content/the-build/pagination.js";
11
+ import type { BlogPresentation } from "@/lib/content/blog/presentation.js";
12
+ import { collectionPathsV1 } from "@/lib/content/blog/collectionPaths.js";
13
13
 
14
14
  interface Props {
15
15
  basePath: string;
@@ -11,8 +11,8 @@ import {
11
11
  WISHLIST_EVENT,
12
12
  type SavedItem,
13
13
  } from "@/lib/customers/shared/wishlist";
14
- import { formatPrice } from "@/lib/format";
15
- import { placeholderDataUri, isUsableImageUrl } from "@/lib/placeholder";
14
+ import { formatPrice } from "@/lib/content/shared/format";
15
+ import { placeholderDataUri, isUsableImageUrl } from "@/lib/content/shared/placeholder";
16
16
  import { withClientBase } from "@/lib/basePath";
17
17
 
18
18
  interface Props {
@@ -4,7 +4,7 @@
4
4
  *
5
5
  * The admin console can operate on a target tenant that differs from the routed
6
6
  * (adminApp) tenant on `Astro.locals.tenant` — a real ToT-staff session may point
7
- * `targetTenant` at another tenant it has access to (see lib/adminTenantEnvelope).
7
+ * `targetTenant` at another tenant it has access to (see lib/access/shared/adminTenantEnvelope).
8
8
  * Panels that need the target's real config (e.g. the checkout appearance
9
9
  * panel, which derives from `theme_tokens` + `commerce.checkout`) resolve it HERE,
10
10
  * in the config layer, rather than reaching into the static tenant map — so they
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Dev-only tenant-registry seam for the localhost sign-in bypass.
3
3
  *
4
- * `lib/auth/devAuth` can't import the concrete static tenant map directly
4
+ * `lib/access/auth/devAuth` can't import the concrete static tenant map directly
5
5
  * (tenancy-resolver-fence — the registry stays behind the `config` boundary so a
6
6
  * single-tenant extraction stays a drop-in). This exposes exactly the one thing
7
7
  * that bypass needs: the resources a local dev session is granted membership on.
@@ -31,7 +31,7 @@ import { KvTenantResolver, putTenant } from "@/config/kvTenantResolver";
31
31
  import { getTenantTheme } from "@/themes/tenants";
32
32
  import { devTenantsToSeed } from "@/config/devTenantSeed";
33
33
  import { tenantAnalyticsRawById } from "@/config/tenantAnalyticsFiles";
34
- import { MemoryKv } from "@/lib/memoryKv";
34
+ import { MemoryKv } from "@/lib/developer-experience/shared/memoryKv";
35
35
 
36
36
  // LOCAL dev loop discovery: enumerate the colocated tenant dirs on disk,
37
37
  // INCLUDING a developer's checkout grafted in by `tot dev` (scripts/tot-dev.mjs).
@@ -8,10 +8,10 @@ import "@/styles/global.css";
8
8
  // Self-hosted web fonts (audit finding 6) — replaces the render-blocking
9
9
  // fonts.googleapis.com stylesheet. Bundled by Vite, served same-origin.
10
10
  import "@/styles/fonts.css";
11
- import Seo from "@/components/Seo.astro";
12
- import AnnouncementBar from "@/components/chrome/AnnouncementBar.astro";
13
- import SiteHeader from "@/components/chrome/SiteHeader.astro";
14
- import SiteFooter from "@/components/chrome/SiteFooter.astro";
11
+ import Seo from "@/components/content/storefront/Seo.astro";
12
+ import AnnouncementBar from "@/components/content/storefront/chrome/AnnouncementBar.astro";
13
+ import SiteHeader from "@/components/content/storefront/chrome/SiteHeader.astro";
14
+ import SiteFooter from "@/components/content/storefront/chrome/SiteFooter.astro";
15
15
  import QuickView from "@/components/catalog/storefront/islands/QuickView.tsx";
16
16
  import CheckoutLoader from "@/components/checkout/storefront/commerce/CheckoutLoader.astro";
17
17
  import CartDrawerStyles from "@/components/checkout/storefront/commerce/CartDrawerStyles.astro";
@@ -21,23 +21,23 @@ import ShippingRestrictionNotice from "@/components/compliance/storefront/compli
21
21
  import ExciseTaxNotice from "@/components/compliance/storefront/compliance/ExciseTaxNotice.astro";
22
22
  import { EXCISE_TAX_DISCLOSURE_TEXT } from "@/lib/compliance/rawComplianceNotices";
23
23
  import IsolatedAgeGate from "@/components/compliance/storefront/islands/IsolatedAgeGate.tsx";
24
- import AuthBadge from "@/components/auth/AuthBadge.astro";
24
+ import AuthBadge from "@/components/access/storefront/auth/AuthBadge.astro";
25
25
  import { referenceTheme } from "@/themes/reference";
26
26
  import { mergeTheme } from "@/themes/schema";
27
- import { organizationLd, websiteLd } from "@/lib/jsonld";
28
- import { composeStructuredData, structuredDataProfile, type StructuredDataPage } from "@/lib/seo/structuredData";
29
- import { canonicalUrl } from "@/lib/seo/urlForm";
30
- import { documentTitle } from "@/lib/seo/documentTitle";
31
- import { nonceInlineTags, prefixApiFormActions, CHROME_BODY_MARKER } from "@/lib/rawMarketingHtml";
32
- import { CHROME_BEHAVIOR_JS, CHROME_HEAD_JS, sanitizeSharedChromeFragment } from "@/lib/rawChrome";
33
- import { ASYNC_CSS_SWAP_JS } from "@/lib/asyncCss";
34
- import { reportTrackingChainHealth } from "@/lib/tracking/interactionHealth";
35
- import { resolveHeaderVariant, resolveFooterVariant } from "@/lib/chrome/variant";
36
- import { splitFooterLegal } from "@/lib/chrome/footerLegal";
37
- import { bindManagedCartAnchors, managedCartHref } from "@/lib/chrome/managedCart";
38
- import type { HeaderVariant, FooterVariant } from "@/lib/chrome/model";
27
+ import { organizationLd, websiteLd } from "@/lib/content/shared/jsonld";
28
+ import { composeStructuredData, structuredDataProfile, type StructuredDataPage } from "@/lib/content/seo/structuredData";
29
+ import { canonicalUrl } from "@/lib/content/seo/urlForm";
30
+ import { documentTitle } from "@/lib/content/seo/documentTitle";
31
+ import { nonceInlineTags, prefixApiFormActions, CHROME_BODY_MARKER } from "@/lib/content/shared/rawMarketingHtml";
32
+ import { CHROME_BEHAVIOR_JS, CHROME_HEAD_JS, sanitizeSharedChromeFragment } from "@/lib/content/shared/rawChrome";
33
+ import { ASYNC_CSS_SWAP_JS } from "@/lib/content/shared/asyncCss";
34
+ import { reportTrackingChainHealth } from "@/lib/measurement/tracking/interactionHealth";
35
+ import { resolveHeaderVariant, resolveFooterVariant } from "@/lib/content/chrome/variant";
36
+ import { splitFooterLegal } from "@/lib/content/chrome/footerLegal";
37
+ import { bindManagedCartAnchors, managedCartHref } from "@/lib/content/chrome/managedCart";
38
+ import type { HeaderVariant, FooterVariant } from "@/lib/content/chrome/model";
39
39
  import { renderIntegrationPhases, INTERACTION_TRACKING_BOOT_JS } from "@tot/public-runtime";
40
- import { readViewerSession } from "@/lib/auth/route";
40
+ import { readViewerSession } from "@/lib/access/auth/route";
41
41
  import AppWidgetFrame from "@/components/integrations/storefront/apps/AppWidgetFrame.astro";
42
42
  import { getRegistryService } from "@/lib/integrations/apps/registryAccess.js";
43
43
  import { renderWidgetSlot } from "@/lib/integrations/apps/widgets/renderSlot.js";
@@ -54,7 +54,7 @@ interface Props {
54
54
  jsonLd?: Record<string, unknown> | Record<string, unknown>[];
55
55
  /**
56
56
  * What the page knows about itself for the tenant's declared structured-data profile
57
- * (lib/seo/structuredData.ts). When the profile declares a graph for `pageType`, that graph
57
+ * (lib/content/seo/structuredData.ts). When the profile declares a graph for `pageType`, that graph
58
58
  * is the page's ONLY JSON-LD and `jsonLd` is not emitted.
59
59
  */
60
60
  structuredData?: StructuredDataPage;
@@ -66,7 +66,7 @@ interface Props {
66
66
  fullBleed?: boolean;
67
67
  /**
68
68
  * Explicit per-page header/footer content-variant override (see
69
- * lib/chrome/model.ts HeaderVariant/FooterVariant). NEVER inferred from the
69
+ * lib/content/chrome/model.ts HeaderVariant/FooterVariant). NEVER inferred from the
70
70
  * route/CSS/title — a page that wants e.g. a minimal checkout header sets
71
71
  * this prop. Absent ⇒ the tenant's chrome-config default
72
72
  * (chrome.header.variant / chrome.footer.variant). An unrecognized value
@@ -76,7 +76,7 @@ interface Props {
76
76
  headerVariant?: HeaderVariant;
77
77
  footerVariant?: FooterVariant;
78
78
  // --- Article SEO hardening: pass-through to <Seo> (all additive) ---
79
- article?: import("@/lib/seo/meta.js").ArticleMeta;
79
+ article?: import("@/lib/content/seo/meta.js").ArticleMeta;
80
80
  imageAlt?: string;
81
81
  imageWidth?: number;
82
82
  imageHeight?: number;
@@ -86,7 +86,7 @@ interface Props {
86
86
  // --- hreflang / <html lang> (additive) ---
87
87
  /** Per-variant `hreflang` alternates for a translated article; threaded to
88
88
  * <Seo>. Absent/empty ⇒ no alternate links (singleton unchanged). */
89
- alternates?: import("@/lib/seo/alternates.js").Alternate[];
89
+ alternates?: import("@/lib/content/seo/alternates.js").Alternate[];
90
90
  /** Overrides `<html lang>` (e.g. a translated article's `inLanguage`). Absent ⇒
91
91
  * the tenant-locale default, so non-translated pages are unchanged. */
92
92
  lang?: string;
@@ -156,7 +156,7 @@ const chrome = await Astro.locals.content.getChrome();
156
156
 
157
157
  // Explicit variant resolution (fail-closed): the page's override wins over
158
158
  // the tenant's chrome-config default; an unrecognized value throws with an
159
- // actionable message rather than silently falling back (lib/chrome/variant.ts).
159
+ // actionable message rather than silently falling back (lib/content/chrome/variant.ts).
160
160
  const resolvedHeaderVariant = resolveHeaderVariant(headerVariant, chrome.header.variant);
161
161
  const resolvedFooterVariant = resolveFooterVariant(footerVariant, chrome.footer.variant);
162
162
  const footerCompliance = [chrome.footer.warning, chrome.complianceStrip]
@@ -256,7 +256,7 @@ const themeHeaderLogo =
256
256
  ? { src: headerLogoSrc, alt: tenant.displayName }
257
257
  : undefined;
258
258
 
259
- // chrome.header.brand (lib/chrome/model.ts ChromeBrand) is the governed,
259
+ // chrome.header.brand (lib/content/chrome/model.ts ChromeBrand) is the governed,
260
260
  // schema-validated brand identity — SOURCE OF TRUTH per field when set,
261
261
  // falling back to the theme-derived values above only where a field is
262
262
  // absent, so a tenant that hasn't authored a brand config is unaffected.
@@ -268,7 +268,7 @@ const headerBrandHref = brand?.href;
268
268
 
269
269
  // Footer bottom bar: a "Legal"-titled column MOVES out of the grid and its
270
270
  // links render beside the copyright — one shared split with the raw renderer
271
- // (lib/chrome/footerLegal.ts), so neither surface can duplicate them.
271
+ // (lib/content/chrome/footerLegal.ts), so neither surface can duplicate them.
272
272
  const { gridColumns: footerColumns, legalLinks: bottomLinks } = splitFooterLegal(
273
273
  chrome.footer.columns,
274
274
  );
@@ -601,7 +601,7 @@ const footerWidgets = await renderWidgetSlot(
601
601
  where PerformanceObserver is absent. This is the per-route-template
602
602
  signal the `core-web-vitals` monitor consumes. */}
603
603
  <script>
604
- import { startConsentGatedWebVitals } from "@/lib/analytics/webVitals";
604
+ import { startConsentGatedWebVitals } from "@/lib/observability/performance/webVitals";
605
605
  startConsentGatedWebVitals();
606
606
  </script>
607
607
 
@@ -631,12 +631,12 @@ const footerWidgets = await renderWidgetSlot(
631
631
  listener, and the install-once marker makes a double install a no-op —
632
632
  which is what makes the raw chrome wrapper spliced into this document
633
633
  (above) safe. Emitted as `is:inline` + the page nonce so it needs no
634
- entry in lib/cspStaticHashes.ts. */}
634
+ entry in lib/access/shared/cspStaticHashes.ts. */}
635
635
  <script is:inline nonce={cspNonce} set:html={INTERACTION_TRACKING_BOOT_JS}></script>
636
636
 
637
637
  {/* Swaps every <AsyncStylesheet>-rendered preload link to rel="stylesheet"
638
638
  once fetched. ONE nonced script per document handles every such link,
639
- however many <AsyncStylesheet> instances rendered (lib/asyncCss.ts —
639
+ however many <AsyncStylesheet> instances rendered (lib/content/shared/asyncCss.ts —
640
640
  the onload="" attribute trick can't carry a nonce under this CSP). A
641
641
  no-op when the page has none. */}
642
642
  <script is:inline nonce={cspNonce} set:html={ASYNC_CSS_SWAP_JS}></script>
@@ -10,8 +10,8 @@ these implement.
10
10
  ## Tenant envelope
11
11
 
12
12
  The canonical tenant envelope is `AdminTenantEnvelope`, defined in
13
- `lib/adminTenantEnvelope.ts` (admin-tenant-mode) and re-exported from
14
- `lib/admin/envelope.ts` so everything under `lib/admin/**` can import it from
13
+ `lib/access/shared/adminTenantEnvelope.ts` (admin-tenant-mode) and re-exported from
14
+ `lib/access/admin/envelope.ts` so everything under `lib/admin/**` can import it from
15
15
  a stable relative path:
16
16
 
17
17
  ```ts
@@ -29,7 +29,7 @@ refused not hidden-only). `targetTenant` is the sole key mock services use to
29
29
  select/derive data. **Authorization must always be evaluated against
30
30
  `targetTenant`, never `adminAppTenant`** (decision `tenant-envelope-contract`).
31
31
 
32
- (`lib/admin/envelope.ts` used to declare its own 2-field copy of this
32
+ (`lib/access/admin/envelope.ts` used to declare its own 2-field copy of this
33
33
  interface — data-view-contracts and admin-tenant-mode were built in parallel
34
34
  per that decision, with no live coordination. Reconciled here per decision
35
35
  `envelope-type-duplication-follow-up`: one canonical type, re-exported.)
@@ -10,7 +10,7 @@
10
10
  * only (window.__toTAdminAsk + a "tot:admin-ask" CustomEvent), never sent over
11
11
  * the network.
12
12
  */
13
- import { buildAskEnvelope, type AskEnvelope } from "./ai/askEnvelope";
13
+ import { buildAskEnvelope, type AskEnvelope } from "../../automation/ai/askEnvelope";
14
14
 
15
15
  /** Static shell data shared by server-rendered navigation and browser startup. */
16
16
  export const ADMIN_SHELL_CONFIG = {
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * Canonical tenant envelope for the admin console lives in
3
- * `lib/adminTenantEnvelope.ts` (admin-tenant-mode) — it carries the real
3
+ * `lib/access/shared/adminTenantEnvelope.ts` (admin-tenant-mode) — it carries the real
4
4
  * staff-override authorization (`resolveAdminTenantMode`) that admin.astro
5
5
  * actually runs. This module re-exports that type so every mock service under
6
6
  * `lib/admin/**` can keep importing it from a stable relative path
7
7
  * (`../../envelope`) without declaring a second, competing interface.
8
8
  */
9
- export type { AdminTenantEnvelope } from "@/lib/adminTenantEnvelope";
9
+ export type { AdminTenantEnvelope } from "@/lib/access/shared/adminTenantEnvelope";
@@ -7,8 +7,8 @@
7
7
  */
8
8
 
9
9
  import type { CheckoutStyle } from "@tot/public-runtime";
10
- import type { ApprovalMode } from "../ai/approvalMode";
11
- import type { AuditEvent } from "../ai/audit";
10
+ import type { ApprovalMode } from "../../../automation/ai/approvalMode";
11
+ import type { AuditEvent } from "../../../automation/ai/audit";
12
12
 
13
13
  export type { ApprovalMode };
14
14
  export type { CheckoutStyle };
@@ -17,8 +17,8 @@
17
17
  * Astro/I-O wrapper the routes call.
18
18
  */
19
19
  import type { APIContext } from "astro";
20
- import { readViewerSession } from "@/lib/auth/route";
21
- import { resolveAdminEntry, type AdminEntryDecision } from "@/lib/auth/adminEntry";
20
+ import { readViewerSession } from "@/lib/access/auth/route";
21
+ import { resolveAdminEntry, type AdminEntryDecision } from "@/lib/access/auth/adminEntry";
22
22
  import type { SessionRecord } from "./session.js";
23
23
 
24
24
  export type AdminApiAccess =
@@ -31,14 +31,14 @@
31
31
  */
32
32
  import type { SessionRecord } from "./session.js";
33
33
  import { sessionHostCapability } from "./loginGate.js";
34
- import { staffAdmits } from "@/lib/dashboard/tenantSelection";
34
+ import { staffAdmits } from "@/lib/access/dashboard/tenantSelection";
35
35
  import {
36
36
  decideIsOwner,
37
37
  isOwnerCapability,
38
38
  resolveShipCapabilities,
39
39
  type Capability,
40
40
  type ShipCapabilities,
41
- } from "@/lib/shared/capability";
41
+ } from "@/lib/access/shared/capability";
42
42
 
43
43
  /** Which entry case a viewer is in, for chrome + the DoD test matrix. */
44
44
  export type AdminEntryPrincipal =
@@ -25,7 +25,7 @@
25
25
  import type { SessionRecord } from "./session.js";
26
26
  import { sessionAdmitsHost } from "./loginGate.js";
27
27
  import { safeNext } from "./route.js";
28
- import { selectTenant } from "@/lib/dashboard/tenantSelection";
28
+ import { selectTenant } from "@/lib/access/dashboard/tenantSelection";
29
29
 
30
30
  /** The tenant-selection surface, in both host-routed and tenant-first path forms. */
31
31
  export function isAdminSelectPath(pathname: string): boolean {
@@ -31,7 +31,7 @@ import {
31
31
  TENANT_ROLES,
32
32
  isTenantRole,
33
33
  type TenantRole,
34
- } from "@/lib/shared/capability";
34
+ } from "@/lib/access/shared/capability";
35
35
 
36
36
  /** tot's issuer — consumers pin/allowlist this (`auth.jwt.issuer`). */
37
37
  export const TOT_ISSUER = "tokenoftrust-internal-ops";
@@ -13,8 +13,8 @@
13
13
  * drifting apart. The auth surface itself (/auth/*, /api/auth/*) is always exempt
14
14
  * so a visitor can actually sign in.
15
15
  */
16
- import { hostInGateList } from "@/lib/demoGate";
17
- import { normalizeMemberships, staffAdmits } from "@/lib/dashboard/tenantSelection";
16
+ import { hostInGateList } from "@/lib/access/shared/demoGate";
17
+ import { normalizeMemberships, staffAdmits } from "@/lib/access/dashboard/tenantSelection";
18
18
  import type { SessionRecord } from "./session.js";
19
19
 
20
20
  export type GateMode = "password" | "login";
@@ -27,8 +27,8 @@
27
27
  * bodies, response shapes) is contract-fixed.
28
28
  */
29
29
  import { readEnv } from "@/lib/env";
30
- import { diagEmail } from "@/lib/diag/redact";
31
- import { FetchHttpTransport, type HttpResponseLike, type HttpTransport } from "@/lib/http/fetchTransport";
30
+ import { diagEmail } from "@/lib/observability/diag/redact";
31
+ import { FetchHttpTransport, type HttpResponseLike, type HttpTransport } from "@/lib/developer-experience/http/fetchTransport";
32
32
  import { classifyStepUp, type StepUpChallenge, type StepUpObligation } from "./stepUpChallenge.js";
33
33
 
34
34
  /** `send` is deliberately opaque — it never reveals whether the email was eligible. */
@@ -49,7 +49,7 @@ export type AccessCodeVerifyResult =
49
49
  * Present-usually, NOT guaranteed: tot returns the flat result without it
50
50
  * if signing hiccups (contract §6 graceful degradation). Phase 3 verifies
51
51
  * this OFFLINE and derives the session from its claims rather than trusting
52
- * the flat `roles`/`capability`. See `@/lib/auth/identityToken`.
52
+ * the flat `roles`/`capability`. See `@/lib/access/auth/identityToken`.
53
53
  */
54
54
  id_token?: string;
55
55
  }
@@ -128,7 +128,7 @@ export interface TotAccessClient {
128
128
  * (signer degradation, contract §6); the consumer fails closed when it's absent.
129
129
  *
130
130
  * The `step-up-required`/`success-pending` variants carry tot20's RFC 9470
131
- * obligations (see `@/lib/auth/stepUpChallenge`) instead of a plain failure
131
+ * obligations (see `@/lib/access/auth/stepUpChallenge`) instead of a plain failure
132
132
  * reason, so the caller can drive the SMS completion loop rather than just
133
133
  * showing a generic "invalid code" error.
134
134
  */
@@ -22,8 +22,8 @@
22
22
  * the page, matching `@/lib/dashboard/tenantSelection` and `@/lib/auth/loginGate`.
23
23
  */
24
24
  import { storefrontModeAllowsGoLive } from "@tot/public-runtime";
25
- import { membershipFor, staffAdmits } from "@/lib/dashboard/tenantSelection";
26
- import type { StaffAdmission, TenantMembership } from "@/lib/dashboard/tenantSelection";
25
+ import { membershipFor, staffAdmits } from "@/lib/access/dashboard/tenantSelection";
26
+ import type { StaffAdmission, TenantMembership } from "@/lib/access/dashboard/tenantSelection";
27
27
 
28
28
  /** What every viewer of an unpaid store is told in place of the delegate section. */
29
29
  export const UNPAID_DELEGATION_NOTE =
@@ -12,7 +12,7 @@
12
12
  * scoped to the returned staffRoles capability. It is stamped on the session as a
13
13
  * DISTINCT marker from `tenants[]` — never a synthesized membership.
14
14
  */
15
- import type { SessionRecord, StaffSelection } from "@/lib/auth/session";
15
+ import type { SessionRecord, StaffSelection } from "@/lib/access/auth/session";
16
16
 
17
17
  /**
18
18
  * Staff selection lifetime. Deliberately short: staff cross-vendor access is a
@@ -17,7 +17,7 @@
17
17
  * tot20 populates all of the email's memberships. Flagged to the workstream lead.
18
18
  */
19
19
 
20
- import type { StaffSelection } from "@/lib/auth/session";
20
+ import type { StaffSelection } from "@/lib/access/auth/session";
21
21
 
22
22
  /** One tenant membership carried in the verified session. */
23
23
  export interface TenantMembership {
@@ -1,8 +1,8 @@
1
1
  import { DEFAULT_CHECKOUT_STYLE } from "@tot/public-runtime";
2
- import type { AdminTenantEnvelope } from "../../envelope";
3
- import { memoizeByEnvelope } from "../../memoizeByEnvelope";
4
- import { MOCK_ANCHOR_ISO, offsetIso, randomInt, seededRandom } from "../../seed";
5
- import type { SettingsAuditEvent, SettingsSection, SettingsViewModel } from "../../viewmodels/settings";
2
+ import type { AdminTenantEnvelope } from "../admin/envelope";
3
+ import { memoizeByEnvelope } from "../../developer-experience/admin/memoizeByEnvelope";
4
+ import { MOCK_ANCHOR_ISO, offsetIso, randomInt, seededRandom } from "../../developer-experience/admin/seed";
5
+ import type { SettingsAuditEvent, SettingsSection, SettingsViewModel } from "../admin/viewmodels/settings";
6
6
 
7
7
  const SECTION_DEFS: Omit<SettingsSection, "riskyChangeReview">[] = [
8
8
  { key: "store", label: "Store", summary: "Store profile, branding, and white-label copy." },
@@ -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),