lido-player 0.0.2-alpha-57-dev → 0.0.2-alpha-59-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 +94 -34
- package/dist/cjs/lido-player.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{utils-a61cfc6b.js → utils-03573882.js} +160 -124
- package/dist/collection/components/container/lido-container.js +60 -3
- package/dist/collection/components/flashCard/lido-flash-card.js +10 -1
- package/dist/collection/components/float/lido-float.js +1 -1
- package/dist/collection/components/home/lido-home.js +22 -12
- package/dist/collection/components/keyboard/lido-keyboard.js +2 -2
- package/dist/collection/components/mathMatrix/lido-math-matrix.js +1 -1
- package/dist/collection/components/position/lido-pos.js +1 -1
- package/dist/collection/components/random/lido-random.js +1 -1
- package/dist/collection/components/row/lido-row.js +1 -1
- package/dist/collection/components/scale/lido-balance.js +1 -1
- package/dist/collection/components/shape/lido-shape.js +2 -2
- package/dist/collection/components/slideFill/lido-slide-fill.js +1 -1
- package/dist/collection/components/text/lido-text.js +1 -1
- package/dist/collection/components/trace/lido-trace.js +18 -7
- package/dist/collection/components/wrap/lido-wrap.js +1 -1
- package/dist/collection/css/animation.css +17 -0
- package/dist/collection/css/index.css +1 -1
- package/dist/collection/stories/Templates/LetterPairing/LetterPairing.stories.js +3 -3
- package/dist/collection/stories/Templates/balancing/balancing.stories.js +1 -1
- package/dist/collection/stories/Templates/matchBox/matchBox2.stories.js +74 -44
- package/dist/collection/stories/Templates/matchingCard/matching-card.stories.js +4 -4
- package/dist/collection/stories/Templates/numberBoardTwo/numberBoardTwo.stories.js +2 -2
- package/dist/collection/stories/Templates/numberIdentification/numberIdentificationimageTotext.stories.js +91 -0
- package/dist/collection/stories/Templates/numberIdentification/numberIdentificationtextTotext.stories.js +84 -0
- package/dist/collection/stories/Templates/openwindow/openwindow.stories.js +0 -2
- package/dist/collection/stories/Templates/openwindow/openwindow2.stories.js +0 -2
- package/dist/collection/stories/Templates/order-tractor/order-tractor-ascending-order.stories.js +6 -5
- package/dist/collection/stories/Templates/order-tractor/order-tractor.stories.js +6 -6
- package/dist/collection/stories/Templates/palEgmaCalculateSum/palEgmaMultiOption.stories.js +106 -0
- package/dist/collection/stories/Templates/palEgmaCalculateSum/palEgmaSumTogether.stories.js +91 -0
- package/dist/collection/stories/Templates/palEgmaPatternMatching/palEgmaPatternMatching.stories.js +86 -0
- package/dist/collection/stories/Templates/palEgmaWordProblem/palEgmaWordProblem.stories.js +131 -0
- package/dist/collection/stories/Templates/palEgraInventedSpelling/pal_egra_invented_spelling_schema.stories.js +61 -0
- package/dist/collection/stories/Templates/palEgraMCQWithImage/palEgraMCQWithImage.stories.js +87 -0
- package/dist/collection/stories/Templates/palEgraStoryMaking/pal_egra_story_making.stories.js +72 -0
- package/dist/collection/stories/Templates/palEgraTemplate1/palEgraLetterIdentification.stories.js +61 -0
- package/dist/collection/stories/Templates/palEgra_OddOneOut/palEgra_oddOneOut.stories.js +60 -0
- package/dist/collection/stories/Templates/palEgra_word_formation/palEgra_WordFormation.stories.js +73 -0
- package/dist/collection/stories/Templates/pictureClues/pictureClues.stories.js +88 -0
- package/dist/collection/stories/Templates/pictureWordMatch/pictureWordMatch1.stories.js +88 -0
- package/dist/collection/stories/Templates/pictureWordMatch/pictureWordMatch2.stories.js +66 -0
- package/dist/collection/stories/Templates/picturemeaning/pictureMeaningCocos.stories.js +1 -1
- package/dist/collection/stories/Templates/quizMaths/quizMaths.stories.js +7 -7
- package/dist/collection/stories/Templates/rowBlocks/rowBlocks.stories.js +1 -1
- package/dist/collection/stories/Templates/sequenceBox/sequenceBox1.stories.js +16 -13
- package/dist/collection/stories/Templates/sequenceBox/sequenceBox2.stories.js +17 -14
- package/dist/collection/stories/Templates/substraction/substractionWithimg.stories.js +111 -0
- package/dist/collection/stories/Templates/substraction/substractionWithoutImg.stories.js +70 -0
- package/dist/collection/stories/Templates/sumTogether/sumTogether.stories.js +11 -10
- package/dist/collection/stories/Templates/total/total.stories.js +2 -0
- package/dist/collection/stories/Templates/wordBuilding/wordBuildingwithimg.stories.js +76 -0
- package/dist/collection/stories/Templates/wordBuilding/wordBuildingwithoutimg.stories.js +74 -0
- package/dist/collection/stories/Templates/writeSet/writeSet.stories.js +1 -1
- package/dist/collection/utils/constants.js +2 -1
- package/dist/collection/utils/utils.js +29 -20
- package/dist/collection/utils/utilsHandlers/clickHandler.js +2 -0
- package/dist/collection/utils/utilsHandlers/dragDropHandler.js +24 -20
- package/dist/collection/utils/utilsHandlers/highlightHandler.js +50 -2
- package/dist/collection/utils/utilsHandlers/lidoBalanceHandler.js +5 -4
- 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 -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-73e3f0f4.js → p-2bb1f74d.js} +203 -1
- package/dist/components/{p-f3bc4577.js → p-33b83222.js} +1 -1
- package/dist/components/{p-0712a27e.js → p-3513b1f3.js} +159 -125
- package/dist/components/{p-f2b53e8e.js → p-356e56bd.js} +2 -2
- package/dist/components/{p-b9875116.js → p-49ccf573.js} +18 -7
- package/dist/components/{p-330caab8.js → p-4d9462ab.js} +4 -4
- package/dist/components/{p-4d332eab.js → p-5aa24314.js} +2 -2
- package/dist/components/{p-d1b5079b.js → p-5c990168.js} +45 -6
- package/dist/components/{p-21852d55.js → p-5eeaccab.js} +2 -2
- package/dist/components/{p-480f708a.js → p-6819005f.js} +11 -2
- package/dist/components/{p-ffc40642.js → p-6bbad90f.js} +2 -2
- package/dist/components/{p-e1ba0c44.js → p-73e4bb01.js} +41 -33
- package/dist/components/{p-ff801ba1.js → p-84302365.js} +1 -1
- package/dist/components/{p-0a41b2f8.js → p-99fcbae4.js} +1 -1
- package/dist/components/{p-9104d427.js → p-9b35082a.js} +2 -2
- package/dist/components/{p-882b291d.js → p-ad0f335e.js} +2 -2
- package/dist/components/{p-c4739621.js → p-aff68c41.js} +3 -3
- package/dist/components/{p-2829c82c.js → p-d9b17242.js} +2 -2
- package/dist/components/{p-cca36777.js → p-de62d08e.js} +3 -3
- package/dist/components/{p-4e041807.js → p-e8e9250e.js} +2 -2
- package/dist/components/{p-17f84b2f.js → p-f238004e.js} +2 -2
- package/dist/components/{p-eab0ebb7.js → p-f9426cbe.js} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/lido-avatar_22.entry.js +94 -34
- package/dist/esm/lido-player.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-7ed76799.js → utils-3995d2d5.js} +159 -125
- package/dist/lido-player/index.esm.js +1 -1
- package/dist/lido-player/lido-player.css +1 -1
- package/dist/lido-player/lido-player.esm.js +1 -1
- package/dist/lido-player/p-75daccb0.entry.js +1 -0
- package/dist/lido-player/{p-17d93181.js → p-aee89fba.js} +2 -2
- package/dist/types/components/container/lido-container.d.ts +15 -2
- package/dist/types/components/trace/lido-trace.d.ts +3 -3
- package/dist/types/components.d.ts +10 -2
- package/dist/types/stories/Templates/numberIdentification/numberIdentificationimageTotext.stories.d.ts +4 -0
- package/dist/types/stories/Templates/numberIdentification/numberIdentificationtextTotext.stories.d.ts +4 -0
- package/dist/types/stories/Templates/palEgmaCalculateSum/palEgmaMultiOption.stories.d.ts +11 -0
- package/dist/types/stories/Templates/palEgmaCalculateSum/palEgmaSumTogether.stories.d.ts +12 -0
- package/dist/types/stories/Templates/palEgmaPatternMatching/palEgmaPatternMatching.stories.d.ts +4 -0
- package/dist/types/stories/Templates/palEgmaWordProblem/palEgmaWordProblem.stories.d.ts +5 -0
- package/dist/types/stories/Templates/palEgraInventedSpelling/pal_egra_invented_spelling_schema.stories.d.ts +4 -0
- package/dist/types/stories/Templates/palEgraMCQWithImage/palEgraMCQWithImage.stories.d.ts +4 -0
- package/dist/types/stories/Templates/palEgraStoryMaking/pal_egra_story_making.stories.d.ts +4 -0
- package/dist/types/stories/Templates/palEgraTemplate1/palEgraLetterIdentification.stories.d.ts +4 -0
- package/dist/types/stories/Templates/palEgra_OddOneOut/palEgra_oddOneOut.stories.d.ts +4 -0
- package/dist/types/stories/Templates/palEgra_word_formation/palEgra_WordFormation.stories.d.ts +4 -0
- package/dist/types/stories/Templates/pictureClues/pictureClues.stories.d.ts +4 -0
- package/dist/types/stories/Templates/pictureWordMatch/pictureWordMatch1.stories.d.ts +4 -0
- package/dist/types/stories/Templates/pictureWordMatch/pictureWordMatch2.stories.d.ts +4 -0
- package/dist/types/stories/Templates/substraction/substractionWithimg.stories.d.ts +4 -0
- package/dist/types/stories/Templates/substraction/substractionWithoutImg.stories.d.ts +4 -0
- package/dist/types/stories/Templates/wordBuilding/wordBuildingwithimg.stories.d.ts +4 -0
- package/dist/types/stories/Templates/wordBuilding/wordBuildingwithoutimg.stories.d.ts +4 -0
- package/dist/types/utils/constants.d.ts +9 -1
- package/dist/types/utils/utils.d.ts +1 -0
- package/dist/types/utils/utilsHandlers/highlightHandler.d.ts +1 -0
- package/package.json +1 -1
- package/dist/components/p-7ab0a273.js +0 -204
- package/dist/lido-player/p-fa9dfdf8.entry.js +0 -1
|
@@ -1,26 +1,25 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, g as getAssetPath, h } from './p-
|
|
2
|
-
import { i as instance } from './p-
|
|
3
|
-
import { d as defineCustomElement$m } from './p-
|
|
4
|
-
import { d as defineCustomElement$l } from './p-
|
|
5
|
-
import { d as defineCustomElement$k } from './p-
|
|
6
|
-
import { d as defineCustomElement$j } from './p-
|
|
7
|
-
import { d as defineCustomElement$i } from './p-
|
|
8
|
-
import { d as defineCustomElement$h } from './p-
|
|
9
|
-
import { d as defineCustomElement$g } from './p-
|
|
10
|
-
import { d as defineCustomElement$f } from './p-
|
|
11
|
-
import { d as defineCustomElement$e } from './p-
|
|
12
|
-
import { d as defineCustomElement$d } from './p-
|
|
13
|
-
import { d as defineCustomElement$c } from './p-
|
|
14
|
-
import { d as defineCustomElement$b } from './p-
|
|
15
|
-
import { d as defineCustomElement$a } from './p-
|
|
16
|
-
import { d as defineCustomElement$9 } from './p-
|
|
17
|
-
import { d as defineCustomElement$8 } from './p-
|
|
18
|
-
import { d as defineCustomElement$7 } from './p-
|
|
19
|
-
import { d as defineCustomElement$6 } from './p-
|
|
20
|
-
import { d as defineCustomElement$5 } from './p-
|
|
21
|
-
import { d as defineCustomElement$
|
|
22
|
-
import { d as defineCustomElement$
|
|
23
|
-
import { d as defineCustomElement$2 } from './p-4e041807.js';
|
|
1
|
+
import { p as proxyCustomElement, H, g as getAssetPath, h } from './p-3513b1f3.js';
|
|
2
|
+
import { d as defineCustomElement$4, i as instance } from './p-2bb1f74d.js';
|
|
3
|
+
import { d as defineCustomElement$m } from './p-99fcbae4.js';
|
|
4
|
+
import { d as defineCustomElement$l } from './p-5eeaccab.js';
|
|
5
|
+
import { d as defineCustomElement$k } from './p-aff68c41.js';
|
|
6
|
+
import { d as defineCustomElement$j } from './p-ad0f335e.js';
|
|
7
|
+
import { d as defineCustomElement$i } from './p-33b83222.js';
|
|
8
|
+
import { d as defineCustomElement$h } from './p-f9426cbe.js';
|
|
9
|
+
import { d as defineCustomElement$g } from './p-5c990168.js';
|
|
10
|
+
import { d as defineCustomElement$f } from './p-6819005f.js';
|
|
11
|
+
import { d as defineCustomElement$e } from './p-f238004e.js';
|
|
12
|
+
import { d as defineCustomElement$d } from './p-73e4bb01.js';
|
|
13
|
+
import { d as defineCustomElement$c } from './p-84302365.js';
|
|
14
|
+
import { d as defineCustomElement$b } from './p-4d9462ab.js';
|
|
15
|
+
import { d as defineCustomElement$a } from './p-6bbad90f.js';
|
|
16
|
+
import { d as defineCustomElement$9 } from './p-5aa24314.js';
|
|
17
|
+
import { d as defineCustomElement$8 } from './p-9b35082a.js';
|
|
18
|
+
import { d as defineCustomElement$7 } from './p-d9b17242.js';
|
|
19
|
+
import { d as defineCustomElement$6 } from './p-de62d08e.js';
|
|
20
|
+
import { d as defineCustomElement$5 } from './p-356e56bd.js';
|
|
21
|
+
import { d as defineCustomElement$3 } from './p-49ccf573.js';
|
|
22
|
+
import { d as defineCustomElement$2 } from './p-e8e9250e.js';
|
|
24
23
|
|
|
25
24
|
const LidoRoot$1 = /*@__PURE__*/ proxyCustomElement(class LidoRoot extends H {
|
|
26
25
|
constructor() {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { p as proxyCustomElement, H, d as setVisibilityWithDelay, i as initEventsForElement, t as attachSpeakIcon, L as LIDO_COMMON_AUDIO_READY_EVENT, e as convertUrlToRelative, k as parseProp, h, j as Host, u as LIDO_COMMON_AUDIO_PATH } from './p-3513b1f3.js';
|
|
2
|
+
|
|
1
3
|
const isString = obj => typeof obj === 'string';
|
|
2
4
|
const defer = () => {
|
|
3
5
|
let res;
|
|
@@ -2703,4 +2705,204 @@ instance
|
|
|
2703
2705
|
},
|
|
2704
2706
|
});
|
|
2705
2707
|
|
|
2706
|
-
|
|
2708
|
+
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)}}";
|
|
2709
|
+
const LidoTextStyle0 = lidoTextCss;
|
|
2710
|
+
|
|
2711
|
+
const LidoText = /*@__PURE__*/ proxyCustomElement(class LidoText extends H {
|
|
2712
|
+
constructor() {
|
|
2713
|
+
super();
|
|
2714
|
+
this.__registerHost();
|
|
2715
|
+
this.showSpeakIcon = false;
|
|
2716
|
+
this.id = '';
|
|
2717
|
+
this.value = '';
|
|
2718
|
+
this.string = '';
|
|
2719
|
+
this.fontFamily = '';
|
|
2720
|
+
this.fontSize = '20px';
|
|
2721
|
+
this.fontColor = '';
|
|
2722
|
+
this.highlightWhileSpeaking = false;
|
|
2723
|
+
this.height = 'auto';
|
|
2724
|
+
this.width = 'auto';
|
|
2725
|
+
this.ariaLabel = '';
|
|
2726
|
+
this.ariaHidden = '';
|
|
2727
|
+
this.x = '0px';
|
|
2728
|
+
this.y = '0px';
|
|
2729
|
+
this.z = '0';
|
|
2730
|
+
this.bgColor = '';
|
|
2731
|
+
this.borderImage = '';
|
|
2732
|
+
this.type = '';
|
|
2733
|
+
this.tabIndex = 0;
|
|
2734
|
+
this.visible = false;
|
|
2735
|
+
this.audio = '';
|
|
2736
|
+
this.onTouch = '';
|
|
2737
|
+
this.onInCorrect = '';
|
|
2738
|
+
this.onCorrect = '';
|
|
2739
|
+
this.minDrops = 1;
|
|
2740
|
+
this.maxDrops = 1;
|
|
2741
|
+
this.onEntry = '';
|
|
2742
|
+
this.margin = '';
|
|
2743
|
+
this.padding = '';
|
|
2744
|
+
this.borderRadius = '0px';
|
|
2745
|
+
this.spanType = '';
|
|
2746
|
+
this.style = {};
|
|
2747
|
+
this.delayVisible = '';
|
|
2748
|
+
this.disableSpeak = false;
|
|
2749
|
+
}
|
|
2750
|
+
/**
|
|
2751
|
+
* Lifecycle hook that runs after the component is rendered in the DOM.
|
|
2752
|
+
* It initializes custom events based on the `type` of the text component.
|
|
2753
|
+
*/
|
|
2754
|
+
componentDidLoad() {
|
|
2755
|
+
setVisibilityWithDelay(this.el, this.delayVisible);
|
|
2756
|
+
initEventsForElement(this.el, this.type);
|
|
2757
|
+
// only create span element if requested
|
|
2758
|
+
if (this.spanType === 'words' || this.spanType === 'letters') {
|
|
2759
|
+
this.addSpanToText();
|
|
2760
|
+
}
|
|
2761
|
+
if (this.showSpeakIcon) {
|
|
2762
|
+
attachSpeakIcon(this.el);
|
|
2763
|
+
}
|
|
2764
|
+
if (!this.audio || this.audio.trim() === "") {
|
|
2765
|
+
const applyAutoAudio = () => {
|
|
2766
|
+
const autoAudio = this.resolveAutoAudio();
|
|
2767
|
+
if (autoAudio) {
|
|
2768
|
+
this.audio = autoAudio;
|
|
2769
|
+
console.log("[LidoText] Auto audio applied:", autoAudio);
|
|
2770
|
+
}
|
|
2771
|
+
};
|
|
2772
|
+
// If path is already available, apply immediately
|
|
2773
|
+
if (window.__LIDO_COMMON_AUDIO_PATH__) {
|
|
2774
|
+
applyAutoAudio();
|
|
2775
|
+
}
|
|
2776
|
+
else {
|
|
2777
|
+
// Otherwise, wait for it
|
|
2778
|
+
window.addEventListener(LIDO_COMMON_AUDIO_READY_EVENT, applyAutoAudio, { once: true });
|
|
2779
|
+
}
|
|
2780
|
+
}
|
|
2781
|
+
}
|
|
2782
|
+
resolveAutoAudio() {
|
|
2783
|
+
const base = window[LIDO_COMMON_AUDIO_PATH];
|
|
2784
|
+
if (!base || !this.string)
|
|
2785
|
+
return null;
|
|
2786
|
+
const fileName = this.string.toLowerCase().trim().replace(/\s+/g, "_").replace(/[^\w-]/g, "");
|
|
2787
|
+
return `${base}/${fileName}.mp3`;
|
|
2788
|
+
}
|
|
2789
|
+
/**
|
|
2790
|
+
* Lifecycle method that runs before the component is rendered.
|
|
2791
|
+
* Initializes styles and sets up event listeners for resize and load events.
|
|
2792
|
+
*/
|
|
2793
|
+
componentWillLoad() {
|
|
2794
|
+
this.updateStyles();
|
|
2795
|
+
window.addEventListener('resize', this.updateStyles.bind(this));
|
|
2796
|
+
window.addEventListener('load', this.updateStyles.bind(this));
|
|
2797
|
+
}
|
|
2798
|
+
disconnectedCallback() {
|
|
2799
|
+
window.removeEventListener('resize', this.updateStyles.bind(this));
|
|
2800
|
+
window.removeEventListener('load', this.updateStyles.bind(this));
|
|
2801
|
+
}
|
|
2802
|
+
updateStyles() {
|
|
2803
|
+
const borderImg = this.borderImage ? convertUrlToRelative(this.borderImage) : '';
|
|
2804
|
+
const orientation = window.innerHeight > window.innerWidth ? 'portrait' : 'landscape';
|
|
2805
|
+
this.style = {
|
|
2806
|
+
height: parseProp(this.height, orientation),
|
|
2807
|
+
width: parseProp(this.width, orientation),
|
|
2808
|
+
backgroundColor: parseProp(this.bgColor, orientation),
|
|
2809
|
+
top: parseProp(this.y, orientation),
|
|
2810
|
+
left: parseProp(this.x, orientation),
|
|
2811
|
+
zIndex: this.z,
|
|
2812
|
+
fontSize: parseProp(this.fontSize, orientation),
|
|
2813
|
+
fontFamily: this.fontFamily,
|
|
2814
|
+
color: parseProp(this.fontColor, orientation),
|
|
2815
|
+
display: parseProp(`${this.visible}`, orientation) === "true" ? 'flex' : 'none', // Toggle visibility
|
|
2816
|
+
borderImage: `url(${borderImg})`,
|
|
2817
|
+
borderImageSlice: borderImg ? '0 fill' : '',
|
|
2818
|
+
margin: parseProp(this.margin, orientation),
|
|
2819
|
+
padding: parseProp(this.padding, orientation),
|
|
2820
|
+
borderRadius: parseProp(this.borderRadius, orientation),
|
|
2821
|
+
};
|
|
2822
|
+
}
|
|
2823
|
+
async addSpanToText() {
|
|
2824
|
+
const content = this.el.querySelector('.lido-text-content');
|
|
2825
|
+
if (!content)
|
|
2826
|
+
return;
|
|
2827
|
+
const text = content.textContent || '';
|
|
2828
|
+
content.innerHTML = '';
|
|
2829
|
+
// Wrap each letters in a span inside .lido-text-content
|
|
2830
|
+
if (this.spanType === 'letters') {
|
|
2831
|
+
text.split('').forEach((letter, idx) => {
|
|
2832
|
+
// Skip spaces
|
|
2833
|
+
if (letter.trim() === '')
|
|
2834
|
+
return;
|
|
2835
|
+
// Create a span for each letter
|
|
2836
|
+
const letterSpan = document.createElement('span');
|
|
2837
|
+
letterSpan.textContent = letter;
|
|
2838
|
+
letterSpan.className = 'text-letters';
|
|
2839
|
+
content.appendChild(letterSpan);
|
|
2840
|
+
});
|
|
2841
|
+
}
|
|
2842
|
+
// Wrap each words in a span inside .lido-text-content
|
|
2843
|
+
if (this.spanType === 'words') {
|
|
2844
|
+
text.split(' ').forEach((word, idx) => {
|
|
2845
|
+
const wordSpan = document.createElement('span');
|
|
2846
|
+
wordSpan.textContent = word;
|
|
2847
|
+
wordSpan.className = 'text-words';
|
|
2848
|
+
content.appendChild(wordSpan);
|
|
2849
|
+
});
|
|
2850
|
+
}
|
|
2851
|
+
}
|
|
2852
|
+
render() {
|
|
2853
|
+
return (h(Host, { key: '9635bba385679026c4f90aac9467612f06a21f1b', 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)));
|
|
2854
|
+
}
|
|
2855
|
+
get el() { return this; }
|
|
2856
|
+
static get style() { return LidoTextStyle0; }
|
|
2857
|
+
}, [0, "lido-text", {
|
|
2858
|
+
"showSpeakIcon": [4, "show-speak-icon"],
|
|
2859
|
+
"id": [1],
|
|
2860
|
+
"value": [1],
|
|
2861
|
+
"string": [1],
|
|
2862
|
+
"fontFamily": [1, "font-family"],
|
|
2863
|
+
"fontSize": [1, "font-size"],
|
|
2864
|
+
"fontColor": [1, "font-color"],
|
|
2865
|
+
"highlightWhileSpeaking": [4, "highlight-while-speaking"],
|
|
2866
|
+
"height": [1],
|
|
2867
|
+
"width": [1],
|
|
2868
|
+
"ariaLabel": [1, "aria-label"],
|
|
2869
|
+
"ariaHidden": [1, "aria-hidden"],
|
|
2870
|
+
"x": [1],
|
|
2871
|
+
"y": [1],
|
|
2872
|
+
"z": [1],
|
|
2873
|
+
"bgColor": [1, "bg-color"],
|
|
2874
|
+
"borderImage": [1, "border-image"],
|
|
2875
|
+
"type": [1],
|
|
2876
|
+
"tabIndex": [2, "tab-index"],
|
|
2877
|
+
"visible": [8],
|
|
2878
|
+
"audio": [1],
|
|
2879
|
+
"onTouch": [1, "on-touch"],
|
|
2880
|
+
"onInCorrect": [1, "on-in-correct"],
|
|
2881
|
+
"onCorrect": [1, "on-correct"],
|
|
2882
|
+
"minDrops": [2, "min-drops"],
|
|
2883
|
+
"maxDrops": [2, "max-drops"],
|
|
2884
|
+
"onEntry": [1, "on-entry"],
|
|
2885
|
+
"margin": [1],
|
|
2886
|
+
"padding": [1],
|
|
2887
|
+
"borderRadius": [1, "border-radius"],
|
|
2888
|
+
"spanType": [1, "span-type"],
|
|
2889
|
+
"delayVisible": [1, "delay-visible"],
|
|
2890
|
+
"disableSpeak": [4, "disable-speak"],
|
|
2891
|
+
"style": [32]
|
|
2892
|
+
}]);
|
|
2893
|
+
function defineCustomElement() {
|
|
2894
|
+
if (typeof customElements === "undefined") {
|
|
2895
|
+
return;
|
|
2896
|
+
}
|
|
2897
|
+
const components = ["lido-text"];
|
|
2898
|
+
components.forEach(tagName => { switch (tagName) {
|
|
2899
|
+
case "lido-text":
|
|
2900
|
+
if (!customElements.get(tagName)) {
|
|
2901
|
+
customElements.define(tagName, LidoText);
|
|
2902
|
+
}
|
|
2903
|
+
break;
|
|
2904
|
+
} });
|
|
2905
|
+
}
|
|
2906
|
+
defineCustomElement();
|
|
2907
|
+
|
|
2908
|
+
export { LidoText as L, defineCustomElement as d, instance as i };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, d as setVisibilityWithDelay, i as initEventsForElement, r as handlingChildElements, t as attachSpeakIcon, k as parseProp, h, j as Host } from './p-
|
|
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-3513b1f3.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;
|