@encorekit/web-sdk 2.3.0 → 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 (265) 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 +105 -5
  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 +58 -3
  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 +420 -39
  56. package/types/api/generated/types.d.ts.map +1 -1
  57. package/types/api/models.d.ts +18 -2
  58. package/types/api/models.d.ts.map +1 -1
  59. package/types/api/offerBuilder.d.ts +10 -4
  60. package/types/api/offerBuilder.d.ts.map +1 -1
  61. package/types/core/Encore.d.ts +145 -3
  62. package/types/core/Encore.d.ts.map +1 -1
  63. package/types/core/OfferManager.d.ts +25 -3
  64. package/types/core/OfferManager.d.ts.map +1 -1
  65. package/types/core/PlacementBuilder.d.ts +6 -1
  66. package/types/core/PlacementBuilder.d.ts.map +1 -1
  67. package/types/core/SignalManager.d.ts.map +1 -1
  68. package/types/core/StorageManager.d.ts +3 -2
  69. package/types/core/StorageManager.d.ts.map +1 -1
  70. package/types/core/StrictUnlockReconciler.d.ts +1 -1
  71. package/types/core/StrictUnlockReconciler.d.ts.map +1 -1
  72. package/types/core/claimHandle.d.ts +44 -0
  73. package/types/core/claimHandle.d.ts.map +1 -0
  74. package/types/core/claimLog.d.ts +102 -0
  75. package/types/core/claimLog.d.ts.map +1 -0
  76. package/types/core/claimRefusal.d.ts +3 -0
  77. package/types/core/claimRefusal.d.ts.map +1 -0
  78. package/types/core/claimStatusCheck.d.ts +62 -0
  79. package/types/core/claimStatusCheck.d.ts.map +1 -0
  80. package/types/core/giftVariant.d.ts +5 -0
  81. package/types/core/giftVariant.d.ts.map +1 -1
  82. package/types/core/hostDisplay.d.ts +9 -2
  83. package/types/core/hostDisplay.d.ts.map +1 -1
  84. package/types/core/sduiVariables.d.ts +20 -0
  85. package/types/core/sduiVariables.d.ts.map +1 -0
  86. package/types/core/strings.d.ts +114 -0
  87. package/types/core/strings.d.ts.map +1 -0
  88. package/types/core/unlockCode.d.ts +8 -1
  89. package/types/core/unlockCode.d.ts.map +1 -1
  90. package/types/core/userKeys.d.ts +7 -0
  91. package/types/core/userKeys.d.ts.map +1 -0
  92. package/types/core/version.d.ts +1 -1
  93. package/types/experiments/ExposureOutbox.d.ts +1 -0
  94. package/types/experiments/ExposureOutbox.d.ts.map +1 -1
  95. package/types/preview.d.ts +51 -0
  96. package/types/preview.d.ts.map +1 -0
  97. package/types/react.d.ts +53 -1
  98. package/types/react.d.ts.map +1 -1
  99. package/types/sdui/actions.d.ts +93 -0
  100. package/types/sdui/actions.d.ts.map +1 -0
  101. package/types/sdui/bindings.d.ts +63 -0
  102. package/types/sdui/bindings.d.ts.map +1 -0
  103. package/types/sdui/compile.d.ts +88 -0
  104. package/types/sdui/compile.d.ts.map +1 -0
  105. package/types/sdui/conditions.d.ts +22 -0
  106. package/types/sdui/conditions.d.ts.map +1 -0
  107. package/types/sdui/context.d.ts +132 -0
  108. package/types/sdui/context.d.ts.map +1 -0
  109. package/types/sdui/countdown.d.ts +31 -0
  110. package/types/sdui/countdown.d.ts.map +1 -0
  111. package/types/sdui/decode.d.ts +35 -0
  112. package/types/sdui/decode.d.ts.map +1 -0
  113. package/types/sdui/deps.d.ts +43 -0
  114. package/types/sdui/deps.d.ts.map +1 -0
  115. package/types/sdui/dominantColor.d.ts +24 -0
  116. package/types/sdui/dominantColor.d.ts.map +1 -0
  117. package/types/sdui/elements/confetti.d.ts +38 -0
  118. package/types/sdui/elements/confetti.d.ts.map +1 -0
  119. package/types/sdui/elements/content.d.ts +27 -0
  120. package/types/sdui/elements/content.d.ts.map +1 -0
  121. package/types/sdui/elements/interactive.d.ts +48 -0
  122. package/types/sdui/elements/interactive.d.ts.map +1 -0
  123. package/types/sdui/elements/layout.d.ts +41 -0
  124. package/types/sdui/elements/layout.d.ts.map +1 -0
  125. package/types/sdui/elements/marquee.d.ts +17 -0
  126. package/types/sdui/elements/marquee.d.ts.map +1 -0
  127. package/types/sdui/elements/progress.d.ts +10 -0
  128. package/types/sdui/elements/progress.d.ts.map +1 -0
  129. package/types/sdui/elements/shared.d.ts +138 -0
  130. package/types/sdui/elements/shared.d.ts.map +1 -0
  131. package/types/sdui/elements/symbols.d.ts +22 -0
  132. package/types/sdui/elements/symbols.d.ts.map +1 -0
  133. package/types/sdui/elements/triggerText.d.ts +55 -0
  134. package/types/sdui/elements/triggerText.d.ts.map +1 -0
  135. package/types/sdui/host.d.ts +274 -0
  136. package/types/sdui/host.d.ts.map +1 -0
  137. package/types/sdui/inlineMarkup.d.ts +22 -0
  138. package/types/sdui/inlineMarkup.d.ts.map +1 -0
  139. package/types/sdui/lookValues.d.ts +50 -0
  140. package/types/sdui/lookValues.d.ts.map +1 -0
  141. package/types/sdui/model.d.ts +130 -0
  142. package/types/sdui/model.d.ts.map +1 -0
  143. package/types/sdui/motion.d.ts +37 -0
  144. package/types/sdui/motion.d.ts.map +1 -0
  145. package/types/sdui/precheck.d.ts +94 -0
  146. package/types/sdui/precheck.d.ts.map +1 -0
  147. package/types/sdui/scrollMath.d.ts +32 -0
  148. package/types/sdui/scrollMath.d.ts.map +1 -0
  149. package/types/sdui/style.d.ts +99 -0
  150. package/types/sdui/style.d.ts.map +1 -0
  151. package/types/sdui/triggerKit.d.ts +24 -0
  152. package/types/sdui/triggerKit.d.ts.map +1 -0
  153. package/types/sdui/unrunnable.d.ts +11 -0
  154. package/types/sdui/unrunnable.d.ts.map +1 -0
  155. package/types/sdui/vocabulary.d.ts +119 -0
  156. package/types/sdui/vocabulary.d.ts.map +1 -0
  157. package/types/triggers/claimReminder/ClaimReminder.d.ts +65 -0
  158. package/types/triggers/claimReminder/ClaimReminder.d.ts.map +1 -0
  159. package/types/triggers/claimReminder/bindings.d.ts +40 -0
  160. package/types/triggers/claimReminder/bindings.d.ts.map +1 -0
  161. package/types/triggers/claimReminder/config.d.ts +56 -0
  162. package/types/triggers/claimReminder/config.d.ts.map +1 -0
  163. package/types/triggers/claimReminder/eligibility.d.ts +37 -0
  164. package/types/triggers/claimReminder/eligibility.d.ts.map +1 -0
  165. package/types/triggers/claimReminder/servedWindow.d.ts +15 -0
  166. package/types/triggers/claimReminder/servedWindow.d.ts.map +1 -0
  167. package/types/triggers/claimReminder/source.d.ts +29 -0
  168. package/types/triggers/claimReminder/source.d.ts.map +1 -0
  169. package/types/triggers/giftsButton/GiftsButton.d.ts +60 -0
  170. package/types/triggers/giftsButton/GiftsButton.d.ts.map +1 -0
  171. package/types/triggers/giftsButton/config.d.ts +53 -0
  172. package/types/triggers/giftsButton/config.d.ts.map +1 -0
  173. package/types/triggers/giftsButton/spot.d.ts +54 -0
  174. package/types/triggers/giftsButton/spot.d.ts.map +1 -0
  175. package/types/triggers/host/TriggerHost.d.ts +127 -0
  176. package/types/triggers/host/TriggerHost.d.ts.map +1 -0
  177. package/types/triggers/host/autoPops.d.ts +16 -0
  178. package/types/triggers/host/autoPops.d.ts.map +1 -0
  179. package/types/triggers/host/configCache.d.ts +29 -0
  180. package/types/triggers/host/configCache.d.ts.map +1 -0
  181. package/types/triggers/host/customClaim.d.ts +85 -0
  182. package/types/triggers/host/customClaim.d.ts.map +1 -0
  183. package/types/triggers/host/dismissStore.d.ts +37 -0
  184. package/types/triggers/host/dismissStore.d.ts.map +1 -0
  185. package/types/triggers/host/readThrottle.d.ts +15 -0
  186. package/types/triggers/host/readThrottle.d.ts.map +1 -0
  187. package/types/triggers/host/registry.d.ts +17 -0
  188. package/types/triggers/host/registry.d.ts.map +1 -0
  189. package/types/triggers/host/sduiView.d.ts +31 -0
  190. package/types/triggers/host/sduiView.d.ts.map +1 -0
  191. package/types/triggers/host/template.d.ts +28 -0
  192. package/types/triggers/host/template.d.ts.map +1 -0
  193. package/types/triggers/host/textSlots.d.ts +35 -0
  194. package/types/triggers/host/textSlots.d.ts.map +1 -0
  195. package/types/triggers/host/theme.d.ts +87 -0
  196. package/types/triggers/host/theme.d.ts.map +1 -0
  197. package/types/triggers/host/timers.d.ts +11 -0
  198. package/types/triggers/host/timers.d.ts.map +1 -0
  199. package/types/triggers/host/types.d.ts +278 -0
  200. package/types/triggers/host/types.d.ts.map +1 -0
  201. package/types/triggers/host/wire.d.ts +55 -0
  202. package/types/triggers/host/wire.d.ts.map +1 -0
  203. package/types/triggers/preview.d.ts +78 -0
  204. package/types/triggers/preview.d.ts.map +1 -0
  205. package/types/triggers/request.d.ts +53 -0
  206. package/types/triggers/request.d.ts.map +1 -0
  207. package/types/types.d.ts +329 -1
  208. package/types/types.d.ts.map +1 -1
  209. package/types/ui/ClaimScreen.d.ts +1 -1
  210. package/types/ui/ClaimScreen.d.ts.map +1 -1
  211. package/types/ui/CodeUnlock.d.ts +12 -2
  212. package/types/ui/CodeUnlock.d.ts.map +1 -1
  213. package/types/ui/GiftHero.d.ts.map +1 -1
  214. package/types/ui/GiftList.d.ts.map +1 -1
  215. package/types/ui/GiftPicker.d.ts.map +1 -1
  216. package/types/ui/GiftPickerHero.d.ts.map +1 -1
  217. package/types/ui/GiftReveal.d.ts.map +1 -1
  218. package/types/ui/GiftSheet.d.ts +5 -5
  219. package/types/ui/GiftSheet.d.ts.map +1 -1
  220. package/types/ui/GiftUnwrap.d.ts.map +1 -1
  221. package/types/ui/OfferCard.d.ts.map +1 -1
  222. package/types/ui/OfferCarousel.d.ts.map +1 -1
  223. package/types/ui/OfferModal.d.ts +31 -0
  224. package/types/ui/OfferModal.d.ts.map +1 -1
  225. package/types/ui/PrimerScreen.d.ts +2 -0
  226. package/types/ui/PrimerScreen.d.ts.map +1 -1
  227. package/types/ui/RedemptionScreen.d.ts +5 -0
  228. package/types/ui/RedemptionScreen.d.ts.map +1 -1
  229. package/types/ui/RewardActions.d.ts.map +1 -1
  230. package/types/ui/RewardCard.d.ts.map +1 -1
  231. package/types/ui/SduiRewardSurface.d.ts +145 -0
  232. package/types/ui/SduiRewardSurface.d.ts.map +1 -0
  233. package/types/ui/Tooltip.d.ts.map +1 -1
  234. package/types/ui/brandComponents.d.ts.map +1 -1
  235. package/types/ui/brandTint.d.ts.map +1 -1
  236. package/types/ui/colorScheme.d.ts +15 -0
  237. package/types/ui/colorScheme.d.ts.map +1 -0
  238. package/types/ui/covered.d.ts +12 -0
  239. package/types/ui/covered.d.ts.map +1 -0
  240. package/types/ui/giftCategoryGroups.d.ts +13 -0
  241. package/types/ui/giftCategoryGroups.d.ts.map +1 -1
  242. package/types/ui/giftCopy.d.ts +14 -9
  243. package/types/ui/giftCopy.d.ts.map +1 -1
  244. package/types/ui/giftUnwrapCopy.d.ts.map +1 -1
  245. package/types/ui/imageURL.d.ts +44 -0
  246. package/types/ui/imageURL.d.ts.map +1 -0
  247. package/types/ui/impressionGate.d.ts +9 -0
  248. package/types/ui/impressionGate.d.ts.map +1 -1
  249. package/types/ui/offerBadge.d.ts.map +1 -1
  250. package/types/ui/rewardSurface.d.ts +11 -1
  251. package/types/ui/rewardSurface.d.ts.map +1 -1
  252. package/types/ui/sduiTheme.d.ts +48 -0
  253. package/types/ui/sduiTheme.d.ts.map +1 -0
  254. package/types/ui/sheetDetents.d.ts +28 -0
  255. package/types/ui/sheetDetents.d.ts.map +1 -0
  256. package/types/ui/styles.d.ts +11 -8
  257. package/types/ui/styles.d.ts.map +1 -1
  258. package/types/ui/termsLine.d.ts +3 -3
  259. package/types/ui/termsLine.d.ts.map +1 -1
  260. package/types/ui/toast.d.ts +11 -0
  261. package/types/ui/toast.d.ts.map +1 -0
  262. package/types/utils/logger.d.ts +10 -0
  263. package/types/utils/logger.d.ts.map +1 -1
  264. package/types/utils/text.d.ts +17 -0
  265. package/types/utils/text.d.ts.map +1 -1
