lido-player 0.0.2-alpha-50-dev → 0.0.2-alpha-52-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 (215) 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-ce99b0d0.js} +294 -108
  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 +35 -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 +69 -15
  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/blender/blender.stories.js +100 -0
  62. package/dist/collection/stories/Templates/bubbleType/bubbleType.stories.js +42 -42
  63. package/dist/collection/stories/Templates/calculator/calculator.stories.js +52 -0
  64. package/dist/collection/stories/Templates/categorize/categorize.stories.js +37 -37
  65. package/dist/collection/stories/Templates/categorize2/categorize2.stories.js +67 -67
  66. package/dist/collection/stories/Templates/checker-block/checkerBlock.stories.js +28 -22
  67. package/dist/collection/stories/Templates/checkerBlock/checkerBlock.stories.js +13 -13
  68. package/dist/collection/stories/Templates/create-sentence/createSentence.stories.js +74 -74
  69. package/dist/collection/stories/Templates/dragAndDrop/drag-drop.stories.js +69 -69
  70. package/dist/collection/stories/Templates/fillAnswer/fill-answer.stories.js +39 -38
  71. package/dist/collection/stories/Templates/fillBlank/fill-blank.stories.js +282 -282
  72. package/dist/collection/stories/Templates/foodJar/food-jar.stories.js +37 -35
  73. package/dist/collection/stories/Templates/grid/grid.stories.js +118 -118
  74. package/dist/collection/stories/Templates/gridGame/grid-game.stories.js +57 -57
  75. package/dist/collection/stories/Templates/jumpSentence/jumpSentence.stories.js +41 -41
  76. package/dist/collection/stories/Templates/letterboard/letterboard.stories.js +183 -183
  77. package/dist/collection/stories/Templates/makeSentence/make-sentence.stories.js +36 -36
  78. package/dist/collection/stories/Templates/matchBox/matchBox.stories.js +69 -69
  79. package/dist/collection/stories/Templates/matchBox/matchBox2.stories.js +54 -54
  80. package/dist/collection/stories/Templates/matchingCard/matching-card.stories.js +25 -23
  81. package/dist/collection/stories/Templates/multipleOption/mcqWithQuestionImage.stories.js +112 -112
  82. package/dist/collection/stories/Templates/multipleOption/multiple-option.stories.js +47 -47
  83. package/dist/collection/stories/Templates/multiplyBeeds/multiplyBeeds.stories.js +32 -28
  84. package/dist/collection/stories/Templates/nimbleTable/nimbleTable.stories.js +56 -54
  85. package/dist/collection/stories/Templates/numberBoard/numberBoard.stories.js +56 -45
  86. package/dist/collection/stories/Templates/numberBoardTwo/numberBoardTwo.stories.js +41 -39
  87. package/dist/collection/stories/Templates/numberPair/numberPair.stories.js +131 -127
  88. package/dist/collection/stories/Templates/openwindow/openwindow.stories.js +53 -49
  89. package/dist/collection/stories/Templates/openwindow/openwindow2.stories.js +44 -40
  90. package/dist/collection/stories/Templates/order-tractor/order-tractor-ascending-order.stories.js +98 -97
  91. package/dist/collection/stories/Templates/order-tractor/order-tractor.stories.js +92 -91
  92. package/dist/collection/stories/Templates/phonic-tractor/phonic-tractor.stories.js +47 -45
  93. package/dist/collection/stories/Templates/picturemeaning/pictureMeaningCocos.stories.js +20 -20
  94. package/dist/collection/stories/Templates/puzzleGame/puzzleGame.stories.js +17 -17
  95. package/dist/collection/stories/Templates/questionBoard/questionBoard.stories.js +62 -58
  96. package/dist/collection/stories/Templates/quizLiteracy/quizLiteracy.stories.js +50 -50
  97. package/dist/collection/stories/Templates/quizLiteracy/quizLiteracyImageWithText.stories.js +36 -36
  98. package/dist/collection/stories/Templates/quizLiteracy/quizLiteracyImageWord.stories.js +43 -43
  99. package/dist/collection/stories/Templates/reorder/reorder.stories.js +63 -63
  100. package/dist/collection/stories/Templates/rowBlocks/rowBlocks.stories.js +52 -48
  101. package/dist/collection/stories/Templates/sequenceBox/sequenceBox1.stories.js +65 -61
  102. package/dist/collection/stories/Templates/sequenceBox/sequenceBox2.stories.js +62 -58
  103. package/dist/collection/stories/Templates/shapePair/shape-pair.stories.js +111 -107
  104. package/dist/collection/stories/Templates/shapeTractor/shape-tractor.stories.js +46 -46
  105. package/dist/collection/stories/Templates/spellDoor/spellDoor.stories.js +41 -41
  106. package/dist/collection/stories/Templates/storyTale/storyTale.stories.js +39 -39
  107. package/dist/collection/stories/Templates/sumTogether/sumTogether.stories.js +51 -47
  108. package/dist/collection/stories/Templates/total/total.stories.js +27 -27
  109. package/dist/collection/stories/Templates/writeCard/writeCard.stories.js +35 -31
  110. package/dist/collection/stories/Templates/writeLetter/writeLetter.stories.js +62 -58
  111. package/dist/collection/stories/Templates/writeNumber/writeNumber.stories.js +44 -40
  112. package/dist/collection/stories/Templates/writeSet/writeSet.stories.js +36 -32
  113. package/dist/collection/stories/Templates/writeWord/writeWord.stories.js +37 -33
  114. package/dist/collection/stories/components/flash-card.stories.js +48 -48
  115. package/dist/collection/stories/components/keyboard.stories.js +10 -10
  116. package/dist/collection/stories/components/slider.stories.js +4 -4
  117. package/dist/collection/stories/components/trace.stories.js +5 -5
  118. package/dist/collection/utils/audioPlayer.js +43 -6
  119. package/dist/collection/utils/constants.js +1 -0
  120. package/dist/collection/utils/i18n.js +36 -0
  121. package/dist/collection/utils/utils.js +170 -36
  122. package/dist/collection/utils/utilsHandlers/clickHandler.js +5 -1
  123. package/dist/collection/utils/utilsHandlers/dragDropHandler.js +27 -15
  124. package/dist/collection/utils/utilsHandlers/highlightHandler.js +54 -54
  125. package/dist/collection/utils/utilsHandlers/lidoBalanceHandler.js +2 -2
  126. package/dist/collection/utils/utilsHandlers/lidoCalculatorHandler.js +9 -9
  127. package/dist/collection/utils/utilsHandlers/sortHandler.js +10 -10
  128. package/dist/components/index.js +1 -1
  129. package/dist/components/lido-avatar.js +1 -1
  130. package/dist/components/lido-balance.js +1 -1
  131. package/dist/components/lido-calculator.js +1 -1
  132. package/dist/components/lido-canvas.d.ts +11 -0
  133. package/dist/components/lido-canvas.js +6 -0
  134. package/dist/components/lido-cell.js +1 -1
  135. package/dist/components/lido-col.js +1 -1
  136. package/dist/components/lido-container.js +1 -1
  137. package/dist/components/lido-flash-card.js +1 -1
  138. package/dist/components/lido-float.js +1 -1
  139. package/dist/components/lido-home.js +1 -1
  140. package/dist/components/lido-image.js +1 -1
  141. package/dist/components/lido-keyboard.js +1 -1
  142. package/dist/components/lido-math-matrix.js +1 -1
  143. package/dist/components/lido-pos.js +1 -1
  144. package/dist/components/lido-random.js +1 -1
  145. package/dist/components/lido-root.js +49 -25
  146. package/dist/components/lido-row.js +1 -1
  147. package/dist/components/lido-shape.js +1 -1
  148. package/dist/components/lido-slide-fill.js +1 -1
  149. package/dist/components/lido-text.js +1 -1
  150. package/dist/components/lido-trace.js +1 -1
  151. package/dist/components/lido-wrap.js +1 -1
  152. package/dist/components/{p-9be56729.js → p-00777872.js} +46 -2
  153. package/dist/components/{p-3f406017.js → p-06171259.js} +2 -2
  154. package/dist/components/{p-08d0deab.js → p-09f1e2d2.js} +15 -9
  155. package/dist/components/{p-e4e42677.js → p-0c2aebfb.js} +2 -2
  156. package/dist/components/p-0fbeb3a1.js +2700 -0
  157. package/dist/components/{p-cbac3cbc.js → p-11bf64aa.js} +2 -2
  158. package/dist/components/{p-44808985.js → p-26df0769.js} +7 -7
  159. package/dist/components/{p-1fbdb431.js → p-2d53e1a5.js} +2 -2
  160. package/dist/components/{p-afbc196f.js → p-39a2e638.js} +3 -2
  161. package/dist/components/{p-e36ddcc1.js → p-3ce3744c.js} +14 -11
  162. package/dist/components/{p-7f7e5672.js → p-3f4d4c0a.js} +2 -2
  163. package/dist/components/{p-d37ab4dc.js → p-52e77394.js} +2 -2
  164. package/dist/components/{p-bed94c37.js → p-58c67252.js} +331 -118
  165. package/dist/components/p-5b5f59a8.js +129 -0
  166. package/dist/components/{p-52844fa4.js → p-68112f8c.js} +2 -2
  167. package/dist/components/{p-15971ede.js → p-8a34b98b.js} +1 -1
  168. package/dist/components/{p-904711c8.js → p-8f2ed62f.js} +2 -2
  169. package/dist/components/{p-74849cdd.js → p-9d34d59d.js} +4 -4
  170. package/dist/components/{p-73e31a86.js → p-a2f96840.js} +8 -8
  171. package/dist/components/{p-90465904.js → p-a516a324.js} +2 -2
  172. package/dist/components/{p-322acda6.js → p-b2125fc9.js} +67 -31
  173. package/dist/components/{p-835b973d.js → p-c4abfd0f.js} +2 -2
  174. package/dist/components/{p-29bdd953.js → p-cb56a853.js} +2 -2
  175. package/dist/esm/{index-170e58c7.js → index-37c2ad2d.js} +48 -14
  176. package/dist/esm/index.js +2 -2
  177. package/dist/esm/{lido-avatar_21.entry.js → lido-avatar_22.entry.js} +3043 -163
  178. package/dist/esm/lido-player.js +3 -3
  179. package/dist/esm/loader.js +3 -3
  180. package/dist/esm/{utils-5df09162.js → utils-107b15a7.js} +294 -108
  181. package/dist/lido-player/index.esm.js +1 -1
  182. package/dist/lido-player/lido-player.esm.js +1 -1
  183. package/dist/lido-player/p-606ea279.entry.js +1 -0
  184. package/dist/lido-player/p-9a9d5339.js +2 -0
  185. package/dist/lido-player/{p-7556e652.js → p-d1251482.js} +2 -2
  186. package/dist/types/components/canvas/lido-canvas.d.ts +27 -0
  187. package/dist/types/components/container/lido-container.d.ts +6 -0
  188. package/dist/types/components/home/lido-home.d.ts +8 -0
  189. package/dist/types/components/mathMatrix/lido-math-matrix.d.ts +3 -1
  190. package/dist/types/components/root/lido-root.d.ts +5 -0
  191. package/dist/types/components.d.ts +71 -6
  192. package/dist/types/stories/Templates/RocketGame/rocketGame.stories.d.ts +1 -0
  193. package/dist/types/stories/Templates/blender/blender.stories.d.ts +4 -0
  194. package/dist/types/stories/Templates/calculator/calculator.stories.d.ts +4 -0
  195. package/dist/types/stories/Templates/multiplyBeeds/multiplyBeeds.stories.d.ts +1 -0
  196. package/dist/types/stories/Templates/openwindow/openwindow.stories.d.ts +1 -0
  197. package/dist/types/stories/Templates/openwindow/openwindow2.stories.d.ts +1 -0
  198. package/dist/types/stories/Templates/questionBoard/questionBoard.stories.d.ts +1 -0
  199. package/dist/types/stories/Templates/sequenceBox/sequenceBox1.stories.d.ts +1 -0
  200. package/dist/types/stories/Templates/sequenceBox/sequenceBox2.stories.d.ts +1 -0
  201. package/dist/types/stories/Templates/shapePair/shape-pair.stories.d.ts +1 -1
  202. package/dist/types/stories/Templates/sumTogether/sumTogether.stories.d.ts +1 -0
  203. package/dist/types/stories/Templates/writeCard/writeCard.stories.d.ts +1 -0
  204. package/dist/types/stories/Templates/writeLetter/writeLetter.stories.d.ts +1 -0
  205. package/dist/types/stories/Templates/writeNumber/writeNumber.stories.d.ts +1 -0
  206. package/dist/types/stories/Templates/writeWord/writeWord.stories.d.ts +1 -0
  207. package/dist/types/types/json.d.ts +4 -0
  208. package/dist/types/utils/audioPlayer.d.ts +2 -0
  209. package/dist/types/utils/constants.d.ts +1 -0
  210. package/dist/types/utils/i18n.d.ts +5 -0
  211. package/dist/types/utils/utils.d.ts +1 -0
  212. package/package.json +71 -69
  213. package/readme.md +113 -113
  214. package/dist/lido-player/p-137c99ce.js +0 -2
  215. package/dist/lido-player/p-eb956325.entry.js +0 -1
