meticulous-ui 3.1.2 β†’ 3.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.
package/README.md CHANGED
@@ -362,14 +362,48 @@ import blue from 'meticulous-ui/colors/blue';
362
362
 
363
363
  ## πŸ“¦ Utils
364
364
 
365
- | Functions | Description |
366
- | ----------------- | -------------------------------------------------------------------------------------------------------------- |
367
- | `capFirstLetter` | Takes a string and returns with first letter capitalised |
368
- | `compose` | Performs right-to-left function composition using transforming function |
369
- | `hasEqualProps` | Takes two args: Component’s previous props & its new props; returns true if all-non functional props are equal |
370
- | `isNonEmptyArray` | Takes an array & returns true if is not empty |
371
- | `randomInt` | Takes min, max integer & returns random integer between them |
372
- | `randomValue` | Takes min, max value & returns random value between them |
365
+ ### General
366
+
367
+ | Function | Signature | Description |
368
+ | ------------- | -------------------------- | ----------------------------------------- |
369
+ | `compose` | `(...funcs) β†’ (val) β†’ any` | Right-to-left function composition |
370
+ | `randomInt` | `(min, max) β†’ number` | Random integer in `[min, floor(max + 1))` |
371
+ | `randomValue` | `(min, max) β†’ number` | Random float in `[min, max + 1)` |
372
+
373
+ ### Data Utilities
374
+
375
+ | Function | Signature | Description |
376
+ | ----------------- | -------------------------------- | ------------------------------------------------------------------------ |
377
+ | `deepClone` | `(obj) β†’ any` | Recursively clones objects, arrays, and Dates with no shared references |
378
+ | `mergeDeep` | `(target, source) β†’ object` | Deep-merges source into target; source wins on conflicts |
379
+ | `pick` | `(obj, keys) β†’ object` | Returns a new object with only the specified keys |
380
+ | `omit` | `(obj, keys) β†’ object` | Returns a new object without the specified keys |
381
+ | `isEmpty` | `(value) β†’ boolean` | `true` for `null`, `undefined`, `""`, `[]`, `{}` |
382
+ | `isEqual` | `(a, b) β†’ boolean` | Deep structural equality β€” handles objects, arrays, and Dates |
383
+ | `hasEqualProps` | `(oldProps, newProps) β†’ boolean` | Deep equality ignoring function-valued keys; ideal for `React.memo` |
384
+ | `isNonEmptyArray` | `(arr) β†’ boolean` | `true` only when the value is an array with at least one element |
385
+ | `flattenObject` | `(obj, prefix?) β†’ object` | Collapses nested object to dot-notation keys |
386
+ | `groupBy` | `(array, key) β†’ object` | Groups array items into an object of arrays keyed by a field or function |
387
+ | `keyBy` | `(array, key) β†’ object` | Converts an array into a lookup object keyed by a field or function |
388
+ | `uniqueBy` | `(array, key) β†’ array` | Removes duplicates by a field or function; first occurrence wins |
389
+ | `sortBy` | `(array, key) β†’ array` | Ascending sort by a field or function; non-mutating |
390
+ | `chunk` | `(array, size) β†’ array[]` | Splits array into consecutive chunks of the given size |
391
+
392
+ ### String Utilities
393
+
394
+ | Function | Signature | Description |
395
+ | ------------------- | ----------------------- | ------------------------------------------------------------------- |
396
+ | `capitalize` | `(str) β†’ string` | Uppercases first character, lowercases the rest |
397
+ | `titleCase` | `(str) β†’ string` | Capitalizes the first letter of every word |
398
+ | `camelCase` | `(str) β†’ string` | Converts to `camelCase` from spaces, hyphens, or underscores |
399
+ | `snakeCase` | `(str) β†’ string` | Converts to `snake_case` from camelCase, spaces, or hyphens |
400
+ | `kebabCase` | `(str) β†’ string` | Converts to `kebab-case` from camelCase, spaces, or underscores |
401
+ | `truncate` | `(str, limit) β†’ string` | Trims to `limit` characters and appends `…` |
402
+ | `slugify` | `(str) β†’ string` | URL-safe slug β€” strips diacritics, removes special chars |
403
+ | `removeExtraSpaces` | `(str) β†’ string` | Trims and collapses internal whitespace runs to a single space |
404
+ | `maskEmail` | `(str) β†’ string` | Shows only the first character of the local part, e.g. `j***@x.com` |
405
+ | `maskPhone` | `(str) β†’ string` | Masks all digits except the last four; preserves formatting chars |
406
+ | `generateInitials` | `(name) β†’ string` | Extracts uppercased first letter of each word, e.g. `"JD"` |
373
407
 
