lido-player 0.0.2-alpha-27 → 0.0.2-alpha-29

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 (61) hide show
  1. package/dist/cjs/index.cjs.js +1 -1
  2. package/dist/cjs/lido-avatar_18.cjs.entry.js +67 -30
  3. package/dist/cjs/{utils-0c09d26d.js → utils-89ed7190.js} +38 -13
  4. package/dist/collection/components/home/lido-home.js +6 -4
  5. package/dist/collection/components/trace/lido-trace.css +8 -1
  6. package/dist/collection/components/trace/lido-trace.js +58 -23
  7. package/dist/collection/css/index.css +1 -1
  8. package/dist/collection/utils/utils.js +4 -3
  9. package/dist/collection/utils/utilsHandlers/dragDropHandler.js +3 -1
  10. package/dist/collection/utils/utilsHandlers/slideHandler.js +32 -10
  11. package/dist/components/index.js +1 -1
  12. package/dist/components/lido-avatar.js +1 -1
  13. package/dist/components/lido-cell.js +1 -1
  14. package/dist/components/lido-col.js +1 -1
  15. package/dist/components/lido-container.js +1 -1
  16. package/dist/components/lido-flash-card.js +1 -1
  17. package/dist/components/lido-float.js +1 -1
  18. package/dist/components/lido-home.js +1 -1
  19. package/dist/components/lido-image.js +1 -1
  20. package/dist/components/lido-keyboard.js +1 -1
  21. package/dist/components/lido-pos.js +1 -1
  22. package/dist/components/lido-random.js +1 -1
  23. package/dist/components/lido-root.js +18 -18
  24. package/dist/components/lido-row.js +1 -1
  25. package/dist/components/lido-shape.js +1 -1
  26. package/dist/components/lido-slide-fill.js +1 -1
  27. package/dist/components/lido-text.js +1 -1
  28. package/dist/components/lido-trace.js +1 -1
  29. package/dist/components/lido-wrap.js +1 -1
  30. package/dist/components/{p-432b0664.js → p-0ed0b0ff.js} +59 -24
  31. package/dist/components/{p-0ba556d0.js → p-15056642.js} +1 -1
  32. package/dist/components/{p-bc0301c2.js → p-22c77540.js} +1 -1
  33. package/dist/components/{p-8cfa45d4.js → p-2b7b189d.js} +1 -1
  34. package/dist/components/{p-9db82913.js → p-2ced2788.js} +1 -1
  35. package/dist/components/{p-1f5fb263.js → p-3f486828.js} +1 -1
  36. package/dist/components/{p-cc2f200f.js → p-60343c4b.js} +1 -1
  37. package/dist/components/{p-8e76fc76.js → p-659a6384.js} +24 -22
  38. package/dist/components/{p-2ad42ff6.js → p-79d9b7fa.js} +1 -1
  39. package/dist/components/{p-258a62fd.js → p-823e60c0.js} +1 -1
  40. package/dist/components/{p-7b450f84.js → p-8d9a8376.js} +2 -2
  41. package/dist/components/{p-5052cdfe.js → p-b3ddef4b.js} +1 -1
  42. package/dist/components/{p-3b573a3a.js → p-be639b43.js} +1 -1
  43. package/dist/components/{p-996087bc.js → p-c17db989.js} +1 -1
  44. package/dist/components/{p-c1df8ab6.js → p-e331a835.js} +38 -13
  45. package/dist/components/{p-8f9011c1.js → p-e54f9a0f.js} +1 -1
  46. package/dist/components/{p-b5b10d9e.js → p-ec51e1cd.js} +1 -1
  47. package/dist/components/{p-c7b72293.js → p-f31e0ade.js} +1 -1
  48. package/dist/esm/index.js +1 -1
  49. package/dist/esm/lido-avatar_18.entry.js +67 -30
  50. package/dist/esm/{utils-9f655741.js → utils-ef23e682.js} +38 -13
  51. package/dist/lido-player/index.esm.js +1 -1
  52. package/dist/lido-player/lido-player.css +1 -1
  53. package/dist/lido-player/lido-player.esm.js +1 -1
  54. package/dist/lido-player/{p-f2da469c.entry.js → p-3ee8ad9b.entry.js} +1 -1
  55. package/dist/lido-player/{p-b29cf347.js → p-3ff53028.js} +2 -2
  56. package/dist/types/components/home/lido-home.d.ts +1 -1
  57. package/dist/types/components/trace/lido-trace.d.ts +1 -1
  58. package/package.json +1 -1
  59. package/dist/collection/components/home/AudioIcon.svg +0 -5
  60. package/dist/collection/components/home/Close.svg +0 -3
  61. package/dist/collection/components/home/Previous.svg +0 -3
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const utils = require('./utils-0c09d26d.js');
5
+ const utils = require('./utils-89ed7190.js');
6
6
  require('./index-fe562525.js');
7
7
 
8
8
 
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-fe562525.js');
6
- const utils = require('./utils-0c09d26d.js');
6
+ const utils = require('./utils-89ed7190.js');
7
7
 
8
8
  var rive = {exports: {}};
9
9
 
@@ -7086,7 +7086,7 @@ const LidoFloat = class {
7086
7086
  };
7087
7087
  LidoFloat.style = LidoFloatStyle0;
7088
7088
 
7089
- 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}.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:145px}.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}";
7089
+ 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}.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}";
7090
7090
  const LidoHomeStyle0 = indexCss;
7091
7091
 
