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
@@ -0,0 +1,27 @@
1
+ export declare class LidoCanvas {
2
+ el: HTMLElement;
3
+ bgImage: string;
4
+ width: string;
5
+ height: string;
6
+ x: string;
7
+ y: string;
8
+ onEntry: string;
9
+ private canvas;
10
+ private ctx;
11
+ private drawing;
12
+ style: {
13
+ [key: string]: string;
14
+ };
15
+ updateStyles(): void;
16
+ componentDidLoad(): void;
17
+ loadBackground(): void;
18
+ getPos(e: PointerEvent): {
19
+ x: number;
20
+ y: number;
21
+ };
22
+ start(e: PointerEvent): void;
23
+ move(e: PointerEvent): void;
24
+ stop(): void;
25
+ clearCanvas(): void;
26
+ render(): any;
27
+ }
@@ -6,6 +6,8 @@
6
6
  * such as dimensions, positioning, visibility, and custom event handlers.
7
7
  */
8
8
  export declare class LidoContainer {
9
+ /** Language to apply to all texts */
10
+ locale: string;
9
11
  /**
10
12
  * Controls whether the drop zone displays a border; true shows the border, false hides it.
11
13
  */
@@ -165,6 +167,9 @@ export declare class LidoContainer {
165
167
  * When set to true, disables the speak functionality of long press for this component and its children.
166
168
  */
167
169
  disableSpeak: boolean;
170
+ languageChanged(newLang: string): void;
171
+ componentWillLoad(): void;
172
+ private resolveLanguage;
168
173
  convertToPixels(height: string, parentElement?: HTMLElement): number;
169
174
  /**
170
175
  * Scales the container based on the window or screen size, maintaining the aspect ratio.
@@ -174,6 +179,7 @@ export declare class LidoContainer {
174
179
  */
175
180
  scaleContainer(container: HTMLElement): void;
176
181
  screenOrientation(): void;
182
+ private updateChildTextLanguage;
177
183
  /**
178
184
  * Lifecycle hook that runs after the component is loaded.
179
185
  * - It scales the container.
@@ -6,6 +6,12 @@
6
6
  * and displays progress indicators (dots) for each container.
7
7
  */
8
8
  export declare class LidoHome {
9
+ /** Boolean to show or hide navigation buttons */
10
+ showNav: boolean;
11
+ /** Array of active container indexes to be rendered */
12
+ activeContainerIndexes: number[];
13
+ /** Language to apply to all texts */
14
+ locale?: string;
9
15
  /**
10
16
  * XML data passed to the component, which is parsed and used to render various containers.
11
17
  */
@@ -78,6 +84,8 @@ export declare class LidoHome {
78
84
  * Stores the list of container-rendering functions parsed from XML.
79
85
  */
80
86
  containers: (() => any)[];
87
+ onLangChange(newLang: string): void;
88
+ private setLanguage;
81
89
  /**
82
90
  * Event handler for transitioning to the next container in the sequence.
83
91
  * If the last container is reached, it shows a completion message.
@@ -19,7 +19,6 @@ export declare class LidoMathMatrix {
19
19
  matrixImage: string;
20
20
  /** Background color for active slots */
21
21
  activeBgColor: string;
22
- /** Background color for inactive slots */
23
22
  deactiveBgColor: string;
24
23
  /** Border style applied to each slot */
25
24
  border: string;
@@ -55,6 +54,9 @@ export declare class LidoMathMatrix {
55
54
  previousFilledSlot: number;
56
55
  /** Reference to the previously filled slot element for clearing its text */
57
56
  previousFilledSlotElement: HTMLElement | null;
57
+ onCorrect: string;
58
+ onInCorrect: string;
59
+ onEntry: string;
58
60
  /** Holds dynamically generated inline styles for the container */
59
61
  style: {
60
62
  [key: string]: string | undefined;
@@ -6,6 +6,8 @@
6
6
  * The XML path can be configured via a prop.
7
7
  */
8
8
  export declare class LidoRoot {
9
+ /** Language to apply to all texts */
10
+ locale?: string;
9
11
  /**
10
12
  * Prop to hold the XML file path or URL. This can be a relative path or an external URL.
11
13
  */
@@ -55,6 +57,9 @@ export declare class LidoRoot {
55
57
  * Lifecycle method that runs before the component is loaded.
56
58
  * It fetches the XML data from the specified path or URL and sets it to the component's state.
57
59
  */
60
+ connectedCallback(): void;
61
+ onLangChange(newLang: string): void;
62
+ setLanguage(lang?: string): void;
58
63
  componentWillLoad(): Promise<void>;
59
64
  render(): any;
60
65
  }
@@ -211,6 +211,14 @@ export namespace Components {
211
211
  */
212
212
  "y": string;
213
213
  }
214
+ interface LidoCanvas {
215
+ "bgImage": string;
216
+ "height": string;
217
+ "onEntry": string;
218
+ "width": string;
219
+ "x": string;
220
+ "y": string;
221
+ }
214
222
  /**
215
223
  * @component LidoCell
216
224
  * A flexible UI cell component configurable via props like size, position, visibility,
@@ -548,6 +556,10 @@ export namespace Components {
548
556
  * Specifies whether the activity should continue automatically upon a correct response. Expected values: "true" or "false".
549
557
  */
550
558
  "isContinueOnCorrect": boolean;
559
+ /**
560
+ * Language to apply to all texts
561
+ */
562
+ "locale": string;
551
563
  /**
552
564
  * CSS margin value applied to each child element inside the container. Accepts standard CSS margin formats (e.g., '10px', '5px 10px', etc.).
553
565
  */
@@ -792,6 +804,10 @@ export namespace Components {
792
804
  * and displays progress indicators (dots) for each container.
793
805
  */
794
806
  interface LidoHome {
807
+ /**
808
+ * Array of active container indexes to be rendered
809
+ */
810
+ "activeContainerIndexes": number[];
795
811
  /**
796
812
  * URL for the avatar Rive file.
797
813
  */
@@ -816,6 +832,10 @@ export namespace Components {
816
832
  * Initial index of the container being displayed.
817
833
  */
818
834
  "initialIndex": number;
835
+ /**
836
+ * Language to apply to all texts
837
+ */
838
+ "locale"?: string;
819
839
  /**
820
840
  * Custom URL for the Next button icon. Falls back to the default icon if not provided or invalid.
821
841
  */
@@ -824,6 +844,10 @@ export namespace Components {
824
844
  * Custom URL for the Previous button icon. Falls back to the default icon if not provided or invalid.
825
845
  */
826
846
  "prevButtonUrl": string;
847
+ /**
848
+ * Boolean to show or hide navigation buttons
849
+ */
850
+ "showNav": boolean;
827
851
  /**
828
852
  * Custom URL for the Speaker button icon. Falls back to the default icon if not provided or invalid.
829
853
  */
@@ -1085,9 +1109,6 @@ export namespace Components {
1085
1109
  * Number of columns in the matrix
1086
1110
  */
1087
1111
  "cols": string;
1088
- /**
1089
- * Background color for inactive slots
1090
- */
1091
1112
  "deactiveBgColor": string;
1092
1113
  /**
1093
1114
  * Number of slots to pre-fill as active by default
@@ -1113,6 +1134,9 @@ export namespace Components {
1113
1134
  * Image source used inside the slots
1114
1135
  */
1115
1136
  "matrixImage": string;
1137
+ "onCorrect": string;
1138
+ "onEntry": string;
1139
+ "onInCorrect": string;
1116
1140
  /**
1117
1141
  * Padding inside the matrix container
1118
1142
  */
@@ -1373,6 +1397,10 @@ export namespace Components {
1373
1397
  * Initial index of the container being displayed.
1374
1398
  */
1375
1399
  "initialIndex": number;
1400
+ /**
1401
+ * Language to apply to all texts
1402
+ */
1403
+ "locale"?: string;
1376
1404
  /**
1377
1405
  * CSS margin value applied to each child element inside the container. Accepts standard CSS margin formats (e.g., '10px', '5px 10px', etc.).
1378
1406
  */
@@ -2092,6 +2120,12 @@ declare global {
2092
2120
  prototype: HTMLLidoCalculatorElement;
2093
2121
  new (): HTMLLidoCalculatorElement;
2094
2122
  };
2123
+ interface HTMLLidoCanvasElement extends Components.LidoCanvas, HTMLStencilElement {
2124
+ }
2125
+ var HTMLLidoCanvasElement: {
2126
+ prototype: HTMLLidoCanvasElement;
2127
+ new (): HTMLLidoCanvasElement;
2128
+ };
2095
2129
  /**
2096
2130
  * @component LidoCell
2097
2131
  * A flexible UI cell component configurable via props like size, position, visibility,
@@ -2278,6 +2312,7 @@ declare global {
2278
2312
  "lido-avatar": HTMLLidoAvatarElement;
2279
2313
  "lido-balance": HTMLLidoBalanceElement;
2280
2314
  "lido-calculator": HTMLLidoCalculatorElement;
2315
+ "lido-canvas": HTMLLidoCanvasElement;
2281
2316
  "lido-cell": HTMLLidoCellElement;
2282
2317
  "lido-col": HTMLLidoColElement;
2283
2318
  "lido-container": HTMLLidoContainerElement;
@@ -2505,6 +2540,14 @@ declare namespace LocalJSX {
2505
2540
  */
2506
2541
  "y"?: string;
2507
2542
  }
2543
+ interface LidoCanvas {
2544
+ "bgImage"?: string;
2545
+ "height"?: string;
2546
+ "onEntry"?: string;
2547
+ "width"?: string;
2548
+ "x"?: string;
2549
+ "y"?: string;
2550
+ }
2508
2551
  /**
2509
2552
  * @component LidoCell
2510
2553
  * A flexible UI cell component configurable via props like size, position, visibility,
@@ -2842,6 +2885,10 @@ declare namespace LocalJSX {
2842
2885
  * Specifies whether the activity should continue automatically upon a correct response. Expected values: "true" or "false".
2843
2886
  */
2844
2887
  "isContinueOnCorrect"?: boolean;
2888
+ /**
2889
+ * Language to apply to all texts
2890
+ */
2891
+ "locale"?: string;
2845
2892
  /**
2846
2893
  * CSS margin value applied to each child element inside the container. Accepts standard CSS margin formats (e.g., '10px', '5px 10px', etc.).
2847
2894
  */
@@ -3086,6 +3133,10 @@ declare namespace LocalJSX {
3086
3133
  * and displays progress indicators (dots) for each container.
3087
3134
  */
3088
3135
  interface LidoHome {
3136
+ /**
3137
+ * Array of active container indexes to be rendered
3138
+ */
3139
+ "activeContainerIndexes"?: number[];
3089
3140
  /**
3090
3141
  * URL for the avatar Rive file.
3091
3142
  */
@@ -3110,6 +3161,10 @@ declare namespace LocalJSX {
3110
3161
  * Initial index of the container being displayed.
3111
3162
  */
3112
3163
  "initialIndex"?: number;
3164
+ /**
3165
+ * Language to apply to all texts
3166
+ */
3167
+ "locale"?: string;
3113
3168
  /**
3114
3169
  * Custom URL for the Next button icon. Falls back to the default icon if not provided or invalid.
3115
3170
  */
@@ -3118,6 +3173,10 @@ declare namespace LocalJSX {
3118
3173
  * Custom URL for the Previous button icon. Falls back to the default icon if not provided or invalid.
3119
3174
  */
3120
3175
  "prevButtonUrl"?: string;
3176
+ /**
3177
+ * Boolean to show or hide navigation buttons
3178
+ */
3179
+ "showNav"?: boolean;
3121
3180
  /**
3122
3181
  * Custom URL for the Speaker button icon. Falls back to the default icon if not provided or invalid.
3123
3182
  */
@@ -3379,9 +3438,6 @@ declare namespace LocalJSX {
3379
3438
  * Number of columns in the matrix
3380
3439
  */
3381
3440
  "cols"?: string;
3382
- /**
3383
- * Background color for inactive slots
3384
- */
3385
3441
  "deactiveBgColor"?: string;
3386
3442
  /**
3387
3443
  * Number of slots to pre-fill as active by default
@@ -3407,6 +3463,9 @@ declare namespace LocalJSX {
3407
3463
  * Image source used inside the slots
3408
3464
  */
3409
3465
  "matrixImage"?: string;
3466
+ "onCorrect"?: string;
3467
+ "onEntry"?: string;
3468
+ "onInCorrect"?: string;
3410
3469
  /**
3411
3470
  * Padding inside the matrix container
3412
3471
  */
@@ -3667,6 +3726,10 @@ declare namespace LocalJSX {
3667
3726
  * Initial index of the container being displayed.
3668
3727
  */
3669
3728
  "initialIndex"?: number;
3729
+ /**
3730
+ * Language to apply to all texts
3731
+ */
3732
+ "locale"?: string;
3670
3733
  /**
3671
3734
  * CSS margin value applied to each child element inside the container. Accepts standard CSS margin formats (e.g., '10px', '5px 10px', etc.).
3672
3735
  */
@@ -4347,6 +4410,7 @@ declare namespace LocalJSX {
4347
4410
  "lido-avatar": LidoAvatar;
4348
4411
  "lido-balance": LidoBalance;
4349
4412
  "lido-calculator": LidoCalculator;
4413
+ "lido-canvas": LidoCanvas;
4350
4414
  "lido-cell": LidoCell;
4351
4415
  "lido-col": LidoCol;
4352
4416
  "lido-container": LidoContainer;
@@ -4382,6 +4446,7 @@ declare module "@stencil/core" {
4382
4446
  "lido-avatar": LocalJSX.LidoAvatar & JSXBase.HTMLAttributes<HTMLLidoAvatarElement>;
4383
4447
  "lido-balance": LocalJSX.LidoBalance & JSXBase.HTMLAttributes<HTMLLidoBalanceElement>;
4384
4448
  "lido-calculator": LocalJSX.LidoCalculator & JSXBase.HTMLAttributes<HTMLLidoCalculatorElement>;
4449
+ "lido-canvas": LocalJSX.LidoCanvas & JSXBase.HTMLAttributes<HTMLLidoCanvasElement>;
4385
4450
  /**
4386
4451
  * @component LidoCell
4387
4452
  * A flexible UI cell component configurable via props like size, position, visibility,
@@ -7,6 +7,7 @@ type RocketArgs = {
7
7
  dropImage: string[];
8
8
  backgroundImage: string[];
9
9
  colors: string[];
10
+ isAllowOnlyCorrect?: boolean;
10
11
  };
11
12
  declare const meta: Meta<RocketArgs>;
12
13
  export default meta;
@@ -0,0 +1,4 @@
1
+ import { Meta, StoryObj } from '@storybook/web-components';
2
+ declare const meta: Meta;
3
+ export default meta;
4
+ export declare const OrderTractor: StoryObj;
@@ -0,0 +1,4 @@
1
+ import { Meta, StoryObj } from '@storybook/web-components';
2
+ declare const meta: Meta;
3
+ export default meta;
4
+ export declare const calculator: StoryObj;
@@ -3,6 +3,7 @@ type MultiplyBeedsArgs = {
3
3
  number: string;
4
4
  multiplicationFactor: string;
5
5
  answer: string;
6
+ isAllowOnlyCorrect?: boolean;
6
7
  };
7
8
  declare const meta: Meta<MultiplyBeedsArgs>;
8
9
  export default meta;
@@ -8,6 +8,7 @@ type OpenWindowArgs = {
8
8
  choice1ImageUrl: string[];
9
9
  choice2Text: string;
10
10
  choice2ImageUrl: string[];
11
+ isAllowOnlyCorrect?: boolean;
11
12
  };
12
13
  declare const meta: Meta<OpenWindowArgs>;
13
14
  export default meta;
@@ -7,6 +7,7 @@ type OpenWindowArgs = {
7
7
  choice1ImageUrl: string[];
8
8
  choice2Text: string;
9
9
  choice2ImageUrl: string[];
10
+ isAllowOnlyCorrect?: boolean;
10
11
  };
11
12
  declare const meta: Meta<OpenWindowArgs>;
12
13
  export default meta;
@@ -9,6 +9,7 @@ type QuestionBoardArgs = {
9
9
  options: object;
10
10
  optionText: string;
11
11
  objective: string;
12
+ isAllowOnlyCorrect?: boolean;
12
13
  };
13
14
  declare const meta: Meta<QuestionBoardArgs>;
14
15
  export default meta;
@@ -5,6 +5,7 @@ type SequenceBoxArgs = {
5
5
  number2: string;
6
6
  number4: string;
7
7
  options: string[];
8
+ isAllowOnlyCorrect?: boolean;
8
9
  };
9
10
  declare const meta: Meta<SequenceBoxArgs>;
10
11
  export default meta;
@@ -5,6 +5,7 @@ type SequenceBoxArgs = {
5
5
  number2: string;
6
6
  number4: string;
7
7
  options: string[];
8
+ isAllowOnlyCorrect?: boolean;
8
9
  };
9
10
  declare const meta: Meta<SequenceBoxArgs>;
10
11
  export default meta;
@@ -1,4 +1,4 @@
1
1
  import { Meta, StoryObj } from '@storybook/web-components';
2
2
  declare const meta: Meta;
3
3
  export default meta;
4
- export declare const NumberPair: StoryObj;
4
+ export declare const ShapePair: StoryObj;
@@ -5,6 +5,7 @@ type SumTogetherArgs = {
5
5
  answer: string;
6
6
  sign: string;
7
7
  options: string[];
8
+ isAllowOnlyCorrect?: boolean;
8
9
  };
9
10
  declare const meta: Meta<SumTogetherArgs>;
10
11
  export default meta;
@@ -5,6 +5,7 @@ type writeCardArgs = {
5
5
  backSlot: 'front' | 'back';
6
6
  frontText: string;
7
7
  backText: string;
8
+ isAllowOnlyCorrect?: boolean;
8
9
  };
9
10
  declare const meta: Meta<writeCardArgs>;
10
11
  export default meta;
@@ -7,6 +7,7 @@ type WriteLetterArgs = {
7
7
  backSlot: 'front' | 'back';
8
8
  frontText: string;
9
9
  backText: string;
10
+ isAllowOnlyCorrect?: boolean;
10
11
  };
11
12
  declare const meta: Meta<WriteLetterArgs>;
12
13
  export default meta;
@@ -7,6 +7,7 @@ type WriteNumberArgs = {
7
7
  textDisplayImage: string[];
8
8
  spanType: 'letters' | 'words';
9
9
  stars: number;
10
+ isAllowOnlyCorrect?: boolean;
10
11
  };
11
12
  declare const meta: Meta<WriteNumberArgs>;
12
13
  export default meta;
@@ -8,6 +8,7 @@ type WriteWordArgs = {
8
8
  topDisplayImage: string[];
9
9
  bottomDisplayImage: string[];
10
10
  spanType: 'letters' | 'words';
11
+ isAllowOnlyCorrect?: boolean;
11
12
  };
12
13
  declare const meta: Meta<WriteWordArgs>;
13
14
  export default meta;
@@ -0,0 +1,4 @@
1
+ declare module "*.json" {
2
+ const value: any;
3
+ export default value;
4
+ }
@@ -5,4 +5,6 @@ export declare class AudioPlayer {
5
5
  static getI(): AudioPlayer;
6
6
  stop(): void;
7
7
  play(targetElement: HTMLElement): Promise<void>;
8
+ private registerGlobalStopEvents;
9
+ destroy(): void;
8
10
  }
@@ -16,6 +16,7 @@ export declare const DropHasDrag = "dropHasDrag";
16
16
  export declare const DropToAttr = "drop-to";
17
17
  export declare const DropTimeAttr = "drop-time";
18
18
  export declare const LidoContainer = "lido-container";
19
+ export declare const LangChangeEvent = "languageChanged";
19
20
  export declare enum TraceMode {
20
21
  NoFlow = "noFlow",
21
22
  ShowFlow = "showFlow",
@@ -0,0 +1,5 @@
1
+ import i18next from 'i18next';
2
+ export declare const t: (key: string, options?: any) => string | import("i18next/typescript/helpers").$SpecialObject | import("i18next").TFunctionDetailedResult<string | import("i18next/typescript/helpers").$SpecialObject, any>;
3
+ export declare const setLanguage: (lang: string) => Promise<import("i18next").TFunction<"translation", undefined>>;
4
+ export declare const getLanguage: () => string;
5
+ export default i18next;
@@ -42,3 +42,4 @@ export declare const HighlightStarsOneByOne: (element: HTMLElement, value: strin
42
42
  export declare const animateBoxCells: (element: HTMLElement, value: string) => Promise<void>;
43
43
  export declare const questionBoxAnimation: (element: HTMLElement, value: string) => Promise<void>;
44
44
  export declare const SumTogetherAnimation: (element: HTMLElement, value: string) => Promise<void>;
45
+ export declare const updateCalculatorAnswer: () => void;
package/package.json CHANGED
@@ -1,69 +1,71 @@
1
- {
2
- "name": "lido-player",
3
- "version": "0.0.2-alpha-50-dev",
4
- "description": "Stencil Component For Lido Player",
5
- "main": "dist/index.cjs.js",
6
- "module": "dist/index.js",
7
- "types": "dist/types/index.d.ts",
8
- "collection": "dist/collection/collection-manifest.json",
9
- "collection:main": "dist/collection/index.js",
10
- "unpkg": "dist/lido-player/lido-player.esm.js",
11
- "exports": {
12
- ".": {
13
- "import": "./dist/lido-player/lido-player.esm.js",
14
- "require": "./dist/lido-player/lido-player.cjs.js"
15
- },
16
- "./my-component": {
17
- "import": "./dist/components/my-component.js",
18
- "types": "./dist/components/my-component.d.ts"
19
- },
20
- "./loader": {
21
- "import": "./loader/index.js",
22
- "require": "./loader/index.cjs",
23
- "types": "./loader/index.d.ts"
24
- }
25
- },
26
- "repository": {
27
- "type": "git",
28
- "url": "https://github.com/chimple/lido-player.git"
29
- },
30
- "files": [
31
- "dist/",
32
- "loader/"
33
- ],
34
- "scripts": {
35
- "build": "stencil build && npm run build-storybook",
36
- "start": "stencil build --dev --watch --serve",
37
- "dev": "npm run start",
38
- "test": "stencil test --spec --e2e",
39
- "test.watch": "stencil test --spec --e2e --watchAll",
40
- "generate": "stencil generate",
41
- "storybook": "storybook dev -p 6006",
42
- "build-storybook": "storybook build --output-dir www/storybook"
43
- },
44
- "devDependencies": {
45
- "@chromatic-com/storybook": "^3.2.6",
46
- "@stencil/core": "^4.7.0",
47
- "@storybook/addon-essentials": "^8.6.12",
48
- "@storybook/blocks": "^8.6.12",
49
- "@storybook/experimental-addon-test": "^8.6.12",
50
- "@storybook/test": "^8.6.12",
51
- "@storybook/web-components": "^8.6.12",
52
- "@storybook/web-components-vite": "^8.6.12",
53
- "@types/jest": "^29.5.14",
54
- "@types/node": "^16.18.11",
55
- "@types/react": "^19.1.2",
56
- "jest": "^29.7.0",
57
- "jest-cli": "^29.7.0",
58
- "lit": "^3.2.1",
59
- "puppeteer": "^21.11.0",
60
- "storybook": "^8.6.12"
61
- },
62
- "license": "MIT",
63
- "dependencies": {
64
- "@rive-app/canvas": "^2.25.7",
65
- "css-filter-converter": "^1.0.110",
66
- "mathjs": "^14.4.0",
67
- "tinycolor2": "^1.6.0"
68
- }
69
- }
1
+ {
2
+ "name": "lido-player",
3
+ "version": "0.0.2-alpha-52-dev",
4
+ "description": "Stencil Component For Lido Player",
5
+ "main": "dist/index.cjs.js",
6
+ "module": "dist/index.js",
7
+ "types": "dist/types/index.d.ts",
8
+ "collection": "dist/collection/collection-manifest.json",
9
+ "collection:main": "dist/collection/index.js",
10
+ "unpkg": "dist/lido-player/lido-player.esm.js",
11
+ "exports": {
12
+ ".": {
13
+ "import": "./dist/lido-player/lido-player.esm.js",
14
+ "require": "./dist/lido-player/lido-player.cjs.js"
15
+ },
16
+ "./my-component": {
17
+ "import": "./dist/components/my-component.js",
18
+ "types": "./dist/components/my-component.d.ts"
19
+ },
20
+ "./loader": {
21
+ "import": "./loader/index.js",
22
+ "require": "./loader/index.cjs",
23
+ "types": "./loader/index.d.ts"
24
+ }
25
+ },
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "https://github.com/chimple/lido-player.git"
29
+ },
30
+ "files": [
31
+ "dist/",
32
+ "loader/"
33
+ ],
34
+ "scripts": {
35
+ "build": "stencil build && npm run build-storybook",
36
+ "start": "stencil build --dev --watch --serve",
37
+ "dev": "npm run start",
38
+ "test": "stencil test --spec --e2e",
39
+ "test.watch": "stencil test --spec --e2e --watchAll",
40
+ "generate": "stencil generate",
41
+ "storybook": "storybook dev -p 6006",
42
+ "build-storybook": "storybook build --output-dir www/storybook"
43
+ },
44
+ "devDependencies": {
45
+ "@chromatic-com/storybook": "^3.2.6",
46
+ "@stencil/core": "^4.7.0",
47
+ "@storybook/addon-essentials": "^8.6.12",
48
+ "@storybook/blocks": "^8.6.12",
49
+ "@storybook/experimental-addon-test": "^8.6.12",
50
+ "@storybook/test": "^8.6.12",
51
+ "@storybook/web-components": "^8.6.12",
52
+ "@storybook/web-components-vite": "^8.6.12",
53
+ "@types/jest": "^29.5.14",
54
+ "@types/node": "^16.18.11",
55
+ "@types/react": "^19.1.2",
56
+ "jest": "^29.7.0",
57
+ "jest-cli": "^29.7.0",
58
+ "lit": "^3.2.1",
59
+ "puppeteer": "^21.11.0",
60
+ "storybook": "^8.6.12"
61
+ },
62
+ "license": "MIT",
63
+ "dependencies": {
64
+ "@rive-app/canvas": "^2.25.7",
65
+ "css-filter-converter": "^1.0.110",
66
+ "i18next": "^25.6.1",
67
+ "i18next-browser-languagedetector": "^8.2.0",
68
+ "mathjs": "^14.4.0",
69
+ "tinycolor2": "^1.6.0"
70
+ }
71
+ }