@dxtmisha/functional-basic 1.7.1 → 1.8.1
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/CHANGELOG.md +24 -0
- package/README.md +2 -0
- package/ai-description.md +4 -16
- package/ai-doc.md +36 -112
- package/ai-types.md +660 -767
- package/dist/classes/ErrorCenter.d.ts +8 -1
- package/dist/classes/ErrorCenterHandler.d.ts +13 -2
- package/dist/classes/ErrorCenterInstance.d.ts +9 -1
- package/dist/functions/domContentLoaded.d.ts +13 -0
- package/dist/functions/getRandomItem.d.ts +10 -0
- package/dist/functions/sortList.d.ts +11 -0
- package/dist/functions/toNumberPositive.d.ts +9 -0
- package/dist/library.d.ts +6 -1
- package/dist/library.js +600 -533
- package/dist/media/errorCauseList.d.ts +1 -1
- package/dist/types/{errorCenter.d.ts → errorCenterTypes.d.ts} +8 -0
- package/dist/types/sortTypes.d.ts +20 -0
- package/package.json +17 -5
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ErrorCenterCauseList } from '../types/
|
|
1
|
+
import { ErrorCenterCauseList } from '../types/errorCenterTypes';
|
|
2
2
|
export declare const errorCauseList: ErrorCenterCauseList;
|
|
@@ -40,3 +40,11 @@ export type ErrorCenterHandlerItem = {
|
|
|
40
40
|
* List of error handlers / Список обработчиков ошибок
|
|
41
41
|
*/
|
|
42
42
|
export type ErrorCenterHandlerList = ErrorCenterHandlerItem[];
|
|
43
|
+
/**
|
|
44
|
+
* Callback function to check whether to log error to console / Функция обратного вызова для проверки вывода ошибки в консоль
|
|
45
|
+
*/
|
|
46
|
+
export type ErrorCenterHandlerIsConsoleCallback = (cause: ErrorCenterCauseItem) => boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Type for console logging configuration / Тип для конфигурации вывода в консоль
|
|
49
|
+
*/
|
|
50
|
+
export type ErrorCenterHandlerIsConsole = boolean | ErrorCenterHandlerIsConsoleCallback;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sorting direction. /
|
|
3
|
+
* Направление сортировки.
|
|
4
|
+
*/
|
|
5
|
+
export type SortDir = 'asc' | 'desc';
|
|
6
|
+
/**
|
|
7
|
+
* Single column sorting specification item. /
|
|
8
|
+
* Элемент спецификации сортировки по отдельной колонке.
|
|
9
|
+
*/
|
|
10
|
+
export type SortColumnItem = {
|
|
11
|
+
/** Column or property key for sorting / Колонка или ключ свойства для сортировки */
|
|
12
|
+
column?: string;
|
|
13
|
+
/** Sorting direction ('asc' or 'desc') / Направление сортировки ('asc' или 'desc') */
|
|
14
|
+
dir?: SortDir;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Custom sort function signature. /
|
|
18
|
+
* Сигнатура пользовательской функции сортировки.
|
|
19
|
+
*/
|
|
20
|
+
export type SortFunction<T = any> = (a: T, b: T, column?: string, dir?: SortDir) => number;
|
package/package.json
CHANGED
|
@@ -1,38 +1,50 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxtmisha/functional-basic",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.8.1",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"description": "Foundational utility library for modern web development — HTTP client,
|
|
6
|
+
"description": "Foundational isomorphic utility library for modern web and SSR development — HTTP client, state storage, i18n localization, SEO metadata, DOM events, formatting, and data utilities. Framework-agnostic, TypeScript-first.",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"typescript",
|
|
9
9
|
"utilities",
|
|
10
10
|
"helpers",
|
|
11
11
|
"functional",
|
|
12
|
+
"isomorphic",
|
|
13
|
+
"universal",
|
|
14
|
+
"ssr",
|
|
12
15
|
"api",
|
|
13
16
|
"http-client",
|
|
14
17
|
"fetch",
|
|
18
|
+
"hydration",
|
|
15
19
|
"geo",
|
|
16
20
|
"geolocation",
|
|
17
21
|
"i18n",
|
|
18
22
|
"intl",
|
|
19
23
|
"localization",
|
|
24
|
+
"translate",
|
|
25
|
+
"translation",
|
|
20
26
|
"datetime",
|
|
21
27
|
"date",
|
|
28
|
+
"formatters",
|
|
29
|
+
"units",
|
|
22
30
|
"cache",
|
|
23
31
|
"cookie",
|
|
24
32
|
"storage",
|
|
25
33
|
"localStorage",
|
|
34
|
+
"sessionStorage",
|
|
26
35
|
"meta",
|
|
27
36
|
"seo",
|
|
28
37
|
"open-graph",
|
|
29
38
|
"twitter-card",
|
|
30
39
|
"dom",
|
|
40
|
+
"events",
|
|
41
|
+
"broadcast-channel",
|
|
42
|
+
"search-list",
|
|
43
|
+
"query",
|
|
44
|
+
"hash",
|
|
45
|
+
"phone",
|
|
31
46
|
"icons",
|
|
32
47
|
"flags",
|
|
33
|
-
"phone",
|
|
34
|
-
"translate",
|
|
35
|
-
"ssr",
|
|
36
48
|
"tree-shakeable",
|
|
37
49
|
"dxt"
|
|
38
50
|
],
|