lido-player 0.0.2-alpha-49 → 0.0.2-alpha-43-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 (159) hide show
  1. package/dist/cjs/{index-fe562525.js → index-6a69c33a.js} +36 -3
  2. package/dist/cjs/index.cjs.js +2 -2
  3. package/dist/cjs/{lido-avatar_19.cjs.entry.js → lido-avatar_21.cjs.entry.js} +431 -180
  4. package/dist/cjs/lido-player.cjs.js +2 -2
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/{utils-96ce5641.js → utils-079a5e7d.js} +1032 -165
  7. package/dist/collection/collection-manifest.json +2 -0
  8. package/dist/collection/components/calculator/lido-calculator.css +87 -0
  9. package/dist/collection/components/calculator/lido-calculator.js +321 -0
  10. package/dist/collection/components/cell/lido-cell.js +1 -1
  11. package/dist/collection/components/column/lido-col.js +1 -1
  12. package/dist/collection/components/container/lido-container.js +20 -1
  13. package/dist/collection/components/flashCard/lido-flash-card.js +1 -1
  14. package/dist/collection/components/float/lido-float.js +1 -1
  15. package/dist/collection/components/home/lido-home.js +9 -29
  16. package/dist/collection/components/keyboard/lido-keyboard.js +2 -2
  17. package/dist/collection/components/mathMatrix/lido-math-matrix.css +10 -2
  18. package/dist/collection/components/mathMatrix/lido-math-matrix.js +226 -20
  19. package/dist/collection/components/position/lido-pos.js +1 -1
  20. package/dist/collection/components/random/lido-random.js +1 -1
  21. package/dist/collection/components/row/lido-row.js +1 -1
  22. package/dist/collection/components/scale/lido-balance.css +114 -0
  23. package/dist/collection/components/scale/lido-balance.js +549 -0
  24. package/dist/collection/components/shape/lido-shape.js +1 -1
  25. package/dist/collection/components/slideFill/lido-slide-fill.js +1 -1
  26. package/dist/collection/components/text/lido-text.js +1 -1
  27. package/dist/collection/components/trace/lido-trace.js +49 -128
  28. package/dist/collection/components/wrap/lido-wrap.js +1 -1
  29. package/dist/collection/css/animation.css +21 -0
  30. package/dist/collection/css/index.css +45 -0
  31. package/dist/collection/stories/Templates/Fill-Up/fill-up.stories.js +24 -25
  32. package/dist/collection/stories/Templates/RocketGame/rocketGame.stories.js +0 -3
  33. package/dist/collection/stories/Templates/balancing/balancing.stories.js +67 -0
  34. package/dist/collection/stories/Templates/checker-block/checkerBlock.stories.js +156 -0
  35. package/dist/collection/stories/Templates/checkerBlock/checkerBlock.stories.js +49 -0
  36. package/dist/collection/stories/Templates/fillAnswer/fill-answer.stories.js +66 -0
  37. package/dist/collection/stories/Templates/foodJar/food-jar.stories.js +65 -0
  38. package/dist/collection/stories/Templates/matchBox/matchBox.stories.js +105 -0
  39. package/dist/collection/stories/Templates/matchBox/matchBox2.stories.js +92 -0
  40. package/dist/collection/stories/Templates/matchingCard/matching-card.stories.js +47 -0
  41. package/dist/collection/stories/Templates/multiplyBeeds/multiplyBeeds.stories.js +59 -0
  42. package/dist/collection/stories/Templates/nimbleTable/nimbleTable.stories.js +93 -0
  43. package/dist/collection/stories/Templates/numberBoardTwo/numberBoardTwo.stories.js +100 -0
  44. package/dist/collection/stories/Templates/numberPair/numberPair.stories.js +212 -0
  45. package/dist/collection/stories/Templates/order-tractor/order-tractor-ascending-order.stories.js +6 -7
  46. package/dist/collection/stories/Templates/order-tractor/order-tractor.stories.js +6 -7
  47. package/dist/collection/stories/Templates/questionBoard/questionBoard.stories.js +158 -0
  48. package/dist/collection/stories/Templates/sequenceBox/sequenceBox1.stories.js +102 -0
  49. package/dist/collection/stories/Templates/sequenceBox/sequenceBox2.stories.js +94 -0
  50. package/dist/collection/stories/Templates/shapePair/shape-pair.stories.js +184 -0
  51. package/dist/collection/stories/Templates/shapeTractor/shape-tractor.stories.js +213 -0
  52. package/dist/collection/stories/Templates/sumTogether/sumTogether.stories.js +109 -0
  53. package/dist/collection/stories/Templates/total/total.stories.js +59 -0
  54. package/dist/collection/stories/Templates/writeNumber/writeNumber.stories.js +96 -0
  55. package/dist/collection/stories/Templates/writeSet/writeSet.stories.js +55 -0
  56. package/dist/collection/stories/Templates/writeWord/writeWord.stories.js +5 -6
  57. package/dist/collection/utils/utils.js +439 -81
  58. package/dist/collection/utils/utilsHandlers/clickHandler.js +21 -25
  59. package/dist/collection/utils/utilsHandlers/dragDropHandler.js +95 -42
  60. package/dist/collection/utils/utilsHandlers/lidoBalanceHandler.js +67 -0
  61. package/dist/collection/utils/utilsHandlers/lidoCalculatorHandler.js +94 -0
  62. package/dist/collection/utils/utilsHandlers/matrixHandler.js +298 -0
  63. package/dist/collection/utils/utilsHandlers/slideHandler.js +4 -2
  64. package/dist/collection/utils/utilsHandlers/sortHandler.js +21 -12
  65. package/dist/components/index.js +1 -1
  66. package/dist/components/lido-avatar.js +1 -1
  67. package/dist/components/lido-balance.d.ts +11 -0
  68. package/dist/components/lido-balance.js +6 -0
  69. package/dist/components/lido-calculator.d.ts +11 -0
  70. package/dist/components/lido-calculator.js +6 -0
  71. package/dist/components/lido-cell.js +1 -1
  72. package/dist/components/lido-col.js +1 -1
  73. package/dist/components/lido-container.js +1 -1
  74. package/dist/components/lido-flash-card.js +1 -1
  75. package/dist/components/lido-float.js +1 -1
  76. package/dist/components/lido-home.js +1 -1
  77. package/dist/components/lido-image.js +1 -1
  78. package/dist/components/lido-keyboard.js +1 -1
  79. package/dist/components/lido-math-matrix.js +1 -1
  80. package/dist/components/lido-pos.js +1 -1
  81. package/dist/components/lido-random.js +1 -1
  82. package/dist/components/lido-root.js +32 -20
  83. package/dist/components/lido-row.js +1 -1
  84. package/dist/components/lido-shape.js +1 -1
  85. package/dist/components/lido-slide-fill.js +1 -1
  86. package/dist/components/lido-text.js +1 -1
  87. package/dist/components/lido-trace.js +1 -1
  88. package/dist/components/lido-wrap.js +1 -1
  89. package/dist/components/p-08d0deab.js +254 -0
  90. package/dist/components/{p-b5b6ad27.js → p-15971ede.js} +1 -1
  91. package/dist/components/{p-0bf92c7f.js → p-1fbdb431.js} +2 -2
  92. package/dist/components/{p-b43ce4e1.js → p-29bdd953.js} +2 -2
  93. package/dist/components/{p-b8af26e6.js → p-322acda6.js} +40 -48
  94. package/dist/components/{p-51943db6.js → p-3f406017.js} +2 -2
  95. package/dist/components/p-44808985.js +186 -0
  96. package/dist/components/{p-4cabbf28.js → p-52844fa4.js} +2 -2
  97. package/dist/components/{p-4882df37.js → p-73e31a86.js} +2 -2
  98. package/dist/components/{p-af54a485.js → p-74849cdd.js} +4 -4
  99. package/dist/components/{p-9c56f378.js → p-7f7e5672.js} +2 -2
  100. package/dist/components/{p-4dbae73b.js → p-835b973d.js} +2 -2
  101. package/dist/components/{p-b55af747.js → p-90465904.js} +50 -129
  102. package/dist/components/{p-cae021c6.js → p-904711c8.js} +2 -2
  103. package/dist/components/{p-e735dce9.js → p-9be56729.js} +5 -3
  104. package/dist/components/{p-cac6c8bf.js → p-afbc196f.js} +2 -2
  105. package/dist/components/{p-cfa2aec8.js → p-bed94c37.js} +1047 -164
  106. package/dist/components/{p-7f11a624.js → p-cbac3cbc.js} +1 -1
  107. package/dist/components/{p-61d97438.js → p-d37ab4dc.js} +2 -2
  108. package/dist/components/p-e36ddcc1.js +166 -0
  109. package/dist/components/{p-03e4cafe.js → p-e4e42677.js} +2 -2
  110. package/dist/esm/{index-f47852d4.js → index-170e58c7.js} +36 -4
  111. package/dist/esm/index.js +2 -2
  112. package/dist/esm/{lido-avatar_19.entry.js → lido-avatar_21.entry.js} +430 -181
  113. package/dist/esm/lido-player.js +3 -3
  114. package/dist/esm/loader.js +3 -3
  115. package/dist/esm/{utils-9ce243d8.js → utils-5df09162.js} +1031 -164
  116. package/dist/lido-player/index.esm.js +1 -1
  117. package/dist/lido-player/lido-player.css +1 -1
  118. package/dist/lido-player/lido-player.esm.js +1 -1
  119. package/dist/lido-player/p-137c99ce.js +2 -0
  120. package/dist/lido-player/p-7556e652.js +9 -0
  121. package/dist/lido-player/p-eb956325.entry.js +1 -0
  122. package/dist/types/components/calculator/lido-calculator.d.ts +40 -0
  123. package/dist/types/components/container/lido-container.d.ts +4 -0
  124. package/dist/types/components/home/lido-home.d.ts +0 -1
  125. package/dist/types/components/mathMatrix/lido-math-matrix.d.ts +24 -4
  126. package/dist/types/components/scale/lido-balance.d.ts +160 -0
  127. package/dist/types/components/trace/lido-trace.d.ts +0 -1
  128. package/dist/types/components.d.ts +342 -14
  129. package/dist/types/stories/Templates/balancing/balancing.stories.d.ts +4 -0
  130. package/dist/types/stories/Templates/checker-block/checkerBlock.stories.d.ts +4 -0
  131. package/dist/types/stories/Templates/checkerBlock/checkerBlock.stories.d.ts +4 -0
  132. package/dist/types/stories/Templates/fillAnswer/fill-answer.stories.d.ts +4 -0
  133. package/dist/types/stories/Templates/foodJar/food-jar.stories.d.ts +4 -0
  134. package/dist/types/stories/Templates/matchBox/matchBox.stories.d.ts +4 -0
  135. package/dist/types/stories/Templates/matchBox/matchBox2.stories.d.ts +4 -0
  136. package/dist/types/stories/Templates/matchingCard/matching-card.stories.d.ts +4 -0
  137. package/dist/types/stories/Templates/multiplyBeeds/multiplyBeeds.stories.d.ts +9 -0
  138. package/dist/types/stories/Templates/nimbleTable/nimbleTable.stories.d.ts +4 -0
  139. package/dist/types/stories/Templates/numberBoardTwo/numberBoardTwo.stories.d.ts +4 -0
  140. package/dist/types/stories/Templates/numberPair/numberPair.stories.d.ts +4 -0
  141. package/dist/types/stories/Templates/questionBoard/questionBoard.stories.d.ts +15 -0
  142. package/dist/types/stories/Templates/sequenceBox/sequenceBox1.stories.d.ts +11 -0
  143. package/dist/types/stories/Templates/sequenceBox/sequenceBox2.stories.d.ts +11 -0
  144. package/dist/types/stories/Templates/shapePair/shape-pair.stories.d.ts +4 -0
  145. package/dist/types/stories/Templates/shapeTractor/shape-tractor.stories.d.ts +12 -0
  146. package/dist/types/stories/Templates/sumTogether/sumTogether.stories.d.ts +11 -0
  147. package/dist/types/stories/Templates/total/total.stories.d.ts +4 -0
  148. package/dist/types/stories/Templates/writeNumber/writeNumber.stories.d.ts +13 -0
  149. package/dist/types/stories/Templates/writeSet/writeSet.stories.d.ts +4 -0
  150. package/dist/types/utils/utils.d.ts +8 -2
  151. package/dist/types/utils/utilsHandlers/dragDropHandler.d.ts +4 -0
  152. package/dist/types/utils/utilsHandlers/lidoBalanceHandler.d.ts +2 -0
  153. package/dist/types/utils/utilsHandlers/lidoCalculatorHandler.d.ts +1 -0
  154. package/dist/types/utils/utilsHandlers/matrixHandler.d.ts +1 -0
  155. package/package.json +1 -1
  156. package/dist/components/p-a8ab771b.js +0 -160
  157. package/dist/lido-player/p-90212aa9.js +0 -9
  158. package/dist/lido-player/p-d3911ee1.entry.js +0 -1
  159. package/dist/lido-player/p-ddf627b0.js +0 -2
