@nemigo/helpers 2.7.1 → 2.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/dist/html/index.d.ts +2 -0
- package/dist/html/index.js +2 -0
- package/dist/phymath/types.d.ts +4 -0
- package/package.json +1 -1
package/dist/html/index.d.ts
CHANGED
|
@@ -29,3 +29,5 @@ export declare const autoAreaHeight: (area?: HTMLTextAreaElement) => void;
|
|
|
29
29
|
* @param [multi=false] - Есть массивы значений для одинаковых ключей
|
|
30
30
|
*/
|
|
31
31
|
export declare const formon: <D = any>(form: FormData, multi?: boolean) => D;
|
|
32
|
+
export declare const toVW: (px: number) => number;
|
|
33
|
+
export declare const toVH: (px: number) => number;
|
package/dist/html/index.js
CHANGED
|
@@ -57,3 +57,5 @@ export const formon = (form, multi = false) => {
|
|
|
57
57
|
}
|
|
58
58
|
return Object.fromEntries(form.entries());
|
|
59
59
|
};
|
|
60
|
+
export const toVW = (px) => (px / (window.visualViewport?.width ?? window.innerWidth)) * 100;
|
|
61
|
+
export const toVH = (px) => (px / (window.visualViewport?.height ?? window.innerHeight)) * 100;
|
package/dist/phymath/types.d.ts
CHANGED