@uiw/react-md-editor 3.14.2 → 3.14.3

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/mdeditor.js CHANGED
@@ -62098,11 +62098,9 @@ var Textarea_excluded=["prefixCls","onChange"];function Textarea(props){var pref
62098
62098
  textRef.current.removeEventListener('keydown',onKeyDown);}};// eslint-disable-next-line react-hooks/exhaustive-deps
62099
62099
  },[]);return/*#__PURE__*/(0,jsx_runtime.jsx)("textarea",_objectSpread2(_objectSpread2({autoComplete:"off",autoCorrect:"off",autoCapitalize:"off",spellCheck:false},other),{},{ref:textRef,className:"".concat(prefixCls,"-text-input ").concat(other.className?other.className:''),value:markdown,onChange:function onChange(e){dispatch&&dispatch({markdown:e.target.value});_onChange&&_onChange(e);}}));}
62100
62100
  ;// CONCATENATED MODULE: ./src/components/TextArea/index.tsx
62101
- var TextArea_excluded=["prefixCls","className","onScroll","renderTextarea"];function TextArea_TextArea(props){var _ref=props||{},prefixCls=_ref.prefixCls,className=_ref.className,onScroll=_ref.onScroll,renderTextarea=_ref.renderTextarea,otherProps=_objectWithoutProperties(_ref,TextArea_excluded);var _useContext=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(EditorContext),markdown=_useContext.markdown,scrollTop=_useContext.scrollTop,commands=_useContext.commands,extraCommands=_useContext.extraCommands,dispatch=_useContext.dispatch;var textRef=external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);var executeRef=external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef();var warp=/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createRef();(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function(){var state={};if(warp.current){state.textareaWarp=warp.current||undefined;warp.current.scrollTop=scrollTop||0;}if(dispatch){dispatch(_objectSpread2({},state));}// eslint-disable-next-line react-hooks/exhaustive-deps
62101
+ var TextArea_excluded=["prefixCls","className","onScroll","renderTextarea"];function TextArea_TextArea(props){var _ref=props||{},prefixCls=_ref.prefixCls,className=_ref.className,onScroll=_ref.onScroll,renderTextarea=_ref.renderTextarea,otherProps=_objectWithoutProperties(_ref,TextArea_excluded);var _useContext=(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(EditorContext),markdown=_useContext.markdown,scrollTop=_useContext.scrollTop,commands=_useContext.commands,highlightEnable=_useContext.highlightEnable,extraCommands=_useContext.extraCommands,dispatch=_useContext.dispatch;var textRef=external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef(null);var executeRef=external_root_React_commonjs2_react_commonjs_react_amd_react_default().useRef();var warp=/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createRef();(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function(){var state={};if(warp.current){state.textareaWarp=warp.current||undefined;warp.current.scrollTop=scrollTop||0;}if(dispatch){dispatch(_objectSpread2({},state));}// eslint-disable-next-line react-hooks/exhaustive-deps
62102
62102
  },[]);(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function(){if(textRef.current&&dispatch){var _commandOrchestrator=new TextAreaCommandOrchestrator(textRef.current);executeRef.current=_commandOrchestrator;dispatch({textarea:textRef.current,commandOrchestrator:_commandOrchestrator});}// eslint-disable-next-line react-hooks/exhaustive-deps
62103
- },[]);// @ts-ignore
62104
- // const textStyle: React.CSSProperties = highlightEnable ? { WebkitTextFillColor: 'transparent' } : { };
62105
- return/*#__PURE__*/(0,jsx_runtime.jsx)("div",{ref:warp,className:"".concat(prefixCls,"-aree ").concat(className||''),onScroll:onScroll,children:/*#__PURE__*/(0,jsx_runtime.jsx)("div",{className:"".concat(prefixCls,"-text"),children:renderTextarea?/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(renderTextarea(_objectSpread2(_objectSpread2({},otherProps),{},{value:markdown,autoComplete:'off',autoCorrect:'off',spellCheck:'false',autoCapitalize:'off',className:"".concat(prefixCls,"-text-input"),style:{WebkitTextFillColor:'inherit',overflow:'auto'}}),{dispatch:dispatch,onChange:otherProps.onChange,shortcuts:shortcutsHandle,useContext:{commands:commands,extraCommands:extraCommands,commandOrchestrator:executeRef.current}}),{ref:textRef}):/*#__PURE__*/(0,jsx_runtime.jsxs)(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment,{children:[/*#__PURE__*/(0,jsx_runtime.jsx)(Markdown,{prefixCls:prefixCls}),/*#__PURE__*/(0,jsx_runtime.jsx)(Textarea,_objectSpread2({prefixCls:prefixCls},otherProps))]})})});}
62103
+ },[]);var textStyle=highlightEnable?{}:{WebkitTextFillColor:'initial',overflow:'auto'};return/*#__PURE__*/(0,jsx_runtime.jsx)("div",{ref:warp,className:"".concat(prefixCls,"-aree ").concat(className||''),onScroll:onScroll,children:/*#__PURE__*/(0,jsx_runtime.jsx)("div",{className:"".concat(prefixCls,"-text"),children:renderTextarea?/*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(renderTextarea(_objectSpread2(_objectSpread2({},otherProps),{},{value:markdown,autoComplete:'off',autoCorrect:'off',spellCheck:'false',autoCapitalize:'off',className:"".concat(prefixCls,"-text-input"),style:{WebkitTextFillColor:'inherit',overflow:'auto'}}),{dispatch:dispatch,onChange:otherProps.onChange,shortcuts:shortcutsHandle,useContext:{commands:commands,extraCommands:extraCommands,commandOrchestrator:executeRef.current}}),{ref:textRef}):/*#__PURE__*/(0,jsx_runtime.jsxs)(external_root_React_commonjs2_react_commonjs_react_amd_react_.Fragment,{children:[highlightEnable&&/*#__PURE__*/(0,jsx_runtime.jsx)(Markdown,{prefixCls:prefixCls}),/*#__PURE__*/(0,jsx_runtime.jsx)(Textarea,_objectSpread2(_objectSpread2({prefixCls:prefixCls},otherProps),{},{style:textStyle}))]})})});}
62106
62104
  ;// CONCATENATED MODULE: ./src/components/Toolbar/Child.less
62107
62105
  // extracted by mini-css-extract-plugin
62108
62106
  /* harmony default export */ const Child = ({});