bsmnt 0.4.0 → 0.4.2

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 (536) hide show
  1. package/dist/{helpers/add → application/add-hooks}/index.d.ts +4 -4
  2. package/dist/application/add-hooks/index.d.ts.map +1 -0
  3. package/dist/{helpers/add → application/add-hooks}/index.js +22 -35
  4. package/dist/application/add-hooks/index.js.map +1 -0
  5. package/dist/{utils → application/add-integration}/format-results.d.ts +1 -6
  6. package/dist/application/add-integration/format-results.d.ts.map +1 -0
  7. package/dist/{utils → application/add-integration}/format-results.js +1 -6
  8. package/dist/application/add-integration/format-results.js.map +1 -0
  9. package/dist/{helpers/integrate → application/add-integration}/index.d.ts +2 -1
  10. package/dist/application/add-integration/index.d.ts.map +1 -0
  11. package/dist/{helpers/integrate → application/add-integration}/index.js +46 -41
  12. package/dist/application/add-integration/index.js.map +1 -0
  13. package/dist/application/create-project/build-context.d.ts +9 -0
  14. package/dist/application/create-project/build-context.d.ts.map +1 -0
  15. package/dist/application/create-project/build-context.js +13 -0
  16. package/dist/application/create-project/build-context.js.map +1 -0
  17. package/dist/application/create-project/index.d.ts +44 -0
  18. package/dist/application/create-project/index.d.ts.map +1 -0
  19. package/dist/application/create-project/index.js +70 -0
  20. package/dist/application/create-project/index.js.map +1 -0
  21. package/dist/application/create-project/map-selection-to-registry.d.ts +3 -0
  22. package/dist/application/create-project/map-selection-to-registry.d.ts.map +1 -0
  23. package/dist/application/create-project/map-selection-to-registry.js +30 -0
  24. package/dist/application/create-project/map-selection-to-registry.js.map +1 -0
  25. package/dist/application/create-project/resolve-selection.d.ts +15 -0
  26. package/dist/application/create-project/resolve-selection.d.ts.map +1 -0
  27. package/dist/application/create-project/resolve-selection.js +11 -0
  28. package/dist/application/create-project/resolve-selection.js.map +1 -0
  29. package/dist/{helpers/skills → application/install-skills}/index.d.ts +1 -1
  30. package/dist/application/install-skills/index.d.ts.map +1 -0
  31. package/dist/{helpers/skills → application/install-skills}/index.js +31 -44
  32. package/dist/application/install-skills/index.js.map +1 -0
  33. package/dist/{utils/detect-project.d.ts → application/shared/project-detection.d.ts} +8 -15
  34. package/dist/application/shared/project-detection.d.ts.map +1 -0
  35. package/dist/{utils/detect-project.js → application/shared/project-detection.js} +8 -24
  36. package/dist/application/shared/project-detection.js.map +1 -0
  37. package/dist/core/create/build-plan.d.ts +8 -0
  38. package/dist/core/create/build-plan.d.ts.map +1 -0
  39. package/dist/core/create/build-plan.js +89 -0
  40. package/dist/core/create/build-plan.js.map +1 -0
  41. package/dist/core/create/execute-plan.d.ts +23 -0
  42. package/dist/core/create/execute-plan.d.ts.map +1 -0
  43. package/dist/core/create/execute-plan.js +23 -0
  44. package/dist/core/create/execute-plan.js.map +1 -0
  45. package/dist/core/create/internal-ids.d.ts +23 -0
  46. package/dist/core/create/internal-ids.d.ts.map +1 -0
  47. package/dist/core/create/internal-ids.js +36 -0
  48. package/dist/core/create/internal-ids.js.map +1 -0
  49. package/dist/core/create/registry.d.ts +12 -0
  50. package/dist/core/create/registry.d.ts.map +1 -0
  51. package/dist/core/create/registry.js +33 -0
  52. package/dist/core/create/registry.js.map +1 -0
  53. package/dist/core/create/types.d.ts +96 -0
  54. package/dist/core/create/types.d.ts.map +1 -0
  55. package/dist/core/create/types.js +2 -0
  56. package/dist/core/create/types.js.map +1 -0
  57. package/dist/domain/agents.d.ts +61 -0
  58. package/dist/domain/agents.d.ts.map +1 -0
  59. package/dist/domain/agents.js +35 -0
  60. package/dist/domain/agents.js.map +1 -0
  61. package/dist/domain/animations.d.ts +20 -0
  62. package/dist/domain/animations.d.ts.map +1 -0
  63. package/dist/domain/animations.js +13 -0
  64. package/dist/domain/animations.js.map +1 -0
  65. package/dist/domain/cms.d.ts +24 -0
  66. package/dist/domain/cms.d.ts.map +1 -0
  67. package/dist/domain/cms.js +13 -0
  68. package/dist/domain/cms.js.map +1 -0
  69. package/dist/domain/hooks.d.ts +67 -0
  70. package/dist/domain/hooks.d.ts.map +1 -0
  71. package/dist/domain/hooks.js +52 -0
  72. package/dist/domain/hooks.js.map +1 -0
  73. package/dist/domain/skills.d.ts +70 -0
  74. package/dist/domain/skills.d.ts.map +1 -0
  75. package/dist/domain/skills.js +84 -0
  76. package/dist/domain/skills.js.map +1 -0
  77. package/dist/domain/templates.d.ts +51 -0
  78. package/dist/domain/templates.d.ts.map +1 -0
  79. package/dist/domain/templates.js +27 -0
  80. package/dist/domain/templates.js.map +1 -0
  81. package/dist/index.js +124 -115
  82. package/dist/index.js.map +1 -1
  83. package/dist/infrastructure/agents/register-sanity-mcp.d.ts +12 -0
  84. package/dist/infrastructure/agents/register-sanity-mcp.d.ts.map +1 -0
  85. package/dist/infrastructure/agents/register-sanity-mcp.js +153 -0
  86. package/dist/infrastructure/agents/register-sanity-mcp.js.map +1 -0
  87. package/dist/infrastructure/create/apply-copy-paths.d.ts +3 -0
  88. package/dist/infrastructure/create/apply-copy-paths.d.ts.map +1 -0
  89. package/dist/infrastructure/create/apply-copy-paths.js +12 -0
  90. package/dist/infrastructure/create/apply-copy-paths.js.map +1 -0
  91. package/dist/infrastructure/create/apply-merge-paths.d.ts +3 -0
  92. package/dist/infrastructure/create/apply-merge-paths.d.ts.map +1 -0
  93. package/dist/infrastructure/create/apply-merge-paths.js +17 -0
  94. package/dist/infrastructure/create/apply-merge-paths.js.map +1 -0
  95. package/dist/infrastructure/create/apply-package-json.d.ts +8 -0
  96. package/dist/infrastructure/create/apply-package-json.d.ts.map +1 -0
  97. package/dist/infrastructure/create/apply-package-json.js +46 -0
  98. package/dist/infrastructure/create/apply-package-json.js.map +1 -0
  99. package/dist/infrastructure/create/copy-template.d.ts +10 -0
  100. package/dist/infrastructure/create/copy-template.d.ts.map +1 -0
  101. package/dist/infrastructure/create/copy-template.js.map +1 -0
  102. package/dist/infrastructure/create/executor.d.ts +3 -0
  103. package/dist/infrastructure/create/executor.d.ts.map +1 -0
  104. package/dist/infrastructure/create/executor.js +21 -0
  105. package/dist/infrastructure/create/executor.js.map +1 -0
  106. package/dist/{helpers/create/init-git.d.ts → infrastructure/create/init-git-repo.d.ts} +2 -3
  107. package/dist/infrastructure/create/init-git-repo.d.ts.map +1 -0
  108. package/dist/{helpers/create/init-git.js → infrastructure/create/init-git-repo.js} +1 -4
  109. package/dist/infrastructure/create/init-git-repo.js.map +1 -0
  110. package/dist/{helpers/create/install.d.ts → infrastructure/create/install-dependencies.d.ts} +1 -1
  111. package/dist/infrastructure/create/install-dependencies.d.ts.map +1 -0
  112. package/dist/{helpers/create/install.js → infrastructure/create/install-dependencies.js} +1 -1
  113. package/dist/infrastructure/create/install-dependencies.js.map +1 -0
  114. package/dist/infrastructure/create/lifecycle-registry.d.ts +3 -0
  115. package/dist/infrastructure/create/lifecycle-registry.d.ts.map +1 -0
  116. package/dist/infrastructure/create/lifecycle-registry.js +38 -0
  117. package/dist/infrastructure/create/lifecycle-registry.js.map +1 -0
  118. package/dist/infrastructure/create/merge-registry.d.ts +3 -0
  119. package/dist/infrastructure/create/merge-registry.d.ts.map +1 -0
  120. package/dist/infrastructure/create/merge-registry.js +27 -0
  121. package/dist/infrastructure/create/merge-registry.js.map +1 -0
  122. package/dist/infrastructure/create/rename-files.d.ts.map +1 -0
  123. package/dist/infrastructure/create/rename-files.js.map +1 -0
  124. package/dist/{helpers → infrastructure}/create/setup-agent.d.ts +9 -7
  125. package/dist/infrastructure/create/setup-agent.d.ts.map +1 -0
  126. package/dist/infrastructure/create/setup-agent.js +77 -0
  127. package/dist/infrastructure/create/setup-agent.js.map +1 -0
  128. package/dist/infrastructure/create/setup-sanity.d.ts.map +1 -0
  129. package/dist/{helpers → infrastructure}/create/setup-sanity.js +1 -19
  130. package/dist/infrastructure/create/setup-sanity.js.map +1 -0
  131. package/dist/infrastructure/integrations/inject-integration.d.ts +9 -0
  132. package/dist/infrastructure/integrations/inject-integration.d.ts.map +1 -0
  133. package/dist/{helpers/integrate/merge-orchestrator.js → infrastructure/integrations/inject-integration.js} +26 -38
  134. package/dist/infrastructure/integrations/inject-integration.js.map +1 -0
  135. package/dist/modules/features/agents/index.d.ts +3 -0
  136. package/dist/modules/features/agents/index.d.ts.map +1 -0
  137. package/dist/modules/features/agents/index.js +4 -0
  138. package/dist/modules/features/agents/index.js.map +1 -0
  139. package/dist/modules/features/agents/shared.d.ts +4 -0
  140. package/dist/modules/features/agents/shared.d.ts.map +1 -0
  141. package/dist/modules/features/agents/shared.js +21 -0
  142. package/dist/modules/features/agents/shared.js.map +1 -0
  143. package/dist/{configs/animations.d.ts → modules/features/animation/config.d.ts} +1 -1
  144. package/dist/modules/features/animation/config.d.ts.map +1 -0
  145. package/dist/{configs/animations.js → modules/features/animation/config.js} +1 -1
  146. package/dist/modules/features/animation/config.js.map +1 -0
  147. package/dist/modules/features/animation/gsap.d.ts +3 -0
  148. package/dist/modules/features/animation/gsap.d.ts.map +1 -0
  149. package/dist/modules/features/animation/gsap.js +16 -0
  150. package/dist/modules/features/animation/gsap.js.map +1 -0
  151. package/dist/modules/features/animation/index.d.ts +3 -0
  152. package/dist/modules/features/animation/index.d.ts.map +1 -0
  153. package/dist/modules/features/animation/index.js +4 -0
  154. package/dist/modules/features/animation/index.js.map +1 -0
  155. package/dist/modules/features/animation/motion.d.ts +3 -0
  156. package/dist/modules/features/animation/motion.d.ts.map +1 -0
  157. package/dist/modules/features/animation/motion.js +16 -0
  158. package/dist/modules/features/animation/motion.js.map +1 -0
  159. package/dist/modules/features/cms/index.d.ts +3 -0
  160. package/dist/modules/features/cms/index.d.ts.map +1 -0
  161. package/dist/modules/features/cms/index.js +7 -0
  162. package/dist/modules/features/cms/index.js.map +1 -0
  163. package/dist/modules/features/cms/sanity/config.d.ts.map +1 -0
  164. package/dist/{helpers/integrate → modules/features/cms}/sanity/config.js +3 -2
  165. package/dist/modules/features/cms/sanity/config.js.map +1 -0
  166. package/dist/modules/features/cms/sanity/index.d.ts +3 -0
  167. package/dist/modules/features/cms/sanity/index.d.ts.map +1 -0
  168. package/dist/modules/features/cms/sanity/index.js +61 -0
  169. package/dist/modules/features/cms/sanity/index.js.map +1 -0
  170. package/dist/{helpers/integrate/sanity/mergers/check-integration-merger.d.ts → modules/features/cms/sanity/mergers/check-integration.d.ts} +1 -1
  171. package/dist/modules/features/cms/sanity/mergers/check-integration.d.ts.map +1 -0
  172. package/dist/{helpers/integrate/sanity/mergers/check-integration-merger.js → modules/features/cms/sanity/mergers/check-integration.js} +1 -1
  173. package/dist/modules/features/cms/sanity/mergers/check-integration.js.map +1 -0
  174. package/dist/{helpers/integrate/sanity/mergers/layout-merger.d.ts → modules/features/cms/sanity/mergers/layout.d.ts} +1 -1
  175. package/dist/modules/features/cms/sanity/mergers/layout.d.ts.map +1 -0
  176. package/dist/{helpers/integrate/sanity/mergers/layout-merger.js → modules/features/cms/sanity/mergers/layout.js} +1 -1
  177. package/dist/modules/features/cms/sanity/mergers/layout.js.map +1 -0
  178. package/dist/modules/features/cms/sanity/mergers/sitemap.d.ts +13 -0
  179. package/dist/modules/features/cms/sanity/mergers/sitemap.d.ts.map +1 -0
  180. package/dist/modules/features/cms/sanity/mergers/sitemap.js +92 -0
  181. package/dist/modules/features/cms/sanity/mergers/sitemap.js.map +1 -0
  182. package/dist/modules/features/cms/sanity-pagebuilder/config.d.ts +14 -0
  183. package/dist/modules/features/cms/sanity-pagebuilder/config.d.ts.map +1 -0
  184. package/dist/modules/features/cms/sanity-pagebuilder/config.js +44 -0
  185. package/dist/modules/features/cms/sanity-pagebuilder/config.js.map +1 -0
  186. package/dist/modules/features/cms/sanity-pagebuilder/index.d.ts +3 -0
  187. package/dist/modules/features/cms/sanity-pagebuilder/index.d.ts.map +1 -0
  188. package/dist/modules/features/cms/sanity-pagebuilder/index.js +46 -0
  189. package/dist/modules/features/cms/sanity-pagebuilder/index.js.map +1 -0
  190. package/dist/modules/features/hooks/factory.d.ts +4 -0
  191. package/dist/modules/features/hooks/factory.d.ts.map +1 -0
  192. package/dist/modules/features/hooks/factory.js +26 -0
  193. package/dist/modules/features/hooks/factory.js.map +1 -0
  194. package/dist/modules/features/hooks/index.d.ts +3 -0
  195. package/dist/modules/features/hooks/index.d.ts.map +1 -0
  196. package/dist/modules/features/hooks/index.js +4 -0
  197. package/dist/modules/features/hooks/index.js.map +1 -0
  198. package/dist/modules/presets/index.d.ts +3 -0
  199. package/dist/modules/presets/index.d.ts.map +1 -0
  200. package/dist/modules/presets/index.js +11 -0
  201. package/dist/modules/presets/index.js.map +1 -0
  202. package/dist/modules/presets/next-default.d.ts +3 -0
  203. package/dist/modules/presets/next-default.d.ts.map +1 -0
  204. package/dist/modules/presets/next-default.js +9 -0
  205. package/dist/modules/presets/next-default.js.map +1 -0
  206. package/dist/modules/presets/next-experiments.d.ts +3 -0
  207. package/dist/modules/presets/next-experiments.d.ts.map +1 -0
  208. package/dist/modules/presets/next-experiments.js +9 -0
  209. package/dist/modules/presets/next-experiments.js.map +1 -0
  210. package/dist/modules/presets/next-pagebuilder.d.ts +3 -0
  211. package/dist/modules/presets/next-pagebuilder.d.ts.map +1 -0
  212. package/dist/modules/presets/next-pagebuilder.js +10 -0
  213. package/dist/modules/presets/next-pagebuilder.js.map +1 -0
  214. package/dist/modules/presets/next-webgl.d.ts +3 -0
  215. package/dist/modules/presets/next-webgl.d.ts.map +1 -0
  216. package/dist/modules/presets/next-webgl.js +9 -0
  217. package/dist/modules/presets/next-webgl.js.map +1 -0
  218. package/dist/paths.d.ts +7 -1
  219. package/dist/paths.d.ts.map +1 -1
  220. package/dist/paths.js +8 -2
  221. package/dist/paths.js.map +1 -1
  222. package/index.js +2 -2
  223. package/package.json +11 -4
  224. package/src/modules/features/cms/sanity/files/.knip.json +8 -0
  225. package/src/{helpers/integrate → modules/features/cms}/sanity/files/app/api/blog/[slug]/route.ts +3 -4
  226. package/src/{helpers/integrate → modules/features/cms}/sanity/files/app/api/revalidate/route.ts +1 -4
  227. package/src/{helpers/integrate → modules/features/cms}/sanity/files/app/blog/[slug]/page.tsx +8 -9
  228. package/src/{helpers/integrate → modules/features/cms}/sanity/files/app/layout.tsx +2 -2
  229. package/src/{helpers/integrate → modules/features/cms}/sanity/files/app/sitemap.md/route.ts +18 -29
  230. package/src/modules/features/cms/sanity/files/app/sitemap.xml/route.ts +51 -0
  231. package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/env.ts +2 -4
  232. package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/queries.ts +0 -42
  233. package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/schemas/index.ts +1 -1
  234. package/src/modules/features/cms/sanity/files/lib/scripts/copy-sanity-mcp.ts +23 -0
  235. package/src/modules/features/cms/sanity/files/lib/scripts/generate-page.ts +297 -0
  236. package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/utils/json-ld.tsx +1 -6
  237. package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/utils/metadata.ts +2 -2
  238. package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/utils/url.ts +4 -2
  239. package/src/{helpers/integrate → modules/features/cms}/sanity/files/proxy.ts +11 -11
  240. package/src/template-hooks/use-device-perf.ts +27 -17
  241. package/src/templates/next-default/.env.example +3 -3
  242. package/src/templates/next-default/.vscode/extensions.json +1 -5
  243. package/src/templates/next-default/.vscode/settings.json +1 -1
  244. package/src/templates/next-default/.zed/settings.json +47 -0
  245. package/src/templates/next-default/README.md +7 -6
  246. package/src/templates/next-default/_gitignore +1 -3
  247. package/src/templates/next-default/app/layout.tsx +21 -35
  248. package/src/templates/next-default/app/robots.ts +3 -4
  249. package/src/templates/next-default/app/sitemap.xml/route.ts +29 -29
  250. package/src/templates/next-default/biome.json +9 -2
  251. package/src/templates/next-default/components/ui/image/index.tsx +2 -1
  252. package/src/templates/next-default/components/ui/link/index.tsx +35 -35
  253. package/src/templates/next-default/lefthook.yml +25 -0
  254. package/src/templates/next-default/lib/README.md +8 -4
  255. package/src/templates/next-default/lib/hooks/use-media.ts +6 -3
  256. package/src/templates/next-default/lib/scripts/dev.ts +32 -0
  257. package/src/templates/next-default/lib/styles/README.md +13 -0
  258. package/src/templates/next-default/lib/styles/fonts.ts +20 -0
  259. package/src/templates/next-default/lib/styles/global.css +15 -196
  260. package/src/templates/next-default/lib/styles/index.css +3 -0
  261. package/src/templates/next-default/lib/styles/tokens.css +182 -0
  262. package/src/templates/next-default/lib/utils/README.md +40 -0
  263. package/src/templates/next-default/lib/utils/easings.ts +240 -0
  264. package/src/templates/next-default/lib/utils/fetch.ts +84 -0
  265. package/src/templates/next-default/lib/utils/global-css.d.ts +1 -0
  266. package/src/templates/next-default/lib/utils/json-ld.tsx +70 -68
  267. package/src/templates/next-default/lib/utils/math.ts +236 -0
  268. package/src/templates/next-default/lib/utils/metadata.ts +26 -27
  269. package/src/templates/next-default/lib/utils/strings.ts +246 -0
  270. package/src/templates/next-default/lib/utils/types.d.ts +15 -0
  271. package/src/templates/next-default/lib/utils/url.ts +8 -5
  272. package/src/templates/next-default/lib/utils/viewport.ts +199 -0
  273. package/src/templates/next-default/package.json +12 -7
  274. package/src/templates/next-default/svg.d.ts +1 -0
  275. package/src/templates/next-experiments/.env.example +3 -3
  276. package/src/templates/next-experiments/.knip.json +3 -0
  277. package/src/templates/next-experiments/.vscode/extensions.json +1 -5
  278. package/src/templates/next-experiments/.vscode/settings.json +1 -1
  279. package/src/templates/next-experiments/.zed/settings.json +47 -0
  280. package/src/templates/next-experiments/README.md +7 -6
  281. package/src/templates/next-experiments/_gitignore +1 -3
  282. package/src/templates/next-experiments/app/layout.tsx +21 -35
  283. package/src/templates/next-experiments/app/robots.ts +5 -2
  284. package/src/templates/next-experiments/app/sitemap.xml/route.ts +51 -0
  285. package/src/templates/next-experiments/biome.json +4 -2
  286. package/src/templates/next-experiments/components/layout/navigation-menu.tsx +1 -1
  287. package/src/templates/next-experiments/components/layout/wrapper/index.tsx +6 -6
  288. package/src/templates/next-experiments/components/ui/image/index.tsx +33 -33
  289. package/src/templates/next-experiments/lib/README.md +8 -4
  290. package/src/templates/next-experiments/lib/hooks/use-media.ts +6 -3
  291. package/src/templates/next-experiments/lib/scripts/dev.ts +32 -0
  292. package/src/templates/next-experiments/lib/styles/README.md +13 -0
  293. package/src/templates/next-experiments/lib/styles/fonts.ts +20 -0
  294. package/src/templates/next-experiments/lib/styles/global.css +16 -196
  295. package/src/templates/next-experiments/lib/styles/index.css +3 -0
  296. package/src/templates/next-experiments/lib/styles/tokens.css +182 -0
  297. package/src/templates/next-experiments/lib/utils/README.md +40 -0
  298. package/src/templates/next-experiments/lib/utils/easings.ts +240 -0
  299. package/src/templates/next-experiments/lib/utils/fetch.ts +84 -0
  300. package/src/templates/next-experiments/lib/utils/global-css.d.ts +1 -0
  301. package/src/templates/next-experiments/lib/utils/json-ld.tsx +70 -68
  302. package/src/templates/next-experiments/lib/utils/math.ts +236 -0
  303. package/src/templates/next-experiments/lib/utils/metadata.ts +26 -27
  304. package/src/templates/next-experiments/lib/utils/strings.ts +246 -0
  305. package/src/templates/next-experiments/lib/utils/types.d.ts +15 -0
  306. package/src/templates/next-experiments/lib/utils/url.ts +8 -5
  307. package/src/templates/next-experiments/lib/utils/viewport.ts +199 -0
  308. package/src/templates/next-experiments/package.json +6 -6
  309. package/src/templates/next-experiments/svg.d.ts +1 -0
  310. package/src/templates/next-pagebuilder/.vscode/extensions.json +16 -0
  311. package/src/templates/next-pagebuilder/.vscode/settings.json +105 -0
  312. package/src/templates/next-pagebuilder/.zed/settings.json +47 -0
  313. package/src/templates/next-pagebuilder/_gitignore +1 -3
  314. package/src/templates/next-pagebuilder/app/(content)/[[...slug]]/page.tsx +17 -8
  315. package/src/templates/next-pagebuilder/app/(content)/layout.tsx +18 -7
  316. package/src/templates/next-pagebuilder/app/actions/refresh.ts +5 -0
  317. package/src/templates/next-pagebuilder/app/robots.ts +3 -4
  318. package/src/templates/next-pagebuilder/biome.json +17 -0
  319. package/src/templates/next-pagebuilder/components/layout/footer/index.tsx +17 -22
  320. package/src/templates/next-pagebuilder/components/layout/header/index.tsx +3 -5
  321. package/src/templates/next-pagebuilder/components/layout/json-ld/index.tsx +11 -10
  322. package/src/templates/next-pagebuilder/components/layout/wrapper/index.tsx +14 -4
  323. package/src/templates/next-pagebuilder/components/page-builder/components/article-content/index.tsx +4 -9
  324. package/src/templates/next-pagebuilder/components/page-builder/components/article-content/related-post-item.tsx +4 -4
  325. package/src/templates/next-pagebuilder/components/page-builder/components/{post-collection → content-collection}/content-card.tsx +2 -2
  326. package/src/templates/next-pagebuilder/components/page-builder/components/content-collection/content-filters.tsx +93 -0
  327. package/src/templates/next-pagebuilder/components/page-builder/components/{post-collection → content-collection}/content-grid.tsx +7 -9
  328. package/src/templates/next-pagebuilder/components/page-builder/components/content-collection/content-pagination-nav.tsx +71 -0
  329. package/src/templates/next-pagebuilder/components/page-builder/components/content-collection/index.tsx +219 -0
  330. package/src/templates/next-pagebuilder/components/page-builder/components/{post-collection → content-collection}/types.ts +7 -4
  331. package/src/templates/next-pagebuilder/components/page-builder/renderer.tsx +17 -5
  332. package/src/templates/next-pagebuilder/components/page-builder/types.ts +9 -7
  333. package/src/templates/next-pagebuilder/components/page-document/index.tsx +19 -4
  334. package/src/templates/next-pagebuilder/lefthook.yml +25 -0
  335. package/src/templates/next-pagebuilder/lib/integrations/sanity/sanity.types.ts +208 -0
  336. package/src/templates/next-pagebuilder/lib/styles/global.css +0 -1
  337. package/src/templates/next-pagebuilder/next.config.ts +1 -0
  338. package/src/templates/next-pagebuilder/package.json +13 -26
  339. package/src/templates/next-pagebuilder/postcss.config.mjs +27 -1
  340. package/src/templates/next-pagebuilder/svg.d.ts +1 -0
  341. package/src/templates/next-webgl/.env.example +3 -3
  342. package/src/templates/next-webgl/.vscode/extensions.json +1 -5
  343. package/src/templates/next-webgl/.vscode/settings.json +1 -1
  344. package/src/templates/next-webgl/.zed/settings.json +47 -0
  345. package/src/templates/next-webgl/README.md +7 -6
  346. package/src/templates/next-webgl/_gitignore +1 -3
  347. package/src/templates/next-webgl/app/layout.tsx +21 -35
  348. package/src/templates/next-webgl/app/robots.ts +3 -4
  349. package/src/templates/next-webgl/app/sitemap.xml/route.ts +29 -29
  350. package/src/templates/next-webgl/biome.json +9 -2
  351. package/src/templates/next-webgl/components/ui/image/index.tsx +2 -1
  352. package/src/templates/next-webgl/components/webgl/components/scene/index.tsx +0 -2
  353. package/src/templates/next-webgl/lefthook.yml +25 -0
  354. package/src/templates/next-webgl/lib/README.md +8 -4
  355. package/src/templates/next-webgl/lib/hooks/use-media.ts +6 -3
  356. package/src/templates/next-webgl/lib/scripts/dev.ts +32 -0
  357. package/src/templates/next-webgl/lib/styles/README.md +13 -0
  358. package/src/templates/next-webgl/lib/styles/fonts.ts +20 -0
  359. package/src/templates/next-webgl/lib/styles/global.css +16 -196
  360. package/src/templates/next-webgl/lib/styles/index.css +3 -0
  361. package/src/templates/next-webgl/lib/styles/tokens.css +182 -0
  362. package/src/templates/next-webgl/lib/utils/README.md +40 -0
  363. package/src/templates/next-webgl/lib/utils/easings.ts +240 -0
  364. package/src/templates/next-webgl/lib/utils/fetch.ts +84 -0
  365. package/src/templates/next-webgl/lib/utils/global-css.d.ts +1 -0
  366. package/src/templates/next-webgl/lib/utils/json-ld.tsx +70 -68
  367. package/src/templates/next-webgl/lib/utils/math.ts +236 -0
  368. package/src/templates/next-webgl/lib/utils/metadata.ts +26 -27
  369. package/src/templates/next-webgl/lib/utils/strings.ts +246 -0
  370. package/src/templates/next-webgl/lib/utils/types.d.ts +15 -0
  371. package/src/templates/next-webgl/lib/utils/url.ts +8 -5
  372. package/src/templates/next-webgl/lib/utils/viewport.ts +199 -0
  373. package/src/templates/next-webgl/package.json +13 -8
  374. package/src/templates/next-webgl/svg.d.ts +1 -0
  375. package/src/templates/next-webgl/tsconfig.tsbuildinfo +1 -1
  376. package/dist/configs/animations.d.ts.map +0 -1
  377. package/dist/configs/animations.js.map +0 -1
  378. package/dist/configs/skills.d.ts +0 -27
  379. package/dist/configs/skills.d.ts.map +0 -1
  380. package/dist/configs/skills.js +0 -18
  381. package/dist/configs/skills.js.map +0 -1
  382. package/dist/configs/skills.json +0 -26
  383. package/dist/helpers/add/hooks-config.d.ts +0 -22
  384. package/dist/helpers/add/hooks-config.d.ts.map +0 -1
  385. package/dist/helpers/add/hooks-config.js +0 -31
  386. package/dist/helpers/add/hooks-config.js.map +0 -1
  387. package/dist/helpers/add/index.d.ts.map +0 -1
  388. package/dist/helpers/add/index.js.map +0 -1
  389. package/dist/helpers/create/copy-template.d.ts +0 -11
  390. package/dist/helpers/create/copy-template.d.ts.map +0 -1
  391. package/dist/helpers/create/copy-template.js.map +0 -1
  392. package/dist/helpers/create/index.d.ts +0 -24
  393. package/dist/helpers/create/index.d.ts.map +0 -1
  394. package/dist/helpers/create/index.js +0 -99
  395. package/dist/helpers/create/index.js.map +0 -1
  396. package/dist/helpers/create/init-git.d.ts.map +0 -1
  397. package/dist/helpers/create/init-git.js.map +0 -1
  398. package/dist/helpers/create/install.d.ts.map +0 -1
  399. package/dist/helpers/create/install.js.map +0 -1
  400. package/dist/helpers/create/rename-files.d.ts.map +0 -1
  401. package/dist/helpers/create/rename-files.js.map +0 -1
  402. package/dist/helpers/create/setup-agent.d.ts.map +0 -1
  403. package/dist/helpers/create/setup-agent.js +0 -91
  404. package/dist/helpers/create/setup-agent.js.map +0 -1
  405. package/dist/helpers/create/setup-sanity.d.ts.map +0 -1
  406. package/dist/helpers/create/setup-sanity.js.map +0 -1
  407. package/dist/helpers/create/update-package.d.ts +0 -20
  408. package/dist/helpers/create/update-package.d.ts.map +0 -1
  409. package/dist/helpers/create/update-package.js +0 -97
  410. package/dist/helpers/create/update-package.js.map +0 -1
  411. package/dist/helpers/integrate/index.d.ts.map +0 -1
  412. package/dist/helpers/integrate/index.js.map +0 -1
  413. package/dist/helpers/integrate/merge-config.d.ts +0 -21
  414. package/dist/helpers/integrate/merge-config.d.ts.map +0 -1
  415. package/dist/helpers/integrate/merge-config.js +0 -42
  416. package/dist/helpers/integrate/merge-config.js.map +0 -1
  417. package/dist/helpers/integrate/merge-orchestrator.d.ts +0 -10
  418. package/dist/helpers/integrate/merge-orchestrator.d.ts.map +0 -1
  419. package/dist/helpers/integrate/merge-orchestrator.js.map +0 -1
  420. package/dist/helpers/integrate/sanity/config.d.ts.map +0 -1
  421. package/dist/helpers/integrate/sanity/config.js.map +0 -1
  422. package/dist/helpers/integrate/sanity/mergers/check-integration-merger.d.ts.map +0 -1
  423. package/dist/helpers/integrate/sanity/mergers/check-integration-merger.js.map +0 -1
  424. package/dist/helpers/integrate/sanity/mergers/layout-merger.d.ts.map +0 -1
  425. package/dist/helpers/integrate/sanity/mergers/layout-merger.js.map +0 -1
  426. package/dist/helpers/integrate/sanity/mergers/sitemap-merger.d.ts +0 -11
  427. package/dist/helpers/integrate/sanity/mergers/sitemap-merger.d.ts.map +0 -1
  428. package/dist/helpers/integrate/sanity/mergers/sitemap-merger.js +0 -133
  429. package/dist/helpers/integrate/sanity/mergers/sitemap-merger.js.map +0 -1
  430. package/dist/helpers/skills/index.d.ts.map +0 -1
  431. package/dist/helpers/skills/index.js.map +0 -1
  432. package/dist/utils/detect-project.d.ts.map +0 -1
  433. package/dist/utils/detect-project.js.map +0 -1
  434. package/dist/utils/format-results.d.ts.map +0 -1
  435. package/dist/utils/format-results.js.map +0 -1
  436. package/src/helpers/integrate/sanity/files/lib/integrations/sanity/WEBHOOK-SETUP.md +0 -74
  437. package/src/helpers/integrate/sanity/files/lib/integrations/sanity/sitemap.ts +0 -90
  438. package/src/template-hooks/config.js +0 -32
  439. package/src/templates/next-default/css.d.ts +0 -1
  440. package/src/templates/next-default/lib/utils/portable-text-to-markdown.ts +0 -83
  441. package/src/templates/next-default/tsconfig.tsbuildinfo +0 -1
  442. package/src/templates/next-experiments/css.d.ts +0 -1
  443. package/src/templates/next-experiments/lib/utils/portable-text-to-markdown.ts +0 -83
  444. package/src/templates/next-pagebuilder/app/api/[[...slug]]/route.ts +0 -100
  445. package/src/templates/next-pagebuilder/app/api/draft-mode/disable/route.ts +0 -7
  446. package/src/templates/next-pagebuilder/app/api/draft-mode/enable/route.ts +0 -20
  447. package/src/templates/next-pagebuilder/app/api/revalidate/route.ts +0 -121
  448. package/src/templates/next-pagebuilder/app/sitemap.md/route.ts +0 -124
  449. package/src/templates/next-pagebuilder/app/studio/[[...tool]]/page.tsx +0 -8
  450. package/src/templates/next-pagebuilder/components/page-builder/components/post-collection/index.tsx +0 -28
  451. package/src/templates/next-pagebuilder/components/sanity/draft-mode-toggle.tsx +0 -27
  452. package/src/templates/next-pagebuilder/components/sanity/rich-text.tsx +0 -87
  453. package/src/templates/next-pagebuilder/components/sanity/visual-editing.tsx +0 -27
  454. package/src/templates/next-pagebuilder/components/ui/sanity-image/index.tsx +0 -41
  455. package/src/templates/next-pagebuilder/lib/integrations/check-integration.ts +0 -5
  456. package/src/templates/next-pagebuilder/lib/integrations/sanity/client.ts +0 -27
  457. package/src/templates/next-pagebuilder/lib/integrations/sanity/components/disable-draft-mode.tsx +0 -23
  458. package/src/templates/next-pagebuilder/lib/integrations/sanity/components/page-builder-input.tsx +0 -36
  459. package/src/templates/next-pagebuilder/lib/integrations/sanity/components/page-category-input.tsx +0 -50
  460. package/src/templates/next-pagebuilder/lib/integrations/sanity/components/rich-text.tsx +0 -84
  461. package/src/templates/next-pagebuilder/lib/integrations/sanity/confirm-publish-action.ts +0 -40
  462. package/src/templates/next-pagebuilder/lib/integrations/sanity/env.ts +0 -34
  463. package/src/templates/next-pagebuilder/lib/integrations/sanity/fetchers/layout.ts +0 -35
  464. package/src/templates/next-pagebuilder/lib/integrations/sanity/icons.ts +0 -58
  465. package/src/templates/next-pagebuilder/lib/integrations/sanity/live/index.tsx +0 -61
  466. package/src/templates/next-pagebuilder/lib/integrations/sanity/markdown-proxy.config.ts +0 -50
  467. package/src/templates/next-pagebuilder/lib/integrations/sanity/page-builder-config.ts +0 -132
  468. package/src/templates/next-pagebuilder/lib/integrations/sanity/page-category.ts +0 -28
  469. package/src/templates/next-pagebuilder/lib/integrations/sanity/queries.ts +0 -281
  470. package/src/templates/next-pagebuilder/lib/integrations/sanity/sanity.cli.ts +0 -29
  471. package/src/templates/next-pagebuilder/lib/integrations/sanity/sanity.config.ts +0 -211
  472. package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/components/index.ts +0 -4
  473. package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/components/reusable/blog-content.ts +0 -89
  474. package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/components/reusable/description.ts +0 -29
  475. package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/components/reusable/hero.ts +0 -28
  476. package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/components/singleton/content-collection.ts +0 -45
  477. package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/content/author.ts +0 -70
  478. package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/content/blog-category.ts +0 -55
  479. package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/index.ts +0 -96
  480. package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/layout/company-data.ts +0 -62
  481. package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/layout/footer.ts +0 -79
  482. package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/layout/navbar.ts +0 -74
  483. package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/shared/link.ts +0 -125
  484. package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/shared/logo-field.ts +0 -9
  485. package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/shared/metadata.ts +0 -68
  486. package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/shared/nav-objects.ts +0 -192
  487. package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/shared/page-builder.ts +0 -39
  488. package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/shared/page-folder.ts +0 -124
  489. package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/shared/page.ts +0 -232
  490. package/src/templates/next-pagebuilder/lib/integrations/sanity/schemas/shared/richText.ts +0 -63
  491. package/src/templates/next-pagebuilder/lib/integrations/sanity/singletons.ts +0 -44
  492. package/src/templates/next-pagebuilder/lib/integrations/sanity/structure.ts +0 -453
  493. package/src/templates/next-pagebuilder/lib/integrations/sanity/utils/image.ts +0 -8
  494. package/src/templates/next-pagebuilder/lib/integrations/sanity/utils/link.ts +0 -137
  495. package/src/templates/next-pagebuilder/lib/integrations/sanity/utils/page-builder-markdown.ts +0 -81
  496. package/src/templates/next-pagebuilder/lib/scripts/sanity-typegen.ts +0 -45
  497. package/src/templates/next-pagebuilder/lib/utils/json-ld.tsx +0 -213
  498. package/src/templates/next-pagebuilder/lib/utils/metadata.ts +0 -167
  499. package/src/templates/next-pagebuilder/lib/utils/sitemap.ts +0 -37
  500. package/src/templates/next-pagebuilder/proxy.ts +0 -81
  501. package/src/templates/next-webgl/css.d.ts +0 -1
  502. package/src/templates/next-webgl/lib/utils/portable-text-to-markdown.ts +0 -83
  503. package/dist/{helpers → infrastructure}/create/copy-template.js +0 -0
  504. package/dist/{helpers → infrastructure}/create/rename-files.d.ts +0 -0
  505. package/dist/{helpers → infrastructure}/create/rename-files.js +0 -0
  506. package/dist/{helpers → infrastructure}/create/setup-sanity.d.ts +0 -0
  507. package/dist/{helpers/integrate → modules/features/cms}/sanity/config.d.ts +0 -0
  508. package/src/{helpers/integrate → modules/features/cms}/sanity/files/app/api/draft-mode/disable/route.ts +0 -0
  509. package/src/{helpers/integrate → modules/features/cms}/sanity/files/app/api/draft-mode/enable/route.ts +0 -0
  510. package/src/{helpers/integrate → modules/features/cms}/sanity/files/app/studio/[[...tool]]/page.tsx +0 -0
  511. package/src/{helpers/integrate → modules/features/cms}/sanity/files/app/studio/layout.tsx +0 -0
  512. package/src/{helpers/integrate → modules/features/cms}/sanity/files/components/ui/sanity-image/index.tsx +0 -0
  513. package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/README.md +0 -0
  514. package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/check-integration.ts +0 -0
  515. package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/MARKDOWN-PROXY.md +0 -0
  516. package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/README.md +0 -0
  517. package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/client.ts +0 -0
  518. package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/components/disable-draft-mode.tsx +0 -0
  519. package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/components/rich-text.tsx +0 -0
  520. package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/confirm-publish-action.ts +0 -0
  521. package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/live/index.tsx +1 -1
  522. package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/markdown-proxy.config.ts +0 -0
  523. package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/sanity.cli.ts +0 -0
  524. package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/sanity.config.ts +1 -1
  525. /package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/sanity.types.ts +0 -0
  526. /package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/schema.json +0 -0
  527. /package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/schemas/article.ts +0 -0
  528. /package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/schemas/example.ts +0 -0
  529. /package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/schemas/link.ts +0 -0
  530. /package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/schemas/metadata.ts +0 -0
  531. /package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/schemas/navigation.ts +0 -0
  532. /package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/schemas/richText.ts +0 -0
  533. /package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/structure.ts +0 -0
  534. /package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/utils/image.ts +0 -0
  535. /package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/integrations/sanity/utils/link.ts +0 -0
  536. /package/src/{helpers/integrate → modules/features/cms}/sanity/files/lib/utils/portable-text-to-markdown.ts +0 -0
