@hirokisakabe/pom 5.1.0 → 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/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({
@@ -625,6 +642,7 @@ const vStackNodeSchemaBase = basePOMNodeSchema.extend({
625
642
  alignItems: alignItemsSchema.optional(),
626
643
  justifyContent: justifyContentSchema.optional(),
627
644
  shadow: shadowStyleSchema.optional(),
645
+ flexWrap: flexWrapSchema.optional(),
628
646
  });
629
647
  const hStackNodeSchemaBase = basePOMNodeSchema.extend({
630
648
  type: z.literal("hstack"),
@@ -633,6 +651,7 @@ const hStackNodeSchemaBase = basePOMNodeSchema.extend({
633
651
  alignItems: alignItemsSchema.optional(),
634
652
  justifyContent: justifyContentSchema.optional(),
635
653
  shadow: shadowStyleSchema.optional(),
654
+ flexWrap: flexWrapSchema.optional(),
636
655
  });
637
656
  const layerChildSchemaBase = z.lazy(() => pomNodeSchema.and(z.object({
638
657
  x: z.number(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hirokisakabe/pom",
3
- "version": "5.1.0",
3
+ "version": "5.2.0",
4
4
  "description": "AI-friendly PowerPoint generation with a Flexbox layout engine.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",