@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.
- package/README.md +66 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/preview.cjs +2 -0
- package/dist/cjs/preview.cjs.map +1 -0
- package/dist/cjs/react.cjs +1 -1
- package/dist/cjs/react.cjs.map +1 -1
- package/dist/esm/chunks/ClaimReminder-DFyrm5bJ.js +2 -0
- package/dist/esm/chunks/ClaimReminder-DFyrm5bJ.js.map +1 -0
- package/dist/esm/chunks/GiftsButton-B0lVB463.js +2 -0
- package/dist/esm/chunks/GiftsButton-B0lVB463.js.map +1 -0
- package/dist/esm/chunks/TriggerHost-CNTiNrTH.js +2 -0
- package/dist/esm/chunks/TriggerHost-CNTiNrTH.js.map +1 -0
- package/dist/esm/chunks/autoPops-CngtK_R0.js +2 -0
- package/dist/esm/chunks/autoPops-CngtK_R0.js.map +1 -0
- package/dist/esm/chunks/customClaim-B4uj-aOc.js +2 -0
- package/dist/esm/chunks/customClaim-B4uj-aOc.js.map +1 -0
- package/dist/esm/chunks/eligibility-BY7fL8Ve.js +2 -0
- package/dist/esm/chunks/eligibility-BY7fL8Ve.js.map +1 -0
- package/dist/esm/chunks/index-CaBSqauy.js +2 -0
- package/dist/esm/chunks/index-CaBSqauy.js.map +1 -0
- package/dist/esm/chunks/lookValues-B9z2VWpH.js +2 -0
- package/dist/esm/chunks/lookValues-B9z2VWpH.js.map +1 -0
- package/dist/esm/chunks/sduiView-Ds7QtFId.js +2 -0
- package/dist/esm/chunks/sduiView-Ds7QtFId.js.map +1 -0
- package/dist/esm/chunks/spot-DkKMLpB-.js +2 -0
- package/dist/esm/chunks/spot-DkKMLpB-.js.map +1 -0
- package/dist/esm/chunks/template-B9p4CbPD.js +2 -0
- package/dist/esm/chunks/template-B9p4CbPD.js.map +1 -0
- package/dist/esm/chunks/textSlots-BnwxUg9V.js +2 -0
- package/dist/esm/chunks/textSlots-BnwxUg9V.js.map +1 -0
- package/dist/esm/chunks/timers-Bva4yoGM.js +2 -0
- package/dist/esm/chunks/timers-Bva4yoGM.js.map +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/preview.js +2 -0
- package/dist/esm/preview.js.map +1 -0
- package/dist/esm/react.js +1 -1
- package/dist/esm/react.js.map +1 -1
- package/dist/umd/encore.min.js +1 -1
- package/dist/umd/encore.min.js.map +1 -1
- package/package.json +9 -1
- package/types/analytics/DiagnosticsOutbox.d.ts +1 -0
- package/types/analytics/DiagnosticsOutbox.d.ts.map +1 -1
- package/types/analytics/events.d.ts +108 -8
- package/types/analytics/events.d.ts.map +1 -1
- package/types/analytics/models.d.ts +2 -0
- package/types/analytics/models.d.ts.map +1 -1
- package/types/analytics/transport.d.ts +6 -0
- package/types/analytics/transport.d.ts.map +1 -1
- package/types/api/APIClient.d.ts +70 -33
- package/types/api/APIClient.d.ts.map +1 -1
- package/types/api/contract.d.ts +4 -1
- package/types/api/contract.d.ts.map +1 -1
- package/types/api/generated/types.d.ts +994 -17
- package/types/api/generated/types.d.ts.map +1 -1
- package/types/api/models.d.ts +29 -8
- package/types/api/models.d.ts.map +1 -1
- package/types/api/offerBuilder.d.ts +51 -0
- package/types/api/offerBuilder.d.ts.map +1 -0
- package/types/core/Configuration.d.ts +9 -0
- package/types/core/Configuration.d.ts.map +1 -1
- package/types/core/Encore.d.ts +145 -3
- package/types/core/Encore.d.ts.map +1 -1
- package/types/core/OfferManager.d.ts +27 -5
- package/types/core/OfferManager.d.ts.map +1 -1
- package/types/core/PlacementBuilder.d.ts +6 -1
- package/types/core/PlacementBuilder.d.ts.map +1 -1
- package/types/core/SignalManager.d.ts.map +1 -1
- package/types/core/StorageManager.d.ts +3 -2
- package/types/core/StorageManager.d.ts.map +1 -1
- package/types/core/StrictUnlockReconciler.d.ts +1 -1
- package/types/core/StrictUnlockReconciler.d.ts.map +1 -1
- package/types/core/claimHandle.d.ts +44 -0
- package/types/core/claimHandle.d.ts.map +1 -0
- package/types/core/claimLog.d.ts +102 -0
- package/types/core/claimLog.d.ts.map +1 -0
- package/types/core/claimRefusal.d.ts +3 -0
- package/types/core/claimRefusal.d.ts.map +1 -0
- package/types/core/claimScreenVariant.d.ts +3 -0
- package/types/core/claimScreenVariant.d.ts.map +1 -0
- package/types/core/claimStatusCheck.d.ts +62 -0
- package/types/core/claimStatusCheck.d.ts.map +1 -0
- package/types/core/giftVariant.d.ts +5 -0
- package/types/core/giftVariant.d.ts.map +1 -1
- package/types/core/hostDisplay.d.ts +9 -2
- package/types/core/hostDisplay.d.ts.map +1 -1
- package/types/core/sduiVariables.d.ts +20 -0
- package/types/core/sduiVariables.d.ts.map +1 -0
- package/types/core/strings.d.ts +114 -0
- package/types/core/strings.d.ts.map +1 -0
- package/types/core/unlockCode.d.ts +12 -2
- package/types/core/unlockCode.d.ts.map +1 -1
- package/types/core/userKeys.d.ts +7 -0
- package/types/core/userKeys.d.ts.map +1 -0
- package/types/core/version.d.ts +1 -1
- package/types/experiments/ExposureOutbox.d.ts +1 -0
- package/types/experiments/ExposureOutbox.d.ts.map +1 -1
- package/types/preview.d.ts +51 -0
- package/types/preview.d.ts.map +1 -0
- package/types/react.d.ts +53 -1
- package/types/react.d.ts.map +1 -1
- package/types/sdui/actions.d.ts +93 -0
- package/types/sdui/actions.d.ts.map +1 -0
- package/types/sdui/bindings.d.ts +63 -0
- package/types/sdui/bindings.d.ts.map +1 -0
- package/types/sdui/compile.d.ts +88 -0
- package/types/sdui/compile.d.ts.map +1 -0
- package/types/sdui/conditions.d.ts +22 -0
- package/types/sdui/conditions.d.ts.map +1 -0
- package/types/sdui/context.d.ts +132 -0
- package/types/sdui/context.d.ts.map +1 -0
- package/types/sdui/countdown.d.ts +31 -0
- package/types/sdui/countdown.d.ts.map +1 -0
- package/types/sdui/decode.d.ts +35 -0
- package/types/sdui/decode.d.ts.map +1 -0
- package/types/sdui/deps.d.ts +43 -0
- package/types/sdui/deps.d.ts.map +1 -0
- package/types/sdui/dominantColor.d.ts +24 -0
- package/types/sdui/dominantColor.d.ts.map +1 -0
- package/types/sdui/elements/confetti.d.ts +38 -0
- package/types/sdui/elements/confetti.d.ts.map +1 -0
- package/types/sdui/elements/content.d.ts +27 -0
- package/types/sdui/elements/content.d.ts.map +1 -0
- package/types/sdui/elements/interactive.d.ts +48 -0
- package/types/sdui/elements/interactive.d.ts.map +1 -0
- package/types/sdui/elements/layout.d.ts +41 -0
- package/types/sdui/elements/layout.d.ts.map +1 -0
- package/types/sdui/elements/marquee.d.ts +17 -0
- package/types/sdui/elements/marquee.d.ts.map +1 -0
- package/types/sdui/elements/progress.d.ts +10 -0
- package/types/sdui/elements/progress.d.ts.map +1 -0
- package/types/sdui/elements/shared.d.ts +138 -0
- package/types/sdui/elements/shared.d.ts.map +1 -0
- package/types/sdui/elements/symbols.d.ts +22 -0
- package/types/sdui/elements/symbols.d.ts.map +1 -0
- package/types/sdui/elements/triggerText.d.ts +55 -0
- package/types/sdui/elements/triggerText.d.ts.map +1 -0
- package/types/sdui/host.d.ts +274 -0
- package/types/sdui/host.d.ts.map +1 -0
- package/types/sdui/inlineMarkup.d.ts +22 -0
- package/types/sdui/inlineMarkup.d.ts.map +1 -0
- package/types/sdui/lookValues.d.ts +50 -0
- package/types/sdui/lookValues.d.ts.map +1 -0
- package/types/sdui/model.d.ts +130 -0
- package/types/sdui/model.d.ts.map +1 -0
- package/types/sdui/motion.d.ts +37 -0
- package/types/sdui/motion.d.ts.map +1 -0
- package/types/sdui/precheck.d.ts +94 -0
- package/types/sdui/precheck.d.ts.map +1 -0
- package/types/sdui/scrollMath.d.ts +32 -0
- package/types/sdui/scrollMath.d.ts.map +1 -0
- package/types/sdui/style.d.ts +99 -0
- package/types/sdui/style.d.ts.map +1 -0
- package/types/sdui/triggerKit.d.ts +24 -0
- package/types/sdui/triggerKit.d.ts.map +1 -0
- package/types/sdui/unrunnable.d.ts +11 -0
- package/types/sdui/unrunnable.d.ts.map +1 -0
- package/types/sdui/vocabulary.d.ts +119 -0
- package/types/sdui/vocabulary.d.ts.map +1 -0
- package/types/triggers/claimReminder/ClaimReminder.d.ts +65 -0
- package/types/triggers/claimReminder/ClaimReminder.d.ts.map +1 -0
- package/types/triggers/claimReminder/bindings.d.ts +40 -0
- package/types/triggers/claimReminder/bindings.d.ts.map +1 -0
- package/types/triggers/claimReminder/config.d.ts +56 -0
- package/types/triggers/claimReminder/config.d.ts.map +1 -0
- package/types/triggers/claimReminder/eligibility.d.ts +37 -0
- package/types/triggers/claimReminder/eligibility.d.ts.map +1 -0
- package/types/triggers/claimReminder/servedWindow.d.ts +15 -0
- package/types/triggers/claimReminder/servedWindow.d.ts.map +1 -0
- package/types/triggers/claimReminder/source.d.ts +29 -0
- package/types/triggers/claimReminder/source.d.ts.map +1 -0
- package/types/triggers/giftsButton/GiftsButton.d.ts +60 -0
- package/types/triggers/giftsButton/GiftsButton.d.ts.map +1 -0
- package/types/triggers/giftsButton/config.d.ts +53 -0
- package/types/triggers/giftsButton/config.d.ts.map +1 -0
- package/types/triggers/giftsButton/spot.d.ts +54 -0
- package/types/triggers/giftsButton/spot.d.ts.map +1 -0
- package/types/triggers/host/TriggerHost.d.ts +127 -0
- package/types/triggers/host/TriggerHost.d.ts.map +1 -0
- package/types/triggers/host/autoPops.d.ts +16 -0
- package/types/triggers/host/autoPops.d.ts.map +1 -0
- package/types/triggers/host/configCache.d.ts +29 -0
- package/types/triggers/host/configCache.d.ts.map +1 -0
- package/types/triggers/host/customClaim.d.ts +85 -0
- package/types/triggers/host/customClaim.d.ts.map +1 -0
- package/types/triggers/host/dismissStore.d.ts +37 -0
- package/types/triggers/host/dismissStore.d.ts.map +1 -0
- package/types/triggers/host/readThrottle.d.ts +15 -0
- package/types/triggers/host/readThrottle.d.ts.map +1 -0
- package/types/triggers/host/registry.d.ts +17 -0
- package/types/triggers/host/registry.d.ts.map +1 -0
- package/types/triggers/host/sduiView.d.ts +31 -0
- package/types/triggers/host/sduiView.d.ts.map +1 -0
- package/types/triggers/host/template.d.ts +28 -0
- package/types/triggers/host/template.d.ts.map +1 -0
- package/types/triggers/host/textSlots.d.ts +35 -0
- package/types/triggers/host/textSlots.d.ts.map +1 -0
- package/types/triggers/host/theme.d.ts +87 -0
- package/types/triggers/host/theme.d.ts.map +1 -0
- package/types/triggers/host/timers.d.ts +11 -0
- package/types/triggers/host/timers.d.ts.map +1 -0
- package/types/triggers/host/types.d.ts +278 -0
- package/types/triggers/host/types.d.ts.map +1 -0
- package/types/triggers/host/wire.d.ts +55 -0
- package/types/triggers/host/wire.d.ts.map +1 -0
- package/types/triggers/preview.d.ts +78 -0
- package/types/triggers/preview.d.ts.map +1 -0
- package/types/triggers/request.d.ts +53 -0
- package/types/triggers/request.d.ts.map +1 -0
- package/types/types.d.ts +420 -4
- package/types/types.d.ts.map +1 -1
- package/types/ui/ClaimScreen.d.ts +62 -0
- package/types/ui/ClaimScreen.d.ts.map +1 -0
- package/types/ui/CodeUnlock.d.ts +26 -2
- package/types/ui/CodeUnlock.d.ts.map +1 -1
- package/types/ui/GiftHero.d.ts.map +1 -1
- package/types/ui/GiftList.d.ts.map +1 -1
- package/types/ui/GiftPicker.d.ts.map +1 -1
- package/types/ui/GiftPickerHero.d.ts.map +1 -1
- package/types/ui/GiftReveal.d.ts.map +1 -1
- package/types/ui/GiftSheet.d.ts +5 -5
- package/types/ui/GiftSheet.d.ts.map +1 -1
- package/types/ui/GiftUnwrap.d.ts.map +1 -1
- package/types/ui/OfferCard.d.ts.map +1 -1
- package/types/ui/OfferCarousel.d.ts.map +1 -1
- package/types/ui/OfferModal.d.ts +31 -6
- package/types/ui/OfferModal.d.ts.map +1 -1
- package/types/ui/PrimerScreen.d.ts +2 -0
- package/types/ui/PrimerScreen.d.ts.map +1 -1
- package/types/ui/RedemptionScreen.d.ts +5 -0
- package/types/ui/RedemptionScreen.d.ts.map +1 -1
- package/types/ui/RewardActions.d.ts.map +1 -1
- package/types/ui/RewardCard.d.ts.map +1 -1
- package/types/ui/SduiRewardSurface.d.ts +145 -0
- package/types/ui/SduiRewardSurface.d.ts.map +1 -0
- package/types/ui/Tooltip.d.ts.map +1 -1
- package/types/ui/brandComponents.d.ts.map +1 -1
- package/types/ui/brandTint.d.ts.map +1 -1
- package/types/ui/colorScheme.d.ts +15 -0
- package/types/ui/colorScheme.d.ts.map +1 -0
- package/types/ui/covered.d.ts +12 -0
- package/types/ui/covered.d.ts.map +1 -0
- package/types/ui/giftCategoryGroups.d.ts +13 -0
- package/types/ui/giftCategoryGroups.d.ts.map +1 -1
- package/types/ui/giftCopy.d.ts +14 -9
- package/types/ui/giftCopy.d.ts.map +1 -1
- package/types/ui/giftUnwrapCopy.d.ts.map +1 -1
- package/types/ui/imageURL.d.ts +44 -0
- package/types/ui/imageURL.d.ts.map +1 -0
- package/types/ui/impressionGate.d.ts +9 -0
- package/types/ui/impressionGate.d.ts.map +1 -1
- package/types/ui/offerBadge.d.ts.map +1 -1
- package/types/ui/rewardSurface.d.ts +11 -1
- package/types/ui/rewardSurface.d.ts.map +1 -1
- package/types/ui/sduiTheme.d.ts +48 -0
- package/types/ui/sduiTheme.d.ts.map +1 -0
- package/types/ui/sheetDetents.d.ts +28 -0
- package/types/ui/sheetDetents.d.ts.map +1 -0
- package/types/ui/styles.d.ts +11 -8
- package/types/ui/styles.d.ts.map +1 -1
- package/types/ui/termsLine.d.ts +3 -3
- package/types/ui/termsLine.d.ts.map +1 -1
- package/types/ui/toast.d.ts +11 -0
- package/types/ui/toast.d.ts.map +1 -0
- package/types/utils/logger.d.ts +10 -0
- package/types/utils/logger.d.ts.map +1 -1
- package/types/utils/text.d.ts +17 -0
- package/types/utils/text.d.ts.map +1 -1
package/types/ui/giftCopy.d.ts
CHANGED
|
@@ -23,6 +23,9 @@ import type { OfferModel as Offer } from '../api/models';
|
|
|
23
23
|
/**
|
|
24
24
|
* Copy the gift presentation hard-codes, mirroring `RewardActions`' REWARD_COPY.
|
|
25
25
|
* Named so tests can assert by symbol rather than by literal.
|
|
26
|
+
*
|
|
27
|
+
* Every key reads through the strings provider as `gift.<key>`, with the English
|
|
28
|
+
* below as the fallback (see `core/strings.ts`).
|
|
26
29
|
*/
|
|
27
30
|
export declare const GIFT_COPY: {
|
|
28
31
|
/** Row / CTA fallback when the offer carries no usable name at all. */
|
|
@@ -72,19 +75,19 @@ export declare const GIFT_COPY: {
|
|
|
72
75
|
readonly sheetTitle: "Other gifts";
|
|
73
76
|
/** Under the CTA. A middot separator, matching the artifact. */
|
|
74
77
|
readonly terms: "One gift per person · Offer terms";
|
|
75
|
-
/** `giftPicker`: the same sentence
|
|
76
|
-
readonly
|
|
78
|
+
/** `giftPicker`: the same sentence as ONE template, `${link}` holding "Offer terms". */
|
|
79
|
+
readonly pickerTermsLine: "One gift per person · ${link}";
|
|
77
80
|
readonly pickerTermsLink: "Offer terms";
|
|
78
81
|
/** `giftPicker`: the underlined link above the CTA that opens the other-gifts sheet. */
|
|
79
82
|
readonly moreGifts: "More gifts";
|
|
80
83
|
/** `giftPicker`'s CTA fallback when nothing about the gift fits the label. */
|
|
81
84
|
readonly getFallback: "Get your gift";
|
|
82
85
|
/**
|
|
83
|
-
* The `giftList` / `giftUnwrap` terms line,
|
|
84
|
-
* link
|
|
85
|
-
*
|
|
86
|
+
* The `giftList` / `giftUnwrap` terms line, ONE template whose `${link}` is the
|
|
87
|
+
* link run (`termsLink`), so a translation places the link where its grammar puts
|
|
88
|
+
* it. Rendered by `ui/termsLine.ts`.
|
|
86
89
|
*/
|
|
87
|
-
readonly
|
|
90
|
+
readonly termsLine: "By proceeding you agree to our ${link}";
|
|
88
91
|
readonly termsLink: "offer terms";
|
|
89
92
|
/** The gift radio group's accessible name. Screen-reader copy is still copy. */
|
|
90
93
|
readonly chooseLabel: "Choose your gift";
|
|
@@ -93,10 +96,12 @@ export declare const GIFT_COPY: {
|
|
|
93
96
|
/** The sheet's category tab strip, for assistive tech. Only rendered with 2+ tabs. */
|
|
94
97
|
readonly sheetCategoriesLabel: "Gift categories";
|
|
95
98
|
/**
|
|
96
|
-
* `giftList`: the
|
|
97
|
-
*
|
|
99
|
+
* `giftList`: the row above the headline, ONE template whose `${logo}` is the host
|
|
100
|
+
* app's icon, so a translation places the icon where its grammar puts it. The icon IS
|
|
101
|
+
* the subject; without one the row is omitted. Spacing comes from the row's gap, so
|
|
102
|
+
* whitespace around the slot is ignored. Rendered by `GiftList.renderHero`.
|
|
98
103
|
*/
|
|
99
|
-
readonly presents: "Presents";
|
|
104
|
+
readonly presents: "${logo} Presents";
|
|
100
105
|
/** `giftList`: the link under the rows that opens the "Other gifts" sheet. */
|
|
101
106
|
readonly showMore: "Show more gifts";
|
|
102
107
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"giftCopy.d.ts","sourceRoot":"","sources":["../../src/ui/giftCopy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,UAAU,IAAI,KAAK,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"giftCopy.d.ts","sourceRoot":"","sources":["../../src/ui/giftCopy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,UAAU,IAAI,KAAK,EAAE,MAAM,eAAe,CAAC;AAIzD;;;;;;GAMG;AACH,eAAO,MAAM,SAAS;IACpB,uEAAuE;;IAEvE;;;;OAIG;;IAEH,uFAAuF;;IAEvF;;;;;;;OAOG;;;IASH;;;;;;;;;;;;;;;OAeG;;IAEH;qFACiF;;IAEjF;;;OAGG;;IAEH,gEAAgE;;IAEhE,wFAAwF;;;IAGxF,wFAAwF;;IAExF,8EAA8E;;IAE9E;;;;OAIG;;;IAGH,gFAAgF;;IAEhF,iCAAiC;;IAEjC,sFAAsF;;IAEtF;;;;;OAKG;;IAEH,8EAA8E;;CAErE,CAAC;AAeZ,iFAAiF;AACjF,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,KAAK,CAAC;AAE1C;;;;;;;;;;GAUG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,GAAG,SAAS,CAUzD;AAsBD;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAItB,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,aAAa,GAAG,OAAO,CAAC,CAAC,GAC5D,MAAM,GAAG,SAAS,CAEpB;AAED,oFAAoF;AACpF,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,WAAW,CAKrD;AAED,mFAAmF;AACnF,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,KAAK,GAAG,kBAAkB,CAInE;AAiBD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,GAAE,WAAqB,GAAG,MAAM,CAmB9E;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAa1F;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAG1D;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAGjE;AA4BD;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAoBnF;AAED,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAavF;AAYD;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAenF"}
|
|
@@ -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;
|
|
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;AAKzD,eAAO,MAAM,WAAW;IACtB,0DAA0D;;IAE1D,uEAAuE;;IAEvE;yDACqD;;IAErD,kEAAkE;;;CAGzD,CAAC;AAEZ;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAOvD;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,CAGrD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,EAAE,CA2BzD;AAED;;;;GAIG;AACH,eAAO,MAAM,UAAU;;;IAGrB,kFAAkF;;IAElF,yFAAyF;;IAEzF,gFAAgF;;CAEvE,CAAC;AAEZ;;;GAGG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,KAAK,GAAG,SAAS,GAAG,MAAM,CAG3D"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { OfferModel } from '../api/models';
|
|
2
|
+
/** Widths the asset CDN serves at `/w/{W}/{path}`. */
|
|
3
|
+
export declare const IMAGE_WIDTH_LADDER: readonly [320, 640, 960, 1280];
|
|
4
|
+
/**
|
|
5
|
+
* Must match PUBLIC_ROOTS in the backend. A prefix missing here fails nowhere:
|
|
6
|
+
* the image is just fetched at full size forever. 256 of the 320 bucket-hosted
|
|
7
|
+
* creative logos are under /organizations/.
|
|
8
|
+
*/
|
|
9
|
+
export declare const LADDER_PATH_PREFIXES: string[];
|
|
10
|
+
/** Rendered CSS width of the offer card banner, the largest image the SDK draws. */
|
|
11
|
+
export declare const OFFER_BANNER_CSS_WIDTH = 460;
|
|
12
|
+
/** Width every logo and icon resolves at (Swift `logoWidthPoints`); all draw at 96px or less. */
|
|
13
|
+
export declare const LOGO_CSS_WIDTH = 96;
|
|
14
|
+
/** Width SDUI pictures resolve at (Swift `defaultCardWidthPoints`): the 720px stage, or the viewport. */
|
|
15
|
+
export declare function cardCssWidth(): number;
|
|
16
|
+
/** Smallest ladder width at least `renderedWidthCssPx * devicePixelRatio`, capped at the largest. */
|
|
17
|
+
export declare function resolveImageURL(url: string, renderedWidthCssPx: number, devicePixelRatio: number): string;
|
|
18
|
+
/** `srcset` over the whole ladder, or undefined for hosts without variants. */
|
|
19
|
+
export declare function ladderSrcset(url: string): string | undefined;
|
|
20
|
+
/** The original a ladder URL was resolved from, for when its variant cannot be served. Swift: `originalURL(fromLadder:)`. */
|
|
21
|
+
export declare function originalFromLadder(url: string): string | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Point `img` at a safe `src` sized for `cssWidth`. Pass `lazy: false` for images
|
|
24
|
+
* that load while detached or hidden (a lazy image there does not load until shown).
|
|
25
|
+
* `recordDraw: false` is for a preload, which is not a view the impression can wait on.
|
|
26
|
+
*/
|
|
27
|
+
export declare function setImageSource(img: HTMLImageElement, src: string, cssWidth: number, lazy?: boolean, recordDraw?: boolean): void;
|
|
28
|
+
/** Lets `imageCacheHit` see an image the SDK draws as a CSS background. */
|
|
29
|
+
export declare function trackBackgroundImage(url: string): void;
|
|
30
|
+
/** Test seam: how many background probes are still held. */
|
|
31
|
+
export declare function pendingBackgroundProbes(): number;
|
|
32
|
+
/** Test seam: forgets every recorded draw, load, failure and probe. */
|
|
33
|
+
export declare function resetImageReadinessForTesting(): void;
|
|
34
|
+
/** Drop the ladder candidates so a fallback `src` (placeholder) actually shows. */
|
|
35
|
+
export declare function clearImageSource(img: HTMLImageElement): void;
|
|
36
|
+
/** Warm the browser cache for one image, choosing the same candidate the render will. */
|
|
37
|
+
export declare function preloadImage(url: string | undefined, cssWidth: number): void;
|
|
38
|
+
/**
|
|
39
|
+
* `image_cache_hit`, ready when shown, with Swift's rule: only the picture counts, the creative
|
|
40
|
+
* else the logo. First, whether it was already loaded when the SDK drew it. With no draw yet,
|
|
41
|
+
* what the page shows now, then a successful earlier load. Undefined when it cannot tell.
|
|
42
|
+
*/
|
|
43
|
+
export declare function imageCacheHit(offer: Pick<OfferModel, 'imageUrl' | 'logoUrl'>): boolean | undefined;
|
|
44
|
+
//# sourceMappingURL=imageURL.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"imageURL.d.ts","sourceRoot":"","sources":["../../src/ui/imageURL.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGhD,sDAAsD;AACtD,eAAO,MAAM,kBAAkB,gCAAiC,CAAC;AAIjE;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,UAAkG,CAAC;AAEpI,oFAAoF;AACpF,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAE1C,iGAAiG;AACjG,eAAO,MAAM,cAAc,KAAK,CAAC;AAEjC,yGAAyG;AACzG,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAkBD,qGAAqG;AACrG,wBAAgB,eAAe,CAC7B,GAAG,EAAE,MAAM,EACX,kBAAkB,EAAE,MAAM,EAC1B,gBAAgB,EAAE,MAAM,GACvB,MAAM,CAOR;AAED,+EAA+E;AAC/E,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAI5D;AAED,6HAA6H;AAC7H,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CASlE;AAwBD;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,GAAG,EAAE,gBAAgB,EACrB,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,MAAM,EAChB,IAAI,UAAO,EACX,UAAU,UAAO,GAChB,IAAI,CAsBN;AAiCD,2EAA2E;AAC3E,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAUtD;AAED,4DAA4D;AAC5D,wBAAgB,uBAAuB,IAAI,MAAM,CAEhD;AAED,uEAAuE;AACvE,wBAAgB,6BAA6B,IAAI,IAAI,CAKpD;AAED,mFAAmF;AACnF,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,gBAAgB,GAAG,IAAI,CAG5D;AAED,yFAAyF;AACzF,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAG5E;AAiBD;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,IAAI,CAAC,UAAU,EAAE,UAAU,GAAG,SAAS,CAAC,GAAG,OAAO,GAAG,SAAS,CAclG"}
|
|
@@ -19,6 +19,15 @@
|
|
|
19
19
|
*/
|
|
20
20
|
/** The share of an element that must be inside the viewport for it to count as seen. */
|
|
21
21
|
export declare const IMPRESSION_VISIBLE_RATIO = 0.5;
|
|
22
|
+
/**
|
|
23
|
+
* The ratios the observer reports at.
|
|
24
|
+
*
|
|
25
|
+
* A single `0.5` threshold only delivers a callback when the ELEMENT ratio crosses one
|
|
26
|
+
* half, which an element larger than the viewport never does — so the moment it comes
|
|
27
|
+
* to fill the screen would arrive unannounced. The ramp costs a handful of extra
|
|
28
|
+
* callbacks and makes that moment observable to within a tenth of the element.
|
|
29
|
+
*/
|
|
30
|
+
export declare const OBSERVER_THRESHOLDS: number[];
|
|
22
31
|
/**
|
|
23
32
|
* How much of an element counts as on screen, as a share of the SMALLER of the element
|
|
24
33
|
* and the viewport.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"impressionGate.d.ts","sourceRoot":"","sources":["../../src/ui/impressionGate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,wFAAwF;AACxF,eAAO,MAAM,wBAAwB,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"impressionGate.d.ts","sourceRoot":"","sources":["../../src/ui/impressionGate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,wFAAwF;AACxF,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAE5C;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,UAAsD,CAAC;AAavF;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,yBAAyB,GAAG,MAAM,CAarE;AAED,MAAM,WAAW,6BAA6B;IAC5C,oFAAoF;IACpF,QAAQ,CAAC,EAAE,MAAM,OAAO,CAAC;CAC1B;AASD,qBAAa,cAAc;;gBAmBb,OAAO,GAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAO;IAIhD;;;OAGG;IACH,QAAQ,CACN,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,IAAI,EACnB,OAAO,GAAE,6BAAkC,GAC1C,MAAM,IAAI;IAwBb,gFAAgF;IAChF,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAM3C,6EAA6E;IAC7E,OAAO,IAAI,IAAI;IAOf,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO;IAI9B,OAAO,IAAI,IAAI;CA+OhB;AAED;;;GAGG;AACH,qBAAa,eAAe;;gBAId,IAAI,EAAE,cAAc;IAIhC,QAAQ,CACN,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,IAAI,EACnB,OAAO,CAAC,EAAE,6BAA6B,GACtC,IAAI;IAIP,KAAK,IAAI,IAAI;CAKd"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"offerBadge.d.ts","sourceRoot":"","sources":["../../src/ui/offerBadge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;
|
|
1
|
+
{"version":3,"file":"offerBadge.d.ts","sourceRoot":"","sources":["../../src/ui/offerBadge.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAGH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGhD;;;;;;;;GAQG;AACH,KAAK,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,YAAY,GAAG,MAAM,GAAG,aAAa,GAAG,OAAO,CAAC,CAAC,CAAC;AA8D9F;;;;;GAKG;AACH,eAAO,MAAM,aAAa,cAAc,CAAC;AAGzC,yEAAyE;AACzE,wBAAgB,cAAc,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,GAAG,MAAM,CASrE;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,WAAW,GAAG,SAAS,GAAG,OAAO,CAExE"}
|
|
@@ -39,10 +39,20 @@ import type { OfferModel as Offer } from '../api/models';
|
|
|
39
39
|
* way to express that distinction, so it is disabled here specifically.
|
|
40
40
|
*/
|
|
41
41
|
export type RewardSurfaceEventMap = {
|
|
42
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* The user asked to claim the given offer. The ONLY entry point to the claim flow.
|
|
44
|
+
*
|
|
45
|
+
* `successState` is the served variant's `onSuccessState`, and only the SDUI
|
|
46
|
+
* surface ever sets it: the four hand-written surfaces author no post-claim
|
|
47
|
+
* screen. When it is present the flow keeps the sheet up and moves the variant
|
|
48
|
+
* to that state instead of dismissing, which is what iOS does in
|
|
49
|
+
* `OfferSheetViewModel.finishClaimFlow`. Delivery then happens on the sheet's
|
|
50
|
+
* close, through the claim latch every dismissal path already reads.
|
|
51
|
+
*/
|
|
43
52
|
offerClaim: {
|
|
44
53
|
offer: Offer;
|
|
45
54
|
index: number;
|
|
55
|
+
successState?: string;
|
|
46
56
|
};
|
|
47
57
|
/** An impression: this offer was seen. Grain differs per surface — see GiftReveal. */
|
|
48
58
|
offerView: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rewardSurface.d.ts","sourceRoot":"","sources":["../../src/ui/rewardSurface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAAE,UAAU,IAAI,KAAK,EAAE,MAAM,eAAe,CAAC;AAEzD;;;;;;;;;;;;;;GAcG;AAEH,MAAM,MAAM,qBAAqB,GAAG;IAClC
|
|
1
|
+
{"version":3,"file":"rewardSurface.d.ts","sourceRoot":"","sources":["../../src/ui/rewardSurface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAAE,UAAU,IAAI,KAAK,EAAE,MAAM,eAAe,CAAC;AAEzD;;;;;;;;;;;;;;GAcG;AAEH,MAAM,MAAM,qBAAqB,GAAG;IAClC;;;;;;;;;OASG;IACH,UAAU,EAAE;QAAE,KAAK,EAAE,KAAK,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACnE,sFAAsF;IACtF,SAAS,EAAE;QAAE,KAAK,EAAE,KAAK,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3C,sEAAsE;IACtE,WAAW,EAAE;QAAE,KAAK,EAAE,KAAK,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7C,qBAAqB;IACrB,YAAY,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IAChC,2DAA2D;IAC3D,MAAM,EAAE;QAAE,IAAI,EAAE,YAAY,GAAG,UAAU,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9D,uEAAuE;IACvE,QAAQ,EAAE;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;CAChC,CAAC;AAEF,MAAM,WAAW,aAAa;IAC5B,EAAE,CAAC,CAAC,SAAS,MAAM,qBAAqB,EACtC,KAAK,EAAE,CAAC,EACR,OAAO,EAAE,CAAC,OAAO,EAAE,qBAAqB,CAAC,CAAC,CAAC,KAAK,IAAI,GACnD,MAAM,IAAI,CAAC;IACd,MAAM,IAAI,WAAW,CAAC;IACtB,OAAO,IAAI,IAAI,CAAC;IAChB,uFAAuF;IACvF,aAAa,IAAI,IAAI,CAAC;IACtB,cAAc,IAAI,MAAM,CAAC;IACzB,eAAe,IAAI,MAAM,CAAC;IAC1B,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,IAAI,IAAI,IAAI,CAAC;CACd"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The host half of an SDUI colour: a variant names a token, this says what it is.
|
|
3
|
+
*
|
|
4
|
+
* A served variant never carries a palette. It names `{"appearance": "accent"}` or
|
|
5
|
+
* `{"semantic": "secondaryLabel"}` and the HOST decides, which is how one template
|
|
6
|
+
* renders in a publisher's own colours. iOS does the same in `Appearance(from:
|
|
7
|
+
* uiValues, overrides:)`.
|
|
8
|
+
*
|
|
9
|
+
* Every token resolves to something. A token the host leaves out resolves to
|
|
10
|
+
* nothing and simply does not paint, and a missing
|
|
11
|
+
* `secondarySystemGroupedBackground` costs the offer rows their card backgrounds,
|
|
12
|
+
* which reads as an engine layout bug rather than a gap here. The defaults below
|
|
13
|
+
* are iOS light mode, so the floor is a sheet that looks like the native one.
|
|
14
|
+
*
|
|
15
|
+
* `binding` and the `lighten` / `darken` / `opacity` transforms are NOT handled
|
|
16
|
+
* here: the engine resolves those against its own values dictionary and calls
|
|
17
|
+
* this only for the base operand.
|
|
18
|
+
*/
|
|
19
|
+
/** What a publisher can override, which is the same three the surfaces take. */
|
|
20
|
+
export interface SduiThemeOverrides {
|
|
21
|
+
/** `appearance.accentColor`: buttons, selection rings, the highlighted run. */
|
|
22
|
+
accent?: string;
|
|
23
|
+
/** `appearance.backgroundColor`: the sheet behind the cards. */
|
|
24
|
+
background?: string;
|
|
25
|
+
/** `appearance.textColor`: the primary label colour. */
|
|
26
|
+
text?: string;
|
|
27
|
+
/** The server's `values.appearance.accentColor`, below a publisher's `accent`. */
|
|
28
|
+
serverAccent?: string | null | undefined;
|
|
29
|
+
/** The server's `values.appearance.accentTitleColor`. */
|
|
30
|
+
serverAccentTitle?: string | null | undefined;
|
|
31
|
+
/** The presentation's colour scheme; see `ui/colorScheme.ts`. Light when absent. */
|
|
32
|
+
scheme?: 'light' | 'dark' | undefined;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Resolve an SDUI colour operand for this presentation.
|
|
36
|
+
*
|
|
37
|
+
* The accents resolve as Swift's `Appearance(from:)` does, from the server's
|
|
38
|
+
* values, with a publisher's own `accent` on top because only web has one. An
|
|
39
|
+
* override reaches more than the token it names: `text` moves the three label
|
|
40
|
+
* tokens that ARE the primary label.
|
|
41
|
+
*/
|
|
42
|
+
export declare function createSduiColorResolver(overrides?: SduiThemeOverrides): (raw: unknown) => string | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* A hex as Swift's `Color(hex:)` reads it: `#` optional, and 8 digits are AARRGGBB,
|
|
45
|
+
* where CSS reads RRGGBBAA. Anything else is dropped.
|
|
46
|
+
*/
|
|
47
|
+
export declare function swiftHex(raw: string): string | undefined;
|
|
48
|
+
//# sourceMappingURL=sduiTheme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sduiTheme.d.ts","sourceRoot":"","sources":["../../src/ui/sduiTheme.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,gFAAgF;AAChF,MAAM,WAAW,kBAAkB;IACjC,+EAA+E;IAC/E,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gEAAgE;IAChE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,wDAAwD;IACxD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kFAAkF;IAClF,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACzC,yDAAyD;IACzD,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC9C,oFAAoF;IACpF,MAAM,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;CACvC;AAiDD;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACrC,SAAS,GAAE,kBAAuB,GACjC,CAAC,GAAG,EAAE,OAAO,KAAK,MAAM,GAAG,SAAS,CAmDtC;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAIxD"}
|
|
@@ -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"}
|
package/types/ui/styles.d.ts
CHANGED
|
@@ -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.
|
|
16
|
+
* it does.
|
|
17
17
|
*
|
|
18
|
-
* The stylesheet is
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
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
|
-
*
|
|
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
|
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
|
|
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"}
|
package/types/ui/termsLine.d.ts
CHANGED
|
@@ -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 `
|
|
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
|
|
30
|
-
|
|
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;
|
|
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"}
|
package/types/utils/logger.d.ts
CHANGED
|
@@ -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"}
|
package/types/utils/text.d.ts
CHANGED
|
@@ -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"}
|