@hirokisakabe/pom 0.1.12 → 0.3.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.
Files changed (103) hide show
  1. package/README.md +31 -584
  2. package/dist/calcYogaLayout/calcYogaLayout.d.ts.map +1 -1
  3. package/dist/calcYogaLayout/calcYogaLayout.js +61 -84
  4. package/dist/calcYogaLayout/fontLoader.d.ts +20 -0
  5. package/dist/calcYogaLayout/fontLoader.d.ts.map +1 -0
  6. package/dist/calcYogaLayout/fontLoader.js +59 -0
  7. package/dist/calcYogaLayout/fonts/notoSansJPBold.d.ts +7 -0
  8. package/dist/calcYogaLayout/fonts/notoSansJPBold.d.ts.map +1 -0
  9. package/dist/calcYogaLayout/fonts/notoSansJPBold.js +6 -0
  10. package/dist/calcYogaLayout/fonts/notoSansJPRegular.d.ts +7 -0
  11. package/dist/calcYogaLayout/fonts/notoSansJPRegular.d.ts.map +1 -0
  12. package/dist/calcYogaLayout/fonts/notoSansJPRegular.js +6 -0
  13. package/dist/calcYogaLayout/measureText.d.ts +1 -1
  14. package/dist/calcYogaLayout/measureText.d.ts.map +1 -1
  15. package/dist/calcYogaLayout/measureText.js +65 -114
  16. package/dist/inputSchema.d.ts +268 -2
  17. package/dist/inputSchema.d.ts.map +1 -1
  18. package/dist/inputSchema.js +53 -1
  19. package/dist/renderPptx/nodes/box.d.ts +1 -0
  20. package/dist/renderPptx/nodes/box.d.ts.map +1 -0
  21. package/dist/renderPptx/nodes/box.js +2 -0
  22. package/dist/renderPptx/nodes/chart.d.ts +8 -0
  23. package/dist/renderPptx/nodes/chart.d.ts.map +1 -0
  24. package/dist/renderPptx/nodes/chart.js +23 -0
  25. package/dist/renderPptx/nodes/flow.d.ts +8 -0
  26. package/dist/renderPptx/nodes/flow.d.ts.map +1 -0
  27. package/dist/renderPptx/nodes/flow.js +208 -0
  28. package/dist/renderPptx/nodes/image.d.ts +8 -0
  29. package/dist/renderPptx/nodes/image.d.ts.map +1 -0
  30. package/dist/renderPptx/nodes/image.js +17 -0
  31. package/dist/renderPptx/nodes/index.d.ts +11 -0
  32. package/dist/renderPptx/nodes/index.d.ts.map +1 -0
  33. package/dist/renderPptx/nodes/index.js +10 -0
  34. package/dist/renderPptx/nodes/matrix.d.ts +8 -0
  35. package/dist/renderPptx/nodes/matrix.d.ts.map +1 -0
  36. package/dist/renderPptx/nodes/matrix.js +150 -0
  37. package/dist/renderPptx/nodes/processArrow.d.ts +8 -0
  38. package/dist/renderPptx/nodes/processArrow.d.ts.map +1 -0
  39. package/dist/renderPptx/nodes/processArrow.js +75 -0
  40. package/dist/renderPptx/nodes/shape.d.ts +8 -0
  41. package/dist/renderPptx/nodes/shape.d.ts.map +1 -0
  42. package/dist/renderPptx/nodes/shape.js +49 -0
  43. package/dist/renderPptx/nodes/table.d.ts +8 -0
  44. package/dist/renderPptx/nodes/table.d.ts.map +1 -0
  45. package/dist/renderPptx/nodes/table.js +29 -0
  46. package/dist/renderPptx/nodes/text.d.ts +8 -0
  47. package/dist/renderPptx/nodes/text.d.ts.map +1 -0
  48. package/dist/renderPptx/nodes/text.js +5 -0
  49. package/dist/renderPptx/nodes/timeline.d.ts +8 -0
  50. package/dist/renderPptx/nodes/timeline.d.ts.map +1 -0
  51. package/dist/renderPptx/nodes/timeline.js +157 -0
  52. package/dist/renderPptx/nodes/tree.d.ts +8 -0
  53. package/dist/renderPptx/nodes/tree.d.ts.map +1 -0
  54. package/dist/renderPptx/nodes/tree.js +223 -0
  55. package/dist/renderPptx/renderPptx.d.ts.map +1 -1
  56. package/dist/renderPptx/renderPptx.js +32 -166
  57. package/dist/renderPptx/types.d.ts +10 -0
  58. package/dist/renderPptx/types.d.ts.map +1 -0
  59. package/dist/renderPptx/utils/backgroundBorder.d.ts +8 -0
  60. package/dist/renderPptx/utils/backgroundBorder.d.ts.map +1 -0
  61. package/dist/renderPptx/utils/backgroundBorder.js +44 -0
  62. package/dist/renderPptx/utils/index.d.ts +6 -0
  63. package/dist/renderPptx/utils/index.d.ts.map +1 -0
  64. package/dist/renderPptx/utils/index.js +3 -0
  65. package/dist/renderPptx/utils/shapeDrawing.d.ts +27 -0
  66. package/dist/renderPptx/utils/shapeDrawing.d.ts.map +1 -0
  67. package/dist/renderPptx/utils/shapeDrawing.js +36 -0
  68. package/dist/renderPptx/utils/textDrawing.d.ts +20 -0
  69. package/dist/renderPptx/utils/textDrawing.d.ts.map +1 -0
  70. package/dist/renderPptx/utils/textDrawing.js +20 -0
  71. package/dist/toPositioned/toPositioned.d.ts.map +1 -1
  72. package/dist/toPositioned/toPositioned.js +45 -0
  73. package/dist/types.d.ts +399 -2
  74. package/dist/types.d.ts.map +1 -1
  75. package/dist/types.js +134 -0
  76. package/package.json +13 -3
  77. package/dist/parsePptx/convertChart.d.ts +0 -8
  78. package/dist/parsePptx/convertChart.d.ts.map +0 -1
  79. package/dist/parsePptx/convertChart.js +0 -78
  80. package/dist/parsePptx/convertImage.d.ts +0 -8
  81. package/dist/parsePptx/convertImage.d.ts.map +0 -1
  82. package/dist/parsePptx/convertImage.js +0 -13
  83. package/dist/parsePptx/convertShape.d.ts +0 -7
  84. package/dist/parsePptx/convertShape.d.ts.map +0 -1
  85. package/dist/parsePptx/convertShape.js +0 -137
  86. package/dist/parsePptx/convertTable.d.ts +0 -7
  87. package/dist/parsePptx/convertTable.d.ts.map +0 -1
  88. package/dist/parsePptx/convertTable.js +0 -46
  89. package/dist/parsePptx/convertText.d.ts +0 -7
  90. package/dist/parsePptx/convertText.d.ts.map +0 -1
  91. package/dist/parsePptx/convertText.js +0 -32
  92. package/dist/parsePptx/index.d.ts +0 -23
  93. package/dist/parsePptx/index.d.ts.map +0 -1
  94. package/dist/parsePptx/index.js +0 -114
  95. package/dist/parsePptx/parseHtml.d.ts +0 -22
  96. package/dist/parsePptx/parseHtml.d.ts.map +0 -1
  97. package/dist/parsePptx/parseHtml.js +0 -53
  98. package/dist/parsePptx/types.d.ts +0 -15
  99. package/dist/parsePptx/types.d.ts.map +0 -1
  100. package/dist/parsePptx/units.d.ts +0 -13
  101. package/dist/parsePptx/units.d.ts.map +0 -1
  102. package/dist/parsePptx/units.js +0 -19
  103. /package/dist/{parsePptx → renderPptx}/types.js +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/renderPptx/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,aAAa,MAAM,WAAW,CAAC;AAC3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C,MAAM,MAAM,aAAa,GAAG,UAAU,CACpC,YAAY,CAAC,OAAO,aAAa,CAAC,CAAC,UAAU,CAAC,CAC/C,CAAC;AACF,MAAM,MAAM,YAAY,GAAG,YAAY,CAAC,OAAO,aAAa,CAAC,CAAC;AAE9D,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,EAAE,aAAa,CAAC;IACrB,IAAI,EAAE,YAAY,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,cAAc,IAAI,CACnD,IAAI,EAAE,CAAC,EACP,GAAG,EAAE,aAAa,KACf,IAAI,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { PositionedNode } from "../../types";
