@getmicdrop/venue-calendar 4.0.110 → 4.0.112

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 (88) hide show
  1. package/dist/{CartView-bMHSoj75.js → CartView-H6PXIc8m.js} +9 -9
  2. package/dist/{CartView-bMHSoj75.js.map → CartView-H6PXIc8m.js.map} +1 -1
  3. package/dist/{Checkout-DDXZc-yj.js → Checkout-ns94gCrx.js} +9 -9
  4. package/dist/{Checkout-DDXZc-yj.js.map → Checkout-ns94gCrx.js.map} +1 -1
  5. package/dist/{Checkout-DG2iHmHC.js → Checkout-nyPWpzmE.js} +5 -5
  6. package/dist/{Checkout-DG2iHmHC.js.map → Checkout-nyPWpzmE.js.map} +1 -1
  7. package/dist/{CheckoutTimer-Bwq6a_Hl.js → CheckoutTimer-Bv4qR0Mn.js} +5 -5
  8. package/dist/{CheckoutTimer-Bwq6a_Hl.js.map → CheckoutTimer-Bv4qR0Mn.js.map} +1 -1
  9. package/dist/{ClockIcon-ZgeMNNI1.js → ClockIcon-D2ib_bzt.js} +2 -2
  10. package/dist/{ClockIcon-ZgeMNNI1.js.map → ClockIcon-D2ib_bzt.js.map} +1 -1
  11. package/dist/{CollectionView-1pf2C4kX.js → CollectionView-G3OmVuiX.js} +5 -5
  12. package/dist/{CollectionView-1pf2C4kX.js.map → CollectionView-G3OmVuiX.js.map} +1 -1
  13. package/dist/{Event-D3o0fguY.js → Event-B1syGqOf.js} +8 -8
  14. package/dist/{Event-D3o0fguY.js.map → Event-B1syGqOf.js.map} +1 -1
  15. package/dist/{EventPage-DqO-AV8i.js → EventPage-CqryTYfg.js} +8 -8
  16. package/dist/{EventPage-DqO-AV8i.js.map → EventPage-CqryTYfg.js.map} +1 -1
  17. package/dist/{Heading-pURRwiIC.js → Heading-BM6t9w6d.js} +2 -2
  18. package/dist/{Heading-pURRwiIC.js.map → Heading-BM6t9w6d.js.map} +1 -1
  19. package/dist/{ScarcityBadge-ykz32KS9.js → ScarcityBadge-B7KnIEoD.js} +2 -2
  20. package/dist/{ScarcityBadge-ykz32KS9.js.map → ScarcityBadge-B7KnIEoD.js.map} +1 -1
  21. package/dist/{SeriesPage-BmNk80cF.js → SeriesPage-DYbBhYHy.js} +5 -5
  22. package/dist/{SeriesPage-BmNk80cF.js.map → SeriesPage-DYbBhYHy.js.map} +1 -1
  23. package/dist/{Spinner-OGA1hrc5.js → Spinner-D2Ff-2jf.js} +2 -2
  24. package/dist/{Spinner-OGA1hrc5.js.map → Spinner-D2Ff-2jf.js.map} +1 -1
  25. package/dist/{Success-DLlQ54_-.js → Success-CPQuVaaV.js} +8 -8
  26. package/dist/{Success-DLlQ54_-.js.map → Success-CPQuVaaV.js.map} +1 -1
  27. package/dist/{Text-DMpMLgcU.js → Text-C-9C-Rav.js} +2 -2
  28. package/dist/{Text-DMpMLgcU.js.map → Text-C-9C-Rav.js.map} +1 -1
  29. package/dist/{VenueCalendar-ClSRsS6u.js → VenueCalendar-Dkr4qm4p.js} +4344 -4345
  30. package/dist/{VenueCalendar-ClSRsS6u.js.map → VenueCalendar-Dkr4qm4p.js.map} +1 -1
  31. package/dist/{ViewTicketsEmbed-5LMG2xwn.js → ViewTicketsEmbed-B581Bukn.js} +5 -5
  32. package/dist/{ViewTicketsEmbed-5LMG2xwn.js.map → ViewTicketsEmbed-B581Bukn.js.map} +1 -1
  33. package/dist/{labels-Ws4MJjH5.js → labels-DAFwZdnA.js} +3 -3
  34. package/dist/{labels-Ws4MJjH5.js.map → labels-DAFwZdnA.js.map} +1 -1
  35. package/dist/{modalManager.svelte-BPA2JF6c.js → modalManager.svelte-BbA2uxS7.js} +2 -2
  36. package/dist/{modalManager.svelte-BPA2JF6c.js.map → modalManager.svelte-BbA2uxS7.js.map} +1 -1
  37. package/dist/{promo-vXx1bxQm.js → promo-BGoSmBd_.js} +2 -2
  38. package/dist/{promo-vXx1bxQm.js.map → promo-BGoSmBd_.js.map} +1 -1
  39. package/dist/{showcase-state-options-9SoS5WuT.js → showcase-state-options-BWzGMPZ-.js} +2 -2
  40. package/dist/{showcase-state-options-9SoS5WuT.js.map → showcase-state-options-BWzGMPZ-.js.map} +1 -1
  41. package/dist/{transform-BD9xXAq7.js → transform-CpjZiH34.js} +2 -2
  42. package/dist/{transform-BD9xXAq7.js.map → transform-CpjZiH34.js.map} +1 -1
  43. package/dist/{utm-rT0TPh8G.js → utm-D1uGUvk2.js} +2 -2
  44. package/dist/{utm-rT0TPh8G.js.map → utm-D1uGUvk2.js.map} +1 -1
  45. package/dist/venue-calendar.css +1 -1
  46. package/dist/venue-calendar.es.js +2 -2
  47. package/dist/venue-calendar.iife.js +47 -47
  48. package/dist/venue-calendar.iife.js.map +1 -1
  49. package/dist/venue-calendar.umd.js +44 -44
  50. package/dist/venue-calendar.umd.js.map +1 -1
  51. package/package.json +199 -199
  52. package/dist/api/api/client.d.ts +0 -17
  53. package/dist/api/api/cta.d.ts +0 -34
  54. package/dist/api/api/events.d.ts +0 -183
  55. package/dist/api/api/gift-cards.d.ts +0 -108
  56. package/dist/api/api/index.d.ts +0 -46
  57. package/dist/api/api/orders.d.ts +0 -149
  58. package/dist/api/api/promo.d.ts +0 -45
  59. package/dist/api/api/result.d.ts +0 -78
  60. package/dist/api/api/route-manifest.d.ts +0 -179
  61. package/dist/api/api/transformers/address.d.ts +0 -18
  62. package/dist/api/api/transformers/cart.d.ts +0 -19
  63. package/dist/api/api/transformers/collection.d.ts +0 -12
  64. package/dist/api/api/transformers/event.d.ts +0 -173
  65. package/dist/api/api/transformers/giftCard.d.ts +0 -11
  66. package/dist/api/api/transformers/index.d.ts +0 -27
  67. package/dist/api/api/transformers/order.d.ts +0 -44
  68. package/dist/api/api/transformers/performer.d.ts +0 -8
  69. package/dist/api/api/transformers/series.d.ts +0 -12
  70. package/dist/api/api/transformers/venue.d.ts +0 -39
  71. package/dist/api/api/venues.d.ts +0 -33
  72. package/dist/api/api/waitlist.d.ts +0 -49
  73. package/dist/api/api.cjs +0 -2
  74. package/dist/api/api.cjs.map +0 -1
  75. package/dist/api/api.mjs +0 -1302
  76. package/dist/api/api.mjs.map +0 -1
  77. package/dist/api/types.d.ts +0 -483
  78. package/dist/seo/HostSeoController.d.ts +0 -68
  79. package/dist/seo/buildCollectionJsonLd.d.ts +0 -8
  80. package/dist/seo/buildEventJsonLd.d.ts +0 -9
  81. package/dist/seo/buildSeriesJsonLd.d.ts +0 -6
  82. package/dist/seo/helpers.d.ts +0 -88
  83. package/dist/seo/index.d.ts +0 -10
  84. package/dist/seo/seo.cjs +0 -2
  85. package/dist/seo/seo.cjs.map +0 -1
  86. package/dist/seo/seo.mjs +0 -688
  87. package/dist/seo/seo.mjs.map +0 -1
  88. package/dist/seo/types.d.ts +0 -149