7092
7092
  const animationCss = "@keyframes rightToPlace{from{transform:translateX(2000px)}to{transform:translateX(0)}}@keyframes topToPlace{from{transform:translateY(-1000px)}to{transform:translateY(0)}}@keyframes bottomToPlace{from{transform:translateY(1000px)}to{transform:translateY(0)}}@keyframes placeToLeft{from{}to{transform:translateX(-2000px)}}@keyframes leftToPlace{from{transform:translateX(-2000px)}to{transform:translateX(0)}}@keyframes shake{0%{transform:translateX(0)}10%{transform:translateX(-5px)}20%{transform:translateX(5px)}30%{transform:translateX(-5px)}40%{transform:translateX(5px)}50%{transform:translateX(-5px)}60%{transform:translateX(5px)}70%{transform:translateX(-5px)}80%{transform:translateX(5px)}90%{transform:translateX(-5px)}100%{transform:translateX(0)}}@keyframes fallAndBounce{0%{transform:translateY(-1000px)}25%{transform:translateY(0px)}50%{transform:translateY(-200px)}75%{transform:translateY(0)}90%{transform:translateY(-100px)}100%{transform:translateY(0)}}@keyframes placeToDown{0%{transform:translateY(0)}100%{transform:translateY(1000px)}}@keyframes strongShake{0%{transform:translateX(0)}20%{transform:translateX(-8px)}40%{transform:translateX(8px)}60%{transform:translateX(-6px)}80%{transform:translateX(6px)}100%{transform:translateX(0)}}@keyframes scaledShake{0%{transform:scale(1) translateX(0);box-shadow:0 0 0 transparent}20%{transform:scale(1.10) translateX(-12px);box-shadow:0 0 10px red}40%{transform:scale(1.10) translateX(12px);box-shadow:0 0 12px red}60%{transform:scale(1.10) translateX(-8px);box-shadow:0 0 10px red}80%{transform:scale(1.10) translateX(8px);box-shadow:0 0 12px red}100%{transform:scale(1) translateX(0);box-shadow:none}}@keyframes horizontalShake{0%{transform:scale(1) translateX(0);background-color:transparent}20%{transform:translateX(-20px);background-color:rgba(255, 0, 0, 0.2)}40%{transform:translateX(20px);background-color:rgba(255, 0, 0, 0.4)}60%{transform:translateX(-10px);background-color:rgba(255, 0, 0, 0.3)}80%{transform:translateX(10px);background-color:rgba(255, 0, 0, 0.2)}100%{transform:translateX(0);background-color:transparent}}@keyframes verticalShake{0%{transform:translateY(0);background-color:transparent}20%{transform:translateY(-20px);background-color:rgba(255, 0, 0, 0.2)}40%{transform:translateY(0);background-color:rgba(255, 0, 0, 0.4)}60%{transform:translateY(20px);background-color:rgba(255, 0, 0, 0.2)}80%{transform:translateY(0);background-color:rgba(255, 0, 0, 0.1)}100%{transform:translateY(0);background-color:transparent}}@keyframes diagonalShake{0%{transform:translate(0, 0);background-color:transparent}25%{transform:translate(20px, -20px);background-color:rgba(255, 0, 0, 0.2)}50%{transform:translate(-20px, 20px);background-color:rgba(255, 0, 0, 0.3)}75%{transform:translate(10px, -10px);background-color:rgba(255, 0, 0, 0.2)}100%{transform:translate(0, 0);background-color:transparent}}";
@@ -7124,7 +7124,7 @@ const LidoHome = class {
7124
7124
  // const event = new CustomEvent('gameCompleted');
7125
7125
  // window.dispatchEvent(event);
7126
7126
  utils.dispatchGameCompletedEvent();
7127
- // this.currentContainerIndex = 0;
7127
+ this.currentContainerIndex = null;
7128
7128
  }
7129
7129
  // Reset the containers array to trigger a re-render
7130
7130
  this.containers = [...this.containers];
@@ -7148,6 +7148,8 @@ const LidoHome = class {
7148
7148
  this.updateArrowVisibility = () => {
7149
7149
  setTimeout(() => {
7150
7150
  const containerElement = this.el.querySelector('lido-container');
7151
+ if (!containerElement)
7152
+ return;
7151
7153
  const prevbtn = containerElement.getAttribute('show-prev-button');
7152
7154
  const nextbtn = containerElement.getAttribute('show-next-button');
7153
7155
  const rightbtn = this.el.querySelector('#lido-arrow-right');
@@ -7396,14 +7398,14 @@ const LidoHome = class {
7396
7398
  return (index.h("div", { id: "lido-dot-indicator", class: "lido-dot-container" }, index.h("div", { class: "lido-exit-button popup\n -button", onClick: () => {
7397
7399
  this.exitFlag = true;
7398
7400
  utils.AudioPlayer.getI().stop();
7399
- } }, index.h("lido-image", { src: "./Close.svg" })), index.h("div", { class: "lido-btn-dot-container" }, index.h("div", { id: "lido-arrow-left", onClick: () => {
7401
+ } }, index.h("lido-image", { src: "https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/Navbar-buttons/Close.svg" })), index.h("div", { class: "lido-btn-dot-container" }, index.h("div", { id: "lido-arrow-left", onClick: () => {
7400
7402
  utils.triggerPrevcontainer();
7401
- } }, index.h("lido-image", { src: "./Previous.svg" })), this.containers.map((_, index$1) => (index.h("div", { class: "parent_dots" }, index.h("span", { class: `lido-dot ${index$1 < this.currentContainerIndex ? 'completed' : index$1 === this.currentContainerIndex ? 'current' : ''}`, onClick: () => this.jumpToContainer(index$1), style: style })))), index.h("div", { id: "lido-arrow-right", onClick: event => {
7403
+ } }, index.h("lido-image", { src: "https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/Navbar-buttons/Previous.svg" })), this.containers.map((_, index$1) => (index.h("div", { class: "parent_dots" }, index.h("span", { class: `lido-dot ${index$1 < this.currentContainerIndex ? 'completed' : index$1 === this.currentContainerIndex ? 'current' : ''}`, onClick: () => this.jumpToContainer(index$1), style: style })))), index.h("div", { id: "lido-arrow-right", onClick: event => {
7402
7404
  console.log('Target:', event.target); // What was clicked
7403
7405
  console.log('Current Target:', event.currentTarget); // Where the onClick is bound
7404
7406
  console.log('✅ Button clicked - nextBtn action triggered');
7405
7407
  utils.executeActions("this.nextBtn='true'", event.currentTarget);
7406
- } }, index.h("lido-image", { src: "./Previous.svg" }))), index.h("div", { id: "main-audio", class: "popup-button", onClick: () => this.btnpopup() }, index.h("lido-image", { visible: "true", src: "./AudioIcon.svg" }))));
7408
+ } }, index.h("lido-image", { src: "https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/Navbar-buttons/Next.svg" }))), index.h("div", { id: "main-audio", class: "popup-button", onClick: () => this.btnpopup() }, index.h("lido-image", { visible: "true", src: "https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/Navbar-buttons/Audio%20icon.svg" }))));
7407
7409
  }
