@ctzhian/tiptap 0.4.0 → 0.5.0

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.
Files changed (88) hide show
  1. package/dist/Editor/demo.js +9 -6
  2. package/dist/asset/css/index.css +1 -2
  3. package/dist/component/CustomBubbleMenu/SelectionText.d.ts +1 -1
  4. package/dist/component/CustomBubbleMenu/SelectionText.js +11 -6
  5. package/dist/component/CustomDragHandle/index.d.ts +1 -1
  6. package/dist/component/CustomDragHandle/index.js +26 -2
  7. package/dist/component/Icons/checkbox-circle-fill-icon.d.ts +6 -0
  8. package/dist/component/Icons/checkbox-circle-fill-icon.js +13 -0
  9. package/dist/component/Icons/close-circle-fill-icon.d.ts +6 -0
  10. package/dist/component/Icons/close-circle-fill-icon.js +13 -0
  11. package/dist/component/Icons/error-warning-fill-icon.d.ts +6 -0
  12. package/dist/component/Icons/error-warning-fill-icon.js +13 -0
  13. package/dist/component/Icons/index.d.ts +5 -0
  14. package/dist/component/Icons/index.js +5 -0
  15. package/dist/component/Icons/information-2-fill-icon.d.ts +6 -0
  16. package/dist/component/Icons/information-2-fill-icon.js +13 -0
  17. package/dist/component/Icons/question-fill-icon.d.ts +6 -0
  18. package/dist/component/Icons/question-fill-icon.js +13 -0
  19. package/dist/component/ListHover/index.js +1 -1
  20. package/dist/component/Toolbar/EditorAlignSelect.js +1 -1
  21. package/dist/component/Toolbar/EditorCode.js +1 -1
  22. package/dist/component/Toolbar/EditorHeading.js +1 -1
  23. package/dist/component/Toolbar/EditorInsert/index.js +1 -1
  24. package/dist/component/Toolbar/EditorListSelect.js +1 -1
  25. package/dist/component/Toolbar/EditorMath.js +1 -1
  26. package/dist/component/Toolbar/EditorMore/NotificationDialog.js +1 -1
  27. package/dist/component/Toolbar/EditorMore/index.js +1 -1
  28. package/dist/component/Toolbar/EditorScript.js +1 -1
  29. package/dist/component/Toolbar/EditorVerticalAlignSelect.js +1 -1
  30. package/dist/component/Toolbar/Item.js +1 -1
  31. package/dist/extension/component/Alert/index.d.ts +11 -0
  32. package/dist/extension/component/Alert/index.js +125 -0
  33. package/dist/extension/component/Attachment/Insert.d.ts +1 -1
  34. package/dist/extension/component/Attachment/Insert.js +6 -6
  35. package/dist/extension/component/Attachment/Readonly.js +5 -5
  36. package/dist/extension/component/Attachment/index.d.ts +1 -1
  37. package/dist/extension/component/Attachment/index.js +5 -5
  38. package/dist/extension/component/Audio/Insert.js +2 -2
  39. package/dist/extension/component/Audio/Readonly.js +2 -2
  40. package/dist/extension/component/Audio/index.d.ts +1 -1
  41. package/dist/extension/component/Audio/index.js +2 -2
  42. package/dist/extension/component/CodeBlock/Readonly.js +8 -10
  43. package/dist/extension/component/CodeBlock/index.js +14 -19
  44. package/dist/extension/component/Image/Insert.js +2 -2
  45. package/dist/extension/component/Image/index.d.ts +1 -1
  46. package/dist/extension/component/Image/index.js +2 -2
  47. package/dist/extension/component/Link/Insert.js +2 -2
  48. package/dist/extension/component/Link/Readonly.js +20 -11
  49. package/dist/extension/component/Link/index.js +7 -5
  50. package/dist/extension/component/Mathematics/block/index.d.ts +1 -1
  51. package/dist/extension/component/Mathematics/block/index.js +2 -2
  52. package/dist/extension/component/Mathematics/inline/index.d.ts +1 -1
  53. package/dist/extension/component/Mathematics/inline/index.js +2 -2
  54. package/dist/extension/component/Table/ContextMenu.js +1 -1
  55. package/dist/extension/component/UploadProgress/index.js +1 -1
  56. package/dist/extension/component/Video/Insert.js +2 -2
  57. package/dist/extension/component/Video/index.d.ts +1 -1
  58. package/dist/extension/component/Video/index.js +1 -1
  59. package/dist/extension/index.js +2 -2
  60. package/dist/extension/node/Alert.d.ts +14 -0
  61. package/dist/extension/node/Alert.js +141 -0
  62. package/dist/extension/node/Attachment.d.ts +1 -1
  63. package/dist/extension/node/Audio.d.ts +1 -1
  64. package/dist/extension/node/CodeBlockLowlight.js +6 -4
  65. package/dist/extension/node/FileHandler.js +1 -1
  66. package/dist/extension/node/Link/index.js +1 -1
  67. package/dist/extension/node/Video.d.ts +1 -1
  68. package/dist/extension/node/index.d.ts +1 -0
  69. package/dist/extension/node/index.js +1 -0
  70. package/dist/extension/suggestion/emoji.js +1 -1
  71. package/dist/extension/suggestion/mention.d.ts +1 -1
  72. package/dist/extension/suggestion/mention.js +1 -1
  73. package/dist/extension/suggestion/slash.js +1 -1
  74. package/dist/hook/index.d.ts +1 -1
  75. package/dist/hook/index.js +2 -2
  76. package/dist/index.css +197 -69
  77. package/dist/themes/componentStyleOverrides.d.ts +0 -31
  78. package/dist/themes/componentStyleOverrides.js +0 -39
  79. package/dist/themes/dark.d.ts +2 -4
  80. package/dist/themes/dark.js +7 -9
  81. package/dist/themes/index.d.ts +1 -1
  82. package/dist/themes/light.d.ts +3 -5
  83. package/dist/themes/light.js +7 -9
  84. package/dist/themes/palette.d.ts +3 -5
  85. package/dist/util/resourceExtractor.d.ts +1 -1
  86. package/dist/util/resourceExtractor.js +0 -1
  87. package/package.json +30 -30
  88. package/dist/asset/images/down.svg +0 -3
