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
@@ -6,32 +6,32 @@ export function showWrongAnswerAnimation(elements) {
6
6
  if (!document.querySelector(styleId)) {
7
7
  const style = document.createElement('style');
8
8
  style.id = styleId;
9
- style.innerHTML = `
10
- @keyframes enhanced-shake {
11
- 0% { left: 0; }
12
- 10% { left: -8px; }
13
- 20% { left: 8px; }
14
- 30% { left: -8px; }
15
- 40% { left: 8px; }
16
- 50% { left: -6px; }
17
- 60% { left: 6px; }
18
- 70% { left: -4px; }
19
- 80% { left: 4px; }
20
- 90% { left: -2px; }
21
- 100% { left: 0; }
22
- }
23
-
24
-
25
- .wrong-answer {
26
- position: relative; /* Enable relative positioning to move the element */
27
- animation: enhanced-shake 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97);
28
- background-color: #ffdddd; /* Flash red background to indicate wrong answer */
29
- box-shadow: 0 0 10px rgba(255, 0, 0, 0.5); /* Subtle red shadow */
30
-
31
- border: 4px solid red;
32
- }
33
-
34
-
9
+ style.innerHTML = `
10
+ @keyframes enhanced-shake {
11
+ 0% { left: 0; }
12
+ 10% { left: -8px; }
13
+ 20% { left: 8px; }
14
+ 30% { left: -8px; }
15
+ 40% { left: 8px; }
16
+ 50% { left: -6px; }
17
+ 60% { left: 6px; }
18
+ 70% { left: -4px; }
19
+ 80% { left: 4px; }
20
+ 90% { left: -2px; }
21
+ 100% { left: 0; }
22
+ }
23
+
24
+
25
+ .wrong-answer {
26
+ position: relative; /* Enable relative positioning to move the element */
27
+ animation: enhanced-shake 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97);
28
+ background-color: #ffdddd; /* Flash red background to indicate wrong answer */
29
+ box-shadow: 0 0 10px rgba(255, 0, 0, 0.5); /* Subtle red shadow */
30
+
31
+ border: 4px solid red;
32
+ }
33
+
34
+
35
35
  `;
36
36
  document.head.appendChild(style);
37
37
  }
@@ -59,34 +59,34 @@ export function highlightSpeakingElement(element) {
59
59
  if (!document.querySelector(styleId)) {
60
60
  const style = document.createElement('style');
61
61
  style.id = styleId;
62
- style.innerHTML = `
63
- .speaking-highlight {
64
- --base-transform: ${element.style.transform};
65
- box-shadow: 0 0 20px 10px rgba(255, 165, 0, 0.9) !important; /* Stronger orange glow effect */
66
- // border: 3px solid green !important;
67
- // transition: box-shadow 0.5s ease-in-out, transform 0.5s ease-in-out;
68
- // transform: scale(1.05); /* Subtle scale effect to pop the element */
69
- // animation: pulseEffect 1.5s infinite; /* Pulsing animation */
70
-
71
- }
72
-
73
- @keyframes pulseEffect {
74
- 0% {
75
- box-shadow: 0 0 20px 10px rgba(255, 165, 0, 0.9);
76
- // transform: var(--base-transform) scale(1.05);
77
- // background-color: #FFFF0B;
78
- }
79
- 50% {
80
- box-shadow: 0 0 30px 15px rgba(255, 165, 0, 1);
81
- // transform: var(--base-transform) scale(1.1);
82
- // background-color: #FFFF0B;
83
- }
84
- 100% {
85
- box-shadow: 0 0 20px 10px rgba(255, 165, 0, 0.9);
86
- // transform: var(--base-transform) scale(1.05);
87
- // background-color: #FFFF0B;
88
- }
89
- }
62
+ style.innerHTML = `
63
+ .speaking-highlight {
64
+ --base-transform: ${element.style.transform};
65
+ box-shadow: 0 0 20px 10px rgba(255, 165, 0, 0.9) !important; /* Stronger orange glow effect */
66
+ // border: 3px solid green !important;
67
+ // transition: box-shadow 0.5s ease-in-out, transform 0.5s ease-in-out;
68
+ // transform: scale(1.05); /* Subtle scale effect to pop the element */
69
+ // animation: pulseEffect 1.5s infinite; /* Pulsing animation */
70
+
71
+ }
72
+
73
+ @keyframes pulseEffect {
74
+ 0% {
75
+ box-shadow: 0 0 20px 10px rgba(255, 165, 0, 0.9);
76
+ // transform: var(--base-transform) scale(1.05);
77
+ // background-color: #FFFF0B;
78
+ }
79
+ 50% {
80
+ box-shadow: 0 0 30px 15px rgba(255, 165, 0, 1);
81
+ // transform: var(--base-transform) scale(1.1);
82
+ // background-color: #FFFF0B;
83
+ }
84
+ 100% {
85
+ box-shadow: 0 0 20px 10px rgba(255, 165, 0, 0.9);
86
+ // transform: var(--base-transform) scale(1.05);
87
+ // background-color: #FFFF0B;
88
+ }
89
+ }
90
90
  `;
91
91
  document.head.appendChild(style);
92
92
  }
