@maz-ui/utils 4.0.0-beta.1 → 4.0.0-beta.11

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 (104) hide show
  1. package/dist/{utils → helpers}/getBrowserLocale.js +1 -1
  2. package/dist/helpers/getErrorMessage.js +6 -0
  3. package/dist/helpers/index.js +44 -0
  4. package/dist/helpers/isServer.js +6 -0
  5. package/dist/{utils → helpers}/isStandaloneMode.js +2 -2
  6. package/dist/{utils → helpers}/scriptLoader.js +9 -9
  7. package/dist/index.js +37 -35
  8. package/dist/types/formatters/camelCase.d.ts +0 -1
  9. package/dist/types/formatters/capitalize.d.ts +0 -1
  10. package/dist/types/formatters/formatCurrency.d.ts +0 -1
  11. package/dist/types/formatters/formatDate.d.ts +0 -1
  12. package/dist/types/formatters/formatNumber.d.ts +0 -1
  13. package/dist/types/formatters/formatPhoneNumber.d.ts +0 -1
  14. package/dist/types/formatters/index.d.ts +0 -1
  15. package/dist/types/formatters/pascalCase.d.ts +0 -1
  16. package/dist/types/{utils → helpers}/TextareaAutogrow.d.ts +0 -1
  17. package/dist/types/{utils → helpers}/checkAvailability.d.ts +0 -1
  18. package/dist/types/{utils → helpers}/countryCodeToUnicodeFlag.d.ts +0 -1
  19. package/dist/types/{utils → helpers}/debounce.d.ts +0 -1
  20. package/dist/types/{utils → helpers}/debounceCallback.d.ts +0 -1
  21. package/dist/types/{utils → helpers}/debounceId.d.ts +0 -1
  22. package/dist/types/{utils → helpers}/fetchLocaleIp.d.ts +0 -1
  23. package/dist/types/{utils → helpers}/getBrowserLocale.d.ts +0 -1
  24. package/dist/types/{utils → helpers}/getCountryFlagUrl.d.ts +0 -1
  25. package/dist/types/helpers/getErrorMessage.d.ts +1 -0
  26. package/dist/types/{utils → helpers}/idleTimeout.d.ts +0 -1
  27. package/dist/types/{utils → helpers}/index.d.ts +1 -1
  28. package/dist/types/{utils → helpers}/isClient.d.ts +0 -1
  29. package/dist/types/{utils → helpers}/isEqual.d.ts +0 -1
  30. package/dist/types/{utils → helpers}/isServer.d.ts +0 -1
  31. package/dist/types/{utils → helpers}/isStandaloneMode.d.ts +0 -1
  32. package/dist/types/{utils → helpers}/normalizeString.d.ts +0 -1
  33. package/dist/types/{utils → helpers}/scriptLoader.d.ts +1 -2
  34. package/dist/types/{utils → helpers}/sleep.d.ts +0 -1
  35. package/dist/types/{utils → helpers}/swipeHandler.d.ts +0 -1
  36. package/dist/types/{utils → helpers}/throttle.d.ts +0 -1
  37. package/dist/types/{utils → helpers}/throttleId.d.ts +0 -1
  38. package/dist/types/{utils → helpers}/truthyFilter.d.ts +0 -1
  39. package/dist/types/{utils → helpers}/userVisibility.d.ts +0 -1
  40. package/dist/types/index.d.ts +1 -2
  41. package/dist/types/ts-helpers/DeepKeyOf.d.ts +0 -1
  42. package/dist/types/ts-helpers/DeepPartial.d.ts +0 -1
  43. package/dist/types/ts-helpers/FlattenObjectKeys.d.ts +0 -1
  44. package/dist/types/ts-helpers/GenericInstanceType.d.ts +15 -0
  45. package/dist/types/ts-helpers/InferMaybeRef.d.ts +0 -1
  46. package/dist/types/ts-helpers/index.d.ts +1 -1
  47. package/package.json +20 -17
  48. package/dist/types/formatters/camelCase.d.ts.map +0 -1
  49. package/dist/types/formatters/capitalize.d.ts.map +0 -1
  50. package/dist/types/formatters/formatCurrency.d.ts.map +0 -1
  51. package/dist/types/formatters/formatDate.d.ts.map +0 -1
  52. package/dist/types/formatters/formatNumber.d.ts.map +0 -1
  53. package/dist/types/formatters/formatPhoneNumber.d.ts.map +0 -1
  54. package/dist/types/formatters/index.d.ts.map +0 -1
  55. package/dist/types/formatters/pascalCase.d.ts.map +0 -1
  56. package/dist/types/index.d.ts.map +0 -1
  57. package/dist/types/ts-helpers/DeepKeyOf.d.ts.map +0 -1
  58. package/dist/types/ts-helpers/DeepPartial.d.ts.map +0 -1
  59. package/dist/types/ts-helpers/FlattenObjectKeys.d.ts.map +0 -1
  60. package/dist/types/ts-helpers/InferMaybeRef.d.ts.map +0 -1
  61. package/dist/types/ts-helpers/index.d.ts.map +0 -1
  62. package/dist/types/utils/TextareaAutogrow.d.ts.map +0 -1
  63. package/dist/types/utils/checkAvailability.d.ts.map +0 -1
  64. package/dist/types/utils/countryCodeToUnicodeFlag.d.ts.map +0 -1
  65. package/dist/types/utils/debounce.d.ts.map +0 -1
  66. package/dist/types/utils/debounceCallback.d.ts.map +0 -1
  67. package/dist/types/utils/debounceId.d.ts.map +0 -1
  68. package/dist/types/utils/fetchLocaleIp.d.ts.map +0 -1
  69. package/dist/types/utils/getBrowserLocale.d.ts.map +0 -1
  70. package/dist/types/utils/getCountryFlagUrl.d.ts.map +0 -1
  71. package/dist/types/utils/idleTimeout.d.ts.map +0 -1
  72. package/dist/types/utils/index.d.ts.map +0 -1
  73. package/dist/types/utils/isClient.d.ts.map +0 -1
  74. package/dist/types/utils/isEqual.d.ts.map +0 -1
  75. package/dist/types/utils/isServer.d.ts.map +0 -1
  76. package/dist/types/utils/isStandaloneMode.d.ts.map +0 -1
  77. package/dist/types/utils/normalizeString.d.ts.map +0 -1
  78. package/dist/types/utils/scriptLoader.d.ts.map +0 -1
  79. package/dist/types/utils/sleep.d.ts.map +0 -1
  80. package/dist/types/utils/swipeHandler.d.ts.map +0 -1
  81. package/dist/types/utils/throttle.d.ts.map +0 -1
  82. package/dist/types/utils/throttleId.d.ts.map +0 -1
  83. package/dist/types/utils/truthyFilter.d.ts.map +0 -1
  84. package/dist/types/utils/userVisibility.d.ts.map +0 -1
  85. package/dist/utils/index.js +0 -42
  86. package/dist/utils/isServer.js +0 -6
  87. /package/dist/{utils → helpers}/TextareaAutogrow.js +0 -0
  88. /package/dist/{utils → helpers}/checkAvailability.js +0 -0
  89. /package/dist/{utils → helpers}/countryCodeToUnicodeFlag.js +0 -0
  90. /package/dist/{utils → helpers}/debounce.js +0 -0
  91. /package/dist/{utils → helpers}/debounceCallback.js +0 -0
  92. /package/dist/{utils → helpers}/debounceId.js +0 -0
  93. /package/dist/{utils → helpers}/fetchLocaleIp.js +0 -0
  94. /package/dist/{utils → helpers}/getCountryFlagUrl.js +0 -0
  95. /package/dist/{utils → helpers}/idleTimeout.js +0 -0
  96. /package/dist/{utils → helpers}/isClient.js +0 -0
  97. /package/dist/{utils → helpers}/isEqual.js +0 -0
  98. /package/dist/{utils → helpers}/normalizeString.js +0 -0
  99. /package/dist/{utils → helpers}/sleep.js +0 -0
  100. /package/dist/{utils → helpers}/swipeHandler.js +0 -0
  101. /package/dist/{utils → helpers}/throttle.js +0 -0
  102. /package/dist/{utils → helpers}/throttleId.js +0 -0
  103. /package/dist/{utils → helpers}/truthyFilter.js +0 -0
  104. /package/dist/{utils → helpers}/userVisibility.js +0 -0
