@mui/x-charts-vendor 8.21.0 → 8.22.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.
@@ -0,0 +1,8 @@
1
+
2
+ // `x-charts-vendor/flatqueue` (ESM)
3
+ // See upstream license: git+https://github.com/mourner/flatqueue/blob/main/LICENSE
4
+ //
5
+ // Our ESM package uses the underlying installed dependencies of `node_modules/flatqueue`
6
+ export * from "flatqueue";
7
+
8
+ export { default } from "flatqueue";
@@ -0,0 +1,6 @@
1
+
2
+ // `x-charts-vendor/flatqueue` (CommonJS)
3
+ // See upstream license: git+https://github.com/mourner/flatqueue/blob/main/LICENSE
4
+ //
5
+ // Our CommonJS package relies on transpiled vendor files in `lib-vendor/flatqueue`
6
+ module.exports = require("../lib-vendor/flatqueue/index.js");
@@ -0,0 +1,15 @@
1
+ ISC License
2
+
3
+ Copyright (c) 2025, Volodymyr Agafonkin
4
+
5
+ Permission to use, copy, modify, and/or distribute this software for any purpose
6
+ with or without fee is hereby granted, provided that the above copyright notice
7
+ and this permission notice appear in all copies.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
10
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
11
+ FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
12
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
13
+ OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
14
+ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
15
+ THIS SOFTWARE.
@@ -0,0 +1,102 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ /** @template T */
8
+ class FlatQueue {
9
+ constructor() {
10
+ /** @type T[] */
11
+ this.ids = [];
12
+
13
+ /** @type number[] */
14
+ this.values = [];
15
+
16
+ /** Number of items in the queue. */
17
+ this.length = 0;
18
+ }
19
+
20
+ /** Removes all items from the queue. */
21
+ clear() {
22
+ this.length = 0;
23
+ }
24
+
25
+ /**
26
+ * Adds `item` to the queue with the specified `priority`.
27
+ *
28
+ * `priority` must be a number. Items are sorted and returned from low to high priority. Multiple items
29
+ * with the same priority value can be added to the queue, but there is no guaranteed order between these items.
30
+ *
31
+ * @param {T} item
32
+ * @param {number} priority
33
+ */
34
+ push(item, priority) {
35
+ let pos = this.length++;
36
+ while (pos > 0) {
37
+ const parent = pos - 1 >> 1;
38
+ const parentValue = this.values[parent];
39
+ if (priority >= parentValue) break;
40
+ this.ids[pos] = this.ids[parent];
41
+ this.values[pos] = parentValue;
42
+ pos = parent;
43
+ }
44
+ this.ids[pos] = item;
45
+ this.values[pos] = priority;
46
+ }
47
+
48
+ /**
49
+ * Removes and returns the item from the head of this queue, which is one of
50
+ * the items with the lowest priority. If this queue is empty, returns `undefined`.
51
+ */
52
+ pop() {
53
+ if (this.length === 0) return undefined;
54
+ const ids = this.ids,
55
+ values = this.values,
56
+ top = ids[0],
57
+ last = --this.length;
58
+ if (last > 0) {
59
+ const id = ids[last];
60
+ const value = values[last];
61
+ let pos = 0;
62
+ const halfLen = last >> 1;
63
+ while (pos < halfLen) {
64
+ const left = (pos << 1) + 1;
65
+ const right = left + 1;
66
+ const child = left + (+(right < last) & +(values[right] < values[left]));
67
+ if (values[child] >= value) break;
68
+ ids[pos] = ids[child];
69
+ values[pos] = values[child];
70
+ pos = child;
71
+ }
72
+ ids[pos] = id;
73
+ values[pos] = value;
74
+ }
75
+ return top;
76
+ }
77
+
78
+ /** Returns the item from the head of this queue without removing it. If this queue is empty, returns `undefined`. */
79
+ peek() {
80
+ return this.length > 0 ? this.ids[0] : undefined;
81
+ }
82
+
83
+ /**
84
+ * Returns the priority value of the item at the head of this queue without
85
+ * removing it. If this queue is empty, returns `undefined`.
86
+ */
87
+ peekValue() {
88
+ return this.length > 0 ? this.values[0] : undefined;
89
+ }
90
+
91
+ /**
92
+ * Shrinks the internal arrays to `this.length`.
93
+ *
94
+ * `pop()` and `clear()` calls don't free memory automatically to avoid unnecessary resize operations.
95
+ * This also means that items that have been added to the queue can't be garbage collected until
96
+ * a new item is pushed in their place, or this method is called.
97
+ */
98
+ shrink() {
99
+ this.ids.length = this.values.length = this.length;
100
+ }
101
+ }
102
+ exports.default = FlatQueue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-charts-vendor",
3
- "version": "8.21.0",
3
+ "version": "8.22.0",
4
4
  "author": "MUI Team",
5
5
  "description": "Vendored dependencies for MUI X Charts.",
6
6
  "keywords": [
@@ -27,19 +27,20 @@
27
27
  "@babel/runtime": "^7.28.4",
28
28
  "@types/d3-color": "^3.1.3",
29
29
  "@types/d3-interpolate": "^3.0.4",
30
+ "@types/d3-path": "^3.1.1",
30
31
  "@types/d3-sankey": "^0.12.5",
31
32
  "@types/d3-scale": "^4.0.9",
32
33
  "@types/d3-shape": "^3.1.7",
33
34
  "@types/d3-time": "^3.0.4",
34
35
  "@types/d3-timer": "^3.0.2",
35
- "@types/d3-path": "^3.1.1",
36
36
  "d3-color": "^3.1.0",
37
37
  "d3-interpolate": "^3.0.1",
38
+ "d3-path": "^3.1.0",
38
39
  "d3-scale": "^4.0.2",
39
40
  "d3-shape": "^3.2.0",
40
41
  "d3-time": "^3.1.0",
41
42
  "d3-timer": "^3.0.1",
42
- "d3-path": "^3.1.0"
43
+ "flatqueue": "^3.0.0"
43
44
  },
44
45
  "devDependencies": {
45
46
  "@babel/cli": "^7.28.3",