@extend-ai/react-xlsx 0.18.1 → 0.20.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.
Files changed (72) hide show
  1. package/README.md +154 -6
  2. package/dist/chart-renderer-AAVZ34BF.cjs +5048 -0
  3. package/dist/chart-renderer-AAVZ34BF.cjs.map +1 -0
  4. package/dist/{chart-renderer-HQSQHDCB.js → chart-renderer-KGLAI4DN.js} +25 -20
  5. package/dist/chart-renderer-KGLAI4DN.js.map +1 -0
  6. package/dist/{chart-renderer-ZUWRNNZT.cjs → chart-renderer-NM5UVCTO.cjs} +44 -39
  7. package/dist/chart-renderer-NM5UVCTO.cjs.map +1 -0
  8. package/dist/chart-renderer-RXO7WP4Q.js +5047 -0
  9. package/dist/chart-renderer-RXO7WP4Q.js.map +1 -0
  10. package/dist/chunk-2YBG7XQ3.cjs +26981 -0
  11. package/dist/chunk-2YBG7XQ3.cjs.map +1 -0
  12. package/dist/chunk-3JTCYAUX.js +50 -0
  13. package/dist/{chunk-OZLJPZUX.js.map → chunk-3JTCYAUX.js.map} +1 -1
  14. package/dist/chunk-6K3NSKDJ.cjs +50 -0
  15. package/dist/chunk-6K3NSKDJ.cjs.map +1 -0
  16. package/dist/chunk-CJBI5F6V.cjs +816 -0
  17. package/dist/chunk-CJBI5F6V.cjs.map +1 -0
  18. package/dist/{chunk-WFQGZI2Z.cjs → chunk-MCFUTO4J.cjs} +12 -8
  19. package/dist/chunk-MCFUTO4J.cjs.map +1 -0
  20. package/dist/chunk-NBH72POD.js +816 -0
  21. package/dist/chunk-NBH72POD.js.map +1 -0
  22. package/dist/{chunk-E2VSYCP2.cjs → chunk-O3V2MCOC.cjs} +18 -2
  23. package/dist/chunk-O3V2MCOC.cjs.map +1 -0
  24. package/dist/chunk-QN3D3JS2.js +26978 -0
  25. package/dist/chunk-QN3D3JS2.js.map +1 -0
  26. package/dist/{chunk-FO6MIHX4.cjs → chunk-T5WZHPIN.cjs} +2 -2
  27. package/dist/{chunk-FO6MIHX4.cjs.map → chunk-T5WZHPIN.cjs.map} +1 -1
  28. package/dist/{chunk-BAAMDEDS.js → chunk-VXBNYHW5.js} +18 -2
  29. package/dist/{chunk-BAAMDEDS.js.map → chunk-VXBNYHW5.js.map} +1 -1
  30. package/dist/{chunk-OZLJPZUX.js → chunk-WSQDFXDW.js} +10 -6
  31. package/dist/chunk-WSQDFXDW.js.map +1 -0
  32. package/dist/index.cjs +600 -11270
  33. package/dist/index.cjs.map +1 -1
  34. package/dist/index.d.cts +5 -14
  35. package/dist/index.d.ts +5 -14
  36. package/dist/index.js +479 -11149
  37. package/dist/index.js.map +1 -1
  38. package/dist/internal-DrXSHYJZ.d.cts +1498 -0
  39. package/dist/internal-DrXSHYJZ.d.ts +1498 -0
  40. package/dist/internal.cjs +24 -0
  41. package/dist/internal.cjs.map +1 -0
  42. package/dist/internal.d.cts +3 -0
  43. package/dist/internal.d.ts +3 -0
  44. package/dist/internal.js +23 -0
  45. package/dist/internal.js.map +1 -0
  46. package/dist/{region-map-geography-5E5SVPGS.cjs → region-map-geography-6TGXBY3V.cjs} +2 -2
  47. package/dist/{region-map-geography-5E5SVPGS.cjs.map → region-map-geography-6TGXBY3V.cjs.map} +1 -1
  48. package/dist/{spreadsheet-font-assets-7QMV43XD.cjs → spreadsheet-font-assets-4AHYDTAQ.cjs} +2 -2
  49. package/dist/{spreadsheet-font-assets-7QMV43XD.cjs.map → spreadsheet-font-assets-4AHYDTAQ.cjs.map} +1 -1
  50. package/dist/{surface-regl-WVLW3SEA.cjs → surface-regl-5Z6IVOID.cjs} +18 -15
  51. package/dist/surface-regl-5Z6IVOID.cjs.map +1 -0
  52. package/dist/{surface-regl-NWR5ZZ5D.js → surface-regl-7CDGGVDG.js} +10 -7
  53. package/dist/surface-regl-7CDGGVDG.js.map +1 -0
  54. package/dist/surface-regl-AY7JZVYY.cjs +727 -0
  55. package/dist/surface-regl-AY7JZVYY.cjs.map +1 -0
  56. package/dist/surface-regl-TJUWTLAZ.js +726 -0
  57. package/dist/surface-regl-TJUWTLAZ.js.map +1 -0
  58. package/dist/vanilla.cjs +20 -0
  59. package/dist/vanilla.cjs.map +1 -0
  60. package/dist/vanilla.d.cts +9 -0
  61. package/dist/vanilla.d.ts +9 -0
  62. package/dist/vanilla.js +19 -0
  63. package/dist/vanilla.js.map +1 -0
  64. package/dist/xlsx-worker.js +2888 -34
  65. package/dist/xlsx-worker.js.map +1 -1
  66. package/package.json +23 -3
  67. package/dist/chart-renderer-HQSQHDCB.js.map +0 -1
  68. package/dist/chart-renderer-ZUWRNNZT.cjs.map +0 -1
  69. package/dist/chunk-E2VSYCP2.cjs.map +0 -1
  70. package/dist/chunk-WFQGZI2Z.cjs.map +0 -1
  71. package/dist/surface-regl-NWR5ZZ5D.js.map +0 -1
  72. package/dist/surface-regl-WVLW3SEA.cjs.map +0 -1
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkWFQGZI2Zcjs = require('./chunk-WFQGZI2Z.cjs');
5
+ var _chunk6K3NSKDJcjs = require('./chunk-6K3NSKDJ.cjs');
6
6
 