@@ -55,8 +55,8 @@ export function balanceResult(container, objectiveString) {
55
55
  return false;
56
56
  const leftVal = Number((_c = (_a = balanceEl.leftVal) !== null && _a !== void 0 ? _a : (_b = balanceEl.dataset) === null || _b === void 0 ? void 0 : _b.leftVal) !== null && _c !== void 0 ? _c : 0);
57
57
  const rightVal = Number((_f = (_d = balanceEl.rightVal) !== null && _d !== void 0 ? _d : (_e = balanceEl.dataset) === null || _e === void 0 ? void 0 : _e.rightVal) !== null && _f !== void 0 ? _f : 0);
58
- const hasLeft = !isNaN(leftVal) && leftVal !== 0;
59
- const hasRight = !isNaN(rightVal) && rightVal !== 0;
58
+ const hasLeft = !isNaN(leftVal);
59
+ const hasRight = !isNaN(rightVal);
60
60
  if (!hasLeft || !hasRight) {
61
61
  return false;
62
62
  }
@@ -2,15 +2,15 @@ import { triggerNextContainer } from "../utils";
2
2
  // Helper to animate and remove the active equation cell
3
3
  const animationToRemoveEquationSolvedCellForNimbleTable = (activeCell, allCalculateTypes) => {
4
4
  return new Promise((resolve) => {
5
- const keyframes = `
6
- @keyframes widthDecrease {
7
- 0% {
8
- background-color: ${activeCell.style.backgroundColor};
9
- height: ${activeCell.style.height};
10
- margin: ${activeCell.style.margin};
11
- ${activeCell.innerHTML = ""}
12
- }
13
- 100% { background-color: transparent; height: 0px; margin: 0px; }
5
+ const keyframes = `
6
+ @keyframes widthDecrease {
7
+ 0% {
8
+ background-color: ${activeCell.style.backgroundColor};
9
+ height: ${activeCell.style.height};
10
+ margin: ${activeCell.style.margin};
11
+ ${activeCell.innerHTML = ""}
12
+ }
13
+ 100% { background-color: transparent; height: 0px; margin: 0px; }
14
14
  }`;
15
15
  const styleSheet = document.styleSheets[0];
16
16
  styleSheet.insertRule(keyframes, styleSheet.cssRules.length);
@@ -156,11 +156,11 @@ export function enableReorderDrag(element) {
156
156
  onDropToCategory(element, category);
157
157
  }
158
158
  if (divEl) {
159
- const keyframes = `
160
- @keyframes widthDecrease {
161
- 0% { width: ${divEl.offsetWidth}px; height: ${divEl.offsetHeight}px; }
162
- 100% { width: 0px; height: 0px;}
163
- }
159
+ const keyframes = `
160
+ @keyframes widthDecrease {
161
+ 0% { width: ${divEl.offsetWidth}px; height: ${divEl.offsetHeight}px; }
162
+ 100% { width: 0px; height: 0px;}
163
+ }
164
164
  `;
165
165
  const styleSheet = document.styleSheets[0];
166
166
  styleSheet.insertRule(keyframes, styleSheet.cssRules.length);
@@ -370,11 +370,11 @@ function moveWithAnimation(target, overlapped) {
370
370
  const dummy = createDummyElement(target);
371
371
  dummy.style.visibility = 'hidden';
372
372
  dummy.setAttribute('type', 'dummy');
373
- const keyframes = `
374
- @keyframes widthIncrease {
375
- 0% { width: 0px; height: 0px; }
376
- 100% { width: ${target.offsetWidth}px; height: ${target.offsetHeight}px;}
377
- }
373
+ const keyframes = `
374
+ @keyframes widthIncrease {
375
+ 0% { width: 0px; height: 0px; }
376
+ 100% { width: ${target.offsetWidth}px; height: ${target.offsetHeight}px;}
377
+ }
378
378
  `;
379
379
  if (!overlapped) {
380
380
  const overlapCategory = findMostoverlappedElement(target, 'category');
@@ -1 +1 @@
1
- export { f as format, g as getAssetPath, s as setAssetPath, a as setNonce, b as setPlatformOptions } from './p-bed94c37.js';
1
+ export { f as format, g as getAssetPath, s as setAssetPath, a as setNonce, b as setPlatformOptions } from './p-d0131159.js';
@@ -1,4 +1,4 @@
1
- import { L as LidoAvatar$1, d as defineCustomElement$1 } from './p-cbac3cbc.js';
1
+ import { L as LidoAvatar$1, d as defineCustomElement$1 } from './p-62d2a5b3.js';
2
2
 
3
3
  const LidoAvatar = LidoAvatar$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { L as LidoBalance$1, d as defineCustomElement$1 } from './p-44808985.js';
1
+ import { L as LidoBalance$1, d as defineCustomElement$1 } from './p-6ba0f1af.js';
2
2
 
3
3
  const LidoBalance = LidoBalance$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { L as LidoCalculator$1, d as defineCustomElement$1 } from './p-e36ddcc1.js';
1
+ import { L as LidoCalculator$1, d as defineCustomElement$1 } from './p-56c8f3da.js';
2
2
 
3
3
  const LidoCalculator = LidoCalculator$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface LidoCanvas extends Components.LidoCanvas, HTMLElement {}
4
+ export const LidoCanvas: {
5
+ prototype: LidoCanvas;
6
+ new (): LidoCanvas;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,6 @@
1
+ import { W as WritingPad, d as defineCustomElement$1 } from './p-1c84cf65.js';
2
+
3
+ const LidoCanvas = WritingPad;
4
+ const defineCustomElement = defineCustomElement$1;
5
+
6
+ export { LidoCanvas, defineCustomElement };
@@ -1,4 +1,4 @@
1
- import { L as LidoCell$1, d as defineCustomElement$1 } from './p-29bdd953.js';
1
+ import { L as LidoCell$1, d as defineCustomElement$1 } from './p-d3f7d561.js';
2
2
 
3
3
  const LidoCell = LidoCell$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { L as LidoCol$1, d as defineCustomElement$1 } from './p-52844fa4.js';
1
+ import { L as LidoCol$1, d as defineCustomElement$1 } from './p-6be6c5eb.js';
2
2
 
3
3
  const LidoCol = LidoCol$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { L as LidoContainer$1, d as defineCustomElement$1 } from './p-9be56729.js';
1
+ import { L as LidoContainer$1, d as defineCustomElement$1 } from './p-e9548986.js';
2
2
 
3
3
  const LidoContainer = LidoContainer$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { L as LidoFlash, d as defineCustomElement$1 } from './p-e4e42677.js';
1
+ import { L as LidoFlash, d as defineCustomElement$1 } from './p-4fd6b588.js';
2
2
 
3
3
  const LidoFlashCard = LidoFlash;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { L as LidoFloat$1, d as defineCustomElement$1 } from './p-1fbdb431.js';
1
+ import { L as LidoFloat$1, d as defineCustomElement$1 } from './p-12432f23.js';
2
2
 
3
3
  const LidoFloat = LidoFloat$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { L as LidoHome$1, d as defineCustomElement$1 } from './p-322acda6.js';
1
+ import { L as LidoHome$1, d as defineCustomElement$1 } from './p-c8815e84.js';
2
2
 
3
3
  const LidoHome = LidoHome$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { L as LidoImage$1, d as defineCustomElement$1 } from './p-15971ede.js';
1
+ import { L as LidoImage$1, d as defineCustomElement$1 } from './p-b89371ac.js';
2
2
 
3
3
  const LidoImage = LidoImage$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { L as LidoKeyboard$1, d as defineCustomElement$1 } from './p-74849cdd.js';
1
+ import { L as LidoKeyboard$1, d as defineCustomElement$1 } from './p-1f3c2783.js';
2
2
 
3
3
  const LidoKeyboard = LidoKeyboard$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { L as LidoMathMatrix$1, d as defineCustomElement$1 } from './p-08d0deab.js';
1
+ import { L as LidoMathMatrix$1, d as defineCustomElement$1 } from './p-74b90a9c.js';
2
2
 
3
3
  const LidoMathMatrix = LidoMathMatrix$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { L as LidoPos$1, d as defineCustomElement$1 } from './p-d37ab4dc.js';
1
+ import { L as LidoPos$1, d as defineCustomElement$1 } from './p-988477ad.js';
2
2
 
3
3
  const LidoPos = LidoPos$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { L as LidoRandom$1, d as defineCustomElement$1 } from './p-3f406017.js';
1
+ import { L as LidoRandom$1, d as defineCustomElement$1 } from './p-b7efadad.js';
2
2
 
3
3
  const LidoRandom = LidoRandom$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,29 +1,32 @@
1
- import { p as proxyCustomElement, H, g as getAssetPath, h } from './p-bed94c37.js';
2
- import { d as defineCustomElement$l } from './p-cbac3cbc.js';
3
- import { d as defineCustomElement$k } from './p-44808985.js';
4
- import { d as defineCustomElement$j } from './p-e36ddcc1.js';
5
- import { d as defineCustomElement$i } from './p-29bdd953.js';
6
- import { d as defineCustomElement$h } from './p-52844fa4.js';
7
- import { d as defineCustomElement$g } from './p-9be56729.js';
8
- import { d as defineCustomElement$f } from './p-e4e42677.js';
9
- import { d as defineCustomElement$e } from './p-1fbdb431.js';
10
- import { d as defineCustomElement$d } from './p-322acda6.js';
11
- import { d as defineCustomElement$c } from './p-15971ede.js';
12
- import { d as defineCustomElement$b } from './p-74849cdd.js';
13
- import { d as defineCustomElement$a } from './p-08d0deab.js';
14
- import { d as defineCustomElement$9 } from './p-d37ab4dc.js';
15
- import { d as defineCustomElement$8 } from './p-3f406017.js';
16
- import { d as defineCustomElement$7 } from './p-7f7e5672.js';
17
- import { d as defineCustomElement$6 } from './p-904711c8.js';
18
- import { d as defineCustomElement$5 } from './p-73e31a86.js';
19
- import { d as defineCustomElement$4 } from './p-afbc196f.js';
20
- import { d as defineCustomElement$3 } from './p-90465904.js';
21
- import { d as defineCustomElement$2 } from './p-835b973d.js';
1
+ import { p as proxyCustomElement, H, g as getAssetPath, h } from './p-d0131159.js';
2
+ import { i as instance } from './p-0fbeb3a1.js';
3
+ import { d as defineCustomElement$m } from './p-62d2a5b3.js';
4
+ import { d as defineCustomElement$l } from './p-6ba0f1af.js';
5
+ import { d as defineCustomElement$k } from './p-56c8f3da.js';
6
+ import { d as defineCustomElement$j } from './p-1c84cf65.js';
7
+ import { d as defineCustomElement$i } from './p-d3f7d561.js';
8
+ import { d as defineCustomElement$h } from './p-6be6c5eb.js';
9
+ import { d as defineCustomElement$g } from './p-e9548986.js';
10
+ import { d as defineCustomElement$f } from './p-4fd6b588.js';
11
+ import { d as defineCustomElement$e } from './p-12432f23.js';
12
+ import { d as defineCustomElement$d } from './p-c8815e84.js';
13
+ import { d as defineCustomElement$c } from './p-b89371ac.js';
14
+ import { d as defineCustomElement$b } from './p-1f3c2783.js';
15
+ import { d as defineCustomElement$a } from './p-74b90a9c.js';
16
+ import { d as defineCustomElement$9 } from './p-988477ad.js';
17
+ import { d as defineCustomElement$8 } from './p-b7efadad.js';
18
+ import { d as defineCustomElement$7 } from './p-a8724f06.js';
19
+ import { d as defineCustomElement$6 } from './p-bb907e43.js';
20
+ import { d as defineCustomElement$5 } from './p-04e904b5.js';
21
+ import { d as defineCustomElement$4 } from './p-bef96764.js';
22
+ import { d as defineCustomElement$3 } from './p-d7693f47.js';
23
+ import { d as defineCustomElement$2 } from './p-caa05d1e.js';
22
24
 
23
25
  const LidoRoot$1 = /*@__PURE__*/ proxyCustomElement(class LidoRoot extends H {
24
26
  constructor() {
25
27
  super();
26
28
  this.__registerHost();
29
+ this.locale = '';
27
30
  this.xmlPath = '';
28
31
  this.initialIndex = 0;
29
32
  this.margin = '';
@@ -39,6 +42,16 @@ const LidoRoot$1 = /*@__PURE__*/ proxyCustomElement(class LidoRoot extends H {
39
42
  * Lifecycle method that runs before the component is loaded.
40
43
  * It fetches the XML data from the specified path or URL and sets it to the component's state.
41
44
  */
45
+ connectedCallback() {
46
+ this.setLanguage(this.locale);
47
+ }
48
+ onLangChange(newLang) {
49
+ this.setLanguage(newLang);
50
+ }
51
+ setLanguage(lang) {
52
+ const effectiveLang = lang || instance.language;
53
+ instance.changeLanguage(effectiveLang);
54
+ }
42
55
  async componentWillLoad() {
43
56
  var _a, _b;
44
57
  // Validate the xmlPath prop
@@ -78,10 +91,14 @@ const LidoRoot$1 = /*@__PURE__*/ proxyCustomElement(class LidoRoot extends H {
78
91
  return h("div", null, "Error loading XML data. Please check the path or URL.");
79
92
  }
80
93
  // Once the XML data is loaded, pass it to the `lido-home` component
81
- 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 });
94
+ 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 });
82
95
  }
83
96
  static get assetsDirs() { return ["assets"]; }
97
+ static get watchers() { return {
98
+ "locale": ["onLangChange"]
99
+ }; }
84
100
  }, [0, "lido-root", {
101
+ "locale": [1],
85
102
  "xmlPath": [1, "xml-path"],
86
103
  "initialIndex": [2, "initial-index"],
87
104
  "margin": [1],
@@ -92,12 +109,14 @@ const LidoRoot$1 = /*@__PURE__*/ proxyCustomElement(class LidoRoot extends H {
92
109
  "nextButtonUrl": [1, "next-button-url"],
93
110
  "speakerButtonUrl": [1, "speaker-button-url"],
94
111
  "xmlData": [32]
112
+ }, undefined, {
113
+ "locale": ["onLangChange"]
95
114
  }]);
96
115
  function defineCustomElement$1() {
97
116
  if (typeof customElements === "undefined") {
98
117
  return;
99
118
  }
100
- const components = ["lido-root", "lido-avatar", "lido-balance", "lido-calculator", "lido-cell", "lido-col", "lido-container", "lido-flash-card", "lido-float", "lido-home", "lido-image", "lido-keyboard", "lido-math-matrix", "lido-pos", "lido-random", "lido-row", "lido-shape", "lido-slide-fill", "lido-text", "lido-trace", "lido-wrap"];
119
+ const components = ["lido-root", "lido-avatar", "lido-balance", "lido-calculator", "lido-canvas", "lido-cell", "lido-col", "lido-container", "lido-flash-card", "lido-float", "lido-home", "lido-image", "lido-keyboard", "lido-math-matrix", "lido-pos", "lido-random", "lido-row", "lido-shape", "lido-slide-fill", "lido-text", "lido-trace", "lido-wrap"];
101
120
  components.forEach(tagName => { switch (tagName) {
102
121
  case "lido-root":
103
122
  if (!customElements.get(tagName)) {
@@ -106,15 +125,20 @@ function defineCustomElement$1() {
106
125
  break;
107
126
  case "lido-avatar":
108
127
  if (!customElements.get(tagName)) {
109
- defineCustomElement$l();
128
+ defineCustomElement$m();
110
129
  }
111
130
  break;
112
131
  case "lido-balance":
113
132
  if (!customElements.get(tagName)) {
114
- defineCustomElement$k();
133
+ defineCustomElement$l();
115
134
  }
116
135
  break;
117
136
  case "lido-calculator":
137
+ if (!customElements.get(tagName)) {
138
+ defineCustomElement$k();
139
+ }
140
+ break;
141
+ case "lido-canvas":
118
142
  if (!customElements.get(tagName)) {
119
143
  defineCustomElement$j();
120
144
  }
@@ -1,4 +1,4 @@
1
- import { L as LidoRow$1, d as defineCustomElement$1 } from './p-7f7e5672.js';
1
+ import { L as LidoRow$1, d as defineCustomElement$1 } from './p-a8724f06.js';
2
2
 
3
3
  const LidoRow = LidoRow$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { L as LidoShape$1, d as defineCustomElement$1 } from './p-904711c8.js';
1
+ import { L as LidoShape$1, d as defineCustomElement$1 } from './p-bb907e43.js';
2
2
 
3
3
  const LidoShape = LidoShape$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { L as LidoSlideFill$1, d as defineCustomElement$1 } from './p-73e31a86.js';
1
+ import { L as LidoSlideFill$1, d as defineCustomElement$1 } from './p-04e904b5.js';
2
2
 
3
3
  const LidoSlideFill = LidoSlideFill$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { L as LidoText$1, d as defineCustomElement$1 } from './p-afbc196f.js';
1
+ import { L as LidoText$1, d as defineCustomElement$1 } from './p-bef96764.js';
2
2
 
3
3
  const LidoText = LidoText$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { L as LidoTrace$1, d as defineCustomElement$1 } from './p-90465904.js';
1
+ import { L as LidoTrace$1, d as defineCustomElement$1 } from './p-d7693f47.js';
2
2
 
3
3
  const LidoTrace = LidoTrace$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { L as LidoWrap$1, d as defineCustomElement$1 } from './p-835b973d.js';
1
+ import { L as LidoWrap$1, d as defineCustomElement$1 } from './p-caa05d1e.js';
2
2
 
3
3
  const LidoWrap = LidoWrap$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { p as proxyCustomElement, H, e as convertUrlToRelative, d as setVisibilityWithDelay, i as initEventsForElement, k as parseProp, U as fraction, h, j as Host } from './p-bed94c37.js';
1
+ import { p as proxyCustomElement, H, e as convertUrlToRelative, d as setVisibilityWithDelay, i as initEventsForElement, k as parseProp, U as fraction, h, j as Host } from './p-d0131159.js';
2
2
 
3
3
  const lidoSlideFillCss = ".svg-element,svg{width:100%;height:100%}";
4
4
  const LidoSlideFillStyle0 = lidoSlideFillCss;
@@ -63,13 +63,13 @@ const LidoSlideFill = /*@__PURE__*/ proxyCustomElement(class LidoSlideFill exten
63
63
  const id = pathIndex === 1 ? 'glassPath' : pathIndex === 2 ? 'rulerPath' : `path${pathIndex}`;
64
64
  return `<path id="${id}"${attrs}>`;
65
65
  });
66
- const clipPathDef = `
67
- <clipPath id="clipGlass">
68
- <use xlink:href="#glassPath" />
69
- </clipPath>
66
+ const clipPathDef = `
67
+ <clipPath id="clipGlass">
68
+ <use xlink:href="#glassPath" />
69
+ </clipPath>
70
70
  `;
71
- svgText = svgText.replace(/<svg([^>]*)>/, `<svg$1>
72
- ${clipPathDef}
71
+ svgText = svgText.replace(/<svg([^>]*)>/, `<svg$1>
72
+ ${clipPathDef}
73
73
  `);
74
74
  svgText = svgText.replace(/<rect([^>]*)\/?>/, `<rect id="fillArea" $1 clip-path="url(#clipGlass)" />`);
75
75
  this.svgContent = svgText;
@@ -194,7 +194,7 @@ const LidoSlideFill = /*@__PURE__*/ proxyCustomElement(class LidoSlideFill exten
194
194
  }
195
195
  }
196
196
  render() {
197
- return (h(Host, { key: '57ee54a6a0e7d3bbac893ce535a3375ea529e75a', id: this.id, class: "lido-slide-fill", src: this.src, fill: this.fill, fillDirection: this.fillDirection, slider: this.slider, style: this.style, min: this.min, max: this.max, division: this.division, numberType: this.numberType, onEntry: this.onEntry, type: this.type, "disable-speak": this.disableSpeak }, h("div", { key: '386330e0562851f2f00aba169018c23bf5ffa4b7', innerHTML: this.svgContent, class: "svg-element" })));
197
+ return (h(Host, { key: '3918ed476b3de4977c53ff0bf576253f68e8c84f', id: this.id, class: "lido-slide-fill", src: this.src, fill: this.fill, fillDirection: this.fillDirection, slider: this.slider, style: this.style, min: this.min, max: this.max, division: this.division, numberType: this.numberType, onEntry: this.onEntry, type: this.type, "disable-speak": this.disableSpeak }, h("div", { key: '8f54b0e5de490a162aaa1d7ac9ed485d1628c484', innerHTML: this.svgContent, class: "svg-element" })));
198
198
  }
199
199
  get el() { return this; }
200
200
  static get watchers() { return {