@nextsparkjs/core 0.1.0-beta.187 → 0.1.0-beta.189

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 (414) hide show
  1. package/dist/components/api/keys/ApiKeyDisplay.js +19 -19
  2. package/dist/components/api/keys/CreateApiKeyDialog.js +21 -21
  3. package/dist/components/app/layouts/PublicNavbar.d.ts.map +1 -1
  4. package/dist/components/app/layouts/PublicNavbar.js +34 -16
  5. package/dist/components/app/misc/ThemeToggle.d.ts.map +1 -1
  6. package/dist/components/app/misc/ThemeToggle.js +3 -4
  7. package/dist/components/auth/SessionCookieRefresher.d.ts +5 -0
  8. package/dist/components/auth/SessionCookieRefresher.d.ts.map +1 -1
  9. package/dist/components/auth/SessionCookieRefresher.js +7 -1
  10. package/dist/components/auth/forms/LoginForm.d.ts.map +1 -1
  11. package/dist/components/auth/forms/LoginForm.js +49 -12
  12. package/dist/components/auth/forms/SignupForm.d.ts.map +1 -1
  13. package/dist/components/auth/forms/SignupForm.js +4 -3
  14. package/dist/components/dashboard/block-editor/block-settings-panel.js +1 -1
  15. package/dist/components/dashboard/block-editor/floating-block-toolbar.js +1 -1
  16. package/dist/components/dashboard/block-editor/sortable-block.js +1 -1
  17. package/dist/components/dashboard/layouts/Sidebar.d.ts.map +1 -1
  18. package/dist/components/dashboard/layouts/Sidebar.js +8 -6
  19. package/dist/components/dashboard/layouts/TopNavbar.d.ts.map +1 -1
  20. package/dist/components/dashboard/layouts/TopNavbar.js +51 -54
  21. package/dist/components/dashboard/misc/NotificationsDropdown.d.ts.map +1 -1
  22. package/dist/components/dashboard/misc/NotificationsDropdown.js +17 -15
  23. package/dist/components/dashboard/misc/SearchDropdown.d.ts.map +1 -1
  24. package/dist/components/dashboard/misc/SearchDropdown.js +19 -22
  25. package/dist/components/dashboard/mobile/MobileBottomNav.js +1 -1
  26. package/dist/components/dashboard/mobile/MobileTopBar.d.ts +10 -1
  27. package/dist/components/dashboard/mobile/MobileTopBar.d.ts.map +1 -1
  28. package/dist/components/dashboard/mobile/MobileTopBar.js +4 -3
  29. package/dist/components/dashboard/navigation/DynamicNavigation.js +5 -5
  30. package/dist/components/devtools/BlockDetailViewer.js +1 -1
  31. package/dist/components/devtools/BlocksViewer.js +1 -1
  32. package/dist/components/entities/EntityChildManager.js +5 -5
  33. package/dist/components/entities/EntityDetailPage.d.ts.map +1 -1
  34. package/dist/components/entities/EntityDetailPage.js +16 -15
  35. package/dist/components/entities/EntityFieldRenderer.d.ts.map +1 -1
  36. package/dist/components/entities/EntityFieldRenderer.js +12 -7
  37. package/dist/components/entities/EntityPageHeader.js +5 -5
  38. package/dist/components/entities/ErrorBoundary.d.ts.map +1 -1
  39. package/dist/components/entities/ErrorBoundary.js +20 -21
  40. package/dist/components/entities/wrappers/EntityDetailWrapper.js +5 -5
  41. package/dist/components/entities/wrappers/EntityFormWrapper.js +2 -2
  42. package/dist/components/entities/wrappers/EntityListWrapper.js +3 -3
  43. package/dist/components/permissions/NoPermission.js +10 -10
  44. package/dist/components/public/pageBuilder/PageRenderer.d.ts.map +1 -1
  45. package/dist/components/public/pageBuilder/PageRenderer.js +2 -1
  46. package/dist/components/settings/SettingsPageSkeleton.js +4 -4
  47. package/dist/components/settings/layouts/SettingsSidebar.js +6 -6
  48. package/dist/components/shared/MultiSelectFilter.d.ts +3 -1
  49. package/dist/components/shared/MultiSelectFilter.d.ts.map +1 -1
  50. package/dist/components/shared/MultiSelectFilter.js +7 -3
  51. package/dist/components/shared/SearchInput.d.ts +2 -0
  52. package/dist/components/shared/SearchInput.d.ts.map +1 -1
  53. package/dist/components/shared/SearchInput.js +64 -6
  54. package/dist/components/ui/address-input.js +18 -18
  55. package/dist/components/ui/audio-upload.js +9 -9
  56. package/dist/components/ui/combobox.d.ts.map +1 -1
  57. package/dist/components/ui/combobox.js +4 -4
  58. package/dist/components/ui/country-select.d.ts.map +1 -1
  59. package/dist/components/ui/country-select.js +3 -3
  60. package/dist/components/ui/currency-select.d.ts.map +1 -1
  61. package/dist/components/ui/currency-select.js +3 -3
  62. package/dist/components/ui/dynamic-icon.d.ts.map +1 -1
  63. package/dist/components/ui/dynamic-icon.js +3 -2
  64. package/dist/components/ui/file-upload.js +7 -7
  65. package/dist/components/ui/image-upload.js +8 -8
  66. package/dist/components/ui/multi-select.d.ts +2 -1
  67. package/dist/components/ui/multi-select.d.ts.map +1 -1
  68. package/dist/components/ui/multi-select.js +4 -3
  69. package/dist/components/ui/phone-input.d.ts.map +1 -1
  70. package/dist/components/ui/phone-input.js +3 -3
  71. package/dist/components/ui/relation-display.js +1 -1
  72. package/dist/components/ui/simple-relation-select.d.ts +2 -1
  73. package/dist/components/ui/simple-relation-select.d.ts.map +1 -1
  74. package/dist/components/ui/simple-relation-select.js +7 -6
  75. package/dist/components/ui/tags-input.d.ts.map +1 -1
  76. package/dist/components/ui/tags-input.js +1 -1
  77. package/dist/components/ui/timezone-select.d.ts.map +1 -1
  78. package/dist/components/ui/timezone-select.js +3 -3
  79. package/dist/components/ui/user-display.js +4 -4
  80. package/dist/components/ui/user-select.d.ts.map +1 -1
  81. package/dist/components/ui/user-select.js +9 -9
  82. package/dist/components/ui/video-upload.js +9 -9
  83. package/dist/contexts/SubscriptionContext.d.ts.map +1 -1
  84. package/dist/contexts/SubscriptionContext.js +5 -1
  85. package/dist/contexts/TeamContext.d.ts.map +1 -1
  86. package/dist/contexts/TeamContext.js +83 -26
  87. package/dist/emails/otp-verification.d.ts.map +1 -1
  88. package/dist/emails/otp-verification.js +3 -2
  89. package/dist/hooks/useAccountPreferencesSync.d.ts +13 -0
  90. package/dist/hooks/useAccountPreferencesSync.d.ts.map +1 -0
  91. package/dist/hooks/useAccountPreferencesSync.js +95 -0
  92. package/dist/hooks/useAuth.d.ts +202 -15
  93. package/dist/hooks/useAuth.d.ts.map +1 -1
  94. package/dist/hooks/useAuth.js +49 -13
  95. package/dist/hooks/useEntityConfig.js +2 -2
  96. package/dist/hooks/useEntitySearch.js +10 -10
  97. package/dist/hooks/useNotifications.js +12 -12
  98. package/dist/hooks/usePrefetch.d.ts.map +1 -1
  99. package/dist/hooks/usePrefetch.js +6 -2
  100. package/dist/hooks/useSearch.js +15 -15
  101. package/dist/hooks/useSessionCookieRefresh.d.ts +18 -1
  102. package/dist/hooks/useSessionCookieRefresh.d.ts.map +1 -1
  103. package/dist/hooks/useSessionCookieRefresh.js +17 -4
  104. package/dist/hooks/useSessionHint.d.ts +12 -0
  105. package/dist/hooks/useSessionHint.d.ts.map +1 -0
  106. package/dist/hooks/useSessionHint.js +15 -0
  107. package/dist/hooks/useTranslationPreload.js +6 -6
  108. package/dist/i18n.d.ts +13 -0
  109. package/dist/i18n.d.ts.map +1 -1
  110. package/dist/i18n.js +2 -27
  111. package/dist/lib/actions/entity.actions.d.ts.map +1 -1
  112. package/dist/lib/actions/entity.actions.js +3 -2
  113. package/dist/lib/api/auth/dual-auth.d.ts +4 -1
  114. package/dist/lib/api/auth/dual-auth.d.ts.map +1 -1
  115. package/dist/lib/api/auth/dual-auth.js +5 -16
  116. package/dist/lib/api/entities.js +33 -33
  117. package/dist/lib/api/keys.d.ts +27 -27
  118. package/dist/lib/api/keys.js +27 -27
  119. package/dist/lib/auth/callback-url.d.ts +11 -0
  120. package/dist/lib/auth/callback-url.d.ts.map +1 -0
  121. package/dist/lib/auth/callback-url.js +14 -0
  122. package/dist/lib/auth/otp-config.d.ts +55 -0
  123. package/dist/lib/auth/otp-config.d.ts.map +1 -0
  124. package/dist/lib/auth/otp-config.js +48 -0
  125. package/dist/lib/auth/registration-helpers.d.ts.map +1 -1
  126. package/dist/lib/auth/registration-helpers.js +3 -1
  127. package/dist/lib/auth/session-hint.d.ts +31 -0
  128. package/dist/lib/auth/session-hint.d.ts.map +1 -0
  129. package/dist/lib/auth/session-hint.js +37 -0
  130. package/dist/lib/auth.d.ts.map +1 -1
  131. package/dist/lib/auth.js +6 -4
  132. package/dist/lib/blocks/loader.d.ts +3 -11
  133. package/dist/lib/blocks/loader.d.ts.map +1 -1
  134. package/dist/lib/blocks/loader.js +1 -9
  135. package/dist/lib/blocks/loader.server.d.ts +18 -0
  136. package/dist/lib/blocks/loader.server.d.ts.map +1 -0
  137. package/dist/lib/blocks/loader.server.js +11 -0
  138. package/dist/lib/blocks/sanitize-html.d.ts +31 -0
  139. package/dist/lib/blocks/sanitize-html.d.ts.map +1 -0
  140. package/dist/lib/blocks/sanitize-html.js +60 -0
  141. package/dist/lib/config/config-sync.d.ts +1 -0
  142. package/dist/lib/config/config-sync.d.ts.map +1 -1
  143. package/dist/lib/config/config-sync.js +4 -1
  144. package/dist/lib/config/types.d.ts +48 -0
  145. package/dist/lib/config/types.d.ts.map +1 -1
  146. package/dist/lib/email/types.d.ts +6 -0
  147. package/dist/lib/email/types.d.ts.map +1 -1
  148. package/dist/lib/entities/serialization.d.ts.map +1 -1
  149. package/dist/lib/entities/serialization.js +3 -6
  150. package/dist/lib/icons.d.ts +12 -0
  151. package/dist/lib/icons.d.ts.map +1 -0
  152. package/dist/lib/icons.js +30 -0
  153. package/dist/lib/locale.d.ts +25 -1
  154. package/dist/lib/locale.d.ts.map +1 -1
  155. package/dist/lib/locale.js +49 -35
  156. package/dist/lib/mcp/engine.js +1 -1
  157. package/dist/lib/mcp/errors.js +17 -17
  158. package/dist/lib/mcp/schema-builder.js +16 -16
  159. package/dist/lib/mcp/tool-generator.js +18 -18
  160. package/dist/lib/search-highlighting.d.ts +7 -0
  161. package/dist/lib/search-highlighting.d.ts.map +1 -1
  162. package/dist/lib/search-highlighting.js +6 -2
  163. package/dist/lib/selectors/core-selectors.d.ts +2 -0
  164. package/dist/lib/selectors/core-selectors.d.ts.map +1 -1
  165. package/dist/lib/selectors/domains/auth.selectors.d.ts +1 -0
  166. package/dist/lib/selectors/domains/auth.selectors.d.ts.map +1 -1
  167. package/dist/lib/selectors/domains/auth.selectors.js +1 -0
  168. package/dist/lib/selectors/domains/entities.selectors.d.ts +2 -0
  169. package/dist/lib/selectors/domains/entities.selectors.d.ts.map +1 -1
  170. package/dist/lib/selectors/domains/entities.selectors.js +2 -0
  171. package/dist/lib/selectors/selectors.d.ts +4 -0
  172. package/dist/lib/selectors/selectors.d.ts.map +1 -1
  173. package/dist/lib/services/block.service.js +1 -1
  174. package/dist/lib/teams/active-team-cookie.d.ts +24 -0
  175. package/dist/lib/teams/active-team-cookie.d.ts.map +1 -0
  176. package/dist/lib/teams/active-team-cookie.js +17 -0
  177. package/dist/lib/teams/dashboard-team.d.ts +20 -0
  178. package/dist/lib/teams/dashboard-team.d.ts.map +1 -0
  179. package/dist/lib/teams/dashboard-team.js +38 -0
  180. package/dist/lib/teams/schema.d.ts.map +1 -1
  181. package/dist/lib/teams/schema.js +1 -1
  182. package/dist/lib/template-resolver.d.ts.map +1 -1
  183. package/dist/lib/template-resolver.js +0 -1
  184. package/dist/lib/theme/get-default-theme-mode.d.ts +7 -4
  185. package/dist/lib/theme/get-default-theme-mode.d.ts.map +1 -1
  186. package/dist/lib/theme/get-default-theme-mode.js +2 -44
  187. package/dist/messages/de/auth.json +4 -2
  188. package/dist/messages/de/common.json +83 -3
  189. package/dist/messages/de/email.json +1 -1
  190. package/dist/messages/de/index.d.ts +87 -0
  191. package/dist/messages/de/index.d.ts.map +1 -1
  192. package/dist/messages/de/settings.json +5 -0
  193. package/dist/messages/en/auth.json +4 -2
  194. package/dist/messages/en/common.json +83 -3
  195. package/dist/messages/en/email.json +1 -1
  196. package/dist/messages/en/index.d.ts +86 -0
  197. package/dist/messages/en/index.d.ts.map +1 -1
  198. package/dist/messages/en/settings.json +4 -0
  199. package/dist/messages/es/auth.json +4 -2
  200. package/dist/messages/es/common.json +83 -3
  201. package/dist/messages/es/email.json +1 -1
  202. package/dist/messages/es/index.d.ts +86 -0
  203. package/dist/messages/es/index.d.ts.map +1 -1
  204. package/dist/messages/es/settings.json +4 -0
  205. package/dist/messages/fr/auth.json +4 -2
  206. package/dist/messages/fr/common.json +83 -3
  207. package/dist/messages/fr/email.json +1 -1
  208. package/dist/messages/fr/index.d.ts +87 -0
  209. package/dist/messages/fr/index.d.ts.map +1 -1
  210. package/dist/messages/fr/settings.json +5 -0
  211. package/dist/messages/it/auth.json +4 -2
  212. package/dist/messages/it/common.json +83 -3
  213. package/dist/messages/it/email.json +1 -1
  214. package/dist/messages/it/index.d.ts +87 -0
  215. package/dist/messages/it/index.d.ts.map +1 -1
  216. package/dist/messages/it/settings.json +5 -0
  217. package/dist/messages/pt/auth.json +4 -2
  218. package/dist/messages/pt/common.json +83 -3
  219. package/dist/messages/pt/email.json +1 -1
  220. package/dist/messages/pt/index.d.ts +87 -0
  221. package/dist/messages/pt/index.d.ts.map +1 -1
  222. package/dist/messages/pt/settings.json +5 -0
  223. package/dist/nextspark-registries.d.ts +54 -0
  224. package/dist/providers/DashboardProviders.d.ts +13 -10
  225. package/dist/providers/DashboardProviders.d.ts.map +1 -1
  226. package/dist/providers/DashboardProviders.js +7 -1
  227. package/dist/templates/app/(auth)/forgot-password/page.tsx +2 -2
  228. package/dist/templates/app/(auth)/reset-password/page.tsx +6 -6
  229. package/dist/templates/app/403/page.tsx +6 -6
  230. package/dist/templates/app/api/v1/teams/switch/route.ts +24 -5
  231. package/dist/templates/app/dashboard/(main)/[entity]/layout.tsx +9 -7
  232. package/dist/templates/app/dashboard/(main)/layout.tsx +4 -3
  233. package/dist/templates/app/dashboard/settings/api-keys/page.tsx +36 -34
  234. package/dist/templates/app/dashboard/settings/profile/page.tsx +7 -6
  235. package/dist/templates/app/dashboard/settings/security/page.tsx +5 -4
  236. package/dist/templates/app/layout.ppr.tsx +8 -8
  237. package/dist/templates/app/layout.tsx +12 -17
  238. package/dist/templates/blocks/cta-section/component.tsx +5 -2
  239. package/dist/templates/blocks/cta-section/config.ts +3 -2
  240. package/dist/templates/blocks/cta-section/fields.ts +2 -2
  241. package/dist/templates/blocks/cta-section/schema.ts +2 -2
  242. package/dist/templates/blocks/features-grid/component.tsx +10 -2
  243. package/dist/templates/blocks/features-grid/config.ts +3 -2
  244. package/dist/templates/blocks/features-grid/fields.ts +2 -2
  245. package/dist/templates/blocks/features-grid/schema.ts +2 -2
  246. package/dist/templates/blocks/hero/component.tsx +6 -3
  247. package/dist/templates/blocks/hero/config.ts +3 -2
  248. package/dist/templates/blocks/hero/fields.ts +2 -2
  249. package/dist/templates/blocks/hero/schema.ts +2 -2
  250. package/dist/templates/blocks/testimonials/component.tsx +6 -3
  251. package/dist/templates/blocks/testimonials/config.ts +3 -2
  252. package/dist/templates/blocks/testimonials/fields.ts +2 -2
  253. package/dist/templates/blocks/testimonials/schema.ts +2 -2
  254. package/dist/templates/blocks/text-content/component.tsx +7 -3
  255. package/dist/templates/blocks/text-content/config.ts +3 -2
  256. package/dist/templates/blocks/text-content/fields.ts +2 -2
  257. package/dist/templates/blocks/text-content/schema.ts +2 -2
  258. package/dist/templates/contents/themes/starter/blocks/cta-section/component.tsx +102 -0
  259. package/dist/templates/contents/themes/starter/blocks/cta-section/config.ts +11 -0
  260. package/dist/templates/contents/themes/starter/blocks/cta-section/fields.ts +89 -0
  261. package/dist/templates/contents/themes/starter/blocks/cta-section/index.ts +6 -0
  262. package/dist/templates/contents/themes/starter/blocks/cta-section/schema.ts +32 -0
  263. package/dist/templates/contents/themes/starter/blocks/cta-section/thumbnail.png +0 -0
  264. package/dist/templates/contents/themes/starter/blocks/features-grid/component.tsx +119 -0
  265. package/dist/templates/contents/themes/starter/blocks/features-grid/config.ts +11 -0
  266. package/dist/templates/contents/themes/starter/blocks/features-grid/fields.ts +97 -0
  267. package/dist/templates/contents/themes/starter/blocks/features-grid/index.ts +6 -0
  268. package/dist/templates/contents/themes/starter/blocks/features-grid/schema.ts +40 -0
  269. package/dist/templates/contents/themes/starter/blocks/features-grid/thumbnail.png +0 -0
  270. package/dist/templates/contents/themes/starter/blocks/hero/component.tsx +105 -0
  271. package/dist/templates/contents/themes/starter/blocks/hero/config.ts +11 -0
  272. package/dist/templates/contents/themes/starter/blocks/hero/fields.ts +60 -0
  273. package/dist/templates/contents/themes/starter/blocks/hero/index.ts +6 -0
  274. package/dist/templates/contents/themes/starter/blocks/hero/schema.ts +33 -0
  275. package/dist/templates/contents/themes/starter/blocks/hero/thumbnail.png +0 -0
  276. package/dist/templates/contents/themes/starter/blocks/testimonials/component.tsx +116 -0
  277. package/dist/templates/contents/themes/starter/blocks/testimonials/config.ts +11 -0
  278. package/dist/templates/contents/themes/starter/blocks/testimonials/fields.ts +105 -0
  279. package/dist/templates/contents/themes/starter/blocks/testimonials/index.ts +6 -0
  280. package/dist/templates/contents/themes/starter/blocks/testimonials/schema.ts +41 -0
  281. package/dist/templates/contents/themes/starter/blocks/testimonials/thumbnail.png +0 -0
  282. package/dist/templates/contents/themes/starter/blocks/text-content/component.tsx +100 -0
  283. package/dist/templates/contents/themes/starter/blocks/text-content/config.ts +11 -0
  284. package/dist/templates/contents/themes/starter/blocks/text-content/fields.ts +88 -0
  285. package/dist/templates/contents/themes/starter/blocks/text-content/index.ts +6 -0
  286. package/dist/templates/contents/themes/starter/blocks/text-content/schema.ts +30 -0
  287. package/dist/templates/contents/themes/starter/blocks/text-content/thumbnail.png +0 -0
  288. package/dist/templates/contents/themes/starter/config/app.config.ts +8 -0
  289. package/dist/templates/contents/themes/starter/entities/tasks/tasks.config.ts +7 -0
  290. package/dist/templates/contents/themes/starter/tests/cypress/e2e/_utils/devtools/access.cy.ts +9 -1
  291. package/dist/templates/contents/themes/starter/tests/cypress/e2e/api/entities/tasks/TaskAPIController.js +2 -2
  292. package/dist/templates/contents/themes/starter/tests/cypress/e2e/uat/entities/tasks/tasks-crud.cy.ts +45 -38
  293. package/dist/templates/contents/themes/starter/tests/cypress/fixtures/entities.json +16 -0
  294. package/dist/templates/contents/themes/starter/tests/cypress/src/components/DevKeyringPOM.ts +3 -1
  295. package/dist/templates/contents/themes/starter/tests/cypress/src/core/BlockEditorBasePOM.ts +3 -3
  296. package/dist/templates/contents/themes/starter/tests/cypress/src/entities/PagesPOM.ts +137 -0
  297. package/dist/templates/contents/themes/starter/tests/cypress/src/entities/index.ts +2 -0
  298. package/dist/templates/contents/themes/starter/tests/cypress/src/index.ts +1 -0
  299. package/dist/templates/contents/themes/starter/tests/cypress/src/session-helpers.ts +42 -11
  300. package/dist/templates/contents/themes/starter/tests/cypress/support/commands.ts +29 -18
  301. package/dist/templates/features/blog/blocks/post-content/component.tsx +5 -1
  302. package/dist/templates/features/blog/blocks/post-content/schema.ts +1 -1
  303. package/dist/templates/features/pages/blocks/hero/component.tsx +3 -0
  304. package/dist/templates/features/pages/blocks/hero/schema.ts +1 -1
  305. package/dist/templates/proxy.ts +138 -53
  306. package/dist/types/blocks.d.ts.map +1 -1
  307. package/dist/types/blocks.js +1 -1
  308. package/dist/types/task.types.d.ts +1 -1
  309. package/dist/types/task.types.js +7 -7
  310. package/dist/utils/dev/TranslationDebugger.js +2 -2
  311. package/package.json +14 -5
  312. package/scripts/build/registry/__tests__/block-registry.test.mjs +73 -0
  313. package/scripts/build/registry/__tests__/icons-discovery.test.mjs +130 -0
  314. package/scripts/build/registry/__tests__/identifier.test.mjs +65 -0
  315. package/scripts/build/registry/__tests__/page-generator.test.mjs +430 -0
  316. package/scripts/build/registry/__tests__/scheduled-actions-registry.test.mjs +41 -0
  317. package/scripts/build/registry/__tests__/template-registry.test.mjs +89 -0
  318. package/scripts/build/registry/discovery/icons.mjs +275 -0
  319. package/scripts/build/registry/discovery/index.mjs +1 -0
  320. package/scripts/build/registry/generators/block-registry.mjs +203 -55
  321. package/scripts/build/registry/generators/feature-registry.mjs +9 -2
  322. package/scripts/build/registry/generators/icon-registry.mjs +56 -0
  323. package/scripts/build/registry/generators/identifier.mjs +28 -0
  324. package/scripts/build/registry/generators/index.mjs +1 -0
  325. package/scripts/build/registry/generators/plugin-registry.mjs +4 -3
  326. package/scripts/build/registry/generators/scheduled-actions-registry.mjs +4 -2
  327. package/scripts/build/registry/generators/template-registry.mjs +49 -41
  328. package/scripts/build/registry/generators/theme-registry.mjs +6 -7
  329. package/scripts/build/registry/post-build/page-generator.mjs +380 -59
  330. package/scripts/build/registry.mjs +9 -1
  331. package/templates/app/(auth)/forgot-password/page.tsx +2 -2
  332. package/templates/app/(auth)/reset-password/page.tsx +6 -6
  333. package/templates/app/403/page.tsx +6 -6
  334. package/templates/app/api/v1/teams/switch/route.ts +24 -5
  335. package/templates/app/dashboard/(main)/[entity]/layout.tsx +9 -7
  336. package/templates/app/dashboard/(main)/layout.tsx +4 -3
  337. package/templates/app/dashboard/settings/api-keys/page.tsx +36 -34
  338. package/templates/app/dashboard/settings/profile/page.tsx +7 -6
  339. package/templates/app/dashboard/settings/security/page.tsx +5 -4
  340. package/templates/app/layout.ppr.tsx +8 -8
  341. package/templates/app/layout.tsx +12 -17
  342. package/templates/blocks/cta-section/component.tsx +5 -2
  343. package/templates/blocks/cta-section/config.ts +3 -2
  344. package/templates/blocks/cta-section/fields.ts +2 -2
  345. package/templates/blocks/cta-section/schema.ts +2 -2
  346. package/templates/blocks/features-grid/component.tsx +10 -2
  347. package/templates/blocks/features-grid/config.ts +3 -2
  348. package/templates/blocks/features-grid/fields.ts +2 -2
  349. package/templates/blocks/features-grid/schema.ts +2 -2
  350. package/templates/blocks/hero/component.tsx +6 -3
  351. package/templates/blocks/hero/config.ts +3 -2
  352. package/templates/blocks/hero/fields.ts +2 -2
  353. package/templates/blocks/hero/schema.ts +2 -2
  354. package/templates/blocks/testimonials/component.tsx +6 -3
  355. package/templates/blocks/testimonials/config.ts +3 -2
  356. package/templates/blocks/testimonials/fields.ts +2 -2
  357. package/templates/blocks/testimonials/schema.ts +2 -2
  358. package/templates/blocks/text-content/component.tsx +7 -3
  359. package/templates/blocks/text-content/config.ts +3 -2
  360. package/templates/blocks/text-content/fields.ts +2 -2
  361. package/templates/blocks/text-content/schema.ts +2 -2
  362. package/templates/contents/themes/starter/blocks/cta-section/component.tsx +102 -0
  363. package/templates/contents/themes/starter/blocks/cta-section/config.ts +11 -0
  364. package/templates/contents/themes/starter/blocks/cta-section/fields.ts +89 -0
  365. package/templates/contents/themes/starter/blocks/cta-section/index.ts +6 -0
  366. package/templates/contents/themes/starter/blocks/cta-section/schema.ts +32 -0
  367. package/templates/contents/themes/starter/blocks/cta-section/thumbnail.png +0 -0
  368. package/templates/contents/themes/starter/blocks/features-grid/component.tsx +119 -0
  369. package/templates/contents/themes/starter/blocks/features-grid/config.ts +11 -0
  370. package/templates/contents/themes/starter/blocks/features-grid/fields.ts +97 -0
  371. package/templates/contents/themes/starter/blocks/features-grid/index.ts +6 -0
  372. package/templates/contents/themes/starter/blocks/features-grid/schema.ts +40 -0
  373. package/templates/contents/themes/starter/blocks/features-grid/thumbnail.png +0 -0
  374. package/templates/contents/themes/starter/blocks/hero/component.tsx +105 -0
  375. package/templates/contents/themes/starter/blocks/hero/config.ts +11 -0
  376. package/templates/contents/themes/starter/blocks/hero/fields.ts +60 -0
  377. package/templates/contents/themes/starter/blocks/hero/index.ts +6 -0
  378. package/templates/contents/themes/starter/blocks/hero/schema.ts +33 -0
  379. package/templates/contents/themes/starter/blocks/hero/thumbnail.png +0 -0
  380. package/templates/contents/themes/starter/blocks/testimonials/component.tsx +116 -0
  381. package/templates/contents/themes/starter/blocks/testimonials/config.ts +11 -0
  382. package/templates/contents/themes/starter/blocks/testimonials/fields.ts +105 -0
  383. package/templates/contents/themes/starter/blocks/testimonials/index.ts +6 -0
  384. package/templates/contents/themes/starter/blocks/testimonials/schema.ts +41 -0
  385. package/templates/contents/themes/starter/blocks/testimonials/thumbnail.png +0 -0
  386. package/templates/contents/themes/starter/blocks/text-content/component.tsx +100 -0
  387. package/templates/contents/themes/starter/blocks/text-content/config.ts +11 -0
  388. package/templates/contents/themes/starter/blocks/text-content/fields.ts +88 -0
  389. package/templates/contents/themes/starter/blocks/text-content/index.ts +6 -0
  390. package/templates/contents/themes/starter/blocks/text-content/schema.ts +30 -0
  391. package/templates/contents/themes/starter/blocks/text-content/thumbnail.png +0 -0
  392. package/templates/contents/themes/starter/config/app.config.ts +8 -0
  393. package/templates/contents/themes/starter/entities/tasks/tasks.config.ts +7 -0
  394. package/templates/contents/themes/starter/tests/cypress/e2e/_utils/devtools/access.cy.ts +9 -1
  395. package/templates/contents/themes/starter/tests/cypress/e2e/api/entities/tasks/TaskAPIController.js +2 -2
  396. package/templates/contents/themes/starter/tests/cypress/e2e/uat/entities/tasks/tasks-crud.cy.ts +45 -38
  397. package/templates/contents/themes/starter/tests/cypress/fixtures/entities.json +16 -0
  398. package/templates/contents/themes/starter/tests/cypress/src/components/DevKeyringPOM.ts +3 -1
  399. package/templates/contents/themes/starter/tests/cypress/src/core/BlockEditorBasePOM.ts +3 -3
  400. package/templates/contents/themes/starter/tests/cypress/src/entities/PagesPOM.ts +137 -0
  401. package/templates/contents/themes/starter/tests/cypress/src/entities/index.ts +2 -0
  402. package/templates/contents/themes/starter/tests/cypress/src/index.ts +1 -0
  403. package/templates/contents/themes/starter/tests/cypress/src/session-helpers.ts +42 -11
  404. package/templates/contents/themes/starter/tests/cypress/support/commands.ts +29 -18
  405. package/templates/features/blog/blocks/post-content/component.tsx +5 -1
  406. package/templates/features/blog/blocks/post-content/schema.ts +1 -1
  407. package/templates/features/pages/blocks/hero/component.tsx +3 -0
  408. package/templates/features/pages/blocks/hero/schema.ts +1 -1
  409. package/templates/proxy.ts +138 -53
  410. package/tests/jest/__mocks__/@nextsparkjs/registries/block-registry.client.ts +9 -0
  411. package/tests/jest/__mocks__/@nextsparkjs/registries/block-registry.lazy.ts +5 -0
  412. package/tests/jest/__mocks__/@nextsparkjs/registries/icon-registry.ts +42 -0
  413. package/tests/jest/__mocks__/next-intl-server.js +85 -5
  414. package/tests/jest/__mocks__/next-server.js +32 -0
