lido-player 0.0.2-alpha-51-dev → 0.0.2-alpha-52-dev
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_22.cjs.entry.js +17 -17
- package/dist/cjs/lido-player.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{utils-dc02d753.js → utils-ce99b0d0.js} +152 -21
- package/dist/collection/components/avatar/lido-avatar.js +1 -1
- package/dist/collection/components/canvas/lido-canvas.css +5 -8
- package/dist/collection/components/canvas/lido-canvas.js +2 -2
- package/dist/collection/components/cell/lido-cell.js +1 -1
- package/dist/collection/components/column/lido-col.js +1 -1
- package/dist/collection/components/flashCard/lido-flash-card.js +1 -1
- package/dist/collection/components/mathMatrix/lido-math-matrix.js +14 -14
- package/dist/collection/components/position/lido-pos.js +1 -1
- package/dist/collection/components/random/lido-random.js +1 -1
- package/dist/collection/components/row/lido-row.js +1 -1
- package/dist/collection/components/shape/lido-shape.js +1 -1
- package/dist/collection/components/trace/lido-trace.js +1 -1
- package/dist/collection/components/wrap/lido-wrap.js +1 -1
- package/dist/collection/stories/Templates/blender/blender.stories.js +100 -0
- package/dist/collection/stories/Templates/calculator/calculator.stories.js +6 -2
- package/dist/collection/stories/Templates/fillAnswer/fill-answer.stories.js +3 -2
- package/dist/collection/stories/Templates/foodJar/food-jar.stories.js +3 -1
- package/dist/collection/stories/Templates/matchingCard/matching-card.stories.js +3 -1
- package/dist/collection/stories/Templates/numberBoardTwo/numberBoardTwo.stories.js +6 -4
- package/dist/collection/stories/Templates/order-tractor/order-tractor-ascending-order.stories.js +14 -13
- package/dist/collection/stories/Templates/order-tractor/order-tractor.stories.js +14 -13
- package/dist/collection/utils/utils.js +142 -15
- package/dist/collection/utils/utilsHandlers/dragDropHandler.js +10 -6
- package/dist/components/index.js +1 -1
- package/dist/components/lido-avatar.js +1 -1
- package/dist/components/lido-balance.js +1 -1
- package/dist/components/lido-calculator.js +1 -1
- package/dist/components/lido-canvas.js +2 -2
- package/dist/components/lido-cell.js +1 -1
- package/dist/components/lido-col.js +1 -1
- package/dist/components/lido-container.js +1 -1
- package/dist/components/lido-flash-card.js +1 -1
- package/dist/components/lido-float.js +1 -1
- package/dist/components/lido-home.js +1 -1
- package/dist/components/lido-image.js +1 -1
- package/dist/components/lido-keyboard.js +1 -1
- package/dist/components/lido-math-matrix.js +1 -1
- package/dist/components/lido-pos.js +1 -1
- package/dist/components/lido-random.js +1 -1
- package/dist/components/lido-root.js +22 -22
- package/dist/components/lido-row.js +1 -1
- package/dist/components/lido-shape.js +1 -1
- package/dist/components/lido-slide-fill.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-e9548986.js → p-00777872.js} +1 -1
- package/dist/components/{p-b7efadad.js → p-06171259.js} +2 -2
- package/dist/components/{p-74b90a9c.js → p-09f1e2d2.js} +8 -8
- package/dist/components/{p-4fd6b588.js → p-0c2aebfb.js} +2 -2
- package/dist/components/{p-62d2a5b3.js → p-11bf64aa.js} +2 -2
- package/dist/components/{p-6ba0f1af.js → p-26df0769.js} +1 -1
- package/dist/components/{p-12432f23.js → p-2d53e1a5.js} +1 -1
- package/dist/components/{p-bef96764.js → p-39a2e638.js} +1 -1
- package/dist/components/{p-56c8f3da.js → p-3ce3744c.js} +3 -3
- package/dist/components/{p-a8724f06.js → p-3f4d4c0a.js} +2 -2
- package/dist/components/{p-988477ad.js → p-52e77394.js} +2 -2
- package/dist/components/{p-d0131159.js → p-58c67252.js} +152 -21
- package/dist/components/{p-1c84cf65.js → p-5b5f59a8.js} +13 -7
- package/dist/components/{p-6be6c5eb.js → p-68112f8c.js} +2 -2
- package/dist/components/{p-b89371ac.js → p-8a34b98b.js} +1 -1
- package/dist/components/{p-bb907e43.js → p-8f2ed62f.js} +2 -2
- package/dist/components/{p-1f3c2783.js → p-9d34d59d.js} +2 -2
- package/dist/components/{p-04e904b5.js → p-a2f96840.js} +1 -1
- package/dist/components/{p-d7693f47.js → p-a516a324.js} +2 -2
- package/dist/components/{p-c8815e84.js → p-b2125fc9.js} +21 -21
- package/dist/components/{p-caa05d1e.js → p-c4abfd0f.js} +2 -2
- package/dist/components/{p-d3f7d561.js → p-cb56a853.js} +2 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/lido-avatar_22.entry.js +17 -17
- package/dist/esm/lido-player.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-b5eb2360.js → utils-107b15a7.js} +152 -21
- package/dist/lido-player/index.esm.js +1 -1
- package/dist/lido-player/lido-player.esm.js +1 -1
- package/dist/lido-player/p-606ea279.entry.js +1 -0
- package/dist/lido-player/{p-9fd87d44.js → p-d1251482.js} +2 -2
- package/dist/types/components/canvas/lido-canvas.d.ts +1 -1
- package/dist/types/components/mathMatrix/lido-math-matrix.d.ts +0 -1
- package/dist/types/components.d.ts +0 -6
- package/dist/types/stories/Templates/blender/blender.stories.d.ts +4 -0
- package/dist/types/utils/utils.d.ts +1 -1
- package/package.json +1 -1
- package/dist/lido-player/p-e1a9c26f.entry.js +0 -1
|
@@ -456,7 +456,9 @@ function enableDraggingWithScaling(element) {
|
|
|
456
456
|
mostOverlappedElement.style.backgroundColor = 'rgba(255, 0, 0, 0.1)'; // Light red background
|
|
457
457
|
}
|
|
458
458
|
else {
|
|
459
|
-
|
|
459
|
+
if (!document.getElementById('unitsDrop') || !document.getElementById('tensDrop') || !document.getElementById('hundredsDrop')) {
|
|
460
|
+
mostOverlappedElement.style.opacity = '0.3';
|
|
461
|
+
}
|
|
460
462
|
}
|
|
461
463
|
}
|
|
462
464
|
};
|
|
@@ -511,6 +513,7 @@ function enableDraggingWithScaling(element) {
|
|
|
511
513
|
// Check for overlaps and log the most overlapping element
|
|
512
514
|
let mostOverlappedElement = findMostoverlappedElement$1(element, 'drop');
|
|
513
515
|
onElementDropComplete(element, mostOverlappedElement);
|
|
516
|
+
executeActions("this.updateCountBlender='true'", container);
|
|
514
517
|
if (((_a = element.getAttribute('dropAttr')) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === DropMode.Diagonal) {
|
|
515
518
|
if (mostOverlappedElement) {
|
|
516
519
|
if (element) {
|
|
@@ -712,10 +715,10 @@ async function onElementDropComplete(dragElement, dropElement) {
|
|
|
712
715
|
let dropHasDrag = buildDropHasDragFromDOM();
|
|
713
716
|
if (!dropElement) {
|
|
714
717
|
handleResetDragElement(dragElement, dropElement, dropHasDrag, selectedValueData, dragSelectedData);
|
|
715
|
-
return;
|
|
716
718
|
}
|
|
717
719
|
const dropTabIndex = dropElement.getAttribute('tab-index');
|
|
718
|
-
|
|
720
|
+
const isAllowOnlyOneDrop = dropElement.getAttribute('is-allow-only-one-drop') === 'false';
|
|
721
|
+
if (((_b = dropHasDrag[dropTabIndex]) === null || _b === void 0 ? void 0 : _b.isFull) && !isAllowOnlyOneDrop) {
|
|
719
722
|
handleResetDragElement(dragElement, dropElement, dropHasDrag, selectedValueData, dragSelectedData);
|
|
720
723
|
return;
|
|
721
724
|
}
|
|
@@ -851,7 +854,8 @@ async function onElementDropComplete(dragElement, dropElement) {
|
|
|
851
854
|
}
|
|
852
855
|
if (!(((_f = dropElement.getAttribute('dropAttr')) === null || _f === void 0 ? void 0 : _f.toLowerCase()) === DropMode.Diagonal) && (dropElement.getAttribute('minDrops') === '1' || !dropElement.getAttribute('minDrops'))) {
|
|
853
856
|
const isisFull = Object.values(dropHasDrag).find(item => document.getElementById(item.drop) === dropElement);
|
|
854
|
-
|
|
857
|
+
const isAllowOnlyOneDrop = dropElement.getAttribute('is-allow-only-one-drop') === 'true';
|
|
858
|
+
if (isAllowOnlyOneDrop && isisFull) {
|
|
855
859
|
isisFull.isFull = true;
|
|
856
860
|
dropElement.setAttribute('is-full', 'true');
|
|
857
861
|
}
|
|
@@ -886,8 +890,8 @@ async function onElementDropComplete(dragElement, dropElement) {
|
|
|
886
890
|
// Check for overlaps and highlight only the most overlapping element
|
|
887
891
|
if (dropElement && !((_g = dropHasDrag[dropTabIndex]) === null || _g === void 0 ? void 0 : _g.isFull)) {
|
|
888
892
|
let mostOverlappedElement = findMostoverlappedElement$1(dragElement, 'drag');
|
|
889
|
-
const isAllowOnlyOneDrop = dropElement.getAttribute('is-allow-only-one-drop') === 'true'
|
|
890
|
-
if (
|
|
893
|
+
const isAllowOnlyOneDrop = dropElement.getAttribute('is-allow-only-one-drop') === 'true';
|
|
894
|
+
if (isAllowOnlyOneDrop && mostOverlappedElement) {
|
|
891
895
|
dragElement.style.transform = 'translate(0,0)';
|
|
892
896
|
dragElement.style.transition = 'transform 0.5s ease';
|
|
893
897
|
const allElements = document.querySelectorAll("[type='drop']");
|
|
@@ -68774,8 +68778,51 @@ const executeActions = async (actionsString, thisElement, element) => {
|
|
|
68774
68778
|
}
|
|
68775
68779
|
break;
|
|
68776
68780
|
}
|
|
68777
|
-
case '
|
|
68778
|
-
|
|
68781
|
+
case 'disableType': {
|
|
68782
|
+
const dragEle = document.querySelector('[type="drag"]');
|
|
68783
|
+
dragEle.removeAttribute('type');
|
|
68784
|
+
dragEle.style.pointerEvents = 'none';
|
|
68785
|
+
break;
|
|
68786
|
+
}
|
|
68787
|
+
case 'updateCountBlender': {
|
|
68788
|
+
const allDrags = document.querySelectorAll('[type="drag"]');
|
|
68789
|
+
let units = 0;
|
|
68790
|
+
let tens = 0;
|
|
68791
|
+
let hundreds = 0;
|
|
68792
|
+
allDrags.forEach(el => {
|
|
68793
|
+
const dropTo = el.getAttribute("drop-to");
|
|
68794
|
+
if (dropTo === "unitsDrop")
|
|
68795
|
+
units++;
|
|
68796
|
+
if (dropTo === "tensDrop")
|
|
68797
|
+
tens++;
|
|
68798
|
+
if (dropTo === "hundredsDrop")
|
|
68799
|
+
hundreds++;
|
|
68800
|
+
});
|
|
68801
|
+
const unitsValue = units * 1;
|
|
68802
|
+
const tensValue = tens * 10;
|
|
68803
|
+
const hundredsValue = hundreds * 100;
|
|
68804
|
+
const totalValue = unitsValue + tensValue + hundredsValue;
|
|
68805
|
+
// ✅ Update Lido Text Boxes
|
|
68806
|
+
const unitsBox = document.getElementById("units");
|
|
68807
|
+
const tensBox = document.getElementById("tens");
|
|
68808
|
+
const hundredsBox = document.getElementById("hundreds");
|
|
68809
|
+
if (unitsBox) {
|
|
68810
|
+
unitsBox.setAttribute("string", unitsValue.toString());
|
|
68811
|
+
}
|
|
68812
|
+
if (tensBox) {
|
|
68813
|
+
tensBox.setAttribute("string", tensValue.toString());
|
|
68814
|
+
}
|
|
68815
|
+
if (hundredsBox) {
|
|
68816
|
+
hundredsBox.setAttribute("string", hundredsValue.toString());
|
|
68817
|
+
}
|
|
68818
|
+
console.log(`Units = ${units} → ${unitsValue}`);
|
|
68819
|
+
console.log(`Tens = ${tens} → ${tensValue}`);
|
|
68820
|
+
console.log(`Hundreds = ${hundreds} → ${hundredsValue}`);
|
|
68821
|
+
console.log(`✅ Total Value = ${totalValue}`);
|
|
68822
|
+
break;
|
|
68823
|
+
}
|
|
68824
|
+
case 'updateCalculatorAnswer': {
|
|
68825
|
+
updateCalculatorAnswer();
|
|
68779
68826
|
break;
|
|
68780
68827
|
}
|
|
68781
68828
|
default: {
|
|
@@ -68794,6 +68841,7 @@ const afterDropDragHandling = (dragElement, dropElement) => {
|
|
|
68794
68841
|
const isInfinite = container.getAttribute('drop-action') === exports.DropAction.InfiniteDrop;
|
|
68795
68842
|
if (isAppend || isInfinite) {
|
|
68796
68843
|
setTimeout(() => {
|
|
68844
|
+
var _a, _b;
|
|
68797
68845
|
dragElement.style.transform = 'translate(0,0)';
|
|
68798
68846
|
dragElement.style.transition = '';
|
|
68799
68847
|
let dummyElement = document.createElement('div');
|
|
@@ -68827,6 +68875,14 @@ const afterDropDragHandling = (dragElement, dropElement) => {
|
|
|
68827
68875
|
dummyElement.style.margin = '0px';
|
|
68828
68876
|
});
|
|
68829
68877
|
}
|
|
68878
|
+
const orientation = window.innerHeight > window.innerWidth ? 'portrait' : 'landscape';
|
|
68879
|
+
const rowAttr = dropElement.getAttribute('dropAttr');
|
|
68880
|
+
const dropAttr = parseProp(rowAttr, orientation); // will return stackcascade or verticalstack
|
|
68881
|
+
if (((_a = (dropAttr)) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === "stackcascade" || ((_b = (dropAttr)) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === "verticalstack") {
|
|
68882
|
+
dropElement.append(dragElement);
|
|
68883
|
+
placeElementInDropZone(dropElement, dragElement, orientation, dropAttr);
|
|
68884
|
+
return;
|
|
68885
|
+
}
|
|
68830
68886
|
dropElement.parentElement.append(element);
|
|
68831
68887
|
dragElement.style.position = 'absolute';
|
|
68832
68888
|
dragElement.style.zIndex = '1';
|
|
@@ -68839,16 +68895,41 @@ const afterDropDragHandling = (dragElement, dropElement) => {
|
|
|
68839
68895
|
const scaledLeft = (dropCenterX - dragCenterX) / containerScale;
|
|
68840
68896
|
const scaledTop = (dropCenterY - dragCenterY) / containerScale;
|
|
68841
68897
|
dragElement.style.transform = `translate(${scaledLeft}px, ${scaledTop}px)`;
|
|
68842
|
-
},
|
|
68898
|
+
}, 100);
|
|
68843
68899
|
}
|
|
68844
68900
|
};
|
|
68901
|
+
// function cloneElementWithComputedStyles(originalEl: HTMLElement): HTMLElement {
|
|
68902
|
+
// let clone = document.createElement('div') as HTMLElement;
|
|
68903
|
+
// clone.innerHTML = originalEl.outerHTML;
|
|
68904
|
+
// clone = clone.firstChild as HTMLElement;
|
|
68905
|
+
// clone.setAttribute('height', originalEl.style.height);
|
|
68906
|
+
// clone.setAttribute('width', originalEl.style.width);
|
|
68907
|
+
// clone.setAttribute('visible', 'true');
|
|
68908
|
+
// return clone;
|
|
68909
|
+
// }
|
|
68845
68910
|
function cloneElementWithComputedStyles(originalEl) {
|
|
68846
|
-
|
|
68847
|
-
|
|
68848
|
-
|
|
68849
|
-
|
|
68850
|
-
|
|
68851
|
-
|
|
68911
|
+
const tag = originalEl.tagName.toLowerCase();
|
|
68912
|
+
if (tag === "lido-text") {
|
|
68913
|
+
let clone = document.createElement('div');
|
|
68914
|
+
clone.innerHTML = originalEl.outerHTML;
|
|
68915
|
+
clone = clone.firstChild;
|
|
68916
|
+
clone.setAttribute('height', originalEl.style.height);
|
|
68917
|
+
clone.setAttribute('width', originalEl.style.width);
|
|
68918
|
+
clone.setAttribute('visible', 'true');
|
|
68919
|
+
return clone;
|
|
68920
|
+
}
|
|
68921
|
+
// ✅ For ALL other types (INCLUDING lido-image & matrix) use your simple logic
|
|
68922
|
+
const clone = originalEl.cloneNode(false);
|
|
68923
|
+
clone.style.width = originalEl.style.width;
|
|
68924
|
+
clone.style.height = originalEl.style.height;
|
|
68925
|
+
clone.style.margin = originalEl.style.margin;
|
|
68926
|
+
clone.style.opacity = originalEl.style.opacity;
|
|
68927
|
+
clone.style.transform = originalEl.style.transform;
|
|
68928
|
+
clone.setAttribute("visible", "true");
|
|
68929
|
+
clone.setAttribute("data-dummy", "true");
|
|
68930
|
+
if (tag === "lido-math-matrix") {
|
|
68931
|
+
clone.setAttribute('clickable', "false");
|
|
68932
|
+
}
|
|
68852
68933
|
return clone;
|
|
68853
68934
|
}
|
|
68854
68935
|
// Function to parse actions string
|
|
@@ -69731,16 +69812,66 @@ const SumTogetherAnimation = async (element, value) => {
|
|
|
69731
69812
|
elementAppearance(false);
|
|
69732
69813
|
}
|
|
69733
69814
|
};
|
|
69734
|
-
|
|
69815
|
+
function placeElementInDropZone(dropElement, dragElement, orientation, dropAttr) {
|
|
69816
|
+
const dropRect = dropElement.getBoundingClientRect();
|
|
69817
|
+
const dragRect = dragElement.getBoundingClientRect();
|
|
69818
|
+
const scale = typeof calculateScale === "function" ? calculateScale() : 1;
|
|
69819
|
+
if (!dropElement.dataset.dropCount)
|
|
69820
|
+
dropElement.dataset.dropCount = "0";
|
|
69821
|
+
let dropCount = parseInt(dropElement.dataset.dropCount, 10);
|
|
69822
|
+
// === READ DROP ZONE SIZE ===
|
|
69823
|
+
const dropWidth = dropRect.width;
|
|
69824
|
+
const dropHeight = dropRect.height;
|
|
69825
|
+
let targetX, targetY;
|
|
69826
|
+
// ---------------- LANDSCAPE WATERFALL ----------------
|
|
69827
|
+
if (orientation === "landscape" && dropAttr.toLowerCase() === "stackcascade") {
|
|
69828
|
+
console.log("🌄 Landscape waterfall");
|
|
69829
|
+
const shiftX = dropWidth * 0.02; // proportional (5% of width)
|
|
69830
|
+
const shiftY = dropHeight * 0.02; // proportional (5% of height)
|
|
69831
|
+
const startX = dropRect.left + dropWidth * 0.36; // 10% inside
|
|
69832
|
+
const startY = dropRect.top + dropHeight * -0.09; // slightly above
|
|
69833
|
+
targetX = startX + (dropCount * shiftX);
|
|
69834
|
+
targetY = startY + (dropCount * shiftY);
|
|
69835
|
+
}
|
|
69836
|
+
// ---------------- PORTRAIT VERTICAL ----------------
|
|
69837
|
+
else {
|
|
69838
|
+
console.log("📱 Portrait vertical stack");
|
|
69839
|
+
let startX;
|
|
69840
|
+
const stepY = dropHeight * 0.05; // 8% vertical step
|
|
69841
|
+
if (dropElement.id === "unitsDrop") {
|
|
69842
|
+
startX = dropRect.left + dropWidth * 0.4; // special spacing
|
|
69843
|
+
}
|
|
69844
|
+
else if (dropElement.id === "tensDrop") {
|
|
69845
|
+
startX = dropRect.left + dropWidth * 0.25;
|
|
69846
|
+
}
|
|
69847
|
+
else {
|
|
69848
|
+
startX = dropRect.left + dropWidth * 0.16; // normal spacing
|
|
69849
|
+
}
|
|
69850
|
+
const startY = dropRect.top - dropHeight * 0.25; // above start
|
|
69851
|
+
targetX = startX;
|
|
69852
|
+
targetY = startY + (dropCount * stepY);
|
|
69853
|
+
}
|
|
69854
|
+
// ------------ APPLY TRANSFORM SMOOTHLY --------------
|
|
69855
|
+
const dx = (targetX - dragRect.left) / scale;
|
|
69856
|
+
const dy = (targetY - dragRect.top) / scale;
|
|
69857
|
+
dragElement.style.transition = "transform .2s ease-out";
|
|
69858
|
+
dragElement.style.transform = `translate(${dx}px, ${dy}px)`;
|
|
69859
|
+
dropElement.dataset.dropCount = String(dropCount + 1);
|
|
69860
|
+
// reset size
|
|
69861
|
+
dragElement.style.width = "auto";
|
|
69862
|
+
dragElement.style.height = "auto";
|
|
69863
|
+
}
|
|
69864
|
+
const updateCalculatorAnswer = () => {
|
|
69735
69865
|
const container = document.getElementById(LidoContainer);
|
|
69736
69866
|
if (!container)
|
|
69737
69867
|
return;
|
|
69738
|
-
const
|
|
69739
|
-
if (!
|
|
69868
|
+
const calci = document.querySelector('#lidoCalculator');
|
|
69869
|
+
if (!calci)
|
|
69740
69870
|
return;
|
|
69741
|
-
const
|
|
69742
|
-
const
|
|
69743
|
-
|
|
69871
|
+
const answerText = container.querySelector('#answer');
|
|
69872
|
+
const value = calci.getAttribute('value');
|
|
69873
|
+
console.log("😀😀😀😀😀😀😀", value);
|
|
69874
|
+
answerText.setAttribute('string', value);
|
|
69744
69875
|
};
|
|
69745
69876
|
|
|
69746
69877
|
exports.ActivityScoreKey = ActivityScoreKey;
|
|
@@ -78,7 +78,7 @@ export class LidoAvatar {
|
|
|
78
78
|
display: this.visible ? 'flex' : 'none',
|
|
79
79
|
zIndex: this.z,
|
|
80
80
|
};
|
|
81
|
-
return (h(Host, { key: '
|
|
81
|
+
return (h(Host, { key: '8a31ce98213ff51bf7cfc776690b6770bbeae604', 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: '922568310a3be177e3185f86c54df95d16a0e42b', class: "lido-canvas" })));
|
|
82
82
|
}
|
|
83
83
|
static get is() { return "lido-avatar"; }
|
|
84
84
|
static get originalStyleUrls() {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
align-items: center;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
.lido-
|
|
7
|
+
.lido-canvas {
|
|
8
8
|
|
|
9
9
|
background:red;
|
|
10
10
|
border: 2px solid #ccc;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
overflow: hidden;
|
|
15
15
|
position: relative;
|
|
16
16
|
}
|
|
17
|
-
button {
|
|
17
|
+
#lido-exit-button {
|
|
18
18
|
padding: 6px 14px;
|
|
19
19
|
border: none;
|
|
20
20
|
background:transparent;
|
|
@@ -23,14 +23,11 @@ button {
|
|
|
23
23
|
cursor: pointer;
|
|
24
24
|
font-size: 14px;
|
|
25
25
|
position: relative;
|
|
26
|
-
top: -
|
|
27
|
-
left:
|
|
26
|
+
top: -43%;
|
|
27
|
+
left: 18%;
|
|
28
28
|
z-index: 10;
|
|
29
29
|
}
|
|
30
|
-
|
|
31
|
-
height:50px;
|
|
32
|
-
width: 60px;
|
|
33
|
-
}
|
|
30
|
+
|
|
34
31
|
canvas {
|
|
35
32
|
/* flex: 1; */
|
|
36
33
|
touch-action: none;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
2
|
import { parseProp } from "../../utils/utils";
|
|
3
|
-
export class
|
|
3
|
+
export class LidoCanvas {
|
|
4
4
|
constructor() {
|
|
5
5
|
// Flag to track drawing state
|
|
6
6
|
this.drawing = false;
|
|
@@ -86,7 +86,7 @@ export class WritingPad {
|
|
|
86
86
|
this.loadBackground();
|
|
87
87
|
}
|
|
88
88
|
render() {
|
|
89
|
-
return (h(Host, { key: '
|
|
89
|
+
return (h(Host, { key: '6768ff870d132528267f2e824fdc6edf5a5fa2be', id: "lido-canvas", class: "lido-canvas", style: this.style }, h("button", { key: 'ba3d5456edfa4618b6c3f57b97fa18cef45f7ae9', id: "lido-exit-button", onClick: () => this.clearCanvas() }, h("lido-text", { key: '3484c9005819e3d08adf8d36b247d3c45610d0b5', visible: "true", height: "92px", width: "43px", id: "lido-exit-icon", "font-color": "white", onEntry: "this.font-weight='900';", "font-size": "96px", string: 'X' })), h("canvas", { key: 'cd4167cefde8d4cf159779c46283cafbc3b0afcc', id: "lido-canvas", style: { width: this.style.width, height: this.style.height, } })));
|
|
90
90
|
}
|
|
91
91
|
static get is() { return "lido-canvas"; }
|
|
92
92
|
static get encapsulation() { return "shadow"; }
|
|
@@ -131,7 +131,7 @@ export class LidoCell {
|
|
|
131
131
|
this.el.className = `lido-${parseProp(this.layout, orientation)}`;
|
|
132
132
|
}
|
|
133
133
|
render() {
|
|
134
|
-
return (h(Host, { key: '
|
|
134
|
+
return (h(Host, { key: '0f7d35324da319917dec546cbb1f25065897bb02', 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: '2a337b5fae7641bbe78c5f1aa1c96e12c1281f4a' })));
|
|
135
135
|
}
|
|
136
136
|
static get is() { return "lido-cell"; }
|
|
137
137
|
static get originalStyleUrls() {
|
|
@@ -84,7 +84,7 @@ export class LidoCol {
|
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
86
|
render() {
|
|
87
|
-
return (h(Host, { key: '
|
|
87
|
+
return (h(Host, { key: '7845d3364dd13cb42959f67610254ee892119c39', id: this.id, class: "lido-col", type: this.type, "tab-index": this.tabIndex, value: this.value, 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 }, h("slot", { key: '09a68a30534c5ea83d7166acd720b4b8f23f494e' })));
|
|
88
88
|
}
|
|
89
89
|
static get is() { return "lido-col"; }
|
|
90
90
|
static get originalStyleUrls() {
|
|
@@ -76,7 +76,7 @@ export class LidoFlash {
|
|
|
76
76
|
}
|
|
77
77
|
/* ---------- Render ---------- */
|
|
78
78
|
render() {
|
|
79
|
-
return (h(Host, { key: '
|
|
79
|
+
return (h(Host, { key: 'b8f000d4e9d04d9954f81dc7e05b109dc16cb223', 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: 'cea63b67d1b6a925ab0520eaa7c5166288bcd71e', class: `card ${this.flipped ? 'flipped' : ''}` }, h("div", { key: '3517e09bb91ac4c6fb2c066539f2d4f51436938f', class: "card-face card-front" }, this.front != null ? this.front : h("slot", { name: "front" })), h("div", { key: '5a14a4ab70898852046f1128c99e5a285c1c37f7', class: "card-face card-back" }, this.back != null ? this.back : h("slot", { name: "back" })))));
|
|
80
80
|
}
|
|
81
81
|
static get is() { return "lido-flash-card"; }
|
|
82
82
|
static get originalStyleUrls() {
|
|
@@ -185,7 +185,7 @@ export class LidoMathMatrix {
|
|
|
185
185
|
render() {
|
|
186
186
|
let slotNumber = 1;
|
|
187
187
|
const slotData = this.getSlotData();
|
|
188
|
-
return (h(Host, { key: '
|
|
188
|
+
return (h(Host, { key: '8232965fc3fb0b298233d21d7f50412508dc2256', class: "math-matrix", style: {
|
|
189
189
|
height: this.style.height,
|
|
190
190
|
width: this.style.width,
|
|
191
191
|
z: this.style.z,
|
|
@@ -252,7 +252,7 @@ export class LidoMathMatrix {
|
|
|
252
252
|
},
|
|
253
253
|
"defualtFill": {
|
|
254
254
|
"type": "number",
|
|
255
|
-
"mutable":
|
|
255
|
+
"mutable": true,
|
|
256
256
|
"complexType": {
|
|
257
257
|
"original": "number",
|
|
258
258
|
"resolved": "number",
|
|
@@ -265,7 +265,7 @@ export class LidoMathMatrix {
|
|
|
265
265
|
"text": "Number of slots to pre-fill as active by default"
|
|
266
266
|
},
|
|
267
267
|
"attribute": "defualt-fill",
|
|
268
|
-
"reflect":
|
|
268
|
+
"reflect": true,
|
|
269
269
|
"defaultValue": "0"
|
|
270
270
|
},
|
|
271
271
|
"leftIndex": {
|
|
@@ -377,7 +377,7 @@ export class LidoMathMatrix {
|
|
|
377
377
|
},
|
|
378
378
|
"activeBgColor": {
|
|
379
379
|
"type": "string",
|
|
380
|
-
"mutable":
|
|
380
|
+
"mutable": true,
|
|
381
381
|
"complexType": {
|
|
382
382
|
"original": "string",
|
|
383
383
|
"resolved": "string",
|
|
@@ -390,12 +390,12 @@ export class LidoMathMatrix {
|
|
|
390
390
|
"text": "Background color for active slots"
|
|
391
391
|
},
|
|
392
392
|
"attribute": "active-bg-color",
|
|
393
|
-
"reflect":
|
|
393
|
+
"reflect": true,
|
|
394
394
|
"defaultValue": "'transparent'"
|
|
395
395
|
},
|
|
396
396
|
"deactiveBgColor": {
|
|
397
397
|
"type": "string",
|
|
398
|
-
"mutable":
|
|
398
|
+
"mutable": true,
|
|
399
399
|
"complexType": {
|
|
400
400
|
"original": "string",
|
|
401
401
|
"resolved": "string",
|
|
@@ -405,15 +405,15 @@ export class LidoMathMatrix {
|
|
|
405
405
|
"optional": false,
|
|
406
406
|
"docs": {
|
|
407
407
|
"tags": [],
|
|
408
|
-
"text": "
|
|
408
|
+
"text": ""
|
|
409
409
|
},
|
|
410
410
|
"attribute": "deactive-bg-color",
|
|
411
|
-
"reflect":
|
|
411
|
+
"reflect": true,
|
|
412
412
|
"defaultValue": "'transparent'"
|
|
413
413
|
},
|
|
414
414
|
"border": {
|
|
415
415
|
"type": "string",
|
|
416
|
-
"mutable":
|
|
416
|
+
"mutable": true,
|
|
417
417
|
"complexType": {
|
|
418
418
|
"original": "string",
|
|
419
419
|
"resolved": "string",
|
|
@@ -426,12 +426,12 @@ export class LidoMathMatrix {
|
|
|
426
426
|
"text": "Border style applied to each slot"
|
|
427
427
|
},
|
|
428
428
|
"attribute": "border",
|
|
429
|
-
"reflect":
|
|
429
|
+
"reflect": true,
|
|
430
430
|
"defaultValue": "'2px solid green'"
|
|
431
431
|
},
|
|
432
432
|
"height": {
|
|
433
433
|
"type": "string",
|
|
434
|
-
"mutable":
|
|
434
|
+
"mutable": true,
|
|
435
435
|
"complexType": {
|
|
436
436
|
"original": "string",
|
|
437
437
|
"resolved": "string",
|
|
@@ -444,12 +444,12 @@ export class LidoMathMatrix {
|
|
|
444
444
|
"text": "Height of the slot container"
|
|
445
445
|
},
|
|
446
446
|
"attribute": "height",
|
|
447
|
-
"reflect":
|
|
447
|
+
"reflect": true,
|
|
448
448
|
"defaultValue": "'100%'"
|
|
449
449
|
},
|
|
450
450
|
"width": {
|
|
451
451
|
"type": "string",
|
|
452
|
-
"mutable":
|
|
452
|
+
"mutable": true,
|
|
453
453
|
"complexType": {
|
|
454
454
|
"original": "string",
|
|
455
455
|
"resolved": "string",
|
|
@@ -462,7 +462,7 @@ export class LidoMathMatrix {
|
|
|
462
462
|
"text": "Width of the slot container"
|
|
463
463
|
},
|
|
464
464
|
"attribute": "width",
|
|
465
|
-
"reflect":
|
|
465
|
+
"reflect": true,
|
|
466
466
|
"defaultValue": "'100%'"
|
|
467
467
|
},
|
|
468
468
|
"borderRadius": {
|
|
@@ -66,7 +66,7 @@ export class LidoPos {
|
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
68
|
render() {
|
|
69
|
-
return (h(Host, { key: '
|
|
69
|
+
return (h(Host, { key: '0eea8147ee3845668e83bed01164dce740aae785', id: this.id, class: "lido-pos", type: this.type, "tab-index": this.tabIndex, style: this.style, "aria-label": this.ariaLabel, "aria-hidden": this.ariaHidden, minDrops: this.minDrops, maxDrops: this.maxDrops, value: this.value, audio: this.audio, onTouch: this.onTouch, onCorrect: this.onCorrect, onInCorrect: this.onInCorrect, onEntry: this.onEntry }, h("slot", { key: 'ca9378dc185eeb4d495ab3045d6b17424de908dc' })));
|
|
70
70
|
}
|
|
71
71
|
static get is() { return "lido-pos"; }
|
|
72
72
|
static get originalStyleUrls() {
|
|
@@ -78,7 +78,7 @@ export class LidoRandom {
|
|
|
78
78
|
backgroundColor: this.bgColor,
|
|
79
79
|
margin: this.margin,
|
|
80
80
|
};
|
|
81
|
-
return (h(Host, { key: '
|
|
81
|
+
return (h(Host, { key: 'cc8bb9d31ff6c36201d266f5579288c92c05bf82', class: "lido-random", 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, minDrops: this.minDrops, maxDrops: this.maxDrops, onInCorrect: this.onInCorrect, onEntry: this.onEntry }, h("slot", { key: 'd91a2403fa78320cbae40456dc0c86b44493bb5a' })));
|
|
82
82
|
}
|
|
83
83
|
static get is() { return "lido-random"; }
|
|
84
84
|
static get originalStyleUrls() {
|
|
@@ -78,7 +78,7 @@ export class LidoRow {
|
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
80
|
render() {
|
|
81
|
-
return (h(Host, { key: '
|
|
81
|
+
return (h(Host, { key: '2d2f701dda922276d2485e91f15c8912c90d7b8d', 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: 'b00002ecc9d5de422094beffc33ae5137b958fa3' })));
|
|
82
82
|
}
|
|
83
83
|
static get is() { return "lido-row"; }
|
|
84
84
|
static get originalStyleUrls() {
|
|
@@ -54,7 +54,7 @@ export class LidoShape {
|
|
|
54
54
|
backgroundColor: this.shapeType !== 'polygon' ? this.bgColor : 'transparent', // Apply background only if not a polygon
|
|
55
55
|
margin: this.margin,
|
|
56
56
|
};
|
|
57
|
-
return (h(Host, { key: '
|
|
57
|
+
return (h(Host, { key: '7a626d9f00854cf190c08524153086d0e9f139af', 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 }));
|
|
58
58
|
}
|
|
59
59
|
static get is() { return "lido-shape"; }
|
|
60
60
|
static get originalStyleUrls() {
|
|
@@ -712,7 +712,7 @@ export class LidoTrace {
|
|
|
712
712
|
};
|
|
713
713
|
}
|
|
714
714
|
render() {
|
|
715
|
-
return (h(Host, { key: '
|
|
715
|
+
return (h(Host, { key: '204d2999e3d6f0c36c991566e19608870e287d7a', 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: '9c97878119641e2efc26fa7d711c7639276417ac', style: this.style, id: "lido-svgContainer" })));
|
|
716
716
|
}
|
|
717
717
|
static get is() { return "lido-trace"; }
|
|
718
718
|
static get originalStyleUrls() {
|
|
@@ -80,7 +80,7 @@ export class LidoWrap {
|
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
82
|
render() {
|
|
83
|
-
return (h(Host, { key: '
|
|
83
|
+
return (h(Host, { key: '50bc5770105477d0ef7cb080957c8d00198c8b09', 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: 'fcd1f5801e34171d1925e39f6c543f229a5d42bd' })));
|
|
84
84
|
}
|
|
85
85
|
static get is() { return "lido-wrap"; }
|
|
86
86
|
static get originalStyleUrls() {
|