umaki 0.13.1 → 0.13.2

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 (156) hide show
  1. package/dist/_virtual/_rolldown/runtime.cjs +22 -0
  2. package/dist/index.cjs +137 -127
  3. package/dist/index.es.js +17 -71
  4. package/dist/libs/callback/index.cjs +15 -5
  5. package/dist/libs/callback/index.es.js +12 -4
  6. package/dist/libs/callback/tap-async.cjs +5 -6
  7. package/dist/libs/callback/tap-async.es.js +6 -7
  8. package/dist/libs/callback/tap.cjs +4 -5
  9. package/dist/libs/callback/tap.es.js +5 -6
  10. package/dist/libs/config/_internal.cjs +2 -4
  11. package/dist/libs/config/_internal.es.js +3 -4
  12. package/dist/libs/config/default-config.cjs +2 -5
  13. package/dist/libs/config/default-config.es.js +3 -6
  14. package/dist/libs/config/get-config.cjs +6 -7
  15. package/dist/libs/config/get-config.es.js +6 -8
  16. package/dist/libs/config/index.cjs +18 -8
  17. package/dist/libs/config/index.es.js +12 -6
  18. package/dist/libs/config/set-config.cjs +13 -10
  19. package/dist/libs/config/set-config.es.js +13 -10
  20. package/dist/libs/control/bg-scroll-stop.cjs +6 -7
  21. package/dist/libs/control/bg-scroll-stop.es.js +6 -7
  22. package/dist/libs/control/copy-to-clipboard.cjs +9 -12
  23. package/dist/libs/control/copy-to-clipboard.es.js +10 -13
  24. package/dist/libs/control/index.cjs +21 -11
  25. package/dist/libs/control/index.es.js +12 -7
  26. package/dist/libs/control/pd.cjs +2 -3
  27. package/dist/libs/control/pd.es.js +3 -4
  28. package/dist/libs/control/scroll-to-hash.cjs +28 -35
  29. package/dist/libs/control/scroll-to-hash.es.js +29 -36
  30. package/dist/libs/control/video-play-control.cjs +17 -20
  31. package/dist/libs/control/video-play-control.es.js +17 -20
  32. package/dist/libs/convert/change-date-string-to-specific-format.cjs +13 -12
  33. package/dist/libs/convert/change-date-string-to-specific-format.es.js +5 -8
  34. package/dist/libs/convert/hex-to-rgb.cjs +15 -20
  35. package/dist/libs/convert/hex-to-rgb.es.js +16 -21
  36. package/dist/libs/convert/index.cjs +19 -9
  37. package/dist/libs/convert/index.es.js +12 -6
  38. package/dist/libs/convert/json-string-to-json-object.cjs +7 -8
  39. package/dist/libs/convert/json-string-to-json-object.es.js +8 -9
  40. package/dist/libs/convert/rgb-to-hex.cjs +6 -7
  41. package/dist/libs/convert/rgb-to-hex.es.js +7 -8
  42. package/dist/libs/eventControl/debounce.cjs +11 -14
  43. package/dist/libs/eventControl/debounce.es.js +12 -15
  44. package/dist/libs/eventControl/index.cjs +15 -5
  45. package/dist/libs/eventControl/index.es.js +12 -4
  46. package/dist/libs/eventControl/throttle.cjs +11 -14
  47. package/dist/libs/eventControl/throttle.es.js +12 -15
  48. package/dist/libs/get/get-aspect-ratio.cjs +9 -9
  49. package/dist/libs/get/get-aspect-ratio.es.js +9 -9
  50. package/dist/libs/get/get-class-names.cjs +3 -5
  51. package/dist/libs/get/get-class-names.es.js +4 -6
  52. package/dist/libs/get/get-document-height.cjs +4 -5
  53. package/dist/libs/get/get-document-height.es.js +5 -6
  54. package/dist/libs/get/get-event-paths.cjs +16 -21
  55. package/dist/libs/get/get-event-paths.es.js +17 -22
  56. package/dist/libs/get/get-gcd.cjs +8 -11
  57. package/dist/libs/get/get-gcd.es.js +8 -11
  58. package/dist/libs/get/get-gravatar-url.cjs +8 -10
  59. package/dist/libs/get/get-gravatar-url.es.js +6 -10
  60. package/dist/libs/get/get-orientation.cjs +4 -8
  61. package/dist/libs/get/get-orientation.es.js +5 -9
  62. package/dist/libs/get/get-parent-list.cjs +5 -6
  63. package/dist/libs/get/get-parent-list.es.js +6 -7
  64. package/dist/libs/get/get-query-params.cjs +19 -20
  65. package/dist/libs/get/get-query-params.es.js +18 -21
  66. package/dist/libs/get/get-random-int.cjs +8 -15
  67. package/dist/libs/get/get-random-int.es.js +9 -16
  68. package/dist/libs/get/get-relative-time.cjs +41 -25
  69. package/dist/libs/get/get-relative-time.es.js +42 -26
  70. package/dist/libs/get/get-rem.cjs +4 -8
  71. package/dist/libs/get/get-rem.es.js +5 -9
  72. package/dist/libs/get/get-rendered-line-height.cjs +49 -54
  73. package/dist/libs/get/get-rendered-line-height.es.js +50 -55
  74. package/dist/libs/get/get-scrollbar-width.cjs +4 -5
  75. package/dist/libs/get/get-scrollbar-width.es.js +5 -6
  76. package/dist/libs/get/get-session-storage.cjs +8 -7
  77. package/dist/libs/get/get-session-storage.es.js +6 -7
  78. package/dist/libs/get/get-string-length.cjs +3 -4
  79. package/dist/libs/get/get-string-length.es.js +3 -4
  80. package/dist/libs/get/get-style-property-value-to-number.cjs +3 -4
  81. package/dist/libs/get/get-style-property-value-to-number.es.js +3 -4
  82. package/dist/libs/get/get-style-property-value.cjs +4 -5
  83. package/dist/libs/get/get-style-property-value.es.js +5 -6
  84. package/dist/libs/get/get-ua-data.cjs +20 -21
  85. package/dist/libs/get/get-ua-data.es.js +17 -20
  86. package/dist/libs/get/index.cjs +49 -39
  87. package/dist/libs/get/index.es.js +14 -23
  88. package/dist/libs/is/check-device-size.cjs +6 -9
  89. package/dist/libs/is/check-device-size.es.js +6 -9
  90. package/dist/libs/is/index.cjs +33 -23
  91. package/dist/libs/is/index.es.js +13 -14
  92. package/dist/libs/is/is-after-date-time.cjs +7 -8
  93. package/dist/libs/is/is-after-date-time.es.js +5 -8
  94. package/dist/libs/is/is-between-date-time.cjs +12 -12
  95. package/dist/libs/is/is-between-date-time.es.js +7 -10
  96. package/dist/libs/is/is-exist-all-elements.cjs +3 -4
  97. package/dist/libs/is/is-exist-all-elements.es.js +4 -5
  98. package/dist/libs/is/is-in-viewport.cjs +60 -63
  99. package/dist/libs/is/is-in-viewport.es.js +61 -64
  100. package/dist/libs/is/is-ipad.cjs +8 -11
  101. package/dist/libs/is/is-ipad.es.js +7 -10
  102. package/dist/libs/is/is-key-exists.cjs +3 -4
  103. package/dist/libs/is/is-key-exists.es.js +4 -5
  104. package/dist/libs/is/is-online.cjs +4 -7
  105. package/dist/libs/is/is-online.es.js +5 -8
  106. package/dist/libs/is/is-safari.cjs +6 -9
  107. package/dist/libs/is/is-safari.es.js +6 -9
  108. package/dist/libs/is/is-scrollable.cjs +5 -6
  109. package/dist/libs/is/is-scrollable.es.js +6 -7
  110. package/dist/libs/is/is-touch-support.cjs +7 -9
  111. package/dist/libs/is/is-touch-support.es.js +8 -10
  112. package/dist/libs/remove/index.cjs +19 -9
  113. package/dist/libs/remove/index.es.js +12 -6
  114. package/dist/libs/remove/remove-all-html-tags.cjs +10 -10
  115. package/dist/libs/remove/remove-all-html-tags.es.js +8 -10
  116. package/dist/libs/remove/remove-attribute.cjs +3 -4
  117. package/dist/libs/remove/remove-attribute.es.js +4 -5
  118. package/dist/libs/remove/remove-session-storage.cjs +6 -5
  119. package/dist/libs/remove/remove-session-storage.es.js +4 -5
  120. package/dist/libs/remove/remove-style-property-value.cjs +4 -5
  121. package/dist/libs/remove/remove-style-property-value.es.js +5 -6
  122. package/dist/libs/security/html-sanitize.cjs +15 -11
  123. package/dist/libs/security/html-sanitize.es.js +13 -12
  124. package/dist/libs/security/index.cjs +14 -4
  125. package/dist/libs/security/index.es.js +12 -5
  126. package/dist/libs/set/index.cjs +23 -13
  127. package/dist/libs/set/index.es.js +12 -8
  128. package/dist/libs/set/set-100vh.cjs +5 -6
  129. package/dist/libs/set/set-100vh.es.js +6 -7
  130. package/dist/libs/set/set-100vw.cjs +5 -6
  131. package/dist/libs/set/set-100vw.es.js +6 -7
  132. package/dist/libs/set/set-attribute.cjs +3 -4
  133. package/dist/libs/set/set-attribute.es.js +4 -5
  134. package/dist/libs/set/set-scroll-position-to-center.cjs +9 -8
  135. package/dist/libs/set/set-scroll-position-to-center.es.js +10 -9
  136. package/dist/libs/set/set-session-storage.cjs +6 -5
  137. package/dist/libs/set/set-session-storage.es.js +4 -5
  138. package/dist/libs/set/set-style-property-value.cjs +4 -5
  139. package/dist/libs/set/set-style-property-value.es.js +5 -6
  140. package/dist/libs/to/index.cjs +15 -5
  141. package/dist/libs/to/index.es.js +12 -4
  142. package/dist/libs/to/to-boolean.cjs +3 -4
  143. package/dist/libs/to/to-boolean.es.js +4 -5
  144. package/dist/libs/to/to-positive-number.cjs +2 -3
  145. package/dist/libs/to/to-positive-number.es.js +3 -4
  146. package/dist/libs/transform/index.cjs +13 -3
  147. package/dist/libs/transform/index.es.js +12 -4
  148. package/dist/libs/transform/wrap-text-with-spans.cjs +15 -20
  149. package/dist/libs/transform/wrap-text-with-spans.es.js +15 -20
  150. package/dist/libs/wait/index.cjs +15 -5
  151. package/dist/libs/wait/index.es.js +12 -4
  152. package/dist/libs/wait/sleep.cjs +3 -4
  153. package/dist/libs/wait/sleep.es.js +4 -5
  154. package/dist/libs/wait/wait-for-all-media-loaded.cjs +29 -41
  155. package/dist/libs/wait/wait-for-all-media-loaded.es.js +30 -42
  156. package/package.json +14 -11
