lido-player 0.0.2-alpha-58-dev → 0.0.2-alpha-60-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 (153) hide show
  1. package/dist/cjs/index.cjs.js +1 -1
  2. package/dist/cjs/lido-avatar_22.cjs.entry.js +96 -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-470fe410.js → utils-28faa755.js} +142 -108
  6. package/dist/collection/components/container/lido-container.js +62 -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/imageMatch/imageMatch.stories.js +79 -0
  26. package/dist/collection/stories/Templates/matchBox/matchBox2.stories.js +74 -44
  27. package/dist/collection/stories/Templates/matchingCard/matching-card.stories.js +4 -4
  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/palEgmaCalculateSum/palEgmaMultiOption.stories.js +106 -0
  33. package/dist/collection/stories/Templates/palEgmaCalculateSum/palEgmaSumTogether.stories.js +89 -0
  34. package/dist/collection/stories/Templates/palEgmaPatternMatching/palEgmaPatternMatching.stories.js +86 -0
  35. package/dist/collection/stories/Templates/palEgmaWordProblem/palEgmaWordProblem.stories.js +131 -0
  36. package/dist/collection/stories/Templates/palEgraInventedSpelling/pal_egra_invented_spelling_schema.stories.js +61 -0
  37. package/dist/collection/stories/Templates/palEgraMCQWithImage/palEgraMCQWithImage.stories.js +87 -0
  38. package/dist/collection/stories/Templates/palEgraOptionWithAudio/palEgraOptionWithAudio.stories.js +98 -0
  39. package/dist/collection/stories/Templates/palEgraStoryMaking/pal_egra_story_making.stories.js +72 -0
  40. package/dist/collection/stories/Templates/palEgraTemplate1/palEgraLetterIdentification.stories.js +61 -0
  41. package/dist/collection/stories/Templates/palEgra_OddOneOut/palEgra_oddOneOut.stories.js +60 -0
  42. package/dist/collection/stories/Templates/palEgra_arrange_pictures/palEgra_arrange_pictures.stories.js +78 -0
  43. package/dist/collection/stories/Templates/palEgra_build_word/palEgra_build_word.stories.js +78 -0
  44. package/dist/collection/stories/Templates/palEgra_word_formation/palEgra_WordFormation.stories.js +73 -0
  45. package/dist/collection/stories/Templates/palStorytale/palStorytale.stories.js +35 -0
  46. package/dist/collection/stories/Templates/pictureClues/pictureClues.stories.js +88 -0
  47. package/dist/collection/stories/Templates/pictureWordMatch/pictureWordMatch1.stories.js +88 -0
  48. package/dist/collection/stories/Templates/pictureWordMatch/pictureWordMatch2.stories.js +66 -0
  49. package/dist/collection/stories/Templates/picturemeaning/pictureMeaningCocos.stories.js +1 -1
  50. package/dist/collection/stories/Templates/quizMaths/quizMaths.stories.js +7 -7
  51. package/dist/collection/stories/Templates/rowBlocks/rowBlocks.stories.js +1 -1
  52. package/dist/collection/stories/Templates/sequenceBox/sequenceBox1.stories.js +2 -2
  53. package/dist/collection/stories/Templates/sequenceBox/sequenceBox2.stories.js +2 -2
  54. package/dist/collection/stories/Templates/substraction/substractionWithimg.stories.js +111 -0
  55. package/dist/collection/stories/Templates/substraction/substractionWithoutImg.stories.js +70 -0
  56. package/dist/collection/stories/Templates/total/total.stories.js +2 -0
  57. package/dist/collection/stories/Templates/wordBuilding/wordBuildingwithimg.stories.js +76 -0
  58. package/dist/collection/stories/Templates/wordBuilding/wordBuildingwithoutimg.stories.js +74 -0
  59. package/dist/collection/stories/Templates/writeSet/writeSet.stories.js +1 -1
  60. package/dist/collection/utils/constants.js +2 -1
  61. package/dist/collection/utils/utils.js +10 -4
  62. package/dist/collection/utils/utilsHandlers/clickHandler.js +2 -0
  63. package/dist/collection/utils/utilsHandlers/dragDropHandler.js +25 -21
  64. package/dist/collection/utils/utilsHandlers/highlightHandler.js +50 -2
  65. package/dist/collection/utils/utilsHandlers/lidoBalanceHandler.js +5 -4
  66. package/dist/components/index.js +1 -1
  67. package/dist/components/lido-avatar.js +1 -1
  68. package/dist/components/lido-balance.js +1 -1
  69. package/dist/components/lido-calculator.js +1 -1
  70. package/dist/components/lido-canvas.js +1 -1
  71. package/dist/components/lido-cell.js +1 -1
  72. package/dist/components/lido-col.js +1 -1
  73. package/dist/components/lido-container.js +1 -1
  74. package/dist/components/lido-flash-card.js +1 -1
  75. package/dist/components/lido-float.js +1 -1
  76. package/dist/components/lido-home.js +1 -1
  77. package/dist/components/lido-image.js +1 -1
  78. package/dist/components/lido-keyboard.js +1 -1
  79. package/dist/components/lido-math-matrix.js +1 -1
  80. package/dist/components/lido-pos.js +1 -1
  81. package/dist/components/lido-random.js +1 -1
  82. package/dist/components/lido-root.js +22 -23
  83. package/dist/components/lido-row.js +1 -1
  84. package/dist/components/lido-shape.js +1 -1
  85. package/dist/components/lido-slide-fill.js +1 -1
  86. package/dist/components/lido-text.js +1 -1
  87. package/dist/components/lido-trace.js +1 -1
  88. package/dist/components/lido-wrap.js +1 -1
  89. package/dist/components/{p-ee4759de.js → p-06cecca5.js} +2 -2
  90. package/dist/components/{p-17cdbc3d.js → p-16604098.js} +1 -1
  91. package/dist/components/{p-6953efe0.js → p-235091a1.js} +141 -109
  92. package/dist/components/{p-bc7835fc.js → p-32c89979.js} +18 -7
  93. package/dist/components/{p-822b692a.js → p-354f7b19.js} +2 -2
  94. package/dist/components/{p-73e3f0f4.js → p-37c86a94.js} +203 -1
  95. package/dist/components/{p-53a7d4cb.js → p-3acada8c.js} +1 -1
  96. package/dist/components/{p-984ef5d1.js → p-3acd9a2e.js} +2 -2
  97. package/dist/components/{p-6f451328.js → p-4d01394c.js} +1 -1
  98. package/dist/components/{p-c62da3ed.js → p-57400ebc.js} +1 -1
  99. package/dist/components/{p-cfde157c.js → p-5e7c6afa.js} +2 -2
  100. package/dist/components/{p-f36d02e9.js → p-74c270d2.js} +4 -4
  101. package/dist/components/{p-9eb8593c.js → p-8a32f7cb.js} +3 -3
  102. package/dist/components/{p-0fa0ada9.js → p-8c0667eb.js} +2 -2
  103. package/dist/components/{p-9c7f08c4.js → p-8f082c62.js} +11 -2
  104. package/dist/components/{p-8c526c86.js → p-93acfbb2.js} +2 -2
  105. package/dist/components/{p-97ddbda4.js → p-a182c9a2.js} +2 -2
  106. package/dist/components/{p-348f95ba.js → p-b151457d.js} +47 -6
  107. package/dist/components/{p-d0c4d5a7.js → p-b867548e.js} +2 -2
  108. package/dist/components/{p-6f91a337.js → p-c90d92db.js} +2 -2
  109. package/dist/components/{p-67d97edc.js → p-db2a05f5.js} +3 -3
  110. package/dist/components/{p-f729ff82.js → p-de45dcab.js} +41 -33
  111. package/dist/esm/index.js +1 -1
  112. package/dist/esm/lido-avatar_22.entry.js +96 -34
  113. package/dist/esm/lido-player.js +1 -1
  114. package/dist/esm/loader.js +1 -1
  115. package/dist/esm/{utils-d0f004f8.js → utils-2edeb213.js} +141 -109
  116. package/dist/lido-player/index.esm.js +1 -1
  117. package/dist/lido-player/lido-player.css +1 -1
  118. package/dist/lido-player/lido-player.esm.js +1 -1
  119. package/dist/lido-player/p-280e3d34.entry.js +1 -0
  120. package/dist/lido-player/{p-bde62361.js → p-add7f36e.js} +2 -2
  121. package/dist/types/components/container/lido-container.d.ts +15 -2
  122. package/dist/types/components/trace/lido-trace.d.ts +3 -3
  123. package/dist/types/components.d.ts +10 -2
  124. package/dist/types/stories/Templates/imageMatch/imageMatch.stories.d.ts +4 -0
  125. package/dist/types/stories/Templates/numberIdentification/numberIdentificationimageTotext.stories.d.ts +4 -0
  126. package/dist/types/stories/Templates/numberIdentification/numberIdentificationtextTotext.stories.d.ts +4 -0
  127. package/dist/types/stories/Templates/palEgmaCalculateSum/palEgmaMultiOption.stories.d.ts +11 -0
  128. package/dist/types/stories/Templates/palEgmaCalculateSum/palEgmaSumTogether.stories.d.ts +12 -0
  129. package/dist/types/stories/Templates/palEgmaPatternMatching/palEgmaPatternMatching.stories.d.ts +4 -0
  130. package/dist/types/stories/Templates/palEgmaWordProblem/palEgmaWordProblem.stories.d.ts +5 -0
  131. package/dist/types/stories/Templates/palEgraInventedSpelling/pal_egra_invented_spelling_schema.stories.d.ts +4 -0
  132. package/dist/types/stories/Templates/palEgraMCQWithImage/palEgraMCQWithImage.stories.d.ts +4 -0
  133. package/dist/types/stories/Templates/palEgraOptionWithAudio/palEgraOptionWithAudio.stories.d.ts +4 -0
  134. package/dist/types/stories/Templates/palEgraStoryMaking/pal_egra_story_making.stories.d.ts +4 -0
  135. package/dist/types/stories/Templates/palEgraTemplate1/palEgraLetterIdentification.stories.d.ts +4 -0
  136. package/dist/types/stories/Templates/palEgra_OddOneOut/palEgra_oddOneOut.stories.d.ts +4 -0
  137. package/dist/types/stories/Templates/palEgra_arrange_pictures/palEgra_arrange_pictures.stories.d.ts +4 -0
  138. package/dist/types/stories/Templates/palEgra_build_word/palEgra_build_word.stories.d.ts +4 -0
  139. package/dist/types/stories/Templates/palEgra_word_formation/palEgra_WordFormation.stories.d.ts +4 -0
  140. package/dist/types/stories/Templates/palStorytale/palStorytale.stories.d.ts +4 -0
  141. package/dist/types/stories/Templates/pictureClues/pictureClues.stories.d.ts +4 -0
  142. package/dist/types/stories/Templates/pictureWordMatch/pictureWordMatch1.stories.d.ts +4 -0
  143. package/dist/types/stories/Templates/pictureWordMatch/pictureWordMatch2.stories.d.ts +4 -0
  144. package/dist/types/stories/Templates/substraction/substractionWithimg.stories.d.ts +4 -0
  145. package/dist/types/stories/Templates/substraction/substractionWithoutImg.stories.d.ts +4 -0
  146. package/dist/types/stories/Templates/wordBuilding/wordBuildingwithimg.stories.d.ts +4 -0
  147. package/dist/types/stories/Templates/wordBuilding/wordBuildingwithoutimg.stories.d.ts +4 -0
  148. package/dist/types/utils/constants.d.ts +9 -1
  149. package/dist/types/utils/utils.d.ts +1 -0
  150. package/dist/types/utils/utilsHandlers/highlightHandler.d.ts +1 -0
  151. package/package.json +1 -1
  152. package/dist/components/p-0e645e5b.js +0 -204
  153. package/dist/lido-player/p-06248bc2.entry.js +0 -1
