lido-player 0.0.2-alpha-1 → 0.0.2-alpha-2
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/app-col_12.cjs.entry.js +20 -12
- package/dist/cjs/app-col_12.cjs.entry.js.map +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/lido-player.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{utils-8ac0e3b7.js → utils-5eeb6512.js} +18 -3
- package/dist/cjs/utils-5eeb6512.js.map +1 -0
- package/dist/collection/components/container/AppContainer.js +20 -1
- package/dist/collection/components/container/AppContainer.js.map +1 -1
- package/dist/collection/components/home/AppHome.js +20 -1
- package/dist/collection/components/home/AppHome.js.map +1 -1
- package/dist/collection/components/image/AppImage.js +2 -2
- package/dist/collection/components/image/AppImage.js.map +1 -1
- package/dist/collection/components/root/AppRoot.js +32 -8
- package/dist/collection/components/root/AppRoot.js.map +1 -1
- package/dist/collection/components/root/assets/xmlData.xml +169 -117
- package/dist/collection/utils/utils.js +16 -2
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/app-col.js +1 -1
- package/dist/components/app-container.js +1 -1
- package/dist/components/app-home.js +1 -1
- package/dist/components/app-image.js +1 -1
- package/dist/components/app-pos.js +1 -1
- package/dist/components/app-root.js +25 -18
- package/dist/components/app-root.js.map +1 -1
- package/dist/components/app-row.js +1 -1
- package/dist/components/app-shape.js +1 -1
- package/dist/components/app-text.js +1 -1
- package/dist/components/app-trace.js +1 -1
- package/dist/components/app-wrap.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/{p-aa381e73.js → p-0b0798f2.js} +2 -2
- package/dist/components/{p-aa381e73.js.map → p-0b0798f2.js.map} +1 -1
- package/dist/components/{p-8bc122ff.js → p-31575e90.js} +2 -2
- package/dist/components/{p-8bc122ff.js.map → p-31575e90.js.map} +1 -1
- package/dist/{esm/utils-cbfaa4d8.js → components/p-3bb09d53.js} +18 -4
- package/dist/components/p-3bb09d53.js.map +1 -0
- package/dist/components/{p-350205d5.js → p-3bf2f3d8.js} +2 -2
- package/dist/components/{p-350205d5.js.map → p-3bf2f3d8.js.map} +1 -1
- package/dist/components/{p-c9a89df3.js → p-590cd7cc.js} +2 -2
- package/dist/components/{p-c9a89df3.js.map → p-590cd7cc.js.map} +1 -1
- package/dist/components/{p-bb0a3ffa.js → p-7c78da26.js} +2 -2
- package/dist/components/{p-bb0a3ffa.js.map → p-7c78da26.js.map} +1 -1
- package/dist/components/{p-c0c3e960.js → p-af356ca3.js} +6 -4
- package/dist/components/p-af356ca3.js.map +1 -0
- package/dist/components/{p-639f58cb.js → p-d1055dc6.js} +2 -2
- package/dist/components/{p-639f58cb.js.map → p-d1055dc6.js.map} +1 -1
- package/dist/components/{p-34c825bf.js → p-d8783e81.js} +3 -3
- package/dist/components/p-d8783e81.js.map +1 -0
- package/dist/components/{p-e509500a.js → p-e939882f.js} +2 -2
- package/dist/components/{p-e509500a.js.map → p-e939882f.js.map} +1 -1
- package/dist/components/{p-dee011ef.js → p-f3062e1a.js} +14 -12
- package/dist/components/p-f3062e1a.js.map +1 -0
- package/dist/esm/app-col_12.entry.js +20 -12
- package/dist/esm/app-col_12.entry.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/lido-player.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/{components/p-4db699ee.js → esm/utils-5df13f57.js} +18 -4
- package/dist/esm/utils-5df13f57.js.map +1 -0
- package/dist/lido-player/assets/xmlData.xml +169 -117
- 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-3bb09d53.js +2 -0
- package/dist/lido-player/p-3bb09d53.js.map +1 -0
- package/dist/lido-player/p-fc201574.entry.js +2 -0
- package/dist/lido-player/p-fc201574.entry.js.map +1 -0
- package/dist/types/components/container/AppContainer.d.ts +4 -0
- package/dist/types/components/home/AppHome.d.ts +4 -0
- package/dist/types/components/root/AppRoot.d.ts +4 -0
- package/dist/types/components.d.ts +24 -0
- package/dist/types/utils/utils.d.ts +1 -0
- package/package.json +1 -1
- package/dist/cjs/utils-8ac0e3b7.js.map +0 -1
- package/dist/components/p-34c825bf.js.map +0 -1
- package/dist/components/p-4db699ee.js.map +0 -1
- package/dist/components/p-c0c3e960.js.map +0 -1
- package/dist/components/p-dee011ef.js.map +0 -1
- package/dist/esm/utils-cbfaa4d8.js.map +0 -1
- package/dist/lido-player/p-4db699ee.js +0 -2
- package/dist/lido-player/p-4db699ee.js.map +0 -1
- package/dist/lido-player/p-ec4f8898.entry.js +0 -2
- package/dist/lido-player/p-ec4f8898.entry.js.map +0 -1
|
@@ -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-5eeb6512.js');
|
|
7
7
|
|
|
8
8
|
const appColCss = ".col{top:var(--y, 0);left:var(--x, 0);height:var(--height, 100%);width:var(--width, 100%);background-color:var(--bgColor, #eeeeee);padding:15px;border-radius:10px;display:flex;justify-content:space-around;flex-direction:column;align-items:center}.col>*{}";
|
|
9
9
|
const AppColStyle0 = appColCss;
|
|
@@ -86,6 +86,7 @@ const AppContainer = class {
|
|
|
86
86
|
this.onIncorrectTouch = undefined;
|
|
87
87
|
this.onEntry = undefined;
|
|
88
88
|
this.canplay = true;
|
|
89
|
+
this.baseUrl = '';
|
|
89
90
|
}
|
|
90
91
|
/**
|
|
91
92
|
* Scales the container based on the window or screen size, maintaining the aspect ratio.
|
|
@@ -133,7 +134,7 @@ const AppContainer = class {
|
|
|
133
134
|
transform: 'translate(-50%, -50%)', // Centering the container
|
|
134
135
|
};
|
|
135
136
|
console.log('🚀 ~ AppContainer ~ canplay:', this.canplay);
|
|
136
|
-
return (index.h(index.Host, { key: '
|
|
137
|
+
return (index.h(index.Host, { key: 'b9a426ecbea1635883a1cb841f36e7c1d8e55caa', id: "container", tabindex: 0, class: "container", objective: this.objective, style: style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, onTouch: this.onTouch, onMatch: this.onMatch, onWrong: this.onWrong, onIncorrectTouch: this.onIncorrectTouch, onCorrectMatch: this.onCorrectMatch, onCorrectTouch: this.onCorrectTouch, onEntry: this.onEntry, baseUrl: this.baseUrl }, index.h("slot", { key: '2f55d759f184ebb7f5771f6e6e9c0cc9da4621d8' })));
|
|
137
138
|
}
|
|
138
139
|
get el() { return index.getElement(this); }
|
|
139
140
|
};
|
|
@@ -187,6 +188,7 @@ const AppHome = class {
|
|
|
187
188
|
this.xmlData = undefined;
|
|
188
189
|
this.initialIndex = 0;
|
|
189
190
|
this.canplay = true;
|
|
191
|
+
this.baseUrl = '';
|
|
190
192
|
this.currentContainerIndex = this.initialIndex;
|
|
191
193
|
this.showCompletionMessage = false;
|
|
192
194
|
this.containers = [];
|
|
@@ -263,7 +265,7 @@ const AppHome = class {
|
|
|
263
265
|
.filter(Boolean);
|
|
264
266
|
// Map XML tags to Stencil components
|
|
265
267
|
const componentMapping = {
|
|
266
|
-
'app-container': (index.h("app-container", Object.assign({}, props, { canplay: this.canplay }), children)),
|
|
268
|
+
'app-container': (index.h("app-container", Object.assign({}, props, { canplay: this.canplay, baseUrl: this.baseUrl }), children)),
|
|
267
269
|
'app-col': index.h("app-col", Object.assign({}, props), children),
|
|
268
270
|
'app-trace': index.h("app-trace", Object.assign({}, props), children),
|
|
269
271
|
'app-image': index.h("app-image", Object.assign({}, props), children),
|
|
@@ -375,7 +377,7 @@ const AppImage = class {
|
|
|
375
377
|
alignItems: 'center', // Vertically center the image
|
|
376
378
|
justifyContent: 'center', // Horizontally center the image
|
|
377
379
|
};
|
|
378
|
-
return (index.h(index.Host, { key: '
|
|
380
|
+
return (index.h(index.Host, { key: '34c70a3d120b96080892e45da7d97c01778358e1', type: this.type, tabindex: this.tabIndex, style: style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, value: this.value, audio: this.audio, onTouch: this.onTouch, onMatch: this.onMatch, onWrong: this.onWrong, onCorrectMatch: this.onCorrectMatch, onCorrectTouch: this.onCorrectTouch, onInCorrectTouch: this.onInCorrectTouch, onEntry: this.onEntry }, index.h("img", { key: '9c5f71bf1fbdad17f0f57081e981a712837f6ea4', class: "image", src: utils.convertUrlToRelative(this.src), alt: "", style: style })));
|
|
379
381
|
}
|
|
380
382
|
get el() { return index.getElement(this); }
|
|
381
383
|
};
|
|
@@ -499,6 +501,7 @@ const AppRoot = class {
|
|
|
499
501
|
this.xmlPath = undefined;
|
|
500
502
|
this.initialIndex = 0;
|
|
501
503
|
this.canplay = true;
|
|
504
|
+
this.baseUrl = '';
|
|
502
505
|
this.xmlData = undefined;
|
|
503
506
|
}
|
|
504
507
|
/**
|
|
@@ -506,16 +509,21 @@ const AppRoot = class {
|
|
|
506
509
|
* It fetches the XML data from the specified path or URL and sets it to the component's state.
|
|
507
510
|
*/
|
|
508
511
|
async componentWillLoad() {
|
|
512
|
+
var _a;
|
|
509
513
|
// Validate the xmlPath prop
|
|
510
|
-
if (!this.xmlPath) {
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
}
|
|
514
|
+
// if (!this.xmlPath) {
|
|
515
|
+
// console.error('XML path is not provided.');
|
|
516
|
+
// return;
|
|
517
|
+
// }
|
|
518
|
+
const xmlPath = (_a = this.xmlPath) !== null && _a !== void 0 ? _a : this.baseUrl + '/index.xml';
|
|
519
|
+
console.log('🚀 ~ AppRoot ~ componentWillLoad ~ this.baseUrl:', this.baseUrl);
|
|
520
|
+
console.log('🚀 ~ AppRoot ~ componentWillLoad ~ this.xmlPath:', this.xmlPath);
|
|
521
|
+
console.log('🚀 ~ AppRoot ~ componentWillLoad ~ xmlPath:', xmlPath);
|
|
514
522
|
// Fetch the XML data
|
|
515
523
|
try {
|
|
516
|
-
const resolvedPath =
|
|
517
|
-
?
|
|
518
|
-
: index.getAssetPath(
|
|
524
|
+
const resolvedPath = xmlPath.startsWith('http')
|
|
525
|
+
? xmlPath // Use the provided URL if it's an HTTP/HTTPS link
|
|
526
|
+
: index.getAssetPath(xmlPath); // Otherwise, resolve it as an asset path
|
|
519
527
|
const response = await fetch(resolvedPath);
|
|
520
528
|
if (!response.ok) {
|
|
521
529
|
throw new Error(`Failed to fetch XML data: ${response.statusText}`);
|
|
@@ -539,7 +547,7 @@ const AppRoot = class {
|
|
|
539
547
|
return index.h("div", null, "Error loading XML data. Please check the path or URL.");
|
|
540
548
|
}
|
|
541
549
|
// Once the XML data is loaded, pass it to the `app-home` component
|
|
542
|
-
return index.h("app-home", { initialIndex: this.initialIndex, canplay: this.canplay, xmlData: this.xmlData });
|
|
550
|
+
return index.h("app-home", { initialIndex: this.initialIndex, canplay: this.canplay, xmlData: this.xmlData, baseUrl: this.baseUrl });
|
|
543
551
|
}
|
|
544
552
|
static get assetsDirs() { return ["assets"]; }
|
|
545
553
|
};
|