@@ -0,0 +1,28 @@
1
+ /**
2
+ * A served variant's `presentationDetents`, on phones.
3
+ *
4
+ * iOS presents a sheet at fractions of the screen and lets a drag move it
5
+ * between them or dismiss it (`OfferSheetView.detentsForCurrentState`). Web
6
+ * opened every variant full height. Above a phone the SDUI stage is a square,
7
+ * and a partial sheet only fits its height to its content.
8
+ */
9
+ /** Swift's detents when a variant names none. */
10
+ export declare const DEFAULT_DETENTS: readonly number[];
11
+ /**
12
+ * The detents for `state`, or null when the variant is not a partial sheet:
13
+ * a `fullScreenCover`, or detents that are all full height.
14
+ */
15
+ export declare function resolveDetents(template: unknown, state: string): number[] | null;
16
+ export interface SheetDetentOptions {
17
+ /** The detents now, or null for a full-height screen. Read on every refresh. */
18
+ detents: () => readonly number[] | null;
19
+ cornerRadius?: number;
20
+ /** Called when a drag dismisses the sheet. Absent means it cannot be dragged away. */
21
+ onDismiss?: () => void;
22
+ }
23
+ export interface SheetDetents {
24
+ refresh(): void;
25
+ destroy(): void;
26
+ }
27
+ export declare function attachSheetDetents(sheet: HTMLElement, options: SheetDetentOptions): SheetDetents;
28
+ //# sourceMappingURL=sheetDetents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sheetDetents.d.ts","sourceRoot":"","sources":["../../src/ui/sheetDetents.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,iDAAiD;AACjD,eAAO,MAAM,eAAe,EAAE,SAAS,MAAM,EAAiB,CAAC;AAa/D;;;GAGG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,CAYhF;AAED,MAAM,WAAW,kBAAkB;IACjC,gFAAgF;IAChF,OAAO,EAAE,MAAM,SAAS,MAAM,EAAE,GAAG,IAAI,CAAC;IACxC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sFAAsF;IACtF,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,MAAM,WAAW,YAAY;IAC3B,OAAO,IAAI,IAAI,CAAC;IAChB,OAAO,IAAI,IAAI,CAAC;CACjB;AAWD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,kBAAkB,GAAG,YAAY,CA0IhG"}
@@ -13,14 +13,12 @@ export declare const BREAKPOINTS: {
13
13
  };
