yummies 3.0.0
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/LICENSE +21 -0
- package/README.md +69 -0
- package/assets/logo.png +0 -0
- package/assets/logo.pxz +0 -0
- package/async.d.ts +18 -0
- package/async.d.ts.map +1 -0
- package/async.js +28 -0
- package/cookie.d.ts +3 -0
- package/cookie.d.ts.map +1 -0
- package/cookie.js +11 -0
- package/css.d.ts +10 -0
- package/css.d.ts.map +1 -0
- package/css.js +10 -0
- package/date-time.d.ts +14 -0
- package/date-time.d.ts.map +1 -0
- package/date-time.js +72 -0
- package/device.d.ts +8 -0
- package/device.d.ts.map +1 -0
- package/device.js +28 -0
- package/html.d.ts +17 -0
- package/html.d.ts.map +1 -0
- package/html.js +137 -0
- package/id.d.ts +57 -0
- package/id.d.ts.map +1 -0
- package/id.js +65 -0
- package/imports.d.ts +11 -0
- package/imports.d.ts.map +1 -0
- package/imports.js +28 -0
- package/math.d.ts +13 -0
- package/math.d.ts.map +1 -0
- package/math.js +17 -0
- package/media.d.ts +12 -0
- package/media.d.ts.map +1 -0
- package/media.js +91 -0
- package/ms.d.ts +20 -0
- package/ms.d.ts.map +1 -0
- package/ms.js +18 -0
- package/package.json +140 -0
- package/price.d.ts +6 -0
- package/price.d.ts.map +1 -0
- package/price.js +17 -0
- package/sound.d.ts +7 -0
- package/sound.d.ts.map +1 -0
- package/sound.js +13 -0
- package/storage.d.ts +39 -0
- package/storage.d.ts.map +1 -0
- package/storage.js +43 -0
- package/text.d.ts +11 -0
- package/text.d.ts.map +1 -0
- package/text.js +10 -0
- package/type-guard.d.ts +18 -0
- package/type-guard.d.ts.map +1 -0
- package/type-guard.js +46 -0
- package/utils/types.d.ts +30 -0
- package/utils/types.d.ts.map +1 -0
- package/utils/types.js +1 -0
- package/vibrate.d.ts +5 -0
- package/vibrate.d.ts.map +1 -0
- package/vibrate.js +8 -0
package/imports.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { waitAsync } from './async';
|
|
2
|
+
/**
|
|
3
|
+
* Функция ленивой загрузки модуля, с возможностью вызова доп. попыток
|
|
4
|
+
* @example
|
|
5
|
+
* ```ts
|
|
6
|
+
* fetchLazyModule(() => import("./test.ts"), 3) // начнет загрузку test.ts
|
|
7
|
+
* // Произошла ошибка загрузки test.ts, тогда fetchLazyModule повторно вызовет fn()
|
|
8
|
+
* // Вызывать будет столько раз сколько указано attempts (по умолчанию 3)
|
|
9
|
+
* ```
|
|
10
|
+
*/
|
|
11
|
+
export const fetchLazyModule = async (fetchModule, attempts = 3, delay = 1000) => {
|
|
12
|
+
const attemptsArray = Array.from({
|
|
13
|
+
length: attempts,
|
|
14
|
+
}).fill(fetchModule);
|
|
15
|
+
let lastError = null;
|
|
16
|
+
for await (const attempt of attemptsArray) {
|
|
17
|
+
try {
|
|
18
|
+
if (lastError !== null) {
|
|
19
|
+
await waitAsync(delay);
|
|
20
|
+
}
|
|
21
|
+
return await attempt();
|
|
22
|
+
}
|
|
23
|
+
catch (error) {
|
|
24
|
+
lastError = error;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
throw lastError;
|
|
28
|
+
};
|
package/math.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Maybe } from './utils/types';
|
|
2
|
+
export declare function degToRad(deg: number): number;
|
|
3
|
+
export declare function radToDeg(rad: number): number;
|
|
4
|
+
/**
|
|
5
|
+
* Получить процент от числа
|
|
6
|
+
* @example
|
|
7
|
+
* ```ts
|
|
8
|
+
* percentFrom(500, 2000) // 25
|
|
9
|
+
* percentFrom(1000, 2000) // 50
|
|
10
|
+
* ```
|
|
11
|
+
*/
|
|
12
|
+
export declare const percentFrom: (value: Maybe<number>, from: Maybe<number>) => number;
|
|
13
|
+
//# sourceMappingURL=math.d.ts.map
|
package/math.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"math.d.ts","sourceRoot":"","sources":["../src/math.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,UAEnC;AACD,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,UAEnC;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,UAAW,KAAK,CAAC,MAAM,CAAC,QAAQ,KAAK,CAAC,MAAM,CAAC,WAEpE,CAAC"}
|
package/math.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export function degToRad(deg) {
|
|
2
|
+
return deg * (Math.PI / 180);
|
|
3
|
+
}
|
|
4
|
+
export function radToDeg(rad) {
|
|
5
|
+
return rad * (180 / Math.PI);
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Получить процент от числа
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* percentFrom(500, 2000) // 25
|
|
12
|
+
* percentFrom(1000, 2000) // 50
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
export const percentFrom = (value, from) => {
|
|
16
|
+
return ((value !== null && value !== void 0 ? value : 0) / (from !== null && from !== void 0 ? from : 0)) * 100 || 0;
|
|
17
|
+
};
|
package/media.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare function blobToBase64(blob: Blob): Promise<string>;
|
|
2
|
+
export declare const blobToUrl: (urlOrBlob: string | Blob) => string;
|
|
3
|
+
export declare const fileToBlob: (file: File) => Blob;
|
|
4
|
+
export declare const imageToBlob: (imageElement: HTMLImageElement, mimeType?: string) => Blob;
|
|
5
|
+
/**
|
|
6
|
+
* Загружает и отрисовывает изображение с использованием Image
|
|
7
|
+
*
|
|
8
|
+
* @returns {Promise<HTMLImageElement>}
|
|
9
|
+
*/
|
|
10
|
+
export declare const renderImage: (urlOrBlob: Blob | string) => Promise<HTMLImageElement>;
|
|
11
|
+
export declare const rotateImage: (image: HTMLImageElement, angle: number) => Promise<HTMLImageElement>;
|
|
12
|
+
//# sourceMappingURL=media.d.ts.map
|
package/media.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media.d.ts","sourceRoot":"","sources":["../src/media.ts"],"names":[],"mappings":"AAGA,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAOxD;AAED,eAAO,MAAM,SAAS,cAAe,MAAM,GAAG,IAAI,WACsB,CAAC;AAEzE,eAAO,MAAM,UAAU,SAAU,IAAI,SAEpC,CAAC;AAEF,eAAO,MAAM,WAAW,iBACR,gBAAgB,aACpB,MAAM,SAyBjB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,WAAW,cAAe,IAAI,GAAG,MAAM,8BAMhD,CAAC;AAwCL,eAAO,MAAM,WAAW,UAAW,gBAAgB,SAAS,MAAM,8BAajE,CAAC"}
|
package/media.js
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/* eslint-disable sonarjs/todo-tag */
|
|
2
|
+
import { degToRad } from './math';
|
|
3
|
+
export function blobToBase64(blob) {
|
|
4
|
+
return new Promise((resolve, reject) => {
|
|
5
|
+
const reader = new FileReader();
|
|
6
|
+
reader.onloadend = () => resolve(reader.result);
|
|
7
|
+
reader.onerror = reject;
|
|
8
|
+
reader.readAsDataURL(blob);
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
export const blobToUrl = (urlOrBlob) => urlOrBlob instanceof Blob ? URL.createObjectURL(urlOrBlob) : urlOrBlob;
|
|
12
|
+
export const fileToBlob = (file) => {
|
|
13
|
+
return new Blob([file], { type: file.type });
|
|
14
|
+
};
|
|
15
|
+
export const imageToBlob = (imageElement, mimeType = 'image/png') => {
|
|
16
|
+
const canvas = document.createElement('canvas');
|
|
17
|
+
canvas.width = imageElement.naturalWidth || 300;
|
|
18
|
+
canvas.height = imageElement.naturalHeight || 300;
|
|
19
|
+
canvas.getContext('2d').drawImage(imageElement, 0, 0);
|
|
20
|
+
const dataUri = canvas.toDataURL(mimeType, 1);
|
|
21
|
+
const base64data = dataUri.split(',')[1];
|
|
22
|
+
const base64MimeType = dataUri.split(';')[0].slice(5);
|
|
23
|
+
const bytes = globalThis.atob(base64data);
|
|
24
|
+
const buf = new ArrayBuffer(bytes.length);
|
|
25
|
+
const array = new Uint8Array(buf);
|
|
26
|
+
for (let index = 0; index < bytes.length; index++) {
|
|
27
|
+
// eslint-disable-next-line unicorn/prefer-code-point
|
|
28
|
+
array[index] = bytes.charCodeAt(index);
|
|
29
|
+
}
|
|
30
|
+
const blob = new Blob([array], { type: base64MimeType });
|
|
31
|
+
return blob;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Загружает и отрисовывает изображение с использованием Image
|
|
35
|
+
*
|
|
36
|
+
* @returns {Promise<HTMLImageElement>}
|
|
37
|
+
*/
|
|
38
|
+
export const renderImage = (urlOrBlob) => new Promise((resolve, reject) => {
|
|
39
|
+
const image = new Image();
|
|
40
|
+
image.src = blobToUrl(urlOrBlob);
|
|
41
|
+
image.onload = () => resolve(image);
|
|
42
|
+
image.onerror = () => reject();
|
|
43
|
+
});
|
|
44
|
+
function cropImageFromCanvas(context) {
|
|
45
|
+
const canvas = context.canvas;
|
|
46
|
+
let w = canvas.width;
|
|
47
|
+
let h = canvas.height;
|
|
48
|
+
const pix = { x: [], y: [] };
|
|
49
|
+
const imageData = context.getImageData(0, 0, canvas.width, canvas.height);
|
|
50
|
+
let x;
|
|
51
|
+
let y;
|
|
52
|
+
let index;
|
|
53
|
+
for (y = 0; y < h; y++) {
|
|
54
|
+
for (x = 0; x < w; x++) {
|
|
55
|
+
index = (y * w + x) * 4;
|
|
56
|
+
if (imageData.data[index + 3] > 0) {
|
|
57
|
+
pix.x.push(x);
|
|
58
|
+
pix.y.push(y);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
pix.x.sort(function (a, b) {
|
|
63
|
+
return a - b;
|
|
64
|
+
});
|
|
65
|
+
pix.y.sort(function (a, b) {
|
|
66
|
+
return a - b;
|
|
67
|
+
});
|
|
68
|
+
const n = pix.x.length - 1;
|
|
69
|
+
w = 1 + pix.x[n] - pix.x[0];
|
|
70
|
+
h = 1 + pix.y[n] - pix.y[0];
|
|
71
|
+
const cut = context.getImageData(pix.x[0], pix.y[0], w, h);
|
|
72
|
+
canvas.width = w;
|
|
73
|
+
canvas.height = h;
|
|
74
|
+
context.putImageData(cut, 0, 0);
|
|
75
|
+
return canvas;
|
|
76
|
+
}
|
|
77
|
+
// TODO: ломает iphone с огромными изображениями
|
|
78
|
+
export const rotateImage = (image, angle) => {
|
|
79
|
+
const maxSize = Math.max(image.width, image.height);
|
|
80
|
+
const canvas = document.createElement('canvas');
|
|
81
|
+
canvas.width = maxSize;
|
|
82
|
+
canvas.height = maxSize;
|
|
83
|
+
const context = canvas.getContext('2d');
|
|
84
|
+
context.save();
|
|
85
|
+
context.translate(canvas.width / 2, canvas.height / 2);
|
|
86
|
+
context.rotate(degToRad(angle));
|
|
87
|
+
context.drawImage(image, -image.width / 2, -image.height / 2);
|
|
88
|
+
context.restore();
|
|
89
|
+
cropImageFromCanvas(context);
|
|
90
|
+
return renderImage(canvas.toDataURL('image/png'));
|
|
91
|
+
};
|
package/ms.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare const MULTIPLY_BY_UNIT: {
|
|
2
|
+
readonly ms: 1;
|
|
3
|
+
readonly sec: 1000;
|
|
4
|
+
readonly min: number;
|
|
5
|
+
readonly hour: number;
|
|
6
|
+
readonly day: number;
|
|
7
|
+
readonly week: number;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Переводит значение в юнитах в миллисекунды
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* ms(1, 'min') // 60_000
|
|
15
|
+
* ms(30, 'sec') // 30_000
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export declare const ms: (value: number, unit?: keyof typeof MULTIPLY_BY_UNIT) => number;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=ms.d.ts.map
|
package/ms.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ms.d.ts","sourceRoot":"","sources":["../src/ms.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,gBAAgB;;;;;;;CAOZ,CAAC;AAEX;;;;;;;;GAQG;AACH,eAAO,MAAM,EAAE,UAAW,MAAM,SAAQ,MAAM,OAAO,gBAAgB,WACrC,CAAC"}
|
package/ms.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const MULTIPLY_BY_UNIT = {
|
|
2
|
+
ms: 1,
|
|
3
|
+
sec: 1000,
|
|
4
|
+
min: 1000 * 60,
|
|
5
|
+
hour: 1000 * 60 * 60,
|
|
6
|
+
day: 1000 * 60 * 60 * 24,
|
|
7
|
+
week: 1000 * 60 * 60 * 24 * 7,
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Переводит значение в юнитах в миллисекунды
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* ms(1, 'min') // 60_000
|
|
15
|
+
* ms(30, 'sec') // 30_000
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
export const ms = (value, unit = 'ms') => value * MULTIPLY_BY_UNIT[unit];
|
package/package.json
ADDED
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "yummies",
|
|
3
|
+
"version": "3.0.0",
|
|
4
|
+
"keywords": [],
|
|
5
|
+
"author": "js2me",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"description": "",
|
|
8
|
+
"type": "module",
|
|
9
|
+
"bugs": {
|
|
10
|
+
"url": "https://github.com/js2me/yummies/issues"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://github.com/js2me/yummies",
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git://github.com/js2me/yummies"
|
|
16
|
+
},
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"@types/insane": "^1.0.0",
|
|
19
|
+
"@types/lodash-es": "^4.17.12",
|
|
20
|
+
"clsx": "^2.1.1",
|
|
21
|
+
"dayjs": "^1.11.13",
|
|
22
|
+
"insane": "^2.6.2",
|
|
23
|
+
"lodash-es": "^4.17.21",
|
|
24
|
+
"nanoid": "^5.0.9",
|
|
25
|
+
"tailwind-merge": "^2.6.0"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"@types/node": "^20.17.11",
|
|
29
|
+
"eslint": "^8.57.1",
|
|
30
|
+
"js2me-eslint-config": "^1.0.7",
|
|
31
|
+
"js2me-exports-post-build-script": "^2.0.17",
|
|
32
|
+
"rimraf": "^6.0.1",
|
|
33
|
+
"typescript": "^5.7.2"
|
|
34
|
+
},
|
|
35
|
+
"exports": {
|
|
36
|
+
"./async": {
|
|
37
|
+
"import": "./async.js",
|
|
38
|
+
"default": "./async.js",
|
|
39
|
+
"types": "./async.d.ts"
|
|
40
|
+
},
|
|
41
|
+
"./cookie": {
|
|
42
|
+
"import": "./cookie.js",
|
|
43
|
+
"default": "./cookie.js",
|
|
44
|
+
"types": "./cookie.d.ts"
|
|
45
|
+
},
|
|
46
|
+
"./css": {
|
|
47
|
+
"import": "./css.js",
|
|
48
|
+
"default": "./css.js",
|
|
49
|
+
"types": "./css.d.ts"
|
|
50
|
+
},
|
|
51
|
+
"./date-time": {
|
|
52
|
+
"import": "./date-time.js",
|
|
53
|
+
"default": "./date-time.js",
|
|
54
|
+
"types": "./date-time.d.ts"
|
|
55
|
+
},
|
|
56
|
+
"./device": {
|
|
57
|
+
"import": "./device.js",
|
|
58
|
+
"default": "./device.js",
|
|
59
|
+
"types": "./device.d.ts"
|
|
60
|
+
},
|
|
61
|
+
"./html": {
|
|
62
|
+
"import": "./html.js",
|
|
63
|
+
"default": "./html.js",
|
|
64
|
+
"types": "./html.d.ts"
|
|
65
|
+
},
|
|
66
|
+
"./id": {
|
|
67
|
+
"import": "./id.js",
|
|
68
|
+
"default": "./id.js",
|
|
69
|
+
"types": "./id.d.ts"
|
|
70
|
+
},
|
|
71
|
+
"./imports": {
|
|
72
|
+
"import": "./imports.js",
|
|
73
|
+
"default": "./imports.js",
|
|
74
|
+
"types": "./imports.d.ts"
|
|
75
|
+
},
|
|
76
|
+
"./math": {
|
|
77
|
+
"import": "./math.js",
|
|
78
|
+
"default": "./math.js",
|
|
79
|
+
"types": "./math.d.ts"
|
|
80
|
+
},
|
|
81
|
+
"./media": {
|
|
82
|
+
"import": "./media.js",
|
|
83
|
+
"default": "./media.js",
|
|
84
|
+
"types": "./media.d.ts"
|
|
85
|
+
},
|
|
86
|
+
"./ms": {
|
|
87
|
+
"import": "./ms.js",
|
|
88
|
+
"default": "./ms.js",
|
|
89
|
+
"types": "./ms.d.ts"
|
|
90
|
+
},
|
|
91
|
+
"./price": {
|
|
92
|
+
"import": "./price.js",
|
|
93
|
+
"default": "./price.js",
|
|
94
|
+
"types": "./price.d.ts"
|
|
95
|
+
},
|
|
96
|
+
"./sound": {
|
|
97
|
+
"import": "./sound.js",
|
|
98
|
+
"default": "./sound.js",
|
|
99
|
+
"types": "./sound.d.ts"
|
|
100
|
+
},
|
|
101
|
+
"./storage": {
|
|
102
|
+
"import": "./storage.js",
|
|
103
|
+
"default": "./storage.js",
|
|
104
|
+
"types": "./storage.d.ts"
|
|
105
|
+
},
|
|
106
|
+
"./text": {
|
|
107
|
+
"import": "./text.js",
|
|
108
|
+
"default": "./text.js",
|
|
109
|
+
"types": "./text.d.ts"
|
|
110
|
+
},
|
|
111
|
+
"./type-guard": {
|
|
112
|
+
"import": "./type-guard.js",
|
|
113
|
+
"default": "./type-guard.js",
|
|
114
|
+
"types": "./type-guard.d.ts"
|
|
115
|
+
},
|
|
116
|
+
"./utils/types": {
|
|
117
|
+
"import": "./utils/types.js",
|
|
118
|
+
"default": "./utils/types.js",
|
|
119
|
+
"types": "./utils/types.d.ts"
|
|
120
|
+
},
|
|
121
|
+
"./vibrate": {
|
|
122
|
+
"import": "./vibrate.js",
|
|
123
|
+
"default": "./vibrate.js",
|
|
124
|
+
"types": "./vibrate.d.ts"
|
|
125
|
+
},
|
|
126
|
+
"./package.json": "./package.json"
|
|
127
|
+
},
|
|
128
|
+
"files": [
|
|
129
|
+
"*"
|
|
130
|
+
],
|
|
131
|
+
"scripts": {
|
|
132
|
+
"clean": "rimraf dist",
|
|
133
|
+
"check": "eslint . --fix",
|
|
134
|
+
"prebuild": "npm run clean && npm run check",
|
|
135
|
+
"build": "tsc && node ./post-build.mjs",
|
|
136
|
+
"pub:patch": "PUBLISH=true PUBLISH_VERSION=patch pnpm run build",
|
|
137
|
+
"pub:minor": "PUBLISH=true PUBLISH_VERSION=minor pnpm run build",
|
|
138
|
+
"pub:major": "PUBLISH=true PUBLISH_VERSION=major pnpm run build"
|
|
139
|
+
}
|
|
140
|
+
}
|
package/price.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface PriceFormatOptions extends Partial<Omit<Intl.NumberFormatOptions, 'currency'>> {
|
|
2
|
+
withoutSymbol?: boolean;
|
|
3
|
+
customSymbol?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const formatPrice: (price: number, locale: string, currency?: string, { withoutSymbol, customSymbol, ...options }?: PriceFormatOptions) => string;
|
|
6
|
+
//# sourceMappingURL=price.d.ts.map
|
package/price.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"price.d.ts","sourceRoot":"","sources":["../src/price.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBACf,SAAQ,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,mBAAmB,EAAE,UAAU,CAAC,CAAC;IAC3D,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,WAAW,UACf,MAAM,UACL,MAAM,aACH,MAAM,gDAC4B,kBAAkB,WAsBhE,CAAC"}
|
package/price.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export const formatPrice = (price, locale, currency, { withoutSymbol, customSymbol, ...options } = {}) => {
|
|
2
|
+
const priceFormatter = new Intl.NumberFormat(locale, {
|
|
3
|
+
style: 'currency',
|
|
4
|
+
currency,
|
|
5
|
+
minimumFractionDigits: 0,
|
|
6
|
+
currencyDisplay: 'narrowSymbol',
|
|
7
|
+
...options,
|
|
8
|
+
});
|
|
9
|
+
const zeroPrice = priceFormatter.format(0);
|
|
10
|
+
const currencySymbol = zeroPrice.replace('0', '');
|
|
11
|
+
const rawPrice = priceFormatter.format(price);
|
|
12
|
+
const priceWithoutCurrency = rawPrice.replace(currencySymbol, '');
|
|
13
|
+
if (withoutSymbol) {
|
|
14
|
+
return priceWithoutCurrency;
|
|
15
|
+
}
|
|
16
|
+
return `${priceWithoutCurrency} ${customSymbol !== null && customSymbol !== void 0 ? customSymbol : (currency === 'RUB' ? 'р' : currencySymbol)}`.replace(/\s{2,}/, ' ');
|
|
17
|
+
};
|
package/sound.d.ts
ADDED
package/sound.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sound.d.ts","sourceRoot":"","sources":["../src/sound.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,SAAS,SACd,MAAM,eACI;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,kBAUpC,CAAC"}
|
package/sound.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Воспроизводит звук из файла
|
|
3
|
+
*/
|
|
4
|
+
export const playSound = async (file, { volume = 1 } = {}) => {
|
|
5
|
+
let audio = new Audio(file);
|
|
6
|
+
audio.volume = volume;
|
|
7
|
+
audio.muted = !volume;
|
|
8
|
+
await audio.play();
|
|
9
|
+
audio.remove();
|
|
10
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
11
|
+
// @ts-ignore
|
|
12
|
+
audio = null;
|
|
13
|
+
};
|
package/storage.d.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export type StorageType = 'session' | 'local';
|
|
2
|
+
export declare const createStorageKey: (prefix: string, key: string, namespace?: string) => string;
|
|
3
|
+
export interface SetToStorageConfig<V> extends Omit<GetFromStorageConfig<V>, 'fallback'> {
|
|
4
|
+
value: V;
|
|
5
|
+
}
|
|
6
|
+
export interface GetFromStorageConfig<V> {
|
|
7
|
+
/**
|
|
8
|
+
* Ключ по которому можно получить значение из хранилища (имя ключа не полное, оно дополняется неймпспейсом проекта)
|
|
9
|
+
*/
|
|
10
|
+
key: string;
|
|
11
|
+
/**
|
|
12
|
+
* Тип хранилища
|
|
13
|
+
*/
|
|
14
|
+
type: StorageType;
|
|
15
|
+
/**
|
|
16
|
+
* дефолтное значение, которое будет использоваться если значения нет в хранилище
|
|
17
|
+
*/
|
|
18
|
+
fallback?: V;
|
|
19
|
+
/**
|
|
20
|
+
* Доп. делитель в ключе
|
|
21
|
+
*/
|
|
22
|
+
namespace?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Доп. делитель
|
|
25
|
+
*/
|
|
26
|
+
prefix?: string;
|
|
27
|
+
}
|
|
28
|
+
export type SetToStorageWrappedConfig<V, BaseConfig extends StorageConfigBase> = Omit<SetToStorageConfig<V>, Extract<keyof SetToStorageConfig<V>, keyof BaseConfig>> & Partial<Pick<SetToStorageConfig<V>, Extract<keyof SetToStorageConfig<V>, keyof BaseConfig>>> & Pick<BaseConfig, Exclude<keyof BaseConfig, keyof SetToStorageConfig<V>>>;
|
|
29
|
+
export type GetFromStorageWrappedConfig<V, BaseConfig extends StorageConfigBase> = Omit<GetFromStorageConfig<V>, Extract<keyof GetFromStorageConfig<V>, keyof BaseConfig>> & Partial<Pick<GetFromStorageConfig<V>, Extract<keyof GetFromStorageConfig<V>, keyof BaseConfig>>> & Pick<BaseConfig, Exclude<keyof BaseConfig, keyof GetFromStorageConfig<V>>>;
|
|
30
|
+
export type StorageConfigBase = Partial<Pick<GetFromStorageConfig<any>, 'prefix' | 'type'>>;
|
|
31
|
+
export interface StorageApi<BaseConfig extends StorageConfigBase> {
|
|
32
|
+
set<Value>(config: SetToStorageWrappedConfig<Value, BaseConfig>): void;
|
|
33
|
+
get<Value>(config: GetFromStorageWrappedConfig<Value, BaseConfig>): Value | null;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Создает интерфейс для работы с хранилищем (localStorage, sessionStorage)
|
|
37
|
+
*/
|
|
38
|
+
export declare function createStorage<BaseConfig extends StorageConfigBase>(storageConfig: BaseConfig): StorageApi<BaseConfig>;
|
|
39
|
+
//# sourceMappingURL=storage.d.ts.map
|
package/storage.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../src/storage.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,OAAO,CAAC;AAO9C,eAAO,MAAM,gBAAgB,WACnB,MAAM,OACT,MAAM,cACC,MAAM,WACsC,CAAC;AAmB3D,MAAM,WAAW,kBAAkB,CAAC,CAAC,CACnC,SAAQ,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC,EAAE,UAAU,CAAC;IACjD,KAAK,EAAE,CAAC,CAAC;CACV;AAED,MAAM,WAAW,oBAAoB,CAAC,CAAC;IACrC;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,IAAI,EAAE,WAAW,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,CAAC;IACb;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,yBAAyB,CACnC,CAAC,EACD,UAAU,SA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BAAgB,aAAa,CAAC,UAAU,SAAS,iBAAiB,EAChE,aAAa,EAAE,UAAU,GACxB,UAAU,CAAC,UAAU,CAAC,CAgCxB"}
|
package/storage.js
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
const storages = {
|
|
2
|
+
session: sessionStorage,
|
|
3
|
+
local: localStorage,
|
|
4
|
+
};
|
|
5
|
+
export const createStorageKey = (prefix, key, namespace) => `${prefix}${namespace ? `/${namespace}` : ''}/${key}`;
|
|
6
|
+
const parseStorageValue = (value) => {
|
|
7
|
+
if (typeof value !== 'string') {
|
|
8
|
+
return value;
|
|
9
|
+
}
|
|
10
|
+
try {
|
|
11
|
+
const parsed = JSON.parse(value);
|
|
12
|
+
return parsed;
|
|
13
|
+
}
|
|
14
|
+
catch (_a) {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
const formatValueToStorage = (value) => {
|
|
19
|
+
return JSON.stringify(value);
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Создает интерфейс для работы с хранилищем (localStorage, sessionStorage)
|
|
23
|
+
*/
|
|
24
|
+
export function createStorage(storageConfig) {
|
|
25
|
+
return {
|
|
26
|
+
set: (cfg) => {
|
|
27
|
+
var _a, _b;
|
|
28
|
+
const config = cfg;
|
|
29
|
+
const storageType = ((_a = config.type) !== null && _a !== void 0 ? _a : storageConfig.type);
|
|
30
|
+
const storagePrefix = ((_b = config.prefix) !== null && _b !== void 0 ? _b : storageConfig.prefix);
|
|
31
|
+
const storage = storages[storageType];
|
|
32
|
+
storage.setItem(createStorageKey(storagePrefix, config.key, config.namespace), formatValueToStorage(config.value));
|
|
33
|
+
},
|
|
34
|
+
get: (cfg) => {
|
|
35
|
+
var _a, _b, _c, _d;
|
|
36
|
+
const config = cfg;
|
|
37
|
+
const storageType = ((_a = config.type) !== null && _a !== void 0 ? _a : storageConfig.type);
|
|
38
|
+
const storagePrefix = ((_b = config.prefix) !== null && _b !== void 0 ? _b : storageConfig.prefix);
|
|
39
|
+
const storage = storages[storageType];
|
|
40
|
+
return ((_d = (_c = parseStorageValue(storage.getItem(createStorageKey(storagePrefix, config.key, config.namespace)))) !== null && _c !== void 0 ? _c : config.fallback) !== null && _d !== void 0 ? _d : null);
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
}
|
package/text.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Склонение слова в зависимости от количества
|
|
3
|
+
* @example
|
|
4
|
+
* declension(1, ['слово', 'слова', 'слов']) // 'слово'
|
|
5
|
+
* @example
|
|
6
|
+
* declension(2, ['слово', 'слова', 'слов']) // 'слова'
|
|
7
|
+
* @example
|
|
8
|
+
* declension(5, ['слово', 'слова', 'слов']) // 'слов'
|
|
9
|
+
*/
|
|
10
|
+
export declare const declension: (count: number, txt: [one: string, two: string, five: string], cases?: number[]) => string;
|
|
11
|
+
//# sourceMappingURL=text.d.ts.map
|
package/text.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../src/text.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,UACd,MAAM,OACR,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,6BAGgC,CAAC"}
|
package/text.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Склонение слова в зависимости от количества
|
|
3
|
+
* @example
|
|
4
|
+
* declension(1, ['слово', 'слова', 'слов']) // 'слово'
|
|
5
|
+
* @example
|
|
6
|
+
* declension(2, ['слово', 'слова', 'слов']) // 'слова'
|
|
7
|
+
* @example
|
|
8
|
+
* declension(5, ['слово', 'слова', 'слов']) // 'слов'
|
|
9
|
+
*/
|
|
10
|
+
export const declension = (count, txt, cases = [2, 0, 1, 1, 1, 2]) => txt[count % 100 > 4 && count % 100 < 20 ? 2 : cases[Math.min(count % 10, 5)]];
|
package/type-guard.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AnyFunction, AnyObject } from './utils/types';
|
|
2
|
+
export declare const typeGuard: {
|
|
3
|
+
isNull: (value: unknown) => value is null;
|
|
4
|
+
isUndefined: (value: unknown) => value is undefined;
|
|
5
|
+
isObject: (value: unknown) => value is AnyObject;
|
|
6
|
+
isArray: (value: unknown) => value is unknown[];
|
|
7
|
+
isString: (value: unknown) => value is string;
|
|
8
|
+
isNumber: (value: unknown) => value is number;
|
|
9
|
+
isBoolean: (value: unknown) => value is boolean;
|
|
10
|
+
isFunction: (value: unknown) => value is AnyFunction;
|
|
11
|
+
isRegExp: (value: unknown) => value is boolean;
|
|
12
|
+
isElement: (value: unknown) => value is HTMLElement;
|
|
13
|
+
isNaN: (value: unknown) => value is number;
|
|
14
|
+
isInfinite: (value: unknown) => value is number;
|
|
15
|
+
isSymbol: (value: unknown) => value is symbol;
|
|
16
|
+
isDefined: <T>(value: T | undefined | null) => value is T;
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=type-guard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type-guard.d.ts","sourceRoot":"","sources":["../src/type-guard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AA4CvD,eAAO,MAAM,SAAS;oBALZ,OAAO,KAAG,KAAK,QAAK;yBAApB,OAAO,KAAG,KAAK,aAAK;sBAApB,OAAO,KAAG,KAAK,aAAK;qBAApB,OAAO,KAAG,KAAK,aAAK;sBAApB,OAAO,KAAG,KAAK,UAAK;sBAApB,OAAO,KAAG,KAAK,UAAK;uBAApB,OAAO,KAAG,KAAK,WAAK;wBAApB,OAAO,KAAG,KAAK,eAAK;sBAApB,OAAO,KAAG,KAAK,WAAK;uBAApB,OAAO,KAAG,KAAK,eAAK;mBAApB,OAAO,KAAG,KAAK,UAAK;wBAApB,OAAO,KAAG,KAAK,UAAK;sBAApB,OAAO,KAAG,KAAK,UAAK;gBAGX,CAAC,SAAS,CAAC,GAAG,SAAS,GAAG,IAAI,KAAG,KAAK,IAAI,CAAC;CAiB7D,CAAC"}
|
package/type-guard.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// Based on https://gist.github.com/jonbretman/7259628
|
|
2
|
+
function getType(value) {
|
|
3
|
+
// handle corner cases for old IE and PhantomJS
|
|
4
|
+
if (value === undefined) {
|
|
5
|
+
return 'undefined';
|
|
6
|
+
}
|
|
7
|
+
if (value === null) {
|
|
8
|
+
return 'null';
|
|
9
|
+
}
|
|
10
|
+
// handle DOM elements
|
|
11
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
12
|
+
// @ts-ignore
|
|
13
|
+
if (value && (value.nodeType === 1 || value.nodeType === 9)) {
|
|
14
|
+
return 'element';
|
|
15
|
+
}
|
|
16
|
+
const toStringResult = Object.prototype.toString.call(value);
|
|
17
|
+
const type = toStringResult.slice('[object '.length, -1).toLowerCase();
|
|
18
|
+
// handle NaN and Infinity
|
|
19
|
+
if (type === 'number') {
|
|
20
|
+
if (Number.isNaN(value)) {
|
|
21
|
+
return 'nan';
|
|
22
|
+
}
|
|
23
|
+
if (!Number.isFinite(value)) {
|
|
24
|
+
return 'infinity';
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
return type;
|
|
28
|
+
}
|
|
29
|
+
const createTypeGuard = (type) => (value) => getType(value) === type;
|
|
30
|
+
const isDefined = (value) => value != null;
|
|
31
|
+
export const typeGuard = {
|
|
32
|
+
isNull: createTypeGuard('null'),
|
|
33
|
+
isUndefined: createTypeGuard('undefined'),
|
|
34
|
+
isObject: createTypeGuard('object'),
|
|
35
|
+
isArray: createTypeGuard('array'),
|
|
36
|
+
isString: createTypeGuard('string'),
|
|
37
|
+
isNumber: createTypeGuard('number'),
|
|
38
|
+
isBoolean: createTypeGuard('boolean'),
|
|
39
|
+
isFunction: createTypeGuard('function'),
|
|
40
|
+
isRegExp: createTypeGuard('regexp'),
|
|
41
|
+
isElement: createTypeGuard('element'),
|
|
42
|
+
isNaN: createTypeGuard('nan'),
|
|
43
|
+
isInfinite: createTypeGuard('infinite'),
|
|
44
|
+
isSymbol: createTypeGuard('symbol'),
|
|
45
|
+
isDefined,
|
|
46
|
+
};
|
package/utils/types.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export type ValueOf<T> = T[keyof T];
|
|
2
|
+
export type ExtractEnumKeys<T> = ValueOf<{
|
|
3
|
+
[key in keyof T]: key extends string ? key : never;
|
|
4
|
+
}>;
|
|
5
|
+
export type Maybe<T> = Nullable<T> | undefined;
|
|
6
|
+
export type Nullable<T> = T | null;
|
|
7
|
+
export type AnyObject = Record<string, any>;
|
|
8
|
+
export type EmptyObject = Record<string, never>;
|
|
9
|
+
export type AnyPrimitive = string | number | boolean | null | undefined;
|
|
10
|
+
export type AnyFunction = (...args: any) => any;
|
|
11
|
+
export type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
|
12
|
+
type FalsyValues = undefined | null | '' | false | 0;
|
|
13
|
+
export type MaybeFalsy<T> = Maybe<T> | FalsyValues;
|
|
14
|
+
export type Class<T, Args extends any[] = any[]> = new (...args: Args) => T;
|
|
15
|
+
/**
|
|
16
|
+
* Все свойства будут опциональны, в любую глубину
|
|
17
|
+
*/
|
|
18
|
+
export type DeepPartial<T> = {
|
|
19
|
+
[K in keyof T]?: T[K] extends object ? DeepPartial<T[K]> : T[K];
|
|
20
|
+
};
|
|
21
|
+
export type PartialKeys<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
22
|
+
export type RequiredKeys<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
|
|
23
|
+
export type AllPropertiesOptional<T> = keyof T extends never ? true : {
|
|
24
|
+
[K in keyof T]-?: undefined extends T[K] ? never : K;
|
|
25
|
+
} extends {
|
|
26
|
+
[K in keyof T]: never;
|
|
27
|
+
} ? true : false;
|
|
28
|
+
export type RecordEntries<T extends AnyObject> = T extends Record<infer Keys, infer Values> ? [Keys, Values][] : never;
|
|
29
|
+
export {};
|
|
30
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/utils/types.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAEpC,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,OAAO,CAAC;KACtC,GAAG,IAAI,MAAM,CAAC,GAAG,GAAG,SAAS,MAAM,GAAG,GAAG,GAAG,KAAK;CACnD,CAAC,CAAC;AAEH,MAAM,MAAM,KAAK,CAAC,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;AAE/C,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AAEnC,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAE5C,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAEhD,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC;AAExE,MAAM,MAAM,WAAW,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,GAAG,CAAC;AAEhD,MAAM,MAAM,mBAAmB,CAAC,CAAC,IAAI,CACnC,CAAC,SAAS,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI,GAAG,KAAK,CACvC,SAAS,CAAC,CAAC,EAAE,MAAM,CAAC,KAAK,IAAI,GAC1B,CAAC,GACD,KAAK,CAAC;AAEV,KAAK,WAAW,GAAG,SAAS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