@bicharts/chart-host 0.6.65 → 0.6.69

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.
@@ -1107,7 +1107,16 @@ function resolveOptions(p4) {
1107
1107
  // blank must arrive as ABSENT, not as an empty string, because the chart's fallback is
1108
1108
  // `options.cardBackgroundColor || <its own choice>` and "" would satisfy a truthiness
1109
1109
  // test in some hands while painting nothing in others.
1110
- cardBackgroundColor: p4.cardBackgroundColor || void 0
1110
+ cardBackgroundColor: p4.cardBackgroundColor || void 0,
1111
+ // A reader's on / off, or UNSET - never filled with false, for the flipIntervalMs reason: the
1112
+ // default is the chart's (on only where its request asked for drop lines), and a host that
1113
+ // turned unset into false would make that default unreachable. Pane choices arrive as text.
1114
+ hoverDropLines: (() => {
1115
+ const v = p4.hoverDropLines;
1116
+ if (typeof v === "boolean") return v;
1117
+ const s2 = v == null ? "" : String(v).trim().toLowerCase();
1118
+ return s2 === "on" || s2 === "true" || s2 === "1" ? true : s2 === "off" || s2 === "false" || s2 === "0" ? false : void 0;
1119
+ })()
1111
1120
  };
1112
1121
  }
1113
1122
 
@@ -1969,17 +1978,17 @@ function Yn3(t, e, n, o4, u4) {
1969
1978
  for (let d2 of b4) {
1970
1979
  let S2 = y2(d2);
1971
1980
  if (A2(S2)) continue;
1972
- let _4 = z2(S2);
1973
- if (_4 < 95) continue;
1981
+ let P4 = z2(S2);
1982
+ if (P4 < 95) continue;
1974
1983
  let H2 = ee3(S2, (D2) => !!t3(D2)), Ne = ee3(S2, (D2) => !!t3(D2) && !ce3(D2, o4));
1975
- H2 < Z3 && Ne < 1 || (!s2 || _4 > s2.pct) && (s2 = { name: d2, pct: _4 });
1984
+ H2 < Z3 && Ne < 1 || (!s2 || P4 > s2.pct) && (s2 = { name: d2, pct: P4 });
1976
1985
  }
1977
1986
  s2 && (i.state = s2.name, p4.add(s2.name), l2.push(`state=${s2.name} (${s2.pct}% states/provinces)`));
1978
1987
  }
