@ctzhian/tiptap 1.12.0 → 1.12.2

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.
@@ -8,7 +8,7 @@ import React from 'react';
8
8
  import "../index.css";
9
9
  var Reader = function Reader() {
10
10
  var _useTiptap = useTiptap({
11
- editable: true,
11
+ editable: false,
12
12
  exclude: ['invisibleCharacters'],
13
13
  onError: function onError(error) {
14
14
  alert(error.message);
@@ -91,7 +91,7 @@ var EditorMarkdown = /*#__PURE__*/forwardRef(function (_ref, ref) {
91
91
  borderRadius: '4px 4px 0 0',
92
92
  fontSize: 12,
93
93
  lineHeight: '20px',
94
- color: 'text.auxiliary',
94
+ color: 'text.tertiary',
95
95
  '.md-display-mode-active': {
96
96
  color: 'primary.main',
97
97
  bgcolor: alpha(theme.palette.primary.main, 0.1)
@@ -40,7 +40,7 @@ var DragIcon = function DragIcon(_ref) {
40
40
  display: 'flex',
41
41
  alignItems: 'center',
42
42
  justifyContent: 'center',
43
- color: 'text.auxiliary',
43
+ color: 'text.tertiary',
44
44
  cursor: 'grab',
45
45
  borderColor: 'divider',
46
46
  bgcolor: 'background.paper',
@@ -72,7 +72,7 @@ var AddIcon = function AddIcon(_ref2) {
72
72
  display: 'flex',
73
73
  alignItems: 'center',
74
74
  justifyContent: 'center',
75
- color: 'text.auxiliary',
75
+ color: 'text.tertiary',
76
76
  cursor: 'grab',
77
77
  borderColor: 'divider',
78
78
  bgcolor: 'background.paper',
@@ -85,10 +85,9 @@ var ReadonlyCodeBlock = function ReadonlyCodeBlock(_ref) {
85
85
  }
86
86
  }, /*#__PURE__*/React.createElement(Box, {
87
87
  sx: {
88
- py: 0.5,
89
88
  flex: 1,
90
89
  fontSize: '0.875rem',
91
- color: 'text.auxiliary',
90
+ color: 'text.tertiary',
92
91
  letterSpacing: '0.01rem'
93
92
  }
94
93
  }, attrs.title || '代码块'), isHovering && /*#__PURE__*/React.createElement(Stack, {
@@ -162,7 +162,7 @@ var CodeBlockView = function CodeBlockView(props) {
162
162
  height: '0.875rem',
163
163
  lineHeight: 1,
164
164
  fontSize: '0.875rem',
165
- color: 'text.auxiliary'
165
+ color: 'text.tertiary'
166
166
  },
167
167
  '& .MuiInputBase-input::placeholder': {
168
168
  fontSize: '0.875rem'
@@ -177,10 +177,9 @@ var CodeBlockView = function CodeBlockView(props) {
177
177
  }
178
178
  })) : /*#__PURE__*/React.createElement(Box, {
179
179
  sx: {
180
- py: 0.5,
181
180
  flex: 1,
182
181
  fontSize: '0.875rem',
183
- color: 'text.auxiliary',
182
+ color: 'text.tertiary',
184
183
  letterSpacing: '0.01rem'
185
184
  },
186
185
  onClick: handleTitleToggle
@@ -300,7 +299,6 @@ var CodeBlockView = function CodeBlockView(props) {
300
299
  flexItem: true,
301
300
  sx: {
302
301
  height: '1.25rem',
303
- m: 0.5,
304
302
  alignSelf: 'center',
305
303
  borderColor: 'divider'
306
304
  }
@@ -34,7 +34,7 @@ var ReadonlyImage = function ReadonlyImage(_ref) {
34
34
  transform: 'translateX(-50%)',
35
35
  display: 'inline-block',
36
36
  fontSize: '0.75rem',
37
- color: 'text.auxiliary',
37
+ color: 'text.tertiary',
38
38
  mt: 1.5
39
39
  }
40
40
  }, attrs.title))));
@@ -491,7 +491,7 @@ var ImageViewWrapper = function ImageViewWrapper(_ref) {
491
491
  sx: {
492
492
  display: 'inline-block',
493
493
  fontSize: '0.75rem',
494
- color: 'text.auxiliary'
494
+ color: 'text.tertiary'
495
495
  }
496
496
  }, attrs.title))), /*#__PURE__*/React.createElement(FloatingPopover, {
497
497
  open: Boolean(anchorEl),
@@ -86,7 +86,7 @@ export var MentionList = /*#__PURE__*/forwardRef(function (props, ref) {
86
86
  sx: {
87
87
  px: 2,
88
88
  py: 1,
89
- color: 'var(--mui-palette-text-auxiliary)'
89
+ color: 'var(--mui-palette-text-tertiary)'
90
90
  }
91
91
  }, "No result")));
92
92
  });
@@ -7,6 +7,6 @@ export interface UploadProgressAttributes {
7
7
  tempId: string;
8
8
  }
9
9
  export declare const getFileIcon: (fileType: string) => React.JSX.Element;
10
- export declare const getFileTypeText: (fileType: string) => "图片" | "视频" | "音频" | "文件";
10
+ export declare const getFileTypeText: (fileType: string) => "图片" | "文件" | "音频" | "视频";
11
11
  declare const UploadProgressView: React.FC<NodeViewProps>;
12
12
  export default UploadProgressView;
@@ -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>;
package/dist/index.css CHANGED
@@ -70,7 +70,7 @@
70
70
  padding-left: 12px;
71
71
  margin: 8px 0;
72
72
  line-height: var(--common-row-line-height);
73
- color: var(--mui-palette-text-auxiliary);
73
+ color: var(--mui-palette-text-tertiary);
74
74
  }
