@getmicdrop/venue-calendar 4.0.86 → 4.0.87

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 (69) hide show
  1. package/README.md +740 -740
  2. package/dist/{CartView-e2hG7cOV.js → CartView-DrfUvXHU.js} +370 -370
  3. package/dist/CartView-DrfUvXHU.js.map +1 -0
  4. package/dist/{Checkout-DmnOMwhl.js → Checkout-BIT0aula.js} +3 -3
  5. package/dist/Checkout-BIT0aula.js.map +1 -0
  6. package/dist/{Checkout-BpTUMyLk.js → Checkout-DNwBnmE3.js} +51 -51
  7. package/dist/Checkout-DNwBnmE3.js.map +1 -0
  8. package/dist/{CheckoutTimer-Dv0c-X6O.js → CheckoutTimer-C50Ahi93.js} +4 -4
  9. package/dist/CheckoutTimer-C50Ahi93.js.map +1 -0
  10. package/dist/{CollectionView-CyxK6aI9.js → CollectionView-W4Atllhp.js} +5 -5
  11. package/dist/CollectionView-W4Atllhp.js.map +1 -0
  12. package/dist/{Event-Cw7b9UEd.js → Event-t3hhfFuJ.js} +10 -7
  13. package/dist/{Event-Cw7b9UEd.js.map → Event-t3hhfFuJ.js.map} +1 -1
  14. package/dist/{EventPage-BKtFiZL1.js → EventPage-CEWppTrK.js} +7 -7
  15. package/dist/EventPage-CEWppTrK.js.map +1 -0
  16. package/dist/Heading-DUg5tgzm.js +91 -0
  17. package/dist/Heading-DUg5tgzm.js.map +1 -0
  18. package/dist/{ModalHeader-V5AlK1dt.js → ModalHeader-DEuHuPK2.js} +2 -2
  19. package/dist/{ModalHeader-V5AlK1dt.js.map → ModalHeader-DEuHuPK2.js.map} +1 -1
  20. package/dist/{ScarcityBadge-Co7gZXuW.js → ScarcityBadge-BVM_XAXR.js} +2 -2
  21. package/dist/ScarcityBadge-BVM_XAXR.js.map +1 -0
  22. package/dist/{SeriesPage-USYe3APQ.js → SeriesPage-Bg4oZ2fA.js} +5 -5
  23. package/dist/SeriesPage-Bg4oZ2fA.js.map +1 -0
  24. package/dist/{Success-C387RvIY.js → Success-DwpMMfeZ.js} +19 -19
  25. package/dist/Success-DwpMMfeZ.js.map +1 -0
  26. package/dist/Text-D4lbf8Z6.js +167 -0
  27. package/dist/{Text-ZUPglf_o.js.map → Text-D4lbf8Z6.js.map} +1 -1
  28. package/dist/{VenueCalendar-tmWZSmhT.js → VenueCalendar-DYnha5wZ.js} +97 -100
  29. package/dist/VenueCalendar-DYnha5wZ.js.map +1 -0
  30. package/dist/{ViewTicketsEmbed--091XJJn.js → ViewTicketsEmbed-mrawQhqD.js} +382 -382
  31. package/dist/ViewTicketsEmbed-mrawQhqD.js.map +1 -0
  32. package/dist/api/api.cjs.map +1 -1
  33. package/dist/api/api.mjs +21 -21
  34. package/dist/api/api.mjs.map +1 -1
  35. package/dist/api/transformers/venue.d.ts +17 -7
  36. package/dist/{data-toggle-store.svelte-Bn0h8FT_.js → data-toggle-store.svelte-CgH3EfQF.js} +2 -2
  37. package/dist/data-toggle-store.svelte-CgH3EfQF.js.map +1 -0
  38. package/dist/{labels-C7Znep_T.js → labels-CV4Mq9xD.js} +3 -3
  39. package/dist/labels-CV4Mq9xD.js.map +1 -0
  40. package/dist/seo/seo.cjs.map +1 -1
  41. package/dist/seo/seo.mjs.map +1 -1
  42. package/dist/{transform-BxgTZDAD.js → transform-DrAudcCa.js} +2 -2
  43. package/dist/transform-DrAudcCa.js.map +1 -0
  44. package/dist/types/index.d.ts +442 -442
  45. package/dist/venue-calendar.css +1 -1
  46. package/dist/venue-calendar.es.js +2 -2
  47. package/dist/venue-calendar.iife.js +21 -21
  48. package/dist/venue-calendar.iife.js.map +1 -1
  49. package/dist/venue-calendar.umd.js +11 -11
  50. package/dist/venue-calendar.umd.js.map +1 -1
  51. package/package.json +2 -2
  52. package/src/lib/theme.js +222 -222
  53. package/dist/CartView-e2hG7cOV.js.map +0 -1
  54. package/dist/Checkout-BpTUMyLk.js.map +0 -1
  55. package/dist/Checkout-DmnOMwhl.js.map +0 -1
  56. package/dist/CheckoutTimer-Dv0c-X6O.js.map +0 -1
  57. package/dist/CollectionView-CyxK6aI9.js.map +0 -1
  58. package/dist/EventPage-BKtFiZL1.js.map +0 -1
  59. package/dist/Heading-D0grC8vd.js +0 -81
  60. package/dist/Heading-D0grC8vd.js.map +0 -1
  61. package/dist/ScarcityBadge-Co7gZXuW.js.map +0 -1
  62. package/dist/SeriesPage-USYe3APQ.js.map +0 -1
  63. package/dist/Success-C387RvIY.js.map +0 -1
  64. package/dist/Text-ZUPglf_o.js +0 -158
  65. package/dist/VenueCalendar-tmWZSmhT.js.map +0 -1
  66. package/dist/ViewTicketsEmbed--091XJJn.js.map +0 -1
  67. package/dist/data-toggle-store.svelte-Bn0h8FT_.js.map +0 -1
  68. package/dist/labels-C7Znep_T.js.map +0 -1
  69. package/dist/transform-BxgTZDAD.js.map +0 -1
