Module
@riducms/plugin
@riducms/plugin — Build custom Svelte components, register admin plugins, and work with field forms.
Functions 17
defineRowLabelPlugin()Preserve inference while declaring an array or blocks row-label component.
defineAdminMessages()Define an exact plugin-owned message catalog with build-time key and placeholder checks.
validateAdminMessages()Validate plugin message keys, translations, plural forms, and placeholders at runtime.
constant getAdminI18nRead the current admin localization context inside a Svelte plugin component.
constant setAdminI18nProvide the admin localization context to nested plugin components.
resolveAdminExtensions()Validate and flatten frontend extension registrations before the admin mounts.
defineAdmin()Configure the custom components, installed plugins, and translations used by your application’s admin.
defineRowLabel()Show a custom summary in the heading of an array or block row, including its current unsaved values.
resolveAdminConfig()Normalize and validate static registrations once, independently of schema refresh.
validateAdminManifest()Check admin registrations against Ridu's resolved Go schema. Used by Ridu's build tooling and admin startup; application authors normally run `ridu check` instead. Set `completeManifest` only with the full schema from Go: runtime schemas can omit resources the current user cannot access, so absence there does not prove a typo. Throws with the affected registration or field when a selection/config is invalid.
defineAdminPlugin()Package a Go plugin’s field editors, pages, and other admin components into one export that applications can install.
defineFieldComponent()Give an alternative field editor a name inside a plugin so Go fields can choose it explicitly.
definePluginField()Connect a new Go field type to its default Svelte editor and the functions that check its values.
defineFieldEditor()Replace a built-in field input in one application while keeping its existing Go field and saved value type.
assertAdminPluginPairs()Check that installed Go/admin plugin packages agree on identity, API version, pairing version, routes, assets and field types. Ridu's generated file calls this; authors should fix mismatched packages rather than editing generated metadata. Missing imports fail during compilation; incompatible pairs throw here.
resolvePluginFields()Collect field registrations, checking plugin IDs, field-type ownership, named field editors and API versions. Throws on malformed/duplicate registrations. Used by Ridu's runtime/check tooling; authors normally call the registration helpers and retain their generated plugin list instead of invoking this directly.
withAdminLoader()Connect a generated Go loader reference to the Svelte component that displays its data.
Interfaces 65
interface AdminPlugininterface BackendAdminPlugininterface AdminPluginPairinterface RowLabelPlugininterface RowLabelComponentPropsinterface FieldFormResourceinterface AdminI18ninterface DefineAdminMessagesInputinterface PluginMessageCataloginterface FieldAuthoringHostinterface EmbeddedSchemaFormPropsinterface EmbeddedSchemaFormScopeinterface EmbeddedSchemaVariantScopeinterface FieldReferenceBrowserPropsinterface FieldReferenceFiltertype AdminRouteinterface AdminRouteNavigationtype AdminDashboardPanelinterface AdminDashboardPanelPropsinterface AdminLoginComponentinterface AdminLoginComponentPropsinterface AdminLoginExtensionHostinterface AdminAccountComponentinterface AdminAccountComponentPropsinterface AdminAccountExtensionHostinterface AdminNavigationComponentinterface AdminNavigationComponentPropsinterface AdminLogoutButtoninterface AdminLogoutButtonPropsinterface AdminLogoutExtensionHostinterface AdminCoreViewPropsinterface AdminCoreViewHostinterface AdminBrandComponentinterface AdminBrandComponentPropsinterface AdminShellSlotinterface AdminShellSlotPropsinterface AdminProviderinterface AdminProviderPropsinterface AdminListCellRendererinterface AdminListCellRendererPropsinterface AdminDocumentActioninterface AdminDocumentViewinterface AdminDocumentExtensionPropsinterface AdminDocumentExtensionHostinterface AdminExtensionPropsinterface AdminConfiginterface RegisteredRowLabelinterface ResolvedAdminConfiginterface FieldBindinginterface RegisteredFieldEditorinterface AdminCollectionListinterface AdminContributionsinterface AdminListResultsRendererinterface AdminListResultsRendererPropsinterface AdminLoaderPropsinterface EmbeddedSchemaDraftinterface EmbeddedSchemaDraftEditorPropsinterface EmbeddedSchemaHeaderPropsinterface FieldDocumentForminterface FieldLiveValidationinterface PluginFieldBindinginterface PluginFieldRegistrationinterface PluginForminterface RegisteredPluginFieldinterface ResolvedPluginField
Types 21
constant ADMIN_PLUGIN_API_VERSIONThe framework-owned admin extension API version.
interface ResolvedAdminExtensionsThe flattened extension registry without the original plugin and field arrays.
type RowLabelSnapshotA detached, recursively frozen snapshot of the current array or blocks row.
type RowLabelValueA recursively read-only JSON-like value available to row-label components.
type FieldDocumentThe authoring-safe document shape exposed to extension components.
type PluginTranslationKeyA namespaced plugin message key accepted by AdminI18n.t.
type AdminAccountSurfaceThe extensible account screen.
type AdminNavigationPositionThe composition point around framework navigation.
type AdminCoreViewSurfaceThe framework route surface exposed to a core-view extension.
type AdminCoreViewA replacement or wrapper for collection, global, or not-found routes.
type AdminBrandSurfaceAn exact framework branding location.
type AdminShellSlotPositionAn exact global shell insertion point.
type AdminExtensionNotificationToneThe notification tones currently exposed to extensions.
type RowLabelDefinitionThe heading component and optional settings decoder passed to `defineRowLabel`.
type RowLabelPropsThe current row values and position passed to a custom array or block heading.
type FieldEditorDefinitionThe existing field type, Svelte component, and optional settings decoder passed to `defineFieldEditor`.
type FieldEditorPropsThe current value, validation messages, and tools passed to an application’s custom field input.
type FieldEditorTypeField types whose inputs you can replace with a custom component. Lists contain primitive strings or numbers; the list is one field.
type FieldEditorValueThe value your field component reads and writes. Date and code fields contain strings.
type AdminViewComponentPublic type AdminViewComponent from @riducms/plugin.
type PluginFieldPropsValues and tools Ridu passes to a plugin’s Svelte field editor.
Methods 84
AdminAccountComponent.component()AdminAccountComponentProps.defaultView()AdminAccountExtensionHost.logout()AdminAccountExtensionHost.notify()AdminAccountExtensionHost.refreshUser()AdminBrandComponent.component()AdminCoreViewHost.documentsChanged()AdminCoreViewHost.notify()AdminCoreViewHost.refreshManifest()AdminCoreViewProps.defaultView()AdminDocumentAction.component()AdminDocumentExtensionHost.notify()AdminDocumentExtensionHost.refresh()AdminDocumentView.component()AdminI18n.formatDate()AdminI18n.formatList()AdminI18n.formatNumber()AdminI18n.formatRelativeTime()AdminI18n.t()AdminI18n.text()AdminListCellRenderer.component()AdminLoginComponent.component()AdminLoginComponentProps.defaultView()AdminLoginExtensionHost.login()AdminLoginExtensionHost.notify()AdminLogoutButton.component()AdminLogoutExtensionHost.logout()AdminNavigationComponent.component()AdminNavigationComponentProps.defaultView()AdminProvider.component()AdminProviderProps.defaultView()AdminShellSlot.component()FieldAuthoringHost.findDocument()FieldAuthoringHost.createSchemaPayload()FieldAuthoringHost.schemaForm()EmbeddedSchemaFormProps.onChange()FieldAuthoringHost.referenceBrowser()FieldAuthoringHost.requestPlugin()FieldReferenceBrowserProps.onClose()FieldReferenceBrowserProps.onCommit()RowLabelPlugin.component()RegisteredRowLabel.component()RegisteredRowLabel.decode()FieldBinding.set()RegisteredFieldEditor.component()RegisteredFieldEditor.decode()AdminCollectionList.documentHref()AdminCollectionList.title()AdminCollectionList.toggleDocument()AdminCollectionList.togglePage()AdminListResultsRenderer.component()AdminLoaderProps.refresh()EmbeddedSchemaDraft.discard()EmbeddedSchemaDraft.payload()EmbeddedSchemaDraft.validate()EmbeddedSchemaDraftEditorProps.onApply()EmbeddedSchemaDraftEditorProps.onCancel()EmbeddedSchemaHeaderProps.onChange()FieldAuthoringHost.beginSchemaDraft()FieldAuthoringHost.canCreateDocument()FieldAuthoringHost.copySchemaPayload()FieldAuthoringHost.schemaDraftEditor()FieldAuthoringHost.schemaHeader()FieldAuthoringHost.schemaIssues()FieldDocumentForm.get()FieldDocumentForm.issuesFor()FieldDocumentForm.snapshot()FieldLiveValidation.retry()PluginFieldBinding.reportPendingEdit()PluginFieldBinding.set()PluginFieldRegistration.component()PluginFieldRegistration.decodeConfig()PluginFieldRegistration.decodeFormValue()PluginFieldRegistration.decodeInput()PluginFieldRegistration.decodeValue()PluginForm.bind()PluginForm.get()PluginForm.issuesFor()PluginForm.snapshot()RegisteredPluginField.component()RegisteredPluginField.decodeConfig()RegisteredPluginField.decodeFormValue()RegisteredPluginField.decodeInput()RegisteredPluginField.decodeValue()