@office-kit/pptx 0.24.1 → 0.26.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 CHANGED
@@ -1,5 +1,31 @@
1
1
  # @office-kit/pptx
2
2
 
3
+ ## 0.26.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 8cd5678: `secondaryValueAxis` now takes its scaling fields directly, the same shape as `valueAxis`: `secondaryValueAxis: { min: 0, max: 100, numberFormat: '0"%"', title: 'Rate' }`. Before, they had to be nested under `scaling` (`secondaryValueAxis: { scaling: { min: 0, max: 100 } }`), so code written like the primary axis failed to type-check with "Object literal may only specify known properties".
8
+
9
+ The nested `scaling` form still works on write but is deprecated. Combining it with the flat fields throws, because the two would disagree.
10
+
11
+ **Read shape change:** `getSlideCharts` / `readChartSpec` now return the secondary axis's `min`, `max`, `majorUnit`, `minorUnit`, `numberFormat`, `logBase`, `displayUnits` and `displayUnitsLabel` directly on `secondaryValueAxis`, no longer under `secondaryValueAxis.scaling`. Code that reads `spec.secondaryValueAxis.scaling.max` should read `spec.secondaryValueAxis.max`. A spec read from a file and passed back to `setChartSpec` round-trips unchanged.
12
+
13
+ ## 0.25.0
14
+
15
+ ### Minor Changes
16
+
17
+ - e46d45b: `compactPackage` now removes every part that cannot be reached from the package root (`/_rels/.rels`) through internal relationships, not only `/ppt/media/` parts. This drops the charts, embedded workbooks, notes slides and tags that `removeSlide` leaves behind, so the saved file no longer carries a removed slide's chart data. Any other part nothing points at, such as custom data added without a relationship, is removed too. If the root relationships do not reach `/ppt/presentation.xml`, nothing is removed. `getOrphanMediaPartNames` follows the same rule, so media used only by an unreachable part now counts as orphaned. In the editor, copied slides and shapes no longer carry the other slides' notes, charts and workbooks.
18
+ - 2bcceca: New `setChartData(chart, { kind?, categories?, series? })` replaces the data of a bar, column, line, area, pie or doughnut chart. When the kind and the set of series names stay the same, it rewrites only the cached values and their ranges in the chart part, so formatting from another app (colors, number formats, layout, extensions) is kept; changing the kind or the series builds the chart again through `setChartSpec`, carrying over its title, axis titles, legend and series colors. The embedded workbook is rewritten either way. It throws when `categories` or `series` is empty, when a series does not have one value per category, and on charts of other kinds; a date category axis takes its categories as date serial numbers.
19
+
20
+ ### Patch Changes
21
+
22
+ - 3293e4a: Charts now write their axis tick marks even when none are authored. An absent `<c:majorTickMark>` / `<c:minorTickMark>` means `cross` in the schema, so some apps drew ticks crossing every axis. The defaults written are: value axes (including a scatter / bubble chart's horizontal axis and the secondary value axis) major `out`, minor `none`; the category axis major `none` on bar and column charts and `out` on the others, minor `none`; the series (depth) axis of 3-D and surface charts major `out`, minor `none`. Authored `*TickMark` fields are written as before. Reading such a chart back now reports these tick marks.
23
+ - 3293e4a: Fixed two problems with `ChartSeries.pointDataLabels`. A per-point label with literal `text` lost its `textStyle` (color, bold, size, font), because apps ignore a label's `<c:txPr>` once it carries its own text; the style is now also written into the label's rich text. And setting `pointDataLabels` without the series-level `dataLabels` threw at build time even though the types allow it; the other points of the series now keep the chart-level `dataLabels` (or show no label when there are none), so a per-point override no longer hides the labels of its neighbours. That fallback is written as the series' own labels, so reading such a chart back reports it as the series' `dataLabels`, and a later change to the chart-level `dataLabels` no longer reaches that series.
24
+ - a27d7f1: Fixed: loading a `.pptx` with many parts took time quadratic in the part count, because each part's content type was found by scanning every `<Override>` in `[Content_Types].xml` and each part lookup scanned every part. A package with 30,000 parts and overrides took about 7 seconds to load; it now takes about a quarter of a second.
25
+ - a27d7f1: Fixed: a small `.pptx` whose ZIP entries understate their decompressed size could block `loadPresentation` for seconds or minutes. The load now throws as soon as an entry outgrows its declared size, so decompression work is bounded by the uncompressed sizes recorded in the archive's central directory (plus at most about 17 MB per load).
26
+
27
+ `loadPresentation` also now throws on malformed archives it used to read silently: an entry whose data is shorter than declared, an entry declaring more data than its compressed bytes could possibly hold, a stored entry whose two sizes differ, two entries with the same name, and offsets or sizes that point outside the file. Errors for corrupt compressed data now start with `invalid ZIP:` and name the entry.
28
+
3
29
  ## 0.24.1
4
30
 
5
31
  ### Patch Changes
package/README.md CHANGED
@@ -332,9 +332,10 @@ and a next-actions table. Use labelled sample data where needed.
332
332
  The [skill](skill/SKILL.md) creates a TSX project, starts the interactive preview,
333
333
  checks the source and exports an editable PPTX. Ask for changes in the same
334
334
  conversation; the preview updates as the agent edits TSX. It plans the storyline for
335
- either a talk or a deck people read and decide from, and checks the headlines and
336
- Japanese wording before delivery ([talk](skill/references/story-talk.md),
337
- [document](skill/references/story-document.md), [review](skill/references/review.md)).
335
+ either a talk or a deck people read and decide from, applies type, color, chart and
336
+ table rules, and checks the headlines and Japanese wording before delivery
337
+ ([talk](skill/references/story-talk.md), [document](skill/references/story-document.md),
338
+ [design](skill/references/design.md), [review](skill/references/review.md)).
338
339
  You need Node.js 22.18+
339
340
  and Git alongside Claude Code. See the
340
341
  [authoring guide](https://office-kit.github.io/pptx/docs/authoring) for template