-
Notifications
You must be signed in to change notification settings - Fork 75
Expand file tree
/
Copy pathtype.ts
More file actions
44 lines (41 loc) · 1.07 KB
/
type.ts
File metadata and controls
44 lines (41 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import { EdgeOptions } from './directives/tg-edge';
import { FilterValue } from './directives/tg-filter';
export type BezierOption = string | Array<number>
export type CssVariable = `--${string}`;
export type AttributeNumber = `${number}` | number;
export type Prefix = `${string}-`;
export type direction = 'vertical' | 'horizon';
export type CustomDirective<T extends string = string> = `${T}-${string}`;
export type TgDirective = CustomDirective<'tg'>;
export interface TgElement {
el: HTMLElement;
top: number;
left: number;
width: number;
height: number;
direction: direction;
size: number;
position: number;
name: string;
from: number;
to: number;
steps: number;
step: number;
mapping: Record<string, string>;
filter: FilterValue;
edge: EdgeOptions;
range: number;
increment: number;
segments: number;
decimals: number;
multiplier: number;
lastValue: string | number | null;
bezier: string | Array<number>
}
export interface Trigger {
start: () => void;
}
export interface TgElementExtraData {
increment?: number;
decimals?: number;
}