Represents a single component schema within a plugin.
Contains all metadata needed for code generation, validation, and runtime dispatch. This is the core of the schema-first architecture.
Summary
Functions
Adds a capability to the component schema.
Adds an event to the component schema.
Adds a native platform mapping to the component schema.
Adds an optional capability to the component schema.
Adds a property to the component schema.
Types
@type event() :: %{ name: Dala.Plugin.event_name(), payload: map(), doc: String.t() | nil }
@type lifecycle_event() :: :create | :update | :layout | :event | :dispose
@type prop() :: %{ name: Dala.Plugin.prop_name(), type: Dala.Plugin.prop_type(), required: boolean(), default: term(), doc: String.t() | nil }
@type t() :: %Dala.Plugin.Component{ capabilities: [Dala.Plugin.capability()], doc: String.t() | nil, event_structs: %{required(atom()) => module()}, events: [event()], lifecycle: [lifecycle_event()], metadata: map(), name: Dala.Plugin.component_name(), natives: %{required(String.t()) => String.t()}, optional_capabilities: [atom()], plugin: Dala.Plugin.plugin_name(), props: [prop()] }
Functions
Adds a capability to the component schema.
Adds an event to the component schema.
Adds a native platform mapping to the component schema.
Adds an optional capability to the component schema.
Optional capabilities enhance the component but are not required for basic functionality.
Adds a property to the component schema.