Add printable guest sign studio and refine event imagery
This commit is contained in:
@@ -173,10 +173,20 @@ export const completePhotoInputSchema = z.object({
|
||||
photoId: z.string().uuid(),
|
||||
});
|
||||
|
||||
export const BANNER_ASPECT_RATIO = 8 / 3;
|
||||
export const bannerCropSchema = z.object({
|
||||
x: z.number().finite().min(0).max(100),
|
||||
y: z.number().finite().min(0).max(100),
|
||||
width: z.number().finite().positive().max(100),
|
||||
height: z.number().finite().positive().max(100),
|
||||
}).refine((crop) => crop.x + crop.width <= 100.001 && crop.y + crop.height <= 100.001, "Crop must fit inside the image");
|
||||
export type BannerCrop = z.infer<typeof bannerCropSchema>;
|
||||
|
||||
export const createBannerInputSchema = z.object({
|
||||
eventId: z.string().uuid(),
|
||||
contentType: allowedImageTypeSchema,
|
||||
byteSize: z.number().int().positive().max(MAX_PHOTO_BYTES),
|
||||
crop: bannerCropSchema.optional(),
|
||||
});
|
||||
export const bannerInputSchema = z.object({
|
||||
eventId: z.string().uuid(),
|
||||
|
||||
Reference in New Issue
Block a user