@getmicdrop/venue-calendar 4.0.108 → 4.0.109

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.
Files changed (89) hide show
  1. package/README.md +740 -740
  2. package/dist/CartView-C3N5pw89.js +2381 -0
  3. package/dist/CartView-C3N5pw89.js.map +1 -0
  4. package/dist/{Checkout-C4zUFYYG.js → Checkout-CMEf_qnp.js} +156 -156
  5. package/dist/Checkout-CMEf_qnp.js.map +1 -0
  6. package/dist/{Checkout-CACB_Qvi.js → Checkout-Chki2df_.js} +130 -130
  7. package/dist/Checkout-Chki2df_.js.map +1 -0
  8. package/dist/{CheckoutTimer-D5llSBPs.js → CheckoutTimer-BAaY_60w.js} +5 -5
  9. package/dist/CheckoutTimer-BAaY_60w.js.map +1 -0
  10. package/dist/{ClockIcon-BJnxLZ4f.js → ClockIcon-Dbbj_qur.js} +2 -2
  11. package/dist/ClockIcon-Dbbj_qur.js.map +1 -0
  12. package/dist/{CollectionView-BLpwWRcN.js → CollectionView-RM30YPOJ.js} +24 -24
  13. package/dist/CollectionView-RM30YPOJ.js.map +1 -0
  14. package/dist/{Event-DXp4Ypv4.js → Event-kdxMa6OT.js} +1682 -1602
  15. package/dist/Event-kdxMa6OT.js.map +1 -0
  16. package/dist/EventPage-BRBByBHe.js +1001 -0
  17. package/dist/EventPage-BRBByBHe.js.map +1 -0
  18. package/dist/{Heading-C_Pc_j8f.js → Heading-CSDFD80h.js} +5 -5
  19. package/dist/Heading-CSDFD80h.js.map +1 -0
  20. package/dist/{ScarcityBadge-CSi-i0-w.js → ScarcityBadge-B0ca48su.js} +27 -27
  21. package/dist/ScarcityBadge-B0ca48su.js.map +1 -0
  22. package/dist/{SeriesPage-bPZlyzQ6.js → SeriesPage-CczfbUKO.js} +5 -5
  23. package/dist/SeriesPage-CczfbUKO.js.map +1 -0
  24. package/dist/{Spinner-BFIjCOTb.js → Spinner--TOwvv9A.js} +2 -2
  25. package/dist/Spinner--TOwvv9A.js.map +1 -0
  26. package/dist/{Success-Cv8d2syu.js → Success-DIWUGUPs.js} +29 -29
  27. package/dist/Success-DIWUGUPs.js.map +1 -0
  28. package/dist/{Text-tWGKQJab.js → Text-WLl_ELy9.js} +12 -12
  29. package/dist/Text-WLl_ELy9.js.map +1 -0
  30. package/dist/{VenueCalendar-Dhoi9hF5.js → VenueCalendar-CU5N9klc.js} +4238 -4270
  31. package/dist/VenueCalendar-CU5N9klc.js.map +1 -0
  32. package/dist/{ViewTicketsEmbed-BrXae6cK.js → ViewTicketsEmbed-BOukxQIF.js} +80 -80
  33. package/dist/ViewTicketsEmbed-BOukxQIF.js.map +1 -0
  34. package/dist/api/api/events.d.ts +28 -12
  35. package/dist/api/api/index.d.ts +1 -1
  36. package/dist/api/api/route-manifest.d.ts +179 -0
  37. package/dist/api/api.cjs +1 -1
  38. package/dist/api/api.cjs.map +1 -1
  39. package/dist/api/api.mjs +316 -316
  40. package/dist/api/api.mjs.map +1 -1
  41. package/dist/api/types.d.ts +483 -483
  42. package/dist/{labels-CGndTgO9.js → labels-DXGieQXs.js} +61 -61
  43. package/dist/labels-DXGieQXs.js.map +1 -0
  44. package/dist/{modalManager.svelte-BgW5Xd6y.js → modalManager.svelte-Dbd1xgTQ.js} +2 -2
  45. package/dist/modalManager.svelte-Dbd1xgTQ.js.map +1 -0
  46. package/dist/promo-oWi_MKmY.js +29 -0
  47. package/dist/promo-oWi_MKmY.js.map +1 -0
  48. package/dist/seo/helpers.d.ts +11 -0
  49. package/dist/seo/seo.cjs +1 -1
  50. package/dist/seo/seo.cjs.map +1 -1
  51. package/dist/seo/seo.mjs +170 -179
  52. package/dist/seo/seo.mjs.map +1 -1
  53. package/dist/{showcase-state-options-BxLP2R1L.js → showcase-state-options-DJJdjxvZ.js} +2 -2
  54. package/dist/showcase-state-options-DJJdjxvZ.js.map +1 -0
  55. package/dist/{transform-CVOgA-Ky.js → transform-Bgqwj9i-.js} +38 -38
  56. package/dist/transform-Bgqwj9i-.js.map +1 -0
  57. package/dist/types/index.d.ts +455 -455
  58. package/dist/venue-calendar.css +1 -1
  59. package/dist/venue-calendar.es.js +4 -4
  60. package/dist/venue-calendar.iife.js +50 -50
  61. package/dist/venue-calendar.iife.js.map +1 -1
  62. package/dist/venue-calendar.umd.js +44 -44
  63. package/dist/venue-calendar.umd.js.map +1 -1
  64. package/package.json +199 -195
  65. package/src/lib/theme.js +222 -222
  66. package/dist/CartView-eQNOdQSz.js +0 -2354
  67. package/dist/CartView-eQNOdQSz.js.map +0 -1
  68. package/dist/Checkout-C4zUFYYG.js.map +0 -1
  69. package/dist/Checkout-CACB_Qvi.js.map +0 -1
  70. package/dist/CheckoutTimer-D5llSBPs.js.map +0 -1
  71. package/dist/ClockIcon-BJnxLZ4f.js.map +0 -1
  72. package/dist/CollectionView-BLpwWRcN.js.map +0 -1
  73. package/dist/Event-DXp4Ypv4.js.map +0 -1
  74. package/dist/EventPage-Dfxyzfg2.js +0 -949
  75. package/dist/EventPage-Dfxyzfg2.js.map +0 -1
  76. package/dist/Heading-C_Pc_j8f.js.map +0 -1
  77. package/dist/ScarcityBadge-CSi-i0-w.js.map +0 -1
  78. package/dist/SeriesPage-bPZlyzQ6.js.map +0 -1
  79. package/dist/Spinner-BFIjCOTb.js.map +0 -1
  80. package/dist/Success-Cv8d2syu.js.map +0 -1
  81. package/dist/Text-tWGKQJab.js.map +0 -1
  82. package/dist/VenueCalendar-Dhoi9hF5.js.map +0 -1
  83. package/dist/ViewTicketsEmbed-BrXae6cK.js.map +0 -1
  84. package/dist/labels-CGndTgO9.js.map +0 -1
  85. package/dist/modalManager.svelte-BgW5Xd6y.js.map +0 -1
  86. package/dist/promo-WWbp2OWI.js +0 -12
  87. package/dist/promo-WWbp2OWI.js.map +0 -1
  88. package/dist/showcase-state-options-BxLP2R1L.js.map +0 -1
  89. package/dist/transform-CVOgA-Ky.js.map +0 -1