@@ -0,0 +1,199 @@
1
+ /**
2
+ * Viewport Utilities
3
+ *
4
+ * Convert pixel values to viewport-relative sizes and relative units.
5
+ * Mirrors the SASS functions for consistent responsive scaling.
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * import { tovw, torem, toem } from '@/utils/viewport'
10
+ *
11
+ * // Convert to viewport width units
12
+ * const paddingX = tovw(16, 24) // "1.5625vw" with a minimum of 24px
13
+ * const fontSize = tovw(16, 'mobile') // "4.27vw" (no undefined needed!)
14
+ * const width = tovw(100, 50, 'desktop') // "max(50px, 6.94vw)"
15
+ *
16
+ * // Convert to rem/em
17
+ * const spacing = torem(24) // "1.5rem"
18
+ * const padding = toem(16, 14) // "1.14em"
19
+ * ```
20
+ *
21
+ * ## When to Use
22
+ *
23
+ * - **CSS**: Prefer the PostCSS functions `tovw()`, `torem()`, and `toem()`
24
+ * - **JavaScript/TypeScript**: Use these for dynamic calculations or inline styles
25
+ * - **Runtime calculations**: Use for canvas, WebGL, or dynamic sizing
26
+ */
27
+
28
+ const BREAKPOINTS = {
29
+ "desktop-large": 1920,
30
+ desktop: 1440,
31
+ "tablet-lg": 1024,
32
+ tablet: 768,
33
+ mobile: 640,
34
+ } as const
35
+
36
+ type ContextSize = keyof typeof BREAKPOINTS | number
37
+
38
+ /**
39
+ * Resolves a context size to a pixel value.
40
+ *
41
+ * @param context - Context identifier or pixel value
42
+ * @returns Pixel value
43
+ */
44
+ function resolveContext(context: ContextSize): number {
45
+ if (typeof context === "number") {
46
+ return context
47
+ }
48
+ return BREAKPOINTS[context] ?? BREAKPOINTS.desktop
49
+ }
50
+
51
+ /**
52
+ * Checks if a value is a context identifier (breakpoint key).
53
+ *
54
+ * @param value - Value to check
55
+ * @returns True if value is a breakpoint key
56
+ */
57
+ function isContextIdentifier(
58
+ value: unknown
59
+ ): value is keyof typeof BREAKPOINTS {
60
+ return typeof value === "string" && value in BREAKPOINTS
61
+ }
62
+
63
+ /**
64
+ * Rounds a number to a maximum of 4 decimal places, removing trailing zeros.
65
+ *
66
+ * @param value - Number to round
67
+ * @returns Rounded number as string without trailing zeros
68
+ */
69
+ function roundToMaxDecimals(value: number): string {
70
+ // Round to 4 decimal places
71
+ const rounded = Math.round(value * 10000) / 10000
72
+ // Convert to string and remove trailing zeros only after decimal point
73
+ return rounded
74
+ .toString()
75
+ .replace(/\.0+$/, "")
76
+ .replace(/(\.\d*?)0+$/, "$1")
77
+ }
78
+
79
+ // Function overloads for tovw
80
+ export function tovw(target: number): string
81
+ export function tovw(target: number, min: number): string
82
+ export function tovw(target: number, context: ContextSize): string
83
+ export function tovw(target: number, min: number, context: ContextSize): string
84
+ /**
85
+ * Converts a pixel value to viewport width units (vw).
86
+ * Optionally applies a minimum value using CSS max().
87
+ *
88
+ * Supports flexible parameter patterns:
89
+ * - `tovw(target)` - Uses default desktop context
90
+ * - `tovw(target, min)` - Sets minimum value
91
+ * - `tovw(target, context)` - Sets context (auto-detected if string identifier)
92
+ * - `tovw(target, min, context)` - Sets both min and context
93
+ *
94
+ * @param target - Target pixel value to convert
95
+ * @param minOrContext - Optional minimum pixel value OR context identifier
96
+ * @param context - Context size identifier (if min was provided)
97
+ * @returns CSS string with vw units (e.g., "6.94vw" or "max(50px, 6.94vw)")
98
+ *
99
+ * @example
100
+ * ```ts
101
+ * // Basic conversion
102
+ * tovw(100) // "6.94vw"
103
+ * tovw(16, 'mobile') // "4.27vw" (no undefined needed!)
104
+ *
105
+ * // With minimum value
106
+ * tovw(100, 50) // "max(50px, 6.94vw)"
107
+ * tovw(100, 50, 'mobile') // "max(50px, 6.94vw)" with mobile context
108
+ *
109
+ * // Custom context
110
+ * tovw(100, 1920) // "5.21vw"
111
+ *
112
+ * // Handles zero
113
+ * tovw(0) // "0"
114
+ * ```
115
+ */
116
+ export function tovw(
117
+ target: number,
118
+ minOrContext?: number | ContextSize,
119
+ context?: ContextSize
120
+ ): string {
121
+ if (target === 0) {
122
+ return "0"
123
+ }
124
+
125
+ let min: number | undefined
126
+ let resolvedContext: ContextSize = "desktop"
127
+
128
+ if (minOrContext !== undefined) {
129
+ if (isContextIdentifier(minOrContext)) {
130
+ // Second param is context
131
+ resolvedContext = minOrContext
132
+ if (context !== undefined) {
133
+ resolvedContext = context
134
+ }
135
+ } else if (typeof minOrContext === "number") {
136
+ // Second param is min value
137
+ min = minOrContext
138
+ if (context !== undefined) {
139
+ resolvedContext = context
140
+ }
141
+ }
142
+ } else if (context !== undefined) {
143
+ // Only context provided as third param (legacy support)
144
+ resolvedContext = context
145
+ }
146
+
147
+ const contextSize = resolveContext(resolvedContext)
148
+ const vwValue = (target / contextSize) * 100
149
+
150
+ if (min !== undefined) {
151
+ return `max(${min}px, ${roundToMaxDecimals(vwValue)}vw)`
152
+ }
153
+
154
+ return `${roundToMaxDecimals(vwValue)}vw`
155
+ }
156
+
157
+ /**
158
+ * Converts a pixel value to rem units.
159
+ *
160
+ * @param target - Target pixel value to convert
161
+ * @param context - Base font size in pixels (default: 16)
162
+ * @returns CSS string with rem units (e.g., "1.5rem")
163
+ *
164
+ * @example
165
+ * ```ts
166
+ * torem(24) // "1.5rem" (24 / 16)
167
+ * torem(18, 14) // "1.29rem" (18 / 14)
168
+ * torem(0) // "0"
169
+ * ```
170
+ */
171
+ export function torem(target: number, context = 16): string {
172
+ if (target === 0) {
173
+ return "0"
174
+ }
175
+
176
+ return `${roundToMaxDecimals(target / context)}rem`
177
+ }
178
+
179
+ /**
180
+ * Converts a pixel value to em units.
181
+ *
182
+ * @param target - Target pixel value to convert
183
+ * @param context - Context size in pixels (required)
184
+ * @returns CSS string with em units (e.g., "1.5em")
185
+ *
186
+ * @example
187
+ * ```ts
188
+ * toem(24, 16) // "1.5em" (24 / 16)
189
+ * toem(18, 14) // "1.29em" (18 / 14)
190
+ * toem(0, 16) // "0"
191
+ * ```
192
+ */
193
+ export function toem(target: number, context: number): string {
194
+ if (target === 0) {
195
+ return "0"
196
+ }
197
+
198
+ return `${roundToMaxDecimals(target / context)}em`
199
+ }
@@ -8,13 +8,13 @@
8
8
  "analyze": "cross-env ANALYZE=true bun run build",
