@encorekit/web-sdk 2.2.0 → 2.2.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/README.md +20 -0
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/umd/encore.min.js +1 -1
- package/dist/umd/encore.min.js.map +1 -1
- package/package.json +1 -1
- package/types/analytics/events.d.ts +54 -2
- package/types/analytics/events.d.ts.map +1 -1
- package/types/api/APIClient.d.ts +15 -1
- package/types/api/APIClient.d.ts.map +1 -1
- package/types/api/generated/types.d.ts +39 -1
- package/types/api/generated/types.d.ts.map +1 -1
- package/types/api/models.d.ts +7 -0
- package/types/api/models.d.ts.map +1 -1
- package/types/core/Configuration.d.ts +2 -0
- package/types/core/Configuration.d.ts.map +1 -1
- package/types/core/Encore.d.ts.map +1 -1
- package/types/core/giftVariant.d.ts +11 -8
- package/types/core/giftVariant.d.ts.map +1 -1
- package/types/core/share.d.ts +58 -0
- package/types/core/share.d.ts.map +1 -0
- package/types/core/version.d.ts +1 -1
- package/types/types.d.ts +29 -0
- package/types/types.d.ts.map +1 -1
- package/types/ui/GiftSheet.d.ts +47 -3
- package/types/ui/GiftSheet.d.ts.map +1 -1
- package/types/ui/GiftUnwrap.d.ts +70 -0
- package/types/ui/GiftUnwrap.d.ts.map +1 -1
- package/types/ui/OfferModal.d.ts +24 -0
- package/types/ui/OfferModal.d.ts.map +1 -1
- package/types/ui/giftUnwrapArt.d.ts +6 -0
- package/types/ui/giftUnwrapArt.d.ts.map +1 -1
- package/types/ui/giftUnwrapCopy.d.ts +20 -0
- package/types/ui/giftUnwrapCopy.d.ts.map +1 -1
- package/types/ui/styles.d.ts.map +1 -1
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `share` action: hand the link the backend minted for an offer to the user.
|
|
3
|
+
*
|
|
4
|
+
* THE LINK IS THE SERVER'S, NEVER THIS SDK'S. It arrives as `OfferModel.shareUrl` and
|
|
5
|
+
* is shared exactly as served. An offer without one shares nothing and reports
|
|
6
|
+
* `missing_share_link`; there is no fallback to the advertiser URL or to any link this
|
|
7
|
+
* SDK could assemble, because a client-built link is forgeable and unattributed. Same
|
|
8
|
+
* rule as iOS (swift#156) and Android (android#93).
|
|
9
|
+
*
|
|
10
|
+
* TWO ROUTES, in order:
|
|
11
|
+
* 1. `navigator.share`, the system share sheet. It resolves when the user sent the
|
|
12
|
+
* link and rejects when they backed out, so web, like iOS, can tell a completed
|
|
13
|
+
* share from a cancel. A cancel is reported as `completed=false`, never as a
|
|
14
|
+
* failure, and it is not always spelled `AbortError`: `NotAllowedError` and
|
|
15
|
+
* `InvalidStateError` count too (see `CANCEL_NAMES`).
|
|
16
|
+
* 2. The clipboard, where there is no share sheet (most desktop browsers) or the
|
|
17
|
+
* sheet rejected the data itself. The caller shows a visible confirmation; the
|
|
18
|
+
* completed event says `clipboard`.
|
|
19
|
+
* When neither takes the link the tap fails with `share_unavailable`.
|
|
20
|
+
*
|
|
21
|
+
* 🔴 CALLED INSIDE THE CLICK. `navigator.share` and, on Safari, the clipboard need
|
|
22
|
+
* transient user activation, so nothing may be awaited before the first call. An
|
|
23
|
+
* `async` function runs synchronously up to its first `await`, which is what keeps
|
|
24
|
+
* the `navigator.share` call inside the gesture.
|
|
25
|
+
*
|
|
26
|
+
* NEVER THROWS. Every browser call is guarded; the worst outcome is a reported failure.
|
|
27
|
+
*/
|
|
28
|
+
import { type ShareDestinationValue, type ShareFailureReasonValue } from '../analytics/events';
|
|
29
|
+
export type ShareOutcome = {
|
|
30
|
+
status: 'shared';
|
|
31
|
+
destination: ShareDestinationValue;
|
|
32
|
+
} | {
|
|
33
|
+
status: 'cancelled';
|
|
34
|
+
} | {
|
|
35
|
+
status: 'failed';
|
|
36
|
+
reason: ShareFailureReasonValue;
|
|
37
|
+
};
|
|
38
|
+
/** Send `url` through the share sheet, else the clipboard. Resolves; never rejects. */
|
|
39
|
+
export declare function sendShareLink(url: string): Promise<ShareOutcome>;
|
|
40
|
+
/** Receives the three share events. Thrown errors are contained, never surfaced. */
|
|
41
|
+
export interface ShareReporter<C> {
|
|
42
|
+
tapped(ctx: C): void;
|
|
43
|
+
failed(ctx: C, reason: ShareFailureReasonValue): void;
|
|
44
|
+
completed(ctx: C, destination: ShareDestinationValue | undefined, completed: boolean): void;
|
|
45
|
+
}
|
|
46
|
+
export interface ShareAction<C> {
|
|
47
|
+
/**
|
|
48
|
+
* Share `link` for the offer `ctx` describes. Returns null, reporting nothing, when a
|
|
49
|
+
* share is already in flight or the action is locked: a double tap must not stack two
|
|
50
|
+
* share sheets or count one tap twice. Otherwise every call reports `tapped` and then
|
|
51
|
+
* exactly one of `completed` or `failed`, before the returned promise settles.
|
|
52
|
+
*/
|
|
53
|
+
run(link: string | undefined, ctx: C): Promise<ShareOutcome> | null;
|
|
54
|
+
/** Refuse every later call. For a presentation that is closing after a share. */
|
|
55
|
+
lock(): void;
|
|
56
|
+
}
|
|
57
|
+
export declare function createShareAction<C>(reporter: ShareReporter<C>, send?: (url: string) => Promise<ShareOutcome>): ShareAction<C>;
|
|
58
|
+
//# sourceMappingURL=share.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"share.d.ts","sourceRoot":"","sources":["../../src/core/share.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAGL,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC7B,MAAM,qBAAqB,CAAC;AAG7B,MAAM,MAAM,YAAY,GACpB;IAAE,MAAM,EAAE,QAAQ,CAAC;IAAC,WAAW,EAAE,qBAAqB,CAAA;CAAE,GACxD;IAAE,MAAM,EAAE,WAAW,CAAA;CAAE,GACvB;IAAE,MAAM,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,uBAAuB,CAAA;CAAE,CAAC;AAW1D,uFAAuF;AACvF,wBAAsB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CAgBtE;AAwDD,oFAAoF;AACpF,MAAM,WAAW,aAAa,CAAC,CAAC;IAC9B,MAAM,CAAC,GAAG,EAAE,CAAC,GAAG,IAAI,CAAC;IACrB,MAAM,CAAC,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,uBAAuB,GAAG,IAAI,CAAC;IACtD,SAAS,CAAC,GAAG,EAAE,CAAC,EAAE,WAAW,EAAE,qBAAqB,GAAG,SAAS,EAAE,SAAS,EAAE,OAAO,GAAG,IAAI,CAAC;CAC7F;AAED,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B;;;;;OAKG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,GAAG,EAAE,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC;IACpE,iFAAiF;IACjF,IAAI,IAAI,IAAI,CAAC;CACd;AAED,wBAAgB,iBAAiB,CAAC,CAAC,EACjC,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,EAC1B,IAAI,GAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,YAAY,CAAiB,GAC3D,WAAW,CAAC,CAAC,CAAC,CA6ChB"}
|
package/types/core/version.d.ts
CHANGED
package/types/types.d.ts
CHANGED
|
@@ -482,6 +482,35 @@ export interface EncoreConfig {
|
|
|
482
482
|
* was honoured. Absent for everyone else.
|
|
483
483
|
*/
|
|
484
484
|
demoVariant?: string;
|
|
485
|
+
/**
|
|
486
|
+
* Let a labelled reward placement resolve its own variant. Defaults to `false`.
|
|
487
|
+
*
|
|
488
|
+
* Encore can serve a different reward variant per placement label (for example
|
|
489
|
+
* one flow for `'email_code'` and another for `'email'`). The variant the SDK
|
|
490
|
+
* prefetches at `configure()` is chosen before any placement is known, so it
|
|
491
|
+
* cannot carry that choice. With this on, a `rewardUsers` presentation that has a
|
|
492
|
+
* placement label — `Encore.placement('email_code', { useCase: 'rewardUsers' })`,
|
|
493
|
+
* or `show(options, { useCase: 'rewardUsers' }, 'email_code')` — makes one
|
|
494
|
+
* `GET /config?useCase=post-action-reward&placementId=<label>` before the sheet
|
|
495
|
+
* renders and presents the variant that response names. Analytics for that
|
|
496
|
+
* presentation carry that variant's id.
|
|
497
|
+
*
|
|
498
|
+
* - The label is trimmed and capped at 64 characters, exactly as it is on the
|
|
499
|
+
* offers request and on analytics.
|
|
500
|
+
* - A settled answer is reused for every presentation of that label for the rest
|
|
501
|
+
* of the session (until `reset()`), while a failed or discarded request is
|
|
502
|
+
* retried on the next presentation.
|
|
503
|
+
* - It never blocks or breaks a presentation. If the request fails, is slow, or
|
|
504
|
+
* resolves nothing, the surface resolves exactly as it would with this off:
|
|
505
|
+
* the prefetched variant when there is one, otherwise the SDK's usual
|
|
506
|
+
* on-demand `/config?useCase=` fetch.
|
|
507
|
+
* - Paywall (`reduceChurn`) presentations and unlabelled ones are unaffected.
|
|
508
|
+
*
|
|
509
|
+
* Off, the SDK's requests are exactly what they were before the option existed.
|
|
510
|
+
* Only a literal `true` turns it on. Like the other options it is read from the
|
|
511
|
+
* first `configure()` call.
|
|
512
|
+
*/
|
|
513
|
+
resolveVariantsByPlacement?: boolean;
|
|
485
514
|
}
|
|
486
515
|
/** Result of `show()` / `present()`. */
|
|
487
516
|
export type ShowResult =
|
package/types/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE5D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAM/C;;GAEG;AACH,MAAM,MAAM,eAAe,GACvB;IAAE,IAAI,EAAE,WAAW,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,C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G,aAAa,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IACnF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAMD;;GAEG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,GAAG,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC;AAE1D;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC"}
|
package/types/ui/GiftSheet.d.ts
CHANGED
|
@@ -63,10 +63,16 @@ export interface GiftSheetOptions {
|
|
|
63
63
|
onCommit: (index: number) => void;
|
|
64
64
|
/** The pick changed: the picked offer, or null once cleared. The footer follows it. */
|
|
65
65
|
onPick?: (offer: Offer | null) => void;
|
|
66
|
-
/**
|
|
67
|
-
|
|
66
|
+
/**
|
|
67
|
+
* The surface's impression gate. Cards are registered only while the sheet is open.
|
|
68
|
+
* Omitted, the sheet reports no impressions at all: `giftUnwrap`'s keep-for-later
|
|
69
|
+
* panel lists gifts the rows already reported, and the variant marks it
|
|
70
|
+
* `impressionProbe: none`. Registering there would spend the gate's once-per-offer
|
|
71
|
+
* budget on a card that must not count.
|
|
72
|
+
*/
|
|
73
|
+
impressions?: ImpressionGate;
|
|
68
74
|
/** The gate judged the card for `index` shown. The surface emits the impression. */
|
|
69
|
-
onShown
|
|
75
|
+
onShown?: (index: number) => void;
|
|
70
76
|
/** The surface's listener lifetime; aborting it detaches every sheet listener. */
|
|
71
77
|
signal: AbortSignal;
|
|
72
78
|
/** The sheet's heading and group name. Defaults to `GIFT_COPY.sheetTitle` ("Other gifts"). */
|
|
@@ -92,6 +98,30 @@ export interface GiftSheetOptions {
|
|
|
92
98
|
* passes a label that does not promise a claim.
|
|
93
99
|
*/
|
|
94
100
|
ctaLabel?: (offer: Offer) => string;
|
|
101
|
+
/** A line under the heading. Newlines are kept. Absent by default. */
|
|
102
|
+
subtitle?: string;
|
|
103
|
+
/**
|
|
104
|
+
* What the close control AND Escape do. Defaults to closing the sheet. The
|
|
105
|
+
* keep-for-later panel's close is the presentation's real close, so it passes one
|
|
106
|
+
* that dismisses. The scrim always just closes the sheet.
|
|
107
|
+
*/
|
|
108
|
+
onClose?: () => void;
|
|
109
|
+
/** An extra class on the layer, for a sheet styled as something else (the panel). */
|
|
110
|
+
layerClass?: string;
|
|
111
|
+
/**
|
|
112
|
+
* `false` never draws the category tab strip. The keep-for-later panel lists a
|
|
113
|
+
* handful of gifts in one row, as the native panel does, and a strip would hide the
|
|
114
|
+
* selection it opens on behind another tab. Defaults to the data-driven strip.
|
|
115
|
+
*/
|
|
116
|
+
tabs?: boolean;
|
|
117
|
+
/**
|
|
118
|
+
* Whether the CTA is drawn for this pick. Defaults to always. The keep-for-later
|
|
119
|
+
* panel draws it only for a gift with a share link, as the native CTA's
|
|
120
|
+
* `hasOfferAttribute: shareUrl` gate does.
|
|
121
|
+
*/
|
|
122
|
+
ctaFor?: (offer: Offer) => boolean;
|
|
123
|
+
/** Called once the sheet has closed, whatever closed it: the scrim or `close()`. */
|
|
124
|
+
onClosed?: () => void;
|
|
95
125
|
}
|
|
96
126
|
export declare class GiftSheet {
|
|
97
127
|
#private;
|
|
@@ -119,7 +149,21 @@ export declare class GiftSheet {
|
|
|
119
149
|
* categories the sheet holds; the selected tab survives when it still exists.
|
|
120
150
|
*/
|
|
121
151
|
renderList(): void;
|
|
152
|
+
/**
|
|
153
|
+
* Pick the card for `index` from outside, as the keep-for-later panel does with the
|
|
154
|
+
* surface's selection so its CTA can act at once. Ignored when that card is not
|
|
155
|
+
* listed: the CTA must never name an offer the sheet does not show.
|
|
156
|
+
*/
|
|
157
|
+
pick(index: number): void;
|
|
122
158
|
open(opener?: HTMLElement): void;
|
|
159
|
+
/**
|
|
160
|
+
* Freeze the sheet while something it started finishes (the keep-for-later panel's
|
|
161
|
+
* wait before it closes): every card and the CTA are disabled and the scrim does
|
|
162
|
+
* nothing. The close control and Escape still work, as ways out. `true` restores.
|
|
163
|
+
*/
|
|
164
|
+
setInteractive(interactive: boolean): void;
|
|
165
|
+
/** True from `open()` until `close()`: whether the sheet is up, or on its way up. */
|
|
166
|
+
isOpen(): boolean;
|
|
123
167
|
close(): void;
|
|
124
168
|
destroy(): void;
|
|
125
169
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GiftSheet.d.ts","sourceRoot":"","sources":["../../src/ui/GiftSheet.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,UAAU,IAAI,KAAK,EAAE,MAAM,eAAe,CAAC;AAKzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAUvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D;;;;GAIG;AACH,eAAO,MAAM,cAAc,MAAM,CAAC;AAElC;;;;;GAKG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,CAM9C;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,GAAG,WAAW,CAqB1E;AAMD;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,CAAC,KAAK,GAAG,SAAS,CAAC,EAAE,GAAG,iBAAiB,EAAE,CAU3F;AAKD,MAAM,WAAW,gBAAgB;IAC/B,oEAAoE;IACpE,MAAM,EAAE,SAAS,KAAK,EAAE,CAAC;IACzB,yEAAyE;IACzE,MAAM,EAAE,MAAM,SAAS,MAAM,EAAE,CAAC;IAChC,4EAA4E;IAC5E,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,+EAA+E;IAC/E,MAAM,EAAE,MAAM,WAAW,GAAG,IAAI,CAAC;IACjC,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GAAG,IAAI;IAe1C,qFAAqF;IACrF,MAAM,IAAI,OAAO;IAIjB,KAAK,IAAI,IAAI;IA0Db,OAAO,IAAI,IAAI;CAahB"}
|
package/types/ui/GiftUnwrap.d.ts
CHANGED
|
@@ -47,6 +47,23 @@
|
|
|
47
47
|
* neither (see `api/models.ts`). Inventing either from list order or brand names would
|
|
48
48
|
* be a guess that looks like data, so both wait on a real field.
|
|
49
49
|
*
|
|
50
|
+
* ## Share designs (backend#659)
|
|
51
|
+
*
|
|
52
|
+
* `shareFromHeader` and `shareForLater` derive from the same `threeLightSteps` file this
|
|
53
|
+
* surface renders, so they are this surface plus a `share` design, not new surfaces:
|
|
54
|
+
*
|
|
55
|
+
* - `'header'`: a share control at the top right of screen 1, sharing the selection.
|
|
56
|
+
* `Encore` moves the × to the top left. A share leaves the user on the sheet.
|
|
57
|
+
* - `'forLater'`: the "Keep your gift for later" panel, a second `GiftSheet` over a
|
|
58
|
+
* scrim with the first {@link KEEP_PANEL_LIMIT} gifts and a "Share {gift}" CTA.
|
|
59
|
+
* `Encore` opens it from the ×, Escape and the backdrop; its own close (and Escape
|
|
60
|
+
* inside it) is the presentation's real close; the scrim returns to the sheet.
|
|
61
|
+
*
|
|
62
|
+
* Both emit `offerShare` (subscribe with `onShareEvent`) for the SELECTED offer, synchronously inside the click. The
|
|
63
|
+
* surface shares nothing itself: the link, the events and what a completed share does
|
|
64
|
+
* are `Encore`'s. The panel's cards report no impressions (the variant's
|
|
65
|
+
* `impressionProbe: none`); the rows already did.
|
|
66
|
+
*
|
|
50
67
|
* ## The reveal (see giftUnwrapStyles in styles.ts)
|
|
51
68
|
*
|
|
52
69
|
* Four elements, four tracks, one 1752ms timeline with the design's keyframe stops on
|
|
@@ -58,6 +75,19 @@ import type { OfferModel as Offer } from '../api/models';
|
|
|
58
75
|
import { type ButtonSlot } from './appearance';
|
|
59
76
|
import type { RewardSurface, RewardSurfaceEventMap } from './rewardSurface';
|
|
60
77
|
import { ImpressionGate } from './impressionGate';
|
|
78
|
+
/**
|
|
79
|
+
* The shared surface events plus the two only the share designs emit. Kept off
|
|
80
|
+
* `RewardSurfaceEventMap`, which the carousel implements too.
|
|
81
|
+
*/
|
|
82
|
+
export type GiftUnwrapEventMap = RewardSurfaceEventMap & {
|
|
83
|
+
/** Share this offer's link. Emitted synchronously inside the click. */
|
|
84
|
+
offerShare: {
|
|
85
|
+
offer: Offer;
|
|
86
|
+
index: number;
|
|
87
|
+
};
|
|
88
|
+
/** The keep-for-later panel's close, which is the presentation's real close. */
|
|
89
|
+
closeRequest: undefined;
|
|
90
|
+
};
|
|
61
91
|
/** How many gifts screen 1 shows as rows. The rest go behind "Show more gifts". */
|
|
62
92
|
export declare const UNWRAP_ROW_LIMIT = 3;
|
|
63
93
|
/**
|
|
@@ -66,6 +96,12 @@ export declare const UNWRAP_ROW_LIMIT = 3;
|
|
|
66
96
|
*/
|
|
67
97
|
export declare const UNWRAP_REVEAL_MS = 1752;
|
|
68
98
|
export type UnwrapScreen = 'pick' | 'ready';
|
|
99
|
+
/** Which "share for later" design this surface carries, if any. See the header. */
|
|
100
|
+
export type ShareDesign = 'header' | 'forLater';
|
|
101
|
+
/** How many gifts the keep-for-later panel lists: the variant's `limit: 5`. */
|
|
102
|
+
export declare const KEEP_PANEL_LIMIT = 5;
|
|
103
|
+
/** How long "Link copied" stays up. `Encore` closes `forLater` after the same wait. */
|
|
104
|
+
export declare const SHARE_NOTICE_MS = 1500;
|
|
69
105
|
/** The id on "Your gift is ready", which names the dialog while screen 2 is showing. */
|
|
70
106
|
export declare const UNWRAP_READY_TITLE_ID: string;
|
|
71
107
|
export interface GiftUnwrapComposeOptions {
|
|
@@ -76,6 +112,11 @@ export interface GiftUnwrapComposeOptions {
|
|
|
76
112
|
* screen the user is no longer on. A callback because the modal is Encore's.
|
|
77
113
|
*/
|
|
78
114
|
setLabelledBy?: (id: string) => void;
|
|
115
|
+
/**
|
|
116
|
+
* Called with the screen on every switch. The share designs hide the modal's × on the
|
|
117
|
+
* ready screen, whose Back takes the corner the × would otherwise share.
|
|
118
|
+
*/
|
|
119
|
+
onScreenChange?: (screen: UnwrapScreen) => void;
|
|
79
120
|
}
|
|
80
121
|
export interface GiftUnwrapOptions {
|
|
81
122
|
/**
|
|
@@ -97,11 +138,18 @@ export interface GiftUnwrapOptions {
|
|
|
97
138
|
* unarmed gate, which never fires.
|
|
98
139
|
*/
|
|
99
140
|
impressions?: ImpressionGate;
|
|
141
|
+
/** The "share for later" design to add, from the served variant. Absent: none. */
|
|
142
|
+
share?: ShareDesign;
|
|
100
143
|
}
|
|
101
144
|
export declare class GiftUnwrap implements RewardSurface {
|
|
102
145
|
#private;
|
|
103
146
|
constructor(offers: readonly Offer[], options?: GiftUnwrapOptions);
|
|
104
147
|
on<E extends keyof RewardSurfaceEventMap>(event: E, handler: (payload: RewardSurfaceEventMap[E]) => void): () => void;
|
|
148
|
+
/**
|
|
149
|
+
* The share designs' own events, off `on()` so its signature stays the one every
|
|
150
|
+
* `RewardSurface` shares (a union of surfaces must stay callable).
|
|
151
|
+
*/
|
|
152
|
+
onShareEvent<E extends 'offerShare' | 'closeRequest'>(event: E, handler: (payload: GiftUnwrapEventMap[E]) => void): () => void;
|
|
105
153
|
getTotalOffers(): number;
|
|
106
154
|
getCurrentIndex(): number;
|
|
107
155
|
getSelectedOffer(): Offer | undefined;
|
|
@@ -125,6 +173,28 @@ export declare class GiftUnwrap implements RewardSurface {
|
|
|
125
173
|
* {@link render} and the action block.
|
|
126
174
|
*/
|
|
127
175
|
compose(pickScreen: HTMLElement, options?: GiftUnwrapComposeOptions): HTMLElement;
|
|
176
|
+
/**
|
|
177
|
+
* Open the keep-for-later panel with the selection picked, so its CTA can share at
|
|
178
|
+
* once. Focus returns to `opener` when the scrim closes it.
|
|
179
|
+
*
|
|
180
|
+
* Returns false, opening nothing, on a surface without one, once the surface has left
|
|
181
|
+
* the page (a deferred claim swaps in the primer), and on the ready screen. That last
|
|
182
|
+
* one matters: the panel commits a SELECTION, and the ready screen is filled once on
|
|
183
|
+
* entry, so a pick made over it would leave the screen naming one gift while its CTA
|
|
184
|
+
* claims another. The variant's panel is only reachable from the list, too.
|
|
185
|
+
*/
|
|
186
|
+
openKeepForLater(opener?: HTMLElement): boolean;
|
|
187
|
+
isKeepForLaterOpen(): boolean;
|
|
188
|
+
/**
|
|
189
|
+
* Freeze the panel while a completed share waits to close the presentation, so a
|
|
190
|
+
* second gift cannot be picked or shared in that window. Its close still works.
|
|
191
|
+
*/
|
|
192
|
+
lockKeepForLater(): void;
|
|
193
|
+
/**
|
|
194
|
+
* Say `text` in the surface's status line, then clear it after {@link SHARE_NOTICE_MS}.
|
|
195
|
+
* A live region, so a screen reader announces it too.
|
|
196
|
+
*/
|
|
197
|
+
showShareNotice(text: string): void;
|
|
128
198
|
/**
|
|
129
199
|
* Select the offer at `index` into the full array. Out of range is IGNORED rather
|
|
130
200
|
* than clamped: claiming a neighbouring advertiser would hide a caller's bug behind a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GiftUnwrap.d.ts","sourceRoot":"","sources":["../../src/ui/GiftUnwrap.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"GiftUnwrap.d.ts","sourceRoot":"","sources":["../../src/ui/GiftUnwrap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwEG;AAEH,OAAO,KAAK,EAAE,UAAU,IAAI,KAAK,EAAE,MAAM,eAAe,CAAC;AAgBzD,OAAO,EAAqC,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAWlF,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAmB,MAAM,kBAAkB,CAAC;AAEnE;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,qBAAqB,GAAG;IACvD,uEAAuE;IAC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;OAGG;IACH,YAAY,CAAC,CAAC,SAAS,YAAY,GAAG,cAAc,EAClD,KAAK,EAAE,CAAC,EACR,OAAO,EAAE,CAAC,OAAO,EAAE,kBAAkB,CAAC,CAAC,CAAC,KAAK,IAAI,GAChD,MAAM,IAAI;IAIb,cAAc,IAAI,MAAM;IAIxB,eAAe,IAAI,MAAM;IAIzB,gBAAgB,IAAI,KAAK,GAAG,SAAS;IAIrC,mDAAmD;IACnD,YAAY,IAAI,OAAO;IAIvB,SAAS,IAAI,YAAY;IAMzB;;;OAGG;IACH,UAAU,IAAI,WAAW;IAazB;;;OAGG;IACH,MAAM,IAAI,WAAW;IA2BrB;;;;;OAKG;IACH,OAAO,CAAC,UAAU,EAAE,WAAW,EAAE,OAAO,GAAE,wBAA6B,GAAG,WAAW;IAsGrF;;;;;;;;;OASG;IACH,gBAAgB,CAAC,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO;IAc/C,kBAAkB,IAAI,OAAO;IAI7B;;;OAGG;IACH,gBAAgB,IAAI,IAAI;IAYxB;;;OAGG;IACH,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IA6EnC;;;;OAIG;IACH,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAahC,IAAI,IAAI,IAAI;IA8CZ;;;;OAIG;IACH,aAAa,IAAI,IAAI;IAerB;;;;;;OAMG;IACH,SAAS,IAAI,IAAI;IA+BjB,wEAAwE;IACxE,QAAQ,IAAI,IAAI;IAiMhB,SAAS,CAAC,MAAM,CAAC,EAAE,WAAW,GAAG,IAAI;IAKrC,UAAU,IAAI,IAAI;IAyDlB,OAAO,IAAI,IAAI;CAqChB"}
|
package/types/ui/OfferModal.d.ts
CHANGED
|
@@ -53,6 +53,21 @@ export interface OfferModalOptions {
|
|
|
53
53
|
* every surface derived from it. Sanitized — an unrecognised value is ignored.
|
|
54
54
|
*/
|
|
55
55
|
backgroundColor?: string;
|
|
56
|
+
/**
|
|
57
|
+
* Which top corner the × sits in. `'start'` puts it top left, for a composition that
|
|
58
|
+
* gives the top right to another control (the `shareFromHeader` share button).
|
|
59
|
+
* Defaults to `'end'`, where every other composition has it.
|
|
60
|
+
*/
|
|
61
|
+
closePosition?: 'start' | 'end';
|
|
62
|
+
/**
|
|
63
|
+
* Asked before the ×, Escape or a backdrop click dismisses. Return `true` to take the
|
|
64
|
+
* gesture over, and the modal then neither emits `close`/`backdropClick` nor hides.
|
|
65
|
+
* `shareForLater` uses it: every dismissal gesture opens the "keep your gift for
|
|
66
|
+
* later" panel until the panel is open, and the panel's own close is the real one. Absent, or returning `false`, every
|
|
67
|
+
* gesture dismisses as it always has. A throwing interceptor counts as `false`, so a
|
|
68
|
+
* bug in it can never trap the user on the sheet.
|
|
69
|
+
*/
|
|
70
|
+
interceptDismiss?: (gesture: 'close' | 'escape' | 'backdrop') => boolean;
|
|
56
71
|
}
|
|
57
72
|
export declare class OfferModal {
|
|
58
73
|
#private;
|
|
@@ -81,6 +96,15 @@ export declare class OfferModal {
|
|
|
81
96
|
* screen readers announce the dialog by what the user actually sees.
|
|
82
97
|
*/
|
|
83
98
|
setLabelledBy(id: string): void;
|
|
99
|
+
/**
|
|
100
|
+
* Hide or show the × while the sheet is up, for a screen that puts another control
|
|
101
|
+
* in its corner (`giftUnwrap`'s ready screen, whose Back sits top left). `hidden`
|
|
102
|
+
* rather than a style, so the focus trap skips it too. If it held focus, focus moves
|
|
103
|
+
* to the first control still in the dialog.
|
|
104
|
+
*/
|
|
105
|
+
setCloseButtonHidden(hidden: boolean): void;
|
|
106
|
+
/** The ×, while the sheet is up and has one. For returning focus to it. */
|
|
107
|
+
getCloseButton(): HTMLButtonElement | null;
|
|
84
108
|
/**
|
|
85
109
|
* Take the ×, backdrop-click and Escape away from a sheet built dismissible. One way
|
|
86
110
|
* only: a gate that must keep an exit opens dismissible, and applies the caller's
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OfferModal.d.ts","sourceRoot":"","sources":["../../src/ui/OfferModal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AAQ,GAAG,UAAU,KAAK,OAAO,CAAC;CAC1E;AAED,qBAAa,UAAU;;gBA4BT,KAAK,GAAE,cAAmB,EAAE,OAAO,GAAE,iBAAsB;IAevE;;OAEG;IACH,IAAI,IAAI,IAAI;IAwCZ;;OAEG;IACH,IAAI,IAAI,IAAI;IA8CZ;;;;OAIG;IACH,kBAAkB,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,GAAG,MAAM,IAAI;IAYnE;;OAEG;IACH,SAAS,IAAI,OAAO;IAIpB;;;;OAIG;IACH,aAAa,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAI/B;;;;;OAKG;IACH,oBAAoB,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI;IAS3C,2EAA2E;IAC3E,cAAc,IAAI,iBAAiB,GAAG,IAAI;IAe1C;;;;OAIG;IACH,gBAAgB,IAAI,IAAI;IAiBxB;;OAEG;IACH,UAAU,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI;IA4BtC;;OAEG;IACH,EAAE,CAAC,CAAC,SAAS,MAAM,aAAa,EAC9B,KAAK,EAAE,CAAC,EACR,OAAO,EAAE,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,IAAI,GAC3C,MAAM,IAAI;IA8Kb;;OAEG;IACH,OAAO,IAAI,IAAI;CAoBhB"}
|
|
@@ -52,4 +52,10 @@ export declare const CHECK_CIRCLE_SVG: string;
|
|
|
52
52
|
export declare const RADIO_SELECTED_SVG: string;
|
|
53
53
|
/** `icon-back-chevron.svg`, 20×20. */
|
|
54
54
|
export declare const BACK_CHEVRON_SVG: string;
|
|
55
|
+
/**
|
|
56
|
+
* The share glyph, SF Symbols' `arrowshape.turn.up.right` (the name `shareFromHeader`
|
|
57
|
+
* uses): the unsuffixed, hollow variant, so stroked rather than filled, as Android
|
|
58
|
+
* draws it.
|
|
59
|
+
*/
|
|
60
|
+
export declare const SHARE_ARROW_SVG: string;
|
|
55
61
|
//# sourceMappingURL=giftUnwrapArt.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"giftUnwrapArt.d.ts","sourceRoot":"","sources":["../../src/ui/giftUnwrapArt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAaH;;;GAGG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAyCrC;AAED;;;GAGG;AACH,wBAAgB,cAAc,IAAI,MAAM,CA8BvC;AAED,oFAAoF;AACpF,wBAAgB,eAAe,IAAI,MAAM,CAoBxC;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAWrC;AAED,+CAA+C;AAC/C,eAAO,MAAM,gBAAgB,QAGnB,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,QAIrB,CAAC;AAEX,sCAAsC;AACtC,eAAO,MAAM,gBAAgB,QAGnB,CAAC"}
|
|
1
|
+
{"version":3,"file":"giftUnwrapArt.d.ts","sourceRoot":"","sources":["../../src/ui/giftUnwrapArt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAaH;;;GAGG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAyCrC;AAED;;;GAGG;AACH,wBAAgB,cAAc,IAAI,MAAM,CA8BvC;AAED,oFAAoF;AACpF,wBAAgB,eAAe,IAAI,MAAM,CAoBxC;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAWrC;AAED,+CAA+C;AAC/C,eAAO,MAAM,gBAAgB,QAGnB,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,QAIrB,CAAC;AAEX,sCAAsC;AACtC,eAAO,MAAM,gBAAgB,QAGnB,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,eAAe,QAIlB,CAAC"}
|
|
@@ -54,4 +54,24 @@ export declare function unwrapClaimLabel(offer: Offer): string;
|
|
|
54
54
|
* language keeps its own words.
|
|
55
55
|
*/
|
|
56
56
|
export declare function unwrapReadyBullets(offer: Offer): string[];
|
|
57
|
+
/**
|
|
58
|
+
* The "share for later" designs' own words (backend#659: `shareFromHeader`,
|
|
59
|
+
* `shareForLater`). The panel's title and line are the variant file's, verbatim, the
|
|
60
|
+
* newline included.
|
|
61
|
+
*/
|
|
62
|
+
export declare const SHARE_COPY: {
|
|
63
|
+
readonly panelTitle: "Keep your gift for later";
|
|
64
|
+
readonly panelSubtitle: "Choose any offer below.\nShare the link to pick it later.";
|
|
65
|
+
/** The panel's close control. It closes the whole presentation, so it says so. */
|
|
66
|
+
readonly panelCloseLabel: "Close";
|
|
67
|
+
/** Shown once the link is on the clipboard, the web route where no sheet confirms it. */
|
|
68
|
+
readonly copied: "Link copied";
|
|
69
|
+
/** Shown when neither the share sheet nor the clipboard would take the link. */
|
|
70
|
+
readonly unavailable: "Couldn’t share the link";
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* "Share {advertiser}": the panel's CTA (the variant's `Share ${selectedAdvertiserName}`)
|
|
74
|
+
* and the header control's accessible name. Unnamed, it shares "this gift".
|
|
75
|
+
*/
|
|
76
|
+
export declare function shareLabel(offer: Offer | undefined): string;
|
|
57
77
|
//# sourceMappingURL=giftUnwrapCopy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"giftUnwrapCopy.d.ts","sourceRoot":"","sources":["../../src/ui/giftUnwrapCopy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,UAAU,IAAI,KAAK,EAAE,MAAM,eAAe,CAAC;AAIzD,eAAO,MAAM,WAAW;IACtB,0DAA0D;;IAE1D,uEAAuE;;IAEvE;yDACqD;;IAErD,kEAAkE;;;CAG1D,CAAC;AAEX;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAKvD;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAGrD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,EAAE,CAiBzD"}
|
|
1
|
+
{"version":3,"file":"giftUnwrapCopy.d.ts","sourceRoot":"","sources":["../../src/ui/giftUnwrapCopy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,UAAU,IAAI,KAAK,EAAE,MAAM,eAAe,CAAC;AAIzD,eAAO,MAAM,WAAW;IACtB,0DAA0D;;IAE1D,uEAAuE;;IAEvE;yDACqD;;IAErD,kEAAkE;;;CAG1D,CAAC;AAEX;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAKvD;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAGrD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,EAAE,CAiBzD;AAED;;;;GAIG;AACH,eAAO,MAAM,UAAU;;;IAGrB,kFAAkF;;IAElF,yFAAyF;;IAEzF,gFAAgF;;CAExE,CAAC;AAEX;;;GAGG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,KAAK,GAAG,SAAS,GAAG,MAAM,CAG3D"}
|
package/types/ui/styles.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/ui/styles.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAaH,eAAO,MAAM,OAAO;;;CAGV,CAAC;AAGX,eAAO,MAAM,WAAW;;;;CAId,CAAC;AAEX;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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