UNPKG

@nexusui/components

Version:

These are custom components specially-developed for NexusUI applications. They will make your life easier by giving you out-of-the-box implementations for various high-level UI elements that you can drop directly into your application.

2 lines (1 loc) 284 B
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@lexical/selection");exports.getSelectedNode=function(o){const t=o.anchor,r=o.focus,c=o.anchor.getNode(),s=o.focus.getNode();return c===s?c:o.isBackward()?e.$isAtNodeEnd(r)?c:s:e.$isAtNodeEnd(t)?c:s};