@onesy/ui-react 1.0.100 → 1.0.101

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.
@@ -600,14 +600,9 @@ const SmartTextField = react_1.default.forwardRef((props_, ref) => {
600
600
  }, 140);
601
601
  }, []);
602
602
  const onMouseDown = react_1.default.useCallback(() => {
603
- var _a, _b;
604
603
  if (!refs.edit.current)
605
604
  return;
606
605
  textQueryUpdate();
607
- const selection_ = refs.rootWindow.current.getSelection();
608
- if (selection_.anchorNode &&
609
- !((_b = (_a = selection_.anchorNode) === null || _a === void 0 ? void 0 : _a.className) === null || _b === void 0 ? void 0 : _b.includes('TextField')))
610
- refs.range.current = selection_.getRangeAt(0);
611
606
  }, []);
612
607
  const onKeyUp = react_1.default.useCallback(() => {
613
608
  if (!refs.edit.current)
@@ -807,7 +802,7 @@ const SmartTextField = react_1.default.forwardRef((props_, ref) => {
807
802
  'onesy-RichTextEditor-palette'
808
803
  ],
809
804
  classes.palette
810
- ]) }, other_, { children: [(0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 0.5, onMouseUp: onMouseUp, onMouseDown: onMouseDown, style: {
805
+ ]) }, other_, { children: [(0, jsx_runtime_1.jsxs)(Line, Object.assign({ gap: 0.5, style: {
811
806
  maxHeight: 136,
812
807
  padding: '10px 10px 0',
813
808
  overflow: 'hidden auto'
@@ -646,8 +646,6 @@ const SmartTextField = /*#__PURE__*/React.forwardRef((props_, ref) => {
646
646
  const onMouseDown = React.useCallback(() => {
647
647
  if (!refs.edit.current) return;
648
648
  textQueryUpdate();
649
- const selection_ = refs.rootWindow.current.getSelection();
650
- if (selection_.anchorNode && !selection_.anchorNode?.className?.includes('TextField')) refs.range.current = selection_.getRangeAt(0);
651
649
  }, []);
652
650
  const onKeyUp = React.useCallback(() => {
653
651
  if (!refs.edit.current) return;
@@ -817,8 +815,6 @@ const SmartTextField = /*#__PURE__*/React.forwardRef((props_, ref) => {
817
815
  className: classNames([staticClassName('RichTextEditor', theme) && ['onesy-RichTextEditor-palette'], classes.palette])
818
816
  }, other_), /*#__PURE__*/React.createElement(Line, {
819
817
  gap: 0.5,
820
- onMouseUp: onMouseUp,
821
- onMouseDown: onMouseDown,
822
818
  style: {
823
819
  maxHeight: 136,
824
820
  padding: '10px 10px 0',
package/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license UiReact v1.0.100
1
+ /** @license UiReact v1.0.101
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onesy/ui-react",
3
- "version": "1.0.100",
3
+ "version": "1.0.101",
4
4
  "description": "UI for React",
5
5
  "repository": "https://github.com/onesy-me/onesy.git",
6
6
  "author": "Lazar <lazareric2@gmail.com>",