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