@scopetickets/checkout 0.7.0 → 0.7.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.
package/dist/index.d.cts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { AvatarAccessory } from '@scopetickets/avatar';
2
2
  import { AvatarAssets } from '@scopetickets/avatar';
3
+ import { AvatarMotion } from '@scopetickets/avatar';
3
4
  import { ButtonSize } from '@scopetickets/stui';
4
5
  import { IslandAction } from '@scopetickets/stui';
5
6
  import { IslandMode } from '@scopetickets/stui';
@@ -356,6 +357,15 @@ declare type AuthCardId =
356
357
  */
357
358
  | 'ADD_TO_ACCOUNT';
358
359
 
360
+ /** And to use one. */
361
+ declare type AuthenticationArm = {
362
+ readonly challengeId: string;
363
+ readonly challenge: string;
364
+ readonly rpId: string;
365
+ readonly credentialIds: readonly string[];
366
+ readonly userVerification: UserVerification;
367
+ };
368
+
359
369
  declare type AuthEvent =
360
370
  /**
361
371
  * Authenticated, however it happened — a passkey, a password, or an account just made.
@@ -1000,6 +1010,8 @@ declare type CalendarSeriesEvent = {
1000
1010
  readonly day: string;
1001
1011
  };
1002
1012
 
1013
+ export declare function canAddApplePass(): boolean;
1014
+
1003
1015
  export declare type CardAction = {
1004
1016
  readonly role: ActionRole;
1005
1017
  readonly mark?: ButtonMark;
@@ -1996,6 +2008,10 @@ declare type ChosenFile = {
1996
2008
  readonly size: number;
1997
2009
  };
1998
2010
 
2011
+ declare type CircleAccessory = Extract<AvatarAccessory, {
2012
+ shape: 'circle';
2013
+ }>;
2014
+
1999
2015
  declare type Clock = {
2000
2016
  readonly now: () => number;
2001
2017
  /** Returns a stop function; calling it twice is harmless. */
@@ -2050,6 +2066,14 @@ declare type CredentialVault = {
2050
2066
  readonly clear: () => Promise<void>;
2051
2067
  };
2052
2068
 
2069
+ /**
2070
+ * RICH TEXT, DRAWN. "Powered by" and the wordmark are one phrase, so the mark is not
2071
+ * announced; a sentence with a hold's clock in it draws the clock as its own run, which
2072
+ * moves without the sentence around it being drawn again (`HoldClockText`). Only a phrase
2073
+ * with a mark in it is the credit: the hold's sentence was always plain words.
2074
+ */
2075
+ export declare function creditNode(text: RichText): ReactNode;
2076
+
2053
2077
  declare type DayLoad = {
2054
2078
  readonly status: 'IDLE';
2055
2079
  }
@@ -2101,6 +2125,14 @@ export declare function EmailStep({ value, onChange, onAnsweredChange, }: Answer
2101
2125
  readonly onChange?: (email: string) => void;
2102
2126
  }): react_jsx_runtime.JSX.Element;
2103
2127
 
2128
+ /**
2129
+ * A CHOSEN PHOTO, MADE THE SIZE IT IS DRAWN AT, as the data URL an upload carries (Conall,
2130
+ * 2026-11-15): decoded (turned upright by its own orientation), brought down to `PHOTO_EDGE` on its
2131
+ * longest side, and encoded as WebP, or JPEG on a white ground where the browser cannot write WebP.
2132
+ * A picture that will not decode is sent as it was chosen.
2133
+ */
2134
+ export declare function encodePhoto(file: Blob): Promise<string>;
2135
+
2104
2136
  /** @internal */
2105
2137
  declare type Environment = 'sandbox' | 'production' | 'internal';
2106
2138
 
@@ -2381,6 +2413,25 @@ declare type GlyphId = 'ASTERISK' | 'BELL' | 'CALENDAR' | 'CALLOUT_WITH_HEART' |
2381
2413
  /** Whether the buyer has taken the guest route for this order. */
2382
2414
  declare type GuestChoice = 'NOT_TAKEN' | 'TAKEN';
2383
2415
 
