@ctzhian/tiptap 2.10.10 → 2.11.1

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.
@@ -35,7 +35,10 @@ var FlowDiagram = function FlowDiagram(_ref) {
35
35
  color: 'error.main',
36
36
  padding: '20px',
37
37
  textAlign: 'center',
38
- fontSize: '14px'
38
+ fontSize: '14px',
39
+ whiteSpace: 'pre-line',
40
+ maxWidth: '100%',
41
+ wordBreak: 'break-word'
39
42
  }
40
43
  }, error), svgContent && !error && /*#__PURE__*/React.createElement(Box, {
41
44
  dangerouslySetInnerHTML: {
@@ -36,7 +36,7 @@ var ReadonlyFlow = function ReadonlyFlow(_ref) {
36
36
  sx: {
37
37
  width: '100%',
38
38
  height: '100%',
39
- minHeight: '200px',
39
+ minHeight: error ? 'auto' : '200px',
40
40
  display: 'flex',
41
41
  alignItems: 'center',
42
42
  justifyContent: 'center',
@@ -48,7 +48,10 @@ var ReadonlyFlow = function ReadonlyFlow(_ref) {
48
48
  color: 'error.main',
49
49
  padding: '20px',
50
50
  textAlign: 'center',
51
- fontSize: '14px'
51
+ fontSize: '14px',
52
+ whiteSpace: 'pre-line',
53
+ maxWidth: '100%',
54
+ wordBreak: 'break-word'
52
55
  }
53
56
  }, error), svgContent && !error && /*#__PURE__*/React.createElement(Box, {
54
57
  dangerouslySetInnerHTML: {
@@ -14,7 +14,9 @@ var defaultMermaidConfig = {
14
14
  startOnLoad: false,
15
15
  theme: 'default',
16
16
  securityLevel: 'loose',
17
- look: 'handDrawn' // 启用手绘效果
17
+ look: 'handDrawn',
18
+ // 启用手绘效果
19
+ suppressErrorRendering: true // 抑制错误渲染,由应用层处理错误
18
20
  };
19
21
 
20
22
  /**
@@ -1,4 +1,4 @@
1
1
  import { UploadFunction } from "../../type";
2
2
  export declare const FileHandlerExtension: (props: {
3
3
  onUpload?: UploadFunction;
4
- }) => import("@tiptap/core").Extension<Omit<import("@tiptap/extension-file-handler").FileHandlePluginOptions, "key" | "editor">, any>;
4
+ }) => import("@tiptap/core").Extension<Omit<import("@tiptap/extension-file-handler").FileHandlePluginOptions, "editor" | "key">, any>;
@@ -1,5 +1,5 @@
1
1
  import { Extension } from '@tiptap/core';
2
2
  export declare const TableExtension: ({ editable }: {
3
3
  editable: boolean;
4
- }) => (Extension<any, any> | import("@tiptap/core").Node<import("@tiptap/extension-table").TableOptions, any> | import("@tiptap/core").Node<import("@tiptap/extension-table").TableHeaderOptions, any>)[];
4
+ }) => (import("@tiptap/core").Node<import("@tiptap/extension-table").TableOptions, any> | import("@tiptap/core").Node<import("@tiptap/extension-table").TableHeaderOptions, any> | Extension<any, any>)[];
5
5
  export default TableExtension;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ctzhian/tiptap",
3
- "version": "2.10.10",
3
+ "version": "2.11.1",
4
4
  "description": "基于 Tiptap 二次开发的编辑器组件",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -83,37 +83,37 @@
83
83
  "@excalidraw/excalidraw": "^0.18.0",
84
84
  "@floating-ui/dom": "^1.7.2",
85
85
  "@floating-ui/react": "^0.27.16",
86
- "@tiptap/core": "^3.13.0",
87
- "@tiptap/extension-bubble-menu": "^3.13.0",
88
- "@tiptap/extension-code": "^3.13.0",
89
- "@tiptap/extension-code-block-lowlight": "^3.13.0",
90
- "@tiptap/extension-details": "^3.13.0",
91
- "@tiptap/extension-drag-handle-react": "^3.13.0",
92
- "@tiptap/extension-emoji": "^3.13.0",
93
- "@tiptap/extension-file-handler": "^3.13.0",
94
- "@tiptap/extension-highlight": "^3.13.0",
95
- "@tiptap/extension-horizontal-rule": "^3.13.0",
96
- "@tiptap/extension-image": "^3.13.0",
97
- "@tiptap/extension-invisible-characters": "^3.13.0",
98
- "@tiptap/extension-list": "^3.13.0",
99
- "@tiptap/extension-mathematics": "^3.13.0",
100
- "@tiptap/extension-mention": "^3.13.0",
101
- "@tiptap/extension-subscript": "^3.13.0",
102
- "@tiptap/extension-superscript": "^3.13.0",
103
- "@tiptap/extension-table": "^3.13.0",
104
- "@tiptap/extension-table-of-contents": "^3.13.0",
105
- "@tiptap/extension-text-align": "^3.13.0",
106
- "@tiptap/extension-text-style": "^3.13.0",
107
- "@tiptap/extension-unique-id": "^3.13.0",
108
- "@tiptap/extension-youtube": "^3.13.0",
109
- "@tiptap/extensions": "^3.13.0",
110
- "@tiptap/html": "^3.13.0",
111
- "@tiptap/markdown": "^3.13.0",
112
- "@tiptap/pm": "^3.13.0",
113
- "@tiptap/react": "^3.13.0",
114
- "@tiptap/starter-kit": "^3.13.0",
115
- "@tiptap/static-renderer": "^3.13.0",
116
- "@tiptap/suggestion": "^3.13.0",
86
+ "@tiptap/core": "^3.14.0",
87
+ "@tiptap/extension-bubble-menu": "^3.14.0",
88
+ "@tiptap/extension-code": "^3.14.0",
89
+ "@tiptap/extension-code-block-lowlight": "^3.14.0",
90
+ "@tiptap/extension-details": "^3.14.0",
91
+ "@tiptap/extension-drag-handle-react": "^3.14.0",
92
+ "@tiptap/extension-emoji": "^3.14.0",
93
+ "@tiptap/extension-file-handler": "^3.14.0",
94
+ "@tiptap/extension-highlight": "^3.14.0",
95
+ "@tiptap/extension-horizontal-rule": "^3.14.0",
96
+ "@tiptap/extension-image": "^3.14.0",
97
+ "@tiptap/extension-invisible-characters": "^3.14.0",
98
+ "@tiptap/extension-list": "^3.14.0",
99
+ "@tiptap/extension-mathematics": "^3.14.0",
100
+ "@tiptap/extension-mention": "^3.14.0",
101
+ "@tiptap/extension-subscript": "^3.14.0",
102
+ "@tiptap/extension-superscript": "^3.14.0",
103
+ "@tiptap/extension-table": "^3.14.0",
104
+ "@tiptap/extension-table-of-contents": "^3.14.0",
105
+ "@tiptap/extension-text-align": "^3.14.0",
106
+ "@tiptap/extension-text-style": "^3.14.0",
107
+ "@tiptap/extension-unique-id": "^3.14.0",
108
+ "@tiptap/extension-youtube": "^3.14.0",
109
+ "@tiptap/extensions": "^3.14.0",
110
+ "@tiptap/html": "^3.14.0",
111
+ "@tiptap/markdown": "^3.14.0",
112
+ "@tiptap/pm": "^3.14.0",
113
+ "@tiptap/react": "^3.14.0",
114
+ "@tiptap/starter-kit": "^3.14.0",
115
+ "@tiptap/static-renderer": "^3.14.0",
116
+ "@tiptap/suggestion": "^3.14.0",
117
117
  "ace-builds": "^1.43.4",
118
118
  "core-js": "^3.46.0",
119
119
  "diff-match-patch": "^1.0.5",