genesys-spark-chart-components 4.231.0 → 4.231.2

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.
Files changed (23) hide show
  1. package/dist/cjs/{color-palette-DE9bWdKH.js → color-palette-ChGtNwO1.js} +1 -1
  2. package/dist/cjs/gux-chart-column-beta.cjs.entry.js +1 -1
  3. package/dist/cjs/gux-chart-donut-beta.cjs.entry.js +1 -1
  4. package/dist/cjs/gux-chart-line-beta.cjs.entry.js +1 -1
  5. package/dist/cjs/gux-chart-pie-beta.cjs.entry.js +1 -1
  6. package/dist/cjs/gux-chart-scatter-plot-beta.cjs.entry.js +1 -1
  7. package/dist/cjs/gux-visualization-beta.cjs.entry.js +144 -17
  8. package/dist/esm/{color-palette-COqhnQ77.js → color-palette-D56IFb4i.js} +1 -1
  9. package/dist/esm/gux-chart-column-beta.entry.js +1 -1
  10. package/dist/esm/gux-chart-donut-beta.entry.js +1 -1
  11. package/dist/esm/gux-chart-line-beta.entry.js +1 -1
  12. package/dist/esm/gux-chart-pie-beta.entry.js +1 -1
  13. package/dist/esm/gux-chart-scatter-plot-beta.entry.js +1 -1
  14. package/dist/esm/gux-visualization-beta.entry.js +144 -17
  15. package/dist/genesys-chart-webcomponents/genesys-chart-webcomponents.esm.js +1 -1
  16. package/dist/genesys-chart-webcomponents/{p-a9385aa0.entry.js → p-1fd2568c.entry.js} +1 -1
  17. package/dist/genesys-chart-webcomponents/{p-c62115a2.entry.js → p-22003945.entry.js} +1 -1
  18. package/dist/genesys-chart-webcomponents/{p-27bec93c.entry.js → p-44ffc80a.entry.js} +1 -1
  19. package/dist/genesys-chart-webcomponents/{p-e84143f4.entry.js → p-4f262b98.entry.js} +1 -1
  20. package/dist/genesys-chart-webcomponents/{p-COqhnQ77.js → p-D56IFb4i.js} +1 -1
  21. package/dist/genesys-chart-webcomponents/{p-a193d2ca.entry.js → p-d673a4e1.entry.js} +1 -1
  22. package/dist/genesys-chart-webcomponents/{p-defaeb6c.entry.js → p-ef45bc5d.entry.js} +1 -1
  23. package/package.json +11 -11
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const version = "4.231.0";
3
+ const version = "4.231.2";
4
4
  var packageInfo = {
5
5
  version: version};
6
6
 
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-kxjkn7bw.js');
4
- var colorPalette = require('./color-palette-DE9bWdKH.js');
4
+ var colorPalette = require('./color-palette-ChGtNwO1.js');
5
5
  var logError = require('./log-error-BMPVm36Q.js');
6
6
 
7
7
  const guxChartColumnCss = () => `gux-visualization-beta{height:fit-content;color:#2e394c;}gux-visualization-beta .mark-rect.layer_0_marks path{fill:url(#diagonalHatch0)}gux-visualization-beta{}gux-visualization-beta .mark-rect.layer_1_marks path{fill:#1da8b3}`;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-kxjkn7bw.js');
4
- var colorPalette = require('./color-palette-DE9bWdKH.js');
4
+ var colorPalette = require('./color-palette-ChGtNwO1.js');
5
5
  var logError = require('./log-error-BMPVm36Q.js');
6
6
 
7
7
  const guxChartDonutCss = () => `gux-visualization-beta{height:fit-content;color:#2e394c}`;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-kxjkn7bw.js');
4
- var colorPalette = require('./color-palette-DE9bWdKH.js');
4
+ var colorPalette = require('./color-palette-ChGtNwO1.js');
5
5
  var logError = require('./log-error-BMPVm36Q.js');
6
6
 
7
7
  const guxChartLineCss = () => `gux-visualization-beta{height:fit-content;color:#2e394c}`;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-kxjkn7bw.js');
4
- var colorPalette = require('./color-palette-DE9bWdKH.js');
4
+ var colorPalette = require('./color-palette-ChGtNwO1.js');
5
5
  var logError = require('./log-error-BMPVm36Q.js');
6
6
 
7
7
  const guxChartPieCss = () => `gux-visualization-beta{height:fit-content;color:#2e394c}`;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-kxjkn7bw.js');
4
- var colorPalette = require('./color-palette-DE9bWdKH.js');
4
+ var colorPalette = require('./color-palette-ChGtNwO1.js');
5
5
  var logError = require('./log-error-BMPVm36Q.js');
