@flux-ui/statistics 3.2.0-beta.9 → 3.2.1

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/index.js CHANGED
@@ -788,7 +788,11 @@ var Locale = class Locale {
788
788
  }
789
789
  static create(locale, numberingSystem, outputCalendar, weekSettings, defaultToEN = false) {
790
790
  const specifiedLocale = locale || Settings.defaultLocale;
791
- return new Locale(specifiedLocale || (defaultToEN ? "en-US" : systemLocale()), numberingSystem || Settings.defaultNumberingSystem, outputCalendar || Settings.defaultOutputCalendar, validateWeekSettings(weekSettings) || Settings.defaultWeekSettings, specifiedLocale);
791
+ const localeR = specifiedLocale || (defaultToEN ? "en-US" : systemLocale());
792
+ const numberingSystemR = numberingSystem || Settings.defaultNumberingSystem;
793
+ const outputCalendarR = outputCalendar || Settings.defaultOutputCalendar;
794
+ const weekSettingsR = validateWeekSettings(weekSettings) || Settings.defaultWeekSettings;
795
+ return new Locale(localeR, numberingSystemR, outputCalendarR, weekSettingsR, specifiedLocale);
792
796
  }
793
797
  static resetCache() {
794
798
  sysLocaleCache = null;
@@ -6183,7 +6187,7 @@ function friendlyDateTime(dateTimeish) {
6183
6187
  else throw new InvalidArgumentError(`Unknown datetime argument: ${dateTimeish}, of type ${typeof dateTimeish}`);
6184
6188
  }
6185
6189
  //#endregion
6186
- //#region ../../node_modules/.bun/@basmilius+utils@3.45.0+f2ed1ec6a4c7f7fd/node_modules/@basmilius/utils/dist/index.mjs
6190
+ //#region ../../node_modules/.bun/@basmilius+utils@3.50.0+f2ed1ec6a4c7f7fd/node_modules/@basmilius/utils/dist/index.mjs
6187
6191
  function p$3(e, t = 0) {
6188
6192
  let n = typeof navigator < `u` ? navigator.language : `nl-NL`;
6189
6193
  return new Intl.NumberFormat(n, {
@@ -7261,7 +7265,7 @@ var convertLchToLab = ({ l, c, h, alpha }, mode = "lab") => {
7261
7265
  };
7262
7266
  //#endregion
7263
7267
  //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/xyz65/constants.js
7264
- var k$3 = Math.pow(29, 3) / Math.pow(3, 3);
7268
+ var k$4 = Math.pow(29, 3) / Math.pow(3, 3);
7265
7269
  var e$3 = Math.pow(6, 3) / Math.pow(29, 3);
7266
7270
  //#endregion
7267
7271
  //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/constants.js
@@ -7279,7 +7283,7 @@ Math.pow(29, 3) / Math.pow(3, 3);
7279
7283
  Math.pow(6, 3) / Math.pow(29, 3);
7280
7284
  //#endregion
7281
7285
  //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lab65/convertLab65ToXyz65.js
7282
- var fn$2 = (v) => Math.pow(v, 3) > e$3 ? Math.pow(v, 3) : (116 * v - 16) / k$3;
7286
+ var fn$2 = (v) => Math.pow(v, 3) > e$3 ? Math.pow(v, 3) : (116 * v - 16) / k$4;
7283
7287
  var convertLab65ToXyz65 = ({ l, a, b, alpha }) => {
7284
7288
  if (l === void 0) l = 0;
7285
7289
  if (a === void 0) a = 0;
@@ -7301,7 +7305,7 @@ var convertLab65ToXyz65 = ({ l, a, b, alpha }) => {
7301
7305
  var convertLab65ToRgb = (lab) => convertXyz65ToRgb(convertLab65ToXyz65(lab));
7302
7306
  //#endregion
7303
7307
  //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lab65/convertXyz65ToLab65.js
7304
- var f$2 = (value) => value > e$3 ? Math.cbrt(value) : (k$3 * value + 16) / 116;
7308
+ var f$2 = (value) => value > e$3 ? Math.cbrt(value) : (k$4 * value + 16) / 116;
7305
7309
  var convertXyz65ToLab65 = ({ x, y, z, alpha }) => {
7306
7310
  if (x === void 0) x = 0;
7307
7311
  if (y === void 0) y = 0;
@@ -8163,11 +8167,11 @@ var definition$16 = {
8163
8167
  };
8164
8168
  //#endregion
8165
8169
  //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/xyz50/constants.js
8166
- var k$1 = Math.pow(29, 3) / Math.pow(3, 3);
8170
+ var k$2 = Math.pow(29, 3) / Math.pow(3, 3);
8167
8171
  var e$1 = Math.pow(6, 3) / Math.pow(29, 3);
8168
8172
  //#endregion
8169
8173
  //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lab/convertLabToXyz50.js
8170
- var fn$1 = (v) => Math.pow(v, 3) > e$1 ? Math.pow(v, 3) : (116 * v - 16) / k$1;
8174
+ var fn$1 = (v) => Math.pow(v, 3) > e$1 ? Math.pow(v, 3) : (116 * v - 16) / k$2;
8171
8175
  var convertLabToXyz50 = ({ l, a, b, alpha }) => {
8172
8176
  if (l === void 0) l = 0;
8173
8177
  if (a === void 0) a = 0;
@@ -8216,7 +8220,7 @@ var convertRgbToXyz50 = (rgb) => {
8216
8220
  };
8217
8221
  //#endregion
8218
8222
  //#region ../../node_modules/.bun/culori@4.0.2/node_modules/culori/src/lab/convertXyz50ToLab.js
8219
- var f$1 = (value) => value > e$1 ? Math.cbrt(value) : (k$1 * value + 16) / 116;
8223
+ var f$1 = (value) => value > e$1 ? Math.cbrt(value) : (k$2 * value + 16) / 116;
8220
8224
  var convertXyz50ToLab = ({ x, y, z, alpha }) => {
8221
8225
  if (x === void 0) x = 0;
8222
8226
  if (y === void 0) y = 0;
@@ -8422,7 +8426,7 @@ var u_fn$1 = (x, y, z) => 4 * x / (x + 15 * y + 3 * z);
8422
8426
  var v_fn$1 = (x, y, z) => 9 * y / (x + 15 * y + 3 * z);
8423
8427
  var un$2 = u_fn$1(D50.X, D50.Y, D50.Z);
8424
8428
  var vn$2 = v_fn$1(D50.X, D50.Y, D50.Z);
8425
- var l_fn = (value) => value <= e$1 ? k$1 * value : 116 * Math.cbrt(value) - 16;
8429
+ var l_fn = (value) => value <= e$1 ? k$2 * value : 116 * Math.cbrt(value) - 16;
8426
8430
  var convertXyz50ToLuv = ({ x, y, z, alpha }) => {
8427
8431
  if (x === void 0) x = 0;
8428
8432
  if (y === void 0) y = 0;
@@ -8462,7 +8466,7 @@ var convertLuvToXyz50 = ({ l, u, v, alpha }) => {
8462
8466
  if (v === void 0) v = 0;
8463
8467
  let up = u / (13 * l) + un$1;
8464
8468
  let vp = v / (13 * l) + vn$1;
8465
- let y = D50.Y * (l <= 8 ? l / k$1 : Math.pow((l + 16) / 116, 3));
8469
+ let y = D50.Y * (l <= 8 ? l / k$2 : Math.pow((l + 16) / 116, 3));
8466
8470
  let res = {
8467
8471
  mode: "xyz50",
8468
8472
  x: y * (9 * up) / (4 * vp),
@@ -9428,7 +9432,7 @@ useMode(definition$2);
9428
9432
  useMode(definition$1);
9429
9433
  useMode(definition);
9430
9434
  //#endregion
9431
- //#region ../../node_modules/.bun/@basmilius+http-client@3.45.0+66382d5e2ea3742d/node_modules/@basmilius/http-client/dist/index.mjs
9435
+ //#region ../../node_modules/.bun/@basmilius+http-client@3.50.0+2111c3e180df0f85/node_modules/@basmilius/http-client/dist/index.mjs
9432
9436
  function adapter_default(Parent) {
9433
9437
  return class extends Parent {
9434
9438
  constructor(...args) {
@@ -10709,7 +10713,8 @@ function buildBoxPlotTooltip(input) {
10709
10713
  const point = s?.data[dataIndex];
10710
10714
  if (!s || !point) return "";
10711
10715
  const color = palette[seriesIndex % palette.length];
10712
- return renderTooltip(t, styles, [s.name ? t(String(s.name)) : "", point.label ? t(String(point.label)) : ""].filter(Boolean).join(" — "), [
10716
+ const title = [s.name ? t(String(s.name)) : "", point.label ? t(String(point.label)) : ""].filter(Boolean).join(" — ");
10717
+ const items = [
10713
10718
  {
10714
10719
  name: "Min",
10715
10720
  value: point.min,
@@ -10735,7 +10740,8 @@ function buildBoxPlotTooltip(input) {
10735
10740
  value: point.max,
10736
10741
  color
10737
10742
  }
10738
- ]);
10743
+ ];
10744
+ return renderTooltip(t, styles, title, items);
10739
10745
  };
10740
10746
  return { tooltip: {
10741
10747
  show: true,
@@ -10759,7 +10765,8 @@ function buildCandlestickTooltip(input) {
10759
10765
  const positive = resolveChartColor(s.positiveColor) ?? "var(--success-500)";
10760
10766
  const negative = resolveChartColor(s.negativeColor) ?? "var(--danger-500)";
10761
10767
  const color = point.close >= point.open ? positive : negative;
10762
- return renderTooltip(t, styles, [s.name ? t(String(s.name)) : "", point.label ? t(String(point.label)) : ""].filter(Boolean).join(" — "), [
10768
+ const title = [s.name ? t(String(s.name)) : "", point.label ? t(String(point.label)) : ""].filter(Boolean).join(" — ");
10769
+ const items = [
10763
10770
  {
10764
10771
  name: "Open",
10765
10772
  value: point.open,
@@ -10780,7 +10787,8 @@ function buildCandlestickTooltip(input) {
10780
10787
  value: point.high,
10781
10788
  color
10782
10789
  }
10783
- ]);
10790
+ ];
10791
+ return renderTooltip(t, styles, title, items);
10784
10792
  };
10785
10793
  return { tooltip: {
10786
10794
  show: true,
@@ -10826,12 +10834,14 @@ function buildGaugeTooltip(input) {
10826
10834
  const s = series[seriesIndex];
10827
10835
  if (!s) return "";
10828
10836
  const color = palette[seriesIndex % palette.length];
10829
- return renderTooltip(t, styles, s.name ? t(String(s.name)) : "", [{
10837
+ const title = s.name ? t(String(s.name)) : "";
10838
+ const items = [{
10830
10839
  name: "",
10831
10840
  value: s.value,
10832
10841
  color,
10833
10842
  icon: s.icon
10834
- }]);
10843
+ }];
10844
+ return renderTooltip(t, styles, title, items);
10835
10845
  };
10836
10846
  return { tooltip: {
10837
10847
  show: true,
@@ -10852,11 +10862,13 @@ function buildHeatmapTooltip(input) {
10852
10862
  const s = series[seriesIndex];
10853
10863
  const point = s?.data[dataIndex];
10854
10864
  if (!s || !point) return "";
10855
- return renderTooltip(t, styles, [s.name ? t(String(s.name)) : "", `${t(String(point.x))} · ${t(String(point.y))}`].filter(Boolean).join(" — "), [{
10865
+ const title = [s.name ? t(String(s.name)) : "", `${t(String(point.x))} · ${t(String(point.y))}`].filter(Boolean).join(" — ");
10866
+ const items = [{
10856
10867
  name: "",
10857
10868
  value: point.formatted ?? point.value,
10858
10869
  color: "var(--primary-600)"
10859
- }]);
10870
+ }];
10871
+ return renderTooltip(t, styles, title, items);
10860
10872
  };
10861
10873
  return { tooltip: {
10862
10874
  show: true,
@@ -10878,11 +10890,13 @@ function buildRadarTooltip(input) {
10878
10890
  const ring = series[ringIndex];
10879
10891
  if (!ring) return "";
10880
10892
  const color = palette[ringIndex % palette.length];
10881
- return renderTooltip(t, styles, ring.name ? t(String(ring.name)) : "", indicators.map((indicator, idx) => ({
10893
+ const title = ring.name ? t(String(ring.name)) : "";
10894
+ const items = indicators.map((indicator, idx) => ({
10882
10895
  name: indicator.name,
10883
10896
  value: ring.values[idx] ?? "",
10884
10897
  color
10885
- })));
10898
+ }));
10899
+ return renderTooltip(t, styles, title, items);
10886
10900
  };
10887
10901
  return { tooltip: {
10888
10902
  show: true,
@@ -10900,7 +10914,8 @@ function buildSharedItemTooltip(input) {
10900
10914
  const items = getItems();
10901
10915
  const activeIndex = param.dataIndex ?? -1;
10902
10916
  const rawTitle = getTitle?.() ?? "";
10903
- return renderTooltip(t, styles, rawTitle ? t(String(rawTitle)) : "", items, activeIndex, valueFormatter);
10917
+ const title = rawTitle ? t(String(rawTitle)) : "";
10918
+ return renderTooltip(t, styles, title, items, activeIndex, valueFormatter);
10904
10919
  };
10905
10920
  return { tooltip: {
10906
10921
  show: true,
@@ -10918,11 +10933,13 @@ function buildTreemapTooltip(input) {
10918
10933
  const data = param.data;
10919
10934
  if (!data) return "";
10920
10935
  const color = data.itemStyle?.color ?? param.color ?? "var(--primary-600)";
10921
- return renderTooltip(t, styles, data.name ? t(String(data.name)) : "", [{
10936
+ const title = data.name ? t(String(data.name)) : "";
10937
+ const items = [{
10922
10938
  name: "",
10923
10939
  value: data.value ?? "",
10924
10940
  color
10925
- }]);
10941
+ }];
10942
+ return renderTooltip(t, styles, title, items);
10926
10943
  };
10927
10944
  return { tooltip: {
10928
10945
  show: true,