@ctzhian/tiptap 2.10.0 → 2.10.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.
@@ -217,4 +217,15 @@
217
217
  .tiptap.ProseMirror[contenteditable="true"] .node-flipGrid .hover-popover-child,
218
218
  .tiptap.ProseMirror[contenteditable="true"] .node-flipGrid .flip-grid-column-inner {
219
219
  height: 100%;
220
+ }
221
+
222
+ .excalidraw-modal-container {
223
+ z-index: 1400 !important;
224
+ top: auto;
225
+ height: 100vh;
226
+ width: 100vw;
227
+ }
228
+
229
+ .excalidraw .scroll-back-to-content {
230
+ bottom: 60px;
220
231
  }
@@ -17,9 +17,6 @@ import '@excalidraw/excalidraw/index.css';
17
17
  import { Button } from '@mui/material';
18
18
  import React, { useRef, useState } from 'react';
19
19
  var ExcalidrawEditor = /*#__PURE__*/React.lazy(function () {
20
- if (typeof window !== 'undefined' && !window.EXCALIDRAW_ASSET_PATH) {
21
- window.EXCALIDRAW_ASSET_PATH = '/';
22
- }
23
20
  return import('@excalidraw/excalidraw').then(function (module) {
24
21
  return {
25
22
  default: module.Excalidraw
@@ -67,13 +64,12 @@ var ExcalidrawEditorWrapper = function ExcalidrawEditorWrapper(_ref) {
67
64
  exportScale: 2
68
65
  }),
69
66
  files: files,
70
- mimeType: 'image/png',
71
- quality: 0.92
67
+ mimeType: 'image/svg+xml'
72
68
  });
73
69
  case 13:
74
70
  blob = _context.sent;
75
- _file = new File([blob], "excalidraw-".concat(Date.now(), ".png"), {
76
- type: 'image/png'
71
+ _file = new File([blob], "excalidraw-".concat(Date.now(), ".svg"), {
72
+ type: 'image/svg+xml'
77
73
  });
78
74
  onSave(_file);
79
75
  _context.next = 21;
@@ -1,4 +1,4 @@
1
- import { Box, Dialog, DialogContent, DialogTitle } from '@mui/material';
1
+ import { Box, Dialog, DialogContent } from '@mui/material';
2
2
  import React from 'react';
3
3
  import ExcalidrawEditor from "./ExcalidrawEditor";
4
4
  var ExcalidrawModal = function ExcalidrawModal(_ref) {
@@ -10,7 +10,7 @@ var ExcalidrawModal = function ExcalidrawModal(_ref) {
10
10
  onClose: onClose,
11
11
  maxWidth: "xl",
12
12
  fullWidth: true
13
- }, /*#__PURE__*/React.createElement(DialogTitle, null, "Excalidraw \u7ED8\u56FE"), /*#__PURE__*/React.createElement(DialogContent, {
13
+ }, /*#__PURE__*/React.createElement(DialogContent, {
14
14
  sx: {
15
15
  pt: 2,
16
16
  p: 0,
@@ -19,7 +19,7 @@ var ExcalidrawModal = function ExcalidrawModal(_ref) {
19
19
  }, /*#__PURE__*/React.createElement(Box, {
20
20
  sx: {
21
21
  width: '100%',
22
- height: '80vh',
22
+ height: '90vh',
23
23
  position: 'relative',
24
24
  overflow: 'hidden'
25
25
  }
package/dist/index.css CHANGED
@@ -1,5 +1,9 @@
1
1
  @import url('./asset/css/index.css');
2
2
 
3
+ body {
4
+ position: relative;
5
+ }
6
+
3
7
  :root {
4
8
  --common-row-font-size: 16px;
5
9
  --common-row-line-height: 1.625;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ctzhian/tiptap",
3
- "version": "2.10.0",
3
+ "version": "2.10.2",
4
4
  "description": "基于 Tiptap 二次开发的编辑器组件",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",