@ctzhian/tiptap 2.3.2-beta.8 → 2.3.3

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.
@@ -5,36 +5,8 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
5
5
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
6
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
7
  import { addOpacityToColor } from "../util";
8
- import { custom } from "./color";
9
8
  export default function componentStyleOverrides(color) {
10
9
  return {
11
- MuiTabs: {
12
- styleOverrides: {
13
- root: {
14
- borderRadius: '10px !important',
15
- overflow: 'hidden',
16
- minHeight: '36px',
17
- height: '36px',
18
- padding: '0px !important'
19
- },
20
- indicator: {
21
- borderRadius: '0px !important',
22
- overflow: 'hidden',
23
- backgroundColor: '#21222D !important'
24
- }
25
- }
26
- },
27
- MuiTab: {
28
- styleOverrides: {
29
- root: {
30
- borderRadius: '0px !important',
31
- fontWeight: 'normal',
32
- fontSize: '14px !important',
33
- lineHeight: '34px',
34
- padding: '0 16px !important'
35
- }
36
- }
37
- },
38
10
  MuiButton: {
39
11
  styleOverrides: {
40
12
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -100,142 +72,6 @@ export default function componentStyleOverrides(color) {
100
72
  }
101
73
  }
102
74
  },
103
- MuiFormHelperText: {
104
- styleOverrides: {
105
- root: {
106
- color: color.error.main
107
- }
108
- }
109
- },
110
- MuiFormControl: {
111
- styleOverrides: {
112
- root: {
113
- '.MuiFormLabel-asterisk': {
114
- color: color.error.main
115
- }
116
- }
117
- }
118
- },
119
- MuiFormControlLabel: {
120
- styleOverrides: {
121
- root: {
122
- marginLeft: '0 !important'
123
- }
124
- }
125
- },
126
- MuiTableBody: {
127
- styleOverrides: {
128
- root: {
129
- '.MuiTableRow-root:hover': {
130
- '.MuiTableCell-root:not(.cx-table-empty-td)': {
131
- backgroundColor: color.table.row.hoverColor,
132
- overflowX: 'hidden',
133
- '.primary-color': {
134
- color: color.primary.main
135
- },
136
- '.no-title-url': {
137
- color: "".concat(color.primary.main, " !important")
138
- },
139
- '.error-color': {
140
- opacity: 1
141
- }
142
- }
143
- }
144
- }
145
- }
146
- },
147
- MuiCheckbox: {
148
- styleOverrides: {
149
- root: {
150
- padding: 0,
151
- svg: {
152
- fontSize: '18px'
153
- }
154
- }
155
- }
156
- },
157
- MuiTableCell: {
158
- styleOverrides: {
159
- root: {
160
- background: color.background.paper,
161
- lineHeight: 1.5,
162
- fontSize: '14px',
163
- paddingTop: '16px !important',
164
- paddingBottom: '16px !important',
165
- paddingLeft: 0,
166
- '&:first-of-type': {
167
- paddingLeft: '0px'
168
- },
169
- '&:not(:first-of-type)': {
170
- paddingLeft: '0px'
171
- },
172
- '.MuiCheckbox-root': {
173
- color: '#CCCCCC',
174
- svg: {
175
- fontSize: '16px'
176
- },
177
- '&.Mui-checked': {
178
- color: color.text.primary
179
- }
180
- }
181
- },
182
- head: {
183
- backgroundColor: color.background.paper3,
184
- color: color.table.head.color,
185
- fontSize: '12px',
186
- paddingTop: '0 !important',
187
- paddingBottom: '0 !important',
188
- borderSpacing: '12px',
189
- zIndex: 100
190
- },
191
- body: {
192
- borderBottom: '1px dashed',
193
- borderColor: color.table.cell.borderColor,
194
- borderSpacing: '12px'
195
- }
196
- }
197
- },
198
- MuiPopover: {
199
- styleOverrides: {
200
- paper: {
201
- borderRadius: '10px',
202
- boxShadow: custom.selectPopupBoxShadow
203
- }
204
- }
205
- },
206
- MuiMenu: {
207
- styleOverrides: {
208
- paper: {
209
- padding: '4px',
210
- borderRadius: '10px',
211
- backgroundColor: color.background.paper,
212
- boxShadow: custom.selectPopupBoxShadow
213
- },
214
- list: {
215
- paddingTop: '0px !important',
216
- paddingBottom: '0px !important'
217
- }
218
- },
219
- defaultProps: {
220
- elevation: 0
221
- }
222
- },
223
- MuiMenuItem: {
224
- styleOverrides: {
225
- root: {
226
- height: '40px',
227
- borderRadius: '5px',
228
- ':hover': {
229
- backgroundColor: color.background.paper3
230
- },
231
- '&.Mui-selected': {
232
- fontWeight: '500',
233
- backgroundColor: "".concat(custom.selectedMenuItemBgColor, " !important"),
234
- color: color.primary.main
235
- }
236
- }
237
- }
238
- },
239
75
  MuiPaper: {
240
76
  defaultProps: {
241
77
  elevation: 1
@@ -253,83 +89,6 @@ export default function componentStyleOverrides(color) {
253
89
  }
254
90
  }
255
91
  },
256
- MuiAppBar: {
257
- defaultProps: {
258
- elevation: 1
259
- }
260
- },
261
- MuiDialog: {
262
- styleOverrides: {
263
- root: {
264
- 'h2.MuiTypography-root button': {
265
- marginRight: '2px'
266
- },
267
- '.MuiDialogActions-root': {
268
- paddingTop: '24px',
269
- button: {
270
- width: '88px',
271
- height: '36px !important'
272
- },
273
- '.MuiButton-text': {
274
- width: 'auto',
275
- minWidth: 'auto',
276
- color: "".concat(color.text.primary, " !important")
277
- }
278
- }
279
- },
280
- container: {
281
- height: '100vh',
282
- bgcolor: color.text.secondary,
283
- backdropFilter: 'blur(5px)'
284
- },
285
- paper: {
286
- pb: 1,
287
- border: '1px solid',
288
- borderColor: color.divider,
289
- borderRadius: '10px',
290
- backgroundColor: color.background.paper,
291
- textarea: {
292
- borderRadius: '8px 8px 0 8px'
293
- }
294
- }
295
- }
296
- },
297
- MuiDialogTitle: {
298
- styleOverrides: {
299
- root: {
300
- paddingTop: '24px',
301
- '> button': {
302
- top: '20px'
303
- }
304
- }
305
- }
306
- },
307
- MuiAlert: {
308
- styleOverrides: {
309
- root: {
310
- lineHeight: '22px',
311
- paddingTop: '1px',
312
- paddingBottom: '1px',
313
- borderRadius: '10px',
314
- boxShadow: 'none'
315
- },
316
- icon: {
317
- padding: '10px 0'
318
- },
319
- standardInfo: {
320
- backgroundColor: addOpacityToColor(color.primary.main, 0.1),
321
- color: color.text.primary
322
- }
323
- }
324
- },
325
- MuiRadio: {
326
- styleOverrides: {
327
- root: {
328
- padding: 0,
329
- paddingRight: '8px'
330
- }
331
- }
332
- },
333
92
  MuiTextField: {
334
93
  styleOverrides: {
335
94
  root: {
@@ -344,49 +103,6 @@ export default function componentStyleOverrides(color) {
344
103
  }
345
104
  }
346
105
  }
347
- },
348
- MuiInputBase: {
349
- styleOverrides: {
350
- root: {
351
- borderRadius: '10px !important',
352
- backgroundColor: color.background.paper3,
353
- '.MuiOutlinedInput-notchedOutline': {
354
- borderColor: "".concat(color.background.paper3, " !important"),
355
- borderWidth: '1px !important'
356
- },
357
- '&.Mui-focused': {
358
- '.MuiOutlinedInput-notchedOutline': {
359
- borderColor: "".concat(color.text.primary, " !important"),
360
- borderWidth: '1px !important'
361
- }
362
- },
363
- '&:hover': {
364
- '.MuiOutlinedInput-notchedOutline': {
365
- borderColor: "".concat(color.text.primary, " !important"),
366
- borderWidth: '1px !important'
367
- }
368
- },
369
- input: {
370
- height: '19px',
371
- '&.Mui-disabled': {
372
- color: "".concat(color.text.secondary, " !important"),
373
- WebkitTextFillColor: "".concat(color.text.secondary, " !important")
374
- }
375
- }
376
- }
377
- }
378
- },
379
- MuiSelect: {
380
- styleOverrides: {
381
- root: {
382
- height: '36px',
383
- borderRadius: '10px !important',
384
- backgroundColor: color.background.paper3
385
- },
386
- select: {
387
- paddingRight: '0 !important'
388
- }
389
- }
390
106
  }
391
107
  };
392
108
  }
