@bicharts/chart-host 0.6.41 → 0.6.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2191,6 +2191,30 @@ function createMarkResolver(env) {
|
|
|
2191
2191
|
var SVG_NS = "http://www.w3.org/2000/svg";
|
|
2192
2192
|
var HIT_ATTR = "data-lch-hit";
|
|
2193
2193
|
var ELEMENT_CAP2 = 5e3;
|
|
2194
|
+
var mapsPresentationAttributes = /* @__PURE__ */ new WeakMap();
|
|
2195
|
+
function engineMapsPresentationAttributes(ownerDoc, view) {
|
|
2196
|
+
if (!ownerDoc || typeof ownerDoc !== "object") return false;
|
|
2197
|
+
const known = mapsPresentationAttributes.get(ownerDoc);
|
|
2198
|
+
if (known !== void 0) return known;
|
|
2199
|
+
let maps = false;
|
|
2200
|
+
try {
|
|
2201
|
+
const host = ownerDoc.documentElement;
|
|
2202
|
+
const probe = ownerDoc.createElementNS(SVG_NS, "svg");
|
|
2203
|
+
const shape = ownerDoc.createElementNS(SVG_NS, "rect");
|
|
2204
|
+
shape.setAttribute("fill", "none");
|
|
2205
|
+
probe.appendChild(shape);
|
|
2206
|
+
host.appendChild(probe);
|
|
2207
|
+
try {
|
|
2208
|
+
maps = String(view.getComputedStyle(shape).fill ?? "").trim().toLowerCase() === "none";
|
|
2209
|
+
} finally {
|
|
2210
|
+
host.removeChild(probe);
|
|
2211
|
+
}
|
|
2212
|
+
} catch {
|
|
2213
|
+
maps = false;
|
|
2214
|
+
}
|
|
2215
|
+
mapsPresentationAttributes.set(ownerDoc, maps);
|
|
2216
|
+
return maps;
|
|
2217
|
+
}
|
|
2194
2218
|
function ensureCrossfilterHitTargets(container, doc) {
|
|
2195
2219
|
const report = { tagged: 0, hitRects: 0, peFlips: 0, peStrokeOnly: 0 };
|
|
2196
2220
|
try {
|
|
@@ -2253,7 +2277,7 @@ function ensureCrossfilterHitTargets(container, doc) {
|
|
|
2253
2277
|
} else {
|
|
2254
2278
|
const cs = computed(el);
|
|
2255
2279
|
if (cs && cs.pointerEvents === "none") {
|
|
2256
|
-
const fill = String(el.getAttribute?.("fill") ?? cs.fill ?? "").trim().toLowerCase();
|
|
2280
|
+
const fill = String((engineMapsPresentationAttributes(ownerDoc, view) ? cs.fill : el.getAttribute?.("fill") ?? cs.fill) ?? "").trim().toLowerCase();
|
|
2257
2281
|
const unfilled = fill === "none" || fill === "transparent" || fill === "rgba(0, 0, 0, 0)";
|
|
2258
2282
|
if (el.style) el.style.pointerEvents = unfilled ? "stroke" : "all";
|
|
2259
2283
|
report.peFlips++;
|
package/dist/index.mjs
CHANGED
package/dist/react.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bicharts/chart-host",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.42",
|
|
4
4
|
"description": "Run a BIC-generated D3 chart in any web host: compiles the generated render() function, applies the shared option defaults, resolves mark clicks (through tooltip overlays), owns the selection affordance, and translates row indices between cross-filtered charts. The same contract the BIC Power BI visual implements, minus Power BI. React bindings at @bicharts/chart-host/react.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|