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.
Files changed (97) hide show
  1. package/README.md +193 -79
  2. package/dist/LICENSE.txt +32 -0
  3. package/dist/_virtual/_commonjsHelpers.cjs.js +19 -1
  4. package/dist/_virtual/_commonjsHelpers.es.js +16 -5
  5. package/dist/_virtual/isBetween.cjs.js +15 -1
  6. package/dist/_virtual/isBetween.es.js +13 -2
  7. package/dist/index.cjs.js +99 -1
  8. package/dist/index.es.js +97 -86
  9. package/dist/libs/control/bgScrollStop.cjs.js +24 -1
  10. package/dist/libs/control/bgScrollStop.es.js +21 -4
  11. package/dist/libs/control/pd.cjs.js +15 -1
  12. package/dist/libs/control/pd.es.js +13 -2
  13. package/dist/libs/control/scrollToHash.cjs.js +47 -1
  14. package/dist/libs/control/scrollToHash.es.js +42 -16
  15. package/dist/libs/control/videoPlayControl.cjs.js +33 -1
  16. package/dist/libs/control/videoPlayControl.es.js +27 -10
  17. package/dist/libs/convert/changeDateStringToSpecificFormat.cjs.js +16 -1
  18. package/dist/libs/convert/changeDateStringToSpecificFormat.es.js +14 -3
  19. package/dist/libs/convert/jsonStringToJsonObject.cjs.js +20 -1
  20. package/dist/libs/convert/jsonStringToJsonObject.es.js +15 -4
  21. package/dist/libs/get/getAspectRatio.cjs.js +19 -1
  22. package/dist/libs/get/getAspectRatio.es.js +16 -5
  23. package/dist/libs/get/getClassNames.cjs.js +18 -1
  24. package/dist/libs/get/getClassNames.es.js +16 -2
  25. package/dist/libs/get/getDocumentHeight.cjs.js +15 -1
  26. package/dist/libs/get/getDocumentHeight.es.js +13 -2
  27. package/dist/libs/get/getEventPaths.cjs.js +35 -1
  28. package/dist/libs/get/getEventPaths.es.js +30 -12
  29. package/dist/libs/get/getGcd.cjs.js +21 -1
  30. package/dist/libs/get/getGcd.es.js +18 -5
  31. package/dist/libs/get/getOrientation.cjs.js +18 -1
  32. package/dist/libs/get/getOrientation.es.js +16 -2
  33. package/dist/libs/get/getParentList.cjs.js +19 -1
  34. package/dist/libs/get/getParentList.es.js +16 -4
  35. package/dist/libs/get/getQueryParams.cjs.js +30 -1
  36. package/dist/libs/get/getQueryParams.es.js +26 -12
  37. package/dist/libs/get/getRem.cjs.js +18 -1
  38. package/dist/libs/get/getRem.es.js +16 -2
  39. package/dist/libs/get/getScrollbarWidth.cjs.js +15 -1
  40. package/dist/libs/get/getScrollbarWidth.es.js +13 -2
  41. package/dist/libs/get/getSessionStorage.cjs.js +20 -1
  42. package/dist/libs/get/getSessionStorage.es.js +17 -5
  43. package/dist/libs/get/getStringLength.cjs.js +16 -1
  44. package/dist/libs/get/getStringLength.es.js +14 -3
  45. package/dist/libs/get/getStylePropertyValue.cjs.js +15 -1
  46. package/dist/libs/get/getStylePropertyValue.es.js +13 -2
  47. package/dist/libs/get/getStylePropertyValueToNumber.cjs.js +16 -1
  48. package/dist/libs/get/getStylePropertyValueToNumber.es.js +14 -3
  49. package/dist/libs/get/getUaData.cjs.js +34 -1
  50. package/dist/libs/get/getUaData.es.js +30 -12
  51. package/dist/libs/is/isBetweenDateTime.cjs.js +25 -1
  52. package/dist/libs/is/isBetweenDateTime.es.js +21 -8
  53. package/dist/libs/is/isExistAllElements.cjs.js +17 -1
  54. package/dist/libs/is/isExistAllElements.es.js +15 -2
  55. package/dist/libs/is/isIpad.cjs.js +21 -1
  56. package/dist/libs/is/isIpad.es.js +18 -6
  57. package/dist/libs/is/isKeyExists.cjs.js +17 -1
  58. package/dist/libs/is/isKeyExists.es.js +15 -2
  59. package/dist/libs/is/isSafari.cjs.js +22 -1
  60. package/dist/libs/is/isSafari.es.js +19 -5
  61. package/dist/libs/is/isScrollable.cjs.js +19 -1
  62. package/dist/libs/is/isScrollable.es.js +16 -4
  63. package/dist/libs/is/isTouchSupport.cjs.js +16 -1
  64. package/dist/libs/is/isTouchSupport.es.js +14 -3
  65. package/dist/libs/remove/removeAllHtmlTags.cjs.js +23 -1
  66. package/dist/libs/remove/removeAllHtmlTags.es.js +21 -7
  67. package/dist/libs/remove/removeAttribute.cjs.js +17 -1
  68. package/dist/libs/remove/removeAttribute.es.js +14 -3
  69. package/dist/libs/remove/removeSessionStorage.cjs.js +18 -1
  70. package/dist/libs/remove/removeSessionStorage.es.js +15 -4
  71. package/dist/libs/remove/removeStylePropertyValue.cjs.js +17 -1
  72. package/dist/libs/remove/removeStylePropertyValue.es.js +14 -3
  73. package/dist/libs/set/set100vh.cjs.js +18 -1
  74. package/dist/libs/set/set100vh.es.js +15 -4
  75. package/dist/libs/set/set100vw.cjs.js +18 -1
  76. package/dist/libs/set/set100vw.es.js +15 -4
  77. package/dist/libs/set/setAttribute.cjs.js +17 -1
  78. package/dist/libs/set/setAttribute.es.js +14 -3
  79. package/dist/libs/set/setScrollPositionToCenter.cjs.js +21 -1
  80. package/dist/libs/set/setScrollPositionToCenter.es.js +18 -4
  81. package/dist/libs/set/setSessionStorage.cjs.js +18 -1
  82. package/dist/libs/set/setSessionStorage.es.js +15 -4
  83. package/dist/libs/set/setStylePropertyValue.cjs.js +17 -1
  84. package/dist/libs/set/setStylePropertyValue.es.js +14 -3
  85. package/dist/libs/to/toBoolean.cjs.js +17 -1
  86. package/dist/libs/to/toBoolean.es.js +15 -2
  87. package/dist/libs/to/toPositiveNumber.cjs.js +15 -1
  88. package/dist/libs/to/toPositiveNumber.es.js +13 -2
  89. package/dist/libs/transform/wrapTextWithSpans.cjs.js +31 -1
  90. package/dist/libs/transform/wrapTextWithSpans.es.js +27 -13
  91. package/dist/libs/wait/sleep.cjs.js +17 -1
  92. package/dist/libs/wait/sleep.es.js +15 -2
  93. package/dist/libs/wait/waitForAllMediaLoaded.cjs.js +55 -1
  94. package/dist/libs/wait/waitForAllMediaLoaded.es.js +47 -20
  95. package/dist/node_modules/dayjs/plugin/isBetween.cjs.js +30 -1
  96. package/dist/node_modules/dayjs/plugin/isBetween.es.js +25 -14
  97. package/package.json +2 -1
