@tspro/ts-utils-lib 1.17.0 → 1.18.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/index.d.mts CHANGED
@@ -1,8 +1,207 @@
1
+ type EnumObject = Record<string, string | number>;
2
+ type EnumKey<E extends EnumObject> = keyof E;
3
+ type EnumValue<E extends EnumObject> = E[EnumKey<E>];
4
+ declare function getEnumKeys<E extends EnumObject>(e: E): EnumKey<E>[];
5
+ declare function getEnumValues<E extends EnumObject>(e: E): EnumValue<E>[];
6
+ declare function getEnumEntries<E extends EnumObject>(e: E): [keyof E, EnumValue<E>][];
7
+ declare function getEnumKey<E extends EnumObject>(e: E, value: EnumValue<E>): keyof E | undefined;
8
+ declare function forEachEnum<E extends EnumObject>(e: E, callback: (key: keyof E, value: E[keyof E]) => void): void;
9
+ declare function isEnumValue$2<E extends EnumObject>(e: E, value: unknown): value is EnumValue<E>;
10
+ declare function assertEnumValue<E extends EnumObject>(e: E, value: unknown): asserts value is EnumValue<E>;
11
+
12
+ type index$8_EnumKey<E extends EnumObject> = EnumKey<E>;
13
+ type index$8_EnumObject = EnumObject;
14
+ type index$8_EnumValue<E extends EnumObject> = EnumValue<E>;
15
+ declare const index$8_assertEnumValue: typeof assertEnumValue;
16
+ declare const index$8_forEachEnum: typeof forEachEnum;
17
+ declare const index$8_getEnumEntries: typeof getEnumEntries;
18
+ declare const index$8_getEnumKey: typeof getEnumKey;
19
+ declare const index$8_getEnumKeys: typeof getEnumKeys;
20
+ declare const index$8_getEnumValues: typeof getEnumValues;
21
+ declare namespace index$8 {
22
+ export { type index$8_EnumKey as EnumKey, type index$8_EnumObject as EnumObject, type index$8_EnumValue as EnumValue, index$8_assertEnumValue as assertEnumValue, index$8_forEachEnum as forEachEnum, index$8_getEnumEntries as getEnumEntries, index$8_getEnumKey as getEnumKey, index$8_getEnumKeys as getEnumKeys, index$8_getEnumValues as getEnumValues, isEnumValue$2 as isEnumValue };
23
+ }
24
+
25
+ type ErrorConstructor = new (msg: string) => Error;
26
+ declare function setErrorClass(errorClass?: ErrorConstructor): void;
27
+ /** @deprecated */
28
+ declare function interrupt(msg?: string): never;
29
+ /** @deprecated */
30
+ declare function assertEnum<E extends EnumObject>(enumVal: unknown, enumObj: E, name?: string): asserts enumVal is E[keyof E];
31
+ /** @deprecated */
32
+ declare function int(value: unknown, msg?: string): number;
33
+ /** @deprecated */
34
+ declare function eq<T>(value1: T, value2: T, msg?: string): T;
35
+ /** @deprecated */
36
+ declare function int_eq(value: unknown, compareTo: unknown, msg?: string): number;
37
+ /** @deprecated */
38
+ declare function int_lt(value: unknown, compareTo: unknown, msg?: string): number;
39
+ /** @deprecated */
40
+ declare function int_lte(value: unknown, compareTo: unknown, msg?: string): number;
41
+ /** @deprecated */
42
+ declare function int_gt(value: unknown, compareTo: unknown, msg?: string): number;
43
+ /** @deprecated */
44
+ declare function int_gte(value: unknown, compareTo: unknown, msg?: string): number;
45
+ /** @deprecated */
46
+ declare function int_between(value: unknown, min: unknown, max: unknown, msg?: string): number;
47
+ /** @deprecated */
48
+ declare function int_between_exclusive(value: unknown, min: unknown, max: unknown, msg?: string): number;
49
+ /** @deprecated */
50
+ declare function odd(value: unknown, msg?: string): number;
51
+ /** @deprecated */
52
+ declare function even(value: unknown, msg?: string): number;
53
+ /** @deprecated */
54
+ declare function in_group<T>(value: T, group: ReadonlyArray<T>, msg?: string): T;
55
+ /** @deprecated */
56
+ declare function finite(value: unknown, msg?: string): number;
57
+ /** @deprecated */
58
+ declare function array_id<T>(array: Readonly<T[]>, index: unknown, msg?: string): number;
59
+ /** @deprecated */
60
+ declare function array_elem<T>(array: Readonly<T[]>, index: number, msg?: string): T;
61
+ declare function assert<T>(condition: T, msg?: string): void;
62
+ declare function require<T>(value: T | null | undefined, msg?: string): T;
63
+ declare function requireDefined<T>(value: T | undefined, msg?: string): T;
64
+ declare function fail(msg?: string): never;
65
+ declare function isEqual$1(value1: unknown, value2: unknown, msg?: string): boolean;
66
+ declare function isDeepEqual$1(value1: unknown, value2: unknown, msg?: string): boolean;
67
+ declare function isUndefined$1(value: unknown, msg?: string): value is undefined;
68
+ declare function isNull$1(value: unknown, msg?: string): value is null;
69
+ declare function isNullish$1(value: unknown, msg?: string): value is null | undefined;
70
+ declare function isObject$1(value: unknown, msg?: string): value is Record<string, unknown>;
71
+ declare function isObjectOrUndefined$1(value: unknown, msg?: string): value is Record<string, unknown> | undefined;
72
+ declare function isTypedObject$1<T extends object>(obj: unknown, keys: (keyof T)[], msg?: string): obj is HasProps<T>;
73
+ declare function isArray$1<T>(value: T[] | unknown, msg?: string): value is T[];
74
+ declare function isArrayOrUndefined$1(value: unknown, msg?: string): value is unknown[] | undefined;
75
+ declare function isEmptyArray$1<T>(value: T[] | unknown, msg?: string): value is T[];
76
+ declare function isNonEmptyArray$1<T>(value: T[] | unknown, msg?: string): value is T[];
77
+ declare function isEmptyArrayOrUndefined$1<T>(value: T[] | unknown, msg?: string): value is T[] | undefined;
78
+ declare function isNonEmptyArrayOrUndefined$1<T>(value: T[] | unknown, msg?: string): value is T[] | undefined;
79
+ declare function isString$1(value: unknown, msg?: string): value is string;
80
+ declare function isEmptyString$1(value: unknown, msg?: string): value is "";
81
+ declare function isNonEmptyString$1(value: unknown, msg?: string): value is string;
82
+ declare function isStringOrUndefined$1(value: unknown, msg?: string): value is string | undefined;
83
+ declare function isEmptyStringOrUndefined$1(value: unknown, msg?: string): value is "" | undefined;
84
+ declare function isNonEmptyStringOrUndefined$1(value: unknown, msg?: string): value is string | undefined;
85
+ declare function isBoolean$1(value: unknown, msg?: string): value is boolean;
86
+ declare function isBooleanOrUndefined$1(value: unknown, msg?: string): value is boolean | undefined;
87
+ declare function isTrue$1(value: unknown, msg?: string): value is boolean;
88
+ declare function isTrueOrUndefined$1(value: unknown, msg?: string): value is boolean;
89
+ declare function isFalse$1(value: unknown, msg?: string): value is boolean;
90
+ declare function isFalseOrUndefined$1(value: unknown, msg?: string): value is boolean;
91
+ declare function isFunction$1(value: unknown, msg?: string): value is Function;
92
+ declare function isFunctionOrUndefined$1(value: unknown, msg?: string): value is Function | undefined;
93
+ declare function isEnumValue$1<E extends EnumObject>(enumValue: unknown, enumObject: E, msg?: string): enumValue is E[keyof E];
94
+ declare function isEnumValueOrUndefined$1<E extends EnumObject>(enumValue: unknown, enumObject: E, msg?: string): enumValue is E[keyof E];
95
+ declare function isNumber$1(value: unknown, msg?: string): value is number;
96
+ declare function isNumberOrUndefined$1(value: unknown, msg?: string): value is number | undefined;
97
+ declare function isFinite$1(value: unknown, msg?: string): value is number;
98
+ declare function isInteger$1(value: unknown, msg?: string): value is number;
99
+ declare function isIntegerOrUndefined$1(value: unknown, msg?: string): value is number | undefined;
100
+ declare function isIntegerEq$1(value: unknown, compareTo: unknown, msg?: string): value is number;
101
+ declare function isIntegerGt$1(value: unknown, compareTo: unknown, msg?: string): value is number;
102
+ declare function isIntegerGte$1(value: unknown, compareTo: unknown, msg?: string): value is number;
103
+ declare function isIntegerLt$1(value: unknown, compareTo: unknown, msg?: string): value is number;
104
+ declare function isIntegerLte$1(value: unknown, compareTo: unknown, msg?: string): value is number;
105
+ declare function isIntegerBetween$1(value: unknown, min: unknown, max: unknown, msg?: string): value is number;
106
+ declare function isIntegerBetweenExclusive$1(value: unknown, min: unknown, max: unknown, msg?: string): value is number;
107
+ declare function isNumberBetween$1(value: unknown, min: unknown, max: unknown, msg?: string): value is number;
108
+ declare function isNumberBetweenExclusive$1(value: unknown, min: unknown, max: unknown, msg?: string): value is number;
109
+ declare function isNaNValue$1(value: unknown, msg?: string): value is number;
110
+ declare function isInfinity$1(value: unknown, msg?: string): value is number;
111
+ declare function isPosInfinity$1(value: unknown, msg?: string): value is number;
112
+ declare function isNegInfinity$1(value: unknown, msg?: string): value is number;
113
+ declare function isOddNumber$1(value: unknown, msg?: string): value is number;
114
+ declare function isEvenNumber$1(value: unknown, msg?: string): value is number;
115
+ declare function isIncluded$1<T>(value: T, array: ReadonlyArray<T>, msg?: string): value is T;
116
+ declare function isArrayIndex$1<T>(index: unknown, array: ReadonlyArray<T>, msg?: string): index is number;
117
+ declare function isThrowing$1(throwTestFn: () => void, msg?: string): true;
118
+
119
+ type index$7_ErrorConstructor = ErrorConstructor;
120
+ declare const index$7_array_elem: typeof array_elem;
121
+ declare const index$7_array_id: typeof array_id;
122
+ declare const index$7_assert: typeof assert;
123
+ declare const index$7_assertEnum: typeof assertEnum;
124
+ declare const index$7_eq: typeof eq;
125
+ declare const index$7_even: typeof even;
126
+ declare const index$7_fail: typeof fail;
127
+ declare const index$7_finite: typeof finite;
128
+ declare const index$7_in_group: typeof in_group;
129
+ declare const index$7_int: typeof int;
130
+ declare const index$7_int_between: typeof int_between;
131
+ declare const index$7_int_between_exclusive: typeof int_between_exclusive;
132
+ declare const index$7_int_eq: typeof int_eq;
133
+ declare const index$7_int_gt: typeof int_gt;
134
+ declare const index$7_int_gte: typeof int_gte;
135
+ declare const index$7_int_lt: typeof int_lt;
136
+ declare const index$7_int_lte: typeof int_lte;
137
+ declare const index$7_interrupt: typeof interrupt;
138
+ declare const index$7_odd: typeof odd;
139
+ declare const index$7_require: typeof require;
140
+ declare const index$7_requireDefined: typeof requireDefined;
141
+ declare const index$7_setErrorClass: typeof setErrorClass;
142
+ declare namespace index$7 {
143
+ export { type index$7_ErrorConstructor as ErrorConstructor, index$7_array_elem as array_elem, index$7_array_id as array_id, index$7_assert as assert, index$7_assertEnum as assertEnum, index$7_eq as eq, index$7_even as even, index$7_fail as fail, index$7_finite as finite, index$7_in_group as in_group, index$7_int as int, index$7_int_between as int_between, index$7_int_between_exclusive as int_between_exclusive, index$7_int_eq as int_eq, index$7_int_gt as int_gt, index$7_int_gte as int_gte, index$7_int_lt as int_lt, index$7_int_lte as int_lte, index$7_interrupt as interrupt, isArray$1 as isArray, isArrayIndex$1 as isArrayIndex, isArrayOrUndefined$1 as isArrayOrUndefined, isBoolean$1 as isBoolean, isBooleanOrUndefined$1 as isBooleanOrUndefined, isDeepEqual$1 as isDeepEqual, isEmptyArray$1 as isEmptyArray, isEmptyArrayOrUndefined$1 as isEmptyArrayOrUndefined, isEmptyString$1 as isEmptyString, isEmptyStringOrUndefined$1 as isEmptyStringOrUndefined, isEnumValue$1 as isEnumValue, isEnumValueOrUndefined$1 as isEnumValueOrUndefined, isEqual$1 as isEqual, isEvenNumber$1 as isEvenNumber, isFalse$1 as isFalse, isFalseOrUndefined$1 as isFalseOrUndefined, isFinite$1 as isFinite, isFunction$1 as isFunction, isFunctionOrUndefined$1 as isFunctionOrUndefined, isIncluded$1 as isIncluded, isInfinity$1 as isInfinity, isInteger$1 as isInteger, isIntegerBetween$1 as isIntegerBetween, isIntegerBetweenExclusive$1 as isIntegerBetweenExclusive, isIntegerEq$1 as isIntegerEq, isIntegerGt$1 as isIntegerGt, isIntegerGte$1 as isIntegerGte, isIntegerLt$1 as isIntegerLt, isIntegerLte$1 as isIntegerLte, isIntegerOrUndefined$1 as isIntegerOrUndefined, isNaNValue$1 as isNaNValue, isNegInfinity$1 as isNegInfinity, isNonEmptyArray$1 as isNonEmptyArray, isNonEmptyArrayOrUndefined$1 as isNonEmptyArrayOrUndefined, isNonEmptyString$1 as isNonEmptyString, isNonEmptyStringOrUndefined$1 as isNonEmptyStringOrUndefined, isNull$1 as isNull, isNullish$1 as isNullish, isNumber$1 as isNumber, isNumberBetween$1 as isNumberBetween, isNumberBetweenExclusive$1 as isNumberBetweenExclusive, isNumberOrUndefined$1 as isNumberOrUndefined, isObject$1 as isObject, isObjectOrUndefined$1 as isObjectOrUndefined, isOddNumber$1 as isOddNumber, isPosInfinity$1 as isPosInfinity, isString$1 as isString, isStringOrUndefined$1 as isStringOrUndefined, isThrowing$1 as isThrowing, isTrue$1 as isTrue, isTrueOrUndefined$1 as isTrueOrUndefined, isTypedObject$1 as isTypedObject, isUndefined$1 as isUndefined, index$7_odd as odd, index$7_require as require, index$7_requireDefined as requireDefined, index$7_setErrorClass as setErrorClass };
144
+ }
145
+
146
+ declare function setExpireDays(days: number): void;
147
+ declare function isConsentPending(): boolean;
148
+ declare function accept(): void;
149
+ declare function decline(): void;
150
+ declare function save<T extends string | number | boolean>(name: string, value: T): T;
151
+ declare function read(name: string, defaultValue: string): string;
152
+ declare function readInt(name: string, defaultValue: number): number;
153
+ declare function readBool(name: string, defaultValue: boolean): boolean;
154
+ declare function erase(name: string): void;
155
+ declare function eraseAll(): void;
156
+
157
+ declare const cookies_accept: typeof accept;
158
+ declare const cookies_decline: typeof decline;
159
+ declare const cookies_erase: typeof erase;
160
+ declare const cookies_eraseAll: typeof eraseAll;
161
+ declare const cookies_isConsentPending: typeof isConsentPending;
162
+ declare const cookies_read: typeof read;
163
+ declare const cookies_readBool: typeof readBool;
164
+ declare const cookies_readInt: typeof readInt;
165
+ declare const cookies_save: typeof save;
166
+ declare const cookies_setExpireDays: typeof setExpireDays;
167
+ declare namespace cookies {
168
+ export { cookies_accept as accept, cookies_decline as decline, cookies_erase as erase, cookies_eraseAll as eraseAll, cookies_isConsentPending as isConsentPending, cookies_read as read, cookies_readBool as readBool, cookies_readInt as readInt, cookies_save as save, cookies_setExpireDays as setExpireDays };
169
+ }
170
+
171
+ declare const DPI: number;
172
+ declare const PxPerMm: number;
173
+ declare const ScrollbarWidth: number;
174
+ declare const FontSize: number;
175
+ declare const IsTouchDevice: boolean;
176
+ declare const IsMobileDevice: boolean;
177
+ declare const HostAddress: string;
178
+ declare function pxToMm(px: number): number;
179
+ declare function mmToPx(mm: number): number;
180
+ declare function toPx(input: string | number): number;
181
+
182
+ declare const device_DPI: typeof DPI;
183
+ declare const device_FontSize: typeof FontSize;
184
+ declare const device_HostAddress: typeof HostAddress;
185
+ declare const device_IsMobileDevice: typeof IsMobileDevice;
186
+ declare const device_IsTouchDevice: typeof IsTouchDevice;
187
+ declare const device_PxPerMm: typeof PxPerMm;
188
+ declare const device_ScrollbarWidth: typeof ScrollbarWidth;
189
+ declare const device_mmToPx: typeof mmToPx;
190
+ declare const device_pxToMm: typeof pxToMm;
191
+ declare const device_toPx: typeof toPx;
192
+ declare namespace device {
193
+ export { device_DPI as DPI, device_FontSize as FontSize, device_HostAddress as HostAddress, device_IsMobileDevice as IsMobileDevice, device_IsTouchDevice as IsTouchDevice, device_PxPerMm as PxPerMm, device_ScrollbarWidth as ScrollbarWidth, device_mmToPx as mmToPx, device_pxToMm as pxToMm, device_toPx as toPx };
194
+ }
195
+
196
+ declare function isEqual(value1: unknown, value2: unknown): boolean;
197
+ declare function isDeepEqual(value1: unknown, value2: unknown): boolean;
1
198
  declare function isUndefined(value: unknown): value is undefined;