7
7
 
8
8
 
@@ -12,13 +12,13 @@ var _chunkWFQGZI2Zcjs = require('./chunk-WFQGZI2Z.cjs');
12
12
 
13
13
 
14
14
 
15
- var _chunkE2VSYCP2cjs = require('./chunk-E2VSYCP2.cjs');
15
+ var _chunkO3V2MCOCcjs = require('./chunk-O3V2MCOC.cjs');
16
16
 
17
17
 
18
18
 
19
19
 
20
20
  var _chunk5ERNVHSOcjs = require('./chunk-5ERNVHSO.cjs');
21
- require('./chunk-FO6MIHX4.cjs');
21
+ require('./chunk-T5WZHPIN.cjs');
22
22
 
23
23
  // src/chart-renderer.tsx
24
24
  var _d3hierarchy = require('d3-hierarchy');
@@ -36,14 +36,14 @@ var _d3shape = require('d3-shape');
36
36
  var _jsxruntime = require('react/jsx-runtime');
37
37
 
38
38
  function RegionMapPlot({ chart, palette, layout, selectedChartElement }) {
39
- const resources = _chunkWFQGZI2Zcjs.useChartModule.call(void 0, _chunkWFQGZI2Zcjs.regionMapResources);
39
+ const resources = _chunk6K3NSKDJcjs.useChartModule.call(void 0, _chunk6K3NSKDJcjs.regionMapResources);
40
40
  return resources ? renderRegionMapChart(chart, palette, layout, selectedChartElement, resources) : null;
41
41
  }
