lido-player 0.0.2-alpha-39 → 0.0.2-alpha-41

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 (89) hide show
  1. package/dist/cjs/index.cjs.js +1 -1
  2. package/dist/cjs/lido-avatar_19.cjs.entry.js +47 -21
  3. package/dist/cjs/lido-player.cjs.js +1 -1
  4. package/dist/cjs/loader.cjs.js +1 -1
  5. package/dist/cjs/{utils-ecfb0201.js → utils-9e484ec0.js} +40 -23
  6. package/dist/collection/components/avatar/lido-avatar.js +4 -3
  7. package/dist/collection/components/cell/lido-cell.js +20 -1
  8. package/dist/collection/components/flashCard/lido-flash-card.js +20 -1
  9. package/dist/collection/components/image/lido-image.js +20 -1
  10. package/dist/collection/components/keyboard/lido-keyboard.js +22 -3
  11. package/dist/collection/components/row/lido-row.js +20 -1
  12. package/dist/collection/components/shape/lido-shape.js +20 -1
  13. package/dist/collection/components/slideFill/lido-slide-fill.js +20 -1
  14. package/dist/collection/components/text/lido-text.js +20 -1
  15. package/dist/collection/components/trace/lido-trace.js +61 -8
  16. package/dist/collection/components/wrap/lido-wrap.js +20 -1
  17. package/dist/collection/stories/Templates/numberBoard/numberBoard.stories.js +121 -0
  18. package/dist/collection/stories/Templates/order-tractor/order-tractor-ascending-order.stories.js +127 -0
  19. package/dist/collection/stories/Templates/order-tractor/order-tractor.stories.js +121 -0
  20. package/dist/collection/stories/Templates/writeLetter/writeLetter.stories.js +1 -1
  21. package/dist/collection/stories/Templates/writeWord/writeWord.stories.js +1 -1
  22. package/dist/collection/utils/utils.js +14 -0
  23. package/dist/collection/utils/utilsHandlers/clickHandler.js +8 -0
  24. package/dist/collection/utils/utilsHandlers/dragDropHandler.js +9 -15
  25. package/dist/collection/utils/utilsHandlers/floatHandler.js +11 -9
  26. package/dist/components/index.js +1 -1
  27. package/dist/components/lido-avatar.js +1 -1
  28. package/dist/components/lido-cell.js +1 -1
  29. package/dist/components/lido-col.js +1 -1
  30. package/dist/components/lido-container.js +1 -1
  31. package/dist/components/lido-flash-card.js +1 -1
  32. package/dist/components/lido-float.js +1 -1
  33. package/dist/components/lido-home.js +1 -1
  34. package/dist/components/lido-image.js +1 -1
  35. package/dist/components/lido-keyboard.js +1 -1
  36. package/dist/components/lido-math-matrix.js +1 -1
  37. package/dist/components/lido-pos.js +1 -1
  38. package/dist/components/lido-random.js +1 -1
  39. package/dist/components/lido-root.js +19 -19
  40. package/dist/components/lido-row.js +1 -1
  41. package/dist/components/lido-shape.js +1 -1
  42. package/dist/components/lido-slide-fill.js +1 -1
  43. package/dist/components/lido-text.js +1 -1
  44. package/dist/components/lido-trace.js +1 -1
  45. package/dist/components/lido-wrap.js +1 -1
  46. package/dist/components/{p-4ad65185.js → p-006bafa5.js} +1 -1
  47. package/dist/components/{p-4fd16a6d.js → p-14dae335.js} +4 -2
  48. package/dist/components/{p-1ed4ea23.js → p-3cffc5c6.js} +4 -2
  49. package/dist/components/{p-5f6567b1.js → p-4aa39b17.js} +4 -2
  50. package/dist/components/{p-0f339d9b.js → p-5028a4d6.js} +1 -1
  51. package/dist/components/{p-35e88215.js → p-70bd36c1.js} +28 -9
  52. package/dist/components/{p-b59b421e.js → p-82667ced.js} +1 -1
  53. package/dist/components/{p-ddceb2c7.js → p-84f4839f.js} +1 -1
  54. package/dist/components/{p-ebd56b31.js → p-8df305dc.js} +4 -2
  55. package/dist/components/{p-316538c8.js → p-9da9273c.js} +1 -1
  56. package/dist/components/{p-242a3040.js → p-a1340ae7.js} +5 -3
  57. package/dist/components/{p-b827ba8e.js → p-ac5ba8ca.js} +40 -23
  58. package/dist/components/{p-bfe4cab0.js → p-b6d93a6c.js} +18 -18
  59. package/dist/components/{p-08971697.js → p-bb824646.js} +4 -2
  60. package/dist/components/{p-0c38a496.js → p-bbc5cd43.js} +4 -2
  61. package/dist/components/{p-386181ff.js → p-d73ee4cd.js} +3 -2
  62. package/dist/components/{p-6c8b5f12.js → p-d8dc7418.js} +1 -1
  63. package/dist/components/{p-7b91a633.js → p-ddfa7880.js} +7 -5
  64. package/dist/components/{p-02d8bdd1.js → p-f41bfb24.js} +4 -2
  65. package/dist/esm/index.js +1 -1
  66. package/dist/esm/lido-avatar_19.entry.js +48 -22
  67. package/dist/esm/lido-player.js +1 -1
  68. package/dist/esm/loader.js +1 -1
  69. package/dist/esm/{utils-5661610c.js → utils-1130854a.js} +40 -23
  70. package/dist/lido-player/index.esm.js +1 -1
  71. package/dist/lido-player/lido-player.esm.js +1 -1
  72. package/dist/lido-player/p-6b1ed256.entry.js +1 -0
  73. package/dist/lido-player/{p-af64cf4b.js → p-ee14fefd.js} +2 -2
  74. package/dist/types/components/cell/lido-cell.d.ts +4 -0
  75. package/dist/types/components/flashCard/lido-flash-card.d.ts +4 -0
  76. package/dist/types/components/image/lido-image.d.ts +4 -0
  77. package/dist/types/components/keyboard/lido-keyboard.d.ts +4 -0
  78. package/dist/types/components/row/lido-row.d.ts +4 -0
  79. package/dist/types/components/shape/lido-shape.d.ts +4 -0
  80. package/dist/types/components/slideFill/lido-slide-fill.d.ts +4 -0
  81. package/dist/types/components/text/lido-text.d.ts +4 -0
  82. package/dist/types/components/trace/lido-trace.d.ts +13 -0
  83. package/dist/types/components/wrap/lido-wrap.d.ts +4 -0
  84. package/dist/types/components.d.ts +88 -0
  85. package/dist/types/stories/Templates/numberBoard/numberBoard.stories.d.ts +4 -0
  86. package/dist/types/stories/Templates/order-tractor/order-tractor-ascending-order.stories.d.ts +4 -0
  87. package/dist/types/stories/Templates/order-tractor/order-tractor.stories.d.ts +4 -0
  88. package/package.json +1 -1
  89. package/dist/lido-player/p-a79b92c7.entry.js +0 -1
