camstreamerlib
Version:
Helper library for CamStreamer ACAP applications.
27 lines (26 loc) • 1.25 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ptzCompassSchema = void 0;
const constants_1 = require("./constants");
const widgetCommonSchema_1 = require("./widgetCommonSchema");
const zod_1 = require("zod");
exports.ptzCompassSchema = widgetCommonSchema_1.widgetCommonSchema.extend({
name: zod_1.z.literal(constants_1.allowedWidgetNames.ptzCompass),
pos_x: zod_1.z.number(),
pos_y: zod_1.z.number(),
coordSystem: widgetCommonSchema_1.coordinateSystemSchema,
scale: zod_1.z.number().nonnegative(),
type: zod_1.z.union([zod_1.z.literal('compass'), zod_1.z.literal('map'), zod_1.z.literal('image')]),
image: zod_1.z.union([zod_1.z.string().url(), zod_1.z.literal('')]),
northPan: zod_1.z.number(),
cameraPosX: zod_1.z.number(),
cameraPosY: zod_1.z.number(),
colorScheme: zod_1.z.enum(['black', 'white', 'orange']),
generalLng: zod_1.z.number().optional(),
generalLat: zod_1.z.number().optional(),
generalZoom: zod_1.z.number().nonnegative().optional(),
generalMapType: zod_1.z.string().optional(),
generalIframeWidth: zod_1.z.number().optional(),
generalIframeHeight: zod_1.z.number().optional(),
generalAddress: zod_1.z.string().optional(),
});