ritext 1.0.23 → 1.0.27

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 (132) hide show
  1. package/README.md +1 -30
  2. package/dist/chunk-EN4BPI7N.mjs +1213 -0
  3. package/dist/chunk-FJQ4FZRS.mjs +98 -0
  4. package/dist/chunk-M4ORWR74.mjs +31 -0
  5. package/dist/chunk-SJFT7WNM.mjs +38 -0
  6. package/dist/chunk-W367UGID.mjs +55 -0
  7. package/dist/{chunk-FWCSY2DS.mjs → chunk-WNQUEZJF.mjs} +22 -1
  8. package/dist/{chunk-D47XME55.mjs → chunk-WXCHG3NQ.mjs} +8 -2
  9. package/dist/chunk-WZKGD3DD.mjs +231 -0
  10. package/dist/extension/backgroundcolor.d.mts +16 -0
  11. package/dist/extension/backgroundcolor.d.ts +16 -0
  12. package/dist/extension/backgroundcolor.js +668 -0
  13. package/dist/extension/backgroundcolor.mjs +107 -0
  14. package/dist/extension/base.d.mts +6 -0
  15. package/dist/extension/base.d.ts +6 -0
  16. package/dist/extension/base.js +65 -0
  17. package/dist/extension/base.mjs +22 -0
  18. package/dist/extension/blockquote.d.mts +10 -0
  19. package/dist/extension/blockquote.d.ts +10 -0
  20. package/dist/extension/blockquote.js +239 -0
  21. package/dist/extension/blockquote.mjs +46 -0
  22. package/dist/extension/bold.d.mts +7 -2
  23. package/dist/extension/bold.d.ts +7 -2
  24. package/dist/extension/bold.js +22 -45
  25. package/dist/extension/bold.mjs +13 -35
  26. package/dist/extension/bulletlist.d.mts +10 -0
  27. package/dist/extension/bulletlist.d.ts +10 -0
  28. package/dist/extension/bulletlist.js +241 -0
  29. package/dist/extension/bulletlist.mjs +46 -0
  30. package/dist/extension/clearformat.d.mts +1 -1
  31. package/dist/extension/clearformat.d.ts +1 -1
  32. package/dist/extension/clearformat.js +11 -6
  33. package/dist/extension/clearformat.mjs +8 -35
  34. package/dist/extension/color.d.mts +17 -0
  35. package/dist/extension/color.d.ts +17 -0
  36. package/dist/extension/color.js +580 -0
  37. package/dist/extension/color.mjs +12 -0
  38. package/dist/extension/emoji.d.mts +15 -0
  39. package/dist/extension/emoji.d.ts +15 -0
  40. package/dist/extension/emoji.js +421 -0
  41. package/dist/extension/emoji.mjs +158 -0
  42. package/dist/extension/font-family.d.mts +8 -11
  43. package/dist/extension/font-family.d.ts +8 -11
  44. package/dist/extension/font-family.js +11 -12
  45. package/dist/extension/font-family.mjs +10 -11
  46. package/dist/extension/font-size.d.mts +8 -11
  47. package/dist/extension/font-size.d.ts +8 -11
  48. package/dist/extension/font-size.js +10 -12
  49. package/dist/extension/font-size.mjs +9 -11
  50. package/dist/extension/heading.d.mts +10 -10
  51. package/dist/extension/heading.d.ts +10 -10
  52. package/dist/extension/heading.js +68 -80
  53. package/dist/extension/heading.mjs +40 -206
  54. package/dist/extension/history.d.mts +4 -2
  55. package/dist/extension/history.d.ts +4 -2
  56. package/dist/extension/history.js +16 -9
  57. package/dist/extension/history.mjs +16 -64
  58. package/dist/extension/horizontalrule.d.mts +10 -0
  59. package/dist/extension/horizontalrule.d.ts +10 -0
  60. package/dist/extension/horizontalrule.js +242 -0
  61. package/dist/extension/horizontalrule.mjs +42 -0
  62. package/dist/extension/image.d.mts +26 -0
  63. package/dist/extension/image.d.ts +26 -0
  64. package/dist/extension/image.js +1611 -0
  65. package/dist/extension/image.mjs +1153 -0
  66. package/dist/extension/indentoutdent.d.mts +21 -0
  67. package/dist/extension/indentoutdent.d.ts +21 -0
  68. package/dist/extension/indentoutdent.js +380 -0
  69. package/dist/extension/indentoutdent.mjs +164 -0
  70. package/dist/extension/italic.d.mts +7 -2
  71. package/dist/extension/italic.d.ts +7 -2
  72. package/dist/extension/italic.js +22 -45
  73. package/dist/extension/italic.mjs +14 -40
  74. package/dist/extension/lineheight.d.mts +15 -0
  75. package/dist/extension/lineheight.d.ts +15 -0
  76. package/dist/extension/lineheight.js +342 -0
  77. package/dist/extension/lineheight.mjs +87 -0
  78. package/dist/extension/link.d.mts +15 -0
  79. package/dist/extension/link.d.ts +15 -0
  80. package/dist/extension/link.js +588 -0
  81. package/dist/extension/link.mjs +278 -0
  82. package/dist/extension/orderedlist.d.mts +10 -0
  83. package/dist/extension/orderedlist.d.ts +10 -0
  84. package/dist/extension/orderedlist.js +241 -0
  85. package/dist/extension/orderedlist.mjs +46 -0
  86. package/dist/extension/strike.d.mts +8 -3
  87. package/dist/extension/strike.d.ts +8 -3
  88. package/dist/extension/strike.js +22 -45
  89. package/dist/extension/strike.mjs +14 -40
  90. package/dist/extension/subandsuperscript.d.mts +7 -10
  91. package/dist/extension/subandsuperscript.d.ts +7 -10
  92. package/dist/extension/subandsuperscript.js +66 -77
  93. package/dist/extension/subandsuperscript.mjs +18 -48
  94. package/dist/extension/subscript.d.mts +4 -2
  95. package/dist/extension/subscript.d.ts +4 -2
  96. package/dist/extension/subscript.js +20 -45
  97. package/dist/extension/subscript.mjs +10 -10
  98. package/dist/extension/superscript.d.mts +4 -2
  99. package/dist/extension/superscript.d.ts +4 -2
  100. package/dist/extension/superscript.js +20 -45
  101. package/dist/extension/superscript.mjs +10 -10
  102. package/dist/extension/table.d.mts +12 -0
  103. package/dist/extension/table.d.ts +12 -0
  104. package/dist/extension/table.js +585 -0
  105. package/dist/extension/table.mjs +324 -0
  106. package/dist/extension/tasklist.d.mts +10 -0
  107. package/dist/extension/tasklist.d.ts +10 -0
  108. package/dist/extension/tasklist.js +246 -0
  109. package/dist/extension/tasklist.mjs +52 -0
  110. package/dist/extension/textalign.d.mts +15 -0
  111. package/dist/extension/textalign.d.ts +15 -0
  112. package/dist/extension/textalign.js +404 -0
  113. package/dist/extension/textalign.mjs +79 -0
  114. package/dist/extension/underline.d.mts +7 -2
  115. package/dist/extension/underline.d.ts +7 -2
  116. package/dist/extension/underline.js +22 -45
  117. package/dist/extension/underline.mjs +14 -39
  118. package/dist/index.css +683 -31
  119. package/dist/index.d.mts +3 -1
  120. package/dist/index.d.ts +3 -1
  121. package/dist/index.js +295 -24
  122. package/dist/index.mjs +130 -13
  123. package/dist/tiptap-ext.type-B3TtT7-J.d.mts +43 -0
  124. package/dist/tiptap-ext.type-B3TtT7-J.d.ts +43 -0
  125. package/package.json +25 -13
  126. package/dist/chunk-2YUUKIIT.mjs +0 -149
  127. package/dist/chunk-7QOFJIQ3.mjs +0 -90
  128. package/dist/chunk-GSHINFPO.mjs +0 -53
  129. package/dist/chunk-LMOTHRGQ.mjs +0 -37
  130. package/dist/chunk-MBF77NHS.mjs +0 -37
  131. package/dist/tiptap-ext.type-DrneAC5G.d.mts +0 -39
  132. package/dist/tiptap-ext.type-DrneAC5G.d.ts +0 -39
