@donotdev/ui 0.3.2 → 0.3.4

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 (232) hide show
  1. package/README.md +2 -3
  2. package/dist/crud/components/EntityCardList.d.ts +4 -1
  3. package/dist/crud/components/EntityCardList.d.ts.map +1 -1
  4. package/dist/crud/components/EntityCardList.js +1 -1
  5. package/dist/crud/components/useRecordBreadcrumb.d.ts +3 -1
  6. package/dist/crud/components/useRecordBreadcrumb.d.ts.map +1 -1
  7. package/dist/crud/components/useRecordBreadcrumb.js +1 -1
  8. package/dist/dndev.css +205 -865
  9. package/dist/index.js +1 -1
  10. package/dist/internal/devtools/components/LayoutReset.js +1 -1
  11. package/dist/internal/layout/components/AutoMetaTags.d.ts +3 -0
  12. package/dist/internal/layout/components/AutoMetaTags.d.ts.map +1 -1
  13. package/dist/internal/layout/components/AutoMetaTags.js +1 -1
  14. package/dist/internal/layout/components/FaviconHead.d.ts +18 -14
  15. package/dist/internal/layout/components/FaviconHead.d.ts.map +1 -1
  16. package/dist/internal/layout/components/FaviconHead.js +1 -1
  17. package/dist/internal/layout/components/FontHead.d.ts +30 -0
  18. package/dist/internal/layout/components/FontHead.d.ts.map +1 -0
  19. package/dist/internal/layout/components/FontHead.js +1 -0
  20. package/dist/internal/layout/components/headTagElement.d.ts +16 -0
  21. package/dist/internal/layout/components/headTagElement.d.ts.map +1 -0
  22. package/dist/internal/layout/components/headTagElement.js +1 -0
  23. package/dist/internal/layout/components/prerenderedHead.d.ts +15 -0
  24. package/dist/internal/layout/components/prerenderedHead.d.ts.map +1 -0
  25. package/dist/internal/layout/components/prerenderedHead.js +1 -0
  26. package/dist/internal/layout/components/trailingSlash.d.ts +13 -0
  27. package/dist/internal/layout/components/trailingSlash.d.ts.map +1 -0
  28. package/dist/internal/layout/components/trailingSlash.js +1 -0
  29. package/dist/internal/layout/zones/DnDevMergedBar.d.ts.map +1 -1
  30. package/dist/internal/layout/zones/DnDevMergedBar.js +1 -1
  31. package/dist/next.d.ts +2 -1
  32. package/dist/next.d.ts.map +1 -1
  33. package/dist/next.js +1 -1
  34. package/dist/providers/NextJsAppProviders.d.ts.map +1 -1
  35. package/dist/providers/ViteAppProviders.d.ts +11 -9
  36. package/dist/providers/ViteAppProviders.d.ts.map +1 -1
  37. package/dist/providers/ViteAppProviders.js +1 -1
  38. package/dist/routing/DnDevNavigationMenu.d.ts.map +1 -1
  39. package/dist/routing/DnDevNavigationMenu.js +1 -1
  40. package/dist/routing/hooks/hooks.next.js +1 -1
  41. package/dist/routing/hooks/useRoutePath.next.d.ts +5 -3
  42. package/dist/routing/hooks/useRoutePath.next.d.ts.map +1 -1
  43. package/dist/routing/hooks/useRoutePath.next.js +1 -1
  44. package/dist/routing/useRouteDiscovery.d.ts +3 -0
  45. package/dist/routing/useRouteDiscovery.d.ts.map +1 -1
  46. package/dist/styles/index.css +202 -59
  47. package/dist/symbol-index.json +1 -1
  48. package/dist/utils/assetResolver.d.ts +19 -19
  49. package/dist/utils/assetResolver.d.ts.map +1 -1
  50. package/dist/utils/assetResolver.js +1 -1
  51. package/dist/utils/index.d.ts +0 -1
  52. package/dist/utils/index.d.ts.map +1 -1
  53. package/dist/utils/index.js +1 -1
  54. package/dist/vite-routing/AppRoutes.d.ts.map +1 -1
  55. package/dist/vite-routing/AppRoutes.js +1 -1
  56. package/guidelines/ROUTING.md +1 -0
  57. package/guidelines/SEO.md +160 -145
  58. package/package.json +9 -10
  59. package/dist/dndev-next.css +0 -13702
  60. package/dist/files/inter-cyrillic-300-normal.woff +0 -0
  61. package/dist/files/inter-cyrillic-300-normal.woff2 +0 -0
  62. package/dist/files/inter-cyrillic-400-normal.woff +0 -0
  63. package/dist/files/inter-cyrillic-400-normal.woff2 +0 -0
  64. package/dist/files/inter-cyrillic-600-normal.woff +0 -0
  65. package/dist/files/inter-cyrillic-600-normal.woff2 +0 -0
  66. package/dist/files/inter-cyrillic-700-normal.woff +0 -0
  67. package/dist/files/inter-cyrillic-700-normal.woff2 +0 -0
  68. package/dist/files/inter-cyrillic-ext-300-normal.woff +0 -0
  69. package/dist/files/inter-cyrillic-ext-300-normal.woff2 +0 -0
  70. package/dist/files/inter-cyrillic-ext-400-normal.woff +0 -0
  71. package/dist/files/inter-cyrillic-ext-400-normal.woff2 +0 -0
  72. package/dist/files/inter-cyrillic-ext-600-normal.woff +0 -0
  73. package/dist/files/inter-cyrillic-ext-600-normal.woff2 +0 -0
  74. package/dist/files/inter-cyrillic-ext-700-normal.woff +0 -0
  75. package/dist/files/inter-cyrillic-ext-700-normal.woff2 +0 -0
  76. package/dist/files/inter-greek-300-normal.woff +0 -0
  77. package/dist/files/inter-greek-300-normal.woff2 +0 -0
  78. package/dist/files/inter-greek-400-normal.woff +0 -0
  79. package/dist/files/inter-greek-400-normal.woff2 +0 -0
  80. package/dist/files/inter-greek-600-normal.woff +0 -0
  81. package/dist/files/inter-greek-600-normal.woff2 +0 -0
  82. package/dist/files/inter-greek-700-normal.woff +0 -0
  83. package/dist/files/inter-greek-700-normal.woff2 +0 -0
  84. package/dist/files/inter-greek-ext-300-normal.woff +0 -0
  85. package/dist/files/inter-greek-ext-300-normal.woff2 +0 -0
  86. package/dist/files/inter-greek-ext-400-normal.woff +0 -0
  87. package/dist/files/inter-greek-ext-400-normal.woff2 +0 -0
  88. package/dist/files/inter-greek-ext-600-normal.woff +0 -0
  89. package/dist/files/inter-greek-ext-600-normal.woff2 +0 -0
  90. package/dist/files/inter-greek-ext-700-normal.woff +0 -0
  91. package/dist/files/inter-greek-ext-700-normal.woff2 +0 -0
  92. package/dist/files/inter-latin-300-normal.woff +0 -0
  93. package/dist/files/inter-latin-300-normal.woff2 +0 -0
  94. package/dist/files/inter-latin-400-normal.woff +0 -0
  95. package/dist/files/inter-latin-400-normal.woff2 +0 -0
  96. package/dist/files/inter-latin-600-normal.woff +0 -0
  97. package/dist/files/inter-latin-600-normal.woff2 +0 -0
  98. package/dist/files/inter-latin-700-normal.woff +0 -0
  99. package/dist/files/inter-latin-700-normal.woff2 +0 -0
  100. package/dist/files/inter-latin-ext-300-normal.woff +0 -0
  101. package/dist/files/inter-latin-ext-300-normal.woff2 +0 -0
  102. package/dist/files/inter-latin-ext-400-normal.woff +0 -0
  103. package/dist/files/inter-latin-ext-400-normal.woff2 +0 -0
  104. package/dist/files/inter-latin-ext-600-normal.woff +0 -0
  105. package/dist/files/inter-latin-ext-600-normal.woff2 +0 -0
  106. package/dist/files/inter-latin-ext-700-normal.woff +0 -0
  107. package/dist/files/inter-latin-ext-700-normal.woff2 +0 -0
  108. package/dist/files/inter-vietnamese-300-normal.woff +0 -0
  109. package/dist/files/inter-vietnamese-300-normal.woff2 +0 -0
  110. package/dist/files/inter-vietnamese-400-normal.woff +0 -0
  111. package/dist/files/inter-vietnamese-400-normal.woff2 +0 -0
  112. package/dist/files/inter-vietnamese-600-normal.woff +0 -0
  113. package/dist/files/inter-vietnamese-600-normal.woff2 +0 -0
  114. package/dist/files/inter-vietnamese-700-normal.woff +0 -0
  115. package/dist/files/inter-vietnamese-700-normal.woff2 +0 -0
  116. package/dist/files/playfair-display-cyrillic-400-normal.woff +0 -0
  117. package/dist/files/playfair-display-cyrillic-400-normal.woff2 +0 -0
  118. package/dist/files/playfair-display-cyrillic-500-normal.woff +0 -0
  119. package/dist/files/playfair-display-cyrillic-500-normal.woff2 +0 -0
  120. package/dist/files/playfair-display-cyrillic-600-normal.woff +0 -0
  121. package/dist/files/playfair-display-cyrillic-600-normal.woff2 +0 -0
  122. package/dist/files/playfair-display-cyrillic-700-normal.woff +0 -0
  123. package/dist/files/playfair-display-cyrillic-700-normal.woff2 +0 -0
  124. package/dist/files/playfair-display-latin-400-normal.woff +0 -0
  125. package/dist/files/playfair-display-latin-400-normal.woff2 +0 -0
  126. package/dist/files/playfair-display-latin-500-normal.woff +0 -0
  127. package/dist/files/playfair-display-latin-500-normal.woff2 +0 -0
  128. package/dist/files/playfair-display-latin-600-normal.woff +0 -0
  129. package/dist/files/playfair-display-latin-600-normal.woff2 +0 -0
  130. package/dist/files/playfair-display-latin-700-normal.woff +0 -0
  131. package/dist/files/playfair-display-latin-700-normal.woff2 +0 -0
  132. package/dist/files/playfair-display-latin-ext-400-normal.woff +0 -0
  133. package/dist/files/playfair-display-latin-ext-400-normal.woff2 +0 -0
  134. package/dist/files/playfair-display-latin-ext-500-normal.woff +0 -0
  135. package/dist/files/playfair-display-latin-ext-500-normal.woff2 +0 -0
  136. package/dist/files/playfair-display-latin-ext-600-normal.woff +0 -0
  137. package/dist/files/playfair-display-latin-ext-600-normal.woff2 +0 -0
  138. package/dist/files/playfair-display-latin-ext-700-normal.woff +0 -0
  139. package/dist/files/playfair-display-latin-ext-700-normal.woff2 +0 -0
  140. package/dist/files/playfair-display-vietnamese-400-normal.woff +0 -0
  141. package/dist/files/playfair-display-vietnamese-400-normal.woff2 +0 -0
  142. package/dist/files/playfair-display-vietnamese-500-normal.woff +0 -0
  143. package/dist/files/playfair-display-vietnamese-500-normal.woff2 +0 -0
  144. package/dist/files/playfair-display-vietnamese-600-normal.woff +0 -0
  145. package/dist/files/playfair-display-vietnamese-600-normal.woff2 +0 -0
  146. package/dist/files/playfair-display-vietnamese-700-normal.woff +0 -0
  147. package/dist/files/playfair-display-vietnamese-700-normal.woff2 +0 -0
  148. package/dist/files/press-start-2p-cyrillic-400-normal.woff +0 -0
  149. package/dist/files/press-start-2p-cyrillic-400-normal.woff2 +0 -0
  150. package/dist/files/press-start-2p-cyrillic-ext-400-normal.woff +0 -0
  151. package/dist/files/press-start-2p-cyrillic-ext-400-normal.woff2 +0 -0
  152. package/dist/files/press-start-2p-greek-400-normal.woff +0 -0
  153. package/dist/files/press-start-2p-greek-400-normal.woff2 +0 -0
  154. package/dist/files/press-start-2p-latin-400-normal.woff +0 -0
  155. package/dist/files/press-start-2p-latin-400-normal.woff2 +0 -0
  156. package/dist/files/press-start-2p-latin-ext-400-normal.woff +0 -0
  157. package/dist/files/press-start-2p-latin-ext-400-normal.woff2 +0 -0
  158. package/dist/files/roboto-cyrillic-400-normal.woff +0 -0
  159. package/dist/files/roboto-cyrillic-400-normal.woff2 +0 -0
  160. package/dist/files/roboto-cyrillic-700-normal.woff +0 -0
  161. package/dist/files/roboto-cyrillic-700-normal.woff2 +0 -0
  162. package/dist/files/roboto-cyrillic-ext-400-normal.woff +0 -0
  163. package/dist/files/roboto-cyrillic-ext-400-normal.woff2 +0 -0
  164. package/dist/files/roboto-cyrillic-ext-700-normal.woff +0 -0
  165. package/dist/files/roboto-cyrillic-ext-700-normal.woff2 +0 -0
  166. package/dist/files/roboto-greek-400-normal.woff +0 -0
  167. package/dist/files/roboto-greek-400-normal.woff2 +0 -0
  168. package/dist/files/roboto-greek-700-normal.woff +0 -0
  169. package/dist/files/roboto-greek-700-normal.woff2 +0 -0
  170. package/dist/files/roboto-greek-ext-400-normal.woff +0 -0
  171. package/dist/files/roboto-greek-ext-400-normal.woff2 +0 -0
  172. package/dist/files/roboto-greek-ext-700-normal.woff +0 -0
  173. package/dist/files/roboto-greek-ext-700-normal.woff2 +0 -0
  174. package/dist/files/roboto-latin-400-normal.woff +0 -0
  175. package/dist/files/roboto-latin-400-normal.woff2 +0 -0
  176. package/dist/files/roboto-latin-700-normal.woff +0 -0
  177. package/dist/files/roboto-latin-700-normal.woff2 +0 -0
  178. package/dist/files/roboto-latin-ext-400-normal.woff +0 -0
  179. package/dist/files/roboto-latin-ext-400-normal.woff2 +0 -0
  180. package/dist/files/roboto-latin-ext-700-normal.woff +0 -0
  181. package/dist/files/roboto-latin-ext-700-normal.woff2 +0 -0
  182. package/dist/files/roboto-math-400-normal.woff +0 -0
  183. package/dist/files/roboto-math-400-normal.woff2 +0 -0
  184. package/dist/files/roboto-math-700-normal.woff +0 -0
  185. package/dist/files/roboto-math-700-normal.woff2 +0 -0
  186. package/dist/files/roboto-symbols-400-normal.woff +0 -0
  187. package/dist/files/roboto-symbols-400-normal.woff2 +0 -0
  188. package/dist/files/roboto-symbols-700-normal.woff +0 -0
  189. package/dist/files/roboto-symbols-700-normal.woff2 +0 -0
  190. package/dist/files/roboto-vietnamese-400-normal.woff +0 -0
  191. package/dist/files/roboto-vietnamese-400-normal.woff2 +0 -0
  192. package/dist/files/roboto-vietnamese-700-normal.woff +0 -0
  193. package/dist/files/roboto-vietnamese-700-normal.woff2 +0 -0
  194. package/dist/files/space-grotesk-latin-300-normal.woff +0 -0
  195. package/dist/files/space-grotesk-latin-300-normal.woff2 +0 -0
  196. package/dist/files/space-grotesk-latin-400-normal.woff +0 -0
  197. package/dist/files/space-grotesk-latin-400-normal.woff2 +0 -0
  198. package/dist/files/space-grotesk-latin-500-normal.woff +0 -0
  199. package/dist/files/space-grotesk-latin-500-normal.woff2 +0 -0
  200. package/dist/files/space-grotesk-latin-600-normal.woff +0 -0
  201. package/dist/files/space-grotesk-latin-600-normal.woff2 +0 -0
  202. package/dist/files/space-grotesk-latin-700-normal.woff +0 -0
  203. package/dist/files/space-grotesk-latin-700-normal.woff2 +0 -0
  204. package/dist/files/space-grotesk-latin-ext-300-normal.woff +0 -0
  205. package/dist/files/space-grotesk-latin-ext-300-normal.woff2 +0 -0
  206. package/dist/files/space-grotesk-latin-ext-400-normal.woff +0 -0
  207. package/dist/files/space-grotesk-latin-ext-400-normal.woff2 +0 -0
  208. package/dist/files/space-grotesk-latin-ext-500-normal.woff +0 -0
  209. package/dist/files/space-grotesk-latin-ext-500-normal.woff2 +0 -0
  210. package/dist/files/space-grotesk-latin-ext-600-normal.woff +0 -0
  211. package/dist/files/space-grotesk-latin-ext-600-normal.woff2 +0 -0
  212. package/dist/files/space-grotesk-latin-ext-700-normal.woff +0 -0
  213. package/dist/files/space-grotesk-latin-ext-700-normal.woff2 +0 -0
  214. package/dist/files/space-grotesk-vietnamese-300-normal.woff +0 -0
  215. package/dist/files/space-grotesk-vietnamese-300-normal.woff2 +0 -0
  216. package/dist/files/space-grotesk-vietnamese-400-normal.woff +0 -0
  217. package/dist/files/space-grotesk-vietnamese-400-normal.woff2 +0 -0
  218. package/dist/files/space-grotesk-vietnamese-500-normal.woff +0 -0
  219. package/dist/files/space-grotesk-vietnamese-500-normal.woff2 +0 -0
  220. package/dist/files/space-grotesk-vietnamese-600-normal.woff +0 -0
  221. package/dist/files/space-grotesk-vietnamese-600-normal.woff2 +0 -0
  222. package/dist/files/space-grotesk-vietnamese-700-normal.woff +0 -0
  223. package/dist/files/space-grotesk-vietnamese-700-normal.woff2 +0 -0
  224. package/dist/internal/layout/components/FontPreloadLinks.d.ts +0 -19
  225. package/dist/internal/layout/components/FontPreloadLinks.d.ts.map +0 -1
  226. package/dist/internal/layout/components/FontPreloadLinks.js +0 -1
  227. package/dist/internal/layout/components/i18nSeoMeta.d.ts +0 -54
  228. package/dist/internal/layout/components/i18nSeoMeta.d.ts.map +0 -1
  229. package/dist/internal/layout/components/i18nSeoMeta.js +0 -1
  230. package/dist/utils/useSeo.d.ts +0 -129
  231. package/dist/utils/useSeo.d.ts.map +0 -1
  232. package/dist/utils/useSeo.js +0 -1
