camstreamerlib
Version:
Helper library for CamStreamer ACAP applications.
25 lines (24 loc) • 988 B
JavaScript
import { allowedWidgetNames } from './constants';
import { fontSchema, languageSchema, weatherUnitSchema, widgetCommonSchema } from './widgetCommonSchema';
import { z } from 'zod';
export const infoTickerSchema = widgetCommonSchema.extend({
name: z.literal(allowedWidgetNames.infoticker),
showClock: z.union([z.literal(0), z.literal(1)]),
clockType: z.union([z.literal('12h'), z.literal('24h')]),
textColor: z.string(),
bgColor: z.string(),
weatherLocation: z.string(),
weatherLocationName: z.string(),
weatherLang: languageSchema,
weatherUnits: weatherUnitSchema,
numberOfLines: z.number().positive(),
switchingTime: z.number().nonnegative(),
crawlLeft: z.boolean(),
crawlSpeed: z.number(),
coordSystem: z.union([z.literal('top'), z.literal('bottom')]),
pos_y: z.number(),
font: fontSchema,
fontSize: z.number().nonnegative(),
sourceType: z.union([z.literal('text'), z.literal('url')]),
source: z.string(),
});