lido-player 0.0.2-alpha-53-dev → 0.0.2-alpha-56-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 (99) hide show
  1. package/dist/cjs/index.cjs.js +1 -1
  2. package/dist/cjs/lido-avatar_22.cjs.entry.js +141 -23
  3. package/dist/cjs/lido-player.cjs.js +1 -1
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/{utils-3c1ce74e.js → utils-a61cfc6b.js} +41 -12
  6. package/dist/collection/components/calculator/lido-calculator.js +4 -2
  7. package/dist/collection/components/home/lido-home.js +35 -6
  8. package/dist/collection/components/mathMatrix/lido-math-matrix.js +8 -6
  9. package/dist/collection/components/shape/lido-shape.css +90 -0
  10. package/dist/collection/components/shape/lido-shape.js +41 -6
  11. package/dist/collection/components/slideFill/lido-slide-fill.js +1 -1
  12. package/dist/collection/components/text/lido-text.js +26 -1
  13. package/dist/collection/components/trace/lido-trace.js +57 -4
  14. package/dist/collection/components/wrap/lido-wrap.js +1 -1
  15. package/dist/collection/stories/Templates/balancing/balancing.stories.js +1 -1
  16. package/dist/collection/stories/Templates/balloonPop/balloonPop.stories.js +2 -2
  17. package/dist/collection/stories/Templates/blender/blender.stories.js +3 -3
  18. package/dist/collection/stories/Templates/checker-block/checkerBlock.stories.js +6 -4
  19. package/dist/collection/stories/Templates/fillAnswer/fill-answer.stories.js +38 -32
  20. package/dist/collection/stories/Templates/multiplyBeeds/multiplyBeeds.stories.js +2 -2
  21. package/dist/collection/stories/Templates/numberBoardTwo/numberBoardTwo.stories.js +68 -60
  22. package/dist/collection/stories/Templates/questionBoard/questionBoard.stories.js +6 -5
  23. package/dist/collection/stories/Templates/quizMaths/quizMaths.stories.js +991 -0
  24. package/dist/collection/stories/Templates/sumTogether/sumTogether.stories.js +8 -8
  25. package/dist/collection/stories/Templates/tenBox/tenBox.stories.js +144 -0
  26. package/dist/collection/stories/Templates/writeNumber/writeNumber.stories.js +8 -4
  27. package/dist/collection/utils/constants.js +2 -0
  28. package/dist/collection/utils/customEvents.js +1 -0
  29. package/dist/collection/utils/utils.js +7 -1
  30. package/dist/collection/utils/utilsHandlers/animationHandler.js +21 -1
  31. package/dist/collection/utils/utilsHandlers/clickHandler.js +1 -1
  32. package/dist/collection/utils/utilsHandlers/dragDropHandler.js +4 -3
  33. package/dist/collection/utils/utilsHandlers/lidoBalanceHandler.js +4 -5
  34. package/dist/components/index.js +1 -1
  35. package/dist/components/lido-avatar.js +1 -1
  36. package/dist/components/lido-balance.js +1 -1
  37. package/dist/components/lido-calculator.js +1 -1
  38. package/dist/components/lido-canvas.js +1 -1
  39. package/dist/components/lido-cell.js +1 -1
  40. package/dist/components/lido-col.js +1 -1
  41. package/dist/components/lido-container.js +1 -1
  42. package/dist/components/lido-flash-card.js +1 -1
  43. package/dist/components/lido-float.js +1 -1
  44. package/dist/components/lido-home.js +1 -1
  45. package/dist/components/lido-image.js +1 -1
  46. package/dist/components/lido-keyboard.js +1 -1
  47. package/dist/components/lido-math-matrix.js +1 -1
  48. package/dist/components/lido-pos.js +1 -1
  49. package/dist/components/lido-random.js +1 -1
  50. package/dist/components/lido-root.js +22 -22
  51. package/dist/components/lido-row.js +1 -1
  52. package/dist/components/lido-shape.js +1 -1
  53. package/dist/components/lido-slide-fill.js +1 -1
  54. package/dist/components/lido-text.js +1 -1
  55. package/dist/components/lido-trace.js +1 -1
  56. package/dist/components/lido-wrap.js +1 -1
  57. package/dist/components/{p-511377d2.js → p-0712a27e.js} +39 -13
  58. package/dist/components/{p-df1af62c.js → p-0a41b2f8.js} +1 -1
  59. package/dist/components/{p-d568d595.js → p-17f84b2f.js} +1 -1
  60. package/dist/components/{p-09b3b152.js → p-21852d55.js} +1 -1
  61. package/dist/components/{p-561908ec.js → p-2829c82c.js} +1 -1
  62. package/dist/components/{p-71ded596.js → p-330caab8.js} +2 -2
  63. package/dist/components/{p-8774f517.js → p-480f708a.js} +1 -1
  64. package/dist/components/{p-cca545f9.js → p-4d332eab.js} +1 -1
  65. package/dist/components/{p-92b9ae9e.js → p-4e041807.js} +2 -2
  66. package/dist/components/{p-b3e67e7f.js → p-7ab0a273.js} +26 -2
  67. package/dist/components/{p-567983a9.js → p-882b291d.js} +2 -2
  68. package/dist/components/{p-875c1411.js → p-9104d427.js} +1 -1
  69. package/dist/components/{p-3e8ae1c5.js → p-b9875116.js} +57 -4
  70. package/dist/components/{p-004adc43.js → p-c4739621.js} +6 -4
  71. package/dist/components/p-cca36777.js +128 -0
  72. package/dist/components/{p-9ea1a67d.js → p-d1b5079b.js} +1 -1
  73. package/dist/components/{p-057fb7b8.js → p-e1ba0c44.js} +38 -26
  74. package/dist/components/{p-3f0e4436.js → p-eab0ebb7.js} +1 -1
  75. package/dist/components/{p-90f7dd48.js → p-f2b53e8e.js} +2 -2
  76. package/dist/components/{p-d2fe2bb6.js → p-f3bc4577.js} +1 -1
  77. package/dist/components/{p-6beee44b.js → p-ff801ba1.js} +1 -1
  78. package/dist/components/{p-23549651.js → p-ffc40642.js} +7 -5
  79. package/dist/esm/index.js +1 -1
  80. package/dist/esm/lido-avatar_22.entry.js +141 -23
  81. package/dist/esm/lido-player.js +1 -1
  82. package/dist/esm/loader.js +1 -1
  83. package/dist/esm/{utils-eefe4a1c.js → utils-7ed76799.js} +39 -13
  84. package/dist/lido-player/index.esm.js +1 -1
  85. package/dist/lido-player/lido-player.esm.js +1 -1
  86. package/dist/lido-player/{p-589fc3b8.js → p-17d93181.js} +2 -2
  87. package/dist/lido-player/p-fa9dfdf8.entry.js +1 -0
  88. package/dist/types/components/home/lido-home.d.ts +3 -0
  89. package/dist/types/components/shape/lido-shape.d.ts +8 -2
  90. package/dist/types/components/text/lido-text.d.ts +1 -0
  91. package/dist/types/components/trace/lido-trace.d.ts +2 -1
  92. package/dist/types/components.d.ts +2 -0
  93. package/dist/types/stories/Templates/fillAnswer/fill-answer.stories.d.ts +1 -1
  94. package/dist/types/stories/Templates/quizMaths/quizMaths.stories.d.ts +16 -0
  95. package/dist/types/stories/Templates/tenBox/tenBox.stories.d.ts +4 -0
  96. package/dist/types/utils/constants.d.ts +2 -0
  97. package/package.json +1 -1
  98. package/dist/components/p-0733b277.js +0 -100
  99. package/dist/lido-player/p-4d9ad047.entry.js +0 -1
