@layers-app/shared 0.3.6 → 0.3.7

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.
@@ -1 +1 @@
1
- {"version":3,"file":"EmojiPanel.d.ts","sourceRoot":"","sources":["../../../src/components/EmojiPicker/EmojiPanel.tsx"],"names":[],"mappings":"AAyCA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAsBjD,eAAO,MAAM,UAAU,GAAI,6DAMxB,IAAI,CAAC,gBAAgB,EAAE,SAAS,GAAG,OAAO,GAAG,UAAU,GAAG,aAAa,CAAC,GAAG;IAC5E,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC,4CAgTA,CAAC"}
1
+ {"version":3,"file":"EmojiPanel.d.ts","sourceRoot":"","sources":["../../../src/components/EmojiPicker/EmojiPanel.tsx"],"names":[],"mappings":"AAyCA,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAsBjD,eAAO,MAAM,UAAU,GAAI,6DAMxB,IAAI,CAAC,gBAAgB,EAAE,SAAS,GAAG,OAAO,GAAG,UAAU,GAAG,aAAa,CAAC,GAAG;IAC5E,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC,4CAiTA,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { jsxs as y, jsx as t } from "react/jsx-runtime";
2
- import { useState as d, useRef as m, useEffect as R, useCallback as K } from "react";
2
+ import { useState as d, useRef as p, useEffect as R, useCallback as K } from "react";
3
3
  import { useTranslation as L } from "react-i18next";
4
4
  import { Search01Icon as U, ShuffleIcon as V, Clock01Icon as W, SmileIcon as X, Pizza01Icon as Z, FootballIcon as _, Airplane01Icon as ee, BulbIcon as te, Asterisk02Icon as oe, Flag02Icon as re } from "@hugeicons/core-free-icons";
5
5
  import { HugeiconsIcon as c } from "@hugeicons/react";
@@ -10,8 +10,8 @@ import le from "../../assets/svg/dog.svg.js";
10
10
  import { pickRandomEmoji as fe } from "../../helpers/pickRandomEmoji.js";
11
11
  import { NoData as ue } from "../NoData/NoData.js";
12
12
  import { IconEntity as de } from "../ProjectIcon/ProjectIcon.js";
13
- import { frequentEmoji as me } from "./constants.js";
14
- import { getEmojis as pe } from "./utils.js";
13
+ import { frequentEmoji as pe } from "./constants.js";
14
+ import { getEmojis as me } from "./utils.js";
15
15
  import T from "./EmojiPicker.module.css.js";
16
16
  const he = [
17
17
  { i: "frequent", icon: /* @__PURE__ */ t(c, { size: 20, icon: W }) },
@@ -31,27 +31,27 @@ const he = [
31
31
  onChange: C,
32
32
  onClose: M,
33
33
  setRandomIcon: P,
34
- querySearch: p
34
+ querySearch: m
35
35
  }) => {
36
- const [b, k] = d("frequent"), x = m("frequent"), h = m({}), I = m(null), [S, w] = d(""), [Q, O] = d([]), [a, B] = d(null), [E, j] = d([]), { t: G } = L(), g = m(!1), l = m(null);
36
+ const [b, k] = d("frequent"), x = p("frequent"), h = p({}), I = p(null), [S, w] = d(""), [Q, O] = d([]), [a, B] = d(null), [E, j] = d([]), { t: G } = L(), g = p(!1), l = p(null);
37
37
  R(() => {
38
- if (typeof p == "string") {
39
- const e = p.slice(1);
38
+ if (typeof m == "string") {
39
+ const e = m.slice(1);
40
40
  if (w(e), a) {
41
41
  const o = a.search(e);
42
42
  j(o.map((r) => r.item.e));
43
43
  }
44
44
  }
45
- }, [p, a]), R(() => {
45
+ }, [m, a]), R(() => {
46
46
  (async () => {
47
- const o = await pe(), r = o.flatMap(
47
+ const o = await me(), r = o.flatMap(
48
48
  (i) => i.e.map((n) => ({
49
49
  e: n.e,
50
50
  n: n.n,
51
51
  k: n.k
52
52
  // категория
53
53
  }))
54
- ), s = me.map(
54
+ ), s = pe.map(
55
55
  (i) => r.find((n) => n.e === i)
56
56
  );
57
57
  O([{ i: "frequent", e: s }, ...o]);
@@ -112,7 +112,7 @@ const he = [
112
112
  n < s && (s = n, r = f);
113
113
  }
114
114
  }), r !== x.current && (x.current = r, k(r));
115
- }, J = typeof p == "string";
115
+ }, J = typeof m == "string";
116
116
  return /* @__PURE__ */ y(v, { gap: 0, h: "100%", children: [
117
117
  /* @__PURE__ */ t(ne, { active: !0, children: /* @__PURE__ */ y(
118
118
  z,
@@ -217,6 +217,7 @@ const he = [
217
217
  /* @__PURE__ */ t(
218
218
  F,
219
219
  {
220
+ bg: "transparent",
220
221
  py: 2,
221
222
  px: 6,
222
223
  pos: "sticky",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@layers-app/shared",
3
- "version": "0.3.6",
3
+ "version": "0.3.7",
4
4
  "description": "Shared components, hooks, and utilities for Layers application",
5
5
  "files": [
6
6
  "dist",