@guardian/commercial-core 5.0.0 → 5.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.
@@ -28,7 +28,7 @@ declare class AdSize extends Array<number> {
28
28
  get height(): number;
29
29
  }
30
30
  type SizeKeys = '160x600' | '300x1050' | '300x250' | '300x600' | '728x90' | '970x250' | 'billboard' | 'empty' | 'fabric' | 'fluid' | 'googleCard' | 'halfPage' | 'inlineMerchandising' | 'leaderboard' | 'merchandising' | 'merchandisingHigh' | 'merchandisingHighAdFeature' | 'mobilesticky' | 'mpu' | 'outOfPage' | 'outstreamDesktop' | 'outstreamGoogleDesktop' | 'outstreamMobile' | 'portrait' | 'skyscraper' | 'cascade';
31
- type SlotName = 'right' | 'comments' | 'top-above-nav' | 'mostpop' | 'merchandising' | 'merchandising-high' | 'merchandising-high-lucky' | 'survey' | 'im' | 'inline' | 'mostpop' | 'comments' | 'top-above-nav' | 'carrot' | 'epic' | 'mobile-sticky' | 'crossword-banner';
31
+ type SlotName = 'right' | 'comments' | 'top-above-nav' | 'mostpop' | 'merchandising' | 'merchandising-high' | 'merchandising-high-lucky' | 'survey' | 'im' | 'inline' | 'mostpop' | 'comments' | 'top-above-nav' | 'carrot' | 'epic' | 'mobile-sticky' | 'crossword-banner' | 'exclusion';
32
32
  type SizeMapping = Partial<Record<Breakpoint, AdSize[]>>;
33
33
  type SlotSizeMappings = Record<SlotName, SizeMapping>;
34
34
  declare const createAdSize: (width: number, height: number) => AdSize;
@@ -272,6 +272,11 @@ const slotSizeMappings = {
272
272
  tablet: [adSizes.outOfPage, adSizes.empty, adSizes.leaderboard],
273
273
  phablet: [adSizes.outOfPage, adSizes.empty, adSizes.leaderboard],
274
274
  },
275
+ exclusion: {
276
+ mobile: [adSizes.empty],
277
+ phablet: [adSizes.empty],
278
+ desktop: [adSizes.empty],
279
+ },
275
280
  };
276
281
  exports.slotSizeMappings = slotSizeMappings;
277
282
  const getAdSize = (size) => adSizes[size];
@@ -28,7 +28,7 @@ declare class AdSize extends Array<number> {
28
28
  get height(): number;
29
29
  }
30
30
  type SizeKeys = '160x600' | '300x1050' | '300x250' | '300x600' | '728x90' | '970x250' | 'billboard' | 'empty' | 'fabric' | 'fluid' | 'googleCard' | 'halfPage' | 'inlineMerchandising' | 'leaderboard' | 'merchandising' | 'merchandisingHigh' | 'merchandisingHighAdFeature' | 'mobilesticky' | 'mpu' | 'outOfPage' | 'outstreamDesktop' | 'outstreamGoogleDesktop' | 'outstreamMobile' | 'portrait' | 'skyscraper' | 'cascade';
31
- type SlotName = 'right' | 'comments' | 'top-above-nav' | 'mostpop' | 'merchandising' | 'merchandising-high' | 'merchandising-high-lucky' | 'survey' | 'im' | 'inline' | 'mostpop' | 'comments' | 'top-above-nav' | 'carrot' | 'epic' | 'mobile-sticky' | 'crossword-banner';
31
+ type SlotName = 'right' | 'comments' | 'top-above-nav' | 'mostpop' | 'merchandising' | 'merchandising-high' | 'merchandising-high-lucky' | 'survey' | 'im' | 'inline' | 'mostpop' | 'comments' | 'top-above-nav' | 'carrot' | 'epic' | 'mobile-sticky' | 'crossword-banner' | 'exclusion';
32
32
  type SizeMapping = Partial<Record<Breakpoint, AdSize[]>>;
33
33
  type SlotSizeMappings = Record<SlotName, SizeMapping>;
34
34
  declare const createAdSize: (width: number, height: number) => AdSize;
@@ -265,6 +265,11 @@ const slotSizeMappings = {
265
265
  tablet: [adSizes.outOfPage, adSizes.empty, adSizes.leaderboard],
266
266
  phablet: [adSizes.outOfPage, adSizes.empty, adSizes.leaderboard],
267
267
  },
268
+ exclusion: {
269
+ mobile: [adSizes.empty],
270
+ phablet: [adSizes.empty],
271
+ desktop: [adSizes.empty],
272
+ },
268
273
  };
269
274
  const getAdSize = (size) => adSizes[size];
270
275
  // Export for testing
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guardian/commercial-core",
3
- "version": "5.0.0",
3
+ "version": "5.0.1",
4
4
  "description": "Guardian advertising business logic",
5
5
  "homepage": "https://github.com/guardian/commercial-core#readme",
6
6
  "bugs": {