@getmicdrop/venue-calendar 4.0.93 → 4.0.95

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 (86) hide show
  1. package/README.md +740 -740
  2. package/dist/CartView-Cq0DU1Cy.js +2385 -0
  3. package/dist/CartView-Cq0DU1Cy.js.map +1 -0
  4. package/dist/Checkout-BA43iGDc.js +1745 -0
  5. package/dist/Checkout-BA43iGDc.js.map +1 -0
  6. package/dist/{Checkout-BUwdMMjA.js → Checkout-BV5f49vY.js} +268 -268
  7. package/dist/Checkout-BV5f49vY.js.map +1 -0
  8. package/dist/{CheckoutTimer-C_ax1Uo2.js → CheckoutTimer-KyKyInco.js} +5 -5
  9. package/dist/CheckoutTimer-KyKyInco.js.map +1 -0
  10. package/dist/{ClockIcon-C5muTIYL.js → ClockIcon-BD24dBol.js} +2 -2
  11. package/dist/ClockIcon-BD24dBol.js.map +1 -0
  12. package/dist/{CollectionView-3MHrh5Zm.js → CollectionView-CKIxku9-.js} +18 -18
  13. package/dist/CollectionView-CKIxku9-.js.map +1 -0
  14. package/dist/{Event-vR1aE543.js → Event-BPdt1Io5.js} +1051 -1052
  15. package/dist/Event-BPdt1Io5.js.map +1 -0
  16. package/dist/EventPage-DRnTMGTK.js +575 -0
  17. package/dist/EventPage-DRnTMGTK.js.map +1 -0
  18. package/dist/{Heading-ZcvybCi8.js → Heading-pQuVpBrL.js} +2 -2
  19. package/dist/Heading-pQuVpBrL.js.map +1 -0
  20. package/dist/{ScarcityBadge-CjTFAhat.js → ScarcityBadge-DoYdujCs.js} +10 -10
  21. package/dist/ScarcityBadge-DoYdujCs.js.map +1 -0
  22. package/dist/{SeriesPage-DTEY83yR.js → SeriesPage-vw7Hva9F.js} +7 -7
  23. package/dist/SeriesPage-vw7Hva9F.js.map +1 -0
  24. package/dist/{Spinner--YBVljiP.js → Spinner-BfFZMaDP.js} +5 -5
  25. package/dist/Spinner-BfFZMaDP.js.map +1 -0
  26. package/dist/Success-Cjj6CC4w.js +862 -0
  27. package/dist/Success-Cjj6CC4w.js.map +1 -0
  28. package/dist/{Text-SlV9H-GU.js → Text-CT79Zi5n.js} +2 -2
  29. package/dist/Text-CT79Zi5n.js.map +1 -0
  30. package/dist/{VenueCalendar-Bth_j-Wp.js → VenueCalendar-Cz7_VBC6.js} +2548 -2563
  31. package/dist/VenueCalendar-Cz7_VBC6.js.map +1 -0
  32. package/dist/{ViewTicketsEmbed-D7g7RYZI.js → ViewTicketsEmbed-BvCfoKY3.js} +116 -128
  33. package/dist/ViewTicketsEmbed-BvCfoKY3.js.map +1 -0
  34. package/dist/api/api/events.d.ts +18 -0
  35. package/dist/api/api/gift-cards.d.ts +19 -0
  36. package/dist/api/api/index.d.ts +2 -2
  37. package/dist/api/api/result.d.ts +31 -1
  38. package/dist/api/api.cjs +1 -1
  39. package/dist/api/api.cjs.map +1 -1
  40. package/dist/api/api.mjs +312 -304
  41. package/dist/api/api.mjs.map +1 -1
  42. package/dist/api/types.d.ts +447 -447
  43. package/dist/{data-toggle-store.svelte-CFAVM8I0.js → data-toggle-store.svelte-BHwbM34q.js} +2 -2
  44. package/dist/data-toggle-store.svelte-BHwbM34q.js.map +1 -0
  45. package/dist/{labels-CnpAWtkz.js → labels-_x9WkVuZ.js} +151 -152
  46. package/dist/labels-_x9WkVuZ.js.map +1 -0
  47. package/dist/{modalManager.svelte-T2RGHhZH.js → modalManager.svelte-Csm1WlvP.js} +2 -2
  48. package/dist/modalManager.svelte-Csm1WlvP.js.map +1 -0
  49. package/dist/seo/seo.cjs.map +1 -1
  50. package/dist/seo/seo.mjs.map +1 -1
  51. package/dist/transform-WRPgSKLN.js +360 -0
  52. package/dist/transform-WRPgSKLN.js.map +1 -0
  53. package/dist/types/index.d.ts +454 -454
  54. package/dist/venue-calendar.css +1 -1
  55. package/dist/venue-calendar.es.js +11 -11
  56. package/dist/venue-calendar.iife.js +44 -44
  57. package/dist/venue-calendar.iife.js.map +1 -1
  58. package/dist/venue-calendar.umd.js +42 -42
  59. package/dist/venue-calendar.umd.js.map +1 -1
  60. package/package.json +2 -2
  61. package/src/lib/theme.js +222 -222
  62. package/dist/CartView-R5Z2q4Hy.js +0 -2380
  63. package/dist/CartView-R5Z2q4Hy.js.map +0 -1
  64. package/dist/Checkout-BUwdMMjA.js.map +0 -1
  65. package/dist/Checkout-avoTg_Zw.js +0 -1742
  66. package/dist/Checkout-avoTg_Zw.js.map +0 -1
  67. package/dist/CheckoutTimer-C_ax1Uo2.js.map +0 -1
  68. package/dist/ClockIcon-C5muTIYL.js.map +0 -1
  69. package/dist/CollectionView-3MHrh5Zm.js.map +0 -1
  70. package/dist/Event-vR1aE543.js.map +0 -1
  71. package/dist/EventPage-Bhg-8-5x.js +0 -566
  72. package/dist/EventPage-Bhg-8-5x.js.map +0 -1
  73. package/dist/Heading-ZcvybCi8.js.map +0 -1
  74. package/dist/ScarcityBadge-CjTFAhat.js.map +0 -1
  75. package/dist/SeriesPage-DTEY83yR.js.map +0 -1
  76. package/dist/Spinner--YBVljiP.js.map +0 -1
  77. package/dist/Success-ClCvTxTH.js +0 -848
  78. package/dist/Success-ClCvTxTH.js.map +0 -1
  79. package/dist/Text-SlV9H-GU.js.map +0 -1
  80. package/dist/VenueCalendar-Bth_j-Wp.js.map +0 -1
  81. package/dist/ViewTicketsEmbed-D7g7RYZI.js.map +0 -1
  82. package/dist/data-toggle-store.svelte-CFAVM8I0.js.map +0 -1
  83. package/dist/labels-CnpAWtkz.js.map +0 -1
  84. package/dist/modalManager.svelte-T2RGHhZH.js.map +0 -1
  85. package/dist/transform-C3TwZSH6.js +0 -349
  86. package/dist/transform-C3TwZSH6.js.map +0 -1
