@purpleschool/gptbot 0.8.8 → 0.8.9

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.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PPTXExportPayloadSchema = exports.PPTXSlideSchema = exports.SlideBackground = exports.PPTXShapeSchema = exports.PPTXTableShapeSchema = exports.PPTXTableRowSchema = exports.PPTXTableCellSchema = exports.PPTXCustomShapeSchema = exports.PPTXPictureBoxSchema = exports.PPTXTextBoxSchema = exports.PPTXParagraphSchema = exports.PPTXFontSchema = exports.PPTXPositionSchema = exports.PPTXMarginSchema = exports.PPTXFillSchema = exports.PPTXShadowSchema = exports.PPTX_CUSTOM_SHAPE_TYPE = exports.PPTX_SHADOW_TYPE = exports.PPTX_FILL_TYPE = exports.PPTX_BORDER_TYPE = exports.PPTX_OBJECT_FIT = exports.PPTX_V_ALIGN = exports.PPTX_H_ALIGN = exports.PPTX_SHAPE_TYPE = void 0;
3
+ exports.PPTXExportPayloadSchema = exports.PPTXSlideSchema = exports.SlideBackground = exports.PPTXShapeSchema = exports.PPTXChevronShapeSchema = exports.PPTXTableShapeSchema = exports.PPTXTableRowSchema = exports.PPTXTableCellSchema = exports.PPTXCustomShapeSchema = exports.PPTXPictureBoxSchema = exports.PPTXTextBoxSchema = exports.PPTXParagraphSchema = exports.PPTXFontSchema = exports.PPTXPositionSchema = exports.PPTXMarginSchema = exports.PPTXFillSchema = exports.PPTXShadowSchema = exports.PPTX_CUSTOM_SHAPE_TYPE = exports.PPTX_SHADOW_TYPE = exports.PPTX_FILL_TYPE = exports.PPTX_BORDER_TYPE = exports.PPTX_OBJECT_FIT = exports.PPTX_V_ALIGN = exports.PPTX_H_ALIGN = exports.PPTX_ARROW_TYPE = exports.PPTX_CHEVRON_DIRECTION = exports.PPTX_SHAPE_TYPE = void 0;
4
4
  const zod_1 = require("zod");
5
5
  var PPTX_SHAPE_TYPE;
6
6
  (function (PPTX_SHAPE_TYPE) {
@@ -8,7 +8,22 @@ var PPTX_SHAPE_TYPE;
8
8
  PPTX_SHAPE_TYPE["PICTURE_BOX"] = "picture_box";
9
9
  PPTX_SHAPE_TYPE["CUSTOM_SHAPE"] = "custom_shape";
10
10
  PPTX_SHAPE_TYPE["TABLE"] = "table";
11
+ PPTX_SHAPE_TYPE["CHEVRON"] = "chevron";
11
12
  })(PPTX_SHAPE_TYPE || (exports.PPTX_SHAPE_TYPE = PPTX_SHAPE_TYPE = {}));
13
+ var PPTX_CHEVRON_DIRECTION;
14
+ (function (PPTX_CHEVRON_DIRECTION) {
15
+ PPTX_CHEVRON_DIRECTION["RIGHT"] = "right";
16
+ PPTX_CHEVRON_DIRECTION["LEFT"] = "left";
17
+ PPTX_CHEVRON_DIRECTION["UP"] = "up";
18
+ PPTX_CHEVRON_DIRECTION["DOWN"] = "down";
19
+ })(PPTX_CHEVRON_DIRECTION || (exports.PPTX_CHEVRON_DIRECTION = PPTX_CHEVRON_DIRECTION = {}));
20
+ var PPTX_ARROW_TYPE;
21
+ (function (PPTX_ARROW_TYPE) {
22
+ PPTX_ARROW_TYPE["RIGHT"] = "rightArrow";
23
+ PPTX_ARROW_TYPE["LEFT"] = "leftArrow";
24
+ PPTX_ARROW_TYPE["UP"] = "upArrow";
25
+ PPTX_ARROW_TYPE["DOWN"] = "downArrow";
26
+ })(PPTX_ARROW_TYPE || (exports.PPTX_ARROW_TYPE = PPTX_ARROW_TYPE = {}));
12
27
  var PPTX_H_ALIGN;
13
28
  (function (PPTX_H_ALIGN) {
14
29
  PPTX_H_ALIGN["LEFT"] = "left";
@@ -161,12 +176,30 @@ exports.PPTXTableShapeSchema = zod_1.z.object({
161
176
  px: zod_1.z.number(),
162
177
  }),
163
178
  });