@@ -1,5 +1,5 @@
1
- import { Host, h } from "@stencil/core";
2
- import { Rive } from "@rive-app/canvas";
1
+ import { Host, h, getAssetPath } from "@stencil/core";
2
+ import { Rive, RuntimeLoader } from "@rive-app/canvas";
3
3
  import { RiveService } from "../../utils/rive-service";
4
4
  import { convertUrlToRelative, initEventsForElement, setVisibilityWithDelay } from "../../utils/utils";
5
5
  /**
@@ -59,6 +59,7 @@ export class LidoAvatar {
59
59
  * It initializes events for the column based on the provided type.
60
60
  */
61
61
  async componentDidLoad() {
62
+ RuntimeLoader.setWasmUrl(getAssetPath("./rive.wasm"));
62
63
  setVisibilityWithDelay(this.el, this.delayVisible);
63
64
  initEventsForElement(this.el, this.type);
64
65
  // const resolvedPath = this.src.startsWith('http')
@@ -77,7 +78,7 @@ export class LidoAvatar {
77
78
  display: this.visible ? 'flex' : 'none',
78
79
  zIndex: this.z,
79
80
  };
80
- return (h(Host, { key: '54b86b9154855e156b6dd67c71eb4107b317b480', id: this.id, type: this.type, "tab-index": this.tabIndex, value: this.value, style: style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry }, h("canvas", { key: 'f9d352ac0f0ef41b155a1cfc7659bb44f628beb3', class: "lido-canvas" })));
81
+ return (h(Host, { key: '0889129b1e69b8966dec70f6364c602cadce10ef', id: this.id, type: this.type, "tab-index": this.tabIndex, value: this.value, style: style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry }, h("canvas", { key: '975318180c4454f81d307accd823e2eaaeddf6cc', class: "lido-canvas" })));
81
82
  }
82
83
  static get is() { return "lido-avatar"; }
