@rakun-kit/manager-react 1.6.2 → 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 (268) hide show
  1. package/README.md +445 -373
  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 +47 -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/index.js +3 -0
  89. package/dist/cjs/router/index.js.map +1 -1
  90. package/dist/cjs/router/shared/route-definitions.js +4 -1
  91. package/dist/cjs/router/shared/route-definitions.js.map +1 -1
  92. package/dist/cjs/router/shared/route-list.js +214 -64
  93. package/dist/cjs/router/shared/route-list.js.map +1 -1
  94. package/dist/docs/index.md +420 -305
  95. package/dist/esm/app/app-provider.d.ts +4 -1
  96. package/dist/esm/app/app-provider.d.ts.map +1 -1
  97. package/dist/esm/app/app-provider.js +2 -2
  98. package/dist/esm/app/app-provider.js.map +1 -1
  99. package/dist/esm/app/runtime-app.d.ts +2 -1
  100. package/dist/esm/app/runtime-app.d.ts.map +1 -1
  101. package/dist/esm/app/runtime-app.js +13 -3
  102. package/dist/esm/app/runtime-app.js.map +1 -1
  103. package/dist/esm/client/react.d.ts +13 -1
  104. package/dist/esm/client/react.d.ts.map +1 -1
  105. package/dist/esm/client/react.js +35 -3
  106. package/dist/esm/client/react.js.map +1 -1
  107. package/dist/esm/client/realtime.d.ts +31 -0
  108. package/dist/esm/client/realtime.d.ts.map +1 -0
  109. package/dist/esm/client/realtime.js +174 -0
  110. package/dist/esm/client/realtime.js.map +1 -0
  111. package/dist/esm/collaboration/ContentCollaborationProvider.d.ts +42 -0
  112. package/dist/esm/collaboration/ContentCollaborationProvider.d.ts.map +1 -0
  113. package/dist/esm/collaboration/ContentCollaborationProvider.js +486 -0
  114. package/dist/esm/collaboration/ContentCollaborationProvider.js.map +1 -0
  115. package/dist/esm/collaboration/presence-colors.d.ts +2 -0
  116. package/dist/esm/collaboration/presence-colors.d.ts.map +1 -0
  117. package/dist/esm/collaboration/presence-colors.js +18 -0
  118. package/dist/esm/collaboration/presence-colors.js.map +1 -0
  119. package/dist/esm/collaboration/presence-store.d.ts +10 -0
  120. package/dist/esm/collaboration/presence-store.d.ts.map +1 -0
  121. package/dist/esm/collaboration/presence-store.js +34 -0
  122. package/dist/esm/collaboration/presence-store.js.map +1 -0
  123. package/dist/esm/collaboration/yDocument.d.ts +5 -0
  124. package/dist/esm/collaboration/yDocument.d.ts.map +1 -0
  125. package/dist/esm/collaboration/yDocument.js +98 -0
  126. package/dist/esm/collaboration/yDocument.js.map +1 -0
  127. package/dist/esm/components/CollaborationPresence.d.ts +5 -0
  128. package/dist/esm/components/CollaborationPresence.d.ts.map +1 -0
  129. package/dist/esm/components/CollaborationPresence.js +36 -0
  130. package/dist/esm/components/CollaborationPresence.js.map +1 -0
  131. package/dist/esm/components/VariantSelector.d.ts.map +1 -1
  132. package/dist/esm/components/VariantSelector.js +4 -2
  133. package/dist/esm/components/VariantSelector.js.map +1 -1
  134. package/dist/esm/components/media/previews/dialogs/MediaImageEditorDialog.d.ts.map +1 -1
  135. package/dist/esm/components/media/previews/dialogs/MediaImageEditorDialog.js +10 -3
  136. package/dist/esm/components/media/previews/dialogs/MediaImageEditorDialog.js.map +1 -1
  137. package/dist/esm/components/ui/avatar.d.ts +3 -1
  138. package/dist/esm/components/ui/avatar.d.ts.map +1 -1
  139. package/dist/esm/components/ui/avatar.js +7 -1
  140. package/dist/esm/components/ui/avatar.js.map +1 -1
  141. package/dist/esm/components/ui/data-table.d.ts.map +1 -1
  142. package/dist/esm/components/ui/data-table.js +1 -1
  143. package/dist/esm/components/ui/data-table.js.map +1 -1
  144. package/dist/esm/components/ui/table.d.ts +4 -1
  145. package/dist/esm/components/ui/table.d.ts.map +1 -1
  146. package/dist/esm/components/ui/table.js +2 -2
  147. package/dist/esm/components/ui/table.js.map +1 -1
  148. package/dist/esm/help/manager-help.d.ts.map +1 -1
  149. package/dist/esm/help/manager-help.js +1 -1
  150. package/dist/esm/help/manager-help.js.map +1 -1
  151. package/dist/esm/helpers/resolve-lucide-icon.d.ts +3 -1
  152. package/dist/esm/helpers/resolve-lucide-icon.d.ts.map +1 -1
  153. package/dist/esm/helpers/resolve-lucide-icon.js +27 -14
  154. package/dist/esm/helpers/resolve-lucide-icon.js.map +1 -1
  155. package/dist/esm/hooks/use-isomorphic-layout-effect.d.ts +1 -1
  156. package/dist/esm/hooks/use-isomorphic-layout-effect.d.ts.map +1 -1
  157. package/dist/esm/i18n/catalog.d.ts +81 -3
  158. package/dist/esm/i18n/catalog.d.ts.map +1 -1
  159. package/dist/esm/i18n/catalog.js +47 -3
  160. package/dist/esm/i18n/catalog.js.map +1 -1
  161. package/dist/esm/index.d.ts +1 -0
  162. package/dist/esm/index.d.ts.map +1 -1
  163. package/dist/esm/index.js +1 -0
  164. package/dist/esm/index.js.map +1 -1
  165. package/dist/esm/router/dashboard/[contentType]/[edit]/ContentTypeEdit.d.ts +1 -0
  166. package/dist/esm/router/dashboard/[contentType]/[edit]/ContentTypeEdit.d.ts.map +1 -1
  167. package/dist/esm/router/dashboard/[contentType]/[edit]/ContentTypeEdit.js +28 -12
  168. package/dist/esm/router/dashboard/[contentType]/[edit]/ContentTypeEdit.js.map +1 -1
  169. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/CollaborativeTemplateEditor.d.ts +17 -0
  170. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/CollaborativeTemplateEditor.d.ts.map +1 -0
  171. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/CollaborativeTemplateEditor.js +55 -0
  172. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/CollaborativeTemplateEditor.js.map +1 -0
  173. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/ContentCommentsDrawer.d.ts.map +1 -1
  174. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/ContentCommentsDrawer.js +15 -8
  175. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/ContentCommentsDrawer.js.map +1 -1
  176. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/EditSectionNavigation.d.ts +2 -0
  177. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/EditSectionNavigation.d.ts.map +1 -0
  178. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/EditSectionNavigation.js +88 -0
  179. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/EditSectionNavigation.js.map +1 -0
  180. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/EditTabPanels.d.ts +3 -1
  181. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/EditTabPanels.d.ts.map +1 -1
  182. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/EditTabPanels.js +3 -2
  183. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/EditTabPanels.js.map +1 -1
  184. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/EditToolbar.d.ts +5 -1
  185. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/EditToolbar.d.ts.map +1 -1
  186. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/EditToolbar.js +34 -71
  187. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/EditToolbar.js.map +1 -1
  188. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/LocaleVariants.d.ts.map +1 -1
  189. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/LocaleVariants.js +6 -2
  190. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/LocaleVariants.js.map +1 -1
  191. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/ModuleNavigation.d.ts +3 -1
  192. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/ModuleNavigation.d.ts.map +1 -1
  193. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/ModuleNavigation.js +6 -5
  194. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/ModuleNavigation.js.map +1 -1
  195. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/PreviewPanel.d.ts +3 -1
  196. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/PreviewPanel.d.ts.map +1 -1
  197. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/PreviewPanel.js +5 -4
  198. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/PreviewPanel.js.map +1 -1
  199. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/RouteLayoutModuleTabContent.d.ts.map +1 -1
  200. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/RouteLayoutModuleTabContent.js +18 -1
  201. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/RouteLayoutModuleTabContent.js.map +1 -1
  202. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/SeoTabContent.d.ts.map +1 -1
  203. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/SeoTabContent.js +40 -37
  204. package/dist/esm/router/dashboard/[contentType]/[edit]/_components/SeoTabContent.js.map +1 -1
  205. package/dist/esm/router/dashboard/[contentType]/[edit]/_context/EditPageContext.d.ts +8 -2
  206. package/dist/esm/router/dashboard/[contentType]/[edit]/_context/EditPageContext.d.ts.map +1 -1
  207. package/dist/esm/router/dashboard/[contentType]/[edit]/_context/EditPageContext.js +75 -22
  208. package/dist/esm/router/dashboard/[contentType]/[edit]/_context/EditPageContext.js.map +1 -1
  209. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/DynamicDataControl.d.ts.map +1 -1
  210. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/DynamicDataControl.js +19 -12
  211. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/DynamicDataControl.js.map +1 -1
  212. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/ListField/IteratorModulePicker.d.ts.map +1 -1
  213. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/ListField/IteratorModulePicker.js +4 -2
  214. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/ListField/IteratorModulePicker.js.map +1 -1
  215. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/ListField/ListUI.d.ts.map +1 -1
  216. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/ListField/ListUI.js +15 -47
  217. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/ListField/ListUI.js.map +1 -1
  218. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/RelationField/NewRelation.d.ts.map +1 -1
  219. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/RelationField/NewRelation.js +2 -4
  220. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/RelationField/NewRelation.js.map +1 -1
  221. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/RelationField/relation-state.d.ts +7 -0
  222. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/RelationField/relation-state.d.ts.map +1 -0
  223. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/RelationField/relation-state.js +8 -0
  224. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/RelationField/relation-state.js.map +1 -0
  225. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/shared/FieldWrapper.d.ts.map +1 -1
  226. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/shared/FieldWrapper.js +13 -2
  227. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/shared/FieldWrapper.js.map +1 -1
  228. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/shared/collaborative-field-state.d.ts +12 -0
  229. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/shared/collaborative-field-state.d.ts.map +1 -0
  230. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/shared/collaborative-field-state.js +14 -0
  231. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/shared/collaborative-field-state.js.map +1 -0
  232. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/shared/condition-state.d.ts +9 -1
  233. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/shared/condition-state.d.ts.map +1 -1
  234. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/shared/condition-state.js +16 -3
  235. package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/shared/condition-state.js.map +1 -1
  236. package/dist/esm/router/dashboard/[contentType]/[edit]/_hooks/useContentDocumentActions.d.ts +2 -0
  237. package/dist/esm/router/dashboard/[contentType]/[edit]/_hooks/useContentDocumentActions.d.ts.map +1 -1
  238. package/dist/esm/router/dashboard/[contentType]/[edit]/_hooks/useContentDocumentActions.js +48 -13
  239. package/dist/esm/router/dashboard/[contentType]/[edit]/_hooks/useContentDocumentActions.js.map +1 -1
  240. package/dist/esm/router/dashboard/[contentType]/[edit]/_hooks/useContentPreview.d.ts +1 -1
  241. package/dist/esm/router/dashboard/[contentType]/[edit]/_hooks/useContentPreview.d.ts.map +1 -1
  242. package/dist/esm/router/dashboard/[contentType]/[edit]/_hooks/useContentPreview.js +8 -5
  243. package/dist/esm/router/dashboard/[contentType]/[edit]/_hooks/useContentPreview.js.map +1 -1
  244. package/dist/esm/router/dashboard/[contentType]/[edit]/_hooks/useRouteLayoutData.d.ts.map +1 -1
  245. package/dist/esm/router/dashboard/[contentType]/[edit]/edit.d.ts.map +1 -1
  246. package/dist/esm/router/dashboard/[contentType]/[edit]/edit.js +63 -13
  247. package/dist/esm/router/dashboard/[contentType]/[edit]/edit.js.map +1 -1
  248. package/dist/esm/router/dashboard/[contentType]/[edit]/screen.d.ts.map +1 -1
  249. package/dist/esm/router/dashboard/[contentType]/[edit]/screen.js +13 -2
  250. package/dist/esm/router/dashboard/[contentType]/[edit]/screen.js.map +1 -1
  251. package/dist/esm/router/dashboard/screen.d.ts.map +1 -1
  252. package/dist/esm/router/dashboard/screen.js +8 -4
  253. package/dist/esm/router/dashboard/screen.js.map +1 -1
  254. package/dist/esm/router/index.d.ts +1 -0
  255. package/dist/esm/router/index.d.ts.map +1 -1
  256. package/dist/esm/router/index.js +1 -0
  257. package/dist/esm/router/index.js.map +1 -1
  258. package/dist/esm/router/shared/route-definitions.d.ts +1 -1
  259. package/dist/esm/router/shared/route-definitions.d.ts.map +1 -1
  260. package/dist/esm/router/shared/route-definitions.js +4 -1
  261. package/dist/esm/router/shared/route-definitions.js.map +1 -1
  262. package/dist/esm/router/shared/route-list.d.ts +3 -0
  263. package/dist/esm/router/shared/route-list.d.ts.map +1 -1
  264. package/dist/esm/router/shared/route-list.js +146 -30
  265. package/dist/esm/router/shared/route-list.js.map +1 -1
  266. package/dist/styles.css +309 -77
  267. package/dist/tsconfig.build.tsbuildinfo +1 -1
  268. package/package.json +6 -2