@@ -62,7 +62,7 @@ import {
62
62
  import { profileSchema, ProfileFormData } from '@nextsparkjs/core/lib/validation'
63
63
  import { countries, timezones } from '@nextsparkjs/core/lib/countries-timezones'
64
64
  import { sel } from '@nextsparkjs/core/selectors'
65
- import { useTranslations } from 'next-intl'
65
+ import { useLocale, useTranslations } from 'next-intl'
66
66
  import { getTemplateOrDefaultClient } from '@nextsparkjs/registries/template-registry.client'
67
67
 
68
68
  // Language options
@@ -82,6 +82,7 @@ function ProfilePage() {
82
82
  const [timezoneOpen, setTimezoneOpen] = useState(false)
83
83
  const [countryOpen, setCountryOpen] = useState(false)
84
84
  const t = useTranslations('settings')
85
+ const locale = useLocale()
85
86
 
86
87
  // Form setup
87
88
  const {
@@ -450,9 +451,9 @@ function ProfilePage() {
450
451
  </PopoverTrigger>
451
452
  <PopoverContent className="w-[400px] p-0">
452
453
  <Command>
453
- <CommandInput placeholder="Buscar país..." className="h-9" />
454
+ <CommandInput placeholder={t('profile.form.countrySearchPlaceholder')} className="h-9" />
454
455
  <CommandList>
455
- <CommandEmpty>No se encontraron países.</CommandEmpty>
456
+ <CommandEmpty>{t('profile.form.countryNotFound')}</CommandEmpty>
456
457
  <CommandGroup>
457
458
  {countries.map((country) => (
458
459
  <CommandItem
@@ -502,9 +503,9 @@ function ProfilePage() {
502
503
  </PopoverTrigger>
503
504
  <PopoverContent className="w-[400px] p-0">
504
505
  <Command>
505
- <CommandInput placeholder="Buscar timezone..." className="h-9" />
506
+ <CommandInput placeholder={t('profile.form.timezoneSearchPlaceholder')} className="h-9" />
506
507
  <CommandList>
507
- <CommandEmpty>No se encontraron timezones.</CommandEmpty>
508
+ <CommandEmpty>{t('profile.form.timezoneNotFound')}</CommandEmpty>
508
509
  <CommandGroup>
509
510
  {timezones.map((timezone) => (
510
511
  <CommandItem
@@ -540,7 +541,7 @@ function ProfilePage() {
540
541
  <Calendar className="h-4 w-4" />
541
542
  <span className="font-medium">{t('profile.form.memberSince')}:</span>
542
543
  <span>
543
- {profile && new Date(profile.createdAt).toLocaleDateString('es-ES', {
544
+ {profile && new Date(profile.createdAt).toLocaleDateString(locale, {
544
545
  month: 'long',
545
546
  day: 'numeric',
546
547
  year: 'numeric'
@@ -39,6 +39,7 @@ import { getTemplateOrDefaultClient } from '@nextsparkjs/registries/template-reg
39
39
 
40
40
  function SecurityPage() {
41
41
  const t = useTranslations('settings')
42
+ const tCommon = useTranslations('common')
42
43
 
43
44
  // Hook para manejar user metadata con autenticación de sesión
44
45
  const {
@@ -79,7 +80,7 @@ function SecurityPage() {
79
80
  browser: 'Chrome 120',
80
81
  location: 'Buenos Aires, Argentina',
81
82
  ip: '192.168.1.100',
82
- lastActive: '2 minutos atrás',
83
+ lastActive: tCommon('relativeTime.minutesAgo', { minutes: 2 }),
83
84
  current: true,
84
85
  icon: <Monitor className="h-4 w-4" />
85
86
  },
@@ -89,7 +90,7 @@ function SecurityPage() {
89
90
  browser: 'Safari Mobile',
90
91
  location: 'Buenos Aires, Argentina',
91
92
  ip: '192.168.1.101',
92
- lastActive: '1 hora atrás',
93
+ lastActive: tCommon('relativeTime.hoursAgo', { hours: 1 }),
93
94
  current: false,
94
95
  icon: <Smartphone className="h-4 w-4" />
95
96
  },
@@ -99,7 +100,7 @@ function SecurityPage() {
99
100
  browser: 'Chrome 119',
100
101
  location: 'Córdoba, Argentina',
101
102
  ip: '200.45.123.45',
102
- lastActive: '3 días atrás',
103
+ lastActive: tCommon('relativeTime.daysAgo', { days: 3 }),
103
104
  current: false,
104
105
  icon: <Globe className="h-4 w-4" />
105
106
  }
@@ -126,7 +127,7 @@ function SecurityPage() {
126
127
  {
127
128
  id: '3',
128
129
  success: false,
129
- location: 'Madrid, España',
130
+ location: 'Madrid, Spain',
130
131
  device: 'Unknown - Chrome',
131
132
  timestamp: '2024-01-14 22:15:00',
132
133
  ip: '85.123.45.67'
@@ -27,10 +27,9 @@ import "./globals.css"
27
27
  import { getBillingResourceHints } from "@nextsparkjs/core/lib/billing/gateways/factory"
28
28
  import { StaticIntlProvider } from "@nextsparkjs/core/providers/static-intl-provider"
29
29
  import { QueryProvider } from "@nextsparkjs/core/providers/query-provider"
30
+ import { SessionCookieRefresher } from "@nextsparkjs/core/components/auth/SessionCookieRefresher"
30
31
  import { ThemeProvider as NextThemeProvider } from "@nextsparkjs/core/providers/theme-provider"
31
32
  import { ThemeProvider as CustomThemeProvider } from "@nextsparkjs/core/lib/theme/ThemeProvider"
32
- import { TeamProvider } from "@nextsparkjs/core/contexts/TeamContext"
33
- import { SubscriptionProvider } from "@nextsparkjs/core/contexts/SubscriptionContext"
34
33
  import { Toaster } from "@nextsparkjs/core/components/ui/sonner"
35
34
  import { getMetadataOrDefault } from '@nextsparkjs/core/lib/template-resolver'
36
35
  import { DEFAULT_LOCALE, DEFAULT_THEME_MODE, STATIC_MESSAGES } from '@nextsparkjs/registries/translation-registry'
@@ -88,13 +87,14 @@ export default async function RootLayout({
88
87
  disableTransitionOnChange
89
88
  >
90
89
  <CustomThemeProvider>
90
+ {/* TeamProvider and SubscriptionProvider are mounted by DashboardProviders in the
91
+ dashboard, superadmin and devtools layouts, not here: on a public page they
92
+ would fetch a signed-in visitor's teams and subscription and re-sync the
93
+ activeTeamId cookie for nothing. */}
91
94
  <QueryProvider>
92
- <TeamProvider>
93
- <SubscriptionProvider>
94
- <main>{children}</main>
95
- <Suspense><Toaster position="bottom-left" /></Suspense>
96
- </SubscriptionProvider>
97
- </TeamProvider>
95
+ <main>{children}</main>
96
+ <SessionCookieRefresher />
97
+ <Suspense><Toaster position="bottom-left" /></Suspense>
98
98
  </QueryProvider>
99
99
  </CustomThemeProvider>
100
100
  </NextThemeProvider>
@@ -16,8 +16,6 @@ import { ThemeProvider as NextThemeProvider } from "@nextsparkjs/core/providers/
16
16
  import { ThemeProvider as CustomThemeProvider } from "@nextsparkjs/core/lib/theme/ThemeProvider"
17
17
  import { Toaster } from "@nextsparkjs/core/components/ui/sonner"
18
18
  import { QueryProvider } from "@nextsparkjs/core/providers/query-provider"
19
- import { TeamProvider } from "@nextsparkjs/core/contexts/TeamContext"
20
- import { SubscriptionProvider } from "@nextsparkjs/core/contexts/SubscriptionContext"
21
19
  import { getUserLocale } from '@nextsparkjs/core/lib/locale'
22
20
  import { TranslationContextManager } from "@nextsparkjs/core/providers/TranslationContextManager"
23
21
  import { SessionCookieRefresher } from "@nextsparkjs/core/components/auth/SessionCookieRefresher"
@@ -97,22 +95,19 @@ export default async function RootLayout({
97
95
  disableTransitionOnChange
98
96
  >
99
97
  <CustomThemeProvider>
100
- {/* Team providers live here (not only in DashboardProviders) so the activeTeamId
101
- cookie is synced from any route, matching layout.ppr.tsx — see #115.
102
- DashboardProviders skips re-mounting them when already present. */}
98
+ {/* TeamProvider and SubscriptionProvider are mounted by DashboardProviders in the
99
+ dashboard, superadmin and devtools layouts, not here: on a public page they
100
+ would fetch a signed-in visitor's teams and subscription and re-sync the
101
+ activeTeamId cookie for nothing. */}
103
102
  <QueryProvider>
104
- <TeamProvider>
105
- <SubscriptionProvider>
106
- <TranslationContextManager />
107
- {/* Real session-cookie renewal for installed PWAs: the render-time
108
- session reads above (getUserLocale/getThemeSettings) cannot
109
- write cookies, so the rolling refresh is triggered from the
110
- client through the auth Route Handler instead. */}
111
- <SessionCookieRefresher />
112
- <main>{children}</main>
113
- <Suspense><Toaster position="bottom-left" /></Suspense>
114
- </SubscriptionProvider>
115
- </TeamProvider>
103
+ <TranslationContextManager />
104
+ {/* Real session-cookie renewal for installed PWAs: the render-time
105
+ session reads above (getUserLocale/getThemeSettings) cannot
106
+ write cookies, so the rolling refresh is triggered from the
107
+ client through the auth Route Handler instead. */}
108
+ <SessionCookieRefresher />
109
+ <main>{children}</main>
110
+ <Suspense><Toaster position="bottom-left" /></Suspense>
116
111
  </QueryProvider>
117
112
  </CustomThemeProvider>
118
113
  </NextThemeProvider>
@@ -1,6 +1,6 @@
1
1
  import React from 'react'
2
- import { Button } from '@/core/components/ui/button'
3
- import { buildSectionClasses } from '@/core/types/blocks'
2
+ import { Button } from '@nextsparkjs/core/components/ui/button'
3
+ import { buildSectionClasses } from '@nextsparkjs/core/types/blocks'
4
4
  import type { CTASectionBlockProps } from './schema'
5
5
 
6
6
  /**
@@ -97,3 +97,6 @@ export function CTASectionBlock({
97
97
  </section>
98
98
  )
99
99
  }
100
+
101
+ // The generated block registry imports this as the module's default.
102
+ export default CTASectionBlock
@@ -1,4 +1,4 @@
1
- import type { BlockConfig } from '@/core/types/blocks'
1
+ import type { BlockConfig } from '@nextsparkjs/core/types/blocks'
2
2
 
3
3
  export const config: Omit<BlockConfig, 'schema' | 'fieldDefinitions' | 'Component' | 'examples'> = {
4
4
  slug: 'cta-section',
@@ -6,5 +6,6 @@ export const config: Omit<BlockConfig, 'schema' | 'fieldDefinitions' | 'Componen
6
6
  description: 'Call-to-action section with title, description, and action buttons',
7
7
  category: 'cta',
8
8
  icon: 'Megaphone',
9
- thumbnail: '/theme/blocks/cta-section/thumbnail.png'
9
+ thumbnail: '/theme/blocks/cta-section/thumbnail.png',
10
+ scope: ['pages']
10
11
  }
@@ -1,9 +1,9 @@
1
- import type { FieldDefinition } from '@/core/types/blocks'
1
+ import type { FieldDefinition } from '@nextsparkjs/core/types/blocks'
2
2
  import {
3
3
  baseContentFields,
4
4
  baseDesignFields,
5
5
  baseAdvancedFields,
6
- } from '@/core/types/blocks'
6
+ } from '@nextsparkjs/core/types/blocks'
7
7
 
8
8
  /**
9
9
  * CTA Section Block Field Definitions
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod'
2
- import { baseBlockSchema, ctaSchema } from '@/core/types/blocks'
2
+ import { baseBlockSchema, ctaSchema } from '@nextsparkjs/core/types/blocks'
3
3
 
4
4
  /**
5
5
  * Secondary Button Schema (CTA-specific)
@@ -27,6 +27,6 @@ export const ctaSectionSpecificSchema = z.object({
27
27
  /**
28
28
  * Complete CTA Section Block Schema
29
29
  */
30
- export const schema = baseBlockSchema.merge(ctaSectionSpecificSchema)
30
+ export const schema = baseBlockSchema.extend(ctaSectionSpecificSchema.shape)
31
31
 
32
32
  export type CTASectionBlockProps = z.infer<typeof schema>
@@ -1,7 +1,12 @@
1
1
  import React from 'react'
2
+ // Icon names come from page content, so there is no build-time set to import
3
+ // from the way entity and sidebar icons have (see core's lib/icons). lucide's
4
+ // by-name loader resolves them, but it declares a chunk per icon and that map
5
+ // lands in webpack's runtime, which every route in the app pays for — to spare
6
+ // the few that render this block.
2
7
  import * as Icons from 'lucide-react'
3
- import { cn } from '@/core/lib/utils'
4
- import { buildSectionClasses } from '@/core/types/blocks'
8
+ import { cn } from '@nextsparkjs/core/lib/utils'
9
+ import { buildSectionClasses } from '@nextsparkjs/core/types/blocks'
5
10
  import type { FeaturesGridBlockProps, FeatureItem } from './schema'
6
11
 
7
12
  /**
@@ -109,3 +114,6 @@ export function FeaturesGridBlock({
109
114
  </section>
110
115
  )
111
116
  }
117
+
118
+ // The generated block registry imports this as the module's default.
119
+ export default FeaturesGridBlock
@@ -1,4 +1,4 @@
1
- import type { BlockConfig } from '@/core/types/blocks'
1
+ import type { BlockConfig } from '@nextsparkjs/core/types/blocks'
2
2
 
3
3
  export const config: Omit<BlockConfig, 'schema' | 'fieldDefinitions' | 'Component' | 'examples'> = {
4
4
  slug: 'features-grid',
@@ -6,5 +6,6 @@ export const config: Omit<BlockConfig, 'schema' | 'fieldDefinitions' | 'Componen
6
6
  description: 'Grid layout displaying multiple features with icons, titles, and descriptions',
7
7
  category: 'content',
8
8
  icon: 'Grid',
9
- thumbnail: '/theme/blocks/features-grid/thumbnail.png'
9
+ thumbnail: '/theme/blocks/features-grid/thumbnail.png',
10
+ scope: ['pages']
10
11
  }
@@ -1,9 +1,9 @@
1
- import type { FieldDefinition } from '@/core/types/blocks'
1
+ import type { FieldDefinition } from '@nextsparkjs/core/types/blocks'
2
2
  import {
3
3
  baseContentFields,
4
4
  baseDesignFields,
5
5
  baseAdvancedFields,
6
- } from '@/core/types/blocks'
6
+ } from '@nextsparkjs/core/types/blocks'
7
7
 
8
8
  /**
9
9
  * Features Grid Block Field Definitions
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod'
2
- import { baseBlockSchema } from '@/core/types/blocks'
2
+ import { baseBlockSchema } from '@nextsparkjs/core/types/blocks'
3
3
 
4
4
  /**
5
5
  * Feature Item Schema
@@ -35,6 +35,6 @@ export const featuresGridSpecificSchema = z.object({
35
35
  /**
36
36
  * Complete Features Grid Block Schema
37
37
  */
38
- export const schema = baseBlockSchema.merge(featuresGridSpecificSchema)
38
+ export const schema = baseBlockSchema.extend(featuresGridSpecificSchema.shape)
39
39
 
40
40
  export type FeaturesGridBlockProps = z.infer<typeof schema>
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
- import { Button } from '@/core/components/ui/button'
3
- import { cn } from '@/core/lib/utils'
4
- import { buildSectionClasses, resolveMediaUrl } from '@/core/types/blocks'
2
+ import { Button } from '@nextsparkjs/core/components/ui/button'
3
+ import { cn } from '@nextsparkjs/core/lib/utils'
4
+ import { buildSectionClasses, resolveMediaUrl } from '@nextsparkjs/core/types/blocks'
5
5
  import type { HeroBlockProps } from './schema'
6
6
 
7
7
  /**
@@ -100,3 +100,6 @@ export function HeroBlock({
100
100
  </section>
101
101
  )
102
102
  }
103
+
104
+ // The generated block registry imports this as the module's default.
105
+ export default HeroBlock
@@ -1,4 +1,4 @@
1
- import type { BlockConfig } from '@/core/types/blocks'
1
+ import type { BlockConfig } from '@nextsparkjs/core/types/blocks'
2
2
 
3
3
  export const config: Omit<BlockConfig, 'schema' | 'fieldDefinitions' | 'Component' | 'examples'> = {
4
4
  slug: 'hero',
@@ -6,5 +6,6 @@ export const config: Omit<BlockConfig, 'schema' | 'fieldDefinitions' | 'Componen
6
6
  description: 'Full-width hero section with title, subtitle, CTA button, and background image',
7
7
  category: 'hero',
8
8
  icon: 'Rocket',
9
- thumbnail: '/theme/blocks/hero/thumbnail.png'
9
+ thumbnail: '/theme/blocks/hero/thumbnail.png',
10
+ scope: ['pages', 'posts']
10
11
  }
@@ -1,9 +1,9 @@
1
- import type { FieldDefinition } from '@/core/types/blocks'
1
+ import type { FieldDefinition } from '@nextsparkjs/core/types/blocks'
2
2
  import {
3
3
  baseContentFields,
4
4
  baseDesignFields,
5
5
  baseAdvancedFields,
6
- } from '@/core/types/blocks'
6
+ } from '@nextsparkjs/core/types/blocks'
7
7
 
8
8
  /**
9
9
  * Hero Block Field Definitions
@@ -3,7 +3,7 @@ import {
3
3
  baseBlockSchema,
4
4
  mediaRefSchema,
5
5
  type BaseBlockProps,
6
- } from '@/core/types/blocks'
6
+ } from '@nextsparkjs/core/types/blocks'
7
7
 
8
8
  /**
9
9
  * Hero Block Schema
@@ -25,7 +25,7 @@ export const heroSpecificSchema = z.object({
25
25
  * Complete Hero Block Schema
26
26
  * Combines base fields + hero-specific fields
27
27
  */
28
- export const schema = baseBlockSchema.merge(heroSpecificSchema)
28
+ export const schema = baseBlockSchema.extend(heroSpecificSchema.shape)
29
29
 
30
30
  export type HeroBlockProps = z.infer<typeof schema>
31
31
 
@@ -1,8 +1,8 @@
1
1
  import React from 'react'
2
2
  import { Quote } from 'lucide-react'
3
- import { Avatar, AvatarFallback, AvatarImage } from '@/core/components/ui/avatar'
4
- import { cn } from '@/core/lib/utils'
5
- import { buildSectionClasses, resolveMediaUrl } from '@/core/types/blocks'
3
+ import { Avatar, AvatarFallback, AvatarImage } from '@nextsparkjs/core/components/ui/avatar'
4
+ import { cn } from '@nextsparkjs/core/lib/utils'
5
+ import { buildSectionClasses, resolveMediaUrl } from '@nextsparkjs/core/types/blocks'
6
6
  import type { TestimonialsBlockProps, TestimonialItem } from './schema'
7
7
 
8
8
  /**
@@ -111,3 +111,6 @@ export function TestimonialsBlock({
111
111
  </section>
112
112
  )
113
113
  }
114
+
115
+ // The generated block registry imports this as the module's default.
116
+ export default TestimonialsBlock
@@ -1,4 +1,4 @@
1
- import type { BlockConfig } from '@/core/types/blocks'
1
+ import type { BlockConfig } from '@nextsparkjs/core/types/blocks'
2
2
 
3
3
  export const config: Omit<BlockConfig, 'schema' | 'fieldDefinitions' | 'Component' | 'examples'> = {
4
4
  slug: 'testimonials',
@@ -6,5 +6,6 @@ export const config: Omit<BlockConfig, 'schema' | 'fieldDefinitions' | 'Componen
6
6
  description: 'Display customer testimonials with quotes, authors, and avatars',
7
7
  category: 'testimonials',
8
8
  icon: 'Quote',
9
- thumbnail: '/theme/blocks/testimonials/thumbnail.png'
9
+ thumbnail: '/theme/blocks/testimonials/thumbnail.png',
10
+ scope: ['pages']
10
11
  }
@@ -1,9 +1,9 @@
1
- import type { FieldDefinition } from '@/core/types/blocks'
1
+ import type { FieldDefinition } from '@nextsparkjs/core/types/blocks'
2
2
  import {
3
3
  baseContentFields,
4
4
  baseDesignFields,
5
5
  baseAdvancedFields,
6
- } from '@/core/types/blocks'
6
+ } from '@nextsparkjs/core/types/blocks'
7
7
 
8
8
  /**
9
9
  * Testimonials Block Field Definitions
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod'
2
- import { baseBlockSchema, mediaRefSchema } from '@/core/types/blocks'
2
+ import { baseBlockSchema, mediaRefSchema } from '@nextsparkjs/core/types/blocks'
3
3
 
4
4
  /**
5
5
  * Testimonial Item Schema
@@ -36,6 +36,6 @@ export const testimonialsSpecificSchema = z.object({
36
36
  /**
37
37
  * Complete Testimonials Block Schema
38
38
  */
39
- export const schema = baseBlockSchema.merge(testimonialsSpecificSchema)
39
+ export const schema = baseBlockSchema.extend(testimonialsSpecificSchema.shape)
40
40
 
41
41
  export type TestimonialsBlockProps = z.infer<typeof schema>
@@ -1,6 +1,7 @@
1
1
  import React from 'react'
2
- import { cn } from '@/core/lib/utils'
3
- import { buildSectionClasses } from '@/core/types/blocks'
2
+ import { cn } from '@nextsparkjs/core/lib/utils'
3
+ import { buildSectionClasses } from '@nextsparkjs/core/types/blocks'
4
+ import { sanitizeBlockHtml } from '@nextsparkjs/core/lib/blocks/sanitize-html'
4
5
  import type { TextContentBlockProps } from './schema'
5
6
 
6
7
  /**
@@ -70,7 +71,7 @@ export function TextContentBlock({
70
71
  maxWidthClasses[maxWidth],
71
72
  alignmentClasses[alignment]
72
73
  )}
73
- dangerouslySetInnerHTML={{ __html: content }}
74
+ dangerouslySetInnerHTML={{ __html: sanitizeBlockHtml(content) }}
74
75
  />
75
76
 
76
77
  {/* Optional CTA */}
@@ -94,3 +95,6 @@ export function TextContentBlock({
94
95
  </section>
95
96
  )
96
97
  }
98
+
99
+ // The generated block registry imports this as the module's default.
100
+ export default TextContentBlock
@@ -1,4 +1,4 @@
1
- import type { BlockConfig } from '@/core/types/blocks'
1
+ import type { BlockConfig } from '@nextsparkjs/core/types/blocks'
2
2
 
3
3
  export const config: Omit<BlockConfig, 'schema' | 'fieldDefinitions' | 'Component' | 'examples'> = {
4
4
  slug: 'text-content',
@@ -6,5 +6,6 @@ export const config: Omit<BlockConfig, 'schema' | 'fieldDefinitions' | 'Componen
6
6
  description: 'Rich text content block for paragraphs, lists, and formatted text',
7
7
  category: 'content',
8
8
  icon: 'FileText',
9
- thumbnail: '/theme/blocks/text-content/thumbnail.png'
9
+ thumbnail: '/theme/blocks/text-content/thumbnail.png',
10
+ scope: ['pages']
10
11
  }
@@ -1,9 +1,9 @@
1
- import type { FieldDefinition } from '@/core/types/blocks'
1
+ import type { FieldDefinition } from '@nextsparkjs/core/types/blocks'
2
2
  import {
3
3
  baseContentFields,
4
4
  baseDesignFields,
5
5
  baseAdvancedFields,
6
- } from '@/core/types/blocks'
6
+ } from '@nextsparkjs/core/types/blocks'
7
7
 
8
8
  /**
9
9
  * Text Content Block Field Definitions
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod'
2
- import { baseBlockSchema } from '@/core/types/blocks'
2
+ import { baseBlockSchema } from '@nextsparkjs/core/types/blocks'
3
3
 
4
4
  /**
5
5
  * Text Content Block Schema
@@ -25,6 +25,6 @@ export const textContentSpecificSchema = z.object({
25
25
  * Complete Text Content Block Schema
26
26
  * Note: textContentSpecificSchema.content overrides baseBlockSchema.content
27
27
  */
28
- export const schema = baseBlockSchema.merge(textContentSpecificSchema)
28
+ export const schema = baseBlockSchema.extend(textContentSpecificSchema.shape)
29
29
 
30
30
  export type TextContentBlockProps = z.infer<typeof schema>
@@ -0,0 +1,102 @@
1
+ import React from 'react'
2
+ import { Button } from '@nextsparkjs/core/components/ui/button'
3
+ import { buildSectionClasses } from '@nextsparkjs/core/types/blocks'
4
+ import type { CTASectionBlockProps } from './schema'
5
+
6
+ /**
7
+ * CTA Section Block Component
8
+ *
9
+ * Props from 3-tab structure:
10
+ * - Content: title, content, cta (primary), secondaryButton
11
+ * - Design: backgroundColor
12
+ * - Advanced: className, id
13
+ */
14
+ export function CTASectionBlock({
15
+ // Base content props
16
+ title,
17
+ content,
18
+ cta,
19
+ // CTA-specific content
20
+ secondaryButton,
21
+ // Base design props
22
+ backgroundColor,
23
+ // Base advanced props
24
+ className,
25
+ id,
26
+ // Legacy props for backward compatibility
27
+ ...legacyProps
28
+ }: CTASectionBlockProps & {
29
+ buttonText?: string
30
+ buttonLink?: string
31
+ primaryButton?: { text: string; link: string; variant?: string }
32
+ description?: string
33
+ }) {
34
+ // Handle legacy format (buttonText/buttonLink or primaryButton)
35
+ const primaryCta = cta || (legacyProps.primaryButton ? {
36
+ text: legacyProps.primaryButton.text,
37
+ link: legacyProps.primaryButton.link,
38
+ target: '_self' as const,
39
+ } : legacyProps.buttonText ? {
40
+ text: legacyProps.buttonText,
41
+ link: legacyProps.buttonLink || '#',
42
+ target: '_self' as const,
43
+ } : undefined)
44
+
45
+ // Handle legacy description prop
46
+ const displayContent = content || (legacyProps as { description?: string }).description
47
+
48
+ // Build section classes with background and custom className
49
+ const sectionClasses = buildSectionClasses(
50
+ 'py-16 px-4 @md:py-24',
51
+ { backgroundColor, className }
52
+ )
53
+
54
+ return (
55
+ <section id={id} className={sectionClasses} data-cy="block-cta-section">
56
+ <div className="container mx-auto max-w-4xl text-center">
57
+ {title && (
58
+ <h2 className="mb-4 text-4xl font-bold @md:text-5xl">{title}</h2>
59
+ )}
60
+
61
+ {displayContent && (
62
+ <p className="mb-8 text-lg @md:text-xl opacity-90">{displayContent}</p>
63
+ )}
64
+
65
+ {(primaryCta || secondaryButton) && (
66
+ <div className="flex flex-col gap-4 @sm:flex-row @sm:justify-center">
67
+ {primaryCta && (
68
+ <Button asChild size="lg">
69
+ <a
70
+ href={primaryCta.link}
71
+ target={primaryCta.target}
72
+ rel={primaryCta.target === '_blank' ? 'noopener noreferrer' : undefined}
73
+ >
74
+ {primaryCta.text}
75
+ </a>
76
+ </Button>
77
+ )}
78
+
79
+ {secondaryButton && (
80
+ <Button
81
+ asChild
82
+ size="lg"
83
+ variant={secondaryButton.variant || 'outline'}
84
+ >
85
+ <a
86
+ href={secondaryButton.link}
87
+ target={secondaryButton.target}
88
+ rel={secondaryButton.target === '_blank' ? 'noopener noreferrer' : undefined}
89
+ >
90
+ {secondaryButton.text}
91
+ </a>
92
+ </Button>
93
+ )}
94
+ </div>
95
+ )}
96
+ </div>
97
+ </section>
98
+ )
99
+ }
100
+
101
+ // The generated block registry imports this as the module's default.
102
+ export default CTASectionBlock
@@ -0,0 +1,11 @@
1
+ import type { BlockConfig } from '@nextsparkjs/core/types/blocks'
2
+
3
+ export const config: Omit<BlockConfig, 'schema' | 'fieldDefinitions' | 'Component' | 'examples'> = {
4
+ slug: 'cta-section',
5
+ name: 'CTA Section',
6
+ description: 'Call-to-action section with title, description, and action buttons',
7
+ category: 'cta',
8
+ icon: 'Megaphone',
9
+ thumbnail: '/theme/blocks/cta-section/thumbnail.png',
10
+ scope: ['pages']
11
+ }