@office-kit/pptx-preview 0.9.5 → 0.9.6

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.
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { a as MONO, c as TIMES, d as substituteFamily, l as defaultMeasurer, n as renderSlideSvg, o as SANS, r as ARIAL, s as SERIF, t as auditTextLayout } from "./src-BqJTKEQf.js";
1
+ import { a as MONO, c as TIMES, d as substituteFamily, l as defaultMeasurer, n as renderSlideSvg, o as SANS, r as ARIAL, s as SERIF, t as auditTextLayout } from "./src-Co9vu5ZE.js";
2
2
  export { ARIAL, MONO, SANS, SERIF, TIMES, auditTextLayout, defaultMeasurer, renderSlideSvg as renderSlideToSvg, substituteFamily };
package/dist/node.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as MONO, c as TIMES, d as substituteFamily, i as AVG_GLYPH_W_RATIO, l as defaultMeasurer, n as renderSlideSvg, o as SANS, r as ARIAL, s as SERIF, t as auditTextLayout, u as isCjk } from "./src-BqJTKEQf.js";
1
+ import { a as MONO, c as TIMES, d as substituteFamily, i as AVG_GLYPH_W_RATIO, l as defaultMeasurer, n as renderSlideSvg, o as SANS, r as ARIAL, s as SERIF, t as auditTextLayout, u as isCjk } from "./src-Co9vu5ZE.js";
2
2
  import { getSlideSize } from "@office-kit/pptx";
3
3
  import { Resvg } from "@resvg/resvg-js";
4
4
  import * as fontkit from "fontkit";
@@ -3745,6 +3745,8 @@ const renderScatterChart = (f, spec, colors) => {
3745
3745
  if (allX.length === 0) return "";
3746
3746
  const xB = scatterAxisBounds(allX);
3747
3747
  const yB = scatterAxisBounds(allY);
3748
+ if (spec.categoryAxisScaling?.min !== void 0) xB.min = spec.categoryAxisScaling.min;
3749
+ if (spec.categoryAxisScaling?.max !== void 0) xB.max = spec.categoryAxisScaling.max;
3748
3750
  if (spec.valueAxis?.min !== void 0) yB.min = spec.valueAxis.min;
3749
3751
  if (spec.valueAxis?.max !== void 0) yB.max = spec.valueAxis.max;
3750
3752
  const xRange = xB.max - xB.min || 1;
@@ -3790,6 +3792,8 @@ const renderBubbleChart = (f, spec, colors) => {
3790
3792
  if (allX.length === 0) return "";
3791
3793
  const xB = scatterAxisBounds(allX);
3792
3794
  const yB = scatterAxisBounds(allY);
3795
+ if (spec.categoryAxisScaling?.min !== void 0) xB.min = spec.categoryAxisScaling.min;
3796
+ if (spec.categoryAxisScaling?.max !== void 0) xB.max = spec.categoryAxisScaling.max;
3793
3797
  if (spec.valueAxis?.min !== void 0) yB.min = spec.valueAxis.min;
3794
3798
  if (spec.valueAxis?.max !== void 0) yB.max = spec.valueAxis.max;
3795
3799
  const xRange = xB.max - xB.min || 1;
@@ -3891,6 +3895,14 @@ const renderChart = (shape, x, y, w, h, transform, theme) => {
3891
3895
  return null;
3892
3896
  }
3893
3897
  if (!spec) return null;
3898
+ if (spec.kind === "stock") spec = {
3899
+ ...spec,
3900
+ kind: "line"
3901
+ };
3902
+ else if (spec.kind === "surface") spec = {
3903
+ ...spec,
3904
+ kind: "column"
3905
+ };
3894
3906
  const colors = accentSequence(theme);
3895
3907
  const isCartesian = spec.kind === "column" || spec.kind === "bar" || spec.kind === "line" || spec.kind === "area";
3896
3908
  const hasAxes = isCartesian || spec.kind === "scatter" || spec.kind === "bubble";
@@ -4951,4 +4963,4 @@ const auditTextLayout = (pres, options = {}) => {
4951
4963
  //#endregion
4952
4964
  export { MONO as a, TIMES as c, substituteFamily as d, AVG_GLYPH_W_RATIO as i, defaultMeasurer as l, renderSlideSvg as n, SANS as o, ARIAL as r, SERIF as s, auditTextLayout as t, isCjk as u };
4953
4965
 
4954
- //# sourceMappingURL=src-BqJTKEQf.js.map
4966
+ //# sourceMappingURL=src-Co9vu5ZE.js.map