@@ -1,7 +1,7 @@
1
1
  import { isServer as e } from "./isServer.js";
2
2
  function t() {
3
3
  try {
4
- return e() ? void 0 : window.navigator.language;
4
+ return e() ? void 0 : globalThis.navigator.language;
5
5
  } catch (r) {
6
6
  throw new Error(`[MazInputPhoneNumber] (browserLocale) ${r}`);
7
7
  }
@@ -0,0 +1,6 @@
1
+ function e(t) {
2
+ return t instanceof Error ? t.message : typeof t == "string" ? t : t && typeof t == "object" && "message" in t ? String(t.message) : t ? String(t) : "An unexpected error occurred";
3
+ }
4
+ export {
5
+ e as getErrorMessage
6
+ };
@@ -0,0 +1,44 @@
1
+ import { checkAvailability as e } from "./checkAvailability.js";
2
+ import { countryCodeToUnicodeFlag as p } from "./countryCodeToUnicodeFlag.js";
3
+ import { debounce as x } from "./debounce.js";
4
+ import { debounceCallback as i } from "./debounceCallback.js";
5
+ import { debounceId as a } from "./debounceId.js";
6
+ import { getCountryFlagUrl as n } from "./getCountryFlagUrl.js";
7
+ import { getErrorMessage as s } from "./getErrorMessage.js";
8
+ import { IdleTimeout as g } from "./idleTimeout.js";
9
+ import { isClient as y } from "./isClient.js";
10
+ import { isEqual as h } from "./isEqual.js";
11
+ import { isServer as F } from "./isServer.js";
12
+ import { isStandaloneMode as T } from "./isStandaloneMode.js";
13
+ import { normalizeString as k } from "./normalizeString.js";
14
+ import { ScriptLoader as w } from "./scriptLoader.js";
15
+ import { sleep as E } from "./sleep.js";
16
+ import { Swipe as q } from "./swipeHandler.js";
17
+ import { TextareaAutogrow as L } from "./TextareaAutogrow.js";
18
+ import { throttle as j } from "./throttle.js";
19
+ import { throttleId as D } from "./throttleId.js";
20
+ import { truthyFilter as H } from "./truthyFilter.js";
21
+ import { UserVisibility as K } from "./userVisibility.js";
22
+ export {
23
+ g as IdleTimeout,
24
+ w as ScriptLoader,
25
+ q as Swipe,
26
+ L as TextareaAutogrow,
27
+ K as UserVisibility,
28
+ e as checkAvailability,
29
+ p as countryCodeToUnicodeFlag,
30
+ x as debounce,
31
+ i as debounceCallback,
32
+ a as debounceId,
33
+ n as getCountryFlagUrl,
34
+ s as getErrorMessage,
35
+ y as isClient,
36
+ h as isEqual,
37
+ F as isServer,
38
+ T as isStandaloneMode,
39
+ k as normalizeString,
40
+ E as sleep,
41
+ j as throttle,
42
+ D as throttleId,
43
+ H as truthyFilter
44
+ };
@@ -0,0 +1,6 @@
1
+ function e() {
2
+ return typeof document > "u" || typeof globalThis.window > "u";
3
+ }
4
+ export {
5
+ e as isServer
6
+ };
@@ -2,8 +2,8 @@ import { isClient as t } from "./isClient.js";
2
2
  function e() {
3
3
  if (!t())
4
4
  return !1;
5
- const n = navigator, a = window.matchMedia("(display-mode: standalone)").matches;
6
- return n.standalone || a;
5
+ const a = navigator, n = globalThis.matchMedia("(display-mode: standalone)").matches;
6
+ return a.standalone || n;
7
7
  }
8
8
  export {
9
9
  e as isStandaloneMode
@@ -5,33 +5,33 @@ class s {
5
5
  async;
6
6
  defer;
7
7
  identifier;
8
- constructor({ src: e, identifier: t, once: n = !0, async: r = !0, defer: i = !0 }) {
9
- if (typeof window > "u")
8
+ constructor({ src: e, identifier: t, once: o = !0, async: r = !0, defer: i = !0 }) {
9
+ if (typeof globalThis.window > "u")
10
10
  throw new TypeError("[ScriptLoader]: Is supported only on browser side");
11
11
  if (!e)
12
12
  throw new Error('[ScriptLoader]: You should provide the attribut "src"');
13
13
  if (!t)
14
14
  throw new Error('[ScriptLoader]: You should provide the attribut "identifier"');
15
- this.src = e, this.identifier = t, this.once = n, this.async = r, this.defer = i;
15
+ this.src = e, this.identifier = t, this.once = o, this.async = r, this.defer = i;
16
16
  }
17
17
  removeTag(e) {
18
18
  typeof e == "string" ? document.head.querySelector(`[data-identifier="${e}"]`)?.remove() : e.remove();
19
19
  }
20
20
  load() {
21
- const e = window, t = document.head.querySelectorAll(`[data-identifier="${this.identifier}"]`);
21
+ const e = globalThis, t = document.head.querySelectorAll(`[data-identifier="${this.identifier}"]`);
22
22
  if (this.once && e[this.identifier] && t.length > 0)
23
23
  return this.script = e[this.identifier], Promise.resolve(this.script);
24
24
  if (!this.once && t.length > 0)
25
- for (const n of t)
26
- this.removeTag(n);
25
+ for (const o of t)
26
+ this.removeTag(o);
27
27
  return this.injectScript();
28
28
  }
29
29
  injectScript() {
30
- const e = window;
31
- return new Promise((t, n) => {
30
+ const e = globalThis;
31
+ return new Promise((t, o) => {
32
32
  try {
33
33
  const r = document.createElement("script");
34
- r.src = this.src, r.async = this.async, r.defer = this.defer, r.dataset.identifier = this.identifier, r.addEventListener("error", (i) => n(new Error(`[ScriptLoader](injectScript) ${i.message}`))), r.addEventListener("load", (i) => (this.script = i, e[this.identifier] = i, t(i))), document.head.append(r);
34
+ r.src = this.src, r.async = this.async, r.defer = this.defer, r.dataset.identifier = this.identifier, r.addEventListener("error", (i) => o(new Error(`[ScriptLoader](injectScript) ${i.message}`))), r.addEventListener("load", (i) => (this.script = i, e[this.identifier] = i, t(i))), document.head.append(r);
35
35
  } catch (r) {
36
36
  throw new Error(`[ScriptLoader](init) ${r}`);
37
37
  }
package/dist/index.js CHANGED
@@ -4,51 +4,53 @@ import { formatCurrency as f } from "./formatters/formatCurrency.js";
4
4
  import { formatDate as a } from "./formatters/formatDate.js";
5
5
  import { formatNumber as l } from "./formatters/formatNumber.js";
6
6
  import { pascalCase as n } from "./formatters/pascalCase.js";
7
- import { checkAvailability as u } from "./utils/checkAvailability.js";
8
- import { countryCodeToUnicodeFlag as b } from "./utils/countryCodeToUnicodeFlag.js";
9
- import { debounce as y } from "./utils/debounce.js";
10
- import { debounceCallback as S } from "./utils/debounceCallback.js";
11
- import { debounceId as F } from "./utils/debounceId.js";
12
- import { getCountryFlagUrl as T } from "./utils/getCountryFlagUrl.js";
13
- import { IdleTimeout as k } from "./utils/idleTimeout.js";
14
- import { isClient as w } from "./utils/isClient.js";
15
- import { isEqual as A } from "./utils/isEqual.js";
16
- import { isServer as D } from "./utils/isServer.js";
17
- import { isStandaloneMode as L } from "./utils/isStandaloneMode.js";
18
- import { normalizeString as N } from "./utils/normalizeString.js";
19
- import { ScriptLoader as j } from "./utils/scriptLoader.js";
20
- import { sleep as G } from "./utils/sleep.js";
21
- import { Swipe as J } from "./utils/swipeHandler.js";
22
- import { TextareaAutogrow as O } from "./utils/TextareaAutogrow.js";
23
- import { throttle as Q } from "./utils/throttle.js";
24
- import { throttleId as W } from "./utils/throttleId.js";
25
- import { truthyFilter as Y } from "./utils/truthyFilter.js";
26
- import { UserVisibility as _ } from "./utils/userVisibility.js";
7
+ import { checkAvailability as d } from "./helpers/checkAvailability.js";
8
+ import { countryCodeToUnicodeFlag as b } from "./helpers/countryCodeToUnicodeFlag.js";
9
+ import { debounce as C } from "./helpers/debounce.js";
10
+ import { debounceCallback as S } from "./helpers/debounceCallback.js";
11
+ import { debounceId as F } from "./helpers/debounceId.js";
12
+ import { getCountryFlagUrl as T } from "./helpers/getCountryFlagUrl.js";
13
+ import { getErrorMessage as k } from "./helpers/getErrorMessage.js";
14
+ import { IdleTimeout as w } from "./helpers/idleTimeout.js";
15
+ import { isClient as A } from "./helpers/isClient.js";
16
+ import { isEqual as M } from "./helpers/isEqual.js";
17
+ import { isServer as D } from "./helpers/isServer.js";
18
+ import { isStandaloneMode as N } from "./helpers/isStandaloneMode.js";
19
+ import { normalizeString as j } from "./helpers/normalizeString.js";
20
+ import { ScriptLoader as G } from "./helpers/scriptLoader.js";
21
+ import { sleep as J } from "./helpers/sleep.js";
22
+ import { Swipe as O } from "./helpers/swipeHandler.js";
23
+ import { TextareaAutogrow as Q } from "./helpers/TextareaAutogrow.js";
24
+ import { throttle as W } from "./helpers/throttle.js";
25
+ import { throttleId as Y } from "./helpers/throttleId.js";
26
+ import { truthyFilter as _ } from "./helpers/truthyFilter.js";
27
+ import { UserVisibility as rr } from "./helpers/userVisibility.js";
27
28
  export {
28
- k as IdleTimeout,
29
- j as ScriptLoader,
30
- J as Swipe,
31
- O as TextareaAutogrow,
32
- _ as UserVisibility,
29
+ w as IdleTimeout,
30
+ G as ScriptLoader,
31
+ O as Swipe,
32
+ Q as TextareaAutogrow,
33
+ rr as UserVisibility,
33
34
  e as camelCase,
34
35
  m as capitalize,
35
- u as checkAvailability,
36
+ d as checkAvailability,
36
37
  b as countryCodeToUnicodeFlag,
37
- y as debounce,
38
+ C as debounce,
38
39
  S as debounceCallback,
39
40
  F as debounceId,
40
41
  f as formatCurrency,
41
42
  a as formatDate,
42
43
  l as formatNumber,
43
44
  T as getCountryFlagUrl,
44
- w as isClient,
45
- A as isEqual,
45
+ k as getErrorMessage,
46
+ A as isClient,
47
+ M as isEqual,
46
48
  D as isServer,
47
- L as isStandaloneMode,
48
- N as normalizeString,
49
+ N as isStandaloneMode,
50
+ j as normalizeString,
49
51
  n as pascalCase,
50
- G as sleep,
51
- Q as throttle,
52
- W as throttleId,
53
- Y as truthyFilter
52
+ J as sleep,
53
+ W as throttle,
54
+ Y as throttleId,
55
+ _ as truthyFilter
54
56
  };
@@ -1,2 +1 @@
1
1
  export declare function camelCase(str: string): string;
2
- //# sourceMappingURL=camelCase.d.ts.map
@@ -1,2 +1 @@
1
1
  export declare function capitalize(value: string): string;
2
- //# sourceMappingURL=capitalize.d.ts.map
@@ -2,4 +2,3 @@ export interface FilterCurrencyOptions extends Intl.NumberFormatOptions {
2
2
  round?: boolean;
3
3
  }
4
4
  export declare function formatCurrency(number: number | string, locale: string, options: FilterCurrencyOptions): string;
5
- //# sourceMappingURL=formatCurrency.d.ts.map
@@ -1,2 +1 @@
1
1
  export declare function formatDate(date: string | number | Date, locale: string, options?: Intl.DateTimeFormatOptions): string;
2
- //# sourceMappingURL=formatDate.d.ts.map
@@ -1,2 +1 @@
1
1
  export declare function formatNumber(number: number | string, locale: string, options?: Intl.NumberFormatOptions): string;
2
- //# sourceMappingURL=formatNumber.d.ts.map
@@ -1,2 +1 @@
1
1
  export declare function formatPhoneNumber(phoneNumber: string): string;
2
- //# sourceMappingURL=formatPhoneNumber.d.ts.map
@@ -4,4 +4,3 @@ export * from './formatCurrency';
4
4
  export * from './formatDate';
5
5
  export * from './formatNumber';
6
6
  export * from './pascalCase';
7
- //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1 @@
1
1
  export declare function pascalCase(str: string): string;
2
- //# sourceMappingURL=pascalCase.d.ts.map
@@ -7,4 +7,3 @@ export declare class TextareaAutogrow {
7
7
  private onResize;
8
8
  private autogrow;
9
9
  }
10
- //# sourceMappingURL=TextareaAutogrow.d.ts.map
@@ -5,4 +5,3 @@ export declare function checkAvailability<T>(getRef: () => T | null | undefined,
5
5
  expectedValue?: T;
6
6
  onError?: (error: Error) => void;
7
7
  }): void;
8
- //# sourceMappingURL=checkAvailability.d.ts.map
@@ -1,2 +1 @@
1
1
  export declare function countryCodeToUnicodeFlag(locale: string): string;
2
- //# sourceMappingURL=countryCodeToUnicodeFlag.d.ts.map
@@ -1,2 +1 @@
1
1
  export declare function debounce<F extends (...args: Parameters<F>) => ReturnType<F>>(fn: F, delay: number): (...args: Parameters<F>) => void;
2
- //# sourceMappingURL=debounce.d.ts.map
@@ -1,2 +1 @@
1
1
  export declare function debounceCallback(callback: (...args: unknown[]) => unknown, delay: number): void;
2
- //# sourceMappingURL=debounceCallback.d.ts.map
@@ -4,4 +4,3 @@ type AsyncFunction<T, Args extends unknown[]> = (...args: Args) => T | Promise<T
4
4
  */
5
5
  export declare function debounceId<T, Args extends unknown[]>(identifier: string, func: AsyncFunction<T, Args>, delay: number): (...args: Args) => Promise<T>;
6
6
  export {};
7
- //# sourceMappingURL=debounceId.d.ts.map
@@ -37,4 +37,3 @@ export interface IpWhoResponse {
37
37
  };
38
38
  }
39
39
  export declare function fetchLocaleIp(): Promise<string | undefined>;
40
- //# sourceMappingURL=fetchLocaleIp.d.ts.map
@@ -1,2 +1 @@
1
1
  export declare function getBrowserLocale(): string | undefined;
2
- //# sourceMappingURL=getBrowserLocale.d.ts.map
@@ -6,4 +6,3 @@ declare const _supportedCodes: readonly ["ad", "ae", "af", "ag", "ai", "al", "am
6
6
  type SupportedCodes = typeof _supportedCodes[number];
7
7
  export declare function getCountryFlagUrl(countryIsoCode: SupportedCodes | string, size?: Size): string | undefined;
8
8
  export {};
9
- //# sourceMappingURL=getCountryFlagUrl.d.ts.map
@@ -0,0 +1 @@
1
+ export declare function getErrorMessage(error: unknown): string;
@@ -54,4 +54,3 @@ export declare class IdleTimeout {
54
54
  get idle(): boolean;
55
55
  set idle(value: boolean);
56
56
  }
57
- //# sourceMappingURL=idleTimeout.d.ts.map
@@ -4,6 +4,7 @@ export * from './debounce';
4
4
  export * from './debounceCallback';
5
5
  export * from './debounceId';
6
6
  export * from './getCountryFlagUrl';
7
+ export * from './getErrorMessage';
7
8
  export * from './idleTimeout';
8
9
  export * from './isClient';
9
10
  export * from './isEqual';
@@ -18,4 +19,3 @@ export * from './throttle';
18
19
  export * from './throttleId';
19
20
  export * from './truthyFilter';
20
21
  export * from './userVisibility';
21
- //# sourceMappingURL=index.d.ts.map
@@ -1,2 +1 @@
1
1
  export declare function isClient(): boolean;
2
- //# sourceMappingURL=isClient.d.ts.map
@@ -1,2 +1 @@
1
1
  export declare function isEqual(a: unknown, b: unknown): boolean;
2
- //# sourceMappingURL=isEqual.d.ts.map
@@ -1,2 +1 @@
1
1
  export declare function isServer(): boolean;
2
- //# sourceMappingURL=isServer.d.ts.map
@@ -1,2 +1 @@
1
1
  export declare function isStandaloneMode(): boolean;
2
- //# sourceMappingURL=isStandaloneMode.d.ts.map
@@ -45,4 +45,3 @@ export interface NormalizeStringOptions {
45
45
  customNormalizationForms?: string[];
46
46
  }
47
47
  export declare function normalizeString(input: string | number | boolean, options?: NormalizeStringOptions): string;
48
- //# sourceMappingURL=normalizeString.d.ts.map
@@ -14,7 +14,6 @@ export declare class ScriptLoader {
14
14
  private identifier;
15
15
  constructor({ src, identifier, once, async, defer }: ScriptLoaderOptions);
16
16
  removeTag(tag: Element | string): void;
17
- load(): Promise<unknown>;
17
+ load(): Promise<Event | undefined>;
18
18
  private injectScript;
19
19
  }
20
- //# sourceMappingURL=scriptLoader.d.ts.map
@@ -1,2 +1 @@
1
1
  export declare function sleep(duration: number): Promise<unknown>;
2
- //# sourceMappingURL=sleep.d.ts.map
@@ -100,4 +100,3 @@ export declare class Swipe {
100
100
  private resetValues;
101
101
  }
102
102
  export {};
103
- //# sourceMappingURL=swipeHandler.d.ts.map
@@ -1,2 +1 @@
1
1
  export declare function throttle<T extends (...args: Parameters<T>) => ReturnType<T>>(func: T, limit: number): (...args: Parameters<T>) => void;
2
- //# sourceMappingURL=throttle.d.ts.map
@@ -4,4 +4,3 @@ type AsyncFunction<T, Args extends unknown[]> = (...args: Args) => T | Promise<T
4
4
  */
5
5
  export declare function throttleId<T, Args extends unknown[]>(identifier: string, func: AsyncFunction<T, Args>, interval: number): (...args: Args) => Promise<T>;
6
6
  export {};
7
- //# sourceMappingURL=throttleId.d.ts.map
@@ -1,3 +1,2 @@
1
1
  export type Truthy<T> = T extends false | '' | 0 | null | undefined ? never : T;
2
2
  export declare function truthyFilter<T>(value: T): value is Truthy<T>;
3
- //# sourceMappingURL=truthyFilter.d.ts.map
@@ -37,4 +37,3 @@ export declare class UserVisibility {
37
37
  private removeEventListener;
38
38
  destroy(): void;
39
39
  }
40
- //# sourceMappingURL=userVisibility.d.ts.map
@@ -1,4 +1,3 @@
1
1
  export * from './formatters';
2
+ export * from './helpers';
2
3
  export * from './ts-helpers';
3
- export * from './utils';
4
- //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,3 @@
1
1
  export type DeepKeyOf<T> = T extends object ? {
2
2
  [K in keyof T]: K extends string ? T[K] extends object ? `${K}.${DeepKeyOf<T[K]>}` : K : never;
3
3
  }[keyof T] : never;
4
- //# sourceMappingURL=DeepKeyOf.d.ts.map
@@ -1,4 +1,3 @@
1
1
  export type DeepPartial<T> = T extends object ? {
2
2
  [P in keyof T]?: DeepPartial<T[P]>;
3
3
  } : T;
4
- //# sourceMappingURL=DeepPartial.d.ts.map
@@ -1,4 +1,3 @@
1
1
  export type FlattenObjectKeys<T extends Record<string, any>, Prefix extends string = ''> = {
2
2
  [K in keyof T]: T[K] extends Record<string, any> ? FlattenObjectKeys<T[K], `${Prefix}${K extends string ? K : ''}.`> : `${Prefix}${K extends string ? K : ''}`;
3
3
  }[keyof T];
4
- //# sourceMappingURL=FlattenObjectKeys.d.ts.map
@@ -0,0 +1,15 @@
1
+ import { DefineComponent } from 'vue';
2
+ /**
3
+ * This type solves a problem with generic Vue 3 components.
4
+ *
5
+ * When a component is not generic, we can simply use InstanceType<typeof Component>
6
+ * to get the correct typing. However, with generic components, this approach doesn't work
7
+ * and we can't get the correct component typing. This helper type addresses that limitation.
8
+ *
9
+ * @see https://github.com/vuejs/language-tools/issues/3206
10
+ */
11
+ export type GenericInstanceType<T> = T extends new (...args: any[]) => infer R ? R : T extends (...args: any[]) => infer R ? R extends {
12
+ __ctx?: infer K;
13
+ } ? Exclude<K, void> extends {
14
+ expose: (...args: infer Y) => void;
15
+ } ? Y[0] & InstanceType<DefineComponent> : any : any : any;
@@ -1,3 +1,2 @@
1
1
  import { Ref } from 'vue';
2
2
  export type InferMaybeRef<T> = T extends Ref<infer U> ? U : T;
3
- //# sourceMappingURL=InferMaybeRef.d.ts.map
@@ -1,5 +1,5 @@
1
1
  export * from './DeepKeyOf';
2
2
  export * from './DeepPartial';
3
3
  export * from './FlattenObjectKeys';
4
+ export * from './GenericInstanceType';
4
5
  export * from './InferMaybeRef';
5
- //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@maz-ui/utils",
3
3
  "type": "module",
4
- "version": "4.0.0-beta.1",
4
+ "version": "4.0.0-beta.11",
5
5
  "description": "Utils of maz-ui for JavaScript/TypeScript users",
6
6
  "author": "Louis Mazel <me@loicmazuel.com>",
7
7
  "license": "MIT",
@@ -26,11 +26,11 @@
26
26
  "module": "./dist/index.js",
27
27
  "default": "./dist/index.js"
28
28
  },
29
- "./utils": {
30
- "types": "./dist/types/utils/index.d.ts",
31
- "import": "./dist/utils/index.js",
32
- "module": "./dist/utils/index.js",
33
- "default": "./dist/utils/index.js"
29
+ "./helpers": {
30
+ "types": "./dist/types/helpers/index.d.ts",
31
+ "import": "./dist/helpers/index.js",
32
+ "module": "./dist/helpers/index.js",
33
+ "default": "./dist/helpers/index.js"
34
34
  },
35
35
  "./formatters": {
36
36
  "types": "./dist/types/formatters/index.d.ts",
@@ -38,11 +38,11 @@
38
38
  "module": "./dist/formatters/index.js",
39
39
  "default": "./dist/formatters/index.js"
40
40
  },
41
- "./utils/*": {
42
- "types": "./dist/types/utils/*.d.ts",
43
- "import": "./dist/utils/*.js",
44
- "module": "./dist/utils/*.js",
45
- "default": "./dist/utils/*.js"
41
+ "./helpers/*": {
42
+ "types": "./dist/types/helpers/*.d.ts",
43
+ "import": "./dist/helpers/*.js",
44
+ "module": "./dist/helpers/*.js",
45
+ "default": "./dist/helpers/*.js"
46
46
  },
47
47
  "./formatters/*": {
48
48
  "types": "./dist/types/formatters/*.d.ts",
@@ -68,21 +68,24 @@
68
68
  "typecheck": "tsc --noEmit --skipLibCheck",
69
69
  "lint": "eslint .",
70
70
  "lint:fix": "eslint . --fix",
71
- "pre-commit": "lint-staged"
71
+ "pre-commit": "lint-staged",
72
+ "test:unit": "vitest run",
73
+ "test:unit:watch": "vitest watch",
74
+ "test:unit:coverage": "vitest run --coverage"
72
75
  },
73
76
  "devDependencies": {
74
77
  "eslint": "^9.29.0",
75
78
  "eslint-plugin-format": "^1.0.1",
76
- "glob": "catalog:",
77
- "libphonenumber-js": "catalog:",
79
+ "glob": "^11.0.3",
80
+ "libphonenumber-js": "^1.12.9",
78
81
  "typescript": "^5.8.3",
79
82
  "vite": "^6.3.5",
80
- "vue": "catalog:"
83
+ "vue": "^3.5.17"
81
84
  },
82
85
  "lint-staged": {
83
- "*.{js,jsx,ts,tsx,mjs,mts,cjs,md}": [
86
+ "*.{js,jsx,ts,tsx,mjs,mts,cjs,md,yml,json}": [
84
87
  "eslint --fix"
85
88
  ]
86
89
  },
87
- "gitHead": "c86371cf5f5fe936617fc7c1c74fab4ca7e9dcb1"
90
+ "gitHead": "604f754078f4e50e3db39793c28709e1dc1020c7"
88
91
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"camelCase.d.ts","sourceRoot":"","sources":["../../../src/formatters/camelCase.ts"],"names":[],"mappings":"AAAA,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,UAEpC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"capitalize.d.ts","sourceRoot":"","sources":["../../../src/formatters/capitalize.ts"],"names":[],"mappings":"AAAA,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKhD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"formatCurrency.d.ts","sourceRoot":"","sources":["../../../src/formatters/formatCurrency.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,qBAAsB,SAAQ,IAAI,CAAC,mBAAmB;IACrE,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AA8BD,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,qBAAqB,GAAG,MAAM,CAc9G"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"formatDate.d.ts","sourceRoot":"","sources":["../../../src/formatters/formatDate.ts"],"names":[],"mappings":"AAMA,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,qBAAqB,GAAG,MAAM,CAkBrH"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"formatNumber.d.ts","sourceRoot":"","sources":["../../../src/formatters/formatNumber.ts"],"names":[],"mappings":"AAIA,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,mBAAmB,GAAG,MAAM,CAsBhH"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"formatPhoneNumber.d.ts","sourceRoot":"","sources":["../../../src/formatters/formatPhoneNumber.ts"],"names":[],"mappings":"AAEA,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAO7D"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/formatters/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA;AAChC,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"pascalCase.d.ts","sourceRoot":"","sources":["../../../src/formatters/pascalCase.ts"],"names":[],"mappings":"AAGA,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,UAErC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,cAAc,CAAA;AAC5B,cAAc,SAAS,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"DeepKeyOf.d.ts","sourceRoot":"","sources":["../../../src/ts-helpers/DeepKeyOf.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,CAAC,CAAC,IAAI,CAAC,SAAS,MAAM,GACvC;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,SAAS,MAAM,GAC9B,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,GACjB,GAAG,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,GACzB,CAAC,GACH,KAAK;CACR,CAAC,MAAM,CAAC,CAAC,GACV,KAAK,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"DeepPartial.d.ts","sourceRoot":"","sources":["../../../src/ts-helpers/DeepPartial.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,CAAC,SAAS,MAAM,GACzC;KACG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CACnC,GACD,CAAC,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"FlattenObjectKeys.d.ts","sourceRoot":"","sources":["../../../src/ts-helpers/FlattenObjectKeys.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,SAAS,MAAM,GAAG,EAAE,IAAI;KACxF,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAC5C,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,MAAM,GAAG,CAAC,SAAS,MAAM,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,GACjE,GAAG,MAAM,GAAG,CAAC,SAAS,MAAM,GAAG,CAAC,GAAG,EAAE,EAAE;CAC5C,CAAC,MAAM,CAAC,CAAC,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"InferMaybeRef.d.ts","sourceRoot":"","sources":["../../../src/ts-helpers/InferMaybeRef.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAE9B,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI,CAAC,SAAS,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ts-helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,eAAe,CAAA;AAC7B,cAAc,qBAAqB,CAAA;AACnC,cAAc,iBAAiB,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"TextareaAutogrow.d.ts","sourceRoot":"","sources":["../../../src/utils/TextareaAutogrow.ts"],"names":[],"mappings":"AAEA,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,OAAO,CAAqB;gBAExB,OAAO,EAAE,mBAAmB;IAQxC,OAAO,CAAC,OAAO;IAMR,UAAU;IAKjB,OAAO,CAAC,OAAO;IAOf,OAAO,CAAC,QAAQ;IAIhB,OAAO,CAAC,QAAQ;CAKjB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"checkAvailability.d.ts","sourceRoot":"","sources":["../../../src/utils/checkAvailability.ts"],"names":[],"mappings":"AAAA,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,GAAG,SAAS,EAAE,QAAQ,EAAE,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,OAAO,CAAC,EAAE;IAAE,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAAC,aAAa,CAAC,EAAE,CAAC,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;CAAE,QAmCxP"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"countryCodeToUnicodeFlag.d.ts","sourceRoot":"","sources":["../../../src/utils/countryCodeToUnicodeFlag.ts"],"names":[],"mappings":"AAEA,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,UAStD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"debounce.d.ts","sourceRoot":"","sources":["../../../src/utils/debounce.ts"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,UAAU,CAAC,CAAC,CAAC,EAC1E,EAAE,EAAE,CAAC,EACL,KAAK,EAAE,MAAM,IAII,GAAG,MAAM,UAAU,CAAC,CAAC,CAAC,UAQxC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"debounceCallback.d.ts","sourceRoot":"","sources":["../../../src/utils/debounceCallback.ts"],"names":[],"mappings":"AAEA,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,EAAE,MAAM,QAMxF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"debounceId.d.ts","sourceRoot":"","sources":["../../../src/utils/debounceId.ts"],"names":[],"mappings":"AAAA,KAAK,aAAa,CAAC,CAAC,EAAE,IAAI,SAAS,OAAO,EAAE,IAAI,CAAC,GAAG,IAAI,EAAE,IAAI,KAAK,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;AASjF;;GAEG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,IAAI,SAAS,OAAO,EAAE,EAClD,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,aAAa,CAAC,CAAC,EAAE,IAAI,CAAC,EAC5B,KAAK,EAAE,MAAM,GACZ,CAAC,GAAG,IAAI,EAAE,IAAI,KAAK,OAA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E,MAAM,CAAA;QACZ,YAAY,CAAC,EAAE,MAAM,CAAA;KACtB,CAAA;CACF;AAED,wBAAsB,aAAa,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAYjE"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"getBrowserLocale.d.ts","sourceRoot":"","sources":["../../../src/utils/getBrowserLocale.ts"],"names":[],"mappings":"AAEA,wBAAgB,gBAAgB,IAAI,MAAM,GAAG,SAAS,CAWrD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"getCountryFlagUrl.d.ts","sourceRoot":"","sources":["../../../src/utils/getCountryFlagUrl.ts"],"names":[],"mappings":"AAAA,KAAK,KAAK,GAAG,OAAO,GAChB,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,OAAO,GACP,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,GACT,SAAS,CAAA;AAEb,KAAK,MAAM,GAAG,KAAK,GACf,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,MAAM,GACN,MAAM,CAAA;AAEV,KAAK,KAAK,GAAG,KAAK,GACd,KAAK,GACL,KAAK,GACL,MAAM,GACN,MAAM,GACN,MAAM,GACN,OAAO,GACP,OAAO,CAAA;AAEX,KAAK,IAAI,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,CAAA;AAElC,QAAA,MAAM,eAAe,69DAA89D,CAAA;AAEn/D,KAAK,cAAc,GAAG,OAAO,eAAe,CAAC,MAAM,CAAC,CAAA;AAEpD,wBAAgB,iBAAiB,CAAC,cAAc,EAAE,cAAc,GAAG,MAAM,EAAE,IAAI,CAAC,EAAE,IAAI,sBAUrF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"idleTimeout.d.ts","sourceRoot":"","s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,YAEnB;IAED,IAAW,OAAO,IAIQ,MAAM,CAF/B;IAED,IAAW,OAAO,CAAC,KAAK,EAAE,MAAM,EAE/B;IAED,IAAW,IAAI,IAAI,OAAO,CAEzB;IAED,IAAW,IAAI,CAAC,KAAK,EAAE,OAAO,EAS7B;CACF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,YAAY,CAAA;AAC1B,cAAc,oBAAoB,CAAA;AAClC,cAAc,cAAc,CAAA;AAC5B,cAAc,qBAAqB,CAAA;AACnC,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA;AAC1B,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,SAAS,CAAA;AACvB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,oBAAoB,CAAA;AAClC,cAAc,YAAY,CAAA;AAC1B,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"isClient.d.ts","sourceRoot":"","sources":["../../../src/utils/isClient.ts"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,YAEvB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"isEqual.d.ts","sourceRoot":"","sources":["../../../src/utils/isEqual.ts"],"names":[],"mappings":"AAyCA,wBAAgB,OAAO,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,GAAG,OAAO,CAyBvD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"isServer.d.ts","sourceRoot":"","sources":["../../../src/utils/isServer.ts"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,YAEvB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"isStandaloneMode.d.ts","sourceRoot":"","sources":["../../../src/utils/isStandaloneMode.ts"],"names":[],"mappings":"AAEA,wBAAgB,gBAAgB,YAS/B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"normalizeString.d.ts","sourceRoot":"","sources":["../../../src/utils/normalizeString.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,sBAAsB;IACrC;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB;;;;OAIG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAA;IACjC;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IACd;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB;;;;;OAKG;IACH,wBAAwB,CAAC,EAAE,MAAM,EAAE,CAAA;CACpC;AAaD,wBAAgB,eAAe,CAC7B,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,EAChC,OAAO,CAAC,EAAE,sBAAsB,GAC/B,MAAM,CAmDR"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"scriptLoader.d.ts","sourceRoot":"","sources":["../../../src/utils/scriptLoader.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,MAAM,CAAA;IAClB,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED,qBAAa,YAAY;IACvB,OAAO,CAAC,GAAG,CAAQ;IACnB,OAAO,CAAC,MAAM,CAAC,CAAO;IACtB,OAAO,CAAC,IAAI,CAAS;IACrB,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,UAAU,CAAQ;gBAEd,EAAE,GAAG,EAAE,UAAU,EAAE,IAAW,EAAE,KAAY,EAAE,KAAY,EAAE,EAAE,mBAAmB;IAoBtF,SAAS,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM;IAS/B,IAAI;IAmBX,OAAO,CAAC,YAAY;CA4BrB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"sleep.d.ts","sourceRoot":"","sources":["../../../src/utils/sleep.ts"],"names":[],"mappings":"AAAA,wBAAgB,KAAK,CAAC,QAAQ,EAAE,MAAM,oBAErC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"swipeHandler.d.ts","sourceRoot":"","sources":["../../../src/utils/swipeHandler.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;IAC1B,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;IACxB,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;IACxB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;CAC1B;AAED,MAAM,MAAM,kBAAkB,GAAG,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAA;AAC5D,MAAM,MAAM,mBAAmB,GAAG,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAA;AAE/D;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B;;;OAGG;IACH,OAAO,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,IAAI,CAAA;IACrC;;;OAGG;IACH,MAAM,CAAC,EAAE,kBAAkB,CAAA;IAC3B;;;OAGG;IACH,OAAO,CAAC,EAAE,kBAAkB,CAAA;IAC5B;;;OAGG;IACH,IAAI,CAAC,EAAE,kBAAkB,CAAA;IACzB;;;OAGG;IACH,MAAM,CA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O,EAAE,wBAAwB,CAAA;gBAEnB,WAAW,EAAE,YAAY;IAmB9C,OAAO,CAAC,cAAc;IAatB,OAAO,CAAC,aAAa;IAUrB,OAAO,CAAC,UAAU;IAqBlB,OAAO,CAAC,gBAAgB;IAIxB,OAAO,CAAC,kBAAkB;IAM1B,OAAO,CAAC,iBAAiB;IAWzB,OAAO,CAAC,eAAe;IAqBvB,OAAO,CAAC,cAAc;IAKtB,OAAO,CAAC,YAAY;IA8BpB,OAAO,CAAC,WAAW;CAUpB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"throttle.d.ts","sourceRoot":"","sources":["../../../src/utils/throttle.ts"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,UAAU,CAAC,CAAC,CAAC,EAC1E,IAAI,EAAE,CAAC,EACP,KAAK,EAAE,MAAM,GACZ,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,IAAI,CAqBlC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"throttleId.d.ts","sourceRoot":"","sources":["../../../src/utils/throttleId.ts"],"names":[],"mappings":"AAAA,KAAK,aAAa,CAAC,CAAC,EAAE,IAAI,SAAS,OAAO,EAAE,IAAI,CAAC,GAAG,IAAI,EAAE,IAAI,KAAK,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;AAQjF;;GAEG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,IAAI,SAAS,OAAO,EAAE,EAClD,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,aAAa,CAAC,CAAC,EAAE,IAAI,CAAC,EAC5B,QAAQ,EAAE,MAAM,GACf,CAAC,GAAG,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,CAkC/B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"truthyFilter.d.ts","sourceRoot":"","sources":["../../../src/utils/truthyFilter.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-1,42 +0,0 @@
1
- import { checkAvailability as e } from "./checkAvailability.js";
2
- import { countryCodeToUnicodeFlag as p } from "./countryCodeToUnicodeFlag.js";
3
- import { debounce as x } from "./debounce.js";
4
- import { debounceCallback as i } from "./debounceCallback.js";
5
- import { debounceId as a } from "./debounceId.js";
6
- import { getCountryFlagUrl as n } from "./getCountryFlagUrl.js";
7
- import { IdleTimeout as u } from "./idleTimeout.js";
8
- import { isClient as b } from "./isClient.js";
9
- import { isEqual as y } from "./isEqual.js";
10
- import { isServer as h } from "./isServer.js";
11
- import { isStandaloneMode as F } from "./isStandaloneMode.js";
12
- import { normalizeString as T } from "./normalizeString.js";
13
- import { ScriptLoader as k } from "./scriptLoader.js";
14
- import { sleep as w } from "./sleep.js";
15
- import { Swipe as q } from "./swipeHandler.js";
16
- import { TextareaAutogrow as E } from "./TextareaAutogrow.js";
17
- import { throttle as M } from "./throttle.js";
18
- import { throttleId as j } from "./throttleId.js";
19
- import { truthyFilter as D } from "./truthyFilter.js";
20
- import { UserVisibility as H } from "./userVisibility.js";
21
- export {
22
- u as IdleTimeout,
23
- k as ScriptLoader,
24
- q as Swipe,
25
- E as TextareaAutogrow,
26
- H as UserVisibility,
27
- e as checkAvailability,
28
- p as countryCodeToUnicodeFlag,
29
- x as debounce,
30
- i as debounceCallback,
31
- a as debounceId,
32
- n as getCountryFlagUrl,
33
- b as isClient,
34
- y as isEqual,
35
- h as isServer,
36
- F as isStandaloneMode,
37
- T as normalizeString,
38
- w as sleep,
39
- M as throttle,
40
- j as throttleId,
41
- D as truthyFilter
42
- };
@@ -1,6 +0,0 @@
1
- function e() {
2
- return typeof document > "u" || typeof window > "u";
3
- }
4
- export {
5
- e as isServer
6
- };
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes