@hirokisakabe/pom 0.1.10 → 0.1.11

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
@@ -1,34 +1,34 @@
1
1
  # pom
2
2
 
3
- **pom (PowerPoint Object Model)** は、PowerPoint プレゼンテーション(pptx)を TypeScript で宣言的に記述するためのライブラリです。生成 AI に出力させた POM 形式の JSON を、PowerPoint ファイルに変換するユースケースを想定しています。
3
+ **pom (PowerPoint Object Model)** is a library for declaratively describing PowerPoint presentations (pptx) in TypeScript. It is designed for use cases where JSON in POM format generated by AI is converted into PowerPoint files.
4
4
 
5
- ## 動作環境
5
+ ## Requirements
6
6
 
7
- - Node.js 18 以上
7
+ - Node.js 18 or higher
8
8
 
9
9
  > [!NOTE]
10
- > PPTX生成機能(`buildPptx`)は Node.js 環境でのみ動作します。ただし、入力スキーマのみを使用する場合は `@hirokisakabe/pom/schema` からブラウザ環境でもimport可能です。
10
+ > The PPTX generation feature (`buildPptx`) only works in Node.js environments. However, if you only need the input schema, you can import it from `@hirokisakabe/pom/schema` for use in browser environments.
11
11
 
12
- ## 目次
12
+ ## Table of Contents
13
13
 
