@encorekit/web-sdk 2.2.1 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (269) hide show
  1. package/README.md +66 -1
  2. package/dist/cjs/index.cjs +1 -1
  3. package/dist/cjs/index.cjs.map +1 -1
  4. package/dist/cjs/preview.cjs +2 -0
  5. package/dist/cjs/preview.cjs.map +1 -0
  6. package/dist/cjs/react.cjs +1 -1
  7. package/dist/cjs/react.cjs.map +1 -1
  8. package/dist/esm/chunks/ClaimReminder-DFyrm5bJ.js +2 -0
  9. package/dist/esm/chunks/ClaimReminder-DFyrm5bJ.js.map +1 -0
  10. package/dist/esm/chunks/GiftsButton-B0lVB463.js +2 -0
  11. package/dist/esm/chunks/GiftsButton-B0lVB463.js.map +1 -0
  12. package/dist/esm/chunks/TriggerHost-CNTiNrTH.js +2 -0
  13. package/dist/esm/chunks/TriggerHost-CNTiNrTH.js.map +1 -0
  14. package/dist/esm/chunks/autoPops-CngtK_R0.js +2 -0
  15. package/dist/esm/chunks/autoPops-CngtK_R0.js.map +1 -0
  16. package/dist/esm/chunks/customClaim-B4uj-aOc.js +2 -0
  17. package/dist/esm/chunks/customClaim-B4uj-aOc.js.map +1 -0
  18. package/dist/esm/chunks/eligibility-BY7fL8Ve.js +2 -0
  19. package/dist/esm/chunks/eligibility-BY7fL8Ve.js.map +1 -0
  20. package/dist/esm/chunks/index-CaBSqauy.js +2 -0
  21. package/dist/esm/chunks/index-CaBSqauy.js.map +1 -0
  22. package/dist/esm/chunks/lookValues-B9z2VWpH.js +2 -0
  23. package/dist/esm/chunks/lookValues-B9z2VWpH.js.map +1 -0
  24. package/dist/esm/chunks/sduiView-Ds7QtFId.js +2 -0
  25. package/dist/esm/chunks/sduiView-Ds7QtFId.js.map +1 -0
  26. package/dist/esm/chunks/spot-DkKMLpB-.js +2 -0
  27. package/dist/esm/chunks/spot-DkKMLpB-.js.map +1 -0
  28. package/dist/esm/chunks/template-B9p4CbPD.js +2 -0
  29. package/dist/esm/chunks/template-B9p4CbPD.js.map +1 -0
  30. package/dist/esm/chunks/textSlots-BnwxUg9V.js +2 -0
  31. package/dist/esm/chunks/textSlots-BnwxUg9V.js.map +1 -0
  32. package/dist/esm/chunks/timers-Bva4yoGM.js +2 -0
  33. package/dist/esm/chunks/timers-Bva4yoGM.js.map +1 -0
  34. package/dist/esm/index.js +1 -1
  35. package/dist/esm/index.js.map +1 -1
  36. package/dist/esm/preview.js +2 -0
  37. package/dist/esm/preview.js.map +1 -0
  38. package/dist/esm/react.js +1 -1
  39. package/dist/esm/react.js.map +1 -1
  40. package/dist/umd/encore.min.js +1 -1
  41. package/dist/umd/encore.min.js.map +1 -1
  42. package/package.json +9 -1
  43. package/types/analytics/DiagnosticsOutbox.d.ts +1 -0
  44. package/types/analytics/DiagnosticsOutbox.d.ts.map +1 -1
  45. package/types/analytics/events.d.ts +108 -8
  46. package/types/analytics/events.d.ts.map +1 -1
  47. package/types/analytics/models.d.ts +2 -0
  48. package/types/analytics/models.d.ts.map +1 -1
  49. package/types/analytics/transport.d.ts +6 -0
  50. package/types/analytics/transport.d.ts.map +1 -1
  51. package/types/api/APIClient.d.ts +70 -33
  52. package/types/api/APIClient.d.ts.map +1 -1
  53. package/types/api/contract.d.ts +4 -1
  54. package/types/api/contract.d.ts.map +1 -1
  55. package/types/api/generated/types.d.ts +994 -17
  56. package/types/api/generated/types.d.ts.map +1 -1
  57. package/types/api/models.d.ts +29 -8
  58. package/types/api/models.d.ts.map +1 -1
  59. package/types/api/offerBuilder.d.ts +51 -0
  60. package/types/api/offerBuilder.d.ts.map +1 -0
  61. package/types/core/Configuration.d.ts +9 -0
  62. package/types/core/Configuration.d.ts.map +1 -1
  63. package/types/core/Encore.d.ts +145 -3
  64. package/types/core/Encore.d.ts.map +1 -1
  65. package/types/core/OfferManager.d.ts +27 -5
  66. package/types/core/OfferManager.d.ts.map +1 -1
  67. package/types/core/PlacementBuilder.d.ts +6 -1
  68. package/types/core/PlacementBuilder.d.ts.map +1 -1
  69. package/types/core/SignalManager.d.ts.map +1 -1
  70. package/types/core/StorageManager.d.ts +3 -2
  71. package/types/core/StorageManager.d.ts.map +1 -1
  72. package/types/core/StrictUnlockReconciler.d.ts +1 -1
  73. package/types/core/StrictUnlockReconciler.d.ts.map +1 -1
  74. package/types/core/claimHandle.d.ts +44 -0
  75. package/types/core/claimHandle.d.ts.map +1 -0
  76. package/types/core/claimLog.d.ts +102 -0
  77. package/types/core/claimLog.d.ts.map +1 -0
  78. package/types/core/claimRefusal.d.ts +3 -0
  79. package/types/core/claimRefusal.d.ts.map +1 -0
  80. package/types/core/claimScreenVariant.d.ts +3 -0
  81. package/types/core/claimScreenVariant.d.ts.map +1 -0
  82. package/types/core/claimStatusCheck.d.ts +62 -0
  83. package/types/core/claimStatusCheck.d.ts.map +1 -0
  84. package/types/core/giftVariant.d.ts +5 -0
  85. package/types/core/giftVariant.d.ts.map +1 -1
  86. package/types/core/hostDisplay.d.ts +9 -2
  87. package/types/core/hostDisplay.d.ts.map +1 -1
  88. package/types/core/sduiVariables.d.ts +20 -0
  89. package/types/core/sduiVariables.d.ts.map +1 -0
  90. package/types/core/strings.d.ts +114 -0
  91. package/types/core/strings.d.ts.map +1 -0
  92. package/types/core/unlockCode.d.ts +12 -2
  93. package/types/core/unlockCode.d.ts.map +1 -1
  94. package/types/core/userKeys.d.ts +7 -0
  95. package/types/core/userKeys.d.ts.map +1 -0
  96. package/types/core/version.d.ts +1 -1
  97. package/types/experiments/ExposureOutbox.d.ts +1 -0
  98. package/types/experiments/ExposureOutbox.d.ts.map +1 -1
  99. package/types/preview.d.ts +51 -0
  100. package/types/preview.d.ts.map +1 -0
  101. package/types/react.d.ts +53 -1
  102. package/types/react.d.ts.map +1 -1
  103. package/types/sdui/actions.d.ts +93 -0
  104. package/types/sdui/actions.d.ts.map +1 -0
  105. package/types/sdui/bindings.d.ts +63 -0
  106. package/types/sdui/bindings.d.ts.map +1 -0
  107. package/types/sdui/compile.d.ts +88 -0
  108. package/types/sdui/compile.d.ts.map +1 -0
  109. package/types/sdui/conditions.d.ts +22 -0
  110. package/types/sdui/conditions.d.ts.map +1 -0
  111. package/types/sdui/context.d.ts +132 -0
  112. package/types/sdui/context.d.ts.map +1 -0
  113. package/types/sdui/countdown.d.ts +31 -0
  114. package/types/sdui/countdown.d.ts.map +1 -0
  115. package/types/sdui/decode.d.ts +35 -0
  116. package/types/sdui/decode.d.ts.map +1 -0
  117. package/types/sdui/deps.d.ts +43 -0
  118. package/types/sdui/deps.d.ts.map +1 -0
  119. package/types/sdui/dominantColor.d.ts +24 -0
  120. package/types/sdui/dominantColor.d.ts.map +1 -0
  121. package/types/sdui/elements/confetti.d.ts +38 -0
  122. package/types/sdui/elements/confetti.d.ts.map +1 -0
  123. package/types/sdui/elements/content.d.ts +27 -0
  124. package/types/sdui/elements/content.d.ts.map +1 -0
  125. package/types/sdui/elements/interactive.d.ts +48 -0
  126. package/types/sdui/elements/interactive.d.ts.map +1 -0
  127. package/types/sdui/elements/layout.d.ts +41 -0
  128. package/types/sdui/elements/layout.d.ts.map +1 -0
  129. package/types/sdui/elements/marquee.d.ts +17 -0
  130. package/types/sdui/elements/marquee.d.ts.map +1 -0
  131. package/types/sdui/elements/progress.d.ts +10 -0
  132. package/types/sdui/elements/progress.d.ts.map +1 -0
  133. package/types/sdui/elements/shared.d.ts +138 -0
  134. package/types/sdui/elements/shared.d.ts.map +1 -0
  135. package/types/sdui/elements/symbols.d.ts +22 -0
  136. package/types/sdui/elements/symbols.d.ts.map +1 -0
  137. package/types/sdui/elements/triggerText.d.ts +55 -0
  138. package/types/sdui/elements/triggerText.d.ts.map +1 -0
  139. package/types/sdui/host.d.ts +274 -0
  140. package/types/sdui/host.d.ts.map +1 -0
  141. package/types/sdui/inlineMarkup.d.ts +22 -0
  142. package/types/sdui/inlineMarkup.d.ts.map +1 -0
  143. package/types/sdui/lookValues.d.ts +50 -0
  144. package/types/sdui/lookValues.d.ts.map +1 -0
  145. package/types/sdui/model.d.ts +130 -0
  146. package/types/sdui/model.d.ts.map +1 -0
  147. package/types/sdui/motion.d.ts +37 -0
  148. package/types/sdui/motion.d.ts.map +1 -0
  149. package/types/sdui/precheck.d.ts +94 -0
  150. package/types/sdui/precheck.d.ts.map +1 -0
  151. package/types/sdui/scrollMath.d.ts +32 -0
  152. package/types/sdui/scrollMath.d.ts.map +1 -0
  153. package/types/sdui/style.d.ts +99 -0
  154. package/types/sdui/style.d.ts.map +1 -0
  155. package/types/sdui/triggerKit.d.ts +24 -0
  156. package/types/sdui/triggerKit.d.ts.map +1 -0
  157. package/types/sdui/unrunnable.d.ts +11 -0
  158. package/types/sdui/unrunnable.d.ts.map +1 -0
  159. package/types/sdui/vocabulary.d.ts +119 -0
  160. package/types/sdui/vocabulary.d.ts.map +1 -0
  161. package/types/triggers/claimReminder/ClaimReminder.d.ts +65 -0
  162. package/types/triggers/claimReminder/ClaimReminder.d.ts.map +1 -0
  163. package/types/triggers/claimReminder/bindings.d.ts +40 -0
  164. package/types/triggers/claimReminder/bindings.d.ts.map +1 -0
  165. package/types/triggers/claimReminder/config.d.ts +56 -0
  166. package/types/triggers/claimReminder/config.d.ts.map +1 -0
  167. package/types/triggers/claimReminder/eligibility.d.ts +37 -0
  168. package/types/triggers/claimReminder/eligibility.d.ts.map +1 -0
  169. package/types/triggers/claimReminder/servedWindow.d.ts +15 -0
  170. package/types/triggers/claimReminder/servedWindow.d.ts.map +1 -0
  171. package/types/triggers/claimReminder/source.d.ts +29 -0
  172. package/types/triggers/claimReminder/source.d.ts.map +1 -0
  173. package/types/triggers/giftsButton/GiftsButton.d.ts +60 -0
  174. package/types/triggers/giftsButton/GiftsButton.d.ts.map +1 -0
  175. package/types/triggers/giftsButton/config.d.ts +53 -0
  176. package/types/triggers/giftsButton/config.d.ts.map +1 -0
  177. package/types/triggers/giftsButton/spot.d.ts +54 -0
  178. package/types/triggers/giftsButton/spot.d.ts.map +1 -0
  179. package/types/triggers/host/TriggerHost.d.ts +127 -0
  180. package/types/triggers/host/TriggerHost.d.ts.map +1 -0
  181. package/types/triggers/host/autoPops.d.ts +16 -0
  182. package/types/triggers/host/autoPops.d.ts.map +1 -0
  183. package/types/triggers/host/configCache.d.ts +29 -0
  184. package/types/triggers/host/configCache.d.ts.map +1 -0
  185. package/types/triggers/host/customClaim.d.ts +85 -0
  186. package/types/triggers/host/customClaim.d.ts.map +1 -0
  187. package/types/triggers/host/dismissStore.d.ts +37 -0
  188. package/types/triggers/host/dismissStore.d.ts.map +1 -0
  189. package/types/triggers/host/readThrottle.d.ts +15 -0
  190. package/types/triggers/host/readThrottle.d.ts.map +1 -0
  191. package/types/triggers/host/registry.d.ts +17 -0
  192. package/types/triggers/host/registry.d.ts.map +1 -0
  193. package/types/triggers/host/sduiView.d.ts +31 -0
  194. package/types/triggers/host/sduiView.d.ts.map +1 -0
  195. package/types/triggers/host/template.d.ts +28 -0
  196. package/types/triggers/host/template.d.ts.map +1 -0
  197. package/types/triggers/host/textSlots.d.ts +35 -0
  198. package/types/triggers/host/textSlots.d.ts.map +1 -0
  199. package/types/triggers/host/theme.d.ts +87 -0
  200. package/types/triggers/host/theme.d.ts.map +1 -0
  201. package/types/triggers/host/timers.d.ts +11 -0
  202. package/types/triggers/host/timers.d.ts.map +1 -0
  203. package/types/triggers/host/types.d.ts +278 -0
  204. package/types/triggers/host/types.d.ts.map +1 -0
  205. package/types/triggers/host/wire.d.ts +55 -0
  206. package/types/triggers/host/wire.d.ts.map +1 -0
  207. package/types/triggers/preview.d.ts +78 -0
  208. package/types/triggers/preview.d.ts.map +1 -0
  209. package/types/triggers/request.d.ts +53 -0
  210. package/types/triggers/request.d.ts.map +1 -0
  211. package/types/types.d.ts +420 -4
  212. package/types/types.d.ts.map +1 -1
  213. package/types/ui/ClaimScreen.d.ts +62 -0
  214. package/types/ui/ClaimScreen.d.ts.map +1 -0
  215. package/types/ui/CodeUnlock.d.ts +26 -2
  216. package/types/ui/CodeUnlock.d.ts.map +1 -1
  217. package/types/ui/GiftHero.d.ts.map +1 -1
  218. package/types/ui/GiftList.d.ts.map +1 -1
  219. package/types/ui/GiftPicker.d.ts.map +1 -1
  220. package/types/ui/GiftPickerHero.d.ts.map +1 -1
  221. package/types/ui/GiftReveal.d.ts.map +1 -1
  222. package/types/ui/GiftSheet.d.ts +5 -5
  223. package/types/ui/GiftSheet.d.ts.map +1 -1
  224. package/types/ui/GiftUnwrap.d.ts.map +1 -1
  225. package/types/ui/OfferCard.d.ts.map +1 -1
  226. package/types/ui/OfferCarousel.d.ts.map +1 -1
  227. package/types/ui/OfferModal.d.ts +31 -6
  228. package/types/ui/OfferModal.d.ts.map +1 -1
  229. package/types/ui/PrimerScreen.d.ts +2 -0
  230. package/types/ui/PrimerScreen.d.ts.map +1 -1
  231. package/types/ui/RedemptionScreen.d.ts +5 -0
  232. package/types/ui/RedemptionScreen.d.ts.map +1 -1
  233. package/types/ui/RewardActions.d.ts.map +1 -1
  234. package/types/ui/RewardCard.d.ts.map +1 -1
  235. package/types/ui/SduiRewardSurface.d.ts +145 -0
  236. package/types/ui/SduiRewardSurface.d.ts.map +1 -0
  237. package/types/ui/Tooltip.d.ts.map +1 -1
  238. package/types/ui/brandComponents.d.ts.map +1 -1
  239. package/types/ui/brandTint.d.ts.map +1 -1
  240. package/types/ui/colorScheme.d.ts +15 -0
  241. package/types/ui/colorScheme.d.ts.map +1 -0
  242. package/types/ui/covered.d.ts +12 -0
  243. package/types/ui/covered.d.ts.map +1 -0
  244. package/types/ui/giftCategoryGroups.d.ts +13 -0
  245. package/types/ui/giftCategoryGroups.d.ts.map +1 -1
  246. package/types/ui/giftCopy.d.ts +14 -9
  247. package/types/ui/giftCopy.d.ts.map +1 -1
  248. package/types/ui/giftUnwrapCopy.d.ts.map +1 -1
  249. package/types/ui/imageURL.d.ts +44 -0
  250. package/types/ui/imageURL.d.ts.map +1 -0
  251. package/types/ui/impressionGate.d.ts +9 -0
  252. package/types/ui/impressionGate.d.ts.map +1 -1
  253. package/types/ui/offerBadge.d.ts.map +1 -1
  254. package/types/ui/rewardSurface.d.ts +11 -1
  255. package/types/ui/rewardSurface.d.ts.map +1 -1
  256. package/types/ui/sduiTheme.d.ts +48 -0
  257. package/types/ui/sduiTheme.d.ts.map +1 -0
  258. package/types/ui/sheetDetents.d.ts +28 -0
  259. package/types/ui/sheetDetents.d.ts.map +1 -0
  260. package/types/ui/styles.d.ts +11 -8
  261. package/types/ui/styles.d.ts.map +1 -1
  262. package/types/ui/termsLine.d.ts +3 -3
  263. package/types/ui/termsLine.d.ts.map +1 -1
  264. package/types/ui/toast.d.ts +11 -0
  265. package/types/ui/toast.d.ts.map +1 -0
  266. package/types/utils/logger.d.ts +10 -0
  267. package/types/utils/logger.d.ts.map +1 -1
  268. package/types/utils/text.d.ts +17 -0
  269. package/types/utils/text.d.ts.map +1 -1