@@ -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";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var o=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function l(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}exports.commonjsGlobal=o;exports.getDefaultExportFromCjs=l;
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
- var o = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
2
- function l(e) {
3
- return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
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
- o as commonjsGlobal,
7
- l as getDefaultExportFromCjs
17
+ commonjsGlobal,
18
+ getDefaultExportFromCjs
8
19
  };
@@ -1 +1,15 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={exports:{}};exports.__module=e;
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
- var e = { exports: {} };
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
- e as __module
14
+ isBetween as __module
4
15
  };
package/dist/index.cjs.js CHANGED
@@ -1 +1,99 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./libs/control/bgScrollStop.cjs.js"),t=require("./libs/control/pd.cjs.js"),r=require("./libs/control/scrollToHash.cjs.js"),o=require("./libs/control/videoPlayControl.cjs.js"),s=require("./libs/convert/changeDateStringToSpecificFormat.cjs.js"),i=require("./libs/convert/jsonStringToJsonObject.cjs.js"),n=require("./libs/get/getAspectRatio.cjs.js"),a=require("./libs/get/getClassNames.cjs.js"),l=require("./libs/get/getDocumentHeight.cjs.js"),c=require("./libs/get/getEventPaths.cjs.js"),u=require("./libs/get/getGcd.cjs.js"),g=require("./libs/get/getOrientation.cjs.js"),S=require("./libs/get/getParentList.cjs.js"),m=require("./libs/get/getQueryParams.cjs.js"),p=require("./libs/get/getRem.cjs.js"),q=require("./libs/get/getScrollbarWidth.cjs.js"),y=require("./libs/get/getSessionStorage.cjs.js"),P=require("./libs/get/getStringLength.cjs.js"),v=require("./libs/get/getStylePropertyValue.cjs.js"),T=require("./libs/get/getStylePropertyValueToNumber.cjs.js"),h=require("./libs/get/getUaData.cjs.js"),b=require("./libs/is/isBetweenDateTime.cjs.js"),d=require("./libs/is/isExistAllElements.cjs.js"),A=require("./libs/is/isIpad.cjs.js"),w=require("./libs/is/isKeyExists.cjs.js"),D=require("./libs/is/isSafari.cjs.js"),E=require("./libs/is/isScrollable.cjs.js"),V=require("./libs/is/isTouchSupport.cjs.js"),x=require("./libs/remove/removeAllHtmlTags.cjs.js"),C=require("./libs/remove/removeAttribute.cjs.js"),H=require("./libs/remove/removeSessionStorage.cjs.js"),L=require("./libs/remove/removeStylePropertyValue.cjs.js"),N=require("./libs/set/set100vh.cjs.js"),f=require("./libs/set/set100vw.cjs.js"),j=require("./libs/set/setAttribute.cjs.js"),O=require("./libs/set/setScrollPositionToCenter.cjs.js"),B=require("./libs/set/setSessionStorage.cjs.js"),F=require("./libs/set/setStylePropertyValue.cjs.js"),R=require("./libs/to/toBoolean.cjs.js"),W=require("./libs/to/toPositiveNumber.cjs.js"),M=require("./libs/transform/wrapTextWithSpans.cjs.js"),G=require("./libs/wait/sleep.cjs.js"),I=require("./libs/wait/waitForAllMediaLoaded.cjs.js");exports.bgScrollStop=e.bgScrollStop;exports.pd=t.pd;exports.scrollToHash=r.scrollToHash;exports.videoPlayControl=o.videoPlayControl;exports.changeDateStringToSpecificFormat=s.changeDateStringToSpecificFormat;exports.jsonStringToJsonObject=i.jsonStringToJsonObject;exports.getAspectRatio=n.getAspectRatio;exports.getClassNames=a.getClassNames;exports.getDocumentHeight=l.getDocumentHeight;exports.getEventPaths=c.getEventPaths;exports.getGcd=u.getGcd;exports.getOrientation=g.getOrientation;exports.getParentList=S.getParentList;exports.getQueryParams=m.getQueryParams;exports.getRem=p.getRem;exports.getScrollbarWidth=q.getScrollbarWidth;exports.getSessionStorage=y.getSessionStorage;exports.getStringLength=P.getStringLength;exports.getStylePropertyValue=v.getStylePropertyValue;exports.getStylePropertyValueToNumber=T.getStylePropertyValueToNumber;exports.getUaData=h.getUaData;exports.isBetweenDateTime=b.isBetweenDateTime;exports.isExistAllElements=d.isExistAllElements;exports.isIpad=A.isIpad;exports.isKeyExists=w.isKeyExists;exports.isSafari=D.isSafari;exports.isScrollable=E.isScrollable;exports.isTouchSupport=V.isTouchSupport;exports.removeAllHtmlTags=x.removeAllHtmlTags;exports.removeAttribute=C.removeAttribute;exports.removeSessionStorage=H.removeSessionStorage;exports.removeStylePropertyValue=L.removeStylePropertyValue;exports.set100vh=N.set100vh;exports.set100vw=f.set100vw;exports.setAttribute=j.setAttribute;exports.setScrollPositionToCenter=O.setScrollPositionToCenter;exports.setSessionStorage=B.setSessionStorage;exports.setStylePropertyValue=F.setStylePropertyValue;exports.toBoolean=R.toBoolean;exports.toPositiveNumber=W.toPositiveNumber;exports.wrapTextWithSpans=M.wrapTextWithSpans;exports.sleep=G.sleep;exports.waitForAllMediaLoaded=I.waitForAllMediaLoaded;
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
- import { bgScrollStop as r } from "./libs/control/bgScrollStop.es.js";
2
- import { pd as m } from "./libs/control/pd.es.js";
3
- import { scrollToHash as x } from "./libs/control/scrollToHash.es.js";
4
- import { videoPlayControl as s } from "./libs/control/videoPlayControl.es.js";
5
- import { changeDateStringToSpecificFormat as i } from "./libs/convert/changeDateStringToSpecificFormat.es.js";
6
- import { jsonStringToJsonObject as g } from "./libs/convert/jsonStringToJsonObject.es.js";
7
- import { getAspectRatio as S } from "./libs/get/getAspectRatio.es.js";
8
- import { getClassNames as u } from "./libs/get/getClassNames.es.js";
9
- import { getDocumentHeight as P } from "./libs/get/getDocumentHeight.es.js";
10
- import { getEventPaths as v } from "./libs/get/getEventPaths.es.js";
11
- import { getGcd as b } from "./libs/get/getGcd.es.js";
12
- import { getOrientation as A } from "./libs/get/getOrientation.es.js";
13
- import { getParentList as D } from "./libs/get/getParentList.es.js";
14
- import { getQueryParams as V } from "./libs/get/getQueryParams.es.js";
15
- import { getRem as H } from "./libs/get/getRem.es.js";
16
- import { getScrollbarWidth as N } from "./libs/get/getScrollbarWidth.es.js";
17
- import { getSessionStorage as B } from "./libs/get/getSessionStorage.es.js";
18
- import { getStringLength as O } from "./libs/get/getStringLength.es.js";
19
- import { getStylePropertyValue as W } from "./libs/get/getStylePropertyValue.es.js";
20
- import { getStylePropertyValueToNumber as I } from "./libs/get/getStylePropertyValueToNumber.es.js";
21
- import { getUaData as K } from "./libs/get/getUaData.es.js";
22
- import { isBetweenDateTime as Q } from "./libs/is/isBetweenDateTime.es.js";
23
- import { isExistAllElements as k } from "./libs/is/isExistAllElements.es.js";
24
- import { isIpad as z } from "./libs/is/isIpad.es.js";
25
- import { isKeyExists as Y } from "./libs/is/isKeyExists.es.js";
26
- import { isSafari as _ } from "./libs/is/isSafari.es.js";
27
- import { isScrollable as oo } from "./libs/is/isScrollable.es.js";
28
- import { isTouchSupport as ro } from "./libs/is/isTouchSupport.es.js";
29
- import { removeAllHtmlTags as mo } from "./libs/remove/removeAllHtmlTags.es.js";
30
- import { removeAttribute as xo } from "./libs/remove/removeAttribute.es.js";
31
- import { removeSessionStorage as so } from "./libs/remove/removeSessionStorage.es.js";
32
- import { removeStylePropertyValue as io } from "./libs/remove/removeStylePropertyValue.es.js";
33
- import { set100vh as go } from "./libs/set/set100vh.es.js";
34
- import { set100vw as So } from "./libs/set/set100vw.es.js";
35
- import { setAttribute as uo } from "./libs/set/setAttribute.es.js";
36
- import { setScrollPositionToCenter as Po } from "./libs/set/setScrollPositionToCenter.es.js";
37
- import { setSessionStorage as vo } from "./libs/set/setSessionStorage.es.js";
38
- import { setStylePropertyValue as bo } from "./libs/set/setStylePropertyValue.es.js";
39
- import { toBoolean as wo } from "./libs/to/toBoolean.es.js";
40
- import { toPositiveNumber as Eo } from "./libs/to/toPositiveNumber.es.js";
41
- import { wrapTextWithSpans as Co } from "./libs/transform/wrapTextWithSpans.es.js";
42
- import { sleep as Lo } from "./libs/wait/sleep.es.js";
43
- import { waitForAllMediaLoaded as jo } from "./libs/wait/waitForAllMediaLoaded.es.js";
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
- r as bgScrollStop,
46
- i as changeDateStringToSpecificFormat,
47
- S as getAspectRatio,
48
- u as getClassNames,
49
- P as getDocumentHeight,
50
- v as getEventPaths,
51
- b as getGcd,
52
- A as getOrientation,
53
- D as getParentList,
54
- V as getQueryParams,
55
- H as getRem,
56
- N as getScrollbarWidth,
57
- B as getSessionStorage,
58
- O as getStringLength,
59
- W as getStylePropertyValue,
60
- I as getStylePropertyValueToNumber,
61
- K as getUaData,
62
- Q as isBetweenDateTime,
63
- k as isExistAllElements,
64
- z as isIpad,
65
- Y as isKeyExists,
66
- _ as isSafari,
67
- oo as isScrollable,
68
- ro as isTouchSupport,
69
- g as jsonStringToJsonObject,
70
- m as pd,
71
- mo as removeAllHtmlTags,
72
- xo as removeAttribute,
73
- so as removeSessionStorage,
74
- io as removeStylePropertyValue,
75
- x as scrollToHash,
76
- go as set100vh,
77
- So as set100vw,
78
- uo as setAttribute,
79
- Po as setScrollPositionToCenter,
80
- vo as setSessionStorage,
81
- bo as setStylePropertyValue,
82
- Lo as sleep,
83
- wo as toBoolean,
84
- Eo as toPositiveNumber,
85
- s as videoPlayControl,
86
- jo as waitForAllMediaLoaded,
87
- Co as wrapTextWithSpans
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";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../get/getScrollbarWidth.cjs.js"),t=(e=!0)=>{document.body.style.paddingRight=e?`${o.getScrollbarWidth()}px`:"",e&&(document.body.style.overflow="hidden"),e||(document.body.style.overflow="")};exports.bgScrollStop=t;
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
- import { getScrollbarWidth as e } from "../get/getScrollbarWidth.es.js";
2
- const d = (o = !0) => {
3
- document.body.style.paddingRight = o ? `${e()}px` : "", o && (document.body.style.overflow = "hidden"), o || (document.body.style.overflow = "");
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
- d as bgScrollStop
23
+ bgScrollStop
7
24
  };
