lido-player 0.0.2-beta-22-dev → 0.0.2-beta-24-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/dist/cjs/{decode-Cr5DANqc.js → decode-B7mZm_nK.js} +1 -1
- package/dist/cjs/{index-0BvcfeCt.js → index-BCRDjbaz.js} +276 -98
- package/dist/cjs/{index-DnaH8sO-.js → index-DBCFoh1I.js} +1 -1
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/lido-avatar_22.cjs.entry.js +231 -59
- package/dist/cjs/lido-player.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/avatar/lido-avatar.css +4 -4
- package/dist/collection/components/avatar/lido-avatar.js +9 -2
- package/dist/collection/components/avatar/lido-avatar.tsx +214 -207
- package/dist/collection/components/avatar/readme.md +49 -49
- package/dist/collection/components/calculator/lido-calculator.css +89 -89
- package/dist/collection/components/calculator/lido-calculator.js +2 -2
- package/dist/collection/components/canvas/lido-canvas.css +33 -33
- package/dist/collection/components/canvas/lido-canvas.js +1 -1
- package/dist/collection/components/cell/lido-cell.css +100 -100
- package/dist/collection/components/cell/lido-cell.js +12 -12
- package/dist/collection/components/column/lido-col.css +19 -19
- package/dist/collection/components/column/lido-col.js +6 -6
- package/dist/collection/components/container/lido-container.css +34 -10
- package/dist/collection/components/container/lido-container.js +39 -8
- package/dist/collection/components/flashCard/lido-flash-card.css +72 -46
- package/dist/collection/components/flashCard/lido-flash-card.js +156 -15
- package/dist/collection/components/float/lido-float.css +30 -30
- package/dist/collection/components/float/lido-float.js +2 -2
- package/dist/collection/components/home/lido-home.css +309 -309
- package/dist/collection/components/home/lido-home.js +5 -5
- package/dist/collection/components/image/lido-image.css +17 -17
- package/dist/collection/components/image/lido-image.js +6 -6
- package/dist/collection/components/keyboard/lido-keyboard.css +38 -38
- package/dist/collection/components/keyboard/lido-keyboard.js +3 -3
- package/dist/collection/components/mathMatrix/lido-math-matrix.css +56 -56
- package/dist/collection/components/mathMatrix/lido-math-matrix.js +1 -1
- package/dist/collection/components/position/lido-pos.css +16 -16
- package/dist/collection/components/position/lido-pos.js +2 -2
- package/dist/collection/components/random/lido-random.css +8 -8
- package/dist/collection/components/random/lido-random.js +2 -2
- package/dist/collection/components/root/lido-root.js +5 -5
- package/dist/collection/components/row/lido-row.css +10 -10
- package/dist/collection/components/row/lido-row.js +6 -6
- package/dist/collection/components/scale/assets/Shadow.svg +9 -9
- package/dist/collection/components/scale/lido-balance.css +174 -174
- package/dist/collection/components/scale/lido-balance.js +13 -13
- package/dist/collection/components/shape/lido-shape.css +216 -216
- package/dist/collection/components/shape/lido-shape.js +6 -6
- package/dist/collection/components/slideFill/lido-slide-fill.css +3 -3
- package/dist/collection/components/slideFill/lido-slide-fill.js +13 -13
- package/dist/collection/components/text/lido-text.css +53 -53
- package/dist/collection/components/text/lido-text.js +5 -5
- package/dist/collection/components/trace/assets/Tracing-hand.svg +8 -8
- package/dist/collection/components/trace/lido-trace.css +97 -97
- package/dist/collection/components/trace/lido-trace.js +7 -14
- package/dist/collection/components/wrap/lido-wrap.css +18 -18
- package/dist/collection/components/wrap/lido-wrap.js +6 -6
- package/dist/collection/css/animation.css +211 -211
- package/dist/collection/css/index.css +323 -323
- package/dist/collection/stories/Templates/Fill-Up/fill-up.stories.js +61 -61
- package/dist/collection/stories/Templates/LetterPairing/LetterPairing.stories.js +123 -123
- package/dist/collection/stories/Templates/RocketGame/rocketGame.stories.js +48 -48
- package/dist/collection/stories/Templates/Tag/tagGame.stories.js +39 -39
- package/dist/collection/stories/Templates/arrangeLetters/arrangeLetters.stories.js +44 -44
- package/dist/collection/stories/Templates/balancing/balancing.stories.js +35 -35
- package/dist/collection/stories/Templates/balloonPop/balloonPop.stories.js +38 -38
- package/dist/collection/stories/Templates/blender/blender.stories.js +59 -59
- package/dist/collection/stories/Templates/bubbleType/bubbleType.stories.js +42 -42
- package/dist/collection/stories/Templates/calculator/calculator.stories.js +28 -28
- package/dist/collection/stories/Templates/categorize/categorize.stories.js +37 -37
- package/dist/collection/stories/Templates/categorize2/categorize2.stories.js +67 -67
- package/dist/collection/stories/Templates/checker-block/checkerBlock.stories.js +29 -29
- package/dist/collection/stories/Templates/checkerBlock/checkerBlock.stories.js +13 -13
- package/dist/collection/stories/Templates/create-sentence/createSentence.stories.js +74 -74
- package/dist/collection/stories/Templates/dragAndDrop/drag-drop.stories.js +69 -69
- package/dist/collection/stories/Templates/fillAnswer/fill-answer.stories.js +43 -43
- package/dist/collection/stories/Templates/fillBlank/fill-blank.stories.js +282 -282
- package/dist/collection/stories/Templates/foodJar/food-jar.stories.js +35 -35
- package/dist/collection/stories/Templates/grid/grid.stories.js +118 -118
- package/dist/collection/stories/Templates/gridGame/grid-game.stories.js +57 -57
- package/dist/collection/stories/Templates/imageMatch/imageMatch.stories.js +44 -44
- package/dist/collection/stories/Templates/jumpSentence/jumpSentence.stories.js +41 -41
- package/dist/collection/stories/Templates/letterboard/letterboard.stories.js +183 -183
- package/dist/collection/stories/Templates/makeSentence/make-sentence.stories.js +36 -36
- package/dist/collection/stories/Templates/matchBox/matchBox.stories.js +69 -69
- package/dist/collection/stories/Templates/matchBox/matchBox2.stories.js +84 -84
- package/dist/collection/stories/Templates/matchingCard/matching-card.stories.js +31 -31
- package/dist/collection/stories/Templates/multipleOption/mcqWithQuestionImage.stories.js +112 -112
- package/dist/collection/stories/Templates/multipleOption/multiple-option.stories.js +47 -47
- package/dist/collection/stories/Templates/multiplyBeeds/multiplyBeeds.stories.js +57 -57
- package/dist/collection/stories/Templates/nimbleTable/nimbleTable.stories.js +53 -53
- package/dist/collection/stories/Templates/numberBoard/numberBoard.stories.js +46 -46
- package/dist/collection/stories/Templates/numberBoardTwo/numberBoardTwo.stories.js +45 -45
- package/dist/collection/stories/Templates/numberIdentification/numberIdentificationimageTotext.stories.js +56 -56
- package/dist/collection/stories/Templates/numberIdentification/numberIdentificationtextTotext.stories.js +53 -53
- package/dist/collection/stories/Templates/numberPair/numberPair.stories.js +127 -127
- package/dist/collection/stories/Templates/openwindow/openwindow.stories.js +47 -47
- package/dist/collection/stories/Templates/openwindow/openwindow2.stories.js +38 -38
- package/dist/collection/stories/Templates/order-tractor/order-tractor-ascending-order.stories.js +97 -97
- package/dist/collection/stories/Templates/order-tractor/order-tractor.stories.js +90 -90
- package/dist/collection/stories/Templates/palEgmaCalculateSum/palEgmaMultiOption.stories.js +63 -63
- package/dist/collection/stories/Templates/palEgmaCalculateSum/palEgmaSumTogether.stories.js +45 -45
- package/dist/collection/stories/Templates/palEgmaPatternMatching/palEgmaPatternMatching.stories.js +63 -63
- package/dist/collection/stories/Templates/palEgmaWordProblem/palEgmaWordProblem.stories.js +79 -79
- package/dist/collection/stories/Templates/palEgraInventedSpelling/pal_egra_invented_spelling_schema.stories.js +32 -32
- package/dist/collection/stories/Templates/palEgraMCQWithImage/palEgraMCQWithImage.stories.js +42 -42
- package/dist/collection/stories/Templates/palEgraOptionWithAudio/palEgraOptionWithAudio.stories.js +63 -63
- package/dist/collection/stories/Templates/palEgraStoryMaking/pal_egra_story_making.stories.js +44 -44
- package/dist/collection/stories/Templates/palEgraTemplate1/palEgraLetterIdentification.stories.js +34 -34
- package/dist/collection/stories/Templates/palEgraWordMatch/palEgraWordMatch.stories.js +52 -52
- package/dist/collection/stories/Templates/palEgra_OddOneOut/palEgra_oddOneOut.stories.js +33 -33
- package/dist/collection/stories/Templates/palEgra_arrange_pictures/palEgra_arrange_pictures.stories.js +40 -40
- package/dist/collection/stories/Templates/palEgra_build_word/palEgra_build_word.stories.js +48 -48
- package/dist/collection/stories/Templates/palEgra_word_formation/palEgra_WordFormation.stories.js +48 -48
- package/dist/collection/stories/Templates/palStorytale/palStorytale.stories.js +18 -18
- package/dist/collection/stories/Templates/phonic-tractor/phonic-tractor.stories.js +44 -44
- package/dist/collection/stories/Templates/pictureClues/pictureClues.stories.js +34 -34
- package/dist/collection/stories/Templates/pictureWordMatch/pictureWordMatch1.stories.js +36 -36
- package/dist/collection/stories/Templates/pictureWordMatch/pictureWordMatch2.stories.js +30 -30
- package/dist/collection/stories/Templates/picturemeaning/pictureMeaningCocos.stories.js +20 -20
- package/dist/collection/stories/Templates/puzzleGame/puzzleGame.stories.js +17 -17
- package/dist/collection/stories/Templates/questionBoard/questionBoard.stories.js +58 -58
- package/dist/collection/stories/Templates/quizLiteracy/quizLiteracy.stories.js +50 -50
- package/dist/collection/stories/Templates/quizLiteracy/quizLiteracyImageWithText.stories.js +36 -36
- package/dist/collection/stories/Templates/quizLiteracy/quizLiteracyImageWord.stories.js +43 -43
- package/dist/collection/stories/Templates/quizMaths/quizMaths.stories.js +631 -631
- package/dist/collection/stories/Templates/reorder/reorder.stories.js +63 -63
- package/dist/collection/stories/Templates/rowBlocks/rowBlocks.stories.js +47 -47
- package/dist/collection/stories/Templates/sentenceMatch/sentenceMatch.stories.js +29 -29
- package/dist/collection/stories/Templates/sequenceBox/sequenceBox1.stories.js +64 -64
- package/dist/collection/stories/Templates/sequenceBox/sequenceBox2.stories.js +62 -62
- package/dist/collection/stories/Templates/shapePair/shape-pair.stories.js +106 -106
- package/dist/collection/stories/Templates/shapeTractor/shape-tractor.stories.js +50 -50
- package/dist/collection/stories/Templates/spellDoor/spellDoor.stories.js +41 -41
- package/dist/collection/stories/Templates/storyTale/storyTale.stories.js +39 -39
- package/dist/collection/stories/Templates/substraction/substractionWithimg.stories.js +62 -62
- package/dist/collection/stories/Templates/substraction/substractionWithoutImg.stories.js +42 -42
- package/dist/collection/stories/Templates/sumTogether/sumTogether.stories.js +50 -50
- package/dist/collection/stories/Templates/tenBox/tenBox.stories.js +88 -88
- package/dist/collection/stories/Templates/total/total.stories.js +28 -28
- package/dist/collection/stories/Templates/wordBuilding/wordBuildingwithimg.stories.js +35 -35
- package/dist/collection/stories/Templates/wordBuilding/wordBuildingwithoutimg.stories.js +34 -34
- package/dist/collection/stories/Templates/writeCard/writeCard.stories.js +31 -31
- package/dist/collection/stories/Templates/writeLetter/writeLetter.stories.js +58 -58
- package/dist/collection/stories/Templates/writeNumber/writeNumber.stories.js +44 -44
- package/dist/collection/stories/Templates/writeSet/writeSet.stories.js +31 -31
- package/dist/collection/stories/Templates/writeWord/writeWord.stories.js +34 -34
- package/dist/collection/stories/components/flash-card.stories.js +48 -48
- package/dist/collection/stories/components/keyboard.stories.js +10 -10
- package/dist/collection/stories/components/slider.stories.js +4 -4
- package/dist/collection/stories/components/trace.stories.js +5 -5
- package/dist/collection/utils/audioPlayer.js +7 -4
- package/dist/collection/utils/utils.js +70 -14
- package/dist/collection/utils/utilsHandlers/clickHandler.js +4 -3
- package/dist/collection/utils/utilsHandlers/dragDropHandler.js +137 -28
- package/dist/collection/utils/utilsHandlers/highlightHandler.js +56 -56
- package/dist/collection/utils/utilsHandlers/slideHandler.js +17 -8
- package/dist/collection/utils/utilsHandlers/sortHandler.js +10 -10
- package/dist/components/index.js +1 -1
- package/dist/components/lido-avatar.js +1 -1
- package/dist/components/lido-balance.js +1 -1
- package/dist/components/lido-calculator.js +1 -1
- package/dist/components/lido-canvas.js +1 -1
- package/dist/components/lido-cell.js +1 -1
- package/dist/components/lido-col.js +1 -1
- package/dist/components/lido-container.js +1 -1
- package/dist/components/lido-flash-card.js +1 -1
- package/dist/components/lido-float.js +1 -1
- package/dist/components/lido-home.js +1 -1
- package/dist/components/lido-keyboard.js +1 -1
- package/dist/components/lido-math-matrix.js +1 -1
- package/dist/components/lido-pos.js +1 -1
- package/dist/components/lido-random.js +1 -1
- package/dist/components/lido-root.js +1 -1
- package/dist/components/lido-row.js +1 -1
- package/dist/components/lido-shape.js +1 -1
- package/dist/components/lido-slide-fill.js +1 -1
- package/dist/components/lido-text.js +1 -1
- package/dist/components/lido-trace.js +1 -1
- package/dist/components/lido-wrap.js +1 -1
- package/dist/components/p-B-mIxynb.js +1 -0
- package/dist/components/{p-DdQ1eqJr.js → p-B8nzzM8c.js} +1 -1
- package/dist/components/{p-D2GhaM-T.js → p-Bv1hunWk.js} +1 -1
- package/dist/components/{p-DDS30M3y.js → p-C-pHQRbp.js} +1 -1
- package/dist/components/{p-CPYnt0P-.js → p-C5WmmkI6.js} +1 -1
- package/dist/components/{p-useuhkjH.js → p-C70ykycD.js} +1 -1
- package/dist/components/{p-CFzvgrMa.js → p-CFPSty2U.js} +1 -1
- package/dist/components/p-CFWohOId.js +1 -0
- package/dist/components/{p-BfwUqpXc.js → p-CTlcpv4a.js} +1 -1
- package/dist/components/{p-CyGxEcn7.js → p-CXHPZN3m.js} +1 -1
- package/dist/components/{p-Bw-OC9iR.js → p-CgsPIpg0.js} +1 -1
- package/dist/components/{p-ChfVUoX4.js → p-CsDu4kiC.js} +1 -1
- package/dist/components/{p-CwDTdXe5.js → p-DG0KR2iN.js} +1 -1
- package/dist/components/p-DLyacZap.js +1 -0
- package/dist/components/{p-BiBt9LGP.js → p-DNo3iX_r.js} +1 -1
- package/dist/components/p-DONbWJGn.js +1 -0
- package/dist/components/p-DXy70SGv.js +1 -0
- package/dist/components/{p-CkxAm8rY.js → p-DfjbSSI2.js} +2 -2
- package/dist/components/{p-BJiyBHYT.js → p-Gwko4CTL.js} +1 -1
- package/dist/components/p-uuyVO2B1.js +1 -0
- package/dist/esm/{decode-DkSXjv7K.js → decode-CyhHNDvT.js} +1 -1
- package/dist/esm/{index-D9-TTsdZ.js → index-CndbFQ5I.js} +276 -98
- package/dist/esm/{index-Dvjbti-h.js → index-mMpK8062.js} +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/lido-avatar_22.entry.js +231 -59
- package/dist/esm/lido-player.js +2 -2
- package/dist/esm/loader.js +2 -2
- package/dist/lido-player/assets/Shadow.svg +9 -9
- package/dist/lido-player/assets/Tracing-hand.svg +8 -8
- package/dist/lido-player/index.esm.js +1 -1
- package/dist/lido-player/lido-avatar.css +4 -4
- package/dist/lido-player/lido-avatar.tsx +214 -207
- package/dist/lido-player/lido-player.css +7 -7
- package/dist/lido-player/lido-player.esm.js +1 -1
- package/dist/lido-player/p-77iyGppv.js +1 -0
- package/dist/lido-player/p-d760e67b.entry.js +12 -0
- package/dist/lido-player/{p-Dc8j8Hxw.js → p-etMb7U6W.js} +1 -1
- package/dist/lido-player/p-mMpK8062.js +2 -0
- package/dist/lido-player/readme.md +49 -49
- package/dist/types/components/container/lido-container.d.ts +4 -0
- package/dist/types/components/flashCard/lido-flash-card.d.ts +17 -0
- package/dist/types/types/json.d.ts +3 -3
- package/dist/types/utils/audioPlayer.d.ts +2 -1
- package/dist/types/utils/utils.d.ts +5 -1
- package/dist/types/utils/utilsHandlers/clickHandler.d.ts +1 -0
- package/dist/types/utils/utilsHandlers/slideHandler.d.ts +1 -1
- package/package.json +73 -74
- package/readme.md +113 -113
- package/dist/components/p-BUfCIPRa.js +0 -1
- package/dist/components/p-DP6jQ5ML.js +0 -1
- package/dist/components/p-DZRNZCPt.js +0 -1
- package/dist/components/p-DbR5sNOj.js +0 -1
- package/dist/components/p-leIEepjl.js +0 -1
- package/dist/components/p-u3czV7QM.js +0 -1
- package/dist/lido-player/p-35fa0b8b.entry.js +0 -12
- package/dist/lido-player/p-D2iINRNN.js +0 -1
- package/dist/lido-player/p-Dvjbti-h.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/)*
|
|
@@ -185,6 +185,10 @@ export declare class LidoContainer {
|
|
|
185
185
|
speakFlag: boolean;
|
|
186
186
|
private handleWindowResize;
|
|
187
187
|
private handleWindowLoad;
|
|
188
|
+
private writeCardArrowObserver?;
|
|
189
|
+
private isWriteCardContainer;
|
|
190
|
+
private syncWriteCardArrowHighlight;
|
|
191
|
+
private observeWriteCardArrow;
|
|
188
192
|
private cleanupInteractionHandlers;
|
|
189
193
|
languageChanged(newLang: string): void;
|
|
190
194
|
componentWillLoad(): void;
|
|
@@ -88,7 +88,18 @@ export declare class LidoFlash {
|
|
|
88
88
|
flipped: boolean;
|
|
89
89
|
autoFlipAfter: number;
|
|
90
90
|
private autoFlipTimer?;
|
|
91
|
+
private instructionStartTimer?;
|
|
92
|
+
private frontStartTimer?;
|
|
93
|
+
private narrationGraceTimer?;
|
|
94
|
+
private narrationTarget;
|
|
95
|
+
private narrationHandled;
|
|
96
|
+
private goodJobPlaybackId?;
|
|
97
|
+
private goodJobPlaybackContext?;
|
|
98
|
+
private static readonly narrationStartGrace;
|
|
91
99
|
private instructionDone;
|
|
100
|
+
private instructionStarted;
|
|
101
|
+
private onAudioStarted;
|
|
102
|
+
private onAudioPlaying;
|
|
92
103
|
private onAudioEnded;
|
|
93
104
|
/**
|
|
94
105
|
* CSS margin value applied to each child element inside the container.
|
|
@@ -119,7 +130,13 @@ export declare class LidoFlash {
|
|
|
119
130
|
private instructionText;
|
|
120
131
|
private frontText;
|
|
121
132
|
private backText;
|
|
133
|
+
private nextArrow;
|
|
134
|
+
private stopGoodJobGlow;
|
|
122
135
|
private speakFront;
|
|
136
|
+
private clearNarrationTimers;
|
|
137
|
+
private continueAfterNarration;
|
|
138
|
+
private finishNarration;
|
|
139
|
+
private startNarration;
|
|
123
140
|
private showArrow;
|
|
124
141
|
private setArrowVisible;
|
|
125
142
|
render(): any;
|
|
@@ -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
|
}
|
|
@@ -4,6 +4,7 @@ export declare class AudioPlayer {
|
|
|
4
4
|
private currentTargetElement;
|
|
5
5
|
private pendingReplayElement;
|
|
6
6
|
private playbackHasStarted;
|
|
7
|
+
private playbackSequence;
|
|
7
8
|
private highlightOverlay;
|
|
8
9
|
private wordRects;
|
|
9
10
|
private activeWordIndex;
|
|
@@ -24,7 +25,7 @@ export declare class AudioPlayer {
|
|
|
24
25
|
private handleVisibilityChange;
|
|
25
26
|
private resolveVisibilityWaiters;
|
|
26
27
|
private getLidoTextElement;
|
|
27
|
-
play(targetElement: HTMLElement, suppressHighlight?: boolean): any;
|
|
28
|
+
play(targetElement: HTMLElement, suppressHighlight?: boolean, playbackContext?: unknown): any;
|
|
28
29
|
private registerGlobalStopEvents;
|
|
29
30
|
private unregisterGlobalStopEvents;
|
|
30
31
|
private registerVisibilityEvents;
|
|
@@ -3,8 +3,11 @@ import type { LessonTrackingParams } from './customEvents';
|
|
|
3
3
|
export declare function buildDragSelectedMapFromDOM(): Record<string, string[]>;
|
|
4
4
|
export declare function getSortedValuesArrayFromMap(map: Record<string, string[]>): string[];
|
|
5
5
|
export declare function format(first?: string, middle?: string, last?: string): string;
|
|
6
|
+
type ActionExecutionOptions = {
|
|
7
|
+
visualOnly?: boolean;
|
|
8
|
+
};
|
|
6
9
|
export declare const initEventsForElement: (element: HTMLElement, type?: string) => Promise<void>;
|
|
7
|
-
export declare const executeActions: (actionsString: string, thisElement: HTMLElement, element?: HTMLElement) => Promise<void>;
|
|
10
|
+
export declare const executeActions: (actionsString: string, thisElement: HTMLElement, element?: HTMLElement, options?: ActionExecutionOptions) => Promise<void>;
|
|
8
11
|
export declare const matchStringPattern: (pattern: string, arr: string[]) => boolean;
|
|
9
12
|
export declare const countPatternWords: (pattern: string) => number;
|
|
10
13
|
export declare let countOfMistakes: number;
|
|
@@ -49,3 +52,4 @@ export declare const animateBoxCells: (element: HTMLElement, value: string) => P
|
|
|
49
52
|
export declare const questionBoxAnimation: (element: HTMLElement, value: string) => Promise<void>;
|
|
50
53
|
export declare const SumTogetherAnimation: (element: HTMLElement, value: string) => Promise<void>;
|
|
51
54
|
export declare const updateCalculatorAnswer: (el: HTMLElement) => void;
|
|
55
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
export declare const getSlideValuesForValidation: (container: HTMLElement, slideElements: HTMLElement[]) => string[];
|
|
1
2
|
export declare const slideAnimation: () => Promise<void>;
|
|
2
3
|
export declare function slidingWithScaling(element: HTMLElement): void;
|
|
3
|
-
export declare const getSlideValuesForValidation: (container: HTMLElement, slideElements: HTMLElement[]) => string[];
|
|
4
4
|
export declare const updateArrangeLettersCorrectness: (container: HTMLElement, slideValues: string[], objectiveValues: string[]) => void;
|
|
5
5
|
export declare const isArrangeLettersComplete: (slideValues: string[], objectiveString: string) => boolean;
|
|
6
6
|
export declare const updateReorderCorrectness: (container: HTMLElement, slideValues: string[], objectiveValues: string[]) => void;
|
package/package.json
CHANGED
|
@@ -1,74 +1,73 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "lido-player",
|
|
3
|
-
"version": "0.0.2-beta-
|
|
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
|
-
"
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
"
|
|
63
|
-
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"i18next": "^
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "lido-player",
|
|
3
|
+
"version": "0.0.2-beta-24-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
|
-
[](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
|
+
[](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{t,p as i,H as s,f as e,a,A as o,k as n,i as h,h as d,b as r}from"./index.js";const l=i(class extends s{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.instructionDone=!1,this.onAudioEnded=t=>{var i;const s=null===(i=t.detail)||void 0===i?void 0:i.target,a=this.instructionText();if(s&&(s===a||"lido-avatar"===s.id||this.el.contains(s)))if(s===this.instructionText())this.instructionDone=!0,window.setTimeout((()=>{this.speakFront()}),1200);else if(s===this.frontText()){if(this.flipped)return;this.autoFlipTimer&&window.clearTimeout(this.autoFlipTimer),this.autoFlipTimer=window.setTimeout((()=>{this.flipped||this.handleFlip()}),this.autoFlipAfter)}else s===this.backText()?this.flipped&&this.showArrow():"lido-avatar"===s.id&&e("this.avatarAnimate='Idle'",s)},this.margin="",this.disableSpeak=!1,this.style={},this.delayVisible="",this.updateStyles=()=>{const t=window.innerHeight>window.innerWidth?"portrait":"landscape";this.style={height:a(this.height,t)||"200px",width:a(this.width,t)||"200px",backgroundColor:a(this.bgColor,t),top:a(this.y,t),left:a(this.x,t),zIndex:this.z,display:this.visible?this.display?a(this.display,t):"inline-block":"none",flexDirection:this.direction?a(this.direction,t):void 0,margin:a(this.margin,t)}},this.handleFlip=()=>{var t;this.autoFlipTimer&&window.clearTimeout(this.autoFlipTimer),o.getI().stop();const i=!this.flipped;if(this.flipped=!this.flipped,this.setArrowVisible(!1),i){const i=this.backText();i&&(null===(t=i.textContent)||void 0===t?void 0:t.trim())?e("this.speak='true'",i):this.showArrow()}else this.speakFront()},this.instructionText=()=>{var t;return document.getElementById((null===(t=this.el.closest("lido-container"))||void 0===t?void 0:t.getAttribute("template-id"))||"")},this.frontText=()=>this.el.querySelector(".card-front lido-text"),this.backText=()=>this.el.querySelector(".card-back lido-text"),this.speakFront=()=>{var t;const i=this.frontText();this.instructionDone&&!this.flipped&&i&&(null===(t=i.textContent)||void 0===t?void 0:t.trim())&&e("this.speak='true'",i)},this.showArrow=()=>{if(!this.flipped)return;const t=document.getElementById("arrow");if(!t)return;t.getAttribute("onTouch")||t.setAttribute("onTouch","this.nextBtn='true';");const i=document.getElementById("lido-avatar"),s=t.getAttribute("audio");i&&s&&(i.setAttribute("audio",s),t.removeAttribute("audio")),this.setArrowVisible(!0),i&&(e("this.avatarAnimate='Idle speak'",i),o.getI().play(i,!0))},this.setArrowVisible=t=>{const i=document.getElementById("arrow");if(!i)return;i.visible=t,i.setAttribute("visible",String(t)),i.style.display=t?"block":"none",i.style.visibility=t?"visible":"hidden",i.style.opacity=t?"1":"0";const s=i.querySelector("lido-image");s&&(s.style.display=t?"flex":"none",s.style.visibility=t?"visible":"hidden",s.style.opacity=t?"1":"0"),"function"==typeof i.updateStyles&&i.updateStyles()}}handleFlippedChange(){}componentWillLoad(){this.updateStyles(),window.addEventListener("resize",this.updateStyles),window.addEventListener("load",this.updateStyles)}componentDidLoad(){n(this.el,this.delayVisible),h(this.el,this.type),window.addEventListener("lidoAudioEnded",this.onAudioEnded)}disconnectedCallback(){window.removeEventListener("lidoAudioEnded",this.onAudioEnded),this.autoFlipTimer&&window.clearTimeout(this.autoFlipTimer),window.removeEventListener("resize",this.updateStyles),window.removeEventListener("load",this.updateStyles)}render(){return d(r,{key:"8d65b494352e0c0aefb3815c87a798967ccb65aa",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:this.handleFlip,"disable-speak":this.disableSpeak},d("div",{key:"db3d4fce4f9f54437485ab1274b1f9bd3b3486bc",class:"card "+(this.flipped?"flipped":"")},d("div",{key:"d37770b0b08eac533265d7f8049c598df047aa37",class:"card-face card-front"},null!=this.front?this.front:d("slot",{name:"front"})),d("div",{key:"2f8431017cfed9f9adb679442be833a65704d41e",class:"card-face card-back"},null!=this.back?this.back:d("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}@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(t(i))||customElements.define(t(i),l))}))}c();export{l as L,c as d}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t,p as a,H as i,k as r,i as e,a as o,h,b as s}from"./index.js";const d=a(class extends i{constructor(t){super(),!1!==t&&this.__registerHost(),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.shapeType="circle",this.visible=!1,this.audio="",this.onTouch="",this.onInCorrect="",this.onCorrect="",this.onEntry="",this.minDrops=1,this.maxDrops=1,this.margin="",this.delayVisible="",this.disableSpeak=!1,this.style={}}componentDidLoad(){r(this.el,this.delayVisible),e(this.el,this.type),this.updateStyles(),this.lido3DShapes()}updateStyles(){const t=window.innerHeight>window.innerWidth?"portrait":"landscape";this.style={x:o(`${this.x}`,t),y:o(`${this.y}`,t),height:o(`${this.height}`,t),width:o(`${this.width}`,t)}}lido3DShapes(){const t=window.innerHeight>window.innerWidth?"portrait":"landscape";"lido-cube"===this.shapeType&&this.el.querySelectorAll(".face").forEach((a=>{const i=a;i.style.setProperty("--face-width",o(`${this.width}`,t));const r=parseInt(o(`${this.width}`,t))/2;i.style.setProperty("--face-translate",`${r}px`),i.style.setProperty("--face-bg-color",this.bgColor)}))}render(){return h(s,{key:"90b323eacac8b702168f612f79000da757109ec1",class:`lido-shape ${this.shapeType}`,value:this.value,type:this.type,"tab-index":this.tabIndex,style:{height:"polygon"!==this.shapeType?this.style.height:void 0,width:"polygon"!==this.shapeType?this.style.width:void 0,top:this.style.y,left:this.style.x,display:this.visible?"block":"none",zIndex:this.z,backgroundColor:"polygon"!==this.shapeType?this.bgColor:"transparent",margin:this.margin},"aria-label":this.ariaLabel,"aria-hidden":this.ariaHidden,audio:this.audio,minDrops:this.minDrops,maxDrops:this.maxDrops,onTouch:this.onTouch,onCorrect:this.onCorrect,onInCorrect:this.onInCorrect,onEntry:this.onEntry,"disable-speak":this.disableSpeak},"lido-cube"===this.shapeType&&h("div",{key:"16b4a96f302cd6b1c80023a29253e85fe0937622",class:"cube"},h("div",{key:"9ce4dfa0021b463aa5dba4c0651d144f844c2db0",class:"face top"}),h("div",{key:"f10410ef05cbde0a024ccbdbfb4fb7099c1bd9d3",class:"face bottom"}),h("div",{key:"2a08b1857613efd1db596d72a9324ac5b3379628",class:"face left"}),h("div",{key:"4922b4b63dc9538e68d143109bfa12782382ee48",class:"face right"}),h("div",{key:"983bc6815a3b5e6023d76394e0bdeb12c493b771",class:"face front"}),h("div",{key:"eab0224f427b8a345d3c3285d8d2828b39871eaa",class:"face back"})))}get el(){return this}static get style(){return".lido-shape{position:absolute;top:var(--y);left:var(--x);display:var(--display);z-index:var(--z);justify-content:center;align-items:center}.lido-rectangle{border-radius:0}.lido-circle{width:var(--width);height:var(--width);border-radius:50%;background-color:var(--bgColor)}.lido-ellipse{width:var(--width);height:var(--height);border-radius:50%;background-color:var(--bgColor)}.lido-triangle{width:var(--triangleWidth);height:var(--triangleHeight);background-color:var(--bgColor);clip-path:polygon(50% 0%, 100% 100%, 0% 100%)}.lido-rightTriangle{width:var(--triangleWidth);height:var(--triangleHeight);background-color:var(--bgColor);clip-path:polygon(100% 0%, 100% 100%, 0% 100%)}.lido-leftTriangle{width:var(--triangleWidth);height:var(--triangleHeight);background-color:var(--triangleBgColor);clip-path:polygon(0% 0%, 100% 100%, 0% 100%)}.lido-parallelogram{width:var(--paralleWidth);height:var(--paralleHeight);transform:skew(20deg)}.lido-trapezium{width:var(--trapeziumWidth);height:var(--trapeziumHeight);background-color:var(--bgColor);clip-path:polygon( 20% 0%, 80% 0%, 100% 100%, 0% 100% )}.lido-hexagon{width:var(--hexagonWidth);height:var(--hexagonHeight);background-color:var(--bgColor);clip-path:polygon( 25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50% )}.lido-cone{width:var(--coneWidth);height:var(--coneHeight);background-color:var(--bgColor);clip-path:polygon( 15% 10%, 25% 4%, 35% 1%, 50% 0%, 65% 1%, 75% 4%, 85% 10%, 50% 100% )}.lido-star{width:var(--starWidth);height:var(--starHeight);background-color:var(--starBgColor);clip-path:polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%)}.lido-pentagon{width:var(--pentagonWidth);height:var(--pentagonHeight);background-color:var(--pentagonBgColor);clip-path:polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%)}.lido-heptagon{width:var(--heptagonWidth);height:var(--heptagonHeight);background-color:var(--heptagonBgColor);clip-path:polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%)}.lido-octagon{width:var(--octagonWidth);height:var(--octagonHeight);background-color:var(--octagonBgColor);clip-path:polygon(25% 0%, 75% 0%, 100% 25%, 100% 75%, 75% 100%, 25% 100%, 0% 75%, 0% 25%)}.lido-rhombus{width:var(--rhombusWidth);height:var(--rhombusHeight);background-color:var(--rhombusBgColor);clip-path:polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)}.lido-heart{height:var(--heartHeight);width:var(--heartWidth);border-image:radial-gradient(var(--heartBgColor) 69%, #0000 70%) 84.5%/50%;clip-path:polygon(-41% 0, 50% 91%, 141% 0)}.cube{width:100%;height:100%;position:relative;transform-style:preserve-3d;transform:rotateX(-20deg) rotateY(45deg)}.face{position:absolute;width:var(--face-width,150px);height:var(--face-width,150px);background:var(--face-bg-color,150px);box-shadow:inset -20px -20px 40px rgba(0,0,0,0.3)}.front{transform:rotateY( 0deg) translateZ(var(--face-translate, 75px))}.back{transform:rotateY(180deg) translateZ(var(--face-translate, 75px))}.right{transform:rotateY( 90deg) translateZ(var(--face-translate, 75px))}.left{transform:rotateY(-90deg) translateZ(var(--face-translate, 75px))}.top{transform:rotateX( 90deg) translateZ(var(--face-translate, 75px))}.bottom{transform:rotateX(-90deg) translateZ(var(--face-translate, 75px))}.lido-cylinder{width:var(--width);height:var(--height);border-radius:100% / 80px;background:radial-gradient(50% 40px at 50% 40px, #0003 99.99%, #0000 0), radial-gradient(50% 40px at 50% calc(100% - 40px), #fff3 99.99%, #0000 0), red}.lido-sphere{position:relative;width:var(--width);height:var(--width);border-radius:50%;background:radial-gradient(circle at 30% 18%, #22d4ff 0%, #18c2f4 9%, rgba(24, 194, 244, 0.2) 18%, transparent 30%), radial-gradient(circle at 36% 26%, #0f8fff 0%, #0b67e6 30%, #083fbe 62%, #120084 100%);box-shadow:inset -22px -26px 40px rgba(5, 0, 70, 0.38), inset 14px 14px 24px rgba(255, 255, 255, 0.05), 0 4px 2px rgba(0, 0, 0, 0.78);overflow:visible}.lido-sphere::after{content:'';position:absolute;top:50%;left:50%;width:100%;height:16%;border-radius:50%;border-top:2px dashed rgba(0, 0, 0, 0.65);border-bottom:3px solid rgba(0, 0, 0, 0.85);box-sizing:border-box;transform:translate(-50%, -50%);pointer-events:none}"}},[0,"lido-shape",{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"],shapeType:[1,"shape-type"],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],delayVisible:[1,"delay-visible"],disableSpeak:[4,"disable-speak"],style:[32]}]);function l(){"undefined"!=typeof customElements&&["lido-shape"].forEach((a=>{"lido-shape"===a&&(customElements.get(t(a))||customElements.define(t(a),d))}))}l();export{d as L,l as d}
|