lido-player 0.0.2-alpha-7 → 0.0.2-alpha-9

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 (99) hide show
  1. package/dist/cjs/index.cjs.js +1 -1
  2. package/dist/cjs/lido-avatar_13.cjs.entry.js +26 -8
  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-2740b263.js → utils-0bfc0d99.js} +84 -22
  7. package/dist/cjs/utils-0bfc0d99.js.map +1 -0
  8. package/dist/collection/components/column/lido-col.js +57 -2
  9. package/dist/collection/components/column/lido-col.js.map +1 -1
  10. package/dist/collection/components/container/lido-container.js +24 -1
  11. package/dist/collection/components/container/lido-container.js.map +1 -1
  12. package/dist/collection/components/home/lido-home.js +2 -2
  13. package/dist/collection/components/home/lido-home.js.map +1 -1
  14. package/dist/collection/components/root/assets/xmlData.xml +110 -99
  15. package/dist/collection/components/row/lido-row.css +1 -1
  16. package/dist/collection/components/row/lido-row.js +57 -2
  17. package/dist/collection/components/row/lido-row.js.map +1 -1
  18. package/dist/collection/components/wrap/lido-wrap.js +57 -2
  19. package/dist/collection/components/wrap/lido-wrap.js.map +1 -1
  20. package/dist/collection/utils/css/animation.css +28 -1
  21. package/dist/collection/utils/utils.js +85 -24
  22. package/dist/collection/utils/utils.js.map +1 -1
  23. package/dist/components/index.js +1 -1
  24. package/dist/components/lido-avatar.js +1 -1
  25. package/dist/components/lido-col.js +1 -1
  26. package/dist/components/lido-container.js +1 -1
  27. package/dist/components/lido-home.js +1 -1
  28. package/dist/components/lido-image.js +1 -1
  29. package/dist/components/lido-pos.js +1 -1
  30. package/dist/components/lido-root.js +11 -11
  31. package/dist/components/lido-row.js +1 -1
  32. package/dist/components/lido-shape.js +1 -1
  33. package/dist/components/lido-text.js +1 -1
  34. package/dist/components/lido-trace.js +1 -1
  35. package/dist/components/lido-wrap.js +1 -1
  36. package/dist/components/{p-3b1e591d.js → p-07c4c7a8.js} +2 -2
  37. package/dist/components/{p-3b1e591d.js.map → p-07c4c7a8.js.map} +1 -1
  38. package/dist/components/{p-69faad88.js → p-150a988b.js} +2 -2
  39. package/dist/components/{p-69faad88.js.map → p-150a988b.js.map} +1 -1
  40. package/dist/components/{p-d1411ddb.js → p-2d82c05d.js} +2 -2
  41. package/dist/components/{p-d1411ddb.js.map → p-2d82c05d.js.map} +1 -1
  42. package/dist/components/{p-cec49e6e.js → p-47a388b8.js} +84 -23
  43. package/dist/components/p-47a388b8.js.map +1 -0
  44. package/dist/components/{p-0920af1c.js → p-765eb507.js} +11 -4
  45. package/dist/components/p-765eb507.js.map +1 -0
  46. package/dist/components/{p-ae2fab80.js → p-77b5d492.js} +2 -2
  47. package/dist/components/{p-ae2fab80.js.map → p-77b5d492.js.map} +1 -1
  48. package/dist/components/{p-1255476d.js → p-9dec3477.js} +12 -5
  49. package/dist/components/p-9dec3477.js.map +1 -0
  50. package/dist/components/{p-29365fd6.js → p-c43e1474.js} +2 -2
  51. package/dist/components/{p-29365fd6.js.map → p-c43e1474.js.map} +1 -1
  52. package/dist/components/{p-d4c95792.js → p-d7f8dde4.js} +14 -14
  53. package/dist/components/p-d7f8dde4.js.map +1 -0
  54. package/dist/components/{p-0fd91021.js → p-e47465e7.js} +10 -3
  55. package/dist/components/p-e47465e7.js.map +1 -0
  56. package/dist/components/{p-a501f1b8.js → p-efa782df.js} +2 -2
  57. package/dist/components/{p-a501f1b8.js.map → p-efa782df.js.map} +1 -1
  58. package/dist/components/{p-86a0612f.js → p-f0042795.js} +11 -4
  59. package/dist/components/p-f0042795.js.map +1 -0
  60. package/dist/esm/index.js +1 -1
  61. package/dist/esm/lido-avatar_13.entry.js +26 -8
  62. package/dist/esm/lido-avatar_13.entry.js.map +1 -1
  63. package/dist/esm/lido-player.js +1 -1
  64. package/dist/esm/loader.js +1 -1
  65. package/dist/esm/{utils-ebdd7526.js → utils-bbe0dd46.js} +84 -23
  66. package/dist/esm/utils-bbe0dd46.js.map +1 -0
  67. package/dist/lido-player/assets/xmlData.xml +110 -99
  68. package/dist/lido-player/index.esm.js +1 -1
  69. package/dist/lido-player/lido-player.esm.js +1 -1
  70. package/dist/lido-player/lido-player.esm.js.map +1 -1
  71. package/dist/lido-player/p-8f9afedc.entry.js +2 -0
  72. package/dist/lido-player/p-8f9afedc.entry.js.map +1 -0
  73. package/dist/lido-player/p-e9f4fd22.js +2 -0
  74. package/dist/lido-player/p-e9f4fd22.js.map +1 -0
  75. package/dist/types/components/column/lido-col.d.ts +15 -0
  76. package/dist/types/components/container/lido-container.d.ts +5 -0
  77. package/dist/types/components/row/lido-row.d.ts +15 -0
  78. package/dist/types/components/wrap/lido-wrap.d.ts +15 -0
  79. package/dist/types/components.d.ts +80 -0
  80. package/dist/types/utils/utils.d.ts +9 -0
  81. package/package.json +1 -1
  82. package/dist/cjs/utils-2740b263.js.map +0 -1
  83. package/dist/collection/components/root/assets/Audio/goodJob.mp3 +0 -0
  84. package/dist/collection/components/root/assets/Audio/tryAgain.mp3 +0 -0
  85. package/dist/collection/components/root/assets/Audio/wellDone.mp3 +0 -0
  86. package/dist/components/p-0920af1c.js.map +0 -1
  87. package/dist/components/p-0fd91021.js.map +0 -1
  88. package/dist/components/p-1255476d.js.map +0 -1
  89. package/dist/components/p-86a0612f.js.map +0 -1
  90. package/dist/components/p-cec49e6e.js.map +0 -1
  91. package/dist/components/p-d4c95792.js.map +0 -1
  92. package/dist/esm/utils-ebdd7526.js.map +0 -1
  93. package/dist/lido-player/assets/Audio/goodJob.mp3 +0 -0
  94. package/dist/lido-player/assets/Audio/tryAgain.mp3 +0 -0
  95. package/dist/lido-player/assets/Audio/wellDone.mp3 +0 -0
  96. package/dist/lido-player/p-fab4fa17.js +0 -2
  97. package/dist/lido-player/p-fab4fa17.js.map +0 -1
  98. package/dist/lido-player/p-fc012d18.entry.js +0 -2
  99. package/dist/lido-player/p-fc012d18.entry.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-2740b263.js');
