@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
@@ -17,7 +17,7 @@
17
17
  * Nothing here is ever reported as verified unless tot-mcp said so: an unconfigured seam,
18
18
  * a non-200 or a timeout is `unavailable`, which the UI shows as unverified.
19
19
  */
20
- import { callMcpService } from "@/lib/http/mcpServiceCall";
20
+ import { callMcpService } from "@/lib/developer-experience/http/mcpServiceCall";
21
21
 
22
22
  const EXPLAIN_TIMEOUT_MS = 8000;
23
23
 
@@ -21,9 +21,9 @@
21
21
  * request asks for: the staff check gates evaluation of the request
22
22
  * entirely, not just the picker's visibility.
23
23
  */
24
- import type { SessionRecord } from "@/lib/auth/session";
25
- import { isStaffSession } from "@/lib/dashboard/staffAdmission";
26
- import { membershipFor, normalizeMemberships, type TenantMembership } from "@/lib/dashboard/tenantSelection";
24
+ import type { SessionRecord } from "@/lib/access/auth/session";
25
+ import { isStaffSession } from "@/lib/access/dashboard/staffAdmission";
26
+ import { membershipFor, normalizeMemberships, type TenantMembership } from "@/lib/access/dashboard/tenantSelection";
27
27
 
28
28
  export interface AdminTenantEnvelope {
29
29
  /** The tenant that actually served this request. */
@@ -53,10 +53,10 @@
53
53
  * control-plane cluster stays self-contained (see `.dependency-cruiser.cjs`).
54
54
  */
55
55
  import { readEnv } from "@/lib/env";
56
- import { callMcpService } from "@/lib/http/mcpServiceCall";
57
- import { diagEmail } from "@/lib/diag/redact";
58
- import { checkStorePreviewReady, type PreflightDecision } from "@/lib/shared/invitePreflight";
59
- import { explainDeveloperAccess, type AccessVerification } from "@/lib/shared/accessExplain";
56
+ import { callMcpService } from "@/lib/developer-experience/http/mcpServiceCall";
57
+ import { diagEmail } from "@/lib/observability/diag/redact";
58
+ import { checkStorePreviewReady, type PreflightDecision } from "@/lib/access/shared/invitePreflight";
59
+ import { explainDeveloperAccess, type AccessVerification } from "@/lib/access/shared/accessExplain";
60
60
 
61
61
  /**
62
62
  * The header carrying the storefront-signed staff BROKER ASSERTION to tot20
@@ -22,7 +22,7 @@
22
22
  * mirroring recordDeveloperAppBinding's "skipped when not-configured" stance — we
23
23
  * never break invites just because the MCP is briefly unreachable.
24
24
  */
25
- import { callMcpService } from "@/lib/http/mcpServiceCall";
25
+ import { callMcpService } from "@/lib/developer-experience/http/mcpServiceCall";
26
26
 
27
27
  /** How long we'll wait on the preview-status read before failing open. */
28
28
  const PREFLIGHT_TIMEOUT_MS = 4000;
@@ -76,8 +76,8 @@
76
76
  * swaps in the Http client with no call-site change.
77
77
  */
78
78
  import { readEnv } from "@/lib/env";
79
- import { diagEmail } from "@/lib/diag/redact";
80
- import { BROKER_ASSERTION_HEADER, BROKER_PRIVATE_KEY_ENV } from "@/lib/auth/brokerAssertion";
79
+ import { diagEmail } from "@/lib/observability/diag/redact";
80
+ import { BROKER_ASSERTION_HEADER, BROKER_PRIVATE_KEY_ENV } from "@/lib/access/auth/brokerAssertion";
81
81
 
82
82
  /** A human grantee — the only principal type this HTTP surface accepts. */
83
83
  export interface UserPrincipal {
@@ -30,7 +30,7 @@
30
30
  * app-binding WRITE (`recordDeveloperAppBinding`) targets, so this READ and that
31
31
  * WRITE always agree on which subject-capability store they speak to.
32
32
  */
33
- import { callMcpService } from "@/lib/http/mcpServiceCall";
33
+ import { callMcpService } from "@/lib/developer-experience/http/mcpServiceCall";
34
34
  import type { Capability } from "./capability.js";
35
35
 
36
36
  /** Minimal GET transport (mirrors `dev/previewStatus.ts` — decoupled by design). */
@@ -1,5 +1,5 @@
1
- import type { AdminTenantEnvelope } from "../../admin/envelope";
2
- import { memoizeByEnvelope } from "../../admin/memoizeByEnvelope";
1
+ import type { AdminTenantEnvelope } from "../../access/admin/envelope";
2
+ import { memoizeByEnvelope } from "../../developer-experience/admin/memoizeByEnvelope";
3
3
  import type { EvidenceReference } from "../evidence/evidenceReference";
4
4
  import { getCustomersViewModel } from "../../customers/fixtures/customers";
5
5
  import { getOrdersViewModel } from "../../orders/fixtures/orders";
@@ -48,11 +48,11 @@ import type {
48
48
  ActivityPayload,
49
49
  } from "@tot/public-runtime";
50
50
  import type { ActionKey } from "@tot/public-runtime";
51
- import { readViewerSession } from "@/lib/auth/route";
52
- import { sessionHostCapability } from "@/lib/auth/loginGate";
53
- import { isStaffSession } from "@/lib/dashboard/staffAdmission";
51
+ import { readViewerSession } from "@/lib/access/auth/route";
52
+ import { sessionHostCapability } from "@/lib/access/auth/loginGate";
53
+ import { isStaffSession } from "@/lib/access/dashboard/staffAdmission";
54
54
  import { readEnv } from "@/lib/env";
55
- import { isOwnerCapability } from "@/lib/shared/capability";
55
+ import { isOwnerCapability } from "@/lib/access/shared/capability";
56
56
  import { hashActorId, recordActivity } from "./recordActivity";
57
57
 
58
58
  /** The minimal viewer chrome the middleware stamps on `locals.viewer`. */
@@ -11,7 +11,7 @@
11
11
  * baked in at BUILD time: astro.config.mjs's Vite `define` replaces the
12
12
  * `__GIT_SHA__` token with a string literal of the build's commit (CI-provided
13
13
  * `GIT_SHA`/`WORKERS_CI_COMMIT_SHA`/`GITHUB_SHA`, else local `git rev-parse`,
14
- * else "unknown"). This is the SAME source /health already reports (lib/health.ts)
14
+ * else "unknown"). This is the SAME source /health already reports (lib/observability/shared/health.ts)
15
15
  * — we read it through the identical `typeof` guard so both agree by construction,