@@ -0,0 +1,40 @@
1
+ import { EventEmitter } from '../../stencil-public-runtime';
2
+ export declare class LidoCalculator {
3
+ /** Width of the calculator component (default: '479px') */
4
+ width: string;
5
+ /**
6
+ * Controls component visibility.
7
+ * Accepts boolean (`true`/`false`) or string ("true"/"false").
8
+ */
9
+ visible: boolean | string;
10
+ /** Height of the calculator component (default: '711px') */
11
+ height: string;
12
+ /** Objective or identifier for activity-based logic or validation */
13
+ objective: string;
14
+ /** Code or actions to execute when the component is first rendered */
15
+ onEntry: string;
16
+ /** X-position of the calculator (can be px, %, etc.) */
17
+ x: string;
18
+ /** Y-position of the calculator (can be px, %, etc.) */
19
+ y: string;
20
+ /** Background color for the calculator container */
21
+ bgColor: string;
22
+ /** Icon URL for the pen image shown on the calculator UI */
23
+ penIcon: string;
24
+ /** Current display value shown in the calculator screen */
25
+ displayValue: string;
26
+ /** Inline style object for dynamic positioning and layout control */
27
+ style: {
28
+ [key: string]: string;
29
+ };
30
+ /** Event emitted when user confirms or completes an action (e.g., pressing OK) */
31
+ onOk: EventEmitter<boolean>;
32
+ /** Reference to the host HTML element of this component */
33
+ el: HTMLElement;
34
+ private updateValueAttr;
35
+ componentWillLoad(): void;
36
+ private handleClick;
37
+ private userAnswers;
38
+ private verifyAnswer;
39
+ render(): any;
40
+ }
@@ -161,6 +161,10 @@ export declare class LidoContainer {
161
161
  * Delay in milliseconds to make the cell visible after mount.
162
162
  */
163
163
  delayVisible: string;
164
+ /**
165
+ * When set to true, disables the speak functionality of long press for this component and its children.
166
+ */
167
+ disableSpeak: boolean;
164
168
  convertToPixels(height: string, parentElement?: HTMLElement): number;
165
169
  /**
166
170
  * Scales the container based on the window or screen size, maintaining the aspect ratio.
@@ -118,7 +118,6 @@ export declare class LidoHome {
118
118
  */
119
119
  private parseContainers;
120
120
  private updateArrowVisibility;
121
- private areAllDropsFilled;
122
121
  private btnpopup;
123
122
  popUpClick: (comment: string) => void;
124
123
  private scaleNavbarContainer;
@@ -1,8 +1,8 @@
1
1
  export declare class LidoMathMatrix {
2
2
  /** Number of rows in the matrix */
3
- rows: number;
3
+ rows: string;
4
4
  /** Number of columns in the matrix */
5
- cols: number;
5
+ cols: string;
6
6
  /** Number of slots to pre-fill as active by default */
7
7
  defualtFill: number;
8
8
  /** Show row index numbers on the left side */
@@ -20,7 +20,7 @@ export declare class LidoMathMatrix {
20
20
  /** Background color for active slots */
21
21
  activeBgColor: string;
22
22
  /** Background color for inactive slots */
23
- inactiveBgColor: string;
23
+ deactiveBgColor: string;
24
24
  /** Border style applied to each slot */
25
25
  border: string;
26
26
  /** Height of the slot container */
@@ -35,14 +35,33 @@ export declare class LidoMathMatrix {
35
35
  margin: string;
36
36
  /** Padding inside the matrix container */
37
37
  padding: string;
38
- /** Controls visibility of the matrix (string "true" or "false") */
38
+ /** Controls the visibility of the matrix (accepts "true" or "false" as string) */
39
39
  visible: string;
40
+ /** The display text or label associated with this matrix element */
41
+ text: string;
42
+ /** Defines the matrix type (e.g., "drop", "slot", "answer") */
43
+ type: string;
44
+ /** The value or data associated with this matrix element */
45
+ value: string;
46
+ /** Sets the tab index for keyboard navigation */
47
+ tabIndex: number;
48
+ /** The left coordinate (in pixels or percentage) for matrix positioning */
49
+ x: string;
50
+ /** The top coordinate (in pixels or percentage) for matrix positioning */
51
+ y: string;
52
+ /** Font color for the slot text */
53
+ fontColor: string;
54
+ /** Tracks the previously filled slot index to clear it when a new slot is clicked */
55
+ previousFilledSlot: number;
56
+ /** Reference to the previously filled slot element for clearing its text */
57
+ previousFilledSlotElement: HTMLElement | null;
40
58
  /** Holds dynamically generated inline styles for the container */
41
59
  style: {
42
60
  [key: string]: string | undefined;
43
61
  };
44
62
  /** Reference to the host element of this component */
45
63
  el: HTMLElement;
64
+ private updateValue;
46
65
  componentDidLoad(): void;
47
66
  /**
48
67
  * Lifecycle method that runs before the component is rendered.
@@ -53,5 +72,6 @@ export declare class LidoMathMatrix {
53
72
  updateSlots(): void;
54
73
  updateStyles(): void;
55
74
  handleClickSlot(element: HTMLElement): void;
75
+ private getSlotData;
56
76
  render(): any;
57
77
  }
@@ -0,0 +1,160 @@
1
+ export declare class LidoBalance {
2
+ /**
3
+ * URL of the pivot (base stand) image used in the balance visualization.
4
+ */
5
+ pivotimage: string;
6
+ /**
7
+ * URL of the scale (bar) image that tilts based on the weight difference.
8
+ */
9
+ scaleimage: string;
10
+ /**
11
+ * URL of the handler (side stands / hooks) image for the balance.
12
+ */
13
+ handlerimage: string;
14
+ /**
15
+ * Fill color applied to all loaded SVGs (pivot, scale, handler).
16
+ * Defaults to "brown".
17
+ */
18
+ fill: string;
19
+ /**
20
+ * Initial tilt value of the balance.
21
+ * Negative = tilts left, Positive = tilts right.
22
+ */
23
+ tilt: number;
24
+ /**
25
+ * Maximum allowed tilt angle (in degrees) for the balance bar.
26
+ */
27
+ maxTilt: number;
28
+ /**
29
+ * Action(s) to execute when the component enters the DOM.
30
+ * Example: trigger animations or audio cues.
31
+ */
32
+ onEntry: string;
33
+ /**
34
+ * CSS height of the component (responsive values allowed).
35
+ * Default: "auto".
36
+ */
37
+ height: string;
38
+ /**
39
+ * CSS width of the component (responsive values allowed).
40
+ * Default: "auto".
41
+ */
42
+ width: string;
43
+ /**
44
+ * Horizontal (X-axis) offset for positioning the component.
45
+ * Default: "0px".
46
+ */
47
+ x: string;
48
+ /**
49
+ * Vertical (Y-axis) offset for positioning the component.
50
+ * Default: "0px".
51
+ */
52
+ y: string;
53
+ /**
54
+ * Z-index for stacking order of the component.
55
+ * Default: "0".
56
+ */
57
+ z: string;
58
+ /**
59
+ * Controls component visibility.
60
+ * Accepts boolean (`true`/`false`) or string ("true"/"false").
61
+ */
62
+ visible: boolean | string;
63
+ /**
64
+ * CSS margin applied to the outer container.
65
+ */
66
+ margin: string;
67
+ /**
68
+ * CSS padding applied to the outer container.
69
+ */
70
+ padding: string;
71
+ /**
72
+ * Balance symbol shown when `showSymbol` is true.
73
+ * Default: "=".
74
+ */
75
+ balanceSymbol: string;
76
+ /**
77
+ * Whether the balance symbol is currently displayed.
78
+ * Can be toggled with `revealSymbol()` and `hideSymbol()`.
79
+ */
80
+ showSymbol: boolean;
81
+ /**
82
+ * Operation type used to calculate balance values.
83
+ * Supported: "count", "add", "subtract", etc.
84
+ */
85
+ operation: string;
86
+ /**
87
+ * SVG markup of the pivot element after applying fill/stroke modifications.
88
+ */
89
+ pivotSvg: string;
90
+ /**
91
+ * SVG markup of the scale element after applying fill/stroke modifications.
92
+ */
93
+ scaleSvg: string;
94
+ /**
95
+ * SVG markup of the handler element after applying fill/stroke modifications.
96
+ */
97
+ handlerSvg: string;
98
+ /**
99
+ * Computed inline styles applied to the component host.
100
+ * Updates dynamically based on orientation and props.
101
+ */
102
+ style: {
103
+ [key: string]: string;
104
+ };
105
+ /**
106
+ * Final effective tilt value (after clamping/updates).
107
+ */
108
+ tiltf: number;
109
+ /**
110
+ * Current computed value of the left side of the balance.
111
+ */
112
+ leftVal: number;
113
+ /**
114
+ * Current computed value of the right side of the balance.
115
+ */
116
+ rightVal: number;
117
+ /**
118
+ * Reference to the scale (bar) DOM element.
119
+ * Used to apply rotation transforms during balance animation.
120
+ */
121
+ private scaleEl;
122
+ /**
123
+ * ID of the current animation frame request.
124
+ * Stored so it can be canceled when the component disconnects.
125
+ */
126
+ private animationFrameId;
127
+ /**
128
+ * Reference to the left handler (hook/stand) DOM element.
129
+ * Translated vertically when the balance tilts.
130
+ */
131
+ private leftHandleEl;
132
+ /**
133
+ * Reference to the right handler (hook/stand) DOM element.
134
+ * Translated vertically when the balance tilts.
135
+ */
136
+ private rightHandleEl;
137
+ /**
138
+ * Reference to the left parent container DOM element.
139
+ * Used to adjust Y-translation of dropped content during tilt.
140
+ */
141
+ private leftParentEl;
142
+ /**
143
+ * Reference to the right parent container DOM element.
144
+ * Used to adjust Y-translation of dropped content during tilt.
145
+ */
146
+ private rightParentEl;
147
+ revealSymbol(): Promise<void>;
148
+ hideSymbol(): Promise<void>;
149
+ el: HTMLElement;
150
+ componentWillLoad(): Promise<void>;
151
+ componentDidLoad(): void;
152
+ disconnectedCallback(): void;
153
+ private fetchAndApplyFill;
154
+ private currentAngle;
155
+ tiltChanged(newValue: number): void;
156
+ updateTilt(leftVal: number, rightVal: number): Promise<void>;
157
+ private animateBalance;
158
+ updateStyles(): void;
159
+ render(): any;
160
+ }
@@ -115,7 +115,6 @@ export declare class LidoTrace {
115
115
  fileIndex: number;
116
116
  isDragging: boolean;
117
117
  activePointerId: number | null;
118
- freeTraceUpdateCounter: number;
119
118
  /** ───────────────────────────────────────────────────────────
120
119
  * NEW: idle‑timer + finger‑hint state
121
120
  * ─────────────────────────────────────────────────────────── */