@office-kit/pptx-preview 0.9.6 → 0.9.7
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-BCN48I0D.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-BCN48I0D.js";
|
|
2
2
|
import { getSlideSize } from "@office-kit/pptx";
|
|
3
3
|
import { Resvg } from "@resvg/resvg-js";
|
|
4
4
|
import * as fontkit from "fontkit";
|
|
@@ -2539,24 +2539,22 @@ const resolveTextBodyModel = (pres, shape, bounds, theme, phType, measure, defau
|
|
|
2539
2539
|
LINE_HEIGHT * lineHeightScale;
|
|
2540
2540
|
const numberLabels = Array.from({ length: paraData.length }, () => null);
|
|
2541
2541
|
{
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
let activeType = null;
|
|
2542
|
+
const counters = [];
|
|
2543
|
+
const types = [];
|
|
2545
2544
|
for (let i = 0; i < paraData.length; i++) {
|
|
2546
2545
|
const para = paraData[i];
|
|
2547
2546
|
const num = bulletAutoNumType(para.bulletStyle);
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
continue;
|
|
2547
|
+
const level = Math.max(0, para.level);
|
|
2548
|
+
for (let l = num === null ? level : level + 1; l < counters.length; l++) {
|
|
2549
|
+
counters[l] = 0;
|
|
2550
|
+
types[l] = null;
|
|
2553
2551
|
}
|
|
2554
|
-
if (
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
} else
|
|
2559
|
-
numberLabels[i] = formatAutoNum(num,
|
|
2552
|
+
if (num === null) continue;
|
|
2553
|
+
if (types[level] !== num) {
|
|
2554
|
+
counters[level] = 1;
|
|
2555
|
+
types[level] = num;
|
|
2556
|
+
} else counters[level] = (counters[level] ?? 0) + 1;
|
|
2557
|
+
numberLabels[i] = formatAutoNum(num, counters[level]);
|
|
2560
2558
|
}
|
|
2561
2559
|
}
|
|
2562
2560
|
if (authoredAutofit && autoFitScale === 1) {
|
|
@@ -4963,4 +4961,4 @@ const auditTextLayout = (pres, options = {}) => {
|
|
|
4963
4961
|
//#endregion
|
|
4964
4962
|
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 };
|
|
4965
4963
|
|
|
4966
|
-
//# sourceMappingURL=src-
|
|
4964
|
+
//# sourceMappingURL=src-BCN48I0D.js.map
|