@hirokisakabe/pom 6.0.1 → 6.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 +20 -20
- package/dist/buildPptx.d.ts.map +1 -1
- package/dist/buildPptx.js +2 -2
- package/dist/icons/renderIcon.d.ts +2 -2
- package/dist/icons/renderIcon.d.ts.map +1 -1
- package/dist/icons/renderIcon.js +49 -3
- package/dist/parseXml/coercionRules.d.ts.map +1 -1
- package/dist/parseXml/coercionRules.js +3 -4
- package/dist/parseXml/parseXml.d.ts.map +1 -1
- package/dist/parseXml/parseXml.js +83 -9
- package/dist/registry/definitions/icon.js +3 -3
- package/dist/registry/definitions/layer.d.ts.map +1 -1
- package/dist/registry/definitions/layer.js +4 -4
- package/dist/registry/types.d.ts +1 -1
- package/dist/registry/types.d.ts.map +1 -1
- package/dist/renderPptx/nodes/list.d.ts.map +1 -1
- package/dist/renderPptx/nodes/list.js +50 -35
- package/dist/renderPptx/nodes/table.d.ts.map +1 -1
- package/dist/renderPptx/nodes/table.js +25 -0
- package/dist/renderPptx/nodes/text.d.ts.map +1 -1
- package/dist/renderPptx/nodes/text.js +32 -2
- package/dist/renderPptx/renderPptx.d.ts +1 -1
- package/dist/renderPptx/renderPptx.d.ts.map +1 -1
- package/dist/renderPptx/renderPptx.js +11 -8
- package/dist/renderPptx/utils/backgroundBorder.d.ts.map +1 -1
- package/dist/renderPptx/utils/backgroundBorder.js +1 -2
- package/dist/toPositioned/toPositioned.d.ts +1 -1
- package/dist/toPositioned/toPositioned.d.ts.map +1 -1
- package/dist/toPositioned/toPositioned.js +2 -2
- package/dist/types.d.ts +201 -24
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +10 -4
- package/package.json +6 -15
|
@@ -11,6 +11,6 @@ type SlidePx = {
|
|
|
11
11
|
* @param master スライドマスターオプション(省略可能)
|
|
12
12
|
* @returns PptxGenJS インスタンス
|
|
13
13
|
*/
|
|
14
|
-
export declare function renderPptx(pages: PositionedNode[], slidePx: SlidePx, buildContext: BuildContext, master?: SlideMasterOptions): import("pptxgenjs").default
|
|
14
|
+
export declare function renderPptx(pages: PositionedNode[], slidePx: SlidePx, buildContext: BuildContext, master?: SlideMasterOptions): Promise<import("pptxgenjs").default>;
|
|
15
15
|
export {};
|
|
16
16
|
//# sourceMappingURL=renderPptx.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderPptx.d.ts","sourceRoot":"","sources":["../../src/renderPptx/renderPptx.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EACV,cAAc,EACd,kBAAkB,EAEnB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAQvD,KAAK,OAAO,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AA+JxC;;;;;;GAMG;AACH,
|
|
1
|
+
{"version":3,"file":"renderPptx.d.ts","sourceRoot":"","sources":["../../src/renderPptx/renderPptx.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EACV,cAAc,EACd,kBAAkB,EAEnB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAQvD,KAAK,OAAO,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AA+JxC;;;;;;GAMG;AACH,wBAAsB,UAAU,CAC9B,KAAK,EAAE,cAAc,EAAE,EACvB,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,YAAY,EAC1B,MAAM,CAAC,EAAE,kBAAkB,wCAiI5B"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
// pptxgenjs は CJS パッケージのため動的 import で読み込む
|
|
2
|
+
async function loadPptxGenJS() {
|
|
3
|
+
const pptxModule = await import("pptxgenjs");
|
|
4
|
+
// CJS default export の解決: module.default.default (ESM wrapper) または module.default
|
|
5
|
+
/* eslint-disable @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-return */
|
|
6
|
+
const mod = pptxModule;
|
|
7
|
+
return mod.default?.default ?? mod.default ?? mod;
|
|
8
|
+
/* eslint-enable @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-return */
|
|
9
|
+
}
|
|
8
10
|
import { pxToIn, pxToPt } from "./units.js";
|
|
9
11
|
import { convertUnderline, convertStrike } from "./textOptions.js";
|
|
10
12
|
import { getImageData } from "../shared/measureImage.js";
|
|
@@ -165,8 +167,9 @@ function defineSlideMasterFromOptions(pptx, master) {
|
|
|
165
167
|
* @param master スライドマスターオプション(省略可能)
|
|
166
168
|
* @returns PptxGenJS インスタンス
|
|
167
169
|
*/
|
|
168
|
-
export function renderPptx(pages, slidePx, buildContext, master) {
|
|
170
|
+
export async function renderPptx(pages, slidePx, buildContext, master) {
|
|
169
171
|
const slideIn = { w: pxToIn(slidePx.w), h: pxToIn(slidePx.h) }; // layout(=px) → PptxGenJS(=inch) への最終変換
|
|
172
|
+
const PptxGenJS = await loadPptxGenJS();
|
|
170
173
|
const pptx = new PptxGenJS();
|
|
171
174
|
pptx.defineLayout({ name: "custom", width: slideIn.w, height: slideIn.h });
|
|
172
175
|
pptx.layout = "custom";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backgroundBorder.d.ts","sourceRoot":"","sources":["../../../src/renderPptx/utils/backgroundBorder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAe,MAAM,gBAAgB,CAAC;AAElE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAcjD;;;;;GAKG;AACH,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,cAAc,EACpB,GAAG,EAAE,aAAa,GACjB,IAAI,
|
|
1
|
+
{"version":3,"file":"backgroundBorder.d.ts","sourceRoot":"","sources":["../../../src/renderPptx/utils/backgroundBorder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAe,MAAM,gBAAgB,CAAC;AAElE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAcjD;;;;;GAKG;AACH,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,cAAc,EACpB,GAAG,EAAE,aAAa,GACjB,IAAI,CA2HN"}
|
|
@@ -17,8 +17,7 @@ function convertShadow(shadow) {
|
|
|
17
17
|
* 描画順序: 背景色 → 背景画像 → ボーダー
|
|
18
18
|
*/
|
|
19
19
|
export function renderBackgroundAndBorder(node, ctx) {
|
|
20
|
-
const { backgroundColor, backgroundImage, border, borderRadius } = node;
|
|
21
|
-
const shadow = "shadow" in node ? node.shadow : undefined;
|
|
20
|
+
const { backgroundColor, backgroundImage, border, borderRadius, shadow } = node;
|
|
22
21
|
const hasBackground = Boolean(backgroundColor);
|
|
23
22
|
const hasBackgroundImage = Boolean(backgroundImage);
|
|
24
23
|
const hasBorder = Boolean(border &&
|
|
@@ -10,5 +10,5 @@ import type { LayoutResultMap } from "../calcYogaLayout/types.ts";
|
|
|
10
10
|
* @param parentY 親ノードの絶対Y座標
|
|
11
11
|
* @returns PositionedNode ツリー
|
|
12
12
|
*/
|
|
13
|
-
export declare function toPositioned(pom: POMNode, ctx: BuildContext, map: LayoutResultMap, parentX?: number, parentY?: number): PositionedNode
|
|
13
|
+
export declare function toPositioned(pom: POMNode, ctx: BuildContext, map: LayoutResultMap, parentX?: number, parentY?: number): Promise<PositionedNode>;
|
|
14
14
|
//# sourceMappingURL=toPositioned.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toPositioned.d.ts","sourceRoot":"","sources":["../../src/toPositioned/toPositioned.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAGlE;;;;;;;;GAQG;AACH,
|
|
1
|
+
{"version":3,"file":"toPositioned.d.ts","sourceRoot":"","sources":["../../src/toPositioned/toPositioned.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAGlE;;;;;;;;GAQG;AACH,wBAAsB,YAAY,CAChC,GAAG,EAAE,OAAO,EACZ,GAAG,EAAE,YAAY,EACjB,GAAG,EAAE,eAAe,EACpB,OAAO,SAAI,EACX,OAAO,SAAI,GACV,OAAO,CAAC,cAAc,CAAC,CAmDzB"}
|
|
@@ -8,7 +8,7 @@ import { getNodeDef } from "../registry/index.js";
|
|
|
8
8
|
* @param parentY 親ノードの絶対Y座標
|
|
9
9
|
* @returns PositionedNode ツリー
|
|
10
10
|
*/
|
|
11
|
-
export function toPositioned(pom, ctx, map, parentX = 0, parentY = 0) {
|
|
11
|
+
export async function toPositioned(pom, ctx, map, parentX = 0, parentY = 0) {
|
|
12
12
|
const layout = map.get(pom);
|
|
13
13
|
if (!layout) {
|
|
14
14
|
throw new Error("Layout result not found in map for POMNode");
|
|
@@ -38,7 +38,7 @@ export function toPositioned(pom, ctx, map, parentX = 0, parentY = 0) {
|
|
|
38
38
|
y: absoluteY,
|
|
39
39
|
w: layout.width,
|
|
40
40
|
h: layout.height,
|
|
41
|
-
children: containerNode.children.map((child) => toPositioned(child, ctx, map, absoluteX, absoluteY)),
|
|
41
|
+
children: await Promise.all(containerNode.children.map((child) => toPositioned(child, ctx, map, absoluteX, absoluteY))),
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
44
|
case "absolute-child":
|
package/dist/types.d.ts
CHANGED
|
@@ -131,6 +131,17 @@ declare const basePOMNodeSchema: z.ZodObject<{
|
|
|
131
131
|
end: "end";
|
|
132
132
|
stretch: "stretch";
|
|
133
133
|
}>>;
|
|
134
|
+
shadow: z.ZodOptional<z.ZodObject<{
|
|
135
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
136
|
+
outer: "outer";
|
|
137
|
+
inner: "inner";
|
|
138
|
+
}>>;
|
|
139
|
+
opacity: z.ZodOptional<z.ZodNumber>;
|
|
140
|
+
blur: z.ZodOptional<z.ZodNumber>;
|
|
141
|
+
angle: z.ZodOptional<z.ZodNumber>;
|
|
142
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
143
|
+
color: z.ZodOptional<z.ZodString>;
|
|
144
|
+
}, z.core.$strip>>;
|
|
134
145
|
}, z.core.$strip>;
|
|
135
146
|
type BasePOMNode = z.infer<typeof basePOMNodeSchema>;
|
|
136
147
|
export declare const textNodeSchema: z.ZodObject<{
|
|
@@ -192,8 +203,24 @@ export declare const textNodeSchema: z.ZodObject<{
|
|
|
192
203
|
end: "end";
|
|
193
204
|
stretch: "stretch";
|
|
194
205
|
}>>;
|
|
206
|
+
shadow: z.ZodOptional<z.ZodObject<{
|
|
207
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
208
|
+
outer: "outer";
|
|
209
|
+
inner: "inner";
|
|
210
|
+
}>>;
|
|
211
|
+
opacity: z.ZodOptional<z.ZodNumber>;
|
|
212
|
+
blur: z.ZodOptional<z.ZodNumber>;
|
|
213
|
+
angle: z.ZodOptional<z.ZodNumber>;
|
|
214
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
215
|
+
color: z.ZodOptional<z.ZodString>;
|
|
216
|
+
}, z.core.$strip>>;
|
|
195
217
|
type: z.ZodLiteral<"text">;
|
|
196
218
|
text: z.ZodString;
|
|
219
|
+
runs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
220
|
+
text: z.ZodString;
|
|
221
|
+
bold: z.ZodOptional<z.ZodBoolean>;
|
|
222
|
+
italic: z.ZodOptional<z.ZodBoolean>;
|
|
223
|
+
}, z.core.$strip>>>;
|
|
197
224
|
fontSize: z.ZodOptional<z.ZodNumber>;
|
|
198
225
|
color: z.ZodOptional<z.ZodString>;
|
|
199
226
|
textAlign: z.ZodOptional<z.ZodEnum<{
|
|
@@ -230,6 +257,11 @@ export declare const textNodeSchema: z.ZodObject<{
|
|
|
230
257
|
}, z.core.$strip>;
|
|
231
258
|
export declare const liNodeSchema: z.ZodObject<{
|
|
232
259
|
text: z.ZodString;
|
|
260
|
+
runs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
261
|
+
text: z.ZodString;
|
|
262
|
+
bold: z.ZodOptional<z.ZodBoolean>;
|
|
263
|
+
italic: z.ZodOptional<z.ZodBoolean>;
|
|
264
|
+
}, z.core.$strip>>>;
|
|
233
265
|
bold: z.ZodOptional<z.ZodBoolean>;
|
|
234
266
|
italic: z.ZodOptional<z.ZodBoolean>;
|
|
235
267
|
underline: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
@@ -317,9 +349,25 @@ export declare const ulNodeSchema: z.ZodObject<{
|
|
|
317
349
|
end: "end";
|
|
318
350
|
stretch: "stretch";
|
|
319
351
|
}>>;
|
|
352
|
+
shadow: z.ZodOptional<z.ZodObject<{
|
|
353
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
354
|
+
outer: "outer";
|
|
355
|
+
inner: "inner";
|
|
356
|
+
}>>;
|
|
357
|
+
opacity: z.ZodOptional<z.ZodNumber>;
|
|
358
|
+
blur: z.ZodOptional<z.ZodNumber>;
|
|
359
|
+
angle: z.ZodOptional<z.ZodNumber>;
|
|
360
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
361
|
+
color: z.ZodOptional<z.ZodString>;
|
|
362
|
+
}, z.core.$strip>>;
|
|
320
363
|
type: z.ZodLiteral<"ul">;
|
|
321
364
|
items: z.ZodArray<z.ZodObject<{
|
|
322
365
|
text: z.ZodString;
|
|
366
|
+
runs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
367
|
+
text: z.ZodString;
|
|
368
|
+
bold: z.ZodOptional<z.ZodBoolean>;
|
|
369
|
+
italic: z.ZodOptional<z.ZodBoolean>;
|
|
370
|
+
}, z.core.$strip>>>;
|
|
323
371
|
bold: z.ZodOptional<z.ZodBoolean>;
|
|
324
372
|
italic: z.ZodOptional<z.ZodBoolean>;
|
|
325
373
|
underline: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
@@ -441,9 +489,25 @@ export declare const olNodeSchema: z.ZodObject<{
|
|
|
441
489
|
end: "end";
|
|
442
490
|
stretch: "stretch";
|
|
443
491
|
}>>;
|
|
492
|
+
shadow: z.ZodOptional<z.ZodObject<{
|
|
493
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
494
|
+
outer: "outer";
|
|
495
|
+
inner: "inner";
|
|
496
|
+
}>>;
|
|
497
|
+
opacity: z.ZodOptional<z.ZodNumber>;
|
|
498
|
+
blur: z.ZodOptional<z.ZodNumber>;
|
|
499
|
+
angle: z.ZodOptional<z.ZodNumber>;
|
|
500
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
501
|
+
color: z.ZodOptional<z.ZodString>;
|
|
502
|
+
}, z.core.$strip>>;
|
|
444
503
|
type: z.ZodLiteral<"ol">;
|
|
445
504
|
items: z.ZodArray<z.ZodObject<{
|
|
446
505
|
text: z.ZodString;
|
|
506
|
+
runs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
507
|
+
text: z.ZodString;
|
|
508
|
+
bold: z.ZodOptional<z.ZodBoolean>;
|
|
509
|
+
italic: z.ZodOptional<z.ZodBoolean>;
|
|
510
|
+
}, z.core.$strip>>>;
|
|
447
511
|
bold: z.ZodOptional<z.ZodBoolean>;
|
|
448
512
|
italic: z.ZodOptional<z.ZodBoolean>;
|
|
449
513
|
underline: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
@@ -584,6 +648,17 @@ export declare const imageNodeSchema: z.ZodObject<{
|
|
|
584
648
|
end: "end";
|
|
585
649
|
stretch: "stretch";
|
|
586
650
|
}>>;
|
|
651
|
+
shadow: z.ZodOptional<z.ZodObject<{
|
|
652
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
653
|
+
outer: "outer";
|
|
654
|
+
inner: "inner";
|
|
655
|
+
}>>;
|
|
656
|
+
opacity: z.ZodOptional<z.ZodNumber>;
|
|
657
|
+
blur: z.ZodOptional<z.ZodNumber>;
|
|
658
|
+
angle: z.ZodOptional<z.ZodNumber>;
|
|
659
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
660
|
+
color: z.ZodOptional<z.ZodString>;
|
|
661
|
+
}, z.core.$strip>>;
|
|
587
662
|
type: z.ZodLiteral<"image">;
|
|
588
663
|
src: z.ZodString;
|
|
589
664
|
sizing: z.ZodOptional<z.ZodObject<{
|
|
@@ -597,17 +672,6 @@ export declare const imageNodeSchema: z.ZodObject<{
|
|
|
597
672
|
x: z.ZodOptional<z.ZodNumber>;
|
|
598
673
|
y: z.ZodOptional<z.ZodNumber>;
|
|
599
674
|
}, z.core.$strip>>;
|
|
600
|
-
shadow: z.ZodOptional<z.ZodObject<{
|
|
601
|
-
type: z.ZodOptional<z.ZodEnum<{
|
|
602
|
-
outer: "outer";
|
|
603
|
-
inner: "inner";
|
|
604
|
-
}>>;
|
|
605
|
-
opacity: z.ZodOptional<z.ZodNumber>;
|
|
606
|
-
blur: z.ZodOptional<z.ZodNumber>;
|
|
607
|
-
angle: z.ZodOptional<z.ZodNumber>;
|
|
608
|
-
offset: z.ZodOptional<z.ZodNumber>;
|
|
609
|
-
color: z.ZodOptional<z.ZodString>;
|
|
610
|
-
}, z.core.$strip>>;
|
|
611
675
|
}, z.core.$strip>;
|
|
612
676
|
export declare const iconNodeSchema: z.ZodObject<{
|
|
613
677
|
w: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"max">, z.ZodString]>>;
|
|
@@ -668,6 +732,17 @@ export declare const iconNodeSchema: z.ZodObject<{
|
|
|
668
732
|
end: "end";
|
|
669
733
|
stretch: "stretch";
|
|
670
734
|
}>>;
|
|
735
|
+
shadow: z.ZodOptional<z.ZodObject<{
|
|
736
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
737
|
+
outer: "outer";
|
|
738
|
+
inner: "inner";
|
|
739
|
+
}>>;
|
|
740
|
+
opacity: z.ZodOptional<z.ZodNumber>;
|
|
741
|
+
blur: z.ZodOptional<z.ZodNumber>;
|
|
742
|
+
angle: z.ZodOptional<z.ZodNumber>;
|
|
743
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
744
|
+
color: z.ZodOptional<z.ZodString>;
|
|
745
|
+
}, z.core.$strip>>;
|
|
671
746
|
type: z.ZodLiteral<"icon">;
|
|
672
747
|
name: z.ZodOptional<z.ZodEnum<{
|
|
673
748
|
[x: string]: string;
|
|
@@ -743,6 +818,17 @@ export declare const tableNodeSchema: z.ZodObject<{
|
|
|
743
818
|
end: "end";
|
|
744
819
|
stretch: "stretch";
|
|
745
820
|
}>>;
|
|
821
|
+
shadow: z.ZodOptional<z.ZodObject<{
|
|
822
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
823
|
+
outer: "outer";
|
|
824
|
+
inner: "inner";
|
|
825
|
+
}>>;
|
|
826
|
+
opacity: z.ZodOptional<z.ZodNumber>;
|
|
827
|
+
blur: z.ZodOptional<z.ZodNumber>;
|
|
828
|
+
angle: z.ZodOptional<z.ZodNumber>;
|
|
829
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
830
|
+
color: z.ZodOptional<z.ZodString>;
|
|
831
|
+
}, z.core.$strip>>;
|
|
746
832
|
type: z.ZodLiteral<"table">;
|
|
747
833
|
columns: z.ZodArray<z.ZodObject<{
|
|
748
834
|
width: z.ZodOptional<z.ZodNumber>;
|
|
@@ -750,6 +836,11 @@ export declare const tableNodeSchema: z.ZodObject<{
|
|
|
750
836
|
rows: z.ZodArray<z.ZodObject<{
|
|
751
837
|
cells: z.ZodArray<z.ZodObject<{
|
|
752
838
|
text: z.ZodString;
|
|
839
|
+
runs: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
840
|
+
text: z.ZodString;
|
|
841
|
+
bold: z.ZodOptional<z.ZodBoolean>;
|
|
842
|
+
italic: z.ZodOptional<z.ZodBoolean>;
|
|
843
|
+
}, z.core.$strip>>>;
|
|
753
844
|
fontSize: z.ZodOptional<z.ZodNumber>;
|
|
754
845
|
color: z.ZodOptional<z.ZodString>;
|
|
755
846
|
bold: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -848,6 +939,17 @@ export declare const shapeNodeSchema: z.ZodObject<{
|
|
|
848
939
|
end: "end";
|
|
849
940
|
stretch: "stretch";
|
|
850
941
|
}>>;
|
|
942
|
+
shadow: z.ZodOptional<z.ZodObject<{
|
|
943
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
944
|
+
outer: "outer";
|
|
945
|
+
inner: "inner";
|
|
946
|
+
}>>;
|
|
947
|
+
opacity: z.ZodOptional<z.ZodNumber>;
|
|
948
|
+
blur: z.ZodOptional<z.ZodNumber>;
|
|
949
|
+
angle: z.ZodOptional<z.ZodNumber>;
|
|
950
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
951
|
+
color: z.ZodOptional<z.ZodString>;
|
|
952
|
+
}, z.core.$strip>>;
|
|
851
953
|
type: z.ZodLiteral<"shape">;
|
|
852
954
|
shapeType: z.ZodEnum<{
|
|
853
955
|
cloud: "cloud";
|
|
@@ -1048,17 +1150,6 @@ export declare const shapeNodeSchema: z.ZodObject<{
|
|
|
1048
1150
|
sysDot: "sysDot";
|
|
1049
1151
|
}>>;
|
|
1050
1152
|
}, z.core.$strip>>;
|
|
1051
|
-
shadow: z.ZodOptional<z.ZodObject<{
|
|
1052
|
-
type: z.ZodOptional<z.ZodEnum<{
|
|
1053
|
-
outer: "outer";
|
|
1054
|
-
inner: "inner";
|
|
1055
|
-
}>>;
|
|
1056
|
-
opacity: z.ZodOptional<z.ZodNumber>;
|
|
1057
|
-
blur: z.ZodOptional<z.ZodNumber>;
|
|
1058
|
-
angle: z.ZodOptional<z.ZodNumber>;
|
|
1059
|
-
offset: z.ZodOptional<z.ZodNumber>;
|
|
1060
|
-
color: z.ZodOptional<z.ZodString>;
|
|
1061
|
-
}, z.core.$strip>>;
|
|
1062
1153
|
fontSize: z.ZodOptional<z.ZodNumber>;
|
|
1063
1154
|
color: z.ZodOptional<z.ZodString>;
|
|
1064
1155
|
textAlign: z.ZodOptional<z.ZodEnum<{
|
|
@@ -1152,6 +1243,17 @@ export declare const chartNodeSchema: z.ZodObject<{
|
|
|
1152
1243
|
end: "end";
|
|
1153
1244
|
stretch: "stretch";
|
|
1154
1245
|
}>>;
|
|
1246
|
+
shadow: z.ZodOptional<z.ZodObject<{
|
|
1247
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
1248
|
+
outer: "outer";
|
|
1249
|
+
inner: "inner";
|
|
1250
|
+
}>>;
|
|
1251
|
+
opacity: z.ZodOptional<z.ZodNumber>;
|
|
1252
|
+
blur: z.ZodOptional<z.ZodNumber>;
|
|
1253
|
+
angle: z.ZodOptional<z.ZodNumber>;
|
|
1254
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
1255
|
+
color: z.ZodOptional<z.ZodString>;
|
|
1256
|
+
}, z.core.$strip>>;
|
|
1155
1257
|
type: z.ZodLiteral<"chart">;
|
|
1156
1258
|
chartType: z.ZodEnum<{
|
|
1157
1259
|
radar: "radar";
|
|
@@ -1243,6 +1345,17 @@ export declare const timelineNodeSchema: z.ZodObject<{
|
|
|
1243
1345
|
end: "end";
|
|
1244
1346
|
stretch: "stretch";
|
|
1245
1347
|
}>>;
|
|
1348
|
+
shadow: z.ZodOptional<z.ZodObject<{
|
|
1349
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
1350
|
+
outer: "outer";
|
|
1351
|
+
inner: "inner";
|
|
1352
|
+
}>>;
|
|
1353
|
+
opacity: z.ZodOptional<z.ZodNumber>;
|
|
1354
|
+
blur: z.ZodOptional<z.ZodNumber>;
|
|
1355
|
+
angle: z.ZodOptional<z.ZodNumber>;
|
|
1356
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
1357
|
+
color: z.ZodOptional<z.ZodString>;
|
|
1358
|
+
}, z.core.$strip>>;
|
|
1246
1359
|
type: z.ZodLiteral<"timeline">;
|
|
1247
1360
|
direction: z.ZodOptional<z.ZodEnum<{
|
|
1248
1361
|
horizontal: "horizontal";
|
|
@@ -1315,6 +1428,17 @@ export declare const matrixNodeSchema: z.ZodObject<{
|
|
|
1315
1428
|
end: "end";
|
|
1316
1429
|
stretch: "stretch";
|
|
1317
1430
|
}>>;
|
|
1431
|
+
shadow: z.ZodOptional<z.ZodObject<{
|
|
1432
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
1433
|
+
outer: "outer";
|
|
1434
|
+
inner: "inner";
|
|
1435
|
+
}>>;
|
|
1436
|
+
opacity: z.ZodOptional<z.ZodNumber>;
|
|
1437
|
+
blur: z.ZodOptional<z.ZodNumber>;
|
|
1438
|
+
angle: z.ZodOptional<z.ZodNumber>;
|
|
1439
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
1440
|
+
color: z.ZodOptional<z.ZodString>;
|
|
1441
|
+
}, z.core.$strip>>;
|
|
1318
1442
|
type: z.ZodLiteral<"matrix">;
|
|
1319
1443
|
axes: z.ZodObject<{
|
|
1320
1444
|
x: z.ZodString;
|
|
@@ -1407,6 +1531,17 @@ export declare const treeNodeSchema: z.ZodObject<{
|
|
|
1407
1531
|
end: "end";
|
|
1408
1532
|
stretch: "stretch";
|
|
1409
1533
|
}>>;
|
|
1534
|
+
shadow: z.ZodOptional<z.ZodObject<{
|
|
1535
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
1536
|
+
outer: "outer";
|
|
1537
|
+
inner: "inner";
|
|
1538
|
+
}>>;
|
|
1539
|
+
opacity: z.ZodOptional<z.ZodNumber>;
|
|
1540
|
+
blur: z.ZodOptional<z.ZodNumber>;
|
|
1541
|
+
angle: z.ZodOptional<z.ZodNumber>;
|
|
1542
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
1543
|
+
color: z.ZodOptional<z.ZodString>;
|
|
1544
|
+
}, z.core.$strip>>;
|
|
1410
1545
|
type: z.ZodLiteral<"tree">;
|
|
1411
1546
|
layout: z.ZodOptional<z.ZodEnum<{
|
|
1412
1547
|
horizontal: "horizontal";
|
|
@@ -1489,6 +1624,17 @@ export declare const processArrowNodeSchema: z.ZodObject<{
|
|
|
1489
1624
|
end: "end";
|
|
1490
1625
|
stretch: "stretch";
|
|
1491
1626
|
}>>;
|
|
1627
|
+
shadow: z.ZodOptional<z.ZodObject<{
|
|
1628
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
1629
|
+
outer: "outer";
|
|
1630
|
+
inner: "inner";
|
|
1631
|
+
}>>;
|
|
1632
|
+
opacity: z.ZodOptional<z.ZodNumber>;
|
|
1633
|
+
blur: z.ZodOptional<z.ZodNumber>;
|
|
1634
|
+
angle: z.ZodOptional<z.ZodNumber>;
|
|
1635
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
1636
|
+
color: z.ZodOptional<z.ZodString>;
|
|
1637
|
+
}, z.core.$strip>>;
|
|
1492
1638
|
type: z.ZodLiteral<"processArrow">;
|
|
1493
1639
|
direction: z.ZodOptional<z.ZodEnum<{
|
|
1494
1640
|
horizontal: "horizontal";
|
|
@@ -1588,6 +1734,17 @@ export declare const pyramidNodeSchema: z.ZodObject<{
|
|
|
1588
1734
|
end: "end";
|
|
1589
1735
|
stretch: "stretch";
|
|
1590
1736
|
}>>;
|
|
1737
|
+
shadow: z.ZodOptional<z.ZodObject<{
|
|
1738
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
1739
|
+
outer: "outer";
|
|
1740
|
+
inner: "inner";
|
|
1741
|
+
}>>;
|
|
1742
|
+
opacity: z.ZodOptional<z.ZodNumber>;
|
|
1743
|
+
blur: z.ZodOptional<z.ZodNumber>;
|
|
1744
|
+
angle: z.ZodOptional<z.ZodNumber>;
|
|
1745
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
1746
|
+
color: z.ZodOptional<z.ZodString>;
|
|
1747
|
+
}, z.core.$strip>>;
|
|
1591
1748
|
type: z.ZodLiteral<"pyramid">;
|
|
1592
1749
|
direction: z.ZodOptional<z.ZodEnum<{
|
|
1593
1750
|
up: "up";
|
|
@@ -1661,6 +1818,17 @@ export declare const flowNodeSchema: z.ZodObject<{
|
|
|
1661
1818
|
end: "end";
|
|
1662
1819
|
stretch: "stretch";
|
|
1663
1820
|
}>>;
|
|
1821
|
+
shadow: z.ZodOptional<z.ZodObject<{
|
|
1822
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
1823
|
+
outer: "outer";
|
|
1824
|
+
inner: "inner";
|
|
1825
|
+
}>>;
|
|
1826
|
+
opacity: z.ZodOptional<z.ZodNumber>;
|
|
1827
|
+
blur: z.ZodOptional<z.ZodNumber>;
|
|
1828
|
+
angle: z.ZodOptional<z.ZodNumber>;
|
|
1829
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
1830
|
+
color: z.ZodOptional<z.ZodString>;
|
|
1831
|
+
}, z.core.$strip>>;
|
|
1664
1832
|
type: z.ZodLiteral<"flow">;
|
|
1665
1833
|
direction: z.ZodOptional<z.ZodEnum<{
|
|
1666
1834
|
horizontal: "horizontal";
|
|
@@ -1780,6 +1948,17 @@ export declare const lineNodeSchema: z.ZodObject<{
|
|
|
1780
1948
|
end: "end";
|
|
1781
1949
|
stretch: "stretch";
|
|
1782
1950
|
}>>;
|
|
1951
|
+
shadow: z.ZodOptional<z.ZodObject<{
|
|
1952
|
+
type: z.ZodOptional<z.ZodEnum<{
|
|
1953
|
+
outer: "outer";
|
|
1954
|
+
inner: "inner";
|
|
1955
|
+
}>>;
|
|
1956
|
+
opacity: z.ZodOptional<z.ZodNumber>;
|
|
1957
|
+
blur: z.ZodOptional<z.ZodNumber>;
|
|
1958
|
+
angle: z.ZodOptional<z.ZodNumber>;
|
|
1959
|
+
offset: z.ZodOptional<z.ZodNumber>;
|
|
1960
|
+
color: z.ZodOptional<z.ZodString>;
|
|
1961
|
+
}, z.core.$strip>>;
|
|
1783
1962
|
type: z.ZodLiteral<"line">;
|
|
1784
1963
|
x1: z.ZodNumber;
|
|
1785
1964
|
y1: z.ZodNumber;
|
|
@@ -1826,7 +2005,6 @@ export type VStackNode = BasePOMNode & {
|
|
|
1826
2005
|
gap?: number;
|
|
1827
2006
|
alignItems?: AlignItems;
|
|
1828
2007
|
justifyContent?: JustifyContent;
|
|
1829
|
-
shadow?: ShadowStyle;
|
|
1830
2008
|
flexWrap?: FlexWrap;
|
|
1831
2009
|
};
|
|
1832
2010
|
export type HStackNode = BasePOMNode & {
|
|
@@ -1835,7 +2013,6 @@ export type HStackNode = BasePOMNode & {
|
|
|
1835
2013
|
gap?: number;
|
|
1836
2014
|
alignItems?: AlignItems;
|
|
1837
2015
|
justifyContent?: JustifyContent;
|
|
1838
|
-
shadow?: ShadowStyle;
|
|
1839
2016
|
flexWrap?: FlexWrap;
|
|
1840
2017
|
};
|
|
1841
2018
|
type LayerChild = POMNode & {
|
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,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA0CxB,eAAO,MAAM,iBAAiB;;;;;;;;;;iBAO5B,CAAC;AAqBH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;EAgB/B,CAAC;AAEH,eAAO,MAAM,e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gB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,kBAAkB,GAAG,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
|
@@ -304,11 +304,19 @@ const basePOMNodeSchema = z.object({
|
|
|
304
304
|
bottom: z.number().optional(),
|
|
305
305
|
left: z.number().optional(),
|
|
306
306
|
alignSelf: alignSelfSchema.optional(),
|
|
307
|
+
shadow: shadowStyleSchema.optional(),
|
|
308
|
+
});
|
|
309
|
+
// ===== Inline text run (partial bold/italic within a text node) =====
|
|
310
|
+
const textRunSchema = z.object({
|
|
311
|
+
text: z.string(),
|
|
312
|
+
bold: z.boolean().optional(),
|
|
313
|
+
italic: z.boolean().optional(),
|
|
307
314
|
});
|
|
308
315
|
// ===== Non-recursive Node Types =====
|
|
309
316
|
export const textNodeSchema = basePOMNodeSchema.extend({
|
|
310
317
|
type: z.literal("text"),
|
|
311
318
|
text: z.string(),
|
|
319
|
+
runs: z.array(textRunSchema).optional(),
|
|
312
320
|
fontSize: z.number().optional(),
|
|
313
321
|
color: z.string().optional(),
|
|
314
322
|
textAlign: z.enum(["left", "center", "right"]).optional(),
|
|
@@ -322,6 +330,7 @@ export const textNodeSchema = basePOMNodeSchema.extend({
|
|
|
322
330
|
});
|
|
323
331
|
export const liNodeSchema = z.object({
|
|
324
332
|
text: z.string(),
|
|
333
|
+
runs: z.array(textRunSchema).optional(),
|
|
325
334
|
bold: z.boolean().optional(),
|
|
326
335
|
italic: z.boolean().optional(),
|
|
327
336
|
underline: underlineSchema.optional(),
|
|
@@ -372,7 +381,6 @@ export const imageNodeSchema = basePOMNodeSchema.extend({
|
|
|
372
381
|
type: z.literal("image"),
|
|
373
382
|
src: z.string(),
|
|
374
383
|
sizing: imageSizingSchema.optional(),
|
|
375
|
-
shadow: shadowStyleSchema.optional(),
|
|
376
384
|
});
|
|
377
385
|
const iconNameSchema = z.enum(Object.keys(ICON_DATA));
|
|
378
386
|
const iconColorSchema = z
|
|
@@ -398,6 +406,7 @@ export const iconNodeSchema = basePOMNodeSchema.extend({
|
|
|
398
406
|
});
|
|
399
407
|
const tableCellSchema = z.object({
|
|
400
408
|
text: z.string(),
|
|
409
|
+
runs: z.array(textRunSchema).optional(),
|
|
401
410
|
fontSize: z.number().optional(),
|
|
402
411
|
color: z.string().optional(),
|
|
403
412
|
bold: z.boolean().optional(),
|
|
@@ -429,7 +438,6 @@ export const shapeNodeSchema = basePOMNodeSchema.extend({
|
|
|
429
438
|
text: z.string().optional(),
|
|
430
439
|
fill: fillStyleSchema.optional(),
|
|
431
440
|
line: borderStyleSchema.optional(),
|
|
432
|
-
shadow: shadowStyleSchema.optional(),
|
|
433
441
|
fontSize: z.number().optional(),
|
|
434
442
|
color: z.string().optional(),
|
|
435
443
|
textAlign: z.enum(["left", "center", "right"]).optional(),
|
|
@@ -640,7 +648,6 @@ const vStackNodeSchemaBase = basePOMNodeSchema.extend({
|
|
|
640
648
|
gap: z.number().optional(),
|
|
641
649
|
alignItems: alignItemsSchema.optional(),
|
|
642
650
|
justifyContent: justifyContentSchema.optional(),
|
|
643
|
-
shadow: shadowStyleSchema.optional(),
|
|
644
651
|
flexWrap: flexWrapSchema.optional(),
|
|
645
652
|
});
|
|
646
653
|
const hStackNodeSchemaBase = basePOMNodeSchema.extend({
|
|
@@ -649,7 +656,6 @@ const hStackNodeSchemaBase = basePOMNodeSchema.extend({
|
|
|
649
656
|
gap: z.number().optional(),
|
|
650
657
|
alignItems: alignItemsSchema.optional(),
|
|
651
658
|
justifyContent: justifyContentSchema.optional(),
|
|
652
|
-
shadow: shadowStyleSchema.optional(),
|
|
653
659
|
flexWrap: flexWrapSchema.optional(),
|
|
654
660
|
});
|
|
655
661
|
const layerChildSchemaBase = z.lazy(() => pomNodeSchema.and(z.object({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hirokisakabe/pom",
|
|
3
|
-
"version": "6.0
|
|
3
|
+
"version": "6.1.0",
|
|
4
4
|
"description": "AI-friendly PowerPoint generation with a Flexbox layout engine.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
},
|
|
23
23
|
"repository": {
|
|
24
24
|
"type": "git",
|
|
25
|
-
"url": "git+https://github.com/hirokisakabe/pom.git"
|
|
25
|
+
"url": "git+https://github.com/hirokisakabe/pom.git",
|
|
26
|
+
"directory": "packages/pom"
|
|
26
27
|
},
|
|
27
28
|
"license": "MIT",
|
|
28
29
|
"keywords": [
|
|
@@ -44,30 +45,21 @@
|
|
|
44
45
|
"access": "public"
|
|
45
46
|
},
|
|
46
47
|
"devDependencies": {
|
|
47
|
-
"@changesets/changelog-github": "^0.5.2",
|
|
48
|
-
"@changesets/cli": "^2.29.8",
|
|
49
|
-
"@eslint/js": "^9.39.1",
|
|
50
48
|
"@size-limit/file": "^12.0.1",
|
|
49
|
+
"@types/node": "^25.5.0",
|
|
51
50
|
"@types/opentype.js": "^1.3.8",
|
|
52
51
|
"@types/pngjs": "6.0.5",
|
|
53
52
|
"@vitest/coverage-v8": "^4.1.0",
|
|
54
53
|
"@vitest/ui": "^4.1.0",
|
|
55
|
-
"eslint": "^9.39.1",
|
|
56
|
-
"globals": "^16.5.0",
|
|
57
|
-
"jiti": "2.6.1",
|
|
58
|
-
"knip": "^5.85.0",
|
|
59
54
|
"lucide-static": "^0.577.0",
|
|
60
55
|
"pixelmatch": "7.1.0",
|
|
61
56
|
"pngjs": "7.0.0",
|
|
62
|
-
"prettier": "3.6.2",
|
|
63
57
|
"size-limit": "^12.0.1",
|
|
64
58
|
"tsx": "4.21.0",
|
|
65
|
-
"typescript": "
|
|
66
|
-
"typescript-eslint": "^8.47.0",
|
|
67
|
-
"vitest": "^4.1.0"
|
|
59
|
+
"typescript-eslint": "^8.47.0"
|
|
68
60
|
},
|
|
69
61
|
"dependencies": {
|
|
70
|
-
"@resvg/resvg-
|
|
62
|
+
"@resvg/resvg-wasm": "^2.6.2",
|
|
71
63
|
"fast-xml-parser": "^5.3.7",
|
|
72
64
|
"image-size": "2.0.2",
|
|
73
65
|
"opentype.js": "^1.3.4",
|
|
@@ -97,7 +89,6 @@
|
|
|
97
89
|
"docs:images:docker:update": "docker compose build docs-images && docker compose run --rm docs-images",
|
|
98
90
|
"docs:images:vrt": "tsx scripts/docs-images/generateNodeImages.ts --check",
|
|
99
91
|
"docs:images:vrt:docker": "docker compose build docs-images-vrt && docker compose run --rm docs-images-vrt",
|
|
100
|
-
"release": "changeset publish",
|
|
101
92
|
"size": "size-limit"
|
|
102
93
|
}
|
|
103
94
|
}
|