16
16
  * and so the value is safe under vitest (where the define isn't applied → "unknown").
17
17
  *
@@ -2,11 +2,11 @@ export { getOrdersViewModel } from "../../../orders/fixtures/orders";
2
2
  export { getProductsViewModel } from "../../../catalog/fixtures/products";
3
3
  export { getCustomersViewModel } from "../../../customers/fixtures/customers";
4
4
  export { getReportingViewModel } from "../../../reporting/fixtures/reporting";
5
- export { getSettingsViewModel } from "./settings";
5
+ export { getSettingsViewModel } from "../../../access/fixtures/settings";
6
6
  export { getCheckoutSettingsViewModel } from "../../../checkout/fixtures/checkoutSettings";
7
7
  export type { CheckoutSettingsViewModel } from "../../../checkout/fixtures/checkoutSettings";
8
8
  export { getSubscriptionsViewModel } from "../../../subscriptions/fixtures/subscriptions";
9
- export { getAiWorkflowsViewModel } from "./aiWorkflows";
9
+ export { getAiWorkflowsViewModel } from "../../../automation/fixtures/aiWorkflows";
10
10
  export { getEvidenceViewModel } from "../../../activity/fixtures/evidence";
11
- export { SEEDED_TENANTS, tenantProfile } from "./tenants";
12
- export type { SeededTenantProfile, MockVertical } from "./tenants";
11
+ export { SEEDED_TENANTS, tenantProfile } from "../../../access/fixtures/tenants";
12
+ export type { SeededTenantProfile, MockVertical } from "../../../access/fixtures/tenants";
@@ -8,7 +8,7 @@
8
8
  * - referenced Shopify CDN -> Shopify's native ?width= scheme
9
9
  * - anything else usable -> the URL as-is, no srcset
10
10
  */
11
- import { placeholderDataUri, isUsableImageUrl } from "../../placeholder.js";
11
+ import { placeholderDataUri, isUsableImageUrl } from "../../content/shared/placeholder.js";
12
12
 
13
13
  const RESPONSIVE_IMAGE_WIDTHS = [320, 480, 640, 960, 1280, 1600] as const;
14
14
 
@@ -5,9 +5,9 @@
5
5
  * come from `lib/admin/ai`, which formalizes the approval/evidence models.
6
6
  */
7
7
 
8
- import type { ApprovalMode } from "../ai/approvalMode";
9
- import type { AiRecommendation } from "../ai/recommendation";
10
- import type { AuditEvent } from "../ai/audit";
8
+ import type { ApprovalMode } from "../../ai/approvalMode";
9
+ import type { AiRecommendation } from "../../ai/recommendation";
10
+ import type { AuditEvent } from "../../ai/audit";
11
11
 
12
12
  export type { ApprovalMode };
13
13
 
@@ -6,7 +6,7 @@
6
6
  * this is emitted for dev inspection only (see adminShell.ts's `data-admin-ask`
7
7
  * click handler), never sent over the network.
8
8
  */
9
- import type { AdminTenantEnvelope } from "../envelope";
9
+ import type { AdminTenantEnvelope } from "../../access/admin/envelope";
10
10
 
11
11
  export type AdminRole = "internal_staff" | "merchant_operator";
12
12
 
@@ -7,10 +7,10 @@
7
7
  * The other 5 workflows remain scaffold-only until their own units connect
8
8
  * real source data.
9
9
  */
10
- import type { AdminTenantEnvelope } from "../envelope";
11
- import { getOrdersViewModel, getProductsViewModel, getEvidenceViewModel } from "../services/mock";
12
- import { MOCK_ANCHOR_ISO, offsetIso, randomInt, seededRandom } from "../seed";
13
- import { OPERATIONAL_WORKFLOW_KEYS, type OperationalWorkflowKey } from "../viewmodels/aiWorkflows";
10
+ import type { AdminTenantEnvelope } from "../../access/admin/envelope";
11
+ import { getOrdersViewModel, getProductsViewModel, getEvidenceViewModel } from "../../admin/services/mock/index";
12
+ import { MOCK_ANCHOR_ISO, offsetIso, randomInt, seededRandom } from "../../developer-experience/admin/seed";
13
+ import { OPERATIONAL_WORKFLOW_KEYS, type OperationalWorkflowKey } from "../admin/viewmodels/aiWorkflows";
14
14
  import type { ApprovalMode } from "./approvalMode";
15
15
  import type { AuditEvent } from "./audit";
16
16
  import type { AiRecommendation } from "./recommendation";
@@ -1,7 +1,7 @@
1
- import type { AdminTenantEnvelope } from "../../envelope";
2
- import { memoizeByEnvelope } from "../../memoizeByEnvelope";
3
- import { MOCK_ANCHOR_ISO, offsetIso, pick, randomInt, seededRandom } from "../../seed";
4
- import { AI_WORKFLOW_NAMES, OPERATIONAL_WORKFLOW_KEYS, type AiWorkflowsViewModel, type ApprovalMode, type WorkflowRecord, type WorkflowStatus } from "../../viewmodels/aiWorkflows";
1
+ import type { AdminTenantEnvelope } from "../../access/admin/envelope";
2
+ import { memoizeByEnvelope } from "../../developer-experience/admin/memoizeByEnvelope";
3
+ import { MOCK_ANCHOR_ISO, offsetIso, pick, randomInt, seededRandom } from "../../developer-experience/admin/seed";
4
+ import { AI_WORKFLOW_NAMES, OPERATIONAL_WORKFLOW_KEYS, type AiWorkflowsViewModel, type ApprovalMode, type WorkflowRecord, type WorkflowStatus } from "../admin/viewmodels/aiWorkflows";
5
5
 
6
6
  const OWNERS = ["Ops", "Trust & Safety", "Growth", "Fulfillment"];
7
7
  const APPROVAL_MODES: ApprovalMode[] = ["draft_only", "approval_required", "guarded_automation"];
@@ -2,7 +2,7 @@
2
2
  * Tenant base-path helpers.
3
3
  *
4
4
  * When a request selects its tenant via a `/<domain>/` path prefix (see
5
- * lib/tenantRouting.ts), every same-origin link must carry that prefix or the
5
+ * lib/access/shared/tenantRouting.ts), every same-origin link must carry that prefix or the
6
6
  * visitor falls out of the tenant. Host-routed requests have an empty base path
