@dxtmisha/functional-basic 1.1.0 → 1.1.6

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.
Files changed (178) hide show
  1. package/CHANGELOG.md +81 -0
  2. package/ai-description.txt +1 -0
  3. package/ai-types.txt +1062 -951
  4. package/dist/classes/Api.d.ts +201 -0
  5. package/dist/classes/ApiCache.d.ts +152 -0
  6. package/dist/classes/ApiDataReturn.d.ts +76 -0
  7. package/dist/classes/ApiDefault.d.ts +49 -0
  8. package/dist/classes/ApiHeaders.d.ts +37 -0
  9. package/dist/classes/ApiHydration.d.ts +39 -0
  10. package/dist/classes/ApiInstance.d.ts +283 -0
  11. package/dist/classes/ApiPreparation.d.ts +58 -0
  12. package/dist/classes/ApiResponse.d.ts +154 -0
  13. package/dist/classes/ApiStatus.d.ts +130 -0
  14. package/dist/classes/BroadcastMessage.d.ts +75 -0
  15. package/dist/classes/Cache.d.ts +38 -0
  16. package/dist/classes/CacheItem.d.ts +62 -0
  17. package/dist/classes/CacheStatic.d.ts +36 -0
  18. package/dist/classes/Cookie.d.ts +54 -0
  19. package/dist/classes/CookieBlock.d.ts +30 -0
  20. package/dist/classes/CookieBlockInstance.d.ts +23 -0
  21. package/dist/classes/CookieStorage.d.ts +174 -0
  22. package/dist/classes/DataStorage.d.ts +107 -0
  23. package/dist/classes/Datetime.d.ts +570 -0
  24. package/dist/classes/ErrorCenter.d.ts +72 -0
  25. package/dist/classes/ErrorCenterHandler.d.ts +64 -0
  26. package/dist/classes/ErrorCenterInstance.d.ts +85 -0
  27. package/dist/classes/EventItem.d.ts +251 -0
  28. package/dist/classes/Formatters.d.ts +161 -0
  29. package/dist/classes/Geo.d.ts +151 -0
  30. package/dist/classes/GeoFlag.d.ts +98 -0
  31. package/dist/classes/GeoInstance.d.ts +215 -0
  32. package/dist/classes/GeoIntl.d.ts +304 -0
  33. package/dist/classes/GeoPhone.d.ts +108 -0
  34. package/dist/classes/Global.d.ts +29 -0
  35. package/dist/classes/Hash.d.ts +57 -0
  36. package/dist/classes/HashInstance.d.ts +95 -0
  37. package/dist/classes/Icons.d.ts +128 -0
  38. package/dist/classes/Loading.d.ts +66 -0
  39. package/dist/classes/LoadingInstance.d.ts +99 -0
  40. package/dist/classes/Meta.d.ts +186 -0
  41. package/dist/classes/MetaManager.d.ts +121 -0
  42. package/dist/classes/MetaOg.d.ts +115 -0
  43. package/dist/classes/MetaStatic.d.ts +179 -0
  44. package/dist/classes/MetaTwitter.d.ts +115 -0
  45. package/dist/classes/ResumableTimer.d.ts +81 -0
  46. package/dist/classes/ScrollbarWidth.d.ts +51 -0
  47. package/dist/classes/SearchList.d.ts +128 -0
  48. package/dist/classes/SearchListData.d.ts +143 -0
  49. package/dist/classes/SearchListItem.d.ts +49 -0
  50. package/dist/classes/SearchListMatcher.d.ts +57 -0
  51. package/dist/classes/SearchListOptions.d.ts +66 -0
  52. package/dist/classes/ServerStorage.d.ts +106 -0
  53. package/dist/classes/StorageCallback.d.ts +84 -0
  54. package/dist/classes/Translate.d.ts +119 -0
  55. package/dist/classes/TranslateFile.d.ts +81 -0
  56. package/dist/classes/TranslateInstance.d.ts +206 -0
  57. package/dist/functions/addTagHighlightMatch.d.ts +11 -0
  58. package/dist/functions/anyToString.d.ts +10 -0
  59. package/dist/functions/applyTemplate.d.ts +10 -0
  60. package/dist/functions/arrFill.d.ts +9 -0
  61. package/dist/functions/blobToBase64.d.ts +9 -0
  62. package/dist/functions/capitalize.d.ts +9 -0
  63. package/dist/functions/copyObject.d.ts +10 -0
  64. package/dist/functions/copyObjectLite.d.ts +9 -0
  65. package/dist/functions/createElement.d.ts +21 -0
  66. package/dist/functions/domQuerySelector.d.ts +8 -0
  67. package/dist/functions/domQuerySelectorAll.d.ts +8 -0
  68. package/dist/functions/encodeAttribute.d.ts +8 -0
  69. package/dist/functions/encodeLiteAttribute.d.ts +8 -0
  70. package/dist/functions/ensureMaxSize.d.ts +10 -0
  71. package/dist/functions/escapeExp.d.ts +7 -0
  72. package/dist/functions/eventStopPropagation.d.ts +7 -0
  73. package/dist/functions/executeFunction.d.ts +12 -0
  74. package/dist/functions/executePromise.d.ts +11 -0
  75. package/dist/functions/forEach.d.ts +14 -0
  76. package/dist/functions/frame.d.ts +10 -0
  77. package/dist/functions/getArrayHighlightMatch.d.ts +10 -0
  78. package/dist/functions/getAttributes.d.ts +9 -0
  79. package/dist/functions/getClipboardData.d.ts +9 -0
  80. package/dist/functions/getColumn.d.ts +10 -0
  81. package/dist/functions/getCurrentDate.d.ts +19 -0
  82. package/dist/functions/getCurrentTime.d.ts +15 -0
  83. package/dist/functions/getElement.d.ts +9 -0
  84. package/dist/functions/getElementId.d.ts +26 -0
  85. package/dist/functions/getElementImage.d.ts +8 -0
  86. package/dist/functions/getElementItem.d.ts +12 -0
  87. package/dist/functions/getElementOrWindow.d.ts +8 -0
  88. package/dist/functions/getElementSafeScript.d.ts +9 -0
  89. package/dist/functions/getExactSearchExp.d.ts +8 -0
  90. package/dist/functions/getExp.d.ts +14 -0
  91. package/dist/functions/getHydrationData.d.ts +10 -0
  92. package/dist/functions/getItemByPath.d.ts +9 -0
  93. package/dist/functions/getKey.d.ts +8 -0
  94. package/dist/functions/getLengthOfAllArray.d.ts +8 -0
  95. package/dist/functions/getMaxLengthAllArray.d.ts +9 -0
  96. package/dist/functions/getMinLengthAllArray.d.ts +8 -0
  97. package/dist/functions/getMouseClient.d.ts +9 -0
  98. package/dist/functions/getMouseClientX.d.ts +8 -0
  99. package/dist/functions/getMouseClientY.d.ts +8 -0
  100. package/dist/functions/getObjectByKeys.d.ts +8 -0
  101. package/dist/functions/getObjectNoUndefined.d.ts +9 -0
  102. package/dist/functions/getObjectOrNone.d.ts +8 -0
  103. package/dist/functions/getOnlyText.d.ts +8 -0
  104. package/dist/functions/getRandomText.d.ts +12 -0
  105. package/dist/functions/getRequestString.d.ts +11 -0
  106. package/dist/functions/getSearchExp.d.ts +12 -0
  107. package/dist/functions/getSeparatingSearchExp.d.ts +9 -0
  108. package/dist/functions/getStepPercent.d.ts +9 -0
  109. package/dist/functions/getStepValue.d.ts +9 -0
  110. package/dist/functions/goScroll.d.ts +10 -0
  111. package/dist/functions/goScrollSmooth.d.ts +10 -0
  112. package/dist/functions/goScrollTo.d.ts +10 -0
  113. package/dist/functions/handleShare.d.ts +10 -0
  114. package/dist/functions/inArray.d.ts +9 -0
  115. package/dist/functions/initScrollbarOffset.d.ts +7 -0
  116. package/dist/functions/intersectKey.d.ts +9 -0
  117. package/dist/functions/isApiSuccess.d.ts +9 -0
  118. package/dist/functions/isArray.d.ts +8 -0
  119. package/dist/functions/isDifferent.d.ts +10 -0
  120. package/dist/functions/isDomData.d.ts +7 -0
  121. package/dist/functions/isDomRuntime.d.ts +10 -0
  122. package/dist/functions/isElementVisible.d.ts +11 -0
  123. package/dist/functions/isEnter.d.ts +9 -0
  124. package/dist/functions/isFilled.d.ts +10 -0
  125. package/dist/functions/isFloat.d.ts +8 -0
  126. package/dist/functions/isFunction.d.ts +9 -0
  127. package/dist/functions/isInDom.d.ts +9 -0
  128. package/dist/functions/isInput.d.ts +8 -0
  129. package/dist/functions/isIntegerBetween.d.ts +9 -0
  130. package/dist/functions/isNull.d.ts +9 -0
  131. package/dist/functions/isNumber.d.ts +8 -0
  132. package/dist/functions/isObject.d.ts +8 -0
  133. package/dist/functions/isObjectNotArray.d.ts +8 -0
  134. package/dist/functions/isOnLine.d.ts +7 -0
  135. package/dist/functions/isSelected.d.ts +9 -0
  136. package/dist/functions/isSelectedByList.d.ts +9 -0
  137. package/dist/functions/isShare.d.ts +7 -0
  138. package/dist/functions/isString.d.ts +8 -0
  139. package/dist/functions/isWindow.d.ts +7 -0
  140. package/dist/functions/random.d.ts +9 -0
  141. package/dist/functions/removeCommonPrefix.d.ts +9 -0
  142. package/dist/functions/replaceComponentName.d.ts +9 -0
  143. package/dist/functions/replaceRecursive.d.ts +11 -0
  144. package/dist/functions/replaceTemplate.d.ts +10 -0
  145. package/dist/functions/resizeImageByMax.d.ts +19 -0
  146. package/dist/functions/secondToTime.d.ts +9 -0
  147. package/dist/functions/setElementItem.d.ts +11 -0
  148. package/dist/functions/setValues.d.ts +18 -0
  149. package/dist/functions/sleep.d.ts +8 -0
  150. package/dist/functions/splice.d.ts +13 -0
  151. package/dist/functions/strFill.d.ts +9 -0
  152. package/dist/functions/strSplit.d.ts +12 -0
  153. package/dist/functions/toArray.d.ts +17 -0
  154. package/dist/functions/toCamelCase.d.ts +8 -0
  155. package/dist/functions/toCamelCaseFirst.d.ts +8 -0
  156. package/dist/functions/toDate.d.ts +8 -0
  157. package/dist/functions/toKebabCase.d.ts +15 -0
  158. package/dist/functions/toNumber.d.ts +19 -0
  159. package/dist/functions/toNumberByMax.d.ts +11 -0
  160. package/dist/functions/toPercent.d.ts +9 -0
  161. package/dist/functions/toPercentBy100.d.ts +9 -0
  162. package/dist/functions/toString.d.ts +8 -0
  163. package/dist/functions/transformation.d.ts +21 -0
  164. package/dist/functions/uint8ArrayToBase64.d.ts +8 -0
  165. package/dist/functions/uniqueArray.d.ts +8 -0
  166. package/dist/functions/writeClipboardData.d.ts +8 -0
  167. package/dist/library.d.ts +171 -8722
  168. package/dist/library.js +416 -338
  169. package/dist/media/errorCauseList.d.ts +2 -0
  170. package/dist/types/apiTypes.d.ts +217 -0
  171. package/dist/types/basicTypes.d.ts +131 -0
  172. package/dist/types/errorCenter.d.ts +42 -0
  173. package/dist/types/formattersTypes.d.ts +224 -0
  174. package/dist/types/geoTypes.d.ts +86 -0
  175. package/dist/types/metaTypes.d.ts +586 -0
  176. package/dist/types/searchTypes.d.ts +53 -0
  177. package/dist/types/translateTypes.d.ts +54 -0
  178. package/package.json +7 -5
