@bicharts/chart-host 0.6.119 → 0.6.121

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.
package/dist/card.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  /*! @bicharts/chart-host — Apache-2.0. Bundled reference data: GeoNames (https://www.geonames.org/) CC BY 4.0; Natural Earth and US Census/TIGER (public domain). Full text: NOTICE in this package. */
2
2
  import {
3
3
  computeSelectionCard
4
- } from "./chunk-HTXZZTFM.mjs";
5
- import "./chunk-BGG4WRQW.mjs";
4
+ } from "./chunk-PHUHGRD3.mjs";
5
+ import "./chunk-D45HLIN7.mjs";
6
6
  import "./chunk-GHODWOAL.mjs";
7
7
 
8
8
  // src/selectionCardChrome.ts
@@ -1175,7 +1175,7 @@ function Fn(n, s2) {
1175
1175
  return { iso: o3, unmatched: I3, matchedRows: N2, totalRows: n.length };
1176
1176
  }
1177
1177
 
1178
- // ../shape-core/dist/chunk-3V65PCPL.mjs
1178
+ // ../shape-core/dist/chunk-J5EZ7BH7.mjs
1179
1179
  var import_papaparse = __toESM(require_papaparse_min(), 1);
1180
1180
  /*! @bicharts/shape-core — Apache-2.0. Bundled reference data: GeoNames (https://www.geonames.org/) CC BY 4.0; US Census/TIGER (public domain). Full text: NOTICE in this package. */
1181
1181
  function Mt(t, e, n) {
@@ -1189,7 +1189,7 @@ function Mt(t, e, n) {
1189
1189
  return r.size === 1 ? [...r][0] : null;
1190
1190
  }
1191
1191
  function Mi(t, e = {}) {
1192
- let n = e.deriveProvinces !== false, i = new Array(t.length), r = new Array(t.length), s2 = /* @__PURE__ */ new Set(), a3 = [], l2 = /* @__PURE__ */ new Set(), o3 = [], u3 = 0, c = 0, f2 = 0, d2 = (A2) => {
1192
+ let n = e.deriveProvinces !== false, i = new Array(t.length), r = new Array(t.length), s2 = /* @__PURE__ */ new Set(), a3 = [], l2 = /* @__PURE__ */ new Set(), o3 = [], u3 = 0, d2 = 0, f2 = 0, c = (A2) => {
1193
1193
  let S = A2.toLowerCase();
1194
1194
  s2.has(S) || (s2.add(S), a3.push(A2));
1195
1195
  }, h3 = (A2) => A2 == null || A2 === "" ? null : Number(A2), x3 = /* @__PURE__ */ new Map();
@@ -1198,7 +1198,7 @@ function Mi(t, e = {}) {
1198
1198
  let p3 = A2.country === null || A2.country === void 0 || String(A2.country).trim() === "" ? null : String(A2.country).trim(), y3 = A2.province === null || A2.province === void 0 ? "" : String(A2.province).trim();
1199
1199
  if (y3) {
1200
1200
  let _3 = Mt(y3, e.provinceKind, p3);
1201
- _3 ? (i[S] = _3, r[S] = "province", u3++) : d2(y3);
1201
+ _3 ? (i[S] = _3, r[S] = "province", u3++) : c(y3);
1202
1202
  return;
1203
1203
  }
1204
1204
  if (!n) return;
@@ -1219,38 +1219,38 @@ function Mi(t, e = {}) {
1219
1219
  return;
1220
1220
  }
1221
1221
  if (M2.status === "ambiguous") {
1222
- c++, l2.has(_3) || (l2.add(_3), o3.length < 8 && o3.push(b2));
1222
+ d2++, l2.has(_3) || (l2.add(_3), o3.length < 8 && o3.push(b2));
1223
1223
  return;
1224
1224
  }
1225
- d2(b2);
1225
+ c(b2);
1226
1226
  return;
1227
1227
  }
1228
1228
  w4 && f2++;
1229
- }), { iso: i, source: r, unmatched: a3, matchedRows: u3, totalRows: t.length, ambiguousRows: c, ambiguousExamples: o3, unplacedPoints: f2 };
1229
+ }), { iso: i, source: r, unmatched: a3, matchedRows: u3, totalRows: t.length, ambiguousRows: d2, ambiguousExamples: o3, unplacedPoints: f2 };
1230
1230
  }
