lido-player 0.0.2-alpha-52-dev → 0.0.2-alpha-55-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.
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/lido-avatar_22.cjs.entry.js +187 -59
- package/dist/cjs/lido-player.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{utils-ce99b0d0.js → utils-4b44610b.js} +111 -86
- package/dist/collection/components/calculator/lido-calculator.js +4 -2
- package/dist/collection/components/container/lido-container.js +24 -2
- package/dist/collection/components/home/lido-home.css +4 -0
- package/dist/collection/components/home/lido-home.js +27 -3
- package/dist/collection/components/trace/lido-trace.js +122 -47
- package/dist/collection/stories/Templates/Fill-Up/fill-up.stories.js +26 -25
- package/dist/collection/stories/Templates/LetterPairing/LetterPairing.stories.js +3 -1
- package/dist/collection/stories/Templates/RocketGame/rocketGame.stories.js +1 -1
- package/dist/collection/stories/Templates/arrangeLetters/arrangeLetters.stories.js +1 -1
- package/dist/collection/stories/Templates/balancing/balancing.stories.js +1 -1
- package/dist/collection/stories/Templates/blender/blender.stories.js +1 -1
- package/dist/collection/stories/Templates/bubbleType/bubbleType.stories.js +1 -1
- package/dist/collection/stories/Templates/calculator/calculator.stories.js +1 -1
- package/dist/collection/stories/Templates/checker-block/checkerBlock.stories.js +1 -1
- package/dist/collection/stories/Templates/checkerBlock/checkerBlock.stories.js +1 -1
- package/dist/collection/stories/Templates/create-sentence/createSentence.stories.js +1 -1
- package/dist/collection/stories/Templates/fillAnswer/fill-answer.stories.js +1 -1
- package/dist/collection/stories/Templates/fillBlank/fill-blank.stories.js +1 -1
- package/dist/collection/stories/Templates/foodJar/food-jar.stories.js +1 -1
- package/dist/collection/stories/Templates/grid/grid.stories.js +5 -1
- package/dist/collection/stories/Templates/gridGame/grid-game.stories.js +1 -1
- package/dist/collection/stories/Templates/jumpSentence/jumpSentence.stories.js +4 -2
- package/dist/collection/stories/Templates/letterboard/letterboard.stories.js +1 -1
- package/dist/collection/stories/Templates/matchingCard/matching-card.stories.js +1 -1
- package/dist/collection/stories/Templates/multipleOption/mcqWithQuestionImage.stories.js +4 -2
- package/dist/collection/stories/Templates/multipleOption/multiple-option.stories.js +1 -1
- package/dist/collection/stories/Templates/multiplyBeeds/multiplyBeeds.stories.js +1 -1
- package/dist/collection/stories/Templates/nimbleTable/nimbleTable.stories.js +1 -1
- package/dist/collection/stories/Templates/numberBoard/numberBoard.stories.js +1 -1
- package/dist/collection/stories/Templates/numberBoardTwo/numberBoardTwo.stories.js +1 -1
- package/dist/collection/stories/Templates/numberPair/numberPair.stories.js +1 -1
- package/dist/collection/stories/Templates/openwindow/openwindow.stories.js +2 -2
- package/dist/collection/stories/Templates/openwindow/openwindow2.stories.js +2 -2
- package/dist/collection/stories/Templates/order-tractor/order-tractor-ascending-order.stories.js +1 -1
- package/dist/collection/stories/Templates/order-tractor/order-tractor.stories.js +1 -1
- package/dist/collection/stories/Templates/phonic-tractor/phonic-tractor.stories.js +1 -1
- package/dist/collection/stories/Templates/picturemeaning/pictureMeaningCocos.stories.js +5 -1
- package/dist/collection/stories/Templates/questionBoard/questionBoard.stories.js +1 -1
- package/dist/collection/stories/Templates/quizLiteracy/quizLiteracy.stories.js +1 -1
- package/dist/collection/stories/Templates/quizLiteracy/quizLiteracyImageWithText.stories.js +1 -1
- package/dist/collection/stories/Templates/quizLiteracy/quizLiteracyImageWord.stories.js +1 -1
- package/dist/collection/stories/Templates/reorder/reorder.stories.js +3 -1
- package/dist/collection/stories/Templates/rowBlocks/rowBlocks.stories.js +2 -2
- package/dist/collection/stories/Templates/sequenceBox/sequenceBox1.stories.js +6 -6
- package/dist/collection/stories/Templates/sequenceBox/sequenceBox2.stories.js +7 -6
- package/dist/collection/stories/Templates/shapePair/shape-pair.stories.js +1 -1
- package/dist/collection/stories/Templates/shapeTractor/shape-tractor.stories.js +25 -21
- package/dist/collection/stories/Templates/spellDoor/spellDoor.stories.js +1 -1
- package/dist/collection/stories/Templates/sumTogether/sumTogether.stories.js +8 -6
- package/dist/collection/stories/Templates/total/total.stories.js +1 -1
- package/dist/collection/stories/Templates/writeCard/writeCard.stories.js +1 -1
- package/dist/collection/stories/Templates/writeLetter/writeLetter.stories.js +2 -2
- package/dist/collection/stories/Templates/writeNumber/writeNumber.stories.js +6 -6
- package/dist/collection/stories/Templates/writeSet/writeSet.stories.js +1 -1
- package/dist/collection/stories/Templates/writeWord/writeWord.stories.js +7 -6
- package/dist/collection/utils/customEvents.js +1 -0
- package/dist/collection/utils/utils.js +20 -17
- package/dist/collection/utils/utilsHandlers/animationHandler.js +58 -0
- package/dist/collection/utils/utilsHandlers/clickHandler.js +5 -1
- package/dist/collection/utils/utilsHandlers/dragDropHandler.js +19 -60
- package/dist/collection/utils/utilsHandlers/slideHandler.js +7 -6
- package/dist/collection/utils/utilsHandlers/sortHandler.js +3 -5
- package/dist/components/index.js +1 -1
- package/dist/components/lido-avatar.js +1 -1
- package/dist/components/lido-balance.js +1 -1
- package/dist/components/lido-calculator.js +1 -1
- package/dist/components/lido-canvas.js +1 -1
- package/dist/components/lido-cell.js +1 -1
- package/dist/components/lido-col.js +1 -1
- package/dist/components/lido-container.js +1 -1
- package/dist/components/lido-flash-card.js +1 -1
- package/dist/components/lido-float.js +1 -1
- package/dist/components/lido-home.js +1 -1
- package/dist/components/lido-image.js +1 -1
- package/dist/components/lido-keyboard.js +1 -1
- package/dist/components/lido-math-matrix.js +1 -1
- package/dist/components/lido-pos.js +1 -1
- package/dist/components/lido-random.js +1 -1
- package/dist/components/lido-root.js +23 -23
- package/dist/components/lido-row.js +1 -1
- package/dist/components/lido-shape.js +1 -1
- package/dist/components/lido-slide-fill.js +1 -1
- package/dist/components/lido-text.js +1 -1
- package/dist/components/lido-trace.js +1 -1
- package/dist/components/lido-wrap.js +1 -1
- package/dist/components/{p-39a2e638.js → p-0be6b5d5.js} +2 -2
- package/dist/components/{p-11bf64aa.js → p-2c518dbe.js} +1 -1
- package/dist/components/{p-c4abfd0f.js → p-2e023f67.js} +1 -1
- package/dist/components/{p-58c67252.js → p-36c2e21a.js} +110 -87
- package/dist/components/{p-52e77394.js → p-3fc01453.js} +1 -1
- package/dist/components/{p-06171259.js → p-43d79c61.js} +1 -1
- package/dist/components/{p-00777872.js → p-5078599e.js} +26 -4
- package/dist/components/{p-26df0769.js → p-590ce2c9.js} +1 -1
- package/dist/components/{p-5b5f59a8.js → p-67a24ad4.js} +2 -2
- package/dist/components/{p-68112f8c.js → p-72d6a594.js} +1 -1
- package/dist/components/{p-3ce3744c.js → p-73b2bd74.js} +6 -4
- package/dist/components/{p-0fbeb3a1.js → p-73e3f0f4.js} +12 -6
- package/dist/components/{p-0c2aebfb.js → p-9acf0fcc.js} +1 -1
- package/dist/components/{p-a2f96840.js → p-b095de27.js} +1 -1
- package/dist/components/{p-b2125fc9.js → p-b0dbee97.js} +48 -24
- package/dist/components/{p-a516a324.js → p-b847f269.js} +123 -48
- package/dist/components/{p-9d34d59d.js → p-bc5202db.js} +2 -2
- package/dist/components/{p-cb56a853.js → p-c296051d.js} +1 -1
- package/dist/components/{p-8a34b98b.js → p-c69ef266.js} +1 -1
- package/dist/components/{p-2d53e1a5.js → p-ca8aea4b.js} +1 -1
- package/dist/components/{p-3f4d4c0a.js → p-de2193c5.js} +1 -1
- package/dist/components/{p-09f1e2d2.js → p-e534ea52.js} +1 -1
- package/dist/components/{p-8f2ed62f.js → p-f8c00485.js} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/lido-avatar_22.entry.js +187 -59
- package/dist/esm/lido-player.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-107b15a7.js → utils-ae1eb036.js} +110 -87
- package/dist/lido-player/index.esm.js +1 -1
- package/dist/lido-player/lido-player.esm.js +1 -1
- package/dist/lido-player/{p-d1251482.js → p-a632e2ce.js} +2 -2
- package/dist/lido-player/p-f1b879f6.entry.js +1 -0
- package/dist/types/components/container/lido-container.d.ts +1 -0
- package/dist/types/components/home/lido-home.d.ts +1 -0
- package/dist/types/components/trace/lido-trace.d.ts +1 -0
- package/dist/types/utils/utils.d.ts +1 -1
- package/dist/types/utils/utilsHandlers/animationHandler.d.ts +1 -0
- package/package.json +1 -1
- package/dist/lido-player/p-606ea279.entry.js +0 -1
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H,
|
|
2
|
-
import { i as instance } from './p-
|
|
3
|
-
import { d as defineCustomElement$k } from './p-
|
|
4
|
-
import { d as defineCustomElement$j } from './p-
|
|
5
|
-
import { d as defineCustomElement$i } from './p-
|
|
6
|
-
import { d as defineCustomElement$h } from './p-
|
|
7
|
-
import { d as defineCustomElement$g } from './p-
|
|
8
|
-
import { d as defineCustomElement$f } from './p-
|
|
9
|
-
import { d as defineCustomElement$e } from './p-
|
|
10
|
-
import { d as defineCustomElement$d } from './p-
|
|
11
|
-
import { d as defineCustomElement$c } from './p-
|
|
12
|
-
import { d as defineCustomElement$b } from './p-
|
|
13
|
-
import { d as defineCustomElement$a } from './p-
|
|
14
|
-
import { d as defineCustomElement$9 } from './p-
|
|
15
|
-
import { d as defineCustomElement$8 } from './p-
|
|
16
|
-
import { d as defineCustomElement$7 } from './p-
|
|
17
|
-
import { d as defineCustomElement$6 } from './p-
|
|
18
|
-
import { d as defineCustomElement$5 } from './p-
|
|
19
|
-
import { d as defineCustomElement$4 } from './p-
|
|
20
|
-
import { d as defineCustomElement$3 } from './p-
|
|
21
|
-
import { d as defineCustomElement$2 } from './p-
|
|
22
|
-
import { d as defineCustomElement$1 } from './p-
|
|
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';
|
|
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';
|
|
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;
|
|
@@ -27,7 +27,7 @@ const LidoHomeStyle0 = indexCss;
|
|
|
27
27
|
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}}@keyframes glowPulse{0%{filter:drop-shadow(0 0 5px yellow)\r\n drop-shadow(0 0 10px yellow)\r\n drop-shadow(0 0 20px yellow)\r\n drop-shadow(0 0 30px orange)}50%{filter:drop-shadow(0 0 10px yellow)\r\n drop-shadow(0 0 20px yellow)\r\n drop-shadow(0 0 40px yellow)\r\n drop-shadow(0 0 50px orange)}100%{filter:drop-shadow(0 0 5px yellow)\r\n drop-shadow(0 0 10px yellow)\r\n drop-shadow(0 0 20px yellow)\r\n drop-shadow(0 0 30px orange)}}";
|
|
28
28
|
const LidoHomeStyle1 = animationCss;
|
|
29
29
|
|
|
30
|
-
const lidoHomeCss = ".lido-snackbar{visibility:visible;min-width:250px;background-color:#333;color:#fff;text-align:center;border-radius:2px;padding:16px;position:fixed;z-index:1;bottom:30px;left:50%;transform:translateX(-50%);font-size:17px}.lido-dot-container{display:flex;justify-content:space-between;align-items:center;visibility:hidden;position:absolute;left:50%;padding:0 5px;z-index:1;width:100vw;max-width:100vw;box-sizing:border-box;height:0px}.lido-dot{height:18px;width:18px;margin:0 4px;background-color:#bbb;border-radius:50%;display:inline-block;transition:background-color 0.3s;cursor:pointer;z-index:1}.lido-btn-dot-container{flex-shrink:1;flex-grow:1;display:flex;justify-content:center;align-items:center;text-align:center;z-index:1;min-width:0;height:0px}.lido-dot.completed{background-color:grey}.lido-dot.current{background-color:green}.lido-dot:not(.completed):not(.current){background-color:#bbb}#lido-arrow-left,#lido-arrow-right{width:88px;height:88px;display:flex;align-items:center;justify-content:center;border-radius:12px;z-index:1000;box-shadow:0px 8px 0px 0px #8b310f;background-color:#f34d08;cursor:pointer;visibility:hidden;flex-shrink:0}#lido-arrow-left:active,#lido-arrow-right:active{transform:translateY(8px);box-shadow:0px 0px 0px 0px}.navbar{display:flex;justify-content:center}.lido-exit-button,#main-audio{width:80px;height:80px;z-index:1000;cursor:pointer;background-color:white;display:flex;align-items:center;justify-content:center;border:4px solid #f34d08;border-radius:16px;box-shadow:0px 8px #f34d08;flex-shrink:0;}#main-audio:active,.popup-button:active .lido-exit-button:active{margin-bottom:-8px;box-shadow:0px 0px 0px 0px !important}.lido-alert-popup{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);display:flex;align-items:center;justify-content:center;z-index:1000}@media (max-width: 768px){#lido-arrow-left,#lido-arrow-right{width:70px;height:70px;margin:0 8px}.lido-exit-button,#main-audio{width:65px;height:65px;margin:0 8px}.lido-dot{height:16px;width:16px;margin:0 2.5px}}@media (max-width: 480px){#lido-arrow-left,#lido-arrow-right{width:74px;height:74px;margin:0px 5px}.lido-exit-button,#main-audio{width:65px;height:65px;margin:0px 5px}.lido-dot{height:15px;width:15px;margin:0 1.5px}.lido-dot-container{padding:0 3px}}@media (max-width: 375px){#lido-arrow-left,#lido-arrow-right{width:70px;height:70px;margin:0px 3px}.lido-exit-button,#main-audio{width:70px;height:70px;margin:0px 3px}.lido-dot{height:14px;width:14px;margin:0 1px}.lido-dot-container{padding:0 2px}}@media (max-width: 320px){#lido-arrow-left,#lido-arrow-right,.lido-exit-button,#main-audio{width:70px;height:70px;margin:0px 2px}.lido-dot{height:12px;width:12px;margin:0 0.5px}.lido-dot-container{padding:0 2px}}@media (max-width: 900px) and (orientation: landscape){#lido-arrow-left,#lido-arrow-right{width:70px;height:70px;margin:0px 5px}.lido-exit-button,#main-audio{width:70px;height:70px;margin:0px 5px}.lido-dot{height:14px;width:14px;margin:0 1px}.lido-dot-container{padding:0 5px}}.popup-exit-text{white-space:nowrap;font-size:22px;font-weight:600;margin-top:-8%}.lido-alert-parent{z-index:10000 !important;position:absolute;top:0;left:0}.popup-button{width:80px;height:80px;z-index:1000;cursor:pointer;display:flex;align-items:center;justify-content:center;border:4px solid #F34D08;border-radius:16px;box-shadow:0 8px 0 #F34D08}.nav-for-lanai{position:absolute;top:0%;left:0%;max-width:none;width:100%;height:auto;visibility:visible}";
|
|
30
|
+
const lidoHomeCss = ".lido-snackbar{visibility:visible;min-width:250px;background-color:#333;color:#fff;text-align:center;border-radius:2px;padding:16px;position:fixed;z-index:1;bottom:30px;left:50%;transform:translateX(-50%);font-size:17px}.lido-dot-container{display:flex;justify-content:space-between;align-items:center;visibility:hidden;position:absolute;left:50%;padding:0 5px;z-index:1;width:100vw;max-width:100vw;box-sizing:border-box;height:0px}.lido-dot{height:18px;width:18px;margin:0 4px;background-color:#bbb;border-radius:50%;display:inline-block;transition:background-color 0.3s;cursor:pointer;z-index:1}.lido-btn-dot-container{flex-shrink:1;flex-grow:1;display:flex;justify-content:center;align-items:center;text-align:center;z-index:1;min-width:0;height:0px}.lido-dot.completed{background-color:grey}.lido-dot.current{background-color:green}.lido-dot:not(.completed):not(.current){background-color:#bbb}#lido-arrow-left,#lido-arrow-right{width:88px;height:88px;display:flex;align-items:center;justify-content:center;border-radius:12px;z-index:1000;box-shadow:0px 8px 0px 0px #8b310f;background-color:#f34d08;cursor:pointer;visibility:hidden;flex-shrink:0}#lido-arrow-left:active,#lido-arrow-right:active{transform:translateY(8px);box-shadow:0px 0px 0px 0px}.navbar{display:flex;justify-content:center}.lido-exit-button,#main-audio{width:80px;height:80px;z-index:1000;cursor:pointer;background-color:white;display:flex;align-items:center;justify-content:center;border:4px solid #f34d08;border-radius:16px;box-shadow:0px 8px #f34d08;flex-shrink:0;}#main-audio:active,.popup-button:active .lido-exit-button:active{margin-bottom:-8px;box-shadow:0px 0px 0px 0px !important}.lido-alert-popup{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);display:flex;align-items:center;justify-content:center;z-index:1000}@media (max-width: 768px){#lido-arrow-left,#lido-arrow-right{width:70px;height:70px;margin:0 8px}.lido-exit-button,#main-audio{width:65px;height:65px;margin:0 8px}.lido-dot{height:16px;width:16px;margin:0 2.5px}}@media (max-width: 480px){#lido-arrow-left,#lido-arrow-right{width:74px;height:74px;margin:0px 5px}.lido-exit-button,#main-audio{width:65px;height:65px;margin:0px 5px}.lido-dot{height:15px;width:15px;margin:0 1.5px}.lido-dot-container{padding:0 3px}}@media (max-width: 375px){#lido-arrow-left,#lido-arrow-right{width:70px;height:70px;margin:0px 3px}.lido-exit-button,#main-audio{width:70px;height:70px;margin:0px 3px}.lido-dot{height:14px;width:14px;margin:0 1px}.lido-dot-container{padding:0 2px}}@media (max-width: 320px){#lido-arrow-left,#lido-arrow-right,.lido-exit-button,#main-audio{width:70px;height:70px;margin:0px 2px}.lido-dot{height:12px;width:12px;margin:0 0.5px}.lido-dot-container{padding:0 2px}}@media (max-width: 900px) and (orientation: landscape){#lido-arrow-left,#lido-arrow-right{width:70px;height:70px;margin:0px 5px}.lido-exit-button,#main-audio{width:70px;height:70px;margin:0px 5px}.lido-dot{height:14px;width:14px;margin:0 1px}.lido-dot-container{padding:0 5px}}.popup-exit-text{white-space:nowrap;font-size:22px;font-weight:600;margin-top:-8%}.lido-alert-parent{z-index:10000 !important;position:absolute;top:0;left:0}.popup-button{width:80px;height:80px;z-index:1000;cursor:pointer;display:flex;align-items:center;justify-content:center;border:4px solid #F34D08;border-radius:16px;box-shadow:0 8px 0 #F34D08}.nav-for-lanai{position:absolute;top:0%;left:0%;max-width:none;width:100%;height:auto;visibility:visible}.parent_dots{pointer-events:none}";
|
|
31
31
|
const LidoHomeStyle2 = lidoHomeCss;
|
|
32
32
|
|
|
33
33
|
const LidoHome = /*@__PURE__*/ proxyCustomElement(class LidoHome extends H {
|
|
@@ -108,7 +108,6 @@ const LidoHome = /*@__PURE__*/ proxyCustomElement(class LidoHome extends H {
|
|
|
108
108
|
rightbtn.style.visibility = 'hidden';
|
|
109
109
|
}
|
|
110
110
|
else {
|
|
111
|
-
rightbtn.style.pointerEvents = 'auto';
|
|
112
111
|
rightbtn.style.visibility = 'visible';
|
|
113
112
|
}
|
|
114
113
|
}, 100);
|
|
@@ -319,6 +318,9 @@ const LidoHome = /*@__PURE__*/ proxyCustomElement(class LidoHome extends H {
|
|
|
319
318
|
if (tagName === 'lido-text' && props.string) {
|
|
320
319
|
props.string = instance.t(props.string);
|
|
321
320
|
}
|
|
321
|
+
if (tagName === 'lido-text' && props.string) {
|
|
322
|
+
props.string = instance.t(props.string);
|
|
323
|
+
}
|
|
322
324
|
// Map XML tags to Stencil components
|
|
323
325
|
const componentMapping = {
|
|
324
326
|
'lido-container': (h("lido-container", Object.assign({}, props, { canplay: this.canplay, baseUrl: this.baseUrl, height: this.height }), children)),
|
|
@@ -368,6 +370,16 @@ const LidoHome = /*@__PURE__*/ proxyCustomElement(class LidoHome extends H {
|
|
|
368
370
|
this.containers = containers;
|
|
369
371
|
console.log("container :::", containers);
|
|
370
372
|
}
|
|
373
|
+
areAllDropsFilled() {
|
|
374
|
+
const drops = Array.from(document.querySelectorAll('[type="drop"]'));
|
|
375
|
+
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
|
+
return drops.every(drop => {
|
|
379
|
+
const dropId = drop.id;
|
|
380
|
+
return drags.some(drag => drag.getAttribute('drop-to') === dropId);
|
|
381
|
+
});
|
|
382
|
+
}
|
|
371
383
|
async btnpopup() {
|
|
372
384
|
setCancelBtnPopup(false);
|
|
373
385
|
await AudioPlayer.getI().stop();
|
|
@@ -387,6 +399,18 @@ const LidoHome = /*@__PURE__*/ proxyCustomElement(class LidoHome extends H {
|
|
|
387
399
|
await new Promise(resolve => setTimeout(resolve, 300));
|
|
388
400
|
}
|
|
389
401
|
}
|
|
402
|
+
if (this.areAllDropsFilled()) {
|
|
403
|
+
const objectiveString = container['objective'];
|
|
404
|
+
const objectiveArray = JSON.parse(localStorage.getItem(SelectedValuesKey) || '[]');
|
|
405
|
+
const res = matchStringPattern(objectiveString, objectiveArray);
|
|
406
|
+
console.log('Resultt', res);
|
|
407
|
+
if (res) {
|
|
408
|
+
triggerNextContainer();
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
else {
|
|
412
|
+
console.log('Not yet filled ');
|
|
413
|
+
}
|
|
390
414
|
}
|
|
391
415
|
scaleNavbarContainer() {
|
|
392
416
|
setTimeout(() => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H,
|
|
1
|
+
import { p as proxyCustomElement, H, X as TraceMode, e as convertUrlToRelative, d as setVisibilityWithDelay, Y as speakIcon, o as executeActions, K as triggerNextContainer, L as LidoContainer, k as parseProp, h, j as Host, Z as fingerUrl } from './p-36c2e21a.js';
|
|
2
2
|
|
|
3
3
|
const lidoTraceCss = ":host{display:block;position:relative}#lido-svgContainer{display:flex;justify-content:center;align-items:center;overflow:hidden}svg{width:100%;height:100%;touch-action:none}#lido-draggableCircle{cursor:pointer;fill:#CF1565;transition:fill 0.2s, r 0.2s}.lido-blindTracing{stroke:none !important}.lido-blindFreeTrace{stroke:none !important}.lido-hovered{cursor:grab;fill:darkred}#lido-controls{position:fixed;bottom:0;left:0;right:0;display:flex;justify-content:space-between;padding:10px;background-color:#f0f0f0;border-top:1px solid #ccc}button{padding:10px;font-size:16px}@media (max-width: 600px){button{padding:8px;font-size:14px}}.lido-trace-path-green{}.lido-flow-indicator{stroke:blue;stroke-width:2;stroke-dasharray:6, 6;fill:none}.lido-trace{height:700px;width:700px;z-index:1;justify-items:center;align-content:center}.trace-animate{animation:trace-bounce 0.5s}@keyframes trace-bounce{0%{transform:scale(1)}30%{transform:scale(1.05)}60%{transform:scale(0.95)}100%{transform:scale(1)}}";
|
|
4
4
|
const LidoTraceStyle0 = lidoTraceCss;
|
|
@@ -36,6 +36,7 @@ const LidoTrace = /*@__PURE__*/ proxyCustomElement(class LidoTrace extends H {
|
|
|
36
36
|
this.fileIndex = -1;
|
|
37
37
|
this.isDragging = false;
|
|
38
38
|
this.activePointerId = null;
|
|
39
|
+
this.freeTraceUpdateCounter = 0;
|
|
39
40
|
this.idleTimer = null;
|
|
40
41
|
this.fingerImg = null;
|
|
41
42
|
}
|
|
@@ -52,8 +53,8 @@ const LidoTrace = /*@__PURE__*/ proxyCustomElement(class LidoTrace extends H {
|
|
|
52
53
|
circle: null,
|
|
53
54
|
paths: [],
|
|
54
55
|
svg: null,
|
|
55
|
-
proximityThreshold:
|
|
56
|
-
freeTraceProximityThreshold:
|
|
56
|
+
proximityThreshold: 375, // Increased general proximity threshold (was 100)
|
|
57
|
+
freeTraceProximityThreshold: 350, // Increased proximity for free trace (was 50)
|
|
57
58
|
rafId: null,
|
|
58
59
|
pointerMoveEvent: null,
|
|
59
60
|
activePointerId: null,
|
|
@@ -389,7 +390,7 @@ const LidoTrace = /*@__PURE__*/ proxyCustomElement(class LidoTrace extends H {
|
|
|
389
390
|
}
|
|
390
391
|
// Modified handlePointerMove function
|
|
391
392
|
handlePointerMove(state) {
|
|
392
|
-
var _a, _b, _c, _d;
|
|
393
|
+
var _a, _b, _c, _d, _e, _f;
|
|
393
394
|
if (!state.isDragging)
|
|
394
395
|
return;
|
|
395
396
|
if (!state.circle || !state.paths || state.paths.length === 0)
|
|
@@ -401,6 +402,15 @@ const LidoTrace = /*@__PURE__*/ proxyCustomElement(class LidoTrace extends H {
|
|
|
401
402
|
x: parseFloat(state.circle.getAttribute('cx')),
|
|
402
403
|
y: parseFloat(state.circle.getAttribute('cy')),
|
|
403
404
|
};
|
|
405
|
+
// Only update if pointer moved a minimum distance (to reduce unnecessary updates)
|
|
406
|
+
const MOVE_THRESHOLD = 1; // px
|
|
407
|
+
if (state.lastPointerPos) {
|
|
408
|
+
const dx = pointerPos.x - state.lastPointerPos.x;
|
|
409
|
+
const dy = pointerPos.y - state.lastPointerPos.y;
|
|
410
|
+
if (dx * dx + dy * dy < MOVE_THRESHOLD * MOVE_THRESHOLD) {
|
|
411
|
+
return;
|
|
412
|
+
}
|
|
413
|
+
}
|
|
404
414
|
const currentPath = state.paths[state.currentPathIndex];
|
|
405
415
|
if (!currentPath) {
|
|
406
416
|
console.error('No valid path found at the current index');
|
|
@@ -428,48 +438,76 @@ const LidoTrace = /*@__PURE__*/ proxyCustomElement(class LidoTrace extends H {
|
|
|
428
438
|
}
|
|
429
439
|
// For free trace mode and blind free trace mode, allow free drawing only if within the reduced proximity threshold
|
|
430
440
|
if (state.mode === TraceMode.FreeTrace || state.mode === TraceMode.BlindFreeTrace) {
|
|
441
|
+
// Throttle: Only update every 2nd event (for reducing excessive dom updates)
|
|
442
|
+
this.freeTraceUpdateCounter = (this.freeTraceUpdateCounter || 0) + 1;
|
|
443
|
+
if (this.freeTraceUpdateCounter % 2 !== 0) {
|
|
444
|
+
return;
|
|
445
|
+
}
|
|
431
446
|
// Initialize the currentFreePath array if it's not created
|
|
432
447
|
if (!state.currentFreePath) {
|
|
433
448
|
state.currentFreePath = [];
|
|
434
449
|
}
|
|
435
|
-
// Create a new
|
|
450
|
+
// Create a new polyline element if it's the first trace for the current path index
|
|
436
451
|
if (!state.currentFreePath[state.currentPathIndex]) {
|
|
437
|
-
const
|
|
438
|
-
// newPath.setAttribute('stroke', 'green');
|
|
452
|
+
const newPolyline = document.createElementNS('http://www.w3.org/2000/svg', 'polyline');
|
|
439
453
|
const strokeWidth = state.paths[state.currentPathIndex].style['stroke-width'] || state.paths[state.currentPathIndex].getAttribute('stroke-width');
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
454
|
+
newPolyline.setAttribute('stroke-width', strokeWidth);
|
|
455
|
+
newPolyline.setAttribute('fill', 'none');
|
|
456
|
+
newPolyline.setAttribute('stroke-linecap', 'round');
|
|
457
|
+
newPolyline.setAttribute('stroke', 'lightgreen');
|
|
458
|
+
newPolyline.setAttribute('points', `${pointerPos.x},${pointerPos.y}`);
|
|
459
|
+
(_a = state.svg) === null || _a === void 0 ? void 0 : _a.appendChild(newPolyline);
|
|
460
|
+
state.currentFreePath[state.currentPathIndex] = newPolyline;
|
|
461
|
+
// Store points array for this polyline
|
|
462
|
+
state.currentFreePolylinePoints = state.currentFreePolylinePoints || [];
|
|
463
|
+
state.currentFreePolylinePoints[state.currentPathIndex] = [
|
|
464
|
+
{ x: pointerPos.x, y: pointerPos.y }
|
|
465
|
+
];
|
|
448
466
|
// Reset lastPointerPos for the new path
|
|
449
467
|
state.lastPointerPos = pointerPos;
|
|
468
|
+
// Add a points counter to limit path growth
|
|
469
|
+
state.freeTracePointsCount = 1;
|
|
450
470
|
}
|
|
451
|
-
//
|
|
452
|
-
const
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
//
|
|
459
|
-
state.
|
|
471
|
+
// Limit the number of points in the free trace path for performance
|
|
472
|
+
const MAX_FREE_TRACE_POINTS = 10;
|
|
473
|
+
state.freeTracePointsCount = (state.freeTracePointsCount || 1) + 1;
|
|
474
|
+
if (state.freeTracePointsCount > MAX_FREE_TRACE_POINTS) {
|
|
475
|
+
// If limit reached, skip adding more points
|
|
476
|
+
return;
|
|
477
|
+
}
|
|
478
|
+
// Add the new point to the polyline's points array
|
|
479
|
+
state.currentFreePolylinePoints = state.currentFreePolylinePoints || [];
|
|
480
|
+
let pointsArr = state.currentFreePolylinePoints[state.currentPathIndex] || [];
|
|
481
|
+
pointsArr.push({ x: pointerPos.x, y: pointerPos.y });
|
|
482
|
+
state.currentFreePolylinePoints[state.currentPathIndex] = pointsArr;
|
|
483
|
+
// Update the polyline's points attribute
|
|
484
|
+
const pointsStr = pointsArr.map(pt => `${pt.x},${pt.y}`).join(' ');
|
|
485
|
+
state.currentFreePath[state.currentPathIndex].setAttribute('points', pointsStr);
|
|
460
486
|
// Move the draggable circle with the freehand trace
|
|
461
487
|
state.circle.setAttribute('cx', pointerPos.x.toString());
|
|
462
488
|
state.circle.setAttribute('cy', pointerPos.y.toString());
|
|
463
|
-
//
|
|
464
|
-
(_b = state.svg) === null || _b === void 0 ? void 0 : _b.
|
|
489
|
+
// Only re-append if not already children list
|
|
490
|
+
const childNodes = (_b = state.svg) === null || _b === void 0 ? void 0 : _b.childNodes;
|
|
491
|
+
let circleFound = false;
|
|
492
|
+
for (let i = 0; i < ((childNodes === null || childNodes === void 0 ? void 0 : childNodes.length) || 0); i++) {
|
|
493
|
+
const child = childNodes === null || childNodes === void 0 ? void 0 : childNodes.item(i);
|
|
494
|
+
if (child && child.tagName === 'circle') {
|
|
495
|
+
circleFound = true;
|
|
496
|
+
break; // No need to continue once found
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
// If not found, append the circle
|
|
500
|
+
if (!circleFound && state.circle) {
|
|
501
|
+
(_c = state.svg) === null || _c === void 0 ? void 0 : _c.appendChild(state.circle);
|
|
502
|
+
}
|
|
465
503
|
// Update the last pointer position
|
|
466
504
|
state.lastPointerPos = pointerPos;
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
// If close to the end of the path, move to the next path
|
|
470
|
-
if (distanceToEnd < 5) {
|
|
505
|
+
// For polyline, estimate the end by number of points (not path length)
|
|
506
|
+
if (pointsArr.length >= MAX_FREE_TRACE_POINTS) {
|
|
471
507
|
this.moveToNextPath(state);
|
|
472
508
|
state.currentFreePath[state.currentPathIndex] = null; // Reset free path for next path
|
|
509
|
+
state.currentFreePolylinePoints[state.currentPathIndex] = [];
|
|
510
|
+
state.freeTracePointsCount = 0;
|
|
473
511
|
}
|
|
474
512
|
// this.resetIdleTimer(state); // ← keep timer alive
|
|
475
513
|
return; // Exit early since we're in free trace or blind free trace mode
|
|
@@ -477,24 +515,57 @@ const LidoTrace = /*@__PURE__*/ proxyCustomElement(class LidoTrace extends H {
|
|
|
477
515
|
// In normal modes, allow movement and drawing only within the general proximity threshold
|
|
478
516
|
if (state.isDragging && closestPoint.length >= state.lastLength) {
|
|
479
517
|
state.lastLength = closestPoint.length;
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
518
|
+
// Only update the circle if it moved enough
|
|
519
|
+
if (Math.abs(closestPoint.x - circlePos.x) > MOVE_THRESHOLD || Math.abs(closestPoint.y - circlePos.y) > MOVE_THRESHOLD) {
|
|
520
|
+
state.circle.setAttribute('cx', closestPoint.x.toString());
|
|
521
|
+
state.circle.setAttribute('cy', closestPoint.y.toString());
|
|
522
|
+
}
|
|
523
|
+
// Only re-append if not already children list
|
|
524
|
+
const childNodes = (_d = state.svg) === null || _d === void 0 ? void 0 : _d.childNodes;
|
|
525
|
+
let circleFound = false;
|
|
526
|
+
for (let i = 0; i < ((childNodes === null || childNodes === void 0 ? void 0 : childNodes.length) || 0); i++) {
|
|
527
|
+
const child = childNodes === null || childNodes === void 0 ? void 0 : childNodes.item(i);
|
|
528
|
+
if (child && child.tagName === 'circle') {
|
|
529
|
+
circleFound = true;
|
|
530
|
+
break; // No need to continue once found
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
// If not found, append the circle
|
|
534
|
+
if (!circleFound && state.circle) {
|
|
535
|
+
(_e = state.svg) === null || _e === void 0 ? void 0 : _e.appendChild(state.circle);
|
|
536
|
+
}
|
|
537
|
+
(_f = currentPath.greenPath) === null || _f === void 0 ? void 0 : _f.setAttribute('stroke-dashoffset', (state.totalPathLength - state.lastLength).toString());
|
|
538
|
+
// Completion logic for closed paths: only allow completion if almost all points are traced
|
|
539
|
+
const COMPLETION_THRESHOLD = 0.90; // 90% of the path must be traced
|
|
540
|
+
let percentComplete = state.lastLength / state.totalPathLength;
|
|
541
|
+
let startPoint = currentPath.getPointAtLength(0);
|
|
542
|
+
let endPoint = currentPath.getPointAtLength(currentPath.getTotalLength());
|
|
543
|
+
let pathIsClosed = this.getDistanceSquared(startPoint, endPoint) < 200; // threshold for overlap
|
|
544
|
+
if (pathIsClosed && state.totalPathLength > 50) {
|
|
545
|
+
if (percentComplete >= COMPLETION_THRESHOLD) {
|
|
546
|
+
if (state.currentPathIndex < state.paths.length - 1) {
|
|
547
|
+
this.moveToNextPath(state);
|
|
548
|
+
}
|
|
549
|
+
else if (state.currentPathIndex === state.paths.length - 1) {
|
|
550
|
+
this.moveToNextContainer();
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
else {
|
|
555
|
+
// For open paths, allow completion if near the end
|
|
556
|
+
if (state.totalPathLength - 1 - state.lastLength < 5 && state.currentPathIndex < state.paths.length - 1) {
|
|
557
|
+
this.moveToNextPath(state);
|
|
558
|
+
}
|
|
559
|
+
else if (state.totalPathLength - 1 - state.lastLength < 5 && state.currentPathIndex === state.paths.length - 1) {
|
|
560
|
+
this.moveToNextContainer();
|
|
561
|
+
}
|
|
562
|
+
}
|
|
493
563
|
}
|
|
494
564
|
// this.resetIdleTimer(state); // ← keep timer alive
|
|
495
565
|
}
|
|
496
566
|
// Move to the next container after completing the current SVG
|
|
497
567
|
async moveToNextContainer() {
|
|
568
|
+
this.isDragging = false;
|
|
498
569
|
if (this.moving)
|
|
499
570
|
return; // Prevent multiple calls
|
|
500
571
|
this.moving = true; // Set moving to true to prevent re-entrance
|
|
@@ -513,9 +584,12 @@ const LidoTrace = /*@__PURE__*/ proxyCustomElement(class LidoTrace extends H {
|
|
|
513
584
|
this.moving = false;
|
|
514
585
|
return;
|
|
515
586
|
}
|
|
587
|
+
console.log('onCorrect:', this.onCorrect);
|
|
588
|
+
console.log('el :', this.el);
|
|
516
589
|
if (this.el && this.onCorrect) {
|
|
517
590
|
await executeActions(this.onCorrect, this.el);
|
|
518
591
|
}
|
|
592
|
+
console.log('All SVGs completed, hiding component.');
|
|
519
593
|
triggerNextContainer();
|
|
520
594
|
}
|
|
521
595
|
// Get the pointer position relative to the SVG
|
|
@@ -533,13 +607,13 @@ const LidoTrace = /*@__PURE__*/ proxyCustomElement(class LidoTrace extends H {
|
|
|
533
607
|
const dy = p1.y - p2.y;
|
|
534
608
|
return dx * dx + dy * dy;
|
|
535
609
|
}
|
|
536
|
-
// Find the closest point on the given path to the specified point using two-pass sampling
|
|
610
|
+
// Find the closest point on the given path to the specified point using two-pass sampling (optimized)
|
|
537
611
|
getClosestPointOnPath(pathNode, point) {
|
|
538
612
|
const pathLength = pathNode.getTotalLength();
|
|
539
613
|
let closestPoint = { x: 0, y: 0, length: 0 };
|
|
540
614
|
let minDistanceSquared = Infinity;
|
|
541
|
-
//
|
|
542
|
-
const coarseStep =
|
|
615
|
+
// Optimized: Increase coarse steps for better performance
|
|
616
|
+
const coarseStep = 40; // was 20
|
|
543
617
|
let coarseClosestPoint = { x: 0, y: 0, length: 0 };
|
|
544
618
|
let coarseMinDistanceSquared = Infinity;
|
|
545
619
|
for (let i = 0; i <= pathLength; i += coarseStep) {
|
|
@@ -555,7 +629,7 @@ const LidoTrace = /*@__PURE__*/ proxyCustomElement(class LidoTrace extends H {
|
|
|
555
629
|
}
|
|
556
630
|
}
|
|
557
631
|
// Second pass: fine sampling around coarseClosestPoint
|
|
558
|
-
const fineStep =
|
|
632
|
+
const fineStep = 6; // was 2
|
|
559
633
|
const searchStart = Math.max(coarseClosestPoint.length - coarseStep, 0);
|
|
560
634
|
const searchEnd = Math.min(coarseClosestPoint.length + coarseStep, pathLength);
|
|
561
635
|
for (let i = searchStart; i <= searchEnd; i += fineStep) {
|
|
@@ -715,7 +789,7 @@ const LidoTrace = /*@__PURE__*/ proxyCustomElement(class LidoTrace extends H {
|
|
|
715
789
|
};
|
|
716
790
|
}
|
|
717
791
|
render() {
|
|
718
|
-
return (h(Host, { key: '
|
|
792
|
+
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" })));
|
|
719
793
|
}
|
|
720
794
|
static get assetsDirs() { return ["svg", "images"]; }
|
|
721
795
|
get el() { return this; }
|
|
@@ -754,6 +828,7 @@ const LidoTrace = /*@__PURE__*/ proxyCustomElement(class LidoTrace extends H {
|
|
|
754
828
|
"fileIndex": [32],
|
|
755
829
|
"isDragging": [32],
|
|
756
830
|
"activePointerId": [32],
|
|
831
|
+
"freeTraceUpdateCounter": [32],
|
|
757
832
|
"idleTimer": [32],
|
|
758
833
|
"fingerImg": [32]
|
|
759
834
|
}, undefined, {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, S as SelectedValuesKey, L as LidoContainer, o as executeActions,
|
|
2
|
-
import { d as defineCustomElement$1 } from './p-
|
|
1
|
+
import { p as proxyCustomElement, H, S as SelectedValuesKey, L as LidoContainer, o as executeActions, K as triggerNextContainer, v as handleFloatElementPosition, n as storingEachActivityScore, U as DropAction, k as parseProp, h, j as Host } from './p-36c2e21a.js';
|
|
2
|
+
import { d as defineCustomElement$1 } from './p-0be6b5d5.js';
|
|
3
3
|
|
|
4
4
|
const lidoKeyboardCss = ".lido-keyboard{display:flex;flex-direction:column;align-items:center;gap:30px}.input-area{display:flex;gap:15px}input[type=\"text\"]{font-size:30px;font-weight:600;padding-left:20px;width:300px;height:70px;border:2px solid;background:whitesmoke;border-radius:20px;text-align:center}.keyboard-wrapper{justify-content:center;width:700px}.disabled{opacity:0.5;pointer-events:none}.key-button{background:aquamarine;font-weight:600}";
|
|
5
5
|
const LidoKeyboardStyle0 = lidoKeyboardCss;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, d as setVisibilityWithDelay, i as initEventsForElement,
|
|
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';
|
|
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,
|
|
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';
|
|
2
2
|
|
|
3
3
|
var lib = {exports: {}};
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, d as setVisibilityWithDelay, i as initEventsForElement,
|
|
1
|
+
import { p as proxyCustomElement, H, d as setVisibilityWithDelay, i as initEventsForElement, v as handleFloatElementPosition, w as handleElementClick, k as parseProp, h, j as Host } from './p-36c2e21a.js';
|
|
2
2
|
|
|
3
3
|
const lidoFloatCss = ".lido-float{position:relative}.lido-float>*{position:absolute;cursor:pointer}@keyframes float-up{from{top:var(--el-top)}to{top:-500px}}#removeShadow{box-shadow:unset !important}@keyframes float-lr{from{right:var(--el-left)}to{right:-500px}}";
|
|
4
4
|
const LidoFloatStyle0 = lidoFloatCss;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, i as initEventsForElement,
|
|
1
|
+
import { p as proxyCustomElement, H, i as initEventsForElement, r as handlingChildElements, t as attachSpeakIcon, k as parseProp, h, j as Host } from './p-36c2e21a.js';
|
|
2
2
|
|
|
3
3
|
const lidoRowCss = ".lido-row{display:flex;justify-content:space-around;align-items:center;}.lido-row>*{}";
|
|
4
4
|
const LidoRowStyle0 = lidoRowCss;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, i as initEventsForElement, e as convertUrlToRelative, k as parseProp,
|
|
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';
|
|
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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, d as setVisibilityWithDelay, i as initEventsForElement, h, j as Host } from './p-
|
|
1
|
+
import { p as proxyCustomElement, H, d as setVisibilityWithDelay, i as initEventsForElement, h, j as Host } from './p-36c2e21a.js';
|
|
2
2
|
|
|
3
3
|
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)}";
|
|
4
4
|
const LidoShapeStyle0 = lidoShapeCss;
|
package/dist/esm/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { f as format } from './utils-
|
|
1
|
+
export { f as format } from './utils-ae1eb036.js';
|
|
2
2
|
import './index-37c2ad2d.js';
|