@wiajs/core 1.1.9 → 1.1.12

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/core.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * wia core v1.1.9
2
+ * wia core v1.1.12
3
3
  * (c) 2015-2024 Sibyl Yu and contributors
4
4
  * Released under the MIT License.
5
5
  */
package/dist/core.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * wia core v1.1.9
2
+ * wia core v1.1.12
3
3
  * (c) 2015-2024 Sibyl Yu and contributors
4
4
  * Released under the MIT License.
5
5
  */
package/dist/core.min.js CHANGED
@@ -1,10 +1,10 @@
1
1
  /*!
2
- * wia core v1.1.9
2
+ * wia core v1.1.12
3
3
  * (c) 2015-2024 Sibyl Yu and contributors
4
4
  * Released under the MIT License.
5
5
  */
6
6
  /*!
7
- * wia core v1.1.9
7
+ * wia core v1.1.12
8
8
  * (c) 2015-2024 Sibyl Yu and contributors
9
9
  * Released under the MIT License.
10
10
  */
package/dist/core.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * wia core v1.1.9
2
+ * wia core v1.1.12
3
3
  * (c) 2015-2024 Sibyl Yu and contributors
4
4
  * Released under the MIT License.
5
5
  */
package/package.json CHANGED
@@ -1,11 +1,15 @@
1
1
  {
2
2
  "name": "@wiajs/core",
3
- "version": "1.1.9",
3
+ "version": "1.1.12",
4
4
  "description": "wia app core package",
5
+ "main": "./dist/core.cjs",
6
+ "module": "./dist/core.mjs",
7
+ "types": "./types/core.d.ts",
5
8
  "exports": {
6
9
  ".": {
7
- "import": "./dist/core.mjs",
8
10
  "require": "./dist/core.cjs",
11
+ "import": "./dist/core.mjs",
12
+ "default": "./dist/core.mjs",
9
13
  "types": "./types/core.d.ts"
10
14
  },
11
15
  "./util/*": [
@@ -0,0 +1 @@
1
+ export {default as Utils} from './utils';
@@ -0,0 +1,88 @@
1
+ /** Parse url query GET parameters */
2
+ export const parseUrlQuery: (url: string) => object;
3
+ /** Create a serialized representation of a plain object suitable for use in a URL query string */
4
+ export const serializeObject: (obj: object) => string;
5
+ /** Cross-browser implementation on requestAnimationFrame */
6
+ export const requestAnimationFrame: (callback: Function) => number;
7
+ /** Cancels an animation frame request */
8
+ export const cancelAnimationFrame: (requestID: number) => void;
9
+ /** Executes code on next available animation frame */
10
+ export const nextFrame: (callback: Function) => number;
11
+ /** executes code after required delay. Basically alias for setTimeout */
12
+ export const nextTick: (callback: Function, timeout: number) => number;
13
+ /** Returns current timestamp in ms */
14
+ export const now: () => number;
15
+ /** Extends target object with properties and methods from from objects */
16
+ export const extend: (target: object, ...from: object[]) => object;
17
+ /** Extends target object with properties and methods from from objects */
18
+ export const merge: (target: object, ...from: object[]) => object;
19
+ /** Returns unique number, increased by 1 with every call */
20
+ export const uniqueNumber: () => number;
21
+ /** Generates random ID-like string */
22
+ export const id: (mask: string, map: string) => string;
23
+ /** Returns preloader inner content for MD theme */
24
+ export const mdPreloaderContent: () => string;
25
+ /** Returns preloader inner content for iOS theme */
26
+ export const iosPreloaderContent: () => string;
27
+ /** Deletes object properties */
28
+ export const deleteProps: (obj: object) => void;
29
+ /** */
30
+ export const colorHexToRgb: (hex: string) => number[];
31
+ /** */
32
+ export const colorRgbToHex: (r: number, g: number, b: number) => string;
33
+ /** */
34
+ export const colorRgbToHsl: (r: number, g: number, b: number) => number[];
35
+ /** */
36
+ export const colorHslToRgb: (h: number, s: number, l: number) => number[];
37
+ /** */
38
+ export const colorHsbToHsl: (h: number, s: number, b: number) => number[];
39
+ /** */
40
+ export const colorHslToHsb: (h: number, s: number, l: number) => number[];
41
+
42
+ /** */
43
+ export const bindMethods: (target: any, obj: any) => any;
44
+
45
+ export interface Utils {
46
+ /** Parse url query GET parameters */
47
+ parseUrlQuery: (url: string) => object;
48
+ /** Create a serialized representation of a plain object suitable for use in a URL query string */
49
+ serializeObject: (obj: object) => string;
50
+ /** Cross-browser implementation on requestAnimationFrame */
51
+ requestAnimationFrame: (callback: Function) => number;
52
+ /** Cancels an animation frame request */
53
+ cancelAnimationFrame: (requestID: number) => void;
54
+ /** Executes code on next available animation frame */
55
+ nextFrame: (callback: Function) => number;
56
+ /** executes code after required delay. Basically alias for setTimeout */
57
+ nextTick: (callback: Function, timeout: number) => number;
58
+ /** Returns current timestamp in ms */
59
+ now: () => number;
60
+ /** Extends target object with properties and methods from from objects */
61
+ extend: (target: object, ...from: object[]) => object;
62
+ /** Extends target object with properties and methods from from objects */
63
+ merge: (target: object, ...from: object[]) => object;
64
+ /** Returns unique number, increased by 1 with every call */
65
+ uniqueNumber: () => number;
66
+ /** Generates random ID-like string */
67
+ id: (mask: string, map: string) => string;
68
+ /** Returns preloader inner content for MD theme */
69
+ mdPreloaderContent: () => string;
70
+ /** Returns preloader inner content for iOS theme */
71
+ iosPreloaderContent: () => string;
72
+ /** Deletes object properties */
73
+ deleteProps: (obj: object) => void;
74
+ /** */
75
+ colorHexToRgb: (hex: string) => number[];
76
+ /** */
77
+ colorRgbToHex: (r: number, g: number, b: number) => string;
78
+ /** */
79
+ colorRgbToHsl: (r: number, g: number, b: number) => number[];
80
+ /** */
81
+ colorHslToRgb: (h: number, s: number, l: number) => number[];
82
+ /** */
83
+ colorHsbToHsl: (h: number, s: number, b: number) => number[];
84
+ /** */
85
+ colorHslToHsb: (h: number, s: number, l: number) => number[];
86
+ /** */
87
+ bindMethods: (target: any, obj: any) => any;
88
+ }