import { NextChannel, Observable, Subscription } from 'indefinite-observable'; export { Connect, Disconnect, NextChannel, Observable, Observer, ObserverOrNext, Subscription } from 'indefinite-observable'; export { MotionAddable, MotionAppendUnitable, MotionClampable, MotionDebounceable, MotionDeduplicable, MotionDivisible, MotionFilterable, MotionFlattenable, MotionInvertible, MotionIsAnyOfable, MotionLoggable, MotionMappable, MotionMathOperable, MotionMeasurable, MotionMemorable, MotionMergeable, MotionMulticastable, MotionMultipliable, MotionNextOperable, MotionPluckable, MotionPolarizable, MotionReactiveMappable, MotionReactiveNextOperable, MotionReadable, MotionRenameable, MotionRewritable, MotionRewriteRangeable, MotionRewriteToable, MotionSeedable, MotionSubtractable, MotionTappable, MotionThresholdRangeable, MotionThresholdable, MotionTimestampable, MotionWindowable, ObservableWithFoundationalMotionOperators, ObservableWithMotionOperators } from './operators'; import { ObservableWithMotionOperators } from './operators'; import { State } from './enums'; export declare type Constructor = new (...args: Array) => T; export declare type Predicate = (value: T) => boolean; export interface Subject extends Observable { next(value: T): void; } export declare type Operation = (values: { upstream: T; } & D) => void; export declare type EmittingOperation = (kwargs: { emit: NextChannel; }) => Operation; export declare type MathOperation = (a: number, b: number) => number; export declare type Dimensions = { width: number; height: number; }; export declare type Point2D = { x: number; y: number; }; export declare type PolarCoords = { angle: number; distance: number; }; export interface Spring { readonly destination$: ObservableWithMotionOperators; destination: T; readonly initialValue$: ObservableWithMotionOperators; initialValue: T; readonly initialVelocity$: ObservableWithMotionOperators; initialVelocity: T; readonly stiffness$: ObservableWithMotionOperators; stiffness: number; readonly damping$: ObservableWithMotionOperators; damping: number; readonly threshold$: ObservableWithMotionOperators; threshold: number; readonly enabled$: ObservableWithMotionOperators; enabled: boolean; readonly state$: ObservableWithMotionOperators; readonly state: State; value$: ObservableWithMotionOperators; } /** * There are 2 competing input events on the Web: `PointerEvent`s and * `TouchEvent`s. Our gesture system only needs 4 properties: x, y, type and an * ID. In both models, x and y are provided (both relative to the page and the * viewport). `TouchEvent` calls its ID `identifier`; whereas, `PointerEvent` * uses `pointerId`. * * `PartialPointerEvent` is the subset we care about. `PointerEvent` already * has this shape. `TouchEvent` can be trivially converted by extracting the * touches and renaming `identifier` to `pointerId`. */ export declare type PartialPointerEvent = Point2D & { pointerId?: number; type: string; }; export declare type PointerEventStreams = { down$: ObservableWithMotionOperators; move$: ObservableWithMotionOperators; up$: ObservableWithMotionOperators; cancel$: ObservableWithMotionOperators; contextMenu$: ObservableWithMotionOperators; capturedClick$: ObservableWithMotionOperators; capturedDragStart$: ObservableWithMotionOperators; }; export declare type Read = () => T; export interface ScopedReadable { read: Read; } export declare type Write = (value: T) => void; export interface ScopedWritable { write: Write; } export declare type TouchActionStyleStreams = { readonly touchAction$: ObservableWithMotionOperators; }; export declare type WillChangeStyleStreams = { readonly willChange$: ObservableWithMotionOperators; }; export declare type DimensionsStyleStreams = WillChangeStyleStreams & { readonly dimensions$: ObservableWithMotionOperators>; }; export declare type TranslateStyleStreams = WillChangeStyleStreams & { readonly translate$: ObservableWithMotionOperators>; }; export declare type RotateStyleStreams = WillChangeStyleStreams & { readonly rotate$: ObservableWithMotionOperators; }; export declare type ScaleStyleStreams = WillChangeStyleStreams & { readonly scale$: ObservableWithMotionOperators; }; export declare type OpacityStyleStreams = WillChangeStyleStreams & { readonly opacity$: ObservableWithMotionOperators; }; export declare type BoxShadowStyleStreams = { readonly boxShadow$: ObservableWithMotionOperators; }; export declare type BorderRadiusStyleStreams = { readonly borderRadius$: ObservableWithMotionOperators | Array>; }; export declare type StyleStreams = TouchActionStyleStreams & WillChangeStyleStreams & DimensionsStyleStreams & TranslateStyleStreams & ScaleStyleStreams & OpacityStyleStreams & BoxShadowStyleStreams & BorderRadiusStyleStreams; export declare type EqualityCheck = (a: any, b: any) => boolean; export interface Timestamped { value: T; timestamp: number; } export declare type MaybeReactive = { [K in keyof D]: D[K] | Observable; }; /** * `Array` has both members and methods. `MaybeReactive` iterates over all the * keys in an object. `MaybeReactive>` allows you to * represent an array with potentially reactive members without worrying about * the methods. */ export declare type NumericallyKeyed = { [index: number]: T; }; export declare type Dict = { [index: string]: T; }; export declare type NumericDict = Dict; export declare type StreamDict = Dict>; export declare type SubjectDict = Dict>; export declare type SubscriptionDict = Dict;