1979
1988
  if (!i.zip) for (let s2 of b4) {
1980
1989
  if (p4.has(s2)) continue;
1981
1990
  let d2 = y2(s2), S2 = re2(d2);
1982
- if (!(S2 < 95) && de(d2, s2) && !(jn(d2, (_4) => r3(_4).length > 0) < Z3)) {
1991
+ if (!(S2 < 95) && de(d2, s2) && !(jn(d2, (P4) => r3(P4).length > 0) < Z3)) {
1983
1992
  i.zip = s2, p4.add(s2), l2.push(`zip=${s2} (${S2}% ZIP codes)`);
1984
1993
  break;
1985
1994
  }
@@ -1998,12 +2007,12 @@ function Yn3(t, e, n, o4, u4) {
1998
2007
  let s2 = null;
1999
2008
  for (let d2 of b4) {
2000
2009
  if (p4.has(d2)) continue;
2001
- let S2 = y2(d2), _4 = Bn2(S2, o4);
2002
- _4 < D3 || ee3(S2, (H2) => j3(H2, o4)) < Z3 || (!s2 || _4 > s2.pct) && (s2 = { name: d2, pct: _4 });
2010
+ let S2 = y2(d2), P4 = Bn2(S2, o4);
2011
+ P4 < D3 || ee3(S2, (H2) => j3(H2, o4)) < Z3 || (!s2 || P4 > s2.pct) && (s2 = { name: d2, pct: P4 });
2003
2012
  }
2004
2013
  s2 && (i.city = s2.name, l2.push(`city=${s2.name} (${s2.pct}% known cities)`));
2005
2014
  }
2006
- let L4 = i.country ? y2(i.country) : [], R4 = !!i.country && A2(L4), M2 = R4 ? new Set(L4.map((s2) => k(s2 == null ? null : String(s2))).filter(Boolean)).size : 0, x3 = R4 && M2 >= 2, w3 = !!(i.lat && i.lon) && e.some((s2) => {
2015
+ let v = i.country ? y2(i.country) : [], R4 = !!i.country && A2(v), L4 = R4 ? new Set(v.map((s2) => k(s2 == null ? null : String(s2))).filter(Boolean)).size : 0, x3 = R4 && L4 >= 2, w3 = !!(i.lat && i.lon) && e.some((s2) => {
2007
2016
  let d2 = +String(s2[i.lat] ?? "").trim(), S2 = +String(s2[i.lon] ?? "").trim();
2008
2017
  return isFinite(d2) && isFinite(S2) && d2 >= -90 && d2 <= 90 && S2 >= -180 && S2 <= 180 && String(s2[i.lat] ?? "").trim() !== "" && String(s2[i.lon] ?? "").trim() !== "";
2009
2018
  });
@@ -2013,9 +2022,9 @@ var r = (t, ...e) => ({ part: t, langs: Object.freeze(e) });
2013
2022
  var ie2 = Object.freeze({ jaar: r("year", "nl"), kwartaal: r("quarter", "nl"), maand: r("month", "nl"), dag: r("day", "nl", "sv", "da", "nb"), jahr: r("year", "de"), quartal: r("quarter", "de"), monat: r("month", "de"), tag: r("day", "de"), ann\u00E9e: r("year", "fr"), mois: r("month", "fr"), jour: r("day", "fr"), trimestre: r("quarter", "fr", "es", "pt", "it"), a\u00F1o: r("year", "es"), mes: r("month", "es"), d\u00EDa: r("day", "es"), ano: r("year", "pt"), m\u00EAs: r("month", "pt"), dia: r("day", "pt"), anno: r("year", "it"), mese: r("month", "it"), giorno: r("day", "it"), \u0433\u043E\u0434: r("year", "ru"), \u043C\u0435\u0441\u044F\u0446: r("month", "ru"), \u0440\u0456\u043A: r("year", "uk"), \u043C\u0456\u0441\u044F\u0446\u044C: r("month", "uk"), \u043A\u0432\u0430\u0440\u0442\u0430\u043B: r("quarter", "ru", "uk"), \u0434\u0435\u043D\u044C: r("day", "ru", "uk"), rok: r("year", "pl", "cs", "sk"), kwarta\u0142: r("quarter", "pl"), miesi\u0105c: r("month", "pl"), dzie\u0144: r("day", "pl"), \u010Dtvrtlet\u00ED: r("quarter", "cs"), m\u011Bs\u00EDc: r("month", "cs"), den: r("day", "cs"), \u0161tvr\u0165rok: r("quarter", "sk"), mesiac: r("month", "sk"), de\u0148: r("day", "sk"), \u00E5r: r("year", "sv", "da", "nb"), kvartal: r("quarter", "sv", "da", "nb"), m\u00E5nad: r("month", "sv"), m\u00E5ned: r("month", "da", "nb"), vuosi: r("year", "fi"), vuosinelj\u00E4nnes: r("quarter", "fi"), kuukausi: r("month", "fi"), p\u00E4iv\u00E4: r("day", "fi"), \u00E9v: r("year", "hu"), negyed\u00E9v: r("quarter", "hu"), h\u00F3nap: r("month", "hu"), nap: r("day", "hu"), y\u0131l: r("year", "tr"), \u00E7eyrek: r("quarter", "tr"), ay: r("month", "tr"), g\u00FCn: r("day", "tr"), \u03AD\u03C4\u03BF\u03C2: r("year", "el"), \u03C4\u03C1\u03AF\u03BC\u03B7\u03BD\u03BF: r("quarter", "el"), \u03BC\u03AE\u03BD\u03B1\u03C2: r("month", "el"), \u03B7\u03BC\u03AD\u03C1\u03B1: r("day", "el"), an: r("year", "ro"), trimestru: r("quarter", "ro"), lun\u0103: r("month", "ro"), zi: r("day", "ro"), godina: r("year", "hr"), tromjese\u010Dje: r("quarter", "hr"), mjesec: r("month", "hr"), dan: r("day", "hr"), \u5E74: r("year", "ja", "zh"), \u56DB\u534A\u671F: r("quarter", "ja"), \u5B63\u5EA6: r("quarter", "zh"), \u6708: r("month", "ja", "zh"), \u65E5: r("day", "ja", "zh"), \uC5F0\uB3C4: r("year", "ko"), \uBD84\uAE30: r("quarter", "ko"), \uC6D4: r("month", "ko"), \uC77C: r("day", "ko"), tahun: r("year", "id"), kuartal: r("quarter", "id"), triwulan: r("quarter", "id"), bulan: r("month", "id"), hari: r("day", "id"), n\u0103m: r("year", "vi"), qu\u00FD: r("quarter", "vi"), th\u00E1ng: r("month", "vi"), ng\u00E0y: r("day", "vi"), \u0E1B\u0E35: r("year", "th"), \u0E44\u0E15\u0E23\u0E21\u0E32\u0E2A: r("quarter", "th"), \u0E40\u0E14\u0E37\u0E2D\u0E19: r("month", "th"), \u0E27\u0E31\u0E19: r("day", "th"), \u0627\u0644\u0633\u0646\u0629: r("year", "ar"), \u0633\u0646\u0629: r("year", "ar"), \u0627\u0644\u0639\u0627\u0645: r("year", "ar"), \u0639\u0627\u0645: r("year", "ar"), \u0627\u0644\u0631\u0628\u0639: r("quarter", "ar"), \u0631\u0628\u0639: r("quarter", "ar"), "\u0631\u0628\u0639 \u0627\u0644\u0633\u0646\u0629": r("quarter", "ar"), \u0627\u0644\u0634\u0647\u0631: r("month", "ar"), \u0634\u0647\u0631: r("month", "ar"), \u0627\u0644\u064A\u0648\u0645: r("day", "ar"), \u064A\u0648\u0645: r("day", "ar"), \u05E9\u05E0\u05D4: r("year", "he"), \u05E8\u05D1\u05E2\u05D5\u05DF: r("quarter", "he"), \u05D7\u05D5\u05D3\u05E9: r("month", "he"), \u05D9\u05D5\u05DD: r("day", "he"), \u0935\u0930\u094D\u0937: r("year", "hi"), \u0938\u093E\u0932: r("year", "hi"), \u0924\u093F\u092E\u093E\u0939\u0940: r("quarter", "hi"), \u092E\u0939\u0940\u0928\u093E: r("month", "hi"), \u092E\u093E\u0939: r("month", "hi"), \u0926\u093F\u0928: r("day", "hi"), \u0633\u0627\u0644: r("year", "fa"), \u0645\u0627\u0647: r("month", "fa"), \u0631\u0648\u0632: r("day", "fa") });
2014
2023
  var Qn2 = Object.freeze(Array.from(new Set(Object.values(ie2).flatMap((t) => t.langs))));
2015
2024
  var fe = Object.freeze(["fa", "ar", "he", "th"]);
2016
- var Rr = Object.freeze({ integer: "number", decimal: "number", double: "number", datetime: "date", date: "date", boolean: "boolean", string: "text" });
2017
- var Or = Object.freeze({ RENDER_START: "render-start", RENDER_OK: "render-ok", RENDER_ERROR: "render-error", VIEW: "view", VIEW_VERDICT: "view-verdict" });
2018
- var Me = 2 ** 31 - 1;
2025
+ var wr = Object.freeze({ integer: "number", decimal: "number", double: "number", datetime: "date", date: "date", boolean: "boolean", string: "text" });
2026
+ var Nr = Object.freeze({ RENDER_START: "render-start", RENDER_OK: "render-ok", RENDER_ERROR: "render-error", VIEW: "view", VIEW_VERDICT: "view-verdict" });
2027
+ var Le = 2 ** 31 - 1;
2019
2028
 
2020
2029
  // src/payload.ts
2021
2030
  var ROW_IDX_COLUMN = "__rowIdx__";
package/dist/index.mjs CHANGED
@@ -122,7 +122,7 @@ import {
122
122
  toSourceRows,
123
123
  unpinScrolledAxis,
124
124
  valuePlacementFlag
125
- } from "./chunk-3FNHUWNV.mjs";
125
+ } from "./chunk-KBFJTRYA.mjs";
126
126
  import "./chunk-A2GMXZP7.mjs";
127
127
  import {
128
128
  ACTIVE_TICK_CLASS,
@@ -212,6 +212,11 @@ var OPTIONS_VOCABULARY = Object.freeze({
212
212
  flipIntervalMs: entry({ timing: "live", default: "", min: 0, max: FLIP_INTERVAL_MAX_MS }),
213
213
  /** Which way a face turns, for any chart that turns between faces: side to side, or top to bottom. */
214
214
  flipDirection: entry({ timing: "live", default: FLIP_DIRECTION_DEFAULT, values: ["horizontal", "vertical"] }),
215
+ /**
216
+ * Hover drop lines on a 3D chart. BLANK - "the chart's own" - is the default: off, unless the request
217
+ * that made the chart asked for them. "on" / "off" is a reader's choice and wins either way.
218
+ */
219
+ hoverDropLines: entry({ timing: "live", default: "", values: ["", "on", "off"] }),
215
220
  // ---- the next generated chart ----
216
221
  levelOfDetail: entry({ timing: "next-generate", default: "", values: ["", "High", "Medium", "Low"], wire: "clientHints" }),
217
222
  favorLimitTo: entry({ timing: "next-generate", default: "", values: ["", "latest", "top / greatest", "bottom / smallest", "most common", "outliers"], wire: "clientHints" }),
package/dist/react.mjs CHANGED
@@ -22,7 +22,7 @@ import {
22
22
  loadGeo,
23
23
  syncMemberSelection,
24
24
  toSourceRows
25
- } from "./chunk-3FNHUWNV.mjs";
25
+ } from "./chunk-KBFJTRYA.mjs";
26
26
  import "./chunk-A2GMXZP7.mjs";
27
27
  import "./chunk-WNGJUPEI.mjs";
28
28
  import "./chunk-GHODWOAL.mjs";
@@ -151,6 +151,7 @@ export interface RenderOptions {
151
151
  flipIntervalMs?: number;
152
152
  flipMode?: FlipMode;
153
153
  flipDirection?: FlipDirection;
154
+ hoverDropLines?: boolean;
154
155
  cardBackgroundColor?: string;
155
156
  onSelect?: (rowIdxs: number[]) => void;
156
157
  /**
@@ -60,6 +60,11 @@ export declare const OPTIONS_VOCABULARY: Readonly<{
60
60
  flipIntervalMs: OptionVocabularyEntry;
61
61
  /** Which way a face turns, for any chart that turns between faces: side to side, or top to bottom. */
62
62
  flipDirection: OptionVocabularyEntry;
63
+ /**
64
+ * Hover drop lines on a 3D chart. BLANK - "the chart's own" - is the default: off, unless the request
65
+ * that made the chart asked for them. "on" / "off" is a reader's choice and wins either way.
66
+ */
67
+ hoverDropLines: OptionVocabularyEntry;
63
68
  levelOfDetail: OptionVocabularyEntry;
64
69
  favorLimitTo: OptionVocabularyEntry;
65
70
  /** 0 asks for no limit, and travels as absent (`wireLimitCount`): any value the server receives is a limit. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bicharts/chart-host",
3
- "version": "0.6.65",
3
+ "version": "0.6.69",
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",