@@ -1,483 +0,0 @@
1
- /**
2
- * API Types for MicDrop Public Checkout API
3
- *
4
- * These types define the shape of API requests and responses
5
- * for the public checkout flow (no authentication required).
6
- */
7
-
8
- import type { EventId, SeriesId } from '@getmicdrop/svelte-components';
9
-
10
- // ============================================================================
11
- // Payment & Orders
12
- // ============================================================================
13
-
14
- export interface PaymentIntentRequest {
15
- IP?: string;
16
- productQuantities: Record<string | number, number>;
17
- }
18
-
19
- export interface PaymentIntentResponse {
20
- client_secret: string;
21
- // The residual the buyer is charged via Stripe, in int cents (net of any
22
- // applied gift card). This is the field the checkout Total keys off. The
23
- // orders-service response has NO `amount` key — an earlier `amount` here was
24
- // never populated, so Total rendered $0.00 on every paid order.
25
- stripe_amount?: number;
26
- amount_total: number;
27
- subtotal?: number;
28
- tax?: number;
29
- tax_amount_exclusive?: number;
30
- service_fee?: number;
31
- discount?: number;
32
- gift_card_amount?: number;
33
- gift_card_code?: string;
34
- stripe_publishable_key?: string;
35
- // ISO-4217 currency (Stripe returns it lowercase). Feeds the checkout totals.
36
- currency?: string;
37
- }
38
-
39
- export interface CompleteReservationResponse {
40
- success: boolean;
41
- message?: string;
42
- error?: string;
43
- }
44
-
45
- export interface CancelReservationResponse {
46
- success: boolean;
47
- message?: string;
48
- error?: string;
49
- }
50
-
51
- export interface CreateOrderRequest {
52
- eventId: string | number;
53
- promoCode?: string;
54
- }
55
-
56
- export interface CreateOrderResponse {
57
- uuid: string;
58
- }
59
-
60
- export interface ValidatePaymentRequest {
61
- id: string;
62
- paymentIntentId: string;
63
- tickets: Record<string | number, number>;
64
- firstName: string;
65
- lastName: string;
66
- email: string;
67
- paymentMethod: string;
68
- mailingList?: boolean;
69
- saleType?: string;
70
- attendees?: AttendeeInfo[];
71
- }
72
-
73
- export interface AttendeeInfo {
74
- ticketId: string | number;
75
- firstName: string;
76
- lastName: string;
77
- email: string;
78
- }
79
-
80
- export interface ValidatePaymentResponse {
81
- success: boolean;
82
- status: string;
83
- orderUUID?: string;
84
- error?: string;
85
- /**
86
- * Fail-closed FLOOR fields. When the event is canceled/postponed between
87
- * cart-creation and finalize, the backend gate refuses to capture the charge
88
- * and sets one of these (alongside `success: false`). Either flag means the
89
- * buyer was NOT charged; the checkout raises the charge-aware
90
- * EventUnavailableModal instead of navigating to success. Optional because
91
- * they are only present on the rejected-finalize path.
92
- */
93
- eventCanceled?: boolean;
94
- eventPostponed?: boolean;
95
- }
96
-
97
- // ============================================================================
98
- // Session Management
99
- // ============================================================================
100
-
101
- export interface ExtendSessionRequest {
102
- orderUuid: string;
103
- }
104
-
105
- export interface ExtendSessionResponse {
106
- success: boolean;
107
- newExpiryTime?: string;
108
- remainingExtensions?: number;
109
- error?: string;
110
- /**
111
- * HTTP status code from the backend on failure. Populated on non-OK
112
- * responses so callers can distinguish "session already expired"
113
- * (typically 410 Gone) from "max extensions reached" or generic 5xx.
114
- * Undefined on network errors and on success.
115
- */
116
- statusCode?: number;
117
- }
118
-
119
- export interface SessionStatus {
120
- expiresAt?: string;
121
- extensionCount?: number;
122
- remainingExtensions?: number;
123
- canExtend?: boolean;
124
- reservationCount?: number;
125
- error?: string;
126
- // 404 from /orders/session/{uuid}: the cart's reservations are
127
- // gone (expired or never existed). Callers polling on an interval
128
- // MUST treat this as terminal and stop — see CartView.svelte.
129
- notFound?: boolean;
130
- // Live event status piggybacked on the session heartbeat so the public
131
- // checkout can flip the buy button the moment an operator cancels/postpones,
132
- // without a dedicated poll or socket. One of the auth-service Event statuses
133
- // (draft|live|started|ended|canceled|postponed). Absent if the lookup failed.
134
- eventStatus?: string;
135
- }
136
-
137
- // ============================================================================
138
- // Promo Codes
139
- // ============================================================================
140
-
141
- export interface PromoValidationResponse {
142
- valid: boolean;
143
- revealHiddenTickets?: boolean;
144
- revealTicketIds?: number[];
145
- provideDiscount?: boolean;
146
- discountType?: 'percentage' | 'fixed';
147
- amount?: number;
148
- code?: string;
149
- error?: string;
150
- }
151
-
152
- /**
153
- * RAW body of GET /api/v2/public/promo-codes/validate/{eventId}/{code}.
154
- *
155
- * The live endpoint reports the discount magnitude as `discount` and the code
156
- * as `name` — NOT `amount`/`code`. validatePromoCode normalises this into the
157
- * client-facing PromoValidationResponse (amount/code) so callers read one shape.
158
- * The legacy `amount`/`code` keys stay optional here so an older payload (or a
159
- * mocked one) still maps through the same fallback. Verified 2026-07-11 against
160
- * two live promos (seeded GUARD20PCT + pre-existing EARLY20).
161
- */
162
- export interface RawPromoValidationBody {
163
- valid?: boolean;
164
- revealHiddenTickets?: boolean;
165
- revealTicketIds?: number[];
166
- provideDiscount?: boolean;
167
- discountType?: 'percentage' | 'fixed';
168
- /** Discount magnitude — real server field. */
169
- discount?: number;
170
- /** Legacy/mocked magnitude field — fallback only. */
171
- amount?: number;
172
- /** Promo code — real server field. */
173
- name?: string;
174
- /** Legacy/mocked code field — fallback only. */
175
- code?: string;
176
- appliesToAllTickets?: boolean;
177
- applyToTicketIds?: number[];
178
- isGlobal?: boolean;
179
- ticketLimit?: number;
180
- error?: string;
181
- }
182
-
183
- export interface HasPromoCodesResponse {
184
- hasPromoCodes: boolean;
185
- }
186
-
187
- // ============================================================================
188
- // Orders
189
- // ============================================================================
190
-
191
- export interface Order {
192
- uuid: string;
193
- id?: number;
194
- customerEmail: string;
195
- customerFirstName?: string;
196
- customerLastName?: string;
197
- status: string;
198
- totalAmount: number;
199
- subtotal?: number;
200
- serviceFeesAmount: number;
201
- taxAmount: number;
202
- discount?: number;
203
- paymentIntentId?: string;
204
- paymentMethod?: string;
205
- purchasedTickets: PurchasedTicket[];
206
- createdAt?: string;
207
- updatedAt?: string;
208
- }
209
-
210
- export interface PurchasedTicket {
211
- uuid: string;
212
- id?: number;
213
- ticketNumber?: string;
214
- orderId?: string | number;
215
- attendeeFirstName?: string;
216
- attendeeLastName?: string;
217
- attendeeEmail?: string;
218
- ticketName: string;
219
- ticketTypeId?: number;
220
- purchasePrice: number;
221
- status?: string;
222
- checkedIn?: boolean;
223
- checkedInAt?: string;
224
- }
225
-
226
- // ============================================================================
227
- // Events
228
- // ============================================================================
229
-
230
- export interface Event {
231
- eventID: number;
232
- id?: number;
233
- name: string;
234
- title?: string;
235
- slug?: string;
236
- description?: string;
237
- date: string;
238
- startDateTime?: string;
239
- endDateTime?: string;
240
- doorsOpenTime?: string;
241
- timezone?: string;
242
- venueId?: number;
243
- venueName?: string;
244
- venueAddress?: string;
245
- location?: string;
246
- imageUrl?: string;
247
- imageURL?: string;
248
- status?: string;
249
- isPublished?: boolean;
250
- isCancelled?: boolean;
251
- availableTickets?: AvailableTicket[];
252
- ticketsAvailable?: number;
253
- ticketsSold?: number;
254
- minPrice?: number;
255
- maxPrice?: number;
256
- ctaText?: string;
257
- ctaState?: 'available' | 'sold_out' | 'coming_soon' | 'ended';
258
- showPerformers?: boolean;
259
- eventSeriesId?: number;
260
- seriesInstanceNumber?: number;
261
- // ── Passthrough seams (events convergence) ─────────────────────────────
262
- // Carried verbatim from the wire by parseEvent so view-shape projections
263
- // (utils/event-transform.js, public-calendar-flow/transform.ts) compose the
264
- // canonical instead of reading wire fields directly. The object-valued
265
- // fields are intentionally raw (see composition note in
266
- // api/transformers/event.ts) — their consumers own the wire variance.
267
- timeZone?: string;
268
- eventSummary?: string;
269
- password?: string;
270
- hasPassword?: boolean;
271
- disclaimer?: string;
272
- ticketType?: number;
273
- eventTicketingType?: number;
274
- ageRestriction?: number;
275
- displayAgeRestriction?: boolean;
276
- displayStartTime?: boolean;
277
- displayEndTime?: boolean;
278
- displayDoorsTime?: boolean;
279
- collectionId?: number;
280
- ticketsRemaining?: number;
281
- ticketsTotal?: number;
282
- hasHiddenTickets?: boolean;
283
- stage?: { name?: string } | null;
284
- stageName?: string;
285
- // Widget-filter dimensions on the public month feeds (saved-widget engine):
286
- // stage/category/performer/collection data the embed adapts onto the SC
287
- // FilterableEvent view (lib/widget-filters.js).
288
- stageId?: number;
289
- eventCategoryTypes?: number[] | null;
290
- publicPerformers?: Array<{
291
- id?: number;
292
- displayName?: string;
293
- image?: string;
294
- }> | null;
295
- collectionIds?: number[] | null;
296
- venue?: Record<string, any>;
297
- performers?: Record<string, any>[];
298
- faqs?: Record<string, any>[];
299
- showtimes?: Record<string, any>[];
300
- purchasedTickets?: Record<string, any>[];
301
- }
302
-
303
- export interface AvailableTicket {
304
- id: number;
305
- name: string;
306
- description?: string;
307
- price: number;
308
- quantity: number;
309
- quantitySold?: number;
310
- quantityAvailable?: number;
311
- minPerOrder?: number;
312
- maxPerOrder?: number;
313
- saleStartDate?: string;
314
- saleEndDate?: string;
315
- isHidden?: boolean;
316
- revealWithPromoCode?: boolean;
317
- ticketType?: number; // 0 = GA, 1 = assigned
318
- sectionId?: number;
319
- sortOrder?: number;
320
- }
321
-
322
- export interface EventPerformersResponse {
323
- performers: Performer[];
324
- showPerformers: boolean;
325
- }
326
-
327
- export interface Performer {
328
- id: number;
329
- displayName: string;
330
- avatar?: string;
331
- order?: number;
332
- }
333
-
334
- // ============================================================================
335
- // Venues
336
- // ============================================================================
337
-
338
- export interface Venue {
339
- id: number;
340
- name: string;
341
- slug?: string;
342
- address?: string;
343
- googleLocationNameCache?: string;
344
- city?: string;
345
- state?: string;
346
- zipCode?: string;
347
- country?: string;
348
- timezone?: string;
349
- logoUrl?: string;
350
- serviceFeePercentage?: number;
351
- serviceFeeCents?: number;
352
- taxPercentage?: number;
353
- organizationId?: number;
354
- }
355
-
356
- // ============================================================================
357
- // Series
358
- // ============================================================================
359
-
360
- export interface SeriesOccurrence {
361
- eventId: EventId;
362
- date: string;
363
- startDateTime: string;
364
- endDateTime?: string;
365
- instanceNumber: number;
366
- status: string;
367
- ticketsAvailable?: number;
368
- ctaState?: string;
369
- }
370
-
371
- export interface SeriesOccurrencesResponse {
372
- seriesId: SeriesId;
373
- occurrences: SeriesOccurrence[];
374
- }
375
-
376
- // ============================================================================
377
- // Series Page
378
- // ============================================================================
379
-
380
- export interface SeriesPageData {
381
- id: number;
382
- title: string;
383
- description: string;
384
- eventSummary?: string;
385
- image?: string;
386
- timeZone: string;
387
- venue: {
388
- id: number;
389
- name: string;
390
- location?: string;
391
- googleLocationNameCache?: string;
392
- faq?: Array<{ question: string; answer: string }> | string;
393
- disclaimer?: string;
394
- };
395
- performers: Array<{
396
- displayName: string;
397
- firstName?: string;
398
- lastName?: string;
399
- profileImage?: string;
400
- }>;
401
- occurrences: Array<{
402
- id: number;
403
- slug: string;
404
- startDateTime: string;
405
- endDateTime: string;
406
- ctaState: {
407
- text: string;
408
- disabled: boolean;
409
- reason?: string;
410
- };
411
- }>;
412
- }
413
-
414
- // ============================================================================
415
- // Entity resolution (type-agnostic public id → concrete entity)
416
- // ============================================================================
417
-
418
- /**
419
- * Response shape of `/api/v2/public/resolve/{id}`. The embed deep-link is
420
- * type-agnostic (`#{id}-{slug}`), so the backend resolves which kind of entity
421
- * the id points at; `data` is the corresponding event / series / collection
422
- * payload (same shape the dedicated fetchers return for that type).
423
- */
424
- export interface ResolvedEntity {
425
- type: 'event' | 'series' | 'collection';
426
- id: string | number;
427
- title?: string;
428
- data: any;
429
- }
430
-
431
- // ============================================================================
432
- // Public Collection
433
- // ============================================================================
434
-
435
- export interface PublicCollectionData {
436
- id: number;
437
- collectionTitle: string;
438
- summary?: string;
439
- description?: string;
440
- coverImage?: string;
441
- events: Array<{
442
- id: number;
443
- title: string;
444
- slug?: string;
445
- startDateTime?: string;
446
- endDateTime?: string;
447
- image?: string;
448
- status?: string;
449
- venue?: { name: string };
450
- minPrice?: number;
451
- }>;
452
- // Password-gate variant: a protected collection responds with a gate signal
453
- // instead of the collection body (either `passwordRequired: true` or an
454
- // `error.code === 'PASSWORD_REQUIRED'`). Modelled here as optional wire
455
- // fields so the view can read them without an `as any` escape.
456
- passwordRequired?: boolean;
457
- error?: { code?: string };
458
- }
459
-
460
- // ============================================================================
461
- // API Configuration
462
- // ============================================================================
463
-
464
- export interface ApiConfig {
465
- baseUrl?: string;
466
- timeout?: number;
467
- /** Number of additional attempts after the first try (default: 2 = 3 total tries). */
468
- retries?: number;
469
- /** Base delay before the first retry; doubles each attempt (default: 500ms). */
470
- retryDelay?: number;
471
- onError?: (_error: Error) => void;
472
- }
473
-
474
- // ============================================================================
475
- // Generic API Response
476
- // ============================================================================
477
-
478
- export interface ApiResponse<T> {
479
- success: boolean;
480
- data?: T;
481
- error?: string;
482
- statusCode?: number;
483
- }
@@ -1,68 +0,0 @@
1
- import { HostSeoControllerOptions } from './types';
2
- interface ListingEvent {
3
- id: number | string;
4
- name: string;
5
- slug?: string;
6
- startDateTime?: string;
7
- image?: string;
8
- }
9
- interface VenueData {
10
- name: string;
11
- address?: string;
12
- googleLocationNameCache?: string;
13
- timeZone?: string;
14
- timezone?: string;
15
- }
16
- export declare class HostSeoController {
17
- /**
18
- * Single active instance. A venue page that mounts >1 calendar embed
19
- * (e.g. "upcoming shows" + "this weekend") will see the *later*
20
- * controller take over `<head>` — the earlier one is destroyed.
21
- *
22
- * KNOWN LIMITATION: multi-embed pages cannot run two SEO controllers
23
- * in parallel because they would both fight to own `<title>`/OG/etc.
24
- * Pass `data-inject-seo="false"` on all but one embed to opt out.
25
- */
26
- static _activeInstance: HostSeoController | null;
27
- private _state;
28
- private _venueName;
29
- private _venueAddress;
30
- private _venueTimeZone;
31
- private _baseUrl;
32
- private _originals;
33
- private _originalsSaved;
34
- private _events;
35
- constructor(options: HostSeoControllerOptions);
36
- private _saveOriginals;
37
- private _injectJsonLd;
38
- private _setMeta;
39
- private _setCanonical;
40
- private _removeAllInjected;
41
- private _restoreOriginals;
42
- private _restoreMetaProperty;
43
- private _restoreMetaName;
44
- private _buildItemList;
45
- private _buildEntityUrl;
46
- /**
47
- * Called when events finish loading from the API.
48
- * Injects an ItemList JSON-LD for the listing. Does not modify OG/canonical/title.
49
- */
50
- onEventsLoaded(events: ListingEvent[], venue?: VenueData): void;
51
- /**
52
- * Called when the user selects an event, series, or collection.
53
- * Replaces ItemList JSON-LD with entity-specific JSON-LD and updates
54
- * all head tags (canonical, OG, meta description, title).
55
- */
56
- onEntitySelected(type: 'event' | 'series' | 'collection', data: any, venue?: VenueData): void;
57
- /**
58
- * Called when the user navigates back to the event listing.
59
- * Restores original head elements and re-injects ItemList JSON-LD.
60
- */
61
- onBackToListing(): void;
62
- /**
63
- * Called when the widget is destroyed. Removes all injected elements
64
- * and restores originals. Clears the static active instance.
65
- */
66
- destroy(): void;
67
- }
68
- export {};
@@ -1,8 +0,0 @@
1
- import { CollectionJsonLdInput } from './types';
2
- export interface BuildCollectionJsonLdOptions {
3
- collection: CollectionJsonLdInput;
4
- baseEventUrl?: string;
5
- /** Accepted for API compatibility; the summary ItemList carries no dates. */
6
- defaultTimeZone?: string;
7
- }
8
- export declare function buildCollectionJsonLd(options: BuildCollectionJsonLdOptions): Record<string, unknown> | null;
@@ -1,9 +0,0 @@
1
- import { EventJsonLdInput, VenueInput, OrganizerInput } from './types';
2
- export interface BuildEventJsonLdOptions {
3
- event: EventJsonLdInput;
4
- venue: VenueInput;
5
- venueTimeZone?: string;
6
- eventUrl?: string;
7
- organizer?: OrganizerInput;
8
- }
9
- export declare function buildEventJsonLd(options: BuildEventJsonLdOptions): Record<string, unknown> | null;
@@ -1,6 +0,0 @@
1
- import { SeriesJsonLdInput } from './types';
2
- export interface BuildSeriesJsonLdOptions {
3
- series: SeriesJsonLdInput;
4
- baseEventUrl?: string;
5
- }
6
- export declare function buildSeriesJsonLd(options: BuildSeriesJsonLdOptions): Record<string, unknown> | null;
@@ -1,88 +0,0 @@
1
- import { EventTicketInput, EventPerformerInput } from './types';
2
- /**
3
- * Escape a JSON string for safe embedding inside an inline
4
- * <script type="application/ld+json"> element.
5
- *
6
- * JSON.stringify does NOT escape `<`, `>` or `&`, so a field value containing
7
- * `</script><script>...` would break out of the script element and execute
8
- * (stored XSS). Replacing those characters with their unicode escape sequences
9
- * keeps the output valid JSON (parsers decode `<` back to `<`) while making
10
- * it impossible to terminate the surrounding <script> tag.
11
- *
12
- * This is the standard JSON-LD-in-<script> hardening; the sibling
13
- * HostSeoController avoids the issue entirely by using element.textContent.
14
- */
15
- export declare function escapeJsonLdForScript(json: string): string;
16
- /**
17
- * Format datetime to ISO-8601 with timezone offset.
18
- * Google requires: "2025-07-21T19:00:00-05:00"
19
- *
20
- * Extracted from EventStructuredData.svelte lines 25-68.
21
- */
22
- export declare function formatDateTimeWithOffset(isoString: string | null | undefined, tz: string): string | null;
23
- /**
24
- * Parse address string into PostalAddress components.
25
- * Input: "7702 Santa Monica Blvd, West Hollywood, CA 90046"
26
- * Output: { @type, streetAddress, addressLocality, addressRegion, postalCode, addressCountry }
27
- *
28
- * Extracted from EventStructuredData.svelte lines 75-111.
29
- */
30
- export declare function parseAddressToPostal(addressStr: string | null | undefined): Record<string, string> | null;
31
- /**
32
- * Structured postal-address parts, as the public resolve/series payloads now
33
- * expose them: `address` is the STREET line, with city/state/postalCode/country
34
- * as discrete fields (PublicVenueInfo / SeriesVenueDTO).
35
- */
36
- export interface PostalAddressParts {
37
- address?: string | null;
38
- city?: string | null;
39
- state?: string | null;
40
- postalCode?: string | null;
41
- country?: string | null;
42
- }
43
- /**
44
- * Build a schema.org PostalAddress, preferring discrete structured fields when
45
- * any locality signal (city / state / postalCode) is present, and otherwise
46
- * falling back to parsing a single comma-separated string (the street `address`
47
- * field if it carries a full address, else `googleLocationNameCache`).
48
- *
49
- * Discrete fields are more reliable than string-splitting — Google requires a
50
- * well-formed PostalAddress for Event rich-result eligibility (online-only
51
- * events lost eligibility June 2025).
52
- */
53
- export declare function buildPostalAddress(parts: PostalAddressParts | null | undefined, fallback?: string | null): Record<string, string> | null;
54
- /**
55
- * Map event status to schema.org EventStatusType.
56
- *
57
- * Extracted from EventStructuredData.svelte lines 116-132.
58
- */
59
- export declare function getEventStatus(rawStatus: string | null | undefined): string;
60
- /**
61
- * Map ticket availability to schema.org ItemAvailability.
62
- *
63
- * Extracted from EventStructuredData.svelte lines 137-157.
64
- */
65
- export declare function getTicketAvailability(ticket: EventTicketInput): string;
66
- /**
67
- * Build a schema.org price-range offer from a low/high price and availability.
68
- *
69
- * The shared primitive behind every JSON-LD offer block: emit an AggregateOffer
70
- * when the range spans two prices, or a single Offer when low === high. Any
71
- * caller-specific fields (a buy `url`, a `validFrom` sales-start) ride along in
72
- * `extra`, spread verbatim after the core fields so each caller reproduces its
73
- * exact prior shape — the event builder passes url/validFrom, the series builder
74
- * passes nothing.
75
- */
76
- export declare function buildPriceRangeOffer(lowPrice: number, highPrice: number, availability: string, extra?: Record<string, unknown>): Record<string, unknown>;
77
- /**
78
- * Build offers from available tickets.
79
- *
80
- * Extracted from EventStructuredData.svelte lines 162-208.
81
- */
82
- export declare function buildOffers(tickets: EventTicketInput[] | null | undefined, url?: string): Record<string, unknown> | null;
83
- /**
84
- * Build performer array from event performers.
85
- *
86
- * Extracted from EventStructuredData.svelte lines 213-237.
87
- */
88
- export declare function buildPerformers(performers: EventPerformerInput[] | null | undefined): Array<Record<string, string>> | null;
@@ -1,10 +0,0 @@
1
- export { buildEventJsonLd } from './buildEventJsonLd';
2
- export { buildSeriesJsonLd } from './buildSeriesJsonLd';
3
- export { buildCollectionJsonLd } from './buildCollectionJsonLd';
4
- export { HostSeoController } from './HostSeoController';
5
- export type { BuildEventJsonLdOptions } from './buildEventJsonLd';
6
- export type { BuildSeriesJsonLdOptions } from './buildSeriesJsonLd';
7
- export type { BuildCollectionJsonLdOptions } from './buildCollectionJsonLd';
8
- export type { EventJsonLdInput, EventTicketInput, EventPerformerInput, VenueInput, OrganizerInput, SeriesJsonLdInput, CollectionJsonLdInput, HostSeoControllerOptions, } from './types';
9
- export { formatDateTimeWithOffset, parseAddressToPostal, buildPostalAddress, getEventStatus, getTicketAvailability, buildOffers, buildPerformers, escapeJsonLdForScript, } from './helpers';
10
- export type { PostalAddressParts } from './helpers';