@office-kit/pptx 0.17.0 → 0.18.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.
- package/CHANGELOG.md +55 -0
- package/dist/{api-DTHZaBPq.js → api-DlzYhUxG.js} +732 -64
- package/dist/api-DlzYhUxG.js.map +1 -0
- package/dist/{index-Bfvx6-CU.d.ts → index-CAPRpjn2.d.ts} +27 -11
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/node.d.ts +2 -2
- package/dist/node.js +1 -1
- package/package.json +1 -1
- package/dist/api-DTHZaBPq.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,60 @@
|
|
|
1
1
|
# @office-kit/pptx
|
|
2
2
|
|
|
3
|
+
## 0.18.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- c8bf75d: fix: `getParagraphAlignment` and `getTableCellAlignment` returned an invalid `algn` value from a file as if it were a valid alignment
|
|
8
|
+
|
|
9
|
+
Both getters cast the attribute straight to `ParagraphAlignment`, so a hand-edited or third-party deck with `algn="bogus"` handed `'bogus'` to typed code. They now parse the value, and anything outside `ST_TextAlignType` reads as `null` (unset), like the other alignment readers already did.
|
|
10
|
+
|
|
11
|
+
Their return type is now the new `ParagraphAlignmentToken` (`'l' | 'ctr' | 'r' | 'just' | 'dist' | 'justLow' | 'thaiDist'`) instead of the wider `ParagraphAlignment`. Runtime values are unchanged — these two getters have always returned the spec token, so `setParagraphAlignment(shape, 0, 'center')` reads back as `'ctr'` — but the old type also listed `'center'`, which let `getParagraphAlignment(…) === 'center'` compile although it can never be true. That comparison is now a type error; compare with `'ctr'`, or read the plain-English name from `getParagraphPropertiesEffective` / `getTableCellParagraphs`.
|
|
12
|
+
|
|
13
|
+
## 0.18.0
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- 7e89e62: Validate enum inputs at authoring boundaries and throw a descriptive `RangeError`
|
|
18
|
+
instead of writing invalid PowerPoint XML or silently selecting another mode.
|
|
19
|
+
|
|
20
|
+
Affected APIs:
|
|
21
|
+
|
|
22
|
+
- Shapes: `addSlideShape` preset and text anchor, including calls through the TSX DSL.
|
|
23
|
+
- Strokes and fills: `setShapeStrokeDash`, `setShapeStrokeCap`, `setShapeStrokeJoin`,
|
|
24
|
+
`setShapeStrokeCompound`, `setShapeStrokeArrow` (end, type, width, length), and
|
|
25
|
+
`setShapeGradientFill` path.
|
|
26
|
+
- Text: `setShapeAlignment`, `setParagraphAlignment`, `setShapeTextAnchor`,
|
|
27
|
+
`setShapeTextAutoFit`, `setShapeTextWrap`, `setShapeTextDirection`, `setShapeBullets`,
|
|
28
|
+
`setParagraphBullet`, and `setShapeText` bullets; `setShapeTextFormat`,
|
|
29
|
+
`setShapeRunFormat`, and `setShapeParagraphs` formatting and alignment.
|
|
30
|
+
- Tables: `setTableCellAlignment`, `setTableCellTextFormat`, `setTableCellParagraphs`,
|
|
31
|
+
`setTableCellTextDirection`, `setTableCellAnchor`, and `setTableCellBorders` dash.
|
|
32
|
+
- Charts: `addSlideChart` and `setChartSpec` kind, grouping, axes, legend, layout,
|
|
33
|
+
data labels, series markers, line dash, trendlines, error bars, and chart styles.
|
|
34
|
+
- Slides: `setSlideSize` type, `setSlideTransition` speed and split orientation,
|
|
35
|
+
and `setShapeAnimation` effect.
|
|
36
|
+
|
|
37
|
+
Previously accepted inputs such as preset `'rounded-rect'`, alignment `'middle'`,
|
|
38
|
+
stroke dash `'dotted'`, text auto-fit `'shrink'`, and auto-numbering `'bogus'` now
|
|
39
|
+
throw `RangeError`. Underline and strike strings must be exact XSD tokens:
|
|
40
|
+
use `'sng'` / `'sngStrike'` (or `true`), not `'single'`. Existing JavaScript
|
|
41
|
+
`null` values for underline, strike, and cap still remove the corresponding
|
|
42
|
+
attributes; their TypeScript types are unchanged.
|
|
43
|
+
|
|
44
|
+
Unknown chart kinds now throw `RangeError: addSlideChart: kind: … is not one of: …`
|
|
45
|
+
instead of `Error: unsupported chart kind: …`; `setChartSpec` uses its own API name
|
|
46
|
+
in the new message. Code that checks the exception class or message should adapt.
|
|
47
|
+
|
|
48
|
+
Valid ECMA-376 shape presets remain supported, including presets outside the
|
|
49
|
+
TypeScript autocomplete list. Rejected bullets and transitions preserve existing
|
|
50
|
+
content, and rejected table-cell alignment or text-format enums do not create a
|
|
51
|
+
text body.
|
|
52
|
+
|
|
53
|
+
### Patch Changes
|
|
54
|
+
|
|
55
|
+
- 7e89e62: fix: Preserve valid table XML when setting alignment on a covered merged cell whose text was dropped. Recreated text bodies now include the required paragraph, so the alignment is applied and survives saving and reloading.
|
|
56
|
+
- 64fa3c7: Fix nested list indentation when changing a paragraph's level after applying bullets or numbering, including after copying or reloading a presentation. Indentation that differs from the previous level's default pair is preserved.
|
|
57
|
+
|
|
3
58
|
## 0.17.0
|
|
4
59
|
|
|
5
60
|
### Minor Changes
|