@getmicdrop/venue-calendar 4.3.37 → 4.3.39

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 (103) hide show
  1. package/dist/{ArrowLeftIcon-bH5d6LQO.js → ArrowLeftIcon-BMuyNOqe.js} +1 -1
  2. package/dist/{BlockPlaceholder-yXhu9HrQ.js → BlockPlaceholder-CUusOhOf.js} +1 -1
  3. package/dist/{Calendar-BjE02HrG.js → Calendar-Dy-jZDff.js} +3 -3
  4. package/dist/{CalendarFoundryView-BWaOYwqK.js → CalendarFoundryView-BWyEe7Xe.js} +23 -23
  5. package/dist/{CalendarIcon-Cg9UUTeu.js → CalendarIcon-B1JasL-W.js} +1 -1
  6. package/dist/{CartView-bcOiHkc9.js → CartView-CyU9g9ss.js} +21 -21
  7. package/dist/{Checkbox-24CWEsty.js → Checkbox-BtJwg_CF.js} +1 -0
  8. package/dist/{Checkout-CQkHV2jG.js → Checkout-BGXlW2j2.js} +15 -21
  9. package/dist/{Checkout-CBKPSWLo.js → Checkout-DrP1KLR_.js} +19 -19
  10. package/dist/{CheckoutTimer-BYQ43W8T.js → CheckoutTimer-CAKT63di.js} +3 -3
  11. package/dist/{ChevronDownIcon-BA40Kl0C.js → ChevronDownIcon--mG1fNDx.js} +1 -1
  12. package/dist/{ClockIcon-DjC-doTv.js → ClockIcon-B8ahXV8G.js} +1 -1
  13. package/dist/{CloseIcon-BdwmaxDK.js → CloseIcon-C9guTa4C.js} +1 -1
  14. package/dist/{CollectionView-5CycNo4A.js → CollectionView-BhBCM-01.js} +6 -6
  15. package/dist/{CropImage-Ct6MRg_a.js → CropImage-BFtvLjTE.js} +1 -1
  16. package/dist/{Event-Bz4DLlpB.js → Event-DyX1UrZe.js} +18 -18
  17. package/dist/EventPage-DxyEqU7R.js +1184 -0
  18. package/dist/{Input-o-1w57H2.js → Input-DNzDcf6I.js} +1 -1
  19. package/dist/{MailIcon-DCMMhuHr.js → MailIcon-Cf77TYiB.js} +1 -1
  20. package/dist/{PasswordInput-zX7J--jb.js → PasswordInput-C-BH1Do3.js} +1 -1
  21. package/dist/{RecommendationsRail-Cb--XCvg.js → RecommendationsRail-CG0vCtgJ.js} +8 -8
  22. package/dist/{ScarcityBadge-CwYWJOsJ.js → ScarcityBadge-D0D6Hqp0.js} +3 -3
  23. package/dist/{SeriesPage-BalCscZf.js → SeriesPage-D9_Nn8gF.js} +3 -3
  24. package/dist/{Success-DtScq6E2.js → Success-Db843hJe.js} +25 -25
  25. package/dist/{TagIcon-CkfQvNGi.js → TagIcon-DUY8KSZ0.js} +1 -1
  26. package/dist/{ViewTicketsEmbed-KbA05I2k.js → ViewTicketsEmbed-rdcE9aPB.js} +5 -5
  27. package/dist/{WarningCircleIcon-Iq24pJJf.js → WarningCircleIcon-C1-Aj9ut.js} +1 -1
  28. package/dist/{WarningTriIcon-Dw5GnHpq.js → WarningTriIcon-BrwQ58VB.js} +1 -1
  29. package/dist/api/api.cjs +1 -1
  30. package/dist/api/api.mjs +1 -1
  31. package/dist/api/authHeaders.d.ts +25 -0
  32. package/dist/api/checkout-availability.d.ts +71 -0
  33. package/dist/api/gate-password-cache.d.ts +60 -0
  34. package/dist/api/recommendations.d.ts +35 -0
  35. package/dist/api/surge-queue.d.ts +133 -0
  36. package/dist/api/types.d.ts +435 -556
  37. package/dist/{api-D0rw6nGg.js → api-DDVVRbC-.js} +73 -73
  38. package/dist/{constants-B3kqqQpi.js → constants-7hsFMWgp.js} +1 -1
  39. package/dist/{copyToClipboard-C3IBl2Z1.js → copyToClipboard-4LAkJ_1y.js} +1 -1
  40. package/dist/{de-BY5vJUGN.js → de-DD9e2eok.js} +21 -3
  41. package/dist/{defaultLabels-Zp9QbN37.js → defaultLabels-BkjXKQDd.js} +20 -2
  42. package/dist/{defaults-BMbXcKP9.js → defaults-DthmKRyG.js} +2 -2
  43. package/dist/{es-jUq9nrJk.js → es-CHuPO3ex.js} +21 -3
  44. package/dist/{event-c9mHeEJz.js → event-Dew6DCL7.js} +1 -1
  45. package/dist/{event-transform-D0mzpOzE.js → event-transform-CbFR1hRl.js} +4 -4
  46. package/dist/{eventStatusStream-dDHNTEOf.js → eventStatusStream-DTshTZoI.js} +1 -1
  47. package/dist/{fr-BhVwmvlV.js → fr-Ctu5i20f.js} +21 -3
  48. package/dist/{href-1o0O9xTA.js → href-B4azVXj-.js} +2 -2
  49. package/dist/i18n--YZExMpe.js +28 -0
  50. package/dist/{i18n-DInkJ-RH.js → i18n-srcm-H61.js} +6 -6
  51. package/dist/{id-CWU5ZvLv.js → id-DKYW7qEJ.js} +21 -3
  52. package/dist/imageOptimizer-Cf0BbZJ7.js +220 -0
  53. package/dist/{it-wlDmN3hH.js → it-DPWCuCsJ.js} +21 -3
  54. package/dist/{ja-DpA7hJaC.js → ja-CNSRW1XM.js} +21 -3
  55. package/dist/{ko-DdWLaFvo.js → ko--itQbcHD.js} +21 -3
  56. package/dist/locales/{4.3.37 → 4.3.39}/main/de.js +1 -1
  57. package/dist/locales/{4.3.37 → 4.3.39}/main/es.js +1 -1
  58. package/dist/locales/{4.3.37 → 4.3.39}/main/fr.js +1 -1
  59. package/dist/locales/{4.3.37 → 4.3.39}/main/id.js +1 -1
  60. package/dist/locales/{4.3.37 → 4.3.39}/main/it.js +1 -1
  61. package/dist/locales/{4.3.37 → 4.3.39}/main/ja.js +1 -1
  62. package/dist/locales/{4.3.37 → 4.3.39}/main/ko.js +1 -1
  63. package/dist/locales/{4.3.37 → 4.3.39}/main/nl.js +1 -1
  64. package/dist/locales/{4.3.37 → 4.3.39}/main/pl.js +1 -1
  65. package/dist/locales/{4.3.37 → 4.3.39}/main/pt-br.js +1 -1
  66. package/dist/locales/{4.3.37 → 4.3.39}/main/tr.js +1 -1
  67. package/dist/locales/{4.3.37 → 4.3.39}/main/zh.js +1 -1
  68. package/dist/{nl-BwxAfMRa.js → nl-BoZA1-rw.js} +21 -3
  69. package/dist/{order-totals-BEUOdkCb.js → order-totals-DFE6UVG4.js} +3 -3
  70. package/dist/{orders-jQz7QFjK.js → orders-DABdaHOy.js} +167 -166
  71. package/dist/{phoneUtils-CbiDWdEC.js → phoneUtils-CxLRaM5n.js} +1 -1
  72. package/dist/{pixels-DnbRn43e.js → pixels-BVOE_JFH.js} +8 -8
  73. package/dist/{pl-CuRdwJXc.js → pl-tC8ayoR2.js} +21 -3
  74. package/dist/{promo-BrstveEs.js → promo-B3Tj0iQF.js} +1 -1
  75. package/dist/{pt-br-BUWJLxKf.js → pt-br-CTMA1wMi.js} +21 -3
  76. package/dist/{scarcity-CwnIxi1J.js → scarcity-DqbDh1cS.js} +1 -1
  77. package/dist/seo/types.d.ts +137 -156
  78. package/dist/{serverTotals-D2-FzkdS.js → serverTotals-ClEUVCOz.js} +1 -1
  79. package/dist/{showcase-state-options-CDOHpho6.js → showcase-state-options-Dwn2NLOM.js} +1 -1
  80. package/dist/{to-event-card-props-ChcFQ_rl.js → to-event-card-props-CRaeqRxY.js} +2 -2
  81. package/dist/{tr-DTe5Urub.js → tr-CuaYXuAQ.js} +21 -3
  82. package/dist/{utils-KGYASlkk.js → utils-kRsfuFcG.js} +53 -53
  83. package/dist/venue-calendar.css +1 -1
  84. package/dist/venue-calendar.es.js +499 -490
  85. package/dist/venue-calendar.iife.js +56 -56
  86. package/dist/venue-calendar.umd.js +56 -56
  87. package/dist/{zh-BnBN3ggx.js → zh-Bcr7RKpt.js} +21 -3
  88. package/package.json +2 -2
  89. package/dist/EventPage-6-7R9qrl.js +0 -1184
  90. package/dist/i18n-i-1mHdch.js +0 -28
  91. package/dist/imageOptimizer-DkJp4tei.js +0 -140
  92. /package/dist/locales/{4.3.37 → 4.3.39}/flow/de.js +0 -0
  93. /package/dist/locales/{4.3.37 → 4.3.39}/flow/es.js +0 -0
  94. /package/dist/locales/{4.3.37 → 4.3.39}/flow/fr.js +0 -0
  95. /package/dist/locales/{4.3.37 → 4.3.39}/flow/id.js +0 -0
  96. /package/dist/locales/{4.3.37 → 4.3.39}/flow/it.js +0 -0
  97. /package/dist/locales/{4.3.37 → 4.3.39}/flow/ja.js +0 -0
  98. /package/dist/locales/{4.3.37 → 4.3.39}/flow/ko.js +0 -0
  99. /package/dist/locales/{4.3.37 → 4.3.39}/flow/nl.js +0 -0
  100. /package/dist/locales/{4.3.37 → 4.3.39}/flow/pl.js +0 -0
  101. /package/dist/locales/{4.3.37 → 4.3.39}/flow/pt-br.js +0 -0
  102. /package/dist/locales/{4.3.37 → 4.3.39}/flow/tr.js +0 -0
  103. /package/dist/locales/{4.3.37 → 4.3.39}/flow/zh.js +0 -0
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Cross-event recommendations — the buyer's read.
3
+ *
4
+ * The rail on an event page and the block on the checkout-success page both
5
+ * come from here. The answer is already materialized and cached server-side, so
6
+ * this is one indexed read; nothing on a buyer's path ever waits on a model.
7
+ *
8
+ * EVERY failure returns an empty list. A cross-sell rail is decoration on
9
+ * somebody's event page — if it cannot load, the page renders without it and
10
+ * nobody sees an error.
11
+ */
12
+ /** Why a show is being recommended. Rendered to the buyer as the badge. */
13
+ export type RecommendationRule = 'performer' | 'genre' | 'weekday' | 'similar' | 'pin';
14
+ /** The surfaces a buyer can see. `email` is rendered server-side at send time. */
15
+ export type RecommendationSurface = 'event_page' | 'success';
16
+ export interface RecommendationCard {
17
+ eventId: number;
18
+ slot: number;
19
+ rule: RecommendationRule;
20
+ title: string;
21
+ startsAt: string | null;
22
+ timeZone: string;
23
+ venueName: string;
24
+ image?: string;
25
+ url?: string;
26
+ minPrice?: number;
27
+ }
28
+ /**
29
+ * Fetches the recommendations for one event and surface.
30
+ *
31
+ * @param eventId - the event being viewed or bought
32
+ * @param surface - which placement is asking
33
+ * @param widgetKey - the embed key, when this render is inside a widget
34
+ */
35
+ export declare function getRecommendations(eventId: number, surface?: RecommendationSurface, widgetKey?: string): Promise<RecommendationCard[]>;
@@ -0,0 +1,133 @@
1
+ /**
2
+ * Surge queue — the virtual waiting room's half of the wire.
3
+ *
4
+ * On a viral on-sale every buyer races for the same inventory decrement on
5
+ * `POST /orders/create`. The backend puts a line in front of that door: a
6
+ * bounded number of buyers hold a checkout pass at any moment and everyone else
7
+ * waits with a position and an estimate. These four calls are how the widget
8
+ * asks about the line, takes a place in it, watches it move, and gives the place
9
+ * back.
10
+ *
11
+ * FAIL OPEN, EVERY TIME. The queue is a protection mechanism, not a money
12
+ * control — the backend itself reports `armed:false` when it cannot reach Redis,
13
+ * because refusing every sale on the platform is a worse outcome than a surge.
14
+ * So every function here degrades to "there is no line": a read that fails must
15
+ * never leave an overlay across a checkout that would have worked. The only
16
+ * thing that actually gates a purchase is the server's `QUEUE_REQUIRED` refusal
17
+ * on `/orders/create`, which `initiateOrder` in src/lib/utils/orderApi.ts
18
+ * surfaces as its own error type — that refusal cannot be lost by a client-side
19
+ * failure, which is what makes failing open here safe.
20
+ *
21
+ * @auth-token-url-escape: the status poll carries its token in the query string
22
+ * because that is the only shape the endpoint answers —
23
+ * `GET /events/:id/queue/status?token=…`. A request header would move it out of
24
+ * nginx logs and browser history, and would also add a CORS preflight to every
25
+ * poll of a line that can be tens of thousands deep, on the one endpoint whose
26
+ * whole purpose is to survive that load. What the token actually grants is one
27
+ * place in one line: it expires with the pass, `leaveQueue` revokes it, and it
28
+ * authorises no order, no payment and no session. The marker is FILE-LEVEL —
29
+ * the only scope the rule offers — so it covers anything added here later.
30
+ */
31
+ /**
32
+ * The refusal code the gate answers on `POST /orders/create` (HTTP 429) when
33
+ * the event is armed and the caller holds no admitted token.
34
+ *
35
+ * Exported so the one consumer that has to recognise it — `initiateOrder` —
36
+ * matches the backend's spelling rather than carrying a second copy of the
37
+ * string. A drifted spelling would classify a queue refusal as a server fault
38
+ * and the buyer would be told the sale failed.
39
+ */
40
+ export declare const QUEUE_REQUIRED = "QUEUE_REQUIRED";
41
+ /**
42
+ * This module's own code for "the queue could not be asked" — a transport
43
+ * failure, not a verdict. Distinct from anything the backend sends so a caller
44
+ * can tell a refusal apart from an unanswered question, and fail open on both.
45
+ */
46
+ export declare const QUEUE_UNAVAILABLE = "queue_unavailable";
47
+ /** The event's own setting: `off` never queues, `on` always does, `auto` arms
48
+ * itself while demand holds and dissolves on its own afterwards. */
49
+ export type QueueMode = 'off' | 'auto' | 'on';
50
+ /**
51
+ * Where one buyer stands.
52
+ *
53
+ * `open` is the answer when the event has no line at all — there is nothing to
54
+ * wait for and no token to carry. `expired` means the line entry or the checkout
55
+ * pass timed out and the client must re-join.
56
+ */
57
+ export type QueueState = 'open' | 'waiting' | 'admitted' | 'expired';
58
+ /** The tokenless "is there a line?" answer — cheap enough for every page load. */
59
+ export interface QueueSnapshot {
60
+ /** The only field the widget branches on: false renders nothing at all. */
61
+ armed: boolean;
62
+ mode: QueueMode;
63
+ /** How many people are in line right now. */
64
+ waiting: number;
65
+ /** The server's estimate for somebody joining now. */
66
+ etaSeconds: number;
67
+ }
68
+ /**
69
+ * A place in line, or a checkout pass — join and status answer the same shape,
70
+ * so a poll is read exactly like the join that started it.
71
+ */
72
+ export interface QueueEntry {
73
+ token: string;
74
+ state: QueueState;
75
+ /** 1-based place in line. */
76
+ position: number;
77
+ /** How many people are in front of this buyer. */
78
+ ahead: number;
79
+ etaSeconds: number;
80
+ /** How long to wait before polling again. The server widens it as the line
81
+ * grows, so a 50k-deep queue does not become its own DDoS — honour it. */
82
+ pollAfterMs: number;
83
+ /** ISO instant the line entry or the checkout pass dies. */
84
+ expiresAt: string;
85
+ }
86
+ export interface QueueEntryResult {
87
+ success: boolean;
88
+ entry?: QueueEntry;
89
+ /** The backend's failure code, or this module's `queue_unavailable`. */
90
+ errorCode?: string;
91
+ /** The HTTP status, so a caller can back off on a 429 from the join or status
92
+ * rate limiter without reading a sentence written for a human. */
93
+ statusCode?: number;
94
+ }
95
+ export interface LeaveQueueResult {
96
+ /** False for an unknown token, which the server answers 200 — leave is a
97
+ * beacon, not a transaction, so "nothing to release" is not a failure. */
98
+ released: boolean;
99
+ }
100
+ /**
101
+ * Is there a line on this event? Tokenless and cheap, for page load.
102
+ *
103
+ * Answers `armed:false` for every failure, so a blip on this call is exactly
104
+ * today's behaviour: the buyer goes straight at the buy button, and the gate
105
+ * decides.
106
+ */
107
+ export declare function getQueueState(eventId: string | number): Promise<QueueSnapshot>;
108
+ /**
109
+ * Take a place in line, or a checkout pass when there is spare capacity.
110
+ *
111
+ * Safe to call again on a reload: the server hands a caller that already holds a
112
+ * live token for this event its existing entry back, so a refresh does not cost
113
+ * the buyer their spot. It does NOT need to be called before every purchase —
114
+ * the reactive entry into the line is the gate's `QUEUE_REQUIRED` refusal.
115
+ */
116
+ export declare function joinQueue(eventId: string | number): Promise<QueueEntryResult>;
117
+ /**
118
+ * The poll. Answers the same shape as the join that started it, and draining the
119
+ * line is its server-side side effect — so stopping the poll stops the line
120
+ * moving for everybody, and polling faster than `pollAfterMs` is what the server
121
+ * widens that number to prevent.
122
+ */
123
+ export declare function getQueueStatus(eventId: string | number, token: string): Promise<QueueEntryResult>;
124
+ /**
125
+ * Give the place in line, or the checkout pass, back.
126
+ *
127
+ * Sent on `pagehide`, which is the whole reason for the two request options:
128
+ * without `keepalive` the browser cancels an in-flight request as the document
129
+ * goes away and the slot is held until the pass expires — the next buyer waits
130
+ * fifteen minutes for a tab that closed. And a beacon fired at unload has nobody
131
+ * left to tell, so its failure is not routed to the global error handler.
132
+ */
133
+ export declare function leaveQueue(eventId: string | number, token: string): Promise<LeaveQueueResult>;