@@ -2,8 +2,8 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
2
2
  function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
3
3
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
4
4
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
5
- import { Box } from '@mui/material';
6
5
  import { Editor, EditorThemeProvider, EditorToolbar, useTiptap } from "./..";
6
+ import { Box } from '@mui/material';
7
7
  import React from 'react';
8
8
  import { AiGenerate2Icon } from "../component/Icons";
9
9
  import "../index.css";
@@ -12,6 +12,7 @@ var Reader = function Reader() {
12
12
  editable: true,
13
13
  exclude: ['invisibleCharacters'],
14
14
  onSave: function onSave(editor) {
15
+ console.log(editor.getHTML());
15
16
  editor.commands.setContent(editor.getHTML());
16
17
  },
17
18
  // onTocUpdate: handleTocUpdate,
@@ -80,14 +81,17 @@ var Reader = function Reader() {
80
81
  }
81
82
  return onUpload;
82
83
  }(),
83
- content: ''
84
+ content: "<p>demo.tsx:12</p><p>\u98DE\u673A\u554A\u7684\u6570<code>\u91CF\u5496\u5561\u5C31\u62C9\u4E0A\u98DE\u673A</code>\u554A\u8001<a target=\"_blank\" type=\"icon\" href=\"https://www.baidu.com\" title=\"\u5E08\u7684\u98DE\u673A\u62C9\u591A\">\u5E08\u7684\u98DE\u673A\u62C9\u591A</a>\u5C11\u5206\uFF0C\u98DE<a target=\"_blank\" type=\"text\" href=\"https://remixicon.com/\" title=\"\u673A\u554A\u4E0A\u98DE\u673A\u62C9\u5FB7\">\u673A\u554A\u4E0A\u98DE\u673A\u62C9\u5FB7</a>\u65AF\u57FA\u5F17\u62C9\u7D22\u592B\u5362\u5361\u65AF\u5230\u5BB6\u4E86\u98DE\u673A\u554A\u7684\u6570\u91CF\u5496\u5561\u5C31\u62C9\u4E0A\u98DE\u673A\u554A\u8001\u5E08\u7684\u98DE\u673A\u62C9\u591A\u5C11\u5206\uFF0C\u98DE\u673A\u554A\u4E0A\u98DE\u673A\u62C9\u5FB7\u65AF\u57FA\u5206\uFF0C\u98DE\u673A\u554A\u4E0A<a target=\"_blank\" type=\"icon\" href=\"afsd\" title=\"\u98DE\u673A\u62C9\u5FB7\u65AF\">\u98DE\u673A\u62C9\u5FB7\u65AF</a>\u57FA\u5F17\u62C9\u7D22</p><div class=\"tableWrapper\"><table style=\"min-width: 436px;\"><colgroup><col style=\"width: 136px;\"><col style=\"min-width: 100px;\"><col style=\"min-width: 100px;\"><col style=\"min-width: 100px;\"></colgroup><tbody><tr class=\"table-row\"><th class=\"table-header\" colspan=\"1\" rowspan=\"1\" colwidth=\"136\"><p>\u6587\u672C\u4E00</p></th><th class=\"table-header\" colspan=\"1\" rowspan=\"1\"><p>\u6587\u672C\u800C</p></th><th class=\"table-header\" colspan=\"1\" rowspan=\"1\"><p>\u6587\u672C\u4E09</p></th><th class=\"table-header\" colspan=\"1\" rowspan=\"1\"><p>\u6587\u672C\u56DB</p></th></tr><tr class=\"table-row\"><td colspan=\"1\" rowspan=\"1\" colwidth=\"136\" data-background-color=\"transparent\" style=\"background-color: transparent;\"><p>\u6D4B\u8BD5\u6570\u636E</p></td><td colspan=\"1\" rowspan=\"1\" data-background-color=\"transparent\" style=\"background-color: transparent;\"><p>\u5386\u53F2\u4E8B\u4EF6</p></td><td colspan=\"1\" rowspan=\"1\" data-background-color=\"transparent\" style=\"background-color: transparent;\"><p>\u798F\u514B\u65AF</p></td><td colspan=\"1\" rowspan=\"1\" data-background-color=\"transparent\" style=\"background-color: transparent;\"><p>\u62C9\u8428</p></td></tr><tr class=\"table-row\"><td colspan=\"1\" rowspan=\"1\" colwidth=\"136\" data-background-color=\"transparent\" style=\"background-color: transparent;\"><p>\u6536\u62FE\u6536\u62FE</p></td><td colspan=\"1\" rowspan=\"1\" data-background-color=\"transparent\" style=\"background-color: transparent;\"><p>\u798F\u514B\u65AF\u5566\u53D1\u5927\u6C34</p></td><td colspan=\"1\" rowspan=\"1\" data-background-color=\"transparent\" style=\"background-color: transparent;\"><p>\u91CD\u65B0\u4F60\u54E6\u95EE\u7C89\u4E1D</p></td><td colspan=\"1\" rowspan=\"1\" data-background-color=\"transparent\" style=\"background-color: transparent;\"><p>\u98DE\u673A\u554A\u5723\u8BDE\u5FEB\u4E50</p></td></tr></tbody></table></div><p></p>"
84
85
  }),