42
42
  function SurfaceChartComposite({
43
43
  loadingFallback,
44
44
  ...props
45
45
  }) {
46
- const renderer = _chunkWFQGZI2Zcjs.useChartModule.call(void 0, _chunkWFQGZI2Zcjs.surfaceRenderer);
46
+ const renderer = _chunk6K3NSKDJcjs.useChartModule.call(void 0, _chunk6K3NSKDJcjs.surfaceRenderer);
47
47
  return renderer ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, renderer.MemoSurfaceChartComposite, { ...props }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: loadingFallback });
48
48
  }
49
49
  function chartElementDataProps(seriesIndex, pointIndex, options) {
@@ -3969,7 +3969,7 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
3969
3969
  return null;
3970
3970
  }
3971
3971
  const isContour = isContourSurfaceChart(chart);
3972
- const ratios = _chunkE2VSYCP2cjs.surfaceDataRatios.call(void 0, rows, cols, _optionalChain([chart, 'access', _464 => _464.valueAxis, 'optionalAccess', _465 => _465.crossBetween]) !== "midCat", _optionalChain([chart, 'access', _466 => _466.view3d, 'optionalAccess', _467 => _467.heightPercent]), _optionalChain([chart, 'access', _468 => _468.view3d, 'optionalAccess', _469 => _469.depthPercent]), layout);
3972
+ const ratios = _chunkO3V2MCOCcjs.surfaceDataRatios.call(void 0, rows, cols, _optionalChain([chart, 'access', _464 => _464.valueAxis, 'optionalAccess', _465 => _465.crossBetween]) !== "midCat", _optionalChain([chart, 'access', _466 => _466.view3d, 'optionalAccess', _467 => _467.heightPercent]), _optionalChain([chart, 'access', _468 => _468.view3d, 'optionalAccess', _469 => _469.depthPercent]), layout);
3973
3973
  const minValue = domain.minValue;
3974
3974
  const safeMax = domain.safeMax;
3975
3975
  const wallFill = _nullishCoalesce(_optionalChain([chart, 'access', _470 => _470.backWall, 'optionalAccess', _471 => _471.fillColor]), () => ( "#d9d9df"));
