@uiw/react-codemirror 4.21.12 → 4.21.14

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
@@ -8,7 +8,7 @@
8
8
 
9
9
  [![jsdelivr CDN](https://data.jsdelivr.com/v1/package/npm/@uiw/react-codemirror/badge)](https://www.jsdelivr.com/package/npm/@uiw/react-codemirror)
10
10
  [![NPM Downloads](https://img.shields.io/npm/dm/@uiw/react-codemirror.svg?style=flat)](https://www.npmjs.com/package/@uiw/react-codemirror)
11
- [![Build & Deploy](https://github.com/uiwjs/react-codemirror/workflows/Build%20&%20Deploy/badge.svg)](https://github.com/uiwjs/react-codemirror/actions)
11
+ [![Build & Deploy](https://github.com/uiwjs/react-codemirror/actions/workflows/ci.yml/badge.svg)](https://github.com/uiwjs/react-codemirror/actions)
12
12
  [![Open in unpkg](https://img.shields.io/badge/Open%20in-unpkg-blue)](https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/react-codemirror/file/README.md)
13
13
  [![npm version](https://img.shields.io/npm/v/@uiw/react-codemirror.svg)](https://www.npmjs.com/package/@uiw/react-codemirror)
14
14
  [![Coverage Status](https://uiwjs.github.io/react-codemirror/coverage/badges.svg)](https://uiwjs.github.io/react-codemirror/coverage/lcov-report/)
package/cjs/index.d.ts CHANGED
@@ -3,6 +3,8 @@ import { EditorState, EditorStateConfig, Extension, StateField } from '@codemirr
3
3
  import { EditorView, ViewUpdate } from '@codemirror/view';
4
4
  import { BasicSetupOptions } from '@uiw/codemirror-extensions-basic-setup';
5
5
  import { Statistics } from './utils';
6
+ export * from '@codemirror/view';
7
+ export * from '@codemirror/state';
6
8
  export * from '@uiw/codemirror-extensions-basic-setup';
7
9
  export * from './useCodeMirror';
8
10
  export * from './getDefaultExtensions';
package/cjs/index.js CHANGED
@@ -24,6 +24,30 @@ Object.keys(_useCodeMirror2).forEach(function (key) {
24
24
  });
25
25
  });
26
26
  var _jsxRuntime = require("react/jsx-runtime");
27
+ var _view = require("@codemirror/view");
28
+ Object.keys(_view).forEach(function (key) {
29
+ if (key === "default" || key === "__esModule") return;
30
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
31
+ if (key in exports && exports[key] === _view[key]) return;
32
+ Object.defineProperty(exports, key, {
33
+ enumerable: true,
34
+ get: function get() {
35
+ return _view[key];
36
+ }
37
+ });
38
+ });
39
+ var _state = require("@codemirror/state");
40
+ Object.keys(_state).forEach(function (key) {
41
+ if (key === "default" || key === "__esModule") return;
42
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
43
+ if (key in exports && exports[key] === _state[key]) return;
44
+ Object.defineProperty(exports, key, {
45
+ enumerable: true,
46
+ get: function get() {
47
+ return _state[key];
48
+ }
49
+ });
50
+ });
27
51
  var _codemirrorExtensionsBasicSetup = require("@uiw/codemirror-extensions-basic-setup");
28
52
  Object.keys(_codemirrorExtensionsBasicSetup).forEach(function (key) {
29
53
  if (key === "default" || key === "__esModule") return;
@@ -27,19 +27,19 @@ function useCodeMirror(props) {
27
27
  _props$theme = props.theme,
28
28
  theme = _props$theme === void 0 ? 'light' : _props$theme,
29
29
  _props$height = props.height,
30
- height = _props$height === void 0 ? '' : _props$height,
30
+ height = _props$height === void 0 ? null : _props$height,
31
31
  _props$minHeight = props.minHeight,
32
- minHeight = _props$minHeight === void 0 ? '' : _props$minHeight,
32
+ minHeight = _props$minHeight === void 0 ? null : _props$minHeight,
33
33
  _props$maxHeight = props.maxHeight,
34
- maxHeight = _props$maxHeight === void 0 ? '' : _props$maxHeight,
35
- _props$placeholder = props.placeholder,
36
- placeholderStr = _props$placeholder === void 0 ? '' : _props$placeholder,
34
+ maxHeight = _props$maxHeight === void 0 ? null : _props$maxHeight,
37
35
  _props$width = props.width,
38
- width = _props$width === void 0 ? '' : _props$width,
36
+ width = _props$width === void 0 ? null : _props$width,
39
37
  _props$minWidth = props.minWidth,
40
- minWidth = _props$minWidth === void 0 ? '' : _props$minWidth,
38
+ minWidth = _props$minWidth === void 0 ? null : _props$minWidth,
41
39
  _props$maxWidth = props.maxWidth,
42
- maxWidth = _props$maxWidth === void 0 ? '' : _props$maxWidth,
40
+ maxWidth = _props$maxWidth === void 0 ? null : _props$maxWidth,
41
+ _props$placeholder = props.placeholder,
42
+ placeholderStr = _props$placeholder === void 0 ? '' : _props$placeholder,
43
43
  _props$editable = props.editable,
44
44
  editable = _props$editable === void 0 ? true : _props$editable,
45
45
  _props$readOnly = props.readOnly,