5
+ const utils = require('./utils-0bfc0d99.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-2740b263.js');
6
+ const utils = require('./utils-0bfc0d99.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
 
@@ -6619,6 +6619,9 @@ const LidoCol = class {
6619
6619
  this.onInCorrect = undefined;
6620
6620
  this.onCorrect = undefined;
6621
6621
  this.onEntry = undefined;
6622
+ this.childElementsLength = undefined;
6623
+ this.minLength = undefined;
6624
+ this.maxLength = undefined;
6622
6625
  }
6623
6626
  /**
6624
6627
  * This lifecycle hook is called after the component is rendered in the DOM.
@@ -6626,6 +6629,7 @@ const LidoCol = class {
6626
6629
  */
6627
6630
  componentDidLoad() {
6628
6631
  utils.initEventsForElement(this.el, this.type);
6632
+ utils.handlingChildElements(this.el, this.minLength, this.maxLength, this.childElementsLength, "flex");
6629
6633
  }
6630
6634
  render() {
6631
6635
  // Inline styles applied to the column, mainly for positioning and background.
@@ -6638,7 +6642,7 @@ const LidoCol = class {
6638
6642
  display: this.visible ? 'flex' : 'none',
6639
6643
  zIndex: this.z,
6640
6644
  };
6641
- return (index.h(index.Host, { key: 'c0615aafb8bef4afbada7be8dbbd9630c4a089c6', 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: '9d3ec68dc577b7b68a8f20be71f49b7831e4a4bc' })));
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' })));
6642
6646
  }
