@nextsparkjs/core 0.1.0-beta.188 → 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 (412) 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.js +2 -2
  27. package/dist/components/dashboard/navigation/DynamicNavigation.js +5 -5
  28. package/dist/components/devtools/BlockDetailViewer.js +1 -1
  29. package/dist/components/devtools/BlocksViewer.js +1 -1
  30. package/dist/components/entities/EntityChildManager.js +5 -5
  31. package/dist/components/entities/EntityDetailPage.d.ts.map +1 -1
  32. package/dist/components/entities/EntityDetailPage.js +16 -15
  33. package/dist/components/entities/EntityFieldRenderer.d.ts.map +1 -1
  34. package/dist/components/entities/EntityFieldRenderer.js +12 -7
  35. package/dist/components/entities/EntityPageHeader.js +5 -5
  36. package/dist/components/entities/ErrorBoundary.d.ts.map +1 -1
  37. package/dist/components/entities/ErrorBoundary.js +20 -21
  38. package/dist/components/entities/wrappers/EntityDetailWrapper.js +5 -5
  39. package/dist/components/entities/wrappers/EntityFormWrapper.js +2 -2
  40. package/dist/components/entities/wrappers/EntityListWrapper.js +3 -3
  41. package/dist/components/permissions/NoPermission.js +10 -10
  42. package/dist/components/public/pageBuilder/PageRenderer.d.ts.map +1 -1
  43. package/dist/components/public/pageBuilder/PageRenderer.js +2 -1
  44. package/dist/components/settings/SettingsPageSkeleton.js +4 -4
  45. package/dist/components/settings/layouts/SettingsSidebar.js +6 -6
  46. package/dist/components/shared/MultiSelectFilter.d.ts +3 -1
  47. package/dist/components/shared/MultiSelectFilter.d.ts.map +1 -1
  48. package/dist/components/shared/MultiSelectFilter.js +7 -3
  49. package/dist/components/shared/SearchInput.d.ts +2 -0
  50. package/dist/components/shared/SearchInput.d.ts.map +1 -1
  51. package/dist/components/shared/SearchInput.js +64 -6
  52. package/dist/components/ui/address-input.js +18 -18
  53. package/dist/components/ui/audio-upload.js +9 -9
  54. package/dist/components/ui/combobox.d.ts.map +1 -1
  55. package/dist/components/ui/combobox.js +4 -4
  56. package/dist/components/ui/country-select.d.ts.map +1 -1
  57. package/dist/components/ui/country-select.js +3 -3
  58. package/dist/components/ui/currency-select.d.ts.map +1 -1
  59. package/dist/components/ui/currency-select.js +3 -3
  60. package/dist/components/ui/dynamic-icon.d.ts.map +1 -1
  61. package/dist/components/ui/dynamic-icon.js +3 -2
  62. package/dist/components/ui/file-upload.js +7 -7
  63. package/dist/components/ui/image-upload.js +8 -8
  64. package/dist/components/ui/multi-select.d.ts +2 -1
  65. package/dist/components/ui/multi-select.d.ts.map +1 -1
  66. package/dist/components/ui/multi-select.js +4 -3
  67. package/dist/components/ui/phone-input.d.ts.map +1 -1
  68. package/dist/components/ui/phone-input.js +3 -3
  69. package/dist/components/ui/relation-display.js +1 -1
  70. package/dist/components/ui/simple-relation-select.d.ts +2 -1
  71. package/dist/components/ui/simple-relation-select.d.ts.map +1 -1
  72. package/dist/components/ui/simple-relation-select.js +7 -6
  73. package/dist/components/ui/tags-input.d.ts.map +1 -1
  74. package/dist/components/ui/tags-input.js +1 -1
  75. package/dist/components/ui/timezone-select.d.ts.map +1 -1
  76. package/dist/components/ui/timezone-select.js +3 -3
  77. package/dist/components/ui/user-display.js +4 -4
  78. package/dist/components/ui/user-select.d.ts.map +1 -1
  79. package/dist/components/ui/user-select.js +9 -9
  80. package/dist/components/ui/video-upload.js +9 -9
  81. package/dist/contexts/SubscriptionContext.d.ts.map +1 -1
  82. package/dist/contexts/SubscriptionContext.js +5 -1
  83. package/dist/contexts/TeamContext.d.ts.map +1 -1
  84. package/dist/contexts/TeamContext.js +83 -26
  85. package/dist/emails/otp-verification.d.ts.map +1 -1
  86. package/dist/emails/otp-verification.js +3 -2
  87. package/dist/hooks/useAccountPreferencesSync.d.ts +13 -0
  88. package/dist/hooks/useAccountPreferencesSync.d.ts.map +1 -0
  89. package/dist/hooks/useAccountPreferencesSync.js +95 -0
  90. package/dist/hooks/useAuth.d.ts +202 -15
  91. package/dist/hooks/useAuth.d.ts.map +1 -1
  92. package/dist/hooks/useAuth.js +49 -13
  93. package/dist/hooks/useEntityConfig.js +2 -2
  94. package/dist/hooks/useEntitySearch.js +10 -10
  95. package/dist/hooks/useNotifications.js +12 -12
  96. package/dist/hooks/usePrefetch.d.ts.map +1 -1
  97. package/dist/hooks/usePrefetch.js +6 -2
  98. package/dist/hooks/useSearch.js +15 -15
  99. package/dist/hooks/useSessionCookieRefresh.d.ts +18 -1
  100. package/dist/hooks/useSessionCookieRefresh.d.ts.map +1 -1
  101. package/dist/hooks/useSessionCookieRefresh.js +17 -4
  102. package/dist/hooks/useSessionHint.d.ts +12 -0
  103. package/dist/hooks/useSessionHint.d.ts.map +1 -0
  104. package/dist/hooks/useSessionHint.js +15 -0
  105. package/dist/hooks/useTranslationPreload.js +6 -6
  106. package/dist/i18n.d.ts +13 -0
  107. package/dist/i18n.d.ts.map +1 -1
  108. package/dist/i18n.js +2 -27
  109. package/dist/lib/actions/entity.actions.d.ts.map +1 -1
  110. package/dist/lib/actions/entity.actions.js +3 -2
  111. package/dist/lib/api/auth/dual-auth.d.ts +4 -1
  112. package/dist/lib/api/auth/dual-auth.d.ts.map +1 -1
  113. package/dist/lib/api/auth/dual-auth.js +5 -16
  114. package/dist/lib/api/entities.js +33 -33
  115. package/dist/lib/api/keys.d.ts +27 -27
  116. package/dist/lib/api/keys.js +27 -27
  117. package/dist/lib/auth/callback-url.d.ts +11 -0
  118. package/dist/lib/auth/callback-url.d.ts.map +1 -0
  119. package/dist/lib/auth/callback-url.js +14 -0
  120. package/dist/lib/auth/otp-config.d.ts +55 -0
  121. package/dist/lib/auth/otp-config.d.ts.map +1 -0
  122. package/dist/lib/auth/otp-config.js +48 -0
  123. package/dist/lib/auth/registration-helpers.d.ts.map +1 -1
  124. package/dist/lib/auth/registration-helpers.js +3 -1
  125. package/dist/lib/auth/session-hint.d.ts +31 -0
  126. package/dist/lib/auth/session-hint.d.ts.map +1 -0
  127. package/dist/lib/auth/session-hint.js +37 -0
  128. package/dist/lib/auth.d.ts.map +1 -1
  129. package/dist/lib/auth.js +6 -4
  130. package/dist/lib/blocks/loader.d.ts +3 -11
  131. package/dist/lib/blocks/loader.d.ts.map +1 -1
  132. package/dist/lib/blocks/loader.js +1 -9
  133. package/dist/lib/blocks/loader.server.d.ts +18 -0
  134. package/dist/lib/blocks/loader.server.d.ts.map +1 -0
  135. package/dist/lib/blocks/loader.server.js +11 -0
  136. package/dist/lib/blocks/sanitize-html.d.ts +31 -0
  137. package/dist/lib/blocks/sanitize-html.d.ts.map +1 -0
  138. package/dist/lib/blocks/sanitize-html.js +60 -0
  139. package/dist/lib/config/config-sync.d.ts +1 -0
  140. package/dist/lib/config/config-sync.d.ts.map +1 -1
  141. package/dist/lib/config/config-sync.js +4 -1
  142. package/dist/lib/config/types.d.ts +48 -0
  143. package/dist/lib/config/types.d.ts.map +1 -1
  144. package/dist/lib/email/types.d.ts +6 -0
  145. package/dist/lib/email/types.d.ts.map +1 -1
  146. package/dist/lib/entities/serialization.d.ts.map +1 -1
  147. package/dist/lib/entities/serialization.js +3 -6
  148. package/dist/lib/icons.d.ts +12 -0
  149. package/dist/lib/icons.d.ts.map +1 -0
  150. package/dist/lib/icons.js +30 -0
  151. package/dist/lib/locale.d.ts +25 -1
  152. package/dist/lib/locale.d.ts.map +1 -1
  153. package/dist/lib/locale.js +49 -35
  154. package/dist/lib/mcp/engine.js +1 -1
  155. package/dist/lib/mcp/errors.js +17 -17
  156. package/dist/lib/mcp/schema-builder.js +16 -16
  157. package/dist/lib/mcp/tool-generator.js +18 -18
  158. package/dist/lib/search-highlighting.d.ts +7 -0
  159. package/dist/lib/search-highlighting.d.ts.map +1 -1
  160. package/dist/lib/search-highlighting.js +6 -2
  161. package/dist/lib/selectors/core-selectors.d.ts +2 -0
  162. package/dist/lib/selectors/core-selectors.d.ts.map +1 -1
  163. package/dist/lib/selectors/domains/auth.selectors.d.ts +1 -0
  164. package/dist/lib/selectors/domains/auth.selectors.d.ts.map +1 -1
  165. package/dist/lib/selectors/domains/auth.selectors.js +1 -0
  166. package/dist/lib/selectors/domains/entities.selectors.d.ts +2 -0
  167. package/dist/lib/selectors/domains/entities.selectors.d.ts.map +1 -1
  168. package/dist/lib/selectors/domains/entities.selectors.js +2 -0
  169. package/dist/lib/selectors/selectors.d.ts +4 -0
  170. package/dist/lib/selectors/selectors.d.ts.map +1 -1
  171. package/dist/lib/services/block.service.js +1 -1
  172. package/dist/lib/teams/active-team-cookie.d.ts +24 -0
  173. package/dist/lib/teams/active-team-cookie.d.ts.map +1 -0
  174. package/dist/lib/teams/active-team-cookie.js +17 -0
  175. package/dist/lib/teams/dashboard-team.d.ts +20 -0
  176. package/dist/lib/teams/dashboard-team.d.ts.map +1 -0
  177. package/dist/lib/teams/dashboard-team.js +38 -0
  178. package/dist/lib/teams/schema.d.ts.map +1 -1
  179. package/dist/lib/teams/schema.js +1 -1
  180. package/dist/lib/template-resolver.d.ts.map +1 -1
  181. package/dist/lib/template-resolver.js +0 -1
  182. package/dist/lib/theme/get-default-theme-mode.d.ts +7 -4
  183. package/dist/lib/theme/get-default-theme-mode.d.ts.map +1 -1
  184. package/dist/lib/theme/get-default-theme-mode.js +2 -44
  185. package/dist/messages/de/auth.json +4 -2
  186. package/dist/messages/de/common.json +83 -3
  187. package/dist/messages/de/email.json +1 -1
  188. package/dist/messages/de/index.d.ts +87 -0
  189. package/dist/messages/de/index.d.ts.map +1 -1
  190. package/dist/messages/de/settings.json +5 -0
  191. package/dist/messages/en/auth.json +4 -2
  192. package/dist/messages/en/common.json +83 -3
  193. package/dist/messages/en/email.json +1 -1
  194. package/dist/messages/en/index.d.ts +86 -0
  195. package/dist/messages/en/index.d.ts.map +1 -1
  196. package/dist/messages/en/settings.json +4 -0
  197. package/dist/messages/es/auth.json +4 -2
  198. package/dist/messages/es/common.json +83 -3
  199. package/dist/messages/es/email.json +1 -1
  200. package/dist/messages/es/index.d.ts +86 -0
  201. package/dist/messages/es/index.d.ts.map +1 -1
  202. package/dist/messages/es/settings.json +4 -0
  203. package/dist/messages/fr/auth.json +4 -2
  204. package/dist/messages/fr/common.json +83 -3
  205. package/dist/messages/fr/email.json +1 -1
  206. package/dist/messages/fr/index.d.ts +87 -0
  207. package/dist/messages/fr/index.d.ts.map +1 -1
  208. package/dist/messages/fr/settings.json +5 -0
  209. package/dist/messages/it/auth.json +4 -2
  210. package/dist/messages/it/common.json +83 -3
  211. package/dist/messages/it/email.json +1 -1
  212. package/dist/messages/it/index.d.ts +87 -0
  213. package/dist/messages/it/index.d.ts.map +1 -1
  214. package/dist/messages/it/settings.json +5 -0
  215. package/dist/messages/pt/auth.json +4 -2
  216. package/dist/messages/pt/common.json +83 -3
  217. package/dist/messages/pt/email.json +1 -1
  218. package/dist/messages/pt/index.d.ts +87 -0
  219. package/dist/messages/pt/index.d.ts.map +1 -1
  220. package/dist/messages/pt/settings.json +5 -0
  221. package/dist/nextspark-registries.d.ts +54 -0
  222. package/dist/providers/DashboardProviders.d.ts +13 -10
  223. package/dist/providers/DashboardProviders.d.ts.map +1 -1
  224. package/dist/providers/DashboardProviders.js +7 -1
  225. package/dist/templates/app/(auth)/forgot-password/page.tsx +2 -2
  226. package/dist/templates/app/(auth)/reset-password/page.tsx +6 -6
  227. package/dist/templates/app/403/page.tsx +6 -6
  228. package/dist/templates/app/api/v1/teams/switch/route.ts +24 -5
  229. package/dist/templates/app/dashboard/(main)/[entity]/layout.tsx +9 -7
  230. package/dist/templates/app/dashboard/(main)/layout.tsx +4 -3
  231. package/dist/templates/app/dashboard/settings/api-keys/page.tsx +36 -34
  232. package/dist/templates/app/dashboard/settings/profile/page.tsx +7 -6
  233. package/dist/templates/app/dashboard/settings/security/page.tsx +5 -4
  234. package/dist/templates/app/layout.ppr.tsx +8 -8
  235. package/dist/templates/app/layout.tsx +12 -17
  236. package/dist/templates/blocks/cta-section/component.tsx +5 -2
  237. package/dist/templates/blocks/cta-section/config.ts +3 -2
  238. package/dist/templates/blocks/cta-section/fields.ts +2 -2
  239. package/dist/templates/blocks/cta-section/schema.ts +2 -2
  240. package/dist/templates/blocks/features-grid/component.tsx +10 -2
  241. package/dist/templates/blocks/features-grid/config.ts +3 -2
  242. package/dist/templates/blocks/features-grid/fields.ts +2 -2
  243. package/dist/templates/blocks/features-grid/schema.ts +2 -2
  244. package/dist/templates/blocks/hero/component.tsx +6 -3
  245. package/dist/templates/blocks/hero/config.ts +3 -2
  246. package/dist/templates/blocks/hero/fields.ts +2 -2
  247. package/dist/templates/blocks/hero/schema.ts +2 -2
  248. package/dist/templates/blocks/testimonials/component.tsx +6 -3
  249. package/dist/templates/blocks/testimonials/config.ts +3 -2
  250. package/dist/templates/blocks/testimonials/fields.ts +2 -2
  251. package/dist/templates/blocks/testimonials/schema.ts +2 -2
  252. package/dist/templates/blocks/text-content/component.tsx +7 -3
  253. package/dist/templates/blocks/text-content/config.ts +3 -2
  254. package/dist/templates/blocks/text-content/fields.ts +2 -2
  255. package/dist/templates/blocks/text-content/schema.ts +2 -2
  256. package/dist/templates/contents/themes/starter/blocks/cta-section/component.tsx +102 -0
  257. package/dist/templates/contents/themes/starter/blocks/cta-section/config.ts +11 -0
  258. package/dist/templates/contents/themes/starter/blocks/cta-section/fields.ts +89 -0
  259. package/dist/templates/contents/themes/starter/blocks/cta-section/index.ts +6 -0
  260. package/dist/templates/contents/themes/starter/blocks/cta-section/schema.ts +32 -0
  261. package/dist/templates/contents/themes/starter/blocks/cta-section/thumbnail.png +0 -0
  262. package/dist/templates/contents/themes/starter/blocks/features-grid/component.tsx +119 -0
  263. package/dist/templates/contents/themes/starter/blocks/features-grid/config.ts +11 -0
  264. package/dist/templates/contents/themes/starter/blocks/features-grid/fields.ts +97 -0
  265. package/dist/templates/contents/themes/starter/blocks/features-grid/index.ts +6 -0
  266. package/dist/templates/contents/themes/starter/blocks/features-grid/schema.ts +40 -0
  267. package/dist/templates/contents/themes/starter/blocks/features-grid/thumbnail.png +0 -0
  268. package/dist/templates/contents/themes/starter/blocks/hero/component.tsx +105 -0
  269. package/dist/templates/contents/themes/starter/blocks/hero/config.ts +11 -0
  270. package/dist/templates/contents/themes/starter/blocks/hero/fields.ts +60 -0
  271. package/dist/templates/contents/themes/starter/blocks/hero/index.ts +6 -0
  272. package/dist/templates/contents/themes/starter/blocks/hero/schema.ts +33 -0
  273. package/dist/templates/contents/themes/starter/blocks/hero/thumbnail.png +0 -0
  274. package/dist/templates/contents/themes/starter/blocks/testimonials/component.tsx +116 -0
  275. package/dist/templates/contents/themes/starter/blocks/testimonials/config.ts +11 -0
  276. package/dist/templates/contents/themes/starter/blocks/testimonials/fields.ts +105 -0
  277. package/dist/templates/contents/themes/starter/blocks/testimonials/index.ts +6 -0
  278. package/dist/templates/contents/themes/starter/blocks/testimonials/schema.ts +41 -0
  279. package/dist/templates/contents/themes/starter/blocks/testimonials/thumbnail.png +0 -0
  280. package/dist/templates/contents/themes/starter/blocks/text-content/component.tsx +100 -0
  281. package/dist/templates/contents/themes/starter/blocks/text-content/config.ts +11 -0
  282. package/dist/templates/contents/themes/starter/blocks/text-content/fields.ts +88 -0
  283. package/dist/templates/contents/themes/starter/blocks/text-content/index.ts +6 -0
  284. package/dist/templates/contents/themes/starter/blocks/text-content/schema.ts +30 -0
  285. package/dist/templates/contents/themes/starter/blocks/text-content/thumbnail.png +0 -0
  286. package/dist/templates/contents/themes/starter/config/app.config.ts +8 -0
  287. package/dist/templates/contents/themes/starter/entities/tasks/tasks.config.ts +7 -0
  288. package/dist/templates/contents/themes/starter/tests/cypress/e2e/_utils/devtools/access.cy.ts +9 -1
  289. package/dist/templates/contents/themes/starter/tests/cypress/e2e/api/entities/tasks/TaskAPIController.js +2 -2
  290. package/dist/templates/contents/themes/starter/tests/cypress/e2e/uat/entities/tasks/tasks-crud.cy.ts +45 -38
  291. package/dist/templates/contents/themes/starter/tests/cypress/fixtures/entities.json +16 -0
  292. package/dist/templates/contents/themes/starter/tests/cypress/src/components/DevKeyringPOM.ts +3 -1
  293. package/dist/templates/contents/themes/starter/tests/cypress/src/core/BlockEditorBasePOM.ts +3 -3
  294. package/dist/templates/contents/themes/starter/tests/cypress/src/entities/PagesPOM.ts +137 -0
  295. package/dist/templates/contents/themes/starter/tests/cypress/src/entities/index.ts +2 -0
  296. package/dist/templates/contents/themes/starter/tests/cypress/src/index.ts +1 -0
  297. package/dist/templates/contents/themes/starter/tests/cypress/src/session-helpers.ts +42 -11
  298. package/dist/templates/contents/themes/starter/tests/cypress/support/commands.ts +29 -18
  299. package/dist/templates/features/blog/blocks/post-content/component.tsx +5 -1
  300. package/dist/templates/features/blog/blocks/post-content/schema.ts +1 -1
  301. package/dist/templates/features/pages/blocks/hero/component.tsx +3 -0
  302. package/dist/templates/features/pages/blocks/hero/schema.ts +1 -1
  303. package/dist/templates/proxy.ts +138 -53
  304. package/dist/types/blocks.d.ts.map +1 -1
  305. package/dist/types/blocks.js +1 -1
  306. package/dist/types/task.types.d.ts +1 -1
  307. package/dist/types/task.types.js +7 -7
  308. package/dist/utils/dev/TranslationDebugger.js +2 -2
  309. package/package.json +14 -5
  310. package/scripts/build/registry/__tests__/block-registry.test.mjs +73 -0
  311. package/scripts/build/registry/__tests__/icons-discovery.test.mjs +130 -0
  312. package/scripts/build/registry/__tests__/identifier.test.mjs +65 -0
  313. package/scripts/build/registry/__tests__/page-generator.test.mjs +430 -0
  314. package/scripts/build/registry/__tests__/scheduled-actions-registry.test.mjs +41 -0
  315. package/scripts/build/registry/__tests__/template-registry.test.mjs +89 -0
  316. package/scripts/build/registry/discovery/icons.mjs +275 -0
  317. package/scripts/build/registry/discovery/index.mjs +1 -0
  318. package/scripts/build/registry/generators/block-registry.mjs +203 -55
  319. package/scripts/build/registry/generators/feature-registry.mjs +9 -2
  320. package/scripts/build/registry/generators/icon-registry.mjs +56 -0
  321. package/scripts/build/registry/generators/identifier.mjs +28 -0
  322. package/scripts/build/registry/generators/index.mjs +1 -0
  323. package/scripts/build/registry/generators/plugin-registry.mjs +4 -3
  324. package/scripts/build/registry/generators/scheduled-actions-registry.mjs +4 -2
  325. package/scripts/build/registry/generators/template-registry.mjs +49 -41
  326. package/scripts/build/registry/generators/theme-registry.mjs +6 -7
  327. package/scripts/build/registry/post-build/page-generator.mjs +380 -59
  328. package/scripts/build/registry.mjs +9 -1
  329. package/templates/app/(auth)/forgot-password/page.tsx +2 -2
  330. package/templates/app/(auth)/reset-password/page.tsx +6 -6
  331. package/templates/app/403/page.tsx +6 -6
  332. package/templates/app/api/v1/teams/switch/route.ts +24 -5
  333. package/templates/app/dashboard/(main)/[entity]/layout.tsx +9 -7
  334. package/templates/app/dashboard/(main)/layout.tsx +4 -3
  335. package/templates/app/dashboard/settings/api-keys/page.tsx +36 -34
  336. package/templates/app/dashboard/settings/profile/page.tsx +7 -6
  337. package/templates/app/dashboard/settings/security/page.tsx +5 -4
  338. package/templates/app/layout.ppr.tsx +8 -8
  339. package/templates/app/layout.tsx +12 -17
  340. package/templates/blocks/cta-section/component.tsx +5 -2
  341. package/templates/blocks/cta-section/config.ts +3 -2
  342. package/templates/blocks/cta-section/fields.ts +2 -2
  343. package/templates/blocks/cta-section/schema.ts +2 -2
  344. package/templates/blocks/features-grid/component.tsx +10 -2
  345. package/templates/blocks/features-grid/config.ts +3 -2
  346. package/templates/blocks/features-grid/fields.ts +2 -2
  347. package/templates/blocks/features-grid/schema.ts +2 -2
  348. package/templates/blocks/hero/component.tsx +6 -3
  349. package/templates/blocks/hero/config.ts +3 -2
  350. package/templates/blocks/hero/fields.ts +2 -2
  351. package/templates/blocks/hero/schema.ts +2 -2
  352. package/templates/blocks/testimonials/component.tsx +6 -3
  353. package/templates/blocks/testimonials/config.ts +3 -2
  354. package/templates/blocks/testimonials/fields.ts +2 -2
  355. package/templates/blocks/testimonials/schema.ts +2 -2
  356. package/templates/blocks/text-content/component.tsx +7 -3
  357. package/templates/blocks/text-content/config.ts +3 -2
  358. package/templates/blocks/text-content/fields.ts +2 -2
  359. package/templates/blocks/text-content/schema.ts +2 -2
  360. package/templates/contents/themes/starter/blocks/cta-section/component.tsx +102 -0
  361. package/templates/contents/themes/starter/blocks/cta-section/config.ts +11 -0
  362. package/templates/contents/themes/starter/blocks/cta-section/fields.ts +89 -0
  363. package/templates/contents/themes/starter/blocks/cta-section/index.ts +6 -0
  364. package/templates/contents/themes/starter/blocks/cta-section/schema.ts +32 -0
  365. package/templates/contents/themes/starter/blocks/cta-section/thumbnail.png +0 -0
  366. package/templates/contents/themes/starter/blocks/features-grid/component.tsx +119 -0
  367. package/templates/contents/themes/starter/blocks/features-grid/config.ts +11 -0
  368. package/templates/contents/themes/starter/blocks/features-grid/fields.ts +97 -0
  369. package/templates/contents/themes/starter/blocks/features-grid/index.ts +6 -0
  370. package/templates/contents/themes/starter/blocks/features-grid/schema.ts +40 -0
  371. package/templates/contents/themes/starter/blocks/features-grid/thumbnail.png +0 -0
  372. package/templates/contents/themes/starter/blocks/hero/component.tsx +105 -0
  373. package/templates/contents/themes/starter/blocks/hero/config.ts +11 -0
  374. package/templates/contents/themes/starter/blocks/hero/fields.ts +60 -0
  375. package/templates/contents/themes/starter/blocks/hero/index.ts +6 -0
  376. package/templates/contents/themes/starter/blocks/hero/schema.ts +33 -0
  377. package/templates/contents/themes/starter/blocks/hero/thumbnail.png +0 -0
  378. package/templates/contents/themes/starter/blocks/testimonials/component.tsx +116 -0
  379. package/templates/contents/themes/starter/blocks/testimonials/config.ts +11 -0
  380. package/templates/contents/themes/starter/blocks/testimonials/fields.ts +105 -0
  381. package/templates/contents/themes/starter/blocks/testimonials/index.ts +6 -0
  382. package/templates/contents/themes/starter/blocks/testimonials/schema.ts +41 -0
  383. package/templates/contents/themes/starter/blocks/testimonials/thumbnail.png +0 -0
  384. package/templates/contents/themes/starter/blocks/text-content/component.tsx +100 -0
  385. package/templates/contents/themes/starter/blocks/text-content/config.ts +11 -0
  386. package/templates/contents/themes/starter/blocks/text-content/fields.ts +88 -0
  387. package/templates/contents/themes/starter/blocks/text-content/index.ts +6 -0
  388. package/templates/contents/themes/starter/blocks/text-content/schema.ts +30 -0
  389. package/templates/contents/themes/starter/blocks/text-content/thumbnail.png +0 -0
  390. package/templates/contents/themes/starter/config/app.config.ts +8 -0
  391. package/templates/contents/themes/starter/entities/tasks/tasks.config.ts +7 -0
  392. package/templates/contents/themes/starter/tests/cypress/e2e/_utils/devtools/access.cy.ts +9 -1
  393. package/templates/contents/themes/starter/tests/cypress/e2e/api/entities/tasks/TaskAPIController.js +2 -2
  394. package/templates/contents/themes/starter/tests/cypress/e2e/uat/entities/tasks/tasks-crud.cy.ts +45 -38
  395. package/templates/contents/themes/starter/tests/cypress/fixtures/entities.json +16 -0
  396. package/templates/contents/themes/starter/tests/cypress/src/components/DevKeyringPOM.ts +3 -1
  397. package/templates/contents/themes/starter/tests/cypress/src/core/BlockEditorBasePOM.ts +3 -3
  398. package/templates/contents/themes/starter/tests/cypress/src/entities/PagesPOM.ts +137 -0
  399. package/templates/contents/themes/starter/tests/cypress/src/entities/index.ts +2 -0
  400. package/templates/contents/themes/starter/tests/cypress/src/index.ts +1 -0
  401. package/templates/contents/themes/starter/tests/cypress/src/session-helpers.ts +42 -11
  402. package/templates/contents/themes/starter/tests/cypress/support/commands.ts +29 -18
  403. package/templates/features/blog/blocks/post-content/component.tsx +5 -1
  404. package/templates/features/blog/blocks/post-content/schema.ts +1 -1
  405. package/templates/features/pages/blocks/hero/component.tsx +3 -0
  406. package/templates/features/pages/blocks/hero/schema.ts +1 -1
  407. package/templates/proxy.ts +138 -53
  408. package/tests/jest/__mocks__/@nextsparkjs/registries/block-registry.client.ts +9 -0
  409. package/tests/jest/__mocks__/@nextsparkjs/registries/block-registry.lazy.ts +5 -0
  410. package/tests/jest/__mocks__/@nextsparkjs/registries/icon-registry.ts +42 -0
  411. package/tests/jest/__mocks__/next-intl-server.js +85 -5
  412. package/tests/jest/__mocks__/next-server.js +32 -0
