lido-player 0.0.2-alpha-57-dev → 0.0.2-alpha-59-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 (147) hide show
  1. package/dist/cjs/index.cjs.js +1 -1
  2. package/dist/cjs/lido-avatar_22.cjs.entry.js +94 -34
  3. package/dist/cjs/lido-player.cjs.js +1 -1
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/{utils-a61cfc6b.js → utils-03573882.js} +160 -124
  6. package/dist/collection/components/container/lido-container.js +60 -3
  7. package/dist/collection/components/flashCard/lido-flash-card.js +10 -1
  8. package/dist/collection/components/float/lido-float.js +1 -1
  9. package/dist/collection/components/home/lido-home.js +22 -12
  10. package/dist/collection/components/keyboard/lido-keyboard.js +2 -2
  11. package/dist/collection/components/mathMatrix/lido-math-matrix.js +1 -1
  12. package/dist/collection/components/position/lido-pos.js +1 -1
  13. package/dist/collection/components/random/lido-random.js +1 -1
  14. package/dist/collection/components/row/lido-row.js +1 -1
  15. package/dist/collection/components/scale/lido-balance.js +1 -1
  16. package/dist/collection/components/shape/lido-shape.js +2 -2
  17. package/dist/collection/components/slideFill/lido-slide-fill.js +1 -1
  18. package/dist/collection/components/text/lido-text.js +1 -1
  19. package/dist/collection/components/trace/lido-trace.js +18 -7
  20. package/dist/collection/components/wrap/lido-wrap.js +1 -1
  21. package/dist/collection/css/animation.css +17 -0
  22. package/dist/collection/css/index.css +1 -1
  23. package/dist/collection/stories/Templates/LetterPairing/LetterPairing.stories.js +3 -3
  24. package/dist/collection/stories/Templates/balancing/balancing.stories.js +1 -1
  25. package/dist/collection/stories/Templates/matchBox/matchBox2.stories.js +74 -44
  26. package/dist/collection/stories/Templates/matchingCard/matching-card.stories.js +4 -4
  27. package/dist/collection/stories/Templates/numberBoardTwo/numberBoardTwo.stories.js +2 -2
  28. package/dist/collection/stories/Templates/numberIdentification/numberIdentificationimageTotext.stories.js +91 -0
  29. package/dist/collection/stories/Templates/numberIdentification/numberIdentificationtextTotext.stories.js +84 -0
  30. package/dist/collection/stories/Templates/openwindow/openwindow.stories.js +0 -2
  31. package/dist/collection/stories/Templates/openwindow/openwindow2.stories.js +0 -2
  32. package/dist/collection/stories/Templates/order-tractor/order-tractor-ascending-order.stories.js +6 -5
  33. package/dist/collection/stories/Templates/order-tractor/order-tractor.stories.js +6 -6
  34. package/dist/collection/stories/Templates/palEgmaCalculateSum/palEgmaMultiOption.stories.js +106 -0
  35. package/dist/collection/stories/Templates/palEgmaCalculateSum/palEgmaSumTogether.stories.js +91 -0
  36. package/dist/collection/stories/Templates/palEgmaPatternMatching/palEgmaPatternMatching.stories.js +86 -0
  37. package/dist/collection/stories/Templates/palEgmaWordProblem/palEgmaWordProblem.stories.js +131 -0
  38. package/dist/collection/stories/Templates/palEgraInventedSpelling/pal_egra_invented_spelling_schema.stories.js +61 -0
  39. package/dist/collection/stories/Templates/palEgraMCQWithImage/palEgraMCQWithImage.stories.js +87 -0
  40. package/dist/collection/stories/Templates/palEgraStoryMaking/pal_egra_story_making.stories.js +72 -0
  41. package/dist/collection/stories/Templates/palEgraTemplate1/palEgraLetterIdentification.stories.js +61 -0
  42. package/dist/collection/stories/Templates/palEgra_OddOneOut/palEgra_oddOneOut.stories.js +60 -0
  43. package/dist/collection/stories/Templates/palEgra_word_formation/palEgra_WordFormation.stories.js +73 -0
  44. package/dist/collection/stories/Templates/pictureClues/pictureClues.stories.js +88 -0
  45. package/dist/collection/stories/Templates/pictureWordMatch/pictureWordMatch1.stories.js +88 -0
  46. package/dist/collection/stories/Templates/pictureWordMatch/pictureWordMatch2.stories.js +66 -0
  47. package/dist/collection/stories/Templates/picturemeaning/pictureMeaningCocos.stories.js +1 -1
  48. package/dist/collection/stories/Templates/quizMaths/quizMaths.stories.js +7 -7
  49. package/dist/collection/stories/Templates/rowBlocks/rowBlocks.stories.js +1 -1
  50. package/dist/collection/stories/Templates/sequenceBox/sequenceBox1.stories.js +16 -13
  51. package/dist/collection/stories/Templates/sequenceBox/sequenceBox2.stories.js +17 -14
  52. package/dist/collection/stories/Templates/substraction/substractionWithimg.stories.js +111 -0
  53. package/dist/collection/stories/Templates/substraction/substractionWithoutImg.stories.js +70 -0
  54. package/dist/collection/stories/Templates/sumTogether/sumTogether.stories.js +11 -10
  55. package/dist/collection/stories/Templates/total/total.stories.js +2 -0
  56. package/dist/collection/stories/Templates/wordBuilding/wordBuildingwithimg.stories.js +76 -0
  57. package/dist/collection/stories/Templates/wordBuilding/wordBuildingwithoutimg.stories.js +74 -0
  58. package/dist/collection/stories/Templates/writeSet/writeSet.stories.js +1 -1
  59. package/dist/collection/utils/constants.js +2 -1
  60. package/dist/collection/utils/utils.js +29 -20
  61. package/dist/collection/utils/utilsHandlers/clickHandler.js +2 -0
  62. package/dist/collection/utils/utilsHandlers/dragDropHandler.js +24 -20
  63. package/dist/collection/utils/utilsHandlers/highlightHandler.js +50 -2
  64. package/dist/collection/utils/utilsHandlers/lidoBalanceHandler.js +5 -4
  65. package/dist/components/index.js +1 -1
  66. package/dist/components/lido-avatar.js +1 -1
  67. package/dist/components/lido-balance.js +1 -1
  68. package/dist/components/lido-calculator.js +1 -1
  69. package/dist/components/lido-canvas.js +1 -1
  70. package/dist/components/lido-cell.js +1 -1
  71. package/dist/components/lido-col.js +1 -1
  72. package/dist/components/lido-container.js +1 -1
  73. package/dist/components/lido-flash-card.js +1 -1
  74. package/dist/components/lido-float.js +1 -1
  75. package/dist/components/lido-home.js +1 -1
  76. package/dist/components/lido-image.js +1 -1
  77. package/dist/components/lido-keyboard.js +1 -1
  78. package/dist/components/lido-math-matrix.js +1 -1
  79. package/dist/components/lido-pos.js +1 -1
  80. package/dist/components/lido-random.js +1 -1
  81. package/dist/components/lido-root.js +22 -23
  82. package/dist/components/lido-row.js +1 -1
  83. package/dist/components/lido-shape.js +1 -1
  84. package/dist/components/lido-slide-fill.js +1 -1
  85. package/dist/components/lido-text.js +1 -1
  86. package/dist/components/lido-trace.js +1 -1
  87. package/dist/components/lido-wrap.js +1 -1
  88. package/dist/components/{p-73e3f0f4.js → p-2bb1f74d.js} +203 -1
  89. package/dist/components/{p-f3bc4577.js → p-33b83222.js} +1 -1
  90. package/dist/components/{p-0712a27e.js → p-3513b1f3.js} +159 -125
  91. package/dist/components/{p-f2b53e8e.js → p-356e56bd.js} +2 -2
  92. package/dist/components/{p-b9875116.js → p-49ccf573.js} +18 -7
  93. package/dist/components/{p-330caab8.js → p-4d9462ab.js} +4 -4
  94. package/dist/components/{p-4d332eab.js → p-5aa24314.js} +2 -2
  95. package/dist/components/{p-d1b5079b.js → p-5c990168.js} +45 -6
  96. package/dist/components/{p-21852d55.js → p-5eeaccab.js} +2 -2
  97. package/dist/components/{p-480f708a.js → p-6819005f.js} +11 -2
  98. package/dist/components/{p-ffc40642.js → p-6bbad90f.js} +2 -2
  99. package/dist/components/{p-e1ba0c44.js → p-73e4bb01.js} +41 -33
  100. package/dist/components/{p-ff801ba1.js → p-84302365.js} +1 -1
  101. package/dist/components/{p-0a41b2f8.js → p-99fcbae4.js} +1 -1
  102. package/dist/components/{p-9104d427.js → p-9b35082a.js} +2 -2
  103. package/dist/components/{p-882b291d.js → p-ad0f335e.js} +2 -2
  104. package/dist/components/{p-c4739621.js → p-aff68c41.js} +3 -3
  105. package/dist/components/{p-2829c82c.js → p-d9b17242.js} +2 -2
  106. package/dist/components/{p-cca36777.js → p-de62d08e.js} +3 -3
  107. package/dist/components/{p-4e041807.js → p-e8e9250e.js} +2 -2
  108. package/dist/components/{p-17f84b2f.js → p-f238004e.js} +2 -2
  109. package/dist/components/{p-eab0ebb7.js → p-f9426cbe.js} +1 -1
  110. package/dist/esm/index.js +1 -1
  111. package/dist/esm/lido-avatar_22.entry.js +94 -34
  112. package/dist/esm/lido-player.js +1 -1
  113. package/dist/esm/loader.js +1 -1
  114. package/dist/esm/{utils-7ed76799.js → utils-3995d2d5.js} +159 -125
  115. package/dist/lido-player/index.esm.js +1 -1
  116. package/dist/lido-player/lido-player.css +1 -1
  117. package/dist/lido-player/lido-player.esm.js +1 -1
  118. package/dist/lido-player/p-75daccb0.entry.js +1 -0
  119. package/dist/lido-player/{p-17d93181.js → p-aee89fba.js} +2 -2
  120. package/dist/types/components/container/lido-container.d.ts +15 -2
  121. package/dist/types/components/trace/lido-trace.d.ts +3 -3
  122. package/dist/types/components.d.ts +10 -2
  123. package/dist/types/stories/Templates/numberIdentification/numberIdentificationimageTotext.stories.d.ts +4 -0
  124. package/dist/types/stories/Templates/numberIdentification/numberIdentificationtextTotext.stories.d.ts +4 -0
  125. package/dist/types/stories/Templates/palEgmaCalculateSum/palEgmaMultiOption.stories.d.ts +11 -0
  126. package/dist/types/stories/Templates/palEgmaCalculateSum/palEgmaSumTogether.stories.d.ts +12 -0
  127. package/dist/types/stories/Templates/palEgmaPatternMatching/palEgmaPatternMatching.stories.d.ts +4 -0
  128. package/dist/types/stories/Templates/palEgmaWordProblem/palEgmaWordProblem.stories.d.ts +5 -0
  129. package/dist/types/stories/Templates/palEgraInventedSpelling/pal_egra_invented_spelling_schema.stories.d.ts +4 -0
  130. package/dist/types/stories/Templates/palEgraMCQWithImage/palEgraMCQWithImage.stories.d.ts +4 -0
  131. package/dist/types/stories/Templates/palEgraStoryMaking/pal_egra_story_making.stories.d.ts +4 -0
  132. package/dist/types/stories/Templates/palEgraTemplate1/palEgraLetterIdentification.stories.d.ts +4 -0
  133. package/dist/types/stories/Templates/palEgra_OddOneOut/palEgra_oddOneOut.stories.d.ts +4 -0
  134. package/dist/types/stories/Templates/palEgra_word_formation/palEgra_WordFormation.stories.d.ts +4 -0
  135. package/dist/types/stories/Templates/pictureClues/pictureClues.stories.d.ts +4 -0
  136. package/dist/types/stories/Templates/pictureWordMatch/pictureWordMatch1.stories.d.ts +4 -0
  137. package/dist/types/stories/Templates/pictureWordMatch/pictureWordMatch2.stories.d.ts +4 -0
  138. package/dist/types/stories/Templates/substraction/substractionWithimg.stories.d.ts +4 -0
  139. package/dist/types/stories/Templates/substraction/substractionWithoutImg.stories.d.ts +4 -0
  140. package/dist/types/stories/Templates/wordBuilding/wordBuildingwithimg.stories.d.ts +4 -0
  141. package/dist/types/stories/Templates/wordBuilding/wordBuildingwithoutimg.stories.d.ts +4 -0
  142. package/dist/types/utils/constants.d.ts +9 -1
  143. package/dist/types/utils/utils.d.ts +1 -0
  144. package/dist/types/utils/utilsHandlers/highlightHandler.d.ts +1 -0
  145. package/package.json +1 -1
  146. package/dist/components/p-7ab0a273.js +0 -204
  147. package/dist/lido-player/p-fa9dfdf8.entry.js +0 -1
