@getmicdrop/venue-calendar 4.3.38 → 4.3.40

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 (102) hide show
  1. package/dist/{ArrowLeftIcon-bH5d6LQO.js → ArrowLeftIcon-DahiD9EF.js} +1 -1
  2. package/dist/{BlockPlaceholder-yXhu9HrQ.js → BlockPlaceholder-BfbLTliy.js} +1 -1
  3. package/dist/{Calendar-BjE02HrG.js → Calendar-CM-dDG7x.js} +14 -14
  4. package/dist/{CalendarFoundryView-BWaOYwqK.js → CalendarFoundryView-Bv0EsOwe.js} +635 -617
  5. package/dist/{CalendarIcon-Cg9UUTeu.js → CalendarIcon-DOAS1a6F.js} +1 -1
  6. package/dist/{CartView-YRimdA6F.js → CartView-CYJMgWS2.js} +615 -617
  7. package/dist/{Checkbox-24CWEsty.js → Checkbox-BtJwg_CF.js} +1 -0
  8. package/dist/{Checkout-djS62Y9-.js → Checkout-C8BrLSYw.js} +59 -59
  9. package/dist/{Checkout-rsX9zvb7.js → Checkout-D6GEwsKQ.js} +28 -34
  10. package/dist/{CheckoutTimer-D3XNCZ36.js → CheckoutTimer-DjaTq2_0.js} +3 -3
  11. package/dist/{ChevronDownIcon-BA40Kl0C.js → ChevronDownIcon-CiYpE3Hq.js} +1 -1
  12. package/dist/{ClockIcon-DjC-doTv.js → ClockIcon-BSlM7HM2.js} +1 -1
  13. package/dist/{CloseIcon-BdwmaxDK.js → CloseIcon-ojn3Lny5.js} +1 -1
  14. package/dist/{CollectionView-DJMd-lQ5.js → CollectionView-BZuyx4kC.js} +6 -6
  15. package/dist/{CropImage-Ct6MRg_a.js → CropImage-BFtvLjTE.js} +1 -1
  16. package/dist/{Event-ETzQP0s-.js → Event-CqQ0yP-h.js} +91 -91
  17. package/dist/{EventPage-BDmpGhgp.js → EventPage-CMH2gocB.js} +14 -14
  18. package/dist/{Input-o-1w57H2.js → Input-Ck0Q7LwW.js} +1 -1
  19. package/dist/{MailIcon-DCMMhuHr.js → MailIcon-CqCCKGgC.js} +1 -1
  20. package/dist/{PasswordInput-zX7J--jb.js → PasswordInput-yTDvehkW.js} +1 -1
  21. package/dist/{RecommendationsRail-CKoChbYt.js → RecommendationsRail-CN_dtLWp.js} +131 -131
  22. package/dist/{ScarcityBadge-CwYWJOsJ.js → ScarcityBadge-BJrsvt6e.js} +9 -9
  23. package/dist/{SeriesPage-DccLByjM.js → SeriesPage-B1bK_MeR.js} +3 -3
  24. package/dist/{Success-BVYGRvb8.js → Success-D8dgqzkd.js} +50 -50
  25. package/dist/{TagIcon-CkfQvNGi.js → TagIcon-D_kSJfGZ.js} +1 -1
  26. package/dist/{ViewTicketsEmbed-D6ZLDsJe.js → ViewTicketsEmbed-rdcE9aPB.js} +5 -5
  27. package/dist/{WarningCircleIcon-Iq24pJJf.js → WarningCircleIcon-DhNvSQag.js} +1 -1
  28. package/dist/{WarningTriIcon-Dw5GnHpq.js → WarningTriIcon-V6pL3ERG.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-LOBSDFGW.js → api-Di0gC83p.js} +3 -3
  38. package/dist/{constants-COyf9Cef.js → constants-CQ8nJvPW.js} +1 -1
  39. package/dist/{copyToClipboard-C3IBl2Z1.js → copyToClipboard-zcPgoppJ.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-BS-A8oEj.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-BR82y7EY.js → event-transform-BpB65AAX.js} +6 -6
  46. package/dist/{eventStatusStream-1YtkEBw8.js → eventStatusStream-DTshTZoI.js} +1 -1
  47. package/dist/{fr-BhVwmvlV.js → fr-Ctu5i20f.js} +21 -3
  48. package/dist/{href-1o0O9xTA.js → href-B-lH1SYh.js} +2 -2
  49. package/dist/i18n--YZExMpe.js +28 -0
  50. package/dist/{i18n-02Y9QRm0.js → i18n-BpodazP1.js} +105 -105
  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.38 → 4.3.40}/main/de.js +1 -1
  57. package/dist/locales/{4.3.38 → 4.3.40}/main/es.js +1 -1
  58. package/dist/locales/{4.3.38 → 4.3.40}/main/fr.js +1 -1
  59. package/dist/locales/{4.3.38 → 4.3.40}/main/id.js +1 -1
  60. package/dist/locales/{4.3.38 → 4.3.40}/main/it.js +1 -1
  61. package/dist/locales/{4.3.38 → 4.3.40}/main/ja.js +1 -1
  62. package/dist/locales/{4.3.38 → 4.3.40}/main/ko.js +1 -1
  63. package/dist/locales/{4.3.38 → 4.3.40}/main/nl.js +1 -1
  64. package/dist/locales/{4.3.38 → 4.3.40}/main/pl.js +1 -1
  65. package/dist/locales/{4.3.38 → 4.3.40}/main/pt-br.js +1 -1
  66. package/dist/locales/{4.3.38 → 4.3.40}/main/tr.js +1 -1
  67. package/dist/locales/{4.3.38 → 4.3.40}/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-iUg6d6MJ.js} +3 -3
  70. package/dist/{orders-_DuPjm-g.js → orders-DABdaHOy.js} +1 -1
  71. package/dist/{phoneUtils-CbiDWdEC.js → phoneUtils-BPEB92vB.js} +1 -1
  72. package/dist/{pixels-BXobnFyk.js → pixels-BVOE_JFH.js} +2 -2
  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-CJ6IsR7f.js} +3 -12
  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-Cr5Uq0Ef.js} +9 -9
  81. package/dist/{tr-DTe5Urub.js → tr-CuaYXuAQ.js} +21 -3
  82. package/dist/{utils-DlMAhsnl.js → utils-CG0ZJ6gb.js} +2 -2
  83. package/dist/venue-calendar.css +1 -1
  84. package/dist/venue-calendar.es.js +498 -489
  85. package/dist/venue-calendar.iife.js +60 -60
  86. package/dist/venue-calendar.umd.js +54 -54
  87. package/dist/{zh-BnBN3ggx.js → zh-Bcr7RKpt.js} +21 -3
  88. package/package.json +2 -2
  89. package/dist/i18n-Dwg2jCJS.js +0 -28
  90. package/dist/imageOptimizer-DkJp4tei.js +0 -140
  91. /package/dist/locales/{4.3.38 → 4.3.40}/flow/de.js +0 -0
  92. /package/dist/locales/{4.3.38 → 4.3.40}/flow/es.js +0 -0
  93. /package/dist/locales/{4.3.38 → 4.3.40}/flow/fr.js +0 -0
  94. /package/dist/locales/{4.3.38 → 4.3.40}/flow/id.js +0 -0
  95. /package/dist/locales/{4.3.38 → 4.3.40}/flow/it.js +0 -0
  96. /package/dist/locales/{4.3.38 → 4.3.40}/flow/ja.js +0 -0
  97. /package/dist/locales/{4.3.38 → 4.3.40}/flow/ko.js +0 -0
  98. /package/dist/locales/{4.3.38 → 4.3.40}/flow/nl.js +0 -0
  99. /package/dist/locales/{4.3.38 → 4.3.40}/flow/pl.js +0 -0
  100. /package/dist/locales/{4.3.38 → 4.3.40}/flow/pt-br.js +0 -0
  101. /package/dist/locales/{4.3.38 → 4.3.40}/flow/tr.js +0 -0
  102. /package/dist/locales/{4.3.38 → 4.3.40}/flow/zh.js +0 -0
