@alepot55/chessboardjs 1.0.2 → 1.0.3

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.
@@ -0,0 +1,4 @@
1
+ <svg width="72" height="72" viewBox="0 0 72 72" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M26.314 16.8839C25.9121 15.7797 25.6923 14.5878 25.6923 13.3462C25.6923 7.63212 30.3244 3 36.0385 3C41.7525 3 46.3846 7.63212 46.3846 13.3462C46.3846 15.0199 45.9846 16.6065 45.2755 18.0095C46.2959 18.0801 47.2874 18.5398 48.0103 19.366C51.9379 23.8547 55.375 30.2548 55.375 37.6731C55.375 42.9766 53.5491 46.9066 51.0819 49.7383L55.7679 50.5601C57.6813 50.8957 59.0769 52.5574 59.0769 54.5V62C59.0769 63.0609 58.6555 64.0783 57.9053 64.8284C57.1552 65.5786 56.1378 66 55.0769 66L17 66C14.7909 66 13 64.2091 13 62V54.5C13 52.5597 14.3925 50.8992 16.3032 50.5612L20.5303 49.8134C18.0294 46.9764 16.1731 43.0244 16.1731 37.6731C16.1731 31.8853 18.416 26.8449 21.0466 22.9821C22.7001 20.5541 24.5721 18.4927 26.314 16.8839Z" fill="#F4F7FA"/>
3
+ <path d="M38 37.1442H34C34 29.7994 36.2277 22.4669 41.1561 17.0997C41.9284 16.0485 42.3846 14.7506 42.3846 13.3462C42.3846 9.84126 39.5434 7 36.0385 7C32.5336 7 29.6923 9.84126 29.6923 13.3462C29.6923 15.0754 30.384 16.6431 31.5056 17.7877C27.5414 20.6138 20.1731 28.1889 20.1731 37.6731C20.1731 47.2443 27.6772 51.1192 31.6139 51.9147L17 54.5V62L55.0769 62V54.5L40.1165 51.8762C44.0977 50.9999 51.375 47.0985 51.375 37.6731C51.375 31.5015 48.5 26 45 22C41.1561 25 38 32 38 37.1442Z" fill="#34364C"/>
4
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg width="72" height="72" viewBox="0 0 72 72" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M26.314 16.8839C25.9121 15.7797 25.6923 14.5878 25.6923 13.3462C25.6923 7.63212 30.3244 3 36.0385 3C41.7525 3 46.3846 7.63212 46.3846 13.3462C46.3846 15.0199 45.9846 16.6065 45.2755 18.0095C46.2959 18.0801 47.2874 18.5398 48.0103 19.366C51.9379 23.8547 55.375 30.2548 55.375 37.6731C55.375 42.9766 53.5491 46.9066 51.0819 49.7383L55.7679 50.5601C57.6813 50.8957 59.0769 52.5574 59.0769 54.5V62C59.0769 63.0609 58.6555 64.0783 57.9053 64.8284C57.1552 65.5786 56.1378 66 55.0769 66L17 66C14.7909 66 13 64.2091 13 62V54.5C13 52.5597 14.3925 50.8992 16.3032 50.5612L20.5303 49.8134C18.0294 46.9764 16.1731 43.0244 16.1731 37.6731C16.1731 31.8853 18.416 26.8449 21.0466 22.9821C22.7001 20.5541 24.5721 18.4927 26.314 16.8839Z" fill="#34364C"/>
3
+ <path d="M38 37.1442H34C34 29.7994 36.2277 22.4669 41.1561 17.0997C41.9284 16.0485 42.3846 14.7506 42.3846 13.3462C42.3846 9.84126 39.5434 7 36.0385 7C32.5336 7 29.6923 9.84126 29.6923 13.3462C29.6923 15.0754 30.384 16.6431 31.5056 17.7877C27.5414 20.6138 20.1731 28.1889 20.1731 37.6731C20.1731 47.2443 27.6772 51.1192 31.6139 51.9147L17 54.5V62L55.0769 62V54.5L40.1165 51.8762C44.0977 50.9999 51.375 47.0985 51.375 37.6731C51.375 31.5015 48.5 26 45 22C41.1561 25 38 32 38 37.1442Z" fill="#F4F7FA"/>
4
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg width="72" height="72" viewBox="0 0 72 72" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M30.0019 3.87506C30.0694 1.71562 31.8395 0 34 0H40C42.1605 0 43.9306 1.71562 43.998 3.87506L44.0332 5H46C48.2091 5 50 6.79086 50 9V11.4261C54.3602 10.4394 59.0663 11.0984 63.0607 14.4271C71.3589 21.3423 70.5954 35.8381 60.7472 43.7669C58.3706 45.6803 56.5035 47.2665 55.2178 48.901C54.9245 49.2739 54.6732 49.6347 54.4617 49.9878L58.5156 50.5361C60.4995 50.8044 61.9795 52.4981 61.9795 54.5V62C61.9795 64.2091 60.1886 66 57.9795 66H16.0205C13.8114 66 12.0205 64.2091 12.0205 62V54.5C12.0205 52.4981 13.5005 50.8044 15.4844 50.5361L19.5383 49.9878C19.3268 49.6347 19.0755 49.2739 18.7822 48.901C17.4965 47.2665 15.6294 45.6803 13.2528 43.7669C3.40462 35.8381 2.64109 21.3423 10.9393 14.4271C14.9337 11.0984 19.6398 10.4394 24 11.4261V9C24 6.79086 25.7909 5 28 5H29.9668L30.0019 3.87506Z" fill="#F4F7FA"/>
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M34 4H40L40.1562 9H46V15H40.3437L40.6185 21.793C40.7282 21.6638 40.8411 21.5372 40.9574 21.4135C46.4206 15.6071 54.5207 12.5172 60.5 17.5C66.5 22.5 66.5 34 58.2387 40.6512C53.559 44.4188 49.3673 48.0509 49.5739 53.3632L57.9795 54.5V62H16.0205V54.5L24.4261 53.3632C24.6327 48.0509 20.441 44.4188 15.7613 40.6512C7.5 34 7.5 22.5 13.5 17.5C19.4793 12.5172 27.5794 15.6071 33.0426 21.4135C33.1589 21.5372 33.2718 21.6638 33.3815 21.793L33.6562 15H28V9H33.8437L34 4ZM28.348 26.9731C32.0147 32.9791 32.5 40 32.5 43.0532C30.6621 43.0565 23.7338 40.0085 20.0656 35.0046C17.4248 31.4022 16.7362 26.0575 19 23.9825C21.2638 21.9075 26.0563 23.2194 28.348 26.9731ZM45.652 26.9731C41.9853 32.9791 41.5 40 41.5 43.0532C43.3379 43.0565 50.2662 40.0085 53.9344 35.0046C56.5752 31.4022 57.2638 26.0575 55 23.9825C52.7362 21.9075 47.9436 23.2194 45.652 26.9731Z" fill="#34364C"/>
4
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg width="72" height="72" viewBox="0 0 72 72" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M30.0019 3.87506C30.0694 1.71562 31.8395 0 34 0H40C42.1605 0 43.9306 1.71562 43.998 3.87506L44.0332 5H46C48.2091 5 50 6.79086 50 9V11.4261C54.3602 10.4394 59.0663 11.0984 63.0607 14.4271C71.3589 21.3423 70.5954 35.8381 60.7472 43.7669C58.3706 45.6803 56.5035 47.2665 55.2178 48.901C54.9245 49.2739 54.6732 49.6347 54.4617 49.9878L58.5156 50.5361C60.4995 50.8044 61.9795 52.4981 61.9795 54.5V62C61.9795 64.2091 60.1886 66 57.9795 66H16.0205C13.8114 66 12.0205 64.2091 12.0205 62V54.5C12.0205 52.4981 13.5005 50.8044 15.4844 50.5361L19.5383 49.9878C19.3268 49.6347 19.0755 49.2739 18.7822 48.901C17.4965 47.2665 15.6294 45.6803 13.2528 43.7669C3.40462 35.8381 2.64109 21.3423 10.9393 14.4271C14.9337 11.0984 19.6398 10.4394 24 11.4261V9C24 6.79086 25.7909 5 28 5H29.9668L30.0019 3.87506Z" fill="#34364C"/>
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M34 4H40L40.1562 9H46V15H40.3437L40.6185 21.793C40.7282 21.6638 40.8411 21.5372 40.9574 21.4135C46.4206 15.6071 54.5207 12.5172 60.5 17.5C66.5 22.5 66.5 34 58.2387 40.6512C53.559 44.4188 49.3673 48.0509 49.5739 53.3632L57.9795 54.5V62H16.0205V54.5L24.4261 53.3632C24.6327 48.0509 20.441 44.4188 15.7613 40.6512C7.5 34 7.5 22.5 13.5 17.5C19.4793 12.5172 27.5794 15.6071 33.0426 21.4135C33.1589 21.5372 33.2718 21.6638 33.3815 21.793L33.6562 15H28V9H33.8437L34 4ZM28.348 26.9731C32.0147 32.9791 32.5 40 32.5 43.0532C30.6621 43.0565 23.7338 40.0085 20.0656 35.0046C17.4248 31.4022 16.7362 26.0575 19 23.9825C21.2638 21.9075 26.0563 23.2194 28.348 26.9731ZM45.652 26.9731C41.9853 32.9791 41.5 40 41.5 43.0532C43.3379 43.0565 50.2662 40.0085 53.9344 35.0046C56.5752 31.4022 57.2638 26.0575 55 23.9825C52.7362 21.9075 47.9436 23.2194 45.652 26.9731Z" fill="#F4F7FA"/>
4
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg width="72" height="72" viewBox="0 0 72 72" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M29.6899 0.506964C31.0065 0.358909 32.3111 0.872458 33.1735 1.87833L41.3344 11.3968C50.7064 13.7128 56.1365 20.7698 59.1398 29.5796C62.2345 38.6575 63 50.182 63 62C63 64.2091 61.2091 66 59 66H21.7049C19.5814 66 17.8279 64.3406 17.711 62.2202C17.6066 60.3281 18.042 57.0449 19.3686 53.6914L19.393 53.63C15.6257 55.6522 11.4448 55.1678 8.34113 52.958C4.56927 50.2725 2.47202 45.0154 4.86816 39.8238C6.59604 36.08 8.45832 34.0976 9.86712 32.5982C11.1831 31.1977 11.7315 30.5817 12.1194 29.0299C14.4717 19.6209 19.3109 14.2007 24.5079 11.7271C24.4327 10.6552 24.4938 9.62248 24.6253 8.68489C24.9526 6.35108 25.7673 4.19438 26.5978 2.61775C27.2153 1.44546 28.3732 0.655018 29.6899 0.506964Z" fill="#F4F7FA"/>
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M39.1707 15.0185L30.1368 4.48187C28.8291 6.96447 27.5614 11.3461 29.3841 14.5091C28.4994 14.5879 27.6539 14.7375 27 15C22.8279 16.6743 18.25 21 16 30C15.3485 32.606 14.1759 33.854 12.7822 35.3372C11.4676 36.7364 9.95622 38.3448 8.5 41.5C5.5 48 13.5963 54.5 19.5 48.5963C22.8191 45.2772 25.7204 43.9069 28.1562 42.7566C31.662 41.1008 34.2037 39.9004 35.6393 34C36.3224 36.7523 36.0492 43.2477 29.4918 47.211C22.9344 51.1743 21.5683 59.5229 21.7049 61.9999H59C59 38.4832 55.8865 18.1648 39.1707 15.0185Z" fill="#34364C"/>
4
+ <circle cx="28" cy="27" r="3" fill="#F4F7FA"/>
5
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg width="72" height="72" viewBox="0 0 72 72" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M29.6899 0.506964C31.0065 0.358909 32.3111 0.872458 33.1735 1.87833L41.3344 11.3968C50.7064 13.7128 56.1365 20.7698 59.1398 29.5796C62.2345 38.6575 63 50.182 63 62C63 64.2091 61.2091 66 59 66H21.7049C19.5814 66 17.8279 64.3406 17.711 62.2202C17.6066 60.3281 18.042 57.0449 19.3686 53.6914L19.393 53.63C15.6257 55.6522 11.4448 55.1678 8.34113 52.958C4.56927 50.2725 2.47202 45.0154 4.86816 39.8238C6.59604 36.08 8.45832 34.0976 9.86712 32.5982C11.1831 31.1977 11.7315 30.5817 12.1194 29.0299C14.4717 19.6209 19.3109 14.2007 24.5079 11.7271C24.4327 10.6552 24.4938 9.62248 24.6253 8.68489C24.9526 6.35108 25.7673 4.19438 26.5978 2.61775C27.2153 1.44546 28.3732 0.655018 29.6899 0.506964Z" fill="#34364C"/>
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M39.1707 15.0185L30.1368 4.48187C28.8291 6.96447 27.5614 11.3461 29.3841 14.5091C28.4994 14.5879 27.6539 14.7375 27 15C22.8279 16.6743 18.25 21 16 30C15.3485 32.606 14.1759 33.854 12.7822 35.3372C11.4676 36.7364 9.95622 38.3448 8.5 41.5C5.5 48 13.5963 54.5 19.5 48.5963C22.8191 45.2772 25.7204 43.9069 28.1562 42.7566C31.662 41.1008 34.2037 39.9004 35.6393 34C36.3224 36.7523 36.0492 43.2477 29.4918 47.211C22.9344 51.1743 21.5683 59.5229 21.7049 61.9999H59C59 38.4832 55.8865 18.1648 39.1707 15.0185Z" fill="#F4F7FA"/>
4
+ <circle cx="28" cy="27" r="3" fill="#34364C"/>
5
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg width="72" height="72" viewBox="0 0 72 72" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M23.1075 41.127C22.6303 41.7785 22.0608 42.4569 21.3971 43.1548C19.0545 45.6178 16.1816 47.6443 14.3274 48.7038L14.0154 48.8821C12.7691 49.5942 12 50.9196 12 52.355V62C12 64.2091 13.7909 66 16 66H55C57.2091 66 59 64.2091 59 62V52.355C59 50.9196 58.2309 49.5943 56.9846 48.8821L56.6727 48.7038C54.8185 47.6443 51.9455 45.6178 49.6029 43.1548C48.9392 42.4569 48.3697 41.7785 47.8925 41.127C49.648 40.7041 50.9524 39.1234 50.9524 37.2381V30.7269C50.9524 29.4272 50.3209 28.2085 49.2591 27.459L47.5602 26.2598C48.5405 24.3551 49.0952 22.1938 49.0952 19.9048C49.0952 12.2254 42.8699 6 35.1905 6C27.5111 6 21.2857 12.2254 21.2857 19.9048C21.2857 22.3225 21.9044 24.5972 22.9895 26.5776L21.7409 27.459C20.6791 28.2085 20.0476 29.4272 20.0476 30.7269V37.2381C20.0476 39.1234 21.352 40.7041 23.1075 41.127Z" fill="#F4F7FA"/>
3
+ <path d="M45.0952 19.9048C45.0952 22.7774 43.8723 25.3645 41.9187 27.1736L46.9524 30.7269V37.2381H42.0246C42.2622 40.2562 44.1987 43.2768 46.7045 45.9115C49.3638 48.7075 52.5633 50.9626 54.6881 52.1768L55 52.355V62H16V52.355L16.3119 52.1768C18.4367 50.9626 21.6362 48.7075 24.2955 45.9115C26.8013 43.2768 28.7378 40.2562 28.9754 37.2381H24.0476V30.7269L28.7357 27.4176C26.6234 25.6012 25.2857 22.9092 25.2857 19.9048C25.2857 14.4345 29.7202 10 35.1905 10C40.6607 10 45.0952 14.4345 45.0952 19.9048Z" fill="#34364C"/>
4
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg width="72" height="72" viewBox="0 0 72 72" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M23.1075 41.127C22.6303 41.7785 22.0608 42.4569 21.3971 43.1548C19.0545 45.6178 16.1816 47.6443 14.3274 48.7038L14.0154 48.8821C12.7691 49.5942 12 50.9196 12 52.355V62C12 64.2091 13.7909 66 16 66H55C57.2091 66 59 64.2091 59 62V52.355C59 50.9196 58.2309 49.5943 56.9846 48.8821L56.6727 48.7038C54.8185 47.6443 51.9455 45.6178 49.6029 43.1548C48.9392 42.4569 48.3697 41.7785 47.8925 41.127C49.648 40.7041 50.9524 39.1234 50.9524 37.2381V30.7269C50.9524 29.4272 50.3209 28.2085 49.2591 27.459L47.5602 26.2598C48.5405 24.3551 49.0952 22.1938 49.0952 19.9048C49.0952 12.2254 42.8699 6 35.1905 6C27.5111 6 21.2857 12.2254 21.2857 19.9048C21.2857 22.3225 21.9044 24.5972 22.9895 26.5776L21.7409 27.459C20.6791 28.2085 20.0476 29.4272 20.0476 30.7269V37.2381C20.0476 39.1234 21.352 40.7041 23.1075 41.127Z" fill="#34364C"/>
3
+ <path d="M45.0952 19.9048C45.0952 22.7774 43.8723 25.3645 41.9187 27.1736L46.9524 30.7269V37.2381H42.0246C42.2622 40.2562 44.1987 43.2768 46.7045 45.9115C49.3638 48.7075 52.5633 50.9626 54.6881 52.1768L55 52.355V62H16V52.355L16.3119 52.1768C18.4367 50.9626 21.6362 48.7075 24.2955 45.9115C26.8013 43.2768 28.7378 40.2562 28.9754 37.2381H24.0476V30.7269L28.7357 27.4176C26.6234 25.6012 25.2857 22.9092 25.2857 19.9048C25.2857 14.4345 29.7202 10 35.1905 10C40.6607 10 45.0952 14.4345 45.0952 19.9048Z" fill="#F4F7FA"/>
4
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg width="72" height="72" viewBox="0 0 72 72" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M18 10C18 10.9873 18.1588 11.9373 18.4523 12.8258L16.4779 13.752C14.841 12.0553 12.5438 11 10 11C5.02944 11 1 15.0294 1 20C1 24.4308 4.2018 28.1138 8.41791 28.8614L13.16 45.12C13.259 45.4594 13.4025 45.7842 13.5869 46.0858L16.32 50.5582L16.3032 50.5612C14.3925 50.8992 13 52.5597 13 54.5V62C13 64.2091 14.7909 66 17 66L55.0769 66C56.1378 66 57.1552 65.5786 57.9053 64.8284C58.6555 64.0783 59.0769 63.0609 59.0769 62V54.5C59.0769 52.5574 57.6813 50.8957 55.7679 50.5601L55.6875 50.546L58.4131 46.0858C58.5975 45.7842 58.741 45.4594 58.84 45.12L63.5821 28.8614C67.7982 28.1138 71 24.4308 71 20C71 15.0294 66.9706 11 62 11C59.453 11 57.1532 12.058 55.5159 13.7584L53.545 12.8339C53.8402 11.9431 54 10.9903 54 10C54 5.02944 49.9706 1 45 1C40.0294 1 36 5.02944 36 10C36 5.02944 31.9706 1 27 1C22.0294 1 18 5.02944 18 10Z" fill="#F4F7FA"/>
3
+ <path d="M28.7948 14.6682C30.6696 13.947 32 12.1288 32 10C32 7.23858 29.7614 5 27 5C24.2386 5 22 7.23858 22 10C22 12.5519 23.9117 14.6572 26.3811 14.9621L24.1513 33L13.4022 23.6641C14.3851 22.751 15 21.4473 15 20C15 17.2386 12.7614 15 10 15C7.23858 15 5 17.2386 5 20C5 22.7614 7.23858 25 10 25C10.4861 25 10.956 24.9306 11.4004 24.8013L17 44L22.7906 53.4756L17 54.5V62L55.0769 62V54.5L49.2119 53.4714L55 44L60.5996 24.8013C61.044 24.9306 61.5139 25 62 25C64.7614 25 67 22.7614 67 20C67 17.2386 64.7614 15 62 15C59.2386 15 57 17.2386 57 20C57 21.4473 57.6149 22.751 58.5978 23.6641L47.8487 33L45.6189 14.9621C48.0883 14.6572 50 12.5519 50 10C50 7.23858 47.7614 5 45 5C42.2386 5 40 7.23858 40 10C40 12.1288 41.3304 13.947 43.2052 14.6682L36 31L28.7948 14.6682Z" fill="#34364C"/>
4
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg width="72" height="72" viewBox="0 0 72 72" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M18 10C18 10.9873 18.1588 11.9373 18.4523 12.8258L16.4779 13.752C14.841 12.0553 12.5438 11 10 11C5.02944 11 1 15.0294 1 20C1 24.4308 4.2018 28.1138 8.41791 28.8614L13.16 45.12C13.259 45.4594 13.4025 45.7842 13.5869 46.0858L16.32 50.5582L16.3032 50.5612C14.3925 50.8992 13 52.5597 13 54.5V62C13 64.2091 14.7909 66 17 66L55.0769 66C56.1378 66 57.1552 65.5786 57.9053 64.8284C58.6555 64.0783 59.0769 63.0609 59.0769 62V54.5C59.0769 52.5574 57.6813 50.8957 55.7679 50.5601L55.6875 50.546L58.4131 46.0858C58.5975 45.7842 58.741 45.4594 58.84 45.12L63.5821 28.8614C67.7982 28.1138 71 24.4308 71 20C71 15.0294 66.9706 11 62 11C59.453 11 57.1532 12.058 55.5159 13.7584L53.545 12.8339C53.8402 11.9431 54 10.9903 54 10C54 5.02944 49.9706 1 45 1C40.0294 1 36 5.02944 36 10C36 5.02944 31.9706 1 27 1C22.0294 1 18 5.02944 18 10Z" fill="#34364C"/>
3
+ <path d="M28.7948 14.6682C30.6696 13.947 32 12.1288 32 10C32 7.23858 29.7614 5 27 5C24.2386 5 22 7.23858 22 10C22 12.5519 23.9117 14.6572 26.3811 14.9621L24.1513 33L13.4022 23.6641C14.3851 22.751 15 21.4473 15 20C15 17.2386 12.7614 15 10 15C7.23858 15 5 17.2386 5 20C5 22.7614 7.23858 25 10 25C10.4861 25 10.956 24.9306 11.4004 24.8013L17 44L22.7906 53.4756L17 54.5V62L55.0769 62V54.5L49.2119 53.4714L55 44L60.5996 24.8013C61.044 24.9306 61.5139 25 62 25C64.7614 25 67 22.7614 67 20C67 17.2386 64.7614 15 62 15C59.2386 15 57 17.2386 57 20C57 21.4473 57.6149 22.751 58.5978 23.6641L47.8487 33L45.6189 14.9621C48.0883 14.6572 50 12.5519 50 10C50 7.23858 47.7614 5 45 5C42.2386 5 40 7.23858 40 10C40 12.1288 41.3304 13.947 43.2052 14.6682L36 31L28.7948 14.6682Z" fill="#F4F7FA"/>
4
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg width="72" height="72" viewBox="0 0 72 72" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M26 5C26.7286 5 27.4117 5.19479 28 5.53513C28.5883 5.19479 29.2714 5 30 5H41C41.7286 5 42.4117 5.19479 43 5.53513C43.5884 5.19479 44.2714 5 45 5H55C57.2091 5 59 6.79086 59 9V18C59 19.259 58.4072 20.4446 57.4 21.2L51.2279 25.8291L52.9755 41.5583C53.4382 45.7226 55.3765 47.8353 58.2 51.6C58.7193 52.2924 59 53.1345 59 54V62C59 64.2091 57.2091 66 55 66H16C13.7909 66 12 64.2091 12 62V54C12 53.1345 12.2807 52.2924 12.8 51.6C15.6235 47.8353 17.5618 45.7226 18.0245 41.5583L19.7722 25.8291L13.6 21.2C12.5928 20.4446 12 19.259 12 18V9C12 6.79086 13.7909 5 16 5H26Z" fill="#F4F7FA"/>
3
+ <path d="M16 9H26V15H30V9H41V15H45V9H55V18L47 24L49 42H22L24 24L16 18V9Z" fill="#34364C"/>
4
+ <path d="M22 46H49L55 54V62H16V54L22 46Z" fill="#34364C"/>
5
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg width="72" height="72" viewBox="0 0 72 72" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M26 5C26.7286 5 27.4117 5.19479 28 5.53513C28.5883 5.19479 29.2714 5 30 5H41C41.7286 5 42.4117 5.19479 43 5.53513C43.5884 5.19479 44.2714 5 45 5H55C57.2091 5 59 6.79086 59 9V18C59 19.259 58.4072 20.4446 57.4 21.2L51.2279 25.8291L52.9755 41.5583C53.4382 45.7226 55.3765 47.8353 58.2 51.6C58.7193 52.2924 59 53.1345 59 54V62C59 64.2091 57.2091 66 55 66H16C13.7909 66 12 64.2091 12 62V54C12 53.1345 12.2807 52.2924 12.8 51.6C15.6235 47.8353 17.5618 45.7226 18.0245 41.5583L19.7722 25.8291L13.6 21.2C12.5928 20.4446 12 19.259 12 18V9C12 6.79086 13.7909 5 16 5H26Z" fill="#34364C"/>
3
+ <path d="M16 9H26V15H30V9H41V15H45V9H55V18L47 24L49 42H22L24 24L16 18V9Z" fill="#F4F7FA"/>
4
+ <path d="M22 46H49L55 54V62H16V54L22 46Z" fill="#F4F7FA"/>
5
+ </svg>
package/chessboard.css CHANGED
@@ -19,7 +19,6 @@
19
19
  grid-template: repeat(8, 1fr) / repeat(8, 1fr);
