bsmnt 0.9.0 → 0.11.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 (344) hide show
  1. package/dist/application/add-integration/index.d.ts.map +1 -1
  2. package/dist/application/add-integration/index.js +19 -2
  3. package/dist/application/add-integration/index.js.map +1 -1
  4. package/dist/application/shared/node-version.js.map +1 -1
  5. package/dist/core/create/internal-ids.d.ts +3 -0
  6. package/dist/core/create/internal-ids.d.ts.map +1 -1
  7. package/dist/core/create/internal-ids.js +4 -0
  8. package/dist/core/create/internal-ids.js.map +1 -1
  9. package/dist/domain/agents.d.ts.map +1 -1
  10. package/dist/domain/animations.d.ts.map +1 -1
  11. package/dist/domain/cms.d.ts.map +1 -1
  12. package/dist/domain/forms.d.ts.map +1 -1
  13. package/dist/domain/hooks.d.ts.map +1 -1
  14. package/dist/domain/skills.d.ts.map +1 -1
  15. package/dist/domain/templates.d.ts +10 -0
  16. package/dist/domain/templates.d.ts.map +1 -1
  17. package/dist/domain/templates.js +5 -0
  18. package/dist/domain/templates.js.map +1 -1
  19. package/dist/index.js +18 -5
  20. package/dist/index.js.map +1 -1
  21. package/dist/infrastructure/agents/register-sanity-mcp.js +3 -8
  22. package/dist/infrastructure/agents/register-sanity-mcp.js.map +1 -1
  23. package/dist/infrastructure/agents/register-storybook-mcp.d.ts +18 -0
  24. package/dist/infrastructure/agents/register-storybook-mcp.d.ts.map +1 -0
  25. package/dist/infrastructure/agents/register-storybook-mcp.js +157 -0
  26. package/dist/infrastructure/agents/register-storybook-mcp.js.map +1 -0
  27. package/dist/infrastructure/create/lifecycle-registry.d.ts.map +1 -1
  28. package/dist/infrastructure/create/lifecycle-registry.js +39 -1
  29. package/dist/infrastructure/create/lifecycle-registry.js.map +1 -1
  30. package/dist/infrastructure/create/merge-registry.d.ts.map +1 -1
  31. package/dist/infrastructure/create/merge-registry.js +4 -0
  32. package/dist/infrastructure/create/merge-registry.js.map +1 -1
  33. package/dist/infrastructure/create/sanity-auth.js.map +1 -1
  34. package/dist/infrastructure/create/setup-agent.d.ts +6 -1
  35. package/dist/infrastructure/create/setup-agent.d.ts.map +1 -1
  36. package/dist/infrastructure/create/setup-agent.js +23 -21
  37. package/dist/infrastructure/create/setup-agent.js.map +1 -1
  38. package/dist/infrastructure/create/setup-dotenvx.js.map +1 -1
  39. package/dist/infrastructure/create/setup-remote.js.map +1 -1
  40. package/dist/infrastructure/create/setup-sanity.d.ts.map +1 -1
  41. package/dist/infrastructure/create/setup-sanity.js +12 -1
  42. package/dist/infrastructure/create/setup-sanity.js.map +1 -1
  43. package/dist/infrastructure/integrations/ensure-studio-headers.d.ts +6 -0
  44. package/dist/infrastructure/integrations/ensure-studio-headers.d.ts.map +1 -0
  45. package/dist/infrastructure/integrations/ensure-studio-headers.js +153 -0
  46. package/dist/infrastructure/integrations/ensure-studio-headers.js.map +1 -0
  47. package/dist/infrastructure/integrations/inject-integration.d.ts.map +1 -1
  48. package/dist/infrastructure/integrations/inject-integration.js +2 -0
  49. package/dist/infrastructure/integrations/inject-integration.js.map +1 -1
  50. package/dist/infrastructure/update/notifier.js.map +1 -1
  51. package/dist/modules/features/cms/index.d.ts.map +1 -1
  52. package/dist/modules/features/cms/index.js +2 -0
  53. package/dist/modules/features/cms/index.js.map +1 -1
  54. package/dist/modules/features/cms/sanity/config.d.ts.map +1 -1
  55. package/dist/modules/features/cms/sanity/config.js +3 -1
  56. package/dist/modules/features/cms/sanity/config.js.map +1 -1
  57. package/dist/modules/features/cms/sanity/index.d.ts.map +1 -1
  58. package/dist/modules/features/cms/sanity/index.js +10 -1
  59. package/dist/modules/features/cms/sanity/index.js.map +1 -1
  60. package/dist/modules/features/cms/sanity/mergers/check-integration.d.ts.map +1 -1
  61. package/dist/modules/features/cms/sanity/mergers/check-integration.js +15 -6
  62. package/dist/modules/features/cms/sanity/mergers/check-integration.js.map +1 -1
  63. package/dist/modules/features/cms/sanity/mergers/knip.d.ts.map +1 -1
  64. package/dist/modules/features/cms/sanity/mergers/knip.js +1 -0
  65. package/dist/modules/features/cms/sanity/mergers/knip.js.map +1 -1
  66. package/dist/modules/features/cms/sanity/mergers/layout.js.map +1 -1
  67. package/dist/modules/features/cms/sanity/mergers/package-json.d.ts +12 -0
  68. package/dist/modules/features/cms/sanity/mergers/package-json.d.ts.map +1 -0
  69. package/dist/modules/features/cms/sanity/mergers/package-json.js +19 -0
  70. package/dist/modules/features/cms/sanity/mergers/package-json.js.map +1 -0
  71. package/dist/modules/features/cms/sanity-pagebuilder/config.d.ts.map +1 -1
  72. package/dist/modules/features/cms/sanity-pagebuilder/config.js +2 -1
  73. package/dist/modules/features/cms/sanity-pagebuilder/config.js.map +1 -1
  74. package/dist/modules/features/cms/sanity-pagebuilder/index.d.ts.map +1 -1
  75. package/dist/modules/features/cms/sanity-pagebuilder/index.js +7 -1
  76. package/dist/modules/features/cms/sanity-pagebuilder/index.js.map +1 -1
  77. package/dist/modules/features/cms/sanity-pagebuilder-cache/config.d.ts +14 -0
  78. package/dist/modules/features/cms/sanity-pagebuilder-cache/config.d.ts.map +1 -0
  79. package/dist/modules/features/cms/sanity-pagebuilder-cache/config.js +50 -0
  80. package/dist/modules/features/cms/sanity-pagebuilder-cache/config.js.map +1 -0
  81. package/dist/modules/features/cms/sanity-pagebuilder-cache/index.d.ts +3 -0
  82. package/dist/modules/features/cms/sanity-pagebuilder-cache/index.d.ts.map +1 -0
  83. package/dist/modules/features/cms/sanity-pagebuilder-cache/index.js +55 -0
  84. package/dist/modules/features/cms/sanity-pagebuilder-cache/index.js.map +1 -0
  85. package/dist/modules/presets/index.d.ts.map +1 -1
  86. package/dist/modules/presets/index.js +2 -0
  87. package/dist/modules/presets/index.js.map +1 -1
  88. package/dist/modules/presets/next-pagebuilder-cache.d.ts +3 -0
  89. package/dist/modules/presets/next-pagebuilder-cache.d.ts.map +1 -0
  90. package/dist/modules/presets/next-pagebuilder-cache.js +10 -0
  91. package/dist/modules/presets/next-pagebuilder-cache.js.map +1 -0
  92. package/dist/paths.d.ts +6 -0
  93. package/dist/paths.d.ts.map +1 -1
  94. package/dist/paths.js +6 -0
  95. package/dist/paths.js.map +1 -1
  96. package/package.json +6 -3
  97. package/src/modules/features/cms/sanity/files/app/api/blog/[slug]/route.ts +4 -1
  98. package/src/modules/features/cms/sanity/files/app/sitemap.md/route.ts +2 -1
  99. package/src/modules/features/cms/sanity/files/components/ui/sanity-image/index.tsx +19 -5
  100. package/src/modules/features/cms/sanity/files/lib/integrations/check-integration.ts +7 -6
  101. package/src/modules/features/cms/sanity/files/lib/integrations/sanity/README.md +32 -1
  102. package/src/modules/features/cms/sanity/files/lib/integrations/sanity/components/rich-text.tsx +1 -0
  103. package/src/modules/features/cms/sanity/files/lib/integrations/sanity/env.ts +2 -2
  104. package/src/modules/features/cms/sanity/files/proxy.ts +9 -0
  105. package/src/modules/features/cms/sanity-pagebuilder/files/app/api/[[...slug]]/route.ts +12 -3
  106. package/src/modules/features/cms/sanity-pagebuilder/files/app/api/revalidate/route.ts +172 -24
  107. package/src/modules/features/cms/sanity-pagebuilder/files/app/feed.xml/route.ts +14 -7
  108. package/src/modules/features/cms/sanity-pagebuilder/files/app/sitemap.md/route.ts +8 -2
  109. package/src/modules/features/cms/sanity-pagebuilder/files/app/studio/[[...tool]]/page.tsx +16 -1
  110. package/src/modules/features/cms/sanity-pagebuilder/files/components/sanity/rich-text.tsx +1 -0
  111. package/src/modules/features/cms/sanity-pagebuilder/files/components/sanity/visual-editing.tsx +2 -2
  112. package/src/modules/features/cms/sanity-pagebuilder/files/components/ui/sanity-image/index.tsx +15 -5
  113. package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/check-integration.ts +6 -5
  114. package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/client.ts +8 -0
  115. package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/components/slug-field.tsx +13 -7
  116. package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/components/slug-notices.tsx +125 -0
  117. package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/env.ts +2 -2
  118. package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/fetchers/layout.ts +22 -52
  119. package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/icons.ts +2 -2
  120. package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/live/index.tsx +4 -2
  121. package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/markdown-proxy.config.ts +1 -1
  122. package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/page-builder-config.ts +7 -0
  123. package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/page-tree-pane.tsx +70 -57
  124. package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/queries.ts +119 -29
  125. package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/revalidate-paths.ts +70 -0
  126. package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/schemas/components/index.ts +1 -0
  127. package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/schemas/components/reusable/rich-text-block.ts +39 -0
  128. package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/schemas/index.ts +2 -0
  129. package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/schemas/layout/redirect.ts +35 -4
  130. package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/schemas/shared/page.ts +12 -0
  131. package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/tags.ts +56 -0
  132. package/src/modules/features/cms/sanity-pagebuilder/files/lib/integrations/sanity/utils/page-builder-markdown.ts +12 -0
  133. package/src/modules/features/cms/sanity-pagebuilder/files/lib/utils/sitemap.ts +11 -8
  134. package/src/modules/features/cms/sanity-pagebuilder/files/proxy.ts +9 -0
  135. package/src/modules/features/cms/sanity-pagebuilder-cache/files/.knip.json +8 -0
  136. package/src/modules/features/cms/sanity-pagebuilder-cache/files/app/api/[[...slug]]/route.ts +112 -0
  137. package/src/modules/features/cms/sanity-pagebuilder-cache/files/app/api/draft-mode/disable/route.ts +7 -0
  138. package/src/modules/features/cms/sanity-pagebuilder-cache/files/app/api/draft-mode/enable/route.ts +20 -0
  139. package/src/modules/features/cms/sanity-pagebuilder-cache/files/app/api/revalidate/route.ts +292 -0
  140. package/src/modules/features/cms/sanity-pagebuilder-cache/files/app/feed.xml/route.ts +66 -0
  141. package/src/modules/features/cms/sanity-pagebuilder-cache/files/app/sitemap.md/route.ts +132 -0
  142. package/src/modules/features/cms/sanity-pagebuilder-cache/files/app/studio/[[...tool]]/layout.tsx +26 -0
  143. package/src/modules/features/cms/sanity-pagebuilder-cache/files/app/studio/[[...tool]]/page.tsx +23 -0
  144. package/src/modules/features/cms/sanity-pagebuilder-cache/files/components/sanity/draft-mode-toggle.tsx +27 -0
  145. package/src/modules/features/cms/sanity-pagebuilder-cache/files/components/sanity/rich-text.tsx +88 -0
  146. package/src/modules/features/cms/sanity-pagebuilder-cache/files/components/sanity/visual-editing.tsx +11 -0
  147. package/src/modules/features/cms/sanity-pagebuilder-cache/files/components/ui/sanity-image/index.tsx +51 -0
  148. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/check-integration.ts +6 -0
  149. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/client.ts +37 -0
  150. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/components/block-actions-item.tsx +81 -0
  151. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/components/disable-draft-mode.tsx +23 -0
  152. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/components/page-builder-input.tsx +39 -0
  153. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/components/page-category-input.tsx +50 -0
  154. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/components/same-as-input.tsx +66 -0
  155. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/components/slug-field.tsx +24 -0
  156. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/components/slug-input.tsx +14 -0
  157. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/components/slug-notices.tsx +125 -0
  158. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/confirm-publish-action.ts +40 -0
  159. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/env.ts +34 -0
  160. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/fetchers/layout.ts +39 -0
  161. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/fetchers/redirects.ts +22 -0
  162. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/icons.ts +81 -0
  163. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/live/index.tsx +140 -0
  164. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/markdown-proxy.config.ts +50 -0
  165. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/page-builder-config.ts +144 -0
  166. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/page-category.ts +28 -0
  167. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/page-tree-pane.tsx +431 -0
  168. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/pinned-pages.ts +54 -0
  169. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/presentation.ts +119 -0
  170. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/queries.ts +548 -0
  171. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/revalidate-paths.ts +70 -0
  172. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/sanity.cli.ts +29 -0
  173. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/sanity.config.ts +116 -0
  174. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/components/index.ts +6 -0
  175. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/components/reusable/blog-content.ts +89 -0
  176. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/components/reusable/description.ts +29 -0
  177. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/components/reusable/gated-content.ts +178 -0
  178. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/components/reusable/hero.ts +28 -0
  179. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/components/reusable/rich-text-block.ts +39 -0
  180. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/components/singleton/content-collection.ts +45 -0
  181. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/content/author.ts +70 -0
  182. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/content/blog-category.ts +55 -0
  183. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/index.ts +134 -0
  184. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/layout/company-data.ts +70 -0
  185. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/layout/footer.ts +79 -0
  186. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/layout/navbar.ts +75 -0
  187. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/layout/redirect.ts +152 -0
  188. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/layout/structured-data.ts +124 -0
  189. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/shared/link.ts +125 -0
  190. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/shared/logo-field.ts +9 -0
  191. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/shared/metadata.ts +132 -0
  192. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/shared/nav-objects.ts +192 -0
  193. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/shared/page-builder.ts +43 -0
  194. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/shared/page-folder.ts +124 -0
  195. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/shared/page.ts +265 -0
  196. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/shared/richText.ts +63 -0
  197. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/schemas/shared/structured-data-blocks.ts +436 -0
  198. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/singletons.ts +51 -0
  199. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/structure.ts +334 -0
  200. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/tags.ts +89 -0
  201. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/utils/image.ts +8 -0
  202. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/utils/link.ts +140 -0
  203. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/utils/page-builder-markdown.ts +113 -0
  204. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/integrations/sanity/utils/page-json-ld.ts +208 -0
  205. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/scripts/sanity-typegen.ts +36 -0
  206. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/utils/check-redirect.ts +30 -0
  207. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/utils/json-ld.tsx +522 -0
  208. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/utils/metadata.ts +189 -0
  209. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/utils/rss.ts +96 -0
  210. package/src/modules/features/cms/sanity-pagebuilder-cache/files/lib/utils/sitemap.ts +58 -0
  211. package/src/modules/features/cms/sanity-pagebuilder-cache/files/proxy.ts +90 -0
  212. package/src/modules/features/env/dotenvx/files/vercelignore +5 -0
  213. package/src/templates/next-default/.env.example +4 -2
  214. package/src/templates/next-default/.github/workflows/ci.yml +1 -1
  215. package/src/templates/next-default/.vscode/settings.json +0 -2
  216. package/src/templates/next-default/app/robots.ts +2 -3
  217. package/src/templates/next-default/components/ui/image/index.tsx +2 -4
  218. package/src/templates/next-default/knip.json +1 -1
  219. package/src/templates/next-default/lefthook.yml +1 -1
  220. package/src/templates/next-default/lib/utils/README.md +18 -5
  221. package/src/templates/next-default/lib/utils/image-sizes.ts +72 -0
  222. package/src/templates/next-default/lib/utils/merge-refs.ts +56 -0
  223. package/src/templates/next-default/lib/utils/strings.ts +1 -51
  224. package/src/templates/next-default/next.config.ts +38 -5
  225. package/src/templates/next-default/package.json +9 -12
  226. package/src/templates/next-experiments/.env.example +4 -2
  227. package/src/templates/next-experiments/.github/workflows/ci.yml +1 -1
  228. package/src/templates/next-experiments/.vscode/settings.json +0 -2
  229. package/src/templates/next-experiments/app/page.tsx +1 -1
  230. package/src/templates/next-experiments/app/robots.ts +2 -3
  231. package/src/templates/next-experiments/components/ui/image/index.tsx +2 -4
  232. package/src/templates/next-experiments/knip.json +1 -1
  233. package/src/templates/next-experiments/lefthook.yml +1 -1
  234. package/src/templates/next-experiments/lib/utils/README.md +18 -5
  235. package/src/templates/next-experiments/lib/utils/image-sizes.ts +72 -0
  236. package/src/templates/next-experiments/lib/utils/merge-refs.ts +56 -0
  237. package/src/templates/next-experiments/lib/utils/strings.ts +1 -51
  238. package/src/templates/next-experiments/next.config.ts +38 -5
  239. package/src/templates/next-experiments/package.json +9 -12
  240. package/src/templates/next-pagebuilder/.env.example +3 -0
  241. package/src/templates/next-pagebuilder/.github/workflows/ci.yml +1 -1
  242. package/src/templates/next-pagebuilder/.vscode/settings.json +0 -2
  243. package/src/templates/next-pagebuilder/README.md +95 -0
  244. package/src/templates/next-pagebuilder/app/(content)/[[...slug]]/page.tsx +24 -9
  245. package/src/templates/next-pagebuilder/app/robots.ts +2 -3
  246. package/src/templates/next-pagebuilder/app/sitemap.xml/route.ts +9 -4
  247. package/src/templates/next-pagebuilder/biome.json +2 -1
  248. package/src/templates/next-pagebuilder/components/layout/footer/index.tsx +3 -6
  249. package/src/templates/next-pagebuilder/components/layout/header/index.tsx +3 -2
  250. package/src/templates/next-pagebuilder/components/layout/json-ld/index.tsx +3 -8
  251. package/src/templates/next-pagebuilder/components/page-builder/components/content-collection/content-filters.tsx +23 -40
  252. package/src/templates/next-pagebuilder/components/page-builder/components/content-collection/index.tsx +88 -58
  253. package/src/templates/next-pagebuilder/components/page-builder/components/content-collection/skeleton.tsx +41 -0
  254. package/src/templates/next-pagebuilder/components/page-builder/components/content-collection/types.ts +14 -1
  255. package/src/templates/next-pagebuilder/components/page-builder/components/rich-text-block.tsx +16 -0
  256. package/src/templates/next-pagebuilder/components/page-builder/renderer.tsx +23 -3
  257. package/src/templates/next-pagebuilder/components/page-document/index.tsx +1 -0
  258. package/src/templates/next-pagebuilder/components/ui/image/index.tsx +2 -1
  259. package/src/templates/next-pagebuilder/knip.json +3 -2
  260. package/src/templates/next-pagebuilder/lefthook.yml +1 -1
  261. package/src/templates/next-pagebuilder/lib/integrations/sanity/sanity.types.ts +1221 -977
  262. package/src/templates/next-pagebuilder/lib/utils/image-sizes.ts +72 -0
  263. package/src/templates/next-pagebuilder/lib/utils/merge-refs.ts +56 -0
  264. package/src/templates/next-pagebuilder/next.config.ts +35 -5
  265. package/src/templates/next-pagebuilder/package.json +8 -10
  266. package/src/templates/next-pagebuilder-cache/.biome/plugins/README.md +21 -0
  267. package/src/templates/next-pagebuilder-cache/.biome/plugins/no-anchor-element.grit +12 -0
  268. package/src/templates/next-pagebuilder-cache/.biome/plugins/no-relative-parent-imports.grit +10 -0
  269. package/src/templates/next-pagebuilder-cache/.biome/plugins/no-unnecessary-forwardref.grit +9 -0
  270. package/src/templates/next-pagebuilder-cache/.env.example +40 -0
  271. package/src/templates/next-pagebuilder-cache/.github/PULL_REQUEST_TEMPLATE.md +13 -0
  272. package/src/templates/next-pagebuilder-cache/.github/workflows/ci.yml +105 -0
  273. package/src/templates/next-pagebuilder-cache/.vscode/extensions.json +19 -0
  274. package/src/templates/next-pagebuilder-cache/.vscode/settings.json +103 -0
  275. package/src/templates/next-pagebuilder-cache/.zed/settings.json +47 -0
  276. package/src/templates/next-pagebuilder-cache/README.md +212 -0
  277. package/src/templates/next-pagebuilder-cache/_gitignore +65 -0
  278. package/src/templates/next-pagebuilder-cache/app/(content)/[[...slug]]/page.tsx +124 -0
  279. package/src/templates/next-pagebuilder-cache/app/(content)/layout.tsx +28 -0
  280. package/src/templates/next-pagebuilder-cache/app/actions/unlock-gated-content.ts +53 -0
  281. package/src/templates/next-pagebuilder-cache/app/favicon.ico +0 -0
  282. package/src/templates/next-pagebuilder-cache/app/layout.tsx +83 -0
  283. package/src/templates/next-pagebuilder-cache/app/robots.ts +13 -0
  284. package/src/templates/next-pagebuilder-cache/app/sitemap.xml/route.ts +84 -0
  285. package/src/templates/next-pagebuilder-cache/biome.json +257 -0
  286. package/src/templates/next-pagebuilder-cache/components/layout/footer/index.tsx +127 -0
  287. package/src/templates/next-pagebuilder-cache/components/layout/header/components/cta-button.tsx +28 -0
  288. package/src/templates/next-pagebuilder-cache/components/layout/header/components/mega-menu-panel.tsx +90 -0
  289. package/src/templates/next-pagebuilder-cache/components/layout/header/components/nav-item-renderer.tsx +98 -0
  290. package/src/templates/next-pagebuilder-cache/components/layout/header/components/nav-leaf-item.tsx +33 -0
  291. package/src/templates/next-pagebuilder-cache/components/layout/header/components/types.ts +7 -0
  292. package/src/templates/next-pagebuilder-cache/components/layout/header/header-client.tsx +110 -0
  293. package/src/templates/next-pagebuilder-cache/components/layout/header/index.tsx +32 -0
  294. package/src/templates/next-pagebuilder-cache/components/layout/json-ld/index.tsx +79 -0
  295. package/src/templates/next-pagebuilder-cache/components/layout/wrapper/index.tsx +33 -0
  296. package/src/templates/next-pagebuilder-cache/components/page-builder/components/article-content/index.tsx +78 -0
  297. package/src/templates/next-pagebuilder-cache/components/page-builder/components/article-content/related-post-item.tsx +27 -0
  298. package/src/templates/next-pagebuilder-cache/components/page-builder/components/content-collection/content-card.tsx +66 -0
  299. package/src/templates/next-pagebuilder-cache/components/page-builder/components/content-collection/content-filters.tsx +76 -0
  300. package/src/templates/next-pagebuilder-cache/components/page-builder/components/content-collection/content-grid.tsx +40 -0
  301. package/src/templates/next-pagebuilder-cache/components/page-builder/components/content-collection/content-pagination-nav.tsx +71 -0
  302. package/src/templates/next-pagebuilder-cache/components/page-builder/components/content-collection/index.tsx +306 -0
  303. package/src/templates/next-pagebuilder-cache/components/page-builder/components/content-collection/skeleton.tsx +41 -0
  304. package/src/templates/next-pagebuilder-cache/components/page-builder/components/content-collection/types.ts +32 -0
  305. package/src/templates/next-pagebuilder-cache/components/page-builder/components/description.tsx +17 -0
  306. package/src/templates/next-pagebuilder-cache/components/page-builder/components/gated-content/index.tsx +169 -0
  307. package/src/templates/next-pagebuilder-cache/components/page-builder/components/hero.tsx +17 -0
  308. package/src/templates/next-pagebuilder-cache/components/page-builder/components/rich-text-block.tsx +16 -0
  309. package/src/templates/next-pagebuilder-cache/components/page-builder/renderer.tsx +71 -0
  310. package/src/templates/next-pagebuilder-cache/components/page-builder/types.ts +25 -0
  311. package/src/templates/next-pagebuilder-cache/components/page-document/index.tsx +147 -0
  312. package/src/templates/next-pagebuilder-cache/components/ui/image/index.tsx +216 -0
  313. package/src/templates/next-pagebuilder-cache/components/ui/link/index.tsx +152 -0
  314. package/src/templates/next-pagebuilder-cache/components.json +24 -0
  315. package/src/templates/next-pagebuilder-cache/knip.json +35 -0
  316. package/src/templates/next-pagebuilder-cache/lefthook.yml +25 -0
  317. package/src/templates/next-pagebuilder-cache/lib/integrations/sanity/sanity.types.ts +1588 -0
  318. package/src/templates/next-pagebuilder-cache/lib/scripts/setup-ci-secrets.ts +117 -0
  319. package/src/templates/next-pagebuilder-cache/lib/styles/cn.ts +5 -0
  320. package/src/templates/next-pagebuilder-cache/lib/styles/global.css +69 -0
  321. package/src/templates/next-pagebuilder-cache/lib/utils/base-url.ts +17 -0
  322. package/src/templates/next-pagebuilder-cache/lib/utils/format-date.ts +8 -0
  323. package/src/templates/next-pagebuilder-cache/lib/utils/slug-tag.ts +6 -0
  324. package/src/templates/next-pagebuilder-cache/next.config.ts +176 -0
  325. package/src/templates/next-pagebuilder-cache/package.json +62 -0
  326. package/src/templates/next-pagebuilder-cache/postcss.config.mjs +65 -0
  327. package/src/templates/next-pagebuilder-cache/svg.d.ts +6 -0
  328. package/src/templates/next-pagebuilder-cache/tsconfig.json +38 -0
  329. package/src/templates/next-webgl/.env.example +4 -2
  330. package/src/templates/next-webgl/.github/workflows/ci.yml +1 -1
  331. package/src/templates/next-webgl/.vscode/settings.json +0 -2
  332. package/src/templates/next-webgl/app/robots.ts +2 -3
  333. package/src/templates/next-webgl/components/ui/image/index.tsx +2 -4
  334. package/src/templates/next-webgl/knip.json +1 -1
  335. package/src/templates/next-webgl/lefthook.yml +1 -1
  336. package/src/templates/next-webgl/lib/utils/README.md +18 -5
  337. package/src/templates/next-webgl/lib/utils/image-sizes.ts +72 -0
  338. package/src/templates/next-webgl/lib/utils/merge-refs.ts +56 -0
  339. package/src/templates/next-webgl/lib/utils/strings.ts +1 -51
  340. package/src/templates/next-webgl/next.config.ts +38 -5
  341. package/src/templates/next-webgl/package.json +11 -14
  342. package/src/templates/next-experiments/tsconfig.tsbuildinfo +0 -1
  343. package/src/templates/next-pagebuilder/app/actions/refresh.ts +0 -5
  344. package/src/templates/next-webgl/tsconfig.tsbuildinfo +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/features/cms/sanity-pagebuilder/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAItE,eAAO,MAAM,wBAAwB,EAAE,aA2BtC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/features/cms/sanity-pagebuilder/index.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAItE,eAAO,MAAM,wBAAwB,EAAE,aAiCtC,CAAC"}
