@extend-ai/react-xlsx 0.22.0 → 0.22.1

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 (46) hide show
  1. package/README.md +2 -2
  2. package/dist/{chunk-JOOWCDHK.js → chunk-CMI5MIZZ.js} +84 -102
  3. package/dist/chunk-CMI5MIZZ.js.map +1 -0
  4. package/dist/{chunk-OMKR4PZY.js → chunk-EDOXAWRE.js} +5 -3
  5. package/dist/chunk-EDOXAWRE.js.map +1 -0
  6. package/dist/{chunk-BVRJGSYM.cjs → chunk-J43N64B5.cjs} +5 -3
  7. package/dist/chunk-J43N64B5.cjs.map +1 -0
  8. package/dist/{chunk-FM2VAXTV.js → chunk-QSOAAYBJ.js} +5 -3
  9. package/dist/chunk-QSOAAYBJ.js.map +1 -0
  10. package/dist/{chunk-6N6KJKR5.cjs → chunk-WNFIRTYB.cjs} +5 -3
  11. package/dist/chunk-WNFIRTYB.cjs.map +1 -0
  12. package/dist/{chunk-BBF4GKSB.cjs → chunk-YCMFDK3C.cjs} +200 -218
  13. package/dist/chunk-YCMFDK3C.cjs.map +1 -0
  14. package/dist/duke-sheets-provenance.json +4 -4
  15. package/dist/duke_sheets_wasm_bg.wasm +0 -0
  16. package/dist/index.cjs +108 -109
  17. package/dist/index.cjs.map +1 -1
  18. package/dist/index.js +15 -16
  19. package/dist/index.js.map +1 -1
  20. package/dist/internal.cjs +3 -3
  21. package/dist/internal.d.cts +1 -1
  22. package/dist/internal.d.ts +1 -1
  23. package/dist/internal.js +2 -2
  24. package/dist/vanilla.cjs +3 -3
  25. package/dist/vanilla.d.cts +2 -2
  26. package/dist/vanilla.d.ts +2 -2
  27. package/dist/vanilla.js +2 -2
  28. package/dist/{workbook-runtime-NUTDPW3M.js → workbook-runtime-4GBESX74.js} +2 -2
  29. package/dist/{workbook-runtime-N63M5KMU.cjs → workbook-runtime-ITKMDWLO.cjs} +33 -33
  30. package/dist/{workbook-runtime-N63M5KMU.cjs.map → workbook-runtime-ITKMDWLO.cjs.map} +1 -1
  31. package/dist/{workbook-runtime-UIWE4FQ7.js → workbook-runtime-MVU32DIU.js} +2 -2
  32. package/dist/{workbook-runtime-CXEHXA7S.cjs → workbook-runtime-PHL746NC.cjs} +35 -35
  33. package/dist/{workbook-runtime-CXEHXA7S.cjs.map → workbook-runtime-PHL746NC.cjs.map} +1 -1
  34. package/dist/xlsx-worker.js +4 -2
  35. package/dist/xlsx-worker.js.map +1 -1
  36. package/package.json +2 -2
  37. package/dist/chunk-6N6KJKR5.cjs.map +0 -1
  38. package/dist/chunk-BBF4GKSB.cjs.map +0 -1
  39. package/dist/chunk-BVRJGSYM.cjs.map +0 -1
  40. package/dist/chunk-FM2VAXTV.js.map +0 -1
  41. package/dist/chunk-JOOWCDHK.js.map +0 -1
  42. package/dist/chunk-OMKR4PZY.js.map +0 -1
  43. package/dist/{internal-Ba92VZGf.d.cts → internal-DVsk7L2M.d.cts} +31 -31
  44. package/dist/{internal-Ba92VZGf.d.ts → internal-DVsk7L2M.d.ts} +31 -31
  45. /package/dist/{workbook-runtime-NUTDPW3M.js.map → workbook-runtime-4GBESX74.js.map} +0 -0
  46. /package/dist/{workbook-runtime-UIWE4FQ7.js.map → workbook-runtime-MVU32DIU.js.map} +0 -0
