@liquidcommercedev/rmn-sdk 1.5.0-beta.24 → 1.5.0-beta.25

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.cjs CHANGED
@@ -13,6 +13,8 @@ exports.RMN_SPOT_TYPE = void 0;
13
13
  RMN_SPOT_TYPE["RB_COLLECTION_BANNER_WITHOUT_TEXT_BLOCK"] = "rbCollectionBannerWithoutTextBlock";
14
14
  RMN_SPOT_TYPE["RB_PRODUCT_UPCS"] = "rbProductUpcs";
15
15
  RMN_SPOT_TYPE["RB_NAVIGATION_BANNER"] = "rbNavigationBanner";
16
+ RMN_SPOT_TYPE["RB_VIDEO_PLAYER"] = "rbVideoPlayer";
17
+ RMN_SPOT_TYPE["RB_IN_TEXT"] = "rbInText";
16
18
  // IAB Standard Spot Types
17
19
  RMN_SPOT_TYPE["BILLBOARD"] = "billboard";
18
20
  RMN_SPOT_TYPE["LARGE_RECTANGLE"] = "largeRectangle";
@@ -6159,7 +6161,7 @@ const extractorConfig = {
6159
6161
  'article_number',
6160
6162
  'reference',
6161
6163
  'salsifyGrouping',
6162
- 'grouping'
6164
+ 'grouping',
6163
6165
  ],
