lido-player 0.0.2-alpha-55-dev → 0.0.2-alpha-56-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 (96) hide show
  1. package/dist/cjs/index.cjs.js +1 -1
  2. package/dist/cjs/lido-avatar_22.cjs.entry.js +138 -22
  3. package/dist/cjs/lido-player.cjs.js +1 -1
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/{utils-4b44610b.js → utils-a61cfc6b.js} +18 -10
  6. package/dist/collection/components/home/lido-home.js +35 -6
  7. package/dist/collection/components/mathMatrix/lido-math-matrix.js +8 -6
  8. package/dist/collection/components/shape/lido-shape.css +90 -0
  9. package/dist/collection/components/shape/lido-shape.js +41 -6
  10. package/dist/collection/components/slideFill/lido-slide-fill.js +1 -1
  11. package/dist/collection/components/text/lido-text.js +26 -1
  12. package/dist/collection/components/trace/lido-trace.js +57 -4
  13. package/dist/collection/components/wrap/lido-wrap.js +1 -1
  14. package/dist/collection/stories/Templates/balancing/balancing.stories.js +1 -1
  15. package/dist/collection/stories/Templates/balloonPop/balloonPop.stories.js +2 -2
  16. package/dist/collection/stories/Templates/blender/blender.stories.js +3 -3
  17. package/dist/collection/stories/Templates/checker-block/checkerBlock.stories.js +6 -4
  18. package/dist/collection/stories/Templates/fillAnswer/fill-answer.stories.js +38 -32
  19. package/dist/collection/stories/Templates/multiplyBeeds/multiplyBeeds.stories.js +2 -2
  20. package/dist/collection/stories/Templates/numberBoardTwo/numberBoardTwo.stories.js +68 -60
  21. package/dist/collection/stories/Templates/questionBoard/questionBoard.stories.js +6 -5
  22. package/dist/collection/stories/Templates/quizMaths/quizMaths.stories.js +991 -0
  23. package/dist/collection/stories/Templates/sumTogether/sumTogether.stories.js +8 -8
  24. package/dist/collection/stories/Templates/tenBox/tenBox.stories.js +144 -0
  25. package/dist/collection/stories/Templates/writeNumber/writeNumber.stories.js +8 -4
  26. package/dist/collection/utils/constants.js +2 -0
  27. package/dist/collection/utils/utils.js +5 -1
  28. package/dist/collection/utils/utilsHandlers/clickHandler.js +1 -1
  29. package/dist/collection/utils/utilsHandlers/dragDropHandler.js +4 -1
  30. package/dist/collection/utils/utilsHandlers/lidoBalanceHandler.js +4 -5
  31. package/dist/components/index.js +1 -1
  32. package/dist/components/lido-avatar.js +1 -1
  33. package/dist/components/lido-balance.js +1 -1
  34. package/dist/components/lido-calculator.js +1 -1
  35. package/dist/components/lido-canvas.js +1 -1
  36. package/dist/components/lido-cell.js +1 -1
  37. package/dist/components/lido-col.js +1 -1
  38. package/dist/components/lido-container.js +1 -1
  39. package/dist/components/lido-flash-card.js +1 -1
  40. package/dist/components/lido-float.js +1 -1
  41. package/dist/components/lido-home.js +1 -1
  42. package/dist/components/lido-image.js +1 -1
  43. package/dist/components/lido-keyboard.js +1 -1
  44. package/dist/components/lido-math-matrix.js +1 -1
  45. package/dist/components/lido-pos.js +1 -1
  46. package/dist/components/lido-random.js +1 -1
  47. package/dist/components/lido-root.js +22 -22
  48. package/dist/components/lido-row.js +1 -1
  49. package/dist/components/lido-shape.js +1 -1
  50. package/dist/components/lido-slide-fill.js +1 -1
  51. package/dist/components/lido-text.js +1 -1
  52. package/dist/components/lido-trace.js +1 -1
  53. package/dist/components/lido-wrap.js +1 -1
  54. package/dist/components/{p-36c2e21a.js → p-0712a27e.js} +17 -11
  55. package/dist/components/{p-2c518dbe.js → p-0a41b2f8.js} +1 -1
  56. package/dist/components/{p-ca8aea4b.js → p-17f84b2f.js} +1 -1
  57. package/dist/components/{p-590ce2c9.js → p-21852d55.js} +1 -1
  58. package/dist/components/{p-de2193c5.js → p-2829c82c.js} +1 -1
  59. package/dist/components/{p-bc5202db.js → p-330caab8.js} +2 -2
  60. package/dist/components/{p-9acf0fcc.js → p-480f708a.js} +1 -1
  61. package/dist/components/{p-3fc01453.js → p-4d332eab.js} +1 -1
  62. package/dist/components/{p-2e023f67.js → p-4e041807.js} +2 -2
  63. package/dist/components/{p-0be6b5d5.js → p-7ab0a273.js} +26 -2
  64. package/dist/components/{p-67a24ad4.js → p-882b291d.js} +2 -2
  65. package/dist/components/{p-43d79c61.js → p-9104d427.js} +1 -1
  66. package/dist/components/{p-b847f269.js → p-b9875116.js} +57 -4
  67. package/dist/components/{p-73b2bd74.js → p-c4739621.js} +3 -3
  68. package/dist/components/p-cca36777.js +128 -0
  69. package/dist/components/{p-5078599e.js → p-d1b5079b.js} +1 -1
  70. package/dist/components/{p-b0dbee97.js → p-e1ba0c44.js} +38 -26
  71. package/dist/components/{p-72d6a594.js → p-eab0ebb7.js} +1 -1
  72. package/dist/components/{p-b095de27.js → p-f2b53e8e.js} +2 -2
  73. package/dist/components/{p-c296051d.js → p-f3bc4577.js} +1 -1
  74. package/dist/components/{p-c69ef266.js → p-ff801ba1.js} +1 -1
  75. package/dist/components/{p-e534ea52.js → p-ffc40642.js} +7 -5
  76. package/dist/esm/index.js +1 -1
  77. package/dist/esm/lido-avatar_22.entry.js +138 -22
  78. package/dist/esm/lido-player.js +1 -1
  79. package/dist/esm/loader.js +1 -1
  80. package/dist/esm/{utils-ae1eb036.js → utils-7ed76799.js} +17 -11
  81. package/dist/lido-player/index.esm.js +1 -1
  82. package/dist/lido-player/lido-player.esm.js +1 -1
  83. package/dist/lido-player/{p-a632e2ce.js → p-17d93181.js} +2 -2
  84. package/dist/lido-player/p-fa9dfdf8.entry.js +1 -0
  85. package/dist/types/components/home/lido-home.d.ts +3 -0
  86. package/dist/types/components/shape/lido-shape.d.ts +8 -2
  87. package/dist/types/components/text/lido-text.d.ts +1 -0
  88. package/dist/types/components/trace/lido-trace.d.ts +2 -1
  89. package/dist/types/components.d.ts +2 -0
  90. package/dist/types/stories/Templates/fillAnswer/fill-answer.stories.d.ts +1 -1
  91. package/dist/types/stories/Templates/quizMaths/quizMaths.stories.d.ts +16 -0
  92. package/dist/types/stories/Templates/tenBox/tenBox.stories.d.ts +4 -0
  93. package/dist/types/utils/constants.d.ts +2 -0
  94. package/package.json +1 -1
  95. package/dist/components/p-f8c00485.js +0 -100
  96. package/dist/lido-player/p-f1b879f6.entry.js +0 -1
