@liquidcommercedev/rmn-sdk 1.5.0-beta.36 → 1.5.0-beta.38

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.esm.js CHANGED
@@ -81,6 +81,17 @@ var RMN_ENV;
81
81
  RMN_ENV["STAGING"] = "staging";
82
82
  RMN_ENV["PRODUCTION"] = "production";
83
83
  })(RMN_ENV || (RMN_ENV = {}));
84
+ var ENUM_TEXT_BLOCK_POSITION;
85
+ (function (ENUM_TEXT_BLOCK_POSITION) {
86
+ ENUM_TEXT_BLOCK_POSITION["LEFT"] = "left";
87
+ ENUM_TEXT_BLOCK_POSITION["RIGHT"] = "right";
88
+ ENUM_TEXT_BLOCK_POSITION["TOP_LEFT"] = "top-left";
89
+ ENUM_TEXT_BLOCK_POSITION["TOP_RIGHT"] = "top-right";
90
+ ENUM_TEXT_BLOCK_POSITION["BOTTOM_LEFT"] = "bottom-left";
91
+ ENUM_TEXT_BLOCK_POSITION["BOTTOM_RIGHT"] = "bottom-right";
92
+ ENUM_TEXT_BLOCK_POSITION["MIDDLE_LEFT"] = "middle-left";
93
+ ENUM_TEXT_BLOCK_POSITION["MIDDLE_RIGHT"] = "middle-right";
94
+ })(ENUM_TEXT_BLOCK_POSITION || (ENUM_TEXT_BLOCK_POSITION = {}));
84
95
 
85
96
  const REQUEST_CLOUD_PARTNER_SITE = 'X-Liquid-Partner-Site';
86
97
  const REQUEST_CLOUD_PROTECTED_KEY = 'X-Liquid-Protected';
@@ -17399,6 +17410,7 @@ class ProximityObserver {
17399
17410
  this.mutationObserver = new MutationObserver((mutations) => {
17400
17411
  mutations.forEach((mutation) => {
17401
17412
  if (mutation.type === 'childList') {
17413
+ // Handle added nodes
17402
17414
  mutation.addedNodes.forEach((node) => {
17403
17415
  if (node instanceof HTMLElement) {
17404
17416
  this.checkElement(node);
@@ -17409,14 +17421,33 @@ class ProximityObserver {
17409
17421
  });
17410
17422
  }
17411
17423
  });
17424
+ // Handle removed nodes
17425
+ mutation.removedNodes.forEach((node) => {
17426
+ if (node instanceof HTMLElement) {
17427
+ this.handleRemovedElement(node);
17428
+ node.querySelectorAll('*').forEach((el) => {
17429
+ if (el instanceof HTMLElement) {
17430
+ this.handleRemovedElement(el);
17431
+ }
17432
+ });
17433
+ }
17434
+ });
17412
17435
  }
17413
17436
  });
17414
17437
  });
17415
17438
  // Start observing DOM changes
17416
- this.mutationObserver.observe(document.body, {
17417
- childList: true,
17418
- subtree: true,
17419
- });
17439
+ if (document.body) {
17440
+ this.mutationObserver.observe(document.body, {
17441
+ childList: true,
17442
+ subtree: true,
17443
+ });
17444
+ }
17445
+ }
17446
+ handleRemovedElement(element) {
17447
+ if (element.id && this.processedIds.has(element.id)) {
17448
+ this.processedIds.delete(element.id);
17449
+ this.intersectionObserver.unobserve(element);
17450
+ }
17420
17451
  }
17421
17452
  checkElement(element) {
17422
17453
  if (element.id && this.targetIds.has(element.id) && !this.processedIds.has(element.id)) {
@@ -17470,10 +17501,6 @@ class ProximityObserver {
17470
17501
  });
17471
17502
  // Trigger callback with the group
17472
17503
  this.callback(groupIdsToProcess);
17473
- // Cleanup if all elements have been processed
17474
- if (this.targetIds.size === this.processedIds.size) {
17475
- this.cleanup();
17476
- }
17477
17504
  });
17478
17505
  }