@@ -144,7 +144,7 @@ var Tooltip_default = Tooltip;
144
144
  // src/lib/components/DropdownComponent.tsx
145
145
  var import_react5 = require("@floating-ui/react");
146
146
 
147
- // src/lib/icon/ArrowIcon.tsx
147
+ // src/lib/icons/index.tsx
148
148
  var import_jsx_runtime2 = require("react/jsx-runtime");
149
149
  var ArrowIcon = (_a) => {
150
150
  var _b = _a, { size = 17, className } = _b, props = __objRest(_b, ["size", "className"]);
@@ -166,7 +166,6 @@ var ArrowIcon = (_a) => {
166
166
  })
167
167
  );
168
168
  };
169
- var ArrowIcon_default = ArrowIcon;
170
169
 
171
170
  // src/lib/components/DropdownComponent.tsx
172
171
  var import_react6 = require("motion/react");
@@ -189,13 +188,16 @@ var DropdownComponent = ({ children, className, showArrow = true, content, dropd
189
188
  const animateMotion = { opacity: 1, scale: 1 };
190
189
  const enhancedChildren = import_react4.Children.map(children, (child) => {
191
190
  if (!(0, import_react4.isValidElement)(child)) return child;
192
- if (!("onSelect" in child.props)) return child;
193
191
  const prevOnSelect = child.props.onSelect;
194
192
  const combinedOnSelect = () => {
195
193
  prevOnSelect == null ? void 0 : prevOnSelect();
196
194
  setOpen(false);
197
195
  };
198
- return (0, import_react4.cloneElement)(child, { onSelect: combinedOnSelect });
196
+ return (0, import_react4.cloneElement)(child, {
197
+ onSelect: prevOnSelect ? combinedOnSelect : void 0,
198
+ open,
199
+ onClose: () => setOpen(false)
200
+ });
199
201
  });
200
202
  const btn = /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
201
203
  "button",
@@ -211,7 +213,7 @@ var DropdownComponent = ({ children, className, showArrow = true, content, dropd
211
213
  style,
212
214
  children: [
213
215
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: content != null ? content : _internalContent }),
214
- showArrow && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ArrowIcon_default, { size: 14, className: "text-gray-500 block" })
216
+ showArrow && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ArrowIcon, { size: 14, className: "text-gray-500 block" })
215
217
  ]
