Expand description
GPUI-specific component shape runtime contracts.
This crate is also the GPUI facade for shared component-shape metadata such
as ComponentShapeMetadata, ValueChange, and McpInput.
Declare owned components with the GpuiComponentShape derive and external
component/state pairs with component_shape!. Consumer-side configured
values implement GpuiComponentShapeBuilder and share the
build_component_shape construction path with
DefaultGpuiComponentShapeBuilder.
Macros§
- component_
shape - Function-like macro for declaring a local GPUI component shape around external component/state types.
Structs§
- Component
Capabilities - Shape-owned capability flags consumed by generators and integrations.
- Component
Prototyping - Shape-owned metadata for prototyping generators.
- Component
Suffix - Preferred generated component helper suffix.
- Default
Gpui Component Shape Builder - Default builder for a shape’s normal
GpuiComponentShape::newbehavior. - McpInput
- Shape-owned metadata for model-controlled MCP input.
- NoGpui
Render Component - Marker render contract for shapes that do not publish render metadata.
Enums§
- McpInput
Shape - Framework-neutral shape of structured MCP input accepted by a component.
- McpPrimitive
Kind - Primitive value kinds a component shape can expose to model-controlled tools.
- McpRange
Bound Kind - Primitive kinds that can be used as
{ "min": ..., "max": ... }MCP range bounds. - Render
Capability - Whether a component shape publishes render-component metadata.
- Value
Binding Capability - Whether a component shape publishes value-binding metadata.
- Value
Change - Normalized value change derived from a component event.
Traits§
- Component
Shape For - Marker that a component shape supports a value or field type.
- Component
Shape Metadata - Framework-neutral metadata published by a component shape.
- Declared
Component Shape - Marker for component shapes declared through a trusted declaration surface.
- Declared
Gpui Component Shape - Marker for component shapes declared through component-shape GPUI macros.
- Gpui
Component Render - Renders a component UI value from a component state entity.
- Gpui
Component Shape - Shape contract for GPUI components.
- Gpui
Component Shape Builder - Configured builder for a GPUI component shape.
- Gpui
Component Shape For - Marker that a GPUI component shape supports a value type.
- Gpui
Component State Value Binding - Value-binding contract implemented by backing component state.
- Gpui
Component Value Binding - Optional value-binding contract for GPUI component shapes.
Functions§
- build_
component_ shape - Build component state from a configured shape builder.
- component_
suffix_ from_ suffix - Derive a generated helper suffix from a field name and shape suffix source.
- is_
valid_ component_ suffix - Returns whether a component/prototyping suffix is valid.
- seed_
value_ binding_ state - Seed component state from the current value without spelling out the associated-type projection at every generated call site.
- validate_
component_ suffix - Validate a component/prototyping suffix.
- value_
change - Convert a component event into a value change without repeating UFCS projections in generated code.
Type Aliases§
- Gpui
Component Event Of - Event type for a value-bound GPUI component shape and value.
- Gpui
Component State Of - State type for a GPUI component shape.
Derive Macros§
- Gpui
Component Shape - Derive macro for GPUI component shape metadata.