lido-player 0.0.2-beta-25-dev → 0.0.2-beta-26-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 (236) hide show
  1. package/LICENSE +21 -21
  2. package/dist/cjs/{decode-BSImuLEU.js → decode-CE64w_Pc.js} +1 -1
  3. package/dist/cjs/{index-DRw2yVbg.js → index-Cf9LHdIw.js} +126 -60
  4. package/dist/cjs/{index-DBCFoh1I.js → index-DnaH8sO-.js} +1 -1
  5. package/dist/cjs/index.cjs.js +2 -2
  6. package/dist/cjs/lido-avatar_22.cjs.entry.js +103 -42
  7. package/dist/cjs/lido-player.cjs.js +2 -2
  8. package/dist/cjs/loader.cjs.js +2 -2
  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/avatar/lido-avatar.tsx +214 -214
  12. package/dist/collection/components/avatar/readme.md +49 -49
  13. package/dist/collection/components/calculator/lido-calculator.css +89 -89
  14. package/dist/collection/components/calculator/lido-calculator.js +2 -2
  15. package/dist/collection/components/canvas/lido-canvas.css +33 -33
  16. package/dist/collection/components/canvas/lido-canvas.js +1 -1
  17. package/dist/collection/components/cell/lido-cell.css +100 -100
  18. package/dist/collection/components/cell/lido-cell.js +12 -12
  19. package/dist/collection/components/column/lido-col.css +19 -19
  20. package/dist/collection/components/column/lido-col.js +6 -6
  21. package/dist/collection/components/container/lido-container.css +34 -34
  22. package/dist/collection/components/container/lido-container.js +8 -8
  23. package/dist/collection/components/flashCard/lido-flash-card.css +72 -72
  24. package/dist/collection/components/flashCard/lido-flash-card.js +72 -12
  25. package/dist/collection/components/float/lido-float.css +30 -30
  26. package/dist/collection/components/float/lido-float.js +2 -2
  27. package/dist/collection/components/home/lido-home.css +309 -309
  28. package/dist/collection/components/home/lido-home.js +35 -8
  29. package/dist/collection/components/image/lido-image.css +17 -17
  30. package/dist/collection/components/image/lido-image.js +6 -6
  31. package/dist/collection/components/keyboard/lido-keyboard.css +38 -38
  32. package/dist/collection/components/keyboard/lido-keyboard.js +3 -3
  33. package/dist/collection/components/mathMatrix/lido-math-matrix.css +56 -56
  34. package/dist/collection/components/mathMatrix/lido-math-matrix.js +1 -1
  35. package/dist/collection/components/position/lido-pos.css +16 -16
  36. package/dist/collection/components/position/lido-pos.js +2 -2
  37. package/dist/collection/components/random/lido-random.css +8 -8
  38. package/dist/collection/components/random/lido-random.js +2 -2
  39. package/dist/collection/components/root/lido-root.js +5 -5
  40. package/dist/collection/components/row/lido-row.css +10 -10
  41. package/dist/collection/components/row/lido-row.js +6 -6
  42. package/dist/collection/components/scale/assets/Shadow.svg +9 -9
  43. package/dist/collection/components/scale/lido-balance.css +174 -174
  44. package/dist/collection/components/scale/lido-balance.js +13 -13
  45. package/dist/collection/components/shape/lido-shape.css +216 -216
  46. package/dist/collection/components/shape/lido-shape.js +6 -6
  47. package/dist/collection/components/slideFill/lido-slide-fill.css +3 -3
  48. package/dist/collection/components/slideFill/lido-slide-fill.js +13 -13
  49. package/dist/collection/components/text/lido-text.css +53 -53
  50. package/dist/collection/components/text/lido-text.js +6 -6
  51. package/dist/collection/components/trace/assets/Tracing-hand.svg +8 -8
  52. package/dist/collection/components/trace/lido-trace.css +97 -97
  53. package/dist/collection/components/trace/lido-trace.js +2 -2
  54. package/dist/collection/components/wrap/lido-wrap.css +18 -18
  55. package/dist/collection/components/wrap/lido-wrap.js +6 -6
  56. package/dist/collection/css/animation.css +211 -211
  57. package/dist/collection/css/index.css +323 -323
  58. package/dist/collection/stories/Templates/Fill-Up/fill-up.stories.js +61 -61
  59. package/dist/collection/stories/Templates/LetterPairing/LetterPairing.stories.js +123 -123
  60. package/dist/collection/stories/Templates/RocketGame/rocketGame.stories.js +48 -48
  61. package/dist/collection/stories/Templates/Tag/tagGame.stories.js +39 -39
  62. package/dist/collection/stories/Templates/arrangeLetters/arrangeLetters.stories.js +44 -44
  63. package/dist/collection/stories/Templates/balancing/balancing.stories.js +35 -35
  64. package/dist/collection/stories/Templates/balloonPop/balloonPop.stories.js +38 -38
  65. package/dist/collection/stories/Templates/blender/blender.stories.js +59 -59
  66. package/dist/collection/stories/Templates/bubbleType/bubbleType.stories.js +42 -42
  67. package/dist/collection/stories/Templates/calculator/calculator.stories.js +28 -28
  68. package/dist/collection/stories/Templates/categorize/categorize.stories.js +37 -37
  69. package/dist/collection/stories/Templates/categorize2/categorize2.stories.js +67 -67
  70. package/dist/collection/stories/Templates/checker-block/checkerBlock.stories.js +29 -29
  71. package/dist/collection/stories/Templates/checkerBlock/checkerBlock.stories.js +13 -13
  72. package/dist/collection/stories/Templates/create-sentence/createSentence.stories.js +74 -74
  73. package/dist/collection/stories/Templates/dragAndDrop/drag-drop.stories.js +69 -69
  74. package/dist/collection/stories/Templates/fillAnswer/fill-answer.stories.js +43 -43
  75. package/dist/collection/stories/Templates/fillBlank/fill-blank.stories.js +282 -282
  76. package/dist/collection/stories/Templates/foodJar/food-jar.stories.js +35 -35
  77. package/dist/collection/stories/Templates/grid/grid.stories.js +118 -118
  78. package/dist/collection/stories/Templates/gridGame/grid-game.stories.js +57 -57
  79. package/dist/collection/stories/Templates/imageMatch/imageMatch.stories.js +44 -44
  80. package/dist/collection/stories/Templates/jumpSentence/jumpSentence.stories.js +41 -41
  81. package/dist/collection/stories/Templates/letterboard/letterboard.stories.js +183 -183
  82. package/dist/collection/stories/Templates/makeSentence/make-sentence.stories.js +36 -36
  83. package/dist/collection/stories/Templates/matchBox/matchBox.stories.js +69 -69
  84. package/dist/collection/stories/Templates/matchBox/matchBox2.stories.js +84 -84
  85. package/dist/collection/stories/Templates/matchingCard/matching-card.stories.js +31 -31
  86. package/dist/collection/stories/Templates/multipleOption/mcqWithQuestionImage.stories.js +112 -112
  87. package/dist/collection/stories/Templates/multipleOption/multiple-option.stories.js +47 -47
  88. package/dist/collection/stories/Templates/multiplyBeeds/multiplyBeeds.stories.js +57 -57
  89. package/dist/collection/stories/Templates/nimbleTable/nimbleTable.stories.js +53 -53
  90. package/dist/collection/stories/Templates/numberBoard/numberBoard.stories.js +46 -46
  91. package/dist/collection/stories/Templates/numberBoardTwo/numberBoardTwo.stories.js +45 -45
  92. package/dist/collection/stories/Templates/numberIdentification/numberIdentificationimageTotext.stories.js +56 -56
  93. package/dist/collection/stories/Templates/numberIdentification/numberIdentificationtextTotext.stories.js +53 -53
  94. package/dist/collection/stories/Templates/numberPair/numberPair.stories.js +127 -127
  95. package/dist/collection/stories/Templates/openwindow/openwindow.stories.js +47 -47
  96. package/dist/collection/stories/Templates/openwindow/openwindow2.stories.js +38 -38
  97. package/dist/collection/stories/Templates/order-tractor/order-tractor-ascending-order.stories.js +97 -97
  98. package/dist/collection/stories/Templates/order-tractor/order-tractor.stories.js +90 -90
  99. package/dist/collection/stories/Templates/palEgmaCalculateSum/palEgmaMultiOption.stories.js +63 -63
  100. package/dist/collection/stories/Templates/palEgmaCalculateSum/palEgmaSumTogether.stories.js +45 -45
  101. package/dist/collection/stories/Templates/palEgmaPatternMatching/palEgmaPatternMatching.stories.js +63 -63
  102. package/dist/collection/stories/Templates/palEgmaWordProblem/palEgmaWordProblem.stories.js +79 -79
  103. package/dist/collection/stories/Templates/palEgraInventedSpelling/pal_egra_invented_spelling_schema.stories.js +32 -32
  104. package/dist/collection/stories/Templates/palEgraMCQWithImage/palEgraMCQWithImage.stories.js +42 -42
  105. package/dist/collection/stories/Templates/palEgraOptionWithAudio/palEgraOptionWithAudio.stories.js +63 -63
  106. package/dist/collection/stories/Templates/palEgraStoryMaking/pal_egra_story_making.stories.js +44 -44
  107. package/dist/collection/stories/Templates/palEgraTemplate1/palEgraLetterIdentification.stories.js +34 -34
  108. package/dist/collection/stories/Templates/palEgraWordMatch/palEgraWordMatch.stories.js +52 -52
  109. package/dist/collection/stories/Templates/palEgra_OddOneOut/palEgra_oddOneOut.stories.js +33 -33
  110. package/dist/collection/stories/Templates/palEgra_arrange_pictures/palEgra_arrange_pictures.stories.js +40 -40
  111. package/dist/collection/stories/Templates/palEgra_build_word/palEgra_build_word.stories.js +48 -48
  112. package/dist/collection/stories/Templates/palEgra_word_formation/palEgra_WordFormation.stories.js +48 -48
  113. package/dist/collection/stories/Templates/palStorytale/palStorytale.stories.js +18 -18
  114. package/dist/collection/stories/Templates/phonic-tractor/phonic-tractor.stories.js +44 -44
  115. package/dist/collection/stories/Templates/pictureClues/pictureClues.stories.js +34 -34
  116. package/dist/collection/stories/Templates/pictureWordMatch/pictureWordMatch1.stories.js +36 -36
  117. package/dist/collection/stories/Templates/pictureWordMatch/pictureWordMatch2.stories.js +30 -30
  118. package/dist/collection/stories/Templates/picturemeaning/pictureMeaningCocos.stories.js +20 -20
  119. package/dist/collection/stories/Templates/puzzleGame/puzzleGame.stories.js +17 -17
  120. package/dist/collection/stories/Templates/questionBoard/questionBoard.stories.js +58 -58
  121. package/dist/collection/stories/Templates/quizLiteracy/quizLiteracy.stories.js +50 -50
  122. package/dist/collection/stories/Templates/quizLiteracy/quizLiteracyImageWithText.stories.js +36 -36
  123. package/dist/collection/stories/Templates/quizLiteracy/quizLiteracyImageWord.stories.js +43 -43
  124. package/dist/collection/stories/Templates/quizMaths/quizMaths.stories.js +633 -633
  125. package/dist/collection/stories/Templates/reorder/reorder.stories.js +63 -63
  126. package/dist/collection/stories/Templates/rowBlocks/rowBlocks.stories.js +47 -47
  127. package/dist/collection/stories/Templates/sentenceMatch/sentenceMatch.stories.js +29 -29
  128. package/dist/collection/stories/Templates/sequenceBox/sequenceBox1.stories.js +64 -64
  129. package/dist/collection/stories/Templates/sequenceBox/sequenceBox2.stories.js +62 -62
  130. package/dist/collection/stories/Templates/shapePair/shape-pair.stories.js +106 -106
  131. package/dist/collection/stories/Templates/shapeTractor/shape-tractor.stories.js +50 -50
  132. package/dist/collection/stories/Templates/spellDoor/spellDoor.stories.js +41 -41
  133. package/dist/collection/stories/Templates/storyTale/storyTale.stories.js +39 -39
  134. package/dist/collection/stories/Templates/substraction/substractionWithimg.stories.js +62 -62
  135. package/dist/collection/stories/Templates/substraction/substractionWithoutImg.stories.js +42 -42
  136. package/dist/collection/stories/Templates/sumTogether/sumTogether.stories.js +50 -50
  137. package/dist/collection/stories/Templates/tenBox/tenBox.stories.js +88 -88
  138. package/dist/collection/stories/Templates/total/total.stories.js +28 -28
  139. package/dist/collection/stories/Templates/wordBuilding/wordBuildingwithimg.stories.js +35 -35
  140. package/dist/collection/stories/Templates/wordBuilding/wordBuildingwithoutimg.stories.js +34 -34
  141. package/dist/collection/stories/Templates/writeCard/writeCard.stories.js +31 -31
  142. package/dist/collection/stories/Templates/writeLetter/writeLetter.stories.js +58 -58
  143. package/dist/collection/stories/Templates/writeNumber/writeNumber.stories.js +44 -44
  144. package/dist/collection/stories/Templates/writeSet/writeSet.stories.js +31 -31
  145. package/dist/collection/stories/Templates/writeWord/writeWord.stories.js +34 -34
  146. package/dist/collection/stories/components/flash-card.stories.js +48 -48
  147. package/dist/collection/stories/components/keyboard.stories.js +10 -10
  148. package/dist/collection/stories/components/slider.stories.js +4 -4
  149. package/dist/collection/stories/components/trace.stories.js +5 -5
  150. package/dist/collection/utils/audioPlayer.js +7 -2
  151. package/dist/collection/utils/constants.js +6 -0
  152. package/dist/collection/utils/utils.js +59 -7
  153. package/dist/collection/utils/utilsHandlers/dragDropHandler.js +8 -8
  154. package/dist/collection/utils/utilsHandlers/highlightHandler.js +54 -54
  155. package/dist/collection/utils/utilsHandlers/sortHandler.js +10 -10
  156. package/dist/components/index.js +1 -1
  157. package/dist/components/lido-avatar.js +1 -1
  158. package/dist/components/lido-balance.js +1 -1
  159. package/dist/components/lido-calculator.js +1 -1
  160. package/dist/components/lido-canvas.js +1 -1
  161. package/dist/components/lido-cell.js +1 -1
  162. package/dist/components/lido-col.js +1 -1
  163. package/dist/components/lido-container.js +1 -1
  164. package/dist/components/lido-flash-card.js +1 -1
  165. package/dist/components/lido-float.js +1 -1
  166. package/dist/components/lido-home.js +1 -1
  167. package/dist/components/lido-image.js +1 -1
  168. package/dist/components/lido-keyboard.js +1 -1
  169. package/dist/components/lido-math-matrix.js +1 -1
  170. package/dist/components/lido-pos.js +1 -1
  171. package/dist/components/lido-random.js +1 -1
  172. package/dist/components/lido-root.js +1 -1
  173. package/dist/components/lido-row.js +1 -1
  174. package/dist/components/lido-shape.js +1 -1
  175. package/dist/components/lido-slide-fill.js +1 -1
  176. package/dist/components/lido-text.js +1 -1
  177. package/dist/components/lido-trace.js +1 -1
  178. package/dist/components/lido-wrap.js +1 -1
  179. package/dist/components/p-B4iWvszS.js +1 -0
  180. package/dist/components/{p-Cf85Nc-6.js → p-BA-XmR9g.js} +1 -1
  181. package/dist/components/p-BJt-z8VW.js +1 -0
  182. package/dist/components/{p-CTlcpv4a.js → p-BfwUqpXc.js} +1 -1
  183. package/dist/components/{p-DNo3iX_r.js → p-BiBt9LGP.js} +1 -1
  184. package/dist/components/{p-DG0KR2iN.js → p-BlN0IsR4.js} +1 -1
  185. package/dist/components/{p-BSWrnLbC.js → p-BpVpANK9.js} +1 -1
  186. package/dist/components/{p-CgsPIpg0.js → p-Bw-OC9iR.js} +1 -1
  187. package/dist/components/p-C2J7-bcH.js +1 -0
  188. package/dist/components/{p-BfJG1wmU.js → p-CEmofYPx.js} +1 -1
  189. package/dist/components/{p-C5WmmkI6.js → p-CPYnt0P-.js} +1 -1
  190. package/dist/components/{p-CsDu4kiC.js → p-ChfVUoX4.js} +1 -1
  191. package/dist/components/{p-AaE392x7.js → p-CnQ-4EIw.js} +1 -1
  192. package/dist/components/{p-CXHPZN3m.js → p-CyGxEcn7.js} +1 -1
  193. package/dist/components/{p-CuDMRxx_.js → p-D1cBkIab.js} +1 -1
  194. package/dist/components/p-DP6jQ5ML.js +1 -0
  195. package/dist/components/{p-BW0855oZ.js → p-DV-k1ulI.js} +1 -1
  196. package/dist/components/p-Qhj9-H6e.js +12 -0
  197. package/dist/components/{p-CVZEVfip.js → p-hUfX1As2.js} +1 -1
  198. package/dist/components/p-leIEepjl.js +1 -0
  199. package/dist/components/{p-CK9M0Kcf.js → p-s4oGlKg6.js} +1 -1
  200. package/dist/components/{p-C70ykycD.js → p-useuhkjH.js} +1 -1
  201. package/dist/esm/{decode-D2f5bktc.js → decode-DhjaTUf2.js} +1 -1
  202. package/dist/esm/{index-BB56Mo3L.js → index-Bc6Y7rds.js} +124 -61
  203. package/dist/esm/{index-mMpK8062.js → index-Dvjbti-h.js} +1 -1
  204. package/dist/esm/index.js +2 -2
  205. package/dist/esm/lido-avatar_22.entry.js +103 -42
  206. package/dist/esm/lido-player.js +3 -3
  207. package/dist/esm/loader.js +3 -3
  208. package/dist/lido-player/assets/Shadow.svg +9 -9
  209. package/dist/lido-player/assets/Tracing-hand.svg +8 -8
  210. package/dist/lido-player/index.esm.js +1 -1
  211. package/dist/lido-player/lido-avatar.css +4 -4
  212. package/dist/lido-player/lido-avatar.tsx +214 -214
  213. package/dist/lido-player/lido-player.css +7 -7
  214. package/dist/lido-player/lido-player.esm.js +1 -1
  215. package/dist/lido-player/{p-DSlo480E.js → p-CORilAH-.js} +1 -1
  216. package/dist/lido-player/p-D66K5DXn.js +1 -0
  217. package/dist/lido-player/p-Dvjbti-h.js +2 -0
  218. package/dist/lido-player/p-ca195982.entry.js +12 -0
  219. package/dist/lido-player/readme.md +49 -49
  220. package/dist/types/components/flashCard/lido-flash-card.d.ts +2 -0
  221. package/dist/types/components.d.ts +1 -0
  222. package/dist/types/types/json.d.ts +3 -3
  223. package/dist/types/utils/audioPlayer.d.ts +1 -1
  224. package/dist/types/utils/constants.d.ts +2 -0
  225. package/dist/types/utils/utils.d.ts +4 -0
  226. package/package.json +73 -73
  227. package/readme.md +113 -113
  228. package/dist/components/p-B-mIxynb.js +0 -1
  229. package/dist/components/p-CSxwfvl3.js +0 -1
  230. package/dist/components/p-DONbWJGn.js +0 -1
  231. package/dist/components/p-DPGOqpde.js +0 -1
  232. package/dist/components/p-DXy70SGv.js +0 -1
  233. package/dist/components/p-i3W5bJbL.js +0 -12
  234. package/dist/lido-player/p-53d245b0.entry.js +0 -12
  235. package/dist/lido-player/p-DKuh-2gv.js +0 -1
  236. package/dist/lido-player/p-mMpK8062.js +0 -2