2
+ import type { RenderContext } from "../types";
3
+ /**
4
+ * ノードの背景色とボーダーを描画する
5
+ * 全ノードタイプで最初に呼び出される共通処理
6
+ */
7
+ export declare function renderBackgroundAndBorder(node: PositionedNode, ctx: RenderContext): void;
8
+ //# sourceMappingURL=backgroundBorder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backgroundBorder.d.ts","sourceRoot":"","sources":["../../../src/renderPptx/utils/backgroundBorder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAG9C;;;GAGG;AACH,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,cAAc,EACpB,GAAG,EAAE,aAAa,GACjB,IAAI,CA+CN"}
@@ -0,0 +1,44 @@
1
+ import { pxToIn, pxToPt } from "../units";
2
+ /**
3
+ * ノードの背景色とボーダーを描画する
4
+ * 全ノードタイプで最初に呼び出される共通処理
5
+ */
6
+ export function renderBackgroundAndBorder(node, ctx) {
7
+ const { backgroundColor, border, borderRadius } = node;
8
+ const hasBackground = Boolean(backgroundColor);
9
+ const hasBorder = Boolean(border &&
10
+ (border.color !== undefined ||
11
+ border.width !== undefined ||
12
+ border.dashType !== undefined));
13
+ if (!hasBackground && !hasBorder) {
14
+ return;
15
+ }
16
+ const fill = hasBackground
17
+ ? { color: backgroundColor }
18
+ : { type: "none" };
19
+ const line = hasBorder
20
+ ? {
21
+ color: border?.color ?? "000000",
22
+ width: border?.width !== undefined ? pxToPt(border.width) : undefined,
23
+ dashType: border?.dashType,
24
+ }
25
+ : { type: "none" };
26
+ // borderRadius がある場合は roundRect を使用し、rectRadius を計算
27
+ const shapeType = borderRadius
28
+ ? ctx.pptx.ShapeType.roundRect
29
+ : ctx.pptx.ShapeType.rect;
30
+ // px を 0-1 の正規化値に変換
31
+ const rectRadius = borderRadius
32
+ ? Math.min((borderRadius / Math.min(node.w, node.h)) * 2, 1)
33
+ : undefined;
34
+ const shapeOptions = {
35
+ x: pxToIn(node.x),
36
+ y: pxToIn(node.y),
37
+ w: pxToIn(node.w),
38
+ h: pxToIn(node.h),
39
+ fill,
40
+ line,
41
+ rectRadius,
42
+ };
43
+ ctx.slide.addShape(shapeType, shapeOptions);
44
+ }
@@ -0,0 +1,6 @@
1
+ export { renderBackgroundAndBorder } from "./backgroundBorder";
2
+ export { drawCircle, drawLine } from "./shapeDrawing";
3
+ export type { CircleOptions, LineOptions } from "./shapeDrawing";
4
+ export { drawSimpleText } from "./textDrawing";
5
+ export type { SimpleTextOptions } from "./textDrawing";
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/renderPptx/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACtD,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,YAAY,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { renderBackgroundAndBorder } from "./backgroundBorder";
2
+ export { drawCircle, drawLine } from "./shapeDrawing";
3
+ export { drawSimpleText } from "./textDrawing";
@@ -0,0 +1,27 @@
1
+ import type { RenderContext } from "../types";
2
+ export type CircleOptions = {
3
+ cx: number;
4
+ cy: number;
5
+ radius: number;
6
+ fillColor: string;
7
+ lineColor?: string;
8
+ lineWidth?: number;
9
+ };
10
+ export type LineOptions = {
11
+ x1: number;
12
+ y1: number;
13
+ x2: number;
14
+ y2: number;
15
+ color: string;
16
+ width: number;
17
+ endArrowType?: "none" | "arrow" | "diamond" | "oval" | "stealth" | "triangle";
18
+ };
19
+ /**
20
+ * 円を描画する
21
+ */
22
+ export declare function drawCircle(ctx: RenderContext, options: CircleOptions): void;
23
+ /**
24
+ * 線を描画する
25
+ */
26
+ export declare function drawLine(ctx: RenderContext, options: LineOptions): void;
27
+ //# sourceMappingURL=shapeDrawing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shapeDrawing.d.ts","sourceRoot":"","sources":["../../../src/renderPptx/utils/shapeDrawing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAG9C,MAAM,MAAM,aAAa,GAAG;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,UAAU,CAAC;CAC/E,CAAC;AAEF;;GAEG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,aAAa,EAAE,OAAO,EAAE,aAAa,GAAG,IAAI,CAa3E;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,GAAG,IAAI,CAiBvE"}
@@ -0,0 +1,36 @@
1
+ import { pxToIn, pxToPt } from "../units";
2
+ /**
3
+ * 円を描画する
4
+ */
5
+ export function drawCircle(ctx, options) {
6
+ const { cx, cy, radius, fillColor, lineColor, lineWidth } = options;
7
+ ctx.slide.addShape(ctx.pptx.ShapeType.ellipse, {
8
+ x: pxToIn(cx - radius),
9
+ y: pxToIn(cy - radius),
10
+ w: pxToIn(radius * 2),
11
+ h: pxToIn(radius * 2),
12
+ fill: { color: fillColor },
13
+ line: lineColor
14
+ ? { color: lineColor, width: lineWidth ? pxToPt(lineWidth) : undefined }
15
+ : { type: "none" },
16
+ });
17
+ }
18
+ /**
19
+ * 線を描画する
20
+ */
21
+ export function drawLine(ctx, options) {
22
+ const { x1, y1, x2, y2, color, width, endArrowType } = options;
23
+ const isHorizontal = y1 === y2;
24
+ const isVertical = x1 === x2;
25
+ ctx.slide.addShape(ctx.pptx.ShapeType.line, {
26
+ x: pxToIn(Math.min(x1, x2)),
27
+ y: pxToIn(Math.min(y1, y2)),
28
+ w: isVertical ? 0 : pxToIn(Math.abs(x2 - x1)),
29
+ h: isHorizontal ? 0 : pxToIn(Math.abs(y2 - y1)),
30
+ line: {
31
+ color,
32
+ width: pxToPt(width),
33
+ endArrowType,
34
+ },
35
+ });
36
+ }
@@ -0,0 +1,20 @@
1
+ import type { RenderContext } from "../types";
2
+ export type SimpleTextOptions = {
3
+ x: number;
4
+ y: number;
5
+ w: number;
6
+ h: number;
7
+ text: string;
8
+ fontSize?: number;
9
+ fontFace?: string;
10
+ color?: string;
11
+ bold?: boolean;
12
+ align?: "left" | "center" | "right";
13
+ valign?: "top" | "middle" | "bottom";
14
+ };
15
+ /**
16
+ * シンプルなテキストを描画する
17
+ * timeline, matrix, tree, flow などの複雑ノードで使用
18
+ */
19
+ export declare function drawSimpleText(ctx: RenderContext, options: SimpleTextOptions): void;
20
+ //# sourceMappingURL=textDrawing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textDrawing.d.ts","sourceRoot":"","sources":["../../../src/renderPptx/utils/textDrawing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAG9C,MAAM,MAAM,iBAAiB,GAAG;IAC9B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,MAAM,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;CACtC,CAAC;AAEF;;;GAGG;AACH,wBAAgB,cAAc,CAC5B,GAAG,EAAE,aAAa,EAClB,OAAO,EAAE,iBAAiB,GACzB,IAAI,CA2BN"}
@@ -0,0 +1,20 @@
1
+ import { pxToIn, pxToPt } from "../units";
2
+ /**
3
+ * シンプルなテキストを描画する
4
+ * timeline, matrix, tree, flow などの複雑ノードで使用
5
+ */
6
+ export function drawSimpleText(ctx, options) {
7
+ const { x, y, w, h, text, fontSize = 12, fontFace = "Noto Sans JP", color = "000000", bold, align = "left", valign = "top", } = options;
8
+ ctx.slide.addText(text, {
9
+ x: pxToIn(x),
10
+ y: pxToIn(y),
11
+ w: pxToIn(w),
12
+ h: pxToIn(h),
13
+ fontSize: pxToPt(fontSize),
14
+ fontFace,
15
+ color,
16
+ bold,
17
+ align,
18
+ valign,
19
+ });
20
+ }
@@ -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,UAAU,CAAC;AAGxD;;;;;;GAMG;AACH,wBAAgB,YAAY,CAC1B,GAAG,EAAE,OAAO,EACZ,OAAO,SAAI,EACX,OAAO,SAAI,GACV,cAAc,CA4FhB"}
1
+ {"version":3,"file":"toPositioned.d.ts","sourceRoot":"","sources":["../../src/toPositioned/toPositioned.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAGxD;;;;;;GAMG;AACH,wBAAgB,YAAY,CAC1B,GAAG,EAAE,OAAO,EACZ,OAAO,SAAI,EACX,OAAO,SAAI,GACV,cAAc,CAyIhB"}
@@ -61,6 +61,51 @@ export function toPositioned(pom, parentX = 0, parentY = 0) {
61
61
  h: layout.height,
62
62
  };
63
63
  }
