reactjs-tiptap-editor 0.3.27 → 0.3.29

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 (221) hide show
  1. package/lib/{ActionMenuButton-fkh63F_R.cjs → ActionMenuButton-5Y8QcYxD.cjs} +1 -1
  2. package/lib/{ActionMenuButton-D3nLtawn.js → ActionMenuButton-Cs9DM_16.js} +1 -1
  3. package/lib/Attachment.cjs +1 -1
  4. package/lib/Attachment.d.cts +6 -4
  5. package/lib/Attachment.d.ts +6 -4
  6. package/lib/Attachment.js +1 -1
  7. package/lib/Blockquote.cjs +1 -1
  8. package/lib/Blockquote.d.cts +6 -4
  9. package/lib/Blockquote.d.ts +6 -4
  10. package/lib/Blockquote.js +10 -10
  11. package/lib/Bold.cjs +1 -1
  12. package/lib/Bold.d.cts +6 -4
  13. package/lib/Bold.d.ts +6 -4
  14. package/lib/Bold.js +10 -10
  15. package/lib/BulletList.cjs +1 -1
  16. package/lib/BulletList.d.cts +6 -4
  17. package/lib/BulletList.d.ts +6 -4
  18. package/lib/BulletList.js +10 -10
  19. package/lib/Clear.cjs +1 -1
  20. package/lib/Clear.d.cts +6 -4
  21. package/lib/Clear.d.ts +6 -4
  22. package/lib/Clear.js +1 -1
  23. package/lib/Code.cjs +1 -1
  24. package/lib/Code.d.cts +6 -4
  25. package/lib/Code.d.ts +6 -4
  26. package/lib/Code.js +21 -21
  27. package/lib/CodeBlock.cjs +1 -1
  28. package/lib/CodeBlock.d.cts +6 -4
  29. package/lib/CodeBlock.d.ts +6 -4
  30. package/lib/CodeBlock.js +1 -1
  31. package/lib/CodeView.cjs +1 -1
  32. package/lib/CodeView.d.cts +6 -4
  33. package/lib/CodeView.d.ts +6 -4
  34. package/lib/CodeView.js +1 -1
  35. package/lib/Color.cjs +1 -1
  36. package/lib/Color.d.cts +6 -4
  37. package/lib/Color.d.ts +6 -4
  38. package/lib/Color.js +1 -1
  39. package/lib/Document.d.cts +4 -4
  40. package/lib/Document.d.ts +4 -4
  41. package/lib/{Drawer-BBVUujX4.js → Drawer-BCmNLh31.js} +1 -1
  42. package/lib/{Drawer-DetzmUvQ.cjs → Drawer-DCAp7eZF.cjs} +1 -1
  43. package/lib/Drawer.cjs +1 -1
  44. package/lib/Drawer.d.cts +6 -4
  45. package/lib/Drawer.d.ts +6 -4
  46. package/lib/Drawer.js +2 -2
  47. package/lib/Emoji.cjs +1 -1
  48. package/lib/Emoji.d.cts +4 -4
  49. package/lib/Emoji.d.ts +4 -4
  50. package/lib/Emoji.js +1 -1
  51. package/lib/{Excalidraw-DVnwdz-w.cjs → Excalidraw-BI50RQL-.cjs} +1 -1
  52. package/lib/{Excalidraw-BVdio4hk.js → Excalidraw-CYPcjYZB.js} +1 -1
  53. package/lib/Excalidraw.cjs +1 -1
  54. package/lib/Excalidraw.d.cts +4 -4
  55. package/lib/Excalidraw.d.ts +4 -4
  56. package/lib/Excalidraw.js +1 -1
  57. package/lib/ExportPdf.cjs +1 -1
  58. package/lib/ExportPdf.d.cts +6 -4
  59. package/lib/ExportPdf.d.ts +6 -4
  60. package/lib/ExportPdf.js +1 -1
  61. package/lib/ExportWord.cjs +1 -1
  62. package/lib/ExportWord.d.cts +6 -4
  63. package/lib/ExportWord.d.ts +6 -4
  64. package/lib/ExportWord.js +1 -1
  65. package/lib/FontFamily.cjs +1 -1
  66. package/lib/FontFamily.d.cts +6 -4
  67. package/lib/FontFamily.d.ts +6 -4
  68. package/lib/FontFamily.js +2 -2
  69. package/lib/FontSize.cjs +1 -1
  70. package/lib/FontSize.d.cts +6 -4
  71. package/lib/FontSize.d.ts +6 -4
  72. package/lib/FontSize.js +2 -2
  73. package/lib/FormatPainter.cjs +1 -1
  74. package/lib/FormatPainter.d.cts +6 -4
  75. package/lib/FormatPainter.d.ts +6 -4
  76. package/lib/FormatPainter.js +1 -1
  77. package/lib/Heading.cjs +1 -1
  78. package/lib/Heading.d.cts +6 -4
  79. package/lib/Heading.d.ts +6 -4
  80. package/lib/Heading.js +71 -68
  81. package/lib/Highlight.cjs +1 -1
  82. package/lib/Highlight.d.cts +10 -4
  83. package/lib/Highlight.d.ts +10 -4
  84. package/lib/Highlight.js +14 -13
  85. package/lib/History.cjs +1 -1
  86. package/lib/History.d.cts +6 -4
  87. package/lib/History.d.ts +6 -4
  88. package/lib/History.js +163 -160
  89. package/lib/HorizontalRule.cjs +1 -1
  90. package/lib/HorizontalRule.d.cts +6 -4
  91. package/lib/HorizontalRule.d.ts +6 -4
  92. package/lib/HorizontalRule.js +14 -14
  93. package/lib/Iframe.cjs +1 -1
  94. package/lib/Iframe.d.cts +4 -4
  95. package/lib/Iframe.d.ts +4 -4
  96. package/lib/Iframe.js +1 -1
  97. package/lib/Image.cjs +1 -1
  98. package/lib/Image.d.cts +6 -4
  99. package/lib/Image.d.ts +6 -4
  100. package/lib/Image.js +1 -1
  101. package/lib/ImageGif.cjs +1 -1
  102. package/lib/ImageGif.d.cts +7 -6
  103. package/lib/ImageGif.d.ts +7 -6
  104. package/lib/ImageGif.js +1 -1
  105. package/lib/ImportWord.cjs +2 -2
  106. package/lib/ImportWord.d.cts +6 -4
  107. package/lib/ImportWord.d.ts +6 -4
  108. package/lib/ImportWord.js +2 -2
  109. package/lib/Indent.cjs +1 -1
  110. package/lib/Indent.d.cts +6 -4
  111. package/lib/Indent.d.ts +6 -4
  112. package/lib/Indent.js +12 -11
  113. package/lib/Italic.cjs +1 -1
  114. package/lib/Italic.d.cts +6 -4
  115. package/lib/Italic.d.ts +6 -4
  116. package/lib/Italic.js +13 -13
  117. package/lib/Katex.cjs +1 -1
  118. package/lib/Katex.d.cts +4 -4
  119. package/lib/Katex.d.ts +4 -4
  120. package/lib/Katex.js +2 -2
  121. package/lib/LineHeight.cjs +1 -1
  122. package/lib/LineHeight.d.cts +6 -4
  123. package/lib/LineHeight.d.ts +6 -4
  124. package/lib/LineHeight.js +1 -1
  125. package/lib/Link.cjs +1 -1
  126. package/lib/Link.d.cts +6 -4
  127. package/lib/Link.d.ts +6 -4
  128. package/lib/Link.js +1 -1
  129. package/lib/ListItem.d.cts +4 -4
  130. package/lib/ListItem.d.ts +4 -4
  131. package/lib/Mention.d.cts +4 -4
  132. package/lib/Mention.d.ts +4 -4
  133. package/lib/Mermaid.cjs +1 -1
  134. package/lib/Mermaid.d.cts +6 -4
  135. package/lib/Mermaid.d.ts +6 -4
  136. package/lib/Mermaid.js +2 -2
  137. package/lib/MoreMark.cjs +1 -1
  138. package/lib/MoreMark.d.cts +6 -4
  139. package/lib/MoreMark.d.ts +6 -4
  140. package/lib/MoreMark.js +46 -45
  141. package/lib/MultiColumn.cjs +1 -1
  142. package/lib/MultiColumn.d.cts +4 -4
  143. package/lib/MultiColumn.d.ts +4 -4
  144. package/lib/MultiColumn.js +1 -1
  145. package/lib/OrderedList.cjs +1 -1
  146. package/lib/OrderedList.d.cts +6 -4
  147. package/lib/OrderedList.d.ts +6 -4
  148. package/lib/OrderedList.js +9 -9
  149. package/lib/{RichTextEditor-DoMu_nCj.cjs → RichTextEditor-DsUcQSbm.cjs} +7 -7
  150. package/lib/{RichTextEditor-BJWhWz4z.js → RichTextEditor-e6q30rbV.js} +1691 -1672
  151. package/lib/SearchAndReplace.cjs +1 -1
  152. package/lib/SearchAndReplace.d.cts +6 -4
  153. package/lib/SearchAndReplace.d.ts +6 -4
  154. package/lib/SearchAndReplace.js +1 -1
  155. package/lib/Selection.d.cts +4 -4
  156. package/lib/Selection.d.ts +4 -4
  157. package/lib/SlashCommand.cjs +1 -1
  158. package/lib/SlashCommand.d.cts +4 -4
  159. package/lib/SlashCommand.d.ts +4 -4
  160. package/lib/SlashCommand.js +1 -1
  161. package/lib/Strike.cjs +1 -1
  162. package/lib/Strike.d.cts +6 -4
  163. package/lib/Strike.d.ts +6 -4
  164. package/lib/Strike.js +13 -13
  165. package/lib/SubAndSuperScript.cjs +1 -1
  166. package/lib/SubAndSuperScript.d.cts +6 -4
  167. package/lib/SubAndSuperScript.d.ts +6 -4
  168. package/lib/SubAndSuperScript.js +1 -1
  169. package/lib/Table.cjs +1 -1
  170. package/lib/Table.d.cts +6 -4
  171. package/lib/Table.d.ts +6 -4
  172. package/lib/Table.js +1 -1
  173. package/lib/TableOfContent.cjs +1 -1
  174. package/lib/TableOfContent.d.cts +4 -4
  175. package/lib/TableOfContent.d.ts +4 -4
  176. package/lib/TableOfContent.js +1 -1
  177. package/lib/TaskList.cjs +1 -1
  178. package/lib/TaskList.d.cts +6 -4
  179. package/lib/TaskList.d.ts +6 -4
  180. package/lib/TaskList.js +15 -15
  181. package/lib/TextAlign.cjs +1 -1
  182. package/lib/TextAlign.d.cts +6 -4
  183. package/lib/TextAlign.d.ts +6 -4
  184. package/lib/TextAlign.js +41 -41
  185. package/lib/TextBubble.cjs +1 -1
  186. package/lib/TextBubble.d.cts +6 -4
  187. package/lib/TextBubble.d.ts +6 -4
  188. package/lib/TextBubble.js +1 -1
  189. package/lib/TextDirection.cjs +1 -1
  190. package/lib/TextDirection.d.cts +4 -4
  191. package/lib/TextDirection.d.ts +4 -4
  192. package/lib/TextDirection.js +1 -1
  193. package/lib/TextUnderline.cjs +1 -1
  194. package/lib/TextUnderline.d.cts +6 -4
  195. package/lib/TextUnderline.d.ts +6 -4
  196. package/lib/TextUnderline.js +8 -8
  197. package/lib/TrailingNode.d.cts +4 -4
  198. package/lib/TrailingNode.d.ts +4 -4
  199. package/lib/{Twitter--OkCPska.cjs → Twitter-D2Osj8qP.cjs} +1 -1
  200. package/lib/{Twitter-CXwmqolk.js → Twitter-Wb7cD3M-.js} +1 -1
  201. package/lib/Twitter.cjs +1 -1
  202. package/lib/Twitter.d.cts +4 -4
  203. package/lib/Twitter.d.ts +4 -4
  204. package/lib/Twitter.js +1 -1
  205. package/lib/Video.cjs +1 -1
  206. package/lib/Video.d.cts +6 -4
  207. package/lib/Video.d.ts +6 -4
  208. package/lib/Video.js +1 -1
  209. package/lib/bubble-extra.cjs +1 -1
  210. package/lib/bubble-extra.d.cts +4 -4
  211. package/lib/bubble-extra.d.ts +4 -4
  212. package/lib/bubble-extra.js +5 -5
  213. package/lib/index.cjs +1 -1
  214. package/lib/index.d.cts +23 -17
  215. package/lib/index.d.ts +23 -17
  216. package/lib/index.js +2 -2
  217. package/lib/locale-bundle.d.cts +4 -4
  218. package/lib/locale-bundle.d.ts +4 -4
  219. package/lib/{textarea-DkVc2MIQ.cjs → textarea-BVbzd9-k.cjs} +1 -1
  220. package/lib/{textarea-HW9QlrCS.js → textarea-Csmx5x-_.js} +1 -1
  221. package/package.json +1 -1