2
199
  declare function isNull(value: unknown): value is null;
3
200
  declare function isNullish(value: unknown): value is null | undefined;
4
201
  declare function isObject(value: unknown): value is Record<string, unknown>;
5
202
  declare function isObjectOrUndefined(value: unknown): value is Record<string, unknown> | undefined;
203
+ type HasProps<T extends object> = T extends Record<string, unknown> ? T : never;
204
+ declare function isTypedObject<T extends object>(obj: unknown, keys: (keyof T)[]): obj is HasProps<T>;
6
205
  declare function isArray<T>(a: T[] | unknown): a is T[];
7
206
  declare function isArrayOrUndefined(value: unknown): value is unknown[] | undefined;
8
207
  declare function isEmptyArray<T>(a: T[] | unknown): a is T[];
@@ -17,6 +216,10 @@ declare function isEmptyStringOrUndefined(value: unknown): value is "" | undefin
17
216
  declare function isNonEmptyStringOrUndefined(value: unknown): value is string | undefined;
18
217
  declare function isBoolean(value: unknown): value is boolean;
19
218
  declare function isBooleanOrUndefined(value: unknown): value is boolean | undefined;
219
+ declare function isTrue(value: unknown): value is true;
220
+ declare function isTrueOrUndefined(value: unknown): value is true;
221
+ declare function isFalse(value: unknown): value is false;
222
+ declare function isFalseOrUndefined(value: unknown): value is false;
20
223
  declare function isFunction(value: unknown): value is Function;
