{"_id":"@a11y-oracle/visual-engine","_rev":"10-69987baeff8a3e5dfa69fa87e93500b2","name":"@a11y-oracle/visual-engine","dist-tags":{"latest":"1.3.2"},"versions":{"1.0.0":{"name":"@a11y-oracle/visual-engine","version":"1.0.0","keywords":["accessibility","a11y","color-contrast","wcag","visual","pixel-analysis","cdp","testing"],"author":{"name":"a11y-oracle"},"license":"MIT","_id":"@a11y-oracle/visual-engine@1.0.0","maintainers":[{"name":"pjlamb12","email":"preston.j.lamb@gmail.com"}],"homepage":"https://github.com/a11y-oracle/a11y-oracle/tree/main/libs/visual-engine","bugs":{"url":"https://github.com/a11y-oracle/a11y-oracle/issues"},"dist":{"shasum":"62b2d34e034243e51236123c7ee12dec4285956c","tarball":"https://registry.npmjs.org/@a11y-oracle/visual-engine/-/visual-engine-1.0.0.tgz","fileCount":20,"integrity":"sha512-ohuyejRaAcrETFIo8IOdGRSYlW2frbPP1tcKMBMuZiCPOiagL+5jC2xdP0PBnawPzoQD9mHn6+ujlYx2Otvi1Q==","signatures":[{"sig":"MEUCIQCAmEWT6yUfCclY8fvMyXPTAEHEdHUIoVGXirUqvXkpgwIgKiQrME/OxVOKjnmeXfYIb9ga9SRORY26sYALlaH1tzM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":46734},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"04ad8c1a2a9a6335892d5c992fcfa209e6a7bb6f","_npmUser":{"name":"pjlamb12","email":"preston.j.lamb@gmail.com"},"repository":{"url":"git+https://github.com/a11y-oracle/a11y-oracle.git","type":"git","directory":"libs/visual-engine"},"_npmVersion":"11.6.0","description":"Visual pixel analysis engine for color contrast resolution using CDP screenshot capture and luminance analysis","directories":{},"_nodeVersion":"24.10.0","dependencies":{"tslib":"^2.3.0","fast-png":"^8.0.0","@a11y-oracle/cdp-types":"1.0.0","@a11y-oracle/focus-analyzer":"1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/visual-engine_1.0.0_1772652306893_0.4722087575596603","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@a11y-oracle/visual-engine","version":"1.1.0","keywords":["accessibility","a11y","color-contrast","wcag","visual","pixel-analysis","cdp","testing"],"author":{"name":"a11y-oracle"},"license":"MIT","_id":"@a11y-oracle/visual-engine@1.1.0","maintainers":[{"name":"pjlamb12","email":"preston.j.lamb@gmail.com"}],"homepage":"https://github.com/a11y-oracle/a11y-oracle/tree/main/libs/visual-engine","bugs":{"url":"https://github.com/a11y-oracle/a11y-oracle/issues"},"dist":{"shasum":"a0f4d390766e4105e7c746c0b09fd70271257f26","tarball":"https://registry.npmjs.org/@a11y-oracle/visual-engine/-/visual-engine-1.1.0.tgz","fileCount":20,"integrity":"sha512-BlCMs4h0i5fPfRon3BCaAkcgV3wocziBb4EhkAyHBeQV63tHikgpa3Fet+NBH7W9IatO4yAQh+hecBL0CQQG/w==","signatures":[{"sig":"MEUCIHLRZrRsPO2paVc7rKDz/j2FM2hQ6Px2yHa2LsgodpXMAiEAvmSNWozdSTuHncY3uUwDjXetbsMxO9pH6CZvBhMpFC8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":46734},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"47a95777878b177bbe3fc88cb760a2b295296555","_npmUser":{"name":"pjlamb12","email":"preston.j.lamb@gmail.com"},"repository":{"url":"git+https://github.com/a11y-oracle/a11y-oracle.git","type":"git","directory":"libs/visual-engine"},"_npmVersion":"11.6.0","description":"Visual pixel analysis engine for color contrast resolution using CDP screenshot capture and luminance analysis","directories":{},"_nodeVersion":"24.10.0","dependencies":{"tslib":"^2.3.0","fast-png":"^8.0.0","@a11y-oracle/cdp-types":"1.1.0","@a11y-oracle/focus-analyzer":"1.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/visual-engine_1.1.0_1772686077407_0.1253583339473041","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@a11y-oracle/visual-engine","version":"1.1.1","keywords":["accessibility","a11y","color-contrast","wcag","visual","pixel-analysis","cdp","testing"],"author":{"name":"a11y-oracle"},"license":"MIT","_id":"@a11y-oracle/visual-engine@1.1.1","maintainers":[{"name":"pjlamb12","email":"preston.j.lamb@gmail.com"}],"homepage":"https://github.com/a11y-oracle/a11y-oracle/tree/main/libs/visual-engine","bugs":{"url":"https://github.com/a11y-oracle/a11y-oracle/issues"},"dist":{"shasum":"b4f99360cb0e3d5c17a1dd18d240196c6486681c","tarball":"https://registry.npmjs.org/@a11y-oracle/visual-engine/-/visual-engine-1.1.1.tgz","fileCount":20,"integrity":"sha512-mPavjk+SLoksycWLZTs1jATUfBNDM2NWczuSYNeVstIsggwpn5qhop/rsNthotR0Gs5rRLiDNISmGXLa0/BrfQ==","signatures":[{"sig":"MEYCIQCwyvoaMECN34FCSEuca08/mWCwg3OE8J5cwlU0WVfsogIhAIoLZQHrsuzGkzHwJdVdLjzAzr1L+0CoZKKBvQ1AW99N","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":46958},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"555a54f42e89930cf78efd3b4d47055f8a9ca62e","_npmUser":{"name":"pjlamb12","email":"preston.j.lamb@gmail.com"},"repository":{"url":"git+https://github.com/a11y-oracle/a11y-oracle.git","type":"git","directory":"libs/visual-engine"},"_npmVersion":"11.6.0","description":"Visual pixel analysis engine for color contrast resolution using CDP screenshot capture and luminance analysis","directories":{},"_nodeVersion":"24.10.0","dependencies":{"tslib":"^2.3.0","fast-png":"^8.0.0","@a11y-oracle/cdp-types":"1.1.1","@a11y-oracle/focus-analyzer":"1.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/visual-engine_1.1.1_1772690061607_0.9104549096874823","host":"s3://npm-registry-packages-npm-production"}},"1.1.2":{"name":"@a11y-oracle/visual-engine","version":"1.1.2","keywords":["accessibility","a11y","color-contrast","wcag","visual","pixel-analysis","cdp","testing"],"author":{"name":"a11y-oracle"},"license":"MIT","_id":"@a11y-oracle/visual-engine@1.1.2","maintainers":[{"name":"pjlamb12","email":"preston.j.lamb@gmail.com"}],"homepage":"https://github.com/a11y-oracle/a11y-oracle/tree/main/libs/visual-engine","bugs":{"url":"https://github.com/a11y-oracle/a11y-oracle/issues"},"dist":{"shasum":"7cddb5a9a514e46cb80b37896c7a90ddf693c320","tarball":"https://registry.npmjs.org/@a11y-oracle/visual-engine/-/visual-engine-1.1.2.tgz","fileCount":20,"integrity":"sha512-ytAenMczOxxbHn5x4wKlWYCdvoHYmlZxIJ/ZJ0J8zrIony2Lc7QE8NS+SYg2vlEOmjGuXOYfPJ7djztcIeDkPA==","signatures":[{"sig":"MEUCIH/u8TTSEEh2zjYI7wN1gsZfEDa/ga2rF8saOjp4z6jRAiEAjbIJQKzl7cg2s3HxqC6sBmRKZT9M7IYx47FJM66e4Mg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":46958},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"0e3e6b7fb933fe4ec494e85abe5c056eff06eaef","_npmUser":{"name":"pjlamb12","email":"preston.j.lamb@gmail.com"},"repository":{"url":"git+https://github.com/a11y-oracle/a11y-oracle.git","type":"git","directory":"libs/visual-engine"},"_npmVersion":"11.6.0","description":"Visual pixel analysis engine for color contrast resolution using CDP screenshot capture and luminance analysis","directories":{},"_nodeVersion":"24.10.0","dependencies":{"tslib":"^2.3.0","fast-png":"^8.0.0","@a11y-oracle/cdp-types":"1.1.2","@a11y-oracle/focus-analyzer":"1.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/visual-engine_1.1.2_1772725935546_0.6521678041865668","host":"s3://npm-registry-packages-npm-production"}},"1.1.3":{"name":"@a11y-oracle/visual-engine","version":"1.1.3","keywords":["accessibility","a11y","color-contrast","wcag","visual","pixel-analysis","cdp","testing"],"author":{"name":"a11y-oracle"},"license":"MIT","_id":"@a11y-oracle/visual-engine@1.1.3","maintainers":[{"name":"pjlamb12","email":"preston.j.lamb@gmail.com"}],"homepage":"https://github.com/a11y-oracle/a11y-oracle/tree/main/libs/visual-engine","bugs":{"url":"https://github.com/a11y-oracle/a11y-oracle/issues"},"dist":{"shasum":"ba6e38698a7c03b50d73c8f12e20f5e507321cc3","tarball":"https://registry.npmjs.org/@a11y-oracle/visual-engine/-/visual-engine-1.1.3.tgz","fileCount":20,"integrity":"sha512-MPhK2yCUwc7JpmRpNmpIIHWs9onGosfE6CwSlUQnr/Vl8SKic+tPxNQB+MXSdIy4vUMnAIOlnvidLVnzKfoajw==","signatures":[{"sig":"MEUCIQCHfNrxmYGO0M9Iss2IUSOUKlsnOIdKSNAbnREwWiKaNgIgZOmuyCt/2ROaWkDrB7dDb72VgBzZ2xxG2fJRKT0jvm4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":46958},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"3fb17cb54b310cb99259d6b25de170f2a09c22f9","_npmUser":{"name":"pjlamb12","email":"preston.j.lamb@gmail.com"},"repository":{"url":"git+https://github.com/a11y-oracle/a11y-oracle.git","type":"git","directory":"libs/visual-engine"},"_npmVersion":"11.6.0","description":"Visual pixel analysis engine for color contrast resolution using CDP screenshot capture and luminance analysis","directories":{},"_nodeVersion":"24.10.0","dependencies":{"tslib":"^2.3.0","fast-png":"^8.0.0","@a11y-oracle/cdp-types":"1.1.3","@a11y-oracle/focus-analyzer":"1.1.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/visual-engine_1.1.3_1772729083687_0.6266929828770835","host":"s3://npm-registry-packages-npm-production"}},"1.1.4":{"name":"@a11y-oracle/visual-engine","version":"1.1.4","keywords":["accessibility","a11y","color-contrast","wcag","visual","pixel-analysis","cdp","testing"],"author":{"name":"a11y-oracle"},"license":"MIT","_id":"@a11y-oracle/visual-engine@1.1.4","maintainers":[{"name":"pjlamb12","email":"preston.j.lamb@gmail.com"}],"homepage":"https://github.com/a11y-oracle/a11y-oracle/tree/main/libs/visual-engine","bugs":{"url":"https://github.com/a11y-oracle/a11y-oracle/issues"},"dist":{"shasum":"9c59998efea4f6d19c130537b637cb629eaa24b0","tarball":"https://registry.npmjs.org/@a11y-oracle/visual-engine/-/visual-engine-1.1.4.tgz","fileCount":20,"integrity":"sha512-hmorfBFSJOWhQm5789k7r075RT0q10tp/wpGuQW4bdEbj9BjYzL6pd+mJKEVBUZgSj8k7gXIQVEtRGzvEnbSJQ==","signatures":[{"sig":"MEUCIQC8NEb0iLjVhKFEcYt5AcMdW6PnRPKilyYkR40eOz7FMgIgValsksD+1PA2j/TUa05RWUjzYWy4V+DHS9uY6+vqry8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":50607},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"2e2f62c8fd8a54c1bb0f9b709647ff4fe8557c27","_npmUser":{"name":"pjlamb12","email":"preston.j.lamb@gmail.com"},"repository":{"url":"git+https://github.com/a11y-oracle/a11y-oracle.git","type":"git","directory":"libs/visual-engine"},"_npmVersion":"11.6.0","description":"Visual pixel analysis engine for color contrast resolution using CDP screenshot capture and luminance analysis","directories":{},"_nodeVersion":"24.10.0","dependencies":{"tslib":"^2.3.0","fast-png":"^8.0.0","@a11y-oracle/cdp-types":"1.1.4","@a11y-oracle/focus-analyzer":"1.1.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/visual-engine_1.1.4_1772745610401_0.07492746774368464","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@a11y-oracle/visual-engine","version":"1.2.0","keywords":["accessibility","a11y","color-contrast","wcag","visual","pixel-analysis","cdp","testing"],"author":{"name":"a11y-oracle"},"license":"MIT","_id":"@a11y-oracle/visual-engine@1.2.0","maintainers":[{"name":"pjlamb12","email":"preston.j.lamb@gmail.com"}],"homepage":"https://github.com/a11y-oracle/a11y-oracle/tree/main/libs/visual-engine","bugs":{"url":"https://github.com/a11y-oracle/a11y-oracle/issues"},"dist":{"shasum":"63343cd8c25e3715f998cb77e5376586a251ecdf","tarball":"https://registry.npmjs.org/@a11y-oracle/visual-engine/-/visual-engine-1.2.0.tgz","fileCount":20,"integrity":"sha512-UKNUv25uZIEDzdKbi4qAcjKeov+Rbs2xKHGQ3Drd4zV6qM9rTZWaNFb687KC1TgzZbXYzmqaev42nZc0Ks+GiQ==","signatures":[{"sig":"MEYCIQCq3UTai13v/1pdlVQ64H68JZb/NkB4/atHhu+AE4TEGQIhAMuwYUztF61IRbN3awTOqG1baafQyPXBPlap4ZT9NjMC","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":54890},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"43adb7fc2be7245cbb136e07b24200d68cba1744","_npmUser":{"name":"pjlamb12","email":"preston.j.lamb@gmail.com"},"repository":{"url":"git+https://github.com/a11y-oracle/a11y-oracle.git","type":"git","directory":"libs/visual-engine"},"_npmVersion":"11.6.0","description":"Visual pixel analysis engine for color contrast resolution using CDP screenshot capture and luminance analysis","directories":{},"_nodeVersion":"24.10.0","dependencies":{"tslib":"^2.3.0","fast-png":"^8.0.0","@a11y-oracle/cdp-types":"1.2.0","@a11y-oracle/focus-analyzer":"1.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/visual-engine_1.2.0_1772753722630_0.9801349984394845","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"@a11y-oracle/visual-engine","version":"1.3.0","keywords":["accessibility","a11y","color-contrast","wcag","visual","pixel-analysis","cdp","testing"],"author":{"name":"a11y-oracle"},"license":"MIT","_id":"@a11y-oracle/visual-engine@1.3.0","maintainers":[{"name":"pjlamb12","email":"preston.j.lamb@gmail.com"}],"homepage":"https://github.com/a11y-oracle/a11y-oracle/tree/main/libs/visual-engine","bugs":{"url":"https://github.com/a11y-oracle/a11y-oracle/issues"},"dist":{"shasum":"9c7f96134cf3874d98abd35337790d22565ecce5","tarball":"https://registry.npmjs.org/@a11y-oracle/visual-engine/-/visual-engine-1.3.0.tgz","fileCount":20,"integrity":"sha512-UnmkZ87uV2Gb8PIxBNO/plv2xPGVZgolP3dIHC9bPb6qqV0HgWxgNYjcqdvzkl/LksrfNwqNQP1988fkCme0cg==","signatures":[{"sig":"MEUCIQCP37aPuvdl9aDYlRu7CO3+xkBa/H6d0u2oJNQSf1CuegIgLo/YQ4DOSP0f2tedl6xkgil6a1PQPC2YeBq27iJga+A=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":54890},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"4295fc44cee8a657989d667355836590231cf754","_npmUser":{"name":"pjlamb12","email":"preston.j.lamb@gmail.com"},"repository":{"url":"git+https://github.com/a11y-oracle/a11y-oracle.git","type":"git","directory":"libs/visual-engine"},"_npmVersion":"11.6.0","description":"Visual pixel analysis engine for color contrast resolution using CDP screenshot capture and luminance analysis","directories":{},"_nodeVersion":"24.10.0","dependencies":{"tslib":"^2.3.0","fast-png":"^8.0.0","@a11y-oracle/cdp-types":"1.3.0","@a11y-oracle/focus-analyzer":"1.3.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/visual-engine_1.3.0_1772769825210_0.5675292714669735","host":"s3://npm-registry-packages-npm-production"}},"1.3.1":{"name":"@a11y-oracle/visual-engine","version":"1.3.1","keywords":["accessibility","a11y","color-contrast","wcag","visual","pixel-analysis","cdp","testing"],"author":{"name":"a11y-oracle"},"license":"MIT","_id":"@a11y-oracle/visual-engine@1.3.1","maintainers":[{"name":"pjlamb12","email":"preston.j.lamb@gmail.com"}],"homepage":"https://github.com/a11y-oracle/a11y-oracle/tree/main/libs/visual-engine","bugs":{"url":"https://github.com/a11y-oracle/a11y-oracle/issues"},"dist":{"shasum":"6c3683f36b01385be45b41273a69ecc634161cc4","tarball":"https://registry.npmjs.org/@a11y-oracle/visual-engine/-/visual-engine-1.3.1.tgz","fileCount":20,"integrity":"sha512-Kxu7+C0tCIOsEbM2w/bLMmF9PrJzQ9r168ArF1xKnOzq7+OwOU38V1OAK8ghOz4Wkjdf++QXfgPUZaXCQolyLg==","signatures":[{"sig":"MEQCIFXR8G49Datb3u4ErE4WVhMQaSMZcDS6I3Qt0l1fv0rVAiAuXED/pffINpQ+sC2LQPXSvImn5BqUGl34P9lsLAdMlg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":54890},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"1cdf8cb41af6392ea299d37eed4bf536788a802f","_npmUser":{"name":"pjlamb12","email":"preston.j.lamb@gmail.com"},"repository":{"url":"git+https://github.com/a11y-oracle/a11y-oracle.git","type":"git","directory":"libs/visual-engine"},"_npmVersion":"11.6.0","description":"Visual pixel analysis engine for color contrast resolution using CDP screenshot capture and luminance analysis","directories":{},"_nodeVersion":"24.10.0","dependencies":{"tslib":"^2.3.0","fast-png":"^8.0.0","@a11y-oracle/cdp-types":"1.3.1","@a11y-oracle/focus-analyzer":"1.3.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/visual-engine_1.3.1_1773187238327_0.8990476830956984","host":"s3://npm-registry-packages-npm-production"}},"1.3.2":{"name":"@a11y-oracle/visual-engine","version":"1.3.2","description":"Visual pixel analysis engine for color contrast resolution using CDP screenshot capture and luminance analysis","license":"MIT","author":{"name":"a11y-oracle"},"repository":{"type":"git","url":"git+https://github.com/a11y-oracle/a11y-oracle.git","directory":"libs/visual-engine"},"bugs":{"url":"https://github.com/a11y-oracle/a11y-oracle/issues"},"homepage":"https://github.com/a11y-oracle/a11y-oracle/tree/main/libs/visual-engine","keywords":["accessibility","a11y","color-contrast","wcag","visual","pixel-analysis","cdp","testing"],"publishConfig":{"access":"public"},"type":"module","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{"./package.json":"./package.json",".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"dependencies":{"@a11y-oracle/cdp-types":"1.3.2","@a11y-oracle/focus-analyzer":"1.3.2","fast-png":"^8.0.0","tslib":"^2.3.0"},"_id":"@a11y-oracle/visual-engine@1.3.2","gitHead":"58b2a6611a5150328c96c3d8695e0b14bc5d2d27","_nodeVersion":"24.10.0","_npmVersion":"11.6.0","dist":{"integrity":"sha512-oNjupyizw7+i/JOBhlTFxkVjB9XIpdANLo80vJiaTxTupgmO1CooP21loD8QO65yabtHg4rAXVhdMsXcQ/O7IA==","shasum":"866bcd381a1b46dfef52e72a43fc564fa1be4cb4","tarball":"https://registry.npmjs.org/@a11y-oracle/visual-engine/-/visual-engine-1.3.2.tgz","fileCount":20,"unpackedSize":54890,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCtzPg8hniQ+vn/aFh7Am5a8yuakcD8LdRNclv48dfbbQIgAKPBab6nIw2nMTZWOxRc8fuPmhrQtHg/VUYk7yIBAkU="}]},"_npmUser":{"name":"pjlamb12","email":"preston.j.lamb@gmail.com"},"directories":{},"maintainers":[{"name":"pjlamb12","email":"preston.j.lamb@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/visual-engine_1.3.2_1773294439777_0.04653676822532993"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-04T19:25:06.842Z","modified":"2026-03-12T05:47:20.079Z","1.0.0":"2026-03-04T19:25:07.047Z","1.1.0":"2026-03-05T04:47:57.575Z","1.1.1":"2026-03-05T05:54:21.753Z","1.1.2":"2026-03-05T15:52:15.678Z","1.1.3":"2026-03-05T16:44:43.837Z","1.1.4":"2026-03-05T21:20:10.558Z","1.2.0":"2026-03-05T23:35:22.770Z","1.3.0":"2026-03-06T04:03:45.352Z","1.3.1":"2026-03-11T00:00:38.490Z","1.3.2":"2026-03-12T05:47:19.922Z"},"bugs":{"url":"https://github.com/a11y-oracle/a11y-oracle/issues"},"author":{"name":"a11y-oracle"},"license":"MIT","homepage":"https://github.com/a11y-oracle/a11y-oracle/tree/main/libs/visual-engine","keywords":["accessibility","a11y","color-contrast","wcag","visual","pixel-analysis","cdp","testing"],"repository":{"type":"git","url":"git+https://github.com/a11y-oracle/a11y-oracle.git","directory":"libs/visual-engine"},"description":"Visual pixel analysis engine for color contrast resolution using CDP screenshot capture and luminance analysis","maintainers":[{"name":"pjlamb12","email":"preston.j.lamb@gmail.com"}],"readme":"# @a11y-oracle/visual-engine\n\nVisual pixel analysis engine for resolving incomplete color contrast warnings from axe-core. Provides CSS halo heuristic detection, CDP-based screenshot capture, and pixel-level luminance analysis using the WCAG Safe Assessment Matrix.\n\n## Installation\n\n```bash\nnpm install @a11y-oracle/visual-engine\n```\n\n> **Note:** Most users should use [`@a11y-oracle/axe-bridge`](../axe-bridge/README.md) instead, which wraps this engine and integrates directly with axe-core results. Install the visual-engine directly only if you need fine-grained control over individual analysis steps or are building a custom integration.\n\n## Usage\n\n### VisualContrastAnalyzer (Recommended)\n\nThe coordinator class runs the full pipeline for a single element:\n\n```typescript\nimport { VisualContrastAnalyzer } from '@a11y-oracle/visual-engine';\nimport type { CDPSessionLike } from '@a11y-oracle/cdp-types';\n\nconst analyzer = new VisualContrastAnalyzer(cdpSession);\n\nconst result = await analyzer.analyzeElement('#hero-text', 4.5);\n\nswitch (result.category) {\n  case 'pass':       // Worst-case contrast passes threshold\n  case 'violation':  // Best-case contrast fails threshold\n  case 'incomplete': // Split decision, dynamic content, or unresolvable\n}\n```\n\n### Individual Pipeline Steps\n\nEach stage of the pipeline is also exported for advanced use:\n\n```typescript\nimport {\n  getElementStyles,\n  captureElementBackground,\n  analyzeHalo,\n  extractPixelLuminance,\n} from '@a11y-oracle/visual-engine';\n\n// 1. Get computed styles via CDP\nconst styles = await getElementStyles(cdp, '#my-element');\n\n// 2. CSS halo fast path (no screenshot needed)\nconst halo = analyzeHalo(styles, 4.5);\nif (halo.hasValidHalo) {\n  // Element has a valid text stroke or shadow halo\n}\n\n// 3. Capture background with text hidden\nconst capture = await captureElementBackground(cdp, '#my-element');\n\n// 4. Pixel-level luminance analysis\nconst pixels = extractPixelLuminance(capture.pngBuffer, capture.textColor);\n```\n\n## Analysis Pipeline\n\nThe `VisualContrastAnalyzer.analyzeElement()` method runs this pipeline:\n\n1. **Get Computed Styles** — Fetches `color`, `backgroundColor`, `textStrokeWidth`, `textStrokeColor`, `textShadow`, and `backgroundImage` via CDP `Runtime.evaluate`.\n\n2. **Dynamic Content Check** — Detects video/canvas ancestors, sub-1 opacity, and CSS blend modes. Dynamic content is left as `incomplete`.\n\n3. **CSS Halo Heuristic** (fast path) — Checks for:\n   - `-webkit-text-stroke` >= 1px with sufficient contrast against the background\n   - `text-shadow` with 4+ zero-blur directional shadows covering all quadrants\n\n   If a valid halo is found and its color passes the threshold against the background, the element passes without a screenshot.\n\n4. **Screenshot Capture** — Scrolls the element into the viewport (ensuring off-screen elements produce valid screenshots), hides the element's text (sets `color: transparent`), captures a clipped screenshot via CDP `Page.captureScreenshot`, then restores the text.\n\n5. **Pixel Analysis** — Decodes the PNG, scans all opaque pixels for luminance extremes (lightest and darkest), and computes contrast ratios against the text color.\n\n6. **Safe Assessment Matrix**:\n   - **Pass**: Text contrast against the *lightest* AND *darkest* background pixels both meet the threshold (worst-case passes)\n   - **Violation**: Text contrast against the *lightest* AND *darkest* background pixels both fail the threshold (best-case fails)\n   - **Incomplete**: One passes and one fails (split decision) — cannot safely categorize\n\n## API Reference\n\n### VisualContrastAnalyzer\n\n#### `constructor(cdp: CDPSessionLike)`\n\nCreate an analyzer bound to a CDP session.\n\n#### `analyzeElement(selector, threshold?): Promise<ContrastAnalysisResult>`\n\nRun the full pipeline on an element.\n\n- **selector** — CSS selector targeting the element\n- **threshold** — Minimum contrast ratio (default: 4.5)\n- **Returns** — `ContrastAnalysisResult` with `category`, `textColor`, `halo`, `pixels`, and `reason`\n\n### Halo Detection\n\n#### `analyzeHalo(styles, threshold?): HaloResult`\n\nCheck if computed styles contain a valid CSS halo.\n\n- **styles** — `ElementComputedStyles` from `getElementStyles()`\n- **threshold** — Minimum contrast ratio (default: 4.5)\n- **Returns** — `HaloResult` with `hasValidHalo`, `haloContrast`, `method`, and `skipReason`\n\n#### `parseTextShadow(css): TextShadowPart[]`\n\nParse a CSS `text-shadow` value into structured parts.\n\n### Pixel Analysis\n\n#### `extractPixelLuminance(pngBuffer, textColor): PixelAnalysisResult | null`\n\nDecode a PNG and compute contrast ratios against a text color.\n\n- **pngBuffer** — Raw PNG buffer from `captureElementBackground()`\n- **textColor** — `RGBColor` of the foreground text\n- **Returns** — Luminance extremes and contrast ratios, or `null` if no opaque pixels\n\n#### `decodePng(buffer): { width, height, data: Uint8Array }`\n\nDecode a PNG buffer into raw RGBA pixel data.\n\n### Screenshot Capture\n\n#### `getElementStyles(cdp, selector): Promise<ElementComputedStyles | null>`\n\nFetch computed styles for an element via CDP.\n\n#### `captureElementBackground(cdp, selector): Promise<{ pngBuffer: Buffer; textColor: RGBColor | null } | null>`\n\nCapture a clipped screenshot of an element with its text hidden. Automatically scrolls the element into the viewport before capture, ensuring elements below the fold produce valid screenshots instead of blank images.\n\n## Types\n\n```typescript\nimport type {\n  ContrastAnalysisResult,  // Full analysis result\n  ContrastCategory,        // 'pass' | 'violation' | 'incomplete'\n  HaloResult,              // CSS halo analysis result\n  PixelAnalysisResult,     // Luminance extremes + contrast ratios\n  TextShadowPart,          // Parsed text-shadow entry\n  ElementComputedStyles,   // Computed CSS properties for contrast analysis\n} from '@a11y-oracle/visual-engine';\n```\n\n## Dependencies\n\n- **`@a11y-oracle/focus-analyzer`** — Reuses `relativeLuminance()`, `contrastRatio()`, and `parseColor()` for WCAG-compliant color math\n- **`@a11y-oracle/cdp-types`** — `CDPSessionLike` interface for framework-agnostic CDP access\n- **`fast-png`** — Pure TypeScript PNG decoder/encoder (browser + Node.js compatible, no native dependencies)\n","readmeFilename":"README.md"}