reactjs-tiptap-editor 1.0.13 → 1.0.15
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.
- package/lib/{ActionMenuButton-DNj0f_A4.cjs → ActionMenuButton-CWufGd7i.cjs} +1 -1
- package/lib/{ActionMenuButton-l5rSmAO_.js → ActionMenuButton-yWfQQXo5.js} +5 -5
- package/lib/Attachment.cjs +1 -1
- package/lib/Attachment.js +6 -6
- package/lib/Blockquote.cjs +1 -1
- package/lib/Blockquote.js +4 -4
- package/lib/Bold.cjs +1 -1
- package/lib/Bold.js +4 -4
- package/lib/BulletList.cjs +1 -1
- package/lib/BulletList.js +4 -4
- package/lib/Callout.cjs +1 -1
- package/lib/Callout.js +36 -40
- package/lib/Clear.cjs +1 -1
- package/lib/Clear.js +3 -3
- package/lib/Code.cjs +1 -1
- package/lib/Code.js +4 -4
- package/lib/CodeBlock.cjs +1 -1
- package/lib/CodeBlock.js +6 -6
- package/lib/CodeView.cjs +1 -1
- package/lib/CodeView.js +4 -4
- package/lib/Color.cjs +1 -1
- package/lib/Color.js +6 -6
- package/lib/Column.cjs +1 -1
- package/lib/Column.js +4 -4
- package/lib/{Drawer-Cbi_MURj.js → Drawer-C0rJpSQV.js} +8 -8
- package/lib/{Drawer-DKU32YW_.cjs → Drawer-CK1NdsE9.cjs} +1 -1
- package/lib/Drawer.cjs +1 -1
- package/lib/Drawer.js +3 -3
- package/lib/Emoji.cjs +1 -1
- package/lib/Emoji.js +212 -2076
- package/lib/{Excalidraw-CWrVL5hs.js → Excalidraw-ChvBaUFj.js} +6 -6
- package/lib/{Excalidraw-Kb-TRcWY.cjs → Excalidraw-FQMP_e8X.cjs} +1 -1
- package/lib/Excalidraw.cjs +1 -1
- package/lib/Excalidraw.js +2 -2
- package/lib/ExportPdf.cjs +1 -1
- package/lib/ExportPdf.js +4 -4
- package/lib/ExportWord.cjs +1 -1
- package/lib/ExportWord.js +4 -4
- package/lib/FontFamily.cjs +1 -1
- package/lib/FontFamily.js +6 -6
- package/lib/FontSize.cjs +1 -1
- package/lib/FontSize.js +6 -6
- package/lib/Heading.cjs +1 -1
- package/lib/Heading.js +6 -6
- package/lib/Highlight.cjs +1 -1
- package/lib/Highlight.js +6 -6
- package/lib/History.cjs +1 -1
- package/lib/History.js +22 -22
- package/lib/HorizontalRule.cjs +1 -1
- package/lib/HorizontalRule.js +4 -4
- package/lib/{Icon-yqCglrdK.cjs → Icon-CM1Cjn99.cjs} +1 -1
- package/lib/{Icon-Ctva8VeB.js → Icon-r62Z3hkc.js} +2 -2
- package/lib/{Iframe-C942bNjs.js → Iframe-C3rQAa7b.js} +6 -6
- package/lib/{Iframe-BczF8Hex.cjs → Iframe-Cxf_DSBV.cjs} +1 -1
- package/lib/Iframe.cjs +1 -1
- package/lib/Iframe.js +2 -2
- package/lib/Image-CndKNf1r.js +925 -0
- package/lib/Image-uX801fbV.cjs +1 -0
- package/lib/Image.cjs +1 -1
- package/lib/Image.js +5 -828
- package/lib/ImageGif.cjs +1 -1
- package/lib/ImageGif.js +9 -9
- package/lib/ImportWord.cjs +1 -231
- package/lib/ImportWord.js +91 -16623
- package/lib/{Indent-C_O5WdyR.js → Indent-CRs7DcJ7.js} +4 -4
- package/lib/{Indent-CkEC7x36.cjs → Indent-MRKDhN1d.cjs} +1 -1
- package/lib/Indent.cjs +1 -1
- package/lib/Indent.js +2 -2
- package/lib/Italic.cjs +1 -1
- package/lib/Italic.js +4 -4
- package/lib/{Katex-D3PEWimM.js → Katex-BwVNxYe7.js} +369 -347
- package/lib/Katex-Clvcitiy.cjs +4 -0
- package/lib/Katex.cjs +1 -1
- package/lib/Katex.js +2 -2
- package/lib/LineHeight.cjs +1 -1
- package/lib/LineHeight.js +7 -7
- package/lib/Link.cjs +1 -1
- package/lib/Link.js +2 -2
- package/lib/{LinkEditBlock-DL1e2ILk.cjs → LinkEditBlock-CWTjZr7s.cjs} +1 -1
- package/lib/{LinkEditBlock-h5054QDo.js → LinkEditBlock-wuQ6wF2z.js} +11 -11
- package/lib/Mention.cjs +1 -1
- package/lib/Mention.js +41 -63
- package/lib/Mermaid.cjs +1 -1
- package/lib/Mermaid.js +16 -16
- package/lib/MoreMark.cjs +1 -1
- package/lib/MoreMark.js +7 -7
- package/lib/OrderedList.cjs +1 -1
- package/lib/OrderedList.js +4 -4
- package/lib/SearchAndReplace.cjs +1 -1
- package/lib/SearchAndReplace.js +11 -11
- package/lib/SlashCommand.cjs +1 -1
- package/lib/SlashCommand.js +9 -9
- package/lib/{SlashCommandNodeView-DXUqkx82.js → SlashCommandNodeView-B1gtWo_V.js} +61 -66
- package/lib/SlashCommandNodeView-R0CQmgNf.cjs +1 -0
- package/lib/Strike.cjs +1 -1
- package/lib/Strike.js +4 -4
- package/lib/{Table-kY0nbqJo.cjs → Table-Bc7tWR2B.cjs} +1 -1
- package/lib/{Table-DdrY4jcM.js → Table-CX-KhOti.js} +22 -22
- package/lib/Table.cjs +1 -1
- package/lib/Table.js +1 -1
- package/lib/TaskList.cjs +1 -1
- package/lib/TaskList.js +4 -4
- package/lib/TextAlign.cjs +1 -1
- package/lib/TextAlign.js +7 -7
- package/lib/TextDirection.cjs +1 -1
- package/lib/TextDirection.js +7 -7
- package/lib/TextUnderline.cjs +1 -1
- package/lib/TextUnderline.js +4 -4
- package/lib/{Twitter-DjZcVa3l.cjs → Twitter-BEELS4WN.cjs} +1 -1
- package/lib/{Twitter-B-JQ3ZJ1.js → Twitter-DWxlLtyE.js} +10 -10
- package/lib/Twitter.cjs +1 -1
- package/lib/Twitter.js +2 -2
- package/lib/Video.cjs +1 -1
- package/lib/Video.js +9 -9
- package/lib/bubble.cjs +1 -1
- package/lib/bubble.js +27 -27
- package/lib/{button-Uv01FNnd.js → button-BHVEzoNa.js} +2 -2
- package/lib/{button-BS3n6_Aq.cjs → button-C_ES-H6-.cjs} +1 -1
- package/lib/{checkbox-C8ByRi7-.cjs → checkbox-DerJy3zE.cjs} +1 -1
- package/lib/{checkbox-DEFNwGwb.js → checkbox-H16jHmU7.js} +1 -1
- package/lib/{clsx-BWSGDJNJ.js → clsx-DSzxBzvL.js} +11 -11
- package/lib/{dialog-DwTMZSt6.js → dialog-BIDVvFgj.js} +1 -1
- package/lib/{dialog-Bt5zwGYB.cjs → dialog-C6j99nwb.cjs} +1 -1
- package/lib/{dropdown-menu-BetI14G6.js → dropdown-menu-BONvj89O.js} +1 -1
- package/lib/{dropdown-menu-Bo68IEOT.cjs → dropdown-menu-Bs9HlT_z.cjs} +1 -1
- package/lib/extensions/Emoji/Emoji.d.ts +3 -1
- package/lib/extensions/Emoji/components/EmojiList/EmojiNodeView.d.ts +9 -1
- package/lib/{index-CHKWG6E8.js → index-4bHF5ovf.js} +1 -1
- package/lib/index-BCnlmprm.cjs +1 -0
- package/lib/{index-Dujzr6bY.js → index-C5aucGFK.js} +69 -73
- package/lib/{index-CcoWj0mF.js → index-CL7JP-Xz.js} +1 -1
- package/lib/{index-mR8PNv5P.js → index-CpTykZBR.js} +1 -1
- package/lib/index-CyToCRcM.cjs +1 -0
- package/lib/{index-BDKHXe7R.js → index-D8li6EQ4.js} +1 -1
- package/lib/{index-Doks9cbR.cjs → index-D9U_fxh1.cjs} +1 -1
- package/lib/{index-DJbmnBzK.js → index-DR5tIdL7.js} +1 -1
- package/lib/index-QbkujP_O.js +273 -0
- package/lib/{index-DF5ZPtWM.js → index-w1tuwtjd.js} +54 -56
- package/lib/index.cjs +2 -2
- package/lib/index.js +4 -4
- package/lib/{input-DUBdJD3L.js → input-B5KKrCv9.js} +1 -1
- package/lib/{input-Dt_BA_9B.cjs → input-BqK_Byqu.cjs} +1 -1
- package/lib/{isNumber-CIgubz2e.js → isNumber-ClwLypY2.js} +1 -1
- package/lib/{label-JNOksCA-.cjs → label-B4bPSQ9R.cjs} +1 -1
- package/lib/{label-topD46-u.js → label-DRlIWK9v.js} +2 -2
- package/lib/locale-bundle.cjs +1 -1
- package/lib/locale-bundle.js +1 -1
- package/lib/locales/index.d.ts +5 -1
- package/lib/{popover-LfNBhRyz.js → popover-3G0SoGLu.js} +1 -1
- package/lib/{popover-mL-2sX5r.cjs → popover-Dz8-t65R.cjs} +1 -1
- package/lib/renderNodeView-CSazLrKF.js +28 -0
- package/lib/renderNodeView-DfLmGrgA.cjs +1 -0
- package/lib/{select-DctYuHLH.js → select-BsKwU96B.js} +1 -1
- package/lib/{select-CwGYPsPq.cjs → select-DAYrMJGw.cjs} +1 -1
- package/lib/{separator-Ddfrhn4D.js → separator-D-k3jqSx.js} +5 -5
- package/lib/{separator-NoH_SLRW.cjs → separator-DhFsFHrr.cjs} +1 -1
- package/lib/store/commandList.d.ts +5 -1
- package/lib/store/store.d.ts +7 -6
- package/lib/{store-DNpS8vXA.js → store-BqlO_bdQ.js} +1 -1
- package/lib/{store-CkjKIgjQ.cjs → store-DkhlVuvE.cjs} +1 -1
- package/lib/{tabs-DRSwUeKP.cjs → tabs-Bj_1FHsB.cjs} +1 -1
- package/lib/{tabs-BT3AeqQQ.js → tabs-Do-p89DG.js} +1 -1
- package/lib/{textarea-DZzMEDfZ.js → textarea-BU9GfWiN.js} +1 -1
- package/lib/{textarea-BDO6XQoF.cjs → textarea-DRQRAKDT.cjs} +1 -1
- package/lib/theme.cjs +1 -1
- package/lib/theme.js +21 -27
- package/lib/{throttle-IERhwcLa.js → throttle-D040PfWL.js} +1 -1
- package/lib/{toggle-DKHg5sLm.js → toggle-BFJ-X-Zp.js} +4 -4
- package/lib/{toggle-BQHMh_Q-.cjs → toggle-Df4nXsom.cjs} +1 -1
- package/lib/{tooltip-BYtGp6FM.cjs → tooltip-BCKvrxQJ.cjs} +1 -1
- package/lib/{tooltip-DNKq7zgN.js → tooltip-CKN-cdhm.js} +1 -1
- package/lib/{updatePosition-Bie75EFq.js → updatePosition-CDK7OR0i.js} +2 -2
- package/lib/{useButtonProps-DVP4s_ER.js → useButtonProps-BCNfeziv.js} +5 -5
- package/lib/{useButtonProps-DBJkNDS2.cjs → useButtonProps-BgjZY_Mu.cjs} +1 -1
- package/lib/utils/renderNodeView.d.ts +6 -0
- package/package.json +16 -3
- package/lib/Katex-DW_HjgNM.cjs +0 -4
- package/lib/SlashCommandNodeView-BqrmHCpu.cjs +0 -1
- package/lib/_commonjsHelpers-BItOPCY9.js +0 -28
- package/lib/_commonjsHelpers-BTDuMlIz.cjs +0 -1
- package/lib/extensions/Emoji/components/EmojiList/emojis.d.ts +0 -4
- package/lib/index-D3RLYf-J.cjs +0 -1
- package/lib/react-BEoMZB61.cjs +0 -1
- package/lib/react-c9FSfB30.js +0 -27
- package/lib/use-toast-Bz3QCOtE.cjs +0 -1
- package/lib/use-toast-Crf7-q5H.js +0 -98
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { s as y, E as x } from "./clsx-
|
|
1
|
+
import { s as y, E as x } from "./clsx-DSzxBzvL.js";
|
|
2
2
|
import { TextSelection as b, AllSelection as I } from "@tiptap/pm/state";
|
|
3
3
|
import { jsx as u, Fragment as m, jsxs as A } from "react/jsx-runtime";
|
|
4
|
-
import { A as p } from "./toggle-
|
|
4
|
+
import { A as p } from "./toggle-BFJ-X-Zp.js";
|
|
5
5
|
import "react";
|
|
6
|
-
import "./index-
|
|
6
|
+
import "./index-w1tuwtjd.js";
|
|
7
7
|
import "./theme.js";
|
|
8
|
-
import { u as T, a as K } from "./useButtonProps-
|
|
8
|
+
import { u as T, a as K } from "./useButtonProps-BCNfeziv.js";
|
|
9
9
|
var a = /* @__PURE__ */ ((t) => (t[t.max = 7] = "max", t[t.min = 0] = "min", t[t.more = 1] = "more", t[t.less = -1] = "less", t))(a || {});
|
|
10
10
|
function g(t, n, e) {
|
|
11
11
|
return t < n ? n : t > e ? e : t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const h=require("./clsx-CXbNJWDD.cjs"),m=require("@tiptap/pm/state"),c=require("react/jsx-runtime"),l=require("./toggle-
|
|
1
|
+
"use strict";const h=require("./clsx-CXbNJWDD.cjs"),m=require("@tiptap/pm/state"),c=require("react/jsx-runtime"),l=require("./toggle-Df4nXsom.cjs");require("react");require("./index-CyToCRcM.cjs");require("./theme.cjs");const p=require("./useButtonProps-BgjZY_Mu.cjs");var a=(t=>(t[t.max=7]="max",t[t.min=0]="min",t[t.more=1]="more",t[t.less=-1]="less",t))(a||{});function T(t,e,n){return t<e?e:t>n?n:t}function g(t,e,n,o){const{doc:i,selection:r}=t;if(!i||!r||!(r instanceof m.TextSelection||r instanceof m.AllSelection))return t;const{from:s,to:u}=r;return i.nodesBetween(s,u,(d,I)=>{const b=d.type;return n.includes(b.name)?(t=y(t,I,e),!1):!h.isList(d.type.name,o.extensionManager.extensions)}),t}function y(t,e,n){if(!t.doc)return t;const o=t.doc.nodeAt(e);if(!o)return t;const s=T((o.attrs.indent||0)+n,0,7);if(s===o.attrs.indent)return t;const u={...o.attrs,indent:s};return t.setNodeMarkup(e,o.type,u,o.marks)}function f({delta:t,types:e}){return({state:n,dispatch:o,editor:i})=>{const{selection:r}=n;let{tr:s}=n;return s=s.setSelection(r),s=g(s,t,e,i),s.docChanged?(o&&o(s),!0):!1}}function A(){const t=p.useButtonProps(x.name),{indent:e,outdent:n}=(t==null?void 0:t.componentProps)??{},{editorDisabled:o}=p.useToggleActive(),i=()=>{o||e!=null&&e.action&&(e==null||e.action())},r=()=>{o||n!=null&&n.action&&(n==null||n.action())};return t?c.jsxs(c.Fragment,{children:[c.jsx(l.ActionButton,{action:i,disabled:o,icon:e==null?void 0:e.icon,shortcutKeys:e==null?void 0:e.shortcutKeys,tooltip:e==null?void 0:e.tooltip}),c.jsx(l.ActionButton,{action:r,disabled:o,icon:n==null?void 0:n.icon,shortcutKeys:n==null?void 0:n.shortcutKeys,tooltip:n==null?void 0:n.tooltip})]}):c.jsx(c.Fragment,{})}const x=h.Extension.create({name:"richtextIndentOutdent",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),types:["paragraph","heading","blockquote"],minIndent:a.min,maxIndent:a.max,button({editor:e,t:n,extension:o}){var i,r;return{componentProps:{indent:{action:()=>{e.commands.indent()},shortcutKeys:((i=o.options.shortcutKeys)==null?void 0:i[0])??["Tab"],icon:"IndentIncrease",tooltip:n("editor.indent.tooltip")},outdent:{action:()=>{e.commands.outdent()},shortcutKeys:((r=o.options.shortcutKeys)==null?void 0:r[1])??["Shift","Tab"],icon:"IndentDecrease",tooltip:n("editor.outdent.tooltip")}}}}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{indent:{default:0,parseHTML:t=>{const e=t.dataset.indent;return(e?Number.parseInt(e,10):0)||0},renderHTML:t=>t.indent?{"data-indent":t.indent}:{}}}}]},addCommands(){return{indent:()=>f({delta:a.more,types:this.options.types}),outdent:()=>f({delta:a.less,types:this.options.types})}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.indent(),"Shift-Tab":()=>this.editor.commands.outdent()}}});exports.Indent=x;exports.IndentProps=a;exports.RichTextIndent=A;exports.setNodeIndentMarkup=y;
|
package/lib/Indent.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./clsx-CXbNJWDD.cjs");const e=require("./Indent-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./clsx-CXbNJWDD.cjs");const e=require("./Indent-MRKDhN1d.cjs");exports.Indent=e.Indent;exports.RichTextIndent=e.RichTextIndent;
|
package/lib/Indent.js
CHANGED
package/lib/Italic.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./clsx-CXbNJWDD.cjs"),s=require("react/jsx-runtime"),y=require("./toggle-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./clsx-CXbNJWDD.cjs"),s=require("react/jsx-runtime"),y=require("./toggle-Df4nXsom.cjs");require("react");require("./index-CyToCRcM.cjs");require("./theme.cjs");const u=require("./useButtonProps-BgjZY_Mu.cjs");var I=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,h=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,v=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,f=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,k=r.Mark.create({name:"italic",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"em"},{tag:"i",getAttrs:t=>t.style.fontStyle!=="normal"&&null},{style:"font-style=normal",clearMark:t=>t.type.name===this.name},{style:"font-style=italic"}]},renderHTML({HTMLAttributes:t}){return["em",r.mergeAttributes(this.options.HTMLAttributes,t),0]},addCommands(){return{setItalic:()=>({commands:t})=>t.setMark(this.name),toggleItalic:()=>({commands:t})=>t.toggleMark(this.name),unsetItalic:()=>({commands:t})=>t.unsetMark(this.name)}},markdownTokenName:"em",parseMarkdown:(t,e)=>e.applyMark("italic",e.parseInline(t.tokens||[])),renderMarkdown:(t,e)=>`*${e.renderChildren(t)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[r.markInputRule({find:I,type:this.type}),r.markInputRule({find:v,type:this.type})]},addPasteRules(){return[r.markPasteRule({find:h,type:this.type}),r.markPasteRule({find:f,type:this.type})]}}),M=k;function R(){const t=u.useButtonProps(c.name),{icon:e=void 0,tooltip:n=void 0,shortcutKeys:i=void 0,tooltipOptions:l={},action:a=void 0,isActive:d=void 0}=(t==null?void 0:t.componentProps)??{},{dataState:p,disabled:o,update:m}=u.useToggleActive(d),g=()=>{o||a&&(a(),m())};return t?s.jsx(y.ActionButton,{action:g,dataState:p,disabled:o,icon:e,shortcutKeys:i,tooltip:n,tooltipOptions:l}):s.jsx(s.Fragment,{})}const c=M.extend({addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),button({editor:e,t:n,extension:i}){return{componentProps:{action:()=>e.commands.toggleItalic(),isActive:()=>e.isActive("italic")||!1,disabled:!1,shortcutKeys:i.options.shortcutKeys??["mod","I"],icon:"Italic",tooltip:n("editor.italic.tooltip")}}}}}});exports.Italic=c;exports.RichTextItalic=R;
|
package/lib/Italic.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { M as g, e as n, f as o, m as y } from "./clsx-
|
|
1
|
+
import { M as g, e as n, f as o, m as y } from "./clsx-DSzxBzvL.js";
|
|
2
2
|
import { jsx as d, Fragment as f } from "react/jsx-runtime";
|
|
3
|
-
import { A as h } from "./toggle-
|
|
3
|
+
import { A as h } from "./toggle-BFJ-X-Zp.js";
|
|
4
4
|
import "react";
|
|
5
|
-
import "./index-
|
|
5
|
+
import "./index-w1tuwtjd.js";
|
|
6
6
|
import "./theme.js";
|
|
7
|
-
import { u as I, a as v } from "./useButtonProps-
|
|
7
|
+
import { u as I, a as v } from "./useButtonProps-BCNfeziv.js";
|
|
8
8
|
var M = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/, k = /(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g, A = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/, _ = /(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g, x = g.create({
|
|
9
9
|
name: "italic",
|
|
10
10
|
addOptions() {
|