179
+ // Chevron
180
+ exports.PPTXChevronShapeSchema = zod_1.z.object({
181
+ type: zod_1.z.literal(PPTX_SHAPE_TYPE.CHEVRON),
182
+ direction: zod_1.z.nativeEnum(PPTX_CHEVRON_DIRECTION).default(PPTX_CHEVRON_DIRECTION.RIGHT),
183
+ position: exports.PPTXPositionSchema,
184
+ fill: exports.PPTXFillSchema.optional(),
185
+ text: zod_1.z.string().optional(),
186
+ font: exports.PPTXFontSchema.optional(),
187
+ align: zod_1.z
188
+ .nativeEnum(PPTX_H_ALIGN)
189
+ .optional()
190
+ .default('center'),
191
+ valign: zod_1.z
192
+ .nativeEnum(PPTX_V_ALIGN)
193
+ .optional()
194
+ .default('middle'),
195
+ });
164
196
  // Overview
165
197
  exports.PPTXShapeSchema = zod_1.z.discriminatedUnion('type', [
166
198
  exports.PPTXTextBoxSchema,
167
199
  exports.PPTXPictureBoxSchema,
168
200
  exports.PPTXCustomShapeSchema,
169
201
  exports.PPTXTableShapeSchema,
202
+ exports.PPTXChevronShapeSchema,
170
203
  ]);
171
204
  exports.SlideBackground = zod_1.z.union([
172
205
  exports.PPTXFillSchema,
@@ -5,8 +5,22 @@ export enum PPTX_SHAPE_TYPE {
5
5
  PICTURE_BOX = 'picture_box',
6
6
  CUSTOM_SHAPE = 'custom_shape',
7
7
  TABLE = 'table',
8
+ CHEVRON = 'chevron',
8
9
  }
9
10
 
11
+ export enum PPTX_CHEVRON_DIRECTION {
12
+ RIGHT = 'right',
13
+ LEFT = 'left',
14
+ UP = 'up',
15
+ DOWN = 'down',
16
+ }
17
+
18
+ export enum PPTX_ARROW_TYPE {
19
+ RIGHT = 'rightArrow',
20
+ LEFT = 'leftArrow',
21
+ UP = 'upArrow',
22
+ DOWN = 'downArrow',
23
+ }
10
24
  export enum PPTX_H_ALIGN {
11
25
  LEFT = 'left',
12
26
  CENTER = 'center',
@@ -182,6 +196,25 @@ export const PPTXTableShapeSchema = z.object({
182
196
  });
183
197
  export type PPTXTableShape = z.infer<typeof PPTXTableShapeSchema>;
184
198
 
199
+ // Chevron
200
+ export const PPTXChevronShapeSchema = z.object({
201
+ type: z.literal(PPTX_SHAPE_TYPE.CHEVRON),
202
+ direction: z.nativeEnum(PPTX_CHEVRON_DIRECTION).default(PPTX_CHEVRON_DIRECTION.RIGHT),
203
+ position: PPTXPositionSchema,
204
+ fill: PPTXFillSchema.optional(),
205
+ text: z.string().optional(),
206
+ font: PPTXFontSchema.optional(),
207
+ align: z
208
+ .nativeEnum(PPTX_H_ALIGN)
209
+ .optional()
210
+ .default('center' as PPTX_H_ALIGN),
211
+ valign: z
212
+ .nativeEnum(PPTX_V_ALIGN)
213
+ .optional()
214
+ .default('middle' as PPTX_V_ALIGN),
215
+ });
216
+ export type PPTXChevronShape = z.infer<typeof PPTXChevronShapeSchema>;
217
+
185
218
  // Overview
186
219
 
187
220
  export const PPTXShapeSchema = z.discriminatedUnion('type', [
@@ -189,6 +222,7 @@ export const PPTXShapeSchema = z.discriminatedUnion('type', [
189
222
  PPTXPictureBoxSchema,
190
223
  PPTXCustomShapeSchema,
191
224
  PPTXTableShapeSchema,
225
+ PPTXChevronShapeSchema,
192
226
  ]);
193
227
  export type PPTXShape = z.infer<typeof PPTXShapeSchema>;
194
228
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@purpleschool/gptbot",
3
- "version": "0.8.8",
3
+ "version": "0.8.9",
4
4
  "description": "",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",