@donotdev/ui 0.3.1 → 0.3.3

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 (325) hide show
  1. package/README.md +2 -3
  2. package/dist/components/auth/AuthHeader.js +1 -93
  3. package/dist/components/auth/AuthMenu.d.ts.map +1 -1
  4. package/dist/components/auth/AuthMenu.js +3 -286
  5. package/dist/components/auth/index.js +1 -9
  6. package/dist/components/common/FeatureCard.d.ts.map +1 -1
  7. package/dist/components/common/FeatureCard.js +1 -86
  8. package/dist/components/common/FeatureDisabled.js +1 -67
  9. package/dist/components/common/IconPlaceholder.d.ts +24 -0
  10. package/dist/components/common/IconPlaceholder.d.ts.map +1 -0
  11. package/dist/components/common/IconPlaceholder.js +1 -0
  12. package/dist/components/common/LazyLucideIcon.d.ts +39 -0
  13. package/dist/components/common/LazyLucideIcon.d.ts.map +1 -0
  14. package/dist/components/common/LazyLucideIcon.js +1 -0
  15. package/dist/components/common/ProgressBar.js +1 -84
  16. package/dist/components/common/RedirectOverlay.js +1 -243
  17. package/dist/components/common/Skeleton.js +1 -144
  18. package/dist/components/common/TechBento.d.ts.map +1 -1
  19. package/dist/components/common/TechBento.js +1 -53
  20. package/dist/components/common/icon.d.ts +1 -1
  21. package/dist/components/common/icon.d.ts.map +1 -1
  22. package/dist/components/common/icon.js +1 -84
  23. package/dist/components/common/iconByName.d.ts +33 -0
  24. package/dist/components/common/iconByName.d.ts.map +1 -0
  25. package/dist/components/common/iconByName.js +1 -0
  26. package/dist/components/common/index.js +1 -16
  27. package/dist/components/cookie-consent/ConsentBanner.d.ts +3 -1
  28. package/dist/components/cookie-consent/ConsentBanner.d.ts.map +1 -1
  29. package/dist/components/cookie-consent/ConsentBanner.js +1 -31
  30. package/dist/components/cookie-consent/CookieConsent.d.ts.map +1 -1
  31. package/dist/components/cookie-consent/CookieConsent.js +1 -183
  32. package/dist/components/cookie-consent/index.js +1 -11
  33. package/dist/components/cookie-consent/useCookieNoticeRequired.d.ts +7 -0
  34. package/dist/components/cookie-consent/useCookieNoticeRequired.d.ts.map +1 -0
  35. package/dist/components/cookie-consent/useCookieNoticeRequired.js +1 -0
  36. package/dist/components/index.js +1 -13
  37. package/dist/components/layout/GameContainer.d.ts.map +1 -1
  38. package/dist/components/layout/GameContainer.js +1 -72
  39. package/dist/components/layout/GameFlow.d.ts.map +1 -1
  40. package/dist/components/layout/GameFlow.js +1 -93
  41. package/dist/components/layout/PageConfig.d.ts.map +1 -1
  42. package/dist/components/layout/PageConfig.js +1 -47
  43. package/dist/components/layout/PageContainer.d.ts.map +1 -1
  44. package/dist/components/layout/PageContainer.js +1 -38
  45. package/dist/components/layout/components/Breadcrumbs.d.ts +2 -1
  46. package/dist/components/layout/components/Breadcrumbs.d.ts.map +1 -1
  47. package/dist/components/layout/components/Breadcrumbs.js +1 -89
  48. package/dist/components/layout/components/DropdownNavigation.d.ts.map +1 -1
  49. package/dist/components/layout/components/DropdownNavigation.js +1 -30
  50. package/dist/components/layout/components/FloatingLanguageSwitcher.d.ts.map +1 -1
  51. package/dist/components/layout/components/FloatingLanguageSwitcher.js +1 -26
  52. package/dist/components/layout/components/Notifications.js +1 -182
  53. package/dist/components/layout/components/header/AppBranding.d.ts.map +1 -1
  54. package/dist/components/layout/components/header/AppBranding.js +1 -54
  55. package/dist/components/layout/components/header/AppIcon.d.ts.map +1 -1
  56. package/dist/components/layout/components/header/AppIcon.js +1 -59
  57. package/dist/components/layout/components/header/AppTitle.d.ts.map +1 -1
  58. package/dist/components/layout/components/header/AppTitle.js +1 -40
  59. package/dist/components/layout/components/header/CacheSettings.js +1 -225
  60. package/dist/components/layout/components/header/GameTitle.d.ts.map +1 -1
  61. package/dist/components/layout/components/header/GameTitle.js +1 -66
  62. package/dist/components/layout/components/header/HeaderMenu.js +1 -75
  63. package/dist/components/layout/components/header/HeaderNavigation.d.ts.map +1 -1
  64. package/dist/components/layout/components/header/HeaderNavigation.js +1 -66
  65. package/dist/components/layout/components/header/SettingsMenu.d.ts.map +1 -1
  66. package/dist/components/layout/components/header/SettingsMenu.js +1 -85
  67. package/dist/components/layout/components/header/ThemeToggle.d.ts.map +1 -1
  68. package/dist/components/layout/components/header/ThemeToggle.js +1 -93
  69. package/dist/components/layout/components/index.js +1 -25
  70. package/dist/components/layout/index.js +1 -14
  71. package/dist/crud/components/ChildRowsPicker.js +1 -68
  72. package/dist/crud/components/CrudCardLink.js +1 -14
  73. package/dist/crud/components/EntityCardList.d.ts +4 -1
  74. package/dist/crud/components/EntityCardList.d.ts.map +1 -1
  75. package/dist/crud/components/EntityCardList.js +1 -184
  76. package/dist/crud/components/EntityDisplayRenderer.js +1 -130
  77. package/dist/crud/components/EntityFormRenderer.js +1 -433
  78. package/dist/crud/components/EntityList.js +1 -521
  79. package/dist/crud/components/EntityRecommendations.js +1 -87
  80. package/dist/crud/components/EntityWorkflow.js +1 -55
  81. package/dist/crud/components/Form.d.ts.map +1 -1
  82. package/dist/crud/components/Form.js +1 -198
  83. package/dist/crud/components/cellEditFor.js +1 -74
  84. package/dist/crud/components/entityParent.js +1 -76
  85. package/dist/crud/components/index.js +1 -16
  86. package/dist/crud/components/useRecordBreadcrumb.d.ts +3 -1
  87. package/dist/crud/components/useRecordBreadcrumb.d.ts.map +1 -1
  88. package/dist/crud/components/useRecordBreadcrumb.js +1 -43
  89. package/dist/crud/crudImports.js +1 -51
  90. package/dist/crud/index.js +1 -11
  91. package/dist/data/techLogos.js +1 -99
  92. package/dist/dndev-next.css +113 -41
  93. package/dist/dndev.css +113 -41
  94. package/dist/index.js +1 -5
  95. package/dist/internal/common/DnDevErrorBoundary.js +1 -55
  96. package/dist/internal/common/ErrorFallback.js +3 -214
  97. package/dist/internal/common/GlobalErrorFallback.js +1 -45
  98. package/dist/internal/common/RouteErrorFallback.js +3 -140
  99. package/dist/internal/devtools/DebugTools.js +1 -131
  100. package/dist/internal/devtools/components/AuthDebugButton.js +1 -72
  101. package/dist/internal/devtools/components/ConfigTab.js +1 -61
  102. package/dist/internal/devtools/components/CookieTab.js +1 -156
  103. package/dist/internal/devtools/components/DebugDialog.js +1 -48
  104. package/dist/internal/devtools/components/DesignTab.js +1 -469
  105. package/dist/internal/devtools/components/LayoutReset.js +1 -214
  106. package/dist/internal/devtools/components/MaskedValue.js +1 -39
  107. package/dist/internal/devtools/components/StoresTab.js +1 -90
  108. package/dist/internal/devtools/components/index.js +1 -16
  109. package/dist/internal/devtools/index.js +1 -13
  110. package/dist/internal/devtools/types.js +0 -2
  111. package/dist/internal/devtools/utils/envVarDiscovery.js +1 -106
  112. package/dist/internal/devtools/utils/index.js +1 -12
  113. package/dist/internal/devtools/utils/maskSensitive.js +1 -59
  114. package/dist/internal/devtools/utils/virtualModuleInspector.js +1 -309
  115. package/dist/internal/initializers/BaseStoresInitializer.js +1 -367
  116. package/dist/internal/initializers/NextJsStoresInitializer.js +1 -78
  117. package/dist/internal/initializers/ViteStoresInitializer.js +1 -20
  118. package/dist/internal/initializers/index.js +1 -11
  119. package/dist/internal/layout/DnDevLayout.js +1 -321
  120. package/dist/internal/layout/components/AutoMetaTags.d.ts +5 -0
  121. package/dist/internal/layout/components/AutoMetaTags.d.ts.map +1 -1
  122. package/dist/internal/layout/components/AutoMetaTags.js +1 -338
  123. package/dist/internal/layout/components/FaviconHead.d.ts +18 -14
  124. package/dist/internal/layout/components/FaviconHead.d.ts.map +1 -1
  125. package/dist/internal/layout/components/FaviconHead.js +1 -60
  126. package/dist/internal/layout/components/FontPreloadLinks.js +1 -31
  127. package/dist/internal/layout/components/HeadTags.js +1 -20
  128. package/dist/internal/layout/components/PWAUpdateNotification.js +1 -131
  129. package/dist/internal/layout/components/footer/FooterBranding.d.ts.map +1 -1
  130. package/dist/internal/layout/components/footer/FooterBranding.js +1 -35
  131. package/dist/internal/layout/components/footer/FooterCopyright.d.ts.map +1 -1
  132. package/dist/internal/layout/components/footer/FooterCopyright.js +1 -37
  133. package/dist/internal/layout/components/footer/FooterLegalLinks.d.ts.map +1 -1
  134. package/dist/internal/layout/components/footer/FooterLegalLinks.js +1 -44
  135. package/dist/internal/layout/components/footer/useLegalLinks.d.ts +4 -2
  136. package/dist/internal/layout/components/footer/useLegalLinks.d.ts.map +1 -1
  137. package/dist/internal/layout/components/footer/useLegalLinks.js +1 -21
  138. package/dist/internal/layout/components/headTagElement.d.ts +16 -0
  139. package/dist/internal/layout/components/headTagElement.d.ts.map +1 -0
  140. package/dist/internal/layout/components/headTagElement.js +1 -0
  141. package/dist/internal/layout/components/index.js +1 -13
  142. package/dist/internal/layout/components/prerenderedHead.d.ts +15 -0
  143. package/dist/internal/layout/components/prerenderedHead.d.ts.map +1 -0
  144. package/dist/internal/layout/components/prerenderedHead.js +1 -0
  145. package/dist/internal/layout/components/trailingSlash.d.ts +13 -0
  146. package/dist/internal/layout/components/trailingSlash.d.ts.map +1 -0
  147. package/dist/internal/layout/components/trailingSlash.js +1 -0
  148. package/dist/internal/layout/config/defaults.js +1 -47
  149. package/dist/internal/layout/config/index.js +1 -11
  150. package/dist/internal/layout/config/presets/admin.js +1 -35
  151. package/dist/internal/layout/config/presets/blog.js +1 -31
  152. package/dist/internal/layout/config/presets/docs.js +1 -51
  153. package/dist/internal/layout/config/presets/game.js +1 -53
  154. package/dist/internal/layout/config/presets/index.js +1 -24
  155. package/dist/internal/layout/config/presets/landing.js +1 -42
  156. package/dist/internal/layout/config/presets/moolti.js +1 -52
  157. package/dist/internal/layout/config/presets/plain.js +1 -25
  158. package/dist/internal/layout/renderers/index.js +0 -10
  159. package/dist/internal/layout/zones/DnDevFooter.d.ts.map +1 -1
  160. package/dist/internal/layout/zones/DnDevFooter.js +1 -67
  161. package/dist/internal/layout/zones/DnDevHeader.js +1 -41
  162. package/dist/internal/layout/zones/DnDevMergedBar.d.ts.map +1 -1
  163. package/dist/internal/layout/zones/DnDevMergedBar.js +1 -52
  164. package/dist/internal/layout/zones/DnDevSidebar.d.ts.map +1 -1
  165. package/dist/internal/layout/zones/DnDevSidebar.js +1 -181
  166. package/dist/internal/layout/zones/index.js +1 -14
  167. package/dist/internal/providers/NavigationProvider.d.ts.map +1 -1
  168. package/dist/internal/providers/NavigationProvider.js +1 -71
  169. package/dist/internal/providers/SentryInitializer.d.ts.map +1 -1
  170. package/dist/internal/providers/SentryInitializer.js +1 -36
  171. package/dist/internal/providers/UIProviders.js +1 -79
  172. package/dist/internal/providers/index.js +1 -12
  173. package/dist/next.js +1 -11
  174. package/dist/providers/NextJsAppProviders.d.ts.map +1 -1
  175. package/dist/providers/NextJsAppProviders.js +1 -107
  176. package/dist/providers/ViteAppProviders.d.ts +11 -9
  177. package/dist/providers/ViteAppProviders.d.ts.map +1 -1
  178. package/dist/providers/ViteAppProviders.js +1 -117
  179. package/dist/providers/index.js +1 -11
  180. package/dist/routing/404.js +1 -108
  181. package/dist/routing/AuthGuard.js +1 -178
  182. package/dist/routing/AuthGuardFallback.d.ts.map +1 -1
  183. package/dist/routing/AuthGuardFallback.js +1 -67
  184. package/dist/routing/AuthReturnTo.js +1 -68
  185. package/dist/routing/DnDevNavigationMenu.d.ts.map +1 -1
  186. package/dist/routing/DnDevNavigationMenu.js +1 -138
  187. package/dist/routing/GoTo.d.ts.map +1 -1
  188. package/dist/routing/GoTo.js +1 -38
  189. package/dist/routing/GoToDialog.d.ts.map +1 -1
  190. package/dist/routing/GoToDialog.js +1 -97
  191. package/dist/routing/GoToInput.d.ts.map +1 -1
  192. package/dist/routing/GoToInput.js +1 -49
  193. package/dist/routing/GoToWrapper.d.ts.map +1 -1
  194. package/dist/routing/GoToWrapper.js +1 -59
  195. package/dist/routing/Link.d.ts +10 -2
  196. package/dist/routing/Link.d.ts.map +1 -1
  197. package/dist/routing/Link.js +1 -109
  198. package/dist/routing/NavigationItem.d.ts.map +1 -1
  199. package/dist/routing/NavigationItem.js +1 -44
  200. package/dist/routing/NotFoundDocument.d.ts +33 -0
  201. package/dist/routing/NotFoundDocument.d.ts.map +1 -0
  202. package/dist/routing/NotFoundDocument.js +1 -0
  203. package/dist/routing/SignedInRedirect.js +1 -47
  204. package/dist/routing/hooks/hooks.next.js +1 -1
  205. package/dist/routing/hooks/hooks.vite.js +1 -1
  206. package/dist/routing/hooks/index.js +1 -26
  207. package/dist/routing/hooks/types.js +0 -2
  208. package/dist/routing/hooks/useLocation.next.js +1 -35
  209. package/dist/routing/hooks/useLocation.vite.js +1 -13
  210. package/dist/routing/hooks/useMatch.next.js +1 -31
  211. package/dist/routing/hooks/useMatch.vite.js +1 -6
  212. package/dist/routing/hooks/useNavigate.next.js +1 -64
  213. package/dist/routing/hooks/useNavigate.vite.js +1 -61
  214. package/dist/routing/hooks/useParams.next.js +1 -9
  215. package/dist/routing/hooks/useParams.vite.js +1 -6
  216. package/dist/routing/hooks/useQueryParams.next.js +1 -66
  217. package/dist/routing/hooks/useQueryParams.vite.js +1 -66
  218. package/dist/routing/hooks/useRedirectGuard.next.js +1 -119
  219. package/dist/routing/hooks/useRedirectGuard.vite.js +1 -117
  220. package/dist/routing/hooks/useRouteParam.next.js +1 -38
  221. package/dist/routing/hooks/useRouteParam.vite.js +1 -38
  222. package/dist/routing/hooks/useRoutePath.next.d.ts +5 -3
  223. package/dist/routing/hooks/useRoutePath.next.d.ts.map +1 -1
  224. package/dist/routing/hooks/useRoutePath.next.js +1 -36
  225. package/dist/routing/hooks/useRoutePath.vite.js +1 -25
  226. package/dist/routing/hooks/useSearchParams.next.js +1 -22
  227. package/dist/routing/hooks/useSearchParams.vite.js +1 -22
  228. package/dist/routing/hooks/useUrlLanguage.next.js +1 -50
  229. package/dist/routing/hooks/useUrlLanguage.vite.js +1 -41
  230. package/dist/routing/index.d.ts +1 -0
  231. package/dist/routing/index.d.ts.map +1 -1
  232. package/dist/routing/index.js +1 -32
  233. package/dist/routing/link/InternalLink.next.d.ts +23 -0
  234. package/dist/routing/link/InternalLink.next.d.ts.map +1 -0
  235. package/dist/routing/link/InternalLink.next.js +1 -0
  236. package/dist/routing/link/InternalLink.vite.d.ts +22 -0
  237. package/dist/routing/link/InternalLink.vite.d.ts.map +1 -0
  238. package/dist/routing/link/InternalLink.vite.js +1 -0
  239. package/dist/routing/link/absolutePath.d.ts +17 -0
  240. package/dist/routing/link/absolutePath.d.ts.map +1 -0
  241. package/dist/routing/link/absolutePath.js +1 -0
  242. package/dist/routing/link/link.next.d.ts +12 -0
  243. package/dist/routing/link/link.next.d.ts.map +1 -0
  244. package/dist/routing/link/link.next.js +1 -0
  245. package/dist/routing/link/link.vite.d.ts +12 -0
  246. package/dist/routing/link/link.vite.d.ts.map +1 -0
  247. package/dist/routing/link/link.vite.js +1 -0
  248. package/dist/routing/link/types.d.ts +30 -0
  249. package/dist/routing/link/types.d.ts.map +1 -0
  250. package/dist/routing/link/types.js +0 -0
  251. package/dist/routing/parentRoute.js +1 -43
  252. package/dist/routing/useGoTo.d.ts.map +1 -1
  253. package/dist/routing/useGoTo.js +1 -59
  254. package/dist/routing/useNavigation.d.ts.map +1 -1
  255. package/dist/routing/useNavigation.js +1 -114
  256. package/dist/routing/useRouteDiscovery.d.ts +4 -0
  257. package/dist/routing/useRouteDiscovery.d.ts.map +1 -1
  258. package/dist/routing/useRouteDiscovery.js +1 -313
  259. package/dist/rsc.d.ts +28 -0
  260. package/dist/rsc.d.ts.map +1 -0
  261. package/dist/rsc.js +1 -0
  262. package/dist/styles/index.css +113 -41
  263. package/dist/styles/index.js +1 -10
  264. package/dist/styles/layoutConstants.js +1 -134
  265. package/dist/symbol-index.json +1 -1
  266. package/dist/utils/assetResolver.d.ts +19 -19
  267. package/dist/utils/assetResolver.d.ts.map +1 -1
  268. package/dist/utils/assetResolver.js +1 -297
  269. package/dist/utils/index.d.ts +0 -1
  270. package/dist/utils/index.d.ts.map +1 -1
  271. package/dist/utils/index.js +1 -23
  272. package/dist/utils/sanitizeSvg.js +1 -51
  273. package/dist/utils/tList.js +1 -42
  274. package/dist/utils/useAISafe.d.ts.map +1 -1
  275. package/dist/utils/useAISafe.js +1 -53
  276. package/dist/utils/useAuthSafe.d.ts.map +1 -1
  277. package/dist/utils/useAuthSafe.js +1 -78
  278. package/dist/utils/useAuthVisibility.d.ts.map +1 -1
  279. package/dist/utils/useAuthVisibility.js +1 -63
  280. package/dist/utils/useBillingVisibility.d.ts.map +1 -1
  281. package/dist/utils/useBillingVisibility.js +1 -57
  282. package/dist/utils/useCrudSafe.d.ts.map +1 -1
  283. package/dist/utils/useCrudSafe.js +1 -75
  284. package/dist/utils/useDeleteAccountSafe.js +1 -52
  285. package/dist/utils/useFormStoreSafe.d.ts.map +1 -1
  286. package/dist/utils/useFormStoreSafe.js +1 -85
  287. package/dist/utils/useOAuthSafe.d.ts.map +1 -1
  288. package/dist/utils/useOAuthSafe.js +1 -38
  289. package/dist/utils/useStripeBillingSafe.d.ts.map +1 -1
  290. package/dist/utils/useStripeBillingSafe.js +1 -81
  291. package/dist/vite-routing/AppRoutes.d.ts.map +1 -1
  292. package/dist/vite-routing/AppRoutes.js +1 -235
  293. package/dist/vite-routing/RootLayout.d.ts.map +1 -1
  294. package/dist/vite-routing/RootLayout.js +1 -205
  295. package/dist/vite-routing/index.js +1 -11
  296. package/dist/vite.js +1 -10
  297. package/guidelines/COMPONENTS.md +3 -3
  298. package/guidelines/PAGES.md +3 -0
  299. package/guidelines/ROUTING.md +16 -0
  300. package/guidelines/SEO.md +160 -142
  301. package/package.json +18 -8
  302. package/dist/ChildRowsPicker-63M4EQUQ.js +0 -1
  303. package/dist/ChildRowsPicker-ISP365ON.js +0 -1
  304. package/dist/ChildRowsPicker-PQFE6NCR.js +0 -1
  305. package/dist/ChildRowsPicker-XXFFSMWY.js +0 -1
  306. package/dist/CookieConsent-QOUAY6B4.js +0 -1
  307. package/dist/GoToDialog-KSBGOIWO.js +0 -1
  308. package/dist/GoToDialog-XBK5EZF4.js +0 -1
  309. package/dist/chunk-3CIZFGST.js +0 -1
  310. package/dist/chunk-LHMKU342.js +0 -1
  311. package/dist/chunk-MS7ZIW5Z.js +0 -1
  312. package/dist/chunk-O2XFH626.js +0 -1
  313. package/dist/chunk-P2DHZWPY.js +0 -1
  314. package/dist/components/common/lucideIconByName.d.ts +0 -9
  315. package/dist/components/common/lucideIconByName.d.ts.map +0 -1
  316. package/dist/components/common/lucideIconByName.js +0 -32
  317. package/dist/internal/layout/components/PerformanceHints.d.ts +0 -71
  318. package/dist/internal/layout/components/PerformanceHints.d.ts.map +0 -1
  319. package/dist/internal/layout/components/PerformanceHints.js +0 -71
  320. package/dist/internal/layout/components/i18nSeoMeta.d.ts +0 -54
  321. package/dist/internal/layout/components/i18nSeoMeta.d.ts.map +0 -1
  322. package/dist/internal/layout/components/i18nSeoMeta.js +0 -53
  323. package/dist/utils/useSeo.d.ts +0 -129
  324. package/dist/utils/useSeo.d.ts.map +0 -1
  325. package/dist/utils/useSeo.js +0 -151
