@hirokisakabe/pom-cli 0.6.5 → 0.7.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/README.md CHANGED
@@ -21,7 +21,7 @@
21
21
 
22
22
  ## Installation
23
23
 
24
- > Requires Node.js 18+
24
+ > Requires Node.js 22+
25
25
 
26
26
  ```bash
27
27
  npm install -g @hirokisakabe/pom-cli
@@ -113,6 +113,8 @@ pom render slides.pom.md -o ./images
113
113
 
114
114
  The images are written to the output directory as `slide-01.png`, `slide-02.png`, ... The directory is created if it does not exist. The rendering pipeline is the same as the preview server, so the images match what you see in `pom preview`.
115
115
 
116
+ > **LibreOffice fallback caveat:** Current `pom render` uses `pptx-glimpse` directly and does not require LibreOffice. If you are using an older `pom-cli` / `pptx-glimpse` version or a fallback workflow that converts PPTX through LibreOffice before PNG output, pure numeric text with leading zeros (for example `01` / `001`) may be displayed without those zeros in the PNG (`01` -> `1`). The generated PPTX keeps the original text (`<a:t>01</a:t>`), so it displays as intended when opened in PowerPoint. For decorative numbering that must survive both paths, mix in one non-numeric character such as `01.` or `#01`.
117
+
116
118
  To output SVG instead of PNG:
117
119
 
118
120
  ```bash
package/dist/preview.js CHANGED
@@ -55,7 +55,7 @@ async function generateSvgs(inputFile, verbose = false) {
55
55
  const t2 = Date.now();
56
56
  // インライン SVG なのでネイティブ <text> + サブセットフォント埋め込みが使える。
57
57
  // ブラウザのテキスト描画 (ヒンティング等) が効き、テキスト選択も可能になる
58
- const slides = await convertPptxToSvg(buffer, {
58
+ const { slides } = await convertPptxToSvg(buffer, {
59
59
  width: slideWidth,
60
60
  fontDirs,
61
61
  fontMapping: EXTRA_FONT_MAPPING,
package/dist/render.js CHANGED
@@ -42,14 +42,14 @@ export async function runRender(inputFile, outputDir, options = {}) {
42
42
  const t2 = Date.now();
43
43
  let outputs;
44
44
  if (format === "svg") {
45
- const slides = await convertPptxToSvg(buffer, {
45
+ const { slides } = await convertPptxToSvg(buffer, {
46
46
  ...convertOptions,
47
47
  ...(options.textOutput ? { textOutput: options.textOutput } : {}),
48
48
  });
49
49
  outputs = slides.map((s) => ({ slideNumber: s.slideNumber, data: s.svg }));
50
50
  }
51
51
  else {
52
- const slides = await convertPptxToPng(buffer, convertOptions);
52
+ const { slides } = await convertPptxToPng(buffer, convertOptions);
53
53
  outputs = slides.map((s) => ({ slideNumber: s.slideNumber, data: s.png }));
54
54
  }
55
55
  log(`Rendering ${format.toUpperCase()}... done (${Date.now() - t2}ms)`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hirokisakabe/pom-cli",
3
- "version": "0.6.5",
3
+ "version": "0.7.0",
4
4
  "description": "CLI tool for pom — preview, build, and render presentations",
5
5
  "type": "module",
6
6
  "bin": {
@@ -27,13 +27,13 @@
27
27
  "license": "MIT",
28
28
  "author": "Hiroki Sakabe",
29
29
  "engines": {
30
- "node": ">=18"
30
+ "node": ">=22"
31
31
  },
32
32
  "dependencies": {
33
- "@hirokisakabe/pom": "^8.8.0",
34
- "@hirokisakabe/pom-md": "^3.0.0",
33
+ "@hirokisakabe/pom": "^9.0.0",
34
+ "@hirokisakabe/pom-md": "^4.0.0",
35
35
  "commander": "^15.0.0",
36
- "pptx-glimpse": "^1.1.1"
36
+ "pptx-glimpse": "^2.0.0"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/node": "^25.9.3"