Canonical event specs for all built-in widget event types.
Each spec describes what data the event carries and where it goes:
%{carrier: :none}- no payload (just id/scope)%{carrier: :value, type: type}- scalar inWidgetEvent.value%{carrier: :value, fields: [field: type]}- map inWidgetEvent.value
Type identifiers are either built-in atoms (:float, :string,
:boolean, :any) or modules implementing Plushie.Type.
Used by the canvas widget emit path and the protocol decoder to route event data into the correct WidgetEvent fields with proper parsing.
Summary
Functions
Returns all built-in event specs as a map.
Returns the event spec for a built-in event type, or nil.
Types
@type field_type() :: :float | :string | :boolean | :any | module()
Event field type identifier.
Built-in atomic types or a module implementing Plushie.Type.
@type t() :: %{ :carrier => :none | :value, optional(:doc) => String.t(), optional(:type) => field_type(), optional(:fields) => [{atom(), field_type()}], optional(:required) => [atom()] }
Event spec describing the payload shape.
:none- no payload:value- scalar value, stored inWidgetEvent.value:valuewith:fields- structured map, stored inWidgetEvent.valuewith atom keys