@@ -1385,6 +1385,7 @@ const DropTimeAttr = 'drop-time';
1385
1385
  const LidoContainer = 'lido-container';
1386
1386
  const LIDO_COMMON_AUDIO_PATH = '__LIDO_COMMON_AUDIO_PATH__';
1387
1387
  const LIDO_COMMON_AUDIO_READY_EVENT = 'lidoCommonAudioPathReady';
1388
+ const TemplateID = 'template-id';
1388
1389
  var TraceMode;
1389
1390
  (function (TraceMode) {
1390
1391
  TraceMode["NoFlow"] = "noFlow";
@@ -1416,7 +1417,7 @@ var DropAction;
1416
1417
  const exitUrl = 'https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/Navbar-buttons/Close.svg';
1417
1418
  const prevUrl = 'https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/Navbar-buttons/Previous.svg';
1418
1419
  const nextUrl = 'https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/Navbar-buttons/Next.svg';
1419
- const speakUrl = 'https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/Navbar-buttons/Audio%20icon.svg';
1420
+ const speakUrl = 'https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/Navbar-buttons/audio.png';
1420
1421
  const fingerUrl = 'https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/trace/Tracing-hand.svg';
1421
1422
 
1422
1423
  function dispatchCustomEvent(eventName, detail) {
@@ -1543,64 +1544,6 @@ var unwrapErr = (result) => {
1543
1544
  }
1544
1545
  };
1545
1546
 
1546
- function removeHighlight(element) {
1547
- element.classList.remove('highlight');
1548
- element.ariaPressed = 'false';
1549
- }
1550
- // Function to highlight the speaking element
1551
- function highlightSpeakingElement(element) {
1552
- if (!element)
1553
- return;
1554
- // Add a custom class for highlighting
1555
- element.classList.add('speaking-highlight');
1556
- // Inject keyframe animation and class styles into the document's head if it doesn't already exist
1557
- const styleId = '#speaking-highlight-style';
1558
- if (!document.querySelector(styleId)) {
1559
- const style = document.createElement('style');
1560
- style.id = styleId;
1561
- style.innerHTML = `
1562
- .speaking-highlight {
1563
- --base-transform: ${element.style.transform};
1564
- box-shadow: 0 0 20px 10px rgba(255, 165, 0, 0.9) !important; /* Stronger orange glow effect */
1565
- // border: 3px solid green !important;
1566
- // transition: box-shadow 0.5s ease-in-out, transform 0.5s ease-in-out;
1567
- // transform: scale(1.05); /* Subtle scale effect to pop the element */
1568
- // animation: pulseEffect 1.5s infinite; /* Pulsing animation */
1569
-
1570
- }
1571
-
1572
- @keyframes pulseEffect {
1573
- 0% {
1574
- box-shadow: 0 0 20px 10px rgba(255, 165, 0, 0.9);
1575
- // transform: var(--base-transform) scale(1.05);
1576
- // background-color: #FFFF0B;
1577
- }
1578
- 50% {
1579
- box-shadow: 0 0 30px 15px rgba(255, 165, 0, 1);
1580
- // transform: var(--base-transform) scale(1.1);
1581
- // background-color: #FFFF0B;
1582
- }
1583
- 100% {
1584
- box-shadow: 0 0 20px 10px rgba(255, 165, 0, 0.9);
1585
- // transform: var(--base-transform) scale(1.05);
1586
- // background-color: #FFFF0B;
1587
- }
1588
- }
1589
- `;
1590
- document.head.appendChild(style);
1591
- }
1592
- }
1593
- // Function to stop highlighting
1594
- function stopHighlightForSpeakingElement(element) {
1595
- if (!element)
1596
- return;
1597
- // Remove the custom class for highlighting
1598
- element.classList.remove('speaking-highlight');
1599
- // Remove inline styles
1600
- // element.style.boxShadow = '';
1601
- // element.style.border = '';
1602
- }
1603
-
1604
1547
  function updateBalanceOnDrop(dragElement, dropElement) {
1605
1548
  const balanceEl = document.querySelector('lido-balance');
1606
1549
  if (!balanceEl)
@@ -1616,7 +1559,7 @@ function updateBalanceOnDrop(dragElement, dropElement) {
1616
1559
  }
1617
1560
  function calculateValue(elements, operation) {
1618
1561
  if (elements.length === 0)
1619
- return null;
1562
+ return 0;
1620
1563
  if (operation === "count") {
1621
1564
  return elements.length;
1622
1565
  }
@@ -1648,15 +1591,18 @@ function calculateValue(elements, operation) {
1648
1591
  }
1649
1592
  }
1650
1593
  function balanceResult(container, objectiveString) {
1594
+ var _a, _b, _c, _d, _e, _f;
1651
1595
  const additionalCheck = container.getAttribute('equationCheck');
1652
1596
  if (!additionalCheck)
1653
1597
  return false;
1654
1598
  const balanceEl = document.querySelector('lido-balance');
1655
1599
  if (!balanceEl)
1656
1600
  return false;
1657
- const leftVal = balanceEl.leftVal;
1658
- const rightVal = balanceEl.rightVal;
1659
- if (leftVal == null || rightVal == null) {
1601
+ 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);
1602
+ 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);
1603
+ const hasLeft = !isNaN(leftVal);
1604
+ const hasRight = !isNaN(rightVal);
1605
+ if (!hasLeft || !hasRight) {
1660
1606
  return false;
1661
1607
  }
1662
1608
  const symbol = leftVal > rightVal ? '>' : leftVal < rightVal ? '<' : '=';
@@ -1927,20 +1873,14 @@ function enableDraggingWithScaling(element) {
1927
1873
  const storedTabIndexes = Object.keys(dropObject).map(Number);
1928
1874
  if (storedTabIndexes.includes(JSON.parse(otherElement.getAttribute('tab-index')))) {
1929
1875
  if (!(((_a = element.getAttribute('dropAttr')) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === DropMode.Diagonal)) {
1930
- if (otherElement.tagName.toLowerCase() === 'lido-text') {
1931
- otherElement.style.border = ''; // Reset border
1932
- otherElement.style.backgroundColor = 'transparent'; // Reset background color
1933
- }
1876
+ if (otherElement.tagName.toLowerCase() === 'lido-text') ;
1934
1877
  if (otherElement.tagName.toLowerCase() === 'lido-image') {
1935
1878
  otherElement.style.opacity = '0';
1936
1879
  }
1937
1880
  }
1938
1881
  }
1939
1882
  else {
1940
- if (otherElement.tagName.toLowerCase() === 'lido-text') {
1941
- otherElement.style.border = ''; // Reset border
1942
- otherElement.style.backgroundColor = ''; // Reset background color
1943
- }
1883
+ if (otherElement.tagName.toLowerCase() === 'lido-text') ;
1944
1884
  if (otherElement.tagName.toLowerCase() === 'lido-image' || 'lido-cell') {
1945
1885
  otherElement.style.opacity = '1';
1946
1886
  }
@@ -1948,10 +1888,7 @@ function enableDraggingWithScaling(element) {
1948
1888
  });
1949
1889
  // Apply styles only to the most overlapped element
1950
1890
  if (mostOverlappedElement) {
1951
- if (mostOverlappedElement.tagName.toLowerCase() === 'lido-text') {
1952
- mostOverlappedElement.style.border = '2px dashed #ff0000'; // Red dashed border
1953
- mostOverlappedElement.style.backgroundColor = 'rgba(255, 0, 0, 0.1)'; // Light red background
1954
- }
1891
+ if (mostOverlappedElement.tagName.toLowerCase() === 'lido-text') ;
1955
1892
  else {
1956
1893
  if (!document.getElementById('unitsDrop') || !document.getElementById('tensDrop') || !document.getElementById('hundredsDrop')) {
1957
1894
  mostOverlappedElement.style.opacity = '0.3';
@@ -1987,10 +1924,7 @@ function enableDraggingWithScaling(element) {
1987
1924
  const storedTabIndexes = Object.keys(dropObject).map(Number);
1988
1925
  if (storedTabIndexes.includes(JSON.parse(otherElement.getAttribute('tab-index')))) {
1989
1926
  if (!(((_a = element.getAttribute('dropAttr')) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === DropMode.Diagonal)) {
1990
- if (otherElement.tagName.toLowerCase() === 'lido-text') {
1991
- otherElement.style.border = ''; // Reset border
1992
- otherElement.style.backgroundColor = 'transparent'; // Reset background color
1993
- }
1927
+ if (otherElement.tagName.toLowerCase() === 'lido-text') ;
1994
1928
  else if (otherElement.tagName.toLowerCase() === 'lido-image') {
1995
1929
  otherElement.style.opacity = '0';
1996
1930
  }
@@ -2000,10 +1934,7 @@ function enableDraggingWithScaling(element) {
2000
1934
  }
2001
1935
  }
2002
1936
  else {
2003
- if (otherElement.tagName.toLowerCase() === 'lido-text') {
2004
- otherElement.style.border = ''; // Reset border
2005
- otherElement.style.backgroundColor = ''; // Reset background color
2006
- }
1937
+ if (otherElement.tagName.toLowerCase() === 'lido-text') ;
2007
1938
  if (otherElement.tagName.toLowerCase() === 'lido-image' || 'lido-cell') {
2008
1939
  otherElement.style.opacity = '1';
2009
1940
  }
@@ -2151,6 +2082,7 @@ function handleResetDragElement(dragElement, dropElement, dropHasDrag, selectedV
2151
2082
  let prevDropItem = Object.values(dropHasDrag).find(item => document.getElementById(item.drop) === currentDrop);
2152
2083
  if (prevDropItem) {
2153
2084
  prevDropItem.isFull = false;
2085
+ highlightElement();
2154
2086
  // container.setAttribute(DropHasDrag, JSON.stringify(dropHasDrag));
2155
2087
  const dropEl = document.getElementById(prevDropItem.drop);
2156
2088
  if (dropEl) {
@@ -2182,9 +2114,7 @@ function handleResetDragElement(dragElement, dropElement, dropHasDrag, selectedV
2182
2114
  const storedTabIndexes = Object.keys(dropObject).map(Number);
2183
2115
  if (storedTabIndexes.includes(JSON.parse(otherElement.getAttribute('tab-index')))) {
2184
2116
  if (!(((_a = otherElement.getAttribute('dropAttr')) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === DropMode.Diagonal)) {
2185
- if (otherElement.tagName.toLowerCase() === 'lido-text') {
2186
- otherElement.style.backgroundColor = 'transparent'; // Reset background color
2187
- }
2117
+ if (otherElement.tagName.toLowerCase() === 'lido-text') ;
2188
2118
  if (otherElement.tagName.toLowerCase() === 'lido-image') {
2189
2119
  otherElement.style.opacity = '0';
2190
2120
  otherElement.style.backgroundColor = 'transparent';
@@ -2192,9 +2122,7 @@ function handleResetDragElement(dragElement, dropElement, dropHasDrag, selectedV
2192
2122
  }
2193
2123
  }
2194
2124
  else {
2195
- if (otherElement.tagName.toLowerCase() === 'lido-text') {
2196
- otherElement.style.backgroundColor = 'transparent'; // Reset background color
2197
- }
2125
+ if (otherElement.tagName.toLowerCase() === 'lido-text') ;
2198
2126
  if (otherElement.tagName.toLowerCase() === 'lido-image') {
2199
2127
  otherElement.style.opacity = '1';
2200
2128
  otherElement.style.backgroundColor = 'transparent';
@@ -2202,6 +2130,7 @@ function handleResetDragElement(dragElement, dropElement, dropHasDrag, selectedV
2202
2130
  }
2203
2131
  });
2204
2132
  handleShowCheck();
2133
+ highlightElement();
2205
2134
  }
2206
2135
  async function onElementDropComplete(dragElement, dropElement) {
2207
2136
  var _a, _b, _c, _d, _e, _f, _g, _h;
@@ -2315,6 +2244,7 @@ async function onElementDropComplete(dragElement, dropElement) {
2315
2244
  if (isAllowOnlyOneDrop && isisFull) {
2316
2245
  isisFull.isFull = true;
2317
2246
  dropElement.setAttribute('is-full', 'true');
2247
+ highlightElement();
2318
2248
  }
2319
2249
  else {
2320
2250
  console.warn('No matching drop item found for', dropElement);
@@ -2358,20 +2288,14 @@ async function onElementDropComplete(dragElement, dropElement) {
2358
2288
  const storedTabIndexes = Object.keys(dropObject).map(Number);
2359
2289
  if (storedTabIndexes.includes(JSON.parse(otherElement.getAttribute('tab-index')))) {
2360
2290
  if (!(((_a = otherElement.getAttribute('dropAttr')) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === DropMode.Diagonal)) {
2361
- if (otherElement.tagName.toLowerCase() === 'lido-text') {
2362
- otherElement.style.border = ''; // Reset border
2363
- otherElement.style.backgroundColor = 'transparent'; // Reset background color
2364
- }
2291
+ if (otherElement.tagName.toLowerCase() === 'lido-text') ;
2365
2292
  if (otherElement.tagName.toLowerCase() === 'lido-image') {
2366
2293
  otherElement.style.opacity = '0';
2367
2294
  }
2368
2295
  }
2369
2296
  }
2370
2297
  else {
2371
- if (otherElement.tagName.toLowerCase() === 'lido-text') {
2372
- otherElement.style.border = ''; // Reset border
2373
- otherElement.style.backgroundColor = ''; // Reset background color
2374
- }
2298
+ if (otherElement.tagName.toLowerCase() === 'lido-text') ;
2375
2299
  if (otherElement.tagName.toLowerCase() === 'lido-image' || 'lido-cell') {
2376
2300
  otherElement.style.opacity = '1';
2377
2301
  }
@@ -2430,6 +2354,7 @@ async function onElementDropComplete(dragElement, dropElement) {
2430
2354
  dragElement.style.opacity = '1';
2431
2355
  const allDropElements = document.querySelectorAll('.drop-element');
2432
2356
  allDropElements.forEach(el => updateDropBorder(el));
2357
+ highlightElement();
2433
2358
  await onActivityComplete(dragElement, dropElement);
2434
2359
  }
2435
2360
  function updateDropBorder(element) {
@@ -2492,10 +2417,10 @@ async function onClickDropOrDragElement(element, type) {
2492
2417
  `;
2493
2418
  document.head.appendChild(style);
2494
2419
  }
2495
- element === null || element === void 0 ? void 0 : element.classList.add('highlight');
2420
+ element === null || element === void 0 ? void 0 : element.classList.add('highlight-element');
2496
2421
  element.ariaPressed = 'true';
2497
- const selectedDropElement = type === 'drop' ? element : document.querySelector("[type='drop'].highlight");
2498
- const selectedDragElement = type === 'drag' ? element : document.querySelector("[type='drag'].highlight");
2422
+ const selectedDropElement = type === 'drop' ? element : document.querySelector("[type='drop'].highlight-element");
2423
+ const selectedDragElement = type === 'drag' ? element : document.querySelector("[type='drag'].highlight-element");
2499
2424
  if (!selectedDropElement) {
2500
2425
  onClickDragElement(element);
2501
2426
  }
@@ -2604,6 +2529,110 @@ const reduceSizeToOriginal = () => {
2604
2529
  });
2605
2530
  };
2606
2531
 
2532
+ function removeHighlight(element) {
2533
+ element.classList.remove('highlight-element');
2534
+ element.ariaPressed = 'false';
2535
+ }
2536
+ // Function to highlight the speaking element
2537
+ function highlightSpeakingElement(element) {
2538
+ if (!element)
2539
+ return;
2540
+ // Add a custom class for highlighting
2541
+ element.classList.add('speaking-highlight');
2542
+ // Inject keyframe animation and class styles into the document's head if it doesn't already exist
2543
+ const styleId = '#speaking-highlight-style';
2544
+ if (!document.querySelector(styleId)) {
2545
+ const style = document.createElement('style');
2546
+ style.id = styleId;
2547
+ style.innerHTML = `
2548
+ .speaking-highlight {
2549
+ --base-transform: ${element.style.transform};
2550
+ box-shadow: 0 0 20px 10px rgba(255, 165, 0, 0.9) !important; /* Stronger orange glow effect */
2551
+ // border: 3px solid green !important;
2552
+ // transition: box-shadow 0.5s ease-in-out, transform 0.5s ease-in-out;
2553
+ // transform: scale(1.05); /* Subtle scale effect to pop the element */
2554
+ // animation: pulseEffect 1.5s infinite; /* Pulsing animation */
2555
+
2556
+ }
2557
+
2558
+ @keyframes pulseEffect {
2559
+ 0% {
2560
+ box-shadow: 0 0 20px 10px rgba(255, 165, 0, 0.9);
2561
+ // transform: var(--base-transform) scale(1.05);
2562
+ // background-color: #FFFF0B;
2563
+ }
2564
+ 50% {
2565
+ box-shadow: 0 0 30px 15px rgba(255, 165, 0, 1);
2566
+ // transform: var(--base-transform) scale(1.1);
2567
+ // background-color: #FFFF0B;
2568
+ }
2569
+ 100% {
2570
+ box-shadow: 0 0 20px 10px rgba(255, 165, 0, 0.9);
2571
+ // transform: var(--base-transform) scale(1.05);
2572
+ // background-color: #FFFF0B;
2573
+ }
2574
+ }
2575
+ `;
2576
+ document.head.appendChild(style);
2577
+ }
2578
+ }
2579
+ // Function to stop highlighting
2580
+ function stopHighlightForSpeakingElement(element) {
2581
+ if (!element)
2582
+ return;
2583
+ // Remove the custom class for highlighting
2584
+ element.classList.remove('speaking-highlight');
2585
+ // Remove inline styles
2586
+ // element.style.boxShadow = '';
2587
+ // element.style.border = '';
2588
+ }
2589
+ function highlightElement() {
2590
+ const container = document.querySelector(LidoContainer);
2591
+ if (!container)
2592
+ return;
2593
+ const dropElements = buildDropHasDragFromDOM();
2594
+ let firstFalse = Object.values(dropElements).find(item => !item.isFull);
2595
+ if (firstFalse) {
2596
+ const dropEls = container.querySelectorAll(`[type="drop"]`);
2597
+ dropEls.forEach(dropEl => {
2598
+ dropEl.classList.remove('highlight-element');
2599
+ });
2600
+ const dropEle = container.querySelector(`#${firstFalse.drop}`);
2601
+ if (dropEle) {
2602
+ dropEle.classList.add('highlight-element');
2603
+ }
2604
+ // Highlight corresponding drag elements if mistakes are more than 2
2605
+ const dragElements = container.querySelectorAll(`[type="drag"]`);
2606
+ if (countOfMistakes > 2) {
2607
+ dragElements.forEach(dragEl => {
2608
+ dragEl.classList.remove('highlight-element');
2609
+ if (dragEl.getAttribute('value') === dropEle.getAttribute('value')) {
2610
+ dragEl.classList.add('highlight-element');
2611
+ dragEl.classList.remove('drag-element');
2612
+ }
2613
+ });
2614
+ }
2615
+ else {
2616
+ dragElements.forEach(dragEl => {
2617
+ dragEl.classList.remove('highlight-element');
2618
+ dragEl.classList.add('drag-element');
2619
+ });
2620
+ }
2621
+ }
2622
+ else {
2623
+ if (countOfMistakes <= 2)
2624
+ return;
2625
+ const clickTemplate = container.querySelectorAll("[type='click']");
2626
+ clickTemplate.forEach(clickEl => {
2627
+ if (clickEl.getAttribute('value') === container.getAttribute('objective')) {
2628
+ if (!clickEl.classList.contains('highlight-element')) {
2629
+ clickEl.classList.add('highlight-element');
2630
+ }
2631
+ }
2632
+ });
2633
+ }
2634
+ }
2635
+
2607
2636
  class AudioPlayer {
2608
2637
  constructor() {
2609
2638
  this.audioElement = document.createElement('audio');
@@ -4687,6 +4716,7 @@ function addClickListenerForClickType(element) {
4687
4716
  if (!isInsideCalculator) {
4688
4717
  storingEachActivityScore(isCorrect);
4689
4718
  }
4719
+ highlightElement();
4690
4720
  handleShowCheck();
4691
4721
  return;
4692
4722
  }
@@ -70045,7 +70075,7 @@ const initEventsForElement = async (element, type) => {
70045
70075
  const executeActions = async (actionsString, thisElement, element) => {
70046
70076
  var _a, _b, _c, _d, _e, _f, _g;
70047
70077
  const actions = parseActions(actionsString);
70048
- body.style.pointerEvents = 'none';
70078
+ // body.style.pointerEvents = 'none';
70049
70079
  for (let i = 0; i < actions.length; i++) {
70050
70080
  const action = actions[i];
70051
70081
  const queriedElement = document.querySelector(action.actor);
@@ -70489,12 +70519,16 @@ const countPatternWords = (pattern) => {
70489
70519
  }
70490
70520
  return wordCount;
70491
70521
  };
70522
+ let countOfMistakes = 0;
70492
70523
  const storingEachActivityScore = (flag) => {
70493
70524
  if (flag) {
70494
70525
  gameScore.rightMoves += 1;
70526
+ countOfMistakes = 0;
70527
+ highlightElement();
70495
70528
  }
70496
70529
  else {
70497
70530
  gameScore.wrongMoves += 1;
70531
+ countOfMistakes += 1;
70498
70532
  }
70499
70533
  console.log('Right Moves : ', gameScore.rightMoves);
70500
70534
  console.log('Wrong Moves : ', gameScore.wrongMoves);
@@ -70540,9 +70574,7 @@ async function onActivityComplete(dragElement, dropElement) {
70540
70574
  const storedTabIndexes = Object.keys(dragScore).map(Number);
70541
70575
  if (storedTabIndexes.includes(JSON.parse(otherElement.getAttribute('tab-index')))) {
70542
70576
  if (!(((_a = otherElement.getAttribute('dropAttr')) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === DropMode.Diagonal)) {
70543
- if (otherElement.tagName.toLowerCase() === 'lido-text') {
70544
- otherElement.style.backgroundColor = 'transparent'; // Reset background color**
70545
- }
70577
+ if (otherElement.tagName.toLowerCase() === 'lido-text') ;
70546
70578
  if (otherElement.tagName.toLowerCase() === 'lido-image') {
70547
70579
  otherElement.style.opacity = '0';
70548
70580
  otherElement.style.backgroundColor = 'transparent';
@@ -70550,9 +70582,7 @@ async function onActivityComplete(dragElement, dropElement) {
70550
70582
  }
70551
70583
  }
70552
70584
  else {
70553
- if (otherElement.tagName.toLowerCase() === 'lido-text') {
70554
- otherElement.style.backgroundColor = 'transparent'; // Reset background color**********
70555
- }
70585
+ if (otherElement.tagName.toLowerCase() === 'lido-text') ;
70556
70586
  if (otherElement.tagName.toLowerCase() === 'lido-image') {
70557
70587
  otherElement.style.opacity = '1';
70558
70588
  otherElement.style.backgroundColor = 'transparent';
@@ -70678,8 +70708,10 @@ const validateObjectiveStatus = async () => {
70678
70708
  }
70679
70709
  else {
70680
70710
  const isContinueOnCorrect = container.getAttribute('is-continue-on-correct') === 'true';
70711
+ const onCorrect = container.getAttribute('onCorrect');
70681
70712
  if (!isContinueOnCorrect) {
70682
70713
  await calculateScore();
70714
+ await executeActions(onCorrect, container);
70683
70715
  triggerNextContainer();
70684
70716
  }
70685
70717
  else {
@@ -71141,10 +71173,22 @@ const animateBoxCells = async (element, value) => {
71141
71173
  await new Promise(resolve => setTimeout(resolve, 600)); // Adjust delay as needed
71142
71174
  cell.classList.remove('lido-box-highlight');
71143
71175
  }
71144
- // After all cells have come down, apply the bounce animation
71145
- for (const cell of boxCells) {
71146
- // play the text child inside cell
71147
- await AudioPlayer.getI().play(cell);
71176
+ // checkout parent cell first then pick the first text child inside cell
71177
+ const parentCell = document.getElementById(LidoContainer);
71178
+ if (!parentCell)
71179
+ return;
71180
+ const firstTextChild = parentCell.querySelector('lido-text');
71181
+ if (firstTextChild) {
71182
+ // play the text child inside parent cell
71183
+ await AudioPlayer.getI().play(firstTextChild);
71184
+ }
71185
+ // Now select each box cell's text child and play them one by one
71186
+ for (const box of boxCells) {
71187
+ const text = box.querySelector('lido-text');
71188
+ console.log('box text', text);
71189
+ if (!text)
71190
+ continue;
71191
+ await AudioPlayer.getI().play(text);
71148
71192
  }
71149
71193
  };
71150
71194
  const questionBoxAnimation = async (element, value) => {
@@ -71166,20 +71210,10 @@ const questionBoxAnimation = async (element, value) => {
71166
71210
  });
71167
71211
  // Reveal all drop childrens which is hidden
71168
71212
  const dropElements = Array.from(element.querySelectorAll("[type='drop']"));
71169
- let check = false;
71170
71213
  dropElements.forEach(dropEl => {
71171
71214
  const dropVal = dropEl.getAttribute("value");
71172
71215
  if (dropVal && dropEl.innerText.trim() === "?") {
71173
71216
  dropEl.innerText = dropVal;
71174
- if (dropElements.length > 1 && check == false) {
71175
- if (window.innerWidth > window.innerHeight) {
71176
- dropEl.style.marginRight = "-45px";
71177
- }
71178
- else {
71179
- dropEl.style.marginRight = "-65px";
71180
- }
71181
- check = true;
71182
- }
71183
71217
  }
71184
71218
  });
71185
71219
  };
@@ -71189,9 +71223,9 @@ const SumTogetherAnimation = async (element, value) => {
71189
71223
  if (!value)
71190
71224
  return;
71191
71225
  // Expecting structure: [_, TopRow, questionRow, optionRow, ...]
71192
- const TopRow = Array.from(element.children)[1];
71193
- const questionRow = Array.from(element.children)[2];
71194
- const optionRow = Array.from(element.children)[3];
71226
+ const TopRow = Array.from(element.children)[2];
71227
+ const questionRow = Array.from(element.children)[3];
71228
+ const optionRow = Array.from(element.children)[4];
71195
71229
  if (!TopRow || !questionRow || !optionRow)
71196
71230
  return;
71197
71231
  const topRowChildren = Array.from(TopRow.children);
@@ -71342,4 +71376,4 @@ const updateCalculatorAnswer = (el) => {
71342
71376
  el.setAttribute('string', value);
71343
71377
  };
71344
71378
 
71345
- export { fingerUrl as $, ActivityScoreKey as A, dispatchGameExitEvent as B, AudioPlayer as C, generateUUIDFallback as D, exitUrl as E, prevUrl as F, nextUrl as G, H, speakUrl as I, LidoContainer as J, getCancelBtnPopup as K, LIDO_COMMON_AUDIO_READY_EVENT as L, matchStringPattern as M, NextContainerKey as N, triggerNextContainer as O, PrevContainerKey as P, triggerPrevcontainer as Q, RiveService as R, SelectedValuesKey as S, setCancelBtnPopup as T, getDefaultExportFromCjs as U, tinyColor as V, DropAction as W, validateObjectiveStatus as X, fraction as Y, TraceMode as Z, speakIcon as _, setNonce as a, setPlatformOptions as b, commonjsGlobal as c, setVisibilityWithDelay as d, convertUrlToRelative as e, format as f, getAssetPath$1 as g, h, initEventsForElement as i, Host as j, parseProp as k, createEvent as l, equationCheck as m, storingEachActivityScore as n, executeActions as o, proxyCustomElement as p, calculateScore as q, handlingChildElements as r, setAssetPath as s, attachSpeakIcon as t, LIDO_COMMON_AUDIO_PATH as u, calculateScale as v, handleFloatElementPosition as w, handleElementClick as x, dispatchActivityChangeEvent as y, dispatchGameCompletedEvent as z };
71379
+ export { TraceMode as $, ActivityScoreKey as A, dispatchGameCompletedEvent as B, dispatchGameExitEvent as C, AudioPlayer as D, generateUUIDFallback as E, exitUrl as F, prevUrl as G, H, nextUrl as I, speakUrl as J, LidoContainer as K, LIDO_COMMON_AUDIO_READY_EVENT as L, getCancelBtnPopup as M, NextContainerKey as N, matchStringPattern as O, PrevContainerKey as P, triggerNextContainer as Q, RiveService as R, SelectedValuesKey as S, TemplateID as T, triggerPrevcontainer as U, setCancelBtnPopup as V, getDefaultExportFromCjs as W, tinyColor as X, DropAction as Y, validateObjectiveStatus as Z, fraction as _, setNonce as a, speakIcon as a0, fingerUrl as a1, setPlatformOptions as b, commonjsGlobal as c, setVisibilityWithDelay as d, convertUrlToRelative as e, format as f, getAssetPath$1 as g, h, initEventsForElement as i, Host as j, parseProp as k, createEvent as l, equationCheck as m, storingEachActivityScore as n, executeActions as o, proxyCustomElement as p, calculateScore as q, handlingChildElements as r, setAssetPath as s, attachSpeakIcon as t, LIDO_COMMON_AUDIO_PATH as u, calculateScale as v, highlightElement as w, handleFloatElementPosition as x, handleElementClick as y, dispatchActivityChangeEvent as z };
@@ -1,4 +1,4 @@
1
- import { p as proxyCustomElement, H, e as convertUrlToRelative, d as setVisibilityWithDelay, i as initEventsForElement, k as parseProp, Y as fraction, h, j as Host } from './p-0712a27e.js';
1
+ import { p as proxyCustomElement, H, e as convertUrlToRelative, d as setVisibilityWithDelay, i as initEventsForElement, k as parseProp, _ as fraction, h, j as Host } from './p-3513b1f3.js';
2
2
 
3
3
  const lidoSlideFillCss = ".svg-element,svg{width:100%;height:100%}";
4
4
  const LidoSlideFillStyle0 = lidoSlideFillCss;
@@ -194,7 +194,7 @@ const LidoSlideFill = /*@__PURE__*/ proxyCustomElement(class LidoSlideFill exten
194
194
  }
195
195
  }
196
196
  render() {
197
- return (h(Host, { key: '12b0ded699dde182bca178f2a58e5dea40536f18', 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: '623f23b8b00bd4d83e99eb264dbb810aaf990ddd', innerHTML: this.svgContent, class: "svg-element" })));
197
+ return (h(Host, { key: '9addda03d3a509cb0b23e88c59ad22c64dcd0044', 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: 'e0d62ba6795bf0ac28e9e6b7dee5df04c2015ed5', innerHTML: this.svgContent, class: "svg-element" })));
198
198
  }
199
199
  get el() { return this; }
200
200
  static get watchers() { return {
@@ -1,4 +1,4 @@
1
- import { p as proxyCustomElement, H, Z as TraceMode, e as convertUrlToRelative, d as setVisibilityWithDelay, _ as speakIcon, n as storingEachActivityScore, o as executeActions, q as calculateScore, O as triggerNextContainer, J as LidoContainer, k as parseProp, h, j as Host, $ as fingerUrl } from './p-0712a27e.js';
1
+ import { p as proxyCustomElement, H, $ as TraceMode, e as convertUrlToRelative, d as setVisibilityWithDelay, a0 as speakIcon, n as storingEachActivityScore, o as executeActions, q as calculateScore, Q as triggerNextContainer, K as LidoContainer, k as parseProp, h, j as Host, a1 as fingerUrl } from './p-3513b1f3.js';
2
2
 
3
3
  const lidoTraceCss = ":host{display:block;position:relative}#lido-svgContainer{display:flex;justify-content:center;align-items:center;overflow:hidden}svg{width:100%;height:100%;touch-action:none}#lido-draggableCircle{cursor:pointer;fill:#CF1565;transition:fill 0.2s, r 0.2s}.lido-blindTracing{stroke:none !important}.lido-blindFreeTrace{stroke:none !important}.lido-hovered{cursor:grab;fill:darkred}#lido-controls{position:fixed;bottom:0;left:0;right:0;display:flex;justify-content:space-between;padding:10px;background-color:#f0f0f0;border-top:1px solid #ccc}button{padding:10px;font-size:16px}@media (max-width: 600px){button{padding:8px;font-size:14px}}.lido-trace-path-green{}.lido-flow-indicator{stroke:blue;stroke-width:2;stroke-dasharray:6, 6;fill:none}.lido-trace{height:700px;width:700px;z-index:1;justify-items:center;align-content:center}.trace-animate{animation:trace-bounce 0.5s}@keyframes trace-bounce{0%{transform:scale(1)}30%{transform:scale(1.05)}60%{transform:scale(0.95)}100%{transform:scale(1)}}";
4
4
  const LidoTraceStyle0 = lidoTraceCss;
@@ -332,7 +332,7 @@ const LidoTrace = /*@__PURE__*/ proxyCustomElement(class LidoTrace extends H {
332
332
  circle.setAttribute('cx', firstPathStart.x.toString());
333
333
  circle.setAttribute('cy', firstPathStart.y.toString());
334
334
  circle.setAttribute('r', `calc(20)`); // Radius of the draggable circle
335
- circle.setAttribute('fill', '#CF1565'); // fill the color for the circle
335
+ circle.setAttribute('fill', '#CF1565'); // fill the color for the circle
336
336
  (_a = state.svg) === null || _a === void 0 ? void 0 : _a.appendChild(circle);
337
337
  state.circle = circle;
338
338
  this.resetIdleTimer(state); // ← start idle timer once the SVG is ready
@@ -460,9 +460,7 @@ const LidoTrace = /*@__PURE__*/ proxyCustomElement(class LidoTrace extends H {
460
460
  state.currentFreePath[state.currentPathIndex] = newPolyline;
461
461
  // Store points array for this polyline
462
462
  state.currentFreePolylinePoints = state.currentFreePolylinePoints || [];
463
- state.currentFreePolylinePoints[state.currentPathIndex] = [
464
- { x: pointerPos.x, y: pointerPos.y }
465
- ];
463
+ state.currentFreePolylinePoints[state.currentPathIndex] = [{ x: pointerPos.x, y: pointerPos.y }];
466
464
  // Reset lastPointerPos for the new path
467
465
  state.lastPointerPos = pointerPos;
468
466
  // Add a points counter to limit path growth
@@ -633,6 +631,8 @@ const LidoTrace = /*@__PURE__*/ proxyCustomElement(class LidoTrace extends H {
633
631
  await new Promise(resolve => setTimeout(resolve, delay));
634
632
  this.currentSvgIndex++;
635
633
  await this.initializeSVG();
634
+ const svgContainer = document.getElementById('lido-svgContainer');
635
+ svgContainer.style.visibility = 'visible';
636
636
  this.moving = false;
637
637
  return;
638
638
  }
@@ -807,7 +807,18 @@ const LidoTrace = /*@__PURE__*/ proxyCustomElement(class LidoTrace extends H {
807
807
  // Highlight the current letter keeping the previous ones highlighted
808
808
  const letter = letters[index];
809
809
  if (letter) {
810
- letter.classList.add('letter-highlight');
810
+ const svgContainer = traceElement.querySelector('#lido-svgContainer');
811
+ await executeActions("this.alignMatch='true';", textElem, svgContainer);
812
+ svgContainer.style.animation = 'trace-animation 0.4s forwards';
813
+ svgContainer.style.setProperty('--trace-width', `${letter.offsetWidth - 5}px`);
814
+ svgContainer.style.setProperty('--trace-height', `${letter.offsetHeight - 5}px`);
815
+ await executeActions("this.alignMatch='true';", letter, svgContainer);
816
+ setTimeout(() => {
817
+ letter.classList.add('letter-highlight');
818
+ svgContainer.style.transform = '';
819
+ svgContainer.style.animation = '';
820
+ svgContainer.style.visibility = 'hidden';
821
+ }, 500);
811
822
  if (this.audioUrls[this.currentSvgIndex]) {
812
823
  console.log('Playing audio:', this.audioUrls[this.currentSvgIndex]);
813
824
  const audio = new Audio(convertUrlToRelative(this.audioUrls[this.currentSvgIndex]));
@@ -842,7 +853,7 @@ const LidoTrace = /*@__PURE__*/ proxyCustomElement(class LidoTrace extends H {
842
853
  };
843
854
  }
844
855
  render() {
845
- return (h(Host, { key: 'aef0bf373de0c1d6ac49e7782838d9679c2b093f', class: "lido-trace", id: this.id, audio: this.audio, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, tabindex: this.tabIndex, "disable-speak": this.disableSpeak }, h("div", { key: 'f5223ad78568213f7965b3ea7eeb56b1b965fe78', style: this.style, id: "lido-svgContainer" })));
856
+ return (h(Host, { key: 'b3efc3effa7fbfdb85af80103e2c04689bdd4ef7', class: "lido-trace", id: this.id, audio: this.audio, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, tabindex: this.tabIndex, "disable-speak": this.disableSpeak }, h("div", { key: 'b5a5ac42a3417441940de75cd4e2dfdbe1dc7c47', style: this.style, id: "lido-svgContainer" })));
846
857
  }
847
858
  static get assetsDirs() { return ["svg", "images"]; }
848
859
  get el() { return this; }
@@ -1,5 +1,5 @@
1
- import { p as proxyCustomElement, H, S as SelectedValuesKey, J as LidoContainer, o as executeActions, O as triggerNextContainer, w as handleFloatElementPosition, n as storingEachActivityScore, W as DropAction, k as parseProp, h, j as Host } from './p-0712a27e.js';
2
- import { d as defineCustomElement$1 } from './p-7ab0a273.js';
1
+ import { p as proxyCustomElement, H, S as SelectedValuesKey, K as LidoContainer, o as executeActions, Q as triggerNextContainer, x as handleFloatElementPosition, n as storingEachActivityScore, Y as DropAction, k as parseProp, h, j as Host } from './p-3513b1f3.js';
2
+ import { d as defineCustomElement$1 } from './p-2bb1f74d.js';
3
3
 
4
4
  const lidoKeyboardCss = ".lido-keyboard{display:flex;flex-direction:column;align-items:center;gap:30px}.input-area{display:flex;gap:15px}input[type=\"text\"]{font-size:30px;font-weight:600;padding-left:20px;width:300px;height:70px;border:2px solid;background:whitesmoke;border-radius:20px;text-align:center}.keyboard-wrapper{justify-content:center;width:700px}.disabled{opacity:0.5;pointer-events:none}.key-button{background:aquamarine;font-weight:600}";
5
5
  const LidoKeyboardStyle0 = lidoKeyboardCss;
@@ -118,10 +118,10 @@ const LidoKeyboard = /*@__PURE__*/ proxyCustomElement(class LidoKeyboard extends
118
118
  const keysArray = this.keys.split(',').map(k => k.trim());
119
119
  const container = document.getElementById(LidoContainer);
120
120
  const showCheck = container.getAttribute('show-check') === 'true';
121
- return (h(Host, { key: '030937c20c1e5652a528e9f5e3335faafe18fff1', class: "lido-keyboard", style: { width: this.style.width, height: this.style.height, position: 'relative', margin: this.style.margin, zIndex: this.z } }, this.keyboardInput && (h("div", { key: '4c928db14ba00f8aa20dcdb9e220f0486949e861', class: "input-area" }, h("input", { key: 'f8db5e6f76aba08fb5893fd3fff7e6739dd5f854', type: "text", value: this.inputString, class: "input-area", readonly: true, onInput: (e) => (this.inputString = e.target.value) }), h("lido-text", { key: '58156eabbdd1fe9d06fa0ff3e192ab0f434fcd9e', visible: showCheck ? 'true' : 'false', string: "<<", "bg-color": "black", "font-color": "white", "border-radius": "20px", "font-size": "30px", width: "100px", height: "70px", type: "click", onClick: () => {
121
+ return (h(Host, { key: 'd57a587171b8525147e31228779e8503f5b7e854', class: "lido-keyboard", style: { width: this.style.width, height: this.style.height, position: 'relative', margin: this.style.margin, zIndex: this.z } }, this.keyboardInput && (h("div", { key: 'bc4242fca443e2fe0821b6b5e3559bfdf231ab30', class: "input-area" }, h("input", { key: '046989156e5f4c61d52d187c74570a95d8ebe6ab', type: "text", value: this.inputString, class: "input-area", readonly: true, onInput: (e) => (this.inputString = e.target.value) }), h("lido-text", { key: '72ab0afbebb9789c5cde9ed7624ef22bae5d2901', visible: showCheck ? 'true' : 'false', string: "<<", "bg-color": "black", "font-color": "white", "border-radius": "20px", "font-size": "30px", width: "100px", height: "70px", type: "click", onClick: () => {
122
122
  this.inputString = this.inputString.slice(0, -1);
123
123
  this.inputValidation(event);
124
- } }), h("lido-text", { key: '79538fe14d2645dc7ae62f4e24da2300a680b1cc', visible: showCheck ? 'true' : 'false', id: "lido-checkButton", string: "Enter", "bg-color": "green", "font-color": "white", "border-radius": "20px", "font-size": "30px", width: "150px", height: "70px", type: "click" }))), this.letterLength && (h("lido-text", { key: '0d09084f44fe8a69e19006daccd1029e291b43e5', visible: "true", string: `${this.numberOfClick}/${this.letterLength}`, "font-size": "60px", "font-color": "white", onEntry: "this.position='absolute'; this.right='0'; this.fontWeight='800';", x: "unset" })), h("div", { key: '9b2686af38ffed8e792f93f8302f01d59dbd2748', class: "keyboard-wrapper", style: {
124
+ } }), h("lido-text", { key: 'b6028375fb0e56b3c32821894f199e2c96726261', visible: showCheck ? 'true' : 'false', id: "lido-checkButton", string: "Enter", "bg-color": "green", "font-color": "white", "border-radius": "20px", "font-size": "30px", width: "150px", height: "70px", type: "click" }))), this.letterLength && (h("lido-text", { key: 'f9b109fe36a6e0fcef459bdaf69ccbad6f827fc9', visible: "true", string: `${this.numberOfClick}/${this.letterLength}`, "font-size": "60px", "font-color": "white", onEntry: "this.position='absolute'; this.right='0'; this.fontWeight='800';", x: "unset" })), h("div", { key: '1a3047db0048f49429bd344625a15d3c94b173d4', class: "keyboard-wrapper", style: {
125
125
  display: 'flex',
126
126
  flexWrap: 'wrap',
127
127
  justifyContent: 'center',
@@ -1,4 +1,4 @@
1
- import { p as proxyCustomElement, H, i as initEventsForElement, k as parseProp, h, j as Host } from './p-0712a27e.js';
1
+ import { p as proxyCustomElement, H, i as initEventsForElement, k as parseProp, h, j as Host } from './p-3513b1f3.js';
2
2
 
3
3
  const lidoPosCss = ".lido-pos{top:var(--y, 0);left:var(--x, 0);height:var(--height, 100%);width:var(--width, 100%);background-color:var(--bgColor, #eeeeee);display:flex;justify-content:space-around;flex-direction:column;position:fixed}.lido-pos>*{position:absolute}";
4
4
  const LidoPosStyle0 = lidoPosCss;
@@ -64,7 +64,7 @@ const LidoPos = /*@__PURE__*/ proxyCustomElement(class LidoPos extends H {
64
64
  };
65
65
  }
66
66
  render() {
67
- 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' })));
67
+ return (h(Host, { key: '0ab10d21eccd24db07fb6b87d21f75be32801013', 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: '11a3f2fc1b08007601879c9cae2f2736dd511499' })));
68
68
  }
69
69
  get el() { return this; }
70
70
  static get style() { return LidoPosStyle0; }