216
218
  })
217
219
  );
@@ -240,7 +242,7 @@ var DropdownComponent = ({ children, className, showArrow = true, content, dropd
240
242
  initial: initialMotion,
241
243
  animate: animateMotion,
242
244
  exit: initialMotion,
243
- className: (0, import_tailwind_merge2.twMerge)("bg-white border border-solid border-gray-200 p-2 space-y-1 rounded-lg shadow-sm shadow-gray-200/40 max-h-125 overflow-auto", _dropdownClassName, dropdownClassName),
245
+ className: (0, import_tailwind_merge2.twMerge)("bg-white border border-solid border-gray-200 p-2 space-y-1 rounded-lg shadow-sm shadow-gray-200/40 z-99999999 max-h-125 overflow-auto", _dropdownClassName, dropdownClassName),
244
246
  children: enhancedChildren
245
247
  })
246
248
  ) }) })
@@ -288,10 +290,10 @@ var DropdownItemComponent_default = DropdownItemComponent;
288
290
  var import_jsx_runtime6 = require("react/jsx-runtime");
289
291
  var FontFamily = import_extension_text_style.FontFamily.extend({
290
292
  addOptions() {
291
- var _a, _b;
293
+ var _a;
292
294
  const parent = (_a = this.parent) == null ? void 0 : _a.call(this);
293
- return __spreadProps(__spreadValues({}, parent), {
294
- types: (_b = parent == null ? void 0 : parent.types) != null ? _b : ["textStyle"],
295
+ return __spreadProps(__spreadValues({}, parent != null ? parent : {}), {
296
+ types: ["textStyle"],
295
297
  fontFamilyList: DEFAULT_FONT_FAMILY_LIST,
296
298
  component: ({ options, editor, dropdownContainerClassName, dropdownItemClassName }) => {
297
299
  var _a2;
@@ -358,9 +360,6 @@ var FontFamily = import_extension_text_style.FontFamily.extend({
358
360
  );
359
361
  }
360
362
  });
361
- },
362
- addExtensions() {
363
- return [import_extension_text_style.TextStyle];
364
363
  }
365
364
  });
366
365
  var DEFAULT_FONT_FAMILY_LIST = [
@@ -1,23 +1,25 @@
1
1
  import {
2
- DropdownComponent_default,
3
2
  DropdownItemComponent_default
4
- } from "../chunk-2YUUKIIT.mjs";
5
- import "../chunk-7QOFJIQ3.mjs";
3
+ } from "../chunk-M4ORWR74.mjs";
4
+ import {
5
+ DropdownComponent_default
6
+ } from "../chunk-FJQ4FZRS.mjs";
6
7
  import "../chunk-VYDH6BZE.mjs";
8
+ import "../chunk-EN4BPI7N.mjs";
7
9
  import {
8
10
  __spreadProps,
9
11
  __spreadValues
10
- } from "../chunk-FWCSY2DS.mjs";
12
+ } from "../chunk-WNQUEZJF.mjs";
11
13
 
12
14
  // src/extension/FontFamily.tsx
13
- import { FontFamily as TiptapFontFamily, TextStyle } from "@tiptap/extension-text-style";
15
+ import { FontFamily as TiptapFontFamily } from "@tiptap/extension-text-style";
14
16
  import { jsx, jsxs } from "react/jsx-runtime";
15
17
  var FontFamily = TiptapFontFamily.extend({
16
18
  addOptions() {
17
- var _a, _b;
19
+ var _a;
18
20
  const parent = (_a = this.parent) == null ? void 0 : _a.call(this);
19
- return __spreadProps(__spreadValues({}, parent), {
20
- types: (_b = parent == null ? void 0 : parent.types) != null ? _b : ["textStyle"],
21
+ return __spreadProps(__spreadValues({}, parent != null ? parent : {}), {
22
+ types: ["textStyle"],
21
23
  fontFamilyList: DEFAULT_FONT_FAMILY_LIST,
22
24
  component: ({ options, editor, dropdownContainerClassName, dropdownItemClassName }) => {
23
25
  var _a2;
@@ -84,9 +86,6 @@ var FontFamily = TiptapFontFamily.extend({
84
86
  );
85
87
  }
86
88
  });
87
- },
88
- addExtensions() {
89
- return [TextStyle];
90
89
  }
91
90
  });
92
91
  var DEFAULT_FONT_FAMILY_LIST = [
@@ -1,22 +1,19 @@
1
- import { ReactNode } from 'react';
2
- import { Extension, Editor } from '@tiptap/react';
1
+ import { Extension } from '@tiptap/react';
3
2
  import { FontSizeOptions } from '@tiptap/extension-text-style';
4
- import { a as ExtDropdownOptions } from '../tiptap-ext.type-DrneAC5G.mjs';
3
+ import { a as ExtDropdownOptions } from '../tiptap-ext.type-B3TtT7-J.mjs';
4
+ import 'react';
5
5
  import '@floating-ui/react';
6
6
 
7
7
  type FontSizeListItem = string | {
8
8
  label: string;
9
9
  value?: string | null;
10
10
  };
11
- interface ExtFontSizeOptions extends ExtDropdownOptions, FontSizeOptions {
11
+ type ExtFontSizeOptions = ExtDropdownOptions<FontSizeOptions & {
12
12
  fontSizeList?: FontSizeListItem[];
13
- component: (args: {
14
- options: ExtFontSizeOptions;
15
- editor: Editor;
16
- dropdownContainerClassName: string;
17
- dropdownItemClassName: string;
18
- }) => ReactNode;
19
- }
13
+ }, {
14
+ dropdownContainerClassName: string;
15
+ dropdownItemClassName: string;
16
+ }>;
20
17
  declare const FontSize: Extension<ExtFontSizeOptions>;
21
18
  declare const DEFAULT_FONT_SIZE_LIST: FontSizeListItem[];
22
19
 
@@ -1,22 +1,19 @@
1
- import { ReactNode } from 'react';
2
- import { Extension, Editor } from '@tiptap/react';
1
+ import { Extension } from '@tiptap/react';
3
2
  import { FontSizeOptions } from '@tiptap/extension-text-style';
4
- import { a as ExtDropdownOptions } from '../tiptap-ext.type-DrneAC5G.js';
3
+ import { a as ExtDropdownOptions } from '../tiptap-ext.type-B3TtT7-J.js';
4
+ import 'react';
5
5
  import '@floating-ui/react';
6
6
 
7
7
  type FontSizeListItem = string | {
8
8
  label: string;
9
9
  value?: string | null;
10
10
  };
11
- interface ExtFontSizeOptions extends ExtDropdownOptions, FontSizeOptions {
11
+ type ExtFontSizeOptions = ExtDropdownOptions<FontSizeOptions & {
12
12
  fontSizeList?: FontSizeListItem[];
13
- component: (args: {
14
- options: ExtFontSizeOptions;
15
- editor: Editor;
16
- dropdownContainerClassName: string;
17
- dropdownItemClassName: string;
18
- }) => ReactNode;
19
- }
13
+ }, {
14
+ dropdownContainerClassName: string;
15
+ dropdownItemClassName: string;
16
+ }>;
20
17
  declare const FontSize: Extension<ExtFontSizeOptions>;
21
18
  declare const DEFAULT_FONT_SIZE_LIST: FontSizeListItem[];
22
19
 
@@ -144,7 +144,7 @@ var Tooltip_default = Tooltip;
144
144
  // src/lib/components/DropdownComponent.tsx
145
145
  var import_react5 = require("@floating-ui/react");
146
146
 
147
- // src/lib/icon/ArrowIcon.tsx
147
+ // src/lib/icons/index.tsx
148
148
  var import_jsx_runtime2 = require("react/jsx-runtime");
149
149
  var ArrowIcon = (_a) => {
150
150
  var _b = _a, { size = 17, className } = _b, props = __objRest(_b, ["size", "className"]);
@@ -166,7 +166,6 @@ var ArrowIcon = (_a) => {
166
166
  })
167
167
  );
168
168
  };
169
- var ArrowIcon_default = ArrowIcon;
170
169
 
171
170
  // src/lib/components/DropdownComponent.tsx
172
171
  var import_react6 = require("motion/react");
@@ -189,13 +188,16 @@ var DropdownComponent = ({ children, className, showArrow = true, content, dropd
189
188
  const animateMotion = { opacity: 1, scale: 1 };
190
189
  const enhancedChildren = import_react4.Children.map(children, (child) => {
191
190
  if (!(0, import_react4.isValidElement)(child)) return child;
192
- if (!("onSelect" in child.props)) return child;
193
191
  const prevOnSelect = child.props.onSelect;
194
192
  const combinedOnSelect = () => {
195
193
  prevOnSelect == null ? void 0 : prevOnSelect();
196
194
  setOpen(false);
197
195
  };
198
- return (0, import_react4.cloneElement)(child, { onSelect: combinedOnSelect });
196
+ return (0, import_react4.cloneElement)(child, {
197
+ onSelect: prevOnSelect ? combinedOnSelect : void 0,
198
+ open,
199
+ onClose: () => setOpen(false)
200
+ });
199
201
  });
200
202
  const btn = /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
201
203
  "button",
@@ -211,7 +213,7 @@ var DropdownComponent = ({ children, className, showArrow = true, content, dropd
211
213
  style,
212
214
  children: [
213
215
  /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: content != null ? content : _internalContent }),
214
- showArrow && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ArrowIcon_default, { size: 14, className: "text-gray-500 block" })
216
+ showArrow && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ArrowIcon, { size: 14, className: "text-gray-500 block" })
215
217
  ]
216
218
  })
217
219
  );
@@ -240,7 +242,7 @@ var DropdownComponent = ({ children, className, showArrow = true, content, dropd
240
242
  initial: initialMotion,
241
243
  animate: animateMotion,
242
244
  exit: initialMotion,
243
- className: (0, import_tailwind_merge2.twMerge)("bg-white border border-solid border-gray-200 p-2 space-y-1 rounded-lg shadow-sm shadow-gray-200/40 max-h-125 overflow-auto", _dropdownClassName, dropdownClassName),
245
+ className: (0, import_tailwind_merge2.twMerge)("bg-white border border-solid border-gray-200 p-2 space-y-1 rounded-lg shadow-sm shadow-gray-200/40 z-99999999 max-h-125 overflow-auto", _dropdownClassName, dropdownClassName),
244
246
  children: enhancedChildren
245
247
  })
246
248
  ) }) })
