@office-kit/pptx-preview 0.9.4 → 0.9.5
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-
|
|
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";
|
|
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-
|
|
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";
|
|
2
2
|
import { getSlideSize } from "@office-kit/pptx";
|
|
3
3
|
import { Resvg } from "@resvg/resvg-js";
|
|
4
4
|
import * as fontkit from "fontkit";
|
|
@@ -3164,7 +3164,7 @@ const renderColumnChart = (f, spec, colors) => {
|
|
|
3164
3164
|
const top = f.plotY + f.plotH - (v - min) / range * f.plotH;
|
|
3165
3165
|
const y0 = Math.min(top, baseY);
|
|
3166
3166
|
const h = Math.abs(top - baseY);
|
|
3167
|
-
const baseColor = spec.varyColors && spec.series.length === 1 ? colors[c % colors.length] : spec.series[s]?.color ?? colors[s % colors.length];
|
|
3167
|
+
const baseColor = spec.series[s]?.pointColors?.[c] ?? (spec.varyColors && spec.series.length === 1 ? colors[c % colors.length] : spec.series[s]?.color ?? colors[s % colors.length]);
|
|
3168
3168
|
const fillColor = v < 0 && spec.series[s]?.invertIfNegative ? mixHex(baseColor, "#000000", .55) : baseColor;
|
|
3169
3169
|
out.push(`<rect x="${px(x0)}" y="${px(y0)}" width="${px(barW)}" height="${px(h)}" fill="${fillColor}"/>`);
|
|
3170
3170
|
if (showLabelFor(s)) {
|
|
@@ -3407,7 +3407,7 @@ const renderBarChart = (f, spec, colors) => {
|
|
|
3407
3407
|
const tip = f.plotX + (v - min) / range * f.plotW;
|
|
3408
3408
|
const x0 = Math.min(tip, baseX);
|
|
3409
3409
|
const w = Math.abs(tip - baseX);
|
|
3410
|
-
const baseColor = spec.varyColors && spec.series.length === 1 ? colors[c % colors.length] : spec.series[s]?.color ?? colors[s % colors.length];
|
|
3410
|
+
const baseColor = spec.series[s]?.pointColors?.[c] ?? (spec.varyColors && spec.series.length === 1 ? colors[c % colors.length] : spec.series[s]?.color ?? colors[s % colors.length]);
|
|
3411
3411
|
const fillColor = v < 0 && spec.series[s]?.invertIfNegative ? mixHex(baseColor, "#000000", .55) : baseColor;
|
|
3412
3412
|
out.push(`<rect x="${px(x0)}" y="${px(y0)}" width="${px(w)}" height="${px(barH)}" fill="${fillColor}"/>`);
|
|
3413
3413
|
if (showLabelForBar(s)) {
|
|
@@ -4951,4 +4951,4 @@ const auditTextLayout = (pres, options = {}) => {
|
|
|
4951
4951
|
//#endregion
|
|
4952
4952
|
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
4953
|
|
|
4954
|
-
//# sourceMappingURL=src-
|
|
4954
|
+
//# sourceMappingURL=src-BqJTKEQf.js.map
|