@@ -3977,8 +3977,8 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
3977
3977
  if (isContour) {
3978
3978
  const faces2 = [];
3979
3979
  const lines = [];
3980
- const backgroundNormal = _chunkE2VSYCP2cjs.transformSurfaceNormal.call(void 0, { x: 0, y: 1, z: 0 }, _nullishCoalesce(_optionalChain([chart, 'access', _478 => _478.view3d, 'optionalAccess', _479 => _479.rotX]), () => ( 90)), _nullishCoalesce(_optionalChain([chart, 'access', _480 => _480.view3d, 'optionalAccess', _481 => _481.rotY]), () => ( 0)));
3981
- const backgroundFill = chart.surfaceMaterial === "flat" ? wallFill : _chunkE2VSYCP2cjs.shadeSurfaceMatteColor.call(void 0, wallFill, backgroundNormal);
3980
+ const backgroundNormal = _chunkO3V2MCOCcjs.transformSurfaceNormal.call(void 0, { x: 0, y: 1, z: 0 }, _nullishCoalesce(_optionalChain([chart, 'access', _478 => _478.view3d, 'optionalAccess', _479 => _479.rotX]), () => ( 90)), _nullishCoalesce(_optionalChain([chart, 'access', _480 => _480.view3d, 'optionalAccess', _481 => _481.rotY]), () => ( 0)));
3981
+ const backgroundFill = chart.surfaceMaterial === "flat" ? wallFill : _chunkO3V2MCOCcjs.shadeSurfaceMatteColor.call(void 0, wallFill, backgroundNormal);
3982
3982
  const inset = _optionalChain([chart, 'access', _482 => _482.valueAxis, 'optionalAccess', _483 => _483.crossBetween]) !== "midCat" ? plot.width / (2 * cols) : 0;
3983
3983
  const dataWidth = plot.width - 2 * inset;
3984
3984
  for (let rowIndex = 0; rowIndex < rows - 1; rowIndex += 1) {
@@ -3994,7 +3994,7 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
3994
3994
  const x1 = plot.left + inset + (columnIndex + 1) / (cols - 1) * dataWidth;
3995
3995
  const y0 = plot.top + plot.height - rowIndex / (rows - 1) * plot.height;
3996
3996
  const y1 = plot.top + plot.height - (rowIndex + 1) / (rows - 1) * plot.height;
3997
- const triangles = _chunkE2VSYCP2cjs.triangulateSurfaceQuad.call(void 0, [
3997
+ const triangles = _chunkO3V2MCOCcjs.triangulateSurfaceQuad.call(void 0, [
3998
3998
  { value: p00, x: x0, y: y0 },
3999
3999
  { value: p10, x: x1, y: y0 },
4000
4000
  { value: p11, x: x1, y: y1 },
@@ -4003,37 +4003,38 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
4003
4003
  triangles.forEach((triangle, triangleIndex) => {
4004
4004
  const world = triangle.map((point) => ({
4005
4005
  x: (point.x - plot.left - inset) / dataWidth,
4006
- y: (1 - _chunkE2VSYCP2cjs.normalizeSurfaceValue.call(void 0, point.value, domain.minValue, domain.safeMax, chart.valueAxis)) * ratios.height,
4006
+ y: (1 - _chunkO3V2MCOCcjs.normalizeSurfaceValue.call(void 0, point.value, domain.minValue, domain.safeMax, chart.valueAxis)) * ratios.height,
4007
4007
  z: (point.y - plot.top) / plot.height * ratios.depth
4008
4008
  }));
4009
- const normal = _chunkE2VSYCP2cjs.transformSurfaceNormal.call(void 0, _chunkE2VSYCP2cjs.surfaceNormal.call(void 0, world[0], world[1], world[2]), _nullishCoalesce(_optionalChain([chart, 'access', _492 => _492.view3d, 'optionalAccess', _493 => _493.rotX]), () => ( 90)), _nullishCoalesce(_optionalChain([chart, 'access', _494 => _494.view3d, 'optionalAccess', _495 => _495.rotY]), () => ( 0)));
4009
+ const normal = _chunkO3V2MCOCcjs.transformSurfaceNormal.call(void 0, _chunkO3V2MCOCcjs.surfaceNormal.call(void 0, world[0], world[1], world[2]), _nullishCoalesce(_optionalChain([chart, 'access', _492 => _492.view3d, 'optionalAccess', _493 => _493.rotX]), () => ( 90)), _nullishCoalesce(_optionalChain([chart, 'access', _494 => _494.view3d, 'optionalAccess', _495 => _495.rotY]), () => ( 0)));
4010
4010
  for (let band = 0; band < domain.ticks.length - 1; band += 1) {
4011
4011
  const lower = domain.ticks[band];
4012
4012
  const upper = domain.ticks[band + 1];
4013
- const polygon = _chunkE2VSYCP2cjs.clipSurfaceBand.call(void 0, _chunkE2VSYCP2cjs.clipSurfaceBand.call(void 0, triangle, lower, true, chart.valueAxis, band === 0), upper, false, chart.valueAxis);
4013
+ const polygon = _chunkO3V2MCOCcjs.clipSurfaceBand.call(void 0, _chunkO3V2MCOCcjs.clipSurfaceBand.call(void 0, triangle, lower, true, chart.valueAxis, band === 0), upper, false, chart.valueAxis);
4014
4014
  if (polygon.length < 3) {
4015
4015
  continue;
4016
4016
  }
4017
4017
  const key = `${rowIndex}-${columnIndex}-${triangleIndex}-${band}`;
4018
4018
  const midpoint = (lower + upper) / 2;
4019
4019
  if (!chart.wireframe) {
4020
- faces2.push(/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "polygon", { fill: chart.surfaceMaterial === "flat" ? resolveSurfaceBandColor(chart, palette, domain, midpoint) : _chunkE2VSYCP2cjs.shadeSurfaceMatteColor.call(void 0, resolveSurfaceBandColor(chart, palette, domain, midpoint), normal), points: polygon.map((point) => `${point.x},${point.y}`).join(" ") }, `surface-band-${key}`));
4020
+ faces2.push(/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "polygon", { fill: chart.surfaceMaterial === "flat" ? resolveSurfaceBandColor(chart, palette, domain, midpoint) : _chunkO3V2MCOCcjs.shadeSurfaceMatteColor.call(void 0, resolveSurfaceBandColor(chart, palette, domain, midpoint), normal), points: polygon.map((point) => `${point.x},${point.y}`).join(" ") }, `surface-band-${key}`));
4021
4021
  }
4022
4022
  const widths = _optionalChain([chart, 'access', _496 => _496.raw, 'optionalAccess', _497 => _497.bandFormatLineWidths]);
4023
- const lineWidth = _nullishCoalesce(_nullishCoalesce(_optionalChain([widths, 'optionalAccess', _498 => _498[band]]), () => ( _optionalChain([chart, 'access', _499 => _499.series, 'access', _500 => _500[0], 'optionalAccess', _501 => _501.lineWidthPx]))), () => ( 1));
4024
- const edges = _chunkE2VSYCP2cjs.surfaceBandEdges.call(void 0, polygon, triangle);
4025
- lines.push(
4026
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4027
- "path",
4028
- {
4029
- d: edges.map(([from, to]) => `M ${from.x} ${from.y} L ${to.x} ${to.y}`).join(" "),
4030
- fill: "none",
4031
- stroke: resolveSurfaceWireframeColor(chart, palette, domain, midpoint),
4032
- strokeWidth: lineWidth
4033
- },
4034
- `surface-edge-${key}`
4035
- )
4036
- );
4023
+ for (const group of _chunkO3V2MCOCcjs.groupSurfaceBandEdges.call(void 0, polygon, triangle, band, lower, chart.wireframe === true)) {
4024
+ const edgeMidpoint = (domain.ticks[group.band] + domain.ticks[group.band + 1]) / 2;
4025
+ lines.push(
4026
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4027
+ "path",
4028
+ {
4029
+ d: group.edges.map(([from, to]) => `M ${from.x} ${from.y} L ${to.x} ${to.y}`).join(" "),
4030
+ fill: "none",
4031
+ stroke: resolveSurfaceWireframeColor(chart, palette, domain, edgeMidpoint),
4032
+ strokeWidth: _nullishCoalesce(_nullishCoalesce(_optionalChain([widths, 'optionalAccess', _498 => _498[group.band]]), () => ( _optionalChain([chart, 'access', _499 => _499.series, 'access', _500 => _500[0], 'optionalAccess', _501 => _501.lineWidthPx]))), () => ( 1))
4033
+ },
4034
+ `surface-edge-${key}-${group.band}`
4035
+ )
4036
+ );
4037
+ }
4037
4038
  }
4038
4039
  });
4039
4040
  }
@@ -4072,7 +4073,7 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
4072
4073
  const projectRawPoint = (columnIndex, rowIndex, value) => {
4073
4074
  const hasValue = value != null;
4074
4075
  const normalizedX = cols <= 1 ? 0 : (columnIndex / (cols - 1) - 0.5) * 2;
4075
- const normalizedY = hasValue ? -(_chunkE2VSYCP2cjs.normalizeSurfaceValue.call(void 0, value, minValue, safeMax, chart.valueAxis) - 0.5) * heightExtent : heightExtent / 2;
4076
+ const normalizedY = hasValue ? -(_chunkO3V2MCOCcjs.normalizeSurfaceValue.call(void 0, value, minValue, safeMax, chart.valueAxis) - 0.5) * heightExtent : heightExtent / 2;
4076
4077
  const normalizedZ = rows <= 1 ? 0 : (rowIndex / (rows - 1) - 0.5) * 2 * depthScale;
4077
4078
  if (_optionalChain([chart, 'access', _516 => _516.view3d, 'optionalAccess', _517 => _517.rAngAx]) !== false) {
4078
4079
  return {
@@ -4119,12 +4120,12 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
4119
4120
  if (hidden || color === "transparent") return;
4120
4121
  const world = points.map((point) => ({
4121
4122
  x: point.x / Math.max(1, cols - 1),
4122
- y: (1 - _chunkE2VSYCP2cjs.normalizeSurfaceValue.call(void 0, point.value, minValue, safeMax, chart.valueAxis)) * ratios.height,
4123
+ y: (1 - _chunkO3V2MCOCcjs.normalizeSurfaceValue.call(void 0, point.value, minValue, safeMax, chart.valueAxis)) * ratios.height,
4123
4124
  z: (1 - point.y / Math.max(1, rows - 1)) * depthScale
4124
4125
  }));
4125
- const normal = _chunkE2VSYCP2cjs.transformSurfaceNormal.call(void 0, _chunkE2VSYCP2cjs.surfaceNormal.call(void 0, world[0], world[1], world[2]), _nullishCoalesce(_optionalChain([chart, 'access', _520 => _520.view3d, 'optionalAccess', _521 => _521.rotX]), () => ( 25)), _nullishCoalesce(_optionalChain([chart, 'access', _522 => _522.view3d, 'optionalAccess', _523 => _523.rotY]), () => ( 30)), _optionalChain([chart, 'access', _524 => _524.view3d, 'optionalAccess', _525 => _525.rAngAx]) !== false);
4126
+ const normal = _chunkO3V2MCOCcjs.transformSurfaceNormal.call(void 0, _chunkO3V2MCOCcjs.surfaceNormal.call(void 0, world[0], world[1], world[2]), _nullishCoalesce(_optionalChain([chart, 'access', _520 => _520.view3d, 'optionalAccess', _521 => _521.rotX]), () => ( 25)), _nullishCoalesce(_optionalChain([chart, 'access', _522 => _522.view3d, 'optionalAccess', _523 => _523.rotY]), () => ( 30)), _optionalChain([chart, 'access', _524 => _524.view3d, 'optionalAccess', _525 => _525.rAngAx]) !== false);
4126
4127
  const baseColor = _nullishCoalesce(color, () => ( wallFill));
4127
- wallNodes.push(/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "polygon", { fill: chart.surfaceMaterial === "flat" ? baseColor : _chunkE2VSYCP2cjs.shadeSurfaceMatteColor.call(void 0, baseColor, normal), points: points.map(projectPoint).map((point) => `${point.x},${point.y}`).join(" ") }, key));
4128
+ wallNodes.push(/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "polygon", { fill: chart.surfaceMaterial === "flat" ? baseColor : _chunkO3V2MCOCcjs.shadeSurfaceMatteColor.call(void 0, baseColor, normal), points: points.map(projectPoint).map((point) => `${point.x},${point.y}`).join(" ") }, key));
4128
4129
  };
4129
4130
  addWall("floor", [wallPoint(0, 0, minValue), wallPoint(cols - 1, 0, minValue), wallPoint(cols - 1, rows - 1, minValue), wallPoint(0, rows - 1, minValue)], _optionalChain([chart, 'access', _526 => _526.floor, 'optionalAccess', _527 => _527.fillColor]), _optionalChain([chart, 'access', _528 => _528.floor, 'optionalAccess', _529 => _529.hidden]));
4130
4131
  addWall("back", [wallPoint(0, backRow, safeMax), wallPoint(cols - 1, backRow, safeMax), wallPoint(cols - 1, backRow, minValue), wallPoint(0, backRow, minValue)], _optionalChain([chart, 'access', _530 => _530.backWall, 'optionalAccess', _531 => _531.fillColor]), _optionalChain([chart, 'access', _532 => _532.backWall, 'optionalAccess', _533 => _533.hidden]));
@@ -4146,7 +4147,7 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
4146
4147
  for (let columnIndex = 0; columnIndex < cols - 1; columnIndex += 1) {
4147
4148
  const values = [matrix[rowIndex][columnIndex], matrix[rowIndex][columnIndex + 1], matrix[rowIndex + 1][columnIndex + 1], matrix[rowIndex + 1][columnIndex]];
4148
4149
  if (values.some((value) => value == null)) continue;
4149
- const triangles = _chunkE2VSYCP2cjs.triangulateSurfaceQuad.call(void 0, [
4150
+ const triangles = _chunkO3V2MCOCcjs.triangulateSurfaceQuad.call(void 0, [
4150
4151
  { value: values[0], x: columnIndex, y: rowIndex },
4151
4152
  { value: values[1], x: columnIndex + 1, y: rowIndex },
4152
4153
  { value: values[2], x: columnIndex + 1, y: rowIndex + 1 },
@@ -4155,24 +4156,28 @@ function renderSurfaceChart(chart, palette, layout, selectedChartElement) {
4155
4156
  triangles.forEach((triangle, triangleIndex) => {
4156
4157
  const world = triangle.map((point) => ({
4157
4158
  x: point.x / Math.max(1, cols - 1),
4158
- y: (1 - _chunkE2VSYCP2cjs.normalizeSurfaceValue.call(void 0, point.value, minValue, safeMax, chart.valueAxis)) * ratios.height,
4159
+ y: (1 - _chunkO3V2MCOCcjs.normalizeSurfaceValue.call(void 0, point.value, minValue, safeMax, chart.valueAxis)) * ratios.height,
4159
4160
  z: (1 - point.y / Math.max(1, rows - 1)) * depthScale
4160
4161
  }));
4161
- const normal = _chunkE2VSYCP2cjs.transformSurfaceNormal.call(void 0, _chunkE2VSYCP2cjs.surfaceNormal.call(void 0, world[0], world[1], world[2]), _nullishCoalesce(_optionalChain([chart, 'access', _544 => _544.view3d, 'optionalAccess', _545 => _545.rotX]), () => ( 25)), _nullishCoalesce(_optionalChain([chart, 'access', _546 => _546.view3d, 'optionalAccess', _547 => _547.rotY]), () => ( 30)), _optionalChain([chart, 'access', _548 => _548.view3d, 'optionalAccess', _549 => _549.rAngAx]) !== false);
4162
+ const normal = _chunkO3V2MCOCcjs.transformSurfaceNormal.call(void 0, _chunkO3V2MCOCcjs.surfaceNormal.call(void 0, world[0], world[1], world[2]), _nullishCoalesce(_optionalChain([chart, 'access', _544 => _544.view3d, 'optionalAccess', _545 => _545.rotX]), () => ( 25)), _nullishCoalesce(_optionalChain([chart, 'access', _546 => _546.view3d, 'optionalAccess', _547 => _547.rotY]), () => ( 30)), _optionalChain([chart, 'access', _548 => _548.view3d, 'optionalAccess', _549 => _549.rAngAx]) !== false);
4162
4163
  for (let band = 0; band < domain.ticks.length - 1; band += 1) {
4163
4164
  const lower = domain.ticks[band];
4164
4165
  const upper = domain.ticks[band + 1];
4165
- const polygon = _chunkE2VSYCP2cjs.clipSurfaceBand.call(void 0, _chunkE2VSYCP2cjs.clipSurfaceBand.call(void 0, triangle, lower, true, chart.valueAxis, band === 0), upper, false, chart.valueAxis);
4166
+ const polygon = _chunkO3V2MCOCcjs.clipSurfaceBand.call(void 0, _chunkO3V2MCOCcjs.clipSurfaceBand.call(void 0, triangle, lower, true, chart.valueAxis, band === 0), upper, false, chart.valueAxis);
4166
4167
  if (polygon.length < 3) continue;
4167
4168
  const projected = polygon.map(projectPoint);
4168
4169
  const midpoint = (lower + upper) / 2;
4169
4170
  const widths = _optionalChain([chart, 'access', _550 => _550.raw, 'optionalAccess', _551 => _551.bandFormatLineWidths]);
4170
- const edges = _chunkE2VSYCP2cjs.surfaceBandEdges.call(void 0, polygon, triangle).map(([from, to]) => [projectPoint(from), projectPoint(to)]);
4171
+ const edgeGroups = _chunkO3V2MCOCcjs.groupSurfaceBandEdges.call(void 0, polygon, triangle, band, lower, chart.wireframe === true);
4171
4172
  faces.push({
4172
4173
  depth: projected.reduce((sum, point) => sum + point.depth, 0) / projected.length,
4173
4174
  node: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "g", { children: [
4174
- !chart.wireframe && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "polygon", { fill: chart.surfaceMaterial === "flat" ? resolveSurfaceBandColor(chart, palette, domain, midpoint) : _chunkE2VSYCP2cjs.shadeSurfaceMatteColor.call(void 0, resolveSurfaceBandColor(chart, palette, domain, midpoint), normal), points: projected.map((point) => `${point.x},${point.y}`).join(" ") }),
4175
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { fill: "none", stroke: resolveSurfaceWireframeColor(chart, palette, domain, midpoint), strokeWidth: _nullishCoalesce(_nullishCoalesce(_optionalChain([widths, 'optionalAccess', _552 => _552[band]]), () => ( _optionalChain([chart, 'access', _553 => _553.series, 'access', _554 => _554[0], 'optionalAccess', _555 => _555.lineWidthPx]))), () => ( 1)), d: edges.map(([from, to]) => `M ${from.x} ${from.y} L ${to.x} ${to.y}`).join(" ") })
4175
+ !chart.wireframe && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "polygon", { fill: chart.surfaceMaterial === "flat" ? resolveSurfaceBandColor(chart, palette, domain, midpoint) : _chunkO3V2MCOCcjs.shadeSurfaceMatteColor.call(void 0, resolveSurfaceBandColor(chart, palette, domain, midpoint), normal), points: projected.map((point) => `${point.x},${point.y}`).join(" ") }),
4176
+ edgeGroups.map((group) => {
4177
+ const edgeMidpoint = (domain.ticks[group.band] + domain.ticks[group.band + 1]) / 2;
4178
+ const edges = group.edges.map(([from, to]) => [projectPoint(from), projectPoint(to)]);
4179
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "path", { fill: "none", stroke: resolveSurfaceWireframeColor(chart, palette, domain, edgeMidpoint), strokeWidth: _nullishCoalesce(_nullishCoalesce(_optionalChain([widths, 'optionalAccess', _552 => _552[group.band]]), () => ( _optionalChain([chart, 'access', _553 => _553.series, 'access', _554 => _554[0], 'optionalAccess', _555 => _555.lineWidthPx]))), () => ( 1)), d: edges.map(([from, to]) => `M ${from.x} ${from.y} L ${to.x} ${to.y}`).join(" ") }, `surface-edge-${group.band}`);
4180
+ })
4176
4181
  ] }, `surface-band-${rowIndex}-${columnIndex}-${triangleIndex}-${band}`)
4177
4182
  });
4178
4183
  }
@@ -5038,4 +5043,4 @@ var MemoChartSvg = React.memo(function MemoChartSvg2({
5038
5043
 
5039
5044
 
5040
5045
  exports.MemoChartSvg = MemoChartSvg;
5041
- //# sourceMappingURL=chart-renderer-ZUWRNNZT.cjs.map
5046
+ //# sourceMappingURL=chart-renderer-NM5UVCTO.cjs.map