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 getAdminI18n

    Read the current admin localization context inside a Svelte plugin component.

  • constant setAdminI18n

    Provide 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

Types 21

Methods 84