@donotdev/ui 0.1.0 → 0.1.42

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 (370) hide show
  1. package/LICENSE.md +21 -242
  2. package/README.md +1 -19
  3. package/assets/apple-touch-icon.png +0 -0
  4. package/assets/favicon.ico +0 -0
  5. package/assets/fonts/Inter-latin-ext.woff2 +0 -0
  6. package/assets/fonts/Inter-latin.woff2 +0 -0
  7. package/assets/fonts/PlayfairDisplay-latin-ext.woff2 +0 -0
  8. package/assets/fonts/PlayfairDisplay-latin.woff2 +0 -0
  9. package/assets/fonts/Roboto-400-cyrillic-ext.woff2 +0 -0
  10. package/assets/fonts/Roboto-400-cyrillic.woff2 +0 -0
  11. package/assets/fonts/Roboto-400-greek-ext.woff2 +0 -0
  12. package/assets/fonts/Roboto-400-greek.woff2 +0 -0
  13. package/assets/fonts/Roboto-400-latin-ext.woff2 +0 -0
  14. package/assets/fonts/Roboto-400-latin.woff2 +0 -0
  15. package/assets/fonts/Roboto-400-vietnamese.woff2 +0 -0
  16. package/assets/fonts/Roboto-700-cyrillic-ext.woff2 +0 -0
  17. package/assets/fonts/Roboto-700-cyrillic.woff2 +0 -0
  18. package/assets/fonts/Roboto-700-greek-ext.woff2 +0 -0
  19. package/assets/fonts/Roboto-700-greek.woff2 +0 -0
  20. package/assets/fonts/Roboto-700-latin-ext.woff2 +0 -0
  21. package/assets/fonts/Roboto-700-latin.woff2 +0 -0
  22. package/assets/fonts/Roboto-700-vietnamese.woff2 +0 -0
  23. package/assets/icon-192x192.png +0 -0
  24. package/assets/icon-512x512.png +0 -0
  25. package/assets/logo.png +0 -0
  26. package/assets/logo.svg +1 -1
  27. package/assets/manifest.json +0 -0
  28. package/dist/CookieConsent-5NH5DNTP.js +1 -0
  29. package/dist/{GoToDialog-CR4VOVXT.js → GoToDialog-CICRYHHG.js} +1 -1
  30. package/dist/chunk-MIPTBUWY.js +1 -0
  31. package/dist/components/auth/AuthHeader.d.ts +6 -1
  32. package/dist/components/auth/AuthHeader.d.ts.map +1 -1
  33. package/dist/components/auth/AuthHeader.js +4 -4
  34. package/dist/components/common/FeatureCard.d.ts +11 -6
  35. package/dist/components/common/FeatureCard.d.ts.map +1 -1
  36. package/dist/components/common/FeatureCard.js +43 -32
  37. package/dist/components/common/FeatureDisabled.d.ts +1 -0
  38. package/dist/components/common/FeatureDisabled.d.ts.map +1 -1
  39. package/dist/components/common/TechBento.d.ts +1 -0
  40. package/dist/components/common/TechBento.d.ts.map +1 -1
  41. package/dist/components/common/icon.d.ts +1 -0
  42. package/dist/components/common/icon.d.ts.map +1 -1
  43. package/dist/components/cookie-consent/CookieConsent.d.ts +4 -3
  44. package/dist/components/cookie-consent/CookieConsent.d.ts.map +1 -1
  45. package/dist/components/cookie-consent/CookieConsent.js +36 -35
  46. package/dist/components/index.d.ts +0 -1
  47. package/dist/components/index.d.ts.map +1 -1
  48. package/dist/components/index.js +0 -1
  49. package/dist/components/layout/PageConfig.d.ts +25 -0
  50. package/dist/components/layout/PageConfig.d.ts.map +1 -0
  51. package/dist/components/layout/PageConfig.js +47 -0
  52. package/dist/components/layout/components/Breadcrumbs.d.ts +2 -0
  53. package/dist/components/layout/components/Breadcrumbs.d.ts.map +1 -1
  54. package/dist/components/layout/components/FloatingLanguageSwitcher.d.ts +1 -0
  55. package/dist/components/layout/components/FloatingLanguageSwitcher.d.ts.map +1 -1
  56. package/dist/components/layout/components/header/AppBranding.d.ts +1 -0
  57. package/dist/components/layout/components/header/AppBranding.d.ts.map +1 -1
  58. package/dist/components/layout/components/header/AppIcon.d.ts +1 -0
  59. package/dist/components/layout/components/header/AppIcon.d.ts.map +1 -1
  60. package/dist/components/layout/components/header/AppTitle.d.ts +1 -0
  61. package/dist/components/layout/components/header/AppTitle.d.ts.map +1 -1
  62. package/dist/components/layout/components/header/CacheSettings.d.ts.map +1 -1
  63. package/dist/components/layout/components/header/CacheSettings.js +6 -2
  64. package/dist/components/layout/components/header/GameTitle.d.ts +1 -0
  65. package/dist/components/layout/components/header/GameTitle.d.ts.map +1 -1
  66. package/dist/components/layout/components/header/HeaderMenu.d.ts +1 -0
  67. package/dist/components/layout/components/header/HeaderMenu.d.ts.map +1 -1
  68. package/dist/components/layout/components/header/HeaderNavigation.d.ts +1 -0
  69. package/dist/components/layout/components/header/HeaderNavigation.d.ts.map +1 -1
  70. package/dist/components/layout/components/header/SettingsMenu.d.ts +1 -0
  71. package/dist/components/layout/components/header/SettingsMenu.d.ts.map +1 -1
  72. package/dist/components/layout/index.d.ts +1 -0
  73. package/dist/components/layout/index.d.ts.map +1 -1
  74. package/dist/components/layout/index.js +1 -0
  75. package/dist/crud/components/EntityCardList.d.ts +1 -1
  76. package/dist/crud/components/EntityCardList.d.ts.map +1 -1
  77. package/dist/crud/components/EntityCardList.js +47 -23
  78. package/dist/crud/components/EntityDisplayRenderer.d.ts +1 -1
  79. package/dist/crud/components/EntityDisplayRenderer.d.ts.map +1 -1
  80. package/dist/crud/components/EntityDisplayRenderer.js +14 -13
  81. package/dist/crud/components/EntityFormRenderer.d.ts +6 -1
  82. package/dist/crud/components/EntityFormRenderer.d.ts.map +1 -1
  83. package/dist/crud/components/EntityFormRenderer.js +46 -38
  84. package/dist/crud/components/EntityList.d.ts +1 -1
  85. package/dist/crud/components/EntityList.d.ts.map +1 -1
  86. package/dist/crud/components/EntityList.js +80 -80
  87. package/dist/crud/components/EntityRecommendations.d.ts +1 -1
  88. package/dist/crud/components/EntityRecommendations.d.ts.map +1 -1
  89. package/dist/crud/components/EntityRecommendations.js +4 -4
  90. package/dist/crud/components/EntityWorkflow.d.ts.map +1 -1
  91. package/dist/crud/components/EntityWorkflow.js +1 -1
  92. package/dist/crud/crudImports.d.ts +1 -1
  93. package/dist/crud/crudImports.d.ts.map +1 -1
  94. package/dist/crud/crudImports.js +1 -1
  95. package/dist/dndev-next.css +831 -171
  96. package/dist/dndev.css +1000 -185
  97. package/dist/files/inter-cyrillic-300-normal.woff +0 -0
  98. package/dist/files/inter-cyrillic-300-normal.woff2 +0 -0
  99. package/dist/files/inter-cyrillic-400-normal.woff +0 -0
  100. package/dist/files/inter-cyrillic-400-normal.woff2 +0 -0
  101. package/dist/files/inter-cyrillic-600-normal.woff +0 -0
  102. package/dist/files/inter-cyrillic-600-normal.woff2 +0 -0
  103. package/dist/files/inter-cyrillic-700-normal.woff +0 -0
  104. package/dist/files/inter-cyrillic-700-normal.woff2 +0 -0
  105. package/dist/files/inter-cyrillic-ext-300-normal.woff +0 -0
  106. package/dist/files/inter-cyrillic-ext-300-normal.woff2 +0 -0
  107. package/dist/files/inter-cyrillic-ext-400-normal.woff +0 -0
  108. package/dist/files/inter-cyrillic-ext-400-normal.woff2 +0 -0
  109. package/dist/files/inter-cyrillic-ext-600-normal.woff +0 -0
  110. package/dist/files/inter-cyrillic-ext-600-normal.woff2 +0 -0
  111. package/dist/files/inter-cyrillic-ext-700-normal.woff +0 -0
  112. package/dist/files/inter-cyrillic-ext-700-normal.woff2 +0 -0
  113. package/dist/files/inter-greek-300-normal.woff +0 -0
  114. package/dist/files/inter-greek-300-normal.woff2 +0 -0
  115. package/dist/files/inter-greek-400-normal.woff +0 -0
  116. package/dist/files/inter-greek-400-normal.woff2 +0 -0
  117. package/dist/files/inter-greek-600-normal.woff +0 -0
  118. package/dist/files/inter-greek-600-normal.woff2 +0 -0
  119. package/dist/files/inter-greek-700-normal.woff +0 -0
  120. package/dist/files/inter-greek-700-normal.woff2 +0 -0
  121. package/dist/files/inter-greek-ext-300-normal.woff +0 -0
  122. package/dist/files/inter-greek-ext-300-normal.woff2 +0 -0
  123. package/dist/files/inter-greek-ext-400-normal.woff +0 -0
  124. package/dist/files/inter-greek-ext-400-normal.woff2 +0 -0
  125. package/dist/files/inter-greek-ext-600-normal.woff +0 -0
  126. package/dist/files/inter-greek-ext-600-normal.woff2 +0 -0
  127. package/dist/files/inter-greek-ext-700-normal.woff +0 -0
  128. package/dist/files/inter-greek-ext-700-normal.woff2 +0 -0
  129. package/dist/files/inter-latin-300-normal.woff +0 -0
  130. package/dist/files/inter-latin-300-normal.woff2 +0 -0
  131. package/dist/files/inter-latin-400-normal.woff +0 -0
  132. package/dist/files/inter-latin-400-normal.woff2 +0 -0
  133. package/dist/files/inter-latin-600-normal.woff +0 -0
  134. package/dist/files/inter-latin-600-normal.woff2 +0 -0
  135. package/dist/files/inter-latin-700-normal.woff +0 -0
  136. package/dist/files/inter-latin-700-normal.woff2 +0 -0
  137. package/dist/files/inter-latin-ext-300-normal.woff +0 -0
  138. package/dist/files/inter-latin-ext-300-normal.woff2 +0 -0
  139. package/dist/files/inter-latin-ext-400-normal.woff +0 -0
  140. package/dist/files/inter-latin-ext-400-normal.woff2 +0 -0
  141. package/dist/files/inter-latin-ext-600-normal.woff +0 -0
  142. package/dist/files/inter-latin-ext-600-normal.woff2 +0 -0
  143. package/dist/files/inter-latin-ext-700-normal.woff +0 -0
  144. package/dist/files/inter-latin-ext-700-normal.woff2 +0 -0
  145. package/dist/files/inter-vietnamese-300-normal.woff +0 -0
  146. package/dist/files/inter-vietnamese-300-normal.woff2 +0 -0
  147. package/dist/files/inter-vietnamese-400-normal.woff +0 -0
  148. package/dist/files/inter-vietnamese-400-normal.woff2 +0 -0
  149. package/dist/files/inter-vietnamese-600-normal.woff +0 -0
  150. package/dist/files/inter-vietnamese-600-normal.woff2 +0 -0
  151. package/dist/files/inter-vietnamese-700-normal.woff +0 -0
  152. package/dist/files/inter-vietnamese-700-normal.woff2 +0 -0
  153. package/dist/files/playfair-display-cyrillic-400-normal.woff +0 -0
  154. package/dist/files/playfair-display-cyrillic-400-normal.woff2 +0 -0
  155. package/dist/files/playfair-display-cyrillic-500-normal.woff +0 -0
  156. package/dist/files/playfair-display-cyrillic-500-normal.woff2 +0 -0
  157. package/dist/files/playfair-display-cyrillic-600-normal.woff +0 -0
  158. package/dist/files/playfair-display-cyrillic-600-normal.woff2 +0 -0
  159. package/dist/files/playfair-display-cyrillic-700-normal.woff +0 -0
  160. package/dist/files/playfair-display-cyrillic-700-normal.woff2 +0 -0
  161. package/dist/files/playfair-display-latin-400-normal.woff +0 -0
  162. package/dist/files/playfair-display-latin-400-normal.woff2 +0 -0
  163. package/dist/files/playfair-display-latin-500-normal.woff +0 -0
  164. package/dist/files/playfair-display-latin-500-normal.woff2 +0 -0
  165. package/dist/files/playfair-display-latin-600-normal.woff +0 -0
  166. package/dist/files/playfair-display-latin-600-normal.woff2 +0 -0
  167. package/dist/files/playfair-display-latin-700-normal.woff +0 -0
  168. package/dist/files/playfair-display-latin-700-normal.woff2 +0 -0
  169. package/dist/files/playfair-display-latin-ext-400-normal.woff +0 -0
  170. package/dist/files/playfair-display-latin-ext-400-normal.woff2 +0 -0
  171. package/dist/files/playfair-display-latin-ext-500-normal.woff +0 -0
  172. package/dist/files/playfair-display-latin-ext-500-normal.woff2 +0 -0
  173. package/dist/files/playfair-display-latin-ext-600-normal.woff +0 -0
  174. package/dist/files/playfair-display-latin-ext-600-normal.woff2 +0 -0
  175. package/dist/files/playfair-display-latin-ext-700-normal.woff +0 -0
  176. package/dist/files/playfair-display-latin-ext-700-normal.woff2 +0 -0
  177. package/dist/files/playfair-display-vietnamese-400-normal.woff +0 -0
  178. package/dist/files/playfair-display-vietnamese-400-normal.woff2 +0 -0
  179. package/dist/files/playfair-display-vietnamese-500-normal.woff +0 -0
  180. package/dist/files/playfair-display-vietnamese-500-normal.woff2 +0 -0
  181. package/dist/files/playfair-display-vietnamese-600-normal.woff +0 -0
  182. package/dist/files/playfair-display-vietnamese-600-normal.woff2 +0 -0
  183. package/dist/files/playfair-display-vietnamese-700-normal.woff +0 -0
  184. package/dist/files/playfair-display-vietnamese-700-normal.woff2 +0 -0
  185. package/dist/files/press-start-2p-cyrillic-400-normal.woff +0 -0
  186. package/dist/files/press-start-2p-cyrillic-400-normal.woff2 +0 -0
  187. package/dist/files/press-start-2p-cyrillic-ext-400-normal.woff +0 -0
  188. package/dist/files/press-start-2p-cyrillic-ext-400-normal.woff2 +0 -0
  189. package/dist/files/press-start-2p-greek-400-normal.woff +0 -0
  190. package/dist/files/press-start-2p-greek-400-normal.woff2 +0 -0
  191. package/dist/files/press-start-2p-latin-400-normal.woff +0 -0
  192. package/dist/files/press-start-2p-latin-400-normal.woff2 +0 -0
  193. package/dist/files/press-start-2p-latin-ext-400-normal.woff +0 -0
  194. package/dist/files/press-start-2p-latin-ext-400-normal.woff2 +0 -0
  195. package/dist/files/roboto-cyrillic-400-normal.woff +0 -0
  196. package/dist/files/roboto-cyrillic-400-normal.woff2 +0 -0
  197. package/dist/files/roboto-cyrillic-700-normal.woff +0 -0
  198. package/dist/files/roboto-cyrillic-700-normal.woff2 +0 -0
  199. package/dist/files/roboto-cyrillic-ext-400-normal.woff +0 -0
  200. package/dist/files/roboto-cyrillic-ext-400-normal.woff2 +0 -0
  201. package/dist/files/roboto-cyrillic-ext-700-normal.woff +0 -0
  202. package/dist/files/roboto-cyrillic-ext-700-normal.woff2 +0 -0
  203. package/dist/files/roboto-greek-400-normal.woff +0 -0
  204. package/dist/files/roboto-greek-400-normal.woff2 +0 -0
  205. package/dist/files/roboto-greek-700-normal.woff +0 -0
  206. package/dist/files/roboto-greek-700-normal.woff2 +0 -0
  207. package/dist/files/roboto-greek-ext-400-normal.woff +0 -0
  208. package/dist/files/roboto-greek-ext-400-normal.woff2 +0 -0
  209. package/dist/files/roboto-greek-ext-700-normal.woff +0 -0
  210. package/dist/files/roboto-greek-ext-700-normal.woff2 +0 -0
  211. package/dist/files/roboto-latin-400-normal.woff +0 -0
  212. package/dist/files/roboto-latin-400-normal.woff2 +0 -0
  213. package/dist/files/roboto-latin-700-normal.woff +0 -0
  214. package/dist/files/roboto-latin-700-normal.woff2 +0 -0
  215. package/dist/files/roboto-latin-ext-400-normal.woff +0 -0
  216. package/dist/files/roboto-latin-ext-400-normal.woff2 +0 -0
  217. package/dist/files/roboto-latin-ext-700-normal.woff +0 -0
  218. package/dist/files/roboto-latin-ext-700-normal.woff2 +0 -0
  219. package/dist/files/roboto-math-400-normal.woff +0 -0
  220. package/dist/files/roboto-math-400-normal.woff2 +0 -0
  221. package/dist/files/roboto-math-700-normal.woff +0 -0
  222. package/dist/files/roboto-math-700-normal.woff2 +0 -0
  223. package/dist/files/roboto-symbols-400-normal.woff +0 -0
  224. package/dist/files/roboto-symbols-400-normal.woff2 +0 -0
  225. package/dist/files/roboto-symbols-700-normal.woff +0 -0
  226. package/dist/files/roboto-symbols-700-normal.woff2 +0 -0
  227. package/dist/files/roboto-vietnamese-400-normal.woff +0 -0
  228. package/dist/files/roboto-vietnamese-400-normal.woff2 +0 -0
  229. package/dist/files/roboto-vietnamese-700-normal.woff +0 -0
  230. package/dist/files/roboto-vietnamese-700-normal.woff2 +0 -0
  231. package/dist/files/space-grotesk-latin-300-normal.woff +0 -0
  232. package/dist/files/space-grotesk-latin-300-normal.woff2 +0 -0
  233. package/dist/files/space-grotesk-latin-400-normal.woff +0 -0
  234. package/dist/files/space-grotesk-latin-400-normal.woff2 +0 -0
  235. package/dist/files/space-grotesk-latin-500-normal.woff +0 -0
  236. package/dist/files/space-grotesk-latin-500-normal.woff2 +0 -0
  237. package/dist/files/space-grotesk-latin-600-normal.woff +0 -0
  238. package/dist/files/space-grotesk-latin-600-normal.woff2 +0 -0
  239. package/dist/files/space-grotesk-latin-700-normal.woff +0 -0
  240. package/dist/files/space-grotesk-latin-700-normal.woff2 +0 -0
  241. package/dist/files/space-grotesk-latin-ext-300-normal.woff +0 -0
  242. package/dist/files/space-grotesk-latin-ext-300-normal.woff2 +0 -0
  243. package/dist/files/space-grotesk-latin-ext-400-normal.woff +0 -0
  244. package/dist/files/space-grotesk-latin-ext-400-normal.woff2 +0 -0
  245. package/dist/files/space-grotesk-latin-ext-500-normal.woff +0 -0
  246. package/dist/files/space-grotesk-latin-ext-500-normal.woff2 +0 -0
  247. package/dist/files/space-grotesk-latin-ext-600-normal.woff +0 -0
  248. package/dist/files/space-grotesk-latin-ext-600-normal.woff2 +0 -0
  249. package/dist/files/space-grotesk-latin-ext-700-normal.woff +0 -0
  250. package/dist/files/space-grotesk-latin-ext-700-normal.woff2 +0 -0
  251. package/dist/files/space-grotesk-vietnamese-300-normal.woff +0 -0
  252. package/dist/files/space-grotesk-vietnamese-300-normal.woff2 +0 -0
  253. package/dist/files/space-grotesk-vietnamese-400-normal.woff +0 -0
  254. package/dist/files/space-grotesk-vietnamese-400-normal.woff2 +0 -0
  255. package/dist/files/space-grotesk-vietnamese-500-normal.woff +0 -0
  256. package/dist/files/space-grotesk-vietnamese-500-normal.woff2 +0 -0
  257. package/dist/files/space-grotesk-vietnamese-600-normal.woff +0 -0
  258. package/dist/files/space-grotesk-vietnamese-600-normal.woff2 +0 -0
  259. package/dist/files/space-grotesk-vietnamese-700-normal.woff +0 -0
  260. package/dist/files/space-grotesk-vietnamese-700-normal.woff2 +0 -0
  261. package/dist/index.js +4 -4
  262. package/dist/internal/common/ErrorFallback.js +1 -1
  263. package/dist/internal/devtools/DebugTools.js +1 -1
  264. package/dist/internal/devtools/components/DesignTab.d.ts.map +1 -1
  265. package/dist/internal/devtools/components/DesignTab.js +6 -2
  266. package/dist/internal/devtools/utils/envVarDiscovery.d.ts.map +1 -1
  267. package/dist/internal/devtools/utils/envVarDiscovery.js +4 -5
  268. package/dist/internal/devtools/utils/virtualModuleInspector.d.ts.map +1 -1
  269. package/dist/internal/devtools/utils/virtualModuleInspector.js +13 -0
  270. package/dist/internal/initializers/BaseStoresInitializer.d.ts +3 -1
  271. package/dist/internal/initializers/BaseStoresInitializer.d.ts.map +1 -1
  272. package/dist/internal/initializers/BaseStoresInitializer.js +17 -4
  273. package/dist/internal/initializers/NextJsStoresInitializer.d.ts +1 -1
  274. package/dist/internal/initializers/NextJsStoresInitializer.d.ts.map +1 -1
  275. package/dist/internal/initializers/NextJsStoresInitializer.js +2 -13
  276. package/dist/internal/layout/DnDevLayout.d.ts.map +1 -1
  277. package/dist/internal/layout/DnDevLayout.js +65 -23
  278. package/dist/internal/layout/components/AutoMetaTags.d.ts.map +1 -1
  279. package/dist/internal/layout/components/AutoMetaTags.js +57 -29
  280. package/dist/internal/layout/components/NextJsAutoMetaTags.d.ts +2 -0
  281. package/dist/internal/layout/components/NextJsAutoMetaTags.d.ts.map +1 -1
  282. package/dist/internal/layout/components/NextJsAutoMetaTags.js +45 -15
  283. package/dist/internal/layout/components/PWAUpdateNotification.d.ts.map +1 -1
  284. package/dist/internal/layout/components/PWAUpdateNotification.js +15 -2
  285. package/dist/internal/layout/config/presets/moolti.d.ts.map +1 -1
  286. package/dist/internal/layout/config/presets/moolti.js +11 -13
  287. package/dist/internal/layout/zones/DnDevFooter.d.ts +3 -1
  288. package/dist/internal/layout/zones/DnDevFooter.d.ts.map +1 -1
  289. package/dist/internal/layout/zones/DnDevFooter.js +5 -1
  290. package/dist/internal/layout/zones/DnDevHeader.d.ts +3 -1
  291. package/dist/internal/layout/zones/DnDevHeader.d.ts.map +1 -1
  292. package/dist/internal/layout/zones/DnDevHeader.js +7 -2
  293. package/dist/internal/layout/zones/DnDevSidebar.d.ts +3 -1
  294. package/dist/internal/layout/zones/DnDevSidebar.d.ts.map +1 -1
  295. package/dist/internal/layout/zones/DnDevSidebar.js +9 -3
  296. package/dist/providers/NextJsAppProviders.d.ts.map +1 -1
  297. package/dist/providers/NextJsAppProviders.js +14 -8
  298. package/dist/routing/AuthGuard.d.ts +7 -22
  299. package/dist/routing/AuthGuard.d.ts.map +1 -1
  300. package/dist/routing/AuthGuard.js +19 -64
  301. package/dist/routing/AuthReturnTo.d.ts +13 -0
  302. package/dist/routing/AuthReturnTo.d.ts.map +1 -0
  303. package/dist/routing/AuthReturnTo.js +61 -0
  304. package/dist/routing/DnDevNavigationMenu.d.ts +1 -0
  305. package/dist/routing/DnDevNavigationMenu.d.ts.map +1 -1
  306. package/dist/routing/GoTo.d.ts +1 -0
  307. package/dist/routing/GoTo.d.ts.map +1 -1
  308. package/dist/routing/GoToInput.d.ts.map +1 -1
  309. package/dist/routing/GoToInput.js +5 -5
  310. package/dist/routing/Link.d.ts.map +1 -1
  311. package/dist/routing/Link.js +14 -0
  312. package/dist/routing/hooks/hooks.next.js +1 -1
  313. package/dist/routing/hooks/hooks.vite.js +1 -1
  314. package/dist/routing/hooks/useNavigate.next.d.ts +4 -0
  315. package/dist/routing/hooks/useNavigate.next.d.ts.map +1 -1
  316. package/dist/routing/hooks/useNavigate.next.js +10 -7
  317. package/dist/routing/hooks/useNavigate.vite.d.ts +4 -0
  318. package/dist/routing/hooks/useNavigate.vite.d.ts.map +1 -1
  319. package/dist/routing/hooks/useNavigate.vite.js +16 -13
  320. package/dist/routing/hooks/useRedirectGuard.next.d.ts +2 -0
  321. package/dist/routing/hooks/useRedirectGuard.next.d.ts.map +1 -1
  322. package/dist/routing/hooks/useRedirectGuard.next.js +15 -27
  323. package/dist/routing/hooks/useRedirectGuard.vite.d.ts +2 -0
  324. package/dist/routing/hooks/useRedirectGuard.vite.d.ts.map +1 -1
  325. package/dist/routing/hooks/useRedirectGuard.vite.js +15 -27
  326. package/dist/routing/index.d.ts +1 -0
  327. package/dist/routing/index.d.ts.map +1 -1
  328. package/dist/routing/index.js +1 -0
  329. package/dist/routing/useGoTo.d.ts.map +1 -1
  330. package/dist/routing/useGoTo.js +12 -17
  331. package/dist/styles/index.css +1000 -185
  332. package/dist/symbol-index.json +1 -0
  333. package/dist/utils/index.d.ts +1 -0
  334. package/dist/utils/index.d.ts.map +1 -1
  335. package/dist/utils/index.js +1 -0
  336. package/dist/utils/sanitizeSvg.d.ts +4 -0
  337. package/dist/utils/sanitizeSvg.d.ts.map +1 -1
  338. package/dist/utils/sanitizeSvg.js +4 -0
  339. package/dist/utils/useAISafe.d.ts +28 -0
  340. package/dist/utils/useAISafe.d.ts.map +1 -0
  341. package/dist/utils/useAISafe.js +53 -0
  342. package/dist/utils/useAuthSafe.d.ts +39 -0
  343. package/dist/utils/useAuthSafe.d.ts.map +1 -1
  344. package/dist/utils/useAuthSafe.js +5 -0
  345. package/dist/utils/useAuthVisibility.d.ts +1 -0
  346. package/dist/utils/useAuthVisibility.d.ts.map +1 -1
  347. package/dist/utils/useBillingVisibility.d.ts +1 -0
  348. package/dist/utils/useBillingVisibility.d.ts.map +1 -1
  349. package/dist/utils/useSeo.d.ts +121 -0
  350. package/dist/utils/useSeo.d.ts.map +1 -0
  351. package/dist/utils/useSeo.js +116 -0
  352. package/dist/vite-routing/AppRoutes.d.ts.map +1 -1
  353. package/dist/vite-routing/AppRoutes.js +20 -5
  354. package/dist/vite-routing/RootLayout.d.ts.map +1 -1
  355. package/dist/vite-routing/RootLayout.js +6 -7
  356. package/guidelines/COMPONENTS.md +136 -0
  357. package/guidelines/GOTCHAS.md +66 -0
  358. package/guidelines/LAYOUTS.md +310 -0
  359. package/guidelines/PAGES.md +205 -0
  360. package/guidelines/ROUTING.md +499 -0
  361. package/guidelines/SEO.md +275 -0
  362. package/package.json +17 -12
  363. package/dist/CookieConsent-UVTR7CWW.js +0 -1
  364. package/dist/chunk-XHGRMKOY.js +0 -1
  365. package/dist/components/license/LicenseWatermark.d.ts +0 -25
  366. package/dist/components/license/LicenseWatermark.d.ts.map +0 -1
  367. package/dist/components/license/LicenseWatermark.js +0 -109
  368. package/dist/components/license/watermarkData.d.ts +0 -7
  369. package/dist/components/license/watermarkData.d.ts.map +0 -1
  370. package/dist/components/license/watermarkData.js +0 -18