2416
+ /**
2417
+ * THE HERO CHANGES ON THE CARRY'S CLOCKS. A change of subject (signing out, a face picked) and,
2418
+ * under reduced motion, a change of badge are the avatar's own: its one face, or its one badge,
2419
+ * fades out, swaps while it is invisible, and fades back in. These are the island's clocks for
2420
+ * it, so the change starts as the hero sets off (`CARRY_MOVE_DELAY_MS`), is done as it lands
2421
+ * (two halves of `CARRY_REST_MS`), and under reduced motion takes the island's own fade.
2422
+ */
2423
+ export declare const HERO_MOTION: Partial<AvatarMotion>;
2424
+
2425
+ /**
2426
+ * The badge on the hero, or none.
2427
+ *
2428
+ * Written out per shape rather than passed through, because `AvatarAccessory` is a union
2429
+ * DISCRIMINATED on `shape` and a badge whose shape is `'square' | 'circle'` matches
2430
+ * neither arm until it is narrowed. The notch is cut from the shape — see the package —
2431
+ * so this is the point at which "either" has to become "which".
2432
+ */
2433
+ export declare function heroAccessory(badge: StepAccessory | undefined): AvatarAccessory | null;
2434
+
2384
2435
  /**
2385
2436
  * WHAT A STOPPED CLOCK SAYS — see `timedOutViewProps` for the card it draws.
2386
2437
  *
@@ -2396,6 +2447,34 @@ export declare const HOLD_VIEW: {
2396
2447
  readonly close: "Close";
2397
2448
  };
2398
2449
 
2450
+ /**
2451
+ * THE CLOCK AS THE HERO'S ELEMENT — the badge both cards that know about the hold wear:
2452
+ * the cart screen `3791:7839`, and the timed-out card `3803:7329` it becomes.
2453
+ *
2454
+ * IT USED TO BE THE WHOLE HERO — a bare `$25` ring where the avatar goes. As an accessory
2455
+ * it is the composition every other card here uses: a subject, and a mark saying what is
2456
+ * being asked of it.
2457
+ *
2458
+ * `solid`, NOT `metal`. Metal is a 19-primitive SVG filter and the avatar pops an accessory
2459
+ * in by SCALING it; a filter cannot survive that, so the ring pixelated and stuttered on the
2460
+ * way in. Metal remains reviewable at `?timer`.
2461
+ *
2462
+ * DECORATIVE ONLY WHERE THE WORDS BENEATH SAY THE COUNTDOWN, which is the pay cards and
2463
+ * the resting pill — and NOT the two screens this is most often spent on.
2464
+ *
2465
+ * IT WAS DECORATIVE EVERYWHERE, and that was wrong on both of them. The cart screen's
2466
+ * subtitle says what the total INCLUDES, and the timed-out card's says the hold is gone;
2467
+ * neither reads the clock out, so on those two a ring nothing names is a graphic a screen
2468
+ * reader announces as nothing. Core has said so all along — `StepBadge.clock` exists for
2469
+ * exactly this ("the mark's own name for the moment the sentence is not there") and
2470
+ * `cart-view.ts` words it per card — but nothing on either renderer was reading the field,
2471
+ * so `CART_VIEW.remaining` had no reader at all. Found porting the native island, 2026-09-20.
2472
+ *
2473
+ * THE CALLER SAYS WHICH IT IS, rather than this guessing from the hold: the words differ by
2474
+ * card and they are core's to choose, so a site with nothing to add simply passes nothing.
2475
+ */
2476
+ export declare function holdBadge(hold: HoldClock, clock?: RichText): CircleAccessory;
2477
+
2399
2478
  /**
2400
2479
  * THE HOLD AS A DEADLINE — when it ends, by the device's clock, and the whole window.
2401
2480
  *
@@ -3069,6 +3148,88 @@ export declare type PartyUserTypeOption = {
3069
3148
  */
3070
3149
  declare type PasskeyAlgorithm = -7 | -257;
3071
3150
 