9
9
  "analyze:experimental": "next experimental-analyze",
10
10
  "build": "next build",
11
- "dev": "next dev",
12
- "dev:https": "next dev --experimental-https",
13
- "dev:inspect": "next dev --inspect",
11
+ "dev": "bun ./lib/scripts/dev.ts",
12
+ "dev:https": "bun ./lib/scripts/dev.ts --https",
13
+ "dev:inspect": "bun ./lib/scripts/dev.ts --inspect",
14
14
  "format": "biome format --write .",
15
15
  "lighthouse": "bunx @unlighthouse/cli --site http://localhost:3000",
16
16
  "lint": "biome lint --max-diagnostics=200",
17
- "lint:fix": "biome lint --write --unsafe --max-diagnostics=200",
17
+ "lint:fix": "biome check --write --unsafe --max-diagnostics=200",
18
18
  "start": "next start",
19
19
  "typecheck": "tsgo --noEmit",
20
20
  "typecheck:compare": "bun run typecheck:tsc && bun run typecheck",
@@ -33,7 +33,7 @@
33
33
  "zod": "^4.3.6"
34
34
  },
35
35
  "devDependencies": {
36
- "@biomejs/biome": "2.3.14",
36
+ "@biomejs/biome": "^2.4.14",
37
37
  "@next/bundle-analyzer": "^16",
38
38
  "@svgr/webpack": "^8.1.0",
39
39
  "@tailwindcss/postcss": "^4",
@@ -42,7 +42,7 @@
42
42
  "@types/react": "^19.2.9",
43
43
  "@types/react-dom": "^19.2.3",
44
44
  "@typescript/native-preview": "^7.0.0-dev.20260122.3",
45
- "babel-plugin-react-compiler": "1.0.0",
45
+ "babel-plugin-react-compiler": "^1.0.0",
46
46
  "cross-env": "^10.1.0",
47
47
  "postcss-preset-env": "^10.6.1",
48
48
  "schema-dts": "^2.0.0",
@@ -1,5 +1,6 @@
1
1
  declare module "*.svg" {
2
2
  import type { FC, SVGProps } from "react"
3
+
3
4
  const content: FC<SVGProps<SVGSVGElement>>
4
5
  export default content
5
6
  }
@@ -0,0 +1,16 @@
1
+ {
2
+ "recommendations": [
3
+ // Formatting & Linting
4
+ "biomejs.biome",
5
+
6
+ // CSS & Styling
7
+ "bradlc.vscode-tailwindcss",
8
+ "csstools.postcss",
9
+
10
+ // Sanity CMS (GROQ syntax + validation)
11
+ "sanity-io.vscode-sanity",
12
+
13
+ // DX Enhancements
14
+ "yoavbls.pretty-ts-errors"
15
+ ]
16
+ }
@@ -0,0 +1,105 @@
1
+ {
2
+ // Language-specific formatters (explicit per-language ensures no fallback to other formatters)
3
+ "[css]": {
4
+ "editor.defaultFormatter": "biomejs.biome"
5
+ },
6
+ "[javascript]": {
7
+ "editor.defaultFormatter": "biomejs.biome"
8
+ },
9
+ "[javascriptreact]": {
10
+ "editor.defaultFormatter": "biomejs.biome"
11
+ },
12
+ "[json]": {
13
+ "editor.defaultFormatter": "biomejs.biome"
14
+ },
15
+ "[jsonc]": {
16
+ "editor.defaultFormatter": "biomejs.biome"
17
+ },
18
+ "[postcss]": {
19
+ "editor.defaultFormatter": "biomejs.biome"
20
+ },
21
+ "[typescript]": {
22
+ "editor.defaultFormatter": "biomejs.biome"
23
+ },
24
+ "[typescriptreact]": {
25
+ "editor.defaultFormatter": "biomejs.biome"
26
+ },
27
+ "colorize.languages": [
28
+ "javascript",
29
+ "typescript",
30
+ "css",
31
+ "scss",
32
+ "less",
33
+ "html",
34
+ "json",
35
+ "yaml",
36
+ "markdown",
37
+ "glsl"
38
+ ],
39
+ "css.lint.unknownAtRules": "ignore",
40
+
41
+ // CSS (Tailwind v4)
42
+ "css.lint.validProperties": ["user-drag"],
43
+ "editor.codeActionsOnSave": {
44
+ "source.fixAll.biome": "always",
45
+ "source.organizeImports.biome": "always"
46
+ },
47
+ "editor.defaultFormatter": "biomejs.biome",
48
+
49
+ // Formatting
50
+ "editor.formatOnSave": true,
51
+ "editor.formatOnSaveMode": "file",
52
+
53
+ // File associations
54
+ "files.associations": {
55
+ "*.css": "css",
56
+ "*.json": "jsonc"
57
+ },
58
+
59
+ // General
60
+ "files.eol": "\n",
61
+ // "typescript.experimental.useTsgo": true, // Disabled: tsgo doesn't support Next.js plugin
62
+ "javascript.suggest.autoImports": true,
63
+ // Disable Prettier to prevent silent formatter conflicts
64
+ "prettier.enable": false,
65
+
66
+ // Search exclusions (performance)
67
+ "search.exclude": {
68
+ "**/.next": true,
69
+ "**/.vercel": true,
70
+ "**/bun.lock": true,
71
+ "**/lib/integrations/sanity/sanity.types.ts": true,
72
+ "**/node_modules": true
73
+ },
74
+ "tailwindCSS.classAttributes": [
75
+ "class",
76
+ "className",
77
+ ".*ClassName",
78
+ ".*Styles"
79
+ ],
80
+ "tailwindCSS.classFunctions": ["cn", "cva", "twMerge", "cx"],
81
+ "tailwindCSS.experimental.classRegex": [
82
+ ["cn\\(([^)]*)\\)", "(?:'|\"|`)([^\"'`]*)(?:'|\"|`)"],
83
+ ["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"]
84
+ ],
85
+ "tailwindCSS.experimental.configFile": "./lib/styles/css/tailwind.css",
86
+ "tailwindCSS.includeLanguages": {
87
+ "typescriptreact": "html"
88
+ },
89
+ "typescript.preferences.importModuleSpecifier": "non-relative",
90
+
91
+ // TypeScript
92
+ "typescript.suggest.autoImports": true,
93
+ "typescript.tsdk": "node_modules/typescript/lib",
94
+
95
+ // Editor labels (fixed for .tsx files)
96
+ "workbench.editor.customLabels.patterns": {
97
+ "**/app/**/layout.tsx": "${dirname(1)}/${dirname} <layout>",
98
+ "**/app/**/page.tsx": "${dirname(1)}/${dirname} <page>",
99
+ "**/app/api/**/route.ts": "${dirname(1)}/${dirname} <route>",
100
+ "**/components/**/index.tsx": "${dirname} <component>"
101
+ },
102
+ "workbench.editorAssociations": {
103
+ "*.svg": "default"
104
+ }
105
+ }
@@ -0,0 +1,47 @@
1
+ {
2
+ "format_on_save": "on",
3
+ "lsp": {
4
+ "vscode-css-language-server": {
5
+ "settings": {
6
+ "css": {
7
+ "lint": {
8
+ "unknownAtRules": "ignore"
9
+ }
10
+ }
11
+ }
12
+ }
13
+ },
14
+ "languages": {
15
+ "JavaScript": {
16
+ "language_servers": ["biome", "..."],
17
+ "formatter": { "language_server": { "name": "biome" } },
18
+ "code_actions_on_format": {
19
+ "source.fixAll.biome": true,
20
+ "source.organizeImports.biome": true
21
+ }
22
+ },
23
+ "TypeScript": {
24
+ "formatter": { "language_server": { "name": "biome" } },
25
+ "code_actions_on_format": {
26
+ "source.fixAll.biome": true,
27
+ "source.organizeImports.biome": true
28
+ }
29
+ },
30
+ "TSX": {
31
+ "formatter": { "language_server": { "name": "biome" } },
32
+ "code_actions_on_format": {
33
+ "source.fixAll.biome": true,
34
+ "source.organizeImports.biome": true
35
+ }
36
+ },
37
+ "CSS": {
38
+ "formatter": { "language_server": { "name": "biome" } }
39
+ },
40
+ "JSON": {
41
+ "formatter": { "language_server": { "name": "biome" } }
42
+ },
43
+ "JSONC": {
44
+ "formatter": { "language_server": { "name": "biome" } }
45
+ }
46
+ }
47
+ }
@@ -29,7 +29,6 @@
29
29
  # misc
30
30
  .DS_Store
31
31
  *.pem
32
- .cursor/scratchpad.md
33
32
 
34
33
  # debug
35
34
  npm-debug.log*
@@ -57,8 +56,7 @@ yarn-error.log*
57
56
  certificates
58
57
 
59
58
  next-env.d.ts
60
- # claude
61
- .claude
59
+
62
60
 
63
61
  # unlighthouse
64
62
  .unlighthouse/
@@ -1,6 +1,7 @@
1
1
  import { notFound } from "next/navigation"
2
+ import { PageDocument } from "@/components/page-document"
2
3
  import { client } from "@/lib/integrations/sanity/client"
3
- import { sanityFetch } from "@/lib/integrations/sanity/live"
4
+ import { fetchSanity } from "@/lib/integrations/sanity/live"
4
5
  import {
5
6
  ALL_PAGE_SLUGS_QUERY,
6
7
  PAGE_QUERY,
@@ -11,10 +12,9 @@ import type {
11
12
  } from "@/lib/integrations/sanity/sanity.types"
12
13
  import { generateSanityMetadata } from "@/lib/utils/metadata"
13
14
  import { getSlugTag } from "@/lib/utils/slug-tag"
14
- import { PageDocument } from "@/components/page-document"
15
15
 
16
16
  const getPageDocument = async (slug: string | null, stega = true) =>
17
- sanityFetch({
17
+ fetchSanity<PAGE_QUERY_RESULT>({
18
18
  query: PAGE_QUERY,
19
19
  params: { slug },
20
20
  tags: [getSlugTag(slug)],
@@ -32,15 +32,19 @@ const getResolvedPage = async (
32
32
  return (page as NonNullable<PAGE_QUERY_RESULT> | null) ?? null
33
33
  }
34
34
 
35
+ type SearchParams = Promise<{ [key: string]: string | string[] | undefined }>
36
+
35
37
  export const generateStaticParams = async () => {
36
- if (!client) return []
38
+ if (!client) return [{ slug: [] }]
37
39
 
38
40
  const slugs =
39
41
  await client.fetch<ALL_PAGE_SLUGS_QUERY_RESULT>(ALL_PAGE_SLUGS_QUERY)
40
42
 
43
+ if (!slugs?.length) return [{ slug: [] }]
44
+
41
45
  return (slugs ?? []).flatMap((page) => {
42
46
  if (!page.slug) return []
43
- return { slug: page.slug.split("/") }
47
+ return page.slug === "/" ? { slug: [] } : { slug: page.slug.split("/") }
44
48
  })
45
49
  }
46
50
 
@@ -56,13 +60,18 @@ export const generateMetadata = async ({ params }: Props) => {
56
60
  : {}
57
61
  }
58
62
 
59
- export default async function CatchAllPage({ params }: Props) {
63
+ export default async function CatchAllPage({
64
+ params,
65
+ searchParams,
66
+ }: Props & {
67
+ searchParams: SearchParams
68
+ }) {
60
69
  const { slug } = await params
61
70
 
62
71
  const path = toPath(slug)
63
72
  const page = await getResolvedPage(path)
64
73
 
65
- if (!page) return notFound()
74
+ if (!page) notFound()
66
75
 
67
- return <PageDocument page={page} path={path} />
76
+ return <PageDocument page={page} path={path} searchParams={searchParams} />
68
77
  }
@@ -1,13 +1,24 @@
1
1
  import { JsonLd } from "@/components/layout/json-ld"
2
2
  import { Wrapper } from "@/components/layout/wrapper"
3
3
  import { SanityVisualEditing } from "@/components/sanity/visual-editing"
4
+ import { getSiteLayoutData } from "@/lib/integrations/sanity/fetchers/layout"
4
5
 
5
- const Layout = async ({ children }: { children: React.ReactNode }) => (
6
- <>
7
- <JsonLd />
8
- <Wrapper>{children}</Wrapper>
9
- <SanityVisualEditing />
10
- </>
11
- )
6
+ const Layout = async ({ children }: { children: React.ReactNode }) => {
7
+ const layoutData = await getSiteLayoutData()
8
+
9
+ return (
10
+ <>
11
+ <JsonLd navbar={layoutData.navbar} companyData={layoutData.companyData} />
12
+ <Wrapper
13
+ navbar={layoutData.navbar}
14
+ footer={layoutData.footer}
15
+ companyData={layoutData.companyData}
16
+ >
17
+ {children}
18
+ </Wrapper>
19
+ <SanityVisualEditing />
20
+ </>
21
+ )
22
+ }
12
23
 
13
24
  export default Layout
@@ -0,0 +1,5 @@
1
+ "use client"
2
+
3
+ export async function refreshAction(): Promise<"refresh"> {
4
+ return "refresh"
5
+ }
@@ -1,7 +1,6 @@
1
- import type { MetadataRoute } from "next";
1
+ import type { MetadataRoute } from "next"
2
2
 
3
- const APP_BASE_URL =
4
- process.env.NEXT_PUBLIC_BASE_URL ?? "http://localhost:3000";
3
+ const APP_BASE_URL = process.env.NEXT_PUBLIC_BASE_URL ?? "http://localhost:3000"
5
4
 
6
5
  export default function robots(): MetadataRoute.Robots {
7
6
  return {
@@ -11,5 +10,5 @@ export default function robots(): MetadataRoute.Robots {
11
10
  disallow: [],
12
11
  },
13
12
  sitemap: `${APP_BASE_URL}/sitemap.xml`,
14
- };
13
+ }
15
14
  }
@@ -94,6 +94,7 @@
94
94
  },
95
95
  "nursery": {
96
96
  "useSortedClasses": {
97
+ "fix": "safe",
97
98
  "level": "warn",
98
99
  "options": {
99
100
  "attributes": ["class", "className"],
@@ -139,6 +140,11 @@
139
140
  "useTemplate": "warn"
140
141
  },
141
142
  "suspicious": {
143
+ "noConsole": {
144
+ "fix": "none",
145
+ "level": "warn",
146
+ "options": { "allow": ["warn", "error", "info"] }
147
+ },
142
148
  "noDebugger": "warn",
143
149
  "noDoubleEquals": "error",
144
150
  "noEmptyBlockStatements": "warn",
@@ -224,6 +230,17 @@
224
230
  }
225
231
  }
226
232
  }
233
+ },
234
+ {
235
+ "includes": ["lib/styles/tokens.css"],
236
+ "linter": {
237
+ "rules": {
238
+ "suspicious": {
239
+ "noDuplicateCustomProperties": "off",
240
+ "noUnknownAtRules": "off"
241
+ }
242
+ }
243
+ }
227
244
  }
228
245
  ],
229
246
  "plugins": [
@@ -1,32 +1,21 @@
1
1
  import { Link } from "@/components/ui/link"
2
2
  import { SanityImage } from "@/components/ui/sanity-image"
3
- import {
4
- type CompanyData,
5
- type FooterData,
6
- getCompanyData,
7
- getFooter,
3
+ import type {
4
+ CompanyData,
5
+ FooterData,
8
6
  } from "@/lib/integrations/sanity/fetchers/layout"
9
7
 
10
8
  type FooterLinkGroup = NonNullable<FooterData["links"]>[number]
11
9
  type FooterLinkItem = NonNullable<FooterLinkGroup["items"]>[number]
12
10
  type SocialLink = NonNullable<CompanyData["socialLinks"]>[number]
13
11
 
14
- export const Footer = async () => {
15
- const [footer, companyData] = await Promise.all([
16
- getFooter(),
17
- getCompanyData(),
18
- ])
19
-
20
- const year = new Date().getFullYear()
21
-
22
- if (!(footer || companyData)) {
23
- return (
24
- <footer className="border-black/10 border-t px-6 py-3">
25
- <p>&copy; {year} Basement</p>
26
- </footer>
27
- )
28
- }
29
-
12
+ export const Footer = ({
13
+ footer,
14
+ companyData,
15
+ }: {
16
+ footer: FooterData | null
17
+ companyData: CompanyData | null
18
+ }) => {
30
19
  const links = footer?.links ?? []
31
20
 
32
21
  return (
@@ -58,7 +47,9 @@ export const Footer = async () => {
58
47
  )}
59
48
 
60
49
  <div className="flex flex-row items-center justify-between gap-3 border-black/10 border-t pt-4">
61
- <p className="w-fit">&copy; {year} Basement</p>
50
+ <p className="w-fit">
51
+ &copy; <CurrentYear /> Basement
52
+ </p>
62
53
 
63
54
  {companyData?.socialLinks && companyData.socialLinks.length > 0 ? (
64
55
  <div className="flex w-fit flex-wrap items-center gap-x-4 gap-y-2">
@@ -93,3 +84,7 @@ export const Footer = async () => {
93
84
  </footer>
94
85
  )
95
86
  }
87
+
88
+ const CurrentYear = () => {
89
+ return <span>{new Date().getFullYear()}</span>
90
+ }
@@ -1,8 +1,6 @@
1
- import { getNavbar } from "@/lib/integrations/sanity/fetchers/layout"
2
-
1
+ import type { NavbarData } from "@/lib/integrations/sanity/fetchers/layout"
3
2
  import { HeaderClient } from "./header-client"
4
3
 
5
- export const Header = async () => {
6
- const navbar = await getNavbar()
7
- return <HeaderClient data={navbar} />
4
+ export const Header = ({ data }: { data: NavbarData | null }) => {
5
+ return <HeaderClient data={data} />
8
6
  }