@rakun-kit/manager-react 1.6.1 → 1.7.0

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 (279) hide show
  1. package/README.md +445 -372
  2. package/dist/cjs/app/app-provider.js +2 -2
  3. package/dist/cjs/app/app-provider.js.map +1 -1
  4. package/dist/cjs/app/runtime-app.js +13 -3
  5. package/dist/cjs/app/runtime-app.js.map +1 -1
  6. package/dist/cjs/client/react.js +38 -3
  7. package/dist/cjs/client/react.js.map +1 -1
  8. package/dist/cjs/client/realtime.js +183 -0
  9. package/dist/cjs/client/realtime.js.map +1 -0
  10. package/dist/cjs/collaboration/ContentCollaborationProvider.js +527 -0
  11. package/dist/cjs/collaboration/ContentCollaborationProvider.js.map +1 -0
  12. package/dist/cjs/collaboration/presence-colors.js +22 -0
  13. package/dist/cjs/collaboration/presence-colors.js.map +1 -0
  14. package/dist/cjs/collaboration/presence-store.js +41 -0
  15. package/dist/cjs/collaboration/presence-store.js.map +1 -0
  16. package/dist/cjs/collaboration/yDocument.js +136 -0
  17. package/dist/cjs/collaboration/yDocument.js.map +1 -0
  18. package/dist/cjs/components/CollaborationPresence.js +40 -0
  19. package/dist/cjs/components/CollaborationPresence.js.map +1 -0
  20. package/dist/cjs/components/VariantSelector.js +3 -1
  21. package/dist/cjs/components/VariantSelector.js.map +1 -1
  22. package/dist/cjs/components/media/previews/dialogs/MediaImageEditorDialog.js +9 -2
  23. package/dist/cjs/components/media/previews/dialogs/MediaImageEditorDialog.js.map +1 -1
  24. package/dist/cjs/components/ui/avatar.js +8 -0
  25. package/dist/cjs/components/ui/avatar.js.map +1 -1
  26. package/dist/cjs/components/ui/data-table.js +1 -1
  27. package/dist/cjs/components/ui/data-table.js.map +1 -1
  28. package/dist/cjs/components/ui/table.js +2 -2
  29. package/dist/cjs/components/ui/table.js.map +1 -1
  30. package/dist/cjs/help/manager-help.js +1 -1
  31. package/dist/cjs/help/manager-help.js.map +1 -1
  32. package/dist/cjs/helpers/resolve-lucide-icon.js +29 -15
  33. package/dist/cjs/helpers/resolve-lucide-icon.js.map +1 -1
  34. package/dist/cjs/i18n/catalog.js +50 -3
  35. package/dist/cjs/i18n/catalog.js.map +1 -1
  36. package/dist/cjs/index.js +1 -0
  37. package/dist/cjs/index.js.map +1 -1
  38. package/dist/cjs/router/dashboard/[contentType]/[edit]/ContentTypeEdit.js +28 -12
  39. package/dist/cjs/router/dashboard/[contentType]/[edit]/ContentTypeEdit.js.map +1 -1
  40. package/dist/cjs/router/dashboard/[contentType]/[edit]/_components/CollaborativeTemplateEditor.js +61 -0
  41. package/dist/cjs/router/dashboard/[contentType]/[edit]/_components/CollaborativeTemplateEditor.js.map +1 -0
  42. package/dist/cjs/router/dashboard/[contentType]/[edit]/_components/ContentCommentsDrawer.js +13 -6
  43. package/dist/cjs/router/dashboard/[contentType]/[edit]/_components/ContentCommentsDrawer.js.map +1 -1
  44. package/dist/cjs/router/dashboard/[contentType]/[edit]/_components/EditSectionNavigation.js +92 -0
  45. package/dist/cjs/router/dashboard/[contentType]/[edit]/_components/EditSectionNavigation.js.map +1 -0
  46. package/dist/cjs/router/dashboard/[contentType]/[edit]/_components/EditTabPanels.js +3 -2
  47. package/dist/cjs/router/dashboard/[contentType]/[edit]/_components/EditTabPanels.js.map +1 -1
  48. package/dist/cjs/router/dashboard/[contentType]/[edit]/_components/EditToolbar.js +31 -68
  49. package/dist/cjs/router/dashboard/[contentType]/[edit]/_components/EditToolbar.js.map +1 -1
  50. package/dist/cjs/router/dashboard/[contentType]/[edit]/_components/LocaleVariants.js +5 -1
  51. package/dist/cjs/router/dashboard/[contentType]/[edit]/_components/LocaleVariants.js.map +1 -1
  52. package/dist/cjs/router/dashboard/[contentType]/[edit]/_components/ModuleNavigation.js +6 -5
  53. package/dist/cjs/router/dashboard/[contentType]/[edit]/_components/ModuleNavigation.js.map +1 -1
  54. package/dist/cjs/router/dashboard/[contentType]/[edit]/_components/PreviewPanel.js +4 -3
  55. package/dist/cjs/router/dashboard/[contentType]/[edit]/_components/PreviewPanel.js.map +1 -1
  56. package/dist/cjs/router/dashboard/[contentType]/[edit]/_components/RouteLayoutModuleTabContent.js +18 -1
  57. package/dist/cjs/router/dashboard/[contentType]/[edit]/_components/RouteLayoutModuleTabContent.js.map +1 -1
  58. package/dist/cjs/router/dashboard/[contentType]/[edit]/_components/SeoTabContent.js +40 -37
  59. package/dist/cjs/router/dashboard/[contentType]/[edit]/_components/SeoTabContent.js.map +1 -1
  60. package/dist/cjs/router/dashboard/[contentType]/[edit]/_context/EditPageContext.js +74 -21
  61. package/dist/cjs/router/dashboard/[contentType]/[edit]/_context/EditPageContext.js.map +1 -1
  62. package/dist/cjs/router/dashboard/[contentType]/[edit]/_fields/DynamicDataControl.js +19 -12
  63. package/dist/cjs/router/dashboard/[contentType]/[edit]/_fields/DynamicDataControl.js.map +1 -1
  64. package/dist/cjs/router/dashboard/[contentType]/[edit]/_fields/ListField/IteratorModulePicker.js +4 -2
  65. package/dist/cjs/router/dashboard/[contentType]/[edit]/_fields/ListField/IteratorModulePicker.js.map +1 -1
  66. package/dist/cjs/router/dashboard/[contentType]/[edit]/_fields/ListField/ListUI.js +13 -45
  67. package/dist/cjs/router/dashboard/[contentType]/[edit]/_fields/ListField/ListUI.js.map +1 -1
  68. package/dist/cjs/router/dashboard/[contentType]/[edit]/_fields/RelationField/NewRelation.js +2 -4
  69. package/dist/cjs/router/dashboard/[contentType]/[edit]/_fields/RelationField/NewRelation.js.map +1 -1
  70. package/dist/cjs/router/dashboard/[contentType]/[edit]/_fields/RelationField/relation-state.js +12 -0
  71. package/dist/cjs/router/dashboard/[contentType]/[edit]/_fields/RelationField/relation-state.js.map +1 -0
  72. package/dist/cjs/router/dashboard/[contentType]/[edit]/_fields/shared/FieldWrapper.js +12 -1
  73. package/dist/cjs/router/dashboard/[contentType]/[edit]/_fields/shared/FieldWrapper.js.map +1 -1
  74. package/dist/cjs/router/dashboard/[contentType]/[edit]/_fields/shared/collaborative-field-state.js +18 -0
  75. package/dist/cjs/router/dashboard/[contentType]/[edit]/_fields/shared/collaborative-field-state.js.map +1 -0
  76. package/dist/cjs/router/dashboard/[contentType]/[edit]/_fields/shared/condition-state.js +18 -4
  77. package/dist/cjs/router/dashboard/[contentType]/[edit]/_fields/shared/condition-state.js.map +1 -1
  78. package/dist/cjs/router/dashboard/[contentType]/[edit]/_hooks/useContentDocumentActions.js +48 -13
  79. package/dist/cjs/router/dashboard/[contentType]/[edit]/_hooks/useContentDocumentActions.js.map +1 -1
  80. package/dist/cjs/router/dashboard/[contentType]/[edit]/_hooks/useContentPreview.js +8 -5
  81. package/dist/cjs/router/dashboard/[contentType]/[edit]/_hooks/useContentPreview.js.map +1 -1
  82. package/dist/cjs/router/dashboard/[contentType]/[edit]/edit.js +61 -11
  83. package/dist/cjs/router/dashboard/[contentType]/[edit]/edit.js.map +1 -1
  84. package/dist/cjs/router/dashboard/[contentType]/[edit]/screen.js +48 -4
  85. package/dist/cjs/router/dashboard/[contentType]/[edit]/screen.js.map +1 -1
  86. package/dist/cjs/router/dashboard/screen.js +7 -3
  87. package/dist/cjs/router/dashboard/screen.js.map +1 -1
  88. package/dist/cjs/router/dashboard/seo/screen.js +10 -0
  89. package/dist/cjs/router/dashboard/seo/screen.js.map +1 -1
  90. package/dist/cjs/router/dashboard/seo/site-analysis.js +19 -4
  91. package/dist/cjs/router/dashboard/seo/site-analysis.js.map +1 -1
  92. package/dist/cjs/router/index.js +3 -0
  93. package/dist/cjs/router/index.js.map +1 -1
  94. package/dist/cjs/router/shared/route-definitions.js +4 -1
  95. package/dist/cjs/router/shared/route-definitions.js.map +1 -1
  96. package/dist/cjs/router/shared/route-list.js +214 -64
  97. package/dist/cjs/router/shared/route-list.js.map +1 -1
  98. package/dist/docs/index.md +420 -304
  99. package/dist/esm/app/app-provider.d.ts +4 -1
  100. package/dist/esm/app/app-provider.d.ts.map +1 -1
  101. package/dist/esm/app/app-provider.js +2 -2
  102. package/dist/esm/app/app-provider.js.map +1 -1
  103. package/dist/esm/app/runtime-app.d.ts +2 -1
  104. package/dist/esm/app/runtime-app.d.ts.map +1 -1
  105. package/dist/esm/app/runtime-app.js +13 -3
  106. package/dist/esm/app/runtime-app.js.map +1 -1
  107. package/dist/esm/client/react.d.ts +13 -1
  108. package/dist/esm/client/react.d.ts.map +1 -1
  109. package/dist/esm/client/react.js +35 -3
  110. package/dist/esm/client/react.js.map +1 -1
  111. package/dist/esm/client/realtime.d.ts +31 -0
  112. package/dist/esm/client/realtime.d.ts.map +1 -0
  113. package/dist/esm/client/realtime.js +174 -0
  114. package/dist/esm/client/realtime.js.map +1 -0
  115. package/dist/esm/collaboration/ContentCollaborationProvider.d.ts +42 -0
  116. package/dist/esm/collaboration/ContentCollaborationProvider.d.ts.map +1 -0
  117. package/dist/esm/collaboration/ContentCollaborationProvider.js +486 -0
  118. package/dist/esm/collaboration/ContentCollaborationProvider.js.map +1 -0
  119. package/dist/esm/collaboration/presence-colors.d.ts +2 -0
  120. package/dist/esm/collaboration/presence-colors.d.ts.map +1 -0
  121. package/dist/esm/collaboration/presence-colors.js +18 -0
  122. package/dist/esm/collaboration/presence-colors.js.map +1 -0
  123. package/dist/esm/collaboration/presence-store.d.ts +10 -0
  124. package/dist/esm/collaboration/presence-store.d.ts.map +1 -0
  125. package/dist/esm/collaboration/presence-store.js +34 -0
  126. package/dist/esm/collaboration/presence-store.js.map +1 -0
  127. package/dist/esm/collaboration/yDocument.d.ts +5 -0
  128. package/dist/esm/collaboration/yDocument.d.ts.map +1 -0
  129. package/dist/esm/collaboration/yDocument.js +98 -0
  130. package/dist/esm/collaboration/yDocument.js.map +1 -0
  131. package/dist/esm/components/CollaborationPresence.d.ts +5 -0
  132. package/dist/esm/components/CollaborationPresence.d.ts.map +1 -0
  133. package/dist/esm/components/CollaborationPresence.js +36 -0
  134. package/dist/esm/components/CollaborationPresence.js.map +1 -0
  135. package/dist/esm/components/VariantSelector.d.ts.map +1 -1
  136. package/dist/esm/components/VariantSelector.js +4 -2
  137. package/dist/esm/components/VariantSelector.js.map +1 -1
  138. package/dist/esm/components/media/previews/dialogs/MediaImageEditorDialog.d.ts.map +1 -1
  139. package/dist/esm/components/media/previews/dialogs/MediaImageEditorDialog.js +10 -3
  140. package/dist/esm/components/media/previews/dialogs/MediaImageEditorDialog.js.map +1 -1
  141. package/dist/esm/components/ui/avatar.d.ts +3 -1
  142. package/dist/esm/components/ui/avatar.d.ts.map +1 -1
  143. package/dist/esm/components/ui/avatar.js +7 -1
  144. package/dist/esm/components/ui/avatar.js.map +1 -1
  145. package/dist/esm/components/ui/data-table.d.ts.map +1 -1
  146. package/dist/esm/components/ui/data-table.js +1 -1
  147. package/dist/esm/components/ui/data-table.js.map +1 -1
  148. package/dist/esm/components/ui/table.d.ts +4 -1
  149. package/dist/esm/components/ui/table.d.ts.map +1 -1
  150. package/dist/esm/components/ui/table.js +2 -2
  151. package/dist/esm/components/ui/table.js.map +1 -1
  152. package/dist/esm/help/manager-help.d.ts.map +1 -1
  153. package/dist/esm/help/manager-help.js +1 -1
  154. package/dist/esm/help/manager-help.js.map +1 -1
  155. package/dist/esm/helpers/resolve-lucide-icon.d.ts +3 -1
  156. package/dist/esm/helpers/resolve-lucide-icon.d.ts.map +1 -1
  157. package/dist/esm/helpers/resolve-lucide-icon.js +27 -14
  158. package/dist/esm/helpers/resolve-lucide-icon.js.map +1 -1
  159. package/dist/esm/hooks/use-isomorphic-layout-effect.d.ts +1 -1
  160. package/dist/esm/hooks/use-isomorphic-layout-effect.d.ts.map +1 -1
  161. package/dist/esm/i18n/catalog.d.ts +84 -3
  162. package/dist/esm/i18n/catalog.d.ts.map +1 -1
  163. package/dist/esm/i18n/catalog.js +50 -3
  164. package/dist/esm/i18n/catalog.js.map +1 -1
  165. package/dist/esm/index.d.ts +1 -0
  166. package/dist/esm/index.d.ts.map +1 -1
  167. package/dist/esm/index.js +1 -0
  168. package/dist/esm/index.js.map +1 -1
  169. package/dist/esm/router/dashboard/[contentType]/[edit]/ContentTypeEdit.d.ts +1 -0
  170. package/dist/esm/router/dashboard/[contentType]/[edit]/ContentTypeEdit.d.ts.map +1 -1
  171. package/dist/esm/router/dashboard/[contentType]/[edit]/ContentTypeEdit.js +28 -12
  172. package/dist/esm/router/dashboard/[contentType]/[edit]/ContentTypeEdit.js.map +1 -1
  173. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/CollaborativeTemplateEditor.d.ts +17 -0
  174. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/CollaborativeTemplateEditor.d.ts.map +1 -0
  175. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/CollaborativeTemplateEditor.js +55 -0
  176. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/CollaborativeTemplateEditor.js.map +1 -0
  177. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/ContentCommentsDrawer.d.ts.map +1 -1
  178. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/ContentCommentsDrawer.js +15 -8
  179. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/ContentCommentsDrawer.js.map +1 -1
  180. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/EditSectionNavigation.d.ts +2 -0
  181. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/EditSectionNavigation.d.ts.map +1 -0
  182. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/EditSectionNavigation.js +88 -0
  183. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/EditSectionNavigation.js.map +1 -0
  184. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/EditTabPanels.d.ts +3 -1
  185. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/EditTabPanels.d.ts.map +1 -1
  186. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/EditTabPanels.js +3 -2
  187. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/EditTabPanels.js.map +1 -1
  188. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/EditToolbar.d.ts +5 -1
  189. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/EditToolbar.d.ts.map +1 -1
  190. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/EditToolbar.js +34 -71
  191. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/EditToolbar.js.map +1 -1
  192. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/LocaleVariants.d.ts.map +1 -1
  193. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/LocaleVariants.js +6 -2
  194. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/LocaleVariants.js.map +1 -1
  195. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/ModuleNavigation.d.ts +3 -1
  196. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/ModuleNavigation.d.ts.map +1 -1
  197. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/ModuleNavigation.js +6 -5
  198. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/ModuleNavigation.js.map +1 -1
  199. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/PreviewPanel.d.ts +3 -1
  200. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/PreviewPanel.d.ts.map +1 -1
  201. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/PreviewPanel.js +5 -4
  202. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/PreviewPanel.js.map +1 -1
  203. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/RouteLayoutModuleTabContent.d.ts.map +1 -1
  204. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/RouteLayoutModuleTabContent.js +18 -1
  205. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/RouteLayoutModuleTabContent.js.map +1 -1
  206. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/SeoTabContent.d.ts.map +1 -1
  207. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/SeoTabContent.js +40 -37
  208. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/SeoTabContent.js.map +1 -1
  209. package/dist/esm/router/dashboard/[contentType]/[edit]/_context/EditPageContext.d.ts +8 -2
  210. package/dist/esm/router/dashboard/[contentType]/[edit]/_context/EditPageContext.d.ts.map +1 -1
  211. package/dist/esm/router/dashboard/[contentType]/[edit]/_context/EditPageContext.js +75 -22
  212. package/dist/esm/router/dashboard/[contentType]/[edit]/_context/EditPageContext.js.map +1 -1
  213. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/DynamicDataControl.d.ts.map +1 -1
  214. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/DynamicDataControl.js +19 -12
  215. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/DynamicDataControl.js.map +1 -1
  216. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/ListField/IteratorModulePicker.d.ts.map +1 -1
  217. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/ListField/IteratorModulePicker.js +4 -2
  218. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/ListField/IteratorModulePicker.js.map +1 -1
  219. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/ListField/ListUI.d.ts.map +1 -1
  220. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/ListField/ListUI.js +15 -47
  221. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/ListField/ListUI.js.map +1 -1
  222. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/RelationField/NewRelation.d.ts.map +1 -1
  223. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/RelationField/NewRelation.js +2 -4
  224. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/RelationField/NewRelation.js.map +1 -1
  225. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/RelationField/relation-state.d.ts +7 -0
  226. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/RelationField/relation-state.d.ts.map +1 -0
  227. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/RelationField/relation-state.js +8 -0
  228. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/RelationField/relation-state.js.map +1 -0
  229. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/shared/FieldWrapper.d.ts.map +1 -1
  230. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/shared/FieldWrapper.js +13 -2
  231. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/shared/FieldWrapper.js.map +1 -1
  232. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/shared/collaborative-field-state.d.ts +12 -0
  233. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/shared/collaborative-field-state.d.ts.map +1 -0
  234. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/shared/collaborative-field-state.js +14 -0
  235. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/shared/collaborative-field-state.js.map +1 -0
  236. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/shared/condition-state.d.ts +9 -1
  237. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/shared/condition-state.d.ts.map +1 -1
  238. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/shared/condition-state.js +16 -3
  239. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/shared/condition-state.js.map +1 -1
  240. package/dist/esm/router/dashboard/[contentType]/[edit]/_hooks/useContentDocumentActions.d.ts +2 -0
  241. package/dist/esm/router/dashboard/[contentType]/[edit]/_hooks/useContentDocumentActions.d.ts.map +1 -1
  242. package/dist/esm/router/dashboard/[contentType]/[edit]/_hooks/useContentDocumentActions.js +48 -13
  243. package/dist/esm/router/dashboard/[contentType]/[edit]/_hooks/useContentDocumentActions.js.map +1 -1
  244. package/dist/esm/router/dashboard/[contentType]/[edit]/_hooks/useContentPreview.d.ts +1 -1
  245. package/dist/esm/router/dashboard/[contentType]/[edit]/_hooks/useContentPreview.d.ts.map +1 -1
  246. package/dist/esm/router/dashboard/[contentType]/[edit]/_hooks/useContentPreview.js +8 -5
  247. package/dist/esm/router/dashboard/[contentType]/[edit]/_hooks/useContentPreview.js.map +1 -1
  248. package/dist/esm/router/dashboard/[contentType]/[edit]/_hooks/useRouteLayoutData.d.ts.map +1 -1
  249. package/dist/esm/router/dashboard/[contentType]/[edit]/edit.d.ts.map +1 -1
  250. package/dist/esm/router/dashboard/[contentType]/[edit]/edit.js +63 -13
  251. package/dist/esm/router/dashboard/[contentType]/[edit]/edit.js.map +1 -1
  252. package/dist/esm/router/dashboard/[contentType]/[edit]/screen.d.ts.map +1 -1
  253. package/dist/esm/router/dashboard/[contentType]/[edit]/screen.js +13 -2
  254. package/dist/esm/router/dashboard/[contentType]/[edit]/screen.js.map +1 -1
  255. package/dist/esm/router/dashboard/screen.d.ts.map +1 -1
  256. package/dist/esm/router/dashboard/screen.js +8 -4
  257. package/dist/esm/router/dashboard/screen.js.map +1 -1
  258. package/dist/esm/router/dashboard/seo/screen.d.ts.map +1 -1
  259. package/dist/esm/router/dashboard/seo/screen.js +10 -0
  260. package/dist/esm/router/dashboard/seo/screen.js.map +1 -1
  261. package/dist/esm/router/dashboard/seo/site-analysis.d.ts +4 -2
  262. package/dist/esm/router/dashboard/seo/site-analysis.d.ts.map +1 -1
  263. package/dist/esm/router/dashboard/seo/site-analysis.js +19 -4
  264. package/dist/esm/router/dashboard/seo/site-analysis.js.map +1 -1
  265. package/dist/esm/router/index.d.ts +1 -0
  266. package/dist/esm/router/index.d.ts.map +1 -1
  267. package/dist/esm/router/index.js +1 -0
  268. package/dist/esm/router/index.js.map +1 -1
  269. package/dist/esm/router/shared/route-definitions.d.ts +1 -1
  270. package/dist/esm/router/shared/route-definitions.d.ts.map +1 -1
  271. package/dist/esm/router/shared/route-definitions.js +4 -1
  272. package/dist/esm/router/shared/route-definitions.js.map +1 -1
  273. package/dist/esm/router/shared/route-list.d.ts +3 -0
  274. package/dist/esm/router/shared/route-list.d.ts.map +1 -1
  275. package/dist/esm/router/shared/route-list.js +146 -30
  276. package/dist/esm/router/shared/route-list.js.map +1 -1
  277. package/dist/styles.css +309 -77
  278. package/dist/tsconfig.build.tsbuildinfo +1 -1
  279. package/package.json +6 -2
