lido-player 0.0.2-alpha-9 → 0.0.2-alpha-10

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.
Files changed (104) hide show
  1. package/dist/cjs/index.cjs.js +1 -1
  2. package/dist/cjs/lido-avatar_13.cjs.entry.js +210 -78
  3. package/dist/cjs/lido-avatar_13.cjs.entry.js.map +1 -1
  4. package/dist/cjs/lido-player.cjs.js +1 -1
  5. package/dist/cjs/loader.cjs.js +1 -1
  6. package/dist/cjs/{utils-0bfc0d99.js → utils-5b00f27b.js} +91 -60
  7. package/dist/cjs/utils-5b00f27b.js.map +1 -0
  8. package/dist/collection/components/column/lido-col.js +52 -12
  9. package/dist/collection/components/column/lido-col.js.map +1 -1
  10. package/dist/collection/components/container/lido-container.js +59 -10
  11. package/dist/collection/components/container/lido-container.js.map +1 -1
  12. package/dist/collection/components/image/lido-image.js +32 -11
  13. package/dist/collection/components/image/lido-image.js.map +1 -1
  14. package/dist/collection/components/position/lido-pos.js +35 -14
  15. package/dist/collection/components/position/lido-pos.js.map +1 -1
  16. package/dist/collection/components/row/lido-row.js +52 -12
  17. package/dist/collection/components/row/lido-row.js.map +1 -1
  18. package/dist/collection/components/text/lido-text.js +39 -18
  19. package/dist/collection/components/text/lido-text.js.map +1 -1
  20. package/dist/collection/components/wrap/lido-wrap.js +33 -12
  21. package/dist/collection/components/wrap/lido-wrap.js.map +1 -1
  22. package/dist/collection/index.css +4 -0
  23. package/dist/collection/utils/audioPlayer.js +65 -0
  24. package/dist/collection/utils/audioPlayer.js.map +1 -0
  25. package/dist/collection/utils/utils.js +28 -61
  26. package/dist/collection/utils/utils.js.map +1 -1
  27. package/dist/components/index.js +1 -1
  28. package/dist/components/lido-avatar.js +1 -1
  29. package/dist/components/lido-col.js +1 -1
  30. package/dist/components/lido-container.js +1 -1
  31. package/dist/components/lido-home.js +1 -1
  32. package/dist/components/lido-image.js +1 -1
  33. package/dist/components/lido-pos.js +1 -1
  34. package/dist/components/lido-root.js +11 -11
  35. package/dist/components/lido-row.js +1 -1
  36. package/dist/components/lido-shape.js +1 -1
  37. package/dist/components/lido-text.js +1 -1
  38. package/dist/components/lido-trace.js +1 -1
  39. package/dist/components/lido-wrap.js +1 -1
  40. package/dist/components/{p-77b5d492.js → p-185d3021.js} +2 -2
  41. package/dist/components/{p-77b5d492.js.map → p-185d3021.js.map} +1 -1
  42. package/dist/components/{p-07c4c7a8.js → p-21c7365d.js} +31 -14
  43. package/dist/components/p-21c7365d.js.map +1 -0
  44. package/dist/components/{p-9dec3477.js → p-24527345.js} +34 -14
  45. package/dist/components/p-24527345.js.map +1 -0
  46. package/dist/components/{p-f0042795.js → p-2c6af93f.js} +34 -14
  47. package/dist/components/p-2c6af93f.js.map +1 -0
  48. package/dist/components/{p-efa782df.js → p-3230edf7.js} +2 -2
  49. package/dist/components/{p-efa782df.js.map → p-3230edf7.js.map} +1 -1
  50. package/dist/components/{p-2d82c05d.js → p-3bf3a2f8.js} +35 -18
  51. package/dist/components/p-3bf3a2f8.js.map +1 -0
  52. package/dist/components/{p-765eb507.js → p-5465821b.js} +31 -14
  53. package/dist/components/p-5465821b.js.map +1 -0
  54. package/dist/components/{p-47a388b8.js → p-7b4c4606.js} +91 -61
  55. package/dist/components/p-7b4c4606.js.map +1 -0
  56. package/dist/components/{p-150a988b.js → p-95cfda5b.js} +30 -13
  57. package/dist/components/p-95cfda5b.js.map +1 -0
  58. package/dist/components/{p-e47465e7.js → p-a88c0bb4.js} +44 -11
  59. package/dist/components/p-a88c0bb4.js.map +1 -0
  60. package/dist/components/{p-d7f8dde4.js → p-b8564fe1.js} +13 -13
  61. package/dist/components/p-b8564fe1.js.map +1 -0
  62. package/dist/components/{p-c43e1474.js → p-e90137c1.js} +2 -2
  63. package/dist/components/{p-c43e1474.js.map → p-e90137c1.js.map} +1 -1
  64. package/dist/esm/index.js +1 -1
  65. package/dist/esm/lido-avatar_13.entry.js +210 -78
  66. package/dist/esm/lido-avatar_13.entry.js.map +1 -1
  67. package/dist/esm/lido-player.js +1 -1
  68. package/dist/esm/loader.js +1 -1
  69. package/dist/esm/{utils-bbe0dd46.js → utils-6f3eee22.js} +91 -61
  70. package/dist/esm/utils-6f3eee22.js.map +1 -0
  71. package/dist/lido-player/index.esm.js +1 -1
  72. package/dist/lido-player/lido-player.css +1 -1
  73. package/dist/lido-player/lido-player.esm.js +1 -1
  74. package/dist/lido-player/lido-player.esm.js.map +1 -1
  75. package/dist/lido-player/p-2a7789d3.js +2 -0
  76. package/dist/lido-player/p-2a7789d3.js.map +1 -0
  77. package/dist/lido-player/p-6c9941bc.entry.js +2 -0
  78. package/dist/lido-player/p-6c9941bc.entry.js.map +1 -0
  79. package/dist/types/components/column/lido-col.d.ts +17 -0
  80. package/dist/types/components/container/lido-container.d.ts +6 -0
  81. package/dist/types/components/image/lido-image.d.ts +13 -0
  82. package/dist/types/components/position/lido-pos.d.ts +14 -1
  83. package/dist/types/components/row/lido-row.d.ts +17 -0
  84. package/dist/types/components/text/lido-text.d.ts +14 -1
  85. package/dist/types/components/wrap/lido-wrap.d.ts +13 -0
  86. package/dist/types/components.d.ts +28 -4
  87. package/dist/types/utils/audioPlayer.d.ts +8 -0
  88. package/dist/types/utils/utils.d.ts +4 -1
  89. package/package.json +1 -1
  90. package/dist/cjs/utils-0bfc0d99.js.map +0 -1
  91. package/dist/components/p-07c4c7a8.js.map +0 -1
  92. package/dist/components/p-150a988b.js.map +0 -1
  93. package/dist/components/p-2d82c05d.js.map +0 -1
  94. package/dist/components/p-47a388b8.js.map +0 -1
  95. package/dist/components/p-765eb507.js.map +0 -1
  96. package/dist/components/p-9dec3477.js.map +0 -1
  97. package/dist/components/p-d7f8dde4.js.map +0 -1
  98. package/dist/components/p-e47465e7.js.map +0 -1
  99. package/dist/components/p-f0042795.js.map +0 -1
  100. package/dist/esm/utils-bbe0dd46.js.map +0 -1
  101. package/dist/lido-player/p-8f9afedc.entry.js +0 -2
  102. package/dist/lido-player/p-8f9afedc.entry.js.map +0 -1
  103. package/dist/lido-player/p-e9f4fd22.js +0 -2
  104. package/dist/lido-player/p-e9f4fd22.js.map +0 -1
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const utils = require('./utils-0bfc0d99.js');
5
+ const utils = require('./utils-5b00f27b.js');
6
6
  require('./index-0d28e716.js');