@@ -1,7 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const removeStylePropertyValue = (key) => {
4
- if (typeof window === "undefined") return;
5
- document.documentElement.style.removeProperty(key);
1
+ // src/libs/remove/remove-style-property-value.ts
2
+ var removeStylePropertyValue = (key) => {
3
+ if (typeof window === "undefined") return;
4
+ document.documentElement.style.removeProperty(key);
6
5
  };
7
6
  exports.removeStylePropertyValue = removeStylePropertyValue;
@@ -1,7 +1,6 @@
1
- const removeStylePropertyValue = (key) => {
2
- if (typeof window === "undefined") return;
3
- document.documentElement.style.removeProperty(key);
4
- };
5
- export {
6
- removeStylePropertyValue
1
+ // src/libs/remove/remove-style-property-value.ts
2
+ var removeStylePropertyValue = (key) => {
3
+ if (typeof window === "undefined") return;
4
+ document.documentElement.style.removeProperty(key);
7
5
  };
6
+ export { removeStylePropertyValue };
@@ -1,15 +1,19 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const DOMPurify = require("isomorphic-dompurify");
4
- const STRING_OUTPUT_CONFIG = {
5
- RETURN_DOM: false,
6
- RETURN_DOM_FRAGMENT: false,
7
- RETURN_TRUSTED_TYPE: false,
8
- IN_PLACE: false
1
+ const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
2
+ let isomorphic_dompurify = require("isomorphic-dompurify");
3
+ isomorphic_dompurify = require_runtime.__toESM(isomorphic_dompurify, 1);
4
+ // src/libs/security/html-sanitize.ts
5
+ var STRING_OUTPUT_CONFIG = {
6
+ RETURN_DOM: false,
7
+ RETURN_DOM_FRAGMENT: false,
8
+ RETURN_TRUSTED_TYPE: false,
9
+ IN_PLACE: false
9
10
  };
10
- const htmlSanitize = (html, config = {}) => {
11
- return DOMPurify.sanitize(html, { ...config, ...STRING_OUTPUT_CONFIG });
11
+ var htmlSanitize = (html, config = {}) => {
12
+ return isomorphic_dompurify.default.sanitize(html, {
13
+ ...config,
14
+ ...STRING_OUTPUT_CONFIG
15
+ });
12
16
  };
13
- const sanitizeHtml = htmlSanitize;
17
+ var sanitizeHtml = htmlSanitize;
14
18
  exports.htmlSanitize = htmlSanitize;
15
19
  exports.sanitizeHtml = sanitizeHtml;
@@ -1,15 +1,16 @@
1
1
  import DOMPurify from "isomorphic-dompurify";
2
- const STRING_OUTPUT_CONFIG = {
3
- RETURN_DOM: false,
4
- RETURN_DOM_FRAGMENT: false,
5
- RETURN_TRUSTED_TYPE: false,
6
- IN_PLACE: false
2
+ // src/libs/security/html-sanitize.ts
3
+ var STRING_OUTPUT_CONFIG = {
4
+ RETURN_DOM: false,
5
+ RETURN_DOM_FRAGMENT: false,
6
+ RETURN_TRUSTED_TYPE: false,
7
+ IN_PLACE: false
7
8
  };
8
- const htmlSanitize = (html, config = {}) => {
9
- return DOMPurify.sanitize(html, { ...config, ...STRING_OUTPUT_CONFIG });
10
- };
11
- const sanitizeHtml = htmlSanitize;
12
- export {
13
- htmlSanitize,
14
- sanitizeHtml
9
+ var htmlSanitize = (html, config = {}) => {
10
+ return DOMPurify.sanitize(html, {
11
+ ...config,
12
+ ...STRING_OUTPUT_CONFIG
13
+ });
15
14
  };
15
+ var sanitizeHtml = htmlSanitize;
16
+ export { htmlSanitize, sanitizeHtml };
@@ -1,5 +1,15 @@
1
- "use strict";
1
+ /*!
2
+ * name: umaki
3
+ * version: v0.13.2
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
+ */
2
12
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const htmlSanitize = require("./html-sanitize.cjs");
4
- exports.htmlSanitize = htmlSanitize.htmlSanitize;
5
- exports.sanitizeHtml = htmlSanitize.sanitizeHtml;
13
+ const require_html_sanitize = require("./html-sanitize.cjs");
14
+ exports.htmlSanitize = require_html_sanitize.htmlSanitize;
15
+ exports.sanitizeHtml = require_html_sanitize.sanitizeHtml;
@@ -1,5 +1,12 @@
1
- import { htmlSanitize, sanitizeHtml } from "./html-sanitize.es.js";
2
- export {
3
- htmlSanitize,
4
- sanitizeHtml
5
- };
1
+ /*!
2
+ * name: umaki
3
+ * version: v0.13.2
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
+ export { htmlSanitize, sanitizeHtml } from "./html-sanitize.es.js";
@@ -1,14 +1,24 @@
1
- "use strict";
1
+ /*!
2
+ * name: umaki
3
+ * version: v0.13.2
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
+ */
2
12
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const set100vh = require("./set-100vh.cjs");
4
- const set100vw = require("./set-100vw.cjs");
5
- const setAttribute = require("./set-attribute.cjs");
6
- const setScrollPositionToCenter = require("./set-scroll-position-to-center.cjs");
7
- const setSessionStorage = require("./set-session-storage.cjs");
8
- const setStylePropertyValue = require("./set-style-property-value.cjs");
9
- exports.set100vh = set100vh.set100vh;
10
- exports.set100vw = set100vw.set100vw;
11
- exports.setAttribute = setAttribute.setAttribute;
12
- exports.setScrollPositionToCenter = setScrollPositionToCenter.setScrollPositionToCenter;
13
- exports.setSessionStorage = setSessionStorage.setSessionStorage;
14
- exports.setStylePropertyValue = setStylePropertyValue.setStylePropertyValue;
13
+ const require_set_100vh = require("./set-100vh.cjs");
14
+ const require_set_100vw = require("./set-100vw.cjs");
15
+ const require_set_attribute = require("./set-attribute.cjs");
16
+ const require_set_scroll_position_to_center = require("./set-scroll-position-to-center.cjs");
17
+ const require_set_session_storage = require("./set-session-storage.cjs");
18
+ const require_set_style_property_value = require("./set-style-property-value.cjs");
19
+ exports.set100vh = require_set_100vh.set100vh;
20
+ exports.set100vw = require_set_100vw.set100vw;
21
+ exports.setAttribute = require_set_attribute.setAttribute;
22
+ exports.setScrollPositionToCenter = require_set_scroll_position_to_center.setScrollPositionToCenter;
23
+ exports.setSessionStorage = require_set_session_storage.setSessionStorage;
24
+ exports.setStylePropertyValue = require_set_style_property_value.setStylePropertyValue;
@@ -1,14 +1,18 @@
1
+ /*!
2
+ * name: umaki
3
+ * version: v0.13.2
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
+ */
1
12
  import { set100vh } from "./set-100vh.es.js";
2
13
  import { set100vw } from "./set-100vw.es.js";
3
14
  import { setAttribute } from "./set-attribute.es.js";
4
15
  import { setScrollPositionToCenter } from "./set-scroll-position-to-center.es.js";
5
16
  import { setSessionStorage } from "./set-session-storage.es.js";
6
17
  import { setStylePropertyValue } from "./set-style-property-value.es.js";
7
- export {
8
- set100vh,
9
- set100vw,
10
- setAttribute,
11
- setScrollPositionToCenter,
12
- setSessionStorage,
13
- setStylePropertyValue
14
- };
18
+ export { set100vh, set100vw, setAttribute, setScrollPositionToCenter, setSessionStorage, setStylePropertyValue };
@@ -1,8 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const set100vh = (setProperty = "--vh") => {
4
- if (typeof window === "undefined") return;
5
- const vh = window.innerHeight * 0.01;
6
- document.documentElement.style.setProperty(setProperty, `${vh}px`);
1
+ // src/libs/set/set-100vh.ts
2
+ var set100vh = (setProperty = "--vh") => {
3
+ if (typeof window === "undefined") return;
4
+ const vh = window.innerHeight * .01;
5
+ document.documentElement.style.setProperty(setProperty, `${vh}px`);
7
6
  };
8
7
  exports.set100vh = set100vh;
@@ -1,8 +1,7 @@
1
- const set100vh = (setProperty = "--vh") => {
2
- if (typeof window === "undefined") return;
3
- const vh = window.innerHeight * 0.01;
4
- document.documentElement.style.setProperty(setProperty, `${vh}px`);
5
- };
6
- export {
7
- set100vh
1
+ // src/libs/set/set-100vh.ts
2
+ var set100vh = (setProperty = "--vh") => {
3
+ if (typeof window === "undefined") return;
4
+ const vh = window.innerHeight * .01;
5
+ document.documentElement.style.setProperty(setProperty, `${vh}px`);
8
6
  };
7
+ export { set100vh };
@@ -1,8 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const set100vw = (setProperty = "--vw") => {
4
- if (typeof window === "undefined") return;
5
- const vw = document.documentElement.clientWidth;
6
- document.documentElement.style.setProperty(setProperty, `${vw}px`);
1
+ // src/libs/set/set-100vw.ts
2
+ var set100vw = (setProperty = "--vw") => {
3
+ if (typeof window === "undefined") return;
4
+ const vw = document.documentElement.clientWidth;
5
+ document.documentElement.style.setProperty(setProperty, `${vw}px`);
7
6
  };
8
7
  exports.set100vw = set100vw;
@@ -1,8 +1,7 @@
1
- const set100vw = (setProperty = "--vw") => {
2
- if (typeof window === "undefined") return;
3
- const vw = document.documentElement.clientWidth;
4
- document.documentElement.style.setProperty(setProperty, `${vw}px`);
5
- };
6
- export {
7
- set100vw
1
+ // src/libs/set/set-100vw.ts
2
+ var set100vw = (setProperty = "--vw") => {
3
+ if (typeof window === "undefined") return;
4
+ const vw = document.documentElement.clientWidth;
5
+ document.documentElement.style.setProperty(setProperty, `${vw}px`);
8
6
  };
7
+ export { set100vw };
@@ -1,6 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const setAttribute = (element, attribute, value) => {
4
- element.setAttribute(attribute, value);
1
+ // src/libs/set/set-attribute.ts
2
+ var setAttribute = (element, attribute, value) => {
3
+ element.setAttribute(attribute, value);
5
4
  };
6
5
  exports.setAttribute = setAttribute;
@@ -1,6 +1,5 @@
1
- const setAttribute = (element, attribute, value) => {
2
- element.setAttribute(attribute, value);
3
- };
4
- export {
5
- setAttribute
1
+ // src/libs/set/set-attribute.ts
2
+ var setAttribute = (element, attribute, value) => {
3
+ element.setAttribute(attribute, value);
6
4
  };
5
+ export { setAttribute };
@@ -1,10 +1,11 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const setScrollPositionToCenter = (rootElement, targetElement, behavior = "smooth") => {
4
- const rootHalfW = rootElement.getBoundingClientRect().width / 2;
5
- const targetHalfW = targetElement.getBoundingClientRect().width / 2;
6
- const currentPosLeft = targetElement.offsetLeft + targetHalfW;
7
- const posLeft = currentPosLeft - rootHalfW;
8
- rootElement.scrollTo({ left: posLeft, behavior });
1
+ // src/libs/set/set-scroll-position-to-center.ts
2
+ var setScrollPositionToCenter = (rootElement, targetElement, behavior = "smooth") => {
3
+ const rootHalfW = rootElement.getBoundingClientRect().width / 2;
4
+ const targetHalfW = targetElement.getBoundingClientRect().width / 2;
5
+ const posLeft = targetElement.offsetLeft + targetHalfW - rootHalfW;
6
+ rootElement.scrollTo({
7
+ left: posLeft,
8
+ behavior
9
+ });
9
10
  };
10
11
  exports.setScrollPositionToCenter = setScrollPositionToCenter;
@@ -1,10 +1,11 @@
1
- const setScrollPositionToCenter = (rootElement, targetElement, behavior = "smooth") => {
2
- const rootHalfW = rootElement.getBoundingClientRect().width / 2;
3
- const targetHalfW = targetElement.getBoundingClientRect().width / 2;
4
- const currentPosLeft = targetElement.offsetLeft + targetHalfW;
5
- const posLeft = currentPosLeft - rootHalfW;
6
- rootElement.scrollTo({ left: posLeft, behavior });
7
- };
8
- export {
9
- setScrollPositionToCenter
1
+ // src/libs/set/set-scroll-position-to-center.ts
2
+ var setScrollPositionToCenter = (rootElement, targetElement, behavior = "smooth") => {
3
+ const rootHalfW = rootElement.getBoundingClientRect().width / 2;
4
+ const targetHalfW = targetElement.getBoundingClientRect().width / 2;
5
+ const posLeft = targetElement.offsetLeft + targetHalfW - rootHalfW;
6
+ rootElement.scrollTo({
7
+ left: posLeft,
8
+ behavior
9
+ });
10
10
  };
11
+ export { setScrollPositionToCenter };
@@ -1,7 +1,8 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const store = require("store2");
4
- const setSessionStorage = (key, value) => {
5
- store.session.set(key, value);
1
+ const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
2
+ let store2 = require("store2");
3
+ store2 = require_runtime.__toESM(store2, 1);
4
+ // src/libs/set/set-session-storage.ts
5
+ var setSessionStorage = (key, value) => {
6
+ store2.default.session.set(key, value);
6
7
  };
7
8
  exports.setSessionStorage = setSessionStorage;
@@ -1,7 +1,6 @@
1
1
  import store from "store2";
2
- const setSessionStorage = (key, value) => {
3
- store.session.set(key, value);
4
- };
5
- export {
6
- setSessionStorage
2
+ // src/libs/set/set-session-storage.ts
3
+ var setSessionStorage = (key, value) => {
4
+ store.session.set(key, value);
7
5
  };
6
+ export { setSessionStorage };
@@ -1,7 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const setStylePropertyValue = (key, value) => {
4
- if (typeof window === "undefined") return;
5
- document.documentElement.style.setProperty(key, value);
1
+ // src/libs/set/set-style-property-value.ts
2
+ var setStylePropertyValue = (key, value) => {
3
+ if (typeof window === "undefined") return;
4
+ document.documentElement.style.setProperty(key, value);
6
5
  };
7
6
  exports.setStylePropertyValue = setStylePropertyValue;
@@ -1,7 +1,6 @@
1
- const setStylePropertyValue = (key, value) => {
2
- if (typeof window === "undefined") return;
3
- document.documentElement.style.setProperty(key, value);
4
- };
5
- export {
6
- setStylePropertyValue
1
+ // src/libs/set/set-style-property-value.ts
2
+ var setStylePropertyValue = (key, value) => {
3
+ if (typeof window === "undefined") return;
4
+ document.documentElement.style.setProperty(key, value);
7
5
  };
6
+ export { setStylePropertyValue };
@@ -1,6 +1,16 @@
1
- "use strict";
1
+ /*!
2
+ * name: umaki
3
+ * version: v0.13.2
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
+ */
2
12
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const toBoolean = require("./to-boolean.cjs");
4
- const toPositiveNumber = require("./to-positive-number.cjs");
5
- exports.toBoolean = toBoolean.toBoolean;
6
- exports.toPositiveNumber = toPositiveNumber.toPositiveNumber;
13
+ const require_to_boolean = require("./to-boolean.cjs");
14
+ const require_to_positive_number = require("./to-positive-number.cjs");
15
+ exports.toBoolean = require_to_boolean.toBoolean;
16
+ exports.toPositiveNumber = require_to_positive_number.toPositiveNumber;
@@ -1,6 +1,14 @@
1
+ /*!
2
+ * name: umaki
3
+ * version: v0.13.2
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
+ */
1
12
  import { toBoolean } from "./to-boolean.es.js";
2
13
  import { toPositiveNumber } from "./to-positive-number.es.js";
3
- export {
4
- toBoolean,
5
- toPositiveNumber
6
- };
14
+ export { toBoolean, toPositiveNumber };
@@ -1,6 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const toBoolean = (booleanStr) => {
4
- return booleanStr ? booleanStr.toLowerCase() === "true" : false;
1
+ // src/libs/to/to-boolean.ts
2
+ var toBoolean = (booleanStr) => {
3
+ return booleanStr ? booleanStr.toLowerCase() === "true" : false;
5
4
  };
6
5
  exports.toBoolean = toBoolean;
@@ -1,6 +1,5 @@
1
- const toBoolean = (booleanStr) => {
2
- return booleanStr ? booleanStr.toLowerCase() === "true" : false;
3
- };
4
- export {
5
- toBoolean
1
+ // src/libs/to/to-boolean.ts
2
+ var toBoolean = (booleanStr) => {
3
+ return booleanStr ? booleanStr.toLowerCase() === "true" : false;
6
4
  };
5
+ export { toBoolean };
@@ -1,4 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const toPositiveNumber = (n) => Math.abs(n);
1
+ // src/libs/to/to-positive-number.ts
2
+ var toPositiveNumber = (n) => Math.abs(n);
4
3
  exports.toPositiveNumber = toPositiveNumber;
@@ -1,4 +1,3 @@
1
- const toPositiveNumber = (n) => Math.abs(n);
2
- export {
3
- toPositiveNumber
4
- };
1
+ // src/libs/to/to-positive-number.ts
2
+ var toPositiveNumber = (n) => Math.abs(n);
3
+ export { toPositiveNumber };
@@ -1,4 +1,14 @@
1
- "use strict";
1
+ /*!
2
+ * name: umaki
3
+ * version: v0.13.2
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
+ */
2
12
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const wrapTextWithSpans = require("./wrap-text-with-spans.cjs");
4
- exports.wrapTextWithSpans = wrapTextWithSpans.wrapTextWithSpans;
13
+ const require_wrap_text_with_spans = require("./wrap-text-with-spans.cjs");
14
+ exports.wrapTextWithSpans = require_wrap_text_with_spans.wrapTextWithSpans;
@@ -1,4 +1,12 @@
1
- import { wrapTextWithSpans } from "./wrap-text-with-spans.es.js";
2
- export {
3
- wrapTextWithSpans
4
- };
1
+ /*!
2
+ * name: umaki
3
+ * version: v0.13.2
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
+ export { wrapTextWithSpans } from "./wrap-text-with-spans.es.js";
@@ -1,22 +1,17 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const runes2 = require("runes2");
4
- const wrapTextWithSpans = (element) => {
5
- if (!element) return;
6
- if (element.nodeType === Node.TEXT_NODE) {
7
- const textContent = (element.textContent || "").trim();
8
- const fragment = document.createDocumentFragment();
9
- const graphemes = runes2.runes(textContent);
10
- for (const grapheme of graphemes) {
11
- const span = document.createElement("span");
12
- span.textContent = grapheme;
13
- fragment.appendChild(span);
14
- }
15
- element.replaceWith(fragment);
16
- } else if (element.nodeType === Node.ELEMENT_NODE) {
17
- for (const child of Array.from(element.childNodes)) {
18
- wrapTextWithSpans(child);
19
- }
20
- }
1
+ let runes2 = require("runes2");
2
+ // src/libs/transform/wrap-text-with-spans.ts
3
+ var wrapTextWithSpans = (element) => {
4
+ if (!element) return;
5
+ if (element.nodeType === Node.TEXT_NODE) {
6
+ const textContent = (element.textContent || "").trim();
7
+ const fragment = document.createDocumentFragment();
8
+ const graphemes = (0, runes2.runes)(textContent);
9
+ for (const grapheme of graphemes) {
10
+ const span = document.createElement("span");
11
+ span.textContent = grapheme;
12
+ fragment.appendChild(span);
13
+ }
14
+ element.replaceWith(fragment);
15
+ } else if (element.nodeType === Node.ELEMENT_NODE) for (const child of Array.from(element.childNodes)) wrapTextWithSpans(child);
21
16
  };
22
17
  exports.wrapTextWithSpans = wrapTextWithSpans;
@@ -1,22 +1,17 @@
1
1
  import { runes } from "runes2";
2
- const wrapTextWithSpans = (element) => {
3
- if (!element) return;
4
- if (element.nodeType === Node.TEXT_NODE) {
5
- const textContent = (element.textContent || "").trim();
6
- const fragment = document.createDocumentFragment();
7
- const graphemes = runes(textContent);
8
- for (const grapheme of graphemes) {
9
- const span = document.createElement("span");
10
- span.textContent = grapheme;
11
- fragment.appendChild(span);
12
- }
13
- element.replaceWith(fragment);
14
- } else if (element.nodeType === Node.ELEMENT_NODE) {
15
- for (const child of Array.from(element.childNodes)) {
16
- wrapTextWithSpans(child);
17
- }
18
- }
19
- };
20
- export {
21
- wrapTextWithSpans
2
+ // src/libs/transform/wrap-text-with-spans.ts
3
+ var wrapTextWithSpans = (element) => {
4
+ if (!element) return;
5
+ if (element.nodeType === Node.TEXT_NODE) {
6
+ const textContent = (element.textContent || "").trim();
7
+ const fragment = document.createDocumentFragment();
8
+ const graphemes = runes(textContent);
9
+ for (const grapheme of graphemes) {
10
+ const span = document.createElement("span");
11
+ span.textContent = grapheme;
12
+ fragment.appendChild(span);
13
+ }
14
+ element.replaceWith(fragment);
15
+ } else if (element.nodeType === Node.ELEMENT_NODE) for (const child of Array.from(element.childNodes)) wrapTextWithSpans(child);
22
16
  };
17
+ export { wrapTextWithSpans };
@@ -1,6 +1,16 @@
1
- "use strict";
1
+ /*!
2
+ * name: umaki
3
+ * version: v0.13.2
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
+ */
2
12
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const sleep = require("./sleep.cjs");
4
- const waitForAllMediaLoaded = require("./wait-for-all-media-loaded.cjs");
5
- exports.sleep = sleep.sleep;
6
- exports.waitForAllMediaLoaded = waitForAllMediaLoaded.waitForAllMediaLoaded;
13
+ const require_sleep = require("./sleep.cjs");
14
+ const require_wait_for_all_media_loaded = require("./wait-for-all-media-loaded.cjs");
15
+ exports.sleep = require_sleep.sleep;
16
+ exports.waitForAllMediaLoaded = require_wait_for_all_media_loaded.waitForAllMediaLoaded;
@@ -1,6 +1,14 @@
1
+ /*!
2
+ * name: umaki
3
+ * version: v0.13.2
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
+ */
1
12
  import { sleep } from "./sleep.es.js";
2
13
  import { waitForAllMediaLoaded } from "./wait-for-all-media-loaded.es.js";
3
- export {
4
- sleep,
5
- waitForAllMediaLoaded
6
- };
14
+ export { sleep, waitForAllMediaLoaded };