@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 +1 -1
- package/cjs/index.d.ts +2 -0
- package/cjs/index.js +24 -0
- package/cjs/useCodeMirror.js +8 -8
- package/dist/codemirror.js +259 -176
- package/dist/codemirror.min.js +1 -1
- package/esm/index.d.ts +2 -0
- package/esm/index.js +2 -0
- package/esm/useCodeMirror.js +6 -6
- package/package.json +2 -2
- package/src/index.tsx +3 -0
- package/src/useCodeMirror.ts +6 -6
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
[](https://www.jsdelivr.com/package/npm/@uiw/react-codemirror)
|
|
10
10
|
[](https://www.npmjs.com/package/@uiw/react-codemirror)
|
|
11
|
-
[](https://github.com/uiwjs/react-codemirror/actions)
|
|
12
12
|
[](https://uiwjs.github.io/npm-unpkg/#/pkg/@uiw/react-codemirror/file/README.md)
|
|
13
13
|
[](https://www.npmjs.com/package/@uiw/react-codemirror)
|
|
14
14
|
[](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;
|
package/cjs/useCodeMirror.js
CHANGED
|
@@ -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 ?
|
|
30
|
+
height = _props$height === void 0 ? null : _props$height,
|
|
31
31
|
_props$minHeight = props.minHeight,
|
|
32
|
-
minHeight = _props$minHeight === void 0 ?
|
|
32
|
+
minHeight = _props$minHeight === void 0 ? null : _props$minHeight,
|
|
33
33
|
_props$maxHeight = props.maxHeight,
|
|
34
|
-
maxHeight = _props$maxHeight === void 0 ?
|
|
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 ?
|
|
36
|
+
width = _props$width === void 0 ? null : _props$width,
|
|
39
37
|
_props$minWidth = props.minWidth,
|
|
40
|
-
minWidth = _props$minWidth === void 0 ?
|
|
38
|
+
minWidth = _props$minWidth === void 0 ? null : _props$minWidth,
|
|
41
39
|
_props$maxWidth = props.maxWidth,
|
|
42
|
-
maxWidth = _props$maxWidth === void 0 ?
|
|
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,
|