@getmicdrop/venue-calendar 3.5.2 → 3.5.3

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.
@@ -1,387 +1,387 @@
1
- /**
2
- * TypeScript definitions for @getmicdrop/venue-calendar
3
- */
4
-
5
- // ============================================================================
6
- // Event Data Types
7
- // ============================================================================
8
-
9
- /**
10
- * Event data structure returned from the API or passed to components
11
- */
12
- export interface EventData {
13
- id: string | number;
14
- name: string;
15
- date: string;
16
- startDateTime?: string;
17
- endDateTime?: string;
18
- image?: string;
19
- description?: string;
20
- venueId?: string | number;
21
- venueID?: string | number;
22
- timeZone?: string;
23
- location?: string;
24
- slug?: string;
25
- status?: 'on_sale' | 'selling_fast' | 'sold_out';
26
- }
27
-
28
- /**
29
- * Ticket data structure
30
- */
31
- export interface TicketData {
32
- id: string | number;
33
- name: string;
34
- price: number;
35
- quantity?: number;
36
- description?: string;
37
- available?: number;
38
- }
39
-
40
- // ============================================================================
41
- // Theme Types
42
- // ============================================================================
43
-
44
- /**
45
- * Theme color configuration using HSL format
46
- * All values should be HSL strings like "217 91% 60%"
47
- */
48
- export interface ThemeColors {
49
- /** Brand primary color */
50
- brandPrimary: string;
51
- /** Primary text color */
52
- textPrimary: string;
53
- /** Secondary text color */
54
- textSecondary: string;
55
- /** Tertiary text color */
56
- textTertiary: string;
57
- /** Primary background color */
58
- bgPrimary: string;
59
- /** Secondary background color */
60
- bgSecondary: string;
61
- /** Quaternary background color */
62
- bgQuaternary: string;
63
- /** Primary stroke/border color */
64
- strokePrimary: string;
65
- /** Secondary stroke/border color */
66
- strokeSecondary: string;
67
- /** On sale status color */
68
- statusOnSale: string;
69
- /** Selling fast status color */
70
- statusSellingFast: string;
71
- /** Sold out status color */
72
- statusSoldOut: string;
73
- /** Today's date background color */
74
- todayBg: string;
75
- /** Today's date text color */
76
- todayText: string;
77
- /** Event dot color for on sale */
78
- eventDotOnSale: string;
79
- /** Event dot color for selling fast */
80
- eventDotSellingFast: string;
81
- /** Event dot color for sold out */
82
- eventDotSoldOut: string;
83
- /** Hover background color */
84
- hoverBg: string;
85
- /** Focus ring color */
86
- focusRing: string;
87
- }
88
-
89
- /**
90
- * Preset themes collection
91
- */
92
- export interface Themes {
93
- light: ThemeColors;
94
- dark: ThemeColors;
95
- highContrast: ThemeColors;
96
- }
97
-
98
- // ============================================================================
99
- // View Option Types
100
- // ============================================================================
101
-
102
- /**
103
- * View option for the calendar view switcher
104
- */
105
- export interface ViewOption {
106
- id: number;
107
- text: string;
108
- icon: string;
109
- ariaLabel?: string;
110
- }
111
-
112
- export type ViewType = 'list' | 'gallery' | 'calendar';
113
-
114
- // ============================================================================
115
- // Component Props Interfaces
116
- // ============================================================================
117
-
118
- /**
119
- * Base options for all init functions
120
- */
121
- export interface BaseInitOptions {
122
- /** CSS selector or HTMLElement to mount the component */
123
- target: string | HTMLElement;
124
- /** The venue ID (optional, default: '1') */
125
- venueId?: string;
126
- /** The organization ID (optional, default: '1') */
127
- organizationId?: string;
128
- }
129
-
130
- /**
131
- * Options for initializing the Venue Calendar component
132
- */
133
- export interface CalendarProps extends BaseInitOptions {
134
- /** Initial view: 'list', 'gallery', or 'calendar' (default: 'calendar') */
135
- view?: ViewType;
136
- /** Array of event objects to display */
137
- events?: EventData[];
138
- /** Whether to show view switcher (default: true) */
139
- showViewOptions?: boolean;
140
- /** Whether to show month navigation (default: true) */
141
- showMonthSwitcher?: boolean;
142
- /** Current month store (Svelte writable store) */
143
- currentMonth?: import('svelte/store').Writable<number>;
144
- /** Current year store (Svelte writable store) */
145
- currentYear?: import('svelte/store').Writable<number>;
146
- /** Handler for navigating to next month */
147
- handleNext?: () => void;
148
- /** Handler for navigating to previous month */
149
- handlePrev?: () => void;
150
- /** Callback function when an event is clicked */
151
- onEventClick?: (event: EventData) => void;
152
- }
153
-
154
- /**
155
- * Options for initializing the Event Details View
156
- */
157
- export interface EventDetailsOptions extends BaseInitOptions {
158
- /** The event ID to display */
159
- eventId: string;
160
- /** Callback when back button is clicked */
161
- onNavigateBack?: () => void;
162
- /** Callback when navigating to cart */
163
- onNavigateToCart?: (eventId: string) => void;
164
- }
165
-
166
- /**
167
- * Success callback data from checkout
168
- */
169
- export interface CheckoutSuccessData {
170
- orderId?: string;
171
- eventId?: string;
172
- event?: EventData;
173
- }
174
-
175
- /**
176
- * Options for initializing the Checkout View
177
- */
178
- export interface CheckoutOptions extends BaseInitOptions {
179
- /** The event ID to display */
180
- eventId: string;
181
- /** The event slug (optional) */
182
- slug?: string;
183
- /** Array of available tickets (optional) */
184
- availableTickets?: TicketData[];
185
- /** Callback when checkout is successful */
186
- onSuccess?: (data: CheckoutSuccessData) => void;
187
- /** Callback when navigating to success page */
188
- onNavigateToSuccess?: (data: CheckoutSuccessData) => void;
189
- }
190
-
191
- /**
192
- * Options for initializing the Success View
193
- */
194
- export interface SuccessViewOptions extends BaseInitOptions {
195
- /** The event ID (optional) */
196
- eventId?: string;
197
- /** The event slug (optional) */
198
- slug?: string;
199
- /** The order ID (optional) */
200
- orderId?: string;
201
- }
202
-
203
- /**
204
- * Alias for CalendarProps for backward compatibility
205
- */
206
- export type InitOptions = CalendarProps;
207
-
208
- // ============================================================================
209
- // Svelte Component Instance
210
- // ============================================================================
211
-
212
- /**
213
- * Svelte component instance returned by init functions
214
- */
215
- export interface SvelteComponentInstance {
216
- /** Destroy the component and clean up */
217
- $destroy?: () => void;
218
- /** Internal cleanup for success listener */
219
- _successCleanup?: () => void;
220
- }
221
-
222
- // ============================================================================
223
- // Exported Functions
224
- // ============================================================================
225
-
226
- /**
227
- * Initialize the Venue Calendar component
228
- * @param options - Configuration options
229
- * @returns The Svelte component instance, or null if target not found
230
- */
231
- export function initVenueCalendar(options: CalendarProps): SvelteComponentInstance | null;
232
-
233
- /**
234
- * Initialize the Event Details View
235
- * @param options - Configuration options
236
- * @returns The Svelte component instance, or null if target not found or eventId missing
237
- */
238
- export function initEventDetailsView(options: EventDetailsOptions): SvelteComponentInstance | null;
239
-
240
- /**
241
- * Initialize the Checkout View
242
- * @param options - Configuration options
243
- * @returns The Svelte component instance, or null if target not found or eventId missing
244
- */
245
- export function initCheckoutView(options: CheckoutOptions): SvelteComponentInstance | null;
246
-
247
- /**
248
- * Alias for initCheckoutView
249
- */
250
- export const initCheckout: typeof initCheckoutView;
251
-
252
- /**
253
- * Initialize the Success View
254
- * @param options - Configuration options
255
- * @returns The Svelte component instance, or null if target not found
256
- */
257
- export function initSuccessView(options: SuccessViewOptions): SvelteComponentInstance | null;
258
-
259
- /**
260
- * Alias for initSuccessView
261
- */
262
- export const initSuccess: typeof initSuccessView;
263
-
264
- /**
265
- * Auto-mount: Automatically finds and mounts calendar to elements with class 'micdrop-calendar-container'
266
- */
267
- export function autoMount(): void;
268
-
269
- // ============================================================================
270
- // Theme Exports
271
- // ============================================================================
272
-
273
- /**
274
- * Collection of preset themes
275
- */
276
- export const themes: Themes;
277
-
278
- /**
279
- * Light theme preset
280
- */
281
- export const lightTheme: ThemeColors;
282
-
283
- /**
284
- * Dark theme preset
285
- */
286
- export const darkTheme: ThemeColors;
287
-
288
- /**
289
- * High contrast theme preset for accessibility
290
- */
291
- export const highContrastTheme: ThemeColors;
292
-
293
- /**
294
- * Apply a theme to the calendar widget
295
- * @param theme - Theme object with HSL color values
296
- * @param container - Optional container element (defaults to document.documentElement)
297
- */
298
- export function applyTheme(theme: Partial<ThemeColors>, container?: HTMLElement): void;
299
-
300
- /**
301
- * Generate CSS string for embedding themes
302
- * @param theme - Theme object
303
- * @returns CSS string with custom properties
304
- */
305
- export function generateThemeCSS(theme: Partial<ThemeColors>): string;
306
-
307
- // ============================================================================
308
- // Svelte Component Exports
309
- // ============================================================================
310
-
311
- /**
312
- * VenueCalendar Svelte component (CalendarContainer)
313
- */
314
- export const VenueCalendar: any;
315
-
316
- /**
317
- * EventDetailsView Svelte component
318
- */
319
- export const EventDetailsView: any;
320
-
321
- /**
322
- * Checkout Svelte component
323
- */
324
- export const Checkout: any;
325
-
326
- /**
327
- * CheckoutView alias for Checkout
328
- */
329
- export const CheckoutView: any;
330
-
331
- /**
332
- * Success Svelte component
333
- */
334
- export const Success: any;
335
-
336
- /**
337
- * EventPage Svelte component — full event page with DateSelectorGrouped, EventMeta, ScarcityBadge, etc.
338
- */
339
- export const EventPage: any;
340
-
341
- /**
342
- * SeriesPage Svelte component — series landing page with hero, upcoming dates, performers, FAQ sidebar
343
- */
344
- export const SeriesPage: any;
345
-
346
- /**
347
- * SeriesHomeView alias (deprecated — use SeriesPage instead)
348
- */
349
- export const SeriesHomeView: any;
350
-
351
- /**
352
- * CollectionView Svelte component
353
- */
354
- export const CollectionView: any;
355
-
356
- // ============================================================================
357
- // Default Export
358
- // ============================================================================
359
-
360
- declare const _default: {
361
- initVenueCalendar: typeof initVenueCalendar;
362
- initEventDetailsView: typeof initEventDetailsView;
363
- initCheckoutView: typeof initCheckoutView;
364
- initCheckout: typeof initCheckoutView;
365
- initSuccessView: typeof initSuccessView;
366
- initSuccess: typeof initSuccessView;
367
- autoMount: typeof autoMount;
368
- VenueCalendar: any;
369
- themes: Themes;
370
- lightTheme: ThemeColors;
371
- darkTheme: ThemeColors;
372
- highContrastTheme: ThemeColors;
373
- applyTheme: typeof applyTheme;
374
- generateThemeCSS: typeof generateThemeCSS;
375
- EventDetailsView: any;
376
- Checkout: any;
377
- CheckoutView: any;
378
- Success: any;
379
- /** @deprecated Use Success instead */
380
- Sucess: any;
381
- EventPage: any;
382
- SeriesPage: any;
383
- SeriesHomeView: any;
384
- CollectionView: any;
385
- };
386
-
387
- export default _default;
1
+ /**
2
+ * TypeScript definitions for @getmicdrop/venue-calendar
3
+ */
4
+
5
+ // ============================================================================
6
+ // Event Data Types
7
+ // ============================================================================
8
+
9
+ /**
10
+ * Event data structure returned from the API or passed to components
11
+ */
12
+ export interface EventData {
13
+ id: string | number;
14
+ name: string;
15
+ date: string;
16
+ startDateTime?: string;
17
+ endDateTime?: string;
18
+ image?: string;
19
+ description?: string;
20
+ venueId?: string | number;
21
+ venueID?: string | number;
22
+ timeZone?: string;
23
+ location?: string;
24
+ slug?: string;
25
+ status?: 'on_sale' | 'selling_fast' | 'sold_out';
26
+ }
27
+
28
+ /**
29
+ * Ticket data structure
30
+ */
31
+ export interface TicketData {
32
+ id: string | number;
33
+ name: string;
34
+ price: number;
35
+ quantity?: number;
36
+ description?: string;
37
+ available?: number;
38
+ }
39
+
40
+ // ============================================================================
41
+ // Theme Types
42
+ // ============================================================================
43
+
44
+ /**
45
+ * Theme color configuration using HSL format
46
+ * All values should be HSL strings like "217 91% 60%"
47
+ */
48
+ export interface ThemeColors {
49
+ /** Brand primary color */
50
+ brandPrimary: string;
51
+ /** Primary text color */
52
+ textPrimary: string;
53
+ /** Secondary text color */
54
+ textSecondary: string;
55
+ /** Tertiary text color */
56
+ textTertiary: string;
57
+ /** Primary background color */
58
+ bgPrimary: string;
59
+ /** Secondary background color */
60
+ bgSecondary: string;
61
+ /** Quaternary background color */
62
+ bgQuaternary: string;
63
+ /** Primary stroke/border color */
64
+ strokePrimary: string;
65
+ /** Secondary stroke/border color */
66
+ strokeSecondary: string;
67
+ /** On sale status color */
68
+ statusOnSale: string;
69
+ /** Selling fast status color */
70
+ statusSellingFast: string;
71
+ /** Sold out status color */
72
+ statusSoldOut: string;
73
+ /** Today's date background color */
74
+ todayBg: string;
75
+ /** Today's date text color */
76
+ todayText: string;
77
+ /** Event dot color for on sale */
78
+ eventDotOnSale: string;
79
+ /** Event dot color for selling fast */
80
+ eventDotSellingFast: string;
81
+ /** Event dot color for sold out */
82
+ eventDotSoldOut: string;
83
+ /** Hover background color */
84
+ hoverBg: string;
85
+ /** Focus ring color */
86
+ focusRing: string;
87
+ }
88
+
89
+ /**
90
+ * Preset themes collection
91
+ */
92
+ export interface Themes {
93
+ light: ThemeColors;
94
+ dark: ThemeColors;
95
+ highContrast: ThemeColors;
96
+ }
97
+
98
+ // ============================================================================
99
+ // View Option Types
100
+ // ============================================================================
101
+
102
+ /**
103
+ * View option for the calendar view switcher
104
+ */
105
+ export interface ViewOption {
106
+ id: number;
107
+ text: string;
108
+ icon: string;
109
+ ariaLabel?: string;
110
+ }
111
+
112
+ export type ViewType = 'list' | 'gallery' | 'calendar';
113
+
114
+ // ============================================================================
115
+ // Component Props Interfaces
116
+ // ============================================================================
117
+
118
+ /**
119
+ * Base options for all init functions
120
+ */
121
+ export interface BaseInitOptions {
122
+ /** CSS selector or HTMLElement to mount the component */
123
+ target: string | HTMLElement;
124
+ /** The venue ID (optional, default: '1') */
125
+ venueId?: string;
126
+ /** The organization ID (optional, default: '1') */
127
+ organizationId?: string;
128
+ }
129
+
130
+ /**
131
+ * Options for initializing the Venue Calendar component
132
+ */
133
+ export interface CalendarProps extends BaseInitOptions {
134
+ /** Initial view: 'list', 'gallery', or 'calendar' (default: 'calendar') */
135
+ view?: ViewType;
136
+ /** Array of event objects to display */
137
+ events?: EventData[];
138
+ /** Whether to show view switcher (default: true) */
139
+ showViewOptions?: boolean;
140
+ /** Whether to show month navigation (default: true) */
141
+ showMonthSwitcher?: boolean;
142
+ /** Current month store (Svelte writable store) */
143
+ currentMonth?: import('svelte/store').Writable<number>;
144
+ /** Current year store (Svelte writable store) */
145
+ currentYear?: import('svelte/store').Writable<number>;
146
+ /** Handler for navigating to next month */
147
+ handleNext?: () => void;
148
+ /** Handler for navigating to previous month */
149
+ handlePrev?: () => void;
150
+ /** Callback function when an event is clicked */
151
+ onEventClick?: (event: EventData) => void;
152
+ }
153
+
154
+ /**
155
+ * Options for initializing the Event Details View
156
+ */
157
+ export interface EventDetailsOptions extends BaseInitOptions {
158
+ /** The event ID to display */
159
+ eventId: string;
160
+ /** Callback when back button is clicked */
161
+ onNavigateBack?: () => void;
162
+ /** Callback when navigating to cart */
163
+ onNavigateToCart?: (eventId: string) => void;
164
+ }
165
+
166
+ /**
167
+ * Success callback data from checkout
168
+ */
169
+ export interface CheckoutSuccessData {
170
+ orderId?: string;
171
+ eventId?: string;
172
+ event?: EventData;
173
+ }
174
+
175
+ /**
176
+ * Options for initializing the Checkout View
177
+ */
178
+ export interface CheckoutOptions extends BaseInitOptions {
179
+ /** The event ID to display */
180
+ eventId: string;
181
+ /** The event slug (optional) */
182
+ slug?: string;
183
+ /** Array of available tickets (optional) */
184
+ availableTickets?: TicketData[];
185
+ /** Callback when checkout is successful */
186
+ onSuccess?: (data: CheckoutSuccessData) => void;
187
+ /** Callback when navigating to success page */
188
+ onNavigateToSuccess?: (data: CheckoutSuccessData) => void;
189
+ }
190
+
191
+ /**
192
+ * Options for initializing the Success View
193
+ */
194
+ export interface SuccessViewOptions extends BaseInitOptions {
195
+ /** The event ID (optional) */
196
+ eventId?: string;
197
+ /** The event slug (optional) */
198
+ slug?: string;
199
+ /** The order ID (optional) */
200
+ orderId?: string;
201
+ }
202
+
203
+ /**
204
+ * Alias for CalendarProps for backward compatibility
205
+ */
206
+ export type InitOptions = CalendarProps;
207
+
208
+ // ============================================================================
209
+ // Svelte Component Instance
210
+ // ============================================================================
211
+
212
+ /**
213
+ * Svelte component instance returned by init functions
214
+ */
215
+ export interface SvelteComponentInstance {
216
+ /** Destroy the component and clean up */
217
+ $destroy?: () => void;
218
+ /** Internal cleanup for success listener */
219
+ _successCleanup?: () => void;
220
+ }
221
+
222
+ // ============================================================================
223
+ // Exported Functions
224
+ // ============================================================================
225
+
226
+ /**
227
+ * Initialize the Venue Calendar component
228
+ * @param options - Configuration options
229
+ * @returns The Svelte component instance, or null if target not found
230
+ */
231
+ export function initVenueCalendar(options: CalendarProps): SvelteComponentInstance | null;
232
+
233
+ /**
234
+ * Initialize the Event Details View
235
+ * @param options - Configuration options
236
+ * @returns The Svelte component instance, or null if target not found or eventId missing
237
+ */
238
+ export function initEventDetailsView(options: EventDetailsOptions): SvelteComponentInstance | null;
239
+
240
+ /**
241
+ * Initialize the Checkout View
242
+ * @param options - Configuration options
243
+ * @returns The Svelte component instance, or null if target not found or eventId missing
244
+ */
245
+ export function initCheckoutView(options: CheckoutOptions): SvelteComponentInstance | null;
246
+
247
+ /**
248
+ * Alias for initCheckoutView
249
+ */
250
+ export const initCheckout: typeof initCheckoutView;
251
+
252
+ /**
253
+ * Initialize the Success View
254
+ * @param options - Configuration options
255
+ * @returns The Svelte component instance, or null if target not found
256
+ */
257
+ export function initSuccessView(options: SuccessViewOptions): SvelteComponentInstance | null;
258
+
259
+ /**
260
+ * Alias for initSuccessView
261
+ */
262
+ export const initSuccess: typeof initSuccessView;
263
+
264
+ /**
265
+ * Auto-mount: Automatically finds and mounts calendar to elements with class 'micdrop-calendar-container'
266
+ */
267
+ export function autoMount(): void;
268
+
269
+ // ============================================================================
270
+ // Theme Exports
271
+ // ============================================================================
272
+
273
+ /**
274
+ * Collection of preset themes
275
+ */
276
+ export const themes: Themes;
277
+
278
+ /**
279
+ * Light theme preset
280
+ */
281
+ export const lightTheme: ThemeColors;
282
+
283
+ /**
284
+ * Dark theme preset
285
+ */
286
+ export const darkTheme: ThemeColors;
287
+
288
+ /**
289
+ * High contrast theme preset for accessibility
290
+ */
291
+ export const highContrastTheme: ThemeColors;
292
+
293
+ /**
294
+ * Apply a theme to the calendar widget
295
+ * @param theme - Theme object with HSL color values
296
+ * @param container - Optional container element (defaults to document.documentElement)
297
+ */
298
+ export function applyTheme(theme: Partial<ThemeColors>, container?: HTMLElement): void;
299
+
300
+ /**
301
+ * Generate CSS string for embedding themes
302
+ * @param theme - Theme object
303
+ * @returns CSS string with custom properties
304
+ */
305
+ export function generateThemeCSS(theme: Partial<ThemeColors>): string;
306
+
307
+ // ============================================================================
308
+ // Svelte Component Exports
309
+ // ============================================================================
310
+
311
+ /**
312
+ * VenueCalendar Svelte component (CalendarContainer)
313
+ */
314
+ export const VenueCalendar: any;
315
+
316
+ /**
317
+ * EventDetailsView Svelte component
318
+ */
319
+ export const EventDetailsView: any;
320
+
321
+ /**
322
+ * Checkout Svelte component
323
+ */
324
+ export const Checkout: any;
325
+
326
+ /**
327
+ * CheckoutView alias for Checkout
328
+ */
329
+ export const CheckoutView: any;
330
+
331
+ /**
332
+ * Success Svelte component
333
+ */
334
+ export const Success: any;
335
+
336
+ /**
337
+ * EventPage Svelte component — full event page with DateSelectorGrouped, EventMeta, ScarcityBadge, etc.
338
+ */
339
+ export const EventPage: any;
340
+
341
+ /**
342
+ * SeriesPage Svelte component — series landing page with hero, upcoming dates, performers, FAQ sidebar
343
+ */
344
+ export const SeriesPage: any;
345
+
346
+ /**
347
+ * SeriesHomeView alias (deprecated — use SeriesPage instead)
348
+ */
349
+ export const SeriesHomeView: any;
350
+
351
+ /**
352
+ * CollectionView Svelte component
353
+ */
354
+ export const CollectionView: any;
355
+
356
+ // ============================================================================
357
+ // Default Export
358
+ // ============================================================================
359
+
360
+ declare const _default: {
361
+ initVenueCalendar: typeof initVenueCalendar;
362
+ initEventDetailsView: typeof initEventDetailsView;
363
+ initCheckoutView: typeof initCheckoutView;
364
+ initCheckout: typeof initCheckoutView;
365
+ initSuccessView: typeof initSuccessView;
366
+ initSuccess: typeof initSuccessView;
367
+ autoMount: typeof autoMount;
368
+ VenueCalendar: any;
369
+ themes: Themes;
370
+ lightTheme: ThemeColors;
371
+ darkTheme: ThemeColors;
372
+ highContrastTheme: ThemeColors;
373
+ applyTheme: typeof applyTheme;
374
+ generateThemeCSS: typeof generateThemeCSS;
375
+ EventDetailsView: any;
376
+ Checkout: any;
377
+ CheckoutView: any;
378
+ Success: any;
379
+ /** @deprecated Use Success instead */
380
+ Sucess: any;
381
+ EventPage: any;
382
+ SeriesPage: any;
383
+ SeriesHomeView: any;
384
+ CollectionView: any;
385
+ };
386
+
387
+ export default _default;