diff --git a/kayle/tests/innate-playwright.spec.ts b/kayle/tests/innate-playwright.spec.ts index f684dc5..7d1405b 100644 --- a/kayle/tests/innate-playwright.spec.ts +++ b/kayle/tests/innate-playwright.spec.ts @@ -24,7 +24,7 @@ test("kayle_innate, fast_htmlcs, fast_axecore, and ace audit drakeMock profiling "" ); const startTime = performance.now(); - const audit = await _audit_not_ready(mock, css); + const audit = await _audit_not_ready(mock, css, false); const nextTime = performance.now() - startTime; console.log("Rust/WASM TIME ", nextTime); diff --git a/kayle/tests/innate.ts b/kayle/tests/innate.ts index afde688..714bd2f 100644 --- a/kayle/tests/innate.ts +++ b/kayle/tests/innate.ts @@ -28,7 +28,7 @@ import { _audit_not_ready } from "kayle_innate"; `); const startTime = performance.now(); - const audit = await _audit_not_ready(mock, css); + const audit = await _audit_not_ready(mock, css, false); const nextTime = performance.now() - startTime; console.log("Rust/WASM TIME ", nextTime); diff --git a/kayle_innate/Cargo.lock b/kayle_innate/Cargo.lock index e7f0359..62dd16a 100644 --- a/kayle_innate/Cargo.lock +++ b/kayle_innate/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "accessibility-rs" -version = "0.0.4" +version = "0.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88c84ca66d8c679da4ace0fe875be7504903c7b0e644cb2d3a2263bd45d9d03f" +checksum = "4d006a356c38b5963a185f8d5ed8c7c717ef5ff5fef69b117710378d1e96be32" dependencies = [ "accessibility-scraper", "accessibility-tree", @@ -211,7 +211,7 @@ dependencies = [ "itoa 0.4.8", "matches", "phf 0.7.24", - "proc-macro2 1.0.68", + "proc-macro2 1.0.69", "procedural-masquerade", "quote 1.0.33", "smallvec 0.6.14", @@ -227,7 +227,7 @@ dependencies = [ "cssparser-macros 0.6.1", "dtoa-short", "itoa 1.0.9", - "phf 0.10.1", + "phf 0.11.2", "smallvec 1.11.1", ] @@ -238,7 +238,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5bb1c84e87c717666564ec056105052331431803d606bd45529b28547b611eef" dependencies = [ "phf_codegen 0.7.24", - "proc-macro2 1.0.68", + "proc-macro2 1.0.69", "procedural-masquerade", "quote 1.0.33", "syn 1.0.109", @@ -260,7 +260,7 @@ version = "0.99.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ - "proc-macro2 1.0.68", + "proc-macro2 1.0.69", "quote 1.0.33", "syn 1.0.109", ] @@ -390,7 +390,7 @@ dependencies = [ "log", "mac", "markup5ever", - "proc-macro2 1.0.68", + "proc-macro2 1.0.69", "quote 1.0.33", "syn 1.0.109", ] @@ -460,9 +460,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.148" +version = "0.2.149" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b" +checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b" [[package]] name = "lock_api" @@ -556,9 +556,9 @@ checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" [[package]] name = "num-traits" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f30b0abd723be7e2ffca1272140fac1a2f084c77ec3e123c192b66af1ee9e6c2" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" dependencies = [ "autocfg 1.1.0", ] @@ -613,9 +613,17 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259" dependencies = [ - "phf_macros", "phf_shared 0.10.0", - "proc-macro-hack", +] + +[[package]] +name = "phf" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" +dependencies = [ + "phf_macros", + "phf_shared 0.11.2", ] [[package]] @@ -658,18 +666,27 @@ dependencies = [ "rand 0.8.5", ] +[[package]] +name = "phf_generator" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" +dependencies = [ + "phf_shared 0.11.2", + "rand 0.8.5", +] + [[package]] name = "phf_macros" -version = "0.10.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58fdf3184dd560f160dd73922bea2d5cd6e8f064bf4b13110abd81b03697b4e0" +checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" dependencies = [ - "phf_generator 0.10.0", - "phf_shared 0.10.0", - "proc-macro-hack", - "proc-macro2 1.0.68", + "phf_generator 0.11.2", + "phf_shared 0.11.2", + "proc-macro2 1.0.69", "quote 1.0.33", - "syn 1.0.109", + "syn 2.0.38", ] [[package]] @@ -690,6 +707,15 @@ dependencies = [ "siphasher 0.3.11", ] +[[package]] +name = "phf_shared" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" +dependencies = [ + "siphasher 0.3.11", +] + [[package]] name = "ppv-lite86" version = "0.2.17" @@ -702,12 +728,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" -[[package]] -name = "proc-macro-hack" -version = "0.5.20+deprecated" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" - [[package]] name = "proc-macro2" version = "0.4.30" @@ -719,9 +739,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.68" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b1106fec09662ec6dd98ccac0f81cef56984d0b49f75c92d8cbad76e20c005c" +checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" dependencies = [ "unicode-ident", ] @@ -747,7 +767,7 @@ version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ - "proc-macro2 1.0.68", + "proc-macro2 1.0.69", ] [[package]] @@ -1039,7 +1059,7 @@ version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ - "proc-macro2 1.0.68", + "proc-macro2 1.0.69", "quote 1.0.33", "syn 2.0.38", ] @@ -1144,7 +1164,7 @@ checksum = "6bb30289b722be4ff74a408c3cc27edeaad656e06cb1fe8fa9231fa59c728988" dependencies = [ "phf_generator 0.10.0", "phf_shared 0.10.0", - "proc-macro2 1.0.68", + "proc-macro2 1.0.69", "quote 1.0.33", ] @@ -1165,7 +1185,7 @@ version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ - "proc-macro2 1.0.68", + "proc-macro2 1.0.69", "quote 1.0.33", "unicode-ident", ] @@ -1176,7 +1196,7 @@ version = "2.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e96b79aaa137db8f61e26363a0c9b47d8b4ec75da28b7d1d614c2303e232408b" dependencies = [ - "proc-macro2 1.0.68", + "proc-macro2 1.0.69", "quote 1.0.33", "unicode-ident", ] @@ -1319,7 +1339,7 @@ dependencies = [ "bumpalo", "log", "once_cell", - "proc-macro2 1.0.68", + "proc-macro2 1.0.69", "quote 1.0.33", "syn 2.0.38", "wasm-bindgen-shared", @@ -1353,7 +1373,7 @@ version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ - "proc-macro2 1.0.68", + "proc-macro2 1.0.69", "quote 1.0.33", "syn 2.0.38", "wasm-bindgen-backend", @@ -1386,7 +1406,7 @@ version = "0.3.37" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ecb993dd8c836930ed130e020e77d9b2e65dd0fbab1b67c790b0f5d80b11a575" dependencies = [ - "proc-macro2 1.0.68", + "proc-macro2 1.0.69", "quote 1.0.33", ] diff --git a/kayle_innate/kayle_innate/Cargo.toml b/kayle_innate/kayle_innate/Cargo.toml index 417351a..1481f74 100644 --- a/kayle_innate/kayle_innate/Cargo.toml +++ b/kayle_innate/kayle_innate/Cargo.toml @@ -34,7 +34,7 @@ ego-tree = { workspace = true } markup5ever = "0.11.0" cssparser = { workspace = true } slotmap = "1.0.6" -accessibility-rs = "0.0.4" +accessibility-rs = "0.0.5" [dev-dependencies] wasm-bindgen-test = "0.3.37" diff --git a/kayle_innate/kayle_innate/src/lib.rs b/kayle_innate/kayle_innate/src/lib.rs index c7120e9..336a24a 100644 --- a/kayle_innate/kayle_innate/src/lib.rs +++ b/kayle_innate/kayle_innate/src/lib.rs @@ -33,8 +33,8 @@ macro_rules! console_log { #[wasm_bindgen] #[cfg(feature = "accessibility")] /// audit a web page passing the html and css rules. -pub fn _audit_not_ready(html: &str, css_rules: &str) -> Result { - let audit = accessibility_rs::audit(&html, &css_rules); +pub fn _audit_not_ready(html: &str, css_rules: &str, clip: bool) -> Result { + let audit = accessibility_rs::audit(&html, &css_rules, clip); // todo: map to JsValues instead of serde Ok(serde_wasm_bindgen::to_value(&audit)?) diff --git a/kayle_innate/kayle_innate/tests/web.rs b/kayle_innate/kayle_innate/tests/web.rs index 33251bd..3619db3 100644 --- a/kayle_innate/kayle_innate/tests/web.rs +++ b/kayle_innate/kayle_innate/tests/web.rs @@ -67,5 +67,5 @@ fn _get_document_links() { #[wasm_bindgen_test] #[cfg(feature = "accessibility")] fn _audit() { - let _ = kayle_innate::_audit_not_ready(mock::MOCK_WEBSITE_HTML, &mock::MOCK_CSS_RULES); + let _ = kayle_innate::_audit_not_ready(mock::MOCK_WEBSITE_HTML, &mock::MOCK_CSS_RULES, false); }