@nice2dev/events 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +22 -0
- package/LICENSE +21 -0
- package/README.md +61 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts +512 -0
- package/dist/index.mjs +1049 -0
- package/package.json +58 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,512 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @nice2dev/events — Event management, party controls, rounds, music & attractions.
|
|
3
|
+
* @packageDocumentation
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { default as default_2 } from 'react';
|
|
7
|
+
|
|
8
|
+
/** Attraction category. */
|
|
9
|
+
export declare type AttractionCategory = 'game' | 'music' | 'dance' | 'quiz' | 'karaoke' | 'photo' | 'custom';
|
|
10
|
+
|
|
11
|
+
/** Event billing item. */
|
|
12
|
+
export declare interface BillingItem {
|
|
13
|
+
id: string;
|
|
14
|
+
label: string;
|
|
15
|
+
amount: number;
|
|
16
|
+
currency: string;
|
|
17
|
+
paidById?: string;
|
|
18
|
+
paidByName?: string;
|
|
19
|
+
splitAmong?: string[];
|
|
20
|
+
isPaid?: boolean;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** Chat message. */
|
|
24
|
+
export declare interface ChatMessage {
|
|
25
|
+
id: string;
|
|
26
|
+
type: ChatMessageType;
|
|
27
|
+
senderId: string;
|
|
28
|
+
senderName: string;
|
|
29
|
+
senderAvatarUrl?: string;
|
|
30
|
+
content: string;
|
|
31
|
+
timestamp: string;
|
|
32
|
+
reactions?: Record<string, number>;
|
|
33
|
+
replyToId?: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** Chat message type. */
|
|
37
|
+
export declare type ChatMessageType = 'text' | 'image' | 'system' | 'reaction' | 'announcement';
|
|
38
|
+
|
|
39
|
+
/** Event attraction. */
|
|
40
|
+
export declare interface EventAttraction {
|
|
41
|
+
id: string;
|
|
42
|
+
name: string;
|
|
43
|
+
description?: string;
|
|
44
|
+
category: AttractionCategory;
|
|
45
|
+
imageUrl?: string;
|
|
46
|
+
durationMinutes?: number;
|
|
47
|
+
maxParticipants?: number;
|
|
48
|
+
votes?: number;
|
|
49
|
+
isSelected?: boolean;
|
|
50
|
+
order?: number;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/** Event location. */
|
|
54
|
+
export declare interface EventLocation {
|
|
55
|
+
name: string;
|
|
56
|
+
address?: string;
|
|
57
|
+
lat?: number;
|
|
58
|
+
lng?: number;
|
|
59
|
+
virtualUrl?: string;
|
|
60
|
+
isVirtual?: boolean;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/** Media item (photo/video). */
|
|
64
|
+
export declare interface EventMediaItem {
|
|
65
|
+
id: string;
|
|
66
|
+
type: 'photo' | 'video';
|
|
67
|
+
url: string;
|
|
68
|
+
thumbnailUrl?: string;
|
|
69
|
+
uploadedById: string;
|
|
70
|
+
uploadedByName: string;
|
|
71
|
+
uploadedAt: string;
|
|
72
|
+
caption?: string;
|
|
73
|
+
likes?: number;
|
|
74
|
+
tags?: string[];
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/** Core event model. */
|
|
78
|
+
export declare interface EventModel {
|
|
79
|
+
id: string;
|
|
80
|
+
title: string;
|
|
81
|
+
description?: string;
|
|
82
|
+
status: EventStatus;
|
|
83
|
+
hostId: string;
|
|
84
|
+
hostName: string;
|
|
85
|
+
startDate?: string;
|
|
86
|
+
endDate?: string;
|
|
87
|
+
location?: EventLocation;
|
|
88
|
+
coverImageUrl?: string;
|
|
89
|
+
maxParticipants?: number;
|
|
90
|
+
isPublic?: boolean;
|
|
91
|
+
tags?: string[];
|
|
92
|
+
settings?: Record<string, unknown>;
|
|
93
|
+
createdAt: string;
|
|
94
|
+
updatedAt?: string;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/** Event participant. */
|
|
98
|
+
export declare interface EventParticipant {
|
|
99
|
+
id: string;
|
|
100
|
+
userId: string;
|
|
101
|
+
name: string;
|
|
102
|
+
avatarUrl?: string;
|
|
103
|
+
role: ParticipantRole;
|
|
104
|
+
status: ParticipantStatus;
|
|
105
|
+
joinedAt?: string;
|
|
106
|
+
checkedInAt?: string;
|
|
107
|
+
qrCode?: string;
|
|
108
|
+
score?: number;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/** Event round. */
|
|
112
|
+
export declare interface EventRound {
|
|
113
|
+
id: string;
|
|
114
|
+
name: string;
|
|
115
|
+
description?: string;
|
|
116
|
+
order: number;
|
|
117
|
+
status: RoundStatus;
|
|
118
|
+
type?: string;
|
|
119
|
+
startedAt?: string;
|
|
120
|
+
endedAt?: string;
|
|
121
|
+
durationMinutes?: number;
|
|
122
|
+
scores?: RoundScore[];
|
|
123
|
+
winnerIds?: string[];
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* {@link EventService} — Abstract API interface for event backend integration.
|
|
128
|
+
*
|
|
129
|
+
* Implement this interface in your application to connect the event components
|
|
130
|
+
* to your API layer. Example:
|
|
131
|
+
*
|
|
132
|
+
* ```ts
|
|
133
|
+
* class MyEventService implements EventService {
|
|
134
|
+
* async getEvent(id) { return fetch(`/api/events/${id}`).then(r => r.json()); }
|
|
135
|
+
* // ...
|
|
136
|
+
* }
|
|
137
|
+
* ```
|
|
138
|
+
*/
|
|
139
|
+
export declare interface EventService {
|
|
140
|
+
getEvent(eventId: string): Promise<EventModel>;
|
|
141
|
+
createEvent(data: Partial<EventModel>): Promise<EventModel>;
|
|
142
|
+
updateEvent(eventId: string, data: Partial<EventModel>): Promise<EventModel>;
|
|
143
|
+
deleteEvent(eventId: string): Promise<void>;
|
|
144
|
+
getParticipants(eventId: string): Promise<EventParticipant[]>;
|
|
145
|
+
inviteParticipant(eventId: string, userId: string, role?: string): Promise<EventParticipant>;
|
|
146
|
+
updateParticipant(eventId: string, participantId: string, data: Partial<EventParticipant>): Promise<EventParticipant>;
|
|
147
|
+
removeParticipant(eventId: string, participantId: string): Promise<void>;
|
|
148
|
+
checkInParticipant(eventId: string, participantId: string): Promise<EventParticipant>;
|
|
149
|
+
getMessages(eventId: string, limit?: number, before?: string): Promise<ChatMessage[]>;
|
|
150
|
+
sendMessage(eventId: string, content: string, type?: string): Promise<ChatMessage>;
|
|
151
|
+
reactToMessage(eventId: string, messageId: string, reaction: string): Promise<void>;
|
|
152
|
+
getRounds(eventId: string): Promise<EventRound[]>;
|
|
153
|
+
createRound(eventId: string, data: Partial<EventRound>): Promise<EventRound>;
|
|
154
|
+
updateRound(eventId: string, roundId: string, data: Partial<EventRound>): Promise<EventRound>;
|
|
155
|
+
startRound(eventId: string, roundId: string): Promise<EventRound>;
|
|
156
|
+
endRound(eventId: string, roundId: string): Promise<EventRound>;
|
|
157
|
+
submitScore(eventId: string, roundId: string, participantId: string, score: number): Promise<void>;
|
|
158
|
+
getAttractions(eventId: string): Promise<EventAttraction[]>;
|
|
159
|
+
addAttraction(eventId: string, data: Partial<EventAttraction>): Promise<EventAttraction>;
|
|
160
|
+
voteAttraction(eventId: string, attractionId: string): Promise<void>;
|
|
161
|
+
removeAttraction(eventId: string, attractionId: string): Promise<void>;
|
|
162
|
+
getSongs(eventId: string): Promise<SongEntry[]>;
|
|
163
|
+
addSong(eventId: string, song: Partial<SongEntry>): Promise<SongEntry>;
|
|
164
|
+
removeSong(eventId: string, songId: string): Promise<void>;
|
|
165
|
+
voteSong(eventId: string, songId: string): Promise<void>;
|
|
166
|
+
getKaraokeSongs?(eventId: string): Promise<KaraokeSong[]>;
|
|
167
|
+
queueKaraokeSong?(eventId: string, songId: string, performerId: string): Promise<void>;
|
|
168
|
+
getMedia(eventId: string): Promise<EventMediaItem[]>;
|
|
169
|
+
uploadMedia(eventId: string, file: File, caption?: string): Promise<EventMediaItem>;
|
|
170
|
+
deleteMedia(eventId: string, mediaId: string): Promise<void>;
|
|
171
|
+
getSurveys?(eventId: string): Promise<EventSurvey[]>;
|
|
172
|
+
submitSurveyResponse?(eventId: string, surveyId: string, answer: string | string[] | number): Promise<void>;
|
|
173
|
+
getBillingItems?(eventId: string): Promise<BillingItem[]>;
|
|
174
|
+
addBillingItem?(eventId: string, item: Partial<BillingItem>): Promise<BillingItem>;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/** Event status. */
|
|
178
|
+
export declare type EventStatus = 'draft' | 'planned' | 'active' | 'paused' | 'completed' | 'cancelled';
|
|
179
|
+
|
|
180
|
+
/** Event survey. */
|
|
181
|
+
export declare interface EventSurvey {
|
|
182
|
+
id: string;
|
|
183
|
+
question: string;
|
|
184
|
+
type: 'single' | 'multiple' | 'text' | 'rating';
|
|
185
|
+
options?: string[];
|
|
186
|
+
responses?: SurveyResponse[];
|
|
187
|
+
isActive?: boolean;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/** Karaoke song with lyrics. */
|
|
191
|
+
export declare interface KaraokeSong extends SongEntry {
|
|
192
|
+
hasLyrics: boolean;
|
|
193
|
+
difficulty?: 'easy' | 'medium' | 'hard';
|
|
194
|
+
language?: string;
|
|
195
|
+
performerId?: string;
|
|
196
|
+
performerName?: string;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* {@link NiceAttractionPicker} — Attraction selection grid with category filters.
|
|
201
|
+
*/
|
|
202
|
+
export declare const NiceAttractionPicker: default_2.ForwardRefExoticComponent<NiceAttractionPickerProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
203
|
+
|
|
204
|
+
/** Props for {@link NiceAttractionPicker}. */
|
|
205
|
+
export declare interface NiceAttractionPickerProps {
|
|
206
|
+
/** Available attractions. */
|
|
207
|
+
attractions: EventAttraction[];
|
|
208
|
+
/** Called when selecting an attraction. */
|
|
209
|
+
onSelect?: (attractionId: string) => void;
|
|
210
|
+
/** Called when deselecting. */
|
|
211
|
+
onDeselect?: (attractionId: string) => void;
|
|
212
|
+
/** Called when voting for an attraction. */
|
|
213
|
+
onVote?: (attractionId: string) => void;
|
|
214
|
+
/** Set of selected attraction IDs. */
|
|
215
|
+
selectedIds?: string[];
|
|
216
|
+
/** Maximum number of selections allowed. */
|
|
217
|
+
maxSelections?: number;
|
|
218
|
+
/** Whether to show vote counts. */
|
|
219
|
+
showVotes?: boolean;
|
|
220
|
+
/** Whether actions are allowed. */
|
|
221
|
+
readOnly?: boolean;
|
|
222
|
+
/** Display layout. */
|
|
223
|
+
layout?: 'grid' | 'list';
|
|
224
|
+
className?: string;
|
|
225
|
+
style?: default_2.CSSProperties;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* {@link NiceAttractionVoting} — Anonymous voting on attractions with rankings.
|
|
230
|
+
*/
|
|
231
|
+
export declare const NiceAttractionVoting: default_2.ForwardRefExoticComponent<NiceAttractionVotingProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
232
|
+
|
|
233
|
+
/** Props for {@link NiceAttractionVoting}. */
|
|
234
|
+
export declare interface NiceAttractionVotingProps {
|
|
235
|
+
/** Attractions available for voting. */
|
|
236
|
+
attractions: EventAttraction[];
|
|
237
|
+
/** Called when voting for an attraction. */
|
|
238
|
+
onVote?: (attractionId: string) => void;
|
|
239
|
+
/** Called when retracting a vote. */
|
|
240
|
+
onUnvote?: (attractionId: string) => void;
|
|
241
|
+
/** IDs of attractions the current user already voted for. */
|
|
242
|
+
votedIds?: string[];
|
|
243
|
+
/** Max votes per user. */
|
|
244
|
+
maxVotes?: number;
|
|
245
|
+
/** Whether voting is closed. */
|
|
246
|
+
closed?: boolean;
|
|
247
|
+
/** Sort order. */
|
|
248
|
+
sortBy?: 'votes' | 'name' | 'category';
|
|
249
|
+
/** Whether to show results (rankings). */
|
|
250
|
+
showResults?: boolean;
|
|
251
|
+
className?: string;
|
|
252
|
+
style?: default_2.CSSProperties;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* {@link NiceEventChat} — Real-time event chat with reactions and message types.
|
|
257
|
+
*/
|
|
258
|
+
export declare const NiceEventChat: default_2.ForwardRefExoticComponent<NiceEventChatProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
259
|
+
|
|
260
|
+
/** Props for {@link NiceEventChat}. */
|
|
261
|
+
export declare interface NiceEventChatProps {
|
|
262
|
+
/** Messages to display. */
|
|
263
|
+
messages: ChatMessage[];
|
|
264
|
+
/** Current user ID. */
|
|
265
|
+
currentUserId: string;
|
|
266
|
+
/** Called when sending a message. */
|
|
267
|
+
onSend?: (content: string, type?: ChatMessageType) => void;
|
|
268
|
+
/** Called when reacting to a message. */
|
|
269
|
+
onReact?: (messageId: string, reaction: string) => void;
|
|
270
|
+
/** Available reaction emojis. */
|
|
271
|
+
reactions?: string[];
|
|
272
|
+
/** Whether the chat is read-only. */
|
|
273
|
+
readOnly?: boolean;
|
|
274
|
+
/** Placeholder text. */
|
|
275
|
+
placeholder?: string;
|
|
276
|
+
/** Whether to auto-scroll to bottom on new messages. */
|
|
277
|
+
autoScroll?: boolean;
|
|
278
|
+
className?: string;
|
|
279
|
+
style?: default_2.CSSProperties;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
/**
|
|
283
|
+
* {@link NiceEventMedia} — Media gallery with upload, photos, and collages.
|
|
284
|
+
*/
|
|
285
|
+
export declare const NiceEventMedia: default_2.ForwardRefExoticComponent<NiceEventMediaProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
286
|
+
|
|
287
|
+
/** Props for {@link NiceEventMedia}. */
|
|
288
|
+
export declare interface NiceEventMediaProps {
|
|
289
|
+
/** Media items. */
|
|
290
|
+
items: EventMediaItem[];
|
|
291
|
+
/** Called when uploading new media. */
|
|
292
|
+
onUpload?: (file: File, caption?: string) => void;
|
|
293
|
+
/** Called when deleting media. */
|
|
294
|
+
onDelete?: (mediaId: string) => void;
|
|
295
|
+
/** Called when liking media. */
|
|
296
|
+
onLike?: (mediaId: string) => void;
|
|
297
|
+
/** Called when clicking on a media item. */
|
|
298
|
+
onItemClick?: (item: EventMediaItem) => void;
|
|
299
|
+
/** Display mode. */
|
|
300
|
+
layout?: 'grid' | 'masonry' | 'list';
|
|
301
|
+
/** Whether upload is allowed. */
|
|
302
|
+
uploadEnabled?: boolean;
|
|
303
|
+
/** Filter by type. */
|
|
304
|
+
typeFilter?: 'photo' | 'video' | 'all';
|
|
305
|
+
className?: string;
|
|
306
|
+
style?: default_2.CSSProperties;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* {@link NiceEventParticipants} — Participant list with roles, status, and QR codes.
|
|
311
|
+
*/
|
|
312
|
+
export declare const NiceEventParticipants: default_2.ForwardRefExoticComponent<NiceEventParticipantsProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
313
|
+
|
|
314
|
+
/** Props for {@link NiceEventParticipants}. */
|
|
315
|
+
export declare interface NiceEventParticipantsProps {
|
|
316
|
+
/** Participants. */
|
|
317
|
+
participants: EventParticipant[];
|
|
318
|
+
/** Current user's participant ID (for self-highlight). */
|
|
319
|
+
currentParticipantId?: string;
|
|
320
|
+
/** Called when inviting a participant. */
|
|
321
|
+
onInvite?: () => void;
|
|
322
|
+
/** Called when removing a participant. */
|
|
323
|
+
onRemove?: (participantId: string) => void;
|
|
324
|
+
/** Called when changing a participant's role. */
|
|
325
|
+
onRoleChange?: (participantId: string, role: ParticipantRole) => void;
|
|
326
|
+
/** Called when checking in a participant. */
|
|
327
|
+
onCheckIn?: (participantId: string) => void;
|
|
328
|
+
/** Called when clicking on a participant. */
|
|
329
|
+
onParticipantClick?: (participant: EventParticipant) => void;
|
|
330
|
+
/** Whether to show QR codes for check-in. */
|
|
331
|
+
showQR?: boolean;
|
|
332
|
+
/** Whether to allow management actions. */
|
|
333
|
+
editable?: boolean;
|
|
334
|
+
/** Max participants. */
|
|
335
|
+
maxParticipants?: number;
|
|
336
|
+
className?: string;
|
|
337
|
+
style?: default_2.CSSProperties;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* {@link NiceEventPlanning} — Event planning with dates, location, surveys, and billing.
|
|
342
|
+
*/
|
|
343
|
+
export declare const NiceEventPlanning: default_2.ForwardRefExoticComponent<NiceEventPlanningProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
344
|
+
|
|
345
|
+
/** Props for {@link NiceEventPlanning}. */
|
|
346
|
+
export declare interface NiceEventPlanningProps {
|
|
347
|
+
/** Event data. */
|
|
348
|
+
event: EventModel;
|
|
349
|
+
/** Surveys. */
|
|
350
|
+
surveys?: EventSurvey[];
|
|
351
|
+
/** Billing items. */
|
|
352
|
+
billing?: BillingItem[];
|
|
353
|
+
/** Called when updating event details. */
|
|
354
|
+
onUpdateEvent?: (data: Partial<EventModel>) => void;
|
|
355
|
+
/** Called when updating location. */
|
|
356
|
+
onUpdateLocation?: (location: EventLocation) => void;
|
|
357
|
+
/** Called when adding a survey. */
|
|
358
|
+
onAddSurvey?: (question: string, type: EventSurvey['type'], options?: string[]) => void;
|
|
359
|
+
/** Called when submitting survey response. */
|
|
360
|
+
onSurveyRespond?: (surveyId: string, answer: string | string[] | number) => void;
|
|
361
|
+
/** Called when adding a billing item. */
|
|
362
|
+
onAddBilling?: (item: Partial<BillingItem>) => void;
|
|
363
|
+
/** Whether editing is allowed. */
|
|
364
|
+
editable?: boolean;
|
|
365
|
+
className?: string;
|
|
366
|
+
style?: default_2.CSSProperties;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* {@link NiceKaraokePicker} — Karaoke song picker with queue management.
|
|
371
|
+
*/
|
|
372
|
+
export declare const NiceKaraokePicker: default_2.ForwardRefExoticComponent<NiceKaraokePickerProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
373
|
+
|
|
374
|
+
/** Props for {@link NiceKaraokePicker}. */
|
|
375
|
+
export declare interface NiceKaraokePickerProps {
|
|
376
|
+
/** Available karaoke songs. */
|
|
377
|
+
songs: KaraokeSong[];
|
|
378
|
+
/** Current karaoke queue (ordered). */
|
|
379
|
+
queue?: KaraokeSong[];
|
|
380
|
+
/** Called when a song is added to the queue. */
|
|
381
|
+
onEnqueue?: (songId: string, performerId?: string) => void;
|
|
382
|
+
/** Called when removing from queue. */
|
|
383
|
+
onDequeue?: (songId: string) => void;
|
|
384
|
+
/** Called when skipping to next performer. */
|
|
385
|
+
onNext?: () => void;
|
|
386
|
+
/** Current performing song id. */
|
|
387
|
+
nowPlayingId?: string;
|
|
388
|
+
/** Whether actions are allowed. */
|
|
389
|
+
readOnly?: boolean;
|
|
390
|
+
className?: string;
|
|
391
|
+
style?: default_2.CSSProperties;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* {@link NiceRoundCard} — Individual round card with actions, timer, and scoreboard.
|
|
396
|
+
*/
|
|
397
|
+
export declare const NiceRoundCard: default_2.ForwardRefExoticComponent<NiceRoundCardProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
398
|
+
|
|
399
|
+
/** Props for {@link NiceRoundCard}. */
|
|
400
|
+
export declare interface NiceRoundCardProps {
|
|
401
|
+
/** Round data. */
|
|
402
|
+
round: EventRound;
|
|
403
|
+
/** Whether the timer is running. */
|
|
404
|
+
timerRunning?: boolean;
|
|
405
|
+
/** Remaining seconds (for timer display). */
|
|
406
|
+
remainingSeconds?: number;
|
|
407
|
+
/** Called to submit a score for a participant. */
|
|
408
|
+
onSubmitScore?: (participantId: string, score: number) => void;
|
|
409
|
+
/** Called to start the round. */
|
|
410
|
+
onStart?: () => void;
|
|
411
|
+
/** Called to end the round. */
|
|
412
|
+
onEnd?: () => void;
|
|
413
|
+
/** Called to skip the round. */
|
|
414
|
+
onSkip?: () => void;
|
|
415
|
+
/** Whether management actions are visible. */
|
|
416
|
+
editable?: boolean;
|
|
417
|
+
/** Custom actions to render in the footer. */
|
|
418
|
+
footerActions?: default_2.ReactNode;
|
|
419
|
+
className?: string;
|
|
420
|
+
style?: default_2.CSSProperties;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
/**
|
|
424
|
+
* {@link NiceRoundList} — Round system list with status and actions.
|
|
425
|
+
*/
|
|
426
|
+
export declare const NiceRoundList: default_2.ForwardRefExoticComponent<NiceRoundListProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
427
|
+
|
|
428
|
+
/** Props for {@link NiceRoundList}. */
|
|
429
|
+
export declare interface NiceRoundListProps {
|
|
430
|
+
/** Rounds to display. */
|
|
431
|
+
rounds: EventRound[];
|
|
432
|
+
/** Currently active round ID. */
|
|
433
|
+
activeRoundId?: string;
|
|
434
|
+
/** Called when selecting a round. */
|
|
435
|
+
onSelect?: (round: EventRound) => void;
|
|
436
|
+
/** Called to start a round. */
|
|
437
|
+
onStart?: (roundId: string) => void;
|
|
438
|
+
/** Called to end a round. */
|
|
439
|
+
onEnd?: (roundId: string) => void;
|
|
440
|
+
/** Called to create a new round. */
|
|
441
|
+
onCreate?: () => void;
|
|
442
|
+
/** Whether management actions are allowed. */
|
|
443
|
+
editable?: boolean;
|
|
444
|
+
className?: string;
|
|
445
|
+
style?: default_2.CSSProperties;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
/**
|
|
449
|
+
* {@link NiceSongPicker} — Song selection for music events.
|
|
450
|
+
*/
|
|
451
|
+
export declare const NiceSongPicker: default_2.ForwardRefExoticComponent<NiceSongPickerProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
452
|
+
|
|
453
|
+
/** Props for {@link NiceSongPicker}. */
|
|
454
|
+
export declare interface NiceSongPickerProps {
|
|
455
|
+
/** Available songs. */
|
|
456
|
+
songs: SongEntry[];
|
|
457
|
+
/** Called when adding a song to the queue/playlist. */
|
|
458
|
+
onAdd?: (songId: string) => void;
|
|
459
|
+
/** Called when removing a song. */
|
|
460
|
+
onRemove?: (songId: string) => void;
|
|
461
|
+
/** Called when voting for a song. */
|
|
462
|
+
onVote?: (songId: string) => void;
|
|
463
|
+
/** Called when searching for songs (external search). */
|
|
464
|
+
onSearch?: (query: string) => void;
|
|
465
|
+
/** Whether to show the queue. */
|
|
466
|
+
showQueue?: boolean;
|
|
467
|
+
/** Whether actions are allowed. */
|
|
468
|
+
readOnly?: boolean;
|
|
469
|
+
className?: string;
|
|
470
|
+
style?: default_2.CSSProperties;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
/** Participant role. */
|
|
474
|
+
export declare type ParticipantRole = 'host' | 'co-host' | 'moderator' | 'participant' | 'spectator' | 'vip';
|
|
475
|
+
|
|
476
|
+
/** Participant status. */
|
|
477
|
+
export declare type ParticipantStatus = 'invited' | 'confirmed' | 'declined' | 'checked-in' | 'no-show';
|
|
478
|
+
|
|
479
|
+
/** Round score entry. */
|
|
480
|
+
export declare interface RoundScore {
|
|
481
|
+
participantId: string;
|
|
482
|
+
participantName: string;
|
|
483
|
+
score: number;
|
|
484
|
+
rank?: number;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
/** Round status. */
|
|
488
|
+
export declare type RoundStatus = 'upcoming' | 'active' | 'voting' | 'scored' | 'completed' | 'skipped';
|
|
489
|
+
|
|
490
|
+
/** Song entry. */
|
|
491
|
+
export declare interface SongEntry {
|
|
492
|
+
id: string;
|
|
493
|
+
title: string;
|
|
494
|
+
artist: string;
|
|
495
|
+
albumArt?: string;
|
|
496
|
+
duration?: number;
|
|
497
|
+
previewUrl?: string;
|
|
498
|
+
addedById?: string;
|
|
499
|
+
addedByName?: string;
|
|
500
|
+
votes?: number;
|
|
501
|
+
isPlaying?: boolean;
|
|
502
|
+
isQueued?: boolean;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
/** Survey response. */
|
|
506
|
+
export declare interface SurveyResponse {
|
|
507
|
+
participantId: string;
|
|
508
|
+
participantName: string;
|
|
509
|
+
answer: string | string[] | number;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
export { }
|