lido-player 0.0.2-alpha-50-dev → 0.0.2-alpha-52-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/LICENSE +21 -21
- package/dist/cjs/{index-6a69c33a.js → index-baff5c15.js} +48 -14
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/{lido-avatar_21.cjs.entry.js → lido-avatar_22.cjs.entry.js} +3043 -162
- package/dist/cjs/lido-player.cjs.js +2 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{utils-079a5e7d.js → utils-ce99b0d0.js} +294 -108
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/avatar/lido-avatar.css +4 -4
- package/dist/collection/components/avatar/lido-avatar.js +1 -1
- package/dist/collection/components/calculator/lido-calculator.css +87 -87
- package/dist/collection/components/calculator/lido-calculator.js +14 -8
- package/dist/collection/components/canvas/lido-canvas.css +35 -0
- package/dist/collection/components/canvas/lido-canvas.js +220 -0
- package/dist/collection/components/cell/lido-cell.css +100 -100
- package/dist/collection/components/cell/lido-cell.js +12 -12
- package/dist/collection/components/column/lido-col.css +19 -19
- package/dist/collection/components/column/lido-col.js +6 -6
- package/dist/collection/components/container/lido-container.css +10 -10
- package/dist/collection/components/container/lido-container.js +70 -8
- package/dist/collection/components/flashCard/lido-flash-card.css +28 -28
- package/dist/collection/components/flashCard/lido-flash-card.js +4 -4
- package/dist/collection/components/float/lido-float.css +30 -30
- package/dist/collection/components/float/lido-float.js +2 -2
- package/dist/collection/components/home/lido-home.css +278 -278
- package/dist/collection/components/home/lido-home.js +92 -12
- package/dist/collection/components/image/lido-image.css +17 -17
- package/dist/collection/components/image/lido-image.js +6 -6
- package/dist/collection/components/keyboard/lido-keyboard.css +38 -38
- package/dist/collection/components/keyboard/lido-keyboard.js +3 -3
- package/dist/collection/components/mathMatrix/lido-math-matrix.css +56 -56
- package/dist/collection/components/mathMatrix/lido-math-matrix.js +69 -15
- package/dist/collection/components/position/lido-pos.css +16 -16
- package/dist/collection/components/position/lido-pos.js +2 -2
- package/dist/collection/components/random/lido-random.css +8 -8
- package/dist/collection/components/random/lido-random.js +2 -2
- package/dist/collection/components/root/lido-root.js +42 -6
- package/dist/collection/components/row/lido-row.css +10 -10
- package/dist/collection/components/row/lido-row.js +6 -6
- package/dist/collection/components/scale/lido-balance.css +145 -114
- package/dist/collection/components/scale/lido-balance.js +17 -17
- package/dist/collection/components/shape/lido-shape.css +96 -96
- package/dist/collection/components/shape/lido-shape.js +5 -5
- package/dist/collection/components/slideFill/lido-slide-fill.css +3 -3
- package/dist/collection/components/slideFill/lido-slide-fill.js +13 -13
- package/dist/collection/components/text/lido-text.css +53 -53
- package/dist/collection/components/text/lido-text.js +6 -5
- package/dist/collection/components/trace/lido-trace.css +97 -97
- package/dist/collection/components/trace/lido-trace.js +2 -2
- package/dist/collection/components/wrap/lido-wrap.css +18 -18
- package/dist/collection/components/wrap/lido-wrap.js +6 -6
- package/dist/collection/css/animation.css +194 -194
- package/dist/collection/css/index.css +277 -277
- package/dist/collection/stories/Templates/Fill-Up/fill-up.stories.js +60 -60
- package/dist/collection/stories/Templates/LetterPairing/LetterPairing.stories.js +123 -123
- package/dist/collection/stories/Templates/RocketGame/rocketGame.stories.js +55 -48
- package/dist/collection/stories/Templates/Tag/tagGame.stories.js +29 -29
- package/dist/collection/stories/Templates/arrangeLetters/arrangeLetters.stories.js +42 -42
- package/dist/collection/stories/Templates/balancing/balancing.stories.js +37 -31
- package/dist/collection/stories/Templates/balloonPop/balloonPop.stories.js +38 -38
- package/dist/collection/stories/Templates/blender/blender.stories.js +100 -0
- package/dist/collection/stories/Templates/bubbleType/bubbleType.stories.js +42 -42
- package/dist/collection/stories/Templates/calculator/calculator.stories.js +52 -0
- package/dist/collection/stories/Templates/categorize/categorize.stories.js +37 -37
- package/dist/collection/stories/Templates/categorize2/categorize2.stories.js +67 -67
- package/dist/collection/stories/Templates/checker-block/checkerBlock.stories.js +28 -22
- package/dist/collection/stories/Templates/checkerBlock/checkerBlock.stories.js +13 -13
- package/dist/collection/stories/Templates/create-sentence/createSentence.stories.js +74 -74
- package/dist/collection/stories/Templates/dragAndDrop/drag-drop.stories.js +69 -69
- package/dist/collection/stories/Templates/fillAnswer/fill-answer.stories.js +39 -38
- package/dist/collection/stories/Templates/fillBlank/fill-blank.stories.js +282 -282
- package/dist/collection/stories/Templates/foodJar/food-jar.stories.js +37 -35
- package/dist/collection/stories/Templates/grid/grid.stories.js +118 -118
- package/dist/collection/stories/Templates/gridGame/grid-game.stories.js +57 -57
- package/dist/collection/stories/Templates/jumpSentence/jumpSentence.stories.js +41 -41
- package/dist/collection/stories/Templates/letterboard/letterboard.stories.js +183 -183
- package/dist/collection/stories/Templates/makeSentence/make-sentence.stories.js +36 -36
- package/dist/collection/stories/Templates/matchBox/matchBox.stories.js +69 -69
- package/dist/collection/stories/Templates/matchBox/matchBox2.stories.js +54 -54
- package/dist/collection/stories/Templates/matchingCard/matching-card.stories.js +25 -23
- package/dist/collection/stories/Templates/multipleOption/mcqWithQuestionImage.stories.js +112 -112
- package/dist/collection/stories/Templates/multipleOption/multiple-option.stories.js +47 -47
- package/dist/collection/stories/Templates/multiplyBeeds/multiplyBeeds.stories.js +32 -28
- package/dist/collection/stories/Templates/nimbleTable/nimbleTable.stories.js +56 -54
- package/dist/collection/stories/Templates/numberBoard/numberBoard.stories.js +56 -45
- package/dist/collection/stories/Templates/numberBoardTwo/numberBoardTwo.stories.js +41 -39
- package/dist/collection/stories/Templates/numberPair/numberPair.stories.js +131 -127
- package/dist/collection/stories/Templates/openwindow/openwindow.stories.js +53 -49
- package/dist/collection/stories/Templates/openwindow/openwindow2.stories.js +44 -40
- package/dist/collection/stories/Templates/order-tractor/order-tractor-ascending-order.stories.js +98 -97
- package/dist/collection/stories/Templates/order-tractor/order-tractor.stories.js +92 -91
- package/dist/collection/stories/Templates/phonic-tractor/phonic-tractor.stories.js +47 -45
- package/dist/collection/stories/Templates/picturemeaning/pictureMeaningCocos.stories.js +20 -20
- package/dist/collection/stories/Templates/puzzleGame/puzzleGame.stories.js +17 -17
- package/dist/collection/stories/Templates/questionBoard/questionBoard.stories.js +62 -58
- package/dist/collection/stories/Templates/quizLiteracy/quizLiteracy.stories.js +50 -50
- package/dist/collection/stories/Templates/quizLiteracy/quizLiteracyImageWithText.stories.js +36 -36
- package/dist/collection/stories/Templates/quizLiteracy/quizLiteracyImageWord.stories.js +43 -43
- package/dist/collection/stories/Templates/reorder/reorder.stories.js +63 -63
- package/dist/collection/stories/Templates/rowBlocks/rowBlocks.stories.js +52 -48
- package/dist/collection/stories/Templates/sequenceBox/sequenceBox1.stories.js +65 -61
- package/dist/collection/stories/Templates/sequenceBox/sequenceBox2.stories.js +62 -58
- package/dist/collection/stories/Templates/shapePair/shape-pair.stories.js +111 -107
- package/dist/collection/stories/Templates/shapeTractor/shape-tractor.stories.js +46 -46
- package/dist/collection/stories/Templates/spellDoor/spellDoor.stories.js +41 -41
- package/dist/collection/stories/Templates/storyTale/storyTale.stories.js +39 -39
- package/dist/collection/stories/Templates/sumTogether/sumTogether.stories.js +51 -47
- package/dist/collection/stories/Templates/total/total.stories.js +27 -27
- package/dist/collection/stories/Templates/writeCard/writeCard.stories.js +35 -31
- package/dist/collection/stories/Templates/writeLetter/writeLetter.stories.js +62 -58
- package/dist/collection/stories/Templates/writeNumber/writeNumber.stories.js +44 -40
- package/dist/collection/stories/Templates/writeSet/writeSet.stories.js +36 -32
- package/dist/collection/stories/Templates/writeWord/writeWord.stories.js +37 -33
- package/dist/collection/stories/components/flash-card.stories.js +48 -48
- package/dist/collection/stories/components/keyboard.stories.js +10 -10
- package/dist/collection/stories/components/slider.stories.js +4 -4
- package/dist/collection/stories/components/trace.stories.js +5 -5
- package/dist/collection/utils/audioPlayer.js +43 -6
- package/dist/collection/utils/constants.js +1 -0
- package/dist/collection/utils/i18n.js +36 -0
- package/dist/collection/utils/utils.js +170 -36
- package/dist/collection/utils/utilsHandlers/clickHandler.js +5 -1
- package/dist/collection/utils/utilsHandlers/dragDropHandler.js +27 -15
- package/dist/collection/utils/utilsHandlers/highlightHandler.js +54 -54
- package/dist/collection/utils/utilsHandlers/lidoBalanceHandler.js +2 -2
- package/dist/collection/utils/utilsHandlers/lidoCalculatorHandler.js +9 -9
- package/dist/collection/utils/utilsHandlers/sortHandler.js +10 -10
- 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.d.ts +11 -0
- package/dist/components/lido-canvas.js +6 -0
- 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 +49 -25
- 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-9be56729.js → p-00777872.js} +46 -2
- package/dist/components/{p-3f406017.js → p-06171259.js} +2 -2
- package/dist/components/{p-08d0deab.js → p-09f1e2d2.js} +15 -9
- package/dist/components/{p-e4e42677.js → p-0c2aebfb.js} +2 -2
- package/dist/components/p-0fbeb3a1.js +2700 -0
- package/dist/components/{p-cbac3cbc.js → p-11bf64aa.js} +2 -2
- package/dist/components/{p-44808985.js → p-26df0769.js} +7 -7
- package/dist/components/{p-1fbdb431.js → p-2d53e1a5.js} +2 -2
- package/dist/components/{p-afbc196f.js → p-39a2e638.js} +3 -2
- package/dist/components/{p-e36ddcc1.js → p-3ce3744c.js} +14 -11
- package/dist/components/{p-7f7e5672.js → p-3f4d4c0a.js} +2 -2
- package/dist/components/{p-d37ab4dc.js → p-52e77394.js} +2 -2
- package/dist/components/{p-bed94c37.js → p-58c67252.js} +331 -118
- package/dist/components/p-5b5f59a8.js +129 -0
- package/dist/components/{p-52844fa4.js → p-68112f8c.js} +2 -2
- package/dist/components/{p-15971ede.js → p-8a34b98b.js} +1 -1
- package/dist/components/{p-904711c8.js → p-8f2ed62f.js} +2 -2
- package/dist/components/{p-74849cdd.js → p-9d34d59d.js} +4 -4
- package/dist/components/{p-73e31a86.js → p-a2f96840.js} +8 -8
- package/dist/components/{p-90465904.js → p-a516a324.js} +2 -2
- package/dist/components/{p-322acda6.js → p-b2125fc9.js} +67 -31
- package/dist/components/{p-835b973d.js → p-c4abfd0f.js} +2 -2
- package/dist/components/{p-29bdd953.js → p-cb56a853.js} +2 -2
- package/dist/esm/{index-170e58c7.js → index-37c2ad2d.js} +48 -14
- package/dist/esm/index.js +2 -2
- package/dist/esm/{lido-avatar_21.entry.js → lido-avatar_22.entry.js} +3043 -163
- package/dist/esm/lido-player.js +3 -3
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{utils-5df09162.js → utils-107b15a7.js} +294 -108
- package/dist/lido-player/index.esm.js +1 -1
- package/dist/lido-player/lido-player.esm.js +1 -1
- package/dist/lido-player/p-606ea279.entry.js +1 -0
- package/dist/lido-player/p-9a9d5339.js +2 -0
- package/dist/lido-player/{p-7556e652.js → p-d1251482.js} +2 -2
- package/dist/types/components/canvas/lido-canvas.d.ts +27 -0
- package/dist/types/components/container/lido-container.d.ts +6 -0
- package/dist/types/components/home/lido-home.d.ts +8 -0
- package/dist/types/components/mathMatrix/lido-math-matrix.d.ts +3 -1
- package/dist/types/components/root/lido-root.d.ts +5 -0
- package/dist/types/components.d.ts +71 -6
- package/dist/types/stories/Templates/RocketGame/rocketGame.stories.d.ts +1 -0
- package/dist/types/stories/Templates/blender/blender.stories.d.ts +4 -0
- package/dist/types/stories/Templates/calculator/calculator.stories.d.ts +4 -0
- package/dist/types/stories/Templates/multiplyBeeds/multiplyBeeds.stories.d.ts +1 -0
- package/dist/types/stories/Templates/openwindow/openwindow.stories.d.ts +1 -0
- package/dist/types/stories/Templates/openwindow/openwindow2.stories.d.ts +1 -0
- package/dist/types/stories/Templates/questionBoard/questionBoard.stories.d.ts +1 -0
- package/dist/types/stories/Templates/sequenceBox/sequenceBox1.stories.d.ts +1 -0
- package/dist/types/stories/Templates/sequenceBox/sequenceBox2.stories.d.ts +1 -0
- package/dist/types/stories/Templates/shapePair/shape-pair.stories.d.ts +1 -1
- package/dist/types/stories/Templates/sumTogether/sumTogether.stories.d.ts +1 -0
- package/dist/types/stories/Templates/writeCard/writeCard.stories.d.ts +1 -0
- package/dist/types/stories/Templates/writeLetter/writeLetter.stories.d.ts +1 -0
- package/dist/types/stories/Templates/writeNumber/writeNumber.stories.d.ts +1 -0
- package/dist/types/stories/Templates/writeWord/writeWord.stories.d.ts +1 -0
- package/dist/types/types/json.d.ts +4 -0
- package/dist/types/utils/audioPlayer.d.ts +2 -0
- package/dist/types/utils/constants.d.ts +1 -0
- package/dist/types/utils/i18n.d.ts +5 -0
- package/dist/types/utils/utils.d.ts +1 -0
- package/package.json +71 -69
- package/readme.md +113 -113
- package/dist/lido-player/p-137c99ce.js +0 -2
- package/dist/lido-player/p-eb956325.entry.js +0 -1
|
@@ -78,7 +78,7 @@ export class LidoAvatar {
|
|
|
78
78
|
display: this.visible ? 'flex' : 'none',
|
|
79
79
|
zIndex: this.z,
|
|
80
80
|
};
|
|
81
|
-
return (h(Host, { key: '
|
|
81
|
+
return (h(Host, { key: '8a31ce98213ff51bf7cfc776690b6770bbeae604', id: this.id, type: this.type, "tab-index": this.tabIndex, value: this.value, style: style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry }, h("canvas", { key: '922568310a3be177e3185f86c54df95d16a0e42b', class: "lido-canvas" })));
|
|
82
82
|
}
|
|
83
83
|
static get is() { return "lido-avatar"; }
|
|
84
84
|
static get originalStyleUrls() {
|
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
#lidoCalculator {
|
|
2
|
-
border-radius: 19px;
|
|
3
|
-
border: 5px solid #029A9A;
|
|
4
|
-
position: relative;
|
|
5
|
-
display: flex;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
padding: 2%;
|
|
8
|
-
box-sizing: border-box;
|
|
9
|
-
}
|
|
10
|
-
.lido-calculator-btn-special{
|
|
11
|
-
background-color:#014D4D !important;
|
|
12
|
-
--btn-shadow-color: #0a2f2f !important;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.lido-calculator-btn-default {
|
|
16
|
-
background-color: #029A9A !important;
|
|
17
|
-
color: #000;
|
|
18
|
-
--btn-shadow-color: #0f4242 !important ;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
#lido-calculator-penIcon {
|
|
22
|
-
--btn-bg-color: #FB7038 !important;
|
|
23
|
-
--btn-shadow-px: 0 8px 0 !important;
|
|
24
|
-
--btn-shadow-color: #D74B12 !important;
|
|
25
|
-
border-radius: 5px !important;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.lido-calculator-displayParent{
|
|
29
|
-
width: 89%;
|
|
30
|
-
height: 107px;
|
|
31
|
-
background-color: rgb(68, 186, 186);;
|
|
32
|
-
border-radius: 5px;
|
|
33
|
-
margin: 14px auto 17px auto;
|
|
34
|
-
overflow: hidden;
|
|
35
|
-
display: flex;
|
|
36
|
-
align-items: end;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.lido-calculator-display {
|
|
40
|
-
width: 97%;
|
|
41
|
-
height: 94px;
|
|
42
|
-
background: #029A9A;
|
|
43
|
-
color: #fff;
|
|
44
|
-
text-align: right;
|
|
45
|
-
display: flex;
|
|
46
|
-
justify-content: flex-end;
|
|
47
|
-
align-items: center;
|
|
48
|
-
font-size: 72px;
|
|
49
|
-
font-weight: 700;
|
|
50
|
-
font-family: 'Baloo Bhai 2', serif;
|
|
51
|
-
border-radius: 5px 0px 0px 5px;
|
|
52
|
-
box-sizing: border-box;
|
|
53
|
-
margin: 0 0px -6px auto;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.lido-calculator-buttons {
|
|
57
|
-
flex: 1;
|
|
58
|
-
display: grid;
|
|
59
|
-
grid-template-columns: repeat(3, 1fr);
|
|
60
|
-
grid-auto-rows: 1fr;
|
|
61
|
-
gap: 0%;
|
|
62
|
-
width: 100%;
|
|
63
|
-
justify-items: center;
|
|
64
|
-
align-items: center;
|
|
65
|
-
position: relative;
|
|
66
|
-
top: -1%;
|
|
67
|
-
}
|
|
68
|
-
.lido-calculator-buttons lido-text {
|
|
69
|
-
display: flex !important;
|
|
70
|
-
justify-content: center;
|
|
71
|
-
align-items: center;
|
|
72
|
-
width: 96px !important;
|
|
73
|
-
height: 80px !important;
|
|
74
|
-
font-size: 72px !important;
|
|
75
|
-
font-weight: 700 !important;
|
|
76
|
-
color: #fff;
|
|
77
|
-
border-radius: 5px !important;
|
|
78
|
-
cursor: pointer;
|
|
79
|
-
text-align: center;
|
|
80
|
-
line-height: 1;
|
|
81
|
-
box-sizing: border-box;
|
|
82
|
-
transition: transform 0.1s;
|
|
83
|
-
}
|
|
84
|
-
.lido-calculator-buttons lido-text:active {
|
|
85
|
-
transform: scale(0.95);
|
|
86
|
-
}
|
|
87
|
-
|
|
1
|
+
#lidoCalculator {
|
|
2
|
+
border-radius: 19px;
|
|
3
|
+
border: 5px solid #029A9A;
|
|
4
|
+
position: relative;
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
padding: 2%;
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
}
|
|
10
|
+
.lido-calculator-btn-special{
|
|
11
|
+
background-color:#014D4D !important;
|
|
12
|
+
--btn-shadow-color: #0a2f2f !important;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.lido-calculator-btn-default {
|
|
16
|
+
background-color: #029A9A !important;
|
|
17
|
+
color: #000;
|
|
18
|
+
--btn-shadow-color: #0f4242 !important ;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
#lido-calculator-penIcon {
|
|
22
|
+
--btn-bg-color: #FB7038 !important;
|
|
23
|
+
--btn-shadow-px: 0 8px 0 !important;
|
|
24
|
+
--btn-shadow-color: #D74B12 !important;
|
|
25
|
+
border-radius: 5px !important;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.lido-calculator-displayParent{
|
|
29
|
+
width: 89%;
|
|
30
|
+
height: 107px;
|
|
31
|
+
background-color: rgb(68, 186, 186);;
|
|
32
|
+
border-radius: 5px;
|
|
33
|
+
margin: 14px auto 17px auto;
|
|
34
|
+
overflow: hidden;
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: end;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.lido-calculator-display {
|
|
40
|
+
width: 97%;
|
|
41
|
+
height: 94px;
|
|
42
|
+
background: #029A9A;
|
|
43
|
+
color: #fff;
|
|
44
|
+
text-align: right;
|
|
45
|
+
display: flex;
|
|
46
|
+
justify-content: flex-end;
|
|
47
|
+
align-items: center;
|
|
48
|
+
font-size: 72px;
|
|
49
|
+
font-weight: 700;
|
|
50
|
+
font-family: 'Baloo Bhai 2', serif;
|
|
51
|
+
border-radius: 5px 0px 0px 5px;
|
|
52
|
+
box-sizing: border-box;
|
|
53
|
+
margin: 0 0px -6px auto;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.lido-calculator-buttons {
|
|
57
|
+
flex: 1;
|
|
58
|
+
display: grid;
|
|
59
|
+
grid-template-columns: repeat(3, 1fr);
|
|
60
|
+
grid-auto-rows: 1fr;
|
|
61
|
+
gap: 0%;
|
|
62
|
+
width: 100%;
|
|
63
|
+
justify-items: center;
|
|
64
|
+
align-items: center;
|
|
65
|
+
position: relative;
|
|
66
|
+
top: -1%;
|
|
67
|
+
}
|
|
68
|
+
.lido-calculator-buttons lido-text {
|
|
69
|
+
display: flex !important;
|
|
70
|
+
justify-content: center;
|
|
71
|
+
align-items: center;
|
|
72
|
+
width: 96px !important;
|
|
73
|
+
height: 80px !important;
|
|
74
|
+
font-size: 72px !important;
|
|
75
|
+
font-weight: 700 !important;
|
|
76
|
+
color: #fff;
|
|
77
|
+
border-radius: 5px !important;
|
|
78
|
+
cursor: pointer;
|
|
79
|
+
text-align: center;
|
|
80
|
+
line-height: 1;
|
|
81
|
+
box-sizing: border-box;
|
|
82
|
+
transition: transform 0.1s;
|
|
83
|
+
}
|
|
84
|
+
.lido-calculator-buttons lido-text:active {
|
|
85
|
+
transform: scale(0.95);
|
|
86
|
+
}
|
|
87
|
+
|
|
@@ -12,7 +12,7 @@ export class LidoCalculator {
|
|
|
12
12
|
this.x = '0px';
|
|
13
13
|
this.y = '0px';
|
|
14
14
|
this.bgColor = '#60DADA';
|
|
15
|
-
this.penIcon = "https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/calculator/
|
|
15
|
+
this.penIcon = "https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/calculator/penIcon.png";
|
|
16
16
|
this.displayValue = '';
|
|
17
17
|
this.style = {};
|
|
18
18
|
}
|
|
@@ -29,7 +29,7 @@ export class LidoCalculator {
|
|
|
29
29
|
this.updateValueAttr();
|
|
30
30
|
}
|
|
31
31
|
handleClick(value) {
|
|
32
|
-
const MAX_LENGTH =
|
|
32
|
+
const MAX_LENGTH = 8;
|
|
33
33
|
if (value === 'OK') {
|
|
34
34
|
this.verifyAnswer();
|
|
35
35
|
}
|
|
@@ -51,7 +51,8 @@ export class LidoCalculator {
|
|
|
51
51
|
const container = this.el.closest('lido-container');
|
|
52
52
|
if (!container)
|
|
53
53
|
return;
|
|
54
|
-
if (this.objective && this.objective
|
|
54
|
+
if (this.objective && this.objective != '' && !this.objective.includes(',')) {
|
|
55
|
+
console.log("hi iscorrect verified");
|
|
55
56
|
isCorrect = userInput === this.objective;
|
|
56
57
|
}
|
|
57
58
|
// --- Multiple Objectives ---
|
|
@@ -64,7 +65,7 @@ export class LidoCalculator {
|
|
|
64
65
|
isCorrect = true;
|
|
65
66
|
}
|
|
66
67
|
else {
|
|
67
|
-
isCorrect = false;
|
|
68
|
+
// isCorrect = false;
|
|
68
69
|
}
|
|
69
70
|
// Store behavior based on mode
|
|
70
71
|
if (isContinueOnCorrect) {
|
|
@@ -98,7 +99,12 @@ export class LidoCalculator {
|
|
|
98
99
|
storingEachActivityScore(isCorrect);
|
|
99
100
|
const onCorrect = (container === null || container === void 0 ? void 0 : container.getAttribute('onCorrect')) || '';
|
|
100
101
|
await executeActions(onCorrect, container);
|
|
101
|
-
if (
|
|
102
|
+
if (onCorrect.includes('scrollCellAfterEquationSolved')) {
|
|
103
|
+
if (this.objective.length === 0) {
|
|
104
|
+
window.dispatchEvent(new CustomEvent(NextContainerKey));
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
102
108
|
window.dispatchEvent(new CustomEvent(NextContainerKey));
|
|
103
109
|
}
|
|
104
110
|
}
|
|
@@ -111,7 +117,7 @@ export class LidoCalculator {
|
|
|
111
117
|
}
|
|
112
118
|
render() {
|
|
113
119
|
const numbers = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '←', '0', 'OK'];
|
|
114
|
-
return (h(Host, { key: '
|
|
120
|
+
return (h(Host, { key: 'de394a3b14826c7fb6d6cf33fbbf1726238cbe3b', 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: '6dbc01d1032553ba6376d60d451b546851f5ebed', visible: "true", height: "94px", width: "60px" }, h("lido-text", { key: '353396c173bbdeb5f2fbb235e54fa900d2d0b771', visible: "true", id: "lido-calculator-penIcon", type: "click", height: "80px", x: "176%", width: "89px", onEntry: "this.position='relative';", class: "top-icon" }, h("img", { key: '083b53c01a3d7bfff1c39a408ed064fd18d3e8a3', src: this.penIcon, alt: "pen", style: { width: '100%', height: '100%' } }))), h("div", { key: 'b0936ba134feda621d5f0f26b7de70db51f56cf8', class: "lido-calculator-displayParent" }, h("div", { key: '35507ac35c70c4bf515c904a402e5312dafeffc3', class: "lido-calculator-display" }, this.displayValue)), h("div", { key: 'd7412b0d4c8971aa09d9ca22ee8d25f2773cd2c8', class: "lido-calculator-buttons" }, numbers.map((num, i) => (h("lido-text", { id: `btn-${i}`, string: num, visible: "true", type: "click", class: {
|
|
115
121
|
'lido-calculator-btn-special': num === '←' || num === 'OK',
|
|
116
122
|
'lido-calculator-btn-default': num !== '←' && num !== 'OK'
|
|
117
123
|
}, onClick: () => this.handleClick(num) }))))));
|
|
@@ -159,7 +165,7 @@ export class LidoCalculator {
|
|
|
159
165
|
"optional": false,
|
|
160
166
|
"docs": {
|
|
161
167
|
"tags": [],
|
|
162
|
-
"text": "Controls component visibility.\nAccepts boolean (`true`/`false`) or string (\"true\"/\"false\")."
|
|
168
|
+
"text": "Controls component visibility.\r\nAccepts boolean (`true`/`false`) or string (\"true\"/\"false\")."
|
|
163
169
|
},
|
|
164
170
|
"attribute": "visible",
|
|
165
171
|
"reflect": false,
|
|
@@ -289,7 +295,7 @@ export class LidoCalculator {
|
|
|
289
295
|
},
|
|
290
296
|
"attribute": "pen-icon",
|
|
291
297
|
"reflect": false,
|
|
292
|
-
"defaultValue": "\"https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/calculator/
|
|
298
|
+
"defaultValue": "\"https://aeakbcdznktpsbrfsgys.supabase.co/storage/v1/object/public/template-assets/calculator/penIcon.png\""
|
|
293
299
|
}
|
|
294
300
|
};
|
|
295
301
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
display: flex;
|
|
3
|
+
justify-content: center;
|
|
4
|
+
align-items: center;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.lido-canvas {
|
|
8
|
+
|
|
9
|
+
background:red;
|
|
10
|
+
border: 2px solid #ccc;
|
|
11
|
+
border-radius: 8px;
|
|
12
|
+
display: flex;
|
|
13
|
+
flex-direction: column;
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
position: relative;
|
|
16
|
+
}
|
|
17
|
+
#lido-exit-button {
|
|
18
|
+
padding: 6px 14px;
|
|
19
|
+
border: none;
|
|
20
|
+
background:transparent;
|
|
21
|
+
color: #fff;
|
|
22
|
+
border-radius: 6px;
|
|
23
|
+
cursor: pointer;
|
|
24
|
+
font-size: 14px;
|
|
25
|
+
position: relative;
|
|
26
|
+
top: -43%;
|
|
27
|
+
left: 18%;
|
|
28
|
+
z-index: 10;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
canvas {
|
|
32
|
+
/* flex: 1; */
|
|
33
|
+
touch-action: none;
|
|
34
|
+
display: block;
|
|
35
|
+
}
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
import { parseProp } from "../../utils/utils";
|
|
3
|
+
export class LidoCanvas {
|
|
4
|
+
constructor() {
|
|
5
|
+
// Flag to track drawing state
|
|
6
|
+
this.drawing = false;
|
|
7
|
+
this.bgImage = undefined;
|
|
8
|
+
this.width = '800px';
|
|
9
|
+
this.height = '700px';
|
|
10
|
+
this.x = '0px';
|
|
11
|
+
this.y = '0px';
|
|
12
|
+
this.onEntry = '';
|
|
13
|
+
this.style = {};
|
|
14
|
+
}
|
|
15
|
+
updateStyles() {
|
|
16
|
+
const orientation = window.innerHeight > window.innerWidth ? 'portrait' : 'landscape';
|
|
17
|
+
this.style = {
|
|
18
|
+
width: parseProp(this.width, orientation),
|
|
19
|
+
height: parseProp(this.height, orientation),
|
|
20
|
+
left: parseProp(this.x, orientation),
|
|
21
|
+
top: parseProp(this.y, orientation),
|
|
22
|
+
position: 'absolute',
|
|
23
|
+
};
|
|
24
|
+
if (this.canvas) {
|
|
25
|
+
this.canvas.width = parseInt(parseProp(this.width, orientation));
|
|
26
|
+
this.canvas.height = parseInt(parseProp(this.height, orientation));
|
|
27
|
+
this.ctx.strokeStyle = '#000';
|
|
28
|
+
this.ctx.lineWidth = 10;
|
|
29
|
+
this.ctx.lineCap = 'round';
|
|
30
|
+
this.ctx.lineJoin = 'round';
|
|
31
|
+
this.loadBackground();
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
componentDidLoad() {
|
|
35
|
+
this.canvas = this.el.shadowRoot.querySelector('#lido-canvas');
|
|
36
|
+
this.ctx = this.canvas.getContext('2d');
|
|
37
|
+
this.ctx.strokeStyle = '#000';
|
|
38
|
+
this.ctx.lineWidth = 10;
|
|
39
|
+
this.ctx.lineCap = 'round';
|
|
40
|
+
this.ctx.lineJoin = 'round';
|
|
41
|
+
this.updateStyles();
|
|
42
|
+
this.loadBackground();
|
|
43
|
+
this.canvas.addEventListener('pointerdown', e => this.start(e));
|
|
44
|
+
this.canvas.addEventListener('pointermove', e => this.move(e));
|
|
45
|
+
window.addEventListener('pointerup', () => this.stop());
|
|
46
|
+
window.addEventListener('resize', () => this.updateStyles());
|
|
47
|
+
}
|
|
48
|
+
loadBackground() {
|
|
49
|
+
if (!this.bgImage) {
|
|
50
|
+
this.ctx.fillStyle = '#fff';
|
|
51
|
+
this.ctx.fillRect(0, 0, this.canvas.width, this.canvas.height);
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
const img = new Image();
|
|
55
|
+
img.crossOrigin = 'anonymous';
|
|
56
|
+
img.src = this.bgImage;
|
|
57
|
+
img.onload = () => {
|
|
58
|
+
this.ctx.drawImage(img, 0, 0, this.canvas.width, this.canvas.height);
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
getPos(e) {
|
|
62
|
+
const r = this.canvas.getBoundingClientRect();
|
|
63
|
+
return {
|
|
64
|
+
x: (e.clientX - r.left) * (this.canvas.width / r.width),
|
|
65
|
+
y: (e.clientY - r.top) * (this.canvas.height / r.height),
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
start(e) {
|
|
69
|
+
this.drawing = true;
|
|
70
|
+
const pos = this.getPos(e);
|
|
71
|
+
this.ctx.beginPath();
|
|
72
|
+
this.ctx.moveTo(pos.x, pos.y);
|
|
73
|
+
}
|
|
74
|
+
move(e) {
|
|
75
|
+
if (!this.drawing)
|
|
76
|
+
return;
|
|
77
|
+
const pos = this.getPos(e);
|
|
78
|
+
this.ctx.lineTo(pos.x, pos.y);
|
|
79
|
+
this.ctx.stroke();
|
|
80
|
+
}
|
|
81
|
+
stop() {
|
|
82
|
+
this.drawing = false;
|
|
83
|
+
this.ctx.closePath();
|
|
84
|
+
}
|
|
85
|
+
clearCanvas() {
|
|
86
|
+
this.loadBackground();
|
|
87
|
+
}
|
|
88
|
+
render() {
|
|
89
|
+
return (h(Host, { key: '6768ff870d132528267f2e824fdc6edf5a5fa2be', id: "lido-canvas", class: "lido-canvas", style: this.style }, h("button", { key: 'ba3d5456edfa4618b6c3f57b97fa18cef45f7ae9', id: "lido-exit-button", onClick: () => this.clearCanvas() }, h("lido-text", { key: '3484c9005819e3d08adf8d36b247d3c45610d0b5', visible: "true", height: "92px", width: "43px", id: "lido-exit-icon", "font-color": "white", onEntry: "this.font-weight='900';", "font-size": "96px", string: 'X' })), h("canvas", { key: 'cd4167cefde8d4cf159779c46283cafbc3b0afcc', id: "lido-canvas", style: { width: this.style.width, height: this.style.height, } })));
|
|
90
|
+
}
|
|
91
|
+
static get is() { return "lido-canvas"; }
|
|
92
|
+
static get encapsulation() { return "shadow"; }
|
|
93
|
+
static get originalStyleUrls() {
|
|
94
|
+
return {
|
|
95
|
+
"$": ["lido-canvas.css"]
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
static get styleUrls() {
|
|
99
|
+
return {
|
|
100
|
+
"$": ["lido-canvas.css"]
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
static get properties() {
|
|
104
|
+
return {
|
|
105
|
+
"bgImage": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"mutable": false,
|
|
108
|
+
"complexType": {
|
|
109
|
+
"original": "string",
|
|
110
|
+
"resolved": "string",
|
|
111
|
+
"references": {}
|
|
112
|
+
},
|
|
113
|
+
"required": false,
|
|
114
|
+
"optional": false,
|
|
115
|
+
"docs": {
|
|
116
|
+
"tags": [],
|
|
117
|
+
"text": ""
|
|
118
|
+
},
|
|
119
|
+
"attribute": "bg-image",
|
|
120
|
+
"reflect": false
|
|
121
|
+
},
|
|
122
|
+
"width": {
|
|
123
|
+
"type": "string",
|
|
124
|
+
"mutable": false,
|
|
125
|
+
"complexType": {
|
|
126
|
+
"original": "string",
|
|
127
|
+
"resolved": "string",
|
|
128
|
+
"references": {}
|
|
129
|
+
},
|
|
130
|
+
"required": false,
|
|
131
|
+
"optional": false,
|
|
132
|
+
"docs": {
|
|
133
|
+
"tags": [],
|
|
134
|
+
"text": ""
|
|
135
|
+
},
|
|
136
|
+
"attribute": "width",
|
|
137
|
+
"reflect": false,
|
|
138
|
+
"defaultValue": "'800px'"
|
|
139
|
+
},
|
|
140
|
+
"height": {
|
|
141
|
+
"type": "string",
|
|
142
|
+
"mutable": false,
|
|
143
|
+
"complexType": {
|
|
144
|
+
"original": "string",
|
|
145
|
+
"resolved": "string",
|
|
146
|
+
"references": {}
|
|
147
|
+
},
|
|
148
|
+
"required": false,
|
|
149
|
+
"optional": false,
|
|
150
|
+
"docs": {
|
|
151
|
+
"tags": [],
|
|
152
|
+
"text": ""
|
|
153
|
+
},
|
|
154
|
+
"attribute": "height",
|
|
155
|
+
"reflect": false,
|
|
156
|
+
"defaultValue": "'700px'"
|
|
157
|
+
},
|
|
158
|
+
"x": {
|
|
159
|
+
"type": "string",
|
|
160
|
+
"mutable": false,
|
|
161
|
+
"complexType": {
|
|
162
|
+
"original": "string",
|
|
163
|
+
"resolved": "string",
|
|
164
|
+
"references": {}
|
|
165
|
+
},
|
|
166
|
+
"required": false,
|
|
167
|
+
"optional": false,
|
|
168
|
+
"docs": {
|
|
169
|
+
"tags": [],
|
|
170
|
+
"text": ""
|
|
171
|
+
},
|
|
172
|
+
"attribute": "x",
|
|
173
|
+
"reflect": false,
|
|
174
|
+
"defaultValue": "'0px'"
|
|
175
|
+
},
|
|
176
|
+
"y": {
|
|
177
|
+
"type": "string",
|
|
178
|
+
"mutable": false,
|
|
179
|
+
"complexType": {
|
|
180
|
+
"original": "string",
|
|
181
|
+
"resolved": "string",
|
|
182
|
+
"references": {}
|
|
183
|
+
},
|
|
184
|
+
"required": false,
|
|
185
|
+
"optional": false,
|
|
186
|
+
"docs": {
|
|
187
|
+
"tags": [],
|
|
188
|
+
"text": ""
|
|
189
|
+
},
|
|
190
|
+
"attribute": "y",
|
|
191
|
+
"reflect": false,
|
|
192
|
+
"defaultValue": "'0px'"
|
|
193
|
+
},
|
|
194
|
+
"onEntry": {
|
|
195
|
+
"type": "string",
|
|
196
|
+
"mutable": false,
|
|
197
|
+
"complexType": {
|
|
198
|
+
"original": "string",
|
|
199
|
+
"resolved": "string",
|
|
200
|
+
"references": {}
|
|
201
|
+
},
|
|
202
|
+
"required": false,
|
|
203
|
+
"optional": false,
|
|
204
|
+
"docs": {
|
|
205
|
+
"tags": [],
|
|
206
|
+
"text": ""
|
|
207
|
+
},
|
|
208
|
+
"attribute": "on-entry",
|
|
209
|
+
"reflect": false,
|
|
210
|
+
"defaultValue": "''"
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
static get states() {
|
|
215
|
+
return {
|
|
216
|
+
"style": {}
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
static get elementRef() { return "el"; }
|
|
220
|
+
}
|