@@ -0,0 +1,81 @@
1
+ import { TranslateDataFile, TranslateDataFileList } from '../types/translateTypes';
2
+ /**
3
+ * Class for working with translation files.
4
+ *
5
+ * Класс для работы с файлами перевода.
6
+ */
7
+ export declare class TranslateFile {
8
+ protected language: string | (() => string);
9
+ protected location: string | (() => string);
10
+ /** List of files with translations/ Список файлов с переводами */
11
+ protected files: TranslateDataFile;
12
+ /** Data from files/ Данные из файлов */
13
+ protected data: Record<string, TranslateDataFileList>;
14
+ /**
15
+ * Creates an instance of the class.
16
+ *
17
+ * Создает экземпляр класса.
18
+ * @param data list of files/ список файлов
19
+ * @param language language/ язык
20
+ * @param location location/ местоположение
21
+ */
22
+ constructor(data?: TranslateDataFile, language?: string | (() => string), location?: string | (() => string));
23
+ /**
24
+ * Checks if there are files for the current location or language.
25
+ *
26
+ * Проверяет, есть ли файлы для текущего местоположения или языка.
27
+ * @returns boolean / логическое значение
28
+ */
29
+ isFile(): boolean;
30
+ /**
31
+ * Returns the location.
32
+ *
33
+ * Возвращает местоположение.
34
+ * @returns location / местоположение
35
+ */
36
+ getLocation(): string;
37
+ /**
38
+ * Returns the language.
39
+ *
40
+ * Возвращает язык.
41
+ * @returns language / язык
42
+ */
43
+ getLanguage(): string;
44
+ /**
45
+ * Returns a list of translations from the file for the current location.
46
+ *
47
+ * Возвращает список переводов из файла для текущего местоположения.
48
+ * @returns promise with list of translations / промис со списком переводов
49
+ */
50
+ getList(): Promise<TranslateDataFileList | undefined>;
51
+ /**
52
+ * Adds a list of files with translations.
53
+ *
54
+ * Добавляет список файлов с переводами.
55
+ * @param data list of files/ список файлов
56
+ */
57
+ add(data: TranslateDataFile): void;
58
+ /**
59
+ * Returns the key for the current location from the list of files.
60
+ *
61
+ * Возвращает ключ для текущего местоположения из списка файлов.
62
+ * @returns file key or undefined / ключ файла или undefined
63
+ */
64
+ protected getIndex(): string | undefined;
65
+ /**
66
+ * Returns a list of translations from the cache.
67
+ *
68
+ * Возвращает список переводов из кэша.
69
+ * @param index file key/ ключ файла
70
+ * @returns list of translations or undefined / список переводов или undefined
71
+ */
72
+ protected getByData(index: string): TranslateDataFileList | undefined;
73
+ /**
74
+ * Returns a list of translations from the file and caches the result.
75
+ *
76
+ * Возвращает список переводов из файла и кэширует результат.
77
+ * @param index file key/ ключ файла
78
+ * @returns promise with list of translations or undefined / промис со списком переводов или undefined
79
+ */
80
+ protected getByFile(index: string): Promise<TranslateDataFileList | undefined>;
81
+ }
@@ -0,0 +1,206 @@
1
+ import { TranslateFile } from './TranslateFile';
2
+ import { TranslateCode, TranslateDataFile, TranslateList } from '../types/translateTypes';
3
+ /**
4
+ * Class for getting the translated text.
5
+ *
6
+ * Класс для получения переведенного текста.
7
+ */
8
+ export declare class TranslateInstance {
9
+ protected url: string;
10
+ protected propsName: string;
11
+ protected readonly files: TranslateFile;
12
+ /** List of translations/ Список переводов */
13
+ protected readonly data: Record<string, string>;
14
+ /** Cache of codes to get/ Кэш кодов для получения */
15
+ protected cache: string[];
16
+ /** List of resolves for promises/ Список разрешений для промисов */
17
+ protected resolveList: (() => void)[];
18
+ /** Timeout for getting translations/ Таймаут для получения переводов */
19
+ protected timeout?: any;
20
+ /** Flag indicating whether to read from the API/ Флаг, указывающий, нужно ли читать из API */
21
+ protected isReadApi: boolean;
22
+ /**
23
+ * Creates an instance of the class.
24
+ *
25
+ * Создает экземпляр класса.
26
+ * @param url URL for getting translations/ URL для получения переводов
27
+ * @param propsName Property name for getting translations/ Имя свойства для получения переводов
28
+ * @param files List of files with translations/ Список файлов с переводами
29
+ */
30
+ constructor(url?: string, propsName?: string, files?: TranslateFile);
31
+ /**
32
+ * Getting the translation text by its code.
33
+ *
34
+ * Получение текста перевода по его коду.
35
+ * @param name code name/ название кода
36
+ * @param replacement If set, replaces the text with the specified values/ если установлено, заменяет текст на указанные значения
37
+ * @returns translation text / текст перевода
38
+ */
39
+ get(name: string, replacement?: string[] | Record<string, string | number>): Promise<string>;
40
+ /**
41
+ * Getting the translation text by its code (Sync).
42
+ *
43
+ * Получение текста перевода по его коду (Sync).
44
+ * @param name code name/ название кода
45
+ * @param first If set to false, returns an empty string if there is no text/
46
+ * если установлено false, возвращает пустую строку, если нет текста
47
+ * @param replacement If set, replaces the text with the specified values/
48
+ * если установлено, заменяет текст на указанные значения
49
+ * @returns translation text / текст перевода
50
+ */
51
+ getSync(name: string, first?: boolean, replacement?: string[] | Record<string, string | number>): string;
52
+ /**
53
+ * Getting a list of translations by an array of text codes.
54
+ *
55
+ * Получение списка переводов по массиву кодов текста.
56
+ * @param names list of codes to get translations/ список кодов для получения переводов
57
+ * @returns object with translations / объект с переводами
58
+ */
59
+ getList<T extends TranslateCode[]>(names: T): Promise<TranslateList<T>>;
60
+ /**
61
+ * Getting a list of translations by an array of text codes.
62
+ *
63
+ * Получение списка переводов по массиву кодов текста.
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, возвращает пустую строку, если нет текста
67
+ * @returns object with translations / объект с переводами
68
+ */
69
+ getListSync<T extends TranslateCode[]>(names: T, first?: boolean): TranslateList<T>;
70
+ /**
71
+ * Added a list of translated texts.
72
+ *
73
+ * Добавлен список переведенных текстов.
74
+ * @param names list of codes to get translations/ список кодов для получения переводов
75
+ * @returns promise resolving when translations are added / промис, разрешающийся после добавления переводов
76
+ */
77
+ add(names: string | string[]): Promise<void>;
78
+ /**
79
+ * Adds texts in sync mode.
80
+ *
81
+ * Добавляет тексты в режиме синхронизации.
82
+ * @param data list of texts in the form of key-value/ список текстов в виде ключ-значение
83
+ */
84
+ addSync(data: Record<string, string>): void;
85
+ /**
86
+ * Adding data in the form of a query or directly, depending on the execution environment.
87
+ *
88
+ * Добавление данных в виде запроса или напрямую, в зависимости от среды выполнения.
89
+ * @param data list of texts in the form of key-value/ список текстов в виде ключ-значение
90
+ * @returns promise / промис
91
+ */
92
+ addNormalOrSync(data: Record<string, string>): Promise<void>;
93
+ /**
94
+ * Adds texts synchronously by location.
95
+ *
96
+ * Добавляет тексты синхронно по местоположению.
97
+ * @param data list of texts by location/ список текстов по местоположению
98
+ */
99
+ addSyncByLocation(data: Record<string, Record<string, string>>): void;
100
+ /**
101
+ * Adds texts synchronously from the file.
102
+ *
103
+ * Добавляет тексты синхронно из файла.
104
+ * @param data file with translations/ файл с переводами
105
+ */
106
+ addSyncByFile(data: TranslateDataFile): void;
107
+ /**
108
+ * Change the path to the script for obtaining the translation.
109
+ *
110
+ * Изменить путь к скрипту для получения перевода.
111
+ * @param url path to the script/ путь к скрипту
112
+ */
113
+ setUrl(url: string): this;
114
+ /**
115
+ * Change the name of the property to get the translation.
116
+ *
117
+ * Изменить имя свойства для получения перевода.
118
+ * @param name property name/ имя свойства
119
+ */
120
+ setPropsName(name: string): this;
121
+ /**
122
+ * Change the read mode from the API.
123
+ *
124
+ * Изменить режим чтения из API.
125
+ * @param value read mode/ режим чтения
126
+ */
127
+ setReadApi(value: boolean): this;
128
+ /**
129
+ * Checks for translation by code, taking into account fallback options.
130
+ *
131
+ * Проверяет наличие перевода по коду с учетом запасных вариантов.
132
+ * @param name code name/ название кода
133
+ * @returns boolean / логическое значение
134
+ */
135
+ protected hasName(name: string): boolean;
136
+ /**
137
+ * Retrieves translation text by code, returning the first matching fallback.
138
+ *
139
+ * Получает текст перевода по коду, возвращая первое совпадение из запасных вариантов.
140
+ * @param name code name/ название кода
141
+ * @returns translation text or undefined / текст перевода или undefined
142
+ */
143
+ protected getText(name: string): string | undefined;
144
+ /**
145
+ * Getting the full title for translation.
146
+ *
147
+ * Получение полного названия для перевода.
148
+ * @param name code name/ название кода
149
+ * @returns full title / полное название
150
+ */
151
+ protected getName(name: string): string;
152
+ /**
153
+ * Getting the title for translation by language.
154
+ *
155
+ * Получение названия для перевода по языку.
156
+ * @param name code name/ название кода
157
+ * @returns title by language / название по языку
158
+ */
159
+ protected getNameByLanguage(name: string): string;
160
+ /**
161
+ * Getting the title for translation globally.
162
+ *
163
+ * Получение названия для перевода глобально.
164
+ * @param name code name/ название кода
165
+ * @returns global title / глобальное название
166
+ */
167
+ protected getNameByGlobal(name: string): string;
168
+ /**
169
+ * Returns a list of names that are not yet in the list.
170
+ *
171
+ * Возвращает список имен, которых еще нет в списке.
172
+ * @param names list of codes to get translations/ список кодов для получения переводов
173
+ * @returns list of missing names / список отсутствующих имен
174
+ */
175
+ protected getNamesNone(names: string | string[]): string[];
176
+ /**
177
+ * Getting the list of translations from the server.
178
+ *
179
+ * Получение списка переводов с сервера.
180
+ * @returns promise with record of translations / промис с записью переводов
181
+ */
182
+ protected getResponse(): Promise<Record<string, string>>;
183
+ /**
184
+ * Replaces the text with the specified values.
185
+ *
186
+ * Заменяет текст на указанные значения.
187
+ * @param text text to replace/ текст для замены
188
+ * @param replacement values for replacement/ значения для замены
189
+ * @returns replaced text / замененный текст
190
+ */
191
+ protected replacement(text: string, replacement?: string[] | Record<string, string | number>): any;
192
+ /**
193
+ * Adding translation data from the server.
194
+ *
195
+ * Добавление данных по переводу с сервера.
196
+ * @returns promise / промис
197
+ */
198
+ protected make(): Promise<void>;
199
+ /**
200
+ * Adding translation data from the list.
201
+ *
202
+ * Добавление данных по переводу из списка.
203
+ * @param list list of translations/ список переводов
204
+ */
205
+ protected makeList(list: Record<string, string>): void;
206
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Adds a tag to highlight the match in the string.
3
+ *
4
+ * Добавляет тег для выделения совпадения в строке.
5
+ * @param value initial string / исходная строка
6
+ * @param search search string or RegExp / строка поиска или регулярное выражение
7
+ * @param className highlighting class / класс выделения
8
+ * @param shouldEscape should escape the string / нужно ли экранировать строку
9
+ * @returns string with highlighting / строка с выделением
10
+ */
11
+ export declare function addTagHighlightMatch(value: string, search?: string | RegExp, className?: string, shouldEscape?: boolean): string;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Conversion of a value to a string.
3
+ *
4
+ * Преобразование значения в строку.
5
+ * @param value values for conversion / значения для преобразования
6
+ * @param isArrayString if true, then arrays will be converted to strings / если true, то массивы будут преобразованы в строки
7
+ * @param trim if true, then the resulting string will be trimmed / если true, то результирующая строка будет обрезана
8
+ * @returns string representation of the passed value / строковое представление переданного значения
9
+ */
10
+ export declare function anyToString<V>(value: V, isArrayString?: boolean, trim?: boolean): string;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Applies a template to the text, replacing keys with values from the replacement object
3
+ *
4
+ * Применяет шаблон к тексту, заменяя ключи на значения из объекта замены
5
+ * @param text text with a template containing keys in square or curly brackets, for example "[key]" or "{key}"/
6
+ * текст с шаблоном, содержащим ключи в квадратных или фигурных скобках, например "[key]" или "{key}"
7
+ * @param replacement an object containing key-value pairs for replacement/
8
+ * объект, содержащий пары ключ-значение для замены
9
+ */
10
+ export declare const applyTemplate: (text: string, replacement?: Record<string, string | number | boolean> | string[]) => string;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * The method creates an array of "count" elements with values equal to `value`.
3
+ *
4
+ * Метод создает массив из "count" элементов со значениями равными `value`.
5
+ * @param value value to fill the array with / значение, заполняющее массив
6
+ * @param count the number of elements in that array / число элементов этого массива
7
+ * @returns created array / созданный массив
8
+ */
9
+ export declare function arrFill<T>(value: T, count: number): T[];
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Convert a Blob to a Base64 string.
3
+ *
4
+ * Преобразует Blob в строку Base64.
5
+ * @param blob The Blob to convert / Blob для преобразования
6
+ * @param clean if true, removes the data URL prefix / если true, удаляет префикс data URL
7
+ * @returns promise with the base64 string or undefined / промис со строкой base64 или undefined
8
+ */
9
+ export declare function blobToBase64(blob: Blob, clean?: boolean): Promise<string | undefined>;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Capitalizes the first letter of a string.
3
+ *
4
+ * Делает первую букву строки заглавной.
5
+ * @param value string to capitalize / строка для капитализации
6
+ * @param isLocale use locale / использовать локаль
7
+ * @returns capitalized string / капитализированная строка
8
+ */
9
+ export declare function capitalize(value: string, isLocale?: boolean): string;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Creates a deep copy of an object for independent data management.
3
+ * The goal of the method is to get a completely new separate instance of the object to avoid unwanted mutations.
4
+ *
5
+ * Создает глубокую копию объекта для независимого управления данными.
6
+ * Цель метода — получить полностью новый отдельный экземпляр объекта во избежание нежелательных мутаций.
7
+ * @param value object for copying / объект для копирования
8
+ * @returns returns a new copy of the object / возвращает новую копию объекта
9
+ */
10
+ export declare function copyObject<T>(value: T): T;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Copies a simple object.
3
+ *
4
+ * Копирует простой объект.
5
+ * @param value object for copying / объект для копирования
6
+ * @param source additional properties for copying / дополнительные свойства для копирования
7
+ * @returns returns a new copy of the object / возвращает новую копию объекта
8
+ */
9
+ export declare function copyObjectLite<T, R = T>(value: T, source?: any): R;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * In HTML documents, creates an element with the tag that is specified in the argument.
3
+ *
4
+ * В HTML-документах создаёт элемент с тегом, который указан в аргументе.
5
+ *
6
+ * @param parentElement the DOM node's parent Element / родитель для нового элемента
7
+ * @param tagName a string that specifies the type of element to be created / строка, указывающая элемент какого типа должен быть создан
8
+ * @param options an object with attributes or a function for processing an element / объект с атрибутами или функция для обработки элемента
9
+ * @param referenceElement the node before which newNode is inserted / элемент, перед которым будет вставлен newElement
10
+ * @returns created element, or undefined in SSR / созданный элемент или undefined при SSR
11
+ *
12
+ * @remarks
13
+ * When running on the server, the function always returns `undefined`.
14
+ * If you use it within a component's rendering logic, it may lead to hydration mismatches.
15
+ * It is recommended to call this function only inside lifecycle hooks that run exclusively on the client (e.g., `onMounted` in Vue or `useEffect` in React).
16
+ *
17
+ * При выполнении на сервере функция всегда возвращает `undefined`.
18
+ * Если вы используете её внутри логики рендеринга компонента, это может привести к ошибкам гидратации.
19
+ * Рекомендуется вызывать эту функцию только в хуках жизненного цикла, которые выполняются на клиенте (например, `onMounted` в Vue или `useEffect` в React).
20
+ */
21
+ export declare function createElement<T extends HTMLElement>(parentElement?: HTMLElement, tagName?: string, options?: Partial<T> | Record<keyof T, T[keyof T]> | ((element: T) => void), referenceElement?: HTMLElement): T | undefined;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Selects the first element that matches the specified selectors.
3
+ *
4
+ * Выбирает первый элемент, который соответствует указанным селекторам.
5
+ * @param selectors selectors / селекторы
6
+ * @returns first matched element or undefined / первый найденный элемент или undefined
7
+ */
8
+ export declare function domQuerySelector<E extends Element = Element>(selectors: string): E | undefined;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Selects all elements that match the specified selectors.
3
+ *
4
+ * Выбирает все элементы, которые соответствуют указанным селекторам.
5
+ * @param selectors selectors / селекторы
6
+ * @returns list of matched elements or undefined / список найденных элементов или undefined
7
+ */
8
+ export declare function domQuerySelectorAll<E extends Element = Element>(selectors: string): NodeListOf<E> | undefined;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Encodes special characters in a string for safe use in HTML attributes.
3
+ *
4
+ * Кодирует специальные символы в строке для безопасного использования в HTML-атрибутах.
5
+ * @param text text to encode / текст для кодирования
6
+ * @returns encoded text / закодированный текст
7
+ */
8
+ export declare function encodeAttribute(text: string): string;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Encodes special characters in a string for safe use in HTML attributes.
3
+ *
4
+ * Кодирует специальные символы в строке для безопасного использования в HTML-атрибутах.
5
+ * @param text text to encode / текст для кодирования
6
+ * @returns encoded text / закодированный текст
7
+ */
8
+ export declare function encodeLiteAttribute(text: string): string;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Ensures that an image does not exceed the maximum size by resizing it if needed.
3
+ *
4
+ * Гарантирует, что изображение не превышает максимальный размер, изменяя его размер при необходимости.
5
+ * @param file image file as Uint8Array / файл изображения в виде Uint8Array
6
+ * @param compress maximum size as a fraction of the original size / максимальный размер в виде доли от оригинального размера
7
+ * @param type image type / тип изображения
8
+ * @returns promise with the resized image data as base64 / промис с данными измененного изображения в формате base64
9
+ */
10
+ export declare function ensureMaxSize(file: Uint8Array, compress?: number, type?: string): Promise<string>;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Escapes special regex characters in a string so it can be used safely in a RegExp.
3
+ *
4
+ * Экранирует специальные символы регулярного выражения в строке, чтобы её можно было безопасно использовать в RegExp.
5
+ * @param value string to escape / строка для экранирования
6
+ */
7
+ export declare function escapeExp(value: string): string;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Stop listening to events in depth.
3
+ *
4
+ * Остановить прослушивания события в глубину.
5
+ * @param event event instance/ экземпляр события
6
+ */
7
+ export declare function eventStopPropagation(event: Event): void;
@@ -0,0 +1,12 @@
1
+ import { FunctionArgs } from '../types/basicTypes';
2
+ /**
3
+ * Flexible utility that executes the provided argument if it is a function, otherwise returns it as is.
4
+ * Supports passing arbitrary arguments to the callback.
5
+ *
6
+ * Универсальная утилита, которая выполняет переданный аргумент, если он является функцией, иначе возвращает его без изменений.
7
+ * Поддерживает передачу произвольных аргументов в функцию обратного вызова.
8
+ * @param callback function or any value / функция или любое значение
9
+ * @param args arguments of the function / аргументы функции
10
+ * @returns result of the execution or the value itself / результат выполнения или само значение
11
+ */
12
+ export declare function executeFunction<T>(callback: T | FunctionArgs<any, T>, ...args: any[]): T;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Safely executes a function and awaits its result if it returns a Promise.
3
+ * If the provided value is a static value or a synchronous function, it returns the result immediately wrapped in a Promise.
4
+ *
5
+ * Безопасно выполняет функцию и ожидает её результат, если она возвращает Promise.
6
+ * Если переданное значение является статическим или синхронной функцией, возвращает результат немедленно, обернутым в Promise.
7
+ * @param callback function, Promise or any value / функция, Promise или любое значение
8
+ * @param args arguments of the function / аргументы функции
9
+ * @returns promise resolving to the execution result / промис, разрешающийся результатом выполнения
10
+ */
11
+ export declare function executePromise<T>(callback: ((...args: any[]) => Promise<T>) | ((...args: any[]) => T) | T, ...args: any[]): Promise<T>;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * The function performs the specified function once for each element in the object
3
+ * and returns an array with the results of executing the function.
4
+ *
5
+ * Функция выполняет указанную функцию один раз для каждого элемента в объекте
6
+ * и возвращает массив с результатами выполнения функции.
7
+ * @param data object for iteration / объект для перебора
8
+ * @param callback a function to execute for each element in the array /
9
+ * функция, которая будет вызвана для каждого элемента
10
+ * @param saveUndefined if true, the function will return an array with undefined values /
11
+ * если true, функция вернет массив с undefined значениями
12
+ * @returns returns an array with the results of executing the function / возвращает массив с результатами выполнения функции
13
+ */
14
+ export declare function forEach<T, R, D extends T[] | Record<string, T> | Map<string, T> | Set<T> = T[] | Record<string, T> | Map<string, T> | Set<T>, K = D extends T[] ? number : string>(data: D & (T[] | Record<string, T> | Map<string, T> | Set<T>), callback: (item: T, key: K, dataMain: typeof data) => R, saveUndefined?: boolean): R[];
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Cyclically calls requestAnimationFrame until next returns true.
3
+ *
4
+ * Циклически вызывает requestAnimationFrame, пока next возвращает true.
5
+ * @param callback the function to call when it's time to update your animation / функция, которая будет вызвана, когда придёт время обновить вашу анимацию
6
+ * @param next function that determines repetition / функция, которая определяет повторность
7
+ * @param end function that is executed if the animation stops / функция, которая выполняется, если останавливается анимация
8
+ * @returns animation ID or undefined / ID анимации или undefined
9
+ */
10
+ export declare function frame(callback: () => void, next?: () => boolean, end?: () => void): void;
@@ -0,0 +1,10 @@
1
+ import { HighlightMatchItem } from '../types/searchTypes';
2
+ /**
3
+ * Split a string into an array of objects to highlight matches.
4
+ *
5
+ * Разделяет строку на массив объектов для выделения совпадений.
6
+ * @param value initial string / исходная строка
7
+ * @param search search string / строка поиска
8
+ * @returns array of objects with text and match flag / массив объектов с текстом и флагом совпадения
9
+ */
10
+ export declare function getArrayHighlightMatch(value: string, search?: string | RegExp): HighlightMatchItem[];
@@ -0,0 +1,9 @@
1
+ import { ElementOrString, ElementOrWindow } from '../types/basicTypes';
2
+ /**
3
+ * Gets a list of attributes of an element.
4
+ *
5
+ * Получает список атрибутов у элемента.
6
+ * @param element selectors for matching or an Element / селекторов для сопоставления или Element
7
+ * @returns list of attributes / список атрибутов
8
+ */
9
+ export declare function getAttributes<E extends ElementOrWindow>(element?: ElementOrString<E>): Record<string, string | undefined>;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * The method retrieves drag data (as a string) for the specified type.
3
+ * If the drag operation does not include data, this method returns an empty string.
4
+ *
5
+ * Метод извлекает данные перетаскивания (в виде строки) для указанного типа.
6
+ * @param event the ClipboardEvent interface / интерфейс ClipboardEvent
7
+ * @returns data from the clipboard / данные из буфера обмена
8
+ */
9
+ export declare function getClipboardData(event?: ClipboardEvent): Promise<string>;
@@ -0,0 +1,10 @@
1
+ import { ObjectOrArray } from '../types/basicTypes';
2
+ /**
3
+ * Returns an array of values for a specific column in the input array.
4
+ *
5
+ * Возвращает массив значений для определенного столбца входного массива.
6
+ * @param array a multi-dimensional array or an array of objects / многомерный массив или массив объектов
7
+ * @param column the column of values to return / ключ столбца, значения которого нужно вернуть
8
+ * @returns list of values for the column / список значений для столбца
9
+ */
10
+ export declare function getColumn<T, K extends keyof T>(array: ObjectOrArray<T>, column: K): (T[K] | undefined)[];
@@ -0,0 +1,19 @@
1
+ import { GeoDate } from '../types/geoTypes';
2
+ /**
3
+ * Returns the current date in the specified format.
4
+ *
5
+ * Возвращает текущую дату в указанном формате.
6
+ *
7
+ * @remarks
8
+ * Using this function for rendering in SSR may lead to hydration mismatches
9
+ * because the time or time zone on the server may differ from the time on the client.
10
+ * It is recommended to use this function inside client-side hooks only (e.g., `onMounted` in Vue or `useEffect` in React).
11
+ *
12
+ * Использование этой функции для отрисовки в SSR может привести к ошибкам гидратации,
13
+ * так как время или часовой пояс сервера могут отличаться от времени на стороне клиента.
14
+ * Рекомендуется использовать эту функцию только внутри хуков, выполняющихся на клиенте (например, `onMounted` в Vue или `useEffect` in React).
15
+ *
16
+ * @param format type of date format for output / тип формата даты вывода
17
+ * @returns formatted current date / текущая дата в указанном формате
18
+ */
19
+ export declare function getCurrentDate(format?: GeoDate): string;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Returns the current time in milliseconds.
3
+ *
4
+ * Возвращает текущее время в миллисекундах.
5
+ *
6
+ * @remarks
7
+ * **Warning (SSR):** Using this function for rendering in SSR will almost certainly lead to hydration mismatches
8
+ * because the timestamp on the server will differ from the timestamp on the client.
9
+ *
10
+ * **Внимание (SSR):** Использование этой функции для отрисовки в SSR практически наверняка приведет к ошибкам гидратации,
11
+ * так как временная метка (timestamp) сервера будет отличаться от метки на стороне клиента.
12
+ *
13
+ * @returns current time in milliseconds / текущее время в миллисекундах
14
+ */
15
+ export declare function getCurrentTime(): number;
@@ -0,0 +1,9 @@
1
+ import { ElementOrString, ElementOrWindow } from '../types/basicTypes';
2
+ /**
3
+ * Returns the first Element in the document that matches the specified selector or the element.
4
+ *
5
+ * Возвращает первый Element документа, который соответствует указанному селектору или сам элемент.
6
+ * @param element selectors for matching or an Element / селектор для сопоставления или Element
7
+ * @returns found element or undefined / найденный элемент или undefined
8
+ */
9
+ export declare function getElement<E extends ElementOrWindow, R extends Exclude<E, Window>>(element?: ElementOrString<E>): R | undefined;