@@ -1,6 +1,7 @@
1
1
  "use client";
2
2
 
3
3
  import { useState } from 'react';
4
+ import { useLocale } from 'next-intl';
4
5
  import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';
5
6
  import { Button } from '@nextsparkjs/core/components/ui/button';
6
7
  import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@nextsparkjs/core/components/ui/card';
@@ -66,6 +67,7 @@ function ApiKeysPage() {
66
67
  const [newApiKey, setNewApiKey] = useState<NewApiKeyResponse | null>(null);
67
68
  const [selectedKey, setSelectedKey] = useState<string | null>(null);
68
69
  const queryClient = useQueryClient();
70
+ const locale = useLocale();
69
71
 
70
72
  // Fetch API keys
71
73
  const { data: apiKeys, isLoading, error } = useQuery<ApiKey[]>({
@@ -138,7 +140,7 @@ function ApiKeysPage() {
138
140
  };
139
141
 
140
142
  const formatDate = (dateString: string) => {
141
- return new Date(dateString).toLocaleDateString('es-ES', {
143
+ return new Date(dateString).toLocaleDateString(locale, {
142
144
  year: 'numeric',
143
145
  month: 'short',
144
146
  day: 'numeric',
@@ -162,7 +164,7 @@ function ApiKeysPage() {
162
164
  <div>
163
165
  <h1 className="text-2xl font-bold">API Keys</h1>
164
166
  <p className="text-muted-foreground">
165
- Gestiona las API keys para integración externa
167
+ Manage API keys for external integration
166
168
  </p>
167
169
  </div>
168
170
  <Alert variant={isPermissionError ? "default" : "destructive"}>
@@ -170,10 +172,10 @@ function ApiKeysPage() {
170
172
  <AlertDescription>
171
173
  {isPermissionError ? (
172
174
  <div>
173
- <strong>Acceso restringido</strong>
175
+ <strong>Restricted access</strong>
174
176
  <p className="mt-1">
175
- Solo los administradores pueden gestionar API keys.
176
- Contacta a un administrador si necesitas acceso a esta funcionalidad.
177
+ Only administrators can manage API keys.
178
+ Contact an administrator if you need access to this feature.
177
179
  </p>
178
180
  </div>
179
181
  ) : (
@@ -191,12 +193,12 @@ function ApiKeysPage() {
191
193
  <div>
192
194
  <h1 className="text-2xl font-bold" data-cy={sel('settings.apiKeys.header')}>API Keys</h1>
193
195
  <p className="text-muted-foreground">
194
- Gestiona las API keys para integración externa
196
+ Manage API keys for external integration
195
197
  </p>
196
198
  </div>
197
199
  <Button onClick={() => setShowCreateDialog(true)} data-cy={sel('settings.apiKeys.createButton')}>
198
200
  <Plus className="h-4 w-4 mr-2" />
199
- Crear API Key
201
+ Create API Key
200
202
  </Button>
201
203
  </div>
202
204
 
@@ -239,11 +241,11 @@ function ApiKeysPage() {
239
241
  <Key className="h-12 w-12 text-muted-foreground mb-4" />
240
242
  <h3 className="text-lg font-semibold mb-2">No API Keys</h3>
241
243
  <p className="text-muted-foreground text-center mb-4">
242
- No tienes API keys creadas. Crea una para empezar a usar la API externa.
244
+ You don&apos;t have any API keys yet. Create one to start using the external API.
243
245
  </p>
244
246
  <Button onClick={() => setShowCreateDialog(true)} data-cy={sel('settings.apiKeys.createButton')}>
245
247
  <Plus className="h-4 w-4 mr-2" />
246
- Crear primera API Key
248
+ Create first API Key
247
249
  </Button>
248
250
  </CardContent>
249
251
  </Card>
@@ -257,7 +259,7 @@ function ApiKeysPage() {
257
259
  {apiKey.name}
258
260
  {apiKey.status !== 'active' && (
259
261
  <Badge variant="secondary" data-cy={sel('settings.apiKeys.row.status', { id: apiKey.id })}>
260
- {apiKey.status === 'inactive' ? 'Inactiva' : 'Expirada'}
262
+ {apiKey.status === 'inactive' ? 'Inactive' : 'Expired'}
261
263
  </Badge>
262
264
  )}
263
265
  </CardTitle>
@@ -276,7 +278,7 @@ function ApiKeysPage() {
276
278
  </div>
277
279
  <div className="flex items-center gap-2">
278
280
  <Badge variant={apiKey.status === 'active' ? "default" : "secondary"} data-cy={sel('settings.apiKeys.row.status', { id: apiKey.id })}>
279
- {apiKey.status === 'active' ? 'Activa' : apiKey.status === 'inactive' ? 'Inactiva' : 'Expirada'}
281
+ {apiKey.status === 'active' ? 'Active' : apiKey.status === 'inactive' ? 'Inactive' : 'Expired'}
280
282
  </Badge>
281
283
  <DropdownMenu>
282
284
  <DropdownMenuTrigger asChild>
@@ -290,7 +292,7 @@ function ApiKeysPage() {
290
292
  data-cy={sel('settings.apiKeys.row.menu.viewDetails', { id: apiKey.id })}
291
293
  >
292
294
  <Eye className="h-4 w-4 mr-2" />
293
- Ver detalles
295
+ View details
294
296
  </DropdownMenuItem>
295
297
  <DropdownMenuItem
296
298
  onClick={() => toggleApiKey.mutate({
@@ -303,12 +305,12 @@ function ApiKeysPage() {
303
305
  {apiKey.status === 'active' ? (
304
306
  <>
305
307
  <EyeOff className="h-4 w-4 mr-2" />
306
- Desactivar
308
+ Deactivate
307
309
  </>
308
310
  ) : (
309
311
  <>
310
312
  <Eye className="h-4 w-4 mr-2" />
311
- Activar
313
+ Activate
312
314
  </>
313
315
  )}
314
316
  </DropdownMenuItem>
@@ -319,7 +321,7 @@ function ApiKeysPage() {
319
321
  data-cy={sel('settings.apiKeys.row.menu.revoke', { id: apiKey.id })}
320
322
  >
321
323
  <Trash2 className="h-4 w-4 mr-2" />
322
- Revocar
324
+ Revoke
323
325
  </DropdownMenuItem>
324
326
  </DropdownMenuContent>
325
327
  </DropdownMenu>
@@ -330,7 +332,7 @@ function ApiKeysPage() {
330
332
  <div className="space-y-4">
331
333
  {/* Scopes */}
332
334
  <div data-cy={sel('settings.apiKeys.row.scopes', { id: apiKey.id })}>
333
- <strong className="text-sm">Permisos:</strong>
335
+ <strong className="text-sm">Permissions:</strong>
334
336
  <div className="flex flex-wrap gap-1 mt-1">
335
337
  {apiKey.scopes.map((scope) => (
336
338
  <Badge
@@ -352,11 +354,11 @@ function ApiKeysPage() {
352
354
  <div className="font-semibold">{apiKey.usage_stats.total_requests.toLocaleString()}</div>
353
355
  </div>
354
356
  <div data-cy={sel('settings.apiKeys.row.stats.last24h', { id: apiKey.id })}>
355
- <div className="text-muted-foreground">Últimas 24h</div>
357
+ <div className="text-muted-foreground">Last 24h</div>
356
358
  <div className="font-semibold">{apiKey.usage_stats.last_24h.toLocaleString()}</div>
357
359
  </div>
358
360
  <div data-cy={sel('settings.apiKeys.row.stats.avgTime', { id: apiKey.id })}>
359
- <div className="text-muted-foreground">Tiempo promedio</div>
361
+ <div className="text-muted-foreground">Avg time</div>
360
362
  <div className="font-semibold">
361
363
  {apiKey.usage_stats.avg_response_time
362
364
  ? `${Math.round(apiKey.usage_stats.avg_response_time)}ms`
@@ -368,12 +370,12 @@ function ApiKeysPage() {
368
370
 
369
371
  {/* Metadata */}
370
372
  <div className="text-sm text-muted-foreground space-y-1" data-cy={sel('settings.apiKeys.row.metadata.container', { id: apiKey.id })}>
371
- <div data-cy={sel('settings.apiKeys.row.metadata.createdAt', { id: apiKey.id })}>Creada: {formatDate(apiKey.createdAt)}</div>
373
+ <div data-cy={sel('settings.apiKeys.row.metadata.createdAt', { id: apiKey.id })}>Created: {formatDate(apiKey.createdAt)}</div>
372
374
  {apiKey.lastUsedAt && (
373
- <div data-cy={sel('settings.apiKeys.row.metadata.lastUsed', { id: apiKey.id })}>Ultimo uso: {formatDate(apiKey.lastUsedAt)}</div>
375
+ <div data-cy={sel('settings.apiKeys.row.metadata.lastUsed', { id: apiKey.id })}>Last used: {formatDate(apiKey.lastUsedAt)}</div>
374
376
  )}
375
377
  {apiKey.expiresAt && (
376
- <div data-cy={sel('settings.apiKeys.row.metadata.expiresAt', { id: apiKey.id })}>Expira: {formatDate(apiKey.expiresAt)}</div>
378
+ <div data-cy={sel('settings.apiKeys.row.metadata.expiresAt', { id: apiKey.id })}>Expires: {formatDate(apiKey.expiresAt)}</div>
377
379
  )}
378
380
  </div>
379
381
  </div>
@@ -427,9 +429,9 @@ function ApiKeyDetailsDialog({
427
429
  <Dialog open={open} onOpenChange={onClose}>
428
430
  <DialogContent className="max-w-2xl" data-cy={sel('settings.apiKeys.detailsDialog.container')}>
429
431
  <DialogHeader>
430
- <DialogTitle data-cy={sel('settings.apiKeys.detailsDialog.title')}>Detalles de API Key</DialogTitle>
432
+ <DialogTitle data-cy={sel('settings.apiKeys.detailsDialog.title')}>API Key Details</DialogTitle>
431
433
  <DialogDescription>
432
- Estadísticas de uso y configuración
434
+ Usage statistics and configuration
433
435
  </DialogDescription>
434
436
  </DialogHeader>
435
437
 
@@ -443,17 +445,17 @@ function ApiKeyDetailsDialog({
443
445
  <div className="space-y-6" data-cy={sel('settings.apiKeys.detailsDialog.content')}>
444
446
  {/* Basic Info */}
445
447
  <div data-cy={sel('settings.apiKeys.detailsDialog.basicInfo.container')}>
446
- <h4 className="font-semibold mb-2">Información básica</h4>
448
+ <h4 className="font-semibold mb-2">Basic information</h4>
447
449
  <div className="grid grid-cols-2 gap-4 text-sm">
448
450
  <div>
449
- <span className="text-muted-foreground">Nombre:</span>
451
+ <span className="text-muted-foreground">Name:</span>
450
452
  <div className="font-medium" data-cy={sel('settings.apiKeys.detailsDialog.basicInfo.name')}>{keyDetails.name}</div>
451
453
  </div>
452
454
  <div>
453
- <span className="text-muted-foreground">Estado:</span>
455
+ <span className="text-muted-foreground">Status:</span>
454
456
  <div>
455
457
  <Badge variant={keyDetails.status === 'active' ? "default" : "secondary"} data-cy={sel('settings.apiKeys.detailsDialog.basicInfo.status')}>
456
- {keyDetails.status === 'active' ? 'Activa' : keyDetails.status === 'inactive' ? 'Inactiva' : 'Expirada'}
458
+ {keyDetails.status === 'active' ? 'Active' : keyDetails.status === 'inactive' ? 'Inactive' : 'Expired'}
457
459
  </Badge>
458
460
  </div>
459
461
  </div>
@@ -464,27 +466,27 @@ function ApiKeyDetailsDialog({
464
466
  <div data-cy={sel('settings.apiKeys.detailsDialog.stats.container')}>
465
467
  <h4 className="font-semibold mb-2 flex items-center gap-2">
466
468
  <Activity className="h-4 w-4" />
467
- Estadísticas de uso
469
+ Usage statistics
468
470
  </h4>
469
471
  <div className="grid grid-cols-2 gap-4 text-sm">
470
472
  <div>
471
- <span className="text-muted-foreground">Total de requests:</span>
473
+ <span className="text-muted-foreground">Total requests:</span>
472
474
  <div className="font-medium" data-cy={sel('settings.apiKeys.detailsDialog.stats.totalRequests')}>{keyDetails.usage_stats.total_requests.toLocaleString()}</div>
473
475
  </div>
474
476
  <div>
475
- <span className="text-muted-foreground">Ultimas 24 horas:</span>
477
+ <span className="text-muted-foreground">Last 24 hours:</span>
476
478
  <div className="font-medium" data-cy={sel('settings.apiKeys.detailsDialog.stats.last24h')}>{keyDetails.usage_stats.last_24h.toLocaleString()}</div>
477
479
  </div>
478
480
  <div>
479
- <span className="text-muted-foreground">Ultimos 7 dias:</span>
481
+ <span className="text-muted-foreground">Last 7 days:</span>
480
482
  <div className="font-medium" data-cy={sel('settings.apiKeys.detailsDialog.stats.last7d')}>{keyDetails.usage_stats.last_7d.toLocaleString()}</div>
481
483
  </div>
482
484
  <div>
483
- <span className="text-muted-foreground">Ultimos 30 dias:</span>
485
+ <span className="text-muted-foreground">Last 30 days:</span>
484
486
  <div className="font-medium" data-cy={sel('settings.apiKeys.detailsDialog.stats.last30d')}>{keyDetails.usage_stats.last_30d.toLocaleString()}</div>
485
487
  </div>
486
488
  <div>
487
- <span className="text-muted-foreground">Tiempo promedio:</span>
489
+ <span className="text-muted-foreground">Avg response time:</span>
488
490
  <div className="font-medium" data-cy={sel('settings.apiKeys.detailsDialog.stats.avgTime')}>
489
491
  {keyDetails.usage_stats.avg_response_time
490
492
  ? `${Math.round(keyDetails.usage_stats.avg_response_time)}ms`
@@ -493,7 +495,7 @@ function ApiKeyDetailsDialog({
493
495
  </div>
494
496
  </div>
495
497
  <div>
496
- <span className="text-muted-foreground">Tasa de exito:</span>
498
+ <span className="text-muted-foreground">Success rate:</span>
497
499
  <div className="font-medium" data-cy={sel('settings.apiKeys.detailsDialog.stats.successRate')}>
498
500
  {keyDetails.usage_stats.success_rate
499
501
  ? `${Math.round(keyDetails.usage_stats.success_rate)}%`
@@ -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