lido-player 0.0.2-alpha-30 → 0.0.2-alpha-32
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_18.cjs.entry.js +16 -6
- package/dist/cjs/{utils-faffb5aa.js → utils-90a0261a.js} +31 -16
- package/dist/collection/components/home/lido-home.js +11 -1
- package/dist/collection/components/text/lido-text.css +0 -4
- package/dist/collection/components/trace/lido-trace.css +1 -1
- package/dist/collection/components/trace/lido-trace.js +3 -3
- package/dist/collection/stories/Templates/categorize2/categorize2.stories.js +12 -12
- package/dist/collection/stories/Templates/grid/grid.stories.js +48 -48
- package/dist/collection/stories/Templates/writeLetter/writeLetter.stories.js +1 -1
- package/dist/collection/stories/Templates/writeWord/writeWord.stories.js +1 -1
- package/dist/collection/utils/utils.js +0 -1
- package/dist/collection/utils/utilsHandlers/clickHandler.js +10 -3
- package/dist/collection/utils/utilsHandlers/dragDropHandler.js +19 -12
- package/dist/collection/utils/utilsHandlers/floatHandler.js +1 -0
- package/dist/components/index.js +1 -1
- package/dist/components/lido-avatar.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-pos.js +1 -1
- package/dist/components/lido-random.js +1 -1
- package/dist/components/lido-root.js +18 -18
- 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-e5406b25.js → p-0b6de9ec.js} +1 -1
- package/dist/components/{p-07ec61dc.js → p-149d738f.js} +1 -1
- package/dist/components/{p-1609320a.js → p-3db20df8.js} +1 -1
- package/dist/components/{p-f298ed2c.js → p-4e30eaee.js} +2 -2
- package/dist/components/{p-cac90114.js → p-518dbf0c.js} +2 -2
- package/dist/components/{p-57cc7be1.js → p-6069f60f.js} +1 -1
- package/dist/components/{p-08ce4f70.js → p-621d3e53.js} +1 -1
- package/dist/components/{p-293b12fe.js → p-6c614a2f.js} +27 -17
- package/dist/components/{p-4896ed36.js → p-769dc22d.js} +31 -17
- package/dist/components/{p-a19696b9.js → p-a65e42db.js} +1 -1
- package/dist/components/{p-ff17497e.js → p-b4e8816f.js} +1 -1
- package/dist/components/{p-198a8ff2.js → p-bcf8583d.js} +1 -1
- package/dist/components/{p-4f632aad.js → p-d7c8fdf9.js} +1 -1
- package/dist/components/{p-d40fa07e.js → p-e157c154.js} +1 -1
- package/dist/components/{p-c081ba5f.js → p-e165a409.js} +1 -1
- package/dist/components/{p-d2e47f32.js → p-e3557ade.js} +1 -1
- package/dist/components/{p-b0ed84c6.js → p-f1a192f1.js} +1 -1
- package/dist/components/{p-c8e49db6.js → p-fd8b0c87.js} +5 -5
- package/dist/esm/index.js +1 -1
- package/dist/esm/lido-avatar_18.entry.js +16 -6
- package/dist/esm/{utils-317cd4b1.js → utils-53fa3280.js} +31 -17
- package/dist/lido-player/index.esm.js +1 -1
- package/dist/lido-player/lido-player.esm.js +1 -1
- package/dist/lido-player/{p-2cb5a61d.js → p-878f7cfe.js} +2 -2
- package/dist/lido-player/p-e43fbd8f.entry.js +1 -0
- package/package.json +1 -1
- package/dist/lido-player/p-5327158a.entry.js +0 -1
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-fe562525.js');
|
|
6
|
-
const utils = require('./utils-
|
|
6
|
+
const utils = require('./utils-90a0261a.js');
|
|
7
7
|
|
|
8
8
|
var rive = {exports: {}};
|
|
9
9
|
|
|
@@ -7116,6 +7116,7 @@ const LidoHome = class {
|
|
|
7116
7116
|
if (index != undefined && index < this.containers.length) {
|
|
7117
7117
|
// Move to the next container
|
|
7118
7118
|
this.currentContainerIndex = index;
|
|
7119
|
+
console.log("container index ; ", this.currentContainerIndex);
|
|
7119
7120
|
// window.dispatchEvent(new CustomEvent('activityChange', { detail: { index: this.currentContainerIndex } }));
|
|
7120
7121
|
utils.dispatchActivityChangeEvent(this.currentContainerIndex);
|
|
7121
7122
|
}
|
|
@@ -7128,6 +7129,7 @@ const LidoHome = class {
|
|
|
7128
7129
|
else if (this.currentContainerIndex >= this.containers.length - 1) {
|
|
7129
7130
|
// const event = new CustomEvent('gameCompleted');
|
|
7130
7131
|
// window.dispatchEvent(event);
|
|
7132
|
+
localStorage.removeItem(utils.ActivityScoreKey);
|
|
7131
7133
|
utils.dispatchGameCompletedEvent();
|
|
7132
7134
|
this.currentContainerIndex = null;
|
|
7133
7135
|
}
|
|
@@ -7180,6 +7182,8 @@ const LidoHome = class {
|
|
|
7180
7182
|
if (alertElement) {
|
|
7181
7183
|
if (comment === 'exit') {
|
|
7182
7184
|
utils.dispatchGameExitEvent();
|
|
7185
|
+
utils.AudioPlayer.getI().stop();
|
|
7186
|
+
localStorage.removeItem(utils.ActivityScoreKey);
|
|
7183
7187
|
utils.clearLocalStorage();
|
|
7184
7188
|
alertElement.remove();
|
|
7185
7189
|
}
|
|
@@ -7214,6 +7218,10 @@ const LidoHome = class {
|
|
|
7214
7218
|
next: this.nextButtonUrl || utils.nextUrl,
|
|
7215
7219
|
speak: this.speakerButtonUrl || utils.speakUrl,
|
|
7216
7220
|
};
|
|
7221
|
+
if (this.currentContainerIndex === 0) {
|
|
7222
|
+
localStorage.removeItem(utils.ActivityScoreKey);
|
|
7223
|
+
utils.clearLocalStorage();
|
|
7224
|
+
}
|
|
7217
7225
|
// Listen for 'NextContainerKey' event to transition between containers
|
|
7218
7226
|
window.addEventListener(utils.NextContainerKey, () => {
|
|
7219
7227
|
this.NextContainerKey();
|
|
@@ -7228,6 +7236,8 @@ const LidoHome = class {
|
|
|
7228
7236
|
this.parseXMLData(this.xmlData);
|
|
7229
7237
|
// Remove stored values in localStorage when the page is about to be unloaded
|
|
7230
7238
|
window.addEventListener('beforeunload', () => {
|
|
7239
|
+
utils.AudioPlayer.getI().stop();
|
|
7240
|
+
localStorage.removeItem(utils.ActivityScoreKey);
|
|
7231
7241
|
utils.clearLocalStorage();
|
|
7232
7242
|
});
|
|
7233
7243
|
}
|
|
@@ -10989,7 +10999,7 @@ const LidoSlideFill = class {
|
|
|
10989
10999
|
};
|
|
10990
11000
|
LidoSlideFill.style = LidoSlideFillStyle0;
|
|
10991
11001
|
|
|
10992
|
-
const lidoTextCss = ".lido-text{transition:background-color 0.3s ease;user-select:none;align-items:center;justify-content:center;text-align:center;border-radius:24px;color:#333;cursor:pointer;font-family:'Baloo Bhai 2', serif}.
|
|
11002
|
+
const lidoTextCss = ".lido-text{transition:background-color 0.3s ease;user-select:none;align-items:center;justify-content:center;text-align:center;border-radius:24px;color:#333;cursor:pointer;font-family:'Baloo Bhai 2', serif}.text-letters{transition:color 0.3s, text-shadow 0.3s;display:inline-block;padding:0 2px}.text-letters.letter-highlight{color:#8e24aa;background:none;border-radius:0;text-shadow:0 2px 8px #8e24aa88;animation:text-letter-bounce 0.4s}.text-words{transition:color 0.3s, text-shadow 0.3s;display:inline-block;padding:0 2px}.text-words.word-highlight{color:#8e24aa;background:none;border-radius:0;text-shadow:0 2px 8px #8e24aa88;animation:text-word-bounce 0.4s}@keyframes text-letter-bounce{0%{transform:scale(1)}60%{transform:scale(1.4)}100%{transform:scale(1)}}@keyframes text-word-bounce{0%{transform:scale(1)}60%{transform:scale(1.3)}100%{transform:scale(1)}}";
|
|
10993
11003
|
const LidoTextStyle0 = lidoTextCss;
|
|
10994
11004
|
|
|
10995
11005
|
const LidoText = class {
|
|
@@ -11114,7 +11124,7 @@ const LidoText = class {
|
|
|
11114
11124
|
};
|
|
11115
11125
|
LidoText.style = LidoTextStyle0;
|
|
11116
11126
|
|
|
11117
|
-
const lidoTraceCss = ":host{display:block;position:relative}#lido-svgContainer{display:flex;justify-content:center;align-items:center;overflow:hidden}svg{width:100%;height:100%;max-height:calc(100vh - 50px);touch-action:none}#lido-draggableCircle{cursor:pointer;fill:#
|
|
11127
|
+
const lidoTraceCss = ":host{display:block;position:relative}#lido-svgContainer{display:flex;justify-content:center;align-items:center;overflow:hidden}svg{width:100%;height:100%;max-height:calc(100vh - 50px);touch-action:none}#lido-draggableCircle{cursor:pointer;fill:#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)}}";
|
|
11118
11128
|
const LidoTraceStyle0 = lidoTraceCss;
|
|
11119
11129
|
|
|
11120
11130
|
const LidoTrace = class {
|
|
@@ -11441,7 +11451,7 @@ const LidoTrace = class {
|
|
|
11441
11451
|
circle.setAttribute('cx', firstPathStart.x.toString());
|
|
11442
11452
|
circle.setAttribute('cy', firstPathStart.y.toString());
|
|
11443
11453
|
circle.setAttribute('r', `calc(${strokeWidth || 10} / 3)`); // Radius of the draggable circle
|
|
11444
|
-
circle.setAttribute('fill', '#
|
|
11454
|
+
circle.setAttribute('fill', '#CF1565'); // fill the color for the circle
|
|
11445
11455
|
(_a = state.svg) === null || _a === void 0 ? void 0 : _a.appendChild(circle);
|
|
11446
11456
|
state.circle = circle;
|
|
11447
11457
|
this.resetIdleTimer(state); // ← start idle timer once the SVG is ready
|
|
@@ -11800,11 +11810,11 @@ const LidoTrace = class {
|
|
|
11800
11810
|
top: utils.parseProp(this.y, orientation),
|
|
11801
11811
|
left: utils.parseProp(this.x, orientation),
|
|
11802
11812
|
zIndex: this.z,
|
|
11803
|
-
position: 'absolute',
|
|
11813
|
+
// position: 'absolute',
|
|
11804
11814
|
};
|
|
11805
11815
|
}
|
|
11806
11816
|
render() {
|
|
11807
|
-
return (index.h(index.Host, { key: '
|
|
11817
|
+
return (index.h(index.Host, { key: 'b3e4e80fb1fa3d1e83ff30aa6258c83c379cb9d4', class: "lido-trace", id: this.id, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, tabindex: this.tabIndex }, index.h("div", { key: 'a0c74bd35eba5de7afa4c4d600cc031e169a01d3', style: this.style, id: "lido-svgContainer" })));
|
|
11808
11818
|
}
|
|
11809
11819
|
static get assetsDirs() { return ["svg", "images"]; }
|
|
11810
11820
|
get el() { return index.getElement(this); }
|
|
@@ -674,11 +674,13 @@ async function onElementDropComplete(dragElement, dropElement) {
|
|
|
674
674
|
const div = document.createElement('div');
|
|
675
675
|
container.append(div);
|
|
676
676
|
div.classList.add('after-drop-popup-container');
|
|
677
|
-
const hasType = dragElement.nextElementSibling;
|
|
678
677
|
dragElement.style.scale = `1`;
|
|
679
678
|
dropElement.style.scale = `1`;
|
|
679
|
+
const allDragElements = container.querySelectorAll('[type="drag"]');
|
|
680
|
+
const dragParents = Array.from(allDragElements).map(el => el.parentElement);
|
|
681
|
+
const allSameParent = dragParents.every(parent => parent === dragElement.parentElement);
|
|
680
682
|
// Remove from old parents
|
|
681
|
-
if (
|
|
683
|
+
if (allSameParent) {
|
|
682
684
|
dragElement.remove();
|
|
683
685
|
dropElement.remove();
|
|
684
686
|
}
|
|
@@ -705,15 +707,6 @@ async function onElementDropComplete(dragElement, dropElement) {
|
|
|
705
707
|
}
|
|
706
708
|
}
|
|
707
709
|
}
|
|
708
|
-
if (dragElement) {
|
|
709
|
-
if (dropElement) {
|
|
710
|
-
dragElement.setAttribute(DropToAttr, dropElement === null || dropElement === void 0 ? void 0 : dropElement.id);
|
|
711
|
-
}
|
|
712
|
-
else {
|
|
713
|
-
dragElement.removeAttribute(DropToAttr);
|
|
714
|
-
}
|
|
715
|
-
dragElement.setAttribute(DropTimeAttr, new Date().getTime().toString());
|
|
716
|
-
}
|
|
717
710
|
if (dropElement) {
|
|
718
711
|
if (dropElement.getAttribute('drop-attr') === 'stretch') {
|
|
719
712
|
if (!dropElement.hasAttribute('data-original-width')) {
|
|
@@ -736,12 +729,26 @@ async function onElementDropComplete(dragElement, dropElement) {
|
|
|
736
729
|
let dragSelected = JSON.parse(dragSelectedData);
|
|
737
730
|
for (const key in dragSelected) {
|
|
738
731
|
if (dragSelected[key].includes(dragElement['value']) && dragElement.classList.contains('dropped')) {
|
|
739
|
-
|
|
732
|
+
const preDropId = dragElement.getAttribute('drop-to');
|
|
733
|
+
const preDrop = container.querySelector(`#${preDropId}`);
|
|
734
|
+
const preDropIndex = preDrop.getAttribute('tab-index');
|
|
735
|
+
if (preDropIndex) {
|
|
736
|
+
delete dragSelected[preDropIndex];
|
|
737
|
+
}
|
|
740
738
|
}
|
|
741
739
|
}
|
|
742
740
|
localStorage.setItem(DragSelectedMapKey, JSON.stringify(dragSelected));
|
|
743
741
|
}
|
|
744
742
|
dragElement.classList.add('dropped');
|
|
743
|
+
if (dragElement) {
|
|
744
|
+
if (dropElement) {
|
|
745
|
+
dragElement.setAttribute(DropToAttr, dropElement === null || dropElement === void 0 ? void 0 : dropElement.id);
|
|
746
|
+
}
|
|
747
|
+
else {
|
|
748
|
+
dragElement.removeAttribute(DropToAttr);
|
|
749
|
+
}
|
|
750
|
+
dragElement.setAttribute(DropTimeAttr, new Date().getTime().toString());
|
|
751
|
+
}
|
|
745
752
|
// Check for overlaps and highlight only the most overlapping element
|
|
746
753
|
if (dropElement && !((_c = dropHasDrag[dropTabIndex]) === null || _c === void 0 ? void 0 : _c.isFull)) {
|
|
747
754
|
let mostOverlappedElement = findMostoverlappedElement$1(dragElement, 'drag');
|
|
@@ -2954,16 +2961,23 @@ function onTouchListenerForOnTouch(element) {
|
|
|
2954
2961
|
setDraggingDisabled(false);
|
|
2955
2962
|
};
|
|
2956
2963
|
const onPointerDown = (event) => {
|
|
2957
|
-
event.stopPropagation();
|
|
2964
|
+
event.stopPropagation();
|
|
2958
2965
|
onholdTriggered = false;
|
|
2959
|
-
onholdTimer = setTimeout(
|
|
2966
|
+
onholdTimer = setTimeout(() => {
|
|
2967
|
+
playAudio();
|
|
2968
|
+
}, onholdTime);
|
|
2960
2969
|
};
|
|
2961
2970
|
const onPointerUp = async (event) => {
|
|
2962
|
-
event.stopPropagation();
|
|
2963
2971
|
clearTimeout(onholdTimer);
|
|
2964
2972
|
if (!onholdTriggered && onTouch) {
|
|
2965
2973
|
await executeActions(onTouch, element);
|
|
2966
2974
|
}
|
|
2975
|
+
else if (!onTouch) {
|
|
2976
|
+
if (['category', 'option'].includes(element.getAttribute('type') || '')) {
|
|
2977
|
+
element.dispatchEvent(new MouseEvent('click', { bubbles: true, cancelable: true }));
|
|
2978
|
+
}
|
|
2979
|
+
}
|
|
2980
|
+
setDraggingDisabled(false);
|
|
2967
2981
|
};
|
|
2968
2982
|
const onPointerLeave = () => {
|
|
2969
2983
|
clearTimeout(onholdTimer);
|
|
@@ -67829,6 +67843,7 @@ function handleFloatElementPosition(element) {
|
|
|
67829
67843
|
console.error(`No container found with id: lido-container`);
|
|
67830
67844
|
return;
|
|
67831
67845
|
}
|
|
67846
|
+
stopHighlightForSpeakingElement(element);
|
|
67832
67847
|
const floatContainer = container.querySelector('.lido-float');
|
|
67833
67848
|
if (!floatContainer)
|
|
67834
67849
|
return;
|
|
@@ -68669,7 +68684,6 @@ const attachSpeakIcon = async (element) => {
|
|
|
68669
68684
|
element.appendChild(speakIconElement);
|
|
68670
68685
|
};
|
|
68671
68686
|
const clearLocalStorage = () => {
|
|
68672
|
-
AudioPlayer.getI().stop();
|
|
68673
68687
|
localStorage.removeItem(DragSelectedMapKey);
|
|
68674
68688
|
localStorage.removeItem(DragMapKey);
|
|
68675
68689
|
localStorage.removeItem(SelectedValuesKey);
|
|
@@ -68755,6 +68769,7 @@ function getCancelBtnPopup() {
|
|
|
68755
68769
|
return cancelBtnPopupState;
|
|
68756
68770
|
}
|
|
68757
68771
|
|
|
68772
|
+
exports.ActivityScoreKey = ActivityScoreKey;
|
|
68758
68773
|
exports.AudioPlayer = AudioPlayer;
|
|
68759
68774
|
exports.LidoContainer = LidoContainer;
|
|
68760
68775
|
exports.NextContainerKey = NextContainerKey;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
|
-
import { NextContainerKey, PrevContainerKey, LidoContainer, exitUrl, prevUrl, nextUrl, speakUrl, } from "../../utils/constants";
|
|
2
|
+
import { NextContainerKey, PrevContainerKey, LidoContainer, exitUrl, prevUrl, nextUrl, speakUrl, ActivityScoreKey, } from "../../utils/constants";
|
|
3
3
|
import { dispatchActivityChangeEvent, dispatchGameCompletedEvent, dispatchGameExitEvent } from "../../utils/customEvents";
|
|
4
4
|
import { clearLocalStorage, calculateScale, getCancelBtnPopup, setCancelBtnPopup, executeActions, triggerPrevcontainer } from "../../utils/utils";
|
|
5
5
|
import { AudioPlayer } from "../../utils/audioPlayer";
|
|
@@ -25,6 +25,7 @@ export class LidoHome {
|
|
|
25
25
|
if (index != undefined && index < this.containers.length) {
|
|
26
26
|
// Move to the next container
|
|
27
27
|
this.currentContainerIndex = index;
|
|
28
|
+
console.log("container index ; ", this.currentContainerIndex);
|
|
28
29
|
// window.dispatchEvent(new CustomEvent('activityChange', { detail: { index: this.currentContainerIndex } }));
|
|
29
30
|
dispatchActivityChangeEvent(this.currentContainerIndex);
|
|
30
31
|
}
|
|
@@ -37,6 +38,7 @@ export class LidoHome {
|
|
|
37
38
|
else if (this.currentContainerIndex >= this.containers.length - 1) {
|
|
38
39
|
// const event = new CustomEvent('gameCompleted');
|
|
39
40
|
// window.dispatchEvent(event);
|
|
41
|
+
localStorage.removeItem(ActivityScoreKey);
|
|
40
42
|
dispatchGameCompletedEvent();
|
|
41
43
|
this.currentContainerIndex = null;
|
|
42
44
|
}
|
|
@@ -89,6 +91,8 @@ export class LidoHome {
|
|
|
89
91
|
if (alertElement) {
|
|
90
92
|
if (comment === 'exit') {
|
|
91
93
|
dispatchGameExitEvent();
|
|
94
|
+
AudioPlayer.getI().stop();
|
|
95
|
+
localStorage.removeItem(ActivityScoreKey);
|
|
92
96
|
clearLocalStorage();
|
|
93
97
|
alertElement.remove();
|
|
94
98
|
}
|
|
@@ -123,6 +127,10 @@ export class LidoHome {
|
|
|
123
127
|
next: this.nextButtonUrl || nextUrl,
|
|
124
128
|
speak: this.speakerButtonUrl || speakUrl,
|
|
125
129
|
};
|
|
130
|
+
if (this.currentContainerIndex === 0) {
|
|
131
|
+
localStorage.removeItem(ActivityScoreKey);
|
|
132
|
+
clearLocalStorage();
|
|
133
|
+
}
|
|
126
134
|
// Listen for 'NextContainerKey' event to transition between containers
|
|
127
135
|
window.addEventListener(NextContainerKey, () => {
|
|
128
136
|
this.NextContainerKey();
|
|
@@ -137,6 +145,8 @@ export class LidoHome {
|
|
|
137
145
|
this.parseXMLData(this.xmlData);
|
|
138
146
|
// Remove stored values in localStorage when the page is about to be unloaded
|
|
139
147
|
window.addEventListener('beforeunload', () => {
|
|
148
|
+
AudioPlayer.getI().stop();
|
|
149
|
+
localStorage.removeItem(ActivityScoreKey);
|
|
140
150
|
clearLocalStorage();
|
|
141
151
|
});
|
|
142
152
|
}
|
|
@@ -325,7 +325,7 @@ export class LidoTrace {
|
|
|
325
325
|
circle.setAttribute('cx', firstPathStart.x.toString());
|
|
326
326
|
circle.setAttribute('cy', firstPathStart.y.toString());
|
|
327
327
|
circle.setAttribute('r', `calc(${strokeWidth || 10} / 3)`); // Radius of the draggable circle
|
|
328
|
-
circle.setAttribute('fill', '#
|
|
328
|
+
circle.setAttribute('fill', '#CF1565'); // fill the color for the circle
|
|
329
329
|
(_a = state.svg) === null || _a === void 0 ? void 0 : _a.appendChild(circle);
|
|
330
330
|
state.circle = circle;
|
|
331
331
|
this.resetIdleTimer(state); // ← start idle timer once the SVG is ready
|
|
@@ -684,11 +684,11 @@ export class LidoTrace {
|
|
|
684
684
|
top: parseProp(this.y, orientation),
|
|
685
685
|
left: parseProp(this.x, orientation),
|
|
686
686
|
zIndex: this.z,
|
|
687
|
-
position: 'absolute',
|
|
687
|
+
// position: 'absolute',
|
|
688
688
|
};
|
|
689
689
|
}
|
|
690
690
|
render() {
|
|
691
|
-
return (h(Host, { key: '
|
|
691
|
+
return (h(Host, { key: 'b3e4e80fb1fa3d1e83ff30aa6258c83c379cb9d4', class: "lido-trace", id: this.id, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, tabindex: this.tabIndex }, h("div", { key: 'a0c74bd35eba5de7afa4c4d600cc031e169a01d3', style: this.style, id: "lido-svgContainer" })));
|
|
692
692
|
}
|
|
693
693
|
static get is() { return "lido-trace"; }
|
|
694
694
|
static get originalStyleUrls() {
|
|
@@ -126,34 +126,34 @@ function getContainerXml(args) {
|
|
|
126
126
|
<lido-cell layout="landscape.row,portrait.wrap" z="0" visible="true" type="optionArea" height="landscape.32%,portrait.38%" width="landscape.99%,portrait.98%" bg-Color="#FEEDE6" margin="landscape.-33px 0px 32px 0px, portrait.23px 0px 18px 0px" onEntry=" this.border='1px solid #FAB89C';this.overflow=' hidden'; this.gap='25px'; this.align-items='center'; this.justify-content='center';this.border-radius='6px';">
|
|
127
127
|
|
|
128
128
|
${args.image1.length === 0 && args.option1.length === 0 ? '' : `<lido-cell layout="col" audio="${args.option1Audio}" x="29px" y="-221px" z="1" onTouch="" visible="true" type="option" tab-index="6" id="i1" value="${args.option1}" height="217px" width="149px" bg-Color="white" onEntry="this.padding='0px';this.flex-shrink='0'; this.box-sizing='unset'; this.align-items='center';this.justify-content='center';this.border-radius='6px';this. box-shadow=' 0px 8px 0px -2px rgba(0, 0, 0, 0.1)'">
|
|
129
|
-
${args.image1.length === 0 ? '' : `<lido-image visible="true" height="145px" width="145px" bgColor="transparent" src="${args.image1}" onEntry="this.flex=' 0 0 auto'; this.boxShadow='unset';this.transition = 'transform 0.5s ease';" ></lido-image>`}
|
|
129
|
+
${args.image1.length === 0 ? '' : `<lido-image visible="true" height="145px" width="145px" bgColor="transparent" src="${args.image1}" onEntry="this.pointer-events=' none';this.flex=' 0 0 auto'; this.boxShadow='unset';this.transition = 'transform 0.5s ease';" ></lido-image>`}
|
|
130
130
|
|
|
131
|
-
${args.option1.length === 0 ? '' : `<lido-text visible="true" height="31px" width="145px" string="${args.option1}" font-family="'Baloo Bhai 2'" font-size="32px" margin="0px 0px 0px 0px" onEntry="this.border-radius='0px'; this.fontWeight='500';" bg-Color="white"></lido-text>`}
|
|
131
|
+
${args.option1.length === 0 ? '' : `<lido-text visible="true" height="31px" width="145px" string="${args.option1}" font-family="'Baloo Bhai 2'" font-size="32px" margin="0px 0px 0px 0px" onEntry="this.pointer-events=' none';this.border-radius='0px'; this.fontWeight='500';" bg-Color="white"></lido-text>`}
|
|
132
132
|
</lido-cell>`}
|
|
133
133
|
${args.image2.length === 0 && args.option2.length === 0 ? '' : `<lido-cell layout="col" onTouch="" audio="${args.option2Audio}" x="29px" y="-221px" visible="true" type="option" tab-index="7" id="i2" value="${args.option2}" height="217px" width="149px" bg-Color="white" onEntry="this.padding='0px';this.flex-shrink='0';this.box-sizing='unset';this.align-items='center';this.justify-content='center';this.border-radius='6px';this. box-shadow=' 0px 8px 0px -2px rgba(0, 0, 0, 0.1)'">
|
|
134
|
-
${args.image2.length === 0 ? '' : ` <lido-image visible="true" height="145px" width="145px" bgColor="transparent" src="${args.image2}" onEntry="this.flex=' 0 0 auto';this.boxShadow='unset';this.transition = 'transform 0.5s ease';"></lido-image>`}
|
|
135
|
-
${args.option2.length === 0 ? '' : ` <lido-text visible="true" height="31px" width="145px" string="${args.option2}" font-family="'Baloo Bhai 2'" font-size="32px" margin="0px 0px 0px 0px" onEntry="this.border-radius='0px'; this.fontWeight='500';" bg-Color="white"></lido-text>`}
|
|
134
|
+
${args.image2.length === 0 ? '' : ` <lido-image visible="true" height="145px" width="145px" bgColor="transparent" src="${args.image2}" onEntry="this.pointer-events=' none';this.flex=' 0 0 auto';this.boxShadow='unset';this.transition = 'transform 0.5s ease';"></lido-image>`}
|
|
135
|
+
${args.option2.length === 0 ? '' : ` <lido-text visible="true" height="31px" width="145px" string="${args.option2}" font-family="'Baloo Bhai 2'" font-size="32px" margin="0px 0px 0px 0px" onEntry="this.pointer-events=' none';this.border-radius='0px'; this.fontWeight='500';" bg-Color="white"></lido-text>`}
|
|
136
136
|
</lido-cell>`}
|
|
137
137
|
|
|
138
138
|
|
|
139
139
|
${args.image3.length === 0 && args.option3.length === 0 ? '' : `<lido-cell layout="col" onTouch="" audio="${args.option3Audio}" x="29px" y="-221px" visible="true" type="option" tab-index="8" id="i3" value="${args.option3}" height="217px" width="149px" bg-Color="white" onEntry="this.padding='0px';this.flex-shrink='0';this.box-sizing='unset';this.align-items='center';this.justify-content='center';this.border-radius='6px';this. box-shadow=' 0px 8px 0px -2px rgba(0, 0, 0, 0.1)'">
|
|
140
|
-
${args.image3.length === 0 ? '' : `<lido-image visible="true" height="145px" width="145px" bgColor="transparent" src="${args.image3}" onEntry="this.flex=' 0 0 auto';this.boxShadow='unset';this.transition = 'transform 0.5s ease';" z="5"></lido-image>`}
|
|
141
|
-
${args.option3.length === 0 ? '' : `<lido-text visible="true" height="31px" width="145px" string="${args.option3}" font-family="'Baloo Bhai 2'" font-size="32px" margin="0px 0px 0px 0px" onEntry="this.border-radius='0px'; this.fontWeight='500';" bg-Color="white"></lido-text>`}
|
|
140
|
+
${args.image3.length === 0 ? '' : `<lido-image visible="true" height="145px" width="145px" bgColor="transparent" src="${args.image3}" onEntry="this.pointer-events=' none';this.flex=' 0 0 auto';this.boxShadow='unset';this.transition = 'transform 0.5s ease';" z="5"></lido-image>`}
|
|
141
|
+
${args.option3.length === 0 ? '' : `<lido-text visible="true" height="31px" width="145px" string="${args.option3}" font-family="'Baloo Bhai 2'" font-size="32px" margin="0px 0px 0px 0px" onEntry="this.pointer-events=' none';this.border-radius='0px'; this.fontWeight='500';" bg-Color="white"></lido-text>`}
|
|
142
142
|
</lido-cell>`}
|
|
143
143
|
|
|
144
144
|
${args.image4.length === 0 && args.option4.length === 0 ? '' : `<lido-cell layout="col" onTouch="" audio="${args.option4Audio}" x="29px" y="-221px" visible="true" type="option" tab-index="9" id="i4" value="${args.option4}" height="217px" width="149px" bg-Color="white" onEntry="this.padding='0px';this.flex-shrink='0';this.box-sizing='unset';this.align-items='center';this.justify-content='center';this.border-radius='6px';this. box-shadow=' 0px 8px 0px -2px rgba(0, 0, 0, 0.1)'">
|
|
145
|
-
${args.image4.length === 0 ? '' : `<lido-image visible="true" height="145px" width="145px" bgColor="transparent" src="${args.image4}" onEntry="this.flex=' 0 0 auto';this.boxShadow='unset';this.transition = 'transform 0.5s ease';" z="5"></lido-image>`}
|
|
146
|
-
${args.option4.length === 0 ? '' : `<lido-text visible="true" onTouch="" height="31px" width="145px" string="${args.option4}" font-family="'Baloo Bhai 2'" font-size="32px" margin="0px 0px 0px 0px" onEntry="this.border-radius='0px'; this.fontWeight='500';" bg-Color="white"></lido-text>`}
|
|
145
|
+
${args.image4.length === 0 ? '' : `<lido-image visible="true" height="145px" width="145px" bgColor="transparent" src="${args.image4}" onEntry="this.pointer-events=' none';this.flex=' 0 0 auto';this.boxShadow='unset';this.transition = 'transform 0.5s ease';" z="5"></lido-image>`}
|
|
146
|
+
${args.option4.length === 0 ? '' : `<lido-text visible="true" onTouch="" height="31px" width="145px" string="${args.option4}" font-family="'Baloo Bhai 2'" font-size="32px" margin="0px 0px 0px 0px" onEntry="this.pointer-events=' none';this.border-radius='0px'; this.fontWeight='500';" bg-Color="white"></lido-text>`}
|
|
147
147
|
</lido-cell>`}
|
|
148
148
|
|
|
149
149
|
${args.image5.length === 0 && args.option5.length === 0 ? '' : `<lido-cell layout="col" onTouch="" audio="${args.option5Audio}" x="29px" y="-221px" visible="true" type="option" tab-index="10" id="i5" value="${args.option5}" height="217px" width="149px" bg-Color="white" onEntry="this.padding='0px';this.flex-shrink='0';this.box-sizing='unset';this.align-items='center';this.justify-content='center';this.border-radius='6px';this. box-shadow=' 0px 8px 0px -2px rgba(0, 0, 0, 0.1)'">
|
|
150
|
-
${args.image5.length === 0 ? '' : `<lido-image visible="true" height="145px" width="145px" bgColor="transparent" src="${args.image5}" onEntry="this.flex=' 0 0 auto';this.boxShadow='unset';this.transition = 'transform 0.5s ease';" z="5"></lido-image>`}
|
|
151
|
-
${args.option5.length === 0 ? '' : `<lido-text visible="true" onTouch="" height="31px" width="145px" string="${args.option5}" font-family="'Baloo Bhai 2'" font-size="32px" margin="0px 0px 0px 0px" onEntry="this.border-radius='0px'; this.fontWeight='500';" bg-Color="white"></lido-text>1`}
|
|
150
|
+
${args.image5.length === 0 ? '' : `<lido-image visible="true" height="145px" width="145px" bgColor="transparent" src="${args.image5}" onEntry="this.pointer-events=' none';this.flex=' 0 0 auto';this.boxShadow='unset';this.transition = 'transform 0.5s ease';" z="5"></lido-image>`}
|
|
151
|
+
${args.option5.length === 0 ? '' : `<lido-text visible="true" onTouch="" height="31px" width="145px" string="${args.option5}" font-family="'Baloo Bhai 2'" font-size="32px" margin="0px 0px 0px 0px" onEntry="this.pointer-events=' none';this.border-radius='0px'; this.fontWeight='500';" bg-Color="white"></lido-text>1`}
|
|
152
152
|
</lido-cell>`}
|
|
153
153
|
|
|
154
154
|
${args.image6.length === 0 && args.option6.length === 0 ? '' : `<lido-cell layout="col" onTouch="" audio="${args.option6Audio}" x="29px" y="-221px" visible="true" type="option" tab-index="11" id="i6" value="${args.option6}" height="217px" width="149px" bg-Color="white" onEntry="this.padding='0px';this.flex-shrink='0';this.box-sizing='unset';this.align-items='center';this.justify-content='center';this.border-radius='6px';this. box-shadow=' 0px 8px 0px -2px rgba(0, 0, 0, 0.1)'">
|
|
155
|
-
${args.image6.length === 0 ? '' : `<lido-image visible="true" height="145px" width="145px" bgColor="transparent" src="${args.image6}" onEntry="this.flex=' 0 0 auto';this.boxShadow='unset';this.transition = 'transform 0.5s ease';" z="5"></lido-image>`}
|
|
156
|
-
${args.option6.length === 0 ? '' : `<lido-text visible="true" onTouch="" height="31px" width="145px" string="${args.option6}" font-family="'Baloo Bhai 2'" font-size="32px" margin="0px 0px 0px 0px" onEntry="this.border-radius='0px'; this.fontWeight='500';" bg-Color="white"></lido-text>`}
|
|
155
|
+
${args.image6.length === 0 ? '' : `<lido-image visible="true" height="145px" width="145px" bgColor="transparent" src="${args.image6}" onEntry="this.pointer-events=' none';this.flex=' 0 0 auto';this.boxShadow='unset';this.transition = 'transform 0.5s ease';" z="5"></lido-image>`}
|
|
156
|
+
${args.option6.length === 0 ? '' : `<lido-text visible="true" onTouch="" height="31px" width="145px" string="${args.option6}" font-family="'Baloo Bhai 2'" font-size="32px" margin="0px 0px 0px 0px" onEntry="this.pointer-events=' none';this.border-radius='0px'; this.fontWeight='500';" bg-Color="white"></lido-text>`}
|
|
157
157
|
</lido-cell>`}
|
|
158
158
|
|
|
159
159
|
</lido-cell>
|