@@ -23,9 +23,15 @@ export const sanityPagebuilderFeature = {
23
23
  { key: "NEXT_PUBLIC_SANITY_PROJECT_ID", required: true },
24
24
  { key: "NEXT_PUBLIC_SANITY_DATASET", required: true },
25
25
  { key: "SANITY_API_READ_TOKEN", required: true },
26
+ // /api/revalidate rejects every request without this, which is what
27
+ // clears cached content when an editor publishes.
28
+ { key: "SANITY_REVALIDATE_SECRET", required: true },
26
29
  ],
27
30
  lifecycle: {
28
- finalize: [{ id: CREATE_LIFECYCLE_STEP_IDS.sanitySetupProject }],
31
+ finalize: [
32
+ { id: CREATE_LIFECYCLE_STEP_IDS.sanitySetupProject },
33
+ { id: CREATE_LIFECYCLE_STEP_IDS.sanityMcpSetup },
34
+ ],
29
35
  },
30
36
  };
31
37
  },
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/features/cms/sanity-pagebuilder/index.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EACN,yBAAyB,EACzB,wBAAwB,EACxB,oCAAoC,GACpC,MAAM,yCAAyC,CAAC;AAEjD,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAEtD,MAAM,CAAC,MAAM,wBAAwB,GAAkB;IACtD,EAAE,EAAE,oCAAoC;IACxC,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,uBAAuB;IAC9B,aAAa,EAAE,CAAC,wBAAwB,CAAC;IACzC,UAAU,CAAC,OAAO;QACjB,OAAO;YACN,WAAW,EAAE;gBACZ,YAAY,EAAE,uBAAuB,CAAC,YAAY;gBAClD,eAAe,EAAE,uBAAuB,CAAC,eAAe;gBACxD,OAAO,EAAE,uBAAuB,CAAC,OAAO;aACxC;YACD,SAAS,EAAE,uBAAuB,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;gBACvE,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,4BAA4B,EAAE,YAAY,CAAC;gBAC3D,EAAE,EAAE,iBAAiB,CAAC,YAAY,EAAE,OAAO,CAAC,UAAU,CAAC;gBACvD,SAAS,EAAE,KAAK;aAChB,CAAC,CAAC;YACH,GAAG,EAAE;gBACJ,EAAE,GAAG,EAAE,+BAA+B,EAAE,QAAQ,EAAE,IAAI,EAAE;gBACxD,EAAE,GAAG,EAAE,4BAA4B,EAAE,QAAQ,EAAE,IAAI,EAAE;gBACrD,EAAE,GAAG,EAAE,uBAAuB,EAAE,QAAQ,EAAE,IAAI,EAAE;aAChD;YACD,SAAS,EAAE;gBACV,QAAQ,EAAE,CAAC,EAAE,EAAE,EAAE,yBAAyB,CAAC,kBAAkB,EAAE,CAAC;aAChE;SACD,CAAC;IACH,CAAC;CACD,CAAC;AAEF,SAAS,iBAAiB,CAAC,YAAoB,EAAE,MAAmB;IACnE,IAAI,CAAC,MAAM;QAAE,OAAO,YAAY,CAAC;IAEjC,KAAK,MAAM,KAAK,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,CAAC;QACrD,IAAI,YAAY,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;YACpC,OAAO,GAAG,MAAM,GAAG,YAAY,EAAE,CAAC;QACnC,CAAC;IACF,CAAC;IAED,IAAI,YAAY,KAAK,UAAU,IAAI,YAAY,KAAK,UAAU,EAAE,CAAC;QAChE,OAAO,GAAG,MAAM,GAAG,YAAY,EAAE,CAAC;IACnC,CAAC;IAED,OAAO,YAAY,CAAC;AACrB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/features/cms/sanity-pagebuilder/index.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EACN,yBAAyB,EACzB,wBAAwB,EACxB,oCAAoC,GACpC,MAAM,yCAAyC,CAAC;AAEjD,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAEtD,MAAM,CAAC,MAAM,wBAAwB,GAAkB;IACtD,EAAE,EAAE,oCAAoC;IACxC,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,uBAAuB;IAC9B,aAAa,EAAE,CAAC,wBAAwB,CAAC;IACzC,UAAU,CAAC,OAAO;QACjB,OAAO;YACN,WAAW,EAAE;gBACZ,YAAY,EAAE,uBAAuB,CAAC,YAAY;gBAClD,eAAe,EAAE,uBAAuB,CAAC,eAAe;gBACxD,OAAO,EAAE,uBAAuB,CAAC,OAAO;aACxC;YACD,SAAS,EAAE,uBAAuB,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;gBACvE,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,4BAA4B,EAAE,YAAY,CAAC;gBAC3D,EAAE,EAAE,iBAAiB,CAAC,YAAY,EAAE,OAAO,CAAC,UAAU,CAAC;gBACvD,SAAS,EAAE,KAAK;aAChB,CAAC,CAAC;YACH,GAAG,EAAE;gBACJ,EAAE,GAAG,EAAE,+BAA+B,EAAE,QAAQ,EAAE,IAAI,EAAE;gBACxD,EAAE,GAAG,EAAE,4BAA4B,EAAE,QAAQ,EAAE,IAAI,EAAE;gBACrD,EAAE,GAAG,EAAE,uBAAuB,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAChD,oEAAoE;gBACpE,kDAAkD;gBAClD,EAAE,GAAG,EAAE,0BAA0B,EAAE,QAAQ,EAAE,IAAI,EAAE;aACnD;YACD,SAAS,EAAE;gBACV,QAAQ,EAAE;oBACT,EAAE,EAAE,EAAE,yBAAyB,CAAC,kBAAkB,EAAE;oBACpD,EAAE,EAAE,EAAE,yBAAyB,CAAC,cAAc,EAAE;iBAChD;aACD;SACD,CAAC;IACH,CAAC;CACD,CAAC;AAEF,SAAS,iBAAiB,CAAC,YAAoB,EAAE,MAAmB;IACnE,IAAI,CAAC,MAAM;QAAE,OAAO,YAAY,CAAC;IAEjC,KAAK,MAAM,KAAK,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,CAAC;QACrD,IAAI,YAAY,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;YACpC,OAAO,GAAG,MAAM,GAAG,YAAY,EAAE,CAAC;QACnC,CAAC;IACF,CAAC;IAED,IAAI,YAAY,KAAK,UAAU,IAAI,YAAY,KAAK,UAAU,EAAE,CAAC;QAChE,OAAO,GAAG,MAAM,GAAG,YAAY,EAAE,CAAC;IACnC,CAAC;IAED,OAAO,YAAY,CAAC;AACrB,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Sanity Page Builder (Cache Components) integration configuration manifest.
3
+ * Single source of truth for dependencies, scripts, and the additive paths
4
+ * the feature ships into a generated project.
5
+ */
6
+ export interface SanityPagebuilderCacheIntegrationConfig {
7
+ name: string;
8
+ dependencies: Record<string, string>;
9
+ devDependencies: Record<string, string>;
10
+ scripts: Record<string, string>;
11
+ additivePaths: string[];
12
+ }
13
+ export declare const sanityPagebuilderCacheConfig: SanityPagebuilderCacheIntegrationConfig;
14
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../../src/modules/features/cms/sanity-pagebuilder-cache/config.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,WAAW,uCAAuC;IACvD,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,aAAa,EAAE,MAAM,EAAE,CAAC;CACxB;AAED,eAAO,MAAM,4BAA4B,EAAE,uCAiDzC,CAAC"}
@@ -0,0 +1,50 @@
1
+ /**
2
+ * Sanity Page Builder (Cache Components) integration configuration manifest.
3
+ * Single source of truth for dependencies, scripts, and the additive paths
4
+ * the feature ships into a generated project.
5
+ */
6
+ export const sanityPagebuilderCacheConfig = {
7
+ name: "sanity-pagebuilder-cache",
8
+ dependencies: {
9
+ "@phosphor-icons/react": "^2.1.10",
10
+ "@portabletext/types": "^4.0.2",
11
+ "@sanity/asset-utils": "^2.3.0",
12
+ "@sanity/icons": "^3.7.4",
13
+ "@sanity/image-url": "^2.1.1",
14
+ "@sanity/table": "^2.0.1",
15
+ "@sanity/ui": "^3.1.14",
16
+ "@sanity/vision": "^5.30.0",
17
+ "@sanity/visual-editing": "^5.4.3",
18
+ "next-sanity": "^13.3.1",
19
+ sanity: "^5.30.0",
20
+ "sanity-plugin-media": "^4.1.1",
21
+ },
22
+ devDependencies: {
23
+ "@sanity/browserslist-config": "^1.0.5",
24
+ "schema-dts": "^2.0.0",
25
+ },
26
+ scripts: {
27
+ "sanity:extract": "cd lib/integrations/sanity && bun --env-file ../../../.env.local sanity schema extract",
28
+ "sanity:typegen": "bun ./lib/scripts/sanity-typegen.ts",
29
+ predev: "bun run sanity:typegen",
30
+ prebuild: "bun run sanity:typegen",
31
+ },
32
+ additivePaths: [
33
+ "lib/integrations/sanity",
34
+ "lib/integrations/check-integration.ts",
35
+ "lib/utils/check-redirect.ts",
36
+ "lib/utils/json-ld.tsx",
37
+ "lib/utils/metadata.ts",
38
+ "lib/utils/rss.ts",
39
+ "lib/utils/sitemap.ts",
40
+ "lib/scripts/sanity-typegen.ts",
41
+ "app/studio",
42
+ "app/api",
43
+ "app/feed.xml",
44
+ "app/sitemap.md",
45
+ "proxy.ts",
46
+ "components/sanity",
47
+ "components/ui/sanity-image",
48
+ ],
49
+ };
50
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../../src/modules/features/cms/sanity-pagebuilder-cache/config.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAUH,MAAM,CAAC,MAAM,4BAA4B,GACxC;IACC,IAAI,EAAE,0BAA0B;IAEhC,YAAY,EAAE;QACb,uBAAuB,EAAE,SAAS;QAClC,qBAAqB,EAAE,QAAQ;QAC/B,qBAAqB,EAAE,QAAQ;QAC/B,eAAe,EAAE,QAAQ;QACzB,mBAAmB,EAAE,QAAQ;QAC7B,eAAe,EAAE,QAAQ;QACzB,YAAY,EAAE,SAAS;QACvB,gBAAgB,EAAE,SAAS;QAC3B,wBAAwB,EAAE,QAAQ;QAClC,aAAa,EAAE,SAAS;QACxB,MAAM,EAAE,SAAS;QACjB,qBAAqB,EAAE,QAAQ;KAC/B;IAED,eAAe,EAAE;QAChB,6BAA6B,EAAE,QAAQ;QACvC,YAAY,EAAE,QAAQ;KACtB;IAED,OAAO,EAAE;QACR,gBAAgB,EACf,wFAAwF;QACzF,gBAAgB,EAAE,qCAAqC;QACvD,MAAM,EAAE,wBAAwB;QAChC,QAAQ,EAAE,wBAAwB;KAClC;IAED,aAAa,EAAE;QACd,yBAAyB;QACzB,uCAAuC;QACvC,6BAA6B;QAC7B,uBAAuB;QACvB,uBAAuB;QACvB,kBAAkB;QAClB,sBAAsB;QACtB,+BAA+B;QAC/B,YAAY;QACZ,SAAS;QACT,cAAc;QACd,gBAAgB;QAChB,UAAU;QACV,mBAAmB;QACnB,4BAA4B;KAC5B;CACD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { FeatureModule } from "../../../../core/create/types.js";
2
+ export declare const sanityPagebuilderCacheFeature: FeatureModule;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/features/cms/sanity-pagebuilder-cache/index.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAItE,eAAO,MAAM,6BAA6B,EAAE,aAsC3C,CAAC"}
@@ -0,0 +1,55 @@
1
+ import path from "node:path";
2
+ import { CREATE_LIFECYCLE_STEP_IDS, SANITY_FEATURE_MODULE_ID, SANITY_PAGEBUILDER_CACHE_FEATURE_MODULE_ID, SANITY_PAGEBUILDER_FEATURE_MODULE_ID, } from "../../../../core/create/internal-ids.js";
3
+ import { SANITY_PAGEBUILDER_CACHE_FILES_DIR } from "../../../../paths.js";
4
+ import { sanityPagebuilderCacheConfig } from "./config.js";
5
+ export const sanityPagebuilderCacheFeature = {
6
+ id: SANITY_PAGEBUILDER_CACHE_FEATURE_MODULE_ID,
7
+ kind: "feature",
8
+ label: "Sanity (Page Builder, Cache Components)",
9
+ conflictsWith: [
10
+ SANITY_FEATURE_MODULE_ID,
11
+ SANITY_PAGEBUILDER_FEATURE_MODULE_ID,
12
+ ],
13
+ contribute(context) {
14
+ return {
15
+ packageJson: {
16
+ dependencies: sanityPagebuilderCacheConfig.dependencies,
17
+ devDependencies: sanityPagebuilderCacheConfig.devDependencies,
18
+ scripts: sanityPagebuilderCacheConfig.scripts,
19
+ },
20
+ copyPaths: sanityPagebuilderCacheConfig.additivePaths.map((relativePath) => ({
21
+ from: path.join(SANITY_PAGEBUILDER_CACHE_FILES_DIR, relativePath),
22
+ to: withProjectPrefix(relativePath, context.pathPrefix),
23
+ overwrite: false,
24
+ })),
25
+ env: [
26
+ { key: "NEXT_PUBLIC_SANITY_PROJECT_ID", required: true },
27
+ { key: "NEXT_PUBLIC_SANITY_DATASET", required: true },
28
+ { key: "SANITY_API_READ_TOKEN", required: true },
29
+ // /api/revalidate rejects every request without this, which is what
30
+ // clears cached content when an editor publishes.
31
+ { key: "SANITY_REVALIDATE_SECRET", required: true },
32
+ ],
33
+ lifecycle: {
34
+ finalize: [
35
+ { id: CREATE_LIFECYCLE_STEP_IDS.sanitySetupProject },
36
+ { id: CREATE_LIFECYCLE_STEP_IDS.sanityMcpSetup },
37
+ ],
38
+ },
39
+ };
40
+ },
41
+ };
42
+ function withProjectPrefix(relativePath, prefix) {
43
+ if (!prefix)
44
+ return relativePath;
45
+ for (const start of ["app/", "lib/", "components/"]) {
46
+ if (relativePath.startsWith(start)) {
47
+ return `${prefix}${relativePath}`;
48
+ }
49
+ }
50
+ if (relativePath === "proxy.ts" || relativePath === "proxy.js") {
51
+ return `${prefix}${relativePath}`;
52
+ }
53
+ return relativePath;
54
+ }
55
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/features/cms/sanity-pagebuilder-cache/index.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EACN,yBAAyB,EACzB,wBAAwB,EACxB,0CAA0C,EAC1C,oCAAoC,GACpC,MAAM,yCAAyC,CAAC;AAEjD,OAAO,EAAE,kCAAkC,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAC;AAE3D,MAAM,CAAC,MAAM,6BAA6B,GAAkB;IAC3D,EAAE,EAAE,0CAA0C;IAC9C,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,yCAAyC;IAChD,aAAa,EAAE;QACd,wBAAwB;QACxB,oCAAoC;KACpC;IACD,UAAU,CAAC,OAAO;QACjB,OAAO;YACN,WAAW,EAAE;gBACZ,YAAY,EAAE,4BAA4B,CAAC,YAAY;gBACvD,eAAe,EAAE,4BAA4B,CAAC,eAAe;gBAC7D,OAAO,EAAE,4BAA4B,CAAC,OAAO;aAC7C;YACD,SAAS,EAAE,4BAA4B,CAAC,aAAa,CAAC,GAAG,CACxD,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;gBAClB,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,kCAAkC,EAAE,YAAY,CAAC;gBACjE,EAAE,EAAE,iBAAiB,CAAC,YAAY,EAAE,OAAO,CAAC,UAAU,CAAC;gBACvD,SAAS,EAAE,KAAK;aAChB,CAAC,CACF;YACD,GAAG,EAAE;gBACJ,EAAE,GAAG,EAAE,+BAA+B,EAAE,QAAQ,EAAE,IAAI,EAAE;gBACxD,EAAE,GAAG,EAAE,4BAA4B,EAAE,QAAQ,EAAE,IAAI,EAAE;gBACrD,EAAE,GAAG,EAAE,uBAAuB,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAChD,oEAAoE;gBACpE,kDAAkD;gBAClD,EAAE,GAAG,EAAE,0BAA0B,EAAE,QAAQ,EAAE,IAAI,EAAE;aACnD;YACD,SAAS,EAAE;gBACV,QAAQ,EAAE;oBACT,EAAE,EAAE,EAAE,yBAAyB,CAAC,kBAAkB,EAAE;oBACpD,EAAE,EAAE,EAAE,yBAAyB,CAAC,cAAc,EAAE;iBAChD;aACD;SACD,CAAC;IACH,CAAC;CACD,CAAC;AAEF,SAAS,iBAAiB,CAAC,YAAoB,EAAE,MAAmB;IACnE,IAAI,CAAC,MAAM;QAAE,OAAO,YAAY,CAAC;IAEjC,KAAK,MAAM,KAAK,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,CAAC;QACrD,IAAI,YAAY,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;YACpC,OAAO,GAAG,MAAM,GAAG,YAAY,EAAE,CAAC;QACnC,CAAC;IACF,CAAC;IAED,IAAI,YAAY,KAAK,UAAU,IAAI,YAAY,KAAK,UAAU,EAAE,CAAC;QAChE,OAAO,GAAG,MAAM,GAAG,YAAY,EAAE,CAAC;IACnC,CAAC;IAED,OAAO,YAAY,CAAC;AACrB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/presets/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAM/D,eAAO,MAAM,aAAa,EAAE,YAAY,EAKvC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/presets/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAO/D,eAAO,MAAM,aAAa,EAAE,YAAY,EAMvC,CAAC"}
@@ -1,10 +1,12 @@
1
1
  import { nextDefaultPreset } from "./next-default.js";