@@ -1,25 +1,25 @@
1
- import { p as proxyCustomElement, H, x as dispatchActivityChangeEvent, A as ActivityScoreKey, y as dispatchGameCompletedEvent, z as dispatchGameExitEvent, B as AudioPlayer, C as generateUUIDFallback, D as exitUrl, E as prevUrl, F as nextUrl, G as speakUrl, N as NextContainerKey, P as PrevContainerKey, L as LidoContainer, h, I as getCancelBtnPopup, S as SelectedValuesKey, J as matchStringPattern, K as triggerNextContainer, u as calculateScale, M as triggerPrevcontainer, o as executeActions, j as Host, e as convertUrlToRelative, O as setCancelBtnPopup } from './p-36c2e21a.js';
1
+ import { p as proxyCustomElement, H, y as dispatchActivityChangeEvent, A as ActivityScoreKey, z as dispatchGameCompletedEvent, B as dispatchGameExitEvent, C as AudioPlayer, D as generateUUIDFallback, E as exitUrl, F as prevUrl, G as nextUrl, I as speakUrl, N as NextContainerKey, P as PrevContainerKey, u as LIDO_COMMON_AUDIO_PATH, J as LidoContainer, h, K as getCancelBtnPopup, S as SelectedValuesKey, M as matchStringPattern, O as triggerNextContainer, v as calculateScale, Q as triggerPrevcontainer, o as executeActions, j as Host, e as convertUrlToRelative, T as setCancelBtnPopup } from './p-0712a27e.js';
2
2
  import { i as instance } from './p-73e3f0f4.js';
3
- import { d as defineCustomElement$k } from './p-2c518dbe.js';
4
- import { d as defineCustomElement$j } from './p-590ce2c9.js';
5
- import { d as defineCustomElement$i } from './p-73b2bd74.js';
6
- import { d as defineCustomElement$h } from './p-67a24ad4.js';
7
- import { d as defineCustomElement$g } from './p-c296051d.js';
8
- import { d as defineCustomElement$f } from './p-72d6a594.js';
9
- import { d as defineCustomElement$e } from './p-5078599e.js';
10
- import { d as defineCustomElement$d } from './p-9acf0fcc.js';
11
- import { d as defineCustomElement$c } from './p-ca8aea4b.js';
12
- import { d as defineCustomElement$b } from './p-c69ef266.js';
13
- import { d as defineCustomElement$a } from './p-bc5202db.js';
14
- import { d as defineCustomElement$9 } from './p-e534ea52.js';
15
- import { d as defineCustomElement$8 } from './p-3fc01453.js';
16
- import { d as defineCustomElement$7 } from './p-43d79c61.js';
17
- import { d as defineCustomElement$6 } from './p-de2193c5.js';
18
- import { d as defineCustomElement$5 } from './p-f8c00485.js';
19
- import { d as defineCustomElement$4 } from './p-b095de27.js';
20
- import { d as defineCustomElement$3 } from './p-0be6b5d5.js';
21
- import { d as defineCustomElement$2 } from './p-b847f269.js';
22
- import { d as defineCustomElement$1 } from './p-2e023f67.js';
3
+ import { d as defineCustomElement$k } from './p-0a41b2f8.js';
4
+ import { d as defineCustomElement$j } from './p-21852d55.js';
5
+ import { d as defineCustomElement$i } from './p-c4739621.js';
6
+ import { d as defineCustomElement$h } from './p-882b291d.js';
7
+ import { d as defineCustomElement$g } from './p-f3bc4577.js';
8
+ import { d as defineCustomElement$f } from './p-eab0ebb7.js';
9
+ import { d as defineCustomElement$e } from './p-d1b5079b.js';
10
+ import { d as defineCustomElement$d } from './p-480f708a.js';
11
+ import { d as defineCustomElement$c } from './p-17f84b2f.js';
12
+ import { d as defineCustomElement$b } from './p-ff801ba1.js';
13
+ import { d as defineCustomElement$a } from './p-330caab8.js';
14
+ import { d as defineCustomElement$9 } from './p-ffc40642.js';
15
+ import { d as defineCustomElement$8 } from './p-4d332eab.js';
16
+ import { d as defineCustomElement$7 } from './p-9104d427.js';
17
+ import { d as defineCustomElement$6 } from './p-2829c82c.js';
18
+ import { d as defineCustomElement$5 } from './p-cca36777.js';
19
+ import { d as defineCustomElement$4 } from './p-f2b53e8e.js';
20
+ import { d as defineCustomElement$3 } from './p-7ab0a273.js';
21
+ import { d as defineCustomElement$2 } from './p-b9875116.js';
22
+ import { d as defineCustomElement$1 } from './p-4e041807.js';
23
23
 
24
24
  const indexCss = "@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap'); @import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@400..800&display=swap'); @import url('https://fonts.googleapis.com/css2?family=Baloo+Bhai+2:wght@400..800&display=swap'); body{overflow:hidden;background-position:center;background-size:cover;background-repeat:no-repeat;height:100vh}*{user-select:none}.lido-disable-check-button{pointer-events:none;background-color:#9393935c !important;color:white}.lido-element-selected{border:2px solid;background-color:#ffdf7d !important}.diagonal-target,.diagonal-drop *{transform:scale(0.8) !important;opacity:1 !important}.cloned-element{display:flex !important;position:absolute !important;filter:grayscale(100%);pointer-events:none}.removeShadow{box-shadow:0px 0px 0px 0px #ff8900 !important}.highlight-element{border:2px solid white;box-shadow:0 2px 4px rgba(151, 150, 150, 0.1) !important}.drop-element.empty{border:4px dashed #f34d08 !important}.drop-element.filled{border:'none' !important}.drag-element{box-shadow:0px 15px 11px rgba(43, 0, 0, 0.3) !important}.drag-element.dropped{box-shadow:none !important}.click-element{background-color:var(--btn-bg-color, rgba(255, 172, 76, 1)) !important;box-shadow:var(--btn-shadow-px) var(--btn-shadow-color, rgba(225, 121, 76, 1)) !important;cursor:pointer;transition:box-shadow 0.1s ease-out, transform 0.2s ease-out;}.click-element:active{box-shadow:0px 0px 0px var(--btn-shadow-color, rgba(225, 121, 76, 1)) !important;transform:translateY(var(--btn-active));}.click-element:focus{outline:2px solid dodgerblue;outline-offset:3px}.after-drop-popup-container{width:200%;height:200%;background-color:rgba(0, 0, 0, 0.8);position:absolute;display:flex;flex-direction:row-reverse;align-items:center;justify-content:center !important;gap:80px}.after-drop-popup-drag-element{scale:1.5;border-radius:8px;transform:none !important;position:unset !important}.after-drop-popup-drop-element{scale:1.5;border:unset;border-radius:8px;transform:none !important;position:unset !important}@keyframes zoomFadeIn{0%{transform:scale(0.6);opacity:0}100%{transform:scale(1);opacity:1}}.zoom-fade-in{animation:zoomFadeIn 0.8s ease-out forwards}@keyframes zoomFadeOut{0%{transform:scale(1);opacity:1}100%{transform:scale(0.6);opacity:0}}.zoom-fade-out{animation:zoomFadeOut 0.8s ease-in forwards}.slide-numbers{width:70px;height:70px;border:1px solid #f57139;background-color:white;font-weight:500;color:#f57139;font-size:44px;border-radius:40px;display:flex;align-items:center;justify-content:center;font-family:'Baloo Bhai 2', serif}.slide-numbers-bottom{position:absolute;display:flex;justify-content:space-around;align-items:center;bottom:-25px;width:100%;height:50px}.slide-numbers-left{position:absolute;display:flex;flex-direction:column;justify-content:space-around;height:100%;width:50px;left:-25px;bottom:0px}.lido-speak-icon{width:56px;height:56px;position:absolute;top:-25px;right:-25px;z-index:10;background-image:url(\"https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/template/audioIcon.png\");background-color:white;border:4px solid #F34D08;border-radius:16px;box-shadow:0px 4px 0px 0px #F34D08;background-size:contain;background-repeat:no-repeat;cursor:pointer}.lido-speak-icon:active{transform:translateY(8px);box-shadow:0px 0px 0px 0px !important}.lido-strong-shake{animation:strongShake 0.3s ease}.lido-scaled-shake{animation:scaledShake 0.6s ease-in-out}.lido-horizontal-shake{animation:horizontalShake 0.6s ease-in-out;border-radius:20px}.lido-vertical-shake{animation:verticalShake 0.6s ease-in-out;border-radius:20px}.lido-diagonal-shake{animation:diagonalShake 0.5s ease-in-out;border-radius:20px;will-change:transform}.lido-glow{animation:glowPulse 1s infinite alternate;transition:opacity 0.5s ease-in-out}.lido-box-highlight{animation:topToPlace 0.3s linear}.lido-display-hiddenvalue{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-size:80px;font-weight:1000;color:brown;-webkit-text-stroke:2px white;font-family:'Baloo Bhai 2', sans-serif;pointer-events:none}.lido-image-colorize{position:relative;display:inline-block}.lido-image-colorize::after{content:'';position:absolute;inset:0;background:var(--tint-color);mix-blend-mode:multiply;opacity:0.8;pointer-events:none;mask-image:var(--mask-url);mask-size:cover;mask-repeat:no-repeat;mask-position:center}";
