@fe-free/core 1.4.14 → 1.4.15

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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @fe-free/core
2
2
 
3
+ ## 1.4.15
4
+
5
+ ### Patch Changes
6
+
7
+ - feat: editor
8
+ - @fe-free/tool@1.4.15
9
+
3
10
  ## 1.4.14
4
11
 
5
12
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fe-free/core",
3
- "version": "1.4.14",
3
+ "version": "1.4.15",
4
4
  "description": "",
5
5
  "main": "./src/index.ts",
6
6
  "author": "",
@@ -36,7 +36,7 @@
36
36
  "react-syntax-highlighter": "^15.5.0",
37
37
  "vanilla-jsoneditor": "^0.23.1",
38
38
  "zustand": "^4.5.4",
39
- "@fe-free/tool": "1.4.14"
39
+ "@fe-free/tool": "1.4.15"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "@ant-design/pro-components": "^2.8.7",
@@ -39,6 +39,14 @@ export const ReadOnly: Story = {
39
39
  render: (props) => <BasicDemo {...props} />,
40
40
  };
41
41
 
42
+ export const Wrap: Story = {
43
+ args: {
44
+ value:
45
+ 'hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!hello world!',
46
+ },
47
+ render: (props) => <BasicDemo {...props} />,
48
+ };
49
+
42
50
  // 不可编辑模式
43
51
  export const Editable: Story = {
44
52
  args: {
@@ -2,6 +2,7 @@ import { javascript } from '@codemirror/lang-javascript';
2
2
  import { json } from '@codemirror/lang-json';
3
3
  import { markdown } from '@codemirror/lang-markdown';
4
4
  import { python } from '@codemirror/lang-python';
5
+ import { EditorView } from '@codemirror/view';
5
6
  import { basicDarkInit } from '@uiw/codemirror-theme-basic/dark';
6
7
  import type { ReactCodeMirrorProps } from '@uiw/react-codemirror';
7
8
  import CodeMirror from '@uiw/react-codemirror';
@@ -47,7 +48,7 @@ function Editor(props: EditorProps) {
47
48
  } = props;
48
49
 
49
50
  const extensions = useMemo(() => {
50
- const result: ReactCodeMirrorProps['extensions'] = [];
51
+ const result: ReactCodeMirrorProps['extensions'] = [EditorView.lineWrapping];
51
52
 
52
53
  if (originExtensions) {
53
54
  result.push(...originExtensions);