85
86
  editor = _useTiptap.editor;
86
- return /*#__PURE__*/React.createElement(EditorThemeProvider, null, /*#__PURE__*/React.createElement("div", {
87
- style: {
87
+ return /*#__PURE__*/React.createElement(EditorThemeProvider, {
88
+ mode: "light"
89
+ }, /*#__PURE__*/React.createElement(Box, {
90
+ sx: {
88
91
  border: '1px solid #eee',
89
92
  borderRadius: '10px',
90
- padding: '0 10px 10px'
93
+ padding: '0 10px 10px',
94
+ bgcolor: 'var(--mui-palette-background-default)'
91
95
  }
92
96
  }, /*#__PURE__*/React.createElement("div", {
93
97
  style: {
@@ -110,7 +114,6 @@ var Reader = function Reader() {
110
114
  }]
111
115
  })), /*#__PURE__*/React.createElement(Box, {
112
116
  sx: {
113
- backgroundColor: '#fff',
114
117
  '.tiptap': {
115
118
  minHeight: '500px',
116
119
  '.tableWrapper': {
@@ -104,8 +104,6 @@
104
104
  .tiptap.ProseMirror .video-wrapper,
105
105
  .tiptap.ProseMirror .image-wrapper {
106
106
  line-height: 0;
107
- margin: 0 0.25rem;
108
- padding: 0.25rem;
109
107
  }
110
108
 
111
109
  .tiptap.ProseMirror .video-wrapper,
@@ -113,6 +111,7 @@
113
111
  display: inline-block;
114
112
  }
115
113
 
114
+ .tiptap.ProseMirror .codeblock-wrapper.ProseMirror-selectednode>pre,
116
115
  .tiptap.ProseMirror .audio-wrapper.ProseMirror-selectednode>div,
117
116
  .tiptap.ProseMirror .video-wrapper.ProseMirror-selectednode>div,
118
117
  .tiptap.ProseMirror .image-wrapper.ProseMirror-selectednode>span {
@@ -1,5 +1,5 @@
1
- import { Editor } from '@tiptap/react';
2
1
  import { MenuItem } from "../../type";
2
+ import { Editor } from '@tiptap/react';
3
3
  import React from 'react';
4
4
  export interface SelectionTextProps {
5
5
  editor: Editor;
@@ -4,9 +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 { BoldIcon, CodeLineIcon, ItalicIcon, LinkIcon, ResetLeftFillIcon, StrikethroughIcon, SubscriptIcon, SuperscriptIcon, UnderlineIcon } from "../Icons";
7
8
  import { Box, IconButton, Paper, Stack, useTheme } from '@mui/material';
8
9
  import { BubbleMenu } from '@tiptap/react/menus';
9
- import { BoldIcon, CodeLineIcon, ItalicIcon, LinkIcon, ResetLeftFillIcon, StrikethroughIcon, SubscriptIcon, SuperscriptIcon, UnderlineIcon } from "../Icons";
10
10
  import React, { useEffect, useState } from 'react';
11
11
  import { ToolbarItem } from "../Toolbar";
12
12
  var SelectionText = function SelectionText(_ref) {
@@ -15,7 +15,11 @@ var SelectionText = function SelectionText(_ref) {
15
15
  var theme = useTheme();
16
16
  var THEME_TEXT_COLOR = [theme.palette.primary.main, theme.palette.success.main, theme.palette.warning.main, theme.palette.error.main, '#D8A47F', '#73B5F0', '#CDDFA0', theme.palette.text.primary, theme.palette.text.secondary, theme.palette.text.disabled, theme.palette.common.white];
17
17
  var THEME_TEXT_BG_COLOR = ['#e7bdff', '#FFE0B2', '#F8BBD0', '#FFCDD2', '#FFECB3', '#FFCCBC', '#B3E5FC', '#C8E6C9', '#B2EBF2', '#BBDEFB', '#DCEDC8'];
18
- var _useState = useState({
18
+ var _useState = useState(false),
19
+ _useState2 = _slicedToArray(_useState, 2),
20
+ hideColor = _useState2[0],
21
+ setHideColor = _useState2[1];
22
+ var _useState3 = useState({
19
23
  quote: false,
20
24
  bold: false,
21
25
  italic: false,
@@ -25,9 +29,9 @@ var SelectionText = function SelectionText(_ref) {
25
29
  superscript: false,
26
30
  subscript: false
27
31
  }),
28
- _useState2 = _slicedToArray(_useState, 2),
29
- active = _useState2[0],
30
- setActive = _useState2[1];
32
+ _useState4 = _slicedToArray(_useState3, 2),
33
+ active = _useState4[0],
34
+ setActive = _useState4[1];
31
35
  // const [showColorPicker, setShowColorPicker] = useState(false)
32
36
 
33
37
  var updateSelection = function updateSelection() {
@@ -41,6 +45,7 @@ var SelectionText = function SelectionText(_ref) {
41
45
  superscript: editor.isActive('superscript'),
42
46
  subscript: editor.isActive('subscript')
43
47
  });
48
+ setHideColor(editor.isActive('code') || editor.isActive('codeBlock') || editor.isActive('inlineMath') || editor.isActive('blockMath'));
44
49
  };
45
50
  useEffect(function () {
46
51
  editor.on('selectionUpdate', updateSelection);
@@ -50,7 +55,7 @@ var SelectionText = function SelectionText(_ref) {
50
55
  editor.off('transaction', updateSelection);
51
56
  };
52
57
  }, [editor]);
53
- if (!editor.isEditable) {
58
+ if (!editor.isEditable || hideColor) {
54
59
  return null;
55
60
  }
56
61
  return /*#__PURE__*/React.createElement(BubbleMenu, {
@@ -1,5 +1,5 @@
1
- import { Editor } from '@tiptap/react';
2
1
  import { MenuItem, OnTipFunction } from "../../type";
2
+ import { Editor } from '@tiptap/react';
3
3
  import React from 'react';
4
4
  declare const CustomDragHandle: ({ editor, more, onTip }: {
5
5
  editor: Editor;
@@ -12,11 +12,11 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
12
12
  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; }
13
13
  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; } }
14
14
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
15
+ import { AlignBottomIcon, AlignCenterIcon, AlignJustifyIcon, AlignLeftIcon, AlignRightIcon, AlignTopIcon, ArrowDownSLineIcon, AttachmentLineIcon, BrushLineIcon, CodeBoxLineIcon, DeleteLineIcon, DownloadLineIcon, DraggableIcon, FontSizeIcon, FormatClearIcon, H1Icon, H2Icon, H3Icon, ImageLineIcon, InsertColumnLeftIcon, ListCheck3Icon, ListOrdered2Icon, ListUnorderedIcon, MovieLineIcon, Music2LineIcon, QuoteTextIcon, Repeat2LineIcon, ScissorsCutLineIcon, TextIcon, TextWrapIcon } from "../Icons";
16
+ import { NODE_TYPE_LABEL, NodeTypeEnum } from "../../contants/enums";
15
17
  import { Box, Divider, Typography, useTheme } from '@mui/material';
16
18
  import DragHandle from '@tiptap/extension-drag-handle-react';
17
19
  import { Fragment, Slice } from '@tiptap/pm/model';
18
- import { AlignBottomIcon, AlignCenterIcon, AlignJustifyIcon, AlignLeftIcon, AlignRightIcon, AlignTopIcon, ArrowDownSLineIcon, AttachmentLineIcon, BrushLineIcon, CodeBoxLineIcon, DeleteLineIcon, DownloadLineIcon, DraggableIcon, FontSizeIcon, FormatClearIcon, H1Icon, H2Icon, H3Icon, ImageLineIcon, ListCheck3Icon, ListOrdered2Icon, ListUnorderedIcon, MovieLineIcon, Music2LineIcon, QuoteTextIcon, Repeat2LineIcon, ScissorsCutLineIcon, TextIcon } from "../Icons";
19
- import { NODE_TYPE_LABEL, NodeTypeEnum } from "../../contants/enums";
20
20
  import React, { useCallback, useState } from 'react';
21
21
  import { downloadFiles, filterResourcesByType, getAllResources } from "../../util";
22
22
  import { FileCopyLineIcon } from "../Icons/file-copy-line-icon";
@@ -1014,6 +1014,30 @@ var CustomDragHandle = function CustomDragHandle(_ref2) {
1014
1014
  return onClick;
1015
1015
  }()
1016
1016
  }] : []), [{
1017
+ label: '插入',
1018
+ key: 'insert',
1019
+ icon: /*#__PURE__*/React.createElement(InsertColumnLeftIcon, {
1020
+ sx: {
1021
+ fontSize: '1rem'
1022
+ }
1023
+ }),
1024
+ children: [{
1025
+ label: '插入高亮块',
1026
+ key: 'insert-highlight-block',
1027
+ icon: /*#__PURE__*/React.createElement(TextWrapIcon, {
1028
+ sx: {
1029
+ fontSize: '1rem'
1030
+ }
1031
+ }),
1032
+ onClick: function onClick() {
1033
+ if (current.node && current.pos !== undefined) {
1034
+ current.editor.chain().focus().setAlert({
1035
+ type: 'info'
1036
+ }).run();
1037
+ }
1038
+ }
1039
+ }]
1040
+ }, {
1017
1041
  label: "\u590D\u5236".concat(currentNode === null || currentNode === void 0 ? void 0 : currentNode.label),
1018
1042
  key: 'copy',
1019
1043
  icon: /*#__PURE__*/React.createElement(FileCopyLineIcon, {
@@ -0,0 +1,6 @@
1
+ import { SvgIconProps } from "@mui/material";
2
+ import * as React from "react";
3
+ export declare const CheckboxCircleFillIcon: {
4
+ (props: SvgIconProps): React.JSX.Element;
5
+ displayName: string;
6
+ };
@@ -0,0 +1,13 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+ import { SvgIcon } from "@mui/material";
3
+ import * as React from "react";
4
+ export var CheckboxCircleFillIcon = function CheckboxCircleFillIcon(props) {
5
+ return /*#__PURE__*/React.createElement(SvgIcon, _extends({
6
+ viewBox: "0 0 24 24",
7
+ version: "1.1",
8
+ xmlns: "http://www.w3.org/2000/svg"
9
+ }, props), /*#__PURE__*/React.createElement("path", {
10
+ d: "M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM17.4571 9.45711L11 15.9142L6.79289 11.7071L8.20711 10.2929L11 13.0858L16.0429 8.04289L17.4571 9.45711Z"
11
+ }));
12
+ };
13
+ CheckboxCircleFillIcon.displayName = 'icon-checkbox-circle-fill';
@@ -0,0 +1,6 @@
1
+ import { SvgIconProps } from "@mui/material";
2
+ import * as React from "react";
3
+ export declare const CloseCircleFillIcon: {
4
+ (props: SvgIconProps): React.JSX.Element;
5
+ displayName: string;
6
+ };
@@ -0,0 +1,13 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+ import { SvgIcon } from "@mui/material";
3
+ import * as React from "react";
4
+ export var CloseCircleFillIcon = function CloseCircleFillIcon(props) {
5
+ return /*#__PURE__*/React.createElement(SvgIcon, _extends({
6
+ viewBox: "0 0 24 24",
7
+ version: "1.1",
8
+ xmlns: "http://www.w3.org/2000/svg"
9
+ }, props), /*#__PURE__*/React.createElement("path", {
10
+ d: "M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 10.5858L9.17157 7.75736L7.75736 9.17157L10.5858 12L7.75736 14.8284L9.17157 16.2426L12 13.4142L14.8284 16.2426L16.2426 14.8284L13.4142 12L16.2426 9.17157L14.8284 7.75736L12 10.5858Z"
11
+ }));
12
+ };
13
+ CloseCircleFillIcon.displayName = 'icon-close-circle-fill';
@@ -0,0 +1,6 @@
1
+ import { SvgIconProps } from "@mui/material";
2
+ import * as React from "react";
3
+ export declare const ErrorWarningFillIcon: {
4
+ (props: SvgIconProps): React.JSX.Element;
5
+ displayName: string;
6
+ };
@@ -0,0 +1,13 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+ import { SvgIcon } from "@mui/material";
3
+ import * as React from "react";
4
+ export var ErrorWarningFillIcon = function ErrorWarningFillIcon(props) {
5
+ return /*#__PURE__*/React.createElement(SvgIcon, _extends({
6
+ viewBox: "0 0 24 24",
7
+ version: "1.1",
8
+ xmlns: "http://www.w3.org/2000/svg"
9
+ }, props), /*#__PURE__*/React.createElement("path", {
10
+ d: "M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM11 15V17H13V15H11ZM11 7V13H13V7H11Z"
11
+ }));
12
+ };
13
+ ErrorWarningFillIcon.displayName = 'icon-error-warning-fill';
@@ -19,8 +19,10 @@ export { BoldIcon } from './bold-icon';
19
19
  export { BrushLineIcon } from './brush-line-icon';
20
20
  export { CarouselViewIcon } from './carousel-view-icon';
21
21
  export { CheckboxBlankCircleLineIcon } from './checkbox-blank-circle-line-icon';
22
+ export { CheckboxCircleFillIcon } from './checkbox-circle-fill-icon';
22
23
  export { CheckboxCircleLineIcon } from './checkbox-circle-line-icon';
23
24
  export { ClockwiseLineIcon } from './clockwise-line-icon';
25
+ export { CloseCircleFillIcon } from './close-circle-fill-icon';
24
26
  export { CodeBoxLineIcon } from './code-box-line-icon';
25
27
  export { CodeLineIcon } from './code-line-icon';
26
28
  export { CodeSSlashLineIcon } from './code-s-slash-line-icon';
@@ -33,6 +35,7 @@ export { DoubleQuotesLIcon } from './double-quotes-l-icon';
33
35
  export { DownloadLineIcon } from './download-line-icon';
34
36
  export { DraggableIcon } from './draggable-icon';
35
37
  export { EditBoxLineIcon } from './edit-box-line-icon';
38
+ export { ErrorWarningFillIcon } from './error-warning-fill-icon';
36
39
  export { ExportLineIcon } from './export-line-icon';
37
40
  export { FileCopyLineIcon } from './file-copy-line-icon';
38
41
  export { FileUploadLineIcon } from './file-upload-line-icon';
@@ -56,6 +59,7 @@ export { HeadingIcon } from './heading-icon';
56
59
  export { ImageAddLineIcon } from './image-add-line-icon';
57
60
  export { ImageLineIcon } from './image-line-icon';
58
61
  export { ImportLineIcon } from './import-line-icon';
62
+ export { Information2FillIcon } from './information-2-fill-icon';
59
63
  export { InsertColumnLeftIcon } from './insert-column-left-icon';
60
64
  export { InsertColumnRightIcon } from './insert-column-right-icon';
61
65
  export { InsertRowBottomIcon } from './insert-row-bottom-icon';
@@ -83,6 +87,7 @@ export { Notification3LineIcon } from './notification-3-line-icon';
83
87
  export { OrganizationChartIcon } from './organization-chart-icon';
84
88
  export { PauseLineIcon } from './pause-line-icon';
85
89
  export { PlayLineIcon } from './play-line-icon';
90
+ export { QuestionFillIcon } from './question-fill-icon';
86
91
  export { QuoteTextIcon } from './quote-text-icon';
87
92
  export { Repeat2LineIcon } from './repeat-2-line-icon';
88
93
  export { ResetLeftFillIcon } from './reset-left-fill-icon';
@@ -22,8 +22,10 @@ export { BoldIcon } from "./bold-icon";
22
22
  export { BrushLineIcon } from "./brush-line-icon";
23
23
  export { CarouselViewIcon } from "./carousel-view-icon";
24
24
  export { CheckboxBlankCircleLineIcon } from "./checkbox-blank-circle-line-icon";
25
+ export { CheckboxCircleFillIcon } from "./checkbox-circle-fill-icon";
25
26
  export { CheckboxCircleLineIcon } from "./checkbox-circle-line-icon";
26
27
  export { ClockwiseLineIcon } from "./clockwise-line-icon";
28
+ export { CloseCircleFillIcon } from "./close-circle-fill-icon";
27
29
  export { CodeBoxLineIcon } from "./code-box-line-icon";
28
30
  export { CodeLineIcon } from "./code-line-icon";
29
31
  export { CodeSSlashLineIcon } from "./code-s-slash-line-icon";
@@ -36,6 +38,7 @@ export { DoubleQuotesLIcon } from "./double-quotes-l-icon";
36
38
  export { DownloadLineIcon } from "./download-line-icon";
37
39
  export { DraggableIcon } from "./draggable-icon";
38
40
  export { EditBoxLineIcon } from "./edit-box-line-icon";
41
+ export { ErrorWarningFillIcon } from "./error-warning-fill-icon";
39
42
  export { ExportLineIcon } from "./export-line-icon";
40
43
  export { FileCopyLineIcon } from "./file-copy-line-icon";
41
44
  export { FileUploadLineIcon } from "./file-upload-line-icon";
@@ -59,6 +62,7 @@ export { HeadingIcon } from "./heading-icon";
59
62
  export { ImageAddLineIcon } from "./image-add-line-icon";
60
63
  export { ImageLineIcon } from "./image-line-icon";
61
64
  export { ImportLineIcon } from "./import-line-icon";
65
+ export { Information2FillIcon } from "./information-2-fill-icon";
62
66
  export { InsertColumnLeftIcon } from "./insert-column-left-icon";
63
67
  export { InsertColumnRightIcon } from "./insert-column-right-icon";
64
68
  export { InsertRowBottomIcon } from "./insert-row-bottom-icon";
@@ -86,6 +90,7 @@ export { Notification3LineIcon } from "./notification-3-line-icon";
86
90
  export { OrganizationChartIcon } from "./organization-chart-icon";
87
91
  export { PauseLineIcon } from "./pause-line-icon";
88
92
  export { PlayLineIcon } from "./play-line-icon";
93
+ export { QuestionFillIcon } from "./question-fill-icon";
89
94
  export { QuoteTextIcon } from "./quote-text-icon";
90
95
  export { Repeat2LineIcon } from "./repeat-2-line-icon";
91
96
  export { ResetLeftFillIcon } from "./reset-left-fill-icon";
@@ -0,0 +1,6 @@
1
+ import { SvgIconProps } from "@mui/material";
2
+ import * as React from "react";
3
+ export declare const Information2FillIcon: {
4
+ (props: SvgIconProps): React.JSX.Element;
5
+ displayName: string;
6
+ };
@@ -0,0 +1,13 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+ import { SvgIcon } from "@mui/material";
3
+ import * as React from "react";
4
+ export var Information2FillIcon = function Information2FillIcon(props) {
5
+ return /*#__PURE__*/React.createElement(SvgIcon, _extends({
6
+ viewBox: "0 0 24 24",
7
+ version: "1.1",
8
+ xmlns: "http://www.w3.org/2000/svg"
9
+ }, props), /*#__PURE__*/React.createElement("path", {
10
+ d: "M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM12 9.5C12.8284 9.5 13.5 8.82843 13.5 8C13.5 7.17157 12.8284 6.5 12 6.5C11.1716 6.5 10.5 7.17157 10.5 8C10.5 8.82843 11.1716 9.5 12 9.5ZM14 15H13V10.5H10V12.5H11V15H10V17H14V15Z"
11
+ }));
12
+ };
13
+ Information2FillIcon.displayName = 'icon-information-2-fill';
@@ -0,0 +1,6 @@
1
+ import { SvgIconProps } from "@mui/material";
2
+ import * as React from "react";
3
+ export declare const QuestionFillIcon: {
4
+ (props: SvgIconProps): React.JSX.Element;
5
+ displayName: string;
6
+ };
@@ -0,0 +1,13 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+ import { SvgIcon } from "@mui/material";
3
+ import * as React from "react";
4
+ export var QuestionFillIcon = function QuestionFillIcon(props) {
5
+ return /*#__PURE__*/React.createElement(SvgIcon, _extends({
6
+ viewBox: "0 0 24 24",
7
+ version: "1.1",
8
+ xmlns: "http://www.w3.org/2000/svg"
9
+ }, props), /*#__PURE__*/React.createElement("path", {
10
+ d: "M12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12C22 17.5228 17.5228 22 12 22ZM11 15V17H13V15H11ZM13 13.3551C14.4457 12.9248 15.5 11.5855 15.5 10C15.5 8.067 13.933 6.5 12 6.5C10.302 6.5 8.88637 7.70919 8.56731 9.31346L10.5288 9.70577C10.6656 9.01823 11.2723 8.5 12 8.5C12.8284 8.5 13.5 9.17157 13.5 10C13.5 10.8284 12.8284 11.5 12 11.5C11.4477 11.5 11 11.9477 11 12.5V14H13V13.3551Z"
11
+ }));
12
+ };
13
+ QuestionFillIcon.displayName = 'icon-question-fill';
@@ -14,8 +14,8 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
14
14
  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; }
15
15
  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; } }
16
16
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
17
- import { Box, MenuItem, Paper, Select, Stack } from '@mui/material';
18
17
  import { ArrowDownSLineIcon, ArrowGoForwardLineIcon, ArrowLeftWideLineIcon, DeleteLineIcon, FontSizeIcon, ListOrdered2Icon, ListUnorderedIcon } from "../Icons";
18
+ import { Box, MenuItem, Paper, Select, Stack } from '@mui/material';
19
19
  import React, { useEffect, useRef, useState } from 'react';
20
20
  import { ToolbarItem } from "../Toolbar";
21
21
  var ListHover = function ListHover(_ref) {
@@ -8,8 +8,8 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
8
8
  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; }
9
9
  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; } }
10
10
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
- import { Box, MenuItem, Select, Stack, Tooltip } from "@mui/material";
12
11
  import { getShortcutKeyText } from "../../util";
12
+ import { Box, MenuItem, Select, Stack, Tooltip } from "@mui/material";
13
13
  import React, { useEffect, useState } from "react";
14
14
  import { AlignCenterIcon, AlignJustifyIcon, AlignLeftIcon, AlignRightIcon, ArrowDownSLineIcon } from "../Icons";
15
15
  import ToolbarItem from "./Item";
@@ -8,8 +8,8 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
8
8
  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; }
9
9
  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; } }
10
10
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
- import { Box, MenuItem, Select, Stack, Tooltip } from "@mui/material";
12
11
  import { getShortcutKeyText } from "../../util";
12
+ import { Box, MenuItem, Select, Stack, Tooltip } from "@mui/material";
13
13
  import React, { useEffect, useState } from "react";
14
14
  import { ArrowDownSLineIcon, CodeBoxLineIcon, CodeLineIcon, CodeSSlashLineIcon } from "../Icons";
15
15
  import ToolbarItem from "./Item";
@@ -8,8 +8,8 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
8
8
  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; }
9
9
  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; } }
10
10
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
- import { Box, MenuItem, Select, Stack, Tooltip } from "@mui/material";
12
11
  import { getShortcutKeyText } from "../../util";
12
+ import { Box, MenuItem, Select, Stack, Tooltip } from "@mui/material";
13
13
  import React, { useEffect, useState } from "react";
14
14
  import { ArrowDownSLineIcon, H1Icon, H2Icon, H3Icon, H4Icon, H5Icon, H6Icon, HeadingIcon } from "../Icons";
15
15
  import ToolItem from "./Item";
@@ -8,8 +8,8 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
8
8
  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; }
9
9
  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; } }
10
10
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
- import { Box, MenuItem, Select, Stack, Tooltip } from "@mui/material";
12
11
  import { getShortcutKeyText } from "../../../util";
12
+ import { Box, MenuItem, Select, Stack, Tooltip } from "@mui/material";
13
13
  import React, { useEffect, useState } from "react";
14
14
  import { ArrowDownSLineIcon, AttachmentLineIcon, ImageLineIcon, MovieLineIcon, Music2LineIcon, UploadIcon } from "../../Icons";
15
15
  import ToolbarItem from "../Item";
@@ -8,8 +8,8 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
8
8
  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; }
9
9
  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; } }
10
10
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
- import { Box, MenuItem, Select, Stack, Tooltip } from "@mui/material";
12
11
  import { getShortcutKeyText } from "../../util";
12
+ import { Box, MenuItem, Select, Stack, Tooltip } from "@mui/material";
13
13
  import React, { useEffect, useState } from "react";
14
14
  import { ArrowDownSLineIcon, ListCheck3Icon, ListOrdered2Icon, ListUnorderedIcon } from "../Icons";
15
15
  import ToolItem from "./Item";
@@ -8,8 +8,8 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
8
8
  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; }
