@temple-wallet/extension-ads 10.0.0 → 10.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -67,6 +67,9 @@ interface RawPermanentAdPlacesRule {
67
67
  stylesOverrides?: AdStylesOverrides[];
68
68
  shouldHideOriginal?: boolean;
69
69
  displayWidth?: string;
70
+ supportsTheming?: boolean;
71
+ fontSampleSelector?: string;
72
+ enableForNonMises?: boolean;
70
73
  }
71
74
  interface RawAdProvidersRule {
72
75
  urlRegexes: string[];
@@ -121,6 +124,9 @@ interface InsertAdActionProps extends Pick<RawPermanentAdPlacesRule, 'wrapperSty
121
124
  originalHeight: number;
122
125
  shouldUseBlurredBackground?: boolean;
123
126
  adCategories: string[];
127
+ themeColor?: string;
128
+ fontSize?: number;
129
+ lineHeight?: number;
124
130
  }
125
131
  interface ReplaceAllChildrenWithAdAction extends AdActionBase, InsertAdActionProps {
126
132
  type: AdActionType.ReplaceAllChildren;
@@ -185,6 +191,15 @@ interface AdsRules {
185
191
 
186
192
  declare const getAdsActions: ({ providersSelectors, providersNegativeSelectors, adPlacesRules, permanentAdPlacesRules, elementsToHideOrRemoveRules }: AdsRules) => Promise<AdAction[]>;
187
193
 
194
+ interface AdsStackIframeURLParams {
195
+ id: string;
196
+ adsMetadataIds: any[];
197
+ origin: string;
198
+ adCategories: string[];
199
+ themeColor?: string;
200
+ fontSize?: number;
201
+ lineHeight?: number;
202
+ }
188
203
  interface IAdsConfiguration {
189
204
  adsTwWindowUrl: string;
190
205
  tkeyInpageAdUrl: string;
@@ -192,7 +207,7 @@ interface IAdsConfiguration {
192
207
  swapTkeyUrl: string;
193
208
  externalAdsActivityMessageType: string;
194
209
  personaIframePath: string;
195
- getAdsStackIframeURL: (id: string, adsMetadataIds: (number | AdMetadata)[], origin: string, adCategories: string[]) => string;
210
+ getAdsStackIframeURL: (params: AdsStackIframeURLParams) => string;
196
211
  buildNativeAdsMeta: (containerWidth: number, containerHeight: number) => AdMetadata[];
197
212
  bannerAdsMeta: AdMetadata[];
198
213
  extVersion: string;
@@ -204,12 +219,26 @@ declare const configureAds: (config: IAdsConfiguration) => void;
204
219
 
205
220
  declare const executeAdsActions: (adsActions: AdAction[]) => Promise<PromiseSettledResult<void>[]>;
206
221
 
222
+ interface AdThemeParams {
223
+ themeColor?: string;
224
+ fontSize?: number;
225
+ lineHeight?: number;
226
+ }
227
+
228
+ interface AdsStackParams extends AdThemeParams {
229
+ id: string;
230
+ initialAdsMetadata: (number | AdMetadata)[];
231
+ origin: string;
232
+ pageHasPlacesRules: boolean;
233
+ adCategories: string[];
234
+ hypelabBlacklistedCampaignsSlugs: string[];
235
+ }
207
236
  /**
208
237
  * Tries to render specified ads one-by-one until one of them is loaded or loading of all of them failed. Use it
209
238
  * in a dedicated iframe. Sends messages to the parent window on an attempt to render an ad, on successful rendering,
210
239
  * on ad resize, and on error.
211
240
  */
212
- declare const renderAdsStack: (adId: string, adsMetadata: (number | AdMetadata)[], origin: string, pageHasPlacesRules: boolean | undefined, adCategories: string[], hypelabBlacklistedCampaignsSlugs: string[]) => void;
241
+ declare const renderAdsStack: (params: AdsStackParams) => void;
213
242
 
214
243
  declare const transformRawRules: (locationOrHref: Location | string, rules: RawAllAdsRules) => AdsRules;
215
244