umaki 0.2.4 → 0.2.6
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/README.md +193 -79
- package/dist/LICENSE.txt +32 -0
- package/dist/_virtual/_commonjsHelpers.cjs.js +19 -1
- package/dist/_virtual/_commonjsHelpers.es.js +16 -5
- package/dist/_virtual/isBetween.cjs.js +15 -1
- package/dist/_virtual/isBetween.es.js +13 -2
- package/dist/index.cjs.js +99 -1
- package/dist/index.es.js +97 -86
- package/dist/libs/control/bgScrollStop.cjs.js +24 -1
- package/dist/libs/control/bgScrollStop.es.js +21 -4
- package/dist/libs/control/pd.cjs.js +15 -1
- package/dist/libs/control/pd.es.js +13 -2
- package/dist/libs/control/scrollToHash.cjs.js +47 -1
- package/dist/libs/control/scrollToHash.es.js +42 -16
- package/dist/libs/control/videoPlayControl.cjs.js +33 -1
- package/dist/libs/control/videoPlayControl.es.js +27 -10
- package/dist/libs/convert/changeDateStringToSpecificFormat.cjs.js +16 -1
- package/dist/libs/convert/changeDateStringToSpecificFormat.es.js +14 -3
- package/dist/libs/convert/jsonStringToJsonObject.cjs.js +20 -1
- package/dist/libs/convert/jsonStringToJsonObject.es.js +15 -4
- package/dist/libs/get/getAspectRatio.cjs.js +19 -1
- package/dist/libs/get/getAspectRatio.es.js +16 -5
- package/dist/libs/get/getClassNames.cjs.js +18 -1
- package/dist/libs/get/getClassNames.es.js +16 -2
- package/dist/libs/get/getDocumentHeight.cjs.js +15 -1
- package/dist/libs/get/getDocumentHeight.es.js +13 -2
- package/dist/libs/get/getEventPaths.cjs.js +35 -1
- package/dist/libs/get/getEventPaths.es.js +30 -12
- package/dist/libs/get/getGcd.cjs.js +21 -1
- package/dist/libs/get/getGcd.es.js +18 -5
- package/dist/libs/get/getOrientation.cjs.js +18 -1
- package/dist/libs/get/getOrientation.es.js +16 -2
- package/dist/libs/get/getParentList.cjs.js +19 -1
- package/dist/libs/get/getParentList.es.js +16 -4
- package/dist/libs/get/getQueryParams.cjs.js +30 -1
- package/dist/libs/get/getQueryParams.es.js +26 -12
- package/dist/libs/get/getRem.cjs.js +18 -1
- package/dist/libs/get/getRem.es.js +16 -2
- package/dist/libs/get/getScrollbarWidth.cjs.js +15 -1
- package/dist/libs/get/getScrollbarWidth.es.js +13 -2
- package/dist/libs/get/getSessionStorage.cjs.js +20 -1
- package/dist/libs/get/getSessionStorage.es.js +17 -5
- package/dist/libs/get/getStringLength.cjs.js +16 -1
- package/dist/libs/get/getStringLength.es.js +14 -3
- package/dist/libs/get/getStylePropertyValue.cjs.js +15 -1
- package/dist/libs/get/getStylePropertyValue.es.js +13 -2
- package/dist/libs/get/getStylePropertyValueToNumber.cjs.js +16 -1
- package/dist/libs/get/getStylePropertyValueToNumber.es.js +14 -3
- package/dist/libs/get/getUaData.cjs.js +34 -1
- package/dist/libs/get/getUaData.es.js +30 -12
- package/dist/libs/is/isBetweenDateTime.cjs.js +25 -1
- package/dist/libs/is/isBetweenDateTime.es.js +21 -8
- package/dist/libs/is/isExistAllElements.cjs.js +17 -1
- package/dist/libs/is/isExistAllElements.es.js +15 -2
- package/dist/libs/is/isIpad.cjs.js +21 -1
- package/dist/libs/is/isIpad.es.js +18 -6
- package/dist/libs/is/isKeyExists.cjs.js +17 -1
- package/dist/libs/is/isKeyExists.es.js +15 -2
- package/dist/libs/is/isSafari.cjs.js +22 -1
- package/dist/libs/is/isSafari.es.js +19 -5
- package/dist/libs/is/isScrollable.cjs.js +19 -1
- package/dist/libs/is/isScrollable.es.js +16 -4
- package/dist/libs/is/isTouchSupport.cjs.js +16 -1
- package/dist/libs/is/isTouchSupport.es.js +14 -3
- package/dist/libs/remove/removeAllHtmlTags.cjs.js +23 -1
- package/dist/libs/remove/removeAllHtmlTags.es.js +21 -7
- package/dist/libs/remove/removeAttribute.cjs.js +17 -1
- package/dist/libs/remove/removeAttribute.es.js +14 -3
- package/dist/libs/remove/removeSessionStorage.cjs.js +18 -1
- package/dist/libs/remove/removeSessionStorage.es.js +15 -4
- package/dist/libs/remove/removeStylePropertyValue.cjs.js +17 -1
- package/dist/libs/remove/removeStylePropertyValue.es.js +14 -3
- package/dist/libs/set/set100vh.cjs.js +18 -1
- package/dist/libs/set/set100vh.es.js +15 -4
- package/dist/libs/set/set100vw.cjs.js +18 -1
- package/dist/libs/set/set100vw.es.js +15 -4
- package/dist/libs/set/setAttribute.cjs.js +17 -1
- package/dist/libs/set/setAttribute.es.js +14 -3
- package/dist/libs/set/setScrollPositionToCenter.cjs.js +21 -1
- package/dist/libs/set/setScrollPositionToCenter.es.js +18 -4
- package/dist/libs/set/setSessionStorage.cjs.js +18 -1
- package/dist/libs/set/setSessionStorage.es.js +15 -4
- package/dist/libs/set/setStylePropertyValue.cjs.js +17 -1
- package/dist/libs/set/setStylePropertyValue.es.js +14 -3
- package/dist/libs/to/toBoolean.cjs.js +17 -1
- package/dist/libs/to/toBoolean.es.js +15 -2
- package/dist/libs/to/toPositiveNumber.cjs.js +15 -1
- package/dist/libs/to/toPositiveNumber.es.js +13 -2
- package/dist/libs/transform/wrapTextWithSpans.cjs.js +31 -1
- package/dist/libs/transform/wrapTextWithSpans.es.js +27 -13
- package/dist/libs/wait/sleep.cjs.js +17 -1
- package/dist/libs/wait/sleep.es.js +15 -2
- package/dist/libs/wait/waitForAllMediaLoaded.cjs.js +55 -1
- package/dist/libs/wait/waitForAllMediaLoaded.es.js +47 -20
- package/dist/node_modules/dayjs/plugin/isBetween.cjs.js +30 -1
- package/dist/node_modules/dayjs/plugin/isBetween.es.js +25 -14
- package/package.json +2 -1
package/dist/LICENSE.txt
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
Name: dayjs
|
|
2
|
+
Version: 1.11.13
|
|
3
|
+
License: MIT
|
|
4
|
+
Private: false
|
|
5
|
+
Description: 2KB immutable date time library alternative to Moment.js with the same modern API
|
|
6
|
+
Repository: https://github.com/iamkun/dayjs.git
|
|
7
|
+
Homepage: https://day.js.org
|
|
8
|
+
Author: iamkun
|
|
9
|
+
License Copyright:
|
|
10
|
+
===
|
|
11
|
+
|
|
12
|
+
MIT License
|
|
13
|
+
|
|
14
|
+
Copyright (c) 2018-present, iamkun
|
|
15
|
+
|
|
16
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
17
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
18
|
+
in the Software without restriction, including without limitation the rights
|
|
19
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
20
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
21
|
+
furnished to do so, subject to the following conditions:
|
|
22
|
+
|
|
23
|
+
The above copyright notice and this permission notice shall be included in all
|
|
24
|
+
copies or substantial portions of the Software.
|
|
25
|
+
|
|
26
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
27
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
28
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
29
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
30
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
31
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
32
|
+
SOFTWARE.
|
|
@@ -1 +1,19 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
/*!
|
|
3
|
+
* name: umaki
|
|
4
|
+
* version: v0.2.6
|
|
5
|
+
* description: A utility that is often used in web production.
|
|
6
|
+
* author: TsubasaHiga
|
|
7
|
+
* homepage: https://github.com/TsubasaHiga/umaki
|
|
8
|
+
* Released under the MIT License
|
|
9
|
+
*
|
|
10
|
+
* This software includes dependencies licensed under MIT, ISC, BSD-3-Clause, and Apache-2.0.
|
|
11
|
+
* For license information, please see LICENSE.txt
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
14
|
+
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
15
|
+
function getDefaultExportFromCjs(x) {
|
|
16
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
17
|
+
}
|
|
18
|
+
exports.commonjsGlobal = commonjsGlobal;
|
|
19
|
+
exports.getDefaultExportFromCjs = getDefaultExportFromCjs;
|
|
@@ -1,8 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* name: umaki
|
|
3
|
+
* version: v0.2.6
|
|
4
|
+
* description: A utility that is often used in web production.
|
|
5
|
+
* author: TsubasaHiga
|
|
6
|
+
* homepage: https://github.com/TsubasaHiga/umaki
|
|
7
|
+
* Released under the MIT License
|
|
8
|
+
*
|
|
9
|
+
* This software includes dependencies licensed under MIT, ISC, BSD-3-Clause, and Apache-2.0.
|
|
10
|
+
* For license information, please see LICENSE.txt
|
|
11
|
+
*/
|
|
12
|
+
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
13
|
+
function getDefaultExportFromCjs(x) {
|
|
14
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
4
15
|
}
|
|
5
16
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
17
|
+
commonjsGlobal,
|
|
18
|
+
getDefaultExportFromCjs
|
|
8
19
|
};
|
|
@@ -1 +1,15 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
/*!
|
|
3
|
+
* name: umaki
|
|
4
|
+
* version: v0.2.6
|
|
5
|
+
* description: A utility that is often used in web production.
|
|
6
|
+
* author: TsubasaHiga
|
|
7
|
+
* homepage: https://github.com/TsubasaHiga/umaki
|
|
8
|
+
* Released under the MIT License
|
|
9
|
+
*
|
|
10
|
+
* This software includes dependencies licensed under MIT, ISC, BSD-3-Clause, and Apache-2.0.
|
|
11
|
+
* For license information, please see LICENSE.txt
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
14
|
+
var isBetween = { exports: {} };
|
|
15
|
+
exports.__module = isBetween;
|
|
@@ -1,4 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* name: umaki
|
|
3
|
+
* version: v0.2.6
|
|
4
|
+
* description: A utility that is often used in web production.
|
|
5
|
+
* author: TsubasaHiga
|
|
6
|
+
* homepage: https://github.com/TsubasaHiga/umaki
|
|
7
|
+
* Released under the MIT License
|
|
8
|
+
*
|
|
9
|
+
* This software includes dependencies licensed under MIT, ISC, BSD-3-Clause, and Apache-2.0.
|
|
10
|
+
* For license information, please see LICENSE.txt
|
|
11
|
+
*/
|
|
12
|
+
var isBetween = { exports: {} };
|
|
2
13
|
export {
|
|
3
|
-
|
|
14
|
+
isBetween as __module
|
|
4
15
|
};
|
package/dist/index.cjs.js
CHANGED
|
@@ -1 +1,99 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
/*!
|
|
3
|
+
* name: umaki
|
|
4
|
+
* version: v0.2.6
|
|
5
|
+
* description: A utility that is often used in web production.
|
|
6
|
+
* author: TsubasaHiga
|
|
7
|
+
* homepage: https://github.com/TsubasaHiga/umaki
|
|
8
|
+
* Released under the MIT License
|
|
9
|
+
*
|
|
10
|
+
* This software includes dependencies licensed under MIT, ISC, BSD-3-Clause, and Apache-2.0.
|
|
11
|
+
* For license information, please see LICENSE.txt
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
14
|
+
const bgScrollStop = require("./libs/control/bgScrollStop.cjs.js");
|
|
15
|
+
const pd = require("./libs/control/pd.cjs.js");
|
|
16
|
+
const scrollToHash = require("./libs/control/scrollToHash.cjs.js");
|
|
17
|
+
const videoPlayControl = require("./libs/control/videoPlayControl.cjs.js");
|
|
18
|
+
const changeDateStringToSpecificFormat = require("./libs/convert/changeDateStringToSpecificFormat.cjs.js");
|
|
19
|
+
const jsonStringToJsonObject = require("./libs/convert/jsonStringToJsonObject.cjs.js");
|
|
20
|
+
const getAspectRatio = require("./libs/get/getAspectRatio.cjs.js");
|
|
21
|
+
const getClassNames = require("./libs/get/getClassNames.cjs.js");
|
|
22
|
+
const getDocumentHeight = require("./libs/get/getDocumentHeight.cjs.js");
|
|
23
|
+
const getEventPaths = require("./libs/get/getEventPaths.cjs.js");
|
|
24
|
+
const getGcd = require("./libs/get/getGcd.cjs.js");
|
|
25
|
+
const getOrientation = require("./libs/get/getOrientation.cjs.js");
|
|
26
|
+
const getParentList = require("./libs/get/getParentList.cjs.js");
|
|
27
|
+
const getQueryParams = require("./libs/get/getQueryParams.cjs.js");
|
|
28
|
+
const getRem = require("./libs/get/getRem.cjs.js");
|
|
29
|
+
const getScrollbarWidth = require("./libs/get/getScrollbarWidth.cjs.js");
|
|
30
|
+
const getSessionStorage = require("./libs/get/getSessionStorage.cjs.js");
|
|
31
|
+
const getStringLength = require("./libs/get/getStringLength.cjs.js");
|
|
32
|
+
const getStylePropertyValue = require("./libs/get/getStylePropertyValue.cjs.js");
|
|
33
|
+
const getStylePropertyValueToNumber = require("./libs/get/getStylePropertyValueToNumber.cjs.js");
|
|
34
|
+
const getUaData = require("./libs/get/getUaData.cjs.js");
|
|
35
|
+
const isBetweenDateTime = require("./libs/is/isBetweenDateTime.cjs.js");
|
|
36
|
+
const isExistAllElements = require("./libs/is/isExistAllElements.cjs.js");
|
|
37
|
+
const isIpad = require("./libs/is/isIpad.cjs.js");
|
|
38
|
+
const isKeyExists = require("./libs/is/isKeyExists.cjs.js");
|
|
39
|
+
const isSafari = require("./libs/is/isSafari.cjs.js");
|
|
40
|
+
const isScrollable = require("./libs/is/isScrollable.cjs.js");
|
|
41
|
+
const isTouchSupport = require("./libs/is/isTouchSupport.cjs.js");
|
|
42
|
+
const removeAllHtmlTags = require("./libs/remove/removeAllHtmlTags.cjs.js");
|
|
43
|
+
const removeAttribute = require("./libs/remove/removeAttribute.cjs.js");
|
|
44
|
+
const removeSessionStorage = require("./libs/remove/removeSessionStorage.cjs.js");
|
|
45
|
+
const removeStylePropertyValue = require("./libs/remove/removeStylePropertyValue.cjs.js");
|
|
46
|
+
const set100vh = require("./libs/set/set100vh.cjs.js");
|
|
47
|
+
const set100vw = require("./libs/set/set100vw.cjs.js");
|
|
48
|
+
const setAttribute = require("./libs/set/setAttribute.cjs.js");
|
|
49
|
+
const setScrollPositionToCenter = require("./libs/set/setScrollPositionToCenter.cjs.js");
|
|
50
|
+
const setSessionStorage = require("./libs/set/setSessionStorage.cjs.js");
|
|
51
|
+
const setStylePropertyValue = require("./libs/set/setStylePropertyValue.cjs.js");
|
|
52
|
+
const toBoolean = require("./libs/to/toBoolean.cjs.js");
|
|
53
|
+
const toPositiveNumber = require("./libs/to/toPositiveNumber.cjs.js");
|
|
54
|
+
const wrapTextWithSpans = require("./libs/transform/wrapTextWithSpans.cjs.js");
|
|
55
|
+
const sleep = require("./libs/wait/sleep.cjs.js");
|
|
56
|
+
const waitForAllMediaLoaded = require("./libs/wait/waitForAllMediaLoaded.cjs.js");
|
|
57
|
+
exports.bgScrollStop = bgScrollStop.bgScrollStop;
|
|
58
|
+
exports.pd = pd.pd;
|
|
59
|
+
exports.scrollToHash = scrollToHash.scrollToHash;
|
|
60
|
+
exports.videoPlayControl = videoPlayControl.videoPlayControl;
|
|
61
|
+
exports.changeDateStringToSpecificFormat = changeDateStringToSpecificFormat.changeDateStringToSpecificFormat;
|
|
62
|
+
exports.jsonStringToJsonObject = jsonStringToJsonObject.jsonStringToJsonObject;
|
|
63
|
+
exports.getAspectRatio = getAspectRatio.getAspectRatio;
|
|
64
|
+
exports.getClassNames = getClassNames.getClassNames;
|
|
65
|
+
exports.getDocumentHeight = getDocumentHeight.getDocumentHeight;
|
|
66
|
+
exports.getEventPaths = getEventPaths.getEventPaths;
|
|
67
|
+
exports.getGcd = getGcd.getGcd;
|
|
68
|
+
exports.getOrientation = getOrientation.getOrientation;
|
|
69
|
+
exports.getParentList = getParentList.getParentList;
|
|
70
|
+
exports.getQueryParams = getQueryParams.getQueryParams;
|
|
71
|
+
exports.getRem = getRem.getRem;
|
|
72
|
+
exports.getScrollbarWidth = getScrollbarWidth.getScrollbarWidth;
|
|
73
|
+
exports.getSessionStorage = getSessionStorage.getSessionStorage;
|
|
74
|
+
exports.getStringLength = getStringLength.getStringLength;
|
|
75
|
+
exports.getStylePropertyValue = getStylePropertyValue.getStylePropertyValue;
|
|
76
|
+
exports.getStylePropertyValueToNumber = getStylePropertyValueToNumber.getStylePropertyValueToNumber;
|
|
77
|
+
exports.getUaData = getUaData.getUaData;
|
|
78
|
+
exports.isBetweenDateTime = isBetweenDateTime.isBetweenDateTime;
|
|
79
|
+
exports.isExistAllElements = isExistAllElements.isExistAllElements;
|
|
80
|
+
exports.isIpad = isIpad.isIpad;
|
|
81
|
+
exports.isKeyExists = isKeyExists.isKeyExists;
|
|
82
|
+
exports.isSafari = isSafari.isSafari;
|
|
83
|
+
exports.isScrollable = isScrollable.isScrollable;
|
|
84
|
+
exports.isTouchSupport = isTouchSupport.isTouchSupport;
|
|
85
|
+
exports.removeAllHtmlTags = removeAllHtmlTags.removeAllHtmlTags;
|
|
86
|
+
exports.removeAttribute = removeAttribute.removeAttribute;
|
|
87
|
+
exports.removeSessionStorage = removeSessionStorage.removeSessionStorage;
|
|
88
|
+
exports.removeStylePropertyValue = removeStylePropertyValue.removeStylePropertyValue;
|
|
89
|
+
exports.set100vh = set100vh.set100vh;
|
|
90
|
+
exports.set100vw = set100vw.set100vw;
|
|
91
|
+
exports.setAttribute = setAttribute.setAttribute;
|
|
92
|
+
exports.setScrollPositionToCenter = setScrollPositionToCenter.setScrollPositionToCenter;
|
|
93
|
+
exports.setSessionStorage = setSessionStorage.setSessionStorage;
|
|
94
|
+
exports.setStylePropertyValue = setStylePropertyValue.setStylePropertyValue;
|
|
95
|
+
exports.toBoolean = toBoolean.toBoolean;
|
|
96
|
+
exports.toPositiveNumber = toPositiveNumber.toPositiveNumber;
|
|
97
|
+
exports.wrapTextWithSpans = wrapTextWithSpans.wrapTextWithSpans;
|
|
98
|
+
exports.sleep = sleep.sleep;
|
|
99
|
+
exports.waitForAllMediaLoaded = waitForAllMediaLoaded.waitForAllMediaLoaded;
|
package/dist/index.es.js
CHANGED
|
@@ -1,88 +1,99 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
1
|
+
/*!
|
|
2
|
+
* name: umaki
|
|
3
|
+
* version: v0.2.6
|
|
4
|
+
* description: A utility that is often used in web production.
|
|
5
|
+
* author: TsubasaHiga
|
|
6
|
+
* homepage: https://github.com/TsubasaHiga/umaki
|
|
7
|
+
* Released under the MIT License
|
|
8
|
+
*
|
|
9
|
+
* This software includes dependencies licensed under MIT, ISC, BSD-3-Clause, and Apache-2.0.
|
|
10
|
+
* For license information, please see LICENSE.txt
|
|
11
|
+
*/
|
|
12
|
+
import { bgScrollStop } from "./libs/control/bgScrollStop.es.js";
|
|
13
|
+
import { pd } from "./libs/control/pd.es.js";
|
|
14
|
+
import { scrollToHash } from "./libs/control/scrollToHash.es.js";
|
|
15
|
+
import { videoPlayControl } from "./libs/control/videoPlayControl.es.js";
|
|
16
|
+
import { changeDateStringToSpecificFormat } from "./libs/convert/changeDateStringToSpecificFormat.es.js";
|
|
17
|
+
import { jsonStringToJsonObject } from "./libs/convert/jsonStringToJsonObject.es.js";
|
|
18
|
+
import { getAspectRatio } from "./libs/get/getAspectRatio.es.js";
|
|
19
|
+
import { getClassNames } from "./libs/get/getClassNames.es.js";
|
|
20
|
+
import { getDocumentHeight } from "./libs/get/getDocumentHeight.es.js";
|
|
21
|
+
import { getEventPaths } from "./libs/get/getEventPaths.es.js";
|
|
22
|
+
import { getGcd } from "./libs/get/getGcd.es.js";
|
|
23
|
+
import { getOrientation } from "./libs/get/getOrientation.es.js";
|
|
24
|
+
import { getParentList } from "./libs/get/getParentList.es.js";
|
|
25
|
+
import { getQueryParams } from "./libs/get/getQueryParams.es.js";
|
|
26
|
+
import { getRem } from "./libs/get/getRem.es.js";
|
|
27
|
+
import { getScrollbarWidth } from "./libs/get/getScrollbarWidth.es.js";
|
|
28
|
+
import { getSessionStorage } from "./libs/get/getSessionStorage.es.js";
|
|
29
|
+
import { getStringLength } from "./libs/get/getStringLength.es.js";
|
|
30
|
+
import { getStylePropertyValue } from "./libs/get/getStylePropertyValue.es.js";
|
|
31
|
+
import { getStylePropertyValueToNumber } from "./libs/get/getStylePropertyValueToNumber.es.js";
|
|
32
|
+
import { getUaData } from "./libs/get/getUaData.es.js";
|
|
33
|
+
import { isBetweenDateTime } from "./libs/is/isBetweenDateTime.es.js";
|
|
34
|
+
import { isExistAllElements } from "./libs/is/isExistAllElements.es.js";
|
|
35
|
+
import { isIpad } from "./libs/is/isIpad.es.js";
|
|
36
|
+
import { isKeyExists } from "./libs/is/isKeyExists.es.js";
|
|
37
|
+
import { isSafari } from "./libs/is/isSafari.es.js";
|
|
38
|
+
import { isScrollable } from "./libs/is/isScrollable.es.js";
|
|
39
|
+
import { isTouchSupport } from "./libs/is/isTouchSupport.es.js";
|
|
40
|
+
import { removeAllHtmlTags } from "./libs/remove/removeAllHtmlTags.es.js";
|
|
41
|
+
import { removeAttribute } from "./libs/remove/removeAttribute.es.js";
|
|
42
|
+
import { removeSessionStorage } from "./libs/remove/removeSessionStorage.es.js";
|
|
43
|
+
import { removeStylePropertyValue } from "./libs/remove/removeStylePropertyValue.es.js";
|
|
44
|
+
import { set100vh } from "./libs/set/set100vh.es.js";
|
|
45
|
+
import { set100vw } from "./libs/set/set100vw.es.js";
|
|
46
|
+
import { setAttribute } from "./libs/set/setAttribute.es.js";
|
|
47
|
+
import { setScrollPositionToCenter } from "./libs/set/setScrollPositionToCenter.es.js";
|
|
48
|
+
import { setSessionStorage } from "./libs/set/setSessionStorage.es.js";
|
|
49
|
+
import { setStylePropertyValue } from "./libs/set/setStylePropertyValue.es.js";
|
|
50
|
+
import { toBoolean } from "./libs/to/toBoolean.es.js";
|
|
51
|
+
import { toPositiveNumber } from "./libs/to/toPositiveNumber.es.js";
|
|
52
|
+
import { wrapTextWithSpans } from "./libs/transform/wrapTextWithSpans.es.js";
|
|
53
|
+
import { sleep } from "./libs/wait/sleep.es.js";
|
|
54
|
+
import { waitForAllMediaLoaded } from "./libs/wait/waitForAllMediaLoaded.es.js";
|
|
44
55
|
export {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
56
|
+
bgScrollStop,
|
|
57
|
+
changeDateStringToSpecificFormat,
|
|
58
|
+
getAspectRatio,
|
|
59
|
+
getClassNames,
|
|
60
|
+
getDocumentHeight,
|
|
61
|
+
getEventPaths,
|
|
62
|
+
getGcd,
|
|
63
|
+
getOrientation,
|
|
64
|
+
getParentList,
|
|
65
|
+
getQueryParams,
|
|
66
|
+
getRem,
|
|
67
|
+
getScrollbarWidth,
|
|
68
|
+
getSessionStorage,
|
|
69
|
+
getStringLength,
|
|
70
|
+
getStylePropertyValue,
|
|
71
|
+
getStylePropertyValueToNumber,
|
|
72
|
+
getUaData,
|
|
73
|
+
isBetweenDateTime,
|
|
74
|
+
isExistAllElements,
|
|
75
|
+
isIpad,
|
|
76
|
+
isKeyExists,
|
|
77
|
+
isSafari,
|
|
78
|
+
isScrollable,
|
|
79
|
+
isTouchSupport,
|
|
80
|
+
jsonStringToJsonObject,
|
|
81
|
+
pd,
|
|
82
|
+
removeAllHtmlTags,
|
|
83
|
+
removeAttribute,
|
|
84
|
+
removeSessionStorage,
|
|
85
|
+
removeStylePropertyValue,
|
|
86
|
+
scrollToHash,
|
|
87
|
+
set100vh,
|
|
88
|
+
set100vw,
|
|
89
|
+
setAttribute,
|
|
90
|
+
setScrollPositionToCenter,
|
|
91
|
+
setSessionStorage,
|
|
92
|
+
setStylePropertyValue,
|
|
93
|
+
sleep,
|
|
94
|
+
toBoolean,
|
|
95
|
+
toPositiveNumber,
|
|
96
|
+
videoPlayControl,
|
|
97
|
+
waitForAllMediaLoaded,
|
|
98
|
+
wrapTextWithSpans
|
|
88
99
|
};
|
|
@@ -1 +1,24 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
/*!
|
|
3
|
+
* name: umaki
|
|
4
|
+
* version: v0.2.6
|
|
5
|
+
* description: A utility that is often used in web production.
|
|
6
|
+
* author: TsubasaHiga
|
|
7
|
+
* homepage: https://github.com/TsubasaHiga/umaki
|
|
8
|
+
* Released under the MIT License
|
|
9
|
+
*
|
|
10
|
+
* This software includes dependencies licensed under MIT, ISC, BSD-3-Clause, and Apache-2.0.
|
|
11
|
+
* For license information, please see LICENSE.txt
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
14
|
+
const getScrollbarWidth = require("../get/getScrollbarWidth.cjs.js");
|
|
15
|
+
const bgScrollStop = (isStop = true) => {
|
|
16
|
+
document.body.style.paddingRight = isStop ? `${getScrollbarWidth.getScrollbarWidth()}px` : "";
|
|
17
|
+
if (isStop) {
|
|
18
|
+
document.body.style.overflow = "hidden";
|
|
19
|
+
}
|
|
20
|
+
if (!isStop) {
|
|
21
|
+
document.body.style.overflow = "";
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
exports.bgScrollStop = bgScrollStop;
|
|
@@ -1,7 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* name: umaki
|
|
3
|
+
* version: v0.2.6
|
|
4
|
+
* description: A utility that is often used in web production.
|
|
5
|
+
* author: TsubasaHiga
|
|
6
|
+
* homepage: https://github.com/TsubasaHiga/umaki
|
|
7
|
+
* Released under the MIT License
|
|
8
|
+
*
|
|
9
|
+
* This software includes dependencies licensed under MIT, ISC, BSD-3-Clause, and Apache-2.0.
|
|
10
|
+
* For license information, please see LICENSE.txt
|
|
11
|
+
*/
|
|
12
|
+
import { getScrollbarWidth } from "../get/getScrollbarWidth.es.js";
|
|
13
|
+
const bgScrollStop = (isStop = true) => {
|
|
14
|
+
document.body.style.paddingRight = isStop ? `${getScrollbarWidth()}px` : "";
|
|
15
|
+
if (isStop) {
|
|
16
|
+
document.body.style.overflow = "hidden";
|
|
17
|
+
}
|
|
18
|
+
if (!isStop) {
|
|
19
|
+
document.body.style.overflow = "";
|
|
20
|
+
}
|
|
4
21
|
};
|
|
5
22
|
export {
|
|
6
|
-
|
|
23
|
+
bgScrollStop
|
|
7
24
|
};
|
|
@@ -1 +1,15 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
/*!
|
|
3
|
+
* name: umaki
|
|
4
|
+
* version: v0.2.6
|
|
5
|
+
* description: A utility that is often used in web production.
|
|
6
|
+
* author: TsubasaHiga
|
|
7
|
+
* homepage: https://github.com/TsubasaHiga/umaki
|
|
8
|
+
* Released under the MIT License
|
|
9
|
+
*
|
|
10
|
+
* This software includes dependencies licensed under MIT, ISC, BSD-3-Clause, and Apache-2.0.
|
|
11
|
+
* For license information, please see LICENSE.txt
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
14
|
+
const pd = (e) => e.preventDefault();
|
|
15
|
+
exports.pd = pd;
|
|
@@ -1,4 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* name: umaki
|
|
3
|
+
* version: v0.2.6
|
|
4
|
+
* description: A utility that is often used in web production.
|
|
5
|
+
* author: TsubasaHiga
|
|
6
|
+
* homepage: https://github.com/TsubasaHiga/umaki
|
|
7
|
+
* Released under the MIT License
|
|
8
|
+
*
|
|
9
|
+
* This software includes dependencies licensed under MIT, ISC, BSD-3-Clause, and Apache-2.0.
|
|
10
|
+
* For license information, please see LICENSE.txt
|
|
11
|
+
*/
|
|
12
|
+
const pd = (e) => e.preventDefault();
|
|
2
13
|
export {
|
|
3
|
-
|
|
14
|
+
pd
|
|
4
15
|
};
|
|
@@ -1 +1,47 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
/*!
|
|
3
|
+
* name: umaki
|
|
4
|
+
* version: v0.2.6
|
|
5
|
+
* description: A utility that is often used in web production.
|
|
6
|
+
* author: TsubasaHiga
|
|
7
|
+
* homepage: https://github.com/TsubasaHiga/umaki
|
|
8
|
+
* Released under the MIT License
|
|
9
|
+
*
|
|
10
|
+
* This software includes dependencies licensed under MIT, ISC, BSD-3-Clause, and Apache-2.0.
|
|
11
|
+
* For license information, please see LICENSE.txt
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
14
|
+
const scrollToHash = async (hash, isSmooth = true, manualOffset) => {
|
|
15
|
+
const hashWithoutSharp = hash.replace("#", "");
|
|
16
|
+
const targetElement = document.getElementById(hashWithoutSharp);
|
|
17
|
+
if (!targetElement) return false;
|
|
18
|
+
const elementPosY = Math.floor(
|
|
19
|
+
targetElement.getBoundingClientRect().top + window.scrollY
|
|
20
|
+
);
|
|
21
|
+
const offset = manualOffset ? manualOffset : 0;
|
|
22
|
+
const posY = elementPosY - offset;
|
|
23
|
+
window.scrollTo({
|
|
24
|
+
top: posY,
|
|
25
|
+
behavior: isSmooth ? "smooth" : "instant"
|
|
26
|
+
});
|
|
27
|
+
return new Promise((resolve) => {
|
|
28
|
+
const rejectTimer = setTimeout(() => {
|
|
29
|
+
window.removeEventListener("scroll", scrollHandler);
|
|
30
|
+
resolve(false);
|
|
31
|
+
}, 1e3);
|
|
32
|
+
const scrollHandler = () => {
|
|
33
|
+
if (window.scrollY !== posY) return;
|
|
34
|
+
window.removeEventListener("scroll", scrollHandler);
|
|
35
|
+
clearTimeout(rejectTimer);
|
|
36
|
+
resolve(true);
|
|
37
|
+
};
|
|
38
|
+
if (window.scrollY === posY) {
|
|
39
|
+
clearTimeout(rejectTimer);
|
|
40
|
+
resolve(true);
|
|
41
|
+
}
|
|
42
|
+
if (window.scrollY !== posY) {
|
|
43
|
+
window.addEventListener("scroll", scrollHandler, false);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
exports.scrollToHash = scrollToHash;
|
|
@@ -1,21 +1,47 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* name: umaki
|
|
3
|
+
* version: v0.2.6
|
|
4
|
+
* description: A utility that is often used in web production.
|
|
5
|
+
* author: TsubasaHiga
|
|
6
|
+
* homepage: https://github.com/TsubasaHiga/umaki
|
|
7
|
+
* Released under the MIT License
|
|
8
|
+
*
|
|
9
|
+
* This software includes dependencies licensed under MIT, ISC, BSD-3-Clause, and Apache-2.0.
|
|
10
|
+
* For license information, please see LICENSE.txt
|
|
11
|
+
*/
|
|
12
|
+
const scrollToHash = async (hash, isSmooth = true, manualOffset) => {
|
|
13
|
+
const hashWithoutSharp = hash.replace("#", "");
|
|
14
|
+
const targetElement = document.getElementById(hashWithoutSharp);
|
|
15
|
+
if (!targetElement) return false;
|
|
16
|
+
const elementPosY = Math.floor(
|
|
17
|
+
targetElement.getBoundingClientRect().top + window.scrollY
|
|
18
|
+
);
|
|
19
|
+
const offset = manualOffset ? manualOffset : 0;
|
|
20
|
+
const posY = elementPosY - offset;
|
|
21
|
+
window.scrollTo({
|
|
22
|
+
top: posY,
|
|
23
|
+
behavior: isSmooth ? "smooth" : "instant"
|
|
24
|
+
});
|
|
25
|
+
return new Promise((resolve) => {
|
|
26
|
+
const rejectTimer = setTimeout(() => {
|
|
27
|
+
window.removeEventListener("scroll", scrollHandler);
|
|
28
|
+
resolve(false);
|
|
29
|
+
}, 1e3);
|
|
30
|
+
const scrollHandler = () => {
|
|
31
|
+
if (window.scrollY !== posY) return;
|
|
32
|
+
window.removeEventListener("scroll", scrollHandler);
|
|
33
|
+
clearTimeout(rejectTimer);
|
|
34
|
+
resolve(true);
|
|
15
35
|
};
|
|
16
|
-
window.scrollY ===
|
|
36
|
+
if (window.scrollY === posY) {
|
|
37
|
+
clearTimeout(rejectTimer);
|
|
38
|
+
resolve(true);
|
|
39
|
+
}
|
|
40
|
+
if (window.scrollY !== posY) {
|
|
41
|
+
window.addEventListener("scroll", scrollHandler, false);
|
|
42
|
+
}
|
|
17
43
|
});
|
|
18
44
|
};
|
|
19
45
|
export {
|
|
20
|
-
|
|
46
|
+
scrollToHash
|
|
21
47
|
};
|