@med_ghoul/forge-shared 1.2.0

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 (254) hide show
  1. package/README.md +158 -0
  2. package/dist/hooks/index.cjs +1 -0
  3. package/dist/hooks/index.d.cts +19 -0
  4. package/dist/hooks/index.d.ts +19 -0
  5. package/dist/hooks/index.js +1 -0
  6. package/dist/hooks/use-back-to-top/index.cjs +1 -0
  7. package/dist/hooks/use-back-to-top/index.d.cts +2 -0
  8. package/dist/hooks/use-back-to-top/index.d.ts +2 -0
  9. package/dist/hooks/use-back-to-top/index.js +1 -0
  10. package/dist/hooks/use-back-to-top/use-back-to-top.cjs +1 -0
  11. package/dist/hooks/use-back-to-top/use-back-to-top.d.cts +33 -0
  12. package/dist/hooks/use-back-to-top/use-back-to-top.d.ts +33 -0
  13. package/dist/hooks/use-back-to-top/use-back-to-top.js +1 -0
  14. package/dist/hooks/use-boolean/index.cjs +1 -0
  15. package/dist/hooks/use-boolean/index.d.cts +2 -0
  16. package/dist/hooks/use-boolean/index.d.ts +2 -0
  17. package/dist/hooks/use-boolean/index.js +1 -0
  18. package/dist/hooks/use-boolean/use-boolean.cjs +1 -0
  19. package/dist/hooks/use-boolean/use-boolean.d.cts +29 -0
  20. package/dist/hooks/use-boolean/use-boolean.d.ts +29 -0
  21. package/dist/hooks/use-boolean/use-boolean.js +1 -0
  22. package/dist/hooks/use-client-rect/index.cjs +1 -0
  23. package/dist/hooks/use-client-rect/index.d.cts +2 -0
  24. package/dist/hooks/use-client-rect/index.d.ts +2 -0
  25. package/dist/hooks/use-client-rect/index.js +1 -0
  26. package/dist/hooks/use-client-rect/use-client-rect.cjs +1 -0
  27. package/dist/hooks/use-client-rect/use-client-rect.d.cts +29 -0
  28. package/dist/hooks/use-client-rect/use-client-rect.d.ts +29 -0
  29. package/dist/hooks/use-client-rect/use-client-rect.js +1 -0
  30. package/dist/hooks/use-cookies/index.cjs +1 -0
  31. package/dist/hooks/use-cookies/index.d.cts +2 -0
  32. package/dist/hooks/use-cookies/index.d.ts +2 -0
  33. package/dist/hooks/use-cookies/index.js +1 -0
  34. package/dist/hooks/use-cookies/use-cookies.cjs +1 -0
  35. package/dist/hooks/use-cookies/use-cookies.d.cts +40 -0
  36. package/dist/hooks/use-cookies/use-cookies.d.ts +40 -0
  37. package/dist/hooks/use-cookies/use-cookies.js +1 -0
  38. package/dist/hooks/use-copy-to-clipboard/index.cjs +1 -0
  39. package/dist/hooks/use-copy-to-clipboard/index.d.cts +1 -0
  40. package/dist/hooks/use-copy-to-clipboard/index.d.ts +1 -0
  41. package/dist/hooks/use-copy-to-clipboard/index.js +1 -0
  42. package/dist/hooks/use-copy-to-clipboard/use-copy-to-clipboard.cjs +1 -0
  43. package/dist/hooks/use-copy-to-clipboard/use-copy-to-clipboard.d.cts +26 -0
  44. package/dist/hooks/use-copy-to-clipboard/use-copy-to-clipboard.d.ts +26 -0
  45. package/dist/hooks/use-copy-to-clipboard/use-copy-to-clipboard.js +1 -0
  46. package/dist/hooks/use-countdown-date/index.cjs +1 -0
  47. package/dist/hooks/use-countdown-date/index.d.cts +1 -0
  48. package/dist/hooks/use-countdown-date/index.d.ts +1 -0
  49. package/dist/hooks/use-countdown-date/index.js +1 -0
  50. package/dist/hooks/use-countdown-date/use-countdown-date.cjs +1 -0
  51. package/dist/hooks/use-countdown-date/use-countdown-date.d.cts +29 -0
  52. package/dist/hooks/use-countdown-date/use-countdown-date.d.ts +29 -0
  53. package/dist/hooks/use-countdown-date/use-countdown-date.js +1 -0
  54. package/dist/hooks/use-countdown-seconds/index.cjs +1 -0
  55. package/dist/hooks/use-countdown-seconds/index.d.cts +2 -0
  56. package/dist/hooks/use-countdown-seconds/index.d.ts +2 -0
  57. package/dist/hooks/use-countdown-seconds/index.js +1 -0
  58. package/dist/hooks/use-countdown-seconds/use-countdown-seconds.cjs +1 -0
  59. package/dist/hooks/use-countdown-seconds/use-countdown-seconds.d.cts +35 -0
  60. package/dist/hooks/use-countdown-seconds/use-countdown-seconds.d.ts +35 -0
  61. package/dist/hooks/use-countdown-seconds/use-countdown-seconds.js +1 -0
  62. package/dist/hooks/use-debounce/index.cjs +1 -0
  63. package/dist/hooks/use-debounce/index.d.cts +1 -0
  64. package/dist/hooks/use-debounce/index.d.ts +1 -0
  65. package/dist/hooks/use-debounce/index.js +1 -0
  66. package/dist/hooks/use-debounce/use-debounce.cjs +1 -0
  67. package/dist/hooks/use-debounce/use-debounce.d.cts +21 -0
  68. package/dist/hooks/use-debounce/use-debounce.d.ts +21 -0
  69. package/dist/hooks/use-debounce/use-debounce.js +1 -0
  70. package/dist/hooks/use-double-click/index.cjs +1 -0
  71. package/dist/hooks/use-double-click/index.d.cts +2 -0
  72. package/dist/hooks/use-double-click/index.d.ts +2 -0
  73. package/dist/hooks/use-double-click/index.js +1 -0
  74. package/dist/hooks/use-double-click/use-double-click.cjs +1 -0
  75. package/dist/hooks/use-double-click/use-double-click.d.cts +28 -0
  76. package/dist/hooks/use-double-click/use-double-click.d.ts +28 -0
  77. package/dist/hooks/use-double-click/use-double-click.js +1 -0
  78. package/dist/hooks/use-is-client/index.cjs +1 -0
  79. package/dist/hooks/use-is-client/index.d.cts +1 -0
  80. package/dist/hooks/use-is-client/index.d.ts +1 -0
  81. package/dist/hooks/use-is-client/index.js +1 -0
  82. package/dist/hooks/use-is-client/use-is-client.cjs +1 -0
  83. package/dist/hooks/use-is-client/use-is-client.d.cts +18 -0
  84. package/dist/hooks/use-is-client/use-is-client.d.ts +18 -0
  85. package/dist/hooks/use-is-client/use-is-client.js +1 -0
  86. package/dist/hooks/use-local-storage/index.cjs +1 -0
  87. package/dist/hooks/use-local-storage/index.d.cts +1 -0
  88. package/dist/hooks/use-local-storage/index.d.ts +1 -0
  89. package/dist/hooks/use-local-storage/index.js +1 -0
  90. package/dist/hooks/use-local-storage/use-local-storage.cjs +1 -0
  91. package/dist/hooks/use-local-storage/use-local-storage.d.cts +38 -0
  92. package/dist/hooks/use-local-storage/use-local-storage.d.ts +38 -0
  93. package/dist/hooks/use-local-storage/use-local-storage.js +1 -0
  94. package/dist/hooks/use-multi-select/index.cjs +1 -0
  95. package/dist/hooks/use-multi-select/index.d.cts +2 -0
  96. package/dist/hooks/use-multi-select/index.d.ts +2 -0
  97. package/dist/hooks/use-multi-select/index.js +1 -0
  98. package/dist/hooks/use-multi-select/use-multi-select.cjs +1 -0
  99. package/dist/hooks/use-multi-select/use-multi-select.d.cts +55 -0
  100. package/dist/hooks/use-multi-select/use-multi-select.d.ts +55 -0
  101. package/dist/hooks/use-multi-select/use-multi-select.js +1 -0
  102. package/dist/hooks/use-popover/index.cjs +1 -0
  103. package/dist/hooks/use-popover/index.d.cts +2 -0
  104. package/dist/hooks/use-popover/index.d.ts +2 -0
  105. package/dist/hooks/use-popover/index.js +1 -0
  106. package/dist/hooks/use-popover/use-popover.cjs +1 -0
  107. package/dist/hooks/use-popover/use-popover.d.cts +35 -0
  108. package/dist/hooks/use-popover/use-popover.d.ts +35 -0
  109. package/dist/hooks/use-popover/use-popover.js +1 -0
  110. package/dist/hooks/use-popover-hover/index.cjs +1 -0
  111. package/dist/hooks/use-popover-hover/index.d.cts +2 -0
  112. package/dist/hooks/use-popover-hover/index.d.ts +2 -0
  113. package/dist/hooks/use-popover-hover/index.js +1 -0
  114. package/dist/hooks/use-popover-hover/use-popover-hover.cjs +1 -0
  115. package/dist/hooks/use-popover-hover/use-popover-hover.d.cts +41 -0
  116. package/dist/hooks/use-popover-hover/use-popover-hover.d.ts +41 -0
  117. package/dist/hooks/use-popover-hover/use-popover-hover.js +1 -0
  118. package/dist/hooks/use-scroll-offset-top/index.cjs +1 -0
  119. package/dist/hooks/use-scroll-offset-top/index.d.cts +2 -0
  120. package/dist/hooks/use-scroll-offset-top/index.d.ts +2 -0
  121. package/dist/hooks/use-scroll-offset-top/index.js +1 -0
  122. package/dist/hooks/use-scroll-offset-top/use-scroll-offset-top.cjs +1 -0
  123. package/dist/hooks/use-scroll-offset-top/use-scroll-offset-top.d.cts +28 -0
  124. package/dist/hooks/use-scroll-offset-top/use-scroll-offset-top.d.ts +28 -0
  125. package/dist/hooks/use-scroll-offset-top/use-scroll-offset-top.js +1 -0
  126. package/dist/hooks/use-set-state/index.cjs +1 -0
  127. package/dist/hooks/use-set-state/index.d.cts +1 -0
  128. package/dist/hooks/use-set-state/index.d.ts +1 -0
  129. package/dist/hooks/use-set-state/index.js +1 -0
  130. package/dist/hooks/use-set-state/use-set-state.cjs +1 -0
  131. package/dist/hooks/use-set-state/use-set-state.d.cts +32 -0
  132. package/dist/hooks/use-set-state/use-set-state.d.ts +32 -0
  133. package/dist/hooks/use-set-state/use-set-state.js +1 -0
  134. package/dist/hooks/use-tabs/index.cjs +1 -0
  135. package/dist/hooks/use-tabs/index.d.cts +2 -0
  136. package/dist/hooks/use-tabs/index.d.ts +2 -0
  137. package/dist/hooks/use-tabs/index.js +1 -0
  138. package/dist/hooks/use-tabs/use-tabs.cjs +1 -0
  139. package/dist/hooks/use-tabs/use-tabs.d.cts +58 -0
  140. package/dist/hooks/use-tabs/use-tabs.d.ts +58 -0
  141. package/dist/hooks/use-tabs/use-tabs.js +1 -0
  142. package/dist/index.cjs +2 -0
  143. package/dist/index.d.cts +31 -0
  144. package/dist/index.d.ts +31 -0
  145. package/dist/index.js +2 -0
  146. package/dist/utils/active-link/active-link.cjs +1 -0
  147. package/dist/utils/active-link/active-link.d.cts +27 -0
  148. package/dist/utils/active-link/active-link.d.ts +27 -0
  149. package/dist/utils/active-link/active-link.js +1 -0
  150. package/dist/utils/active-link/index.cjs +1 -0
  151. package/dist/utils/active-link/index.d.cts +1 -0
  152. package/dist/utils/active-link/index.d.ts +1 -0
  153. package/dist/utils/active-link/index.js +1 -0
  154. package/dist/utils/classes/classes.cjs +1 -0
  155. package/dist/utils/classes/classes.d.cts +25 -0
  156. package/dist/utils/classes/classes.d.ts +25 -0
  157. package/dist/utils/classes/classes.js +1 -0
  158. package/dist/utils/classes/index.cjs +1 -0
  159. package/dist/utils/classes/index.d.cts +1 -0
  160. package/dist/utils/classes/index.d.ts +1 -0
  161. package/dist/utils/classes/index.js +1 -0
  162. package/dist/utils/color/color.cjs +2 -0
  163. package/dist/utils/color/color.d.cts +52 -0
  164. package/dist/utils/color/color.d.ts +52 -0
  165. package/dist/utils/color/color.js +2 -0
  166. package/dist/utils/color/index.cjs +2 -0
  167. package/dist/utils/color/index.d.cts +1 -0
  168. package/dist/utils/color/index.d.ts +1 -0
  169. package/dist/utils/color/index.js +2 -0
  170. package/dist/utils/cookies/cookies.cjs +1 -0
  171. package/dist/utils/cookies/cookies.d.cts +42 -0
  172. package/dist/utils/cookies/cookies.d.ts +42 -0
  173. package/dist/utils/cookies/cookies.js +1 -0
  174. package/dist/utils/cookies/index.cjs +1 -0
  175. package/dist/utils/cookies/index.d.cts +1 -0
  176. package/dist/utils/cookies/index.d.ts +1 -0
  177. package/dist/utils/cookies/index.js +1 -0
  178. package/dist/utils/css-variables/css-variables.cjs +1 -0
  179. package/dist/utils/css-variables/css-variables.d.cts +14 -0
  180. package/dist/utils/css-variables/css-variables.d.ts +14 -0
  181. package/dist/utils/css-variables/css-variables.js +1 -0
  182. package/dist/utils/css-variables/index.cjs +1 -0
  183. package/dist/utils/css-variables/index.d.cts +1 -0
  184. package/dist/utils/css-variables/index.d.ts +1 -0
  185. package/dist/utils/css-variables/index.js +1 -0
  186. package/dist/utils/font/font.cjs +1 -0
  187. package/dist/utils/font/font.d.cts +37 -0
  188. package/dist/utils/font/font.d.ts +37 -0
  189. package/dist/utils/font/font.js +1 -0
  190. package/dist/utils/font/index.cjs +1 -0
  191. package/dist/utils/font/index.d.cts +1 -0
  192. package/dist/utils/font/index.d.ts +1 -0
  193. package/dist/utils/font/index.js +1 -0
  194. package/dist/utils/index.cjs +2 -0
  195. package/dist/utils/index.d.cts +13 -0
  196. package/dist/utils/index.d.ts +13 -0
  197. package/dist/utils/index.js +2 -0
  198. package/dist/utils/local-storage/index.cjs +1 -0
  199. package/dist/utils/local-storage/index.d.cts +1 -0
  200. package/dist/utils/local-storage/index.d.ts +1 -0
  201. package/dist/utils/local-storage/index.js +1 -0
  202. package/dist/utils/local-storage/local-storage.cjs +1 -0
  203. package/dist/utils/local-storage/local-storage.d.cts +43 -0
  204. package/dist/utils/local-storage/local-storage.d.ts +43 -0
  205. package/dist/utils/local-storage/local-storage.js +1 -0
  206. package/dist/utils/object/index.cjs +1 -0
  207. package/dist/utils/object/index.d.cts +1 -0
  208. package/dist/utils/object/index.d.ts +1 -0
  209. package/dist/utils/object/index.js +1 -0
  210. package/dist/utils/object/object.cjs +1 -0
  211. package/dist/utils/object/object.d.cts +26 -0
  212. package/dist/utils/object/object.d.ts +26 -0
  213. package/dist/utils/object/object.js +1 -0
  214. package/dist/utils/refs/index.cjs +1 -0
  215. package/dist/utils/refs/index.d.cts +1 -0
  216. package/dist/utils/refs/index.d.ts +1 -0
  217. package/dist/utils/refs/index.js +1 -0
  218. package/dist/utils/refs/refs.cjs +1 -0
  219. package/dist/utils/refs/refs.d.cts +3 -0
  220. package/dist/utils/refs/refs.d.ts +3 -0
  221. package/dist/utils/refs/refs.js +1 -0
  222. package/dist/utils/right-to-left/index.cjs +1 -0
  223. package/dist/utils/right-to-left/index.d.cts +1 -0
  224. package/dist/utils/right-to-left/index.d.ts +1 -0
  225. package/dist/utils/right-to-left/index.js +1 -0
  226. package/dist/utils/right-to-left/right-to-left.cjs +1 -0
  227. package/dist/utils/right-to-left/right-to-left.d.cts +13 -0
  228. package/dist/utils/right-to-left/right-to-left.d.ts +13 -0
  229. package/dist/utils/right-to-left/right-to-left.js +1 -0
  230. package/dist/utils/transform-number/index.cjs +1 -0
  231. package/dist/utils/transform-number/index.d.cts +1 -0
  232. package/dist/utils/transform-number/index.d.ts +1 -0
  233. package/dist/utils/transform-number/index.js +1 -0
  234. package/dist/utils/transform-number/transform-number.cjs +1 -0
  235. package/dist/utils/transform-number/transform-number.d.cts +31 -0
  236. package/dist/utils/transform-number/transform-number.d.ts +31 -0
  237. package/dist/utils/transform-number/transform-number.js +1 -0
  238. package/dist/utils/url/index.cjs +1 -0
  239. package/dist/utils/url/index.d.cts +1 -0
  240. package/dist/utils/url/index.d.ts +1 -0
  241. package/dist/utils/url/index.js +1 -0
  242. package/dist/utils/url/url.cjs +1 -0
  243. package/dist/utils/url/url.d.cts +74 -0
  244. package/dist/utils/url/url.d.ts +74 -0
  245. package/dist/utils/url/url.js +1 -0
  246. package/dist/utils/uuidv4/index.cjs +1 -0
  247. package/dist/utils/uuidv4/index.d.cts +1 -0
  248. package/dist/utils/uuidv4/index.d.ts +1 -0
  249. package/dist/utils/uuidv4/index.js +1 -0
  250. package/dist/utils/uuidv4/uuidv4.cjs +1 -0
  251. package/dist/utils/uuidv4/uuidv4.d.cts +12 -0
  252. package/dist/utils/uuidv4/uuidv4.d.ts +12 -0
  253. package/dist/utils/uuidv4/uuidv4.js +1 -0
  254. package/package.json +113 -0
