@uiw/react-codemirror 4.24.0 → 4.24.2

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/README.md CHANGED
@@ -1,3 +1,36 @@
1
+ <div markdown="1">
2
+ <sup>Using <a href="https://wangchujiang.com/#/app" target="_blank">my app</a> is also a way to <a href="https://wangchujiang.com/#/sponsor" target="_blank">support</a> me:</sup>
3
+ <br>
4
+ <a target="_blank" href="https://apps.apple.com/app/Vidwall/6747587746" title="Vidwall for macOS"><img align="center" alt="Vidwall" height="52" width="52" src="https://github.com/user-attachments/assets/7b5df70a-ed91-4d4b-85be-f00e60a09ce9"></a>
5
+ <a target="_blank" href="https://wangchujiang.com/mousio-hint/" title="Mousio Hint for macOS"><img align="center" alt="Mousio Hint" height="52" width="52" src="https://github.com/user-attachments/assets/3c0af128-0cef-44e5-a8db-4741dc5a6690"></a>
6
+ <a target="_blank" href="https://apps.apple.com/app/6746747327" title="Mousio for macOS"><img align="center" alt="Mousio" height="52" width="52" src="https://github.com/user-attachments/assets/9edf61ff-5a6c-4676-9cc2-8fd3c1ad0dfb"></a>
7
+ <a target="_blank" href="https://apps.apple.com/app/6745227444" title="Musicer for macOS"><img align="center" alt="Musicer" height="52" width="52" src="https://github.com/user-attachments/assets/b7abfba8-88ff-4c86-a125-43073d5aef22"></a>
8
+ <a target="_blank" href="https://apps.apple.com/app/6743841447" title="Audioer for macOS"><img align="center" alt="Audioer" height="52" width="52" src="https://github.com/user-attachments/assets/7a836865-8c90-4119-87bc-19e06a76c957"></a>
9
+ <a target="_blank" href="https://apps.apple.com/app/6744690194" title="FileSentinel for macOS"><img align="center" alt="FileSentinel" height="52" width="52" src="https://github.com/user-attachments/assets/28bce2cc-290e-45bf-9068-585ff6ecafe9"></a>
10
+ <a target="_blank" href="https://apps.apple.com/app/6743495172" title="FocusCursor for macOS"><img align="center" alt="FocusCursor" height="52" width="52" src="https://github.com/user-attachments/assets/d543668a-737b-4853-a6bb-eaa269e69836"></a>
11
+ <a target="_blank" href="https://apps.apple.com/app/6742680573" title="Videoer for macOS"><img align="center" alt="Videoer" height="52" width="52" src="https://github.com/user-attachments/assets/10ffb0f1-0625-40d6-93f1-2c2496592595"></a>
12
+ <a target="_blank" href="https://apps.apple.com/app/6740425504" title="KeyClicker for macOS"><img align="center" alt="KeyClicker" height="52" width="52" src="https://github.com/user-attachments/assets/5a19fcb9-cb81-4855-b4ea-31c604d9612a"></a>
13
+ <a target="_blank" href="https://apps.apple.com/app/6739052447" title="DayBar for macOS"><img align="center" alt="DayBar" height="52" width="52" src="https://github.com/user-attachments/assets/771b608d-594c-492d-8532-d9231e383f5b"></a>
14
+ <a target="_blank" href="https://apps.apple.com/app/6739444407" title="Iconed for macOS"><img align="center" alt="Iconed" height="52" width="52" src="https://github.com/user-attachments/assets/8a35dc7b-4faf-4e2a-9311-f66d6844a896"></a>
15
+ <a target="_blank" href="https://apps.apple.com/app/6737160756" title="RightMenu Master for macOS"><img align="center" alt="RightMenu Master" height="52" width="52" src="https://github.com/user-attachments/assets/39a76541-71bf-4de7-a01c-c62f0557dff5"></a>
16
+ <a target="_blank" href="https://apps.apple.com/app/6723903021" title="Paste Quick for macOS"><img align="center" alt="Quick RSS" height="52" width="52" src="https://github.com/user-attachments/assets/bdaad5b7-9810-44ce-8f17-8410864465d2"></a>
17
+ <a target="_blank" href="https://apps.apple.com/app/6670696072" title="Quick RSS for macOS/iOS"><img align="center" alt="Quick RSS" height="52" width="52" src="https://github.com/user-attachments/assets/374106b5-a448-4d1d-9ccb-b04b6bc681ed"></a>
18
+ <a target="_blank" href="https://apps.apple.com/app/6670167443" title="Web Serve for macOS"><img align="center" alt="Web Serve" height="52" width="52" src="https://github.com/user-attachments/assets/e1d9f76f-0f3d-4ba5-8a15-253ee173bb1c"></a>
19
+ <a target="_blank" href="https://apps.apple.com/app/6503953628" title="Copybook Generator for macOS/iOS"><img align="center" alt="Copybook Generator" height="52" width="52" src="https://github.com/jaywcjlove/jaywcjlove/assets/1680273/b90e42ff-158b-4534-82ca-5898fd0e8d73"></a>
20
+ <a target="_blank" href="https://apps.apple.com/app/6471227008" title="DevTutor for macOS/iOS"><img align="center" alt="DevTutor for SwiftUI" height="52" width="52" src="https://github.com/jaywcjlove/jaywcjlove/assets/1680273/f15c154d-0192-48eb-8e0e-9e245ffd974a"></a>
21
+ <a target="_blank" href="https://apps.apple.com/app/6479819388" title="RegexMate for macOS/iOS"><img align="center" alt="RegexMate" height="52" width="52" src="https://github.com/jaywcjlove/jaywcjlove/assets/1680273/aabe5aa9-9a96-4390-8bed-c3e4023d0dea"></a>
22
+ <a target="_blank" href="https://apps.apple.com/app/6479194014" title="Time Passage for macOS/iOS"><img align="center" alt="Time Passage" height="52" width="52" src="https://github.com/jaywcjlove/time-passage/assets/1680273/6f30e429-e6f3-4dbe-9921-a5effe2a05e9"></a>
23
+ <a target="_blank" href="https://apps.apple.com/app/6478772538" title="IconizeFolder for macOS"><img align="center" alt="Iconize Folder" height="52" width="52" src="https://github.com/jaywcjlove/jaywcjlove/assets/1680273/fa9d8b9c-1e51-4ded-877c-fa5b21c47220"></a>
24
+ <a target="_blank" href="https://apps.apple.com/app/6478511402" title="Textsound Saver for macOS/iOS"><img align="center" alt="Textsound Saver" height="52" width="52" src="https://github.com/jaywcjlove/jaywcjlove/assets/1680273/0595e842-980b-4574-8891-a8ba853a08be"></a>
25
+ <a target="_blank" href="https://apps.apple.com/app/6476924627" title="Create Custom Symbols for macOS"><img align="center" alt="Create Custom Symbols" height="52" width="52" src="https://github.com/jaywcjlove/jaywcjlove/assets/1680273/8cd022ce-a3f1-4e89-b7c6-6fbd0d4db77c"></a>
26
+ <a target="_blank" href="https://apps.apple.com/app/6476452351" title="DevHub for macOS"><img align="center" alt="DevHub" height="52" width="52" src="https://github.com/user-attachments/assets/4a44a4fd-67ce-430b-af0a-72f18feaa47d"></a>
27
+ <a target="_blank" href="https://apps.apple.com/app/6476400184" title="Resume Revise for macOS"><img align="center" alt="Resume Revise" height="52" width="52" src="https://github.com/jaywcjlove/jaywcjlove/assets/1680273/c9954a20-1905-48de-bdf8-d71837974aa2"></a>
28
+ <a target="_blank" href="https://apps.apple.com/app/6472593276" title="Palette Genius for macOS"><img align="center" alt="Palette Genius" height="52" width="52" src="https://github.com/jaywcjlove/jaywcjlove/assets/1680273/27340413-d355-45b2-8f6f-6ac37682d957"></a>
29
+ <a target="_blank" href="https://apps.apple.com/app/6470879005" title="Symbol Scribe for macOS"><img align="center" alt="Symbol Scribe" height="52" width="52" src="https://github.com/jaywcjlove/jaywcjlove/assets/1680273/c7249f05-fa70-4def-a1e9-571d5f171fc9"></a>
30
+ <br><br>
31
+ </div>
32
+ <hr>
33
+
1
34
  <p align="center">
2
35
  <a href="https://uiwjs.github.io/react-codemirror/">
3
36
  <img alt="react-codemirror logo" src="https://user-images.githubusercontent.com/1680273/177491470-c31a6d7e-f676-4914-a027-2fbeebfeb5b4.svg">
@@ -24,22 +24,22 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__60__;
24
24
 
25
25
  __webpack_require__.r(__webpack_exports__);
26
26
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
27
- /* harmony export */ defaultLightThemeOption: () => (/* reexport safe */ _theme_light__WEBPACK_IMPORTED_MODULE_4__.c),
27
+ /* harmony export */ defaultLightThemeOption: () => (/* reexport safe */ _theme_light__WEBPACK_IMPORTED_MODULE_5__.c),
28
28
  /* harmony export */ getDefaultExtensions: () => (/* binding */ getDefaultExtensions)
29
29
  /* harmony export */ });
30
- /* harmony import */ var _codemirror_commands__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(720);
31
- /* harmony import */ var _uiw_codemirror_extensions_basic_setup__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(687);
32
- /* harmony import */ var _codemirror_view__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(730);
33
- /* harmony import */ var _codemirror_view__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_codemirror_view__WEBPACK_IMPORTED_MODULE_1__);
34
- /* harmony import */ var _codemirror_theme_one_dark__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(708);
35
- /* harmony import */ var _codemirror_theme_one_dark__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_codemirror_theme_one_dark__WEBPACK_IMPORTED_MODULE_2__);
36
- /* harmony import */ var _codemirror_state__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(60);
37
- /* harmony import */ var _codemirror_state__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_codemirror_state__WEBPACK_IMPORTED_MODULE_3__);
38
- /* harmony import */ var _theme_light__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(806);
30
+ /* harmony import */ var _codemirror_commands__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(720);
31
+ /* harmony import */ var _uiw_codemirror_extensions_basic_setup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(687);
32
+ /* harmony import */ var _codemirror_view__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(730);
33
+ /* harmony import */ var _codemirror_view__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_codemirror_view__WEBPACK_IMPORTED_MODULE_2__);
34
+ /* harmony import */ var _codemirror_theme_one_dark__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(708);
35
+ /* harmony import */ var _codemirror_theme_one_dark__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_codemirror_theme_one_dark__WEBPACK_IMPORTED_MODULE_3__);
36
+ /* harmony import */ var _codemirror_state__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(60);
37
+ /* harmony import */ var _codemirror_state__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_codemirror_state__WEBPACK_IMPORTED_MODULE_4__);
38
+ /* harmony import */ var _theme_light__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(806);
39
39
  /* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {};
40
- /* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in _codemirror_theme_one_dark__WEBPACK_IMPORTED_MODULE_2__) if(["default","getDefaultExtensions"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => _codemirror_theme_one_dark__WEBPACK_IMPORTED_MODULE_2__[__WEBPACK_IMPORT_KEY__]
40
+ /* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in _codemirror_theme_one_dark__WEBPACK_IMPORTED_MODULE_3__) if(["default","getDefaultExtensions"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => _codemirror_theme_one_dark__WEBPACK_IMPORTED_MODULE_3__[__WEBPACK_IMPORT_KEY__]
41
41
  /* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
42
- var getDefaultExtensions=function getDefaultExtensions(){var optios=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var _optios$indentWithTab=optios.indentWithTab,defaultIndentWithTab=_optios$indentWithTab===void 0?true:_optios$indentWithTab,_optios$editable=optios.editable,editable=_optios$editable===void 0?true:_optios$editable,_optios$readOnly=optios.readOnly,readOnly=_optios$readOnly===void 0?false:_optios$readOnly,_optios$theme=optios.theme,theme=_optios$theme===void 0?'light':_optios$theme,_optios$placeholder=optios.placeholder,placeholderStr=_optios$placeholder===void 0?'':_optios$placeholder,_optios$basicSetup=optios.basicSetup,defaultBasicSetup=_optios$basicSetup===void 0?true:_optios$basicSetup;var getExtensions=[];if(defaultIndentWithTab){getExtensions.unshift(_codemirror_view__WEBPACK_IMPORTED_MODULE_1__.keymap.of([_codemirror_commands__WEBPACK_IMPORTED_MODULE_5__/* .indentWithTab */ .Yc]));}if(defaultBasicSetup){if(typeof defaultBasicSetup==='boolean'){getExtensions.unshift((0,_uiw_codemirror_extensions_basic_setup__WEBPACK_IMPORTED_MODULE_0__/* .basicSetup */ .o)());}else{getExtensions.unshift((0,_uiw_codemirror_extensions_basic_setup__WEBPACK_IMPORTED_MODULE_0__/* .basicSetup */ .o)(defaultBasicSetup));}}if(placeholderStr){getExtensions.unshift((0,_codemirror_view__WEBPACK_IMPORTED_MODULE_1__.placeholder)(placeholderStr));}switch(theme){case'light':getExtensions.push(_theme_light__WEBPACK_IMPORTED_MODULE_4__/* .defaultLightThemeOption */ .c);break;case'dark':getExtensions.push(_codemirror_theme_one_dark__WEBPACK_IMPORTED_MODULE_2__.oneDark);break;case'none':break;default:getExtensions.push(theme);break;}if(editable===false){getExtensions.push(_codemirror_view__WEBPACK_IMPORTED_MODULE_1__.EditorView.editable.of(false));}if(readOnly){getExtensions.push(_codemirror_state__WEBPACK_IMPORTED_MODULE_3__.EditorState.readOnly.of(true));}return[].concat(getExtensions);};
42
+ var getDefaultExtensions=function getDefaultExtensions(){var optios=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var _optios$indentWithTab=optios.indentWithTab,defaultIndentWithTab=_optios$indentWithTab===void 0?true:_optios$indentWithTab,_optios$editable=optios.editable,editable=_optios$editable===void 0?true:_optios$editable,_optios$readOnly=optios.readOnly,readOnly=_optios$readOnly===void 0?false:_optios$readOnly,_optios$theme=optios.theme,theme=_optios$theme===void 0?'light':_optios$theme,_optios$placeholder=optios.placeholder,placeholderStr=_optios$placeholder===void 0?'':_optios$placeholder,_optios$basicSetup=optios.basicSetup,defaultBasicSetup=_optios$basicSetup===void 0?true:_optios$basicSetup;var getExtensions=[];if(defaultIndentWithTab){getExtensions.unshift(_codemirror_view__WEBPACK_IMPORTED_MODULE_2__.keymap.of([_codemirror_commands__WEBPACK_IMPORTED_MODULE_0__/* .indentWithTab */ .Yc]));}if(defaultBasicSetup){if(typeof defaultBasicSetup==='boolean'){getExtensions.unshift((0,_uiw_codemirror_extensions_basic_setup__WEBPACK_IMPORTED_MODULE_1__/* .basicSetup */ .o)());}else{getExtensions.unshift((0,_uiw_codemirror_extensions_basic_setup__WEBPACK_IMPORTED_MODULE_1__/* .basicSetup */ .o)(defaultBasicSetup));}}if(placeholderStr){getExtensions.unshift((0,_codemirror_view__WEBPACK_IMPORTED_MODULE_2__.placeholder)(placeholderStr));}switch(theme){case'light':getExtensions.push(_theme_light__WEBPACK_IMPORTED_MODULE_5__/* .defaultLightThemeOption */ .c);break;case'dark':getExtensions.push(_codemirror_theme_one_dark__WEBPACK_IMPORTED_MODULE_3__.oneDark);break;case'none':break;default:getExtensions.push(theme);break;}if(editable===false){getExtensions.push(_codemirror_view__WEBPACK_IMPORTED_MODULE_2__.EditorView.editable.of(false));}if(readOnly){getExtensions.push(_codemirror_state__WEBPACK_IMPORTED_MODULE_4__.EditorState.readOnly.of(true));}return[].concat(getExtensions);};
43
43
 