package/types/types.d.ts CHANGED
@@ -50,8 +50,28 @@ export interface UserAttributes {
50
50
  countryCode?: string;
51
51
  latitude?: string;
52
52
  longitude?: string;
53
+ /**
54
+ * The user's age in whole years, 0 to 120. If you hold only a range, send its lowest end
55
+ * (`13-17` is sent as 13); a fractional age is floored (15.5 is sent as 15). A user under 18
56
+ * is still served offers, from age-appropriate inventory only and with no per-user
57
+ * personalization. Anything else is dropped (logged). Set `age` or `dateOfBirth`,
58
+ * whichever you have. `age` is sent only on the page load you set it and is not saved,
59
+ * so pass `dateOfBirth`, or set `age` on every load.
60
+ */
61
+ age?: number;
62
+ /**
63
+ * The user's date of birth, `YYYY-MM-DD`. The SDK turns it into an age in the browser
64
+ * each time it sends attributes, in whole years, and never sends the date itself. If
65
+ * `age` is set too, the lower of the two is sent. An unreadable or future date gives
66
+ * no age.
67
+ */
53
68
  dateOfBirth?: string;
54
69
  gender?: string;
70
+ /**
71
+ * @deprecated Call `Encore.setLanguage(tag)` instead; this field is removed in the
72
+ * next major version. A value set here is forwarded to `setLanguage()` (with one
73
+ * console warning per page load) and is not kept or sent as an attribute.
74
+ */
55
75
  language?: string;
56
76
  subscriptionTier?: string;
57
77
  monthsSubscribed?: string;
@@ -74,7 +94,14 @@ export type NotGrantedReason = 'userClosedModal' | 'userClickedOutside' | 'userD
74
94
  * error because it is one specific, always-the-same integration mistake with one
75
95
  * fix, and it is what iOS reports for the identical condition.
76
96
  */
77
- | 'notConfigured' | {
97
+ | 'notConfigured'
98
+ /**
99
+ * The user tapped Claim and the server refused it because this user already
100
+ * completed this offer (409 `offerAlreadyCompleted`). An expected outcome, not an error,
101
+ * so it is not sent to error tracking. Nothing is granted, and the offer is
102
+ * not shown again for the rest of the session.
103
+ */
104
+ | 'alreadyCompleted' | {
78
105
  type: 'error';
79
106
  error: EncoreError;
80
107
  };
@@ -135,6 +162,30 @@ export interface AppearanceConfig {
135
162
  textColor?: string;
136
163
  /** Sets `--encore-primary-color` — focus rings, links, the churn CTA. */
137
164
  accentColor?: string;
165
+ /**
166
+ * Triggers only, for now. Secondary text on a trigger (subtitles, the countdown's
167
+ * units, the close button). Unset: the text colour at the look's own opacity.
168
+ */
169
+ secondaryTextColor?: string;
170
+ /** Triggers only, for now. The unfilled part of a trigger's progress bar. Unset: the text colour, faint. */
171
+ trackColor?: string;
172
+ /**
173
+ * Triggers only, for now. The second colour of a look's background gradient (the
174
+ * featured Claim Reminder runs from `backgroundColor` to this). Unset: the background,
175
+ * so the card is solid.
176
+ */
177
+ backgroundEndColor?: string;
178
+ /**
179
+ * Triggers only, for now. Light or dark. `system` follows the device. Unset: the
180
+ * app's saved mode from the portal, else dark.
181
+ */
182
+ colorScheme?: 'system' | 'light' | 'dark';
183
+ /**
184
+ * Triggers only, for now. Text and icons drawn on the accent colour (the pill's
185
+ * label, the banner's button). Unset: the trigger's background colour when it reads on
186
+ * the accent (at least 3:1), else black or white, whichever reads.
187
+ */
188
+ onAccentColor?: string;
138
189
  /**
139
190
  * The modal container's background, on the modal element only. Narrower than
140
191
  * {@link backgroundColor}, which also moves every surface derived from it — use this
@@ -172,6 +223,73 @@ export interface AppearanceConfig {
172
223
  dotColor?: string;
173
224
  /** Active-page colour for the same indicator. See {@link AppearanceConfig.dotColor}. */
174
225
  dotActiveColor?: string;
226
+ /**
227
+ * The `codeUnlock` landing page's look: fonts, colours, the button, the header logo
228
+ * and the "How it works" icons. Ignored by every other surface. See
229
+ * {@link CodeUnlockAppearance}.
230
+ */
231
+ codeUnlock?: CodeUnlockAppearance;
232
+ }
233
+ /**
234
+ * How the `codeUnlock` landing page looks, for a publisher whose page should wear its
235
+ * own brand. EVERY FIELD IS OPTIONAL, and a field left out keeps the default look.
236
+ *
237
+ * The colours and heading font carry on to the offers once the code is accepted, so the
238
+ * page keeps one look across the unlock.
239
+ *
240
+ * Colours and font stacks go through the same allow-list as the rest of
241
+ * {@link AppearanceConfig}: a value it refuses is dropped with a warning and that one
242
+ * field keeps its default. Images must be absolute https URLs (http only on localhost);
243
+ * an image that is refused or fails to load keeps what it replaced.
244
+ *
245
+ * Fonts are not loaded by the SDK. Declare them on the page (`@font-face`) and name them
246
+ * here.
247
+ */
248
+ export interface CodeUnlockAppearance {
249
+ /** The page's body text, as a CSS font stack. */
250
+ fontFamily?: string;
251
+ /** The headings, the button and the step titles, as a CSS font stack. */
252
+ headingFontFamily?: string;
253
+ /**
254
+ * The weight of everything in `headingFontFamily`: the headings, the buttons and the
255
+ * step titles. A keyword or a number from 1 to 1000.
256
+ */
257
+ headingFontWeight?: string | number;
258
+ /** The headings and the main text. */
259
+ textColor?: string;
260
+ /** The secondary text: the line under the heading, the notes and the step details. */
261
+ mutedTextColor?: string;
262
+ /** The field's focus ring, the "unlocked" badge and the selected offer. */
263
+ accentColor?: string;
264
+ /** The light tint behind the page's top corner and the badge. */
265
+ tintColor?: string;
266
+ /** A plain page background, in place of the default tinted wash. */
267
+ backgroundColor?: string;
268
+ /**
269
+ * The code button's fill: one colour, or two for a left-to-right gradient
270
+ * (`['#00BDF4', '#00CFA7']`). A refused colour drops the whole gradient. The claim
271
+ * button on the unlocked offers takes the same fill, text colour and font.
272
+ */
273
+ ctaBackground?: string | readonly [string, string];
274
+ /** The code button's text colour. */
275
+ ctaTextColor?: string;
276
+ /** The code button's label, in place of "Unlock my rewards". Blank is absent. */
277
+ ctaText?: string;
278
+ /** `'pill'` rounds the code field and its button fully. Default `'rounded'`. */
279
+ shape?: 'rounded' | 'pill';
280
+ /**
281
+ * A logo image for the page's header, in place of the app's icon and name. Shown at
282
+ * 32px tall, at its own proportions.
283
+ */
284
+ logoUrl?: string;
285
+ /** The logo's alt text. Defaults to the app's name. */
286
+ logoAlt?: string;
287
+ /**
288
+ * An icon for each "How it works" step, in order, in place of its number. With any
289
+ * icon, each step is a card: the icon beside its text below 700px, over it and centred
290
+ * from 700px. A missing or failed icon shows that step's number.
291
+ */
292
+ stepIconUrls?: readonly string[];
175
293
  }
176
294
  /**
177
295
  * WHY a placement presents — Encore's platform-wide use-case dimension, and the ONLY
@@ -200,6 +318,25 @@ export interface AppearanceConfig {
200
318
  * allow-list this is paired with.
201
319
  */
202
320
  export type UseCase = 'reduceChurn' | 'rewardUsers';
321
+ /**
322
+ * Your app's own prize for trying an offer at a placement, the same shape as iOS's and
323
+ * Android's `PublisherReward`, so one integration passes one value everywhere.
324
+ *
325
+ * 🔴 On web the prize is accepted and passed to the sheet, but not yet drawn, sent or
326
+ * granted: the web sheet has no reward-for-trying prompt, and nothing leaves the device.
327
+ * Grant your prize from the sheet's result (`show()`, or a trigger's `onResult`) or
328
+ * from Encore's `offer_completed` webhook.
329
+ */
330
+ export interface PublisherReward {
331
+ /** Your id for the prize. */
332
+ id: string;
333
+ /** What the user gets, such as "50 coins". */
334
+ title: string;
335
+ /** A line under the title. */
336
+ detail?: string;
337
+ /** An http(s) image of the prize. */
338
+ iconUrl?: string;
339
+ }
203
340
  /**
204
341
  * Everything a placement can be configured with. One flat shape: the composition is
205
342
  * DERIVED from {@link useCase}, never selected separately.
@@ -254,10 +391,12 @@ export interface PlacementOptions {
254
391
  * On the reward composition the "No thanks" button becomes "Next offer"
255
392
  * rather than disappearing — see `RewardActionsOptions.secondary`. A button
256
393
  * reading "No thanks" on a sheet with no way out is a control that lies.
394
+ * A served variant's own close controls are hidden until the user claims.
257
395
  *
258
- * The `codeUnlock` code screen ignores `false` while it is showing: its × and
259
- * Escape stay, so a code that is not accepted can never trap the user on a
260
- * full-screen page. The option applies from the moment the offers show.
396
+ * The `codeUnlock` code screen follows it too: with `false` it has no ×, and
397
+ * Escape and a backdrop tap do nothing, because on the hosted page it is the
398
+ * page the user landed on. A code that is not accepted keeps the user there
399
+ * with an error and the field editable, never a dead end.
261
400
  */
262
401
  dismissible?: boolean;
263
402
  /**
@@ -295,6 +434,31 @@ export interface PlacementOptions {
295
434
  * every other surface.
296
435
  */
297
436
  unlockValueLabel?: string;
437
+ /**
438
+ * An image shown in place of the `codeUnlock` code screen's drawn value card, such as
439
+ * the gift card from the publisher's own email. The heading and the "Unlock up to
440
+ * {amount}" line under it are unchanged. The image is shown as the publisher made it:
441
+ * the SDK does not tilt or animate it, and scales it to the card's width uncropped.
442
+ *
443
+ * It is read by screen readers. Its alt text is `unlockCardImageAlt` when set, else
444
+ * "{amount} gift card" from `unlockValueLabel`, else "Gift card".
445
+ *
446
+ * Must be an absolute https URL (http only on localhost). Any other URL, or an image
447
+ * that fails to load, shows the drawn card instead. Ignored by every other surface.
448
+ */
449
+ unlockCardImageUrl?: string;
450
+ /**
451
+ * Alt text for `unlockCardImageUrl`, in place of the one derived from
452
+ * `unlockValueLabel`: say what the image shows, such as "$45 gift card value, on us".
453
+ * Trimmed; blank or whitespace-only counts as absent. Ignored without the image, and by
454
+ * every other surface.
455
+ */
456
+ unlockCardImageAlt?: string;
457
+ /**
458
+ * Your own prize for trying an offer at this placement. On web it is not yet drawn or
459
+ * granted; see {@link PublisherReward}.
460
+ */
461
+ publisherReward?: PublisherReward;
298
462
  }
299
463
  /**
300
464
  * Presentation callbacks for the bare `Encore.show()` form.
@@ -328,6 +492,12 @@ export interface PlacementBuilder {
328
492
  headline(text: string): PlacementBuilder;
329
493
  /** Counterpart to {@link PlacementBuilder.headline}: same rules. */
330
494
  subheadline(text: string): PlacementBuilder;
495
+ /**
496
+ * Your own prize for trying an offer here, the same `.publisherReward(...)` step the
497
+ * native SDKs expose. Equivalent to `PlacementOptions.publisherReward`; the last call
498
+ * wins. On web it is not yet drawn or granted; see {@link PublisherReward}.
499
+ */
500
+ publisherReward(reward: PublisherReward): PlacementBuilder;
331
501
  /** Fires when the sheet closes without a claim — carries the dismissal reason. */
332
502
  onNotGranted(callback: (reason: NotGrantedReason) => void): PlacementBuilder;
333
503
  onLoadingStateChange(callback: (isLoading: boolean) => void): PlacementBuilder;
@@ -439,6 +609,12 @@ export interface EncoreConfig {
439
609
  * sheet left to hold a verification spinner in the way iOS does. Strict mode
440
610
  * reports its verification through the callback instead — a deliberate divergence,
441
611
  * see docs/architecture/platform-divergence/web.md.
612
+ *
613
+ * One exception, in both modes: a served variant that authors a post-claim screen
614
+ * keeps the sheet up, as iOS does, so `show()` resolves `'claimed'` when that sheet
615
+ * closes. `onGranted` and `sdk_placement_resolved` wait with it, and a second
616
+ * `show()` in the meantime is refused as already presenting. The provisional grant
617
+ * still happens at handoff.
442
618
  */
443
619
  unlockMode?: 'strict' | 'optimistic';
444
620
  /**
@@ -569,6 +745,13 @@ export interface OfferRef {
569
745
  reward?: string;
570
746
  imageUrl?: string;
571
747
  logoUrl?: string;
748
+ /**
749
+ * Whether the offer was a KNOWN free trial when it was claimed (badged
750
+ * `free_trial` and naming no price). Gates any "no payment / cancel anytime" copy
751
+ * on the redemption screen. Absent (a claim stored by an older SDK) reads as not
752
+ * known, which says less rather than something false.
753
+ */
754
+ freeTrial?: boolean;
572
755
  }
573
756
  /**
574
757
  * A claimed offer awaiting redemption. Claiming starts a transaction, and `id` is
@@ -655,6 +838,239 @@ export interface SubscriptionEvent {
655
838
  productId?: string;
656
839
  [key: string]: unknown;
657
840
  }
841
+ /**
842
+ * Whether Encore may open a trigger's sheet by itself (GiftsButton only). The only value is
843
+ * `'off'`: never. Omitted, Encore decides: a GiftsButton look Encore serves may open the
844
+ * sheet once by itself (an experiment arm only), at most once per mount and per placement
845
+ * per local day, never over another sheet and only while the page is in the foreground,
846
+ * then draw that same look, which a tap always opens.
847
+ *
848
+ * The retired `'on'` and `'experiment'` are ignored (logged once), as if omitted; any other
849
+ * value is read as `'off'` (logged once).
850
+ */
851
+ export type AutoOpen = 'off';
852
+ /** The icon a trigger draws. See {@link TriggerMountOptions.icon}. */
853
+ export type TriggerIcon = 'gift' | 'appIcon' | 'none';
854
+ /**
855
+ * Options for `Encore.triggers.mount()` and the React `<EncoreTrigger>`.
856
+ */
857
+ export interface TriggerMountOptions {
858
+ /** Names where the trigger sits, such as `'home'`. Same meaning as a `show()` placement id. */
859
+ placement: string;
860
+ /**
861
+ * The use case of the sheet the trigger opens. Defaults to the trigger's own
862
+ * (`'rewardUsers'` for GiftsButton and ClaimReminder). `'reduceChurn'` is not
863
+ * supported by triggers yet and renders nothing.
864
+ */
865
+ useCase?: UseCase;
866
+ /**
867
+ * `'off'` forbids Encore from opening the sheet by itself at this mount. Omitted, Encore
868
+ * decides (GiftsButton only). See {@link AutoOpen}.
869
+ */
870
+ autoOpen?: AutoOpen;
871
+ /**
872
+ * Where the trigger sits in a container wider than its look: `'center'` (default),
873
+ * `'leading'` or `'trailing'`, in the writing direction. The look's width comes from
874
+ * Encore; a container narrower than it is filled. Change it with the handle's
875
+ * `setAlignment()`, which only moves it. In a flex or grid container your own layout
876
+ * places it instead, and this has no effect there.
877
+ */
878
+ alignment?: EncoreAlignment;
879
+ /**
880
+ * The icon the trigger draws: `'gift'` (default), `'appIcon'` (your app's store icon
881
+ * from the Encore portal; the gift when the app has none) or `'none'`.
882
+ */
883
+ icon?: TriggerIcon;
884
+ /**
885
+ * Your colours, and light or dark mode. The colours that apply, as hex (`#RGB`,
886
+ * `#RRGGBB`, `#RRGGBBAA`), are `accentColor`, `backgroundColor`, `textColor`,
887
+ * `secondaryTextColor`, `trackColor`, `onAccentColor` and `backgroundEndColor`; each one you set beats the
888
+ * app's portal theme and the served variant's colour. `colorScheme` applies too. A `backgroundColor` without a `textColor` gets black or white text, whichever
889
+ * contrasts with it. The reward-sheet slots (`headline`, `claimButton` and the rest) do not apply.
890
+ */
891
+ appearance?: AppearanceConfig;
892
+ /**
893
+ * Your own words and numbers for the look, as `${values.K}` in its copy (for example
894
+ * `{ minutes: '60' }` for "60 min talking today!"). Each one replaces the look's own
895
+ * default for that key. At most 16 keys (a lowercase first letter, then letters and
896
+ * digits, up to 32 characters), each value plain text of up to 64 characters; a key or
897
+ * value outside that is ignored and the look's default shows. They are filled on the
898
+ * device and are never sent to Encore, put in an analytics event, logged or stored.
899
+ */
900
+ values?: Record<string, string>;
901
+ /**
902
+ * Your own words for the entry's main line. Left out or blank, the look's own copy shows
903
+ * (each look's default, in the user's language), so every look Encore tests falls back to
904
+ * its own words. A look shows it only where it draws a headline; the thanks look keeps its
905
+ * own copy. One line, up to 120 UTF-16 code units (an emoji counts as 2): control characters and line breaks are
906
+ * removed. Never translated, sent to Encore, logged or stored. Not a `values` key.
907
+ */
908
+ headline?: string;
909
+ /** Your own words for the line under the headline, as {@link TriggerMountOptions.headline}. */
910
+ subheadline?: string;
911
+ /** Your own label for the entry's button, where the look draws one, as {@link TriggerMountOptions.headline}. */
912
+ cta?: string;
913
+ /** Trigger-specific settings, as strings, for the generic `mount(id, ...)`. None today. */
914
+ options?: Record<string, string>;
915
+ /**
916
+ * Your own prize for this placement, passed to every sheet the trigger opens, as
917
+ * `PlacementOptions.publisherReward` would be.
918
+ * On web it is not yet drawn or granted; see {@link PublisherReward}.
919
+ */
920
+ publisherReward?: PublisherReward;
921
+ /**
922
+ * Called once for each sheet the trigger opens (a tap, or GiftsButton's automatic
923
+ * pop), after it closes, with what that sheet's `show()` resolves to. It must not
924
+ * throw; if it does, the error is logged and the trigger carries on.
925
+ */
926
+ onResult?: (result: ShowResult) => void;
927
+ }
928
+ /**
929
+ * Options for `Encore.triggers.claimReminder.mount()` and the React `<ClaimReminder>`.
930
+ * A tap opens the Encore sheet for `useCase` at `placement`.
931
+ */
932
+ export type ClaimReminderOptions = Pick<TriggerMountOptions, 'placement' | 'useCase' | 'icon' | 'alignment' | 'appearance' | 'values' | 'headline' | 'subheadline' | 'cta' | 'publisherReward' | 'onResult'>;
933
+ /** Options for `Encore.triggers.giftsButton.mount()` and the React `<GiftsButton>`. */
934
+ export type GiftsButtonOptions = Pick<TriggerMountOptions, 'placement' | 'useCase' | 'autoOpen' | 'values' | 'headline' | 'subheadline' | 'cta' | 'icon' | 'alignment' | 'appearance' | 'publisherReward' | 'onResult'>;
935
+ /** Which part of your view was tapped, as `sdk_trigger_clicked` reports it. */
936
+ export type ClaimTarget = 'button' | 'card' | 'arrow';
937
+ /** One held offer's logo, for drawing a gifts view. */
938
+ export interface ClaimOfferLogo {
939
+ logoUrl: string;
940
+ advertiserName?: string;
941
+ }
942
+ /**
943
+ * What your view should show for a placement, kept current by the SDK:
944
+ * - `hidden`: show nothing (the sheet has no offers, the SDK is not configured yet, or
945
+ * `afterComplete: 'hide'` after a completed claim).
946
+ * - `gifts`: the reward sheet has offers; `logos` holds up to 8 of their logos.
947
+ * - `reminder`: the user has an open claim this placement's sheet still lists
948
+ * (`afterClaim: 'showReminder'`, the default). It ends at `deadline`.
949
+ * - `thanks`: `afterComplete: 'thanks'`, the user completed a claim today and has not
950
+ * tapped this since; the sheet has more offers (`offerCount`, `logos` as for gifts).
951
+ * A tap opens the sheet and ends it; so do a new claim and the next local day.
952
+ */
953
+ export type EncoreClaimState = {
954
+ kind: 'hidden';
955
+ } | {
956
+ kind: 'gifts';
957
+ offerCount: number;
958
+ logos: readonly ClaimOfferLogo[];
959
+ } | {
960
+ kind: 'thanks';
961
+ offerCount: number;
962
+ logos: readonly ClaimOfferLogo[];
963
+ } | {
964
+ kind: 'reminder';
965
+ transactionId: string;
966
+ campaignId: string;
967
+ advertiserName: string;
968
+ logoUrl?: string;
969
+ /** The claimed offer's perk ("3 months free"), when known. */
970
+ perk?: string;
971
+ claimedAt: Date;
972
+ /** When the reminder ends: 24 hours after the claim. */
973
+ deadline: Date;
974
+ /** How many open claims there are, the shown one included. */
975
+ claimCount: number;
976
+ };
977
+ /**
978
+ * Options for `Encore.claim()`. What your view shows after a claim and after a completion
979
+ * is Encore's to decide (and to test), as for its own components: draw every state.
980
+ */
981
+ export interface EncoreClaimOptions extends Pick<TriggerMountOptions, 'placement' | 'useCase' | 'publisherReward' | 'onResult'> {
982
+ /**
983
+ * `'off'`: Encore never opens the sheet by itself from this view. Omitted, Encore decides:
984
+ * when a test calls for it, the sheet may open once by itself after your view was seen,
985
+ * at most once per placement per local day, never over another sheet and only while the
986
+ * page is in the foreground. Other values are read as for a trigger's {@link AutoOpen}.
987
+ */
988
+ autoOpen?: AutoOpen;
989
+ }
990
+ /**
991
+ * Your own gifts button or claim reminder, counted and driven by Encore. Encore decides
992
+ * when it should show (`state`), counts the impression (at least half visible for one
993
+ * second) and the tap, opens the reward sheet, and hands back the result. You draw it.
994
+ * Encore draws nothing there; it reads only the rules for what comes next, once the view
995
+ * is first on screen, and without them behaves as it always has.
996
+ */
997
+ export interface EncoreClaim {
998
+ /** What to show now. `hidden` until the SDK knows. */
999
+ readonly state: EncoreClaimState;
1000
+ /** Called now with the current state, and on every change. Returns an unsubscribe. */
1001
+ subscribe(listener: (state: EncoreClaimState) => void): () => void;
1002
+ /**
1003
+ * Wire `element` to this handle: its visibility counts the impression, and a click
1004
+ * or Enter/Space on it opens the sheet. A click or key that starts on a control of its
1005
+ * own inside it (a close button) is left alone. An element that is not already a
1006
+ * control gets `role="button"` and `tabindex="0"`. With `{ tap: false }` it only
1007
+ * counts visibility; call `tap()` yourself. Binding the same element again returns the
1008
+ * same unbind. Returns an unbind function.
1009
+ */
1010
+ bind(element: HTMLElement, options?: {
1011
+ target?: ClaimTarget;
1012
+ tap?: boolean;
1013
+ }): () => void;
1014
+ /** Report how much of your view is visible (0 to 1), when you do not `bind()`. */
1015
+ setVisible(fraction: number): void;
1016
+ /**
1017
+ * Open the reward sheet, as a tap on your view. Resolves with the sheet's result:
1018
+ * `unavailable`, sending nothing, while the state is `hidden` or another trigger's
1019
+ * tap is still in flight. Behind a sheet your app opened, it waits for that sheet to
1020
+ * close, then opens. Default target: `button` for gifts, `card` for a reminder.
1021
+ */
1022
+ tap(target?: ClaimTarget): Promise<ShowResult>;
1023
+ /** Hide the reminder (every claim on show) on this device. Nothing while not a reminder. */
1024
+ dismiss(): void;
1025
+ /**
1026
+ * Stop: no more state, events or listeners. Safe to call twice. A handle nobody
1027
+ * subscribes to, whose bound elements have all left the page, stops by itself a task
1028
+ * later (a moved view is kept).
1029
+ */
1030
+ destroy(): void;
1031
+ }
1032
+ /** What `mount()` returns. */
1033
+ export interface TriggerHandle {
1034
+ /** Removes the trigger and stops its timers and listeners. Safe to call twice. */
1035
+ unmount(): void;
1036
+ /** Moves the trigger to `alignment` in its container. Asks Encore for nothing. */
1037
+ setAlignment(alignment: EncoreAlignment): void;
1038
+ /**
1039
+ * Replaces the trigger's `headline`, `subheadline` and `cta` (any left out falls back to
1040
+ * the look's own copy) and redraws the look it already has. Asks Encore for nothing and
1041
+ * keeps the mount, so a counter in the copy can change as often as it likes.
1042
+ */
1043
+ setText(text: TriggerText): void;
1044
+ }
1045
+ /** The app's own words on a trigger: see {@link TriggerMountOptions.headline}. */
1046
+ export type TriggerText = Pick<TriggerMountOptions, 'headline' | 'subheadline' | 'cta'>;
1047
+ /** Where a trigger sits in a container wider than its look. */
1048
+ export type EncoreAlignment = 'leading' | 'center' | 'trailing';
1049
+ /** `Encore.triggers`: drop-in UI pieces you place in your own layout. */
1050
+ export interface EncoreTriggers {
1051
+ /**
1052
+ * Draw the trigger `id` (such as `'giftsButton'`) inside `element`. It renders
1053
+ * nothing (zero height) until it has something to show, renders nothing for an id
1054
+ * this SDK version does not ship, and never throws.
1055
+ */
1056
+ mount(id: string, element: HTMLElement | null | undefined, options: TriggerMountOptions): TriggerHandle;
1057
+ readonly claimReminder: {
1058
+ /**
1059
+ * Draw the claim reminder inside `element`: `mount('claimReminder', element, options)`.
1060
+ * It renders nothing (zero height) until there is a claim to remind about whose
1061
+ * offer the sheet still has.
1062
+ */
1063
+ mount(element: HTMLElement | null | undefined, options: ClaimReminderOptions): TriggerHandle;
1064
+ };
1065
+ readonly giftsButton: {
1066
+ /**
1067
+ * Draw the gifts button inside `element`: `mount('giftsButton', element, options)`.
1068
+ * A tap opens the Encore sheet for `useCase` at `placement`. It renders nothing
1069
+ * (zero height) while that sheet has no offers.
1070
+ */
1071
+ mount(element: HTMLElement | null | undefined, options: GiftsButtonOptions): TriggerHandle;
1072
+ };
1073
+ }
658
1074
  /**
659
1075
  * Event handler function type
660
1076
  */
@@ -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,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAA;CAAE,GAC/D;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,SAAS,GAAG,SAAS,CAAA;CAAE,GAClE;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,SAAS,CAAA;CAAE,CAAC;AAEzD;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,aAAa,GAAG,KAAK,CAAC;AAElE;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,aAAa,EAAE,MAAM,CAAC;IACtB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,MAAM,eAAe,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEhE,yEAAyE;AACzE,MAAM,WAAW,cAAc;IAC7B;;;;OAIG;IACH,KAAK,CACH,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,EACvC,OAAO,EAAE,mBAAmB,GAC3B,aAAa,CAAC;IACjB,QAAQ,CAAC,aAAa,EAAE;QACtB;;;;WAIG;QACH,KAAK,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,EAAE,OAAO,EAAE,oBAAoB,GAAG,aAAa,CAAC;KAC9F,CAAC;IACF,QAAQ,CAAC,WAAW,EAAE;QACpB;;;;WAIG;QACH,KAAK,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,EAAE,OAAO,EAAE,kBAAkB,GAAG,aAAa,CAAC;KAC5F,CAAC;CACH;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"}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Claim Screen
3
+ *
4
+ * What the user sees between tapping Claim and the advertiser's page, in the
5
+ * `giftPickerPreload` variant: the offer's logo, "Loading your FREE offer" with a
6
+ * spinner, "Finish on {domain}", and up to three of the offer's instruction titles as
7
+ * check rows. The design (Figma node 19575-37963) draws it over the blurred sheet,
8
+ * followed by the advertiser page.
9
+ *
10
+ * WHERE IT RENDERS. The web cannot preload a cross-origin page (most advertisers refuse
11
+ * framing, and a frame loses its cookies), so this screen is what stands in for the
12
+ * blank wait instead:
13
+ * - INTO THE TAB the claim already opened synchronously in the tap gesture. That tab
14
+ * is `about:blank` and same-origin with the opener, so its document is ours to
15
+ * draw in. The browser keeps drawing it until the advertiser page commits, so the
16
+ * user watches this screen, not a white tab, for the whole load.
17
+ * - OVER THE SHEET, when there is no such tab: the popup was blocked, or the page runs
18
+ * in a webview whose `window.open` returns a stand-in handle with no document (the
19
+ * hosted offer page's top-level handoff). Everything else in the sheet, its own x
20
+ * included, is inert underneath, and impressions pause. With a stand-in handle the
21
+ * advertiser page replaces THIS page, so at the hand-off the screen moves off the
22
+ * sheet and stays up until the page unloads. With a blocked popup whose fallback
23
+ * opened a tab after all, it leaves with the sheet.
24
+ *
25
+ * MONEY PATH. This file never requests anything. The only network access is the
26
+ * offer's own logo image, which is already on screen in the sheet. The claim URL is
27
+ * navigated exactly once, by the caller, after the transaction exists.
28
+ *
29
+ * Everything user-facing is set with `textContent` or a guarded `src`: no markup from
30
+ * the offer ever becomes HTML.
31
+ */
32
+ import type { OfferModel } from '../api/models';
33
+ /** The design's headline in English: the fallback for the served `claim.loading`. */
34
+ export declare const CLAIM_SCREEN_TITLE = "Loading your FREE offer";
35
+ /** The class the screen carries while it sits inside the sheet; removed when it moves off. */
36
+ export declare const CLAIM_SHEET_CLASS = "encore-claim-root--sheet";
37
+ /** The rows the screen lists: non-blank instruction titles, at most three. */
38
+ export declare function claimScreenRows(offer: OfferModel): string[];
39
+ /**
40
+ * Draw the claim screen into `doc` and return its root. `mode: 'tab'` is the opened
41
+ * `about:blank` tab (a plain white page); `'inPage'` overlays the host page's sheet.
42
+ */
43
+ export declare function renderClaimScreen(doc: Document, offer: OfferModel, mode: 'tab' | 'inPage', container?: HTMLElement): HTMLElement;
44
+ /**
45
+ * The same-origin document of a tab the claim opened, or null when there is none to
46
+ * draw in: no tab, a cross-origin one, or a stand-in handle (the hosted page's
47
+ * top-level handoff) that has no document at all.
48
+ */
49
+ export declare function claimTabDocument(tab: Window | null): Document | null;
50
+ /**
51
+ * Add the way out to an in-page claim screen whose transaction is taking too long. Only
52
+ * the in-page screen needs one: a tab has the browser's own close.
53
+ */
54
+ export declare function addClaimScreenClose(root: HTMLElement, onClose: () => void): HTMLElement;
55
+ /**
56
+ * Whether a claim's window handle is a webview's stand-in (the hosted offer page's
57
+ * top-level handoff), whose navigation replaces THIS page. A stand-in has no `document`
58
+ * property at all. A real window always has one, even a cross-origin one whose
59
+ * `document` throws, so that is never mistaken for a stand-in.
60
+ */
61
+ export declare function isStandInHandle(handle: Window | null): boolean;
62
+ //# sourceMappingURL=ClaimScreen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClaimScreen.d.ts","sourceRoot":"","sources":["../../src/ui/ClaimScreen.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAMhD,qFAAqF;AACrF,eAAO,MAAM,kBAAkB,4BAA4B,CAAC;AAM5D,8FAA8F;AAC9F,eAAO,MAAM,iBAAiB,6BAAoB,CAAC;AA6BnD,8EAA8E;AAC9E,wBAAgB,eAAe,CAAC,KAAK,EAAE,UAAU,GAAG,MAAM,EAAE,CAK3D;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,QAAQ,EACb,KAAK,EAAE,UAAU,EACjB,IAAI,EAAE,KAAK,GAAG,QAAQ,EACtB,SAAS,CAAC,EAAE,WAAW,GACtB,WAAW,CAkFb;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,QAAQ,GAAG,IAAI,CAapE;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,IAAI,GAAG,WAAW,CAWvF;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAQ9D"}