@@ -0,0 +1,60 @@
1
+ /**
2
+ * In-memory cache of gate passwords the server has already accepted.
3
+ *
4
+ * WHY THIS IS NOT sessionStorage (security audit 2026-08-14, F36).
5
+ *
6
+ * `CollectionView` used to persist the plaintext collection password to
7
+ * `sessionStorage` under `micdrop:authedCollections:list`. This widget is a
8
+ * light-DOM embed: it runs on the VENUE'S OWN ORIGIN, alongside whatever else
9
+ * that page loads — tag managers, RUM agents, session-replay recorders,
10
+ * chat widgets. `sessionStorage` is readable by every one of them, and it kept
11
+ * the password readable for the whole tab session, long after the visitor
12
+ * typed it. Gate passwords are stored plaintext at rest server-side and are
13
+ * SHARED BY EVERY ATTENDEE of a private/pre-sale event, so one harvested value
14
+ * defeats the gate for everyone.
15
+ *
16
+ * A module-scoped Map keeps the same UX for the case that actually matters —
17
+ * the widget is a SPA, so navigating collection → event → back re-mounts the
18
+ * component and the unlock still survives — while removing the cross-script
19
+ * read surface and the persistence. The trade is deliberate and narrow: a hard
20
+ * page RELOAD now re-prompts, where before it did not.
21
+ *
22
+ * The server remains the authority either way. A cached password that no
23
+ * longer matches comes back as `passwordRequired` and the caller re-prompts,
24
+ * so nothing here can reveal gated content on its own.
25
+ */
26
+ /** Which gate a cached password belongs to. Keys are namespaced by scope so an
27
+ * unlocked collection never satisfies the per-event gate (or vice versa). */
28
+ export type GateScope = 'collection' | 'event';
29
+ /** Remember a password the server just accepted. No-op for an empty password. */
30
+ export declare function rememberGatePassword(scope: GateScope, id: string | number, password?: string): void;
31
+ /** Recall a previously accepted password for this page load, if any. */
32
+ export declare function recallGatePassword(scope: GateScope, id: string | number): string | undefined;
33
+ /** Drop a cached password the server has since rejected (rotated / revoked). */
34
+ export declare function forgetGatePassword(scope: GateScope, id: string | number): void;
35
+ /**
36
+ * Record that a gate has been unlocked for this page load.
37
+ *
38
+ * This is the ONLY store of "already authenticated" for the event/collection
39
+ * gates. It is deliberately NOT web storage:
40
+ *
41
+ * - a blocked store (sandboxed iframe, Safari private mode, a partitioned
42
+ * third-party context) made the old `sessionStorage.getItem` READ throw, and
43
+ * that throw propagated out of the `isLocked` derivation and out of the
44
+ * correct-password handler — so on a venue's own domain a buyer could type
45
+ * the RIGHT password and still be told nothing happened. A Map cannot throw,
46
+ * so a blocked store now degrades to "re-prompt on the next mount", which is
47
+ * the honest fallback.
48
+ * - it is unreachable from other scripts on the host page, closing the forge
49
+ * surface described on LEGACY_STORAGE_KEYS.
50
+ *
51
+ * The server stays the authority: an unlock recorded here only suppresses the
52
+ * prompt, and any payload that still arrives with `passwordRequired` re-locks.
53
+ */
54
+ export declare function rememberGateUnlock(scope: GateScope, id: string | number): void;
55
+ /** Whether this page load has already cleared that gate. Never throws. */
56
+ export declare function recallGateUnlock(scope: GateScope, id: string | number): boolean;
57
+ /** Re-lock a gate (password rotated / revoked, or the server said so). */
58
+ export declare function forgetGateUnlock(scope: GateScope, id: string | number): void;
59
+ /** Test hook: wipe the whole cache between cases. */
60
+ export declare function clearGatePasswordCache(): void;
@@ -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>;