44
44
  /***/ }),
45
45
 
@@ -10731,8 +10731,8 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__708__;
10731
10731
  /* unused harmony exports blockComment, blockUncomment, copyLineDown, copyLineUp, cursorCharBackward, cursorCharBackwardLogical, cursorCharForward, cursorCharForwardLogical, cursorCharLeft, cursorCharRight, cursorDocEnd, cursorDocStart, cursorGroupBackward, cursorGroupForward, cursorGroupForwardWin, cursorGroupLeft, cursorGroupRight, cursorLineBoundaryBackward, cursorLineBoundaryForward, cursorLineBoundaryLeft, cursorLineBoundaryRight, cursorLineDown, cursorLineEnd, cursorLineStart, cursorLineUp, cursorMatchingBracket, cursorPageDown, cursorPageUp, cursorSubwordBackward, cursorSubwordForward, cursorSyntaxLeft, cursorSyntaxRight, deleteCharBackward, deleteCharBackwardStrict, deleteCharForward, deleteGroupBackward, deleteGroupForward, deleteLine, deleteLineBoundaryBackward, deleteLineBoundaryForward, deleteToLineEnd, deleteToLineStart, deleteTrailingWhitespace, emacsStyleKeymap, historyField, indentLess, indentMore, indentSelection, insertBlankLine, insertNewline, insertNewlineAndIndent, insertNewlineKeepIndent, insertTab, invertedEffects, isolateHistory, lineComment, lineUncomment, moveLineDown, moveLineUp, redo, redoDepth, redoSelection, selectAll, selectCharBackward, selectCharBackwardLogical, selectCharForward, selectCharForwardLogical, selectCharLeft, selectCharRight, selectDocEnd, selectDocStart, selectGroupBackward, selectGroupForward, selectGroupForwardWin, selectGroupLeft, selectGroupRight, selectLine, selectLineBoundaryBackward, selectLineBoundaryForward, selectLineBoundaryLeft, selectLineBoundaryRight, selectLineDown, selectLineEnd, selectLineStart, selectLineUp, selectMatchingBracket, selectPageDown, selectPageUp, selectParentSyntax, selectSubwordBackward, selectSubwordForward, selectSyntaxLeft, selectSyntaxRight, simplifySelection, splitLine, standardKeymap, temporarilySetTabFocusMode, toggleBlockComment, toggleBlockCommentByLine, toggleComment, toggleLineComment, toggleTabFocusMode, transposeChars, undo, undoDepth, undoSelection */