14
14
  /**
15
15
  * REWARD_VISUAL_NOTES — why the reward block in the stylesheet below looks the way
16
- * it does. Deliberately a JS comment and NOT a CSS one.
16
+ * it does.
17
17
  *
18
- * The stylesheet is one big template literal, so every `/* … *\/` inside it is STRING
19
- * CONTENT that terser cannot strip and every user downloads. This file's house style
20
- * is long prose; in the literal that prose is payload. Keep in-literal comments to a
21
- * terse line or two and put the reasoning here, where it is free. (Trimming this
22
- * block's CSS prose cut 3.9KB of raw bundle — it had been 46% of the whole
23
- * stylesheet delta.)
18
+ * The stylesheet is template literals, so a `/* … *\/` inside one is string content
19
+ * terser cannot strip. The build removes them (scripts/strip-css-comments.mjs), so CSS
20
+ * comments here cost nothing in the bundle; one that straddles a `${…}` is kept and
21
+ * warned about, so keep each comment on one side of an interpolation.
24
22
  *
25
23
  * SOURCE OF TRUTH. The interaction model tracks `streaksCarousel.json`; the visuals
26
24
  * track Figma frame 18304:2399 (393×852). Where they disagree the Figma wins — see
@@ -304,8 +302,13 @@ export interface ThemeVariables {
304
302
  fontFamily?: string;
305
303
  }
306
304
  /**
307
- * Inject styles into document head
305
+ * 🔴 INTERNAL (`@encorekit/web-sdk/preview`): stop writing the stylesheet into
306
+ * `document.head`. The preview puts {@link stylesheet} in its own container instead, so
307
+ * it works inside a shadow root and leaves nothing on the page after destroy().
308
308
  */
