import { status } from '@synnaxlabs/client'; import { bounds, color, destructor, MultiSeries, observe } from '@synnaxlabs/x'; import { z } from 'zod'; /** * Metadata about a telemetry source. This metadata can be thought of as a pointer * to the underlying telemetry source, and is intended for use as a main thread proxy * to the telemetry source on the worker thread. */ export declare const specZ: z.ZodObject<{ type: z.ZodString; variant: z.ZodEnum<{ source: "source"; sink: "sink"; "source-transformer": "source-transformer"; "sink-transformer": "sink-transformer"; }>; valueType: z.ZodString; props: z.ZodAny; transfer: z.ZodOptional>>; }, z.core.$strip>; export declare const sourceSpecZ: z.ZodObject<{ type: z.ZodString; valueType: z.ZodString; props: z.ZodAny; transfer: z.ZodOptional>>; variant: z.ZodLiteral<"source">; }, z.core.$strip>; export declare const sinkSpecZ: z.ZodObject<{ type: z.ZodString; valueType: z.ZodString; props: z.ZodAny; transfer: z.ZodOptional>>; variant: z.ZodLiteral<"sink">; }, z.core.$strip>; export declare const sourceTransformerSpecZ: z.ZodObject<{ type: z.ZodString; valueType: z.ZodString; props: z.ZodAny; transfer: z.ZodOptional>>; variant: z.ZodLiteral<"source-transformer">; }, z.core.$strip>; export declare const sinkTransformerSpecZ: z.ZodObject<{ type: z.ZodString; valueType: z.ZodString; props: z.ZodAny; transfer: z.ZodOptional>>; variant: z.ZodLiteral<"sink-transformer">; }, z.core.$strip>; /** * Metadata about a telemetry source. This metadata can be thought of as a pointer * to the underlying telemetry source, and is intended for use as a main thread proxy * to the telemetry source on the worker thread. */ export type Spec = z.infer; export type SourceSpec = z.infer & { valueType: V; }; export type SinkSpec = z.infer & { valueType: V; }; export interface ValueProps { onLoad: () => void; } export interface Telem { cleanup?: () => void; } export interface Source extends Telem, observe.Observable { value: (props?: ValueProps) => V; /** @returns true while the source's initial read is in flight. */ loading?: () => boolean; } export interface Sink extends Telem { set: (...values: V[]) => void; } export interface SourceTransformer extends Telem, Source { setSources: (sources: Record>) => void; } export interface SinkTransformer extends Telem, Sink { setSinks: (sinks: Record>) => void; } export type SeriesSource = Source<[bounds.Bounds, MultiSeries]>; export declare const seriesSourceSpecZ: z.ZodObject<{ type: z.ZodString; props: z.ZodAny; transfer: z.ZodOptional>>; variant: z.ZodLiteral<"source">; valueType: z.ZodLiteral<"series">; }, z.core.$strip>; export type SeriesSourceSpec = z.infer; export type BooleanSource = Source; export declare const booleanSourceSpecZ: z.ZodObject<{ type: z.ZodString; props: z.ZodAny; transfer: z.ZodOptional>>; variant: z.ZodLiteral<"source">; valueType: z.ZodLiteral<"boolean">; }, z.core.$strip>; export type BooleanSourceSpec = z.infer; export type BooleanSink = Sink; export declare const booleanSinkSpecZ: z.ZodObject<{ type: z.ZodString; props: z.ZodAny; transfer: z.ZodOptional>>; variant: z.ZodLiteral<"sink">; valueType: z.ZodLiteral<"boolean">; }, z.core.$strip>; export type BooleanSinkSpec = z.infer; export type BooleanSinkTransformer = SinkTransformer; export declare const booleanSinkTransformerSpecZ: z.ZodObject<{ type: z.ZodString; props: z.ZodAny; transfer: z.ZodOptional>>; variant: z.ZodLiteral<"sink-transformer">; valueType: z.ZodLiteral<"boolean">; }, z.core.$strip>; export type BooleanSinkTransformerSpec = z.infer; export type BooleanSourceTransformer = SourceTransformer; export declare const booleanSourceTransformerSpecZ: z.ZodObject<{ type: z.ZodString; props: z.ZodAny; transfer: z.ZodOptional>>; variant: z.ZodLiteral<"source-transformer">; valueType: z.ZodLiteral<"boolean">; }, z.core.$strip>; export type BooleanSourceTransformerSpec = z.infer; export type NumberSource = Source; export declare const numberSourceSpecZ: z.ZodObject<{ type: z.ZodString; props: z.ZodAny; transfer: z.ZodOptional>>; variant: z.ZodLiteral<"source">; valueType: z.ZodLiteral<"number">; }, z.core.$strip>; export type NumberSourceSpec = z.infer; export type NumberSink = Sink; export declare const numberSinkSpecZ: z.ZodObject<{ type: z.ZodString; props: z.ZodAny; transfer: z.ZodOptional>>; variant: z.ZodLiteral<"sink">; valueType: z.ZodLiteral<"number">; }, z.core.$strip>; export type NumberSinkSpec = z.infer; export type ColorSource = Source; export declare const colorSourceSpecZ: z.ZodObject<{ type: z.ZodString; props: z.ZodAny; transfer: z.ZodOptional>>; variant: z.ZodLiteral<"source">; valueType: z.ZodLiteral<"color">; }, z.core.$strip>; export type ColorSourceSpec = z.infer; export type StatusSource
= Source>; export declare const statusSourceSpecZ: z.ZodObject<{ type: z.ZodString; props: z.ZodAny; transfer: z.ZodOptional>>; variant: z.ZodLiteral<"source">; valueType: z.ZodLiteral<"status">; }, z.core.$strip>; export type StatusSourceSpec = z.infer; export type StringSource = Source; export declare const stringSourceSpecZ: z.ZodObject<{ type: z.ZodString; props: z.ZodAny; transfer: z.ZodOptional>>; variant: z.ZodLiteral<"source">; valueType: z.ZodLiteral<"string">; }, z.core.$strip>; export type StringSourceSpec = z.infer; export type StringSink = Sink; export declare const stringSinkSpecZ: z.ZodObject<{ type: z.ZodString; props: z.ZodAny; transfer: z.ZodOptional>>; variant: z.ZodLiteral<"sink">; valueType: z.ZodLiteral<"string">; }, z.core.$strip>; export type StringSinkSpec = z.infer; export declare abstract class Base

extends observe.BaseObserver { private props_; private readonly uProps_; abstract schema: P; constructor(props: unknown); get props(): z.infer

; cleanup(): void; } export declare abstract class AbstractSource

extends Base

{ protected loading_: boolean; loading(): boolean; protected declareLoaded(): void; } export declare abstract class AbstractSink

extends Base

{ } export declare abstract class UnarySourceTransformer extends AbstractSource

implements SourceTransformer { source_: Source | undefined; private get source(); value(): O; onChange(handler: () => void): destructor.Destructor; setSources(sources: Record>): void; protected shouldNotify(_: I): boolean; protected abstract transform(_: I): O; } export declare abstract class MultiSourceTransformer extends AbstractSource

implements SourceTransformer { sources: Record>; value(): O; setSources(sources: Record>): void; protected abstract transform(_: Record): O; } export declare abstract class UnarySinkTransformer extends Base

implements SinkTransformer { sinks: Record>; private get sink(); set(...values: I[]): void; setSinks(sinks: Record>): void; protected abstract transform(..._: I[]): O[]; } //# sourceMappingURL=telem.d.ts.map