75
75
 
76
76
  .tiptap.ProseMirror blockquote::after {
@@ -158,7 +158,7 @@
158
158
  }
159
159
 
160
160
  .tiptap.ProseMirror ul[data-type='taskList'] li[data-checked='true']>div {
161
- color: var(--mui-palette-text-auxiliary);
161
+ color: var(--mui-palette-text-tertiary);
162
162
  opacity: 0.7;
163
163
  text-decoration: line-through;
164
164
  }
@@ -189,9 +189,10 @@
189
189
  .tiptap.ProseMirror pre {
190
190
  position: relative;
191
191
  border: 1px solid;
192
+ line-height: 22px;
192
193
  border-color: var(--mui-palette-divider);
193
194
  border-radius: var(--mui-shape-borderRadius);
194
- color: var(--mui-palette-text-auxiliary);
195
+ color: var(--mui-palette-text-tertiary);
195
196
  background-color: var(--mui-palette-background-paper3);
196
197
  }
197
198
 
@@ -50,11 +50,11 @@ declare const dark: {
50
50
  text: {
51
51
  primary: string;
52
52
  secondary: string;
53
- auxiliary: string;
53
+ tertiary: string;
54
54
  disabled: string;
55
55
  slave: string;
56
56
  inverse: string;
57
- inverseAuxiliary: string;
57
+ inversetertiary: string;
58
58
  inverseDisabled: string;
59
59
  };
60
60
  divider: string;
@@ -50,11 +50,11 @@ var dark = {
50
50
  text: {
51
51
  primary: '#fff',
52
52
  secondary: 'rgba(255,255,255,0.7)',
53
- auxiliary: 'rgba(255,255,255,0.5)',
53
+ tertiary: 'rgba(255,255,255,0.5)',
54
54
  disabled: 'rgba(255,255,255,0.26)',
55
55
  slave: 'rgba(255,255,255,0.05)',
56
56
  inverse: '#000000',
57
- inverseAuxiliary: 'rgba(0,0,0,0.5)',
57
+ inversetertiary: 'rgba(0,0,0,0.5)',
58
58
  inverseDisabled: 'rgba(0,0,0,0.15)'
59
59
  },
60
60
  divider: '#505050',
@@ -50,11 +50,11 @@ declare const light: {
50
50
  text: {
51
51
  primary: string;
52
52
  secondary: string;
53
- auxiliary: string;
53
+ tertiary: string;
54
54
  disabled: string;
55
55
  slave: string;
56
56
  inverse: string;
57
- inverseAuxiliary: string;
57
+ inversetertiary: string;
58
58
  inverseDisabled: string;
59
59
  };
60
60
  divider: string;
@@ -50,11 +50,11 @@ var light = {
50
50
  text: {
51
51
  primary: '#1f2329',
52
52
  secondary: '#3f4441',
53
- auxiliary: '#646a73',
53
+ tertiary: '#646a73',
54
54
  disabled: '#6e7781',
55
55
  slave: 'rgba(33,34,35,0.3)',
56
56
  inverse: '#FFFFFF',
57
- inverseAuxiliary: 'rgba(255,255,255,0.5)',
57
+ inversetertiary: 'rgba(255,255,255,0.5)',
58
58
  inverseDisabled: 'rgba(255,255,255,0.15)'
59
59
  },
60
60
  divider: '#ECEEF1',
@@ -58,11 +58,11 @@ export default function themePalette(color: ThemeColor, mode: Omit<ThemeMode, 's
58
58
  text: {
59
59
  primary: string;
60
60
  secondary: string;
61
- auxiliary: string;
61
+ tertiary: string;
62
62
  disabled: string;
63
63
  slave: string;
64
64
  inverse: string;
65
- inverseAuxiliary: string;
65
+ inversetertiary: string;
66
66
  inverseDisabled: string;
67
67
  };
68
68
  background: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ctzhian/tiptap",
3
- "version": "1.12.0",
3
+ "version": "1.12.2",
4
4
  "description": "基于 Tiptap 二次开发的编辑器组件",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",