reactjs-tiptap-editor 0.3.15 → 0.3.16

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 (228) hide show
  1. package/lib/{ActionMenuButton-cLs916Iz.js → ActionMenuButton-Blixh0sY.js} +1 -1
  2. package/lib/{ActionMenuButton-BiJA06nt.cjs → ActionMenuButton-Dqp7UQ7o.cjs} +1 -1
  3. package/lib/Attachment.cjs +1 -1
  4. package/lib/Attachment.d.cts +25 -25
  5. package/lib/Attachment.d.ts +25 -25
  6. package/lib/Attachment.js +2 -2
  7. package/lib/Blockquote.cjs +1 -1
  8. package/lib/Blockquote.d.cts +25 -25
  9. package/lib/Blockquote.d.ts +25 -25
  10. package/lib/Blockquote.js +1 -1
  11. package/lib/Bold.cjs +1 -1
  12. package/lib/Bold.d.cts +25 -25
  13. package/lib/Bold.d.ts +25 -25
  14. package/lib/Bold.js +1 -1
  15. package/lib/BulletList.cjs +1 -1
  16. package/lib/BulletList.d.cts +25 -25
  17. package/lib/BulletList.d.ts +25 -25
  18. package/lib/BulletList.js +1 -1
  19. package/lib/Clear.cjs +1 -1
  20. package/lib/Clear.d.cts +25 -25
  21. package/lib/Clear.d.ts +25 -25
  22. package/lib/Clear.js +1 -1
  23. package/lib/Code.cjs +1 -1
  24. package/lib/Code.d.cts +25 -25
  25. package/lib/Code.d.ts +25 -25
  26. package/lib/Code.js +1 -1
  27. package/lib/CodeBlock.cjs +26 -26
  28. package/lib/CodeBlock.d.cts +25 -25
  29. package/lib/CodeBlock.d.ts +25 -25
  30. package/lib/CodeBlock.js +660 -643
  31. package/lib/CodeView.cjs +1 -1
  32. package/lib/CodeView.d.cts +25 -25
  33. package/lib/CodeView.d.ts +25 -25
  34. package/lib/CodeView.js +1 -1
  35. package/lib/Color.cjs +1 -1
  36. package/lib/Color.d.cts +25 -25
  37. package/lib/Color.d.ts +25 -25
  38. package/lib/Color.js +1 -1
  39. package/lib/Document.d.cts +25 -25
  40. package/lib/Document.d.ts +25 -25
  41. package/lib/{Drawer-Ctp3RrUF.cjs → Drawer-DRmsdhKK.cjs} +1 -1
  42. package/lib/{Drawer-mxoHuP24.js → Drawer-XpuScyFL.js} +2 -2
  43. package/lib/Drawer.cjs +1 -1
  44. package/lib/Drawer.d.cts +25 -25
  45. package/lib/Drawer.d.ts +25 -25
  46. package/lib/Drawer.js +2 -2
  47. package/lib/Emoji.cjs +1 -1
  48. package/lib/Emoji.d.cts +25 -25
  49. package/lib/Emoji.d.ts +25 -25
  50. package/lib/Emoji.js +2 -2
  51. package/lib/{Excalidraw-BIN8ca6O.js → Excalidraw-CK40GI6U.js} +2 -2
  52. package/lib/{Excalidraw-D2cIInsp.cjs → Excalidraw-CPiaxnoj.cjs} +1 -1
  53. package/lib/Excalidraw.cjs +1 -1
  54. package/lib/Excalidraw.d.cts +25 -25
  55. package/lib/Excalidraw.d.ts +25 -25
  56. package/lib/Excalidraw.js +1 -1
  57. package/lib/ExportPdf.cjs +1 -1
  58. package/lib/ExportPdf.d.cts +25 -25
  59. package/lib/ExportPdf.d.ts +25 -25
  60. package/lib/ExportPdf.js +1 -1
  61. package/lib/ExportWord.cjs +1 -1
  62. package/lib/ExportWord.d.cts +25 -25
  63. package/lib/ExportWord.d.ts +25 -25
  64. package/lib/ExportWord.js +1 -1
  65. package/lib/FontFamily.cjs +1 -1
  66. package/lib/FontFamily.d.cts +25 -25
  67. package/lib/FontFamily.d.ts +25 -25
  68. package/lib/FontFamily.js +3 -3
  69. package/lib/FontSize.cjs +1 -1
  70. package/lib/FontSize.d.cts +25 -25
  71. package/lib/FontSize.d.ts +25 -25
  72. package/lib/FontSize.js +3 -3
  73. package/lib/FormatPainter.cjs +1 -1
  74. package/lib/FormatPainter.d.cts +25 -25
  75. package/lib/FormatPainter.d.ts +25 -25
  76. package/lib/FormatPainter.js +1 -1
  77. package/lib/Heading.cjs +1 -1
  78. package/lib/Heading.d.cts +25 -25
  79. package/lib/Heading.d.ts +25 -25
  80. package/lib/Heading.js +2 -2
  81. package/lib/Highlight.cjs +1 -1
  82. package/lib/Highlight.d.cts +25 -25
  83. package/lib/Highlight.d.ts +25 -25
  84. package/lib/Highlight.js +1 -1
  85. package/lib/History.cjs +1 -1
  86. package/lib/History.d.cts +25 -25
  87. package/lib/History.d.ts +25 -25
  88. package/lib/History.js +1 -1
  89. package/lib/HorizontalRule.cjs +1 -1
  90. package/lib/HorizontalRule.d.cts +25 -25
  91. package/lib/HorizontalRule.d.ts +25 -25
  92. package/lib/HorizontalRule.js +1 -1
  93. package/lib/Iframe.cjs +1 -1
  94. package/lib/Iframe.d.cts +25 -25
  95. package/lib/Iframe.d.ts +25 -25
  96. package/lib/Iframe.js +1 -1
  97. package/lib/Image.cjs +1 -1
  98. package/lib/Image.d.cts +32 -25
  99. package/lib/Image.d.ts +32 -25
  100. package/lib/Image.js +1 -1
  101. package/lib/ImageGif.cjs +1 -1
  102. package/lib/ImageGif.d.cts +25 -25
  103. package/lib/ImageGif.d.ts +25 -25
  104. package/lib/ImageGif.js +1 -1
  105. package/lib/ImportWord.cjs +1 -1
  106. package/lib/ImportWord.d.cts +25 -25
  107. package/lib/ImportWord.d.ts +25 -25
  108. package/lib/ImportWord.js +2 -2
  109. package/lib/Indent.cjs +1 -1
  110. package/lib/Indent.d.cts +25 -25
  111. package/lib/Indent.d.ts +25 -25
  112. package/lib/Indent.js +1 -1
  113. package/lib/Italic.cjs +1 -1
  114. package/lib/Italic.d.cts +25 -25
  115. package/lib/Italic.d.ts +25 -25
  116. package/lib/Italic.js +1 -1
  117. package/lib/Katex.cjs +1 -1
  118. package/lib/Katex.d.cts +25 -25
  119. package/lib/Katex.d.ts +25 -25
  120. package/lib/Katex.js +3 -3
  121. package/lib/LineHeight.cjs +1 -1
  122. package/lib/LineHeight.d.cts +25 -25
  123. package/lib/LineHeight.d.ts +25 -25
  124. package/lib/LineHeight.js +2 -2
  125. package/lib/Link.cjs +1 -1
  126. package/lib/Link.d.cts +25 -25
  127. package/lib/Link.d.ts +25 -25
  128. package/lib/Link.js +1 -1
  129. package/lib/ListItem.d.cts +25 -25
  130. package/lib/ListItem.d.ts +25 -25
  131. package/lib/Mention.d.cts +25 -25
  132. package/lib/Mention.d.ts +25 -25
  133. package/lib/Mermaid.cjs +1 -1
  134. package/lib/Mermaid.d.cts +25 -25
  135. package/lib/Mermaid.d.ts +25 -25
  136. package/lib/Mermaid.js +3 -3
  137. package/lib/MoreMark.cjs +1 -1
  138. package/lib/MoreMark.d.cts +25 -25
  139. package/lib/MoreMark.d.ts +25 -25
  140. package/lib/MoreMark.js +1 -1
  141. package/lib/MultiColumn.cjs +1 -1
  142. package/lib/MultiColumn.d.cts +25 -25
  143. package/lib/MultiColumn.d.ts +25 -25
  144. package/lib/MultiColumn.js +1 -1
  145. package/lib/OrderedList.cjs +1 -1
  146. package/lib/OrderedList.d.cts +25 -25
  147. package/lib/OrderedList.d.ts +25 -25
  148. package/lib/OrderedList.js +1 -1
  149. package/lib/{RichTextEditor-1N7Gl9vo.js → RichTextEditor-BTv7R2Z0.js} +3065 -2949
  150. package/lib/RichTextEditor-Bca-oI9I.cjs +141 -0
  151. package/lib/SearchAndReplace.cjs +1 -1
  152. package/lib/SearchAndReplace.d.cts +25 -25
  153. package/lib/SearchAndReplace.d.ts +25 -25
  154. package/lib/SearchAndReplace.js +2 -2
  155. package/lib/Selection.d.cts +25 -25
  156. package/lib/Selection.d.ts +25 -25
  157. package/lib/SlashCommand.cjs +1 -1
  158. package/lib/SlashCommand.d.cts +25 -25
  159. package/lib/SlashCommand.d.ts +25 -25
  160. package/lib/SlashCommand.js +2 -2
  161. package/lib/Strike.cjs +1 -1
  162. package/lib/Strike.d.cts +25 -25
  163. package/lib/Strike.d.ts +25 -25
  164. package/lib/Strike.js +1 -1
  165. package/lib/SubAndSuperScript.cjs +1 -1
  166. package/lib/SubAndSuperScript.d.cts +25 -25
  167. package/lib/SubAndSuperScript.d.ts +25 -25
  168. package/lib/SubAndSuperScript.js +1 -1
  169. package/lib/Table.cjs +1 -1
  170. package/lib/Table.d.cts +25 -25
  171. package/lib/Table.d.ts +25 -25
  172. package/lib/Table.js +2 -2
  173. package/lib/TableOfContent.cjs +1 -1
  174. package/lib/TableOfContent.d.cts +25 -25
  175. package/lib/TableOfContent.d.ts +25 -25
  176. package/lib/TableOfContent.js +2 -2
  177. package/lib/TaskList.cjs +1 -1
  178. package/lib/TaskList.d.cts +25 -25
  179. package/lib/TaskList.d.ts +25 -25
  180. package/lib/TaskList.js +1 -1
  181. package/lib/TextAlign.cjs +1 -1
  182. package/lib/TextAlign.d.cts +25 -25
  183. package/lib/TextAlign.d.ts +25 -25
  184. package/lib/TextAlign.js +1 -1
  185. package/lib/TextBubble.cjs +1 -1
  186. package/lib/TextBubble.d.cts +25 -25
  187. package/lib/TextBubble.d.ts +25 -25
  188. package/lib/TextBubble.js +2 -2
  189. package/lib/TextDirection.cjs +1 -1
  190. package/lib/TextDirection.d.cts +25 -25
  191. package/lib/TextDirection.d.ts +25 -25
  192. package/lib/TextDirection.js +1 -1
  193. package/lib/TextUnderline.cjs +1 -1
  194. package/lib/TextUnderline.d.cts +25 -25
  195. package/lib/TextUnderline.d.ts +25 -25
  196. package/lib/TextUnderline.js +1 -1
  197. package/lib/TrailingNode.d.cts +25 -25
  198. package/lib/TrailingNode.d.ts +25 -25
  199. package/lib/{Twitter-ClB1gNOp.js → Twitter-DZTS9Uc4.js} +2 -2
  200. package/lib/{Twitter-CvLMjYUZ.cjs → Twitter-tp6dT1fs.cjs} +1 -1
  201. package/lib/Twitter.cjs +1 -1
  202. package/lib/Twitter.d.cts +25 -25
  203. package/lib/Twitter.d.ts +25 -25
  204. package/lib/Twitter.js +1 -1
  205. package/lib/Video.cjs +1 -1
  206. package/lib/Video.d.cts +25 -25
  207. package/lib/Video.d.ts +25 -25
  208. package/lib/Video.js +2 -2
  209. package/lib/bubble-extra.cjs +1 -1
  210. package/lib/bubble-extra.d.cts +25 -25
  211. package/lib/bubble-extra.d.ts +25 -25
  212. package/lib/bubble-extra.js +6 -6
  213. package/lib/index-jEB3jXoa.cjs +1 -0
  214. package/lib/{index-D-DR0FPY.js → index-zcKfSGd5.js} +317 -295
  215. package/lib/index.cjs +1 -1
  216. package/lib/index.d.cts +25 -25
  217. package/lib/index.d.ts +25 -25
  218. package/lib/index.js +3 -3
  219. package/lib/locale-bundle.cjs +1 -1
  220. package/lib/locale-bundle.d.cts +46 -26
  221. package/lib/locale-bundle.d.ts +46 -26
  222. package/lib/locale-bundle.js +1 -1
  223. package/lib/style.css +1 -1
  224. package/lib/{textarea-rOG4VKVx.js → textarea-DKyqOqL2.js} +1 -1
  225. package/lib/{textarea-BIoxUMDS.cjs → textarea-Yr93rFW5.cjs} +1 -1
  226. package/package.json +1 -1
  227. package/lib/RichTextEditor-B_I3q8FW.cjs +0 -141
  228. package/lib/index-Dz3YxLE7.cjs +0 -1