@@ -1,305 +1,420 @@
1
- # `@rakun-kit/manager-react` AI usage manual
2
-
3
- This package is the publishable React manager, its transport clients,
4
- navigation abstraction, locale runtime, plugin API and CSS. Most Next.js apps
5
- should use `@rakun-kit/next/manager`; use this package directly for custom
6
- React hosts.
7
-
8
- Read the core manual at
9
- `node_modules/@rakun-kit/core/dist/docs/index.md` before changing manager/server
10
- contracts.
11
-
12
- ## Install and mount
13
-
14
- ```sh
15
- bun add @rakun-kit/manager-react react react-dom
16
- ```
17
-
18
- ```tsx
19
- import { ManagerBrowserApp, createHttpManagerClient } from '@rakun-kit/manager-react'
20
- import '@rakun-kit/manager-react/styles.css'
21
-
22
- const client = createHttpManagerClient({ baseUrl: '/api/rakun' })
23
-
24
- export function ManagerPage() {
25
- return (
26
- <ManagerBrowserApp client={client} pathname={window.location.pathname} basePath="/backend" />
27
- )
28
- }
29
- ```
30
-
31
- Import the stylesheet exactly once. `ManagerBrowserApp` owns browser-history
32
- navigation. Use `ManagerRuntimeApp` when the host supplies navigation.
33
-
34
- ## Clients and navigation
35
-
36
- - HTTP: `createHttpManagerClient` from `/client/http`.
37
- - tRPC: `createTrpcManagerClient` from `/client/trpc`.
38
- - Custom transport: `createManagerClient` from `/client/request`.
39
- - Router bridge: `createPathManagerNavigation` from `/state/navigation`.
40
-
41
- Use operation names and payloads from Rakun contracts; do not recreate endpoint
42
- types in host code. Keep `baseUrl` (API) distinct from `basePath` (manager UI).
43
-
44
- ## Link field picker
45
-
46
- The `f.link()` editor always shows Title and Destination inputs. A typed or
47
- pasted URL is stored as `{ href, title }`. Opening the destination picker
48
- exposes the home page and configured page-route types with their content type
49
- icons; selecting an item fills an empty title from its manager label and stores
50
- `{ routeId, contentTypeId, title }` so core can resolve localized paths.
51
- Persisted string values are normalized to `{ href, title: '' }` when loaded;
52
- untitled internal references also remain editable.
53
-
54
- Compound arrays such as `f.array(f.link())` render each value as a reorderable
55
- card in the Info editor. Use the drag handle to change their persisted order;
56
- current nested input values are preserved while an item is moved.
57
-
58
- `f.menu()` renders an ordered navigation tree for headers and similar modules.
59
- Each item reuses the internal/direct link picker and may contain unlimited child
60
- levels. Drag vertically to reorder; drag horizontally to nest or outdent. The
61
- level buttons expose equivalent keyboard actions. Removing a parent removes
62
- its complete subtree, and editor-only drag identifiers are never persisted.
63
-
64
- ## Media uploads
65
-
66
- The manager preserves Unicode original file names when uploading media. Names
67
- with accents, non-Latin scripts, or emoji are encoded into ASCII for the binary
68
- upload headers and restored by core before metadata is saved.
69
-
70
- The optimization popover has a Format selector for Image and Video settings.
71
- Images retain their output-format, quality, preview, and responsive-size
72
- controls. Videos expose their own quality and are always converted to both MP4
73
- and WebM for browser compatibility.
74
-
75
- When optimization is enabled, right-click an image or video and select
76
- `Reimport` to regenerate its optimized outputs. The action keeps the existing
77
- media ID, title, alt text, folder, and content references. You can also
78
- multi-select images and videos and use the selection toolbar reimport action.
79
- For an image, the same context menu offers `Replace image`. Choose a new image
80
- and confirm to replace the underlying file while keeping the media ID, details,
81
- folder and every reference to it across the site. Referencing pages are
82
- revalidated when the project has route revalidation configured.
83
- Optimization is enabled by default in the media library; generated image
84
- previews are stored as inline `data:image/...` strings on the media record for
85
- LQIP use.
86
-
87
- Gallery and file-field image previews use `@rakun-kit/react` `Image` with a
88
- layout-appropriate `sizes` value so responsive variants are selected when
89
- available.
90
-
91
- ## Manager plugins
92
-
93
- ```tsx
94
- import {
95
- defineRakunManagerPlugin,
96
- ManagerBrowserApp,
97
- } from '@rakun-kit/manager-react'
98
-
99
- const plugin = defineRakunManagerPlugin({
100
- id: '@acme/analytics',
101
- routes: [{
102
- id: 'dashboard',
103
- path: '/analytics',
104
- component: AnalyticsScreen,
105
- permissions: ['plugin.analytics.view'],
106
- }],
107
- sidebar: [{
108
- id: 'analytics',
109
- title: 'analytics.title',
110
- routeId: 'dashboard',
111
- position: 'primary',
112
- group: 'Plugins',
113
- }],
114
- })
115
-
116
- <ManagerBrowserApp plugins={[plugin]} {...props} />
117
- ```
118
-
119
- Plugins can contribute routes, sidebar entries, custom field editors and
120
- RichText extensions. Use exported plugin types from
121
- `@rakun-kit/manager-react/plugins`. Plugin ids, route ids, field editor ids,
122
- Lexical node types and RichText plugin ids must be unique.
123
-
124
- Dynamic Data behavior for custom editors comes from the encoded field
125
- `config.capabilities`, not from the editor id. `valueKind` controls source and
126
- target compatibility; `dynamic.properties` exposes object leaves;
127
- `mapProperties` renders them as separate mapping targets; `relation` enables
128
- nested content-type fields; and `collection` enables homogeneous or
129
- heterogeneous per-item mappings. A plugin editor therefore gains the standard
130
- Dynamic Data control by declaring its behavior in its core field factory.
131
-
132
- In Next.js, plugin registration belongs in a `'use client'` wrapper around
133
- `RakunManagerClientPage`; pass the wrapper to `RakunManagerPage` as
134
- `managerComponent`.
135
-
136
- ## Languages and copy
137
-
138
- English is built in. Additional server-provided UI packs come from
139
- `@rakun-kit/manager-locales` and are configured in core `managerLanguages`.
140
- Content editing locale and manager UI locale are separate states.
141
-
142
- Built-in manager copy must use the static manager translation catalog. Project
143
- labels may use arbitrary project keys. Fields resolve `field.<fieldName>` and
144
- layout slots resolve `layoutModule.<layoutKey>` with fallbacks.
145
-
146
- The authenticated sidebar places Visit site at the top-right of its logo block.
147
- It opens the validated SEO `siteUrl` in a new tab and falls back to `/` on the
148
- current manager host when the setting is empty. Custom dashboard layout
149
- renderers receive `siteUrl` in their layout props and should preserve an
150
- equivalent action. On a published routed document, the edit toolbar also shows
151
- View page for the exact selected language and locale variant. Draft, hidden,
152
- trashed, and route-less documents do not show that contextual action.
153
-
154
- ## Content and template tabs
155
-
156
- For a routeable content type with `iterator`, Content edits the `_iterator`
157
- modules unique to the current document. Template is enabled automatically and
158
- edits one shared composition for every document of that type. Both tabs offer
159
- the same configured iterator modules. The Template module picker additionally
160
- adds a built-in Content item at its root and inside blocks fields; it marks the
161
- exact position where the current document's Content modules are inserted.
162
-
163
- Template changes require the content type's `updateAny` permission and are
164
- saved with optimistic revision checks. Preview includes unsaved changes from
165
- both tabs.
166
-
167
- Fields configured with core `.help(text)` show a compact help icon beside their
168
- label. Activating it opens the guidance in a popover, including inside iterator
169
- and nested blocks modules. The manager resolves a translation key through its
170
- active locale and falls back to displaying the supplied string directly.
171
-
172
- ## Route SEO analysis
173
-
174
- The SEO tab of routeable content has separate Metadata and Analysis views.
175
- Generate report creates a temporary preview snapshot from the current form and
176
- shared template, then inspects the rendered page through the preview bridge.
177
- The report checks title and description lengths, H1 usage, heading order,
178
- missing image `alt` attributes, canonical URL, document language, `noindex`,
179
- Open Graph coverage, and rendered JSON-LD validity. It also renders
180
- representative Google and sharing previews plus the page's heading outline and
181
- the resolved JSON-LD blocks with their detected schema types. The indexability result uses the
182
- content's resolved SEO value and ignores `noindex` added solely to protect the
183
- temporary preview URL from indexing. When the canonical field is empty, Rakun
184
- derives it from Settings → SEO `siteUrl` and the resolved page route; the report
185
- identifies a missing `siteUrl` separately.
186
-
187
- SEO reports are advisory and do not claim to predict search rankings. Reports
188
- generated for saved documents are persisted with their date, score and rendered
189
- findings when the editor has `content.SeoSettings.own`; the site-wide SEO screen
190
- uses that history to show recent page reports. The document's Analysis view also
191
- lists its previous reports for the active language and route; selecting one
192
- restores the saved report, while Back to current report returns to the live
193
- result. Preview analysis requires the route to have manager preview configured.
194
- The preview adapter must support Rakun's SEO-analysis bridge messages; the
195
- official Next adapter does so automatically.
196
-
197
- The secondary sidebar exposes a separate SEO screen above the media library for
198
- users with SEO settings read access. Its Generate report action scans published
199
- documents from every readable routeable content type in the active language,
200
- checks stored metadata, custom Open Graph completeness and duplicate titles or
201
- descriptions, then persists a dated `SeoAudit` snapshot. A page without its own
202
- title or description uses the corresponding global default from Settings SEO
203
- without a warning on the configured home page; other pages receive a fallback
204
- warning instead of a missing-metadata error. Previous site scores
205
- remain visible as a paginated evolution history; recent page reports use an
206
- independent bounded pagination. `SeoAudit` shares the `SeoSettings`
207
- permission resource, so `own` controls generation and `readAny` controls shared
208
- history visibility.
209
-
210
- Rakun's `StructuredData` iterator module can be placed in Content or a shared
211
- Template. Its typed fields support normal dynamic data mappings; the Custom
212
- variant accepts an arbitrary JSON object. Invalid custom JSON remains visible in
213
- the preview report as an error instead of disappearing silently.
214
-
215
- ## Dynamic data mappings
216
-
217
- List bindings use a type-aware mapping editor. When a mapped target property is
218
- itself a `blocks` field, choose `Nested list` to open another collection, query,
219
- filter, and mapping editor for that property. Nested query conditions can select
220
- `Current item` to read the parent source item at that level, or `Current
221
- document` to read the root document. This supports mappings such as Category ->
222
- gallery item -> Project -> image card, and the editor can repeat the flow for
223
- deeper block structures.
224
-
225
- Homogeneous arrays of links or relations can use either `Direct field` for the
226
- complete array or `Nested list` for per-item mapping. This also covers core
227
- `relation().multiple()` fields. Link items expose `title` and `href`, while
228
- relation items expose their target content type fields; their result remains a
229
- flat array rather than the heterogeneous `{ name, value }` shape used by
230
- `blocks`.
231
-
232
- Core `.min(count)` and `.max(count)` limits on `f.array(...)` and `.multiple()`
233
- relation, file, select, and content-reference fields appear below the manager
234
- control with its live item count. The control reports minimum/maximum validation
235
- errors and prevents adding or confirming items beyond the maximum.
236
-
237
- Target link fields are expanded into visible `<field>.title` and `<field>.href`
238
- rows. Each property can select its own compatible source and core reconstructs
239
- the mapped link object.
240
-
241
- In the SEO tab, `Current document` exposes compatible fields from the complete
242
- document (including fields edited in Info), while the reserved `_seo` relation
243
- itself stays excluded as a source. On create forms, string fields configured in
244
- core with `.seo('<seoField>')` appear as normal preconfigured dynamic bindings;
245
- editors can replace or clear them before the first save.
246
-
247
- ## llms.txt settings
248
-
249
- Settings AI content edits the optional site-level `llms.txt` guide. Publishing is off
250
- by default. Editors may override the SEO-derived site title and summary, add
251
- Markdown guidance, and curate ordered sections of internal pages or external
252
- URLs. Sections marked as Secondary content appear as titled subsections under
253
- `## Optional`; Rakun never copies the complete sitemap into this document automatically. Internal page choices
254
- are limited to published documents when their content type uses publication
255
- states.
256
-
257
- ## Confirmations
258
-
259
- Use the shared async confirm API instead of ad-hoc yes/no dialogs:
260
-
261
- ```tsx
262
- import { confirm, useConfirm } from '@rakun-kit/manager-react'
263
-
264
- const result = await confirm({
265
- title: 'Delete item',
266
- description: 'This cannot be undone.',
267
- confirmLabel: 'Delete',
268
- variant: 'destructive',
269
- onConfirm: async () => {
270
- await deleteItem()
271
- },
272
- })
273
-
274
- // 'confirmed' | 'cancelled' | 'dismissed'
275
- if (result !== 'confirmed') return
276
-
277
- // Or boolean helper:
278
- if (!(await confirm.yes({ title: 'Continue?' }))) return
279
- ```
280
-
281
- `ConfirmProvider` is mounted by `ManagerRuntimeApp` / `ManagerBrowserApp`.
282
- `onConfirm` keeps the dialog open with a loading button until the promise
283
- settles; thrown errors leave it open.
284
-
285
- ## Public entrypoints
286
-
287
- - `@rakun-kit/manager-react`: manager apps, providers and common helpers.
288
- - `/client/http`, `/client/request`, `/client/trpc`: manager transports.
289
- - `/app/runtime-app`: runtime/browser app components.
290
- - `/state/navigation`, `/state/theme`, `/link`: host integration primitives.
291
- - `/plugins`, `/rich-text`: plugin and RichText extension contracts.
292
- - `/i18n`: locale runtime, catalog and locale types.
293
- - `confirm` / `useConfirm` / `ConfirmProvider`: shared async confirmation dialogs.
294
- - `/styles.css`: required bundled styles.
295
-
296
- ## Agent constraints
297
-
298
- - This package can run outside Next.js; do not assume Next navigation or server
299
- components.
300
- - Do not import the main React entrypoint into server bootstrap just to obtain
301
- locale types or data.
302
- - Permission-gate protected UI, and handle loading, empty and error states.
303
- - Use existing manager components and operations before adding parallel APIs.
304
- - Keep manager/core schemas synchronized when an operation changes.
305
- - Do not hardcode user-facing manager copy.
1
+ # `@rakun-kit/manager-react` AI usage manual
2
+
3
+ This package is the publishable React manager, its transport clients,
4
+ navigation abstraction, locale runtime, plugin API and CSS. Most Next.js apps
5
+ should use `@rakun-kit/next/manager`; use this package directly for custom
6
+ React hosts.
7
+
8
+ Read the core manual at
9
+ `node_modules/@rakun-kit/core/dist/docs/index.md` before changing manager/server
10
+ contracts.
11
+
12
+ ## Install and mount
13
+
14
+ ```sh
15
+ bun add @rakun-kit/manager-react react react-dom
16
+ ```
17
+
18
+ ```tsx
19
+ import { ManagerBrowserApp, createHttpManagerClient } from '@rakun-kit/manager-react'
20
+ import '@rakun-kit/manager-react/styles.css'
21
+
22
+ const client = createHttpManagerClient({ baseUrl: '/api/rakun' })
23
+
24
+ export function ManagerPage() {
25
+ return (
26
+ <ManagerBrowserApp client={client} pathname={window.location.pathname} basePath="/backend" />
27
+ )
28
+ }
29
+ ```
30
+
31
+ Import the stylesheet exactly once. `ManagerBrowserApp` owns browser-history
32
+ navigation. Use `ManagerRuntimeApp` when the host supplies navigation.
33
+
34
+ Built-in screens are split by manager route and loaded on first visit. Lucide
35
+ names configured for content-type and module-picker icons remain unrestricted;
36
+ the manager accepts kebab-case or PascalCase names and loads the selected icon
37
+ on demand.
38
+
39
+ ## Realtime synchronization
40
+
41
+ The runtime loads `platform.realtime` from `manager.uiLocales` and selects
42
+ polling or SSE without a separate client-side transport setting. Set
43
+ `realtimeBaseUrl` to the manager API base URL so package-relative endpoints
44
+ resolve correctly:
45
+
46
+ ```tsx
47
+ <ManagerBrowserApp
48
+ client={client}
49
+ realtimeBaseUrl="/api/rakun"
50
+ pathname={window.location.pathname}
51
+ />
52
+ ```
53
+
54
+ The default `sseRealtime()` metadata resolves to
55
+ `<realtimeBaseUrl>/realtime`; core bootstrap configuration does not repeat the
56
+ API base path.
57
+
58
+ Core mutations publish stable topics for collaboration documents, locale
59
+ variants, versions, comments, and notifications. `useManagerSyncQuery` and
60
+ `useSync` invalidate their exact TanStack Query key after a matching event.
61
+ The `syncIntervalMs` option is used only by the polling provider; SSE does not
62
+ create periodic refresh timers. SSE multiplexes all active topics onto one
63
+ `EventSource`, so opening multiple editors does not exhaust the browser's
64
+ per-origin connection pool.
65
+
66
+ Custom compositions may pass a `RealtimeMetadata` or `RealtimeProvider` to
67
+ `ManagerProvider` / `ManagerAppProvider`. The root package exports
68
+ `pollingRealtime`, `sseRealtime`, `realtimeFromMetadata`, `useSync`, and
69
+ `useManagerSyncQuery`. Prefer the runtime bootstrap path so the core platform
70
+ remains the source of truth.
71
+
72
+ ## Clients and navigation
73
+
74
+ - HTTP: `createHttpManagerClient` from `/client/http`.
75
+ - tRPC: `createTrpcManagerClient` from `/client/trpc`.
76
+ - Custom transport: `createManagerClient` from `/client/request`.
77
+ - Router bridge: `createPathManagerNavigation` from `/state/navigation`.
78
+
79
+ Hosts can use `preloadManagerPath` to prefetch built-in route chunks from their
80
+ own router or link component.
81
+
82
+ Use operation names and payloads from Rakun contracts; do not recreate endpoint
83
+ types in host code. Keep `baseUrl` (API) distinct from `basePath` (manager UI).
84
+
85
+ ## Link field picker
86
+
87
+ The `f.link()` editor always shows Title and Destination inputs. A typed or
88
+ pasted URL is stored as `{ href, title }`. Opening the destination picker
89
+ exposes the home page and configured page-route types with their content type
90
+ icons; selecting an item fills an empty title from its manager label and stores
91
+ `{ routeId, contentTypeId, title }` so core can resolve localized paths.
92
+ Persisted string values are normalized to `{ href, title: '' }` when loaded;
93
+ untitled internal references also remain editable.
94
+
95
+ Compound arrays such as `f.array(f.link())` render each value as a reorderable
96
+ card in the Info editor. Use the drag handle to change their persisted order;
97
+ current nested input values are preserved while an item is moved.
98
+
99
+ `f.menu()` renders an ordered navigation tree for headers and similar modules.
100
+ Each item reuses the internal/direct link picker and may contain unlimited child
101
+ levels. Drag vertically to reorder; drag horizontally to nest or outdent. The
102
+ level buttons expose equivalent keyboard actions. Removing a parent removes
103
+ its complete subtree, and editor-only drag identifiers are never persisted.
104
+
105
+ ## Media uploads
106
+
107
+ The manager preserves Unicode original file names when uploading media. Names
108
+ with accents, non-Latin scripts, or emoji are encoded into ASCII for the binary
109
+ upload headers and restored by core before metadata is saved.
110
+
111
+ The optimization popover has a Format selector for Image and Video settings.
112
+ Images retain their output-format, quality, preview, and responsive-size
113
+ controls. Videos expose their own quality and are always converted to both MP4
114
+ and WebM for browser compatibility.
115
+
116
+ When optimization is enabled, right-click an image or video and select
117
+ `Reimport` to regenerate its optimized outputs. The action keeps the existing
118
+ media ID, title, alt text, folder, and content references. You can also
119
+ multi-select images and videos and use the selection toolbar reimport action.
120
+ For an image, the same context menu offers `Replace image`. Choose a new image
121
+ and confirm to replace the underlying file while keeping the media ID, details,
122
+ folder and every reference to it across the site. Referencing pages are
123
+ revalidated when the project has route revalidation configured.
124
+ The image editor can crop to a rectangle or circle, rotate, and flip the saved
125
+ copy horizontally or vertically.
126
+ Optimization is enabled by default in the media library; generated image
127
+ previews are stored as inline `data:image/...` strings on the media record for
128
+ LQIP use.
129
+
130
+ Gallery and file-field image previews use `@rakun-kit/react` `Image` with a
131
+ layout-appropriate `sizes` value so responsive variants are selected when
132
+ available.
133
+
134
+ ## Manager plugins
135
+
136
+ ```tsx
137
+ import {
138
+ defineRakunManagerPlugin,
139
+ ManagerBrowserApp,
140
+ } from '@rakun-kit/manager-react'
141
+
142
+ const plugin = defineRakunManagerPlugin({
143
+ id: '@acme/analytics',
144
+ routes: [{
145
+ id: 'dashboard',
146
+ path: '/analytics',
147
+ component: AnalyticsScreen,
148
+ permissions: ['plugin.analytics.view'],
149
+ }],
150
+ sidebar: [{
151
+ id: 'analytics',
152
+ title: 'analytics.title',
153
+ routeId: 'dashboard',
154
+ position: 'primary',
155
+ group: 'Plugins',
156
+ }],
157
+ })
158
+
159
+ <ManagerBrowserApp plugins={[plugin]} {...props} />
160
+ ```
161
+
162
+ Plugins can contribute routes, sidebar entries, custom field editors and
163
+ RichText extensions. Use exported plugin types from
164
+ `@rakun-kit/manager-react/plugins`. Plugin ids, route ids, field editor ids,
165
+ Lexical node types and RichText plugin ids must be unique.
166
+
167
+ Dynamic Data behavior for custom editors comes from the encoded field
168
+ `config.capabilities`, not from the editor id. `valueKind` controls source and
169
+ target compatibility; `dynamic.properties` exposes object leaves;
170
+ `mapProperties` renders them as separate mapping targets; `relation` enables
171
+ nested content-type fields; and `collection` enables homogeneous or
172
+ heterogeneous per-item mappings. A plugin editor therefore gains the standard
173
+ Dynamic Data control by declaring its behavior in its core field factory.
174
+
175
+ In Next.js, plugin registration belongs in a `'use client'` wrapper around
176
+ `RakunManagerClientPage`; pass the wrapper to `RakunManagerPage` as
177
+ `managerComponent`.
178
+
179
+ ## Languages and copy
180
+
181
+ English is built in. Additional server-provided UI packs come from
182
+ `@rakun-kit/manager-locales` and are configured in core `managerLanguages`.
183
+ Content editing locale and manager UI locale are separate states.
184
+
185
+ Built-in manager copy must use the static manager translation catalog. Project
186
+ labels may use arbitrary project keys. Fields resolve `field.<fieldName>` and
187
+ layout slots resolve `layoutModule.<layoutKey>` with fallbacks.
188
+
189
+ The authenticated sidebar places Visit site at the top-right of its logo block.
190
+ It opens the validated SEO `siteUrl` in a new tab and falls back to `/` on the
191
+ current manager host when the setting is empty. Custom dashboard layout
192
+ renderers receive `siteUrl` in their layout props and should preserve an
193
+ equivalent action. On a published routed document, the edit toolbar also shows
194
+ View page for the exact selected language and locale variant. Draft, hidden,
195
+ trashed, and route-less documents do not show that contextual action.
196
+
197
+ ## Content and template tabs
198
+
199
+ Saved content edit screens load an independent Yjs working document for the
200
+ exact document `_id`. Field changes are synchronized incrementally over the
201
+ manager HTTP client and the toolbar reports shared unsaved changes. Another
202
+ editor on the same published document or draft sees that shared working state;
203
+ an editor on a different draft uses a different room. Leaving and reopening the
204
+ screen reloads the working state from the collaboration backend.
205
+
206
+ The edit header shows one presence avatar per open browser tab, including
207
+ multiple tabs owned by the same user. It keeps two avatars visible and collapses
208
+ additional viewers into a `+N` badge; hovering or focusing the group lists every
209
+ viewer and their focused field. Fields focused by another tab receive a visible
210
+ highlight. Presence is ephemeral and disappears after a tab leaves or its
211
+ connection expires. With SSE, the authenticated stream and its server heartbeat
212
+ maintain that presence without periodic client-side collaboration sync calls;
213
+ the polling provider refreshes it as part of its normal poll.
214
+
215
+ Each collaborative room is also persisted locally with IndexedDB, isolated by
216
+ manager user and room id. A previously opened document or shared Template loads
217
+ its local Yjs state first and then exchanges updates with core. Edits made while
218
+ the collaboration endpoint is unavailable remain in IndexedDB and are sent
219
+ when connectivity returns; the toolbar reports that state as offline and
220
+ locally stored. The first visit still needs the normal authenticated manager
221
+ read to authorize and describe the document.
222
+
223
+ Save first flushes pending Yjs updates and then asks core to persist a snapshot
224
+ of the server-side working document. Until it succeeds, public/web reads and
225
+ revalidation remain on the previous saved snapshot. Unsaved therefore means
226
+ shared-but-not-committed, not changes owned by one browser. Draft promotion is
227
+ still separate and uses the saved draft snapshot.
228
+
229
+ The edit toolbar can discard changes through the shared confirmation dialog.
230
+ Discard restores the last saved content snapshot for every editor; when the
231
+ shared Template also has unsaved work, the confirmation states that it will be
232
+ restored too. The save menu can save the current unsaved form as a separately
233
+ named, unassigned draft variant copy or create an independent draft copy.
234
+
235
+ Routeable documents keep the live preview visible as the main editing surface
236
+ and collapse the manager's global navigation when opened. Editors can reopen
237
+ that navigation from the normal header control. On wide screens, fields and the
238
+ available Info, Content, Template, SEO, layout, variant, and history sections
239
+ live in a resizable sidebar with compact vertical navigation and a preview-first
240
+ initial split. Content and Template expose their module tree in an overlay
241
+ navigator so it can be used for selection and reordering without permanently
242
+ narrowing module forms. Module card actions use a separate wrapping row. On
243
+ tablet-sized screens, the editor opens as an overlay while the preview remains
244
+ the underlying canvas. On mobile, Rakun hides the preview, renders the editor as
245
+ the main surface, and changes the section rail into a horizontally scrollable
246
+ top bar.
247
+
248
+ IndexedDB persistence does not replace Save: local and shared CRDT updates are
249
+ working state, while MongoDB and public/web reads change only after the server
250
+ save operation succeeds. Save therefore requires connectivity.
251
+
252
+ The shared Template tab also uses Yjs, but in a separate room keyed only by
253
+ content type. Consequently, editors who opened different documents collaborate
254
+ on the same template. Its changes remain shared but uncommitted until Save,
255
+ which persists the template snapshot through the normal validated template
256
+ flow. It is never copied into the current document's room.
257
+
258
+ This scope intentionally excludes create-form content before its first save,
259
+ route-layout modules, Settings, literals, users, comments, reviews, and other
260
+ manager forms. The shared Template remains collaborative even while reached
261
+ from a create form because it is an existing type-level resource. Automatic
262
+ translation changes the content document's shared working state but does not
263
+ save it.
264
+
265
+ Variant creation, language assignment, promotion, trash, and restore remain
266
+ validated server mutations rather than CRDT fields. While editors are open,
267
+ the Variants tab and the editor's locale assignments refresh automatically, so
268
+ a variant created by one user appears for the others without reloading the
269
+ page.
270
+
271
+ For a routeable content type with `iterator`, Content edits the `_iterator`
272
+ modules unique to the current document. Template is enabled automatically and
273
+ edits one shared composition for every document of that type. Both tabs offer
274
+ the same configured iterator modules. The Template module picker additionally
275
+ adds a built-in Content item at its root and inside blocks fields; it marks the
276
+ exact position where the current document's Content modules are inserted.
277
+
278
+ Template changes require the content type's `updateAny` permission and are
279
+ saved with optimistic revision checks. Preview includes unsaved changes from
280
+ both tabs.
281
+
282
+ Fields configured with core `.help(text)` show a compact help icon beside their
283
+ label. Activating it opens the guidance in a popover, including inside iterator
284
+ and nested blocks modules. The manager resolves a translation key through its
285
+ active locale and falls back to displaying the supplied string directly.
286
+
287
+ ## Route SEO analysis
288
+
289
+ The SEO tab of routeable content has separate Metadata and Analysis views.
290
+ Generate report creates a temporary preview snapshot from the current form and
291
+ shared template, then inspects the rendered page through the preview bridge.
292
+ The report checks title and description lengths, H1 usage, heading order,
293
+ missing image `alt` attributes, canonical URL, document language, `noindex`,
294
+ Open Graph coverage, and rendered JSON-LD validity. It also renders
295
+ representative Google and sharing previews plus the page's heading outline and
296
+ the resolved JSON-LD blocks with their detected schema types. The indexability result uses the
297
+ content's resolved SEO value and ignores `noindex` added solely to protect the
298
+ temporary preview URL from indexing. When the canonical field is empty, Rakun
299
+ derives it from Settings → SEO `siteUrl` and the resolved page route; the report
300
+ identifies a missing `siteUrl` separately.
301
+
302
+ SEO reports are advisory and do not claim to predict search rankings. Reports
303
+ generated for saved documents are persisted with their date, score and rendered
304
+ findings when the editor has `content.SeoSettings.own`; the site-wide SEO screen
305
+ uses that history to show recent page reports. The document's Analysis view also
306
+ lists its previous reports for the active language and route; selecting one
307
+ restores the saved report, while Back to current report returns to the live
308
+ result. Preview analysis requires the route to have manager preview configured.
309
+ The preview adapter must support Rakun's SEO-analysis bridge messages; the
310
+ official Next adapter does so automatically.
311
+
312
+ The secondary sidebar exposes a separate SEO screen above the media library for
313
+ users with SEO settings read access. Its Generate report action scans published
314
+ documents from every readable routeable content type in the active language,
315
+ checks stored metadata, custom Open Graph completeness and duplicate titles or
316
+ descriptions, then persists a dated `SeoAudit` snapshot. A page without its own
317
+ title or description uses the corresponding global default from Settings → SEO
318
+ without a warning on the configured home page; other pages receive a fallback
319
+ warning instead of a missing-metadata error. Previous site scores
320
+ remain visible as a paginated evolution history; recent page reports use an
321
+ independent bounded pagination. `SeoAudit` shares the `SeoSettings`
322
+ permission resource, so `own` controls generation and `readAny` controls shared
323
+ history visibility.
324
+
325
+ Rakun's `StructuredData` iterator module can be placed in Content or a shared
326
+ Template. Its typed fields support normal dynamic data mappings; the Custom
327
+ variant accepts an arbitrary JSON object. Invalid custom JSON remains visible in
328
+ the preview report as an error instead of disappearing silently.
329
+
330
+ ## Dynamic data mappings
331
+
332
+ List bindings use a type-aware mapping editor. When a mapped target property is
333
+ itself a `blocks` field, choose `Nested list` to open another collection, query,
334
+ filter, and mapping editor for that property. Nested query conditions can select
335
+ `Current item` to read the parent source item at that level, or `Current
336
+ document` to read the root document. This supports mappings such as Category ->
337
+ gallery item -> Project -> image card, and the editor can repeat the flow for
338
+ deeper block structures.
339
+
340
+ Homogeneous arrays of links or relations can use either `Direct field` for the
341
+ complete array or `Nested list` for per-item mapping. This also covers core
342
+ `relation().multiple()` fields. Link items expose `title` and `href`, while
343
+ relation items expose their target content type fields; their result remains a
344
+ flat array rather than the heterogeneous `{ name, value }` shape used by
345
+ `blocks`.
346
+
347
+ Core `.min(count)` and `.max(count)` limits on `f.array(...)` and `.multiple()`
348
+ relation, file, select, and content-reference fields appear below the manager
349
+ control with its live item count. The control reports minimum/maximum validation
350
+ errors and prevents adding or confirming items beyond the maximum.
351
+
352
+ Target link fields are expanded into visible `<field>.title` and `<field>.href`
353
+ rows. Each property can select its own compatible source and core reconstructs
354
+ the mapped link object.
355
+
356
+ In the SEO tab, `Current document` exposes compatible fields from the complete
357
+ document (including fields edited in Info), while the reserved `_seo` relation
358
+ itself stays excluded as a source. On create forms, string fields configured in
359
+ core with `.seo('<seoField>')` appear as normal preconfigured dynamic bindings;
360
+ editors can replace or clear them before the first save.
361
+
362
+ ## llms.txt settings
363
+
364
+ Settings → AI content edits the optional site-level `llms.txt` guide. Publishing is off
365
+ by default. Editors may override the SEO-derived site title and summary, add
366
+ Markdown guidance, and curate ordered sections of internal pages or external
367
+ URLs. Sections marked as Secondary content appear as titled subsections under
368
+ `## Optional`; Rakun never copies the complete sitemap into this document automatically. Internal page choices
369
+ are limited to published documents when their content type uses publication
370
+ states.
371
+
372
+ ## Confirmations
373
+
374
+ Use the shared async confirm API instead of ad-hoc yes/no dialogs:
375
+
376
+ ```tsx
377
+ import { confirm, useConfirm } from '@rakun-kit/manager-react'
378
+
379
+ const result = await confirm({
380
+ title: 'Delete item',
381
+ description: 'This cannot be undone.',
382
+ confirmLabel: 'Delete',
383
+ variant: 'destructive',
384
+ onConfirm: async () => {
385
+ await deleteItem()
386
+ },
387
+ })
388
+
389
+ // 'confirmed' | 'cancelled' | 'dismissed'
390
+ if (result !== 'confirmed') return
391
+
392
+ // Or boolean helper:
393
+ if (!(await confirm.yes({ title: 'Continue?' }))) return
394
+ ```
395
+
396
+ `ConfirmProvider` is mounted by `ManagerRuntimeApp` / `ManagerBrowserApp`.
397
+ `onConfirm` keeps the dialog open with a loading button until the promise
398
+ settles; thrown errors leave it open.
399
+
400
+ ## Public entrypoints
401
+
402
+ - `@rakun-kit/manager-react`: manager apps, providers and common helpers.
403
+ - `/client/http`, `/client/request`, `/client/trpc`: manager transports.
404
+ - `/app/runtime-app`: runtime/browser app components.
405
+ - `/state/navigation`, `/state/theme`, `/link`: host integration primitives.
406
+ - `/plugins`, `/rich-text`: plugin and RichText extension contracts.
407
+ - `/i18n`: locale runtime, catalog and locale types.
408
+ - `confirm` / `useConfirm` / `ConfirmProvider`: shared async confirmation dialogs.
409
+ - `/styles.css`: required bundled styles.
410
+
411
+ ## Agent constraints
412
+
413
+ - This package can run outside Next.js; do not assume Next navigation or server
414
+ components.
415
+ - Do not import the main React entrypoint into server bootstrap just to obtain
416
+ locale types or data.
417
+ - Permission-gate protected UI, and handle loading, empty and error states.
418
+ - Use existing manager components and operations before adding parallel APIs.
419
+ - Keep manager/core schemas synchronized when an operation changes.
420
+ - Do not hardcode user-facing manager copy.