9
9
  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; } }
10
10
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
- import { Box, MenuItem, Select, Stack, Tooltip } from "@mui/material";
12
11
  import { getShortcutKeyText } from "../../util";
12
+ import { Box, MenuItem, Select, Stack, Tooltip } from "@mui/material";
13
13
  import React, { useEffect, useState } from "react";
14
14
  import { ArrowDownSLineIcon, FormulaIcon, FunctionsIcon, SquareRootIcon } from "../Icons";
15
15
  import ToolbarItem from "./Item";
@@ -4,9 +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 { Box, Dialog, DialogContent, DialogTitle, Stack } from "@mui/material";
8
7
  import { SHORTCUT_KEYS } from "../../../contants/shortcut-key";
9
8
  import { getShortcutKeyText } from "../../../util";
9
+ import { Box, Dialog, DialogContent, DialogTitle, Stack } from "@mui/material";
10
10
  import React from "react";
11
11
  var NotificationDialog = function NotificationDialog(_ref) {
12
12
  var open = _ref.open,
@@ -8,9 +8,9 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
8
8
  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; }
9
9
  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; } }
10
10
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
- import { Box, MenuItem, Select, Stack } from "@mui/material";
12
11
  import { MoreLineIcon, Notification3LineIcon } from "../../Icons";