17479
17506
  /**
@@ -17500,12 +17527,6 @@ class ProximityObserver {
17500
17527
  }
17501
17528
  });
17502
17529
  }
17503
- cleanup() {
17504
- this.intersectionObserver.disconnect();
17505
- this.mutationObserver.disconnect();
17506
- this.processedIds.clear();
17507
- this.targetIds.clear();
17508
- }
17509
17530
  }
17510
17531
 
17511
17532
  /**
@@ -17947,36 +17968,51 @@ class RbHomepageHeroFullImageSE extends BaseSpotComponent {
17947
17968
  constructor() {
17948
17969
  super();
17949
17970
  }
17971
+ getGradientDirection(position) {
17972
+ switch (position) {
17973
+ case ENUM_TEXT_BLOCK_POSITION.TOP_LEFT:
17974
+ case ENUM_TEXT_BLOCK_POSITION.TOP_RIGHT:
17975
+ return 'to bottom';
17976
+ case ENUM_TEXT_BLOCK_POSITION.MIDDLE_LEFT:
17977
+ return 'to right';
17978
+ case ENUM_TEXT_BLOCK_POSITION.MIDDLE_RIGHT:
17979
+ return 'to left';
17980
+ case ENUM_TEXT_BLOCK_POSITION.BOTTOM_LEFT:
17981
+ case ENUM_TEXT_BLOCK_POSITION.BOTTOM_RIGHT:
17982
+ return 'to top';
17983
+ default:
17984
+ return 'to top';
17985
+ }
17986
+ }
17950
17987
  template() {
17951
17988
  const prefix = this._config.prefix;
17952
- const { preHeader, header, description, ctaText } = this._data;
17989
+ const { preHeader, header, description, ctaText, textBlockPosition = ENUM_TEXT_BLOCK_POSITION.BOTTOM_LEFT, } = this._data;
17953
17990
  return `
17954
- ${GFONT_PRECONNECT}
17955
- ${GFONT_SOURCE_SANS_3}
17956
- ${GFONT_CORMORANT}
17957
- <div class="${prefix}">
17958
- <div class="${prefix}__text">
17959
- ${preHeader ? `<h2 class="${prefix}__pre-header">${preHeader}</h2>` : ''}
17960
- ${header ? `<h2 class="${prefix}__header">${header}</h2>` : ''}
17961
- ${description ? `<p class="${prefix}__description">${description}</p>` : ''}
17962
- ${ctaText ? `<span class="${prefix}__cta-button">${ctaText}</span>` : ''}
17991
+ ${GFONT_PRECONNECT}
17992
+ ${GFONT_SOURCE_SANS_3}
17993
+ ${GFONT_CORMORANT}
17994
+ <div class="${prefix}">
17995
+ <div class="${prefix}__text ${prefix}__text-block--${textBlockPosition}">
17996
+ ${preHeader ? `<h2 class="${prefix}__pre-header">${preHeader}</h2>` : ''}
17997
+ ${header ? `<h2 class="${prefix}__header">${header}</h2>` : ''}
17998
+ ${description ? `<p class="${prefix}__description">${description}</p>` : ''}
17999
+ ${ctaText ? `<span class="${prefix}__cta-button">${ctaText}</span>` : ''}
18000
+ </div>
17963
18001
  </div>
17964
- </div>
17965
- `;
18002
+ `;
17966
18003
  }
17967
18004
  styles() {
18005
+ const { textBlockPosition = ENUM_TEXT_BLOCK_POSITION.BOTTOM_LEFT } = this._data;
18006
+ const gradientDirection = this.getGradientDirection(textBlockPosition);
17968
18007
  const linearGradient = generateGradientColor(this._config.overlay, 'rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 40%');
17969
18008
  const { textColor = '#ffffff', ctaTextColor = textColor, ctaBorderColor = ctaTextColor, primaryImage, mobilePrimaryImage = primaryImage, } = this._data;
17970
18009
  const prefix = this._config.prefix;
17971
18010
  return `
17972
18011
  .${prefix} {
17973
18012
  display: flex;
17974
- flex-direction: column;
17975
- justify-content: flex-end;
17976
- align-items: flex-start;
17977
18013
  width: 100%;
17978
18014
  height: 100%;
17979
- background-image: linear-gradient(to top, ${linearGradient}), url("${mobilePrimaryImage}");
18015
+ background-image: linear-gradient(${gradientDirection}, ${linearGradient}), url("${mobilePrimaryImage}");
17980
18016
  background-size: cover;
17981
18017
  background-repeat: no-repeat;
17982
18018
  background-position: center;
@@ -17984,6 +18020,7 @@ class RbHomepageHeroFullImageSE extends BaseSpotComponent {
17984
18020
  box-sizing: border-box;
17985
18021
  color: ${textColor};
17986
18022
  cursor: pointer;
18023
+ position: relative;
17987
18024
  }
17988
18025
 
17989
18026
  .${prefix}__text {
@@ -17994,6 +18031,45 @@ class RbHomepageHeroFullImageSE extends BaseSpotComponent {
17994
18031
  width: 100%;
17995
18032
  height: fit-content;
17996
18033
  gap: 8px;
18034
+ position: absolute;
18035
+ }
18036
+
18037
+ .${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.TOP_LEFT} {
18038
+ top: 3%;
18039
+ left: 3%;
18040
+ }
18041
+
18042
+ .${prefix}text-block--${ENUM_TEXT_BLOCK_POSITION.TOP_RIGHT} {
18043
+ top: 3%;
18044
+ right: 3%;
18045
+ align-items: flex-end;
18046
+ text-align: right;
18047
+ }
18048
+
18049
+ .${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.MIDDLE_LEFT} {
18050
+ top: 50%;
18051
+ left: 3%;
18052
+ transform: translateY(-50%);
18053
+ }
18054
+
18055
+ .${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.MIDDLE_RIGHT} {
18056
+ top: 50%;
18057
+ right: 3%;
18058
+ transform: translateY(-50%);
18059
+ align-items: flex-end;
18060
+ text-align: right;
18061
+ }
18062
+
18063
+ .${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.BOTTOM_LEFT} {
18064
+ bottom: 3%;
18065
+ left: 3%;
18066
+ }
18067
+
18068
+ .${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.BOTTOM_RIGHT} {
18069
+ bottom: 3%;
18070
+ right: 3%;
18071
+ align-items: flex-end;
18072
+ text-align: right;
17997
18073
  }
17998
18074
 
17999
18075
  .${prefix}__pre-header {
@@ -18043,7 +18119,7 @@ class RbHomepageHeroFullImageSE extends BaseSpotComponent {
18043
18119
 
18044
18120
  @container (min-width: 640px) {
18045
18121
  .${prefix} {
18046
- background-image: linear-gradient(to top, ${linearGradient}), url("${primaryImage}");
18122
+ background-image: linear-gradient(${gradientDirection}, ${linearGradient}), url("${primaryImage}");
18047
18123
  }
18048
18124
 
18049
18125
  .${prefix}__text {
@@ -18052,22 +18128,6 @@ class RbHomepageHeroFullImageSE extends BaseSpotComponent {
18052
18128
  }
18053
18129
 
18054
18130
  @container (min-width: 768px) {
18055
- .${prefix}__primary-image {
18056
- width: 66.66666%;
18057
- height: 100%;
18058
- }
18059
-
18060
- .${prefix}__main {
18061
- flex-direction: column;
18062
- height: 100%;
18063
- width: 33.33333%;
18064
- }
18065
-
18066
- .${prefix}__secondary-image {
18067
- width: 100%;
18068
- height: 50%;
18069
- }
18070
-
18071
18131
  .${prefix}__description {
18072
18132
  font-size: 12px;
18073
18133
  }
@@ -18114,14 +18174,13 @@ class RbHomepageHeroThreeTileSE extends BaseSpotComponent {
18114
18174
  }
18115
18175
  template() {
18116
18176
  const prefix = this._config.prefix;
18117
- const { header, description, ctaText } = this._data;
18177
+ const { header, description, ctaText, textBlockPosition = ENUM_TEXT_BLOCK_POSITION.LEFT, } = this._data;
18118
18178
  return `
18119
18179
  ${GFONT_PRECONNECT}
18120
18180
  ${GFONT_SOURCE_SANS_3}
18121
18181
  ${GFONT_CORMORANT}
18122
18182
  <div class="${prefix}">
18123
- <div class="${prefix}__content">
18124
- <div class="${prefix}__primary-image"></div>
18183
+ <div class="${prefix}__content ${prefix}__text-block--${textBlockPosition}">
18125
18184
  <div class="${prefix}__main">
18126
18185
  <div class="${prefix}__secondary-image"></div>
18127
18186
  <div class="${prefix}__text">
@@ -18130,6 +18189,7 @@ class RbHomepageHeroThreeTileSE extends BaseSpotComponent {
18130
18189
  ${ctaText ? `<span class="${prefix}__cta-button">${ctaText}</span>` : ''}
18131
18190
  </div>
18132
18191
  </div>
18192
+ <div class="${prefix}__primary-image"></div>
18133
18193
  </div>
18134
18194
  </div>
18135
18195
  `;
@@ -18170,7 +18230,7 @@ class RbHomepageHeroThreeTileSE extends BaseSpotComponent {
18170
18230
  height: 40%;
18171
18231
  display: flex;
18172
18232
  flex-direction: row;
18173
- gap: 6px;
18233
+ gap: 6px;
18174
18234
  }
18175
18235
 
18176
18236
  .${prefix}__secondary-image {
@@ -18251,6 +18311,10 @@ class RbHomepageHeroThreeTileSE extends BaseSpotComponent {
18251
18311
  flex-direction: row;
18252
18312
  }
18253
18313
 
18314
+ .${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.RIGHT} {
18315
+ flex-direction: row-reverse;
18316
+ }
18317
+
18254
18318
  .${prefix}__primary-image {
18255
18319
  width: 66.66666%;
18256
18320
  height: 100%;
@@ -18262,6 +18326,10 @@ class RbHomepageHeroThreeTileSE extends BaseSpotComponent {
18262
18326
  width: 33.33333%;
18263
18327
  }
18264
18328
 
18329
+ .${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.RIGHT} .${prefix}__main {
18330
+ flex-direction: column;
18331
+ }
18332
+
18265
18333
  .${prefix}__secondary-image {
18266
18334
  width: 100%;
18267
18335
  height: 50%;
@@ -18271,12 +18339,15 @@ class RbHomepageHeroThreeTileSE extends BaseSpotComponent {
18271
18339
  width: 100%;
18272
18340
  height: 50%;
18273
18341
  }
18342
+
18274
18343
  .${prefix}__header {
18275
18344
  font-size: 22px;
18276
18345
  }
18346
+
18277
18347
  .${prefix}__description {
18278
18348
  font-size: 12px;
18279
18349
  }
18350
+
18280
18351
  .${prefix}__cta-button {
18281
18352
  font-size: 12px;
18282
18353
  }
@@ -18315,13 +18386,13 @@ class RbHomepageHeroTwoTileSE extends BaseSpotComponent {
18315
18386
  }
18316
18387
  template() {
18317
18388
  const prefix = this._config.prefix;
18318
- const { header, description, ctaText } = this._data;
18389
+ const { header, description, ctaText, textBlockPosition = ENUM_TEXT_BLOCK_POSITION.LEFT, } = this._data;
18319
18390
  return `
18320
18391
  ${GFONT_PRECONNECT}
18321
18392
  ${GFONT_SOURCE_SANS_3}
18322
18393
  ${GFONT_CORMORANT}
18323
18394
  <div class="${prefix}">
18324
- <div class="${prefix}__content">
18395
+ <div class="${prefix}__content ${prefix}__text-block--${textBlockPosition}">
18325
18396
  <div class="${prefix}__text">
18326
18397
  ${header ? `<h2 class="${prefix}__header">${header}</h2>` : ''}
18327
18398
  ${description ? `<p class="${prefix}__description">${description}</p>` : ''}
@@ -18426,20 +18497,29 @@ class RbHomepageHeroTwoTileSE extends BaseSpotComponent {
18426
18497
  .${prefix}__content {
18427
18498
  flex-direction: row;
18428
18499
  }
18500
+
18501
+ .${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.RIGHT} {
18502
+ flex-direction: row-reverse;
18503
+ }
18504
+
18429
18505
  .${prefix}__image {
18430
18506
  width: 66.66666%;
18431
18507
  height: 100%;
18432
18508
  }
18509
+
18433
18510
  .${prefix}__text {
18434
18511
  width: 33.33333%;
18435
18512
  height: 100%;
18436
18513
  }
18514
+
18437
18515
  .${prefix}__header {
18438
18516
  font-size: 22px;
18439
18517
  }
18518
+
18440
18519
  .${prefix}__description {
18441
18520
  font-size: 12px;
18442
18521
  }
18522
+
18443
18523
  .${prefix}__cta-button {
18444
18524
  font-size: 12px;
18445
18525
  }
@@ -18453,7 +18533,7 @@ class RbHomepageHeroTwoTileSE extends BaseSpotComponent {
18453
18533
  font-size: 13px;
18454
18534
  }
18455
18535
  .${prefix}__cta-button {
18456
- font-size: 13px;
18536
+ font-size: 13px;
18457
18537
  }
18458
18538
  }
18459
18539
 
@@ -18517,13 +18597,13 @@ class RbLargeCategoryImageToutSE extends BaseSpotComponent {
18517
18597
  }
18518
18598
  template() {
18519
18599
  const prefix = this._config.prefix;
18520
- const { header, description, ctaText } = this._data;
18600
+ const { header, description, ctaText, textBlockPosition = ENUM_TEXT_BLOCK_POSITION.LEFT, } = this._data;
18521
18601
  return `
18522
18602
  ${GFONT_PRECONNECT}
18523
18603
  ${GFONT_SOURCE_SANS_3}
18524
18604
  ${GFONT_CORMORANT}
18525
18605
  <div class="${prefix}">
18526
- <div class="${prefix}__text">
18606
+ <div class="${prefix}__text ${prefix}__text-block--${textBlockPosition}">
18527
18607
  ${header ? `<h2 class="${prefix}__header">${header}</h2>` : ''}
18528
18608
  ${description ? `<p class="${prefix}__description">${description}</p>` : ''}
18529
18609
  ${ctaText ? `<span class="${prefix}__cta-button">${ctaText}</span>` : ''}
@@ -18550,6 +18630,7 @@ class RbLargeCategoryImageToutSE extends BaseSpotComponent {
18550
18630
  overflow: hidden;
18551
18631
  cursor: pointer;
18552
18632
  color: ${textColor};
18633
+ position: relative;
18553
18634
  }
18554
18635
 
18555
18636
  .${prefix}__text {
@@ -18559,6 +18640,22 @@ class RbLargeCategoryImageToutSE extends BaseSpotComponent {
18559
18640
  justify-content: center;
18560
18641
  align-items: flex-start;
18561
18642
  gap: 10px;
18643
+ position: absolute;
18644
+ bottom: 0;
18645
+ width: 100%;
18646
+ max-width: 50%;
18647
+ }
18648
+
18649
+ .${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.LEFT} {
18650
+ left: 0;
18651
+ text-align: left;
18652
+ align-items: flex-start;
18653
+ }
18654
+
18655
+ .${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.RIGHT} {
18656
+ right: 0;
18657
+ text-align: right;
18658
+ align-items: flex-end;
18562
18659
  }
18563
18660
 
18564
18661
  .${prefix}__header {
@@ -18819,15 +18916,31 @@ class RbLongToutTallSE extends BaseSpotComponent {
18819
18916
  constructor() {
18820
18917
  super();
18821
18918
  }
18919
+ getGradientDirection(position) {
18920
+ switch (position) {
18921
+ case ENUM_TEXT_BLOCK_POSITION.TOP_LEFT:
18922
+ case ENUM_TEXT_BLOCK_POSITION.TOP_RIGHT:
18923
+ return 'to bottom';
18924
+ case ENUM_TEXT_BLOCK_POSITION.MIDDLE_LEFT:
18925
+ return 'to right';
18926
+ case ENUM_TEXT_BLOCK_POSITION.MIDDLE_RIGHT:
18927
+ return 'to left';
18928
+ case ENUM_TEXT_BLOCK_POSITION.BOTTOM_LEFT:
18929
+ case ENUM_TEXT_BLOCK_POSITION.BOTTOM_RIGHT:
18930
+ return 'to top';
18931
+ default:
18932
+ return 'to top';
18933
+ }
18934
+ }
18822
18935
  template() {
18823
18936
  const prefix = this._config.prefix;
18824
- const { preHeader, header, description, ctaText } = this._data;
18937
+ const { preHeader, header, description, ctaText, textBlockPosition = ENUM_TEXT_BLOCK_POSITION.MIDDLE_LEFT, } = this._data;
18825
18938
  return `
18826
18939
  ${GFONT_PRECONNECT}
18827
18940
  ${GFONT_SOURCE_SANS_3}
18828
18941
  ${GFONT_CORMORANT}
18829
18942
  <div class="${prefix}">
18830
- <div class="${prefix}__text">
18943
+ <div class="${prefix}__text ${prefix}__text-block--${textBlockPosition.toLowerCase().replace('_', '-')}">
18831
18944
  ${preHeader ? `<h2 class="${prefix}__pre-header">${preHeader}</h2>` : ''}
18832
18945
  ${header ? `<h2 class="${prefix}__header">${header}</h2>` : ''}
18833
18946
  ${description ? `<p class="${prefix}__description">${description}</p>` : ''}
@@ -18837,17 +18950,17 @@ class RbLongToutTallSE extends BaseSpotComponent {
18837
18950
  `;
18838
18951
  }
18839
18952
  styles() {
18953
+ const { textBlockPosition = ENUM_TEXT_BLOCK_POSITION.MIDDLE_LEFT } = this._data;
18954
+ const gradientDirection = this.getGradientDirection(textBlockPosition);
18955
+ const linearGradient = generateGradientColor(this._config.overlay, 'rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 40%');
18840
18956
  const { textColor = '#ffffff', ctaTextColor = textColor, ctaBorderColor = ctaTextColor, primaryImage, mobilePrimaryImage = primaryImage, } = this._data;
18841
18957
  const prefix = this._config.prefix;
18842
18958
  return `
18843
18959
  .${prefix} {
18844
18960
  display: flex;
18845
- flex-direction: column;
18846
- justify-content: space-around;
18847
- align-items: flex-start;
18848
18961
  width: 100%;
18849
18962
  height: 100%;
18850
- background-image: url("${mobilePrimaryImage}");
18963
+ background-image: linear-gradient(${gradientDirection}, ${linearGradient}), url("${mobilePrimaryImage}");
18851
18964
  background-size: cover;
18852
18965
  background-repeat: no-repeat;
18853
18966
  background-position: center;
@@ -18855,6 +18968,7 @@ class RbLongToutTallSE extends BaseSpotComponent {
18855
18968
  box-sizing: border-box;
18856
18969
  color: ${textColor};
18857
18970
  cursor: pointer;
18971
+ position: relative;
18858
18972
  }
18859
18973
 
18860
18974
  .${prefix}__text {
@@ -18865,6 +18979,51 @@ class RbLongToutTallSE extends BaseSpotComponent {
18865
18979
  width: 100%;
18866
18980
  height: fit-content;
18867
18981
  gap: 8px;
18982
+ position: absolute;
18983
+ }
18984
+
18985
+ .${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.TOP_LEFT} {
18986
+ top: 3%;
18987
+ left: 3%;
18988
+ align-items: flex-start;
18989
+ text-align: left;
18990
+ }
18991
+
18992
+ .${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.TOP_RIGHT} {
18993
+ top: 3%;
18994
+ right: 3%;
18995
+ align-items: flex-end;
18996
+ text-align: right;
18997
+ }
18998
+
18999
+ .${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.MIDDLE_LEFT} {
19000
+ top: 50%;
19001
+ left: 3%;
19002
+ transform: translateY(-50%);
19003
+ align-items: flex-start;
19004
+ text-align: left;
19005
+ }
19006
+
19007
+ .${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.MIDDLE_RIGHT} {
19008
+ top: 50%;
19009
+ right: 3%;
19010
+ transform: translateY(-50%);
19011
+ align-items: flex-end;
19012
+ text-align: right;
19013
+ }
19014
+
19015
+ .${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.BOTTOM_LEFT} {
19016
+ bottom: 3%;
19017
+ left: 3%;
19018
+ align-items: flex-start;
19019
+ text-align: left;
19020
+ }
19021
+
19022
+ .${prefix}__text-block--${ENUM_TEXT_BLOCK_POSITION.BOTTOM_RIGHT} {
19023
+ bottom: 3%;
19024
+ right: 3%;
19025
+ align-items: flex-end;
19026
+ text-align: right;
18868
19027
  }
18869
19028
 
18870
19029
  .${prefix}__pre-header {
@@ -18914,7 +19073,7 @@ class RbLongToutTallSE extends BaseSpotComponent {
18914
19073
 
18915
19074
  @container (min-width: 640px) {
18916
19075
  .${prefix} {
18917
- background-image: url("${primaryImage}");
19076
+ background-image: linear-gradient(${gradientDirection}, ${linearGradient}), url("${primaryImage}");
18918
19077
  }
18919
19078
 
18920
19079
  .${prefix}__text {
@@ -18923,22 +19082,6 @@ class RbLongToutTallSE extends BaseSpotComponent {
18923
19082
  }
18924
19083
 
18925
19084
  @container (min-width: 768px) {
18926
- .${prefix}__primary-image {
18927
- width: 66.66666%;
18928
- height: 100%;
18929
- }
18930
-
18931
- .${prefix}__main {
18932
- flex-direction: column;
18933
- height: 100%;
18934
- width: 33.33333%;
18935
- }
18936
-
18937
- .${prefix}__secondary-image {
18938
- width: 100%;
18939
- height: 50%;
18940
- }
18941
-
18942
19085
  .${prefix}__description {
18943
19086
  font-size: 12px;
18944
19087
  }
@@ -21564,4 +21707,4 @@ function RmnEventManager() {
21564
21707
  };
21565
21708
  }
21566
21709
 
21567
- export { BrowserRmnClient, RMN_ENV, RMN_EVENT, RMN_FILTER_PROPERTIES, RMN_SPOT_EVENT, RMN_SPOT_TYPE, RmnClient, RmnEventManager, ServerRmnClient };
21710
+ export { BrowserRmnClient, ENUM_TEXT_BLOCK_POSITION, RMN_ENV, RMN_EVENT, RMN_FILTER_PROPERTIES, RMN_SPOT_EVENT, RMN_SPOT_TYPE, RmnClient, RmnEventManager, ServerRmnClient };
@@ -74,3 +74,13 @@ export declare enum RMN_ENV {
74
74
  STAGING = "staging",
75
75
  PRODUCTION = "production"
76
76
  }
77
+ export declare enum ENUM_TEXT_BLOCK_POSITION {
78
+ LEFT = "left",
79
+ RIGHT = "right",
80
+ TOP_LEFT = "top-left",
81
+ TOP_RIGHT = "top-right",
82
+ BOTTOM_LEFT = "bottom-left",
83
+ BOTTOM_RIGHT = "bottom-right",
84
+ MIDDLE_LEFT = "middle-left",
85
+ MIDDLE_RIGHT = "middle-right"
86
+ }
@@ -13,6 +13,7 @@ export declare class ProximityObserver {
13
13
  private readonly maxGroupSize;
14
14
  constructor(elementIds: string[], callback: (intersectingIds: string[]) => void, options?: IProximityObserverOptions);
15
15
  private initializeObservers;
16
+ private handleRemovedElement;
16
17
  private checkElement;
17
18
  private findNearbyTargetIds;
18
19
  private handleIntersection;
@@ -25,6 +26,5 @@ export declare class ProximityObserver {
25
26
  */
26
27
  private calculateDistance;
27
28
  private observeExistingElements;
28
- private cleanup;
29
29
  }
30
30
  export {};
@@ -1,4 +1,4 @@
1
- import type { RMN_SPOT_EVENT, RMN_SPOT_TYPE } from 'enums';
1
+ import type { ENUM_TEXT_BLOCK_POSITION, RMN_SPOT_EVENT, RMN_SPOT_TYPE } from 'enums';
2
2
  import type { PlacementIdType, SpotVariantType } from 'modules/selection';
3
3
  import type { RmnFilterType, RmnSpotType } from 'types';
4
4
  export interface ISpotSelectionParams {
@@ -27,6 +27,7 @@ export interface ISpot {
27
27
  header?: string;
28
28
  description?: string;
29
29
  ctaText?: string;
30
+ textBlockPosition?: ENUM_TEXT_BLOCK_POSITION;
30
31
  textColor?: string;
31
32
  backgroundColor?: string;
32
33
  ctaTextColor?: string;
@@ -1,3 +1,4 @@
1
+ import type { ENUM_TEXT_BLOCK_POSITION } from 'enums';
1
2
  import type { ISpotTemplateBaseData } from './spot-template.interface';
2
3
  export interface ICollectionBannerWithoutTextBlockRbSpot extends ISpotTemplateBaseData {
3
4
  primaryImage: string;
@@ -13,6 +14,7 @@ export interface IHomepageHeroFullImageRbSpot extends ISpotTemplateBaseData {
13
14
  ctaBorderColor: string;
14
15
  primaryImage: string;
15
16
  mobilePrimaryImage?: string;
17
+ textBlockPosition?: ENUM_TEXT_BLOCK_POSITION.TOP_LEFT | ENUM_TEXT_BLOCK_POSITION.TOP_RIGHT | ENUM_TEXT_BLOCK_POSITION.BOTTOM_LEFT | ENUM_TEXT_BLOCK_POSITION.BOTTOM_RIGHT | ENUM_TEXT_BLOCK_POSITION.MIDDLE_LEFT | ENUM_TEXT_BLOCK_POSITION.MIDDLE_RIGHT;
16
18
  }
17
19
  export interface IHomepageHeroThreeTileRbSpot extends ISpotTemplateBaseData {
18
20
  header: string;
@@ -25,6 +27,7 @@ export interface IHomepageHeroThreeTileRbSpot extends ISpotTemplateBaseData {
25
27
  mobilePrimaryImage?: string;
26
28
  secondaryImage: string;
27
29
  mobileSecondaryImage?: string;
30
+ textBlockPosition?: ENUM_TEXT_BLOCK_POSITION.LEFT | ENUM_TEXT_BLOCK_POSITION.RIGHT;
28
31
  }
29
32
  export interface IHomepageHeroTwoTileRbSpot extends ISpotTemplateBaseData {
30
33
  header: string;
@@ -35,6 +38,7 @@ export interface IHomepageHeroTwoTileRbSpot extends ISpotTemplateBaseData {
35
38
  ctaTextColor: string;
36
39
  primaryImage: string;
37
40
  mobilePrimaryImage?: string;
41
+ textBlockPosition?: ENUM_TEXT_BLOCK_POSITION.LEFT | ENUM_TEXT_BLOCK_POSITION.RIGHT;
38
42
  }
39
43
  export interface IInTextRbSpot extends ISpotTemplateBaseData {
40
44
  header: string;
@@ -50,6 +54,7 @@ export interface ILargeCategoryImageToutRbSpot extends ISpotTemplateBaseData {
50
54
  ctaBorderColor: string;
51
55
  primaryImage: string;
52
56
  mobilePrimaryImage?: string;
57
+ textBlockPosition?: ENUM_TEXT_BLOCK_POSITION.LEFT | ENUM_TEXT_BLOCK_POSITION.RIGHT;
53
58
  }
54
59
  export interface INavigationBannerRbSpot extends ISpotTemplateBaseData {
55
60
  header: string;
@@ -91,6 +96,7 @@ export interface ILongToutTallRbSpot extends ISpotTemplateBaseData {
91
96
  ctaBorderColor: string;
92
97
  primaryImage: string;
93
98
  mobilePrimaryImage?: string;
99
+ textBlockPosition?: ENUM_TEXT_BLOCK_POSITION.TOP_LEFT | ENUM_TEXT_BLOCK_POSITION.TOP_RIGHT | ENUM_TEXT_BLOCK_POSITION.BOTTOM_LEFT | ENUM_TEXT_BLOCK_POSITION.BOTTOM_RIGHT | ENUM_TEXT_BLOCK_POSITION.MIDDLE_LEFT | ENUM_TEXT_BLOCK_POSITION.MIDDLE_RIGHT;
94
100
  }
95
101
  export interface IVideoPlayerRbSpot extends ISpotTemplateBaseData {
96
102
  video: {
@@ -2,6 +2,7 @@ import { BaseSpotComponent } from 'modules/element/component/spot';
2
2
  import type { IHomepageHeroFullImageRbSpot } from '../rb-template.interface';
3
3
  export declare class RbHomepageHeroFullImageSE extends BaseSpotComponent<IHomepageHeroFullImageRbSpot> {
4
4
  constructor();
5
+ private getGradientDirection;
5
6
  protected template(): string;
6
7
  protected styles(): string;
7
8
  }
@@ -2,6 +2,7 @@ import { BaseSpotComponent } from 'modules/element/component/spot';
2
2
  import type { ILongToutTallRbSpot } from '../rb-template.interface';
3
3
  export declare class RbLongToutTallSE extends BaseSpotComponent<ILongToutTallRbSpot> {
4
4
  constructor();
5
+ private getGradientDirection;
5
6
  protected template(): string;
6
7
  protected styles(): string;
7
8
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@liquidcommercedev/rmn-sdk",
3
3
  "description": "LiquidCommerce RMN SDK",
4
4
  "author": "LiquidCommerce Tech",
5
- "version": "1.5.0-beta.36",
5
+ "version": "1.5.0-beta.38",
6
6
  "homepage": "https://docs.liquidcommerce.co/rmn-sdk",
7
7
  "main": "./dist/index.cjs",
8
8
  "module": "./dist/index.esm.js",