@underverse-ui/underverse 1.0.204 → 1.0.205

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,11 +1,11 @@
1
1
  import {
2
2
  getPanelBorderRadiusClass,
3
3
  useUnderverseUIConfig
4
- } from "./chunk-KFTYWTJR.js";
4
+ } from "./chunk-MJV7ETJM.js";
5
5
  import {
6
6
  cn,
7
7
  useGlobalI18n
8
- } from "./chunk-GSBRTFP2.js";
8
+ } from "./chunk-XJR7E6QB.js";
9
9
 
10
10
  // src/components/Modal.tsx
11
11
  import * as React from "react";
@@ -196,4 +196,4 @@ var Modal_default = Modal;
196
196
  export {
197
197
  Modal_default
198
198
  };
199
- //# sourceMappingURL=chunk-QVQTWZ24.js.map
199
+ //# sourceMappingURL=chunk-7U3Y7R7U.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  cn
3
- } from "./chunk-GSBRTFP2.js";
3
+ } from "./chunk-XJR7E6QB.js";
4
4
 
5
5
  // src/components/emoji-ui.tsx
6
6
  import React from "react";
@@ -71,4 +71,4 @@ export {
71
71
  getEmojiImageUrl,
72
72
  EmojiGridButton
73
73
  };
74
- //# sourceMappingURL=chunk-ZUAIBY2Z.js.map
74
+ //# sourceMappingURL=chunk-IXEFOLUD.js.map
@@ -5,7 +5,7 @@ import {
5
5
  mergeRefs,
6
6
  setRefValue,
7
7
  useSmartTranslations
8
- } from "./chunk-GSBRTFP2.js";
8
+ } from "./chunk-XJR7E6QB.js";
9
9
 
10
10
  // src/contexts/UnderverseConfigContext.tsx
11
11
  import * as React from "react";
@@ -2611,6 +2611,25 @@ function resolveEventElement(target) {
2611
2611
  if (target instanceof Node) return target.parentElement;
2612
2612
  return null;
2613
2613
  }
2614
+ function isPointOverRenderedText(root, clientX, clientY) {
2615
+ const view = root.ownerDocument.defaultView;
2616
+ if (!view) return false;
2617
+ const walker = root.ownerDocument.createTreeWalker(root, view.NodeFilter.SHOW_TEXT);
2618
+ let textNode = walker.nextNode();
2619
+ while (textNode) {
2620
+ if (textNode.textContent?.length) {
2621
+ const range = root.ownerDocument.createRange();
2622
+ range.selectNodeContents(textNode);
2623
+ const textRects = Array.from(range.getClientRects());
2624
+ range.detach?.();
2625
+ if (textRects.some((rect) => clientX >= rect.left && clientX <= rect.right && clientY >= rect.top && clientY <= rect.bottom)) {
2626
+ return true;
2627
+ }
2628
+ }
2629
+ textNode = walker.nextNode();
2630
+ }
2631
+ return false;
2632
+ }
2614
2633
  function getSelectionTableCell(view) {
2615
2634
  const browserSelection = window.getSelection();
2616
2635
  const anchorElement = resolveEventElement(browserSelection?.anchorNode ?? null);
@@ -4437,6 +4456,7 @@ export {
4437
4456
  UEDITOR_TABLE_LAYOUT_CHANGE_EVENT,
4438
4457
  findTableRowNodeInfo,
4439
4458
  resolveEventElement,
4459
+ isPointOverRenderedText,
4440
4460
  getSelectionTableCell,
4441
4461
  isRowResizeHotspot,
4442
4462
  isColumnResizeHotspot,
@@ -4478,4 +4498,4 @@ export {
4478
4498
  EditorToolbar,
4479
4499
  UEDITOR_PROSEMIRROR_CLASS_NAME
4480
4500
  };
4481
- //# sourceMappingURL=chunk-KFTYWTJR.js.map
4501
+ //# sourceMappingURL=chunk-MJV7ETJM.js.map