309
+ export declare function disableDocumentStyles(): void;
310
+ /** The whole stylesheet as text, for a caller that places it itself (the preview). */
311
+ export declare function stylesheet(theme?: ThemeVariables): string;
309
312
  export declare function injectStyles(theme?: ThemeVariables): void;
310
313
  /**
311
314
  * Remove styles from document head
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmOG;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,YAAY,YAAY,CAAC;AACtC,eAAO,MAAM,iBAAiB,YAAY,CAAC;AAC3C,6DAA6D;AAC7D,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAE1C;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB;;;;IAI/B,0FAA0F;;CAElF,CAAC;AAEX;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AA4+KD;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,GAAE,cAAmB,GAAG,IAAI,CAgB7D;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,IAAI,CAMnC;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,CAe1D;AAED;;GAEG;AACH,wBAAgB,EAAE,CAAC,GAAG,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,CAE/C;AAED;;GAEG;AACH,wBAAgB,GAAG,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAE7C"}
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiOG;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,YAAY,YAAY,CAAC;AACtC,eAAO,MAAM,iBAAiB,YAAY,CAAC;AAC3C,6DAA6D;AAC7D,eAAO,MAAM,gBAAgB,YAAY,CAAC;AAE1C;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB;;;;IAI/B,0FAA0F;;CAElF,CAAC;AAEX;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAqoLD;;;;GAIG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CAE5C;AAED,sFAAsF;AACtF,wBAAgB,UAAU,CAAC,KAAK,GAAE,cAAmB,GAAG,MAAM,CAE7D;AAED,wBAAgB,YAAY,CAAC,KAAK,GAAE,cAAmB,GAAG,IAAI,CAiB7D;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,IAAI,CAMnC;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,cAAc,GAAG,IAAI,CAe1D;AAED;;GAEG;AACH,wBAAgB,EAAE,CAAC,GAAG,OAAO,EAAE,MAAM,EAAE,GAAG,MAAM,CAE/C;AAED;;GAEG;AACH,wBAAgB,GAAG,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAE7C"}
@@ -3,7 +3,7 @@
3
3
  * "By proceeding you agree to our offer terms", with "offer terms" underlined.
4
4
  *
5
5
  * It REPLACES the per-offer fine print on those surfaces, and `giftPicker` renders it
6
- * in its own words ("One gift per person · Offer terms") via `lead`/`linkText`.
6
+ * in its own words ("One gift per person · Offer terms") via `template`/`linkText`.
7
7
  * `giftReveal` keeps `GIFT_COPY.terms` through `RewardActions.termsText`, and the
8
8
  * carousel keeps its trust line; neither calls this.
9
9
  *
@@ -26,8 +26,8 @@ export interface TermsLineOptions {
26
26
  onOpen?: () => void;
27
27
  /** The selected offer's terms URL. https only; anything else renders as text. */
