@dxtmisha/functional-basic 0.1.4 → 0.5.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.
@@ -473,6 +473,13 @@ export declare class Datetime {
473
473
  * Клонировать объект GeoDate и вернуться на 1 день.
474
474
  */
475
475
  cloneDayPrevious(): Datetime;
476
+ /**
477
+ * Returns the time zone hour format.
478
+ *
479
+ * Возвращает часовой формат временной зоны.
480
+ * @param hour hour/ час
481
+ */
482
+ protected toTimeZoneHourFormat(hour: number): string;
476
483
  /**
477
484
  * Updating all values.
478
485
  *
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Convert a Blob to a Base64 string.
3
+ *
4
+ * Преобразует Blob в строку Base64.
5
+ * @param blob The Blob to convert/ Blob для преобразования
6
+ */
7
+ export declare function blobToBase64(blob: Blob): Promise<string | ArrayBuffer | null>;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Get image element from HTMLImageElement or string source.
3
+ *
4
+ * Получить элемент изображения из HTMLImageElement или строкового источника.
5
+ * @param image image element or string source/ элемент изображения или строковый источник
6
+ */
7
+ export declare function getElementImage(image: HTMLImageElement | string): HTMLImageElement | undefined;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Smooth scrolling to the element.
3
+ *
4
+ * Плавная прокрутка до элемента.
5
+ * @param element target element / целевой элемент
6
+ * @param options scroll options / параметры прокрутки
7
+ * @param shift shift from the top / смещение сверху
8
+ */
9
+ export declare function goScrollSmooth<E extends HTMLElement>(element: E, options?: ScrollIntoViewOptions, shift?: number): void;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Checks if the current environment is a data URL.
3
+ *
4
+ * Проверяет, является ли текущая среда URL-адресом данных.
5
+ */
6
+ export declare function isDomData(): boolean;
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Removes the common prefix from the main string.
3
+ *
4
+ * Убирает общий префикс из основной строки.
5
+ * @param mainStr - The main string / Основная строка
6
+ * @param prefix - The prefix string to remove / Строка префикса для удаления
7
+ */
8
+ export declare function removeCommonPrefix(mainStr: string, prefix: string): string;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Resize type for image scaling.
3
+ *
4
+ * Тип изменения размера для масштабирования изображения.
5
+ */
6
+ type ResizeImageByMaxType = 'auto' | 'width' | 'height';
7
+ /**
8
+ * Resizes an image to fit within a maximum size constraint.
9
+ *
10
+ * Изменяет размер изображения в соответствии с ограничением максимального размера.
11
+ * @param image image element or URL / элемент изображения или URL
12
+ * @param maxSize maximum size for width or height / максимальный размер ширины или высоты
13
+ * @param type resize type (auto, width, height) / тип изменения размера (auto, width, height)
14
+ * @param typeData optional data type for the resulting image /
15
+ * необязательный тип данных для результирующего изображения
16
+ */
17
+ export declare function resizeImageByMax(image: HTMLImageElement | string, maxSize: number, type?: ResizeImageByMaxType, typeData?: string): string | undefined;
18
+ export {};
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Converts a Uint8Array to a base64 encoded string.
3
+ *
4
+ * Преобразует Uint8Array в строку, закодированную в base64.
5
+ * @param bytes binary data as Uint8Array / бинарные данные в виде Uint8Array
6
+ * @returns base64 encoded string / строка, закодированная в base64
7
+ */
8
+ export declare function uint8ArrayToBase64(bytes: Uint8Array): string;
package/dist/library.d.ts CHANGED
@@ -30,6 +30,7 @@ export * from './classes/Translate';
30
30
  export * from './functions/anyToString';
31
31
  export * from './functions/applyTemplate';
32
32
  export * from './functions/arrFill';
33
+ export * from './functions/blobToBase64';
33
34
  export * from './functions/copyObject';
34
35
  export * from './functions/copyObjectLite';
35
36
  export * from './functions/createElement';
@@ -46,6 +47,7 @@ export * from './functions/getClipboardData';
46
47
  export * from './functions/getColumn';
47
48
  export * from './functions/getElement';
48
49
  export * from './functions/getElementId';
50
+ export * from './functions/getElementImage';
49
51
  export * from './functions/getElementItem';
50
52
  export * from './functions/getElementOrWindow';
51
53
  export * from './functions/getExp';
@@ -65,11 +67,13 @@ export * from './functions/getRequestString';
65
67
  export * from './functions/getStepPercent';
66
68
  export * from './functions/getStepValue';
67
69
  export * from './functions/goScroll';
70
+ export * from './functions/goScrollSmooth';
68
71
  export * from './functions/inArray';
69
72
  export * from './functions/initScrollbarOffset';
70
73
  export * from './functions/intersectKey';
71
74
  export * from './functions/isArray';
72
75
  export * from './functions/isDifferent';
76
+ export * from './functions/isDomData';
73
77
  export * from './functions/isDomRuntime';
74
78
  export * from './functions/isFilled';
75
79
  export * from './functions/isFloat';
@@ -85,8 +89,10 @@ export * from './functions/isSelectedByList';
85
89
  export * from './functions/isString';
86
90
  export * from './functions/isWindow';
87
91
  export * from './functions/random';
92
+ export * from './functions/removeCommonPrefix';
88
93
  export * from './functions/replaceRecursive';
89
94
  export * from './functions/replaceTemplate';
95
+ export * from './functions/resizeImageByMax';
90
96
  export * from './functions/secondToTime';
91
97
  export * from './functions/setElementItem';
92
98
  export * from './functions/setValues';
@@ -102,6 +108,7 @@ export * from './functions/toNumberByMax';
102
108
  export * from './functions/toPercent';
103
109
  export * from './functions/toPercentBy100';
104
110
  export * from './functions/transformation';
111
+ export * from './functions/uint8ArrayToBase64';
105
112
  export * from './functions/uniqueArray';
106
113
  export * from './functions/writeClipboardData';
107
114
  export * from './types/apiTypes';