1231
- var Tn3 = { es: ["latitud"], pt: ["latitude"], fr: ["latitude"], it: ["latitudine"], nl: ["breedtegraad"], de: ["breitengrad"] };
1232
- var vn2 = { es: ["longitud"], pt: ["longitude"], fr: ["longitude"], it: ["longitudine"], nl: ["lengtegraad"], de: ["l\xE4ngengrad"] };
1231
+ var vn2 = { es: ["latitud"], pt: ["latitude"], fr: ["latitude"], it: ["latitudine"], nl: ["breedtegraad"], de: ["breitengrad"] };
1232
+ var Rn3 = { es: ["longitud"], pt: ["longitude"], fr: ["longitude"], it: ["longitudine"], nl: ["lengtegraad"], de: ["l\xE4ngengrad"] };
1233
1233
  var We = (t) => f(t.normalize("NFC")).toLowerCase();
1234
- var Rn3 = new Set(Object.values(Tn3).flatMap((t) => (t ?? []).map(We)));
1235
1234
  var In2 = new Set(Object.values(vn2).flatMap((t) => (t ?? []).map(We)));
1235
+ var Nn2 = new Set(Object.values(Rn3).flatMap((t) => (t ?? []).map(We)));
1236
1236
  function Nt(t) {
1237
1237
  let e = false, n = false;
1238
1238
  for (let i of t) {
1239
1239
  let r = We(i);
1240
- Rn3.has(r) ? e = true : In2.has(r) && (n = true);
1240
+ In2.has(r) ? e = true : Nn2.has(r) && (n = true);
1241
1241
  }
1242
1242
  return e === n ? null : e ? "lat" : "lon";
1243
1243
  }
1244
- var Nn2 = ["rate", "ratio", "pct", "percent", "percentage", "rating", "share", "score", "index", "nps", "csat", "margin", "yield", "coverage", "utilization", "utilisation", "z[_-]?score", "average", "avg", "mean", "median", "stddev", "variance", "gpa", "percentile", "quantile", "efficiency", "accuracy", "probability", "multiplier", "coefficient", "correlation", "occupancy", "age", "bmi", "temperature", "density", "pressure", "humidity", "ph", "velocity", "speed", "elevation", "altitude", "latency", "throughput", "bandwidth", "iops", "ppm", "ppb", "dpmo", "bps", "capita", "temperatuur", "temperatur", "temperatura", "teplota", "lampotila", "homerseklet", "sicaklik", "pression", "presion", "pressao", "pressione", "druck", "tryck", "tlak", "paine", "nyomas", "presiune", "humidite", "humedad", "umidade", "umidita", "feuchtigkeit", "vochtigheid", "kosteus", "vlhkost", "vitesse", "velocidad", "velocidade", "velocita", "geschwindigkeit", "snelheid", "hastighet", "hastighed", "rychlost", "nopeus", "sebesseg", "brzina", "predkosc", "densite", "densidad", "densidade", "densita", "dichte", "dichtheid", "hustota", "tiheys", "gustoca", "moyenne", "mediane", "promedio", "mediana", "gemiddelde", "durchschnitt", "mittelwert", "genomsnitt", "gennemsnit", "gjennomsnitt", "keskiarvo", "atlag", "ortalama", "prosjek", "srednia", "prumer", "priemer", "medie", "taux", "tasa", "taxa", "tasso", "verhaltnis", "verhouding", "aandeel", "anteil", "andel", "osuus", "podil", "udzial", "udio", "pourcentage", "porcentaje", "percentual", "prozent", "procent", "prosentti", "szazalek", "yuzde", "participacion", "participacao", "pondere", "omjer", "arany", "oran", "rata", "leeftijd", "edad", "idade", "wiek", "eletkor", "varsta", "puntuacion", "pontuacao", "punteggio", "betyg", "ocena", "indice", "indeks", "wskaznik", "puan", "ocupacion", "ocupacao", "occupazione", "auslastung", "bezetting", "belaggning", "belaegning", "belegg", "kayttoaste", "oblozenie", "obsazenost", "obsadenost", "kihasznaltsag", "doluluk", "ocupare", "popunjenost", "efficacite", "eficiencia", "efficienza", "effizienz", "effectiviteit", "verimlilik"];
1245
- var En3 = ["pct", "percent", "percentage", "rate", "ratio", "rating", "share", "score", "index", "nps", "csat", "margin", "yield", "coverage", "utilization", "utilisation", "gpa", "percentile", "quantile", "bmi", "density", "pressure", "humidity", "velocity", "efficiency", "occupancy", "latency", "throughput", "bandwidth", "iops", "ppm", "ppb", "dpmo", "bps"];
1246
- var kn2 = ["latitude", "longitude"];
1244
+ var En3 = ["rate", "ratio", "pct", "percent", "percentage", "rating", "share", "score", "index", "nps", "csat", "margin", "yield", "coverage", "utilization", "utilisation", "z[_-]?score", "average", "avg", "mean", "median", "stddev", "variance", "gpa", "percentile", "quantile", "efficiency", "accuracy", "probability", "multiplier", "coefficient", "correlation", "occupancy", "age", "bmi", "temperature", "density", "pressure", "humidity", "ph", "velocity", "speed", "elevation", "altitude", "latency", "throughput", "bandwidth", "iops", "ppm", "ppb", "dpmo", "bps", "capita", "temperatuur", "temperatur", "temperatura", "teplota", "lampotila", "homerseklet", "sicaklik", "pression", "presion", "pressao", "pressione", "druck", "tryck", "tlak", "paine", "nyomas", "presiune", "humidite", "humedad", "umidade", "umidita", "feuchtigkeit", "vochtigheid", "kosteus", "vlhkost", "vitesse", "velocidad", "velocidade", "velocita", "geschwindigkeit", "snelheid", "hastighet", "hastighed", "rychlost", "nopeus", "sebesseg", "brzina", "predkosc", "densite", "densidad", "densidade", "densita", "dichte", "dichtheid", "hustota", "tiheys", "gustoca", "moyenne", "mediane", "promedio", "mediana", "gemiddelde", "durchschnitt", "mittelwert", "genomsnitt", "gennemsnit", "gjennomsnitt", "keskiarvo", "atlag", "ortalama", "prosjek", "srednia", "prumer", "priemer", "medie", "taux", "tasa", "taxa", "tasso", "verhaltnis", "verhouding", "aandeel", "anteil", "andel", "osuus", "podil", "udzial", "udio", "pourcentage", "porcentaje", "percentual", "prozent", "procent", "prosentti", "szazalek", "yuzde", "participacion", "participacao", "pondere", "omjer", "arany", "oran", "rata", "leeftijd", "edad", "idade", "wiek", "eletkor", "varsta", "puntuacion", "pontuacao", "punteggio", "betyg", "ocena", "indice", "indeks", "wskaznik", "puan", "ocupacion", "ocupacao", "occupazione", "auslastung", "bezetting", "belaggning", "belaegning", "belegg", "kayttoaste", "oblozenie", "obsazenost", "obsadenost", "kihasznaltsag", "doluluk", "ocupare", "popunjenost", "efficacite", "eficiencia", "efficienza", "effizienz", "effectiviteit", "verimlilik"];
1245
+ var kn2 = ["pct", "percent", "percentage", "rate", "ratio", "rating", "share", "score", "index", "nps", "csat", "margin", "yield", "coverage", "utilization", "utilisation", "gpa", "percentile", "quantile", "bmi", "density", "pressure", "humidity", "velocity", "efficiency", "occupancy", "latency", "throughput", "bandwidth", "iops", "ppm", "ppb", "dpmo", "bps"];
1247
1246
  var Dn = ["latitude", "longitude"];