14
- - [動作環境](#動作環境)
15
- - [インストール](#インストール)
16
- - [クイックスタート](#クイックスタート)
17
- - [特徴](#特徴)
18
- - [ノード](#ノード)
19
- - [マスタースライド](#マスタースライド)
20
- - [サーバーレス環境での利用](#サーバーレス環境での利用)
21
- - [LLM 連携](#llm-連携)
22
- - [ブラウザ環境での入力検証](#ブラウザ環境での入力検証)
23
- - [ライセンス](#ライセンス)
14
+ - [Requirements](#requirements)
15
+ - [Installation](#installation)
16
+ - [Quick Start](#quick-start)
17
+ - [Features](#features)
18
+ - [Nodes](#nodes)
19
+ - [Master Slide](#master-slide)
20
+ - [Serverless Environments](#serverless-environments)
21
+ - [LLM Integration](#llm-integration)
22
+ - [Input Validation in Browser Environments](#input-validation-in-browser-environments)
23
+ - [License](#license)
24
24
 
25
- ## インストール
25
+ ## Installation
26
26
 
27
27
  ```bash
28
28
  npm install @hirokisakabe/pom
29
29
  ```
30
30
 
31
- ## クイックスタート
31
+ ## Quick Start
32
32
 
33
33
  ```typescript
34
34
  import { buildPptx, POMNode } from "@hirokisakabe/pom";
@@ -43,13 +43,13 @@ const slide: POMNode = {
43
43
  children: [
44
44
  {
45
45
  type: "text",
46
- text: "プレゼンテーションタイトル",
46
+ text: "Presentation Title",
47
47
  fontPx: 48,
48
48
  bold: true,
49
49
  },
50
50
  {
51
51
  type: "text",
52
- text: "サブタイトル",
52
+ text: "Subtitle",
53
53
  fontPx: 24,
54
54
  color: "666666",
55
55
  },
@@ -60,21 +60,21 @@ const pptx = await buildPptx([slide], { w: 1280, h: 720 });
60
60
  await pptx.writeFile({ fileName: "presentation.pptx" });
61
61
  ```
62
62
 
63
- ## 特徴
63
+ ## Features
64
64
 
65
- - **型安全**: TypeScript による厳密な型定義
66
- - **宣言的**: JSON ライクなオブジェクトでスライドを記述
67
- - **PowerPoint ファースト**: Shape 機能をネイティブサポート
68
- - **柔軟なレイアウト**: VStack/HStack/Box による自動レイアウト
69
- - **ピクセル単位**: 直感的なピクセル単位での指定(内部でインチに変換)
70
- - **マスタースライド**: 全ページ共通のヘッダー・フッター・ページ番号を自動挿入
71
- - **AI フレンドリー**: LLM がコード生成しやすいシンプルな構造
65
+ - **Type-safe**: Strict type definitions with TypeScript
66
+ - **Declarative**: Describe slides with JSON-like objects
67
+ - **PowerPoint First**: Native support for Shape features
68
+ - **Flexible Layout**: Automatic layout with VStack/HStack/Box
69
+ - **Pixel Units**: Intuitive pixel-based sizing (internally converted to inches)
70
+ - **Master Slide**: Automatically insert common headers, footers, and page numbers across all pages
71
+ - **AI Friendly**: Simple structure that makes it easy for LLMs to generate code
72
72
 
73
- ## ノード
73
+ ## Nodes
74
74
 
75
- ### 共通プロパティ
75
+ ### Common Properties
76
76
 
77
- すべてのノードが共通して持てるレイアウト属性。
77
+ Layout attributes that all nodes can have.
78
78
 
79
79
  ```typescript
80
80
  {
@@ -94,14 +94,14 @@ await pptx.writeFile({ fileName: "presentation.pptx" });
94
94
  }
95
95
  ```
96
96
 
97
- - `backgroundColor` はノード全体に塗りつぶしを適用します(例: `"F8F9FA"`)。
98
- - `border.width` px 単位で指定し、色や `dashType` と組み合わせて枠線を制御できます。
97
+ - `backgroundColor` applies a fill to the entire node (e.g., `"F8F9FA"`).
98
+ - `border.width` is specified in px and can be combined with color and `dashType` to control the border.
99
99
 
100
- ### ノード一覧
100
+ ### Node List
101
101
 
102
102
  #### 1. Text
103
103
 
104
- テキストを表示するノード。
104
+ A node for displaying text.
105
105
 
106
106
  ```typescript
107
107
  {
@@ -115,79 +115,79 @@ await pptx.writeFile({ fileName: "presentation.pptx" });
115
115
  lineSpacingMultiple?: number;
116
116
  bullet?: boolean | BulletOptions;
117
117
 
118
- // 共通プロパティ
118
+ // Common properties
119
119
  w?: number | "max" | `${number}%`;
120
120
  h?: number | "max" | `${number}%`;
121
121
  ...
122
122
  }
123
123
  ```
124
124
 
125
- - `color` で文字色を 16 進カラーコード(例: `"FF0000"`)として指定できます。
126
- - `bold` で太字を指定できます。
127
- - `fontFamily` でフォントファミリーを指定できます(デフォルト: `"Noto Sans JP"`)。
128
- - `lineSpacingMultiple` で行間倍率を指定できます(デフォルト: `1.3`)。
129
- - `bullet` で箇条書きを指定できます。`true` を指定するとデフォルトの箇条書き、オブジェクトで詳細設定が可能です。
125
+ - `color` specifies the text color as a hex color code (e.g., `"FF0000"`).
126
+ - `bold` enables bold text.
127
+ - `fontFamily` specifies the font family (default: `"Noto Sans JP"`).
128
+ - `lineSpacingMultiple` specifies the line spacing multiplier (default: `1.3`).
129
+ - `bullet` enables bullet points. Use `true` for default bullets, or an object for detailed settings.
130
130
 
131
131
  **BulletOptions:**
132
132
 
133
133
  ```typescript
134
134
  {
135
- type?: "bullet" | "number"; // "bullet": 記号、"number": 番号付き
136
- indent?: number; // インデントレベル
135
+ type?: "bullet" | "number"; // "bullet": symbol, "number": numbered
136
+ indent?: number; // Indent level
137
137
  numberType?: "alphaLcParenBoth" | "alphaLcParenR" | "alphaLcPeriod" |
138
138
  "alphaUcParenBoth" | "alphaUcParenR" | "alphaUcPeriod" |
139
139
  "arabicParenBoth" | "arabicParenR" | "arabicPeriod" | "arabicPlain" |
140
140
  "romanLcParenBoth" | "romanLcParenR" | "romanLcPeriod" |
141
141
  "romanUcParenBoth" | "romanUcParenR" | "romanUcPeriod";
142
- numberStartAt?: number; // 番号の開始値
142
+ numberStartAt?: number; // Starting number
143
143
  }
144
144
  ```
145
145
 
146
- **使用例:**
146
+ **Usage Examples:**
147
147
 
148
148
  ```typescript
149
- // シンプルな箇条書き
149
+ // Simple bullet list
150
150
  {
151
151
  type: "text",
152
- text: "項目1\n項目2\n項目3",
152
+ text: "Item 1\nItem 2\nItem 3",
153
153
  bullet: true,
154
154
  }
155
155
 
156
- // 番号付きリスト
156
+ // Numbered list
157
157
  {
158
158
  type: "text",
159
- text: "ステップ1\nステップ2\nステップ3",
159
+ text: "Step 1\nStep 2\nStep 3",
160
160
  bullet: { type: "number" },
161
161
  }
162
162
 
163
- // アルファベット小文字(a. b. c.)
163
+ // Lowercase alphabet (a. b. c.)
164
164
  {
165
165
  type: "text",
166
- text: "項目A\n項目B\n項目C",
166
+ text: "Item A\nItem B\nItem C",
167
167
  bullet: { type: "number", numberType: "alphaLcPeriod" },
168
168
  }
169
169
 
170
- // 5から始まる番号リスト
170
+ // Numbered list starting from 5
171
171
  {
172
172
  type: "text",
173
- text: "5番目\n6番目\n7番目",
173
+ text: "Fifth\nSixth\nSeventh",
174
174
  bullet: { type: "number", numberStartAt: 5 },
175
175
  }
176
176
  ```
177
177
 
178
178
  #### 2. Image
179
179
 
180
- 画像を表示するノード。
180
+ A node for displaying images.
181
181
 
182
- - `w` `h` を指定しない場合、画像の実際のサイズが自動的に取得されます
183
- - サイズを指定した場合、そのサイズで表示されます(アスペクト比は保持されません)
182
+ - If `w` and `h` are not specified, the actual image size is automatically used
183
+ - If size is specified, the image is displayed at that size (aspect ratio is not preserved)
184
184
 
185
185
  ```typescript
186
186
  {
187
187
  type: "image";
188
- src: string; // 画像のパス(ローカルパス、URLbase64データ)
188
+ src: string; // Image path (local path, URL, or base64 data)
189
189
 
190
- // 共通プロパティ
190
+ // Common properties
191
191
  w?: number | "max" | `${number}%`;
192
192
  h?: number | "max" | `${number}%`;
193
193
  ...
@@ -196,7 +196,7 @@ await pptx.writeFile({ fileName: "presentation.pptx" });
196
196
 
197
197
  #### 3. Table
198
198
 
199
- 表を描画するノード。列幅・行高を px 単位で宣言し、セル単位で装飾を細かく制御できます。
199
+ A node for drawing tables. Column widths and row heights are declared in px, with fine-grained control over cell decoration.
200
200
 
201
201
  ```typescript
202
202
  {
@@ -215,27 +215,27 @@ await pptx.writeFile({ fileName: "presentation.pptx" });
215
215
  }[];
216
216
  defaultRowHeight?: number;
217
217
 
218
- // 共通プロパティ
218
+ // Common properties
219
219
  w?: number | "max" | `${number}%`;
220
220
  h?: number | "max" | `${number}%`;
221
221
  ...
222
222
  }
223
223
  ```
224
224
 
225
- - `columns[].width` を省略すると、テーブル全体の幅から均等分割されます。
226
- - `columns` の合計がテーブルの自然幅になります(必要であれば `w` で上書きできます)。
227
- - `rows` `height` を省略すると `defaultRowHeight`(未指定なら32px)が適用されます。
228
- - セル背景やフォント装飾を `cells` の各要素で個別に指定できます。
225
+ - If `columns[].width` is omitted, columns are evenly distributed across the table width.
226
+ - The sum of `columns` becomes the natural width of the table (can be overridden with `w` if needed).
227
+ - If `rows` `height` is omitted, `defaultRowHeight` is applied (32px if unspecified).
228
+ - Cell background and font decoration can be specified individually for each element in `cells`.
229
229
 
230
230
  #### 4. Shape
231
231
 
232
- 図形を描画するノード。テキスト付き/なしで異なる表現が可能で、複雑なビジュアル効果をサポートしています。
232
+ A node for drawing shapes. Different representations are possible with or without text, supporting complex visual effects.
233
233
 
234
234
  ```typescript
235
235
  {
236
236
  type: "shape";
237
- shapeType: PptxGenJS.SHAPE_NAME; // 例: "roundRect", "ellipse", "cloud", "star5" など
238
- text?: string; // 図形内に表示するテキスト(オプション)
237
+ shapeType: PptxGenJS.SHAPE_NAME; // e.g., "roundRect", "ellipse", "cloud", "star5"
238
+ text?: string; // Text to display inside the shape (optional)
239
239
  fill?: {
240
240
  color?: string;
241
241
  transparency?: number;
@@ -257,36 +257,36 @@ await pptx.writeFile({ fileName: "presentation.pptx" });
257
257
  color?: string;
258
258
  alignText?: "left" | "center" | "right";
259
259
 
260
- // 共通プロパティ
260
+ // Common properties
261
261
  w?: number | "max" | `${number}%`;
262
262
  h?: number | "max" | `${number}%`;
263
263
  ...
264
264
  }
265
265
  ```
266
266
 
267
- **主な図形タイプの例:**
267
+ **Common Shape Types:**
268
268
 
269
- - `roundRect`: 角丸長方形(タイトルボックス、カテゴリ表示)
270
- - `ellipse`: 楕円/円(ステップ番号、バッジ)
271
- - `cloud`: 雲型(コメント、重要ポイント)
272
- - `wedgeRectCallout`: 矢印付き吹き出し(注記)
273
- - `cloudCallout`: 雲吹き出し(コメント)
274
- - `star5`: 5つ星(強調、デコレーション)
275
- - `downArrow`: 下矢印(フロー図)
269
+ - `roundRect`: Rounded rectangle (title boxes, category displays)
270
+ - `ellipse`: Ellipse/circle (step numbers, badges)
271
+ - `cloud`: Cloud shape (comments, key points)
272
+ - `wedgeRectCallout`: Callout with arrow (annotations)
273
+ - `cloudCallout`: Cloud callout (comments)
274
+ - `star5`: 5-pointed star (emphasis, decoration)
275
+ - `downArrow`: Down arrow (flow diagrams)
276
276
 
277
277
  #### 5. Box
278
278
 
279
- 単一の子要素をラップする汎用コンテナ。
279
+ A generic container that wraps a single child element.
280
280
 
281
- - 子要素は **1つ**
282
- - padding や固定サイズを与えてグルーピングに使う
281
+ - Only **one** child element
282
+ - Used for grouping with padding or fixed size
283
283
 
284
284
  ```typescript
285
285
  {
286
286
  type: "box";
287
287
  children: POMNode;
288
288
 
289
- // 共通プロパティ
289
+ // Common properties
290
290
  w?: number | "max" | `${number}%`;
291
291
  h?: number | "max" | `${number}%`;
292
292
  ...
@@ -295,7 +295,7 @@ await pptx.writeFile({ fileName: "presentation.pptx" });
295
295
 
296
296
  #### 6. VStack
297
297
 
298
- 子要素を **縦方向** に並べる。
298
+ Arranges child elements **vertically**.
299
299
 
300
300
  ```typescript
301
301
  {
@@ -305,7 +305,7 @@ await pptx.writeFile({ fileName: "presentation.pptx" });
305
305
  justifyContent: "start" | "center" | "end" | "spaceBetween";
306
306
  gap?: number;
307
307
 
308
- // 共通プロパティ
308
+ // Common properties
309
309
  w?: number | "max" | `${number}%`;
310
310
  h?: number | "max" | `${number}%`;
311
311
  ...
@@ -314,7 +314,7 @@ await pptx.writeFile({ fileName: "presentation.pptx" });
314
314
 
315
315
  #### 7. HStack
316
316
 
317
- 子要素を **横方向** に並べる。
317
+ Arranges child elements **horizontally**.
318
318
 
319
319
  ```typescript
320
320
  {
@@ -324,7 +324,7 @@ await pptx.writeFile({ fileName: "presentation.pptx" });
324
324
  justifyContent: "start" | "center" | "end" | "spaceBetween";
325
325
  gap?: number;
326
326
 
327
- // 共通プロパティ
327
+ // Common properties
328
328
  w?: number | "max" | `${number}%`;
329
329
  h?: number | "max" | `${number}%`;
330
330
  ...
@@ -333,33 +333,34 @@ await pptx.writeFile({ fileName: "presentation.pptx" });
333
333
 
334
334
  #### 8. Chart
335
335
 
336
- グラフを描画するノード。棒グラフ、折れ線グラフ、円グラフをサポート。
336
+ A node for drawing charts. Supports bar charts, line charts, pie charts, area charts, doughnut charts, and radar charts.
337
337
 
338
338
  ```typescript
339
339
  {
340
340
  type: "chart";
341
- chartType: "bar" | "line" | "pie";
341
+ chartType: "bar" | "line" | "pie" | "area" | "doughnut" | "radar";
342
342
  data: {
343
- name?: string; // 系列名
344
- labels: string[]; // カテゴリラベル
345
- values: number[]; //
343
+ name?: string; // Series name
344
+ labels: string[]; // Category labels
345
+ values: number[]; // Values
346
346
  }[];
347
- showLegend?: boolean; // 凡例表示(デフォルト: false
348
- showTitle?: boolean; // タイトル表示(デフォルト: false
349
- title?: string; // タイトル文字列
350
- chartColors?: string[]; // データカラー配列(16進カラーコード)
347
+ showLegend?: boolean; // Show legend (default: false)
348
+ showTitle?: boolean; // Show title (default: false)
349
+ title?: string; // Title string
350
+ chartColors?: string[]; // Data color array (hex color codes)
351
+ radarStyle?: "standard" | "marker" | "filled"; // Radar-only: chart style
351
352
 
352
- // 共通プロパティ
353
+ // Common properties
353
354
  w?: number | "max" | `${number}%`;
354
355
  h?: number | "max" | `${number}%`;
355
356
  ...
356
357
  }
357
358
  ```
358
359
 
359
- **使用例:**
360
+ **Usage Examples:**
360
361
 
361
362
  ```typescript
362
- // 棒グラフ
363
+ // Bar chart
363
364
  {
364
365
  type: "chart",
365
366
  chartType: "bar",
@@ -367,23 +368,23 @@ await pptx.writeFile({ fileName: "presentation.pptx" });
367
368
  h: 400,
368
369
  data: [
369
370
  {
370
- name: "売上",
371
- labels: ["1月", "2月", "3月", "4月"],
371
+ name: "Sales",
372
+ labels: ["Jan", "Feb", "Mar", "Apr"],
372
373
  values: [100, 200, 150, 300],
373
374
  },
374
375
  {
375
- name: "利益",
376
- labels: ["1月", "2月", "3月", "4月"],
376
+ name: "Profit",
377
+ labels: ["Jan", "Feb", "Mar", "Apr"],
377
378
  values: [30, 60, 45, 90],
378
379
  },
379
380
  ],
380
381
  showLegend: true,
381
382
  showTitle: true,
382
- title: "月別売上・利益",
383
+ title: "Monthly Sales & Profit",
383
384
  chartColors: ["0088CC", "00AA00"],
384
385
  }
385
386
 
386
- // 円グラフ
387
+ // Pie chart
387
388
  {
388
389
  type: "chart",
389
390
  chartType: "pie",
@@ -391,21 +392,39 @@ await pptx.writeFile({ fileName: "presentation.pptx" });
391
392
  h: 300,
392
393
  data: [
393
394
  {
394
- name: "市場シェア",
395
- labels: ["製品A", "製品B", "製品C", "その他"],
395
+ name: "Market Share",
396
+ labels: ["Product A", "Product B", "Product C", "Others"],
396
397
  values: [40, 30, 20, 10],
397
398
  },
398
399
  ],
399
400
  showLegend: true,
400
401
  chartColors: ["0088CC", "00AA00", "FF6600", "888888"],
401
402
  }
403
+
404
+ // Radar chart
405
+ {
406
+ type: "chart",
407
+ chartType: "radar",
408
+ w: 400,
409
+ h: 300,
410
+ data: [
411
+ {
412
+ name: "Skill Assessment",
413
+ labels: ["Technical", "Design", "PM", "Sales", "Support"],
414
+ values: [80, 60, 70, 50, 90],
415
+ },
416
+ ],
417
+ showLegend: true,
418
+ radarStyle: "filled",
419
+ chartColors: ["0088CC"],
420
+ }
402
421
  ```
403
422
 
404
- ## マスタースライド
423
+ ## Master Slide
405
424
 
406
- 全ページに共通のヘッダー・フッター・ページ番号を自動挿入できます。
425
+ You can automatically insert common headers, footers, and page numbers across all pages.
407
426
 
408
- ### 基本的な使い方
427
+ ### Basic Usage
409
428
 
410
429
  ```typescript
411
430
  import { buildPptx } from "@hirokisakabe/pom";
@@ -425,7 +444,7 @@ const pptx = await buildPptx(
425
444
  children: [
426
445
  {
427
446
  type: "text",
428
- text: "会社名",
447
+ text: "Company Name",
429
448
  fontPx: 14,
430
449
  color: "FFFFFF",
431
450
  },
@@ -460,50 +479,50 @@ const pptx = await buildPptx(
460
479
  ],
461
480
  },
462
481
  date: {
463
- format: "YYYY/MM/DD", // または "locale"
482
+ format: "YYYY/MM/DD", // or "locale"
464
483
  },
465
484
  },
466
485
  },
467
486
  );
468
487
  ```
469
488
 
470
- ### マスタースライドのオプション
489
+ ### Master Slide Options
471
490
 
472
491
  ```typescript
473
492
  type MasterSlideOptions = {
474
- header?: POMNode; // ヘッダー(任意の POMNode を指定可能)
475
- footer?: POMNode; // フッター(任意の POMNode を指定可能)
493
+ header?: POMNode; // Header (any POMNode can be specified)
494
+ footer?: POMNode; // Footer (any POMNode can be specified)
476
495
  pageNumber?: {
477
- position: "left" | "center" | "right"; // ページ番号の位置
496
+ position: "left" | "center" | "right"; // Page number position
478
497
  };
479
498
  date?: {
480
- format: "YYYY/MM/DD" | "locale"; // 日付のフォーマット
499
+ format: "YYYY/MM/DD" | "locale"; // Date format
481
500
  };
482
501
  };
483
502
  ```
484
503
 
485
- ### プレースホルダー
504
+ ### Placeholders
486
505
 
487
- ヘッダー・フッター内のテキストで以下のプレースホルダーが使用できます:
506
+ The following placeholders can be used in text within headers and footers:
488
507
 
489
- - `{{page}}`: 現在のページ番号
490
- - `{{totalPages}}`: 総ページ数
491
- - `{{date}}`: 日付(`date.format` で指定した形式)
508
+ - `{{page}}`: Current page number
509
+ - `{{totalPages}}`: Total number of pages
510
+ - `{{date}}`: Date (in the format specified by `date.format`)
492
511
 
493
- ### 特徴
512
+ ### Features
494
513
 
495
- - **柔軟性**: ヘッダー・フッターには任意の POMNodeVStackHStackBox など)を使用可能
496
- - **自動合成**: 各ページのコンテンツに自動的にヘッダー・フッターが追加されます
497
- - **動的置換**: プレースホルダーはページごとに自動的に置換されます
498
- - **後方互換性**: master オプションは省略可能で、既存コードへの影響はありません
514
+ - **Flexibility**: Headers and footers can use any POMNode (VStack, HStack, Box, etc.)
515
+ - **Automatic Composition**: Headers and footers are automatically added to each page's content
516
+ - **Dynamic Replacement**: Placeholders are automatically replaced per page
517
+ - **Backward Compatibility**: The master option is optional and has no impact on existing code
499
518
 
500
- ## サーバーレス環境での利用
519
+ ## Serverless Environments
501
520
 
502
- pom はデフォルトで `canvas` パッケージを使用してテキストの幅を計測し、折り返し位置を決定しています。しかし、Vercel AWS Lambda などのサーバーレス環境では日本語フォント(Noto Sans JP など)がインストールされていないため、テキストの折り返し位置がずれる場合があります。
521
+ pom uses the `canvas` package by default to measure text width and determine line break positions. However, in serverless environments like Vercel or AWS Lambda, Japanese fonts (such as Noto Sans JP) are not installed, which may cause text line breaks to be misaligned.
503
522
 
504
- この問題に対処するため、`textMeasurement` オプションでテキスト計測の方法を指定できます。
523
+ To address this issue, you can specify the text measurement method using the `textMeasurement` option.
505
524
 
506
- ### textMeasurement オプション
525
+ ### textMeasurement Option
507
526
 
508
527
  ```typescript
509
528
  const pptx = await buildPptx(
@@ -515,48 +534,48 @@ const pptx = await buildPptx(
515
534
  );
516
535
  ```
517
536
 
518
- | | 説明 |
519
- | ------------ | ---------------------------------------------------------------------------------- |
520
- | `"canvas"` | 常に canvas を使用してテキスト幅を計測(フォントがインストールされている環境向け) |
521
- | `"fallback"` | 常にフォールバック計算を使用(CJK文字は1em、英数字は0.5emで推定) |
522
- | `"auto"` | フォントの利用可否を自動検出し、利用できない場合はフォールバック(デフォルト) |
537
+ | Value | Description |
538
+ | ------------ | -------------------------------------------------------------------------------------- |
539
+ | `"canvas"` | Always use canvas for text width measurement (for environments with fonts installed) |
540
+ | `"fallback"` | Always use fallback calculation (CJK characters = 1em, alphanumeric = 0.5em estimated) |
541
+ | `"auto"` | Auto-detect font availability and fall back if unavailable (default) |
523
542
 
524
- ### 推奨設定
543
+ ### Recommended Settings
525
544
 
526
- - **ローカル開発環境・Docker**: デフォルト(`"auto"`)のままで問題ありません
527
- - **サーバーレス環境**: デフォルトの `"auto"` で自動的にフォールバックされます
528
- - **フォントがインストールされている環境**: `"canvas"` を明示的に指定するとより正確な計測が可能です
545
+ - **Local development / Docker**: Default (`"auto"`) works fine
546
+ - **Serverless environments**: Default `"auto"` will automatically fall back
547
+ - **Environments with fonts installed**: Explicitly specifying `"canvas"` enables more accurate measurement
529
548
 
530
- ## LLM 連携
549
+ ## LLM Integration
531
550
 
532
- pom LLM(GPT-4oClaude など)で生成した JSON からスライドを作成するユースケースに対応しています。
551
+ pom supports use cases where slides are created from JSON generated by LLMs (GPT-4o, Claude, etc.).
533
552
 
534
- ### LLM 向け仕様ガイド
553
+ ### LLM Specification Guide
535
554
 
536
- [`llm-guide.md`](./llm-guide.md) は、LLM pom 形式の JSON を生成させるためのコンパクトな仕様書です。システムプロンプトに含めて使用してください。
555
+ [`llm-guide.md`](./llm-guide.md) is a compact specification document for having LLMs generate JSON in pom format. Include it in your system prompt.
537
556
 
538
- **含まれる内容:**
557
+ **Contents:**
539
558
 
540
- - ノード一覧と主要プロパティ
541
- - 標準設定(スライドサイズ、paddinggap、フォントサイズ目安)
542
- - パターン例(基本構造、2 カラム、テーブル、図形、グラフなど)
543
- - よくある間違いと正しい書き方
559
+ - Node list and main properties
560
+ - Standard settings (slide size, padding, gap, font size guidelines)
561
+ - Pattern examples (basic structure, 2-column, table, shapes, charts, etc.)
562
+ - Common mistakes and correct usage
544
563
 
545
- ### 入力用スキーマ
564
+ ### Input Schema
546
565
 
547
- `inputPomNodeSchema` を使って、LLM が生成した JSON を検証できます。
566
+ Use `inputPomNodeSchema` to validate JSON generated by LLMs.
548
567
 
549
568
  ```typescript
550
569
  import { inputPomNodeSchema, buildPptx, InputPOMNode } from "@hirokisakabe/pom";
551
570
 
552
- // LLMからのJSON出力を検証
571
+ // Validate JSON output from LLM
553
572
  const jsonFromLLM = `{
554
573
  "type": "vstack",
555
574
  "padding": 48,
556
575
  "gap": 24,
557
576
  "children": [
558
- { "type": "text", "text": "タイトル", "fontPx": 32, "bold": true },
559
- { "type": "text", "text": "本文テキスト", "fontPx": 16 }
577
+ { "type": "text", "text": "Title", "fontPx": 32, "bold": true },
578
+ { "type": "text", "text": "Body text", "fontPx": 16 }
560
579
  ]
561
580
  }`;
562
581
 
@@ -564,61 +583,61 @@ const parsed = JSON.parse(jsonFromLLM);
564
583
  const result = inputPomNodeSchema.safeParse(parsed);
565
584
 
566
585
  if (result.success) {
567
- // 検証成功 - PPTXを生成
586
+ // Validation successful - generate PPTX
568
587
  const pptx = await buildPptx([result.data], { w: 1280, h: 720 });
569
588
  await pptx.writeFile({ fileName: "output.pptx" });
570
589
  } else {
571
- // 検証失敗 - エラー内容を確認
590
+ // Validation failed - check error details
572
591
  console.error("Validation failed:", result.error.format());
573
592
  }
574
593
  ```
575
594
 
576
- ### 利用可能な入力用スキーマ
595
+ ### Available Input Schemas
577
596
 
578
- | スキーマ | 説明 |
579
- | ------------------------------- | ---------------------------------------------- |
580
- | `inputPomNodeSchema` | メインのノードスキーマ(全ノードタイプを含む) |
581
- | `inputTextNodeSchema` | テキストノード用 |
582
- | `inputImageNodeSchema` | 画像ノード用 |
583
- | `inputTableNodeSchema` | テーブルノード用 |
584
- | `inputShapeNodeSchema` | 図形ノード用 |
585
- | `inputChartNodeSchema` | チャートノード用 |
586
- | `inputBoxNodeSchema` | Boxノード用 |
587
- | `inputVStackNodeSchema` | VStackノード用 |
588
- | `inputHStackNodeSchema` | HStackノード用 |
589
- | `inputMasterSlideOptionsSchema` | マスタースライド設定用 |
597
+ | Schema | Description |
598
+ | ------------------------------- | ------------------------------------------ |
599
+ | `inputPomNodeSchema` | Main node schema (includes all node types) |
600
+ | `inputTextNodeSchema` | For text nodes |
601
+ | `inputImageNodeSchema` | For image nodes |
602
+ | `inputTableNodeSchema` | For table nodes |
603
+ | `inputShapeNodeSchema` | For shape nodes |
604
+ | `inputChartNodeSchema` | For chart nodes |
605
+ | `inputBoxNodeSchema` | For Box nodes |
606
+ | `inputVStackNodeSchema` | For VStack nodes |
607
+ | `inputHStackNodeSchema` | For HStack nodes |
608
+ | `inputMasterSlideOptionsSchema` | For master slide settings |
590
609
 
591
- ### ブラウザ環境での入力検証
610
+ ### Input Validation in Browser Environments
592
611
 
593
- ブラウザ環境(ReactVueSvelteなどのSPA)で LLM の出力を検証したい場合は、`@hirokisakabe/pom/schema` からスキーマをimportできます。このサブパスは Node.js 依存のないスキーマのみをエクスポートするため、ブラウザでも問題なく動作します。
612
+ If you want to validate LLM output in browser environments (SPAs like React, Vue, Svelte), you can import schemas from `@hirokisakabe/pom/schema`. This subpath exports only schemas without Node.js dependencies, so it works in browsers.
594
613
 
595
614
  ```typescript
596
- // ブラウザ環境で使用可能
615
+ // Available in browser environments
597
616
  import { inputPomNodeSchema } from "@hirokisakabe/pom/schema";
598
617
 
599
- // LLMからのレスポンスを検証
618
+ // Validate response from LLM
600
619
  const result = inputPomNodeSchema.safeParse(llmResponse);
601
620
 
602
621
  if (result.success) {
603
- // 検証成功 - サーバーサイドに送信してPPTX生成
622
+ // Validation successful - send to server for PPTX generation
604
623
  await fetch("/api/generate-pptx", {
605
624
  method: "POST",
606
625
  headers: { "Content-Type": "application/json" },
607
626
  body: JSON.stringify(result.data),
608
627
  });
609
628
  } else {
610
- // 検証失敗 - エラーをユーザーに表示
629
+ // Validation failed - show error to user
611
630
  console.error("Validation failed:", result.error.format());
612
631
  }
613
632
  ```
614
633
 
615
- **`@hirokisakabe/pom` vs `@hirokisakabe/pom/schema` の違い:**
634
+ **Difference between `@hirokisakabe/pom` and `@hirokisakabe/pom/schema`:**
616
635
 
617
- | インポートパス | 環境 | 含まれる機能 |
618
- | -------------------------- | ---------- | ------------------------------------------ |
619
- | `@hirokisakabe/pom` | Node.js | すべて(PPTX生成、スキーマ、型定義) |
620
- | `@hirokisakabe/pom/schema` | ブラウザ可 | スキーマと型定義のみ(PPTX生成は含まない) |
636
+ | Import Path | Environment | Included Features |
637
+ | -------------------------- | --------------- | -------------------------------------------- |
638
+ | `@hirokisakabe/pom` | Node.js | Everything (PPTX generation, schemas, types) |
639
+ | `@hirokisakabe/pom/schema` | Browser-capable | Schemas and types only (no PPTX generation) |
621
640
 
622
- ## ライセンス
641
+ ## License
623
642
 
624
643
  MIT
@@ -475,6 +475,9 @@ export declare const inputChartNodeSchema: z.ZodObject<{
475
475
  line: "line";
476
476
  pie: "pie";
477
477
  bar: "bar";
478
+ area: "area";
479
+ doughnut: "doughnut";
480
+ radar: "radar";
478
481
  }>;
479
482
  data: z.ZodArray<z.ZodObject<{
480
483
  name: z.ZodOptional<z.ZodString>;
@@ -485,6 +488,11 @@ export declare const inputChartNodeSchema: z.ZodObject<{
485
488
  showTitle: z.ZodOptional<z.ZodBoolean>;
486
489
  title: z.ZodOptional<z.ZodString>;
487
490
  chartColors: z.ZodOptional<z.ZodArray<z.ZodString>>;
491
+ radarStyle: z.ZodOptional<z.ZodEnum<{
492
+ standard: "standard";
493
+ marker: "marker";
494
+ filled: "filled";
495
+ }>>;
488
496
  }, z.core.$strip>;
489
497
  export type InputTextNode = z.infer<typeof inputTextNodeSchema>;
490
498
  export type InputImageNode = z.infer<typeof inputImageNodeSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"inputSchema.d.ts","sourceRoot":"","sources":["../src/inputSchema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAeL,KAAK,UAAU,EACf,KAAK,cAAc,EACpB,MAAM,SAAS,CAAC;AAGjB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAU9B,CAAC;AAEH,KAAK,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAGzD,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAU9B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAG/B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAK/B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAU/B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAQ/B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBA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cAAc,GACd,cAAc,CAAC;AAwBnB,eAAO,MAAM,kBAAkB,EAAE,CAAC,CAAC,OAAO,CAAC,YAAY,CACJ,CAAC;AACpD,eAAO,MAAM,qBAAqB,EAAE,CAAC,CAAC,OAAO,CAAC,eAAe,CACJ,CAAC;AAC1D,eAAO,MAAM,qBAAqB,EAAE,CAAC,CAAC,OAAO,CAAC,eAAe,CACJ,CAAC;AAE1D;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,kBAAkB,EAAE,CAAC,CAAC,OAAO,CAAC,YAAY,CAW3B,CAAC;AAG7B,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;iBAaxC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAC3C,OAAO,6BAA6B,CACrC,CAAC"}
@@ -17,7 +17,7 @@
17
17
  * ```
18
18
  */
19
19
  import { z } from "zod";
20
- import { lengthSchema, paddingSchema, borderStyleSchema, fillStyleSchema, shadowStyleSchema, alignItemsSchema, justifyContentSchema, shapeTypeSchema, tableColumnSchema, tableRowSchema, pageNumberPositionSchema, chartTypeSchema, chartDataSchema, bulletOptionsSchema, } from "./types";
20
+ import { lengthSchema, paddingSchema, borderStyleSchema, fillStyleSchema, shadowStyleSchema, alignItemsSchema, justifyContentSchema, shapeTypeSchema, tableColumnSchema, tableRowSchema, pageNumberPositionSchema, chartTypeSchema, chartDataSchema, bulletOptionsSchema, radarStyleSchema, } from "./types";
21
21
  // ===== Base Node Schema =====
22
22
  export const inputBaseNodeSchema = z.object({
23
23
  w: lengthSchema.optional(),
@@ -71,6 +71,8 @@ export const inputChartNodeSchema = inputBaseNodeSchema.extend({
71
71
  showTitle: z.boolean().optional(),
72
72
  title: z.string().optional(),
73
73
  chartColors: z.array(z.string()).optional(),
74
+ // radar専用オプション
75
+ radarStyle: radarStyleSchema.optional(),
74
76
  });
75
77
  // ===== Recursive Node Schemas =====
76
78
  const inputBoxNodeSchemaBase = inputBaseNodeSchema.extend({
@@ -1 +1 @@
1
- {"version":3,"file":"renderPptx.d.ts","sourceRoot":"","sources":["../../src/renderPptx/renderPptx.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,aAAa,MAAM,WAAW,CAAC;AAE3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAK/C,KAAK,OAAO,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEpD;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,cAAc,EAAE,EAAE,OAAO,EAAE,OAAO,iBAqNnE"}
1
+ {"version":3,"file":"renderPptx.d.ts","sourceRoot":"","sources":["../../src/renderPptx/renderPptx.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,aAAa,MAAM,WAAW,CAAC;AAE3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAK/C,KAAK,OAAO,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAEpD;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,cAAc,EAAE,EAAE,OAAO,EAAE,OAAO,iBA0NnE"}
@@ -185,6 +185,10 @@ export function renderPptx(pages, slidePx) {
185
185
  title: node.title,
186
186
  chartColors: node.chartColors,
187
187
  };
188
+ // radar専用オプション
189
+ if (node.chartType === "radar" && node.radarStyle) {
190
+ chartOptions.radarStyle = node.radarStyle;
191
+ }
188
192
  slide.addChart(node.chartType, chartData, chartOptions);
189
193
  break;
190
194
  }
package/dist/types.d.ts CHANGED
@@ -764,6 +764,14 @@ export declare const chartTypeSchema: z.ZodEnum<{
764
764
  line: "line";
765
765
  pie: "pie";
766
766
  bar: "bar";
767
+ area: "area";
768
+ doughnut: "doughnut";
769
+ radar: "radar";
770
+ }>;
771
+ export declare const radarStyleSchema: z.ZodEnum<{
772
+ standard: "standard";
773
+ marker: "marker";
774
+ filled: "filled";
767
775
  }>;
768
776
  export declare const chartDataSchema: z.ZodObject<{
769
777
  name: z.ZodOptional<z.ZodString>;
@@ -804,6 +812,9 @@ export declare const chartNodeSchema: z.ZodObject<{
804
812
  line: "line";
805
813
  pie: "pie";
806
814
  bar: "bar";
815
+ area: "area";
816
+ doughnut: "doughnut";
817
+ radar: "radar";
807
818
  }>;
808
819
  data: z.ZodArray<z.ZodObject<{
809
820
  name: z.ZodOptional<z.ZodString>;
@@ -814,6 +825,11 @@ export declare const chartNodeSchema: z.ZodObject<{
814
825
  showTitle: z.ZodOptional<z.ZodBoolean>;
815
826
  title: z.ZodOptional<z.ZodString>;
816
827
  chartColors: z.ZodOptional<z.ZodArray<z.ZodString>>;
828
+ radarStyle: z.ZodOptional<z.ZodEnum<{
829
+ standard: "standard";
830
+ marker: "marker";
831
+ filled: "filled";
832
+ }>>;
817
833
  }, z.core.$strip>;
818
834
  export type TextNode = z.infer<typeof textNodeSchema>;
819
835
  export type ImageNode = z.infer<typeof imageNodeSchema>;
@@ -825,6 +841,7 @@ export type ShapeNode = z.infer<typeof shapeNodeSchema>;
825
841
  export type ChartType = z.infer<typeof chartTypeSchema>;
826
842
  export type ChartData = z.infer<typeof chartDataSchema>;
827
843
  export type ChartNode = z.infer<typeof chartNodeSchema>;
844
+ export type RadarStyle = z.infer<typeof radarStyleSchema>;
828
845
  export type BoxNode = BasePOMNode & {
829
846
  type: "box";
830
847
  children: POMNode;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAA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UAAU,GAAG,cAAc,GAAG;IAAE,QAAQ,EAAE,cAAc,EAAE,CAAA;CAAE,CAAC,GAC9D,CAAC,UAAU,GAAG,cAAc,GAAG;IAAE,QAAQ,EAAE,cAAc,EAAE,CAAA;CAAE,CAAC,GAC9D,CAAC,SAAS,GAAG,cAAc,CAAC,GAC5B,CAAC,SAAS,GAAG,cAAc,CAAC,CAAC;AAEjC,eAAO,MAAM,oBAAoB,EAAE,CAAC,CAAC,OAAO,CAAC,cAAc,CAmB7B,CAAC;AAG/B,eAAO,MAAM,wBAAwB;;;;EAAsC,CAAC;AAE5E,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;iBAanC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
package/dist/types.js CHANGED
@@ -317,7 +317,15 @@ export const shapeNodeSchema = basePOMNodeSchema.extend({
317
317
  alignText: z.enum(["left", "center", "right"]).optional(),
318
318
  bold: z.boolean().optional(),
319
319
  });
320
- export const chartTypeSchema = z.enum(["bar", "line", "pie"]);
320
+ export const chartTypeSchema = z.enum([
321
+ "bar",
322
+ "line",
323
+ "pie",
324
+ "area",
325
+ "doughnut",
326
+ "radar",
327
+ ]);
328
+ export const radarStyleSchema = z.enum(["standard", "marker", "filled"]);
321
329
  export const chartDataSchema = z.object({
322
330
  name: z.string().optional(),
323
331
  labels: z.array(z.string()),
@@ -331,6 +339,8 @@ export const chartNodeSchema = basePOMNodeSchema.extend({
331
339
  showTitle: z.boolean().optional(),
332
340
  title: z.string().optional(),
333
341
  chartColors: z.array(z.string()).optional(),
342
+ // radar専用オプション
343
+ radarStyle: radarStyleSchema.optional(),
334
344
  });
335
345
  // Define schemas using passthrough to maintain type safety
336
346
  const boxNodeSchemaBase = basePOMNodeSchema.extend({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hirokisakabe/pom",
3
- "version": "0.1.10",
3
+ "version": "0.1.11",
4
4
  "description": "PowerPoint Object Model - A declarative TypeScript library for creating PowerPoint presentations",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -56,10 +56,10 @@
56
56
  "test:run": "vitest run",
57
57
  "vrt": "tsx vrt/runVrt.ts",
58
58
  "vrt:update": "tsx vrt/runVrt.ts --update",
59
- "vrt:docker": "docker compose run --rm vrt",
60
- "vrt:docker:update": "docker compose run --rm vrt-update",
59
+ "vrt:docker": "docker compose build vrt && docker compose run --rm vrt",
60
+ "vrt:docker:update": "docker compose build vrt-update && docker compose run --rm vrt-update",
61
61
  "preview": "tsx preview/lib/previewPptx.ts",
62
- "preview:docker": "docker compose run --rm preview"
62
+ "preview:docker": "docker compose build preview && docker compose run --rm preview"
63
63
  },
64
64
  "devDependencies": {
65
65
  "@eslint/js": "^9.39.1",