@@ -6,6 +6,7 @@
6
6
  * and displays progress indicators (dots) for each container.
7
7
  */
8
8
  export declare class LidoHome {
9
+ commonAudioPath?: string;
9
10
  /** Boolean to show or hide navigation buttons */
10
11
  showNav: boolean;
11
12
  /** Array of active container indexes to be rendered */
@@ -92,6 +93,7 @@ export declare class LidoHome {
92
93
  */
93
94
  NextContainerKey: (index?: number | undefined) => void;
94
95
  PrevContainerKey: (index?: number | undefined) => void;
96
+ onCommonAudioPathChange(path: string): void;
95
97
  /**
96
98
  * Lifecycle method that runs before the component is loaded. It sets up event listeners for transitioning
97
99
  * between containers and parses the XML data into containers.
@@ -99,6 +101,7 @@ export declare class LidoHome {
99
101
  componentWillLoad(): void;
100
102
  showDotsandbtn: boolean;
101
103
  componentDidLoad(): void;
104
+ private publishCommonAudioPath;
102
105
  private handleIcons;
103
106
  updateBackgroundImage(): void;
104
107
  /**
@@ -107,13 +107,19 @@ export declare class LidoShape {
107
107
  */
108
108
  delayVisible: string;
109
109
  /**
110
- * When set to true, disables the speak functionality of long press for this component and its children.
111
- */
110
+ * When set to true, disables the speak functionality of long press for this component and its children.
111
+ */
112
112
  disableSpeak: boolean;
113
+ /** Holds dynamically generated inline styles for the container */
114
+ style: {
115
+ [key: string]: string | undefined;
116
+ };
113
117
  /**
114
118
  * Lifecycle hook that runs after the component is loaded into the DOM.
115
119
  * It initializes custom events based on the `type` of the shape component.
116
120
  */
117
121
  componentDidLoad(): void;
122
+ updateStyles(): void;
123
+ lido3DShapes(): void;
118
124
  render(): any;
119
125
  }
@@ -157,6 +157,7 @@ export declare class LidoText {
157
157
  * It initializes custom events based on the `type` of the text component.
158
158
  */
159
159
  componentDidLoad(): void;
160
+ private resolveAutoAudio;
160
161
  /**
161
162
  * Lifecycle method that runs before the component is rendered.
162
163
  * Initializes styles and sets up event listeners for resize and load events.
@@ -146,7 +146,8 @@ export declare class LidoTrace {
146
146
  setupDrawingPath(state: any): void;
147
147
  setupDraggableCircle(state: any): void;
148
148
  addEventListeners(state: any): void;
149
- handlePointerMove(state: any): void;
149
+ handlePointerMove(state: any): Promise<void>;
150
+ private animatePathToEnd;
150
151
  moveToNextContainer(): Promise<void>;
151
152
  getPointerPosition(evt: PointerEvent, svg: SVGSVGElement): DOMPoint | {
152
153
  x: number;
@@ -820,6 +820,7 @@ export namespace Components {
820
820
  * Boolean that controls the playability of the game.
821
821
  */
822
822
  "canplay": boolean;
823
+ "commonAudioPath"?: string;
823
824
  /**
824
825
  * Custom URL for the Exit button icon. Falls back to the default icon if not provided or invalid.
825
826
  */
@@ -3149,6 +3150,7 @@ declare namespace LocalJSX {
3149
3150
  * Boolean that controls the playability of the game.
3150
3151
  */
3151
3152
  "canplay"?: boolean;
3153
+ "commonAudioPath"?: string;
3152
3154
  /**
3153
3155
  * Custom URL for the Exit button icon. Falls back to the default icon if not provided or invalid.
3154
3156
  */
@@ -1,4 +1,4 @@
1
1
  import { Meta, StoryObj } from '@storybook/web-components';
2
2
  declare const meta: Meta;
3
3
  export default meta;
4
- export declare const OrderTractor: StoryObj;
4
+ export declare const FillAnswer: StoryObj;
@@ -0,0 +1,16 @@
1
+ import { Meta, StoryObj } from '@storybook/web-components';
2
+ declare const meta: Meta;
3
+ export default meta;
4
+ export declare const operationsWithObjects: StoryObj;
5
+ export declare const operationsWithoutObjects: StoryObj;
6
+ export declare const biggerAndSmaller: StoryObj;
7
+ export declare const biggestAndSmallest: StoryObj;
8
+ export declare const Shapes: StoryObj;
9
+ export declare const how_many: StoryObj;
10
+ export declare const number_identification: StoryObj;
11
+ export declare const word_problem: StoryObj;
12
+ export declare const operations_drag: StoryObj;
13
+ export declare const recognize_number: StoryObj;
14
+ export declare const missing_number_drag: StoryObj;
15
+ export declare const custom_number_magnitudes: StoryObj;
16
+ export declare const Shapes1: StoryObj;
@@ -0,0 +1,4 @@
1
+ import { Meta, StoryObj } from '@storybook/web-components';
2
+ declare const meta: Meta;
3
+ export default meta;
4
+ export declare const TenBoxTemplate: StoryObj;
@@ -17,6 +17,8 @@ export declare const DropToAttr = "drop-to";
17
17
  export declare const DropTimeAttr = "drop-time";
18
18
  export declare const LidoContainer = "lido-container";
19
19
  export declare const LangChangeEvent = "languageChanged";
20
+ export declare const LIDO_COMMON_AUDIO_PATH = "__LIDO_COMMON_AUDIO_PATH__";
21
+ export declare const LIDO_COMMON_AUDIO_READY_EVENT = "lidoCommonAudioPathReady";
20
22
  export declare enum TraceMode {
21
23
  NoFlow = "noFlow",
22
24
  ShowFlow = "showFlow",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lido-player",
3
- "version": "0.0.2-alpha-53-dev",
3
+ "version": "0.0.2-alpha-56-dev",
4
4
  "description": "Stencil Component For Lido Player",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -1,100 +0,0 @@
1
- import { p as proxyCustomElement, H, d as setVisibilityWithDelay, i as initEventsForElement, h, j as Host } from './p-511377d2.js';
2
-
3
- const lidoShapeCss = ".lido-shape{position:absolute;top:var(--y);left:var(--x);display:var(--display);z-index:var(--z)}.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-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)}";
4
- const LidoShapeStyle0 = lidoShapeCss;
5
-
6
- const LidoShape = /*@__PURE__*/ proxyCustomElement(class LidoShape extends H {
7
- constructor() {
8
- super();
9
- this.__registerHost();
10
- this.id = '';
11
- this.value = '';
12
- this.height = 'auto';
13
- this.width = 'auto';
14
- this.ariaLabel = '';
15
- this.ariaHidden = '';
16
- this.x = '0px';
17
- this.y = '0px';
18
- this.z = '0';
19
- this.bgColor = '';
20
- this.type = '';
21
- this.tabIndex = 0;
22
- this.shapeType = 'circle';
23
- this.visible = false;
24
- this.audio = '';
25
- this.onTouch = '';
26
- this.onInCorrect = '';
27
- this.onCorrect = '';
28
- this.onEntry = '';
29
- this.minDrops = 1;
30
- this.maxDrops = 1;
31
- this.margin = '';
32
- this.delayVisible = '';
33
- this.disableSpeak = false;
34
- }
35
- /**
36
- * Lifecycle hook that runs after the component is loaded into the DOM.
37
- * It initializes custom events based on the `type` of the shape component.
38
- */
39
- componentDidLoad() {
40
- setVisibilityWithDelay(this.el, this.delayVisible);
41
- initEventsForElement(this.el, this.type);
42
- }
43
- render() {
44
- // Inline styles to position and size the shape component
45
- const style = {
46
- height: this.shapeType !== 'polygon' ? this.height : undefined, // Set height unless it's a polygon
47
- width: this.shapeType !== 'polygon' ? this.width : undefined, // Set width unless it's a polygon
48
- top: this.y,
49
- left: this.x,
50
- display: this.visible ? 'block' : 'none', // Toggle visibility
51
- zIndex: this.z,
52
- backgroundColor: this.shapeType !== 'polygon' ? this.bgColor : 'transparent', // Apply background only if not a polygon
53
- margin: this.margin,
54
- };
55
- return (h(Host, { key: '7a626d9f00854cf190c08524153086d0e9f139af', class: `lido-shape ${this.shapeType}`, value: this.value, type: this.type, "tab-index": this.tabIndex, style: style, "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 }));
56
- }
57
- get el() { return this; }
58
- static get style() { return LidoShapeStyle0; }
59
- }, [0, "lido-shape", {
60
- "id": [1],
61
- "value": [1],
62
- "height": [1],
63
- "width": [1],
64
- "ariaLabel": [1, "aria-label"],
65
- "ariaHidden": [1, "aria-hidden"],
66
- "x": [1],
67
- "y": [1],
68
- "z": [1],
69
- "bgColor": [1, "bg-color"],
70
- "type": [1],
71
- "tabIndex": [2, "tab-index"],
72
- "shapeType": [1, "shape-type"],
73
- "visible": [4],
74
- "audio": [1],
75
- "onTouch": [1, "on-touch"],
76
- "onInCorrect": [1, "on-in-correct"],
77
- "onCorrect": [1, "on-correct"],
78
- "onEntry": [1, "on-entry"],
79
- "minDrops": [2, "min-drops"],
80
- "maxDrops": [2, "max-drops"],
81
- "margin": [1],
82
- "delayVisible": [1, "delay-visible"],
83
- "disableSpeak": [4, "disable-speak"]
84
- }]);
85
- function defineCustomElement() {
86
- if (typeof customElements === "undefined") {
87
- return;
88
- }
89
- const components = ["lido-shape"];
90
- components.forEach(tagName => { switch (tagName) {
91
- case "lido-shape":
92
- if (!customElements.get(tagName)) {
93
- customElements.define(tagName, LidoShape);
94
- }
95
- break;
96
- } });
97
- }
98
- defineCustomElement();
99
-
100
- export { LidoShape as L, defineCustomElement as d };