@@ -288,10 +290,10 @@ var DropdownItemComponent_default = DropdownItemComponent;
288
290
  var import_jsx_runtime6 = require("react/jsx-runtime");
289
291
  var FontSize = import_extension_text_style.FontSize.extend({
290
292
  addOptions() {
291
- var _a, _b;
293
+ var _a;
292
294
  const parent = (_a = this.parent) == null ? void 0 : _a.call(this);
293
295
  return __spreadProps(__spreadValues({}, parent), {
294
- types: (_b = parent == null ? void 0 : parent.types) != null ? _b : ["textStyle"],
296
+ types: ["textStyle"],
295
297
  fontSizeList: DEFAULT_FONT_SIZE_LIST,
296
298
  component: ({ options, editor, dropdownContainerClassName, dropdownItemClassName }) => {
297
299
  var _a2;
@@ -356,10 +358,6 @@ var FontSize = import_extension_text_style.FontSize.extend({
356
358
  );
357
359
  }
358
360
  });
359
- },
360
- // ✅ guarantees TextStyle exists even if user forgot to add it
361
- addExtensions() {
362
- return [import_extension_text_style.TextStyle];
363
361
  }
364
362
  });
365
363
  var DEFAULT_FONT_SIZE_LIST = [
@@ -1,23 +1,25 @@
1
1
  import {
2
- DropdownComponent_default,
3
2
  DropdownItemComponent_default
4
- } from "../chunk-2YUUKIIT.mjs";
5
- import "../chunk-7QOFJIQ3.mjs";
3
+ } from "../chunk-M4ORWR74.mjs";
4
+ import {
5
+ DropdownComponent_default
6
+ } from "../chunk-FJQ4FZRS.mjs";
6
7
  import "../chunk-VYDH6BZE.mjs";
8
+ import "../chunk-EN4BPI7N.mjs";
7
9
  import {
8
10
  __spreadProps,
9
11
  __spreadValues
10
- } from "../chunk-FWCSY2DS.mjs";
12
+ } from "../chunk-WNQUEZJF.mjs";
11
13
 