7408
7410
  /**
7409
7411
  * Jumps to a specific container based on the index of the dot clicked.
@@ -11056,7 +11058,7 @@ const LidoText = class {
11056
11058
  };
11057
11059
  LidoText.style = LidoTextStyle0;
11058
11060
 
11059
- const lidoTraceCss = ":host{display:block;position:relative}#lido-svgContainer{display:flex;justify-content:center;align-items:center;overflow:hidden}svg{width:100%;height:100%;max-height:calc(100vh - 50px);touch-action:none}#lido-draggableCircle{cursor:pointer;fill:red;transition:fill 0.2s, r 0.2s}.lido-blindTracing{stroke:none !important}.lido-blindFreeTrace{stroke:none !important}.lido-hovered{cursor:grab;fill:darkred}#lido-controls{position:fixed;bottom:0;left:0;right:0;display:flex;justify-content:space-between;padding:10px;background-color:#f0f0f0;border-top:1px solid #ccc}button{padding:10px;font-size:16px}@media (max-width: 600px){button{padding:8px;font-size:14px}}.lido-trace-path-green{}.lido-trace{height:700px;width:700px;z-index:1;justify-items:center;align-content:center}.trace-animate{animation:trace-bounce 0.5s}@keyframes trace-bounce{0%{transform:scale(1)}30%{transform:scale(1.05)}60%{transform:scale(0.95)}100%{transform:scale(1)}}";
11061
+ const lidoTraceCss = ":host{display:block;position:relative}#lido-svgContainer{display:flex;justify-content:center;align-items:center;overflow:hidden}svg{width:100%;height:100%;max-height:calc(100vh - 50px);touch-action:none}#lido-draggableCircle{cursor:pointer;fill:#81C127;transition:fill 0.2s, r 0.2s}.lido-blindTracing{stroke:none !important}.lido-blindFreeTrace{stroke:none !important}.lido-hovered{cursor:grab;fill:darkred}#lido-controls{position:fixed;bottom:0;left:0;right:0;display:flex;justify-content:space-between;padding:10px;background-color:#f0f0f0;border-top:1px solid #ccc}button{padding:10px;font-size:16px}@media (max-width: 600px){button{padding:8px;font-size:14px}}.lido-trace-path-green{}.lido-flow-indicator{stroke:blue;stroke-width:2;stroke-dasharray:6, 6;fill:none}.lido-trace{height:700px;width:700px;z-index:1;justify-items:center;align-content:center}.trace-animate{animation:trace-bounce 0.5s}@keyframes trace-bounce{0%{transform:scale(1)}30%{transform:scale(1.05)}60%{transform:scale(0.95)}100%{transform:scale(1)}}";
11060
11062
  const LidoTraceStyle0 = lidoTraceCss;
11061
11063
 
11062
11064
  const LidoTrace = class {
@@ -11078,7 +11080,7 @@ const LidoTrace = class {
11078
11080
  this.ariaHidden = '';
11079
11081
  this.tabIndex = 0;
11080
11082
  this.mode = utils.TraceMode.ShowFlow;
11081
- this.fingerHintUrl = 'https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/trace/finger.png';
11083
+ this.fingerHintUrl = 'https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/trace/Tracing-hand.svg';
11082
11084
  this.onInCorrect = undefined;
11083
11085
  this.onCorrect = undefined;
11084
11086
  this.highlightTextId = '';
@@ -11258,26 +11260,61 @@ const LidoTrace = class {
11258
11260
  getPaths(svg) {
11259
11261
  return Array.from(svg.querySelectorAll('path, line'));
11260
11262
  }
11261
- // Create flow markers along the path to guide the user
11262
- createFlowMarkersForPath(path, markerCount = 10) {
11263
+ // Create a single dotted line with an arrow at the end for the entire path
11264
+ createFlowMarkersForPath(path) {
11263
11265
  var _a;
11264
- const totalLength = path.getTotalLength();
11265
- const interval = totalLength / (markerCount + 1); // Space markers evenly
11266
- const markers = [];
11267
- for (let i = 1; i <= markerCount; i++) {
11268
- const point = path.getPointAtLength(i * interval);
11269
- const nextPoint = path.getPointAtLength((i + 0.5) * interval); // Slightly ahead point for direction
11270
- // Create an arrow marker
11271
- const angle = Math.atan2(nextPoint.y - point.y, nextPoint.x - point.x);
11272
- const arrowMarker = document.createElementNS('http://www.w3.org/2000/svg', 'polygon');
11273
- arrowMarker.setAttribute('points', '-5,-5 0,0 -5,5');
11274
- arrowMarker.setAttribute('fill', 'blue');
11275
- arrowMarker.setAttribute('transform', `translate(${point.x},${point.y}) rotate(${(angle * 180) / Math.PI})`);
11276
- arrowMarker.setAttribute('class', 'lido-flow-indicator');
11277
- markers.push(arrowMarker);
11278
- (_a = path.parentNode) === null || _a === void 0 ? void 0 : _a.appendChild(arrowMarker); // Append to the same SVG container
11279
- }
11280
- return markers;
11266
+ if (!path)
11267
+ return;
11268
+ const svg = path.ownerSVGElement;
11269
+ if (!svg)
11270
+ return;
11271
+ // --- 1. Create the dotted line that follows the same path ---
11272
+ // Create a new <path> element that will visually represent the flow (dotted line)
11273
+ const dottedLine = document.createElementNS('http://www.w3.org/2000/svg', 'path');
11274
+ // Copy the "d" (path drawing instructions) from the original path
11275
+ dottedLine.setAttribute('d', path.getAttribute('d') || '');
11276
+ dottedLine.setAttribute('stroke', 'blue');
11277
+ dottedLine.setAttribute('stroke-width', '2');
11278
+ // Define a repeating pattern of dashes: "6 units on, 6 units off"
11279
+ dottedLine.setAttribute('stroke-dasharray', '6,6');
11280
+ dottedLine.setAttribute('fill', 'none');
11281
+ // Add a class name for styling or later querying
11282
+ dottedLine.setAttribute('class', 'lido-flow-indicator');
11283
+ (_a = path.parentNode) === null || _a === void 0 ? void 0 : _a.appendChild(dottedLine);
11284
+ // --- 2. Ensure we only add <defs> + marker once per SVG ---
11285
+ // Look for an existing <defs> section with our custom ID inside the SVG
11286
+ let defs = svg.querySelector('defs#lido-flow-defs');
11287
+ // If it doesn’t exist, create one and insert it at the top of the SVG
11288
+ if (!defs) {
11289
+ defs = document.createElementNS('http://www.w3.org/2000/svg', 'defs');
11290
+ defs.setAttribute('id', 'lido-flow-defs');
11291
+ svg.insertBefore(defs, svg.firstChild); // defs should usually be at the beginning
11292
+ }
11293
+ // --- 3. Create a unique marker for this path ---
11294
+ const uniqueId = `arrow-${Math.random().toString(36)}`;
11295
+ // Create the <marker> element that defines the arrowhead
11296
+ const marker = document.createElementNS('http://www.w3.org/2000/svg', 'marker');
11297
+ marker.setAttribute('id', uniqueId);
11298
+ // Set the width/height of the marker viewport (10x10 units)
11299
+ marker.setAttribute('markerWidth', '10');
11300
+ marker.setAttribute('markerHeight', '10');
11301
+ // Reference point inside the marker (where the path will attach to arrow)
11302
+ marker.setAttribute('refX', '5');
11303
+ marker.setAttribute('refY', '5');
11304
+ // Automatically rotate arrowhead to match the path direction
11305
+ marker.setAttribute('orient', 'auto');
11306
+ // Scale the marker relative to the stroke width of the path
11307
+ marker.setAttribute('markerUnits', 'strokeWidth');
11308
+ // --- Create the arrow shape itself ---
11309
+ const arrowPath = document.createElementNS('http://www.w3.org/2000/svg', 'path');
11310
+ // Define the arrowhead shape using SVG path commands
11311
+ arrowPath.setAttribute('d', 'M0,0 L10,5 L0,10 L2,5 Z');
11312
+ arrowPath.setAttribute('fill', 'blue');
11313
+ marker.appendChild(arrowPath);
11314
+ defs.appendChild(marker);
11315
+ // --- 4. Attach the arrow marker to the end of the dotted line ---
11316
+ dottedLine.setAttribute('marker-end', `url(#${uniqueId})`);
11317
+ return dottedLine;
11281
11318
  }
11282
11319
  // Show or hide flow indicators based on mode
11283
11320
  updateFlowIndicators(state) {
@@ -11340,8 +11377,8 @@ const LidoTrace = class {
11340
11377
  circle.setAttribute('id', 'lido-draggableCircle');
11341
11378
  circle.setAttribute('cx', firstPathStart.x.toString());
11342
11379
  circle.setAttribute('cy', firstPathStart.y.toString());
11343
- circle.setAttribute('r', `calc(${strokeWidth || 10} / 2)`); // Radius of the draggable circle
11344
- circle.setAttribute('fill', 'red');
11380
+ circle.setAttribute('r', `calc(${strokeWidth || 10} / 3)`); // Radius of the draggable circle
11381
+ circle.setAttribute('fill', '#81C127');
11345
11382
  (_a = state.svg) === null || _a === void 0 ? void 0 : _a.appendChild(circle);
11346
11383
  state.circle = circle;
11347
11384
  this.resetIdleTimer(state); // ← start idle timer once the SVG is ready
@@ -11704,7 +11741,7 @@ const LidoTrace = class {
11704
11741
  };
11705
11742
  }
11706
11743
  render() {
11707
- return (index.h(index.Host, { key: 'ee0e1841a0d3086d453bd29568c53169456a75ca', class: "lido-trace", id: this.id, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, tabindex: this.tabIndex }, index.h("div", { key: 'd3e0ac9c6a51bf307d57b3bba3cddfb02fdf7fc1', style: this.style, id: "lido-svgContainer" })));
11744
+ return (index.h(index.Host, { key: '159d4ee1599806c78c3437907778c240c814711c', class: "lido-trace", id: this.id, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, tabindex: this.tabIndex }, index.h("div", { key: 'fa3231b10e80e786fe4967059560a6cdc6749063', style: this.style, id: "lido-svgContainer" })));
11708
11745
  }
11709
11746
  static get assetsDirs() { return ["svg", "images"]; }
11710
11747
  get el() { return index.getElement(this); }
@@ -982,7 +982,7 @@ const findMostoverlappedElement = (element, type) => {
982
982
  if (type === 'slide') {
983
983
  const elementArea = elementRect.width * elementRect.height;
984
984
  const otherArea = otherRect.width * otherRect.height;
985
- const minRequiredOverlap = Math.min(elementArea, otherArea) * 0.8;
985
+ const minRequiredOverlap = Math.min(elementArea, otherArea) * 0.1;
986
986
  if (overlapArea >= minRequiredOverlap && overlapArea > maxOverlapArea) {
987
987
  maxOverlapArea = overlapArea;
988
988
  mostOverlappedElement = otherElement;
@@ -1177,6 +1177,8 @@ async function onElementDropComplete(dragElement, dropElement) {
1177
1177
  container.append(div);
1178
1178
  div.classList.add('after-drop-popup-container');
1179
1179
  const hasType = dragElement.nextElementSibling;
1180
+ dragElement.style.scale = `1`;
1181
+ dropElement.style.scale = `1`;
1180
1182
  // Remove from old parents
1181
1183
  if (hasType && hasType.getAttribute('type') === 'drag') {
1182
1184
  dragElement.remove();
@@ -1582,6 +1584,9 @@ function slidingWithScaling(element) {
1582
1584
  let initialX = 0;
1583
1585
  let initialY = 0;
1584
1586
  element.classList.add('drag-element');
1587
+ let elementRect;
1588
+ let elementLeft;
1589
+ let elementTop;
1585
1590
  // slideNumbers(element);
1586
1591
  // Fetch the container element
1587
1592
  const parentElement = element.parentElement;
@@ -1592,6 +1597,9 @@ function slidingWithScaling(element) {
1592
1597
  const onStart = (event) => {
1593
1598
  removeHighlight(element);
1594
1599
  isDragging = true;
1600
+ elementRect = element.getBoundingClientRect();
1601
+ elementLeft = elementRect.left;
1602
+ elementTop = elementRect.top;
1595
1603
  if (event instanceof MouseEvent) {
1596
1604
  startX = event.clientX;
1597
1605
  startY = event.clientY;
@@ -1653,7 +1661,7 @@ function slidingWithScaling(element) {
1653
1661
  dx = (event.touches[0].clientX - startX) / parentElementScale;
1654
1662
  dy = (event.touches[0].clientY - startY) / parentElementScale;
1655
1663
  }
1656
- const speedMultiplier = 1.5;
1664
+ const speedMultiplier = 1 / calculateScale();
1657
1665
  const newLeft = initialX + dx * speedMultiplier;
1658
1666
  const newTop = initialY + dy * speedMultiplier;
1659
1667
  // Get the dimensions and scale-corrected position of the container and element
@@ -1678,21 +1686,37 @@ function slidingWithScaling(element) {
1678
1686
  // Apply styles only to the most overlapped element
1679
1687
  if (mostOverlappedElement) {
1680
1688
  if (mostOverlappedElement != element) {
1689
+ isDragging = false;
1681
1690
  const parent1 = element.parentElement;
1682
1691
  const parent2 = mostOverlappedElement.parentElement;
1692
+ const overlapRect = mostOverlappedElement.getBoundingClientRect();
1693
+ const container = document.getElementById(LidoContainer);
1694
+ const containerScale = getElementScale(container);
1695
+ const dropCenterX = elementLeft + elementRect.width / 2;
1696
+ const dropCenterY = elementTop + elementRect.height / 2;
1697
+ const dragCenterX = overlapRect.left + overlapRect.width / 2;
1698
+ const dragCenterY = overlapRect.top + overlapRect.height / 2;
1699
+ const scaledLeft = (dropCenterX - dragCenterX) / containerScale;
1700
+ const scaledTop = (dropCenterY - dragCenterY) / containerScale;
1701
+ mostOverlappedElement.style.transition = 'transform 0.3s ease';
1702
+ element.style.transition = 'transform 0.3s ease';
1683
1703
  if (parent1 && parent2) {
1684
- mostOverlappedElement.style.transform = 'translate(0, 0)';
1685
- mostOverlappedElement.style.transition = '';
1686
1704
  // Temporarily detach both elements
1687
1705
  const elementPlaceholder = document.createComment('element-placeholder');
1688
1706
  const overlappedPlaceholder = document.createComment('overlapped-placeholder');
1689
- parent1.replaceChild(elementPlaceholder, element);
1690
- parent2.replaceChild(overlappedPlaceholder, mostOverlappedElement);
1691
1707
  // Swap the elements
1692
- parent1.replaceChild(mostOverlappedElement, elementPlaceholder);
1693
- parent2.replaceChild(element, overlappedPlaceholder);
1694
- element.style.transform = 'translate(0, 0)';
1695
- element.style.transition = '';
1708
+ mostOverlappedElement.style.transform = `translate(${scaledLeft}px, ${scaledTop}px)`;
1709
+ element.style.transform = `translate(${-scaledLeft}px, ${-scaledTop}px)`;
1710
+ setTimeout(() => {
1711
+ parent1.replaceChild(elementPlaceholder, element);
1712
+ parent2.replaceChild(overlappedPlaceholder, mostOverlappedElement);
1713
+ parent1.replaceChild(mostOverlappedElement, elementPlaceholder);
1714
+ parent2.replaceChild(element, overlappedPlaceholder);
1715
+ mostOverlappedElement.style.transform = 'translate(0, 0)';
1716
+ mostOverlappedElement.style.transition = '';
1717
+ element.style.transform = 'translate(0, 0)';
1718
+ element.style.transition = '';
1719
+ }, 300);
1696
1720
  // Recalculate starting points for the swapped element
1697
1721
  startX = event instanceof MouseEvent ? event.clientX : event.touches[0].clientX;
1698
1722
  startY = event instanceof MouseEvent ? event.clientY : event.touches[0].clientY;
@@ -67951,7 +67975,7 @@ const executeActions = async (actionsString, thisElement, element) => {
67951
67975
  else {
67952
67976
  dragElement.style.transform = `translate(${scaledLeft}px, ${scaledTop}px)`;
67953
67977
  }
67954
- if (dragElement.getAttribute("hasDummy") === "true")
67978
+ if (dragElement.getAttribute('hasDummy') === 'true')
67955
67979
  return;
67956
67980
  afterDropDragHandling(dragElement, dropElement);
67957
67981
  break;
@@ -68052,7 +68076,7 @@ const afterDropDragHandling = (dragElement, dropElement) => {
68052
68076
  dummyElement.removeAttribute('drop-time');
68053
68077
  dragElement.style.width = dropElement.style.width;
68054
68078
  dragElement.style.height = dropElement.style.height;
68055
- dragElement.setAttribute("hasDummy", "true");
68079
+ dragElement.setAttribute('hasDummy', 'true');
68056
68080
  }
68057
68081
  dummyElement.setAttribute('id', dragElement.getAttribute('id'));
68058
68082
  dragElement.replaceWith(dummyElement);
@@ -68346,6 +68370,7 @@ const validateObjectiveStatus = async () => {
68346
68370
  await executeActions(onCorrect, container);
68347
68371
  }
68348
68372
  triggerNextContainer();
68373
+ await calculateScore();
68349
68374
  }
68350
68375
  else {
68351
68376
  const onInCorrect = container.getAttribute('onInCorrect');
@@ -68353,9 +68378,9 @@ const validateObjectiveStatus = async () => {
68353
68378
  const isContinueOnCorrect = container.getAttribute('is-continue-on-correct') === 'true';
68354
68379
  if (!isContinueOnCorrect) {
68355
68380
  triggerNextContainer();
68381
+ await calculateScore();
68356
68382
  }
68357
68383
  }
68358
- await calculateScore();
68359
68384
  }
68360
68385
  };
68361
68386
  const triggerNextContainer = () => {
@@ -38,7 +38,7 @@ export class LidoHome {
38
38
  // const event = new CustomEvent('gameCompleted');
39
39
  // window.dispatchEvent(event);
40
40
  dispatchGameCompletedEvent();
41
- // this.currentContainerIndex = 0;
41
+ this.currentContainerIndex = null;
42
42
  }
43
43
  // Reset the containers array to trigger a re-render
44
44
  this.containers = [...this.containers];
@@ -62,6 +62,8 @@ export class LidoHome {
62
62
  this.updateArrowVisibility = () => {
63
63
  setTimeout(() => {
64
64
  const containerElement = this.el.querySelector('lido-container');
65
+ if (!containerElement)
66
+ return;
65
67
  const prevbtn = containerElement.getAttribute('show-prev-button');
66
68
  const nextbtn = containerElement.getAttribute('show-next-button');
67
69
  const rightbtn = this.el.querySelector('#lido-arrow-right');
@@ -310,14 +312,14 @@ export class LidoHome {
310
312
  return (h("div", { id: "lido-dot-indicator", class: "lido-dot-container" }, h("div", { class: "lido-exit-button popup\n -button", onClick: () => {
311
313
  this.exitFlag = true;
312
314
  AudioPlayer.getI().stop();
313
- } }, h("lido-image", { src: "./Close.svg" })), h("div", { class: "lido-btn-dot-container" }, h("div", { id: "lido-arrow-left", onClick: () => {
315
+ } }, h("lido-image", { src: "https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/Navbar-buttons/Close.svg" })), h("div", { class: "lido-btn-dot-container" }, h("div", { id: "lido-arrow-left", onClick: () => {
314
316
  triggerPrevcontainer();
315
- } }, h("lido-image", { src: "./Previous.svg" })), 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 => {
317
+ } }, h("lido-image", { src: "https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/Navbar-buttons/Previous.svg" })), 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 => {
316
318
  console.log('Target:', event.target); // What was clicked
317
319
  console.log('Current Target:', event.currentTarget); // Where the onClick is bound
318
320
  console.log('✅ Button clicked - nextBtn action triggered');
319
321
  executeActions("this.nextBtn='true'", event.currentTarget);
320
- } }, h("lido-image", { src: "./Previous.svg" }))), h("div", { id: "main-audio", class: "popup-button", onClick: () => this.btnpopup() }, h("lido-image", { visible: "true", src: "./AudioIcon.svg" }))));
322
+ } }, h("lido-image", { src: "https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/Navbar-buttons/Next.svg" }))), h("div", { id: "main-audio", class: "popup-button", onClick: () => this.btnpopup() }, h("lido-image", { visible: "true", src: "https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/Navbar-buttons/Audio%20icon.svg" }))));
321
323
  }
322
324
  /**
323
325
  * Jumps to a specific container based on the index of the dot clicked.
@@ -25,7 +25,7 @@ svg {
25
25
 
26
26
  #lido-draggableCircle {
27
27
  cursor: pointer;
28
- fill: red;
28
+ fill: #81C127;
29
29
  transition: fill 0.2s, r 0.2s;
30
30
  }
31
31
 
@@ -70,6 +70,13 @@ button {
70
70
  /* stroke: green !important; */
