fix: restore missing functionality of original react color picker

This commit is contained in:
Jones Jankovic committed 2026-11-04 11:01:03 +10:30
1 parent e4397d91d4
commit 5bbe1c6a32
2 files changed
+113 -92

No files matched your search

+85 -85
View File
@@ -3112,9 +3112,9 @@
} }
}, },
"node_modules/@oxlint/binding-android-arm-eabi": { "node_modules/@oxlint/binding-android-arm-eabi": {
"version": "1.90.0", "version": "1.91.0",
"resolved": "https://registry.npmjs.org/@oxlint/binding-android-arm-eabi/-/binding-android-arm-eabi-1.90.0.tgz", "resolved": "https://registry.npmjs.org/@oxlint/binding-android-arm-eabi/-/binding-android-arm-eabi-1.91.0.tgz",
"integrity": "sha512-sgfalb1HuxYjiAa4wESZ626z1FGusqNcXYHyB5oIOEprS2sbPg0UYEfo83uF1GNG70DIfZxHkXuE6KFrlSdn8Q==", "integrity": "sha512-eOqJUUS1MCqIoUUxMIkuwaqIdKaHr1SXYA0CQI95UUrF8jwQylQH33bBmnqhZfvWXKlRB2Ylx/+Sbk/ctEqzZQ==",
"cpu": [ "cpu": [
"arm" "arm"
], ],
@@ -3129,9 +3129,9 @@
} }
}, },
"node_modules/@oxlint/binding-android-arm64": { "node_modules/@oxlint/binding-android-arm64": {
"version": "1.90.0", "version": "1.91.0",
"resolved": "https://registry.npmjs.org/@oxlint/binding-android-arm64/-/binding-android-arm64-1.90.0.tgz", "resolved": "https://registry.npmjs.org/@oxlint/binding-android-arm64/-/binding-android-arm64-1.91.0.tgz",
"integrity": "sha512-RcKhz1ETMq+fazE9TKS2+5NIRGwigm/nW8egqF0LI+A8Yw2iW5r0E/C3XAPRiwIm/vcPiutIRIa6IQCIKhZsTQ==", "integrity": "sha512-vIJU4lRxK0EhbBt+iR3rkq3pio4I+V5Gshwjei3plNjN+CIq0WxWHzYVI06J9KN8Ar3hyNSFtzJAjVRLZOYpjg==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -3146,9 +3146,9 @@
} }
}, },
"node_modules/@oxlint/binding-darwin-arm64": { "node_modules/@oxlint/binding-darwin-arm64": {
"version": "1.90.0", "version": "1.91.0",
"resolved": "https://registry.npmjs.org/@oxlint/binding-darwin-arm64/-/binding-darwin-arm64-1.90.0.tgz", "resolved": "https://registry.npmjs.org/@oxlint/binding-darwin-arm64/-/binding-darwin-arm64-1.91.0.tgz",
"integrity": "sha512-PSrxMvP6mx+p1karZcUxLdy9lpaP+JWQPti4al9FgTaPhxE+pT/BjhGExloVVSWgZgIfOlLOjVyyq8BXlodhLQ==", "integrity": "sha512-tLy76MurwAOpQt5QVMkJUgexBSWhB7qdvAYb14bc0xntZS6f55aKicbZoxZ/QlmAbnrdlXeD5+IjwY8EZ9RWTg==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -3163,9 +3163,9 @@
} }
}, },
"node_modules/@oxlint/binding-darwin-x64": { "node_modules/@oxlint/binding-darwin-x64": {
"version": "1.90.0", "version": "1.91.0",
"resolved": "https://registry.npmjs.org/@oxlint/binding-darwin-x64/-/binding-darwin-x64-1.90.0.tgz", "resolved": "https://registry.npmjs.org/@oxlint/binding-darwin-x64/-/binding-darwin-x64-1.91.0.tgz",
"integrity": "sha512-OLbU9qsrV2Q8QxT2OEzOPdO8zCCpyI8qB+hDI8yr6RsYELtkf0FAZhJdfjM/RnLHKzt44HWwAPnk92vBtKofvw==", "integrity": "sha512-zPeMmjAqm5vXxbTp/JqYuc9gGSbUuEaeCAkFHB4TCRLTlfJGD//Fkx03YvZHCHZJ7ideLiiLcae+3f2I27qnaA==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -3180,9 +3180,9 @@
} }
}, },
"node_modules/@oxlint/binding-freebsd-x64": { "node_modules/@oxlint/binding-freebsd-x64": {
"version": "1.90.0", "version": "1.91.0",
"resolved": "https://registry.npmjs.org/@oxlint/binding-freebsd-x64/-/binding-freebsd-x64-1.90.0.tgz", "resolved": "https://registry.npmjs.org/@oxlint/binding-freebsd-x64/-/binding-freebsd-x64-1.91.0.tgz",
"integrity": "sha512-fBA4pWyVDARmNucQqpyFuPC49xYf1r+sX7dxPL5fNPQrSMLum39Sn56tZ9JPleWC7FzLPwSQ7plYYfirYBHF8A==", "integrity": "sha512-psOR9+xGMXn0hj4KY5M2kjSQ1n0TCMdYbPOraoV0iQyl7mw2oBBYGUM2+ma40m1YLVrktTBOta4FjrmcOHDhrg==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -3197,9 +3197,9 @@
} }
}, },
"node_modules/@oxlint/binding-linux-arm-gnueabihf": { "node_modules/@oxlint/binding-linux-arm-gnueabihf": {
"version": "1.90.0", "version": "1.91.0",
"resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.90.0.tgz", "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.91.0.tgz",
"integrity": "sha512-zhxH78eP2nR6/pGdhBc7MIfjhhcgATeu8fkmkFJbuzfk6Cj0FzBxyEhL85yDqrCybjx+G2YDzZGsxIO9kvO4Iw==", "integrity": "sha512-1PNA1j4ETxawvxfz6ueDxWgQgWkXPbv44DWZmC7LR07GqojGFDOwWbosOT6/AYiJr7zMXEhn2dPWMkyFFOFpUQ==",
"cpu": [ "cpu": [
"arm" "arm"
], ],
@@ -3214,9 +3214,9 @@
} }
}, },
"node_modules/@oxlint/binding-linux-arm-musleabihf": { "node_modules/@oxlint/binding-linux-arm-musleabihf": {
"version": "1.90.0", "version": "1.91.0",
"resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-1.90.0.tgz", "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-1.91.0.tgz",
"integrity": "sha512-MvYmpHyJqUJjEvkZbJHdwfdL45cGn8EVBkYmoXFiaYFW9suoD3dbJl5mBdpy0DVgdjlyddmldbRtk3cCgETadQ==", "integrity": "sha512-jcNePVpca37lTbHmiPMnVbPAAW0rH9kAoDjsDv6vESEX9pzazIR1q5SyYuc1rQzdjHtc2VVCDN9jDh6tHcOHyA==",
"cpu": [ "cpu": [
"arm" "arm"
], ],
@@ -3231,9 +3231,9 @@
} }
}, },
"node_modules/@oxlint/binding-linux-arm64-gnu": { "node_modules/@oxlint/binding-linux-arm64-gnu": {
"version": "1.90.0", "version": "1.91.0",
"resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.90.0.tgz", "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.91.0.tgz",
"integrity": "sha512-L13Sy+Kg0nZhwTsToniqjUFPA2TuM6962qCZ5Wp5KeB517Tw7ApdLTTtlb+bF86fcZZa2EtvCVvAJxk4Dya/MQ==", "integrity": "sha512-TJi78UX6R+9qZ23ZKtzN6adfW83bjY0NXsCRMBRH6H7IizaMXmZbdRAtjedMkx77bT46YQH0csawsY9lwha8MA==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -3251,9 +3251,9 @@
} }
}, },
"node_modules/@oxlint/binding-linux-arm64-musl": { "node_modules/@oxlint/binding-linux-arm64-musl": {
"version": "1.90.0", "version": "1.91.0",
"resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.90.0.tgz", "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.91.0.tgz",
"integrity": "sha512-wFDdZWGpzIPFdJFjSLWnKB0TGzFriTKUIrl04iMqMyM9BBIJTuerfCHYa0WpDSjr5x3lcW/CHLyacSt886WpGg==", "integrity": "sha512-OowlLroUTzKq5OBvbu6iegch8SJ2DivXFCukzPWURwvcJhMj7/P0CUGH5qrDlxT1Kh48dcxqYqrvE8qK6xTLKQ==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -3271,9 +3271,9 @@
} }
}, },
"node_modules/@oxlint/binding-linux-ppc64-gnu": { "node_modules/@oxlint/binding-linux-ppc64-gnu": {
"version": "1.90.0", "version": "1.91.0",
"resolved": "https://registry.npmjs.org/@oxlint/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.90.0.tgz", "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.91.0.tgz",
"integrity": "sha512-FRywfn+MoKn8xpBSzgNwNVliSKRI2QXkxi/iF7o6FEQs8Bh8z2RpVTaFAcO3pchXjvB2eGNFIoLLQABIQ+u7VA==", "integrity": "sha512-QF/5Ge8yGpWg5s4awMNHfVKh1WOmk591Qg082i6CHenXYBa+W1E5RwWZXaKUOw4Ko7CCjqg3TfBc0AzhnqblYg==",
"cpu": [ "cpu": [
"ppc64" "ppc64"
], ],
@@ -3291,9 +3291,9 @@
} }
}, },
"node_modules/@oxlint/binding-linux-riscv64-gnu": { "node_modules/@oxlint/binding-linux-riscv64-gnu": {
"version": "1.90.0", "version": "1.91.0",
"resolved": "https://registry.npmjs.org/@oxlint/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-1.90.0.tgz", "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-1.91.0.tgz",
"integrity": "sha512-IS2PaUgpc/qeLADTyhUNmdx3x4ijs9pjJdPKBYHaT+mAE7k3FsjnHPTjhpsak1b++h6CIPhv6WX9Z+y7Pw0voQ==", "integrity": "sha512-dXlsKlNhzJQX1nageGKnvWe1D7uTng249hQM80CG/YPZ8F/VZHbxVLhImgurdWBOmu86XOemValLjrW6QIOM/Q==",
"cpu": [ "cpu": [
"riscv64" "riscv64"
], ],
@@ -3311,9 +3311,9 @@
} }
}, },
"node_modules/@oxlint/binding-linux-riscv64-musl": { "node_modules/@oxlint/binding-linux-riscv64-musl": {
"version": "1.90.0", "version": "1.91.0",
"resolved": "https://registry.npmjs.org/@oxlint/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-1.90.0.tgz", "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-1.91.0.tgz",
"integrity": "sha512-s7JFKRkGS8O7i2ZVODfuO++NC7sH6HDqpMn8lYxw91w0SXJOxnAVjQ8utvmDwLMMT0jaSkuOKuUYJDGDtu4sHQ==", "integrity": "sha512-tznkj5VrWNRUfymkaLcJetgMLbP9suL5ob/m7j0Fdbnm5u3Li/Ezo/YcBixiuwdL1sg0oGpyTe86It0J6T+Lxg==",
"cpu": [ "cpu": [
"riscv64" "riscv64"
], ],
@@ -3331,9 +3331,9 @@
} }
}, },
"node_modules/@oxlint/binding-linux-s390x-gnu": { "node_modules/@oxlint/binding-linux-s390x-gnu": {
"version": "1.90.0", "version": "1.91.0",
"resolved": "https://registry.npmjs.org/@oxlint/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.90.0.tgz", "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.91.0.tgz",
"integrity": "sha512-b0GxrOQr5VONCkd7KLSqmP6b6nqZuTpuS8QPQHzltmqdXP5bY0Jl0CZ0QmlCTrS3ExaLYbioFYOARzNbYvcApQ==", "integrity": "sha512-sNvfLiUYQkVsLNUgIW24AEYTHSd2zZ1vAxXssPdjuQHTtCpRvQihYri6d5z5FY7w/QrcnB5+g9E+/sqmZq8tfA==",
"cpu": [ "cpu": [
"s390x" "s390x"
], ],
@@ -3351,9 +3351,9 @@
} }
}, },
"node_modules/@oxlint/binding-linux-x64-gnu": { "node_modules/@oxlint/binding-linux-x64-gnu": {
"version": "1.90.0", "version": "1.91.0",
"resolved": "https://registry.npmjs.org/@oxlint/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.90.0.tgz", "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.91.0.tgz",
"integrity": "sha512-iaJeShJtgUp8rZbt9YUdTAGOpmX5KogCLba17Jp1tWdJ3F4M3D2g2TKUyI1FMTHxKH9NNHuQcuC2kZRg6IV7yQ==", "integrity": "sha512-eA25ETvimhUZ89y5BcunNY7yv7qwG2I7V7dFQAU+mIEqZ57gBCXdIERl0yXOEt43zjsw0yK2gRKTc+twF706wQ==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -3371,9 +3371,9 @@
} }
}, },
"node_modules/@oxlint/binding-linux-x64-musl": { "node_modules/@oxlint/binding-linux-x64-musl": {
"version": "1.90.0", "version": "1.91.0",
"resolved": "https://registry.npmjs.org/@oxlint/binding-linux-x64-musl/-/binding-linux-x64-musl-1.90.0.tgz", "resolved": "https://registry.npmjs.org/@oxlint/binding-linux-x64-musl/-/binding-linux-x64-musl-1.91.0.tgz",
"integrity": "sha512-/aZoXnL5WBLCXuzfHqvEFXcm4iwYmr/cYByHDTXzLFzJdE5DC7bm6phpWqHv6BeqpVgY9IpBAxGDv2WEkl5JCg==", "integrity": "sha512-4hZ4Z9K+OkcTpAHDoUTMg/8MModbM0aocrl9KnGzp9h5iKqjrXraEUZorYoVCT7xoK93CAHXgTndxRBrOjH/fA==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -3391,9 +3391,9 @@
} }
}, },
"node_modules/@oxlint/binding-openharmony-arm64": { "node_modules/@oxlint/binding-openharmony-arm64": {
"version": "1.90.0", "version": "1.91.0",
"resolved": "https://registry.npmjs.org/@oxlint/binding-openharmony-arm64/-/binding-openharmony-arm64-1.90.0.tgz", "resolved": "https://registry.npmjs.org/@oxlint/binding-openharmony-arm64/-/binding-openharmony-arm64-1.91.0.tgz",
"integrity": "sha512-SMhk7ozwoxYDKfYqGZCQEfULOKDneF9uhaoIf2neoDLWvNtjY9yVeL7YHmE5L9WdKvMpWNwwZxhenxBu6AgfOg==", "integrity": "sha512-gtqn4b0kLpGe46Qh7NHiR86wZpd+TLaesO106s7V3RG33r63VB94LW5qPKEDJX64osh3xfjnPFn1M0484bC7wQ==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -3408,9 +3408,9 @@
} }
}, },
"node_modules/@oxlint/binding-win32-arm64-msvc": { "node_modules/@oxlint/binding-win32-arm64-msvc": {
"version": "1.90.0", "version": "1.91.0",
"resolved": "https://registry.npmjs.org/@oxlint/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.90.0.tgz", "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.91.0.tgz",
"integrity": "sha512-KBvR3A9fO7fCi2vCP8ifWvlia7tGEQV9NaYh+IGwa/7Groy48Mt/UaYqMK9/zOtAWl20BUCf6RPqzJ32fRw33Q==", "integrity": "sha512-KQItBdsyHN28U3z/bEek6h9pvG3Uqv564QYO8K1bE/V7YRZgpHlRnfNKVPHkk4sfYKyPzEjCgW80QkImOLvJog==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@@ -3425,9 +3425,9 @@
} }
}, },
"node_modules/@oxlint/binding-win32-ia32-msvc": { "node_modules/@oxlint/binding-win32-ia32-msvc": {
"version": "1.90.0", "version": "1.91.0",
"resolved": "https://registry.npmjs.org/@oxlint/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.90.0.tgz", "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-1.91.0.tgz",
"integrity": "sha512-+x42rDHQGbTCuT3EzpWAzhP3NoVPE/cJsG4gnrakOSg0olV+GCdMpPU23Nvrl3zZMnXxFZdTtDv4D3SuaA5ZeQ==", "integrity": "sha512-XFKqbbsQVmTgw+CyBKuzSZtAa45viom1naFfulKmkTFdDyDaBQaBqEz5J61TI8iwBynU+F8q7qPD+9mplZRhEg==",
"cpu": [ "cpu": [
"ia32" "ia32"
], ],
@@ -3442,9 +3442,9 @@
} }
}, },
"node_modules/@oxlint/binding-win32-x64-msvc": { "node_modules/@oxlint/binding-win32-x64-msvc": {
"version": "1.90.0", "version": "1.91.0",
"resolved": "https://registry.npmjs.org/@oxlint/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.90.0.tgz", "resolved": "https://registry.npmjs.org/@oxlint/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.91.0.tgz",
"integrity": "sha512-30JiaFEBUB9peEOcvVM8ggo88SoN/IdSr9DW505JdBji/R6dM66gKEiG65hw6qcaF2f4mO0cEJ+RwRZprmun9g==", "integrity": "sha512-DmpK0PthG66Bcz5Y4JqNbzXltzyLQtg3ofYpd25+ejm7kQYUM78VL1uIP/ZFct2781mwUyBX37LatFPCTVp35A==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@@ -5995,9 +5995,9 @@
} }
}, },
"node_modules/d3-delaunay": { "node_modules/d3-delaunay": {
"version": "6.0.5", "version": "6.0.6",
"resolved": "https://registry.npmjs.org/d3-delaunay/-/d3-delaunay-6.0.5.tgz", "resolved": "https://registry.npmjs.org/d3-delaunay/-/d3-delaunay-6.0.6.tgz",
"integrity": "sha512-6n1ZJb1+6RYJJfyAmLW4ERKGHRSCK2bNM+hu7Zxc2XLhzFLHWGqltjr3znBS7lZ9Vg3syUxNMnebBZUxpvjqqQ==", "integrity": "sha512-DMQIEvSJhZCB6pwedcXaAlQ+MeKU5LlM2XakKtc73b/VM+RBiI1SRXycOEOKg2jsKj4zZ9F0KGYG6nCGwwWu/g==",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"delaunator": "5" "delaunator": "5"
@@ -6552,9 +6552,9 @@
} }
}, },
"node_modules/electron-to-chromium": { "node_modules/electron-to-chromium": {
"version": "1.5.473", "version": "1.5.475",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.473.tgz", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.475.tgz",
"integrity": "sha512-9njcRQK+6FOXNAWw5g+h2RPiyazqo5RFMVJ39ZMHjDHUNnnFlhnOGV7O0WmJetODDx19ES5p+FLi+KCVFQGugw==", "integrity": "sha512-S9tceHJbIsHH8VRwh9x+8lJO50SYwTdwVGdEjdz2FERyP59j1N6rdXOSklIusrhxt9GG/WN4V/kRgmDHl9MM5w==",
"dev": true, "dev": true,
"license": "ISC" "license": "ISC"
}, },
@@ -9103,9 +9103,9 @@
} }
}, },
"node_modules/oxlint": { "node_modules/oxlint": {
"version": "1.90.0", "version": "1.91.0",
"resolved": "https://registry.npmjs.org/oxlint/-/oxlint-1.90.0.tgz", "resolved": "https://registry.npmjs.org/oxlint/-/oxlint-1.91.0.tgz",
"integrity": "sha512-RkTN9EmgIUpLuhNoLhO3OliMGJlvb3Dk7XVjBZnfoMCHrVpuz5ESd97klfiyYeV7XfA2lNLnDCPMkUI+Qw5How==", "integrity": "sha512-vjy/cBZcEFcYh3dbxUoQK+bjc+QaY3ZWo86aJkZ5YAwp/HyiqP7dTdNgbvcIVJafhAH5sZbTqBp4sZcicEZngA==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"bin": { "bin": {
@@ -9118,25 +9118,25 @@
"url": "https://github.com/sponsors/oxc-project" "url": "https://github.com/sponsors/oxc-project"
}, },
"optionalDependencies": { "optionalDependencies": {
"@oxlint/binding-android-arm-eabi": "1.90.0", "@oxlint/binding-android-arm-eabi": "1.91.0",
"@oxlint/binding-android-arm64": "1.90.0", "@oxlint/binding-android-arm64": "1.91.0",
"@oxlint/binding-darwin-arm64": "1.90.0", "@oxlint/binding-darwin-arm64": "1.91.0",
"@oxlint/binding-darwin-x64": "1.90.0", "@oxlint/binding-darwin-x64": "1.91.0",
"@oxlint/binding-freebsd-x64": "1.90.0", "@oxlint/binding-freebsd-x64": "1.91.0",
"@oxlint/binding-linux-arm-gnueabihf": "1.90.0", "@oxlint/binding-linux-arm-gnueabihf": "1.91.0",
"@oxlint/binding-linux-arm-musleabihf": "1.90.0", "@oxlint/binding-linux-arm-musleabihf": "1.91.0",
"@oxlint/binding-linux-arm64-gnu": "1.90.0", "@oxlint/binding-linux-arm64-gnu": "1.91.0",
"@oxlint/binding-linux-arm64-musl": "1.90.0", "@oxlint/binding-linux-arm64-musl": "1.91.0",
"@oxlint/binding-linux-ppc64-gnu": "1.90.0", "@oxlint/binding-linux-ppc64-gnu": "1.91.0",
"@oxlint/binding-linux-riscv64-gnu": "1.90.0", "@oxlint/binding-linux-riscv64-gnu": "1.91.0",
"@oxlint/binding-linux-riscv64-musl": "1.90.0", "@oxlint/binding-linux-riscv64-musl": "1.91.0",
"@oxlint/binding-linux-s390x-gnu": "1.90.0", "@oxlint/binding-linux-s390x-gnu": "1.91.0",
"@oxlint/binding-linux-x64-gnu": "1.90.0", "@oxlint/binding-linux-x64-gnu": "1.91.0",
"@oxlint/binding-linux-x64-musl": "1.90.0", "@oxlint/binding-linux-x64-musl": "1.91.0",
"@oxlint/binding-openharmony-arm64": "1.90.0", "@oxlint/binding-openharmony-arm64": "1.91.0",
"@oxlint/binding-win32-arm64-msvc": "1.90.0", "@oxlint/binding-win32-arm64-msvc": "1.91.0",
"@oxlint/binding-win32-ia32-msvc": "1.90.0", "@oxlint/binding-win32-ia32-msvc": "1.91.0",
"@oxlint/binding-win32-x64-msvc": "1.90.0" "@oxlint/binding-win32-x64-msvc": "1.91.0"
}, },
"peerDependencies": { "peerDependencies": {
"oxlint-tsgolint": ">=7.0.2005", "oxlint-tsgolint": ">=7.0.2005",
@@ -1,6 +1,7 @@
<script lang="ts"> <script lang="ts">
import PipetteIcon from "@lucide/svelte/icons/pipette"; import PipetteIcon from "@lucide/svelte/icons/pipette";
import TrashIcon from "@lucide/svelte/icons/trash"; import PlusIcon from "@lucide/svelte/icons/plus";
import Trash2Icon from "@lucide/svelte/icons/trash-2";
import { untrack } from "svelte"; import { untrack } from "svelte";
import { slide } from "svelte/transition"; import { slide } from "svelte/transition";
import { import {
@@ -183,15 +184,26 @@
dragging = index; dragging = index;
} }
function addStop(event: PointerEvent) { function addStop(position: number) {
const m = snapshot(); const m = snapshot();
if (m.kind === "solid") return; if (m.kind === "solid") return;
const position = barPosition(event);
const colour = colourAt(m.stops, position); const colour = colourAt(m.stops, position);
commit(withStops(m, (all) => [...all, { colour, position }])); commit(withStops(m, (all) => [...all, { colour, position }]));
selectStop(m.stops.length); selectStop(m.stops.length);
bar!.setPointerCapture(event.pointerId); }
dragging = m.stops.length;
function selectStopAtPosition(event: PointerEvent) {
const m = snapshot();
if (m.kind === "solid") return;
const position = barPosition(event);
const nearest = m.stops.reduce(
(closest, stop, index) =>
Math.abs(stop.position - position) < Math.abs(m.stops[closest].position - position)
? index
: closest,
0,
);
selectStop(nearest);
} }
function removeStop(index: number) { function removeStop(index: number) {
@@ -277,7 +289,7 @@
class="flex-1 px-2.5 py-1.5 cursor-copy touch-none" class="flex-1 px-2.5 py-1.5 cursor-copy touch-none"
role="group" role="group"
aria-label="Gradient stops" aria-label="Gradient stops"
onpointerdown={addStop} onpointerdown={selectStopAtPosition}
onpointermove={(event) => { onpointermove={(event) => {
if (dragging !== null) moveStop(dragging, barPosition(event)); if (dragging !== null) moveStop(dragging, barPosition(event));
}} }}
@@ -305,6 +317,15 @@
{/each} {/each}
</div> </div>
</div> </div>
<button
type="button"
class="grid shrink-0 place-items-center rounded-md transition size-7 text-zinc-500 hover:bg-zinc-100 hover:text-zinc-900 dark:text-zinc-300 dark:hover:bg-zinc-700 dark:hover:text-white"
aria-label="Add colour stop"
title="Add colour stop"
onclick={() => addStop(50)}
>
<PlusIcon class="size-4" />
</button>
{#if model.kind === "linear"} {#if model.kind === "linear"}
<label <label
class="flex shrink-0 items-center px-2 w-14 h-7 text-xs rounded-md bg-zinc-100 dark:bg-zinc-700/70" class="flex shrink-0 items-center px-2 w-14 h-7 text-xs rounded-md bg-zinc-100 dark:bg-zinc-700/70"
@@ -330,7 +351,7 @@
disabled={stops.length <= 2} disabled={stops.length <= 2}
onclick={() => removeStop(selected)} onclick={() => removeStop(selected)}
> >
<TrashIcon class="size-4" /> <Trash2Icon class="size-4" />
</button> </button>
</div> </div>
{/if} {/if}