umaki 0.2.1 → 0.2.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.
Files changed (116) hide show
  1. package/README.md +21 -0
  2. package/dist/_virtual/_commonjsHelpers.cjs.js +1 -0
  3. package/dist/_virtual/isBetween.cjs.js +1 -0
  4. package/dist/index.cjs.js +1 -0
  5. package/dist/{index.js → index.es.js} +43 -43
  6. package/dist/libs/control/bgScrollStop.cjs.js +1 -0
  7. package/dist/libs/control/{bgScrollStop.js → bgScrollStop.es.js} +1 -1
  8. package/dist/libs/control/pd.cjs.js +1 -0
  9. package/dist/libs/control/scrollToHash.cjs.js +1 -0
  10. package/dist/libs/control/videoPlayControl.cjs.js +1 -0
  11. package/dist/libs/control/videoPlayControl.es.js +19 -0
  12. package/dist/libs/convert/changeDateStringToSpecificFormat.cjs.js +1 -0
  13. package/dist/libs/convert/{changeDateStringToSpecificFormat.js → changeDateStringToSpecificFormat.es.js} +1 -1
  14. package/dist/libs/convert/jsonStringToJsonObject.cjs.js +1 -0
  15. package/dist/libs/get/getAspectRatio.cjs.js +1 -0
  16. package/dist/libs/get/{getAspectRatio.js → getAspectRatio.es.js} +1 -1
  17. package/dist/libs/get/getClassNames.cjs.js +1 -0
  18. package/dist/libs/get/getDocumentHeight.cjs.js +1 -0
  19. package/dist/libs/get/getEventPaths.cjs.js +1 -0
  20. package/dist/libs/get/getGcd.cjs.js +1 -0
  21. package/dist/libs/get/{getGcd.js → getGcd.es.js} +1 -1
  22. package/dist/libs/get/getOrientation.cjs.js +1 -0
  23. package/dist/libs/get/getParentList.cjs.js +1 -0
  24. package/dist/libs/get/getQueryParams.cjs.js +1 -0
  25. package/dist/libs/get/getQueryParams.es.js +16 -0
  26. package/dist/libs/get/getRem.cjs.js +1 -0
  27. package/dist/libs/get/getScrollbarWidth.cjs.js +1 -0
  28. package/dist/libs/get/getSessionStorage.cjs.js +1 -0
  29. package/dist/libs/get/{getSessionStorage.js → getSessionStorage.es.js} +1 -1
  30. package/dist/libs/get/getStringLength.cjs.js +1 -0
  31. package/dist/libs/get/{getStringLength.js → getStringLength.es.js} +1 -1
  32. package/dist/libs/get/getStylePropertyValue.cjs.js +1 -0
  33. package/dist/libs/get/getStylePropertyValueToNumber.cjs.js +1 -0
  34. package/dist/libs/get/{getStylePropertyValueToNumber.js → getStylePropertyValueToNumber.es.js} +1 -1
  35. package/dist/libs/get/getUaData.cjs.js +1 -0
  36. package/dist/libs/get/{getUaData.js → getUaData.es.js} +2 -2
  37. package/dist/libs/is/isBetweenDateTime.cjs.js +1 -0
  38. package/dist/libs/is/{isBetweenDateTime.js → isBetweenDateTime.es.js} +2 -2
  39. package/dist/libs/is/isExistAllElements.cjs.js +1 -0
  40. package/dist/libs/is/isIpad.cjs.js +1 -0
  41. package/dist/libs/is/{isIpad.js → isIpad.es.js} +2 -2
  42. package/dist/libs/is/isKeyExists.cjs.js +1 -0
  43. package/dist/libs/is/isSafari.cjs.js +1 -0
  44. package/dist/libs/is/{isSafari.js → isSafari.es.js} +1 -1
  45. package/dist/libs/is/isScrollable.cjs.js +1 -0
  46. package/dist/libs/is/isTouchSupport.cjs.js +1 -0
  47. package/dist/libs/is/isTouchSupport.es.js +5 -0
  48. package/dist/libs/remove/removeAllHtmlTags.cjs.js +1 -0
  49. package/dist/libs/remove/{removeAllHtmlTags.js → removeAllHtmlTags.es.js} +1 -1
  50. package/dist/libs/remove/removeAttribute.cjs.js +1 -0
  51. package/dist/libs/remove/removeSessionStorage.cjs.js +1 -0
  52. package/dist/libs/remove/{removeSessionStorage.js → removeSessionStorage.es.js} +1 -1
  53. package/dist/libs/remove/removeStylePropertyValue.cjs.js +1 -0
  54. package/dist/libs/set/set100vh.cjs.js +1 -0
  55. package/dist/libs/set/set100vw.cjs.js +1 -0
  56. package/dist/libs/set/setAttribute.cjs.js +1 -0
  57. package/dist/libs/set/setScrollPositionToCenter.cjs.js +1 -0
  58. package/dist/libs/set/setSessionStorage.cjs.js +1 -0
  59. package/dist/libs/set/{setSessionStorage.js → setSessionStorage.es.js} +1 -1
  60. package/dist/libs/set/setStylePropertyValue.cjs.js +1 -0
  61. package/dist/libs/to/toBoolean.cjs.js +1 -0
  62. package/dist/libs/to/toPositiveNumber.cjs.js +1 -0
  63. package/dist/libs/transform/wrapTextWithSpans.cjs.js +1 -0
  64. package/dist/libs/wait/sleep.cjs.js +1 -0
  65. package/dist/libs/wait/waitForAllMediaLoaded.cjs.js +1 -0
  66. package/dist/node_modules/dayjs/plugin/isBetween.cjs.js +1 -0
  67. package/dist/node_modules/dayjs/plugin/{isBetween.js → isBetween.es.js} +2 -2
  68. package/package.json +5 -5
  69. package/dist/_virtual/dayjs.min.js +0 -4
  70. package/dist/_virtual/isBetween.js +0 -4
  71. package/dist/_virtual/purify.js +0 -4
  72. package/dist/_virtual/store2.js +0 -4
  73. package/dist/_virtual/ua-parser.js +0 -4
  74. package/dist/libs/control/videoPlayControl.js +0 -19
  75. package/dist/libs/get/getQueryParams.js +0 -16
  76. package/dist/libs/is/isTouchSupport.js +0 -5
  77. package/dist/node_modules/dayjs/dayjs.min.js +0 -282
  78. package/dist/node_modules/decode-uri-component/index.js +0 -55
  79. package/dist/node_modules/dompurify/dist/purify.js +0 -531
  80. package/dist/node_modules/filter-obj/index.js +0 -20
  81. package/dist/node_modules/is-touch-device/build/index.js +0 -16
  82. package/dist/node_modules/isomorphic-dompurify/browser.js +0 -7
  83. package/dist/node_modules/query-string/base.js +0 -257
  84. package/dist/node_modules/query-string/index.js +0 -4
  85. package/dist/node_modules/runes2/dist/index.esm.js +0 -76
  86. package/dist/node_modules/split-on-first/index.js +0 -14
  87. package/dist/node_modules/store2/dist/store2.js +0 -225
  88. package/dist/node_modules/ua-parser-js/src/ua-parser.js +0 -1218
  89. /package/dist/_virtual/{_commonjsHelpers.js → _commonjsHelpers.es.js} +0 -0
  90. /package/dist/_virtual/{index.js → isBetween.es.js} +0 -0
  91. /package/dist/libs/control/{pd.js → pd.es.js} +0 -0
  92. /package/dist/libs/control/{scrollToHash.js → scrollToHash.es.js} +0 -0
  93. /package/dist/libs/convert/{jsonStringToJsonObject.js → jsonStringToJsonObject.es.js} +0 -0
  94. /package/dist/libs/get/{getClassNames.js → getClassNames.es.js} +0 -0
  95. /package/dist/libs/get/{getDocumentHeight.js → getDocumentHeight.es.js} +0 -0
  96. /package/dist/libs/get/{getEventPaths.js → getEventPaths.es.js} +0 -0
  97. /package/dist/libs/get/{getOrientation.js → getOrientation.es.js} +0 -0
  98. /package/dist/libs/get/{getParentList.js → getParentList.es.js} +0 -0
  99. /package/dist/libs/get/{getRem.js → getRem.es.js} +0 -0
  100. /package/dist/libs/get/{getScrollbarWidth.js → getScrollbarWidth.es.js} +0 -0
  101. /package/dist/libs/get/{getStylePropertyValue.js → getStylePropertyValue.es.js} +0 -0
  102. /package/dist/libs/is/{isExistAllElements.js → isExistAllElements.es.js} +0 -0
  103. /package/dist/libs/is/{isKeyExists.js → isKeyExists.es.js} +0 -0
  104. /package/dist/libs/is/{isScrollable.js → isScrollable.es.js} +0 -0
  105. /package/dist/libs/remove/{removeAttribute.js → removeAttribute.es.js} +0 -0
  106. /package/dist/libs/remove/{removeStylePropertyValue.js → removeStylePropertyValue.es.js} +0 -0
  107. /package/dist/libs/set/{set100vh.js → set100vh.es.js} +0 -0
  108. /package/dist/libs/set/{set100vw.js → set100vw.es.js} +0 -0
  109. /package/dist/libs/set/{setAttribute.js → setAttribute.es.js} +0 -0
  110. /package/dist/libs/set/{setScrollPositionToCenter.js → setScrollPositionToCenter.es.js} +0 -0
  111. /package/dist/libs/set/{setStylePropertyValue.js → setStylePropertyValue.es.js} +0 -0
  112. /package/dist/libs/to/{toBoolean.js → toBoolean.es.js} +0 -0
  113. /package/dist/libs/to/{toPositiveNumber.js → toPositiveNumber.es.js} +0 -0
  114. /package/dist/libs/transform/{wrapTextWithSpans.js → wrapTextWithSpans.es.js} +0 -0
  115. /package/dist/libs/wait/{sleep.js → sleep.es.js} +0 -0
  116. /package/dist/libs/wait/{waitForAllMediaLoaded.js → waitForAllMediaLoaded.es.js} +0 -0
