UNPKG

@expofp/floorplan

Version:

Interactive floor plan library for expos and events

2 lines (1 loc) 629 B
import*as t from"zod/mini";const e=t.strictObject({x:t.number(),y:t.number()});export const BoundsSchema=t.strictObject({leftTop:e,rightBottom:e});const r=t.strictObject({name:t.optional(t.string()),externalId:t.optional(t.string())}).check(t.refine(o=>!!(o.name||o.externalId),"Either name or externalId must be provided"));export const POISelectorsSchema=t.strictObject({booths:t.optional(t.array(r)),exhibitors:t.optional(t.array(r))}).check(t.refine(o=>!!(o.booths?.length||o.exhibitors?.length),"Selector must contain booths or exhibitors")),ZoomToOptionsSchema=t.optional(t.strictObject({padding:t.optional(t.number())}));