6643
6647
  get el() { return index.getElement(this); }
6644
6648
  };
@@ -6652,6 +6656,7 @@ const LidoContainer = class {
6652
6656
  index.registerInstance(this, hostRef);
6653
6657
  this.id = undefined;
6654
6658
  this.objective = undefined;
6659
+ this.customStyle = undefined;
6655
6660
  this.value = undefined;
6656
6661
  this.height = undefined;
6657
6662
  this.width = undefined;
@@ -6727,6 +6732,11 @@ const LidoContainer = class {
6727
6732
  window.addEventListener('resize', () => this.scaleContainer(this.el));
6728
6733
  window.addEventListener('load', () => this.scaleContainer(this.el));
6729
6734
  utils.initEventsForElement(this.el, this.type);
6735
+ if (this.customStyle) {
6736
+ const styleElement = document.createElement('style');
6737
+ styleElement.innerHTML = this.customStyle;
6738
+ document.head.appendChild(styleElement);
6739
+ }
6730
6740
  }
6731
6741
  render() {
6732
6742
  // Define the styles for the container element
@@ -6740,7 +6750,7 @@ const LidoContainer = class {
6740
6750
  transform: 'translate(-50%, -50%)', // Centering the container
6741
6751
  };
6742
6752
  console.log('🚀 ~ LidoContainer ~ canplay:', this.canplay);
6743
- return (index.h(index.Host, { key: '96c4e07b2e62aa2071d386da3d56d20b35778bd4', 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: '30c3337dbd0d963c0d0a308f5b2a6d3e5514e15b' })));
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' })));
6744
6754
  }
6745
6755
  get el() { return index.getElement(this); }
6746
6756
  };
@@ -6749,7 +6759,7 @@ LidoContainer.style = LidoContainerStyle0;
6749
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}";
6750
6760
  const LidoHomeStyle0 = indexCss;
6751
6761
 
6752
- const animationCss = "@keyframes rightToPlace{from{transform:translateX(2000px)}to{left:0}}@keyframes placeToLeft{from{}to{transform:translateX(-2000px)}}@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)}}";
6762
+ 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)}}";
6753
6763
  const LidoHomeStyle1 = animationCss;
6754
6764
 
6755
6765
  const lidoHomeCss = ".lido-snackbar{visibility:visible;min-width:250px;background-color:#333;color:#fff;text-align:center;border-radius:2px;padding:16px;position:fixed;z-index:1;bottom:30px;left:50%;transform:translateX(-50%);font-size:17px}.lido-dot-container{text-align:center;position:fixed;z-index:1;width:fit-content;top:1%;left:50%;transform:translate(-50%)}.lido-dot{height:15px;width:15px;margin:0 4px;background-color:#bbb;border-radius:50%;display:inline-block;transition:background-color 0.3s;cursor:pointer}.lido-dot.completed{background-color:grey}.lido-dot.current{background-color:green}.lido-dot:not(.completed):not(.current){background-color:#bbb}";
