@hirokisakabe/pom 4.1.1 → 5.0.1

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.
Files changed (39) hide show
  1. package/README.md +2 -2
  2. package/dist/calcYogaLayout/calcYogaLayout.js +18 -8
  3. package/dist/calcYogaLayout/fontLoader.d.ts +1 -1
  4. package/dist/calcYogaLayout/fontLoader.js +1 -1
  5. package/dist/icons/iconData.d.ts +2 -0
  6. package/dist/icons/iconData.d.ts.map +1 -0
  7. package/dist/icons/iconData.js +53 -0
  8. package/dist/icons/index.d.ts +2 -0
  9. package/dist/icons/index.d.ts.map +1 -0
  10. package/dist/icons/index.js +1 -0
  11. package/dist/icons/renderIcon.d.ts +2 -0
  12. package/dist/icons/renderIcon.d.ts.map +1 -0
  13. package/dist/icons/renderIcon.js +23 -0
  14. package/dist/parseXml/inputSchema.d.ts +65 -21
  15. package/dist/parseXml/inputSchema.d.ts.map +1 -1
  16. package/dist/parseXml/inputSchema.js +22 -15
  17. package/dist/parseXml/parseXml.d.ts +1 -1
  18. package/dist/parseXml/parseXml.d.ts.map +1 -1
  19. package/dist/parseXml/parseXml.js +120 -4
  20. package/dist/renderPptx/nodes/icon.d.ts +8 -0
  21. package/dist/renderPptx/nodes/icon.d.ts.map +1 -0
  22. package/dist/renderPptx/nodes/icon.js +10 -0
  23. package/dist/renderPptx/nodes/index.d.ts +1 -0
  24. package/dist/renderPptx/nodes/index.d.ts.map +1 -1
  25. package/dist/renderPptx/nodes/index.js +1 -0
  26. package/dist/renderPptx/nodes/list.js +16 -16
  27. package/dist/renderPptx/nodes/processArrow.js +2 -2
  28. package/dist/renderPptx/nodes/pyramid.js +1 -1
  29. package/dist/renderPptx/nodes/shape.js +3 -3
  30. package/dist/renderPptx/nodes/table.js +2 -2
  31. package/dist/renderPptx/renderPptx.d.ts.map +1 -1
  32. package/dist/renderPptx/renderPptx.js +8 -5
  33. package/dist/renderPptx/textOptions.js +4 -4
  34. package/dist/toPositioned/toPositioned.d.ts.map +1 -1
  35. package/dist/toPositioned/toPositioned.js +13 -0
  36. package/dist/types.d.ts +90 -36
  37. package/dist/types.d.ts.map +1 -1
  38. package/dist/types.js +36 -20
  39. package/package.json +4 -1
package/README.md CHANGED
@@ -59,8 +59,8 @@ import { buildPptx } from "@hirokisakabe/pom";
59
59
 
60
60
  const xml = `
61
61
  <VStack w="100%" h="max" padding="48" gap="24" alignItems="start">
62
- <Text fontPx="48" bold="true">Presentation Title</Text>
63
- <Text fontPx="24" color="666666">Subtitle</Text>
62
+ <Text fontSize="48" bold="true">Presentation Title</Text>
63
+ <Text fontSize="24" color="666666">Subtitle</Text>
64
64
  </VStack>
65
65
  `;
66
66
 
@@ -127,6 +127,7 @@ async function buildPomWithYogaTree(node, parentYoga, parentNode) {
127
127
  case "processArrow":
128
128
  case "pyramid":
129
129
  case "line":
130
+ case "icon":
130
131
  // 子要素なし
131
132
  break;
132
133
  }