28
28
  termsUrl?: string;
29
- /** The words before the link. Defaults to `GIFT_COPY.termsLead`. */
30
- lead?: string;
29
+ /** The sentence, with `${link}` where the link goes. Defaults to `GIFT_COPY.termsLine`. */
30
+ template?: string;
31
31
  /** The link's own words. Defaults to `GIFT_COPY.termsLink`. */
32
32
  linkText?: string;
33
33
  }
@@ -1 +1 @@
1
- {"version":3,"file":"termsLine.d.ts","sourceRoot":"","sources":["../../src/ui/termsLine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAOH,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,iFAAiF;IACjF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oEAAoE;IACpE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,6FAA6F;AAC7F,wBAAgB,eAAe,CAAC,OAAO,GAAE,gBAAqB,GAAG,WAAW,CAQ3E;AAED,2FAA2F;AAC3F,wBAAgB,YAAY,CAAC,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAUlF"}
1
+ {"version":3,"file":"termsLine.d.ts","sourceRoot":"","sources":["../../src/ui/termsLine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAQH,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,iFAAiF;IACjF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,2FAA2F;IAC3F,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,6FAA6F;AAC7F,wBAAgB,eAAe,CAAC,OAAO,GAAE,gBAAqB,GAAG,WAAW,CAO3E;AAED,2FAA2F;AAC3F,wBAAgB,YAAY,CAAC,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAUlF"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * A short status message at the bottom of the page.
3
+ *
4
+ * On the PAGE, not in the sheet: a share whose `onSuccessState` is `close` ends
5
+ * the sheet the moment the link is copied, and a message inside it would go
6
+ * with it. `role="status"` so a screen reader announces it without moving focus.
7
+ */
8
+ /** How long the message stays before it fades. */
9
+ export declare const TOAST_MS = 2200;
10
+ export declare function showToast(text: string, doc?: Document | undefined): void;
11
+ //# sourceMappingURL=toast.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toast.d.ts","sourceRoot":"","sources":["../../src/ui/toast.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,kDAAkD;AAClD,eAAO,MAAM,QAAQ,OAAO,CAAC;AAG7B,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,GAAE,QAAQ,GAAG,SAA+B,GAAG,IAAI,CAgB7F"}
@@ -21,6 +21,16 @@ declare class Logger {
21
21
  info(...args: unknown[]): void;
22
22
  warn(...args: unknown[]): void;
23
23
  error(...args: unknown[]): void;
24
+ /**
25
+ * Always logs regardless of log level: a publisher calling a deprecated API has to
26
+ * hear about it before the next major removes it, and the default level is none.
27
+ */
28
+ deprecated(...args: unknown[]): void;
29
+ /**
30
+ * Always logs regardless of log level: a value the host passed that the SDK
31
+ * ignores (it never throws into the host page), so the host can see why.
32
+ */
33
+ ignored(...args: unknown[]): void;
24
34
  /**
25
35
  * Always logs regardless of log level (for critical errors)
26
36
  */
@@ -1 +1 @@
1
- {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,qDAAsD,CAAC;AAE9E,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;AAOnD,cAAM,MAAM;;IAGV,WAAW,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI;IAIlC,WAAW,IAAI,QAAQ;IAQvB,KAAK,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAM/B,IAAI,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAM9B,IAAI,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAM9B,KAAK,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAM/B;;OAEG;IACH,QAAQ,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;CAGnC;AAGD,eAAO,MAAM,MAAM,QAAe,CAAC"}
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,qDAAsD,CAAC;AAE9E,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;AAOnD,cAAM,MAAM;;IAGV,WAAW,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI;IAIlC,WAAW,IAAI,QAAQ;IAQvB,KAAK,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAM/B,IAAI,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAM9B,IAAI,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAM9B,KAAK,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAM/B;;;OAGG;IACH,UAAU,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAIpC;;;OAGG;IACH,OAAO,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAIjC;;OAEG;IACH,QAAQ,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;CAGnC;AAGD,eAAO,MAAM,MAAM,QAAe,CAAC"}
@@ -35,4 +35,21 @@ export declare function firstNonBlank(...values: (string | null | undefined)[]):
35
35
  * and folds to `(unlabeled)` on the other.
36
36
  */
37
37
  export declare function normalizePlacementId(placementId: string | undefined): string | undefined;
38
+ /**
39
+ * The tag `Encore.setLanguage()` stores and sends, in BCP 47 case (RFC 5646
40
+ * §2.1.1: `PT-br` → `pt-BR`, `zh-hant` → `zh-Hant`, `en-US-X-Twain` →
41
+ * `en-US-x-twain`) with a deprecated language code replaced (`iw` → `he`), or
42
+ * null when it is not well-formed. Nothing is trimmed and `_` is refused, as on
43
+ * every other SDK: the server would otherwise fall back to another language
44
+ * without saying so. (`$` without the `m` flag matches only at the very end, so
45
+ * `'fr\n'` is refused too.)
46
+ */
47
+ export declare function normalizeLanguageTag(value: unknown): string | null;
48
+ /**
49
+ * The deprecated `UserAttributes.language`, and a value it saved, read a locale
50
+ * identifier as its tag: trimmed, cut at `@` (`de_DE@currency=EUR`), `_` as `-`.
51
+ * The server accepted such values there, so a host that sent one keeps its
52
+ * language after the upgrade. `setLanguage()` stays strict.
53
+ */
54
+ export declare function normalizeLegacyLanguageTag(value: unknown): string | null;
38
55
  //# sourceMappingURL=text.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../src/utils/text.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,aAAa,CAAC,GAAG,MAAM,EAAE,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,EAAE,GAAG,MAAM,GAAG,SAAS,CAM1F;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAMxF"}
1
+ {"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../src/utils/text.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,aAAa,CAAC,GAAG,MAAM,EAAE,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,EAAE,GAAG,MAAM,GAAG,SAAS,CAM1F;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAMxF;AAiBD;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAkBlE;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAIxE"}