1247
+ var On3 = ["latitude", "longitude"];
1248
1248
  function Z3(t) {
1249
1249
  return f(t);
1250
1250
  }
1251
1251
  var Dt = ["somme de", "suma de", "soma de", "summe von", "som van", "somma di", "summa av", "sum av", "sum af", "soucet z", "suma z", "totaal van", "total de", "toplam", "osszeg", "nombre de", "recuento de", "contagem de", "anzahl von", "aantal van", "conteggio di", "antal av", "lukumaara", "pocet z", "sum pa", "\u0441\u0443\u043C\u043C\u0430", "\u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E", "\u0441\u0443\u043C\u0430", "\u043A\u0456\u043B\u044C\u043A\u0456\u0441\u0442\u044C", "\u03B1\u03B8\u03C1\u03BF\u03B9\u03C3\u03BC\u03B1", "\u03C0\u03BB\u03B7\u03B8\u03BF\u03C2"];
1252
- var Pn2 = ["osszege", "sucet", "\u7684\u603B\u548C", "\u7684\u8BA1\u6570", "\u306E\u5408\u8A08", "\uC758 \uD569\uACC4"];
1253
- var Ln2 = ["atlaga", "priemer", "\u7684\u5E73\u5747\u503C", "\u306E\u5E73\u5747", "\uC758 \uD3C9\uADE0"];
1252
+ var Ln2 = ["osszege", "sucet", "\u7684\u603B\u548C", "\u7684\u8BA1\u6570", "\u306E\u5408\u8A08", "\uC758 \uD569\uACC4"];
1253
+ var Fn2 = ["atlaga", "priemer", "\u7684\u5E73\u5747\u503C", "\u306E\u5E73\u5747", "\uC758 \uD3C9\uADE0"];
1254
1254
  var Ce = Object.freeze({ "nombre de": "count", "recuento de": "count", "contagem de": "count", "anzahl von": "count", "aantal van": "count", "conteggio di": "count", "antal av": "count", lukumaara: "count", "pocet z": "count", \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E: "count", \u043A\u0456\u043B\u044C\u043A\u0456\u0441\u0442\u044C: "count", \u03C0\u03BB\u03B7\u03B8\u03BF\u03C2: "count", \u7684\u8BA1\u6570: "count", "minimum de": "min", "minimo de": "min", "minimo di": "min", "minimum von": "min", "maximum de": "max", "maximo de": "max", "massimo di": "max", "maximum von": "max" });
