lido-player 0.0.2-alpha-87 → 0.0.2-alpha-89

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 (34) hide show
  1. package/dist/cjs/{decode-C80xU-sR.js → decode-BCtIYiSY.js} +1 -1
  2. package/dist/cjs/{index-C1PT3dXa.js → index-BDnxAitU.js} +11 -12
  3. package/dist/cjs/index.cjs.js +1 -1
  4. package/dist/cjs/lido-avatar_22.cjs.entry.js +7 -6
  5. package/dist/collection/components/container/lido-container.js +2 -2
  6. package/dist/collection/components/home/lido-home.js +2 -1
  7. package/dist/collection/components/text/lido-text.js +1 -1
  8. package/dist/collection/utils/utils.js +11 -12
  9. package/dist/components/index.js +1 -1
  10. package/dist/components/lido-calculator.js +1 -1
  11. package/dist/components/lido-canvas.js +1 -1
  12. package/dist/components/lido-container.js +1 -1
  13. package/dist/components/lido-home.js +1 -1
  14. package/dist/components/lido-keyboard.js +1 -1
  15. package/dist/components/lido-root.js +1 -1
  16. package/dist/components/lido-text.js +1 -1
  17. package/dist/components/p-BTz3EQ20.js +1 -0
  18. package/dist/components/p-CwFY1Z9W.js +1 -0
  19. package/dist/components/{p-CBg54ApH.js → p-D3xRBDKa.js} +1 -1
  20. package/dist/components/{p-DVoNbO_j.js → p-DJRMkWry.js} +1 -1
  21. package/dist/components/{p-D5OuulAW.js → p-Rj3OoDuM.js} +1 -1
  22. package/dist/components/{p-v5QPz3yz.js → p-jz0c9WDH.js} +1 -1
  23. package/dist/esm/{decode-CT8SQ-Bc.js → decode-CT-ttsFh.js} +1 -1
  24. package/dist/esm/{index-DumOk5HE.js → index-Da41OKR1.js} +11 -12
  25. package/dist/esm/index.js +1 -1
  26. package/dist/esm/lido-avatar_22.entry.js +7 -6
  27. package/dist/lido-player/index.esm.js +1 -1
  28. package/dist/lido-player/lido-player.esm.js +1 -1
  29. package/dist/lido-player/{p-DWRQJAW3.js → p-CspJVyn4.js} +1 -1
  30. package/dist/lido-player/{p-DT7g3bxF.js → p-DO-Y_QEx.js} +1 -1
  31. package/dist/lido-player/{p-620b7bc6.entry.js → p-b3eca1a1.entry.js} +1 -1
  32. package/package.json +1 -1
  33. package/dist/components/p-BRBNRF2F.js +0 -1
  34. package/dist/components/p-DuWrKD5Z.js +0 -1
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-C1PT3dXa.js');
3
+ var index = require('./index-BDnxAitU.js');
4
4
 