7
7
  * and links are returned unchanged.
8
8
  *
@@ -34,7 +34,7 @@
34
34
  * covers that one, so the two cannot drift apart unnoticed.
35
35
  *
36
36
  * Consumers: {@link withBase} (and through it {@link bindBasePathAnchors}) and
37
- * `prefixTenantLinks` (lib/rawMarketingHtml.ts).
37
+ * `prefixTenantLinks` (lib/content/shared/rawMarketingHtml.ts).
38
38
  */
39
39
  export const ROOT_SERVED_HREF_NAMESPACES = [
40
40
  "_a",
@@ -1,5 +1,5 @@
1
- import type { AdminTenantEnvelope } from "../../admin/envelope";
2
- import { MOCK_ANCHOR_ISO, offsetIso, pick, randomBool, randomInt, seededRandom } from "../../admin/seed";
1
+ import type { AdminTenantEnvelope } from "../../access/admin/envelope";
2
+ import { MOCK_ANCHOR_ISO, offsetIso, pick, randomBool, randomInt, seededRandom } from "../../developer-experience/admin/seed";
3
3
  import type {
4
4
  ExciseCheckKey,
5
5
  ExciseReadinessCheck,
@@ -8,8 +8,8 @@ import type {
8
8
  ProductsViewModel,
9
9
  ProductVariant,
10
10
  } from "../admin/viewmodels/products";
11
- import { tenantProfile } from "../../admin/services/mock/tenants";
12
- import { memoizeByEnvelope } from "../../admin/memoizeByEnvelope";
11
+ import { tenantProfile } from "../../access/fixtures/tenants";
12
+ import { memoizeByEnvelope } from "../../developer-experience/admin/memoizeByEnvelope";
13
13
 
14
14
  // Must stay index-aligned with orders.ts's ITEM_POOLS: a product's id is
15
15
  // `prod-<tenant>-<position here>`, and orders.ts derives each order's productId
@@ -1,4 +1,4 @@
1
- import type { FeaturedProductsBlock } from "@/lib/storyblok/content-model";
1
+ import type { FeaturedProductsBlock } from "@/lib/content/storyblok/content-model";
2
2
 
3
3
  export function featuredProductsPresentationView(presentation: FeaturedProductsBlock["presentation"]) {
4
4
  return presentation === "carousel" ? "carousel" : "grid";
@@ -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 "../../storyblok/provider.js";
29
+ import { LocalContentProvider, type ContentProvider } from "../../content/storyblok/provider.js";
30
30
 
31
31
  export type CatalogArtifactSource = Pick<
32
32
  ContentProvider,
@@ -20,8 +20,8 @@
20
20
  * Pure (no I/O, no Astro) — the caller supplies the already-read viewer session —
21
21
  * so it is unit-testable in isolation.
22
22
  */
23
- import { resolveAdminTenantMode } from "@/lib/adminTenantEnvelope";
24
- import type { SessionRecord } from "@/lib/auth/session";
23
+ import { resolveAdminTenantMode } from "@/lib/access/shared/adminTenantEnvelope";
24
+ import type { SessionRecord } from "@/lib/access/auth/session";
25
25
 
26
26
  export type WriteTargetResult =
27
27
  | { ok: true; targetTenant: string }
@@ -18,7 +18,7 @@ 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 "../../admin/envelope";
21
+ import type { AdminTenantEnvelope } from "../../access/admin/envelope";
22
22
  import {
23
23
  buildCheckoutSettingsFields,
24
24
  deriveCheckoutSettings,
@@ -175,7 +175,7 @@ export interface PollDeps {
175
175
 
176
176
  /**
177
177
  * True when the login gate, not the preflight route, answered: the store is not
178
- * public and this viewer holds no session (see `lib/auth/gatePage.ts`). Still fail
178
+ * public and this viewer holds no session (see `lib/access/auth/gatePage.ts`). Still fail
179
179
  * closed — the caller only names the reason instead of reporting an outage.
180
180
  */
181
181
  export function isStoreNotPublicRefusal(res: Pick<Response, "status" | "headers">): boolean {
@@ -40,7 +40,7 @@ import {
40
40
  type HttpGetTransport,
41
41
  type HttpResponseLike,
42
42
  type HttpTransport,
43
- } from "@/lib/http/fetchTransport";
43
+ } from "@/lib/developer-experience/http/fetchTransport";
44
44
 
45
45
  // --- Gate normalization -----------------------------------------------------
46
46
 
@@ -1,4 +1,4 @@
1
- import type { SessionRecord } from "@/lib/auth/session.js";
1
+ import type { SessionRecord } from "@/lib/access/auth/session.js";
2
2
  import type { BlogAccess } from "./types.js";
3
3
 
4
4
  /**
@@ -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 "../env.js";
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
- "../../../../../tenants/*/content/*/posts/*.json",
33
- "../../../../../tenants/e2e/*/content/*/posts/*.json",
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
- "../../../../../tenants/*/content/*/redirects.json",
40
- "../../../../../tenants/e2e/*/content/*/redirects.json",
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
- "../../../../../tenants/*/content/*/authors.json",
47
- "../../../../../tenants/e2e/*/content/*/authors.json",
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
- "../../../../../tenants/*/content/*/settings.json",
54
- "../../../../../tenants/e2e/*/content/*/settings.json",
53
+ "../../../../../../tenants/*/content/*/settings.json",
54
+ "../../../../../../tenants/e2e/*/content/*/settings.json",
55
55
  ],
56
56
  { import: "default" },
57
57
  );
@@ -15,15 +15,15 @@ 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
- 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";
21
+ import { readViewerSession, safeNext } from "@/lib/access/auth/route.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
- import type { SessionRecord } from "@/lib/auth/session.js";
26
+ import type { SessionRecord } from "@/lib/access/auth/session.js";
27
27
 
28
28
  export interface BlogPostViewPropsV1 {
29
29
  post: BlogPost;
@@ -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 "../env.js";
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
- "../../../../../tenants/*/content/blog/index.json",
38
- "../../../../../tenants/e2e/*/content/blog/index.json",
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
- "../../../../../tenants/*/content/blog/posts/*.json",
45
- "../../../../../tenants/e2e/*/content/blog/posts/*.json",
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
- "../../../../../tenants/*/content/blog/redirects.json",
52
- "../../../../../tenants/e2e/*/content/blog/redirects.json",
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",
@@ -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>;
@@ -1,4 +1,4 @@
1
- import type { ChromeConfig } from "./chrome/model.js";
1
+ import type { ChromeConfig } from "../chrome/model.js";
2
2
 
3
3
  /**
4
4
  * One breadcrumb trail per page. A page builds it ONCE with `siteTrail` and hands the same array
@@ -1,4 +1,4 @@
1
- import type { HeroBlock } from "@/lib/storyblok/content-model";
1
+ import type { HeroBlock } from "@/lib/content/storyblok/content-model";
2
2
  import { withBase } from "@/lib/basePath";
3
3
 
4
4
  export function heroAutoplayAllowed(input: {
@@ -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 "./catalog/tot/query.js";
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 "./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";
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 "./chrome/model.js";
50
- import { isSafeAgeGateHref, resolveAgeGateCopy, resolveChromeAssignment } from "./chrome/model.js";
51
- import { resolveHeaderVariant } from "./chrome/variant.js";
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 {
@@ -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);
@@ -22,9 +22,9 @@ import {
22
22
  type EffectivePlan,
23
23
  type ConsentSnapshot,
24
24
  } from "@tot/public-runtime";
25
- import { reportTrackingChainHealth } from "./tracking/interactionHealth.js";
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 "./basePath.js";
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
@@ -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
- "../../../../tenants/*/content/themes/*.json",
15
- "../../../../tenants/e2e/*/content/themes/*.json",
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.