@@ -30,6 +30,9 @@ export class LidoMathMatrix {
30
30
  this.fontColor = undefined;
31
31
  this.previousFilledSlot = -1;
32
32
  this.previousFilledSlotElement = null;
33
+ this.onCorrect = undefined;
34
+ this.onInCorrect = undefined;
35
+ this.onEntry = undefined;
33
36
  this.style = {};
34
37
  }
35
38
  updateValue(index) {
@@ -182,14 +185,14 @@ export class LidoMathMatrix {
182
185
  render() {
183
186
  let slotNumber = 1;
184
187
  const slotData = this.getSlotData();
185
- return (h(Host, { key: '66d627c33553f3f6473c6d1b465c9af7cc6741d3', class: "math-matrix", style: {
188
+ return (h(Host, { key: '8232965fc3fb0b298233d21d7f50412508dc2256', class: "math-matrix", style: {
186
189
  height: this.style.height,
187
190
  width: this.style.width,
188
191
  z: this.style.z,
189
192
  display: this.style.display,
190
193
  top: this.style.top,
191
194
  left: this.style.left,
192
- }, type: this.type, value: this.value, "tab-index": this.tabIndex, rows: this.style.rows, cols: this.style.cols, text: this.text }, Array.from({ length: parseInt(this.style.rows) + 1 }, (_, rowIndex) => (h("div", { class: "slot-parent", key: `row-${rowIndex}` }, h("div", { style: rowIndex === 0 && { visibility: 'hidden' }, class: "topIndex" }, rowIndex), Array.from({ length: parseInt(this.style.cols) }, (_, colIndex) => {
195
+ }, type: this.type, value: this.value, "tab-index": this.tabIndex, rows: this.style.rows, cols: this.style.cols, text: this.text, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry }, Array.from({ length: parseInt(this.style.rows) + 1 }, (_, rowIndex) => (h("div", { class: "slot-parent", key: `row-${rowIndex}` }, h("div", { style: rowIndex === 0 && { visibility: 'hidden' }, class: "topIndex" }, rowIndex), Array.from({ length: parseInt(this.style.cols) }, (_, colIndex) => {
193
196
  var _a, _b;
194
197
  return rowIndex === 0 ? (h("div", { class: "leftIndex" }, ++colIndex)) : (h("div", { class: `slot slot-${slotNumber} ${this.defualtFill >= slotNumber ? 'slot-active' : 'slot-inactive'}`, onClick: (ev) => this.handleClickSlot(ev.currentTarget), key: `slot-${rowIndex}-${colIndex}`, style: {
195
198
  borderRadius: this.style.borderRadius,
@@ -249,7 +252,7 @@ export class LidoMathMatrix {
249
252
  },
250
253
  "defualtFill": {
251
254
  "type": "number",
252
- "mutable": false,
255
+ "mutable": true,
253
256
  "complexType": {
254
257
  "original": "number",
255
258
  "resolved": "number",
@@ -262,7 +265,7 @@ export class LidoMathMatrix {
262
265
  "text": "Number of slots to pre-fill as active by default"
263
266
  },
264
267
  "attribute": "defualt-fill",
265
- "reflect": false,
268
+ "reflect": true,
266
269
  "defaultValue": "0"
267
270
  },
268
271
  "leftIndex": {
@@ -374,7 +377,7 @@ export class LidoMathMatrix {
374
377
  },
375
378
  "activeBgColor": {
376
379
  "type": "string",
377
- "mutable": false,
380
+ "mutable": true,
378
381
  "complexType": {
379
382
  "original": "string",
380
383
  "resolved": "string",
@@ -387,12 +390,12 @@ export class LidoMathMatrix {
387
390
  "text": "Background color for active slots"
388
391
  },
389
392
  "attribute": "active-bg-color",
390
- "reflect": false,
393
+ "reflect": true,
391
394
  "defaultValue": "'transparent'"
392
395
  },
393
396
  "deactiveBgColor": {
394
397
  "type": "string",
395
- "mutable": false,
398
+ "mutable": true,
396
399
  "complexType": {
397
400
  "original": "string",
398
401
  "resolved": "string",
@@ -402,15 +405,15 @@ export class LidoMathMatrix {
402
405
  "optional": false,
403
406
  "docs": {
404
407
  "tags": [],
405
- "text": "Background color for inactive slots"
408
+ "text": ""
406
409
  },
407
410
  "attribute": "deactive-bg-color",
408
- "reflect": false,
411
+ "reflect": true,
409
412
  "defaultValue": "'transparent'"
410
413
  },
411
414
  "border": {
412
415
  "type": "string",
413
- "mutable": false,
416
+ "mutable": true,
414
417
  "complexType": {
415
418
  "original": "string",
416
419
  "resolved": "string",
@@ -423,12 +426,12 @@ export class LidoMathMatrix {
423
426
  "text": "Border style applied to each slot"
424
427
  },
425
428
  "attribute": "border",
426
- "reflect": false,
429
+ "reflect": true,
427
430
  "defaultValue": "'2px solid green'"
428
431
  },
429
432
  "height": {
430
433
  "type": "string",
431
- "mutable": false,
434
+ "mutable": true,
432
435
  "complexType": {
433
436
  "original": "string",
434
437
  "resolved": "string",
@@ -441,12 +444,12 @@ export class LidoMathMatrix {
441
444
  "text": "Height of the slot container"
442
445
  },
443
446
  "attribute": "height",
444
- "reflect": false,
447
+ "reflect": true,
445
448
  "defaultValue": "'100%'"
446
449
  },
447
450
  "width": {
448
451
  "type": "string",
449
- "mutable": false,
452
+ "mutable": true,
450
453
  "complexType": {
451
454
  "original": "string",
452
455
  "resolved": "string",
@@ -459,7 +462,7 @@ export class LidoMathMatrix {
459
462
  "text": "Width of the slot container"
460
463
  },
461
464
  "attribute": "width",
462
- "reflect": false,
465
+ "reflect": true,
463
466
  "defaultValue": "'100%'"
464
467
  },
465
468
  "borderRadius": {
@@ -667,6 +670,57 @@ export class LidoMathMatrix {
667
670
  },
668
671
  "attribute": "font-color",
669
672
  "reflect": false
673
+ },
674
+ "onCorrect": {
675
+ "type": "string",
676
+ "mutable": false,
677
+ "complexType": {
678
+ "original": "string",
679
+ "resolved": "string",
680
+ "references": {}
681
+ },
682
+ "required": false,
683
+ "optional": false,
684
+ "docs": {
685
+ "tags": [],
686
+ "text": ""
687
+ },
688
+ "attribute": "on-correct",
689
+ "reflect": false
690
+ },
691
+ "onInCorrect": {
692
+ "type": "string",
693
+ "mutable": false,
694
+ "complexType": {
695
+ "original": "string",
696
+ "resolved": "string",
697
+ "references": {}
698
+ },
699
+ "required": false,
700
+ "optional": false,
701
+ "docs": {
702
+ "tags": [],
703
+ "text": ""
704
+ },
705
+ "attribute": "on-in-correct",
706
+ "reflect": false
707
+ },
708
+ "onEntry": {
709
+ "type": "string",
710
+ "mutable": false,
711
+ "complexType": {
712
+ "original": "string",
713
+ "resolved": "string",
714
+ "references": {}
715
+ },
716
+ "required": false,
717
+ "optional": false,
718
+ "docs": {
719
+ "tags": [],
720
+ "text": ""
721
+ },
722
+ "attribute": "on-entry",
723
+ "reflect": false
670
724
  }
671
725
  };
672
726
  }
@@ -1,16 +1,16 @@
1
- .lido-pos {
2
- top: var(--y, 0);
3
- left: var(--x, 0);
4
- height: var(--height, 100%);
5
- width: var(--width, 100%);
6
- background-color: var(--bgColor, #eeeeee);
7
- display: flex;
8
- justify-content: space-around;
9
- flex-direction: column;
10
- position: fixed;
11
-
12
- }
13
-
14
- .lido-pos > * {
15
- position: absolute;
16
- }
1
+ .lido-pos {
2
+ top: var(--y, 0);
3
+ left: var(--x, 0);
4
+ height: var(--height, 100%);
5
+ width: var(--width, 100%);
6
+ background-color: var(--bgColor, #eeeeee);
7
+ display: flex;
8
+ justify-content: space-around;
9
+ flex-direction: column;
10
+ position: fixed;
11
+
12
+ }
13
+
14
+ .lido-pos > * {
15
+ position: absolute;
16
+ }
@@ -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: '0eea8147ee3845668e83bed01164dce740aae785', 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: 'ca9378dc185eeb4d495ab3045d6b17424de908dc' })));
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: 'cc8bb9d31ff6c36201d266f5579288c92c05bf82', 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: 'd91a2403fa78320cbae40456dc0c86b44493bb5a' })));
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: '2d2f701dda922276d2485e91f15c8912c90d7b8d', 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: 'b00002ecc9d5de422094beffc33ae5137b958fa3' })));
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,