@@ -217,7 +218,7 @@ async function applyStyleToYogaNode(node, yn) {
217
218
  case "text":
218
219
  {
219
220
  const text = node.text;
220
- const fontSizePx = node.fontPx ?? 24;
221
+ const fontSizePx = node.fontSize ?? 24;
221
222
  const fontFamily = "Noto Sans JP";
222
223
  const fontWeight = node.bold ? "bold" : "normal";
223
224
  const lineHeight = 1.3;
@@ -248,14 +249,14 @@ async function applyStyleToYogaNode(node, yn) {
248
249
  case "ol":
249
250
  {
250
251
  const combinedText = node.items.map((item) => item.text).join("\n");
251
- const fontSizePx = node.fontPx ?? 24;
252
+ const fontSizePx = node.fontSize ?? 24;
252
253
  const fontFamily = "Noto Sans JP";
253
254
  const fontWeight = node.bold ? "bold" : "normal";
254
- const lineSpacingMultiple = node.lineSpacingMultiple ?? 1.3;
255
- // PowerPoint の lineSpacingMultiple はフォントメトリクス(ascent + descent)に
256
- // 対する倍率。fontSizePx × fontMetricsRatio × lineSpacingMultiple で計算する。
255
+ const spacingMultiple = node.lineHeight ?? 1.3;
256
+ // PowerPoint の lineHeight はフォントメトリクス(ascent + descent)に
257
+ // 対する倍率。fontSizePx × fontMetricsRatio × spacingMultiple で計算する。
257
258
  const fontMetricsRatio = measureFontLineHeightRatio(fontWeight);
258
- const lineHeight = fontMetricsRatio * lineSpacingMultiple;
259
+ const lineHeight = fontMetricsRatio * spacingMultiple;
259
260
  // バレット/番号のインデント幅(pptxgenjs DEF_BULLET_MARGIN = 27pt = 36px @96dpi)
260
261
  const bulletIndentPx = 36;
261
262
  yn.setMeasureFunc((width, widthMode) => {
@@ -296,6 +297,15 @@ async function applyStyleToYogaNode(node, yn) {
296
297
  });
297
298
  }
298
299
  break;
300
+ case "icon":
301
+ {
302
+ const size = node.size ?? 24;
303
+ yn.setMeasureFunc(() => ({
304
+ width: size,
305
+ height: size,
306
+ }));
307
+ }
308
+ break;
299
309
  case "table":
300
310
  {
301
311
  yn.setMeasureFunc(() => {
@@ -312,10 +322,10 @@ async function applyStyleToYogaNode(node, yn) {
312
322
  if (node.text) {
313
323
  // テキストがある場合、テキストサイズを測定
314
324
  const text = node.text;
315
- const fontSizePx = node.fontPx ?? 24;
325
+ const fontSizePx = node.fontSize ?? 24;
316
326
  const fontFamily = node.fontFamily ?? "Noto Sans JP";
317
327
  const fontWeight = node.bold ? "bold" : "normal";
318
- const lineHeight = node.lineSpacingMultiple ?? 1.3;
328
+ const lineHeight = node.lineHeight ?? 1.3;
319
329
  yn.setMeasureFunc((width, widthMode) => {
320
330
  const maxWidthPx = (() => {
321
331
  switch (widthMode) {
@@ -13,7 +13,7 @@ export declare function measureTextWidth(text: string, fontSizePx: number, weigh
13
13
  /**
14
14
  * フォントの自然な行高さ比率を取得する
15
15
  *
16
- * PowerPoint の lineSpacingMultiple はフォントサイズではなく、
16
+ * PowerPoint の lineHeight はフォントサイズではなく、
17
17
  * フォントメトリクス(ascent + descent)に対する倍率として適用される。
18
18
  * この関数は fontSizePx に対する自然な行高さの比率を返す。
19
19
  *
@@ -60,7 +60,7 @@ export function measureTextWidth(text, fontSizePx, weight) {
60
60
  /**
61
61
  * フォントの自然な行高さ比率を取得する
62
62
  *
63
- * PowerPoint の lineSpacingMultiple はフォントサイズではなく、
63
+ * PowerPoint の lineHeight はフォントサイズではなく、
64
64
  * フォントメトリクス(ascent + descent)に対する倍率として適用される。
65
65
  * この関数は fontSizePx に対する自然な行高さの比率を返す。
66
66
  *
@@ -0,0 +1,2 @@
1
+ export declare const ICON_DATA: Record<string, string>;
2
+ //# sourceMappingURL=iconData.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iconData.d.ts","sourceRoot":"","sources":["../../src/icons/iconData.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAkD5C,CAAC"}
@@ -0,0 +1,53 @@
1
+ // Auto-generated from lucide-static v0.577.0 (ISC License)
2
+ // https://lucide.dev/
3
+ export const ICON_DATA = {
4
+ cpu: `<path d="M12 20v2" /><path d="M12 2v2" /><path d="M17 20v2" /><path d="M17 2v2" /><path d="M2 12h2" /><path d="M2 17h2" /><path d="M2 7h2" /><path d="M20 12h2" /><path d="M20 17h2" /><path d="M20 7h2" /><path d="M7 20v2" /><path d="M7 2v2" /><rect x="4" y="4" width="16" height="16" rx="2" /><rect x="8" y="8" width="8" height="8" rx="1" />`,
5
+ database: `<ellipse cx="12" cy="5" rx="9" ry="3" /><path d="M3 5V19A9 3 0 0 0 21 19V5" /><path d="M3 12A9 3 0 0 0 21 12" />`,
6
+ cloud: `<path d="M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z" />`,
7
+ server: `<rect width="20" height="8" x="2" y="2" rx="2" ry="2" /><rect width="20" height="8" x="2" y="14" rx="2" ry="2" /><line x1="6" x2="6.01" y1="6" y2="6" /><line x1="6" x2="6.01" y1="18" y2="18" />`,
8
+ code: `<path d="m16 18 6-6-6-6" /><path d="m8 6-6 6 6 6" />`,
9
+ terminal: `<path d="M12 19h8" /><path d="m4 17 6-6-6-6" />`,
10
+ wifi: `<path d="M12 20h.01" /><path d="M2 8.82a15 15 0 0 1 20 0" /><path d="M5 12.859a10 10 0 0 1 14 0" /><path d="M8.5 16.429a5 5 0 0 1 7 0" />`,
11
+ globe: `<circle cx="12" cy="12" r="10" /><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20" /><path d="M2 12h20" />`,
12
+ user: `<path d="M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2" /><circle cx="12" cy="7" r="4" />`,
13
+ users: `<path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" /><path d="M16 3.128a4 4 0 0 1 0 7.744" /><path d="M22 21v-2a4 4 0 0 0-3-3.87" /><circle cx="9" cy="7" r="4" />`,
14
+ contact: `<path d="M16 2v2" /><path d="M7 22v-2a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2" /><path d="M8 2v2" /><circle cx="12" cy="11" r="3" /><rect x="3" y="4" width="18" height="18" rx="2" />`,
15
+ briefcase: `<path d="M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16" /><rect width="20" height="14" x="2" y="6" rx="2" />`,
16
+ building: `<path d="M12 10h.01" /><path d="M12 14h.01" /><path d="M12 6h.01" /><path d="M16 10h.01" /><path d="M16 14h.01" /><path d="M16 6h.01" /><path d="M8 10h.01" /><path d="M8 14h.01" /><path d="M8 6h.01" /><path d="M9 22v-3a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3" /><rect x="4" y="2" width="16" height="20" rx="2" />`,
17
+ "bar-chart": `<path d="M5 21v-6" /><path d="M12 21V9" /><path d="M19 21V3" />`,
18
+ "line-chart": `<path d="M3 3v16a2 2 0 0 0 2 2h16" /><path d="m19 9-5 5-4-4-3 3" />`,
19
+ "pie-chart": `<path d="M21 12c.552 0 1.005-.449.95-.998a10 10 0 0 0-8.953-8.951c-.55-.055-.998.398-.998.95v8a1 1 0 0 0 1 1z" /><path d="M21.21 15.89A10 10 0 1 1 8 2.83" />`,
20
+ "trending-up": `<path d="M16 7h6v6" /><path d="m22 7-8.5 8.5-5-5L2 17" />`,
21
+ mail: `<path d="m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7" /><rect x="2" y="4" width="20" height="16" rx="2" />`,
22
+ "message-square": `<path d="M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z" />`,
23
+ phone: `<path d="M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384" />`,
24
+ video: `<path d="m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5" /><rect x="2" y="6" width="14" height="12" rx="2" />`,
25
+ search: `<path d="m21 21-4.34-4.34" /><circle cx="11" cy="11" r="8" />`,
26
+ settings: `<path d="M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915" /><circle cx="12" cy="12" r="3" />`,
27
+ filter: `<path d="M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z" />`,
28
+ download: `<path d="M12 15V3" /><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" /><path d="m7 10 5 5 5-5" />`,
29
+ upload: `<path d="M12 3v12" /><path d="m17 8-5-5-5 5" /><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" />`,
30
+ share: `<path d="M12 2v13" /><path d="m16 6-4-4-4 4" /><path d="M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8" />`,
31
+ check: `<path d="M20 6 9 17l-5-5" />`,
32
+ "alert-triangle": `<path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" /><path d="M12 9v4" /><path d="M12 17h.01" />`,
33
+ info: `<circle cx="12" cy="12" r="10" /><path d="M12 16v-4" /><path d="M12 8h.01" />`,
34
+ shield: `<path d="M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" />`,
35
+ lock: `<rect width="18" height="11" x="3" y="11" rx="2" ry="2" /><path d="M7 11V7a5 5 0 0 1 10 0v4" />`,
36
+ unlock: `<rect width="18" height="11" x="3" y="11" rx="2" ry="2" /><path d="M7 11V7a5 5 0 0 1 9.9-1" />`,
37
+ file: `<path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" /><path d="M14 2v5a1 1 0 0 0 1 1h5" />`,
38
+ folder: `<path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" />`,
39
+ image: `<rect width="18" height="18" x="3" y="3" rx="2" ry="2" /><circle cx="9" cy="9" r="2" /><path d="m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" />`,
40
+ calendar: `<path d="M8 2v4" /><path d="M16 2v4" /><rect width="18" height="18" x="3" y="4" rx="2" /><path d="M3 10h18" />`,
41
+ clock: `<circle cx="12" cy="12" r="10" /><path d="M12 6v6l4 2" />`,
42
+ bookmark: `<path d="M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z" />`,
43
+ "arrow-right": `<path d="M5 12h14" /><path d="m12 5 7 7-7 7" />`,
44
+ "arrow-left": `<path d="m12 19-7-7 7-7" /><path d="M19 12H5" />`,
45
+ "arrow-up": `<path d="m5 12 7-7 7 7" /><path d="M12 19V5" />`,
46
+ "arrow-down": `<path d="M12 5v14" /><path d="m19 12-7 7-7-7" />`,
47
+ "external-link": `<path d="M15 3h6v6" /><path d="M10 14 21 3" /><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" />`,
48
+ star: `<path d="M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z" />`,
49
+ heart: `<path d="M2 9.5a5.5 5.5 0 0 1 9.591-3.676.56.56 0 0 0 .818 0A5.49 5.49 0 0 1 22 9.5c0 2.29-1.5 4-3 5.5l-5.492 5.313a2 2 0 0 1-3 .019L5 15c-1.5-1.5-3-3.2-3-5.5" />`,
50
+ zap: `<path d="M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z" />`,
51
+ target: `<circle cx="12" cy="12" r="10" /><circle cx="12" cy="12" r="6" /><circle cx="12" cy="12" r="2" />`,
52
+ lightbulb: `<path d="M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5" /><path d="M9 18h6" /><path d="M10 22h4" />`,
53
+ };
@@ -0,0 +1,2 @@
1
+ export { rasterizeIcon } from "./renderIcon.ts";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/icons/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1 @@
1
+ export { rasterizeIcon } from "./renderIcon.js";
@@ -0,0 +1,2 @@
1
+ export declare function rasterizeIcon(name: string, size: number, color: string): string;
2
+ //# sourceMappingURL=renderIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderIcon.d.ts","sourceRoot":"","sources":["../../src/icons/renderIcon.ts"],"names":[],"mappings":"AAaA,wBAAgB,aAAa,CAC3B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,GACZ,MAAM,CAYR"}
@@ -0,0 +1,23 @@
1
+ import { Resvg } from "@resvg/resvg-js";
2
+ import { ICON_DATA } from "./iconData.js";
3
+ const rasterCache = new Map();
4
+ function buildIconSvg(name, size, color) {
5
+ const pathData = ICON_DATA[name];
6
+ if (!pathData) {
7
+ throw new Error(`Unknown icon name: "${name}"`);
8
+ }
9
+ return `<svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" viewBox="0 0 24 24" fill="none" stroke="${color}" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">${pathData}</svg>`;
10
+ }
11
+ export function rasterizeIcon(name, size, color) {
12
+ const key = `${name}|${size}|${color}`;
13
+ const cached = rasterCache.get(key);
14
+ if (cached)
15
+ return cached;
16
+ const svg = buildIconSvg(name, size, color);
17
+ const resvg = new Resvg(svg, { fitTo: { mode: "width", value: size } });
18
+ const pngData = resvg.render();
19
+ const pngBuffer = pngData.asPng();
20
+ const result = `image/png;base64,${Buffer.from(pngBuffer).toString("base64")}`;
21
+ rasterCache.set(key, result);
22
+ return result;
23
+ }
@@ -83,9 +83,9 @@ export declare const inputTextNodeSchema: z.ZodObject<{
83
83
  opacity: z.ZodOptional<z.ZodNumber>;
84
84
  type: z.ZodLiteral<"text">;
85
85
  text: z.ZodString;
86
- fontPx: z.ZodOptional<z.ZodNumber>;
86
+ fontSize: z.ZodOptional<z.ZodNumber>;
87
87
  color: z.ZodOptional<z.ZodString>;
88
- alignText: z.ZodOptional<z.ZodEnum<{
88
+ textAlign: z.ZodOptional<z.ZodEnum<{
89
89
  right: "right";
90
90
  left: "left";
91
91
  center: "center";
@@ -115,7 +115,7 @@ export declare const inputTextNodeSchema: z.ZodObject<{
115
115
  strike: z.ZodOptional<z.ZodBoolean>;
116
116
  highlight: z.ZodOptional<z.ZodString>;
117
117
  fontFamily: z.ZodOptional<z.ZodString>;
118
- lineSpacingMultiple: z.ZodOptional<z.ZodNumber>;
118
+ lineHeight: z.ZodOptional<z.ZodNumber>;
119
119
  }, z.core.$strip>;
120
120
  export declare const inputLiNodeSchema: z.ZodObject<{
121
121
  text: z.ZodString;
@@ -144,7 +144,7 @@ export declare const inputLiNodeSchema: z.ZodObject<{
144
144
  strike: z.ZodOptional<z.ZodBoolean>;
145
145
  highlight: z.ZodOptional<z.ZodString>;
146
146
  color: z.ZodOptional<z.ZodString>;
147
- fontPx: z.ZodOptional<z.ZodNumber>;
147
+ fontSize: z.ZodOptional<z.ZodNumber>;
148
148
  fontFamily: z.ZodOptional<z.ZodString>;
149
149
  }, z.core.$strip>;
150
150
  export declare const inputUlNodeSchema: z.ZodObject<{
@@ -212,12 +212,12 @@ export declare const inputUlNodeSchema: z.ZodObject<{
212
212
  strike: z.ZodOptional<z.ZodBoolean>;
213
213
  highlight: z.ZodOptional<z.ZodString>;
214
214
  color: z.ZodOptional<z.ZodString>;
215
- fontPx: z.ZodOptional<z.ZodNumber>;
215
+ fontSize: z.ZodOptional<z.ZodNumber>;
216
216
  fontFamily: z.ZodOptional<z.ZodString>;
217
217
  }, z.core.$strip>>;
218
- fontPx: z.ZodOptional<z.ZodNumber>;
218
+ fontSize: z.ZodOptional<z.ZodNumber>;
219
219
  color: z.ZodOptional<z.ZodString>;
220
- alignText: z.ZodOptional<z.ZodEnum<{
220
+ textAlign: z.ZodOptional<z.ZodEnum<{
221
221
  right: "right";
222
222
  left: "left";
223
223
  center: "center";
@@ -247,7 +247,7 @@ export declare const inputUlNodeSchema: z.ZodObject<{
247
247
  strike: z.ZodOptional<z.ZodBoolean>;
248
248
  highlight: z.ZodOptional<z.ZodString>;
249
249
  fontFamily: z.ZodOptional<z.ZodString>;
250
- lineSpacingMultiple: z.ZodOptional<z.ZodNumber>;
250
+ lineHeight: z.ZodOptional<z.ZodNumber>;
251
251
  }, z.core.$strip>;
252
252
  export declare const inputOlNodeSchema: z.ZodObject<{
253
253
  w: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"max">, z.ZodString]>>;
@@ -314,12 +314,12 @@ export declare const inputOlNodeSchema: z.ZodObject<{
314
314
  strike: z.ZodOptional<z.ZodBoolean>;
315
315
  highlight: z.ZodOptional<z.ZodString>;
316
316
  color: z.ZodOptional<z.ZodString>;
317
- fontPx: z.ZodOptional<z.ZodNumber>;
317
+ fontSize: z.ZodOptional<z.ZodNumber>;
318
318
  fontFamily: z.ZodOptional<z.ZodString>;
319
319
  }, z.core.$strip>>;
320
- fontPx: z.ZodOptional<z.ZodNumber>;
320
+ fontSize: z.ZodOptional<z.ZodNumber>;
321
321
  color: z.ZodOptional<z.ZodString>;
322
- alignText: z.ZodOptional<z.ZodEnum<{
322
+ textAlign: z.ZodOptional<z.ZodEnum<{
323
323
  right: "right";
324
324
  left: "left";
325
325
  center: "center";
@@ -349,7 +349,7 @@ export declare const inputOlNodeSchema: z.ZodObject<{
349
349
  strike: z.ZodOptional<z.ZodBoolean>;
350
350
  highlight: z.ZodOptional<z.ZodString>;
351
351
  fontFamily: z.ZodOptional<z.ZodString>;
352
- lineSpacingMultiple: z.ZodOptional<z.ZodNumber>;
352
+ lineHeight: z.ZodOptional<z.ZodNumber>;
353
353
  numberType: z.ZodOptional<z.ZodEnum<{
354
354
  alphaLcParenBoth: "alphaLcParenBoth";
355
355
  alphaLcParenR: "alphaLcParenR";
@@ -432,6 +432,50 @@ export declare const inputImageNodeSchema: z.ZodObject<{
432
432
  color: z.ZodOptional<z.ZodString>;
433
433
  }, z.core.$strip>>;
434
434
  }, z.core.$strip>;
435
+ export declare const inputIconNodeSchema: z.ZodObject<{
436
+ w: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"max">, z.ZodString]>>;
437
+ h: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"max">, z.ZodString]>>;
438
+ minW: z.ZodOptional<z.ZodNumber>;
439
+ maxW: z.ZodOptional<z.ZodNumber>;
440
+ minH: z.ZodOptional<z.ZodNumber>;
441
+ maxH: z.ZodOptional<z.ZodNumber>;
442
+ padding: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
443
+ top: z.ZodOptional<z.ZodNumber>;
444
+ right: z.ZodOptional<z.ZodNumber>;
445
+ bottom: z.ZodOptional<z.ZodNumber>;
446
+ left: z.ZodOptional<z.ZodNumber>;
447
+ }, z.core.$strip>]>>;
448
+ backgroundColor: z.ZodOptional<z.ZodString>;
449
+ backgroundImage: z.ZodOptional<z.ZodObject<{
450
+ src: z.ZodString;
451
+ sizing: z.ZodOptional<z.ZodEnum<{
452
+ cover: "cover";
453
+ contain: "contain";
454
+ }>>;
455
+ }, z.core.$strip>>;
456
+ border: z.ZodOptional<z.ZodObject<{
457
+ color: z.ZodOptional<z.ZodString>;
458
+ width: z.ZodOptional<z.ZodNumber>;
459
+ dashType: z.ZodOptional<z.ZodEnum<{
460
+ solid: "solid";
461
+ dash: "dash";
462
+ dashDot: "dashDot";
463
+ lgDash: "lgDash";
464
+ lgDashDot: "lgDashDot";
465
+ lgDashDotDot: "lgDashDotDot";
466
+ sysDash: "sysDash";
467
+ sysDot: "sysDot";
468
+ }>>;
469
+ }, z.core.$strip>>;
470
+ borderRadius: z.ZodOptional<z.ZodNumber>;
471
+ opacity: z.ZodOptional<z.ZodNumber>;
472
+ type: z.ZodLiteral<"icon">;
473
+ name: z.ZodEnum<{
474
+ [x: string]: string;
475
+ }>;
476
+ size: z.ZodOptional<z.ZodNumber>;
477
+ color: z.ZodOptional<z.ZodString>;
478
+ }, z.core.$strip>;
435
479
  export declare const inputTableNodeSchema: z.ZodObject<{
436
480
  w: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"max">, z.ZodString]>>;
437
481
  h: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"max">, z.ZodString]>>;
@@ -476,7 +520,7 @@ export declare const inputTableNodeSchema: z.ZodObject<{
476
520
  rows: z.ZodArray<z.ZodObject<{
477
521
  cells: z.ZodArray<z.ZodObject<{
478
522
  text: z.ZodString;
479
- fontPx: z.ZodOptional<z.ZodNumber>;
523
+ fontSize: z.ZodOptional<z.ZodNumber>;
480
524
  color: z.ZodOptional<z.ZodString>;
481
525
  bold: z.ZodOptional<z.ZodBoolean>;
482
526
  italic: z.ZodOptional<z.ZodBoolean>;
@@ -502,7 +546,7 @@ export declare const inputTableNodeSchema: z.ZodObject<{
502
546
  }, z.core.$strip>]>>;
503
547
  strike: z.ZodOptional<z.ZodBoolean>;
504
548
  highlight: z.ZodOptional<z.ZodString>;
505
- alignText: z.ZodOptional<z.ZodEnum<{
549
+ textAlign: z.ZodOptional<z.ZodEnum<{
506
550
  right: "right";
507
551
  left: "left";
508
552
  center: "center";
@@ -554,6 +598,8 @@ export declare const inputShapeNodeSchema: z.ZodObject<{
554
598
  opacity: z.ZodOptional<z.ZodNumber>;
555
599
  type: z.ZodLiteral<"shape">;
556
600
  shapeType: z.ZodEnum<{
601
+ cloud: "cloud";
602
+ heart: "heart";
557
603
  accentBorderCallout1: "accentBorderCallout1";
558
604
  accentBorderCallout2: "accentBorderCallout2";
559
605
  accentBorderCallout3: "accentBorderCallout3";
@@ -592,7 +638,6 @@ export declare const inputShapeNodeSchema: z.ZodObject<{
592
638
  chevron: "chevron";
593
639
  chord: "chord";
594
640
  circularArrow: "circularArrow";
595
- cloud: "cloud";
596
641
  cloudCallout: "cloudCallout";
597
642
  corner: "corner";
598
643
  cornerTabs: "cornerTabs";
@@ -647,7 +692,6 @@ export declare const inputShapeNodeSchema: z.ZodObject<{
647
692
  gear6: "gear6";
648
693
  gear9: "gear9";
649
694
  halfFrame: "halfFrame";
650
- heart: "heart";
651
695
  heptagon: "heptagon";
652
696
  hexagon: "hexagon";
653
697
  homePlate: "homePlate";
@@ -763,9 +807,9 @@ export declare const inputShapeNodeSchema: z.ZodObject<{
763
807
  offset: z.ZodOptional<z.ZodNumber>;
764
808
  color: z.ZodOptional<z.ZodString>;
765
809
  }, z.core.$strip>>;
766
- fontPx: z.ZodOptional<z.ZodNumber>;
810
+ fontSize: z.ZodOptional<z.ZodNumber>;
767
811
  color: z.ZodOptional<z.ZodString>;
768
- alignText: z.ZodOptional<z.ZodEnum<{
812
+ textAlign: z.ZodOptional<z.ZodEnum<{
769
813
  right: "right";
770
814
  left: "left";
771
815
  center: "center";
@@ -795,7 +839,7 @@ export declare const inputShapeNodeSchema: z.ZodObject<{
795
839
  strike: z.ZodOptional<z.ZodBoolean>;
796
840
  highlight: z.ZodOptional<z.ZodString>;
797
841
  fontFamily: z.ZodOptional<z.ZodString>;
798
- lineSpacingMultiple: z.ZodOptional<z.ZodNumber>;
842
+ lineHeight: z.ZodOptional<z.ZodNumber>;
799
843
  }, z.core.$strip>;
800
844
  export declare const inputChartNodeSchema: z.ZodObject<{
801
845
  w: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"max">, z.ZodString]>>;
@@ -1155,7 +1199,7 @@ export declare const inputProcessArrowNodeSchema: z.ZodObject<{
1155
1199
  itemWidth: z.ZodOptional<z.ZodNumber>;
1156
1200
  itemHeight: z.ZodOptional<z.ZodNumber>;
1157
1201
  gap: z.ZodOptional<z.ZodNumber>;
1158
- fontPx: z.ZodOptional<z.ZodNumber>;
1202
+ fontSize: z.ZodOptional<z.ZodNumber>;
1159
1203
  bold: z.ZodOptional<z.ZodBoolean>;
1160
1204
  italic: z.ZodOptional<z.ZodBoolean>;
1161
1205
  underline: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
@@ -1228,7 +1272,7 @@ export declare const inputPyramidNodeSchema: z.ZodObject<{
1228
1272
  color: z.ZodOptional<z.ZodString>;
1229
1273
  textColor: z.ZodOptional<z.ZodString>;
1230
1274
  }, z.core.$strip>>;
1231
- fontPx: z.ZodOptional<z.ZodNumber>;
1275
+ fontSize: z.ZodOptional<z.ZodNumber>;
1232
1276
  bold: z.ZodOptional<z.ZodBoolean>;
1233
1277
  }, z.core.$strip>;
1234
1278
  export declare const inputLineNodeSchema: z.ZodObject<{
@@ -1 +1 @@
1
- {"version":3,"file":"inputSchema.d.ts","sourceRoot":"","sources":["../../src/parseXml/inputSchema.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAsCL,KAAK,YAAY,EAElB,MAAM,a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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiB/B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAU/B,CAAC;AAEH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAIlC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAKhC,CAAC;AAUH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAU9B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAS9B,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAatC,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMjC,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAW9B,CAAC"}
@@ -5,7 +5,7 @@
5
5
  * Used by `parseXml` to validate parsed XML input.
6
6
  */
7
7
  import { z } from "zod";
8
- import { lengthSchema, paddingSchema, borderStyleSchema, borderDashSchema, fillStyleSchema, shadowStyleSchema, alignItemsSchema, justifyContentSchema, shapeTypeSchema, tableColumnSchema, tableRowSchema, chartTypeSchema, chartDataSchema, liNodeSchema, radarStyleSchema, bulletNumberTypeSchema, timelineDirectionSchema, timelineItemSchema, matrixAxisSchema, matrixQuadrantsSchema, matrixItemSchema, treeLayoutSchema, treeNodeShapeSchema, treeConnectorStyleSchema, flowDirectionSchema, flowNodeItemSchema, flowConnectionSchema, flowConnectorStyleSchema, processArrowDirectionSchema, processArrowStepSchema, pyramidDirectionSchema, pyramidLevelSchema, lineArrowSchema, underlineSchema, backgroundImageSchema, } from "../types.js";
8
+ import { lengthSchema, paddingSchema, borderStyleSchema, borderDashSchema, fillStyleSchema, shadowStyleSchema, alignItemsSchema, justifyContentSchema, shapeTypeSchema, tableColumnSchema, tableRowSchema, chartTypeSchema, chartDataSchema, liNodeSchema, radarStyleSchema, bulletNumberTypeSchema, timelineDirectionSchema, timelineItemSchema, matrixAxisSchema, matrixQuadrantsSchema, matrixItemSchema, treeLayoutSchema, treeNodeShapeSchema, treeConnectorStyleSchema, flowDirectionSchema, flowNodeItemSchema, flowConnectionSchema, flowConnectorStyleSchema, processArrowDirectionSchema, processArrowStepSchema, pyramidDirectionSchema, pyramidLevelSchema, lineArrowSchema, underlineSchema, backgroundImageSchema, iconNameSchema, iconColorSchema, } from "../types.js";
9
9
  // ===== Base Node Schema =====
10
10
  export const inputBaseNodeSchema = z.object({
11
11
  w: lengthSchema.optional(),
@@ -25,45 +25,45 @@ export const inputBaseNodeSchema = z.object({
25
25
  export const inputTextNodeSchema = inputBaseNodeSchema.extend({
26
26
  type: z.literal("text"),
27
27
  text: z.string(),
28
- fontPx: z.number().optional(),
28
+ fontSize: z.number().optional(),
29
29
  color: z.string().optional(),
30
- alignText: z.enum(["left", "center", "right"]).optional(),
30
+ textAlign: z.enum(["left", "center", "right"]).optional(),
31
31
  bold: z.boolean().optional(),
32
32
  italic: z.boolean().optional(),
33
33
  underline: underlineSchema.optional(),
34
34
  strike: z.boolean().optional(),
35
35
  highlight: z.string().optional(),
36
36
  fontFamily: z.string().optional(),
37
- lineSpacingMultiple: z.number().optional(),
37
+ lineHeight: z.number().optional(),
38
38
  });
39
39
  export const inputLiNodeSchema = liNodeSchema;
40
40
  export const inputUlNodeSchema = inputBaseNodeSchema.extend({
41
41
  type: z.literal("ul"),
42
42
  items: z.array(inputLiNodeSchema),
43
- fontPx: z.number().optional(),
43
+ fontSize: z.number().optional(),
44
44
  color: z.string().optional(),
45
- alignText: z.enum(["left", "center", "right"]).optional(),
45
+ textAlign: z.enum(["left", "center", "right"]).optional(),
46
46
  bold: z.boolean().optional(),
47
47
  italic: z.boolean().optional(),
48
48
  underline: underlineSchema.optional(),
49
49
  strike: z.boolean().optional(),
50
50
  highlight: z.string().optional(),
51
51
  fontFamily: z.string().optional(),
52
- lineSpacingMultiple: z.number().optional(),
52
+ lineHeight: z.number().optional(),
53
53
  });
54
54
  export const inputOlNodeSchema = inputBaseNodeSchema.extend({
55
55
  type: z.literal("ol"),
56
56
  items: z.array(inputLiNodeSchema),
57
- fontPx: z.number().optional(),
57
+ fontSize: z.number().optional(),
58
58
  color: z.string().optional(),
59
- alignText: z.enum(["left", "center", "right"]).optional(),
59
+ textAlign: z.enum(["left", "center", "right"]).optional(),
60
60
  bold: z.boolean().optional(),
61
61
  italic: z.boolean().optional(),
62
62
  underline: underlineSchema.optional(),
63
63
  strike: z.boolean().optional(),
64
64
  highlight: z.string().optional(),
65
65
  fontFamily: z.string().optional(),
66
- lineSpacingMultiple: z.number().optional(),
66
+ lineHeight: z.number().optional(),
67
67
  numberType: bulletNumberTypeSchema.optional(),
68
68
  numberStartAt: z.number().optional(),
69
69
  });
@@ -80,6 +80,12 @@ export const inputImageNodeSchema = inputBaseNodeSchema.extend({
80
80
  sizing: inputImageSizingSchema.optional(),
81
81
  shadow: shadowStyleSchema.optional(),
82
82
  });
83
+ export const inputIconNodeSchema = inputBaseNodeSchema.extend({
84
+ type: z.literal("icon"),
85
+ name: iconNameSchema,
86
+ size: z.number().positive().max(1024).optional(),
87
+ color: iconColorSchema,
88
+ });
83
89
  export const inputTableNodeSchema = inputBaseNodeSchema.extend({
84
90
  type: z.literal("table"),
85
91
  columns: z.array(tableColumnSchema),
@@ -93,16 +99,16 @@ export const inputShapeNodeSchema = inputBaseNodeSchema.extend({
93
99
  fill: fillStyleSchema.optional(),
94
100
  line: borderStyleSchema.optional(),
95
101
  shadow: shadowStyleSchema.optional(),
96
- fontPx: z.number().optional(),
102
+ fontSize: z.number().optional(),
97
103
  color: z.string().optional(),
98
- alignText: z.enum(["left", "center", "right"]).optional(),
104
+ textAlign: z.enum(["left", "center", "right"]).optional(),
99
105
  bold: z.boolean().optional(),
100
106
  italic: z.boolean().optional(),
101
107
  underline: underlineSchema.optional(),
102
108
  strike: z.boolean().optional(),
103
109
  highlight: z.string().optional(),
104
110
  fontFamily: z.string().optional(),
105
- lineSpacingMultiple: z.number().optional(),
111
+ lineHeight: z.number().optional(),
106
112
  });
107
113
  export const inputChartNodeSchema = inputBaseNodeSchema.extend({
108
114
  type: z.literal("chart"),
@@ -159,7 +165,7 @@ export const inputProcessArrowNodeSchema = inputBaseNodeSchema.extend({
159
165
  itemWidth: z.number().optional(),
160
166
  itemHeight: z.number().optional(),
161
167
  gap: z.number().optional(),
162
- fontPx: z.number().optional(),
168
+ fontSize: z.number().optional(),
163
169
  bold: z.boolean().optional(),
164
170
  italic: z.boolean().optional(),
165
171
  underline: underlineSchema.optional(),
@@ -170,7 +176,7 @@ export const inputPyramidNodeSchema = inputBaseNodeSchema.extend({
170
176
  type: z.literal("pyramid"),
171
177
  direction: pyramidDirectionSchema.optional(),
172
178
  levels: z.array(pyramidLevelSchema).min(1),
173
- fontPx: z.number().optional(),
179
+ fontSize: z.number().optional(),
174
180
  bold: z.boolean().optional(),
175
181
  });
176
182
  export const inputLineNodeSchema = inputBaseNodeSchema.extend({
@@ -233,4 +239,5 @@ const inputPomNodeSchema = z.lazy(() => z.discriminatedUnion("type", [
233
239
  inputPyramidNodeSchema,
234
240
  inputLineNodeSchema,
235
241
  inputLayerNodeSchemaBase,
242
+ inputIconNodeSchema,
236
243
  ]));
@@ -16,7 +16,7 @@ export declare class ParseXmlError extends Error {
16
16
  *
17
17
  * const xml = `
18
18
  * <VStack gap="16" padding="32">
19
- * <Text fontPx="32" bold="true">売上レポート</Text>
19
+ * <Text fontSize="32" bold="true">売上レポート</Text>
20
20
  * </VStack>
21
21
  * `;
22
22
  *
@@ -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;AAqC3C,qBAAa,aAAc,SAAQ,KAAK;IACtC,SAAgB,MAAM,EAAE,MAAM,EAAE,CAAC;gBACrB,MAAM,EAAE,MAAM,EAAE;CAM7B;AA2+BD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,EAAE,CAiCrD"}
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;AAmoCD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,EAAE,CAiCrD"}