@ctzhian/tiptap 1.6.18 → 1.6.19
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.
|
@@ -94,12 +94,11 @@ var EditorToolbar = function EditorToolbar(_ref) {
|
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
|
-
},
|
|
98
|
-
editor: editor
|
|
99
|
-
}), editor.options.extensions.find(function (it) {
|
|
97
|
+
}, editor.options.extensions.find(function (it) {
|
|
100
98
|
return it.name === 'aiWriting';
|
|
101
99
|
}) && /*#__PURE__*/React.createElement(ToolbarItem, {
|
|
102
100
|
text: 'AI 伴写',
|
|
101
|
+
tip: "\u5F00\u542F\u540E\u6309\u4E0B Tab \u952E\u91C7\u7EB3\u5EFA\u8BAE",
|
|
103
102
|
icon: /*#__PURE__*/React.createElement(AiGenerate2Icon, {
|
|
104
103
|
sx: {
|
|
105
104
|
fontSize: '1rem'
|
|
@@ -109,6 +108,8 @@ var EditorToolbar = function EditorToolbar(_ref) {
|
|
|
109
108
|
return editor.chain().focus().setAiWriting(!active.aiWriting).run();
|
|
110
109
|
},
|
|
111
110
|
className: active.aiWriting ? 'tool-active' : ''
|
|
111
|
+
}), /*#__PURE__*/React.createElement(EditorInsert, {
|
|
112
|
+
editor: editor
|
|
112
113
|
}), /*#__PURE__*/React.createElement(Divider, {
|
|
113
114
|
orientation: "vertical",
|
|
114
115
|
flexItem: true,
|
|
@@ -4,8 +4,9 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
4
4
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
5
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import { FloatingPopover } from "../../../component";
|
|
7
8
|
import { CustomSizeIcon, DeleteLineIcon, EditBoxLineIcon } from "../../../component/Icons";
|
|
8
|
-
import { Box, Button, IconButton,
|
|
9
|
+
import { Box, Button, IconButton, Stack, TextField, Tooltip } from "@mui/material";
|
|
9
10
|
import { NodeViewWrapper } from "@tiptap/react";
|
|
10
11
|
import React, { useEffect, useRef, useState } from "react";
|
|
11
12
|
import CropImage from "./Crop";
|
|
@@ -324,19 +325,11 @@ var ImageViewWrapper = function ImageViewWrapper(_ref) {
|
|
|
324
325
|
sx: {
|
|
325
326
|
fontSize: 18
|
|
326
327
|
}
|
|
327
|
-
}))))), /*#__PURE__*/React.createElement(
|
|
328
|
+
}))))), /*#__PURE__*/React.createElement(FloatingPopover, {
|
|
328
329
|
open: Boolean(anchorEl),
|
|
329
330
|
anchorEl: anchorEl,
|
|
330
331
|
onClose: handleClosePopover,
|
|
331
|
-
|
|
332
|
-
anchorOrigin: {
|
|
333
|
-
vertical: 'bottom',
|
|
334
|
-
horizontal: 'left'
|
|
335
|
-
},
|
|
336
|
-
transformOrigin: {
|
|
337
|
-
vertical: 'top',
|
|
338
|
-
horizontal: 'left'
|
|
339
|
-
}
|
|
332
|
+
placement: "bottom"
|
|
340
333
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
341
334
|
sx: {
|
|
342
335
|
p: 2,
|