From 6f69e970bd31fdd9d353854c54437c2a9c95e269 Mon Sep 17 00:00:00 2001 From: Jae Sung Park Date: Mon, 14 Oct 2024 18:09:41 +0900 Subject: [PATCH 1/4] fix(zoom): Prevent error for out of range - When given zoom-in range isn't handled, do not perform next steps - Initialize drag zoom related event binding when only 'drag' type is specified Fix #3895 Co-authored-by: netil --- src/ChartInternal/Axis/AxisRendererHelper.ts | 8 +- src/ChartInternal/interactions/zoom.ts | 14 +++- test/api/zoom-spec.ts | 77 ++++++++++++++++++++ test/internals/bb-spec.ts | 2 +- 4 files changed, 94 insertions(+), 7 deletions(-) diff --git a/src/ChartInternal/Axis/AxisRendererHelper.ts b/src/ChartInternal/Axis/AxisRendererHelper.ts index b560bca7a..33b698e59 100644 --- a/src/ChartInternal/Axis/AxisRendererHelper.ts +++ b/src/ChartInternal/Axis/AxisRendererHelper.ts @@ -77,9 +77,11 @@ export default class AxisRendererHelper { value => `translate(0,${value})`; return (selection, scale) => { - selection.attr("transform", d => ( - isValue(d) ? fn(Math.ceil(scale(d))) : null - )); + selection.attr("transform", d => { + const x = scale(d); + + return isValue(d) ? fn(Math.ceil(x)) : null; + }); }; } diff --git a/src/ChartInternal/interactions/zoom.ts b/src/ChartInternal/interactions/zoom.ts index b67f62da4..06b5992c7 100644 --- a/src/ChartInternal/interactions/zoom.ts +++ b/src/ChartInternal/interactions/zoom.ts @@ -23,7 +23,9 @@ export default { $$.scale.zoom = null; $$.generateZoom(); - $$.initZoomBehaviour(); + + $$.config.zoom_type === "drag" && + $$.initZoomBehaviour(); }, /** @@ -72,6 +74,7 @@ export default { const ratio = diffDomain($$.scale.x.orgDomain()) / diffDomain($$.getZoomDomain()); const extent = this.orgScaleExtent(); + // https://d3js.org/d3-zoom#zoom_scaleExtent this.scaleExtent([extent[0] * ratio, extent[1] * ratio]); return this; @@ -96,6 +99,11 @@ export default { isRotated ? "rescaleY" : "rescaleX" ](org.xScale || scale.x); + // prevent drag zoom to be out of range + if (newScale.domain().some(v => /(Invalid Date|NaN)/.test(v.toString()))) { + return; + } + const domain = $$.trimXDomain(newScale.domain()); const rescale = config.zoom_rescale; @@ -381,7 +389,7 @@ export default { .attr("height", isRotated ? 0 : state.height); } - start = getPointer(event, this)[prop.index]; + start = getPointer(event, this as SVGAElement)[prop.index]; end = start; zoomRect @@ -391,7 +399,7 @@ export default { $$.onZoomStart(event); }) .on("drag", function(event) { - end = getPointer(event, this)[prop.index]; + end = getPointer(event, this as SVGAElement)[prop.index]; zoomRect .attr(prop.axis, Math.min(start, end)) diff --git a/test/api/zoom-spec.ts b/test/api/zoom-spec.ts index ee672e84c..85b646c2a 100644 --- a/test/api/zoom-spec.ts +++ b/test/api/zoom-spec.ts @@ -632,4 +632,81 @@ describe("API zoom", function() { expect($$.scale.zoom).to.be.null; }); }); + + describe("zoom extent", () => { + beforeAll(() => { + chart = util.generate({ + data: { + json: [ + {"date":"2023-09-30 00:00:00","ek_house":0}, + {"date":"2023-10-14 00:00:00","ek_house":0}, + {"date":"2023-10-21 00:00:00","ek_house":0}, + {"date":"2023-10-28 00:00:00","ek_house":0}, + {"date":"2023-11-04 00:00:00","ek_house":0}, + ], + keys: { + x: "date", + value: ["ek_house"], + }, + }, + axis: { + x: { + type: "timeseries", + tick: { + format: "%Y-%m-%d" + }, + }, + y: { + show: false + } + }, + zoom: { + enabled: true + } + }); + }); + + it("shouldn't throw error for timeseries x axis, when is given out of range.", () => new Promise(done => { + chart.zoom([1697701666380, 1697702008724]); + + setTimeout(() => { + chart.$.circles.each(function() { + expect(this.getAttribute("cx") !== "NaN").to.be.true; + }); + + done(1); + }, 300); + })); + + it("shouldn't throw error for indexed x axis, when is given out of range.", () => new Promise(done => { + chart = util.generate({ + data: { + columns: [ + ["data2", 130, 100, 140, 200, 150, 50, 120, 100, 80, 90] + ], + }, + zoom: { + enabled: true + }, + axis: { + y: { + show: false + } + } + }); + + chart.zoom([ + 4.908784864317814, + 4.908812566017803 + ]); + + setTimeout(() => { + chart.$.circles.each(function() { + expect(this.getAttribute("cx") !== "NaN").to.be.true; + }); + + done(1); + }, 300); + })); + }); }); diff --git a/test/internals/bb-spec.ts b/test/internals/bb-spec.ts index 2976e87e7..d59dacb6a 100644 --- a/test/internals/bb-spec.ts +++ b/test/internals/bb-spec.ts @@ -536,7 +536,7 @@ describe("Interface & initialization", () => { })); it("check lazy rendering on callbacks", () => new Promise(done => { - const el = document.body.querySelector("#chart"); + const el = document.body.querySelector("#chart") as HTMLDivElement; // hide to lazy render el.style.display = "none"; From ba71911b7c4b47b95f0b1e2bf8f12138d5b31cb1 Mon Sep 17 00:00:00 2001 From: Jae Sung Park Date: Mon, 14 Oct 2024 19:16:28 +0900 Subject: [PATCH 2/4] feat(legend): Pass visibility state to legend item's event callback Pass visibility state argument to event callbacks Fix #3897 Co-authored-by: netil --- src/ChartInternal/internals/legend.ts | 15 ++++++++-- src/config/Options/common/legend.ts | 9 ++++-- test/internals/legend-spec.ts | 42 +++++++++++++++++++++++---- types/options.d.ts | 6 ++-- 4 files changed, 57 insertions(+), 15 deletions(-) diff --git a/src/ChartInternal/internals/legend.ts b/src/ChartInternal/internals/legend.ts index afd57188e..5cce9eea0 100644 --- a/src/ChartInternal/internals/legend.ts +++ b/src/ChartInternal/internals/legend.ts @@ -462,7 +462,10 @@ export default { .on(interaction.dblclick ? "dblclick" : "click", interaction || isFunction(config.legend_item_onclick) ? function(event, id) { - if (!callFn(config.legend_item_onclick, api, id)) { + if ( + !callFn(config.legend_item_onclick, api, id, + !state.hiddenTargetIds.includes(id)) + ) { const {altKey, target, type} = event; if (type === "dblclick" || altKey) { @@ -493,7 +496,10 @@ export default { !isTouch && item .on("mouseout", interaction || isFunction(config.legend_item_onout) ? function(event, id) { - if (!callFn(config.legend_item_onout, api, id)) { + if ( + !callFn(config.legend_item_onout, api, id, + !state.hiddenTargetIds.includes(id)) + ) { d3Select(this).classed($FOCUS.legendItemFocused, false); if (hasGauge) { @@ -506,7 +512,10 @@ export default { null) .on("mouseover", interaction || isFunction(config.legend_item_onover) ? function(event, id) { - if (!callFn(config.legend_item_onover, api, id)) { + if ( + !callFn(config.legend_item_onover, api, id, + !state.hiddenTargetIds.includes(id)) + ) { d3Select(this).classed($FOCUS.legendItemFocused, true); if (hasGauge) { diff --git a/src/config/Options/common/legend.ts b/src/config/Options/common/legend.ts index af0ac5530..4253bb5c3 100644 --- a/src/config/Options/common/legend.ts +++ b/src/config/Options/common/legend.ts @@ -118,9 +118,12 @@ export default { * } * * // when set below callback, will disable corresponding default interactions - * onclick: function(id) { ... }, - * onover: function(id) { ... }, - * onout: function(id) { ... }, + * onclick: function(id, visible) { + * // toggle based on the data visibility + * this[visible ? "hide" : "show"](id); + * }, + * onover: function(id, visible) { ... }, + * onout: function(id, visible) { ... }, * * // set tile's size * tile: { diff --git a/test/internals/legend-spec.ts b/test/internals/legend-spec.ts index 0f5aa1023..920148bdd 100644 --- a/test/internals/legend-spec.ts +++ b/test/internals/legend-spec.ts @@ -815,7 +815,7 @@ describe("LEGEND", () => { }); it("set options: legend.item.onclick", () => { - args.legend.item.onclick = () => {}; + args.legend.item.onclick = sinon.spy(() => {}); }); it("should only 'click' event lister bound", () => { @@ -826,14 +826,24 @@ describe("LEGEND", () => { expect(item.on("mouseover mouseout")).to.be.undefined; expect(item.on("click")).to.not.be.undefined; - expect(item.style("cursor")).to.be.equal("pointer"); + + id === "data1" && chart.hide(id); + + fireEvent(item.node(), "click", { + clientX: 2, + clientY: 2 + }, chart); }); + + // given visible state argguments? + expect(args.legend.item.onclick.args) + .to.be.deep.equal(chart.data().map(({id}) => [id, id === "data1" ? false : true])); }); it("set options: legend.item.onover", () => { delete args.legend.item.onclick; - args.legend.item.onover = () => {}; + args.legend.item.onover = sinon.spy(() => {}); }); it("should only 'mouseover' event lister bound", () => { @@ -844,14 +854,24 @@ describe("LEGEND", () => { expect(item.on("click mouseout")).to.be.undefined; expect(item.on("mouseover")).to.not.be.undefined; - expect(item.style("cursor")).to.be.equal("pointer"); + + id === "data2" && chart.hide(id); + + fireEvent(item.node(), "mouseover", { + clientX: 2, + clientY: 2 + }, chart); }); + + // given visible state argguments? + expect(args.legend.item.onover.args) + .to.be.deep.equal(chart.data().map(({id}) => [id, id === "data2" ? false : true])); }); it("set options: legend.item.onout", () => { delete args.legend.item.onover; - args.legend.item.onout = () => {}; + args.legend.item.onout = sinon.spy(() => {}); }); it("should only 'mouseout' event lister bound", () => { @@ -862,9 +882,19 @@ describe("LEGEND", () => { expect(item.on("click mouseover")).to.be.undefined; expect(item.on("mouseout")).to.not.be.undefined; - expect(item.style("cursor")).to.be.equal("pointer"); + + id === "data1" && chart.hide(id); + + fireEvent(item.node(), "mouseout", { + clientX: 2, + clientY: 2 + }, chart); }); + + // given visible state argguments? + expect(args.legend.item.onout.args) + .to.be.deep.equal(chart.data().map(({id}) => [id, id === "data1" ? false : true])); }); it("set options: legend.item.interaction.dblclik=true", () => { diff --git a/types/options.d.ts b/types/options.d.ts index e84d7fc72..a7ec2d74e 100644 --- a/types/options.d.ts +++ b/types/options.d.ts @@ -517,19 +517,19 @@ export interface LegendOptions { * - When set, default `click` interaction will be disabled. * - When `interaction.dblclick=true` is set, will be called on double click. */ - onclick?(this: Chart, id: string): void; + onclick?(this: Chart, id: string, visible: boolean): void; /** * Set mouseover event handler to the legend item. * - **NOTE:** When set, default `mouseover` interaction will be disabled. */ - onover?(this: Chart, id: string): void; + onover?(this: Chart, id: string, visible: boolean): void; /** * Set mouseout event handler to the legend item. * - **NOTE:** When set, default `mouseout` interaction will be disabled. */ - onout?(this: Chart, id: string): void; + onout?(this: Chart, id: string, visible: boolean): void; }; /** From d474d3b66858efb5bd990100a6fedd140609677e Mon Sep 17 00:00:00 2001 From: Jae Sung Park Date: Wed, 16 Oct 2024 18:50:01 +0900 Subject: [PATCH 3/4] chore(deps-dev): udpate dependency (#3901) update dependency to the latest version Co-authored-by: netil --- package.json | 22 +-- yarn.lock | 520 ++++++++++++++++++++++++++++++++------------------- 2 files changed, 343 insertions(+), 199 deletions(-) diff --git a/package.json b/package.json index 08499dca4..320881965 100644 --- a/package.json +++ b/package.json @@ -107,7 +107,7 @@ "@eslint/js": "^9.12.0", "@rollup/plugin-node-resolve": "^15.3.0", "@rollup/plugin-replace": "^6.0.1", - "@rollup/plugin-typescript": "^12.1.0", + "@rollup/plugin-typescript": "^12.1.1", "@semantic-release/changelog": "^6.0.3", "@semantic-release/commit-analyzer": "^13.0.0", "@semantic-release/exec": "^6.0.3", @@ -118,9 +118,9 @@ "@testing-library/react": "^16.0.1", "@types/d3": "^7.4.3", "@types/sinon": "^17.0.3", - "@vitest/browser": "^2.1.2", - "@vitest/coverage-istanbul": "^2.1.2", - "@vitest/ui": "^2.1.2", + "@vitest/browser": "^2.1.3", + "@vitest/coverage-istanbul": "^2.1.3", + "@vitest/ui": "^2.1.3", "better-docs": "^2.7.3", "clean-webpack-plugin": "^4.0.0", "cloc": "2.2.0-cloc", @@ -137,26 +137,26 @@ "esbuild-loader": "^4.2.2", "eslint": "^9.12.0", "eslint-plugin-import": "^2.31.0", - "eslint-plugin-jsdoc": "^50.3.1", + "eslint-plugin-jsdoc": "^50.4.1", "husky": "^9.1.6", "jsdoc": "^4.0.3", "lint-staged": "^15.2.10", "mini-css-extract-plugin": "^2.9.1", - "playwright": "^1.47.2", + "playwright": "^1.48.0", "regenerator-runtime": "^0.14.1", "rollup": "^4.24.0", "rollup-plugin-delete": "^2.1.0", - "sass": "^1.79.4", + "sass": "^1.79.5", "sass-loader": "^16.0.2", "semantic-release": "^24.1.2", "simulant": "^0.2.2", "sinon": "^19.0.2", "string-replace-loader": "^3.1.0", "style-loader": "^4.0.0", - "tslib": "^2.7.0", - "typescript": "^5.6.2", - "typescript-eslint": "^8.8.1", - "vitest": "^2.1.2", + "tslib": "^2.8.0", + "typescript": "^5.6.3", + "typescript-eslint": "^8.9.0", + "vitest": "^2.1.3", "webpack": "^5.95.0", "webpack-bundle-analyzer": "^4.10.2", "webpack-clean": "^1.2.5", diff --git a/yarn.lock b/yarn.lock index 72e8bd2c0..384eea693 100644 --- a/yarn.lock +++ b/yarn.lock @@ -580,14 +580,14 @@ __metadata: languageName: node linkType: hard -"@es-joy/jsdoccomment@npm:~0.48.0": - version: 0.48.0 - resolution: "@es-joy/jsdoccomment@npm:0.48.0" +"@es-joy/jsdoccomment@npm:~0.49.0": + version: 0.49.0 + resolution: "@es-joy/jsdoccomment@npm:0.49.0" dependencies: comment-parser: "npm:1.4.1" esquery: "npm:^1.6.0" jsdoc-type-pratt-parser: "npm:~4.1.0" - checksum: 10c0/8d87c7c0426fade009c30ab429d4ede53fd253d40b55079c02bdacdaa4c0fe904aaea5e3084cd98052f2bed6b3030c381d84f4a3251b343a71fee6f681a08bee + checksum: 10c0/16717507d557d37e7b59456fedeefbe0a3bc93aa2d9c043d5db91e24e076509b6fcb10ee6fd1dafcb0c5bbe50ae329b45de5b83541cb5994a98c9e862a45641e languageName: node linkType: hard @@ -1427,6 +1427,140 @@ __metadata: languageName: node linkType: hard +"@parcel/watcher-android-arm64@npm:2.4.1": + version: 2.4.1 + resolution: "@parcel/watcher-android-arm64@npm:2.4.1" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + +"@parcel/watcher-darwin-arm64@npm:2.4.1": + version: 2.4.1 + resolution: "@parcel/watcher-darwin-arm64@npm:2.4.1" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@parcel/watcher-darwin-x64@npm:2.4.1": + version: 2.4.1 + resolution: "@parcel/watcher-darwin-x64@npm:2.4.1" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@parcel/watcher-freebsd-x64@npm:2.4.1": + version: 2.4.1 + resolution: "@parcel/watcher-freebsd-x64@npm:2.4.1" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + +"@parcel/watcher-linux-arm-glibc@npm:2.4.1": + version: 2.4.1 + resolution: "@parcel/watcher-linux-arm-glibc@npm:2.4.1" + conditions: os=linux & cpu=arm & libc=glibc + languageName: node + linkType: hard + +"@parcel/watcher-linux-arm64-glibc@npm:2.4.1": + version: 2.4.1 + resolution: "@parcel/watcher-linux-arm64-glibc@npm:2.4.1" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + +"@parcel/watcher-linux-arm64-musl@npm:2.4.1": + version: 2.4.1 + resolution: "@parcel/watcher-linux-arm64-musl@npm:2.4.1" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + +"@parcel/watcher-linux-x64-glibc@npm:2.4.1": + version: 2.4.1 + resolution: "@parcel/watcher-linux-x64-glibc@npm:2.4.1" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + +"@parcel/watcher-linux-x64-musl@npm:2.4.1": + version: 2.4.1 + resolution: "@parcel/watcher-linux-x64-musl@npm:2.4.1" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + +"@parcel/watcher-win32-arm64@npm:2.4.1": + version: 2.4.1 + resolution: "@parcel/watcher-win32-arm64@npm:2.4.1" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@parcel/watcher-win32-ia32@npm:2.4.1": + version: 2.4.1 + resolution: "@parcel/watcher-win32-ia32@npm:2.4.1" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@parcel/watcher-win32-x64@npm:2.4.1": + version: 2.4.1 + resolution: "@parcel/watcher-win32-x64@npm:2.4.1" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + +"@parcel/watcher@npm:^2.4.1": + version: 2.4.1 + resolution: "@parcel/watcher@npm:2.4.1" + dependencies: + "@parcel/watcher-android-arm64": "npm:2.4.1" + "@parcel/watcher-darwin-arm64": "npm:2.4.1" + "@parcel/watcher-darwin-x64": "npm:2.4.1" + "@parcel/watcher-freebsd-x64": "npm:2.4.1" + "@parcel/watcher-linux-arm-glibc": "npm:2.4.1" + "@parcel/watcher-linux-arm64-glibc": "npm:2.4.1" + "@parcel/watcher-linux-arm64-musl": "npm:2.4.1" + "@parcel/watcher-linux-x64-glibc": "npm:2.4.1" + "@parcel/watcher-linux-x64-musl": "npm:2.4.1" + "@parcel/watcher-win32-arm64": "npm:2.4.1" + "@parcel/watcher-win32-ia32": "npm:2.4.1" + "@parcel/watcher-win32-x64": "npm:2.4.1" + detect-libc: "npm:^1.0.3" + is-glob: "npm:^4.0.3" + micromatch: "npm:^4.0.5" + node-addon-api: "npm:^7.0.0" + node-gyp: "npm:latest" + dependenciesMeta: + "@parcel/watcher-android-arm64": + optional: true + "@parcel/watcher-darwin-arm64": + optional: true + "@parcel/watcher-darwin-x64": + optional: true + "@parcel/watcher-freebsd-x64": + optional: true + "@parcel/watcher-linux-arm-glibc": + optional: true + "@parcel/watcher-linux-arm64-glibc": + optional: true + "@parcel/watcher-linux-arm64-musl": + optional: true + "@parcel/watcher-linux-x64-glibc": + optional: true + "@parcel/watcher-linux-x64-musl": + optional: true + "@parcel/watcher-win32-arm64": + optional: true + "@parcel/watcher-win32-ia32": + optional: true + "@parcel/watcher-win32-x64": + optional: true + checksum: 10c0/33b7112094b9eb46c234d824953967435b628d3d93a0553255e9910829b84cab3da870153c3a870c31db186dc58f3b2db81382fcaee3451438aeec4d786a6211 + languageName: node + linkType: hard + "@pkgjs/parseargs@npm:^0.11.0": version: 0.11.0 resolution: "@pkgjs/parseargs@npm:0.11.0" @@ -1508,9 +1642,9 @@ __metadata: languageName: node linkType: hard -"@rollup/plugin-typescript@npm:^12.1.0": - version: 12.1.0 - resolution: "@rollup/plugin-typescript@npm:12.1.0" +"@rollup/plugin-typescript@npm:^12.1.1": + version: 12.1.1 + resolution: "@rollup/plugin-typescript@npm:12.1.1" dependencies: "@rollup/pluginutils": "npm:^5.1.0" resolve: "npm:^1.22.1" @@ -1523,7 +1657,7 @@ __metadata: optional: true tslib: optional: true - checksum: 10c0/46ebb87e52e1aac334f80cfa601096e25a8ce97cf43c68d42e72c8d5f9b7acd074d185c3ef98274930b3f56f47d7370a2837e4c909dc4e320a09bf6e48fc100d + checksum: 10c0/1418ed9dc784c09ae82c7a171f453c42e26c48b5c557147cfee0fc95857711a3a0250efc7937b65923a5171bfd35c8d33dff82fe561ed2578c6d575ac7a826ae languageName: node linkType: hard @@ -2765,15 +2899,15 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/eslint-plugin@npm:8.8.1": - version: 8.8.1 - resolution: "@typescript-eslint/eslint-plugin@npm:8.8.1" +"@typescript-eslint/eslint-plugin@npm:8.9.0": + version: 8.9.0 + resolution: "@typescript-eslint/eslint-plugin@npm:8.9.0" dependencies: "@eslint-community/regexpp": "npm:^4.10.0" - "@typescript-eslint/scope-manager": "npm:8.8.1" - "@typescript-eslint/type-utils": "npm:8.8.1" - "@typescript-eslint/utils": "npm:8.8.1" - "@typescript-eslint/visitor-keys": "npm:8.8.1" + "@typescript-eslint/scope-manager": "npm:8.9.0" + "@typescript-eslint/type-utils": "npm:8.9.0" + "@typescript-eslint/utils": "npm:8.9.0" + "@typescript-eslint/visitor-keys": "npm:8.9.0" graphemer: "npm:^1.4.0" ignore: "npm:^5.3.1" natural-compare: "npm:^1.4.0" @@ -2784,66 +2918,66 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 10c0/020a0a482202b34c6665a56ec5902e38ae1870b2600ec1b2092de352b23099dde553781ee8323974f63962ebe164a6304f0019e937afb5cf7854b0e0163ad1ca + checksum: 10c0/07f273dc270268980bbf65ea5e0c69d05377e42dbdb2dd3f4a1293a3536c049ddfb548eb9ec6e60394c2361c4a15b62b8246951f83e16a9d16799578a74dc691 languageName: node linkType: hard -"@typescript-eslint/parser@npm:8.8.1": - version: 8.8.1 - resolution: "@typescript-eslint/parser@npm:8.8.1" +"@typescript-eslint/parser@npm:8.9.0": + version: 8.9.0 + resolution: "@typescript-eslint/parser@npm:8.9.0" dependencies: - "@typescript-eslint/scope-manager": "npm:8.8.1" - "@typescript-eslint/types": "npm:8.8.1" - "@typescript-eslint/typescript-estree": "npm:8.8.1" - "@typescript-eslint/visitor-keys": "npm:8.8.1" + "@typescript-eslint/scope-manager": "npm:8.9.0" + "@typescript-eslint/types": "npm:8.9.0" + "@typescript-eslint/typescript-estree": "npm:8.9.0" + "@typescript-eslint/visitor-keys": "npm:8.9.0" debug: "npm:^4.3.4" peerDependencies: eslint: ^8.57.0 || ^9.0.0 peerDependenciesMeta: typescript: optional: true - checksum: 10c0/2afd147ccec6754316d6837d6108a5d822eb6071e1a7355073288c232530bc3e49901d3f08755ce02d497110c531f3b3658eb46d0ff875a69d4f360b5f938cb4 + checksum: 10c0/aca7c838de85fb700ecf5682dc6f8f90a0fbfe09a3044a176c0dc3ffd9c5e7105beb0919a30824f46b02223a74119b4f5a9834a0663328987f066cb359b5dbed languageName: node linkType: hard -"@typescript-eslint/scope-manager@npm:8.8.1": - version: 8.8.1 - resolution: "@typescript-eslint/scope-manager@npm:8.8.1" +"@typescript-eslint/scope-manager@npm:8.9.0": + version: 8.9.0 + resolution: "@typescript-eslint/scope-manager@npm:8.9.0" dependencies: - "@typescript-eslint/types": "npm:8.8.1" - "@typescript-eslint/visitor-keys": "npm:8.8.1" - checksum: 10c0/6f697baf087aedc3f0f228ff964fd108a9dd33fe4e5cc6c914be6367c324cee55629e099832668042bedfec8cdc72c6ef2ca960ee26966dbcc75753059a1352f + "@typescript-eslint/types": "npm:8.9.0" + "@typescript-eslint/visitor-keys": "npm:8.9.0" + checksum: 10c0/1fb77a982e3384d8cabd64678ea8f9de328708080ff9324bf24a44da4e8d7b7692ae4820efc3ef36027bf0fd6a061680d3c30ce63d661fb31e18970fca5e86c5 languageName: node linkType: hard -"@typescript-eslint/type-utils@npm:8.8.1": - version: 8.8.1 - resolution: "@typescript-eslint/type-utils@npm:8.8.1" +"@typescript-eslint/type-utils@npm:8.9.0": + version: 8.9.0 + resolution: "@typescript-eslint/type-utils@npm:8.9.0" dependencies: - "@typescript-eslint/typescript-estree": "npm:8.8.1" - "@typescript-eslint/utils": "npm:8.8.1" + "@typescript-eslint/typescript-estree": "npm:8.9.0" + "@typescript-eslint/utils": "npm:8.9.0" debug: "npm:^4.3.4" ts-api-utils: "npm:^1.3.0" peerDependenciesMeta: typescript: optional: true - checksum: 10c0/6edfc2b9fca5233dd922141f080377b677db1093ec3e702a3ab52d58f77b91c0fb69479d4d42f125536b8fc0ffa85c07c7de2f17cc4c6fa1df1226ec01e5608c + checksum: 10c0/aff06afda9ac7d12f750e76c8f91ed8b56eefd3f3f4fbaa93a64411ec9e0bd2c2972f3407e439320d98062b16f508dce7604b8bb2b803fded9d3148e5ee721b1 languageName: node linkType: hard -"@typescript-eslint/types@npm:8.8.1": - version: 8.8.1 - resolution: "@typescript-eslint/types@npm:8.8.1" - checksum: 10c0/4b44857332a0b1bfafbeccb8be157f8266d9e226ac723f6af1272b9b670b49444423ddac733655163eb3b90e8c88393a68ab2d7f326f5775371eaf4b9ca31d7b +"@typescript-eslint/types@npm:8.9.0": + version: 8.9.0 + resolution: "@typescript-eslint/types@npm:8.9.0" + checksum: 10c0/8d901b7ed2f943624c24f7fa67f7be9d49a92554d54c4f27397c05b329ceff59a9ea246810b53ff36fca08760c14305dd4ce78fbac7ca0474311b0575bf49010 languageName: node linkType: hard -"@typescript-eslint/typescript-estree@npm:8.8.1": - version: 8.8.1 - resolution: "@typescript-eslint/typescript-estree@npm:8.8.1" +"@typescript-eslint/typescript-estree@npm:8.9.0": + version: 8.9.0 + resolution: "@typescript-eslint/typescript-estree@npm:8.9.0" dependencies: - "@typescript-eslint/types": "npm:8.8.1" - "@typescript-eslint/visitor-keys": "npm:8.8.1" + "@typescript-eslint/types": "npm:8.9.0" + "@typescript-eslint/visitor-keys": "npm:8.9.0" debug: "npm:^4.3.4" fast-glob: "npm:^3.3.2" is-glob: "npm:^4.0.3" @@ -2853,42 +2987,42 @@ __metadata: peerDependenciesMeta: typescript: optional: true - checksum: 10c0/e3b9bc1e925c07833237044271cdc9bd8bdba3e2143dcfc5bf3bf481c89731b666a6fad25333a4b1980ac2f4c6f5e6e42c71206f73f3704e319f6b3b67463a6a + checksum: 10c0/bb5ec70727f07d1575e95f9d117762636209e1ab073a26c4e873e1e5b4617b000d300a23d294ad81693f7e99abe3e519725452c30b235a253edcd85b6ae052b0 languageName: node linkType: hard -"@typescript-eslint/utils@npm:8.8.1": - version: 8.8.1 - resolution: "@typescript-eslint/utils@npm:8.8.1" +"@typescript-eslint/utils@npm:8.9.0": + version: 8.9.0 + resolution: "@typescript-eslint/utils@npm:8.9.0" dependencies: "@eslint-community/eslint-utils": "npm:^4.4.0" - "@typescript-eslint/scope-manager": "npm:8.8.1" - "@typescript-eslint/types": "npm:8.8.1" - "@typescript-eslint/typescript-estree": "npm:8.8.1" + "@typescript-eslint/scope-manager": "npm:8.9.0" + "@typescript-eslint/types": "npm:8.9.0" + "@typescript-eslint/typescript-estree": "npm:8.9.0" peerDependencies: eslint: ^8.57.0 || ^9.0.0 - checksum: 10c0/954a2e85ae56a3ebefb6e41fb33c59ffa886963860536e9729a35ecea55eefdc58858c7aa126048c4a61f4fd9997b4f7601e7884ed2b3e4e7a46c9e4617a9f29 + checksum: 10c0/af13e3d501060bdc5fa04b131b3f9a90604e5c1d4845d1f8bd94b703a3c146a76debfc21fe65a7f3a0459ed6c57cf2aa3f0a052469bb23b6f35ff853fe9495b1 languageName: node linkType: hard -"@typescript-eslint/visitor-keys@npm:8.8.1": - version: 8.8.1 - resolution: "@typescript-eslint/visitor-keys@npm:8.8.1" +"@typescript-eslint/visitor-keys@npm:8.9.0": + version: 8.9.0 + resolution: "@typescript-eslint/visitor-keys@npm:8.9.0" dependencies: - "@typescript-eslint/types": "npm:8.8.1" + "@typescript-eslint/types": "npm:8.9.0" eslint-visitor-keys: "npm:^3.4.3" - checksum: 10c0/6f917090b61277bd443aa851c532c4a9cc91ad57aedf185c5dff0c530f158cce84ef815833bd8deffa87f0bbf7a9f1abd1e02e30af2463c4e7f27c0c08f59080 + checksum: 10c0/e33208b946841f1838d87d64f4ee230f798e68bdce8c181d3ac0abb567f758cb9c4bdccc919d493167869f413ca4c400e7db0f7dd7e8fc84ab6a8344076a7458 languageName: node linkType: hard -"@vitest/browser@npm:^2.1.2": - version: 2.1.2 - resolution: "@vitest/browser@npm:2.1.2" +"@vitest/browser@npm:^2.1.3": + version: 2.1.3 + resolution: "@vitest/browser@npm:2.1.3" dependencies: "@testing-library/dom": "npm:^10.4.0" "@testing-library/user-event": "npm:^14.5.2" - "@vitest/mocker": "npm:2.1.2" - "@vitest/utils": "npm:2.1.2" + "@vitest/mocker": "npm:2.1.3" + "@vitest/utils": "npm:2.1.3" magic-string: "npm:^0.30.11" msw: "npm:^2.3.5" sirv: "npm:^2.0.4" @@ -2896,7 +3030,7 @@ __metadata: ws: "npm:^8.18.0" peerDependencies: playwright: "*" - vitest: 2.1.2 + vitest: 2.1.3 webdriverio: "*" peerDependenciesMeta: playwright: @@ -2905,13 +3039,13 @@ __metadata: optional: true webdriverio: optional: true - checksum: 10c0/008604ad1520715da8fa8f6c83abe16bd4a73961ed5a84fb4b7ec6f060fa398eae2f87fcf5e9a0176097d2713277f5161a5f946da665d2698bd04cb25a78ae31 + checksum: 10c0/428a8d62ffcc2d637363fc7eb986d6beaeda7681b032d785f2bc475f8d105a14c674610e22a0a0c74e4ee10774b3709b11bc359e0458c6867c3d4acdc3f190a6 languageName: node linkType: hard -"@vitest/coverage-istanbul@npm:^2.1.2": - version: 2.1.2 - resolution: "@vitest/coverage-istanbul@npm:2.1.2" +"@vitest/coverage-istanbul@npm:^2.1.3": + version: 2.1.3 + resolution: "@vitest/coverage-istanbul@npm:2.1.3" dependencies: "@istanbuljs/schema": "npm:^0.1.3" debug: "npm:^4.3.6" @@ -2924,32 +3058,32 @@ __metadata: test-exclude: "npm:^7.0.1" tinyrainbow: "npm:^1.2.0" peerDependencies: - vitest: 2.1.2 - checksum: 10c0/38da5a0ec4f67e83a41b49c6c1861b9bfc4ca8458fd06d96735f2998a105ae42190dbfb41c75549e6b9268dc932dcde8c1323b4df20139fc49d1a42ffab65823 + vitest: 2.1.3 + checksum: 10c0/6b21eb219f45dc0f3bfb35049280658687b6b2f4ba5e17dc2c7e2c221f5d37e60c6962c5cfd77bd5f2848bb56debd26f82e5684b293f5775a8a416a0173f1803 languageName: node linkType: hard -"@vitest/expect@npm:2.1.2": - version: 2.1.2 - resolution: "@vitest/expect@npm:2.1.2" +"@vitest/expect@npm:2.1.3": + version: 2.1.3 + resolution: "@vitest/expect@npm:2.1.3" dependencies: - "@vitest/spy": "npm:2.1.2" - "@vitest/utils": "npm:2.1.2" + "@vitest/spy": "npm:2.1.3" + "@vitest/utils": "npm:2.1.3" chai: "npm:^5.1.1" tinyrainbow: "npm:^1.2.0" - checksum: 10c0/57233a60685f81ff5cb615156ac164608488c584cb62d7cc63d7ac28674e4c954133d4bb0948e88241c0f07d31803c0d1efd88562c4cac8e1bc5a2b24367ec0f + checksum: 10c0/0837adcbb938feebcc083664afc5c4d12e42f1f2442b6f1bedc6b5650a8ff2448b1f10713b45afb099c839fb5cf766c971736267fa9b0fe2ac87f3e2d7f782c2 languageName: node linkType: hard -"@vitest/mocker@npm:2.1.2": - version: 2.1.2 - resolution: "@vitest/mocker@npm:2.1.2" +"@vitest/mocker@npm:2.1.3": + version: 2.1.3 + resolution: "@vitest/mocker@npm:2.1.3" dependencies: - "@vitest/spy": "npm:^2.1.0-beta.1" + "@vitest/spy": "npm:2.1.3" estree-walker: "npm:^3.0.3" magic-string: "npm:^0.30.11" peerDependencies: - "@vitest/spy": 2.1.2 + "@vitest/spy": 2.1.3 msw: ^2.3.5 vite: ^5.0.0 peerDependenciesMeta: @@ -2957,63 +3091,54 @@ __metadata: optional: true vite: optional: true - checksum: 10c0/24824666d3045bdbbff77481b033d58fd07db6247846c6090cae44b75080e691f743f850300f27f9b0a790c9e3c918848a400cf7c024c9633084c1ad6311d201 + checksum: 10c0/03c80628d092244f21a0ba9041665fc75f987d0d11fab1ae0b7027ec21e503f65057e8c24b936602c5f852d83fbb183da13d05dba117c99785b41b3dafd105ce languageName: node linkType: hard -"@vitest/pretty-format@npm:2.1.2, @vitest/pretty-format@npm:^2.1.2": - version: 2.1.2 - resolution: "@vitest/pretty-format@npm:2.1.2" +"@vitest/pretty-format@npm:2.1.3, @vitest/pretty-format@npm:^2.1.3": + version: 2.1.3 + resolution: "@vitest/pretty-format@npm:2.1.3" dependencies: tinyrainbow: "npm:^1.2.0" - checksum: 10c0/e2c35dc424450f46794ff420b050e2ce77b3f3d2bdf2509c1adf51d327eeb5cc4ea42fc44919d63b3afdbfcc6da7d7e82962193d0a543c81e0f35ccdfc808835 + checksum: 10c0/5a6ee872a8adf5e2764f2b5b2276d8a2199be4ef14777ab693428caf359481851400af10b59721d4972289c955ffe7277954a662b04cfb10233824574c7074ba languageName: node linkType: hard -"@vitest/runner@npm:2.1.2": - version: 2.1.2 - resolution: "@vitest/runner@npm:2.1.2" +"@vitest/runner@npm:2.1.3": + version: 2.1.3 + resolution: "@vitest/runner@npm:2.1.3" dependencies: - "@vitest/utils": "npm:2.1.2" + "@vitest/utils": "npm:2.1.3" pathe: "npm:^1.1.2" - checksum: 10c0/c6008703ef7b9033b219690a84003c9c078e9de7ace63cefe7c9cd455667d5081c328645e3a538e23fcc221170901d1d1bb0430c4402391d74f8ffab8db62f81 + checksum: 10c0/d5b077643265d10025e22fa64a0e54c3d4fddc23e05f9fcd143dbcc4080851b0df31985986e57890a974577a18d3af624758b6062801d7dd96f9b4f2eaf591f1 languageName: node linkType: hard -"@vitest/snapshot@npm:2.1.2": - version: 2.1.2 - resolution: "@vitest/snapshot@npm:2.1.2" +"@vitest/snapshot@npm:2.1.3": + version: 2.1.3 + resolution: "@vitest/snapshot@npm:2.1.3" dependencies: - "@vitest/pretty-format": "npm:2.1.2" + "@vitest/pretty-format": "npm:2.1.3" magic-string: "npm:^0.30.11" pathe: "npm:^1.1.2" - checksum: 10c0/a05805e9eb9d460830d9f30fbdd488fee4e8bb87dc55e71f5c3541fcd4ef4d333f5c020fd26e8554771157e4e8037d164a63ab5ac0046f7640aca0b8b3fbc837 - languageName: node - linkType: hard - -"@vitest/spy@npm:2.1.2": - version: 2.1.2 - resolution: "@vitest/spy@npm:2.1.2" - dependencies: - tinyspy: "npm:^3.0.0" - checksum: 10c0/28781abb8c33274bfcf7ab85d4ce47f1583b0a11575fecbdce7b88dac5df5de62c5e11b0b55043e610c0712258b66aee2a8ff2f55068352c61b4a5d2aa9d50ca + checksum: 10c0/a3dcea6a5f7581b6a34dc3bf5f7bd42a05e2ccf6e1171d9f1b759688aebe650e6412564d066aeaa45e83ac549d453b6a3edcf774a8ac728c0c639f8dc919039f languageName: node linkType: hard -"@vitest/spy@npm:^2.1.0-beta.1": - version: 2.1.1 - resolution: "@vitest/spy@npm:2.1.1" +"@vitest/spy@npm:2.1.3": + version: 2.1.3 + resolution: "@vitest/spy@npm:2.1.3" dependencies: tinyspy: "npm:^3.0.0" - checksum: 10c0/b251be1390c105b68aa95270159c4583c3e1a0f7a2e1f82db8b7fadedc3cb459c5ef9286033a1ae764810e00715552fc80afe4507cd8b0065934fb1a64926e06 + checksum: 10c0/8d85a5c2848c5bd81892af989aebad65d0c7ae74094aa98ad4f35ecf80755259c7a748a8e7bf683b2906fac29a51fc0ffa82f8fc073b36dbd8a0418261fccdba languageName: node linkType: hard -"@vitest/ui@npm:^2.1.2": - version: 2.1.2 - resolution: "@vitest/ui@npm:2.1.2" +"@vitest/ui@npm:^2.1.3": + version: 2.1.3 + resolution: "@vitest/ui@npm:2.1.3" dependencies: - "@vitest/utils": "npm:2.1.2" + "@vitest/utils": "npm:2.1.3" fflate: "npm:^0.8.2" flatted: "npm:^3.3.1" pathe: "npm:^1.1.2" @@ -3021,19 +3146,19 @@ __metadata: tinyglobby: "npm:^0.2.6" tinyrainbow: "npm:^1.2.0" peerDependencies: - vitest: 2.1.2 - checksum: 10c0/f128e2c8a7b2c38eaadcfa1648999918b63d0ce1a6c4911536a187905847977de18419e7eb25ce77adf6a41043a5c0687867b93c80ccd2f959d7afb10537867c + vitest: 2.1.3 + checksum: 10c0/a0d16c484c139f7dcd3cbc7ef2f2b19f4332222640a0ee941c3fc517493e13a4398633fd7972a127c0eebd1aa5314dcf4e384898777d02b19b353bb6957961b4 languageName: node linkType: hard -"@vitest/utils@npm:2.1.2": - version: 2.1.2 - resolution: "@vitest/utils@npm:2.1.2" +"@vitest/utils@npm:2.1.3": + version: 2.1.3 + resolution: "@vitest/utils@npm:2.1.3" dependencies: - "@vitest/pretty-format": "npm:2.1.2" + "@vitest/pretty-format": "npm:2.1.3" loupe: "npm:^3.1.1" tinyrainbow: "npm:^1.2.0" - checksum: 10c0/ab1fac69f34c32eb229c4e5f14bec37f16211a77ba16b0e178678d5a67fd74a209c365df0cf7d27bfd6fd2572d563a6b28269d13f958dc083175a6ae2c269085 + checksum: 10c0/55a044e43b84c0f8f573d8578107f26440678b6f506c8d9fee88b7ef120d19efd27c9be77985c107113b0f3f3db298dcee57074e1c1c214bee7a097fd08a209b languageName: node linkType: hard @@ -4197,7 +4322,7 @@ __metadata: "@eslint/js": "npm:^9.12.0" "@rollup/plugin-node-resolve": "npm:^15.3.0" "@rollup/plugin-replace": "npm:^6.0.1" - "@rollup/plugin-typescript": "npm:^12.1.0" + "@rollup/plugin-typescript": "npm:^12.1.1" "@semantic-release/changelog": "npm:^6.0.3" "@semantic-release/commit-analyzer": "npm:^13.0.0" "@semantic-release/exec": "npm:^6.0.3" @@ -4210,9 +4335,9 @@ __metadata: "@types/d3-selection": "npm:^3.0.11" "@types/d3-transition": "npm:^3.0.9" "@types/sinon": "npm:^17.0.3" - "@vitest/browser": "npm:^2.1.2" - "@vitest/coverage-istanbul": "npm:^2.1.2" - "@vitest/ui": "npm:^2.1.2" + "@vitest/browser": "npm:^2.1.3" + "@vitest/coverage-istanbul": "npm:^2.1.3" + "@vitest/ui": "npm:^2.1.3" better-docs: "npm:^2.7.3" clean-webpack-plugin: "npm:^4.0.0" cloc: "npm:2.2.0-cloc" @@ -4242,26 +4367,26 @@ __metadata: esbuild-loader: "npm:^4.2.2" eslint: "npm:^9.12.0" eslint-plugin-import: "npm:^2.31.0" - eslint-plugin-jsdoc: "npm:^50.3.1" + eslint-plugin-jsdoc: "npm:^50.4.1" husky: "npm:^9.1.6" jsdoc: "npm:^4.0.3" lint-staged: "npm:^15.2.10" mini-css-extract-plugin: "npm:^2.9.1" - playwright: "npm:^1.47.2" + playwright: "npm:^1.48.0" regenerator-runtime: "npm:^0.14.1" rollup: "npm:^4.24.0" rollup-plugin-delete: "npm:^2.1.0" - sass: "npm:^1.79.4" + sass: "npm:^1.79.5" sass-loader: "npm:^16.0.2" semantic-release: "npm:^24.1.2" simulant: "npm:^0.2.2" sinon: "npm:^19.0.2" string-replace-loader: "npm:^3.1.0" style-loader: "npm:^4.0.0" - tslib: "npm:^2.7.0" - typescript: "npm:^5.6.2" - typescript-eslint: "npm:^8.8.1" - vitest: "npm:^2.1.2" + tslib: "npm:^2.8.0" + typescript: "npm:^5.6.3" + typescript-eslint: "npm:^8.9.0" + vitest: "npm:^2.1.3" webpack: "npm:^5.95.0" webpack-bundle-analyzer: "npm:^4.10.2" webpack-clean: "npm:^1.2.5" @@ -6175,6 +6300,15 @@ __metadata: languageName: node linkType: hard +"detect-libc@npm:^1.0.3": + version: 1.0.3 + resolution: "detect-libc@npm:1.0.3" + bin: + detect-libc: ./bin/detect-libc.js + checksum: 10c0/4da0deae9f69e13bc37a0902d78bf7169480004b1fed3c19722d56cff578d16f0e11633b7fbf5fb6249181236c72e90024cbd68f0b9558ae06e281f47326d50d + languageName: node + linkType: hard + "detect-node@npm:^2.0.4": version: 2.1.0 resolution: "detect-node@npm:2.1.0" @@ -6943,11 +7077,11 @@ __metadata: languageName: node linkType: hard -"eslint-plugin-jsdoc@npm:^50.3.1": - version: 50.3.1 - resolution: "eslint-plugin-jsdoc@npm:50.3.1" +"eslint-plugin-jsdoc@npm:^50.4.1": + version: 50.4.1 + resolution: "eslint-plugin-jsdoc@npm:50.4.1" dependencies: - "@es-joy/jsdoccomment": "npm:~0.48.0" + "@es-joy/jsdoccomment": "npm:~0.49.0" are-docs-informative: "npm:^0.0.2" comment-parser: "npm:1.4.1" debug: "npm:^4.3.6" @@ -6960,7 +7094,7 @@ __metadata: synckit: "npm:^0.9.1" peerDependencies: eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 - checksum: 10c0/b4e8d58f02794917581d74936e2af947aea3b518c4ad670866caa0b3f1f25cfec08414567c19d580a77d84431b2477f0a4075be500bb27b715013c59679f307e + checksum: 10c0/d3b3947fc71acac2a790774729d96da4bd61dfc783558a998fca0b581b4dec059b5cdb048cd5873a8f188c5da1929307643909dd4f51063d2d6a00487b8b8940 languageName: node linkType: hard @@ -10714,7 +10848,7 @@ __metadata: languageName: node linkType: hard -"micromatch@npm:~4.0.8": +"micromatch@npm:^4.0.5, micromatch@npm:~4.0.8": version: 4.0.8 resolution: "micromatch@npm:4.0.8" dependencies: @@ -11184,6 +11318,15 @@ __metadata: languageName: node linkType: hard +"node-addon-api@npm:^7.0.0": + version: 7.1.1 + resolution: "node-addon-api@npm:7.1.1" + dependencies: + node-gyp: "npm:latest" + checksum: 10c0/fb32a206276d608037fa1bcd7e9921e177fe992fc610d098aa3128baca3c0050fc1e014fa007e9b3874cf865ddb4f5bd9f43ccb7cbbbe4efaff6a83e920b17e9 + languageName: node + linkType: hard + "node-dir@npm:^0.1.10": version: 0.1.17 resolution: "node-dir@npm:0.1.17" @@ -12313,27 +12456,27 @@ __metadata: languageName: node linkType: hard -"playwright-core@npm:1.47.2": - version: 1.47.2 - resolution: "playwright-core@npm:1.47.2" +"playwright-core@npm:1.48.0": + version: 1.48.0 + resolution: "playwright-core@npm:1.48.0" bin: playwright-core: cli.js - checksum: 10c0/3426adf4448da71dc103e38484f711df93fad8620d825e470593629012db6772663ccdc7ccefcdb787fa0ee26dd81e84fdce8abd0bad01a4c4b0d13ff8837d3b + checksum: 10c0/b5a94f02445cb2fdad95e832d13a68448875ac627700a45f8df87c6e60890390651556aae3f5d6961c3a147f9ed6408fd44541fafe0a9f15c637e2c7c404fcfc languageName: node linkType: hard -"playwright@npm:^1.47.2": - version: 1.47.2 - resolution: "playwright@npm:1.47.2" +"playwright@npm:^1.48.0": + version: 1.48.0 + resolution: "playwright@npm:1.48.0" dependencies: fsevents: "npm:2.3.2" - playwright-core: "npm:1.47.2" + playwright-core: "npm:1.48.0" dependenciesMeta: fsevents: optional: true bin: playwright: cli.js - checksum: 10c0/6477a6e8d7329375f0ac9dcdf5599e564987e413d0c57b2135bc91ea95acb877245395d6cc37034c12a7c0bafa609d24c78113dd49e9ced793ea2886f9133131 + checksum: 10c0/4c18b06f7de87442c697c5df5b1e1e4027c5d9f05c07679aca0135dcf18e69a4424ec7a0c91a323487ea4a92fb5146fc80c04329479426722ea742fd5eff1afa languageName: node linkType: hard @@ -13625,16 +13768,17 @@ __metadata: languageName: node linkType: hard -"sass@npm:^1.79.4": - version: 1.79.4 - resolution: "sass@npm:1.79.4" +"sass@npm:^1.79.5": + version: 1.79.5 + resolution: "sass@npm:1.79.5" dependencies: + "@parcel/watcher": "npm:^2.4.1" chokidar: "npm:^4.0.0" immutable: "npm:^4.0.0" source-map-js: "npm:>=0.6.2 <2.0.0" bin: sass: sass.js - checksum: 10c0/505ff0d9267d0fb990971e617acfeabf7c060c55d4cef68fe8a4bc693e7ea88ae7d7caeca3975e4b453459ba4a707b6e5b6979fc9395a7e08f0a43ca6aed06b8 + checksum: 10c0/7331865fd1d0c03e6e180a4fe0e175ac1bf1214f6c77f0d99ad72fbe2ed9ede3fab8a64c0c41471cb8a358a9d11624ec59a49283f9b6070eb99c522b34b814bf languageName: node linkType: hard @@ -15179,10 +15323,10 @@ __metadata: languageName: node linkType: hard -"tslib@npm:^2.7.0": - version: 2.7.0 - resolution: "tslib@npm:2.7.0" - checksum: 10c0/469e1d5bf1af585742128827000711efa61010b699cb040ab1800bcd3ccdd37f63ec30642c9e07c4439c1db6e46345582614275daca3e0f4abae29b0083f04a6 +"tslib@npm:^2.8.0": + version: 2.8.0 + resolution: "tslib@npm:2.8.0" + checksum: 10c0/31e4d14dc1355e9b89e4d3c893a18abb7f90b6886b089c2da91224d0a7752c79f3ddc41bc1aa0a588ac895bd97bb99c5bc2bfdb2f86de849f31caeb3ba79bbe5 languageName: node linkType: hard @@ -15347,17 +15491,17 @@ __metadata: languageName: node linkType: hard -"typescript-eslint@npm:^8.8.1": - version: 8.8.1 - resolution: "typescript-eslint@npm:8.8.1" +"typescript-eslint@npm:^8.9.0": + version: 8.9.0 + resolution: "typescript-eslint@npm:8.9.0" dependencies: - "@typescript-eslint/eslint-plugin": "npm:8.8.1" - "@typescript-eslint/parser": "npm:8.8.1" - "@typescript-eslint/utils": "npm:8.8.1" + "@typescript-eslint/eslint-plugin": "npm:8.9.0" + "@typescript-eslint/parser": "npm:8.9.0" + "@typescript-eslint/utils": "npm:8.9.0" peerDependenciesMeta: typescript: optional: true - checksum: 10c0/d6793697fce239ef8838ced6e1e59940c30579c8f62c49bc605fdeda9f3f7a5c24bfddd997b142f8c411859dc0b9985ecdae569814dd4f8e6775e1899d55e9cc + checksum: 10c0/96bef4f5d1da9561078fa234642cfa2d024979917b8282b82f63956789bc566bdd5806ff2b414697f3dfdee314e9c9fec05911a7502550d763a496e2ef3af2fd languageName: node linkType: hard @@ -15381,13 +15525,13 @@ __metadata: languageName: node linkType: hard -"typescript@npm:^5.6.2": - version: 5.6.2 - resolution: "typescript@npm:5.6.2" +"typescript@npm:^5.6.3": + version: 5.6.3 + resolution: "typescript@npm:5.6.3" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 10c0/3ed8297a8c7c56b7fec282532503d1ac795239d06e7c4966b42d4330c6cf433a170b53bcf93a130a7f14ccc5235de5560df4f1045eb7f3550b46ebed16d3c5e5 + checksum: 10c0/44f61d3fb15c35359bc60399cb8127c30bae554cd555b8e2b46d68fa79d680354b83320ad419ff1b81a0bdf324197b29affe6cc28988cd6a74d4ac60c94f9799 languageName: node linkType: hard @@ -15411,13 +15555,13 @@ __metadata: languageName: node linkType: hard -"typescript@patch:typescript@npm%3A^5.6.2#optional!builtin": - version: 5.6.2 - resolution: "typescript@patch:typescript@npm%3A5.6.2#optional!builtin::version=5.6.2&hash=379a07" +"typescript@patch:typescript@npm%3A^5.6.3#optional!builtin": + version: 5.6.3 + resolution: "typescript@patch:typescript@npm%3A5.6.3#optional!builtin::version=5.6.3&hash=379a07" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 10c0/e6c1662e4852e22fe4bbdca471dca3e3edc74f6f1df043135c44a18a7902037023ccb0abdfb754595ca9028df8920f2f8492c00fc3cbb4309079aae8b7de71cd + checksum: 10c0/ac8307bb06bbfd08ae7137da740769b7d8c3ee5943188743bb622c621f8ad61d244767480f90fbd840277fbf152d8932aa20c33f867dea1bb5e79b187ca1a92f languageName: node linkType: hard @@ -15776,9 +15920,9 @@ __metadata: languageName: node linkType: hard -"vite-node@npm:2.1.2": - version: 2.1.2 - resolution: "vite-node@npm:2.1.2" +"vite-node@npm:2.1.3": + version: 2.1.3 + resolution: "vite-node@npm:2.1.3" dependencies: cac: "npm:^6.7.14" debug: "npm:^4.3.6" @@ -15786,7 +15930,7 @@ __metadata: vite: "npm:^5.0.0" bin: vite-node: vite-node.mjs - checksum: 10c0/7bef84ee757373cc3d171aba51299389e31cb39265df7beef3bb4b70edf1f99425577cd70b9048d357653a0247e8c20f2aa62579d57b2cfc8d74cd6945828b7f + checksum: 10c0/1b06139880a8170651e025e8c35aa92a917f8ec8f24507cda5bf4be09843f6447e1f494932a8d7eb98124f1c8c9fee02283ef318ddd57e2b861d2d85a409a206 languageName: node linkType: hard @@ -15830,17 +15974,17 @@ __metadata: languageName: node linkType: hard -"vitest@npm:^2.1.2": - version: 2.1.2 - resolution: "vitest@npm:2.1.2" - dependencies: - "@vitest/expect": "npm:2.1.2" - "@vitest/mocker": "npm:2.1.2" - "@vitest/pretty-format": "npm:^2.1.2" - "@vitest/runner": "npm:2.1.2" - "@vitest/snapshot": "npm:2.1.2" - "@vitest/spy": "npm:2.1.2" - "@vitest/utils": "npm:2.1.2" +"vitest@npm:^2.1.3": + version: 2.1.3 + resolution: "vitest@npm:2.1.3" + dependencies: + "@vitest/expect": "npm:2.1.3" + "@vitest/mocker": "npm:2.1.3" + "@vitest/pretty-format": "npm:^2.1.3" + "@vitest/runner": "npm:2.1.3" + "@vitest/snapshot": "npm:2.1.3" + "@vitest/spy": "npm:2.1.3" + "@vitest/utils": "npm:2.1.3" chai: "npm:^5.1.1" debug: "npm:^4.3.6" magic-string: "npm:^0.30.11" @@ -15851,13 +15995,13 @@ __metadata: tinypool: "npm:^1.0.0" tinyrainbow: "npm:^1.2.0" vite: "npm:^5.0.0" - vite-node: "npm:2.1.2" + vite-node: "npm:2.1.3" why-is-node-running: "npm:^2.3.0" peerDependencies: "@edge-runtime/vm": "*" "@types/node": ^18.0.0 || >=20.0.0 - "@vitest/browser": 2.1.2 - "@vitest/ui": 2.1.2 + "@vitest/browser": 2.1.3 + "@vitest/ui": 2.1.3 happy-dom: "*" jsdom: "*" peerDependenciesMeta: @@ -15875,7 +16019,7 @@ __metadata: optional: true bin: vitest: vitest.mjs - checksum: 10c0/79301678bb0207f4bfb16e155e1744ed0b9866c4e1913bb43a3821c01fcda033b7263dac8da87946f90dff6f8f1578a4f94f860409edf0332c3dbfa3a8202803 + checksum: 10c0/7688fdce37205e7f3b448039df216e103e3a52994af0201993e22decbb558d129a734001b991f3c3d80bf4a4ef91ca6a5665a7395d5b051249da60a0016eda36 languageName: node linkType: hard From 00607861a96826b2e1c9fec37159065680ff278e Mon Sep 17 00:00:00 2001 From: Jae Sung Park Date: Thu, 17 Oct 2024 19:17:13 +0900 Subject: [PATCH 4/4] fix(point): fix sensitivity error when blank area is clicked - prevent getting attribute value from undefined value - treat point.senstivity correctly Fix #3900 --- src/ChartInternal/interactions/eventrect.ts | 7 ++-- test/shape/point-spec.ts | 43 +++++++++++++++++++++ 2 files changed, 47 insertions(+), 3 deletions(-) diff --git a/src/ChartInternal/interactions/eventrect.ts b/src/ChartInternal/interactions/eventrect.ts index 59aaee101..ca3887540 100644 --- a/src/ChartInternal/interactions/eventrect.ts +++ b/src/ChartInternal/interactions/eventrect.ts @@ -671,6 +671,7 @@ export default { clickHandlerForMultipleXS(ctx): void { const $$ = ctx; const {config, state} = $$; + const pointSensitivity = config.point_sensitivity; const targetsToShow = $$.filterTargetsToShow($$.data.targets); if ($$.hasArcType(targetsToShow)) { @@ -679,9 +680,9 @@ export default { const mouse = getPointer(state.event, this); const closest = $$.findClosestFromTargets(targetsToShow, mouse); - const sensitivity = config.point_sensitivity === "radius" ? - closest.r : - config.point_sensitivity; + const sensitivity = pointSensitivity === "radius" ? closest?.r : ( + isFunction(pointSensitivity) ? closest && pointSensitivity(closest) : pointSensitivity + ); if (!closest) { return; diff --git a/test/shape/point-spec.ts b/test/shape/point-spec.ts index cdaf503de..2dc174628 100644 --- a/test/shape/point-spec.ts +++ b/test/shape/point-spec.ts @@ -388,6 +388,49 @@ describe("SHAPE POINT", () => { done(1); }); })); + + it("set options", () => { + args = { + data: { + columns: [ + ["data1", 450], + ], + type: "bubble", + onclick: sinon.spy() + }, + point: { + sensitivity: "radius" + } + } + }); + + it("shouldn't throw error when blank(non shape) area is clicked.", () => { + const {eventRect} = chart.internal.$el; + + expect( + fireEvent(eventRect.node(), "click", { + clientX: 100, + clientY: 100 + }, chart) + ).to.not.throw; + }); + + it("set options: poinst.sensitivity=function(){}", () => { + args.point.sensitivity = ({r}) => r + }); + + it("should data.onclick callback called.", () => { + const {circles} = chart.$; + const {$el: {eventRect}} = chart.internal; + const rect = circles.node().getBoundingClientRect(); + + fireEvent(eventRect.node(), "click", { + clientX: rect.left + 3, + clientY: rect.top + 3 + }, chart); + + expect(args.data.onclick.called).to.be.true; + }); }); describe("point.focus.only", () => {