@mui/x-charts-vendor 8.25.0 → 9.0.0-alpha.0

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.
@@ -1,4 +1,4 @@
1
- Copyright 2010-2021 Mike Bostock
1
+ Copyright 2010-2026 Mike Bostock
2
2
 
3
3
  Permission to use, copy, modify, and/or distribute this software for any purpose
4
4
  with or without fee is hereby granted, provided that the above copyright notice
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
 
3
- // https://d3js.org/d3-format/ v3.1.0 Copyright 2010-2021 Mike Bostock
3
+ // https://d3js.org/d3-format/ v3.1.2 Copyright 2010-2026 Mike Bostock
4
4
  (function (global, factory) {
5
5
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.d3 = global.d3 || {}));
6
6
  })(this, function (exports) {
@@ -14,8 +14,8 @@
14
14
  // significant digits p, where x is positive and p is in [1, 21] or undefined.
15
15
  // For example, formatDecimalParts(1.23) returns ["123", 0].
16
16
  function formatDecimalParts(x, p) {
17
- if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf("e")) < 0) return null; // NaN, ±Infinity
18
- var i,
17
+ if (!isFinite(x) || x === 0) return null; // NaN, ±Infinity, ±0
18
+ var i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf("e"),
19
19
  coefficient = x.slice(0, i);
20
20
 
21
21
  // The string returned by toExponential either has the form \d\.\d+e[-+]\d+
@@ -107,7 +107,7 @@
107
107
  var prefixExponent;
108
108
  function formatPrefixAuto(x, p) {
109
109
  var d = formatDecimalParts(x, p);
110
- if (!d) return x + "";
110
+ if (!d) return prefixExponent = undefined, x.toPrecision(p);
111
111
  var coefficient = d[0],
112
112
  exponent = d[1],
113
113
  i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,
@@ -150,7 +150,7 @@
150
150
  percent = locale.percent === undefined ? "%" : locale.percent + "",
151
151
  minus = locale.minus === undefined ? "−" : locale.minus + "",
152
152
  nan = locale.nan === undefined ? "NaN" : locale.nan + "";
153
- function newFormat(specifier) {
153
+ function newFormat(specifier, options) {
154
154
  specifier = formatSpecifier(specifier);
155
155
  var fill = specifier.fill,
156
156
  align = specifier.align,
@@ -174,8 +174,8 @@
174
174
 
175
175
  // Compute the prefix and suffix.
176
176
  // For SI-prefix, the suffix is lazily computed.
177
- var prefix = symbol === "$" ? currencyPrefix : symbol === "#" && /[boxX]/.test(type) ? "0" + type.toLowerCase() : "",
178
- suffix = symbol === "$" ? currencySuffix : /[%p]/.test(type) ? percent : "";
177
+ var prefix = (options && options.prefix !== undefined ? options.prefix : "") + (symbol === "$" ? currencyPrefix : symbol === "#" && /[boxX]/.test(type) ? "0" + type.toLowerCase() : ""),
178
+ suffix = (symbol === "$" ? currencySuffix : /[%p]/.test(type) ? percent : "") + (options && options.suffix !== undefined ? options.suffix : "");
179
179
 
180
180
  // What format function should we use?
181
181
  // Is this an integer type?
@@ -214,7 +214,7 @@
214
214
 
215
215
  // Compute the prefix and suffix.
216
216
  valuePrefix = (valueNegative ? sign === "(" ? sign : minus : sign === "-" || sign === "(" ? "" : sign) + valuePrefix;
217
- valueSuffix = (type === "s" ? prefixes[8 + prefixExponent / 3] : "") + valueSuffix + (valueNegative && sign === "(" ? ")" : "");
217
+ valueSuffix = (type === "s" && !isNaN(value) && prefixExponent !== undefined ? prefixes[8 + prefixExponent / 3] : "") + valueSuffix + (valueNegative && sign === "(" ? ")" : "");
218
218
 
219
219
  // Break the formatted value into the integer “value” part that can be
220
220
  // grouped, and fractional or exponential “suffix” part that is not.
@@ -263,12 +263,13 @@
263
263
  return format;
264
264
  }
265
265
  function formatPrefix(specifier, value) {
266
- var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = "f", specifier)),
267
- e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3,
266
+ var e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3,
268
267
  k = Math.pow(10, -e),
269
- prefix = prefixes[8 + e / 3];
268
+ f = newFormat((specifier = formatSpecifier(specifier), specifier.type = "f", specifier), {
269
+ suffix: prefixes[8 + e / 3]
270
+ });
270
271
  return function (value) {
271
- return f(k * value) + prefix;
272
+ return f(k * value);
272
273
  };
273
274
  }
274
275
  return {
@@ -307,7 +308,4 @@
307
308
  exports.precisionFixed = precisionFixed;
308
309
  exports.precisionPrefix = precisionPrefix;
309
310
  exports.precisionRound = precisionRound;
310
- Object.defineProperty(exports, '__esModule', {
311
- value: true
312
- });
313
311
  });