@@ -1,455 +1,455 @@
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
- /** @deprecated Not rendered — the view switcher shows `text` only. Kept optional for backward compatibility. */
109
- icon?: string;
110
- ariaLabel?: string;
111
- }
112
-
113
- export type ViewType = 'list' | 'gallery' | 'calendar';
114
-
115
- // ============================================================================
116
- // Component Props Interfaces
117
- // ============================================================================
118
-
119
- /**
120
- * Base options for all init functions
121
- */
122
- export interface BaseInitOptions {
123
- /** CSS selector or HTMLElement to mount the component */
124
- target: string | HTMLElement;
125
- /** The venue ID (optional, default: '1') */
126
- venueId?: string;
127
- /** The organization ID (optional, default: '1') */
128
- organizationId?: string;
129
- }
130
-
131
- /**
132
- * Options for initializing the Venue Calendar component
133
- */
134
- export interface CalendarProps extends BaseInitOptions {
135
- /** Initial view: 'list', 'gallery', or 'calendar' (default: 'calendar') */
136
- view?: ViewType;
137
- /** Array of event objects to display */
138
- events?: EventData[];
139
- /** Whether to show view switcher (default: true) */
140
- showViewOptions?: boolean;
141
- /** Whether to show month navigation (default: true) */
142
- showMonthSwitcher?: boolean;
143
- /** Current month store (Svelte writable store) */
144
- currentMonth?: import('svelte/store').Writable<number>;
145
- /** Current year store (Svelte writable store) */
146
- currentYear?: import('svelte/store').Writable<number>;
147
- /** Handler for navigating to next month */
148
- handleNext?: () => void;
149
- /** Handler for navigating to previous month */
150
- handlePrev?: () => void;
151
- /** Callback function when an event is clicked */
152
- onEventClick?: (event: EventData) => void;
153
- /**
154
- * Render the show detail / series / collection IN-PLACE on click + deep
155
- * link instead of navigating the host page (default: true for embeds).
156
- * Pass false to keep the host responsible for navigation, or supply your
157
- * own onEventClick to take over click handling entirely.
158
- */
159
- inlineEntityViews?: boolean;
160
- }
161
-
162
- /**
163
- * Options for initializing the (inline) Event Page.
164
- */
165
- export interface EventPageOptions extends BaseInitOptions {
166
- /** The event ID to display (the page self-fetches), or pass rawEvent. */
167
- eventId?: string | number;
168
- /** Pre-fetched raw event payload (skips the self-fetch). */
169
- rawEvent?: any;
170
- /** Event slug (cosmetic). */
171
- slug?: string;
172
- /** Callback when the back control is clicked. */
173
- onNavigateBack?: () => void;
174
- /** Callback when proceeding to checkout (cart already created). */
175
- onNavigateToCart?: (id: string | number, slug: string, rawEvent: any) => void;
176
- /** Callback when a series occurrence is clicked. */
177
- onBuyTickets?: (eventId: string | number, slug: string) => void;
178
- /** i18n label overrides. */
179
- labels?: Record<string, string>;
180
- }
181
-
182
- /**
183
- * Success callback data from checkout
184
- */
185
- export interface CheckoutSuccessData {
186
- orderId?: string;
187
- eventId?: string;
188
- event?: EventData;
189
- }
190
-
191
- /**
192
- * Options for initializing the Checkout View
193
- */
194
- export interface CheckoutOptions extends BaseInitOptions {
195
- /** The event ID to display */
196
- eventId: string;
197
- /** The event slug (optional) */
198
- slug?: string;
199
- /** Array of available tickets (optional) */
200
- availableTickets?: TicketData[];
201
- /** Callback when checkout is successful */
202
- onSuccess?: (data: CheckoutSuccessData) => void;
203
- /** Callback when navigating to success page */
204
- onNavigateToSuccess?: (data: CheckoutSuccessData) => void;
205
- }
206
-
207
- /**
208
- * Options for initializing the Success View
209
- */
210
- export interface SuccessViewOptions extends BaseInitOptions {
211
- /** The event ID (optional) */
212
- eventId?: string;
213
- /** The event slug (optional) */
214
- slug?: string;
215
- /** The order ID (optional) */
216
- orderId?: string;
217
- }
218
-
219
- /**
220
- * Alias for CalendarProps for backward compatibility
221
- */
222
- export type InitOptions = CalendarProps;
223
-
224
- // ============================================================================
225
- // Svelte Component Instance
226
- // ============================================================================
227
-
228
- /**
229
- * Svelte component instance returned by init functions
230
- */
231
- export interface SvelteComponentInstance {
232
- /** Destroy the component and clean up */
233
- $destroy?: () => void;
234
- /** Internal cleanup for success listener */
235
- _successCleanup?: () => void;
236
- }
237
-
238
- // ============================================================================
239
- // Exported Functions
240
- // ============================================================================
241
-
242
- /**
243
- * Initialize the Venue Calendar component
244
- * @param options - Configuration options
245
- * @returns The Svelte component instance, or null if target not found
246
- */
247
- export function initVenueCalendar(
248
- options: CalendarProps
249
- ): SvelteComponentInstance | null;
250
-
251
- /**
252
- * Initialize the (inline) Event Page.
253
- * @param options - Configuration options
254
- * @returns The Svelte component instance, or null if target not found / no event
255
- */
256
- export function initEventPage(
257
- options: EventPageOptions
258
- ): SvelteComponentInstance | null;
259
-
260
- /**
261
- * Initialize the Checkout View
262
- * @param options - Configuration options
263
- * @returns The Svelte component instance, or null if target not found or eventId missing
264
- */
265
- export function initCheckoutView(
266
- options: CheckoutOptions
267
- ): SvelteComponentInstance | null;
268
-
269
- /**
270
- * Alias for initCheckoutView
271
- */
272
- export const initCheckout: typeof initCheckoutView;
273
-
274
- /**
275
- * Initialize the Success View
276
- * @param options - Configuration options
277
- * @returns The Svelte component instance, or null if target not found
278
- */
279
- export function initSuccessView(
280
- options: SuccessViewOptions
281
- ): SvelteComponentInstance | null;
282
-
283
- /**
284
- * Alias for initSuccessView
285
- */
286
- export const initSuccess: typeof initSuccessView;
287
-
288
- /**
289
- * Auto-mount: Automatically finds and mounts calendar to elements with class 'micdrop-calendar-container'
290
- */
291
- export function autoMount(): void;
292
-
293
- // ============================================================================
294
- // Runtime Configuration
295
- // ============================================================================
296
-
297
- /**
298
- * Opt-in embed integration settings for a venue site embedding the widget.
299
- */
300
- export interface EmbedConfig {
301
- /**
302
- * Emit a MICDROP_CHECKOUT_COMPLETE postMessage when an order completes. The
303
- * payload is non-PII: `{ orderId, eventId }`. Default: false.
304
- */
305
- postMessageOnSuccess?: boolean;
306
- /**
307
- * REQUIRED concrete origin (e.g. 'https://venue.example') for the
308
- * MICDROP_CHECKOUT_COMPLETE message. The message is never posted to '*'; without a
309
- * concrete absolute origin nothing is sent and a warning is logged.
310
- */
311
- postMessageTargetOrigin?: string | null;
312
- }
313
-
314
- /**
315
- * Options for {@link configureVenueCalendar}. All fields are optional — pass
316
- * only the keys you want to change.
317
- */
318
- export interface ConfigureVenueCalendarOptions {
319
- /** Called whenever the widget surfaces a caught error (wire into Sentry/Rollbar/etc). */
320
- onError?: (error: Error, context: { source: string }) => void;
321
- /** Override the backend origin for multi-region setups. */
322
- apiBaseUrl?: string;
323
- /** Request timeout in ms, forwarded to the API client. */
324
- apiTimeout?: number;
325
- /** Retry count, forwarded to the API client. */
326
- apiRetries?: number;
327
- /** Opt-in embed integration settings (see {@link EmbedConfig}). */
328
- embed?: EmbedConfig;
329
- }
330
-
331
- /**
332
- * Configure the calendar widget at runtime: error reporting, API overrides,
333
- * and the opt-in embed integration (e.g. the MICDROP_CHECKOUT_COMPLETE postMessage).
334
- * @param options - Configuration options
335
- */
336
- export function configureVenueCalendar(
337
- options?: ConfigureVenueCalendarOptions
338
- ): void;
339
-
340
- // ============================================================================
341
- // Theme Exports
342
- // ============================================================================
343
-
344
- /**
345
- * Collection of preset themes
346
- */
347
- export const themes: Themes;
348
-
349
- /**
350
- * Light theme preset
351
- */
352
- export const lightTheme: ThemeColors;
353
-
354
- /**
355
- * Dark theme preset
356
- */
357
- export const darkTheme: ThemeColors;
358
-
359
- /**
360
- * High contrast theme preset for accessibility
361
- */
362
- export const highContrastTheme: ThemeColors;
363
-
364
- /**
365
- * Apply a theme to the calendar widget
366
- * @param theme - Theme object with HSL color values
367
- * @param container - Optional container element (defaults to document.documentElement)
368
- */
369
- export function applyTheme(
370
- theme: Partial<ThemeColors>,
371
- container?: HTMLElement
372
- ): void;
373
-
374
- /**
375
- * Generate CSS string for embedding themes
376
- * @param theme - Theme object
377
- * @returns CSS string with custom properties
378
- */
379
- export function generateThemeCSS(theme: Partial<ThemeColors>): string;
380
-
381
- // ============================================================================
382
- // Svelte Component Exports
383
- // ============================================================================
384
-
385
- /**
386
- * VenueCalendar Svelte component (CalendarContainer)
387
- */
388
- export const VenueCalendar: any;
389
-
390
- /**
391
- * Checkout Svelte component
392
- */
393
- export const Checkout: any;
394
-
395
- /**
396
- * CheckoutView alias for Checkout
397
- */
398
- export const CheckoutView: any;
399
-
400
- /**
401
- * Success Svelte component
402
- */
403
- export const Success: any;
404
-
405
- /**
406
- * EventPage Svelte component — full event page with DateSelectorGrouped, EventMeta, ScarcityBadge, etc.
407
- */
408
- export const EventPage: any;
409
-
410
- /**
411
- * SeriesPage Svelte component — series landing page with hero, upcoming dates, performers, FAQ sidebar
412
- */
413
- export const SeriesPage: any;
414
-
415
- /**
416
- * SeriesHomeView alias (deprecated — use SeriesPage instead)
417
- */
418
- export const SeriesHomeView: any;
419
-
420
- /**
421
- * CollectionView Svelte component
422
- */
423
- export const CollectionView: any;
424
-
425
- // ============================================================================
426
- // Default Export
427
- // ============================================================================
428
-
429
- declare const _default: {
430
- initVenueCalendar: typeof initVenueCalendar;
431
- initEventPage: typeof initEventPage;
432
- initCheckoutView: typeof initCheckoutView;
433
- initCheckout: typeof initCheckoutView;
434
- initSuccessView: typeof initSuccessView;
435
- initSuccess: typeof initSuccessView;
436
- autoMount: typeof autoMount;
437
- VenueCalendar: any;
438
- themes: Themes;
439
- lightTheme: ThemeColors;
440
- darkTheme: ThemeColors;
441
- highContrastTheme: ThemeColors;
442
- applyTheme: typeof applyTheme;
443
- generateThemeCSS: typeof generateThemeCSS;
444
- Checkout: any;
445
- CheckoutView: any;
446
- Success: any;
447
- /** @deprecated Use Success instead */
448
- Sucess: any;
449
- EventPage: any;
450
- SeriesPage: any;
451
- SeriesHomeView: any;
452
- CollectionView: any;
453
- };
454
-
455
- 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
+ /** @deprecated Not rendered — the view switcher shows `text` only. Kept optional for backward compatibility. */
109
+ icon?: string;
110
+ ariaLabel?: string;
111
+ }
112
+
113
+ export type ViewType = 'list' | 'gallery' | 'calendar';
114
+
115
+ // ============================================================================
116
+ // Component Props Interfaces
117
+ // ============================================================================
118
+
119
+ /**
120
+ * Base options for all init functions
121
+ */
122
+ export interface BaseInitOptions {
123
+ /** CSS selector or HTMLElement to mount the component */
124
+ target: string | HTMLElement;
125
+ /** The venue ID (optional, default: '1') */
126
+ venueId?: string;
127
+ /** The organization ID (optional, default: '1') */
128
+ organizationId?: string;
129
+ }
130
+
131
+ /**
132
+ * Options for initializing the Venue Calendar component
133
+ */
134
+ export interface CalendarProps extends BaseInitOptions {
135
+ /** Initial view: 'list', 'gallery', or 'calendar' (default: 'calendar') */
136
+ view?: ViewType;
137
+ /** Array of event objects to display */
138
+ events?: EventData[];
139
+ /** Whether to show view switcher (default: true) */
140
+ showViewOptions?: boolean;
141
+ /** Whether to show month navigation (default: true) */
142
+ showMonthSwitcher?: boolean;
143
+ /** Current month store (Svelte writable store) */
144
+ currentMonth?: import('svelte/store').Writable<number>;
145
+ /** Current year store (Svelte writable store) */
146
+ currentYear?: import('svelte/store').Writable<number>;
147
+ /** Handler for navigating to next month */
148
+ handleNext?: () => void;
149
+ /** Handler for navigating to previous month */
150
+ handlePrev?: () => void;
151
+ /** Callback function when an event is clicked */
152
+ onEventClick?: (event: EventData) => void;
153
+ /**
154
+ * Render the show detail / series / collection IN-PLACE on click + deep
155
+ * link instead of navigating the host page (default: true for embeds).
156
+ * Pass false to keep the host responsible for navigation, or supply your
157
+ * own onEventClick to take over click handling entirely.
158
+ */
159
+ inlineEntityViews?: boolean;
160
+ }
161
+
162
+ /**
163
+ * Options for initializing the (inline) Event Page.
164
+ */
165
+ export interface EventPageOptions extends BaseInitOptions {
166
+ /** The event ID to display (the page self-fetches), or pass rawEvent. */
167
+ eventId?: string | number;
168
+ /** Pre-fetched raw event payload (skips the self-fetch). */
169
+ rawEvent?: any;
170
+ /** Event slug (cosmetic). */
171
+ slug?: string;
172
+ /** Callback when the back control is clicked. */
173
+ onNavigateBack?: () => void;
174
+ /** Callback when proceeding to checkout (cart already created). */
175
+ onNavigateToCart?: (id: string | number, slug: string, rawEvent: any) => void;
176
+ /** Callback when a series occurrence is clicked. */
177
+ onBuyTickets?: (eventId: string | number, slug: string) => void;
178
+ /** i18n label overrides. */
179
+ labels?: Record<string, string>;
180
+ }
181
+
182
+ /**
183
+ * Success callback data from checkout
184
+ */
185
+ export interface CheckoutSuccessData {
186
+ orderId?: string;
187
+ eventId?: string;
188
+ event?: EventData;
189
+ }
190
+
191
+ /**
192
+ * Options for initializing the Checkout View
193
+ */
194
+ export interface CheckoutOptions extends BaseInitOptions {
195
+ /** The event ID to display */
196
+ eventId: string;
197
+ /** The event slug (optional) */
198
+ slug?: string;
199
+ /** Array of available tickets (optional) */
200
+ availableTickets?: TicketData[];
201
+ /** Callback when checkout is successful */
202
+ onSuccess?: (data: CheckoutSuccessData) => void;
203
+ /** Callback when navigating to success page */
204
+ onNavigateToSuccess?: (data: CheckoutSuccessData) => void;
205
+ }
206
+
207
+ /**
208
+ * Options for initializing the Success View
209
+ */
210
+ export interface SuccessViewOptions extends BaseInitOptions {
211
+ /** The event ID (optional) */
212
+ eventId?: string;
213
+ /** The event slug (optional) */
214
+ slug?: string;
215
+ /** The order ID (optional) */
216
+ orderId?: string;
217
+ }
218
+
219
+ /**
220
+ * Alias for CalendarProps for backward compatibility
221
+ */
222
+ export type InitOptions = CalendarProps;
223
+
224
+ // ============================================================================
225
+ // Svelte Component Instance
226
+ // ============================================================================
227
+
228
+ /**
229
+ * Svelte component instance returned by init functions
230
+ */
231
+ export interface SvelteComponentInstance {
232
+ /** Destroy the component and clean up */
233
+ $destroy?: () => void;
234
+ /** Internal cleanup for success listener */
235
+ _successCleanup?: () => void;
236
+ }
237
+
238
+ // ============================================================================
239
+ // Exported Functions
240
+ // ============================================================================
241
+
242
+ /**
243
+ * Initialize the Venue Calendar component
244
+ * @param options - Configuration options
245
+ * @returns The Svelte component instance, or null if target not found
246
+ */
247
+ export function initVenueCalendar(
248
+ options: CalendarProps
249
+ ): SvelteComponentInstance | null;
250
+
251
+ /**
252
+ * Initialize the (inline) Event Page.
253
+ * @param options - Configuration options
254
+ * @returns The Svelte component instance, or null if target not found / no event
255
+ */
256
+ export function initEventPage(
257
+ options: EventPageOptions
258
+ ): SvelteComponentInstance | null;
259
+
260
+ /**
261
+ * Initialize the Checkout View
262
+ * @param options - Configuration options
263
+ * @returns The Svelte component instance, or null if target not found or eventId missing
264
+ */
265
+ export function initCheckoutView(
266
+ options: CheckoutOptions
267
+ ): SvelteComponentInstance | null;
268
+
269
+ /**
270
+ * Alias for initCheckoutView
271
+ */
272
+ export const initCheckout: typeof initCheckoutView;
273
+
274
+ /**
275
+ * Initialize the Success View
276
+ * @param options - Configuration options
277
+ * @returns The Svelte component instance, or null if target not found
278
+ */
279
+ export function initSuccessView(
280
+ options: SuccessViewOptions
281
+ ): SvelteComponentInstance | null;
282
+
283
+ /**
284
+ * Alias for initSuccessView
285
+ */
286
+ export const initSuccess: typeof initSuccessView;
287
+
288
+ /**
289
+ * Auto-mount: Automatically finds and mounts calendar to elements with class 'micdrop-calendar-container'
290
+ */
291
+ export function autoMount(): void;
292
+
293
+ // ============================================================================
294
+ // Runtime Configuration
295
+ // ============================================================================
296
+
297
+ /**
298
+ * Opt-in embed integration settings for a venue site embedding the widget.
299
+ */
300
+ export interface EmbedConfig {
301
+ /**
302
+ * Emit a MICDROP_CHECKOUT_COMPLETE postMessage when an order completes. The
303
+ * payload is non-PII: `{ orderId, eventId }`. Default: false.
304
+ */
305
+ postMessageOnSuccess?: boolean;
306
+ /**
307
+ * REQUIRED concrete origin (e.g. 'https://venue.example') for the
308
+ * MICDROP_CHECKOUT_COMPLETE message. The message is never posted to '*'; without a
309
+ * concrete absolute origin nothing is sent and a warning is logged.
310
+ */
311
+ postMessageTargetOrigin?: string | null;
312
+ }
313
+
314
+ /**
315
+ * Options for {@link configureVenueCalendar}. All fields are optional — pass
316
+ * only the keys you want to change.
317
+ */
318
+ export interface ConfigureVenueCalendarOptions {
319
+ /** Called whenever the widget surfaces a caught error (wire into Sentry/Rollbar/etc). */
320
+ onError?: (error: Error, context: { source: string }) => void;
321
+ /** Override the backend origin for multi-region setups. */
322
+ apiBaseUrl?: string;
323
+ /** Request timeout in ms, forwarded to the API client. */
324
+ apiTimeout?: number;
325
+ /** Retry count, forwarded to the API client. */
326
+ apiRetries?: number;
327
+ /** Opt-in embed integration settings (see {@link EmbedConfig}). */
328
+ embed?: EmbedConfig;
329
+ }
330
+
331
+ /**
332
+ * Configure the calendar widget at runtime: error reporting, API overrides,
333
+ * and the opt-in embed integration (e.g. the MICDROP_CHECKOUT_COMPLETE postMessage).
334
+ * @param options - Configuration options
335
+ */
336
+ export function configureVenueCalendar(
337
+ options?: ConfigureVenueCalendarOptions
338
+ ): void;
339
+
340
+ // ============================================================================
341
+ // Theme Exports
342
+ // ============================================================================
343
+
344
+ /**
345
+ * Collection of preset themes
346
+ */
347
+ export const themes: Themes;
348
+
349
+ /**
350
+ * Light theme preset
351
+ */
352
+ export const lightTheme: ThemeColors;
353
+
354
+ /**
355
+ * Dark theme preset
356
+ */
357
+ export const darkTheme: ThemeColors;
358
+
359
+ /**
360
+ * High contrast theme preset for accessibility
361
+ */
362
+ export const highContrastTheme: ThemeColors;
363
+
364
+ /**
365
+ * Apply a theme to the calendar widget
366
+ * @param theme - Theme object with HSL color values
367
+ * @param container - Optional container element (defaults to document.documentElement)
368
+ */
369
+ export function applyTheme(
370
+ theme: Partial<ThemeColors>,
371
+ container?: HTMLElement
372
+ ): void;
373
+
374
+ /**
375
+ * Generate CSS string for embedding themes
376
+ * @param theme - Theme object
377
+ * @returns CSS string with custom properties
378
+ */
379
+ export function generateThemeCSS(theme: Partial<ThemeColors>): string;
380
+
381
+ // ============================================================================
382
+ // Svelte Component Exports
383
+ // ============================================================================
384
+
385
+ /**
386
+ * VenueCalendar Svelte component (CalendarContainer)
387
+ */
388
+ export const VenueCalendar: any;
389
+
390
+ /**
391
+ * Checkout Svelte component
392
+ */
393
+ export const Checkout: any;
394
+
395
+ /**
396
+ * CheckoutView alias for Checkout
397
+ */
398
+ export const CheckoutView: any;
399
+
400
+ /**
401
+ * Success Svelte component
402
+ */
403
+ export const Success: any;
404
+
405
+ /**
406
+ * EventPage Svelte component — full event page with DateSelectorGrouped, EventMeta, ScarcityBadge, etc.
407
+ */
408
+ export const EventPage: any;
409
+
410
+ /**
411
+ * SeriesPage Svelte component — series landing page with hero, upcoming dates, performers, FAQ sidebar
412
+ */
413
+ export const SeriesPage: any;
414
+
415
+ /**
416
+ * SeriesHomeView alias (deprecated — use SeriesPage instead)
417
+ */
418
+ export const SeriesHomeView: any;
419
+
420
+ /**
421
+ * CollectionView Svelte component
422
+ */
423
+ export const CollectionView: any;
424
+
425
+ // ============================================================================
426
+ // Default Export
427
+ // ============================================================================
428
+
429
+ declare const _default: {
430
+ initVenueCalendar: typeof initVenueCalendar;
431
+ initEventPage: typeof initEventPage;
432
+ initCheckoutView: typeof initCheckoutView;
433
+ initCheckout: typeof initCheckoutView;
434
+ initSuccessView: typeof initSuccessView;
435
+ initSuccess: typeof initSuccessView;
436
+ autoMount: typeof autoMount;
437
+ VenueCalendar: any;
438
+ themes: Themes;
439
+ lightTheme: ThemeColors;
440
+ darkTheme: ThemeColors;
441
+ highContrastTheme: ThemeColors;
442
+ applyTheme: typeof applyTheme;
443
+ generateThemeCSS: typeof generateThemeCSS;
444
+ Checkout: any;
445
+ CheckoutView: any;
446
+ Success: any;
447
+ /** @deprecated Use Success instead */
448
+ Sucess: any;
449
+ EventPage: any;
450
+ SeriesPage: any;
451
+ SeriesHomeView: any;
452
+ CollectionView: any;
453
+ };
454
+
455
+ export default _default;