25
25
  const LidoHomeStyle0 = indexCss;
@@ -51,7 +51,6 @@ const LidoHome = /*@__PURE__*/ proxyCustomElement(class LidoHome extends H {
51
51
  if (index != undefined && index < this.containers.length) {
52
52
  // Move to the next container
53
53
  this.currentContainerIndex = index;
54
- console.log('container index ; ', this.currentContainerIndex);
55
54
  // window.dispatchEvent(new CustomEvent('activityChange', { detail: { index: this.currentContainerIndex } }));
56
55
  dispatchActivityChangeEvent(this.currentContainerIndex);
57
56
  }
@@ -129,6 +128,7 @@ const LidoHome = /*@__PURE__*/ proxyCustomElement(class LidoHome extends H {
129
128
  }
130
129
  }
131
130
  };
131
+ this.commonAudioPath = undefined;
132
132
  this.showNav = true;
133
133
  this.activeContainerIndexes = [];
134
134
  this.locale = '';
@@ -160,6 +160,9 @@ const LidoHome = /*@__PURE__*/ proxyCustomElement(class LidoHome extends H {
160
160
  // Trigger re-render of containers to update <lido-text> dynamically
161
161
  this.containers = [...this.containers];
162
162
  }
163
+ onCommonAudioPathChange(path) {
164
+ this.publishCommonAudioPath(path);
165
+ }
163
166
  /**
164
167
  * Lifecycle method that runs before the component is loaded. It sets up event listeners for transitioning
165
168
  * between containers and parses the XML data into containers.
@@ -195,6 +198,7 @@ const LidoHome = /*@__PURE__*/ proxyCustomElement(class LidoHome extends H {
195
198
  });
196
199
  }
197
200
  componentDidLoad() {
201
+ this.publishCommonAudioPath(this.commonAudioPath);
198
202
  setTimeout(() => {
199
203
  this.showDotsandbtn = true;
200
204
  }, 10);
@@ -210,6 +214,15 @@ const LidoHome = /*@__PURE__*/ proxyCustomElement(class LidoHome extends H {
210
214
  this.scaleNavbarContainer(); // re-scale navbar on resize
211
215
  });
212
216
  }
217
+ publishCommonAudioPath(path) {
218
+ if (!path)
219
+ return;
220
+ const cleanPath = path.replace(/\/+$/, "");
221
+ window[LIDO_COMMON_AUDIO_PATH] = cleanPath;
222
+ console.log("[LidoHome] Published common audio path:", cleanPath);
223
+ // Dispatch a global event so LidoText knows the path is ready
224
+ window.dispatchEvent(new Event('lidoCommonAudioPathReady'));
225
+ }
213
226
  async handleIcons() {
214
227
  var _a;
215
228
  const checkUrl = async (url, containerUrl, fallback) => {
@@ -361,20 +374,16 @@ const LidoHome = /*@__PURE__*/ proxyCustomElement(class LidoHome extends H {
361
374
  parseContainers(rootElement) {
362
375
  const containerElements = rootElement.querySelectorAll('lido-container');
363
376
  const containers = Array.from(containerElements).map((container, index) => {
364
- console.log("nammadhaaaaaaa", this.activeContainerIndexes.length && !this.activeContainerIndexes.includes(index));
365
377
  if (this.activeContainerIndexes.length && !this.activeContainerIndexes.includes(index))
366
378
  return;
367
379
  // Return a factory function that generates a fresh JSX node each time
368
380
  return () => this.parseElement(container);
369
381
  }).filter(Boolean); // Remove any undefined entries
370
382
  this.containers = containers;
371
- console.log("container :::", containers);
372
383
  }
373
384
  areAllDropsFilled() {
374
385
  const drops = Array.from(document.querySelectorAll('[type="drop"]'));
375
386
  const drags = Array.from(document.querySelectorAll('[type="drag"]')).filter(drag => drag.getAttribute('drop-to'));
376
- console.log('drops', drops);
377
- console.log('drags', drags);
378
387
  return drops.every(drop => {
379
388
  const dropId = drop.id;
380
389
  return drags.some(drag => drag.getAttribute('drop-to') === dropId);
@@ -483,10 +492,12 @@ const LidoHome = /*@__PURE__*/ proxyCustomElement(class LidoHome extends H {
483
492
  get el() { return this; }
484
493
  static get watchers() { return {
485
494
  "locale": ["onLangChange"],
495
+ "commonAudioPath": ["onCommonAudioPathChange"],
486
496
  "xmlData": ["onXmlDataChange"]
487
497
  }; }
488
498
  static get style() { return LidoHomeStyle0 + (LidoHomeStyle1 + LidoHomeStyle2); }
489
499
  }, [0, "lido-home", {
500
+ "commonAudioPath": [1, "common-audio-path"],
490
501
  "showNav": [4, "show-nav"],
491
502
  "activeContainerIndexes": [16],
492
503
  "locale": [1],
@@ -508,6 +519,7 @@ const LidoHome = /*@__PURE__*/ proxyCustomElement(class LidoHome extends H {
508
519
  "showDotsandbtn": [32]
509
520
  }, undefined, {
510
521
  "locale": ["onLangChange"],
522
+ "commonAudioPath": ["onCommonAudioPathChange"],
511
523
  "xmlData": ["onXmlDataChange"]
512
524
  }]);
513
525
  function defineCustomElement() {
@@ -1,4 +1,4 @@
1
- import { p as proxyCustomElement, H, i as initEventsForElement, r as handlingChildElements, t as attachSpeakIcon, e as convertUrlToRelative, k as parseProp, h, j as Host } from './p-36c2e21a.js';
1
+ import { p as proxyCustomElement, H, i as initEventsForElement, r as handlingChildElements, t as attachSpeakIcon, e as convertUrlToRelative, k as parseProp, h, j as Host } from './p-0712a27e.js';
2
2
 
3
3
  const lidoColCss = ".lido-col{top:var(--y, 0);left:var(--x, 0);height:var(--height, 100%);width:var(--width, 100%);background-color:var(--bgColor, #eeeeee);padding:15px;border-radius:10px;display:flex;justify-content:space-around;flex-direction:column;align-items:center}.lido-col>*{}";
4
4
  const LidoColStyle0 = lidoColCss;
@@ -1,4 +1,4 @@
1
- import { p as proxyCustomElement, H, e as convertUrlToRelative, d as setVisibilityWithDelay, i as initEventsForElement, k as parseProp, W as fraction, h, j as Host } from './p-36c2e21a.js';
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';
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: '3918ed476b3de4977c53ff0bf576253f68e8c84f', id: this.id, class: "lido-slide-fill", src: this.src, fill: this.fill, fillDirection: this.fillDirection, slider: this.slider, style: this.style, min: this.min, max: this.max, division: this.division, numberType: this.numberType, onEntry: this.onEntry, type: this.type, "disable-speak": this.disableSpeak }, h("div", { key: '8f54b0e5de490a162aaa1d7ac9ed485d1628c484', innerHTML: this.svgContent, class: "svg-element" })));
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" })));
198
198
  }
199
199
  get el() { return this; }
200
200
  static get watchers() { return {
@@ -1,4 +1,4 @@
1
- import { p as proxyCustomElement, H, d as setVisibilityWithDelay, i as initEventsForElement, r as handlingChildElements, t as attachSpeakIcon, k as parseProp, h, j as Host } from './p-36c2e21a.js';
1
+ import { p as proxyCustomElement, H, d as setVisibilityWithDelay, i as initEventsForElement, r as handlingChildElements, t as attachSpeakIcon, k as parseProp, h, j as Host } from './p-0712a27e.js';
2
2
 
3
3
  const lidoCellCss = ".lido-col{top:var(--y, 0);left:var(--x, 0);height:var(--height, 100%);width:var(--width, 100%);background-color:var(--bgColor, #eeeeee);padding:15px;border-radius:10px;display:flex;justify-content:space-around;flex-direction:column;align-items:center}.lido-col>*{}.lido-row{display:flex;justify-content:space-around;align-items:center;}.lido-row>*{}.lido-wrap{display:grid;grid-gap:10px;grid-template-columns:repeat(auto-fill, minmax(186px, auto))}.lido-wrap>*{padding:10px;box-sizing:border-box}.lido-flex{display:flex;flex-wrap:wrap;align-content:flex-start;gap:10px}.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}.lido-random{position:relative;width:100%;height:100%}.lido-random>*{position:absolute}.lido-col::-webkit-scrollbar,.lido-wrap::-webkit-scrollbar,.lido-flex::-webkit-scrollbar{width:var(--scrollbar-width);height:var(--scrollbar-width)}.lido-col::-webkit-scrollbar-thumb,.lido-wrap::-webkit-scrollbar-thumb,.lido-flex::-webkit-scrollbar-thumb{background-color:#888;border-radius:10px;border:3px solid transparent;background-clip:content-box}.lido-col::-webkit-scrollbar-track,.lido-wrap::-webkit-scrollbar-track,.lido-flex::-webkit-scrollbar-track{background:#f1f1f1}";
4
4
  const LidoCellStyle0 = lidoCellCss;
@@ -1,4 +1,4 @@
1
- import { c as commonjsGlobal, Q as getDefaultExportFromCjs, p as proxyCustomElement, H, d as setVisibilityWithDelay, i as initEventsForElement, T as tinyColor, t as attachSpeakIcon, k as parseProp, e as convertUrlToRelative, h, j as Host } from './p-36c2e21a.js';
1
+ import { c as commonjsGlobal, U as getDefaultExportFromCjs, p as proxyCustomElement, H, d as setVisibilityWithDelay, i as initEventsForElement, V as tinyColor, t as attachSpeakIcon, k as parseProp, e as convertUrlToRelative, h, j as Host } from './p-0712a27e.js';
2
2
 
3
3
  var lib = {exports: {}};
4
4
 
@@ -1,4 +1,4 @@
1
- import { p as proxyCustomElement, H, i as initEventsForElement, e as convertUrlToRelative, k as parseProp, V as validateObjectiveStatus, h, j as Host } from './p-36c2e21a.js';
1
+ import { p as proxyCustomElement, H, i as initEventsForElement, e as convertUrlToRelative, k as parseProp, X as validateObjectiveStatus, h, j as Host } from './p-0712a27e.js';
2
2
 
3
3
  const lidoMathMatrixCss = ".math-matrix{width:100%;height:100%;display:flex;justify-content:center}.slot{width:100%;height:100%;text-align:center;align-content:center;font-size:42px;font-weight:800;font-family:'Baloo Bhai 2';box-sizing:content-box}.slot:hover{opacity:0.7}.slot-parent{width:100%;height:100%;display:flex;justify-content:center;align-items:center;flex-direction:column}.slot-active{background-color:var(--active-bg-color);background-image:var(--bg-image);background-size:contain;background-position:center;background-repeat:no-repeat}.slot-inactive{background-color:var(--deactive-bg-color);background-size:cover;background-position:center;background-repeat:no-repeat}.topIndex,.leftIndex,.bottomIndex{height:100%;width:100%;text-align:center;align-content:center;font-size:30px;font-weight:600;font-family:'Baloo Bhai 2'}";
4
4
  const LidoMathMatrixStyle0 = lidoMathMatrixCss;
@@ -7,8 +7,8 @@ const LidoMathMatrix = /*@__PURE__*/ proxyCustomElement(class LidoMathMatrix ext
7
7
  constructor() {
8
8
  super();
9
9
  this.__registerHost();
10
- this.rows = "7";
11
- this.cols = "5";
10
+ this.rows = "10";
11
+ this.cols = "10";
12
12
  this.defualtFill = 0;
13
13
  this.leftIndex = false;
14
14
  this.topIndex = false;
@@ -85,8 +85,10 @@ const LidoMathMatrix = /*@__PURE__*/ proxyCustomElement(class LidoMathMatrix ext
85
85
  const fristElement = this.el.querySelector('.slot');
86
86
  if (!slotElement.length || !fristElement)
87
87
  return;
88
- const slotMaxValues = fristElement.offsetWidth < fristElement.offsetHeight ? fristElement.offsetWidth : fristElement.offsetHeight;
88
+ const elementSize = Number(this.rows) < Number(this.cols) ? this.el.offsetHeight : this.el.offsetWidth;
89
+ const numberOfSlots = Number(this.rows) > Number(this.cols) ? Number(this.rows) : Number(this.cols);
89
90
  const slotParent = this.el.querySelectorAll('.slot-parent');
91
+ const slotMaxValues = elementSize / numberOfSlots;
90
92
  slotParent.forEach(parent => {
91
93
  parent.style.width = `${slotMaxValues}px`;
92
94
  Array.from(parent.children).forEach(el => {
@@ -190,7 +192,7 @@ const LidoMathMatrix = /*@__PURE__*/ proxyCustomElement(class LidoMathMatrix ext
190
192
  render() {
191
193
  let slotNumber = 1;
192
194
  const slotData = this.getSlotData();
193
- return (h(Host, { key: '8232965fc3fb0b298233d21d7f50412508dc2256', class: "math-matrix", style: {
195
+ return (h(Host, { key: 'bbd76954f0a4b67cd89dd10e3c26ce4f7e7712bd', class: "math-matrix", style: {
194
196
  height: this.style.height,
195
197
  width: this.style.width,
196
198
  z: this.style.z,
package/dist/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- export { f as format } from './utils-ae1eb036.js';
1
+ export { f as format } from './utils-7ed76799.js';
2
2
  import './index-37c2ad2d.js';
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, g as getAssetPath, h, H as Host, a as getElement, c as createEvent } from './index-37c2ad2d.js';
2
- import { c as commonjsGlobal, s as setVisibilityWithDelay, i as initEventsForElement, a as convertUrlToRelative, R as RiveService, p as parseProp, e as equationCheck, b as storingEachActivityScore, d as executeActions, g as calculateScore, N as NextContainerKey, h as handlingChildElements, j as attachSpeakIcon, k as calculateScale, l as handleFloatElementPosition, m as handleElementClick, n as dispatchActivityChangeEvent, A as ActivityScoreKey, o as dispatchGameCompletedEvent, q as dispatchGameExitEvent, r as AudioPlayer, t as generateUUIDFallback, u as exitUrl, v as prevUrl, w as nextUrl, x as speakUrl, P as PrevContainerKey, L as LidoContainer$1, y as getCancelBtnPopup, S as SelectedValuesKey, z as matchStringPattern, B as triggerNextContainer, C as triggerPrevcontainer, D as setCancelBtnPopup, E as getDefaultExportFromCjs, F as tinyColor, G as DropAction, H as validateObjectiveStatus, I as fraction, T as TraceMode, J as speakIcon, K as fingerUrl } from './utils-ae1eb036.js';
2
+ import { c as commonjsGlobal, s as setVisibilityWithDelay, i as initEventsForElement, a as convertUrlToRelative, R as RiveService, p as parseProp, e as equationCheck, b as storingEachActivityScore, d as executeActions, g as calculateScore, N as NextContainerKey, h as handlingChildElements, j as attachSpeakIcon, k as calculateScale, l as handleFloatElementPosition, m as handleElementClick, n as dispatchActivityChangeEvent, A as ActivityScoreKey, o as dispatchGameCompletedEvent, q as dispatchGameExitEvent, r as AudioPlayer, t as generateUUIDFallback, u as exitUrl, v as prevUrl, w as nextUrl, x as speakUrl, P as PrevContainerKey, L as LIDO_COMMON_AUDIO_PATH, y as LidoContainer$1, z as getCancelBtnPopup, S as SelectedValuesKey, B as matchStringPattern, C as triggerNextContainer, D as triggerPrevcontainer, E as setCancelBtnPopup, F as getDefaultExportFromCjs, G as tinyColor, H as DropAction, I as validateObjectiveStatus, J as fraction, K as LIDO_COMMON_AUDIO_READY_EVENT, T as TraceMode, M as speakIcon, O as fingerUrl } from './utils-7ed76799.js';
3
3
 
4
4
  var rive = {exports: {}};
5
5
 
@@ -10249,7 +10249,6 @@ const LidoHome = class {
10249
10249
  if (index != undefined && index < this.containers.length) {
10250
10250
  // Move to the next container
10251
10251
  this.currentContainerIndex = index;
10252
- console.log('container index ; ', this.currentContainerIndex);
10253
10252
  // window.dispatchEvent(new CustomEvent('activityChange', { detail: { index: this.currentContainerIndex } }));
10254
10253
  dispatchActivityChangeEvent(this.currentContainerIndex);
10255
10254
  }
@@ -10327,6 +10326,7 @@ const LidoHome = class {
10327
10326
  }
10328
10327
  }
10329
10328
  };
10329
+ this.commonAudioPath = undefined;
10330
10330
  this.showNav = true;
10331
10331
  this.activeContainerIndexes = [];
10332
10332
  this.locale = '';
@@ -10358,6 +10358,9 @@ const LidoHome = class {
10358
10358
  // Trigger re-render of containers to update <lido-text> dynamically
10359
10359
  this.containers = [...this.containers];
10360
10360
  }
10361
+ onCommonAudioPathChange(path) {
10362
+ this.publishCommonAudioPath(path);
10363
+ }
10361
10364
  /**
10362
10365
  * Lifecycle method that runs before the component is loaded. It sets up event listeners for transitioning
10363
10366
  * between containers and parses the XML data into containers.
@@ -10393,6 +10396,7 @@ const LidoHome = class {
10393
10396
  });
10394
10397
  }
10395
10398
  componentDidLoad() {
10399
+ this.publishCommonAudioPath(this.commonAudioPath);
10396
10400
  setTimeout(() => {
10397
10401
  this.showDotsandbtn = true;
10398
10402
  }, 10);
@@ -10408,6 +10412,15 @@ const LidoHome = class {
10408
10412
  this.scaleNavbarContainer(); // re-scale navbar on resize
10409
10413
  });
10410
10414
  }
10415
+ publishCommonAudioPath(path) {
10416
+ if (!path)
10417
+ return;
10418
+ const cleanPath = path.replace(/\/+$/, "");
10419
+ window[LIDO_COMMON_AUDIO_PATH] = cleanPath;
10420
+ console.log("[LidoHome] Published common audio path:", cleanPath);
10421
+ // Dispatch a global event so LidoText knows the path is ready
10422
+ window.dispatchEvent(new Event('lidoCommonAudioPathReady'));
10423
+ }
10411
10424
  async handleIcons() {
10412
10425
  var _a;
10413
10426
  const checkUrl = async (url, containerUrl, fallback) => {
@@ -10559,20 +10572,16 @@ const LidoHome = class {
10559
10572
  parseContainers(rootElement) {
10560
10573
  const containerElements = rootElement.querySelectorAll('lido-container');
10561
10574
  const containers = Array.from(containerElements).map((container, index) => {
10562
- console.log("nammadhaaaaaaa", this.activeContainerIndexes.length && !this.activeContainerIndexes.includes(index));
10563
10575
  if (this.activeContainerIndexes.length && !this.activeContainerIndexes.includes(index))
10564
10576
  return;
10565
10577
  // Return a factory function that generates a fresh JSX node each time
10566
10578
  return () => this.parseElement(container);
10567
10579
  }).filter(Boolean); // Remove any undefined entries
10568
10580
  this.containers = containers;
10569
- console.log("container :::", containers);
10570
10581
  }
10571
10582
  areAllDropsFilled() {
10572
10583
  const drops = Array.from(document.querySelectorAll('[type="drop"]'));
10573
10584
  const drags = Array.from(document.querySelectorAll('[type="drag"]')).filter(drag => drag.getAttribute('drop-to'));
10574
- console.log('drops', drops);
10575
- console.log('drags', drags);
10576
10585
  return drops.every(drop => {
10577
10586
  const dropId = drop.id;
10578
10587
  return drags.some(drag => drag.getAttribute('drop-to') === dropId);
@@ -10681,6 +10690,7 @@ const LidoHome = class {
10681
10690
  get el() { return getElement(this); }
10682
10691
  static get watchers() { return {
10683
10692
  "locale": ["onLangChange"],
10693
+ "commonAudioPath": ["onCommonAudioPathChange"],
10684
10694
  "xmlData": ["onXmlDataChange"]
10685
10695
  }; }
10686
10696
  };
@@ -13642,8 +13652,8 @@ const LidoMathMatrixStyle0 = lidoMathMatrixCss;
13642
13652
  const LidoMathMatrix = class {
13643
13653
  constructor(hostRef) {
13644
13654
  registerInstance(this, hostRef);
13645
- this.rows = "7";
13646
- this.cols = "5";
13655
+ this.rows = "10";
13656
+ this.cols = "10";
13647
13657
  this.defualtFill = 0;
13648
13658
  this.leftIndex = false;
13649
13659
  this.topIndex = false;
@@ -13720,8 +13730,10 @@ const LidoMathMatrix = class {
13720
13730
  const fristElement = this.el.querySelector('.slot');
13721
13731
  if (!slotElement.length || !fristElement)
13722
13732
  return;
13723
- const slotMaxValues = fristElement.offsetWidth < fristElement.offsetHeight ? fristElement.offsetWidth : fristElement.offsetHeight;
13733
+ const elementSize = Number(this.rows) < Number(this.cols) ? this.el.offsetHeight : this.el.offsetWidth;
13734
+ const numberOfSlots = Number(this.rows) > Number(this.cols) ? Number(this.rows) : Number(this.cols);
13724
13735
  const slotParent = this.el.querySelectorAll('.slot-parent');
13736
+ const slotMaxValues = elementSize / numberOfSlots;
13725
13737
  slotParent.forEach(parent => {
13726
13738
  parent.style.width = `${slotMaxValues}px`;
13727
13739
  Array.from(parent.children).forEach(el => {
@@ -13825,7 +13837,7 @@ const LidoMathMatrix = class {
13825
13837
  render() {
13826
13838
  let slotNumber = 1;
13827
13839
  const slotData = this.getSlotData();
13828
- return (h(Host, { key: '8232965fc3fb0b298233d21d7f50412508dc2256', class: "math-matrix", style: {
13840
+ return (h(Host, { key: 'bbd76954f0a4b67cd89dd10e3c26ce4f7e7712bd', class: "math-matrix", style: {
13829
13841
  height: this.style.height,
13830
13842
  width: this.style.width,
13831
13843
  z: this.style.z,
@@ -14153,7 +14165,7 @@ const LidoRow = class {
14153
14165
  };
14154
14166
  LidoRow.style = LidoRowStyle0;
14155
14167
 
14156
- const lidoShapeCss = ".lido-shape{position:absolute;top:var(--y);left:var(--x);display:var(--display);z-index:var(--z)}.lido-rectangle{border-radius:0}.lido-circle{width:var(--width);height:var(--width);border-radius:50%;background-color:var(--bgColor)}.lido-ellipse{width:var(--width);height:var(--height);border-radius:50%;background-color:var(--bgColor)}.lido-triangle{width:var(--triangleWidth);height:var(--triangleHeight);background-color:var(--bgColor);clip-path:polygon(50% 0%, 100% 100%, 0% 100%)}.lido-rightTriangle{width:var(--triangleWidth);height:var(--triangleHeight);background-color:var(--bgColor);clip-path:polygon(100% 0%, 100% 100%, 0% 100%)}.lido-leftTriangle{width:var(--triangleWidth);height:var(--triangleHeight);background-color:var(--triangleBgColor);clip-path:polygon(0% 0%, 100% 100%, 0% 100%)}.lido-parallelogram{width:var(--paralleWidth);height:var(--paralleHeight);transform:skew(20deg)}.lido-star{width:var(--starWidth);height:var(--starHeight);background-color:var(--starBgColor);clip-path:polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%)}.lido-pentagon{width:var(--pentagonWidth);height:var(--pentagonHeight);background-color:var(--pentagonBgColor);clip-path:polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%)}.lido-heptagon{width:var(--heptagonWidth);height:var(--heptagonHeight);background-color:var(--heptagonBgColor);clip-path:polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%)}.lido-octagon{width:var(--octagonWidth);height:var(--octagonHeight);background-color:var(--octagonBgColor);clip-path:polygon(25% 0%, 75% 0%, 100% 25%, 100% 75%, 75% 100%, 25% 100%, 0% 75%, 0% 25%)}.lido-rhombus{width:var(--rhombusWidth);height:var(--rhombusHeight);background-color:var(--rhombusBgColor);clip-path:polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)}.lido-heart{height:var(--heartHeight);width:var(--heartWidth);border-image:radial-gradient(var(--heartBgColor) 69%, #0000 70%) 84.5%/50%;clip-path:polygon(-41% 0, 50% 91%, 141% 0)}";
14168
+ const lidoShapeCss = ".lido-shape{position:absolute;top:var(--y);left:var(--x);display:var(--display);z-index:var(--z);justify-content:center;align-items:center}.lido-rectangle{border-radius:0}.lido-circle{width:var(--width);height:var(--width);border-radius:50%;background-color:var(--bgColor)}.lido-ellipse{width:var(--width);height:var(--height);border-radius:50%;background-color:var(--bgColor)}.lido-triangle{width:var(--triangleWidth);height:var(--triangleHeight);background-color:var(--bgColor);clip-path:polygon(50% 0%, 100% 100%, 0% 100%)}.lido-rightTriangle{width:var(--triangleWidth);height:var(--triangleHeight);background-color:var(--bgColor);clip-path:polygon(100% 0%, 100% 100%, 0% 100%)}.lido-leftTriangle{width:var(--triangleWidth);height:var(--triangleHeight);background-color:var(--triangleBgColor);clip-path:polygon(0% 0%, 100% 100%, 0% 100%)}.lido-parallelogram{width:var(--paralleWidth);height:var(--paralleHeight);transform:skew(20deg)}.lido-trapezoid{width:var(--trapezoidWidth);height:var(--trapezoidHeight);background-color:var(--bgColor);clip-path:polygon(\r\n 20% 0%, \r\n 80% 0%, \r\n 100% 100%,\r\n 0% 100% \r\n )}.lido-hexagon{width:var(--hexagonWidth);height:var(--hexagonHeight);background-color:var(--bgColor);clip-path:polygon(\r\n 25% 0%, \r\n 75% 0%, \r\n 100% 50%, \r\n 75% 100%, \r\n 25% 100%, \r\n 0% 50% \r\n )}.lido-cone{width:var(--coneWidth);height:var(--coneHeight);background-color:var(--bgColor);clip-path:polygon(\r\n \r\n 15% 10%,\r\n 25% 4%,\r\n 35% 1%,\r\n 50% 0%,\r\n 65% 1%,\r\n 75% 4%,\r\n 85% 10%,\r\n\r\n \r\n 50% 100%\r\n )}.lido-star{width:var(--starWidth);height:var(--starHeight);background-color:var(--starBgColor);clip-path:polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%)}.lido-pentagon{width:var(--pentagonWidth);height:var(--pentagonHeight);background-color:var(--pentagonBgColor);clip-path:polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%)}.lido-heptagon{width:var(--heptagonWidth);height:var(--heptagonHeight);background-color:var(--heptagonBgColor);clip-path:polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%)}.lido-octagon{width:var(--octagonWidth);height:var(--octagonHeight);background-color:var(--octagonBgColor);clip-path:polygon(25% 0%, 75% 0%, 100% 25%, 100% 75%, 75% 100%, 25% 100%, 0% 75%, 0% 25%)}.lido-rhombus{width:var(--rhombusWidth);height:var(--rhombusHeight);background-color:var(--rhombusBgColor);clip-path:polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)}.lido-heart{height:var(--heartHeight);width:var(--heartWidth);border-image:radial-gradient(var(--heartBgColor) 69%, #0000 70%) 84.5%/50%;clip-path:polygon(-41% 0, 50% 91%, 141% 0)}.cube{width:100%;height:100%;position:relative;transform-style:preserve-3d;transform:rotateX(-20deg) rotateY(45deg)}.face{position:absolute;width:var(--face-width,150px);height:var(--face-width,150px);background:var(--face-bg-color,150px);box-shadow:inset -20px -20px 40px rgba(0,0,0,0.3)}.front{transform:rotateY( 0deg) translateZ(var(--face-translate, 75px))}.back{transform:rotateY(180deg) translateZ(var(--face-translate, 75px))}.right{transform:rotateY( 90deg) translateZ(var(--face-translate, 75px))}.left{transform:rotateY(-90deg) translateZ(var(--face-translate, 75px))}.top{transform:rotateX( 90deg) translateZ(var(--face-translate, 75px))}.bottom{transform:rotateX(-90deg) translateZ(var(--face-translate, 75px))}.lido-cylinder{width:var(--width);height:var(--height);border-radius:100% / 80px;background:radial-gradient(50% 40px at 50% 40px, #0003 99.99%, #0000 0),\r\n radial-gradient(50% 40px at 50% calc(100% - 40px), #fff3 99.99%, #0000 0),\r\n red}";
14157
14169
  const LidoShapeStyle0 = lidoShapeCss;
14158
14170
 
14159
14171
  const LidoShape = class {
@@ -14183,6 +14195,7 @@ const LidoShape = class {
14183
14195
  this.margin = '';
14184
14196
  this.delayVisible = '';
14185
14197
  this.disableSpeak = false;
14198
+ this.style = {};
14186
14199
  }
14187
14200
  /**
14188
14201
  * Lifecycle hook that runs after the component is loaded into the DOM.
@@ -14191,20 +14204,46 @@ const LidoShape = class {
14191
14204
  componentDidLoad() {
14192
14205
  setVisibilityWithDelay(this.el, this.delayVisible);
14193
14206
  initEventsForElement(this.el, this.type);
14207
+ this.updateStyles();
14208
+ this.lido3DShapes();
14209
+ }
14210
+ updateStyles() {
14211
+ const orientation = window.innerHeight > window.innerWidth ? 'portrait' : 'landscape';
14212
+ this.style = {
14213
+ x: parseProp(`${this.x}`, orientation),
14214
+ y: parseProp(`${this.y}`, orientation),
14215
+ height: parseProp(`${this.height}`, orientation),
14216
+ width: parseProp(`${this.width}`, orientation),
14217
+ };
14218
+ }
14219
+ lido3DShapes() {
14220
+ const orientation = window.innerHeight > window.innerWidth ? 'portrait' : 'landscape';
14221
+ if (this.shapeType === "lido-cube") {
14222
+ const faces = this.el.querySelectorAll(".face");
14223
+ faces.forEach(item => {
14224
+ const face = item;
14225
+ face.style.setProperty("--face-width", parseProp(`${this.width}`, orientation));
14226
+ const translateValue = parseInt(parseProp(`${this.width}`, orientation)) / 2;
14227
+ console.log("translate : ", translateValue);
14228
+ face.style.setProperty("--face-translate", `${translateValue}px`);
14229
+ face.style.setProperty("--face-bg-color", this.bgColor);
14230
+ });
14231
+ }
14194
14232
  }
14195
14233
  render() {
14196
14234
  // Inline styles to position and size the shape component
14197
14235
  const style = {
14198
- height: this.shapeType !== 'polygon' ? this.height : undefined, // Set height unless it's a polygon
14199
- width: this.shapeType !== 'polygon' ? this.width : undefined, // Set width unless it's a polygon
14200
- top: this.y,
14201
- left: this.x,
14236
+ height: this.shapeType !== 'polygon' ? this.style.height : undefined, // Set height unless it's a polygon
14237
+ width: this.shapeType !== 'polygon' ? this.style.width : undefined, // Set width unless it's a polygon
14238
+ top: this.style.y,
14239
+ left: this.style.x,
14202
14240
  display: this.visible ? 'block' : 'none', // Toggle visibility
14203
14241
  zIndex: this.z,
14204
14242
  backgroundColor: this.shapeType !== 'polygon' ? this.bgColor : 'transparent', // Apply background only if not a polygon
14205
14243
  margin: this.margin,
14206
14244
  };
14207
- return (h(Host, { key: '7a626d9f00854cf190c08524153086d0e9f139af', 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 }));
14245
+ 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" &&
14246
+ 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" }))));
14208
14247
  }
14209
14248
  get el() { return getElement(this); }
14210
14249
  };
@@ -14403,7 +14442,7 @@ const LidoSlideFill = class {
14403
14442
  }
14404
14443
  }
14405
14444
  render() {
14406
- return (h(Host, { key: '3918ed476b3de4977c53ff0bf576253f68e8c84f', id: this.id, class: "lido-slide-fill", src: this.src, fill: this.fill, fillDirection: this.fillDirection, slider: this.slider, style: this.style, min: this.min, max: this.max, division: this.division, numberType: this.numberType, onEntry: this.onEntry, type: this.type, "disable-speak": this.disableSpeak }, h("div", { key: '8f54b0e5de490a162aaa1d7ac9ed485d1628c484', innerHTML: this.svgContent, class: "svg-element" })));
14445
+ 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" })));
14407
14446
  }
14408
14447
  get el() { return getElement(this); }
14409
14448
  static get watchers() { return {
@@ -14473,6 +14512,30 @@ const LidoText = class {
14473
14512
  if (this.showSpeakIcon) {
14474
14513
  attachSpeakIcon(this.el);
14475
14514
  }
14515
+ if (!this.audio || this.audio.trim() === "") {
14516
+ const applyAutoAudio = () => {
14517
+ const autoAudio = this.resolveAutoAudio();
14518
+ if (autoAudio) {
14519
+ this.audio = autoAudio;
14520
+ console.log("[LidoText] Auto audio applied:", autoAudio);
14521
+ }
14522
+ };
14523
+ // If path is already available, apply immediately
14524
+ if (window.__LIDO_COMMON_AUDIO_PATH__) {
14525
+ applyAutoAudio();
14526
+ }
14527
+ else {
14528
+ // Otherwise, wait for it
14529
+ window.addEventListener(LIDO_COMMON_AUDIO_READY_EVENT, applyAutoAudio, { once: true });
14530
+ }
14531
+ }
14532
+ }
14533
+ resolveAutoAudio() {
14534
+ const base = window[LIDO_COMMON_AUDIO_PATH];
14535
+ if (!base || !this.string)
14536
+ return null;
14537
+ const fileName = this.string.toLowerCase().trim().replace(/\s+/g, "_").replace(/[^\w-]/g, "");
14538
+ return `${base}/${fileName}.mp3`;
14476
14539
  }
14477
14540
  /**
14478
14541
  * Lifecycle method that runs before the component is rendered.
@@ -14538,7 +14601,7 @@ const LidoText = class {
14538
14601
  }
14539
14602
  }
14540
14603
  render() {
14541
- return (h(Host, { key: '89ed432cbbf1f3ca2cdcaf4df80628350badef6d', 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" }, " ", instance.t(this.string)) : instance.t(this.string)));
14604
+ 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" }, " ", instance.t(this.string)) : instance.t(this.string)));
14542
14605
  }
14543
14606
  get el() { return getElement(this); }
14544
14607
  };
@@ -14932,7 +14995,7 @@ const LidoTrace = class {
14932
14995
  });
14933
14996
  }
14934
14997
  // Modified handlePointerMove function
14935
- handlePointerMove(state) {
14998
+ async handlePointerMove(state) {
14936
14999
  var _a, _b, _c, _d, _e, _f;
14937
15000
  if (!state.isDragging)
14938
15001
  return;
@@ -15079,13 +15142,15 @@ const LidoTrace = class {
15079
15142
  }
15080
15143
  (_f = currentPath.greenPath) === null || _f === void 0 ? void 0 : _f.setAttribute('stroke-dashoffset', (state.totalPathLength - state.lastLength).toString());
15081
15144
  // Completion logic for closed paths: only allow completion if almost all points are traced
15082
- const COMPLETION_THRESHOLD = 0.90; // 90% of the path must be traced
15145
+ const COMPLETION_THRESHOLD = 0.95; // 95% of the path must be traced
15083
15146
  let percentComplete = state.lastLength / state.totalPathLength;
15084
15147
  let startPoint = currentPath.getPointAtLength(0);
15085
15148
  let endPoint = currentPath.getPointAtLength(currentPath.getTotalLength());
15086
15149
  let pathIsClosed = this.getDistanceSquared(startPoint, endPoint) < 200; // threshold for overlap
15087
15150
  if (pathIsClosed && state.totalPathLength > 50) {
15088
15151
  if (percentComplete >= COMPLETION_THRESHOLD) {
15152
+ // Animate the draggable circle & green trace to the very end, then proceed
15153
+ await this.animatePathToEnd(state, currentPath);
15089
15154
  if (state.currentPathIndex < state.paths.length - 1) {
15090
15155
  this.moveToNextPath(state);
15091
15156
  }
@@ -15106,6 +15171,55 @@ const LidoTrace = class {
15106
15171
  }
15107
15172
  // this.resetIdleTimer(state); // ← keep timer alive
15108
15173
  }
15174
+ // Smoothly animate the draggable circle + green stroke from current lastLength to totalPathLength
15175
+ animatePathToEnd(state, path, duration = 300) {
15176
+ if (!path || !state.svg)
15177
+ return Promise.resolve();
15178
+ if (state._animatingToEnd)
15179
+ return Promise.resolve();
15180
+ state._animatingToEnd = true;
15181
+ const start = state.lastLength || 0;
15182
+ const end = path.getTotalLength();
15183
+ const startTime = performance.now();
15184
+ // get greenPath safely: prefer the attached property, otherwise query by class near the original path
15185
+ const greenPath = path.greenPath ||
15186
+ (path.parentNode && path.parentNode.querySelector('.lido-trace-path-green'));
15187
+ return new Promise(resolve => {
15188
+ const step = (now) => {
15189
+ const t = Math.min(1, (now - startTime) / duration);
15190
+ const eased = t; // linear easing
15191
+ const currentLen = start + (end - start) * eased;
15192
+ state.lastLength = currentLen;
15193
+ // update circle position and green path dashoffset
15194
+ const pt = path.getPointAtLength(currentLen);
15195
+ if (state.circle) {
15196
+ state.circle.setAttribute('cx', pt.x.toString());
15197
+ state.circle.setAttribute('cy', pt.y.toString());
15198
+ }
15199
+ if (greenPath) {
15200
+ greenPath.setAttribute('stroke-dashoffset', (state.totalPathLength - currentLen).toString());
15201
+ }
15202
+ if (t < 1) {
15203
+ requestAnimationFrame(step);
15204
+ }
15205
+ else {
15206
+ // ensure fully complete
15207
+ state.lastLength = end;
15208
+ if (state.circle) {
15209
+ const finalPt = path.getPointAtLength(end);
15210
+ state.circle.setAttribute('cx', finalPt.x.toString());
15211
+ state.circle.setAttribute('cy', finalPt.y.toString());
15212
+ }
15213
+ if (greenPath) {
15214
+ greenPath.setAttribute('stroke-dashoffset', '0');
15215
+ }
15216
+ state._animatingToEnd = false;
15217
+ resolve();
15218
+ }
15219
+ };
15220
+ requestAnimationFrame(step);
15221
+ });
15222
+ }
15109
15223
  // Move to the next container after completing the current SVG
15110
15224
  async moveToNextContainer() {
15111
15225
  this.isDragging = false;
@@ -15118,6 +15232,7 @@ const LidoTrace = class {
15118
15232
  if (this.animationTrace) {
15119
15233
  await this.playTraceAnimation();
15120
15234
  }
15235
+ storingEachActivityScore(true);
15121
15236
  console.log(`Moving to next container after SVG index: ${this.currentSvgIndex}`);
15122
15237
  const delay = 1000; // milliseconds
15123
15238
  if (this.currentSvgIndex < this.svgUrls.length - 1) {
@@ -15132,6 +15247,7 @@ const LidoTrace = class {
15132
15247
  if (this.el && this.onCorrect) {
15133
15248
  await executeActions(this.onCorrect, this.el);
15134
15249
  }
15250
+ calculateScore();
15135
15251
  console.log('All SVGs completed, hiding component.');
15136
15252
  triggerNextContainer();
15137
15253
  }
@@ -15332,7 +15448,7 @@ const LidoTrace = class {
15332
15448
  };
15333
15449
  }
15334
15450
  render() {
15335
- return (h(Host, { key: '3f12119394502b6750874aaa50f43bf42e9f63cc', 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: '4fddd90d12251c4020006690f8c769ab452c8f6a', style: this.style, id: "lido-svgContainer" })));
15451
+ 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" })));
15336
15452
  }
15337
15453
  static get assetsDirs() { return ["svg", "images"]; }
15338
15454
  get el() { return getElement(this); }
@@ -15420,7 +15536,7 @@ const LidoWrap = class {
15420
15536
  };
15421
15537
  }
15422
15538
  render() {
15423
- return (h(Host, { key: '50bc5770105477d0ef7cb080957c8d00198c8b09', 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: 'fcd1f5801e34171d1925e39f6c543f229a5d42bd' })));
15539
+ 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' })));
15424
15540
  }
15425
15541
  get el() { return getElement(this); }
15426
15542
  };