@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/dist/docs/index.md
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
the
|
|
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
|
-
|
|
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
|
-
|
|
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.
|