lido-player 0.0.2-alpha-6 → 0.0.2-alpha-7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/lido-avatar_13.cjs.entry.js +25 -5
- package/dist/cjs/lido-avatar_13.cjs.entry.js.map +1 -1
- package/dist/cjs/lido-player.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{utils-4ace217f.js → utils-2740b263.js} +33 -3
- package/dist/cjs/utils-2740b263.js.map +1 -0
- package/dist/collection/components/container/lido-container.js +22 -5
- package/dist/collection/components/container/lido-container.js.map +1 -1
- package/dist/collection/components/home/lido-home.js +21 -2
- package/dist/collection/components/home/lido-home.js.map +1 -1
- package/dist/collection/components/root/assets/xmlData.xml +406 -369
- package/dist/collection/utils/utils.js +32 -2
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/lido-avatar.js +1 -1
- package/dist/components/lido-col.js +1 -1
- package/dist/components/lido-container.js +1 -1
- package/dist/components/lido-home.js +1 -1
- package/dist/components/lido-image.js +1 -1
- package/dist/components/lido-pos.js +1 -1
- package/dist/components/lido-root.js +11 -11
- package/dist/components/lido-row.js +1 -1
- package/dist/components/lido-shape.js +1 -1
- package/dist/components/lido-text.js +1 -1
- package/dist/components/lido-trace.js +1 -1
- package/dist/components/lido-wrap.js +1 -1
- package/dist/components/{p-a8b9f142.js → p-0920af1c.js} +2 -2
- package/dist/components/{p-a8b9f142.js.map → p-0920af1c.js.map} +1 -1
- package/dist/components/{p-ed3f367a.js → p-0fd91021.js} +23 -4
- package/dist/components/p-0fd91021.js.map +1 -0
- package/dist/components/{p-2bf37db5.js → p-1255476d.js} +2 -2
- package/dist/components/{p-2bf37db5.js.map → p-1255476d.js.map} +1 -1
- package/dist/components/{p-582f47c6.js → p-29365fd6.js} +2 -2
- package/dist/components/{p-582f47c6.js.map → p-29365fd6.js.map} +1 -1
- package/dist/components/{p-d550370a.js → p-3b1e591d.js} +2 -2
- package/dist/components/{p-d550370a.js.map → p-3b1e591d.js.map} +1 -1
- package/dist/components/{p-e358a2a0.js → p-69faad88.js} +2 -2
- package/dist/components/{p-e358a2a0.js.map → p-69faad88.js.map} +1 -1
- package/dist/components/{p-d35a77e7.js → p-86a0612f.js} +2 -2
- package/dist/components/{p-d35a77e7.js.map → p-86a0612f.js.map} +1 -1
- package/dist/components/{p-9d05debc.js → p-a501f1b8.js} +2 -2
- package/dist/components/{p-9d05debc.js.map → p-a501f1b8.js.map} +1 -1
- package/dist/components/{p-e4eaf007.js → p-ae2fab80.js} +2 -2
- package/dist/components/{p-e4eaf007.js.map → p-ae2fab80.js.map} +1 -1
- package/dist/components/{p-30f9bddd.js → p-cec49e6e.js} +33 -3
- package/dist/components/{p-30f9bddd.js.map → p-cec49e6e.js.map} +1 -1
- package/dist/components/{p-e994620a.js → p-d1411ddb.js} +2 -2
- package/dist/components/{p-e994620a.js.map → p-d1411ddb.js.map} +1 -1
- package/dist/components/{p-946049d8.js → p-d4c95792.js} +16 -14
- package/dist/components/p-d4c95792.js.map +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/lido-avatar_13.entry.js +25 -5
- package/dist/esm/lido-avatar_13.entry.js.map +1 -1
- package/dist/esm/lido-player.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-64a312c4.js → utils-ebdd7526.js} +33 -3
- package/dist/esm/utils-ebdd7526.js.map +1 -0
- package/dist/lido-player/assets/xmlData.xml +406 -369
- package/dist/lido-player/index.esm.js +1 -1
- package/dist/lido-player/lido-player.esm.js +1 -1
- package/dist/lido-player/lido-player.esm.js.map +1 -1
- package/dist/lido-player/p-fab4fa17.js +2 -0
- package/dist/lido-player/p-fab4fa17.js.map +1 -0
- package/dist/lido-player/{p-8a6e5ca0.entry.js → p-fc012d18.entry.js} +2 -2
- package/dist/lido-player/p-fc012d18.entry.js.map +1 -0
- package/dist/types/components/container/lido-container.d.ts +1 -0
- package/dist/types/components/home/lido-home.d.ts +4 -0
- package/dist/types/components.d.ts +10 -2
- package/package.json +1 -1
- package/dist/cjs/utils-4ace217f.js.map +0 -1
- package/dist/components/p-946049d8.js.map +0 -1
- package/dist/components/p-ed3f367a.js.map +0 -1
- package/dist/esm/utils-64a312c4.js.map +0 -1
- package/dist/lido-player/p-37d3ffb2.js +0 -2
- package/dist/lido-player/p-37d3ffb2.js.map +0 -1
- package/dist/lido-player/p-8a6e5ca0.entry.js.map +0 -1
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-0d28e716.js');
|
|
6
|
-
const utils = require('./utils-
|
|
6
|
+
const utils = require('./utils-2740b263.js');
|
|
7
7
|
|
|
8
8
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
9
9
|
|
|
@@ -6675,6 +6675,23 @@ const LidoContainer = class {
|
|
|
6675
6675
|
this.isAllowOnlyCorrect = false;
|
|
6676
6676
|
this.baseUrl = '';
|
|
6677
6677
|
}
|
|
6678
|
+
convertToPixels(height, parentElement = document.body) {
|
|
6679
|
+
if (!height)
|
|
6680
|
+
return 0; // Handle empty or invalid input
|
|
6681
|
+
// Directly return numbers if already in pixels
|
|
6682
|
+
if (height.endsWith('px')) {
|
|
6683
|
+
return parseFloat(height);
|
|
6684
|
+
}
|
|
6685
|
+
// Convert relative units
|
|
6686
|
+
const tempElement = document.createElement('div');
|
|
6687
|
+
tempElement.style.position = 'absolute';
|
|
6688
|
+
tempElement.style.visibility = 'hidden';
|
|
6689
|
+
tempElement.style.height = height;
|
|
6690
|
+
parentElement.appendChild(tempElement);
|
|
6691
|
+
const computedHeight = tempElement.offsetHeight;
|
|
6692
|
+
parentElement.removeChild(tempElement);
|
|
6693
|
+
return computedHeight;
|
|
6694
|
+
}
|
|
6678
6695
|
/**
|
|
6679
6696
|
* Scales the container based on the window or screen size, maintaining the aspect ratio.
|
|
6680
6697
|
* The container scales according to the minimum dimension of the screen.
|
|
@@ -6684,11 +6701,13 @@ const LidoContainer = class {
|
|
|
6684
6701
|
scaleContainer(container) {
|
|
6685
6702
|
var _a;
|
|
6686
6703
|
const widths = [window.innerWidth];
|
|
6704
|
+
// const heights = [window.innerHeight];
|
|
6687
6705
|
if ((_a = window.screen) === null || _a === void 0 ? void 0 : _a.width) {
|
|
6688
6706
|
widths.push(window.screen.width);
|
|
6707
|
+
// heights.push(window.screen.height);
|
|
6689
6708
|
}
|
|
6690
6709
|
const width = Math.min(...widths);
|
|
6691
|
-
const height = document.documentElement.clientHeight;
|
|
6710
|
+
const height = this.height ? this.convertToPixels(this.height) : document.documentElement.clientHeight;
|
|
6692
6711
|
const scaleX = width / 1600; // Scale based on a reference width of 1600px
|
|
6693
6712
|
const scaleY = height / 900; // Scale based on a reference height of 900px
|
|
6694
6713
|
const scale = Math.min(scaleX, scaleY);
|
|
@@ -6721,7 +6740,7 @@ const LidoContainer = class {
|
|
|
6721
6740
|
transform: 'translate(-50%, -50%)', // Centering the container
|
|
6722
6741
|
};
|
|
6723
6742
|
console.log('🚀 ~ LidoContainer ~ canplay:', this.canplay);
|
|
6724
|
-
return (index.h(index.Host, { key: '
|
|
6743
|
+
return (index.h(index.Host, { key: '96c4e07b2e62aa2071d386da3d56d20b35778bd4', id: "lido-container", tabindex: 0, class: "lido-container", objective: this.objective, style: style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, onTouch: this.onTouch, onInCorrect: this.onInCorrect, onCorrect: this.onCorrect, onEntry: this.onEntry, showCheck: `${this.showCheck}`, isContinueOnCorrect: `${this.isContinueOnCorrect}`, isAllowOnlyCorrect: `${this.isAllowOnlyCorrect}`, canplay: `${this.canplay}` }, index.h("slot", { key: '30c3337dbd0d963c0d0a308f5b2a6d3e5514e15b' })));
|
|
6725
6744
|
}
|
|
6726
6745
|
get el() { return index.getElement(this); }
|
|
6727
6746
|
};
|
|
@@ -6780,6 +6799,7 @@ const LidoHome = class {
|
|
|
6780
6799
|
this.initialIndex = 0;
|
|
6781
6800
|
this.canplay = true;
|
|
6782
6801
|
this.baseUrl = '';
|
|
6802
|
+
this.height = '200px';
|
|
6783
6803
|
this.currentContainerIndex = this.initialIndex;
|
|
6784
6804
|
this.showCompletionMessage = false;
|
|
6785
6805
|
this.containers = [];
|
|
@@ -6856,7 +6876,7 @@ const LidoHome = class {
|
|
|
6856
6876
|
.filter(Boolean);
|
|
6857
6877
|
// Map XML tags to Stencil components
|
|
6858
6878
|
const componentMapping = {
|
|
6859
|
-
'lido-container': (index.h("lido-container", Object.assign({}, props, { canplay: this.canplay, baseUrl: this.baseUrl }), children)),
|
|
6879
|
+
'lido-container': (index.h("lido-container", Object.assign({}, props, { canplay: this.canplay, baseUrl: this.baseUrl, height: this.height }), children)),
|
|
6860
6880
|
'lido-col': index.h("lido-col", Object.assign({}, props), children),
|
|
6861
6881
|
'lido-trace': index.h("lido-trace", Object.assign({}, props), children),
|
|
6862
6882
|
'lido-image': index.h("lido-image", Object.assign({}, props), children),
|
|
@@ -6899,7 +6919,7 @@ const LidoHome = class {
|
|
|
6899
6919
|
* Clicking on a dot allows the user to jump to a specific container.
|
|
6900
6920
|
*/
|
|
6901
6921
|
renderDots() {
|
|
6902
|
-
const style = { pointerEvents: this.canplay ?
|
|
6922
|
+
const style = { pointerEvents: this.canplay ? 'none' : '' };
|
|
6903
6923
|
return (index.h("div", { id: "lido-dot-indicator", class: "lido-dot-container", style: style }, this.containers.map((_, index$1) => (index.h("span", { class: `lido-dot ${index$1 < this.currentContainerIndex ? 'completed' : index$1 === this.currentContainerIndex ? 'current' : ''}`, onClick: () => this.jumpToContainer(index$1) })))));
|
|
6904
6924
|
}
|
|
6905
6925
|
/**
|