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,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h as h$1, g as getElement } from './index-ClAytgPt.js';
2
- import { a as DEFAULT_DOMAIN_COLOR, D as DEFAULT_LABEL_COLOR, t as trackComponent } from './color-palette-COqhnQ77.js';
2
+ import { a as DEFAULT_DOMAIN_COLOR, D as DEFAULT_LABEL_COLOR, t as trackComponent } from './color-palette-D56IFb4i.js';
3
3
 
4
4
  // Note: This regex matches even invalid JSON strings, but since we’re
5
5
  // working on the output of `JSON.stringify` we know that only valid strings
@@ -31446,7 +31446,7 @@ const epsilon$1 = 1.1102230246251565e-16;
31446
31446
  const splitter = 134217729;
31447
31447
  const resulterrbound = (3 + 8 * epsilon$1) * epsilon$1;
31448
31448
 
31449
- // fast_expansion_sum_zeroelim routine from oritinal code
31449
+ // fast_expansion_sum_zeroelim routine from original code
31450
31450
  function sum(elen, e, flen, f, h) {
31451
31451
  let Q, Qnew, hh, bvirt;
31452
31452
  let enow = e[0];
@@ -31711,8 +31711,19 @@ function orient2d(ax, ay, bx, by, cx, cy) {
31711
31711
  const EPSILON = Math.pow(2, -52);
31712
31712
  const EDGE_STACK = new Uint32Array(512);
31713
31713
 
31714
+ /** @template {ArrayLike<number>} T */
31714
31715
  class Delaunator {
31715
31716
 
31717
+ /**
31718
+ * Constructs a delaunay triangulation object given an array of points (`[x, y]` by default).
31719
+ * `getX` and `getY` are optional functions of the form `(point) => value` for custom point formats.
31720
+ *
31721
+ * @template P
31722
+ * @param {P[]} points
31723
+ * @param {(p: P) => number} [getX]
31724
+ * @param {(p: P) => number} [getY]
31725
+ */
31726
+ // @ts-expect-error TS2322
31716
31727
  static from(points, getX = defaultGetX, getY = defaultGetY) {
31717
31728
  const n = points.length;
31718
31729
  const coords = new Float64Array(n * 2);
@@ -31726,6 +31737,12 @@ class Delaunator {
31726
31737
  return new Delaunator(coords);
31727
31738
  }
31728
31739
 
31740
+ /**
31741
+ * Constructs a delaunay triangulation object given an array of point coordinates of the form:
31742
+ * `[x0, y0, x1, y1, ...]` (use a typed array for best performance). Duplicate points are skipped.
31743
+ *
31744
+ * @param {T} coords
31745
+ */
31729
31746
  constructor(coords) {
31730
31747
  const n = coords.length >> 1;
31731
31748
  if (n > 0 && typeof coords[0] !== 'number') throw new Error('Expected coords to contain numbers.');
@@ -31734,23 +31751,44 @@ class Delaunator {
31734
31751
 
31735
31752
  // arrays that will store the triangulation graph
31736
31753
  const maxTriangles = Math.max(2 * n - 5, 0);
31737
- this._triangles = new Uint32Array(maxTriangles * 3);
31738
- this._halfedges = new Int32Array(maxTriangles * 3);
31754
+ /** @private */ this._triangles = new Uint32Array(maxTriangles * 3);
31755
+ /** @private */ this._halfedges = new Int32Array(maxTriangles * 3);
31739
31756
 
31740
31757
  // temporary arrays for tracking the edges of the advancing convex hull
31741
- this._hashSize = Math.ceil(Math.sqrt(n));
31742
- this._hullPrev = new Uint32Array(n); // edge to prev edge
31743
- this._hullNext = new Uint32Array(n); // edge to next edge
31744
- this._hullTri = new Uint32Array(n); // edge to adjacent triangle
31745
- this._hullHash = new Int32Array(this._hashSize); // angular edge hash
31758
+ /** @private */ this._hashSize = Math.ceil(Math.sqrt(n));
31759
+ /** @private */ this._hullPrev = new Uint32Array(n); // edge to prev edge
31760
+ /** @private */ this._hullNext = new Uint32Array(n); // edge to next edge
31761
+ /** @private */ this._hullTri = new Uint32Array(n); // edge to adjacent triangle
31762
+ /** @private */ this._hullHash = new Int32Array(this._hashSize); // angular edge hash
31746
31763
 
31747
31764
  // temporary arrays for sorting points
31748
- this._ids = new Uint32Array(n);
31749
- this._dists = new Float64Array(n);
31765
+ /** @private */ this._ids = new Uint32Array(n);
31766
+ /** @private */ this._dists = new Float64Array(n);
31767
+
31768
+ /** @private */ this.trianglesLen = 0;
31769
+ /** @private */ this._cx = 0;
31770
+ /** @private */ this._cy = 0;
31771
+ /** @private */ this._hullStart = 0;
31772
+
31773
+
31774
+ /** A `Uint32Array` array of indices that reference points on the convex hull of the input data, counter-clockwise. */
31775
+ this.hull = this._triangles;
31776
+ /** A `Uint32Array` array of triangle vertex indices (each group of three numbers forms a triangle). All triangles are directed counterclockwise. */
31777
+ this.triangles = this._triangles;
31778
+ /**
31779
+ * A `Int32Array` array of triangle half-edge indices that allows you to traverse the triangulation.
31780
+ * `i`-th half-edge in the array corresponds to vertex `triangles[i]` the half-edge is coming from.
31781
+ * `halfedges[i]` is the index of a twin half-edge in an adjacent triangle (or `-1` for outer half-edges on the convex hull).
31782
+ */
31783
+ this.halfedges = this._halfedges;
31750
31784
 
31751
31785
  this.update();
31752
31786
  }
31753
31787
 
31788
+ /**
31789
+ * Updates the triangulation if you modified `delaunay.coords` values in place, avoiding expensive memory allocations.
31790
+ * Useful for iterative relaxation algorithms such as Lloyd's.
31791
+ */
31754
31792
  update() {
31755
31793
  const {coords, _hullPrev: hullPrev, _hullNext: hullNext, _hullTri: hullTri, _hullHash: hullHash} = this;
31756
31794
  const n = coords.length >> 1;
@@ -31773,7 +31811,7 @@ class Delaunator {
31773
31811
  const cx = (minX + maxX) / 2;
31774
31812
  const cy = (minY + maxY) / 2;
31775
31813
 
31776
- let i0, i1, i2;
31814
+ let i0 = 0, i1 = 0, i2 = 0;
31777
31815
 
31778
31816
  // pick a seed point close to the center
31779
31817
  for (let i = 0, minDist = Infinity; i < n; i++) {
@@ -31831,7 +31869,7 @@ class Delaunator {
31831
31869
  }
31832
31870
  this.hull = hull.subarray(0, j);
31833
31871
  this.triangles = new Uint32Array(0);
31834
- this.halfedges = new Uint32Array(0);
31872
+ this.halfedges = new Int32Array(0);
31835
31873
  return;
31836
31874
  }
31837
31875
 
@@ -31879,7 +31917,7 @@ class Delaunator {
31879
31917
  this.trianglesLen = 0;
31880
31918
  this._addTriangle(i0, i1, i2, -1, -1, -1);
31881
31919
 
31882
- for (let k = 0, xp, yp; k < this._ids.length; k++) {
31920
+ for (let k = 0, xp = 0, yp = 0; k < this._ids.length; k++) {
31883
31921
  const i = this._ids[k];
31884
31922
  const x = coords[2 * i];
31885
31923
  const y = coords[2 * i + 1];
@@ -31961,10 +31999,23 @@ class Delaunator {
31961
31999
  this.halfedges = this._halfedges.subarray(0, this.trianglesLen);
31962
32000
  }
31963
32001
 
32002
+ /**
32003
+ * Calculate an angle-based key for the edge hash used for advancing convex hull.
32004
+ *
32005
+ * @param {number} x
32006
+ * @param {number} y
32007
+ * @private
32008
+ */
31964
32009
  _hashKey(x, y) {
31965
32010
  return Math.floor(pseudoAngle(x - this._cx, y - this._cy) * this._hashSize) % this._hashSize;
31966
32011
  }
31967
32012
 
32013
+ /**
32014
+ * Flip an edge in a pair of triangles if it doesn't satisfy the Delaunay condition.
32015
+ *
32016
+ * @param {number} a
32017
+ * @private
32018
+ */
31968
32019
  _legalize(a) {
31969
32020
  const {_triangles: triangles, _halfedges: halfedges, coords} = this;
31970
32021
 
@@ -32020,7 +32071,7 @@ class Delaunator {
32020
32071
 
32021
32072
  const hbl = halfedges[bl];
32022
32073
 
32023
- // edge swapped on the other side of the hull (rare); fix the halfedge reference
32074
+ // edge swapped on the other side of the hull (rare); fix the half-edge reference
32024
32075
  if (hbl === -1) {
32025
32076
  let e = this._hullStart;
32026
32077
  do {
@@ -32050,12 +32101,28 @@ class Delaunator {
32050
32101
  return ar;
32051
32102
  }
32052
32103
 
32104
+ /**
32105
+ * Link two half-edges to each other.
32106
+ * @param {number} a
32107
+ * @param {number} b
32108
+ * @private
32109
+ */
32053
32110
  _link(a, b) {
32054
32111
  this._halfedges[a] = b;
32055
32112
  if (b !== -1) this._halfedges[b] = a;
32056
32113
  }
32057
32114
 
32058
- // add a new triangle given vertex indices and adjacent half-edge ids
32115
+ /**
32116
+ * Add a new triangle given vertex indices and adjacent half-edge ids.
32117
+ *
32118
+ * @param {number} i0
32119
+ * @param {number} i1
32120
+ * @param {number} i2
32121
+ * @param {number} a
32122
+ * @param {number} b
32123
+ * @param {number} c
32124
+ * @private
32125
+ */
32059
32126
  _addTriangle(i0, i1, i2, a, b, c) {
32060
32127
  const t = this.trianglesLen;
32061
32128
 
@@ -32073,18 +32140,43 @@ class Delaunator {
32073
32140
  }
32074
32141
  }
32075
32142
 
32076
- // monotonically increases with real angle, but doesn't need expensive trigonometry
32143
+ /**
32144
+ * Monotonically increases with real angle, but doesn't need expensive trigonometry.
32145
+ *
32146
+ * @param {number} dx
32147
+ * @param {number} dy
32148
+ */
32077
32149
  function pseudoAngle(dx, dy) {
32078
32150
  const p = dx / (Math.abs(dx) + Math.abs(dy));
32079
32151
  return (dy > 0 ? 3 - p : 1 + p) / 4; // [0..1]
32080
32152
  }
32081
32153
 
32154
+ /**
32155
+ * Squared distance between two points.
32156
+ *
32157
+ * @param {number} ax
32158
+ * @param {number} ay
32159
+ * @param {number} bx
32160
+ * @param {number} by
32161
+ */
32082
32162
  function dist(ax, ay, bx, by) {
32083
32163
  const dx = ax - bx;
32084
32164
  const dy = ay - by;
32085
32165
  return dx * dx + dy * dy;
32086
32166
  }
32087
32167
 
32168
+ /**
32169
+ * Check whether point P is inside a circle formed by points A, B, C.
32170
+ *
32171
+ * @param {number} ax
32172
+ * @param {number} ay
32173
+ * @param {number} bx
32174
+ * @param {number} by
32175
+ * @param {number} cx
32176
+ * @param {number} cy
32177
+ * @param {number} px
32178
+ * @param {number} py
32179
+ */
32088
32180
  function inCircle(ax, ay, bx, by, cx, cy, px, py) {
32089
32181
  const dx = ax - px;
32090
32182
  const dy = ay - py;
@@ -32102,6 +32194,16 @@ function inCircle(ax, ay, bx, by, cx, cy, px, py) {
32102
32194
  ap * (ex * fy - ey * fx) < 0;
32103
32195
  }
32104
32196
 
32197
+ /**
32198
+ * Squared radius of the circle formed by points A, B, C.
32199
+ *
32200
+ * @param {number} ax
32201
+ * @param {number} ay
32202
+ * @param {number} bx
32203
+ * @param {number} by
32204
+ * @param {number} cx
32205
+ * @param {number} cy
32206
+ */
32105
32207
  function circumradius(ax, ay, bx, by, cx, cy) {
32106
32208
  const dx = bx - ax;
32107
32209
  const dy = by - ay;
@@ -32118,6 +32220,16 @@ function circumradius(ax, ay, bx, by, cx, cy) {
32118
32220
  return x * x + y * y;
32119
32221
  }
32120
32222
 
32223
+ /**
32224
+ * Get coordinates of a circumcenter for points A, B, C.
32225
+ *
32226
+ * @param {number} ax
32227
+ * @param {number} ay
32228
+ * @param {number} bx
32229
+ * @param {number} by
32230
+ * @param {number} cx
32231
+ * @param {number} cy
32232
+ */
32121
32233
  function circumcenter(ax, ay, bx, by, cx, cy) {
32122
32234
  const dx = bx - ax;
32123
32235
  const dy = by - ay;
@@ -32134,6 +32246,14 @@ function circumcenter(ax, ay, bx, by, cx, cy) {
32134
32246
  return {x, y};
32135
32247
  }
32136
32248
 
32249
+ /**
32250
+ * Sort points by distance via an array of point indices and an array of calculated distances.
32251
+ *
32252
+ * @param {Uint32Array} ids
32253
+ * @param {Float64Array} dists
32254
+ * @param {number} left
32255
+ * @param {number} right
32256
+ */
32137
32257
  function quicksort(ids, dists, left, right) {
32138
32258
  if (right - left <= 20) {
32139
32259
  for (let i = left + 1; i <= right; i++) {
@@ -32173,15 +32293,22 @@ function quicksort(ids, dists, left, right) {
32173
32293
  }
32174
32294
  }
32175
32295
 
32296
+ /**
32297
+ * @param {Uint32Array} arr
32298
+ * @param {number} i
32299
+ * @param {number} j
32300
+ */
32176
32301
  function swap(arr, i, j) {
32177
32302
  const tmp = arr[i];
32178
32303
  arr[i] = arr[j];
32179
32304
  arr[j] = tmp;
32180
32305
  }
32181
32306
 
32307
+ /** @param {[number, number]} p */
32182
32308
  function defaultGetX(p) {
32183
32309
  return p[0];
32184
32310
  }
32311
+ /** @param {[number, number]} p */
32185
32312
  function defaultGetY(p) {
32186
32313
  return p[1];
32187
32314
  }
@@ -1 +1 @@
1
- import{p as e,b as l}from"./p-ClAytgPt.js";export{s as setNonce}from"./p-ClAytgPt.js";import{g as a}from"./p-DQuL1Twl.js";(()=>{const l=import.meta.url,a={};return""!==l&&(a.resourcesUrl=new URL(".",l).href),e(a)})().then((async e=>(await a(),l([["p-a9385aa0",[[1,"gux-visualization-beta",{visualizationSpec:[16],embedOptions:[16],screenreaderDescription:[1,"screenreader-description"]}]]],["p-defaeb6c",[[1,"gux-chart-column-beta",{labelColor:[1,"label-color"],domainColor:[1,"domain-color"],chartData:[16],xTickLabelSlant:[4,"x-tick-label-slant"],includeLegend:[4,"include-legend"],xFieldName:[1,"x-field-name"],yFieldName:[1,"y-field-name"],xAxisTitle:[1,"x-axis-title"],yAxisTitle:[1,"y-axis-title"],legendTitle:[1,"legend-title"],legendPosition:[1,"legend-position"],chartLayers:[16],embedOptions:[16]},null,{chartData:[{parseData:0}]}]]],["p-27bec93c",[[1,"gux-chart-donut-beta",{chartData:[16],includeLegend:[4,"include-legend"],legendPosition:[1,"legend-position"],legendTitle:[1,"legend-title"],colorFieldName:[1,"color-field-name"],outerRadius:[2,"outer-radius"],innerRadius:[2,"inner-radius"],labelRadius:[2,"label-radius"],labelField:[1,"label-field"],gauge:[4],centerText:[1,"center-text"],centerSubText:[1,"center-sub-text"],showTooltip:[4,"show-tooltip"],tooltipOptions:[16],legendX:[2,"legend-x"],legendY:[2,"legend-y"],legendFontSize:[2,"legend-font-size"],legendSymbolSize:[2,"legend-symbol-size"],embedOptions:[16]},null,{chartData:[{parseData:0}]}]]],["p-e84143f4",[[1,"gux-chart-line-beta",{labelColor:[1,"label-color"],domainColor:[1,"domain-color"],chartData:[16],xTickLabelSlant:[4,"x-tick-label-slant"],includeLegend:[4,"include-legend"],legendPosition:[1,"legend-position"],includeDataPointMarkers:[4,"include-data-point-markers"],xFieldName:[1,"x-field-name"],xAxisTitle:[1,"x-axis-title"],yFieldName:[1,"y-field-name"],yAxisTitle:[1,"y-axis-title"],legendTitle:[1,"legend-title"],colorFieldName:[1,"color-field-name"],strokeDash:[4,"stroke-dash"],interpolation:[1],embedOptions:[16]},null,{chartData:[{parseData:0}]}]]],["p-a193d2ca",[[1,"gux-chart-pie-beta",{chartData:[16],includeLegend:[4,"include-legend"],legendPosition:[1,"legend-position"],legendTitle:[1,"legend-title"],colorFieldName:[1,"color-field-name"],outerRadius:[2,"outer-radius"],labelRadius:[2,"label-radius"],labelField:[1,"label-field"],embedOptions:[16]},null,{chartData:[{parseData:0}]}]]],["p-c62115a2",[[1,"gux-chart-scatter-plot-beta",{labelColor:[1,"label-color"],domainColor:[1,"domain-color"],chartData:[16],xTickLabelSlant:[4,"x-tick-label-slant"],includeLegend:[4,"include-legend"],legendPosition:[1,"legend-position"],xFieldName:[1,"x-field-name"],xAxisTitle:[1,"x-axis-title"],yFieldName:[1,"y-field-name"],yAxisTitle:[1,"y-axis-title"],legendTitle:[1,"legend-title"],colorFieldName:[1,"color-field-name"],useShape:[1,"use-shape"],embedOptions:[16]},null,{chartData:[{parseData:0}]}]]]],e))));
1
+ import{p as e,b as l}from"./p-ClAytgPt.js";export{s as setNonce}from"./p-ClAytgPt.js";import{g as a}from"./p-DQuL1Twl.js";(()=>{const l=import.meta.url,a={};return""!==l&&(a.resourcesUrl=new URL(".",l).href),e(a)})().then((async e=>(await a(),l([["p-1fd2568c",[[1,"gux-visualization-beta",{visualizationSpec:[16],embedOptions:[16],screenreaderDescription:[1,"screenreader-description"]}]]],["p-ef45bc5d",[[1,"gux-chart-column-beta",{labelColor:[1,"label-color"],domainColor:[1,"domain-color"],chartData:[16],xTickLabelSlant:[4,"x-tick-label-slant"],includeLegend:[4,"include-legend"],xFieldName:[1,"x-field-name"],yFieldName:[1,"y-field-name"],xAxisTitle:[1,"x-axis-title"],yAxisTitle:[1,"y-axis-title"],legendTitle:[1,"legend-title"],legendPosition:[1,"legend-position"],chartLayers:[16],embedOptions:[16]},null,{chartData:[{parseData:0}]}]]],["p-44ffc80a",[[1,"gux-chart-donut-beta",{chartData:[16],includeLegend:[4,"include-legend"],legendPosition:[1,"legend-position"],legendTitle:[1,"legend-title"],colorFieldName:[1,"color-field-name"],outerRadius:[2,"outer-radius"],innerRadius:[2,"inner-radius"],labelRadius:[2,"label-radius"],labelField:[1,"label-field"],gauge:[4],centerText:[1,"center-text"],centerSubText:[1,"center-sub-text"],showTooltip:[4,"show-tooltip"],tooltipOptions:[16],legendX:[2,"legend-x"],legendY:[2,"legend-y"],legendFontSize:[2,"legend-font-size"],legendSymbolSize:[2,"legend-symbol-size"],embedOptions:[16]},null,{chartData:[{parseData:0}]}]]],["p-4f262b98",[[1,"gux-chart-line-beta",{labelColor:[1,"label-color"],domainColor:[1,"domain-color"],chartData:[16],xTickLabelSlant:[4,"x-tick-label-slant"],includeLegend:[4,"include-legend"],legendPosition:[1,"legend-position"],includeDataPointMarkers:[4,"include-data-point-markers"],xFieldName:[1,"x-field-name"],xAxisTitle:[1,"x-axis-title"],yFieldName:[1,"y-field-name"],yAxisTitle:[1,"y-axis-title"],legendTitle:[1,"legend-title"],colorFieldName:[1,"color-field-name"],strokeDash:[4,"stroke-dash"],interpolation:[1],embedOptions:[16]},null,{chartData:[{parseData:0}]}]]],["p-d673a4e1",[[1,"gux-chart-pie-beta",{chartData:[16],includeLegend:[4,"include-legend"],legendPosition:[1,"legend-position"],legendTitle:[1,"legend-title"],colorFieldName:[1,"color-field-name"],outerRadius:[2,"outer-radius"],labelRadius:[2,"label-radius"],labelField:[1,"label-field"],embedOptions:[16]},null,{chartData:[{parseData:0}]}]]],["p-22003945",[[1,"gux-chart-scatter-plot-beta",{labelColor:[1,"label-color"],domainColor:[1,"domain-color"],chartData:[16],xTickLabelSlant:[4,"x-tick-label-slant"],includeLegend:[4,"include-legend"],legendPosition:[1,"legend-position"],xFieldName:[1,"x-field-name"],xAxisTitle:[1,"x-axis-title"],yFieldName:[1,"y-field-name"],yAxisTitle:[1,"y-axis-title"],legendTitle:[1,"legend-title"],colorFieldName:[1,"color-field-name"],useShape:[1,"use-shape"],embedOptions:[16]},null,{chartData:[{parseData:0}]}]]]],e))));