@ctzhian/tiptap 1.6.27 → 1.6.28

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.
@@ -1,4 +1,5 @@
1
1
  import { EditorProps } from "../type";
2
2
  import React from 'react';
3
+ import 'core-js/actual/array/find-last';
3
4
  declare const Editor: ({ editor, menuInDragHandle, menuInBubbleMenu, onTip }: EditorProps) => React.JSX.Element;
4
5
  export default Editor;
@@ -1,8 +1,12 @@
1
+ import "core-js/modules/es.array.find-last.js";
1
2
  import { EditorContent } from '@tiptap/react';
2
3
  import React from 'react';
3
4
  import { PhotoProvider } from 'react-photo-view';
4
5
  import SelectionText from "../component/CustomBubbleMenu/SelectionText";
5
6
  import CustomDragHandle from "../component/CustomDragHandle";
7
+
8
+ // fix: https://github.com/ueberdosis/tiptap/issues/6785
9
+
6
10
  var Editor = function Editor(_ref) {
7
11
  var editor = _ref.editor,
8
12
  menuInDragHandle = _ref.menuInDragHandle,
@@ -1,4 +1,5 @@
1
1
  import React from "react";
2
+ import 'core-js/actual/array/find-last';
2
3
  interface EditorDiffProps {
3
4
  oldHtml: string;
4
5
  newHtml: string;
@@ -1,7 +1,11 @@
1
+ import "core-js/modules/es.array.find-last.js";
1
2
  import { EditorContent } from "@tiptap/react";
2
3
  import React, { useEffect } from "react";
3
4
  import { PhotoProvider } from "react-photo-view";
4
5
  import useTiptap from "../hook";
6
+
7
+ // fix: https://github.com/ueberdosis/tiptap/issues/6785
8
+
5
9
  var EditorDiff = function EditorDiff(_ref) {
6
10
  var oldHtml = _ref.oldHtml,
7
11
  newHtml = _ref.newHtml;
@@ -1,5 +1,4 @@
1
1
  import { UseTiptapProps, UseTiptapReturn } from "../type";
2
2
  import { UseEditorOptions } from '@tiptap/react';
3
- import 'core-js/actual/array/find-last';
4
3
  declare const useTiptap: ({ exclude, extensions: extensionsProps, mentionItems, onMentionFilter, onSave, onError, onUpload, onTocUpdate, onAiWritingGetSuggestion, editable, ...options }: UseTiptapProps & UseEditorOptions) => UseTiptapReturn;
5
4
  export default useTiptap;
@@ -7,14 +7,10 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
7
7
  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); }
8
8
  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; }
9
9
  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; }
10
- import "core-js/modules/es.array.find-last.js";
11
10
  import { getExtensions } from "../extension";
12
11
  import { migrateMathStrings } from "../util";
13
12
  import { useEditor } from '@tiptap/react';
14
13
  import { renderToMarkdown } from '@tiptap/static-renderer/pm/markdown';
15
-
16
- // fix: https://github.com/ueberdosis/tiptap/issues/6785
17
-
18
14
  var useTiptap = function useTiptap(_ref) {
19
15
  var exclude = _ref.exclude,
20
16
  extensionsProps = _ref.extensions,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ctzhian/tiptap",
3
- "version": "1.6.27",
3
+ "version": "1.6.28",
4
4
  "description": "基于 Tiptap 二次开发的编辑器组件",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -111,6 +111,7 @@
111
111
  "@tiptap/starter-kit": "3.5.3",
112
112
  "@tiptap/static-renderer": "3.5.3",
113
113
  "@tiptap/suggestion": "3.5.3",
114
+ "core-js": "^3.46.0",
114
115
  "diff-match-patch": "^1.0.5",
115
116
  "highlight.js": "^11.11.1",
116
117
  "jszip": "^3.10.1",