@@ -1,442 +1,442 @@
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(options: CalendarProps): SvelteComponentInstance | null;
247
-
248
- /**
249
- * Initialize the (inline) Event Page.
250
- * @param options - Configuration options
251
- * @returns The Svelte component instance, or null if target not found / no event
252
- */
253
- export function initEventPage(options: EventPageOptions): SvelteComponentInstance | null;
254
-
255
- /**
256
- * Initialize the Checkout View
257
- * @param options - Configuration options
258
- * @returns The Svelte component instance, or null if target not found or eventId missing
259
- */
260
- export function initCheckoutView(options: CheckoutOptions): SvelteComponentInstance | null;
261
-
262
- /**
263
- * Alias for initCheckoutView
264
- */
265
- export const initCheckout: typeof initCheckoutView;
266
-
267
- /**
268
- * Initialize the Success View
269
- * @param options - Configuration options
270
- * @returns The Svelte component instance, or null if target not found
271
- */
272
- export function initSuccessView(options: SuccessViewOptions): SvelteComponentInstance | null;
273
-
274
- /**
275
- * Alias for initSuccessView
276
- */
277
- export const initSuccess: typeof initSuccessView;
278
-
279
- /**
280
- * Auto-mount: Automatically finds and mounts calendar to elements with class 'micdrop-calendar-container'
281
- */
282
- export function autoMount(): void;
283
-
284
- // ============================================================================
285
- // Runtime Configuration
286
- // ============================================================================
287
-
288
- /**
289
- * Opt-in embed integration settings for a venue site embedding the widget.
290
- */
291
- export interface EmbedConfig {
292
- /**
293
- * Emit a 'checkout-complete' postMessage when an order completes. The
294
- * payload is non-PII: `{ orderId, eventId }`. Default: false.
295
- */
296
- postMessageOnSuccess?: boolean;
297
- /**
298
- * REQUIRED concrete origin (e.g. 'https://venue.example') for the
299
- * 'checkout-complete' message. The message is never posted to '*'; without a
300
- * concrete absolute origin nothing is sent and a warning is logged.
301
- */
302
- postMessageTargetOrigin?: string | null;
303
- }
304
-
305
- /**
306
- * Options for {@link configureVenueCalendar}. All fields are optional — pass
307
- * only the keys you want to change.
308
- */
309
- export interface ConfigureVenueCalendarOptions {
310
- /** Called whenever the widget surfaces a caught error (wire into Sentry/Rollbar/etc). */
311
- onError?: (error: Error, context: { source: string }) => void;
312
- /** Override the backend origin for multi-region setups. */
313
- apiBaseUrl?: string;
314
- /** Request timeout in ms, forwarded to the API client. */
315
- apiTimeout?: number;
316
- /** Retry count, forwarded to the API client. */
317
- apiRetries?: number;
318
- /** Opt-in embed integration settings (see {@link EmbedConfig}). */
319
- embed?: EmbedConfig;
320
- }
321
-
322
- /**
323
- * Configure the calendar widget at runtime: error reporting, API overrides,
324
- * and the opt-in embed integration (e.g. the 'checkout-complete' postMessage).
325
- * @param options - Configuration options
326
- */
327
- export function configureVenueCalendar(options?: ConfigureVenueCalendarOptions): void;
328
-
329
- // ============================================================================
330
- // Theme Exports
331
- // ============================================================================
332
-
333
- /**
334
- * Collection of preset themes
335
- */
336
- export const themes: Themes;
337
-
338
- /**
339
- * Light theme preset
340
- */
341
- export const lightTheme: ThemeColors;
342
-
343
- /**
344
- * Dark theme preset
345
- */
346
- export const darkTheme: ThemeColors;
347
-
348
- /**
349
- * High contrast theme preset for accessibility
350
- */
351
- export const highContrastTheme: ThemeColors;
352
-
353
- /**
354
- * Apply a theme to the calendar widget
355
- * @param theme - Theme object with HSL color values
356
- * @param container - Optional container element (defaults to document.documentElement)
357
- */
358
- export function applyTheme(theme: Partial<ThemeColors>, container?: HTMLElement): void;
359
-
360
- /**
361
- * Generate CSS string for embedding themes
362
- * @param theme - Theme object
363
- * @returns CSS string with custom properties
364
- */
365
- export function generateThemeCSS(theme: Partial<ThemeColors>): string;
366
-
367
- // ============================================================================
368
- // Svelte Component Exports
369
- // ============================================================================
370
-
371
- /**
372
- * VenueCalendar Svelte component (CalendarContainer)
373
- */
374
- export const VenueCalendar: any;
375
-
376
-
377
- /**
378
- * Checkout Svelte component
379
- */
380
- export const Checkout: any;
381
-
382
- /**
383
- * CheckoutView alias for Checkout
384
- */
385
- export const CheckoutView: any;
386
-
387
- /**
388
- * Success Svelte component
389
- */
390
- export const Success: any;
391
-
392
- /**
393
- * EventPage Svelte component — full event page with DateSelectorGrouped, EventMeta, ScarcityBadge, etc.
394
- */
395
- export const EventPage: any;
396
-
397
- /**
398
- * SeriesPage Svelte component — series landing page with hero, upcoming dates, performers, FAQ sidebar
399
- */
400
- export const SeriesPage: any;
401
-
402
- /**
403
- * SeriesHomeView alias (deprecated — use SeriesPage instead)
404
- */
405
- export const SeriesHomeView: any;
406
-
407
- /**
408
- * CollectionView Svelte component
409
- */
410
- export const CollectionView: any;
411
-
412
- // ============================================================================
413
- // Default Export
414
- // ============================================================================
415
-
416
- declare const _default: {
417
- initVenueCalendar: typeof initVenueCalendar;
418
- initEventPage: typeof initEventPage;
419
- initCheckoutView: typeof initCheckoutView;
420
- initCheckout: typeof initCheckoutView;
421
- initSuccessView: typeof initSuccessView;
422
- initSuccess: typeof initSuccessView;
423
- autoMount: typeof autoMount;
424
- VenueCalendar: any;
425
- themes: Themes;
426
- lightTheme: ThemeColors;
427
- darkTheme: ThemeColors;
428
- highContrastTheme: ThemeColors;
429
- applyTheme: typeof applyTheme;
430
- generateThemeCSS: typeof generateThemeCSS;
431
- Checkout: any;
432
- CheckoutView: any;
433
- Success: any;
434
- /** @deprecated Use Success instead */
435
- Sucess: any;
436
- EventPage: any;
437
- SeriesPage: any;
438
- SeriesHomeView: any;
439
- CollectionView: any;
440
- };
441
-
442
- 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(options: CalendarProps): SvelteComponentInstance | null;
247
+
248
+ /**
249
+ * Initialize the (inline) Event Page.
250
+ * @param options - Configuration options
251
+ * @returns The Svelte component instance, or null if target not found / no event
252
+ */
253
+ export function initEventPage(options: EventPageOptions): SvelteComponentInstance | null;
254
+
255
+ /**
256
+ * Initialize the Checkout View
257
+ * @param options - Configuration options
258
+ * @returns The Svelte component instance, or null if target not found or eventId missing
259
+ */
260
+ export function initCheckoutView(options: CheckoutOptions): SvelteComponentInstance | null;
261
+
262
+ /**
263
+ * Alias for initCheckoutView
264
+ */
265
+ export const initCheckout: typeof initCheckoutView;
266
+
267
+ /**
268
+ * Initialize the Success View
269
+ * @param options - Configuration options
270
+ * @returns The Svelte component instance, or null if target not found
271
+ */
272
+ export function initSuccessView(options: SuccessViewOptions): SvelteComponentInstance | null;
273
+
274
+ /**
275
+ * Alias for initSuccessView
276
+ */
277
+ export const initSuccess: typeof initSuccessView;
278
+
279
+ /**
280
+ * Auto-mount: Automatically finds and mounts calendar to elements with class 'micdrop-calendar-container'
281
+ */
282
+ export function autoMount(): void;
283
+
284
+ // ============================================================================
285
+ // Runtime Configuration
286
+ // ============================================================================
287
+
288
+ /**
289
+ * Opt-in embed integration settings for a venue site embedding the widget.
290
+ */
291
+ export interface EmbedConfig {
292
+ /**
293
+ * Emit a 'checkout-complete' postMessage when an order completes. The
294
+ * payload is non-PII: `{ orderId, eventId }`. Default: false.
295
+ */
296
+ postMessageOnSuccess?: boolean;
297
+ /**
298
+ * REQUIRED concrete origin (e.g. 'https://venue.example') for the
299
+ * 'checkout-complete' message. The message is never posted to '*'; without a
300
+ * concrete absolute origin nothing is sent and a warning is logged.
301
+ */
302
+ postMessageTargetOrigin?: string | null;
303
+ }
304
+
305
+ /**
306
+ * Options for {@link configureVenueCalendar}. All fields are optional — pass
307
+ * only the keys you want to change.
308
+ */
309
+ export interface ConfigureVenueCalendarOptions {
310
+ /** Called whenever the widget surfaces a caught error (wire into Sentry/Rollbar/etc). */
311
+ onError?: (error: Error, context: { source: string }) => void;
312
+ /** Override the backend origin for multi-region setups. */
313
+ apiBaseUrl?: string;
314
+ /** Request timeout in ms, forwarded to the API client. */
315
+ apiTimeout?: number;
316
+ /** Retry count, forwarded to the API client. */
317
+ apiRetries?: number;
318
+ /** Opt-in embed integration settings (see {@link EmbedConfig}). */
319
+ embed?: EmbedConfig;
320
+ }
321
+
322
+ /**
323
+ * Configure the calendar widget at runtime: error reporting, API overrides,
324
+ * and the opt-in embed integration (e.g. the 'checkout-complete' postMessage).
325
+ * @param options - Configuration options
326
+ */
327
+ export function configureVenueCalendar(options?: ConfigureVenueCalendarOptions): void;
328
+
329
+ // ============================================================================
330
+ // Theme Exports
331
+ // ============================================================================
332
+
333
+ /**
334
+ * Collection of preset themes
335
+ */
336
+ export const themes: Themes;
337
+
338
+ /**
339
+ * Light theme preset
340
+ */
341
+ export const lightTheme: ThemeColors;
342
+
343
+ /**
344
+ * Dark theme preset
345
+ */
346
+ export const darkTheme: ThemeColors;
347
+
348
+ /**
349
+ * High contrast theme preset for accessibility
350
+ */
351
+ export const highContrastTheme: ThemeColors;
352
+
353
+ /**
354
+ * Apply a theme to the calendar widget
355
+ * @param theme - Theme object with HSL color values
356
+ * @param container - Optional container element (defaults to document.documentElement)
357
+ */
358
+ export function applyTheme(theme: Partial<ThemeColors>, container?: HTMLElement): void;
359
+
360
+ /**
361
+ * Generate CSS string for embedding themes
362
+ * @param theme - Theme object
363
+ * @returns CSS string with custom properties
364
+ */
365
+ export function generateThemeCSS(theme: Partial<ThemeColors>): string;
366
+
367
+ // ============================================================================
368
+ // Svelte Component Exports
369
+ // ============================================================================
370
+
371
+ /**
372
+ * VenueCalendar Svelte component (CalendarContainer)
373
+ */
374
+ export const VenueCalendar: any;
375
+
376
+
377
+ /**
378
+ * Checkout Svelte component
379
+ */
380
+ export const Checkout: any;
381
+
382
+ /**
383
+ * CheckoutView alias for Checkout
384
+ */
385
+ export const CheckoutView: any;
386
+
387
+ /**
388
+ * Success Svelte component
389
+ */
390
+ export const Success: any;
391
+
392
+ /**
393
+ * EventPage Svelte component — full event page with DateSelectorGrouped, EventMeta, ScarcityBadge, etc.
394
+ */
395
+ export const EventPage: any;
396
+
397
+ /**
398
+ * SeriesPage Svelte component — series landing page with hero, upcoming dates, performers, FAQ sidebar
399
+ */
400
+ export const SeriesPage: any;
401
+
402
+ /**
403
+ * SeriesHomeView alias (deprecated — use SeriesPage instead)
404
+ */
405
+ export const SeriesHomeView: any;
406
+
407
+ /**
408
+ * CollectionView Svelte component
409
+ */
410
+ export const CollectionView: any;
411
+
412
+ // ============================================================================
413
+ // Default Export
414
+ // ============================================================================
415
+
416
+ declare const _default: {
417
+ initVenueCalendar: typeof initVenueCalendar;
418
+ initEventPage: typeof initEventPage;
419
+ initCheckoutView: typeof initCheckoutView;
420
+ initCheckout: typeof initCheckoutView;
421
+ initSuccessView: typeof initSuccessView;
422
+ initSuccess: typeof initSuccessView;
423
+ autoMount: typeof autoMount;
424
+ VenueCalendar: any;
425
+ themes: Themes;
426
+ lightTheme: ThemeColors;
427
+ darkTheme: ThemeColors;
428
+ highContrastTheme: ThemeColors;
429
+ applyTheme: typeof applyTheme;
430
+ generateThemeCSS: typeof generateThemeCSS;
431
+ Checkout: any;
432
+ CheckoutView: any;
433
+ Success: any;
434
+ /** @deprecated Use Success instead */
435
+ Sucess: any;
436
+ EventPage: any;
437
+ SeriesPage: any;
438
+ SeriesHomeView: any;
439
+ CollectionView: any;
440
+ };
441
+
442
+ export default _default;