package/guidelines/SEO.md CHANGED
@@ -7,7 +7,7 @@
7
7
  ## How It Works
8
8
 
9
9
  **Vite:** AutoMetaTags reads route manifest + i18n - Helmet renders meta tags
10
- **Next.js:** Build generates `metadata-manifest.json` - `generateMetadata()` per page
10
+ **Next.js:** the same AutoMetaTags, server-rendered by the generated layout - React 19 hoists the tags into `<head>`
11
11
 
12
12
  **Same code, both platforms. No conditional logic needed.**
13
13
 
@@ -23,8 +23,8 @@
23
23
 
24
24
  | Platform | Static Pages | Dynamic Pages |
25
25
  |----------|--------------|---------------|
26
- | **Vite** | Prerender at build - meta in HTML | `<Seo>` + react-helmet-async - meta in prerendered HTML |
27
- | **Next.js** | `generateMetadata()` - server renders meta | `<Seo>` client-side OR `generateMetadata()` with fetch |
26
+ | **Vite** | Prerendered at build, one page per language - meta in HTML | Entity pages: one static HTML per public record at build, identity from the record (same as Next). Other dynamic pages: AutoMetaTags (the route's PageMeta + i18n, same for every URL) |
27
+ | **Next.js** | AutoMetaTags, in the server HTML | Entity pages: generated server metadata from the record (no app code). Other dynamic pages: the page module's own `generateMetadata`, else AutoMetaTags |
28
28
 
29
29
  **Verify:** View Page Source (not DevTools). Meta tags should be visible without JS.
30
30
 
@@ -35,12 +35,27 @@
35
35
  With 2+ languages every page has one URL per language (default language at the root, others
36
36
  under `/<lang>`, see core `I18N.md`). Automatic:
37
37
 
38
- - **Canonical / `og:url` / JSON-LD `url`:** the page in its own language (`/en/x` on the English page).
38
+ - **Canonical / `og:url` / JSON-LD `url`:** the page in its own language (`/en/x` on the English page), entity pages included (AutoMetaTags emits canonical / `og:url` on every route).
39
39
  - **`hreflang`:** one `<link rel="alternate">` per language plus `x-default` (the root URL).
40
- - **Sitemap (Next `src/app/sitemap.xml/route.next.ts`):** every language's URL of each page, each entry with `alternates.languages`.
40
+ - **Sitemap (Next `src/app/sitemap.xml/route.next.ts`, Vite `dist/sitemap.xml`):** every language's URL of each page, each entry with `alternates.languages`.
41
+ - **Prerendered pages (Vite):** one file per language URL (`dist/about.html`, `dist/en/about.html`), each with its hreflang alternates.
41
42
 
42
43
  One language: unprefixed URLs, no `hreflang`.
43
44
 
45
+ **Trailing slash (Next):** with `trailingSlash: true` in `defineNextConfig` (passed through to Next, which then redirects `/about` to `/about/`), every public URL the framework emits ends with `/`, language homes included (`/fr/`, `/about/`): canonical, `og:url`, `hreflang`, JSON-LD (`url`, breadcrumb items, entity page Product `url`, search `urlTemplate`), sitemap and llms.txt. File URLs (`/rss.xml`, images) keep their form. The build writes the setting into the route manifest (`routes.manifest.trailingSlash`) and the generated sitemap / llms.txt routes; `formatTrailingSlash` (`@donotdev/core`) is the one place that applies it. Unset or `false`: URLs unchanged.
46
+
47
+ ---
48
+
49
+ ## Dynamic Pages: Per-URL SEO Required
50
+
51
+ The build fails on a public, indexable `:param` route (not `auth`, not `seo: { noindex: true }`) that has no per-URL identity: all its URLs would share one title and description. Ways out, in the error (`[dndev-routes] <file>: public dynamic route <path> has no per-URL SEO ...`):
52
+
53
+ 1. Declare the record entity it shows: `entity: productEntity` (imported from `'entities'`, see Entity pages).
54
+ 2. Next only: export Next's `generateMetadata` from the page module (see Other dynamic pages). Vite has no server: not a way out there.
55
+ 3. `seo: { noindex: true }`.
56
+
57
+ Exempt, like the sitemap: error routes (`/404`, `/not-found`, `/500`, `/error`), catch-all routes (`/docs/*`: no URL list, never in the sitemap), blog post routes (`blog` namespace: identity from the post's frontmatter).
58
+
44
59
  ---
45
60
 
46
61
  ## Vite: Prerendering
@@ -53,31 +68,111 @@ export default defineViteConfig({
53
68
  });
54
69
  ```
55
70
 
56
- **What happens:**
57
- 1. Build discovers all routes from `src/pages/`
58
- 2. Renders each page to static HTML
59
- 3. `<Seo>` and AutoMetaTags populate `<head>` via react-helmet-async
60
- 4. Output: `dist/about/index.html` with full meta tags
71
+ **What happens** (after the bundle, no browser):
72
+
73
+ 1. `dist/_shell.html`: the SPA shell as Vite built it. The hosting rewrite serves it for every URL without a file (an unprerendered dynamic URL, a record published after the build); `dist/index.html` becomes the prerendered home page, so its tags never land on other URLs.
74
+ 2. One page per public static route and blog post **and per language** (default language at the root, others under `/<lang>`): `dist/about.html`, `dist/en/about.html`, `dist/index.html`, `dist/en.html`. Its head is the identity AutoMetaTags computes for that URL (`routeSeo` / `routeHeadTags` from `@donotdev/core`, the same functions: PageMeta + i18n in the page language, absolute `og:image` / `twitter:image`) plus canonical, `og:url`, `og:site_name` and hreflang (see Languages; `seo.hreflang: false` respected).
75
+ 3. One page per public record of each entity route and language (see Entity pages (Vite)).
76
+ 4. `dist/sitemap.xml` and `dist/llms.txt` of the same URL set (see Sitemap & llms.txt).
77
+
78
+ **Output layout: `<path>.html`.** A page URL has no trailing slash on Vite; `/produits/serum` is `dist/produits/serum.html`. The hosting serves it at the slash-less URL with no redirect (`cleanUrls`, see Hosting).
79
+
80
+ **In the browser:** each page embeds its identity tags (`<script type="application/json" id="dndev-prerendered-head">`, data: any CSP allows it). On that URL AutoMetaTags renders exactly them, and react-helmet-async keeps the prerendered nodes (they carry its `data-rh` marker): no flip, no duplicate. After a client navigation it replaces them like its own tags.
61
81
 
62
- **Dynamic routes** (e.g., `/products/:id`): Prerender with known IDs or use client-side `<Seo>`.
82
+ **Dynamic routes** without an entity (e.g., `/search/:q`): AutoMetaTags gives them the route's identity (PageMeta + i18n: one title and description for every URL), on the shell.
83
+
84
+ ### Entity pages (Vite): one static HTML per record
85
+
86
+ With `prerender: 'auto'` (the default), the build writes one page per public record of each entity route (Next's rule: single `:param`, indexable, page declaring `entity` in PageMeta) and per language: `dist/produits/serum.html`, `dist/en/produits/serum.html`. No app code.
87
+
88
+ - **Records:** the Next build's (`listPublicPages`: `status` not in `HIDDEN_STATUSES`, at most 1000 per route), read once at build as a signed-out visitor with the app's public reader: `@donotdev/supabase` (`VITE_SUPABASE_URL`, `VITE_SUPABASE_PUBLIC_KEY`, RLS decides) or `@donotdev/firebase` (`VITE_FIREBASE_API_KEY`, `VITE_FIREBASE_PROJECT_ID`, Security Rules decide). The same read fills sitemap.xml and llms.txt, so an app with entity routes reads its records at every build (also with `prerenderRecords: false`, for the sitemap). The build fails on a missing env, a failed read, another provider, no `entities` package, no site name, or (record pages) a `VITE_APP_URL` that ends with `/` (the browser builds the same URLs from it). A deploy build also fails on an unset or local `VITE_APP_URL`; a local build takes a local one and, without one, writes no record page (see Sitemap & llms.txt, URLs).
89
+ - **Head:** the Next entity page identity (`entityRecordSeo`, shared: title `<record title> | <site name>`, description, Open Graph, Twitter card, og:type from `seo.type`, Product JSON-LD for `product`, BreadcrumbList ending with the record title, text in the page language) plus the site tags and hreflang.
90
+ - **SPA shell instead** (the route's PageMeta + i18n identity): a record published after the build (until the next build), a value a static route already serves (the static page wins, as on Next), a value no file name can hold (`a/b`, `..`; listed in the build log).
91
+ - **Opt out:** `appConfig.prerenderRecords: false`. An explicit `prerender: ['/a', '/b']` list prerenders those routes only (globs `'/blog/*'` match page paths, never a `:param` template). A page module's `generateMetadata` is Next only: the Vite record page keeps the entity identity.
92
+
93
+ ### Hosting: clean URLs, the shell as fallback
94
+
95
+ The scaffolded configs serve `<path>.html` at `/<path>` (200, no redirect) and fall back to the shell:
96
+
97
+ - **Firebase Hosting** (`firebase.json`): `"cleanUrls": true` and the rewrite `{ "source": "**", "destination": "/_shell.html" }`. Firebase serves an existing file before any rewrite.
98
+ - **Vercel, Git deploy** (`vercel.json`): `"cleanUrls": true` and the rewrite `{ "source": "/(.*)", "destination": "/_shell" }` (with `cleanUrls`, destinations have no extension).
99
+ - **Vercel, `dndev deploy`** (Build Output API): each `<path>.html` gets an `overrides` entry (`{ "path": "<path>" }`), the fallback route is `/_shell`.
100
+
101
+ An app whose own config lacks `cleanUrls` never serves the prerendered pages at their URLs (`/about` finds no file `about`), and one still rewriting to `/index.html` serves the home page's head (canonical included) on every other URL: update its `firebase.json` / `vercel.json` to the lines above.
102
+
103
+ **Not found (Vite):** a client-rendered app answers every URL with HTTP 200, so the not-found state carries `<meta name="robots" content="noindex">`: the framework 404 (the `*` route) and a record page while the record its URL names is not found (`useCrudDoc` reporting `notFound` for the route's declared entity and `:param` value; a secondary read on the page never does, crud `CRUD.md`). Next serves a real 404 instead (`notFound()`, not-found pages) and adds no robots tag.
63
104
 
64
105
  ---
65
106
 
66
107
  ## Next.js: Server Rendering
67
108
 
68
- **Automatic.** Each page's `generateMetadata()` runs server-side.
109
+ **Automatic.** The generated layout renders the app's providers, which render AutoMetaTags (a client component) above the page. Both are server-rendered (SSR is the default; `appConfig.ssr: false` renders them in the browser only), and React 19 hoists every `<title>`, `<meta>` and `<link>` into `<head>`.
110
+
111
+ **React 19 does not dedupe head tags** (Helmet does, on Vite): two sources of a `<title>` ship two titles. One owner per tag:
112
+
113
+ | Route | Page identity (title, description, Open Graph, Twitter, robots, JSON-LD) | Always AutoMetaTags |
114
+ |-------|------|------|
115
+ | Static (`/about`), dynamic without server metadata | AutoMetaTags (PageMeta + i18n) | canonical, `og:url`, `og:site_name`, `hreflang`, BreadcrumbList / WebSite / Organization JSON-LD |
116
+ | Entity page (`/produits/:slug`, see below) | The generated page: `generateMetadata` + JSON-LD from the record (AutoMetaTags emits none) | same, except the BreadcrumbList: the page renders it (record title last) |
117
+ | Page module exporting `generateMetadata` | That `generateMetadata` (AutoMetaTags emits none) | same |
118
+ | Blog post (`blog` namespace, dynamic route) | The generated page's `generateMetadata` (per-post title, description, Open Graph) | same |
69
119
 
70
- **Static pages:** Meta resolved at build time from `metadata-manifest.json`.
71
- **Dynamic pages:** Use `generateMetadata()` with `fetch()` or client-side `<Seo>`.
120
+ The route generator writes the routes of the last three rows into the route manifest (`routes.manifest.serverMetadataPaths`); AutoMetaTags skips the identity exactly there. Entity pages are also in `routes.manifest.recordBreadcrumbPaths`: AutoMetaTags emits no BreadcrumbList there.
121
+
122
+ - **Route of a URL** (both platforms): exact path, then `:param` patterns (most specific), then catch-alls: a `/docs/*` route's PageMeta applies to every URL under `/docs` (longest prefix wins).
123
+ - **Site-level metadata:** `export const metadata` in `src/app/AppDocument.tsx` (`metadataBase`), re-exported by the generated root layout. No page titles there.
124
+
125
+ ### Entity pages: identity from the record, no app code
126
+
127
+ A public single-param route whose page declares its entity in PageMeta (indexable, not `auth`) gets its head from the server; its records are also the sitemap's. The page renders no SEO component.
128
+
129
+ ```tsx
130
+ // src/pages/products/ProductPage.tsx (the folder shapes the URL and breadcrumbs only)
131
+ import { productEntity } from 'entities';
132
+
133
+ export const meta: PageMeta = {
134
+ namespace: 'product',
135
+ route: '/produits/:slug',
136
+ entity: productEntity, // the defineEntity definition: collection 'products'
137
+ seo: { type: 'product' },
138
+ };
139
+ ```
140
+
141
+ - **Declaring the entity:** `entity` is the `defineEntity` definition imported from the app's `entities` package; the build resolves it to its `collection` (`meta.entity`). A string, an identifier not imported from `'entities'`, or a value that is not a `defineEntity` with a literal `collection` fails the build, and so does any other expression: `import * as entities from 'entities'` with `entity: entities.productEntity` (the build reads the meta statically; write `import { productEntity } from 'entities'`). A dynamic page without `entity` is a plain dynamic page: its own exported `generateMetadata` (Next), else `seo: { noindex: true }` (see Dynamic Pages: Per-URL SEO Required).
142
+
143
+ - **Read:** the generated `page.tsx` reads the record named by the URL (`<param> == value`, `status` not in `HIDDEN_STATUSES`) with the public server reader of `generateStaticParams` (signed-out visitor: RLS / Security Rules decide; `@donotdev/supabase` or `@donotdev/firebase`, any other provider fails the build). React `cache`: `generateMetadata` and the page share one read per request. The page's own client data reads are separate. `appConfig.prerenderRecords: false` stops the build-time prerender only: each URL still reads its record on its first request.
144
+ - **`generateMetadata`:** title `<record title> | <site name>` (absolute: no layout title template; site name = `appConfig.seo.siteName`, else `appConfig.app.name`), description, Open Graph (title, description, absolute image, `og:type`), Twitter card. Derived by `deriveEntitySeo` with the entity's `seo` option (see Entity-derived identity), text in the URL's language (entity namespace then `crud` translations, `@donotdev/core/rsc`). Canonical, `og:url` and `hreflang` stay with AutoMetaTags.
145
+ - **`og:type`:** PageMeta `seo.type` (`website` default, `article`, `product`). `product` also renders Product JSON-LD (`<script type="application/ld+json">`, from `buildProductJsonLd`) and `<meta property="og:type" content="product">` in the page (Next's metadata API has no `product` type).
146
+ - **BreadcrumbList JSON-LD:** rendered by the page (`buildBreadcrumbJsonLd`, shared with the Vite record pages): the site name, the URL's segments named as the visible breadcrumb names them (words title-cased), the record title last: the label the visible breadcrumb shows on the segment naming the record (`useRecordBreadcrumb`: the slug on `/produits/:slug`, the id on `/products/:id`). No record title: no BreadcrumbList.
147
+ - **Missing record** (unknown value, hidden status): `notFound()`. The response is HTTP 404 with the app's 404 page and Next's `noindex`; a page component's own not-found state is never served for such a URL.
148
+ - **Own `generateMetadata` wins:** a server page module (no `'use client'`) exporting `generateMetadata` replaces the generated metadata, JSON-LD and 404 (one source, no second title); it then calls `notFound()` itself.
149
+ - **Build fails** without the app's `entities` package, without a site name, or with a provider that has no server reader. Opt a route out with `seo: { noindex: true }` (also leaves the sitemap).
150
+ - The per-request tree (`dndev-session`) re-exports the same `generateMetadata`.
151
+
152
+ ### Other dynamic pages: Next's `generateMetadata`
153
+
154
+ A page module may export Next's own `generateMetadata` (standard Next API). The generated `page.tsx` re-exports it (and the per-request tree page too), and AutoMetaTags emits no identity on that route.
72
155
 
73
156
  ```tsx
74
- // Server-rendered metadata for dynamic route
75
- export async function generateMetadata({ params }): Promise<Metadata> {
76
- const product = await fetch(`/api/products/${params.id}`).then(r => r.json());
77
- return { title: product.name, description: product.description };
157
+ // src/pages/search/SearchPage.tsx: a server module (no 'use client')
158
+ import type { Metadata } from 'next';
159
+
160
+ export const meta: PageMeta = { route: '/recherche/:q' };
161
+
162
+ export async function generateMetadata({ params }: { params: Promise<{ q: string }> }): Promise<Metadata> {
163
+ const { q } = await params;
164
+ return { title: { absolute: `${q} | Shop` } };
165
+ }
166
+
167
+ export default function SearchPage() {
168
+ return <SearchResults />; // a 'use client' component
78
169
  }
79
170
  ```
80
171
 
172
+ - **`'use client'` page exporting `generateMetadata`:** the build fails (Next reads it only from server modules, the page would ship without metadata). Keep the page module a server component that renders the client UI.
173
+ - **Canonical / `hreflang`:** AutoMetaTags emits them; do not set `alternates` or `openGraph.url` (a second canonical).
174
+ - **Vite:** ignored (no server).
175
+
81
176
  ---
82
177
 
83
178
  ## Standard Use: i18n-First
@@ -127,16 +222,26 @@ export const meta: PageMeta = {
127
222
 
128
223
  ## Link-Preview Image
129
224
 
130
- The build generates `public/og-image.png` (1200x630, logo centered) from `public/logo.svg`, next to the favicon and PWA icons. Vite and Next.js both default `og:image` to it, as an absolute URL when `APP_URL` is set.
225
+ The build generates `public/og-image.png` (1200x630, logo centered) from `public/logo.svg`, next to the favicon and PWA icons. Vite and Next.js both default `og:image` to it (`appConfig.seo.defaultImage`, default `DEFAULT_OG_IMAGE`, `/og-image.png`), as an absolute URL when `APP_URL` is set. One default for every tag: AutoMetaTags, the Vite prerendered pages (static and record), the Next entity page metadata and `getMetadataForPath`.
131
226
 
132
227
  - **Replace it:** put your own `public/og-image.png`; an existing file is never overwritten.
133
228
  - **Per page:** `seo.image` in `PageMeta`, or `meta.image` in the namespace's translations.
134
- - **Dynamic pages:** `<Seo image={product.imageUrl} />`.
229
+ - **Entity pages (Next, Vite record pages):** the record's first image (`deriveEntitySeo`), else the site default.
230
+ - **Site-wide:** `appConfig.seo.defaultImage` (e.g. `'/og-image.jpg'`) replaces the default everywhere (build-written and runtime tags stay identical).
231
+ - **Not generated** without `public/logo.svg` or without `sharp` installed (the build log lists it as skipped): `og:image` then points to a missing `/og-image.png`. Add the file to `public/`.
135
232
 
136
233
  Use JPG or PNG: link-preview crawlers do not reliably render SVG.
137
234
 
138
235
  ---
139
236
 
237
+ ## Site Logo (JSON-LD)
238
+
239
+ The JSON-LD logo is always the app's `public/logo.svg` (`SITE_LOGO_PATH`, `@donotdev/core`), as an absolute URL: the Organization `logo` (home page, when `appConfig.app.links` is set) and the WebPage / Article `publisher.logo` (every page with an app URL). One path, no existence check or asset-manifest lookup at render, so the server render, the browser and the Vite prerendered pages write the same URL (no hydration mismatch). The generated PWA icons (`icon-*x*.png`) are never used for it.
240
+
241
+ - **Missing `public/logo.svg`:** the build warns (`logo.svg not found in public/`); the JSON-LD logo then points to a missing file, and no favicon, PWA icons or `og-image.png` are generated. Add `public/logo.svg`.
242
+
243
+ ---
244
+
140
245
  ## All SEO Options
141
246
 
142
247
  ```tsx
@@ -158,7 +263,8 @@ export const meta: PageMeta = {
158
263
 
159
264
  // Other
160
265
  keywords: ['blog', 'news'],
161
- noindex: true, // Hide from search engines
266
+ noindex: true, // Hide from search engines (noindex, nofollow)
267
+ noindex: false, // Indexable even when auth-only (default there: noindex)
162
268
  },
163
269
  };
164
270
  ```
@@ -169,60 +275,29 @@ export const meta: PageMeta = {
169
275
 
170
276
  Resolution order (highest to lowest):
171
277
 
172
- 1. **`<Seo>` component** - Runtime dynamic data (always wins)
173
- 2. **i18n `meta.fullTitle`** - Translated, language-aware
174
- 3. **`seo.fullTitle`** - Static fallback
175
- 4. **i18n `title`** - "Translated | SiteName"
176
- 5. **`seo.title`** - "Static | SiteName"
177
- 6. **SiteName only** - Default fallback
178
-
179
- ---
180
-
181
- ## Dynamic Data: `<Seo>` Component
278
+ On Next routes with server metadata (entity pages, a page's own `generateMetadata`, blog posts) that metadata is the only identity. Everywhere else:
182
279
 
183
- **Pattern:** For pages with runtime data (fetched content), use `<Seo>`.
280
+ 1. **`seo.fullTitle`** - Exact title, set on the page
281
+ 2. **i18n `meta.fullTitle`** - Translated, language-aware (the page's own namespace)
282
+ 3. **`seo.title`** - "Static | SiteName" (`seo.title: null`: SiteName only)
283
+ 4. **i18n `title`** - "Translated | SiteName" (the page's own namespace)
284
+ 5. **SiteName only** - Default fallback
184
285
 
185
- ```tsx
186
- import { Seo } from '@donotdev/ui';
187
-
188
- export const meta: PageMeta = {
189
- namespace: 'apartments',
190
- route: { params: ['id'] },
191
- };
286
+ What the page sets in PageMeta wins over its translations, for the full title as for the title.
192
287
 
193
- export default function ApartmentPage() {
194
- const { id } = useParams<{ id: string }>();
195
- const { data: apartment } = useApartment(id);
196
-
197
- if (!apartment) return <Loading />;
198
-
199
- return (
200
- <>
201
- <Seo
202
- fullTitle={`${apartment.reference} - ${apartment.rent} | SiteName`}
203
- description={apartment.description}
204
- image={apartment.photos[0]}
205
- type="product"
206
- />
207
- <ApartmentDetails data={apartment} />
208
- </>
209
- );
210
- }
211
- ```
288
+ **Page without a `namespace`:** it reads the site defaults, the namespace `appConfig.seo.defaultNamespace` (default `home`), for its description, image, type, keywords and author, never for its title: its title is its own `seo.fullTitle` / `seo.title`, else the site name. Another page's title (the home page's) never lands on it.
212
289
 
213
- **Works in SSR/prerender** - meta tags are in initial HTML.
290
+ (`routeSeo` in core `headTags.ts`, written once: AutoMetaTags, the Vite prerendered pages, llms.txt page labels (`routeTitle`, the same chain), and the Next metadata manifest of `getMetadataForPath`, which the plain-Node build reads from `config/utils/headTags.js`, generated from `headTags.ts` by `bun run bpr`.)
214
291
 
215
- ### Entity-derived: `<Seo entity data>`
292
+ ---
216
293
 
217
- ```tsx
218
- <Seo entity={apartmentEntity} data={apartment} type="product" />
219
- ```
294
+ ## Entity-derived identity
220
295
 
221
- `deriveEntitySeo` (`@donotdev/core`) builds the identity; explicit props win.
296
+ `deriveEntitySeo` (`@donotdev/core`) builds a record's identity, the same on the Next entity page metadata, llms.txt and the CRUD breadcrumb:
222
297
 
223
298
  - **title:** `listCardFields.title` texts, formatted exactly like the CRUD card (`formatFieldText`: select labels, numbers in the locale, `displayKey`, `displayValue`), joined with `titleSeparator`; empty fields dropped. No slot layout: first `text` field.
224
299
  - **description:** first long-text field with a value (textarea/richtext, HTML stripped), else the card subtitle texts then content texts (joined ` · `). Max 160 chars.
225
- - **JSON-LD (`type="product"`):** `offers` when a price/currency field is positive; `offers.availability` from the record `status`: `available` → `https://schema.org/InStock`, other statuses only when mapped (unmapped → no `availability`). Needs `status` in the record the page renders, so a guest-visible `status` field: the base `status` field is `visibility: 'admin'`, so guests (crawlers) get no `availability` unless the entity declares its own `status` with `visibility: 'guest'`. Availability that depends on private data (e.g. stock shown to professionals only) is not emitted: leave it unmapped.
300
+ - **JSON-LD (PageMeta `seo.type: 'product'`):** `offers` when a price/currency field is positive; `offers.availability` from the record `status`: `available` → `https://schema.org/InStock`, other statuses only when mapped (unmapped → no `availability`). Needs `status` in the record the public reader returns, so a guest-visible `status` field: the base `status` field is `visibility: 'admin'`, so guests (crawlers) get no `availability` unless the entity declares its own `status` with `visibility: 'guest'`. Availability that depends on private data (e.g. stock shown to professionals only) is not emitted: leave it unmapped.
226
301
  - **Overrides:** entity `seo` option.
227
302
 
228
303
  ```ts
@@ -240,89 +315,31 @@ defineEntity({
240
315
 
241
316
  ---
242
317
 
243
- ## Sitemap & llms.txt: One URL Set
318
+ ## Robots: `noindex`, Never robots.txt
244
319
 
245
- Both list the same pages, generated from `src/pages` - no app code:
320
+ Google's rule: robots.txt does not keep a page out of the index (a blocked URL linked elsewhere can still be indexed, without a description), and a `noindex` on a page robots.txt blocks is never read. So:
246
321
 
247
- - **In:** public static routes, plus one URL per public record (`status` not in `HIDDEN_STATUSES`: any status except `draft`/`deleted`) of each single-param route's entity (`/produits/:slug` → `meta.entity` collection). Never a `:param` template.
248
- - **Out:** `auth.required` routes and `seo: { noindex: true }` routes.
249
- - **URLs:** absolute, from `seo.baseUrl` or `NEXT_PUBLIC_APP_URL` / `VITE_APP_URL`. A production build with a localhost URL fails.
250
- - **llms.txt labels (app default language):** page = namespace `title` → `seo.title` → namespace `meta.fullTitle` → `seo.fullTitle` (a static page with none fails the build); entity record = `deriveEntitySeo` title/description (same as `<Seo entity data>`); entity section = `namePlural` of its `entity-*` translations.
251
- - **Next:** `src/app/sitemap.xml/route.next.ts` and `src/app/llms.txt/route.next.ts`, revalidated hourly (`appConfig.revalidate`: other lifetime in seconds, or `false` until the next deploy). Entity definitions come from the app's `entities` package.
252
- - **Vite:** written at build; static pages only (same as the Vite sitemap).
322
+ - **robots.txt** (generated, Vite and Next) disallows non-page paths only: `Disallow: /api`, and on Vite `Disallow: /_shell` (the SPA shell's own URL, `/_shell` and `/_shell.html`; the pages the hosting rewrites to it keep their URL and stay crawlable, so the shell carries no robots tag). Every page is crawlable, auth-only pages included. AI crawler groups (`appConfig.seo.aiCrawlers`) are separate.
323
+ - **Auth-only pages** (PageMeta `auth`): `<meta name="robots" content="noindex">` by default, from AutoMetaTags: in the server HTML on Next, in the browser on Vite (the Vite prerender skips auth pages). Out of the sitemap and llms.txt.
324
+ - **Opt back in:** `seo: { noindex: false }` (the page stays out of the sitemap). `seo: { noindex: true }` on any page: `noindex, nofollow`, out of the sitemap and llms.txt.
325
+ - **Next routes with server metadata** (entity pages, a page's own `generateMetadata`, blog posts): that metadata owns `robots`. `getMetadataForPath` (`@donotdev/core/next`) applies the same rule (`{ index: false }` on auth-only pages).
253
326
 
254
327
  ---
255
328
 
256
- ## `<Seo>` Props
257
-
258
- ```tsx
259
- <Seo
260
- // Title (pick one)
261
- title="Page Title" // "Page Title | SiteName"
262
- fullTitle="Exact Title" // "Exact Title"
263
-
264
- // Content
265
- description="Page description"
266
- image="/og-image.png"
267
- type="website" // 'website' | 'article' | 'product'
268
- keywords={['key1', 'key2']}
269
- noindex={false}
270
-
271
- // Article-specific
272
- publishDate="2024-01-15T00:00:00Z"
273
- modifiedDate="2024-01-20T00:00:00Z"
274
-
275
- // URL
276
- canonicalUrl="https://example.com/page"
277
- />
278
- ```
279
-
280
- ---
281
-
282
- ## Hook Alternative
283
-
284
- ```tsx
285
- import { useSeo } from '@donotdev/ui';
286
-
287
- export default function ProductPage() {
288
- const { data: product } = useProduct(id);
289
-
290
- const SeoTags = useSeo(product ? {
291
- title: product.name,
292
- description: product.description,
293
- image: product.image,
294
- } : null);
295
-
296
- return (
297
- <>
298
- <SeoTags />
299
- <ProductDetails data={product} />
300
- </>
301
- );
302
- }
303
- ```
304
-
305
- ---
306
-
307
- ## Next.js: Manual `generateMetadata`
308
-
309
- For advanced cases, override in the page file:
310
-
311
- ```tsx
312
- // src/app/products/[id]/page.tsx (manual, not generated)
313
- import type { Metadata } from 'next';
329
+ ## Sitemap & llms.txt: One URL Set
314
330
 
315
- export async function generateMetadata({ params }): Promise<Metadata> {
316
- const product = await fetchProduct(params.id);
317
- return {
318
- title: `${product.name} | Store`,
319
- description: product.description,
320
- openGraph: { images: [product.image] },
321
- };
322
- }
323
- ```
331
+ Both list the same pages, generated from `src/pages` - no app code:
324
332
 
325
- **For static pages, framework handles this automatically.**
333
+ - **In:** public static routes, plus one URL per public record (`status` not in `HIDDEN_STATUSES`: any status except `draft`/`deleted`) of each single-param route whose page declares its entity (`/produits/:slug`, `entity: productEntity` → collection `products`). Never a `:param` template.
334
+ - **Out:** `auth.required` routes, `seo: { noindex: true }` routes, error routes (`/404`, `/not-found`, `/500`, `/error`) and catch-all routes (`/docs/*`: no URL list to expand them from).
335
+ - **RSS:** `<link rel="alternate" type="application/rss+xml">` to `/rss.xml` is in the head only when the app has blog posts (`src/content/blog/*_en.md`), the condition under which the feed is generated (`routes.manifest.hasBlogFeed`).
336
+ - **URLs:** absolute, from `seo.baseUrl` or `NEXT_PUBLIC_APP_URL` / `VITE_APP_URL`. **Deploy vs local build.** A deploy build (`dndev deploy`, which sets `DNDEV_DEPLOY=1`; a Vercel build, `VERCEL=1`; CI, `CI` set and not `false`) fails on a missing or local URL. A local build never fails because of the URL: it publishes the URL it has, localhost included, with one warning line. Without a usable URL, a local Vite build skips what needs one (sitemap.xml, llms.txt, robots.txt, rss.xml, canonical URLs, record pages: one warning line), and a local Next build uses `http://localhost:$PORT` (`next start`'s port, 3000 by default; `isDeployBuild` / `publishedBaseUrl` in core `config/utils/SEOGenerator.js`).
337
+ - **llms.txt labels (app default language):** page = its own title, without ` | SiteName` (`routeTitle` `pageTitle`, the Priority Chain's: `seo.title`, else the namespace `title`; a page without a `namespace`: its `seo.title` only); without one, its full title (`seo.fullTitle`, i18n `meta.fullTitle`), else the site name. A page without a title is listed under the site name on Vite and Next alike, never fails the build nor drops llms.txt; page description = `seo.description` → namespace `description`; entity record = `deriveEntitySeo` title/description (same as the entity page metadata), the site name for a record without a title (its page's title then); entity section = `namePlural` of its `entity-*` translations.
338
+ - **Prerendered pages (Next):** the same records fill each entity page's `generateStaticParams` and resolve its metadata (any other URL of the route is a 404) (`listStaticParams`, one route → collection decision `publicCollection`): every URL of the sitemap's dynamic routes is built at build time (`appConfig.prerenderRecords: false` to opt out).
339
+ - **Reader (Next):** records are read on the server as a signed-out visitor, from the app's public env, never a privileged key: `@donotdev/supabase` (`SupabasePublicReader` from `@donotdev/supabase/server`, RLS decides) or `@donotdev/firebase` (`FirestorePublicReader` from `@donotdev/firebase/public`, Firestore Security Rules decide; they must allow the whole `status not-in` query). Any other provider fails the build when a route lists records.
340
+ - **Read schema (Next and Vite):** every record read (sitemap, llms.txt, entity pages, Vite record pages) passes the entity's read schema (`entityReadSchemas`: `createSchemas(entity).get` per collection), so records keep the entity's field names (`availability_date` stays `availability_date`). The public reader filters nothing: it returns everything the database returns to a signed-out visitor (`SupabasePublicReader`: `select=*`; `FirestorePublicReader`: documents as stored, not validated), whatever a field's `visibility` (`status` and `updatedAt` feed availability and `lastmod`). RLS / Security Rules decide what is public; the derivations output only their own fields.
341
+ - **Next:** `src/app/sitemap.xml/route.next.ts` and `src/app/llms.txt/route.next.ts`, revalidated hourly (`appConfig.revalidate`: other lifetime in seconds, or `false` until the next deploy). Entity definitions and their read schemas come from the app's `entities` package, imported only when the app has entity routes; an entity route in an app without one fails the build (`[dndev-routes] <path> lists published "<collection>" records, read with their entity definition's read schema, but the app does not depend on an `entities` package ...`), the sitemap route included. A file the build fails to write (Next: robots.txt, rss.xml, seo-manifest.json, the sitemap.xml / llms.txt routes, llms-full.txt; Vite SEO plugin: robots.txt, rss.xml, seo-manifest.json, llms-full.txt, `_redirects`) fails a deploy build (`[dndev-seo] <files> not written: <cause>`) and is one warning line on a local build, the other files still written (`seoStep` in core `config/utils/SEOGenerator.js`, the URL check's rule); a build error (misconfigured app) fails every build.
342
+ - **Vite:** `dist/sitemap.xml` and `dist/llms.txt` written after the bundle with the Next builders (`buildSitemap`, `buildLlmsTxt`) over the same routes: every language URL with its alternates, records included (one read, shared with the record pages, same reader and env as Entity pages (Vite)). A record published later is listed by the next build.
326
343
 
327
344
  ---
328
345
 
@@ -331,7 +348,8 @@ export async function generateMetadata({ params }): Promise<Metadata> {
331
348
  - [ ] Set `namespace` in PageMeta for i18n-driven SEO
332
349
  - [ ] Add `title`, `description`, `meta` to translation files
333
350
  - [ ] Use `seo.fullTitle` to escape "Page | App" format
334
- - [ ] Use `<Seo>` for pages with dynamic/fetched data
351
+ - [ ] Entity pages (Next and Vite): nothing to add; set PageMeta `seo.type` (`product`, `article`) and the entity's `seo` option when the card text is not the right title. Vite: the public reader's env at build (see Entity pages (Vite))
352
+ - [ ] Other dynamic pages (Next): export `generateMetadata` from a server page module
335
353
  - [ ] Verify meta tags: View Source or browser DevTools
336
354
 
337
355
  ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@donotdev/ui",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "license": "MIT",
@@ -13,6 +13,10 @@
13
13
  "import": "./dist/index.js",
14
14
  "default": "./dist/index.js"
15
15
  },
16
+ "./rsc": {
17
+ "types": "./dist/rsc.d.ts",
18
+ "react-server": "./dist/rsc.js"
19
+ },
16
20
  "./vite": {
17
21
  "types": "./dist/vite.d.ts",
18
22
  "import": "./dist/vite.js",
@@ -29,6 +33,12 @@
29
33
  "import": "./dist/routing/hooks/hooks.next.js",
30
34
  "default": "./dist/routing/hooks/hooks.next.js"
31
35
  },
36
+ "./routing/link": {
37
+ "types": "./dist/routing/link/link.next.d.ts",
38
+ "vite-app": "./dist/routing/link/link.vite.js",
39
+ "import": "./dist/routing/link/link.next.js",
40
+ "default": "./dist/routing/link/link.next.js"
41
+ },
32
42
  "./dndev.css": "./dist/dndev.css",
33
43
  "./dndev-next.css": "./dist/dndev-next.css"
34
44
  },
@@ -57,13 +67,13 @@
57
67
  "@tanstack/react-query-next-experimental": "5.107.1"
58
68
  },
59
69
  "peerDependencies": {
60
- "@donotdev/ai": "^0.3.0",
61
- "@donotdev/auth": "^0.3.0",
62
- "@donotdev/billing": "^0.3.0",
63
- "@donotdev/components": "^0.3.1",
64
- "@donotdev/core": "^0.3.0",
65
- "@donotdev/crud": "^0.3.0",
66
- "@donotdev/oauth": "^0.3.0",
70
+ "@donotdev/ai": "^0.3.2",
71
+ "@donotdev/auth": "^0.3.2",
72
+ "@donotdev/billing": "^0.3.2",
73
+ "@donotdev/components": "^0.3.3",
74
+ "@donotdev/core": "^0.3.2",
75
+ "@donotdev/crud": "^0.3.2",
76
+ "@donotdev/oauth": "^0.3.2",
67
77
  "@hookform/resolvers": "^5.9.2",
68
78
  "lucide-react": "^0.575.0",
69
79
  "react": "^19.3.1",
@@ -1 +0,0 @@
1
- "use client";import{g as p,n as u,t as g,v as m,w as f}from"./chunk-P2DHZWPY.js";import"./chunk-O2XFH626.js";import{useState as I}from"react";import{Button as k,DataTable as L,Dialog as D,Stack as P,Text as E}from"@donotdev/components";import{useTranslation as w}from"@donotdev/core";import{jsx as i,jsxs as R}from"react/jsx-runtime";function F({entity:t,excludedIds:h,onPick:b,onClose:l}){let{t:s}=w([t.namespace,"crud"]),{t:o}=w("crud"),a=p(t,{pagination:"client"}),y=u(t),[r,v]=I([]),c=a.processed.filter(e=>!h.has(e.id)),d=t.listFields||Object.keys(t.fields),C=d.flatMap(e=>{let n=t.fields[e];return n?[{key:e,title:m(e,n,s),dataIndex:e,sortable:!0,render:(x,S)=>f(x,n,s,{compact:!0,referenceData:y,item:S})}]:[]}),T=s("name",{defaultValue:t.name});return i(D,{open:!0,onOpenChange:e=>{e||l()},title:o("childRows.pickTitle",{entity:T}),footer:R(P,{direction:"row",gap:"tight",justify:"end",children:[i(k,{variant:"outline",onClick:l,children:o("actions.cancel")}),i(k,{intent:"add",disabled:r.length===0,onClick:()=>{b(r),l()},children:o("childRows.pickConfirm",{count:r.length})})]}),children:R(P,{children:[i(g,{entity:t,data:a.items,fieldsToFilter:d}),!a.loading&&c.length===0?i(E,{level:"body",children:o("childRows.pickEmpty")}):i(L,{data:c,columns:C,sortable:!0,searchable:!1,pagination:!0,loading:a.loading,selectable:!0,getRowId:e=>e.id,onSelect:e=>v(e.map(n=>n.id)),showingLabel:o("pagination.showing"),paginationPreviousLabel:o("pagination.previous"),paginationNextLabel:o("pagination.next"),paginationItemsPerPagePlaceholder:o("pagination.itemsPerPagePlaceholder")})]})})}export{F as default};
@@ -1 +0,0 @@
1
- "use client";import{A as b,g as m,k as f,n as h,t as k,v as w,w as P,z as R}from"./chunk-P2DHZWPY.js";import"./chunk-O2XFH626.js";import{Search as V}from"lucide-react";import{useState as v}from"react";import{Button as y,DataTable as j,Dialog as M,Input as U,Stack as C,Text as _}from"@donotdev/components";import{useTranslation as S}from"@donotdev/core";import{jsx as i,jsxs as T}from"react/jsx-runtime";var $="deleted";function q({entity:t,excludedIds:x,viewerRole:E,onPick:I,onClose:a}){let{t:l}=S([t.namespace,"crud"]),{t:o}=S("crud"),r=m(t,{pagination:"client"}),D=h(t),[s,F]=v([]),[c,L]=v(""),d=`${t.collection}#picker`,{filters:A}=f({collection:d}),p=r.items.filter(e=>e.status!==$&&!x.has(e.id)),u=b(R(p,A,t),c,t),g=t.listFields||Object.keys(t.fields),B=g.flatMap(e=>{let n=t.fields[e];return n?[{key:e,title:w(e,n,l),dataIndex:e,sortable:!0,render:(O,Q)=>P(O,n,l,{compact:!0,referenceData:D,item:Q})}]:[]}),K=l("name",{defaultValue:t.name});return i(M,{open:!0,onOpenChange:e=>{e||a()},title:o("childRows.pickTitle",{entity:K}),footer:T(C,{direction:"row",gap:"tight",justify:"end",children:[i(y,{variant:"outline",onClick:a,children:o("actions.cancel")}),i(y,{intent:"add",disabled:s.length===0,onClick:()=>{I(s),a()},children:o("childRows.pickConfirm",{count:s.length})})]}),children:T(C,{children:[i(k,{entity:t,data:p,fieldsToFilter:g,viewerRole:E,filterKey:d}),i(U,{placeholder:o("actions.searchPlaceholder"),value:c,onChange:e=>L(e.target.value),icon:V,className:"dndev-w-full"}),!r.loading&&u.length===0?i(_,{level:"body",children:o("childRows.pickEmpty")}):i(j,{data:u,columns:B,sortable:!0,searchable:!1,pagination:!0,loading:r.loading,selectable:!0,getRowId:e=>e.id,onSelect:e=>F(e.map(n=>n.id)),showingLabel:o("pagination.showing"),paginationPreviousLabel:o("pagination.previous"),paginationNextLabel:o("pagination.next"),paginationItemsPerPagePlaceholder:o("pagination.itemsPerPagePlaceholder")})]})})}export{q as default};
@@ -1 +0,0 @@
1
- "use client";import{g as m,k as f,n as h,t as k,v as P,w as R,y as w,z as v}from"./chunk-LHMKU342.js";import"./chunk-O2XFH626.js";import{Search as V}from"lucide-react";import{useState as b}from"react";import{Button as y,DataTable as j,Dialog as M,Input as $,Stack as C,Text as q}from"@donotdev/components";import{statusCan as z,useTranslation as S}from"@donotdev/core";import{jsx as i,jsxs as T}from"react/jsx-runtime";function G({entity:t,excludedIds:x,viewerRole:I,onPick:F,onClose:a}){let{t:l}=S([t.namespace,"crud"]),{t:o}=S("crud"),s=m(t,{pagination:"client"}),L=h(t),[r,D]=b([]),[c,E]=b(""),d=`${t.collection}#picker`,{filters:B}=f({collection:d}),u=s.items.filter(e=>!z(typeof e.status=="string"?e.status:null,"isRemoved")&&!x.has(e.id)),p=v(w(u,B,t),c,t),g=t.listFields||Object.keys(t.fields),A=g.flatMap(e=>{let n=t.fields[e];return n?[{key:e,title:P(e,n,l),dataIndex:e,sortable:!0,render:(O,Q)=>R(O,n,l,{compact:!0,referenceData:L,item:Q})}]:[]}),K=l("name",{defaultValue:t.name});return i(M,{open:!0,onOpenChange:e=>{e||a()},title:o("childRows.pickTitle",{entity:K}),footer:T(C,{direction:"row",gap:"tight",justify:"end",children:[i(y,{variant:"outline",onClick:a,children:o("actions.cancel")}),i(y,{intent:"add",disabled:r.length===0,onClick:()=>{F(r),a()},children:o("childRows.pickConfirm",{count:r.length})})]}),children:T(C,{children:[i(k,{entity:t,data:u,fieldsToFilter:g,viewerRole:I,filterKey:d}),i($,{placeholder:o("actions.searchPlaceholder"),value:c,onChange:e=>E(e.target.value),icon:V,className:"dndev-w-full"}),!s.loading&&p.length===0?i(q,{level:"body",children:o("childRows.pickEmpty")}):i(j,{data:p,columns:A,sortable:!0,searchable:!1,pagination:!0,loading:s.loading,selectable:!0,getRowId:e=>e.id,onSelect:e=>D(e.map(n=>n.id)),showingLabel:o("pagination.showing"),paginationPreviousLabel:o("pagination.previous"),paginationNextLabel:o("pagination.next"),paginationItemsPerPagePlaceholder:o("pagination.itemsPerPagePlaceholder")})]})})}export{G as default};
@@ -1 +0,0 @@
1
- "use client";import{g as m,k as f,n as h,t as k,v as w,w as P,y as R,z as b}from"./chunk-LHMKU342.js";import"./chunk-O2XFH626.js";import{Search as V}from"lucide-react";import{useState as v}from"react";import{Button as y,DataTable as j,Dialog as M,Input as U,Stack as C,Text as _}from"@donotdev/components";import{useTranslation as S}from"@donotdev/core";import{jsx as i,jsxs as T}from"react/jsx-runtime";var $="deleted";function q({entity:t,excludedIds:x,viewerRole:E,onPick:I,onClose:a}){let{t:l}=S([t.namespace,"crud"]),{t:o}=S("crud"),r=m(t,{pagination:"client"}),D=h(t),[s,F]=v([]),[c,L]=v(""),d=`${t.collection}#picker`,{filters:A}=f({collection:d}),p=r.items.filter(e=>e.status!==$&&!x.has(e.id)),u=b(R(p,A,t),c,t),g=t.listFields||Object.keys(t.fields),B=g.flatMap(e=>{let n=t.fields[e];return n?[{key:e,title:w(e,n,l),dataIndex:e,sortable:!0,render:(O,Q)=>P(O,n,l,{compact:!0,referenceData:D,item:Q})}]:[]}),K=l("name",{defaultValue:t.name});return i(M,{open:!0,onOpenChange:e=>{e||a()},title:o("childRows.pickTitle",{entity:K}),footer:T(C,{direction:"row",gap:"tight",justify:"end",children:[i(y,{variant:"outline",onClick:a,children:o("actions.cancel")}),i(y,{intent:"add",disabled:s.length===0,onClick:()=>{I(s),a()},children:o("childRows.pickConfirm",{count:s.length})})]}),children:T(C,{children:[i(k,{entity:t,data:p,fieldsToFilter:g,viewerRole:E,filterKey:d}),i(U,{placeholder:o("actions.searchPlaceholder"),value:c,onChange:e=>L(e.target.value),icon:V,className:"dndev-w-full"}),!r.loading&&u.length===0?i(_,{level:"body",children:o("childRows.pickEmpty")}):i(j,{data:u,columns:B,sortable:!0,searchable:!1,pagination:!0,loading:r.loading,selectable:!0,getRowId:e=>e.id,onSelect:e=>F(e.map(n=>n.id)),showingLabel:o("pagination.showing"),paginationPreviousLabel:o("pagination.previous"),paginationNextLabel:o("pagination.next"),paginationItemsPerPagePlaceholder:o("pagination.itemsPerPagePlaceholder")})]})})}export{q as default};
@@ -1 +0,0 @@
1
- import"./chunk-O2XFH626.js";import{Cookie as w,Settings as W,Shield as G,BarChart3 as K,Target as V}from"lucide-react";import{useState as v,useEffect as y,useRef as q}from"react";import{Accordion as X,Button as m,BUTTON_VARIANT as f,Card as $,Switch as J,Text as u,cn as Q,Stack as s}from"@donotdev/components";import{handleError as Z,useConsent as d,getCookieExamples as S,hasOptionalCookies as ee}from"@donotdev/core";import{CONSENT_CATEGORY as r}from"@donotdev/core";import{useTranslation as te}from"@donotdev/core";import{isClient as ne}from"@donotdev/core";import{Fragment as se,jsx as n,jsxs as a}from"react/jsx-runtime";var oe=480;function ie({position:N="bottom",className:O=""}){let p=d("hasConsented"),g=d("categories"),D=d("acceptAll"),B=d("declineAll"),I=d("updateCategory"),k=d("showBanner"),{t:e}=te("cookies"),[C,E]=v(!1),[h,l]=v(!p||k),[A,b]=v(g),T=q(null),[L,P]=v(!1);y(()=>P(!0),[]),y(()=>{k&&l(!0)},[k]);let R=Object.keys(g),U=[{id:r.NECESSARY,icon:G,title:e("essentialCookies"),description:e("essentialDescription"),examples:S("necessary")||e("essentialExamples"),locked:!0},{id:r.FUNCTIONAL,icon:w,title:e("functionalCookies"),description:e("functionalDescription"),examples:S("functional")||e("functionalExamples"),legalNotice:e("functionalLegalNotice"),locked:!1},{id:r.ANALYTICS,icon:K,title:e("analyticsCookies"),description:e("analyticsDescription"),examples:S("analytics")||e("analyticsExamples"),locked:!1},{id:r.MARKETING,icon:V,title:e("marketingCookies"),description:e("marketingDescription"),examples:S("marketing")||e("marketingExamples"),locked:!1}].filter(t=>R.includes(t.id)),x=ee(),c=!x;if(y(()=>{let t={...g};if(C){let o=t;Object.keys(o).forEach(i=>{i!==r.NECESSARY&&o[i]===!1&&(o[i]=!0)})}b(t)},[g,C]),y(()=>{if(!ne()||p||!h||c)return;let t=i=>{T.current&&!T.current.contains(i.target)&&l(!1)},o=setTimeout(()=>{document.addEventListener("mousedown",t)},100);return()=>{clearTimeout(o),document.removeEventListener("mousedown",t)}},[p,h,c]),!L||p&&!k)return null;let M=()=>{try{Object.entries(A).forEach(([t,o])=>{if(t!==r.NECESSARY&&o!==void 0){let i=t;Object.values(r).includes(i)&&I(i,!!o)}}),E(!1),l(!1)}catch(t){Z(t,{userMessage:"Error saving preferences",context:{operation:"save_preferences"},severity:"warning",log:!0,reportToSentry:!1,showNotification:!1})}},z=()=>{D(),l(!1)},H=()=>{B(),l(!1)},Y=a(s,{gap:"medium",children:[n(u,{as:"p",variant:"muted",level:"small",style:{lineHeight:1.55},children:e(c?"necessaryOnlyDescription":"cookieBannerDescription")}),x&&n(X,{type:"single",collapsible:!0,value:C?"preferences":"",onValueChange:t=>E(t==="preferences"),items:[{value:"preferences",trigger:a(s,{direction:"row",align:"center",gap:"tight",children:[n(W,{className:"dndev-size-sm"}),n(u,{as:"span",level:"small",weight:"medium",children:e("customize")})]}),content:n(s,{gap:"tight",children:U.map(t=>{let o=t.icon,i=A[t.id]??!1;return a(s,{direction:"row",align:"start",justify:"between",gap:"medium",style:{padding:"0.75rem",borderRadius:"var(--radius-surface, 0.5rem)",background:"var(--muted)"},children:[a(s,{direction:"row",align:"start",gap:"tight",style:{flex:1,minWidth:0},children:[n(o,{className:"dndev-size-sm",style:{color:"var(--primary)",marginTop:"0.15rem",flexShrink:0}}),a(s,{gap:"none",style:{minWidth:0},children:[n(u,{as:"span",level:"small",weight:"semibold",children:t.title}),n(u,{as:"span",variant:"muted",level:"caption",style:{lineHeight:1.45},children:t.description})]})]}),t.locked?n(u,{as:"span",variant:"muted",level:"caption",weight:"medium",style:{flexShrink:0},children:e("alwaysOn")}):n(J,{checked:i,onCheckedChange:F=>b(_=>({..._,[t.id]:F}))})]},t.id)})})}]})]}),j=C?a(s,{direction:"row",gap:"tight",style:{width:"100%"},children:[n(m,{onClick:()=>E(!1),variant:f.OUTLINE,style:{flex:1},children:e("form.cancel","Cancel")}),n(m,{onClick:M,variant:f.DEFAULT,style:{flex:1},children:e("savePreferences","Save Preferences")})]}):a(s,{direction:"row",gap:"tight",style:{width:"100%"},children:[x&&n(m,{onClick:H,variant:f.OUTLINE,style:{flex:1},children:e("declineOptional")}),n(m,{onClick:z,variant:f.DEFAULT,style:{flex:1},children:e(c?"acknowledge":"acceptAll")})]});return a(se,{children:[h&&n($,{ref:T,elevated:!0,icon:w,title:e(c?"necessaryOnlyTitle":"cookiePreferences"),content:Y,footer:j,className:Q("dndev-fixed dndev-z-modal",O),style:{[N==="top"?"top":"bottom"]:"var(--gap-md)",insetInlineStart:"var(--gap-md)",width:`min(${oe}px, calc(100vw - var(--gap-md) * 2))`,height:"auto"}}),!h&&!p&&!c&&n(m,{onClick:()=>l(!0),variant:f.OUTLINE,floating:!0,icon:w,display:"compact",tooltip:e("cookiePreferences"),"aria-label":e("cookiePreferences"),className:"dndev-fixed dndev-z-toast",style:{[N==="top"?"top":"bottom"]:"var(--gap-md)",insetInlineStart:"var(--gap-md)"}})]})}var fe=ie;export{fe as default};
@@ -1 +0,0 @@
1
- import{b as u,i as T}from"./chunk-MS7ZIW5Z.js";import"./chunk-O2XFH626.js";import{Link as G,Star as I}from"lucide-react";import{useCallback as k,useEffect as D,useRef as O}from"react";import{Badge as S,Command as R,CommandDialog as F}from"@donotdev/components";import{useOverlayStore as v,useTranslation as A}from"@donotdev/core";import{jsx as o,jsxs as t}from"react/jsx-runtime";var E=()=>{let{t:e}=A("dndev"),d=O(null),m=v(a=>a.isCommandDialogOpen),r=v(a=>a.closeCommandDialog),{navigationItems:f,favoriteItems:s,recentItems:i,toggleFavorite:b,isFavorite:c,navigateToItem:h}=T();D(()=>{m&&requestAnimationFrame(()=>{d.current?.focus()})},[m]);let C=k(a=>{h(a),r()},[h,r]),p=k((a,g=!0)=>a.map(n=>({label:n.label,value:n.path,description:n.path!==n.label?n.path:void 0,icon:o(u,{icon:n.icon,fallback:G}),badge:n.badge?o(S,{children:n.badge}):void 0,onSelect:()=>C(n.path),rightSlot:g?o("button",{type:"button",onClick:y=>{y.stopPropagation(),b(n.path)},className:"dndev-command-favorite-button","data-favorited":c(n.path),"aria-label":c(n.path)?e("globalGoTo.unfavorite","Remove from favorites"):e("globalGoTo.favorite","Add to favorites"),children:o(u,{icon:I,className:"dndev-size-sm"})}):void 0})),[C,b,c,e]),l=[];if(s.length>0&&l.push({heading:e("globalGoTo.favorites","Favorites"),items:p(s,!1)}),i.length>0){let a=i.flatMap(g=>p([g],!0));a.length>0&&l.push({heading:e("globalGoTo.recent","Recent"),separator:s.length>0,items:a})}l.push({heading:e("globalGoTo.allPages","All Pages"),separator:s.length>0||i.length>0,items:p(f)});let N=f.length>0;return t(F,{open:m,onOpenChange:a=>a?null:r(),children:[o(R,{placeholder:e("globalGoTo.placeholder","Search pages..."),emptyMessage:N?e("globalGoTo.noResults","No results found."):e("globalGoTo.empty","No pages available."),groups:l}),o("div",{className:"dndev-command-footer",children:t("div",{className:"dndev-command-footer-shortcuts",children:[t("div",{className:"dndev-command-footer-shortcut",children:[o("kbd",{className:"dndev-command-footer-key",children:"\u2318K"}),o("span",{children:e("globalGoTo.shortcutOpen","Open")})]}),t("div",{className:"dndev-command-footer-shortcut",children:[o("kbd",{className:"dndev-command-footer-key",children:"\u2191"}),o("kbd",{className:"dndev-command-footer-key",children:"\u2193"}),o("span",{children:e("globalGoTo.shortcutNavigate","Navigate")})]}),t("div",{className:"dndev-command-footer-shortcut",children:[o("kbd",{className:"dndev-command-footer-key",children:"\u21B5"}),o("span",{children:e("globalGoTo.shortcutSelect","Select")})]}),t("div",{className:"dndev-command-footer-shortcut",children:[o("kbd",{className:"dndev-command-footer-key",children:"Esc"}),o("span",{children:e("globalGoTo.shortcutClose","Close")})]})]})})]})},L=()=>v(d=>d.isCommandDialogOpen)?o(E,{}):null,K=L;export{K as default};
@@ -1 +0,0 @@
1
- import{b as u,i as T}from"./chunk-3CIZFGST.js";import"./chunk-O2XFH626.js";import{Link as G,Star as I}from"lucide-react";import{useCallback as k,useEffect as D,useRef as O}from"react";import{Badge as S,Command as R,CommandDialog as F}from"@donotdev/components";import{useOverlayStore as v,useTranslation as A}from"@donotdev/core";import{jsx as o,jsxs as t}from"react/jsx-runtime";var E=()=>{let{t:e}=A("dndev"),d=O(null),m=v(a=>a.isCommandDialogOpen),r=v(a=>a.closeCommandDialog),{navigationItems:f,favoriteItems:s,recentItems:i,toggleFavorite:b,isFavorite:c,navigateToItem:h}=T();D(()=>{m&&requestAnimationFrame(()=>{d.current?.focus()})},[m]);let C=k(a=>{h(a),r()},[h,r]),p=k((a,g=!0)=>a.map(n=>({label:n.label,value:n.path,description:n.path!==n.label?n.path:void 0,icon:o(u,{icon:n.icon,fallback:G}),badge:n.badge?o(S,{children:n.badge}):void 0,onSelect:()=>C(n.path),rightSlot:g?o("button",{type:"button",onClick:y=>{y.stopPropagation(),b(n.path)},className:"dndev-command-favorite-button","data-favorited":c(n.path),"aria-label":c(n.path)?e("globalGoTo.unfavorite","Remove from favorites"):e("globalGoTo.favorite","Add to favorites"),children:o(u,{icon:I,className:"dndev-size-sm"})}):void 0})),[C,b,c,e]),l=[];if(s.length>0&&l.push({heading:e("globalGoTo.favorites","Favorites"),items:p(s,!1)}),i.length>0){let a=i.flatMap(g=>p([g],!0));a.length>0&&l.push({heading:e("globalGoTo.recent","Recent"),separator:s.length>0,items:a})}l.push({heading:e("globalGoTo.allPages","All Pages"),separator:s.length>0||i.length>0,items:p(f)});let N=f.length>0;return t(F,{open:m,onOpenChange:a=>a?null:r(),children:[o(R,{placeholder:e("globalGoTo.placeholder","Search pages..."),emptyMessage:N?e("globalGoTo.noResults","No results found."):e("globalGoTo.empty","No pages available."),groups:l}),o("div",{className:"dndev-command-footer",children:t("div",{className:"dndev-command-footer-shortcuts",children:[t("div",{className:"dndev-command-footer-shortcut",children:[o("kbd",{className:"dndev-command-footer-key",children:"\u2318K"}),o("span",{children:e("globalGoTo.shortcutOpen","Open")})]}),t("div",{className:"dndev-command-footer-shortcut",children:[o("kbd",{className:"dndev-command-footer-key",children:"\u2191"}),o("kbd",{className:"dndev-command-footer-key",children:"\u2193"}),o("span",{children:e("globalGoTo.shortcutNavigate","Navigate")})]}),t("div",{className:"dndev-command-footer-shortcut",children:[o("kbd",{className:"dndev-command-footer-key",children:"\u21B5"}),o("span",{children:e("globalGoTo.shortcutSelect","Select")})]}),t("div",{className:"dndev-command-footer-shortcut",children:[o("kbd",{className:"dndev-command-footer-key",children:"Esc"}),o("span",{children:e("globalGoTo.shortcutClose","Close")})]})]})})]})},L=()=>v(d=>d.isCommandDialogOpen)?o(E,{}):null,K=L;export{K as default};
@@ -1 +0,0 @@
1
- import*as p from"lucide-react";import{isValidElement as P}from"react";import{cn as f}from"@donotdev/components";import*as b from"lucide-react";var x=b;function C(e){return typeof e=="function"||typeof e=="object"&&e!==null&&"render"in e}function y(e){let t=x[e];return C(t)?t:void 0}import{jsx as c}from"react/jsx-runtime";function S(e){if(!e)return p.Palette;let t=e.replace(/['"]/g,"");return y(t)||p.Palette}var k=({icon:e,fallback:t,className:i,ariaHidden:s=!1})=>{let o=e||t;if(!o)return null;let a="dndev-size-md";if(typeof o=="function"||typeof o=="object"&&o!==null&&"render"in o)return c(o,{className:f(a,i),style:{flexShrink:0},"aria-hidden":s});if(typeof o=="string"){if(!/^[a-zA-Z0-9_-]+$/.test(o))return c("span",{className:f(a,i),style:{display:"inline-flex",alignItems:"center",justifyContent:"center"},"aria-hidden":s,children:o});let d=S(o);return c(d,{className:f(a,i),style:{flexShrink:0},"aria-hidden":s})}return P(o)?c("span",{className:i,style:{display:"inline-flex",alignItems:"center",justifyContent:"center"},"aria-hidden":s,children:o}):c("span",{className:i,style:{display:"inline-flex",alignItems:"center",justifyContent:"center"},"aria-hidden":s,children:o})},W=k;import*as h from"@donotdev/auth";import{DEGRADED_AUTH_API as T}from"@donotdev/core";var m=h?.useAuth;function E(e){return T[e]}function v(e){return m?m(e):E(e)}var B=typeof m=="function",J=h?.PasswordResetCallback??(()=>null);import{useMemo as A}from"react";import{filterNavigationRoutes as K,useNavigationStore as j,useTranslation as F}from"@donotdev/core";import{USER_ROLES as w}from"@donotdev/core";import{useRoutePath as U}from"@donotdev/ui/routing/hooks";function g(){let e=U(),t=v("user"),i=!!t,{t:s}=F(),o=t?.role||w.GUEST,a=j(r=>r.cache.allRoutes);return A(()=>K(a,{authenticated:i,role:o}).map(r=>({...r,label:_(r,s),isActive:D(r.path,e),hasChildren:!1,children:void 0})).sort((r,l)=>r.label.localeCompare(l.label,void 0,{sensitivity:"base"})),[a,i,o,e,s])}function oe(e){let t=g();return A(()=>t.find(i=>i.path===e),[t,e])}function _(e,t){let i=e.meta?.namespace;return typeof i!="string"||i===""?e.label:t(`${i}:title`,{defaultValue:e.label})}function D(e,t){return e==="/"?t==="/":t===e?!0:t.startsWith(e+"/")}import{useCallback as V}from"react";import{useNavigationStore as u}from"@donotdev/core";import{useNavigate as z}from"@donotdev/ui/routing/hooks";var ue=()=>{let e=z(),t=g()??[],i=u(n=>n.favorites),s=u(n=>n.recent),o=u(n=>n.toggleFavorite),a=u(n=>n.isFavorite),r=u(n=>n.addRecent),l=t.length?t.filter(n=>i.includes(n.path)):[],d=t.length?t.filter(n=>s.includes(n.path)).slice(0,5):[],R=n=>{o(n)},L=n=>a(n),I=n=>{r(n)},N=V(n=>{I(n),e(n)},[e,I]);return{navigationItems:t,favoriteItems:l,recentItems:d,toggleFavorite:R,isFavorite:L,navigateToItem:N}};export{y as a,k as b,W as c,v as d,B as e,J as f,g,oe as h,ue as i};
@@ -1 +0,0 @@
1
- import*as e from"@donotdev/crud";var r=typeof e?.useCrud=="function",o=e?.useEntityForm,t=e?.useFormStore,s=e?.FormNavigationProvider,n=e?.useFormError,u=e?.useFieldConditions,i=e?.useCrud,d=e?.useCrudList,l=e?.useCrudDoc,a=e?.useCrudCardList,p=e?.useEntityFavorites,c=e?.useCrudFilters,F=e?.useCrudPageSize,x=e?.useEntityWorkflow,C=e?.useReferenceResolver,m=e?.useChildRows,y=e?.useJoinedForm,v=e?.DisplayFieldRenderer,E=e?.FormFieldRenderer,R=e?.UploadProvider,f=e?.EntityFilters,L=e?.CrudCard,P=e?.translateFieldLabel,S=e?.formatValue,b=e?.translateLabel,g=e?.applyFilters,h=e?.applySearch;export{r as a,o as b,t as c,n as d,u as e,i as f,d as g,l as h,a as i,p as j,c as k,F as l,x as m,C as n,m as o,y as p,v as q,E as r,R as s,f as t,L as u,P as v,S as w,b as x,g as y,h as z};
@@ -1 +0,0 @@
1
- import*as p from"lucide-react";import{isValidElement as P}from"react";import{cn as f}from"@donotdev/components";import*as b from"lucide-react";var x=b;function C(e){return typeof e=="function"||typeof e=="object"&&e!==null&&"render"in e}function y(e){let t=x[e];return C(t)?t:void 0}import{jsx as c}from"react/jsx-runtime";function E(e){if(!e)return p.Palette;let t=e.replace(/['"]/g,"");return y(t)||p.Palette}var S=({icon:e,fallback:t,className:i,ariaHidden:s=!1})=>{let o=e||t;if(!o)return null;let a="dndev-size-md";if(typeof o=="function"||typeof o=="object"&&o!==null&&"render"in o)return c(o,{className:f(a,i),style:{flexShrink:0},"aria-hidden":s});if(typeof o=="string"){if(!/^[a-zA-Z0-9_-]+$/.test(o))return c("span",{className:f(a,i),style:{display:"inline-flex",alignItems:"center",justifyContent:"center"},"aria-hidden":s,children:o});let d=E(o);return c(d,{className:f(a,i),style:{flexShrink:0},"aria-hidden":s})}return P(o)?c("span",{className:i,style:{display:"inline-flex",alignItems:"center",justifyContent:"center"},"aria-hidden":s,children:o}):c("span",{className:i,style:{display:"inline-flex",alignItems:"center",justifyContent:"center"},"aria-hidden":s,children:o})},$=S;import*as v from"@donotdev/auth";import{DEGRADED_AUTH_API as k}from"@donotdev/core";var m=v?.useAuth;function T(e){return k[e]}function h(e){return m?m(e):T(e)}var q=typeof m=="function",B=v?.PasswordResetCallback??(()=>null);import{useMemo as A}from"react";import{useNavigationStore as K,useTranslation as F}from"@donotdev/core";import{USER_ROLES as w}from"@donotdev/core";import{useRoutePath as _}from"@donotdev/ui/routing/hooks";function g(){let e=_(),t=h("user"),i=!!t,{t:s}=F(),o=t?.role||w.GUEST,a=K(r=>!r||typeof r.getFilteredRoutes!="function"?[]:r.getFilteredRoutes({authenticated:i,role:o}));return A(()=>Array.isArray(a)?a.map(r=>({...r,label:j(r,s),isActive:D(r.path,e),hasChildren:!1,children:void 0})).sort((r,l)=>r.label.localeCompare(l.label,void 0,{sensitivity:"base"})):[],[a,e,s])}function ne(e){let t=g();return A(()=>t.find(i=>i.path===e),[t,e])}function j(e,t){let i=e.meta?.namespace;return typeof i!="string"||i===""?e.label:t(`${i}:title`,{defaultValue:e.label})}function D(e,t){return e==="/"?t==="/":t===e?!0:t.startsWith(e+"/")}import{useCallback as V}from"react";import{useNavigationStore as u}from"@donotdev/core";import{useNavigate as U}from"@donotdev/ui/routing/hooks";var ce=()=>{let e=U(),t=g()??[],i=u(n=>n.favorites),s=u(n=>n.recent),o=u(n=>n.toggleFavorite),a=u(n=>n.isFavorite),r=u(n=>n.addRecent),l=t.length?t.filter(n=>i.includes(n.path)):[],d=t.length?t.filter(n=>s.includes(n.path)).slice(0,5):[],R=n=>{o(n)},N=n=>a(n),I=n=>{r(n)},L=V(n=>{I(n),e(n)},[e,I]);return{navigationItems:t,favoriteItems:l,recentItems:d,toggleFavorite:R,isFavorite:N,navigateToItem:L}};export{y as a,S as b,$ as c,h as d,q as e,B as f,g,ne as h,ce as i};
@@ -1 +0,0 @@
1
- var d=Object.defineProperty;var e=(b,a,c)=>a in b?d(b,a,{enumerable:!0,configurable:!0,writable:!0,value:c}):b[a]=c;var f=(b,a,c)=>e(b,typeof a!="symbol"?a+"":a,c);export{f as a};
@@ -1 +0,0 @@
1
- import*as e from"@donotdev/crud";var r=typeof e?.useCrud=="function",o=e?.useEntityForm,t=e?.useFormStore,s=e?.FormNavigationProvider,i=e?.useFormError,n=e?.useFieldConditions,u=e?.useCrud,d=e?.useCrudList,l=e?.useCrudDoc,a=e?.useCrudCardList,p=e?.useEntityFavorites,c=e?.useCrudFilters,F=e?.useCrudPageSize,x=e?.useEntityWorkflow,C=e?.useReferenceResolver,m=e?.useChildRows,y=e?.useJoinedForm,E=e?.DisplayFieldRenderer,v=e?.FormFieldRenderer,R=e?.UploadProvider,f=e?.EntityFilters,L=e?.CrudCard,b=e?.translateFieldLabel,P=e?.formatValue,S=e?.translateLabel,g=e?.isFieldEditable,h=e?.applyFilters,w=e?.applySearch;export{r as a,o as b,t as c,i as d,n as e,u as f,d as g,l as h,a as i,p as j,c as k,F as l,x as m,C as n,m as o,y as p,E as q,v as r,R as s,f as t,L as u,b as v,P as w,S as x,g as y,h as z,w as A};
@@ -1,9 +0,0 @@
1
- import type { LucideIcon } from 'lucide-react';
2
- /**
3
- * Finds a Lucide icon component by its export name (e.g. `"Rocket"`).
4
- *
5
- * @param name - Lucide export name
6
- * @returns The icon component, or undefined when no icon export has that name
7
- */
8
- export declare function findLucideIcon(name: string): LucideIcon | undefined;
9
- //# sourceMappingURL=lucideIconByName.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lucideIconByName.d.ts","sourceRoot":"","sources":["../../../src/components/common/lucideIconByName.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAkB/C;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAGnE"}