3151
+ export declare function PasskeyButton({ hostUrl, ceremony, label, onState, onResult, stayInFrame, mark, }: PasskeyButtonProps): react_jsx_runtime.JSX.Element;
3152
+
3153
+ /**
3154
+ * THE CARD'S PRIMARY BUTTON, WHEN THE CARD IS THE PASSKEY STEP.
3155
+ *
3156
+ * It stands exactly where `IslandCard` would have drawn one, and looks like one, but it
3157
+ * is an iframe: the press has to land in a document under the RP id or WebAuthn will not
3158
+ * run — see `PasskeyFrame` for why activation cannot be handed across.
3159
+ *
3160
+ * What this adds over the frame is the appearance. The button is painted by the other
3161
+ * document, which can inherit nothing from this one, so the card's own tokens are read
3162
+ * off this element's computed style and sent over as values.
3163
+ */
3164
+ export declare interface PasskeyButtonProps {
3165
+ /** Where the ceremony document is served — `ENVIRONMENT_URLS.passkeyHostUrl`. */
3166
+ hostUrl: string;
3167
+ /**
3168
+ * The ceremony to offer, or `null` while there is none — a challenge still being
3169
+ * fetched, or a step the buyer has already answered.
3170
+ */
3171
+ ceremony: PasskeyCeremony | null;
3172
+ /** The card's own word for it. `AUTH_COPY` owns the words. */
3173
+ label: string;
3174
+ onState?: (state: PasskeyFrameState) => void;
3175
+ onResult?: (result: PasskeyResult) => void;
3176
+ /** Run in the frame and never open a window, for a sign-in only: see `PasskeyFrame`. */
3177
+ stayInFrame?: boolean;
3178
+ /**
3179
+ * The glyph before the label, as core's passkey block names it. The frame draws the passkey
3180
+ * glyph and no other, so any other mark is drawn as none: see `PasskeyFrame`.
3181
+ */
3182
+ mark?: ButtonMark;
3183
+ }
3184
+
3185
+ /**
3186
+ * WHAT THE FRAME IS BEING ASKED TO DO — an arm, and which of the two ceremonies it is.
3187
+ *
3188
+ * HERE AND NOT BESIDE THE COMPONENT that spends it, because it is the ARM plus one word:
3189
+ * pure data, the exact payload `PASSKEY_MESSAGES.ARM` carries, and a shape two hooks and
3190
+ * two islands hand around without any of them drawing anything. It lived on
3191
+ * `PasskeyFrame` and made the data layer import a component to name its own state.
3192
+ */
3193
+ declare type PasskeyCeremony = {
3194
+ readonly kind: 'REGISTRATION';
3195
+ readonly ceremony: RegistrationArm;
3196
+ } | {
3197
+ readonly kind: 'AUTHENTICATION';
3198
+ readonly ceremony: AuthenticationArm;
3199
+ };
3200
+
3201
+ /**
3202
+ * WHERE THE FRAME IS UP TO.
3203
+ *
3204
+ * The button's measured size is deliberately NOT in here. It is a measurement applied
3205
+ * straight to a style, not a decision anybody makes, and it can change at any point in
3206
+ * any of these states — folding it in would make every transition carry a number that
3207
+ * has nothing to do with the transition.
3208
+ */
3209
+ declare type PasskeyFrameState =
3210
+ /** Mounted, and it has not spoken yet. */
3211
+ {
3212
+ readonly status: 'LOADING';
3213
+ }
3214
+ /**
3215
+ * It spoke, and no ceremony is possible here — no WebAuthn, or a frame that was never
3216
+ * permitted to ask. THE CARD SHOULD NOT OFFER A PASSKEY, which is why this is asked
3217
+ * before the step is drawn rather than discovered when a button fails.
3218
+ */
3219
+ | {
3220
+ readonly status: 'UNAVAILABLE';
3221
+ }
3222
+ /** It can. `platformAuthenticator` is whether the device has one built in. */
3223
+ | {
3224
+ readonly status: 'READY';
3225
+ readonly platformAuthenticator: boolean;
3226
+ }
3227
+ /** It finished. */
3228
+ | {
3229
+ readonly status: 'SETTLED';
3230
+ readonly result: PasskeyResult;
3231
+ };
3232
+
3072
3233
  /**
3073
3234
  * WHETHER THIS PAGE MAY MAKE A PASSKEY FOR `rpId` ITSELF: its own site (the RP id, or under it),
3074
3235
  * or a related origin the RP id lists, in a browser that honours the list (it says so through
@@ -3127,6 +3288,20 @@ declare interface PasskeyRegistrationRequest {
3127
3288
  ClientData: string;
3128
3289
  }
3129
3290
 
3291
+ /** How a ceremony ended, as the host reports it. */
3292
+ declare type PasskeyResult = {
3293
+ readonly ok: true;
3294
+ readonly kind: 'REGISTRATION';
3295
+ readonly credential: PasskeyRegistrationRequest;
3296
+ } | {
3297
+ readonly ok: true;
3298
+ readonly kind: 'AUTHENTICATION';
3299
+ readonly credential: PasskeyValidationRequest;
3300
+ } | {
3301
+ readonly ok: false;
3302
+ readonly code: string;
3303
+ };
3304
+
3130
3305
  /** Who the credential will belong to. `Key` is the only user key the API ever returns. */