@@ -1 +1 @@
1
- {"version":3,"file":"AppRoutes.d.ts","sourceRoot":"","sources":["../../src/vite-routing/AppRoutes.tsx"],"names":[],"mappings":"AAoDA,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAgB,MAAM,gBAAgB,CAAC;AAQ3E,OAAO,KAAK,EAAE,aAAa,EAAkC,MAAM,OAAO,CAAC;AAG3E,yEAAyE;AACzE,KAAK,oBAAoB,GACrB,CAAC,MAAM,OAAO,CAAC;IAAE,OAAO,EAAE,aAAa,CAAA;CAAE,CAAC,CAAC,GAC3C,MAAM,CAAC;AAiIX;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;CAChC;AAED,4DAA4D;AAC5D,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,oBAAoB,CAAC;IAChC,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED;;GAEG;AACH,UAAU,sBAAsB;IAC9B,4CAA4C;IAC5C,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oCAAoC;IACpC,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,sBAAsB,yCAiF9D"}
1
+ {"version":3,"file":"AppRoutes.d.ts","sourceRoot":"","sources":["../../src/vite-routing/AppRoutes.tsx"],"names":[],"mappings":"AAoDA,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAgB,MAAM,gBAAgB,CAAC;AAQ3E,OAAO,KAAK,EAAE,aAAa,EAAkC,MAAM,OAAO,CAAC;AAG3E,yEAAyE;AACzE,KAAK,oBAAoB,GACrB,CAAC,MAAM,OAAO,CAAC;IAAE,OAAO,EAAE,aAAa,CAAA;CAAE,CAAC,CAAC,GAC3C,MAAM,CAAC;AAmJX;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;CAChC;AAED,4DAA4D;AAC5D,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,oBAAoB,CAAC;IAChC,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED;;GAEG;AACH,UAAU,sBAAsB;IAC9B,4CAA4C;IAC5C,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oCAAoC;IACpC,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,sBAAsB,yCA0F9D"}
@@ -35,7 +35,7 @@ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
35
35
  * @version 0.1.0
