lido-player 0.0.2-alpha-50-dev → 0.0.2-alpha-51-dev

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 (213) hide show
  1. package/LICENSE +21 -21
  2. package/dist/cjs/{index-6a69c33a.js → index-baff5c15.js} +48 -14
  3. package/dist/cjs/index.cjs.js +2 -2
  4. package/dist/cjs/{lido-avatar_21.cjs.entry.js → lido-avatar_22.cjs.entry.js} +3043 -162
  5. package/dist/cjs/lido-player.cjs.js +2 -2
  6. package/dist/cjs/loader.cjs.js +2 -2
  7. package/dist/cjs/{utils-079a5e7d.js → utils-dc02d753.js} +150 -95
  8. package/dist/collection/collection-manifest.json +1 -0
  9. package/dist/collection/components/avatar/lido-avatar.css +4 -4
  10. package/dist/collection/components/avatar/lido-avatar.js +1 -1
  11. package/dist/collection/components/calculator/lido-calculator.css +87 -87
  12. package/dist/collection/components/calculator/lido-calculator.js +14 -8
  13. package/dist/collection/components/canvas/lido-canvas.css +38 -0
  14. package/dist/collection/components/canvas/lido-canvas.js +220 -0
  15. package/dist/collection/components/cell/lido-cell.css +100 -100
  16. package/dist/collection/components/cell/lido-cell.js +12 -12
  17. package/dist/collection/components/column/lido-col.css +19 -19
  18. package/dist/collection/components/column/lido-col.js +6 -6
  19. package/dist/collection/components/container/lido-container.css +10 -10
  20. package/dist/collection/components/container/lido-container.js +70 -8
  21. package/dist/collection/components/flashCard/lido-flash-card.css +28 -28
  22. package/dist/collection/components/flashCard/lido-flash-card.js +4 -4
  23. package/dist/collection/components/float/lido-float.css +30 -30
  24. package/dist/collection/components/float/lido-float.js +2 -2
  25. package/dist/collection/components/home/lido-home.css +278 -278
  26. package/dist/collection/components/home/lido-home.js +92 -12
  27. package/dist/collection/components/image/lido-image.css +17 -17
  28. package/dist/collection/components/image/lido-image.js +6 -6
  29. package/dist/collection/components/keyboard/lido-keyboard.css +38 -38
  30. package/dist/collection/components/keyboard/lido-keyboard.js +3 -3
  31. package/dist/collection/components/mathMatrix/lido-math-matrix.css +56 -56
  32. package/dist/collection/components/mathMatrix/lido-math-matrix.js +56 -2
  33. package/dist/collection/components/position/lido-pos.css +16 -16
  34. package/dist/collection/components/position/lido-pos.js +2 -2
  35. package/dist/collection/components/random/lido-random.css +8 -8
  36. package/dist/collection/components/random/lido-random.js +2 -2
  37. package/dist/collection/components/root/lido-root.js +42 -6
  38. package/dist/collection/components/row/lido-row.css +10 -10
  39. package/dist/collection/components/row/lido-row.js +6 -6
  40. package/dist/collection/components/scale/lido-balance.css +145 -114
  41. package/dist/collection/components/scale/lido-balance.js +17 -17
  42. package/dist/collection/components/shape/lido-shape.css +96 -96
  43. package/dist/collection/components/shape/lido-shape.js +5 -5
  44. package/dist/collection/components/slideFill/lido-slide-fill.css +3 -3
  45. package/dist/collection/components/slideFill/lido-slide-fill.js +13 -13
  46. package/dist/collection/components/text/lido-text.css +53 -53
  47. package/dist/collection/components/text/lido-text.js +6 -5
  48. package/dist/collection/components/trace/lido-trace.css +97 -97
  49. package/dist/collection/components/trace/lido-trace.js +2 -2
  50. package/dist/collection/components/wrap/lido-wrap.css +18 -18
  51. package/dist/collection/components/wrap/lido-wrap.js +6 -6
  52. package/dist/collection/css/animation.css +194 -194
  53. package/dist/collection/css/index.css +277 -277
  54. package/dist/collection/stories/Templates/Fill-Up/fill-up.stories.js +60 -60
  55. package/dist/collection/stories/Templates/LetterPairing/LetterPairing.stories.js +123 -123
  56. package/dist/collection/stories/Templates/RocketGame/rocketGame.stories.js +55 -48
  57. package/dist/collection/stories/Templates/Tag/tagGame.stories.js +29 -29
  58. package/dist/collection/stories/Templates/arrangeLetters/arrangeLetters.stories.js +42 -42
  59. package/dist/collection/stories/Templates/balancing/balancing.stories.js +37 -31
  60. package/dist/collection/stories/Templates/balloonPop/balloonPop.stories.js +38 -38
  61. package/dist/collection/stories/Templates/bubbleType/bubbleType.stories.js +42 -42
  62. package/dist/collection/stories/Templates/calculator/calculator.stories.js +48 -0
  63. package/dist/collection/stories/Templates/categorize/categorize.stories.js +37 -37
  64. package/dist/collection/stories/Templates/categorize2/categorize2.stories.js +67 -67
  65. package/dist/collection/stories/Templates/checker-block/checkerBlock.stories.js +28 -22
  66. package/dist/collection/stories/Templates/checkerBlock/checkerBlock.stories.js +13 -13
  67. package/dist/collection/stories/Templates/create-sentence/createSentence.stories.js +74 -74
  68. package/dist/collection/stories/Templates/dragAndDrop/drag-drop.stories.js +69 -69
  69. package/dist/collection/stories/Templates/fillAnswer/fill-answer.stories.js +37 -37
  70. package/dist/collection/stories/Templates/fillBlank/fill-blank.stories.js +282 -282
  71. package/dist/collection/stories/Templates/foodJar/food-jar.stories.js +35 -35
  72. package/dist/collection/stories/Templates/grid/grid.stories.js +118 -118
  73. package/dist/collection/stories/Templates/gridGame/grid-game.stories.js +57 -57
  74. package/dist/collection/stories/Templates/jumpSentence/jumpSentence.stories.js +41 -41
  75. package/dist/collection/stories/Templates/letterboard/letterboard.stories.js +183 -183
  76. package/dist/collection/stories/Templates/makeSentence/make-sentence.stories.js +36 -36
  77. package/dist/collection/stories/Templates/matchBox/matchBox.stories.js +69 -69
  78. package/dist/collection/stories/Templates/matchBox/matchBox2.stories.js +54 -54
  79. package/dist/collection/stories/Templates/matchingCard/matching-card.stories.js +23 -23
  80. package/dist/collection/stories/Templates/multipleOption/mcqWithQuestionImage.stories.js +112 -112
  81. package/dist/collection/stories/Templates/multipleOption/multiple-option.stories.js +47 -47
  82. package/dist/collection/stories/Templates/multiplyBeeds/multiplyBeeds.stories.js +32 -28
  83. package/dist/collection/stories/Templates/nimbleTable/nimbleTable.stories.js +56 -54
  84. package/dist/collection/stories/Templates/numberBoard/numberBoard.stories.js +56 -45
  85. package/dist/collection/stories/Templates/numberBoardTwo/numberBoardTwo.stories.js +38 -38
  86. package/dist/collection/stories/Templates/numberPair/numberPair.stories.js +131 -127
  87. package/dist/collection/stories/Templates/openwindow/openwindow.stories.js +53 -49
  88. package/dist/collection/stories/Templates/openwindow/openwindow2.stories.js +44 -40
  89. package/dist/collection/stories/Templates/order-tractor/order-tractor-ascending-order.stories.js +96 -96
  90. package/dist/collection/stories/Templates/order-tractor/order-tractor.stories.js +90 -90
  91. package/dist/collection/stories/Templates/phonic-tractor/phonic-tractor.stories.js +47 -45
  92. package/dist/collection/stories/Templates/picturemeaning/pictureMeaningCocos.stories.js +20 -20
  93. package/dist/collection/stories/Templates/puzzleGame/puzzleGame.stories.js +17 -17
  94. package/dist/collection/stories/Templates/questionBoard/questionBoard.stories.js +62 -58
  95. package/dist/collection/stories/Templates/quizLiteracy/quizLiteracy.stories.js +50 -50
  96. package/dist/collection/stories/Templates/quizLiteracy/quizLiteracyImageWithText.stories.js +36 -36
  97. package/dist/collection/stories/Templates/quizLiteracy/quizLiteracyImageWord.stories.js +43 -43
  98. package/dist/collection/stories/Templates/reorder/reorder.stories.js +63 -63
  99. package/dist/collection/stories/Templates/rowBlocks/rowBlocks.stories.js +52 -48
  100. package/dist/collection/stories/Templates/sequenceBox/sequenceBox1.stories.js +65 -61
  101. package/dist/collection/stories/Templates/sequenceBox/sequenceBox2.stories.js +62 -58
  102. package/dist/collection/stories/Templates/shapePair/shape-pair.stories.js +111 -107
  103. package/dist/collection/stories/Templates/shapeTractor/shape-tractor.stories.js +46 -46
  104. package/dist/collection/stories/Templates/spellDoor/spellDoor.stories.js +41 -41
  105. package/dist/collection/stories/Templates/storyTale/storyTale.stories.js +39 -39
  106. package/dist/collection/stories/Templates/sumTogether/sumTogether.stories.js +51 -47
  107. package/dist/collection/stories/Templates/total/total.stories.js +27 -27
  108. package/dist/collection/stories/Templates/writeCard/writeCard.stories.js +35 -31
  109. package/dist/collection/stories/Templates/writeLetter/writeLetter.stories.js +62 -58
  110. package/dist/collection/stories/Templates/writeNumber/writeNumber.stories.js +44 -40
  111. package/dist/collection/stories/Templates/writeSet/writeSet.stories.js +36 -32
  112. package/dist/collection/stories/Templates/writeWord/writeWord.stories.js +37 -33
  113. package/dist/collection/stories/components/flash-card.stories.js +48 -48
  114. package/dist/collection/stories/components/keyboard.stories.js +10 -10
  115. package/dist/collection/stories/components/slider.stories.js +4 -4
  116. package/dist/collection/stories/components/trace.stories.js +5 -5
  117. package/dist/collection/utils/audioPlayer.js +43 -6
  118. package/dist/collection/utils/constants.js +1 -0
  119. package/dist/collection/utils/i18n.js +36 -0
  120. package/dist/collection/utils/utils.js +36 -29
  121. package/dist/collection/utils/utilsHandlers/clickHandler.js +5 -1
  122. package/dist/collection/utils/utilsHandlers/dragDropHandler.js +17 -9
  123. package/dist/collection/utils/utilsHandlers/highlightHandler.js +54 -54
  124. package/dist/collection/utils/utilsHandlers/lidoBalanceHandler.js +2 -2
  125. package/dist/collection/utils/utilsHandlers/lidoCalculatorHandler.js +9 -9
  126. package/dist/collection/utils/utilsHandlers/sortHandler.js +10 -10
  127. package/dist/components/index.js +1 -1
  128. package/dist/components/lido-avatar.js +1 -1
  129. package/dist/components/lido-balance.js +1 -1
  130. package/dist/components/lido-calculator.js +1 -1
  131. package/dist/components/lido-canvas.d.ts +11 -0
  132. package/dist/components/lido-canvas.js +6 -0
  133. package/dist/components/lido-cell.js +1 -1
  134. package/dist/components/lido-col.js +1 -1
  135. package/dist/components/lido-container.js +1 -1
  136. package/dist/components/lido-flash-card.js +1 -1
  137. package/dist/components/lido-float.js +1 -1
  138. package/dist/components/lido-home.js +1 -1
  139. package/dist/components/lido-image.js +1 -1
  140. package/dist/components/lido-keyboard.js +1 -1
  141. package/dist/components/lido-math-matrix.js +1 -1
  142. package/dist/components/lido-pos.js +1 -1
  143. package/dist/components/lido-random.js +1 -1
  144. package/dist/components/lido-root.js +49 -25
  145. package/dist/components/lido-row.js +1 -1
  146. package/dist/components/lido-shape.js +1 -1
  147. package/dist/components/lido-slide-fill.js +1 -1
  148. package/dist/components/lido-text.js +1 -1
  149. package/dist/components/lido-trace.js +1 -1
  150. package/dist/components/lido-wrap.js +1 -1
  151. package/dist/components/{p-73e31a86.js → p-04e904b5.js} +8 -8
  152. package/dist/components/p-0fbeb3a1.js +2700 -0
  153. package/dist/components/{p-1fbdb431.js → p-12432f23.js} +2 -2
  154. package/dist/components/p-1c84cf65.js +123 -0
  155. package/dist/components/{p-74849cdd.js → p-1f3c2783.js} +4 -4
  156. package/dist/components/{p-e4e42677.js → p-4fd6b588.js} +2 -2
  157. package/dist/components/{p-e36ddcc1.js → p-56c8f3da.js} +14 -11
  158. package/dist/components/{p-cbac3cbc.js → p-62d2a5b3.js} +2 -2
  159. package/dist/components/{p-44808985.js → p-6ba0f1af.js} +7 -7
  160. package/dist/components/{p-52844fa4.js → p-6be6c5eb.js} +2 -2
  161. package/dist/components/{p-08d0deab.js → p-74b90a9c.js} +9 -3
  162. package/dist/components/{p-d37ab4dc.js → p-988477ad.js} +2 -2
  163. package/dist/components/{p-7f7e5672.js → p-a8724f06.js} +2 -2
  164. package/dist/components/{p-3f406017.js → p-b7efadad.js} +2 -2
  165. package/dist/components/{p-15971ede.js → p-b89371ac.js} +1 -1
  166. package/dist/components/{p-904711c8.js → p-bb907e43.js} +2 -2
  167. package/dist/components/{p-afbc196f.js → p-bef96764.js} +3 -2
  168. package/dist/components/{p-322acda6.js → p-c8815e84.js} +67 -31
  169. package/dist/components/{p-835b973d.js → p-caa05d1e.js} +2 -2
  170. package/dist/components/{p-bed94c37.js → p-d0131159.js} +187 -105
  171. package/dist/components/{p-29bdd953.js → p-d3f7d561.js} +2 -2
  172. package/dist/components/{p-90465904.js → p-d7693f47.js} +2 -2
  173. package/dist/components/{p-9be56729.js → p-e9548986.js} +46 -2
  174. package/dist/esm/{index-170e58c7.js → index-37c2ad2d.js} +48 -14
  175. package/dist/esm/index.js +2 -2
  176. package/dist/esm/{lido-avatar_21.entry.js → lido-avatar_22.entry.js} +3043 -163
  177. package/dist/esm/lido-player.js +3 -3
  178. package/dist/esm/loader.js +3 -3
  179. package/dist/esm/{utils-5df09162.js → utils-b5eb2360.js} +150 -95
  180. package/dist/lido-player/index.esm.js +1 -1
  181. package/dist/lido-player/lido-player.esm.js +1 -1
  182. package/dist/lido-player/p-9a9d5339.js +2 -0
  183. package/dist/lido-player/{p-7556e652.js → p-9fd87d44.js} +2 -2
  184. package/dist/lido-player/p-e1a9c26f.entry.js +1 -0
  185. package/dist/types/components/canvas/lido-canvas.d.ts +27 -0
  186. package/dist/types/components/container/lido-container.d.ts +6 -0
  187. package/dist/types/components/home/lido-home.d.ts +8 -0
  188. package/dist/types/components/mathMatrix/lido-math-matrix.d.ts +3 -0
  189. package/dist/types/components/root/lido-root.d.ts +5 -0
  190. package/dist/types/components.d.ts +71 -0
  191. package/dist/types/stories/Templates/RocketGame/rocketGame.stories.d.ts +1 -0
  192. package/dist/types/stories/Templates/calculator/calculator.stories.d.ts +4 -0
  193. package/dist/types/stories/Templates/multiplyBeeds/multiplyBeeds.stories.d.ts +1 -0
  194. package/dist/types/stories/Templates/openwindow/openwindow.stories.d.ts +1 -0
  195. package/dist/types/stories/Templates/openwindow/openwindow2.stories.d.ts +1 -0
  196. package/dist/types/stories/Templates/questionBoard/questionBoard.stories.d.ts +1 -0
  197. package/dist/types/stories/Templates/sequenceBox/sequenceBox1.stories.d.ts +1 -0
  198. package/dist/types/stories/Templates/sequenceBox/sequenceBox2.stories.d.ts +1 -0
  199. package/dist/types/stories/Templates/shapePair/shape-pair.stories.d.ts +1 -1
  200. package/dist/types/stories/Templates/sumTogether/sumTogether.stories.d.ts +1 -0
  201. package/dist/types/stories/Templates/writeCard/writeCard.stories.d.ts +1 -0
  202. package/dist/types/stories/Templates/writeLetter/writeLetter.stories.d.ts +1 -0
  203. package/dist/types/stories/Templates/writeNumber/writeNumber.stories.d.ts +1 -0
  204. package/dist/types/stories/Templates/writeWord/writeWord.stories.d.ts +1 -0
  205. package/dist/types/types/json.d.ts +4 -0
  206. package/dist/types/utils/audioPlayer.d.ts +2 -0
  207. package/dist/types/utils/constants.d.ts +1 -0
  208. package/dist/types/utils/i18n.d.ts +5 -0
  209. package/dist/types/utils/utils.d.ts +1 -0
  210. package/package.json +71 -69
  211. package/readme.md +113 -113
  212. package/dist/lido-player/p-137c99ce.js +0 -2
  213. package/dist/lido-player/p-eb956325.entry.js +0 -1