5
5
  function _mergeNamespaces(n, m) {
6
6
  m.forEach(function (e) {
@@ -72266,6 +72266,17 @@ const executeActions = async (actionsString, thisElement, element) => {
72266
72266
  const container = document.getElementById(LidoContainer);
72267
72267
  if (container.getAttribute('canplay') === 'false')
72268
72268
  return;
72269
+ const balanceEl = document.querySelector('lido-balance');
72270
+ if (balanceEl) {
72271
+ const objectiveString = container['objective'];
72272
+ res = balanceResult(container, objectiveString);
72273
+ if (res) {
72274
+ await executeActions("this.showBalanceSymbol='true'", targetElement);
72275
+ }
72276
+ else {
72277
+ await executeActions("this.hideBalanceSymbol='true'", targetElement);
72278
+ }
72279
+ }
72269
72280
  if (container.getAttribute('is-continue-on-correct') !== 'true') {
72270
72281
  targetElement.style.pointerEvents = 'none';
72271
72282
  AudioPlayer.getI().stop();
@@ -72768,18 +72779,6 @@ const handleShowCheck = () => {
72768
72779
  const showCheck = container.getAttribute('show-check') == 'true';
72769
72780
  if (showCheck) {
72770
72781
  (_b = checkButton === null || checkButton === void 0 ? void 0 : checkButton.classList) === null || _b === void 0 ? void 0 : _b.remove('lido-disable-check-button');
72771
- const balanceEl = document.querySelector('lido-balance');
72772
- if (balanceEl) {
72773
- if (!checkButton.hasAttribute('data-balance-listener')) {
72774
- checkButton.addEventListener('click', async function onClick() {
72775
- if (balanceResult && res) {
72776
- await executeActions("this.showBalanceSymbol='true'", checkButton);
72777
- checkButton.removeEventListener('click', onClick);
72778
- }
72779
- });
72780
- checkButton.setAttribute('data-balance-listener', 'true');
72781
- }
72782
- }
72783
72782
  }
72784
72783
  else {
72785
72784
  if (!container.getAttribute("game-completed") && !container.querySelector("[type='slide']") && !container.querySelector("[type='category']")) {
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-C1PT3dXa.js');
3
+ var index = require('./index-BDnxAitU.js');
4
4
  require('./index-Dl8SlqP-.js');
5
5
 
6
6
 
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-Dl8SlqP-.js');
4
- var index$1 = require('./index-C1PT3dXa.js');
4
+ var index$1 = require('./index-BDnxAitU.js');
5
5
 
6
6
  var rive$1 = {exports: {}};
7
7
 
@@ -12222,7 +12222,7 @@ const LidoContainer = class {
12222
12222
  "quizMathShapes": "quizMathShapes" /* templateAudio.quizMathShapes */,
12223
12223
  "reorder": "reorder" /* templateAudio.reorder */,
12224
12224
  "rocketGame": "rocketGame" /* templateAudio.rocketGame */,
12225
- "rowBlock ": "rowBlock" /* templateAudio.rowBlock */,
12225
+ "rowBlock": "rowBlock" /* templateAudio.rowBlock */,
12226
12226
  "sequenceBox1": "sequenceBox1" /* templateAudio.sequenceBox1 */,
12227
12227
  "shapeTractor": "shapeTractor" /* templateAudio.shapeTractor */,
12228
12228
  "spellDoor": "spellDoor" /* templateAudio.spellDoor */,
@@ -12407,7 +12407,7 @@ const LidoContainer = class {
12407
12407
  userSelect: 'none', // Prevent any field selection
12408
12408
  };
12409
12409
  console.log('🚀 ~ LidoContainer ~ canplay:', this.canplay);
12410
- return (index.h(index.Host, { key: '251a6c4300e30a424f5bcf6099ee0f1252267de6', id: "lido-container", Lang: this.Lang, "tab-index": 0, class: "lido-container", objective: this.objective, baseUrl: this.baseUrl, style: style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, onTouch: this.onTouch, onInCorrect: this.onInCorrect, onCorrect: this.onCorrect, onEntry: this.onEntry, "show-check": `${this.showCheck}`, "is-continue-on-correct": `${this.isContinueOnCorrect}`, "is-allow-only-correct": `${this.isAllowOnlyCorrect}`, canplay: `${this.canplay}`, appendToDropOnCompletion: `${this.appendToDropOnCompletion}`, "show-prev-button": `${this.showPrevButton}`, "show-next-button": `${this.showNextButton}`, "show-drop-border": `${this.showDropBorder}`, "bg-image": this.bgImage, "exit-button-url": this.exitButtonUrl, "prev-button-url": this.prevButtonUrl, "next-button-url": this.nextButtonUrl, "speaker-button-url": this.speakerButtonUrl, "disable-speak": this.disableSpeak, "template-id": this.templateId, audio: this.audio, "highlight-word-by-word": `${this.highlightWordByWord}` }, index.h("lido-text", { key: '0ae4e3e6cc9d82969e396f0af924630565fa548b', visible: "false", id: this.templateId, audio: "", string: this.instructName }), index.h("slot", { key: 'e93ea96beb6733bf8d8f0e7c2ff11a7f2cda09a8' })));
12410
+ return (index.h(index.Host, { key: '9969d4eee1befeb5b5a82fdce7c58aa44abc179c', id: "lido-container", Lang: this.Lang, "tab-index": 0, class: "lido-container", objective: this.objective, baseUrl: this.baseUrl, style: style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, onTouch: this.onTouch, onInCorrect: this.onInCorrect, onCorrect: this.onCorrect, onEntry: this.onEntry, "show-check": `${this.showCheck}`, "is-continue-on-correct": `${this.isContinueOnCorrect}`, "is-allow-only-correct": `${this.isAllowOnlyCorrect}`, canplay: `${this.canplay}`, appendToDropOnCompletion: `${this.appendToDropOnCompletion}`, "show-prev-button": `${this.showPrevButton}`, "show-next-button": `${this.showNextButton}`, "show-drop-border": `${this.showDropBorder}`, "bg-image": this.bgImage, "exit-button-url": this.exitButtonUrl, "prev-button-url": this.prevButtonUrl, "next-button-url": this.nextButtonUrl, "speaker-button-url": this.speakerButtonUrl, "disable-speak": `${this.disableSpeak}`, "template-id": this.templateId, audio: this.audio, "highlight-word-by-word": `${this.highlightWordByWord}` }, index.h("lido-text", { key: 'c5476a7d3e16bb1b5608046d9f0b54f757003706', visible: "false", id: this.templateId, audio: "", string: this.instructName }), index.h("slot", { key: '7523757d12373c3355815012ed6a93abcb839f71' })));
12411
12411
  }
12412
12412
  get el() { return index.getElement(this); }
12413
12413
  static get watchers() { return {
@@ -12931,7 +12931,7 @@ const LidoHome = class {
12931
12931
  }
12932
12932
  // Pure-JS fallback (no wasm asset required)
12933
12933
  try {
12934
- const brotliDecodeModule = await Promise.resolve().then(function () { return require('./decode-C80xU-sR.js'); }).then(function (n) { return n.decode; });
12934
+ const brotliDecodeModule = await Promise.resolve().then(function () { return require('./decode-BCtIYiSY.js'); }).then(function (n) { return n.decode; });
12935
12935
  const brotliDecompressBuffer = brotliDecodeModule.BrotliDecompressBuffer ||
12936
12936
  ((_a = brotliDecodeModule.default) === null || _a === void 0 ? void 0 : _a.BrotliDecompressBuffer);
12937
12937
  if (typeof brotliDecompressBuffer !== 'function') {
@@ -13200,7 +13200,8 @@ const LidoHome = class {
13200
13200
  const tabIndex = el.getAttribute('tab-index');
13201
13201
  const htmlel = el;
13202
13202
  if (tabIndex && Number(tabIndex) > 0) {
13203
- if (el && el.getAttribute('disable-speak') !== 'true') {
13203
+ if (el && (el.getAttribute('disable-speak') !== 'true') || !el.getAttribute("disable-speak")) {
13204
+ console.log("disbale speak thing : ", el.getAttribute("diable-speak"), !el.getAttribute("diable-speak"));
13204
13205
  await index$1.AudioPlayer.getI().play(htmlel);
13205
13206
  }
13206
13207
  if (index$1.getCancelBtnPopup()) {
@@ -17883,7 +17884,7 @@ const LidoText = class {
17883
17884
  }
17884
17885
  }
17885
17886
  render() {
17886
- return (index.h(index.Host, { key: '7b3c230890775e489b3d2bc2abca683078211377', 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 !== '' ? index.h("div", { class: "lido-text-content" }, " ", instance.t(this.string)) : instance.t(this.string)));
17887
+ return (index.h(index.Host, { key: '35218060c543c6775c92989779e173af4702b0d8', 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 !== '' ? index.h("div", { class: "lido-text-content" }, " ", instance.t(this.string)) : instance.t(this.string)));
17887
17888
  }
17888
17889
  get el() { return index.getElement(this); }
17889
17890
  };
@@ -239,7 +239,7 @@ export class LidoContainer {
239
239
  "quizMathShapes": "quizMathShapes" /* templateAudio.quizMathShapes */,
240
240
  "reorder": "reorder" /* templateAudio.reorder */,
241
241
  "rocketGame": "rocketGame" /* templateAudio.rocketGame */,
242
- "rowBlock ": "rowBlock" /* templateAudio.rowBlock */,
242
+ "rowBlock": "rowBlock" /* templateAudio.rowBlock */,
243
243
  "sequenceBox1": "sequenceBox1" /* templateAudio.sequenceBox1 */,
244
244
  "shapeTractor": "shapeTractor" /* templateAudio.shapeTractor */,
245
245
  "spellDoor": "spellDoor" /* templateAudio.spellDoor */,
@@ -424,7 +424,7 @@ export class LidoContainer {
424
424
  userSelect: 'none', // Prevent any field selection
425
425
  };
426
426
  console.log('🚀 ~ LidoContainer ~ canplay:', this.canplay);
427
- return (h(Host, { key: '251a6c4300e30a424f5bcf6099ee0f1252267de6', id: "lido-container", Lang: this.Lang, "tab-index": 0, class: "lido-container", objective: this.objective, baseUrl: this.baseUrl, style: style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, onTouch: this.onTouch, onInCorrect: this.onInCorrect, onCorrect: this.onCorrect, onEntry: this.onEntry, "show-check": `${this.showCheck}`, "is-continue-on-correct": `${this.isContinueOnCorrect}`, "is-allow-only-correct": `${this.isAllowOnlyCorrect}`, canplay: `${this.canplay}`, appendToDropOnCompletion: `${this.appendToDropOnCompletion}`, "show-prev-button": `${this.showPrevButton}`, "show-next-button": `${this.showNextButton}`, "show-drop-border": `${this.showDropBorder}`, "bg-image": this.bgImage, "exit-button-url": this.exitButtonUrl, "prev-button-url": this.prevButtonUrl, "next-button-url": this.nextButtonUrl, "speaker-button-url": this.speakerButtonUrl, "disable-speak": this.disableSpeak, "template-id": this.templateId, audio: this.audio, "highlight-word-by-word": `${this.highlightWordByWord}` }, h("lido-text", { key: '0ae4e3e6cc9d82969e396f0af924630565fa548b', visible: "false", id: this.templateId, audio: "", string: this.instructName }), h("slot", { key: 'e93ea96beb6733bf8d8f0e7c2ff11a7f2cda09a8' })));
427
+ return (h(Host, { key: '9969d4eee1befeb5b5a82fdce7c58aa44abc179c', id: "lido-container", Lang: this.Lang, "tab-index": 0, class: "lido-container", objective: this.objective, baseUrl: this.baseUrl, style: style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, onTouch: this.onTouch, onInCorrect: this.onInCorrect, onCorrect: this.onCorrect, onEntry: this.onEntry, "show-check": `${this.showCheck}`, "is-continue-on-correct": `${this.isContinueOnCorrect}`, "is-allow-only-correct": `${this.isAllowOnlyCorrect}`, canplay: `${this.canplay}`, appendToDropOnCompletion: `${this.appendToDropOnCompletion}`, "show-prev-button": `${this.showPrevButton}`, "show-next-button": `${this.showNextButton}`, "show-drop-border": `${this.showDropBorder}`, "bg-image": this.bgImage, "exit-button-url": this.exitButtonUrl, "prev-button-url": this.prevButtonUrl, "next-button-url": this.nextButtonUrl, "speaker-button-url": this.speakerButtonUrl, "disable-speak": `${this.disableSpeak}`, "template-id": this.templateId, audio: this.audio, "highlight-word-by-word": `${this.highlightWordByWord}` }, h("lido-text", { key: 'c5476a7d3e16bb1b5608046d9f0b54f757003706', visible: "false", id: this.templateId, audio: "", string: this.instructName }), h("slot", { key: '7523757d12373c3355815012ed6a93abcb839f71' })));
428
428
  }
429
429
  static get is() { return "lido-container"; }
430
430
  static get originalStyleUrls() {
@@ -540,7 +540,8 @@ export class LidoHome {
540
540
  const tabIndex = el.getAttribute('tab-index');
541
541
  const htmlel = el;
542
542
  if (tabIndex && Number(tabIndex) > 0) {
543
- if (el && el.getAttribute('disable-speak') !== 'true') {
543
+ if (el && (el.getAttribute('disable-speak') !== 'true') || !el.getAttribute("disable-speak")) {
544
+ console.log("disbale speak thing : ", el.getAttribute("diable-speak"), !el.getAttribute("diable-speak"));
544
545
  await AudioPlayer.getI().play(htmlel);
545
546
  }
546
547
  if (getCancelBtnPopup()) {
@@ -256,7 +256,7 @@ export class LidoText {
256
256
  }
257
257
  }
258
258
  render() {
259
- return (h(Host, { key: '7b3c230890775e489b3d2bc2abca683078211377', 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" }, " ", i18next.t(this.string)) : i18next.t(this.string)));
259
+ return (h(Host, { key: '35218060c543c6775c92989779e173af4702b0d8', 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" }, " ", i18next.t(this.string)) : i18next.t(this.string)));
260
260
  }
261
261
  static get is() { return "lido-text"; }
262
262
  static get originalStyleUrls() {
@@ -188,6 +188,17 @@ export const executeActions = async (actionsString, thisElement, element) => {
188
188
  const container = document.getElementById(LidoContainer);
189
189
  if (container.getAttribute('canplay') === 'false')
190
190
  return;
191
+ const balanceEl = document.querySelector('lido-balance');
192
+ if (balanceEl) {
193
+ const objectiveString = container['objective'];
194
+ res = balanceResult(container, objectiveString);
195
+ if (res) {
196
+ await executeActions("this.showBalanceSymbol='true'", targetElement);
197
+ }
198
+ else {
199
+ await executeActions("this.hideBalanceSymbol='true'", targetElement);
200
+ }
201
+ }
191
202
  if (container.getAttribute('is-continue-on-correct') !== 'true') {
192
203
  targetElement.style.pointerEvents = 'none';
193
204
  AudioPlayer.getI().stop();
@@ -690,18 +701,6 @@ export const handleShowCheck = () => {
690
701
  const showCheck = container.getAttribute('show-check') == 'true';
691
702
  if (showCheck) {
692
703
  (_b = checkButton === null || checkButton === void 0 ? void 0 : checkButton.classList) === null || _b === void 0 ? void 0 : _b.remove('lido-disable-check-button');
693
- const balanceEl = document.querySelector('lido-balance');
694
- if (balanceEl) {
695
- if (!checkButton.hasAttribute('data-balance-listener')) {
696
- checkButton.addEventListener('click', async function onClick() {
697
- if (balanceResult && res) {
698
- await executeActions("this.showBalanceSymbol='true'", checkButton);
699
- checkButton.removeEventListener('click', onClick);
700
- }
701
- });
702
- checkButton.setAttribute('data-balance-listener', 'true');
703
- }
704
- }
705
704
  }
706
705
  else {
707
706
  if (!container.getAttribute("game-completed") && !container.querySelector("[type='slide']") && !container.querySelector("[type='category']")) {