13
12
  import ToolbarItem from "../Item";
13
+ import { Box, MenuItem, Select, Stack } from "@mui/material";
14
14
  import React, { useState } from "react";
15
15
  import NotificationDialog from "./NotificationDialog";
16
16
  var EditorMore = function EditorMore(_ref) {
@@ -8,8 +8,8 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
8
8
  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; }
9
9
  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; } }
10
10
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
- import { Box, MenuItem, Select, Stack, Tooltip } from "@mui/material";
12
11
  import { getShortcutKeyText } from "../../util";
12
+ import { Box, MenuItem, Select, Stack, Tooltip } from "@mui/material";
13
13
  import React, { useEffect, useState } from "react";
14
14
  import { ArrowDownSLineIcon, SubscriptIcon, SuperscriptIcon } from "../Icons";
15
15
  import ToolbarItem from "./Item";
@@ -8,8 +8,8 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
8
8
  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; }
9
9
  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; } }
10
10
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
- import { Box, MenuItem, Select, Stack, Tooltip } from "@mui/material";
12
11
  import { getShortcutKeyText } from "../../util";
12
+ import { Box, MenuItem, Select, Stack, Tooltip } from "@mui/material";
13
13
  import React, { useEffect, useState } from "react";
14
14
  import { AlignBottomIcon, AlignTopIcon, AlignVerticallyIcon, ArrowDownSLineIcon } from "../Icons";
15
15
  import ToolbarItem from "./Item";
@@ -8,8 +8,8 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
8
8
  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); }
9
9
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
10
10
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
11
- import { Box, Button, Stack, Tooltip } from '@mui/material';
12
11
  import { getShortcutKeyText } from "../../util";
12
+ import { Box, Button, Stack, Tooltip } from '@mui/material';
13
13
  import React from 'react';
14
14
  var ToolbarItem = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
15
15
  var tip = _ref.tip,
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ interface AlertViewWrapperProps {
3
+ node: any;
4
+ updateAttributes: any;
5
+ selected: boolean;
6
+ editor: any;
7
+ onUpload?: (file: File) => Promise<string>;
8
+ onError?: (error: string) => void;
9
+ }
10
+ declare const AlertViewWrapper: React.FC<AlertViewWrapperProps>;
11
+ export default AlertViewWrapper;