ziko 0.63.2 → 0.65.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ziko.cjs +1 -40
- package/dist/ziko.js +1 -40
- package/dist/ziko.min.js +2 -2
- package/dist/ziko.mjs +2 -40
- package/package.json +1 -5
- package/src/--reactivity-deprecated/idea +1 -2
- package/src/data/api/fetchdom.js +27 -27
- package/src/data/api/index.js +4 -4
- package/{types → src}/router/file-based-router/index.d.ts +1 -1
- package/src/router/file-based-router/index.js +6 -30
- package/src/router/utils/index.js +2 -1
- package/src/router/utils/renderer.js +8 -0
- package/types/data/api/index.d.ts +0 -15
- package/types/data/index.d.ts +0 -1
- package/types/data/string/checkers.d.ts +0 -51
- package/types/data/string/converters.d.ts +0 -101
- package/types/data/string/index.d.ts +0 -2
- package/types/global.d.ts +0 -10
- package/types/hooks/index.d.ts +0 -11
- package/types/hooks/use-Thread.d.ts +0 -33
- package/types/hooks/use-derived.d.ts +0 -14
- package/types/hooks/use-event-emitter.d.ts +0 -46
- package/types/hooks/use-favicon.d.ts +0 -41
- package/types/hooks/use-ipc.d.ts +0 -12
- package/types/hooks/use-media-query.d.ts +0 -24
- package/types/hooks/use-reactive.d.ts +0 -14
- package/types/hooks/use-root.d.ts +0 -15
- package/types/hooks/use-state.d.ts +0 -25
- package/types/hooks/use-storage.d.ts +0 -47
- package/types/hooks/use-title.d.ts +0 -37
- package/types/index.d.ts +0 -5
- package/types/math/complex/index.d.ts +0 -54
- package/types/math/functions/index.d.ts +0 -140
- package/types/math/functions/logic/index.d.ts +0 -11
- package/types/math/index.d.ts +0 -3
- package/types/math/mapfun/index.d.ts +0 -87
- package/types/math/utils/index.d.ts +0 -1
- package/types/math/utils/mapfun.d.ts +0 -43
- package/types/time/clocks/clock.d.ts +0 -28
- package/types/time/clocks/index.d.ts +0 -3
- package/types/time/clocks/scheduler.d.ts +0 -42
- package/types/time/clocks/tick.d.ts +0 -26
- package/types/time/decorators/index.d.ts +0 -9
- package/types/time/delay/index.d.ts +0 -12
- package/types/time/ease/index.d.ts +0 -103
- package/types/time/index.d.ts +0 -4
- package/types/time/loop/index.d.ts +0 -50
- /package/{types → src}/router/index.d.ts +0 -0
- /package/{types → src}/router/utils/dynamic-routes-parser.d.ts +0 -0
- /package/{types → src}/router/utils/get-root.d.ts +0 -0
- /package/{types → src}/router/utils/index.d.ts +0 -0
- /package/{types → src}/router/utils/normalize-path.d.ts +0 -0
- /package/{types → src}/router/utils/routes-grouper.d.ts +0 -0
- /package/{types → src}/router/utils/routes-matcher.d.ts +0 -0
package/types/index.d.ts
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
export declare class Complex {
|
|
2
|
-
a: number;
|
|
3
|
-
b: number;
|
|
4
|
-
|
|
5
|
-
constructor(a?: number, b?: number);
|
|
6
|
-
constructor(c: Complex);
|
|
7
|
-
constructor(a:
|
|
8
|
-
{ a: number; b: number } |
|
|
9
|
-
{ a: number; z: number } |
|
|
10
|
-
{ a: number; phi: number } |
|
|
11
|
-
{ b: number; z: number } |
|
|
12
|
-
{ b: number; phi: number } |
|
|
13
|
-
{ z: number; phi: number }
|
|
14
|
-
);
|
|
15
|
-
constructor();
|
|
16
|
-
|
|
17
|
-
isComplex(): true;
|
|
18
|
-
toString(): string;
|
|
19
|
-
readonly __mapfun__ : boolean
|
|
20
|
-
readonly clone: Complex;
|
|
21
|
-
readonly z: number;
|
|
22
|
-
readonly phi: number;
|
|
23
|
-
readonly conj: Complex;
|
|
24
|
-
readonly inv: Complex;
|
|
25
|
-
readonly sqrt: Complex;
|
|
26
|
-
readonly cbrt: Complex;
|
|
27
|
-
readonly log: Complex;
|
|
28
|
-
readonly cos: Complex;
|
|
29
|
-
readonly sin: Complex;
|
|
30
|
-
readonly tan: Complex;
|
|
31
|
-
expo: [number, number];
|
|
32
|
-
|
|
33
|
-
add(...z: (number | Complex)[]): this;
|
|
34
|
-
sub(...z: (number | Complex)[]): this;
|
|
35
|
-
mul(...z: (number | Complex)[]): this;
|
|
36
|
-
div(...z: (number | Complex)[]): this;
|
|
37
|
-
pow(n: number): this;
|
|
38
|
-
nthr(n?: number): Complex;
|
|
39
|
-
|
|
40
|
-
static zero(): Complex;
|
|
41
|
-
static twiddle(K : number, N : number): Complex;
|
|
42
|
-
static fromPolar(z: number, phi: number): Complex;
|
|
43
|
-
|
|
44
|
-
static add(c: Complex, ...z: (number | Complex)[]): Complex;
|
|
45
|
-
static sub(c: Complex, ...z: (number | Complex)[]): Complex;
|
|
46
|
-
static mul(c: Complex, ...z: (number | Complex)[]): Complex;
|
|
47
|
-
static div(c: Complex, ...z: (number | Complex)[]): Complex;
|
|
48
|
-
static pow(c: Complex, n: number): Complex;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
export declare function complex(a: number, b?: number): Complex;
|
|
52
|
-
export declare function complex(a: Complex): Complex;
|
|
53
|
-
export declare function complex(a: object): Complex;
|
|
54
|
-
export declare function complex(): Complex;
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
import type { Complex } from "../complex/index.js";
|
|
2
|
-
import type { MapfunResult, Mappable } from "../utils/mapfun.js";
|
|
3
|
-
|
|
4
|
-
/* -------------------- MapfunWrap -------------------- */
|
|
5
|
-
|
|
6
|
-
type MapfunWrap<F extends (x: any) => any, A extends Mappable[]> =
|
|
7
|
-
A["length"] extends 1
|
|
8
|
-
? MapfunResult<F, A[0]>
|
|
9
|
-
: { [K in keyof A]: MapfunResult<F, A[K]> };
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
/* -------------------- mapfun-based simple operators -------------------- */
|
|
13
|
-
|
|
14
|
-
export declare function abs<A extends Mappable[]>(...x: A):
|
|
15
|
-
MapfunWrap<typeof Math.abs, A>;
|
|
16
|
-
|
|
17
|
-
export declare function sqrt<A extends Mappable[]>(...x: A):
|
|
18
|
-
MapfunWrap<typeof Math.sqrt, A>;
|
|
19
|
-
|
|
20
|
-
export declare function e<A extends Mappable[]>(...x: A):
|
|
21
|
-
MapfunWrap<typeof Math.exp, A>;
|
|
22
|
-
|
|
23
|
-
export declare function ln<A extends Mappable[]>(...x: A):
|
|
24
|
-
MapfunWrap<typeof Math.log, A>;
|
|
25
|
-
|
|
26
|
-
/* ---- Fixed-based operators ---- */
|
|
27
|
-
|
|
28
|
-
export declare function cos<A extends Mappable[]>(...x: A):
|
|
29
|
-
MapfunWrap<typeof Math.cos, A>;
|
|
30
|
-
|
|
31
|
-
export declare function sin<A extends Mappable[]>(...x: A):
|
|
32
|
-
MapfunWrap<Math.sin, A>;
|
|
33
|
-
|
|
34
|
-
export declare function tan<A extends Mappable[]>(...x: A):
|
|
35
|
-
MapfunWrap<Math.tan, A>;
|
|
36
|
-
|
|
37
|
-
export declare function sec<A extends Mappable[]>(...x: A):
|
|
38
|
-
MapfunWrap<Math.sec, A>;
|
|
39
|
-
|
|
40
|
-
export declare function sinc<A extends Mappable[]>(...x: A):
|
|
41
|
-
MapfunWrap<Math.sinc, A>;
|
|
42
|
-
|
|
43
|
-
export declare function csc<A extends Mappable[]>(...x: A):
|
|
44
|
-
MapfunWrap<Math.csc, A>;
|
|
45
|
-
|
|
46
|
-
export declare function cot<A extends Mappable[]>(...x: A):
|
|
47
|
-
MapfunWrap<Math.cot, A>;
|
|
48
|
-
|
|
49
|
-
export declare function acos<A extends Mappable[]>(...x: A):
|
|
50
|
-
MapfunWrap<Math.acos, A>;
|
|
51
|
-
|
|
52
|
-
export declare function asin<A extends Mappable[]>(...x: A):
|
|
53
|
-
MapfunWrap<Math.asin, A>;
|
|
54
|
-
|
|
55
|
-
export declare function atan<A extends Mappable[]>(...x: A):
|
|
56
|
-
MapfunWrap<Math.atan, A>;
|
|
57
|
-
|
|
58
|
-
export declare function acot<A extends Mappable[]>(...x: A):
|
|
59
|
-
MapfunWrap<Math.acot, A>;
|
|
60
|
-
|
|
61
|
-
export declare function cosh<A extends Mappable[]>(...x: A):
|
|
62
|
-
MapfunWrap<Math.cosh, A>;
|
|
63
|
-
|
|
64
|
-
export declare function sinh<A extends Mappable[]>(...x: A):
|
|
65
|
-
MapfunWrap<Math.sinh, A>;
|
|
66
|
-
|
|
67
|
-
export declare function tanh<A extends Mappable[]>(...x: A):
|
|
68
|
-
MapfunWrap<Math.tanh, A>;
|
|
69
|
-
|
|
70
|
-
export declare function coth<A extends Mappable[]>(...x: A):
|
|
71
|
-
MapfunWrap<Math.coth, A>;
|
|
72
|
-
|
|
73
|
-
export declare function acosh<A extends Mappable[]>(...x: A):
|
|
74
|
-
MapfunWrap<Math.acosh, A>;
|
|
75
|
-
|
|
76
|
-
export declare function asinh<A extends Mappable[]>(...x: A):
|
|
77
|
-
MapfunWrap<Math.asinh, A>;
|
|
78
|
-
|
|
79
|
-
export declare function atanh<A extends Mappable[]>(...x: A):
|
|
80
|
-
MapfunWrap<Math.atanh, A>;
|
|
81
|
-
|
|
82
|
-
/* ---- Math wrappers ---- */
|
|
83
|
-
|
|
84
|
-
export declare function ceil<A extends Mappable[]>(...x: A):
|
|
85
|
-
MapfunWrap<typeof Math.ceil, A>;
|
|
86
|
-
|
|
87
|
-
export declare function floor<A extends Mappable[]>(...x: A):
|
|
88
|
-
MapfunWrap<typeof Math.floor, A>;
|
|
89
|
-
|
|
90
|
-
export declare function round<A extends Mappable[]>(...x: A):
|
|
91
|
-
MapfunWrap<typeof Math.round, A>;
|
|
92
|
-
|
|
93
|
-
export declare function sign<A extends Mappable[]>(...x: A):
|
|
94
|
-
MapfunWrap<typeof Math.sign, A>;
|
|
95
|
-
|
|
96
|
-
export declare function sig<A extends Mappable[]>(...x: A):
|
|
97
|
-
MapfunWrap<(n: number) => number, A>;
|
|
98
|
-
|
|
99
|
-
export declare function fact<A extends Mappable[]>(...x: A):
|
|
100
|
-
MapfunWrap<(n: number) => number, A>;
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
/* -------------------- pow -------------------- */
|
|
104
|
-
|
|
105
|
-
export declare function pow(x: number, n: number): number;
|
|
106
|
-
export declare function pow(x: number, n: Complex): Complex;
|
|
107
|
-
export declare function pow(x: number, n: Mappable): any;
|
|
108
|
-
|
|
109
|
-
export declare function pow(x: Complex, n: number): Complex;
|
|
110
|
-
export declare function pow(x: Complex, n: Complex): Complex;
|
|
111
|
-
export declare function pow(x: Complex, n: Mappable): any;
|
|
112
|
-
|
|
113
|
-
export declare function pow(x: Mappable[], n: number): any[];
|
|
114
|
-
export declare function pow(x: Mappable[], n: Mappable[]): any[];
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
/* -------------------- sqrtn -------------------- */
|
|
118
|
-
|
|
119
|
-
export declare function sqrtn(x: number, n: number): number;
|
|
120
|
-
export declare function sqrtn(x: number, n: Mappable): any;
|
|
121
|
-
|
|
122
|
-
export declare function sqrtn(x: Complex, n: number): Complex;
|
|
123
|
-
export declare function sqrtn(x: Complex, n: Mappable): any;
|
|
124
|
-
|
|
125
|
-
export declare function sqrtn(x: Mappable[], n: number): any[];
|
|
126
|
-
export declare function sqrtn(x: Mappable[], n: Mappable[]): any[];
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
/* -------------------- atan2 -------------------- */
|
|
130
|
-
|
|
131
|
-
export declare function atan2(x: number, y: number, rad?: boolean): number;
|
|
132
|
-
export declare function atan2(x: number, y: Mappable, rad?: boolean): any;
|
|
133
|
-
export declare function atan2(x: Mappable, y: number, rad?: boolean): any;
|
|
134
|
-
export declare function atan2(x: Mappable[], y: Mappable[], rad?: boolean): any[];
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
/* -------------------- hypot -------------------- */
|
|
138
|
-
|
|
139
|
-
export declare function hypot(...x: number[]): number;
|
|
140
|
-
export declare function hypot(...x: Mappable[]): any;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Complex } from "../../complex/index.d.ts";
|
|
2
|
-
// import type { Matrix } from "../../matrix/index.d.ts";
|
|
3
|
-
import { Matrix } from '../../../../src/math/matrix/index.js'
|
|
4
|
-
|
|
5
|
-
export declare const not: (x: 0 | 1 | Complex | Matrix) => 0 | 1 | Complex | Matrix;
|
|
6
|
-
export declare const and: (...x: (0 | 1 | Complex | Matrix)[]) => 0 | 1 | Complex | Matrix;
|
|
7
|
-
export declare const or: (...x: (0 | 1 | Complex | Matrix)[]) => 0 | 1 | Complex | Matrix;
|
|
8
|
-
export declare const xor: (...x: (0 | 1 | Complex | Matrix)[]) => 0 | 1 | Complex | Matrix;
|
|
9
|
-
export declare const nand: (...x: (0 | 1 | Complex | Matrix)[]) => 0 | 1 | Complex | Matrix;
|
|
10
|
-
export declare const nor: (...x: (0 | 1 | Complex | Matrix)[]) => 0 | 1 | Complex | Matrix;
|
|
11
|
-
export declare const xnor: (...x: (0 | 1 | Complex | Matrix)[]) => 0 | 1 | Complex | Matrix;
|
package/types/math/index.d.ts
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { Complex } from "../../../src/math/index.js";
|
|
2
|
-
import { Matrix } from "../../../src/math/matrix/index.js";
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Objects that behave like primitives for mapfun,
|
|
6
|
-
* meaning fun(x) is applied directly without recursion.
|
|
7
|
-
*/
|
|
8
|
-
export interface MapfunPrimitiveLike {
|
|
9
|
-
__mapfun__?: boolean;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export type PrimitiveLike =
|
|
13
|
-
| number
|
|
14
|
-
| boolean
|
|
15
|
-
| string
|
|
16
|
-
| bigint
|
|
17
|
-
| undefined
|
|
18
|
-
| null
|
|
19
|
-
| { readonly __mapfun__: boolean };
|
|
20
|
-
|
|
21
|
-
export type Mappable =
|
|
22
|
-
| number
|
|
23
|
-
| string
|
|
24
|
-
| boolean
|
|
25
|
-
| bigint
|
|
26
|
-
| undefined
|
|
27
|
-
| null
|
|
28
|
-
| Matrix
|
|
29
|
-
| MapfunPrimitiveLike
|
|
30
|
-
| any[]
|
|
31
|
-
| Set<any>
|
|
32
|
-
| Map<any, any>
|
|
33
|
-
| object;
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* mapfun transform rules
|
|
37
|
-
*/
|
|
38
|
-
export type MapfunResult<F extends (x: any) => any, T> =
|
|
39
|
-
// Objects with __mapfun__ → treat as primitive (call fun(x))
|
|
40
|
-
// T extends MapfunPrimitiveLike
|
|
41
|
-
// ? ReturnType<F> :
|
|
42
|
-
|
|
43
|
-
// Matrix → always return Matrix (your JS logic rebuilds a new Matrix)
|
|
44
|
-
|
|
45
|
-
T extends PrimitiveLike
|
|
46
|
-
? ReturnType<F> :
|
|
47
|
-
// T extends Complex
|
|
48
|
-
// ? T :
|
|
49
|
-
T extends Matrix
|
|
50
|
-
? T :
|
|
51
|
-
|
|
52
|
-
// Array → deep-map
|
|
53
|
-
T extends Array<infer U>
|
|
54
|
-
? Array<MapfunResult<F, U>> :
|
|
55
|
-
|
|
56
|
-
// Set → deep-map
|
|
57
|
-
T extends Set<infer U>
|
|
58
|
-
? Set<MapfunResult<F, U>> :
|
|
59
|
-
|
|
60
|
-
// Map → deep-map values
|
|
61
|
-
T extends Map<infer K, infer V>
|
|
62
|
-
? Map<K, MapfunResult<F, V>> :
|
|
63
|
-
|
|
64
|
-
// Other objects → recursively map fields
|
|
65
|
-
T extends object
|
|
66
|
-
? { [K in keyof T]: MapfunResult<F, T[K]> } :
|
|
67
|
-
|
|
68
|
-
// Primitive
|
|
69
|
-
ReturnType<F>;
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* If only one argument → return mapped value
|
|
73
|
-
* If multiple → return tuple of mapped values
|
|
74
|
-
*/
|
|
75
|
-
type UnwrapSingle<T extends unknown[]> =
|
|
76
|
-
T extends [infer U] ? U : { [K in keyof T]: T[K] };
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* mapfun main declaration
|
|
80
|
-
*/
|
|
81
|
-
export declare function mapfun<
|
|
82
|
-
F extends (x: any) => any,
|
|
83
|
-
A extends Mappable[]
|
|
84
|
-
>(
|
|
85
|
-
fun: F,
|
|
86
|
-
...values: A
|
|
87
|
-
): UnwrapSingle<{ [K in keyof A]: MapfunResult<F, A[K]> }>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type * from './mapfun'
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import type { Matrix } from "../matrix/index.js";
|
|
2
|
-
import type { Complex } from "../complex/index.js";
|
|
3
|
-
|
|
4
|
-
export type Mappable =
|
|
5
|
-
| number
|
|
6
|
-
| string
|
|
7
|
-
| boolean
|
|
8
|
-
| bigint
|
|
9
|
-
| undefined
|
|
10
|
-
| null
|
|
11
|
-
| Complex
|
|
12
|
-
| Matrix
|
|
13
|
-
| object
|
|
14
|
-
| any[]
|
|
15
|
-
| Set<any>
|
|
16
|
-
| Map<any, any>;
|
|
17
|
-
|
|
18
|
-
export type MapfunResult<F, T> =
|
|
19
|
-
T extends Complex ? ReturnType<F> :
|
|
20
|
-
// T extends Matrix ? Matrix :
|
|
21
|
-
T extends Array<infer U> ? Array<MapfunResult<F, U>> :
|
|
22
|
-
T extends Set<infer U> ? Set<MapfunResult<F, U>> :
|
|
23
|
-
T extends Map<infer K, infer V> ? Map<K, MapfunResult<F, V>> :
|
|
24
|
-
T extends object ? { [K in keyof T]: MapfunResult<F, T[K]> } :
|
|
25
|
-
ReturnType<F>;
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Helper to unwrap single-element tuple
|
|
29
|
-
*/
|
|
30
|
-
type UnwrapSingle<T extends unknown[]> = T extends [infer U] ? U : { [K in keyof T]: T[K] };
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* mapfun:
|
|
34
|
-
* - if multiple values → return tuple
|
|
35
|
-
* - if single value → return mapped value directly
|
|
36
|
-
*/
|
|
37
|
-
export declare function mapfun<
|
|
38
|
-
F extends (x: any) => any,
|
|
39
|
-
A extends Mappable[]
|
|
40
|
-
>(
|
|
41
|
-
fun: F,
|
|
42
|
-
...values: A
|
|
43
|
-
): UnwrapSingle<{ [K in keyof A]: MapfunResult<F, A[K]> }>;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { Tick } from "./tick.js";
|
|
2
|
-
|
|
3
|
-
export interface ClockTickEvent {
|
|
4
|
-
elapsed: number;
|
|
5
|
-
delta: number;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export declare class Clock extends Tick {
|
|
9
|
-
elapsed: number;
|
|
10
|
-
protected _lastTime: number;
|
|
11
|
-
protected _callbacks: Set<(ev: ClockTickEvent) => void>;
|
|
12
|
-
|
|
13
|
-
constructor(tickMs?: number);
|
|
14
|
-
|
|
15
|
-
protected _tick(): void;
|
|
16
|
-
|
|
17
|
-
onTick(
|
|
18
|
-
cb: (ev: ClockTickEvent) => void
|
|
19
|
-
): () => boolean;
|
|
20
|
-
|
|
21
|
-
reset(): void;
|
|
22
|
-
|
|
23
|
-
pause(): void;
|
|
24
|
-
|
|
25
|
-
resume(): void;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export declare function clock(tickMs?: number): Clock;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
export interface TimeTask {
|
|
2
|
-
fn: () => Promise<any> | any;
|
|
3
|
-
delay?: number;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
export type ParallelTasks = TimeTask[];
|
|
7
|
-
|
|
8
|
-
export interface TimeSchedulerOptions {
|
|
9
|
-
repeat?: number;
|
|
10
|
-
loop?: boolean;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export declare class TimeScheduler {
|
|
14
|
-
tasks: (TimeTask | ParallelTasks)[];
|
|
15
|
-
repeat: number;
|
|
16
|
-
loop: boolean;
|
|
17
|
-
|
|
18
|
-
stopped: boolean;
|
|
19
|
-
running: boolean;
|
|
20
|
-
|
|
21
|
-
onStart: (() => void) | null;
|
|
22
|
-
onTask: ((fn: () => Promise<any> | any) => void) | null;
|
|
23
|
-
onEnd: (() => void) | null;
|
|
24
|
-
|
|
25
|
-
constructor(
|
|
26
|
-
tasks?: (TimeTask | ParallelTasks)[],
|
|
27
|
-
options?: TimeSchedulerOptions
|
|
28
|
-
);
|
|
29
|
-
|
|
30
|
-
run(): Promise<void>;
|
|
31
|
-
|
|
32
|
-
stop(): void;
|
|
33
|
-
|
|
34
|
-
addTask(task: TimeTask | ParallelTasks): void;
|
|
35
|
-
|
|
36
|
-
clearTasks(): void;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export declare function Scheduler(
|
|
40
|
-
tasks?: (TimeTask | ParallelTasks)[],
|
|
41
|
-
options?: { repeat?: number | null }
|
|
42
|
-
): TimeScheduler;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export declare class Tick {
|
|
2
|
-
ms: number;
|
|
3
|
-
fn: (self: Tick) => void;
|
|
4
|
-
count: number;
|
|
5
|
-
frame: number;
|
|
6
|
-
id: ReturnType<typeof setInterval> | null;
|
|
7
|
-
running: boolean;
|
|
8
|
-
|
|
9
|
-
constructor(
|
|
10
|
-
fn: (self: Tick) => void,
|
|
11
|
-
ms: number,
|
|
12
|
-
count?: number,
|
|
13
|
-
start?: boolean
|
|
14
|
-
);
|
|
15
|
-
|
|
16
|
-
start(): this;
|
|
17
|
-
stop(): this;
|
|
18
|
-
isRunning(): boolean;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export declare function tick(
|
|
22
|
-
fn: (self: Tick) => void,
|
|
23
|
-
ms: number,
|
|
24
|
-
count?: number,
|
|
25
|
-
start?: boolean
|
|
26
|
-
): Tick;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare function debounce<T extends (...args: any[]) => any>(
|
|
2
|
-
fn: T,
|
|
3
|
-
delay?: number
|
|
4
|
-
): (...args: Parameters<T>) => void;
|
|
5
|
-
|
|
6
|
-
export declare function throttle<T extends (...args: any[]) => any>(
|
|
7
|
-
fn: T,
|
|
8
|
-
delay: number
|
|
9
|
-
): (...args: Parameters<T>) => void;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare const sleep: (ms: number) => Promise<void>;
|
|
2
|
-
|
|
3
|
-
export interface TimeoutResult {
|
|
4
|
-
id: ReturnType<typeof setTimeout>;
|
|
5
|
-
clear: () => void;
|
|
6
|
-
promise: Promise<void>;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export declare function timeout(
|
|
10
|
-
ms: number,
|
|
11
|
-
fn?: () => any
|
|
12
|
-
): TimeoutResult;
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
declare const linear: (t: number) => number;
|
|
2
|
-
|
|
3
|
-
// --- Sin ---
|
|
4
|
-
declare const in_sin: (t: number) => number;
|
|
5
|
-
declare const out_sin: (t: number) => number;
|
|
6
|
-
declare const in_out_sin: (t: number) => number;
|
|
7
|
-
|
|
8
|
-
// --- Quad ---
|
|
9
|
-
declare const in_quad: (t: number) => number;
|
|
10
|
-
declare const out_quad: (t: number) => number;
|
|
11
|
-
declare const in_out_quad: (t: number) => number;
|
|
12
|
-
|
|
13
|
-
// --- Cubic ---
|
|
14
|
-
declare const in_cubic: (t: number) => number;
|
|
15
|
-
declare const out_cubic: (t: number) => number;
|
|
16
|
-
declare const in_out_cubic: (t: number) => number;
|
|
17
|
-
|
|
18
|
-
// --- Quart ---
|
|
19
|
-
declare const in_quart: (t: number) => number;
|
|
20
|
-
declare const out_quart: (t: number) => number;
|
|
21
|
-
declare const in_out_quart: (t: number) => number;
|
|
22
|
-
|
|
23
|
-
// --- Quint ---
|
|
24
|
-
declare const in_quint: (t: number) => number;
|
|
25
|
-
declare const out_quint: (t: number) => number;
|
|
26
|
-
declare const in_out_quint: (t: number) => number;
|
|
27
|
-
|
|
28
|
-
// --- Expo ---
|
|
29
|
-
declare const in_expo: (t: number) => number;
|
|
30
|
-
declare const out_expo: (t: number) => number;
|
|
31
|
-
declare const in_out_expo: (t: number) => number;
|
|
32
|
-
|
|
33
|
-
// --- Circ ---
|
|
34
|
-
declare const in_circ: (t: number) => number;
|
|
35
|
-
declare const out_circ: (t: number) => number;
|
|
36
|
-
declare const in_out_circ: (t: number) => number;
|
|
37
|
-
|
|
38
|
-
// --- Arc ---
|
|
39
|
-
declare const arc: (t: number) => number;
|
|
40
|
-
|
|
41
|
-
// --- Back ---
|
|
42
|
-
declare const back: (t: number, x?: number) => number;
|
|
43
|
-
|
|
44
|
-
// --- Elastic ---
|
|
45
|
-
declare const elastic: (t: number) => number;
|
|
46
|
-
|
|
47
|
-
// --- Back variations ---
|
|
48
|
-
declare const in_back: (t: number, c1?: number, c3?: number) => number;
|
|
49
|
-
declare const out_back: (t: number, c1?: number, c3?: number) => number;
|
|
50
|
-
declare const in_out_back: (t: number, c1?: number, c2?: number) => number;
|
|
51
|
-
|
|
52
|
-
// --- Elastic variations ---
|
|
53
|
-
declare const in_elastic: (t: number, c4?: number) => number;
|
|
54
|
-
declare const out_elastic: (t: number, c4?: number) => number;
|
|
55
|
-
declare const in_out_elastic: (t: number, c5?: number) => number;
|
|
56
|
-
|
|
57
|
-
// --- Bounce ---
|
|
58
|
-
declare const in_bounce: (t: number, n1?: number, d1?: number) => number;
|
|
59
|
-
declare const out_bounce: (t: number, n1?: number, d1?: number) => number;
|
|
60
|
-
declare const in_out_bounce: (t: number, n1?: number, d1?: number) => number;
|
|
61
|
-
|
|
62
|
-
// --- Step & Discret ---
|
|
63
|
-
declare const step: (t: number, steps?: number) => number;
|
|
64
|
-
declare const discret: (t: number, segments?: number) => number;
|
|
65
|
-
|
|
66
|
-
export {
|
|
67
|
-
linear,
|
|
68
|
-
in_sin,
|
|
69
|
-
out_sin,
|
|
70
|
-
in_out_sin,
|
|
71
|
-
in_quad,
|
|
72
|
-
out_quad,
|
|
73
|
-
in_out_quad,
|
|
74
|
-
in_cubic,
|
|
75
|
-
out_cubic,
|
|
76
|
-
in_out_cubic,
|
|
77
|
-
in_quart,
|
|
78
|
-
out_quart,
|
|
79
|
-
in_out_quart,
|
|
80
|
-
in_quint,
|
|
81
|
-
out_quint,
|
|
82
|
-
in_out_quint,
|
|
83
|
-
in_expo,
|
|
84
|
-
out_expo,
|
|
85
|
-
in_out_expo,
|
|
86
|
-
in_circ,
|
|
87
|
-
out_circ,
|
|
88
|
-
in_out_circ,
|
|
89
|
-
arc,
|
|
90
|
-
back,
|
|
91
|
-
elastic,
|
|
92
|
-
in_back,
|
|
93
|
-
out_back,
|
|
94
|
-
in_out_back,
|
|
95
|
-
in_elastic,
|
|
96
|
-
out_elastic,
|
|
97
|
-
in_out_elastic,
|
|
98
|
-
in_bounce,
|
|
99
|
-
out_bounce,
|
|
100
|
-
in_out_bounce,
|
|
101
|
-
step,
|
|
102
|
-
discret
|
|
103
|
-
};
|
package/types/time/index.d.ts
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
export declare class TimeLoop {
|
|
2
|
-
callback: (self: TimeLoop) => void;
|
|
3
|
-
|
|
4
|
-
protected cache: {
|
|
5
|
-
isRunning: boolean;
|
|
6
|
-
id: ReturnType<typeof setTimeout> | null;
|
|
7
|
-
last_tick: number | null;
|
|
8
|
-
step: number;
|
|
9
|
-
t0: number;
|
|
10
|
-
t1: number;
|
|
11
|
-
autoplay: boolean;
|
|
12
|
-
pauseTime: number | null;
|
|
13
|
-
frame: number;
|
|
14
|
-
elapsed?: number;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
constructor(
|
|
18
|
-
callback: (self: TimeLoop) => void,
|
|
19
|
-
options?: {
|
|
20
|
-
step?: number;
|
|
21
|
-
t0?: number;
|
|
22
|
-
t1?: number;
|
|
23
|
-
autoplay?: boolean;
|
|
24
|
-
}
|
|
25
|
-
);
|
|
26
|
-
|
|
27
|
-
get frame(): number;
|
|
28
|
-
|
|
29
|
-
get elapsed(): number | undefined;
|
|
30
|
-
|
|
31
|
-
start(): this;
|
|
32
|
-
pause(): this;
|
|
33
|
-
resume(): this;
|
|
34
|
-
stop(): this;
|
|
35
|
-
|
|
36
|
-
startAfter(t?: number): this;
|
|
37
|
-
stopAfter(t?: number): this;
|
|
38
|
-
|
|
39
|
-
protected animate: () => void;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export declare function loop(
|
|
43
|
-
callback: (self: TimeLoop) => void,
|
|
44
|
-
options?: {
|
|
45
|
-
step?: number;
|
|
46
|
-
t0?: number;
|
|
47
|
-
t1?: number;
|
|
48
|
-
autoplay?: boolean;
|
|
49
|
-
}
|
|
50
|
-
): TimeLoop;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|