2
2
  import { nextExperimentsPreset } from "./next-experiments.js";
3
3
  import { nextPagebuilderPreset } from "./next-pagebuilder.js";
4
+ import { nextPagebuilderCachePreset } from "./next-pagebuilder-cache.js";
4
5
  import { nextWebglPreset } from "./next-webgl.js";
5
6
  export const presetModules = [
6
7
  nextDefaultPreset,
7
8
  nextPagebuilderPreset,
9
+ nextPagebuilderCachePreset,
8
10
  nextWebglPreset,
9
11
  nextExperimentsPreset,
10
12
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/presets/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,MAAM,CAAC,MAAM,aAAa,GAAmB;IAC5C,iBAAiB;IACjB,qBAAqB;IACrB,eAAe;IACf,qBAAqB;CACrB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/presets/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD,MAAM,CAAC,MAAM,aAAa,GAAmB;IAC5C,iBAAiB;IACjB,qBAAqB;IACrB,0BAA0B;IAC1B,eAAe;IACf,qBAAqB;CACrB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { PresetModule } from "../../core/create/types.js";
2
+ export declare const nextPagebuilderCachePreset: PresetModule;
3
+ //# sourceMappingURL=next-pagebuilder-cache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"next-pagebuilder-cache.d.ts","sourceRoot":"","sources":["../../../src/modules/presets/next-pagebuilder-cache.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE/D,eAAO,MAAM,0BAA0B,EAAE,YAQxC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { PRESET_MODULE_IDS, SANITY_PAGEBUILDER_CACHE_FEATURE_MODULE_ID, } from "../../core/create/internal-ids.js";
2
+ export const nextPagebuilderCachePreset = {
3
+ id: PRESET_MODULE_IDS["next-pagebuilder-cache"],
4
+ kind: "preset",
5
+ label: "Page Builder (Cache Components)",
6
+ description: "Page builder preset adopted for Next.js Cache Components (next-sanity v13 strict mode)",
7
+ template: "next-pagebuilder-cache",
8
+ defaultFeatures: [SANITY_PAGEBUILDER_CACHE_FEATURE_MODULE_ID],
9
+ };
10
+ //# sourceMappingURL=next-pagebuilder-cache.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"next-pagebuilder-cache.js","sourceRoot":"","sources":["../../../src/modules/presets/next-pagebuilder-cache.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,iBAAiB,EACjB,0CAA0C,GAC1C,MAAM,mCAAmC,CAAC;AAG3C,MAAM,CAAC,MAAM,0BAA0B,GAAiB;IACvD,EAAE,EAAE,iBAAiB,CAAC,wBAAwB,CAAC;IAC/C,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,iCAAiC;IACxC,WAAW,EACV,wFAAwF;IACzF,QAAQ,EAAE,wBAAwB;IAClC,eAAe,EAAE,CAAC,0CAA0C,CAAC;CAC7D,CAAC"}
package/dist/paths.d.ts CHANGED
@@ -19,6 +19,12 @@ export declare const SANITY_FILES_DIR: string;
19
19
  * relative to the project root.
20
20
  */
21
21
  export declare const SANITY_PAGEBUILDER_FILES_DIR: string;
22
+ /**
23
+ * Directory containing the Cache Components variant of the Sanity Page Builder
24
+ * integration source files. Resolves to
25
+ * `src/modules/features/cms/sanity-pagebuilder-cache/files/`.
26
+ */
27
+ export declare const SANITY_PAGEBUILDER_CACHE_FILES_DIR: string;
22
28
  /**
23
29
  * Directory containing the HubSpot integration source files.
24
30
  * Always resolves to `src/modules/features/forms/hubspot/files/` relative to the
@@ -1 +1 @@
1
- {"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../src/paths.ts"],"names":[],"mappings":"AAaA,6DAA6D;AAC7D,eAAO,MAAM,aAAa,EAAE,MAI3B,CAAC;AAEF,0DAA0D;AAC1D,eAAO,MAAM,kBAAkB,EAAE,MAIhC,CAAC;AAEF,gFAAgF;AAChF,eAAO,MAAM,gBAAgB,EAAE,MAI9B,CAAC;AAEF,mGAAmG;AACnG,eAAO,MAAM,uBAAuB,EAAE,MAKrC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAQ9B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,EAAE,MAQ1C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAQ/B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAQ/B,CAAC"}
1
+ {"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../src/paths.ts"],"names":[],"mappings":"AAaA,6DAA6D;AAC7D,eAAO,MAAM,aAAa,EAAE,MAI3B,CAAC;AAEF,0DAA0D;AAC1D,eAAO,MAAM,kBAAkB,EAAE,MAIhC,CAAC;AAEF,gFAAgF;AAChF,eAAO,MAAM,gBAAgB,EAAE,MAI9B,CAAC;AAEF,mGAAmG;AACnG,eAAO,MAAM,uBAAuB,EAAE,MAKrC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAQ9B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,EAAE,MAQ1C,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,kCAAkC,EAAE,MAQhD,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAQ/B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAQ/B,CAAC"}
package/dist/paths.js CHANGED
@@ -29,6 +29,12 @@ export const SANITY_FILES_DIR = path.join(PROJECT_ROOT, "src", "modules", "featu
29
29
  * relative to the project root.
30
30
  */
31
31
  export const SANITY_PAGEBUILDER_FILES_DIR = path.join(PROJECT_ROOT, "src", "modules", "features", "cms", "sanity-pagebuilder", "files");
32
+ /**
33
+ * Directory containing the Cache Components variant of the Sanity Page Builder
34
+ * integration source files. Resolves to
35
+ * `src/modules/features/cms/sanity-pagebuilder-cache/files/`.
36
+ */
37
+ export const SANITY_PAGEBUILDER_CACHE_FILES_DIR = path.join(PROJECT_ROOT, "src", "modules", "features", "cms", "sanity-pagebuilder-cache", "files");
32
38
  /**
33
39
  * Directory containing the HubSpot integration source files.
34
40
  * Always resolves to `src/modules/features/forms/hubspot/files/` relative to the
package/dist/paths.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"paths.js","sourceRoot":"","sources":["../src/paths.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,UAAU,GAAW,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC1D,MAAM,SAAS,GAAW,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;AAEnD;;;;GAIG;AACH,MAAM,YAAY,GAAW,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAE3D,6DAA6D;AAC7D,MAAM,CAAC,MAAM,aAAa,GAAW,IAAI,CAAC,IAAI,CAC7C,YAAY,EACZ,KAAK,EACL,WAAW,CACX,CAAC;AAEF,0DAA0D;AAC1D,MAAM,CAAC,MAAM,kBAAkB,GAAW,IAAI,CAAC,IAAI,CAClD,YAAY,EACZ,KAAK,EACL,gBAAgB,CAChB,CAAC;AAEF,gFAAgF;AAChF,MAAM,CAAC,MAAM,gBAAgB,GAAW,IAAI,CAAC,IAAI,CAChD,YAAY,EACZ,KAAK,EACL,cAAc,CACd,CAAC;AAEF,mGAAmG;AACnG,MAAM,CAAC,MAAM,uBAAuB,GAAW,IAAI,CAAC,IAAI,CACvD,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,wBAAwB,CACxB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAW,IAAI,CAAC,IAAI,CAChD,YAAY,EACZ,KAAK,EACL,SAAS,EACT,UAAU,EACV,KAAK,EACL,QAAQ,EACR,OAAO,CACP,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAW,IAAI,CAAC,IAAI,CAC5D,YAAY,EACZ,KAAK,EACL,SAAS,EACT,UAAU,EACV,KAAK,EACL,oBAAoB,EACpB,OAAO,CACP,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAW,IAAI,CAAC,IAAI,CACjD,YAAY,EACZ,KAAK,EACL,SAAS,EACT,UAAU,EACV,OAAO,EACP,SAAS,EACT,OAAO,CACP,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAW,IAAI,CAAC,IAAI,CACjD,YAAY,EACZ,KAAK,EACL,SAAS,EACT,UAAU,EACV,KAAK,EACL,SAAS,EACT,OAAO,CACP,CAAC"}
1
+ {"version":3,"file":"paths.js","sourceRoot":"","sources":["../src/paths.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,MAAM,UAAU,GAAW,aAAa,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;AAC1D,MAAM,SAAS,GAAW,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;AAEnD;;;;GAIG;AACH,MAAM,YAAY,GAAW,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAE3D,6DAA6D;AAC7D,MAAM,CAAC,MAAM,aAAa,GAAW,IAAI,CAAC,IAAI,CAC7C,YAAY,EACZ,KAAK,EACL,WAAW,CACX,CAAC;AAEF,0DAA0D;AAC1D,MAAM,CAAC,MAAM,kBAAkB,GAAW,IAAI,CAAC,IAAI,CAClD,YAAY,EACZ,KAAK,EACL,gBAAgB,CAChB,CAAC;AAEF,gFAAgF;AAChF,MAAM,CAAC,MAAM,gBAAgB,GAAW,IAAI,CAAC,IAAI,CAChD,YAAY,EACZ,KAAK,EACL,cAAc,CACd,CAAC;AAEF,mGAAmG;AACnG,MAAM,CAAC,MAAM,uBAAuB,GAAW,IAAI,CAAC,IAAI,CACvD,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,wBAAwB,CACxB,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAW,IAAI,CAAC,IAAI,CAChD,YAAY,EACZ,KAAK,EACL,SAAS,EACT,UAAU,EACV,KAAK,EACL,QAAQ,EACR,OAAO,CACP,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAW,IAAI,CAAC,IAAI,CAC5D,YAAY,EACZ,KAAK,EACL,SAAS,EACT,UAAU,EACV,KAAK,EACL,oBAAoB,EACpB,OAAO,CACP,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,kCAAkC,GAAW,IAAI,CAAC,IAAI,CAClE,YAAY,EACZ,KAAK,EACL,SAAS,EACT,UAAU,EACV,KAAK,EACL,0BAA0B,EAC1B,OAAO,CACP,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAW,IAAI,CAAC,IAAI,CACjD,YAAY,EACZ,KAAK,EACL,SAAS,EACT,UAAU,EACV,OAAO,EACP,SAAS,EACT,OAAO,CACP,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAW,IAAI,CAAC,IAAI,CACjD,YAAY,EACZ,KAAK,EACL,SAAS,EACT,UAAU,EACV,KAAK,EACL,SAAS,EACT,OAAO,CACP,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bsmnt",
3
- "version": "0.9.0",
3
+ "version": "0.11.0",
4
4
  "packageManager": "bun@1.3.14",
5
5
  "description": "CLI to scaffold basement projects and add integrations",
6
6
  "type": "module",
@@ -22,10 +22,12 @@
22
22
  "!src/templates/*/node_modules",
23
23
  "!src/templates/*/.next",
24
24
  "!src/templates/*/bun.lock",
25
+ "!src/templates/*/*.tsbuildinfo",
25
26
  "src/template-hooks",
26
27
  "src/agent-skills",
27
28
  "src/modules/features/cms/sanity/files",
28
29
  "src/modules/features/cms/sanity-pagebuilder/files",
30
+ "src/modules/features/cms/sanity-pagebuilder-cache/files",
29
31
  "src/modules/features/forms/hubspot/files",
30
32
  "src/modules/features/env/dotenvx/files",
31
33
  "src/assets"
@@ -62,6 +64,7 @@
62
64
  "version-canary": "changeset version --snapshot canary",
63
65
  "release-canary": "changeset publish --tag canary --no-git-tag",
64
66
  "test:templates": "bash scripts/test-templates.sh",
67
+ "check:pagebuilder": "bash scripts/typecheck-pagebuilder.sh",
65
68
  "link:local": "bash scripts/build-and-link.sh",
66
69
  "unlink:local": "bash scripts/build-and-link.sh --unlink"
67
70
  },