@@ -1,19 +0,0 @@
1
- /**
2
- * @fileoverview FontPreloadLinks - Server-only component for Next.js
3
- * @description Links public/dndev-fonts.css, the @font-face rules of the framework
4
- * fonts the app's theme uses (written at build by copyFontsToPublic). Renders nothing
5
- * when the theme uses none (an app that packs its own fonts). Include in the root
6
- * document's <head>.
7
- *
8
- * @version 0.2.0
9
- * @since 0.0.1
10
- * @author AMBROISE PARK Consulting
11
- */
12
- import type { ReactNode } from 'react';
13
- /**
14
- * Server component: `<link rel="stylesheet" href="/dndev-fonts.css">` when discovery
15
- * generated that file (the theme renders text in a framework font), else null.
16
- */
17
- export declare function FontPreloadLinks(): Promise<ReactNode>;
18
- export default FontPreloadLinks;
19
- //# sourceMappingURL=FontPreloadLinks.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FontPreloadLinks.d.ts","sourceRoot":"","sources":["../../../../src/internal/layout/components/FontPreloadLinks.tsx"],"names":[],"mappings":"AACA;;;;;;;;;;GAUG;AAKH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC;;;GAGG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,SAAS,CAAC,CAQ3D;AAED,eAAe,gBAAgB,CAAC"}
@@ -1 +0,0 @@
1
- import e from"node:fs/promises";import o from"node:path";import{jsx as c}from"react/jsx-runtime";var t="dndev-fonts.css";async function r(){try{await e.access(o.join(process.cwd(),"public",t))}catch{return null}return c("link",{rel:"stylesheet",href:`/${t}`})}var a=r;export{r as FontPreloadLinks,a as default};
@@ -1,54 +0,0 @@
1
- /**
2
- * @fileoverview SEO fields from a namespace's `meta` translations
3
- * @description Reads `<ns>:meta.*` key by key, as the i18n convention requires:
4
- * `useTranslation` returns strings only, never objects or arrays.
5
- *
6
- * @version 0.2.2
7
- * @since 0.2.2
8
- * @author AMBROISE PARK Consulting
9
- */
10
- import type { TFunction } from 'i18next';
11
- /**
12
- * Resolves a title or description: explicit value, else its translation.
13
- *
14
- * @param seoValue - `null` omits the field, a string is used as is, `undefined` looks up the translation
15
- * @param translationKey - Namespaced key, e.g. `home:description`
16
- * @param t - Translation function loaded with the key's namespace
17
- * @returns The resolved text, or undefined when omitted or not translated
18
- *
19
- * @version 0.2.2
20
- * @since 0.2.2
21
- * @author AMBROISE PARK Consulting
22
- */
23
- export declare function resolveSeoField(seoValue: string | null | undefined, translationKey: string, t: TFunction): string | undefined;
24
- /**
25
- * SEO fields a namespace can define under `meta`.
26
- *
27
- * @version 0.2.2
28
- * @since 0.2.2
29
- * @author AMBROISE PARK Consulting
30
- */
31
- export interface I18nSeoMeta {
32
- fullTitle?: string;
33
- image?: string;
34
- type?: string;
35
- keywords?: string[];
36
- author?: string;
37
- }
38
- /**
39
- * Reads the SEO fields of a namespace from its translations.
40
- *
41
- * @param t - Translation function loaded with `ns`
42
- * @param ns - Namespace holding the `meta` object
43
- * @returns The defined fields; a missing or empty field is undefined
44
- *
45
- * @example
46
- * // JSON: { "meta": { "image": "/og.png", "keywords": ["a", "b"] } }
47
- * readI18nSeoMeta(t, 'home'); // { image: '/og.png', keywords: ['a', 'b'] }
48
- *
49
- * @version 0.2.2
50
- * @since 0.2.2
51
- * @author AMBROISE PARK Consulting
52
- */
53
- export declare function readI18nSeoMeta(t: TFunction, ns: string): I18nSeoMeta;
54
- //# sourceMappingURL=i18nSeoMeta.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"i18nSeoMeta.d.ts","sourceRoot":"","sources":["../../../../src/internal/layout/components/i18nSeoMeta.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAUzC;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACnC,cAAc,EAAE,MAAM,EACtB,CAAC,EAAE,SAAS,GACX,MAAM,GAAG,SAAS,CAIpB;AAED;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,GAAG,WAAW,CAmBrE"}
@@ -1 +0,0 @@
1
- import{translateArray as d}from"@donotdev/core";var s=20,u={defaultValue:""};function f(n,t,e){if(n!==null)return n!==void 0?n:e(t,u)||void 0}function l(n,t){let e=(i=>n(i,u)),r=i=>e(`${t}:meta.${i}`)||void 0,o=d(e,`${t}:meta.keywords`,s);return{fullTitle:r("fullTitle"),image:r("image"),type:r("type"),keywords:o.length>0?o:void 0,author:r("author")}}export{l as readI18nSeoMeta,f as resolveSeoField};