6
6
 
7
7
  const guxChartScatterPlotCss = () => `gux-visualization-beta{height:fit-content;color:#2e394c}`;
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var index$2 = require('./index-kxjkn7bw.js');
4
- var colorPalette = require('./color-palette-DE9bWdKH.js');
4
+ var colorPalette = require('./color-palette-ChGtNwO1.js');
5
5
 
6
6
  // Note: This regex matches even invalid JSON strings, but since we’re
7
7
  // working on the output of `JSON.stringify` we know that only valid strings
@@ -31448,7 +31448,7 @@ const epsilon$1 = 1.1102230246251565e-16;
31448
31448
  const splitter = 134217729;
31449
31449
  const resulterrbound = (3 + 8 * epsilon$1) * epsilon$1;
31450
31450
 
31451
- // fast_expansion_sum_zeroelim routine from oritinal code
31451
+ // fast_expansion_sum_zeroelim routine from original code
31452
31452
  function sum(elen, e, flen, f, h) {
31453
31453
  let Q, Qnew, hh, bvirt;
31454
31454
  let enow = e[0];
@@ -31713,8 +31713,19 @@ function orient2d(ax, ay, bx, by, cx, cy) {
31713
31713
  const EPSILON = Math.pow(2, -52);
31714
31714
  const EDGE_STACK = new Uint32Array(512);
31715
31715
 
31716
+ /** @template {ArrayLike<number>} T */
31716
31717
  class Delaunator {
31717
31718
 
31719
+ /**
31720
+ * Constructs a delaunay triangulation object given an array of points (`[x, y]` by default).
31721
+ * `getX` and `getY` are optional functions of the form `(point) => value` for custom point formats.
31722
+ *
31723
+ * @template P
31724
+ * @param {P[]} points
31725
+ * @param {(p: P) => number} [getX]
31726
+ * @param {(p: P) => number} [getY]
31727
+ */
31728
+ // @ts-expect-error TS2322
31718
31729
  static from(points, getX = defaultGetX, getY = defaultGetY) {
31719
31730
  const n = points.length;
31720
31731
  const coords = new Float64Array(n * 2);
@@ -31728,6 +31739,12 @@ class Delaunator {
31728
31739
  return new Delaunator(coords);
31729
31740
  }
31730
31741
 
31742
+ /**
31743
+ * Constructs a delaunay triangulation object given an array of point coordinates of the form:
31744
+ * `[x0, y0, x1, y1, ...]` (use a typed array for best performance). Duplicate points are skipped.
31745
+ *
31746
+ * @param {T} coords
31747
+ */
31731
31748
  constructor(coords) {
31732
31749
  const n = coords.length >> 1;
31733
31750
  if (n > 0 && typeof coords[0] !== 'number') throw new Error('Expected coords to contain numbers.');
@@ -31736,23 +31753,44 @@ class Delaunator {
31736
31753
 
31737
31754
  // arrays that will store the triangulation graph
31738
31755
  const maxTriangles = Math.max(2 * n - 5, 0);
31739
- this._triangles = new Uint32Array(maxTriangles * 3);
31740
- this._halfedges = new Int32Array(maxTriangles * 3);
31756
+ /** @private */ this._triangles = new Uint32Array(maxTriangles * 3);
31757
+ /** @private */ this._halfedges = new Int32Array(maxTriangles * 3);
31741
31758
 
31742
31759
  // temporary arrays for tracking the edges of the advancing convex hull
31743
- this._hashSize = Math.ceil(Math.sqrt(n));
31744
- this._hullPrev = new Uint32Array(n); // edge to prev edge
31745
- this._hullNext = new Uint32Array(n); // edge to next edge
31746
- this._hullTri = new Uint32Array(n); // edge to adjacent triangle
31747
- this._hullHash = new Int32Array(this._hashSize); // angular edge hash
31760
+ /** @private */ this._hashSize = Math.ceil(Math.sqrt(n));
31761
+ /** @private */ this._hullPrev = new Uint32Array(n); // edge to prev edge
31762
+ /** @private */ this._hullNext = new Uint32Array(n); // edge to next edge
31763
+ /** @private */ this._hullTri = new Uint32Array(n); // edge to adjacent triangle
31764
+ /** @private */ this._hullHash = new Int32Array(this._hashSize); // angular edge hash
31748
31765
 
31749
31766
  // temporary arrays for sorting points
31750
- this._ids = new Uint32Array(n);
31751
- this._dists = new Float64Array(n);
31767
+ /** @private */ this._ids = new Uint32Array(n);
31768
+ /** @private */ this._dists = new Float64Array(n);
31769
+
31770
+ /** @private */ this.trianglesLen = 0;
31771
+ /** @private */ this._cx = 0;
31772
+ /** @private */ this._cy = 0;
31773
+ /** @private */ this._hullStart = 0;
31774
+
31775
+
31776
+ /** A `Uint32Array` array of indices that reference points on the convex hull of the input data, counter-clockwise. */
31777
+ this.hull = this._triangles;
31778
+ /** A `Uint32Array` array of triangle vertex indices (each group of three numbers forms a triangle). All triangles are directed counterclockwise. */
31779
+ this.triangles = this._triangles;
31780
+ /**
31781
+ * A `Int32Array` array of triangle half-edge indices that allows you to traverse the triangulation.
31782
+ * `i`-th half-edge in the array corresponds to vertex `triangles[i]` the half-edge is coming from.
31783
+ * `halfedges[i]` is the index of a twin half-edge in an adjacent triangle (or `-1` for outer half-edges on the convex hull).
31784
+ */
31785
+ this.halfedges = this._halfedges;
31752
31786
 
31753
31787
  this.update();
31754
31788
  }
31755
31789
 
31790
+ /**
31791
+ * Updates the triangulation if you modified `delaunay.coords` values in place, avoiding expensive memory allocations.
31792
+ * Useful for iterative relaxation algorithms such as Lloyd's.
31793
+ */
31756
31794
  update() {
31757
31795
  const {coords, _hullPrev: hullPrev, _hullNext: hullNext, _hullTri: hullTri, _hullHash: hullHash} = this;
31758
31796
  const n = coords.length >> 1;
@@ -31775,7 +31813,7 @@ class Delaunator {
31775
31813
  const cx = (minX + maxX) / 2;
31776
31814
  const cy = (minY + maxY) / 2;
31777
31815
 
31778
- let i0, i1, i2;
31816
+ let i0 = 0, i1 = 0, i2 = 0;
31779
31817
 
31780
31818
  // pick a seed point close to the center
31781
31819
  for (let i = 0, minDist = Infinity; i < n; i++) {
@@ -31833,7 +31871,7 @@ class Delaunator {
31833
31871
  }
31834
31872
  this.hull = hull.subarray(0, j);
31835
31873
  this.triangles = new Uint32Array(0);
31836
- this.halfedges = new Uint32Array(0);
31874
+ this.halfedges = new Int32Array(0);
31837
31875
  return;
31838
31876
  }
31839
31877
 
@@ -31881,7 +31919,7 @@ class Delaunator {
31881
31919
  this.trianglesLen = 0;
31882
31920
  this._addTriangle(i0, i1, i2, -1, -1, -1);
31883
31921
 
31884
- for (let k = 0, xp, yp; k < this._ids.length; k++) {
31922
+ for (let k = 0, xp = 0, yp = 0; k < this._ids.length; k++) {
31885
31923
  const i = this._ids[k];
31886
31924
  const x = coords[2 * i];
31887
31925
  const y = coords[2 * i + 1];
@@ -31963,10 +32001,23 @@ class Delaunator {
31963
32001
  this.halfedges = this._halfedges.subarray(0, this.trianglesLen);
31964
32002
  }
31965
32003
 
32004
+ /**
32005
+ * Calculate an angle-based key for the edge hash used for advancing convex hull.
32006
+ *
32007
+ * @param {number} x
32008
+ * @param {number} y
32009
+ * @private
32010
+ */
31966
32011
  _hashKey(x, y) {
31967
32012
  return Math.floor(pseudoAngle(x - this._cx, y - this._cy) * this._hashSize) % this._hashSize;
31968
32013
  }
31969
32014
 
32015
+ /**
32016
+ * Flip an edge in a pair of triangles if it doesn't satisfy the Delaunay condition.
32017
+ *
32018
+ * @param {number} a
32019
+ * @private
32020
+ */
31970
32021
  _legalize(a) {
31971
32022
  const {_triangles: triangles, _halfedges: halfedges, coords} = this;
31972
32023
 
@@ -32022,7 +32073,7 @@ class Delaunator {
32022
32073
 
32023
32074
  const hbl = halfedges[bl];
32024
32075
 
32025
- // edge swapped on the other side of the hull (rare); fix the halfedge reference
32076
+ // edge swapped on the other side of the hull (rare); fix the half-edge reference
32026
32077
  if (hbl === -1) {
32027
32078
  let e = this._hullStart;
32028
32079
  do {
@@ -32052,12 +32103,28 @@ class Delaunator {
32052
32103
  return ar;
32053
32104
  }
32054
32105
 
32106
+ /**
32107
+ * Link two half-edges to each other.
32108
+ * @param {number} a
32109
+ * @param {number} b
32110
+ * @private
32111
+ */
32055
32112
  _link(a, b) {
32056
32113
  this._halfedges[a] = b;
32057
32114
  if (b !== -1) this._halfedges[b] = a;
32058
32115
  }
32059
32116
 
32060
- // add a new triangle given vertex indices and adjacent half-edge ids
32117
+ /**
32118
+ * Add a new triangle given vertex indices and adjacent half-edge ids.
32119
+ *
32120
+ * @param {number} i0
32121
+ * @param {number} i1
32122
+ * @param {number} i2
32123
+ * @param {number} a
32124
+ * @param {number} b
32125
+ * @param {number} c
32126
+ * @private
32127
+ */
32061
32128
  _addTriangle(i0, i1, i2, a, b, c) {
32062
32129
  const t = this.trianglesLen;
32063
32130
 
@@ -32075,18 +32142,43 @@ class Delaunator {
32075
32142
  }
32076
32143
  }
32077
32144
 
32078
- // monotonically increases with real angle, but doesn't need expensive trigonometry
32145
+ /**
32146
+ * Monotonically increases with real angle, but doesn't need expensive trigonometry.
32147
+ *
32148
+ * @param {number} dx
32149
+ * @param {number} dy
32150
+ */
32079
32151
  function pseudoAngle(dx, dy) {
32080
32152
  const p = dx / (Math.abs(dx) + Math.abs(dy));
32081
32153
  return (dy > 0 ? 3 - p : 1 + p) / 4; // [0..1]
32082
32154
  }
32083
32155
 
32156
+ /**
32157
+ * Squared distance between two points.
32158
+ *
32159
+ * @param {number} ax
32160
+ * @param {number} ay
32161
+ * @param {number} bx
32162
+ * @param {number} by
32163
+ */
32084
32164
  function dist(ax, ay, bx, by) {
32085
32165
  const dx = ax - bx;
32086
32166
  const dy = ay - by;
32087
32167
  return dx * dx + dy * dy;
32088
32168
  }
32089
32169
 
32170
+ /**
32171
+ * Check whether point P is inside a circle formed by points A, B, C.
32172
+ *
32173
+ * @param {number} ax
32174
+ * @param {number} ay
32175
+ * @param {number} bx
32176
+ * @param {number} by
32177
+ * @param {number} cx
32178
+ * @param {number} cy
32179
+ * @param {number} px
32180
+ * @param {number} py
32181
+ */
32090
32182
  function inCircle(ax, ay, bx, by, cx, cy, px, py) {
32091
32183
  const dx = ax - px;
32092
32184
  const dy = ay - py;
@@ -32104,6 +32196,16 @@ function inCircle(ax, ay, bx, by, cx, cy, px, py) {
32104
32196
  ap * (ex * fy - ey * fx) < 0;
32105
32197
  }
32106
32198
 
32199
+ /**
32200
+ * Squared radius of the circle formed by points A, B, C.
32201
+ *
32202
+ * @param {number} ax
32203
+ * @param {number} ay
32204
+ * @param {number} bx
32205
+ * @param {number} by
32206
+ * @param {number} cx
32207
+ * @param {number} cy
32208
+ */
32107
32209
  function circumradius(ax, ay, bx, by, cx, cy) {
32108
32210
  const dx = bx - ax;
32109
32211
  const dy = by - ay;
@@ -32120,6 +32222,16 @@ function circumradius(ax, ay, bx, by, cx, cy) {
32120
32222
  return x * x + y * y;
32121
32223
  }
32122
32224
 
32225
+ /**
32226
+ * Get coordinates of a circumcenter for points A, B, C.
32227
+ *
32228
+ * @param {number} ax
32229
+ * @param {number} ay
32230
+ * @param {number} bx
32231
+ * @param {number} by
32232
+ * @param {number} cx
32233
+ * @param {number} cy
32234
+ */
32123
32235
  function circumcenter(ax, ay, bx, by, cx, cy) {
32124
32236
  const dx = bx - ax;
32125
32237
  const dy = by - ay;
@@ -32136,6 +32248,14 @@ function circumcenter(ax, ay, bx, by, cx, cy) {
32136
32248
  return {x, y};
32137
32249
  }
32138
32250
 
32251
+ /**
32252
+ * Sort points by distance via an array of point indices and an array of calculated distances.
32253
+ *
32254
+ * @param {Uint32Array} ids
32255
+ * @param {Float64Array} dists
32256
+ * @param {number} left
32257
+ * @param {number} right
32258
+ */
32139
32259
  function quicksort(ids, dists, left, right) {
32140
32260
  if (right - left <= 20) {
32141
32261
  for (let i = left + 1; i <= right; i++) {
@@ -32175,15 +32295,22 @@ function quicksort(ids, dists, left, right) {
32175
32295
  }
32176
32296
  }
32177
32297
 
32298
+ /**
32299
+ * @param {Uint32Array} arr
32300
+ * @param {number} i
32301
+ * @param {number} j
32302
+ */
32178
32303
  function swap(arr, i, j) {
32179
32304
  const tmp = arr[i];
32180
32305
  arr[i] = arr[j];
32181
32306
  arr[j] = tmp;
32182
32307
  }
32183
32308
 
32309
+ /** @param {[number, number]} p */
32184
32310
  function defaultGetX(p) {
32185
32311
  return p[0];
32186
32312
  }
32313
+ /** @param {[number, number]} p */
32187
32314
  function defaultGetY(p) {
32188
32315
  return p[1];
32189
32316
  }
@@ -1,4 +1,4 @@
1
- const version = "4.231.0";
1
+ const version = "4.231.2";
2
2
  var packageInfo = {
3
3
  version: version};
4
4
 
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, g as getElement } from './index-ClAytgPt.js';
2
- import { D as DEFAULT_LABEL_COLOR, a as DEFAULT_DOMAIN_COLOR, V as VISUALIZATION_COLORS, t as trackComponent } from './color-palette-COqhnQ77.js';
2
+ import { D as DEFAULT_LABEL_COLOR, a as DEFAULT_DOMAIN_COLOR, V as VISUALIZATION_COLORS, t as trackComponent } from './color-palette-D56IFb4i.js';
3
3
  import { l as logError } from './log-error-nsqlWzyl.js';
4
4
 
5
5
  const guxChartColumnCss = () => `gux-visualization-beta{height:fit-content;color:#2e394c;}gux-visualization-beta .mark-rect.layer_0_marks path{fill:url(#diagonalHatch0)}gux-visualization-beta{}gux-visualization-beta .mark-rect.layer_1_marks path{fill:#1da8b3}`;
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, g as getElement } from './index-ClAytgPt.js';
2
- import { V as VISUALIZATION_COLORS, t as trackComponent } from './color-palette-COqhnQ77.js';
2
+ import { V as VISUALIZATION_COLORS, t as trackComponent } from './color-palette-D56IFb4i.js';
3
3
  import { l as logError } from './log-error-nsqlWzyl.js';
4
4
 
5
5
  const guxChartDonutCss = () => `gux-visualization-beta{height:fit-content;color:#2e394c}`;
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, g as getElement } from './index-ClAytgPt.js';
2
- import { D as DEFAULT_LABEL_COLOR, a as DEFAULT_DOMAIN_COLOR, V as VISUALIZATION_COLORS, t as trackComponent } from './color-palette-COqhnQ77.js';
2
+ import { D as DEFAULT_LABEL_COLOR, a as DEFAULT_DOMAIN_COLOR, V as VISUALIZATION_COLORS, t as trackComponent } from './color-palette-D56IFb4i.js';
3
3
  import { l as logError } from './log-error-nsqlWzyl.js';
4
4
 
5
5
  const guxChartLineCss = () => `gux-visualization-beta{height:fit-content;color:#2e394c}`;
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, g as getElement } from './index-ClAytgPt.js';
2
- import { V as VISUALIZATION_COLORS, t as trackComponent } from './color-palette-COqhnQ77.js';
2
+ import { V as VISUALIZATION_COLORS, t as trackComponent } from './color-palette-D56IFb4i.js';
3
3
  import { l as logError } from './log-error-nsqlWzyl.js';
4
4
 
5
5
  const guxChartPieCss = () => `gux-visualization-beta{height:fit-content;color:#2e394c}`;
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, h, g as getElement } from './index-ClAytgPt.js';
2
- import { D as DEFAULT_LABEL_COLOR, a as DEFAULT_DOMAIN_COLOR, V as VISUALIZATION_COLORS, t as trackComponent } from './color-palette-COqhnQ77.js';
2
+ import { D as DEFAULT_LABEL_COLOR, a as DEFAULT_DOMAIN_COLOR, V as VISUALIZATION_COLORS, t as trackComponent } from './color-palette-D56IFb4i.js';
3
3
  import { l as logError } from './log-error-nsqlWzyl.js';
4
4
 
5
5
  const guxChartScatterPlotCss = () => `gux-visualization-beta{height:fit-content;color:#2e394c}`;