6164
6166
  price: [
6165
6167
  'price',
@@ -15821,6 +15823,8 @@ const SPOT_DIMENSIONS = {
15821
15823
  [exports.RMN_SPOT_TYPE.RB_COLLECTION_BANNER_WITHOUT_TEXT_BLOCK]: { width: 887, height: 344 },
15822
15824
  [exports.RMN_SPOT_TYPE.RB_PRODUCT_UPCS]: { width: 1, height: 1 },
15823
15825
  [exports.RMN_SPOT_TYPE.RB_NAVIGATION_BANNER]: { width: 440, height: 220 },
15826
+ [exports.RMN_SPOT_TYPE.RB_VIDEO_PLAYER]: { width: 1280, height: 720 },
15827
+ [exports.RMN_SPOT_TYPE.RB_IN_TEXT]: { width: 1, height: 1 },
15824
15828
  [exports.RMN_SPOT_TYPE.SMALL_RECTANGLE]: { width: 180, height: 150 },
15825
15829
  [exports.RMN_SPOT_TYPE.MEDIUM_RECTANGLE]: { width: 300, height: 250 },
15826
15830
  [exports.RMN_SPOT_TYPE.LARGE_RECTANGLE]: { width: 336, height: 280 },
@@ -16670,8 +16674,15 @@ if (typeof window !== 'undefined' && typeof window.customElements !== 'undefined
16670
16674
  const clonedSlide = this.slides[index].cloneNode(true);
16671
16675
  // Map clone to original for event handling
16672
16676
  this.cloneToOriginalMap.set(clonedSlide, this.slides[index]);
16677
+ let isDragging = false;
16678
+ slideElement.addEventListener('mousedown', () => isDragging = false);
16679
+ slideElement.addEventListener('mousemove', () => isDragging = true);
16673
16680
  // Add event delegation to the slide container
16674
16681
  slideElement.addEventListener('click', (e) => {
16682
+ if (isDragging) {
16683
+ e.stopPropagation();
16684
+ return;
16685
+ }
16675
16686
  const original = this.slides[index];
16676
16687
  // Dispatch a new event on the original element
16677
16688
  const cloneEvent = new Event(e.type, { bubbles: true, cancelable: true });
@@ -17554,7 +17565,7 @@ function spotHtmlStringToElement(htmlString, spotType) {
17554
17565
  return spot;
17555
17566
  }
17556
17567
 
17557
- const STYLES$i = ({ primaryImage, secondaryImage }) => `
17568
+ const STYLES$j = ({ primaryImage, secondaryImage }) => `
17558
17569
  <style>
17559
17570
  .content {
17560
17571
  width: 100%;
@@ -17652,7 +17663,7 @@ function billboardV1Template(spot) {
17652
17663
  ${GFONT_PRECONNECT}
17653
17664
  ${GFONT_SOURCE_SANS_3}
17654
17665
  ${GFONT_CORMORANT}
17655
- ${STYLES$i(spot)}
17666
+ ${STYLES$j(spot)}
17656
17667
  <div class="content">
17657
17668
  <div class="big-image"></div>
17658
17669
  <div class="main">
@@ -17667,7 +17678,7 @@ function billboardV1Template(spot) {
17667
17678
  `;
17668
17679
  }
17669
17680
 
17670
- const STYLES$h = ({ primaryImage }) => `
17681
+ const STYLES$i = ({ primaryImage }) => `
17671
17682
  <style>
17672
17683
  .content {
17673
17684
  display: flex;
@@ -17741,7 +17752,7 @@ function billboardV2Template(spot) {
17741
17752
  ${GFONT_PRECONNECT}
17742
17753
  ${GFONT_SOURCE_SANS_3}
17743
17754
  ${GFONT_CORMORANT}
17744
- ${STYLES$h(spot)}
17755
+ ${STYLES$i(spot)}
17745
17756
  <div class="content">
17746
17757
  <div class="text-container">
17747
17758
  <h2 class="header">${spot.header}</h2>
@@ -17752,7 +17763,7 @@ function billboardV2Template(spot) {
17752
17763
  `;
17753
17764
  }
17754
17765
 
17755
- const STYLES$g = ({ primaryImage }) => `
17766
+ const STYLES$h = ({ primaryImage }) => `
17756
17767
  <style>
17757
17768
  .content {
17758
17769
  width: 100%;
@@ -17842,7 +17853,7 @@ function billboardV3Template(spot) {
17842
17853
  ${GFONT_PRECONNECT}
17843
17854
  ${GFONT_SOURCE_SANS_3}
17844
17855
  ${GFONT_CORMORANT}
17845
- ${STYLES$g(spot)}
17856
+ ${STYLES$h(spot)}
17846
17857
  <div class="content">
17847
17858
  <div class="text">
17848
17859
  <h2 class="header">${spot.header}</h2>
@@ -17854,7 +17865,7 @@ function billboardV3Template(spot) {
17854
17865
  `;
17855
17866
  }
17856
17867
 
17857
- const STYLES$f = () => `
17868
+ const STYLES$g = () => `
17858
17869
  <style>
17859
17870
  .content {
17860
17871
  display: inline-block;
@@ -17886,7 +17897,7 @@ function inTextV1Template(spot) {
17886
17897
  ${GFONT_PRECONNECT}
17887
17898
  ${GFONT_SOURCE_SANS_3}
17888
17899
  ${GFONT_CORMORANT}
17889
- ${STYLES$f()}
17900
+ ${STYLES$g()}
17890
17901
  <div class="content">
17891
17902
  <span class="header">${spot.header}</span>
17892
17903
  <span class="description">${spot.description}</span>
@@ -17894,7 +17905,7 @@ function inTextV1Template(spot) {
17894
17905
  `;
17895
17906
  }
17896
17907
 
17897
- const STYLES$e = ({ primaryImage }) => `
17908
+ const STYLES$f = ({ primaryImage }) => `
17898
17909
  <style>
17899
17910
  .content {
17900
17911
  width: 100%;
@@ -17976,7 +17987,7 @@ function largeLeaderboardV1Template(spot) {
17976
17987
  ${GFONT_PRECONNECT}
17977
17988
  ${GFONT_SOURCE_SANS_3}
17978
17989
  ${GFONT_CORMORANT}
17979
- ${STYLES$e(spot)}
17990
+ ${STYLES$f(spot)}
17980
17991
  <div class="content">
17981
17992
  <div class="text">
17982
17993
  <h2 class="header">${spot.header}</h2>
@@ -17987,7 +17998,7 @@ function largeLeaderboardV1Template(spot) {
17987
17998
  `;
17988
17999
  }
17989
18000
 
17990
- const STYLES$d = ({ primaryImage }) => `
18001
+ const STYLES$e = ({ primaryImage }) => `
17991
18002
  <style>
17992
18003
  .content {
17993
18004
  width: 100%;
@@ -18063,7 +18074,7 @@ function largeLeaderboardV2Template(spot) {
18063
18074
  ${GFONT_PRECONNECT}
18064
18075
  ${GFONT_SOURCE_SANS_3}
18065
18076
  ${GFONT_CORMORANT}
18066
- ${STYLES$d(spot)}
18077
+ ${STYLES$e(spot)}
18067
18078
  <div class="content">
18068
18079
  <div class="text">
18069
18080
  <h2 class="header">${spot.header}</h2>
@@ -18074,7 +18085,7 @@ function largeLeaderboardV2Template(spot) {
18074
18085
  `;
18075
18086
  }
18076
18087
 
18077
- const STYLES$c = ({ primaryImage }) => `
18088
+ const STYLES$d = ({ primaryImage }) => `
18078
18089
  <style>
18079
18090
  .content {
18080
18091
  width: 100%;
@@ -18122,7 +18133,7 @@ function largeRectangleV1Template(spot) {
18122
18133
  ${GFONT_PRECONNECT}
18123
18134
  ${GFONT_SOURCE_SANS_3}
18124
18135
  ${GFONT_CORMORANT}
18125
- ${STYLES$c(spot)}
18136
+ ${STYLES$d(spot)}
18126
18137
  <div class="content">
18127
18138
  <div class="image"></div>
18128
18139
  <div class="text">
@@ -18133,7 +18144,7 @@ function largeRectangleV1Template(spot) {
18133
18144
  `;
18134
18145
  }
18135
18146
 
18136
- const STYLES$b = ({ primaryImage }) => `
18147
+ const STYLES$c = ({ primaryImage }) => `
18137
18148
  <style>
18138
18149
  .content {
18139
18150
  width: 100%;
@@ -18220,7 +18231,7 @@ function squareV1Template(spot) {
18220
18231
  ${GFONT_PRECONNECT}
18221
18232
  ${GFONT_SOURCE_SANS_3}
18222
18233
  ${GFONT_CORMORANT}
18223
- ${STYLES$b(spot)}
18234
+ ${STYLES$c(spot)}
18224
18235
  <div class="content">
18225
18236
  <div class="text">
18226
18237
  <h2 class="header">${spot.header}</h2>
@@ -18231,7 +18242,7 @@ function squareV1Template(spot) {
18231
18242
  `;
18232
18243
  }
18233
18244
 
18234
- const STYLES$a = ({ primaryImage }) => `
18245
+ const STYLES$b = ({ primaryImage }) => `
18235
18246
  <style>
18236
18247
  .content {
18237
18248
  width: 100%;
@@ -18275,14 +18286,14 @@ function squareV2Template(spot) {
18275
18286
  ${GFONT_PRECONNECT}
18276
18287
  ${GFONT_SOURCE_SANS_3}
18277
18288
  ${GFONT_CORMORANT}
18278
- ${STYLES$a(spot)}
18289
+ ${STYLES$b(spot)}
18279
18290
  <div class="content">
18280
18291
  <span class="header">${spot.header}</span>
18281
18292
  </div>
18282
18293
  `;
18283
18294
  }
18284
18295
 
18285
- const STYLES$9 = ({ primaryImage }) => `
18296
+ const STYLES$a = ({ primaryImage }) => `
18286
18297
  <style>
18287
18298
  .content {
18288
18299
  width: 100%;
@@ -18340,7 +18351,7 @@ function verticalRectangleV1Template(spot) {
18340
18351
  ${GFONT_PRECONNECT}
18341
18352
  ${GFONT_SOURCE_SANS_3}
18342
18353
  ${GFONT_CORMORANT}
18343
- ${STYLES$9(spot)}
18354
+ ${STYLES$a(spot)}
18344
18355
  <div class="content">
18345
18356
  <div class="text">
18346
18357
  <h2 class="header">${spot.header}</h2>
@@ -18351,7 +18362,7 @@ function verticalRectangleV1Template(spot) {
18351
18362
  `;
18352
18363
  }
18353
18364
 
18354
- const STYLES$8 = ({ primaryImage }) => `
18365
+ const STYLES$9 = ({ primaryImage }) => `
18355
18366
  <style>
18356
18367
  .content {
18357
18368
  width: 100%;
@@ -18366,12 +18377,12 @@ const STYLES$8 = ({ primaryImage }) => `
18366
18377
  `;
18367
18378
  function wideSkyscraperV1Template(spot) {
18368
18379
  return `
18369
- ${STYLES$8(spot)}
18380
+ ${STYLES$9(spot)}
18370
18381
  <div class="content"></div>
18371
18382
  `;
18372
18383
  }
18373
18384
 
18374
- const STYLES$7 = ({ primaryImage, mobilePrimaryImage = primaryImage }, { prefix }) => `
18385
+ const STYLES$8 = ({ primaryImage, mobilePrimaryImage = primaryImage }, { prefix }) => `
18375
18386
  <style>
18376
18387
  .${prefix} {
18377
18388
  display: block;
@@ -18395,12 +18406,12 @@ const STYLES$7 = ({ primaryImage, mobilePrimaryImage = primaryImage }, { prefix
18395
18406
  function rbCollectionBannerWithoutTextBlockTemplate(spot, config) {
18396
18407
  const { prefix = '' } = config;
18397
18408
  return `
18398
- ${STYLES$7(spot, config)}
18409
+ ${STYLES$8(spot, config)}
18399
18410
  <div class="${prefix}"></div>
18400
18411
  `;
18401
18412
  }
18402
18413
 
18403
- const STYLES$6 = ({ textColor = '#ffffff', ctaTextColor = textColor, ctaBorderColor = ctaTextColor, primaryImage, mobilePrimaryImage = primaryImage, }, { prefix, overlay }) => {
18414
+ const STYLES$7 = ({ textColor = '#ffffff', ctaTextColor = textColor, ctaBorderColor = ctaTextColor, primaryImage, mobilePrimaryImage = primaryImage, }, { prefix, overlay }) => {
18404
18415
  const linearGradient = generateGradientColor(overlay, 'rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 40%');
18405
18416
  return `
18406
18417
  <style>
@@ -18539,7 +18550,7 @@ function rbHomepageHeroFullImageTemplate(spot, config) {
18539
18550
  ${GFONT_PRECONNECT}
18540
18551
  ${GFONT_SOURCE_SANS_3}
18541
18552
  ${GFONT_CORMORANT}
18542
- ${STYLES$6(spot, config)}
18553
+ ${STYLES$7(spot, config)}
18543
18554
  <div class="${prefix}">
18544
18555
  <div class="${prefix}__text">
18545
18556
  ${spot.header ? `<h2 class="${prefix}__header">${spot.header}</h2>` : ''}
@@ -18550,7 +18561,7 @@ function rbHomepageHeroFullImageTemplate(spot, config) {
18550
18561
  `;
18551
18562
  }
18552
18563
 
18553
- const STYLES$5 = ({ textColor = '#212121', backgroundColor = '#e8e6de', ctaTextColor = textColor, primaryImage, mobilePrimaryImage = primaryImage, secondaryImage, mobileSecondaryImage = secondaryImage, }, { prefix }) => `
18564
+ const STYLES$6 = ({ textColor = '#212121', backgroundColor = '#e8e6de', ctaTextColor = textColor, primaryImage, mobilePrimaryImage = primaryImage, secondaryImage, mobileSecondaryImage = secondaryImage, }, { prefix }) => `
18554
18565
  <style>
18555
18566
  .${prefix} {
18556
18567
  width: 100%;
@@ -18615,7 +18626,7 @@ const STYLES$5 = ({ textColor = '#212121', backgroundColor = '#e8e6de', ctaTextC
18615
18626
  color: inherit;
18616
18627
  margin: 0;
18617
18628
  font-size: 18px;
18618
- font-family: "Cormorant";
18629
+ font-family: "Cormorant", system-ui;
18619
18630
  font-style: normal;
18620
18631
  font-weight: 700;
18621
18632
  line-height: normal;
@@ -18727,7 +18738,7 @@ function rbHomepageHeroThreeTileTemplate(spot, config) {
18727
18738
  ${GFONT_PRECONNECT}
18728
18739
  ${GFONT_SOURCE_SANS_3}
18729
18740
  ${GFONT_CORMORANT}
18730
- ${STYLES$5(spot, config)}
18741
+ ${STYLES$6(spot, config)}
18731
18742
  <div class="${prefix}">
18732
18743
  <div class="${prefix}__content">
18733
18744
  <div class="${prefix}__primary-image"></div>
@@ -18744,7 +18755,7 @@ function rbHomepageHeroThreeTileTemplate(spot, config) {
18744
18755
  `;
18745
18756
  }
18746
18757
 
18747
- const STYLES$4 = ({ textColor = '#212121', backgroundColor = '#e8e6de', ctaTextColor = textColor, primaryImage, mobilePrimaryImage = primaryImage, }, { prefix }) => `
18758
+ const STYLES$5 = ({ textColor = '#212121', backgroundColor = '#e8e6de', ctaTextColor = textColor, primaryImage, mobilePrimaryImage = primaryImage, }, { prefix }) => `
18748
18759
  <style>
18749
18760
  .${prefix} {
18750
18761
  width: 100%;
@@ -18886,7 +18897,7 @@ function rbHomepageHeroTwoTileTemplate(spot, config) {
18886
18897
  ${GFONT_PRECONNECT}
18887
18898
  ${GFONT_SOURCE_SANS_3}
18888
18899
  ${GFONT_CORMORANT}
18889
- ${STYLES$4(spot, config)}
18900
+ ${STYLES$5(spot, config)}
18890
18901
  <div class="${prefix}">
18891
18902
  <div class="${prefix}__content">
18892
18903
  <div class="${prefix}__text">
@@ -18900,6 +18911,37 @@ function rbHomepageHeroTwoTileTemplate(spot, config) {
18900
18911
  `;
18901
18912
  }
18902
18913
 
18914
+ const STYLES$4 = ({ textColor = '#ffffff', backgroundColor = 'transparent' }, { prefix }) => `
18915
+ <style>
18916
+ .${prefix} {
18917
+ display: block;
18918
+ cursor: pointer;
18919
+ max-width: fit-content;
18920
+ padding: 0;
18921
+ background-color: ${backgroundColor};
18922
+ }
18923
+ .${prefix}__header {
18924
+ font-size: 0.875rem;
18925
+ line-height: 1.25rem;
18926
+ font-weight: 500;
18927
+ color: ${textColor};
18928
+ font-family: "Source Sans 3", system-ui;
18929
+ margin: 0;
18930
+ }
18931
+ </style>
18932
+ `;
18933
+ function rbInTextTemplate(spot, config) {
18934
+ const { prefix = '' } = config;
18935
+ return `
18936
+ ${GFONT_PRECONNECT}
18937
+ ${GFONT_SOURCE_SANS_3}
18938
+ ${STYLES$4(spot, config)}
18939
+ <div class="${prefix}">
18940
+ ${spot.header ? `<h2 class="${prefix}__header">${spot.header}</h2>` : ''}
18941
+ </div>
18942
+ `;
18943
+ }
18944
+
18903
18945
  const STYLES$3 = ({ textColor = '#ffffff', ctaTextColor = textColor, ctaBorderColor = ctaTextColor, primaryImage, mobilePrimaryImage = primaryImage, }, { prefix, overlay }) => {
18904
18946
  const linearGradient = generateGradientColor(overlay, 'rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 30%');
18905
18947
  return `
@@ -19256,6 +19298,13 @@ const SPOT_TEMPLATE_HTML_ELEMENT = (spot, config) => {
19256
19298
  [exports.RMN_SPOT_TYPE.RB_NAVIGATION_BANNER]: {
19257
19299
  rbNavigationBanner: rbNavigationBannerTemplate,
19258
19300
  },
19301
+ [exports.RMN_SPOT_TYPE.RB_IN_TEXT]: {
19302
+ rbInText: rbInTextTemplate,
19303
+ },
19304
+ [exports.RMN_SPOT_TYPE.RB_VIDEO_PLAYER]: {
19305
+ // rbVideoPlayer: rbVideoPlayerTemplate,
19306
+ rbVideoPlayer: () => '', // TODO: Implement this template.
19307
+ },
19259
19308
  [exports.RMN_SPOT_TYPE.RB_PRODUCT_UPCS]: {
19260
19309
  rbProductUpcs: () => '', // No template for this spot type, it will be handled by ReserveBar App.
19261
19310
  },
@@ -20191,6 +20240,39 @@ const SPOT_EVENTS_EXAMPLE = [
20191
20240
  productIds: [107, 108, 109, 110, 111],
20192
20241
  },
20193
20242
  ],
20243
+ rbInText: [
20244
+ {
20245
+ id: 'mxo259',
20246
+ spot: exports.RMN_SPOT_TYPE.RB_IN_TEXT,
20247
+ variant: exports.RMN_SPOT_TYPE.RB_IN_TEXT,
20248
+ width: 1,
20249
+ height: 1,
20250
+ header: 'Premium Vodka',
20251
+ textColor: '#ffffff',
20252
+ backgroundColor: '#000000',
20253
+ events: SPOT_EVENTS_EXAMPLE,
20254
+ productIds: [107, 108, 109, 110, 111],
20255
+ },
20256
+ ],
20257
+ rbVideoPlayer: [
20258
+ {
20259
+ id: 'mxo259',
20260
+ spot: exports.RMN_SPOT_TYPE.RB_VIDEO_PLAYER,
20261
+ variant: exports.RMN_SPOT_TYPE.RB_VIDEO_PLAYER,
20262
+ width: 1280,
20263
+ height: 720,
20264
+ videoUrl: 'https://www.youtube.com/watch?v=9bZkp7q19f0',
20265
+ videoOverlayImage: 'https://placehold.co/1280x720/png?text=Video+Overlay',
20266
+ videoOverlayHeader: 'Watch Our Story',
20267
+ videoOverlayDescription: 'Discover the history of our distillery',
20268
+ videoControls: true,
20269
+ videoAutoPlay: true,
20270
+ videoMute: true,
20271
+ videoLoop: true,
20272
+ events: SPOT_EVENTS_EXAMPLE,
20273
+ productIds: [107, 108, 109, 110, 111],
20274
+ },
20275
+ ],
20194
20276
  });
20195
20277
  ({
20196
20278
  banner: [],
@@ -20551,7 +20633,7 @@ class LiquidCommerceRmnClient {
20551
20633
  const spotElement = this.elementService.createSpotElement({
20552
20634
  content,
20553
20635
  config: {
20554
- fluid: config === null || config === void 0 ? void 0 : config.fluid,
20636
+ fluid: spot.spot === exports.RMN_SPOT_TYPE.RB_IN_TEXT ? true : config === null || config === void 0 ? void 0 : config.fluid,
20555
20637
  spot: spot.spot,
20556
20638
  width: spot.width,
20557
20639
  height: spot.height,