10732
10732
  /* harmony import */ var _codemirror_state__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(60);
10733
10733
  /* harmony import */ var _codemirror_view__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(730);
10734
- /* harmony import */ var _codemirror_language__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(194);
10735
- /* harmony import */ var _lezer_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(203);
10734
+ /* harmony import */ var _codemirror_language__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(194);
10735
+ /* harmony import */ var _lezer_common__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(203);
10736
10736
 
10737
10737
 
10738
10738
 
@@ -11463,8 +11463,8 @@ function interestingNode(state, node, bracketProp) {
11463
11463
  return len && (len > 2 || /[^\s,.;:]/.test(state.sliceDoc(node.from, node.to))) || node.firstChild;
11464
11464
  }
11465
11465
  function moveBySyntax(state, start, forward) {
11466
- let pos = (0,_codemirror_language__WEBPACK_IMPORTED_MODULE_3__/* .syntaxTree */ .mv)(state).resolveInner(start.head);
11467
- let bracketProp = forward ? _lezer_common__WEBPACK_IMPORTED_MODULE_2__/* .NodeProp */ .uY.closedBy : _lezer_common__WEBPACK_IMPORTED_MODULE_2__/* .NodeProp */ .uY.openedBy;
11466
+ let pos = (0,_codemirror_language__WEBPACK_IMPORTED_MODULE_2__/* .syntaxTree */ .mv)(state).resolveInner(start.head);
11467
+ let bracketProp = forward ? _lezer_common__WEBPACK_IMPORTED_MODULE_3__/* .NodeProp */ .uY.closedBy : _lezer_common__WEBPACK_IMPORTED_MODULE_3__/* .NodeProp */ .uY.openedBy;
11468
11468
  // Scan forward through child nodes to see if there's an interesting
11469
11469
  // node ahead.
11470
11470
  for (let at = start.head;;) {
@@ -11477,7 +11477,7 @@ function moveBySyntax(state, start, forward) {
11477
11477
  at = forward ? next.to : next.from;
11478
11478
  }
11479
11479
  let bracket = pos.type.prop(bracketProp), match, newPos;
11480
- if (bracket && (match = forward ? (0,_codemirror_language__WEBPACK_IMPORTED_MODULE_3__/* .matchBrackets */ .jU)(state, pos.from, 1) : (0,_codemirror_language__WEBPACK_IMPORTED_MODULE_3__/* .matchBrackets */ .jU)(state, pos.to, -1)) && match.matched)
11480
+ if (bracket && (match = forward ? (0,_codemirror_language__WEBPACK_IMPORTED_MODULE_2__/* .matchBrackets */ .jU)(state, pos.from, 1) : (0,_codemirror_language__WEBPACK_IMPORTED_MODULE_2__/* .matchBrackets */ .jU)(state, pos.to, -1)) && match.matched)
11481
11481
  newPos = forward ? match.end.to : match.end.from;
11482
11482
  else
11483
11483
  newPos = forward ? pos.to : pos.from;
@@ -11594,10 +11594,10 @@ Move the selection to the end of the line.
11594
11594
  const cursorLineEnd = view => moveSel(view, range => _codemirror_state__WEBPACK_IMPORTED_MODULE_0__.EditorSelection.cursor(view.lineBlockAt(range.head).to, -1));
11595
11595
  function toMatchingBracket(state, dispatch, extend) {
11596
11596
  let found = false, selection = updateSel(state.selection, range => {
11597
- let matching = (0,_codemirror_language__WEBPACK_IMPORTED_MODULE_3__/* .matchBrackets */ .jU)(state, range.head, -1)
11598
- || (0,_codemirror_language__WEBPACK_IMPORTED_MODULE_3__/* .matchBrackets */ .jU)(state, range.head, 1)
11599
- || (range.head > 0 && (0,_codemirror_language__WEBPACK_IMPORTED_MODULE_3__/* .matchBrackets */ .jU)(state, range.head - 1, 1))
11600
- || (range.head < state.doc.length && (0,_codemirror_language__WEBPACK_IMPORTED_MODULE_3__/* .matchBrackets */ .jU)(state, range.head + 1, -1));
11597
+ let matching = (0,_codemirror_language__WEBPACK_IMPORTED_MODULE_2__/* .matchBrackets */ .jU)(state, range.head, -1)
11598
+ || (0,_codemirror_language__WEBPACK_IMPORTED_MODULE_2__/* .matchBrackets */ .jU)(state, range.head, 1)
11599
+ || (range.head > 0 && (0,_codemirror_language__WEBPACK_IMPORTED_MODULE_2__/* .matchBrackets */ .jU)(state, range.head - 1, 1))
11600
+ || (range.head < state.doc.length && (0,_codemirror_language__WEBPACK_IMPORTED_MODULE_2__/* .matchBrackets */ .jU)(state, range.head + 1, -1));
11601
11601
  if (!matching || !matching.end)
11602
11602
  return range;
11603
11603
  found = true;
@@ -11802,7 +11802,7 @@ syntax tree.
11802
11802
  */
11803
11803
  const selectParentSyntax = ({ state, dispatch }) => {
11804
11804
  let selection = updateSel(state.selection, range => {
11805
- let tree = (0,_codemirror_language__WEBPACK_IMPORTED_MODULE_3__/* .syntaxTree */ .mv)(state), stack = tree.resolveStack(range.from, 1);
11805
+ let tree = (0,_codemirror_language__WEBPACK_IMPORTED_MODULE_2__/* .syntaxTree */ .mv)(state), stack = tree.resolveStack(range.from, 1);
11806
11806
  if (range.empty) {
11807
11807
  let stackBefore = tree.resolveStack(range.from, -1);
11808
11808
  if (stackBefore.node.from >= stack.node.from && stackBefore.node.to <= stack.node.to)
@@ -11887,7 +11887,7 @@ const deleteByChar = (target, forward, byIndentUnit) => deleteBy(target, range =
11887
11887
  !/[^ \t]/.test(before = line.text.slice(0, pos - line.from))) {
11888
11888
  if (before[before.length - 1] == "\t")
11889
11889
  return pos - 1;
11890
- let col = (0,_codemirror_state__WEBPACK_IMPORTED_MODULE_0__.countColumn)(before, state.tabSize), drop = col % (0,_codemirror_language__WEBPACK_IMPORTED_MODULE_3__/* .getIndentUnit */ .tp)(state) || (0,_codemirror_language__WEBPACK_IMPORTED_MODULE_3__/* .getIndentUnit */ .tp)(state);
11890
+ let col = (0,_codemirror_state__WEBPACK_IMPORTED_MODULE_0__.countColumn)(before, state.tabSize), drop = col % (0,_codemirror_language__WEBPACK_IMPORTED_MODULE_2__/* .getIndentUnit */ .tp)(state) || (0,_codemirror_language__WEBPACK_IMPORTED_MODULE_2__/* .getIndentUnit */ .tp)(state);
11891
11891
  for (let i = 0; i < drop && before[before.length - 1 - i] == " "; i++)
11892
11892
  pos--;
11893
11893
  targetPos = pos;
@@ -12168,10 +12168,10 @@ const insertNewlineKeepIndent = ({ state, dispatch }) => {
12168
12168
  function isBetweenBrackets(state, pos) {
12169
12169
  if (/\(\)|\[\]|\{\}/.test(state.sliceDoc(pos - 1, pos + 1)))
12170
12170
  return { from: pos, to: pos };
12171
- let context = (0,_codemirror_language__WEBPACK_IMPORTED_MODULE_3__/* .syntaxTree */ .mv)(state).resolveInner(pos);
12171
+ let context = (0,_codemirror_language__WEBPACK_IMPORTED_MODULE_2__/* .syntaxTree */ .mv)(state).resolveInner(pos);
12172
12172
  let before = context.childBefore(pos), after = context.childAfter(pos), closedBy;
12173
12173
  if (before && after && before.to <= pos && after.from >= pos &&
12174
- (closedBy = before.type.prop(_lezer_common__WEBPACK_IMPORTED_MODULE_2__/* .NodeProp */ .uY.closedBy)) && closedBy.indexOf(after.name) > -1 &&
12174
+ (closedBy = before.type.prop(_lezer_common__WEBPACK_IMPORTED_MODULE_3__/* .NodeProp */ .uY.closedBy)) && closedBy.indexOf(after.name) > -1 &&
12175
12175
  state.doc.lineAt(before.to).from == state.doc.lineAt(after.from).from &&
12176
12176
  !/\S/.test(state.sliceDoc(before.to, after.from)))
12177
12177
  return { from: before.to, to: after.from };
@@ -12198,8 +12198,8 @@ function newlineAndIndent(atEof) {
12198
12198
  let explode = !atEof && from == to && isBetweenBrackets(state, from);
12199
12199
  if (atEof)
12200
12200
  from = to = (to <= line.to ? line : state.doc.lineAt(to)).to;
12201
- let cx = new _codemirror_language__WEBPACK_IMPORTED_MODULE_3__/* .IndentContext */ .KB(state, { simulateBreak: from, simulateDoubleBreak: !!explode });
12202
- let indent = (0,_codemirror_language__WEBPACK_IMPORTED_MODULE_3__/* .getIndentation */ ._v)(cx, from);
12201
+ let cx = new _codemirror_language__WEBPACK_IMPORTED_MODULE_2__/* .IndentContext */ .KB(state, { simulateBreak: from, simulateDoubleBreak: !!explode });
12202
+ let indent = (0,_codemirror_language__WEBPACK_IMPORTED_MODULE_2__/* .getIndentation */ ._v)(cx, from);
12203
12203
  if (indent == null)
12204
12204
  indent = (0,_codemirror_state__WEBPACK_IMPORTED_MODULE_0__.countColumn)(/^\s*/.exec(state.doc.lineAt(from).text)[0], state.tabSize);
12205
12205
  while (to < line.to && /\s/.test(line.text[to - line.from]))
@@ -12208,9 +12208,9 @@ function newlineAndIndent(atEof) {
12208
12208
  ({ from, to } = explode);
12209
12209
  else if (from > line.from && from < line.from + 100 && !/\S/.test(line.text.slice(0, from)))
12210
12210
  from = line.from;
12211
- let insert = ["", (0,_codemirror_language__WEBPACK_IMPORTED_MODULE_3__/* .indentString */ .EI)(state, indent)];
12211
+ let insert = ["", (0,_codemirror_language__WEBPACK_IMPORTED_MODULE_2__/* .indentString */ .EI)(state, indent)];
12212
12212
  if (explode)
12213
- insert.push((0,_codemirror_language__WEBPACK_IMPORTED_MODULE_3__/* .indentString */ .EI)(state, cx.lineIndent(line.from, -1)));
12213
+ insert.push((0,_codemirror_language__WEBPACK_IMPORTED_MODULE_2__/* .indentString */ .EI)(state, cx.lineIndent(line.from, -1)));
12214
12214
  return { changes: { from, to, insert: _codemirror_state__WEBPACK_IMPORTED_MODULE_0__.Text.of(insert) },
12215
12215
  range: _codemirror_state__WEBPACK_IMPORTED_MODULE_0__.EditorSelection.cursor(from + 1 + insert[1].length) };
12216
12216
  });
@@ -12244,18 +12244,18 @@ const indentSelection = ({ state, dispatch }) => {
12244
12244
  if (state.readOnly)
12245
12245
  return false;
12246
12246
  let updated = Object.create(null);
12247
- let context = new _codemirror_language__WEBPACK_IMPORTED_MODULE_3__/* .IndentContext */ .KB(state, { overrideIndentation: start => {
12247
+ let context = new _codemirror_language__WEBPACK_IMPORTED_MODULE_2__/* .IndentContext */ .KB(state, { overrideIndentation: start => {
12248
12248
  let found = updated[start];
12249
12249
  return found == null ? -1 : found;
12250
12250
  } });
12251
12251
  let changes = changeBySelectedLine(state, (line, changes, range) => {
12252
- let indent = (0,_codemirror_language__WEBPACK_IMPORTED_MODULE_3__/* .getIndentation */ ._v)(context, line.from);
12252
+ let indent = (0,_codemirror_language__WEBPACK_IMPORTED_MODULE_2__/* .getIndentation */ ._v)(context, line.from);
12253
12253
  if (indent == null)
12254
12254
  return;
12255
12255
  if (!/\S/.test(line.text))
12256
12256
  indent = 0;
12257
12257
  let cur = /^\s*/.exec(line.text)[0];
12258
- let norm = (0,_codemirror_language__WEBPACK_IMPORTED_MODULE_3__/* .indentString */ .EI)(state, indent);
12258
+ let norm = (0,_codemirror_language__WEBPACK_IMPORTED_MODULE_2__/* .indentString */ .EI)(state, indent);
12259
12259
  if (cur != norm || range.from < line.from + cur.length) {
12260
12260
  updated[line.from] = indent;
12261
12261
  changes.push({ from: line.from, to: line.from + cur.length, insert: norm });
@@ -12273,7 +12273,7 @@ const indentMore = ({ state, dispatch }) => {
12273
12273
  if (state.readOnly)
12274
12274
  return false;
12275
12275
  dispatch(state.update(changeBySelectedLine(state, (line, changes) => {
12276
- changes.push({ from: line.from, insert: state.facet(_codemirror_language__WEBPACK_IMPORTED_MODULE_3__/* .indentUnit */ .Xt) });
12276
+ changes.push({ from: line.from, insert: state.facet(_codemirror_language__WEBPACK_IMPORTED_MODULE_2__/* .indentUnit */ .Xt) });
12277
12277
  }), { userEvent: "input.indent" }));
12278
12278
  return true;
12279
12279
  };
@@ -12289,7 +12289,7 @@ const indentLess = ({ state, dispatch }) => {
12289
12289
  if (!space)
12290
12290
  return;
12291
12291
  let col = (0,_codemirror_state__WEBPACK_IMPORTED_MODULE_0__.countColumn)(space, state.tabSize), keep = 0;
12292
- let insert = (0,_codemirror_language__WEBPACK_IMPORTED_MODULE_3__/* .indentString */ .EI)(state, Math.max(0, col - (0,_codemirror_language__WEBPACK_IMPORTED_MODULE_3__/* .getIndentUnit */ .tp)(state)));
12292
+ let insert = (0,_codemirror_language__WEBPACK_IMPORTED_MODULE_2__/* .indentString */ .EI)(state, Math.max(0, col - (0,_codemirror_language__WEBPACK_IMPORTED_MODULE_2__/* .getIndentUnit */ .tp)(state)));
12293
12293
  while (keep < space.length && keep < insert.length && space.charCodeAt(keep) == insert.charCodeAt(keep))
12294
12294
  keep++;
12295
12295
  changes.push({ from: line.from + keep, to: line.from + space.length, insert: insert.slice(keep) });
@@ -12575,38 +12575,38 @@ var defaultLightThemeOption=_codemirror_view__WEBPACK_IMPORTED_MODULE_0__.Editor
12575
12575
  var __webpack_exports__ = {};
12576
12576
  __webpack_require__.r(__webpack_exports__);
12577
12577
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12578
- /* harmony export */ ExternalChange: () => (/* reexport safe */ _useCodeMirror__WEBPACK_IMPORTED_MODULE_1__.Q),
12579
- /* harmony export */ basicSetup: () => (/* reexport safe */ _uiw_codemirror_extensions_basic_setup__WEBPACK_IMPORTED_MODULE_5__.o),
12578
+ /* harmony export */ ExternalChange: () => (/* reexport safe */ _useCodeMirror__WEBPACK_IMPORTED_MODULE_3__.Q),
12579
+ /* harmony export */ basicSetup: () => (/* reexport safe */ _uiw_codemirror_extensions_basic_setup__WEBPACK_IMPORTED_MODULE_7__.o),
12580
12580
  /* harmony export */ "default": () => (src),
12581
- /* harmony export */ getStatistics: () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_7__.m),
12582
- /* harmony export */ minimalSetup: () => (/* reexport safe */ _uiw_codemirror_extensions_basic_setup__WEBPACK_IMPORTED_MODULE_5__.V),
12583
- /* harmony export */ useCodeMirror: () => (/* reexport safe */ _useCodeMirror__WEBPACK_IMPORTED_MODULE_1__.q)
12581
+ /* harmony export */ getStatistics: () => (/* reexport safe */ _utils__WEBPACK_IMPORTED_MODULE_9__.m),
12582
+ /* harmony export */ minimalSetup: () => (/* reexport safe */ _uiw_codemirror_extensions_basic_setup__WEBPACK_IMPORTED_MODULE_7__.V),
12583
+ /* harmony export */ useCodeMirror: () => (/* reexport safe */ _useCodeMirror__WEBPACK_IMPORTED_MODULE_3__.q)
12584
12584
  /* harmony export */ });
12585
- /* harmony import */ var _home_runner_work_react_codemirror_react_codemirror_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(289);
12586
- /* harmony import */ var _home_runner_work_react_codemirror_react_codemirror_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(644);
12587
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(442);
12588
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
12589
- /* harmony import */ var _useCodeMirror__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(341);
12590
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(742);
12591
- /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__);
12592
- /* harmony import */ var _codemirror_view__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(730);
12593
- /* harmony import */ var _codemirror_view__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_codemirror_view__WEBPACK_IMPORTED_MODULE_3__);
12585
+ /* harmony import */ var _home_runner_work_react_codemirror_react_codemirror_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(289);
12586
+ /* harmony import */ var _home_runner_work_react_codemirror_react_codemirror_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(644);
12587
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(442);
12588
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
12589
+ /* harmony import */ var _useCodeMirror__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(341);
12590
+ /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(742);
12591
+ /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__);
12592
+ /* harmony import */ var _codemirror_view__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(730);
12593
+ /* harmony import */ var _codemirror_view__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_codemirror_view__WEBPACK_IMPORTED_MODULE_5__);
12594
12594
  /* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {};
12595
- /* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in _codemirror_view__WEBPACK_IMPORTED_MODULE_3__) if(__WEBPACK_IMPORT_KEY__ !== "default") __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => _codemirror_view__WEBPACK_IMPORTED_MODULE_3__[__WEBPACK_IMPORT_KEY__]
12595
+ /* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in _codemirror_view__WEBPACK_IMPORTED_MODULE_5__) if(__WEBPACK_IMPORT_KEY__ !== "default") __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => _codemirror_view__WEBPACK_IMPORTED_MODULE_5__[__WEBPACK_IMPORT_KEY__]
12596
12596
  /* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
12597
- /* harmony import */ var _codemirror_state__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(60);
12598
- /* harmony import */ var _codemirror_state__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_codemirror_state__WEBPACK_IMPORTED_MODULE_4__);
12597
+ /* harmony import */ var _codemirror_state__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(60);
12598
+ /* harmony import */ var _codemirror_state__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_codemirror_state__WEBPACK_IMPORTED_MODULE_6__);
12599
12599
  /* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {};
12600
- /* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in _codemirror_state__WEBPACK_IMPORTED_MODULE_4__) if(__WEBPACK_IMPORT_KEY__ !== "default") __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => _codemirror_state__WEBPACK_IMPORTED_MODULE_4__[__WEBPACK_IMPORT_KEY__]
12600
+ /* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in _codemirror_state__WEBPACK_IMPORTED_MODULE_6__) if(__WEBPACK_IMPORT_KEY__ !== "default") __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => _codemirror_state__WEBPACK_IMPORTED_MODULE_6__[__WEBPACK_IMPORT_KEY__]
12601
12601
  /* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
12602
- /* harmony import */ var _uiw_codemirror_extensions_basic_setup__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(687);
12603
- /* harmony import */ var _getDefaultExtensions__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(89);
12602
+ /* harmony import */ var _uiw_codemirror_extensions_basic_setup__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(687);
12603
+ /* harmony import */ var _getDefaultExtensions__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(89);
12604
12604
  /* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {};
12605
- /* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in _getDefaultExtensions__WEBPACK_IMPORTED_MODULE_6__) if(["default","basicSetup","minimalSetup","ExternalChange","useCodeMirror"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => _getDefaultExtensions__WEBPACK_IMPORTED_MODULE_6__[__WEBPACK_IMPORT_KEY__]
12605
+ /* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in _getDefaultExtensions__WEBPACK_IMPORTED_MODULE_8__) if(["default","basicSetup","minimalSetup","ExternalChange","useCodeMirror"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => _getDefaultExtensions__WEBPACK_IMPORTED_MODULE_8__[__WEBPACK_IMPORT_KEY__]
12606
12606
  /* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
12607
- /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(369);
12608
- var _excluded=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"];var ReactCodeMirror=/*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function(props,ref){var className=props.className,_props$value=props.value,value=_props$value===void 0?'':_props$value,selection=props.selection,_props$extensions=props.extensions,extensions=_props$extensions===void 0?[]:_props$extensions,onChange=props.onChange,onStatistics=props.onStatistics,onCreateEditor=props.onCreateEditor,onUpdate=props.onUpdate,autoFocus=props.autoFocus,_props$theme=props.theme,theme=_props$theme===void 0?'light':_props$theme,height=props.height,minHeight=props.minHeight,maxHeight=props.maxHeight,width=props.width,minWidth=props.minWidth,maxWidth=props.maxWidth,basicSetup=props.basicSetup,placeholder=props.placeholder,indentWithTab=props.indentWithTab,editable=props.editable,readOnly=props.readOnly,root=props.root,initialState=props.initialState,other=(0,_home_runner_work_react_codemirror_react_codemirror_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .A)(props,_excluded);var editor=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);var _useCodeMirror=(0,_useCodeMirror__WEBPACK_IMPORTED_MODULE_1__/* .useCodeMirror */ .q)({root:root,value:value,autoFocus:autoFocus,theme:theme,height:height,minHeight:minHeight,maxHeight:maxHeight,width:width,minWidth:minWidth,maxWidth:maxWidth,basicSetup:basicSetup,placeholder:placeholder,indentWithTab:indentWithTab,editable:editable,readOnly:readOnly,selection:selection,onChange:onChange,onStatistics:onStatistics,onCreateEditor:onCreateEditor,onUpdate:onUpdate,extensions:extensions,initialState:initialState}),state=_useCodeMirror.state,view=_useCodeMirror.view,container=_useCodeMirror.container,setContainer=_useCodeMirror.setContainer;(0,react__WEBPACK_IMPORTED_MODULE_0__.useImperativeHandle)(ref,function(){return{editor:editor.current,state:state,view:view};},[editor,container,state,view]);var setEditorRef=(0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function(el){editor.current=el;setContainer(el);},[setContainer]);// check type of value
12609
- if(typeof value!=='string'){throw new Error("value must be typeof string but got ".concat(typeof value));}var defaultClassNames=typeof theme==='string'?"cm-theme-".concat(theme):'cm-theme';return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx)("div",(0,_home_runner_work_react_codemirror_react_codemirror_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_9__/* ["default"] */ .A)({ref:setEditorRef,className:"".concat(defaultClassNames).concat(className?" ".concat(className):'')},other));});ReactCodeMirror.displayName='CodeMirror';/* harmony default export */ const src = (ReactCodeMirror);
12607
+ /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(369);
12608
+ var _excluded=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"];var ReactCodeMirror=/*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_2__.forwardRef)(function(props,ref){var className=props.className,_props$value=props.value,value=_props$value===void 0?'':_props$value,selection=props.selection,_props$extensions=props.extensions,extensions=_props$extensions===void 0?[]:_props$extensions,onChange=props.onChange,onStatistics=props.onStatistics,onCreateEditor=props.onCreateEditor,onUpdate=props.onUpdate,autoFocus=props.autoFocus,_props$theme=props.theme,theme=_props$theme===void 0?'light':_props$theme,height=props.height,minHeight=props.minHeight,maxHeight=props.maxHeight,width=props.width,minWidth=props.minWidth,maxWidth=props.maxWidth,basicSetup=props.basicSetup,placeholder=props.placeholder,indentWithTab=props.indentWithTab,editable=props.editable,readOnly=props.readOnly,root=props.root,initialState=props.initialState,other=(0,_home_runner_work_react_codemirror_react_codemirror_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(props,_excluded);var editor=(0,react__WEBPACK_IMPORTED_MODULE_2__.useRef)(null);var _useCodeMirror=(0,_useCodeMirror__WEBPACK_IMPORTED_MODULE_3__/* .useCodeMirror */ .q)({root:root,value:value,autoFocus:autoFocus,theme:theme,height:height,minHeight:minHeight,maxHeight:maxHeight,width:width,minWidth:minWidth,maxWidth:maxWidth,basicSetup:basicSetup,placeholder:placeholder,indentWithTab:indentWithTab,editable:editable,readOnly:readOnly,selection:selection,onChange:onChange,onStatistics:onStatistics,onCreateEditor:onCreateEditor,onUpdate:onUpdate,extensions:extensions,initialState:initialState}),state=_useCodeMirror.state,view=_useCodeMirror.view,container=_useCodeMirror.container,setContainer=_useCodeMirror.setContainer;(0,react__WEBPACK_IMPORTED_MODULE_2__.useImperativeHandle)(ref,function(){return{editor:editor.current,state:state,view:view};},[editor,container,state,view]);var setEditorRef=(0,react__WEBPACK_IMPORTED_MODULE_2__.useCallback)(function(el){editor.current=el;setContainer(el);},[setContainer]);// check type of value
12609
+ if(typeof value!=='string'){throw new Error("value must be typeof string but got ".concat(typeof value));}var defaultClassNames=typeof theme==='string'?"cm-theme-".concat(theme):'cm-theme';return/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_4__.jsx)("div",(0,_home_runner_work_react_codemirror_react_codemirror_node_modules_babel_runtime_helpers_esm_objectSpread2_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)({ref:setEditorRef,className:"".concat(defaultClassNames).concat(className?" ".concat(className):'')},other));});ReactCodeMirror.displayName='CodeMirror';/* harmony default export */ const src = (ReactCodeMirror);
12610
12610
  /******/ return __webpack_exports__;
12611
12611
  /******/ })()
12612
12612
  ;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uiw/react-codemirror",
3
- "version": "4.24.0",
3
+ "version": "4.24.2",
4
4
  "description": "CodeMirror component for React.",
5
5
  "homepage": "https://uiwjs.github.io/react-codemirror",
6
6
  "funding": "https://jaywcjlove.github.io/#/sponsor",
@@ -39,15 +39,15 @@
39
39
  "@codemirror/theme-one-dark": ">=6.0.0",
40
40
  "@codemirror/view": ">=6.0.0",
41
41
  "codemirror": ">=6.0.0",
42
- "react": ">=16.8.0",
43
- "react-dom": ">=16.8.0"
42
+ "react": ">=17.0.0",
43
+ "react-dom": ">=17.0.0"
44
44
  },
45
45
  "dependencies": {
46
46
  "@babel/runtime": "^7.18.6",
47
47
  "@codemirror/commands": "^6.1.0",
48
48
  "@codemirror/state": "^6.1.1",
49
49
  "@codemirror/theme-one-dark": "^6.0.0",
50
- "@uiw/codemirror-extensions-basic-setup": "4.24.0",
50
+ "@uiw/codemirror-extensions-basic-setup": "4.24.2",
51
51
  "codemirror": "^6.0.0"
52
52
  },
53
53
  "keywords": [