@@ -1,14 +1,14 @@
1
1
  "use strict";
2
2
 
3
- // https://d3js.org/d3-format/ v3.1.0 Copyright 2010-2021 Mike Bostock
3
+ // https://d3js.org/d3-format/ v3.1.2 Copyright 2010-2026 Mike Bostock
4
4
  !function (t, i) {
5
5
  "object" == typeof exports && "undefined" != typeof module ? i(exports) : "function" == typeof define && define.amd ? define(["exports"], i) : i((t = "undefined" != typeof globalThis ? globalThis : t || self).d3 = t.d3 || {});
6
6
  }(this, function (t) {
7
7
  "use strict";
8
8
 
9
9
  function i(t, i) {
10
- if ((r = (t = i ? t.toExponential(i - 1) : t.toExponential()).indexOf("e")) < 0) return null;
11
- var r,
10
+ if (!isFinite(t) || 0 === t) return null;
11
+ var r = (t = i ? t.toExponential(i - 1) : t.toExponential()).indexOf("e"),
12
12
  n = t.slice(0, r);
13
13
  return [n.length > 1 ? n[0] + n.slice(2) : n, +t.slice(r + 1)];
14
14
  }
@@ -61,7 +61,7 @@
61
61
  r: s,
62
62
  s: function (t, r) {
63
63
  var e = i(t, r);
64
- if (!e) return t + "";
64
+ if (!e) return n = void 0, t.toPrecision(r);
65
65
  var o = e[0],
66
66
  a = e[1],
67
67
  s = a - (n = 3 * Math.max(-8, Math.min(8, Math.floor(a / 3)))) + 1,
@@ -71,57 +71,57 @@
71
71
  X: t => Math.round(t).toString(16).toUpperCase(),
72
72
  x: t => Math.round(t).toString(16)
73
73
  };
74
- function h(t) {
74
+ function f(t) {
75
75
  return t;
76
76
  }
77
- var l,
78
- u = Array.prototype.map,
79
- f = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
77
+ var u,
78
+ h = Array.prototype.map,
79
+ l = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
80
80
  function d(t) {
81
81
  var i,
82
82
  e,
83
- a = void 0 === t.grouping || void 0 === t.thousands ? h : (i = u.call(t.grouping, Number), e = t.thousands + "", function (t, r) {
83
+ a = void 0 === t.grouping || void 0 === t.thousands ? f : (i = h.call(t.grouping, Number), e = t.thousands + "", function (t, r) {
84
84
  for (var n = t.length, o = [], a = 0, s = i[0], c = 0; n > 0 && s > 0 && (c + s + 1 > r && (s = Math.max(1, r - c)), o.push(t.substring(n -= s, n + s)), !((c += s + 1) > r));) s = i[a = (a + 1) % i.length];
85
85
  return o.reverse().join(e);
86
86
  }),
87
87
  s = void 0 === t.currency ? "" : t.currency[0] + "",
88
- l = void 0 === t.currency ? "" : t.currency[1] + "",
88
+ u = void 0 === t.currency ? "" : t.currency[1] + "",
89
89
  d = void 0 === t.decimal ? "." : t.decimal + "",
90
- m = void 0 === t.numerals ? h : function (t) {
90
+ m = void 0 === t.numerals ? f : function (t) {
91
91
  return function (i) {
92
92
  return i.replace(/[0-9]/g, function (i) {
93
93
  return t[+i];
94
94
  });
95
95
  };
96
- }(u.call(t.numerals, String)),
96
+ }(h.call(t.numerals, String)),
97
97
  p = void 0 === t.percent ? "%" : t.percent + "",
98
98
  g = void 0 === t.minus ? "−" : t.minus + "",
99
99
  v = void 0 === t.nan ? "NaN" : t.nan + "";
100
- function M(t) {
101
- var i = (t = o(t)).fill,
102
- r = t.align,
103
- e = t.sign,
100
+ function x(t, i) {
101
+ var r = (t = o(t)).fill,
102
+ e = t.align,
103
+ f = t.sign,
104
104
  h = t.symbol,
105
- u = t.zero,
105
+ x = t.zero,
106
106
  M = t.width,
107
107
  y = t.comma,
108
- x = t.precision,
109
- b = t.trim,
110
- w = t.type;
111
- "n" === w ? (y = !0, w = "g") : c[w] || (void 0 === x && (x = 12), b = !0, w = "g"), (u || "0" === i && "=" === r) && (u = !0, i = "0", r = "=");
112
- var S = "$" === h ? s : "#" === h && /[boxX]/.test(w) ? "0" + w.toLowerCase() : "",
113
- j = "$" === h ? l : /[%p]/.test(w) ? p : "",
114
- k = c[w],
115
- P = /[defgprs%]/.test(w);
108
+ b = t.precision,
109
+ w = t.trim,
110
+ S = t.type;
111
+ "n" === S ? (y = !0, S = "g") : c[S] || (void 0 === b && (b = 12), w = !0, S = "g"), (x || "0" === r && "=" === e) && (x = !0, r = "0", e = "=");
112
+ var N = (i && void 0 !== i.prefix ? i.prefix : "") + ("$" === h ? s : "#" === h && /[boxX]/.test(S) ? "0" + S.toLowerCase() : ""),
113
+ k = ("$" === h ? u : /[%p]/.test(S) ? p : "") + (i && void 0 !== i.suffix ? i.suffix : ""),
114
+ P = c[S],
115
+ j = /[defgprs%]/.test(S);
116
116
  function z(t) {
117
- var o,
117
+ var i,
118
+ o,
118
119
  s,
119
- c,
120
- h = S,
121
- l = j;
122
- if ("c" === w) l = k(t) + l, t = "";else {
123
- var p = (t = +t) < 0 || 1 / t < 0;
124
- if (t = isNaN(t) ? v : k(Math.abs(t), x), b && (t = function (t) {
120
+ c = N,
121
+ u = k;
122
+ if ("c" === S) u = P(t) + u, t = "";else {
123
+ var h = (t = +t) < 0 || 1 / t < 0;
124
+ if (t = isNaN(t) ? v : P(Math.abs(t), b), w && (t = function (t) {
125
125
  t: for (var i, r = t.length, n = 1, e = -1; n < r; ++n) switch (t[n]) {
126
126
  case ".":
127
127
  e = i = n;
@@ -134,48 +134,49 @@
134
134
  e > 0 && (e = 0);
135
135
  }
136
136
  return e > 0 ? t.slice(0, e) + t.slice(i + 1) : t;
137
- }(t)), p && 0 == +t && "+" !== e && (p = !1), h = (p ? "(" === e ? e : g : "-" === e || "(" === e ? "" : e) + h, l = ("s" === w ? f[8 + n / 3] : "") + l + (p && "(" === e ? ")" : ""), P) for (o = -1, s = t.length; ++o < s;) if (48 > (c = t.charCodeAt(o)) || c > 57) {
138
- l = (46 === c ? d + t.slice(o + 1) : t.slice(o)) + l, t = t.slice(0, o);
137
+ }(t)), h && 0 === +t && "+" !== f && (h = !1), c = (h ? "(" === f ? f : g : "-" === f || "(" === f ? "" : f) + c, u = ("s" !== S || isNaN(t) || void 0 === n ? "" : l[8 + n / 3]) + u + (h && "(" === f ? ")" : ""), j) for (i = -1, o = t.length; ++i < o;) if (48 > (s = t.charCodeAt(i)) || s > 57) {
138
+ u = (46 === s ? d + t.slice(i + 1) : t.slice(i)) + u, t = t.slice(0, i);
139
139
  break;
140
140
  }
141
141
  }
142
- y && !u && (t = a(t, 1 / 0));
143
- var z = h.length + t.length + l.length,
144
- A = z < M ? new Array(M - z + 1).join(i) : "";
145
- switch (y && u && (t = a(A + t, A.length ? M - l.length : 1 / 0), A = ""), r) {
142
+ y && !x && (t = a(t, 1 / 0));
143
+ var p = c.length + t.length + u.length,
144
+ z = p < M ? new Array(M - p + 1).join(r) : "";
145
+ switch (y && x && (t = a(z + t, z.length ? M - u.length : 1 / 0), z = ""), e) {
146
146
  case "<":
147
- t = h + t + l + A;
147
+ t = c + t + u + z;
148
148
  break;
149
149
  case "=":
150
- t = h + A + t + l;
150
+ t = c + z + t + u;
151
151
  break;
152
152
  case "^":
153
- t = A.slice(0, z = A.length >> 1) + h + t + l + A.slice(z);
153
+ t = z.slice(0, p = z.length >> 1) + c + t + u + z.slice(p);
154
154
  break;
155
155
  default:
156
- t = A + h + t + l;
156
+ t = z + c + t + u;
157
157
  }
158
158
  return m(t);
159
159
  }
160
- return x = void 0 === x ? 6 : /[gprs]/.test(w) ? Math.max(1, Math.min(21, x)) : Math.max(0, Math.min(20, x)), z.toString = function () {
160
+ return b = void 0 === b ? 6 : /[gprs]/.test(S) ? Math.max(1, Math.min(21, b)) : Math.max(0, Math.min(20, b)), z.toString = function () {
161
161
  return t + "";
162
162
  }, z;
163
163
  }
164
164
  return {
165
- format: M,
165
+ format: x,
166
166
  formatPrefix: function (t, i) {
167
- var n = M(((t = o(t)).type = "f", t)),
168
- e = 3 * Math.max(-8, Math.min(8, Math.floor(r(i) / 3))),
169
- a = Math.pow(10, -e),
170
- s = f[8 + e / 3];
167
+ var n = 3 * Math.max(-8, Math.min(8, Math.floor(r(i) / 3))),
168
+ e = Math.pow(10, -n),
169
+ a = x(((t = o(t)).type = "f", t), {
170
+ suffix: l[8 + n / 3]
171
+ });
171
172
  return function (t) {
172
- return n(a * t) + s;
173
+ return a(e * t);
173
174
  };
174
175
  }
175
176
  };
176
177
  }
177
178
  function m(i) {
178
- return l = d(i), t.format = l.format, t.formatPrefix = l.formatPrefix, l;
179
+ return u = d(i), t.format = u.format, t.formatPrefix = u.formatPrefix, u;
179
180
  }
180
181
  t.format = void 0, t.formatPrefix = void 0, m({
181
182
  thousands: ",",
@@ -187,7 +188,5 @@
187
188
  return Math.max(0, 3 * Math.max(-8, Math.min(8, Math.floor(r(i) / 3))) - r(Math.abs(t)));
188
189
  }, t.precisionRound = function (t, i) {
189
190
  return t = Math.abs(t), i = Math.abs(i) - t, Math.max(0, r(i) - r(t)) + 1;
190
- }, Object.defineProperty(t, "__esModule", {
191
- value: !0
192
- });
191
+ };
193
192
  });
@@ -13,8 +13,8 @@ function _default(x) {
13
13
  // significant digits p, where x is positive and p is in [1, 21] or undefined.
14
14
  // For example, formatDecimalParts(1.23) returns ["123", 0].
15
15
  function formatDecimalParts(x, p) {
16
- if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf("e")) < 0) return null; // NaN, ±Infinity
17
- var i,
16
+ if (!isFinite(x) || x === 0) return null; // NaN, ±Infinity, ±0
17
+ var i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf("e"),
18
18
  coefficient = x.slice(0, i);
19
19
 
20
20
  // The string returned by toExponential either has the form \d\.\d+e[-+]\d+
@@ -9,7 +9,7 @@ var _formatDecimal = require("./formatDecimal.js");
9
9
  var prefixExponent;
10
10
  function _default(x, p) {
11
11
  var d = (0, _formatDecimal.formatDecimalParts)(x, p);
12
- if (!d) return x + "";
12
+ if (!d) return exports.prefixExponent = prefixExponent = undefined, x.toPrecision(p);
13
13
  var coefficient = d[0],
14
14
  exponent = d[1],
15
15
  i = exponent - (exports.prefixExponent = prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,
@@ -24,7 +24,7 @@ function _default(locale) {
24
24
  percent = locale.percent === undefined ? "%" : locale.percent + "",
25
25
  minus = locale.minus === undefined ? "−" : locale.minus + "",
26
26
  nan = locale.nan === undefined ? "NaN" : locale.nan + "";
27
- function newFormat(specifier) {
27
+ function newFormat(specifier, options) {
28
28
  specifier = (0, _formatSpecifier.default)(specifier);
29
29
  var fill = specifier.fill,
30
30
  align = specifier.align,
@@ -48,8 +48,8 @@ function _default(locale) {
48
48
 
49
49
  // Compute the prefix and suffix.
50
50
  // For SI-prefix, the suffix is lazily computed.
51
- var prefix = symbol === "$" ? currencyPrefix : symbol === "#" && /[boxX]/.test(type) ? "0" + type.toLowerCase() : "",
52
- suffix = symbol === "$" ? currencySuffix : /[%p]/.test(type) ? percent : "";
51
+ var prefix = (options && options.prefix !== undefined ? options.prefix : "") + (symbol === "$" ? currencyPrefix : symbol === "#" && /[boxX]/.test(type) ? "0" + type.toLowerCase() : ""),
52
+ suffix = (symbol === "$" ? currencySuffix : /[%p]/.test(type) ? percent : "") + (options && options.suffix !== undefined ? options.suffix : "");
53
53
 
54
54
  // What format function should we use?
55
55
  // Is this an integer type?
@@ -88,7 +88,7 @@ function _default(locale) {
88
88
 
89
89
  // Compute the prefix and suffix.
90
90
  valuePrefix = (valueNegative ? sign === "(" ? sign : minus : sign === "-" || sign === "(" ? "" : sign) + valuePrefix;
91
- valueSuffix = (type === "s" ? prefixes[8 + _formatPrefixAuto.prefixExponent / 3] : "") + valueSuffix + (valueNegative && sign === "(" ? ")" : "");
91
+ valueSuffix = (type === "s" && !isNaN(value) && _formatPrefixAuto.prefixExponent !== undefined ? prefixes[8 + _formatPrefixAuto.prefixExponent / 3] : "") + valueSuffix + (valueNegative && sign === "(" ? ")" : "");
92
92
 
93
93
  // Break the formatted value into the integer “value” part that can be
94
94
  // grouped, and fractional or exponential “suffix” part that is not.
@@ -137,12 +137,13 @@ function _default(locale) {
137
137
  return format;
138
138
  }
139
139
  function formatPrefix(specifier, value) {
140
- var f = newFormat((specifier = (0, _formatSpecifier.default)(specifier), specifier.type = "f", specifier)),
141
- e = Math.max(-8, Math.min(8, Math.floor((0, _exponent.default)(value) / 3))) * 3,
140
+ var e = Math.max(-8, Math.min(8, Math.floor((0, _exponent.default)(value) / 3))) * 3,
142
141
  k = Math.pow(10, -e),
143
- prefix = prefixes[8 + e / 3];
142
+ f = newFormat((specifier = (0, _formatSpecifier.default)(specifier), specifier.type = "f", specifier), {
143
+ suffix: prefixes[8 + e / 3]
144
+ });
144
145
  return function (value) {
145
- return f(k * value) + prefix;
146
+ return f(k * value);
146
147
  };
147
148
  }
148
149
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-charts-vendor",
3
- "version": "8.25.0",
3
+ "version": "9.0.0-alpha.0",
4
4
  "author": "MUI Team",
5
5
  "description": "Vendored dependencies for MUI X Charts.",
6
6
  "keywords": [
@@ -24,20 +24,20 @@
24
24
  }
25
25
  },
26
26
  "dependencies": {
27
- "@babel/runtime": "^7.28.4",
27
+ "@babel/runtime": "^7.28.6",
28
28
  "@types/d3-array": "^3.2.2",
29
29
  "@types/d3-color": "^3.1.3",
30
30
  "@types/d3-format": "^3.0.4",
31
31
  "@types/d3-interpolate": "^3.0.4",
32
32
  "@types/d3-path": "^3.1.1",
33
33
  "@types/d3-scale": "^4.0.9",
34
- "@types/d3-shape": "^3.1.7",
34
+ "@types/d3-shape": "^3.1.8",
35
35
  "@types/d3-time": "^3.0.4",
36
36
  "@types/d3-time-format": "^4.0.3",
37
37
  "@types/d3-timer": "^3.0.2",
38
38
  "d3-array": "^3.2.4",
39
39
  "d3-color": "^3.1.0",
40
- "d3-format": "^3.1.0",
40
+ "d3-format": "^3.1.2",
41
41
  "d3-interpolate": "^3.0.1",
42
42
  "d3-path": "^3.1.0",
43
43
  "d3-scale": "^4.0.2",
@@ -49,8 +49,8 @@
49
49
  "internmap": "^2.0.3"
50
50
  },
51
51
  "devDependencies": {
52
- "@babel/cli": "^7.28.3",
53
- "@babel/plugin-transform-runtime": "^7.28.5",
52
+ "@babel/cli": "^7.28.6",
53
+ "@babel/plugin-transform-runtime": "^7.29.0",
54
54
  "babel-plugin-module-resolver": "5.0.2",
55
55
  "execa": "9.6.1",
56
56
  "rimraf": "^6.1.2"