@@ -1,6 +1,8 @@
1
1
  import { Host, h } from "@stencil/core";
2
2
  import { convertUrlToRelative, initEventsForElement, calculateScale } from "../../utils/utils";
3
3
  import i18next from "../../utils/i18n";
4
+ import { highlightElement } from "../../utils/utilsHandlers/highlightHandler";
5
+ import { TemplateID } from "../../utils/constants";
4
6
  /**
5
7
  * @component LidoContainer
6
8
  *
@@ -48,6 +50,9 @@ export class LidoContainer {
48
50
  this.showNextButton = 'false';
49
51
  this.delayVisible = '';
50
52
  this.disableSpeak = false;
53
+ this.templateId = '';
54
+ this.instructName = '';
55
+ this.speakFlag = false;
51
56
  }
52
57
  languageChanged(newLang) {
53
58
  const langToApply = newLang || this.resolveLanguage();
@@ -56,6 +61,25 @@ export class LidoContainer {
56
61
  componentWillLoad() {
57
62
  const langToApply = this.resolveLanguage();
58
63
  this.updateChildTextLanguage(langToApply);
64
+ this.resolveInstructionAudio();
65
+ }
66
+ resolveInstructionAudio() {
67
+ var _a;
68
+ this.instructName =
69
+ (_a = {
70
+ flashcard: "Review the flashcards to reinforce your learning." /* templateAudio.flashcards */,
71
+ mcq: "Select the correct answer from the options provided." /* templateAudio.mcq */,
72
+ tracing: "Trace the shape by following the outline carefully." /* templateAudio.tracing */,
73
+ dragAndDrop: "Match the items by dragging and dropping them into the correct places." /* templateAudio.dragAndDrop */,
74
+ }[this.templateId]) !== null && _a !== void 0 ? _a : '';
75
+ const home = document.querySelector('lido-home');
76
+ if (!home)
77
+ return;
78
+ const existing = home.getAttribute(TemplateID) || '';
79
+ this.speakFlag = existing.includes(this.templateId);
80
+ if (!this.speakFlag) {
81
+ home.setAttribute(TemplateID, [existing, this.templateId].filter(Boolean).join(','));
82
+ }
59
83
  }
