@guardian/commercial-core 5.0.1 → 5.1.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.
@@ -27,7 +27,7 @@ declare class AdSize extends Array<number> {
27
27
  get width(): number;
28
28
  get height(): number;
29
29
  }
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';
30
+ type SizeKeys = '160x600' | '300x1050' | '300x250' | '300x600' | '728x90' | '970x250' | 'billboard' | 'cascade' | 'empty' | 'fabric' | 'fluid' | 'googleCard' | 'halfPage' | 'inlineMerchandising' | 'leaderboard' | 'merchandising' | 'merchandisingHigh' | 'merchandisingHighAdFeature' | 'mobilesticky' | 'mpu' | 'outOfPage' | 'outstreamDesktop' | 'outstreamGoogleDesktop' | 'outstreamMobile' | 'portrait' | 'portraitInterstitial' | 'skyscraper';
31
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>;
@@ -61,6 +61,7 @@ const namedStandardAdSizes = {
61
61
  portrait: createAdSize(300, 1050),
62
62
  skyscraper: createAdSize(160, 600),
63
63
  cascade: createAdSize(940, 230),
64
+ portraitInterstitial: createAdSize(320, 480),
64
65
  };
65
66
  const standardAdSizes = {
66
67
  '970x250': namedStandardAdSizes.billboard,
@@ -77,11 +78,17 @@ const outstreamSizes = {
77
78
  outstreamMobile: createAdSize(300, 197),
78
79
  };
79
80
  exports.outstreamSizes = outstreamSizes;
80
- const dfpProprietaryAdSizes = {
81
+ /**
82
+ * Ad sizes commonly associated with third parties
83
+ */
84
+ const proprietaryAdSizes = {
81
85
  fluid: createAdSize(0, 0),
82
86
  googleCard: createAdSize(300, 274),
83
87
  outOfPage: createAdSize(1, 1),
84
88
  };
89
+ /**
90
+ * Ad sizes associated with in-house formats
91
+ */
85
92
  const guardianProprietaryAdSizes = {
86
93
  empty: createAdSize(2, 2),
87
94
  fabric: createAdSize(88, 71),
@@ -94,7 +101,7 @@ const adSizes = {
94
101
  ...namedStandardAdSizes,
95
102
  ...standardAdSizes,
96
103
  ...outstreamSizes,
97
- ...dfpProprietaryAdSizes,
104
+ ...proprietaryAdSizes,
98
105
  ...guardianProprietaryAdSizes,
99
106
  };
100
107
  exports.adSizes = adSizes;
@@ -112,6 +119,7 @@ const slotSizeMappings = {
112
119
  adSizes.mpu,
113
120
  adSizes.googleCard,
114
121
  adSizes.fluid,
122
+ adSizes.portraitInterstitial,
115
123
  ],
116
124
  phablet: [
117
125
  adSizes.outOfPage,
@@ -27,7 +27,7 @@ declare class AdSize extends Array<number> {
27
27
  get width(): number;
28
28
  get height(): number;
29
29
  }
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';
30
+ type SizeKeys = '160x600' | '300x1050' | '300x250' | '300x600' | '728x90' | '970x250' | 'billboard' | 'cascade' | 'empty' | 'fabric' | 'fluid' | 'googleCard' | 'halfPage' | 'inlineMerchandising' | 'leaderboard' | 'merchandising' | 'merchandisingHigh' | 'merchandisingHighAdFeature' | 'mobilesticky' | 'mpu' | 'outOfPage' | 'outstreamDesktop' | 'outstreamGoogleDesktop' | 'outstreamMobile' | 'portrait' | 'portraitInterstitial' | 'skyscraper';
31
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>;
@@ -57,6 +57,7 @@ const namedStandardAdSizes = {
57
57
  portrait: createAdSize(300, 1050),
58
58
  skyscraper: createAdSize(160, 600),
59
59
  cascade: createAdSize(940, 230),
60
+ portraitInterstitial: createAdSize(320, 480),
60
61
  };
61
62
  const standardAdSizes = {
62
63
  '970x250': namedStandardAdSizes.billboard,
@@ -71,11 +72,17 @@ const outstreamSizes = {
71
72
  outstreamGoogleDesktop: createAdSize(550, 310),
72
73
  outstreamMobile: createAdSize(300, 197),
73
74
  };
74
- const dfpProprietaryAdSizes = {
75
+ /**
76
+ * Ad sizes commonly associated with third parties
77
+ */
78
+ const proprietaryAdSizes = {
75
79
  fluid: createAdSize(0, 0),
76
80
  googleCard: createAdSize(300, 274),
77
81
  outOfPage: createAdSize(1, 1),
78
82
  };
83
+ /**
84
+ * Ad sizes associated with in-house formats
85
+ */
79
86
  const guardianProprietaryAdSizes = {
80
87
  empty: createAdSize(2, 2),
81
88
  fabric: createAdSize(88, 71),
@@ -88,7 +95,7 @@ const adSizes = {
88
95
  ...namedStandardAdSizes,
89
96
  ...standardAdSizes,
90
97
  ...outstreamSizes,
91
- ...dfpProprietaryAdSizes,
98
+ ...proprietaryAdSizes,
92
99
  ...guardianProprietaryAdSizes,
93
100
  };
94
101
  /**
@@ -105,6 +112,7 @@ const slotSizeMappings = {
105
112
  adSizes.mpu,
106
113
  adSizes.googleCard,
107
114
  adSizes.fluid,
115
+ adSizes.portraitInterstitial,
108
116
  ],
109
117
  phablet: [
110
118
  adSizes.outOfPage,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guardian/commercial-core",
3
- "version": "5.0.1",
3
+ "version": "5.1.0",
4
4
  "description": "Guardian advertising business logic",
5
5
  "homepage": "https://github.com/guardian/commercial-core#readme",
6
6
  "bugs": {