ComponentContract
Machine-readable runtime contract for a live component. This is intentionally separate from @milpa/design visual contracts. A runtime component may reference a visual contract, but it does not own design tokens.
ComponentContract::__construct()
public function __construct(string $name, string $contractVersion, string $summary = '', ?string $designContract = null, ?string $defaultTemplate = null, array $propsSchema = [], array $stateSchema = [], array $actions = [], array $dataSources = []):Parameters
| Name | Type | Description |
|---|---|---|
| $name | string | |
| $contractVersion | string | |
| $summary | string | |
| $designContract | ?string | |
| $defaultTemplate | ?string | |
| $propsSchema | array<string, mixed> | |
| $stateSchema | array<string, mixed> | |
| $actions | array<string, mixed> | |
| $dataSources | array<string, mixed> |