@@ -67,14 +67,10 @@ declare const dark: {
67
67
  shadows: string;
68
68
  table: {
69
69
  head: {
70
- backgroundColor: string;
71
- color: string;
72
- };
73
- row: {
74
- hoverColor: string;
70
+ background: string;
75
71
  };
76
72
  cell: {
77
- borderColor: string;
73
+ border: string;
78
74
  };
79
75
  };
80
76
  charts: {
@@ -67,14 +67,10 @@ var dark = {
67
67
  shadows: 'transparent',
68
68
  table: {
69
69
  head: {
70
- backgroundColor: '#2a2a2a',
71
- color: '#fff'
72
- },
73
- row: {
74
- hoverColor: 'rgba(255, 255, 255, 0.05)'
70
+ background: '#292929'
75
71
  },
76
72
  cell: {
77
- borderColor: '#404040'
73
+ border: '#434343'
78
74
  }
79
75
  },
80
76
  charts: {
@@ -11,6 +11,21 @@ declare module '@mui/material/Button' {
11
11
  neutral: true;
12
12
  }
13
13
  }
14
+ declare module '@mui/material/styles' {
15
+ interface PaletteOptions {
16
+ table?: Partial<TypeTable>;
17
+ }
18
+ }
19
+ declare module '@mui/material/styles' {
20
+ interface TypeTable {
21
+ head: {
22
+ background: string;
23
+ };
24
+ cell: {
25
+ border: string;
26
+ };
27
+ }
28
+ }
14
29
  export declare const theme: <T extends string = "light" | "dark">({ mode, colors, theme: customTheme, }: {
15
30
  mode: T;
16
31
  colors?: Record<T, any> | undefined;
@@ -68,14 +68,10 @@ declare const light: {
68
68
  shadows: string;
69
69
  table: {
70
70
  head: {
71
- backgroundColor: string;
72
- color: string;
73
- };
74
- row: {
75
- hoverColor: string;
71
+ background: string;
76
72
  };
77
73
  cell: {
78
- borderColor: string;
74
+ border: string;
79
75
  };
80
76
  };
81
77
  charts: {
@@ -68,14 +68,10 @@ var light = {
68
68
  shadows: 'rgba(68, 80 ,91, 0.1)',
69
69
  table: {
70
70
  head: {
71
- backgroundColor: '#FFFFFF',
72
- color: '#000'
73
- },
74
- row: {
75
- hoverColor: '#F8F9FA'
71
+ background: '#f2f3f5'
76
72
  },
77
73
  cell: {
78
- borderColor: '#ECEEF1'
74
+ border: '#dee0e3'
79
75
  }
80
76
  },
81
77
  charts: {
@@ -74,14 +74,10 @@ export default function themePalette(color: ThemeColor, mode: Omit<ThemeMode, 's
74
74
  };
75
75
  table: {
76
76
  head: {
77
- backgroundColor: string;
78
- color: string;
79
- };
80
- row: {
81
- hoverColor: string;
77
+ background: string;
82
78
  };
83
79
  cell: {
84
- borderColor: string;
80
+ border: string;
85
81
  };
86
82
  };
87
83
  charts: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ctzhian/tiptap",
3
- "version": "2.3.2-beta.8",
3
+ "version": "2.3.3",
4
4
  "description": "基于 Tiptap 二次开发的编辑器组件",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -1,8 +0,0 @@
1
- import { TocList } from "../../../type";
2
- import { Extension } from '@tiptap/core';
3
- import { TableOfContentsOptions, TableOfContentsStorage } from '@tiptap/extension-table-of-contents';
4
- export declare const TableOfContentsExtension: Extension<TableOfContentsOptions, TableOfContentsStorage>;
5
- export declare const TableOfContents: ({ onTocUpdate }: {
6
- onTocUpdate?: ((toc: TocList) => void) | undefined;
7
- }) => Extension<TableOfContentsOptions, TableOfContentsStorage>;
8
- export default TableOfContents;