21
224
  declare function isFunctionOrUndefined(value: unknown): value is Function | undefined;
22
225
  declare function isEnumValue<E extends Record<string, string | number>>(value: unknown, enumObj: E, name?: string): value is E[keyof E];
@@ -26,57 +229,83 @@ declare function isNumberOrUndefined(value: unknown): value is number | undefine
26
229
  declare function isFinite(value: unknown): value is number;
27
230
  declare function isInteger(n: unknown): n is number;
28
231
  declare function isIntegerOrUndefined(n: unknown): n is number | undefined;
29
- declare function isIntegerEq(value: unknown, compareTo: number): value is number;
30
- declare function isIntegerGt(value: unknown, compareTo: number): value is number;
31
- declare function isIntegerGte(value: unknown, compareTo: number): value is number;
32
- declare function isIntegerLt(value: unknown, compareTo: number): value is number;
33
- declare function isIntegerLte(value: unknown, compareTo: number): value is number;
34
- declare function isIntegerBetween(value: unknown, min: number, max: number): value is number;
232
+ declare function isIntegerEq(value: unknown, compareTo: unknown): value is number;
233
+ declare function isIntegerGt(value: unknown, compareTo: unknown): value is number;
234
+ declare function isIntegerGte(value: unknown, compareTo: unknown): value is number;
235
+ declare function isIntegerLt(value: unknown, compareTo: unknown): value is number;
236
+ declare function isIntegerLte(value: unknown, compareTo: unknown): value is number;
237
+ declare function isIntegerBetween(value: unknown, min: unknown, max: unknown): value is number;
238
+ declare function isIntegerBetweenExclusive(value: unknown, min: unknown, max: unknown): value is number;
239
+ declare function isNumberBetween(value: unknown, min: unknown, max: unknown): value is number;
240
+ declare function isNumberBetweenExclusive(value: unknown, min: unknown, max: unknown): value is number;
35
241
  declare function isNaNValue(value: unknown): value is number;
