Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
New windows cursors (#843)
Oscar Beaumont5e59b954a87a
diff --git a/crates/cursor-info/assets/windows/appstarting.svg b/crates/cursor-info/assets/windows/appstarting.svgnew file mode 100644index 000000000..30f2aa323--- /dev/null+++ b/crates/cursor-info/assets/windows/appstarting.svg@@ -0,0 +1,8 @@+<svg width="69" height="87" viewBox="0 0 69 87" fill="none" xmlns="http://www.w3.org/2000/svg">+<path d="M2 74.2479V28.2336L35.3286 61.6986H19.415L27.5219 81.1202L19.415 84.1081L11.6083 64.9853L2 74.2479Z" fill="white" stroke="black" stroke-width="3"/>+<mask id="path-2-inside-1_35_39" fill="white">+<path d="M69 24.814C69 38.4587 57.89 49.5199 44.1852 49.5199C30.4803 49.5199 19.3704 38.4587 19.3704 24.814C19.3704 11.1694 30.4803 0.108154 44.1852 0.108154C57.89 0.108154 69 11.1694 69 24.814ZM31.7778 24.814C31.7778 31.6364 37.3328 37.167 44.1852 37.167C51.0376 37.167 56.5926 31.6364 56.5926 24.814C56.5926 17.9917 51.0376 12.4611 44.1852 12.4611C37.3328 12.4611 31.7778 17.9917 31.7778 24.814Z"/>+</mask>+<path d="M69 24.814C69 38.4587 57.89 49.5199 44.1852 49.5199C30.4803 49.5199 19.3704 38.4587 19.3704 24.814C19.3704 11.1694 30.4803 0.108154 44.1852 0.108154C57.89 0.108154 69 11.1694 69 24.814ZM31.7778 24.814C31.7778 31.6364 37.3328 37.167 44.1852 37.167C51.0376 37.167 56.5926 31.6364 56.5926 24.814C56.5926 17.9917 51.0376 12.4611 44.1852 12.4611C37.3328 12.4611 31.7778 17.9917 31.7778 24.814Z" fill="#2991EA" stroke="#B8B8B8" stroke-width="2" mask="url(#path-2-inside-1_35_39)"/>+<path d="M29.952 4.57616C34.092 1.68999 39.0186 0.131242 44.0726 0.108409C49.1266 0.085575 54.0671 1.59975 58.2333 4.44839L51.2092 14.6312C49.1261 13.2069 46.6559 12.4498 44.1289 12.4612C41.6019 12.4726 39.1386 13.252 37.0686 14.6951L29.952 4.57616Z" fill="#25CCFF"/>+</svg>diff --git a/crates/cursor-info/assets/windows/idchelp.svg b/crates/cursor-info/assets/windows/idchelp.svgnew file mode 100644index 000000000..45bfe1150--- /dev/null+++ b/crates/cursor-info/assets/windows/idchelp.svg@@ -0,0 +1,4 @@+<svg width="75" height="80" viewBox="0 0 75 80" fill="none" xmlns="http://www.w3.org/2000/svg">+<path d="M65.0868 64.4828C64.9112 64.2187 64.7716 63.8908 64.6681 63.5012C64.5646 63.1138 64.5151 62.7309 64.5151 62.3567C64.5151 61.8108 64.5871 61.3244 64.7311 60.8952C64.8752 60.4683 65.0822 60.0633 65.3613 59.6803C65.6404 59.2995 65.9915 58.9144 66.4146 58.5248C66.8378 58.1352 67.3284 57.7126 67.8866 57.2636C68.7148 56.5923 69.444 55.943 70.0832 55.3092C70.7224 54.6797 71.2535 54.0216 71.6856 53.336C72.1133 52.6504 72.4418 51.9219 72.6624 51.1504C72.8875 50.379 73 49.5184 73 48.5687C73 47.072 72.7299 45.791 72.1988 44.7235C71.6631 43.6572 70.9249 42.7801 69.9751 42.0945C69.0254 41.4089 67.9181 40.907 66.6397 40.5868C65.3658 40.2677 63.9884 40.1082 62.5074 40.1082C60.9624 40.1082 59.4646 40.2875 58.0141 40.6452C56.5647 41.004 55.2266 41.5421 54 42.2585V49.2928C55.1951 48.265 56.4611 47.4968 57.7991 46.9906C59.1383 46.4844 60.4279 46.2312 61.6702 46.2312C62.2464 46.2312 62.7641 46.3171 63.2367 46.4888C63.7048 46.6593 64.1054 46.8938 64.4295 47.1898C64.7581 47.4858 65.0102 47.8402 65.1857 48.2528C65.3613 48.6655 65.4468 49.1134 65.4468 49.5965C65.4468 50.1578 65.3658 50.6684 65.2082 51.1273C65.0462 51.5873 64.8076 52.0308 64.4925 52.4589C64.1729 52.8881 63.7858 53.3162 63.3312 53.7454C62.8766 54.1735 62.3499 54.6368 61.7423 55.1353C61.1694 55.6041 60.6676 56.0751 60.2366 56.5505C59.8067 57.026 59.4488 57.5234 59.1619 58.045C58.8749 58.5666 58.66 59.1235 58.5159 59.7155C58.373 60.3076 58.301 60.9635 58.301 61.6788C58.301 62.1322 58.3449 62.6098 58.4327 63.1161C58.5204 63.6223 58.6442 64.0779 58.8029 64.4829L65.0868 64.4828ZM65.4152 76.0099C66.2299 75.2792 66.635 74.3503 66.635 73.23C66.635 72.123 66.2209 71.2117 65.3927 70.4942C64.5644 69.7635 63.5201 69.3959 62.2598 69.3959C60.9859 69.3959 59.927 69.7635 59.0818 70.4942C58.2378 71.2272 57.8158 72.1383 57.8158 73.23C57.8158 74.2887 58.2378 75.2087 59.0818 75.9879C59.927 76.734 60.9859 77.1082 62.2598 77.1082C63.5336 77.1082 64.587 76.7428 65.4152 76.0099Z" fill="#FFFFFE" stroke="#000001" stroke-width="4" stroke-miterlimit="10" stroke-linejoin="round"/>+<path d="M42 44.7888H24.7949L31.8609 58.9714L21.5935 64.1082L13.7121 48.1673L2 59.4369V5.10816L42 44.7888Z" fill="#FFFFFE" stroke="#000001" stroke-width="4" stroke-miterlimit="10"/>+</svg>diff --git a/crates/cursor-info/assets/windows/idcperson.svg b/crates/cursor-info/assets/windows/idcperson.svgnew file mode 100644index 000000000..bc5dc9a0c--- /dev/null+++ b/crates/cursor-info/assets/windows/idcperson.svg@@ -0,0 +1,17 @@+<svg width="93" height="94" viewBox="0 0 93 94" fill="none" xmlns="http://www.w3.org/2000/svg">+<g clip-path="url(#clip0_34_16)">+<path d="M25.3322 32.6136V20.9481C25.3322 20.9481 25.3322 17.0596 29.2207 17.0596C33.1092 17.0596 33.1092 20.9481 33.1092 20.9481V32.6136" fill="#FFFFFE"/>+<path d="M25.3322 32.6136V20.9481C25.3322 20.9481 25.3322 17.0596 29.2207 17.0596C33.1092 17.0596 33.1092 20.9481 33.1092 20.9481V32.6136" stroke="#000001" stroke-width="4" stroke-miterlimit="10"/>+<path d="M33.1092 32.6136V22.8923C33.1092 22.8923 33.1092 19.0038 36.9977 19.0038C40.8862 19.0038 40.8862 22.8923 40.8862 22.8923V32.6136" fill="#FFFFFE"/>+<path d="M33.1092 32.6136V22.8923C33.1092 22.8923 33.1092 19.0038 36.9977 19.0038C40.8862 19.0038 40.8862 22.8923 40.8862 22.8923V32.6136" stroke="#000001" stroke-width="4" stroke-miterlimit="10"/>+<path d="M40.8862 32.6136V24.8366C40.8862 24.8366 40.8862 20.9481 44.7747 20.9481C48.6632 20.9481 48.6632 24.8366 48.6632 24.8366V43.307C48.6632 43.307 50.6074 62.7495 31.1649 62.7495C31.1649 62.7495 24.0141 63.1293 17.5551 56.9168L3.94538 41.3627C3.94538 41.3627 0.0568753 37.4742 3.94538 33.5857C3.94538 33.5857 6.86174 30.6694 11.7224 35.53L15.0983 38.9059C16.0049 39.8126 17.5551 39.1704 17.5551 37.8883V6.36621C17.5551 6.36621 17.5551 2.4777 21.4436 2.4777C25.3321 2.4777 25.3321 6.36621 25.3321 6.36621V32.6136" fill="#FFFFFE"/>+<path d="M40.8862 32.6136V24.8366C40.8862 24.8366 40.8862 20.9481 44.7747 20.9481C48.6632 20.9481 48.6632 24.8366 48.6632 24.8366V43.307C48.6632 43.307 50.6074 62.7495 31.1649 62.7495C31.1649 62.7495 24.0141 63.1293 17.5551 56.9168L3.94538 41.3627C3.94538 41.3627 0.0568753 37.4742 3.94538 33.5857C3.94538 33.5857 6.86174 30.6694 11.7224 35.53L15.0983 38.9059C16.0049 39.8126 17.5551 39.1704 17.5551 37.8883V6.36621C17.5551 6.36621 17.5551 2.4777 21.4436 2.4777C25.3321 2.4777 25.3321 6.36621 25.3321 6.36621V32.6136" stroke="#000001" stroke-width="4" stroke-miterlimit="10"/>+<path d="M79.1578 87.8323C79.1578 79.0458 72.0349 71.923 63.2484 71.923C54.4619 71.923 47.3391 79.0458 47.3391 87.8323C47.3391 87.8323 50.1703 90.7386 63.2484 90.7386C76.3266 90.7386 79.1578 87.8323 79.1578 87.8323Z" fill="#FFFFFE" stroke="#000001" stroke-width="4" stroke-miterlimit="10"/>+<path d="M63.2485 50.0511C69.2882 50.0511 74.1844 54.9473 74.1844 60.987C74.1844 67.0268 69.2882 71.923 63.2485 71.923C57.2087 71.923 52.3125 67.0268 52.3125 60.987C52.3125 54.9473 57.2087 50.0511 63.2485 50.0511Z" fill="#FFFFFE" stroke="#000001" stroke-width="4" stroke-miterlimit="10"/>+</g>+<defs>+<clipPath id="clip0_34_16">+<rect width="93" height="93" fill="white" transform="matrix(1 0 0 -1 0 93.1082)"/>+</clipPath>+</defs>+</svg>diff --git a/crates/cursor-info/assets/windows/idcpin.svg b/crates/cursor-info/assets/windows/idcpin.svgnew file mode 100644index 000000000..990e7dc21--- /dev/null+++ b/crates/cursor-info/assets/windows/idcpin.svg@@ -0,0 +1,17 @@+<svg width="93" height="94" viewBox="0 0 93 94" fill="none" xmlns="http://www.w3.org/2000/svg">+<g clip-path="url(#clip0_34_10)">+<path d="M77.7094 63.7809C77.7094 70.9675 64.6968 90.4995 64.6968 90.4995C64.6968 90.4995 51.6842 70.9675 51.6842 63.7809C51.6842 56.5942 57.5102 50.7683 64.6968 50.7683C71.8835 50.7683 77.7094 56.5942 77.7094 63.7809Z" fill="#FFFFFE" stroke="#000001" stroke-width="4" stroke-miterlimit="10"/>+<path d="M64.7602 57.8934C68.002 57.8934 70.63 60.5214 70.63 63.7632C70.63 67.0051 68.002 69.6331 64.7602 69.6331C61.5184 69.6331 58.8904 67.0051 58.8904 63.7632C58.8904 60.5214 61.5184 57.8934 64.7602 57.8934Z" fill="black"/>+<path d="M26.7805 32.8526V21.1871C26.7805 21.1871 26.7805 17.2986 30.6691 17.2986C34.5576 17.2986 34.5576 21.1871 34.5576 21.1871V32.8526" fill="#FFFFFE"/>+<path d="M26.7805 32.8526V21.1871C26.7805 21.1871 26.7805 17.2986 30.6691 17.2986C34.5576 17.2986 34.5576 21.1871 34.5576 21.1871V32.8526" stroke="#000001" stroke-width="4" stroke-miterlimit="10"/>+<path d="M34.5576 32.8526V23.1314C34.5576 23.1314 34.5576 19.2429 38.4461 19.2429C42.3346 19.2429 42.3346 23.1314 42.3346 23.1314V32.8526" fill="#FFFFFE"/>+<path d="M34.5576 32.8526V23.1314C34.5576 23.1314 34.5576 19.2429 38.4461 19.2429C42.3346 19.2429 42.3346 23.1314 42.3346 23.1314V32.8526" stroke="#000001" stroke-width="4" stroke-miterlimit="10"/>+<path d="M42.3346 32.8526V25.0756C42.3346 25.0756 42.3346 21.1871 46.2231 21.1871C50.1116 21.1871 50.1116 25.0756 50.1116 25.0756V43.546C50.1116 43.546 51.6842 62.9885 32.6133 62.9885C32.6133 62.9885 25.4625 63.3683 19.0035 57.1558L5.39378 41.6018C5.39378 41.6018 1.50528 37.7133 5.39378 33.8248C5.39378 33.8248 8.31015 30.9084 13.1708 35.769L16.5467 39.145C17.4534 40.0516 19.0035 39.4095 19.0035 38.1273V6.60525C19.0035 6.60525 19.0035 2.71675 22.892 2.71675C26.7805 2.71675 26.7805 6.60525 26.7805 6.60525V32.8526" fill="#FFFFFE"/>+<path d="M42.3346 32.8526V25.0756C42.3346 25.0756 42.3346 21.1871 46.2231 21.1871C50.1116 21.1871 50.1116 25.0756 50.1116 25.0756V43.546C50.1116 43.546 51.6842 62.9885 32.6133 62.9885C32.6133 62.9885 25.4625 63.3683 19.0035 57.1558L5.39378 41.6018C5.39378 41.6018 1.50528 37.7133 5.39378 33.8248C5.39378 33.8248 8.31015 30.9084 13.1708 35.769L16.5467 39.145C17.4534 40.0516 19.0035 39.4095 19.0035 38.1273V6.60525C19.0035 6.60525 19.0035 2.71675 22.892 2.71675C26.7805 2.71675 26.7805 6.60525 26.7805 6.60525V32.8526" stroke="#000001" stroke-width="4" stroke-miterlimit="10"/>+</g>+<defs>+<clipPath id="clip0_34_10">+<rect width="93" height="93" fill="white" transform="matrix(1 0 0 -1 0 93.1082)"/>+</clipPath>+</defs>+</svg>diff --git a/crates/cursor-info/assets/windows/idcsizenwse.svg b/crates/cursor-info/assets/windows/idcsizenwse.svgnew file mode 100644index 000000000..80921f51d--- /dev/null+++ b/crates/cursor-info/assets/windows/idcsizenwse.svg@@ -0,0 +1,3 @@+<svg width="95" height="96" viewBox="0 0 95 96" fill="none" xmlns="http://www.w3.org/2000/svg">+<path d="M18.0588 28.8729L4.67647 42.2552L2 39.5788V2.10815H39.4706L42.147 4.78468L28.7647 18.167L76.9412 66.3435L90.3235 52.9611L93 55.6376V93.1082H55.5294L52.8529 90.4317L66.2353 77.0494L18.0588 28.8729Z" fill="#FFFFFE" stroke="#000001" stroke-width="4" stroke-miterlimit="10"/>+</svg>diff --git a/crates/cursor-info/assets/windows/idcsizewe.svg b/crates/cursor-info/assets/windows/idcsizewe.svgnew file mode 100644index 000000000..1622a22d0--- /dev/null+++ b/crates/cursor-info/assets/windows/idcsizewe.svg@@ -0,0 +1,3 @@+<svg width="127" height="55" viewBox="0 0 127 55" fill="none" xmlns="http://www.w3.org/2000/svg">+<path d="M31.4706 34.251H95.5294V52.1082H99.0882L124 27.1082L99.0882 2.10815H95.5294V19.9653H31.4706V2.10815H27.9117L3 27.1082L27.9117 52.1082H31.4706V34.251Z" fill="#FFFFFE" stroke="#000001" stroke-width="4" stroke-miterlimit="10"/>+</svg>diff --git a/crates/cursor-info/assets/windows/uparrow.svg b/crates/cursor-info/assets/windows/uparrow.svgnew file mode 100644index 000000000..a8ad4d2bb--- /dev/null+++ b/crates/cursor-info/assets/windows/uparrow.svg@@ -0,0 +1,3 @@+<svg width="63" height="120" viewBox="0 0 63 120" fill="none" xmlns="http://www.w3.org/2000/svg">+<path d="M23.0714 36.886V117.108H39.9286V36.886H61V32.6637L31.5 3.10815L2 32.6637V36.886H23.0714Z" fill="#FFFFFE" stroke="#000001" stroke-width="4" stroke-miterlimit="10"/>+</svg>diff --git a/crates/cursor-info/cursors.html b/crates/cursor-info/cursors.htmlindex df920e5f0..c88e7158b 100644--- a/crates/cursor-info/cursors.html+++ b/crates/cursor-info/cursors.html@@ -63,18 +63,33 @@display: block;max-width: 200px;max-height: 200px;+ pointer-events: none;+ }++ .cursor-svg.macos {+ max-width: 250px;+ max-height: 250px;}.hotspot {position: absolute;- width: 8px;- height: 8px;- background: red;- border: 2px solid white;- border-radius: 50%;+ width: 6px;+ height: 6px;+ background: rgba(255, 0, 0, 0.6);+ border-radius: 1px;transform: translate(-50%, -50%);pointer-events: none;- box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);+ }++ .hotspot::after {+ content: "";+ position: absolute;+ top: 50%;+ left: 50%;+ width: 1px;+ height: 1px;+ background: black;+ transform: translate(-50%, -50%);}.hotspot-info {@@ -91,18 +106,7 @@}.copy-button {- margin-top: 5px;- padding: 2px 8px;- font-size: 10px;- background: #007bff;- color: white;- border: none;- border-radius: 3px;- cursor: pointer;- }-- .copy-button:hover {- background: #0056b3;+ display: none;}.platform-section {@@ -153,13 +157,13 @@name: "arrow",hash: "de2d1f4a81e520b65fd1317b845b00a1c51a4d1f71cca3cd4ccdab52b98d1ac9",svg: "assets/mac/arrow.svg",- hotspot: [0.235, 0.174],+ hotspot: [0.347, 0.33],},{name: "contextual_menu",hash: "ab26ca862492d41355b711c58544687a799dd7ae14cf161959ca524bbc97c322",svg: "assets/mac/contextual_menu.svg",- hotspot: [0.179, 0.125],+ hotspot: [0.278, 0.295],},{name: "closed_hand",@@ -171,25 +175,25 @@name: "crosshair",hash: "c583f776531f4e7b76ea7ba2ab159765e2da11fd63cb897cc10362183859d1d8",svg: "assets/mac/crosshair.svg",- hotspot: [0.458, 0.458],+ hotspot: [0.52, 0.51],},{name: "drag_copy",hash: "af060876004c8647d82411eeac1bbd613d2991d46794aba16b56c91d3081e128",svg: "assets/mac/drag_copy.svg",- hotspot: [0.179, 0.125],+ hotspot: [0.255, 0.1],},{name: "drag_link",hash: "59ac2483461f4ad577a0a6b68be89fe663c36263b583c5f038eee2ae6a5ad98f",svg: "assets/mac/drag_link.svg",- hotspot: [0.688, 0.143],+ hotspot: [0.621, 0.309],},{name: "ibeam",hash: "492dca0bb6751a30607ac728803af992ba69365052b7df2dff1c0dfe463e653c",svg: "assets/mac/ibeam.svg",- hotspot: [0.444, 0.5],+ hotspot: [0.525, 0.52],},{name: "open_hand",@@ -201,7 +205,7 @@name: "operation_not_allowed",hash: "37287ef1d097704d3e9d0be9c1049ce1fb6dfabd6d210af0429b1b6ec7084c59",svg: "assets/mac/operation_not_allowed.svg",- hotspot: [0.179, 0.125],+ hotspot: [0.24, 0.1],},{name: "pointing_hand",@@ -249,7 +253,7 @@name: "ibeam_vertical",hash: "024e1d486a7f16368669d419e69c9a326e464ec1b8ed39645e5c89cb183e03c5",svg: "assets/mac/ibeam_vertical.svg",- hotspot: [0.389, 0.25],+ hotspot: [0.51, 0.49],},],windows: [@@ -257,7 +261,7 @@name: "arrow",hash: "19502718917bb8a86b83ffb168021cf90517b5c5e510c33423060d230c9e2d20",svg: "assets/windows/arrow.svg",- hotspot: [0.027, 0.041],+ hotspot: [0.055, 0.085],},{name: "ibeam",@@ -269,7 +273,7 @@name: "wait",hash: "5991d86a0d4e915dd0cb0fdd9bef3bf37ed6a3b321256fcb5b240db7ac1a6324",svg: "assets/windows/wait.svg",- hotspot: [0.5, 0.5],+ hotspot: [0.5, 0.52],},{name: "cross",@@ -299,13 +303,61 @@name: "hand",hash: "44a554b439a681410d337d239bf08afe7c66486538563ebb93dc1c309f0a9209",svg: "assets/windows/hand.svg",- hotspot: [0.421, 0.009],+ hotspot: [0.42, 0],+ },+ {+ name: "uparrow",+ hash: "823d642acdc51ffbc29c2710303606270ed24936daf45215ead531333df102ba",+ svg: "assets/windows/uparrow.svg",+ hotspot: [0.5, 0.05],+ },+ {+ name: "idcsizenwse",+ hash: "2daf2a40e4c7ecadec3270fbdb243a12ac22a14bb0b3a08a56b38a38322f9296",+ svg: "assets/windows/idcsizenwse.svg",+ hotspot: [0.5, 0.5],+ },+ {+ name: "idcsizewe",+ hash: "8a024cf4bec4d58a4c149af2320206088981357312b3d82fbfcc07bee38c71ac",+ svg: "assets/windows/idcsizewe.svg",+ hotspot: [0.5, 0.5],+ },+ {+ name: "sizeall",+ hash: "8066a12792e4e8ef21636e5ade61adaaf0fecc2ffc69536ffa0c2dd5bedc6903",+ svg: "assets/windows/sizeall.svg",+ hotspot: [0.5, 0.5],+ },+ {+ name: "appstarting",+ hash: "1486a2339478da61a52a6eecf8ee3446be62f12d375dba8befd42bb553eea7bf",+ svg: "assets/windows/appstarting.svg",+ hotspot: [0.055, 0.368],+ },+ {+ name: "idchelp",+ hash: "5d0b4df6188bc8d540abfbd4235199cc0f67fb41d5e0dcbfd40a3011f8808fea",+ svg: "assets/windows/idchelp.svg",+ hotspot: [0.056, 0.127],+ },+ {+ name: "idcpin",+ hash: "cb74a2d34774dbc43004882e43f9c058b2d2ee60184185567d0328ca013f5bc3",+ svg: "assets/windows/idcpin.svg",+ hotspot: [0.245, 0.05],+ },+ {+ name: "idcperson",+ hash: "1f5209791a75916697c26cf2d018d267ae1102c71dbd196de6c83132f5627f09",+ svg: "assets/windows/idcperson.svg",+ hotspot: [0.235, 0.05],},{name: "pen",hash: "7340ea75802db8fef3a103e9385e65b2c8c358e077ef949faaf572fb502dd9e2",svg: "assets/windows/pen.svg",- hotspot: [0.03, 0.97],+ hotspot: [0.055, 0.945],},],};@@ -326,7 +378,8 @@container.className = "cursor-container";const svg = document.createElement("object");- svg.className = "cursor-svg";+ svg.className =+ platform === "macos" ? "cursor-svg macos" : "cursor-svg";svg.data = cursor.svg;svg.type = "image/svg+xml";@@ -342,7 +395,6 @@const copyButton = document.createElement("button");copyButton.className = "copy-button";copyButton.textContent = "Copy Hotspot";- copyButton.style.display = "none";if (cursor.hotspot) {hotspotInfo.textContent = `Hotspot: (${cursor.hotspot[0].toFixed(@@ -368,23 +420,40 @@mousePosition.textContent = `Mouse: (${x.toFixed(3)}, ${y.toFixed(3)})`;- copyButton.style.display = "inline-block";});container.addEventListener("mouseleave", () => {mousePosition.textContent = "";- copyButton.style.display = "none";+ currentMousePos = null;});- container.addEventListener("click", () => {+ item.addEventListener("click", (e) => {+ // If mouse is over the container, use current mouse positionif (currentMousePos) {- const hotspotText = `hotspot: (${currentMousePos[0].toFixed(+ const hotspotText = `(${currentMousePos[0].toFixed(3)}, ${currentMousePos[1].toFixed(3)})`;navigator.clipboard.writeText(hotspotText).then(() => {- copyButton.textContent = "Copied!";+ mousePosition.textContent = "Copied!";+ setTimeout(() => {+ if (currentMousePos) {+ mousePosition.textContent = `Mouse: (${currentMousePos[0].toFixed(+ 3+ )}, ${currentMousePos[1].toFixed(3)})`;+ } else {+ mousePosition.textContent = "";+ }+ }, 1000);+ });+ } else if (cursor.hotspot) {+ // Fallback to defined hotspot if no current mouse position+ const hotspotText = `(${cursor.hotspot[0].toFixed(+ 3+ )}, ${cursor.hotspot[1].toFixed(3)})`;+ navigator.clipboard.writeText(hotspotText).then(() => {+ mousePosition.textContent = "Copied!";setTimeout(() => {- copyButton.textContent = "Copy Hotspot";+ mousePosition.textContent = "";}, 1000);});}diff --git a/crates/cursor-info/src/lib.rs b/crates/cursor-info/src/lib.rsindex db0a9b3c2..1806f2767 100644--- a/crates/cursor-info/src/lib.rs+++ b/crates/cursor-info/src/lib.rs@@ -25,89 +25,89 @@ impl ResolvedCursor {// https://developer.apple.com/documentation/appkit/nscursor/arrow"de2d1f4a81e520b65fd1317b845b00a1c51a4d1f71cca3cd4ccdab52b98d1ac9" => ResolvedCursor {raw: include_str!("../assets/mac/arrow.svg"),- hotspot: (0.235, 0.174), // 40.0/170.0, 40.0/230.0+ hotspot: (0.347, 0.33),},// https://developer.apple.com/documentation/appkit/nscursor/contextualmenu"ab26ca862492d41355b711c58544687a799dd7ae14cf161959ca524bbc97c322" => ResolvedCursor {raw: include_str!("../assets/mac/contextual_menu.svg"),- hotspot: (0.179, 0.125), // 10.0/56.0, 10.0/80.0+ hotspot: (0.278, 0.295),},// https://developer.apple.com/documentation/appkit/nscursor/closedhand"fbb165d4603dd8808b536f45bb74a9a72d9358ad19714b318bb7c06358a7d3c2" => ResolvedCursor {raw: include_str!("../assets/mac/closed_hand.svg"),- hotspot: (0.5, 0.5), // 32.0/64.0, 32.0/64.0+ hotspot: (0.5, 0.5),},// https://developer.apple.com/documentation/appkit/nscursor/crosshair"c583f776531f4e7b76ea7ba2ab159765e2da11fd63cb897cc10362183859d1d8" => ResolvedCursor {raw: include_str!("../assets/mac/crosshair.svg"),- hotspot: (0.458, 0.458), // 22.0/48.0, 22.0/48.0+ hotspot: (0.52, 0.51),},// https://developer.apple.com/documentation/appkit/nscursor/disappearingitem"67c369820fbc37af9b59b840c675ca24117ca8dfdccec7702b10894058617951" => return None,// https://developer.apple.com/documentation/appkit/nscursor/dragcopy"af060876004c8647d82411eeac1bbd613d2991d46794aba16b56c91d3081e128" => ResolvedCursor {raw: include_str!("../assets/mac/drag_copy.svg"),- hotspot: (0.179, 0.125), // 10.0/56.0, 10.0/80.0+ hotspot: (0.255, 0.1),},// https://developer.apple.com/documentation/appkit/nscursor/draglink"59ac2483461f4ad577a0a6b68be89fe663c36263b583c5f038eee2ae6a5ad98f" => ResolvedCursor {raw: include_str!("../assets/mac/drag_link.svg"),- hotspot: (0.688, 0.143), // 22.0/32.0, 6.0/42.0+ hotspot: (0.621, 0.309),},// https://developer.apple.com/documentation/appkit/nscursor/ibeam"492dca0bb6751a30607ac728803af992ba69365052b7df2dff1c0dfe463e653c" => ResolvedCursor {raw: include_str!("../assets/mac/ibeam.svg"),- hotspot: (0.444, 0.5), // 40.0/90.0, 90.0/180.0+ hotspot: (0.525, 0.52),},// https://developer.apple.com/documentation/appkit/nscursor/openhand"3f6a5594a3c9334065944b9c56d9f73fd5fe5f02108a5e28f37e222e770be476" => ResolvedCursor {raw: include_str!("../assets/mac/open_hand.svg"),- hotspot: (0.5, 0.5), // 32.0/64.0, 32.0/64.0+ hotspot: (0.5, 0.5),},// https://developer.apple.com/documentation/appkit/nscursor/operationnotallowed"37287ef1d097704d3e9d0be9c1049ce1fb6dfabd6d210af0429b1b6ec7084c59" => ResolvedCursor {raw: include_str!("../assets/mac/operation_not_allowed.svg"),- hotspot: (0.179, 0.125), // 10.0/56.0, 10.0/80.0+ hotspot: (0.24, 0.1),},// https://developer.apple.com/documentation/appkit/nscursor/pointinghand"b0443e9f72e724cb6d94b879bf29c6cb18376d0357c6233e5a7561cf8a9943c6" => ResolvedCursor {raw: include_str!("../assets/mac/pointing_hand.svg"),- hotspot: (0.406, 0.25), // 26.0/64.0, 16.0/64.0+ hotspot: (0.406, 0.25),},// https://developer.apple.com/documentation/appkit/nscursor/resizedown"3c9bf0ce893b64fe9e4363793b406140d4b3900b7beafa1c409e78cf5a8cf954" => ResolvedCursor {raw: include_str!("../assets/mac/resize_down.svg"),- hotspot: (0.5, 0.5), // 24.0/48.0, 24.0/48.0+ hotspot: (0.5, 0.5),},// https://developer.apple.com/documentation/appkit/nscursor/resizeleft"50431d8fd537119aefb4c3673f9b9ff00d3cd1d2bf6c35e5dfb09ed40cfd5e7c" => ResolvedCursor {raw: include_str!("../assets/mac/resize_left.svg"),- hotspot: (0.5, 0.5), // 24.0/48.0, 24.0/48.0+ hotspot: (0.5, 0.5),},// https://developer.apple.com/documentation/appkit/nscursor/resizeleftright"0fdaea89910bcbe34ad0d4d63a6ada2095489df18537bbf54dd0d0769588b381" => ResolvedCursor {raw: include_str!("../assets/mac/resize_left_right.svg"),- hotspot: (0.5, 0.5), // 24.0/48.0, 24.0/48.0+ hotspot: (0.5, 0.5),},// https://developer.apple.com/documentation/appkit/nscursor/resizeright"e74de88f863f059e5beb27152b2dfc2cd1e8dcc458ce775607765e9a4859667e" => ResolvedCursor {raw: include_str!("../assets/mac/resize_right.svg"),- hotspot: (0.5, 0.5), // 24.0/48.0, 24.0/48.0+ hotspot: (0.5, 0.5),},// https://developer.apple.com/documentation/appkit/nscursor/resizeup"912ca42451a9624f6fb8c1d53c29c26782b7590d383a66075a6768c4409024d9" => ResolvedCursor {raw: include_str!("../assets/mac/resize_up.svg"),- hotspot: (0.5, 0.5), // 24.0/48.0, 24.0/48.0+ hotspot: (0.5, 0.5),},// https://developer.apple.com/documentation/appkit/nscursor/resizeupdown"9c93eb53df68d7fd86298ba1eb3e3b32ccd34d168b81a31a6fc4bb79f131331f" => ResolvedCursor {raw: include_str!("../assets/mac/resize_up_down.svg"),- hotspot: (0.5, 0.5), // 24.0/48.0, 24.0/48.0+ hotspot: (0.5, 0.5),},// https://developer.apple.com/documentation/appkit/nscursor/ibeamcursorforverticallayout"024e1d486a7f16368669d419e69c9a326e464ec1b8ed39645e5c89cb183e03c5" => ResolvedCursor {raw: include_str!("../assets/mac/ibeam_vertical.svg"),- hotspot: (0.389, 0.25), // 14.0/36.0, 8.0/32.0+ hotspot: (0.51, 0.49),},//@@ -118,63 +118,87 @@ impl ResolvedCursor {// IDC_ARROW"19502718917bb8a86b83ffb168021cf90517b5c5e510c33423060d230c9e2d20" => ResolvedCursor {raw: include_str!("../assets/windows/arrow.svg"),- hotspot: (0.027, 0.041), // Arrow tip at top-left+ hotspot: (0.055, 0.085),},// IDC_IBEAM"77cc4cedcf68f3e1d41bfe16c567961b2306c6236b35b966cd3d5c9516565e33" => ResolvedCursor {raw: include_str!("../assets/windows/ibeam.svg"),- hotspot: (0.5, 0.5), // Center of I-beam+ hotspot: (0.5, 0.5),},// IDC_WAIT"5991d86a0d4e915dd0cb0fdd9bef3bf37ed6a3b321256fcb5b240db7ac1a6324" => ResolvedCursor {raw: include_str!("../assets/windows/wait.svg"),- hotspot: (0.5, 0.5), // Center of hourglass+ hotspot: (0.5, 0.52),},// IDC_CROSS"cd2c775b1a124e4deaed1ed345efae25eb28a9133fc39691555902a2c1d7d578" => ResolvedCursor {raw: include_str!("../assets/windows/cross.svg"),- hotspot: (0.5, 0.5), // Center of crosshair+ hotspot: (0.5, 0.5),+ },+ // IDC_UPARROW+ "823d642acdc51ffbc29c2710303606270ed24936daf45215ead531333df102ba" => ResolvedCursor {+ raw: include_str!("../assets/windows/uparrow.svg"),+ hotspot: (0.5, 0.05),+ },+ // IDC_SIZENWSE+ "2daf2a40e4c7ecadec3270fbdb243a12ac22a14bb0b3a08a56b38a38322f9296" => ResolvedCursor {+ raw: include_str!("../assets/windows/idcsizenwse.svg"),+ hotspot: (0.5, 0.5),},- // // IDC_UPARROW- // "823d642acdc51ffbc29c2710303606270ed24936daf45215ead531333df102ba" => todo!(),- // // IDC_SIZENWSE- // "2daf2a40e4c7ecadec3270fbdb243a12ac22a14bb0b3a08a56b38a38322f9296" => todo!(),// IDC_SIZENESW"47b4d609cb404feae70c7e20b525ac901d1e7a5f1a2e8a240418b3710ee43473" => ResolvedCursor {raw: include_str!("../assets/windows/size-nesw.svg"),- hotspot: (0.5, 0.5), // Center of resize cursor+ hotspot: (0.5, 0.5),+ },+ // IDC_SIZEWE+ "8a024cf4bec4d58a4c149af2320206088981357312b3d82fbfcc07bee38c71ac" => ResolvedCursor {+ raw: include_str!("../assets/windows/idcsizewe.svg"),+ hotspot: (0.5, 0.5),},- // // IDC_SIZEWE- // "8a024cf4bec4d58a4c149af2320206088981357312b3d82fbfcc07bee38c71ac" => todo!(),// IDC_SIZENS"253b9e5360de1e12561be6a8f84484d4b108fd54d31e7d2c8f3b66d1c71b9880" => ResolvedCursor {raw: include_str!("../assets/windows/size-ns.svg"),- hotspot: (0.5, 0.5), // Center of vertical resize cursor+ hotspot: (0.5, 0.5),+ },+ // IDC_SIZEALL+ "8066a12792e4e8ef21636e5ade61adaaf0fecc2ffc69536ffa0c2dd5bedc6903" => ResolvedCursor {+ raw: include_str!("../assets/windows/sizeall.svg"),+ hotspot: (0.5, 0.5),},- // // IDC_SIZEALL- // "8066a12792e4e8ef21636e5ade61adaaf0fecc2ffc69536ffa0c2dd5bedc6903" => todo!(),// IDC_NO"7df883a459aced72acf32b969ff1119676d334d9acfcbe668ef92fe01094a7d6" => ResolvedCursor {raw: include_str!("../assets/windows/no.svg"),- hotspot: (0.5, 0.5), // Center of "not allowed" symbol+ hotspot: (0.5, 0.5),},// IDC_HAND"44a554b439a681410d337d239bf08afe7c66486538563ebb93dc1c309f0a9209" => ResolvedCursor {raw: include_str!("../assets/windows/hand.svg"),- hotspot: (0.421, 0.009), // Tip of pointing finger- },- // // IDC_APPSTARTING- // "1486a2339478da61a52a6eecf8ee3446be62f12d375dba8befd42bb553eea7bf" => todo!(),- // // IDC_HELP- // "5d0b4df6188bc8d540abfbd4235199cc0f67fb41d5e0dcbfd40a3011f8808fea" => todo!(),- // // IDC_PIN- // "cb74a2d34774dbc43004882e43f9c058b2d2ee60184185567d0328ca013f5bc3" => todo!(),- // // IDC_PERSON- // "1f5209791a75916697c26cf2d018d267ae1102c71dbd196de6c83132f5627f09" => todo!(),+ hotspot: (0.42, 0.0),+ },+ // IDC_APPSTARTING+ "1486a2339478da61a52a6eecf8ee3446be62f12d375dba8befd42bb553eea7bf" => ResolvedCursor {+ raw: include_str!("../assets/windows/appstarting.svg"),+ hotspot: (0.055, 0.368),+ },+ // IDC_HELP+ "5d0b4df6188bc8d540abfbd4235199cc0f67fb41d5e0dcbfd40a3011f8808fea" => ResolvedCursor {+ raw: include_str!("../assets/windows/idchelp.svg"),+ hotspot: (0.056, 0.127),+ },+ // IDC_PIN+ "cb74a2d34774dbc43004882e43f9c058b2d2ee60184185567d0328ca013f5bc3" => ResolvedCursor {+ raw: include_str!("../assets/windows/idcpin.svg"),+ hotspot: (0.245, 0.05),+ },+ // IDC_PERSON+ "1f5209791a75916697c26cf2d018d267ae1102c71dbd196de6c83132f5627f09" => ResolvedCursor {+ raw: include_str!("../assets/windows/idcperson.svg"),+ hotspot: (0.235, 0.05),+ },// MAKEINTRESOURCE(32631) - Pen"7340ea75802db8fef3a103e9385e65b2c8c358e077ef949faaf572fb502dd9e2" => ResolvedCursor {raw: include_str!("../assets/windows/pen.svg"),- hotspot: (0.03, 0.97), // Tip of pen at bottom-left+ hotspot: (0.055, 0.945),},// // MAKEINTRESOURCE(32652) - ScrolNS// "4c89e1d64c35cc88d09aaddcc78ab685ceab8d974006d3d94af23a9e888a74d7" => todo!(),diff --git a/crates/rendering/src/layers/cursor.rs b/crates/rendering/src/layers/cursor.rsindex 94e9ae2a2..6ed259438 100644--- a/crates/rendering/src/layers/cursor.rs+++ b/crates/rendering/src/layers/cursor.rs@@ -243,7 +243,6 @@ impl CursorLayer {// Attempt to find and load a higher-quality SVG cursor included in Cap.// These are used instead of the OS provided cursor images when possible as the quality is better.if let Some(cursor_hash) = cursor_hash- && !uniforms.project.cursor.raw&& uniforms.project.cursor.use_svg{if let Some(info) = ResolvedCursor::from_hash(cursor_hash) {