@scopetickets/checkout 0.1.0 → 0.1.1

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.
@@ -0,0 +1,3751 @@
1
+ import { AvatarAssets } from '@scopetickets/avatar';
2
+ import { CSSProperties } from 'react';
3
+ import { IconAppearance } from '@scopetickets/icons';
4
+ import { PointerEvent as PointerEvent_2 } from 'react';
5
+ import * as react from 'react';
6
+ import * as react_jsx_runtime from 'react/jsx-runtime';
7
+ import { ReactNode } from 'react';
8
+ import { Ref } from 'react';
9
+ import { RefObject } from 'react';
10
+
11
+ /** One url, made absolute and put on the configured CDN. */
12
+ export declare function absoluteArtworkUrl(url: string | null | undefined, origin?: string): string | undefined;
13
+
14
+ /** WHO IS BUYING, WHERE THE FLOW ASKS, AND WHAT THE ANSWER COSTS IT. */
15
+ /** What a Scope Tickets account carries that this flow spends. */
16
+ declare type Account = {
17
+ /**
18
+ * The stored avatar VALUE, exactly as the profile carries it — a URI, or one of
19
+ * `@scopetickets/avatar`'s prefixed forms. `null` is a real account that has never set
20
+ * one, which is a fact about the ACCOUNT and not a treatment: what gets drawn for it is
21
+ * `buyerAvatarValue`'s decision, and that is the placeholder.
22
+ */
23
+ readonly avatar: string | null;
24
+ readonly name: string | null;
25
+ readonly email: string | null;
26
+ readonly phone: string | null;
27
+ /** The type this account holder IS, or `null`. Not a composition key — see `user-types`. */
28
+ readonly userTypeKey: string | null;
29
+ };
30
+
31
+ /** How a step tells its card whether its question is answered. */
32
+ export declare type AnswerReporting = {
33
+ readonly onAnsweredChange?: (answered: boolean) => void;
34
+ };
35
+
36
+ /**
37
+ * THE CDN A HOST SHOULD RESOLVE AGAINST — the same one this widget uses.
38
+ *
39
+ * PUBLISHED BECAUSE A HOST THAT SUPPLIES `cartLines` OWNS THE PICTURE, and cannot
40
+ * resolve it correctly without this: the url on the wire keeps the host of whichever
41
+ * environment uploaded the file, so the stored one answers 403 from anywhere else.
42
+ * Measured on TwinkleTown's staging series, 2026-09-10 — the same path is 403 on
43
+ * `cdn-dev.scopetickets.com` and 200 on `cdn.scopetickets.com`.
44
+ *
45
+ * A HOST CANNOT READ `ENVIRONMENT_URLS` ITSELF. `@scopetickets/api` is this package's
46
+ * dependency and not the host's, so without this the only way to a working `<img>` is a
47
+ * hostname typed into somebody's integration — which is the fact this module exists to
48
+ * keep in one place.
49
+ */
50
+ export declare function artworkOrigin(environment?: Environment): string;
51
+
52
+ /**
53
+ * THE RUN'S OWN PICTURE, resolved to something an `<img>` on somebody else's page can load.
54
+ *
55
+ * TWO FACTS ABOUT THE WIRE, AND EACH ONE LOOKS LIKE SUCCESS WHEN IT IS WRONG.
56
+ * `@scopetickets/avatar` draws `<img src>` unconditionally, so a bad url and a missing one
57
+ * both render as its own fill — which is roughly what a ticket looks like anyway.
58
+ *
59
+ * THE PICTURE IS `Backgrounds`, NOT `Cover`. `Cover` is the link preview: a different asset,
60
+ * and on its own host.
61
+ *
62
+ * THE HOST IS NOT THE PLATFORM'S TO CHOOSE. Artwork urls are stored absolute, keeping the
63
+ * host of whichever environment UPLOADED the file — so a run authored against dev answers
64
+ * `cdn-dev` from production forever. The path is the platform's; the host is this
65
+ * integration's, and `ENVIRONMENT_URLS[env].artworkUrl` states it.
66
+ */
67
+
68
+ /** The artwork half of the wire's `Theme`, and nothing else it carries. */
69
+ export declare type ArtworkTheme = {
70
+ readonly Backgrounds?: readonly string[] | null;
71
+ readonly Cover?: string | null;
72
+ };
73
+
74
+ /**
75
+ * THE KEY THIS PRODUCT SPENDS FOR THAT TYPE, or `undefined` where it offers none — which
76
+ * is a real answer and not a failure: the head goes without a key, and an ABSENT key is
77
+ * the platform's own way of saying "no user type". A host that keyed its own composition
78
+ * by assignment gets that key back, so its composition keeps working.
79
+ *
80
+ * ABSENT AND NULL ARE NOT THE SAME ANSWER. `Ticket.UserTypes` is documented NULL — not
81
+ * empty — when the product names none, so null and `[]` are both the platform SAYING none
82
+ * and an unmatched key is dropped. A field that is not there at all is nobody having said
83
+ * anything, and guessing "none" from silence would strip a host's working key and charge
84
+ * every head full price.
85
+ */
86
+ export declare function assignmentFor(product: Partial<Pick<Ticket, 'UserTypes'>>, key: string): string | undefined;
87
+
88
+ declare interface AttendeeTicket {
89
+ ID: number;
90
+ AttendeeTicketKey: string;
91
+ AttendeeID: number;
92
+ TicketID: number | null;
93
+ TransactionID: number;
94
+ Status: string;
95
+ TotalAmount: number;
96
+ Currency: string;
97
+ TimeBooked: string;
98
+ OrganisationAmount: number;
99
+ ScopeAmount: number;
100
+ BrokerAmount: number;
101
+ DiscountAmount: number;
102
+ }
103
+
104
+ /**
105
+ * WHAT WE ASKED FOR, ZIPPED WITH WHAT CAME BACK — the user type per created item.
106
+ *
107
+ * A BULK ADD ANSWERS IN REQUEST ORDER, which is the one assumption here and is why this
108
+ * is a function with a guard rather than a line inside the hook: if the platform returns
109
+ * a different NUMBER of items than were asked for, the correspondence is broken and
110
+ * nothing about it can be trusted, so the answer is `null` — no split — rather than a
111
+ * plausible mislabelling of somebody's money.
112
+ *
113
+ * `names` MAPS KEYS TO WORDS, because the wire deals in assignment keys and a cart line
114
+ * says "Adult". An unrecognised key is left unnamed rather than printed raw.
115
+ */
116
+ export declare function attributeCartItems(requested: readonly RequestedItem[], items: readonly CartItem[], names: Readonly<Record<string, string>>): readonly AttributedCartItem[];
117
+
118
+ /**
119
+ * A cart item with the user type it was BOUGHT FOR attached — see `attributeCartItems`,
120
+ * which is the only thing that can attach it.
121
+ */
122
+ export declare type AttributedCartItem = CartItem & {
123
+ readonly userType?: string;
124
+ };
125
+
126
+ export declare const AUTH_CARDS: Record<AuthCardId, AuthCard>;
127
+
128
+ /** THE FIVE AUTH CARDS — every card the three checkpoints draw between them. */
129
+ export declare type AuthCard = {
130
+ readonly copy: {
131
+ readonly title: string;
132
+ readonly subtitle: string;
133
+ };
134
+ readonly actions: readonly CardAction[];
135
+ /**
136
+ * The badge on the hero, and the hole it sits in — or absent where the design hides it.
137
+ * See `DevAvatar.accessory` for why the shape travels with the node.
138
+ */
139
+ readonly accessory?: {
140
+ readonly shape: 'square' | 'circle';
141
+ readonly content: ReactNode;
142
+ /**
143
+ * Names this badge for the avatar's own transition — see `STEP_ACCESSORY`, and
144
+ * `AvatarAccessory.id` in the package.
145
+ */
146
+ readonly id: string;
147
+ };
148
+ };
149
+
150
+ /**
151
+ * The five cards the three checkpoints draw between them, named by what each SAYS
152
+ * rather than by where it appears — `SIGN_IN_RECOGNISED` is one node at two
153
+ * checkpoints, and naming it twice is how two copies of one card fall out of step.
154
+ */
155
+ declare type AuthCardId =
156
+ /**
157
+ * the design `Login-Idle-Unrecognised`. "Already Have An Account?" over the guest
158
+ * placeholder, with Sign in with ▮ and Create Account.
159
+ */
160
+ 'SIGN_IN_UNRECOGNISED'
161
+ /**
162
+ * the design. The same card with `CONTINUE_AS_GUEST` added beneath — the
163
+ * `ORDER_CREATED` reading, where there IS an order and guest checkout is therefore a
164
+ * real route.
165
+ */
166
+ | 'SIGN_IN_UNRECOGNISED_GUEST'
167
+ /**
168
+ * the design `Login-Idle-Recognised`. The buyer's own face under a keyhole badge,
169
+ * "Welcome Back!", and the two ways back in — passkey first.
170
+ */
171
+ | 'SIGN_IN_RECOGNISED'
172
+ /**
173
+ * the design `Login-Idle-SignedIn`. "Welcome Back! / You're ready to go." and a single
174
+ * `SIGN_OUT`.
175
+ */
176
+ | 'ACCOUNT_READY'
177
+ /**
178
+ * the design `SignupPrompt`. "Add to Account / Enjoy faster checkout and access to
179
+ * discounts." — Create Account, Sign In, Skip.
180
+ */
181
+ | 'ADD_TO_ACCOUNT';
182
+
183
+ /** The session, as the flow sees it — everything a checkpoint decides from. */
184
+ declare type AuthSession = {
185
+ readonly auth: AuthState;
186
+ readonly guest: GuestChoice;
187
+ };
188
+
189
+ /** The three ways a buyer arrives, as ONE value. */
190
+ declare type AuthState =
191
+ /**
192
+ * Nobody. No account stored, no session — the first visit from this browser, or a buyer
193
+ * who signed out. Carries no account, because there is none to carry: that absence is
194
+ * the union's whole point.
195
+ */
196
+ {
197
+ readonly status: 'UNRECOGNISED';
198
+ }
199
+ /** An account we hold, without a live session. */
200
+ | {
201
+ readonly status: 'RECOGNISED';
202
+ readonly avatar: string | null;
203
+ }
204
+ /** Authenticated. Nothing further is asked; the account is spendable. */
205
+ | {
206
+ readonly status: 'AUTHENTICATED';
207
+ readonly account: Account;
208
+ };
209
+
210
+ /**
211
+ * WHERE BACK GOES — the whole navigation, as one function.
212
+ *
213
+ * IT IS A TREE AND NOT A HISTORY, which is the decision this encodes. Show QRs is reachable
214
+ * from the root AND from a ticket, and a history would send a buyer back to whichever they
215
+ * came from; this sends them to the root either way. That is the right answer because the
216
+ * carousel is the whole booking's codes rather than one ticket's — going "back" from all of
217
+ * them to one of them is not a step backwards.
218
+ *
219
+ * `BOOKING` HAS NO BACK, and `null` is how it says so: the root's header draws a Close, and
220
+ * closing the island is not navigation.
221
+ *
222
+ * ── AND THE FORM BACKS OUT PAST A CARD THAT IS STILL GATED ──────────────────
223
+ *
224
+ * The form is reached two ways and they are not the same journey. From a NAMED ticket's
225
+ * quick action it is a detour off that ticket's card, and Back returns to it. From an
226
+ * unnamed row it is what the row opened INSTEAD of that card, and backing onto the card
227
+ * anyway would hand the buyer the "Your Ticket" screen the gate exists to keep shut — so
228
+ * Back goes to the list, which is where they pressed.
229
+ *
230
+ * The booking is optional because three of the four answers do not need it, and without one
231
+ * nothing is gated — `ticketGate` says why — so the form backs out to its ticket exactly as
232
+ * it did before there was a gate. `BookingIsland` always has one to pass.
233
+ */
234
+ export declare function backFrom(screen: BookingScreen, booking?: Booking | null): BookingScreen | null;
235
+
236
+ /** One ticket, as the platform holds it. */
237
+ export declare type BookedTicket = {
238
+ /**
239
+ * The platform's `AttendeeTicketKey`, and the QR code's own content. Stable for the life
240
+ * of the ticket, which is why the carousel and the ticket card are keyed on it — and it
241
+ * is one of the two keys a save is ADDRESSED BY, which is why nothing else about the
242
+ * ticket has to be known before a holder can be named.
243
+ */
244
+ readonly key: string;
245
+ /**
246
+ * THE SAME ROW'S NUMERIC ID — `AttendeeTicket.ID`, which the platform's own
247
+ * send-a-copy call is addressed by. The save is not: it takes the key above.
248
+ *
249
+ * `0` where the attendee-ticket list did not answer, which is the one case a ticket
250
+ * cannot be SENT — see the gateway's `sendTicket`.
251
+ */
252
+ readonly attendeeTicketId: number;
253
+ readonly holder: Ticketholder;
254
+ };
255
+
256
+ /** A booking as the cards draw it — the record, dressed. */
257
+ export declare type Booking = {
258
+ readonly transactionKey: string;
259
+ readonly occasion: BookingOccasion;
260
+ readonly tickets: readonly BookingTicket[];
261
+ };
262
+
263
+ /**
264
+ * MY BOOKING'S OWN WORDS — the four cards after the money moved.
265
+ *
266
+ * DATA, LIKE `step-cards`. A host defers these screens because it does not want to draw
267
+ * them, so it cannot then be asked what they should say. Nothing here holds state and
268
+ * nothing here presses anything: `BookingIsland` composes the props, and this file is the
269
+ * copy, the badges and the two facts about the header.
270
+ */
271
+ export declare const BOOKING_COPY: {
272
+ /** The root. A statement of what was bought, which is why the title is a subject. */
273
+ readonly title: "Booking Details";
274
+ readonly myBooking: "My Booking";
275
+ /**
276
+ * WHEN THE PLATFORM NAMES NOBODY — which is every booking this widget makes today, since
277
+ * no attendee is created for a ticket bought through it.
278
+ *
279
+ * "AWAITING DETAILS" AND NOT "TICKETHOLDER". It says what is true of the ticket rather
280
+ * than what kind of thing the line is: nobody has been named yet, and somebody can be.
281
+ * The design sets it a step quieter than the user type beneath it for the same reason.
282
+ */
283
+ readonly awaiting: "Awaiting Details";
284
+ /** What is offered on a row nobody is named on, where a name can actually be added. */
285
+ readonly add: "Add";
286
+ /** The way to every code at once. Plural even for one — see `codes`, which is not. */
287
+ readonly showCodes: "Show QRs";
288
+ /** The codes screen, and the run inside it. */
289
+ readonly codes: "Show QR";
290
+ readonly codesRegion: "Your tickets";
291
+ /** "1". Counted from one, because it is being read rather than indexed. */
292
+ readonly position: (at: number) => string;
293
+ readonly previous: "Previous ticket";
294
+ readonly next: "Next ticket";
295
+ /**
296
+ * "1 of 3", IN TWO WEIGHTS OF INK — the design sets the position full strength and the
297
+ * run it is out of at Text60, so the number a buyer is looking for reads first.
298
+ *
299
+ * SPLIT HERE RATHER THAN IN THE COMPONENT, because it is a sentence with a part
300
+ * emphasised and that is a fact about the copy. The space belongs to the second half.
301
+ */
302
+ readonly positionOf: (count: number) => string;
303
+ /** What a code IS, for anyone who cannot see it. */
304
+ readonly codeLabel: (name: string) => string;
305
+ /**
306
+ * AND WHAT STANDS IN ITS PLACE when it did not come back. It says the ticket is fine,
307
+ * because that is the buyer's real question: a blank square where a code should be reads
308
+ * as a ticket that has been cancelled.
309
+ */
310
+ readonly codeMissing: "Code unavailable. Your ticket is still valid.";
311
+ /** One ticket. Its title is the holder's — see `ticketTitle`. */
312
+ readonly ticketFallbackTitle: "Your Ticket";
313
+ readonly editHolder: "Edit Ticketholder";
314
+ /** The quick actions' two lines each — see `QuickAction.lines`. */
315
+ readonly showCodeLines: readonly ["Show", "QR"];
316
+ readonly editHolderLines: readonly ["Edit", "Ticketholder"];
317
+ /** The edit form. */
318
+ readonly firstName: "First Name";
319
+ readonly lastName: "Last Name";
320
+ readonly email: "Email";
321
+ readonly save: "Save";
322
+ readonly saving: "Saving…";
323
+ /**
324
+ * SENDING A COPY OF A TICKET, which this widget CAN do now — `SendSingleEmail` is the
325
+ * platform's, and the quick action on a ticket's own card is the way to it.
326
+ *
327
+ * The wallet badge still has no entry here, and that is the point: it is Apple's mark and
328
+ * the host supplies the whole node. See `BookingIslandProps.walletBadge`.
329
+ */
330
+ readonly sendTicketLines: readonly ["Send", "Ticket"];
331
+ readonly sendTicket: "Send Ticket";
332
+ readonly sendPrompt: "Enter recipient email address below.";
333
+ readonly send: "Send";
334
+ readonly sending: "Sending…";
335
+ /** Where it went, said back — the card's only proof that anything happened. */
336
+ readonly sentTo: (email: string) => string;
337
+ readonly sendFailed: "The ticket could not be sent. Please try again.";
338
+ /** The root card's way out, and every other card's way back. */
339
+ readonly close: "Close";
340
+ readonly back: "Back";
341
+ /** While the booking is being read. */
342
+ readonly loadingTitle: "Opening Your Booking";
343
+ readonly loadingSubtitle: "One moment.";
344
+ /**
345
+ * A CART THE PLATFORM HOLDS NO TICKETS AGAINST — and it is NOT a terminal card.
346
+ *
347
+ * THE READ CAN BE EARLY. A booking is opened the instant a purchase finishes, which is
348
+ * within a second of the transaction being finalized; a platform that has not finished
349
+ * indexing it answers with nothing, and that answer stops being true a moment later. So
350
+ * this leads with asking again rather than with the confirmation email — a buyer who has
351
+ * just paid and is looking at "no tickets" needs a button, not a consolation.
352
+ *
353
+ * IT IS ALSO WHAT A STALE CART KEY LOOKS LIKE on a page mounted cold, where asking again
354
+ * costs one request and answers the same way. One card serves both because the buyer's
355
+ * next move is identical.
356
+ */
357
+ readonly noneTitle: "No Tickets Here Yet";
358
+ readonly noneSubtitle: "We could not find any tickets on this booking. Try again, or check your email for your confirmation.";
359
+ readonly retry: "Try Again";
360
+ };
361
+
362
+ /**
363
+ * THE SEAM. Everything this island asks of the platform, and nothing about WHEN — that is
364
+ * the hook's, exactly as it is for `SignInGateway`.
365
+ *
366
+ * THREE CALLS AND NOT FOUR. Reading a booking is one request: `Transactions/ByKey` carries
367
+ * the transaction's own key alongside the items, so nothing has to be looked up before a
368
+ * save can be addressed.
369
+ */
370
+ export declare type BookingGateway = {
371
+ /** The booking behind a cart, or `null` where the cart has not become one. */
372
+ readonly read: (cartKey: string) => Promise<BookingRecord | null>;
373
+ /**
374
+ * Name a person on one ticket — creating the attendee where there is none, which is the
375
+ * ordinary case. `false` is the platform declining; anything worse keeps travelling and
376
+ * becomes a notice.
377
+ *
378
+ * ADDRESSED BY THE TWO KEYS AND NOTHING ELSE: the transaction's and the ticket's, which
379
+ * is why every ticket a read can draw is a ticket this can name — there is no row number
380
+ * to be missing. The platform binds the attendee itself, so there is no id to hand back
381
+ * and none to keep for the next edit: re-addressing the same item is how a holder is
382
+ * changed.
383
+ */
384
+ readonly saveHolder: (transactionKey: string, ticketKey: string, holder: Ticketholder) => Promise<boolean>;
385
+ /** One ticket's code, as an SVG document, or `null` where nothing usable came back. */
386
+ readonly code: (key: string) => Promise<string | null>;
387
+ /**
388
+ * Send a copy of one ticket to an address. `false` is "it did not go" and nothing more:
389
+ * the endpoint says nothing about why, so neither does this.
390
+ *
391
+ * BY THE NUMERIC ID — `BookedTicket.attendeeTicketId`, which is what the platform's own
392
+ * call takes and is `0` where the list did not answer for the ticket.
393
+ */
394
+ readonly sendTicket: (attendeeTicketId: number, email: string) => Promise<boolean>;
395
+ };
396
+
397
+ /**
398
+ * MY BOOKING — the last face of the widget, and the only one that is not a purchase.
399
+ *
400
+ * ── FOUR CARDS AND ONE MOUNT ─────────────────────────────────────────────────
401
+ *
402
+ * The booking, every code, one ticket, and who that ticket is for. They are one component
403
+ * for the reason `RestingIsland`'s two faces are: the island's planes cross-fade and its
404
+ * surface morphs because the `contentKey` changed underneath ONE host. Four components would
405
+ * make every move between them a remount, and a remount has nothing to transition from.
406
+ *
407
+ * ── IT IS NOT A WALK ─────────────────────────────────────────────────────────
408
+ *
409
+ * Nothing here is a step. There is no order to complete, nothing is excused, and no card
410
+ * gates the one after it — so there is no `PurchaseStep`, no preflight and no `at` index.
411
+ * What there is instead is a TREE, and `backFrom` is the whole of it.
412
+ *
413
+ * ── AND IT IS REACHABLE TWICE ────────────────────────────────────────────────
414
+ *
415
+ * `ScopeTicketsCheckout` hands over to it when a purchase finishes, and a host can mount it
416
+ * on its own page with a cart key. Both are the same component with the same props, which is
417
+ * why the occasion arrives as data rather than being read out of a flow that may not exist.
418
+ */
419
+ export declare function BookingIsland({ appKey, source, cartKey, occasion, attribution, buyerAvatar, buyerAvatarAssets, seed, walletBadge, initialPresentation, mode, align, }: BookingIslandProps): react_jsx_runtime.JSX.Element;
420
+
421
+ export declare type BookingIslandProps = {
422
+ /** WHICH IMPLEMENTATION IS ASKING — the Bearer token, as everywhere else here. */
423
+ readonly appKey: string;
424
+ readonly source?: CheckoutSource;
425
+ /**
426
+ * THE CART THE BOOKING WAS MADE FROM, and not the transaction's key.
427
+ *
428
+ * `Transactions/ByKey/{cartKey}` is the one endpoint that answers with a holder per
429
+ * ticket, and it takes this. The transaction's own key comes back inside the response and
430
+ * is what a save is addressed to — see `bookingGateway`.
431
+ */
432
+ readonly cartKey: string;
433
+ /**
434
+ * WHAT WAS BOUGHT INTO. The caller's, because the platform does not answer for it — see
435
+ * `BookingOccasion`, where that is argued.
436
+ */
437
+ readonly occasion: BookingOccasion;
438
+ /** The product and the user type per ticket, where the caller knows them. */
439
+ readonly attribution?: TicketAttribution;
440
+ /**
441
+ * THE BUYER'S OWN FACE, for the pill and for nothing else — see the root card, where the
442
+ * collapsed island shows WHOSE booking this is and the opened one shows WHAT it is.
443
+ *
444
+ * Absent draws the guest placeholder, which is what a booking opened on its own page by
445
+ * a host that has no session gets: `buyerAvatarValue` never answers null, so this is
446
+ * only ever unset by a caller that does not know.
447
+ */
448
+ readonly buyerAvatar?: string;
449
+ /** Where a `default:<id>` gets its pixels — see `avatarAssetsFor`. */
450
+ readonly buyerAvatarAssets?: AvatarAssets;
451
+ /**
452
+ * THE TICKETS, WHERE THE CALLER HAS ALREADY READ THEM — see `useBooking`'s own note. A
453
+ * host mounting this on a cold page has not, and leaves it out.
454
+ */
455
+ readonly seed?: BookingRecord;
456
+ /**
457
+ * THE WALLET BADGE, AS THE HOST'S OWN NODE — not a press this widget paints a button for.
458
+ *
459
+ * ── WHY THIS ONE IS A `ReactNode` WHERE EVERY OTHER CONTROL HERE IS A CALLBACK ──
460
+ *
461
+ * "Add to Apple Wallet" is APPLE'S MARK, and its size, corner, ground, lock-up and
462
+ * wording are theirs to specify and ours to reproduce exactly or not at all. Painting an
463
+ * approximation of it in this design system's tokens — which is what a callback would
464
+ * oblige — produces a black pill with the right words and none of the right anything
465
+ * else, sitting on a card where every other control is ours.
466
+ *
467
+ * There is no `.pkpass` endpoint on the platform either, so the press has nothing here to
468
+ * do. Both halves are the host's, so the whole control is: it is given the slot the design
469
+ * draws it in, centred above the rule, and this file neither paints it nor presses it.
470
+ *
471
+ * ABSENT DRAWS NOTHING, which is what the platform can honour today.
472
+ */
473
+ readonly walletBadge?: (ticketKey: string) => ReactNode;
474
+ readonly initialPresentation?: 'pill' | 'card';
475
+ readonly mode?: IslandMode;
476
+ readonly align?: IslandAlignment;
477
+ };
478
+
479
+ /**
480
+ * WHAT WAS BOUGHT INTO. The caller's, for the reason at the top of this file.
481
+ *
482
+ * `day` is `YYYY-MM-DD` and the two times are `HH:MM`, which is the shape the rest of this
483
+ * package already speaks — see `island-timeslots`, whose `parseWallClockTime` is what turns
484
+ * a wire value into one.
485
+ */
486
+ export declare type BookingOccasion = {
487
+ /** "Ice Skating". */
488
+ readonly name: string;
489
+ /** `YYYY-MM-DD` in the VENUE's local day, never the device's. */
490
+ readonly day: string;
491
+ /** The run's picture, for the hero. */
492
+ readonly artwork: string | null;
493
+ /** `HH:MM`, or absent where the event sells no sessions. */
494
+ readonly startTime: string | null;
495
+ readonly endTime: string | null;
496
+ };
497
+
498
+ /** What the platform holds: the transaction, and who each of its tickets is for. */
499
+ export declare type BookingRecord = {
500
+ /** What a save is addressed to. Read off the response; a cart key will not do. */
501
+ readonly transactionKey: string;
502
+ readonly tickets: readonly BookedTicket[];
503
+ };
504
+
505
+ /**
506
+ * WHICH OF THE FOUR CARDS IS SHOWING.
507
+ *
508
+ * ONE VALUE, AND EACH ARM CARRIES WHAT ONLY IT NEEDS. The alternative — a screen name
509
+ * beside an optional ticket key beside a carousel index — can say "the edit card, for no
510
+ * ticket", which is a card with three empty fields and a Save that addresses nobody.
511
+ *
512
+ * THE INDEX LIVES ON `CODES` FOR THE SAME REASON. It is where the run is scrolled to, which
513
+ * is a fact about that card and about nothing else: kept beside the screen, a buyer who
514
+ * leaves and comes back opens on the first ticket, which is right — they arrived by pressing
515
+ * Show QRs, not by resuming.
516
+ */
517
+ export declare type BookingScreen =
518
+ /** The root: what was bought, and who each ticket is for. Its way out is out of the island. */
519
+ {
520
+ readonly kind: 'BOOKING';
521
+ }
522
+ /** Every code, one at a time. `at` counts from zero. */
523
+ | {
524
+ readonly kind: 'CODES';
525
+ readonly at: number;
526
+ }
527
+ /** One ticket, and the two things that can be done with it. */
528
+ | {
529
+ readonly kind: 'TICKET';
530
+ readonly ticketKey: string;
531
+ }
532
+ /** Who that ticket is for, as a form. */
533
+ | {
534
+ readonly kind: 'EDIT';
535
+ readonly ticketKey: string;
536
+ }
537
+ /**
538
+ * WHERE A COPY OF IT GOES — an address, and nothing else. Not the holder's form: this
539
+ * sends the ticket to WHOEVER the buyer names, which is the whole point of it, and
540
+ * changing who the ticket BELONGS to is the other card.
541
+ */
542
+ | {
543
+ readonly kind: 'SEND';
544
+ readonly ticketKey: string;
545
+ };
546
+
547
+ /**
548
+ * WHAT IS KNOWN ABOUT THE BOOKING — one value, never a record beside a pair of flags.
549
+ *
550
+ * `NONE` IS NOT `ERROR` AND IT IS NOT `LOADING`. A cart that never became a transaction is
551
+ * a complete, successful answer — there is nothing to show — and it needs a card that says
552
+ * so rather than a spinner that never stops or a failure nobody caused.
553
+ */
554
+ export declare type BookingState = {
555
+ readonly status: 'LOADING';
556
+ } | {
557
+ readonly status: 'LOADED';
558
+ readonly record: BookingRecord;
559
+ } | {
560
+ readonly status: 'NONE';
561
+ } | {
562
+ readonly status: 'ERROR';
563
+ readonly error: Error;
564
+ };
565
+
566
+ /** One ticket as the cards draw it. */
567
+ export declare type BookingTicket = BookedTicket & {
568
+ /** "Peak" — the product, where the caller knows it. */
569
+ readonly product: string | null;
570
+ /** "Adult" — the user type, where the caller knows it. */
571
+ readonly userType: string | null;
572
+ };
573
+
574
+ /** Which period the pill names — and therefore which picker it opens. */
575
+ export declare type CalendarGrain = 'YEAR' | 'MONTH';
576
+
577
+ /**
578
+ * The period a picker sits inside, as the second pill in its header — the design,
579
+ * inside `IslandHeaderWrapper`'s leading group.
580
+ */
581
+ export declare function CalendarGrainButton({ month, grain, onPress }: CalendarGrainButtonProps): react_jsx_runtime.JSX.Element;
582
+
583
+ export declare type CalendarGrainButtonProps = {
584
+ /**
585
+ * The month ON SCREEN, not the run's first — the pickers publish theirs as they page
586
+ * (`onVisibleMonthChange`), and a run that crosses New Year says 2026 over December and
587
+ * 2027 over January.
588
+ */
589
+ readonly month: CalendarMonthKey;
590
+ /** Which half of that key to say. See `CalendarGrain`. */
591
+ readonly grain: CalendarGrain;
592
+ /** Where pressing it goes — the picker for the period it names. */
593
+ readonly onPress?: () => void;
594
+ };
595
+
596
+ /** Laying a run of days out as a month grid — the day picker's whole domain. */
597
+ /** `YYYY-MM`.. */
598
+ export declare type CalendarMonthKey = string;
599
+
600
+ /** A run of linked events, as the calendar needs it. */
601
+ export declare type CalendarSeries = {
602
+ /** Ordered by day, then start. May hold several entries for one day. */
603
+ readonly events: readonly CalendarSeriesEvent[];
604
+ };
605
+
606
+ /** One event in the run, as the calendar needs it. */
607
+ export declare type CalendarSeriesEvent = {
608
+ readonly eventKey: string;
609
+ readonly name: string;
610
+ /**
611
+ * `YYYY-MM-DD`. The GROUPING day, not the start: an event can run past midnight, so
612
+ * this is what says which day it belongs to.
613
+ */
614
+ readonly day: string;
615
+ };
616
+
617
+ /**
618
+ * A card's button as this file describes one — the role and the words, plus whatever
619
+ * mark the design puts beside them. `onPress` is the gallery's, since a fixture has
620
+ * nowhere to send anybody.
621
+ */
622
+ export declare type CardAction = Pick<IslandAction, 'role' | 'mark'> & {
623
+ /**
624
+ * A `ReactNode` because the pay button composes a brand mark into its own words — "Pay
625
+ * with [mark] • 1123", as the design draws it.
626
+ */
627
+ readonly label: ReactNode;
628
+ /** What the button DOES, for the few that do anything. */
629
+ readonly onPress?: () => void;
630
+ /**
631
+ * THE DETOUR THIS BUTTON OPENS — the other half of `PurchaseStep.detourFrom`, which
632
+ * says which card a step hangs off but not what opens it.
633
+ *
634
+ * Declared rather than handled, because this file is data and has no state to set. A
635
+ * button without it falls through to advancing the flow, and on the last card that
636
+ * means committing: "Select Payment Method" was placing the order.
637
+ */
638
+ readonly opens?: PurchaseStepId;
639
+ /**
640
+ * THIS BUTTON ATTEMPTS THE PAYMENT AGAIN. Declared rather than handled, like `opens` —
641
+ * what a retry DOES depends on who reported the failure, and this file knows neither.
642
+ */
643
+ readonly retries?: boolean;
644
+ /**
645
+ * SHUT, whatever the step's own answer says. The primary is gated on the step being
646
+ * answered; this is for a button that is unavailable for a reason of its own — Re-send
647
+ * serving its cooldown, and nothing else so far.
648
+ */
649
+ readonly disabled?: boolean;
650
+ /**
651
+ * THIS BUTTON CHOOSES THE ACCOUNT ROUTE — the offer's Create Account, and the only
652
+ * thing that opens the sub-flow behind it.
653
+ *
654
+ * Declared rather than handled, like `opens` and `retries`: what it costs is the walk's
655
+ * question, and this file is data with no state to set. Without it the widget walks
656
+ * `GUEST` at every checkpoint, `makingAccount` never becomes true, and the five steps
657
+ * after the offer are skipped — which is what happens today.
658
+ */
659
+ readonly takesAccount?: boolean;
660
+ /**
661
+ * THIS BUTTON CHARGES. Declared rather than handled, like `opens` and `retries`: what
662
+ * paying DOES depends on whether there is a platform behind the widget, and this file
663
+ * knows neither that nor who the buyer is.
664
+ */
665
+ readonly pays?: boolean;
666
+ /**
667
+ * THIS BUTTON CHOOSES A PAYMENT METHOD — Review's method buttons. Declared rather
668
+ * than handled, like `opens`: which frame the choice mounts, and what the buyer
669
+ * save has to do with it, is the widget's to decide, and this file is data with no
670
+ * state to set.
671
+ *
672
+ * `'wallet'` IS THE DEVICE'S ONE WALLET, not a method of its own: this file cannot
673
+ * know whether that is Apple Pay or Google Pay — the widget's device sniff decides
674
+ * at runtime, and relabels the button to match. See `detect-digital-wallet`.
675
+ */
676
+ readonly picks?: 'card' | 'revolut_pay' | 'wallet';
677
+ /**
678
+ * THIS BUTTON OPENS THE DEVICE'S FILE DIALOG — the photo step's Upload. Declared rather
679
+ * than handled for the reason the rest are: the input it opens belongs to the grid on
680
+ * the card, and this file draws no controls.
681
+ */
682
+ readonly uploads?: boolean;
683
+ /**
684
+ * THIS BUTTON SENDS THE RATING — the feedback card's Continue, and the only thing that
685
+ * does. Declared rather than handled, like `pays`: the number is on the card and the
686
+ * call is the data layer's, and this file has neither.
687
+ *
688
+ * WITHOUT IT THE PRESS WOULD STILL ADVANCE, which is exactly the fall-through
689
+ * `pressFor` exists to stop — a Continue that moves the buyer on and quietly drops what
690
+ * they just said. The Skip beside it has no flag for that reason: dropping the rating
691
+ * IS what Skip does.
692
+ */
693
+ readonly rates?: boolean;
694
+ };
695
+
696
+ /** Marks content that should survive a step change rather than fade through itself. */
697
+ export declare function CarrySlot({ name, carryWhen, children }: CarrySlotProps): react_jsx_runtime.JSX.Element;
698
+
699
+ export declare type CarrySlotProps = {
700
+ /**
701
+ * Stable identity of the thing being carried, shared by both steps. The total is
702
+ * `"total"` in the compact step and `"total"` in the expanded one — that shared name is
703
+ * the entire mechanism.
704
+ */
705
+ name: string;
706
+ /**
707
+ * When the overlay takes this element over — see `CarryTrigger`. Defaults to every
708
+ * move, which is right for a subject and wrong for chrome.
709
+ */
710
+ carryWhen?: CarryTrigger;
711
+ children: ReactNode;
712
+ };
713
+
714
+ /** WHEN the overlay takes an element over, rather than leaving it to the planes. */
715
+ declare type CarryTrigger = 'always' | 'resized';
716
+
717
+ export declare const CART_VIEW: {
718
+ readonly title: "My Cart";
719
+ readonly total: "Total";
720
+ readonly back: "Back";
721
+ /**
722
+ * The cart target's own name. It is a GLYPH now — the total that used to sit beside it
723
+ * is the Pay card's title — so this is the only thing that says what pressing it opens.
724
+ */
725
+ readonly label: (total: string) => string;
726
+ /**
727
+ * WHAT THE TOTAL ABOVE IT INCLUDES — one sentence, true whether or not a clock is
728
+ * running, which is why neither cart screen chooses between two lines any more.
729
+ *
730
+ * IT REPLACED THE COUNTDOWN, which moved to the card the buyer pays from: the cart
731
+ * screen is where somebody checks what they are buying, and the clock belongs where
732
+ * they decide to pay for it. This is the only place that argument is made.
733
+ */
734
+ readonly subtitle: "Includes all taxes and service fees.";
735
+ /**
736
+ * THE HOLD, IN WORDS — `3793:8723`. Drawn on the PAY card, over the hero's own ring:
737
+ * the card says the clock twice, and both are readings of one `EscrowHold`.
738
+ *
739
+ * See `CART_VIEW.subtitle` for why it is no longer said here.
740
+ */
741
+ readonly remaining: (clock: string) => string;
742
+ };
743
+
744
+ declare interface CartItem {
745
+ Key: string;
746
+ Type: string;
747
+ Name?: string;
748
+ ItemId: number;
749
+ TotalAmount: number;
750
+ OrganisationAmount: number;
751
+ ScopeAmount: number;
752
+ BrokerAmount: number;
753
+ DiscountAmount: number;
754
+ }
755
+
756
+ /**
757
+ * WHAT IS IN THE CART, as the cart screen draws it.
758
+ *
759
+ * ONE LINE PER PRODUCT, and the platform's own money on each. A cart holds one ITEM PER
760
+ * HEAD — `itemsFor` sends one per person and the platform answers with one per person —
761
+ * so three adult tickets are three items with a third of the money each. Nobody wants to
762
+ * read that; a line is what a buyer recognises as a thing they chose, and the count on
763
+ * its badge is how many of it they took.
764
+ *
765
+ * "Peak" IS THE PRODUCT AND "(Child)" IS THE USER TYPE, where one applies — so three Peak
766
+ * tickets bought for one adult and two children are TWO lines, not one. The wire does not
767
+ * say which is which: `CartItem` echoes a name and an amount and nothing about who the
768
+ * ticket is for, though the widget sent a `UserTypeAssignmentKey` on every one of them.
769
+ *
770
+ * SO IT IS READ BACK OFF THE REQUEST, where there was one — see `attributeCartItems`. A
771
+ * cart the widget did not open (a host's own, adopted) has no request to read, and its
772
+ * lines group by product alone until the host or the platform says more.
773
+ */
774
+
775
+ /** One line of the cart. Everything a row draws, and nothing about how. */
776
+ export declare type CartLine = {
777
+ /** Stable across a re-price, so React keeps the row rather than replacing it. */
778
+ readonly key: string;
779
+ /** The product, as the platform names it — "Peak". */
780
+ readonly name: string;
781
+ /** Who the ticket is for — "Adult". Absent until the platform says. */
782
+ readonly userType?: string;
783
+ /** How many, drawn on the thumbnail's own badge. */
784
+ readonly count: number;
785
+ /** What the LINE comes to — every head of it, in minor units. */
786
+ readonly minorUnits: number;
787
+ /**
788
+ * THE EVENT'S OWN ARTWORK, under the ticket silhouette — the design's
789
+ * `AvatarImage-Event`. Absent, the avatar package draws its own fill rather than a gap,
790
+ * which is what a cart adopted from a host that names none gets.
791
+ */
792
+ readonly artwork?: string;
793
+ /** The run these tickets are for — "Ice Rink". */
794
+ readonly subject?: string;
795
+ /** The session, already joined: `12:00 - 12:45`. */
796
+ readonly timeslot?: string;
797
+ /** The day, written out: "Saturday, 12 December". */
798
+ readonly day?: string;
799
+ };
800
+
801
+ /**
802
+ * What every line of a cart shares — the order it belongs to, said once.
803
+ *
804
+ * THE ARTWORK IS IN HERE and not on the item because a cart holds ONE event: every line
805
+ * of it is a ticket to the same thing, so the picture is the order's rather than the
806
+ * product's. A host that stocks per-product artwork says so by supplying `cartLines`
807
+ * itself, where each line carries its own.
808
+ */
809
+ export declare type CartLineContext = {
810
+ readonly artwork?: string;
811
+ /**
812
+ * WHAT THE CART WAS FILLED WITH, as the PRODUCT names itself — "Peak".
813
+ *
814
+ * The cart's own items do not reliably echo it — `Name` is optional on the wire and `Type`
815
+ * is a category, not a product. Taken off the product for the same reason the currency is:
816
+ * it is a reading of what was bought, not of the receipt.
817
+ */
818
+ readonly productName?: string;
819
+ readonly subject?: string;
820
+ readonly timeslot?: string;
821
+ readonly day?: string;
822
+ };
823
+
824
+ /**
825
+ * WHAT IS IN THE CART — the design's `ItemsInCart`, and the total under it.
826
+ *
827
+ * THE LINE AMOUNTS SHARE ONE COLUMN, as wide as the widest of them, so the symbols stack
828
+ * down the card instead of drifting with the digits. It is published as a COUNT of
829
+ * characters — see `widestAmount` — and spent as `ch` on the mono face, where a character
830
+ * is one advance: no element is measured, and adding a line that is a digit longer moves
831
+ * the whole column by exactly one.
832
+ *
833
+ * THE TOTAL IS IN NEITHER. `3795:8748` sets the whole of `€ 18.00` in `text/bold/lg` —
834
+ * Basier Square Medium 20/24 — where a line's own figure is `text/mono/md`. Drawn as one
835
+ * more row of the column it took a face the design never gives it, and sized that column to
836
+ * a figure sitting nowhere near it.
837
+ */
838
+ export declare function CartLines({ lines, totalMinorUnits, currency, totalLabel }: CartLinesProps): react_jsx_runtime.JSX.Element;
839
+
840
+ /**
841
+ * The cart's items as lines: grouped by what they are AND who they are for, counted, and
842
+ * summed.
843
+ *
844
+ * THE USER TYPE IS PART OF THE GROUPING KEY, which is the whole of the design's reading:
845
+ * one adult and two children on the same product are two lines with a 1 and a 2 on them,
846
+ * and the money on each is what those heads came to.
847
+ *
848
+ * `Name`, THEN THE PRODUCT, THEN `Type` — most specific first. `Type` is a category
849
+ * ("Ticket") and is the last resort rather than the answer. Each only if it is not blank; see
850
+ * `firstNamed`.
851
+ */
852
+ export declare function cartLines(items: readonly AttributedCartItem[], context?: CartLineContext): readonly CartLine[];
853
+
854
+ export declare type CartLinesProps = {
855
+ readonly lines: readonly CartLine[];
856
+ /** What the whole cart comes to, in minor units — the platform's own figure. */
857
+ readonly totalMinorUnits: number;
858
+ readonly currency: string;
859
+ /** The total row's label. This package's copy lives in `step-cards`. */
860
+ readonly totalLabel: string;
861
+ };
862
+
863
+ /**
864
+ * The cart screen as the PROPS that turn a card into it — the hero and its badge are the
865
+ * caller's, because the avatar is the buyer's and this file draws none.
866
+ */
867
+ export declare function cartViewProps(input: ReactNode, hold: EscrowHold, onBack: () => void): {
868
+ variant: "cart";
869
+ expanded: boolean;
870
+ onToggle: () => void;
871
+ title: "My Cart";
872
+ subtitle: "Includes all taxes and service fees.";
873
+ actionLabel: string;
874
+ input: ReactNode;
875
+ actions: {
876
+ key: string;
877
+ role: "secondary";
878
+ label: "Back";
879
+ onPress: () => void;
880
+ }[];
881
+ };
882
+
883
+ /** The island, as the design draws it: a pill that becomes a card. */
884
+ export declare function CheckoutIsland({ expanded, contentKey, onToggle, avatar, title, subtitle, pillCopy, input, bay, bayVisible, bayRows, variant, sealed, closable, actionLabel, actions, footer, bayActions, dismiss, dismissIcon, dismissLabel, headerLead, headerTrail, mode, align, journeyFullscreen, }: CheckoutIslandProps): react_jsx_runtime.JSX.Element;
885
+
886
+ export declare type CheckoutIslandProps = {
887
+ /** Collapsed is the pill; expanded is the card. */
888
+ readonly expanded: boolean;
889
+ /** WHICH CARD is showing, when "the card" is not specific enough. */
890
+ readonly contentKey?: string;
891
+ /** The pill's action opens it; the card's header button closes it. */
892
+ readonly onToggle: () => void;
893
+ /**
894
+ * The hero. This component supplies the SIZE the current state calls for — `$10` in the
895
+ * pill, 100 in the card — and the carry identity that moves it between them. It does
896
+ * NOT supply a shape.
897
+ */
898
+ readonly avatar?: ReactNode;
899
+ /** `heading/lg` in the pill, `heading/xl` and centred in the card. */
900
+ /**
901
+ * The card's own title. A PICKER passes none: the entry step has already said at full
902
+ * size what is being asked for, so the card opens on the run. The pill's line is
903
+ * `IslandPillProps.title`, which is always drawn.
904
+ */
905
+ readonly title?: ReactNode;
906
+ /** Above the title in the pill, below it in the card. */
907
+ readonly subtitle?: ReactNode;
908
+ /**
909
+ * THE PILL'S OWN TWO LINES, which are NOT the card's.
910
+ *
911
+ * They were, and it read as nonsense: a card's copy is written for a card, and the pill
912
+ * is one row that truncates — "Already Have An Account?" over "You may qualify for
913
+ * better pricing." came out as "Already Hav…" over "You may qual…", which says nothing
914
+ * and looks broken. The pill's job is to state the price and the way in, not to
915
+ * summarise the card behind it.
916
+ *
917
+ * ONE OBJECT, AND ITS PRESENCE IS THE DECISION. Supplying it means "the pill's copy is
918
+ * mine", and EMPTY FIELDS INSIDE IT MEAN THE PILL SAYS NOTHING — which is a real answer
919
+ * and the whole reason this is not two optional props. Two would have fallen back
920
+ * field-by-field, so a caller with no price would have been handed the card's title
921
+ * again, which is the thing being fixed.
922
+ *
923
+ * Omitting it entirely keeps the card's copy for both, so `CheckoutIsland` stays usable
924
+ * on its own by a caller with one thing to say.
925
+ */
926
+ readonly pillCopy?: {
927
+ readonly title?: ReactNode;
928
+ readonly subtitle?: ReactNode;
929
+ };
930
+ /**
931
+ * The card's own controls, between the hero and the buttons. The pill has no
932
+ * counterpart — it is one row, and a collapsed island asking a question would be a
933
+ * card.
934
+ */
935
+ readonly input?: ReactNode;
936
+ /** Persistent content outside the replaceable step planes. */
937
+ readonly bay?: ReactNode;
938
+ readonly bayVisible?: boolean;
939
+ /** How many entries the bay holds room for — see `IslandHostProps.bayRows`. */
940
+ readonly bayRows?: number;
941
+ /** Which card the expanded island is showing — see `IslandCardProps.variant`. */
942
+ readonly variant?: 'default' | 'hold' | 'cart';
943
+ /**
944
+ * NOTHING MAY BE PRESSED, HERE OR ANYWHERE ELSE ON THE PAGE — one state, two
945
+ * consequences, and they are the same sentence twice.
946
+ *
947
+ * The card loses its header, because the header IS the way out: a cross that cannot
948
+ * close and a trailing pill that opens a view the buyer must not leave for. And the page gets
949
+ * `IslandShield` over it, which answers a press with the island's own pop instead of
950
+ * ignoring it.
951
+ *
952
+ * `PurchaseStep.collapsed` is where this comes from — a step declaring `NONE` says
953
+ * "input is blocked entirely; there is no way out and nothing to collapse to".
954
+ */
955
+ readonly sealed?: boolean;
956
+ /**
957
+ * WHETHER THE HEADER DRAWS A WAY OUT. Defaults to true.
958
+ *
959
+ * SEPARATE FROM `sealed`, and it has to be. `sealed` is "no header at all, and the
960
+ * host's page is held" — right while money moves, and wrong everywhere else, because the
961
+ * header is not only the cross: it carries the compose funnel before there is a cart and
962
+ * the cart-and-promo pill after, and a card that cannot be left still has both.
963
+ */
964
+ readonly closable?: boolean;
965
+ /** The pill's action. */
966
+ readonly actionLabel: ReactNode;
967
+ /**
968
+ * THE BUTTONS, SPLIT BY THE BAY. `actions` is what the card plane draws; when the
969
+ * payment form is visible its card rides the form in the bay, and the card that acts
970
+ * on the field — Confirm, Try Again — belongs BENEATH it, not above it. `bayActions`
971
+ * draws there (same `CardAction`, same press); `actions` keeps only what stays
972
+ * upstairs, which with the form showing is nothing.
973
+ */
974
+ readonly actions: readonly IslandAction[];
975
+ /** A control of the card's own shape where the buttons go — see `IslandCardProps.footer`. */
976
+ readonly footer?: ReactNode;
977
+ readonly bayActions?: readonly IslandAction[];
978
+ /**
979
+ * Whether the card's header button steps BACK or closes the island. Drives the glyph,
980
+ * which is the only thing telling a buyer which it is.
981
+ */
982
+ readonly dismiss?: 'back' | 'close';
983
+ readonly dismissIcon?: ReactNode;
984
+ readonly dismissLabel?: string;
985
+ /** A second pill beside the card's way out — see `IslandCardProps.headerLead`. */
986
+ readonly headerLead?: ReactNode;
987
+ /** A pill at the OTHER end — the compose funnel, or the commit pill. See `IslandHeaderProps`. */
988
+ readonly headerTrail?: ReactNode;
989
+ /** Which appearance to render. Defaults to following the viewer's OS. */
990
+ readonly mode?: IslandMode;
991
+ /**
992
+ * Which edge the island is pinned to, and therefore which way it grows — or `center`,
993
+ * pinned to neither, which grows both ways at once. Defaults to `bottom`.
994
+ */
995
+ readonly align?: IslandAlignment;
996
+ /**
997
+ * THE PROVIDER'S FULLSCREEN JOURNEY IS OVER EVERYTHING, and stamping the root lets
998
+ * the CSS both lift the journey over the host page and lift the centred island's
999
+ * own transform out of the way of it. See `IslandSurfaceProps.journeyFullscreen`.
1000
+ */
1001
+ readonly journeyFullscreen?: boolean;
1002
+ };
1003
+
1004
+ export declare type CheckoutProps = {
1005
+ /**
1006
+ * WHICH IMPLEMENTATION IS ASKING. Held rather than read here: the data layer
1007
+ * authenticates with it, and a widget that drew a card without one would be drawing
1008
+ * somebody's checkout with no idea whose.
1009
+ */
1010
+ readonly appKey: string;
1011
+ /**
1012
+ * WHICH PLATFORM, and nothing else — the app key above is what authenticates. Optional
1013
+ * in every field: absent means production.
1014
+ *
1015
+ * THIS IS WHAT `appKey` WAS ALWAYS FOR. The prop above has said since the first commit
1016
+ * that the data layer authenticates with it, and there was no data layer — every fact
1017
+ * arrived as a prop, which is right for a host already holding them and wrong for the
1018
+ * case this widget exists to serve: an implementation that will not engage with the SDK,
1019
+ * drops the island onto a page and expects it to work.
1020
+ *
1021
+ * WHAT A HOST PASSES STILL WINS. `schedule` and `userTypes` are checked first, so a host
1022
+ * with its own calendar keeps it and nothing is fetched twice.
1023
+ */
1024
+ readonly source?: CheckoutSource;
1025
+ /**
1026
+ * WHAT THE HOST ALREADY KNOWS ABOUT THE ORDER. Partial is the normal case.
1027
+ *
1028
+ * ABSENT IS A MOUNT WITH NO ORDER AT ALL, which is a different thing from a partial one
1029
+ * — and it is why the absence is modelled HERE rather than by making `OrderSubject`
1030
+ * optional a level down. An intent with no subject is not an order half-composed; it is
1031
+ * nothing to sell, which is what that field's own note says and which stays true.
1032
+ *
1033
+ * The island then draws the `IDLE` checkpoint and nothing else: no walk, no steps, no
1034
+ * cart and nothing fetched. That is what a host mounts on a page which is not selling
1035
+ * anything — a header, a landing page, an account corner — and it hands in an intent the
1036
+ * moment there is something to buy.
1037
+ */
1038
+ readonly intent?: OrderIntent;
1039
+ /**
1040
+ * The user types the event offers, for the party step. Empty draws the single
1041
+ * unnamed line, which is what an event with no discount types wants.
1042
+ */
1043
+ readonly userTypes?: readonly PartyUserTypeOption[];
1044
+ /** The ticket's ceiling, across the whole party. */
1045
+ readonly maxParty?: number;
1046
+ /**
1047
+ * A CART THE HOST ALREADY OPENED — adopted, never duplicated.
1048
+ *
1049
+ * A host that composes the order itself holds a cart before this widget mounts: it made
1050
+ * one to price the order and to hold the stock. Without this the widget opened a SECOND
1051
+ * for the same purchase, so the items went in twice, the payment settled against the
1052
+ * widget's, and the host's went on holding stock nobody would ever buy.
1053
+ *
1054
+ * Given a key the cart is READ and never created or filled — what is in it is the
1055
+ * host's statement, not this widget's guess.
1056
+ */
1057
+ readonly cart?: {
1058
+ readonly key: string;
1059
+ };
1060
+ /**
1061
+ * WHAT IS ON SALE AND WHEN — everything the day and time pickers draw from.
1062
+ *
1063
+ * REQUIRED BY A HOST THAT DEFERS THOSE STEPS, and there is no way around it: the widget
1064
+ * owns the calendar's LAYOUT and none of its CONTENT. Which days a run touches, which
1065
+ * slots a day holds and what the venue's clock says are all the platform's, and the
1066
+ * widget has no data layer to ask.
1067
+ *
1068
+ * Absent, the pickers cannot be drawn — and the steps then GATE rather than pass. See
1069
+ * `stepAnswered`: a card that cannot collect its answer must not let a buyer past it,
1070
+ * or the order goes out without the day it was supposed to carry.
1071
+ */
1072
+ readonly schedule?: CheckoutSchedule;
1073
+ /**
1074
+ * THE STOCK PHOTOS THE PROFILE PHOTO STEP OFFERS, in the order the grid draws them.
1075
+ *
1076
+ * AN OVERRIDE, NOT A REQUIREMENT — `defaultProfilePhotos` is the platform's own set and
1077
+ * is what this falls back to. It was required once, on the reading that the faces are
1078
+ * content the widget has nowhere to fetch; but the ids are not the host's to choose
1079
+ * (see `ProfilePhoto`), so every integration was being asked to copy the same constant
1080
+ * and none of them did. The step was dark everywhere, and so was a returning buyer's
1081
+ * stored face, which resolves through the same set — see `avatarAssetsFor`.
1082
+ *
1083
+ * PASSED EMPTY, THE STEP IS STILL EXCUSED. A host that genuinely has no faces to offer
1084
+ * says so with `[]`, and an account can be made without a photo: a card asking for one
1085
+ * it cannot offer is worse than no card at all.
1086
+ */
1087
+ readonly profilePhotos?: readonly ProfilePhoto[];
1088
+ /**
1089
+ * WHAT IS IN THE CART, for the screen the header's summary opens.
1090
+ *
1091
+ * Derived from the cart itself where the widget opened one — see `cartLines`, which
1092
+ * groups the platform's own items and money into rows a buyer recognises. A host that
1093
+ * knows better says so here: it may hold the user-type split, or artwork, or a line the
1094
+ * cart cannot describe.
1095
+ */
1096
+ readonly cartLines?: readonly CartLine[];
1097
+ /**
1098
+ * WHO THE BUYER IS WHEN THE WIDGET MOUNTS, and nothing after that.
1099
+ *
1100
+ * A SEED AND NOT A CONTROL. It is read once, into the widget's own store, because the
1101
+ * widget is the only thing that knows whether a passkey ceremony finished or a call was
1102
+ * refused — a prop that could overwrite that would be a second authority over the one
1103
+ * thing that must have exactly one. See `useAuthSession`.
1104
+ */
1105
+ readonly session?: AuthSession;
1106
+ /** What is owed, as the pill and the commitment button say it. */
1107
+ readonly quote?: Quote;
1108
+ /** The reservation, once there is an order to hold. */
1109
+ readonly hold?: EscrowHold;
1110
+ /**
1111
+ * WHAT THE PAYMENT DID, once it has been attempted. Absent until it has.
1112
+ *
1113
+ * A HOST SAYS SO because nothing here can know. There is no payment integration, and
1114
+ * the widget must not invent one — so both cards are built and the event that reaches
1115
+ * them comes from outside, exactly as `hold` and `quote` do. When payments are wired
1116
+ * this becomes something the widget observes rather than is told.
1117
+ *
1118
+ * ONE PROP FOR BOTH OUTCOMES, and that is the point of it. Processing draws no buttons
1119
+ * — there is nothing for a buyer to press while money moves — so NEITHER outcome is
1120
+ * reachable from inside the flow, and a host told to report only failures would have
1121
+ * had no way to say a payment worked.
1122
+ */
1123
+ readonly payment?: PaymentOutcome;
1124
+ /**
1125
+ * RUN THE ACCOUNT SUB-FLOW AGAINST A DOUBLE, and nothing else. This once stood in for
1126
+ * the payment too; payments are real now, and an outcome a caller wants to state is
1127
+ * `payment` above. What is left is the account: eight calls the platform does not
1128
+ * answer yet, so without this the sub-flow has nothing to run against. See
1129
+ * `simulatedAccountGateway`.
1130
+ */
1131
+ readonly simulate?: boolean;
1132
+ /** Called with the completed intent when the last step is answered. */
1133
+ readonly onCommit?: (intent: OrderIntent) => void;
1134
+ /**
1135
+ * WHICH STATE THE HOST'S PAGE LOADS ON — the pill, or the card already open.
1136
+ *
1137
+ * The state, not the only state: the island collapses and expands either way, and a
1138
+ * buyer who closes the card gets the pill back whichever this says. It names the
1139
+ * OPENING position, which is a page-layout decision and therefore the host's — a
1140
+ * dedicated checkout route wants the card standing open, a product page under a
1141
+ * "Get Tickets" button wants the pill until it is asked for.
1142
+ */
1143
+ /**
1144
+ * WHICH FACE THE ISLAND RESTS ON — the purchase, or the cart the host is still filling.
1145
+ *
1146
+ * `flow` is the default and is what every host has had: the widget opens on the first
1147
+ * step the intent has not answered, and a host that preloaded the whole order opens on
1148
+ * Order Review.
1149
+ *
1150
+ * `cart` is for a host that is STILL COMPOSING — the SDK has put a product in a cart and
1151
+ * the buyer may add more. The island draws the cart instead of a step, follows it as it
1152
+ * changes, and hands over to the flow when Check Out is pressed. It is a prop rather
1153
+ * than something derived from `cart` being present, because a host resuming a purchase
1154
+ * across pages passes a cart on every page and means the opposite by it — see the
1155
+ * multi-page guide.
1156
+ *
1157
+ * A SIBLING OF `initialPresentation` AND NOT A REPLACEMENT: that one says pill or card,
1158
+ * this one says which card. Both are page-layout decisions and therefore the host's.
1159
+ */
1160
+ readonly opensOn?: 'flow' | 'cart';
1161
+ readonly initialPresentation?: 'pill' | 'card';
1162
+ readonly mode?: IslandMode;
1163
+ /**
1164
+ * Which edge of its reservation the island is pinned to, or `center` for neither.
1165
+ *
1166
+ * THE RESERVATION IS THE SAME EITHER WAY: the host's page has the island's COLLAPSED
1167
+ * footprint held open for it, and an opened card grows out of that — upward from
1168
+ * `bottom`, downward from `top`, and both ways at once from `center`, which therefore
1169
+ * needs room above AND below. See `island.css`'s alignment blocks.
1170
+ */
1171
+ readonly align?: IslandAlignment;
1172
+ };
1173
+
1174
+ export declare type CheckoutSchedule = {
1175
+ /** The run being picked from. Every month it touches is drawn. */
1176
+ readonly series: CalendarSeries;
1177
+ /** `YYYY-MM-DD` on the venue's calendar. */
1178
+ readonly today: string;
1179
+ /** `HH:MM` on the venue's clock — see `timeOfDayInZone`. */
1180
+ readonly nowTime: string;
1181
+ /** One ticket's slots, by `YYYY-MM-DD`. A day with none simply offers none. */
1182
+ readonly slotsByDay?: Readonly<Record<string, readonly Timeslot[]>>;
1183
+ /** Per-day `Remaining`, 0..1, keyed by `YYYY-MM-DD`. */
1184
+ readonly remaining?: Readonly<Record<string, number>>;
1185
+ };
1186
+
1187
+ /**
1188
+ * THE WIDGET'S OWN DATA LAYER — what `appKey` is for.
1189
+ *
1190
+ * `CheckoutProps.appKey` has said since the first commit that "the data layer
1191
+ * authenticates with it", and the body read `void appKey`. Everything the widget needed
1192
+ * arrived as a prop instead, which is fine for a host already holding it and wrong for
1193
+ * the case this widget exists to serve: an implementation that cannot or will not engage
1194
+ * with the SDK, drops the island onto a page and expects it to work.
1195
+ *
1196
+ * ── WHAT IT REPLACES ─────────────────────────────────────────────────────────
1197
+ *
1198
+ * `schedule` and `userTypes` were props a host had to fetch and shape. They still are:
1199
+ * a host that already holds them passes them and this never runs. Absent, the widget
1200
+ * fetches them itself.
1201
+ *
1202
+ * ONE CALL ANSWERS BOTH. `getSeriesInfo` returns the run's events AND its user types, so
1203
+ * the calendar and the party stepper come from the same request — which is also why they
1204
+ * are fetched together here rather than by two hooks that would each have to know the key.
1205
+ *
1206
+ * ── WHY A HOOK AND NOT A PROVIDER ────────────────────────────────────────────
1207
+ *
1208
+ * The SDK reaches its client through `ScopeProvider`, and a widget that required one
1209
+ * would be asking for exactly the engagement it is meant to avoid. So the client is built
1210
+ * from the props the widget already takes, and a host that HAS a provider is unaffected —
1211
+ * it passes the data and this stays asleep.
1212
+ */
1213
+
1214
+ /**
1215
+ * WHERE TO REACH THE PLATFORM. Every field optional, because `appKey` is the only thing
1216
+ * actually required — it is the Bearer token, and it is what `CheckoutProps.appKey` has
1217
+ * always said it was.
1218
+ *
1219
+ * IT USED TO DEMAND AN `orgKey` AND THAT WAS THE BUG. Nothing the widget calls uses one:
1220
+ * it appears in exactly one endpoint on the whole client, the deprecated v1
1221
+ * `getEvents`. Requiring it meant a host passing only its app key got no client, so
1222
+ * nothing was fetched — no user types, no sessions, and no error either, because a
1223
+ * request that is never made cannot fail.
1224
+ */
1225
+ declare type CheckoutSource = {
1226
+ /** Which platform to talk to. Defaults to `production`. */
1227
+ readonly environment?: Environment;
1228
+ /** Only the deprecated v1 event list needs one; nothing this widget calls does. */
1229
+ readonly orgKey?: string;
1230
+ };
1231
+
1232
+ export declare function ContentFlag({ tone, title }: ContentFlagProps): react_jsx_runtime.JSX.Element;
1233
+
1234
+ export declare type ContentFlagProps = {
1235
+ readonly tone: ContentFlagTone;
1236
+ /**
1237
+ * An accessible name. Omitted, the mark is decorative and hidden — which is right
1238
+ * wherever the field's own text already says what is wrong, and wrong where the mark is
1239
+ * the only thing saying it.
1240
+ */
1241
+ readonly title?: string;
1242
+ };
1243
+
1244
+ /**
1245
+ * What a field says about its own contents — Figma's `ContentFlagIcon`, the 16px mark
1246
+ * at the trailing end of an `InputTextShort`.
1247
+ */
1248
+ export declare type ContentFlagTone = 'success' | 'warning' | 'error';
1249
+
1250
+ export declare function CountdownTimer({ remaining, size, appearance, track, color, title, className, style, }: CountdownTimerProps): react_jsx_runtime.JSX.Element;
1251
+
1252
+ /** A countdown, as a ring that drains and a hand that sweeps. */
1253
+ export declare type CountdownTimerProps = {
1254
+ /**
1255
+ * How much of the clock is left, 0..1 — a FRACTION, never seconds. The indicator has no
1256
+ * idea how long the timer is and does not need one: 100% is the hand at 12 whether that
1257
+ * is ten minutes or ten seconds.
1258
+ */
1259
+ readonly remaining: number;
1260
+ /** The size of the 1:1 box. Any CSS length; a number is taken as px. */
1261
+ readonly size?: number | string;
1262
+ /**
1263
+ * `solid` — the glyph fill, and what every timer in the island draws today. `metal` —
1264
+ * the set's own treatment. Both are the package's; neither is described here.
1265
+ */
1266
+ readonly appearance?: IconAppearance;
1267
+ /** Draw the groove the ring runs in. Default `true`. */
1268
+ readonly track?: boolean;
1269
+ /**
1270
+ * Override the fill. Omit and it takes `--scopetickets-icon-solid-fill` like every
1271
+ * glyph, which is what almost every caller wants — the ring and the hand then match the
1272
+ * icons beside them rather than the text.
1273
+ */
1274
+ readonly color?: string;
1275
+ /**
1276
+ * An accessible name. Omit — as most callers should — and this is hidden from assistive
1277
+ * technology rather than announced as an unlabelled graphic.
1278
+ */
1279
+ readonly title?: string;
1280
+ readonly className?: string;
1281
+ readonly style?: CSSProperties;
1282
+ };
1283
+
1284
+ /** A progress ring — Figma's `StepCompletionProgressRing`. */
1285
+ export declare function CounterRing({ progress, complete, size, title, color, trackColor, direction, track, }: CounterRingProps): react_jsx_runtime.JSX.Element;
1286
+
1287
+ export declare type CounterRingProps = {
1288
+ /**
1289
+ * How full the ring is, 0..1. Out-of-range values are clamped by the geometry, because
1290
+ * a caller's `count / target` goes out of range in normal use — a confirm field can
1291
+ * hold more than the password above it.
1292
+ *
1293
+ * IT MAY FALL AS READILY AS IT RISES. The arc is a function of this number and of
1294
+ * nothing else — no last value is kept anywhere — so a ring counting TOWARDS a target
1295
+ * and one counting what is LEFT are the same component handed different numbers.
1296
+ */
1297
+ readonly progress: number;
1298
+ /**
1299
+ * What the ring BECOMES once it is full, or absent while it is still filling. Present,
1300
+ * the ring gives way to this mark entirely.
1301
+ */
1302
+ readonly complete?: ContentFlagTone;
1303
+ /**
1304
+ * The size of the 1:1 box. Any CSS length; a number is taken as px. Default `1em`, so
1305
+ * it scales with the row it sits in — `CountdownTimer`'s contract.
1306
+ */
1307
+ readonly size?: number | string;
1308
+ readonly title?: string;
1309
+ /**
1310
+ * THE ARC'S COLOUR. Any CSS colour, including a `var()` or a `color-mix()` — the value
1311
+ * is handed to `IconGlyph` as a fill and this component does not read it.
1312
+ *
1313
+ * Default is the counter's own token. A caller states one where the ring MEANS
1314
+ * something the counter does not: the timeslot's ring runs a green-to-red ramp,
1315
+ * because there a filling ring and a draining one are different news.
1316
+ */
1317
+ readonly color?: string;
1318
+ /** The groove's colour, on the same terms. Ignored when `track` is off. */
1319
+ readonly trackColor?: string;
1320
+ /**
1321
+ * WHICH WAY ROUND THE ARC GROWS from 12 o'clock. Default `cw`, the clock's own sense
1322
+ * and the design's.
1323
+ */
1324
+ readonly direction?: RingDirection;
1325
+ /**
1326
+ * THE GROOVE BEHIND THE ARC. Default on.
1327
+ *
1328
+ * It is what makes 0% read as EMPTY rather than as absent: with no track, a ring with
1329
+ * nothing in it is nothing at all, and a row of them is a row of gaps. Turn it off
1330
+ * where something else already draws the whole — an arc on a ground that is itself the
1331
+ * track — and never merely because it looks quieter.
1332
+ */
1333
+ readonly track?: boolean;
1334
+ };
1335
+
1336
+ /**
1337
+ * What a date-picker cell shows BENEATH its own label — a day beneath its number, a
1338
+ * timeslot beneath its time..
1339
+ */
1340
+ export declare type DatePickerCellAccessory = 'NONE' | 'LINE';
1341
+
1342
+ /** Select Day — the day picker's content. */
1343
+ export declare function DayPicker({ series, today, selectedDay, onSelectDay, remaining, accessory, onVisibleMonthChange, }: DayPickerProps): react_jsx_runtime.JSX.Element | null;
1344
+
1345
+ export declare type DayPickerProps = {
1346
+ /** The run being picked from. Every month it touches is drawn. */
1347
+ readonly series: CalendarSeries;
1348
+ /**
1349
+ * `YYYY-MM-DD` in the VENUE's local day, never the device's. Passed in rather than read
1350
+ * from a clock — see `MonthGridOptions`.
1351
+ */
1352
+ readonly today: string;
1353
+ readonly selectedDay: string | null;
1354
+ readonly onSelectDay: (day: string) => void;
1355
+ /** Per-day `Remaining`, 0..1, keyed by `YYYY-MM-DD`. */
1356
+ readonly remaining?: Readonly<Record<string, number>>;
1357
+ /**
1358
+ * Defaults to the variant both pickers draw. A prop only so a host can turn the line
1359
+ * off; there is no per-cell answer.
1360
+ */
1361
+ readonly accessory?: DatePickerCellAccessory;
1362
+ /**
1363
+ * The month CURRENTLY IN VIEW, reported as it changes — including once on mount,
1364
+ * because the picker opens on a month the host did not choose (see
1365
+ * `soonestRelevantDay`).
1366
+ */
1367
+ readonly onVisibleMonthChange?: (month: CalendarMonthKey) => void;
1368
+ };
1369
+
1370
+ /** The stock set as the picker and the hero both need it, for the configured platform. */
1371
+ export declare function defaultProfilePhotos(environment?: Environment, size?: ProfilePhotoSize): ProfilePhoto[];
1372
+
1373
+ /** The record with the caller's own facts folded in — see the top of this file. */
1374
+ export declare function dressBooking(record: BookingRecord, occasion: BookingOccasion, attribution?: TicketAttribution): Booking;
1375
+
1376
+ /** "Email Address" — the design. CONTROLLED the same way Name is; see there. */
1377
+ export declare function EmailStep({ value, onChange, onAnsweredChange, }: AnswerReporting & {
1378
+ readonly value?: string;
1379
+ readonly onChange?: (email: string) => void;
1380
+ }): react_jsx_runtime.JSX.Element;
1381
+
1382
+ /** @internal */
1383
+ declare type Environment = 'sandbox' | 'production' | 'internal';
1384
+
1385
+ export declare type EscrowHold = {
1386
+ /**
1387
+ * Seconds left on the hold. May be negative — a countdown past its deadline is the
1388
+ * ordinary case, not an error, and both readings below floor at zero.
1389
+ */
1390
+ readonly secondsLeft: number;
1391
+ /** The whole window, in seconds, which is what makes the ring a FRACTION. */
1392
+ readonly durationSeconds: number;
1393
+ };
1394
+
1395
+ /** @internal */
1396
+ declare interface EventTimeslot {
1397
+ LocalStartTime: string;
1398
+ LocalEndTime: string;
1399
+ Total: number;
1400
+ Remaining: number;
1401
+ }
1402
+
1403
+ /**
1404
+ * WHICH STEPS THE HOST HAS ALREADY ANSWERED, which is the whole bridge between an intent
1405
+ * and a flow: `FlowSituation.excused` takes exactly this, and the walk does the rest.
1406
+ *
1407
+ * A step is excused when the intent HOLDS its answer, never when the answer merely could
1408
+ * be derived. The difference matters at DATE: an event subject settles the day by being
1409
+ * an event, and a series with a day in hand settles it by having been asked already.
1410
+ *
1411
+ * NOT INCLUDED, DELIBERATELY: `SIGN_IN`, `REVIEW`, `PROCESSING`, `CREATE_ACCOUNT`,
1412
+ * `PASSWORD` and `FOLLOW`. A host cannot answer those on the buyer's behalf — they are
1413
+ * the buyer's own, or the platform's, and an intent that claimed them would be claiming
1414
+ * something it cannot know.
1415
+ */
1416
+ export declare function excusedByIntent(intent: OrderIntent): readonly PurchaseStepId[];
1417
+
1418
+ /**
1419
+ * FIVE STARS, AND THE RANGE IS THE DESIGN'S RATHER THAN THE PLATFORM'S.
1420
+ *
1421
+ * `POST /api/Feedback` types `Rating` as a bare `int32` and states no range at all, so
1422
+ * the wire would take 7 or -1 as readily as 4. The only authority on what a rating MEANS
1423
+ * is the card, which draws five stars — so the range is stated here, once, and
1424
+ * `isFeedbackRating` is what stops anything else reaching the wire.
1425
+ */
1426
+ export declare const FEEDBACK_STARS = 5;
1427
+
1428
+ /** One through five, as the card's stars are counted. */
1429
+ export declare type FeedbackRating = 1 | 2 | 3 | 4 | 5;
1430
+
1431
+ /**
1432
+ * THE WHOLE RULE.
1433
+ *
1434
+ * `available` is the room the parent offers ACROSS. `header` is what stands above the code
1435
+ * inside the centre, measured — the ticketholder's row and the booking's, with the seam
1436
+ * between them. Everything else follows.
1437
+ *
1438
+ * Reading the offered width as the RUN's budget rather than the FRAME's is the tempting
1439
+ * mistake, and it happens to agree at the size the design was drawn at — which is exactly
1440
+ * why it would survive a review against the design, and why the tests sweep scales and
1441
+ * widths instead of pinning the one.
1442
+ */
1443
+ export declare function fitTicketEdge(available: number, header: number, tokens: TicketEdgeTokens): TicketEdgeFit;
1444
+
1445
+ /**
1446
+ * Somebody behind the event, offered for subscription, reduced to what the row draws.
1447
+ */
1448
+ export declare type FollowEntity = {
1449
+ readonly key: string;
1450
+ readonly name: string;
1451
+ /** What kind of entity this is, in words. Drawn under the name. */
1452
+ readonly kind: string;
1453
+ /** The entity's own artwork, or absent. */
1454
+ readonly artwork?: ReactNode;
1455
+ };
1456
+
1457
+ /** The Follow Prompt's list — the design. */
1458
+ export declare function FollowList({ entities, selectedKeys, onToggle }: FollowListProps): react_jsx_runtime.JSX.Element;
1459
+
1460
+ export declare type FollowListProps = {
1461
+ readonly entities: readonly FollowEntity[];
1462
+ readonly selectedKeys: readonly string[];
1463
+ readonly onToggle: (key: string) => void;
1464
+ };
1465
+
1466
+ /**
1467
+ * WHO THE TICKETS ARE FOR — the party step's rows, and the keys they are spent as.
1468
+ *
1469
+ * `AssignmentKey` IS NOT A USER TYPE. It identifies one ASSIGNMENT of a type to a product
1470
+ * on an event. Measured on sandbox 2026-09-10, TwinkleTown — 38 events × 2 products × 3
1471
+ * types — `EventInformation` answers with 228 entries and 228 distinct keys, 76 of them
1472
+ * named "Child". So de-duplicating on the key cannot help: every one is already distinct.
1473
+ * `Name` is the only field that identifies what a buyer is choosing.
1474
+ *
1475
+ * THE SAME NAME IS NOT THE SAME OFFER, which is why the assignments are not collapsed
1476
+ * away: Child is 550 off Peak and 450 off Off-Peak, and needs ID on one and not the other.
1477
+ * The type is what the buyer picks; the assignment is what it costs, and that is not
1478
+ * settled until a product is.
1479
+ *
1480
+ * WHICH IS WHY THE KEY IS RESOLVED LATE. `PARTY` runs before `DATE` and `TIME`, so when
1481
+ * the buyer picks "Child" there is no product for an assignment to belong to — the product
1482
+ * is `productForSession`, decided by the timeslot. Committing to a key there means sending
1483
+ * Peak's against an Off-Peak product, and a bulk add that refuses an unknown key leaves no
1484
+ * cart at all. So the composition is keyed by NAME and `assignmentFor` converts it once
1485
+ * `useCheckoutOrder` holds the product.
1486
+ */
1487
+
1488
+ /**
1489
+ * THE DISTINCT TYPES, in the order the platform first names each — the organiser's own,
1490
+ * and re-sorting on every fetch would move the rows under the pointer.
1491
+ */
1492
+ export declare function groupUserTypes(rows: readonly UserType[]): readonly PartyUserTypeOption[];
1493
+
1494
+ /** Whether the buyer has taken the guest route for this order. */
1495
+ declare type GuestChoice = 'NOT_TAKEN' | 'TAKEN';
1496
+
1497
+ /**
1498
+ * WHAT A STOPPED CLOCK SAYS — see `timedOutViewProps` for the card it draws.
1499
+ *
1500
+ * The words stand where the countdown would: a card whose title is `00:00` says the number
1501
+ * and not what it means. "They may still be available" is the design's own hedge and is
1502
+ * the honest one — the tickets went back to the pool, and whether anybody has taken them
1503
+ * since is not something this widget knows.
1504
+ */
1505
+ export declare const HOLD_VIEW: {
1506
+ readonly title: "Your Order Timed Out";
1507
+ readonly subtitle: "Your tickets have been released. They may still be available.";
1508
+ readonly tryAgain: "Try Again";
1509
+ readonly close: "Close";
1510
+ };
1511
+
1512
+ /**
1513
+ * WHETHER THE EDIT CARD'S SAVE MAY GO.
1514
+ *
1515
+ * ── WHAT IS REQUIRED, AND WHAT IS DELIBERATELY NOT ──────────────────────────
1516
+ *
1517
+ * A NAME AND AN ADDRESS. The address because it is where the ticket goes and a malformed
1518
+ * one is refused by the platform anyway — asked here so the buyer is told by the field they
1519
+ * are standing in rather than by a notice two presses later. A first name because a ticket
1520
+ * belonging to nobody is what this card exists to fix, and saving one straight back would
1521
+ * make the button look broken.
1522
+ *
1523
+ * A LAST NAME IS NOT REQUIRED. Plenty of people have one name, and a widget that refuses to
1524
+ * save a ticket until a stranger supplies a surname they do not have is a widget that has
1525
+ * decided what names are.
1526
+ *
1527
+ * A PREDICATE BECAUSE IT IS THE KIND OF RULE THAT GETS RE-TYPED. The Save button reads it
1528
+ * and so does the press behind it — two copies of `email.includes('@')` is how the two come
1529
+ * to disagree.
1530
+ */
1531
+ export declare function holderComplete(holder: Ticketholder): boolean;
1532
+
1533
+ /**
1534
+ * "AW" — the programmatic avatar's value, for a holder with no photo. Tickets carry no
1535
+ * `Photo` on this endpoint, so this is what every row and every code draws.
1536
+ *
1537
+ * ONE LETTER IS A COMPLETE ANSWER: a holder with only a first name gets "A", and padding it
1538
+ * to two with something invented would be worse than short.
1539
+ */
1540
+ export declare function holderInitials(holder: Ticketholder): string;
1541
+
1542
+ /** "Alex Whelan", or `null` where the platform holds neither half. */
1543
+ export declare function holderName(holder: Ticketholder): string | null;
1544
+
1545
+ /**
1546
+ * WHAT THE EDIT CARD'S SAVE IS DOING. `REFUSED` is the platform declining the details;
1547
+ * `FAILED` is never having reached it. Two outcomes because they read differently to a
1548
+ * buyer — one is "that address will not do" and the other is "try again in a moment" — and
1549
+ * because only the second is a fault worth reporting. See `raiseForBooking`.
1550
+ */
1551
+ export declare type HolderSave = {
1552
+ readonly status: 'IDLE';
1553
+ } | {
1554
+ readonly status: 'SAVING';
1555
+ } | {
1556
+ readonly status: 'REFUSED';
1557
+ } | {
1558
+ readonly status: 'FAILED';
1559
+ readonly error: Error;
1560
+ };
1561
+
1562
+ /**
1563
+ * WHETHER THE HOLD HAS RUN OUT — the tickets are released and there is nothing left for
1564
+ * the flow to be about.
1565
+ *
1566
+ * A PREDICATE RATHER THAN A COMPARISON AT EACH SITE: `holdRemaining` and `formatHold`
1567
+ * both floor rather than going negative, so this is the only place a hold at `-4` can be
1568
+ * told from one at `0` — and three readings have to agree about it.
1569
+ */
1570
+ export declare function holdExpired(hold: EscrowHold): boolean;
1571
+
1572
+ /** What the platform needs about the person paying. */
1573
+ export declare type IntentBuyer = {
1574
+ readonly firstName?: string;
1575
+ readonly lastName?: string;
1576
+ readonly email?: string;
1577
+ /** E.164, or absent. */
1578
+ readonly phone?: string;
1579
+ };
1580
+
1581
+ /**
1582
+ * How many of each user type, BY NAME — see `groupUserTypes`. NOT by assignment key: one
1583
+ * assignment is a type on one product, so a name is the only key that survives the walk
1584
+ * from `PARTY` to the product `TIME` picks.
1585
+ */
1586
+ export declare type IntentComposition = Readonly<Record<string, number>>;
1587
+
1588
+ /** Whether a composition names anybody at all. */
1589
+ export declare function intentHasParty(composition: IntentComposition | undefined): boolean;
1590
+
1591
+ /**
1592
+ * WHETHER A NUMBER IS ONE OF THE FIVE. The guard the wire is behind: `FeedbackRating`
1593
+ * narrows what this package passes around, and this is the only thing that can make one
1594
+ * out of a number that was not already.
1595
+ */
1596
+ export declare function isFeedbackRating(value: number): value is FeedbackRating;
1597
+
1598
+ /**
1599
+ * Re-exported for callers. Declared in `island-motion`, where it is DERIVED from the
1600
+ * springs rather than typed — so the CSS the surface receives and the moment this
1601
+ * component tears the transition down cannot diverge.
1602
+ */
1603
+ export declare const ISLAND_TRANSITION_MS: number;
1604
+
1605
+ export declare type IslandAction = {
1606
+ /** Stable across renders. Labels repeat — two states both end in "Close". */
1607
+ readonly key: string;
1608
+ readonly role: IslandActionRole;
1609
+ readonly label: ReactNode;
1610
+ /** A mark beside the label — the provider's logo, the passkey glyph. */
1611
+ /** The button is drawn, and it does not act. */
1612
+ readonly disabled?: boolean;
1613
+ readonly mark?: {
1614
+ readonly side: 'leading' | 'trailing';
1615
+ readonly node: ReactNode;
1616
+ /** Default `separate`. See above. */
1617
+ readonly spacing?: 'joined' | 'separate';
1618
+ };
1619
+ readonly onPress: () => void;
1620
+ };
1621
+
1622
+ /** What a card's button IS, rather than what it looks like. */
1623
+ export declare type IslandActionRole = 'action' | 'primary' | 'secondary';
1624
+
1625
+ /**
1626
+ * Which edge of its reservation the island is pinned to, or `center` for one pinned to
1627
+ * neither.
1628
+ */
1629
+ export declare type IslandAlignment = 'top' | 'bottom' | 'center';
1630
+
1631
+ export declare function IslandCard({ avatar, title, subtitle, variant, sealed, input, actions, footer, }: IslandCardProps): react_jsx_runtime.JSX.Element;
1632
+
1633
+ export declare type IslandCardProps = {
1634
+ /** WHICH CARD THIS IS — Figma's own variant on `CtaCard`. */
1635
+ /**
1636
+ * NEITHER OF THE TWO BESIDE THE FLOW DRAWS A HEADER — the way out of both is the Back
1637
+ * button in the stack. `cart` is that card with the cart screen's own title size;
1638
+ * `hold` is the timed-out card, which takes the ordinary one.
1639
+ */
1640
+ readonly variant?: 'default' | 'hold' | 'cart';
1641
+ /**
1642
+ * The hero — a `.scopetickets-island-avatar` element, and the same node the collapsed
1643
+ * pill shows, which is what lets it be carried between the two.
1644
+ *
1645
+ * THE HOLD'S CARDS TAKE ONE TOO, and that is the design `3803:7329`: the buyer's own
1646
+ * avatar wearing the clock as its ELEMENT, where they used to draw a bare `$25` ring.
1647
+ * The clock is the caller's to compose for the same reason every other hero is — the
1648
+ * face is the buyer's and this file draws none.
1649
+ */
1650
+ readonly avatar?: ReactNode;
1651
+ /** `heading/xl`, centred — `heading/3xl` on the `cart` variant. */
1652
+ readonly title?: ReactNode;
1653
+ /** `text/regular/md`, centred, and free to run to several lines. */
1654
+ readonly subtitle?: ReactNode;
1655
+ /**
1656
+ * NO HERO, which is what a picker is: the entry step has already said at full size what
1657
+ * the buyer is being asked for, so the card opens on the run itself. `avatar`, `title`
1658
+ * and `subtitle` are simply left undrawn — the card is the run, and the chrome is not
1659
+ * its to draw.
1660
+ */
1661
+ /**
1662
+ * NO HEADER IS BEING DRAWN OVER THIS CARD, so it pays no reserve for one — see
1663
+ * `CheckoutIslandProps.sealed`, which is where the decision is made.
1664
+ *
1665
+ * PER CARD AND NOT PER ISLAND, which is the whole reason it is a prop rather than a
1666
+ * rule hung off the frame's `data-sealed`. Both planes live in that frame while they
1667
+ * cross, so a rule there would pull the reserve out from under the card on its way OUT
1668
+ * as well — the header would fade while the step beneath it jumped upward to meet it.
1669
+ * Held here, the leaving card keeps the room it was laid out with and only the arriving
1670
+ * one is short, so the surface morphs between two heights instead of snapping.
1671
+ */
1672
+ readonly sealed?: boolean;
1673
+ /**
1674
+ * The step's own controls — `Input` in the design, between the hero and the buttons.
1675
+ */
1676
+ readonly input?: ReactNode;
1677
+ /** The buttons, in reading order. Stacked full-width at `$2` apart. */
1678
+ readonly actions: readonly IslandAction[];
1679
+ /**
1680
+ * A CONTROL OF ITS OWN SHAPE WHERE THE BUTTONS GO — the booking's ticket pager, which is
1681
+ * one label between two presses and therefore cannot be an `IslandAction`.
1682
+ *
1683
+ * IT IS NOT A THIRD KIND OF BUTTON. It stands in the same wrapper, which is what it is
1684
+ * for: that wrapper is positioned against the card's bottom edge and its height is what
1685
+ * the content reserves room for, so a control drawn anywhere else sits in the scroll and
1686
+ * takes the card's gutter twice. Counted with the actions below for exactly that reason.
1687
+ */
1688
+ readonly footer?: ReactNode;
1689
+ };
1690
+
1691
+ export declare function IslandCommitPill({ onOpenCart, cartLabel, onOpenPromo, promoLabel, }: IslandCommitPillProps): react_jsx_runtime.JSX.Element;
1692
+
1693
+ /**
1694
+ * THE HEADER'S TRAILING PILL ONCE THERE IS AN ORDER — the design's
1695
+ * `HeaderButton-CartSummary` on the Pay cards: what is being bought, and the one thing
1696
+ * that can still change what it costs.
1697
+ *
1698
+ * ── TWO TARGETS AGAIN, AND THE RULE IS BACK BETWEEN THEM ─────────────────────
1699
+ *
1700
+ * This pill held an order glyph and a hold ring once, lost the ring when the two screens
1701
+ * behind them became one, and is two controls again for a different reason: the second one
1702
+ * is no longer another way to the same screen, it is the promo code.
1703
+ *
1704
+ * THE CLOCK IS NOT HERE AND DOES NOT NEED TO BE. The Pay cards count the hold down in
1705
+ * their own subtitle and wear the same ring on their hero — see the `REVIEW`/`PAYMENT`
1706
+ * branch of `subtitle`, which is where that moved. A third reading of one countdown in the
1707
+ * header would be the pill saying what the card already says twice.
1708
+ *
1709
+ * NEITHER IS THE TOTAL, for the same reason: the card's title IS the money on every step
1710
+ * that draws this — `Pay €12.34`, off the quote.
1711
+ */
1712
+ export declare type IslandCommitPillProps = {
1713
+ /** Opens the cart screen. */
1714
+ readonly onOpenCart: () => void;
1715
+ /** Names the cart target for assistive technology. This package holds no copy. */
1716
+ readonly cartLabel: string;
1717
+ /** Opens the promo code step. */
1718
+ readonly onOpenPromo: () => void;
1719
+ /** The promo target's own words — it is the one half of this pill that is drawn as text. */
1720
+ readonly promoLabel: string;
1721
+ };
1722
+
1723
+ /** WHAT LED A MOVE, which decides what the SURFACE does about it. */
1724
+ declare type IslandGesture = 'island' | 'element' | 'none';
1725
+
1726
+ export declare function IslandHeader({ dismiss, onDismiss, dismissIcon, dismissLabel, headerLead, headerTrail, closable, }: IslandHeaderProps): react_jsx_runtime.JSX.Element;
1727
+
1728
+ /**
1729
+ * `IslandHeaderWrapper` — the way out at the leading edge, the cart summary at the
1730
+ * trailing one, and nothing between them.
1731
+ */
1732
+ export declare type IslandHeaderProps = {
1733
+ /** What the header button DOES, which decides what it draws. */
1734
+ readonly dismiss?: 'back' | 'close';
1735
+ readonly onDismiss: () => void;
1736
+ /**
1737
+ * Overrides the glyph. Defaults to `@scopetickets/icons`, which is STui's own set
1738
+ * generated from the file rather than copied by hand. A slot, because a host with its
1739
+ * own icon set should not be made to take a second one.
1740
+ */
1741
+ readonly dismissIcon?: ReactNode;
1742
+ /** Names the control for assistive technology. Defaults to the `dismiss`. */
1743
+ readonly dismissLabel?: string;
1744
+ /**
1745
+ * A second pill BESIDE the way out — the leading group the design, `$2` off the cross.
1746
+ */
1747
+ readonly headerLead?: ReactNode;
1748
+ /**
1749
+ * A PILL AT THE TRAILING END, and ONE SLOT for whichever of them the step wants.
1750
+ *
1751
+ * There were two props here and a rule about which won — `summary` outranking
1752
+ * `headerTrail`, on the reading that a counting hold outranks a way back. The two could
1753
+ * never have collided: the funnel is the half of the purchase before a cart exists and
1754
+ * the commit pill is the half after. A precedence rule between two things that cannot
1755
+ * meet is a rule nobody can be sure of, so the caller picks and this draws what it is
1756
+ * handed.
1757
+ */
1758
+ readonly headerTrail?: ReactNode;
1759
+ /**
1760
+ * WHETHER THE WAY OUT IS OFFERED. Defaults to true.
1761
+ *
1762
+ * DRAWN AND HIDDEN RATHER THAN REMOVED, which is the design's own answer — the abandon
1763
+ * card sets the whole row to zero opacity rather than dropping it. The cross has to be
1764
+ * in the same place on every card, because carried elements are measured against a
1765
+ * header that rides every change in the card's height; taking the button out of the tree
1766
+ * would move the row and every element travelling through it.
1767
+ */
1768
+ readonly closable?: boolean;
1769
+ };
1770
+
1771
+ /**
1772
+ * The persistent surface, the two content planes inside it, and the carry layer above
1773
+ * them.
1774
+ */
1775
+ export declare function IslandHost({ presentation, contentKey, continuity, label, mode, align, journeyFullscreen, chrome, bay, bayLabel, bayVisible, bayRows, bayActions, sealed, children, }: IslandHostProps): react_jsx_runtime.JSX.Element;
1776
+
1777
+ export declare type IslandHostProps = {
1778
+ /** What shape the island should be. Drives the frame, not the content. */
1779
+ presentation: IslandPresentation;
1780
+ /**
1781
+ * Identity of what is being shown. A CHANGE here starts a transition; the same key
1782
+ * re-rendered with different children updates in place. Use the step name, not a value
1783
+ * that changes as the buyer types.
1784
+ */
1785
+ contentKey: string;
1786
+ /**
1787
+ * WHICH ISLAND THIS HOST IS, ACROSS THE COMPONENT THAT MOUNTS IT.
1788
+ *
1789
+ * Named, and a host that leaves hands the next one under the same name what it was
1790
+ * showing — so a widget whose faces are separate components still MORPHS between them
1791
+ * instead of cutting. See `island-continuity`, which is the whole mechanism and the
1792
+ * argument for it. Absent means "only itself", which is every other mount.
1793
+ */
1794
+ continuity?: string;
1795
+ /** Names the region for assistive technology. */
1796
+ label: string;
1797
+ /**
1798
+ * THE CHROME, WHICH IS NOT CONTENT — a bar drawn over both planes and rebuilt by
1799
+ * neither.
1800
+ */
1801
+ chrome?: ReactNode;
1802
+ /**
1803
+ * SEALED — nothing anywhere on the page may be pressed. Draws `IslandShield`, and it is
1804
+ * taken as a flag rather than a node so the host owns where that sheet sits: it has to
1805
+ * hang off the anchor, outside every transform and filter between here and there.
1806
+ */
1807
+ sealed?: boolean;
1808
+ /** Which appearance to render. Defaults to following the viewer's OS. */
1809
+ mode?: IslandMode;
1810
+ /**
1811
+ * Which edge of its reservation the island is pinned to. Defaults to `bottom`, which is
1812
+ * where the design docks it.
1813
+ */
1814
+ align?: IslandAlignment;
1815
+ /**
1816
+ * THE PROVIDER'S JOURNEY, TAKING THE SCREEN — stamped on the root so the CSS can lift
1817
+ * the fullscreen overlay over the host page and the centred island's transform out of
1818
+ * the overlay's way. Pass-through to `IslandSurfaceProps.journeyFullscreen`.
1819
+ */
1820
+ journeyFullscreen?: boolean;
1821
+ bay?: ReactNode;
1822
+ /**
1823
+ * NOT A CONTENT CHANGE. A bay that appears, disappears or changes height must not
1824
+ * start a step transition or carry anything: the planes do not move, and the payment
1825
+ * frame inside the bay must not be re-laid-out by anything but its own resize.
1826
+ */
1827
+ bayLabel?: string;
1828
+ bayVisible?: boolean;
1829
+ /**
1830
+ * HOW MANY ENTRIES THE BAY HOLDS ROOM FOR, whether or not it has them yet.
1831
+ *
1832
+ * A bay measures what is in it, which is right for a region whose contents are the
1833
+ * caller's — and wrong for two screens that are meant to BE the same card. Review and
1834
+ * the card screen hold the same kind of stack in the same place; a buyer crossing
1835
+ * between them should see the contents change, not the card resize under their hand,
1836
+ * and every entry in that stack is an async arrival (a provider reporting its height,
1837
+ * a platform answering whether it can pay) that would otherwise resize it again.
1838
+ *
1839
+ * So the CALLER says how many rows the pair reserves and both screens ask for the same
1840
+ * number. The reserve is a FLOOR, not a height: a bay with more to show than it
1841
+ * reserved still grows — see the rule in `island.css`.
1842
+ */
1843
+ bayRows?: number;
1844
+ /**
1845
+ * THE BAY'S OWN BUTTONS, drawn beneath the bay's content (form first, CTA last —
1846
+ * the SDK selector's own order). Same `CardAction` markup the card plane uses, so
1847
+ * the press, the compression and the disabled read match everywhere.
1848
+ */
1849
+ bayActions?: readonly IslandAction[];
1850
+ children: ReactNode;
1851
+ };
1852
+
1853
+ /** How the island is told which appearance to render. */
1854
+ /**
1855
+ * Three states, not two — matching the SDK's own `ThemeSelectionMode`, so a consumer
1856
+ * that already holds one can pass it straight through.
1857
+ */
1858
+ export declare type IslandMode = 'light' | 'dark' | 'system';
1859
+
1860
+ /** The collapsed island — Figma `CtaCollapsedGetTicket`. */
1861
+ export declare function IslandPill({ avatar, subtitle, title, actionLabel, onAction }: IslandPillProps): react_jsx_runtime.JSX.Element;
1862
+
1863
+ export declare type IslandPillProps = {
1864
+ /**
1865
+ * The round preview at the leading edge — a
1866
+ * `.scopetickets-island-avatar.scopetickets-island-avatar--sm` element, `$10` across.
1867
+ */
1868
+ readonly avatar?: ReactNode;
1869
+ /**
1870
+ * The quiet line above the title. Optional — the design ships it hidden, which is what
1871
+ * makes it optional rather than empty.
1872
+ */
1873
+ readonly subtitle?: ReactNode;
1874
+ /** The line that carries the number. `heading/lg`. */
1875
+ readonly title?: ReactNode;
1876
+ /** The label on the action. `text/bold/md`, e.g. Figma's "Get Ticket". */
1877
+ readonly actionLabel: ReactNode;
1878
+ readonly onAction: () => void;
1879
+ };
1880
+
1881
+ /** The island's shape, as pure data. */
1882
+ declare type IslandPresentation = 'compact' | 'card' | 'full';
1883
+
1884
+ /** The island's own box — fill, stroke, radius, and the frame it animates. */
1885
+ export declare const IslandSurface: react.ForwardRefExoticComponent<IslandSurfaceProps & react.RefAttributes<HTMLDivElement>>;
1886
+
1887
+ export declare type IslandSurfaceProps = {
1888
+ /** Corner radius in px, from `frameFor`. */
1889
+ radius: number;
1890
+ /** Inner padding in px, per axis, from `frameFor`. */
1891
+ padding: PlanePadding;
1892
+ /** Max width in px, or `null` to fill the container. */
1893
+ maxWidth: number | null;
1894
+ /** Shared header-row height in px, from `frameFor`. */
1895
+ rowHeight: number;
1896
+ /** Inset from the container's edge in px, from `frameFor`. */
1897
+ edge: number;
1898
+ /**
1899
+ * Which edge of the anchor the frame is pinned to, or its middle. Stamped as
1900
+ * `data-align`, because it moves the frame, the planes AND the carry layer's origin —
1901
+ * three rules that must never disagree, so they hang off one attribute.
1902
+ */
1903
+ align: IslandAlignment;
1904
+ /**
1905
+ * THE PROVIDER'S FULLSCREEN JOURNEY, stamped as `data-journey`. Two rules hang off
1906
+ * it, and they hang off the ROOT because both are about what the root's own
1907
+ * geometry does to a fixed-position descendant: the journey overlay has to escape
1908
+ * the island entirely, and a centred island's `translateY(-50%)` would otherwise
1909
+ * become the overlay's containing block instead of the viewport.
1910
+ */
1911
+ journeyFullscreen?: boolean;
1912
+ /**
1913
+ * Where the press gesture has got to, or `undefined` when nothing is being pressed.
1914
+ * Stamped as `data-press`.
1915
+ */
1916
+ press?: PressPhase | null;
1917
+ /**
1918
+ * How the move should be acknowledged, or `undefined` when nothing is moving. Stamped
1919
+ * as the VALUE of `data-transitioning`. See `IslandGesture` for the three answers and
1920
+ * why a boolean could not hold them.
1921
+ */
1922
+ gesture?: IslandGesture;
1923
+ /** True while a step change is in flight. */
1924
+ transitioning?: boolean;
1925
+ /** Which appearance to render, or `undefined` to follow the viewer's OS. */
1926
+ mode?: IslandMode;
1927
+ /**
1928
+ * The height the surface is to be, in px — the plane's measurement AND the bay's,
1929
+ * already added up by `IslandHost`, which is the one place that knows both. `null`
1930
+ * before the first measurement renders at `auto`, because a 0-height first paint would
1931
+ * flash an empty box on mount.
1932
+ */
1933
+ height: number | null;
1934
+ /** Names the region for assistive technology. */
1935
+ label: string;
1936
+ /**
1937
+ * The height reserved in the host page's flow, in px — `footprintHeight` of the
1938
+ * island's COLLAPSED presentation, not its current one.
1939
+ */
1940
+ footprint: number;
1941
+ /** WHICH AXES THE POP IS SPENT ON — `both`, or `block` alone. */
1942
+ popAxis?: 'both' | 'block';
1943
+ /**
1944
+ * THE BAY — a region that joins and leaves the card WITHOUT belonging to any
1945
+ * step, so its contents survive every plane change. The clip tears down and rebuilds
1946
+ * both planes on a step change; a payment frame mounted there would be destroyed at
1947
+ * the exact moment it must not be. Like `chrome`, the bay is a sibling of the clip
1948
+ * inside the surface, but at the other end: it grows the card instead of sitting
1949
+ * over its content.
1950
+ */
1951
+ bay?: ReactNode;
1952
+ /**
1953
+ * The bay's own box, in px — `0` while it is closed. Published as
1954
+ * `--scopetickets-island-bay-height`, which is the bay element's own height and
1955
+ * nothing else's: the clip takes what is left of the surface by FLEX rather than by
1956
+ * subtracting this var, so the two cannot be told different numbers.
1957
+ */
1958
+ bayHeight?: number | null;
1959
+ /** The element children are actually positioned inside. */
1960
+ clipRef?: Ref<HTMLDivElement>;
1961
+ children: ReactNode;
1962
+ /**
1963
+ * The persistent chrome — `IslandHeader`, drawn over both planes and rebuilt by
1964
+ * neither.
1965
+ */
1966
+ chrome?: ReactNode;
1967
+ /**
1968
+ * Drawn OUTSIDE the clip, as a sibling of it — the carry layer, and so far the only
1969
+ * thing that belongs there.
1970
+ */
1971
+ overlay?: ReactNode;
1972
+ /**
1973
+ * A sheet over the viewport, for a state that admits no input — see `IslandShield`.
1974
+ * Taken HERE rather than anywhere inside the frame because it is `position: fixed` and
1975
+ * the frame's transform would become its containing block.
1976
+ */
1977
+ shield?: ReactNode;
1978
+ /**
1979
+ * Nothing may be pressed — see `IslandShield`. Softens the pop, because the press it is
1980
+ * answering did not do anything.
1981
+ */
1982
+ sealed?: boolean;
1983
+ };
1984
+
1985
+ /**
1986
+ * The fewest cutouts that still leave a code behind.
1987
+ *
1988
+ * Derived rather than written down, because the floor moves with the padding rather than
1989
+ * with anything a reader could guess: it is the first count whose content survives having
1990
+ * the inset taken off both ends, so a padding re-tuned upward raises it by itself.
1991
+ */
1992
+ export declare function minimumColumns({ segment, pad }: TicketEdgeTokens): number;
1993
+
1994
+ /**
1995
+ * CONTROLLED OR SELF-HELD. The widget passes both props, which is what keeps a typed
1996
+ * name when the buyer steps away and back — the card is rebuilt on every step, and an
1997
+ * answer held only here did not survive the rebuild. A caller that passes neither gets
1998
+ * the step's own memory, which is what the step had before.
1999
+ */
2000
+ export declare function NameStep({ value, onChange, onAnsweredChange, }: AnswerReporting & {
2001
+ readonly value?: NameValue;
2002
+ readonly onChange?: (value: NameValue) => void;
2003
+ }): react_jsx_runtime.JSX.Element;
2004
+
2005
+ /**
2006
+ * THE NAME AS THE BUYER'S TWO FIELDS — the same shape `BuyerDetails` takes apart, so
2007
+ * the widget's collected copy IS the answer and nothing has to be split or joined on the
2008
+ * way to the intent.
2009
+ */
2010
+ declare type NameValue = {
2011
+ readonly firstName: string;
2012
+ readonly lastName: string;
2013
+ };
2014
+
2015
+ export declare type Notice = {
2016
+ readonly id: NoticeId;
2017
+ readonly severity: NoticeSeverity;
2018
+ /** Title Case. */
2019
+ readonly title: string;
2020
+ /** Sentence case. Never reported — see `noticeTelemetry`. */
2021
+ readonly subtitle: string;
2022
+ /** In order, so the first is the lead. */
2023
+ readonly actions: readonly NoticeAction[];
2024
+ };
2025
+
2026
+ export declare type NoticeAction = {
2027
+ readonly id: NoticeActionId;
2028
+ /** CONFIRM is the one likeliest to end in a sale, and is drawn as the lead. */
2029
+ readonly kind: 'CONFIRM' | 'SECONDARY';
2030
+ readonly label: string;
2031
+ };
2032
+
2033
+ /** What a button DOES, kept apart from what it says: the label is copy and will change. */
2034
+ export declare type NoticeActionId =
2035
+ /** Take the order as it stands — the smaller sale, completed. */
2036
+ 'CONTINUE'
2037
+ /** Back to the party step with the order intact, to ask for something else. */
2038
+ | 'CHANGE_ORDER'
2039
+ /**
2040
+ * Make the call again. Only ever offered where there IS something to try — see
2041
+ * `ORDER_NOT_OPENED`, which deliberately has no retry because nothing could be retried
2042
+ * with.
2043
+ */
2044
+ | 'RETRY'
2045
+ /**
2046
+ * Give up on the account and go on to the ticket. Only reachable after payment, which
2047
+ * is what makes it a real way out rather than an abandoned purchase: the tickets are
2048
+ * already the buyer's.
2049
+ */
2050
+ | 'SKIP_ACCOUNT'
2051
+ /** Leave. Every notice offers one. */
2052
+ | 'CLOSE';
2053
+
2054
+ export declare type NoticeId =
2055
+ /**
2056
+ * FEWER TICKETS THAN WERE ASKED FOR ARE HELD. The platform fills what it can — see
2057
+ * `AllowPartialFulfillment` — so this is a smaller order the buyer already owns, which
2058
+ * is why it leads with taking it rather than with changing it.
2059
+ */
2060
+ 'ORDER_PART_FILLED'
2061
+ /**
2062
+ * NOT ONE OF THEM COULD BE HELD, for a party of more than one. The flag fills what it
2063
+ * can, and where it can fill NOTHING the platform refuses outright — so this is the
2064
+ * bottom of the same range as `ORDER_PART_FILLED` and not a different kind of event.
2065
+ */
2066
+ | 'ORDER_NOT_ENOUGH'
2067
+ /** The same refusal met by a buyer on their own, where there is no party to speak of. */
2068
+ | 'ORDER_SOLD_OUT'
2069
+ /** The order could not be opened at all: no cart, and nothing to check out. */
2070
+ | 'ORDER_NOT_OPENED'
2071
+ /**
2072
+ * The verification code could not be SENT. Distinct from a code that was refused, which
2073
+ * is the buyer mistyping and is answered by the boxes themselves — validation, not a
2074
+ * failure of ours.
2075
+ */
2076
+ | 'ACCOUNT_CODE_NOT_SENT'
2077
+ /** Everything was answered and `POST /api/Users` would not take it. */
2078
+ | 'ACCOUNT_NOT_CREATED'
2079
+ /**
2080
+ * The buyer rated their purchase and the rating did not reach us. THE ONLY NOTICE HERE
2081
+ * ABOUT SOMETHING THE BUYER DOES NOT NEED — the order is placed either way, and a
2082
+ * rating is a courtesy they have already paid. It is raised anyway because the
2083
+ * alternative is a press that silently did nothing: they chose four stars, pressed
2084
+ * Continue, and nothing on the platform has heard of it.
2085
+ */
2086
+ | 'FEEDBACK_NOT_SENT'
2087
+ /**
2088
+ * The device signed something and the platform would not take it — or the challenge in
2089
+ * front of it never arrived. NOT a buyer who waved the prompt away, which is a normal
2090
+ * thing to do and raises nothing; see `usePasskeySignIn`, which draws that line.
2091
+ */
2092
+ | 'SIGN_IN_NOT_COMPLETED'
2093
+ /**
2094
+ * The password door could not be reached — the call did not go, or did not come back.
2095
+ * NOT a password the platform refused, which is the buyer typing and is answered by the
2096
+ * card itself.
2097
+ */
2098
+ | 'SIGN_IN_UNREACHABLE'
2099
+ /**
2100
+ * THE BOOKING WOULD NOT LOAD. The money moved, the tickets exist, and the one request
2101
+ * that says who they are for did not come back — so the buyer is looking at a card that
2102
+ * cannot list anything. NOT a cart that never became a transaction, which is an answer
2103
+ * and gets a card of its own rather than a failure.
2104
+ */
2105
+ | 'BOOKING_NOT_LOADED'
2106
+ /**
2107
+ * THE PLATFORM WOULD NOT TAKE THE TICKETHOLDER. A refusal, not a failure to reach — the
2108
+ * details went and came back declined, which is a WARNING because the system worked and
2109
+ * something about the answer needs adjusting.
2110
+ */
2111
+ | 'TICKETHOLDER_REFUSED'
2112
+ /**
2113
+ * The ticketholder's details never reached the platform. The ticket is unchanged and the
2114
+ * buyer is still holding what they typed, so this is the one of the two that is a fault.
2115
+ */
2116
+ | 'TICKETHOLDER_NOT_SAVED';
2117
+
2118
+ /**
2119
+ * The notices whose words are the same every time. One so far: a notice whose words depend
2120
+ * on what the flow knows gets a builder instead.
2121
+ */
2122
+ export declare const NOTICES: Readonly<Record<Exclude<NoticeId, 'ORDER_PART_FILLED'>, Notice>>;
2123
+
2124
+ /**
2125
+ * WHAT A BUYER IS TOLD WHEN THE ORDER DID NOT DO WHAT THEY ASKED.
2126
+ *
2127
+ * ONE CARD DRAWN FROM DATA — never a screen per failure, and never failure UI inside a
2128
+ * step. Adding a case is an entry here and a raise from the site that knows: see
2129
+ * `raiseFor` and the two effects in `ScopeTicketsCheckout` that call it.
2130
+ *
2131
+ * ONE VOCABULARY IN TWO PACKAGES, and that is a debt rather than a design. `@scopetickets
2132
+ * /sdk` has said all of this since before the island existed — the same two severities,
2133
+ * the same action ids, the same reporting rule — and `packages/checkout` cannot reach it:
2134
+ * neither package depends on the other, and the island exists to be the lean one. So the
2135
+ * vocabulary is copied, and the WORDING is too wherever the SDK has already said the same
2136
+ * thing to a buyer — copy that has been read beats copy invented twice. When the notices
2137
+ * module moves somewhere both can use, this file is what it replaces; the names are
2138
+ * deliberately identical so that merge is a deletion.
2139
+ *
2140
+ * Pure: no React, no network, no DOM.
2141
+ */
2142
+
2143
+ /**
2144
+ * WARNING: the system worked and something needs adjusting, so there is a way forward.
2145
+ * FAILURE: something broke — leave, or try again where there is anything to try.
2146
+ *
2147
+ * IT IS LOAD-BEARING. It decides how a notice is reported and how its lead button is
2148
+ * painted, so neither can disagree with the other: a sold-out ticket is inventory, and
2149
+ * filing warnings as faults buries the real ones within a week of a busy on-sale.
2150
+ */
2151
+ export declare type NoticeSeverity = 'WARNING' | 'FAILURE';
2152
+
2153
+ /**
2154
+ * How a notice is FILED: a warning is a breadcrumb on the trail to the next fault, an
2155
+ * exception is the fault. The same rule the reporter in `@scopetickets/sdk` applies, and
2156
+ * the reason severity cannot be decorative.
2157
+ */
2158
+ export declare function noticeTelemetry(severity: NoticeSeverity): 'BREADCRUMB' | 'EXCEPTION';
2159
+
2160
+ /**
2161
+ * "12:00 - 12:45", "12:00" for an event with no end, or `null` for one that sells no
2162
+ * sessions at all. A hyphen with spaces around it, which is the design's own.
2163
+ */
2164
+ export declare function occasionTime(occasion: BookingOccasion): string | null;
2165
+
2166
+ /**
2167
+ * WHAT THE ORDER CAME TO — one state rather than a count beside an error.
2168
+ *
2169
+ * It was `{ shortfall: number, error: Error | null }`, two fields tracking one event, and
2170
+ * the pair could not say the case that matters most: a session with nothing left refuses
2171
+ * the whole cart, so it arrives as a THROW rather than as a shortfall equal to what was
2172
+ * asked. Against two fields that reads as `failed`, indistinguishable from a dropped
2173
+ * connection, and inventory gets filed as breakage — see `noticeTelemetry`.
2174
+ *
2175
+ * Pure: no React, no network, no DOM.
2176
+ */
2177
+ declare type OrderFill =
2178
+ /** No cart has been asked for yet, or one is in flight. */
2179
+ {
2180
+ readonly status: 'PENDING';
2181
+ }
2182
+ /** Every head asked for is held. */
2183
+ | {
2184
+ readonly status: 'FILLED';
2185
+ }
2186
+ /**
2187
+ * FEWER HEADS THAN ASKED FOR ARE HELD, and they are the buyer's — see
2188
+ * `AllowPartialFulfillment`. Both numbers are stated rather than derived, so a notice
2189
+ * can say either without doing arithmetic to find the other.
2190
+ */
2191
+ | {
2192
+ readonly status: 'SHORT';
2193
+ readonly held: number;
2194
+ readonly asked: number;
2195
+ }
2196
+ /**
2197
+ * NOTHING COULD BE HELD. The platform refuses the whole request when it can fill none of
2198
+ * it, EVEN WITH the partial-fulfilment flag set. `asked` rides along because the party
2199
+ * that met the refusal decides the words — see `raiseFor`.
2200
+ */
2201
+ | {
2202
+ readonly status: 'SOLD_OUT';
2203
+ readonly asked: number;
2204
+ }
2205
+ /** Something broke. The cart, the tickets or the fill did not answer. */
2206
+ | {
2207
+ readonly status: 'FAILED';
2208
+ readonly error: Error;
2209
+ };
2210
+
2211
+ export declare type OrderIntent = {
2212
+ /** The one field a host must supply: there is nothing to sell without it. */
2213
+ readonly subject: OrderSubject;
2214
+ /** Who is coming. Absent means the widget asks. */
2215
+ readonly composition?: IntentComposition;
2216
+ /** `YYYY-MM-DD`. Meaningless on an event subject, which carries its own day. */
2217
+ readonly day?: string;
2218
+ /** The slot's own key, where the event sells timed sessions. */
2219
+ readonly timeslot?: string;
2220
+ readonly buyer?: IntentBuyer;
2221
+ /**
2222
+ * WHETHER THE EVENT ASKS ITS OWN QUESTIONS, and the one field where absent does NOT
2223
+ * mean "you ask".
2224
+ *
2225
+ * Every other field here is optional because the widget can collect it: there is a
2226
+ * party stepper, a calendar, a name field. There is no such control for these. The
2227
+ * questions are the EVENT's, they vary in number and height, and they come from an
2228
+ * endpoint that takes an id the widget has no cart to read — see `DETAILS`'s blurb.
2229
+ * So "absent" cannot mean "ask them", because there is nothing to ask with; it means
2230
+ * the event asks nothing, which is the common case and the safe one.
2231
+ *
2232
+ * Saying `true` puts the More Information card in the flow as a GATE — it says
2233
+ * questions are waiting, and does not draw them.
2234
+ */
2235
+ readonly asksQuestions?: boolean;
2236
+ /** Questionnaire answers already collected, by question id. */
2237
+ readonly answers?: Readonly<Record<string, string>>;
2238
+ /** A method the host has already had chosen. */
2239
+ readonly paymentMethodKey?: string;
2240
+ };
2241
+
2242
+ /**
2243
+ * WHAT A HOST HANDS THE WIDGET, complete or partial.
2244
+ *
2245
+ * A host calls the widget to do the parts it will not or cannot do itself. So it says
2246
+ * what it already knows and leaves the rest absent, and the widget collects whatever is
2247
+ * missing. Every field but the subject is optional for exactly that reason: absent means
2248
+ * "you ask", not "there is none".
2249
+ *
2250
+ * PARTIAL IS THE NORMAL CASE. A host with its own calendar fills the day and leaves the
2251
+ * buyer empty; a host with nothing but a series key fills only the subject. Both are
2252
+ * valid, and the difference between them is which steps the widget mounts.
2253
+ */
2254
+
2255
+ /**
2256
+ * WHAT IS BEING BOUGHT INTO, as one value rather than two nullable keys.
2257
+ *
2258
+ * A series is a run of events sold together — the buyer still picks a day. An event is
2259
+ * one occasion, so the day is already decided and the widget must not ask for it. Two
2260
+ * separate `seriesKey`/`eventKey` fields would allow both at once and neither, and
2261
+ * would leave every reader deciding which wins.
2262
+ */
2263
+ export declare type OrderSubject =
2264
+ /** A run the buyer chooses a day within. */
2265
+ {
2266
+ readonly kind: 'series';
2267
+ readonly key: string;
2268
+ }
2269
+ /** One occasion, its day already settled by the choice of it. */
2270
+ | {
2271
+ readonly kind: 'event';
2272
+ readonly key: string;
2273
+ };
2274
+
2275
+ /**
2276
+ * `16:00:00` -> `16:00`. Null for anything that is not a readable clock time, including
2277
+ * an hour or minute out of range..
2278
+ */
2279
+ export declare function parseWallClockTime(value: string | null | undefined): string | null;
2280
+
2281
+ /**
2282
+ * ONLY N TICKETS ARE HELD — the notice the count made possible.
2283
+ *
2284
+ * The SDK's own `NOT_ENOUGH` says what this replaces: "No number, because the platform
2285
+ * refuses on availability without saying how many remain. With a count this becomes 'Only
2286
+ * 4 Tickets Left' and leads with Book 4 Instead — the strongest card in the set." The
2287
+ * count exists now, and it is better than a count: the tickets are already the buyer's,
2288
+ * so the lead button takes them rather than offering to try for them.
2289
+ */
2290
+ export declare function partFilledNotice(held: number, asked: number): Notice;
2291
+
2292
+ /** The party step's controls, holding their own counts. */
2293
+ /** The step itself: rows when the event names its types, one line when it does not. */
2294
+ export declare function PartyStepper({ userTypes, counts, onChange, max, soloName, onRefuse, refused, }: PartyStepperProps): react_jsx_runtime.JSX.Element;
2295
+
2296
+ export declare type PartyStepperProps = {
2297
+ /** What the event offers. EMPTY draws the single unnamed line instead of rows. */
2298
+ readonly userTypes: readonly PartyUserTypeOption[];
2299
+ /** How many of each, by user-type key. */
2300
+ readonly counts: Readonly<Record<string, number>>;
2301
+ readonly onChange: (key: string, count: number) => void;
2302
+ /** The ticket's ceiling, across every row together. */
2303
+ readonly max: number;
2304
+ /** What the single line is called when there are no user types. */
2305
+ readonly soloName?: string;
2306
+ /**
2307
+ * A NUMBER OVER THE CEILING WAS ASKED FOR, or `null` once one within it is. The step is
2308
+ * not answered while this stands: a card showing a refusal and a live Continue would be
2309
+ * telling a buyer both that they cannot have it and that they may proceed.
2310
+ */
2311
+ readonly onRefuse?: (asked: number | null) => void;
2312
+ /**
2313
+ * WHAT WAS ASKED FOR, HELD BY THE WIDGET. Controlled rather than kept here, because the
2314
+ * step's answered-ness depends on it and that lives up there — two copies of one fact is
2315
+ * how the note ends up on screen while Continue is live, or the other way round.
2316
+ */
2317
+ readonly refused?: number | null;
2318
+ };
2319
+
2320
+ /**
2321
+ * THE PARTY STEP — one stepper per user type, or a single line when the event offers
2322
+ * none.
2323
+ *
2324
+ * Controlled: the caller holds the counts, because the composition belongs to the order
2325
+ * rather than to the control that edits it. `max` is the ticket's ceiling and is the
2326
+ * caller's too — a row has no opinion about how many people a party may hold.
2327
+ */
2328
+ /** A user type the event offers, as the row needs it. */
2329
+ export declare type PartyUserTypeOption = {
2330
+ /**
2331
+ * WHAT THE COMPOSITION COUNTS UNDER. The platform's types are keyed by NAME, because an
2332
+ * assignment key belongs to a product no one has chosen yet — see `user-types`. A host
2333
+ * supplying its own may key them however it likes.
2334
+ */
2335
+ readonly key: string;
2336
+ /** Always present: an event with no discount types still offers a default. */
2337
+ readonly name: string;
2338
+ /** The organiser's own condition on choosing it, or null. */
2339
+ readonly note: string | null;
2340
+ };
2341
+
2342
+ /**
2343
+ * "Add Password" — the design, whose counting is ported exactly: see
2344
+ * `@/domain/password` for why the confirm field's ring measures itself against the
2345
+ * FIRST FIELD's current length rather than against the rule.
2346
+ */
2347
+ export declare function PasswordStep({ revealed, accountEmail, onAnsweredChange, onPasswordChange, }: {
2348
+ readonly revealed: boolean;
2349
+ /**
2350
+ * WHOSE PASSWORD THIS IS — the address the account is being made with, for the
2351
+ * browser's own save prompt. See the field below.
2352
+ */
2353
+ readonly accountEmail?: string;
2354
+ /**
2355
+ * WHERE THE PASSWORD GOES. Reporting only that the step is ANSWERED is all a card
2356
+ * needs and not enough to make an account with — `POST /api/Users` wants the value,
2357
+ * two steps from here.
2358
+ *
2359
+ * ONLY WHEN IT IS WHOLE. A half-typed password reported on every keystroke would put a
2360
+ * dozen partial copies through the flow to no purpose; this hands over the one that
2361
+ * passed `canSubmitPassword`, and an empty string whenever it stops passing.
2362
+ */
2363
+ readonly onPasswordChange?: (password: string) => void;
2364
+ } & AnswerReporting): react_jsx_runtime.JSX.Element;
2365
+
2366
+ /** The Payment Methods list — the design. */
2367
+ /** Which button role the pay action takes for a given method. */
2368
+ export declare function payButtonRole(kind: PaymentKind): 'action' | 'primary';
2369
+
2370
+ /** One way to pay, as the list needs it. */
2371
+ /** WHO DRAWS THE BUTTON, which is the only thing this distinction decides. */
2372
+ export declare type PaymentKind = 'WALLET' | 'CARD';
2373
+
2374
+ export declare type PaymentMethod = {
2375
+ readonly key: string;
2376
+ readonly kind: PaymentKind;
2377
+ /**
2378
+ * Drawn WHERE THE RADIO WOULD BE, for a row that is chosen the same way but is not a
2379
+ * stored method — "Add New Card". The design gives it a mark rather than a radio, and
2380
+ * it is still one of the six rows you pick between.
2381
+ */
2382
+ readonly icon?: ReactNode;
2383
+ /**
2384
+ * What the row says. Once the marks ship, the mark says it and this names the row for
2385
+ * assistive technology instead.
2386
+ */
2387
+ readonly label: string;
2388
+ /** The brand's own logo, when there is one to draw. */
2389
+ readonly mark?: ReactNode;
2390
+ /**
2391
+ * A card's last four, in the mono numerals — `• 2468`. PART OF THE LOCKUP: it says
2392
+ * which Mastercard, so it sits against the mark rather than at the row's trailing edge.
2393
+ * The pay button composes the same two into one phrase.
2394
+ */
2395
+ readonly detail?: string;
2396
+ /**
2397
+ * A SUBTITLE for the method — Figma's own "Earn 2x RevPoints", a second thing said
2398
+ * about it rather than a continuation of its name. It takes the rest of the row and
2399
+ * ends flush with the trailing padding.
2400
+ */
2401
+ readonly perk?: string;
2402
+ /**
2403
+ * THE ROW CANNOT BE CHOSEN — the wallet before the payment host has said the device
2404
+ * can pay (or has said it cannot). A row that cannot be pressed still owes the buyer
2405
+ * the reason, which is `note`.
2406
+ */
2407
+ readonly disabled?: boolean;
2408
+ /**
2409
+ * WHY A DISABLED ROW IS DISABLED, in the trailing slot a perk occupies — "Checking
2410
+ * availability…" while the host has not answered, "Unavailable on this device" when
2411
+ * it answered no. Drawn only while the row cannot be pressed.
2412
+ */
2413
+ readonly note?: string;
2414
+ };
2415
+
2416
+ export declare function PaymentMethods({ methods, selectedKey, onSelect, label }: PaymentMethodsProps): react_jsx_runtime.JSX.Element;
2417
+
2418
+ export declare type PaymentMethodsProps = {
2419
+ readonly methods: readonly PaymentMethod[];
2420
+ readonly selectedKey: string;
2421
+ readonly onSelect: (key: string) => void;
2422
+ /** Names the group for assistive technology. This package holds no copy. */
2423
+ readonly label: string;
2424
+ };
2425
+
2426
+ /**
2427
+ * WHAT A PAYMENT DID, in the platform's own three words.
2428
+ *
2429
+ * THE CHAIN, WHICH IS THE WHOLE POINT: the status endpoint's `completed` means the
2430
+ * PROVIDER took the money — lowercase because it is the platform API's own enum literal,
2431
+ * not ours. The frame's SUCCESS means the payment host then finalized it
2432
+ * (`convertToTransaction` succeeded), so the tickets exist. `PLACED` is what this widget
2433
+ * publishes, and it is set from SUCCESS alone — never from `completed`, which can arrive
2434
+ * while finalization is still pending or has failed.
2435
+ */
2436
+ export declare type PaymentOutcome =
2437
+ /** Declined, with the provider's own words for why. */
2438
+ {
2439
+ readonly kind: 'FAILED';
2440
+ readonly reason: string;
2441
+ }
2442
+ /**
2443
+ * Taken but not finalized. The recovery view's state: no pay button, no resubmit —
2444
+ * a second charge against a completed order is the one mistake this flow must not
2445
+ * offer.
2446
+ */
2447
+ | {
2448
+ readonly kind: 'PAID';
2449
+ }
2450
+ /** Taken. The tickets are the buyer's and nothing can change. */
2451
+ | {
2452
+ readonly kind: 'PLACED';
2453
+ /**
2454
+ * WHICH TICKET THE PAYMENT MADE — the first of them, and the one the rating card
2455
+ * rates. The payment host reads it off the transaction it has just converted and
2456
+ * names it on the frame's SUCCESS, which is the only moment it is knowable: there is
2457
+ * no attendee ticket until the money is finalized.
2458
+ *
2459
+ * OPTIONAL BECAUSE A HOST MAY ASSERT THIS OUTCOME ITSELF and have no ticket to name
2460
+ * — see `CheckoutProps.payment`. Nothing else in the flow reads it, so an outcome
2461
+ * without one is a complete answer to every question but the rating's.
2462
+ */
2463
+ readonly attendeeTicketKey?: string;
2464
+ };
2465
+
2466
+ export declare function PaymentReturn({ apiKey, environment, checkoutPath, returnPath, onCompleted, }: PaymentReturnProps): react_jsx_runtime.JSX.Element;
2467
+
2468
+ /**
2469
+ * THE RETURN PAGE FOR A PAYMENT THAT LEFT THE BROWSER — the Revolut app-handoff and the
2470
+ * popup's landing, mounted by the site at `/revolut-return` on the checkout page's own
2471
+ * origin (the host's redirect URLs point there; see the payment host's Checkout route).
2472
+ *
2473
+ * The widget is unmounted by then: navigation took the buyer away, so nothing of the
2474
+ * purchase survives on this page — not the client, not the island, not `onCommit`. This
2475
+ * component is what stands in: it builds its own API client from the key, converts the
2476
+ * cart on success, and hands completion to the site through `onCompleted` or a redirect
2477
+ * to `returnPath`. That `onCommit` can never fire here is a documented divergence on the
2478
+ * TwinkleTown checklist, not an oversight.
2479
+ */
2480
+ export declare interface PaymentReturnProps {
2481
+ /** The site's public API key — the same one the checkout widget mounts with. */
2482
+ readonly apiKey: string;
2483
+ /**
2484
+ * Which platform the cart lives on. The default matches the widget's own
2485
+ * (`production`); a site that mounts the widget on sandbox must say so here too.
2486
+ */
2487
+ readonly environment?: Environment;
2488
+ /**
2489
+ * Where the buyer's checkout page lives, shown as the way back when the payment
2490
+ * did not complete (cancelled or failed). The site's own route; no default.
2491
+ */
2492
+ readonly checkoutPath?: string;
2493
+ /**
2494
+ * Where to send the buyer after a successful conversion, when `onCompleted` is
2495
+ * not given. Navigation replaces this page — the buyer should not come "back" to
2496
+ * a return URL.
2497
+ */
2498
+ readonly returnPath?: string;
2499
+ /**
2500
+ * Completion news for the site, called once after the cart is converted and the
2501
+ * once-marker is written — see `purchase-completion.ts` for why the order of those
2502
+ * two is the rule and not a detail.
2503
+ */
2504
+ readonly onCompleted?: (cartKey: string) => void;
2505
+ }
2506
+
2507
+ /** "Phone Number" — the design, and it is TWO fields. CONTROLLED the same way Name is. */
2508
+ export declare function PhoneStep({ value, onChange, onAnsweredChange, }: AnswerReporting & {
2509
+ readonly value?: PhoneValue;
2510
+ readonly onChange?: (value: PhoneValue) => void;
2511
+ }): react_jsx_runtime.JSX.Element;
2512
+
2513
+ /** The pair the step holds — one row each. */
2514
+ declare type PhoneValue = {
2515
+ readonly dialCode: string;
2516
+ readonly national: string;
2517
+ };
2518
+
2519
+ /** Which steps wear the PICKER LAYOUT — no hero, so the card opens on the run. */
2520
+ export declare const PICKER_LAYOUT: Partial<Record<PurchaseStepId, boolean>>;
2521
+
2522
+ /**
2523
+ * WHAT A FINISHED PURCHASE HANDS THE BOOKING.
2524
+ *
2525
+ * THE CART KEY AND NOT THE TRANSACTION'S: `Transactions/ByKey` takes the cart's, and the
2526
+ * transaction's own comes back inside the response — see `bookingGateway`.
2527
+ *
2528
+ * THE OCCASION TRAVELS WITH IT because the platform does not answer for it, and the flow is
2529
+ * the one place that holds every field: it has just walked a buyer through choosing the run,
2530
+ * the day and the session. See `BookingOccasion`.
2531
+ */
2532
+ export declare type PlacedBooking = {
2533
+ readonly cartKey: string;
2534
+ readonly occasion: BookingOccasion;
2535
+ readonly attribution: TicketAttribution;
2536
+ /**
2537
+ * THE TICKETS, ALREADY READ — and this is why the handover is asynchronous.
2538
+ *
2539
+ * The island fetches its incoming content BEFORE it transitions, then morphs, then fades
2540
+ * in. Swapping to the booking and letting IT fetch puts a fifth card between the last step
2541
+ * of the purchase and the tickets: the buyer watches "Opening Your Booking" appear from
2542
+ * nothing and then transition again, which is two moves where the design draws one. So
2543
+ * the flow stays on the card the buyer just pressed until the read lands, and the swap is
2544
+ * the transition.
2545
+ *
2546
+ * ABSENT WHERE THE READ FAILED OR FOUND NOTHING, which is the one case the booking has to
2547
+ * work that out for itself — it has the notice and the Try Again, and this does not.
2548
+ */
2549
+ readonly record?: BookingRecord;
2550
+ };
2551
+
2552
+ /** The inset a plane lays its content out at, in px, per axis. */
2553
+ declare type PlanePadding = {
2554
+ readonly block: number;
2555
+ readonly inline: number;
2556
+ };
2557
+
2558
+ export declare type PressHandlers = {
2559
+ readonly onPointerDown: (event: PointerEvent_2) => void;
2560
+ readonly onPointerUp: () => void;
2561
+ readonly onPointerLeave: () => void;
2562
+ readonly onPointerEnter: (event: PointerEvent_2) => void;
2563
+ readonly onPointerCancel: () => void;
2564
+ /** Present only on an `element` press — the island has its own attribute. */
2565
+ readonly 'data-pressed'?: '';
2566
+ };
2567
+
2568
+ /** Where the press has got to. There are only two answers. */
2569
+ declare type PressPhase = 'held';
2570
+
2571
+ /** WHAT the press compresses, which is decided by what the control DOES. */
2572
+ export declare type PressScope = 'island' | 'element';
2573
+
2574
+ /**
2575
+ * THE PHOTO GRID'S OWN WORDS — the group, its cells and the two refusals.
2576
+ *
2577
+ * A STOCK PHOTO HAS NO NAME. The platform stocks faces, not people, so a cell is named by
2578
+ * where it sits — which is the only thing that tells one from another out loud, and is
2579
+ * what a buyer counting across a grid would say themselves.
2580
+ */
2581
+ export declare const PROFILE_PHOTO_COPY: {
2582
+ readonly group: "Profile photo";
2583
+ readonly photo: (position: number) => string;
2584
+ /** The cell an upload makes, which is the one face here that IS somebody's. */
2585
+ readonly uploaded: "Your photo";
2586
+ readonly refusal: {
2587
+ NOT_AN_IMAGE: string;
2588
+ TOO_LARGE: string;
2589
+ };
2590
+ };
2591
+
2592
+ /**
2593
+ * WHAT MAY BECOME SOMEBODY'S FACE — the one rule the photo step enforces on a file it did
2594
+ * not choose.
2595
+ *
2596
+ * `accept="image/*"` decides what the picker OFFERS and guarantees nothing: a browser
2597
+ * hands back whatever was dragged onto it. So a chosen file is external input, and the two
2598
+ * things knowable before anything is drawn are checked here, apart from the DOM.
2599
+ */
2600
+
2601
+ /**
2602
+ * ONE OF THE STOCK FACES A NEW ACCOUNT CAN BE GIVEN — the platform's, exactly as the
2603
+ * calendar's days are: the widget owns the grid's layout and none of its faces.
2604
+ */
2605
+ export declare type ProfilePhoto = {
2606
+ /** The id inside the `default:<id>` value an account stores. */
2607
+ readonly id: string;
2608
+ /** Where the picture is. */
2609
+ readonly url: string;
2610
+ };
2611
+
2612
+ /** One face the grid offers, as the grid needs it. */
2613
+ export declare type ProfilePhotoOption = {
2614
+ /**
2615
+ * THE AVATAR VALUE THIS CELL STANDS FOR — `default:<id>` for one of the platform's
2616
+ * stock photos, and an uploaded photo's own url for the cell a buyer made. It is what
2617
+ * the account will store, so the grid never has to translate what it hands back.
2618
+ */
2619
+ readonly value: string;
2620
+ /** Where the picture is. */
2621
+ readonly url: string;
2622
+ /** What this cell is called, for assistive technology. This package holds no copy. */
2623
+ readonly label: string;
2624
+ };
2625
+
2626
+ /** The Profile Photo step's grid — the design's `SelectableProfilePhotosWrapper`. */
2627
+ export declare function ProfilePhotoPicker({ photos, selectedValue, onSelect, label, inputRef, onFileChosen, refusal, }: ProfilePhotoPickerProps): react_jsx_runtime.JSX.Element;
2628
+
2629
+ export declare type ProfilePhotoPickerProps = {
2630
+ readonly photos: readonly ProfilePhotoOption[];
2631
+ /** The chosen value, or empty for a buyer who has not chosen yet. */
2632
+ readonly selectedValue: string;
2633
+ readonly onSelect: (value: string) => void;
2634
+ /** Names the group for assistive technology. */
2635
+ readonly label: string;
2636
+ /**
2637
+ * THE UPLOAD BUTTON IS ON THE CARD, under Continue, where the design puts it — so the
2638
+ * file input it opens is reached from out there rather than drawn beside the grid.
2639
+ * The input lives here because what it produces is a cell in this grid.
2640
+ */
2641
+ readonly inputRef: RefObject<HTMLInputElement>;
2642
+ readonly onFileChosen: (file: File) => void;
2643
+ /** Why the last file was refused, in words, or absent while none was. */
2644
+ readonly refusal?: string | null;
2645
+ };
2646
+
2647
+ /**
2648
+ * THE TWO SETS THE PLATFORM PUBLISHES, as the folders it publishes them in.
2649
+ *
2650
+ * `256` IS WHAT THE WIDGET DRAWS, and is the default for that reason. The picker's cells
2651
+ * are 64px and the largest hero is 100, so this is 2.5x the biggest thing it is ever put
2652
+ * in — which is the headroom a retina screen wants and no more. The whole set is ~290KB.
2653
+ *
2654
+ * `1024` IS THE ORIGINAL, and nothing here asks for it: every avatar this package draws is
2655
+ * 100px or under, so it would be ten times the bytes for pixels no screen resolves. It is
2656
+ * named rather than left out because it exists, and because the day something draws a face
2657
+ * at full width the choice is this argument rather than a new path.
2658
+ */
2659
+ export declare type ProfilePhotoSize = 256 | 1024;
2660
+
2661
+ /**
2662
+ * The steps of a purchase, in the buyer's order, and what the resting pill's action
2663
+ * says at each.
2664
+ */
2665
+
2666
+ /** In the flow's own order, so the union reads as the sequence it names. */
2667
+ declare type PurchaseStepId = 'PARTY' | 'DATE' | 'TIME' | 'SIGN_IN' | 'NAME' | 'EMAIL' | 'PHONE' | 'DETAILS' | 'REVIEW' | 'PAYMENT' | 'PROMO' | 'ABANDON' | 'PROCESSING' | 'PAYMENT_FAILED' | 'PAYMENT_SUCCESS' | 'FEEDBACK' | 'CREATE_ACCOUNT' | 'CONFIRM_EMAIL' | 'VERIFY_EMAIL' | 'PASSWORD' | 'PROFILE_PHOTO' | 'ACCOUNT_CREATING' | 'ACCOUNT_CREATED' | 'PASSKEY' | 'FOLLOW';
2668
+
2669
+ /** @internal */
2670
+ declare interface QuestionnaireQuestion {
2671
+ Question: string;
2672
+ QuestionId: number;
2673
+ Type: 'text' | 'date' | 'checkbox' | string;
2674
+ }
2675
+
2676
+ /** One quick action: a glyph in a ring, and what it does, in two short words. */
2677
+ export declare type QuickAction = {
2678
+ readonly key: string;
2679
+ readonly glyph: ReactNode;
2680
+ /**
2681
+ * THE WORDS, AS LINES. The design sets "Show / QR" and "Edit / Ticketholder" on two lines
2682
+ * each, and it is not a wrap — it is where the phrase breaks. A single string broken by
2683
+ * the column's width would put "Edit Ticket" over "holder" on a narrow card, so the break
2684
+ * is the caller's and the accessible name is the lines joined.
2685
+ */
2686
+ readonly lines: readonly string[];
2687
+ readonly disabled?: boolean;
2688
+ readonly onPress: () => void;
2689
+ };
2690
+
2691
+ /**
2692
+ * THE ROW OF QUICK ACTIONS under a ticket — the design's `QuickAction`, twice.
2693
+ *
2694
+ * NOT BUTTONS IN THE CARD'S OWN STACK, and the difference is what they mean. The stack at
2695
+ * the foot of a card is what the card is FOR — Save, Continue, Close — and these are the
2696
+ * two things a buyer might do with a ticket they are already looking at. The design draws
2697
+ * them above the stack, apart, under a hairline, and gives them a shape of their own.
2698
+ *
2699
+ * EQUAL COLUMNS whatever the count, so two read as a pair rather than as one control and a
2700
+ * leftover.
2701
+ */
2702
+ export declare function QuickActions({ actions }: QuickActionsProps): react_jsx_runtime.JSX.Element;
2703
+
2704
+ export declare type QuickActionsProps = {
2705
+ readonly actions: readonly QuickAction[];
2706
+ };
2707
+
2708
+ /** What the buyer is being asked to pay, as one value. */
2709
+ declare type Quote =
2710
+ /** Nothing priceable at all — no floor, no total. See `quoteLines`. */
2711
+ {
2712
+ readonly kind: 'NONE';
2713
+ }
2714
+ /**
2715
+ * THE DEFAULT: the cheapest ticket, and the buyer may pay more. Qualified "From" on the
2716
+ * line above.
2717
+ */
2718
+ | {
2719
+ readonly kind: 'FROM';
2720
+ readonly minorUnits: number;
2721
+ readonly currency: string;
2722
+ }
2723
+ /**
2724
+ * A price with a discount already applied. The saving REPLACES the "From" rather than
2725
+ * joining it — one qualifier, or the line says two things at once and the buyer has to
2726
+ * work out which governs.
2727
+ */
2728
+ | {
2729
+ readonly kind: 'SAVING';
2730
+ readonly minorUnits: number;
2731
+ readonly currency: string;
2732
+ readonly savedMinorUnits: number;
2733
+ }
2734
+ /** Settled: what will actually be charged, with nothing to qualify. */
2735
+ | {
2736
+ readonly kind: 'TOTAL';
2737
+ readonly minorUnits: number;
2738
+ readonly currency: string;
2739
+ };
2740
+
2741
+ /**
2742
+ * WHAT THE ORDER'S STATE RAISES, or nothing at all — one place, so the flow does not grow
2743
+ * a second opinion about which card it is on.
2744
+ *
2745
+ * IT TAKES THE OUTCOME RATHER THAN READINGS OF IT. This was a shortfall beside a boolean,
2746
+ * and it had to rank them: a cart that filled short is an order the buyer HAS, while a
2747
+ * failure on the same state can be a later call going wrong against it, and telling
2748
+ * somebody their order failed while they hold four tickets is worse than telling them
2749
+ * about the four. With one state there is nothing to rank — see `OrderFill`.
2750
+ */
2751
+ export declare function raiseFor(fill: OrderFill): Notice | null;
2752
+
2753
+ /**
2754
+ * WHAT WENT WRONG WITH THE BOOKING, or nothing — the same shape as `raiseForFeedback`, and
2755
+ * the same rule: only a state that IS a failure raises one.
2756
+ *
2757
+ * TWO SOURCES, ONE ANSWER. The read and the save cannot both be the matter at once — the
2758
+ * Edit card is only reachable from a booking that loaded — so the read is asked first and
2759
+ * the save is asked of the card the buyer is actually standing on.
2760
+ */
2761
+ export declare function raiseForBooking(booking: BookingState, save: HolderSave): Notice | null;
2762
+
2763
+ /**
2764
+ * THE BOUNDARY — and it takes TWO responses, because neither endpoint is complete.
2765
+ *
2766
+ * ── WHY BOTH, AND WHY THIS COST A BOOKING ITS TICKETS ────────────────────────
2767
+ *
2768
+ * `Transactions/ByKey/{cartKey}` is the only call that carries a holder's NAME. It also
2769
+ * OMITS the nested `Attendee` entirely for a transaction made from the v2 cart endpoint —
2770
+ * which is every transaction this widget makes. `@scopetickets/sdk`'s own
2771
+ * `useTicketConfirmation` has said so since before the island existed: "do not rely on it
2772
+ * as the only source of the attendee ID".
2773
+ *
2774
+ * This file did rely on it. An item was a ticket when it had a key AND an attendee, so
2775
+ * against a real purchase every row was dropped, `readBooking` answered `null`, and a buyer
2776
+ * who had just paid was shown "No Tickets Here Yet".
2777
+ *
2778
+ * `Transactions/{transactionKey}/Items` is the other half: a list of ATTENDEE TICKETS by
2779
+ * definition, each with its `AttendeeTicketKey` and its numeric `ID` — and no names at
2780
+ * all.
2781
+ *
2782
+ * ── SO A ROW IS A TICKET WHEN EITHER HALF SAYS IT IS ─────────────────────────
2783
+ *
2784
+ * It is named by the attendee-ticket list, OR it carries an attendee. Two clauses, each
2785
+ * with its own reason: the first is the platform's own statement that this is a ticket, and
2786
+ * the second is that it belongs to a PERSON. A booking fee has neither, which is the whole
2787
+ * of what has to be excluded — and `Items[].Type` still goes unread, for the reason at the
2788
+ * top of this file.
2789
+ *
2790
+ * ── AND THE TRANSACTION KEY FALLS BACK TO THE CART'S ─────────────────────────
2791
+ *
2792
+ * `TransactionKey || cartKey` is the SDK's own line. On staging the two are the same 64-hex
2793
+ * token for a cart that became a transaction; where they are not, the platform accepts the
2794
+ * cart's on the routes that matter, so a summary that came back without one is not a reason
2795
+ * to refuse a buyer their tickets.
2796
+ *
2797
+ * BOTH ARE BOUNDED BY `WIRE_LIMITS.order` AND NOT BY `.key`, which is the whole of the bug
2798
+ * this function was written with: an attendee ticket's key is 32 characters and a
2799
+ * transaction's is 64, and the 50 that is generous for the first rejects the second
2800
+ * outright. See the limit's own note.
2801
+ */
2802
+ export declare function readBooking(summary: TransactionByKeyResponse, attendeeTickets: readonly AttendeeTicket[],
2803
+ /** What the summary was asked for, as the last resort for the key a save needs. */
2804
+ cartKey: string): BookingRecord | null;
2805
+
2806
+ /** One item as the widget ASKED for it, reduced to the part a line needs. */
2807
+ export declare type RequestedItem = {
2808
+ readonly UserTypeAssignmentKey?: string | null;
2809
+ };
2810
+
2811
+ export declare const RESTING_CART: {
2812
+ readonly checkOut: "Check Out";
2813
+ readonly close: "Close";
2814
+ /** While the checks behind Check Out are running — see `runCheckoutPreflight`. */
2815
+ readonly checking: "Checking…";
2816
+ };
2817
+
2818
+ /**
2819
+ * The resting cart as the props that draw it. The hero is the caller's, as it is for every
2820
+ * other card here.
2821
+ *
2822
+ * THE HOLD IS STILL TAKEN THOUGH IT NO LONGER PICKS THE SUBTITLE, because the hero's ring
2823
+ * is still drawn from it.
2824
+ */
2825
+ export declare function restingCartViewProps(input: ReactNode, hold: EscrowHold | undefined, onCheckOut: () => void, onClose: () => void,
2826
+ /** Whether the checks are running, which shuts the button and says so. */
2827
+ checking: boolean): {
2828
+ variant: "cart";
2829
+ title: "My Cart";
2830
+ subtitle: "Includes all taxes and service fees.";
2831
+ input: ReactNode;
2832
+ actions: ({
2833
+ key: string;
2834
+ role: "primary";
2835
+ label: "Check Out" | "Checking…";
2836
+ disabled: boolean;
2837
+ onPress: () => void;
2838
+ } | {
2839
+ key: string;
2840
+ role: "secondary";
2841
+ label: "Close";
2842
+ onPress: () => void;
2843
+ disabled?: undefined;
2844
+ })[];
2845
+ };
2846
+
2847
+ /**
2848
+ * WHICH WAY ROUND AN ARC GROWS FROM 12 O'CLOCK.
2849
+ *
2850
+ * `cw` is a clock's own sense and the default everywhere — the countdown's hand, the
2851
+ * character counter, the design's `StepCompletionProgressRing`. `ccw` is its mirror, and
2852
+ * it earns a place because a ring that DEPLETES reads differently unwinding than it does
2853
+ * filling backwards: the timeslot's remaining ring runs down, not up.
2854
+ */
2855
+ export declare type RingDirection = 'cw' | 'ccw';
2856
+
2857
+ /**
2858
+ * THE PICTURE EVERY LINE OF THE CART WEARS — `Backgrounds[0]`.
2859
+ *
2860
+ * THE RUN'S FIRST, THEN A NIGHT'S OWN: a series is one artwork over many nights, and the
2861
+ * same order `EventProvider` reads them in. A series that names none does NOT borrow a
2862
+ * night's — that would put a different picture on the cart depending on which day happened
2863
+ * to come first in the response.
2864
+ *
2865
+ * `undefined` where there is none, which the avatar answers with its own fill; an empty
2866
+ * string would be a src the browser resolves against the host's page.
2867
+ */
2868
+ export declare function runArtwork(series: {
2869
+ readonly Theme?: ArtworkTheme;
2870
+ } | null | undefined, events: readonly {
2871
+ readonly Theme?: ArtworkTheme;
2872
+ }[],
2873
+ /** The CDN every Scope-hosted url is put on. Stated by the caller, never inferred here. */
2874
+ origin?: string): string | undefined;
2875
+
2876
+ /**
2877
+ * THE WIDGET A HOST MOUNTS, and the two decisions it makes before anything else: is there
2878
+ * an order, and has the buyer said they are checking out.
2879
+ *
2880
+ * FOUR FACES, ONE MOUNT. `RestingIsland` is the widget at rest — the account card, or the
2881
+ * cart once there is something in it. `PurchaseIsland` is the walk, which is everything this
2882
+ * file was. `BookingIsland` is what the walk ends at: the tickets it bought. A host that
2883
+ * hands in an order and says nothing gets the walk, exactly as before; a host that says
2884
+ * `opensOn="cart"` gets the cart until the buyer presses Check Out.
2885
+ *
2886
+ * TWO COMPONENTS AND NOT ONE WITH GUARDS. Every reading the flow makes — the excusal, the
2887
+ * refusal, the cart it opens, the fold `onCommit` hands back — is about an order it is
2888
+ * holding. Threading an absent one through all of them would put a `?.` on each and leave
2889
+ * the subject's requiredness true in the type and untrue in the code. Answering the
2890
+ * question once, here, keeps `PurchaseIsland` exactly as strict as it was.
2891
+ */
2892
+ export declare function ScopeTicketsCheckout({ intent, opensOn, session: seed, ...props }: CheckoutProps): react_jsx_runtime.JSX.Element;
2893
+
2894
+ /** THE SIGN-IN FUNNEL'S CREDENTIAL CARD — the design. */
2895
+ export declare const SIGN_IN_FUNNEL_CARD: {
2896
+ readonly copy: {
2897
+ readonly title: react_jsx_runtime.JSX.Element;
2898
+ readonly subtitle: "Sign in below.";
2899
+ };
2900
+ /** the design primary, the design secondary. */
2901
+ readonly actions: readonly CardAction[];
2902
+ readonly accessory: undefined;
2903
+ };
2904
+
2905
+ /**
2906
+ * THE FOUR SESSIONS, READY MADE — and there is no machinery behind these on purpose.
2907
+ *
2908
+ * Auth needs nothing invented: `session` is already a plain data prop the host hands in,
2909
+ * so every state the flow reasons about is expressible today. Pass one and the widget
2910
+ * behaves as it will when accounts are real.
2911
+ */
2912
+ export declare const SIMULATED_SESSIONS: {
2913
+ /** Nobody. The first visit, and the card that offers guest checkout. */
2914
+ readonly unrecognised: {
2915
+ readonly auth: {
2916
+ readonly status: "UNRECOGNISED";
2917
+ };
2918
+ readonly guest: "NOT_TAKEN";
2919
+ };
2920
+ /** Chose to check out without an account — sign-in is bypassed from here on. */
2921
+ readonly guest: {
2922
+ readonly auth: {
2923
+ readonly status: "UNRECOGNISED";
2924
+ };
2925
+ readonly guest: "TAKEN";
2926
+ };
2927
+ /** A profile we hold, no live session: the keyhole card, and a face on the island. */
2928
+ readonly recognised: {
2929
+ readonly auth: {
2930
+ readonly status: "RECOGNISED";
2931
+ readonly avatar: "initials:AL";
2932
+ };
2933
+ readonly guest: "NOT_TAKEN";
2934
+ };
2935
+ /** Signed in. Name, email and phone are answered by the account, not by the buyer. */
2936
+ readonly authenticated: {
2937
+ readonly auth: {
2938
+ readonly status: "AUTHENTICATED";
2939
+ readonly account: {
2940
+ readonly avatar: "initials:AL";
2941
+ readonly name: "Ada Lovelace";
2942
+ readonly email: "ada@example.test";
2943
+ readonly phone: "+353871234567";
2944
+ readonly userTypeKey: null;
2945
+ };
2946
+ };
2947
+ readonly guest: "NOT_TAKEN";
2948
+ };
2949
+ };
2950
+
2951
+ export declare function simulatedSchedule(today?: string, nights?: number): CheckoutSchedule;
2952
+
2953
+ /** The key the single line counts under when the event names no types. */
2954
+ export declare const SOLO_KEY = "default";
2955
+
2956
+ /**
2957
+ * THE RATING CARD'S FIVE STARS — the design's `StarRating`, in its well.
2958
+ *
2959
+ * ON ARRIVAL EVERY STAR IS FILLED, under the dim `island.css` holds the row at. It shows
2960
+ * what the control is FOR: five stars, waiting. It is emphatically NOT a rating of five,
2961
+ * and nothing downstream reads it as one — `value` is still `null`, the radios are all
2962
+ * unchecked, and Continue is shut until the buyer presses something.
2963
+ */
2964
+ export declare function StarRating({ value, onChange, label }: StarRatingProps): react_jsx_runtime.JSX.Element;
2965
+
2966
+ export declare type StarRatingProps = {
2967
+ /** The rating so far, or `null` while the buyer has chosen none. */
2968
+ readonly value: FeedbackRating | null;
2969
+ /**
2970
+ * THE NEW RATING, OR `null` FOR ONE TAKEN BACK — see the star's own note. The card is
2971
+ * gated on `value`, so handing `null` back shuts Continue again, which is the whole
2972
+ * point: a buyer who has unrated has not rated.
2973
+ */
2974
+ readonly onChange: (rating: FeedbackRating | null) => void;
2975
+ /** Names the group — see `ratingLabel` for what the options are called. */
2976
+ readonly label: string;
2977
+ };
2978
+
2979
+ /** The same badges, each NAMED by the step that owns it. */
2980
+ export declare const STEP_ACCESSORY: Partial<Record<PurchaseStepId, StepBadge & {
2981
+ readonly id: string;
2982
+ }>>;
2983
+
2984
+ /** The card's own buttons per step, with the roles the source gives them. */
2985
+ export declare const STEP_CARD_ACTIONS: Record<PurchaseStepId, readonly CardAction[]>;
2986
+
2987
+ /** The hero copy per step, quoted. */
2988
+ export declare const STEP_CARD_COPY: Record<PurchaseStepId, {
2989
+ title: string;
2990
+ subtitle: string;
2991
+ }>;
2992
+
2993
+ /**
2994
+ * Steps whose header button CLOSES rather than steps back, against the gallery's own
2995
+ * rule that only the first step has nothing behind it.
2996
+ */
2997
+ export declare const STEP_DISMISS: Partial<Record<PurchaseStepId, 'back' | 'close'>>;
2998
+
2999
+ declare type StepBadge = {
3000
+ readonly shape: 'square' | 'circle';
3001
+ readonly content: ReactNode;
3002
+ };
3003
+
3004
+ /**
3005
+ * STui's `Switch` (`11376:2089`) — an on/off control, for a host composing its own rows.
3006
+ *
3007
+ * CONTROLLED, AND ONLY CONTROLLED. A switch that kept its own state would flip under a
3008
+ * finger and then disagree with the host the moment the host refused the change — an
3009
+ * opt-in the session could not save, say. So it draws `checked` and asks for the other,
3010
+ * and nothing moves until the host says so.
3011
+ *
3012
+ * A `button` WITH `role="switch"` rather than a hidden checkbox, which is how every other
3013
+ * pressable thing in this package is built — the stars are buttons with `role="radio"`.
3014
+ * It takes the ELEMENT press: turning something on does not change what the island is.
3015
+ */
3016
+ export declare function Switch({ checked, onChange, label, size, disabled }: SwitchProps): react_jsx_runtime.JSX.Element;
3017
+
3018
+ export declare type SwitchProps = {
3019
+ /** Whether it is on. The switch keeps no state of its own — see below. */
3020
+ readonly checked: boolean;
3021
+ /** Called with the state asked for, which is always the opposite of `checked`. */
3022
+ readonly onChange: (checked: boolean) => void;
3023
+ /**
3024
+ * The accessible name. The design draws the switch bare — its label is whatever row it
3025
+ * sits in — so without this a screen reader announces an unnamed switch. Pass the row's
3026
+ * own text.
3027
+ */
3028
+ readonly label: string;
3029
+ /** Default `wide`. */
3030
+ readonly size?: SwitchSize;
3031
+ readonly disabled?: boolean;
3032
+ };
3033
+
3034
+ /** STui `Switch`'s two sizes: `wide` is `$12` across with a long thumb, `thin` `$8` with a short upright one. */
3035
+ export declare type SwitchSize = 'wide' | 'thin';
3036
+
3037
+ /** Figma's `InputTextShort`, ported from. */
3038
+ export declare function TextField({ label, value, onChange, flag, flagTitle, trailing, icon, note, type, inputMode, prose, autoComplete, autoCapitalize, passwordRules, enterKeyHint, onSubmit, monospace, placeholder, maxLength, autoFocus, id, name, }: TextFieldProps): react_jsx_runtime.JSX.Element;
3039
+
3040
+ export declare type TextFieldProps = {
3041
+ /** The field's name, and its only label — there is no placeholder. */
3042
+ readonly label: string;
3043
+ readonly value: string;
3044
+ readonly onChange?: (value: string) => void;
3045
+ /**
3046
+ * The mark at the trailing end, or absent while the field has nothing to say. `none` in
3047
+ * the domain's `ContentFlag` is this being omitted.
3048
+ */
3049
+ readonly flag?: ContentFlagTone;
3050
+ /**
3051
+ * WHAT THE MARK MEANS, for anyone who cannot see it. `ContentFlag` hides an untitled
3052
+ * mark from the accessibility tree, which is right where the field's own text already
3053
+ * says what is wrong and wrong where the mark is the ONLY thing saying it — the email
3054
+ * field's `warning`, where nothing else on the card mentions the suspected typo.
3055
+ */
3056
+ readonly flagTitle?: string;
3057
+ /**
3058
+ * Replaces the flag entirely — the password field's counter ring, which is not one of
3059
+ * the three marks., and its reasoning: the ring is a fourth thing a field can show and
3060
+ * folding it into the flag set would make the set mean two different kinds of thing.
3061
+ */
3062
+ readonly trailing?: ReactNode;
3063
+ /** A mark at the LEADING end — `InputIconWrapper`. */
3064
+ readonly icon?: ReactNode;
3065
+ /**
3066
+ * A quiet note between the value and the flag, right-aligned — `inputNoteText`, which
3067
+ * the design fills with "2º". Here it is the phone step's dial code.
3068
+ */
3069
+ readonly note?: ReactNode;
3070
+ /**
3071
+ * `text` unless said otherwise. `password` masks and, with
3072
+ * `autoComplete="new-password"`, is what asks the browser's password manager to suggest
3073
+ * one.
3074
+ */
3075
+ readonly type?: 'text' | 'password' | 'email' | 'tel';
3076
+ /** Drives the on-screen keyboard on a touch device. */
3077
+ readonly inputMode?: 'text' | 'email' | 'tel' | 'numeric';
3078
+ /**
3079
+ * The autofill contract. Passed straight through; see `PASSWORD_RULES` for the one case
3080
+ * where a second attribute goes with it.
3081
+ */
3082
+ readonly autoComplete?: string;
3083
+ readonly autoCapitalize?: 'none' | 'words' | 'sentences';
3084
+ /**
3085
+ * TURN THE PHONE'S HELP OFF, for a value it cannot help with: iOS autocorrects and
3086
+ * spell-checks a text input by default, and on an address, a surname or a revealed
3087
+ * password that is a phone rewriting an answer only the buyer knows.
3088
+ *
3089
+ * ONE PROP FOR BOTH ATTRIBUTES — a field either holds prose or it does not.
3090
+ */
3091
+ readonly prose?: boolean;
3092
+ /**
3093
+ * Safari's Password Rules string, which is what makes "Suggest Strong Password"
3094
+ * generate to OUR minimum rather than its own default. Other browsers ignore it.
3095
+ */
3096
+ readonly passwordRules?: string;
3097
+ /**
3098
+ * What the return key says, and what it does. Pair them: a key labelled "next" that
3099
+ * submits is worse than an unlabelled one.
3100
+ */
3101
+ readonly enterKeyHint?: 'next' | 'done' | 'go';
3102
+ readonly onSubmit?: () => void;
3103
+ /**
3104
+ * The value in `text/mono/md` — Add Password's own instance does this, so a masked
3105
+ * password's dots sit on an even rhythm.
3106
+ */
3107
+ readonly monospace?: boolean;
3108
+ /**
3109
+ * TAKE FOCUS ON MOUNT — the first field of a step, so a buyer can start typing the
3110
+ * answer to the question the card just asked.
3111
+ *
3112
+ * NOT the `autofocus` ATTRIBUTE, which fires at parse time and belongs to the document:
3113
+ * this widget is a guest on somebody's page and its steps mount long after that page
3114
+ * loaded. Focused with `preventScroll`, for the same reason — a card that yanked the
3115
+ * host's scroll position to itself would be a widget rearranging a site it does not own.
3116
+ */
3117
+ readonly autoFocus?: boolean;
3118
+ /** A value to be confirmed rather than typed — see `ConfirmEmailStep`. */
3119
+ readonly placeholder?: string;
3120
+ /**
3121
+ * THE CEILING THE PLATFORM ITSELF ENFORCES, passed to the input rather than checked
3122
+ * after: a buyer who types past the line is stopped by the field they are standing in,
3123
+ * not told by a notice two presses later. Omitted where the wire sets no limit.
3124
+ */
3125
+ readonly maxLength?: number;
3126
+ /** Given so a preceding field's return key can move focus here. */
3127
+ readonly id?: string;
3128
+ readonly name?: string;
3129
+ };
3130
+
3131
+ declare interface Ticket {
3132
+ /** @deprecated Legacy numeric ID — populated from v1 for cart compat, remove when v2 cart ships */
3133
+ ID?: number;
3134
+ Key: string;
3135
+ Name: string;
3136
+ Note: string | null;
3137
+ BasePrice: number;
3138
+ SalePrice: number;
3139
+ Fees: number;
3140
+ Total: number;
3141
+ /**
3142
+ * The product's own currency, where it states one — the most specific of the three
3143
+ * places this is set, above its event's and the run's. Optional because it is not on
3144
+ * every response, and a caller that finds it absent falls up rather than guessing.
3145
+ */
3146
+ Currency?: string | null;
3147
+ Remaining: number;
3148
+ Available: boolean;
3149
+ Status: string | null;
3150
+ Starts: string | null;
3151
+ Ends: string | null;
3152
+ LocalStartTime: string | null;
3153
+ LocalEndTime: string | null;
3154
+ MinPerTransaction: number;
3155
+ MaxPerTransaction: number;
3156
+ PaymentsEnabled: boolean;
3157
+ AttendeeDetailsRequired: boolean;
3158
+ HasTimeslot: boolean;
3159
+ Questions: QuestionnaireQuestion[] | null;
3160
+ Timeslots: EventTimeslot[] | null;
3161
+ UrgencyTags: string[];
3162
+ /** Nullable for the same reason as the run's — see `EventInfoResponse`. */
3163
+ UserTypes: UserType[] | null;
3164
+ }
3165
+
3166
+ /**
3167
+ * What `island.css` carries today, for a renderer with no layout — a test, SSR.
3168
+ *
3169
+ * ── 8 / 24 / 12: THE SCALE THE DESIGN WAS DRAWN AT ───────────────────────────
3170
+ *
3171
+ * `@scopetickets/sdk`'s ticket ships at 12/64/16, tuned on its own `/qr-lab` bench where a
3172
+ * ticket stands alone on a page and can afford a long, deep notch. This one is a card in a
3173
+ * 270px column, and at that measure the same numbers read as a coarse zigzag rather than a
3174
+ * perforation — and the granularity swallows the carousel: a 64px pitch leaves the frame up
3175
+ * to 64px short of the room on offer, where 24 leaves at most 24.
3176
+ *
3177
+ * So the island keeps the drawn values. The two tickets are deliberately free to differ:
3178
+ * the scale is a host-tunable token in both packages and the rule that reads it is the same
3179
+ * rule, which is the part that had to be shared.
3180
+ */
3181
+ export declare const TICKET_EDGE_FALLBACK: TicketEdgeTokens;
3182
+
3183
+ /** The ticket a key names, or `null`. */
3184
+ export declare function ticketAt(booking: Booking, key: string): BookingTicket | null;
3185
+
3186
+ /**
3187
+ * WHAT THE CALLER KNOWS THAT THE WIRE DOES NOT — the product and the user type.
3188
+ *
3189
+ * ── TWO LEVELS, BECAUSE THE TWO FACTS ARE KNOWN AT DIFFERENT GRAINS ──────────
3190
+ *
3191
+ * `product` is the whole booking's: this widget fills one cart from one event, so "Peak" is
3192
+ * true of every ticket in it, and the flow holds that name from the moment the cart was
3193
+ * opened (`CheckoutOrder.productName`).
3194
+ *
3195
+ * `tickets` is per ATTENDEE TICKET KEY, and almost nothing can fill it. The user type is a
3196
+ * fact about a cart ITEM, the key is a fact about an attendee ticket, and the platform
3197
+ * exposes no join between them — so the flow supplies none and a host that has its own
3198
+ * records supplies what it has. Keyed rather than positional because the two lists have no
3199
+ * order in common.
3200
+ *
3201
+ * A KEY THAT IS NOT IN HERE resolves to the booking-wide product and no user type, which is
3202
+ * a ticket drawn with a shorter qualifier rather than one that is dropped.
3203
+ */
3204
+ export declare type TicketAttribution = {
3205
+ /** "Peak" — true of every ticket, where the caller knows it. */
3206
+ readonly product?: string | null;
3207
+ /** Per attendee ticket key, where the caller can tell them apart. */
3208
+ readonly tickets?: Readonly<Record<string, {
3209
+ readonly product?: string | null;
3210
+ readonly userType?: string | null;
3211
+ }>>;
3212
+ };
3213
+
3214
+ /**
3215
+ * ONE TICKET'S CODE, as one value.
3216
+ *
3217
+ * A union rather than a picture beside an error, so "still fetching" cannot be mistaken for
3218
+ * "came back empty" — which is the difference between a ticket that is about to appear and
3219
+ * a buyer standing at a gate with nothing to show.
3220
+ */
3221
+ declare type TicketCode$1 = {
3222
+ readonly status: 'LOADING';
3223
+ }
3224
+ /** Ready to draw: a `data:` URL an `<img>` can take. See `ticketCodeDataUrl`. */
3225
+ | {
3226
+ readonly status: 'DRAWN';
3227
+ readonly src: string;
3228
+ } | {
3229
+ readonly status: 'ERROR';
3230
+ };
3231
+
3232
+ /**
3233
+ * ONE TICKET — the code inside its perforated edge, with who it is for printed above.
3234
+ *
3235
+ * ── THE MEASURE IS CHOSEN, NOT TAKEN ─────────────────────────────────────────
3236
+ *
3237
+ * The edge tiles one cutout, so neither rail can be a fraction of one. This component
3238
+ * measures two things and `fitTicketEdge` decides the rest: the room the parent offers
3239
+ * ACROSS, which fixes how many cutouts the top and bottom rails carry, and the HEADER's
3240
+ * height, which is what the side rails have to contain once the square code is added under
3241
+ * it. See `island-ticket-edge.ts`, which is the whole rule as pure data.
3242
+ *
3243
+ * MEASURED HERE AND SPENT IN CSS. What crosses is two COUNTS; the stylesheet multiplies
3244
+ * them by its own tokens, so a host that re-tunes the scale moves the drawing and the
3245
+ * arithmetic together.
3246
+ *
3247
+ * THE HEADER IS MEASURED AND THE CODE IS NOT. The code's size follows from the width, which
3248
+ * is settled before its height is asked for — measuring the whole stack instead would be
3249
+ * measuring the answer.
3250
+ */
3251
+ export declare function TicketCode({ qualifier, name, avatar, day, time, code, codeLabel, codeMissing, }: TicketCodeProps): react_jsx_runtime.JSX.Element;
3252
+
3253
+ /** One ticket in the run: everything its own card draws, plus what names it. */
3254
+ export declare type TicketCodeEntry = TicketCodeProps & {
3255
+ readonly key: string;
3256
+ };
3257
+
3258
+ /**
3259
+ * WHICH TICKET IS SHOWING, AND THE TWO WAYS TO CHANGE IT — the design's pill under the run.
3260
+ *
3261
+ * ── NOT ONE OF THE CARD'S OWN BUTTONS, AND IT CANNOT BE ─────────────────────
3262
+ *
3263
+ * `IslandAction` is one label and one press. This is one label between TWO presses, so it
3264
+ * lives in the card's content where a control with its own shape belongs, and the codes
3265
+ * card draws no button stack at all. The way out of it is the header's Back arrow, which is
3266
+ * what the design gives it.
3267
+ *
3268
+ * ── THE ENDS ARE SHUT, NOT WRAPPED ──────────────────────────────────────────
3269
+ *
3270
+ * A run of three that goes 3 -> 1 reads as a bug the first time and as a lost ticket the
3271
+ * second. The arrow at an end is drawn and declines, exactly as every other stopped control
3272
+ * here does — see `IslandAction.disabled`.
3273
+ *
3274
+ * ── AND A BOOKING OF ONE STILL GETS IT ──────────────────────────────────────
3275
+ *
3276
+ * It used to be withheld below two, on the argument that "1 of 1" between two dead arrows
3277
+ * is three controls describing a run with no alternatives. What that actually produced was
3278
+ * a card that changes SHAPE with the size of the booking: one ticket and the run sits on
3279
+ * the card's floor, two and a pill appears under it. The count is the thing that varies,
3280
+ * not the card, and both arrows decline here exactly as the end of any longer run does.
3281
+ */
3282
+ export declare function TicketCodePager({ at, count, onAtChange, position, positionOf, previousLabel, nextLabel, }: TicketCodePagerProps): react_jsx_runtime.JSX.Element;
3283
+
3284
+ export declare type TicketCodePagerProps = {
3285
+ readonly at: number;
3286
+ readonly count: number;
3287
+ readonly onAtChange: (at: number) => void;
3288
+ /** "1" — the ticket being read, full strength. */
3289
+ readonly position: string;
3290
+ /** " of 3" — the run it is out of, a step quieter. See `BOOKING_COPY.positionOf`. */
3291
+ readonly positionOf: string;
3292
+ /** What the two arrows are called, for anyone who cannot see them. */
3293
+ readonly previousLabel: string;
3294
+ readonly nextLabel: string;
3295
+ };
3296
+
3297
+ export declare type TicketCodeProps = {
3298
+ /** "Peak • Adult", or absent where the caller knows neither half. */
3299
+ readonly qualifier: string | null;
3300
+ /** "Alex Whelan", or absent where the platform holds no name. */
3301
+ readonly name: string | null;
3302
+ /**
3303
+ * The holder's face — an `Avatar`, composed by the caller as every hero here is. `null`
3304
+ * is a real answer and is not a slot: see `TicketRow.artwork`, which draws the same line.
3305
+ */
3306
+ readonly avatar?: ReactNode;
3307
+ /** The booking's day, already in words: "12 December 2026". */
3308
+ readonly day: string;
3309
+ /** When it starts, or absent where the event sells no sessions. */
3310
+ readonly time: string | null;
3311
+ readonly code: TicketCode$1;
3312
+ /** What the code IS, for anyone who cannot see it. */
3313
+ readonly codeLabel: string;
3314
+ /** What stands in its place when it did not come back. */
3315
+ readonly codeMissing: string;
3316
+ };
3317
+
3318
+ /**
3319
+ * THE CODES, ONE AT A TIME, WITH THE NEXT ONE SHOWING.
3320
+ *
3321
+ * ── IT IS THE WEEK STRIP, WITH TICKETS IN IT ─────────────────────────────────
3322
+ *
3323
+ * The mechanism is `CalendarWeekSection`'s and deliberately so: a scroll-snapping pager that
3324
+ * BLEEDS past the content column on both sides, so the ends of the previous and next tickets
3325
+ * show. Stopping at the column cuts the run off mid-air with nothing to say there is
3326
+ * anywhere to scroll to — which on a booking of one ticket and a booking of four look
3327
+ * identical.
3328
+ *
3329
+ * THE BLEED IS THE CARD'S OWN INLINE PADDING, referenced rather than restated. One bleed is
3330
+ * `$7`, which is enough of a neighbouring ticket to read as a ticket rather than a stripe.
3331
+ *
3332
+ * ── WHY THE INDEX IS REPORTED AND NOT OWNED ──────────────────────────────────
3333
+ *
3334
+ * The pager button under the run says "1 of 3" and its arrows move the run, so the number
3335
+ * and the scroll position are two readings of one fact. Owned here, the button would need
3336
+ * to reach in for it; owned by the caller, both come from the same value. What this keeps
3337
+ * is the SCROLL, which is the browser's.
3338
+ */
3339
+ export declare function TicketCodes({ tickets, at, onAtChange, label }: TicketCodesProps): react_jsx_runtime.JSX.Element | null;
3340
+
3341
+ export declare type TicketCodesProps = {
3342
+ readonly tickets: readonly TicketCodeEntry[];
3343
+ /** Which ticket is on screen, counted from zero. */
3344
+ readonly at: number;
3345
+ /** Reported as the run moves — from the live offset, not once it has settled. */
3346
+ readonly onAtChange: (at: number) => void;
3347
+ /** Names the run for assistive technology. */
3348
+ readonly label: string;
3349
+ };
3350
+
3351
+ /**
3352
+ * Too narrow to draw: below {@link minimumColumns} cutouts the padding has eaten the centre
3353
+ * and what is left is a frame around nothing — which is worse than no ticket, because it
3354
+ * looks like a code that failed to load.
3355
+ */
3356
+ export declare type TicketEdgeFit = ({
3357
+ readonly ok: true;
3358
+ } & TicketEdgeFrame) | {
3359
+ readonly ok: false;
3360
+ readonly reason: 'TOO_NARROW';
3361
+ };
3362
+
3363
+ /** The ticket's measurements, all of them, in px. */
3364
+ export declare type TicketEdgeFrame = {
3365
+ /** Whole cutouts across the top and bottom rails. */
3366
+ readonly columns: number;
3367
+ /** Whole cutouts down each side rail. */
3368
+ readonly rows: number;
3369
+ /** The frame's outside width, rails included. */
3370
+ readonly frame: number;
3371
+ /** The centre's width, inside the rails. */
3372
+ readonly width: number;
3373
+ /** The centre's height, inside the rails — `rows` cutouts, so the side rails tile. */
3374
+ readonly height: number;
3375
+ /** The code's measure, inside the centre's padding. Square. */
3376
+ readonly code: number;
3377
+ };
3378
+
3379
+ /**
3380
+ * THE TICKET'S PERFORATED EDGE, AS PURE DATA.
3381
+ *
3382
+ * The edge is one cutout tiled along a rail, so a rail can only ever be a whole number of
3383
+ * cutouts long. A ticket that simply took the room it was offered would end its rails
3384
+ * mid-notch at every size but the handful that happen to divide — and the scale is a
3385
+ * host-tunable token, so "the handful that divide" is not something this file gets to know
3386
+ * in advance.
3387
+ *
3388
+ * So the measure is not taken, it is CHOSEN, on BOTH axes:
3389
+ *
3390
+ * - ACROSS, the rule is the offered width's. The two corners come out of the budget
3391
+ * first and the run is the most whole cutouts that fit what is left.
3392
+ * - DOWN, the rule is the CONTENT's. The centre holds a name, a date and a square code,
3393
+ * and that stack is as tall as it is — so the run is the FEWEST whole cutouts that
3394
+ * contain it, and the slack lands as paper at the bottom of the ticket.
3395
+ *
3396
+ * ── WHY THE TWO AXES DIFFER, AND WHY THAT IS NOT A SECOND RULE ───────────────
3397
+ *
3398
+ * `@scopetickets/sdk`'s `fitTicketEdge` chooses one count and spends it on all four rails,
3399
+ * and it is right to: the ticket there is a code and nothing else, so its centre is square
3400
+ * and a run turned through a right angle fits the side exactly. This ticket has a
3401
+ * ticketholder and a booking above the code, so its centre is taller than it is wide and
3402
+ * there is no single count. The rule is the same one — whole cutouts, never a fraction —
3403
+ * asked of two measures instead of one.
3404
+ *
3405
+ * The two are deliberately separate files rather than one shared with the SDK: this package
3406
+ * is mounted by hosts that never touch the SDK, and a widget that pulled a component
3407
+ * library in to draw a border would be exactly the dependency `ScopeTicketsCheckout` exists
3408
+ * to avoid.
3409
+ */
3410
+ /**
3411
+ * The four measurements a ticket is built from, in px, read off the spacing scale at
3412
+ * RUNTIME rather than compiled in — a host that re-tunes the scale moves the CSS without
3413
+ * this hearing about it, so the numbers are taken from the rendered element.
3414
+ */
3415
+ export declare type TicketEdgeTokens = {
3416
+ /**
3417
+ * `$2` — the rail's thickness, which is ALSO the corner's side and the cutout's short
3418
+ * side. One value in three places, not three that happen to agree: a rail thicker than
3419
+ * the cutout leaves a band of uncut material behind every notch.
3420
+ */
3421
+ readonly edge: number;
3422
+ /** `$6` — the cutout's long side, and therefore the pitch a rail repeats at. */
3423
+ readonly segment: number;
3424
+ /** `$3` — the centre's inset, equal on four sides. */
3425
+ readonly pad: number;
3426
+ /** `$2` — the seam between the centre's rows, and between the last of them and the code. */
3427
+ readonly gap: number;
3428
+ };
3429
+
3430
+ /**
3431
+ * MY BOOKING — what a buyer owns once the money has moved, as the cards draw it.
3432
+ *
3433
+ * ── THE TWO HALVES, AND WHY THEY COME FROM DIFFERENT PLACES ──────────────────
3434
+ *
3435
+ * A booking is an OCCASION and a set of TICKETS, and the platform answers for only one of
3436
+ * them. `GET /api/Transactions/ByKey/{cartKey}` returns the attendee tickets — a key each,
3437
+ * and the person each is for — and says nothing about what was bought into: no event name,
3438
+ * no artwork, no day, no session. It carries a numeric `EventID`, which no endpoint here
3439
+ * takes.
3440
+ *
3441
+ * So the occasion is the CALLER'S, exactly as `cartLines` is: the flow has just walked a
3442
+ * buyer through choosing it and holds every field, and a host mounting this on its own page
3443
+ * holds them too or it would not have had anything to sell. Inventing a lookup that cannot
3444
+ * be made is the alternative, and it ends in a card that says "Ice Skating" for one mount
3445
+ * and nothing for the other.
3446
+ *
3447
+ * ── WHICH IS WHY THERE ARE TWO TYPES AND NOT ONE ─────────────────────────────
3448
+ *
3449
+ * `BookingRecord` is what the platform holds. `Booking` is that record with the caller's
3450
+ * facts folded in, and `dressBooking` is the fold. Keeping them apart is not tidiness: the
3451
+ * occasion and the attribution are written inline by most callers and are therefore new
3452
+ * objects on every render, so a read that took them would refetch the whole booking every
3453
+ * time anything above it moved. Folded at render, the request depends on the cart key and
3454
+ * nothing else.
3455
+ *
3456
+ * ── WHAT A TICKET IS, AND WHAT IT IS NOT ─────────────────────────────────────
3457
+ *
3458
+ * `Items[].Key` IS the `AttendeeTicketKey` — what a QR code is drawn FROM, and the only
3459
+ * identity a ticket has on screen. `Attendee.ID` is separate and is what `PUT /Attendees`
3460
+ * names when a holder is edited; the two are not interchangeable and both are kept.
3461
+ *
3462
+ * `Items[].Type` IS DELIBERATELY NOT READ. A booking must list tickets and not booking fees,
3463
+ * and the tempting way to say so is to narrow that free text to a closed union. The honest
3464
+ * rule is the one the cards actually need: an item is a ticket when it has a key a code can
3465
+ * be drawn from AND an attendee it belongs to. A fee has neither. Narrowing `Type` would
3466
+ * mean a closed union over spellings nobody here has seen, and the first unrecognised one
3467
+ * would empty a buyer's booking rather than draw an extra row.
3468
+ */
3469
+
3470
+ /** Who a ticket is for. */
3471
+ export declare type Ticketholder = {
3472
+ readonly firstName: string;
3473
+ readonly lastName: string;
3474
+ readonly email: string;
3475
+ /** The platform takes one and the design never asks for it — carried so a save keeps it. */
3476
+ readonly phone: string | null;
3477
+ /**
3478
+ * A FACE THE PLATFORM ACTUALLY HOLDS, or none — and "none" is the ordinary answer.
3479
+ *
3480
+ * IT IS NOT DERIVED. Initials are a thing this package can always manufacture, which is
3481
+ * exactly why they are the wrong answer here: a ticket drawn with a generated mark claims
3482
+ * to show somebody, and what it shows is two letters off a name already printed beside it.
3483
+ * A ticket with no face draws no face.
3484
+ */
3485
+ readonly photo: string | null;
3486
+ };
3487
+
3488
+ /**
3489
+ * "Peak • Adult" — what the ticket IS, on one line, or `null` where the caller supplied
3490
+ * neither half. Either half alone stands on its own; the bullet is a separator and never a
3491
+ * decoration, so it is not drawn against an empty side.
3492
+ */
3493
+ export declare function ticketQualifier(ticket: BookingTicket): string | null;
3494
+
3495
+ /** One row of the booking: who a ticket is for, what it is, and the way into it. */
3496
+ export declare type TicketRow = {
3497
+ readonly key: string;
3498
+ /**
3499
+ * WHO HOLDS IT, or the card's own words for nobody — see `BOOKING_COPY.awaiting`. Always
3500
+ * a string, because the row always draws this line: a ticket with no holder is the
3501
+ * commonest case there is and an empty line would read as a row that failed to load.
3502
+ */
3503
+ readonly holder: string;
3504
+ /** Whether that line is the PLACEHOLDER, which the design sets a step quieter. */
3505
+ readonly awaiting: boolean;
3506
+ /** "Adult" — what the ticket is. */
3507
+ readonly qualifier: string | null;
3508
+ /**
3509
+ * The design's `Add` pill — drawn in place of the arrow on a ticket awaiting details, and
3510
+ * always where they can actually be added, the save being key-addressed (see
3511
+ * `BookingGateway.saveHolder`). Its presence is also what says the row opens the FORM
3512
+ * rather than the ticket.
3513
+ */
3514
+ readonly add?: string;
3515
+ };
3516
+
3517
+ /**
3518
+ * THE TICKETS IN A BOOKING — the design's `TicketsInBooking`.
3519
+ *
3520
+ * HAIRLINES AND NOT A WELL. The rows are ruled above the first and below each of them, with
3521
+ * no fill and no border around the run: the list is part of the card rather than a panel
3522
+ * set into it, which is what the surrounding `$3` of inset says too.
3523
+ *
3524
+ * NO FACE ON A ROW. The design draws none — a booking is a list of tickets on one event, and
3525
+ * a column of identical marks beside identical names says nothing that the words do not.
3526
+ *
3527
+ * EVERY ROW IS A DOOR, and there is no other way to a ticket, so the row is the button and
3528
+ * the `Add` pill inside it is an affordance rather than a second target.
3529
+ */
3530
+ export declare function TicketsInBooking({ tickets, onOpen }: TicketsInBookingProps): react_jsx_runtime.JSX.Element;
3531
+
3532
+ export declare type TicketsInBookingProps = {
3533
+ readonly tickets: readonly TicketRow[];
3534
+ readonly onOpen: (key: string) => void;
3535
+ };
3536
+
3537
+ /**
3538
+ * "Alex’s Ticket" — the ticket card's own title, or `null` where nobody is named.
3539
+ *
3540
+ * ALWAYS `’s`, INCLUDING AFTER AN `s`. Both "James’s" and "James’" are correct English and
3541
+ * house styles differ; what is not defensible is a rule that inspects the last letter of a
3542
+ * stranger's name and guesses. One form, applied to everyone, and the apostrophe is the
3543
+ * typographic one because this is prose rather than code.
3544
+ */
3545
+ export declare function ticketTitle(holder: Ticketholder): string | null;
3546
+
3547
+ /**
3548
+ * THE CLOCK STOPPED — the design `3803:7329`, and the card the whole island gives itself
3549
+ * over to once a hold has run out.
3550
+ *
3551
+ * ── TWO ANSWERS, AND THEY ARE THE TWO THINGS LEFT TO DO ─────────────────────
3552
+ *
3553
+ * The news has been read; what remains is whether the buyer wants these tickets or not.
3554
+ * TRY AGAIN is re-entry — the walk returns to its first stop and the island stays OPEN, so
3555
+ * they carry straight on. CLOSE is leaving — the same reset, collapsed.
3556
+ *
3557
+ * NEITHER MINTS A CART HERE, which is what kept Try Again off this card before. It hands
3558
+ * the buyer back to the flow, and the flow opens a cart when it reaches a step that needs
3559
+ * one — so the card that says the tickets went in the meantime is the step that knows,
3560
+ * exactly as it was when Close was the only way through.
3561
+ *
3562
+ * WHAT THEY ANSWERED SURVIVES either way: they said two adults for Saturday and gave their
3563
+ * email, and none of that stopped being true when the clock did. It is the CART that is
3564
+ * new, because the old one is gone.
3565
+ *
3566
+ * A HOST'S OWN EXPIRED HOLD IS NOT OURS TO RENEW, and Try Again cannot pretend otherwise:
3567
+ * `restart` throws away the cart THIS widget opened, so where the hold came from a prop it
3568
+ * is still expired and this card comes back. That is the truth about their reservation
3569
+ * rather than a state we are stuck in — see `useAssertedHold`.
3570
+ */
3571
+ export declare function timedOutViewProps(expanded: boolean, onTryAgain: () => void, onClose: () => void): {
3572
+ variant: "hold";
3573
+ expanded: boolean;
3574
+ onToggle: () => void;
3575
+ actionLabel: "Close";
3576
+ title: "Your Order Timed Out";
3577
+ subtitle: "Your tickets have been released. They may still be available.";
3578
+ actions: ({
3579
+ key: string;
3580
+ role: "action";
3581
+ label: "Try Again";
3582
+ onPress: () => void;
3583
+ } | {
3584
+ key: string;
3585
+ role: "secondary";
3586
+ label: "Close";
3587
+ onPress: () => void;
3588
+ })[];
3589
+ };
3590
+
3591
+ /** The time it is right now on a given zone's clock, as `HH:MM`. */
3592
+ export declare function timeOfDayInZone(now: Date, timeZone: string | null): string;
3593
+
3594
+ /** Select Time — the timeslot picker's content. */
3595
+ export declare function TimePicker({ series, today, nowTime, selection, onSelectDay, slots, onSelectTime, remaining, accessory, onVisibleMonthChange, }: TimePickerProps): react_jsx_runtime.JSX.Element;
3596
+
3597
+ export declare type TimePickerProps = {
3598
+ /**
3599
+ * The run the chosen day belongs to. The week strip scrolls through all of it,
3600
+ * including weeks the run skips.
3601
+ */
3602
+ readonly series: CalendarSeries;
3603
+ /** `YYYY-MM-DD` in the VENUE's local day, never the device's. */
3604
+ readonly today: string;
3605
+ /** `HH:MM` in the VENUE's local time (`timeOfDayInZone`). */
3606
+ readonly nowTime: string;
3607
+ /** THE WHOLE ANSWER THIS CARD IS COLLECTING: the day, and the time on it. */
3608
+ readonly selection: TimeSelection;
3609
+ /**
3610
+ * Picking a day in the strip REPLACES the chosen one; it never clears it — and it drops
3611
+ * any time chosen on the day before it. See `withSelectedDay`.
3612
+ */
3613
+ readonly onSelectDay: (day: string) => void;
3614
+ /** ONE ticket's slots for `selection.day`, in the order the wire gave them. */
3615
+ readonly slots: readonly Timeslot[];
3616
+ readonly onSelectTime: (startTime: string) => void;
3617
+ /**
3618
+ * Per-day `Remaining`, 0..1, keyed by `YYYY-MM-DD` — the RAW signal, exactly as
3619
+ * `DayPicker` takes it, for the strip's own seven cells. A slot's own
3620
+ * availability rides on the slot and never comes from here.
3621
+ */
3622
+ readonly remaining?: Readonly<Record<string, number>>;
3623
+ /**
3624
+ * Defaults to the variant both pickers draw. A prop only so a host can turn the line
3625
+ * off; there is no per-cell answer.
3626
+ */
3627
+ readonly accessory?: DatePickerCellAccessory;
3628
+ /**
3629
+ * The month the WEEK STRIP is showing, reported as it pages — the same fact
3630
+ * `DayPicker` publishes, for the same header pill. The timeslots below never move
3631
+ * it: they all belong to one day.
3632
+ */
3633
+ readonly onVisibleMonthChange?: (month: CalendarMonthKey) => void;
3634
+ };
3635
+
3636
+ /**
3637
+ * THE DAY AND THE TIME ON IT, AS ONE VALUE — because they are one answer, and holding
3638
+ * them apart is what let a time outlive the day it was chosen on.
3639
+ */
3640
+ export declare type TimeSelection = {
3641
+ /**
3642
+ * `YYYY-MM-DD` — the day being bought, on the VENUE's own local calendar. Not nullable:
3643
+ * there is no version of Select Time with no day, because the slots on it belong to
3644
+ * one.
3645
+ */
3646
+ readonly day: string;
3647
+ /**
3648
+ * The picked slot's `startTime`, which is the only identity a slot has, or null for a
3649
+ * day whose time has not been chosen yet.
3650
+ */
3651
+ readonly startTime: string | null;
3652
+ };
3653
+
3654
+ /**
3655
+ * The times within one day that a ticket is sold for — the timeslot picker's whole
3656
+ * domain.
3657
+ */
3658
+
3659
+ /** One slot a ticket is sold for. */
3660
+ export declare type Timeslot = {
3661
+ /**
3662
+ * `HH:MM` on the VENUE's clock — never the viewer's. Also the slot's IDENTITY: the wire
3663
+ * gives no key, so the start time is what a selection points at.
3664
+ */
3665
+ readonly startTime: string;
3666
+ /** `HH:MM` on the VENUE's clock, or null where the slot does not say. */
3667
+ readonly endTime: string | null;
3668
+ /**
3669
+ * How full this slot is, 0..1 — the platform's own `Remaining`, exactly as a day
3670
+ * reports it. Null where the slot does not say.
3671
+ */
3672
+ readonly remaining: number | null;
3673
+ };
3674
+
3675
+ /**
3676
+ * The selection after a day is pressed: the day, or NOTHING if it was already the
3677
+ * chosen one.
3678
+ */
3679
+ export declare function toggleSelectedDay(selected: string | null, day: string): string | null;
3680
+
3681
+ /** @internal */
3682
+ /** @internal */
3683
+ declare interface TransactionByKeyResponse {
3684
+ ID: number;
3685
+ TransactionKey: string;
3686
+ StripeStatus: string;
3687
+ TotalAmount: number;
3688
+ Currency: string;
3689
+ EventID?: number;
3690
+ Items: Array<{
3691
+ Key: string;
3692
+ Type: string;
3693
+ ItemId: number;
3694
+ TotalAmount: number;
3695
+ OrganisationAmount: number;
3696
+ ScopeAmount: number;
3697
+ BrokerAmount: number;
3698
+ DiscountAmount: number;
3699
+ Attendee?: {
3700
+ ID: number;
3701
+ FirstName: string;
3702
+ LastName: string;
3703
+ Email: string;
3704
+ Phone?: string | null;
3705
+ Photo?: string | null;
3706
+ };
3707
+ }>;
3708
+ }
3709
+
3710
+ export declare function useIslandPress(scope?: PressScope): PressHandlers;
3711
+
3712
+ export declare function useReportAnswered(answered: boolean, onAnsweredChange: AnswerReporting['onAnsweredChange']): void;
3713
+
3714
+ /**
3715
+ * WHO A TICKET IS FOR — "Child", "Student".
3716
+ *
3717
+ * `AssignmentKey` IDENTIFIES THE ASSIGNMENT, NOT THE TYPE. One entry is this type
3718
+ * assigned to one product on one event, so the same "Child" appears once per product per
3719
+ * night, each with its own key, its own discount and its own conditions. `Name` is the
3720
+ * only field that identifies what a buyer is choosing — see `groupUserTypes`, which is
3721
+ * the only thing that should be building rows out of these.
3722
+ *
3723
+ * @internal
3724
+ */
3725
+ declare interface UserType {
3726
+ AssignmentKey: string;
3727
+ Name: string;
3728
+ DiscountNominal: number;
3729
+ DiscountRate: number;
3730
+ /** The organiser's own condition on choosing it, drawn under the name at `PARTY`. */
3731
+ Note?: string | null;
3732
+ /** Whether the buyer must show ID. Varies BY PRODUCT under one name — see `agreed`. */
3733
+ IdRequired?: boolean;
3734
+ AgeMinimum?: number | null;
3735
+ AgeMaximum?: number | null;
3736
+ }
3737
+
3738
+ /**
3739
+ * EVERY ASSIGNMENT KEY TO THE WORD IT STANDS FOR. `attributeCartItems` reads the key back
3740
+ * off the REQUEST, where it is the resolved assignment rather than the name the
3741
+ * composition held — so this covers every assignment in the run, not the rows drawn.
3742
+ */
3743
+ export declare function userTypeNames(rows: readonly UserType[]): Record<string, string>;
3744
+
3745
+ /** The selection after a day is picked: the new day, and NO time. */
3746
+ export declare function withSelectedDay(selection: TimeSelection, day: string): TimeSelection;
3747
+
3748
+ /** The selection after a time is picked, on the day already chosen. */
3749
+ export declare function withSelectedTime(selection: TimeSelection, startTime: string): TimeSelection;
3750
+
3751
+ export { }