12
14
  // src/extension/FontSize.tsx
13
- import { FontSize as TiptapFontSize, TextStyle } from "@tiptap/extension-text-style";
15
+ import { FontSize as TiptapFontSize } from "@tiptap/extension-text-style";
14
16
  import { jsx, jsxs } from "react/jsx-runtime";
15
17
  var FontSize = TiptapFontSize.extend({
16
18
  addOptions() {
17
- var _a, _b;
19
+ var _a;
18
20
  const parent = (_a = this.parent) == null ? void 0 : _a.call(this);
19
21
  return __spreadProps(__spreadValues({}, parent), {
20
- types: (_b = parent == null ? void 0 : parent.types) != null ? _b : ["textStyle"],
22
+ types: ["textStyle"],
21
23
  fontSizeList: DEFAULT_FONT_SIZE_LIST,
22
24
  component: ({ options, editor, dropdownContainerClassName, dropdownItemClassName }) => {
23
25
  var _a2;
@@ -82,10 +84,6 @@ var FontSize = TiptapFontSize.extend({
82
84
  );
83
85
  }
84
86
  });
85
- },
86
- // ✅ guarantees TextStyle exists even if user forgot to add it
87
- addExtensions() {
88
- return [TextStyle];
89
87
  }
90
88
  });
91
89
  var DEFAULT_FONT_SIZE_LIST = [
@@ -1,9 +1,10 @@
1
1
  import { ReactNode } from 'react';
2
- import { Node, Editor } from '@tiptap/react';
3
- import { a as ExtDropdownOptions } from '../tiptap-ext.type-DrneAC5G.mjs';
2
+ import { Node } from '@tiptap/react';
3
+ import { HeadingOptions } from '@tiptap/extension-heading';
4
+ import { a as ExtDropdownOptions } from '../tiptap-ext.type-B3TtT7-J.mjs';
4
5
  import '@floating-ui/react';
5
6
 
6
- interface ExtHeadingOptions extends ExtDropdownOptions {
7
+ type ExtHeadingOptions = ExtDropdownOptions<HeadingOptions & {
7
8
  showKeyShortcutText?: boolean;
8
9
  level?: {
9
10
  enable: boolean;
@@ -11,13 +12,12 @@ interface ExtHeadingOptions extends ExtDropdownOptions {
11
12
  text?: string;
12
13
  keyShortcuts?: string;
13
14
  }[];
14
- component: (args: {
15
- options: ExtHeadingOptions;
16
- editor: Editor;
17
- dropdownContainerClassName: string;
18
- dropdownItemClassName: string;
19
- }) => ReactNode;
20
- }
15
+ showInBubbleMenu?: boolean;
16
+ bubbleMenuPosition?: number;
17
+ }, {
18
+ dropdownContainerClassName: string;
19
+ dropdownItemClassName: string;
20
+ }>;
21
21
  declare const Heading: Node<ExtHeadingOptions>;
22
22
 
23
23
  export { Heading };
@@ -1,9 +1,10 @@
1
1
  import { ReactNode } from 'react';
2
- import { Node, Editor } from '@tiptap/react';
3
- import { a as ExtDropdownOptions } from '../tiptap-ext.type-DrneAC5G.js';
2
+ import { Node } from '@tiptap/react';
3
+ import { HeadingOptions } from '@tiptap/extension-heading';
4
+ import { a as ExtDropdownOptions } from '../tiptap-ext.type-B3TtT7-J.js';
4
5
  import '@floating-ui/react';
5
6
 
6
- interface ExtHeadingOptions extends ExtDropdownOptions {
7
+ type ExtHeadingOptions = ExtDropdownOptions<HeadingOptions & {
7
8
  showKeyShortcutText?: boolean;
8
9
  level?: {
9
10
  enable: boolean;
@@ -11,13 +12,12 @@ interface ExtHeadingOptions extends ExtDropdownOptions {
11
12
  text?: string;
12
13
  keyShortcuts?: string;
13
14
  }[];
14
- component: (args: {
15
- options: ExtHeadingOptions;
16
- editor: Editor;
17
- dropdownContainerClassName: string;
18
- dropdownItemClassName: string;
19
- }) => ReactNode;
20
- }
15
+ showInBubbleMenu?: boolean;
16
+ bubbleMenuPosition?: number;
17
+ }, {
18
+ dropdownContainerClassName: string;
19
+ dropdownItemClassName: string;
20
+ }>;
21
21
  declare const Heading: Node<ExtHeadingOptions>;
22
22
 
23
23
  export { Heading };