@@ -1,454 +1,454 @@
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
- * Render the show detail / series / collection IN-PLACE on click + deep
154
- * link instead of navigating the host page (default: true for embeds).
155
- * Pass false to keep the host responsible for navigation, or supply your
156
- * own onEventClick to take over click handling entirely.
157
- */
158
- inlineEntityViews?: boolean;
159
- }
160
-
161
- /**
162
- * Options for initializing the (inline) Event Page.
163
- */
164
- export interface EventPageOptions extends BaseInitOptions {
165
- /** The event ID to display (the page self-fetches), or pass rawEvent. */
166
- eventId?: string | number;
167
- /** Pre-fetched raw event payload (skips the self-fetch). */
168
- rawEvent?: any;
169
- /** Event slug (cosmetic). */
170
- slug?: string;
171
- /** Callback when the back control is clicked. */
172
- onNavigateBack?: () => void;
173
- /** Callback when proceeding to checkout (cart already created). */
174
- onNavigateToCart?: (id: string | number, slug: string, rawEvent: any) => void;
175
- /** Callback when a series occurrence is clicked. */
176
- onBuyTickets?: (eventId: string | number, slug: string) => void;
177
- /** i18n label overrides. */
178
- labels?: Record<string, string>;
179
- }
180
-
181
- /**
182
- * Success callback data from checkout
183
- */
184
- export interface CheckoutSuccessData {
185
- orderId?: string;
186
- eventId?: string;
187
- event?: EventData;
188
- }
189
-
190
- /**
191
- * Options for initializing the Checkout View
192
- */
193
- export interface CheckoutOptions extends BaseInitOptions {
194
- /** The event ID to display */
195
- eventId: string;
196
- /** The event slug (optional) */
197
- slug?: string;
198
- /** Array of available tickets (optional) */
199
- availableTickets?: TicketData[];
200
- /** Callback when checkout is successful */
201
- onSuccess?: (data: CheckoutSuccessData) => void;
202
- /** Callback when navigating to success page */
203
- onNavigateToSuccess?: (data: CheckoutSuccessData) => void;
204
- }
205
-
206
- /**
207
- * Options for initializing the Success View
208
- */
209
- export interface SuccessViewOptions extends BaseInitOptions {
210
- /** The event ID (optional) */
211
- eventId?: string;
212
- /** The event slug (optional) */
213
- slug?: string;
214
- /** The order ID (optional) */
215
- orderId?: string;
216
- }
217
-
218
- /**
219
- * Alias for CalendarProps for backward compatibility
220
- */
221
- export type InitOptions = CalendarProps;
222
-
223
- // ============================================================================
224
- // Svelte Component Instance
225
- // ============================================================================
226
-
227
- /**
228
- * Svelte component instance returned by init functions
229
- */
230
- export interface SvelteComponentInstance {
231
- /** Destroy the component and clean up */
232
- $destroy?: () => void;
233
- /** Internal cleanup for success listener */
234
- _successCleanup?: () => void;
235
- }
236
-
237
- // ============================================================================
238
- // Exported Functions
239
- // ============================================================================
240
-
241
- /**
242
- * Initialize the Venue Calendar component
243
- * @param options - Configuration options
244
- * @returns The Svelte component instance, or null if target not found
245
- */
246
- export function initVenueCalendar(
247
- options: CalendarProps
248
- ): SvelteComponentInstance | null;
249
-
250
- /**
251
- * Initialize the (inline) Event Page.
252
- * @param options - Configuration options
253
- * @returns The Svelte component instance, or null if target not found / no event
254
- */
255
- export function initEventPage(
256
- options: EventPageOptions
257
- ): SvelteComponentInstance | null;
258
-
259
- /**
260
- * Initialize the Checkout View
261
- * @param options - Configuration options
262
- * @returns The Svelte component instance, or null if target not found or eventId missing
263
- */
264
- export function initCheckoutView(
265
- options: CheckoutOptions
266
- ): SvelteComponentInstance | null;
267
-
268
- /**
269
- * Alias for initCheckoutView
270
- */
271
- export const initCheckout: typeof initCheckoutView;
272
-
273
- /**
274
- * Initialize the Success View
275
- * @param options - Configuration options
276
- * @returns The Svelte component instance, or null if target not found
277
- */
278
- export function initSuccessView(
279
- options: SuccessViewOptions
280
- ): SvelteComponentInstance | null;
281
-
282
- /**
283
- * Alias for initSuccessView
284
- */
285
- export const initSuccess: typeof initSuccessView;
286
-
287
- /**
288
- * Auto-mount: Automatically finds and mounts calendar to elements with class 'micdrop-calendar-container'
289
- */
290
- export function autoMount(): void;
291
-
292
- // ============================================================================
293
- // Runtime Configuration
294
- // ============================================================================
295
-
296
- /**
297
- * Opt-in embed integration settings for a venue site embedding the widget.
298
- */
299
- export interface EmbedConfig {
300
- /**
301
- * Emit a MICDROP_CHECKOUT_COMPLETE postMessage when an order completes. The
302
- * payload is non-PII: `{ orderId, eventId }`. Default: false.
303
- */
304
- postMessageOnSuccess?: boolean;
305
- /**
306
- * REQUIRED concrete origin (e.g. 'https://venue.example') for the
307
- * MICDROP_CHECKOUT_COMPLETE message. The message is never posted to '*'; without a
308
- * concrete absolute origin nothing is sent and a warning is logged.
309
- */
310
- postMessageTargetOrigin?: string | null;
311
- }
312
-
313
- /**
314
- * Options for {@link configureVenueCalendar}. All fields are optional — pass
315
- * only the keys you want to change.
316
- */
317
- export interface ConfigureVenueCalendarOptions {
318
- /** Called whenever the widget surfaces a caught error (wire into Sentry/Rollbar/etc). */
319
- onError?: (error: Error, context: { source: string }) => void;
320
- /** Override the backend origin for multi-region setups. */
321
- apiBaseUrl?: string;
322
- /** Request timeout in ms, forwarded to the API client. */
323
- apiTimeout?: number;
324
- /** Retry count, forwarded to the API client. */
325
- apiRetries?: number;
326
- /** Opt-in embed integration settings (see {@link EmbedConfig}). */
327
- embed?: EmbedConfig;
328
- }
329
-
330
- /**
331
- * Configure the calendar widget at runtime: error reporting, API overrides,
332
- * and the opt-in embed integration (e.g. the MICDROP_CHECKOUT_COMPLETE postMessage).
333
- * @param options - Configuration options
334
- */
335
- export function configureVenueCalendar(
336
- options?: ConfigureVenueCalendarOptions
337
- ): void;
338
-
339
- // ============================================================================
340
- // Theme Exports
341
- // ============================================================================
342
-
343
- /**
344
- * Collection of preset themes
345
- */
346
- export const themes: Themes;
347
-
348
- /**
349
- * Light theme preset
350
- */
351
- export const lightTheme: ThemeColors;
352
-
353
- /**
354
- * Dark theme preset
355
- */
356
- export const darkTheme: ThemeColors;
357
-
358
- /**
359
- * High contrast theme preset for accessibility
360
- */
361
- export const highContrastTheme: ThemeColors;
362
-
363
- /**
364
- * Apply a theme to the calendar widget
365
- * @param theme - Theme object with HSL color values
366
- * @param container - Optional container element (defaults to document.documentElement)
367
- */
368
- export function applyTheme(
369
- theme: Partial<ThemeColors>,
370
- container?: HTMLElement
371
- ): void;
372
-
373
- /**
374
- * Generate CSS string for embedding themes
375
- * @param theme - Theme object
376
- * @returns CSS string with custom properties
377
- */
378
- export function generateThemeCSS(theme: Partial<ThemeColors>): string;
379
-
380
- // ============================================================================
381
- // Svelte Component Exports
382
- // ============================================================================
383
-
384
- /**
385
- * VenueCalendar Svelte component (CalendarContainer)
386
- */
387
- export const VenueCalendar: any;
388
-
389
- /**
390
- * Checkout Svelte component
391
- */
392
- export const Checkout: any;
393
-
394
- /**
395
- * CheckoutView alias for Checkout
396
- */
397
- export const CheckoutView: any;
398
-
399
- /**
400
- * Success Svelte component
401
- */
402
- export const Success: any;
403
-
404
- /**
405
- * EventPage Svelte component — full event page with DateSelectorGrouped, EventMeta, ScarcityBadge, etc.
406
- */
407
- export const EventPage: any;
408
-
409
- /**
410
- * SeriesPage Svelte component — series landing page with hero, upcoming dates, performers, FAQ sidebar
411
- */
412
- export const SeriesPage: any;
413
-
414
- /**
415
- * SeriesHomeView alias (deprecated — use SeriesPage instead)
416
- */
417
- export const SeriesHomeView: any;
418
-
419
- /**
420
- * CollectionView Svelte component
421
- */
422
- export const CollectionView: any;
423
-
424
- // ============================================================================
425
- // Default Export
426
- // ============================================================================
427
-
428
- declare const _default: {
429
- initVenueCalendar: typeof initVenueCalendar;
430
- initEventPage: typeof initEventPage;
431
- initCheckoutView: typeof initCheckoutView;
432
- initCheckout: typeof initCheckoutView;
433
- initSuccessView: typeof initSuccessView;
434
- initSuccess: typeof initSuccessView;
435
- autoMount: typeof autoMount;
436
- VenueCalendar: any;
437
- themes: Themes;
438
- lightTheme: ThemeColors;
439
- darkTheme: ThemeColors;
440
- highContrastTheme: ThemeColors;
441
- applyTheme: typeof applyTheme;
442
- generateThemeCSS: typeof generateThemeCSS;
443
- Checkout: any;
444
- CheckoutView: any;
445
- Success: any;
446
- /** @deprecated Use Success instead */
447
- Sucess: any;
448
- EventPage: any;
449
- SeriesPage: any;
450
- SeriesHomeView: any;
451
- CollectionView: any;
452
- };
453
-
454
- 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
+ * Render the show detail / series / collection IN-PLACE on click + deep
154
+ * link instead of navigating the host page (default: true for embeds).
155
+ * Pass false to keep the host responsible for navigation, or supply your
156
+ * own onEventClick to take over click handling entirely.
157
+ */
158
+ inlineEntityViews?: boolean;
159
+ }
160
+
161
+ /**
162
+ * Options for initializing the (inline) Event Page.
163
+ */
164
+ export interface EventPageOptions extends BaseInitOptions {
165
+ /** The event ID to display (the page self-fetches), or pass rawEvent. */
166
+ eventId?: string | number;
167
+ /** Pre-fetched raw event payload (skips the self-fetch). */
168
+ rawEvent?: any;
169
+ /** Event slug (cosmetic). */
170
+ slug?: string;
171
+ /** Callback when the back control is clicked. */
172
+ onNavigateBack?: () => void;
173
+ /** Callback when proceeding to checkout (cart already created). */
174
+ onNavigateToCart?: (id: string | number, slug: string, rawEvent: any) => void;
175
+ /** Callback when a series occurrence is clicked. */
176
+ onBuyTickets?: (eventId: string | number, slug: string) => void;
177
+ /** i18n label overrides. */
178
+ labels?: Record<string, string>;
179
+ }
180
+
181
+ /**
182
+ * Success callback data from checkout
183
+ */
184
+ export interface CheckoutSuccessData {
185
+ orderId?: string;
186
+ eventId?: string;
187
+ event?: EventData;
188
+ }
189
+
190
+ /**
191
+ * Options for initializing the Checkout View
192
+ */
193
+ export interface CheckoutOptions extends BaseInitOptions {
194
+ /** The event ID to display */
195
+ eventId: string;
196
+ /** The event slug (optional) */
197
+ slug?: string;
198
+ /** Array of available tickets (optional) */
199
+ availableTickets?: TicketData[];
200
+ /** Callback when checkout is successful */
201
+ onSuccess?: (data: CheckoutSuccessData) => void;
202
+ /** Callback when navigating to success page */
203
+ onNavigateToSuccess?: (data: CheckoutSuccessData) => void;
204
+ }
205
+
206
+ /**
207
+ * Options for initializing the Success View
208
+ */
209
+ export interface SuccessViewOptions extends BaseInitOptions {
210
+ /** The event ID (optional) */
211
+ eventId?: string;
212
+ /** The event slug (optional) */
213
+ slug?: string;
214
+ /** The order ID (optional) */
215
+ orderId?: string;
216
+ }
217
+
218
+ /**
219
+ * Alias for CalendarProps for backward compatibility
220
+ */
221
+ export type InitOptions = CalendarProps;
222
+
223
+ // ============================================================================
224
+ // Svelte Component Instance
225
+ // ============================================================================
226
+
227
+ /**
228
+ * Svelte component instance returned by init functions
229
+ */
230
+ export interface SvelteComponentInstance {
231
+ /** Destroy the component and clean up */
232
+ $destroy?: () => void;
233
+ /** Internal cleanup for success listener */
234
+ _successCleanup?: () => void;
235
+ }
236
+
237
+ // ============================================================================
238
+ // Exported Functions
239
+ // ============================================================================
240
+
241
+ /**
242
+ * Initialize the Venue Calendar component
243
+ * @param options - Configuration options
244
+ * @returns The Svelte component instance, or null if target not found
245
+ */
246
+ export function initVenueCalendar(
247
+ options: CalendarProps
248
+ ): SvelteComponentInstance | null;
249
+
250
+ /**
251
+ * Initialize the (inline) Event Page.
252
+ * @param options - Configuration options
253
+ * @returns The Svelte component instance, or null if target not found / no event
254
+ */
255
+ export function initEventPage(
256
+ options: EventPageOptions
257
+ ): SvelteComponentInstance | null;
258
+
259
+ /**
260
+ * Initialize the Checkout View
261
+ * @param options - Configuration options
262
+ * @returns The Svelte component instance, or null if target not found or eventId missing
263
+ */
264
+ export function initCheckoutView(
265
+ options: CheckoutOptions
266
+ ): SvelteComponentInstance | null;
267
+
268
+ /**
269
+ * Alias for initCheckoutView
270
+ */
271
+ export const initCheckout: typeof initCheckoutView;
272
+
273
+ /**
274
+ * Initialize the Success View
275
+ * @param options - Configuration options
276
+ * @returns The Svelte component instance, or null if target not found
277
+ */
278
+ export function initSuccessView(
279
+ options: SuccessViewOptions
280
+ ): SvelteComponentInstance | null;
281
+
282
+ /**
283
+ * Alias for initSuccessView
284
+ */
285
+ export const initSuccess: typeof initSuccessView;
286
+
287
+ /**
288
+ * Auto-mount: Automatically finds and mounts calendar to elements with class 'micdrop-calendar-container'
289
+ */
290
+ export function autoMount(): void;
291
+
292
+ // ============================================================================
293
+ // Runtime Configuration
294
+ // ============================================================================
295
+
296
+ /**
297
+ * Opt-in embed integration settings for a venue site embedding the widget.
298
+ */
299
+ export interface EmbedConfig {
300
+ /**
301
+ * Emit a MICDROP_CHECKOUT_COMPLETE postMessage when an order completes. The
302
+ * payload is non-PII: `{ orderId, eventId }`. Default: false.
303
+ */
304
+ postMessageOnSuccess?: boolean;
305
+ /**
306
+ * REQUIRED concrete origin (e.g. 'https://venue.example') for the
307
+ * MICDROP_CHECKOUT_COMPLETE message. The message is never posted to '*'; without a
308
+ * concrete absolute origin nothing is sent and a warning is logged.
309
+ */
310
+ postMessageTargetOrigin?: string | null;
311
+ }
312
+
313
+ /**
314
+ * Options for {@link configureVenueCalendar}. All fields are optional — pass
315
+ * only the keys you want to change.
316
+ */
317
+ export interface ConfigureVenueCalendarOptions {
318
+ /** Called whenever the widget surfaces a caught error (wire into Sentry/Rollbar/etc). */
319
+ onError?: (error: Error, context: { source: string }) => void;
320
+ /** Override the backend origin for multi-region setups. */
321
+ apiBaseUrl?: string;
322
+ /** Request timeout in ms, forwarded to the API client. */
323
+ apiTimeout?: number;
324
+ /** Retry count, forwarded to the API client. */
325
+ apiRetries?: number;
326
+ /** Opt-in embed integration settings (see {@link EmbedConfig}). */
327
+ embed?: EmbedConfig;
328
+ }
329
+
330
+ /**
331
+ * Configure the calendar widget at runtime: error reporting, API overrides,
332
+ * and the opt-in embed integration (e.g. the MICDROP_CHECKOUT_COMPLETE postMessage).
333
+ * @param options - Configuration options
334
+ */
335
+ export function configureVenueCalendar(
336
+ options?: ConfigureVenueCalendarOptions
337
+ ): void;
338
+
339
+ // ============================================================================
340
+ // Theme Exports
341
+ // ============================================================================
342
+
343
+ /**
344
+ * Collection of preset themes
345
+ */
346
+ export const themes: Themes;
347
+
348
+ /**
349
+ * Light theme preset
350
+ */
351
+ export const lightTheme: ThemeColors;
352
+
353
+ /**
354
+ * Dark theme preset
355
+ */
356
+ export const darkTheme: ThemeColors;
357
+
358
+ /**
359
+ * High contrast theme preset for accessibility
360
+ */
361
+ export const highContrastTheme: ThemeColors;
362
+
363
+ /**
364
+ * Apply a theme to the calendar widget
365
+ * @param theme - Theme object with HSL color values
366
+ * @param container - Optional container element (defaults to document.documentElement)
367
+ */
368
+ export function applyTheme(
369
+ theme: Partial<ThemeColors>,
370
+ container?: HTMLElement
371
+ ): void;
372
+
373
+ /**
374
+ * Generate CSS string for embedding themes
375
+ * @param theme - Theme object
376
+ * @returns CSS string with custom properties
377
+ */
378
+ export function generateThemeCSS(theme: Partial<ThemeColors>): string;
379
+
380
+ // ============================================================================
381
+ // Svelte Component Exports
382
+ // ============================================================================
383
+
384
+ /**
385
+ * VenueCalendar Svelte component (CalendarContainer)
386
+ */
387
+ export const VenueCalendar: any;
388
+
389
+ /**
390
+ * Checkout Svelte component
391
+ */
392
+ export const Checkout: any;
393
+
394
+ /**
395
+ * CheckoutView alias for Checkout
396
+ */
397
+ export const CheckoutView: any;
398
+
399
+ /**
400
+ * Success Svelte component
401
+ */
402
+ export const Success: any;
403
+
404
+ /**
405
+ * EventPage Svelte component — full event page with DateSelectorGrouped, EventMeta, ScarcityBadge, etc.
406
+ */
407
+ export const EventPage: any;
408
+
409
+ /**
410
+ * SeriesPage Svelte component — series landing page with hero, upcoming dates, performers, FAQ sidebar
411
+ */
412
+ export const SeriesPage: any;
413
+
414
+ /**
415
+ * SeriesHomeView alias (deprecated — use SeriesPage instead)
416
+ */
417
+ export const SeriesHomeView: any;
418
+
419
+ /**
420
+ * CollectionView Svelte component
421
+ */
422
+ export const CollectionView: any;
423
+
424
+ // ============================================================================
425
+ // Default Export
426
+ // ============================================================================
427
+
428
+ declare const _default: {
429
+ initVenueCalendar: typeof initVenueCalendar;
430
+ initEventPage: typeof initEventPage;
431
+ initCheckoutView: typeof initCheckoutView;
432
+ initCheckout: typeof initCheckoutView;
433
+ initSuccessView: typeof initSuccessView;
434
+ initSuccess: typeof initSuccessView;
435
+ autoMount: typeof autoMount;
436
+ VenueCalendar: any;
437
+ themes: Themes;
438
+ lightTheme: ThemeColors;
439
+ darkTheme: ThemeColors;
440
+ highContrastTheme: ThemeColors;
441
+ applyTheme: typeof applyTheme;
442
+ generateThemeCSS: typeof generateThemeCSS;
443
+ Checkout: any;
444
+ CheckoutView: any;
445
+ Success: any;
446
+ /** @deprecated Use Success instead */
447
+ Sucess: any;
448
+ EventPage: any;
449
+ SeriesPage: any;
450
+ SeriesHomeView: any;
451
+ CollectionView: any;
452
+ };
453
+
454
+ export default _default;