package/lib/CodeView.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CSvnpArE.cjs"),c=require("./RichTextEditor-B_I3q8FW.cjs"),s=i.Extension.create({name:"codeView",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button({editor:t,t:o}){return{component:c.ActionButton,componentProps:{action:()=>{t.commands.toggleCodeView()},isActive:()=>t.storage.codeView.isActive||!1,disabled:!1,icon:"CodeView",tooltip:o("editor.codeView.tooltip")||"View HTML Code",customClass:"tiptap-code-view-button"}}}}},addStorage(){return{isActive:!1,originalContent:""}},addCommands(){return{toggleCodeView:()=>({editor:e})=>{const t=e.storage.codeView.isActive;if(t)e.commands.setContent(e.getText());else{const o=e.getHTML();e.storage.codeView.originalContent=o;const n=o.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;");e.commands.setContent(`<div class="tiptap-code-view-wrapper">${n}</div>`)}return e.storage.codeView.isActive=!t,!0}}}});exports.CodeView=s;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CSvnpArE.cjs"),c=require("./RichTextEditor-Bca-oI9I.cjs"),s=i.Extension.create({name:"codeView",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button({editor:t,t:o}){return{component:c.ActionButton,componentProps:{action:()=>{t.commands.toggleCodeView()},isActive:()=>t.storage.codeView.isActive||!1,disabled:!1,icon:"CodeView",tooltip:o("editor.codeView.tooltip")||"View HTML Code",customClass:"tiptap-code-view-button"}}}}},addStorage(){return{isActive:!1,originalContent:""}},addCommands(){return{toggleCodeView:()=>({editor:e})=>{const t=e.storage.codeView.isActive;if(t)e.commands.setContent(e.getText());else{const o=e.getHTML();e.storage.codeView.originalContent=o;const n=o.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;");e.commands.setContent(`<div class="tiptap-code-view-wrapper">${n}</div>`)}return e.storage.codeView.isActive=!t,!0}}}});exports.CodeView=s;
@@ -109,11 +109,9 @@ declare module '@tiptap/core' {
109
109
 
110
110
  declare module '@tiptap/core' {
111
111
  interface Commands<ReturnType> {
112
- emoji: {
113
- setEmoji: (emoji: {
114
- name: string;
115
- emoji: string;
116
- }) => ReturnType;
112
+ drawer: {
113
+ setDrawer: (options: any, replace?: any) => ReturnType;
114
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
117
115
  };
118
116
  }
119
117
  }
@@ -121,9 +119,8 @@ declare module '@tiptap/core' {
121
119
 
122
120
  declare module '@tiptap/core' {
123
121
  interface Commands<ReturnType> {
124
- drawer: {
125
- setDrawer: (options: any, replace?: any) => ReturnType;
126
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
122
+ excalidraw: {
123
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
127
124
  };
128
125
  }
129
126
  }
@@ -131,8 +128,11 @@ declare module '@tiptap/core' {
131
128
 
132
129
  declare module '@tiptap/core' {
133
130
  interface Commands<ReturnType> {
134
- excalidraw: {
135
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
131
+ emoji: {
132
+ setEmoji: (emoji: {
133
+ name: string;
134
+ emoji: string;
135
+ }) => ReturnType;
136
136
  };
137
137
  }
138
138
  }
@@ -174,21 +174,6 @@ declare module '@tiptap/core' {
174
174
  }
175
175
 
176
176
 
177
- declare module '@tiptap/core' {
178
- interface Commands<ReturnType> {
179
- iframe: {
180
- /**
181
- * Add an iframe
182
- */
183
- setIframe: (options: {
184
- src: string;
185
- service: string;
186
- }) => ReturnType;
187
- };
188
- }
189
- }
190
-
191
-
192
177
  declare module '@tiptap/core' {
193
178
  interface Commands<ReturnType> {
194
179
  imageUpload: {
@@ -209,6 +194,21 @@ declare module '@tiptap/core' {
209
194
  }
210
195
 
211
196
 
197
+ declare module '@tiptap/core' {
198
+ interface Commands<ReturnType> {
199
+ iframe: {
200
+ /**
201
+ * Add an iframe
202
+ */
203
+ setIframe: (options: {
204
+ src: string;
205
+ service: string;
206
+ }) => ReturnType;
207
+ };
208
+ }
209
+ }
210
+
211
+
212
212
  declare module '@tiptap/core' {
213
213
  interface Commands<ReturnType> {
214
214
  imageGifUpload: {
package/lib/CodeView.d.ts CHANGED
@@ -109,11 +109,9 @@ declare module '@tiptap/core' {
109
109
 
110
110
  declare module '@tiptap/core' {
111
111
  interface Commands<ReturnType> {
112
- emoji: {
113
- setEmoji: (emoji: {
114
- name: string;
115
- emoji: string;
116
- }) => ReturnType;
112
+ drawer: {
113
+ setDrawer: (options: any, replace?: any) => ReturnType;
114
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
117
115
  };
118
116
  }
119
117
  }
@@ -121,9 +119,8 @@ declare module '@tiptap/core' {
121
119
 
122
120
  declare module '@tiptap/core' {
123
121
  interface Commands<ReturnType> {
124
- drawer: {
125
- setDrawer: (options: any, replace?: any) => ReturnType;
126
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
122
+ excalidraw: {
123
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
127
124
  };
128
125
  }
129
126
  }
@@ -131,8 +128,11 @@ declare module '@tiptap/core' {
131
128
 
132
129
  declare module '@tiptap/core' {
133
130
  interface Commands<ReturnType> {
134
- excalidraw: {
135
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
131
+ emoji: {
132
+ setEmoji: (emoji: {
133
+ name: string;
134
+ emoji: string;
135
+ }) => ReturnType;
136
136
  };
137
137
  }
138
138
  }
@@ -174,21 +174,6 @@ declare module '@tiptap/core' {
174
174
  }
175
175
 
176
176
 
177
- declare module '@tiptap/core' {
178
- interface Commands<ReturnType> {
179
- iframe: {
180
- /**
181
- * Add an iframe
182
- */
183
- setIframe: (options: {
184
- src: string;
185
- service: string;
186
- }) => ReturnType;
187
- };
188
- }
189
- }
190
-
191
-
192
177
  declare module '@tiptap/core' {
193
178
  interface Commands<ReturnType> {
194
179
  imageUpload: {
@@ -209,6 +194,21 @@ declare module '@tiptap/core' {
209
194
  }
210
195
 
211
196
 
197
+ declare module '@tiptap/core' {
198
+ interface Commands<ReturnType> {
199
+ iframe: {
200
+ /**
201
+ * Add an iframe
202
+ */
203
+ setIframe: (options: {
204
+ src: string;
205
+ service: string;
206
+ }) => ReturnType;
207
+ };
208
+ }
209
+ }
210
+
211
+
212
212
  declare module '@tiptap/core' {
213
213
  interface Commands<ReturnType> {
214
214
  imageGifUpload: {
package/lib/CodeView.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { E as i } from "./index-BWx1Mchx.js";
2
- import { A as s } from "./RichTextEditor-1N7Gl9vo.js";
2
+ import { A as s } from "./RichTextEditor-BTv7R2Z0.js";
3
3
  const r = /* @__PURE__ */ i.create({
4
4
  name: "codeView",
5
5
  addOptions() {
package/lib/Color.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./index-CrxasX7b.cjs");const u=require("./index-CSvnpArE.cjs"),l=require("react/jsx-runtime"),d=require("react"),i=require("./RichTextEditor-B_I3q8FW.cjs"),x=u.Extension.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:e=>{var t;return(t=e.style.color)===null||t===void 0?void 0:t.replace(/['"]+/g,"")},renderHTML:e=>e.color?{style:`color: ${e.color}`}:{}}}}]},addCommands(){return{setColor:e=>({chain:t})=>t().setMark("textStyle",{color:e}).run(),unsetColor:()=>({chain:e})=>e().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}});function C({fill:e}){return l.jsx("svg",{width:"18px",height:"18px",viewBox:"0 0 240 240",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:l.jsx("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",children:l.jsx("g",{transform:"translate(0.000000, 0.500000)",children:l.jsxs("g",{transform:"translate(39.000000, 17.353553)",children:[l.jsx("path",{d:"M11,201.146447 L167,201.146447 C173.075132,201.146447 178,206.071314 178,212.146447 C178,218.221579 173.075132,223.146447 167,223.146447 L11,223.146447 C4.92486775,223.146447 7.43989126e-16,218.221579 0,212.146447 C-7.43989126e-16,206.071314 4.92486775,201.146447 11,201.146447 Z",id:"矩形",fill:e||"#DF2A3F",fillRule:"evenodd"}),l.jsx("path",{d:"M72.3425855,16.8295583 C75.799482,7.50883712 86.1577877,2.75526801 95.4785089,6.21216449 C100.284516,7.99463061 104.096358,11.7387855 105.968745,16.4968188 L106.112518,16.8745422 L159.385152,161.694068 C161.291848,166.877345 158.635655,172.624903 153.452378,174.531599 C148.358469,176.405421 142.719567,173.872338 140.716873,168.864661 L140.614848,168.598825 L89.211,28.86 L37.3759214,168.623816 C35.4885354,173.712715 29.8981043,176.351047 24.7909589,174.617647 L24.5226307,174.522368 C19.4337312,172.634982 16.7953993,167.044551 18.5287999,161.937406 L18.6240786,161.669077 L72.3425855,16.8295583 Z",id:"路径-21",fill:"currentColor",fillRule:"nonzero"}),l.jsx("path",{d:"M121,103.146447 C126.522847,103.146447 131,107.623599 131,113.146447 C131,118.575687 126.673329,122.994378 121.279905,123.142605 L121,123.146447 L55,123.146447 C49.4771525,123.146447 45,118.669294 45,113.146447 C45,107.717207 49.3266708,103.298515 54.7200952,103.150288 L55,103.146447 L121,103.146447 Z",id:"路径-22",fill:"currentColor",fillRule:"nonzero"})]})})})})}function h(e){const[t,c]=d.useState(void 0);function r(o){var a;(a=e.action)==null||a.call(e,o)}function n(){var o;(o=e.action)==null||o.call(e,t)}const s=d.useCallback(i.debounce(o=>{c(o)},350),[]);return l.jsxs("div",{className:"richtext-flex richtext-items-center richtext-h-[32px]",children:[l.jsx(i.ActionButton,{tooltip:e==null?void 0:e.tooltip,disabled:e==null?void 0:e.disabled,action:n,children:l.jsx("span",{className:"richtext-flex richtext-items-center richtext-justify-center richtext-text-sm",children:l.jsx(C,{fill:t||e.initialDisplayedColor})})}),l.jsx(i.ColorPicker,{selectedColor:t,setSelectedColor:s,onChange:r,disabled:e==null?void 0:e.disabled,colors:e==null?void 0:e.colors,defaultColor:e==null?void 0:e.defaultColor,children:l.jsx(i.Button,{variant:"ghost",size:"icon",className:"r!ichtext-h-[32px] !richtext-w-3",disabled:e==null?void 0:e.disabled,children:l.jsx(i.IconComponent,{className:"!richtext-w-3 !richtext-h-3 richtext-text-zinc-500",name:"MenuDown"})})})]})}const f=x.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button({editor:t,t:c,extension:r}){return{component:h,componentProps:{colors:r.options.colors,defaultColor:r.options.defaultColor,action:n=>{n===void 0&&t.chain().focus().unsetColor().run(),typeof n=="string"&&t.chain().focus().setColor(n).run()},isActive:()=>{const{color:n}=t.getAttributes("textStyle");return n&&t.isActive({color:n})||!1},editor:t,disabled:!1,tooltip:c("editor.color.tooltip")}}}}}});exports.Color=f;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("./index-CrxasX7b.cjs");const u=require("./index-CSvnpArE.cjs"),l=require("react/jsx-runtime"),d=require("react"),i=require("./RichTextEditor-Bca-oI9I.cjs"),x=u.Extension.create({name:"color",addOptions(){return{types:["textStyle"]}},addGlobalAttributes(){return[{types:this.options.types,attributes:{color:{default:null,parseHTML:e=>{var t;return(t=e.style.color)===null||t===void 0?void 0:t.replace(/['"]+/g,"")},renderHTML:e=>e.color?{style:`color: ${e.color}`}:{}}}}]},addCommands(){return{setColor:e=>({chain:t})=>t().setMark("textStyle",{color:e}).run(),unsetColor:()=>({chain:e})=>e().setMark("textStyle",{color:null}).removeEmptyTextStyle().run()}}});function C({fill:e}){return l.jsx("svg",{width:"18px",height:"18px",viewBox:"0 0 240 240",version:"1.1",xmlns:"http://www.w3.org/2000/svg",children:l.jsx("g",{stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd",children:l.jsx("g",{transform:"translate(0.000000, 0.500000)",children:l.jsxs("g",{transform:"translate(39.000000, 17.353553)",children:[l.jsx("path",{d:"M11,201.146447 L167,201.146447 C173.075132,201.146447 178,206.071314 178,212.146447 C178,218.221579 173.075132,223.146447 167,223.146447 L11,223.146447 C4.92486775,223.146447 7.43989126e-16,218.221579 0,212.146447 C-7.43989126e-16,206.071314 4.92486775,201.146447 11,201.146447 Z",id:"矩形",fill:e||"#DF2A3F",fillRule:"evenodd"}),l.jsx("path",{d:"M72.3425855,16.8295583 C75.799482,7.50883712 86.1577877,2.75526801 95.4785089,6.21216449 C100.284516,7.99463061 104.096358,11.7387855 105.968745,16.4968188 L106.112518,16.8745422 L159.385152,161.694068 C161.291848,166.877345 158.635655,172.624903 153.452378,174.531599 C148.358469,176.405421 142.719567,173.872338 140.716873,168.864661 L140.614848,168.598825 L89.211,28.86 L37.3759214,168.623816 C35.4885354,173.712715 29.8981043,176.351047 24.7909589,174.617647 L24.5226307,174.522368 C19.4337312,172.634982 16.7953993,167.044551 18.5287999,161.937406 L18.6240786,161.669077 L72.3425855,16.8295583 Z",id:"路径-21",fill:"currentColor",fillRule:"nonzero"}),l.jsx("path",{d:"M121,103.146447 C126.522847,103.146447 131,107.623599 131,113.146447 C131,118.575687 126.673329,122.994378 121.279905,123.142605 L121,123.146447 L55,123.146447 C49.4771525,123.146447 45,118.669294 45,113.146447 C45,107.717207 49.3266708,103.298515 54.7200952,103.150288 L55,103.146447 L121,103.146447 Z",id:"路径-22",fill:"currentColor",fillRule:"nonzero"})]})})})})}function h(e){const[t,c]=d.useState(void 0);function r(o){var a;(a=e.action)==null||a.call(e,o)}function n(){var o;(o=e.action)==null||o.call(e,t)}const s=d.useCallback(i.debounce(o=>{c(o)},350),[]);return l.jsxs("div",{className:"richtext-flex richtext-items-center richtext-h-[32px]",children:[l.jsx(i.ActionButton,{tooltip:e==null?void 0:e.tooltip,disabled:e==null?void 0:e.disabled,action:n,children:l.jsx("span",{className:"richtext-flex richtext-items-center richtext-justify-center richtext-text-sm",children:l.jsx(C,{fill:t||e.initialDisplayedColor})})}),l.jsx(i.ColorPicker,{selectedColor:t,setSelectedColor:s,onChange:r,disabled:e==null?void 0:e.disabled,colors:e==null?void 0:e.colors,defaultColor:e==null?void 0:e.defaultColor,children:l.jsx(i.Button,{variant:"ghost",size:"icon",className:"r!ichtext-h-[32px] !richtext-w-3",disabled:e==null?void 0:e.disabled,children:l.jsx(i.IconComponent,{className:"!richtext-w-3 !richtext-h-3 richtext-text-zinc-500",name:"MenuDown"})})})]})}const f=x.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button({editor:t,t:c,extension:r}){return{component:h,componentProps:{colors:r.options.colors,defaultColor:r.options.defaultColor,action:n=>{n===void 0&&t.chain().focus().unsetColor().run(),typeof n=="string"&&t.chain().focus().setColor(n).run()},isActive:()=>{const{color:n}=t.getAttributes("textStyle");return n&&t.isActive({color:n})||!1},editor:t,disabled:!1,tooltip:c("editor.color.tooltip")}}}}}});exports.Color=f;
package/lib/Color.d.cts CHANGED
@@ -117,11 +117,9 @@ declare module '@tiptap/core' {
117
117
 
118
118
  declare module '@tiptap/core' {
119
119
  interface Commands<ReturnType> {
120
- emoji: {
121
- setEmoji: (emoji: {
122
- name: string;
123
- emoji: string;
124
- }) => ReturnType;
120
+ drawer: {
121
+ setDrawer: (options: any, replace?: any) => ReturnType;
122
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
125
123
  };
126
124
  }
127
125
  }
@@ -129,9 +127,8 @@ declare module '@tiptap/core' {
129
127
 
130
128
  declare module '@tiptap/core' {
131
129
  interface Commands<ReturnType> {
132
- drawer: {
133
- setDrawer: (options: any, replace?: any) => ReturnType;
134
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
130
+ excalidraw: {
131
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
135
132
  };
136
133
  }
137
134
  }
@@ -139,8 +136,11 @@ declare module '@tiptap/core' {
139
136
 
140
137
  declare module '@tiptap/core' {
141
138
  interface Commands<ReturnType> {
142
- excalidraw: {
143
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
139
+ emoji: {
140
+ setEmoji: (emoji: {
141
+ name: string;
142
+ emoji: string;
143
+ }) => ReturnType;
144
144
  };
145
145
  }
146
146
  }
@@ -182,21 +182,6 @@ declare module '@tiptap/core' {
182
182
  }
183
183
 
184
184
 
185
- declare module '@tiptap/core' {
186
- interface Commands<ReturnType> {
187
- iframe: {
188
- /**
189
- * Add an iframe
190
- */
191
- setIframe: (options: {
192
- src: string;
193
- service: string;
194
- }) => ReturnType;
195
- };
196
- }
197
- }
198
-
199
-
200
185
  declare module '@tiptap/core' {
201
186
  interface Commands<ReturnType> {
202
187
  imageUpload: {
@@ -217,6 +202,21 @@ declare module '@tiptap/core' {
217
202
  }
218
203
 
219
204
 
205
+ declare module '@tiptap/core' {
206
+ interface Commands<ReturnType> {
207
+ iframe: {
208
+ /**
209
+ * Add an iframe
210
+ */
211
+ setIframe: (options: {
212
+ src: string;
213
+ service: string;
214
+ }) => ReturnType;
215
+ };
216
+ }
217
+ }
218
+
219
+
220
220
  declare module '@tiptap/core' {
221
221
  interface Commands<ReturnType> {
222
222
  imageGifUpload: {
package/lib/Color.d.ts CHANGED
@@ -117,11 +117,9 @@ declare module '@tiptap/core' {
117
117
 
118
118
  declare module '@tiptap/core' {
119
119
  interface Commands<ReturnType> {
120
- emoji: {
121
- setEmoji: (emoji: {
122
- name: string;
123
- emoji: string;
124
- }) => ReturnType;
120
+ drawer: {
121
+ setDrawer: (options: any, replace?: any) => ReturnType;
122
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
125
123
  };
126
124
  }
127
125
  }
@@ -129,9 +127,8 @@ declare module '@tiptap/core' {
129
127
 
130
128
  declare module '@tiptap/core' {
131
129
  interface Commands<ReturnType> {
132
- drawer: {
133
- setDrawer: (options: any, replace?: any) => ReturnType;
134
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
130
+ excalidraw: {
131
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
135
132
  };
136
133
  }
137
134
  }
@@ -139,8 +136,11 @@ declare module '@tiptap/core' {
139
136
 
140
137
  declare module '@tiptap/core' {
141
138
  interface Commands<ReturnType> {
142
- excalidraw: {
143
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
139
+ emoji: {
140
+ setEmoji: (emoji: {
141
+ name: string;
142
+ emoji: string;
143
+ }) => ReturnType;
144
144
  };
145
145
  }
146
146
  }
@@ -182,21 +182,6 @@ declare module '@tiptap/core' {
182
182
  }
183
183
 
184
184
 
185
- declare module '@tiptap/core' {
186
- interface Commands<ReturnType> {
187
- iframe: {
188
- /**
189
- * Add an iframe
190
- */
191
- setIframe: (options: {
192
- src: string;
193
- service: string;
194
- }) => ReturnType;
195
- };
196
- }
197
- }
198
-
199
-
200
185
  declare module '@tiptap/core' {
201
186
  interface Commands<ReturnType> {
202
187
  imageUpload: {
@@ -217,6 +202,21 @@ declare module '@tiptap/core' {
217
202
  }
218
203
 
219
204
 
205
+ declare module '@tiptap/core' {
206
+ interface Commands<ReturnType> {
207
+ iframe: {
208
+ /**
209
+ * Add an iframe
210
+ */
211
+ setIframe: (options: {
212
+ src: string;
213
+ service: string;
214
+ }) => ReturnType;
215
+ };
216
+ }
217
+ }
218
+
219
+
220
220
  declare module '@tiptap/core' {
221
221
  interface Commands<ReturnType> {
222
222
  imageGifUpload: {
package/lib/Color.js CHANGED
@@ -2,7 +2,7 @@ import "./index-DIPntess.js";
2
2
  import { E as u } from "./index-BWx1Mchx.js";
3
3
  import { jsxs as a, jsx as l } from "react/jsx-runtime";
4
4
  import { useState as s, useCallback as C } from "react";
5
- import { t as h, A as f, C as x, B as m, k as v } from "./RichTextEditor-1N7Gl9vo.js";
5
+ import { t as h, A as f, C as x, B as m, k as v } from "./RichTextEditor-BTv7R2Z0.js";
6
6
  const L = u.create({
7
7
  name: "color",
8
8
  addOptions() {
@@ -39,11 +39,9 @@ declare module '@tiptap/core' {
39
39
 
40
40
  declare module '@tiptap/core' {
41
41
  interface Commands<ReturnType> {
42
- emoji: {
43
- setEmoji: (emoji: {
44
- name: string;
45
- emoji: string;
46
- }) => ReturnType;
42
+ drawer: {
43
+ setDrawer: (options: any, replace?: any) => ReturnType;
44
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
47
45
  };
48
46
  }
49
47
  }
@@ -51,9 +49,8 @@ declare module '@tiptap/core' {
51
49
 
52
50
  declare module '@tiptap/core' {
53
51
  interface Commands<ReturnType> {
54
- drawer: {
55
- setDrawer: (options: any, replace?: any) => ReturnType;
56
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
52
+ excalidraw: {
53
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
57
54
  };
58
55
  }
59
56
  }
@@ -61,8 +58,11 @@ declare module '@tiptap/core' {
61
58
 
62
59
  declare module '@tiptap/core' {
63
60
  interface Commands<ReturnType> {
64
- excalidraw: {
65
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
61
+ emoji: {
62
+ setEmoji: (emoji: {
63
+ name: string;
64
+ emoji: string;
65
+ }) => ReturnType;
66
66
  };
67
67
  }
68
68
  }
@@ -104,21 +104,6 @@ declare module '@tiptap/core' {
104
104
  }
105
105
 
106
106
 
107
- declare module '@tiptap/core' {
108
- interface Commands<ReturnType> {
109
- iframe: {
110
- /**
111
- * Add an iframe
112
- */
113
- setIframe: (options: {
114
- src: string;
115
- service: string;
116
- }) => ReturnType;
117
- };
118
- }
119
- }
120
-
121
-
122
107
  declare module '@tiptap/core' {
123
108
  interface Commands<ReturnType> {
124
109
  imageUpload: {
@@ -139,6 +124,21 @@ declare module '@tiptap/core' {
139
124
  }
140
125
 
141
126
 
127
+ declare module '@tiptap/core' {
128
+ interface Commands<ReturnType> {
129
+ iframe: {
130
+ /**
131
+ * Add an iframe
132
+ */
133
+ setIframe: (options: {
134
+ src: string;
135
+ service: string;
136
+ }) => ReturnType;
137
+ };
138
+ }
139
+ }
140
+
141
+
142
142
  declare module '@tiptap/core' {
143
143
  interface Commands<ReturnType> {
144
144
  imageGifUpload: {
package/lib/Document.d.ts CHANGED
@@ -39,11 +39,9 @@ declare module '@tiptap/core' {
39
39
 
40
40
  declare module '@tiptap/core' {
41
41
  interface Commands<ReturnType> {
42
- emoji: {
43
- setEmoji: (emoji: {
44
- name: string;
45
- emoji: string;
46
- }) => ReturnType;
42
+ drawer: {
43
+ setDrawer: (options: any, replace?: any) => ReturnType;
44
+ setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
47
45
  };
48
46
  }
49
47
  }
@@ -51,9 +49,8 @@ declare module '@tiptap/core' {
51
49
 
52
50
  declare module '@tiptap/core' {
53
51
  interface Commands<ReturnType> {
54
- drawer: {
55
- setDrawer: (options: any, replace?: any) => ReturnType;
56
- setAlignImageDrawer: (align: 'left' | 'center' | 'right') => ReturnType;
52
+ excalidraw: {
53
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
57
54
  };
58
55
  }
59
56
  }
@@ -61,8 +58,11 @@ declare module '@tiptap/core' {
61
58
 
62
59
  declare module '@tiptap/core' {
63
60
  interface Commands<ReturnType> {
64
- excalidraw: {
65
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
61
+ emoji: {
62
+ setEmoji: (emoji: {
63
+ name: string;
64
+ emoji: string;
65
+ }) => ReturnType;
66
66
  };
67
67
  }
68
68
  }
@@ -104,21 +104,6 @@ declare module '@tiptap/core' {
104
104
  }
105
105
 
106
106
 
107
- declare module '@tiptap/core' {
108
- interface Commands<ReturnType> {
109
- iframe: {
110
- /**
111
- * Add an iframe
112
- */
113
- setIframe: (options: {
114
- src: string;
115
- service: string;
116
- }) => ReturnType;
117
- };
118
- }
119
- }
120
-
121
-
122
107
  declare module '@tiptap/core' {
123
108
  interface Commands<ReturnType> {
124
109
  imageUpload: {
@@ -139,6 +124,21 @@ declare module '@tiptap/core' {
139
124
  }
140
125
 
141
126
 
127
+ declare module '@tiptap/core' {
128
+ interface Commands<ReturnType> {
129
+ iframe: {
130
+ /**
131
+ * Add an iframe
132
+ */
133
+ setIframe: (options: {
134
+ src: string;
135
+ service: string;
136
+ }) => ReturnType;
137
+ };
138
+ }
139
+ }
140
+
141
+
142
142
  declare module '@tiptap/core' {
143
143
  interface Commands<ReturnType> {
144
144
  imageGifUpload: {