package/dist/index.js CHANGED
@@ -36,7 +36,7 @@ import {
36
36
  updateWorkbookChartDefinition,
37
37
  updateWorkbookImageAnchor,
38
38
  xlsxAnchorToDukeDrawingAnchor
39
- } from "./chunk-FM2VAXTV.js";
39
+ } from "./chunk-QSOAAYBJ.js";
40
40
  import {
41
41
  formatMessage,
42
42
  mergeMessages,
@@ -383,7 +383,7 @@ var XlsxWorkerClient = class {
383
383
  }
384
384
  async getMainRuntime() {
385
385
  if (this.disposed) throw createAbortError();
386
- this.mainRuntime ??= import("./workbook-runtime-UIWE4FQ7.js").then(({ createWorkbookRuntime }) => createWorkbookRuntime());
386
+ this.mainRuntime ??= import("./workbook-runtime-MVU32DIU.js").then(({ createWorkbookRuntime }) => createWorkbookRuntime());
387
387
  const runtime = await this.mainRuntime;
388
388
  if (this.disposed) {
389
389
  runtime.dispose();
@@ -6020,13 +6020,15 @@ function resolveCanvasGradientFill(context, rect, backgroundImage) {
6020
6020
  }
6021
6021
  return null;
6022
6022
  }
6023
+ var DATA_BAR_INSET = 2;
6024
+ var DATA_BAR_GRADIENT_TINT = 0.85;
6023
6025
  function resolveCanvasDataBarFill(context, left, top, width, _height, dataBar) {
6024
6026
  if (dataBar.gradient === false) {
6025
6027
  return dataBar.color;
6026
6028
  }
6027
6029
  const gradient = context.createLinearGradient(left, top, left + width, top);
6028
- gradient.addColorStop(0, lightenColor(dataBar.color, 0.28));
6029
- gradient.addColorStop(1, dataBar.color);
6030
+ gradient.addColorStop(0, dataBar.color);
6031
+ gradient.addColorStop(1, lightenColor(dataBar.color, DATA_BAR_GRADIENT_TINT));
6030
6032
  return gradient;
6031
6033
  }
6032
6034
  function drawCanvasConditionalIcon(context, icon, centerX, centerY, size) {
@@ -8972,8 +8974,8 @@ function resolveConditionalDataBarForCell(row2, col, worksheet, sheet, metricsCa
8972
8974
  if (minValue === null || maxValue === null) {
8973
8975
  return null;
8974
8976
  }
8975
- const minLength = Number.isFinite(matchingRule.minLength ?? Number.NaN) ? matchingRule.minLength ?? 0 : 0;
8976
- const maxLength = Number.isFinite(matchingRule.maxLength ?? Number.NaN) ? matchingRule.maxLength ?? 100 : 100;
8977
+ const minLength = Number.isFinite(matchingRule.minLength ?? Number.NaN) ? matchingRule.minLength ?? 10 : 10;
8978
+ const maxLength = Number.isFinite(matchingRule.maxLength ?? Number.NaN) ? matchingRule.maxLength ?? 90 : 90;
8977
8979
  const span = maxValue - minValue;
8978
8980
  const ratio = span === 0 ? numericValue >= maxValue ? 1 : 0 : (numericValue - minValue) / span;
8979
8981
  const widthPercent = minLength + Math.max(0, Math.min(1, ratio)) * (maxLength - minLength);
@@ -9387,22 +9389,19 @@ function GridRow({
9387
9389
  "aria-hidden": "true",
9388
9390
  style: {
9389
9391
  alignItems: "center",
9390
- bottom: 4 * zoomFactor,
9391
9392
  display: "flex",
9392
- left: 4 * zoomFactor,
9393
+ inset: DATA_BAR_INSET * zoomFactor,
9393
9394
  pointerEvents: "none",
9394
9395
  position: "absolute",
9395
- right: 4 * zoomFactor,
9396
- top: 4 * zoomFactor,
9397
9396
  zIndex: 0
9398
9397
  },
9399
9398
  children: /* @__PURE__ */ jsx9(
9400
9399
  "div",
9401
9400
  {
9402
9401
  style: {
9403
- background: cellData.conditionalDataBar.gradient === false ? cellData.conditionalDataBar.color : `linear-gradient(90deg, ${lightenColor(cellData.conditionalDataBar.color, 0.28)} 0%, ${cellData.conditionalDataBar.color} 100%)`,
9402
+ background: cellData.conditionalDataBar.gradient === false ? cellData.conditionalDataBar.color : `linear-gradient(90deg, ${cellData.conditionalDataBar.color} 0%, ${lightenColor(cellData.conditionalDataBar.color, DATA_BAR_GRADIENT_TINT)} 100%)`,
9404
9403
  border: cellData.conditionalDataBar.border !== false && cellData.conditionalDataBar.borderColor ? `1px solid ${cellData.conditionalDataBar.borderColor}` : "none",
9405
- borderRadius: 2,
9404
+ boxSizing: "border-box",
9406
9405
  height: "100%",
9407
9406
  opacity: 1,
9408
9407
  width: `${cellData.conditionalDataBar.widthPercent}%`
@@ -10424,10 +10423,10 @@ function useXlsxViewerThumbnails(options = {}) {
10424
10423
  context.fillStyle = gradientFill ?? fillColor;
10425
10424
  context.fillRect(rect.left, rect.top, rect.width, rect.height);
10426
10425
  if (cellData.conditionalDataBar) {
10427
- const barLeft = rect.left + 4;
10428
- const barTop = rect.top + 4;
10429
- const barWidth = Math.max(0, (rect.width - 8) * (cellData.conditionalDataBar.widthPercent / 100));
10430
- const barHeight = Math.max(0, rect.height - 8);
10426
+ const barLeft = rect.left + DATA_BAR_INSET;
10427
+ const barTop = rect.top + DATA_BAR_INSET;
10428
+ const barWidth = Math.max(0, (rect.width - DATA_BAR_INSET * 2) * (cellData.conditionalDataBar.widthPercent / 100));
10429
+ const barHeight = Math.max(0, rect.height - DATA_BAR_INSET * 2);
10431
10430
  if (barWidth > 0 && barHeight > 0) {
10432
10431
  context.fillStyle = resolveCanvasDataBarFill(
10433
10432
  context,