@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/esm/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/esm/index.js
CHANGED
|
@@ -4,6 +4,8 @@ var _excluded = ["className", "value", "selection", "extensions", "onChange", "o
|
|
|
4
4
|
import React, { useRef, forwardRef, useImperativeHandle } from 'react';
|
|
5
5
|
import { useCodeMirror } from './useCodeMirror';
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
export * from '@codemirror/view';
|
|
8
|
+
export * from '@codemirror/state';
|
|
7
9
|
export * from '@uiw/codemirror-extensions-basic-setup';
|
|
8
10
|
export * from './useCodeMirror';
|
|
9
11
|
export * from './getDefaultExtensions';
|
package/esm/useCodeMirror.js
CHANGED
|
@@ -16,13 +16,13 @@ export function useCodeMirror(props) {
|
|
|
16
16
|
extensions = emptyExtensions,
|
|
17
17
|
autoFocus,
|
|
18
18
|
theme = 'light',
|
|
19
|
-
height =
|
|
20
|
-
minHeight =
|
|
21
|
-
maxHeight =
|
|
19
|
+
height = null,
|
|
20
|
+
minHeight = null,
|
|
21
|
+
maxHeight = null,
|
|
22
|
+
width = null,
|
|
23
|
+
minWidth = null,
|
|
24
|
+
maxWidth = null,
|
|
22
25
|
placeholder: placeholderStr = '',
|
|
23
|
-
width = '',
|
|
24
|
-
minWidth = '',
|
|
25
|
-
maxWidth = '',
|
|
26
26
|
editable = true,
|
|
27
27
|
readOnly = false,
|
|
28
28
|
indentWithTab: defaultIndentWithTab = true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uiw/react-codemirror",
|
|
3
|
-
"version": "4.21.
|
|
3
|
+
"version": "4.21.14",
|
|
4
4
|
"description": "CodeMirror component for React.",
|
|
5
5
|
"homepage": "https://uiwjs.github.io/react-codemirror",
|
|
6
6
|
"author": "kenny wong <wowohoo@qq.com>",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@codemirror/commands": "^6.1.0",
|
|
41
41
|
"@codemirror/state": "^6.1.1",
|
|
42
42
|
"@codemirror/theme-one-dark": "^6.0.0",
|
|
43
|
-
"@uiw/codemirror-extensions-basic-setup": "4.21.
|
|
43
|
+
"@uiw/codemirror-extensions-basic-setup": "4.21.14",
|
|
44
44
|
"codemirror": "^6.0.0"
|
|
45
45
|
},
|
|
46
46
|
"keywords": [
|
package/src/index.tsx
CHANGED
|
@@ -5,6 +5,9 @@ import { BasicSetupOptions } from '@uiw/codemirror-extensions-basic-setup';
|
|
|
5
5
|
import { useCodeMirror } from './useCodeMirror';
|
|
6
6
|
import { Statistics } from './utils';
|
|
7
7
|
|
|
8
|
+
export * from '@codemirror/view';
|
|
9
|
+
export * from '@codemirror/state';
|
|
10
|
+
|
|
8
11
|
export * from '@uiw/codemirror-extensions-basic-setup';
|
|
9
12
|
export * from './useCodeMirror';
|
|
10
13
|
export * from './getDefaultExtensions';
|
package/src/useCodeMirror.ts
CHANGED
|
@@ -24,13 +24,13 @@ export function useCodeMirror(props: UseCodeMirror) {
|
|
|
24
24
|
extensions = emptyExtensions,
|
|
25
25
|
autoFocus,
|
|
26
26
|
theme = 'light',
|
|
27
|
-
height =
|
|
28
|
-
minHeight =
|
|
29
|
-
maxHeight =
|
|
27
|
+
height = null,
|
|
28
|
+
minHeight = null,
|
|
29
|
+
maxHeight = null,
|
|
30
|
+
width = null,
|
|
31
|
+
minWidth = null,
|
|
32
|
+
maxWidth = null,
|
|
30
33
|
placeholder: placeholderStr = '',
|
|
31
|
-
width = '',
|
|
32
|
-
minWidth = '',
|
|
33
|
-
maxWidth = '',
|
|
34
34
|
editable = true,
|
|
35
35
|
readOnly = false,
|
|
36
36
|
indentWithTab: defaultIndentWithTab = true,
|