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.
Files changed (215) hide show
  1. package/LICENSE +21 -21
  2. package/dist/cjs/{index-6a69c33a.js → index-baff5c15.js} +48 -14
  3. package/dist/cjs/index.cjs.js +2 -2
  4. package/dist/cjs/{lido-avatar_21.cjs.entry.js → lido-avatar_22.cjs.entry.js} +3043 -162
  5. package/dist/cjs/lido-player.cjs.js +2 -2
  6. package/dist/cjs/loader.cjs.js +2 -2
  7. package/dist/cjs/{utils-079a5e7d.js → utils-ce99b0d0.js} +294 -108
  8. package/dist/collection/collection-manifest.json +1 -0
  9. package/dist/collection/components/avatar/lido-avatar.css +4 -4
  10. package/dist/collection/components/avatar/lido-avatar.js +1 -1
  11. package/dist/collection/components/calculator/lido-calculator.css +87 -87
  12. package/dist/collection/components/calculator/lido-calculator.js +14 -8
  13. package/dist/collection/components/canvas/lido-canvas.css +35 -0
  14. package/dist/collection/components/canvas/lido-canvas.js +220 -0
  15. package/dist/collection/components/cell/lido-cell.css +100 -100
  16. package/dist/collection/components/cell/lido-cell.js +12 -12
  17. package/dist/collection/components/column/lido-col.css +19 -19
  18. package/dist/collection/components/column/lido-col.js +6 -6
  19. package/dist/collection/components/container/lido-container.css +10 -10
  20. package/dist/collection/components/container/lido-container.js +70 -8
  21. package/dist/collection/components/flashCard/lido-flash-card.css +28 -28
  22. package/dist/collection/components/flashCard/lido-flash-card.js +4 -4
  23. package/dist/collection/components/float/lido-float.css +30 -30
  24. package/dist/collection/components/float/lido-float.js +2 -2
  25. package/dist/collection/components/home/lido-home.css +278 -278
  26. package/dist/collection/components/home/lido-home.js +92 -12
  27. package/dist/collection/components/image/lido-image.css +17 -17
  28. package/dist/collection/components/image/lido-image.js +6 -6
  29. package/dist/collection/components/keyboard/lido-keyboard.css +38 -38
  30. package/dist/collection/components/keyboard/lido-keyboard.js +3 -3
  31. package/dist/collection/components/mathMatrix/lido-math-matrix.css +56 -56
  32. package/dist/collection/components/mathMatrix/lido-math-matrix.js +69 -15
  33. package/dist/collection/components/position/lido-pos.css +16 -16
  34. package/dist/collection/components/position/lido-pos.js +2 -2
  35. package/dist/collection/components/random/lido-random.css +8 -8
  36. package/dist/collection/components/random/lido-random.js +2 -2
  37. package/dist/collection/components/root/lido-root.js +42 -6
  38. package/dist/collection/components/row/lido-row.css +10 -10
  39. package/dist/collection/components/row/lido-row.js +6 -6
  40. package/dist/collection/components/scale/lido-balance.css +145 -114
  41. package/dist/collection/components/scale/lido-balance.js +17 -17
  42. package/dist/collection/components/shape/lido-shape.css +96 -96
  43. package/dist/collection/components/shape/lido-shape.js +5 -5
  44. package/dist/collection/components/slideFill/lido-slide-fill.css +3 -3
  45. package/dist/collection/components/slideFill/lido-slide-fill.js +13 -13
  46. package/dist/collection/components/text/lido-text.css +53 -53
  47. package/dist/collection/components/text/lido-text.js +6 -5
  48. package/dist/collection/components/trace/lido-trace.css +97 -97
  49. package/dist/collection/components/trace/lido-trace.js +2 -2
  50. package/dist/collection/components/wrap/lido-wrap.css +18 -18
  51. package/dist/collection/components/wrap/lido-wrap.js +6 -6
  52. package/dist/collection/css/animation.css +194 -194
  53. package/dist/collection/css/index.css +277 -277
  54. package/dist/collection/stories/Templates/Fill-Up/fill-up.stories.js +60 -60
  55. package/dist/collection/stories/Templates/LetterPairing/LetterPairing.stories.js +123 -123
  56. package/dist/collection/stories/Templates/RocketGame/rocketGame.stories.js +55 -48
  57. package/dist/collection/stories/Templates/Tag/tagGame.stories.js +29 -29
  58. package/dist/collection/stories/Templates/arrangeLetters/arrangeLetters.stories.js +42 -42
  59. package/dist/collection/stories/Templates/balancing/balancing.stories.js +37 -31
  60. package/dist/collection/stories/Templates/balloonPop/balloonPop.stories.js +38 -38
  61. package/dist/collection/stories/Templates/blender/blender.stories.js +100 -0
  62. package/dist/collection/stories/Templates/bubbleType/bubbleType.stories.js +42 -42
  63. package/dist/collection/stories/Templates/calculator/calculator.stories.js +52 -0
  64. package/dist/collection/stories/Templates/categorize/categorize.stories.js +37 -37
  65. package/dist/collection/stories/Templates/categorize2/categorize2.stories.js +67 -67
  66. package/dist/collection/stories/Templates/checker-block/checkerBlock.stories.js +28 -22
  67. package/dist/collection/stories/Templates/checkerBlock/checkerBlock.stories.js +13 -13
  68. package/dist/collection/stories/Templates/create-sentence/createSentence.stories.js +74 -74
  69. package/dist/collection/stories/Templates/dragAndDrop/drag-drop.stories.js +69 -69
  70. package/dist/collection/stories/Templates/fillAnswer/fill-answer.stories.js +39 -38
  71. package/dist/collection/stories/Templates/fillBlank/fill-blank.stories.js +282 -282
  72. package/dist/collection/stories/Templates/foodJar/food-jar.stories.js +37 -35
  73. package/dist/collection/stories/Templates/grid/grid.stories.js +118 -118
  74. package/dist/collection/stories/Templates/gridGame/grid-game.stories.js +57 -57
  75. package/dist/collection/stories/Templates/jumpSentence/jumpSentence.stories.js +41 -41
  76. package/dist/collection/stories/Templates/letterboard/letterboard.stories.js +183 -183
  77. package/dist/collection/stories/Templates/makeSentence/make-sentence.stories.js +36 -36
  78. package/dist/collection/stories/Templates/matchBox/matchBox.stories.js +69 -69
  79. package/dist/collection/stories/Templates/matchBox/matchBox2.stories.js +54 -54
  80. package/dist/collection/stories/Templates/matchingCard/matching-card.stories.js +25 -23
  81. package/dist/collection/stories/Templates/multipleOption/mcqWithQuestionImage.stories.js +112 -112
  82. package/dist/collection/stories/Templates/multipleOption/multiple-option.stories.js +47 -47
  83. package/dist/collection/stories/Templates/multiplyBeeds/multiplyBeeds.stories.js +32 -28
  84. package/dist/collection/stories/Templates/nimbleTable/nimbleTable.stories.js +56 -54
  85. package/dist/collection/stories/Templates/numberBoard/numberBoard.stories.js +56 -45
  86. package/dist/collection/stories/Templates/numberBoardTwo/numberBoardTwo.stories.js +41 -39
  87. package/dist/collection/stories/Templates/numberPair/numberPair.stories.js +131 -127
  88. package/dist/collection/stories/Templates/openwindow/openwindow.stories.js +53 -49
  89. package/dist/collection/stories/Templates/openwindow/openwindow2.stories.js +44 -40
  90. package/dist/collection/stories/Templates/order-tractor/order-tractor-ascending-order.stories.js +98 -97
  91. package/dist/collection/stories/Templates/order-tractor/order-tractor.stories.js +92 -91
  92. package/dist/collection/stories/Templates/phonic-tractor/phonic-tractor.stories.js +47 -45
  93. package/dist/collection/stories/Templates/picturemeaning/pictureMeaningCocos.stories.js +20 -20
  94. package/dist/collection/stories/Templates/puzzleGame/puzzleGame.stories.js +17 -17
  95. package/dist/collection/stories/Templates/questionBoard/questionBoard.stories.js +62 -58
  96. package/dist/collection/stories/Templates/quizLiteracy/quizLiteracy.stories.js +50 -50
  97. package/dist/collection/stories/Templates/quizLiteracy/quizLiteracyImageWithText.stories.js +36 -36
  98. package/dist/collection/stories/Templates/quizLiteracy/quizLiteracyImageWord.stories.js +43 -43
  99. package/dist/collection/stories/Templates/reorder/reorder.stories.js +63 -63
  100. package/dist/collection/stories/Templates/rowBlocks/rowBlocks.stories.js +52 -48
  101. package/dist/collection/stories/Templates/sequenceBox/sequenceBox1.stories.js +65 -61
  102. package/dist/collection/stories/Templates/sequenceBox/sequenceBox2.stories.js +62 -58
  103. package/dist/collection/stories/Templates/shapePair/shape-pair.stories.js +111 -107
  104. package/dist/collection/stories/Templates/shapeTractor/shape-tractor.stories.js +46 -46
  105. package/dist/collection/stories/Templates/spellDoor/spellDoor.stories.js +41 -41
  106. package/dist/collection/stories/Templates/storyTale/storyTale.stories.js +39 -39
  107. package/dist/collection/stories/Templates/sumTogether/sumTogether.stories.js +51 -47
  108. package/dist/collection/stories/Templates/total/total.stories.js +27 -27
  109. package/dist/collection/stories/Templates/writeCard/writeCard.stories.js +35 -31
  110. package/dist/collection/stories/Templates/writeLetter/writeLetter.stories.js +62 -58
  111. package/dist/collection/stories/Templates/writeNumber/writeNumber.stories.js +44 -40
  112. package/dist/collection/stories/Templates/writeSet/writeSet.stories.js +36 -32
  113. package/dist/collection/stories/Templates/writeWord/writeWord.stories.js +37 -33
  114. package/dist/collection/stories/components/flash-card.stories.js +48 -48
  115. package/dist/collection/stories/components/keyboard.stories.js +10 -10
  116. package/dist/collection/stories/components/slider.stories.js +4 -4
  117. package/dist/collection/stories/components/trace.stories.js +5 -5
  118. package/dist/collection/utils/audioPlayer.js +43 -6
  119. package/dist/collection/utils/constants.js +1 -0
  120. package/dist/collection/utils/i18n.js +36 -0
  121. package/dist/collection/utils/utils.js +170 -36
  122. package/dist/collection/utils/utilsHandlers/clickHandler.js +5 -1
  123. package/dist/collection/utils/utilsHandlers/dragDropHandler.js +27 -15
  124. package/dist/collection/utils/utilsHandlers/highlightHandler.js +54 -54
  125. package/dist/collection/utils/utilsHandlers/lidoBalanceHandler.js +2 -2
  126. package/dist/collection/utils/utilsHandlers/lidoCalculatorHandler.js +9 -9
  127. package/dist/collection/utils/utilsHandlers/sortHandler.js +10 -10
  128. package/dist/components/index.js +1 -1
  129. package/dist/components/lido-avatar.js +1 -1
  130. package/dist/components/lido-balance.js +1 -1
  131. package/dist/components/lido-calculator.js +1 -1
  132. package/dist/components/lido-canvas.d.ts +11 -0
  133. package/dist/components/lido-canvas.js +6 -0
  134. package/dist/components/lido-cell.js +1 -1
  135. package/dist/components/lido-col.js +1 -1
  136. package/dist/components/lido-container.js +1 -1
  137. package/dist/components/lido-flash-card.js +1 -1
  138. package/dist/components/lido-float.js +1 -1
  139. package/dist/components/lido-home.js +1 -1
  140. package/dist/components/lido-image.js +1 -1
  141. package/dist/components/lido-keyboard.js +1 -1
  142. package/dist/components/lido-math-matrix.js +1 -1
  143. package/dist/components/lido-pos.js +1 -1
  144. package/dist/components/lido-random.js +1 -1
  145. package/dist/components/lido-root.js +49 -25
  146. package/dist/components/lido-row.js +1 -1
  147. package/dist/components/lido-shape.js +1 -1
  148. package/dist/components/lido-slide-fill.js +1 -1
  149. package/dist/components/lido-text.js +1 -1
  150. package/dist/components/lido-trace.js +1 -1
  151. package/dist/components/lido-wrap.js +1 -1
  152. package/dist/components/{p-9be56729.js → p-00777872.js} +46 -2
  153. package/dist/components/{p-3f406017.js → p-06171259.js} +2 -2
  154. package/dist/components/{p-08d0deab.js → p-09f1e2d2.js} +15 -9
  155. package/dist/components/{p-e4e42677.js → p-0c2aebfb.js} +2 -2
  156. package/dist/components/p-0fbeb3a1.js +2700 -0
  157. package/dist/components/{p-cbac3cbc.js → p-11bf64aa.js} +2 -2
  158. package/dist/components/{p-44808985.js → p-26df0769.js} +7 -7
  159. package/dist/components/{p-1fbdb431.js → p-2d53e1a5.js} +2 -2
  160. package/dist/components/{p-afbc196f.js → p-39a2e638.js} +3 -2
  161. package/dist/components/{p-e36ddcc1.js → p-3ce3744c.js} +14 -11
  162. package/dist/components/{p-7f7e5672.js → p-3f4d4c0a.js} +2 -2
  163. package/dist/components/{p-d37ab4dc.js → p-52e77394.js} +2 -2
  164. package/dist/components/{p-bed94c37.js → p-58c67252.js} +331 -118
  165. package/dist/components/p-5b5f59a8.js +129 -0
  166. package/dist/components/{p-52844fa4.js → p-68112f8c.js} +2 -2
  167. package/dist/components/{p-15971ede.js → p-8a34b98b.js} +1 -1
  168. package/dist/components/{p-904711c8.js → p-8f2ed62f.js} +2 -2
  169. package/dist/components/{p-74849cdd.js → p-9d34d59d.js} +4 -4
  170. package/dist/components/{p-73e31a86.js → p-a2f96840.js} +8 -8
  171. package/dist/components/{p-90465904.js → p-a516a324.js} +2 -2
  172. package/dist/components/{p-322acda6.js → p-b2125fc9.js} +67 -31
  173. package/dist/components/{p-835b973d.js → p-c4abfd0f.js} +2 -2
  174. package/dist/components/{p-29bdd953.js → p-cb56a853.js} +2 -2
  175. package/dist/esm/{index-170e58c7.js → index-37c2ad2d.js} +48 -14
  176. package/dist/esm/index.js +2 -2
  177. package/dist/esm/{lido-avatar_21.entry.js → lido-avatar_22.entry.js} +3043 -163
  178. package/dist/esm/lido-player.js +3 -3
  179. package/dist/esm/loader.js +3 -3
  180. package/dist/esm/{utils-5df09162.js → utils-107b15a7.js} +294 -108
  181. package/dist/lido-player/index.esm.js +1 -1
  182. package/dist/lido-player/lido-player.esm.js +1 -1
  183. package/dist/lido-player/p-606ea279.entry.js +1 -0
  184. package/dist/lido-player/p-9a9d5339.js +2 -0
  185. package/dist/lido-player/{p-7556e652.js → p-d1251482.js} +2 -2
  186. package/dist/types/components/canvas/lido-canvas.d.ts +27 -0
  187. package/dist/types/components/container/lido-container.d.ts +6 -0
  188. package/dist/types/components/home/lido-home.d.ts +8 -0
  189. package/dist/types/components/mathMatrix/lido-math-matrix.d.ts +3 -1
  190. package/dist/types/components/root/lido-root.d.ts +5 -0
  191. package/dist/types/components.d.ts +71 -6
  192. package/dist/types/stories/Templates/RocketGame/rocketGame.stories.d.ts +1 -0
  193. package/dist/types/stories/Templates/blender/blender.stories.d.ts +4 -0
  194. package/dist/types/stories/Templates/calculator/calculator.stories.d.ts +4 -0
  195. package/dist/types/stories/Templates/multiplyBeeds/multiplyBeeds.stories.d.ts +1 -0
  196. package/dist/types/stories/Templates/openwindow/openwindow.stories.d.ts +1 -0
  197. package/dist/types/stories/Templates/openwindow/openwindow2.stories.d.ts +1 -0
  198. package/dist/types/stories/Templates/questionBoard/questionBoard.stories.d.ts +1 -0
  199. package/dist/types/stories/Templates/sequenceBox/sequenceBox1.stories.d.ts +1 -0
  200. package/dist/types/stories/Templates/sequenceBox/sequenceBox2.stories.d.ts +1 -0
  201. package/dist/types/stories/Templates/shapePair/shape-pair.stories.d.ts +1 -1
  202. package/dist/types/stories/Templates/sumTogether/sumTogether.stories.d.ts +1 -0
  203. package/dist/types/stories/Templates/writeCard/writeCard.stories.d.ts +1 -0
  204. package/dist/types/stories/Templates/writeLetter/writeLetter.stories.d.ts +1 -0
  205. package/dist/types/stories/Templates/writeNumber/writeNumber.stories.d.ts +1 -0
  206. package/dist/types/stories/Templates/writeWord/writeWord.stories.d.ts +1 -0
  207. package/dist/types/types/json.d.ts +4 -0
  208. package/dist/types/utils/audioPlayer.d.ts +2 -0
  209. package/dist/types/utils/constants.d.ts +1 -0
  210. package/dist/types/utils/i18n.d.ts +5 -0
  211. package/dist/types/utils/utils.d.ts +1 -0
  212. package/package.json +71 -69
  213. package/readme.md +113 -113
  214. package/dist/lido-player/p-137c99ce.js +0 -2
  215. 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: '0889129b1e69b8966dec70f6364c602cadce10ef', 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: '975318180c4454f81d307accd823e2eaaeddf6cc', class: "lido-canvas" })));
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/Pen--Streamline-Solar%201.svg";
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 = 10;
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.length === 1) {
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 (this.objective.length === 0) {
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: '61d14ce0ff858db8ff04b502c0d303f18f5552b8', 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: '86318d0fb2a707af14fca1b1a615536e7bcdb9a3', visible: "true", height: "94px", width: "60px" }, h("lido-text", { key: 'd552cf17bedcbb321af0c7fb5fc0b44c89be4561', visible: "true", id: "lido-calculator-penIcon", type: "click", height: "80px", x: "176%", width: "96px", onEntry: "this.position='relative';", class: "top-icon" }, h("img", { key: '46f9003a72906617169fb76b19a208e6f6cbb0bc', src: this.penIcon, alt: "pen", style: { width: '100%', height: '100%' } }))), h("div", { key: 'a7ffc6dbdaabfa944e115eeecf08cc53808c0234', class: "lido-calculator-displayParent" }, h("div", { key: '27926d1370cbdd4423404ad1f78b1ade381288d9', class: "lido-calculator-display" }, this.displayValue)), h("div", { key: '58288a987ea3090da498fff03220d4d4b24aa7c5', class: "lido-calculator-buttons" }, numbers.map((num, i) => (h("lido-text", { id: `btn-${i}`, string: num, visible: "true", type: "click", class: {
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/Pen--Streamline-Solar%201.svg\""
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
+ }