create-ailk 0.38.0 → 0.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (304) hide show
  1. package/dist/add-route.js +16 -1
  2. package/dist/body-heading.d.ts +2 -1
  3. package/dist/body-heading.js +31 -3
  4. package/dist/derive-architecture.js +3 -1
  5. package/dist/module-architecture.js +0 -3
  6. package/dist/remove-module.js +27 -14
  7. package/dist/routes.d.ts +36 -2
  8. package/dist/routes.js +269 -23
  9. package/dist/site-manifest.js +6 -4
  10. package/dist/site-roster.d.ts +11 -3
  11. package/dist/site-roster.js +48 -22
  12. package/dist/surfaces.d.ts +13 -3
  13. package/dist/surfaces.js +128 -194
  14. package/dist/sync-routes.js +22 -5
  15. package/dist/template-record.js +3 -1
  16. package/dist/topology.d.ts +11 -0
  17. package/dist/topology.js +253 -3
  18. package/package.json +3 -3
  19. package/templates/apps/web/CLAUDE.md +32 -4
  20. package/templates/apps/web/__tests__/__mocks__/next-intl-server.ts +6 -1
  21. package/templates/apps/web/__tests__/__mocks__/next-intl.ts +6 -1
  22. package/templates/apps/web/__tests__/auth/seam.test.ts +34 -0
  23. package/templates/apps/web/account.config.tsx +2 -3
  24. package/templates/apps/web/app/[locale]/(authed)/account/connect/__tests__/page.test.tsx +1 -1
  25. package/templates/apps/web/app/[locale]/(authed)/account/connect/page.tsx +1 -1
  26. package/templates/apps/web/app/[locale]/(authed)/signed-out-gate.generated.tsx +1 -1
  27. package/templates/apps/web/app/[locale]/layout.tsx +2 -2
  28. package/templates/apps/web/auth.config.tsx +107 -0
  29. package/templates/apps/web/auth.ts +2 -1
  30. package/templates/apps/web/i18n/request.ts +13 -2
  31. package/templates/apps/web/jest.config.cjs +10 -0
  32. package/templates/apps/web/lib/__tests__/deck-page.test.ts +9 -0
  33. package/templates/apps/web/lib/__tests__/fixtures/site-topology.ts +3 -0
  34. package/templates/apps/web/lib/__tests__/in-page-magnet-self-request.test.ts +1 -1
  35. package/templates/apps/web/lib/__tests__/in-page-magnet.test.ts +2 -2
  36. package/templates/apps/web/lib/__tests__/pricing-page.test.ts +1 -1
  37. package/templates/apps/web/lib/__tests__/server-api.test.ts +1 -1
  38. package/templates/apps/web/lib/__tests__/structured-data.test.tsx +17 -4
  39. package/templates/apps/web/lib/in-page-magnet.ts +2 -2
  40. package/templates/apps/web/lib/pricing-page.ts +3 -3
  41. package/templates/apps/web/lib/server-api.ts +1 -1
  42. package/templates/apps/web/{app/[locale]/contact → lib}/site-contact-email.ts +1 -1
  43. package/templates/apps/web/{app/[locale]/contact → lib}/site-contact-lines.ts +1 -1
  44. package/templates/apps/web/lib/site-header.ts +1 -1
  45. package/templates/apps/web/lib/topology.generated.ts +5 -0
  46. package/templates/apps/web/messages/en.json +0 -271
  47. package/templates/apps/web/middleware.ts +12 -25
  48. package/templates/apps/web/next.config.mjs +15 -0
  49. package/templates/apps/web/package.json +2 -0
  50. package/templates/apps/web/site-pages.config.tsx +85 -0
  51. package/templates/apps/web/types/messages.d.ts +6 -1
  52. package/templates/tools/body-heading.ts +30 -3
  53. package/versions.json +50 -48
  54. package/templates/apps/web/app/[locale]/(auth)/__tests__/auth-pages.test.tsx +0 -322
  55. package/templates/apps/web/app/[locale]/(auth)/__tests__/password-reset.test.tsx +0 -554
  56. package/templates/apps/web/app/[locale]/(auth)/consent/__tests__/consent-actions.test.ts +0 -56
  57. package/templates/apps/web/app/[locale]/(auth)/consent/__tests__/page.test.tsx +0 -164
  58. package/templates/apps/web/app/[locale]/(auth)/consent/consent-form.tsx +0 -132
  59. package/templates/apps/web/app/[locale]/(auth)/consent/consent.actions.ts +0 -51
  60. package/templates/apps/web/app/[locale]/(auth)/consent/page.tsx +0 -144
  61. package/templates/apps/web/app/[locale]/(auth)/forgot-password/forgot-password-card.tsx +0 -101
  62. package/templates/apps/web/app/[locale]/(auth)/forgot-password/page.tsx +0 -111
  63. package/templates/apps/web/app/[locale]/(auth)/layout.tsx +0 -81
  64. package/templates/apps/web/app/[locale]/(auth)/legal-footnote.tsx +0 -35
  65. package/templates/apps/web/app/[locale]/(auth)/reset-password/__tests__/return.test.tsx +0 -179
  66. package/templates/apps/web/app/[locale]/(auth)/reset-password/page.tsx +0 -157
  67. package/templates/apps/web/app/[locale]/(auth)/reset-password/reset-password-card.tsx +0 -126
  68. package/templates/apps/web/app/[locale]/(auth)/sign-in/__tests__/next-path.test.ts +0 -54
  69. package/templates/apps/web/app/[locale]/(auth)/sign-in/__tests__/page.test.tsx +0 -628
  70. package/templates/apps/web/app/[locale]/(auth)/sign-in/__tests__/remembered-method.test.ts +0 -43
  71. package/templates/apps/web/app/[locale]/(auth)/sign-in/__tests__/sign-in-card.test.tsx +0 -266
  72. package/templates/apps/web/app/[locale]/(auth)/sign-in/next-path.ts +0 -20
  73. package/templates/apps/web/app/[locale]/(auth)/sign-in/page.tsx +0 -234
  74. package/templates/apps/web/app/[locale]/(auth)/sign-in/remembered-method.ts +0 -37
  75. package/templates/apps/web/app/[locale]/(auth)/sign-in/sign-in-card.tsx +0 -323
  76. package/templates/apps/web/app/[locale]/(auth)/sign-in/sign-in-text.ts +0 -93
  77. package/templates/apps/web/app/[locale]/(auth)/sign-up/__tests__/page.test.tsx +0 -301
  78. package/templates/apps/web/app/[locale]/(auth)/sign-up/__tests__/sign-up-card.test.tsx +0 -309
  79. package/templates/apps/web/app/[locale]/(auth)/sign-up/page.tsx +0 -201
  80. package/templates/apps/web/app/[locale]/(auth)/sign-up/sign-up-card.tsx +0 -366
  81. package/templates/apps/web/app/[locale]/(auth)/use-auth-card-flow.ts +0 -116
  82. package/templates/apps/web/app/[locale]/(auth)/verify-email/__tests__/actions.test.ts +0 -94
  83. package/templates/apps/web/app/[locale]/(auth)/verify-email/actions.ts +0 -77
  84. package/templates/apps/web/app/[locale]/(auth)/verify-email/page.tsx +0 -154
  85. package/templates/apps/web/app/[locale]/(authed)/account/appointments/[slug]/page.tsx +0 -3
  86. package/templates/apps/web/app/[locale]/(authed)/account/appointments/page.tsx +0 -3
  87. package/templates/apps/web/app/[locale]/(authed)/account/artifacts/[pieceId]/page.tsx +0 -3
  88. package/templates/apps/web/app/[locale]/(authed)/account/artifacts/[pieceId]/versions/[version]/file/route.ts +0 -2
  89. package/templates/apps/web/app/[locale]/(authed)/account/artifacts/page.tsx +0 -3
  90. package/templates/apps/web/app/[locale]/(authed)/account/billing/page.tsx +0 -12
  91. package/templates/apps/web/app/[locale]/(authed)/account/general/page.tsx +0 -12
  92. package/templates/apps/web/app/[locale]/(authed)/account/inbox/[kind]/[id]/page.tsx +0 -12
  93. package/templates/apps/web/app/[locale]/(authed)/account/inbox/message/[id]/file/route.ts +0 -2
  94. package/templates/apps/web/app/[locale]/(authed)/account/inbox/thread/page.tsx +0 -12
  95. package/templates/apps/web/app/[locale]/(authed)/account/invitations/[invitationId]/page.tsx +0 -3
  96. package/templates/apps/web/app/[locale]/(authed)/account/layout.tsx +0 -10
  97. package/templates/apps/web/app/[locale]/(authed)/account/notifications/page.tsx +0 -3
  98. package/templates/apps/web/app/[locale]/(authed)/account/onboarding/page.tsx +0 -3
  99. package/templates/apps/web/app/[locale]/(authed)/account/page.tsx +0 -12
  100. package/templates/apps/web/app/[locale]/(authed)/account/privacy/export/route.ts +0 -2
  101. package/templates/apps/web/app/[locale]/(authed)/account/privacy/page.tsx +0 -3
  102. package/templates/apps/web/app/[locale]/(authed)/account/security/page.tsx +0 -3
  103. package/templates/apps/web/app/[locale]/(authed)/account/settings/page.tsx +0 -2
  104. package/templates/apps/web/app/[locale]/(authed)/account/support/page.tsx +0 -3
  105. package/templates/apps/web/app/[locale]/(authed)/leads/__tests__/page.test.tsx +0 -205
  106. package/templates/apps/web/app/[locale]/(authed)/leads/components/LeadsTable.tsx +0 -137
  107. package/templates/apps/web/app/[locale]/(authed)/leads/page.tsx +0 -122
  108. package/templates/apps/web/app/[locale]/(authed)/waitlist/components/ForbiddenState.tsx +0 -24
  109. package/templates/apps/web/app/[locale]/(authed)/waitlist/format.ts +0 -111
  110. package/templates/apps/web/app/[locale]/[slug]/[detail]/__tests__/page.test.tsx +0 -402
  111. package/templates/apps/web/app/[locale]/[slug]/[detail]/page.tsx +0 -143
  112. package/templates/apps/web/app/[locale]/[slug]/__tests__/page.test.tsx +0 -148
  113. package/templates/apps/web/app/[locale]/[slug]/page.tsx +0 -109
  114. package/templates/apps/web/app/[locale]/about/[slug]/page.tsx +0 -46
  115. package/templates/apps/web/app/[locale]/about/__tests__/about-routes.test.tsx +0 -353
  116. package/templates/apps/web/app/[locale]/about/page.tsx +0 -122
  117. package/templates/apps/web/app/[locale]/alternatives/__tests__/page.test.tsx +0 -161
  118. package/templates/apps/web/app/[locale]/alternatives/page.tsx +0 -112
  119. package/templates/apps/web/app/[locale]/careers/[slug]/[action]/page.tsx +0 -244
  120. package/templates/apps/web/app/[locale]/careers/[slug]/apply.actions.ts +0 -325
  121. package/templates/apps/web/app/[locale]/careers/[slug]/job-application-form.ts +0 -120
  122. package/templates/apps/web/app/[locale]/careers/[slug]/page.tsx +0 -73
  123. package/templates/apps/web/app/[locale]/careers/__tests__/apply.actions.test.ts +0 -497
  124. package/templates/apps/web/app/[locale]/careers/__tests__/careers-hub.test.tsx +0 -172
  125. package/templates/apps/web/app/[locale]/careers/__tests__/careers-set.test.tsx +0 -153
  126. package/templates/apps/web/app/[locale]/careers/__tests__/job-application-form.test.ts +0 -141
  127. package/templates/apps/web/app/[locale]/careers/__tests__/job-apply-page.test.tsx +0 -546
  128. package/templates/apps/web/app/[locale]/careers/__tests__/page-renderer-migration.test.tsx +0 -189
  129. package/templates/apps/web/app/[locale]/careers/page.tsx +0 -165
  130. package/templates/apps/web/app/[locale]/case-studies/[slug]/page.tsx +0 -49
  131. package/templates/apps/web/app/[locale]/case-studies/__tests__/hub-children.test.tsx +0 -65
  132. package/templates/apps/web/app/[locale]/case-studies/__tests__/page-renderer-migration.test.tsx +0 -125
  133. package/templates/apps/web/app/[locale]/case-studies/page.tsx +0 -49
  134. package/templates/apps/web/app/[locale]/clients/__tests__/page-renderer-migration.test.tsx +0 -85
  135. package/templates/apps/web/app/[locale]/clients/page.tsx +0 -47
  136. package/templates/apps/web/app/[locale]/contact/ConversationalIntakeWrapper.tsx +0 -249
  137. package/templates/apps/web/app/[locale]/contact/__tests__/ConversationalIntakeWrapper.test.tsx +0 -400
  138. package/templates/apps/web/app/[locale]/contact/__tests__/contact-form-magnet.test.ts +0 -138
  139. package/templates/apps/web/app/[locale]/contact/__tests__/contact-form-text.test.ts +0 -49
  140. package/templates/apps/web/app/[locale]/contact/__tests__/contact-magnet-page.test.tsx +0 -494
  141. package/templates/apps/web/app/[locale]/contact/__tests__/contact.actions.test.ts +0 -1122
  142. package/templates/apps/web/app/[locale]/contact/__tests__/intake-analytics.test.ts +0 -51
  143. package/templates/apps/web/app/[locale]/contact/__tests__/page-renderer-migration.test.tsx +0 -319
  144. package/templates/apps/web/app/[locale]/contact/contact-form-magnet.ts +0 -77
  145. package/templates/apps/web/app/[locale]/contact/contact-form-text.ts +0 -52
  146. package/templates/apps/web/app/[locale]/contact/contact.actions.ts +0 -403
  147. package/templates/apps/web/app/[locale]/contact/intake-analytics.ts +0 -49
  148. package/templates/apps/web/app/[locale]/contact/intake-script.ts +0 -92
  149. package/templates/apps/web/app/[locale]/contact/page.tsx +0 -267
  150. package/templates/apps/web/app/[locale]/courses/[slug]/page.tsx +0 -50
  151. package/templates/apps/web/app/[locale]/courses/__tests__/hub-children.test.tsx +0 -32
  152. package/templates/apps/web/app/[locale]/courses/__tests__/page-renderer-migration.test.tsx +0 -123
  153. package/templates/apps/web/app/[locale]/courses/page.tsx +0 -49
  154. package/templates/apps/web/app/[locale]/events/[slug]/page.tsx +0 -57
  155. package/templates/apps/web/app/[locale]/events/__tests__/hub-children.test.tsx +0 -32
  156. package/templates/apps/web/app/[locale]/events/__tests__/page-renderer-migration.test.tsx +0 -164
  157. package/templates/apps/web/app/[locale]/events/__tests__/program-event.test.tsx +0 -120
  158. package/templates/apps/web/app/[locale]/events/page.tsx +0 -60
  159. package/templates/apps/web/app/[locale]/faq/page.tsx +0 -54
  160. package/templates/apps/web/app/[locale]/features/[slug]/page.tsx +0 -54
  161. package/templates/apps/web/app/[locale]/features/__tests__/hub-children.test.tsx +0 -32
  162. package/templates/apps/web/app/[locale]/features/page.tsx +0 -50
  163. package/templates/apps/web/app/[locale]/for/[slug]/page.tsx +0 -54
  164. package/templates/apps/web/app/[locale]/for/__tests__/hub-children.test.tsx +0 -32
  165. package/templates/apps/web/app/[locale]/for/__tests__/page-renderer-migration.test.tsx +0 -90
  166. package/templates/apps/web/app/[locale]/for/page.tsx +0 -51
  167. package/templates/apps/web/app/[locale]/glossary/page.tsx +0 -53
  168. package/templates/apps/web/app/[locale]/how-to/[slug]/page.tsx +0 -50
  169. package/templates/apps/web/app/[locale]/how-to/__tests__/page-renderer-migration.test.tsx +0 -78
  170. package/templates/apps/web/app/[locale]/how-to/page.tsx +0 -50
  171. package/templates/apps/web/app/[locale]/integrations/[slug]/page.tsx +0 -54
  172. package/templates/apps/web/app/[locale]/integrations/__tests__/hub-children.test.tsx +0 -38
  173. package/templates/apps/web/app/[locale]/integrations/__tests__/page-renderer-migration.test.tsx +0 -141
  174. package/templates/apps/web/app/[locale]/integrations/page.tsx +0 -49
  175. package/templates/apps/web/app/[locale]/launch-service/page.tsx +0 -44
  176. package/templates/apps/web/app/[locale]/newsletter/__tests__/page.test.tsx +0 -236
  177. package/templates/apps/web/app/[locale]/newsletter/page.tsx +0 -179
  178. package/templates/apps/web/app/[locale]/page.tsx +0 -147
  179. package/templates/apps/web/app/[locale]/partners/[slug]/page.tsx +0 -45
  180. package/templates/apps/web/app/[locale]/partners/__tests__/hub-children.test.tsx +0 -32
  181. package/templates/apps/web/app/[locale]/partners/__tests__/page-renderer-migration.test.tsx +0 -125
  182. package/templates/apps/web/app/[locale]/partners/page.tsx +0 -49
  183. package/templates/apps/web/app/[locale]/portfolio/[slug]/page.tsx +0 -46
  184. package/templates/apps/web/app/[locale]/portfolio/__tests__/hub-children.test.tsx +0 -38
  185. package/templates/apps/web/app/[locale]/portfolio/page.tsx +0 -50
  186. package/templates/apps/web/app/[locale]/pricing/[slug]/__tests__/page.test.tsx +0 -324
  187. package/templates/apps/web/app/[locale]/pricing/[slug]/page.tsx +0 -87
  188. package/templates/apps/web/app/[locale]/pricing/__tests__/__snapshots__/unconnected.test.tsx.snap +0 -7
  189. package/templates/apps/web/app/[locale]/pricing/__tests__/offerings.test.tsx +0 -605
  190. package/templates/apps/web/app/[locale]/pricing/__tests__/page.test.tsx +0 -219
  191. package/templates/apps/web/app/[locale]/pricing/__tests__/pricing-pages.test.tsx +0 -215
  192. package/templates/apps/web/app/[locale]/pricing/__tests__/unconnected.test.tsx +0 -282
  193. package/templates/apps/web/app/[locale]/pricing/page.tsx +0 -120
  194. package/templates/apps/web/app/[locale]/privacy/page.tsx +0 -40
  195. package/templates/apps/web/app/[locale]/products/[slug]/page.tsx +0 -50
  196. package/templates/apps/web/app/[locale]/products/__tests__/hub-children.test.tsx +0 -32
  197. package/templates/apps/web/app/[locale]/products/__tests__/page-renderer-migration.test.tsx +0 -141
  198. package/templates/apps/web/app/[locale]/products/page.tsx +0 -49
  199. package/templates/apps/web/app/[locale]/projects/[slug]/page.tsx +0 -37
  200. package/templates/apps/web/app/[locale]/projects/__tests__/hub-children.test.tsx +0 -32
  201. package/templates/apps/web/app/[locale]/projects/__tests__/page-renderer-migration.test.tsx +0 -157
  202. package/templates/apps/web/app/[locale]/projects/page.tsx +0 -49
  203. package/templates/apps/web/app/[locale]/purchase-policy/page.tsx +0 -49
  204. package/templates/apps/web/app/[locale]/resources/[slug]/page.tsx +0 -54
  205. package/templates/apps/web/app/[locale]/resources/__tests__/hub-children.test.tsx +0 -38
  206. package/templates/apps/web/app/[locale]/resources/__tests__/page-renderer-migration.test.tsx +0 -151
  207. package/templates/apps/web/app/[locale]/resources/page.tsx +0 -49
  208. package/templates/apps/web/app/[locale]/services/[slug]/[child]/page.tsx +0 -68
  209. package/templates/apps/web/app/[locale]/services/[slug]/page.tsx +0 -88
  210. package/templates/apps/web/app/[locale]/services/__tests__/hub-children.test.tsx +0 -158
  211. package/templates/apps/web/app/[locale]/services/__tests__/page-renderer-migration.test.tsx +0 -187
  212. package/templates/apps/web/app/[locale]/services/__tests__/service-detail-sections.test.tsx +0 -224
  213. package/templates/apps/web/app/[locale]/services/__tests__/service-families.test.tsx +0 -368
  214. package/templates/apps/web/app/[locale]/services/page.tsx +0 -71
  215. package/templates/apps/web/app/[locale]/software/[slug]/page.tsx +0 -49
  216. package/templates/apps/web/app/[locale]/software/__tests__/page-renderer-migration.test.tsx +0 -81
  217. package/templates/apps/web/app/[locale]/software/page.tsx +0 -49
  218. package/templates/apps/web/app/[locale]/team/[slug]/page.tsx +0 -45
  219. package/templates/apps/web/app/[locale]/team/__tests__/hub-children.test.tsx +0 -32
  220. package/templates/apps/web/app/[locale]/team/__tests__/team-routes.test.tsx +0 -161
  221. package/templates/apps/web/app/[locale]/team/page.tsx +0 -50
  222. package/templates/apps/web/app/[locale]/tech-articles/[slug]/page.tsx +0 -54
  223. package/templates/apps/web/app/[locale]/tech-articles/__tests__/page-renderer-migration.test.tsx +0 -82
  224. package/templates/apps/web/app/[locale]/tech-articles/page.tsx +0 -49
  225. package/templates/apps/web/app/[locale]/templates/[slug]/__tests__/page.test.tsx +0 -203
  226. package/templates/apps/web/app/[locale]/templates/[slug]/page.tsx +0 -81
  227. package/templates/apps/web/app/[locale]/templates/__tests__/page.test.tsx +0 -237
  228. package/templates/apps/web/app/[locale]/templates/page.tsx +0 -114
  229. package/templates/apps/web/app/[locale]/terms/page.tsx +0 -40
  230. package/templates/apps/web/app/[locale]/testimonials/__tests__/page-renderer-migration.test.tsx +0 -85
  231. package/templates/apps/web/app/[locale]/testimonials/page.tsx +0 -51
  232. package/templates/apps/web/app/[locale]/thanks/[slug]/__tests__/page.test.tsx +0 -136
  233. package/templates/apps/web/app/[locale]/thanks/[slug]/page.tsx +0 -39
  234. package/templates/apps/web/app/[locale]/unsubscribe/__tests__/unsubscribe-rsc-boundary.test.tsx +0 -226
  235. package/templates/apps/web/app/[locale]/unsubscribe/__tests__/unsubscribe.test.tsx +0 -217
  236. package/templates/apps/web/app/[locale]/unsubscribe/page.tsx +0 -106
  237. package/templates/apps/web/app/[locale]/unsubscribe/unsubscribe-button.tsx +0 -94
  238. package/templates/apps/web/app/[locale]/unsubscribe/unsubscribe.actions.ts +0 -55
  239. package/templates/apps/web/app/[locale]/vs/[slug]/__tests__/page.test.tsx +0 -100
  240. package/templates/apps/web/app/[locale]/vs/[slug]/page.tsx +0 -60
  241. package/templates/apps/web/app/[locale]/whitepapers/[slug]/page.tsx +0 -54
  242. package/templates/apps/web/app/[locale]/whitepapers/__tests__/page-renderer-migration.test.tsx +0 -82
  243. package/templates/apps/web/app/[locale]/whitepapers/page.tsx +0 -49
  244. package/templates/apps/web/app/[locale]/working-agreement/__tests__/page.test.tsx +0 -63
  245. package/templates/apps/web/app/[locale]/working-agreement/page.tsx +0 -41
  246. package/templates/apps/web/app/api/auth/[...all]/route.ts +0 -16
  247. package/templates/apps/web/app/api/auth/hub/__tests__/continuation.test.ts +0 -143
  248. package/templates/apps/web/app/api/auth/hub/__tests__/entry-routes.test.ts +0 -749
  249. package/templates/apps/web/app/api/auth/hub/authorize/__tests__/route.test.ts +0 -964
  250. package/templates/apps/web/app/api/auth/hub/authorize/route.ts +0 -390
  251. package/templates/apps/web/app/api/auth/hub/continuation.ts +0 -127
  252. package/templates/apps/web/app/api/auth/hub/continue/[ref]/__tests__/route.test.ts +0 -188
  253. package/templates/apps/web/app/api/auth/hub/continue/[ref]/route.ts +0 -53
  254. package/templates/apps/web/app/api/auth/hub/email/route.ts +0 -111
  255. package/templates/apps/web/app/api/auth/hub/entry-shared.ts +0 -163
  256. package/templates/apps/web/app/api/auth/hub/password/__tests__/return.test.ts +0 -86
  257. package/templates/apps/web/app/api/auth/hub/password/__tests__/route.test.ts +0 -368
  258. package/templates/apps/web/app/api/auth/hub/password/return.ts +0 -86
  259. package/templates/apps/web/app/api/auth/hub/password/route.ts +0 -171
  260. package/templates/apps/web/app/api/auth/hub/purchase/route.ts +0 -230
  261. package/templates/apps/web/app/api/auth/hub/purchase-link/route.ts +0 -174
  262. package/templates/apps/web/app/api/auth/hub/sign-up/route.ts +0 -60
  263. package/templates/apps/web/app/api/auth/hub/sign-up-evidence.ts +0 -97
  264. package/templates/apps/web/app/api/auth/mcp/__tests__/continuation.test.ts +0 -92
  265. package/templates/apps/web/app/api/auth/mcp/continuation.ts +0 -89
  266. package/templates/apps/web/app/api/auth/mcp/continue/[ref]/__tests__/route.test.ts +0 -59
  267. package/templates/apps/web/app/api/auth/mcp/continue/[ref]/route.ts +0 -41
  268. package/templates/apps/web/app/api/hub-session/__tests__/routes.test.ts +0 -1166
  269. package/templates/apps/web/app/api/hub-session/callback/route.ts +0 -134
  270. package/templates/apps/web/app/api/hub-session/email/route.ts +0 -125
  271. package/templates/apps/web/app/api/hub-session/one-tap/nonce/route.ts +0 -49
  272. package/templates/apps/web/app/api/hub-session/one-tap/route.ts +0 -106
  273. package/templates/apps/web/app/api/hub-session/open/route.ts +0 -111
  274. package/templates/apps/web/app/api/hub-session/password/return/route.ts +0 -69
  275. package/templates/apps/web/app/api/hub-session/password/route.ts +0 -106
  276. package/templates/apps/web/app/api/hub-session/sign-in/route.ts +0 -91
  277. package/templates/apps/web/app/api/hub-session/sign-out/route.ts +0 -54
  278. package/templates/apps/web/components/sign-out-trigger.tsx +0 -62
  279. package/templates/apps/web/lib/__tests__/auth-routes.test.ts +0 -140
  280. package/templates/apps/web/lib/__tests__/hub-children.fixtures.ts +0 -279
  281. package/templates/apps/web/lib/__tests__/route-family.test.ts +0 -57
  282. package/templates/apps/web/lib/__tests__/service-listing.test.ts +0 -111
  283. package/templates/apps/web/lib/__tests__/template-listing.test.ts +0 -158
  284. package/templates/apps/web/lib/auth-routes.ts +0 -125
  285. package/templates/apps/web/lib/hub-children.tsx +0 -351
  286. package/templates/apps/web/lib/hub-session/__tests__/hub-session.test.ts +0 -433
  287. package/templates/apps/web/lib/hub-session/__tests__/spoke-sign-in.test.tsx +0 -332
  288. package/templates/apps/web/lib/hub-session/config.ts +0 -110
  289. package/templates/apps/web/lib/hub-session/entry.ts +0 -238
  290. package/templates/apps/web/lib/hub-session/index.ts +0 -21
  291. package/templates/apps/web/lib/hub-session/one-tap.tsx +0 -148
  292. package/templates/apps/web/lib/hub-session/reseal.ts +0 -90
  293. package/templates/apps/web/lib/hub-session/seal.ts +0 -86
  294. package/templates/apps/web/lib/hub-session/session.ts +0 -298
  295. package/templates/apps/web/lib/hub-session/spoke-sign-in.tsx +0 -277
  296. package/templates/apps/web/lib/meet-placeholder.ts +0 -5
  297. package/templates/apps/web/lib/next-path.ts +0 -35
  298. package/templates/apps/web/lib/posting-title.ts +0 -39
  299. package/templates/apps/web/lib/route-family.ts +0 -69
  300. package/templates/apps/web/lib/service-listing.ts +0 -89
  301. package/templates/apps/web/lib/template-listing.ts +0 -169
  302. package/templates/apps/web/src/lib/__tests__/lead-write.test.ts +0 -187
  303. package/templates/apps/web/src/lib/lead-write.ts +0 -90
  304. /package/templates/apps/web/{app/[locale]/contact → lib}/__tests__/site-contact-lines.test.ts +0 -0