@@ -1,49 +1,49 @@
1
- # lido-avatar
2
-
3
-
4
-
5
- <!-- Auto Generated Below -->
6
-
7
-
8
- ## Properties
9
-
10
- | Property | Attribute | Description | Type | Default |
11
- | -------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------- | --------- | -------- |
12
- | `ariaHidden` | `aria-hidden` | The ARIA hidden attribute of the container. Used for accessibility to hide the element. | `string` | `''` |
13
- | `ariaLabel` | `aria-label` | The ARIA label of the container. Used for accessibility to indicate the purpose of the element. | `string` | `''` |
14
- | `audio` | `audio` | Audio file URL or identifier for sound that will be associated with the column. | `string` | `''` |
15
- | `bgColor` | `bg-color` | The background color of the column (CSS color value, e.g., '#FFFFFF', 'blue'). | `string` | `''` |
16
- | `delayVisible` | `delay-visible` | Delay in milliseconds to make the cell visible after mount. | `string` | `''` |
17
- | `height` | `height` | The height of the column component (CSS value, e.g., '100px', '50%'). | `string` | `''` |
18
- | `id` | `id` | The unique identifier for the column component. | `string` | `''` |
19
- | `onCorrect` | `on-correct` | Event handler for a Correct matching action, which can be used to hide the column or trigger other custom logic. | `string` | `''` |
20
- | `onEntry` | `on-entry` | Event handler for when the column is entered, which can be used to initiate specific behaviors on entry. | `string` | `''` |
21
- | `onInCorrect` | `on-in-correct` | Event handler for an Incorrect matching action, which can be used to trigger custom logic when the action is incorrect. | `string` | `''` |
22
- | `onTouch` | `on-touch` | Event handler for a touch event, where a custom function can be triggered when the column is touched. | `string` | `''` |
23
- | `src` | `src` | Source URL of the Rive (.riv) file | `string` | `''` |
24
- | `tabIndex` | `tab-index` | The tab index value, used to set the tab order of the column for keyboard navigation. | `number` | `0` |
25
- | `type` | `type` | Defines the type of the column, which can be used for styling or specific logic handling. | `string` | `''` |
26
- | `value` | `value` | The value associated with the column component. Typically used for internal logic. | `string` | `''` |
27
- | `visible` | `visible` | A boolean that controls whether the column is visible (`true`) or hidden (`false`). | `boolean` | `false` |
28
- | `width` | `width` | The width of the column component (CSS value, e.g., '100px', '50%'). | `string` | `'auto'` |
29
- | `x` | `x` | The x-coordinate (left position) of the column within its container (CSS value, e.g., '10px', '5vw'). | `string` | `'0px'` |
30
- | `y` | `y` | The y-coordinate (top position) of the column within its container (CSS value, e.g., '10px', '5vh'). | `string` | `'0px'` |
31
- | `z` | `z` | The z-index of the column to control stacking order. | `string` | `'0'` |
32
-
33
-
34
- ## Dependencies
35
-
36
- ### Used by
37
-
38
- - [lido-home](../home)
39
-
40
- ### Graph
41
- ```mermaid
42
- graph TD;
43
- lido-home --> lido-avatar
44
- style lido-avatar fill:#f9f,stroke:#333,stroke-width:4px
45
- ```
46
-
47
- ----------------------------------------------
48
-
49
- *Built with [StencilJS](https://stenciljs.com/)*
1
+ # lido-avatar
2
+
3
+
4
+
5
+ <!-- Auto Generated Below -->
6
+
7
+
8
+ ## Properties
9
+
10
+ | Property | Attribute | Description | Type | Default |
11
+ | -------------- | --------------- | ----------------------------------------------------------------------------------------------------------------------- | --------- | -------- |
12
+ | `ariaHidden` | `aria-hidden` | The ARIA hidden attribute of the container. Used for accessibility to hide the element. | `string` | `''` |
13
+ | `ariaLabel` | `aria-label` | The ARIA label of the container. Used for accessibility to indicate the purpose of the element. | `string` | `''` |
14
+ | `audio` | `audio` | Audio file URL or identifier for sound that will be associated with the column. | `string` | `''` |
15
+ | `bgColor` | `bg-color` | The background color of the column (CSS color value, e.g., '#FFFFFF', 'blue'). | `string` | `''` |
16
+ | `delayVisible` | `delay-visible` | Delay in milliseconds to make the cell visible after mount. | `string` | `''` |
17
+ | `height` | `height` | The height of the column component (CSS value, e.g., '100px', '50%'). | `string` | `''` |
18
+ | `id` | `id` | The unique identifier for the column component. | `string` | `''` |
19
+ | `onCorrect` | `on-correct` | Event handler for a Correct matching action, which can be used to hide the column or trigger other custom logic. | `string` | `''` |
20
+ | `onEntry` | `on-entry` | Event handler for when the column is entered, which can be used to initiate specific behaviors on entry. | `string` | `''` |
21
+ | `onInCorrect` | `on-in-correct` | Event handler for an Incorrect matching action, which can be used to trigger custom logic when the action is incorrect. | `string` | `''` |
22
+ | `onTouch` | `on-touch` | Event handler for a touch event, where a custom function can be triggered when the column is touched. | `string` | `''` |
23
+ | `src` | `src` | Source URL of the Rive (.riv) file | `string` | `''` |
24
+ | `tabIndex` | `tab-index` | The tab index value, used to set the tab order of the column for keyboard navigation. | `number` | `0` |
25
+ | `type` | `type` | Defines the type of the column, which can be used for styling or specific logic handling. | `string` | `''` |
26
+ | `value` | `value` | The value associated with the column component. Typically used for internal logic. | `string` | `''` |
27
+ | `visible` | `visible` | A boolean that controls whether the column is visible (`true`) or hidden (`false`). | `boolean` | `false` |
28
+ | `width` | `width` | The width of the column component (CSS value, e.g., '100px', '50%'). | `string` | `'auto'` |
29
+ | `x` | `x` | The x-coordinate (left position) of the column within its container (CSS value, e.g., '10px', '5vw'). | `string` | `'0px'` |
30
+ | `y` | `y` | The y-coordinate (top position) of the column within its container (CSS value, e.g., '10px', '5vh'). | `string` | `'0px'` |
31
+ | `z` | `z` | The z-index of the column to control stacking order. | `string` | `'0'` |
32
+
33
+
34
+ ## Dependencies
35
+
36
+ ### Used by
37
+
38
+ - [lido-home](../home)
39
+
40
+ ### Graph
41
+ ```mermaid
42
+ graph TD;
43
+ lido-home --> lido-avatar
44
+ style lido-avatar fill:#f9f,stroke:#333,stroke-width:4px
45
+ ```
46
+
47
+ ----------------------------------------------
48
+
49
+ *Built with [StencilJS](https://stenciljs.com/)*
@@ -98,6 +98,7 @@ export declare class LidoFlash {
98
98
  private static readonly narrationStartGrace;
99
99
  private instructionDone;
100
100
  private instructionStarted;
101
+ private shouldPlayTemplateInstruction;
101
102
  private onAudioStarted;
102
103
  private onAudioPlaying;
103
104
  private onAudioEnded;
@@ -138,6 +139,7 @@ export declare class LidoFlash {
138
139
  private finishNarration;
139
140
  private startNarration;
140
141
  private showArrow;
142
+ replayGoodJobAudio(): Promise<void>;
141
143
  private setArrowVisible;
142
144
  render(): any;
143
145
  }
@@ -884,6 +884,7 @@ export namespace Components {
884
884
  * @default ''
885
885
  */
886
886
  "onTouch": string;
887
+ "replayGoodJobAudio": () => Promise<void>;
887
888
  /**
888
889
  * Tab index for keyboard navigation.
889
890
  * @default 0
@@ -1,4 +1,4 @@
1
- declare module "*.json" {
2
- const value: any;
3
- export default value;
1
+ declare module "*.json" {
2
+ const value: any;
3
+ export default value;
4
4
  }
@@ -25,7 +25,7 @@ export declare class AudioPlayer {
25
25
  private handleVisibilityChange;
26
26
  private resolveVisibilityWaiters;
27
27
  private getLidoTextElement;
28
- play(targetElement: HTMLElement, suppressHighlight?: boolean, playbackContext?: unknown): any;
28
+ play(targetElement: HTMLElement, suppressHighlight?: boolean, playbackContext?: unknown, fallbackAudio?: string): any;
29
29
  private registerGlobalStopEvents;
30
30
  private unregisterGlobalStopEvents;
31
31
  private registerVisibilityEvents;
@@ -20,6 +20,8 @@ export declare const LidoContainer = "lido-container";
20
20
  export declare const LangChangeEvent = "languageChanged";
21
21
  export declare const LIDO_COMMON_AUDIO_PATH = "__LIDO_COMMON_AUDIO_PATH__";
22
22
  export declare const LIDO_COMMON_AUDIO_READY_EVENT = "lidoCommonAudioPathReady";
23
+ export declare const GOOD_JOB_AUDIO_FILE = "goodJob.mp3";
24
+ export declare const resolveCommonAudioPath: (basePath: string | undefined, fileName: string) => string | undefined;
23
25
  export declare const LIDO_INTERACTION_CLEANUP_EVENT = "lido:interaction-cleanup";
24
26
  export declare const TemplateID = "template-id";
25
27
  export declare const CalculatorOk = "calculator-ok";
@@ -1,5 +1,9 @@
1
1
  import { CalculatorOk } from './constants';
2
2
  import type { LessonTrackingParams } from './customEvents';
3
+ export declare const isGoodJobAudioTarget: (element: HTMLElement) => boolean;
4
+ export declare const resetGoodJobAudioTracking: (home: HTMLElement) => void;
5
+ export declare const shouldPlayGoodJobAudio: (element: HTMLElement) => boolean;
6
+ export declare const getGoodJobAudio: (element: HTMLElement) => string | undefined;
3
7
  export declare function buildDragSelectedMapFromDOM(): Record<string, string[]>;
4
8
  export declare function getSortedValuesArrayFromMap(map: Record<string, string[]>): string[];
5
9
  export declare function format(first?: string, middle?: string, last?: string): string;
package/package.json CHANGED
@@ -1,73 +1,73 @@
1
- {
2
- "name": "lido-player",
3
- "version": "0.0.2-beta-25-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.43.5",
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
- "storybook": "^8.6.12"
60
- },
61
- "license": "MIT",
62
- "dependencies": {
63
- "@rive-app/canvas": "2.32.0",
64
- "brotli": "^1.3.3",
65
- "css-filter-converter": "^1.0.110",
66
- "i18next": "^25.6.1",
67
- "i18next-browser-languagedetector": "^8.2.0",
68
- "jszip": "^3.10.1",
69
- "lido-player": "^0.0.2-alpha-77",
70
- "mathjs": "^14.4.0",
71
- "tinycolor2": "^1.6.0"
72
- }
73
- }
1
+ {
2
+ "name": "lido-player",
3
+ "version": "0.0.2-beta-26-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.43.5",
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
+ "storybook": "^8.6.12"
60
+ },
61
+ "license": "MIT",
62
+ "dependencies": {
63
+ "@rive-app/canvas": "2.32.0",
64
+ "brotli": "^1.3.3",
65
+ "css-filter-converter": "^1.0.110",
66
+ "i18next": "^25.6.1",
67
+ "i18next-browser-languagedetector": "^8.2.0",
68
+ "jszip": "^3.10.1",
69
+ "lido-player": "^0.0.2-alpha-77",
70
+ "mathjs": "^14.4.0",
71
+ "tinycolor2": "^1.6.0"
72
+ }
73
+ }
package/readme.md CHANGED
@@ -1,114 +1,114 @@
1
- [![Built With Stencil](https://img.shields.io/badge/-Built%20With%20Stencil-16161d.svg?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE5LjIuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MTIgNTEyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI%2BCjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI%2BCgkuc3Qwe2ZpbGw6I0ZGRkZGRjt9Cjwvc3R5bGU%2BCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik00MjQuNywzNzMuOWMwLDM3LjYtNTUuMSw2OC42LTkyLjcsNjguNkgxODAuNGMtMzcuOSwwLTkyLjctMzAuNy05Mi43LTY4LjZ2LTMuNmgzMzYuOVYzNzMuOXoiLz4KPHBhdGggY2xhc3M9InN0MCIgZD0iTTQyNC43LDI5Mi4xSDE4MC40Yy0zNy42LDAtOTIuNy0zMS05Mi43LTY4LjZ2LTMuNkgzMzJjMzcuNiwwLDkyLjcsMzEsOTIuNyw2OC42VjI5Mi4xeiIvPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNNDI0LjcsMTQxLjdIODcuN3YtMy42YzAtMzcuNiw1NC44LTY4LjYsOTIuNy02OC42SDMzMmMzNy45LDAsOTIuNywzMC43LDkyLjcsNjguNlYxNDEuN3oiLz4KPC9zdmc%2BCg%3D%3D&colorA=16161d&style=flat-square)](https://stenciljs.com)
2
-
3
- # Stencil Component Starter
4
-
5
- This is a starter project for building a standalone Web Component using Stencil.
6
-
7
- Stencil is also great for building entire apps. For that, use the [stencil-app-starter](https://github.com/ionic-team/stencil-app-starter) instead.
8
-
9
- # Stencil
10
-
11
- Stencil is a compiler for building fast web apps using Web Components.
12
-
13
- Stencil combines the best concepts of the most popular frontend frameworks into a compile-time rather than runtime tool. Stencil takes TypeScript, JSX, a tiny virtual DOM layer, efficient one-way data binding, an asynchronous rendering pipeline (similar to React Fiber), and lazy-loading out of the box, and generates 100% standards-based Web Components that run in any browser supporting the Custom Elements v1 spec.
14
-
15
- Stencil components are just Web Components, so they work in any major framework or with no framework at all.
16
-
17
- ## Getting Started
18
-
19
- To start building a new web component using Stencil, clone this repo to a new directory:
20
-
21
- ```bash
22
- git clone https://github.com/ionic-team/stencil-component-starter.git my-component
23
- cd my-component
24
- git remote rm origin
25
- ```
26
-
27
- and run:
28
-
29
- ```bash
30
- npm install
31
- npm start
32
- ```
33
-
34
- To build the component for production, run:
35
-
36
- ```bash
37
- npm run build
38
- ```
39
-
40
- To run the unit tests for the components, run:
41
-
42
- ```bash
43
- npm test
44
- ```
45
-
46
- Need help? Check out our docs [here](https://stenciljs.com/docs/my-first-component).
47
-
48
- ## Naming Components
49
-
50
- When creating new component tags, we recommend _not_ using `stencil` in the component name (ex: `<stencil-datepicker>`). This is because the generated component has little to nothing to do with Stencil; it's just a web component!
51
-
52
- Instead, use a prefix that fits your company or any name for a group of related components. For example, all of the Ionic-generated web components use the prefix `ion`.
53
-
54
- ## Using this component
55
-
56
- There are two strategies we recommend for using web components built with Stencil.
57
-
58
- The first step for all two of these strategies is to [publish to NPM](https://docs.npmjs.com/getting-started/publishing-npm-packages).
59
-
60
- You can read more about these different approaches in the [Stencil docs](https://stenciljs.com/docs/publishing).
61
-
62
- ### Lazy Loading
63
-
64
- If your Stencil project is built with the [`dist`](https://stenciljs.com/docs/distribution) output target, you can import a small bootstrap script that registers all components and allows you to load individual component scripts lazily.
65
-
66
- For example, given your Stencil project namespace is called `my-design-system`, to use `my-component` on any website, inject this into your HTML:
67
-
68
- ```html
69
- <script type="module" src="https://unpkg.com/my-design-system"></script>
70
- <!--
71
- To avoid unpkg.com redirects to the actual file, you can also directly import:
72
- https://unpkg.com/foobar-design-system@0.0.1/dist/foobar-design-system/foobar-design-system.esm.js
73
- -->
74
- <my-component first="Stencil" last="'Don't call me a framework' JS"></my-component>
75
- ```
76
-
77
- This will only load the necessary scripts needed to render `<my-component />`. Once more components of this package are used, they will automatically be loaded lazily.
78
-
79
- You can also import the script as part of your `node_modules` in your applications entry file:
80
-
81
- ```tsx
82
- import 'foobar-design-system/dist/foobar-design-system/foobar-design-system.esm.js';
83
- ```
84
-
85
- Check out this [Live Demo](https://stackblitz.com/edit/vitejs-vite-y6v26a?file=src%2Fmain.tsx).
86
-
87
- ### Standalone
88
-
89
- If you are using a Stencil component library with `dist-custom-elements`, we recommend importing Stencil components individually in those files where they are needed.
90
-
91
- To export Stencil components as standalone components make sure you have the [`dist-custom-elements`](https://stenciljs.com/docs/custom-elements) output target defined in your `stencil.config.ts`.
92
-
93
- For example, given you'd like to use `<my-component />` as part of a React component, you can import the component directly via:
94
-
95
- ```tsx
96
- import 'foobar-design-system/my-component';
97
-
98
- function App() {
99
- return (
100
- <>
101
- <div>
102
- <my-component
103
- first="Stencil"
104
- last="'Don't call me a framework' JS"
105
- ></my-component>
106
- </div>
107
- </>
108
- );
109
- }
110
-
111
- export default App;
112
- ```
113
-
1
+ [![Built With Stencil](https://img.shields.io/badge/-Built%20With%20Stencil-16161d.svg?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE5LjIuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MTIgNTEyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI%2BCjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI%2BCgkuc3Qwe2ZpbGw6I0ZGRkZGRjt9Cjwvc3R5bGU%2BCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik00MjQuNywzNzMuOWMwLDM3LjYtNTUuMSw2OC42LTkyLjcsNjguNkgxODAuNGMtMzcuOSwwLTkyLjctMzAuNy05Mi43LTY4LjZ2LTMuNmgzMzYuOVYzNzMuOXoiLz4KPHBhdGggY2xhc3M9InN0MCIgZD0iTTQyNC43LDI5Mi4xSDE4MC40Yy0zNy42LDAtOTIuNy0zMS05Mi43LTY4LjZ2LTMuNkgzMzJjMzcuNiwwLDkyLjcsMzEsOTIuNyw2OC42VjI5Mi4xeiIvPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNNDI0LjcsMTQxLjdIODcuN3YtMy42YzAtMzcuNiw1NC44LTY4LjYsOTIuNy02OC42SDMzMmMzNy45LDAsOTIuNywzMC43LDkyLjcsNjguNlYxNDEuN3oiLz4KPC9zdmc%2BCg%3D%3D&colorA=16161d&style=flat-square)](https://stenciljs.com)
2
+
3
+ # Stencil Component Starter
4
+
5
+ This is a starter project for building a standalone Web Component using Stencil.
6
+
7
+ Stencil is also great for building entire apps. For that, use the [stencil-app-starter](https://github.com/ionic-team/stencil-app-starter) instead.
8
+
9
+ # Stencil
10
+
11
+ Stencil is a compiler for building fast web apps using Web Components.
12
+
13
+ Stencil combines the best concepts of the most popular frontend frameworks into a compile-time rather than runtime tool. Stencil takes TypeScript, JSX, a tiny virtual DOM layer, efficient one-way data binding, an asynchronous rendering pipeline (similar to React Fiber), and lazy-loading out of the box, and generates 100% standards-based Web Components that run in any browser supporting the Custom Elements v1 spec.
14
+
15
+ Stencil components are just Web Components, so they work in any major framework or with no framework at all.
16
+
17
+ ## Getting Started
18
+
19
+ To start building a new web component using Stencil, clone this repo to a new directory:
20
+
21
+ ```bash
22
+ git clone https://github.com/ionic-team/stencil-component-starter.git my-component
23
+ cd my-component
24
+ git remote rm origin
25
+ ```
26
+
27
+ and run:
28
+
29
+ ```bash
30
+ npm install
31
+ npm start
32
+ ```
33
+
34
+ To build the component for production, run:
35
+
36
+ ```bash
37
+ npm run build
38
+ ```
39
+
40
+ To run the unit tests for the components, run:
41
+
42
+ ```bash
43
+ npm test
44
+ ```
45
+
46
+ Need help? Check out our docs [here](https://stenciljs.com/docs/my-first-component).
47
+
48
+ ## Naming Components
49
+
50
+ When creating new component tags, we recommend _not_ using `stencil` in the component name (ex: `<stencil-datepicker>`). This is because the generated component has little to nothing to do with Stencil; it's just a web component!
51
+
52
+ Instead, use a prefix that fits your company or any name for a group of related components. For example, all of the Ionic-generated web components use the prefix `ion`.
53
+
54
+ ## Using this component
55
+
56
+ There are two strategies we recommend for using web components built with Stencil.
57
+
58
+ The first step for all two of these strategies is to [publish to NPM](https://docs.npmjs.com/getting-started/publishing-npm-packages).
59
+
60
+ You can read more about these different approaches in the [Stencil docs](https://stenciljs.com/docs/publishing).
61
+
62
+ ### Lazy Loading
63
+
64
+ If your Stencil project is built with the [`dist`](https://stenciljs.com/docs/distribution) output target, you can import a small bootstrap script that registers all components and allows you to load individual component scripts lazily.
65
+
66
+ For example, given your Stencil project namespace is called `my-design-system`, to use `my-component` on any website, inject this into your HTML:
67
+
68
+ ```html
69
+ <script type="module" src="https://unpkg.com/my-design-system"></script>
70
+ <!--
71
+ To avoid unpkg.com redirects to the actual file, you can also directly import:
72
+ https://unpkg.com/foobar-design-system@0.0.1/dist/foobar-design-system/foobar-design-system.esm.js
73
+ -->
74
+ <my-component first="Stencil" last="'Don't call me a framework' JS"></my-component>
75
+ ```
76
+
77
+ This will only load the necessary scripts needed to render `<my-component />`. Once more components of this package are used, they will automatically be loaded lazily.
78
+
79
+ You can also import the script as part of your `node_modules` in your applications entry file:
80
+
81
+ ```tsx
82
+ import 'foobar-design-system/dist/foobar-design-system/foobar-design-system.esm.js';
83
+ ```
84
+
85
+ Check out this [Live Demo](https://stackblitz.com/edit/vitejs-vite-y6v26a?file=src%2Fmain.tsx).
86
+
87
+ ### Standalone
88
+
89
+ If you are using a Stencil component library with `dist-custom-elements`, we recommend importing Stencil components individually in those files where they are needed.
90
+
91
+ To export Stencil components as standalone components make sure you have the [`dist-custom-elements`](https://stenciljs.com/docs/custom-elements) output target defined in your `stencil.config.ts`.
92
+
93
+ For example, given you'd like to use `<my-component />` as part of a React component, you can import the component directly via:
94
+
95
+ ```tsx
96
+ import 'foobar-design-system/my-component';
97
+
98
+ function App() {
99
+ return (
100
+ <>
101
+ <div>
102
+ <my-component
103
+ first="Stencil"
104
+ last="'Don't call me a framework' JS"
105
+ ></my-component>
106
+ </div>
107
+ </>
108
+ );
109
+ }
110
+
111
+ export default App;
112
+ ```
113
+
114
114
  Check out this [Live Demo](https://stackblitz.com/edit/vitejs-vite-b6zuds?file=src%2FApp.tsx).
@@ -1 +0,0 @@
1
- import{p as i,H as t,f as s,a as o,A as h,k as e,i as a,h as n,b as d,t as r}from"./index.js";const l=i(class i extends t{constructor(t){super(),!1!==t&&this.__registerHost(),this.value="",this.height="auto",this.width="auto",this.ariaLabel="",this.ariaHidden="",this.x="0px",this.y="0px",this.z="0",this.bgColor="",this.type="",this.tabIndex=0,this.visible=!0,this.audio="",this.onTouch="",this.onInCorrect="",this.onCorrect="",this.onEntry="",this.flipped=!1,this.autoFlipAfter=4500,this.narrationTarget=null,this.narrationHandled=!1,this.instructionDone=!1,this.instructionStarted=!1,this.onAudioStarted=i=>{var t;const s=null===(t=i.detail)||void 0===t?void 0:t.target;s===this.instructionText()&&(this.instructionStarted=!0),s&&s===this.narrationTarget&&!this.narrationHandled&&(this.narrationGraceTimer&&window.clearTimeout(this.narrationGraceTimer),this.narrationGraceTimer=void 0)},this.onAudioPlaying=i=>{const t=i.detail,s=null==t?void 0:t.target;if("lido-avatar"!==(null==s?void 0:s.id))return;if(t.playbackContext!==this.goodJobPlaybackContext)return;const o=this.nextArrow();o&&this.flipped&&(this.goodJobPlaybackId=t.playbackId,o.classList.add("flash-card-next-glowing"))},this.onAudioEnded=i=>{var t,o,h;const e=null===(t=i.detail)||void 0===t?void 0:t.target,a=this.instructionText();if(e&&(e===a||"lido-avatar"===e.id||this.el.contains(e)))if(e!==this.narrationTarget||this.narrationHandled){if(!this.narrationHandled||e!==this.narrationTarget)if(e===this.instructionText())this.instructionDone=!0,this.frontStartTimer=window.setTimeout((()=>{this.speakFront()}),1200);else if(e===this.frontText()){if(this.flipped)return;this.autoFlipTimer&&window.clearTimeout(this.autoFlipTimer),this.autoFlipTimer=window.setTimeout((()=>{this.flipped||this.handleFlip()}),this.autoFlipAfter)}else if(e===this.backText())this.flipped&&this.showArrow();else if("lido-avatar"===e.id){const t=null===(o=i.detail)||void 0===o?void 0:o.playbackId;if((null===(h=i.detail)||void 0===h?void 0:h.playbackContext)!==this.goodJobPlaybackContext||t!==this.goodJobPlaybackId)return;this.goodJobPlaybackId=void 0,s("this.avatarAnimate='Idle'",e)}}else this.finishNarration(e)},this.margin="",this.disableSpeak=!1,this.style={},this.delayVisible="",this.updateStyles=()=>{const i=window.innerHeight>window.innerWidth?"portrait":"landscape";this.style={height:o(this.height,i)||"200px",width:o(this.width,i)||"200px",backgroundColor:o(this.bgColor,i),top:o(this.y,i),left:o(this.x,i),zIndex:this.z,display:this.visible?this.display?o(this.display,i):"inline-block":"none",flexDirection:this.direction?o(this.direction,i):void 0,margin:o(this.margin,i)}},this.handleFlip=()=>{var i;this.autoFlipTimer&&window.clearTimeout(this.autoFlipTimer),h.getI().stop(),this.clearNarrationTimers();const t=!this.flipped;if(this.flipped=!this.flipped,this.stopGoodJobGlow(),this.setArrowVisible(!1),t){const t=this.backText();t&&(null===(i=t.textContent)||void 0===i?void 0:i.trim())?this.startNarration(t):this.showArrow()}else this.speakFront()},this.instructionText=()=>{const i=this.el.closest("lido-container"),t=null==i?void 0:i.getAttribute("template-id");return t?null==i?void 0:i.querySelector(`[id="${t}"]`):null},this.frontText=()=>this.el.querySelector(".card-front lido-text"),this.backText=()=>this.el.querySelector(".card-back lido-text"),this.nextArrow=()=>{var i;return null===(i=this.el.closest("lido-container"))||void 0===i?void 0:i.querySelector("#arrow")},this.stopGoodJobGlow=()=>{var i;this.goodJobPlaybackId=void 0,this.goodJobPlaybackContext=void 0,null===(i=this.nextArrow())||void 0===i||i.classList.remove("flash-card-next-glowing")},this.speakFront=()=>{var i,t;const s=this.frontText();this.instructionDone&&!this.flipped&&s&&(null===(i=s.textContent)||void 0===i?void 0:i.trim())?this.startNarration(s):!this.instructionDone||this.flipped||s&&(null===(t=s.textContent)||void 0===t?void 0:t.trim())||(this.autoFlipTimer&&window.clearTimeout(this.autoFlipTimer),this.autoFlipTimer=window.setTimeout((()=>{this.flipped||this.handleFlip()}),this.autoFlipAfter))},this.clearNarrationTimers=()=>{this.narrationGraceTimer&&window.clearTimeout(this.narrationGraceTimer),this.narrationGraceTimer=void 0,this.narrationTarget=null,this.narrationHandled=!1},this.continueAfterNarration=i=>{if(i===this.instructionText())this.instructionDone=!0,this.frontStartTimer=window.setTimeout((()=>this.speakFront()),1200);else if(i===this.frontText()){if(this.flipped)return;this.autoFlipTimer&&window.clearTimeout(this.autoFlipTimer),this.autoFlipTimer=window.setTimeout((()=>{this.flipped||this.handleFlip()}),this.autoFlipAfter)}else i===this.backText()&&this.flipped&&this.showArrow()},this.finishNarration=i=>{i!==this.narrationTarget||this.narrationHandled||(this.narrationHandled=!0,this.narrationGraceTimer&&window.clearTimeout(this.narrationGraceTimer),this.narrationGraceTimer=void 0,this.continueAfterNarration(i))},this.startNarration=t=>{this.clearNarrationTimers(),this.narrationTarget=t,this.narrationGraceTimer=window.setTimeout((()=>{this.narrationHandled||this.finishNarration(t)}),i.narrationStartGrace),s("this.speak='true'",t)},this.showArrow=()=>{if(!this.flipped)return;const i=this.el.closest("lido-container");if("flashcardtemplate"!==(null==i?void 0:i.getAttribute("template-id")))return;const t=this.nextArrow();if(!t)return;t.getAttribute("onTouch")||t.setAttribute("onTouch","this.nextBtn='true';");const o=i.querySelector("#lido-avatar"),e=t.getAttribute("audio");o&&e&&o.setAttribute("audio",e),this.setArrowVisible(!0),t.classList.add("flash-card-next-glowing"),o&&(this.goodJobPlaybackContext={},this.goodJobPlaybackId=void 0,s("this.avatarAnimate='Idle speak'",o),h.getI().play(o,!0,this.goodJobPlaybackContext))},this.setArrowVisible=i=>{const t=this.el.closest("lido-container");if("flashcardtemplate"!==(null==t?void 0:t.getAttribute("template-id")))return;const s=t.querySelector("#arrow");if(!s)return;s.visible=i,s.setAttribute("visible",String(i)),s.style.display=i?"block":"none",s.style.visibility=i?"visible":"hidden",s.style.opacity=i?"1":"0",s.style.pointerEvents=i?"auto":"none";const o=s.querySelector("lido-image");o&&(o.style.display=i?"flex":"none",o.style.visibility=i?"visible":"hidden",o.style.opacity=i?"1":"0"),"function"==typeof s.updateStyles&&s.updateStyles()}}handleFlippedChange(){}componentWillLoad(){this.updateStyles(),window.addEventListener("resize",this.updateStyles),window.addEventListener("load",this.updateStyles)}componentDidLoad(){var i;e(this.el,this.delayVisible),a(this.el,this.type),window.addEventListener("lidoAudioStarted",this.onAudioStarted),window.addEventListener("lidoAudioPlaying",this.onAudioPlaying),window.addEventListener("lidoAudioEnded",this.onAudioEnded);const t=this.el.closest("lido-container");"flashcardtemplate"===(null==t?void 0:t.getAttribute("template-id"))&&(null===(i=t.querySelector("#lido-avatar"))||void 0===i||i.setAttribute("disable-speak","true"),this.instructionStartTimer=window.setTimeout((()=>{if(!this.instructionStarted&&!this.instructionDone){const i=this.instructionText();i&&this.startNarration(i)}}),150))}disconnectedCallback(){window.removeEventListener("lidoAudioEnded",this.onAudioEnded),window.removeEventListener("lidoAudioPlaying",this.onAudioPlaying),window.removeEventListener("lidoAudioStarted",this.onAudioStarted),this.autoFlipTimer&&window.clearTimeout(this.autoFlipTimer),this.instructionStartTimer&&window.clearTimeout(this.instructionStartTimer),this.frontStartTimer&&window.clearTimeout(this.frontStartTimer),this.clearNarrationTimers(),window.removeEventListener("resize",this.updateStyles),window.removeEventListener("load",this.updateStyles)}render(){return n(d,{key:"57b9dc5ecf618dc381a58e107fa2990b84f5517a",value:this.value,"tab-index":this.tabIndex,style:this.style,"aria-label":this.ariaLabel,"aria-hidden":this.ariaHidden,audio:this.audio,onTouch:this.onTouch,onCorrect:this.onCorrect,onInCorrect:this.onInCorrect,onEntry:this.onEntry,type:this.type,onClick:i=>{var t,s;(null===(s=null===(t=i.target)||void 0===t?void 0:t.closest)||void 0===s?void 0:s.call(t,"#lido-avatar"))||this.handleFlip()},"disable-speak":this.disableSpeak},n("div",{key:"3712fc66e33323bdd55e0abb747370ee461dc808",class:"card "+(this.flipped?"flipped":"")},n("div",{key:"eb8af2e445393592c0e8a3e4c5934c71dcab4b4e",class:"card-face card-front"},null!=this.front?this.front:n("slot",{name:"front"})),n("div",{key:"efa14cc7ea506714342151b12a9724bdcdb1eba8",class:"card-face card-back"},null!=this.back?this.back:n("slot",{name:"back"}))))}get el(){return this}static get watchers(){return{flipped:[{handleFlippedChange:0}]}}static get style(){return'.card{position:relative;width:100%;height:100%;transform-style:preserve-3d;transition:transform 0.6s ease;cursor:pointer}.card.flipped{transform:rotateY(180deg)}.card-face{position:absolute;width:100%;height:100%;backface-visibility:hidden;display:flex;align-items:center;justify-content:center}.card-back{transform:rotateY(180deg)}lido-container[template-id="flashcardtemplate"] #arrow{position:absolute !important;left:auto !important;top:50% !important;right:13.3% !important;transform:translateY(-50%);z-index:4 !important;overflow:visible;box-sizing:border-box;border:10px solid transparent;box-shadow:0px 8px 0px 0px #8b310f !important}lido-container[template-id="flashcardtemplate"] #arrow.flash-card-next-glowing{animation:flash-card-next-attention 1.4s ease-in-out infinite}@keyframes flash-card-next-attention{0%,100%{border-color:#ffc34d;filter:drop-shadow(0 0 0 rgba(255, 195, 77, 0))}50%{border-color:#fff1a8;filter:drop-shadow(0 0 10px rgba(255, 195, 77, 0.95))}}lido-container[template-id="flashcardtemplate"] #arrow:active{transform:translateY(calc(-50% + 8px)) !important;box-shadow:0px 0px 0px 0px !important}@media (orientation: portrait){lido-container[template-id="flashcardtemplate"] #arrow{right:-4.3% !important}}'}},[260,"lido-flash-card",{value:[1],height:[1],width:[1],ariaLabel:[1,"aria-label"],ariaHidden:[1,"aria-hidden"],x:[1],y:[1],z:[1],bgColor:[1,"bg-color"],type:[1],tabIndex:[2,"tab-index"],visible:[4],audio:[1],onTouch:[1,"on-touch"],onInCorrect:[1,"on-in-correct"],onCorrect:[1,"on-correct"],onEntry:[1,"on-entry"],direction:[1],display:[1],front:[8],back:[8],flipped:[1540],autoFlipAfter:[2,"auto-flip-after"],margin:[1],disableSpeak:[4,"disable-speak"],delayVisible:[1,"delay-visible"],style:[32]},void 0,{flipped:[{handleFlippedChange:0}]}]);function c(){"undefined"!=typeof customElements&&["lido-flash-card"].forEach((i=>{"lido-flash-card"===i&&(customElements.get(r(i))||customElements.define(r(i),l))}))}l.narrationStartGrace=800,c();export{l as L,c as d}
@@ -1 +0,0 @@
1
- import{t,p as i,H as s,k as o,i as e,v as a,w as l,a as n,h,b as d}from"./index.js";const r=i(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.id="",this.value="",this.z="0",this.tabIndex=0,this.visible=!1,this.onEntry="",this.delayVisible="",this.floatDirection="bottomToTop",this.handleWindowResize=()=>this.updateStyles(),this.handleWindowLoad=()=>this.updateStyles()}componentDidLoad(){o(this.el,this.delayVisible),e(this.el,this.type),this.initializeFloatElement()}componentWillLoad(){this.updateStyles(),window.addEventListener("resize",this.handleWindowResize),window.addEventListener("load",this.handleWindowLoad)}disconnectedCallback(){window.removeEventListener("resize",this.handleWindowResize),window.removeEventListener("load",this.handleWindowLoad)}initializeFloatElement(){let t=0;Array.from(this.el.children).forEach((i=>{const s=i;s.style.visibility="hidden",setTimeout((()=>{s.style.visibility="visible",a(s)}),t),t+=1e3,i.addEventListener("click",(()=>{l(s)}))}))}updateStyles(){const t=window.innerHeight>window.innerWidth?"portrait":"landscape";this.style={height:"leftToRight"!==this.floatDirection?"100%":n(this.height,t),width:"leftToRight"===this.floatDirection?"100%":n(this.width,t),backgroundColor:n(this.bgColor,t),zIndex:this.z,display:this.visible?"flex":"none"}}render(){return h(d,{key:"26ada4c2834a58fe1f45348a32f9d1dcecb79a14",class:"lido-float","float-direction":this.floatDirection,id:this.id,"tab-index":this.tabIndex,style:this.style,onEntry:this.onEntry},h("slot",{key:"6f4ca358f564e268390f221cc1f84af1f303761b"}))}get el(){return this}static get style(){return".lido-float{position:relative}.lido-float>*{position:absolute;cursor:pointer}@keyframes float-up{from{top:var(--el-top)}to{top:-500px}}#removeShadow{box-shadow:unset !important}@keyframes float-lr{from{right:var(--el-left)}to{right:-500px}}"}},[260,"lido-float",{id:[1],value:[1],z:[1],tabIndex:[2,"tab-index"],visible:[4],onEntry:[1,"on-entry"],width:[1],height:[1],bgColor:[1,"bg-color"],type:[1],delayVisible:[1,"delay-visible"],floatDirection:[1,"float-direction"],style:[32]}]);function c(){"undefined"!=typeof customElements&&["lido-float"].forEach((i=>{"lido-float"===i&&(customElements.get(t(i))||customElements.define(t(i),r))}))}c();export{r as L,c as d}
@@ -1 +0,0 @@
1
- import{t,p as i,H as s,m as o,h as e,b as h}from"./index.js";const n=i(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.showSpeakIcon=!1,this.id="",this.value="",this.height="auto",this.width="auto",this.ariaLabel="",this.ariaHidden="",this.x="0px",this.y="0px",this.z="0",this.bgColor="",this.type="",this.tabIndex=0,this.visible=!1,this.audio="",this.onTouch="",this.onInCorrect="",this.onCorrect="",this.onEntry="",this.minDrops=1,this.maxDrops=1,this.margin=""}componentDidLoad(){setTimeout((()=>{const t=this.el.parentElement;if(!t)return;const i=t.offsetWidth,s=t.offsetHeight;Array.from(this.el.children).forEach((t=>{const o=i-t.offsetWidth,e=s-t.offsetHeight,h=Math.random()*o,n=Math.random()*e;t.style.position="absolute",t.style.left=`${h}px`,t.style.top=`${n}px`}))}),50),this.showSpeakIcon&&o(this.el)}render(){return e(h,{key:"e0ed354e54ea3c5112d0e068b2a94356ef437874",class:"lido-random",type:this.type,"tab-index":this.tabIndex,value:this.value,style:{height:this.height,width:this.width,top:this.y,left:this.x,display:this.visible?"block":"none",zIndex:this.z,backgroundColor:this.bgColor,margin:this.margin},"aria-label":this.ariaLabel,"aria-hidden":this.ariaHidden,audio:this.audio,onTouch:this.onTouch,onCorrect:this.onCorrect,minDrops:this.minDrops,maxDrops:this.maxDrops,onInCorrect:this.onInCorrect,onEntry:this.onEntry},e("slot",{key:"ed0386cda3ba55d89fb08607775a49a4180f08b3"}))}get el(){return this}static get style(){return".lido-random{position:relative;width:100%;height:100%}.lido-random>*{position:absolute}"}},[260,"lido-random",{showSpeakIcon:[4,"show-speak-icon"],id:[1],value:[1],height:[1],width:[1],ariaLabel:[1,"aria-label"],ariaHidden:[1,"aria-hidden"],x:[1],y:[1],z:[1],bgColor:[1,"bg-color"],type:[1],tabIndex:[2,"tab-index"],visible:[4],audio:[1],onTouch:[1,"on-touch"],onInCorrect:[1,"on-in-correct"],onCorrect:[1,"on-correct"],onEntry:[1,"on-entry"],minDrops:[2,"min-drops"],maxDrops:[2,"max-drops"],margin:[1]}]);function a(){"undefined"!=typeof customElements&&["lido-random"].forEach((i=>{"lido-random"===i&&(customElements.get(t(i))||customElements.define(t(i),n))}))}a();export{n as L,a as d}