3131
3306
  declare interface PasskeyUser {
3132
3307
  Key: string | null;
@@ -4323,6 +4498,23 @@ declare interface StaffAuthResult {
4323
4498
  Authorization: string | null;
4324
4499
  }
4325
4500
 
4501
+ /**
4502
+ * The status badge for a step, or `null`. Circular and UNCROPPED, which is what the round
4503
+ * ground needs — a square notch would clip it to a rounded rectangle.
4504
+ *
4505
+ * ── WHY THE RING IS DRAWN HERE RATHER THAN BY `StatusTag` ────────────────────
4506
+ *
4507
+ * The tag renders its own glyph and takes neither a substitute nor a `spin`, and this
4508
+ * card needs both: a different mark, and that mark turning. Drawing the ring is fifteen
4509
+ * lines — a tone, a padding and a circle — against reaching past the tag's API from the
4510
+ * stylesheet, which is what the first version did.
4511
+ *
4512
+ * NOTHING ABOUT THE STATUS IS RESTATED. The glyph, the label and the tone still come from
4513
+ * `STATUSES`, so a status renamed or recoloured upstream still arrives here; what is local
4514
+ * is only the ring it sits in.
4515
+ */
4516
+ export declare function statusAccessory(step: PurchaseStepId, size: 25 | 10, label?: string | null): CircleAccessory | null;
4517
+
4326
4518
  /** The same badges, each NAMED by the step that owns it. */
4327
4519
  export declare const STEP_ACCESSORY: Partial<Record<PurchaseStepId, StepBadge & {
4328
4520
  readonly id: string;
@@ -4343,6 +4535,16 @@ export declare const STEP_CARD_COPY: Record<PurchaseStepId, {
4343
4535
  */
4344
4536
  export declare const STEP_DISMISS: Partial<Record<PurchaseStepId, 'back' | 'close'>>;
4345
4537
 
4538
+ /**
4539
+ * A badge as `step-cards` writes one — either shape, and NAMED, which is what lets the
4540
+ * avatar tell a question badge from a keyhole badge and cross between them.
4541
+ */
4542
+ export declare type StepAccessory = GlyphBadge | {
4543
+ readonly shape: 'square' | 'circle';
4544
+ readonly content: ReactNode;
4545
+ readonly id?: string;
4546
+ };
4547
+
4346
4548
  declare type StepBadge = GlyphBadge;
4347
4549
 
4348
4550
  /** Failures are results, not throws, so each caller decides what an unavailable store means. */
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { AvatarAccessory } from '@scopetickets/avatar';
2
2
  import { AvatarAssets } from '@scopetickets/avatar';
3
+ import { AvatarMotion } from '@scopetickets/avatar';
3
4
  import { ButtonSize } from '@scopetickets/stui';
4
5
  import { IslandAction } from '@scopetickets/stui';
5
6
  import { IslandMode } from '@scopetickets/stui';
@@ -356,6 +357,15 @@ declare type AuthCardId =
356
357
  */
357
358
  | 'ADD_TO_ACCOUNT';
358
359
 
360
+ /** And to use one. */
361
+ declare type AuthenticationArm = {
362
+ readonly challengeId: string;
363
+ readonly challenge: string;
364
+ readonly rpId: string;
365
+ readonly credentialIds: readonly string[];
366
+ readonly userVerification: UserVerification;
367
+ };
368
+
359
369
  declare type AuthEvent =
360
370
  /**
361
371
  * Authenticated, however it happened — a passkey, a password, or an account just made.
@@ -1000,6 +1010,8 @@ declare type CalendarSeriesEvent = {
1000
1010
  readonly day: string;
1001
1011
  };
1002
1012
 
1013
+ export declare function canAddApplePass(): boolean;
1014
+
1003
1015
  export declare type CardAction = {
1004
1016
  readonly role: ActionRole;
1005
1017
  readonly mark?: ButtonMark;
@@ -1996,6 +2008,10 @@ declare type ChosenFile = {
1996
2008
  readonly size: number;
1997
2009
  };
1998
2010
 
2011
+ declare type CircleAccessory = Extract<AvatarAccessory, {
2012
+ shape: 'circle';
2013
+ }>;
2014
+
1999
2015
  declare type Clock = {
2000
2016
  readonly now: () => number;
2001
2017
  /** Returns a stop function; calling it twice is harmless. */
@@ -2050,6 +2066,14 @@ declare type CredentialVault = {
2050
2066
  readonly clear: () => Promise<void>;
2051
2067
  };
2052
2068
 
2069
+ /**
2070
+ * RICH TEXT, DRAWN. "Powered by" and the wordmark are one phrase, so the mark is not
2071
+ * announced; a sentence with a hold's clock in it draws the clock as its own run, which
2072
+ * moves without the sentence around it being drawn again (`HoldClockText`). Only a phrase
2073
+ * with a mark in it is the credit: the hold's sentence was always plain words.
2074
+ */
2075
+ export declare function creditNode(text: RichText): ReactNode;
2076
+
2053
2077
  declare type DayLoad = {
2054
2078
  readonly status: 'IDLE';
2055
2079
  }
@@ -2101,6 +2125,14 @@ export declare function EmailStep({ value, onChange, onAnsweredChange, }: Answer
2101
2125
  readonly onChange?: (email: string) => void;
2102
2126
  }): react_jsx_runtime.JSX.Element;
2103
2127
 
2128
+ /**
2129
+ * A CHOSEN PHOTO, MADE THE SIZE IT IS DRAWN AT, as the data URL an upload carries (Conall,
2130
+ * 2026-11-15): decoded (turned upright by its own orientation), brought down to `PHOTO_EDGE` on its
2131
+ * longest side, and encoded as WebP, or JPEG on a white ground where the browser cannot write WebP.
2132
+ * A picture that will not decode is sent as it was chosen.
2133
+ */
2134
+ export declare function encodePhoto(file: Blob): Promise<string>;
2135
+
2104
2136
  /** @internal */
2105
2137
  declare type Environment = 'sandbox' | 'production' | 'internal';
2106
2138
 
@@ -2381,6 +2413,25 @@ declare type GlyphId = 'ASTERISK' | 'BELL' | 'CALENDAR' | 'CALLOUT_WITH_HEART' |
2381
2413
  /** Whether the buyer has taken the guest route for this order. */
2382
2414
  declare type GuestChoice = 'NOT_TAKEN' | 'TAKEN';
2383
2415
 
2416
+ /**
2417
+ * THE HERO CHANGES ON THE CARRY'S CLOCKS. A change of subject (signing out, a face picked) and,
2418
+ * under reduced motion, a change of badge are the avatar's own: its one face, or its one badge,
2419
+ * fades out, swaps while it is invisible, and fades back in. These are the island's clocks for
2420
+ * it, so the change starts as the hero sets off (`CARRY_MOVE_DELAY_MS`), is done as it lands
2421
+ * (two halves of `CARRY_REST_MS`), and under reduced motion takes the island's own fade.
2422
+ */
2423
+ export declare const HERO_MOTION: Partial<AvatarMotion>;
2424
+
2425
+ /**
2426
+ * The badge on the hero, or none.
2427
+ *
2428
+ * Written out per shape rather than passed through, because `AvatarAccessory` is a union
2429
+ * DISCRIMINATED on `shape` and a badge whose shape is `'square' | 'circle'` matches
2430
+ * neither arm until it is narrowed. The notch is cut from the shape — see the package —
2431
+ * so this is the point at which "either" has to become "which".
2432
+ */
2433
+ export declare function heroAccessory(badge: StepAccessory | undefined): AvatarAccessory | null;
2434
+
2384
2435
  /**
2385
2436
  * WHAT A STOPPED CLOCK SAYS — see `timedOutViewProps` for the card it draws.
2386
2437
  *
@@ -2396,6 +2447,34 @@ export declare const HOLD_VIEW: {
2396
2447
  readonly close: "Close";
2397
2448
  };
2398
2449
 
2450
+ /**
2451
+ * THE CLOCK AS THE HERO'S ELEMENT — the badge both cards that know about the hold wear:
2452
+ * the cart screen `3791:7839`, and the timed-out card `3803:7329` it becomes.
2453
+ *
2454
+ * IT USED TO BE THE WHOLE HERO — a bare `$25` ring where the avatar goes. As an accessory
2455
+ * it is the composition every other card here uses: a subject, and a mark saying what is
2456
+ * being asked of it.
2457
+ *
2458
+ * `solid`, NOT `metal`. Metal is a 19-primitive SVG filter and the avatar pops an accessory
2459
+ * in by SCALING it; a filter cannot survive that, so the ring pixelated and stuttered on the
2460
+ * way in. Metal remains reviewable at `?timer`.
2461
+ *
2462
+ * DECORATIVE ONLY WHERE THE WORDS BENEATH SAY THE COUNTDOWN, which is the pay cards and
2463
+ * the resting pill — and NOT the two screens this is most often spent on.
2464
+ *
2465
+ * IT WAS DECORATIVE EVERYWHERE, and that was wrong on both of them. The cart screen's
2466
+ * subtitle says what the total INCLUDES, and the timed-out card's says the hold is gone;
2467
+ * neither reads the clock out, so on those two a ring nothing names is a graphic a screen
2468
+ * reader announces as nothing. Core has said so all along — `StepBadge.clock` exists for
2469
+ * exactly this ("the mark's own name for the moment the sentence is not there") and
2470
+ * `cart-view.ts` words it per card — but nothing on either renderer was reading the field,
2471
+ * so `CART_VIEW.remaining` had no reader at all. Found porting the native island, 2026-09-20.
2472
+ *
2473
+ * THE CALLER SAYS WHICH IT IS, rather than this guessing from the hold: the words differ by
2474
+ * card and they are core's to choose, so a site with nothing to add simply passes nothing.
2475
+ */
2476
+ export declare function holdBadge(hold: HoldClock, clock?: RichText): CircleAccessory;
2477
+
2399
2478
  /**
2400
2479
  * THE HOLD AS A DEADLINE — when it ends, by the device's clock, and the whole window.
2401
2480
  *
@@ -3069,6 +3148,88 @@ export declare type PartyUserTypeOption = {
3069
3148
  */
3070
3149
  declare type PasskeyAlgorithm = -7 | -257;
3071
3150
 
3151
+ export declare function PasskeyButton({ hostUrl, ceremony, label, onState, onResult, stayInFrame, mark, }: PasskeyButtonProps): react_jsx_runtime.JSX.Element;
3152
+
3153
+ /**
3154
+ * THE CARD'S PRIMARY BUTTON, WHEN THE CARD IS THE PASSKEY STEP.
3155
+ *
3156
+ * It stands exactly where `IslandCard` would have drawn one, and looks like one, but it
3157
+ * is an iframe: the press has to land in a document under the RP id or WebAuthn will not
3158
+ * run — see `PasskeyFrame` for why activation cannot be handed across.
3159
+ *
3160
+ * What this adds over the frame is the appearance. The button is painted by the other
3161
+ * document, which can inherit nothing from this one, so the card's own tokens are read
3162
+ * off this element's computed style and sent over as values.
3163
+ */
3164
+ export declare interface PasskeyButtonProps {
3165
+ /** Where the ceremony document is served — `ENVIRONMENT_URLS.passkeyHostUrl`. */
3166
+ hostUrl: string;
3167
+ /**
3168
+ * The ceremony to offer, or `null` while there is none — a challenge still being
3169
+ * fetched, or a step the buyer has already answered.
3170
+ */
3171
+ ceremony: PasskeyCeremony | null;
3172
+ /** The card's own word for it. `AUTH_COPY` owns the words. */
3173
+ label: string;
3174
+ onState?: (state: PasskeyFrameState) => void;
3175
+ onResult?: (result: PasskeyResult) => void;
3176
+ /** Run in the frame and never open a window, for a sign-in only: see `PasskeyFrame`. */
3177
+ stayInFrame?: boolean;
3178
+ /**
3179
+ * The glyph before the label, as core's passkey block names it. The frame draws the passkey
3180
+ * glyph and no other, so any other mark is drawn as none: see `PasskeyFrame`.
3181
+ */
3182
+ mark?: ButtonMark;
3183
+ }
3184
+
3185
+ /**
3186
+ * WHAT THE FRAME IS BEING ASKED TO DO — an arm, and which of the two ceremonies it is.
3187
+ *
3188
+ * HERE AND NOT BESIDE THE COMPONENT that spends it, because it is the ARM plus one word:
3189
+ * pure data, the exact payload `PASSKEY_MESSAGES.ARM` carries, and a shape two hooks and
3190
+ * two islands hand around without any of them drawing anything. It lived on
3191
+ * `PasskeyFrame` and made the data layer import a component to name its own state.
3192
+ */
3193
+ declare type PasskeyCeremony = {
3194
+ readonly kind: 'REGISTRATION';
3195
+ readonly ceremony: RegistrationArm;
3196
+ } | {
3197
+ readonly kind: 'AUTHENTICATION';
3198
+ readonly ceremony: AuthenticationArm;
3199
+ };
3200
+
3201
+ /**
3202
+ * WHERE THE FRAME IS UP TO.
3203
+ *
3204
+ * The button's measured size is deliberately NOT in here. It is a measurement applied
3205
+ * straight to a style, not a decision anybody makes, and it can change at any point in
3206
+ * any of these states — folding it in would make every transition carry a number that
3207
+ * has nothing to do with the transition.
3208
+ */
3209
+ declare type PasskeyFrameState =
3210
+ /** Mounted, and it has not spoken yet. */
3211
+ {
3212
+ readonly status: 'LOADING';
3213
+ }
3214
+ /**
3215
+ * It spoke, and no ceremony is possible here — no WebAuthn, or a frame that was never
3216
+ * permitted to ask. THE CARD SHOULD NOT OFFER A PASSKEY, which is why this is asked
3217
+ * before the step is drawn rather than discovered when a button fails.
3218
+ */
3219
+ | {
3220
+ readonly status: 'UNAVAILABLE';
3221
+ }
3222
+ /** It can. `platformAuthenticator` is whether the device has one built in. */
3223
+ | {
3224
+ readonly status: 'READY';
3225
+ readonly platformAuthenticator: boolean;
3226
+ }
3227
+ /** It finished. */
3228
+ | {
3229
+ readonly status: 'SETTLED';
3230
+ readonly result: PasskeyResult;
3231
+ };
3232
+
3072
3233
  /**
3073
3234
  * WHETHER THIS PAGE MAY MAKE A PASSKEY FOR `rpId` ITSELF: its own site (the RP id, or under it),
3074
3235
  * or a related origin the RP id lists, in a browser that honours the list (it says so through
@@ -3127,6 +3288,20 @@ declare interface PasskeyRegistrationRequest {
3127
3288
  ClientData: string;
3128
3289
  }
3129
3290
 
3291
+ /** How a ceremony ended, as the host reports it. */
3292
+ declare type PasskeyResult = {
3293
+ readonly ok: true;
3294
+ readonly kind: 'REGISTRATION';
3295
+ readonly credential: PasskeyRegistrationRequest;
3296
+ } | {
3297
+ readonly ok: true;
3298
+ readonly kind: 'AUTHENTICATION';
3299
+ readonly credential: PasskeyValidationRequest;
3300
+ } | {
3301
+ readonly ok: false;
3302
+ readonly code: string;
3303
+ };
3304
+
3130
3305
  /** Who the credential will belong to. `Key` is the only user key the API ever returns. */
3131
3306
  declare interface PasskeyUser {
3132
3307
  Key: string | null;
@@ -4323,6 +4498,23 @@ declare interface StaffAuthResult {
4323
4498
  Authorization: string | null;
4324
4499
  }
4325
4500
 
4501
+ /**
4502
+ * The status badge for a step, or `null`. Circular and UNCROPPED, which is what the round
4503
+ * ground needs — a square notch would clip it to a rounded rectangle.
4504
+ *
4505
+ * ── WHY THE RING IS DRAWN HERE RATHER THAN BY `StatusTag` ────────────────────
4506
+ *
4507
+ * The tag renders its own glyph and takes neither a substitute nor a `spin`, and this
4508
+ * card needs both: a different mark, and that mark turning. Drawing the ring is fifteen
4509
+ * lines — a tone, a padding and a circle — against reaching past the tag's API from the
4510
+ * stylesheet, which is what the first version did.
4511
+ *
4512
+ * NOTHING ABOUT THE STATUS IS RESTATED. The glyph, the label and the tone still come from
4513
+ * `STATUSES`, so a status renamed or recoloured upstream still arrives here; what is local
4514
+ * is only the ring it sits in.
4515
+ */
4516
+ export declare function statusAccessory(step: PurchaseStepId, size: 25 | 10, label?: string | null): CircleAccessory | null;
4517
+
4326
4518
  /** The same badges, each NAMED by the step that owns it. */
4327
4519
  export declare const STEP_ACCESSORY: Partial<Record<PurchaseStepId, StepBadge & {
4328
4520
  readonly id: string;
@@ -4343,6 +4535,16 @@ export declare const STEP_CARD_COPY: Record<PurchaseStepId, {
4343
4535
  */
4344
4536
  export declare const STEP_DISMISS: Partial<Record<PurchaseStepId, 'back' | 'close'>>;
4345
4537
 
4538
+ /**
4539
+ * A badge as `step-cards` writes one — either shape, and NAMED, which is what lets the
4540
+ * avatar tell a question badge from a keyhole badge and cross between them.
4541
+ */
4542
+ export declare type StepAccessory = GlyphBadge | {
4543
+ readonly shape: 'square' | 'circle';
4544
+ readonly content: ReactNode;
4545
+ readonly id?: string;
4546
+ };
4547
+
4346
4548
  declare type StepBadge = GlyphBadge;
4347
4549
 
4348
4550
  /** Failures are results, not throws, so each caller decides what an unavailable store means. */
package/dist/index.js CHANGED
@@ -7448,7 +7448,7 @@ function param(value) {
7448
7448
  }
7449
7449
 
7450
7450
  // src/version.ts
7451
- var CHECKOUT_VERSION = "0.7.0";
7451
+ var CHECKOUT_VERSION = "0.7.1";
7452
7452
 
7453
7453
  // src/data/useCheckoutEvents.ts
7454
7454
  function useCheckoutEvents(observed, { applicationKey, inventories, onEvent, logger = browserLogger }) {
@@ -18309,12 +18309,14 @@ export {
18309
18309
  EmailStep,
18310
18310
  FEEDBACK_STARS,
18311
18311
  FollowList,
18312
+ HERO_MOTION,
18312
18313
  HOLD_VIEW,
18313
18314
  IslandCommitPill,
18314
18315
  NOTICES,
18315
18316
  NameStep,
18316
18317
  PICKER_LAYOUT,
18317
18318
  PROFILE_PHOTO_COPY,
18319
+ PasskeyButton,
18318
18320
  PasswordStep,
18319
18321
  PaymentMethods,
18320
18322
  PaymentReturn,
@@ -18334,14 +18336,19 @@ export {
18334
18336
  attributeCartItems,
18335
18337
  backFrom,
18336
18338
  bandPrice,
18339
+ canAddApplePass,
18337
18340
  cartLines,
18338
18341
  cartViewProps,
18339
18342
  createPasskeyHere,
18343
+ creditNode,
18340
18344
  defaultProfilePhotos2 as defaultProfilePhotos,
18341
18345
  dressBooking,
18346
+ encodePhoto,
18342
18347
  excusedByIntent,
18343
18348
  formatMoney,
18344
18349
  fromPrice,
18350
+ heroAccessory,
18351
+ holdBadge,
18345
18352
  holdExpired,
18346
18353
  holderComplete,
18347
18354
  holderInitials,
@@ -18363,6 +18370,7 @@ export {
18363
18370
  sessionFromPrice,
18364
18371
  sessionStorageVault,
18365
18372
  simulatedSchedule,
18373
+ statusAccessory,
18366
18374
  ticketAt,
18367
18375
  ticketQualifier,
18368
18376
  ticketTitle,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scopetickets/checkout",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "ScopeTicketsCheckout — the embeddable checkout widget: the flow it walks and the steps it mounts, drawn with STui.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -43,7 +43,7 @@
43
43
  },
44
44
  "dependencies": {
45
45
  "@scopetickets/icons": "^0.2.1",
46
- "@scopetickets/stui": "^0.7.0"
46
+ "@scopetickets/stui": "^0.7.1"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@microsoft/api-extractor": "^7.59.1",
@@ -59,8 +59,8 @@
59
59
  "react-dom": "^18.3.1",
60
60
  "tsup": "^8.3.5",
61
61
  "typescript": "^5.7.2",
62
- "@scopetickets/api": "0.1.0",
63
- "@scopetickets/checkout-core": "0.7.0"
62
+ "@scopetickets/checkout-core": "0.7.1",
63
+ "@scopetickets/api": "0.1.0"
64
64
  },
65
65
  "scripts": {
66
66
  "build": "pnpm --filter @scopetickets/api --filter @scopetickets/checkout-core --filter @scopetickets/stui build && tsup && node scripts/verify-declarations.mjs",