@dxtmisha/functional-basic 1.8.5 → 1.8.7
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 +13 -0
- package/ai-description.md +12 -3
- package/ai-mcp-resources.json +20 -0
- package/ai-resources/prompts.json +8 -0
- package/ai-types.md +3066 -1360
- package/dist/classes/ApiCache.d.ts +2 -2
- package/dist/classes/ApiErrorStorage.d.ts +9 -1
- package/dist/classes/ApiHydration.d.ts +1 -0
- package/dist/classes/ApiInstance.d.ts +1 -0
- package/dist/classes/ApiStatus.d.ts +1 -0
- package/dist/classes/BroadcastMessage.d.ts +1 -0
- package/dist/classes/Cache.d.ts +1 -0
- package/dist/classes/CacheItem.d.ts +3 -0
- package/dist/classes/CookieBlock.d.ts +1 -1
- package/dist/classes/CookieBlockInstance.d.ts +2 -1
- package/dist/classes/CookieStorage.d.ts +2 -1
- package/dist/classes/DataStorage.d.ts +1 -1
- package/dist/classes/Datetime.d.ts +5 -4
- package/dist/classes/EventItem.d.ts +7 -28
- package/dist/classes/Formatters.d.ts +6 -10
- package/dist/classes/GeoFlag.d.ts +1 -1
- package/dist/classes/GeoInstance.d.ts +1 -0
- package/dist/classes/GeoIntl.d.ts +23 -36
- package/dist/classes/GeoPhone.d.ts +2 -0
- package/dist/classes/Global.d.ts +1 -1
- package/dist/classes/Hash.d.ts +1 -1
- package/dist/classes/Icons.d.ts +8 -8
- package/dist/classes/Loading.d.ts +8 -12
- package/dist/classes/LoadingInstance.d.ts +10 -22
- package/dist/classes/Meta.d.ts +4 -1
- package/dist/classes/MetaManager.d.ts +2 -0
- package/dist/classes/MetaOg.d.ts +7 -2
- package/dist/classes/MetaTwitter.d.ts +7 -2
- package/dist/classes/Query.d.ts +1 -1
- package/dist/classes/ResumableTimer.d.ts +4 -0
- package/dist/classes/ScrollbarWidth.d.ts +1 -0
- package/dist/classes/SearchList.d.ts +4 -0
- package/dist/classes/SearchListData.d.ts +3 -2
- package/dist/classes/SearchListMatcher.d.ts +3 -2
- package/dist/classes/ServerStorage.d.ts +5 -2
- package/dist/classes/StorageCallback.d.ts +2 -0
- package/dist/classes/Translate.d.ts +6 -8
- package/dist/classes/TranslateInstance.d.ts +4 -7
- package/dist/classes/UrlInstanceAbstract.d.ts +4 -0
- package/dist/library.js +26 -26
- package/package.json +6 -6
- package/ai-mcp.json +0 -20
- /package/{ai-prompts → ai-resources}/api-reference.md +0 -0
package/dist/classes/Meta.d.ts
CHANGED
|
@@ -8,8 +8,11 @@ import { MetaRobots, MetaTag } from '../types/metaTypes';
|
|
|
8
8
|
* Унифицированный класс для управления всеми типами мета-тегов (стандартные HTML, Open Graph, Twitter Card).
|
|
9
9
|
*/
|
|
10
10
|
export declare class Meta extends MetaManager<MetaTag[]> {
|
|
11
|
+
/** Page title suffix / Суффикс заголовка страницы */
|
|
11
12
|
protected suffix?: string;
|
|
13
|
+
/** Open Graph meta instance / Экземпляр мета-тегов Open Graph */
|
|
12
14
|
protected og: MetaOg;
|
|
15
|
+
/** Twitter Card meta instance / Экземпляр мета-тегов Twitter Card */
|
|
13
16
|
protected twitter: MetaTwitter;
|
|
14
17
|
/**
|
|
15
18
|
* Creates an instance of Meta with integrated Open Graph and Twitter Card support.
|
|
@@ -160,7 +163,7 @@ export declare class Meta extends MetaManager<MetaTag[]> {
|
|
|
160
163
|
*
|
|
161
164
|
* Устанавливает суффикс для добавления к заголовку страницы.
|
|
162
165
|
* @param suffix title suffix (e.g. 'My Site') / суффикс заголовка (например, 'Мой Сайт')
|
|
163
|
-
* @returns void
|
|
166
|
+
* @returns void / ничего не возвращает
|
|
164
167
|
*/
|
|
165
168
|
setSuffix(suffix?: string): void;
|
|
166
169
|
/**
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** Meta-tags dictionary structure / Структура словаря мета-тегов */
|
|
1
2
|
type MetaList<T extends readonly string[]> = {
|
|
2
3
|
[K in T[number]]?: string;
|
|
3
4
|
};
|
|
@@ -9,6 +10,7 @@ type MetaList<T extends readonly string[]> = {
|
|
|
9
10
|
export declare class MetaManager<T extends readonly string[], Key extends keyof MetaList<T> = keyof MetaList<T>> {
|
|
10
11
|
protected readonly listMeta: T;
|
|
11
12
|
protected readonly isProperty: boolean;
|
|
13
|
+
/** Meta tags map / Карта мета-тегов */
|
|
12
14
|
protected readonly items: MetaList<T>;
|
|
13
15
|
/**
|
|
14
16
|
* Creates an instance of MetaManager.
|
package/dist/classes/MetaOg.d.ts
CHANGED
|
@@ -6,6 +6,11 @@ import { MetaOpenGraphTag, MetaOpenGraphType } from '../types/metaTypes';
|
|
|
6
6
|
* Класс для управления мета-тегами Open Graph.
|
|
7
7
|
*/
|
|
8
8
|
export declare class MetaOg extends MetaManager<MetaOpenGraphTag[]> {
|
|
9
|
+
/**
|
|
10
|
+
* Constructor for MetaOg.
|
|
11
|
+
*
|
|
12
|
+
* Конструктор для MetaOg.
|
|
13
|
+
*/
|
|
9
14
|
constructor();
|
|
10
15
|
/**
|
|
11
16
|
* Gets the Open Graph title.
|
|
@@ -25,7 +30,7 @@ export declare class MetaOg extends MetaManager<MetaOpenGraphTag[]> {
|
|
|
25
30
|
* Gets the Open Graph URL.
|
|
26
31
|
*
|
|
27
32
|
* Получает URL Open Graph.
|
|
28
|
-
* @returns URL / URL
|
|
33
|
+
* @returns URL / URL адрес
|
|
29
34
|
*/
|
|
30
35
|
getUrl(): string;
|
|
31
36
|
/**
|
|
@@ -76,7 +81,7 @@ export declare class MetaOg extends MetaManager<MetaOpenGraphTag[]> {
|
|
|
76
81
|
* Sets the Open Graph URL.
|
|
77
82
|
*
|
|
78
83
|
* Устанавливает URL Open Graph.
|
|
79
|
-
* @param url URL / URL
|
|
84
|
+
* @param url URL / URL адрес
|
|
80
85
|
* @returns current instance / текущий экземпляр
|
|
81
86
|
*/
|
|
82
87
|
setUrl(url: string): this;
|
|
@@ -6,6 +6,11 @@ import { MetaTwitterCard, MetaTwitterTag } from '../types/metaTypes';
|
|
|
6
6
|
* Класс для управления мета-тегами Twitter Card.
|
|
7
7
|
*/
|
|
8
8
|
export declare class MetaTwitter extends MetaManager<MetaTwitterTag[]> {
|
|
9
|
+
/**
|
|
10
|
+
* Constructor for MetaTwitter.
|
|
11
|
+
*
|
|
12
|
+
* Конструктор для MetaTwitter.
|
|
13
|
+
*/
|
|
9
14
|
constructor();
|
|
10
15
|
/**
|
|
11
16
|
* Gets the Twitter Card type.
|
|
@@ -32,7 +37,7 @@ export declare class MetaTwitter extends MetaManager<MetaTwitterTag[]> {
|
|
|
32
37
|
* Gets the page URL.
|
|
33
38
|
*
|
|
34
39
|
* Получает URL страницы.
|
|
35
|
-
* @returns URL / URL
|
|
40
|
+
* @returns URL / URL адрес
|
|
36
41
|
*/
|
|
37
42
|
getUrl(): string;
|
|
38
43
|
/**
|
|
@@ -84,7 +89,7 @@ export declare class MetaTwitter extends MetaManager<MetaTwitterTag[]> {
|
|
|
84
89
|
* Sets the page URL.
|
|
85
90
|
*
|
|
86
91
|
* Устанавливает URL страницы.
|
|
87
|
-
* @param url URL / URL
|
|
92
|
+
* @param url URL / URL адрес
|
|
88
93
|
* @returns current instance / текущий экземпляр
|
|
89
94
|
*/
|
|
90
95
|
setUrl(url: string): this;
|
package/dist/classes/Query.d.ts
CHANGED
|
@@ -7,9 +7,13 @@ import { FunctionVoid } from '../types/basicTypes';
|
|
|
7
7
|
export declare class ResumableTimer {
|
|
8
8
|
protected callback: FunctionVoid;
|
|
9
9
|
protected delay: number;
|
|
10
|
+
/** setTimeout identifier / Идентификатор setTimeout */
|
|
10
11
|
protected timerId?: ReturnType<typeof setTimeout>;
|
|
12
|
+
/** Timestamp when timer started / Метка времени старта таймера */
|
|
11
13
|
protected startTime?: number;
|
|
14
|
+
/** Remaining milliseconds / Оставшиеся миллисекунды */
|
|
12
15
|
protected remaining?: number;
|
|
16
|
+
/** Completion flag / Флаг завершения */
|
|
13
17
|
protected completed: boolean;
|
|
14
18
|
/**
|
|
15
19
|
* Constructor
|
|
@@ -5,6 +5,7 @@ import { DataStorage } from './DataStorage';
|
|
|
5
5
|
* Класс для получения ширины скролла.
|
|
6
6
|
*/
|
|
7
7
|
export declare class ScrollbarWidth {
|
|
8
|
+
/** Calculation state flag / Флаг состояния вычисления */
|
|
8
9
|
private static calculate;
|
|
9
10
|
/**
|
|
10
11
|
* Checks whether to enable scroll hiding.
|
|
@@ -11,9 +11,13 @@ import { SearchCacheItem, SearchColumns, SearchFormatItem, SearchFormatList, Sea
|
|
|
11
11
|
* Координирует работу опций, состояния элементов, логики сопоставления и хранения данных.
|
|
12
12
|
*/
|
|
13
13
|
export declare class SearchList<T extends SearchItem, K extends SearchColumns<T>> {
|
|
14
|
+
/** Search options instance / Экземпляр опций поиска */
|
|
14
15
|
protected options: SearchListOptions;
|
|
16
|
+
/** Search list item state / Состояние элемента списка поиска */
|
|
15
17
|
protected item: SearchListItem;
|
|
18
|
+
/** Search matcher instance / Экземпляр сопоставителя поиска */
|
|
16
19
|
protected matcher: SearchListMatcher;
|
|
20
|
+
/** Search data storage instance / Экземпляр хранилища данных поиска */
|
|
17
21
|
protected data: SearchListData<T, K>;
|
|
18
22
|
/**
|
|
19
23
|
* Constructor for SearchList.
|
|
@@ -11,6 +11,7 @@ export declare class SearchListData<T extends SearchItem, K extends SearchColumn
|
|
|
11
11
|
protected columns: K | undefined;
|
|
12
12
|
protected item: SearchListItem;
|
|
13
13
|
protected options: SearchListOptions;
|
|
14
|
+
/** Search items cache / Кэш элементов поиска */
|
|
14
15
|
protected listCache?: SearchCache<T>;
|
|
15
16
|
/**
|
|
16
17
|
* Constructor for SearchListData.
|
|
@@ -130,14 +131,14 @@ export declare class SearchListData<T extends SearchItem, K extends SearchColumn
|
|
|
130
131
|
* Initializes the search cache.
|
|
131
132
|
*
|
|
132
133
|
* Инициализирует кэш поиска.
|
|
133
|
-
* @returns void
|
|
134
|
+
* @returns void / ничего не возвращает
|
|
134
135
|
*/
|
|
135
136
|
protected initCache(): void;
|
|
136
137
|
/**
|
|
137
138
|
* Resets the search cache.
|
|
138
139
|
*
|
|
139
140
|
* Сбрасывает кэш поиска.
|
|
140
|
-
* @returns void
|
|
141
|
+
* @returns void / ничего не возвращает
|
|
141
142
|
*/
|
|
142
143
|
protected resetCache(): void;
|
|
143
144
|
}
|
|
@@ -9,6 +9,7 @@ import { SearchCacheItem } from '../types/searchTypes';
|
|
|
9
9
|
export declare class SearchListMatcher {
|
|
10
10
|
protected item: SearchListItem;
|
|
11
11
|
protected options: SearchListOptions;
|
|
12
|
+
/** Regular expression matcher instance / Экземпляр регулярного выражения сопоставителя */
|
|
12
13
|
protected matcher: RegExp | undefined;
|
|
13
14
|
/**
|
|
14
15
|
* Constructor for SearchListMatcher.
|
|
@@ -44,14 +45,14 @@ export declare class SearchListMatcher {
|
|
|
44
45
|
* Updates the matcher based on the current item value and options.
|
|
45
46
|
*
|
|
46
47
|
* Обновляет сопоставитель на основе текущего значения элемента и опций.
|
|
47
|
-
* @returns void
|
|
48
|
+
* @returns void / ничего не возвращает
|
|
48
49
|
*/
|
|
49
50
|
update(): void;
|
|
50
51
|
/**
|
|
51
52
|
* Initializes or resets the regular expression matcher.
|
|
52
53
|
*
|
|
53
54
|
* Инициализирует или сбрасывает сопоставитель регулярных выражений.
|
|
54
|
-
* @returns void
|
|
55
|
+
* @returns void / ничего не возвращает
|
|
55
56
|
*/
|
|
56
57
|
protected initMatcher(): void;
|
|
57
58
|
}
|
|
@@ -3,6 +3,7 @@ type ServerStorageItem = {
|
|
|
3
3
|
value: any;
|
|
4
4
|
hydration: boolean;
|
|
5
5
|
};
|
|
6
|
+
/** Map of server storage items / Карта элементов серверного хранилища */
|
|
6
7
|
type ServerStorageList = Record<string, ServerStorageItem>;
|
|
7
8
|
/**
|
|
8
9
|
* Class for managing data storage during server-side rendering (SSR).
|
|
@@ -12,8 +13,11 @@ type ServerStorageList = Record<string, ServerStorageItem>;
|
|
|
12
13
|
* Обеспечивает изоляцию данных между параллельными запросами, используя контекст конкретного запроса.
|
|
13
14
|
*/
|
|
14
15
|
export declare class ServerStorage {
|
|
16
|
+
/** In-memory storage fallback / Резервное хранилище в памяти */
|
|
15
17
|
protected static storage?: ServerStorageList;
|
|
18
|
+
/** Request context listener / Слушатель контекста запроса */
|
|
16
19
|
protected static listener?: () => Record<string, any> | undefined;
|
|
20
|
+
/** Flag to hide missing storage error / Флаг скрытия ошибки отсутствия хранилища */
|
|
17
21
|
protected static hideError?: boolean;
|
|
18
22
|
/**
|
|
19
23
|
* Initializes the storage with a context listener.
|
|
@@ -83,8 +87,7 @@ export declare class ServerStorage {
|
|
|
83
87
|
* Returns storage.
|
|
84
88
|
*
|
|
85
89
|
* Возвращает хранилище.
|
|
86
|
-
* @param isInit whether to initialize the storage if it does not exist /
|
|
87
|
-
* инициализировать ли хранилище, если оно не существует
|
|
90
|
+
* @param isInit whether to initialize the storage if it does not exist / инициализировать ли хранилище, если оно не существует
|
|
88
91
|
* @param status optional status for error reporting / необязательный статус для отчета об ошибках
|
|
89
92
|
* @returns storage list / список хранилища
|
|
90
93
|
*/
|
|
@@ -15,10 +15,12 @@ export declare class StorageCallback<T = any, Callback = (value: T) => void | Pr
|
|
|
15
15
|
* @returns StorageCallback instance / экземпляр StorageCallback
|
|
16
16
|
*/
|
|
17
17
|
static getInstance<T>(name: string, group?: string): StorageCallback<T, (value: T) => void | Promise<void>>;
|
|
18
|
+
/** List of registered callbacks / Список зарегистрированных колбэков */
|
|
18
19
|
protected callbacks: {
|
|
19
20
|
callback: Callback;
|
|
20
21
|
isOnce?: boolean;
|
|
21
22
|
}[];
|
|
23
|
+
/** Loading state / Состояние загрузки */
|
|
22
24
|
protected loading: boolean;
|
|
23
25
|
/**
|
|
24
26
|
* Constructor for initialization.
|
|
@@ -6,6 +6,7 @@ import { TranslateCode, TranslateConfig, TranslateDataFile, TranslateList } from
|
|
|
6
6
|
* Класс для получения переведенного текста.
|
|
7
7
|
*/
|
|
8
8
|
export declare class Translate {
|
|
9
|
+
/** TranslateInstance singleton item / Экземпляр синглтона TranslateInstance */
|
|
9
10
|
protected static item?: TranslateInstance;
|
|
10
11
|
/**
|
|
11
12
|
* Getting the translation text by its code.
|
|
@@ -27,11 +28,9 @@ export declare class Translate {
|
|
|
27
28
|
* Getting the translation text by its code (Sync).
|
|
28
29
|
*
|
|
29
30
|
* Получение текста перевода по его коду (Sync).
|
|
30
|
-
* @param name code name/ название кода
|
|
31
|
-
* @param first If set to false, returns an empty string if there is no text/
|
|
32
|
-
*
|
|
33
|
-
* @param replacement If set, replaces the text with the specified values/
|
|
34
|
-
* если установлено, заменяет текст на указанные значения
|
|
31
|
+
* @param name code name / название кода
|
|
32
|
+
* @param first If set to false, returns an empty string if there is no text / если установлено false, возвращает пустую строку, если нет текста
|
|
33
|
+
* @param replacement If set, replaces the text with the specified values / если установлено, заменяет текст на указанные значения
|
|
35
34
|
* @returns translation text / текст перевода
|
|
36
35
|
*/
|
|
37
36
|
static getSync(name: string, first?: boolean, replacement?: string[] | Record<string, string | number>): string;
|
|
@@ -47,9 +46,8 @@ export declare class Translate {
|
|
|
47
46
|
* Getting a list of translations by an array of text codes.
|
|
48
47
|
*
|
|
49
48
|
* Получение списка переводов по массиву кодов текста.
|
|
50
|
-
* @param names list of codes to get translations/ список кодов для получения переводов
|
|
51
|
-
* @param first If set to false, returns an empty string if there is no text/
|
|
52
|
-
* если установлено false, возвращает пустую строку, если нет текста
|
|
49
|
+
* @param names list of codes to get translations / список кодов для получения переводов
|
|
50
|
+
* @param first If set to false, returns an empty string if there is no text / если установлено false, возвращает пустую строку, если нет текста
|
|
53
51
|
* @returns object with translations / объект с переводами
|
|
54
52
|
*/
|
|
55
53
|
static getListSync<T extends TranslateCode[]>(names: T, first?: boolean): TranslateList<T>;
|
|
@@ -42,10 +42,8 @@ export declare class TranslateInstance {
|
|
|
42
42
|
*
|
|
43
43
|
* Получение текста перевода по его коду (Sync).
|
|
44
44
|
* @param name code name/ название кода
|
|
45
|
-
* @param first If set to false, returns an empty string if there is no text/
|
|
46
|
-
*
|
|
47
|
-
* @param replacement If set, replaces the text with the specified values/
|
|
48
|
-
* если установлено, заменяет текст на указанные значения
|
|
45
|
+
* @param first If set to false, returns an empty string if there is no text / если установлено false, возвращает пустую строку, если нет текста
|
|
46
|
+
* @param replacement If set, replaces the text with the specified values / если установлено, заменяет текст на указанные значения
|
|
49
47
|
* @returns translation text / текст перевода
|
|
50
48
|
*/
|
|
51
49
|
getSync(name: string, first?: boolean, replacement?: string[] | Record<string, string | number>): string;
|
|
@@ -61,9 +59,8 @@ export declare class TranslateInstance {
|
|
|
61
59
|
* Getting a list of translations by an array of text codes.
|
|
62
60
|
*
|
|
63
61
|
* Получение списка переводов по массиву кодов текста.
|
|
64
|
-
* @param names list of codes to get translations/ список кодов для получения переводов
|
|
65
|
-
* @param first If set to false, returns an empty string if there is no text/
|
|
66
|
-
* если установлено false, возвращает пустую строку, если нет текста
|
|
62
|
+
* @param names list of codes to get translations / список кодов для получения переводов
|
|
63
|
+
* @param first If set to false, returns an empty string if there is no text / если установлено false, возвращает пустую строку, если нет текста
|
|
67
64
|
* @returns object with translations / объект с переводами
|
|
68
65
|
*/
|
|
69
66
|
getListSync<T extends TranslateCode[]>(names: T, first?: boolean): TranslateList<T>;
|
|
@@ -4,9 +4,13 @@
|
|
|
4
4
|
* Базовый абстрактный класс для работы с состояниями на основе URL (Hash, Query).
|
|
5
5
|
*/
|
|
6
6
|
export declare abstract class UrlInstanceAbstract {
|
|
7
|
+
/** URL state data record / Запись данных состояния URL */
|
|
7
8
|
protected data?: Record<string, any>;
|
|
9
|
+
/** Watchers map for URL state variables / Карта слушателей для переменных состояния URL */
|
|
8
10
|
protected watch: Record<string, ((value: any) => void)[]>;
|
|
11
|
+
/** Update block flag / Флаг блокировки обновления */
|
|
9
12
|
protected block: boolean;
|
|
13
|
+
/** Debounce timer instance / Экземпляр таймера задержки */
|
|
10
14
|
protected time?: any;
|
|
11
15
|
/**
|
|
12
16
|
* Get data.
|
package/dist/library.js
CHANGED
|
@@ -123,9 +123,11 @@ function g(e) {
|
|
|
123
123
|
var _ = /[^-+\d., ]+/g, v = /( [0-9]{3}[ ,.]|[0-9] [0-9])/, te = / /g, y = /,/g, ne = /,[0-9]{3}[,.]/, re = /[.][0-9]{3}[,.]/, ie = /[.]/g;
|
|
124
124
|
function b(e) {
|
|
125
125
|
if (typeof e == "number") return Number.isFinite(e) && e || 0;
|
|
126
|
-
if (
|
|
127
|
-
|
|
128
|
-
|
|
126
|
+
if (l(e) && d(e)) {
|
|
127
|
+
let t = e.replace(_, "");
|
|
128
|
+
return t = v.test(t) ? t.replace(te, "").replace(y, ".") : ne.test(t) ? t.replace(y, "") : re.test(t) ? t.replace(ie, "").replace(y, ".") : t.replace(y, "."), parseFloat(t) || 0;
|
|
129
|
+
}
|
|
130
|
+
return 0;
|
|
129
131
|
}
|
|
130
132
|
//#endregion
|
|
131
133
|
//#region src/functions/isSelected.ts
|
|
@@ -160,7 +162,7 @@ function oe(e, t, n) {
|
|
|
160
162
|
return i.length === a.length ? i : (i.pop(), [...i, a.slice(n - 1).join(t)]);
|
|
161
163
|
}
|
|
162
164
|
//#endregion
|
|
163
|
-
//#region \0@oxc-project+runtime@0.
|
|
165
|
+
//#region \0@oxc-project+runtime@0.144.0/helpers/esm/typeof.js
|
|
164
166
|
function C(e) {
|
|
165
167
|
"@babel/helpers - typeof";
|
|
166
168
|
return C = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
@@ -170,7 +172,7 @@ function C(e) {
|
|
|
170
172
|
}, C(e);
|
|
171
173
|
}
|
|
172
174
|
//#endregion
|
|
173
|
-
//#region \0@oxc-project+runtime@0.
|
|
175
|
+
//#region \0@oxc-project+runtime@0.144.0/helpers/esm/toPrimitive.js
|
|
174
176
|
function se(e, t) {
|
|
175
177
|
if (C(e) != "object" || !e) return e;
|
|
176
178
|
var n = e[Symbol.toPrimitive];
|
|
@@ -182,13 +184,13 @@ function se(e, t) {
|
|
|
182
184
|
return (t === "string" ? String : Number)(e);
|
|
183
185
|
}
|
|
184
186
|
//#endregion
|
|
185
|
-
//#region \0@oxc-project+runtime@0.
|
|
187
|
+
//#region \0@oxc-project+runtime@0.144.0/helpers/esm/toPropertyKey.js
|
|
186
188
|
function ce(e) {
|
|
187
189
|
var t = se(e, "string");
|
|
188
190
|
return C(t) == "symbol" ? t : t + "";
|
|
189
191
|
}
|
|
190
192
|
//#endregion
|
|
191
|
-
//#region \0@oxc-project+runtime@0.
|
|
193
|
+
//#region \0@oxc-project+runtime@0.144.0/helpers/esm/defineProperty.js
|
|
192
194
|
function w(e, t, n) {
|
|
193
195
|
return (t = ce(t)) in e ? Object.defineProperty(e, t, {
|
|
194
196
|
value: n,
|
|
@@ -743,7 +745,7 @@ var ve = "ui-storage", ye = () => D.get("__ui:data-storage__", () => ({})), O =
|
|
|
743
745
|
});
|
|
744
746
|
}
|
|
745
747
|
static toMaxAge(e, t) {
|
|
746
|
-
return `Max-Age=${encodeURIComponent(e === "" ? -1 : t == null ?
|
|
748
|
+
return `Max-Age=${encodeURIComponent(e === "" ? -1 : t == null ? 604800 : t)}`;
|
|
747
749
|
}
|
|
748
750
|
static toSameSite(e) {
|
|
749
751
|
return `SameSite=${encodeURIComponent(e == null ? "Strict" : e)}`;
|
|
@@ -1160,7 +1162,7 @@ var Me = class {
|
|
|
1160
1162
|
static unregistrationEvent(e, t) {
|
|
1161
1163
|
this.getItem().unregistrationEvent(e, t);
|
|
1162
1164
|
}
|
|
1163
|
-
}, Fe, Ie =
|
|
1165
|
+
}, Fe, Ie = 86400, P = class {
|
|
1164
1166
|
static init(e, t, n, r) {
|
|
1165
1167
|
this.getListener = e, this.setListener = t, this.removeListener = n, r && (this.cacheStepAgeClearOld = r, this.stepAgeClearOld = r);
|
|
1166
1168
|
}
|
|
@@ -2086,9 +2088,7 @@ var z = class e {
|
|
|
2086
2088
|
case "lsf":
|
|
2087
2089
|
l = `${e}${c ? ` ${c}` : ""} ${s}`;
|
|
2088
2090
|
break;
|
|
2089
|
-
default:
|
|
2090
|
-
l = `${s} ${e}`;
|
|
2091
|
-
break;
|
|
2091
|
+
default: l = `${s} ${e}`;
|
|
2092
2092
|
}
|
|
2093
2093
|
return l;
|
|
2094
2094
|
}
|
|
@@ -2109,8 +2109,8 @@ var z = class e {
|
|
|
2109
2109
|
if (n) {
|
|
2110
2110
|
let t = this.numberObject(r);
|
|
2111
2111
|
return t ? nt(t.formatToParts(b(e)).filter((e) => ["literal", "currency"].indexOf(e.type) === -1), "value").join("") : e.toString();
|
|
2112
|
-
}
|
|
2113
|
-
|
|
2112
|
+
}
|
|
2113
|
+
return "currency" in r ? this.number(typeof e == "number" ? e : i, r) : this.number(typeof e == "number" ? e : i, {
|
|
2114
2114
|
...r,
|
|
2115
2115
|
style: "decimal"
|
|
2116
2116
|
});
|
|
@@ -2173,9 +2173,7 @@ var z = class e {
|
|
|
2173
2173
|
case "many":
|
|
2174
2174
|
t = (o == null ? void 0 : o[3]) || (o == null ? void 0 : o[2]) || (o == null ? void 0 : o[1]);
|
|
2175
2175
|
break;
|
|
2176
|
-
case "other":
|
|
2177
|
-
t = o.length === 6 ? o[o.length - 2] : o[o.length - 1];
|
|
2178
|
-
break;
|
|
2176
|
+
case "other": t = o.length === 6 ? o[o.length - 2] : o[o.length - 1];
|
|
2179
2177
|
}
|
|
2180
2178
|
return `${this.number(a, r)} ${(s = t) == null ? "" : s}`.trim();
|
|
2181
2179
|
}
|
|
@@ -3350,7 +3348,7 @@ var W = {}, lt = {
|
|
|
3350
3348
|
static is(e) {
|
|
3351
3349
|
return e in this.icons || this.getName(e) in this.icons;
|
|
3352
3350
|
}
|
|
3353
|
-
static async get(e, t = "", n =
|
|
3351
|
+
static async get(e, t = "", n = 18e4) {
|
|
3354
3352
|
let r = this.getRaw(e, t);
|
|
3355
3353
|
return typeof r == "string" ? r === gt && n > 0 ? (await this.wait(), this.get(e, t, n - ht)) : r : p(r) ? await r() : await r;
|
|
3356
3354
|
}
|
|
@@ -3822,7 +3820,7 @@ var q = class {
|
|
|
3822
3820
|
}), e;
|
|
3823
3821
|
}
|
|
3824
3822
|
set(e) {
|
|
3825
|
-
return e ? e instanceof URL ?
|
|
3823
|
+
return this.url = e ? e instanceof URL ? new URL(e.href) : /^[a-z0-9+.-]+:/i.test(e) ? new URL(e) : s() ? new URL(e, window.location.origin) : new URL(e, "http://localhost") : s() ? new URL(window.location.href) : new URL("http://localhost"), this;
|
|
3826
3824
|
}
|
|
3827
3825
|
setParam(e, t) {
|
|
3828
3826
|
return this.url.searchParams.set(e, t), this;
|
|
@@ -4120,7 +4118,7 @@ var qt = class {
|
|
|
4120
4118
|
this.initMatcher();
|
|
4121
4119
|
}
|
|
4122
4120
|
initMatcher() {
|
|
4123
|
-
this.item.is() ? this.
|
|
4121
|
+
this.matcher = this.item.is() ? this.options.getFindExactMatch() ? Gt(this.item.get()) : Kt(this.item.get()) : void 0;
|
|
4124
4122
|
}
|
|
4125
4123
|
}, Jt = class {
|
|
4126
4124
|
constructor(e) {
|
|
@@ -4274,7 +4272,7 @@ var qt = class {
|
|
|
4274
4272
|
})), r;
|
|
4275
4273
|
}, tn = (e) => {
|
|
4276
4274
|
var t;
|
|
4277
|
-
return i(e) ? !0 : !!(e && n(e) && ((e == null ? void 0 : e.status) === "success" || e != null && e.success ||
|
|
4275
|
+
return i(e) ? !0 : !!(e && n(e) && ((e == null ? void 0 : e.status) === "success" || e != null && e.success || e != null && (t = e.statusObject) != null && t.status && /^2/.test(String(e.statusObject.status)) || !("status" in e) && !("success" in e) && !("statusObject" in e) && /^2/.test(String(L.getStatus().getStatus()))));
|
|
4278
4276
|
}, nn = "global", rn = 160, an = class {
|
|
4279
4277
|
constructor(e, t = () => A.getLanguage(), n = () => A.getLocation()) {
|
|
4280
4278
|
w(this, "language", void 0), w(this, "location", void 0), w(this, "files", {}), w(this, "data", {}), this.language = t, this.location = n, e && this.add(e);
|
|
@@ -4364,10 +4362,12 @@ var qt = class {
|
|
|
4364
4362
|
});
|
|
4365
4363
|
}
|
|
4366
4364
|
async addNormalOrSync(e) {
|
|
4367
|
-
if (l(e))
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4365
|
+
if (l(e)) {
|
|
4366
|
+
if (L.isLocalhost()) this.addSync(e);
|
|
4367
|
+
else {
|
|
4368
|
+
let t = Object.keys(e);
|
|
4369
|
+
t.length > 0 && await this.add(t);
|
|
4370
|
+
}
|
|
4371
4371
|
}
|
|
4372
4372
|
}
|
|
4373
4373
|
addSyncByLocation(e) {
|
|
@@ -4927,7 +4927,7 @@ var ur = (e) => {
|
|
|
4927
4927
|
return !!(t === "input" || t === "textarea" || t === "select" || e.isContentEditable || e.getAttribute("contenteditable") === "true") && !(e != null && e.readOnly) && !(e != null && e.disabled);
|
|
4928
4928
|
}
|
|
4929
4929
|
return !1;
|
|
4930
|
-
}, dr = (e, t) => e.code
|
|
4930
|
+
}, dr = (e, t) => e.code !== "Space" && e.code !== "Enter" && e.key !== " " && e.key !== "Spacebar" && e.key !== "Enter" && e.keyCode !== 13 && e.keyCode !== 32 ? !1 : t === void 0 ? !ur(e.target) : !t;
|
|
4931
4931
|
//#endregion
|
|
4932
4932
|
//#region src/functions/isFloat.ts
|
|
4933
4933
|
function fr(e) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxtmisha/functional-basic",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.8.
|
|
4
|
+
"version": "1.8.7",
|
|
5
5
|
"type": "module",
|
|
6
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": [
|
|
@@ -63,18 +63,18 @@
|
|
|
63
63
|
"dev": "vite",
|
|
64
64
|
"build": "vite build",
|
|
65
65
|
"preview": "vite preview",
|
|
66
|
-
"test": "
|
|
66
|
+
"test": "vitest",
|
|
67
67
|
"library": "dxt-library",
|
|
68
|
-
"types": "dxt-types",
|
|
69
|
-
"prepublishOnly": "npm run library && npm run build",
|
|
68
|
+
"types": "npm run library && npm run build && dxt-types",
|
|
69
|
+
"prepublishOnly": "npm run library && npm run build && dxt-types-save",
|
|
70
70
|
"publish-to-npm": "npm publish --access public"
|
|
71
71
|
},
|
|
72
72
|
"files": [
|
|
73
|
-
"ai-
|
|
73
|
+
"ai-resources",
|
|
74
74
|
"dist",
|
|
75
75
|
"ai-description.md",
|
|
76
76
|
"ai-doc.md",
|
|
77
|
-
"ai-mcp.json",
|
|
77
|
+
"ai-mcp-resources.json",
|
|
78
78
|
"ai-types.md",
|
|
79
79
|
"CHANGELOG.md",
|
|
80
80
|
"LICENSE",
|
package/ai-mcp.json
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"uri": "@dxtmisha/functional-basic/ai-types.md",
|
|
4
|
-
"name": "TypeScript Types Reference (@dxtmisha/functional-basic)",
|
|
5
|
-
"mimeType": "text/markdown",
|
|
6
|
-
"description": "Comprehensive TypeScript type definitions, enums, classes, and utility function declarations covering API client interfaces, metadata management, internationalization, and DOM utilities."
|
|
7
|
-
},
|
|
8
|
-
{
|
|
9
|
-
"uri": "@dxtmisha/functional-basic/ai-description.md",
|
|
10
|
-
"name": "Utility Library Overview (@dxtmisha/functional-basic)",
|
|
11
|
-
"mimeType": "text/markdown",
|
|
12
|
-
"description": "Provides an overview of isomorphic client and server utilities for HTTP networking, state management, localization, data search, DOM handling, and SSR hydration. Outlines architectural conventions and package capabilities across browser and server runtimes."
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"uri": "@dxtmisha/functional-basic/ai-prompts/api-reference.md",
|
|
16
|
-
"name": "API Reference Guide (@dxtmisha/functional-basic)",
|
|
17
|
-
"mimeType": "text/markdown",
|
|
18
|
-
"description": "Comprehensive API reference and usage examples for the `@dxtmisha/functional-basic` package. Covers HTTP client configurations, caching, state storage, localization, DOM events, and core utility functions."
|
|
19
|
-
}
|
|
20
|
-
]
|
|
File without changes
|