83
84
  static get originalStyleUrls() {
@@ -43,6 +43,7 @@ export class LidoCell {
43
43
  this.flexDirection = '';
44
44
  this.style = {};
45
45
  this.delayVisible = '';
46
+ this.disableSpeak = false;
46
47
  }
47
48
  /**
48
49
  * This lifecycle hook is called after the component is rendered in the DOM.
@@ -130,7 +131,7 @@ export class LidoCell {
130
131
  this.el.className = `lido-${parseProp(this.layout, orientation)}`;
131
132
  }
132
133
  render() {
133
- return (h(Host, { key: '9f65539e85d22f775f44c310ecd7accc5f599859', id: this.id, class: "lido-cell", value: this.value, type: this.type, "tab-index": this.tabIndex, style: this.style, minDrops: this.minDrops, maxDrops: this.maxDrops, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry, "flex-direction": this.flexDirection }, h("slot", { key: '1c81a23db893dfc3af36f0ed98f9d5ce3cafebf3' })));
134
+ return (h(Host, { key: '8c2593f5b6493530e0ab725b7f9f543f884d086d', id: this.id, class: "lido-cell", value: this.value, type: this.type, "tab-index": this.tabIndex, style: this.style, minDrops: this.minDrops, maxDrops: this.maxDrops, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry, "flex-direction": this.flexDirection, "disable-speak": this.disableSpeak }, h("slot", { key: '1497f2f179a474a4a2a8944d03c0841d055b1b6d' })));
134
135
  }
135
136
  static get is() { return "lido-cell"; }
136
137
  static get originalStyleUrls() {
@@ -738,6 +739,24 @@ export class LidoCell {
738
739
  "attribute": "delay-visible",
739
740
  "reflect": false,
740
741
  "defaultValue": "''"
742
+ },
743
+ "disableSpeak": {
744
+ "type": "boolean",
745
+ "mutable": false,
746
+ "complexType": {
747
+ "original": "boolean",
748
+ "resolved": "boolean",
749
+ "references": {}
750
+ },
751
+ "required": false,
752
+ "optional": false,
753
+ "docs": {
754
+ "tags": [],
755
+ "text": "When set to true, disables the speak functionality of long press for this component and its children."
756
+ },
757
+ "attribute": "disable-speak",
758
+ "reflect": false,
759
+ "defaultValue": "false"
741
760
  }
742
761
  };
743
762
  }
@@ -50,6 +50,7 @@ export class LidoFlash {
50
50
  this.back = undefined;
51
51
  this.flipped = false;
52
52
  this.margin = '';
53
+ this.disableSpeak = false;
53
54
  this.style = {};
54
55
  this.delayVisible = '';
55
56
  }
@@ -75,7 +76,7 @@ export class LidoFlash {
75
76
  }
76
77
  /* ---------- Render ---------- */
77
78
  render() {
78
- return (h(Host, { key: 'ab4549fc6dd8fcbd7d67e21433827bc87c1f2dbe', 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 }, h("div", { key: 'c8981d2f7c3f71b26402bfdab79f5da765b20e02', class: `card ${this.flipped ? 'flipped' : ''}` }, h("div", { key: '78608648e93d368577a7c7c5a058ced227eafa44', class: "card-face card-front" }, this.front != null ? this.front : h("slot", { name: "front" })), h("div", { key: '7eabba27269fb0cd827310cf4aab2d03c8031de1', class: "card-face card-back" }, this.back != null ? this.back : h("slot", { name: "back" })))));
79
+ return (h(Host, { key: 'e0140af2e33c8cdc9d5c94743bcd83b98d0ce2f4', 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 }, h("div", { key: '11b7e0be1957e15ac5644b73b4ffbd00a27a93ff', class: `card ${this.flipped ? 'flipped' : ''}` }, h("div", { key: 'acd9ae1eb8b1d6ac2658dbdcb26d9d7f6549811c', class: "card-face card-front" }, this.front != null ? this.front : h("slot", { name: "front" })), h("div", { key: 'd62cbfdd84fcc6596aefe6d8d55f7e5ffeaaa5f2', class: "card-face card-back" }, this.back != null ? this.back : h("slot", { name: "back" })))));
79
80
  }
80
81
  static get is() { return "lido-flash-card"; }
81
82
  static get originalStyleUrls() {
@@ -500,6 +501,24 @@ export class LidoFlash {
500
501
  "reflect": false,
501
502
  "defaultValue": "''"
502
503
  },
504
+ "disableSpeak": {
505
+ "type": "boolean",
506
+ "mutable": false,
507
+ "complexType": {
508
+ "original": "boolean",
509
+ "resolved": "boolean",
510
+ "references": {}
511
+ },
512
+ "required": false,
513
+ "optional": false,
514
+ "docs": {
515
+ "tags": [],
516
+ "text": "When set to true, disables the speak functionality of long press for this component and its children."
517
+ },
518
+ "attribute": "disable-speak",
519
+ "reflect": false,
520
+ "defaultValue": "false"
521
+ },
503
522
  "delayVisible": {
504
523
  "type": "string",
505
524
  "mutable": false,
@@ -43,6 +43,7 @@ export class LidoImage {
43
43
  this.transform = '';
44
44
  this.style = undefined;
45
45
  this.delayVisible = '';
46
+ this.disableSpeak = false;
46
47
  }
47
48
  /**
48
49
  * Lifecycle method that runs after the component has been loaded into the DOM.
@@ -103,7 +104,7 @@ export class LidoImage {
103
104
  return (h(Host, { class: "slice", id: this.id, type: this.type, "tab-index": this.tabIndex, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, value: this.value, minDrops: this.minDrops, maxDrops: this.maxDrops, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry }));
104
105
  }
105
106
  else {
106
- return (h(Host, { id: this.id, type: this.type, "tab-index": this.tabIndex, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, value: this.value, minDrops: this.minDrops, maxDrops: this.maxDrops, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry }, h("img", { class: "lido-image", src: convertUrlToRelative(this.src), alt: "", style: this.style })));
107
+ return (h(Host, { id: this.id, type: this.type, "tab-index": this.tabIndex, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, value: this.value, minDrops: this.minDrops, maxDrops: this.maxDrops, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry, "disable-speak": this.disableSpeak }, h("img", { class: "lido-image", src: convertUrlToRelative(this.src), alt: "", style: this.style })));
107
108
  }
108
109
  }
109
110
  static get is() { return "lido-image"; }
@@ -638,6 +639,24 @@ export class LidoImage {
638
639
  "attribute": "delay-visible",
639
640
  "reflect": false,
640
641
  "defaultValue": "''"
642
+ },
643
+ "disableSpeak": {
644
+ "type": "boolean",
645
+ "mutable": false,
646
+ "complexType": {
647
+ "original": "boolean",
648
+ "resolved": "boolean",
649
+ "references": {}
650
+ },
651
+ "required": false,
652
+ "optional": false,
653
+ "docs": {
654
+ "tags": [],
655
+ "text": "When set to true, disables the speak functionality of long press for this component and its children."
656
+ },
657
+ "attribute": "disable-speak",
658
+ "reflect": false,
659
+ "defaultValue": "false"
641
660
  }
642
661
  };
643
662
  }
@@ -25,6 +25,7 @@ export class LidoKeyboard {
25
25
  this.keyboardInput = false;
26
26
  this.columns = '10';
27
27
  this.letterLength = undefined;
28
+ this.disableSpeak = false;
28
29
  this.numberOfClick = 0;
29
30
  this.inputString = '';
30
31
  this.style = {};
@@ -114,10 +115,10 @@ export class LidoKeyboard {
114
115
  const keysArray = this.keys.split(',').map(k => k.trim());
115
116
  const container = document.getElementById(LidoContainer);
116
117
  const showCheck = container.getAttribute('show-check') === 'true';
117
- return (h(Host, { key: 'de7d6c8eb01a90851d03d8e3a90c2dda2c437b83', class: "lido-keyboard", style: { width: this.style.width, height: this.style.height, position: 'relative', margin: this.style.margin, zIndex: this.z } }, this.keyboardInput && (h("div", { key: '2755d632b00ac4bd9685317c61a6fa9af2972973', class: "input-area" }, h("input", { key: '266a08add13f544c583d424fd1ab31911531f65f', type: "text", value: this.inputString, class: "input-area", readonly: true, onInput: (e) => (this.inputString = e.target.value) }), h("lido-text", { key: '81ca8c391f5bd9056e0a6c9030d0e975a493f86f', visible: showCheck ? 'true' : 'false', string: "<<", "bg-color": "black", "font-color": "white", "border-radius": "20px", "font-size": "30px", width: "100px", height: "70px", type: "click", onClick: () => {
118
+ return (h(Host, { key: 'b01d3c5bab495def25c14239a3c94e9f6af15b4f', class: "lido-keyboard", style: { width: this.style.width, height: this.style.height, position: 'relative', margin: this.style.margin, zIndex: this.z } }, this.keyboardInput && (h("div", { key: '1e475df899a9e8cead3d4ee313d6e0b09a1e766f', class: "input-area" }, h("input", { key: '1d27787a42dc81ba97d5045718d726683bf8f32a', type: "text", value: this.inputString, class: "input-area", readonly: true, onInput: (e) => (this.inputString = e.target.value) }), h("lido-text", { key: '5695c9662b22bd7c3d7c7dfc49481641e795b290', visible: showCheck ? 'true' : 'false', string: "<<", "bg-color": "black", "font-color": "white", "border-radius": "20px", "font-size": "30px", width: "100px", height: "70px", type: "click", onClick: () => {
118
119
  this.inputString = this.inputString.slice(0, -1);
119
120
  this.inputValidation(event);
120
- } }), h("lido-text", { key: '721a7b54a4da58c3d68989df08f24a6a41168523', visible: showCheck ? 'true' : 'false', id: "lido-checkButton", string: "Enter", "bg-color": "green", "font-color": "white", "border-radius": "20px", "font-size": "30px", width: "150px", height: "70px", type: "click" }))), this.letterLength && (h("lido-text", { key: '7b87a8810282fdb4326794042118016edc992dd2', visible: "true", string: `${this.numberOfClick}/${this.letterLength}`, "font-size": "60px", "font-color": "white", onEntry: "this.position='absolute'; this.right='0'; this.fontWeight='800';", x: "unset" })), h("div", { key: '80796fa601b359e235a885fdf9e233c3df941605', class: "keyboard-wrapper", style: {
121
+ } }), h("lido-text", { key: 'd1a786e8f4015c7aeaeffe7a677f1f7e106b3691', visible: showCheck ? 'true' : 'false', id: "lido-checkButton", string: "Enter", "bg-color": "green", "font-color": "white", "border-radius": "20px", "font-size": "30px", width: "150px", height: "70px", type: "click" }))), this.letterLength && (h("lido-text", { key: 'bdd01380b832949bf2abbe4481ac000c1f3a358f', visible: "true", string: `${this.numberOfClick}/${this.letterLength}`, "font-size": "60px", "font-color": "white", onEntry: "this.position='absolute'; this.right='0'; this.fontWeight='800';", x: "unset" })), h("div", { key: 'd54959bfe639803c7e048d5112514a7dccbf9dc4', class: "keyboard-wrapper", style: {
121
122
  display: 'flex',
122
123
  flexWrap: 'wrap',
123
124
  justifyContent: 'center',
@@ -134,7 +135,7 @@ export class LidoKeyboard {
134
135
  }, visible: "true", "font-size": this.style.fontSize, "font-color": this.fontColor, "font-family": this.fontFamily, "bg-color": this.bgColor, string: label, onEntry: this.onEntry, "border-radius": this.style.borderRadius, value: label.toLowerCase(), type: this.type, class: `key-button${isDisabled ? ' disabled' : ''}`, onClick: () => {
135
136
  this.inputString += string;
136
137
  this.inputValidation(event);
137
- } }));
138
+ }, "disable-speak": this.disableSpeak }));
138
139
  }))));
139
140
  }
140
141
  static get is() { return "lido-keyboard"; }
@@ -495,6 +496,24 @@ export class LidoKeyboard {
495
496
  },
496
497
  "attribute": "letter-length",
497
498
  "reflect": false
499
+ },
500
+ "disableSpeak": {
501
+ "type": "boolean",
502
+ "mutable": false,
503
+ "complexType": {
504
+ "original": "boolean",
505
+ "resolved": "boolean",
506
+ "references": {}
507
+ },
508
+ "required": false,
509
+ "optional": false,
510
+ "docs": {
511
+ "tags": [],
512
+ "text": "When set to true, disables the speak functionality of long press for this component and its children."
513
+ },
514
+ "attribute": "disable-speak",
515
+ "reflect": false,
516
+ "defaultValue": "false"
498
517
  }
499
518
  };
500
519
  }
@@ -35,6 +35,7 @@ export class LidoRow {
35
35
  this.style = {};
36
36
  this.display = undefined;
37
37
  this.margin = '';
38
+ this.disableSpeak = false;
38
39
  }
39
40
  /**
40
41
  * Lifecycle hook that runs after the component is loaded into the DOM.
@@ -77,7 +78,7 @@ export class LidoRow {
77
78
  };
78
79
  }
79
80
  render() {
80
- return (h(Host, { key: 'fbb03e5c63e10aba50cdfbfd66f520fd8ed0a84b', class: "lido-row", type: this.type, "tab-index": this.tabIndex, value: this.value, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, minDrops: this.minDrops, maxDrops: this.maxDrops, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry }, h("slot", { key: 'cd8884f10461d63132fbd6fc27c2d7299ccebb79' })));
81
+ return (h(Host, { key: '03f15dcfc2abc394d0313d4b40dd6465a19dc34a', class: "lido-row", type: this.type, "tab-index": this.tabIndex, value: this.value, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, minDrops: this.minDrops, maxDrops: this.maxDrops, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry, "disable-speak": this.disableSpeak }, h("slot", { key: 'fbb5e6ce6b8436d718c043561e0d92908baaabdc' })));
81
82
  }
82
83
  static get is() { return "lido-row"; }
83
84
  static get originalStyleUrls() {
@@ -537,6 +538,24 @@ export class LidoRow {
537
538
  "attribute": "margin",
538
539
  "reflect": false,
539
540
  "defaultValue": "''"
541
+ },
542
+ "disableSpeak": {
543
+ "type": "boolean",
544
+ "mutable": false,
545
+ "complexType": {
546
+ "original": "boolean",
547
+ "resolved": "boolean",
548
+ "references": {}
549
+ },
550
+ "required": false,
551
+ "optional": false,
552
+ "docs": {
553
+ "tags": [],
554
+ "text": "When set to true, disables the speak functionality of long press for this component and its children."
555
+ },
556
+ "attribute": "disable-speak",
557
+ "reflect": false,
558
+ "defaultValue": "false"
540
559
  }
541
560
  };
542
561
  }
@@ -32,6 +32,7 @@ export class LidoShape {
32
32
  this.maxDrops = 1;
33
33
  this.margin = '';
34
34
  this.delayVisible = '';
35
+ this.disableSpeak = false;
35
36
  }
36
37
  /**
37
38
  * Lifecycle hook that runs after the component is loaded into the DOM.
@@ -53,7 +54,7 @@ export class LidoShape {
53
54
  backgroundColor: this.shapeType !== 'polygon' ? this.bgColor : 'transparent', // Apply background only if not a polygon
54
55
  margin: this.margin,
55
56
  };
56
- return (h(Host, { key: '96b66a744afb47b46c0fb78a9e2c6f5b424bf016', 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 }));
57
+ return (h(Host, { key: '887f02445ef694f84ebc85e05e4dfb740d0bc78b', 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 }));
57
58
  }
58
59
  static get is() { return "lido-shape"; }
59
60
  static get originalStyleUrls() {
@@ -481,6 +482,24 @@ export class LidoShape {
481
482
  "attribute": "delay-visible",
482
483
  "reflect": false,
483
484
  "defaultValue": "''"
485
+ },
486
+ "disableSpeak": {
487
+ "type": "boolean",
488
+ "mutable": false,
489
+ "complexType": {
490
+ "original": "boolean",
491
+ "resolved": "boolean",
492
+ "references": {}
493
+ },
494
+ "required": false,
495
+ "optional": false,
496
+ "docs": {
497
+ "tags": [],
498
+ "text": "When set to true, disables the speak functionality of long press for this component and its children."
499
+ },
500
+ "attribute": "disable-speak",
501
+ "reflect": false,
502
+ "defaultValue": "false"
484
503
  }
485
504
  };
486
505
  }
@@ -29,6 +29,7 @@ export class LidoSlideFill {
29
29
  this.svgContent = '';
30
30
  this.style = undefined;
31
31
  this.delayVisible = '';
32
+ this.disableSpeak = false;
32
33
  }
33
34
  /**
34
35
  * Lifecycle method that runs before the component is rendered.
@@ -189,7 +190,7 @@ export class LidoSlideFill {
189
190
  }
190
191
  }
191
192
  render() {
192
- return (h(Host, { key: 'e9ed2e5feb32e9abea8dc8f374ad12ea9fb62cf5', id: this.id, class: "lido-slide-fill", src: this.src, fill: this.fill, fillDirection: this.fillDirection, slider: this.slider, style: this.style, min: this.min, max: this.max, division: this.division, numberType: this.numberType, onEntry: this.onEntry, type: this.type }, h("div", { key: '0ff471fb187d8a58685ce495f4d9e4b37be8ad4a', innerHTML: this.svgContent, class: "svg-element" })));
193
+ return (h(Host, { key: 'a7be214e99b8917ebe3d4ae0275036e77967d3b7', id: this.id, class: "lido-slide-fill", src: this.src, fill: this.fill, fillDirection: this.fillDirection, slider: this.slider, style: this.style, min: this.min, max: this.max, division: this.division, numberType: this.numberType, onEntry: this.onEntry, type: this.type, "disable-speak": this.disableSpeak }, h("div", { key: 'e3210823de751a3fdff90b54bf93fc13890ca28a', innerHTML: this.svgContent, class: "svg-element" })));
193
194
  }
194
195
  static get is() { return "lido-slide-fill"; }
195
196
  static get originalStyleUrls() {
@@ -587,6 +588,24 @@ export class LidoSlideFill {
587
588
  "attribute": "delay-visible",
588
589
  "reflect": false,
589
590
  "defaultValue": "''"
591
+ },
592
+ "disableSpeak": {
593
+ "type": "boolean",
594
+ "mutable": false,
595
+ "complexType": {
596
+ "original": "boolean",
597
+ "resolved": "boolean",
598
+ "references": {}
599
+ },
600
+ "required": false,
601
+ "optional": false,
602
+ "docs": {
603
+ "tags": [],
604
+ "text": "When set to true, disables the speak functionality of long press for this component and its children."
605
+ },
606
+ "attribute": "disable-speak",
607
+ "reflect": false,
608
+ "defaultValue": "false"
590
609
  }
591
610
  };
592
611
  }
@@ -42,6 +42,7 @@ export class LidoText {
42
42
  this.spanType = '';
43
43
  this.style = {};
44
44
  this.delayVisible = '';
45
+ this.disableSpeak = false;
45
46
  }
46
47
  /**
47
48
  * Lifecycle hook that runs after the component is rendered in the DOM.
@@ -122,7 +123,7 @@ export class LidoText {
122
123
  }
123
124
  }
124
125
  render() {
125
- return (h(Host, { key: 'a894ed10004a41a749f29f345255fb46d15e6255', class: "lido-text", value: this.value, type: this.type, "tab-index": this.tabIndex, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry, minDrops: this.minDrops, maxDrops: this.maxDrops, id: this.id, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, "span-type": this.spanType }, this.spanType !== '' ? h("div", { class: "lido-text-content" }, this.string) : this.string));
126
+ return (h(Host, { key: '44444c496287fcacce28fa0073d1b87a80d07874', class: "lido-text", value: this.value, type: this.type, "tab-index": this.tabIndex, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry, minDrops: this.minDrops, maxDrops: this.maxDrops, id: this.id, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, "span-type": this.spanType, "disable-speak": this.disableSpeak }, this.spanType !== '' ? h("div", { class: "lido-text-content" }, this.string) : this.string));
126
127
  }
127
128
  static get is() { return "lido-text"; }
128
129
  static get originalStyleUrls() {
@@ -712,6 +713,24 @@ export class LidoText {
712
713
  "attribute": "delay-visible",
713
714
  "reflect": false,
714
715
  "defaultValue": "''"
716
+ },
717
+ "disableSpeak": {
718
+ "type": "boolean",
719
+ "mutable": false,
720
+ "complexType": {
721
+ "original": "boolean",
722
+ "resolved": "boolean",
723
+ "references": {}
724
+ },
725
+ "required": false,
726
+ "optional": false,
727
+ "docs": {
728
+ "tags": [],
729
+ "text": "When set to true, disables the speak functionality of long press for this component and its children."
730
+ },
731
+ "attribute": "disable-speak",
732
+ "reflect": false,
733
+ "defaultValue": "false"
715
734
  }
716
735
  };
717
736
  }
@@ -8,11 +8,13 @@ export class LidoTrace {
8
8
  this.id = '';
9
9
  this.svgSource = '';
10
10
  this.svgUrls = [];
11
+ this.audioUrls = [];
11
12
  this.currentSvgIndex = 0;
12
13
  this.moving = false;
13
14
  this.value = '';
14
15
  this.height = 'auto';
15
16
  this.width = 'auto';
17
+ this.audio = '';
16
18
  this.x = '0px';
17
19
  this.y = '0px';
18
20
  this.z = '0';
@@ -26,6 +28,7 @@ export class LidoTrace {
26
28
  this.highlightTextId = '';
27
29
  this.animationTrace = false;
28
30
  this.delayVisible = '';
31
+ this.disableSpeak = false;
29
32
  this.style = {};
30
33
  this.fileIndex = -1;
31
34
  this.isDragging = false;
@@ -505,9 +508,8 @@ export class LidoTrace {
505
508
  this.moving = false;
506
509
  return;
507
510
  }
508
- const container = document.getElementById(LidoContainer);
509
- if (container && this.onCorrect) {
510
- await executeActions(this.onCorrect, container);
511
+ if (this.el && this.onCorrect) {
512
+ await executeActions(this.onCorrect, this.el);
511
513
  }
512
514
  triggerNextContainer();
513
515
  }
@@ -641,6 +643,9 @@ export class LidoTrace {
641
643
  const container = document.getElementById(LidoContainer);
642
644
  if (!container)
643
645
  return;
646
+ const traceElement = this.el;
647
+ if (!traceElement)
648
+ return;
644
649
  // Ensure highlightTextId is set
645
650
  const textId = this.highlightTextId;
646
651
  if (!textId)
@@ -649,6 +654,12 @@ export class LidoTrace {
649
654
  const textElem = document.getElementById(textId);
650
655
  if (!textElem)
651
656
  return;
657
+ // Extract audio URLs from the trace element's audio attribute
658
+ const audioList = traceElement.getAttribute('audio');
659
+ if (!audioList)
660
+ return;
661
+ this.audioUrls = audioList.split(';').map(s => s.trim());
662
+ console.log('audioUrls', this.audioUrls);
652
663
  // Check if the textElem has a span-type attribute
653
664
  const spanType = textElem.getAttribute('span-type');
654
665
  if (!spanType)
@@ -665,8 +676,11 @@ export class LidoTrace {
665
676
  const letter = letters[index];
666
677
  if (letter) {
667
678
  letter.classList.add('letter-highlight');
668
- // letter.setAttribute('speak', 'true');
669
- // await AudioPlayer.getI().play(letter);
679
+ if (this.audioUrls[this.currentSvgIndex]) {
680
+ console.log('Playing audio:', this.audioUrls[this.currentSvgIndex]);
681
+ const audio = new Audio(this.audioUrls[this.currentSvgIndex]);
682
+ await audio.play();
683
+ }
670
684
  }
671
685
  }
672
686
  if (spanType === 'words') {
@@ -677,8 +691,10 @@ export class LidoTrace {
677
691
  const word = words[index];
678
692
  if (word) {
679
693
  word.classList.add('word-highlight');
680
- // word.setAttribute('speak', 'true');
681
- // await AudioPlayer.getI().play(word);
694
+ if (this.audioUrls[this.currentSvgIndex]) {
695
+ const audio = new Audio(this.audioUrls[this.currentSvgIndex]);
696
+ await audio.play();
697
+ }
682
698
  }
683
699
  }
684
700
  }
@@ -694,7 +710,7 @@ export class LidoTrace {
694
710
  };
695
711
  }
696
712
  render() {
697
- return (h(Host, { key: 'e3b4b599e93cf22974b348a0f5a3915533b2162f', class: "lido-trace", id: this.id, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, tabindex: this.tabIndex }, h("div", { key: 'f54b55ae0a58a3df9d1402f7b930bdca79f186cc', style: this.style, id: "lido-svgContainer" })));
713
+ return (h(Host, { key: '3cdcbcdfbc4bda470d2ce3e4a57fee9a280b250e', class: "lido-trace", id: this.id, audio: this.audio, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, tabindex: this.tabIndex, "disable-speak": this.disableSpeak }, h("div", { key: '29c8230656dc827027ff07e25edbb375710f1213', style: this.style, id: "lido-svgContainer" })));
698
714
  }
699
715
  static get is() { return "lido-trace"; }
700
716
  static get originalStyleUrls() {
@@ -818,6 +834,24 @@ export class LidoTrace {
818
834
  "reflect": false,
819
835
  "defaultValue": "'auto'"
820
836
  },
837
+ "audio": {
838
+ "type": "string",
839
+ "mutable": false,
840
+ "complexType": {
841
+ "original": "string",
842
+ "resolved": "string",
843
+ "references": {}
844
+ },
845
+ "required": false,
846
+ "optional": false,
847
+ "docs": {
848
+ "tags": [],
849
+ "text": "URL or identifier for an audio file associated with the text component."
850
+ },
851
+ "attribute": "audio",
852
+ "reflect": false,
853
+ "defaultValue": "''"
854
+ },
821
855
  "x": {
822
856
  "type": "string",
823
857
  "mutable": false,
@@ -1049,12 +1083,31 @@ export class LidoTrace {
1049
1083
  "attribute": "delay-visible",
1050
1084
  "reflect": false,
1051
1085
  "defaultValue": "''"
1086
+ },
1087
+ "disableSpeak": {
1088
+ "type": "boolean",
1089
+ "mutable": false,
1090
+ "complexType": {
1091
+ "original": "boolean",
1092
+ "resolved": "boolean",
1093
+ "references": {}
1094
+ },
1095
+ "required": false,
1096
+ "optional": false,
1097
+ "docs": {
1098
+ "tags": [],
1099
+ "text": "When set to true, disables the speak functionality of long press for this component and its children."
1100
+ },
1101
+ "attribute": "disable-speak",
1102
+ "reflect": false,
1103
+ "defaultValue": "false"
1052
1104
  }
1053
1105
  };
1054
1106
  }
1055
1107
  static get states() {
1056
1108
  return {
1057
1109
  "svgUrls": {},
1110
+ "audioUrls": {},
1058
1111
  "currentSvgIndex": {},
1059
1112
  "moving": {},
1060
1113
  "style": {},
@@ -35,6 +35,7 @@ export class LidoWrap {
35
35
  this.minDrops = 1;
36
36
  this.maxDrops = 1;
37
37
  this.margin = '';
38
+ this.disableSpeak = false;
38
39
  this.style = undefined;
39
40
  }
40
41
  /**
@@ -79,7 +80,7 @@ export class LidoWrap {
79
80
  };
80
81
  }
81
82
  render() {
82
- return (h(Host, { key: 'ed3b373124e52f99c57091c30a5fe9d57d7c3e25', class: "lido-wrap", value: this.value, type: this.type, "tab-index": this.tabIndex, style: this.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 }, h("slot", { key: '147c621aecbb79e4f5a666e30b255dee709e88cc' })));
83
+ return (h(Host, { key: '8f9a578e3bf8c491373b7564b93c05de92a3e1a7', class: "lido-wrap", value: this.value, type: this.type, "tab-index": this.tabIndex, style: this.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, disableSpeak: this.disableSpeak }, h("slot", { key: '0dbba1d2c88bac9a29bb81340698f5f3cb36c7be' })));
83
84
  }
84
85
  static get is() { return "lido-wrap"; }
85
86
  static get originalStyleUrls() {
@@ -539,6 +540,24 @@ export class LidoWrap {
539
540
  "attribute": "margin",
540
541
  "reflect": false,
541
542
  "defaultValue": "''"
543
+ },
544
+ "disableSpeak": {
545
+ "type": "boolean",
546
+ "mutable": false,
547
+ "complexType": {
548
+ "original": "boolean",
549
+ "resolved": "boolean",
550
+ "references": {}
551
+ },
552
+ "required": false,
553
+ "optional": false,
554
+ "docs": {
555
+ "tags": [],
556
+ "text": "When set to true, disables the speak functionality of long press for this component and its children."
557
+ },
558
+ "attribute": "disable-speak",
559
+ "reflect": false,
560
+ "defaultValue": "false"
542
561
  }
543
562
  };
544
563
  }