@hirokisakabe/pom 5.4.0 → 5.5.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.
- package/README.md +6 -5
- package/dist/autoFit/autoFit.d.ts +2 -1
- package/dist/autoFit/autoFit.d.ts.map +1 -1
- package/dist/autoFit/autoFit.js +33 -17
- package/dist/buildContext.d.ts +2 -0
- package/dist/buildContext.d.ts.map +1 -1
- package/dist/buildContext.js +2 -0
- package/dist/buildPptx.d.ts +7 -1
- package/dist/buildPptx.d.ts.map +1 -1
- package/dist/buildPptx.js +14 -5
- package/dist/calcYogaLayout/calcYogaLayout.d.ts +4 -2
- package/dist/calcYogaLayout/calcYogaLayout.d.ts.map +1 -1
- package/dist/calcYogaLayout/calcYogaLayout.js +76 -16
- package/dist/calcYogaLayout/fontLoader.d.ts +4 -0
- package/dist/calcYogaLayout/fontLoader.d.ts.map +1 -1
- package/dist/calcYogaLayout/fontLoader.js +8 -0
- package/dist/calcYogaLayout/measureText.d.ts.map +1 -1
- package/dist/calcYogaLayout/measureText.js +4 -3
- package/dist/calcYogaLayout/types.d.ts +16 -0
- package/dist/calcYogaLayout/types.d.ts.map +1 -0
- package/dist/calcYogaLayout/types.js +14 -0
- package/dist/diagnostics.d.ts +14 -0
- package/dist/diagnostics.d.ts.map +1 -0
- package/dist/diagnostics.js +17 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/parseXml/parseXml.d.ts +1 -1
- package/dist/parseXml/parseXml.d.ts.map +1 -1
- package/dist/parseXml/parseXml.js +16 -16
- package/dist/registry/definitions/icon.d.ts.map +1 -1
- package/dist/registry/definitions/icon.js +26 -14
- package/dist/registry/definitions/image.d.ts.map +1 -1
- package/dist/registry/definitions/image.js +2 -3
- package/dist/registry/definitions/layer.d.ts.map +1 -1
- package/dist/registry/definitions/layer.js +9 -6
- package/dist/registry/definitions/line.d.ts.map +1 -1
- package/dist/registry/definitions/line.js +1 -2
- package/dist/registry/definitions/list.d.ts.map +1 -1
- package/dist/registry/definitions/list.js +3 -1
- package/dist/registry/definitions/shape.d.ts.map +1 -1
- package/dist/registry/definitions/shape.js +2 -0
- package/dist/registry/definitions/text.d.ts.map +1 -1
- package/dist/registry/definitions/text.js +3 -1
- package/dist/registry/types.d.ts +2 -1
- package/dist/registry/types.d.ts.map +1 -1
- package/dist/renderPptx/nodes/chart.d.ts.map +1 -1
- package/dist/renderPptx/nodes/chart.js +6 -4
- package/dist/renderPptx/nodes/flow.d.ts.map +1 -1
- package/dist/renderPptx/nodes/flow.js +14 -4
- package/dist/renderPptx/nodes/image.d.ts.map +1 -1
- package/dist/renderPptx/nodes/image.js +9 -7
- package/dist/renderPptx/nodes/list.d.ts.map +1 -1
- package/dist/renderPptx/nodes/list.js +19 -16
- package/dist/renderPptx/nodes/matrix.d.ts.map +1 -1
- package/dist/renderPptx/nodes/matrix.js +11 -9
- package/dist/renderPptx/nodes/processArrow.d.ts.map +1 -1
- package/dist/renderPptx/nodes/processArrow.js +14 -4
- package/dist/renderPptx/nodes/pyramid.d.ts.map +1 -1
- package/dist/renderPptx/nodes/pyramid.js +6 -4
- package/dist/renderPptx/nodes/shape.d.ts.map +1 -1
- package/dist/renderPptx/nodes/shape.js +7 -5
- package/dist/renderPptx/nodes/table.d.ts.map +1 -1
- package/dist/renderPptx/nodes/table.js +7 -5
- package/dist/renderPptx/nodes/timeline.d.ts.map +1 -1
- package/dist/renderPptx/nodes/timeline.js +14 -4
- package/dist/renderPptx/nodes/tree.d.ts.map +1 -1
- package/dist/renderPptx/nodes/tree.js +6 -4
- package/dist/renderPptx/textOptions.d.ts +6 -6
- package/dist/renderPptx/textOptions.d.ts.map +1 -1
- package/dist/renderPptx/textOptions.js +6 -4
- package/dist/renderPptx/utils/backgroundBorder.js +1 -1
- package/dist/renderPptx/utils/contentArea.d.ts +26 -0
- package/dist/renderPptx/utils/contentArea.d.ts.map +1 -0
- package/dist/renderPptx/utils/contentArea.js +26 -0
- package/dist/renderPptx/utils/scaleToFit.d.ts +3 -2
- package/dist/renderPptx/utils/scaleToFit.d.ts.map +1 -1
- package/dist/renderPptx/utils/scaleToFit.js +3 -3
- package/dist/shared/freeYogaTree.d.ts +3 -3
- package/dist/shared/freeYogaTree.d.ts.map +1 -1
- package/dist/shared/freeYogaTree.js +16 -21
- package/dist/shared/measureImage.d.ts +3 -2
- package/dist/shared/measureImage.d.ts.map +1 -1
- package/dist/shared/measureImage.js +5 -5
- package/dist/toPositioned/toPositioned.d.ts +3 -6
- package/dist/toPositioned/toPositioned.d.ts.map +1 -1
- package/dist/toPositioned/toPositioned.js +11 -19
- package/dist/types.d.ts +12 -445
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +43 -50
- package/package.json +6 -3
- package/dist/parseXml/inputSchema.d.ts +0 -1622
- package/dist/parseXml/inputSchema.d.ts.map +0 -1
- package/dist/parseXml/inputSchema.js +0 -257
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"inputSchema.d.ts","sourceRoot":"","sources":["../../src/parseXml/inputSchema.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,257 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Input schemas for LLM/external input validation (internal module)
|
|
3
|
-
*
|
|
4
|
-
* These schemas do not include internal properties like `yogaNode`.
|
|
5
|
-
* Used by `parseXml` to validate parsed XML input.
|
|
6
|
-
*/
|
|
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, iconNameSchema, iconColorSchema, iconVariantSchema, alignSelfSchema, positionTypeSchema, flexWrapSchema, } from "../types.js";
|
|
9
|
-
// ===== Base Node Schema =====
|
|
10
|
-
const inputBaseNodeSchema = z.object({
|
|
11
|
-
w: lengthSchema.optional(),
|
|
12
|
-
h: lengthSchema.optional(),
|
|
13
|
-
minW: z.number().optional(),
|
|
14
|
-
maxW: z.number().optional(),
|
|
15
|
-
minH: z.number().optional(),
|
|
16
|
-
maxH: z.number().optional(),
|
|
17
|
-
padding: paddingSchema.optional(),
|
|
18
|
-
margin: paddingSchema.optional(),
|
|
19
|
-
backgroundColor: z.string().optional(),
|
|
20
|
-
backgroundImage: backgroundImageSchema.optional(),
|
|
21
|
-
border: borderStyleSchema.optional(),
|
|
22
|
-
borderRadius: z.number().optional(),
|
|
23
|
-
opacity: z.number().min(0).max(1).optional(),
|
|
24
|
-
zIndex: z.number().optional(),
|
|
25
|
-
position: positionTypeSchema.optional(),
|
|
26
|
-
top: z.number().optional(),
|
|
27
|
-
right: z.number().optional(),
|
|
28
|
-
bottom: z.number().optional(),
|
|
29
|
-
left: z.number().optional(),
|
|
30
|
-
alignSelf: alignSelfSchema.optional(),
|
|
31
|
-
});
|
|
32
|
-
// ===== Node Schemas =====
|
|
33
|
-
export const inputTextNodeSchema = inputBaseNodeSchema.extend({
|
|
34
|
-
type: z.literal("text"),
|
|
35
|
-
text: z.string(),
|
|
36
|
-
fontSize: z.number().optional(),
|
|
37
|
-
color: z.string().optional(),
|
|
38
|
-
textAlign: z.enum(["left", "center", "right"]).optional(),
|
|
39
|
-
bold: z.boolean().optional(),
|
|
40
|
-
italic: z.boolean().optional(),
|
|
41
|
-
underline: underlineSchema.optional(),
|
|
42
|
-
strike: z.boolean().optional(),
|
|
43
|
-
highlight: z.string().optional(),
|
|
44
|
-
fontFamily: z.string().optional(),
|
|
45
|
-
lineHeight: z.number().optional(),
|
|
46
|
-
});
|
|
47
|
-
const inputLiNodeSchema = liNodeSchema;
|
|
48
|
-
export const inputUlNodeSchema = inputBaseNodeSchema.extend({
|
|
49
|
-
type: z.literal("ul"),
|
|
50
|
-
items: z.array(inputLiNodeSchema),
|
|
51
|
-
fontSize: z.number().optional(),
|
|
52
|
-
color: z.string().optional(),
|
|
53
|
-
textAlign: z.enum(["left", "center", "right"]).optional(),
|
|
54
|
-
bold: z.boolean().optional(),
|
|
55
|
-
italic: z.boolean().optional(),
|
|
56
|
-
underline: underlineSchema.optional(),
|
|
57
|
-
strike: z.boolean().optional(),
|
|
58
|
-
highlight: z.string().optional(),
|
|
59
|
-
fontFamily: z.string().optional(),
|
|
60
|
-
lineHeight: z.number().optional(),
|
|
61
|
-
});
|
|
62
|
-
export const inputOlNodeSchema = inputBaseNodeSchema.extend({
|
|
63
|
-
type: z.literal("ol"),
|
|
64
|
-
items: z.array(inputLiNodeSchema),
|
|
65
|
-
fontSize: z.number().optional(),
|
|
66
|
-
color: z.string().optional(),
|
|
67
|
-
textAlign: z.enum(["left", "center", "right"]).optional(),
|
|
68
|
-
bold: z.boolean().optional(),
|
|
69
|
-
italic: z.boolean().optional(),
|
|
70
|
-
underline: underlineSchema.optional(),
|
|
71
|
-
strike: z.boolean().optional(),
|
|
72
|
-
highlight: z.string().optional(),
|
|
73
|
-
fontFamily: z.string().optional(),
|
|
74
|
-
lineHeight: z.number().optional(),
|
|
75
|
-
numberType: bulletNumberTypeSchema.optional(),
|
|
76
|
-
numberStartAt: z.number().optional(),
|
|
77
|
-
});
|
|
78
|
-
const inputImageSizingSchema = z.object({
|
|
79
|
-
type: z.enum(["contain", "cover", "crop"]),
|
|
80
|
-
w: z.number().optional(),
|
|
81
|
-
h: z.number().optional(),
|
|
82
|
-
x: z.number().optional(),
|
|
83
|
-
y: z.number().optional(),
|
|
84
|
-
});
|
|
85
|
-
export const inputImageNodeSchema = inputBaseNodeSchema.extend({
|
|
86
|
-
type: z.literal("image"),
|
|
87
|
-
src: z.string(),
|
|
88
|
-
sizing: inputImageSizingSchema.optional(),
|
|
89
|
-
shadow: shadowStyleSchema.optional(),
|
|
90
|
-
});
|
|
91
|
-
export const inputIconNodeSchema = inputBaseNodeSchema.extend({
|
|
92
|
-
type: z.literal("icon"),
|
|
93
|
-
name: iconNameSchema,
|
|
94
|
-
size: z.number().positive().max(1024).optional(),
|
|
95
|
-
color: iconColorSchema,
|
|
96
|
-
variant: iconVariantSchema,
|
|
97
|
-
bgColor: iconColorSchema,
|
|
98
|
-
});
|
|
99
|
-
export const inputTableNodeSchema = inputBaseNodeSchema.extend({
|
|
100
|
-
type: z.literal("table"),
|
|
101
|
-
columns: z.array(tableColumnSchema),
|
|
102
|
-
rows: z.array(tableRowSchema),
|
|
103
|
-
defaultRowHeight: z.number().optional(),
|
|
104
|
-
});
|
|
105
|
-
export const inputShapeNodeSchema = inputBaseNodeSchema.extend({
|
|
106
|
-
type: z.literal("shape"),
|
|
107
|
-
shapeType: shapeTypeSchema,
|
|
108
|
-
text: z.string().optional(),
|
|
109
|
-
fill: fillStyleSchema.optional(),
|
|
110
|
-
line: borderStyleSchema.optional(),
|
|
111
|
-
shadow: shadowStyleSchema.optional(),
|
|
112
|
-
fontSize: z.number().optional(),
|
|
113
|
-
color: z.string().optional(),
|
|
114
|
-
textAlign: z.enum(["left", "center", "right"]).optional(),
|
|
115
|
-
bold: z.boolean().optional(),
|
|
116
|
-
italic: z.boolean().optional(),
|
|
117
|
-
underline: underlineSchema.optional(),
|
|
118
|
-
strike: z.boolean().optional(),
|
|
119
|
-
highlight: z.string().optional(),
|
|
120
|
-
fontFamily: z.string().optional(),
|
|
121
|
-
lineHeight: z.number().optional(),
|
|
122
|
-
});
|
|
123
|
-
export const inputChartNodeSchema = inputBaseNodeSchema.extend({
|
|
124
|
-
type: z.literal("chart"),
|
|
125
|
-
chartType: chartTypeSchema,
|
|
126
|
-
data: z.array(chartDataSchema),
|
|
127
|
-
showLegend: z.boolean().optional(),
|
|
128
|
-
showTitle: z.boolean().optional(),
|
|
129
|
-
title: z.string().optional(),
|
|
130
|
-
chartColors: z.array(z.string()).optional(),
|
|
131
|
-
// radar専用オプション
|
|
132
|
-
radarStyle: radarStyleSchema.optional(),
|
|
133
|
-
});
|
|
134
|
-
export const inputTimelineNodeSchema = inputBaseNodeSchema.extend({
|
|
135
|
-
type: z.literal("timeline"),
|
|
136
|
-
direction: timelineDirectionSchema.optional(),
|
|
137
|
-
items: z.array(timelineItemSchema),
|
|
138
|
-
});
|
|
139
|
-
export const inputMatrixNodeSchema = inputBaseNodeSchema.extend({
|
|
140
|
-
type: z.literal("matrix"),
|
|
141
|
-
axes: matrixAxisSchema,
|
|
142
|
-
quadrants: matrixQuadrantsSchema.optional(),
|
|
143
|
-
items: z.array(matrixItemSchema),
|
|
144
|
-
});
|
|
145
|
-
const inputTreeDataItemSchema = z.lazy(() => z.object({
|
|
146
|
-
label: z.string(),
|
|
147
|
-
color: z.string().optional(),
|
|
148
|
-
children: z.array(inputTreeDataItemSchema).optional(),
|
|
149
|
-
}));
|
|
150
|
-
export const inputTreeNodeSchema = inputBaseNodeSchema.extend({
|
|
151
|
-
type: z.literal("tree"),
|
|
152
|
-
layout: treeLayoutSchema.optional(),
|
|
153
|
-
nodeShape: treeNodeShapeSchema.optional(),
|
|
154
|
-
data: inputTreeDataItemSchema,
|
|
155
|
-
connectorStyle: treeConnectorStyleSchema.optional(),
|
|
156
|
-
nodeWidth: z.number().optional(),
|
|
157
|
-
nodeHeight: z.number().optional(),
|
|
158
|
-
levelGap: z.number().optional(),
|
|
159
|
-
siblingGap: z.number().optional(),
|
|
160
|
-
});
|
|
161
|
-
export const inputFlowNodeSchema = inputBaseNodeSchema.extend({
|
|
162
|
-
type: z.literal("flow"),
|
|
163
|
-
direction: flowDirectionSchema.optional(),
|
|
164
|
-
nodes: z.array(flowNodeItemSchema),
|
|
165
|
-
connections: z.array(flowConnectionSchema),
|
|
166
|
-
connectorStyle: flowConnectorStyleSchema.optional(),
|
|
167
|
-
nodeWidth: z.number().optional(),
|
|
168
|
-
nodeHeight: z.number().optional(),
|
|
169
|
-
nodeGap: z.number().optional(),
|
|
170
|
-
});
|
|
171
|
-
export const inputProcessArrowNodeSchema = inputBaseNodeSchema.extend({
|
|
172
|
-
type: z.literal("processArrow"),
|
|
173
|
-
direction: processArrowDirectionSchema.optional(),
|
|
174
|
-
steps: z.array(processArrowStepSchema),
|
|
175
|
-
itemWidth: z.number().optional(),
|
|
176
|
-
itemHeight: z.number().optional(),
|
|
177
|
-
gap: z.number().optional(),
|
|
178
|
-
fontSize: z.number().optional(),
|
|
179
|
-
bold: z.boolean().optional(),
|
|
180
|
-
italic: z.boolean().optional(),
|
|
181
|
-
underline: underlineSchema.optional(),
|
|
182
|
-
strike: z.boolean().optional(),
|
|
183
|
-
highlight: z.string().optional(),
|
|
184
|
-
});
|
|
185
|
-
export const inputPyramidNodeSchema = inputBaseNodeSchema.extend({
|
|
186
|
-
type: z.literal("pyramid"),
|
|
187
|
-
direction: pyramidDirectionSchema.optional(),
|
|
188
|
-
levels: z.array(pyramidLevelSchema).min(1),
|
|
189
|
-
fontSize: z.number().optional(),
|
|
190
|
-
bold: z.boolean().optional(),
|
|
191
|
-
});
|
|
192
|
-
export const inputLineNodeSchema = inputBaseNodeSchema.extend({
|
|
193
|
-
type: z.literal("line"),
|
|
194
|
-
x1: z.number(),
|
|
195
|
-
y1: z.number(),
|
|
196
|
-
x2: z.number(),
|
|
197
|
-
y2: z.number(),
|
|
198
|
-
color: z.string().optional(),
|
|
199
|
-
lineWidth: z.number().optional(),
|
|
200
|
-
dashType: borderDashSchema.optional(),
|
|
201
|
-
beginArrow: lineArrowSchema.optional(),
|
|
202
|
-
endArrow: lineArrowSchema.optional(),
|
|
203
|
-
});
|
|
204
|
-
// ===== Recursive Node Schemas =====
|
|
205
|
-
const inputBoxNodeSchemaBase = inputBaseNodeSchema.extend({
|
|
206
|
-
type: z.literal("box"),
|
|
207
|
-
children: z.lazy(() => inputPomNodeSchema),
|
|
208
|
-
shadow: shadowStyleSchema.optional(),
|
|
209
|
-
});
|
|
210
|
-
const inputVStackNodeSchemaBase = inputBaseNodeSchema.extend({
|
|
211
|
-
type: z.literal("vstack"),
|
|
212
|
-
children: z.array(z.lazy(() => inputPomNodeSchema)),
|
|
213
|
-
gap: z.number().optional(),
|
|
214
|
-
alignItems: alignItemsSchema.optional(),
|
|
215
|
-
justifyContent: justifyContentSchema.optional(),
|
|
216
|
-
shadow: shadowStyleSchema.optional(),
|
|
217
|
-
flexWrap: flexWrapSchema.optional(),
|
|
218
|
-
});
|
|
219
|
-
const inputHStackNodeSchemaBase = inputBaseNodeSchema.extend({
|
|
220
|
-
type: z.literal("hstack"),
|
|
221
|
-
children: z.array(z.lazy(() => inputPomNodeSchema)),
|
|
222
|
-
gap: z.number().optional(),
|
|
223
|
-
alignItems: alignItemsSchema.optional(),
|
|
224
|
-
justifyContent: justifyContentSchema.optional(),
|
|
225
|
-
shadow: shadowStyleSchema.optional(),
|
|
226
|
-
flexWrap: flexWrapSchema.optional(),
|
|
227
|
-
});
|
|
228
|
-
const inputLayerChildSchemaBase = z.lazy(() => inputPomNodeSchema.and(z.object({
|
|
229
|
-
x: z.number(),
|
|
230
|
-
y: z.number(),
|
|
231
|
-
})));
|
|
232
|
-
const inputLayerNodeSchemaBase = inputBaseNodeSchema.extend({
|
|
233
|
-
type: z.literal("layer"),
|
|
234
|
-
children: z.array(inputLayerChildSchemaBase),
|
|
235
|
-
});
|
|
236
|
-
/** Input schema for POM nodes (used internally by parseXml) */
|
|
237
|
-
const inputPomNodeSchema = z.lazy(() => z.discriminatedUnion("type", [
|
|
238
|
-
inputTextNodeSchema,
|
|
239
|
-
inputUlNodeSchema,
|
|
240
|
-
inputOlNodeSchema,
|
|
241
|
-
inputImageNodeSchema,
|
|
242
|
-
inputTableNodeSchema,
|
|
243
|
-
inputBoxNodeSchemaBase,
|
|
244
|
-
inputVStackNodeSchemaBase,
|
|
245
|
-
inputHStackNodeSchemaBase,
|
|
246
|
-
inputShapeNodeSchema,
|
|
247
|
-
inputChartNodeSchema,
|
|
248
|
-
inputTimelineNodeSchema,
|
|
249
|
-
inputMatrixNodeSchema,
|
|
250
|
-
inputTreeNodeSchema,
|
|
251
|
-
inputFlowNodeSchema,
|
|
252
|
-
inputProcessArrowNodeSchema,
|
|
253
|
-
inputPyramidNodeSchema,
|
|
254
|
-
inputLineNodeSchema,
|
|
255
|
-
inputLayerNodeSchemaBase,
|
|
256
|
-
inputIconNodeSchema,
|
|
257
|
-
]));
|