64
+ case "timeline": {
65
+ return {
66
+ ...pom,
67
+ x: absoluteX,
68
+ y: absoluteY,
69
+ w: layout.width,
70
+ h: layout.height,
71
+ };
72
+ }
73
+ case "matrix": {
74
+ return {
75
+ ...pom,
76
+ x: absoluteX,
77
+ y: absoluteY,
78
+ w: layout.width,
79
+ h: layout.height,
80
+ };
81
+ }
82
+ case "tree": {
83
+ return {
84
+ ...pom,
85
+ x: absoluteX,
86
+ y: absoluteY,
87
+ w: layout.width,
88
+ h: layout.height,
89
+ };
90
+ }
91
+ case "flow": {
92
+ return {
93
+ ...pom,
94
+ x: absoluteX,
95
+ y: absoluteY,
96
+ w: layout.width,
97
+ h: layout.height,
98
+ };
99
+ }
100
+ case "processArrow": {
101
+ return {
102
+ ...pom,
103
+ x: absoluteX,
104
+ y: absoluteY,
105
+ w: layout.width,
106
+ h: layout.height,
107
+ };
108
+ }
64
109
  case "box": {
65
110
  return {
66
111
  ...pom,
package/dist/types.d.ts CHANGED
@@ -848,6 +848,403 @@ export type ChartType = z.infer<typeof chartTypeSchema>;
848
848
  export type ChartData = z.infer<typeof chartDataSchema>;
849
849
  export type ChartNode = z.infer<typeof chartNodeSchema>;
850
850
  export type RadarStyle = z.infer<typeof radarStyleSchema>;
851
+ export declare const timelineDirectionSchema: z.ZodEnum<{
852
+ horizontal: "horizontal";
853
+ vertical: "vertical";
854
+ }>;
855
+ export declare const timelineItemSchema: z.ZodObject<{
856
+ date: z.ZodString;
857
+ title: z.ZodString;
858
+ description: z.ZodOptional<z.ZodString>;
859
+ color: z.ZodOptional<z.ZodString>;
860
+ }, z.core.$strip>;
861
+ export declare const timelineNodeSchema: z.ZodObject<{
862
+ yogaNode: z.ZodOptional<z.ZodCustom<YogaNode, YogaNode>>;
863
+ w: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"max">, z.ZodString]>>;
864
+ h: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"max">, z.ZodString]>>;
865
+ minW: z.ZodOptional<z.ZodNumber>;
866
+ maxW: z.ZodOptional<z.ZodNumber>;
867
+ minH: z.ZodOptional<z.ZodNumber>;
868
+ maxH: z.ZodOptional<z.ZodNumber>;
869
+ padding: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
870
+ top: z.ZodOptional<z.ZodNumber>;
871
+ right: z.ZodOptional<z.ZodNumber>;
872
+ bottom: z.ZodOptional<z.ZodNumber>;
873
+ left: z.ZodOptional<z.ZodNumber>;
874
+ }, z.core.$strip>]>>;
875
+ backgroundColor: z.ZodOptional<z.ZodString>;
876
+ border: z.ZodOptional<z.ZodObject<{
877
+ color: z.ZodOptional<z.ZodString>;
878
+ width: z.ZodOptional<z.ZodNumber>;
879
+ dashType: z.ZodOptional<z.ZodEnum<{
880
+ solid: "solid";
881
+ dash: "dash";
882
+ dashDot: "dashDot";
883
+ lgDash: "lgDash";
884
+ lgDashDot: "lgDashDot";
885
+ lgDashDotDot: "lgDashDotDot";
886
+ sysDash: "sysDash";
887
+ sysDot: "sysDot";
888
+ }>>;
889
+ }, z.core.$strip>>;
890
+ borderRadius: z.ZodOptional<z.ZodNumber>;
891
+ type: z.ZodLiteral<"timeline">;
892
+ direction: z.ZodOptional<z.ZodEnum<{
893
+ horizontal: "horizontal";
894
+ vertical: "vertical";
895
+ }>>;
896
+ items: z.ZodArray<z.ZodObject<{
897
+ date: z.ZodString;
898
+ title: z.ZodString;
899
+ description: z.ZodOptional<z.ZodString>;
900
+ color: z.ZodOptional<z.ZodString>;
901
+ }, z.core.$strip>>;
902
+ }, z.core.$strip>;
903
+ export type TimelineDirection = z.infer<typeof timelineDirectionSchema>;
904
+ export type TimelineItem = z.infer<typeof timelineItemSchema>;
905
+ export type TimelineNode = z.infer<typeof timelineNodeSchema>;
906
+ export declare const matrixAxisSchema: z.ZodObject<{
907
+ x: z.ZodString;
908
+ y: z.ZodString;
909
+ }, z.core.$strip>;
910
+ export declare const matrixQuadrantsSchema: z.ZodObject<{
911
+ topLeft: z.ZodString;
912
+ topRight: z.ZodString;
913
+ bottomLeft: z.ZodString;
914
+ bottomRight: z.ZodString;
915
+ }, z.core.$strip>;
916
+ export declare const matrixItemSchema: z.ZodObject<{
917
+ label: z.ZodString;
918
+ x: z.ZodNumber;
919
+ y: z.ZodNumber;
920
+ color: z.ZodOptional<z.ZodString>;
921
+ }, z.core.$strip>;
922
+ export declare const matrixNodeSchema: z.ZodObject<{
923
+ yogaNode: z.ZodOptional<z.ZodCustom<YogaNode, YogaNode>>;
924
+ w: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"max">, z.ZodString]>>;
925
+ h: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"max">, z.ZodString]>>;
926
+ minW: z.ZodOptional<z.ZodNumber>;
927
+ maxW: z.ZodOptional<z.ZodNumber>;
928
+ minH: z.ZodOptional<z.ZodNumber>;
929
+ maxH: z.ZodOptional<z.ZodNumber>;
930
+ padding: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
931
+ top: z.ZodOptional<z.ZodNumber>;
932
+ right: z.ZodOptional<z.ZodNumber>;
933
+ bottom: z.ZodOptional<z.ZodNumber>;
934
+ left: z.ZodOptional<z.ZodNumber>;
935
+ }, z.core.$strip>]>>;
936
+ backgroundColor: z.ZodOptional<z.ZodString>;
937
+ border: z.ZodOptional<z.ZodObject<{
938
+ color: z.ZodOptional<z.ZodString>;
939
+ width: z.ZodOptional<z.ZodNumber>;
940
+ dashType: z.ZodOptional<z.ZodEnum<{
941
+ solid: "solid";
942
+ dash: "dash";
943
+ dashDot: "dashDot";
944
+ lgDash: "lgDash";
945
+ lgDashDot: "lgDashDot";
946
+ lgDashDotDot: "lgDashDotDot";
947
+ sysDash: "sysDash";
948
+ sysDot: "sysDot";
949
+ }>>;
950
+ }, z.core.$strip>>;
951
+ borderRadius: z.ZodOptional<z.ZodNumber>;
952
+ type: z.ZodLiteral<"matrix">;
953
+ axes: z.ZodObject<{
954
+ x: z.ZodString;
955
+ y: z.ZodString;
956
+ }, z.core.$strip>;
957
+ quadrants: z.ZodOptional<z.ZodObject<{
958
+ topLeft: z.ZodString;
959
+ topRight: z.ZodString;
960
+ bottomLeft: z.ZodString;
961
+ bottomRight: z.ZodString;
962
+ }, z.core.$strip>>;
963
+ items: z.ZodArray<z.ZodObject<{
964
+ label: z.ZodString;
965
+ x: z.ZodNumber;
966
+ y: z.ZodNumber;
967
+ color: z.ZodOptional<z.ZodString>;
968
+ }, z.core.$strip>>;
969
+ }, z.core.$strip>;
970
+ export type MatrixAxis = z.infer<typeof matrixAxisSchema>;
971
+ export type MatrixQuadrants = z.infer<typeof matrixQuadrantsSchema>;
972
+ export type MatrixItem = z.infer<typeof matrixItemSchema>;
973
+ export type MatrixNode = z.infer<typeof matrixNodeSchema>;
974
+ export declare const treeLayoutSchema: z.ZodEnum<{
975
+ horizontal: "horizontal";
976
+ vertical: "vertical";
977
+ }>;
978
+ export declare const treeNodeShapeSchema: z.ZodEnum<{
979
+ ellipse: "ellipse";
980
+ rect: "rect";
981
+ roundRect: "roundRect";
982
+ }>;
983
+ export declare const treeConnectorStyleSchema: z.ZodObject<{
984
+ color: z.ZodOptional<z.ZodString>;
985
+ width: z.ZodOptional<z.ZodNumber>;
986
+ }, z.core.$strip>;
987
+ export type TreeDataItem = {
988
+ label: string;
989
+ color?: string;
990
+ children?: TreeDataItem[];
991
+ };
992
+ export declare const treeDataItemSchema: z.ZodType<TreeDataItem>;
993
+ export declare const treeNodeSchema: z.ZodObject<{
994
+ yogaNode: z.ZodOptional<z.ZodCustom<YogaNode, YogaNode>>;
995
+ w: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"max">, z.ZodString]>>;
996
+ h: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"max">, z.ZodString]>>;
997
+ minW: z.ZodOptional<z.ZodNumber>;
998
+ maxW: z.ZodOptional<z.ZodNumber>;
999
+ minH: z.ZodOptional<z.ZodNumber>;
1000
+ maxH: z.ZodOptional<z.ZodNumber>;
1001
+ padding: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
1002
+ top: z.ZodOptional<z.ZodNumber>;
1003
+ right: z.ZodOptional<z.ZodNumber>;
1004
+ bottom: z.ZodOptional<z.ZodNumber>;
1005
+ left: z.ZodOptional<z.ZodNumber>;
1006
+ }, z.core.$strip>]>>;
1007
+ backgroundColor: z.ZodOptional<z.ZodString>;
1008
+ border: z.ZodOptional<z.ZodObject<{
1009
+ color: z.ZodOptional<z.ZodString>;
1010
+ width: z.ZodOptional<z.ZodNumber>;
1011
+ dashType: z.ZodOptional<z.ZodEnum<{
1012
+ solid: "solid";
1013
+ dash: "dash";
1014
+ dashDot: "dashDot";
1015
+ lgDash: "lgDash";
1016
+ lgDashDot: "lgDashDot";
1017
+ lgDashDotDot: "lgDashDotDot";
1018
+ sysDash: "sysDash";
1019
+ sysDot: "sysDot";
1020
+ }>>;
1021
+ }, z.core.$strip>>;
1022
+ borderRadius: z.ZodOptional<z.ZodNumber>;
1023
+ type: z.ZodLiteral<"tree">;
1024
+ layout: z.ZodOptional<z.ZodEnum<{
1025
+ horizontal: "horizontal";
1026
+ vertical: "vertical";
1027
+ }>>;
1028
+ nodeShape: z.ZodOptional<z.ZodEnum<{
1029
+ ellipse: "ellipse";
1030
+ rect: "rect";
1031
+ roundRect: "roundRect";
1032
+ }>>;
1033
+ data: z.ZodType<TreeDataItem, unknown, z.core.$ZodTypeInternals<TreeDataItem, unknown>>;
1034
+ connectorStyle: z.ZodOptional<z.ZodObject<{
1035
+ color: z.ZodOptional<z.ZodString>;
1036
+ width: z.ZodOptional<z.ZodNumber>;
1037
+ }, z.core.$strip>>;
1038
+ nodeWidth: z.ZodOptional<z.ZodNumber>;
1039
+ nodeHeight: z.ZodOptional<z.ZodNumber>;
1040
+ levelGap: z.ZodOptional<z.ZodNumber>;
1041
+ siblingGap: z.ZodOptional<z.ZodNumber>;
1042
+ }, z.core.$strip>;
1043
+ export type TreeLayout = z.infer<typeof treeLayoutSchema>;
1044
+ export type TreeNodeShape = z.infer<typeof treeNodeShapeSchema>;
1045
+ export type TreeConnectorStyle = z.infer<typeof treeConnectorStyleSchema>;
1046
+ export type TreeNode = z.infer<typeof treeNodeSchema>;
1047
+ export declare const processArrowDirectionSchema: z.ZodEnum<{
1048
+ horizontal: "horizontal";
1049
+ vertical: "vertical";
1050
+ }>;
1051
+ export declare const processArrowStepSchema: z.ZodObject<{
1052
+ label: z.ZodString;
1053
+ color: z.ZodOptional<z.ZodString>;
1054
+ textColor: z.ZodOptional<z.ZodString>;
1055
+ }, z.core.$strip>;
1056
+ export declare const processArrowNodeSchema: z.ZodObject<{
1057
+ yogaNode: z.ZodOptional<z.ZodCustom<YogaNode, YogaNode>>;
1058
+ w: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"max">, z.ZodString]>>;
1059
+ h: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"max">, z.ZodString]>>;
1060
+ minW: z.ZodOptional<z.ZodNumber>;
1061
+ maxW: z.ZodOptional<z.ZodNumber>;
1062
+ minH: z.ZodOptional<z.ZodNumber>;
1063
+ maxH: z.ZodOptional<z.ZodNumber>;
1064
+ padding: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
1065
+ top: z.ZodOptional<z.ZodNumber>;
1066
+ right: z.ZodOptional<z.ZodNumber>;
1067
+ bottom: z.ZodOptional<z.ZodNumber>;
1068
+ left: z.ZodOptional<z.ZodNumber>;
1069
+ }, z.core.$strip>]>>;
1070
+ backgroundColor: z.ZodOptional<z.ZodString>;
1071
+ border: z.ZodOptional<z.ZodObject<{
1072
+ color: z.ZodOptional<z.ZodString>;
1073
+ width: z.ZodOptional<z.ZodNumber>;
1074
+ dashType: z.ZodOptional<z.ZodEnum<{
1075
+ solid: "solid";
1076
+ dash: "dash";
1077
+ dashDot: "dashDot";
1078
+ lgDash: "lgDash";
1079
+ lgDashDot: "lgDashDot";
1080
+ lgDashDotDot: "lgDashDotDot";
1081
+ sysDash: "sysDash";
1082
+ sysDot: "sysDot";
1083
+ }>>;
1084
+ }, z.core.$strip>>;
1085
+ borderRadius: z.ZodOptional<z.ZodNumber>;
1086
+ type: z.ZodLiteral<"processArrow">;
1087
+ direction: z.ZodOptional<z.ZodEnum<{
1088
+ horizontal: "horizontal";
1089
+ vertical: "vertical";
1090
+ }>>;
1091
+ steps: z.ZodArray<z.ZodObject<{
1092
+ label: z.ZodString;
1093
+ color: z.ZodOptional<z.ZodString>;
1094
+ textColor: z.ZodOptional<z.ZodString>;
1095
+ }, z.core.$strip>>;
1096
+ itemWidth: z.ZodOptional<z.ZodNumber>;
1097
+ itemHeight: z.ZodOptional<z.ZodNumber>;
1098
+ gap: z.ZodOptional<z.ZodNumber>;
1099
+ fontPx: z.ZodOptional<z.ZodNumber>;
1100
+ bold: z.ZodOptional<z.ZodBoolean>;
1101
+ }, z.core.$strip>;
1102
+ export type ProcessArrowDirection = z.infer<typeof processArrowDirectionSchema>;
1103
+ export type ProcessArrowStep = z.infer<typeof processArrowStepSchema>;
1104
+ export type ProcessArrowNode = z.infer<typeof processArrowNodeSchema>;
1105
+ export declare const flowDirectionSchema: z.ZodEnum<{
1106
+ horizontal: "horizontal";
1107
+ vertical: "vertical";
1108
+ }>;
1109
+ export declare const flowNodeShapeSchema: z.ZodEnum<{
1110
+ flowChartConnector: "flowChartConnector";
1111
+ flowChartDecision: "flowChartDecision";
1112
+ flowChartDelay: "flowChartDelay";
1113
+ flowChartDocument: "flowChartDocument";
1114
+ flowChartInputOutput: "flowChartInputOutput";
1115
+ flowChartMagneticDisk: "flowChartMagneticDisk";
1116
+ flowChartManualInput: "flowChartManualInput";
1117
+ flowChartManualOperation: "flowChartManualOperation";
1118
+ flowChartPredefinedProcess: "flowChartPredefinedProcess";
1119
+ flowChartPreparation: "flowChartPreparation";
1120
+ flowChartProcess: "flowChartProcess";
1121
+ flowChartTerminator: "flowChartTerminator";
1122
+ }>;
1123
+ export declare const flowNodeItemSchema: z.ZodObject<{
1124
+ id: z.ZodString;
1125
+ shape: z.ZodEnum<{
1126
+ flowChartConnector: "flowChartConnector";
1127
+ flowChartDecision: "flowChartDecision";
1128
+ flowChartDelay: "flowChartDelay";
1129
+ flowChartDocument: "flowChartDocument";
1130
+ flowChartInputOutput: "flowChartInputOutput";
1131
+ flowChartMagneticDisk: "flowChartMagneticDisk";
1132
+ flowChartManualInput: "flowChartManualInput";
1133
+ flowChartManualOperation: "flowChartManualOperation";
1134
+ flowChartPredefinedProcess: "flowChartPredefinedProcess";
1135
+ flowChartPreparation: "flowChartPreparation";
1136
+ flowChartProcess: "flowChartProcess";
1137
+ flowChartTerminator: "flowChartTerminator";
1138
+ }>;
1139
+ text: z.ZodString;
1140
+ color: z.ZodOptional<z.ZodString>;
1141
+ textColor: z.ZodOptional<z.ZodString>;
1142
+ width: z.ZodOptional<z.ZodNumber>;
1143
+ height: z.ZodOptional<z.ZodNumber>;
1144
+ }, z.core.$strip>;
1145
+ export declare const flowConnectionSchema: z.ZodObject<{
1146
+ from: z.ZodString;
1147
+ to: z.ZodString;
1148
+ label: z.ZodOptional<z.ZodString>;
1149
+ color: z.ZodOptional<z.ZodString>;
1150
+ }, z.core.$strip>;
1151
+ export declare const flowConnectorStyleSchema: z.ZodObject<{
1152
+ color: z.ZodOptional<z.ZodString>;
1153
+ width: z.ZodOptional<z.ZodNumber>;
1154
+ arrowType: z.ZodOptional<z.ZodEnum<{
1155
+ diamond: "diamond";
1156
+ triangle: "triangle";
1157
+ none: "none";
1158
+ arrow: "arrow";
1159
+ oval: "oval";
1160
+ stealth: "stealth";
1161
+ }>>;
1162
+ }, z.core.$strip>;
1163
+ export declare const flowNodeSchema: z.ZodObject<{
1164
+ yogaNode: z.ZodOptional<z.ZodCustom<YogaNode, YogaNode>>;
1165
+ w: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"max">, z.ZodString]>>;
1166
+ h: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"max">, z.ZodString]>>;
1167
+ minW: z.ZodOptional<z.ZodNumber>;
1168
+ maxW: z.ZodOptional<z.ZodNumber>;
1169
+ minH: z.ZodOptional<z.ZodNumber>;
1170
+ maxH: z.ZodOptional<z.ZodNumber>;
1171
+ padding: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodObject<{
1172
+ top: z.ZodOptional<z.ZodNumber>;
1173
+ right: z.ZodOptional<z.ZodNumber>;
1174
+ bottom: z.ZodOptional<z.ZodNumber>;
1175
+ left: z.ZodOptional<z.ZodNumber>;
1176
+ }, z.core.$strip>]>>;
1177
+ backgroundColor: z.ZodOptional<z.ZodString>;
1178
+ border: z.ZodOptional<z.ZodObject<{
1179
+ color: z.ZodOptional<z.ZodString>;
1180
+ width: z.ZodOptional<z.ZodNumber>;
1181
+ dashType: z.ZodOptional<z.ZodEnum<{
1182
+ solid: "solid";
1183
+ dash: "dash";
1184
+ dashDot: "dashDot";
1185
+ lgDash: "lgDash";
1186
+ lgDashDot: "lgDashDot";
1187
+ lgDashDotDot: "lgDashDotDot";
1188
+ sysDash: "sysDash";
1189
+ sysDot: "sysDot";
1190
+ }>>;
1191
+ }, z.core.$strip>>;
1192
+ borderRadius: z.ZodOptional<z.ZodNumber>;
1193
+ type: z.ZodLiteral<"flow">;
1194
+ direction: z.ZodOptional<z.ZodEnum<{
1195
+ horizontal: "horizontal";
1196
+ vertical: "vertical";
1197
+ }>>;
1198
+ nodes: z.ZodArray<z.ZodObject<{
1199
+ id: z.ZodString;
1200
+ shape: z.ZodEnum<{
1201
+ flowChartConnector: "flowChartConnector";
1202
+ flowChartDecision: "flowChartDecision";
1203
+ flowChartDelay: "flowChartDelay";
1204
+ flowChartDocument: "flowChartDocument";
1205
+ flowChartInputOutput: "flowChartInputOutput";
1206
+ flowChartMagneticDisk: "flowChartMagneticDisk";
1207
+ flowChartManualInput: "flowChartManualInput";
1208
+ flowChartManualOperation: "flowChartManualOperation";
1209
+ flowChartPredefinedProcess: "flowChartPredefinedProcess";
1210
+ flowChartPreparation: "flowChartPreparation";
1211
+ flowChartProcess: "flowChartProcess";
1212
+ flowChartTerminator: "flowChartTerminator";
1213
+ }>;
1214
+ text: z.ZodString;
1215
+ color: z.ZodOptional<z.ZodString>;
1216
+ textColor: z.ZodOptional<z.ZodString>;
1217
+ width: z.ZodOptional<z.ZodNumber>;
1218
+ height: z.ZodOptional<z.ZodNumber>;
1219
+ }, z.core.$strip>>;
1220
+ connections: z.ZodArray<z.ZodObject<{
1221
+ from: z.ZodString;
1222
+ to: z.ZodString;
1223
+ label: z.ZodOptional<z.ZodString>;
1224
+ color: z.ZodOptional<z.ZodString>;
1225
+ }, z.core.$strip>>;
1226
+ connectorStyle: z.ZodOptional<z.ZodObject<{
1227
+ color: z.ZodOptional<z.ZodString>;
1228
+ width: z.ZodOptional<z.ZodNumber>;
1229
+ arrowType: z.ZodOptional<z.ZodEnum<{
1230
+ diamond: "diamond";
1231
+ triangle: "triangle";
1232
+ none: "none";
1233
+ arrow: "arrow";
1234
+ oval: "oval";
1235
+ stealth: "stealth";
1236
+ }>>;
1237
+ }, z.core.$strip>>;
1238
+ nodeWidth: z.ZodOptional<z.ZodNumber>;
1239
+ nodeHeight: z.ZodOptional<z.ZodNumber>;
1240
+ nodeGap: z.ZodOptional<z.ZodNumber>;
1241
+ }, z.core.$strip>;
1242
+ export type FlowDirection = z.infer<typeof flowDirectionSchema>;
1243
+ export type FlowNodeShape = z.infer<typeof flowNodeShapeSchema>;
1244
+ export type FlowNodeItem = z.infer<typeof flowNodeItemSchema>;
1245
+ export type FlowConnection = z.infer<typeof flowConnectionSchema>;
1246
+ export type FlowConnectorStyle = z.infer<typeof flowConnectorStyleSchema>;
1247
+ export type FlowNode = z.infer<typeof flowNodeSchema>;
851
1248
  export type BoxNode = BasePOMNode & {
852
1249
  type: "box";
853
1250
  children: POMNode;
@@ -866,7 +1263,7 @@ export type HStackNode = BasePOMNode & {
866
1263
  alignItems?: AlignItems;
867
1264
  justifyContent?: JustifyContent;
868
1265
  };
869
- export type POMNode = TextNode | ImageNode | TableNode | BoxNode | VStackNode | HStackNode | ShapeNode | ChartNode;
1266
+ export type POMNode = TextNode | ImageNode | TableNode | BoxNode | VStackNode | HStackNode | ShapeNode | ChartNode | TimelineNode | MatrixNode | TreeNode | FlowNode | ProcessArrowNode;
870
1267
  export declare const boxNodeSchema: z.ZodType<BoxNode>;
871
1268
  export declare const vStackNodeSchema: z.ZodType<VStackNode>;
872
1269
  export declare const hStackNodeSchema: z.ZodType<HStackNode>;
@@ -886,7 +1283,7 @@ export type PositionedNode = (TextNode & PositionedBase) | (ImageNode & Position
886
1283
  children: PositionedNode[];
887
1284
  }) | (HStackNode & PositionedBase & {
888
1285
  children: PositionedNode[];
889
- }) | (ShapeNode & PositionedBase) | (ChartNode & PositionedBase);
1286
+ }) | (ShapeNode & PositionedBase) | (ChartNode & PositionedBase) | (TimelineNode & PositionedBase) | (MatrixNode & PositionedBase) | (TreeNode & PositionedBase) | (FlowNode & PositionedBase) | (ProcessArrowNode & PositionedBase);
890
1287
  export declare const positionedNodeSchema: z.ZodType<PositionedNode>;
891
1288
  export declare const pageNumberPositionSchema: z.ZodEnum<{
892
1289
  right: "right";