package/README.md CHANGED
@@ -592,3 +592,24 @@ import { waitForAllMediaLoaded } from 'umaki'
592
592
  console.log(allMediaLoaded) // true または false
593
593
  })()
594
594
  ```
595
+
596
+ ## Using for framework and tools
597
+
598
+ フレームワークまたは各種ツール特有の使い方を以下に記載します。
599
+
600
+ ### Astro or Vite
601
+
602
+ AstroにてSSRする箇所で利用する場合は`vite.ssr.noExternal`に`umaki`を追加してください。
603
+
604
+ ``` ts
605
+ // astro.config.ts
606
+ export default defineConfig(({ mode }) => {
607
+ return {
608
+ vite: {
609
+ ssr: {
610
+ noExternal: ['umaki']
611
+ }
612
+ }
613
+ }
614
+ })
615
+ ```
@@ -0,0 +1 @@
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;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e={exports:{}};exports.__module=e;
@@ -0,0 +1 @@
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,46 +1,46 @@
1
- import { bgScrollStop as r } from "./libs/control/bgScrollStop.js";
2
- import { pd as m } from "./libs/control/pd.js";
3
- import { scrollToHash as x } from "./libs/control/scrollToHash.js";
4
- import { videoPlayControl as s } from "./libs/control/videoPlayControl.js";
5
- import { changeDateStringToSpecificFormat as i } from "./libs/convert/changeDateStringToSpecificFormat.js";
6
- import { jsonStringToJsonObject as g } from "./libs/convert/jsonStringToJsonObject.js";
7
- import { getAspectRatio as S } from "./libs/get/getAspectRatio.js";
8
- import { getClassNames as u } from "./libs/get/getClassNames.js";
9
- import { getDocumentHeight as P } from "./libs/get/getDocumentHeight.js";
10
- import { getEventPaths as v } from "./libs/get/getEventPaths.js";
11
- import { getGcd as b } from "./libs/get/getGcd.js";
12
- import { getOrientation as A } from "./libs/get/getOrientation.js";
13
- import { getParentList as D } from "./libs/get/getParentList.js";
14
- import { getQueryParams as V } from "./libs/get/getQueryParams.js";
15
- import { getRem as H } from "./libs/get/getRem.js";
16
- import { getScrollbarWidth as N } from "./libs/get/getScrollbarWidth.js";
17
- import { getSessionStorage as B } from "./libs/get/getSessionStorage.js";
18
- import { getStringLength as O } from "./libs/get/getStringLength.js";
19
- import { getStylePropertyValue as W } from "./libs/get/getStylePropertyValue.js";
20
- import { getStylePropertyValueToNumber as I } from "./libs/get/getStylePropertyValueToNumber.js";
21
- import { getUaData as K } from "./libs/get/getUaData.js";
22
- import { isBetweenDateTime as Q } from "./libs/is/isBetweenDateTime.js";
23
- import { isExistAllElements as k } from "./libs/is/isExistAllElements.js";
24
- import { isIpad as z } from "./libs/is/isIpad.js";
25
- import { isKeyExists as Y } from "./libs/is/isKeyExists.js";
26
- import { isSafari as _ } from "./libs/is/isSafari.js";
27
- import { isScrollable as oo } from "./libs/is/isScrollable.js";
28
- import { isTouchSupport as ro } from "./libs/is/isTouchSupport.js";
29
- import { removeAllHtmlTags as mo } from "./libs/remove/removeAllHtmlTags.js";
30
- import { removeAttribute as xo } from "./libs/remove/removeAttribute.js";
31
- import { removeSessionStorage as so } from "./libs/remove/removeSessionStorage.js";
32
- import { removeStylePropertyValue as io } from "./libs/remove/removeStylePropertyValue.js";
33
- import { set100vh as go } from "./libs/set/set100vh.js";
34
- import { set100vw as So } from "./libs/set/set100vw.js";
35
- import { setAttribute as uo } from "./libs/set/setAttribute.js";
36
- import { setScrollPositionToCenter as Po } from "./libs/set/setScrollPositionToCenter.js";
37
- import { setSessionStorage as vo } from "./libs/set/setSessionStorage.js";
38
- import { setStylePropertyValue as bo } from "./libs/set/setStylePropertyValue.js";
39
- import { toBoolean as wo } from "./libs/to/toBoolean.js";
40
- import { toPositiveNumber as Eo } from "./libs/to/toPositiveNumber.js";
41
- import { wrapTextWithSpans as Co } from "./libs/transform/wrapTextWithSpans.js";
42
- import { sleep as Lo } from "./libs/wait/sleep.js";
43
- import { waitForAllMediaLoaded as jo } from "./libs/wait/waitForAllMediaLoaded.js";
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";
44
44
  export {
45
45
  r as bgScrollStop,
46
46
  i as changeDateStringToSpecificFormat,
@@ -0,0 +1 @@
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,4 +1,4 @@
1
- import { getScrollbarWidth as e } from "../get/getScrollbarWidth.js";
1
+ import { getScrollbarWidth as e } from "../get/getScrollbarWidth.es.js";
2
2
  const d = (o = !0) => {
3
3
  document.body.style.paddingRight = o ? `${e()}px` : "", o && (document.body.style.overflow = "hidden"), o || (document.body.style.overflow = "");
4
4
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=e=>e.preventDefault();exports.pd=t;
@@ -0,0 +1 @@
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;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../to/toBoolean.cjs.js"),s=async(a,t)=>{if(t&&a.paused){if(i.toBoolean(a.dataset.playing))return;const r=a.play();if(r===void 0)return;try{await r,a.currentTime=0,a.dataset.playing="true"}catch{}}if(!t){if(!i.toBoolean(a.dataset.playing))return;a.pause(),a.dataset.playing="false"}};exports.videoPlayControl=s;
@@ -0,0 +1,19 @@
1
+ import { toBoolean as s } from "../to/toBoolean.es.js";
2
+ const p = async (a, r) => {
3
+ if (r && a.paused) {
4
+ if (s(a.dataset.playing)) return;
5
+ const i = a.play();
6
+ if (i === void 0) return;
7
+ try {
8
+ await i, a.currentTime = 0, a.dataset.playing = "true";
9
+ } catch {
10
+ }
11
+ }
12
+ if (!r) {
13
+ if (!s(a.dataset.playing)) return;
14
+ a.pause(), a.dataset.playing = "false";
15
+ }
16
+ };
17
+ export {
18
+ p as videoPlayControl
19
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("dayjs"),r=(e,t="YYYY年MM月DD日")=>o(e).format(t);exports.changeDateStringToSpecificFormat=r;
@@ -1,4 +1,4 @@
1
- import r from "../../node_modules/dayjs/dayjs.min.js";
1
+ import r from "dayjs";
2
2
  const c = (o, t = "YYYY年MM月DD日") => r(o).format(t);
3
3
  export {
4
4
  c as changeDateStringToSpecificFormat
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=t=>{try{return JSON.parse(t)}catch{}};exports.jsonStringToJsonObject=r;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./getGcd.cjs.js"),r=(t,e)=>{const c=o.getGcd(t,e);return{w:t/c,h:e/c}};exports.getAspectRatio=r;
@@ -1,4 +1,4 @@
1
- import { getGcd as e } from "./getGcd.js";
1
+ import { getGcd as e } from "./getGcd.es.js";
2
2
  const g = (t, o) => {
3
3
  const c = e(t, o);
4
4
  return { w: t / c, h: o / c };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=t=>String(t.classList).split(" ").filter(s=>s);exports.getClassNames=e;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=()=>document.body.clientHeight-window.innerHeight;exports.getDocumentHeight=e;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=n=>{var a;let t=((a=n.composedPath)==null?void 0:a.call(n))||null;const e=n.target;if(t!=null)return t=t.indexOf(window)<0?t.concat([window]):t,t;if(e instanceof Window)return[window];const r=(d,c)=>{const i=c||[],o=d.parentNode;return o?r(o,i.concat([o])):c};return[e].concat(r(e,[])).concat([window])};exports.getEventPaths=s;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../to/toPositiveNumber.cjs.js"),i=(r,s)=>{const e=o.toPositiveNumber(Math.abs(r)),t=o.toPositiveNumber(Math.abs(s));return t===0?e:i(t,e%t)};exports.getGcd=i;
@@ -1,4 +1,4 @@
1
- import { toPositiveNumber as e } from "../to/toPositiveNumber.js";
1
+ import { toPositiveNumber as e } from "../to/toPositiveNumber.es.js";
2
2
  const s = (i, r) => {
3
3
  const o = e(Math.abs(i)), t = e(Math.abs(r));
4
4
  return t === 0 ? o : s(t, o % t);
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=()=>window.matchMedia("(orientation: landscape)").matches?"landscape":"portrait";exports.getOrientation=t;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=t=>{const e=t.parentElement;return e?[t].concat(r(e)):[t]};exports.getParentList=r;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("query-string"),a={arrayFormat:"comma",parseNumbers:!0},u=(t,n)=>{const o={...a,...n},e=s.parse(window.location.search,o);if(!e)return null;const r=e[t];return r??null};exports.getQueryParams=u;
@@ -0,0 +1,16 @@
1
+ import s from "query-string";
2
+ const a = {
3
+ arrayFormat: "comma",
4
+ parseNumbers: !0
5
+ }, i = (n, o) => {
6
+ const e = {
7
+ ...a,
8
+ ...o
9
+ }, t = s.parse(window.location.search, e);
10
+ if (!t) return null;
11
+ const r = t[n];
12
+ return r ?? null;
13
+ };
14
+ export {
15
+ i as getQueryParams
16
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=e=>`${e/16}rem`;exports.getRem=t;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=()=>window.innerWidth-document.body.clientWidth;exports.getScrollbarWidth=t;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("store2"),r=t=>{const e=o.session.get(t);return e===void 0?null:e};exports.getSessionStorage=r;
@@ -1,4 +1,4 @@
1
- import t from "../../node_modules/store2/dist/store2.js";
1
+ import t from "store2";
2
2
  const s = (o) => {
3
3
  const e = t.session.get(o);
4
4
  return e === void 0 ? null : e;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("runes2"),n=e=>t.runes(e).length;exports.getStringLength=n;
@@ -1,4 +1,4 @@
1
- import e from "../../node_modules/runes2/dist/index.esm.js";
1
+ import { runes as e } from "runes2";
2
2
  const r = (t) => e(t).length;
3
3
  export {
4
4
  r as getStringLength
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=e=>getComputedStyle(document.documentElement).getPropertyValue(e);exports.getStylePropertyValue=t;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./getStylePropertyValue.cjs.js"),r=e=>Number.parseInt(t.getStylePropertyValue(e))||0;exports.getStylePropertyValueToNumber=r;
@@ -1,4 +1,4 @@
1
- import { getStylePropertyValue as r } from "./getStylePropertyValue.js";
1
+ import { getStylePropertyValue as r } from "./getStylePropertyValue.es.js";
2
2
  const o = (e) => Number.parseInt(r(e)) || 0;
3
3
  export {
4
4
  o as getStylePropertyValueToNumber
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("ua-parser-js"),c=require("../is/isTouchSupport.cjs.js"),p=()=>{const e=new a().getResult(),r=e.browser.name,o=e.browser.version,t=e.engine.name,s=e.os.name,n=e.device.type;return{browserName:r?r.toLowerCase().replace(" ","-"):"",browserVersion:o||"",browserEngine:t?t.toLowerCase().replace(" ","-"):"",osName:s?s.toLowerCase().replace(" ","-"):"",type:typeof n<"u"?n.toLowerCase().replace(" ","-"):"laptop",touchSupport:c.isTouchSupport()}};exports.getUaData=p;
@@ -1,5 +1,5 @@
1
- import a from "../../node_modules/ua-parser-js/src/ua-parser.js";
2
- import { isTouchSupport as p } from "../is/isTouchSupport.js";
1
+ import a from "ua-parser-js";
2
+ import { isTouchSupport as p } from "../is/isTouchSupport.es.js";
3
3
  const u = () => {
4
4
  const e = new a().getResult(), r = e.browser.name, o = e.browser.version, s = e.engine.name, t = e.os.name, n = e.device.type;
5
5
  return {
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("dayjs"),o=require("../../node_modules/dayjs/plugin/isBetween.cjs.js");e.extend(o.default);const a=(t,i,n=e())=>{if(!e(t).isValid()||!e(i).isValid())throw new Error("dateA or dateB is not valid date");const s=e(t),r=e(i);return n.isBetween(s,r,"millisecond")};exports.isBetweenDateTime=a;
@@ -1,5 +1,5 @@
1
- import e from "../../node_modules/dayjs/dayjs.min.js";
2
- import s from "../../node_modules/dayjs/plugin/isBetween.js";
1
+ import e from "dayjs";
2
+ import s from "../../node_modules/dayjs/plugin/isBetween.es.js";
3
3
  e.extend(s);
4
4
  const m = (i, t, o = e()) => {
5
5
  if (!e(i).isValid() || !e(t).isValid())
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=e=>e.length>0&&e.every(t=>t!==null);exports.isExistAllElements=l;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../get/getOrientation.cjs.js"),r=require("../get/getUaData.cjs.js"),o=(e="portrait")=>{const t=r.getUaData();return t.touchSupport?t.type==="laptop"&&t.osName==="mac-os"&&t.browserName==="safari"&&t.touchSupport&&a.getOrientation()===e:!1};exports.isIpad=o;
@@ -1,5 +1,5 @@
1
- import { getOrientation as r } from "../get/getOrientation.js";
2
- import { getUaData as a } from "../get/getUaData.js";
1
+ import { getOrientation as r } from "../get/getOrientation.es.js";
2
+ import { getUaData as a } from "../get/getUaData.es.js";
3
3
  const i = (o = "portrait") => {
4
4
  const t = a();
5
5
  return t.touchSupport ? t.type === "laptop" && t.osName === "mac-os" && t.browserName === "safari" && t.touchSupport && r() === o : !1;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=(t,e)=>!!t&&Object.prototype.hasOwnProperty.call(t,e);exports.isKeyExists=s;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../get/getUaData.cjs.js"),t=(e=!0)=>{const a=r.getUaData();return e?a.browserName==="safari"||a.browserName==="mobile-safari":a.browserName==="safari"};exports.isSafari=t;
@@ -1,4 +1,4 @@
1
- import { getUaData as e } from "../get/getUaData.js";
1
+ import { getUaData as e } from "../get/getUaData.es.js";
2
2
  const i = (a = !0) => {
3
3
  const r = e();
4
4
  return a ? r.browserName === "safari" || r.browserName === "mobile-safari" : r.browserName === "safari";
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=l=>{const c=l.scrollWidth>l.clientWidth,i=l.scrollHeight>l.clientHeight;return c||i};exports.isScrollable=o;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("is-touch-device"),o=()=>e();exports.isTouchSupport=o;
@@ -0,0 +1,5 @@
1
+ import o from "is-touch-device";
2
+ const i = () => o();
3
+ export {
4
+ i as isTouchSupport
5
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("isomorphic-dompurify"),r=e=>t.sanitize(e,{ALLOWED_TAGS:[],KEEP_CONTENT:!0,USE_PROFILES:{html:!1}}).replace(/<\/?[^>]+(>|$)/g,"");exports.removeAllHtmlTags=r;
@@ -1,4 +1,4 @@
1
- import e from "../../node_modules/isomorphic-dompurify/browser.js";
1
+ import e from "isomorphic-dompurify";
2
2
  const n = (t) => e.sanitize(t, {
3
3
  ALLOWED_TAGS: [],
4
4
  KEEP_CONTENT: !0,
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=(e,t)=>{e.removeAttribute(t)};exports.removeAttribute=r;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("store2"),r=e=>{o.session.remove(e)};exports.removeSessionStorage=r;
@@ -1,4 +1,4 @@
1
- import e from "../../node_modules/store2/dist/store2.js";
1
+ import e from "store2";
2
2
  const s = (o) => {
3
3
  e.session.remove(o);
4
4
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=e=>{document.documentElement.style.removeProperty(e)};exports.removeStylePropertyValue=t;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=(e="--vh")=>{const t=window.innerHeight*.01;document.documentElement.style.setProperty(e,`${t}px`)};exports.set100vh=n;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=(e="--vw")=>{const t=document.documentElement.clientWidth;document.documentElement.style.setProperty(e,`${t}px`)};exports.set100vw=n;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=(t,e,r)=>{t.setAttribute(e,r)};exports.setAttribute=i;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=(t,o,e="smooth")=>{const n=t.getBoundingClientRect().width/2,s=o.getBoundingClientRect().width/2,c=o.offsetLeft+s-n;t.scrollTo({left:c,behavior:e})};exports.setScrollPositionToCenter=i;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("store2"),o=(e,s)=>{t.session.set(e,s)};exports.setSessionStorage=o;
@@ -1,4 +1,4 @@
1
- import e from "../../node_modules/store2/dist/store2.js";
1
+ import e from "store2";
2
2
  const r = (s, o) => {
3
3
  e.session.set(s, o);
4
4
  };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=(e,t)=>{document.documentElement.style.setProperty(e,t)};exports.setStylePropertyValue=o;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=e=>e?e.toLowerCase()==="true":!1;exports.toBoolean=o;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=t=>Math.abs(t);exports.toPositiveNumber=e;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=t=>{if(t){if(t.nodeType===Node.TEXT_NODE){const o=(t.textContent||"").trim(),e=document.createDocumentFragment();for(const c of o){const n=document.createElement("span");n.textContent=c,e.appendChild(n)}t.replaceWith(e)}else if(t.nodeType===Node.ELEMENT_NODE)for(const o of Array.from(t.childNodes))r(o)}};exports.wrapTextWithSpans=r;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=e=>new Promise(t=>setTimeout(t,e*1e3,"foo"));exports.sleep=o;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=async(o=!1)=>{if(!document.images||document.images.length===0)return Promise.resolve(!0);const i=Array.from(document.images).filter(e=>e.getAttribute("loading")!=="lazy"),s=Array.from(document.getElementsByTagName("video"));let r=[...i,...s];if(o){const e=window.innerHeight;r=r.filter(n=>{const t=n.getBoundingClientRect();return t.top<e&&t.bottom>0})}return r.length===0?Promise.resolve(!0):(await Promise.all(r.map(e=>e instanceof HTMLImageElement&&e.complete||e instanceof HTMLVideoElement&&e.readyState>=3?Promise.resolve():new Promise(n=>{const t=()=>n();e instanceof HTMLImageElement?(e.addEventListener("load",t,{once:!0}),e.addEventListener("error",t,{once:!0})):e instanceof HTMLVideoElement&&(e.addEventListener("loadeddata",t,{once:!0}),e.addEventListener("error",t,{once:!0}))}))),!0)};exports.waitForAllMediaLoaded=l;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("../../../_virtual/_commonjsHelpers.cjs.js"),c=require("../../../_virtual/isBetween.cjs.js");(function(l,_){(function(p,r){l.exports=r()})(f.commonjsGlobal,function(){return function(p,r,s){r.prototype.isBetween=function(a,h,e,i){var t=s(a),o=s(h),n=(i=i||"()")[0]==="(",u=i[1]===")";return(n?this.isAfter(t,e):!this.isBefore(t,e))&&(u?this.isBefore(o,e):!this.isAfter(o,e))||(n?this.isBefore(t,e):!this.isAfter(t,e))&&(u?this.isAfter(o,e):!this.isBefore(o,e))}}})})(c.__module);var m=c.__module.exports;const B=f.getDefaultExportFromCjs(m);exports.default=B;
@@ -1,5 +1,5 @@
1
- import { commonjsGlobal as a, getDefaultExportFromCjs as c } from "../../../_virtual/_commonjsHelpers.js";
2
- import { __module as u } from "../../../_virtual/isBetween.js";
1
+ import { commonjsGlobal as a, getDefaultExportFromCjs as c } from "../../../_virtual/_commonjsHelpers.es.js";
2
+ import { __module as u } from "../../../_virtual/isBetween.es.js";
3
3
  (function(p, l) {
4
4
  (function(h, i) {
5
5
  p.exports = i();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "umaki",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "A utility that is often used in web production.",
5
5
  "author": "TsubasaHiga",
6
6
  "homepage": "https://github.com/TsubasaHiga/umaki",
@@ -19,13 +19,13 @@
19
19
  "dist"
20
20
  ],
21
21
  "sideEffects": false,
22
- "main": "./dist/index.umd.cjs",
23
- "module": "./dist/index.js",
22
+ "main": "./dist/index.cjs.js",
23
+ "module": "./dist/index.es.js",
24
24
  "types": "./dist/index.d.ts",
25
25
  "exports": {
26
26
  "types": "./dist/index.d.ts",
27
- "import": "./dist/index.js",
28
- "require": "./dist/index.umd.cjs"
27
+ "import": "./dist/index.es.js",
28
+ "require": "./dist/index.cjs.js"
29
29
  },
30
30
  "scripts": {
31
31
  "dev": "vite",
@@ -1,4 +0,0 @@
1
- var a = { exports: {} };
2
- export {
3
- a as __module
4
- };
@@ -1,4 +0,0 @@
1
- var e = { exports: {} };
2
- export {
3
- e as __module
4
- };
@@ -1,4 +0,0 @@
1
- var r = { exports: {} };
2
- export {
3
- r as __module
4
- };
@@ -1,4 +0,0 @@
1
- var e = { exports: {} };
2
- export {
3
- e as __module
4
- };
@@ -1,4 +0,0 @@
1
- var r = { exports: {} };
2
- export {
3
- r as __module
4
- };
@@ -1,19 +0,0 @@
1
- import { toBoolean as i } from "../to/toBoolean.js";
2
- const p = async (a, r) => {
3
- if (r && a.paused) {
4
- if (i(a.dataset.playing)) return;
5
- const s = a.play();
6
- if (s === void 0) return;
7
- try {
8
- await s, a.currentTime = 0, a.dataset.playing = "true";
9
- } catch {
10
- }
11
- }
12
- if (!r && !a.paused) {
13
- if (!i(a.dataset.playing)) return;
14
- a.pause(), a.dataset.playing = "false";
15
- }
16
- };
17
- export {
18
- p as videoPlayControl
19
- };
@@ -1,16 +0,0 @@
1
- import * as a from "../../node_modules/query-string/base.js";
2
- const e = {
3
- arrayFormat: "comma",
4
- parseNumbers: !0
5
- }, u = (t, n) => {
6
- const s = {
7
- ...e,
8
- ...n
9
- }, o = a.parse(window.location.search, s);
10
- if (!o) return null;
11
- const r = o[t];
12
- return r ?? null;
13
- };
14
- export {
15
- u as getQueryParams
16
- };
@@ -1,5 +0,0 @@
1
- import o from "../../node_modules/is-touch-device/build/index.js";
2
- const i = () => o();
3
- export {
4
- i as isTouchSupport
5
- };