@@ -6799,7 +6809,7 @@ const LidoHome = class {
6799
6809
  this.initialIndex = 0;
6800
6810
  this.canplay = true;
6801
6811
  this.baseUrl = '';
6802
- this.height = '200px';
6812
+ this.height = '';
6803
6813
  this.currentContainerIndex = this.initialIndex;
6804
6814
  this.showCompletionMessage = false;
6805
6815
  this.containers = [];
@@ -7156,7 +7166,7 @@ const LidoRoot = class {
7156
7166
  static get assetsDirs() { return ["assets"]; }
7157
7167
  };
7158
7168
 
7159
- const lidoRowCss = ".lido-row{display:flex;justify-content:space-between;align-items:center;}.lido-row>*{}";
7169
+ const lidoRowCss = ".lido-row{display:flex;justify-content:space-around;align-items:center;}.lido-row>*{}";
7160
7170
  const LidoRowStyle0 = lidoRowCss;
7161
7171
 
7162
7172
  const LidoRow = class {
@@ -7179,6 +7189,9 @@ const LidoRow = class {
7179
7189
  this.onInCorrect = undefined;
7180
7190
  this.onCorrect = undefined;
7181
7191
  this.onEntry = undefined;
7192
+ this.childElementsLength = undefined;
7193
+ this.minLength = undefined;
7194
+ this.maxLength = undefined;
7182
7195
  }
7183
7196
  /**
7184
7197
  * Lifecycle hook that runs after the component is loaded into the DOM.
@@ -7186,6 +7199,7 @@ const LidoRow = class {
7186
7199
  */
7187
7200
  componentDidLoad() {
7188
7201
  utils.initEventsForElement(this.el, this.type);
7202
+ utils.handlingChildElements(this.el, this.minLength, this.maxLength, this.childElementsLength, "flex");
7189
7203
  }
7190
7204
  render() {
7191
7205
  // Inline styles to position and size the row component
@@ -7198,7 +7212,7 @@ const LidoRow = class {
7198
7212
  zIndex: this.z,
7199
7213
  backgroundColor: this.bgColor, // Apply background color if provided
7200
7214
  };
7201
- return (index.h(index.Host, { key: '81728e5492a63bbdce29e3a18785e4cd2951f92e', 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: '6ecd0f63f4a0960bd898b6b2994246caf6e7c638' })));
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' })));
7202
7216
  }
7203
7217
  get el() { return index.getElement(this); }
7204
7218
  };
@@ -7821,6 +7835,9 @@ const LidoWrap = class {
7821
7835
  this.onInCorrect = undefined;
7822
7836
  this.onCorrect = undefined;
7823
7837
  this.onEntry = undefined;
7838
+ this.childElementsLength = undefined;
7839
+ this.minLength = undefined;
7840
+ this.maxLength = undefined;
7824
7841
  }
7825
7842
  /**
7826
7843
  * Lifecycle hook that runs after the component is rendered in the DOM.
@@ -7828,6 +7845,7 @@ const LidoWrap = class {
7828
7845
  */
7829
7846
  componentDidLoad() {
7830
7847
  utils.initEventsForElement(this.el, this.type);
7848
+ utils.handlingChildElements(this.el, this.minLength, this.maxLength, this.childElementsLength, "grid");
7831
7849
  }
7832
7850
  render() {
7833
7851
  // Inline styles to position and size the wrap container, with grid layout applied
@@ -7840,7 +7858,7 @@ const LidoWrap = class {
7840
7858
  zIndex: this.z,
7841
7859
  backgroundColor: this.bgColor,
7842
7860
  };
7843
- return (index.h(index.Host, { key: '01d99920831e63b5fe6ae9d8c701fb9c87c7873e', 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: '32047fafcbe079aab8f8fb0104142abe0588db30' })));
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' })));
7844
7862
  }
7845
7863
  get el() { return index.getElement(this); }
7846
7864
  };