374
408
  ## 🌱 Features
375
409
 
@@ -1,9 +1,9 @@
1
1
  import { jsxs as X, jsx as r } from "react/jsx-runtime";
2
- import { useState as a, useRef as T, useEffect as E } from "react";
2
+ import { useState as c, useRef as T, useEffect as E } from "react";
3
3
  import de from "../Icons/ChevronLeft/ChevronLeft.js";
4
4
  import he from "../Icons/ChevronRight/ChevronRight.js";
5
- import { Wrapper as fe, SlideArea as me, NavButton as A, SlideViewport as pe, SlideTrack as ve, PauseButton as we, ProgressBar as ge, DotsWrapper as Me, Dot as be } from "./styles.js";
6
- const I = 50, R = 2e3, $e = () => /* @__PURE__ */ X("svg", { width: 12, height: 12, viewBox: "0 0 12 12", fill: "currentColor", "aria-hidden": "true", children: [
5
+ import { Wrapper as fe, SlideArea as me, NavButton as A, SlideViewport as pe, SlideTrack as ve, PauseButton as we, ProgressBar as ge, DotsWrapper as $e, Dot as Me } from "./styles.js";
6
+ const I = 50, R = 2e3, be = () => /* @__PURE__ */ X("svg", { width: 12, height: 12, viewBox: "0 0 12 12", fill: "currentColor", "aria-hidden": "true", children: [
7
7
  /* @__PURE__ */ r("rect", { x: "2", y: "1", width: "3", height: "10", rx: "1" }),
8
8
  /* @__PURE__ */ r("rect", { x: "7", y: "1", width: "3", height: "10", rx: "1" })
9
9
  ] }), xe = () => /* @__PURE__ */ r("svg", { width: 12, height: 12, viewBox: "0 0 12 12", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ r("path", { d: "M2 1.5l9 4.5-9 4.5V1.5z" }) }), Ce = ({
@@ -11,77 +11,77 @@ const I = 50, R = 2e3, $e = () => /* @__PURE__ */ X("svg", { width: 12, height:
11
11
  renderCarousel: Y,
12
12
  visibleSlides: k = 1,
13
13
  hasArrow: B = !0,
14
- overlayArrows: o = !1,
14
+ overlayArrows: i = !1,
15
15
  arrowTop: v,
16
16
  areDotsHidden: G = !1,
17
17
  autoSlide: w = !1,
18
18
  autoSlideSec: C = 3,
19
19
  loop: l = !1,
20
20
  dragToSlide: g = !1,
21
- liveDrag: M = !1,
21
+ liveDrag: $ = !1,
22
22
  liveDragMobile: L = !0,
23
23
  showProgress: J = !1,
24
24
  defaultIndex: Q = 0,
25
25
  onSlideChange: y
26
26
  }) => {
27
27
  var q;
28
- const [n, b] = a(Q), [V, d] = a(!0), [W, F] = a(!1), [h, f] = a(!1), [Z, m] = a(0), [_, p] = a(!1), [D, z] = a(!1), c = T(null), i = T(null), u = T(null), H = T(null);
28
+ const [n, M] = c(Q), [V, d] = c(!0), [W, F] = c(!1), [h, f] = c(!1), [Z, m] = c(0), [_, p] = c(!1), [D, z] = c(!1), a = T(null), o = T(null), u = T(null), H = T(null);
29
29
  E(() => {
30
30
  const e = window.matchMedia("(max-width: 1024px)");
31
31
  z(e.matches);
32
32
  const t = (le) => z(le.matches);
33
33
  return e.addEventListener("change", t), () => e.removeEventListener("change", t);
34
34
  }, []);
35
- const s = P.length - k, $ = () => b((e) => l && e === 0 ? s : Math.max(e - 1, 0)), x = () => b((e) => l && e >= s ? 0 : Math.min(e + 1, s));
35
+ const s = P.length - k, b = () => M((e) => l && e === 0 ? s : Math.max(e - 1, 0)), x = () => M((e) => l && e >= s ? 0 : Math.min(e + 1, s));
36
36
  E(() => {
37
37
  y == null || y(n);
38
38
  }, [n]);
39
39
  const U = () => {
40
- o && (clearTimeout(u.current), d(!0), u.current = setTimeout(() => d(!1), R));
40
+ i && (clearTimeout(u.current), d(!0), u.current = setTimeout(() => d(!1), R));
41
41
  }, S = () => {
42
- f(!0), o && (clearTimeout(u.current), d(!0));
42
+ f(!0), i && (clearTimeout(u.current), d(!0));
43
43
  }, ee = () => {
44
- f(!1), o && (u.current = setTimeout(() => d(!1), R));
44
+ f(!1), i && (u.current = setTimeout(() => d(!1), R));
45
45
  };
46
46
  E(() => {
47
- if (o)
47
+ if (i)
48
48
  return u.current = setTimeout(() => d(!1), R), () => clearTimeout(u.current);
49
- }, [o]), E(() => {
49
+ }, [i]), E(() => {
50
50
  if (!w || h) return;
51
51
  const e = setInterval(() => {
52
- b((t) => t >= s ? 0 : t + 1);
52
+ M((t) => t >= s ? 0 : t + 1);
53
53
  }, C * 1e3);
54
54
  return () => clearInterval(e);
55
55
  }, [w, C, h, s]);
56
56
  const j = (e) => l ? e : n === 0 && e > 0 || n === s && e < 0 ? e * 0.3 : e, te = (e) => {
57
- c.current = e.touches[0].clientX, L && D && p(!0), U();
57
+ a.current = e.touches[0].clientX, L && D && p(!0), U();
58
58
  }, re = (e) => {
59
- !L || !D || c.current === null || m(j(e.touches[0].clientX - c.current));
59
+ !L || !D || a.current === null || m(j(e.touches[0].clientX - a.current));
60
60
  }, ne = (e) => {
61
- if (L && D && (p(!1), m(0)), c.current === null) return;
62
- const t = c.current - e.changedTouches[0].clientX;
63
- t > I ? x() : t < -I && $(), c.current = null;
61
+ if (L && D && (p(!1), m(0)), a.current === null) return;
62
+ const t = a.current - e.changedTouches[0].clientX;
63
+ t > I ? x() : t < -I && b(), a.current = null;
64
64
  }, se = (e) => {
65
- g && (i.current = e.clientX, M && p(!0));
66
- }, oe = (e) => {
67
- !g || !M || i.current === null || m(j(e.clientX - i.current));
65
+ g && (o.current = e.clientX, $ && p(!0));
68
66
  }, ie = (e) => {
69
- if (!g || i.current === null) return;
70
- M && (p(!1), m(0));
71
- const t = i.current - e.clientX;
72
- t > I ? x() : t < -I && $(), i.current = null;
73
- }, ae = (e) => {
74
- e.key === "ArrowLeft" ? (e.preventDefault(), $()) : e.key === "ArrowRight" && (e.preventDefault(), x());
75
- }, K = ((q = H.current) == null ? void 0 : q.clientWidth) ?? 0, ce = K > 0 ? Z / K * 100 : 0, ue = -(n * (100 / k)) + ce, N = v !== void 0 ? typeof v == "number" ? `${v}px` : v : void 0, O = s + 1;
67
+ !g || !$ || o.current === null || m(j(e.clientX - o.current));
68
+ }, oe = (e) => {
69
+ if (!g || o.current === null) return;
70
+ $ && (p(!1), m(0));
71
+ const t = o.current - e.clientX;
72
+ t > I ? x() : t < -I && b(), o.current = null;
73
+ }, ce = (e) => {
74
+ e.key === "ArrowLeft" ? (e.preventDefault(), b()) : e.key === "ArrowRight" && (e.preventDefault(), x());
75
+ }, K = ((q = H.current) == null ? void 0 : q.clientWidth) ?? 0, ae = K > 0 ? Z / K * 100 : 0, ue = -(n * (100 / k)) + ae, N = v !== void 0 ? typeof v == "number" ? `${v}px` : v : void 0, O = s + 1;
76
76
  return /* @__PURE__ */ X(
77
77
  fe,
78
78
  {
79
79
  onClick: U,
80
80
  onMouseEnter: S,
81
81
  onMouseLeave: ee,
82
- onMouseMove: oe,
83
- onMouseUp: ie,
84
- onKeyDown: ae,
82
+ onMouseMove: ie,
83
+ onMouseUp: oe,
84
+ onKeyDown: ce,
85
85
  role: "region",
86
86
  "aria-label": "Carousel",
87
87
  children: [
@@ -95,10 +95,11 @@ const I = 50, R = 2e3, $e = () => /* @__PURE__ */ X("svg", { width: 12, height:
95
95
  B && /* @__PURE__ */ r(
96
96
  A,
97
97
  {
98
- onClick: $,
98
+ onClick: b,
99
99
  disabled: !l && n === 0,
100
100
  "aria-label": "Previous slide",
101
- $overlay: o,
101
+ $direction: "prev",
102
+ $overlay: i,
102
103
  $visible: V,
103
104
  $arrowTop: N,
104
105
  $viewportFocused: W,
@@ -120,7 +121,7 @@ const I = 50, R = 2e3, $e = () => /* @__PURE__ */ X("svg", { width: 12, height:
120
121
  },
121
122
  onMouseDown: se,
122
123
  onMouseLeave: (e) => {
123
- e.buttons !== 1 && (M && _ && (p(!1), m(0)), i.current = null);
124
+ e.buttons !== 1 && ($ && _ && (p(!1), m(0)), o.current = null);
124
125
  },
125
126
  children: /* @__PURE__ */ r(ve, { $translateX: ue, $visibleSlides: k, $dragging: _, children: P.map(Y) })
126
127
  }
@@ -131,7 +132,8 @@ const I = 50, R = 2e3, $e = () => /* @__PURE__ */ X("svg", { width: 12, height:
131
132
  onClick: x,
132
133
  disabled: !l && n === s,
133
134
  "aria-label": "Next slide",
134
- $overlay: o,
135
+ $direction: "next",
136
+ $overlay: i,
135
137
  $visible: V,
136
138
  $arrowTop: N,
137
139
  $viewportFocused: W,
@@ -143,7 +145,7 @@ const I = 50, R = 2e3, $e = () => /* @__PURE__ */ X("svg", { width: 12, height:
143
145
  {
144
146
  onClick: () => f((e) => !e),
145
147
  "aria-label": h ? "Play slideshow" : "Pause slideshow",
146
- children: h ? /* @__PURE__ */ r(xe, {}) : /* @__PURE__ */ r($e, {})
148
+ children: h ? /* @__PURE__ */ r(xe, {}) : /* @__PURE__ */ r(be, {})
147
149
  }
148
150
  )
149
151
  ]
@@ -171,11 +173,11 @@ const I = 50, R = 2e3, $e = () => /* @__PURE__ */ X("svg", { width: 12, height:
171
173
  }
172
174
  ),
173
175
  w && J && /* @__PURE__ */ r(ge, { $duration: C, $paused: h }, n),
174
- !G && /* @__PURE__ */ r(Me, { children: Array.from({ length: O }).map((e, t) => /* @__PURE__ */ r(
175
- be,
176
+ !G && /* @__PURE__ */ r($e, { children: Array.from({ length: O }).map((e, t) => /* @__PURE__ */ r(
177
+ Me,
176
178
  {
177
179
  $active: t === n,
178
- onClick: () => b(t),
180
+ onClick: () => M(t),
179
181
  "aria-label": `Slide ${t + 1} of ${O}`,
180
182
  "aria-current": t === n ? "true" : void 0
181
183
  },
@@ -54,13 +54,7 @@ const d = o.div`
54
54
  opacity 0.3s;
55
55
  padding: 0;
56
56
 
57
- &:first-of-type {
58
- left: ${({ $overlay: e }) => e ? "12px" : "-16px"};
59
- }
60
-
61
- &:last-of-type {
62
- right: ${({ $overlay: e }) => e ? "12px" : "-16px"};
63
- }
57
+ ${({ $direction: e, $overlay: t }) => e === "prev" ? `left: ${t ? "12px" : "-16px"};` : `right: ${t ? "12px" : "-16px"};`}
64
58
 
65
59
  &:hover:not(:disabled) {
66
60
  background: #f5f5f5;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "meticulous-ui",
3
- "version": "3.1.2",
3
+ "version": "3.2.0",
4
4
  "license": "MIT",
5
5
  "description": "A comprehensive React UI component library with a wide range of customizable components, icons, colors, and utilities for building modern web applications.",
6
6
  "main": "./index.js",
@@ -0,0 +1,4 @@
1
+ const a = (e) => typeof e != "string" ? e : e.trim().toLowerCase().replace(/[-_\s]+(.)?/g, (r, t) => t ? t.toUpperCase() : "");
2
+ export {
3
+ a as default
4
+ };
@@ -1,4 +1,4 @@
1
- const t = (e) => typeof e != "string" || e.length === 0 ? e : e.charAt(0).toUpperCase() + e.slice(1);
1
+ const t = (e) => typeof e != "string" || e.length === 0 ? e : e.charAt(0).toUpperCase() + e.slice(1).toLowerCase();
2
2
  export {
3
3
  t as default
4
4
  };
package/utils/chunk.js ADDED
@@ -0,0 +1,9 @@
1
+ const s = (e, l) => {
2
+ const n = [];
3
+ for (let t = 0; t < e.length; t += l)
4
+ n.push(e.slice(t, t + l));
5
+ return n;
6
+ };
7
+ export {
8
+ s as default
9
+ };
@@ -0,0 +1,4 @@
1
+ const t = (e) => e === null || typeof e != "object" ? e : e instanceof Date ? new Date(e.getTime()) : Array.isArray(e) ? e.map(t) : Object.fromEntries(Object.entries(e).map(([r, n]) => [r, t(n)]));
2
+ export {
3
+ t as default
4
+ };
@@ -0,0 +1,7 @@
1
+ const u = (o, r = "") => Object.entries(o).reduce((t, [s, e]) => {
2
+ const n = r ? `${r}.${s}` : s;
3
+ return e !== null && typeof e == "object" && !Array.isArray(e) ? Object.assign(t, u(e, n)) : t[n] = e, t;
4
+ }, {});
5
+ export {
6
+ u as default
7
+ };
@@ -0,0 +1,4 @@
1
+ const e = (t) => typeof t != "string" ? t : t.trim().split(/\s+/).filter(Boolean).map((r) => r.charAt(0).toUpperCase()).join("");
2
+ export {
3
+ e as default
4
+ };
@@ -0,0 +1,7 @@
1
+ const s = (r, o) => r.reduce((n, t) => {
2
+ const u = typeof o == "function" ? o(t) : t[o];
3
+ return (n[u] ?? (n[u] = [])).push(t), n;
4
+ }, {});
5
+ export {
6
+ s as default
7
+ };
package/utils/index.js CHANGED
@@ -1,13 +1,62 @@
1
- import o from "./capFirstLetter.js";
2
- import r from "./compose.js";
3
- import t from "./hasEqualProps.js";
4
- import m from "./isNonEmptyArray.js";
5
- const e = {
6
- capFirstLetter: o,
7
- compose: r,
8
- hasEqualProps: t,
9
- isNonEmptyArray: m
1
+ import r from "./capitalize.js";
2
+ import o from "./camelCase.js";
3
+ import m from "./chunk.js";
4
+ import t from "./compose.js";
5
+ import i from "./deepClone.js";
6
+ import p from "./flattenObject.js";
7
+ import e from "./generateInitials.js";
8
+ import f from "./groupBy.js";
9
+ import a from "./hasEqualProps.js";
10
+ import s from "./isEmpty.js";
11
+ import n from "./isEqual.js";
12
+ import l from "./isNonEmptyArray.js";
13
+ import c from "./kebabCase.js";
14
+ import u from "./keyBy.js";
15
+ import y from "./maskEmail.js";
16
+ import k from "./maskPhone.js";
17
+ import E from "./mergeDeep.js";
18
+ import d from "./omit.js";
19
+ import C from "./pick.js";
20
+ import g from "./randomInt.js";
21
+ import B from "./randomValue.js";
22
+ import b from "./removeExtraSpaces.js";
23
+ import h from "./slugify.js";
24
+ import q from "./snakeCase.js";
25
+ import x from "./sortBy.js";
26
+ import I from "./titleCase.js";
27
+ import P from "./truncate.js";
28
+ import j from "./uniqueBy.js";
29
+ const mr = {
30
+ capFirstLetter: r,
31
+ capitalize: r,
32
+ camelCase: o,
33
+ chunk: m,
34
+ compose: t,
35
+ deepClone: i,
36
+ flattenObject: p,
37
+ generateInitials: e,
38
+ groupBy: f,
39
+ hasEqualProps: a,
40
+ isEmpty: s,
41
+ isEqual: n,
42
+ isNonEmptyArray: l,
43
+ kebabCase: c,
44
+ keyBy: u,
45
+ maskEmail: y,
46
+ maskPhone: k,
47
+ mergeDeep: E,
48
+ omit: d,
49
+ pick: C,
50
+ randomInt: g,
51
+ randomValue: B,
52
+ removeExtraSpaces: b,
53
+ slugify: h,
54
+ snakeCase: q,
55
+ sortBy: x,
56
+ titleCase: I,
57
+ truncate: P,
58
+ uniqueBy: j
10
59
  };
11
60
  export {
12
- e as default
61
+ mr as default
13
62
  };
@@ -0,0 +1,4 @@
1
+ const r = (t) => t == null ? !0 : typeof t == "string" || Array.isArray(t) ? t.length === 0 : typeof t == "object" ? Object.keys(t).length === 0 : !1;
2
+ export {
3
+ r as default
4
+ };
@@ -0,0 +1,10 @@
1
+ const f = (e, t) => {
2
+ if (e === t) return !0;
3
+ if (e instanceof Date && t instanceof Date) return e.getTime() === t.getTime();
4
+ if (typeof e != "object" || typeof t != "object" || e === null || t === null || Array.isArray(e) !== Array.isArray(t)) return !1;
5
+ const r = Object.keys(e), s = Object.keys(t);
6
+ return r.length !== s.length ? !1 : r.every((n) => f(e[n], t[n]));
7
+ };
8
+ export {
9
+ f as default
10
+ };
@@ -0,0 +1,4 @@
1
+ const a = (e) => typeof e != "string" ? e : e.trim().replace(/([a-z])([A-Z])/g, "$1-$2").replace(/[_\s]+/g, "-").toLowerCase();
2
+ export {
3
+ a as default
4
+ };
package/utils/keyBy.js ADDED
@@ -0,0 +1,4 @@
1
+ const u = (t, n) => t.reduce((r, o) => (r[typeof n == "function" ? n(o) : o[n]] = o, r), {});
2
+ export {
3
+ u as default
4
+ };
@@ -0,0 +1,8 @@
1
+ const e = (t) => {
2
+ if (typeof t != "string") return t;
3
+ const [n, a] = t.split("@");
4
+ return a ? n.charAt(0) + "***@" + a : t;
5
+ };
6
+ export {
7
+ e as default
8
+ };
@@ -0,0 +1,9 @@
1
+ const o = (e) => {
2
+ if (typeof e != "string") return e;
3
+ const t = e.replace(/\D/g, ""), a = Math.max(0, t.length - 4);
4
+ let n = 0;
5
+ return e.replace(/\d/g, () => n++ < a ? "*" : t[n - 1]);
6
+ };
7
+ export {
8
+ o as default
9
+ };
@@ -0,0 +1,9 @@
1
+ const s = (e) => e !== null && typeof e == "object" && !Array.isArray(e), l = (e, n) => {
2
+ const o = { ...e };
3
+ for (const t of Object.keys(n))
4
+ o[t] = s(e[t]) && s(n[t]) ? l(e[t], n[t]) : n[t];
5
+ return o;
6
+ };
7
+ export {
8
+ l as default
9
+ };
package/utils/omit.js ADDED
@@ -0,0 +1,7 @@
1
+ const n = (t, e) => {
2
+ const r = new Set(e);
3
+ return Object.fromEntries(Object.entries(t).filter(([s]) => !r.has(s)));
4
+ };
5
+ export {
6
+ n as default
7
+ };
package/utils/pick.js ADDED
@@ -0,0 +1,4 @@
1
+ const r = (e, i) => Object.fromEntries(i.filter((t) => t in e).map((t) => [t, e[t]]));
2
+ export {
3
+ r as default
4
+ };
@@ -0,0 +1,5 @@
1
+ import t from "./randomValue.js";
2
+ const n = (o, r) => Math.floor(t(o, r));
3
+ export {
4
+ n as default
5
+ };
@@ -0,0 +1,4 @@
1
+ const t = (a, r) => Math.random() * (r - a + 1) + a;
2
+ export {
3
+ t as default
4
+ };
@@ -0,0 +1,4 @@
1
+ const r = (e) => typeof e != "string" ? e : e.trim().replace(/\s+/g, " ");
2
+ export {
3
+ r as default
4
+ };
@@ -0,0 +1,4 @@
1
+ const r = (e) => typeof e != "string" ? e : e.trim().toLowerCase().normalize("NFD").replace(/[Μ€-Ν―]/g, "").replace(/[^a-z0-9\s-]/g, "").replace(/\s+/g, "-").replace(/-+/g, "-");
2
+ export {
3
+ r as default
4
+ };
@@ -0,0 +1,4 @@
1
+ const a = (e) => typeof e != "string" ? e : e.trim().replace(/([a-z])([A-Z])/g, "$1_$2").replace(/[-\s]+/g, "_").toLowerCase();
2
+ export {
3
+ a as default
4
+ };
@@ -0,0 +1,7 @@
1
+ const r = (f, t) => [...f].sort((o, n) => {
2
+ const s = typeof t == "function" ? t(o) : o[t], c = typeof t == "function" ? t(n) : n[t];
3
+ return s < c ? -1 : s > c ? 1 : 0;
4
+ });
5
+ export {
6
+ r as default
7
+ };
@@ -0,0 +1,4 @@
1
+ const a = (e) => typeof e != "string" ? e : e.toLowerCase().split(" ").map((t) => t.charAt(0).toUpperCase() + t.slice(1)).join(" ");
2
+ export {
3
+ a as default
4
+ };
@@ -0,0 +1,4 @@
1
+ const t = (e, n) => typeof e != "string" || e.length <= n ? e : e.slice(0, n) + "…";
2
+ export {
3
+ t as default
4
+ };
@@ -0,0 +1,10 @@
1
+ const s = (u, t) => {
2
+ const e = /* @__PURE__ */ new Set();
3
+ return u.filter((n) => {
4
+ const r = typeof t == "function" ? t(n) : n[t];
5
+ return e.has(r) ? !1 : (e.add(r), !0);
6
+ });
7
+ };
8
+ export {
9
+ s as default
10
+ };