7
7
 
8
8
 
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-0d28e716.js');
6
- const utils = require('./utils-0bfc0d99.js');
6
+ const utils = require('./utils-5b00f27b.js');
7
7
 
8
8
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
9
9
 
@@ -6622,6 +6622,8 @@ const LidoCol = class {
6622
6622
  this.childElementsLength = undefined;
6623
6623
  this.minLength = undefined;
6624
6624
  this.maxLength = undefined;
6625
+ this.direction = undefined;
6626
+ this.style = {};
6625
6627
  }
6626
6628
  /**
6627
6629
  * This lifecycle hook is called after the component is rendered in the DOM.
@@ -6629,20 +6631,36 @@ const LidoCol = class {
6629
6631
  */
6630
6632
  componentDidLoad() {
6631
6633
  utils.initEventsForElement(this.el, this.type);
6632
- utils.handlingChildElements(this.el, this.minLength, this.maxLength, this.childElementsLength, "flex");
6634
+ utils.handlingChildElements(this.el, this.minLength, this.maxLength, this.childElementsLength, 'flex');
6633
6635
  }
6634
- render() {
6635
- // Inline styles applied to the column, mainly for positioning and background.
6636
- const style = {
6637
- height: this.height,
6638
- width: this.width,
6639
- backgroundColor: this.bgColor,
6640
- top: this.y,
6641
- left: this.x,
6642
- display: this.visible ? 'flex' : 'none',
6636
+ /**
6637
+ * Lifecycle method that runs before the component is rendered.
6638
+ * Initializes styles and sets up event listeners for resize and load events.
6639
+ */
6640
+ componentWillLoad() {
6641
+ this.updateStyles();
6642
+ window.addEventListener('resize', this.updateStyles.bind(this));
6643
+ window.addEventListener('load', this.updateStyles.bind(this));
6644
+ }
6645
+ disconnectedCallback() {
6646
+ window.removeEventListener('resize', this.updateStyles.bind(this));
6647
+ window.removeEventListener('load', this.updateStyles.bind(this));
6648
+ }
6649
+ updateStyles() {
6650
+ const orientation = window.innerHeight > window.innerWidth ? 'portrait' : 'landscape';
6651
+ this.style = {
6652
+ height: utils.parseProp(this.height, orientation),
6653
+ width: utils.parseProp(this.width, orientation),
6654
+ backgroundColor: utils.parseProp(this.bgColor, orientation),
6655
+ top: utils.parseProp(this.y, orientation),
6656
+ left: utils.parseProp(this.x, orientation),
6643
6657
  zIndex: this.z,
6658
+ display: this.visible ? 'flex' : 'none', // Toggle visibility
6659
+ flexDirection: !this.direction ? 'column' : utils.parseProp(this.direction, orientation),
6644
6660
  };
6645
- return (index.h(index.Host, { key: 'a91a0219b86fca7c5b979ba19451d554c12e3236', id: this.id, class: "lido-col", type: this.type, tabindex: this.tabIndex, value: this.value, style: style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry }, index.h("slot", { key: 'dc46259db21b1675e4e2595312d539df66931fd3' })));
6661
+ }
6662
+ render() {
6663
+ return (index.h(index.Host, { key: '0599d6f5fffdbd11b278ba25d7eb8e6d63f66709', id: this.id, class: "lido-col", type: this.type, tabindex: this.tabIndex, value: this.value, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry }, index.h("slot", { key: '898ed8cc2829a5c6b30387de49c46ffe3398631a' })));
6646
6664
  }
6647
6665
  get el() { return index.getElement(this); }
6648
6666
  };
@@ -6666,6 +6684,7 @@ const LidoContainer = class {
6666
6684
  this.y = undefined;
6667
6685
  this.z = undefined;
6668
6686
  this.bgColor = undefined;
6687
+ this.bgImage = undefined;
6669
6688
  this.type = undefined;
6670
6689
  this.tabIndex = undefined;
6671
6690
  this.visible = undefined;
@@ -6706,18 +6725,43 @@ const LidoContainer = class {
6706
6725
  scaleContainer(container) {
6707
6726
  var _a;
6708
6727
  const widths = [window.innerWidth];
6709
- // const heights = [window.innerHeight];
6728
+ const heights = [window.innerHeight];
6710
6729
  if ((_a = window.screen) === null || _a === void 0 ? void 0 : _a.width) {
6711
6730
  widths.push(window.screen.width);
6712
- // heights.push(window.screen.height);
6731
+ heights.push(window.screen.height);
6713
6732
  }
6714
6733
  const width = Math.min(...widths);
6715
- const height = this.height ? this.convertToPixels(this.height) : document.documentElement.clientHeight;
6716
- const scaleX = width / 1600; // Scale based on a reference width of 1600px
6717
- const scaleY = height / 900; // Scale based on a reference height of 900px
6718
- const scale = Math.min(scaleX, scaleY);
6734
+ const height = Math.min(...heights); // Get the smallest height
6735
+ const isPortrait = height > width; // Check if the device is in portrait mode
6736
+ let scaleX;
6737
+ let scaleY;
6738
+ if (isPortrait) {
6739
+ // Portrait Mode: Scale based on portrait reference size (e.g., 900x1600)
6740
+ scaleX = width / 900;
6741
+ scaleY = height / 1600;
6742
+ }
6743
+ else {
6744
+ // Landscape Mode: Scale based on landscape reference size (e.g., 1600x900)
6745
+ scaleX = width / 1600;
6746
+ scaleY = height / 900;
6747
+ }
6748
+ const scale = Math.min(scaleX, scaleY); // Ensure uniform scaling
6719
6749
  // Center the container and apply scaling
6720
6750
  container.style.transform = `translate(-50%, -50%) scale(${scale})`;
6751
+ container.style.left = '50%';
6752
+ container.style.top = '50%';
6753
+ container.style.position = 'absolute'; // Ensure proper positioning
6754
+ this.screenOrientation();
6755
+ }
6756
+ screenOrientation() {
6757
+ if (window.innerHeight > window.innerWidth) {
6758
+ this.el.style.height = '1600px';
6759
+ this.el.style.width = '900px';
6760
+ }
6761
+ else {
6762
+ this.el.style.height = '900px';
6763
+ this.el.style.width = '1600px';
6764
+ }
6721
6765
  }
6722
6766
  /**
6723
6767
  * Lifecycle hook that runs after the component is loaded.
@@ -6727,7 +6771,9 @@ const LidoContainer = class {
6727
6771
  */
6728
6772
  componentDidLoad() {
6729
6773
  this.scaleContainer(this.el);
6774
+ const backGroundImage = this.bgImage ? utils.convertUrlToRelative(this.bgImage) : '';
6730
6775
  document.body.style.backgroundColor = this.bgColor;
6776
+ document.body.style.backgroundImage = `url(${backGroundImage})`;
6731
6777
  // Re-scale the container on window resize or load events
6732
6778
  window.addEventListener('resize', () => this.scaleContainer(this.el));
6733
6779
  window.addEventListener('load', () => this.scaleContainer(this.el));
@@ -6738,25 +6784,29 @@ const LidoContainer = class {
6738
6784
  document.head.appendChild(styleElement);
6739
6785
  }
6740
6786
  }
6787
+ disconnectedCallback() {
6788
+ window.removeEventListener('resize', () => this.scaleContainer(this.el));
6789
+ window.removeEventListener('load', () => this.scaleContainer(this.el));
6790
+ document.body.style.backgroundColor = '';
6791
+ document.body.style.backgroundImage = '';
6792
+ }
6741
6793
  render() {
6742
6794
  // Define the styles for the container element
6743
6795
  const style = {
6744
6796
  backgroundColor: this.bgColor,
6745
- width: '1600px', // Fixed width of the container
6746
- height: '900px', // Fixed height of the container
6747
6797
  position: 'absolute',
6748
6798
  top: '50%',
6749
6799
  left: '50%',
6750
6800
  transform: 'translate(-50%, -50%)', // Centering the container
6751
6801
  };
6752
6802
  console.log('🚀 ~ LidoContainer ~ canplay:', this.canplay);
6753
- return (index.h(index.Host, { key: 'be7c50232bd0362f217b44d7f4d723f1ed5c40ec', id: "lido-container", tabindex: 0, class: "lido-container", objective: this.objective, style: style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, onTouch: this.onTouch, onInCorrect: this.onInCorrect, onCorrect: this.onCorrect, onEntry: this.onEntry, showCheck: `${this.showCheck}`, isContinueOnCorrect: `${this.isContinueOnCorrect}`, isAllowOnlyCorrect: `${this.isAllowOnlyCorrect}`, canplay: `${this.canplay}` }, index.h("slot", { key: '8ce427c8388574aa7019b83cddae13a182db47ab' })));
6803
+ return (index.h(index.Host, { key: '851efc3f3b6a305b11bfe925bf51c68e76b21dc6', id: "lido-container", tabindex: 0, class: "lido-container", objective: this.objective, style: style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, onTouch: this.onTouch, onInCorrect: this.onInCorrect, onCorrect: this.onCorrect, onEntry: this.onEntry, showCheck: `${this.showCheck}`, isContinueOnCorrect: `${this.isContinueOnCorrect}`, isAllowOnlyCorrect: `${this.isAllowOnlyCorrect}`, canplay: `${this.canplay}` }, index.h("slot", { key: 'ba028100b8a97ff1496d8dc650111efa8e93447b' })));
6754
6804
  }
6755
6805
  get el() { return index.getElement(this); }
6756
6806
  };
6757
6807
  LidoContainer.style = LidoContainerStyle0;
6758
6808
 
6759
- const indexCss = "@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap'); @import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400..800&display=swap'); body{overflow:hidden}.lido-disable-check-button{pointer-events:none;background-color:#9393935c !important;color:white}.lido-element-selected{border:2px solid;background-color:#ffdf7d !important}";
6809
+ const indexCss = "@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap'); @import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400..800&display=swap'); body{overflow:hidden;background-position:center;background-size:cover;background-repeat:no-repeat;height:100vh}.lido-disable-check-button{pointer-events:none;background-color:#9393935c !important;color:white}.lido-element-selected{border:2px solid;background-color:#ffdf7d !important}";
6760
6810
  const LidoHomeStyle0 = indexCss;
6761
6811
 
6762
6812
  const animationCss = "@keyframes rightToPlace{from{transform:translateX(2000px)}to{transform:translateX(0)}}@keyframes topToPlace{from{transform:translateY(-1000px)}to{transform:translateY(0)}}@keyframes bottomToPlace{from{transform:translateY(1000px)}to{transform:translateY(0)}}@keyframes placeToLeft{from{}to{transform:translateX(-2000px)}}@keyframes leftToPlace{from{transform:translateX(-2000px)}to{transform:translateX(0)}}@keyframes shake{0%{transform:translateX(0)}10%{transform:translateX(-5px)}20%{transform:translateX(5px)}30%{transform:translateX(-5px)}40%{transform:translateX(5px)}50%{transform:translateX(-5px)}60%{transform:translateX(5px)}70%{transform:translateX(-5px)}80%{transform:translateX(5px)}90%{transform:translateX(-5px)}100%{transform:translateX(0)}}@keyframes fallAndBounce{0%{transform:translateY(-1000px)}25%{transform:translateY(0px)}50%{transform:translateY(-200px)}75%{transform:translateY(0)}90%{transform:translateY(-100px)}100%{transform:translateY(0)}}@keyframes placeToDown{0%{transform:translateY(0)}100%{transform:translateY(1000px)}}";
@@ -6976,6 +7026,7 @@ const LidoImage = class {
6976
7026
  this.onCorrect = undefined;
6977
7027
  this.onEntry = undefined;
6978
7028
  this.src = undefined;
7029
+ this.style = undefined;
6979
7030
  }
6980
7031
  /**
6981
7032
  * Lifecycle method that runs after the component has been loaded into the DOM.
@@ -6984,20 +7035,35 @@ const LidoImage = class {
6984
7035
  componentDidLoad() {
6985
7036
  utils.initEventsForElement(this.el, this.type);
6986
7037
  }
6987
- render() {
6988
- // Inline styles for the image, including dimensions, positioning, and visibility
6989
- const style = {
6990
- height: this.height,
6991
- width: this.width,
6992
- backgroundColor: this.bgColor,
6993
- top: this.y,
6994
- left: this.x,
7038
+ /**
7039
+ * Lifecycle method that runs before the component is rendered.
7040
+ * Initializes styles and sets up event listeners for resize and load events.
7041
+ */
7042
+ componentWillLoad() {
7043
+ this.updateStyles();
7044
+ window.addEventListener('resize', this.updateStyles.bind(this)); // Update on screen rotation
7045
+ window.addEventListener('load', this.updateStyles.bind(this)); // Update on screen rotation
7046
+ }
7047
+ disconnectedCallback() {
7048
+ window.removeEventListener('resize', this.updateStyles.bind(this));
7049
+ window.removeEventListener('load', this.updateStyles.bind(this));
7050
+ }
7051
+ updateStyles() {
7052
+ const orientation = window.innerHeight > window.innerWidth ? 'portrait' : 'landscape';
7053
+ this.style = {
7054
+ height: utils.parseProp(this.height, orientation),
7055
+ width: utils.parseProp(this.width, orientation),
7056
+ backgroundColor: utils.parseProp(this.bgColor, orientation),
7057
+ top: utils.parseProp(this.y, orientation),
7058
+ left: utils.parseProp(this.x, orientation),
6995
7059
  zIndex: this.z,
6996
- display: this.visible ? 'flex' : 'none',
7060
+ display: JSON.parse(utils.parseProp(`${this.visible}`, orientation)) ? 'flex' : 'none', // Toggle visibility
6997
7061
  alignItems: 'center', // Vertically center the image
6998
7062
  justifyContent: 'center', // Horizontally center the image
6999
7063
  };
7000
- return (index.h(index.Host, { key: '00ef3128ad8afdc11d69d009e4206dbd98ad4c6f', type: this.type, tabindex: this.tabIndex, style: style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, value: this.value, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry }, index.h("img", { key: 'c2e92db1a085fe6f951a7baea8bcd6392a6b469b', class: "lido-image", src: utils.convertUrlToRelative(this.src), alt: "", style: style })));
7064
+ }
7065
+ render() {
7066
+ return (index.h(index.Host, { key: '430e4b71153836e73fb4611f2b5b0630a39624a2', type: this.type, tabindex: this.tabIndex, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, value: this.value, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry }, index.h("img", { key: '35709cfa8a2975e1f0cd326c5d7acc0f5a4ea711', class: "lido-image", src: utils.convertUrlToRelative(this.src), alt: "", style: this.style })));
7001
7067
  }
7002
7068
  get el() { return index.getElement(this); }
7003
7069
  };
@@ -7027,6 +7093,7 @@ const LidoPos = class {
7027
7093
  this.onInCorrect = undefined;
7028
7094
  this.onCorrect = undefined;
7029
7095
  this.onEntry = undefined;
7096
+ this.style = undefined;
7030
7097
  }
7031
7098
  /**
7032
7099
  * Lifecycle hook that is called after the component has been rendered in the DOM.
@@ -7035,18 +7102,33 @@ const LidoPos = class {
7035
7102
  componentDidLoad() {
7036
7103
  utils.initEventsForElement(this.el, this.type);
7037
7104
  }
7038
- render() {
7039
- // Inline styles to position and size the component
7040
- const style = {
7041
- height: this.height,
7042
- width: this.width,
7043
- backgroundColor: this.bgColor,
7044
- top: this.y,
7045
- left: this.x,
7105
+ /**
7106
+ * Lifecycle method that runs before the component is rendered.
7107
+ * Initializes styles and sets up event listeners for resize and load events.
7108
+ */
7109
+ componentWillLoad() {
7110
+ this.updateStyles();
7111
+ window.addEventListener('resize', this.updateStyles.bind(this)); // Update on screen rotation
7112
+ window.addEventListener('load', this.updateStyles.bind(this)); // Update on screen rotation
7113
+ }
7114
+ disconnectedCallback() {
7115
+ window.removeEventListener('resize', this.updateStyles.bind(this));
7116
+ window.removeEventListener('load', this.updateStyles.bind(this));
7117
+ }
7118
+ updateStyles() {
7119
+ const orientation = window.innerHeight > window.innerWidth ? 'portrait' : 'landscape';
7120
+ this.style = {
7121
+ height: utils.parseProp(this.height, orientation),
7122
+ width: utils.parseProp(this.width, orientation),
7123
+ backgroundColor: utils.parseProp(this.bgColor, orientation),
7124
+ top: utils.parseProp(this.y, orientation),
7125
+ left: utils.parseProp(this.x, orientation),
7046
7126
  zIndex: this.z,
7047
- display: this.visible ? 'block' : 'none', // Toggle visibility
7127
+ display: JSON.parse(utils.parseProp(`${this.visible}`, orientation)) ? 'block' : 'none', // Toggle visibility
7048
7128
  };
7049
- return (index.h(index.Host, { key: '174d8e67c07e79e2353fd3fffbf750da3f69185d', id: this.id, class: "lido-pos", type: this.type, tabindex: this.tabIndex, style: style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, value: this.value, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry }, index.h("slot", { key: '30af72d77bc81e8b643d7346797dd69eea0d96b4' })));
7129
+ }
7130
+ render() {
7131
+ return (index.h(index.Host, { key: '26efb5dae4a9b1de11909d09b70045cf53069221', id: this.id, class: "lido-pos", type: this.type, tabindex: this.tabIndex, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, value: this.value, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry }, index.h("slot", { key: '069bac1f8b83b603f6c5fef9c584a788f5e61d82' })));
7050
7132
  }
7051
7133
  get el() { return index.getElement(this); }
7052
7134
  };
