@hirokisakabe/pom 5.0.0 → 5.1.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 +17 -0
- package/dist/autoFit/autoFit.d.ts +15 -0
- package/dist/autoFit/autoFit.d.ts.map +1 -0
- package/dist/autoFit/autoFit.js +73 -0
- package/dist/autoFit/freeYogaTree.d.ts +7 -0
- package/dist/autoFit/freeYogaTree.d.ts.map +1 -0
- package/dist/autoFit/freeYogaTree.js +29 -0
- package/dist/autoFit/strategies/reduceFontSize.d.ts +8 -0
- package/dist/autoFit/strategies/reduceFontSize.d.ts.map +1 -0
- package/dist/autoFit/strategies/reduceFontSize.js +56 -0
- package/dist/autoFit/strategies/reduceGapAndPadding.d.ts +7 -0
- package/dist/autoFit/strategies/reduceGapAndPadding.d.ts.map +1 -0
- package/dist/autoFit/strategies/reduceGapAndPadding.js +46 -0
- package/dist/autoFit/strategies/reduceTableRowHeight.d.ts +7 -0
- package/dist/autoFit/strategies/reduceTableRowHeight.d.ts.map +1 -0
- package/dist/autoFit/strategies/reduceTableRowHeight.js +32 -0
- package/dist/autoFit/strategies/uniformScale.d.ts +7 -0
- package/dist/autoFit/strategies/uniformScale.d.ts.map +1 -0
- package/dist/autoFit/strategies/uniformScale.js +108 -0
- package/dist/autoFit/walkTree.d.ts +6 -0
- package/dist/autoFit/walkTree.d.ts.map +1 -0
- package/dist/autoFit/walkTree.js +18 -0
- package/dist/buildPptx.d.ts +1 -0
- package/dist/buildPptx.d.ts.map +1 -1
- package/dist/buildPptx.js +7 -1
- package/dist/calcYogaLayout/calcYogaLayout.js +5 -0
- package/dist/parseXml/inputSchema.js +2 -0
- package/dist/parseXml/parseXml.d.ts.map +1 -1
- package/dist/parseXml/parseXml.js +41 -0
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +3 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -196,6 +196,23 @@ For detailed node documentation, see [Nodes Reference](./docs/nodes.md).
|
|
|
196
196
|
|
|
197
197
|
<img src="./docs/images/pyramid.png" alt="Pyramid example" width="600">
|
|
198
198
|
|
|
199
|
+
## Auto-Fit
|
|
200
|
+
|
|
201
|
+
When content exceeds the slide height, pom automatically adjusts it to fit within the slide. This is enabled by default.
|
|
202
|
+
|
|
203
|
+
Adjustments are applied in the following priority order:
|
|
204
|
+
|
|
205
|
+
1. Reduce table row heights
|
|
206
|
+
2. Reduce text font sizes
|
|
207
|
+
3. Reduce gap / padding
|
|
208
|
+
4. Uniform scaling (fallback)
|
|
209
|
+
|
|
210
|
+
To disable:
|
|
211
|
+
|
|
212
|
+
```typescript
|
|
213
|
+
const pptx = await buildPptx(xml, { w: 1280, h: 720 }, { autoFit: false });
|
|
214
|
+
```
|
|
215
|
+
|
|
199
216
|
## Documentation
|
|
200
217
|
|
|
201
218
|
| Document | Description |
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { POMNode } from "../types.ts";
|
|
2
|
+
/**
|
|
3
|
+
* スライドのオーバーフローを検出し、段階的に調整してスライド内に収める。
|
|
4
|
+
*
|
|
5
|
+
* 調整の優先順:
|
|
6
|
+
* 1. テーブル行高さ縮小
|
|
7
|
+
* 2. フォントサイズ縮小
|
|
8
|
+
* 3. gap/padding 縮小
|
|
9
|
+
* 4. 全体スケーリング(フォールバック)
|
|
10
|
+
*/
|
|
11
|
+
export declare function autoFitSlide(node: POMNode, slideSize: {
|
|
12
|
+
w: number;
|
|
13
|
+
h: number;
|
|
14
|
+
}): Promise<void>;
|
|
15
|
+
//# sourceMappingURL=autoFit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autoFit.d.ts","sourceRoot":"","sources":["../../src/autoFit/autoFit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAsD3C;;;;;;;;GAQG;AACH,wBAAsB,YAAY,CAChC,IAAI,EAAE,OAAO,EACb,SAAS,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,GAClC,OAAO,CAAC,IAAI,CAAC,CA6Bf"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { calcYogaLayout } from "../calcYogaLayout/calcYogaLayout.js";
|
|
2
|
+
import { freeYogaTree } from "./freeYogaTree.js";
|
|
3
|
+
import { reduceTableRowHeight } from "./strategies/reduceTableRowHeight.js";
|
|
4
|
+
import { reduceFontSize } from "./strategies/reduceFontSize.js";
|
|
5
|
+
import { reduceGapAndPadding } from "./strategies/reduceGapAndPadding.js";
|
|
6
|
+
import { uniformScale } from "./strategies/uniformScale.js";
|
|
7
|
+
/** オーバーフロー判定の許容マージン(0.5%) */
|
|
8
|
+
const OVERFLOW_TOLERANCE = 1.005;
|
|
9
|
+
const strategies = [
|
|
10
|
+
reduceTableRowHeight,
|
|
11
|
+
reduceFontSize,
|
|
12
|
+
reduceGapAndPadding,
|
|
13
|
+
uniformScale,
|
|
14
|
+
];
|
|
15
|
+
/**
|
|
16
|
+
* 通常の slideSize でレイアウト計算し、コンテンツの占有高さを取得する。
|
|
17
|
+
*
|
|
18
|
+
* ルートの yogaNode の子要素の (top + height) の最大値を計算し、
|
|
19
|
+
* ルートの padding.bottom を加算してコンテンツの占有高さとする。
|
|
20
|
+
* h="max" や flexGrow の影響を受けず、正確なコンテンツ高さを返す。
|
|
21
|
+
*/
|
|
22
|
+
async function measureContentHeight(node, slideSize) {
|
|
23
|
+
await calcYogaLayout(node, slideSize);
|
|
24
|
+
const rootYoga = node.yogaNode;
|
|
25
|
+
const childCount = rootYoga.getChildCount();
|
|
26
|
+
if (childCount === 0) {
|
|
27
|
+
return rootYoga.getComputedHeight();
|
|
28
|
+
}
|
|
29
|
+
let maxBottom = 0;
|
|
30
|
+
for (let i = 0; i < childCount; i++) {
|
|
31
|
+
const child = rootYoga.getChild(i);
|
|
32
|
+
const childLayout = child.getComputedLayout();
|
|
33
|
+
const bottom = childLayout.top + childLayout.height;
|
|
34
|
+
if (bottom > maxBottom) {
|
|
35
|
+
maxBottom = bottom;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
// ルートの paddingBottom を加算
|
|
39
|
+
const paddingBottom = rootYoga.getComputedPadding(2); // EDGE_BOTTOM = 2
|
|
40
|
+
return maxBottom + paddingBottom;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* スライドのオーバーフローを検出し、段階的に調整してスライド内に収める。
|
|
44
|
+
*
|
|
45
|
+
* 調整の優先順:
|
|
46
|
+
* 1. テーブル行高さ縮小
|
|
47
|
+
* 2. フォントサイズ縮小
|
|
48
|
+
* 3. gap/padding 縮小
|
|
49
|
+
* 4. 全体スケーリング(フォールバック)
|
|
50
|
+
*/
|
|
51
|
+
export async function autoFitSlide(node, slideSize) {
|
|
52
|
+
for (const strategy of strategies) {
|
|
53
|
+
freeYogaTree(node);
|
|
54
|
+
const contentHeight = await measureContentHeight(node, slideSize);
|
|
55
|
+
if (contentHeight <= slideSize.h * OVERFLOW_TOLERANCE) {
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
const ratio = slideSize.h / contentHeight;
|
|
59
|
+
const changed = strategy(node, ratio);
|
|
60
|
+
if (!changed) {
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
// 最終的にオーバーフローが解消されたか確認
|
|
65
|
+
freeYogaTree(node);
|
|
66
|
+
const finalHeight = await measureContentHeight(node, slideSize);
|
|
67
|
+
if (finalHeight > slideSize.h * OVERFLOW_TOLERANCE) {
|
|
68
|
+
console.warn(`[pom] autoFit: content height (${Math.round(finalHeight)}px) exceeds slide height (${slideSize.h}px) after all adjustments.`);
|
|
69
|
+
}
|
|
70
|
+
// 最終レイアウト(正しい slideSize で)
|
|
71
|
+
freeYogaTree(node);
|
|
72
|
+
await calcYogaLayout(node, slideSize);
|
|
73
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"freeYogaTree.d.ts","sourceRoot":"","sources":["../../src/autoFit/freeYogaTree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAG3C;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,CAwBhD"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { walkPOMTree } from "./walkTree.js";
|
|
2
|
+
/**
|
|
3
|
+
* POMNode ツリー内の全 yogaNode を解放し、参照をクリアする。
|
|
4
|
+
* calcYogaLayout を再実行する前に呼び出すこと。
|
|
5
|
+
*/
|
|
6
|
+
export function freeYogaTree(node) {
|
|
7
|
+
// 子から先に解放する(yoga-layout は親が子を参照しているため)
|
|
8
|
+
const nodes = [];
|
|
9
|
+
walkPOMTree(node, (n) => nodes.push(n));
|
|
10
|
+
// 逆順(リーフから)で解放
|
|
11
|
+
for (let i = nodes.length - 1; i >= 0; i--) {
|
|
12
|
+
const n = nodes[i];
|
|
13
|
+
if (n.yogaNode) {
|
|
14
|
+
// 親から切り離してから解放
|
|
15
|
+
const owner = n.yogaNode.getParent();
|
|
16
|
+
if (owner) {
|
|
17
|
+
const childCount = owner.getChildCount();
|
|
18
|
+
for (let j = 0; j < childCount; j++) {
|
|
19
|
+
if (owner.getChild(j) === n.yogaNode) {
|
|
20
|
+
owner.removeChild(n.yogaNode);
|
|
21
|
+
break;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
n.yogaNode.free();
|
|
26
|
+
n.yogaNode = undefined;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { POMNode } from "../../types.ts";
|
|
2
|
+
/**
|
|
3
|
+
* テキスト系ノードの fontSize を縮小する。
|
|
4
|
+
* 対象: text, ul, ol, shape
|
|
5
|
+
* @returns 変更があった場合 true
|
|
6
|
+
*/
|
|
7
|
+
export declare function reduceFontSize(node: POMNode, targetRatio: number): boolean;
|
|
8
|
+
//# sourceMappingURL=reduceFontSize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reduceFontSize.d.ts","sourceRoot":"","sources":["../../../src/autoFit/strategies/reduceFontSize.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAM9C;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CA4D1E"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { walkPOMTree } from "../walkTree.js";
|
|
2
|
+
const MIN_FONT_SIZE = 10;
|
|
3
|
+
const MIN_SCALE = 0.6;
|
|
4
|
+
/**
|
|
5
|
+
* テキスト系ノードの fontSize を縮小する。
|
|
6
|
+
* 対象: text, ul, ol, shape
|
|
7
|
+
* @returns 変更があった場合 true
|
|
8
|
+
*/
|
|
9
|
+
export function reduceFontSize(node, targetRatio) {
|
|
10
|
+
const ratio = Math.max(targetRatio, MIN_SCALE);
|
|
11
|
+
let changed = false;
|
|
12
|
+
walkPOMTree(node, (n) => {
|
|
13
|
+
switch (n.type) {
|
|
14
|
+
case "text":
|
|
15
|
+
case "shape":
|
|
16
|
+
case "ul":
|
|
17
|
+
case "ol": {
|
|
18
|
+
if (n.fontSize !== undefined) {
|
|
19
|
+
const newSize = Math.max(MIN_FONT_SIZE, Math.round(n.fontSize * ratio));
|
|
20
|
+
if (newSize !== n.fontSize) {
|
|
21
|
+
n.fontSize = newSize;
|
|
22
|
+
changed = true;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
break;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
// ul/ol の li 要素の fontSize も縮小
|
|
29
|
+
if (n.type === "ul" || n.type === "ol") {
|
|
30
|
+
for (const item of n.items) {
|
|
31
|
+
if (item.fontSize !== undefined) {
|
|
32
|
+
const newSize = Math.max(MIN_FONT_SIZE, Math.round(item.fontSize * ratio));
|
|
33
|
+
if (newSize !== item.fontSize) {
|
|
34
|
+
item.fontSize = newSize;
|
|
35
|
+
changed = true;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
// table セルの fontSize も縮小
|
|
41
|
+
if (n.type === "table") {
|
|
42
|
+
for (const row of n.rows) {
|
|
43
|
+
for (const cell of row.cells) {
|
|
44
|
+
if (cell.fontSize !== undefined) {
|
|
45
|
+
const newSize = Math.max(MIN_FONT_SIZE, Math.round(cell.fontSize * ratio));
|
|
46
|
+
if (newSize !== cell.fontSize) {
|
|
47
|
+
cell.fontSize = newSize;
|
|
48
|
+
changed = true;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
return changed;
|
|
56
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reduceGapAndPadding.d.ts","sourceRoot":"","sources":["../../../src/autoFit/strategies/reduceGapAndPadding.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAO9C;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,OAAO,EACb,WAAW,EAAE,MAAM,GAClB,OAAO,CAuCT"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { walkPOMTree } from "../walkTree.js";
|
|
2
|
+
const MIN_GAP = 2;
|
|
3
|
+
const MIN_PADDING = 2;
|
|
4
|
+
const MIN_SCALE = 0.25;
|
|
5
|
+
/**
|
|
6
|
+
* gap と padding を縮小する。
|
|
7
|
+
* @returns 変更があった場合 true
|
|
8
|
+
*/
|
|
9
|
+
export function reduceGapAndPadding(node, targetRatio) {
|
|
10
|
+
const ratio = Math.max(targetRatio, MIN_SCALE);
|
|
11
|
+
let changed = false;
|
|
12
|
+
walkPOMTree(node, (n) => {
|
|
13
|
+
// gap の縮小(vstack, hstack)
|
|
14
|
+
if ((n.type === "vstack" || n.type === "hstack") && n.gap !== undefined) {
|
|
15
|
+
const newGap = Math.max(MIN_GAP, Math.round(n.gap * ratio));
|
|
16
|
+
if (newGap !== n.gap) {
|
|
17
|
+
n.gap = newGap;
|
|
18
|
+
changed = true;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
// padding の縮小
|
|
22
|
+
if (n.padding !== undefined) {
|
|
23
|
+
if (typeof n.padding === "number") {
|
|
24
|
+
const newPadding = Math.max(MIN_PADDING, Math.round(n.padding * ratio));
|
|
25
|
+
if (newPadding !== n.padding) {
|
|
26
|
+
n.padding = newPadding;
|
|
27
|
+
changed = true;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
const dirs = ["top", "right", "bottom", "left"];
|
|
32
|
+
for (const dir of dirs) {
|
|
33
|
+
const val = n.padding[dir];
|
|
34
|
+
if (val !== undefined) {
|
|
35
|
+
const newVal = Math.max(MIN_PADDING, Math.round(val * ratio));
|
|
36
|
+
if (newVal !== val) {
|
|
37
|
+
n.padding[dir] = newVal;
|
|
38
|
+
changed = true;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
return changed;
|
|
46
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { POMNode } from "../../types.ts";
|
|
2
|
+
/**
|
|
3
|
+
* テーブルの defaultRowHeight と各行の height を縮小する。
|
|
4
|
+
* @returns 変更があった場合 true
|
|
5
|
+
*/
|
|
6
|
+
export declare function reduceTableRowHeight(node: POMNode, targetRatio: number): boolean;
|
|
7
|
+
//# sourceMappingURL=reduceTableRowHeight.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reduceTableRowHeight.d.ts","sourceRoot":"","sources":["../../../src/autoFit/strategies/reduceTableRowHeight.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAM9C;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,OAAO,EACb,WAAW,EAAE,MAAM,GAClB,OAAO,CAiCT"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { walkPOMTree } from "../walkTree.js";
|
|
2
|
+
const MIN_ROW_HEIGHT = 20;
|
|
3
|
+
const MIN_SCALE = 0.5;
|
|
4
|
+
/**
|
|
5
|
+
* テーブルの defaultRowHeight と各行の height を縮小する。
|
|
6
|
+
* @returns 変更があった場合 true
|
|
7
|
+
*/
|
|
8
|
+
export function reduceTableRowHeight(node, targetRatio) {
|
|
9
|
+
const ratio = Math.max(targetRatio, MIN_SCALE);
|
|
10
|
+
let changed = false;
|
|
11
|
+
walkPOMTree(node, (n) => {
|
|
12
|
+
if (n.type !== "table")
|
|
13
|
+
return;
|
|
14
|
+
if (n.defaultRowHeight !== undefined) {
|
|
15
|
+
const newHeight = Math.max(MIN_ROW_HEIGHT, Math.round(n.defaultRowHeight * ratio));
|
|
16
|
+
if (newHeight !== n.defaultRowHeight) {
|
|
17
|
+
n.defaultRowHeight = newHeight;
|
|
18
|
+
changed = true;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
for (const row of n.rows) {
|
|
22
|
+
if (row.height !== undefined) {
|
|
23
|
+
const newHeight = Math.max(MIN_ROW_HEIGHT, Math.round(row.height * ratio));
|
|
24
|
+
if (newHeight !== row.height) {
|
|
25
|
+
row.height = newHeight;
|
|
26
|
+
changed = true;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
return changed;
|
|
32
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uniformScale.d.ts","sourceRoot":"","sources":["../../../src/autoFit/strategies/uniformScale.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAS9C;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAyGxE"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { walkPOMTree } from "../walkTree.js";
|
|
2
|
+
const MIN_SCALE = 0.5;
|
|
3
|
+
function scaleNumber(value, ratio, min) {
|
|
4
|
+
return Math.max(min, Math.round(value * ratio));
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* 全サイズ関連プロパティを一律スケーリングする(フォールバック)。
|
|
8
|
+
* @returns 変更があった場合 true
|
|
9
|
+
*/
|
|
10
|
+
export function uniformScale(node, targetRatio) {
|
|
11
|
+
const ratio = Math.max(targetRatio, MIN_SCALE);
|
|
12
|
+
let changed = false;
|
|
13
|
+
walkPOMTree(node, (n) => {
|
|
14
|
+
// fontSize
|
|
15
|
+
if ("fontSize" in n && typeof n.fontSize === "number") {
|
|
16
|
+
const newVal = scaleNumber(n.fontSize, ratio, 8);
|
|
17
|
+
if (newVal !== n.fontSize) {
|
|
18
|
+
n.fontSize = newVal;
|
|
19
|
+
changed = true;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
// gap (vstack/hstack)
|
|
23
|
+
if ((n.type === "vstack" || n.type === "hstack") && n.gap !== undefined) {
|
|
24
|
+
const newVal = scaleNumber(n.gap, ratio, 1);
|
|
25
|
+
if (newVal !== n.gap) {
|
|
26
|
+
n.gap = newVal;
|
|
27
|
+
changed = true;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
// padding
|
|
31
|
+
if (n.padding !== undefined) {
|
|
32
|
+
if (typeof n.padding === "number") {
|
|
33
|
+
const newVal = scaleNumber(n.padding, ratio, 1);
|
|
34
|
+
if (newVal !== n.padding) {
|
|
35
|
+
n.padding = newVal;
|
|
36
|
+
changed = true;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
const dirs = ["top", "right", "bottom", "left"];
|
|
41
|
+
for (const dir of dirs) {
|
|
42
|
+
const val = n.padding[dir];
|
|
43
|
+
if (val !== undefined) {
|
|
44
|
+
const newVal = scaleNumber(val, ratio, 1);
|
|
45
|
+
if (newVal !== val) {
|
|
46
|
+
n.padding[dir] = newVal;
|
|
47
|
+
changed = true;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
// table: defaultRowHeight, row.height
|
|
54
|
+
if (n.type === "table") {
|
|
55
|
+
if (n.defaultRowHeight !== undefined) {
|
|
56
|
+
const newVal = scaleNumber(n.defaultRowHeight, ratio, 16);
|
|
57
|
+
if (newVal !== n.defaultRowHeight) {
|
|
58
|
+
n.defaultRowHeight = newVal;
|
|
59
|
+
changed = true;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
for (const row of n.rows) {
|
|
63
|
+
if (row.height !== undefined) {
|
|
64
|
+
const newVal = scaleNumber(row.height, ratio, 16);
|
|
65
|
+
if (newVal !== row.height) {
|
|
66
|
+
row.height = newVal;
|
|
67
|
+
changed = true;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
// ul/ol items fontSize
|
|
73
|
+
if (n.type === "ul" || n.type === "ol") {
|
|
74
|
+
for (const item of n.items) {
|
|
75
|
+
if (item.fontSize !== undefined) {
|
|
76
|
+
const newVal = scaleNumber(item.fontSize, ratio, 8);
|
|
77
|
+
if (newVal !== item.fontSize) {
|
|
78
|
+
item.fontSize = newVal;
|
|
79
|
+
changed = true;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
// icon size
|
|
85
|
+
if (n.type === "icon" && n.size !== undefined) {
|
|
86
|
+
const newVal = scaleNumber(n.size, ratio, 8);
|
|
87
|
+
if (newVal !== n.size) {
|
|
88
|
+
n.size = newVal;
|
|
89
|
+
changed = true;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
// table cells fontSize
|
|
93
|
+
if (n.type === "table") {
|
|
94
|
+
for (const row of n.rows) {
|
|
95
|
+
for (const cell of row.cells) {
|
|
96
|
+
if (cell.fontSize !== undefined) {
|
|
97
|
+
const newVal = scaleNumber(cell.fontSize, ratio, 8);
|
|
98
|
+
if (newVal !== cell.fontSize) {
|
|
99
|
+
cell.fontSize = newVal;
|
|
100
|
+
changed = true;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
return changed;
|
|
108
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"walkTree.d.ts","sourceRoot":"","sources":["../../src/autoFit/walkTree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C;;GAEG;AACH,wBAAgB,WAAW,CACzB,IAAI,EAAE,OAAO,EACb,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,GAC/B,IAAI,CAeN"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* POMNode ツリーを再帰的に走査し、各ノードに visitor を適用する
|
|
3
|
+
*/
|
|
4
|
+
export function walkPOMTree(node, visitor) {
|
|
5
|
+
visitor(node);
|
|
6
|
+
switch (node.type) {
|
|
7
|
+
case "box":
|
|
8
|
+
walkPOMTree(node.children, visitor);
|
|
9
|
+
break;
|
|
10
|
+
case "vstack":
|
|
11
|
+
case "hstack":
|
|
12
|
+
case "layer":
|
|
13
|
+
for (const child of node.children) {
|
|
14
|
+
walkPOMTree(child, visitor);
|
|
15
|
+
}
|
|
16
|
+
break;
|
|
17
|
+
}
|
|
18
|
+
}
|
package/dist/buildPptx.d.ts
CHANGED
package/dist/buildPptx.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildPptx.d.ts","sourceRoot":"","sources":["../src/buildPptx.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"buildPptx.d.ts","sourceRoot":"","sources":["../src/buildPptx.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,mBAAmB,EACpB,MAAM,iCAAiC,CAAC;AAIzC,OAAO,EAAkB,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhE,YAAY,EAAE,mBAAmB,EAAE,CAAC;AAEpC,wBAAsB,SAAS,CAC7B,GAAG,EAAE,MAAM,EACX,SAAS,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,EACnC,OAAO,CAAC,EAAE;IACR,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,eAAe,CAAC,EAAE,mBAAmB,CAAC;IACtC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,wCAyBF"}
|
package/dist/buildPptx.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { autoFitSlide } from "./autoFit/autoFit.js";
|
|
1
2
|
import { calcYogaLayout } from "./calcYogaLayout/calcYogaLayout.js";
|
|
2
3
|
import { setTextMeasurementMode, } from "./calcYogaLayout/measureText.js";
|
|
3
4
|
import { parseXml } from "./parseXml/parseXml.js";
|
|
@@ -14,7 +15,12 @@ export async function buildPptx(xml, slideSize, options) {
|
|
|
14
15
|
const nodes = parseXml(xml);
|
|
15
16
|
const positionedPages = [];
|
|
16
17
|
for (const node of nodes) {
|
|
17
|
-
|
|
18
|
+
if (options?.autoFit !== false) {
|
|
19
|
+
await autoFitSlide(node, slideSize);
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
await calcYogaLayout(node, slideSize);
|
|
23
|
+
}
|
|
18
24
|
const positioned = toPositioned(node);
|
|
19
25
|
positionedPages.push(positioned);
|
|
20
26
|
}
|
|
@@ -87,6 +87,11 @@ async function buildPomWithYogaTree(node, parentYoga, parentNode) {
|
|
|
87
87
|
const yn = yoga.Node.create();
|
|
88
88
|
node.yogaNode = yn; // 対応する YogaNode をセット
|
|
89
89
|
await applyStyleToYogaNode(node, yn);
|
|
90
|
+
// HStack/VStack の子要素に flexShrink=1 をデフォルト設定(CSS Flexbox と同じ挙動)
|
|
91
|
+
// 主軸方向で %サイズ + gap がある場合の overflow を防ぐ
|
|
92
|
+
if (parentNode?.type === "hstack" || parentNode?.type === "vstack") {
|
|
93
|
+
yn.setFlexShrink(1);
|
|
94
|
+
}
|
|
90
95
|
// HStack の子要素で幅が指定されていない場合、デフォルトで均等分割
|
|
91
96
|
// テーブルは setMeasureFunc でカラム幅合計を返すため除外
|
|
92
97
|
if (parentNode?.type === "hstack" &&
|
|
@@ -203,6 +203,7 @@ const inputVStackNodeSchemaBase = inputBaseNodeSchema.extend({
|
|
|
203
203
|
gap: z.number().optional(),
|
|
204
204
|
alignItems: alignItemsSchema.optional(),
|
|
205
205
|
justifyContent: justifyContentSchema.optional(),
|
|
206
|
+
shadow: shadowStyleSchema.optional(),
|
|
206
207
|
});
|
|
207
208
|
const inputHStackNodeSchemaBase = inputBaseNodeSchema.extend({
|
|
208
209
|
type: z.literal("hstack"),
|
|
@@ -210,6 +211,7 @@ const inputHStackNodeSchemaBase = inputBaseNodeSchema.extend({
|
|
|
210
211
|
gap: z.number().optional(),
|
|
211
212
|
alignItems: alignItemsSchema.optional(),
|
|
212
213
|
justifyContent: justifyContentSchema.optional(),
|
|
214
|
+
shadow: shadowStyleSchema.optional(),
|
|
213
215
|
});
|
|
214
216
|
const inputLayerChildSchemaBase = z.lazy(() => inputPomNodeSchema.and(z.object({
|
|
215
217
|
x: z.number(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parseXml.d.ts","sourceRoot":"","sources":["../../src/parseXml/parseXml.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAsC3C,qBAAa,aAAc,SAAQ,KAAK;IACtC,SAAgB,MAAM,EAAE,MAAM,EAAE,CAAC;gBACrB,MAAM,EAAE,MAAM,EAAE;CAM7B;
|
|
1
|
+
{"version":3,"file":"parseXml.d.ts","sourceRoot":"","sources":["../../src/parseXml/parseXml.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAsC3C,qBAAa,aAAc,SAAQ,KAAK;IACtC,SAAgB,MAAM,EAAE,MAAM,EAAE,CAAC;gBACrB,MAAM,EAAE,MAAM,EAAE;CAM7B;AA2qCD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,EAAE,CAiCrD"}
|
|
@@ -62,11 +62,13 @@ const containerShapes = {
|
|
|
62
62
|
gap: z.number().optional(),
|
|
63
63
|
alignItems: alignItemsSchema.optional(),
|
|
64
64
|
justifyContent: justifyContentSchema.optional(),
|
|
65
|
+
shadow: shadowStyleSchema.optional(),
|
|
65
66
|
})),
|
|
66
67
|
hstack: extractShape(inputBaseNodeSchema.extend({
|
|
67
68
|
gap: z.number().optional(),
|
|
68
69
|
alignItems: alignItemsSchema.optional(),
|
|
69
70
|
justifyContent: justifyContentSchema.optional(),
|
|
71
|
+
shadow: shadowStyleSchema.optional(),
|
|
70
72
|
})),
|
|
71
73
|
layer: extractShape(inputBaseNodeSchema),
|
|
72
74
|
};
|
|
@@ -371,6 +373,21 @@ function coerceFallback(value) {
|
|
|
371
373
|
}
|
|
372
374
|
return value;
|
|
373
375
|
}
|
|
376
|
+
// ===== Dot notation helpers =====
|
|
377
|
+
/**
|
|
378
|
+
* Checks if a schema is a union containing both boolean and object types.
|
|
379
|
+
* Used to allow `endArrow="true" endArrow.type="triangle"` coexistence.
|
|
380
|
+
*/
|
|
381
|
+
function isBooleanObjectUnion(schema) {
|
|
382
|
+
const unwrapped = unwrapSchema(schema);
|
|
383
|
+
const typeName = getZodType(unwrapped);
|
|
384
|
+
if (typeName !== "union")
|
|
385
|
+
return false;
|
|
386
|
+
const def = getDef(unwrapped);
|
|
387
|
+
const options = def.options;
|
|
388
|
+
const typeNames = options.map((opt) => getZodType(unwrapSchema(opt)));
|
|
389
|
+
return typeNames.includes("boolean") && typeNames.includes("object");
|
|
390
|
+
}
|
|
374
391
|
// ===== Dot notation expansion =====
|
|
375
392
|
function expandDotNotation(attrs) {
|
|
376
393
|
const regular = {};
|
|
@@ -510,6 +527,15 @@ function coerceChildAttrs(parentTagName, tagName, attrs, errors) {
|
|
|
510
527
|
// Process regular attributes
|
|
511
528
|
for (const [key, value] of Object.entries(regularAttrs)) {
|
|
512
529
|
if (key in dotGroups) {
|
|
530
|
+
// When the schema is a union of boolean and object,
|
|
531
|
+
// allow boolean shorthand to coexist with dot-notation by ignoring the boolean value.
|
|
532
|
+
if (shape &&
|
|
533
|
+
shape[key] &&
|
|
534
|
+
isBooleanObjectUnion(shape[key]) &&
|
|
535
|
+
(value === "true" || value === "false")) {
|
|
536
|
+
// Silently skip the boolean value; dot-notation takes priority
|
|
537
|
+
continue;
|
|
538
|
+
}
|
|
513
539
|
errors.push(`<${parentTagName}>.<${tagName}>: Attribute "${key}" conflicts with dot-notation attributes. Use one or the other, not both`);
|
|
514
540
|
continue;
|
|
515
541
|
}
|
|
@@ -832,6 +858,15 @@ function convertPomNode(nodeType, tagName, attrs, childElements, textContent, er
|
|
|
832
858
|
continue;
|
|
833
859
|
// Conflict check: dot-notation and regular attribute for the same key
|
|
834
860
|
if (key in dotGroups) {
|
|
861
|
+
// When the schema is a union of boolean and object (e.g., endArrow),
|
|
862
|
+
// allow boolean shorthand to coexist with dot-notation by ignoring the boolean value.
|
|
863
|
+
const propSchemaForConflict = getPropertySchema(nodeType, key);
|
|
864
|
+
if (propSchemaForConflict &&
|
|
865
|
+
isBooleanObjectUnion(propSchemaForConflict) &&
|
|
866
|
+
(value === "true" || value === "false")) {
|
|
867
|
+
// Silently skip the boolean value; dot-notation takes priority
|
|
868
|
+
continue;
|
|
869
|
+
}
|
|
835
870
|
errors.push(`<${tagName}>: Attribute "${key}" conflicts with dot-notation attributes (e.g., "${key}.xxx"). Use one or the other, not both`);
|
|
836
871
|
continue;
|
|
837
872
|
}
|
|
@@ -899,6 +934,12 @@ function convertPomNode(nodeType, tagName, attrs, childElements, textContent, er
|
|
|
899
934
|
if (!CONTAINER_TYPES.has(nodeType)) {
|
|
900
935
|
validateLeafNode(nodeType, result, errors);
|
|
901
936
|
}
|
|
937
|
+
// Normalize icon color: add # prefix if missing
|
|
938
|
+
if (nodeType === "icon" &&
|
|
939
|
+
typeof result.color === "string" &&
|
|
940
|
+
!result.color.startsWith("#")) {
|
|
941
|
+
result.color = `#${result.color}`;
|
|
942
|
+
}
|
|
902
943
|
return result;
|
|
903
944
|
}
|
|
904
945
|
/**
|
package/dist/types.d.ts
CHANGED
|
@@ -1918,6 +1918,7 @@ export type VStackNode = BasePOMNode & {
|
|
|
1918
1918
|
gap?: number;
|
|
1919
1919
|
alignItems?: AlignItems;
|
|
1920
1920
|
justifyContent?: JustifyContent;
|
|
1921
|
+
shadow?: ShadowStyle;
|
|
1921
1922
|
};
|
|
1922
1923
|
export type HStackNode = BasePOMNode & {
|
|
1923
1924
|
type: "hstack";
|
|
@@ -1925,6 +1926,7 @@ export type HStackNode = BasePOMNode & {
|
|
|
1925
1926
|
gap?: number;
|
|
1926
1927
|
alignItems?: AlignItems;
|
|
1927
1928
|
justifyContent?: JustifyContent;
|
|
1929
|
+
shadow?: ShadowStyle;
|
|
1928
1930
|
};
|
|
1929
1931
|
type LayerChild = POMNode & {
|
|
1930
1932
|
x: number;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,aAAa,C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G,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC1E,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAChF,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AACxE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
|
package/dist/types.js
CHANGED
|
@@ -367,7 +367,7 @@ const imageNodeSchema = basePOMNodeSchema.extend({
|
|
|
367
367
|
export const iconNameSchema = z.enum(Object.keys(ICON_DATA));
|
|
368
368
|
export const iconColorSchema = z
|
|
369
369
|
.string()
|
|
370
|
-
.regex(
|
|
370
|
+
.regex(/^#?[0-9a-fA-F]{3,8}$/)
|
|
371
371
|
.optional();
|
|
372
372
|
const iconNodeSchema = basePOMNodeSchema.extend({
|
|
373
373
|
type: z.literal("icon"),
|
|
@@ -624,6 +624,7 @@ const vStackNodeSchemaBase = basePOMNodeSchema.extend({
|
|
|
624
624
|
gap: z.number().optional(),
|
|
625
625
|
alignItems: alignItemsSchema.optional(),
|
|
626
626
|
justifyContent: justifyContentSchema.optional(),
|
|
627
|
+
shadow: shadowStyleSchema.optional(),
|
|
627
628
|
});
|
|
628
629
|
const hStackNodeSchemaBase = basePOMNodeSchema.extend({
|
|
629
630
|
type: z.literal("hstack"),
|
|
@@ -631,6 +632,7 @@ const hStackNodeSchemaBase = basePOMNodeSchema.extend({
|
|
|
631
632
|
gap: z.number().optional(),
|
|
632
633
|
alignItems: alignItemsSchema.optional(),
|
|
633
634
|
justifyContent: justifyContentSchema.optional(),
|
|
635
|
+
shadow: shadowStyleSchema.optional(),
|
|
634
636
|
});
|
|
635
637
|
const layerChildSchemaBase = z.lazy(() => pomNodeSchema.and(z.object({
|
|
636
638
|
x: z.number(),
|