A utils library that is used across most packages of lexi-kit.
-
strings.prefixClassNames- Add a prefix to a group of classes -
getDOMRangeRect- Get a rect from a native DOM selection range -
setFloatingElementPosition- Set the position of a floating element based on a DOM Rect. -
guards.isHTMLElement- A typescript guard that hints that a value is an HTMLElement. -
nodes.getSelectedNode- Get the correct selected node from a lexical RangeSelection.
$ npm install @lexi-kit/utils
# or
$ yarn add @lexi-kit/utils
# or
$ pnpm add @lexi-kit/utils