@@ -1,45 +0,0 @@
1
- // Partner detail page. Reads the Partner MDX for the given slug, renders via
2
- // @working-theory/page-renderer, and emits a JSON-LD <script>. Unknown slugs 404 through renderPage.
3
- import type { getMdxSource as defaultGetMdxSource } from "@working-theory/page-renderer";
4
- import {
5
- getMdxSource as loadMdxSource,
6
- renderPage,
7
- renderPageMetadata,
8
- } from "@working-theory/page-renderer";
9
- import type { Metadata } from "next";
10
- import type { ReactElement } from "react";
11
-
12
- interface Props {
13
- params: Promise<{ locale: string; slug: string }>;
14
- getMdxSource?: typeof defaultGetMdxSource;
15
- }
16
-
17
- export async function generateMetadata({
18
- params,
19
- }: Pick<Props, "params">): Promise<Metadata> {
20
- const { locale, slug } = await params;
21
- return renderPageMetadata({ type: "Partner", slug, locale });
22
- }
23
-
24
- export default async function Page({
25
- params,
26
- getMdxSource,
27
- }: Props): Promise<ReactElement> {
28
- const { locale, slug } = await params;
29
- // A page that composes `sections[]` renders them (JSON-LD is built from
30
- // the same sections); a prose page renders its MDX body — the rule
31
- // /vs/[slug] applies (#10122).
32
- const source = await (getMdxSource ?? loadMdxSource)("Partner", slug, locale);
33
- const composed =
34
- source !== null &&
35
- Array.isArray((source.frontmatter as { sections?: unknown[] }).sections) &&
36
- ((source.frontmatter as { sections?: unknown[] }).sections?.length ?? 0) >
37
- 0;
38
- return renderPage({
39
- type: "Partner",
40
- slug,
41
- locale,
42
- ...(composed ? {} : { bodyMode: "mdx-body" as const }),
43
- ...(getMdxSource !== undefined && { getMdxSource }),
44
- });
45
- }
@@ -1,32 +0,0 @@
1
- /**
2
- * Hub child cards (#10121) for /partners. The shared cases live in
3
- * `lib/__tests__/hub-children.fixtures.ts`; this file sits beside the route so
4
- * a scaffold without /partners drops it with the route (#10157).
5
- */
6
- const mockRenderPage = jest.fn(async (..._args: unknown[]) => "<rendered/>");
7
-
8
- jest.mock("@working-theory/page-renderer", () => ({
9
- __esModule: true,
10
- renderPage: (...args: unknown[]) => mockRenderPage(...args),
11
- renderPageMetadata: jest.fn(),
12
- // Never reached — every call in this suite passes its loaders via DI.
13
- getMdxSlugs: jest.fn(),
14
- getMdxSource: jest.fn(),
15
- getPageSections: jest.fn(),
16
- }));
17
-
18
- jest.mock("@working-theory/ui/sections", () => ({
19
- __esModule: true,
20
- SectionRenderer: () => null,
21
- }));
22
-
23
- import PartnersPage from "../page";
24
- import {
25
- describeHub,
26
- type HubPage,
27
- } from "../../../../lib/__tests__/hub-children.fixtures";
28
-
29
- describeHub(
30
- ["partners", PartnersPage as HubPage, "PartnersList", "Partner", "mdx-body"],
31
- mockRenderPage,
32
- );
@@ -1,125 +0,0 @@
1
- /**
2
- * HTML snapshot regression tests for the partners routes → @working-theory/page-renderer migration.
3
- *
4
- * Node version: captured against Node 22.x (same as CI).
5
- * MDX seed content: DI-injected stub — no fs reads, deterministic across environments.
6
- *
7
- * Two-commit strategy:
8
- * Commit 1: this file added; snapshots captured against pre-migration routes (RED-passing).
9
- * Commit 2: routes migrated; same snapshots verify diff=0 (GREEN).
10
- *
11
- * Failure = snapshot diff > 0 bytes. DO NOT regenerate snapshots to pass.
12
- * A non-zero diff indicates a behavior regression in the migration. Escalate.
13
- */
14
- import React from "react";
15
- import { render } from "@testing-library/react";
16
-
17
- // ── next/navigation mock ───────────────────────────────────────────────────────
18
- jest.mock("next/navigation", () => ({
19
- __esModule: true,
20
- notFound: jest.fn(() => {
21
- throw new Error("NEXT_NOT_FOUND");
22
- }),
23
- }));
24
-
25
- // ── next-mdx-remote/rsc mock ───────────────────────────────────────────────────
26
- jest.mock("next-mdx-remote/rsc", () => ({
27
- __esModule: true,
28
- MDXRemote: ({ source }: { source: string }) =>
29
- React.createElement("div", { "data-testid": "mdx-rendered" }, source),
30
- }));
31
-
32
- // ── Import page components ─────────────────────────────────────────────────────
33
- import PartnersPage from "../page";
34
- import PartnerSlugPage from "../[slug]/page";
35
- import * as pageRenderer from "@working-theory/page-renderer";
36
-
37
- // ── Shared stubs ───────────────────────────────────────────────────────────────
38
- const getMdxSourceEmpty = jest.fn().mockResolvedValue(null);
39
-
40
- // ── partners/page (index) ─────────────────────────────────────────────────────
41
-
42
- describe("partners/page — snapshot regression", () => {
43
- it("empty state renders deterministic HTML", async () => {
44
- const element = await PartnersPage({
45
- params: Promise.resolve({ locale: "en" }),
46
- // No child pages: this snapshot pins the hub's own render (#10121).
47
- getMdxSlugs: async () => [],
48
- getMdxSource: getMdxSourceEmpty,
49
- });
50
- const { container } = render(element);
51
- expect(container.innerHTML).toMatchInlineSnapshot(
52
- `"<main id="main"><h1 class="text-heading-1 lg:text-display-sm font-display text-fg hero-type-display">Partners</h1><p data-testid="section-empty-state">Partners listing coming soon.</p></main>"`,
53
- );
54
- });
55
-
56
- it("populated state renders deterministic HTML", async () => {
57
- const getMdxSourcePopulated = jest.fn().mockResolvedValue({
58
- frontmatter: {
59
- type: "PartnersList",
60
- slug: "partners",
61
- title: "Partners",
62
- description: "Organisations partnering with AI Launch Kit.",
63
- },
64
- body: "mdx-body-content",
65
- });
66
-
67
- const element = await PartnersPage({
68
- params: Promise.resolve({ locale: "en" }),
69
- // No child pages: this snapshot pins the hub's own render (#10121).
70
- getMdxSlugs: async () => [],
71
- getMdxSource: getMdxSourcePopulated,
72
- });
73
- const { container } = render(element);
74
- expect(container.innerHTML).toMatchInlineSnapshot(
75
- `"<script type="application/ld+json" data-testid="json-ld">{"@context":"https://schema.org","@type":"CollectionPage","inLanguage":"en","name":"Partners","description":"Organisations partnering with AI Launch Kit.","mainEntity":{"@type":"ItemList","itemListElement":[{"@type":"Organization"}]}}</script><main id="main"><div class="mx-auto w-full max-w-container-xl px-4 md:px-6 lg:px-8 py-section"><div data-testid="markdown-view-toggle" class="ailk-markdown-view-toggle"><div class="flex justify-end mb-3"><div role="radiogroup" aria-label="Page view" data-testid="markdown-view-toggle" class="inline-flex items-center gap-0.5 rounded-lg p-1 bg-(--color-surface-secondary)"><button class="inline-flex items-center justify-center gap-2 font-medium motion-safe:transition motion-safe:duration-(--button-hover-duration) focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--color-accent) focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50 [&amp;>svg]:shrink-0 text-(--color-fg) not-disabled:hover:bg-(--button-hover-quiet-bg) not-disabled:hover:text-(--button-hover-quiet-fg) not-disabled:hover:opacity-(--button-hover-opacity) not-disabled:hover:transform-(--button-hover-transform) not-disabled:hover:shadow-(--button-hover-shadow) not-disabled:active:bg-gray-200 not-disabled:active:text-(--color-fg) rounded-control px-control-x h-(--control-height-thin) text-caption leading-none rounded-md px-3 text-body-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--color-accent) focus-visible:ring-offset-1 min-w-(--control-height-thin) min-h-(--control-height-big) bg-(--color-bg) text-(--color-fg) shadow-sm" type="button" role="radio" aria-checked="true" aria-label="Rendered" tabindex="0" data-testid="markdown-view-toggle-rendered">Rendered</button><button class="inline-flex items-center justify-center gap-2 font-medium motion-safe:transition motion-safe:duration-(--button-hover-duration) focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--color-accent) focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50 [&amp;>svg]:shrink-0 text-(--color-fg) not-disabled:hover:bg-(--button-hover-quiet-bg) not-disabled:hover:text-(--button-hover-quiet-fg) not-disabled:hover:opacity-(--button-hover-opacity) not-disabled:hover:transform-(--button-hover-transform) not-disabled:hover:shadow-(--button-hover-shadow) not-disabled:active:bg-gray-200 not-disabled:active:text-(--color-fg) rounded-control px-control-x h-(--control-height-thin) text-caption leading-none rounded-md px-3 text-body-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--color-accent) focus-visible:ring-offset-1 min-w-(--control-height-thin) min-h-(--control-height-big) text-(--color-text-muted) hover:text-(--color-fg)" type="button" role="radio" aria-checked="false" aria-label="Markdown" tabindex="-1" data-testid="markdown-view-toggle-markdown">Markdown</button></div></div><div role="status" aria-live="polite" aria-atomic="true" class="sr-only" data-testid="markdown-view-toggle-status">Showing Rendered view</div><div data-testid="markdown-view-rendered"><article data-testid="mdx-body"><div class="ailk-prose max-w-none text-(--color-text-muted) text-body-sm leading-relaxed [&amp;>*:first-child]:mt-0 [&amp;_h2]:mt-block-loose [&amp;_h2]:scroll-mt-24 [&amp;_h2]:text-heading-3 [&amp;_h2]:font-display [&amp;_h2]:text-(--color-fg) [&amp;_h3]:mt-block-loose [&amp;_h3]:scroll-mt-24 [&amp;_h3]:text-heading-4 [&amp;_h3]:font-display [&amp;_h3]:text-(--color-fg) [&amp;_h4]:mt-block-tight [&amp;_h4]:scroll-mt-24 [&amp;_h4]:text-heading-4 [&amp;_h4]:font-display [&amp;_h4]:text-(--color-fg) [&amp;_h5]:mt-block-tight [&amp;_h5]:scroll-mt-24 [&amp;_h5]:text-heading-4 [&amp;_h5]:font-display [&amp;_h5]:text-(--color-fg) [&amp;_h6]:mt-block-tight [&amp;_h6]:scroll-mt-24 [&amp;_h6]:text-heading-4 [&amp;_h6]:font-display [&amp;_h6]:text-(--color-fg) [&amp;_p]:mt-paragraph [&amp;_strong]:font-semibold [&amp;_strong]:text-(--color-fg) [&amp;_em]:italic [&amp;_ul]:mt-paragraph [&amp;_ul]:list-disc [&amp;_ul]:ps-6 [&amp;_ol]:mt-paragraph [&amp;_ol]:list-decimal [&amp;_ol]:ps-6 [&amp;_li]:mt-1 [&amp;_li]:ps-1 [&amp;_li]:marker:text-(--color-text-muted) [&amp;_li>ul]:mt-1 [&amp;_li>ol]:mt-1 [&amp;_blockquote]:mt-paragraph [&amp;_blockquote]:border-s-4 [&amp;_blockquote]:border-(--color-border-strong) [&amp;_blockquote]:ps-4 [&amp;_blockquote]:italic [&amp;_blockquote]:text-(--color-text-muted) [&amp;_hr]:my-block-loose [&amp;_hr]:border-(--color-border) [&amp;_a]:text-(--color-accent) [&amp;_a]:underline [&amp;_a]:underline-offset-4 [&amp;_:not(pre)>code]:rounded [&amp;_:not(pre)>code]:bg-(--color-surface-secondary) [&amp;_:not(pre)>code]:px-1.5 [&amp;_:not(pre)>code]:py-0.5 [&amp;_:not(pre)>code]:text-code [&amp;_:not(pre)>code]:font-mono [&amp;_:not(pre)>code]:text-(--color-fg) [&amp;_pre]:mt-paragraph [&amp;_pre]:overflow-auto [&amp;_pre]:rounded-md [&amp;_pre]:border-hairline [&amp;_pre]:border-(--color-border) [&amp;_pre]:bg-(--color-bg) [&amp;_pre]:p-4 [&amp;_pre]:font-mono [&amp;_pre]:text-body-sm [&amp;_img]:mt-paragraph [&amp;_img]:h-auto [&amp;_img]:max-w-full [&amp;_img]:rounded-lg [&amp;_table]:mt-paragraph [&amp;_table]:w-full [&amp;_table]:border-collapse [&amp;_table]:text-body-sm [&amp;_th]:border-b [&amp;_th]:border-(--color-border) [&amp;_th]:bg-(--color-surface-secondary) [&amp;_th]:px-3 [&amp;_th]:py-2 [&amp;_th]:text-start [&amp;_th]:font-semibold [&amp;_th]:text-(--color-fg) [&amp;_td]:border-b [&amp;_td]:border-(--color-border) [&amp;_td]:px-3 [&amp;_td]:py-2 [&amp;_kbd]:rounded [&amp;_kbd]:border-hairline [&amp;_kbd]:border-(--color-border) [&amp;_kbd]:bg-(--color-surface-secondary) [&amp;_kbd]:px-1.5 [&amp;_kbd]:py-0.5 [&amp;_kbd]:text-caption [&amp;_kbd]:font-mono" data-testid="mdx-content"><div data-testid="mdx-rendered">mdx-body-content</div></div></article></div></div></div></main>"`,
76
- );
77
- });
78
- });
79
-
80
- // ── partners/[slug]/page (detail) ─────────────────────────────────────────────
81
-
82
- describe("partners/[slug]/page — snapshot regression", () => {
83
- it("populated state renders deterministic HTML", async () => {
84
- const getMdxSourcePopulated = jest.fn().mockResolvedValue({
85
- frontmatter: {
86
- type: "Partner",
87
- slug: "acme-corp",
88
- title: "Acme Corp",
89
- description: "Acme Corp is a strategic partner.",
90
- },
91
- body: "mdx-body-content",
92
- });
93
-
94
- const element = await PartnerSlugPage({
95
- params: Promise.resolve({ locale: "en", slug: "acme-corp" }),
96
- getMdxSource: getMdxSourcePopulated,
97
- });
98
- const { container } = render(element);
99
- expect(container.innerHTML).toMatchInlineSnapshot(
100
- `"<script type="application/ld+json" data-testid="json-ld">{"@context":"https://schema.org","@graph":[{"@context":"https://schema.org","@type":"WebPage","inLanguage":"en","name":"Acme Corp","description":"Acme Corp is a strategic partner.","mainEntity":{"@context":"https://schema.org","@type":"Organization","name":"Acme Corp","description":"Acme Corp is a strategic partner."}},{"@context":"https://schema.org","@type":"BreadcrumbList","inLanguage":"en","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http://localhost:3000/en/"},{"@type":"ListItem","position":2,"name":"Partners","item":"http://localhost:3000/en/partners"},{"@type":"ListItem","position":3,"name":"Acme Corp","item":"http://localhost:3000/en/partners/acme-corp"}]}]}</script><main id="main"><div class="mx-auto w-full max-w-container-xl px-4 md:px-6 lg:px-8 py-section"><div data-testid="markdown-view-toggle" class="ailk-markdown-view-toggle"><div class="flex justify-end mb-3"><div role="radiogroup" aria-label="Page view" data-testid="markdown-view-toggle" class="inline-flex items-center gap-0.5 rounded-lg p-1 bg-(--color-surface-secondary)"><button class="inline-flex items-center justify-center gap-2 font-medium motion-safe:transition motion-safe:duration-(--button-hover-duration) focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--color-accent) focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50 [&amp;>svg]:shrink-0 text-(--color-fg) not-disabled:hover:bg-(--button-hover-quiet-bg) not-disabled:hover:text-(--button-hover-quiet-fg) not-disabled:hover:opacity-(--button-hover-opacity) not-disabled:hover:transform-(--button-hover-transform) not-disabled:hover:shadow-(--button-hover-shadow) not-disabled:active:bg-gray-200 not-disabled:active:text-(--color-fg) rounded-control px-control-x h-(--control-height-thin) text-caption leading-none rounded-md px-3 text-body-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--color-accent) focus-visible:ring-offset-1 min-w-(--control-height-thin) min-h-(--control-height-big) bg-(--color-bg) text-(--color-fg) shadow-sm" type="button" role="radio" aria-checked="true" aria-label="Rendered" tabindex="0" data-testid="markdown-view-toggle-rendered">Rendered</button><button class="inline-flex items-center justify-center gap-2 font-medium motion-safe:transition motion-safe:duration-(--button-hover-duration) focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--color-accent) focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50 [&amp;>svg]:shrink-0 text-(--color-fg) not-disabled:hover:bg-(--button-hover-quiet-bg) not-disabled:hover:text-(--button-hover-quiet-fg) not-disabled:hover:opacity-(--button-hover-opacity) not-disabled:hover:transform-(--button-hover-transform) not-disabled:hover:shadow-(--button-hover-shadow) not-disabled:active:bg-gray-200 not-disabled:active:text-(--color-fg) rounded-control px-control-x h-(--control-height-thin) text-caption leading-none rounded-md px-3 text-body-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--color-accent) focus-visible:ring-offset-1 min-w-(--control-height-thin) min-h-(--control-height-big) text-(--color-text-muted) hover:text-(--color-fg)" type="button" role="radio" aria-checked="false" aria-label="Markdown" tabindex="-1" data-testid="markdown-view-toggle-markdown">Markdown</button></div></div><div role="status" aria-live="polite" aria-atomic="true" class="sr-only" data-testid="markdown-view-toggle-status">Showing Rendered view</div><div data-testid="markdown-view-rendered"><article data-testid="mdx-body"><div class="ailk-prose max-w-none text-(--color-text-muted) text-body-sm leading-relaxed [&amp;>*:first-child]:mt-0 [&amp;_h2]:mt-block-loose [&amp;_h2]:scroll-mt-24 [&amp;_h2]:text-heading-3 [&amp;_h2]:font-display [&amp;_h2]:text-(--color-fg) [&amp;_h3]:mt-block-loose [&amp;_h3]:scroll-mt-24 [&amp;_h3]:text-heading-4 [&amp;_h3]:font-display [&amp;_h3]:text-(--color-fg) [&amp;_h4]:mt-block-tight [&amp;_h4]:scroll-mt-24 [&amp;_h4]:text-heading-4 [&amp;_h4]:font-display [&amp;_h4]:text-(--color-fg) [&amp;_h5]:mt-block-tight [&amp;_h5]:scroll-mt-24 [&amp;_h5]:text-heading-4 [&amp;_h5]:font-display [&amp;_h5]:text-(--color-fg) [&amp;_h6]:mt-block-tight [&amp;_h6]:scroll-mt-24 [&amp;_h6]:text-heading-4 [&amp;_h6]:font-display [&amp;_h6]:text-(--color-fg) [&amp;_p]:mt-paragraph [&amp;_strong]:font-semibold [&amp;_strong]:text-(--color-fg) [&amp;_em]:italic [&amp;_ul]:mt-paragraph [&amp;_ul]:list-disc [&amp;_ul]:ps-6 [&amp;_ol]:mt-paragraph [&amp;_ol]:list-decimal [&amp;_ol]:ps-6 [&amp;_li]:mt-1 [&amp;_li]:ps-1 [&amp;_li]:marker:text-(--color-text-muted) [&amp;_li>ul]:mt-1 [&amp;_li>ol]:mt-1 [&amp;_blockquote]:mt-paragraph [&amp;_blockquote]:border-s-4 [&amp;_blockquote]:border-(--color-border-strong) [&amp;_blockquote]:ps-4 [&amp;_blockquote]:italic [&amp;_blockquote]:text-(--color-text-muted) [&amp;_hr]:my-block-loose [&amp;_hr]:border-(--color-border) [&amp;_a]:text-(--color-accent) [&amp;_a]:underline [&amp;_a]:underline-offset-4 [&amp;_:not(pre)>code]:rounded [&amp;_:not(pre)>code]:bg-(--color-surface-secondary) [&amp;_:not(pre)>code]:px-1.5 [&amp;_:not(pre)>code]:py-0.5 [&amp;_:not(pre)>code]:text-code [&amp;_:not(pre)>code]:font-mono [&amp;_:not(pre)>code]:text-(--color-fg) [&amp;_pre]:mt-paragraph [&amp;_pre]:overflow-auto [&amp;_pre]:rounded-md [&amp;_pre]:border-hairline [&amp;_pre]:border-(--color-border) [&amp;_pre]:bg-(--color-bg) [&amp;_pre]:p-4 [&amp;_pre]:font-mono [&amp;_pre]:text-body-sm [&amp;_img]:mt-paragraph [&amp;_img]:h-auto [&amp;_img]:max-w-full [&amp;_img]:rounded-lg [&amp;_table]:mt-paragraph [&amp;_table]:w-full [&amp;_table]:border-collapse [&amp;_table]:text-body-sm [&amp;_th]:border-b [&amp;_th]:border-(--color-border) [&amp;_th]:bg-(--color-surface-secondary) [&amp;_th]:px-3 [&amp;_th]:py-2 [&amp;_th]:text-start [&amp;_th]:font-semibold [&amp;_th]:text-(--color-fg) [&amp;_td]:border-b [&amp;_td]:border-(--color-border) [&amp;_td]:px-3 [&amp;_td]:py-2 [&amp;_kbd]:rounded [&amp;_kbd]:border-hairline [&amp;_kbd]:border-(--color-border) [&amp;_kbd]:bg-(--color-surface-secondary) [&amp;_kbd]:px-1.5 [&amp;_kbd]:py-0.5 [&amp;_kbd]:text-caption [&amp;_kbd]:font-mono" data-testid="mdx-content"><div data-testid="mdx-rendered">mdx-body-content</div></div></article></div></div></div></main>"`,
101
- );
102
- });
103
-
104
- it("null source triggers notFound()", async () => {
105
- const renderPageSpy = jest.spyOn(pageRenderer, "renderPage");
106
- const { notFound } = jest.requireMock("next/navigation") as {
107
- notFound: jest.MockedFunction<() => never>;
108
- };
109
- notFound.mockClear();
110
-
111
- await expect(
112
- PartnerSlugPage({
113
- params: Promise.resolve({ locale: "en", slug: "unknown" }),
114
- getMdxSource: getMdxSourceEmpty,
115
- }),
116
- ).rejects.toThrow("NEXT_NOT_FOUND");
117
- // The 404 is renderPage's detail branch, not a route pre-check (#7537).
118
- expect(renderPageSpy).toHaveBeenCalledTimes(1);
119
- expect(
120
- renderPageSpy.mock.calls[0]![0].translationsNamespace,
121
- ).toBeUndefined();
122
- renderPageSpy.mockRestore();
123
- expect(notFound).toHaveBeenCalled();
124
- });
125
- });
@@ -1,49 +0,0 @@
1
- // Partners list page. Reads PartnersList MDX via the content adapter and emits
2
- // a JSON-LD CollectionPage via the dispatcher.
3
- // It lists every Partner page through one generated card section (#10121,
4
- // apps/web/lib/hub-children.tsx — the /alternatives and /templates shape).
5
- import type {
6
- getMdxSlugs as defaultGetMdxSlugs,
7
- getMdxSource as defaultGetMdxSource,
8
- getPageSections as defaultGetPageSections,
9
- } from "@working-theory/page-renderer";
10
- import { renderPage, renderPageMetadata } from "@working-theory/page-renderer";
11
- import type { Metadata } from "next";
12
- import type { ReactElement } from "react";
13
-
14
- import { type HubConfig, hubPageInput } from "../../../lib/hub-children";
15
-
16
- interface Props {
17
- params: Promise<{ locale: string }>;
18
- getMdxSource?: typeof defaultGetMdxSource;
19
- getPageSections?: typeof defaultGetPageSections;
20
- getMdxSlugs?: typeof defaultGetMdxSlugs;
21
- }
22
-
23
- const HUB: HubConfig = {
24
- listType: "PartnersList",
25
- slug: "partners",
26
- childType: "Partner",
27
- linkLabel: "Meet the partner",
28
- sectionId: "partner-cards",
29
- body: "mdx-body",
30
- };
31
-
32
- export async function generateMetadata({
33
- params,
34
- }: Pick<Props, "params">): Promise<Metadata> {
35
- const { locale } = await params;
36
- return renderPageMetadata({ type: "PartnersList", slug: "partners", locale });
37
- }
38
-
39
- export default async function Page({
40
- params,
41
- ...loaders
42
- }: Props): Promise<ReactElement> {
43
- const { locale } = await params;
44
- return renderPage({
45
- type: "PartnersList",
46
- slug: "partners",
47
- ...(await hubPageInput(HUB, locale, loaders)),
48
- });
49
- }
@@ -1,46 +0,0 @@
1
- // Portfolio item page (#6687). Reads the PortfolioItem MDX for the given slug and emits a
2
- // JSON-LD <script>. Unknown slugs 404 through renderPage. Renders `sections[]` when the
3
- // frontmatter carries them (the /for composed pattern), MDX prose otherwise.
4
- // NO_HAND_IMPLEMENT_OK: /build-starter operator-directed live pass (#6687).
5
- import {
6
- getMdxSource as defaultGetMdxSource,
7
- renderPage,
8
- renderPageMetadata,
9
- } from "@working-theory/page-renderer";
10
- import type { Metadata } from "next";
11
- import type { ReactElement } from "react";
12
-
13
- interface Props {
14
- params: Promise<{ locale: string; slug: string }>;
15
- getMdxSource?: typeof defaultGetMdxSource;
16
- }
17
-
18
- export async function generateMetadata({
19
- params,
20
- }: Pick<Props, "params">): Promise<Metadata> {
21
- const { locale, slug } = await params;
22
- return renderPageMetadata({ type: "PortfolioItem", slug, locale });
23
- }
24
-
25
- export default async function Page({
26
- params,
27
- getMdxSource = defaultGetMdxSource,
28
- }: Props): Promise<ReactElement> {
29
- const { locale, slug } = await params;
30
- // Read once to pick the body mode. A null source still goes to renderPage,
31
- // which owns the unknown-slug branch (#7537).
32
- const source = await getMdxSource("PortfolioItem", slug, locale);
33
-
34
- const composed =
35
- source !== null &&
36
- Array.isArray((source.frontmatter as { sections?: unknown[] }).sections) &&
37
- ((source.frontmatter as { sections?: unknown[] }).sections?.length ?? 0) > 0;
38
-
39
- return renderPage({
40
- type: "PortfolioItem",
41
- slug,
42
- locale,
43
- ...(composed ? {} : { bodyMode: "mdx-body" as const }),
44
- getMdxSource: async () => source,
45
- });
46
- }
@@ -1,38 +0,0 @@
1
- /**
2
- * Hub child cards (#10121) for /portfolio. The shared cases live in
3
- * `lib/__tests__/hub-children.fixtures.ts`; this file sits beside the route so
4
- * a scaffold without /portfolio drops it with the route (#10157).
5
- */
6
- const mockRenderPage = jest.fn(async (..._args: unknown[]) => "<rendered/>");
7
-
8
- jest.mock("@working-theory/page-renderer", () => ({
9
- __esModule: true,
10
- renderPage: (...args: unknown[]) => mockRenderPage(...args),
11
- renderPageMetadata: jest.fn(),
12
- // Never reached — every call in this suite passes its loaders via DI.
13
- getMdxSlugs: jest.fn(),
14
- getMdxSource: jest.fn(),
15
- getPageSections: jest.fn(),
16
- }));
17
-
18
- jest.mock("@working-theory/ui/sections", () => ({
19
- __esModule: true,
20
- SectionRenderer: () => null,
21
- }));
22
-
23
- import PortfolioPage from "../page";
24
- import {
25
- describeHub,
26
- type HubPage,
27
- } from "../../../../lib/__tests__/hub-children.fixtures";
28
-
29
- describeHub(
30
- [
31
- "portfolio",
32
- PortfolioPage as HubPage,
33
- "PortfolioList",
34
- "PortfolioItem",
35
- "composed",
36
- ],
37
- mockRenderPage,
38
- );
@@ -1,50 +0,0 @@
1
- // Portfolio list page (#6687). Reads PortfolioList MDX via the content adapter and emits
2
- // a JSON-LD CollectionPage via the dispatcher. The /for composed pattern:
3
- // sections when the frontmatter carries `sections[]`, MDX prose otherwise.
4
- // It lists every PortfolioItem page through one generated card section (#10121,
5
- // apps/web/lib/hub-children.tsx — the /alternatives and /templates shape).
6
- import type {
7
- getMdxSlugs as defaultGetMdxSlugs,
8
- getMdxSource as defaultGetMdxSource,
9
- getPageSections as defaultGetPageSections,
10
- } from "@working-theory/page-renderer";
11
- import { renderPage, renderPageMetadata } from "@working-theory/page-renderer";
12
- import type { Metadata } from "next";
13
- import type { ReactElement } from "react";
14
-
15
- import { type HubConfig, hubPageInput } from "../../../lib/hub-children";
16
-
17
- interface Props {
18
- params: Promise<{ locale: string }>;
19
- getMdxSource?: typeof defaultGetMdxSource;
20
- getPageSections?: typeof defaultGetPageSections;
21
- getMdxSlugs?: typeof defaultGetMdxSlugs;
22
- }
23
-
24
- const HUB: HubConfig = {
25
- listType: "PortfolioList",
26
- slug: "portfolio",
27
- childType: "PortfolioItem",
28
- linkLabel: "See the project",
29
- sectionId: "portfolio-cards",
30
- body: "composed",
31
- };
32
-
33
- export async function generateMetadata({
34
- params,
35
- }: Pick<Props, "params">): Promise<Metadata> {
36
- const { locale } = await params;
37
- return renderPageMetadata({ type: "PortfolioList", slug: "portfolio", locale });
38
- }
39
-
40
- export default async function Page({
41
- params,
42
- ...loaders
43
- }: Props): Promise<ReactElement> {
44
- const { locale } = await params;
45
- return renderPage({
46
- type: "PortfolioList",
47
- slug: "portfolio",
48
- ...(await hubPageInput(HUB, locale, loaders)),
49
- });
50
- }