@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
@@ -0,0 +1,205 @@
1
+ # Pages & Routing
2
+
3
+ **Drop `*Page.tsx` files. Routes auto-discovered, navigation auto-generated, sitemap auto-built.**
4
+
5
+ ---
6
+
7
+ ## File Routing Rule
8
+
9
+ **CRITICAL: Only files ending in `Page.tsx` inside `src/pages` become routes.**
10
+
11
+ Files must be named `*Page.tsx` (e.g., `HomePage.tsx`, `AboutPage.tsx`, `BlogPostPage.tsx`). Files without the `Page.tsx` suffix are ignored by the routing system.
12
+
13
+ ---
14
+
15
+ ## Standard Use
16
+
17
+ **Pattern:** `src/pages/**/*Page.tsx` - routes
18
+
19
+ **Basic page structure:**
20
+ ```tsx
21
+ // src/pages/AboutPage.tsx
22
+ import { PageContainer } from '@donotdev/ui';
23
+
24
+ export const NAMESPACE = 'about';
25
+
26
+ export const meta: PageMeta = {
27
+ namespace: NAMESPACE,
28
+ };
29
+
30
+ export default function AboutPage() {
31
+ return <PageContainer><h1>About</h1></PageContainer>;
32
+ }
33
+ ```
34
+
35
+ **Cookie-cutter pattern (Landing page):**
36
+ ```tsx
37
+ import { PageContainer } from '@donotdev/ui';
38
+ import { HeroSection, Section, Card, CallToAction } from '@donotdev/components';
39
+
40
+ export default function HomePage() {
41
+ return (
42
+ <PageContainer>
43
+ <HeroSection title="Welcome" subtitle="Build fast" variant="primary" />
44
+ <Section title="Features" gridCols={3}>
45
+ <Card title="Fast" />
46
+ <Card title="Simple" />
47
+ <Card title="Powerful" />
48
+ </Section>
49
+ <CallToAction title="Get Started" primaryAction={<Button>Sign Up</Button>} />
50
+ </PageContainer>
51
+ );
52
+ }
53
+ ```
54
+
55
+ **Drop files, get routes. No config needed.**
56
+
57
+ **Component reference:** See the `@donotdev/components` guidelines for atomic components, and the COMPONENTS guideline for layout components.
58
+
59
+ ---
60
+
61
+ ## Advanced: All PageMeta Props
62
+
63
+ ```tsx
64
+ export const meta: PageMeta = {
65
+ // Translation/SEO namespace
66
+ namespace: NAMESPACE,
67
+
68
+ // Route configuration
69
+ route: '/custom-url', // Override auto-generated path
70
+ route: { params: ['slug'] }, // Dynamic: /blog/:slug
71
+
72
+ // Page title (optional - auto-extracted from filename)
73
+ title: 'Custom Title',
74
+
75
+ // Navigation icon (lucide-react JSX only)
76
+ icon: <Rocket />, // Menu icon (default: Link)
77
+
78
+ // Hide from navigation menu
79
+ hideFromMenu: false, // Default: false (shows in nav)
80
+
81
+ // Layout preset override (per-route)
82
+ preset: 'admin', // Override app default for this route
83
+
84
+ // Authentication
85
+ auth: true, // Simple: auth required
86
+ auth: { required: true }, // Explicit: auth required
87
+ auth: { required: true, role: 'admin' }, // Role-based access
88
+ auth: { required: true, tier: 'pro' }, // Tier-based access
89
+ auth: {
90
+ required: true,
91
+ validate: (role, tier) => role === 'admin' && tier === 'pro'
92
+ }, // Custom validation
93
+ };
94
+ ```
95
+
96
+ **Reference implementation:** The demo app (`packages/cli/templates/app-demo/`) shows all these patterns working together - landing, admin, docs presets, auth, showcase, CRUD, legal pages.
97
+
98
+ ---
99
+
100
+ ## Advanced: Dynamic Routes & Navigation
101
+
102
+ ```tsx
103
+ // Dynamic route
104
+ export const meta: PageMeta = {
105
+ namespace: 'blog',
106
+ route: { params: ['slug'] }, // /blog/:slug
107
+ };
108
+
109
+ export default function BlogPostPage() {
110
+ const { slug } = useParams<{ slug: string }>();
111
+ return <PageContainer><h1>{slug}</h1></PageContainer>;
112
+ }
113
+
114
+ // Manual navigation
115
+ import { useNavigate, Link } from '@donotdev/ui';
116
+ const navigate = useNavigate();
117
+ navigate('/about');
118
+ <Link path="/about">About</Link>
119
+
120
+ // Card with navigation (supports middle-click)
121
+ import { Card } from '@donotdev/components';
122
+ import { Link } from '@donotdev/ui';
123
+
124
+ <Link
125
+ path="/about"
126
+ style={{ display: 'block', textDecoration: 'none', height: '100%' }}
127
+ aria-label="Learn more about About"
128
+ >
129
+ <Card title="About" subtitle="Learn more" />
130
+ </Link>
131
+ ```
132
+
133
+ **Navigation patterns:**
134
+ - **Link component:** Use for text links, buttons, or wrapping other components
135
+ - **Card navigation:** Wrap Card in Link for clickable cards with middle-click support
136
+ - **onClick only:** Use `onClick={() => navigate()}` for actions that don't need middle-click
137
+
138
+ **Pre-configured:** Navigation menu auto-generated, sitemap auto-built (if `generateSitemap: true`).
139
+
140
+ ---
141
+
142
+ ---
143
+
144
+ ## Import Convention
145
+
146
+ **Always import from `@donotdev/<package>` top-level.** Never use sub-paths.
147
+
148
+ ```tsx
149
+ import { PageContainer, Link, useNavigate } from '@donotdev/ui';
150
+ import { Card, Button, Input } from '@donotdev/components';
151
+ import { useCrud } from '@donotdev/crud';
152
+ ```
153
+
154
+ **Sub-path exceptions** (server, config, and provider-specific):
155
+ - **Server:** `@donotdev/core/server`, `@donotdev/firebase/server`, `@donotdev/security/server`
156
+ - **Config:** `@donotdev/core/vite`, `@donotdev/core/next`, `@donotdev/core/functions`
157
+ - **Functions:** `@donotdev/functions/firebase`, `@donotdev/functions/vercel`, `@donotdev/functions/supabase`
158
+
159
+ ---
160
+
161
+ ## SaaS App Pattern
162
+
163
+ For SaaS apps, the standard page structure is:
164
+
165
+ ```
166
+ src/pages/
167
+ HomePage.tsx -> / -> No auth. Login form OR landing page.
168
+ Redirects to /dashboard when authenticated.
169
+ DashboardPage.tsx -> /dashboard -> auth: true. Main landing for logged-in users.
170
+ SettingsPage.tsx -> /settings -> auth: true.
171
+ ...
172
+ ```
173
+
174
+ **HomePage is never auth-guarded.** It's the entry point for unauthenticated users. Do NOT create a separate `LoginPage` - HomePage IS the login.
175
+
176
+ ```tsx
177
+ // src/pages/HomePage.tsx - SaaS pattern
178
+ import { useAuthSafe, useNavigate, PageContainer } from '@donotdev/ui';
179
+ import { LoginForm } from '@donotdev/templates';
180
+
181
+ export const meta: PageMeta = {
182
+ namespace: 'home',
183
+ // No auth - this is the public entry point
184
+ };
185
+
186
+ export default function HomePage() {
187
+ const user = useAuthSafe('user');
188
+ const navigate = useNavigate();
189
+
190
+ // Redirect authenticated users to dashboard
191
+ if (user) { navigate('/dashboard'); return null; }
192
+
193
+ return (
194
+ <PageContainer>
195
+ <LoginForm onSuccess={() => navigate('/dashboard')} />
196
+ </PageContainer>
197
+ );
198
+ }
199
+ ```
200
+
201
+ > **Why `useAuthSafe` instead of `useAuth`?** HomePage is public - it renders before auth is guaranteed to be initialized. `useAuthSafe` (from `@donotdev/ui`) gracefully degrades if `@donotdev/auth` isn't installed or still initializing. `useAuth` (from `@donotdev/auth`) throws if auth isn't available. Use `useAuthSafe` on any page without `auth: true` in its meta.
202
+
203
+ ---
204
+
205
+ **Drop files, get routes. Framework handles the rest.**
@@ -0,0 +1,499 @@
1
+ # Routing
2
+
3
+ **Use framework routing components/hooks. NEVER import from `react-router-dom` directly.** Framework handles SPA navigation, Outlet, and overlay closing automatically.
4
+
5
+ ---
6
+
7
+ ## Critical Rule: Never Use react-router-dom Directly
8
+
9
+ **WRONG:**
10
+ ```tsx
11
+ import { Link, useNavigate, useParams } from 'react-router-dom'; // BREAKS FRAMEWORK
12
+ ```
13
+
14
+ **CORRECT:**
15
+ ```tsx
16
+ import { Link, useNavigate, useParams } from '@donotdev/ui'; // Framework routing
17
+ ```
18
+
19
+ **Why?** The framework's routing components:
20
+ - Automatically close overlays on navigation
21
+ - Handle SPA navigation correctly with Outlet
22
+ - Work with both Vite and Next.js
23
+ - Integrate with auth and route discovery
24
+ - Provide proper TypeScript types
25
+
26
+ ---
27
+
28
+ ## Framework Routing API
29
+
30
+ ### Components
31
+
32
+ ```tsx
33
+ import { Link, DnDevNavigationMenu } from '@donotdev/ui';
34
+ ```
35
+
36
+ **Link Component:**
37
+ ```tsx
38
+ <Link path="/products" label="Products" icon="Package" />
39
+ <Link path="/users/:id" replace prefetch={false}>User Details</Link>
40
+ ```
41
+
42
+ **DnDevNavigationMenu (Sidebar/Header):**
43
+ ```tsx
44
+ // Auto-fetches routes, handles auth filtering
45
+ <DnDevNavigationMenu vertical display={DISPLAY.AUTO} />
46
+ ```
47
+
48
+ ### Hooks
49
+
50
+ ```tsx
51
+ import {
52
+ useNavigate,
53
+ useLocation,
54
+ useParams,
55
+ useRouteParam,
56
+ useSearchParams,
57
+ useNavigationItems,
58
+ } from '@donotdev/ui';
59
+ ```
60
+
61
+ ---
62
+
63
+ ## Navigation Patterns
64
+
65
+ ### 1. Basic Navigation
66
+
67
+ **Use framework Link:**
68
+ ```tsx
69
+ import { Link } from '@donotdev/ui';
70
+
71
+ function ProductCard({ product }) {
72
+ return (
73
+ <Link path={`/products/${product.id}`} label={product.name} />
74
+ );
75
+ }
76
+ ```
77
+
78
+ **Use framework useNavigate:**
79
+ ```tsx
80
+ import { useNavigate } from '@donotdev/ui';
81
+
82
+ function ProductForm() {
83
+ const navigate = useNavigate();
84
+
85
+ const handleSubmit = async () => {
86
+ await saveProduct();
87
+ navigate('/products'); // Closes overlays automatically
88
+ };
89
+
90
+ return <form onSubmit={handleSubmit}>...</form>;
91
+ }
92
+ ```
93
+
94
+ **DON'T use react-router-dom:**
95
+ ```tsx
96
+ import { useNavigate } from 'react-router-dom'; // BREAKS FRAMEWORK
97
+
98
+ function ProductForm() {
99
+ const navigate = useNavigate(); // Doesn't close overlays, breaks SPA
100
+ // ...
101
+ }
102
+ ```
103
+
104
+ ---
105
+
106
+ ### 2. Route Parameters
107
+
108
+ **Use framework useRouteParam:**
109
+ ```tsx
110
+ import { useRouteParam } from '@donotdev/ui';
111
+
112
+ function ProductPage() {
113
+ const id = useRouteParam('id'); // Returns string | undefined
114
+ // Safe: handles string | string[] | undefined automatically
115
+ }
116
+ ```
117
+
118
+ **Or use framework useParams:**
119
+ ```tsx
120
+ import { useParams } from '@donotdev/ui';
121
+
122
+ function ProductPage() {
123
+ const params = useParams();
124
+ const id = typeof params.id === 'string' ? params.id : undefined;
125
+ }
126
+ ```
127
+
128
+ **DON'T use react-router-dom:**
129
+ ```tsx
130
+ import { useParams } from 'react-router-dom'; // Type issues, breaks framework
131
+ ```
132
+
133
+ ---
134
+
135
+ ### 3. Sidebar Navigation
136
+
137
+ **Use DnDevNavigationMenu (auto-fetches routes):**
138
+ ```tsx
139
+ import { DnDevNavigationMenu, DISPLAY } from '@donotdev/ui';
140
+
141
+ function Sidebar() {
142
+ return (
143
+ <DnDevNavigationMenu
144
+ vertical
145
+ display={DISPLAY.AUTO} // CSS-driven collapse
146
+ showIcons={true}
147
+ />
148
+ );
149
+ }
150
+ ```
151
+
152
+ **Or use useNavigationItems for custom sidebar:**
153
+ ```tsx
154
+ import { Link, useNavigationItems } from '@donotdev/ui';
155
+
156
+ function CustomSidebar() {
157
+ const menuItems = useNavigationItems(); // Auth-filtered routes
158
+
159
+ return (
160
+ <nav>
161
+ {menuItems.map((item) => (
162
+ <Link
163
+ key={item.path}
164
+ path={item.path}
165
+ label={item.label}
166
+ icon={item.icon}
167
+ className={item.isActive ? 'active' : ''}
168
+ />
169
+ ))}
170
+ </nav>
171
+ );
172
+ }
173
+ ```
174
+
175
+ **DON'T manually build navigation:**
176
+ ```tsx
177
+ import { Link } from 'react-router-dom'; // BREAKS FRAMEWORK
178
+
179
+ function Sidebar() {
180
+ // Doesn't integrate with route discovery
181
+ // Doesn't handle auth filtering
182
+ // Doesn't work with Outlet
183
+ return (
184
+ <nav>
185
+ <Link to="/products">Products</Link>
186
+ </nav>
187
+ );
188
+ }
189
+ ```
190
+
191
+ ---
192
+
193
+ ### 4. Programmatic Navigation
194
+
195
+ **Use framework useNavigate:**
196
+ ```tsx
197
+ import { useNavigate } from '@donotdev/ui';
198
+
199
+ function LoginForm() {
200
+ const navigate = useNavigate();
201
+
202
+ const handleLogin = async () => {
203
+ await signIn();
204
+ navigate('/dashboard', { replace: true }); // Closes overlays
205
+ };
206
+
207
+ return <form onSubmit={handleLogin}>...</form>;
208
+ }
209
+ ```
210
+
211
+ **Navigate back:**
212
+ ```tsx
213
+ const navigate = useNavigate();
214
+ navigate('back'); // Framework handles browser history
215
+ ```
216
+
217
+ **With options:**
218
+ ```tsx
219
+ navigate('/products', {
220
+ replace: true, // Replace history entry
221
+ preserveScroll: true, // Preserve scroll position
222
+ });
223
+ ```
224
+
225
+ ---
226
+
227
+ ### 5. Query Parameters
228
+
229
+ **Use framework useSearchParams (read-only, returns URLSearchParams directly):**
230
+ ```tsx
231
+ import { useSearchParams } from '@donotdev/ui';
232
+
233
+ function ProductList() {
234
+ const searchParams = useSearchParams();
235
+ const page = searchParams.get('page') || '1';
236
+
237
+ return <div>Page: {page}</div>;
238
+ }
239
+ ```
240
+
241
+ **Or use useQueryParams helper:**
242
+ ```tsx
243
+ import { useQueryParams } from '@donotdev/ui';
244
+
245
+ function ProductList() {
246
+ const { page, sort } = useQueryParams({ page: '1', sort: 'name' });
247
+ // Returns { page: string, sort: string } with defaults
248
+ }
249
+ ```
250
+
251
+ ---
252
+
253
+ ### 6. Route Matching
254
+
255
+ **Use framework useMatch:**
256
+ ```tsx
257
+ import { useMatch } from '@donotdev/ui';
258
+
259
+ function NavigationItem({ path }) {
260
+ const isActive = useMatch(path);
261
+ return <Link path={path} className={isActive ? 'active' : ''} />;
262
+ }
263
+ ```
264
+
265
+ ---
266
+
267
+ ## Outlet and Nested Routes
268
+
269
+ **Framework handles Outlet automatically.** You don't need to manually use `<Outlet />` in most cases.
270
+
271
+ ### How It Works
272
+
273
+ 1. **RootLayout** wraps all routes and includes `<Outlet />`
274
+ 2. **DnDevLayout** receives `<Outlet />` and renders it in the main content area
275
+ 3. **Routes are discovered** from `src/pages/*Page.tsx` files automatically
276
+
277
+ **Your pages just render content:**
278
+ ```tsx
279
+ // src/pages/ProductsPage.tsx
280
+ export function ProductsPage() {
281
+ return <div>Products List</div>; // Rendered via Outlet automatically
282
+ }
283
+ ```
284
+
285
+ **DON'T manually use Outlet:**
286
+ ```tsx
287
+ import { Outlet } from 'react-router-dom'; // BREAKS FRAMEWORK
288
+
289
+ export function ProductsPage() {
290
+ return (
291
+ <div>
292
+ <h1>Products</h1>
293
+ <Outlet /> {/* Framework already handles this */}
294
+ </div>
295
+ );
296
+ }
297
+ ```
298
+
299
+ ### Nested Routes (Advanced)
300
+
301
+ If you need nested routes, use the framework's route discovery:
302
+
303
+ ```tsx
304
+ // src/pages/products/ProductsPage.tsx
305
+ export const pageMeta = {
306
+ route: '/products',
307
+ // ...
308
+ };
309
+
310
+ // src/pages/products/ProductDetailPage.tsx
311
+ export const pageMeta = {
312
+ route: '/products/:id',
313
+ // ...
314
+ };
315
+ ```
316
+
317
+ Framework automatically creates nested route structure.
318
+
319
+ ---
320
+
321
+ ## Route Discovery
322
+
323
+ **Routes are auto-discovered from `src/pages/*Page.tsx` files.**
324
+
325
+ **Define routes with PageMeta:**
326
+ ```tsx
327
+ // src/pages/ProductsPage.tsx
328
+ import type { PageMeta } from '@donotdev/core';
329
+
330
+ export const pageMeta: PageMeta = {
331
+ title: 'Products',
332
+ route: '/products',
333
+ icon: 'Package',
334
+ auth: { required: true, roles: ['user', 'admin'] },
335
+ };
336
+
337
+ export function ProductsPage() {
338
+ return <div>Products</div>;
339
+ }
340
+ ```
341
+
342
+ **Framework automatically:**
343
+ - Discovers routes from filesystem
344
+ - Generates navigation menus
345
+ - Filters by auth permissions
346
+ - Handles lazy loading
347
+ - Creates route structure
348
+
349
+ ---
350
+
351
+ ## Common Mistakes
352
+
353
+ ### Mistake 1: Importing from react-router-dom
354
+
355
+ ```tsx
356
+ // WRONG
357
+ import { Link, useNavigate } from 'react-router-dom';
358
+ ```
359
+
360
+ **Fix:**
361
+ ```tsx
362
+ // CORRECT
363
+ import { Link, useNavigate } from '@donotdev/ui';
364
+ ```
365
+
366
+ ---
367
+
368
+ ### Mistake 2: Manual Outlet Usage
369
+
370
+ ```tsx
371
+ // WRONG
372
+ import { Outlet } from 'react-router-dom';
373
+
374
+ export function Layout() {
375
+ return <Outlet />; // Framework already handles this
376
+ }
377
+ ```
378
+
379
+ **Fix:** Don't use Outlet manually. Framework handles it.
380
+
381
+ ---
382
+
383
+ ### Mistake 3: Manual Route Configuration
384
+
385
+ ```tsx
386
+ // WRONG
387
+ import { Routes, Route } from 'react-router-dom';
388
+
389
+ function App() {
390
+ return (
391
+ <Routes>
392
+ <Route path="/products" element={<ProductsPage />} />
393
+ </Routes>
394
+ );
395
+ }
396
+ ```
397
+
398
+ **Fix:** Use route discovery. Create `src/pages/ProductsPage.tsx` with `pageMeta`.
399
+
400
+ ---
401
+
402
+ ### Mistake 4: Manual Navigation Menu
403
+
404
+ ```tsx
405
+ // WRONG
406
+ function Sidebar() {
407
+ return (
408
+ <nav>
409
+ <Link to="/products">Products</Link>
410
+ <Link to="/users">Users</Link>
411
+ </nav>
412
+ );
413
+ }
414
+ ```
415
+
416
+ **Fix:**
417
+ ```tsx
418
+ // CORRECT
419
+ import { DnDevNavigationMenu } from '@donotdev/ui';
420
+
421
+ function Sidebar() {
422
+ return <DnDevNavigationMenu vertical />; // Auto-fetches routes
423
+ }
424
+ ```
425
+
426
+ ---
427
+
428
+ ### Mistake 5: Not Using Framework Link
429
+
430
+ ```tsx
431
+ // WRONG
432
+ import { Link } from 'react-router-dom';
433
+
434
+ <Link to="/products">Products</Link>
435
+ ```
436
+
437
+ **Fix:**
438
+ ```tsx
439
+ // CORRECT
440
+ import { Link } from '@donotdev/ui';
441
+
442
+ <Link path="/products" label="Products" />
443
+ ```
444
+
445
+ ---
446
+
447
+ ## Quick Reference
448
+
449
+ ### Import Paths
450
+
451
+ ```tsx
452
+ // Framework routing (platform-agnostic)
453
+ import {
454
+ Link,
455
+ useNavigate,
456
+ useLocation,
457
+ useParams,
458
+ useRouteParam,
459
+ useSearchParams,
460
+ useNavigationItems,
461
+ DnDevNavigationMenu,
462
+ } from '@donotdev/ui';
463
+ ```
464
+
465
+ ### Common Patterns
466
+
467
+ ```tsx
468
+ // Navigation
469
+ const navigate = useNavigate();
470
+ navigate('/products');
471
+ navigate('back');
472
+ navigate('/products', { replace: true });
473
+
474
+ // Route params
475
+ const id = useRouteParam('id');
476
+
477
+ // Query params (read-only, returns URLSearchParams directly)
478
+ const searchParams = useSearchParams();
479
+ const page = searchParams.get('page');
480
+
481
+ // Navigation menu
482
+ const menuItems = useNavigationItems(); // Auth-filtered routes
483
+
484
+ // Link component
485
+ <Link path="/products" label="Products" icon="Package" />
486
+ ```
487
+
488
+ ---
489
+
490
+ ## Summary
491
+
492
+ 1. **Always import from `@donotdev/ui`** - never `react-router-dom`
493
+ 2. **Use `DnDevNavigationMenu`** for sidebars/headers
494
+ 3. **Use `useNavigationItems()`** for custom navigation
495
+ 4. **Don't use `<Outlet />` manually** - framework handles it
496
+ 5. **Routes are auto-discovered** from `src/pages/*Page.tsx`
497
+ 6. **Framework closes overlays** on navigation automatically
498
+
499
+ **Framework handles SPA navigation, Outlet, and route discovery. Use framework components/hooks only.**