1255
1255
  function $e(t) {
1256
1256
  return [...t].sort((e, n) => n.length - e.length).map((e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&").replace(/\s+/g, "\\s+")).join("|");
@@ -1263,22 +1263,22 @@ function Et(t) {
1263
1263
  }
1264
1264
  return false;
1265
1265
  }
1266
- var Fn2 = "[\u2013\u2014-]";
1266
+ var zn2 = "[\u2013\u2014-]";
1267
1267
  function Pt(t) {
1268
1268
  let e = t.filter((r) => !Et(r)), n = t.filter(Et), i = [];
1269
- return e.length && i.push("(?:\\s+|\\s*" + Fn2 + "\\s*)(" + $e(e) + ")"), n.length && i.push("\\s*(" + $e(n) + ")"), new RegExp("(?:" + i.join("|") + ")\\s*$", "i");
1269
+ return e.length && i.push("(?:\\s+|\\s*" + zn2 + "\\s*)(" + $e(e) + ")"), n.length && i.push("\\s*(" + $e(n) + ")"), new RegExp("(?:" + i.join("|") + ")\\s*$", "i");
1270
1270
  }
1271
- var Be = Pt(Pn2);
1272
- var zn2 = Pt(Ln2);
1271
+ var Be = Pt(Ln2);
1272
+ var Wn2 = Pt(Fn2);
1273
1273
  function xe(t, e) {
1274
1274
  let n = e.exec(t);
1275
1275
  if (!n) return null;
1276
1276
  let i = t.slice(0, n.index);
1277
1277
  return i.trim() === "" ? null : { base: i, label: (n[1] ?? n[2] ?? "").toLowerCase() };
1278
1278
  }
1279
- var Wn2 = /(?<=[a-z0-9])(?=[A-Z])|(?<=[A-Za-z])(?=[0-9])|(?<=[0-9])(?=[A-Za-z])/g;
1280
- var $n2 = new RegExp("\\b(" + Nn2.join("|") + ")\\b|(" + En3.join("|") + ")$", "i");
1281
- var Bn2 = new RegExp("\\b(" + kn2.join("|") + ")\\b|(" + Dn.join("|") + ")$", "i");
1279
+ var $n2 = /(?<=[a-z0-9])(?=[A-Z])|(?<=[A-Za-z])(?=[0-9])|(?<=[0-9])(?=[A-Za-z])/g;
1280
+ var Bn2 = new RegExp("\\b(" + En3.join("|") + ")\\b|(" + kn2.join("|") + ")$", "i");
1281
+ var Gn2 = new RegExp("\\b(" + Dn.join("|") + ")\\b|(" + On3.join("|") + ")$", "i");
1282
1282
  function Me(t) {
1283
1283
  if (!t) return "";
1284
1284
  let e = String(t), n = Z3(e), i = Ot2.exec(n);
@@ -1286,54 +1286,54 @@ function Me(t) {
1286
1286
  let r = xe(n, Be);
1287
1287
  return (r ? e.slice(0, r.base.length) : e).trim();
1288
1288
  }
1289
- function Gn2(t) {
1289
+ function Vn2(t) {
1290
1290
  if (!t) return false;
1291
1291
  let e = Z3(String(t));
1292
1292
  return Ot2.test(e) || xe(e, Be) !== null;
1293
1293
  }
1294
- var Vn2 = ["count (distinct)", "count distinct", "distinct count", "standard deviation", "average", "variance", "median", "product", "stddev", "std dev", "count", "sum", "avg", "min", "minimum", "max", "maximum", "var"];
1295
- var kt2 = new RegExp("^\\s*(" + [...Vn2].sort((t, e) => e.length - t.length).map((t) => t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&").replace(/\s+/g, "\\s+")).join("|") + ")\\s+of\\s+", "i");
1294
+ var Kn2 = ["count (distinct)", "count distinct", "distinct count", "standard deviation", "average", "variance", "median", "product", "stddev", "std dev", "count", "sum", "avg", "min", "minimum", "max", "maximum", "var"];
1295
+ var kt2 = new RegExp("^\\s*(" + [...Kn2].sort((t, e) => e.length - t.length).map((t) => t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&").replace(/\s+/g, "\\s+")).join("|") + ")\\s+of\\s+", "i");
1296
1296
  var we = { Sum: ["Sum of "], Avg: ["Average of "], Average: ["Average of "], Count: ["Count of "], CountNonNull: ["Count of "], Min: ["Min of ", "First ", "Earliest "], Max: ["Max of ", "Last ", "Latest "], Median: ["Median of "], StandardDeviation: ["Standard deviation of "], Variance: ["Variance of "] };
1297
1297
  var Ft = new RegExp("^(" + Object.keys(we).join("|") + ")\\((.+)\\)$");
1298
- function Kn2(t) {
1298
+ function Un3(t) {
1299
1299
  let e = Me(t);
1300
- return e.length === 0 ? "" : e.replace(Wn2, " ");
1300
+ return e.length === 0 ? "" : e.replace($n2, " ");
1301
1301
  }
1302
1302
  function $t(t, e) {
1303
1303
  if (!e) return false;
1304
1304
  let n = Me(e);
1305
- return t.test(Z3(Kn2(e))) || t.test(Z3(n)) || t.test(Z3(g2(n).join(" ")));
1305
+ return t.test(Z3(Un3(e))) || t.test(Z3(n)) || t.test(Z3(g2(n).join(" ")));
1306
1306
  }
1307
1307
  function Bt(t) {
1308
- return $t(Bn2, t);
1308
+ return $t(Gn2, t);
1309
1309
  }
1310
- function Un3(t) {
1311
- return $t($n2, t) || Bt(t);
1310
+ function Hn2(t) {
1311
+ return $t(Bn2, t) || Bt(t);
1312
1312
  }
1313
1313
  var Gt2 = /int|double|decimal|single|float|number|currency|money/i;
1314
- function Hn2(t) {
1314
+ function Yn3(t) {
1315
1315
  let e = String(t?.valueNature ?? "").trim().toLowerCase();
1316
1316
  return e === "categorical" ? "Categorical" : e === "ordinal" ? "Ordinal" : e === "continuous" || t?.isMeasure === true || Gt2.test(String(t?.dataType ?? "")) ? "Continuous" : "Categorical";
1317
1317
  }
1318
- function Yn3(t) {
1318
+ function jn2(t) {
1319
1319
  return t?.isMeasure === true || Gt2.test(String(t?.dataType ?? ""));
1320
1320
  }
1321
1321
  function Vt(t) {
1322
- let e = t ?? {}, n = Hn2(e);
1322
+ let e = t ?? {}, n = Yn3(e);
1323
1323
  if (n !== "Continuous") return { nature: n, additivity: "unknown", basis: "role", suppressed: false };
1324
1324
  if (Bt(e.name)) return { nature: n, additivity: "positional", basis: "name", suppressed: true };
1325
1325
  let i = String(e.additivity ?? "").trim().toLowerCase();
1326
- if (!(i === "additive" && Gn2(e.name))) {
1326
+ if (!(i === "additive" && Vn2(e.name))) {
1327
1327
  if (i === "additive") return { nature: n, additivity: "additive", basis: "measured", suppressed: false };
1328
1328
  if (i === "part_of_whole") return { nature: n, additivity: "part_of_whole", basis: "measured", suppressed: false };
1329
1329
  if (i === "intensive_rate") return { nature: n, additivity: "intensive_rate", basis: "measured", suppressed: false };
1330
1330
  }
1331
- return e.discourageAggregationAcrossGroups === true ? { nature: n, additivity: "intensive_rate", basis: "host-flag", suppressed: false } : Un3(e.name) ? { nature: n, additivity: "intensive_rate", basis: "name", suppressed: false } : { nature: n, additivity: "additive", basis: "default", suppressed: false };
1331
+ return e.discourageAggregationAcrossGroups === true ? { nature: n, additivity: "intensive_rate", basis: "host-flag", suppressed: false } : Hn2(e.name) ? { nature: n, additivity: "intensive_rate", basis: "name", suppressed: false } : { nature: n, additivity: "additive", basis: "default", suppressed: false };
1332
1332
  }
1333
1333
  function Kt(t) {
1334
1334
  let e = Vt(t), n = t ?? {};
1335
1335
  if (e.nature === "Categorical") return ["first", "distinctcount", "count"];
1336
- if (e.nature === "Ordinal") return Yn3(n) ? ["median", "average", "min", "max", "first", "distinctcount", "count"] : ["first", "distinctcount", "count"];
1336
+ if (e.nature === "Ordinal") return jn2(n) ? ["median", "average", "min", "max", "first", "distinctcount", "count"] : ["first", "distinctcount", "count"];
1337
1337
  switch (e.additivity) {
1338
1338
  case "positional":
1339
1339
  return ["min", "max", "count", "distinctcount", "first"];
@@ -1352,7 +1352,7 @@ function Li(t, e) {
1352
1352
  let n = Vt(t);
1353
1353
  return n.additivity === "additive" || n.additivity === "part_of_whole" || n.additivity === "unknown";
1354
1354
  }
1355
- var ar = new RegExp([String.raw`\bisMeasure\b`, String.raw`\bdataType\b`, String.raw`\bcolumns\s*\[\s*-?\d`, String.raw`\.iloc\s*\[[^\]]*,`, String.raw`\.iat\s*\[`, String.raw`\bselect_dtypes\b`, String.raw`\b_get_numeric_data\b`, String.raw`\bis_numeric_dtype\b`, String.raw`\bfor\s+\w+\s+in\s+(?:list\s*\(\s*)?df\.columns\b`, String.raw`\bdf\.columns\s*\.\s*(?:tolist|to_list|difference|drop)\b`, String.raw`\bdf\.dtypes\b`, String.raw`\bObject\s*\.\s*(?:keys|values|entries)\s*\(\s*(?:rows|data|df)?\s*\[\s*0\s*\]`, String.raw`\b(?:row|rw|r)\s*\[\s*\d+\s*\]`].join("|"));
1355
+ var lr = new RegExp([String.raw`\bisMeasure\b`, String.raw`\bdataType\b`, String.raw`\bcolumns\s*\[\s*-?\d`, String.raw`\.iloc\s*\[[^\]]*,`, String.raw`\.iat\s*\[`, String.raw`\bselect_dtypes\b`, String.raw`\b_get_numeric_data\b`, String.raw`\bis_numeric_dtype\b`, String.raw`\bfor\s+\w+\s+in\s+(?:list\s*\(\s*)?df\.columns\b`, String.raw`\bdf\.columns\s*\.\s*(?:tolist|to_list|difference|drop)\b`, String.raw`\bdf\.dtypes\b`, String.raw`\bObject\s*\.\s*(?:keys|values|entries)\s*\(\s*(?:rows|data|df)?\s*\[\s*0\s*\]`, String.raw`\b(?:row|rw|r)\s*\[\s*\d+\s*\]`].join("|"));
1356
1356
 
1357
1357
  // ../shape-core/dist/index.mjs
1358
1358
  /*! @bicharts/shape-core — Apache-2.0. Bundled reference data: GeoNames (https://www.geonames.org/) CC BY 4.0; US Census/TIGER (public domain). Full text: NOTICE in this package. */
@@ -6,7 +6,7 @@ import {
6
6
  Vt,
7
7
  j,
8
8
  u
9
- } from "./chunk-BGG4WRQW.mjs";
9
+ } from "./chunk-D45HLIN7.mjs";
10
10
 
11
11
  // src/sourceDateFormat.ts
12
12
  function formatSourceDate(raw, opts = {}) {
@@ -44,7 +44,7 @@ import {
44
44
  Yn,
45
45
  tt,
46
46
  xt
47
- } from "./chunk-BGG4WRQW.mjs";
47
+ } from "./chunk-D45HLIN7.mjs";
48
48
  import {
49
49
  SAME_SHADE_DELTA_E,
50
50
  censusColourSpread,
@@ -2485,6 +2485,9 @@ var DOT = 8;
2485
2485
  var RING = 1.5;
2486
2486
  var DOT_HALF = DOT / 2 + RING;
2487
2487
  var DOT_IN = 8;
2488
+ var COUNT_H = 14;
2489
+ var countW = (digits) => Math.max(COUNT_H, digits * 6 + 6);
2490
+ var countOf = (label) => /^\d{1,3}$/.test(label) && Number(label) >= 1 ? label : null;
2488
2491
  function createAnnotationLayer(container, onClick, opts) {
2489
2492
  let list = [];
2490
2493
  let report = { shown: 0, notShown: 0 };
@@ -2668,6 +2671,18 @@ function createAnnotationLayer(container, onClick, opts) {
2668
2671
  placed.push(g);
2669
2672
  return [x, y];
2670
2673
  };
2674
+ const countSpot = (v, whole, digits) => {
2675
+ const w = countW(digits), hw = w / 2 + RING, hh = COUNT_H / 2 + RING;
2676
+ const roomy = (b) => b.r - b.l >= 2 * w && b.b - b.t >= 2 * COUNT_H;
2677
+ if (!roomy(whole) || !roomy(v)) return null;
2678
+ const x = clampX(v.r - Math.max(DOT_IN, w / 2 + 2), Math.ceil(hw));
2679
+ const y = clampY(v.t + Math.max(DOT_IN, COUNT_H / 2 + 2), Math.ceil(hh));
2680
+ const g = { l: x - hw, t: y - hh, r: x + hw, b: y + hh };
2681
+ if (g.l < v.l || g.r > v.r || g.t < v.t || g.b > v.b) return null;
2682
+ if (controls.some((c) => hits(g, c)) || placed.some((p) => hits(g, p)) || textsNow().some((t) => hits(g, t.b))) return null;
2683
+ placed.push(g);
2684
+ return [x, y];
2685
+ };
2671
2686
  const offX = -origin.left - (container.clientLeft || 0) + (container.scrollLeft || 0);
2672
2687
  const offY = -origin.top - (container.clientTop || 0) + (container.scrollTop || 0);
2673
2688
  let shown = 0;
@@ -2707,7 +2722,9 @@ function createAnnotationLayer(container, onClick, opts) {
2707
2722
  }
2708
2723
  }
2709
2724
  const dot = wantsDot(bestMark ?? hits2.values().next().value ?? null);
2710
- const pt = !best ? null : dot ? dotSpot(best, bestWhole) : clear(best, (a.label ?? "\u2022").length, bestMark, bestWhole ?? best);
2725
+ const count = dot && best ? countOf(text(a.label)) : null;
2726
+ const countPt = count ? countSpot(best, bestWhole, count.length) : null;
2727
+ const pt = !best ? null : countPt ?? (dot ? dotSpot(best, bestWhole) : clear(best, (a.label ?? "\u2022").length, bestMark, bestWhole ?? best));
2711
2728
  if (laidOut && !pt) continue;
2712
2729
  shown++;
2713
2730
  const badge = doc.createElement("div");
@@ -2715,6 +2732,7 @@ function createAnnotationLayer(container, onClick, opts) {
2715
2732
  badge.setAttribute("role", "button");
2716
2733
  if (dot) {
2717
2734
  const label = text(a.label), title = text(a.title);
2735
+ if (countPt) badge.textContent = count;
2718
2736
  badge.setAttribute("title", title ? label ? `(${label}) ${title}` : title : `Note on ${want}${label ? `: ${label}` : ""}`);
2719
2737
  badge.setAttribute("aria-label", `Note on ${want}${label ? `: ${label}` : ""}${title ? `. ${title}` : ""}`);
2720
2738
  } else {
@@ -2727,7 +2745,15 @@ function createAnnotationLayer(container, onClick, opts) {
2727
2745
  left: `${Math.round(pt ? pt[0] + offX : 0)}px`,
2728
2746
  top: `${Math.round(pt ? pt[1] + offY : 0)}px`,
2729
2747
  transform: "translate(-50%, -50%)",
2730
- ...dot ? { width: `${DOT}px`, height: `${DOT}px`, boxSizing: "border-box", borderRadius: "50%" } : {
2748
+ ...countPt ? {
2749
+ width: `${countW(count.length)}px`,
2750
+ height: `${COUNT_H}px`,
2751
+ boxSizing: "border-box",
2752
+ borderRadius: `${COUNT_H / 2}px`,
2753
+ font: `600 9px/${COUNT_H}px system-ui, sans-serif`,
2754
+ textAlign: "center",
2755
+ color: theme.bg || "#ffffff"
2756
+ } : dot ? { width: `${DOT}px`, height: `${DOT}px`, boxSizing: "border-box", borderRadius: "50%" } : {
2731
2757
  minWidth: "16px",
2732
2758
  height: "16px",
2733
2759
  padding: "0 4px",
@@ -3422,8 +3448,12 @@ function createChartHost(container, config) {
3422
3448
  .${HOST_CONTAINER_CLASS} .${MARK_CLASS}:not([${ROW_IDX_ATTR}=""]):hover { filter: brightness(1.1) drop-shadow(0 0 1.5px rgba(0,0,0,0.5)) !important; }
3423
3449
  .${HOST_CONTAINER_CLASS}:not(.${MARKS_INERT_CLASS}):has(.${MARK_CLASS}:not([${ROW_IDX_ATTR}=""]):hover) .${MARK_CLASS}:not(:hover):not([${ROW_IDX_ATTR}=""]) { opacity: 0.55; }
3424
3450
  /* A MARK THAT SELECTS NOTHING DOESN'T LOOK CLICKABLE: no pointer, over the inline cursor generated code
3425
- sets on its marks, and no dimming of the others on hover (the rule above). A control the chart draws keeps its own. */
3426
- .${HOST_CONTAINER_CLASS}.${MARKS_INERT_CLASS} .${MARK_CLASS} { cursor: default !important; }
3451
+ sets on its marks, and no dimming of the others on hover (the rule above). A control the chart draws keeps its own.
3452
+ The same for a legend swatch and an axis filter: on an inert chart the click handler drops their clicks too, so a
3453
+ month label drawn with a pointer promised a filter that never came. */
3454
+ .${HOST_CONTAINER_CLASS}.${MARKS_INERT_CLASS} .${MARK_CLASS},
3455
+ .${HOST_CONTAINER_CLASS}.${MARKS_INERT_CLASS} .${LEGEND_MARK_CLASS},
3456
+ .${HOST_CONTAINER_CLASS}.${MARKS_INERT_CLASS} .${AXIS_FILTER_CLASS} { cursor: default !important; }
3427
3457
  /* THE KEYBOARD'S FOCUS: a ring on the mark, control or badge that holds keyboard focus, in the colour the
3428
3458
  chart's text is drawn in, so it reads in either theme. A pointer's focus shows none. */
3429
3459
  .${HOST_CONTAINER_CLASS}.${KEYBOARD_CLASS} [${WIRED_ATTR}]:focus:not(:focus-visible) { outline: none; }
package/dist/index.mjs CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  formatSourceDateFor,
6
6
  isExcelDateFormat,
7
7
  normaliseAggregation
8
- } from "./chunk-HTXZZTFM.mjs";
8
+ } from "./chunk-PHUHGRD3.mjs";
9
9
  import {
10
10
  captureSvgSnapshot,
11
11
  chartSvgOf,
@@ -131,7 +131,7 @@ import {
131
131
  toSourceRows,
132
132
  trackFocus,
133
133
  valuePlacementFlag
134
- } from "./chunk-FJUPWSVN.mjs";
134
+ } from "./chunk-ZBSPEYLK.mjs";
135
135
  import {
136
136
  LASSO_AXES_SLOT,
137
137
  LASSO_COUNT_CLASS,
@@ -232,7 +232,7 @@ import {
232
232
  Ot,
233
233
  l,
234
234
  o
235
- } from "./chunk-BGG4WRQW.mjs";
235
+ } from "./chunk-D45HLIN7.mjs";
236
236
  import {
237
237
  MIN_RAMP_FILLS,
238
238
  SAME_SHADE_DELTA_E,
@@ -8,7 +8,7 @@ import {
8
8
  Nt,
9
9
  W,
10
10
  bt
11
- } from "./chunk-BGG4WRQW.mjs";
11
+ } from "./chunk-D45HLIN7.mjs";
12
12
  import "./chunk-A2GMXZP7.mjs";
13
13
  import "./chunk-GHODWOAL.mjs";
14
14
 
package/dist/react.mjs CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  createChartHost,
13
13
  syncMemberSelection,
14
14
  toSourceRows
15
- } from "./chunk-FJUPWSVN.mjs";
15
+ } from "./chunk-ZBSPEYLK.mjs";
16
16
  import "./chunk-HW3WK7SL.mjs";
17
17
  import "./chunk-4AJYIAAJ.mjs";
18
18
  import "./chunk-HEXJGF42.mjs";
@@ -21,7 +21,7 @@ import {
21
21
  geoFromCache,
22
22
  loadGeo
23
23
  } from "./chunk-LXTW6YII.mjs";
24
- import "./chunk-BGG4WRQW.mjs";
24
+ import "./chunk-D45HLIN7.mjs";
25
25
  import "./chunk-CMZCRLIX.mjs";
26
26
  import "./chunk-A2GMXZP7.mjs";
27
27
  import "./chunk-WK5PLWHT.mjs";
@@ -1,7 +1,7 @@
1
1
  /*! @bicharts/chart-host — Apache-2.0. Bundled reference data: GeoNames (https://www.geonames.org/) CC BY 4.0; Natural Earth and US Census/TIGER (public domain). Full text: NOTICE in this package. */
2
2
  import {
3
3
  K
4
- } from "./chunk-BGG4WRQW.mjs";
4
+ } from "./chunk-D45HLIN7.mjs";
5
5
  import "./chunk-GHODWOAL.mjs";
6
6
 
7
7
  // src/zoomMemory/zoomMemory.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bicharts/chart-host",
3
- "version": "0.6.119",
3
+ "version": "0.6.121",
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",