71
71
  }
72
72
 
73
+ .lido-flow-indicator {
74
+ stroke: blue;
75
+ stroke-width: 2;
76
+ stroke-dasharray: 6, 6; /* Uniform dotted line */
77
+ fill: none;
78
+ }
79
+
73
80
  .lido-trace {
74
81
  height: 700px;
75
82
  width: 700px;
@@ -20,7 +20,7 @@ export class LidoTrace {
20
20
  this.ariaHidden = '';
21
21
  this.tabIndex = 0;
22
22
  this.mode = TraceMode.ShowFlow;
23
- this.fingerHintUrl = 'https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/trace/finger.png';
23
+ this.fingerHintUrl = 'https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/trace/Tracing-hand.svg';
24
24
  this.onInCorrect = undefined;
25
25
  this.onCorrect = undefined;
26
26
  this.highlightTextId = '';
@@ -200,26 +200,61 @@ export class LidoTrace {
200
200
  getPaths(svg) {
201
201
  return Array.from(svg.querySelectorAll('path, line'));
202
202
  }
203
- // Create flow markers along the path to guide the user
204
- createFlowMarkersForPath(path, markerCount = 10) {
203
+ // Create a single dotted line with an arrow at the end for the entire path
204
+ createFlowMarkersForPath(path) {
205
205
  var _a;
206
- const totalLength = path.getTotalLength();
207
- const interval = totalLength / (markerCount + 1); // Space markers evenly
208
- const markers = [];
209
- for (let i = 1; i <= markerCount; i++) {
210
- const point = path.getPointAtLength(i * interval);
211
- const nextPoint = path.getPointAtLength((i + 0.5) * interval); // Slightly ahead point for direction
212
- // Create an arrow marker
213
- const angle = Math.atan2(nextPoint.y - point.y, nextPoint.x - point.x);
214
- const arrowMarker = document.createElementNS('http://www.w3.org/2000/svg', 'polygon');
215
- arrowMarker.setAttribute('points', '-5,-5 0,0 -5,5');
216
- arrowMarker.setAttribute('fill', 'blue');
217
- arrowMarker.setAttribute('transform', `translate(${point.x},${point.y}) rotate(${(angle * 180) / Math.PI})`);
218
- arrowMarker.setAttribute('class', 'lido-flow-indicator');
219
- markers.push(arrowMarker);
220
- (_a = path.parentNode) === null || _a === void 0 ? void 0 : _a.appendChild(arrowMarker); // Append to the same SVG container
206
+ if (!path)
207
+ return;
208
+ const svg = path.ownerSVGElement;
209
+ if (!svg)
210
+ return;
211
+ // --- 1. Create the dotted line that follows the same path ---
212
+ // Create a new <path> element that will visually represent the flow (dotted line)
213
+ const dottedLine = document.createElementNS('http://www.w3.org/2000/svg', 'path');
214
+ // Copy the "d" (path drawing instructions) from the original path
215
+ dottedLine.setAttribute('d', path.getAttribute('d') || '');
216
+ dottedLine.setAttribute('stroke', 'blue');
217
+ dottedLine.setAttribute('stroke-width', '2');
218
+ // Define a repeating pattern of dashes: "6 units on, 6 units off"
219
+ dottedLine.setAttribute('stroke-dasharray', '6,6');
220
+ dottedLine.setAttribute('fill', 'none');
221
+ // Add a class name for styling or later querying
222
+ dottedLine.setAttribute('class', 'lido-flow-indicator');
223
+ (_a = path.parentNode) === null || _a === void 0 ? void 0 : _a.appendChild(dottedLine);
224
+ // --- 2. Ensure we only add <defs> + marker once per SVG ---
225
+ // Look for an existing <defs> section with our custom ID inside the SVG
226
+ let defs = svg.querySelector('defs#lido-flow-defs');
227
+ // If it doesn’t exist, create one and insert it at the top of the SVG
228
+ if (!defs) {
229
+ defs = document.createElementNS('http://www.w3.org/2000/svg', 'defs');
230
+ defs.setAttribute('id', 'lido-flow-defs');
231
+ svg.insertBefore(defs, svg.firstChild); // defs should usually be at the beginning
221
232
  }
222
- return markers;
233
+ // --- 3. Create a unique marker for this path ---
234
+ const uniqueId = `arrow-${Math.random().toString(36)}`;
235
+ // Create the <marker> element that defines the arrowhead
236
+ const marker = document.createElementNS('http://www.w3.org/2000/svg', 'marker');
237
+ marker.setAttribute('id', uniqueId);
238
+ // Set the width/height of the marker viewport (10x10 units)
239
+ marker.setAttribute('markerWidth', '10');
240
+ marker.setAttribute('markerHeight', '10');
241
+ // Reference point inside the marker (where the path will attach to arrow)
242
+ marker.setAttribute('refX', '5');
243
+ marker.setAttribute('refY', '5');
244
+ // Automatically rotate arrowhead to match the path direction
245
+ marker.setAttribute('orient', 'auto');
246
+ // Scale the marker relative to the stroke width of the path
247
+ marker.setAttribute('markerUnits', 'strokeWidth');
248
+ // --- Create the arrow shape itself ---
249
+ const arrowPath = document.createElementNS('http://www.w3.org/2000/svg', 'path');
250
+ // Define the arrowhead shape using SVG path commands
251
+ arrowPath.setAttribute('d', 'M0,0 L10,5 L0,10 L2,5 Z');
252
+ arrowPath.setAttribute('fill', 'blue');
253
+ marker.appendChild(arrowPath);
254
+ defs.appendChild(marker);
255
+ // --- 4. Attach the arrow marker to the end of the dotted line ---
256
+ dottedLine.setAttribute('marker-end', `url(#${uniqueId})`);
257
+ return dottedLine;
223
258
  }
224
259
  // Show or hide flow indicators based on mode
225
260
  updateFlowIndicators(state) {
@@ -282,8 +317,8 @@ export class LidoTrace {
282
317
  circle.setAttribute('id', 'lido-draggableCircle');
283
318
  circle.setAttribute('cx', firstPathStart.x.toString());
284
319
  circle.setAttribute('cy', firstPathStart.y.toString());
285
- circle.setAttribute('r', `calc(${strokeWidth || 10} / 2)`); // Radius of the draggable circle
286
- circle.setAttribute('fill', 'red');
320
+ circle.setAttribute('r', `calc(${strokeWidth || 10} / 3)`); // Radius of the draggable circle
321
+ circle.setAttribute('fill', '#81C127');
287
322
  (_a = state.svg) === null || _a === void 0 ? void 0 : _a.appendChild(circle);
288
323
  state.circle = circle;
289
324
  this.resetIdleTimer(state); // ← start idle timer once the SVG is ready
@@ -646,7 +681,7 @@ export class LidoTrace {
646
681
  };
647
682
  }
648
683
  render() {
649
- return (h(Host, { key: 'ee0e1841a0d3086d453bd29568c53169456a75ca', class: "lido-trace", id: this.id, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, tabindex: this.tabIndex }, h("div", { key: 'd3e0ac9c6a51bf307d57b3bba3cddfb02fdf7fc1', style: this.style, id: "lido-svgContainer" })));
684
+ return (h(Host, { key: '159d4ee1599806c78c3437907778c240c814711c', class: "lido-trace", id: this.id, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, tabindex: this.tabIndex }, h("div", { key: 'fa3231b10e80e786fe4967059560a6cdc6749063', style: this.style, id: "lido-svgContainer" })));
650
685
  }
651
686
  static get is() { return "lido-trace"; }
652
687
  static get originalStyleUrls() {
@@ -912,7 +947,7 @@ export class LidoTrace {
912
947
  },
913
948
  "attribute": "finger-hint-url",
914
949
  "reflect": false,
915
- "defaultValue": "'https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/trace/finger.png'"
950
+ "defaultValue": "'https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/trace/Tracing-hand.svg'"
916
951
  },
917
952
  "onInCorrect": {
918
953
  "type": "string",
@@ -88,7 +88,7 @@ body {
88
88
  flex-direction: row-reverse;
89
89
  align-items: center;
90
90
  justify-content: center !important;
91
- gap: 145px;
91
+ gap: 80px;
92
92
  }
93
93
 
94
94
  /* Drag element inside popup */
@@ -94,7 +94,7 @@ export const executeActions = async (actionsString, thisElement, element) => {
94
94
  else {
95
95
  dragElement.style.transform = `translate(${scaledLeft}px, ${scaledTop}px)`;
96
96
  }
97
- if (dragElement.getAttribute("hasDummy") === "true")
97
+ if (dragElement.getAttribute('hasDummy') === 'true')
98
98
  return;
99
99
  afterDropDragHandling(dragElement, dropElement);
100
100
  break;
@@ -195,7 +195,7 @@ const afterDropDragHandling = (dragElement, dropElement) => {
195
195
  dummyElement.removeAttribute('drop-time');
196
196
  dragElement.style.width = dropElement.style.width;
197
197
  dragElement.style.height = dropElement.style.height;
198
- dragElement.setAttribute("hasDummy", "true");
198
+ dragElement.setAttribute('hasDummy', 'true');
199
199
  }
200
200
  dummyElement.setAttribute('id', dragElement.getAttribute('id'));
201
201
  dragElement.replaceWith(dummyElement);
@@ -489,6 +489,7 @@ export const validateObjectiveStatus = async () => {
489
489
  await executeActions(onCorrect, container);
490
490
  }
491
491
  triggerNextContainer();
492
+ await calculateScore();
492
493
  }
493
494
  else {
494
495
  const onInCorrect = container.getAttribute('onInCorrect');
@@ -496,9 +497,9 @@ export const validateObjectiveStatus = async () => {
496
497
  const isContinueOnCorrect = container.getAttribute('is-continue-on-correct') === 'true';
497
498
  if (!isContinueOnCorrect) {
498
499
  triggerNextContainer();
500
+ await calculateScore();
499
501
  }
500
502
  }
501
- await calculateScore();
502
503
  }
503
504
  };
504
505
  export const triggerNextContainer = () => {
@@ -329,7 +329,7 @@ export const findMostoverlappedElement = (element, type) => {
329
329
  if (type === 'slide') {
330
330
  const elementArea = elementRect.width * elementRect.height;
331
331
  const otherArea = otherRect.width * otherRect.height;
332
- const minRequiredOverlap = Math.min(elementArea, otherArea) * 0.8;
332
+ const minRequiredOverlap = Math.min(elementArea, otherArea) * 0.1;
333
333
  if (overlapArea >= minRequiredOverlap && overlapArea > maxOverlapArea) {
334
334
  maxOverlapArea = overlapArea;
335
335
  mostOverlappedElement = otherElement;
@@ -524,6 +524,8 @@ export async function onElementDropComplete(dragElement, dropElement) {
524
524
  container.append(div);
525
525
  div.classList.add('after-drop-popup-container');
526
526
  const hasType = dragElement.nextElementSibling;
527
+ dragElement.style.scale = `1`;
528
+ dropElement.style.scale = `1`;
527
529
  // Remove from old parents
528
530
  if (hasType && hasType.getAttribute('type') === 'drag') {
529
531
  dragElement.remove();