60
84
  resolveLanguage() {
61
85
  var _a, _b;
@@ -161,7 +185,15 @@ export class LidoContainer {
161
185
  // Re-scale the container on window resize or load events
162
186
  window.addEventListener('resize', () => this.scaleContainer(this.el));
163
187
  window.addEventListener('load', () => this.scaleContainer(this.el));
164
- initEventsForElement(this.el, this.type);
188
+ if (this.templateId) {
189
+ setTimeout(() => {
190
+ this.el.setAttribute("onEntry", `${this.templateId}.speak='${!this.speakFlag}'; ` + this.el.getAttribute("onEntry"));
191
+ initEventsForElement(this.el, this.type);
192
+ }, 100);
193
+ }
194
+ else {
195
+ initEventsForElement(this.el, this.type);
196
+ }
165
197
  if (this.customStyle) {
166
198
  const styleElement = document.createElement('style');
167
199
  styleElement.innerHTML = this.customStyle;
@@ -169,6 +201,9 @@ export class LidoContainer {
169
201
  }
170
202
  const langToApply = this.resolveLanguage();
171
203
  this.updateChildTextLanguage(langToApply);
204
+ setTimeout(() => {
205
+ highlightElement();
206
+ }, 100);
172
207
  }
173
208
  disconnectedCallback() {
174
209
  window.removeEventListener('resize', () => this.scaleContainer(this.el));
@@ -188,7 +223,7 @@ export class LidoContainer {
188
223
  userSelect: 'none', // Prevent any field selection
189
224
  };
190
225
  console.log('🚀 ~ LidoContainer ~ canplay:', this.canplay);
191
- return (h(Host, { key: '338ef0be8cc9d052764785ce9314254be7c8a7f8', id: "lido-container", locale: this.locale, "tab-index": 0, class: "lido-container", objective: this.objective, baseUrl: this.baseUrl, style: style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, onTouch: this.onTouch, onInCorrect: this.onInCorrect, onCorrect: this.onCorrect, onEntry: this.onEntry, "show-check": `${this.showCheck}`, "is-continue-on-correct": `${this.isContinueOnCorrect}`, "is-allow-only-correct": `${this.isAllowOnlyCorrect}`, canplay: `${this.canplay}`, appendToDropOnCompletion: `${this.appendToDropOnCompletion}`, "show-prev-button": `${this.showPrevButton}`, "show-next-button": `${this.showNextButton}`, "show-drop-border": `${this.showDropBorder}`, "bg-image": this.bgImage, "exit-button-url": this.exitButtonUrl, "prev-button-url": this.prevButtonUrl, "next-button-url": this.nextButtonUrl, "speaker-button-url": this.speakerButtonUrl, "disable-speak": this.disableSpeak }, h("slot", { key: '59d66b47f4749a99ece4da48dbaebaf720cb0b2b' })));
226
+ return (h(Host, { key: 'bdae7c7d24046fc0f726668b9b1bbb84f3ddd3dd', id: "lido-container", locale: this.locale, "tab-index": 0, class: "lido-container", objective: this.objective, baseUrl: this.baseUrl, style: style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, onTouch: this.onTouch, onInCorrect: this.onInCorrect, onCorrect: this.onCorrect, onEntry: this.onEntry, "show-check": `${this.showCheck}`, "is-continue-on-correct": `${this.isContinueOnCorrect}`, "is-allow-only-correct": `${this.isAllowOnlyCorrect}`, canplay: `${this.canplay}`, appendToDropOnCompletion: `${this.appendToDropOnCompletion}`, "show-prev-button": `${this.showPrevButton}`, "show-next-button": `${this.showNextButton}`, "show-drop-border": `${this.showDropBorder}`, "bg-image": this.bgImage, "exit-button-url": this.exitButtonUrl, "prev-button-url": this.prevButtonUrl, "next-button-url": this.nextButtonUrl, "speaker-button-url": this.speakerButtonUrl, "disable-speak": this.disableSpeak, "template-id": this.templateId, audio: this.audio }, h("lido-text", { key: 'aa5d73493b429f0d99c5737aed89488c565e1699', visible: "false", id: this.templateId, audio: "", string: this.instructName }), h("slot", { key: 'd251b1fed4468aabd66a6f6c14b3de234329ab64' })));
192
227
  }
193
228
  static get is() { return "lido-container"; }
194
229
  static get originalStyleUrls() {
@@ -877,14 +912,38 @@ export class LidoContainer {
877
912
  "optional": false,
878
913
  "docs": {
879
914
  "tags": [],
880
- "text": "When set to true, disables the speak functionality of long press for this component and its children."
915
+ "text": "When set to true, disables the speak functionality of long press for this component and all its child components."
881
916
  },
882
917
  "attribute": "disable-speak",
883
918
  "reflect": false,
884
919
  "defaultValue": "false"
920
+ },
921
+ "templateId": {
922
+ "type": "string",
923
+ "mutable": false,
924
+ "complexType": {
925
+ "original": "string",
926
+ "resolved": "string",
927
+ "references": {}
928
+ },
929
+ "required": false,
930
+ "optional": false,
931
+ "docs": {
932
+ "tags": [],
933
+ "text": "Identifies the template type used by this component (e.g., mcq, flashcard, tracing, dragAndDrop)."
934
+ },
935
+ "attribute": "template-id",
936
+ "reflect": false,
937
+ "defaultValue": "''"
885
938
  }
886
939
  };
887
940
  }
941
+ static get states() {
942
+ return {
943
+ "instructName": {},
944
+ "speakFlag": {}
945
+ };
946
+ }
888
947
  static get elementRef() { return "el"; }
889
948
  static get watchers() {
890
949
  return [{
@@ -67,6 +67,15 @@ export class LidoFlash {
67
67
  }
68
68
  componentDidLoad() {
69
69
  setVisibilityWithDelay(this.el, this.delayVisible);
70
+ const card = this.el.querySelector('.card');
71
+ if (card) {
72
+ setTimeout(() => {
73
+ card.classList.add('flipped');
74
+ setTimeout(() => {
75
+ card.classList.remove('flipped');
76
+ }, 500);
77
+ }, 500);
78
+ }
70
79
  initEventsForElement(this.el, this.type);
71
80
  // handlingChildElements(this.el, this.minLength, this.maxLength, this.childElementsLength, 'inline-block');
72
81
  }
@@ -76,7 +85,7 @@ export class LidoFlash {
76
85
  }
77
86
  /* ---------- Render ---------- */
78
87
  render() {
79
- return (h(Host, { key: 'b8f000d4e9d04d9954f81dc7e05b109dc16cb223', value: this.value, "tab-index": this.tabIndex, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry, type: this.type, onClick: this.handleFlip, "disable-speak": this.disableSpeak }, h("div", { key: 'cea63b67d1b6a925ab0520eaa7c5166288bcd71e', class: `card ${this.flipped ? 'flipped' : ''}` }, h("div", { key: '3517e09bb91ac4c6fb2c066539f2d4f51436938f', class: "card-face card-front" }, this.front != null ? this.front : h("slot", { name: "front" })), h("div", { key: '5a14a4ab70898852046f1128c99e5a285c1c37f7', class: "card-face card-back" }, this.back != null ? this.back : h("slot", { name: "back" })))));
88
+ return (h(Host, { key: 'feb4183de8377349b990563bf7f2e6a999d8a1c5', value: this.value, "tab-index": this.tabIndex, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry, type: this.type, onClick: this.handleFlip, "disable-speak": this.disableSpeak }, h("div", { key: 'e1a8a03fb07fba6f7d44f207a1ef7081bb188bcf', class: `card ${this.flipped ? 'flipped' : ''}` }, h("div", { key: 'fc8df309a9e6bf2b44198ca6c41c0e1a3ee6dcf9', class: "card-face card-front" }, this.front != null ? this.front : h("slot", { name: "front" })), h("div", { key: 'e707168ae9e3fc8518b635c8e10b83305f569f5c', class: "card-face card-back" }, this.back != null ? this.back : h("slot", { name: "back" })))));
80
89
  }
81
90
  static get is() { return "lido-flash-card"; }
82
91
  static get originalStyleUrls() {
@@ -57,7 +57,7 @@ export class LidoFloat {
57
57
  };
58
58
  }
59
59
  render() {
60
- return (h(Host, { key: 'e8bc37c1220b708872748bd49c2d7fc448bdd01c', class: "lido-float", "float-direction": this.floatDirection, id: this.id, "tab-index": this.tabIndex, style: this.style, onEntry: this.onEntry }, h("slot", { key: '991afa719c6fc35f489fae30f77bad81cf2b4c3e' })));
60
+ return (h(Host, { key: 'd12c96be36eb27c4b46cb2b494f1de3352634feb', class: "lido-float", "float-direction": this.floatDirection, id: this.id, "tab-index": this.tabIndex, style: this.style, onEntry: this.onEntry }, h("slot", { key: '5c2b330b5fb5c27ead76a0a9514750d4dd3ef820' })));
61
61
  }
62
62
  static get is() { return "lido-float"; }
63
63
  static get originalStyleUrls() {
@@ -1,7 +1,7 @@
1
1
  import { h, Host } from "@stencil/core";
2
- import { SelectedValuesKey, NextContainerKey, PrevContainerKey, LidoContainer, exitUrl, prevUrl, nextUrl, speakUrl, ActivityScoreKey, LIDO_COMMON_AUDIO_PATH } from "../../utils/constants";
2
+ import { SelectedValuesKey, NextContainerKey, PrevContainerKey, LidoContainer, exitUrl, prevUrl, nextUrl, speakUrl, ActivityScoreKey, LIDO_COMMON_AUDIO_PATH, TemplateID, } from "../../utils/constants";
3
3
  import { dispatchActivityChangeEvent, dispatchGameCompletedEvent, dispatchGameExitEvent } from "../../utils/customEvents";
4
- import { calculateScale, getCancelBtnPopup, setCancelBtnPopup, executeActions, triggerPrevcontainer, convertUrlToRelative, triggerNextContainer, matchStringPattern } from "../../utils/utils";
4
+ import { calculateScale, getCancelBtnPopup, setCancelBtnPopup, executeActions, triggerPrevcontainer, convertUrlToRelative, triggerNextContainer, matchStringPattern, } from "../../utils/utils";
5
5
  import { AudioPlayer } from "../../utils/audioPlayer";
6
6
  import { generateUUIDFallback } from "../../utils/utils";
7
7
  import i18next from "../../utils/i18n";
@@ -108,7 +108,7 @@ export class LidoHome {
108
108
  }
109
109
  }
110
110
  };
111
- this.commonAudioPath = undefined;
111
+ this.commonAudioPath = "";
112
112
  this.showNav = true;
113
113
  this.activeContainerIndexes = [];
114
114
  this.locale = '';
@@ -197,9 +197,9 @@ export class LidoHome {
197
197
  publishCommonAudioPath(path) {
198
198
  if (!path)
199
199
  return;
200
- const cleanPath = path.replace(/\/+$/, "");
200
+ const cleanPath = path.replace(/\/+$/, '');
201
201
  window[LIDO_COMMON_AUDIO_PATH] = cleanPath;
202
- console.log("[LidoHome] Published common audio path:", cleanPath);
202
+ console.log('[LidoHome] Published common audio path:', cleanPath);
203
203
  // Dispatch a global event so LidoText knows the path is ready
204
204
  window.dispatchEvent(new Event('lidoCommonAudioPathReady'));
205
205
  }
@@ -353,12 +353,14 @@ export class LidoHome {
353
353
  */
354
354
  parseContainers(rootElement) {
355
355
  const containerElements = rootElement.querySelectorAll('lido-container');
356
- const containers = Array.from(containerElements).map((container, index) => {
356
+ const containers = Array.from(containerElements)
357
+ .map((container, index) => {
357
358
  if (this.activeContainerIndexes.length && !this.activeContainerIndexes.includes(index))
358
359
  return;
359
360
  // Return a factory function that generates a fresh JSX node each time
360
361
  return () => this.parseElement(container);
361
- }).filter(Boolean); // Remove any undefined entries
362
+ })
363
+ .filter(Boolean); // Remove any undefined entries
362
364
  this.containers = containers;
363
365
  }
364
366
  areAllDropsFilled() {
@@ -374,6 +376,13 @@ export class LidoHome {
374
376
  await AudioPlayer.getI().stop();
375
377
  const container = document.getElementById(LidoContainer);
376
378
  const allele = container.querySelectorAll('*');
379
+ const templateId = container.getAttribute(TemplateID);
380
+ if (templateId) {
381
+ const instructEl = this.el.querySelector(`#${templateId}`);
382
+ if (instructEl) {
383
+ await executeActions("this.speak='true';", instructEl);
384
+ }
385
+ }
377
386
  for (const el of Array.from(allele)) {
378
387
  if (getCancelBtnPopup())
379
388
  break;
@@ -438,14 +447,14 @@ export class LidoHome {
438
447
  return (h("div", { id: "lido-dot-indicator", class: "lido-dot-container" }, h("div", { class: "lido-exit-button popup\r\n -button", onClick: () => {
439
448
  this.exitFlag = true;
440
449
  AudioPlayer.getI().stop();
441
- }, style: { visibility: this.showNav ? "visible" : "hidden" } }, h("lido-image", { src: this.navBarIcons.exit })), h("div", { class: "lido-btn-dot-container" }, h("div", { id: "lido-arrow-left", onClick: () => {
450
+ }, style: { visibility: this.showNav ? 'visible' : 'hidden' } }, h("lido-image", { src: this.navBarIcons.exit })), h("div", { class: "lido-btn-dot-container" }, h("div", { id: "lido-arrow-left", onClick: () => {
442
451
  triggerPrevcontainer();
443
- }, style: { visibility: this.showNav ? "visible" : "hidden" } }, h("lido-image", { src: this.navBarIcons.prev })), this.containers.map((_, index) => (h("div", { class: "parent_dots" }, h("span", { class: `lido-dot ${index < this.currentContainerIndex ? 'completed' : index === this.currentContainerIndex ? 'current' : ''}`, onClick: () => this.jumpToContainer(index), style: style })))), h("div", { id: "lido-arrow-right", onClick: event => {
452
+ }, style: { visibility: this.showNav ? 'visible' : 'hidden' } }, h("lido-image", { src: this.navBarIcons.prev })), this.containers.map((_, index) => (h("div", { class: "parent_dots" }, h("span", { class: `lido-dot ${index < this.currentContainerIndex ? 'completed' : index === this.currentContainerIndex ? 'current' : ''}`, onClick: () => this.jumpToContainer(index), style: style })))), h("div", { id: "lido-arrow-right", onClick: event => {
444
453
  console.log('Target:', event.target); // What was clicked
445
454
  console.log('Current Target:', event.currentTarget); // Where the onClick is bound
446
455
  console.log('✅ Button clicked - nextBtn action triggered');
447
456
  executeActions("this.nextBtn='true'", event.currentTarget);
448
- }, style: { visibility: this.showNav ? "visible" : "hidden" } }, h("lido-image", { src: this.navBarIcons.next }))), h("div", { id: "main-audio", class: "popup-button", onClick: () => this.btnpopup(), style: { visibility: this.showNav ? "visible" : "hidden" } }, h("lido-image", { visible: "true", src: this.navBarIcons.speak }))));
457
+ }, style: { visibility: this.showNav ? 'visible' : 'hidden' } }, h("lido-image", { src: this.navBarIcons.next }))), h("div", { id: "main-audio", class: "popup-button", onClick: () => this.btnpopup(), style: { visibility: this.showNav ? 'visible' : 'hidden' } }, h("lido-image", { visible: "true", src: this.navBarIcons.speak }))));
449
458
  }
450
459
  /**
451
460
  * Jumps to a specific container based on the index of the dot clicked.
@@ -467,7 +476,7 @@ export class LidoHome {
467
476
  const style = {
468
477
  userSelect: 'none', // Prevent any field selection
469
478
  };
470
- return (h(Host, { class: "lido-home", uuid: this.uuid, index: this.currentContainerIndex, totalIndex: this.containers.length, style: style }, h("div", { key: this.currentContainerIndex }, (_b = (_a = this.containers)[this.currentContainerIndex]) === null || _b === void 0 ? void 0 : _b.call(_a)), this.renderDots(), this.exitFlag && (h("div", { class: "lido-alert-parent" }, h("div", { class: "lido-alert-popup" }, h("lido-cell", { class: "lido-alert-content", visible: "true", layout: "col", width: "340px", height: "210px", "bg-color": "#fff", "border-radius": "16px", onEntry: "this.box-shadow= '0 4px 8px 0 rgba(0, 0, 0, 0.25)';" }, h("lido-text", { visible: "true", string: "Do you want to exit?", width: "294px", height: "38px", class: "popup-exit-text", "font-size": "22px", onEntry: "this.margin-bottom =' -36px';" }), h("lido-cell", { visible: "true", layout: "row", width: "294px", class: "btn-cell" }, h("lido-text", { visible: "true", string: "Exit", width: "92px", height: "53px", "font-size": "16px", margin: "0px 50px 0px 0px", class: "popup-button", onClick: () => this.popUpClick('exit'), borderRadius: "16px", onEntry: 'this.color="#F34D08"; this.font-weight="700"; this.box-shadow="0 2px 0 #F34D08";', fontFamily: "Baloo Bhai 2", "font-weight": "700", bgColor: "white", "border-radius": "16px" }), h("lido-text", { visible: "true", string: "Continue playing", width: "155px", height: "53px", "font-size": "16px", class: "popup-button", onClick: () => this.popUpClick('cancel'), borderRadius: "16px", onEntry: 'this.color=white; this.font-weight="700"; this.box-shadow="0 2px 0 #F34D08";', "font-family": "Baloo Bhai 2", "font-weight": "700", bgColor: "#F34D08", "border-radius": "16px" }))))))));
479
+ return (h(Host, { class: "lido-home", uuid: this.uuid, "template-id": "", index: this.currentContainerIndex, totalIndex: this.containers.length, style: style }, h("div", { key: this.currentContainerIndex }, (_b = (_a = this.containers)[this.currentContainerIndex]) === null || _b === void 0 ? void 0 : _b.call(_a)), this.renderDots(), this.exitFlag && (h("div", { class: "lido-alert-parent" }, h("div", { class: "lido-alert-popup" }, h("lido-cell", { class: "lido-alert-content", visible: "true", layout: "col", width: "340px", height: "210px", "bg-color": "#fff", "border-radius": "16px", onEntry: "this.box-shadow= '0 4px 8px 0 rgba(0, 0, 0, 0.25)';" }, h("lido-text", { visible: "true", string: "Do you want to exit?", width: "294px", height: "38px", class: "popup-exit-text", "font-size": "22px", onEntry: "this.margin-bottom =' -36px';" }), h("lido-cell", { visible: "true", layout: "row", width: "294px", class: "btn-cell" }, h("lido-text", { visible: "true", string: "Exit", width: "92px", height: "53px", "font-size": "16px", margin: "0px 50px 0px 0px", class: "popup-button", onClick: () => this.popUpClick('exit'), borderRadius: "16px", onEntry: 'this.color="#F34D08"; this.font-weight="700"; this.box-shadow="0 2px 0 #F34D08";', fontFamily: "Baloo Bhai 2", "font-weight": "700", bgColor: "white", "border-radius": "16px" }), h("lido-text", { visible: "true", string: "Continue playing", width: "155px", height: "53px", "font-size": "16px", class: "popup-button", onClick: () => this.popUpClick('cancel'), borderRadius: "16px", onEntry: 'this.color=white; this.font-weight="700"; this.box-shadow="0 2px 0 #F34D08";', "font-family": "Baloo Bhai 2", "font-weight": "700", bgColor: "#F34D08", "border-radius": "16px" }))))))));
471
480
  }
472
481
  static get is() { return "lido-home"; }
473
482
  static get originalStyleUrls() {
@@ -497,7 +506,8 @@ export class LidoHome {
497
506
  "text": ""
498
507
  },
499
508
  "attribute": "common-audio-path",
500
- "reflect": false
509
+ "reflect": false,
510
+ "defaultValue": "\"\""
501
511
  },
502
512
  "showNav": {
503
513
  "type": "boolean",
@@ -115,10 +115,10 @@ export class LidoKeyboard {
115
115
  const keysArray = this.keys.split(',').map(k => k.trim());
116
116
  const container = document.getElementById(LidoContainer);
117
117
  const showCheck = container.getAttribute('show-check') === 'true';
118
- 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: () => {
118
+ 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: () => {
119
119
  this.inputString = this.inputString.slice(0, -1);
120
120
  this.inputValidation(event);
121
- } }), 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: {
121
+ } }), 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: {
122
122
  display: 'flex',
123
123
  flexWrap: 'wrap',
124
124
  justifyContent: 'center',
@@ -187,7 +187,7 @@ export class LidoMathMatrix {
187
187
  render() {
188
188
  let slotNumber = 1;
189
189
  const slotData = this.getSlotData();
190
- return (h(Host, { key: 'bbd76954f0a4b67cd89dd10e3c26ce4f7e7712bd', class: "math-matrix", style: {
190
+ return (h(Host, { key: '3da93fe1224f166febc7da07a7ef301a66d88997', class: "math-matrix", style: {
191
191
  height: this.style.height,
192
192
  width: this.style.width,
193
193
  z: this.style.z,
@@ -66,7 +66,7 @@ export class LidoPos {
66
66
  };
67
67
  }
68
68
  render() {
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' })));
69
+ 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' })));
70
70
  }
71
71
  static get is() { return "lido-pos"; }
72
72
  static get originalStyleUrls() {
@@ -78,7 +78,7 @@ export class LidoRandom {
78
78
  backgroundColor: this.bgColor,
79
79
  margin: this.margin,
80
80
  };
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' })));
81
+ return (h(Host, { key: 'e6978f97eaac048e12c50e048a8392c1125282f9', 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: '2f513356dac9d0f6df3ab695b9fa1bcf82c379de' })));
82
82
  }
83
83
  static get is() { return "lido-random"; }
84
84
  static get originalStyleUrls() {
@@ -78,7 +78,7 @@ export class LidoRow {
78
78
  };
79
79
  }
80
80
  render() {
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' })));
81
+ return (h(Host, { key: 'ca01c603f76bc544d8660427d004c2ddb2de66ca', 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: '08ef314cd12489030c1e9d428c88cc0a76355d1d' })));
82
82
  }
83
83
  static get is() { return "lido-row"; }
84
84
  static get originalStyleUrls() {
@@ -124,7 +124,7 @@ export class LidoBalance {
124
124
  };
125
125
  }
126
126
  render() {
127
- return (h(Host, { key: 'd1da72f1bf298dd7c81b0cfefa0e9e563ccbfff1', id: "lido-balance", "bg-color": "red", onEntry: this.onEntry, class: "lido-balance", tilt: this.tilt.toString(), style: this.style, operation: this.operation.toString() }, h("div", { key: '737ab206a5156b402d4477a38567480f10419c14', innerHTML: this.pivotSvg, id: "pivotimg", class: "pivot" }), h("div", { key: '8bc60136950858d5d1b96c38ec4c0635024f8d24', innerHTML: this.scaleSvg, id: "scaleimg", class: "scale", ref: (el) => (this.scaleEl = el) }), h("div", { key: '07049a6b5c8e75d831c9287b2b4a0e633791174b', innerHTML: this.handlerSvg, id: "handlerimg", class: "handler", ref: (el) => (this.leftHandleEl = el) }), h("div", { key: '85361c27b1ab6fcc86969bfc9d4dff1df6040165', innerHTML: this.handlerSvg, id: "handimg", class: "hand", ref: (el) => (this.rightHandleEl = el) }), h("div", { key: 'c4208582bfa1b63e4381d44d9a95e9c537dfbc84', id: "balanceSymbol", class: "lido-balance-symbol", "aria-hidden": !this.showSymbol }, this.showSymbol ? this.balanceSymbol : '')));
127
+ return (h(Host, { key: 'e1cdc8aab0b18f3cc654a52a1e315ba6d708adb3', id: "lido-balance", "bg-color": "red", onEntry: this.onEntry, class: "lido-balance", tilt: this.tilt.toString(), style: this.style, operation: this.operation.toString() }, h("div", { key: '98ed1d2b6eb29e0fcf2ac656f8bb87cbe4420dfa', innerHTML: this.pivotSvg, id: "pivotimg", class: "pivot" }), h("div", { key: '8139021fec3f6d19a8fc711f02dc9e61197e5e5c', innerHTML: this.scaleSvg, id: "scaleimg", class: "scale", ref: (el) => (this.scaleEl = el) }), h("div", { key: '3f7621e16932c862ea50e3ed6e941efb3b77c292', innerHTML: this.handlerSvg, id: "handlerimg", class: "handler", ref: (el) => (this.leftHandleEl = el) }), h("div", { key: '939e0df96916eb3259e6adcefa0c9a786aeccdef', innerHTML: this.handlerSvg, id: "handimg", class: "hand", ref: (el) => (this.rightHandleEl = el) }), h("div", { key: 'c4de234c5058cb5d6bef94b1c75f67ca85ee7fc9', id: "balanceSymbol", class: "lido-balance-symbol", "aria-hidden": !this.showSymbol }, this.showSymbol ? this.balanceSymbol : '')));
128
128
  }
129
129
  static get is() { return "lido-balance"; }
130
130
  static get originalStyleUrls() {
@@ -83,8 +83,8 @@ export class LidoShape {
83
83
  backgroundColor: this.shapeType !== 'polygon' ? this.bgColor : 'transparent', // Apply background only if not a polygon
84
84
  margin: this.margin,
85
85
  };
86
- return (h(Host, { key: 'fde795dbc7c3a295a84bb1e5e74ff57cf3fe103a', class: `lido-shape ${this.shapeType}`, value: this.value, type: this.type, "tab-index": this.tabIndex, style: style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, audio: this.audio, minDrops: this.minDrops, maxDrops: this.maxDrops, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry, "disable-speak": this.disableSpeak }, this.shapeType === "lido-cube" &&
87
- h("div", { key: '620b82948d6eea342a2e00fab780696fcd2d6794', class: "cube" }, h("div", { key: 'b505a156896edd12c8d686966945168c5eb056d7', class: "face top" }), h("div", { key: '806b4d6aec720340d7a207854b20f910bb845829', class: "face bottom" }), h("div", { key: 'd2619804cabb2761e624139e33d759992d632468', class: "face left" }), h("div", { key: '3874ba7bcbe3eebc133b107a4bfefb38638eeb0f', class: "face right" }), h("div", { key: '0e19cfb0feba399b9a98336b0f6c349ff22e29ed', class: "face front" }), h("div", { key: '9b1d9d75d8897756f32bc023533eb1dc025d8e2f', class: "face back" }))));
86
+ return (h(Host, { key: '687d13d8361df73e2757dce2865ee1835804e645', class: `lido-shape ${this.shapeType}`, value: this.value, type: this.type, "tab-index": this.tabIndex, style: style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, audio: this.audio, minDrops: this.minDrops, maxDrops: this.maxDrops, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry, "disable-speak": this.disableSpeak }, this.shapeType === "lido-cube" &&
87
+ h("div", { key: 'bd9958c2095029a03eb76aef2f721e5883649dca', class: "cube" }, h("div", { key: 'bd8f4c9a4af6663dc6d642a80e3c0ebbb60471c9', class: "face top" }), h("div", { key: '0bbd21bab7efb5e91ab4067f22d9febe670748f6', class: "face bottom" }), h("div", { key: 'a3ca4f53a93994bef257b5637c2e603abc89c13e', class: "face left" }), h("div", { key: '0122526c9001632c412bbf27ac92a73f1a3bf000', class: "face right" }), h("div", { key: '5d3521dd261e79c9f3170539642be0c31e78e0b3', class: "face front" }), h("div", { key: '026145187bd4c68b8a73646c7e948ab81f75a16f', class: "face back" }))));
88
88
  }
89
89
  static get is() { return "lido-shape"; }
90
90
  static get originalStyleUrls() {
@@ -190,7 +190,7 @@ export class LidoSlideFill {
190
190
  }
191
191
  }
192
192
  render() {
193
- 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" })));
193
+ 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" })));
194
194
  }
195
195
  static get is() { return "lido-slide-fill"; }
196
196
  static get originalStyleUrls() {
@@ -149,7 +149,7 @@ export class LidoText {
149
149
  }
150
150
  }
151
151
  render() {
152
- return (h(Host, { key: '87d82cc0bf52e1eaba8f44d1bdd80c98e896ddbf', class: "lido-text", value: this.value, type: this.type, "tab-index": this.tabIndex, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry, minDrops: this.minDrops, maxDrops: this.maxDrops, id: this.id, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, "span-type": this.spanType, "disable-speak": this.disableSpeak }, this.spanType !== '' ? h("div", { class: "lido-text-content" }, " ", i18next.t(this.string)) : i18next.t(this.string)));
152
+ return (h(Host, { key: '9635bba385679026c4f90aac9467612f06a21f1b', class: "lido-text", value: this.value, type: this.type, "tab-index": this.tabIndex, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry, minDrops: this.minDrops, maxDrops: this.maxDrops, id: this.id, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, "span-type": this.spanType, "disable-speak": this.disableSpeak }, this.spanType !== '' ? h("div", { class: "lido-text-content" }, " ", i18next.t(this.string)) : i18next.t(this.string)));
153
153
  }
154
154
  static get is() { return "lido-text"; }
155
155
  static get originalStyleUrls() {
@@ -1,5 +1,5 @@
1
1
  import { h, Host } from "@stencil/core";
2
- import { convertUrlToRelative, executeActions, triggerNextContainer, speakIcon, setVisibilityWithDelay, parseProp, storingEachActivityScore, calculateScore } from "../../utils/utils";
2
+ import { convertUrlToRelative, executeActions, triggerNextContainer, speakIcon, setVisibilityWithDelay, parseProp, storingEachActivityScore, calculateScore, } from "../../utils/utils";
3
3
  import { fingerUrl, LidoContainer, TraceMode } from "../../utils/constants";
4
4
  // Enum for different tracing modes
5
5
  export class LidoTrace {
@@ -329,7 +329,7 @@ export class LidoTrace {
329
329
  circle.setAttribute('cx', firstPathStart.x.toString());
330
330
  circle.setAttribute('cy', firstPathStart.y.toString());
331
331
  circle.setAttribute('r', `calc(20)`); // Radius of the draggable circle
332
- circle.setAttribute('fill', '#CF1565'); // fill the color for the circle
332
+ circle.setAttribute('fill', '#CF1565'); // fill the color for the circle
333
333
  (_a = state.svg) === null || _a === void 0 ? void 0 : _a.appendChild(circle);
334
334
  state.circle = circle;
335
335
  this.resetIdleTimer(state); // ← start idle timer once the SVG is ready
@@ -457,9 +457,7 @@ export class LidoTrace {
457
457
  state.currentFreePath[state.currentPathIndex] = newPolyline;
458
458
  // Store points array for this polyline
459
459
  state.currentFreePolylinePoints = state.currentFreePolylinePoints || [];
460
- state.currentFreePolylinePoints[state.currentPathIndex] = [
461
- { x: pointerPos.x, y: pointerPos.y }
462
- ];
460
+ state.currentFreePolylinePoints[state.currentPathIndex] = [{ x: pointerPos.x, y: pointerPos.y }];
463
461
  // Reset lastPointerPos for the new path
464
462
  state.lastPointerPos = pointerPos;
465
463
  // Add a points counter to limit path growth
@@ -630,6 +628,8 @@ export class LidoTrace {
630
628
  await new Promise(resolve => setTimeout(resolve, delay));
631
629
  this.currentSvgIndex++;
632
630
  await this.initializeSVG();
631
+ const svgContainer = document.getElementById('lido-svgContainer');
632
+ svgContainer.style.visibility = 'visible';
633
633
  this.moving = false;
634
634
  return;
635
635
  }
@@ -804,7 +804,18 @@ export class LidoTrace {
804
804
  // Highlight the current letter keeping the previous ones highlighted
805
805
  const letter = letters[index];
806
806
  if (letter) {
807
- letter.classList.add('letter-highlight');
807
+ const svgContainer = traceElement.querySelector('#lido-svgContainer');
808
+ await executeActions("this.alignMatch='true';", textElem, svgContainer);
809
+ svgContainer.style.animation = 'trace-animation 0.4s forwards';
810
+ svgContainer.style.setProperty('--trace-width', `${letter.offsetWidth - 5}px`);
811
+ svgContainer.style.setProperty('--trace-height', `${letter.offsetHeight - 5}px`);
812
+ await executeActions("this.alignMatch='true';", letter, svgContainer);
813
+ setTimeout(() => {
814
+ letter.classList.add('letter-highlight');
815
+ svgContainer.style.transform = '';
816
+ svgContainer.style.animation = '';
817
+ svgContainer.style.visibility = 'hidden';
818
+ }, 500);
808
819
  if (this.audioUrls[this.currentSvgIndex]) {
809
820
  console.log('Playing audio:', this.audioUrls[this.currentSvgIndex]);
810
821
  const audio = new Audio(convertUrlToRelative(this.audioUrls[this.currentSvgIndex]));
@@ -839,7 +850,7 @@ export class LidoTrace {
839
850
  };
840
851
  }
841
852
  render() {
842
- 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" })));
853
+ 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" })));
843
854
  }
844
855
  static get is() { return "lido-trace"; }
845
856
  static get originalStyleUrls() {
@@ -80,7 +80,7 @@ export class LidoWrap {
80
80
  };
81
81
  }
82
82
  render() {
83
- return (h(Host, { key: 'ba0767c8fb70d3c20dbcc0835794ec58d62078b3', class: "lido-wrap", value: this.value, type: this.type, "tab-index": this.tabIndex, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, audio: this.audio, minDrops: this.minDrops, maxDrops: this.maxDrops, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry, disableSpeak: this.disableSpeak }, h("slot", { key: '359ff37390f0d20e650481cd8d531ad4da55b308' })));
83
+ return (h(Host, { key: '2ac7204f5d41605322ba9545ac3689bdd5f49bcd', class: "lido-wrap", value: this.value, type: this.type, "tab-index": this.tabIndex, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, audio: this.audio, minDrops: this.minDrops, maxDrops: this.maxDrops, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry, disableSpeak: this.disableSpeak }, h("slot", { key: '06a0dcfa475467e094d93e986c63c4cfc9974ac8' })));
84
84
  }
85
85
  static get is() { return "lido-wrap"; }
86
86
  static get originalStyleUrls() {
@@ -34,6 +34,13 @@
34
34
  transform: translateX(-2000px);
35
35
  }
36
36
  }
37
+ @keyframes placeToRight {
38
+ from {
39
+ }
40
+ to {
41
+ transform: translateX(2000px);
42
+ }
43
+ }
37
44
 
38
45
  @keyframes leftToPlace {
39
46
  from {
@@ -192,4 +199,14 @@
192
199
  drop-shadow(0 0 20px yellow)
193
200
  drop-shadow(0 0 30px orange);
194
201
  }
202
+ }
203
+
204
+ @keyframes trace-animation {
205
+ 0% {
206
+
207
+ }
208
+ 100% {
209
+ width: var(--trace-width, 100px);
210
+ height: var(--trace-height, 100px);
211
+ }
195
212
  }
@@ -44,7 +44,7 @@ body {
44
44
 
45
45
  .highlight-element {
46
46
  border: 2px solid white;
47
- box-shadow: 0 2px 4px rgba(151, 150, 150, 0.1) !important;
47
+ box-shadow: rgb(243, 77, 8) 0px 0px 40px !important;
48
48
  }
49
49
 
50
50
  .drop-element.empty {
@@ -136,12 +136,12 @@ function getContainerXml(args) {
136
136
  return `<main>
137
137
  <lido-container id="lido-container" onCorrect="lido-avatar.avatarAnimate='Success'; this.sleep='2000';" onInCorrect="this.sleep='2000';" is-allow-only-correct="${args.PracticeMode}" objective="${args.correct1},${args.correct2},${args.correct3},${args.correct4},${args.correct5}" visible="true" bg-image="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/phonic-tractor/bg-image.png" dropAttr="EnableAnimation">
138
138
  <!-- Chimple Avatar -->
139
- <lido-cell layout="pos" id="pos1" disableEdit="true" value="pos2" height="landscape.205px,portrait.195px" width="landscape.209px,portrait.209px" x="landscape.2%,portrait.80%" y="landscape.85px,portrait.146px" ariaHidden="true" bgColor="transparent" visible="true" onEntry="">
139
+ <lido-cell layout="pos" id="pos1" disableEdit="true" value="pos2" height="landscape.205px,portrait.195px" width="landscape.209px,portrait.209px" x="landscape.-30px,portrait.80%" y="landscape.700px,portrait.146px" ariaHidden="true" bgColor="transparent" visible="true" z="1" onEntry="">
140
140
  <lido-avatar id="lido-avatar" disableEdit="true" visible="true" height="100%" width="100%" src="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/temp2/chimplecharacter.riv" altText="{chimpleCharacterRive}">
141
141
  </lido-avatar>
142
142
  </lido-cell>
143
143
  <!-- heading -->
144
- <lido-text id="heading" show-speak-icon="true" audio="${args.questionAudio}" width="landscape.auto,portrait.70%" tabIndex="20" visible="true" string="${args.question}" font-family="'Baloo Bhai 2'" fontColor="#323232" font-size="landscape.36px,portrait.36px" bg-Color="transparent" onEntry="this.padding='0px 45px';this.fontWeight='600';" margin="landscape.120px 0px -25px 0px, portrait.160px 0px -39px 0px" >
144
+ <lido-text id="heading" show-speak-icon="true" audio="${args.questionAudio}" width="landscape.auto,portrait.70%" tabIndex="20" visible="true" string="${args.question}" font-family="'Baloo Bhai 2'" fontColor="#323232" font-size="landscape.36px,portrait.36px" bg-Color="transparent" onEntry="this.padding='0px 45px';this.fontWeight='600';" margin="landscape.20px 0px 0px 0px, portrait.160px 0px -39px 0px" >
145
145
  </lido-text>
146
146
  <lido-cell visible="true" flex-direction="landscape., portrait.row-reverse" bg-color="transparent" layout="portrait.row,landscape.col" width="100%" height="100%" onEntry="">
147
147
 
@@ -203,7 +203,7 @@ function getContainerXml(args) {
203
203
 
204
204
 
205
205
 
206
- <lido-cell visible="true" margin="landscape.0px 0px 0px 0px,portrait.0px 0px 0px 0px" bg-color="transparent" layout="landscape.row,portrait.col" height="landscape.40%,portrait.96%" width="100%" onEntry="">
206
+ <lido-cell visible="true" margin="landscape.0px 0px 0px 0px,portrait.0px 0px 0px 0px" bg-color="#fbcab5" layout="landscape.row,portrait.col" height="landscape.50%,portrait.96%" width="95%" border-radius="10px" onEntry="">
207
207
  ${(args.dragimg1.length === 0 && args.dragtext1.length === 0) ? '' : `<lido-cell layout="row" margin="landscape.0px 0px 0px 0px,portrait.0px 0px 0px 0px" visible="true" bg-color="transparent" height="landscape.100%,portrait.20%" width="landscape.20%,portrait.100%" onEntry="">
208
208
  <lido-cell layout="random" visible="true" width="100%" height="100%" bg-color="transparent">
209
209
  <lido-cell border-radius="8px" show-speak-icon="true" audio="${args.drag1Audio}" id="option1" value="${args.option1}" tab-index="6" height="landscape.268px,portrait.240px" width="landscape.200px,portrait.178px" type="drag" layout="col" visible="true" bg-Color="white" onEntry="this.padding='0px';">
@@ -46,7 +46,7 @@ function getContainerXml(args) {
46
46
  </lido-text>
47
47
  </lido-pos>
48
48
  <!-- question -->
49
- <lido-text visible="true" audio="https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/fill-in-the-blanks/fill-upAudio.mp3" id="heading" tab-index="12" height="landscape.100px,portrait.175px" font-family="'Baloo Bhai 2'" font-size="60px" width="landscape.auto,portrait.86%" string="Drop the elements to match the given symbol '${objective}'" font-color="black" bg-color="white" y="landscape.0%,portrait.-12%" onEntry="this.speak='true';this.font-weight='600'; this.position='relative';">
49
+ <lido-text visible="true" tab-index="12" height="landscape.100px,portrait.175px" font-family="'Baloo Bhai 2'" font-size="60px" width="landscape.auto,portrait.86%" string="Drop the elements to match the given symbol '${objective}'" font-color="black" bg-color="white" y="landscape.0%,portrait.-12%" onEntry="this.font-weight='600'; this.position='relative';">
50
50
  </lido-text>
51
51
  <lido-balance tilt="0" operation="add" visible="true" height="landscape.456px,portrait.500px" y="landscape.4%,portrait.0%" width="landscape.1136px,portrait.876px">
52
52
  <!-- drop Element -->