20
20
  width: var(--dimBoard);
21
21
  height: var(--dimBoard);
22
- border: 1px solid black;
23
22
  }
24
23
 
25
24
  .square {
@@ -37,10 +36,14 @@
37
36
  height: calc(calc(var(--dimBoard) / 8) * var(--pieceRatio));
38
37
 
39
38
  /* No selection */
40
- -webkit-user-select: none; /* Safari */
41
- -moz-user-select: none; /* Firefox */
42
- -ms-user-select: none; /* IE10+/Edge */
43
- user-select: none; /* Standard */
39
+ -webkit-user-select: none;
40
+ /* Safari */
41
+ -moz-user-select: none;
42
+ /* Firefox */
43
+ -ms-user-select: none;
44
+ /* IE10+/Edge */
45
+ user-select: none;
46
+ /* Standard */
44
47
  }
45
48
 
46
49
  .choicable {
@@ -99,4 +102,4 @@
99
102
 
100
103
  .highlighted {
101
104
  box-shadow: inset 0 0 10px var(--highlightSquare);
102
- }
105
+ }
package/chessboard.js CHANGED
@@ -20,6 +20,7 @@ class ChessboardConfig {
20
20
  clickable: true,
21
21
  movableColors: 'both',
22
22
  moveHighlight: true,
23
+ overHighlight: true,
23
24
  moveAnimation: 'ease',
24
25
  moveTime: 'fast',
25
26
 
@@ -51,8 +52,8 @@ class ChessboardConfig {
51
52
  highlight: 'yellow',
52
53
  selectedSquareWhite: '#ababaa',
53
54
  selectedSquareBlack: '#ababaa',
54
- movedWhite: '#f1f1a0',
55
- movedBlack: '#e9e981',
55
+ movedSquareWhite: '#f1f1a0',
56
+ movedSquareBlack: '#e9e981',
56
57
  choiceSquare: 'white',
57
58
  coverSquare: 'black',
58
59
  hintColor: '#ababaa'
@@ -94,6 +95,9 @@ class ChessboardConfig {
94
95
  // moveHighlight: true, false
95
96
  this.moveHighlight = settings.moveHighlight === undefined ? defaults.moveHighlight : settings.moveHighlight;
96
97
 
98
+ // overHighlight: true, false
99
+ this.overHighlight = settings.overHighlight === undefined ? defaults.overHighlight : settings.overHighlight;
100
+
97
101
  // moveAnimation: 'linear', 'ease', 'ease-in', 'ease-out', 'ease-in-out', 'none'
98
102
  this.moveAnimation = settings.moveAnimation === undefined ? defaults.moveAnimation : settings.moveAnimation;
99
103
 
@@ -157,7 +161,7 @@ class ChessboardConfig {
157
161
  settings.blackSquare === undefined ? this.setCSSProperty('blackSquare', defaults.blackSquare) : this.setCSSProperty('blackSquare', settings.blackSquare);
158
162
 
159
163
  // highlight: string
160
- settings.highlight === undefined ? this.setCSSProperty('highlight', defaults.highlight) : this.setCSSProperty('highlight', settings.highlight);
164
+ settings.highlight === undefined ? this.setCSSProperty('highlightSquare', defaults.highlight) : this.setCSSProperty('highlightSquare', settings.highlight);
161
165
 
162
166
  // selectedSquareWhite: string
163
167
  settings.selectedSquareWhite === undefined ? this.setCSSProperty('selectedSquareWhite', defaults.selectedSquareWhite) : this.setCSSProperty('selectedSquareWhite', settings.selectedSquareWhite);
@@ -165,11 +169,11 @@ class ChessboardConfig {
165
169
  // selectedSquareBlack: string
166
170
  settings.selectedSquareBlack === undefined ? this.setCSSProperty('selectedSquareBlack', defaults.selectedSquareBlack) : this.setCSSProperty('selectedSquareBlack', settings.selectedSquareBlack);
167
171
 
168
- // movedWhite: string
169
- settings.movedWhite === undefined ? this.setCSSProperty('movedWhite', defaults.movedWhite) : this.setCSSProperty('movedWhite', settings.movedWhite);
172
+ // movedSquareWhite: string
173
+ settings.movedSquareWhite === undefined ? this.setCSSProperty('movedSquareWhite', defaults.movedSquareWhite) : this.setCSSProperty('movedSquareWhite', settings.movedSquareWhite);
170
174
 
171
- // movedBlack: string
172
- settings.movedBlack === undefined ? this.setCSSProperty('movedBlack', defaults.movedBlack) : this.setCSSProperty('movedBlack', settings.movedBlack);
175
+ // movedSquareBlack: string
176
+ settings.movedSquareBlack === undefined ? this.setCSSProperty('movedSquareBlack', defaults.movedSquareBlack) : this.setCSSProperty('movedSquareBlack', settings.movedSquareBlack);
173
177
 
174
178
  // choiceSquare: string
175
179
  settings.choiceSquare === undefined ? this.setCSSProperty('choiceSquare', defaults.choiceSquare) : this.setCSSProperty('choiceSquare', settings.choiceSquare);
@@ -188,6 +192,8 @@ class ChessboardConfig {
188
192
  } else if (this.mode === 'normal') {
189
193
  this.onlyLegalMoves = true;
190
194
  }
195
+
196
+ return this;
191
197
  }
192
198
 
193
199
  setCSSProperty(property, value) {
@@ -200,7 +206,7 @@ class ChessboardConfig {
200
206
  }
201
207
  }
202
208
 
203
- export class Chessboard {
209
+ class Chessboard {
204
210
 
205
211
  constructor(config) {
206
212
 
@@ -210,7 +216,7 @@ export class Chessboard {
210
216
  this.pieces = {};
211
217
  this.celle = {};
212
218
  this.squares = {};
213
- this.buildGame(config.position);
219
+ this.buildGame(this.config.position);
214
220
  this.initParams();
215
221
  this.buildBoard();
216
222
  this.updatePosition();
@@ -699,6 +705,7 @@ export class Chessboard {
699
705
  }
700
706
 
701
707
  onClick(square, animation = true) {
708
+ console.log('onClick', square);
702
709
 
703
710
  if (!square || square === this.lastSquare) return;
704
711
 
@@ -718,7 +725,7 @@ export class Chessboard {
718
725
  this.dehintAllSquares();
719
726
  } else if (!this.canMove(square)) return;
720
727
 
721
- if (from && this.canMove(from)) {
728
+ if (from && this.canMove(from) && !this.canMove(square)) {
722
729
 
723
730
  if (this.config.onlyLegalMoves && !this.legalMove(move)) return;
724
731
  if (move.length == 4 && this.promote(move)) return;
@@ -869,16 +876,18 @@ export class Chessboard {
869
876
 
870
877
  moved(square) {
871
878
  this.checkSquare(square);
879
+ if (!this.config.moveHighlight) return;
872
880
  let elem = this.celle[square];
873
- if (this.isWhiteSquare(square)) elem.className += ' movedWhite';
874
- else elem.className += ' movedBlack';
881
+ if (this.isWhiteSquare(square)) elem.className += ' movedSquareWhite';
882
+ else elem.className += ' movedSquareBlack';
875
883
  }
876
884
 
877
885
  unmoved(square) {
878
886
  this.checkSquare(square);
887
+ if (!this.config.moveHighlight) return;
879
888
  let elem = this.celle[square];
880
- if (this.isWhiteSquare(square)) elem.className = elem.className.replace(' movedWhite', '');
881
- else elem.className = elem.className.replace(' movedBlack', '');
889
+ if (this.isWhiteSquare(square)) elem.className = elem.className.replace(' movedSquareWhite', '');
890
+ else elem.className = elem.className.replace(' movedSquareBlack', '');
882
891
  }
883
892
 
884
893
  unmoveAllSquares() {
@@ -1036,14 +1045,14 @@ export class Chessboard {
1036
1045
 
1037
1046
  highlight(square) {
1038
1047
  this.checkSquare(square);
1039
- if (!square || !this.celle[square] || !this.config.moveHighlight) return;
1048
+ if (!square || !this.celle[square] || !this.config.overHighlight) return;
1040
1049
  let elem = this.celle[square];
1041
1050
  elem.className += ' highlighted';
1042
1051
  }
1043
1052
 
1044
1053
  dehighlight(square) {
1045
1054
  this.checkSquare(square);
1046
- if (!square || !this.celle[square] || !this.config.moveHighlight) return;
1055
+ if (!square || !this.celle[square] || !this.config.overHighlight) return;
1047
1056
  let elem = this.celle[square];
1048
1057
  elem.className = elem.className.replace(' highlighted', '');
1049
1058
  }
@@ -1155,4 +1164,6 @@ export class Chessboard {
1155
1164
  return (x < 0.5) ? 2 * x ** 2 : 4 * x - 2 * x ** 2 - 1;
1156
1165
  }
1157
1166
  }
1158
- }
1167
+ }
1168
+
1169
+ module.exports = Chessboard;
package/chessboard_min.js CHANGED
@@ -12,19 +12,20 @@ class ChessboardConfig {
12
12
  position: 'start',
13
13
  orientation: 'w',
14
14
  mode: 'normal',
15
- draggable: true,
16
- dropOffBoard: 'snapback',
17
- hints: true,
18
- clickable: true,
19
15
  size: 600,
20
16
 
21
17
  // ---------------------- Moves
18
+ draggable: true,
19
+ hints: true,
20
+ clickable: true,
22
21
  movableColors: 'both',
23
22
  moveHighlight: true,
23
+ overHighlight: true,
24
24
  moveAnimation: 'ease',
25
25
  moveTime: 'fast',
26
26
 
27
27
  // ---------------------- Snapback
28
+ dropOffBoard: 'snapback',
28
29
  snapbackTime: 'fast',
29
30
  snapbackAnimation: 'ease',
30
31
 
@@ -51,8 +52,8 @@ class ChessboardConfig {
51
52
  highlight: 'yellow',
52
53
  selectedSquareWhite: '#ababaa',
53
54
  selectedSquareBlack: '#ababaa',
54
- movedWhite: '#f1f1a0',
55
- movedBlack: '#e9e981',
55
+ movedSquareWhite: '#f1f1a0',
56
+ movedSquareBlack: '#e9e981',
56
57
  choiceSquare: 'white',
57
58
  coverSquare: 'black',
58
59
  hintColor: '#ababaa'
@@ -94,6 +95,9 @@ class ChessboardConfig {
94
95
  // moveHighlight: true, false
95
96
  this.moveHighlight = settings.moveHighlight === undefined ? defaults.moveHighlight : settings.moveHighlight;
96
97
 
98
+ // overHighlight: true, false
99
+ this.overHighlight = settings.overHighlight === undefined ? defaults.overHighlight : settings.overHighlight;
100
+
97
101
  // moveAnimation: 'linear', 'ease', 'ease-in', 'ease-out', 'ease-in-out', 'none'
98
102
  this.moveAnimation = settings.moveAnimation === undefined ? defaults.moveAnimation : settings.moveAnimation;
99
103
 
@@ -157,7 +161,7 @@ class ChessboardConfig {
157
161
  settings.blackSquare === undefined ? this.setCSSProperty('blackSquare', defaults.blackSquare) : this.setCSSProperty('blackSquare', settings.blackSquare);
158
162
 
159
163
  // highlight: string
160
- settings.highlight === undefined ? this.setCSSProperty('highlight', defaults.highlight) : this.setCSSProperty('highlight', settings.highlight);
164
+ settings.highlight === undefined ? this.setCSSProperty('highlightSquare', defaults.highlight) : this.setCSSProperty('highlightSquare', settings.highlight);
161
165
 
162
166
  // selectedSquareWhite: string
163
167
  settings.selectedSquareWhite === undefined ? this.setCSSProperty('selectedSquareWhite', defaults.selectedSquareWhite) : this.setCSSProperty('selectedSquareWhite', settings.selectedSquareWhite);
@@ -165,11 +169,11 @@ class ChessboardConfig {
165
169
  // selectedSquareBlack: string
166
170
  settings.selectedSquareBlack === undefined ? this.setCSSProperty('selectedSquareBlack', defaults.selectedSquareBlack) : this.setCSSProperty('selectedSquareBlack', settings.selectedSquareBlack);
167
171
 
168
- // movedWhite: string
169
- settings.movedWhite === undefined ? this.setCSSProperty('movedWhite', defaults.movedWhite) : this.setCSSProperty('movedWhite', settings.movedWhite);
172
+ // movedSquareWhite: string
173
+ settings.movedSquareWhite === undefined ? this.setCSSProperty('movedSquareWhite', defaults.movedSquareWhite) : this.setCSSProperty('movedSquareWhite', settings.movedSquareWhite);
170
174
 
171
- // movedBlack: string
172
- settings.movedBlack === undefined ? this.setCSSProperty('movedBlack', defaults.movedBlack) : this.setCSSProperty('movedBlack', settings.movedBlack);
175
+ // movedSquareBlack: string
176
+ settings.movedSquareBlack === undefined ? this.setCSSProperty('movedSquareBlack', defaults.movedSquareBlack) : this.setCSSProperty('movedSquareBlack', settings.movedSquareBlack);
173
177
 
174
178
  // choiceSquare: string
175
179
  settings.choiceSquare === undefined ? this.setCSSProperty('choiceSquare', defaults.choiceSquare) : this.setCSSProperty('choiceSquare', settings.choiceSquare);
@@ -188,6 +192,8 @@ class ChessboardConfig {
188
192
  } else if (this.mode === 'normal') {
189
193
  this.onlyLegalMoves = true;
190
194
  }
195
+
196
+ return this;
191
197
  }
192
198
 
193
199
  setCSSProperty(property, value) {
@@ -210,7 +216,7 @@ class Chessboard {
210
216
  this.pieces = {};
211
217
  this.celle = {};
212
218
  this.squares = {};
213
- this.buildGame(config.position);
219
+ this.buildGame(this.config.position);
214
220
  this.initParams();
215
221
  this.buildBoard();
216
222
  this.updatePosition();
@@ -506,7 +512,7 @@ class Chessboard {
506
512
  if (!board.canMove(from)) return;
507
513
 
508
514
  if (!board.config.clickable) board.lastSquare = null;
509
- board.onClick(square)
515
+ board.onClick(square);
510
516
 
511
517
  img.style.position = 'absolute';
512
518
  img.style.zIndex = 15;
@@ -718,7 +724,8 @@ class Chessboard {
718
724
  this.dehintAllSquares();
719
725
  } else if (!this.canMove(square)) return;
720
726
 
721
- if (from && this.canMove(from)) {
727
+
728
+ if (from && this.canMove(from) && !this.canMove(square)) {
722
729
 
723
730
  if (this.config.onlyLegalMoves && !this.legalMove(move)) return;
724
731
  if (move.length == 4 && this.promote(move)) return;
@@ -729,6 +736,7 @@ class Chessboard {
729
736
  return true;
730
737
 
731
738
  } else if (this.canMove(square)) {
739
+
732
740
  this.select(square);
733
741
  this.hintMoves(square);
734
742
  this.lastSquare = square;
@@ -869,16 +877,18 @@ class Chessboard {
869
877
 
870
878
  moved(square) {
871
879
  this.checkSquare(square);
880
+ if (!this.config.moveHighlight) return;
872
881
  let elem = this.celle[square];
873
- if (this.isWhiteSquare(square)) elem.className += ' movedWhite';
874
- else elem.className += ' movedBlack';
882
+ if (this.isWhiteSquare(square)) elem.className += ' movedSquareWhite';
883
+ else elem.className += ' movedSquareBlack';
875
884
  }
876
885
 
877
886
  unmoved(square) {
878
887
  this.checkSquare(square);
888
+ if (!this.config.moveHighlight) return;
879
889
  let elem = this.celle[square];
880
- if (this.isWhiteSquare(square)) elem.className = elem.className.replace(' movedWhite', '');
881
- else elem.className = elem.className.replace(' movedBlack', '');
890
+ if (this.isWhiteSquare(square)) elem.className = elem.className.replace(' movedSquareWhite', '');
891
+ else elem.className = elem.className.replace(' movedSquareBlack', '');
882
892
  }
883
893
 
884
894
  unmoveAllSquares() {
@@ -1036,14 +1046,14 @@ class Chessboard {
1036
1046
 
1037
1047
  highlight(square) {
1038
1048
  this.checkSquare(square);
1039
- if (!square || !this.celle[square] || !this.config.moveHighlight) return;
1049
+ if (!square || !this.celle[square] || !this.config.overHighlight) return;
1040
1050
  let elem = this.celle[square];
1041
1051
  elem.className += ' highlighted';
1042
1052
  }
1043
1053
 
1044
1054
  dehighlight(square) {
1045
1055
  this.checkSquare(square);
1046
- if (!square || !this.celle[square] || !this.config.moveHighlight) return;
1056
+ if (!square || !this.celle[square] || !this.config.overHighlight) return;
1047
1057
  let elem = this.celle[square];
1048
1058
  elem.className = elem.className.replace(' highlighted', '');
1049
1059
  }
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "chess.js": "^1.0.0-beta.8"
4
4
  },
5
5
  "name": "@alepot55/chessboardjs",
6
- "version": "1.0.2",
6
+ "version": "1.0.3",
7
7
  "main": "chessboard.js",
8
8
  "type": "module",
9
9
  "scripts": {