@@ -66,7 +66,7 @@ export class LidoPos {
66
66
  };
67
67
  }
68
68
  render() {
69
- return (h(Host, { key: '20b34af6af7a1f061789d00ade88dc79eec595ef', id: this.id, class: "lido-pos", type: this.type, "tab-index": this.tabIndex, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, minDrops: this.minDrops, maxDrops: this.maxDrops, value: this.value, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry }, h("slot", { key: 'dae7759306330a01ecfb66be08debe8ec1f97d6e' })));
69
+ return (h(Host, { key: 'd456c09ab61fd1674f001f939f2b27a089806f44', id: this.id, class: "lido-pos", type: this.type, "tab-index": this.tabIndex, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, minDrops: this.minDrops, maxDrops: this.maxDrops, value: this.value, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry }, h("slot", { key: 'ca5a14fcc51d2b6a1756772b358e4654d8aee761' })));
70
70
  }
71
71
  static get is() { return "lido-pos"; }
72
72
  static get originalStyleUrls() {
@@ -453,7 +453,7 @@ export class LidoPos {
453
453
  "optional": false,
454
454
  "docs": {
455
455
  "tags": [],
456
- "text": "CSS margin value applied to each child element inside the container.\nAccepts standard CSS margin formats (e.g., '10px', '5px 10px', etc.)."
456
+ "text": "CSS margin value applied to each child element inside the container.\r\nAccepts standard CSS margin formats (e.g., '10px', '5px 10px', etc.)."
457
457
  },
458
458
  "attribute": "margin",
459
459
  "reflect": false,
@@ -1,9 +1,9 @@
1
- .lido-random {
2
- position: relative; /* Ensures children position within this box */
3
- width: 100%;
4
- height: 100%;
5
- }
6
-
7
- .lido-random > * {
8
- position: absolute;
1
+ .lido-random {
2
+ position: relative; /* Ensures children position within this box */
3
+ width: 100%;
4
+ height: 100%;
5
+ }
6
+
7
+ .lido-random > * {
8
+ position: absolute;
9
9
  }
@@ -78,7 +78,7 @@ export class LidoRandom {
78
78
  backgroundColor: this.bgColor,
79
79
  margin: this.margin,
80
80
  };
81
- return (h(Host, { key: '328c7a0533a52a1be5cee0d71fc7a43338e5290f', class: "lido-random", type: this.type, "tab-index": this.tabIndex, value: this.value, style: style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, minDrops: this.minDrops, maxDrops: this.maxDrops, onInCorrect: this.onInCorrect, onEntry: this.onEntry }, h("slot", { key: 'c1a93405cbbd2a06a92134c4ff5853204215c317' })));
81
+ return (h(Host, { key: 'a85f168b0399fe5745439ad9d16d77965d1f7a39', class: "lido-random", type: this.type, "tab-index": this.tabIndex, value: this.value, style: style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, minDrops: this.minDrops, maxDrops: this.maxDrops, onInCorrect: this.onInCorrect, onEntry: this.onEntry }, h("slot", { key: '69dd6da05d9855b18ba475cee27e523c4c2e6291' })));
82
82
  }
83
83
  static get is() { return "lido-random"; }
84
84
  static get originalStyleUrls() {
@@ -483,7 +483,7 @@ export class LidoRandom {
483
483
  "optional": false,
484
484
  "docs": {
485
485
  "tags": [],
486
- "text": "CSS margin value applied to each child element inside the container.\nAccepts standard CSS margin formats (e.g., '10px', '5px 10px', etc.)."
486
+ "text": "CSS margin value applied to each child element inside the container.\r\nAccepts standard CSS margin formats (e.g., '10px', '5px 10px', etc.)."
487
487
  },
488
488
  "attribute": "margin",
489
489
  "reflect": false,
@@ -1,4 +1,5 @@
1
1
  import { h, getAssetPath } from "@stencil/core";
2
+ import i18next from "../../utils/i18n";
2
3
  /**
3
4
  * @component LidoRoot
4
5
  *
@@ -8,6 +9,7 @@ import { h, getAssetPath } from "@stencil/core";
8
9
  */
9
10
  export class LidoRoot {
10
11
  constructor() {
12
+ this.locale = '';
11
13
  this.xmlPath = '';
12
14
  this.initialIndex = 0;
13
15
  this.margin = '';
@@ -23,6 +25,16 @@ export class LidoRoot {
23
25
  * Lifecycle method that runs before the component is loaded.
24
26
  * It fetches the XML data from the specified path or URL and sets it to the component's state.
25
27
  */
28
+ connectedCallback() {
29
+ this.setLanguage(this.locale);
30
+ }
31
+ onLangChange(newLang) {
32
+ this.setLanguage(newLang);
33
+ }
34
+ setLanguage(lang) {
35
+ const effectiveLang = lang || i18next.language;
36
+ i18next.changeLanguage(effectiveLang);
37
+ }
26
38
  async componentWillLoad() {
27
39
  var _a, _b;
28
40
  // Validate the xmlPath prop
@@ -62,12 +74,30 @@ export class LidoRoot {
62
74
  return h("div", null, "Error loading XML data. Please check the path or URL.");
63
75
  }
64
76
  // Once the XML data is loaded, pass it to the `lido-home` component
65
- return h("lido-home", { initialIndex: this.initialIndex, canplay: this.canplay, xmlData: this.xmlData, baseUrl: this.baseUrl, exitButtonUrl: this.exitButtonUrl, prevButtonUrl: this.prevButtonUrl, nextButtonUrl: this.nextButtonUrl, speakerButtonUrl: this.speakerButtonUrl });
77
+ return h("lido-home", { showNav: true, activeContainerIndexes: [], initialIndex: this.initialIndex, canplay: this.canplay, xmlData: this.xmlData, baseUrl: this.baseUrl, exitButtonUrl: this.exitButtonUrl, prevButtonUrl: this.prevButtonUrl, nextButtonUrl: this.nextButtonUrl, speakerButtonUrl: this.speakerButtonUrl });
66
78
  }
67
79
  static get is() { return "lido-root"; }
68
80
  static get assetsDirs() { return ["assets"]; }
69
81
  static get properties() {
70
82
  return {
83
+ "locale": {
84
+ "type": "string",
85
+ "mutable": false,
86
+ "complexType": {
87
+ "original": "string",
88
+ "resolved": "string",
89
+ "references": {}
90
+ },
91
+ "required": false,
92
+ "optional": true,
93
+ "docs": {
94
+ "tags": [],
95
+ "text": "Language to apply to all texts"
96
+ },
97
+ "attribute": "locale",
98
+ "reflect": false,
99
+ "defaultValue": "''"
100
+ },
71
101
  "xmlPath": {
72
102
  "type": "string",
73
103
  "mutable": false,
@@ -116,7 +146,7 @@ export class LidoRoot {
116
146
  "optional": false,
117
147
  "docs": {
118
148
  "tags": [],
119
- "text": "CSS margin value applied to each child element inside the container.\nAccepts standard CSS margin formats (e.g., '10px', '5px 10px', etc.)."
149
+ "text": "CSS margin value applied to each child element inside the container.\r\nAccepts standard CSS margin formats (e.g., '10px', '5px 10px', etc.)."
120
150
  },
121
151
  "attribute": "margin",
122
152
  "reflect": false,
@@ -170,7 +200,7 @@ export class LidoRoot {
170
200
  "optional": false,
171
201
  "docs": {
172
202
  "tags": [],
173
- "text": "Custom URL for the Exit button icon.\nFalls back to the default icon if not provided or invalid."
203
+ "text": "Custom URL for the Exit button icon.\r\nFalls back to the default icon if not provided or invalid."
174
204
  },
175
205
  "attribute": "exit-button-url",
176
206
  "reflect": false
@@ -187,7 +217,7 @@ export class LidoRoot {
187
217
  "optional": false,
188
218
  "docs": {
189
219
  "tags": [],
190
- "text": "Custom URL for the Previous button icon.\nFalls back to the default icon if not provided or invalid."
220
+ "text": "Custom URL for the Previous button icon.\r\nFalls back to the default icon if not provided or invalid."
191
221
  },
192
222
  "attribute": "prev-button-url",
193
223
  "reflect": false
@@ -204,7 +234,7 @@ export class LidoRoot {
204
234
  "optional": false,
205
235
  "docs": {
206
236
  "tags": [],
207
- "text": "Custom URL for the Next button icon.\nFalls back to the default icon if not provided or invalid."
237
+ "text": "Custom URL for the Next button icon.\r\nFalls back to the default icon if not provided or invalid."
208
238
  },
209
239
  "attribute": "next-button-url",
210
240
  "reflect": false
@@ -221,7 +251,7 @@ export class LidoRoot {
221
251
  "optional": false,
222
252
  "docs": {
223
253
  "tags": [],
224
- "text": "Custom URL for the Speaker button icon.\nFalls back to the default icon if not provided or invalid."
254
+ "text": "Custom URL for the Speaker button icon.\r\nFalls back to the default icon if not provided or invalid."
225
255
  },
226
256
  "attribute": "speaker-button-url",
227
257
  "reflect": false
@@ -233,4 +263,10 @@ export class LidoRoot {
233
263
  "xmlData": {}
234
264
  };
235
265
  }
266
+ static get watchers() {
267
+ return [{
268
+ "propName": "locale",
269
+ "methodName": "onLangChange"
270
+ }];
271
+ }
236
272
  }
@@ -1,10 +1,10 @@
1
- .lido-row {
2
- display: flex;
3
- justify-content: space-around;
4
- align-items: center;
5
- /* position: absolute; */
6
- }
7
-
8
- .lido-row > * {
9
- /* position: relative; */
10
- }
1
+ .lido-row {
2
+ display: flex;
3
+ justify-content: space-around;
4
+ align-items: center;
5
+ /* position: absolute; */
6
+ }
7
+
8
+ .lido-row > * {
9
+ /* position: relative; */
10
+ }
@@ -78,7 +78,7 @@ export class LidoRow {
78
78
  };
79
79
  }
80
80
  render() {
81
- return (h(Host, { key: '4c1f45afe8866df81a6a798afe348e03fa1f4292', class: "lido-row", type: this.type, "tab-index": this.tabIndex, value: this.value, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, minDrops: this.minDrops, maxDrops: this.maxDrops, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry, "disable-speak": this.disableSpeak }, h("slot", { key: '194de56621025a4b1a4fdb6ccae347f34dc19fdb' })));
81
+ return (h(Host, { key: '0c2548741cde2b82c2add3e1a60cbd68905ffede', class: "lido-row", type: this.type, "tab-index": this.tabIndex, value: this.value, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, minDrops: this.minDrops, maxDrops: this.maxDrops, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry, "disable-speak": this.disableSpeak }, h("slot", { key: 'bc2c6f95f984e82bdb905f850d4ad23c11183697' })));
82
82
  }
83
83
  static get is() { return "lido-row"; }
84
84
  static get originalStyleUrls() {
@@ -412,7 +412,7 @@ export class LidoRow {
412
412
  "optional": false,
413
413
  "docs": {
414
414
  "tags": [],
415
- "text": "The number of child elements that should be displayed inside the row.\nThis value is dynamically adjusted based on `minLength` and `maxLength`."
415
+ "text": "The number of child elements that should be displayed inside the row.\r\nThis value is dynamically adjusted based on `minLength` and `maxLength`."
416
416
  },
417
417
  "attribute": "child-elements-length",
418
418
  "reflect": false
@@ -429,7 +429,7 @@ export class LidoRow {
429
429
  "optional": false,
430
430
  "docs": {
431
431
  "tags": [],
432
- "text": "The minimum number of child elements that must be displayed inside the row.\nIf `childElementsLength` is less than this value, additional elements may be shown to meet this minimum."
432
+ "text": "The minimum number of child elements that must be displayed inside the row.\r\nIf `childElementsLength` is less than this value, additional elements may be shown to meet this minimum."
433
433
  },
434
434
  "attribute": "min-length",
435
435
  "reflect": false
@@ -446,7 +446,7 @@ export class LidoRow {
446
446
  "optional": false,
447
447
  "docs": {
448
448
  "tags": [],
449
- "text": "The maximum number of child elements that can be displayed inside the row.\nIf `childElementsLength` exceeds this value, excess elements will be hidden."
449
+ "text": "The maximum number of child elements that can be displayed inside the row.\r\nIf `childElementsLength` exceeds this value, excess elements will be hidden."
450
450
  },
451
451
  "attribute": "max-length",
452
452
  "reflect": false
@@ -516,7 +516,7 @@ export class LidoRow {
516
516
  "optional": true,
517
517
  "docs": {
518
518
  "tags": [],
519
- "text": "Sets the CSS display property for the component.\nAccepts any valid CSS display value (e.g., 'block', 'flex', 'grid', 'none')."
519
+ "text": "Sets the CSS display property for the component.\r\nAccepts any valid CSS display value (e.g., 'block', 'flex', 'grid', 'none')."
520
520
  },
521
521
  "attribute": "display",
522
522
  "reflect": false
@@ -533,7 +533,7 @@ export class LidoRow {
533
533
  "optional": false,
534
534
  "docs": {
535
535
  "tags": [],
536
- "text": "CSS margin value applied to each child element inside the container.\nAccepts standard CSS margin formats (e.g., '10px', '5px 10px', etc.)."
536
+ "text": "CSS margin value applied to each child element inside the container.\r\nAccepts standard CSS margin formats (e.g., '10px', '5px 10px', etc.)."
537
537
  },
538
538
  "attribute": "margin",
539
539
  "reflect": false,
@@ -1,114 +1,145 @@
1
- #lido-balance {
2
- position: relative;
3
- height: 500px;
4
- width: 1205px;
5
- top: 20%;
6
- left: -91px;
7
- z-index: 0;
8
- }
9
-
10
- .lido-balance-symbol {
11
- position: absolute;
12
- top: 64%;
13
- left: 50%;
14
- transform: translate(-50%, -50%);
15
- font-size: 5vw;
16
- font-weight: bold;
17
- color: black;
18
- pointer-events: none;
19
- z-index: 999;
20
- }
21
-
22
- @media (orientation: portrait) {
23
- #pivotimg {
24
- position: absolute;
25
- height:auto;
26
- width: 23%;
27
- bottom: 18%;
28
- left: 38%;
29
- z-index: 100;
30
-
31
- }
32
- }
33
-
34
-
35
- @media (orientation: landscape) {
36
- #pivotimg {
37
- position: absolute;
38
- height:auto;
39
- width: 23%;
40
- bottom: 8%;
41
- left: 38%;
42
- z-index: 100;
43
- }
44
- }
45
-
46
- .lido-balance .pivot svg {
47
- width: 100%;
48
- height: auto;
49
- }
50
-
51
-
52
- #scaleimg {
53
- position: absolute;
54
- width: 73%;
55
- height: auto;
56
- top: 61%;
57
- left: 14%;
58
- z-index: 90;
59
- }
60
- .lido-balance .scale svg {
61
- width: 100%;
62
- height: auto;
63
- }
64
-
65
- @media (orientation: landscape) {
66
- #handlerimg {
67
- position: absolute;
68
- width: 35%;
69
- height: auto;
70
- top:49%;
71
- left: 2%;
72
- }}
73
- @media (orientation:portrait ) {
74
- #handlerimg {
75
- position: absolute;
76
- width: 35%;
77
- height: auto;
78
- top:53%;
79
- left: 2%;
80
- }}
81
- .lido-balance .handler svg {
82
- width: 100%;
83
- height: auto;
84
- fill: brown;
85
- }
86
-
87
- @media (orientation: landscape) {
88
- #handimg {
89
- position: absolute;
90
- width: 35%;
91
- height: auto;
92
- top: 49%;
93
- right: 2%;
94
- }}
95
- @media (orientation:portrait) {
96
- #handimg {
97
- position: absolute;
98
- width: 35%;
99
- height: auto;
100
- top: 53%;
101
- right: 2%;
102
- }}
103
- .lido-balance .hand svg {
104
- width: 100%;
105
- height: auto;
106
- fill: brown;
107
- }
108
-
109
- .pivot svg path:nth-of-type(1) {
110
- fill: brown;
111
- }
112
- .pivot svg path[d^="M78.9414"] {
113
- fill: white;
114
- }
1
+ #lido-balance {
2
+ position: relative;
3
+ height: 500px;
4
+ width: 1205px;
5
+ top: 20%;
6
+ left: -91px;
7
+ z-index: 0;
8
+ }
9
+
10
+ .lido-balance-symbol {
11
+ position: absolute;
12
+ top: 64%;
13
+ left: 50%;
14
+ transform: translate(-50%, -50%);
15
+ font-size: 5vw;
16
+ font-weight: bold;
17
+ color: black;
18
+ pointer-events: none;
19
+ z-index: 999;
20
+ }
21
+ @media (orientation: portrait) {
22
+ .lido-balance-shadow {
23
+ height: 100px;
24
+ position: absolute;
25
+ top: 80%;
26
+ left: 28%;
27
+ }
28
+ }
29
+
30
+ @media (orientation: landscape) {
31
+ .lido-balance-shadow {
32
+ height: 100px ;
33
+ position: absolute;
34
+ top: 90% ;
35
+ left: 33% ;
36
+ }
37
+ }
38
+ @media (orientation: portrait) {
39
+ #pivotimg {
40
+ position: absolute;
41
+ height:auto;
42
+ width: 23%;
43
+ bottom: 18%;
44
+ left: 38%;
45
+ z-index: 100;
46
+
47
+ }
48
+ }
49
+
50
+ #pivotimg::after {
51
+ content: "";
52
+ position: absolute;
53
+ bottom: -30px;
54
+ left: 50%;
55
+ transform: translateX(-50%);
56
+ width: 120%;
57
+ height: 60px;
58
+ background-image: url("https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/balancing/Shadow.svg");
59
+ background-size: contain;
60
+ background-repeat: no-repeat;
61
+ background-position: center;
62
+ pointer-events: none;
63
+ z-index: 10;
64
+ }
65
+
66
+ @media (orientation: landscape) {
67
+ #pivotimg {
68
+ position: absolute;
69
+ height:auto;
70
+ width: 23%;
71
+ bottom: 8%;
72
+ left: 38%;
73
+ z-index: 100;
74
+ }
75
+ }
76
+
77
+ .lido-balance .pivot svg {
78
+ width: 100%;
79
+ height: auto;
80
+ }
81
+
82
+
83
+ #scaleimg {
84
+ position: absolute;
85
+ width: 73%;
86
+ height: auto;
87
+ top: 61%;
88
+ left: 14%;
89
+ z-index: 90;
90
+ }
91
+ .lido-balance .scale svg {
92
+ width: 100%;
93
+ height: auto;
94
+ }
95
+
96
+ @media (orientation: landscape) {
97
+ #handlerimg {
98
+ position: absolute;
99
+ width: 35%;
100
+ height: auto;
101
+ top:49%;
102
+ left: 2%;
103
+ }}
104
+ @media (orientation:portrait ) {
105
+ #handlerimg {
106
+ position: absolute;
107
+ width: 35%;
108
+ height: auto;
109
+ top:53%;
110
+ left: 2%;
111
+ }}
112
+ .lido-balance .handler svg {
113
+ width: 100%;
114
+ height: auto;
115
+ fill: brown;
116
+ }
117
+
118
+ @media (orientation: landscape) {
119
+ #handimg {
120
+ position: absolute;
121
+ width: 35%;
122
+ height: auto;
123
+ top: 49%;
124
+ right: 2%;
125
+ }}
126
+ @media (orientation:portrait) {
127
+ #handimg {
128
+ position: absolute;
129
+ width: 35%;
130
+ height: auto;
131
+ top: 53%;
132
+ right: 2%;
133
+ }}
134
+ .lido-balance .hand svg {
135
+ width: 100%;
136
+ height: auto;
137
+ fill: brown;
138
+ }
139
+
140
+ .pivot svg path:nth-of-type(1) {
141
+ fill: brown;
142
+ }
143
+ .pivot svg path[d^="M78.9414"] {
144
+ fill: white;
145
+ }
@@ -42,9 +42,7 @@ export class LidoBalance {
42
42
  this.handlerSvg = await this.fetchAndApplyFill(this.handlerimage);
43
43
  }
44
44
  componentDidLoad() {
45
- setTimeout(() => {
46
- this.animateBalance();
47
- }, 4000);
45
+ this.animateBalance();
48
46
  this.leftParentEl = document.getElementById("leftparent");
49
47
  this.rightParentEl = document.getElementById("rightparent");
50
48
  initEventsForElement(this.el);
@@ -75,6 +73,7 @@ export class LidoBalance {
75
73
  async updateTilt(leftVal, rightVal) {
76
74
  const diff = rightVal - leftVal;
77
75
  const newTilt = Math.max(-5, Math.min(5, diff));
76
+ await new Promise(res => setTimeout(res, 350));
78
77
  this.tiltf = newTilt;
79
78
  }
80
79
  animateBalance() {
@@ -94,7 +93,8 @@ export class LidoBalance {
94
93
  this.scaleEl.style.transformOrigin = '50% 80%';
95
94
  }
96
95
  if (this.leftParentEl && this.rightParentEl) {
97
- const maxOffset = 60;
96
+ const isPortrait = window.innerHeight > window.innerWidth;
97
+ const maxOffset = isPortrait ? 40 : 60;
98
98
  const offset = (this.currentAngle / this.maxTilt) * maxOffset;
99
99
  this.leftParentEl.style.transform = `translateY(${-offset}px)`;
100
100
  this.rightParentEl.style.transform = `translateY(${offset}px)`;
@@ -124,7 +124,7 @@ export class LidoBalance {
124
124
  };
125
125
  }
126
126
  render() {
127
- return (h(Host, { key: '868cc05ae503a6e04039c615815102470eb402d4', id: "lido-balance", onEntry: this.onEntry, class: "lido-balance", tilt: this.tilt.toString(), style: this.style, operation: this.operation.toString() }, h("div", { key: '2627a49d1ad5045bd9a3ac217354c9be98f1f52b', innerHTML: this.pivotSvg, id: "pivotimg", class: "pivot" }), h("div", { key: 'c5b2432f5e3c62ebbb7f17146f18e22e7e2b29bb', innerHTML: this.scaleSvg, id: "scaleimg", class: "scale", ref: (el) => (this.scaleEl = el) }), h("div", { key: 'd5e8051aedb784189f19a1e7b0dfd645e95ed4a5', innerHTML: this.handlerSvg, id: "handlerimg", class: "handler", ref: (el) => (this.leftHandleEl = el) }), h("div", { key: '3779886d4fc8dfadc0791f69cb87df78d5f843c8', innerHTML: this.handlerSvg, id: "handimg", class: "hand", ref: (el) => (this.rightHandleEl = el) }), h("div", { key: 'df5d4094c302548bf64f166643a3f05d262d95b1', id: "balanceSymbol", class: "lido-balance-symbol", "aria-hidden": !this.showSymbol }, this.showSymbol ? this.balanceSymbol : '')));
127
+ return (h(Host, { key: 'd1da72f1bf298dd7c81b0cfefa0e9e563ccbfff1', id: "lido-balance", "bg-color": "red", onEntry: this.onEntry, class: "lido-balance", tilt: this.tilt.toString(), style: this.style, operation: this.operation.toString() }, h("div", { key: '737ab206a5156b402d4477a38567480f10419c14', innerHTML: this.pivotSvg, id: "pivotimg", class: "pivot" }), h("div", { key: '8bc60136950858d5d1b96c38ec4c0635024f8d24', innerHTML: this.scaleSvg, id: "scaleimg", class: "scale", ref: (el) => (this.scaleEl = el) }), h("div", { key: '07049a6b5c8e75d831c9287b2b4a0e633791174b', innerHTML: this.handlerSvg, id: "handlerimg", class: "handler", ref: (el) => (this.leftHandleEl = el) }), h("div", { key: '85361c27b1ab6fcc86969bfc9d4dff1df6040165', innerHTML: this.handlerSvg, id: "handimg", class: "hand", ref: (el) => (this.rightHandleEl = el) }), h("div", { key: 'c4208582bfa1b63e4381d44d9a95e9c537dfbc84', id: "balanceSymbol", class: "lido-balance-symbol", "aria-hidden": !this.showSymbol }, this.showSymbol ? this.balanceSymbol : '')));
128
128
  }
129
129
  static get is() { return "lido-balance"; }
130
130
  static get originalStyleUrls() {
@@ -205,7 +205,7 @@ export class LidoBalance {
205
205
  "optional": false,
206
206
  "docs": {
207
207
  "tags": [],
208
- "text": "Fill color applied to all loaded SVGs (pivot, scale, handler).\nDefaults to \"brown\"."
208
+ "text": "Fill color applied to all loaded SVGs (pivot, scale, handler).\r\nDefaults to \"brown\"."
209
209
  },
210
210
  "attribute": "fill",
211
211
  "reflect": false,
@@ -223,7 +223,7 @@ export class LidoBalance {
223
223
  "optional": false,
224
224
  "docs": {
225
225
  "tags": [],
226
- "text": "Initial tilt value of the balance.\nNegative = tilts left, Positive = tilts right."
226
+ "text": "Initial tilt value of the balance.\r\nNegative = tilts left, Positive = tilts right."
227
227
  },
228
228
  "attribute": "tilt",
229
229
  "reflect": false,
@@ -259,7 +259,7 @@ export class LidoBalance {
259
259
  "optional": false,
260
260
  "docs": {
261
261
  "tags": [],
262
- "text": "Action(s) to execute when the component enters the DOM.\nExample: trigger animations or audio cues."
262
+ "text": "Action(s) to execute when the component enters the DOM.\r\nExample: trigger animations or audio cues."
263
263
  },
264
264
  "attribute": "on-entry",
265
265
  "reflect": false,
@@ -277,7 +277,7 @@ export class LidoBalance {
277
277
  "optional": false,
278
278
  "docs": {
279
279
  "tags": [],
280
- "text": "CSS height of the component (responsive values allowed).\nDefault: \"auto\"."
280
+ "text": "CSS height of the component (responsive values allowed).\r\nDefault: \"auto\"."
281
281
  },
282
282
  "attribute": "height",
283
283
  "reflect": false,
@@ -295,7 +295,7 @@ export class LidoBalance {
295
295
  "optional": false,
296
296
  "docs": {
297
297
  "tags": [],
298
- "text": "CSS width of the component (responsive values allowed).\nDefault: \"auto\"."
298
+ "text": "CSS width of the component (responsive values allowed).\r\nDefault: \"auto\"."
299
299
  },
300
300
  "attribute": "width",
301
301
  "reflect": false,
@@ -313,7 +313,7 @@ export class LidoBalance {
313
313
  "optional": false,
314
314
  "docs": {
315
315
  "tags": [],
316
- "text": "Horizontal (X-axis) offset for positioning the component.\nDefault: \"0px\"."
316
+ "text": "Horizontal (X-axis) offset for positioning the component.\r\nDefault: \"0px\"."
317
317
  },
318
318
  "attribute": "x",
319
319
  "reflect": false,
@@ -331,7 +331,7 @@ export class LidoBalance {
331
331
  "optional": false,
332
332
  "docs": {
333
333
  "tags": [],
334
- "text": "Vertical (Y-axis) offset for positioning the component.\nDefault: \"0px\"."
334
+ "text": "Vertical (Y-axis) offset for positioning the component.\r\nDefault: \"0px\"."
335
335
  },
336
336
  "attribute": "y",
337
337
  "reflect": false,
@@ -349,7 +349,7 @@ export class LidoBalance {
349
349
  "optional": false,
350
350
  "docs": {
351
351
  "tags": [],
352
- "text": "Z-index for stacking order of the component.\nDefault: \"0\"."
352
+ "text": "Z-index for stacking order of the component.\r\nDefault: \"0\"."
353
353
  },
354
354
  "attribute": "z",
355
355
  "reflect": false,
@@ -367,7 +367,7 @@ export class LidoBalance {
367
367
  "optional": false,
368
368
  "docs": {
369
369
  "tags": [],
370
- "text": "Controls component visibility.\nAccepts boolean (`true`/`false`) or string (\"true\"/\"false\")."
370
+ "text": "Controls component visibility.\r\nAccepts boolean (`true`/`false`) or string (\"true\"/\"false\")."
371
371
  },
372
372
  "attribute": "visible",
373
373
  "reflect": false,
@@ -421,7 +421,7 @@ export class LidoBalance {
421
421
  "optional": false,
422
422
  "docs": {
423
423
  "tags": [],
424
- "text": "Balance symbol shown when `showSymbol` is true.\nDefault: \"=\"."
424
+ "text": "Balance symbol shown when `showSymbol` is true.\r\nDefault: \"=\"."
425
425
  },
426
426
  "attribute": "balance-symbol",
427
427
  "reflect": true,
@@ -439,7 +439,7 @@ export class LidoBalance {
439
439
  "optional": false,
440
440
  "docs": {
441
441
  "tags": [],
442
- "text": "Whether the balance symbol is currently displayed.\nCan be toggled with `revealSymbol()` and `hideSymbol()`."
442
+ "text": "Whether the balance symbol is currently displayed.\r\nCan be toggled with `revealSymbol()` and `hideSymbol()`."
443
443
  },
444
444
  "attribute": "show-symbol",
445
445
  "reflect": true,
@@ -457,7 +457,7 @@ export class LidoBalance {
457
457
  "optional": false,
458
458
  "docs": {
459
459
  "tags": [],
460
- "text": "Operation type used to calculate balance values.\nSupported: \"count\", \"add\", \"subtract\", etc."
460
+ "text": "Operation type used to calculate balance values.\r\nSupported: \"count\", \"add\", \"subtract\", etc."
461
461
  },
462
462
  "attribute": "operation",
463
463
  "reflect": false,