@dxtmisha/functional-basic 0.6.1 → 0.7.2
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/library.d.ts +72 -75
- package/dist/library.js +452 -360
- package/package.json +3 -3
package/dist/library.d.ts
CHANGED
|
@@ -1496,6 +1496,48 @@ export declare type ElementOrString<E extends ElementOrWindow> = E | string;
|
|
|
1496
1496
|
*/
|
|
1497
1497
|
export declare type ElementOrWindow = HTMLElement | Window;
|
|
1498
1498
|
|
|
1499
|
+
/**
|
|
1500
|
+
* Class for taking screenshots of an element.
|
|
1501
|
+
*
|
|
1502
|
+
* Класс для создания скриншотов элемента.
|
|
1503
|
+
*
|
|
1504
|
+
* This class uses native browser APIs to capture an element by embedding its HTML into an SVG.
|
|
1505
|
+
* It has limitations and may not render everything with perfect accuracy, especially:
|
|
1506
|
+
* - Images, iframes, or other resources from different origins (due to CORS security policies).
|
|
1507
|
+
* - CSS pseudo-elements like ::before and ::after are not rendered.
|
|
1508
|
+
* - The element's context is lost, so CSS rules depending on parent elements might not apply correctly.
|
|
1509
|
+
*
|
|
1510
|
+
* For more robust and accurate capturing, a library like html2canvas is recommended as it reconstructs
|
|
1511
|
+
* the element and its styles on a canvas from scratch.
|
|
1512
|
+
*/
|
|
1513
|
+
export declare class ElementScreenshot {
|
|
1514
|
+
protected readonly element: HTMLElement;
|
|
1515
|
+
/**
|
|
1516
|
+
* Constructor
|
|
1517
|
+
* @param element HTML element to capture/ HTML элемент для захвата
|
|
1518
|
+
*/
|
|
1519
|
+
constructor(element: HTMLElement);
|
|
1520
|
+
/**
|
|
1521
|
+
* Takes a screenshot of the element.
|
|
1522
|
+
*
|
|
1523
|
+
* Делает скриншот элемента.
|
|
1524
|
+
*/
|
|
1525
|
+
take(): Promise<string>;
|
|
1526
|
+
/**
|
|
1527
|
+
* Takes a screenshot and downloads it.
|
|
1528
|
+
*
|
|
1529
|
+
* Делает скриншот и скачивает его.
|
|
1530
|
+
* @param filename name of the file to download/ имя файла для скачивания
|
|
1531
|
+
*/
|
|
1532
|
+
download(filename?: string): Promise<void>;
|
|
1533
|
+
/**
|
|
1534
|
+
* Gathers all CSS styles from the document's stylesheets.
|
|
1535
|
+
*
|
|
1536
|
+
* Собирает все стили CSS из таблиц стилей документа.
|
|
1537
|
+
*/
|
|
1538
|
+
protected getStyles(): string;
|
|
1539
|
+
}
|
|
1540
|
+
|
|
1499
1541
|
/**
|
|
1500
1542
|
* Union type for all "empty" values including falsy primitives and string representations/
|
|
1501
1543
|
* Объединенный тип для всех "пустых" значений включая ложные примитивы и строковые представления
|
|
@@ -1936,7 +1978,7 @@ export declare class Geo {
|
|
|
1936
1978
|
private static toFull;
|
|
1937
1979
|
}
|
|
1938
1980
|
|
|
1939
|
-
export declare const GEO_FLAG_ICON_NAME = "
|
|
1981
|
+
export declare const GEO_FLAG_ICON_NAME = "f";
|
|
1940
1982
|
|
|
1941
1983
|
/**
|
|
1942
1984
|
* Union type for date format options in geographic context/
|
|
@@ -2733,7 +2775,7 @@ export declare class Global {
|
|
|
2733
2775
|
* Quick change of scroll at the element to the required element.
|
|
2734
2776
|
*
|
|
2735
2777
|
* Быстрое изменение скролла у элемента к нужному элементу.
|
|
2736
|
-
* @param selector the selected element, the scroll position of which needs to be changed/
|
|
2778
|
+
* @param selector the selected an element, the scroll position of which needs to be changed/
|
|
2737
2779
|
* выбранный элемент, положение скролла которого надо изменить
|
|
2738
2780
|
* @param elementTo the element to which you need to scroll/ элемент, до которого надо проскроллить
|
|
2739
2781
|
* @param elementCenter the element that needs to be centered/ элемент, который надо центрировать
|
|
@@ -2900,7 +2942,7 @@ export declare class Icons {
|
|
|
2900
2942
|
protected static wait(): Promise<void>;
|
|
2901
2943
|
}
|
|
2902
2944
|
|
|
2903
|
-
export declare type IconsItem = string | Promise<string | any
|
|
2945
|
+
export declare type IconsItem = string | Promise<string | any> | (() => Promise<string | any>);
|
|
2904
2946
|
|
|
2905
2947
|
/** Type for 2D coordinates/ Тип для 2D координат */
|
|
2906
2948
|
export declare type ImageCoordinator = {
|
|
@@ -2970,6 +3012,15 @@ export declare function isDomData(): boolean;
|
|
|
2970
3012
|
*/
|
|
2971
3013
|
export declare function isDomRuntime(): boolean;
|
|
2972
3014
|
|
|
3015
|
+
/**
|
|
3016
|
+
* Checks if the pressed key is Enter or Space.
|
|
3017
|
+
*
|
|
3018
|
+
* Проверяет, является ли нажатая клавиша Enter или Space.
|
|
3019
|
+
* @param event event object/ объект события
|
|
3020
|
+
* @param isInputElement whether the element is an input element/ является ли элемент полем ввода
|
|
3021
|
+
*/
|
|
3022
|
+
export declare const isEnter: (event: KeyboardEvent, isInputElement?: boolean) => boolean;
|
|
3023
|
+
|
|
2973
3024
|
/**
|
|
2974
3025
|
* Checks if the field is filled.
|
|
2975
3026
|
*
|
|
@@ -3003,6 +3054,14 @@ export declare function isFunction<T>(callback: T): callback is Extract<T, Funct
|
|
|
3003
3054
|
*/
|
|
3004
3055
|
export declare function isInDom<E extends ElementOrWindow>(element?: ElementOrString<E>): boolean;
|
|
3005
3056
|
|
|
3057
|
+
/**
|
|
3058
|
+
* Checks if the element is an input field or editable.
|
|
3059
|
+
*
|
|
3060
|
+
* Проверяет, является ли элемент полем ввода или редактируемым.
|
|
3061
|
+
* @param element element to check/ проверяемый элемент
|
|
3062
|
+
*/
|
|
3063
|
+
export declare const isInput: (element: HTMLElement | EventTarget | null) => boolean;
|
|
3064
|
+
|
|
3006
3065
|
/**
|
|
3007
3066
|
* Checks if the value is between integers.
|
|
3008
3067
|
*
|
|
@@ -4282,6 +4341,16 @@ export declare function random(min: number, max: number): number;
|
|
|
4282
4341
|
*/
|
|
4283
4342
|
export declare function removeCommonPrefix(mainStr: string, prefix: string): string;
|
|
4284
4343
|
|
|
4344
|
+
/**
|
|
4345
|
+
* Replaces the component name in the text.
|
|
4346
|
+
*
|
|
4347
|
+
* Заменяет имя компонента в тексте.
|
|
4348
|
+
* @param text text/ текст
|
|
4349
|
+
* @param name component name/ имя компонента
|
|
4350
|
+
* @param componentName new component name/ новое имя компонента
|
|
4351
|
+
*/
|
|
4352
|
+
export declare const replaceComponentName: (text: string | undefined, name: string, componentName: string) => string | undefined;
|
|
4353
|
+
|
|
4285
4354
|
/**
|
|
4286
4355
|
* Merge one or more arrays recursively.
|
|
4287
4356
|
*
|
|
@@ -4676,75 +4745,3 @@ export declare function uniqueArray<T>(value: T[]): T[];
|
|
|
4676
4745
|
export declare function writeClipboardData(text: string): Promise<void>;
|
|
4677
4746
|
|
|
4678
4747
|
export { }
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
declare module '@vue/reactivity' {
|
|
4683
|
-
interface RefUnwrapBailTypes {
|
|
4684
|
-
runtimeCoreBailTypes: VNode | {
|
|
4685
|
-
$: ComponentInternalInstance;
|
|
4686
|
-
};
|
|
4687
|
-
}
|
|
4688
|
-
}
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
// Note: this file is auto concatenated to the end of the bundled d.ts during
|
|
4692
|
-
// build.
|
|
4693
|
-
|
|
4694
|
-
declare module '@vue/runtime-core' {
|
|
4695
|
-
export interface GlobalComponents {
|
|
4696
|
-
Teleport: DefineComponent<TeleportProps>
|
|
4697
|
-
Suspense: DefineComponent<SuspenseProps>
|
|
4698
|
-
KeepAlive: DefineComponent<KeepAliveProps>
|
|
4699
|
-
BaseTransition: DefineComponent<BaseTransitionProps>
|
|
4700
|
-
}
|
|
4701
|
-
}
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
declare module '@vue/reactivity' {
|
|
4705
|
-
interface RefUnwrapBailTypes {
|
|
4706
|
-
runtimeDOMBailTypes: DomType<Node | Window>;
|
|
4707
|
-
}
|
|
4708
|
-
}
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
declare module '@vue/runtime-core' {
|
|
4712
|
-
interface GlobalComponents {
|
|
4713
|
-
Transition: DefineComponent<TransitionProps>;
|
|
4714
|
-
TransitionGroup: DefineComponent<TransitionGroupProps>;
|
|
4715
|
-
}
|
|
4716
|
-
interface GlobalDirectives {
|
|
4717
|
-
vShow: typeof vShow;
|
|
4718
|
-
vOn: VOnDirective;
|
|
4719
|
-
vBind: VModelDirective;
|
|
4720
|
-
vIf: Directive<any, boolean>;
|
|
4721
|
-
vOnce: Directive;
|
|
4722
|
-
vSlot: Directive;
|
|
4723
|
-
}
|
|
4724
|
-
}
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
// CSS
|
|
4729
|
-
declare module '*.css' {}
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
declare module '*.scss' {}
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
declare module '*.sass' {}
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
declare module '*.less' {}
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
declare module '*.styl' {}
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
declare module '*.stylus' {}
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
declare module '*.pcss' {}
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
declare module '*.sss' {}
|