@@ -7192,6 +7274,8 @@ const LidoRow = class {
7192
7274
  this.childElementsLength = undefined;
7193
7275
  this.minLength = undefined;
7194
7276
  this.maxLength = undefined;
7277
+ this.direction = undefined;
7278
+ this.style = {};
7195
7279
  }
7196
7280
  /**
7197
7281
  * Lifecycle hook that runs after the component is loaded into the DOM.
@@ -7199,20 +7283,36 @@ const LidoRow = class {
7199
7283
  */
7200
7284
  componentDidLoad() {
7201
7285
  utils.initEventsForElement(this.el, this.type);
7202
- utils.handlingChildElements(this.el, this.minLength, this.maxLength, this.childElementsLength, "flex");
7286
+ utils.handlingChildElements(this.el, this.minLength, this.maxLength, this.childElementsLength, 'flex');
7203
7287
  }
7204
- render() {
7205
- // Inline styles to position and size the row component
7206
- const style = {
7207
- height: this.height,
7208
- width: this.width,
7209
- top: this.y,
7210
- left: this.x,
7211
- display: this.visible ? 'flex' : 'none', // Flexbox for row layout
7288
+ /**
7289
+ * Lifecycle method that runs before the component is rendered.
7290
+ * Initializes styles and sets up event listeners for resize and load events.
7291
+ */
7292
+ componentWillLoad() {
7293
+ this.updateStyles();
7294
+ window.addEventListener('resize', this.updateStyles.bind(this));
7295
+ window.addEventListener('load', this.updateStyles.bind(this));
7296
+ }
7297
+ disconnectedCallback() {
7298
+ window.removeEventListener('resize', this.updateStyles.bind(this));
7299
+ window.removeEventListener('load', this.updateStyles.bind(this));
7300
+ }
7301
+ updateStyles() {
7302
+ const orientation = window.innerHeight > window.innerWidth ? 'portrait' : 'landscape';
7303
+ this.style = {
7304
+ height: utils.parseProp(this.height, orientation),
7305
+ width: utils.parseProp(this.width, orientation),
7306
+ backgroundColor: utils.parseProp(this.bgColor, orientation),
7307
+ top: utils.parseProp(this.y, orientation),
7308
+ left: utils.parseProp(this.x, orientation),
7212
7309
  zIndex: this.z,
7213
- backgroundColor: this.bgColor, // Apply background color if provided
7310
+ display: this.visible ? 'flex' : 'none', // Toggle visibility
7311
+ flexDirection: !this.direction ? 'row' : utils.parseProp(this.direction, orientation),
7214
7312
  };
7215
- return (index.h(index.Host, { key: '6b9543d3dea5b46f31b8709e6b2cbb4adac318fb', class: "lido-row", type: this.type, tabindex: this.tabIndex, value: this.value, style: style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry }, index.h("slot", { key: '51412c74fad69cc788d673846410b9b45aeef62d' })));
7313
+ }
7314
+ render() {
7315
+ return (index.h(index.Host, { key: 'f8b0bdf59e07c2247a0369a0078f8142f09c404b', class: "lido-row", type: this.type, tabindex: this.tabIndex, value: this.value, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry }, index.h("slot", { key: 'bce3362f3c323be80ac5973f31f9bbd0d1afceca' })));
7216
7316
  }
7217
7317
  get el() { return index.getElement(this); }
7218
7318
  };
@@ -7299,6 +7399,7 @@ const LidoText = class {
7299
7399
  this.onCorrect = undefined;
7300
7400
  this.onEntry = undefined;
7301
7401
  this.isAllowOnlyOneDrop = false;
7402
+ this.style = {};
7302
7403
  }
7303
7404
  /**
7304
7405
  * Lifecycle hook that runs after the component is rendered in the DOM.
@@ -7307,23 +7408,38 @@ const LidoText = class {
7307
7408
  componentDidLoad() {
7308
7409
  utils.initEventsForElement(this.el, this.type);
7309
7410
  }
7310
- render() {
7311
- const backgroundImg = this.bgImage ? utils.convertUrlToRelative(this.bgImage) : "";
7312
- // Inline styles to customize the appearance and positioning of the text component
7313
- const style = {
7314
- height: this.height,
7315
- width: this.width,
7316
- backgroundColor: this.bgColor,
7317
- top: this.y,
7318
- left: this.x,
7411
+ /**
7412
+ * Lifecycle method that runs before the component is rendered.
7413
+ * Initializes styles and sets up event listeners for resize and load events.
7414
+ */
7415
+ componentWillLoad() {
7416
+ this.updateStyles();
7417
+ window.addEventListener('resize', this.updateStyles.bind(this));
7418
+ window.addEventListener('load', this.updateStyles.bind(this));
7419
+ }
7420
+ disconnectedCallback() {
7421
+ window.removeEventListener('resize', this.updateStyles.bind(this));
7422
+ window.removeEventListener('load', this.updateStyles.bind(this));
7423
+ }
7424
+ updateStyles() {
7425
+ const backgroundImg = this.bgImage ? utils.convertUrlToRelative(this.bgImage) : '';
7426
+ const orientation = window.innerHeight > window.innerWidth ? 'portrait' : 'landscape';
7427
+ this.style = {
7428
+ height: utils.parseProp(this.height, orientation),
7429
+ width: utils.parseProp(this.width, orientation),
7430
+ backgroundColor: utils.parseProp(this.bgColor, orientation),
7431
+ top: utils.parseProp(this.y, orientation),
7432
+ left: utils.parseProp(this.x, orientation),
7319
7433
  zIndex: this.z,
7320
- fontSize: this.fontSize,
7434
+ fontSize: utils.parseProp(this.fontSize, orientation),
7321
7435
  fontFamily: this.font,
7322
- color: this.fontColor,
7323
- display: this.visible ? 'flex' : 'none', // Show or hide based on visibility prop
7324
- backgroundImage: `url(${backgroundImg})`
7436
+ color: utils.parseProp(this.fontColor, orientation),
7437
+ display: JSON.parse(utils.parseProp(`${this.visible}`, orientation)) ? 'flex' : 'none', // Toggle visibility
7438
+ backgroundImage: `url(${utils.parseProp(backgroundImg, orientation)})`,
7325
7439
  };
7326
- return (index.h(index.Host, { key: '904c57cd3b57539e0ca22e3c8f3d9a95c8654810', class: "lido-text", value: this.value, type: this.type, tabindex: this.tabIndex, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry, id: this.id, style: style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, isAllowOnlyOneDrop: `${this.isAllowOnlyOneDrop}` }, this.string));
7440
+ }
7441
+ render() {
7442
+ return (index.h(index.Host, { key: '84c017e4c232307fda917a9da133629dbccf443c', class: "lido-text", value: this.value, type: this.type, tabindex: this.tabIndex, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry, id: this.id, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, isAllowOnlyOneDrop: `${this.isAllowOnlyOneDrop}` }, this.string));
7327
7443
  }
7328
7444
  get el() { return index.getElement(this); }
7329
7445
  };
