@hirokisakabe/pom 5.0.1 → 5.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -0
- package/dist/autoFit/autoFit.d.ts +15 -0
- package/dist/autoFit/autoFit.d.ts.map +1 -0
- package/dist/autoFit/autoFit.js +73 -0
- package/dist/autoFit/freeYogaTree.d.ts +7 -0
- package/dist/autoFit/freeYogaTree.d.ts.map +1 -0
- package/dist/autoFit/freeYogaTree.js +29 -0
- package/dist/autoFit/strategies/reduceFontSize.d.ts +8 -0
- package/dist/autoFit/strategies/reduceFontSize.d.ts.map +1 -0
- package/dist/autoFit/strategies/reduceFontSize.js +56 -0
- package/dist/autoFit/strategies/reduceGapAndPadding.d.ts +7 -0
- package/dist/autoFit/strategies/reduceGapAndPadding.d.ts.map +1 -0
- package/dist/autoFit/strategies/reduceGapAndPadding.js +46 -0
- package/dist/autoFit/strategies/reduceTableRowHeight.d.ts +7 -0
- package/dist/autoFit/strategies/reduceTableRowHeight.d.ts.map +1 -0
- package/dist/autoFit/strategies/reduceTableRowHeight.js +32 -0
- package/dist/autoFit/strategies/uniformScale.d.ts +7 -0
- package/dist/autoFit/strategies/uniformScale.d.ts.map +1 -0
- package/dist/autoFit/strategies/uniformScale.js +108 -0
- package/dist/autoFit/walkTree.d.ts +6 -0
- package/dist/autoFit/walkTree.d.ts.map +1 -0
- package/dist/autoFit/walkTree.js +18 -0
- package/dist/buildPptx.d.ts +1 -0
- package/dist/buildPptx.d.ts.map +1 -1
- package/dist/buildPptx.js +7 -1
- package/dist/calcYogaLayout/calcYogaLayout.js +77 -0
- package/dist/parseXml/inputSchema.d.ts +352 -0
- package/dist/parseXml/inputSchema.d.ts.map +1 -1
- package/dist/parseXml/inputSchema.js +13 -1
- package/dist/parseXml/parseXml.d.ts.map +1 -1
- package/dist/parseXml/parseXml.js +38 -1
- package/dist/renderPptx/renderPptx.d.ts.map +1 -1
- package/dist/renderPptx/renderPptx.js +14 -4
- package/dist/types.d.ts +373 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +21 -0
- package/package.json +1 -1
package/dist/types.js
CHANGED
|
@@ -85,6 +85,15 @@ export const underlineSchema = z.union([
|
|
|
85
85
|
}),
|
|
86
86
|
]);
|
|
87
87
|
export const alignItemsSchema = z.enum(["start", "center", "end", "stretch"]);
|
|
88
|
+
export const alignSelfSchema = z.enum([
|
|
89
|
+
"auto",
|
|
90
|
+
"start",
|
|
91
|
+
"center",
|
|
92
|
+
"end",
|
|
93
|
+
"stretch",
|
|
94
|
+
]);
|
|
95
|
+
export const positionTypeSchema = z.enum(["relative", "absolute"]);
|
|
96
|
+
export const flexWrapSchema = z.enum(["nowrap", "wrap", "wrapReverse"]);
|
|
88
97
|
export const justifyContentSchema = z.enum([
|
|
89
98
|
"start",
|
|
90
99
|
"center",
|
|
@@ -289,11 +298,19 @@ const basePOMNodeSchema = z.object({
|
|
|
289
298
|
minH: z.number().optional(),
|
|
290
299
|
maxH: z.number().optional(),
|
|
291
300
|
padding: paddingSchema.optional(),
|
|
301
|
+
margin: paddingSchema.optional(),
|
|
292
302
|
backgroundColor: z.string().optional(),
|
|
293
303
|
backgroundImage: backgroundImageSchema.optional(),
|
|
294
304
|
border: borderStyleSchema.optional(),
|
|
295
305
|
borderRadius: z.number().optional(),
|
|
296
306
|
opacity: z.number().min(0).max(1).optional(),
|
|
307
|
+
zIndex: z.number().optional(),
|
|
308
|
+
position: positionTypeSchema.optional(),
|
|
309
|
+
top: z.number().optional(),
|
|
310
|
+
right: z.number().optional(),
|
|
311
|
+
bottom: z.number().optional(),
|
|
312
|
+
left: z.number().optional(),
|
|
313
|
+
alignSelf: alignSelfSchema.optional(),
|
|
297
314
|
});
|
|
298
315
|
// ===== Non-recursive Node Types =====
|
|
299
316
|
const textNodeSchema = basePOMNodeSchema.extend({
|
|
@@ -624,6 +641,8 @@ const vStackNodeSchemaBase = basePOMNodeSchema.extend({
|
|
|
624
641
|
gap: z.number().optional(),
|
|
625
642
|
alignItems: alignItemsSchema.optional(),
|
|
626
643
|
justifyContent: justifyContentSchema.optional(),
|
|
644
|
+
shadow: shadowStyleSchema.optional(),
|
|
645
|
+
flexWrap: flexWrapSchema.optional(),
|
|
627
646
|
});
|
|
628
647
|
const hStackNodeSchemaBase = basePOMNodeSchema.extend({
|
|
629
648
|
type: z.literal("hstack"),
|
|
@@ -631,6 +650,8 @@ const hStackNodeSchemaBase = basePOMNodeSchema.extend({
|
|
|
631
650
|
gap: z.number().optional(),
|
|
632
651
|
alignItems: alignItemsSchema.optional(),
|
|
633
652
|
justifyContent: justifyContentSchema.optional(),
|
|
653
|
+
shadow: shadowStyleSchema.optional(),
|
|
654
|
+
flexWrap: flexWrapSchema.optional(),
|
|
634
655
|
});
|
|
635
656
|
const layerChildSchemaBase = z.lazy(() => pomNodeSchema.and(z.object({
|
|
636
657
|
x: z.number(),
|