@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.
- package/README.md +445 -373
- package/dist/cjs/app/app-provider.js +2 -2
- package/dist/cjs/app/app-provider.js.map +1 -1
- package/dist/cjs/app/runtime-app.js +13 -3
- package/dist/cjs/app/runtime-app.js.map +1 -1
- package/dist/cjs/client/react.js +38 -3
- package/dist/cjs/client/react.js.map +1 -1
- package/dist/cjs/client/realtime.js +183 -0
- package/dist/cjs/client/realtime.js.map +1 -0
- package/dist/cjs/collaboration/ContentCollaborationProvider.js +527 -0
- package/dist/cjs/collaboration/ContentCollaborationProvider.js.map +1 -0
- package/dist/cjs/collaboration/presence-colors.js +22 -0
- package/dist/cjs/collaboration/presence-colors.js.map +1 -0
- package/dist/cjs/collaboration/presence-store.js +41 -0
- package/dist/cjs/collaboration/presence-store.js.map +1 -0
- package/dist/cjs/collaboration/yDocument.js +136 -0
- package/dist/cjs/collaboration/yDocument.js.map +1 -0
- package/dist/cjs/components/CollaborationPresence.js +40 -0
- package/dist/cjs/components/CollaborationPresence.js.map +1 -0
- package/dist/cjs/components/VariantSelector.js +3 -1
- package/dist/cjs/components/VariantSelector.js.map +1 -1
- package/dist/cjs/components/media/previews/dialogs/MediaImageEditorDialog.js +9 -2
- package/dist/cjs/components/media/previews/dialogs/MediaImageEditorDialog.js.map +1 -1
- package/dist/cjs/components/ui/avatar.js +8 -0
- package/dist/cjs/components/ui/avatar.js.map +1 -1
- package/dist/cjs/components/ui/data-table.js +1 -1
- package/dist/cjs/components/ui/data-table.js.map +1 -1
- package/dist/cjs/components/ui/table.js +2 -2
- package/dist/cjs/components/ui/table.js.map +1 -1
- package/dist/cjs/help/manager-help.js +1 -1
- package/dist/cjs/help/manager-help.js.map +1 -1
- package/dist/cjs/helpers/resolve-lucide-icon.js +29 -15
- package/dist/cjs/helpers/resolve-lucide-icon.js.map +1 -1
- package/dist/cjs/i18n/catalog.js +47 -3
- package/dist/cjs/i18n/catalog.js.map +1 -1
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/router/dashboard/[contentType]/[edit]/ContentTypeEdit.js +28 -12
- package/dist/cjs/router/dashboard/[contentType]/[edit]/ContentTypeEdit.js.map +1 -1
- package/dist/cjs/router/dashboard/[contentType]/[edit]/_components/CollaborativeTemplateEditor.js +61 -0
- package/dist/cjs/router/dashboard/[contentType]/[edit]/_components/CollaborativeTemplateEditor.js.map +1 -0
- package/dist/cjs/router/dashboard/[contentType]/[edit]/_components/ContentCommentsDrawer.js +13 -6
- package/dist/cjs/router/dashboard/[contentType]/[edit]/_components/ContentCommentsDrawer.js.map +1 -1
- package/dist/cjs/router/dashboard/[contentType]/[edit]/_components/EditSectionNavigation.js +92 -0
- package/dist/cjs/router/dashboard/[contentType]/[edit]/_components/EditSectionNavigation.js.map +1 -0
- package/dist/cjs/router/dashboard/[contentType]/[edit]/_components/EditTabPanels.js +3 -2
- package/dist/cjs/router/dashboard/[contentType]/[edit]/_components/EditTabPanels.js.map +1 -1
- package/dist/cjs/router/dashboard/[contentType]/[edit]/_components/EditToolbar.js +31 -68
- package/dist/cjs/router/dashboard/[contentType]/[edit]/_components/EditToolbar.js.map +1 -1
- package/dist/cjs/router/dashboard/[contentType]/[edit]/_components/LocaleVariants.js +5 -1
- package/dist/cjs/router/dashboard/[contentType]/[edit]/_components/LocaleVariants.js.map +1 -1
- package/dist/cjs/router/dashboard/[contentType]/[edit]/_components/ModuleNavigation.js +6 -5
- package/dist/cjs/router/dashboard/[contentType]/[edit]/_components/ModuleNavigation.js.map +1 -1
- package/dist/cjs/router/dashboard/[contentType]/[edit]/_components/PreviewPanel.js +4 -3
- package/dist/cjs/router/dashboard/[contentType]/[edit]/_components/PreviewPanel.js.map +1 -1
- package/dist/cjs/router/dashboard/[contentType]/[edit]/_components/RouteLayoutModuleTabContent.js +18 -1
- package/dist/cjs/router/dashboard/[contentType]/[edit]/_components/RouteLayoutModuleTabContent.js.map +1 -1
- package/dist/cjs/router/dashboard/[contentType]/[edit]/_components/SeoTabContent.js +40 -37
- package/dist/cjs/router/dashboard/[contentType]/[edit]/_components/SeoTabContent.js.map +1 -1
- package/dist/cjs/router/dashboard/[contentType]/[edit]/_context/EditPageContext.js +74 -21
- package/dist/cjs/router/dashboard/[contentType]/[edit]/_context/EditPageContext.js.map +1 -1
- package/dist/cjs/router/dashboard/[contentType]/[edit]/_fields/DynamicDataControl.js +19 -12
- package/dist/cjs/router/dashboard/[contentType]/[edit]/_fields/DynamicDataControl.js.map +1 -1
- package/dist/cjs/router/dashboard/[contentType]/[edit]/_fields/ListField/IteratorModulePicker.js +4 -2
- package/dist/cjs/router/dashboard/[contentType]/[edit]/_fields/ListField/IteratorModulePicker.js.map +1 -1
- package/dist/cjs/router/dashboard/[contentType]/[edit]/_fields/ListField/ListUI.js +13 -45
- package/dist/cjs/router/dashboard/[contentType]/[edit]/_fields/ListField/ListUI.js.map +1 -1
- package/dist/cjs/router/dashboard/[contentType]/[edit]/_fields/RelationField/NewRelation.js +2 -4
- package/dist/cjs/router/dashboard/[contentType]/[edit]/_fields/RelationField/NewRelation.js.map +1 -1
- package/dist/cjs/router/dashboard/[contentType]/[edit]/_fields/RelationField/relation-state.js +12 -0
- package/dist/cjs/router/dashboard/[contentType]/[edit]/_fields/RelationField/relation-state.js.map +1 -0
- package/dist/cjs/router/dashboard/[contentType]/[edit]/_fields/shared/FieldWrapper.js +12 -1
- package/dist/cjs/router/dashboard/[contentType]/[edit]/_fields/shared/FieldWrapper.js.map +1 -1
- package/dist/cjs/router/dashboard/[contentType]/[edit]/_fields/shared/collaborative-field-state.js +18 -0
- package/dist/cjs/router/dashboard/[contentType]/[edit]/_fields/shared/collaborative-field-state.js.map +1 -0
- package/dist/cjs/router/dashboard/[contentType]/[edit]/_fields/shared/condition-state.js +18 -4
- package/dist/cjs/router/dashboard/[contentType]/[edit]/_fields/shared/condition-state.js.map +1 -1
- package/dist/cjs/router/dashboard/[contentType]/[edit]/_hooks/useContentDocumentActions.js +48 -13
- package/dist/cjs/router/dashboard/[contentType]/[edit]/_hooks/useContentDocumentActions.js.map +1 -1
- package/dist/cjs/router/dashboard/[contentType]/[edit]/_hooks/useContentPreview.js +8 -5
- package/dist/cjs/router/dashboard/[contentType]/[edit]/_hooks/useContentPreview.js.map +1 -1
- package/dist/cjs/router/dashboard/[contentType]/[edit]/edit.js +61 -11
- package/dist/cjs/router/dashboard/[contentType]/[edit]/edit.js.map +1 -1
- package/dist/cjs/router/dashboard/[contentType]/[edit]/screen.js +48 -4
- package/dist/cjs/router/dashboard/[contentType]/[edit]/screen.js.map +1 -1
- package/dist/cjs/router/dashboard/screen.js +7 -3
- package/dist/cjs/router/dashboard/screen.js.map +1 -1
- package/dist/cjs/router/index.js +3 -0
- package/dist/cjs/router/index.js.map +1 -1
- package/dist/cjs/router/shared/route-definitions.js +4 -1
- package/dist/cjs/router/shared/route-definitions.js.map +1 -1
- package/dist/cjs/router/shared/route-list.js +214 -64
- package/dist/cjs/router/shared/route-list.js.map +1 -1
- package/dist/docs/index.md +420 -305
- package/dist/esm/app/app-provider.d.ts +4 -1
- package/dist/esm/app/app-provider.d.ts.map +1 -1
- package/dist/esm/app/app-provider.js +2 -2
- package/dist/esm/app/app-provider.js.map +1 -1
- package/dist/esm/app/runtime-app.d.ts +2 -1
- package/dist/esm/app/runtime-app.d.ts.map +1 -1
- package/dist/esm/app/runtime-app.js +13 -3
- package/dist/esm/app/runtime-app.js.map +1 -1
- package/dist/esm/client/react.d.ts +13 -1
- package/dist/esm/client/react.d.ts.map +1 -1
- package/dist/esm/client/react.js +35 -3
- package/dist/esm/client/react.js.map +1 -1
- package/dist/esm/client/realtime.d.ts +31 -0
- package/dist/esm/client/realtime.d.ts.map +1 -0
- package/dist/esm/client/realtime.js +174 -0
- package/dist/esm/client/realtime.js.map +1 -0
- package/dist/esm/collaboration/ContentCollaborationProvider.d.ts +42 -0
- package/dist/esm/collaboration/ContentCollaborationProvider.d.ts.map +1 -0
- package/dist/esm/collaboration/ContentCollaborationProvider.js +486 -0
- package/dist/esm/collaboration/ContentCollaborationProvider.js.map +1 -0
- package/dist/esm/collaboration/presence-colors.d.ts +2 -0
- package/dist/esm/collaboration/presence-colors.d.ts.map +1 -0
- package/dist/esm/collaboration/presence-colors.js +18 -0
- package/dist/esm/collaboration/presence-colors.js.map +1 -0
- package/dist/esm/collaboration/presence-store.d.ts +10 -0
- package/dist/esm/collaboration/presence-store.d.ts.map +1 -0
- package/dist/esm/collaboration/presence-store.js +34 -0
- package/dist/esm/collaboration/presence-store.js.map +1 -0
- package/dist/esm/collaboration/yDocument.d.ts +5 -0
- package/dist/esm/collaboration/yDocument.d.ts.map +1 -0
- package/dist/esm/collaboration/yDocument.js +98 -0
- package/dist/esm/collaboration/yDocument.js.map +1 -0
- package/dist/esm/components/CollaborationPresence.d.ts +5 -0
- package/dist/esm/components/CollaborationPresence.d.ts.map +1 -0
- package/dist/esm/components/CollaborationPresence.js +36 -0
- package/dist/esm/components/CollaborationPresence.js.map +1 -0
- package/dist/esm/components/VariantSelector.d.ts.map +1 -1
- package/dist/esm/components/VariantSelector.js +4 -2
- package/dist/esm/components/VariantSelector.js.map +1 -1
- package/dist/esm/components/media/previews/dialogs/MediaImageEditorDialog.d.ts.map +1 -1
- package/dist/esm/components/media/previews/dialogs/MediaImageEditorDialog.js +10 -3
- package/dist/esm/components/media/previews/dialogs/MediaImageEditorDialog.js.map +1 -1
- package/dist/esm/components/ui/avatar.d.ts +3 -1
- package/dist/esm/components/ui/avatar.d.ts.map +1 -1
- package/dist/esm/components/ui/avatar.js +7 -1
- package/dist/esm/components/ui/avatar.js.map +1 -1
- package/dist/esm/components/ui/data-table.d.ts.map +1 -1
- package/dist/esm/components/ui/data-table.js +1 -1
- package/dist/esm/components/ui/data-table.js.map +1 -1
- package/dist/esm/components/ui/table.d.ts +4 -1
- package/dist/esm/components/ui/table.d.ts.map +1 -1
- package/dist/esm/components/ui/table.js +2 -2
- package/dist/esm/components/ui/table.js.map +1 -1
- package/dist/esm/help/manager-help.d.ts.map +1 -1
- package/dist/esm/help/manager-help.js +1 -1
- package/dist/esm/help/manager-help.js.map +1 -1
- package/dist/esm/helpers/resolve-lucide-icon.d.ts +3 -1
- package/dist/esm/helpers/resolve-lucide-icon.d.ts.map +1 -1
- package/dist/esm/helpers/resolve-lucide-icon.js +27 -14
- package/dist/esm/helpers/resolve-lucide-icon.js.map +1 -1
- package/dist/esm/hooks/use-isomorphic-layout-effect.d.ts +1 -1
- package/dist/esm/hooks/use-isomorphic-layout-effect.d.ts.map +1 -1
- package/dist/esm/i18n/catalog.d.ts +81 -3
- package/dist/esm/i18n/catalog.d.ts.map +1 -1
- package/dist/esm/i18n/catalog.js +47 -3
- package/dist/esm/i18n/catalog.js.map +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/ContentTypeEdit.d.ts +1 -0
- package/dist/esm/router/dashboard/[contentType]/[edit]/ContentTypeEdit.d.ts.map +1 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/ContentTypeEdit.js +28 -12
- package/dist/esm/router/dashboard/[contentType]/[edit]/ContentTypeEdit.js.map +1 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/_components/CollaborativeTemplateEditor.d.ts +17 -0
- package/dist/esm/router/dashboard/[contentType]/[edit]/_components/CollaborativeTemplateEditor.d.ts.map +1 -0
- package/dist/esm/router/dashboard/[contentType]/[edit]/_components/CollaborativeTemplateEditor.js +55 -0
- package/dist/esm/router/dashboard/[contentType]/[edit]/_components/CollaborativeTemplateEditor.js.map +1 -0
- package/dist/esm/router/dashboard/[contentType]/[edit]/_components/ContentCommentsDrawer.d.ts.map +1 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/_components/ContentCommentsDrawer.js +15 -8
- package/dist/esm/router/dashboard/[contentType]/[edit]/_components/ContentCommentsDrawer.js.map +1 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/_components/EditSectionNavigation.d.ts +2 -0
- package/dist/esm/router/dashboard/[contentType]/[edit]/_components/EditSectionNavigation.d.ts.map +1 -0
- package/dist/esm/router/dashboard/[contentType]/[edit]/_components/EditSectionNavigation.js +88 -0
- package/dist/esm/router/dashboard/[contentType]/[edit]/_components/EditSectionNavigation.js.map +1 -0
- package/dist/esm/router/dashboard/[contentType]/[edit]/_components/EditTabPanels.d.ts +3 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/_components/EditTabPanels.d.ts.map +1 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/_components/EditTabPanels.js +3 -2
- package/dist/esm/router/dashboard/[contentType]/[edit]/_components/EditTabPanels.js.map +1 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/_components/EditToolbar.d.ts +5 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/_components/EditToolbar.d.ts.map +1 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/_components/EditToolbar.js +34 -71
- package/dist/esm/router/dashboard/[contentType]/[edit]/_components/EditToolbar.js.map +1 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/_components/LocaleVariants.d.ts.map +1 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/_components/LocaleVariants.js +6 -2
- package/dist/esm/router/dashboard/[contentType]/[edit]/_components/LocaleVariants.js.map +1 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/_components/ModuleNavigation.d.ts +3 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/_components/ModuleNavigation.d.ts.map +1 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/_components/ModuleNavigation.js +6 -5
- package/dist/esm/router/dashboard/[contentType]/[edit]/_components/ModuleNavigation.js.map +1 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/_components/PreviewPanel.d.ts +3 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/_components/PreviewPanel.d.ts.map +1 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/_components/PreviewPanel.js +5 -4
- package/dist/esm/router/dashboard/[contentType]/[edit]/_components/PreviewPanel.js.map +1 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/_components/RouteLayoutModuleTabContent.d.ts.map +1 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/_components/RouteLayoutModuleTabContent.js +18 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/_components/RouteLayoutModuleTabContent.js.map +1 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/_components/SeoTabContent.d.ts.map +1 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/_components/SeoTabContent.js +40 -37
- package/dist/esm/router/dashboard/[contentType]/[edit]/_components/SeoTabContent.js.map +1 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/_context/EditPageContext.d.ts +8 -2
- package/dist/esm/router/dashboard/[contentType]/[edit]/_context/EditPageContext.d.ts.map +1 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/_context/EditPageContext.js +75 -22
- package/dist/esm/router/dashboard/[contentType]/[edit]/_context/EditPageContext.js.map +1 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/DynamicDataControl.d.ts.map +1 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/DynamicDataControl.js +19 -12
- package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/DynamicDataControl.js.map +1 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/ListField/IteratorModulePicker.d.ts.map +1 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/ListField/IteratorModulePicker.js +4 -2
- package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/ListField/IteratorModulePicker.js.map +1 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/ListField/ListUI.d.ts.map +1 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/ListField/ListUI.js +15 -47
- package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/ListField/ListUI.js.map +1 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/RelationField/NewRelation.d.ts.map +1 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/RelationField/NewRelation.js +2 -4
- package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/RelationField/NewRelation.js.map +1 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/RelationField/relation-state.d.ts +7 -0
- package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/RelationField/relation-state.d.ts.map +1 -0
- package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/RelationField/relation-state.js +8 -0
- package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/RelationField/relation-state.js.map +1 -0
- package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/shared/FieldWrapper.d.ts.map +1 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/shared/FieldWrapper.js +13 -2
- package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/shared/FieldWrapper.js.map +1 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/shared/collaborative-field-state.d.ts +12 -0
- package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/shared/collaborative-field-state.d.ts.map +1 -0
- package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/shared/collaborative-field-state.js +14 -0
- package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/shared/collaborative-field-state.js.map +1 -0
- package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/shared/condition-state.d.ts +9 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/shared/condition-state.d.ts.map +1 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/shared/condition-state.js +16 -3
- package/dist/esm/router/dashboard/[contentType]/[edit]/_fields/shared/condition-state.js.map +1 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/_hooks/useContentDocumentActions.d.ts +2 -0
- package/dist/esm/router/dashboard/[contentType]/[edit]/_hooks/useContentDocumentActions.d.ts.map +1 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/_hooks/useContentDocumentActions.js +48 -13
- package/dist/esm/router/dashboard/[contentType]/[edit]/_hooks/useContentDocumentActions.js.map +1 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/_hooks/useContentPreview.d.ts +1 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/_hooks/useContentPreview.d.ts.map +1 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/_hooks/useContentPreview.js +8 -5
- package/dist/esm/router/dashboard/[contentType]/[edit]/_hooks/useContentPreview.js.map +1 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/_hooks/useRouteLayoutData.d.ts.map +1 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/edit.d.ts.map +1 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/edit.js +63 -13
- package/dist/esm/router/dashboard/[contentType]/[edit]/edit.js.map +1 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/screen.d.ts.map +1 -1
- package/dist/esm/router/dashboard/[contentType]/[edit]/screen.js +13 -2
- package/dist/esm/router/dashboard/[contentType]/[edit]/screen.js.map +1 -1
- package/dist/esm/router/dashboard/screen.d.ts.map +1 -1
- package/dist/esm/router/dashboard/screen.js +8 -4
- package/dist/esm/router/dashboard/screen.js.map +1 -1
- package/dist/esm/router/index.d.ts +1 -0
- package/dist/esm/router/index.d.ts.map +1 -1
- package/dist/esm/router/index.js +1 -0
- package/dist/esm/router/index.js.map +1 -1
- package/dist/esm/router/shared/route-definitions.d.ts +1 -1
- package/dist/esm/router/shared/route-definitions.d.ts.map +1 -1
- package/dist/esm/router/shared/route-definitions.js +4 -1
- package/dist/esm/router/shared/route-definitions.js.map +1 -1
- package/dist/esm/router/shared/route-list.d.ts +3 -0
- package/dist/esm/router/shared/route-list.d.ts.map +1 -1
- package/dist/esm/router/shared/route-list.js +146 -30
- package/dist/esm/router/shared/route-list.js.map +1 -1
- package/dist/styles.css +309 -77
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +6 -2
package/README.md
CHANGED
|
@@ -1,373 +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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
Custom
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
`
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
##
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
the
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
'
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
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
|
+
```
|