36
36
  * @since 0.0.1
37
37
  * @author AMBROISE PARK Consulting
38
- * @license Commercial
38
+ * @license MIT
39
39
  *
40
40
  * @example
41
41
  * ```tsx
@@ -97,6 +97,14 @@ function getRoutePreset(meta) {
97
97
  }
98
98
  return undefined;
99
99
  }
100
+ /** Extract hideBreadcrumbs from route meta */
101
+ function getRouteHideBreadcrumbs(meta) {
102
+ if (meta && typeof meta === 'object' && 'hideBreadcrumbs' in meta) {
103
+ const hide = meta.hideBreadcrumbs;
104
+ return typeof hide === 'boolean' ? hide : undefined;
105
+ }
106
+ return undefined;
107
+ }
100
108
  /**
101
109
  * LayoutRoute - Per-route preset switcher
102
110
  *
@@ -107,12 +115,19 @@ function getRoutePreset(meta) {
107
115
  *
108
116
  * Uses useLayoutEffect to apply before paint, avoiding visual flash.
109
117
  */
110
- const LayoutRoute = ({ preset, children, }) => {
118
+ const LayoutRoute = ({ preset, hideBreadcrumbs, children, }) => {
111
119
  const setRoutePresetOverride = useLayout('setRoutePresetOverride');
120
+ const setRouteHideBreadcrumbs = useLayout('setRouteHideBreadcrumbs');
112
121
  useLayoutEffect(() => {
113
122
  // Set route override (or null to clear and use app default)
114
123
  setRoutePresetOverride(preset ?? null);
115
- }, [preset, setRoutePresetOverride]);
124
+ setRouteHideBreadcrumbs(hideBreadcrumbs ?? false);
125
+ }, [
126
+ preset,
127
+ hideBreadcrumbs,
128
+ setRoutePresetOverride,
129
+ setRouteHideBreadcrumbs,
130
+ ]);
116
131
  return _jsx(_Fragment, { children: children });
117
132
  };
118
133
  /**
@@ -210,7 +225,7 @@ export function createAppRouter(options) {
210
225
  console.warn('[DoNotDev] HomePage has auth config but the index route is always public. ' +
211
226
  'Auth config on HomePage is ignored. Use a different page as your protected entry point.');
212
227
  }
213
- return (_jsx(LayoutRoute, { preset: getRoutePreset(homePageRoute.meta), children: _jsx(LazyRoute, { component: homePageRoute.component, path: homePageRoute.path }) }));
228
+ return (_jsx(LayoutRoute, { preset: getRoutePreset(homePageRoute.meta), hideBreadcrumbs: getRouteHideBreadcrumbs(homePageRoute.meta), children: _jsx(LazyRoute, { component: homePageRoute.component, path: homePageRoute.path }) }));
214
229
  })(),
215
230
  },
216
231
  /** All other routes are discovered and rendered here */
@@ -218,7 +233,7 @@ export function createAppRouter(options) {
218
233
  .filter((route) => route.path !== '/')
219
234
  .map((route) => ({
220
235
  path: route.path.startsWith('/') ? route.path.slice(1) : route.path,
221
- element: route.parsedAuth === false ? (_jsx(LayoutRoute, { preset: getRoutePreset(route.meta), children: _jsx(LazyRoute, { component: route.component, path: route.path }) })) : (_jsx(LayoutRoute, { preset: getRoutePreset(route.meta), children: _jsx(AuthGuard, { auth: route.parsedAuth, children: _jsx(LazyRoute, { component: route.component, path: route.path }) }) })),
236
+ element: route.parsedAuth === false ? (_jsx(LayoutRoute, { preset: getRoutePreset(route.meta), hideBreadcrumbs: getRouteHideBreadcrumbs(route.meta), children: _jsx(LazyRoute, { component: route.component, path: route.path }) })) : (_jsx(LayoutRoute, { preset: getRoutePreset(route.meta), hideBreadcrumbs: getRouteHideBreadcrumbs(route.meta), children: _jsx(AuthGuard, { auth: route.parsedAuth, children: _jsx(LazyRoute, { component: route.component, path: route.path }) }) })),
222
237
  })),
223
238
  // 404 catch-all route (must be last)
224
239
  {
@@ -1 +1 @@
1
- {"version":3,"file":"RootLayout.d.ts","sourceRoot":"","sources":["../../src/vite-routing/RootLayout.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AA0LnD;;GAEG;AACH,UAAU,oBAAoB;IAC5B,2BAA2B;IAC3B,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,UAAU,CAAC,EAAE,MAAM,EAAE,EAAE,oBAAoB,2CAgC1D"}
1
+ {"version":3,"file":"RootLayout.d.ts","sourceRoot":"","sources":["../../src/vite-routing/RootLayout.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAuLnD;;GAEG;AACH,UAAU,oBAAoB;IAC5B,2BAA2B;IAC3B,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,UAAU,CAAC,EAAE,MAAM,EAAE,EAAE,oBAAoB,2CAiC1D"}
@@ -17,6 +17,8 @@ import { Outlet, useLocation } from 'react-router-dom';
17
17
  import { globalEmitter, isClient, QueryProviders } from '@donotdev/core';
18
18
  import { DnDevLayout } from '../internal/layout/DnDevLayout';
19
19
  import { UIProviders } from '../internal/providers/UIProviders';
20
+ import { PasswordResetCallback } from '../utils/useAuthSafe';
21
+ import { AuthReturnTo } from '../routing/AuthReturnTo';
20
22
  // Only lazy load non-critical components (not in render path)
21
23
  const AutoMetaTags = lazy(() => import('../internal/layout/components/AutoMetaTags').then((m) => ({
22
24
  default: m.default,
@@ -27,9 +29,6 @@ const ConsentBanner = lazy(() => import('../components/cookie-consent/ConsentBan
27
29
  const PWAUpdateNotification = lazy(() => import('../internal/layout/components/PWAUpdateNotification').then((m) => ({
28
30
  default: m.default,
29
31
  })));
30
- const LicenseWatermark = lazy(() => import('../components/license/LicenseWatermark').then((m) => ({
31
- default: m.LicenseWatermark,
32
- })));
33
32
  const RedirectOverlay = lazy(() => import('../components/common/RedirectOverlay').then((m) => ({
34
33
  default: m.RedirectOverlay,
35
34
  })));
@@ -76,9 +75,9 @@ function CustomScrollRestoration() {
76
75
  prevLocationKey.current = location.key;
77
76
  // Cleanup: Keep only last 20 positions to prevent memory leaks
78
77
  if (scrollPositions.current.size > 20) {
79
- const firstKey = scrollPositions.current.keys().next().value;
80
- if (firstKey) {
81
- scrollPositions.current.delete(firstKey);
78
+ for (const key of scrollPositions.current.keys()) {
79
+ scrollPositions.current.delete(key);
80
+ break;
82
81
  }
83
82
  }
84
83
  }, [location.pathname, location.key]);
@@ -202,5 +201,5 @@ function RouteReadySignal({ children }) {
202
201
  * @author AMBROISE PARK Consulting
203
202
  */
204
203
  export function RootLayout({ layout }) {
205
- return (_jsx(QueryProviders, { children: _jsxs(UIProviders, { children: [_jsx(Suspense, { fallback: null, children: _jsx(AutoMetaTags, {}) }), _jsxs(FrameworkReadySignal, { children: [_jsx(DnDevLayout, { layout: layout, children: _jsx(RouteReadySignal, { children: _jsx(Outlet, {}) }) }), _jsx(CustomScrollRestoration, {}), _jsxs(Suspense, { fallback: null, children: [_jsx(ConsentBanner, {}), _jsx(PWAUpdateNotification, {}), _jsx(LicenseWatermark, {}), _jsx(RedirectOverlay, {})] })] })] }) }));
204
+ return (_jsx(QueryProviders, { children: _jsxs(UIProviders, { children: [_jsx(Suspense, { fallback: null, children: _jsx(AutoMetaTags, {}) }), _jsxs(FrameworkReadySignal, { children: [_jsx(DnDevLayout, { layout: layout, children: _jsx(RouteReadySignal, { children: _jsx(Outlet, {}) }) }), _jsx(CustomScrollRestoration, {}), _jsx(AuthReturnTo, {}), _jsxs(Suspense, { fallback: null, children: [_jsx(ConsentBanner, {}), _jsx(PasswordResetCallback, {}), _jsx(PWAUpdateNotification, {}), _jsx(RedirectOverlay, {})] })] })] }) }));
206
205
  }
@@ -0,0 +1,136 @@
1
+ # UI Components Reference
2
+
3
+ **Check JSDoc in your IDE** - Hover over any component import to see props, types, and examples.
4
+
5
+ **Import from:** `@donotdev/ui` (layout/composition components)
6
+
7
+ ---
8
+
9
+ ## Layout Components
10
+
11
+ - **PageContainer** - Page wrapper with width constraints, spacing, and density system.
12
+ - **GameContainer** - Game preset container with fixed header/footer layout.
13
+ - **GameFlow** - Game flow component for step-by-step game interfaces.
14
+
15
+ ---
16
+
17
+ ## Layout Sub-Components
18
+
19
+ - **AppBranding** - App branding display with logo and name.
20
+ - **AppIcon** - App icon component.
21
+ - **AppTitle** - App title display component.
22
+ - **GameTitle** - Game title component for game preset.
23
+ - **Breadcrumbs** - Breadcrumb navigation component.
24
+ - **HeaderNavigation** - Header navigation menu component.
25
+ - **DropdownNavigation** - Dropdown navigation menu.
26
+ - **HeaderMenu** - Header menu component.
27
+ - **SettingsMenu** - Settings menu component.
28
+ - **ThemeToggle** - Theme toggle button component.
29
+ - **CacheSettings** - Cache settings component.
30
+ - **Notifications** - Notifications component.
31
+ - **FloatingLanguageSwitcher** - Floating language selector component.
32
+
33
+ ---
34
+
35
+ ## Auth Components
36
+
37
+ - **AuthHeader** - Header component with authentication UI (sign in/out, user menu).
38
+ - **AuthMenu** - Authentication menu component.
39
+
40
+ ---
41
+
42
+ ## Helpers
43
+
44
+ - **tList(t, key, count, icon?, size?)** - Translated array as List. Default: CheckCircle icon. Pass `null` for no icon (use with emoji labels).
45
+
46
+ ---
47
+
48
+ ## Common Components
49
+
50
+ - **FeatureDisabled** - Component shown when features are disabled.
51
+ - **Icon** - Icon component wrapper.
52
+ - **ProgressBar** - Progress bar component.
53
+ - **Skeleton** - Skeleton loading component (consumer use, not used internally).
54
+ - **FeatureCard** - Feature showcase card component.
55
+ - **TechBento** - Tech stack showcase component.
56
+
57
+ ---
58
+
59
+ ## Routing Components
60
+
61
+ - **Link** - Platform-agnostic link component (works in Vite + Next.js).
62
+ - **AuthGuard** - Route guard component for protected routes.
63
+ - **AuthGuardFallback** - Fallback component for auth-guarded routes.
64
+ - **GoTo** - Programmatic navigation component.
65
+ - **GoToWrapper** - Wrapper for GoTo navigation.
66
+ - **GoToInput** - Input component for GoTo navigation.
67
+ - **GoToDialog** - Dialog for GoTo navigation.
68
+ - **DnDevNavigationMenu** - Framework navigation menu component.
69
+ - **NotFoundPage** - 404 page component.
70
+
71
+ ---
72
+
73
+ ## Routing Hooks
74
+
75
+ - **useNavigate** - Navigate to routes programmatically.
76
+ - **useBack** - Navigate back in history.
77
+ - **useRefresh** - Refresh current route.
78
+ - **usePrefetch** - Prefetch route data.
79
+ - **useLocation** - Get current location.
80
+ - **useParams** - Get route parameters.
81
+ - **useSearchParams** - Get URL search parameters. Returns `URLSearchParams` directly (NOT a tuple). Use `.get('key')` to read values.
82
+ - **useMatch** - Match current route pattern.
83
+ - **useQueryParams** - Get and set query parameters.
84
+ - **useRedirectGuard** - Guard against redirects.
85
+ - **useNavigation** - Navigation state and methods.
86
+ - **useGoTo** - GoTo navigation hook.
87
+ - **useRouteDiscovery** - Route discovery hook.
88
+
89
+ ---
90
+
91
+ ## Cookie Consent
92
+
93
+ - **CookieConsent** - Cookie consent management component.
94
+ - **ConsentBanner** - Cookie consent banner component.
95
+
96
+ ---
97
+
98
+ ## Platform-Specific Providers
99
+
100
+ - **ViteAppProviders** - App providers for Vite (import from `@donotdev/ui/vite`).
101
+ - **NextJsAppProviders** - App providers for Next.js (import from `@donotdev/ui/next`).
102
+
103
+ ---
104
+
105
+ ## CRUD Display Components (from @donotdev/ui)
106
+
107
+ - **DisplayFieldRenderer** - Renders read-only field displays.
108
+ - **EntityDisplayRenderer** - Renders complete entity displays.
109
+ - **TextFieldDisplay** - Text field display component.
110
+ - **BadgeFieldDisplay** - Badge field display component.
111
+ - **AvatarFieldDisplay** - Avatar field display component.
112
+ - **LinkFieldDisplay** - Link field display component.
113
+ - **DateFieldDisplay** - Date field display component.
114
+ - **NumberFieldDisplay** - Number field display component.
115
+ - **PhoneNumberDisplay** - Phone number display component.
116
+ - **TextAreaDisplay** - Textarea display component.
117
+ - **CheckboxFieldDisplay** - Checkbox display component.
118
+ - **DropdownDisplay** - Dropdown display component.
119
+ - **MultiDropdownDisplay** - Multi-select dropdown display component.
120
+ - **MultiInputTextFieldDisplay** - Multi-input text field display component.
121
+ - **RadioFieldDisplay** - Radio field display component.
122
+ - **RangeFieldDisplay** - Range field display component.
123
+ - **FileFieldDisplay** - File field display component.
124
+ - **ImageFieldDisplay** - Image field display component.
125
+ - **GeoPointFieldDisplay** - GeoPoint field display component.
126
+ - **MapFieldDisplay** - Map field display component.
127
+ - **ReferenceFieldDisplay** - Reference field display component.
128
+ - **TimestampFieldDisplay** - Timestamp field display component.
129
+ - **HiddenFieldDisplay** - Hidden field display component.
130
+ - **ButtonFieldDisplay** - Button field display component.
131
+
132
+ ---
133
+
134
+ **For MVP:** Only `PageContainer` is needed. All other components are optional.
135
+
136
+ **All props documented in JSDoc** - Hover in IDE for complete reference.
@@ -0,0 +1,66 @@
1
+ # Gotchas: @donotdev/ui
2
+
3
+ Common mistakes related to routing, styling, layouts, and UI components.
4
+
5
+ ---
6
+
7
+ ## Routing [Phase 1, 3]
8
+
9
+ **Never import from `react-router-dom` - use framework routing.**
10
+
11
+ ```tsx
12
+ // WRONG - breaks framework features
13
+ import { Link, useNavigate, useParams } from 'react-router-dom';
14
+
15
+ // CORRECT
16
+ import { Link, useNavigate, useParams } from '@donotdev/ui';
17
+ ```
18
+
19
+ **Routes are auto-discovered** from `src/pages/*Page.tsx` with `pageMeta`. Don't use `<Routes>`, `<Route>`, or manual `<Outlet />`.
20
+
21
+ **Use `useRouteParam('id')` for typed route params** - not `useParams()` from react-router-dom.
22
+
23
+ **Navigation is auto-built.** Use `<DnDevNavigationMenu>` or `useNavigationItems()`. Don't build nav manually - you lose auth filtering and route discovery.
24
+
25
+ ---
26
+
27
+ ## Styling [Phase 3, 4]
28
+
29
+ **No inline `fontSize` or `font-size` - use `Text` level prop.**
30
+
31
+ ```tsx
32
+ // WRONG
33
+ <Text style={{ fontSize: '18px' }}>Title</Text>
34
+
35
+ // CORRECT
36
+ <Text level="h2">Title</Text>
37
+ ```
38
+
39
+ Levels: `h1`, `h2`, `h3`, `h4`, `body`, `small`, `caption`. Limit to 2-3 levels per page.
40
+
41
+ **RTL: Always use `start`/`end` - never `left`/`right`.**
42
+
43
+ ```css
44
+ /* WRONG - breaks RTL */
45
+ text-align: left;
46
+
47
+ /* CORRECT - works in both LTR and RTL */
48
+ text-align: start;
49
+ ```
50
+
51
+ Same for inline styles: `textAlign: 'start'` not `textAlign: 'left'`. Same for data attributes: `data-text-align="start|center|end"`.
52
+
53
+ ---
54
+
55
+ ## Components [Phase 3]
56
+
57
+ **Always `lookup_symbol` before using any `@donotdev` component.** Never guess props.
58
+
59
+ Common wrong props:
60
+ - `Button`: no `size`, `tone`, `gap` - use `variant`, `display`
61
+ - `Text`: no `size`, `tone`, `color` - use `level`, `variant`
62
+ - `Stack`: no `spacing`, `size` - use `gap`
63
+ - `Card`: no `padding`, `margin`, `size` - use `title`, `subtitle`, `content`, `footer`
64
+ - `Grid`: no `columns` - use `cols`
65
+
66
+ **If you can't do it with framework components:** Stop. Tell the user what's missing. Don't invent custom workarounds.
@@ -0,0 +1,310 @@
1
+ # Layouts
2
+
3
+ **Choose preset in `config/app.ts`. Framework handles header, sidebar, footer, auth, themes, languages.**
4
+
5
+ ---
6
+
7
+ ## Standard Use
8
+
9
+ **Choose preset:**
10
+ ```typescript
11
+ // config/app.ts
12
+ export const appConfig: AppConfig = {
13
+ preset: 'landing', // landing | admin | moolti | docs | blog | game | plain
14
+ };
15
+ ```
16
+
17
+ **7 presets:** `landing` (marketing), `admin` (dashboards), `moolti` (SaaS), `docs` (documentation), `blog` (content), `game` (mobile), `plain` (minimal).
18
+
19
+ ---
20
+
21
+ ## Preset Capabilities
22
+
23
+ **The `docs` preset AUTOMATICALLY generates sidebar navigation from your `src/pages` files. You do not need to configure a sidebar manually.**
24
+
25
+ All presets automatically include these components when applicable:
26
+
27
+ * **LanguageSelector** - Automatically shown if more than 1 language is configured
28
+ * **ThemeToggle** - Automatically shown if more than 1 theme is available
29
+ * **AuthMenu** - Automatically shown if auth is configured in `.env` (Firebase keys present)
30
+ * **Navigation Menu** - Automatically generated from `src/pages/*Page.tsx` files for sidebars
31
+ * **GoTo Component** - Command palette (Cmd+K) for quick navigation - always available
32
+ * **Footer** - Automatic footer with copyright and legal links
33
+ * **LegalLinks + Copyright** - Automatically included in footer from `config/legal.ts`
34
+
35
+ **You don't need to add these manually - the framework handles them based on your configuration.**
36
+
37
+ ---
38
+
39
+ ## Per-Route Layout Switching
40
+
41
+ **Override the app preset on a per-page basis via `PageMeta.preset`:**
42
+
43
+ ```tsx
44
+ // src/pages/DashboardPage.tsx
45
+ import type { PageMeta } from '@donotdev/core';
46
+
47
+ export const meta: PageMeta = {
48
+ preset: 'admin', // This route uses admin layout (sidebar, compact density)
49
+ auth: true,
50
+ };
51
+ ```
52
+
53
+ - If `preset` is set - that route uses the specified layout
54
+ - If `preset` is absent - the app's `appConfig.preset` is used
55
+ - The override is **transient** - navigating away restores the next route's preset or the app default
56
+ - No localStorage pollution - route presets are not persisted
57
+
58
+ **Common pattern (SaaS app):**
59
+ | Route | Preset | Purpose |
60
+ |-------|--------|---------|
61
+ | `/` | (app default: `landing`) | Marketing landing page |
62
+ | `/pricing` | (app default: `landing`) | Pricing page |
63
+ | `/dashboard` | `admin` | Dashboard with sidebar |
64
+ | `/products` | `admin` | CRUD with sidebar |
65
+ | `/changelog` | `docs` | Documentation layout |
66
+
67
+ **Reference implementation:** See `packages/cli/templates/app-demo/` for a working example of per-route switching.
68
+
69
+ ---
70
+
71
+ ## Custom Presets
72
+
73
+ **Define your own presets with the same `PresetConfig` shape as built-ins.**
74
+
75
+ `config/app.ts` is strings-only (no React, no JSX). Custom presets with components go in `App.tsx`.
76
+
77
+ ### Zone ownership: slots vs functions
78
+
79
+ Each zone (header, sidebar, footer) supports two config modes:
80
+
81
+ | Config shape | What it means | Framework provides |
82
+ |---|---|---|
83
+ | **Object** (slots) | "I want your layout, my content" | Structure + behavior + visual polish |
84
+ | **Function** | "I own this zone" | Structure + behavior only, no visual polish |
85
+ | **`null`** | "Hide it" | Nothing |
86
+
87
+ **Slots mode** (object) - fill framework slots, get framework styling (background, border, padding):
88
+ ```tsx
89
+ sidebar: {
90
+ top: () => <MyBranding />,
91
+ content: () => <MyNav />,
92
+ bottom: () => <MyProfile />,
93
+ defaultWidth: 280,
94
+ }
95
+ ```
96
+
97
+ **Custom mode** (function) - own the zone visuals, framework provides structural behavior (resize, sticky, grid placement):
98
+ ```tsx
99
+ sidebar: () => <MyFullSidebar />,
100
+ ```
101
+
102
+ In custom mode:
103
+ - **Sidebar** gets resize handle, keyboard nav, collapse for free. No framework background/border.
104
+ - **Header** gets grid-area, height, sticky, z-index. No framework background/border/padding.
105
+ - **Footer** gets grid-area, z-index, grid-column span. No framework background/border/min-height/padding.
106
+
107
+ **Your component must NOT render the semantic wrapper** (`<aside>`, `<header>`, `<footer>`) - the framework handles that. Render a `<div>` or fragment as your root.
108
+
109
+ ### Example: custom preset with full zone ownership
110
+
111
+ ```tsx
112
+ // App.tsx
113
+ import type { LayoutPreset, PresetConfig } from '@donotdev/core';
114
+ import { ViteAppProviders } from '@donotdev/ui/vite';
115
+
116
+ import { MyGameHud } from './components/MyGameHud';
117
+ import { MyToolPanel } from './components/MyToolPanel';
118
+ import { appConfig } from './config/app';
119
+
120
+ const customPresets: Record<string, PresetConfig> = {
121
+ 'my-editor': {
122
+ name: 'my-editor' as LayoutPreset,
123
+ sidebar: () => <MyToolPanel />, // Custom visuals, resize for free
124
+ footer: () => <MyGameHud />, // Custom visuals, fixed at bottom
125
+ footerMode: 'fixed', // Stays pinned on mobile too
126
+ mobile: {
127
+ mergedBar: {
128
+ position: 'top',
129
+ height: '62px',
130
+ content: () => <MyToolPanel />,
131
+ },
132
+ },
133
+ },
134
+ };
135
+
136
+ export function App() {
137
+ return (
138
+ <ViteAppProviders
139
+ config={{ ...appConfig, customPresets }}
140
+ />
141
+ );
142
+ }
143
+ ```
144
+
145
+ ### Example: custom preset with slot overrides (framework polish)
146
+
147
+ ```tsx
148
+ const customPresets: Record<string, PresetConfig> = {
149
+ 'my-docs': {
150
+ name: 'my-docs' as LayoutPreset,
151
+ sidebar: {
152
+ content: () => <MyDocNav />, // Custom content, framework styling
153
+ defaultWidth: 300,
154
+ minWidth: 200,
155
+ maxWidth: 400,
156
+ },
157
+ footer: null, // No footer
158
+ },
159
+ };
160
+ ```
161
+
162
+ ### CSS variables for custom presets
163
+
164
+ **Add CSS variables in `src/themes.css`:**
165
+ ```css
166
+ [data-layout='my-editor'] {
167
+ --header-height: 0px;
168
+ --sidebar-width: 280px;
169
+ --custom-sidebar-width: 286px; /* content + 6px resize handle */
170
+
171
+ header[role='banner'] { display: none; }
172
+
173
+ @media (width <= 1023px) {
174
+ --sidebar-width: 0px;
175
+ }
176
+ }
177
+ ```
178
+
179
+ **Use on a page:**
180
+ ```tsx
181
+ export const meta: PageMeta = {
182
+ preset: 'my-editor',
183
+ };
184
+ ```
185
+
186
+ **How it works:**
187
+ 1. `customPresets` merged into config in `App.tsx` - flows through `AppConfigProvider`
188
+ 2. Page sets `preset: 'my-editor'` - store accepts any string
189
+ 3. `DnDevLayout` looks up `'my-editor'` in merged registry (custom overrides built-in)
190
+ 4. Zones render from your `PresetConfig` - function zones get `data-custom` attribute, slots don't
191
+ 5. `data-layout="my-editor"` on `<html>` - your CSS variables activate
192
+ 6. Mobile: mergedBar shows automatically, header hidden via `data-has-mergedbar`
193
+
194
+ **Unknown presets without a custom config fall back to `landing`.**
195
+
196
+ ---
197
+
198
+ ## Advanced: Slot Overrides
199
+
200
+ **Customize zones (framework polish applies):**
201
+ ```tsx
202
+ <ViteAppProviders
203
+ config={appConfig}
204
+ layout={{
205
+ header: {
206
+ start: () => <CustomLogo />, // Override start zone
207
+ center: () => <SearchBar />, // Override center zone
208
+ end: () => <UserMenu />, // Override end zone
209
+ },
210
+ sidebar: {
211
+ top: () => <Branding />, // Override top zone
212
+ content: () => <CustomNav />, // Override content zone
213
+ bottom: () => <UserProfile />, // Override bottom zone
214
+ },
215
+ footer: () => <CustomFooter />, // Replace entire footer (custom mode, no framework polish)
216
+ }}
217
+ />
218
+ ```
219
+
220
+ **Hide zones:**
221
+ ```tsx
222
+ layout={{
223
+ header: {
224
+ center: () => null, // Hide center zone
225
+ },
226
+ footer: () => null, // Hide footer
227
+ }}
228
+ ```
229
+
230
+ **Available slots:** `header.start/center/end`, `sidebar.top/content/bottom`, `footer`, `mergedbar` (mobile nav).
231
+
232
+ ---
233
+
234
+ ## Advanced: Footer Mode
235
+
236
+ **Control footer scroll behavior:**
237
+
238
+ ```tsx
239
+ // Default: footer scrolls with content on mobile, fixed on desktop
240
+ // No footerMode needed - this is the default for all built-in presets
241
+
242
+ // Fixed on all breakpoints (footer stays pinned at bottom, even on mobile):
243
+ footerMode: 'fixed',
244
+
245
+ // Scroll on all breakpoints (footer scrolls with content):
246
+ footerMode: 'scroll',
247
+ ```
248
+
249
+ Set `footerMode` in your preset config or in the `layout` prop:
250
+ ```tsx
251
+ <ViteAppProviders
252
+ config={appConfig}
253
+ layout={{ footerMode: 'fixed' }}
254
+ />
255
+ ```
256
+
257
+ ---
258
+
259
+ ## Advanced: CSS Variable Overrides
260
+
261
+ **Override dimensions in `src/themes.css`:**
262
+ ```css
263
+ :root {
264
+ --header-height: 96px;
265
+ --sidebar-width: 320px;
266
+ --main-max-width: 1480px;
267
+ --footer-height: 64px;
268
+ --section-gap: 2rem;
269
+ }
270
+ ```
271
+
272
+ **Framework auto-computes:** Spacing, typography, responsive breakpoints.
273
+
274
+ ---
275
+
276
+ ## Advanced: Density System
277
+
278
+ **Global density:**
279
+ ```tsx
280
+ layout={{
281
+ density: 'compact', // compact | standard | expressive
282
+ }}
283
+ ```
284
+
285
+ **Per-page density:**
286
+ ```tsx
287
+ <PageContainer density="expressive">
288
+ <HeroSection title="Hero" />
289
+ </PageContainer>
290
+ ```
291
+
292
+ **Three densities:** `compact` (1.2x), `standard` (1.25x), `expressive` (1.333x).
293
+
294
+ ---
295
+
296
+ ## Advanced: Runtime Preset Changes
297
+
298
+ **Change preset programmatically:**
299
+ ```tsx
300
+ import { useLayout } from '@donotdev/core';
301
+
302
+ const setLayoutPreset = useLayout('setLayoutPreset');
303
+ setLayoutPreset('plain'); // Switch to plain layout
304
+ ```
305
+
306
+ **Pre-configured:** All presets handle auth, themes, languages automatically.
307
+
308
+ ---
309
+
310
+ **Choose preset, get layout. Framework handles the rest.**