@top-message/ui-lib 2.23.77 → 2.23.78

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/dist/index.js CHANGED
@@ -97361,49 +97361,22 @@ function bz1(e) {
97361
97361
  const yz1 = "_emojis_ykz7a_1", wz1 = {
97362
97362
  emojis: yz1
97363
97363
  }, Lz1 = ({
97364
- contentEditableRef: e,
97365
- caretPosition: t,
97366
- setValue: n,
97367
- hasEmojiOrVariable: r,
97368
- showCharInfo: a,
97369
- setHasEmojiOrVariable: o,
97370
- setCaretPosition: i,
97371
- searchPlaceholder: s,
97372
- emojiTitle: l,
97373
- disabled: c = !1
97364
+ searchPlaceholder: e,
97365
+ emojiTitle: t,
97366
+ disabled: n = !1,
97367
+ handleInsertEmoji: r
97374
97368
  }) => {
97375
- const [f, v] = n1(!1), d = nt(
97376
- ({ emoji: C }) => {
97377
- var m;
97378
- const h = e.current, p = window.getSelection();
97379
- if (p && p.rangeCount > 0 && h && h.contains(p.anchorNode)) {
97380
- const b = p.getRangeAt(0), y = document.createTextNode(C);
97381
- if (t === 0 && ((m = h.textContent) == null ? void 0 : m.length) === 0)
97382
- h.append(y);
97383
- else {
97384
- b.deleteContents(), b.insertNode(y);
97385
- const w = document.createRange();
97386
- w.setStartAfter(y), w.setEndAfter(y), p.removeAllRanges(), p.addRange(w);
97387
- }
97388
- n(h.innerHTML), !r && a && o(!0), i(t + C.length);
97389
- }
97390
- v(!1);
97369
+ const [a, o] = n1(!1), i = nt(
97370
+ ({ emoji: s }) => {
97371
+ r(s), o(!1);
97391
97372
  },
97392
- [
97393
- e,
97394
- t,
97395
- n,
97396
- r,
97397
- a,
97398
- o,
97399
- i
97400
- ]
97373
+ [r]
97401
97374
  );
97402
97375
  return /* @__PURE__ */ g(
97403
97376
  sa,
97404
97377
  {
97405
- onOpenChange: (C) => v(C),
97406
- open: f,
97378
+ onOpenChange: (s) => o(s),
97379
+ open: a,
97407
97380
  content: /* @__PURE__ */ g("div", { className: wz1.emojis, children: /* @__PURE__ */ g(
97408
97381
  bz1,
97409
97382
  {
@@ -97411,8 +97384,8 @@ const yz1 = "_emojis_ykz7a_1", wz1 = {
97411
97384
  previewConfig: { showPreview: !1 },
97412
97385
  width: 300,
97413
97386
  height: 300,
97414
- searchPlaceholder: s,
97415
- onEmojiClick: d
97387
+ searchPlaceholder: e,
97388
+ onEmojiClick: i
97416
97389
  }
97417
97390
  ) }),
97418
97391
  trigger: "click",
@@ -97423,8 +97396,8 @@ const yz1 = "_emojis_ykz7a_1", wz1 = {
97423
97396
  iconName: "emoji",
97424
97397
  type: "ghost",
97425
97398
  size: "medium",
97426
- title: l,
97427
- disabled: c
97399
+ title: t,
97400
+ disabled: n
97428
97401
  }
97429
97402
  )
97430
97403
  }
@@ -97835,16 +97808,12 @@ const yz1 = "_emojis_ykz7a_1", wz1 = {
97835
97808
  L && /* @__PURE__ */ g(
97836
97809
  Lz1,
97837
97810
  {
97838
- contentEditableRef: i,
97839
- caretPosition: r,
97840
- setCaretPosition: o,
97841
- setValue: p,
97842
- hasEmojiOrVariable: R,
97843
- showCharInfo: H,
97844
97811
  disabled: S,
97845
- setHasEmojiOrVariable: G,
97846
97812
  searchPlaceholder: m,
97847
- emojiTitle: c
97813
+ emojiTitle: c,
97814
+ handleInsertEmoji: (q) => {
97815
+ I(q);
97816
+ }
97848
97817
  }
97849
97818
  ),
97850
97819
  !N && /* @__PURE__ */ g(