pptx-kit 0.7.0 → 0.8.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.
- package/CHANGELOG.md +17 -0
- package/dist/{api-DJkYUL_0.js → api-284n4GCu.js} +8 -4
- package/dist/api-284n4GCu.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/node.js +1 -1
- package/package.json +3 -3
- package/dist/api-DJkYUL_0.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# pptx-kit
|
|
2
2
|
|
|
3
|
+
## 0.8.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 7200690: Drop Node.js 22 support. The minimum supported version is now Node 24.16. The published runtime bundles are unchanged; this only raises the `engines` floor and the CI/test matrix to Node 24.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- ffeaef0: Numbered lists now carry a bullet font and explicit start number
|
|
12
|
+
|
|
13
|
+
`setShapeBullets('number')` / `setParagraphBullet(..., 'number')` emitted only
|
|
14
|
+
`<a:buAutoNum>`, with no `<a:buFont>` — so the auto-number glyph fell through to
|
|
15
|
+
whatever font happened to apply, instead of the theme's major font that
|
|
16
|
+
PowerPoint and PptxGenJS use. Numbered lists now emit
|
|
17
|
+
`<a:buFont typeface="+mj-lt"/>` ahead of the number and write the default
|
|
18
|
+
`startAt="1"` explicitly, matching PowerPoint-authored output.
|
|
19
|
+
|
|
3
20
|
## 0.7.0
|
|
4
21
|
|
|
5
22
|
### Minor Changes
|
|
@@ -1501,8 +1501,11 @@ const textBodyText = (txBody) => {
|
|
|
1501
1501
|
const NAME_BU_CHAR = qname("a", "buChar", NS.dml);
|
|
1502
1502
|
const NAME_BU_AUTO_NUM = qname("a", "buAutoNum", NS.dml);
|
|
1503
1503
|
const NAME_BU_NONE$1 = qname("a", "buNone", NS.dml);
|
|
1504
|
+
const NAME_BU_FONT = qname("a", "buFont", NS.dml);
|
|
1504
1505
|
const ATTR_CHAR = qname("", "char", "");
|
|
1505
1506
|
const ATTR_BU_TYPE = qname("", "type", "");
|
|
1507
|
+
const ATTR_START_AT = qname("", "startAt", "");
|
|
1508
|
+
const ATTR_TYPEFACE$2 = qname("", "typeface", "");
|
|
1506
1509
|
const NAME_P$5 = qname("a", "p", NS.dml);
|
|
1507
1510
|
const NAME_R$4 = qname("a", "r", NS.dml);
|
|
1508
1511
|
const NAME_T$5 = qname("a", "t", NS.dml);
|
|
@@ -1650,7 +1653,7 @@ const buildBulletElement = (style) => {
|
|
|
1650
1653
|
const n = normalizeBulletStyle(style);
|
|
1651
1654
|
switch (n.kind) {
|
|
1652
1655
|
case "char": return elem(NAME_BU_CHAR, { attrs: [attr(ATTR_CHAR, n.char)] });
|
|
1653
|
-
case "autoNum": return elem(NAME_BU_AUTO_NUM, { attrs: [attr(ATTR_BU_TYPE, n.type)] });
|
|
1656
|
+
case "autoNum": return elem(NAME_BU_AUTO_NUM, { attrs: [attr(ATTR_START_AT, "1"), attr(ATTR_BU_TYPE, n.type)] });
|
|
1654
1657
|
case "none": return elem(NAME_BU_NONE$1);
|
|
1655
1658
|
}
|
|
1656
1659
|
};
|
|
@@ -1726,13 +1729,14 @@ const applyBulletToParagraph = (paragraph, style) => {
|
|
|
1726
1729
|
pPr = elem(NAME_PPR_FOR_BULLET);
|
|
1727
1730
|
paragraph.children.unshift(pPr);
|
|
1728
1731
|
}
|
|
1729
|
-
pPr.children = pPr.children.filter((c) => !(c.kind === "element" && c.name.namespaceURI === NS.dml && (c.name.localName === "buChar" || c.name.localName === "buAutoNum" || c.name.localName === "buNone")));
|
|
1732
|
+
pPr.children = pPr.children.filter((c) => !(c.kind === "element" && c.name.namespaceURI === NS.dml && (c.name.localName === "buChar" || c.name.localName === "buAutoNum" || c.name.localName === "buNone" || c.name.localName === "buFont")));
|
|
1730
1733
|
if (style !== "none") {
|
|
1731
1734
|
const lvl = Number.parseInt(pPr.attrs.find((a) => a.name.localName === "lvl")?.value ?? "0", 10);
|
|
1732
1735
|
const { marL, indent } = bulletIndentForLevel(Number.isFinite(lvl) ? lvl : 0);
|
|
1733
1736
|
if (!hasAttr(pPr, "marL")) pPr.attrs.push(attr(ATTR_MAR_L$1, String(marL)));
|
|
1734
1737
|
if (!hasAttr(pPr, "indent")) pPr.attrs.push(attr(ATTR_INDENT$1, String(indent)));
|
|
1735
1738
|
}
|
|
1739
|
+
if (normalizeBulletStyle(style).kind === "autoNum") pPr.children.push(elem(NAME_BU_FONT, { attrs: [attr(ATTR_TYPEFACE$2, "+mj-lt")] }));
|
|
1736
1740
|
pPr.children.push(buildBulletElement(style));
|
|
1737
1741
|
};
|
|
1738
1742
|
/**
|
|
@@ -16045,8 +16049,8 @@ const mergePresentations = (targetPres, sourcePres, targetLayout) => {
|
|
|
16045
16049
|
};
|
|
16046
16050
|
//#endregion
|
|
16047
16051
|
//#region src/api/index.ts
|
|
16048
|
-
const VERSION = "0.
|
|
16052
|
+
const VERSION = "0.8.0";
|
|
16049
16053
|
//#endregion
|
|
16050
16054
|
export { addSlideLine as $, getTableRowHeights as $a, getAllTables as $i, getUnusedSlideMasters as $n, findChartsWithDataLabels as $o, setParagraphSpacing as $r, getSlideCommentAuthors as $s, getShapeStrokeWidth as $t, getShapeAt as A, getSlideMediaPartNames as Aa, hasShapeText as Ai, getMaxShapeIdInPresentation as An, setCoreProperties as Ao, setShapeStrokeJoin as Ar, setSlideBackgroundImage as As, setShapeTextFormat as At, getSlideXmlString as B, getTableCellAlignment as Ba, setSlideSize as Bi, getShapeKind as Bn, getSlideLayoutType as Bo, getParagraphSpacing as Br, findCommentsByAuthor as Bs, getShapeGradientFill as Bt, findSlidesByText as C, setSlideTransition as Ca, getShapeImageDuotone as Ci, translateShapes as Cn, removeThumbnail as Co, setShapeRotation as Cr, getSlideLayoutShapes as Cs, setShapeBullets as Ct, getPresentationText as D, getOrphanMediaPartNames as Da, getShapeImageOpacity as Di, getGroupChildren as Dn, getPresentationCreated as Do, setShapeStrokeCap as Dr, getSlideMasterBackgroundPatternFill as Ds, setShapeTextBodyRotationDeg as Dt, getPresentationShapeCountsBySlide as E, getMediaParts as Ea, getShapeImageLinkUrl as Ei, findShapesInRect as En, getExtendedProperties as Eo, setShapeStrokeArrow as Er, getSlideMasterBackgroundImageBytes as Es, setShapeTextAutoFit as Et, getSlideLayoutCount as F, validatePresentation as Fa, setShapeImageOpacity as Fi, getShapeCenter as Fn, findSlideLayoutByPartName as Fo, getParagraphBulletImageBytes as Fr, clearAllSlideComments as Fs, getShapeEffect as Ft, replaceTextInPresentation as G, getTableCellParagraphs as Ga, findSlidesByHyperlink as Gi, getShapePreset as Gn, getParagraphPropertiesEffective as Go, getShapeRunCount as Gr, getCommentDate as Gs, getShapeFillEffective as Gt, getSlidesByLayout as H, getTableCellBorders as Ha, clearAllHyperlinks as Hi, getShapePlaceholderIdx as Hn, getSlideLayoutUsageCountsByType as Ho, getShapeParagraphCount as Hr, findSlidesWithCommentsByAuthor as Hs, getShapeFill as Ht, getSlideOutline as I, clearTableCellFill as Ia, SLIDE_SIZE_16_10 as Ii, getShapeCustomGeometry as In, findSlideLayoutByType as Io, getParagraphBulletStyle as Ir, clearSlideComments as Is, getShapeEffects as It, replaceTokensInPresentation as J, getTableCellText as Ja, getAllCharts as Ji, getShapeText as Jn, setShapeHyperlink as Jo, getShapeRunText as Jr, getCommentText as Js, getShapeStrokeColor as Jt, replaceTextInSlide as K, getTableCellPosition as Ka, findSlidesWithChartKind as Ki, getShapeRotation as Kn, getShapeHyperlink as Ko, getShapeRunHyperlink as Kr, getCommentPosition as Ks, getShapeStroke as Kt, getSlidePartName as L, getPresentationTableCountsBySlide as La, SLIDE_SIZE_16_9 as Li, getShapeDescription as Ln, getSlideLayoutName as Lo, getParagraphIndent as Lr, findCommentAuthorByName as Ls, getShapeEffectsEffective as Lt, getSlideCount as M, readPackagePart as Ma, setShapeImageBrightness as Mi, getShapeAltTitle as Mn, touchModified as Mo, resolveDrawingColor as Mr, setShapeClickAction as Ms, setShapeTextWrap as Mt, getSlideIndex as N, setMediaPartBytes as Na, setShapeImageContrast as Ni, getShapeBounds as Nn, findLayoutsWithPlaceholderType as No, getParagraphAlignment as Nr, setShapeImage as Ns, clearShapeEffects as Nt, getPresentationTextLength as O, getPackageSize as Oa, getShapeImagePartName as Oi, getGroupTransform as On, getPresentationModified as Oo, setShapeStrokeCompound as Or, getSlideMasterShapes as Os, setShapeTextColumns as Ot, getSlideInfo as P, slidesUsingMediaPart as Pa, setShapeImageCrop as Pi, getShapeBoundsResolved as Pn, findSlideLayout as Po, getParagraphBullet as Pr, addSlideComment as Ps, findShapesByEffect as Pt, addSlideImage as Q, getTableDimensions as Qa, getAllNotes as Qi, getSlideMasterUsageCounts as Qn, findChartsBySeriesName as Qo, setParagraphLevel as Qr, getPresentationCommenters as Qs, getShapeStrokeJoin as Qt, getSlideText as R, getSlideTables as Ra, SLIDE_SIZE_4_3 as Ri, getShapeFlip as Rn, getSlideLayoutPartName as Ro, getParagraphLevel as Rr, findCommentsAfter as Rs, setShapeGlow as Rt, findSlidesByNotes as S, getSlideTransition as Sa, getShapeImageCrop as Si, setSlideLayout as Sn, getThumbnail as So, setShapePosition as Sr, getSlideLayoutBackgroundShapes as Ss, setShapeAlignment as St, getOutlineText as T, compactPackage as Ta, getShapeImageFormat as Ti, findShapesAtPoint as Tn, getCoreProperties as To, setShapeStroke as Tr, getSlideMasterBackgroundGradientFill as Ts, setShapeTextAnchor as Tt, isSlideHidden as U, getTableCellFill as Ua, clearAllSlideNotes as Ui, getShapePlaceholderType as Un, getSlideLayouts as Uo, getShapeParagraphElements as Ur, getCommentAuthor as Us, getShapeFillColor as Ut, getSlides as V, getTableCellAnchor as Va, appendSlideNotes as Vi, getShapeName as Vn, getSlideLayoutUsageCounts as Vo, getShapeHyperlinkTooltip as Vr, findCommentsByText as Vs, getShapeGradientFillEffective as Vt, replaceTextInNotes as W, getTableCellMargins as Wa, clearSlideHyperlinks as Wi, getShapePosition as Wn, getUnusedSlideLayouts as Wo, getShapeRunClickAction as Wr, getCommentAuthors as Ws, getShapeFillColorResolved as Wt, setSlideHidden as X, getTableCells as Xa, getAllHyperlinks as Xi, getSlideMasterPartName as Xn, addSlideChart as Xo, setParagraphAlignment as Xr, getPresentationCommentCountsByAuthor as Xs, getShapeStrokeCompound as Xt, searchSlides as Y, getTableCellTextDirection as Ya, getAllComments as Yi, getSlideMasterCount as Yn, setShapeRunFormat as Yo, isParagraphBulletPicture as Yr, getCommentsSortedByDate as Ys, getShapeStrokeColorResolved as Yt, slideHasAnimations as Z, getTableColumnWidths as Za, getAllImages as Zi, getSlideMasterPartNames as Zn, findChartByKind as Zo, setParagraphBullet as Zr, getPresentationCommentCountsBySlide as Zs, getShapeStrokeEffective as Zt, getSlideSections as _, hasSlideNotes as _a, getPresentationImageCountsBySlide as _i, getShapesBounds as _n, setTableCellTextFormat as _o, setShapeGradientFill as _r, getSlideColorMapOverride as _s, getShapeTextBodyRotationDeg as _t, addSlide as a, getPresentationNotesLengthsBySlide as aa, loadPresentation as ac, setSlidePlaceholders as ai, findShapesByHyperlink as an, isChartShape as ao, setShapeAltTitle as ar, getShapeChartSeriesNames as as, clearSlideShapes as at, findSlideByText as b, setSlideNotes as ba, getShapeImageBytes as bi, getSlidesWithEmptyPlaceholders as bn, setTableStyleFlags as bo, setShapeNoStroke as br, getSlideLayoutBackgroundImageBytes as bs, getShapeTextMargins as bt, duplicateSlide as c, getSlideNotesLength as ca, emu as cc, findShapesWithAnimation as ci, findShapesByPreset as cn, removeTableColumn as co, setShapeHidden as cr, getSlideCharts as cs, removeShape as ct, mergePresentations as d, getSlidesWithHyperlinks as da, pt as dc, findFlippedShapes as di, findSlidePlaceholder as dn, setTableCellAnchor as do, clearShapeStroke as dr, resolveDeckBodyTextColor as ds, setShapeZIndex as dt, getDistinctHyperlinkUrls as ea, getSlideComments as ec, setShapeRunHyperlink as ei, findEmptyPlaceholders as en, getTableSize as eo, isShapeHidden as er, findChartsWithTrendlines as es, addSlideShape as et, moveSlide as f, getSlidesWithImages as fa, findOverlappingShapePairs as fi, findSlidePlaceholderByIdx as fn, setTableCellBorders as fo, getShapePatternFill as fr, clearSlideBackground as fs, appendShapeText as ft, swapSlides as g, getVisibleSlides as ga, findSlidesByLayoutType as gi, getShapeXmlString as gn, setTableCellTextDirection as go, setShapeFlip as gr, getSlideBackgroundPatternFill as gs, getShapeTextAutoFitParams as gt, sortSlides as h, getSlidesWithTables as ha, findSlidesByLayoutPartName as hi, getShapeSlide as hn, setTableCellText as ho, setShapeFill as hr, getSlideBackgroundImageBytes as hs, getShapeTextAutoFit as ht, addSectionHeaderSlide as i, getPresentationNotesLength as ia, createPresentation as ic, setSlideBody as ii, findShapeInPresentation as in, insertTableRow as io, renameShape as ir, getShapeChartKind as is, bringShapeToFront as it, getSlideAt as j, listPackageParts as ja, isShapeImageGrayscale as ji, getShapeAdjustValues as jn, setExtendedProperties as jo, getShapeRunFormat as jr, getShapeClickAction as js, setShapeTextMargins as jt, getPresentationTextLengthsBySlide as k, getPresentationSummary as ka, hasShapeImage as ki, getMaxShapeId as kn, incrementRevision as ko, setShapeStrokeDash as kr, setSlideBackground as ks, setShapeTextDirection as kt, duplicateSlideAt as l, getSlidesWithCharts as la, inches as lc, getShapeAnimation as li, findShapesByText as ln, removeTableRow as lo, shapesOverlap as lr, setChartSpec as ls, sendShapeBackward as lt, reverseSlides as m, getSlidesWithOverlap as ma, findSlidesByLayoutName as mi, getShapeIndex as mn, setTableCellMargins as mo, getShapeStrokeDash as mr, getSlideBackgroundGradientFill as ms, getShapeTextAnchor as mt, addBlankSlide as n, getHiddenSlides as na, getPresentationFonts as nc, getSlideBody as ni, findShapeByName as nn, getTableStyleId as no, isShapeTextBox as nr, getPresentationChartKindCounts as ns, addSlideTextBox as nt, addSlideAt as o, getPresentationNotesText as oa, savePresentation as oc, setSlideTitle as oi, findShapesByKind as on, isTableShape as oo, setShapeBounds as or, getShapeChartSeriesValues as os, copyShape as ot, removeSlide as p, getSlidesWithNotes as pa, findShapesOutsideCanvas as pi, findSlidePlaceholders as pn, setTableCellFill as po, getShapeStrokeArrow as pr, getSlideBackground as ps, getShapeBodyPrEffective as pt, replaceTextInSlideNotes as q, getTableCellSpan as qa, findSlidesWithChartTrendlines as qi, getShapeSize as qn, getShapeRunFormatEffective as qo, getShapeRunHyperlinkTooltip as qr, getCommentSlide as qs, getShapeStrokeCap as qt, addContentSlide as r, getPresentationHyperlinkCountsBySlide as ra, getPresentationTheme as rc, getSlideTitle as ri, findShapeByText as rn, insertTableColumn as ro, pointInShape as rr, getShapeChartCategories as rs, bringShapeForward as rt, addTitleSlide as s, getSlideNotes as sa, cm as sc, clearSlideAnimations as si, findShapesByName as sn, mergeTableCells as so, setShapeDescription as sr, getShapeChartSpec as ss, getShapeZIndex as st, VERSION as t, getEmptySlides as ta, removeSlideComment as tc, setShapeRunText as ti, findShapeById as tn, getTableStyleFlags as to, isShapePlaceholder as tr, getPresentationChartCountsBySlide as ts, addSlideTable as tt, importSlide as u, getSlidesWithComments as ua, mm as uc, setShapeAnimation as ui, findShapesWithHyperlinks as un, setTableCellAlignment as uo, clearShapeFill as ur, getEffectiveColorMap as us, sendShapeToBack as ut, setSlideSections as v, removeSlideNotes as va, getShapeImageBiLevelThreshold as vi, getSlideLayout as vn, setTableColumnWidth as vo, setShapeImageFill as vr, getSlideLayoutBackground as vs, getShapeTextColumns as vt, getAllShapes as w, _internalPackageOf as wa, getShapeImageFillBytes as wi, centerShapeOnSlide as wn, setThumbnail as wo, setShapeSize as wr, getSlideMasterBackground as ws, setShapeText as wt, findSlideByTitle as x, clearSlideTransition as xa, getShapeImageContrast as xi, replaceTokensInSlide as xn, setTableStyleId as xo, setShapePatternFill as xr, getSlideLayoutBackgroundPatternFill as xs, getShapeTextWrap as xt, findSlideByPartName as y, replaceHyperlink as ya, getShapeImageBrightness as yi, getSlideShapes as yn, setTableRowHeight as yo, setShapeNoFill as yr, getSlideLayoutBackgroundGradientFill as ys, getShapeTextDirection as yt, getSlideTextLength as z, getTableCell as za, getSlideSize as zi, getShapeId as zn, getSlideLayoutPlaceholders as zo, getParagraphLineSpacing as zr, findCommentsBefore as zs, setShapeShadow as zt };
|
|
16051
16055
|
|
|
16052
|
-
//# sourceMappingURL=api-
|
|
16056
|
+
//# sourceMappingURL=api-284n4GCu.js.map
|