project-standalo-sonic-cloud/.workflow/versions/v001/contexts/component_search_results.yml

108 lines
2.5 KiB
YAML

task_id: task_create_component_search_results
entity_id: component_search_results
generated_at: '2025-12-18T15:16:50.324165'
workflow_version: v001
target:
type: component
definition:
id: component_search_results
name: SearchResults
description: Search results with filters
props:
- name: results
type: object
required: true
events: []
uses_apis: []
uses_components:
- component_song_card
- component_artist_card
- component_album_card
related:
models: []
apis: []
components:
- id: component_artist_card
definition: &id001
id: component_artist_card
name: ArtistCard
description: Artist preview card
props:
- name: artist
type: Artist
required: true
events:
- name: onClick
payload:
artistId: string
uses_apis: []
uses_components: []
- id: component_album_card
definition: &id002
id: component_album_card
name: AlbumCard
description: Album display card
props:
- name: album
type: Album
required: true
- name: showArtist
type: boolean
default: true
events:
- name: onClick
payload:
albumId: string
uses_apis: []
uses_components: []
- id: component_song_card
definition: &id003
id: component_song_card
name: SongCard
description: Song display card with play button
props:
- name: song
type: Song
required: true
- name: showArtist
type: boolean
default: true
- name: showAlbum
type: boolean
default: false
events:
- name: onPlay
payload:
songId: string
- name: onAddToPlaylist
payload:
songId: string
uses_apis: []
uses_components: []
dependencies:
entity_ids:
- component_artist_card
- component_album_card
- component_song_card
definitions:
- id: component_artist_card
type: component
definition: *id001
- id: component_album_card
type: component
definition: *id002
- id: component_song_card
type: component
definition: *id003
files:
to_create:
- app/components/SearchResults.tsx
reference: []
acceptance:
- criterion: Component renders without errors
verification: Import and render in test
- criterion: Props are typed correctly
verification: TypeScript compilation
- criterion: Events fire correctly
verification: Test event handlers