@@ -81,7 +84,7 @@
81
84
  "commander": "^13.1.0",
82
85
  "dotenv": "^17.4.2",
83
86
  "fs-extra": "^11.3.3",
84
- "next-sanity": "^13.0.10",
87
+ "next-sanity": "^13.3.1",
85
88
  "ora": "^9.1.0",
86
89
  "picocolors": "^1.1.1",
87
90
  "prompts": "^2.4.2",
@@ -98,6 +101,6 @@
98
101
  "lefthook": "^1.13.0",
99
102
  "tsx": "^4.19.0",
100
103
  "turbo": "^2.5.0",
101
- "typescript": "^5.8.0"
104
+ "typescript": "^7.0.2"
102
105
  }
103
106
  }
@@ -4,6 +4,7 @@ import { SanityFetch } from "@/lib/integrations/sanity/live";
4
4
  import { ARTICLE_QUERY } from "@/lib/integrations/sanity/queries";
5
5
  import type { Article } from "@/lib/integrations/sanity/sanity.types";
6
6
  import { portableTextToMarkdown } from "@/lib/utils/portable-text-to-markdown";
7
+ import { getBaseUrl } from "@/lib/utils/url";
7
8
 
8
9
  export async function GET(
9
10
  _request: Request,
@@ -16,7 +17,8 @@ export async function GET(
16
17
  }
17
18
 
18
19
  const slug = rawSlug.slice(0, -3);
19
- const baseUrl = process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:3000";
20
+ const baseUrl = getBaseUrl().replace(/\/$/, "");
21
+ const canonicalPath = `/blog/${slug}`;
20
22
 
21
23
  if (!isSanityConfigured()) {
22
24
  return new NextResponse("# 404 Not Found\n\nCMS not configured.", {
@@ -64,6 +66,7 @@ export async function GET(
64
66
  "Content-Type": "text/markdown; charset=utf-8",
65
67
  Vary: "Accept",
66
68
  "X-Content-Type-Options": "nosniff",
69
+ Link: `<${baseUrl}${canonicalPath}>; rel="canonical"`,
67
70
  },
68
71
  });
69
72
  } catch (error) {
@@ -1,8 +1,9 @@
1
1
  import { NextResponse } from "next/server";
2
2
  import { isSanityConfigured } from "@/lib/integrations/check-integration";
3
+ import { getBaseUrl } from "@/lib/utils/url";
3
4
 
4
5
  export async function GET() {
5
- const baseUrl = process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:3000";
6
+ const baseUrl = getBaseUrl();
6
7
 
7
8
  if (!isSanityConfigured()) {
8
9
  return new NextResponse(
@@ -4,13 +4,13 @@ import { urlForImage } from "@/lib/integrations/sanity/utils/image";
4
4
 
5
5
  interface SanityImageProps extends Omit<ImageProps, "src" | "aspectRatio"> {
6
6
  image: {
7
- asset: {
7
+ asset?: {
8
8
  _ref: string;
9
9
  _type: "reference";
10
10
  };
11
11
  alt?: string;
12
12
  hotspot?: object;
13
- crop?: object;
13
+ crop?: { left?: number; right?: number; top?: number; bottom?: number };
14
14
  };
15
15
  maxWidth?: number;
16
16
  }
@@ -19,18 +19,32 @@ export function SanityImage({
19
19
  image,
20
20
  maxWidth = 1920,
21
21
  alt,
22
+ fill,
22
23
  ...props
23
24
  }: SanityImageProps) {
24
25
  if (!image?.asset) return null;
25
26
 
27
+ // getImageDimensions is uncropped; the URL builder applies the crop.
28
+ // Rounding order must match @sanity/image-url: origin first, then subtract.
26
29
  const { width, height } = getImageDimensions(image.asset);
27
- const aspectRatio = width / height;
30
+ const { left = 0, right = 0, top = 0, bottom = 0 } = image.crop ?? {};
31
+ const cropLeft = Math.round(left * width);
32
+ const cropTop = Math.round(top * height);
33
+ const sourceWidth = Math.round(width - right * width - cropLeft);
34
+ const sourceHeight = Math.round(height - bottom * height - cropTop);
35
+
36
+ const imageProps = fill
37
+ ? { fill: true }
38
+ : { width: sourceWidth, height: sourceHeight };
28
39
 
29
40
  return (
30
41
  <Image
31
- src={urlForImage(image).width(maxWidth).url()}
42
+ src={urlForImage(image)
43
+ .width(Math.min(maxWidth, sourceWidth))
44
+ .url()}
32
45
  alt={alt || image.alt || ""}
33
- aspectRatio={aspectRatio}
46
+ aspectRatio={sourceWidth / sourceHeight}
47
+ {...imageProps}
34
48
  {...props}
35
49
  />
36
50
  );
@@ -1,3 +1,5 @@
1
+ import { dataset, projectId } from "@/lib/integrations/sanity/env";
2
+
1
3
  /**
2
4
  * Integration Configuration Checker
3
5
  *
@@ -16,14 +18,13 @@
16
18
  */
17
19
 
18
20
  /**
19
- * Check if Sanity CMS is configured
20
- * Requires: NEXT_PUBLIC_SANITY_PROJECT_ID and NEXT_PUBLIC_SANITY_DATASET
21
+ * Check if Sanity CMS is configured. Derived from env.ts, not a second read of
22
+ * `process.env`: read directly these disagreed — env.ts also accepts
23
+ * `SANITY_STUDIO_PROJECT_ID` and defaults the dataset — so a resolvable project
24
+ * reported itself unconfigured.
21
25
  */
22
26
  export function isSanityConfigured(): boolean {
23
- return Boolean(
24
- process.env.NEXT_PUBLIC_SANITY_PROJECT_ID &&
25
- process.env.NEXT_PUBLIC_SANITY_DATASET,
26
- );
27
+ return Boolean(projectId && dataset);
27
28
  }
28
29
 
29
30
  /**
@@ -14,7 +14,7 @@ SANITY_API_READ_TOKEN="your-viewer-token"
14
14
 
15
15
  # Optional
16
16
  NEXT_PUBLIC_SANITY_STUDIO_URL="http://localhost:3000/studio"
17
- NEXT_PUBLIC_SANITY_API_VERSION="2024-03-15"
17
+ NEXT_PUBLIC_SANITY_API_VERSION="2025-02-19"
18
18
  ```
19
19
 
20
20
  > **Note**: Create a **Viewer** token in [Sanity Dashboard](https://sanity.io/manage) → Your Project → API → Tokens and set it as `SANITY_API_READ_TOKEN`.
@@ -128,6 +128,37 @@ export const landing = defineType({
128
128
 
129
129
  See [ARCHITECTURE.md](../../../ARCHITECTURE.md) for cache gotchas.
130
130
 
131
+ ## Sanity Dashboard (Studio in an iframe)
132
+
133
+ The Studio at `/studio` can be embedded in the Sanity Dashboard
134
+ (`https://www.sanity.io/@<org>/studio/<appId>/<workspace>`), which loads it in an
135
+ iframe from `www.sanity.io`. Three things have to be true for that to work:
136
+
137
+ 1. **Headers.** `next.config.ts` already exempts `/studio/:path*` from the
138
+ site-wide `X-Frame-Options` / `frame-ancestors 'self'` headers, sending
139
+ `frame-ancestors 'self' https://*.sanity.io` there instead and dropping
140
+ `X-Frame-Options` entirely for that path (it has no "allow this origin"
141
+ form — it must be absent, not overridden). Nothing to do here unless
142
+ you've hand-edited `headers()`.
143
+ 2. **Bridge script.** Already wired in: `next-sanity/studio`'s `NextStudio`
144
+ re-exports `NextStudioWithBridge`, which renders the
145
+ `core.sanity-cdn.com/bridge.js` tag the Dashboard needs. Don't hand-roll
146
+ that script tag, and don't switch the Studio route to
147
+ `next-sanity/studio/client-component` (the bridge-less variant).
148
+ 3. **Registered URL.** In [Sanity Manage](https://sanity.io/manage), the
149
+ Studio application's URL must be the **full path**
150
+ (`https://example.com/studio`), not just the domain. This can't be set
151
+ from code — either click through Manage, or run
152
+ `sanity deploy --external --url https://example.com/studio --yes` from
153
+ `lib/integrations/sanity`. Writing it via the API needs the
154
+ `sanity.project.deployStudio` grant, which read/write tokens don't have.
155
+
156
+ Verify against a production build (`bun build && bun start`), not dev. One trap:
157
+ the Dashboard reports `Failed to load iframe due to X-Frame-Options: SAMEORIGIN`
158
+ for *any* framing failure, including a wrong registered URL with already-correct
159
+ headers. Trust the browser console's `Framing '<url>' violates …` line instead —
160
+ it names the URL actually being framed.
161
+
131
162
  ## Troubleshooting
132
163
 
133
164
  **Visual editor not loading:**
@@ -51,6 +51,7 @@ export function RichText({ content }: RichTextProps) {
51
51
  rel={
52
52
  isExternal && value?.blank ? "noopener noreferrer" : undefined
53
53
  }
54
+ className="text-blue underline underline-offset-2 transition-opacity hover:opacity-70"
54
55
  data-sanity-edit-target
55
56
  >
56
57
  {children}
@@ -6,9 +6,9 @@
6
6
  * if Sanity is properly set up before making API calls.
7
7
  */
8
8
 
9
- /** Sanity API version - defaults to latest stable */
9
+ /** Floor, not a preference: Content Releases need 2025-02-19 or later. */
10
10
  export const apiVersion =
11
- process.env.NEXT_PUBLIC_SANITY_API_VERSION || "2024-03-15";
11
+ process.env.NEXT_PUBLIC_SANITY_API_VERSION || "2025-02-19";
12
12
 
13
13
  /** Sanity dataset name - defaults to 'production' */
14
14
  export const dataset = process.env.NEXT_PUBLIC_SANITY_DATASET || "production";
@@ -14,6 +14,15 @@ export function proxy(request: NextRequest) {
14
14
  return NextResponse.next();
15
15
  }
16
16
 
17
+ // Collapse repeated slashes before any rewrite, or the rewrite below would
18
+ // mask the alias (e.g. /blog//foo.md silently resolving to /blog/foo.md).
19
+ const collapsedPathname = pathname.replace(/\/{2,}/g, "/");
20
+ if (collapsedPathname !== pathname) {
21
+ const url = request.nextUrl.clone();
22
+ url.pathname = collapsedPathname;
23
+ return NextResponse.redirect(url, 308);
24
+ }
25
+
17
26
  // 1. Rewrite .md extension URLs to API routes
18
27
  // e.g. /blog/my-post.md → /api/blog/my-post.md
19
28
  for (const route of mdExtensionRoutes) {
@@ -5,9 +5,13 @@ import { PAGE_QUERY } from "@/lib/integrations/sanity/queries";
5
5
  import type { PAGE_QUERY_RESULT } from "@/lib/integrations/sanity/sanity.types";
6
6
  import { renderPageBuilderMarkdown } from "@/lib/integrations/sanity/utils/page-builder-markdown";
7
7
  import { getBaseUrl } from "@/lib/utils/base-url";
8
+ import { getSlugTag } from "@/lib/utils/slug-tag";
8
9
 
9
10
  type PageResult = NonNullable<PAGE_QUERY_RESULT>;
10
11
 
12
+ const isValidSegment = (segment: string) =>
13
+ segment.length > 0 && segment !== "." && segment !== "..";
14
+
11
15
  const getSlugPath = (slugParts?: string[]) => {
12
16
  if (!slugParts?.length) return null;
13
17
 
@@ -18,8 +22,9 @@ const getSlugPath = (slugParts?: string[]) => {
18
22
  const pathSegments = [...slugParts];
19
23
  pathSegments[pathSegments.length - 1] = lastSegment.slice(0, -3);
20
24
 
21
- const slug = pathSegments.filter(Boolean).join("/");
22
- if (!slug) return null;
25
+ if (!pathSegments.every(isValidSegment)) return null;
26
+
27
+ const slug = pathSegments.join("/");
23
28
 
24
29
  return slug === "index" ? null : slug;
25
30
  };
@@ -53,11 +58,14 @@ export async function GET(
53
58
  const { data } = await sanityFetch({
54
59
  query: PAGE_QUERY,
55
60
  params: { slug },
61
+ // This route answers at /api/<slug>.md, which no `revalidatePath` on the
62
+ // page path reaches. The tag is the only thing that clears it.
63
+ tags: [getSlugTag(slug)],
56
64
  });
57
65
 
58
66
  const page = data as PageResult | null;
59
67
 
60
- const baseUrl = getBaseUrl();
68
+ const baseUrl = getBaseUrl().replace(/\/$/, "");
61
69
 
62
70
  if (!page) {
63
71
  return new NextResponse("# 404 Not Found\n\nPage not found.", {
@@ -94,6 +102,7 @@ export async function GET(
94
102
  "Content-Type": "text/markdown; charset=utf-8",
95
103
  Vary: "Accept",
96
104
  "X-Content-Type-Options": "nosniff",
105
+ Link: `<${baseUrl}${canonicalPath}>; rel="canonical"`,
97
106
  },
98
107
  },
99
108
  );