@@ -0,0 +1 @@
1
+ "use strict";var o=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var m=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var p=(r,n)=>{for(var e in n)o(r,e,{get:n[e],enumerable:!0})},s=(r,n,e,a)=>{if(n&&typeof n=="object"||typeof n=="function")for(let t of m(n))!f.call(r,t)&&t!==e&&o(r,t,{get:()=>n[t],enumerable:!(a=i(n,t))||a.enumerable});return r};var v=r=>s(o({},"__esModule",{value:!0}),r);var c={};p(c,{parseCssVar:()=>u});module.exports=v(c);function u(r){if(typeof r!="string"||!r.trim())return console.error("Invalid input: CSS value must be a non-empty string"),"";let n=r.match(/var\(\s*(--[\w-]+)(?:\s*,[^)]*)?\s*\)/);return n?n[1]:(console.error(`Invalid CSS variable format: "${r}". Expected format: var(--variable-name)`),"")}0&&(module.exports={parseCssVar});
@@ -0,0 +1 @@
1
+ export { parseCssVar } from './css-variables.cjs';
@@ -0,0 +1 @@
1
+ export { parseCssVar } from './css-variables.js';
@@ -0,0 +1 @@
1
+ function t(r){if(typeof r!="string"||!r.trim())return console.error("Invalid input: CSS value must be a non-empty string"),"";let n=r.match(/var\(\s*(--[\w-]+)(?:\s*,[^)]*)?\s*\)/);return n?n[1]:(console.error(`Invalid CSS variable format: "${r}". Expected format: var(--variable-name)`),"")}export{t as parseCssVar};
@@ -0,0 +1 @@
1
+ "use strict";var n=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var l=(e,o)=>{for(var t in o)n(e,t,{get:o[t],enumerable:!0})},a=(e,o,t,i)=>{if(o&&typeof o=="object"||typeof o=="function")for(let r of p(o))!u.call(e,r)&&r!==t&&n(e,r,{get:()=>o[r],enumerable:!(i=m(o,r))||i.enumerable});return e};var c=e=>a(n({},"__esModule",{value:!0}),e);var b={};l(b,{pxToRem:()=>F,remToPx:()=>x,setFont:()=>g});module.exports=c(b);var s='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"';function g(e){return e?`"${e}", ${s}`:s}function x(e){let o=parseFloat(e);return Math.round(o*16)}function F(e){if(typeof e!="number"||isNaN(e))throw new Error(`Invalid pixel value: ${e}`);return`${e/16}rem`}0&&(module.exports={pxToRem,remToPx,setFont});
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Sets the font family.
3
+ *
4
+ * @param {string} [fontName] - The name of the font to set.
5
+ * @returns {string} - The complete font family string.
6
+ *
7
+ * @example
8
+ * const fontFamily = setFont('CustomFont');
9
+ * console.log(fontFamily); // "CustomFont, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol""
10
+ */
11
+ declare function setFont(fontName?: string): string;
12
+ /**
13
+ * Converts rem to px.
14
+ *
15
+ * @param {string} value - The rem value to convert.
16
+ * @returns {number} - The equivalent value in pixels.
17
+ * @throws {Error} - Throws an error if the rem value is invalid.
18
+ *
19
+ * @example
20
+ * const pixels = remToPx('1.5rem');
21
+ * console.log(pixels); // 24
22
+ */
23
+ declare function remToPx(value: string): number;
24
+ /**
25
+ * Converts px to rem.
26
+ *
27
+ * @param {number} value - The pixel value to convert.
28
+ * @returns {string} - The equivalent value in rem.
29
+ * @throws {Error} - Throws an error if the pixel value is invalid.
30
+ *
31
+ * @example
32
+ * const remValue = pxToRem(24);
33
+ * console.log(remValue); // "1.5rem"
34
+ */
35
+ declare function pxToRem(value: number): string;
36
+
37
+ export { pxToRem, remToPx, setFont };
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Sets the font family.
3
+ *
4
+ * @param {string} [fontName] - The name of the font to set.
5
+ * @returns {string} - The complete font family string.
6
+ *
7
+ * @example
8
+ * const fontFamily = setFont('CustomFont');
9
+ * console.log(fontFamily); // "CustomFont, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol""
10
+ */
11
+ declare function setFont(fontName?: string): string;
12
+ /**
13
+ * Converts rem to px.
14
+ *
15
+ * @param {string} value - The rem value to convert.
16
+ * @returns {number} - The equivalent value in pixels.
17
+ * @throws {Error} - Throws an error if the rem value is invalid.
18
+ *
19
+ * @example
20
+ * const pixels = remToPx('1.5rem');
21
+ * console.log(pixels); // 24
22
+ */
23
+ declare function remToPx(value: string): number;
24
+ /**
25
+ * Converts px to rem.
26
+ *
27
+ * @param {number} value - The pixel value to convert.
28
+ * @returns {string} - The equivalent value in rem.
29
+ * @throws {Error} - Throws an error if the pixel value is invalid.
30
+ *
31
+ * @example
32
+ * const remValue = pxToRem(24);
33
+ * console.log(remValue); // "1.5rem"
34
+ */
35
+ declare function pxToRem(value: number): string;
36
+
37
+ export { pxToRem, remToPx, setFont };
@@ -0,0 +1 @@
1
+ var o='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"';function t(e){return e?`"${e}", ${o}`:o}function n(e){let r=parseFloat(e);return Math.round(r*16)}function i(e){if(typeof e!="number"||isNaN(e))throw new Error(`Invalid pixel value: ${e}`);return`${e/16}rem`}export{i as pxToRem,n as remToPx,t as setFont};
@@ -0,0 +1 @@
1
+ "use strict";var n=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var l=(e,o)=>{for(var t in o)n(e,t,{get:o[t],enumerable:!0})},a=(e,o,t,i)=>{if(o&&typeof o=="object"||typeof o=="function")for(let r of p(o))!u.call(e,r)&&r!==t&&n(e,r,{get:()=>o[r],enumerable:!(i=m(o,r))||i.enumerable});return e};var c=e=>a(n({},"__esModule",{value:!0}),e);var F={};l(F,{pxToRem:()=>g,remToPx:()=>f,setFont:()=>x});module.exports=c(F);var s='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"';function x(e){return e?`"${e}", ${s}`:s}function f(e){let o=parseFloat(e);return Math.round(o*16)}function g(e){if(typeof e!="number"||isNaN(e))throw new Error(`Invalid pixel value: ${e}`);return`${e/16}rem`}0&&(module.exports={pxToRem,remToPx,setFont});
@@ -0,0 +1 @@
1
+ export { pxToRem, remToPx, setFont } from './font.cjs';
@@ -0,0 +1 @@
1
+ export { pxToRem, remToPx, setFont } from './font.js';
@@ -0,0 +1 @@
1
+ var o='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"';function t(e){return e?`"${e}", ${o}`:o}function n(e){let r=parseFloat(e);return Math.round(r*16)}function i(e){if(typeof e!="number"||isNaN(e))throw new Error(`Invalid pixel value: ${e}`);return`${e/16}rem`}export{i as pxToRem,n as remToPx,t as setFont};
@@ -0,0 +1,2 @@
1
+ "use strict";var l=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var T=Object.getOwnPropertyNames;var v=Object.prototype.hasOwnProperty;var C=(r,t)=>{for(var e in t)l(r,e,{get:t[e],enumerable:!0})},I=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of T(t))!v.call(r,o)&&o!==e&&l(r,o,{get:()=>t[o],enumerable:!(n=k(t,o))||n.enumerable});return r};var E=r=>I(l({},"__esModule",{value:!0}),r);var Q={};C(Q,{createPaletteChannel:()=>L,getCookie:()=>B,getStorage:()=>q,hasKeys:()=>V,hasParams:()=>p,hexToRgbChannel:()=>b,isActiveLink:()=>J,isEqualPath:()=>P,isExternalLink:()=>m,localStorageAvailable:()=>y,mergeClasses:()=>j,mergeRefs:()=>A,noRtlFlip:()=>z,parseCssVar:()=>K,pxToRem:()=>U,remToPx:()=>N,removeCookie:()=>M,removeLastSlash:()=>a,removeParams:()=>f,removeStorage:()=>H,safeReturnUrl:()=>R,setCookie:()=>D,setFont:()=>O,setStorage:()=>G,transformNumber:()=>Y,transformValue:()=>g,transformValueOnBlur:()=>S,transformValueOnChange:()=>w,uuidv4:()=>W,varAlpha:()=>F});module.exports=E(Q);var x=require("es-toolkit");function p(r){try{let t=new URL(r,window.location.origin);return Array.from(t.searchParams.keys()).length>0}catch{return!1}}function a(r){return r!=="/"&&r.endsWith("/")?r.slice(0,-1):r}function P(r,t,e={deep:!0}){let n=o=>{try{let{pathname:i,searchParams:s}=new URL(o.trim(),"http://dummy");return e.deep?{pathname:a(i),params:Object.fromEntries(s)}:{pathname:a(i)}}catch{return{pathname:""}}};return(0,x.isEqual)(n(t),n(r))}function f(r){try{let t=new URL(r,window.location.origin);return a(t.pathname)}catch{return r}}function m(r){return/^https?:\/\//i.test(r)}function R(r,t){let e=t??"/";if(!r||typeof window>"u"||!window.location?.origin)return e;try{let n=new URL(r,window.location.origin),o=n.origin===window.location.origin,i=n.pathname.startsWith("/")&&!n.pathname.startsWith("//"),s=/^\/:+$/.test(n.pathname),u=n.pathname==="/"&&!n.search&&n.hash;return o&&i&&!s&&!u?`${n.pathname}${n.search}${n.hash}`:e}catch{return r.startsWith("/")&&!r.startsWith("//")?r:e}}function A(r){return t=>{if(r.length!==0)for(let e of r)e&&(typeof e=="function"?e(t):"current"in e&&(e.current=t))}}var h='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"';function O(r){return r?`"${r}", ${h}`:h}function N(r){let t=parseFloat(r);return Math.round(t*16)}function U(r){if(typeof r!="number"||isNaN(r))throw new Error(`Invalid pixel value: ${r}`);return`${r/16}rem`}function b(r){if(!r)throw new Error("Hex color is undefined!");if(!/^#[0-9A-F]{6}$/i.test(r))throw new Error(`Invalid hex color: ${r}`);let t=parseInt(r.substring(1,3),16),e=parseInt(r.substring(3,5),16),n=parseInt(r.substring(5,7),16);return`${t} ${e} ${n}`}function L(r){let t={};return Object.entries(r).forEach(([e,n])=>{n&&(t[`${e}Channel`]=b(n))}),{...r,...t}}function _(r,t){let e=i=>i.includes("var(--"),n=i=>i.trim().endsWith("%"),o={invalid:`[Alpha]: Invalid opacity "${r}" for ${t}.`,range:"Must be a number between 0 and 1 (e.g., 0.48).",format:'Must be a percentage (e.g., "48%") or CSS variable (e.g., "var(--opacity)").'};if(typeof r=="string"){if(n(r))return r;if(e(r))return`calc(${r} * 100%)`;let i=parseFloat(r.trim());if(!isNaN(i)&&i>=0&&i<=1)return`${Number((i*100).toFixed(2))}%`;throw new Error(`${o.invalid} ${o.format}`)}if(typeof r=="number"){if(r>=0&&r<=1)return`${Number((r*100).toFixed(2))}%`;throw new Error(`${o.invalid} ${o.range}`)}throw new Error(`${o.invalid}`)}function F(r,t=1){if(!r?.trim())throw new Error("[Alpha]: Color is undefined or empty!");if(r.startsWith("#")||r.startsWith("rgb")||r.startsWith("rgba")||!r.includes("var")&&r.includes("Channel"))throw new Error([`[Alpha]: Unsupported color format "${r}"`,"\u2705 Supported formats:",'- RGB channels: "0 184 217"','- CSS variables with "Channel" prefix: "var(--palette-common-blackChannel, #000000)"',"\u274C Unsupported formats:",'- Hex: "#00B8D9"','- RGB: "rgb(0, 184, 217)"','- RGBA: "rgba(0, 184, 217, 1)"'].join(`
2
+ `));let n=_(t,r);return r.toLowerCase()==="currentcolor"?`color-mix(in srgb, currentColor ${n}, transparent)`:`rgba(${r} / ${n})`}function V(r,t){return!r||!t.length||typeof r!="object"?!1:t.every(e=>e in r)}function W(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,r=>{let t=Math.random()*16|0;return(r==="x"?t:t&3|8).toString(16)})}function j(r,t){let e=r?Array.isArray(r)?r:[r]:[],n=Object.entries(t||{}).filter(([o,i])=>i!==void 0&&i!==!1).map(([o,i])=>Array.isArray(i)?i[0]?i[1]:"":i?o:"").filter(Boolean);return[...e.filter(Boolean),...n].join(" ")}function B(r){if(!r||typeof r!="string")return console.warn("Invalid cookie key provided"),null;try{let t=`${r}=`,o=decodeURIComponent(document.cookie).split("; ").find(s=>s.startsWith(t));if(!o)return null;let i=o.substring(t.length);try{return JSON.parse(i)}catch{return i}}catch(t){return console.error("Error retrieving cookie:",t),null}}function D(r,t,e){if(!r||typeof r!="string"){console.error("Invalid cookie key provided");return}let{daysUntilExpiration:n=0,sameSite:o="Strict",secure:i=!1,path:s="/",domain:u}=e??{};try{let c=encodeURIComponent(typeof t=="string"?t:JSON.stringify(t)),d=[`${r}=${c}`,`path=${s}`,o&&`SameSite=${o}`,i&&"Secure",u&&`domain=${u}`];if(n>0){let $=new Date(Date.now()+n*24*60*60*1e3);d.push(`expires=${$.toUTCString()}`)}document.cookie=d.filter(Boolean).join("; ")}catch(c){console.error("Error setting cookie:",c)}}function M(r,t){if(!r||typeof r!="string"){console.error("Invalid cookie key provided");return}let{path:e="/",domain:n}=t??{};try{let o=[`${r}=`,"expires=Thu, 01 Jan 1970 00:00:00 GMT",`path=${e}`,n&&`domain=${n}`,"Secure"];document.cookie=o.filter(Boolean).join("; ")}catch(o){console.error("Error removing cookie:",o)}}function J(r,t,e=!0){if(!r||!t)return console.warn("isActiveLink: pathname or itemPath is empty!"),!1;if(t.startsWith("#")||m(t))return!1;let n=a(r),o=a(f(t));return e||p(t)?n===o||n.startsWith(`${o}/`)||n.startsWith(`${o}?`):n===o}function q(r,t){if(!y())return t??null;let e=localStorage.getItem(r);if(e!=="undefined"){if(e)try{return JSON.parse(e)}catch{return e??t??null}return t??null}}function G(r,t){try{let e=JSON.stringify(t);window.localStorage.setItem(r,e)}catch(e){console.error("Error while setting storage:",e)}}function H(r){try{window.localStorage.removeItem(r)}catch(t){console.error("Error while removing from storage:",t)}}function y(){try{let r="__some_random_key_you_are_not_going_to_use__";return window.localStorage.setItem(r,r),window.localStorage.removeItem(r),!0}catch{return!1}}function K(r){if(typeof r!="string"||!r.trim())return console.error("Invalid input: CSS value must be a non-empty string"),"";let t=r.match(/var\(\s*(--[\w-]+)(?:\s*,[^)]*)?\s*\)/);return t?t[1]:(console.error(`Invalid CSS variable format: "${r}". Expected format: var(--variable-name)`),"")}function z(r){if(typeof r!="string")return console.warn("Invalid CSS value provided"),"";let t=r.trim();return t?t.includes("/* @noflip */")?t:`${t} /* @noflip */`:(console.warn("Empty CSS value provided"),"")}function g(r,t=""){return r==null||typeof r=="number"&&Number.isNaN(r)?t:r.toString()}function w(r){let e=g(r).replace(/[^0-9.]/g,""),[n,...o]=e.split(".");return o.length>0?`${n}.${o.join("")}`:n}function S(r,t=""){if(r==null||typeof r=="number"&&Number.isNaN(r))return t;let e=parseFloat(r.toString());return Number.isNaN(e)?t:e}var Y={onChange:w,onBlur:S,value:g};0&&(module.exports={createPaletteChannel,getCookie,getStorage,hasKeys,hasParams,hexToRgbChannel,isActiveLink,isEqualPath,isExternalLink,localStorageAvailable,mergeClasses,mergeRefs,noRtlFlip,parseCssVar,pxToRem,remToPx,removeCookie,removeLastSlash,removeParams,removeStorage,safeReturnUrl,setCookie,setFont,setStorage,transformNumber,transformValue,transformValueOnBlur,transformValueOnChange,uuidv4,varAlpha});
@@ -0,0 +1,13 @@
1
+ export { EqualPathOptions, hasParams, isEqualPath, isExternalLink, removeLastSlash, removeParams, safeReturnUrl } from './url/url.cjs';
2
+ export { mergeRefs } from './refs/refs.cjs';
3
+ export { pxToRem, remToPx, setFont } from './font/font.cjs';
4
+ export { ChannelPalette, InputPalette, createPaletteChannel, hexToRgbChannel, varAlpha } from './color/color.cjs';
5
+ export { hasKeys } from './object/object.cjs';
6
+ export { uuidv4 } from './uuidv4/uuidv4.cjs';
7
+ export { StateProps, mergeClasses } from './classes/classes.cjs';
8
+ export { CookieOptions, getCookie, removeCookie, setCookie } from './cookies/cookies.cjs';
9
+ export { isActiveLink } from './active-link/active-link.cjs';
10
+ export { getStorage, localStorageAvailable, removeStorage, setStorage } from './local-storage/local-storage.cjs';
11
+ export { parseCssVar } from './css-variables/css-variables.cjs';
12
+ export { noRtlFlip } from './right-to-left/right-to-left.cjs';
13
+ export { InputValue, transformNumber, transformValue, transformValueOnBlur, transformValueOnChange } from './transform-number/transform-number.cjs';
@@ -0,0 +1,13 @@
1
+ export { EqualPathOptions, hasParams, isEqualPath, isExternalLink, removeLastSlash, removeParams, safeReturnUrl } from './url/url.js';
2
+ export { mergeRefs } from './refs/refs.js';
3
+ export { pxToRem, remToPx, setFont } from './font/font.js';
4
+ export { ChannelPalette, InputPalette, createPaletteChannel, hexToRgbChannel, varAlpha } from './color/color.js';
5
+ export { hasKeys } from './object/object.js';
6
+ export { uuidv4 } from './uuidv4/uuidv4.js';
7
+ export { StateProps, mergeClasses } from './classes/classes.js';
8
+ export { CookieOptions, getCookie, removeCookie, setCookie } from './cookies/cookies.js';
9
+ export { isActiveLink } from './active-link/active-link.js';
10
+ export { getStorage, localStorageAvailable, removeStorage, setStorage } from './local-storage/local-storage.js';
11
+ export { parseCssVar } from './css-variables/css-variables.js';
12
+ export { noRtlFlip } from './right-to-left/right-to-left.js';
13
+ export { InputValue, transformNumber, transformValue, transformValueOnBlur, transformValueOnChange } from './transform-number/transform-number.js';
@@ -0,0 +1,2 @@
1
+ import{isEqual as h}from"es-toolkit";function p(r){try{let t=new URL(r,window.location.origin);return Array.from(t.searchParams.keys()).length>0}catch{return!1}}function a(r){return r!=="/"&&r.endsWith("/")?r.slice(0,-1):r}function T(r,t,e={deep:!0}){let n=o=>{try{let{pathname:i,searchParams:s}=new URL(o.trim(),"http://dummy");return e.deep?{pathname:a(i),params:Object.fromEntries(s)}:{pathname:a(i)}}catch{return{pathname:""}}};return h(n(t),n(r))}function f(r){try{let t=new URL(r,window.location.origin);return a(t.pathname)}catch{return r}}function m(r){return/^https?:\/\//i.test(r)}function v(r,t){let e=t??"/";if(!r||typeof window>"u"||!window.location?.origin)return e;try{let n=new URL(r,window.location.origin),o=n.origin===window.location.origin,i=n.pathname.startsWith("/")&&!n.pathname.startsWith("//"),s=/^\/:+$/.test(n.pathname),u=n.pathname==="/"&&!n.search&&n.hash;return o&&i&&!s&&!u?`${n.pathname}${n.search}${n.hash}`:e}catch{return r.startsWith("/")&&!r.startsWith("//")?r:e}}function I(r){return t=>{if(r.length!==0)for(let e of r)e&&(typeof e=="function"?e(t):"current"in e&&(e.current=t))}}var g='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"';function P(r){return r?`"${r}", ${g}`:g}function R(r){let t=parseFloat(r);return Math.round(t*16)}function A(r){if(typeof r!="number"||isNaN(r))throw new Error(`Invalid pixel value: ${r}`);return`${r/16}rem`}function b(r){if(!r)throw new Error("Hex color is undefined!");if(!/^#[0-9A-F]{6}$/i.test(r))throw new Error(`Invalid hex color: ${r}`);let t=parseInt(r.substring(1,3),16),e=parseInt(r.substring(3,5),16),n=parseInt(r.substring(5,7),16);return`${t} ${e} ${n}`}function N(r){let t={};return Object.entries(r).forEach(([e,n])=>{n&&(t[`${e}Channel`]=b(n))}),{...r,...t}}function y(r,t){let e=i=>i.includes("var(--"),n=i=>i.trim().endsWith("%"),o={invalid:`[Alpha]: Invalid opacity "${r}" for ${t}.`,range:"Must be a number between 0 and 1 (e.g., 0.48).",format:'Must be a percentage (e.g., "48%") or CSS variable (e.g., "var(--opacity)").'};if(typeof r=="string"){if(n(r))return r;if(e(r))return`calc(${r} * 100%)`;let i=parseFloat(r.trim());if(!isNaN(i)&&i>=0&&i<=1)return`${Number((i*100).toFixed(2))}%`;throw new Error(`${o.invalid} ${o.format}`)}if(typeof r=="number"){if(r>=0&&r<=1)return`${Number((r*100).toFixed(2))}%`;throw new Error(`${o.invalid} ${o.range}`)}throw new Error(`${o.invalid}`)}function U(r,t=1){if(!r?.trim())throw new Error("[Alpha]: Color is undefined or empty!");if(r.startsWith("#")||r.startsWith("rgb")||r.startsWith("rgba")||!r.includes("var")&&r.includes("Channel"))throw new Error([`[Alpha]: Unsupported color format "${r}"`,"\u2705 Supported formats:",'- RGB channels: "0 184 217"','- CSS variables with "Channel" prefix: "var(--palette-common-blackChannel, #000000)"',"\u274C Unsupported formats:",'- Hex: "#00B8D9"','- RGB: "rgb(0, 184, 217)"','- RGBA: "rgba(0, 184, 217, 1)"'].join(`
2
+ `));let n=y(t,r);return r.toLowerCase()==="currentcolor"?`color-mix(in srgb, currentColor ${n}, transparent)`:`rgba(${r} / ${n})`}function _(r,t){return!r||!t.length||typeof r!="object"?!1:t.every(e=>e in r)}function V(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,r=>{let t=Math.random()*16|0;return(r==="x"?t:t&3|8).toString(16)})}function j(r,t){let e=r?Array.isArray(r)?r:[r]:[],n=Object.entries(t||{}).filter(([o,i])=>i!==void 0&&i!==!1).map(([o,i])=>Array.isArray(i)?i[0]?i[1]:"":i?o:"").filter(Boolean);return[...e.filter(Boolean),...n].join(" ")}function D(r){if(!r||typeof r!="string")return console.warn("Invalid cookie key provided"),null;try{let t=`${r}=`,o=decodeURIComponent(document.cookie).split("; ").find(s=>s.startsWith(t));if(!o)return null;let i=o.substring(t.length);try{return JSON.parse(i)}catch{return i}}catch(t){return console.error("Error retrieving cookie:",t),null}}function M(r,t,e){if(!r||typeof r!="string"){console.error("Invalid cookie key provided");return}let{daysUntilExpiration:n=0,sameSite:o="Strict",secure:i=!1,path:s="/",domain:u}=e??{};try{let c=encodeURIComponent(typeof t=="string"?t:JSON.stringify(t)),l=[`${r}=${c}`,`path=${s}`,o&&`SameSite=${o}`,i&&"Secure",u&&`domain=${u}`];if(n>0){let x=new Date(Date.now()+n*24*60*60*1e3);l.push(`expires=${x.toUTCString()}`)}document.cookie=l.filter(Boolean).join("; ")}catch(c){console.error("Error setting cookie:",c)}}function J(r,t){if(!r||typeof r!="string"){console.error("Invalid cookie key provided");return}let{path:e="/",domain:n}=t??{};try{let o=[`${r}=`,"expires=Thu, 01 Jan 1970 00:00:00 GMT",`path=${e}`,n&&`domain=${n}`,"Secure"];document.cookie=o.filter(Boolean).join("; ")}catch(o){console.error("Error removing cookie:",o)}}function H(r,t,e=!0){if(!r||!t)return console.warn("isActiveLink: pathname or itemPath is empty!"),!1;if(t.startsWith("#")||m(t))return!1;let n=a(r),o=a(f(t));return e||p(t)?n===o||n.startsWith(`${o}/`)||n.startsWith(`${o}?`):n===o}function z(r,t){if(!w())return t??null;let e=localStorage.getItem(r);if(e!=="undefined"){if(e)try{return JSON.parse(e)}catch{return e??t??null}return t??null}}function Y(r,t){try{let e=JSON.stringify(t);window.localStorage.setItem(r,e)}catch(e){console.error("Error while setting storage:",e)}}function Q(r){try{window.localStorage.removeItem(r)}catch(t){console.error("Error while removing from storage:",t)}}function w(){try{let r="__some_random_key_you_are_not_going_to_use__";return window.localStorage.setItem(r,r),window.localStorage.removeItem(r),!0}catch{return!1}}function Z(r){if(typeof r!="string"||!r.trim())return console.error("Invalid input: CSS value must be a non-empty string"),"";let t=r.match(/var\(\s*(--[\w-]+)(?:\s*,[^)]*)?\s*\)/);return t?t[1]:(console.error(`Invalid CSS variable format: "${r}". Expected format: var(--variable-name)`),"")}function tr(r){if(typeof r!="string")return console.warn("Invalid CSS value provided"),"";let t=r.trim();return t?t.includes("/* @noflip */")?t:`${t} /* @noflip */`:(console.warn("Empty CSS value provided"),"")}function d(r,t=""){return r==null||typeof r=="number"&&Number.isNaN(r)?t:r.toString()}function S(r){let e=d(r).replace(/[^0-9.]/g,""),[n,...o]=e.split(".");return o.length>0?`${n}.${o.join("")}`:n}function $(r,t=""){if(r==null||typeof r=="number"&&Number.isNaN(r))return t;let e=parseFloat(r.toString());return Number.isNaN(e)?t:e}var nr={onChange:S,onBlur:$,value:d};export{N as createPaletteChannel,D as getCookie,z as getStorage,_ as hasKeys,p as hasParams,b as hexToRgbChannel,H as isActiveLink,T as isEqualPath,m as isExternalLink,w as localStorageAvailable,j as mergeClasses,I as mergeRefs,tr as noRtlFlip,Z as parseCssVar,A as pxToRem,R as remToPx,J as removeCookie,a as removeLastSlash,f as removeParams,Q as removeStorage,v as safeReturnUrl,M as setCookie,P as setFont,Y as setStorage,nr as transformNumber,d as transformValue,$ as transformValueOnBlur,S as transformValueOnChange,V as uuidv4,U as varAlpha};
@@ -0,0 +1 @@
1
+ "use strict";var n=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var g=(r,e)=>{for(var o in e)n(r,o,{get:e[o],enumerable:!0})},u=(r,e,o,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of s(e))!c.call(r,t)&&t!==o&&n(r,t,{get:()=>e[t],enumerable:!(a=l(e,t))||a.enumerable});return r};var d=r=>u(n({},"__esModule",{value:!0}),r);var w={};g(w,{getStorage:()=>m,localStorageAvailable:()=>i,removeStorage:()=>_,setStorage:()=>f});module.exports=d(w);function m(r,e){if(!i())return e??null;let o=localStorage.getItem(r);if(o!=="undefined"){if(o)try{return JSON.parse(o)}catch{return o??e??null}return e??null}}function f(r,e){try{let o=JSON.stringify(e);window.localStorage.setItem(r,o)}catch(o){console.error("Error while setting storage:",o)}}function _(r){try{window.localStorage.removeItem(r)}catch(e){console.error("Error while removing from storage:",e)}}function i(){try{let r="__some_random_key_you_are_not_going_to_use__";return window.localStorage.setItem(r,r),window.localStorage.removeItem(r),!0}catch{return!1}}0&&(module.exports={getStorage,localStorageAvailable,removeStorage,setStorage});
@@ -0,0 +1 @@
1
+ export { getStorage, localStorageAvailable, removeStorage, setStorage } from './local-storage.cjs';
@@ -0,0 +1 @@
1
+ export { getStorage, localStorageAvailable, removeStorage, setStorage } from './local-storage.js';
@@ -0,0 +1 @@
1
+ function n(r,o){if(!t())return o??null;let e=localStorage.getItem(r);if(e!=="undefined"){if(e)try{return JSON.parse(e)}catch{return e??o??null}return o??null}}function a(r,o){try{let e=JSON.stringify(o);window.localStorage.setItem(r,e)}catch(e){console.error("Error while setting storage:",e)}}function i(r){try{window.localStorage.removeItem(r)}catch(o){console.error("Error while removing from storage:",o)}}function t(){try{let r="__some_random_key_you_are_not_going_to_use__";return window.localStorage.setItem(r,r),window.localStorage.removeItem(r),!0}catch{return!1}}export{n as getStorage,t as localStorageAvailable,i as removeStorage,a as setStorage};
@@ -0,0 +1 @@
1
+ "use strict";var n=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var g=(r,e)=>{for(var o in e)n(r,o,{get:e[o],enumerable:!0})},u=(r,e,o,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of s(e))!c.call(r,t)&&t!==o&&n(r,t,{get:()=>e[t],enumerable:!(a=l(e,t))||a.enumerable});return r};var d=r=>u(n({},"__esModule",{value:!0}),r);var w={};g(w,{getStorage:()=>m,localStorageAvailable:()=>i,removeStorage:()=>f,setStorage:()=>_});module.exports=d(w);function m(r,e){if(!i())return e??null;let o=localStorage.getItem(r);if(o!=="undefined"){if(o)try{return JSON.parse(o)}catch{return o??e??null}return e??null}}function _(r,e){try{let o=JSON.stringify(e);window.localStorage.setItem(r,o)}catch(o){console.error("Error while setting storage:",o)}}function f(r){try{window.localStorage.removeItem(r)}catch(e){console.error("Error while removing from storage:",e)}}function i(){try{let r="__some_random_key_you_are_not_going_to_use__";return window.localStorage.setItem(r,r),window.localStorage.removeItem(r),!0}catch{return!1}}0&&(module.exports={getStorage,localStorageAvailable,removeStorage,setStorage});
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Retrieves a value from local storage by key.
3
+ *
4
+ * @param {string} key - The key of the item to retrieve.
5
+ * @returns {any | null} - The parsed value of the item, or null if not found or an error occurs.
6
+ *
7
+ * @example
8
+ * const user = getStorage('user');
9
+ * console.log(user); // { name: 'John', age: 30 }
10
+ */
11
+ declare function getStorage<T>(key: string, defaultValue?: T): T | null | undefined;
12
+ /**
13
+ * Sets a value in local storage with a specified key.
14
+ *
15
+ * @template T
16
+ * @param {string} key - The key of the item to set.
17
+ * @param {T} value - The value of the item to set.
18
+ *
19
+ * @example
20
+ * setStorage('user', { name: 'John', age: 30 });
21
+ */
22
+ declare function setStorage<T>(key: string, value: T): void;
23
+ /**
24
+ * Removes an item from local storage by key.
25
+ *
26
+ * @param {string} key - The key of the item to remove.
27
+ *
28
+ * @example
29
+ * removeStorage('user');
30
+ */
31
+ declare function removeStorage(key: string): void;
32
+ /**
33
+ * Checks if local storage is available.
34
+ *
35
+ * @returns {boolean} - True if local storage is available, false otherwise.
36
+ *
37
+ * @example
38
+ * const isAvailable = localStorageAvailable();
39
+ * console.log(isAvailable); // true or false
40
+ */
41
+ declare function localStorageAvailable(): boolean;
42
+
43
+ export { getStorage, localStorageAvailable, removeStorage, setStorage };
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Retrieves a value from local storage by key.
3
+ *
4
+ * @param {string} key - The key of the item to retrieve.
5
+ * @returns {any | null} - The parsed value of the item, or null if not found or an error occurs.
6
+ *
7
+ * @example
8
+ * const user = getStorage('user');
9
+ * console.log(user); // { name: 'John', age: 30 }
10
+ */
11
+ declare function getStorage<T>(key: string, defaultValue?: T): T | null | undefined;
12
+ /**
13
+ * Sets a value in local storage with a specified key.
14
+ *
15
+ * @template T
16
+ * @param {string} key - The key of the item to set.
17
+ * @param {T} value - The value of the item to set.
18
+ *
19
+ * @example
20
+ * setStorage('user', { name: 'John', age: 30 });
21
+ */
22
+ declare function setStorage<T>(key: string, value: T): void;
23
+ /**
24
+ * Removes an item from local storage by key.
25
+ *
26
+ * @param {string} key - The key of the item to remove.
27
+ *
28
+ * @example
29
+ * removeStorage('user');
30
+ */
31
+ declare function removeStorage(key: string): void;
32
+ /**
33
+ * Checks if local storage is available.
34
+ *
35
+ * @returns {boolean} - True if local storage is available, false otherwise.
36
+ *
37
+ * @example
38
+ * const isAvailable = localStorageAvailable();
39
+ * console.log(isAvailable); // true or false
40
+ */
41
+ declare function localStorageAvailable(): boolean;
42
+
43
+ export { getStorage, localStorageAvailable, removeStorage, setStorage };
@@ -0,0 +1 @@
1
+ function n(r,o){if(!t())return o??null;let e=localStorage.getItem(r);if(e!=="undefined"){if(e)try{return JSON.parse(e)}catch{return e??o??null}return o??null}}function a(r,o){try{let e=JSON.stringify(o);window.localStorage.setItem(r,e)}catch(e){console.error("Error while setting storage:",e)}}function i(r){try{window.localStorage.removeItem(r)}catch(o){console.error("Error while removing from storage:",o)}}function t(){try{let r="__some_random_key_you_are_not_going_to_use__";return window.localStorage.setItem(r,r),window.localStorage.removeItem(r),!0}catch{return!1}}export{n as getStorage,t as localStorageAvailable,i as removeStorage,a as setStorage};
@@ -0,0 +1 @@
1
+ "use strict";var f=Object.defineProperty;var i=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var a=(n,e)=>{for(var r in e)f(n,r,{get:e[r],enumerable:!0})},p=(n,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of l(e))!u.call(n,t)&&t!==r&&f(n,t,{get:()=>e[t],enumerable:!(o=i(e,t))||o.enumerable});return n};var s=n=>p(f({},"__esModule",{value:!0}),n);var T={};a(T,{hasKeys:()=>y});module.exports=s(T);function y(n,e){return!n||!e.length||typeof n!="object"?!1:e.every(r=>r in n)}0&&(module.exports={hasKeys});
@@ -0,0 +1 @@
1
+ export { hasKeys } from './object.cjs';
@@ -0,0 +1 @@
1
+ export { hasKeys } from './object.js';
@@ -0,0 +1 @@
1
+ function t(e,n){return!e||!n.length||typeof e!="object"?!1:n.every(r=>r in e)}export{t as hasKeys};
@@ -0,0 +1 @@
1
+ "use strict";var f=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var o=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var a=(n,e)=>{for(var t in e)f(n,t,{get:e[t],enumerable:!0})},s=(n,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of o(e))!u.call(n,r)&&r!==t&&f(n,r,{get:()=>e[r],enumerable:!(i=l(e,r))||i.enumerable});return n};var y=n=>s(f({},"__esModule",{value:!0}),n);var c={};a(c,{hasKeys:()=>T});module.exports=y(c);function T(n,e){return!n||!e.length||typeof n!="object"?!1:e.every(t=>t in n)}0&&(module.exports={hasKeys});
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Checks if the given object contains all the specified keys.
3
+ *
4
+ * @template T - The type of the object.
5
+ * @param {T} obj - The object to check.
6
+ * @param {Array<keyof T>} keys - An array of keys to check for in the object.
7
+ * @returns {boolean} - Returns true if the object contains all the specified keys, otherwise false.
8
+ *
9
+ * @example
10
+ * const settings = {
11
+ * fontFamily: 'Arial',
12
+ * compactLayout: true,
13
+ * direction: 'ltr',
14
+ * colorScheme: 'light',
15
+ * contrast: 'default',
16
+ * navColor: 'integrate',
17
+ * navLayout: 'vertical',
18
+ * primaryColor: 'blue',
19
+ *};
20
+ *
21
+ * console.log(hasKeys(settings, ['fontFamily', 'direction'])); // true
22
+ * console.log(hasKeys(settings, ['test'])); // false
23
+ */
24
+ declare function hasKeys<T>(obj: T | null | undefined, keys: (keyof T | string)[]): boolean;
25
+
26
+ export { hasKeys };
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Checks if the given object contains all the specified keys.
3
+ *
4
+ * @template T - The type of the object.
5
+ * @param {T} obj - The object to check.
6
+ * @param {Array<keyof T>} keys - An array of keys to check for in the object.
7
+ * @returns {boolean} - Returns true if the object contains all the specified keys, otherwise false.
8
+ *
9
+ * @example
10
+ * const settings = {
11
+ * fontFamily: 'Arial',
12
+ * compactLayout: true,
13
+ * direction: 'ltr',
14
+ * colorScheme: 'light',
15
+ * contrast: 'default',
16
+ * navColor: 'integrate',
17
+ * navLayout: 'vertical',
18
+ * primaryColor: 'blue',
19
+ *};
20
+ *
21
+ * console.log(hasKeys(settings, ['fontFamily', 'direction'])); // true
22
+ * console.log(hasKeys(settings, ['test'])); // false
23
+ */
24
+ declare function hasKeys<T>(obj: T | null | undefined, keys: (keyof T | string)[]): boolean;
25
+
26
+ export { hasKeys };
@@ -0,0 +1 @@
1
+ function r(e,n){return!e||!n.length||typeof e!="object"?!1:n.every(t=>t in e)}export{r as hasKeys};
@@ -0,0 +1 @@
1
+ "use strict";var r=Object.defineProperty;var o=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var l=(n,e)=>{for(var t in e)r(n,t,{get:e[t],enumerable:!0})},R=(n,e,t,c)=>{if(e&&typeof e=="object"||typeof e=="function")for(let f of u(e))!i.call(n,f)&&f!==t&&r(n,f,{get:()=>e[f],enumerable:!(c=o(e,f))||c.enumerable});return n};var a=n=>R(r({},"__esModule",{value:!0}),n);var p={};l(p,{mergeRefs:()=>T});module.exports=a(p);function T(n){return e=>{if(n.length!==0)for(let t of n)t&&(typeof t=="function"?t(e):"current"in t&&(t.current=e))}}0&&(module.exports={mergeRefs});
@@ -0,0 +1 @@
1
+ export { mergeRefs } from './refs.cjs';
@@ -0,0 +1 @@
1
+ export { mergeRefs } from './refs.js';
@@ -0,0 +1 @@
1
+ function f(n){return t=>{if(n.length!==0)for(let e of n)e&&(typeof e=="function"?e(t):"current"in e&&(e.current=t))}}export{f as mergeRefs};
@@ -0,0 +1 @@
1
+ "use strict";var c=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var o=(n,e)=>{for(var t in e)c(n,t,{get:e[t],enumerable:!0})},R=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let f of i(e))!l.call(n,f)&&f!==t&&c(n,f,{get:()=>e[f],enumerable:!(r=u(e,f))||r.enumerable});return n};var a=n=>R(c({},"__esModule",{value:!0}),n);var s={};o(s,{mergeRefs:()=>T});module.exports=a(s);function T(n){return e=>{if(n.length!==0)for(let t of n)t&&(typeof t=="function"?t(e):"current"in t&&(t.current=e))}}0&&(module.exports={mergeRefs});
@@ -0,0 +1,3 @@
1
+ declare function mergeRefs<T>(refs: (React.Ref<T> | undefined | null)[]): React.RefCallback<T>;
2
+
3
+ export { mergeRefs };
@@ -0,0 +1,3 @@
1
+ declare function mergeRefs<T>(refs: (React.Ref<T> | undefined | null)[]): React.RefCallback<T>;
2
+
3
+ export { mergeRefs };
@@ -0,0 +1 @@
1
+ function f(n){return t=>{if(n.length!==0)for(let e of n)e&&(typeof e=="function"?e(t):"current"in e&&(e.current=t))}}export{f as mergeRefs};
@@ -0,0 +1 @@
1
+ "use strict";var t=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var u=(r,n)=>{for(var i in n)t(r,i,{get:n[i],enumerable:!0})},d=(r,n,i,e)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of p(n))!f.call(r,o)&&o!==i&&t(r,o,{get:()=>n[o],enumerable:!(e=l(n,o))||e.enumerable});return r};var m=r=>d(t({},"__esModule",{value:!0}),r);var a={};u(a,{noRtlFlip:()=>v});module.exports=m(a);function v(r){if(typeof r!="string")return console.warn("Invalid CSS value provided"),"";let n=r.trim();return n?n.includes("/* @noflip */")?n:`${n} /* @noflip */`:(console.warn("Empty CSS value provided"),"")}0&&(module.exports={noRtlFlip});
@@ -0,0 +1 @@
1
+ export { noRtlFlip } from './right-to-left.cjs';
@@ -0,0 +1 @@
1
+ export { noRtlFlip } from './right-to-left.js';
@@ -0,0 +1 @@
1
+ function o(r){if(typeof r!="string")return console.warn("Invalid CSS value provided"),"";let n=r.trim();return n?n.includes("/* @noflip */")?n:`${n} /* @noflip */`:(console.warn("Empty CSS value provided"),"")}export{o as noRtlFlip};
@@ -0,0 +1 @@
1
+ "use strict";var t=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var d=(r,n)=>{for(var o in n)t(r,o,{get:n[o],enumerable:!0})},f=(r,n,o,e)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of p(n))!u.call(r,i)&&i!==o&&t(r,i,{get:()=>n[i],enumerable:!(e=l(n,i))||e.enumerable});return r};var v=r=>f(t({},"__esModule",{value:!0}),r);var c={};d(c,{noRtlFlip:()=>a});module.exports=v(c);function a(r){if(typeof r!="string")return console.warn("Invalid CSS value provided"),"";let n=r.trim();return n?n.includes("/* @noflip */")?n:`${n} /* @noflip */`:(console.warn("Empty CSS value provided"),"")}0&&(module.exports={noRtlFlip});
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Prevents automatic RTL (right-to-left) flipping of a CSS declaration
3
+ * by appending the `/* @noflip *\/` comment.
4
+ *
5
+ * @param {string} cssValue - A CSS declaration string (e.g., "margin-left: 10px;").
6
+ * @returns {string} The same declaration string with the `/* @noflip *\/` comment appended.
7
+ *
8
+ * @example
9
+ * noRtlFlip('margin-left: 10px;') // 'margin-left: 10px; /* @noflip *\/'
10
+ */
11
+ declare function noRtlFlip(cssValue: unknown): string;
12
+
13
+ export { noRtlFlip };
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Prevents automatic RTL (right-to-left) flipping of a CSS declaration
3
+ * by appending the `/* @noflip *\/` comment.
4
+ *
5
+ * @param {string} cssValue - A CSS declaration string (e.g., "margin-left: 10px;").
6
+ * @returns {string} The same declaration string with the `/* @noflip *\/` comment appended.
7
+ *
8
+ * @example
9
+ * noRtlFlip('margin-left: 10px;') // 'margin-left: 10px; /* @noflip *\/'
10
+ */
11
+ declare function noRtlFlip(cssValue: unknown): string;
12
+
13
+ export { noRtlFlip };
@@ -0,0 +1 @@
1
+ function i(r){if(typeof r!="string")return console.warn("Invalid CSS value provided"),"";let n=r.trim();return n?n.includes("/* @noflip */")?n:`${n} /* @noflip */`:(console.warn("Empty CSS value provided"),"")}export{i as noRtlFlip};
@@ -0,0 +1 @@
1
+ "use strict";var i=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var l=(n,r)=>{for(var t in r)i(n,t,{get:r[t],enumerable:!0})},p=(n,r,t,u)=>{if(r&&typeof r=="object"||typeof r=="function")for(let e of f(r))!g.call(n,e)&&e!==t&&i(n,e,{get:()=>r[e],enumerable:!(u=m(r,e))||u.enumerable});return n};var c=n=>p(i({},"__esModule",{value:!0}),n);var N={};l(N,{transformNumber:()=>b,transformValue:()=>o,transformValueOnBlur:()=>a,transformValueOnChange:()=>s});module.exports=c(N);function o(n,r=""){return n==null||typeof n=="number"&&Number.isNaN(n)?r:n.toString()}function s(n){let t=o(n).replace(/[^0-9.]/g,""),[u,...e]=t.split(".");return e.length>0?`${u}.${e.join("")}`:u}function a(n,r=""){if(n==null||typeof n=="number"&&Number.isNaN(n))return r;let t=parseFloat(n.toString());return Number.isNaN(t)?r:t}var b={onChange:s,onBlur:a,value:o};0&&(module.exports={transformNumber,transformValue,transformValueOnBlur,transformValueOnChange});
@@ -0,0 +1 @@
1
+ export { InputValue, transformNumber, transformValue, transformValueOnBlur, transformValueOnChange } from './transform-number.cjs';
@@ -0,0 +1 @@
1
+ export { InputValue, transformNumber, transformValue, transformValueOnBlur, transformValueOnChange } from './transform-number.js';
@@ -0,0 +1 @@
1
+ function i(n,r=""){return n==null||typeof n=="number"&&Number.isNaN(n)?r:n.toString()}function o(n){let t=i(n).replace(/[^0-9.]/g,""),[e,...u]=t.split(".");return u.length>0?`${e}.${u.join("")}`:e}function s(n,r=""){if(n==null||typeof n=="number"&&Number.isNaN(n))return r;let t=parseFloat(n.toString());return Number.isNaN(t)?r:t}var a={onChange:o,onBlur:s,value:i};export{a as transformNumber,i as transformValue,s as transformValueOnBlur,o as transformValueOnChange};
@@ -0,0 +1 @@
1
+ "use strict";var i=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var c=(n,r)=>{for(var t in r)i(n,t,{get:r[t],enumerable:!0})},f=(n,r,t,u)=>{if(r&&typeof r=="object"||typeof r=="function")for(let e of g(r))!l.call(n,e)&&e!==t&&i(n,e,{get:()=>r[e],enumerable:!(u=m(r,e))||u.enumerable});return n};var p=n=>f(i({},"__esModule",{value:!0}),n);var N={};c(N,{transformNumber:()=>b,transformValue:()=>o,transformValueOnBlur:()=>a,transformValueOnChange:()=>s});module.exports=p(N);function o(n,r=""){return n==null||typeof n=="number"&&Number.isNaN(n)?r:n.toString()}function s(n){let t=o(n).replace(/[^0-9.]/g,""),[u,...e]=t.split(".");return e.length>0?`${u}.${e.join("")}`:u}function a(n,r=""){if(n==null||typeof n=="number"&&Number.isNaN(n))return r;let t=parseFloat(n.toString());return Number.isNaN(t)?r:t}var b={onChange:s,onBlur:a,value:o};0&&(module.exports={transformNumber,transformValue,transformValueOnBlur,transformValueOnChange});
@@ -0,0 +1,31 @@
1
+ type InputValue = string | number | null | undefined;
2
+ /**
3
+ * Transforms the input value to a string.
4
+ *
5
+ * @param {InputValue} value - The value to transform.
6
+ * @param {string} [defaultValue=''] - The default value to return if the input value is null, undefined, or NaN.
7
+ * @returns {string} - The transformed string value.
8
+ */
9
+ declare function transformValue(value: InputValue, defaultValue?: string): string;
10
+ /**
11
+ * Transforms the output value on change event.
12
+ *
13
+ * @param {string | number} value - The value to transform.
14
+ * @returns {string} - The cleaned and transformed value.
15
+ */
16
+ declare function transformValueOnChange(value: string | number): string;
17
+ /**
18
+ * Transforms the output value on blur event.
19
+ *
20
+ * @param {InputValue} value - The value to transform.
21
+ * @param {string | number} [defaultValue=''] - The default value to return if the input value is null, undefined, or NaN.
22
+ * @returns {string | number} - The transformed numeric value or the default value.
23
+ */
24
+ declare function transformValueOnBlur(value: InputValue, defaultValue?: string | number): string | number;
25
+ declare const transformNumber: {
26
+ onChange: typeof transformValueOnChange;
27
+ onBlur: typeof transformValueOnBlur;
28
+ value: typeof transformValue;
29
+ };
30
+
31
+ export { type InputValue, transformNumber, transformValue, transformValueOnBlur, transformValueOnChange };
@@ -0,0 +1,31 @@
1
+ type InputValue = string | number | null | undefined;
2
+ /**
3
+ * Transforms the input value to a string.
4
+ *
5
+ * @param {InputValue} value - The value to transform.
6
+ * @param {string} [defaultValue=''] - The default value to return if the input value is null, undefined, or NaN.
7
+ * @returns {string} - The transformed string value.
8
+ */
9
+ declare function transformValue(value: InputValue, defaultValue?: string): string;
10
+ /**
11
+ * Transforms the output value on change event.
12
+ *
13
+ * @param {string | number} value - The value to transform.
14
+ * @returns {string} - The cleaned and transformed value.
15
+ */
16
+ declare function transformValueOnChange(value: string | number): string;
17
+ /**
18
+ * Transforms the output value on blur event.
19
+ *
20
+ * @param {InputValue} value - The value to transform.
21
+ * @param {string | number} [defaultValue=''] - The default value to return if the input value is null, undefined, or NaN.
22
+ * @returns {string | number} - The transformed numeric value or the default value.
23
+ */
24
+ declare function transformValueOnBlur(value: InputValue, defaultValue?: string | number): string | number;
25
+ declare const transformNumber: {
26
+ onChange: typeof transformValueOnChange;
27
+ onBlur: typeof transformValueOnBlur;
28
+ value: typeof transformValue;
29
+ };
30
+
31
+ export { type InputValue, transformNumber, transformValue, transformValueOnBlur, transformValueOnChange };
@@ -0,0 +1 @@
1
+ function i(n,r=""){return n==null||typeof n=="number"&&Number.isNaN(n)?r:n.toString()}function o(n){let t=i(n).replace(/[^0-9.]/g,""),[e,...u]=t.split(".");return u.length>0?`${e}.${u.join("")}`:e}function s(n,r=""){if(n==null||typeof n=="number"&&Number.isNaN(n))return r;let t=parseFloat(n.toString());return Number.isNaN(t)?r:t}var a={onChange:o,onBlur:s,value:i};export{a as transformNumber,i as transformValue,s as transformValueOnBlur,o as transformValueOnChange};
@@ -0,0 +1 @@
1
+ "use strict";var c=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var f=(t,n)=>{for(var i in n)c(t,i,{get:n[i],enumerable:!0})},g=(t,n,i,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let a of p(n))!m.call(t,a)&&a!==i&&c(t,a,{get:()=>n[a],enumerable:!(r=u(n,a))||r.enumerable});return t};var d=t=>g(c({},"__esModule",{value:!0}),t);var L={};f(L,{hasParams:()=>w,isEqualPath:()=>y,isExternalLink:()=>x,removeLastSlash:()=>s,removeParams:()=>P,safeReturnUrl:()=>b});module.exports=d(L);var h=require("es-toolkit");function w(t){try{let n=new URL(t,window.location.origin);return Array.from(n.searchParams.keys()).length>0}catch{return!1}}function s(t){return t!=="/"&&t.endsWith("/")?t.slice(0,-1):t}function y(t,n,i={deep:!0}){let r=a=>{try{let{pathname:e,searchParams:o}=new URL(a.trim(),"http://dummy");return i.deep?{pathname:s(e),params:Object.fromEntries(o)}:{pathname:s(e)}}catch{return{pathname:""}}};return(0,h.isEqual)(r(n),r(t))}function P(t){try{let n=new URL(t,window.location.origin);return s(n.pathname)}catch{return t}}function x(t){return/^https?:\/\//i.test(t)}function b(t,n){let i=n??"/";if(!t||typeof window>"u"||!window.location?.origin)return i;try{let r=new URL(t,window.location.origin),a=r.origin===window.location.origin,e=r.pathname.startsWith("/")&&!r.pathname.startsWith("//"),o=/^\/:+$/.test(r.pathname),l=r.pathname==="/"&&!r.search&&r.hash;return a&&e&&!o&&!l?`${r.pathname}${r.search}${r.hash}`:i}catch{return t.startsWith("/")&&!t.startsWith("//")?t:i}}0&&(module.exports={hasParams,isEqualPath,isExternalLink,removeLastSlash,removeParams,safeReturnUrl});
@@ -0,0 +1 @@
1
+ export { EqualPathOptions, hasParams, isEqualPath, isExternalLink, removeLastSlash, removeParams, safeReturnUrl } from './url.cjs';
@@ -0,0 +1 @@
1
+ export { EqualPathOptions, hasParams, isEqualPath, isExternalLink, removeLastSlash, removeParams, safeReturnUrl } from './url.js';
@@ -0,0 +1 @@
1
+ import{isEqual as h}from"es-toolkit";function u(t){try{let r=new URL(t,window.location.origin);return Array.from(r.searchParams.keys()).length>0}catch{return!1}}function o(t){return t!=="/"&&t.endsWith("/")?t.slice(0,-1):t}function p(t,r,i={deep:!0}){let n=e=>{try{let{pathname:a,searchParams:s}=new URL(e.trim(),"http://dummy");return i.deep?{pathname:o(a),params:Object.fromEntries(s)}:{pathname:o(a)}}catch{return{pathname:""}}};return h(n(r),n(t))}function m(t){try{let r=new URL(t,window.location.origin);return o(r.pathname)}catch{return t}}function f(t){return/^https?:\/\//i.test(t)}function g(t,r){let i=r??"/";if(!t||typeof window>"u"||!window.location?.origin)return i;try{let n=new URL(t,window.location.origin),e=n.origin===window.location.origin,a=n.pathname.startsWith("/")&&!n.pathname.startsWith("//"),s=/^\/:+$/.test(n.pathname),c=n.pathname==="/"&&!n.search&&n.hash;return e&&a&&!s&&!c?`${n.pathname}${n.search}${n.hash}`:i}catch{return t.startsWith("/")&&!t.startsWith("//")?t:i}}export{u as hasParams,p as isEqualPath,f as isExternalLink,o as removeLastSlash,m as removeParams,g as safeReturnUrl};
@@ -0,0 +1 @@
1
+ "use strict";var c=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var m=Object.prototype.hasOwnProperty;var g=(t,n)=>{for(var i in n)c(t,i,{get:n[i],enumerable:!0})},f=(t,n,i,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let a of p(n))!m.call(t,a)&&a!==i&&c(t,a,{get:()=>n[a],enumerable:!(r=u(n,a))||r.enumerable});return t};var d=t=>f(c({},"__esModule",{value:!0}),t);var L={};g(L,{hasParams:()=>w,isEqualPath:()=>y,isExternalLink:()=>b,removeLastSlash:()=>e,removeParams:()=>P,safeReturnUrl:()=>x});module.exports=d(L);var h=require("es-toolkit");function w(t){try{let n=new URL(t,window.location.origin);return Array.from(n.searchParams.keys()).length>0}catch{return!1}}function e(t){return t!=="/"&&t.endsWith("/")?t.slice(0,-1):t}function y(t,n,i={deep:!0}){let r=a=>{try{let{pathname:s,searchParams:o}=new URL(a.trim(),"http://dummy");return i.deep?{pathname:e(s),params:Object.fromEntries(o)}:{pathname:e(s)}}catch{return{pathname:""}}};return(0,h.isEqual)(r(n),r(t))}function P(t){try{let n=new URL(t,window.location.origin);return e(n.pathname)}catch{return t}}function b(t){return/^https?:\/\//i.test(t)}function x(t,n){let i=n??"/";if(!t||typeof window>"u"||!window.location?.origin)return i;try{let r=new URL(t,window.location.origin),a=r.origin===window.location.origin,s=r.pathname.startsWith("/")&&!r.pathname.startsWith("//"),o=/^\/:+$/.test(r.pathname),l=r.pathname==="/"&&!r.search&&r.hash;return a&&s&&!o&&!l?`${r.pathname}${r.search}${r.hash}`:i}catch{return t.startsWith("/")&&!t.startsWith("//")?t:i}}0&&(module.exports={hasParams,isEqualPath,isExternalLink,removeLastSlash,removeParams,safeReturnUrl});