36
242
  declare function isInfinity(value: unknown): value is number;
37
243
  declare function isPosInfinity(value: unknown): value is number;
38
244
  declare function isNegInfinity(value: unknown): value is number;
245
+ declare function isOddNumber(value: unknown): value is number;
246
+ declare function isEvenNumber(value: unknown): value is number;
247
+ declare function isIncluded<T>(value: T, array: ReadonlyArray<T>): value is T;
248
+ declare function isArrayIndex<T>(index: unknown, array: ReadonlyArray<T>): index is number;
249
+ declare function isThrowing(throwTestFn: () => void): boolean;
250
+ declare function tryOr<TRY_RVAL, OR_RVAL>(tryFn: () => TRY_RVAL, orVal: OR_RVAL | (() => OR_RVAL)): TRY_RVAL | OR_RVAL;
39
251
 
40
- declare const index$8_isArray: typeof isArray;
41
- declare const index$8_isArrayOrUndefined: typeof isArrayOrUndefined;
42
- declare const index$8_isBoolean: typeof isBoolean;
43
- declare const index$8_isBooleanOrUndefined: typeof isBooleanOrUndefined;
44
- declare const index$8_isEmptyArray: typeof isEmptyArray;
45
- declare const index$8_isEmptyArrayOrUndefined: typeof isEmptyArrayOrUndefined;
46
- declare const index$8_isEmptyString: typeof isEmptyString;
47
- declare const index$8_isEmptyStringOrUndefined: typeof isEmptyStringOrUndefined;
48
- declare const index$8_isEnumValue: typeof isEnumValue;
49
- declare const index$8_isEnumValueOrUndefined: typeof isEnumValueOrUndefined;
50
- declare const index$8_isFinite: typeof isFinite;
51
- declare const index$8_isFunction: typeof isFunction;
52
- declare const index$8_isFunctionOrUndefined: typeof isFunctionOrUndefined;
53
- declare const index$8_isInfinity: typeof isInfinity;
54
- declare const index$8_isInteger: typeof isInteger;
55
- declare const index$8_isIntegerBetween: typeof isIntegerBetween;
56
- declare const index$8_isIntegerEq: typeof isIntegerEq;
57
- declare const index$8_isIntegerGt: typeof isIntegerGt;
58
- declare const index$8_isIntegerGte: typeof isIntegerGte;
59
- declare const index$8_isIntegerLt: typeof isIntegerLt;
60
- declare const index$8_isIntegerLte: typeof isIntegerLte;
61
- declare const index$8_isIntegerOrUndefined: typeof isIntegerOrUndefined;
62
- declare const index$8_isNaNValue: typeof isNaNValue;
63
- declare const index$8_isNegInfinity: typeof isNegInfinity;
64
- declare const index$8_isNonEmptyArray: typeof isNonEmptyArray;
65
- declare const index$8_isNonEmptyArrayOrUndefined: typeof isNonEmptyArrayOrUndefined;
66
- declare const index$8_isNonEmptyString: typeof isNonEmptyString;
67
- declare const index$8_isNonEmptyStringOrUndefined: typeof isNonEmptyStringOrUndefined;
68
- declare const index$8_isNull: typeof isNull;
69
- declare const index$8_isNullish: typeof isNullish;
70
- declare const index$8_isNumber: typeof isNumber;
71
- declare const index$8_isNumberOrUndefined: typeof isNumberOrUndefined;
72
- declare const index$8_isObject: typeof isObject;
73
- declare const index$8_isObjectOrUndefined: typeof isObjectOrUndefined;
74
- declare const index$8_isPosInfinity: typeof isPosInfinity;
75
- declare const index$8_isString: typeof isString;
76
- declare const index$8_isStringOrUndefined: typeof isStringOrUndefined;
77
- declare const index$8_isUndefined: typeof isUndefined;
78
- declare namespace index$8 {
79
- export { index$8_isArray as isArray, index$8_isArrayOrUndefined as isArrayOrUndefined, index$8_isBoolean as isBoolean, index$8_isBooleanOrUndefined as isBooleanOrUndefined, index$8_isEmptyArray as isEmptyArray, index$8_isEmptyArrayOrUndefined as isEmptyArrayOrUndefined, index$8_isEmptyString as isEmptyString, index$8_isEmptyStringOrUndefined as isEmptyStringOrUndefined, index$8_isEnumValue as isEnumValue, index$8_isEnumValueOrUndefined as isEnumValueOrUndefined, index$8_isFinite as isFinite, index$8_isFunction as isFunction, index$8_isFunctionOrUndefined as isFunctionOrUndefined, index$8_isInfinity as isInfinity, index$8_isInteger as isInteger, index$8_isIntegerBetween as isIntegerBetween, index$8_isIntegerEq as isIntegerEq, index$8_isIntegerGt as isIntegerGt, index$8_isIntegerGte as isIntegerGte, index$8_isIntegerLt as isIntegerLt, index$8_isIntegerLte as isIntegerLte, index$8_isIntegerOrUndefined as isIntegerOrUndefined, index$8_isNaNValue as isNaNValue, index$8_isNegInfinity as isNegInfinity, index$8_isNonEmptyArray as isNonEmptyArray, index$8_isNonEmptyArrayOrUndefined as isNonEmptyArrayOrUndefined, index$8_isNonEmptyString as isNonEmptyString, index$8_isNonEmptyStringOrUndefined as isNonEmptyStringOrUndefined, index$8_isNull as isNull, index$8_isNullish as isNullish, index$8_isNumber as isNumber, index$8_isNumberOrUndefined as isNumberOrUndefined, index$8_isObject as isObject, index$8_isObjectOrUndefined as isObjectOrUndefined, index$8_isPosInfinity as isPosInfinity, index$8_isString as isString, index$8_isStringOrUndefined as isStringOrUndefined, index$8_isUndefined as isUndefined };
252
+ type Guard_HasProps<T extends object> = HasProps<T>;
253
+ declare const Guard_isArray: typeof isArray;
254
+ declare const Guard_isArrayIndex: typeof isArrayIndex;
255
+ declare const Guard_isArrayOrUndefined: typeof isArrayOrUndefined;
256
+ declare const Guard_isBoolean: typeof isBoolean;
257
+ declare const Guard_isBooleanOrUndefined: typeof isBooleanOrUndefined;
258
+ declare const Guard_isDeepEqual: typeof isDeepEqual;
259
+ declare const Guard_isEmptyArray: typeof isEmptyArray;
260
+ declare const Guard_isEmptyArrayOrUndefined: typeof isEmptyArrayOrUndefined;
261
+ declare const Guard_isEmptyString: typeof isEmptyString;
262
+ declare const Guard_isEmptyStringOrUndefined: typeof isEmptyStringOrUndefined;
263
+ declare const Guard_isEnumValue: typeof isEnumValue;
264
+ declare const Guard_isEnumValueOrUndefined: typeof isEnumValueOrUndefined;
265
+ declare const Guard_isEqual: typeof isEqual;
266
+ declare const Guard_isEvenNumber: typeof isEvenNumber;
267
+ declare const Guard_isFalse: typeof isFalse;
268
+ declare const Guard_isFalseOrUndefined: typeof isFalseOrUndefined;
269
+ declare const Guard_isFinite: typeof isFinite;
270
+ declare const Guard_isFunction: typeof isFunction;
271
+ declare const Guard_isFunctionOrUndefined: typeof isFunctionOrUndefined;
272
+ declare const Guard_isIncluded: typeof isIncluded;
273
+ declare const Guard_isInfinity: typeof isInfinity;
274
+ declare const Guard_isInteger: typeof isInteger;
275
+ declare const Guard_isIntegerBetween: typeof isIntegerBetween;
276
+ declare const Guard_isIntegerBetweenExclusive: typeof isIntegerBetweenExclusive;
277
+ declare const Guard_isIntegerEq: typeof isIntegerEq;
278
+ declare const Guard_isIntegerGt: typeof isIntegerGt;
279
+ declare const Guard_isIntegerGte: typeof isIntegerGte;
280
+ declare const Guard_isIntegerLt: typeof isIntegerLt;
281
+ declare const Guard_isIntegerLte: typeof isIntegerLte;
282
+ declare const Guard_isIntegerOrUndefined: typeof isIntegerOrUndefined;
283
+ declare const Guard_isNaNValue: typeof isNaNValue;
284
+ declare const Guard_isNegInfinity: typeof isNegInfinity;
285
+ declare const Guard_isNonEmptyArray: typeof isNonEmptyArray;
286
+ declare const Guard_isNonEmptyArrayOrUndefined: typeof isNonEmptyArrayOrUndefined;
287
+ declare const Guard_isNonEmptyString: typeof isNonEmptyString;
288
+ declare const Guard_isNonEmptyStringOrUndefined: typeof isNonEmptyStringOrUndefined;
289
+ declare const Guard_isNull: typeof isNull;
290
+ declare const Guard_isNullish: typeof isNullish;
291
+ declare const Guard_isNumber: typeof isNumber;
292
+ declare const Guard_isNumberBetween: typeof isNumberBetween;
293
+ declare const Guard_isNumberBetweenExclusive: typeof isNumberBetweenExclusive;
294
+ declare const Guard_isNumberOrUndefined: typeof isNumberOrUndefined;
295
+ declare const Guard_isObject: typeof isObject;
296
+ declare const Guard_isObjectOrUndefined: typeof isObjectOrUndefined;
297
+ declare const Guard_isOddNumber: typeof isOddNumber;
298
+ declare const Guard_isPosInfinity: typeof isPosInfinity;
299
+ declare const Guard_isString: typeof isString;
300
+ declare const Guard_isStringOrUndefined: typeof isStringOrUndefined;
301
+ declare const Guard_isThrowing: typeof isThrowing;
302
+ declare const Guard_isTrue: typeof isTrue;
303
+ declare const Guard_isTrueOrUndefined: typeof isTrueOrUndefined;
304
+ declare const Guard_isTypedObject: typeof isTypedObject;
305
+ declare const Guard_isUndefined: typeof isUndefined;
306
+ declare const Guard_tryOr: typeof tryOr;
307
+ declare namespace Guard {
308
+ export { type Guard_HasProps as HasProps, Guard_isArray as isArray, Guard_isArrayIndex as isArrayIndex, Guard_isArrayOrUndefined as isArrayOrUndefined, Guard_isBoolean as isBoolean, Guard_isBooleanOrUndefined as isBooleanOrUndefined, Guard_isDeepEqual as isDeepEqual, Guard_isEmptyArray as isEmptyArray, Guard_isEmptyArrayOrUndefined as isEmptyArrayOrUndefined, Guard_isEmptyString as isEmptyString, Guard_isEmptyStringOrUndefined as isEmptyStringOrUndefined, Guard_isEnumValue as isEnumValue, Guard_isEnumValueOrUndefined as isEnumValueOrUndefined, Guard_isEqual as isEqual, Guard_isEvenNumber as isEvenNumber, Guard_isFalse as isFalse, Guard_isFalseOrUndefined as isFalseOrUndefined, Guard_isFinite as isFinite, Guard_isFunction as isFunction, Guard_isFunctionOrUndefined as isFunctionOrUndefined, Guard_isIncluded as isIncluded, Guard_isInfinity as isInfinity, Guard_isInteger as isInteger, Guard_isIntegerBetween as isIntegerBetween, Guard_isIntegerBetweenExclusive as isIntegerBetweenExclusive, Guard_isIntegerEq as isIntegerEq, Guard_isIntegerGt as isIntegerGt, Guard_isIntegerGte as isIntegerGte, Guard_isIntegerLt as isIntegerLt, Guard_isIntegerLte as isIntegerLte, Guard_isIntegerOrUndefined as isIntegerOrUndefined, Guard_isNaNValue as isNaNValue, Guard_isNegInfinity as isNegInfinity, Guard_isNonEmptyArray as isNonEmptyArray, Guard_isNonEmptyArrayOrUndefined as isNonEmptyArrayOrUndefined, Guard_isNonEmptyString as isNonEmptyString, Guard_isNonEmptyStringOrUndefined as isNonEmptyStringOrUndefined, Guard_isNull as isNull, Guard_isNullish as isNullish, Guard_isNumber as isNumber, Guard_isNumberBetween as isNumberBetween, Guard_isNumberBetweenExclusive as isNumberBetweenExclusive, Guard_isNumberOrUndefined as isNumberOrUndefined, Guard_isObject as isObject, Guard_isObjectOrUndefined as isObjectOrUndefined, Guard_isOddNumber as isOddNumber, Guard_isPosInfinity as isPosInfinity, Guard_isString as isString, Guard_isStringOrUndefined as isStringOrUndefined, Guard_isThrowing as isThrowing, Guard_isTrue as isTrue, Guard_isTrueOrUndefined as isTrueOrUndefined, Guard_isTypedObject as isTypedObject, Guard_isUndefined as isUndefined, Guard_tryOr as tryOr };
80
309
  }
81
310
 
82
311
  declare function toArray<T>(a: T | T[]): Array<T>;
@@ -91,20 +320,20 @@ declare function getRangeArray(start: number, end: number): number[];
91
320
  declare function arrayContains<T extends unknown>(arg: T[], item: T): boolean;
92
321
  declare function chunckArray<A>(arr: ReadonlyArray<A>, chunckSize: number): A[][];
93
322
 
94
- declare const index$7_arrayContains: typeof arrayContains;
95
- declare const index$7_chunckArray: typeof chunckArray;
96
- declare const index$7_duplicate: typeof duplicate;
97
- declare const index$7_fillArray: typeof fillArray;
98
- declare const index$7_getRangeArray: typeof getRangeArray;
99
- declare const index$7_getSequenceArray: typeof getSequenceArray;
100
- declare const index$7_isArray: typeof isArray;
101
- declare const index$7_mapRangeArray: typeof mapRangeArray;
102
- declare const index$7_mapSequenceArray: typeof mapSequenceArray;
103
- declare const index$7_removeDuplicates: typeof removeDuplicates;
104
- declare const index$7_removeDuplicatesCmp: typeof removeDuplicatesCmp;
105
- declare const index$7_toArray: typeof toArray;
106
- declare namespace index$7 {
107
- export { index$7_arrayContains as arrayContains, index$7_chunckArray as chunckArray, index$7_duplicate as duplicate, index$7_fillArray as fillArray, index$7_getRangeArray as getRangeArray, index$7_getSequenceArray as getSequenceArray, index$7_isArray as isArray, index$7_mapRangeArray as mapRangeArray, index$7_mapSequenceArray as mapSequenceArray, index$7_removeDuplicates as removeDuplicates, index$7_removeDuplicatesCmp as removeDuplicatesCmp, index$7_toArray as toArray };
323
+ declare const index$6_arrayContains: typeof arrayContains;
324
+ declare const index$6_chunckArray: typeof chunckArray;
325
+ declare const index$6_duplicate: typeof duplicate;
326
+ declare const index$6_fillArray: typeof fillArray;
327
+ declare const index$6_getRangeArray: typeof getRangeArray;
328
+ declare const index$6_getSequenceArray: typeof getSequenceArray;
329
+ declare const index$6_isArray: typeof isArray;
330
+ declare const index$6_mapRangeArray: typeof mapRangeArray;
331
+ declare const index$6_mapSequenceArray: typeof mapSequenceArray;
332
+ declare const index$6_removeDuplicates: typeof removeDuplicates;
333
+ declare const index$6_removeDuplicatesCmp: typeof removeDuplicatesCmp;
334
+ declare const index$6_toArray: typeof toArray;
335
+ declare namespace index$6 {
336
+ export { index$6_arrayContains as arrayContains, index$6_chunckArray as chunckArray, index$6_duplicate as duplicate, index$6_fillArray as fillArray, index$6_getRangeArray as getRangeArray, index$6_getSequenceArray as getSequenceArray, index$6_isArray as isArray, index$6_mapRangeArray as mapRangeArray, index$6_mapSequenceArray as mapSequenceArray, index$6_removeDuplicates as removeDuplicates, index$6_removeDuplicatesCmp as removeDuplicatesCmp, index$6_toArray as toArray };
108
337
  }
109
338
 
110
339
  interface CSSProperties {
@@ -153,43 +382,28 @@ declare function getDimension(style?: CSSProperties): {
153
382
  declare function styleLayoutChanged(style1?: CSSProperties, style2?: CSSProperties): boolean;
154
383
  declare function getCanvasTextWidth(text: string, font: string): number;
155
384
 
156
- type index$6_CSSProperties = CSSProperties;
157
- declare const index$6_addClass: typeof addClass;
158
- declare const index$6_appendTo: typeof appendTo;
159
- declare const index$6_getButton: typeof getButton;
160
- declare const index$6_getCanvas: typeof getCanvas;
161
- declare const index$6_getCanvasTextWidth: typeof getCanvasTextWidth;
162
- declare const index$6_getDimension: typeof getDimension;
163
- declare const index$6_getHeight: typeof getHeight;
164
- declare const index$6_getOffset: typeof getOffset;
165
- declare const index$6_getPadding: typeof getPadding;
166
- declare const index$6_getWidth: typeof getWidth;
167
- declare const index$6_hasClass: typeof hasClass;
168
- declare const index$6_removeClass: typeof removeClass;
169
- declare const index$6_removeFromParent: typeof removeFromParent;
170
- declare const index$6_setHeight: typeof setHeight;
171
- declare const index$6_setOffset: typeof setOffset;
172
- declare const index$6_setRect: typeof setRect;
173
- declare const index$6_setVisibility: typeof setVisibility;
174
- declare const index$6_setWidth: typeof setWidth;
175
- declare const index$6_styleLayoutChanged: typeof styleLayoutChanged;
176
- declare namespace index$6 {
177
- export { type index$6_CSSProperties as CSSProperties, index$6_addClass as addClass, index$6_appendTo as appendTo, index$6_getButton as getButton, index$6_getCanvas as getCanvas, index$6_getCanvasTextWidth as getCanvasTextWidth, index$6_getDimension as getDimension, index$6_getHeight as getHeight, index$6_getOffset as getOffset, index$6_getPadding as getPadding, index$6_getWidth as getWidth, index$6_hasClass as hasClass, index$6_removeClass as removeClass, index$6_removeFromParent as removeFromParent, index$6_setHeight as setHeight, index$6_setOffset as setOffset, index$6_setRect as setRect, index$6_setVisibility as setVisibility, index$6_setWidth as setWidth, index$6_styleLayoutChanged as styleLayoutChanged };
178
- }
179
-
180
- type EnumObject = {
181
- [key: string]: string | number;
182
- };
183
- type EnumValue<E extends EnumObject> = E extends {
184
- [key: string]: string | infer V;
185
- } ? V : never;
186
- declare function getEnumValues<E extends EnumObject>(e: E): Array<EnumValue<E>>;
187
-
188
- type index$5_EnumObject = EnumObject;
189
- type index$5_EnumValue<E extends EnumObject> = EnumValue<E>;
190
- declare const index$5_getEnumValues: typeof getEnumValues;
385
+ type index$5_CSSProperties = CSSProperties;
386
+ declare const index$5_addClass: typeof addClass;
387
+ declare const index$5_appendTo: typeof appendTo;
388
+ declare const index$5_getButton: typeof getButton;
389
+ declare const index$5_getCanvas: typeof getCanvas;
390
+ declare const index$5_getCanvasTextWidth: typeof getCanvasTextWidth;
391
+ declare const index$5_getDimension: typeof getDimension;
392
+ declare const index$5_getHeight: typeof getHeight;
393
+ declare const index$5_getOffset: typeof getOffset;
394
+ declare const index$5_getPadding: typeof getPadding;
395
+ declare const index$5_getWidth: typeof getWidth;
396
+ declare const index$5_hasClass: typeof hasClass;
397
+ declare const index$5_removeClass: typeof removeClass;
398
+ declare const index$5_removeFromParent: typeof removeFromParent;
399
+ declare const index$5_setHeight: typeof setHeight;
400
+ declare const index$5_setOffset: typeof setOffset;
401
+ declare const index$5_setRect: typeof setRect;
402
+ declare const index$5_setVisibility: typeof setVisibility;
403
+ declare const index$5_setWidth: typeof setWidth;
404
+ declare const index$5_styleLayoutChanged: typeof styleLayoutChanged;
191
405
  declare namespace index$5 {
192
- export { type index$5_EnumObject as EnumObject, type index$5_EnumValue as EnumValue, index$5_getEnumValues as getEnumValues };
406
+ export { type index$5_CSSProperties as CSSProperties, index$5_addClass as addClass, index$5_appendTo as appendTo, index$5_getButton as getButton, index$5_getCanvas as getCanvas, index$5_getCanvasTextWidth as getCanvasTextWidth, index$5_getDimension as getDimension, index$5_getHeight as getHeight, index$5_getOffset as getOffset, index$5_getPadding as getPadding, index$5_getWidth as getWidth, index$5_hasClass as hasClass, index$5_removeClass as removeClass, index$5_removeFromParent as removeFromParent, index$5_setHeight as setHeight, index$5_setOffset as setOffset, index$5_setRect as setRect, index$5_setVisibility as setVisibility, index$5_setWidth as setWidth, index$5_styleLayoutChanged as styleLayoutChanged };
193
407
  }
194
408
 
195
409
  declare function getMapKeys<K, V>(map: Map<K, V>): K[];
@@ -321,57 +535,14 @@ declare namespace index$1 {
321
535
  export { index$1_charCount as charCount, index$1_chunkString as chunkString, index$1_insertAt as insertAt, index$1_isString as isString, index$1_makeSentenceFromPascal as makeSentenceFromPascal, index$1_removeAt as removeAt, index$1_repeatString as repeatString, index$1_replaceAt as replaceAt, index$1_toCharArray as toCharArray };
322
536
  }
323
537
 
324
- declare namespace index {
325
- export { index$7 as Arr, index$6 as Dom, index$5 as Enum, index$8 as Is, index$4 as Map, index$3 as Math, index$2 as Obj, index$1 as Str };
326
- }
327
-
328
- declare namespace Assert {
329
- type ErrorConstructor = new (msg: string) => Error;
330
- function setErrorClass(ec?: ErrorConstructor): void;
331
- function assert<T>(a: T, userMsg?: string): void;
332
- function assertEnum<E extends Record<string, string | number>>(value: unknown, enumObj: E, name?: string): asserts value is E[keyof E];
333
- function interrupt(userMsg?: string): never;
334
- function int(a: unknown, userMsg?: string): number;
335
- function eq<T>(a: T, b: T, userMsg?: string): T;
336
- function int_eq(a: unknown, b: unknown, userMsg?: string): number;
337
- function int_lt(a: unknown, b: unknown, userMsg?: string): number;
338
- function int_lte(a: unknown, b: unknown, userMsg?: string): number;
339
- function int_gt(a: unknown, b: unknown, userMsg?: string): number;
340
- function int_gte(a: unknown, b: unknown, userMsg?: string): number;
341
- function int_between(a: unknown, min: unknown, max: unknown, userMsg?: string): number;
342
- function odd(a: unknown, userMsg?: string): number;
343
- function even(a: unknown, userMsg?: string): number;
344
- function in_group<T>(a: T, group: ReadonlyArray<T>, userMsg?: string): T;
345
- function finite(a: unknown, userMsg?: string): number;
346
- function array_id<T>(arr: Readonly<T[]>, id: unknown, userMsg?: string): number;
347
- function array_elem<T>(arr: Readonly<T[]>, id: number, userMsg?: string): T;
348
- function require<T>(arg: T, userMsg?: string): NonNullable<T>;
349
- }
350
-
351
- declare namespace Cookies {
352
- function setExpireDays(days: number): void;
353
- function isConsentPending(): boolean;
354
- function accept(): void;
355
- function decline(): void;
356
- function save<T extends string | number | boolean>(name: string, value: T): T;
357
- function read(name: string, defaultValue: string): string;
358
- function readInt(name: string, defaultValue: number): number;
359
- function readBool(name: string, defaultValue: boolean): boolean;
360
- function erase(name: string): void;
361
- function eraseAll(): void;
362
- }
538
+ /**
539
+ * @deprecated Use {@link Guard} instead.
540
+ */
541
+ declare const Is: typeof Guard;
363
542
 
364
- declare namespace Device {
365
- const DPI: number;
366
- const PxPerMm: number;
367
- const ScrollbarWidth: number;
368
- const FontSize: number;
369
- const IsTouchDevice: boolean;
370
- const IsMobileDevice: boolean;
371
- const HostAddress: string;
372
- function pxToMm(px: number): number;
373
- function mmToPx(mm: number): number;
374
- function toPx(input: string | number): number;
543
+ declare const index_Is: typeof Is;
544
+ declare namespace index {
545
+ export { index$6 as Arr, index$5 as Dom, index$8 as Enum, index_Is as Is, index$4 as Map, index$3 as Math, index$2 as Obj, index$1 as Str };
375
546
  }
376
547
 
377
548
  declare class Stack<T> {
@@ -405,7 +576,9 @@ declare class Vec {
405
576
  static vec2(x: number, y: number): Vec;
406
577
  static vec3(x: number, y: number, z: number): Vec;
407
578
  static zero(dim: number): Vec;
579
+ get dim(): number;
408
580
  get length(): number;
581
+ magnitude(): number;
409
582
  get x(): number;
410
583
  get y(): number;
411
584
  get z(): number;
@@ -418,6 +591,9 @@ declare class Vec {
418
591
  dot(other: Vec): number;
419
592
  distance(other: Vec): number;
420
593
  normalize(): Vec;
594
+ static lerp(a: Vec, b: Vec, t: number): Vec;
595
+ toLength(len: number): Vec;
596
+ clamp(minLength?: number, maxLength?: number, defaultDir?: Vec): Vec;
421
597
  equals(other: Vec): boolean;
422
598
  clone(): Vec;
423
599
  toObject(): {
@@ -430,14 +606,14 @@ declare class Vec {
430
606
  }
431
607
 
432
608
  /**
433
- * DivRect class, left, top, right, bottom rectangle divided into four sections by centerX, centerY.
609
+ * DivRect class, left, top, right, bottom rectangle divided into four sections by anchorX, anchorY.
434
610
  */
435
611
  declare class DivRect {
436
612
  left: number;
437
- centerX: number;
613
+ anchorX: number;
438
614
  right: number;
439
615
  top: number;
440
- centerY: number;
616
+ anchorY: number;
441
617
  bottom: number;
442
618
  /**
443
619
  * Create rectangle with all zero values.
@@ -445,7 +621,7 @@ declare class DivRect {
445
621
  constructor();
446
622
  /**
447
623
  * Create rectangle with left, right, top, bottom.
448
- * Properties centerX and centerY will be centered in the middle.
624
+ * Properties anchorX and anchorY will be centered in the middle.
449
625
  *
450
626
  * @param left - Left coordinate.
451
627
  * @param right - Right coordinate.
@@ -457,13 +633,13 @@ declare class DivRect {
457
633
  * Create rectangle with full arguments.
458
634
  *
459
635
  * @param left - Left coordinate.
460
- * @param centerX - Center x-coordinate.
636
+ * @param anchorX - Center x-coordinate.
461
637
  * @param right - Right coordinate.
462
638
  * @param top - Top coordinate.
463
- * @param centerY - Center y-coordinate.
639
+ * @param anchorY - Center y-coordinate.
464
640
  * @param bottom - Bottom coordinate.
465
641
  */
466
- constructor(left: number, centerX: number, right: number, top: number, centerY: number, bottom: number);
642
+ constructor(left: number, anchorX: number, right: number, top: number, anchorY: number, bottom: number);
467
643
  /**
468
644
  * Create rect from basic left, top, width and height arguments.
469
645
  *
@@ -475,7 +651,7 @@ declare class DivRect {
475
651
  */
476
652
  static create(left: number, top: number, width: number, height: number): DivRect;
477
653
  /**
478
- * Create rect from centerX, centerY, width, height arguments.
654
+ * Create rect from anchorX, anchorY, width, height arguments.
479
655
  *
480
656
  * @param centerX - Center x-coordinate.
481
657
  * @param centerY - Center y-coordinate.
@@ -494,6 +670,14 @@ declare class DivRect {
494
670
  * @returns - DivRect.
495
671
  */
496
672
  static createSections(leftw: number, rightw: number, toph: number, bottomh: number): DivRect;
673
+ /** @deprecated - Renamed to anchorX. */
674
+ get centerX(): number;
675
+ /** @deprecated - Renamed to anchorX. */
676
+ set centerX(x: number);
677
+ /** @deprecated - Renamed to anchorY. */
678
+ get centerY(): number;
679
+ /** @deprecated - Renamed to anchorY. */
680
+ set centerY(y: number);
497
681
  /**
498
682
  * Width getter.
499
683
  */
@@ -556,7 +740,7 @@ declare class DivRect {
556
740
  */
557
741
  equals(other: DivRect): boolean;
558
742
  /**
559
- * Check if edges of given rects are equal, ignoring centerX and centerY.
743
+ * Check if edges of given rects are equal, ignoring anchorX and anchorY.
560
744
  *
561
745
  * @param a - DivRect a.
562
746
  * @param b - DivRect b.
@@ -564,12 +748,14 @@ declare class DivRect {
564
748
  */
565
749
  static equalsEdges(a: DivRect | null | undefined, b: DivRect | null | undefined): boolean;
566
750
  /**
567
- * Check if edges of this Rect equals with given Rect, ignoring centerX and centerY.
751
+ * Check if edges of this Rect equals with given Rect, ignoring anchorX and anchorY.
568
752
  *
569
753
  * @param other - The other DivRect.
570
754
  * @returns - True/false.
571
755
  */
572
756
  equalsEdges(other: DivRect): boolean;
757
+ /** @deprecated - Use `DivRect.equalsEdges()` instead. */
758
+ static equalsFrame(a: DivRect | null | undefined, b: DivRect | null | undefined): boolean;
573
759
  /**
574
760
  * Created duplicate of this Rect.
575
761
  *
@@ -621,7 +807,7 @@ declare class DivRect {
621
807
  */
622
808
  clipCopy(clipRect: DivRect): DivRect;
623
809
  /**
624
- * Scale Rect. Anchor pos is (centerX, centerY). Modifies this Rect.
810
+ * Scale Rect. Anchor pos is (anchorX, anchorY). Modifies this Rect.
625
811
  *
626
812
  * @param scaleX - Scale x-amount.
627
813
  * @param scaleY - Scale y-amount. If undefined then scale x-amount is used.
@@ -629,7 +815,7 @@ declare class DivRect {
629
815
  */
630
816
  scaleInPlace(scaleX: number, scaleY?: number): DivRect;
631
817
  /**
632
- * Scale Rect. Anchor pos is (centerX, centerY). Immutable, returns modified copy.
818
+ * Scale Rect. Anchor pos is (anchorX, anchorY). Immutable, returns modified copy.
633
819
  *
634
820
  * @param scaleX - Scale x-amount.
635
821
  * @param scaleY - Scale y-amount. If undefined then scale x-amount is used.
@@ -932,7 +1118,7 @@ declare function asMulti<K extends any[], VALUE>(base: KVComponent<K, VALUE[]>):
932
1118
  /**
933
1119
  * Vec2 class.
934
1120
  *
935
- * @deprecated - Use Vec instead, has more functionality.
1121
+ * @deprecated - Use {@link Vec} instead.
936
1122
  */
937
1123
  declare class Vec2 {
938
1124
  readonly x: number;
@@ -946,6 +1132,8 @@ declare class Vec2 {
946
1132
  }
947
1133
 
948
1134
  /**
1135
+ * @deprecated - Use {@link SignedIndexArray} or {@link IndexArray} instead, they have way more functions.
1136
+ *
949
1137
  * A cache-like structure optimized for small-range integer keys, including negatives.
950
1138
  *
951
1139
  * Internally implemented using two sparse arrays: one for non-negative keys,
@@ -963,8 +1151,6 @@ declare class Vec2 {
963
1151
  * cache.set(3, 'B');
964
1152
  * console.log(cache.get(-2)); // 'A'
965
1153
  * ```
966
- *
967
- * @deprecated - Same functionality an more is available now in SignedIndexArray<VALUE> and IndexArray<VALUE> containers.
968
1154
  */
969
1155
  declare class SmallIntCache<VALUE> {
970
1156
  private pos;
@@ -977,4 +1163,4 @@ declare class SmallIntCache<VALUE> {
977
1163
  clear(): void;
978
1164
  }
979
1165
 
980
- export { Assert, Cookies, Device, DivRect, IndexArray, type KVComponent, LRUCache, Map1, Map2, Map3, MultiContainer, SignedIndexArray, SmallIntCache, Stack, index as Utils, Vec, Vec2, asMulti };
1166
+ export { index$7 as Assert, cookies as Cookies, device as Device, DivRect, Guard, IndexArray, type KVComponent, LRUCache, Map1, Map2, Map3, MultiContainer, SignedIndexArray, SmallIntCache, Stack, index as Utils, Vec, Vec2, asMulti };