package/README.md CHANGED
@@ -1,372 +1,445 @@
1
- # @rakun-kit/manager-react
2
-
3
- React manager UI and client utilities for Rakun.
4
-
5
- Most apps use this package through framework adapters such as
6
- `@rakun-kit/next/manager`, but the runtime components and clients are also
7
- published for custom integrations.
8
-
9
- ## Browser App
10
-
11
- Render the manager with a manager client and navigation implementation:
12
-
13
- ```tsx
14
- import {
15
- ManagerBrowserApp,
16
- createHttpManagerClient,
17
- } from "@rakun-kit/manager-react";
18
- import "@rakun-kit/manager-react/styles.css";
19
-
20
- const client = createHttpManagerClient({
21
- baseUrl: "/api/rakun",
22
- });
23
-
24
- export function ManagerPage() {
25
- return (
26
- <ManagerBrowserApp
27
- client={client}
28
- pathname={window.location.pathname}
29
- basePath="/backend"
30
- />
31
- );
32
- }
33
- ```
34
-
35
- `ManagerBrowserApp` creates browser path navigation by default. Use
36
- `ManagerRuntimeApp` when you need to provide custom navigation.
37
-
38
- ## Clients
39
-
40
- HTTP client:
41
-
42
- ```ts
43
- import { createHttpManagerClient } from "@rakun-kit/manager-react/client/http";
44
-
45
- const client = createHttpManagerClient({
46
- baseUrl: "/api/rakun",
47
- });
48
-
49
- const contentTypes = await client.request("manager.contentTypes");
50
- ```
51
-
52
- tRPC client adapter:
53
-
54
- ```ts
55
- import { createTrpcManagerClient } from "@rakun-kit/manager-react/client/trpc";
56
-
57
- const managerClient = createTrpcManagerClient(trpcProxyClient);
58
- ```
59
-
60
- Custom client:
61
-
62
- ```ts
63
- import { createManagerClient } from "@rakun-kit/manager-react/client/request";
64
-
65
- const client = createManagerClient(async (name, input, options) => {
66
- // call your transport here
67
- });
68
- ```
69
-
70
- ## Navigation
71
-
72
- Use `createPathManagerNavigation` for router integrations:
73
-
74
- ```ts
75
- import { createPathManagerNavigation } from "@rakun-kit/manager-react/state/navigation";
76
-
77
- const navigation = createPathManagerNavigation({
78
- basePath: "/backend",
79
- push: (href) => router.push(href),
80
- replace: (href) => router.replace(href),
81
- });
82
- ```
83
-
84
- ## Link fields
85
-
86
- The `f.link()` editor shows a title alongside its destination. Users can paste
87
- or type a direct URL, choose the home page, or browse configured page-route
88
- types and select one of their entries. Internal selections automatically use
89
- the item label when the title is empty. Direct links are stored as
90
- `{ href, title }`; internal links as `{ routeId, contentTypeId, title }` so core
91
- can resolve localized paths. Persisted legacy URL strings are normalized to
92
- `{ href, title: '' }` when loaded and remain editable.
93
-
94
- Compound arrays such as `f.array(f.link())` are reorderable from their drag
95
- handles in the Info editor, without losing unsaved values inside each item.
96
-
97
- `f.menu()` provides a navigation-tree editor intended especially for headers.
98
- Every item uses the same internal/direct destination picker as `f.link()` and
99
- can contain child items. Drag vertically to reorder and horizontally to nest or
100
- outdent; the level buttons provide the same operations for keyboard users.
101
- Removing an item also removes its descendant subtree.
102
-
103
- ## Media uploads
104
-
105
- Original file names may contain accents, non-Latin scripts, or emoji. The
106
- manager transports those names through ASCII-safe upload headers and core
107
- restores them before saving media metadata.
108
-
109
- The optimization popover separates Image and Video settings through its Format
110
- selector. Images retain their normal format and responsive-image controls;
111
- videos have their own quality and are converted to both MP4 and WebM.
112
-
113
- With optimization enabled in the media toolbar, an image or video's context
114
- menu offers `Reimport`. It regenerates the configured outputs while retaining
115
- the existing media record and all relations to it. Multi-select supports the
116
- same reimport action from the selection toolbar. Optimization is on by default,
117
- and generated image previews are stored as inline `data:image/...` LQIP values
118
- on the media record.
119
-
120
- An image's context menu also offers `Replace image`. The selected file replaces
121
- the stored image and generated variants while retaining the existing media ID,
122
- name, title, alt text, folder, status, and every relation to it. Rakun also
123
- revalidates directly referencing pages when route revalidation is configured.
124
-
125
- ## Dynamic data mappings
126
-
127
- Fields configured with core `.help(text)` show a compact help icon beside their
128
- label. Activating it opens the guidance in a popover, including for inline
129
- modules and nested content types. Translation keys are resolved with the active
130
- manager locale, while unregistered strings are displayed directly.
131
-
132
- The list mapping editor supports recursive `blocks` targets. Select
133
- `Nested list` for a mapped list property to configure its own source, query,
134
- filters, item type, and field mapping. `Current document` query values inside
135
- that nested editor resolve against the parent source item.
136
-
137
- Arrays of links and arrays of relations, including `relation().multiple()`, can
138
- choose `Direct field` to bind the whole array or `Nested list` to map every
139
- source item. Link items show `title` and `href`; relation items show the fields
140
- of the related content type. Unlike `blocks`, these homogeneous arrays do not
141
- add a `{ name, value }` wrapper to resolved items.
142
-
143
- When an array or `.multiple()` relation, file, select, or content-reference field
144
- declares core `.min(count)` or `.max(count)` limits, its editor shows the current
145
- count and configured range. It reports values outside that range and prevents
146
- confirming or adding beyond the maximum.
147
-
148
- A target link appears as separate `<field>.title` and `<field>.href` mapping
149
- rows, so its label and destination can come from different source fields.
150
-
151
- SEO field mappings can use compatible fields from the full current document.
152
- New documents also honor core string-field `.seo('<seoField>')` configuration
153
- as an editable initial dynamic data binding.
154
-
155
- ## llms.txt settings
156
-
157
- Settings AI content manages the optional, site-level `llms.txt` Markdown guide served to
158
- AI tools. Editors can enable publishing, override the SEO-derived title and
159
- summary, add guidance, and order sections containing internal pages or external
160
- URLs. Marking a section as Secondary content places it under `## Optional`
161
- while preserving its title as a subsection in the generated document. For content types with publication states, the internal
162
- page picker only offers published documents. Nothing is added automatically
163
- from the sitemap.
164
-
165
- Authenticated manager layouts place a Visit site action at the top-right of the
166
- logo block. It opens SEO `siteUrl` in a new tab, falling back to `/` on the
167
- manager host until that setting is configured. A published document with a
168
- resolved page route also gets a contextual View page button in its edit toolbar;
169
- the URL follows the selected manager language and locale variant.
170
-
171
- Routeable content splits its SEO tab into Metadata and Analysis. Generate
172
- report renders the current unsaved form through the configured preview and
173
- reports metadata lengths, heading structure, missing image alt attributes,
174
- indexability, social metadata, rendered JSON-LD blocks, and Google and sharing
175
- previews. JSON-LD results identify invalid JSON and missing `@context` or
176
- `@type`. For saved documents, the report is stored with its score and date when
177
- the editor can create SEO reports. Previous reports for the active language and
178
- route can be reopened directly from the document's Analysis view. A protective
179
- `noindex` on the temporary preview URL does not affect the content's
180
- indexability result.
181
-
182
- The secondary sidebar also includes a site-wide SEO screen above the media
183
- library. It audits stored metadata for published routeable documents in the
184
- active language, treats the global default description as a valid fallback
185
- with a warning, highlights duplicates and incomplete custom Open Graph data,
186
- and stores every run so its score can be followed over time. Access and report
187
- creation reuse the `SeoSettings` read and own permissions. Evolution snapshots
188
- and recent page reports are fetched and displayed in bounded, paginated groups.
189
-
190
- ## Styles
191
-
192
- Import the package stylesheet once:
193
-
194
- ```ts
195
- import "@rakun-kit/manager-react/styles.css";
196
- ```
197
-
198
- ## Manager languages
199
-
200
- English and the locale runtime are built into this package. Extra translations
201
- ship from a separate package:
202
-
203
- ```sh
204
- bun add @rakun-kit/manager-locales
205
- # or: npm install @rakun-kit/manager-locales
206
- ```
207
-
208
- Import only the locale needed by the server bootstrap:
209
-
210
- ```ts
211
- import { esManagerLocalePack } from '@rakun-kit/manager-locales/es'
212
-
213
- rakunBootstrap({
214
- // ...
215
- managerLanguages: [esManagerLocalePack],
216
- })
217
- ```
218
-
219
- Each language has an independent subpath, so application bundlers only include
220
- the locales explicitly imported by the host.
221
-
222
- Content-type titles and categories can use project-defined message keys without
223
- adding them to the built-in `ManagerMessageKey` union. Add an English partial
224
- pack and extend installed locales through `managerLanguages`:
225
-
226
- ```ts
227
- import { extendManagerLanguagePack } from '@rakun-kit/core/contracts'
228
- import { esManagerLocalePack } from '@rakun-kit/manager-locales/es'
229
-
230
- const managerLanguages = [
231
- {
232
- code: 'en',
233
- name: 'English',
234
- messages: {
235
- 'field.title': 'Title',
236
- 'layoutModule.header': 'Header',
237
- 'project.contentTypes.article.menu': 'Articles',
238
- },
239
- },
240
- extendManagerLanguagePack(esManagerLocalePack, {
241
- 'field.title': 'Título',
242
- 'layoutModule.header': 'Cabecera',
243
- 'project.contentTypes.article.menu': 'Artículos',
244
- }),
245
- ]
246
- ```
247
-
248
- Then set `menu.title` or `menu.category` to that arbitrary key. Project keys are
249
- resolved at runtime but remain outside the static manager catalog.
250
-
251
- Field labels use the dynamic `field.<fieldName>` namespace. A content-type field
252
- named `title`, for example, automatically resolves `field.title` in edit forms
253
- and list columns without adding it to `ManagerMessageKey`.
254
-
255
- Layout module labels follow `layoutModule.<layoutKey>`. For example, the
256
- `header` slot automatically resolves `layoutModule.header` in its tab and
257
- configuration panel.
258
-
259
- ## Event Logs
260
-
261
- Settings Logs displays the persistent Rakun event stream through the native
262
- `manager.logs.list` operation. The screen supports filters, cursor pagination,
263
- and structured event details. Both the settings card and the operation require
264
- the `system.eventLog.read` permission, which can be assigned from Settings →
265
- User Roles.
266
-
267
- ## Manager Plugins
268
-
269
- Manager plugins run inside the normal providers and can add dashboard routes,
270
- sidebar items, and custom field editors:
271
-
272
- ```tsx
273
- import {
274
- defineRakunManagerPlugin,
275
- ManagerBrowserApp,
276
- } from '@rakun-kit/manager-react'
277
-
278
- const analyticsManagerPlugin = defineRakunManagerPlugin({
279
- id: '@acme/rakun-analytics',
280
- routes: [{
281
- id: 'dashboard',
282
- path: '/analytics',
283
- component: AnalyticsScreen,
284
- permissions: ['plugin.analytics.view'],
285
- }],
286
- sidebar: [{
287
- id: 'analytics',
288
- title: 'Analytics',
289
- routeId: 'dashboard',
290
- position: 'primary',
291
- group: 'Plugins',
292
- }],
293
- fieldEditors: {
294
- '@acme/rakun-analytics.query': QueryEditor,
295
- },
296
- })
297
-
298
- <ManagerBrowserApp plugins={[analyticsManagerPlugin]} {...props} />
299
- ```
300
-
301
- Use `ManagerFieldEditorProps`, `ManagerFieldEditorRef`, and
302
- `useManagerFieldValue` from `@rakun-kit/manager-react/plugins` when implementing
303
- field editors. Next.js applications should import plugin objects inside a
304
- `'use client'` wrapper around `RakunManagerClientPage`; `RakunManagerPage` accepts
305
- that wrapper through `managerComponent`.
306
-
307
- ### Extending the RichText editor
308
-
309
- Manager plugins can register Lexical nodes and React plugins for every
310
- `RichText` field, including fields rendered inside relations, blocks, and
311
- modules:
312
-
313
- ```tsx
314
- 'use client'
315
-
316
- import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'
317
- import {
318
- defineRakunManagerPlugin,
319
- type ManagerRichTextPluginProps,
320
- } from '@rakun-kit/manager-react/plugins'
321
- import { MentionNode } from './MentionNode'
322
-
323
- const MentionsPlugin = ({ id }: ManagerRichTextPluginProps) => {
324
- const [editor] = useLexicalComposerContext()
325
-
326
- // Register commands and listeners on `editor` here.
327
- return null
328
- }
329
-
330
- export const mentionsManagerPlugin = defineRakunManagerPlugin({
331
- id: '@acme/rakun-mentions',
332
- richText: {
333
- nodes: [MentionNode],
334
- plugins: [
335
- {
336
- id: '@acme/rakun-mentions.plugin',
337
- component: MentionsPlugin,
338
- placement: 'editor',
339
- },
340
- ],
341
- },
342
- })
343
- ```
344
-
345
- Lexical plugin components receive `ManagerRichTextPluginProps` (the field id,
346
- configuration, current content type, and related field metadata) and render
347
- inside `LexicalComposer`, so they can use the normal Lexical React hooks.
348
- Supported placements are `toolbar`, `block-format`, `editor` (the default),
349
- `actions-start`, and `actions-end`. `block-format` components render inside the
350
- manager's block selector and can use `ManagerRichTextBlockFormatItem` from
351
- `@rakun-kit/manager-react/rich-text`. Contributions keep declaration order
352
- unless an explicit `order` is provided. Node types and plugin ids must be unique;
353
- conflicts report both plugin owners. Node replacements use Lexical's standard
354
- `LexicalNodeReplacement` configuration.
355
-
356
- ## Exports
357
-
358
- - `@rakun-kit/manager-react`: manager app, providers, clients, navigation, router, layout, media, and state helpers.
359
- - `@rakun-kit/manager-react/client/http`: HTTP manager client.
360
- - `@rakun-kit/manager-react/client/request`: transport-agnostic manager client.
361
- - `@rakun-kit/manager-react/client/trpc`: tRPC proxy client adapter.
362
- - `@rakun-kit/manager-react/app/runtime-app`: `ManagerRuntimeApp`, `ManagerBrowserApp`.
363
- - `@rakun-kit/manager-react/state/navigation`: navigation helpers and provider.
364
- - `@rakun-kit/manager-react/link`: link component provider.
365
- - `@rakun-kit/manager-react/i18n`: locale runtime, catalog, and locale types.
366
- - `@rakun-kit/manager-react/styles.css`: bundled manager styles.
367
-
368
- ## Build
369
-
370
- ```sh
371
- bun run build --workspace @rakun-kit/manager-react
372
- ```
1
+ # @rakun-kit/manager-react
2
+
3
+ React manager UI and client utilities for Rakun.
4
+
5
+ Most apps use this package through framework adapters such as
6
+ `@rakun-kit/next/manager`, but the runtime components and clients are also
7
+ published for custom integrations.
8
+
9
+ ## Browser App
10
+
11
+ Render the manager with a manager client and navigation implementation:
12
+
13
+ ```tsx
14
+ import { ManagerBrowserApp, createHttpManagerClient } from '@rakun-kit/manager-react'
15
+ import '@rakun-kit/manager-react/styles.css'
16
+
17
+ const client = createHttpManagerClient({
18
+ baseUrl: '/api/rakun',
19
+ })
20
+
21
+ export function ManagerPage() {
22
+ return (
23
+ <ManagerBrowserApp client={client} pathname={window.location.pathname} basePath="/backend" />
24
+ )
25
+ }
26
+ ```
27
+
28
+ `ManagerBrowserApp` creates browser path navigation by default. Use
29
+ `ManagerRuntimeApp` when you need to provide custom navigation.
30
+
31
+ Built-in screens are split by manager route and loaded on first visit. Lucide
32
+ names configured for content-type and module-picker icons remain unrestricted;
33
+ the manager accepts kebab-case or PascalCase names and loads the selected icon
34
+ on demand. Hosts can use `preloadManagerPath` when their router wants to
35
+ prefetch a built-in route chunk.
36
+
37
+ ## Realtime synchronization
38
+
39
+ `ManagerBrowserApp` and `ManagerRuntimeApp` read the realtime transport from
40
+ the core `manager.uiLocales` bootstrap response. They automatically use
41
+ polling or SSE according to the configured Rakun platform. Pass the API base
42
+ URL when a relative realtime endpoint must be resolved:
43
+
44
+ ```tsx
45
+ <ManagerBrowserApp
46
+ client={client}
47
+ realtimeBaseUrl="/api/rakun"
48
+ pathname={window.location.pathname}
49
+ />
50
+ ```
51
+
52
+ The default `sseRealtime()` endpoint resolves to `<realtimeBaseUrl>/realtime`,
53
+ so core bootstrap configuration does not repeat the API base path.
54
+
55
+ Event transports subscribe to invalidation topics published by core. Content
56
+ collaboration, locale variants, versions, comments, and notifications refresh
57
+ only after a matching event; their periodic POST requests remain only as the
58
+ polling fallback. The SSE provider multiplexes all active topics over one
59
+ `EventSource`, avoiding per-origin browser connection limits when several
60
+ manager sessions are open. Custom hosts can also pass a `RealtimeProvider`
61
+ directly to `ManagerProvider` or `ManagerAppProvider`.
62
+
63
+ ## Clients
64
+
65
+ HTTP client:
66
+
67
+ ```ts
68
+ import { createHttpManagerClient } from '@rakun-kit/manager-react/client/http'
69
+
70
+ const client = createHttpManagerClient({
71
+ baseUrl: '/api/rakun',
72
+ })
73
+
74
+ const contentTypes = await client.request('manager.contentTypes')
75
+ ```
76
+
77
+ tRPC client adapter:
78
+
79
+ ```ts
80
+ import { createTrpcManagerClient } from '@rakun-kit/manager-react/client/trpc'
81
+
82
+ const managerClient = createTrpcManagerClient(trpcProxyClient)
83
+ ```
84
+
85
+ Custom client:
86
+
87
+ ```ts
88
+ import { createManagerClient } from '@rakun-kit/manager-react/client/request'
89
+
90
+ const client = createManagerClient(async (name, input, options) => {
91
+ // call your transport here
92
+ })
93
+ ```
94
+
95
+ ## Navigation
96
+
97
+ Use `createPathManagerNavigation` for router integrations:
98
+
99
+ ```ts
100
+ import { createPathManagerNavigation } from '@rakun-kit/manager-react/state/navigation'
101
+
102
+ const navigation = createPathManagerNavigation({
103
+ basePath: '/backend',
104
+ push: (href) => router.push(href),
105
+ replace: (href) => router.replace(href),
106
+ })
107
+ ```
108
+
109
+ Hosts that own the router can pass a `linkComponent` to `ManagerBrowserApp` and
110
+ use `preloadManagerPath` from the router package to warm built-in route chunks.
111
+
112
+ ## Link fields
113
+
114
+ The `f.link()` editor shows a title alongside its destination. Users can paste
115
+ or type a direct URL, choose the home page, or browse configured page-route
116
+ types and select one of their entries. Internal selections automatically use
117
+ the item label when the title is empty. Direct links are stored as
118
+ `{ href, title }`; internal links as `{ routeId, contentTypeId, title }` so core
119
+ can resolve localized paths. Persisted legacy URL strings are normalized to
120
+ `{ href, title: '' }` when loaded and remain editable.
121
+
122
+ Compound arrays such as `f.array(f.link())` are reorderable from their drag
123
+ handles in the Info editor, without losing unsaved values inside each item.
124
+
125
+ `f.menu()` provides a navigation-tree editor intended especially for headers.
126
+ Every item uses the same internal/direct destination picker as `f.link()` and
127
+ can contain child items. Drag vertically to reorder and horizontally to nest or
128
+ outdent; the level buttons provide the same operations for keyboard users.
129
+ Removing an item also removes its descendant subtree.
130
+
131
+ ## Media uploads
132
+
133
+ Original file names may contain accents, non-Latin scripts, or emoji. The
134
+ manager transports those names through ASCII-safe upload headers and core
135
+ restores them before saving media metadata.
136
+
137
+ The optimization popover separates Image and Video settings through its Format
138
+ selector. Images retain their normal format and responsive-image controls;
139
+ videos have their own quality and are converted to both MP4 and WebM.
140
+
141
+ With optimization enabled in the media toolbar, an image or video's context
142
+ menu offers `Reimport`. It regenerates the configured outputs while retaining
143
+ the existing media record and all relations to it. Multi-select supports the
144
+ same reimport action from the selection toolbar. Optimization is on by default,
145
+ and generated image previews are stored as inline `data:image/...` LQIP values
146
+ on the media record.
147
+
148
+ An image's context menu also offers `Replace image`. The selected file replaces
149
+ the stored image and generated variants while retaining the existing media ID,
150
+ name, title, alt text, folder, status, and every relation to it. Rakun also
151
+ revalidates directly referencing pages when route revalidation is configured.
152
+ The image editor can crop to a rectangle or circle, rotate, and flip the saved
153
+ copy horizontally or vertically.
154
+
155
+ ## Dynamic data mappings
156
+
157
+ Fields configured with core `.help(text)` show a compact help icon beside their
158
+ label. Activating it opens the guidance in a popover, including for inline
159
+ modules and nested content types. Translation keys are resolved with the active
160
+ manager locale, while unregistered strings are displayed directly.
161
+
162
+ The list mapping editor supports recursive `blocks` targets. Select
163
+ `Nested list` for a mapped list property to configure its own source, query,
164
+ filters, item type, and field mapping. `Current document` query values inside
165
+ that nested editor resolve against the parent source item.
166
+
167
+ Arrays of links and arrays of relations, including `relation().multiple()`, can
168
+ choose `Direct field` to bind the whole array or `Nested list` to map every
169
+ source item. Link items show `title` and `href`; relation items show the fields
170
+ of the related content type. Unlike `blocks`, these homogeneous arrays do not
171
+ add a `{ name, value }` wrapper to resolved items.
172
+
173
+ When an array or `.multiple()` relation, file, select, or content-reference field
174
+ declares core `.min(count)` or `.max(count)` limits, its editor shows the current
175
+ count and configured range. It reports values outside that range and prevents
176
+ confirming or adding beyond the maximum.
177
+
178
+ A target link appears as separate `<field>.title` and `<field>.href` mapping
179
+ rows, so its label and destination can come from different source fields.
180
+
181
+ SEO field mappings can use compatible fields from the full current document.
182
+ New documents also honor core string-field `.seo('<seoField>')` configuration
183
+ as an editable initial dynamic data binding.
184
+
185
+ ## llms.txt settings
186
+
187
+ Settings AI content manages the optional, site-level `llms.txt` Markdown guide served to
188
+ AI tools. Editors can enable publishing, override the SEO-derived title and
189
+ summary, add guidance, and order sections containing internal pages or external
190
+ URLs. Marking a section as Secondary content places it under `## Optional`
191
+ while preserving its title as a subsection in the generated document. For content types with publication states, the internal
192
+ page picker only offers published documents. Nothing is added automatically
193
+ from the sitemap.
194
+
195
+ Authenticated manager layouts place a Visit site action at the top-right of the
196
+ logo block. It opens SEO `siteUrl` in a new tab, falling back to `/` on the
197
+ manager host until that setting is configured. A published document with a
198
+ resolved page route also gets a contextual View page button in its edit toolbar;
199
+ the URL follows the selected manager language and locale variant.
200
+
201
+ Routeable content splits its SEO tab into Metadata and Analysis. Generate
202
+ report renders the current unsaved form through the configured preview and
203
+ reports metadata lengths, heading structure, missing image alt attributes,
204
+ indexability, social metadata, rendered JSON-LD blocks, and Google and sharing
205
+ previews. JSON-LD results identify invalid JSON and missing `@context` or
206
+ `@type`. For saved documents, the report is stored with its score and date when
207
+ the editor can create SEO reports. Previous reports for the active language and
208
+ route can be reopened directly from the document's Analysis view. A protective
209
+ `noindex` on the temporary preview URL does not affect the content's
210
+ indexability result.
211
+
212
+ The secondary sidebar also includes a site-wide SEO screen above the media
213
+ library. It audits stored metadata for published routeable documents in the
214
+ active language, treats global default titles and descriptions as valid
215
+ fallbacks on the home page and warns when another page relies on them, highlights
216
+ duplicates and incomplete custom Open Graph data,
217
+ and stores every run so its score can be followed over time. Access and report
218
+ creation reuse the `SeoSettings` read and own permissions. Evolution snapshots
219
+ and recent page reports are fetched and displayed in bounded, paginated groups.
220
+
221
+ ## Collaborative content editing
222
+
223
+ Existing content documents use a Yjs working document keyed by content type and
224
+ document `_id`; each draft therefore has its own room. Edits synchronize through
225
+ the manager HTTP client and remain shared unsaved changes until Save. Save
226
+ flushes pending CRDT updates, then core materializes and validates the
227
+ server-side working state before updating MongoDB and revalidating. Public pages
228
+ continue to use the previous saved snapshot while editors type.
229
+
230
+ The edit header shows collaborative presence per browser tab. Two tabs for the
231
+ same account therefore appear independently. After two visible avatars, the
232
+ group collapses to `+N`; its tooltip lists all viewers and their focused field,
233
+ and fields focused in another tab are highlighted in the form. Presence is
234
+ ephemeral and does not affect the saved working document. With SSE it follows
235
+ the authenticated stream lifecycle and server heartbeat, without a periodic
236
+ collaboration sync request. The polling fallback refreshes it during polling.
237
+
238
+ The manager persists each user's collaborative rooms in IndexedDB. Previously
239
+ opened content and Template fields load from the local Yjs cache first, remain
240
+ editable during a temporary connection loss, and synchronize when the server
241
+ is reachable again. The toolbar distinguishes this locally stored offline state
242
+ from a snapshot committed by Save.
243
+
244
+ The shared Template editor has its own Yjs room keyed by content type, so it is
245
+ collaborative across editors even when they opened different documents. Its
246
+ snapshot is persisted only by Save and remains separate from every document
247
+ room.
248
+
249
+ The edit toolbar offers a confirmed Discard changes action that restores the
250
+ last saved shared state, including an unsaved shared Template when applicable.
251
+ Its save menu can also save the current form as a named draft variant copy or
252
+ create an independent draft copy.
253
+
254
+ Create-form content becomes collaborative after its first save. Route-layout
255
+ overrides, Settings, literals, users, comments, reviews, and other
256
+ administrative forms are intentionally not CRDT-backed. Content translation
257
+ updates the shared working state and also waits for Save.
258
+
259
+ Variant lifecycle and locale assignments stay transactional, but their manager
260
+ queries refresh while editors are open so changes made by another user appear
261
+ without a page reload.
262
+
263
+ ## Styles
264
+
265
+ Import the package stylesheet once:
266
+
267
+ ```ts
268
+ import '@rakun-kit/manager-react/styles.css'
269
+ ```
270
+
271
+ ## Manager languages
272
+
273
+ English and the locale runtime are built into this package. Extra translations
274
+ ship from a separate package:
275
+
276
+ ```sh
277
+ bun add @rakun-kit/manager-locales
278
+ # or: npm install @rakun-kit/manager-locales
279
+ ```
280
+
281
+ Import only the locale needed by the server bootstrap:
282
+
283
+ ```ts
284
+ import { esManagerLocalePack } from '@rakun-kit/manager-locales/es'
285
+
286
+ rakunBootstrap({
287
+ // ...
288
+ managerLanguages: [esManagerLocalePack],
289
+ })
290
+ ```
291
+
292
+ Each language has an independent subpath, so application bundlers only include
293
+ the locales explicitly imported by the host.
294
+
295
+ Content-type titles and categories can use project-defined message keys without
296
+ adding them to the built-in `ManagerMessageKey` union. Add an English partial
297
+ pack and extend installed locales through `managerLanguages`:
298
+
299
+ ```ts
300
+ import { extendManagerLanguagePack } from '@rakun-kit/core/contracts'
301
+ import { esManagerLocalePack } from '@rakun-kit/manager-locales/es'
302
+
303
+ const managerLanguages = [
304
+ {
305
+ code: 'en',
306
+ name: 'English',
307
+ messages: {
308
+ 'field.title': 'Title',
309
+ 'layoutModule.header': 'Header',
310
+ 'project.contentTypes.article.menu': 'Articles',
311
+ },
312
+ },
313
+ extendManagerLanguagePack(esManagerLocalePack, {
314
+ 'field.title': 'Título',
315
+ 'layoutModule.header': 'Cabecera',
316
+ 'project.contentTypes.article.menu': 'Artículos',
317
+ }),
318
+ ]
319
+ ```
320
+
321
+ Then set `menu.title` or `menu.category` to that arbitrary key. Project keys are
322
+ resolved at runtime but remain outside the static manager catalog.
323
+
324
+ Field labels use the dynamic `field.<fieldName>` namespace. A content-type field
325
+ named `title`, for example, automatically resolves `field.title` in edit forms
326
+ and list columns without adding it to `ManagerMessageKey`.
327
+
328
+ Layout module labels follow `layoutModule.<layoutKey>`. For example, the
329
+ `header` slot automatically resolves `layoutModule.header` in its tab and
330
+ configuration panel.
331
+
332
+ ## Event Logs
333
+
334
+ Settings → Logs displays the persistent Rakun event stream through the native
335
+ `manager.logs.list` operation. The screen supports filters, cursor pagination,
336
+ and structured event details. Both the settings card and the operation require
337
+ the `system.eventLog.read` permission, which can be assigned from Settings →
338
+ User Roles.
339
+
340
+ ## Manager Plugins
341
+
342
+ Manager plugins run inside the normal providers and can add dashboard routes,
343
+ sidebar items, and custom field editors:
344
+
345
+ ```tsx
346
+ import {
347
+ defineRakunManagerPlugin,
348
+ ManagerBrowserApp,
349
+ } from '@rakun-kit/manager-react'
350
+
351
+ const analyticsManagerPlugin = defineRakunManagerPlugin({
352
+ id: '@acme/rakun-analytics',
353
+ routes: [{
354
+ id: 'dashboard',
355
+ path: '/analytics',
356
+ component: AnalyticsScreen,
357
+ permissions: ['plugin.analytics.view'],
358
+ }],
359
+ sidebar: [{
360
+ id: 'analytics',
361
+ title: 'Analytics',
362
+ routeId: 'dashboard',
363
+ position: 'primary',
364
+ group: 'Plugins',
365
+ }],
366
+ fieldEditors: {
367
+ '@acme/rakun-analytics.query': QueryEditor,
368
+ },
369
+ })
370
+
371
+ <ManagerBrowserApp plugins={[analyticsManagerPlugin]} {...props} />
372
+ ```
373
+
374
+ Use `ManagerFieldEditorProps`, `ManagerFieldEditorRef`, and
375
+ `useManagerFieldValue` from `@rakun-kit/manager-react/plugins` when implementing
376
+ field editors. Next.js applications should import plugin objects inside a
377
+ `'use client'` wrapper around `RakunManagerClientPage`; `RakunManagerPage` accepts
378
+ that wrapper through `managerComponent`.
379
+
380
+ ### Extending the RichText editor
381
+
382
+ Manager plugins can register Lexical nodes and React plugins for every
383
+ `RichText` field, including fields rendered inside relations, blocks, and
384
+ modules:
385
+
386
+ ```tsx
387
+ 'use client'
388
+
389
+ import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext'
390
+ import {
391
+ defineRakunManagerPlugin,
392
+ type ManagerRichTextPluginProps,
393
+ } from '@rakun-kit/manager-react/plugins'
394
+ import { MentionNode } from './MentionNode'
395
+
396
+ const MentionsPlugin = ({ id }: ManagerRichTextPluginProps) => {
397
+ const [editor] = useLexicalComposerContext()
398
+
399
+ // Register commands and listeners on `editor` here.
400
+ return null
401
+ }
402
+
403
+ export const mentionsManagerPlugin = defineRakunManagerPlugin({
404
+ id: '@acme/rakun-mentions',
405
+ richText: {
406
+ nodes: [MentionNode],
407
+ plugins: [
408
+ {
409
+ id: '@acme/rakun-mentions.plugin',
410
+ component: MentionsPlugin,
411
+ placement: 'editor',
412
+ },
413
+ ],
414
+ },
415
+ })
416
+ ```
417
+
418
+ Lexical plugin components receive `ManagerRichTextPluginProps` (the field id,
419
+ configuration, current content type, and related field metadata) and render
420
+ inside `LexicalComposer`, so they can use the normal Lexical React hooks.
421
+ Supported placements are `toolbar`, `block-format`, `editor` (the default),
422
+ `actions-start`, and `actions-end`. `block-format` components render inside the
423
+ manager's block selector and can use `ManagerRichTextBlockFormatItem` from
424
+ `@rakun-kit/manager-react/rich-text`. Contributions keep declaration order
425
+ unless an explicit `order` is provided. Node types and plugin ids must be unique;
426
+ conflicts report both plugin owners. Node replacements use Lexical's standard
427
+ `LexicalNodeReplacement` configuration.
428
+
429
+ ## Exports
430
+
431
+ - `@rakun-kit/manager-react`: manager app, providers, clients, navigation, router, layout, media, and state helpers.
432
+ - `@rakun-kit/manager-react/client/http`: HTTP manager client.
433
+ - `@rakun-kit/manager-react/client/request`: transport-agnostic manager client.
434
+ - `@rakun-kit/manager-react/client/trpc`: tRPC proxy client adapter.
435
+ - `@rakun-kit/manager-react/app/runtime-app`: `ManagerRuntimeApp`, `ManagerBrowserApp`.
436
+ - `@rakun-kit/manager-react/state/navigation`: navigation helpers and provider.
437
+ - `@rakun-kit/manager-react/link`: link component provider.
438
+ - `@rakun-kit/manager-react/i18n`: locale runtime, catalog, and locale types.
439
+ - `@rakun-kit/manager-react/styles.css`: bundled manager styles.
440
+
441
+ ## Build
442
+
443
+ ```sh
444
+ bun run build --workspace @rakun-kit/manager-react
445
+ ```