@hirokisakabe/pom 0.1.3 → 0.1.5
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 +188 -0
- package/dist/buildPptx.d.ts +3 -1
- package/dist/buildPptx.d.ts.map +1 -1
- package/dist/buildPptx.js +68 -4
- package/dist/calcYogaLayout/measureText.d.ts.map +1 -1
- package/dist/calcYogaLayout/measureText.js +26 -17
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/inputSchema.d.ts +483 -0
- package/dist/inputSchema.d.ts.map +1 -0
- package/dist/inputSchema.js +128 -0
- package/dist/renderPptx/renderPptx.d.ts +2 -4
- package/dist/renderPptx/renderPptx.d.ts.map +1 -1
- package/dist/renderPptx/renderPptx.js +6 -18
- package/dist/renderPptx/textOptions.d.ts +20 -0
- package/dist/renderPptx/textOptions.d.ts.map +1 -0
- package/dist/renderPptx/textOptions.js +20 -0
- package/dist/renderPptx/units.d.ts +4 -0
- package/dist/renderPptx/units.d.ts.map +1 -0
- package/dist/renderPptx/units.js +3 -0
- package/dist/types.d.ts +394 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +202 -1
- package/package.json +1 -1
package/dist/types.js
CHANGED
|
@@ -51,6 +51,186 @@ export const justifyContentSchema = z.enum([
|
|
|
51
51
|
"spaceEvenly",
|
|
52
52
|
]);
|
|
53
53
|
export const flexDirectionSchema = z.enum(["row", "column"]);
|
|
54
|
+
export const shapeTypeSchema = z.enum([
|
|
55
|
+
"accentBorderCallout1",
|
|
56
|
+
"accentBorderCallout2",
|
|
57
|
+
"accentBorderCallout3",
|
|
58
|
+
"accentCallout1",
|
|
59
|
+
"accentCallout2",
|
|
60
|
+
"accentCallout3",
|
|
61
|
+
"actionButtonBackPrevious",
|
|
62
|
+
"actionButtonBeginning",
|
|
63
|
+
"actionButtonBlank",
|
|
64
|
+
"actionButtonDocument",
|
|
65
|
+
"actionButtonEnd",
|
|
66
|
+
"actionButtonForwardNext",
|
|
67
|
+
"actionButtonHelp",
|
|
68
|
+
"actionButtonHome",
|
|
69
|
+
"actionButtonInformation",
|
|
70
|
+
"actionButtonMovie",
|
|
71
|
+
"actionButtonReturn",
|
|
72
|
+
"actionButtonSound",
|
|
73
|
+
"arc",
|
|
74
|
+
"bentArrow",
|
|
75
|
+
"bentUpArrow",
|
|
76
|
+
"bevel",
|
|
77
|
+
"blockArc",
|
|
78
|
+
"borderCallout1",
|
|
79
|
+
"borderCallout2",
|
|
80
|
+
"borderCallout3",
|
|
81
|
+
"bracePair",
|
|
82
|
+
"bracketPair",
|
|
83
|
+
"callout1",
|
|
84
|
+
"callout2",
|
|
85
|
+
"callout3",
|
|
86
|
+
"can",
|
|
87
|
+
"chartPlus",
|
|
88
|
+
"chartStar",
|
|
89
|
+
"chartX",
|
|
90
|
+
"chevron",
|
|
91
|
+
"chord",
|
|
92
|
+
"circularArrow",
|
|
93
|
+
"cloud",
|
|
94
|
+
"cloudCallout",
|
|
95
|
+
"corner",
|
|
96
|
+
"cornerTabs",
|
|
97
|
+
"cube",
|
|
98
|
+
"curvedDownArrow",
|
|
99
|
+
"curvedLeftArrow",
|
|
100
|
+
"curvedRightArrow",
|
|
101
|
+
"curvedUpArrow",
|
|
102
|
+
"decagon",
|
|
103
|
+
"diagStripe",
|
|
104
|
+
"diamond",
|
|
105
|
+
"dodecagon",
|
|
106
|
+
"donut",
|
|
107
|
+
"doubleWave",
|
|
108
|
+
"downArrow",
|
|
109
|
+
"downArrowCallout",
|
|
110
|
+
"ellipse",
|
|
111
|
+
"ellipseRibbon",
|
|
112
|
+
"ellipseRibbon2",
|
|
113
|
+
"flowChartAlternateProcess",
|
|
114
|
+
"flowChartCollate",
|
|
115
|
+
"flowChartConnector",
|
|
116
|
+
"flowChartDecision",
|
|
117
|
+
"flowChartDelay",
|
|
118
|
+
"flowChartDisplay",
|
|
119
|
+
"flowChartDocument",
|
|
120
|
+
"flowChartExtract",
|
|
121
|
+
"flowChartInputOutput",
|
|
122
|
+
"flowChartInternalStorage",
|
|
123
|
+
"flowChartMagneticDisk",
|
|
124
|
+
"flowChartMagneticDrum",
|
|
125
|
+
"flowChartMagneticTape",
|
|
126
|
+
"flowChartManualInput",
|
|
127
|
+
"flowChartManualOperation",
|
|
128
|
+
"flowChartMerge",
|
|
129
|
+
"flowChartMultidocument",
|
|
130
|
+
"flowChartOfflineStorage",
|
|
131
|
+
"flowChartOffpageConnector",
|
|
132
|
+
"flowChartOnlineStorage",
|
|
133
|
+
"flowChartOr",
|
|
134
|
+
"flowChartPredefinedProcess",
|
|
135
|
+
"flowChartPreparation",
|
|
136
|
+
"flowChartProcess",
|
|
137
|
+
"flowChartPunchedCard",
|
|
138
|
+
"flowChartPunchedTape",
|
|
139
|
+
"flowChartSort",
|
|
140
|
+
"flowChartSummingJunction",
|
|
141
|
+
"flowChartTerminator",
|
|
142
|
+
"folderCorner",
|
|
143
|
+
"frame",
|
|
144
|
+
"funnel",
|
|
145
|
+
"gear6",
|
|
146
|
+
"gear9",
|
|
147
|
+
"halfFrame",
|
|
148
|
+
"heart",
|
|
149
|
+
"heptagon",
|
|
150
|
+
"hexagon",
|
|
151
|
+
"homePlate",
|
|
152
|
+
"horizontalScroll",
|
|
153
|
+
"irregularSeal1",
|
|
154
|
+
"irregularSeal2",
|
|
155
|
+
"leftArrow",
|
|
156
|
+
"leftArrowCallout",
|
|
157
|
+
"leftBrace",
|
|
158
|
+
"leftBracket",
|
|
159
|
+
"leftCircularArrow",
|
|
160
|
+
"leftRightArrow",
|
|
161
|
+
"leftRightArrowCallout",
|
|
162
|
+
"leftRightCircularArrow",
|
|
163
|
+
"leftRightRibbon",
|
|
164
|
+
"leftRightUpArrow",
|
|
165
|
+
"leftUpArrow",
|
|
166
|
+
"lightningBolt",
|
|
167
|
+
"line",
|
|
168
|
+
"lineInv",
|
|
169
|
+
"mathDivide",
|
|
170
|
+
"mathEqual",
|
|
171
|
+
"mathMinus",
|
|
172
|
+
"mathMultiply",
|
|
173
|
+
"mathNotEqual",
|
|
174
|
+
"mathPlus",
|
|
175
|
+
"moon",
|
|
176
|
+
"noSmoking",
|
|
177
|
+
"nonIsoscelesTrapezoid",
|
|
178
|
+
"notchedRightArrow",
|
|
179
|
+
"octagon",
|
|
180
|
+
"parallelogram",
|
|
181
|
+
"pentagon",
|
|
182
|
+
"pie",
|
|
183
|
+
"pieWedge",
|
|
184
|
+
"plaque",
|
|
185
|
+
"plaqueTabs",
|
|
186
|
+
"plus",
|
|
187
|
+
"quadArrow",
|
|
188
|
+
"quadArrowCallout",
|
|
189
|
+
"rect",
|
|
190
|
+
"ribbon",
|
|
191
|
+
"ribbon2",
|
|
192
|
+
"rightArrow",
|
|
193
|
+
"rightArrowCallout",
|
|
194
|
+
"rightBrace",
|
|
195
|
+
"rightBracket",
|
|
196
|
+
"round1Rect",
|
|
197
|
+
"round2DiagRect",
|
|
198
|
+
"round2SameRect",
|
|
199
|
+
"roundRect",
|
|
200
|
+
"rtTriangle",
|
|
201
|
+
"smileyFace",
|
|
202
|
+
"snip1Rect",
|
|
203
|
+
"snip2DiagRect",
|
|
204
|
+
"snip2SameRect",
|
|
205
|
+
"snipRoundRect",
|
|
206
|
+
"squareTabs",
|
|
207
|
+
"star10",
|
|
208
|
+
"star12",
|
|
209
|
+
"star16",
|
|
210
|
+
"star24",
|
|
211
|
+
"star32",
|
|
212
|
+
"star4",
|
|
213
|
+
"star5",
|
|
214
|
+
"star6",
|
|
215
|
+
"star7",
|
|
216
|
+
"star8",
|
|
217
|
+
"stripedRightArrow",
|
|
218
|
+
"sun",
|
|
219
|
+
"swooshArrow",
|
|
220
|
+
"teardrop",
|
|
221
|
+
"trapezoid",
|
|
222
|
+
"triangle",
|
|
223
|
+
"upArrow",
|
|
224
|
+
"upArrowCallout",
|
|
225
|
+
"upDownArrow",
|
|
226
|
+
"upDownArrowCallout",
|
|
227
|
+
"uturnArrow",
|
|
228
|
+
"verticalScroll",
|
|
229
|
+
"wave",
|
|
230
|
+
"wedgeEllipseCallout",
|
|
231
|
+
"wedgeRectCallout",
|
|
232
|
+
"wedgeRoundRectCallout",
|
|
233
|
+
]);
|
|
54
234
|
// ===== Base Node =====
|
|
55
235
|
const basePOMNodeSchema = z.object({
|
|
56
236
|
yogaNode: z.custom().optional(),
|
|
@@ -69,7 +249,11 @@ export const textNodeSchema = basePOMNodeSchema.extend({
|
|
|
69
249
|
type: z.literal("text"),
|
|
70
250
|
text: z.string(),
|
|
71
251
|
fontPx: z.number().optional(),
|
|
252
|
+
color: z.string().optional(),
|
|
72
253
|
alignText: z.enum(["left", "center", "right"]).optional(),
|
|
254
|
+
bold: z.boolean().optional(),
|
|
255
|
+
fontFamily: z.string().optional(),
|
|
256
|
+
lineSpacingMultiple: z.number().optional(),
|
|
73
257
|
});
|
|
74
258
|
export const imageNodeSchema = basePOMNodeSchema.extend({
|
|
75
259
|
type: z.literal("image"),
|
|
@@ -98,7 +282,7 @@ export const tableNodeSchema = basePOMNodeSchema.extend({
|
|
|
98
282
|
});
|
|
99
283
|
export const shapeNodeSchema = basePOMNodeSchema.extend({
|
|
100
284
|
type: z.literal("shape"),
|
|
101
|
-
shapeType:
|
|
285
|
+
shapeType: shapeTypeSchema,
|
|
102
286
|
text: z.string().optional(),
|
|
103
287
|
fill: fillStyleSchema.optional(),
|
|
104
288
|
line: borderStyleSchema.optional(),
|
|
@@ -161,3 +345,20 @@ export const positionedNodeSchema = z.lazy(() => z.union([
|
|
|
161
345
|
}),
|
|
162
346
|
shapeNodeSchema.merge(positionedBaseSchema),
|
|
163
347
|
]));
|
|
348
|
+
// ===== Master Slide Options =====
|
|
349
|
+
export const pageNumberPositionSchema = z.enum(["left", "center", "right"]);
|
|
350
|
+
export const dateFormatSchema = z.enum(["YYYY/MM/DD", "locale"]);
|
|
351
|
+
export const masterSlideOptionsSchema = z.object({
|
|
352
|
+
header: z.lazy(() => pomNodeSchema).optional(),
|
|
353
|
+
footer: z.lazy(() => pomNodeSchema).optional(),
|
|
354
|
+
pageNumber: z
|
|
355
|
+
.object({
|
|
356
|
+
position: pageNumberPositionSchema,
|
|
357
|
+
})
|
|
358
|
+
.optional(),
|
|
359
|
+
date: z
|
|
360
|
+
.object({
|
|
361
|
+
format: dateFormatSchema,
|
|
362
|
+
})
|
|
363
|
+
.optional(),
|
|
364
|
+
});
|
package/package.json
CHANGED