lido-player 0.0.2-alpha-3 → 0.0.2-alpha-5
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-0d28e716.js +14 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/{app-col_12.cjs.entry.js → lido-col_12.cjs.entry.js} +118 -122
- package/dist/cjs/lido-col_12.cjs.entry.js.map +1 -0
- package/dist/cjs/lido-player.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{utils-64490acd.js → utils-71eb1ea0.js} +418 -130
- package/dist/cjs/utils-71eb1ea0.js.map +1 -0
- package/dist/collection/collection-manifest.json +12 -12
- package/dist/collection/components/column/{app-col.css → lido-col.css} +2 -2
- package/dist/collection/components/column/{AppCol.js → lido-col.js} +10 -28
- package/dist/collection/components/column/lido-col.js.map +1 -0
- package/dist/collection/components/container/{app-container.css → lido-container.css} +1 -1
- package/dist/collection/components/container/{AppContainer.js → lido-container.js} +9 -9
- package/dist/collection/components/container/lido-container.js.map +1 -0
- package/dist/collection/components/home/{app-home.css → lido-home.css} +6 -6
- package/dist/collection/components/home/{AppHome.js → lido-home.js} +39 -35
- package/dist/collection/components/home/lido-home.js.map +1 -0
- package/dist/collection/components/image/{app-image.css → lido-image.css} +1 -1
- package/dist/collection/components/image/{AppImage.js → lido-image.js} +8 -26
- package/dist/collection/components/image/lido-image.js.map +1 -0
- package/dist/collection/components/position/{app-pos.css → lido-pos.css} +2 -2
- package/dist/collection/components/position/{AppPos.js → lido-pos.js} +8 -26
- package/dist/collection/components/position/lido-pos.js.map +1 -0
- package/dist/collection/components/random/{app-random.css → lido-random.css} +2 -2
- package/dist/collection/components/random/{AppRandom.js → lido-random.js} +9 -27
- package/dist/collection/components/random/lido-random.js.map +1 -0
- package/dist/collection/components/root/assets/xmlData.xml +164 -74
- package/dist/collection/components/root/{AppRoot.js → lido-root.js} +11 -11
- package/dist/collection/components/root/lido-root.js.map +1 -0
- package/dist/collection/components/row/{app-row.css → lido-row.css} +2 -2
- package/dist/collection/components/row/{AppRow.js → lido-row.js} +8 -26
- package/dist/collection/components/row/lido-row.js.map +1 -0
- package/dist/collection/components/shape/{app-shape.css → lido-shape.css} +14 -14
- package/dist/collection/components/shape/{AppShape.js → lido-shape.js} +8 -26
- package/dist/collection/components/shape/lido-shape.js.map +1 -0
- package/dist/collection/components/text/{app-text.css → lido-text.css} +2 -2
- package/dist/collection/components/text/{AppText.js → lido-text.js} +15 -15
- package/dist/collection/components/text/lido-text.js.map +1 -0
- package/dist/collection/components/trace/{app-trace.css → lido-trace.css} +7 -7
- package/dist/collection/components/trace/{app-trace.js → lido-trace.js} +14 -14
- package/dist/collection/components/trace/lido-trace.js.map +1 -0
- package/dist/collection/components/wrap/{app-wrap.css → lido-wrap.css} +2 -2
- package/dist/collection/components/wrap/{AppWrap.js → lido-wrap.js} +8 -26
- package/dist/collection/components/wrap/lido-wrap.js.map +1 -0
- package/dist/collection/index.css +3 -6
- package/dist/collection/utils/constants.js +23 -10
- package/dist/collection/utils/constants.js.map +1 -1
- package/dist/collection/utils/css/animation.css +11 -23
- package/dist/collection/utils/customEvents.js +30 -0
- package/dist/collection/utils/customEvents.js.map +1 -0
- package/dist/collection/utils/utils.js +375 -120
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/{app-col.d.ts → lido-col.d.ts} +4 -4
- package/dist/components/lido-col.js +8 -0
- package/dist/components/lido-col.js.map +1 -0
- package/dist/components/{app-container.d.ts → lido-container.d.ts} +4 -4
- package/dist/components/lido-container.js +8 -0
- package/dist/components/lido-container.js.map +1 -0
- package/dist/components/{app-image.d.ts → lido-home.d.ts} +4 -4
- package/dist/components/lido-home.js +8 -0
- package/dist/components/lido-home.js.map +1 -0
- package/dist/components/{app-random.d.ts → lido-image.d.ts} +4 -4
- package/dist/components/lido-image.js +8 -0
- package/dist/components/lido-image.js.map +1 -0
- package/dist/components/{app-pos.d.ts → lido-pos.d.ts} +4 -4
- package/dist/components/lido-pos.js +8 -0
- package/dist/components/lido-pos.js.map +1 -0
- package/dist/components/lido-random.d.ts +11 -0
- package/dist/components/lido-random.js +8 -0
- package/dist/components/lido-random.js.map +1 -0
- package/dist/components/lido-root.d.ts +11 -0
- package/dist/components/{app-root.js → lido-root.js} +35 -35
- package/dist/components/lido-root.js.map +1 -0
- package/dist/components/{app-home.d.ts → lido-row.d.ts} +4 -4
- package/dist/components/lido-row.js +8 -0
- package/dist/components/lido-row.js.map +1 -0
- package/dist/components/lido-shape.d.ts +11 -0
- package/dist/components/lido-shape.js +8 -0
- package/dist/components/lido-shape.js.map +1 -0
- package/dist/components/lido-text.d.ts +11 -0
- package/dist/components/lido-text.js +8 -0
- package/dist/components/lido-text.js.map +1 -0
- package/dist/components/lido-trace.d.ts +11 -0
- package/dist/components/lido-trace.js +8 -0
- package/dist/components/lido-trace.js.map +1 -0
- package/dist/components/lido-wrap.d.ts +11 -0
- package/dist/components/lido-wrap.js +8 -0
- package/dist/components/lido-wrap.js.map +1 -0
- package/dist/components/{p-e3642074.js → p-022206ad.js} +12 -14
- package/dist/components/p-022206ad.js.map +1 -0
- package/dist/components/p-3a968ed7.js +91 -0
- package/dist/components/p-3a968ed7.js.map +1 -0
- package/dist/components/{p-c14c784e.js → p-3d7a23e2.js} +19 -19
- package/dist/components/p-3d7a23e2.js.map +1 -0
- package/dist/components/{p-d6c20e95.js → p-4d88eacd.js} +12 -14
- package/dist/components/p-4d88eacd.js.map +1 -0
- package/dist/components/{p-f190e0a7.js → p-5a298f30.js} +65 -62
- package/dist/components/p-5a298f30.js.map +1 -0
- package/dist/components/{p-f332d2b4.js → p-627d18de.js} +15 -15
- package/dist/components/p-627d18de.js.map +1 -0
- package/dist/components/{p-92d974b0.js → p-a7fe991b.js} +12 -14
- package/dist/components/p-a7fe991b.js.map +1 -0
- package/dist/components/{p-c2a88323.js → p-bfd4e91e.js} +13 -13
- package/dist/components/p-bfd4e91e.js.map +1 -0
- package/dist/components/{p-7f0a0129.js → p-d0e2b9f3.js} +12 -14
- package/dist/components/p-d0e2b9f3.js.map +1 -0
- package/dist/{esm/utils-4f6f5606.js → components/p-d3f4bff1.js} +416 -131
- package/dist/components/p-d3f4bff1.js.map +1 -0
- package/dist/components/{p-7768c4db.js → p-d6891607.js} +12 -14
- package/dist/components/p-d6891607.js.map +1 -0
- package/dist/components/{p-c35c29db.js → p-ee52d9b8.js} +12 -14
- package/dist/components/p-ee52d9b8.js.map +1 -0
- package/dist/esm/index-00663f21.js +14 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/{app-col_12.entry.js → lido-col_12.entry.js} +107 -111
- package/dist/esm/lido-col_12.entry.js.map +1 -0
- package/dist/esm/lido-player.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/{components/p-62fee06e.js → esm/utils-11a57037.js} +416 -131
- package/dist/esm/utils-11a57037.js.map +1 -0
- package/dist/lido-player/assets/xmlData.xml +164 -74
- package/dist/lido-player/index.esm.js +1 -1
- package/dist/lido-player/lido-player.css +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-49ed1649.entry.js +2 -0
- package/dist/lido-player/p-49ed1649.entry.js.map +1 -0
- package/dist/lido-player/p-d3f4bff1.js +2 -0
- package/dist/lido-player/p-d3f4bff1.js.map +1 -0
- package/dist/types/components/column/{AppCol.d.ts → lido-col.d.ts} +5 -9
- package/dist/types/components/container/{AppContainer.d.ts → lido-container.d.ts} +3 -3
- package/dist/types/components/home/{AppHome.d.ts → lido-home.d.ts} +5 -5
- package/dist/types/components/image/{AppImage.d.ts → lido-image.d.ts} +3 -7
- package/dist/types/components/position/{AppPos.d.ts → lido-pos.d.ts} +4 -8
- package/dist/types/components/random/{AppRandom.d.ts → lido-random.d.ts} +3 -7
- package/dist/types/components/root/{AppRoot.d.ts → lido-root.d.ts} +4 -4
- package/dist/types/components/row/{AppRow.d.ts → lido-row.d.ts} +4 -8
- package/dist/types/components/shape/{AppShape.d.ts → lido-shape.d.ts} +4 -8
- package/dist/types/components/text/{AppText.d.ts → lido-text.d.ts} +10 -8
- package/dist/types/components/trace/{app-trace.d.ts → lido-trace.d.ts} +3 -3
- package/dist/types/components/wrap/{AppWrap.d.ts → lido-wrap.d.ts} +4 -8
- package/dist/types/components.d.ts +218 -274
- package/dist/types/utils/constants.d.ts +21 -10
- package/dist/types/utils/customEvents.d.ts +8 -0
- package/package.json +1 -1
- package/dist/cjs/app-col_12.cjs.entry.js.map +0 -1
- package/dist/cjs/utils-64490acd.js.map +0 -1
- package/dist/collection/components/column/AppCol.js.map +0 -1
- package/dist/collection/components/container/AppContainer.js.map +0 -1
- package/dist/collection/components/home/AppHome.js.map +0 -1
- package/dist/collection/components/image/AppImage.js.map +0 -1
- package/dist/collection/components/position/AppPos.js.map +0 -1
- package/dist/collection/components/random/AppRandom.js.map +0 -1
- package/dist/collection/components/root/AppRoot.js.map +0 -1
- package/dist/collection/components/row/AppRow.js.map +0 -1
- package/dist/collection/components/shape/AppShape.js.map +0 -1
- package/dist/collection/components/text/AppText.js.map +0 -1
- package/dist/collection/components/trace/app-trace.js.map +0 -1
- package/dist/collection/components/wrap/AppWrap.js.map +0 -1
- package/dist/components/app-col.js +0 -8
- package/dist/components/app-col.js.map +0 -1
- package/dist/components/app-container.js +0 -8
- package/dist/components/app-container.js.map +0 -1
- package/dist/components/app-home.js +0 -8
- package/dist/components/app-home.js.map +0 -1
- package/dist/components/app-image.js +0 -8
- package/dist/components/app-image.js.map +0 -1
- package/dist/components/app-pos.js +0 -8
- package/dist/components/app-pos.js.map +0 -1
- package/dist/components/app-random.js +0 -8
- package/dist/components/app-random.js.map +0 -1
- package/dist/components/app-root.d.ts +0 -11
- package/dist/components/app-root.js.map +0 -1
- package/dist/components/app-row.d.ts +0 -11
- package/dist/components/app-row.js +0 -8
- package/dist/components/app-row.js.map +0 -1
- package/dist/components/app-shape.d.ts +0 -11
- package/dist/components/app-shape.js +0 -8
- package/dist/components/app-shape.js.map +0 -1
- package/dist/components/app-text.d.ts +0 -11
- package/dist/components/app-text.js +0 -8
- package/dist/components/app-text.js.map +0 -1
- package/dist/components/app-trace.d.ts +0 -11
- package/dist/components/app-trace.js +0 -8
- package/dist/components/app-trace.js.map +0 -1
- package/dist/components/app-wrap.d.ts +0 -11
- package/dist/components/app-wrap.js +0 -8
- package/dist/components/app-wrap.js.map +0 -1
- package/dist/components/p-0136243c.js +0 -93
- package/dist/components/p-0136243c.js.map +0 -1
- package/dist/components/p-62fee06e.js.map +0 -1
- package/dist/components/p-7768c4db.js.map +0 -1
- package/dist/components/p-7f0a0129.js.map +0 -1
- package/dist/components/p-92d974b0.js.map +0 -1
- package/dist/components/p-c14c784e.js.map +0 -1
- package/dist/components/p-c2a88323.js.map +0 -1
- package/dist/components/p-c35c29db.js.map +0 -1
- package/dist/components/p-d6c20e95.js.map +0 -1
- package/dist/components/p-e3642074.js.map +0 -1
- package/dist/components/p-f190e0a7.js.map +0 -1
- package/dist/components/p-f332d2b4.js.map +0 -1
- package/dist/esm/app-col_12.entry.js.map +0 -1
- package/dist/esm/utils-4f6f5606.js.map +0 -1
- package/dist/lido-player/p-07e1ea8a.entry.js +0 -2
- package/dist/lido-player/p-07e1ea8a.entry.js.map +0 -1
- package/dist/lido-player/p-62fee06e.js +0 -2
- package/dist/lido-player/p-62fee06e.js.map +0 -1
|
@@ -63,7 +63,20 @@ var loadModule = (cmpMeta, hostRef, hmrVersionId) => {
|
|
|
63
63
|
if (module) {
|
|
64
64
|
return module[exportName];
|
|
65
65
|
}
|
|
66
|
-
|
|
66
|
+
|
|
67
|
+
if (!hmrVersionId || !BUILD.hotModuleReplacement) {
|
|
68
|
+
const processMod = importedModule => {
|
|
69
|
+
cmpModules.set(bundleId, importedModule);
|
|
70
|
+
return importedModule[exportName];
|
|
71
|
+
}
|
|
72
|
+
switch(bundleId) {
|
|
73
|
+
|
|
74
|
+
case 'lido-col_12.cjs':
|
|
75
|
+
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
76
|
+
/* webpackMode: "lazy" */
|
|
77
|
+
'./lido-col_12.cjs.entry.js')); }).then(processMod, consoleError);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
67
80
|
return Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespace(require(
|
|
68
81
|
/* @vite-ignore */
|
|
69
82
|
/* webpackInclude: /\.entry\.js$/ */
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
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-71eb1ea0.js');
|
|
7
7
|
|
|
8
|
-
const
|
|
9
|
-
const
|
|
8
|
+
const lidoColCss = ".lido-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}.lido-col>*{}";
|
|
9
|
+
const LidoColStyle0 = lidoColCss;
|
|
10
10
|
|
|
11
|
-
const
|
|
11
|
+
const LidoCol = class {
|
|
12
12
|
constructor(hostRef) {
|
|
13
13
|
index.registerInstance(this, hostRef);
|
|
14
14
|
this.id = undefined;
|
|
@@ -28,7 +28,6 @@ const AppCol = class {
|
|
|
28
28
|
this.onTouch = undefined;
|
|
29
29
|
this.onInCorrect = undefined;
|
|
30
30
|
this.onCorrect = undefined;
|
|
31
|
-
this.onMatch = undefined;
|
|
32
31
|
this.onEntry = undefined;
|
|
33
32
|
}
|
|
34
33
|
/**
|
|
@@ -49,16 +48,16 @@ const AppCol = class {
|
|
|
49
48
|
display: this.visible ? 'flex' : 'none',
|
|
50
49
|
zIndex: this.z,
|
|
51
50
|
};
|
|
52
|
-
return (index.h(index.Host, { key: '
|
|
51
|
+
return (index.h(index.Host, { key: 'bdfb0189675170177b3f8538ebfb09fe3980f659', id: this.id, class: "lido-col", type: this.type, tabindex: 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 }, index.h("slot", { key: 'aa871182e527009eb821dc5715937f18a3936c77' })));
|
|
53
52
|
}
|
|
54
53
|
get el() { return index.getElement(this); }
|
|
55
54
|
};
|
|
56
|
-
|
|
55
|
+
LidoCol.style = LidoColStyle0;
|
|
57
56
|
|
|
58
|
-
const
|
|
59
|
-
const
|
|
57
|
+
const lidoContainerCss = ".lido-container{position:relative;height:100%;width:100%;background-color:var(--bgColor, #ffffff);display:flex;flex-direction:column;justify-content:center;align-items:center}";
|
|
58
|
+
const LidoContainerStyle0 = lidoContainerCss;
|
|
60
59
|
|
|
61
|
-
const
|
|
60
|
+
const LidoContainer = class {
|
|
62
61
|
constructor(hostRef) {
|
|
63
62
|
index.registerInstance(this, hostRef);
|
|
64
63
|
this.id = undefined;
|
|
@@ -130,30 +129,30 @@ const AppContainer = class {
|
|
|
130
129
|
left: '50%',
|
|
131
130
|
transform: 'translate(-50%, -50%)', // Centering the container
|
|
132
131
|
};
|
|
133
|
-
console.log('🚀 ~
|
|
134
|
-
return (index.h(index.Host, { key: '
|
|
132
|
+
console.log('🚀 ~ LidoContainer ~ canplay:', this.canplay);
|
|
133
|
+
return (index.h(index.Host, { key: '8a81b90cfff5c960eb3dd14c1e4abc3d004274b6', 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, canplay: `${this.canplay}` }, index.h("slot", { key: '331f83cd312eb3413d09652745c11ff891a8ce03' })));
|
|
135
134
|
}
|
|
136
135
|
get el() { return index.getElement(this); }
|
|
137
136
|
};
|
|
138
|
-
|
|
137
|
+
LidoContainer.style = LidoContainerStyle0;
|
|
139
138
|
|
|
140
|
-
const indexCss = "@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap'); body{overflow:hidden}.disable-check-button{pointer-events:none;background-color:#9393935c !important;color:white}";
|
|
141
|
-
const
|
|
139
|
+
const indexCss = "@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap'); body{overflow:hidden}.lido-disable-check-button{pointer-events:none;background-color:#9393935c !important;color:white}";
|
|
140
|
+
const LidoHomeStyle0 = indexCss;
|
|
142
141
|
|
|
143
|
-
const animationCss = "@keyframes rightToPlace{from{transform:translateX(2000px)}to{left:0}}@keyframes placeToLeft{from{}to{transform:translateX(-2000px)}}@keyframes shake{0%{transform:translateX(0)
|
|
144
|
-
const
|
|
142
|
+
const animationCss = "@keyframes rightToPlace{from{transform:translateX(2000px)}to{left:0}}@keyframes placeToLeft{from{}to{transform:translateX(-2000px)}}@keyframes shake{0%{transform:translateX(0)}10%{transform:translateX(-5px)}20%{transform:translateX(5px)}30%{transform:translateX(-5px)}40%{transform:translateX(5px)}50%{transform:translateX(-5px)}60%{transform:translateX(5px)}70%{transform:translateX(-5px)}80%{transform:translateX(5px)}90%{transform:translateX(-5px)}100%{transform:translateX(0)}}@keyframes fallAndBounce{0%{transform:translateY(-1000px)}25%{transform:translateY(0px)}50%{transform:translateY(-200px)}75%{transform:translateY(0)}90%{transform:translateY(-100px)}100%{transform:translateY(0)}}@keyframes placeToDown{0%{transform:translateY(0)}100%{transform:translateY(1000px)}}";
|
|
143
|
+
const LidoHomeStyle1 = animationCss;
|
|
145
144
|
|
|
146
|
-
const
|
|
147
|
-
const
|
|
145
|
+
const lidoHomeCss = ".lido-snackbar{visibility:visible;min-width:250px;background-color:#333;color:#fff;text-align:center;border-radius:2px;padding:16px;position:fixed;z-index:1;bottom:30px;left:50%;transform:translateX(-50%);font-size:17px}.lido-dot-container{text-align:center;position:fixed;z-index:1;width:fit-content;top:1%;left:50%;transform:translate(-50%)}.lido-dot{height:15px;width:15px;margin:0 4px;background-color:#bbb;border-radius:50%;display:inline-block;transition:background-color 0.3s;cursor:pointer}.lido-dot.completed{background-color:grey}.lido-dot.current{background-color:green}.lido-dot:not(.completed):not(.current){background-color:#bbb}";
|
|
146
|
+
const LidoHomeStyle2 = lidoHomeCss;
|
|
148
147
|
|
|
149
|
-
const
|
|
148
|
+
const LidoHome = class {
|
|
150
149
|
constructor(hostRef) {
|
|
151
150
|
index.registerInstance(this, hostRef);
|
|
152
151
|
/**
|
|
153
152
|
* Event handler for transitioning to the next container in the sequence.
|
|
154
153
|
* If the last container is reached, it shows a completion message.
|
|
155
154
|
*/
|
|
156
|
-
this.
|
|
155
|
+
this.NextContainerKey = (index) => {
|
|
157
156
|
if (index != undefined && index == this.currentContainerIndex)
|
|
158
157
|
return;
|
|
159
158
|
// Clear selected values from localStorage on container transition
|
|
@@ -162,18 +161,21 @@ const AppHome = class {
|
|
|
162
161
|
if (index != undefined && index < this.containers.length) {
|
|
163
162
|
// Move to the next container
|
|
164
163
|
this.currentContainerIndex = index;
|
|
165
|
-
window.dispatchEvent(new CustomEvent('activityChange', { detail: { index: this.currentContainerIndex } }));
|
|
164
|
+
// window.dispatchEvent(new CustomEvent('activityChange', { detail: { index: this.currentContainerIndex } }));
|
|
165
|
+
utils.dispatchActivityChangeEvent(this.currentContainerIndex);
|
|
166
166
|
}
|
|
167
167
|
else if (this.currentContainerIndex < this.containers.length - 1) {
|
|
168
168
|
// Move to the next container
|
|
169
169
|
this.currentContainerIndex++;
|
|
170
|
-
window.dispatchEvent(new CustomEvent('activityChange', { detail: { index: this.currentContainerIndex } }));
|
|
170
|
+
// window.dispatchEvent(new CustomEvent('activityChange', { detail: { index: this.currentContainerIndex } }));
|
|
171
|
+
utils.dispatchActivityChangeEvent(this.currentContainerIndex);
|
|
171
172
|
}
|
|
172
173
|
else if (this.currentContainerIndex >= this.containers.length - 1) {
|
|
173
174
|
// Show the completion message if all containers have been viewed
|
|
174
175
|
this.showCompletionMessage = true;
|
|
175
|
-
const event = new CustomEvent('gameCompleted');
|
|
176
|
-
window.dispatchEvent(event);
|
|
176
|
+
// const event = new CustomEvent('gameCompleted');
|
|
177
|
+
// window.dispatchEvent(event);
|
|
178
|
+
utils.dispatchGameCompletedEvent();
|
|
177
179
|
this.currentContainerIndex = 0;
|
|
178
180
|
// Hide the completion message after 3 seconds
|
|
179
181
|
setTimeout(() => {
|
|
@@ -196,12 +198,12 @@ const AppHome = class {
|
|
|
196
198
|
* between containers and parses the XML data into containers.
|
|
197
199
|
*/
|
|
198
200
|
componentWillLoad() {
|
|
199
|
-
// Listen for '
|
|
200
|
-
window.addEventListener(
|
|
201
|
-
this.
|
|
201
|
+
// Listen for 'NextContainerKey' event to transition between containers
|
|
202
|
+
window.addEventListener(utils.NextContainerKey, () => {
|
|
203
|
+
this.NextContainerKey();
|
|
202
204
|
});
|
|
203
205
|
window.addEventListener('changeContainer', (e) => {
|
|
204
|
-
this.
|
|
206
|
+
this.NextContainerKey(e.detail.index);
|
|
205
207
|
});
|
|
206
208
|
// Parse the provided XML data
|
|
207
209
|
this.parseXMLData(this.xmlData);
|
|
@@ -215,11 +217,11 @@ const AppHome = class {
|
|
|
215
217
|
* Lifecycle method that cleans up event listeners when the component is removed from the DOM.
|
|
216
218
|
*/
|
|
217
219
|
disconnectedCallback() {
|
|
218
|
-
window.removeEventListener(
|
|
219
|
-
this.
|
|
220
|
+
window.removeEventListener(utils.NextContainerKey, () => {
|
|
221
|
+
this.NextContainerKey();
|
|
220
222
|
});
|
|
221
223
|
window.removeEventListener('changeContainer', (e) => {
|
|
222
|
-
this.
|
|
224
|
+
this.NextContainerKey(e.detail.index);
|
|
223
225
|
});
|
|
224
226
|
}
|
|
225
227
|
/**
|
|
@@ -263,16 +265,16 @@ const AppHome = class {
|
|
|
263
265
|
.filter(Boolean);
|
|
264
266
|
// Map XML tags to Stencil components
|
|
265
267
|
const componentMapping = {
|
|
266
|
-
'
|
|
267
|
-
'
|
|
268
|
-
'
|
|
269
|
-
'
|
|
270
|
-
'
|
|
271
|
-
'
|
|
272
|
-
'
|
|
273
|
-
'
|
|
274
|
-
'
|
|
275
|
-
'
|
|
268
|
+
'lido-container': (index.h("lido-container", Object.assign({}, props, { canplay: this.canplay, baseUrl: this.baseUrl }), children)),
|
|
269
|
+
'lido-col': index.h("lido-col", Object.assign({}, props), children),
|
|
270
|
+
'lido-trace': index.h("lido-trace", Object.assign({}, props), children),
|
|
271
|
+
'lido-image': index.h("lido-image", Object.assign({}, props), children),
|
|
272
|
+
'lido-row': index.h("lido-row", Object.assign({}, props), children),
|
|
273
|
+
'lido-text': index.h("lido-text", Object.assign({}, props), children),
|
|
274
|
+
'lido-pos': index.h("lido-pos", Object.assign({}, props), children),
|
|
275
|
+
'lido-shape': index.h("lido-shape", Object.assign({}, props), children),
|
|
276
|
+
'lido-wrap': index.h("lido-wrap", Object.assign({}, props), children),
|
|
277
|
+
'lido-random': index.h("lido-random", Object.assign({}, props), children),
|
|
276
278
|
};
|
|
277
279
|
// If the tag is known, return the corresponding Stencil component, otherwise log a warning
|
|
278
280
|
if (componentMapping[tagName]) {
|
|
@@ -284,13 +286,13 @@ const AppHome = class {
|
|
|
284
286
|
}
|
|
285
287
|
}
|
|
286
288
|
/**
|
|
287
|
-
* Parses the `
|
|
289
|
+
* Parses the `lido-container` elements from the XML root element and stores them in the `containers` state.
|
|
288
290
|
*
|
|
289
291
|
* @param rootElement - The root element of the parsed XML document.
|
|
290
292
|
*/
|
|
291
293
|
parseContainers(rootElement) {
|
|
292
294
|
const containers = [];
|
|
293
|
-
const containerElements = rootElement.querySelectorAll('
|
|
295
|
+
const containerElements = rootElement.querySelectorAll('lido-container');
|
|
294
296
|
// Parse each container and add it to the array
|
|
295
297
|
containerElements.forEach(container => {
|
|
296
298
|
const parsedElement = this.parseElement(container);
|
|
@@ -305,7 +307,7 @@ const AppHome = class {
|
|
|
305
307
|
* Clicking on a dot allows the user to jump to a specific container.
|
|
306
308
|
*/
|
|
307
309
|
renderDots() {
|
|
308
|
-
return (index.h("div", { id: "dot-indicator", class: "dot-container" }, this.containers.map((_, index$1) => (index.h("span", { class: `dot ${index$1 < this.currentContainerIndex ? 'completed' : index$1 === this.currentContainerIndex ? 'current' : ''}`, onClick: () => this.jumpToContainer(index$1) })))));
|
|
310
|
+
return (index.h("div", { id: "lido-dot-indicator", class: "lido-dot-container" }, 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) })))));
|
|
309
311
|
}
|
|
310
312
|
/**
|
|
311
313
|
* Jumps to a specific container based on the index of the dot clicked.
|
|
@@ -313,7 +315,7 @@ const AppHome = class {
|
|
|
313
315
|
* @param index - The index of the container to jump to.
|
|
314
316
|
*/
|
|
315
317
|
jumpToContainer(index) {
|
|
316
|
-
this.
|
|
318
|
+
this.NextContainerKey(index);
|
|
317
319
|
// this.currentContainerIndex = index;
|
|
318
320
|
// this.containers = [...this.containers]; // Trigger re-render
|
|
319
321
|
}
|
|
@@ -322,15 +324,15 @@ const AppHome = class {
|
|
|
322
324
|
// If no XML data is provided, prompt the user to provide it
|
|
323
325
|
return index.h("div", null, "Please provide XML data.");
|
|
324
326
|
}
|
|
325
|
-
return (index.h(index.Host, { index: this.currentContainerIndex, totalIndex: this.containers.length }, index.h("div", { key: this.currentContainerIndex }, this.containers[this.currentContainerIndex]), this.renderDots(), this.showCompletionMessage && index.h("div", { class: "snackbar" }, "All containers have been displayed!")));
|
|
327
|
+
return (index.h(index.Host, { index: this.currentContainerIndex, totalIndex: this.containers.length }, index.h("div", { key: this.currentContainerIndex }, this.containers[this.currentContainerIndex]), this.renderDots(), this.showCompletionMessage && index.h("div", { class: "lido-snackbar" }, "All containers have been displayed!")));
|
|
326
328
|
}
|
|
327
329
|
};
|
|
328
|
-
|
|
330
|
+
LidoHome.style = LidoHomeStyle0 + (LidoHomeStyle1 + LidoHomeStyle2);
|
|
329
331
|
|
|
330
|
-
const
|
|
331
|
-
const
|
|
332
|
+
const lidoImageCss = ".lido-image{user-select:none;-webkit-user-drag:none;object-fit:contain;max-width:100%;max-height:100%;aspect-ratio:1 / 1;}";
|
|
333
|
+
const LidoImageStyle0 = lidoImageCss;
|
|
332
334
|
|
|
333
|
-
const
|
|
335
|
+
const LidoImage = class {
|
|
334
336
|
constructor(hostRef) {
|
|
335
337
|
index.registerInstance(this, hostRef);
|
|
336
338
|
this.value = undefined;
|
|
@@ -349,7 +351,6 @@ const AppImage = class {
|
|
|
349
351
|
this.onTouch = undefined;
|
|
350
352
|
this.onInCorrect = undefined;
|
|
351
353
|
this.onCorrect = undefined;
|
|
352
|
-
this.onMatch = undefined;
|
|
353
354
|
this.onEntry = undefined;
|
|
354
355
|
this.src = undefined;
|
|
355
356
|
}
|
|
@@ -373,16 +374,16 @@ const AppImage = class {
|
|
|
373
374
|
alignItems: 'center', // Vertically center the image
|
|
374
375
|
justifyContent: 'center', // Horizontally center the image
|
|
375
376
|
};
|
|
376
|
-
return (index.h(index.Host, { key: '
|
|
377
|
+
return (index.h(index.Host, { key: 'c3f6e5e47e0a09e4173feaa15072ffaa87ae80a9', 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, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry }, index.h("img", { key: '5f5392e87f1c688bbb27ef6dfea2e61cafe68169', class: "lido-image", src: utils.convertUrlToRelative(this.src), alt: "", style: style })));
|
|
377
378
|
}
|
|
378
379
|
get el() { return index.getElement(this); }
|
|
379
380
|
};
|
|
380
|
-
|
|
381
|
+
LidoImage.style = LidoImageStyle0;
|
|
381
382
|
|
|
382
|
-
const
|
|
383
|
-
const
|
|
383
|
+
const lidoPosCss = ".lido-pos{top:var(--y, 0);left:var(--x, 0);height:var(--height, 100%);width:var(--width, 100%);background-color:var(--bgColor, #eeeeee);display:flex;justify-content:space-around;flex-direction:column;position:fixed}.lido-pos>*{position:absolute}";
|
|
384
|
+
const LidoPosStyle0 = lidoPosCss;
|
|
384
385
|
|
|
385
|
-
const
|
|
386
|
+
const LidoPos = class {
|
|
386
387
|
constructor(hostRef) {
|
|
387
388
|
index.registerInstance(this, hostRef);
|
|
388
389
|
this.id = undefined;
|
|
@@ -402,7 +403,6 @@ const AppPos = class {
|
|
|
402
403
|
this.onTouch = undefined;
|
|
403
404
|
this.onInCorrect = undefined;
|
|
404
405
|
this.onCorrect = undefined;
|
|
405
|
-
this.onMatch = undefined;
|
|
406
406
|
this.onEntry = undefined;
|
|
407
407
|
}
|
|
408
408
|
/**
|
|
@@ -423,16 +423,16 @@ const AppPos = class {
|
|
|
423
423
|
zIndex: this.z,
|
|
424
424
|
display: this.visible ? 'block' : 'none', // Toggle visibility
|
|
425
425
|
};
|
|
426
|
-
return (index.h(index.Host, { key: '
|
|
426
|
+
return (index.h(index.Host, { key: '53f6e8cc874145ba3bb885ffa13d655ea8bce80e', id: this.id, class: "lido-pos", 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, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry }, index.h("slot", { key: 'f4e7a3abe89630dd958935ded2b5ae97596f82d0' })));
|
|
427
427
|
}
|
|
428
428
|
get el() { return index.getElement(this); }
|
|
429
429
|
};
|
|
430
|
-
|
|
430
|
+
LidoPos.style = LidoPosStyle0;
|
|
431
431
|
|
|
432
|
-
const
|
|
433
|
-
const
|
|
432
|
+
const lidoRandomCss = ".lido-random{display:flex;justify-content:space-between;align-items:center;position:absolute;}.lido-random>*{position:absolute}";
|
|
433
|
+
const LidoRandomStyle0 = lidoRandomCss;
|
|
434
434
|
|
|
435
|
-
const
|
|
435
|
+
const LidoRandom = class {
|
|
436
436
|
constructor(hostRef) {
|
|
437
437
|
index.registerInstance(this, hostRef);
|
|
438
438
|
this.id = undefined;
|
|
@@ -452,7 +452,6 @@ const AppRandom = class {
|
|
|
452
452
|
this.onTouch = undefined;
|
|
453
453
|
this.onInCorrect = undefined;
|
|
454
454
|
this.onCorrect = undefined;
|
|
455
|
-
this.onMatch = undefined;
|
|
456
455
|
this.onEntry = undefined;
|
|
457
456
|
}
|
|
458
457
|
/**
|
|
@@ -461,7 +460,7 @@ const AppRandom = class {
|
|
|
461
460
|
*/
|
|
462
461
|
componentDidLoad() {
|
|
463
462
|
// Select all direct child elements of the component
|
|
464
|
-
const slotElements = this.el.querySelectorAll('.random > *');
|
|
463
|
+
const slotElements = this.el.querySelectorAll('.lido-random > *');
|
|
465
464
|
// Iterate over each child and apply random positions
|
|
466
465
|
slotElements.forEach((child) => {
|
|
467
466
|
const randomTop = Math.random() * 100; // Random value between 0 and 100 for vertical position
|
|
@@ -481,13 +480,13 @@ const AppRandom = class {
|
|
|
481
480
|
zIndex: this.z,
|
|
482
481
|
backgroundColor: this.bgColor,
|
|
483
482
|
};
|
|
484
|
-
return (index.h(index.Host, { key: '
|
|
483
|
+
return (index.h(index.Host, { key: '0611246d6b0091eebcad0ec0f2999d2b8e98c854', class: "lido-random", type: this.type, tabindex: 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 }, index.h("slot", { key: 'b03397724ad9e902d82eecde3d2981b01e49b3b0' })));
|
|
485
484
|
}
|
|
486
485
|
get el() { return index.getElement(this); }
|
|
487
486
|
};
|
|
488
|
-
|
|
487
|
+
LidoRandom.style = LidoRandomStyle0;
|
|
489
488
|
|
|
490
|
-
const
|
|
489
|
+
const LidoRoot = class {
|
|
491
490
|
constructor(hostRef) {
|
|
492
491
|
index.registerInstance(this, hostRef);
|
|
493
492
|
this.xmlPath = undefined;
|
|
@@ -508,9 +507,9 @@ const AppRoot = class {
|
|
|
508
507
|
// return;
|
|
509
508
|
// }
|
|
510
509
|
const xmlPath = (_a = this.xmlPath) !== null && _a !== void 0 ? _a : this.baseUrl + '/index.xml';
|
|
511
|
-
console.log('🚀 ~
|
|
512
|
-
console.log('🚀 ~
|
|
513
|
-
console.log('🚀 ~
|
|
510
|
+
console.log('🚀 ~ LidoRoot ~ componentWillLoad ~ this.baseUrl:', this.baseUrl);
|
|
511
|
+
console.log('🚀 ~ LidoRoot ~ componentWillLoad ~ this.xmlPath:', this.xmlPath);
|
|
512
|
+
console.log('🚀 ~ LidoRoot ~ componentWillLoad ~ xmlPath:', xmlPath);
|
|
514
513
|
// Fetch the XML data
|
|
515
514
|
try {
|
|
516
515
|
const resolvedPath = xmlPath.startsWith('http')
|
|
@@ -538,16 +537,16 @@ const AppRoot = class {
|
|
|
538
537
|
if (this.xmlData === null) {
|
|
539
538
|
return index.h("div", null, "Error loading XML data. Please check the path or URL.");
|
|
540
539
|
}
|
|
541
|
-
// Once the XML data is loaded, pass it to the `
|
|
542
|
-
return index.h("
|
|
540
|
+
// Once the XML data is loaded, pass it to the `lido-home` component
|
|
541
|
+
return index.h("lido-home", { initialIndex: this.initialIndex, canplay: this.canplay, xmlData: this.xmlData, baseUrl: this.baseUrl });
|
|
543
542
|
}
|
|
544
543
|
static get assetsDirs() { return ["assets"]; }
|
|
545
544
|
};
|
|
546
545
|
|
|
547
|
-
const
|
|
548
|
-
const
|
|
546
|
+
const lidoRowCss = ".lido-row{display:flex;justify-content:space-between;align-items:center;}.lido-row>*{}";
|
|
547
|
+
const LidoRowStyle0 = lidoRowCss;
|
|
549
548
|
|
|
550
|
-
const
|
|
549
|
+
const LidoRow = class {
|
|
551
550
|
constructor(hostRef) {
|
|
552
551
|
index.registerInstance(this, hostRef);
|
|
553
552
|
this.value = undefined;
|
|
@@ -566,7 +565,6 @@ const AppRow = class {
|
|
|
566
565
|
this.onTouch = undefined;
|
|
567
566
|
this.onInCorrect = undefined;
|
|
568
567
|
this.onCorrect = undefined;
|
|
569
|
-
this.onMatch = undefined;
|
|
570
568
|
this.onEntry = undefined;
|
|
571
569
|
}
|
|
572
570
|
/**
|
|
@@ -587,16 +585,16 @@ const AppRow = class {
|
|
|
587
585
|
zIndex: this.z,
|
|
588
586
|
backgroundColor: this.bgColor, // Apply background color if provided
|
|
589
587
|
};
|
|
590
|
-
return (index.h(index.Host, { key: '
|
|
588
|
+
return (index.h(index.Host, { key: '799f1cbf0c9081ced1ea457944c6cf1ecbbcf5ec', class: "lido-row", type: this.type, tabindex: 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 }, index.h("slot", { key: '106f11f07ad4073a47bed299512cc3287f71546e' })));
|
|
591
589
|
}
|
|
592
590
|
get el() { return index.getElement(this); }
|
|
593
591
|
};
|
|
594
|
-
|
|
592
|
+
LidoRow.style = LidoRowStyle0;
|
|
595
593
|
|
|
596
|
-
const
|
|
597
|
-
const
|
|
594
|
+
const lidoShapeCss = ".lido-shape{position:absolute;top:var(--y);left:var(--x);display:var(--display);z-index:var(--z)}.lido-rectangle{border-radius:0}.lido-circle{width:var(--width);height:var(--width);border-radius:50%;background-color:var(--bgColor)}.lido-ellipse{width:var(--width);height:var(--height);border-radius:50%;background-color:var(--bgColor)}.lido-triangle{width:var(--triangleWidth);height:var(--triangleHeight);background-color:var(--bgColor);clip-path:polygon(50% 0%, 100% 100%, 0% 100%)}.lido-rightTriangle{width:var(--triangleWidth);height:var(--triangleHeight);background-color:var(--bgColor);clip-path:polygon(100% 0%, 100% 100%, 0% 100%)}.lido-leftTriangle{width:var(--triangleWidth);height:var(--triangleHeight);background-color:var(--triangleBgColor);clip-path:polygon(0% 0%, 100% 100%, 0% 100%)}.lido-parallelogram{width:var(--paralleWidth);height:var(--paralleHeight);transform:skew(20deg)}.lido-star{width:var(--starWidth);height:var(--starHeight);background-color:var(--starBgColor);clip-path:polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%)}.lido-pentagon{width:var(--pentagonWidth);height:var(--pentagonHeight);background-color:var(--pentagonBgColor);clip-path:polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%)}.lido-heptagon{width:var(--heptagonWidth);height:var(--heptagonHeight);background-color:var(--heptagonBgColor);clip-path:polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%)}.lido-octagon{width:var(--octagonWidth);height:var(--octagonHeight);background-color:var(--octagonBgColor);clip-path:polygon(25% 0%, 75% 0%, 100% 25%, 100% 75%, 75% 100%, 25% 100%, 0% 75%, 0% 25%)}.lido-rhombus{width:var(--rhombusWidth);height:var(--rhombusHeight);background-color:var(--rhombusBgColor);clip-path:polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)}.lido-heart{height:var(--heartHeight);width:var(--heartWidth);border-image:radial-gradient(var(--heartBgColor) 69%, #0000 70%) 84.5%/50%;clip-path:polygon(-41% 0, 50% 91%, 141% 0)}";
|
|
595
|
+
const LidoShapeStyle0 = lidoShapeCss;
|
|
598
596
|
|
|
599
|
-
const
|
|
597
|
+
const LidoShape = class {
|
|
600
598
|
constructor(hostRef) {
|
|
601
599
|
index.registerInstance(this, hostRef);
|
|
602
600
|
this.id = undefined;
|
|
@@ -617,7 +615,6 @@ const AppShape = class {
|
|
|
617
615
|
this.onTouch = undefined;
|
|
618
616
|
this.onInCorrect = undefined;
|
|
619
617
|
this.onCorrect = undefined;
|
|
620
|
-
this.onMatch = undefined;
|
|
621
618
|
this.onEntry = undefined;
|
|
622
619
|
}
|
|
623
620
|
/**
|
|
@@ -638,16 +635,16 @@ const AppShape = class {
|
|
|
638
635
|
zIndex: this.z,
|
|
639
636
|
backgroundColor: this.shapeType !== 'polygon' ? this.bgColor : 'transparent', // Apply background only if not a polygon
|
|
640
637
|
};
|
|
641
|
-
return (index.h(index.Host, { key: '
|
|
638
|
+
return (index.h(index.Host, { key: 'b82bed547952d36b52d9f94f609aed1f7e7ab4cf', class: `lido-shape ${this.shapeType}`, value: this.value, type: this.type, tabindex: this.tabIndex, 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 }));
|
|
642
639
|
}
|
|
643
640
|
get el() { return index.getElement(this); }
|
|
644
641
|
};
|
|
645
|
-
|
|
642
|
+
LidoShape.style = LidoShapeStyle0;
|
|
646
643
|
|
|
647
|
-
const
|
|
648
|
-
const
|
|
644
|
+
const lidoTextCss = ".lido-text{background-color:#fff;box-shadow:0 2px 4px rgba(0, 0, 0, 0.1);transition:background-color 0.3s ease;user-select:none;align-items:center;justify-content:center;text-align:center;border-radius:8px;color:#333;cursor:pointer}.lido-text:hover{background-color:#f0f0f0}";
|
|
645
|
+
const LidoTextStyle0 = lidoTextCss;
|
|
649
646
|
|
|
650
|
-
const
|
|
647
|
+
const LidoText = class {
|
|
651
648
|
constructor(hostRef) {
|
|
652
649
|
index.registerInstance(this, hostRef);
|
|
653
650
|
this.id = undefined;
|
|
@@ -672,8 +669,8 @@ const AppText = class {
|
|
|
672
669
|
this.onTouch = undefined;
|
|
673
670
|
this.onInCorrect = undefined;
|
|
674
671
|
this.onCorrect = undefined;
|
|
675
|
-
this.onMatch = undefined;
|
|
676
672
|
this.onEntry = undefined;
|
|
673
|
+
this.isAllowOnlyOneDrop = undefined;
|
|
677
674
|
}
|
|
678
675
|
/**
|
|
679
676
|
* Lifecycle hook that runs after the component is rendered in the DOM.
|
|
@@ -696,16 +693,16 @@ const AppText = class {
|
|
|
696
693
|
color: this.fontColor,
|
|
697
694
|
display: this.visible ? 'flex' : 'none', // Show or hide based on visibility prop
|
|
698
695
|
};
|
|
699
|
-
return (index.h(index.Host, { key: '
|
|
696
|
+
return (index.h(index.Host, { key: '7de48018c45e8befbd8eae155c0cd7b928e4e726', class: "lido-text", value: this.value, type: this.type, tabindex: this.tabIndex, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry, id: this.id, style: style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, isAllowOnlyOneDrop: this.isAllowOnlyOneDrop }, this.string));
|
|
700
697
|
}
|
|
701
698
|
get el() { return index.getElement(this); }
|
|
702
699
|
};
|
|
703
|
-
|
|
700
|
+
LidoText.style = LidoTextStyle0;
|
|
704
701
|
|
|
705
|
-
const
|
|
706
|
-
const
|
|
702
|
+
const lidoTraceCss = ":host{display:block;position:relative}#lido-svgContainer{position:absolute;top:0;left:0;right:0;bottom:50px;display:flex;justify-content:center;align-items:center;overflow:hidden}svg{width:100%;height:100%;max-height:calc(100vh - 50px);touch-action:none}#lido-draggableCircle{cursor:pointer;fill:red;transition:fill 0.2s, r 0.2s}.lido-blindTracing{stroke:none !important}.lido-blindFreeTrace{stroke:none !important}.lido-hovered{cursor:grab;fill:darkred}#lido-controls{position:fixed;bottom:0;left:0;right:0;display:flex;justify-content:space-between;padding:10px;background-color:#f0f0f0;border-top:1px solid #ccc}button{padding:10px;font-size:16px}@media (max-width: 600px){button{padding:8px;font-size:14px}}.lido-trace-path-green{stroke:green !important}";
|
|
703
|
+
const LidoTraceStyle0 = lidoTraceCss;
|
|
707
704
|
|
|
708
|
-
const
|
|
705
|
+
const LidoTrace = class {
|
|
709
706
|
constructor(hostRef) {
|
|
710
707
|
index.registerInstance(this, hostRef);
|
|
711
708
|
this.id = undefined;
|
|
@@ -826,7 +823,7 @@ const AppTrace = class {
|
|
|
826
823
|
arrowMarker.setAttribute('points', '-5,-5 0,0 -5,5');
|
|
827
824
|
arrowMarker.setAttribute('fill', 'blue');
|
|
828
825
|
arrowMarker.setAttribute('transform', `translate(${point.x},${point.y}) rotate(${(angle * 180) / Math.PI})`);
|
|
829
|
-
arrowMarker.setAttribute('class', 'flow-indicator');
|
|
826
|
+
arrowMarker.setAttribute('class', 'lido-flow-indicator');
|
|
830
827
|
markers.push(arrowMarker);
|
|
831
828
|
(_a = path.parentNode) === null || _a === void 0 ? void 0 : _a.appendChild(arrowMarker); // Append to the same SVG container
|
|
832
829
|
}
|
|
@@ -834,7 +831,7 @@ const AppTrace = class {
|
|
|
834
831
|
}
|
|
835
832
|
// Show or hide flow indicators based on mode
|
|
836
833
|
updateFlowIndicators(state) {
|
|
837
|
-
const indicators = state.svg.querySelectorAll('.flow-indicator');
|
|
834
|
+
const indicators = state.svg.querySelectorAll('.lido-flow-indicator');
|
|
838
835
|
indicators.forEach(indicator => {
|
|
839
836
|
if (state.mode === utils.TraceMode.NoFlow) {
|
|
840
837
|
indicator.style.display = 'none';
|
|
@@ -855,8 +852,8 @@ const AppTrace = class {
|
|
|
855
852
|
greenPath.setAttribute('stroke-dasharray', pathLength.toString());
|
|
856
853
|
greenPath.setAttribute('stroke-dashoffset', pathLength.toString()); // Hidden initially
|
|
857
854
|
path.parentNode.appendChild(greenPath, path);
|
|
858
|
-
path.setAttribute('class', 'trace-path'); // Add class for easier reference
|
|
859
|
-
greenPath.setAttribute('class', 'trace-path-green'); // Add class for easier reference
|
|
855
|
+
path.setAttribute('class', 'lido-trace-path'); // Add class for easier reference
|
|
856
|
+
greenPath.setAttribute('class', 'lido-trace-path-green'); // Add class for easier reference
|
|
860
857
|
path.greenPath = greenPath;
|
|
861
858
|
path.classList.add(state.mode);
|
|
862
859
|
// Conditionally hide or show the black path based on blind tracing mode
|
|
@@ -884,7 +881,7 @@ const AppTrace = class {
|
|
|
884
881
|
var _a;
|
|
885
882
|
const firstPathStart = state.paths[0].getPointAtLength(0);
|
|
886
883
|
const circle = document.createElementNS('http://www.w3.org/2000/svg', 'circle');
|
|
887
|
-
circle.setAttribute('id', 'draggableCircle');
|
|
884
|
+
circle.setAttribute('id', 'lido-draggableCircle');
|
|
888
885
|
circle.setAttribute('cx', firstPathStart.x.toString());
|
|
889
886
|
circle.setAttribute('cy', firstPathStart.y.toString());
|
|
890
887
|
circle.setAttribute('r', '20'); // Radius of the draggable circle
|
|
@@ -1135,7 +1132,7 @@ const AppTrace = class {
|
|
|
1135
1132
|
(_a = state.svg) === null || _a === void 0 ? void 0 : _a.removeChild(state.circle);
|
|
1136
1133
|
state.circle = null;
|
|
1137
1134
|
}
|
|
1138
|
-
const indicators = (_b = state.svg) === null || _b === void 0 ? void 0 : _b.querySelectorAll('.flow-indicator');
|
|
1135
|
+
const indicators = (_b = state.svg) === null || _b === void 0 ? void 0 : _b.querySelectorAll('.lido-flow-indicator');
|
|
1139
1136
|
indicators.forEach(indicator => {
|
|
1140
1137
|
indicator.remove(); // Remove all previous flow indicators
|
|
1141
1138
|
});
|
|
@@ -1150,7 +1147,7 @@ const AppTrace = class {
|
|
|
1150
1147
|
state.currentPathIndex++;
|
|
1151
1148
|
state.lastLength = 0;
|
|
1152
1149
|
if (state.currentPathIndex >= state.paths.length) {
|
|
1153
|
-
//
|
|
1150
|
+
// this.loadAnotherSVG(state, true);
|
|
1154
1151
|
utils.triggerNextContainer();
|
|
1155
1152
|
return;
|
|
1156
1153
|
}
|
|
@@ -1178,16 +1175,16 @@ const AppTrace = class {
|
|
|
1178
1175
|
};
|
|
1179
1176
|
// List of SVG file names to process sequentially
|
|
1180
1177
|
// const svgFiles = ['A_test.svg', 'B_test.svg', 'C_test.svg', 'D_test.svg', 'अ_test.svg', 'ट_test.svg', 'क_test.svg', 'ख_test.svg', 'ग_test.svg']; // Add more SVG file names as needed
|
|
1181
|
-
return (index.h(index.Host, { key: '
|
|
1178
|
+
return (index.h(index.Host, { key: '6d09f6c412d9fe6d8fe27512778cf3c043125e31', class: "lido-trace", id: this.id, style: style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, tabindex: this.tabIndex }, index.h("div", { key: '412fce32d5c2416168ed1f124a56e4b2f64d559d', id: "lido-svgContainer" })));
|
|
1182
1179
|
}
|
|
1183
1180
|
static get assetsDirs() { return ["svg"]; }
|
|
1184
1181
|
};
|
|
1185
|
-
|
|
1182
|
+
LidoTrace.style = LidoTraceStyle0;
|
|
1186
1183
|
|
|
1187
|
-
const
|
|
1188
|
-
const
|
|
1184
|
+
const lidoWrapCss = ".lido-wrap{display:grid;grid-gap:10px;grid-template-columns:repeat(auto-fill, minmax(186px, auto))}.lido-wrap>*{padding:10px;background-color:var(--child-bg-color, #f0f0f0);box-sizing:border-box}";
|
|
1185
|
+
const LidoWrapStyle0 = lidoWrapCss;
|
|
1189
1186
|
|
|
1190
|
-
const
|
|
1187
|
+
const LidoWrap = class {
|
|
1191
1188
|
constructor(hostRef) {
|
|
1192
1189
|
index.registerInstance(this, hostRef);
|
|
1193
1190
|
this.id = undefined;
|
|
@@ -1207,7 +1204,6 @@ const AppWrap = class {
|
|
|
1207
1204
|
this.onTouch = undefined;
|
|
1208
1205
|
this.onInCorrect = undefined;
|
|
1209
1206
|
this.onCorrect = undefined;
|
|
1210
|
-
this.onMatch = undefined;
|
|
1211
1207
|
this.onEntry = undefined;
|
|
1212
1208
|
}
|
|
1213
1209
|
/**
|
|
@@ -1228,23 +1224,23 @@ const AppWrap = class {
|
|
|
1228
1224
|
zIndex: this.z,
|
|
1229
1225
|
backgroundColor: this.bgColor,
|
|
1230
1226
|
};
|
|
1231
|
-
return (index.h(index.Host, { key: '
|
|
1227
|
+
return (index.h(index.Host, { key: '1fecaadd7e815f461f8d24b1a507c2fe017c9a50', class: "lido-wrap", value: this.value, type: this.type, tabindex: this.tabIndex, 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 }, index.h("slot", { key: '14a0fbd1bf8a645421d3c0711cc8839aa9e96b67' })));
|
|
1232
1228
|
}
|
|
1233
1229
|
get el() { return index.getElement(this); }
|
|
1234
1230
|
};
|
|
1235
|
-
|
|
1231
|
+
LidoWrap.style = LidoWrapStyle0;
|
|
1236
1232
|
|
|
1237
|
-
exports.
|
|
1238
|
-
exports.
|
|
1239
|
-
exports.
|
|
1240
|
-
exports.
|
|
1241
|
-
exports.
|
|
1242
|
-
exports.
|
|
1243
|
-
exports.
|
|
1244
|
-
exports.
|
|
1245
|
-
exports.
|
|
1246
|
-
exports.
|
|
1247
|
-
exports.
|
|
1248
|
-
exports.
|
|
1233
|
+
exports.lido_col = LidoCol;
|
|
1234
|
+
exports.lido_container = LidoContainer;
|
|
1235
|
+
exports.lido_home = LidoHome;
|
|
1236
|
+
exports.lido_image = LidoImage;
|
|
1237
|
+
exports.lido_pos = LidoPos;
|
|
1238
|
+
exports.lido_random = LidoRandom;
|
|
1239
|
+
exports.lido_root = LidoRoot;
|
|
1240
|
+
exports.lido_row = LidoRow;
|
|
1241
|
+
exports.lido_shape = LidoShape;
|
|
1242
|
+
exports.lido_text = LidoText;
|
|
1243
|
+
exports.lido_trace = LidoTrace;
|
|
1244
|
+
exports.lido_wrap = LidoWrap;
|
|
1249
1245
|
|
|
1250
|
-
//# sourceMappingURL=
|
|
1246
|
+
//# sourceMappingURL=lido-col_12.cjs.entry.js.map
|