@@ -1 +1,15 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=e=>e.preventDefault();exports.pd=t;
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
- const t = (e) => e.preventDefault();
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
- t as pd
14
+ pd
4
15
  };
@@ -1 +1,47 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=async(l,c=!0,n)=>{const i=l.replace("#",""),r=document.getElementById(i);if(!r)return!1;const e=Math.floor(r.getBoundingClientRect().top+window.scrollY)-(n||0);return window.scrollTo({top:e,behavior:c?"smooth":"instant"}),new Promise(o=>{const s=setTimeout(()=>{window.removeEventListener("scroll",t),o(!1)},1e3),t=()=>{window.scrollY===e&&(window.removeEventListener("scroll",t),clearTimeout(s),o(!0))};window.scrollY===e&&(clearTimeout(s),o(!0)),window.scrollY!==e&&window.addEventListener("scroll",t,!1)})};exports.scrollToHash=a;
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
- const d = async (l, c = !0, n) => {
2
- const i = l.replace("#", ""), r = document.getElementById(i);
3
- if (!r) return !1;
4
- const e = Math.floor(
5
- r.getBoundingClientRect().top + window.scrollY
6
- ) - (n || 0);
7
- return window.scrollTo({
8
- top: e,
9
- behavior: c ? "smooth" : "instant"
10
- }), new Promise((o) => {
11
- const s = setTimeout(() => {
12
- window.removeEventListener("scroll", t), o(!1);
13
- }, 1e3), t = () => {
14
- window.scrollY === e && (window.removeEventListener("scroll", t), clearTimeout(s), o(!0));
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 === e && (clearTimeout(s), o(!0)), window.scrollY !== e && window.addEventListener("scroll", t, !1);
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
- d as scrollToHash
46
+ scrollToHash
21
47
  };