@@ -7838,6 +7954,7 @@ const LidoWrap = class {
7838
7954
  this.childElementsLength = undefined;
7839
7955
  this.minLength = undefined;
7840
7956
  this.maxLength = undefined;
7957
+ this.style = undefined;
7841
7958
  }
7842
7959
  /**
7843
7960
  * Lifecycle hook that runs after the component is rendered in the DOM.
@@ -7845,20 +7962,35 @@ const LidoWrap = class {
7845
7962
  */
7846
7963
  componentDidLoad() {
7847
7964
  utils.initEventsForElement(this.el, this.type);
7848
- utils.handlingChildElements(this.el, this.minLength, this.maxLength, this.childElementsLength, "grid");
7965
+ utils.handlingChildElements(this.el, this.minLength, this.maxLength, this.childElementsLength, 'grid');
7849
7966
  }
7850
- render() {
7851
- // Inline styles to position and size the wrap container, with grid layout applied
7852
- const style = {
7853
- height: this.height,
7854
- width: this.width,
7855
- top: this.y,
7856
- left: this.x,
7857
- display: this.visible ? 'grid' : 'none', // Use grid layout
7967
+ /**
7968
+ * Lifecycle method that runs before the component is rendered.
7969
+ * Initializes styles and sets up event listeners for resize and load events.
7970
+ */
7971
+ componentWillLoad() {
7972
+ this.updateStyles();
7973
+ window.addEventListener('resize', this.updateStyles.bind(this)); // Update on screen rotation
7974
+ window.addEventListener('load', this.updateStyles.bind(this)); // Update on screen rotation
7975
+ }
7976
+ disconnectedCallback() {
7977
+ window.removeEventListener('resize', this.updateStyles.bind(this));
7978
+ window.removeEventListener('load', this.updateStyles.bind(this));
7979
+ }
7980
+ updateStyles() {
7981
+ const orientation = window.innerHeight > window.innerWidth ? 'portrait' : 'landscape';
7982
+ this.style = {
7983
+ height: utils.parseProp(this.height, orientation),
7984
+ width: utils.parseProp(this.width, orientation),
7985
+ backgroundColor: utils.parseProp(this.bgColor, orientation),
7986
+ top: utils.parseProp(this.y, orientation),
7987
+ left: utils.parseProp(this.x, orientation),
7858
7988
  zIndex: this.z,
7859
- backgroundColor: this.bgColor,
7989
+ display: JSON.parse(utils.parseProp(`${this.visible}`, orientation)) ? 'grid' : 'none', // Toggle visibility
7860
7990
  };
7861
- return (index.h(index.Host, { key: '917fef997c58f2590f803ae4641d10557def0a24', class: "lido-wrap", value: this.value, type: this.type, tabindex: this.tabIndex, style: style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry }, index.h("slot", { key: '24b14fcac75fb78c960ee0a50aefb54145ff760b' })));
7991
+ }
7992
+ render() {
7993
+ return (index.h(index.Host, { key: '743df51a1d832b87cd17ad840e9b2497b48d9b72', class: "lido-wrap", value: this.value, type: this.type, tabindex: this.tabIndex, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry }, index.h("slot", { key: '527bd48b5d85bf8e51133c2e6d29db541d82ae48' })));
7862
7994
  }
7863
7995
  get el() { return index.getElement(this); }
7864
7996
  };