@@ -69,6 +69,8 @@ declare interface GeneralOptions<T> {
69
69
  button: ButtonView<T>;
70
70
  /** Show on Toolbar */
71
71
  toolbar?: boolean;
72
+ /** Shortcut keys override */
73
+ shortcutKeys?: string[] | string[][];
72
74
  }
73
75
 
74
76
  export declare const TextAlign: Extension<TextAlignOptions, any>;
@@ -142,8 +144,8 @@ declare module '@tiptap/core' {
142
144
 
143
145
  declare module '@tiptap/core' {
144
146
  interface Commands<ReturnType> {
145
- excalidraw: {
146
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
147
+ exportPdf: {
148
+ exportToPdf: () => ReturnType;
147
149
  };
148
150
  }
149
151
  }
@@ -151,8 +153,8 @@ declare module '@tiptap/core' {
151
153
 
152
154
  declare module '@tiptap/core' {
153
155
  interface Commands<ReturnType> {
154
- exportPdf: {
155
- exportToPdf: () => ReturnType;
156
+ excalidraw: {
157
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
156
158
  };
157
159
  }
158
160
  }
package/lib/TextAlign.js CHANGED
@@ -1,8 +1,8 @@
1
- import { E as y } from "./index-DI9T3iLd.js";
2
- import { jsxs as g, jsx as l } from "react/jsx-runtime";
3
- import { useMemo as b } from "react";
4
- import { P as v, m as M, A as S, k as A, n as C, T as j, a as K, r as w, b as P, s as z } from "./RichTextEditor-BJWhWz4z.js";
5
- const L = y.create({
1
+ import { E as K } from "./index-DI9T3iLd.js";
2
+ import { jsxs as u, jsx as l } from "react/jsx-runtime";
3
+ import { useMemo as S } from "react";
4
+ import { P as C, m as j, A as w, k as v, n as P, T as z, a as L, r as N, b as $, s as E } from "./RichTextEditor-e6q30rbV.js";
5
+ const J = K.create({
6
6
  name: "textAlign",
7
7
  addOptions() {
8
8
  return {
@@ -44,11 +44,11 @@ const L = y.create({
44
44
  };
45
45
  }
46
46
  });
47
- function N(t) {
47
+ function B(t) {
48
48
  var n;
49
- const e = b(() => {
50
- var c;
51
- const i = (c = t == null ? void 0 : t.items) == null ? void 0 : c.find((a) => a.isActive());
49
+ const e = S(() => {
50
+ var o;
51
+ const i = (o = t == null ? void 0 : t.items) == null ? void 0 : o.find((c) => c.isActive());
52
52
  return i && !i.default ? {
53
53
  ...i,
54
54
  icon: i.icon ? i.icon : t.icon
@@ -58,21 +58,21 @@ function N(t) {
58
58
  isActive: () => !1
59
59
  };
60
60
  }, [t]);
61
- return /* @__PURE__ */ g(v, { modal: !0, children: [
61
+ return /* @__PURE__ */ u(C, { modal: !0, children: [
62
62
  /* @__PURE__ */ l(
63
- M,
63
+ j,
64
64
  {
65
65
  asChild: !0,
66
66
  disabled: t == null ? void 0 : t.disabled,
67
67
  children: /* @__PURE__ */ l(
68
- S,
68
+ w,
69
69
  {
70
70
  customClass: "!richtext-w-12 richtext-h-12",
71
71
  disabled: t == null ? void 0 : t.disabled,
72
72
  icon: t == null ? void 0 : t.icon,
73
73
  tooltip: t == null ? void 0 : t.tooltip,
74
74
  children: /* @__PURE__ */ l(
75
- A,
75
+ v,
76
76
  {
77
77
  className: "richtext-ml-1 richtext-size-3 richtext-text-zinc-500",
78
78
  name: "MenuDown"
@@ -83,28 +83,28 @@ function N(t) {
83
83
  }
84
84
  ),
85
85
  /* @__PURE__ */ l(
86
- C,
86
+ P,
87
87
  {
88
88
  align: "start",
89
89
  className: "richtext-flex richtext-w-full richtext-min-w-4 richtext-flex-row richtext-gap-1 !richtext-p-[4px]",
90
90
  side: "bottom",
91
91
  children: (n = t == null ? void 0 : t.items) == null ? void 0 : n.map((i, r) => {
92
- var c, a;
93
- return /* @__PURE__ */ g(j, { children: [
94
- /* @__PURE__ */ l(K, { asChild: !0, children: /* @__PURE__ */ l(
95
- w,
92
+ var o, c;
93
+ return /* @__PURE__ */ u(z, { children: [
94
+ /* @__PURE__ */ l(L, { asChild: !0, children: /* @__PURE__ */ l(
95
+ N,
96
96
  {
97
97
  className: "richtext-size-7 richtext-p-1",
98
98
  "data-state": e.title === i.title ? "on" : "off",
99
99
  onClick: i == null ? void 0 : i.action,
100
100
  pressed: e.title === i.title,
101
101
  size: "sm",
102
- children: (i == null ? void 0 : i.icon) && /* @__PURE__ */ l(A, { name: i.icon })
102
+ children: (i == null ? void 0 : i.icon) && /* @__PURE__ */ l(v, { name: i.icon })
103
103
  }
104
104
  ) }),
105
- /* @__PURE__ */ g(P, { className: "richtext-flex richtext-flex-col richtext-items-center", children: [
105
+ /* @__PURE__ */ u($, { className: "richtext-flex richtext-flex-col richtext-items-center", children: [
106
106
  /* @__PURE__ */ l("span", { children: i.title }),
107
- !!((c = i.shortcutKeys) != null && c.length) && /* @__PURE__ */ l("span", { children: (a = i.shortcutKeys) == null ? void 0 : a.map((o) => z(o)).join(" ") })
107
+ !!((o = i.shortcutKeys) != null && o.length) && /* @__PURE__ */ l("span", { children: (c = i.shortcutKeys) == null ? void 0 : c.map((a) => E(a)).join(" ") })
108
108
  ] })
109
109
  ] }, `text-align-${r}`);
110
110
  })
@@ -112,7 +112,7 @@ function N(t) {
112
112
  )
113
113
  ] });
114
114
  }
115
- const H = /* @__PURE__ */ L.extend({
115
+ const G = /* @__PURE__ */ J.extend({
116
116
  addOptions() {
117
117
  var t;
118
118
  return {
@@ -123,38 +123,38 @@ const H = /* @__PURE__ */ L.extend({
123
123
  extension: n,
124
124
  t: i
125
125
  }) {
126
- var u;
127
- const r = ((u = n.options) == null ? void 0 : u.alignments) || [], c = {
128
- left: ["mod", "Shift", "L"],
129
- center: ["mod", "Shift", "E"],
130
- right: ["mod", "Shift", "R"],
131
- justify: ["mod", "Shift", "J"]
132
- }, a = {
126
+ var g, x, f, m, A;
127
+ const r = ((g = n.options) == null ? void 0 : g.alignments) || [], o = {
128
+ left: ((x = n.options.shortcutKeys) == null ? void 0 : x[0]) ?? ["mod", "Shift", "L"],
129
+ center: ((f = n.options.shortcutKeys) == null ? void 0 : f[1]) ?? ["mod", "Shift", "E"],
130
+ right: ((m = n.options.shortcutKeys) == null ? void 0 : m[2]) ?? ["mod", "Shift", "R"],
131
+ justify: ((A = n.options.shortcutKeys) == null ? void 0 : A[3]) ?? ["mod", "Shift", "J"]
132
+ }, c = {
133
133
  left: "AlignLeft",
134
134
  center: "AlignCenter",
135
135
  right: "AlignRight",
136
136
  justify: "AlignJustify"
137
- }, o = r.map((s) => {
138
- var x, h, f;
137
+ }, a = r.map((s) => {
138
+ var y, h, T;
139
139
  return {
140
140
  title: i(`editor.textalign.${s}.tooltip`),
141
- icon: a[s],
142
- shortcutKeys: c[s],
141
+ icon: c[s],
142
+ shortcutKeys: o[s],
143
143
  isActive: () => e.isActive({ textAlign: s }) || !1,
144
144
  action: () => {
145
- var d, m;
146
- return (m = (d = e.commands) == null ? void 0 : d.setTextAlign) == null ? void 0 : m.call(d, s);
145
+ var d, b;
146
+ return (b = (d = e.commands) == null ? void 0 : d.setTextAlign) == null ? void 0 : b.call(d, s);
147
147
  },
148
- disabled: !((f = (h = (x = e == null ? void 0 : e.can) == null ? void 0 : x.call(e)) == null ? void 0 : h.setTextAlign) != null && f.call(h, s))
148
+ disabled: !((T = (h = (y = e == null ? void 0 : e.can) == null ? void 0 : y.call(e)) == null ? void 0 : h.setTextAlign) != null && T.call(h, s))
149
149
  };
150
- }), T = o.filter((s) => s.disabled).length === o.length;
150
+ }), M = a.filter((s) => s.disabled).length === a.length;
151
151
  return {
152
- component: N,
152
+ component: B,
153
153
  componentProps: {
154
154
  icon: "AlignJustify",
155
155
  tooltip: i("editor.textalign.tooltip"),
156
- disabled: T,
157
- items: o
156
+ disabled: M,
157
+ items: a
158
158
  }
159
159
  };
160
160
  }
@@ -162,5 +162,5 @@ const H = /* @__PURE__ */ L.extend({
162
162
  }
163
163
  });
164
164
  export {
165
- H as TextAlign
165
+ G as TextAlign
166
166
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const h=require("./index-ByRfqzMr.cjs"),t=require("react/jsx-runtime"),l=require("react"),x=require("lucide-react"),n=require("./RichTextEditor-DoMu_nCj.cjs"),g=require("./index-D_A0TBRA.cjs");function b(e){const{t:i}=g.useLocale(),c=l.useMemo(()=>[{name:"paragraph",label:i("editor.paragraph.tooltip"),iconName:"Heading1",isActive:()=>e.editor.isActive("paragraph")&&!e.editor.isActive("orderedList")&&!e.editor.isActive("bulletList")&&!e.editor.isActive("taskList"),action:()=>e.editor.chain().focus().clearNodes().run()},{name:"heading1",label:i("editor.heading.h1.tooltip"),isActive:()=>e.editor.isActive("heading",{level:1}),iconName:"Heading1",action:()=>e.editor.chain().focus().clearNodes().toggleHeading({level:1}).run()},{name:"heading2",label:i("editor.heading.h2.tooltip"),isActive:()=>e.editor.isActive("heading",{level:2}),iconName:"Heading2",action:()=>e.editor.chain().focus().clearNodes().toggleHeading({level:2}).run()},{name:"heading3",label:i("editor.heading.h3.tooltip"),isActive:()=>e.editor.isActive("heading",{level:3}),iconName:"Heading3",action:()=>e.editor.chain().focus().clearNodes().toggleHeading({level:3}).run()},{name:"bulletList",label:i("editor.bulletlist.tooltip"),isActive:()=>e.editor.isActive("bulletList"),iconName:"List",action:()=>e.editor.chain().focus().clearNodes().toggleBulletList().run()},{name:"numberedList",label:i("editor.orderedlist.tooltip"),isActive:()=>e.editor.isActive("orderedList"),iconName:"ListOrdered",action:()=>e.editor.chain().focus().clearNodes().toggleOrderedList().run()},{name:"taskList",label:i("editor.tasklist.tooltip"),isActive:()=>e.editor.isActive("taskList"),iconName:"ListTodo",action:()=>e.editor.chain().focus().clearNodes().toggleTaskList().run()},{name:"blockquote",label:i("editor.blockquote.tooltip"),isActive:()=>e.editor.isActive("blockquote"),iconName:"TextQuote",action:()=>e.editor.chain().focus().clearNodes().toggleBlockquote().run()}],[e.editor,i]),a=l.useMemo(()=>c.findLast(o=>o.isActive())??{label:"Empty"},[c]);return t.jsxs(n.DropdownMenu,{children:[t.jsx(n.DropdownMenuTrigger,{asChild:!0,children:t.jsxs(n.Button,{className:"richtext-flex richtext-h-[32px] richtext-gap-1 richtext-px-1.5",variant:"ghost",children:[t.jsxs("span",{className:"richtext-whitespace-nowrap richtext-text-sm richtext-font-normal",children:[" ",a==null?void 0:a.label]}),t.jsx(x.ChevronDown,{className:"richtext-size-4"})]})}),t.jsx(n.DropdownMenuContent,{align:"start",className:"richtext-w-full richtext-p-1",hideWhenDetached:!0,sideOffset:5,children:c.map((o,d)=>{var r;const u=n.icons[o.iconName];return t.jsx(n.DropdownMenuCheckboxItem,{checked:((r=o.isActive)==null?void 0:r.call(o))||!1,className:"richtext-cursor-pointer",onClick:()=>o.action(),children:t.jsxs("div",{className:"richtext-flex richtext-items-center richtext-gap-2 richtext-px-2",children:[t.jsx(u,{className:"richtext-h3 richtext-w-3"}),t.jsxs("span",{children:[" ",o.label]})]})},`text-bubble-${d}`)})})]})}const s=h.Extension.create({name:"text-bubble",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),toolbar:!1,button:()=>({component:b,componentProps:{}})}}});exports.TextBubble=s;exports.default=s;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const h=require("./index-ByRfqzMr.cjs"),t=require("react/jsx-runtime"),l=require("react"),x=require("lucide-react"),n=require("./RichTextEditor-DsUcQSbm.cjs"),g=require("./index-D_A0TBRA.cjs");function b(e){const{t:i}=g.useLocale(),c=l.useMemo(()=>[{name:"paragraph",label:i("editor.paragraph.tooltip"),iconName:"Heading1",isActive:()=>e.editor.isActive("paragraph")&&!e.editor.isActive("orderedList")&&!e.editor.isActive("bulletList")&&!e.editor.isActive("taskList"),action:()=>e.editor.chain().focus().clearNodes().run()},{name:"heading1",label:i("editor.heading.h1.tooltip"),isActive:()=>e.editor.isActive("heading",{level:1}),iconName:"Heading1",action:()=>e.editor.chain().focus().clearNodes().toggleHeading({level:1}).run()},{name:"heading2",label:i("editor.heading.h2.tooltip"),isActive:()=>e.editor.isActive("heading",{level:2}),iconName:"Heading2",action:()=>e.editor.chain().focus().clearNodes().toggleHeading({level:2}).run()},{name:"heading3",label:i("editor.heading.h3.tooltip"),isActive:()=>e.editor.isActive("heading",{level:3}),iconName:"Heading3",action:()=>e.editor.chain().focus().clearNodes().toggleHeading({level:3}).run()},{name:"bulletList",label:i("editor.bulletlist.tooltip"),isActive:()=>e.editor.isActive("bulletList"),iconName:"List",action:()=>e.editor.chain().focus().clearNodes().toggleBulletList().run()},{name:"numberedList",label:i("editor.orderedlist.tooltip"),isActive:()=>e.editor.isActive("orderedList"),iconName:"ListOrdered",action:()=>e.editor.chain().focus().clearNodes().toggleOrderedList().run()},{name:"taskList",label:i("editor.tasklist.tooltip"),isActive:()=>e.editor.isActive("taskList"),iconName:"ListTodo",action:()=>e.editor.chain().focus().clearNodes().toggleTaskList().run()},{name:"blockquote",label:i("editor.blockquote.tooltip"),isActive:()=>e.editor.isActive("blockquote"),iconName:"TextQuote",action:()=>e.editor.chain().focus().clearNodes().toggleBlockquote().run()}],[e.editor,i]),a=l.useMemo(()=>c.findLast(o=>o.isActive())??{label:"Empty"},[c]);return t.jsxs(n.DropdownMenu,{children:[t.jsx(n.DropdownMenuTrigger,{asChild:!0,children:t.jsxs(n.Button,{className:"richtext-flex richtext-h-[32px] richtext-gap-1 richtext-px-1.5",variant:"ghost",children:[t.jsxs("span",{className:"richtext-whitespace-nowrap richtext-text-sm richtext-font-normal",children:[" ",a==null?void 0:a.label]}),t.jsx(x.ChevronDown,{className:"richtext-size-4"})]})}),t.jsx(n.DropdownMenuContent,{align:"start",className:"richtext-w-full richtext-p-1",hideWhenDetached:!0,sideOffset:5,children:c.map((o,d)=>{var r;const u=n.icons[o.iconName];return t.jsx(n.DropdownMenuCheckboxItem,{checked:((r=o.isActive)==null?void 0:r.call(o))||!1,className:"richtext-cursor-pointer",onClick:()=>o.action(),children:t.jsxs("div",{className:"richtext-flex richtext-items-center richtext-gap-2 richtext-px-2",children:[t.jsx(u,{className:"richtext-h3 richtext-w-3"}),t.jsxs("span",{children:[" ",o.label]})]})},`text-bubble-${d}`)})})]})}const s=h.Extension.create({name:"text-bubble",addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),toolbar:!1,button:()=>({component:b,componentProps:{}})}}});exports.TextBubble=s;exports.default=s;
@@ -66,6 +66,8 @@ declare interface GeneralOptions<T> {
66
66
  button: ButtonView<T>;
67
67
  /** Show on Toolbar */
68
68
  toolbar?: boolean;
69
+ /** Shortcut keys override */
70
+ shortcutKeys?: string[] | string[][];
69
71
  }
70
72
 
71
73
  declare const TextBubble: Extension<TextBubbleOptions, any>;
@@ -132,8 +134,8 @@ declare module '@tiptap/core' {
132
134
 
133
135
  declare module '@tiptap/core' {
134
136
  interface Commands<ReturnType> {
135
- excalidraw: {
136
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
137
+ exportPdf: {
138
+ exportToPdf: () => ReturnType;
137
139
  };
138
140
  }
139
141
  }
@@ -141,8 +143,8 @@ declare module '@tiptap/core' {
141
143
 
142
144
  declare module '@tiptap/core' {
143
145
  interface Commands<ReturnType> {
144
- exportPdf: {
145
- exportToPdf: () => ReturnType;
146
+ excalidraw: {
147
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
146
148
  };
147
149
  }
148
150
  }
@@ -66,6 +66,8 @@ declare interface GeneralOptions<T> {
66
66
  button: ButtonView<T>;
67
67
  /** Show on Toolbar */
68
68
  toolbar?: boolean;
69
+ /** Shortcut keys override */
70
+ shortcutKeys?: string[] | string[][];
69
71
  }
70
72
 
71
73
  declare const TextBubble: Extension<TextBubbleOptions, any>;
@@ -132,8 +134,8 @@ declare module '@tiptap/core' {
132
134
 
133
135
  declare module '@tiptap/core' {
134
136
  interface Commands<ReturnType> {
135
- excalidraw: {
136
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
137
+ exportPdf: {
138
+ exportToPdf: () => ReturnType;
137
139
  };
138
140
  }
139
141
  }
@@ -141,8 +143,8 @@ declare module '@tiptap/core' {
141
143
 
142
144
  declare module '@tiptap/core' {
143
145
  interface Commands<ReturnType> {
144
- exportPdf: {
145
- exportToPdf: () => ReturnType;
146
+ excalidraw: {
147
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
146
148
  };
147
149
  }
148
150
  }
package/lib/TextBubble.js CHANGED
@@ -2,7 +2,7 @@ import { E as h } from "./index-DI9T3iLd.js";
2
2
  import { jsxs as o, jsx as a } from "react/jsx-runtime";
3
3
  import { useMemo as l } from "react";
4
4
  import { ChevronDown as u } from "lucide-react";
5
- import { D as m, e as g, B as x, f as b, i as v, h as f } from "./RichTextEditor-BJWhWz4z.js";
5
+ import { D as m, e as g, B as x, f as b, i as v, h as f } from "./RichTextEditor-e6q30rbV.js";
6
6
  import { u as N } from "./index-CsK90iVd.js";
7
7
  function A(e) {
8
8
  const { t } = N(), c = l(() => [
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./index-ByRfqzMr.cjs"),i=require("react/jsx-runtime"),g=require("react"),n=require("./RichTextEditor-DoMu_nCj.cjs");function m(t){var s;const c=g.useMemo(()=>{var r;const e=(r=t==null?void 0:t.items)==null?void 0:r.find(o=>o.isActive());return e&&!e.default?{...e,icon:e.icon?e.icon:t.icon}:{title:t==null?void 0:t.tooltip,icon:t.icon,isActive:()=>!1}},[t]);return i.jsxs(n.Popover,{modal:!0,children:[i.jsx(n.PopoverTrigger,{asChild:!0,disabled:t==null?void 0:t.disabled,children:i.jsx(n.ActionButton,{customClass:"!richtext-w-12 richtext-h-12",disabled:t==null?void 0:t.disabled,icon:t==null?void 0:t.icon,tooltip:t==null?void 0:t.tooltip,children:i.jsx(n.IconComponent,{className:"richtext-ml-1 richtext-size-3 richtext-text-zinc-500",name:"MenuDown"})})}),i.jsx(n.PopoverContent,{align:"start",className:"richtext-flex richtext-w-full richtext-min-w-4 richtext-flex-row richtext-gap-1 !richtext-p-[4px]",side:"bottom",children:(s=t==null?void 0:t.items)==null?void 0:s.map((e,a)=>{var r,o;return i.jsxs(n.Tooltip,{children:[i.jsx(n.TooltipTrigger,{asChild:!0,children:i.jsx(n.Toggle,{className:"richtext-size-7 richtext-p-1","data-state":c.title===e.title?"on":"off",onClick:e==null?void 0:e.action,pressed:c.title===e.title,size:"sm",children:(e==null?void 0:e.icon)&&i.jsx(n.IconComponent,{name:e.icon})})}),i.jsxs(n.TooltipContent,{className:"richtext-flex richtext-flex-col richtext-items-center",children:[i.jsx("span",{children:e.title}),!!((r=e.shortcutKeys)!=null&&r.length)&&i.jsx("span",{children:(o=e.shortcutKeys)==null?void 0:o.map(x=>n.getShortcutKey(x)).join(" ")})]})]},`text-align-${a}`)})})]})}const j=b.Extension.create({name:"text-direction",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),types:["heading","paragraph"],directions:["auto","ltr","rtl"],defaultDirection:"auto",button({editor:c,extension:s,t:e}){var h;const a=((h=s.options)==null?void 0:h.directions)||[],r={auto:"TextDirection",ltr:"LeftToRight",rtl:"RightToLeft"},o=a.map(l=>({title:e(`editor.textDirection.${l}.tooltip`),icon:r[l],isActive:()=>!1,action:()=>{var d,f,u,T;if(l==="auto"){(f=(d=c.commands)==null?void 0:d.unsetTextDirection)==null||f.call(d);return}(T=(u=c.commands)==null?void 0:u.setTextDirection)==null||T.call(u,l)},disabled:!1})),x=o.filter(l=>l.disabled).length===o.length;return{component:m,componentProps:{icon:"TextDirection",tooltip:e("editor.textDirection.tooltip"),disabled:x,items:o}}}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{dir:{default:this.options.defaultDirection,parseHTML:t=>t.attributes.dir&&this.options.directions.includes(t.attributes.dir)?t.attributes.dir.value:this.options.defaultDirection,renderHTML:t=>({dir:t.dir})}}}]},addCommands(){return{setTextDirection:t=>({commands:c})=>this.options.directions.includes(t)?this.options.types.every(s=>c.updateAttributes(s,{dir:t})):!1,unsetTextDirection:()=>({commands:t})=>this.options.types.every(c=>t.resetAttributes(c,"dir"))}}});exports.TextDirection=j;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./index-ByRfqzMr.cjs"),i=require("react/jsx-runtime"),g=require("react"),n=require("./RichTextEditor-DsUcQSbm.cjs");function m(t){var s;const c=g.useMemo(()=>{var r;const e=(r=t==null?void 0:t.items)==null?void 0:r.find(o=>o.isActive());return e&&!e.default?{...e,icon:e.icon?e.icon:t.icon}:{title:t==null?void 0:t.tooltip,icon:t.icon,isActive:()=>!1}},[t]);return i.jsxs(n.Popover,{modal:!0,children:[i.jsx(n.PopoverTrigger,{asChild:!0,disabled:t==null?void 0:t.disabled,children:i.jsx(n.ActionButton,{customClass:"!richtext-w-12 richtext-h-12",disabled:t==null?void 0:t.disabled,icon:t==null?void 0:t.icon,tooltip:t==null?void 0:t.tooltip,children:i.jsx(n.IconComponent,{className:"richtext-ml-1 richtext-size-3 richtext-text-zinc-500",name:"MenuDown"})})}),i.jsx(n.PopoverContent,{align:"start",className:"richtext-flex richtext-w-full richtext-min-w-4 richtext-flex-row richtext-gap-1 !richtext-p-[4px]",side:"bottom",children:(s=t==null?void 0:t.items)==null?void 0:s.map((e,a)=>{var r,o;return i.jsxs(n.Tooltip,{children:[i.jsx(n.TooltipTrigger,{asChild:!0,children:i.jsx(n.Toggle,{className:"richtext-size-7 richtext-p-1","data-state":c.title===e.title?"on":"off",onClick:e==null?void 0:e.action,pressed:c.title===e.title,size:"sm",children:(e==null?void 0:e.icon)&&i.jsx(n.IconComponent,{name:e.icon})})}),i.jsxs(n.TooltipContent,{className:"richtext-flex richtext-flex-col richtext-items-center",children:[i.jsx("span",{children:e.title}),!!((r=e.shortcutKeys)!=null&&r.length)&&i.jsx("span",{children:(o=e.shortcutKeys)==null?void 0:o.map(x=>n.getShortcutKey(x)).join(" ")})]})]},`text-align-${a}`)})})]})}const j=b.Extension.create({name:"text-direction",addOptions(){var t;return{...(t=this.parent)==null?void 0:t.call(this),types:["heading","paragraph"],directions:["auto","ltr","rtl"],defaultDirection:"auto",button({editor:c,extension:s,t:e}){var h;const a=((h=s.options)==null?void 0:h.directions)||[],r={auto:"TextDirection",ltr:"LeftToRight",rtl:"RightToLeft"},o=a.map(l=>({title:e(`editor.textDirection.${l}.tooltip`),icon:r[l],isActive:()=>!1,action:()=>{var d,f,u,T;if(l==="auto"){(f=(d=c.commands)==null?void 0:d.unsetTextDirection)==null||f.call(d);return}(T=(u=c.commands)==null?void 0:u.setTextDirection)==null||T.call(u,l)},disabled:!1})),x=o.filter(l=>l.disabled).length===o.length;return{component:m,componentProps:{icon:"TextDirection",tooltip:e("editor.textDirection.tooltip"),disabled:x,items:o}}}}},addGlobalAttributes(){return[{types:this.options.types,attributes:{dir:{default:this.options.defaultDirection,parseHTML:t=>t.attributes.dir&&this.options.directions.includes(t.attributes.dir)?t.attributes.dir.value:this.options.defaultDirection,renderHTML:t=>({dir:t.dir})}}}]},addCommands(){return{setTextDirection:t=>({commands:c})=>this.options.directions.includes(t)?this.options.types.every(s=>c.updateAttributes(s,{dir:t})):!1,unsetTextDirection:()=>({commands:t})=>this.options.types.every(c=>t.resetAttributes(c,"dir"))}}});exports.TextDirection=j;
@@ -59,8 +59,8 @@ declare module '@tiptap/core' {
59
59
 
60
60
  declare module '@tiptap/core' {
61
61
  interface Commands<ReturnType> {
62
- excalidraw: {
63
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
62
+ exportPdf: {
63
+ exportToPdf: () => ReturnType;
64
64
  };
65
65
  }
66
66
  }
@@ -68,8 +68,8 @@ declare module '@tiptap/core' {
68
68
 
69
69
  declare module '@tiptap/core' {
70
70
  interface Commands<ReturnType> {
71
- exportPdf: {
72
- exportToPdf: () => ReturnType;
71
+ excalidraw: {
72
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
73
73
  };
74
74
  }
75
75
  }
@@ -59,8 +59,8 @@ declare module '@tiptap/core' {
59
59
 
60
60
  declare module '@tiptap/core' {
61
61
  interface Commands<ReturnType> {
62
- excalidraw: {
63
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
62
+ exportPdf: {
63
+ exportToPdf: () => ReturnType;
64
64
  };
65
65
  }
66
66
  }
@@ -68,8 +68,8 @@ declare module '@tiptap/core' {
68
68
 
69
69
  declare module '@tiptap/core' {
70
70
  interface Commands<ReturnType> {
71
- exportPdf: {
72
- exportToPdf: () => ReturnType;
71
+ excalidraw: {
72
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
73
73
  };
74
74
  }
75
75
  }
@@ -1,7 +1,7 @@
1
1
  import { E as b } from "./index-DI9T3iLd.js";
2
2
  import { jsxs as h, jsx as n } from "react/jsx-runtime";
3
3
  import { useMemo as g } from "react";
4
- import { P as D, m as v, A as y, k as T, n as A, T as C, a as w, r as M, b as P, s as z } from "./RichTextEditor-BJWhWz4z.js";
4
+ import { P as D, m as v, A as y, k as T, n as A, T as C, a as w, r as M, b as P, s as z } from "./RichTextEditor-e6q30rbV.js";
5
5
  function L(t) {
6
6
  var c;
7
7
  const i = g(() => {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-ByRfqzMr.cjs"),i=require("./RichTextEditor-DoMu_nCj.cjs"),o=n.Mark.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["u",n.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),s=o.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button({editor:t,t:r}){return{component:i.ActionButton,componentProps:{action:()=>t.commands.toggleUnderline(),isActive:()=>t.isActive("underline")||!1,disabled:!1,icon:"Underline",shortcutKeys:["mod","U"],tooltip:r("editor.underline.tooltip")}}}}}});exports.TextUnderline=s;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./index-ByRfqzMr.cjs"),o=require("./RichTextEditor-DsUcQSbm.cjs"),s=n.Mark.create({name:"underline",addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:"u"},{style:"text-decoration",consuming:!1,getAttrs:e=>e.includes("underline")?{}:!1}]},renderHTML({HTMLAttributes:e}){return["u",n.mergeAttributes(this.options.HTMLAttributes,e),0]},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}}),d=s.extend({addOptions(){var e;return{...(e=this.parent)==null?void 0:e.call(this),button({editor:t,t:r,extension:i}){return{component:o.ActionButton,componentProps:{action:()=>t.commands.toggleUnderline(),isActive:()=>t.isActive("underline")||!1,disabled:!1,icon:"Underline",shortcutKeys:i.options.shortcutKeys??["mod","U"],tooltip:r("editor.underline.tooltip")}}}}}});exports.TextUnderline=d;
@@ -68,6 +68,8 @@ declare interface GeneralOptions<T> {
68
68
  button: ButtonView<T>;
69
69
  /** Show on Toolbar */
70
70
  toolbar?: boolean;
71
+ /** Shortcut keys override */
72
+ shortcutKeys?: string[] | string[][];
71
73
  }
72
74
 
73
75
  export declare const TextUnderline: Mark<UnderlineOptions, any>;
@@ -132,8 +134,8 @@ declare module '@tiptap/core' {
132
134
 
133
135
  declare module '@tiptap/core' {
134
136
  interface Commands<ReturnType> {
135
- excalidraw: {
136
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
137
+ exportPdf: {
138
+ exportToPdf: () => ReturnType;
137
139
  };
138
140
  }
139
141
  }
@@ -141,8 +143,8 @@ declare module '@tiptap/core' {
141
143
 
142
144
  declare module '@tiptap/core' {
143
145
  interface Commands<ReturnType> {
144
- exportPdf: {
145
- exportToPdf: () => ReturnType;
146
+ excalidraw: {
147
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
146
148
  };
147
149
  }
148
150
  }
@@ -68,6 +68,8 @@ declare interface GeneralOptions<T> {
68
68
  button: ButtonView<T>;
69
69
  /** Show on Toolbar */
70
70
  toolbar?: boolean;
71
+ /** Shortcut keys override */
72
+ shortcutKeys?: string[] | string[][];
71
73
  }
72
74
 
73
75
  export declare const TextUnderline: Mark<UnderlineOptions, any>;
@@ -132,8 +134,8 @@ declare module '@tiptap/core' {
132
134
 
133
135
  declare module '@tiptap/core' {
134
136
  interface Commands<ReturnType> {
135
- excalidraw: {
136
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
137
+ exportPdf: {
138
+ exportToPdf: () => ReturnType;
137
139
  };
138
140
  }
139
141
  }
@@ -141,8 +143,8 @@ declare module '@tiptap/core' {
141
143
 
142
144
  declare module '@tiptap/core' {
143
145
  interface Commands<ReturnType> {
144
- exportPdf: {
145
- exportToPdf: () => ReturnType;
146
+ excalidraw: {
147
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
146
148
  };
147
149
  }
148
150
  }
@@ -1,6 +1,6 @@
1
- import { M as r, m as o } from "./index-DI9T3iLd.js";
2
- import { A as i } from "./RichTextEditor-BJWhWz4z.js";
3
- const s = r.create({
1
+ import { M as o, m as s } from "./index-DI9T3iLd.js";
2
+ import { A as i } from "./RichTextEditor-e6q30rbV.js";
3
+ const d = o.create({
4
4
  name: "underline",
5
5
  addOptions() {
6
6
  return {
@@ -20,7 +20,7 @@ const s = r.create({
20
20
  ];
21
21
  },
22
22
  renderHTML({ HTMLAttributes: e }) {
23
- return ["u", o(this.options.HTMLAttributes, e), 0];
23
+ return ["u", s(this.options.HTMLAttributes, e), 0];
24
24
  },
25
25
  addCommands() {
26
26
  return {
@@ -35,12 +35,12 @@ const s = r.create({
35
35
  "Mod-U": () => this.editor.commands.toggleUnderline()
36
36
  };
37
37
  }
38
- }), u = /* @__PURE__ */ s.extend({
38
+ }), l = /* @__PURE__ */ d.extend({
39
39
  addOptions() {
40
40
  var e;
41
41
  return {
42
42
  ...(e = this.parent) == null ? void 0 : e.call(this),
43
- button({ editor: t, t: n }) {
43
+ button({ editor: t, t: n, extension: r }) {
44
44
  return {
45
45
  component: i,
46
46
  componentProps: {
@@ -48,7 +48,7 @@ const s = r.create({
48
48
  isActive: () => t.isActive("underline") || !1,
49
49
  disabled: !1,
50
50
  icon: "Underline",
51
- shortcutKeys: ["mod", "U"],
51
+ shortcutKeys: r.options.shortcutKeys ?? ["mod", "U"],
52
52
  tooltip: n("editor.underline.tooltip")
53
53
  }
54
54
  };
@@ -57,5 +57,5 @@ const s = r.create({
57
57
  }
58
58
  });
59
59
  export {
60
- u as TextUnderline
60
+ l as TextUnderline
61
61
  };
@@ -69,8 +69,8 @@ declare module '@tiptap/core' {
69
69
 
70
70
  declare module '@tiptap/core' {
71
71
  interface Commands<ReturnType> {
72
- excalidraw: {
73
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
72
+ exportPdf: {
73
+ exportToPdf: () => ReturnType;
74
74
  };
75
75
  }
76
76
  }
@@ -78,8 +78,8 @@ declare module '@tiptap/core' {
78
78
 
79
79
  declare module '@tiptap/core' {
80
80
  interface Commands<ReturnType> {
81
- exportPdf: {
82
- exportToPdf: () => ReturnType;
81
+ excalidraw: {
82
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
83
83
  };
84
84
  }
85
85
  }
@@ -69,8 +69,8 @@ declare module '@tiptap/core' {
69
69
 
70
70
  declare module '@tiptap/core' {
71
71
  interface Commands<ReturnType> {
72
- excalidraw: {
73
- setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
72
+ exportPdf: {
73
+ exportToPdf: () => ReturnType;
74
74
  };
75
75
  }
76
76
  }
@@ -78,8 +78,8 @@ declare module '@tiptap/core' {
78
78
 
79
79
  declare module '@tiptap/core' {
80
80
  interface Commands<ReturnType> {
81
- exportPdf: {
82
- exportToPdf: () => ReturnType;
81
+ excalidraw: {
82
+ setExcalidraw: (attrs?: IExcalidrawAttrs) => ReturnType;
83
83
  };
84
84
  }
85
85
  }