@kws3/ui 2.0.2 → 2.0.3
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/CHANGELOG.mdx +3 -0
- package/forms/colorpicker/Colorpicker.js +6 -2
- package/internal/index.js +8 -6
- package/package.json +2 -2
- package/resizeObserver/index.js +4 -1
- package/utils/index.js +14 -12
package/CHANGELOG.mdx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
function initialize(win, doc) {
|
|
2
2
|
var CP,
|
|
3
3
|
instance = "__instance__",
|
|
4
4
|
first = "firstChild",
|
|
@@ -619,4 +619,8 @@ export default (function (win, doc) {
|
|
|
619
619
|
return $;
|
|
620
620
|
})
|
|
621
621
|
);
|
|
622
|
-
}
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
export default typeof window !== "undefined"
|
|
625
|
+
? initialize(window, document)
|
|
626
|
+
: function () {};
|
package/internal/index.js
CHANGED
|
@@ -18,10 +18,12 @@ export function isEscKey(e) {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
export const IS_MAC =
|
|
21
|
-
"
|
|
22
|
-
?
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
typeof window !== "undefined"
|
|
22
|
+
? "navigator" in window
|
|
23
|
+
? /mac/i.test(
|
|
24
|
+
window.navigator.userAgentData
|
|
25
|
+
? window.navigator.userAgentData.platform
|
|
26
|
+
: window.navigator.platform
|
|
27
|
+
)
|
|
28
|
+
: false
|
|
27
29
|
: false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kws3/ui",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"description": "UI components for use with Svelte v3 applications.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"svelte": "index.js",
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"text-mask-core": "^5.1.2",
|
|
33
33
|
"tippy.js": "^6.3.1"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "25bba9ec00504040f662c73b524bb719e62c3e6e"
|
|
36
36
|
}
|
package/resizeObserver/index.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
export const hasResizeObserver =
|
|
1
|
+
export const hasResizeObserver =
|
|
2
|
+
typeof window !== "undefined"
|
|
3
|
+
? typeof window.ResizeObserver !== "undefined"
|
|
4
|
+
: false;
|
|
2
5
|
|
|
3
6
|
/**
|
|
4
7
|
* Usage: `<div use:resizeObserver on:resize={resizeHandler}>`
|
package/utils/index.js
CHANGED
|
@@ -32,18 +32,20 @@ export function cloneObject(obj) {
|
|
|
32
32
|
* @param {function} [callback=function(){}] - callback function
|
|
33
33
|
*/
|
|
34
34
|
export var rAF =
|
|
35
|
-
window
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
35
|
+
typeof window !== "undefined"
|
|
36
|
+
? window.requestAnimationFrame ||
|
|
37
|
+
//@ts-ignore
|
|
38
|
+
window.webkitRequestAnimationFrame ||
|
|
39
|
+
//@ts-ignore
|
|
40
|
+
window.mozRequestAnimationFrame ||
|
|
41
|
+
//@ts-ignore
|
|
42
|
+
window.oRequestAnimationFrame ||
|
|
43
|
+
//@ts-ignore
|
|
44
|
+
window.msRequestAnimationFrame ||
|
|
45
|
+
function (callback) {
|
|
46
|
+
window.setTimeout(callback, 1000 / 60);
|
|
47
|
+
}
|
|
48
|
+
: () => {};
|
|
47
49
|
|
|
48
50
|
/**
|
|
49
51
|
* Returns a function, that, as long as it continues to be invoked, will not
|