ritext 1.0.23 → 1.0.25

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 +306 -24
  122. package/dist/index.mjs +141 -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 +41 -28
  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
@@ -1,56 +1,26 @@
1
1
  import {
2
- DropdownComponent_default,
3
2
  DropdownItemComponent_default
4
- } from "../chunk-2YUUKIIT.mjs";
3
+ } from "../chunk-M4ORWR74.mjs";
5
4
  import {
6
- SubIcon_default
7
- } from "../chunk-MBF77NHS.mjs";
8
- import {
9
- SupIcon_default
10
- } from "../chunk-LMOTHRGQ.mjs";
11
- import "../chunk-7QOFJIQ3.mjs";
5
+ DropdownComponent_default
6
+ } from "../chunk-FJQ4FZRS.mjs";
12
7
  import "../chunk-VYDH6BZE.mjs";
13
8
  import {
14
- __objRest,
9
+ SubAndSupIcon,
10
+ SubIcon,
11
+ SupIcon
12
+ } from "../chunk-EN4BPI7N.mjs";
13
+ import {
15
14
  __spreadProps,
16
15
  __spreadValues
17
- } from "../chunk-FWCSY2DS.mjs";
16
+ } from "../chunk-WNQUEZJF.mjs";
18
17
 
19
18
  // src/extension/SubAndSuperscript.tsx
20
19
  import { Extension } from "@tiptap/react";
21
20
  import TiptapSubscript from "@tiptap/extension-subscript";
22
21
  import TiptapSuperscript from "@tiptap/extension-superscript";
23
-
24
- // src/lib/icon/SubAndSupIcon.tsx
25
- import { jsx, jsxs } from "react/jsx-runtime";
26
- var SubAndSupIcon = (_a) => {
27
- var _b = _a, { size = 17, className } = _b, props = __objRest(_b, ["size", "className"]);
28
- return /* @__PURE__ */ jsxs(
29
- "svg",
30
- __spreadProps(__spreadValues({
31
- xmlns: "http://www.w3.org/2000/svg",
32
- viewBox: "0 0 24 24",
33
- fill: "none",
34
- stroke: "currentColor",
35
- strokeWidth: 2,
36
- strokeLinecap: "round",
37
- strokeLinejoin: "round",
38
- width: size,
39
- height: size,
40
- className
41
- }, props), {
42
- children: [
43
- /* @__PURE__ */ jsx("path", { d: "M12 4v16" }),
44
- /* @__PURE__ */ jsx("path", { d: "M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2" }),
45
- /* @__PURE__ */ jsx("path", { d: "M9 20h6" })
46
- ]
47
- })
48
- );
49
- };
50
- var SubAndSupIcon_default = SubAndSupIcon;
51
-
52
- // src/extension/SubAndSuperscript.tsx
53
- import { jsx as jsx2 } from "react/jsx-runtime";
22
+ import { isMacOS } from "@tiptap/react";
23
+ import { jsx } from "react/jsx-runtime";
54
24
  var SubAndSuperscript = Extension.create({
55
25
  name: "subAndSuperScript",
56
26
  addOptions() {
@@ -62,24 +32,24 @@ var SubAndSuperscript = Extension.create({
62
32
  if (options.subscript !== false) {
63
33
  list.push({
64
34
  id: crypto.randomUUID(),
65
- icon: (_a2 = options.subscriptIcon) != null ? _a2 : /* @__PURE__ */ jsx2(SubIcon_default, {}),
35
+ icon: (_a2 = options.subscriptIcon) != null ? _a2 : /* @__PURE__ */ jsx(SubIcon, {}),
66
36
  text: typeof options.subscript === "string" ? options.subscript : "Subscript",
67
37
  onClick: () => editor.chain().focus().toggleSubscript().run(),
68
- keyBind: "\u2318 .",
38
+ keyBind: isMacOS() ? "\u2318 + ," : "Ctrl + ,",
69
39
  name: "subscript"
70
40
  });
71
41
  }
72
42
  if (options.superscript !== false) {
73
43
  list.push({
74
44
  id: crypto.randomUUID(),
75
- icon: (_b = options.superscriptIcon) != null ? _b : /* @__PURE__ */ jsx2(SupIcon_default, {}),
45
+ icon: (_b = options.superscriptIcon) != null ? _b : /* @__PURE__ */ jsx(SupIcon, {}),
76
46
  text: typeof options.superscript === "string" ? options.superscript : "Superscript",
77
47
  onClick: () => editor.chain().focus().toggleSuperscript().run(),
78
- keyBind: "\u2318 ,",
48
+ keyBind: isMacOS() ? "\u2318 + ." : "Ctrl + .",
79
49
  name: "superscript"
80
50
  });
81
51
  }
82
- return /* @__PURE__ */ jsx2(
52
+ return /* @__PURE__ */ jsx(
83
53
  DropdownComponent_default,
84
54
  {
85
55
  className: options.className,
@@ -91,9 +61,9 @@ var SubAndSuperscript = Extension.create({
91
61
  tooltipClassName: options.tooltipClassName,
92
62
  tooltipPlacement: options.tooltipPlacement,
93
63
  _tooltipContent: "Sub & Superscript",
94
- _internalContent: /* @__PURE__ */ jsx2(SubAndSupIcon_default, {}),
64
+ _internalContent: /* @__PURE__ */ jsx(SubAndSupIcon, {}),
95
65
  _dropdownClassName: dropdownContainerClassName,
96
- children: list.map((item) => /* @__PURE__ */ jsx2(
66
+ children: list.map((item) => /* @__PURE__ */ jsx(
97
67
  DropdownItemComponent_default,
98
68
  {
99
69
  onSelect: item.onClick,
@@ -1,8 +1,10 @@
1
+ import { SubscriptExtensionOptions } from '@tiptap/extension-subscript';
1
2
  import { Mark } from '@tiptap/react';
2
- import { E as ExtButtonOptions } from '../tiptap-ext.type-DrneAC5G.mjs';
3
+ import { E as ExtButtonOptions } from '../tiptap-ext.type-B3TtT7-J.mjs';
3
4
  import 'react';
4
5
  import '@floating-ui/react';
5
6
 
6
- declare const Subscript: Mark<ExtButtonOptions>;
7
+ type ExtSubscriptOptions = ExtButtonOptions<SubscriptExtensionOptions>;
8
+ declare const Subscript: Mark<ExtSubscriptOptions>;
7
9
 
8
10
  export { Subscript };
@@ -1,8 +1,10 @@
1
+ import { SubscriptExtensionOptions } from '@tiptap/extension-subscript';
1
2
  import { Mark } from '@tiptap/react';
2
- import { E as ExtButtonOptions } from '../tiptap-ext.type-DrneAC5G.js';
3
+ import { E as ExtButtonOptions } from '../tiptap-ext.type-B3TtT7-J.js';
3
4
  import 'react';
4
5
  import '@floating-ui/react';
5
6
 
6
- declare const Subscript: Mark<ExtButtonOptions>;
7
+ type ExtSubscriptOptions = ExtButtonOptions<SubscriptExtensionOptions>;
8
+ declare const Subscript: Mark<ExtSubscriptOptions>;
7
9
 
8
10
  export { Subscript };
@@ -1,12 +1,10 @@
1
1
  "use strict";
2
- var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __defProps = Object.defineProperties;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
5
  var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
7
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
8
7
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
- var __getProtoOf = Object.getPrototypeOf;
10
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
11
9
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
12
10
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
@@ -46,14 +44,6 @@ var __copyProps = (to, from, except, desc) => {
46
44
  }
47
45
  return to;
48
46
  };
49
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
50
- // If the importer is in node compatibility mode or this is not an ESM
51
- // file that has been converted to a CommonJS file using a Babel-
52
- // compatible transform (i.e. "__esModule" has not been set), then set
53
- // "default" to the CommonJS "module.exports" for node compatibility.
54
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
55
- mod
56
- ));
57
47
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
58
48
 
59
49
  // src/extension/Subscript.tsx
@@ -62,9 +52,9 @@ __export(Subscript_exports, {
62
52
  Subscript: () => Subscript
63
53
  });
64
54
  module.exports = __toCommonJS(Subscript_exports);
65
- var import_extension_subscript = __toESM(require("@tiptap/extension-subscript"));
55
+ var import_extension_subscript = require("@tiptap/extension-subscript");
66
56
 
67
- // src/lib/icon/SubIcon.tsx
57
+ // src/lib/icons/index.tsx
68
58
  var import_jsx_runtime = require("react/jsx-runtime");
69
59
  var SubIcon = (_a) => {
70
60
  var _b = _a, { size = 17, className } = _b, props = __objRest(_b, ["size", "className"]);
@@ -90,9 +80,9 @@ var SubIcon = (_a) => {
90
80
  })
91
81
  );
92
82
  };
93
- var SubIcon_default = SubIcon;
94
83
 
95
84
  // src/lib/components/ButtonComponent.tsx
85
+ var import_react5 = require("react");
96
86
  var import_tailwind_merge2 = require("tailwind-merge");
97
87
 
98
88
  // src/lib/components/_com/Tooltip.tsx
@@ -188,53 +178,38 @@ var useEditor = () => {
188
178
  };
189
179
 
190
180
  // src/lib/components/ButtonComponent.tsx
191
- var import_react5 = require("@tiptap/react");
181
+ var import_react6 = require("@tiptap/react");
192
182
  var import_jsx_runtime4 = require("react/jsx-runtime");
193
183
  var ButtonComponent = ({ className, activeClassName, icon, style, tooltip = true, tooltipClassName, tooltipPlacement, _extName, _internalIcon, _tooltipContent, _onToggle, _interShortcut, _buttonClassName }) => {
194
184
  const { editor } = useEditor();
195
- const editorState = (0, import_react5.useEditorState)({
185
+ const editorState = (0, import_react6.useEditorState)({
196
186
  editor,
197
187
  selector: ({ editor: editor2 }) => ({ isActive: (editor2 == null ? void 0 : editor2.isActive(_extName)) || false })
198
188
  });
189
+ const shortcutText = (0, import_react5.useMemo)(() => {
190
+ if (!_interShortcut) return "";
191
+ return (0, import_react6.isMacOS)() ? _interShortcut.mac : _interShortcut.win;
192
+ }, [_interShortcut]);
199
193
  const tooltipContent = /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("p", { children: [
200
194
  typeof tooltip === "string" ? tooltip : _tooltipContent,
201
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("br", {}),
202
- _interShortcut
195
+ shortcutText ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
196
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("br", {}),
197
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "opacity-70", children: shortcutText })
198
+ ] }) : null
203
199
  ] });
204
- const btn = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
205
- "button",
206
- {
207
- onClick: _onToggle,
208
- className: (0, import_tailwind_merge2.twMerge)(
209
- "py-1.5 px-2.5 rounded-md",
210
- _buttonClassName,
211
- (editorState == null ? void 0 : editorState.isActive) ? "bg-gray-200/60" : "hover:bg-gray-100",
212
- className,
213
- (editorState == null ? void 0 : editorState.isActive) ? activeClassName : "hover:bg-gray-100"
214
- ),
215
- style,
216
- children: icon != null ? icon : _internalIcon
217
- }
218
- );
200
+ const btn = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { onClick: _onToggle, className: (0, import_tailwind_merge2.twMerge)("py-1.5 px-2.5 rounded-md", _buttonClassName, (editorState == null ? void 0 : editorState.isActive) ? "bg-gray-200/60" : "hover:bg-gray-100", className, (editorState == null ? void 0 : editorState.isActive) ? activeClassName : "hover:bg-gray-100"), style, children: icon != null ? icon : _internalIcon });
219
201
  if (tooltip === false) return btn;
220
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
221
- Tooltip_default,
222
- {
223
- content: tooltipContent,
224
- className: tooltipClassName,
225
- placement: tooltipPlacement,
226
- children: btn
227
- }
228
- );
202
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Tooltip_default, { content: tooltipContent, className: tooltipClassName, placement: tooltipPlacement, children: btn });
229
203
  };
230
204
  var ButtonComponent_default = ButtonComponent;
231
205
 
232
206
  // src/extension/Subscript.tsx
233
207
  var import_jsx_runtime5 = require("react/jsx-runtime");
234
- var Subscript = import_extension_subscript.default.extend({
208
+ var Subscript = import_extension_subscript.Subscript.extend({
235
209
  addOptions() {
236
210
  var _a;
237
- return __spreadProps(__spreadValues({}, (_a = this.parent) == null ? void 0 : _a.call(this)), {
211
+ const parent = (_a = this.parent) == null ? void 0 : _a.call(this);
212
+ return __spreadProps(__spreadValues({}, parent != null ? parent : {}), {
238
213
  component: ({ options, editor, buttonClassName }) => {
239
214
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
240
215
  ButtonComponent_default,
@@ -246,10 +221,10 @@ var Subscript = import_extension_subscript.default.extend({
246
221
  tooltip: options.tooltip,
247
222
  tooltipClassName: options.tooltipClassName,
248
223
  tooltipPlacement: options.tooltipPlacement,
249
- _internalIcon: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SubIcon_default, {}),
224
+ _internalIcon: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SubIcon, {}),
250
225
  _extName: "subscript",
251
226
  _onToggle: () => editor.chain().focus().toggleSubscript().run(),
252
- _interShortcut: "\u2318 + ,",
227
+ _interShortcut: { win: "Ctrl + ,", mac: "\u2318 + ," },
253
228
  _tooltipContent: "Subscript",
254
229
  _buttonClassName: buttonClassName
255
230
  }
@@ -1,23 +1,23 @@
1
1
  import {
2
2
  ButtonComponent_default
3
- } from "../chunk-GSHINFPO.mjs";
4
- import {
5
- SubIcon_default
6
- } from "../chunk-MBF77NHS.mjs";
7
- import "../chunk-7QOFJIQ3.mjs";
3
+ } from "../chunk-SJFT7WNM.mjs";
8
4
  import "../chunk-VYDH6BZE.mjs";
5
+ import {
6
+ SubIcon
7
+ } from "../chunk-EN4BPI7N.mjs";
9
8
  import {
10
9
  __spreadProps,
11
10
  __spreadValues
12
- } from "../chunk-FWCSY2DS.mjs";
11
+ } from "../chunk-WNQUEZJF.mjs";
13
12
 
14
13
  // src/extension/Subscript.tsx
15
- import TiptapSubscript from "@tiptap/extension-subscript";
14
+ import { Subscript as TiptapSubscript } from "@tiptap/extension-subscript";
16
15
  import { jsx } from "react/jsx-runtime";
17
16
  var Subscript = TiptapSubscript.extend({
18
17
  addOptions() {
19
18
  var _a;
20
- return __spreadProps(__spreadValues({}, (_a = this.parent) == null ? void 0 : _a.call(this)), {
19
+ const parent = (_a = this.parent) == null ? void 0 : _a.call(this);
20
+ return __spreadProps(__spreadValues({}, parent != null ? parent : {}), {
21
21
  component: ({ options, editor, buttonClassName }) => {
22
22
  return /* @__PURE__ */ jsx(
23
23
  ButtonComponent_default,
@@ -29,10 +29,10 @@ var Subscript = TiptapSubscript.extend({
29
29
  tooltip: options.tooltip,
30
30
  tooltipClassName: options.tooltipClassName,
31
31
  tooltipPlacement: options.tooltipPlacement,
32
- _internalIcon: /* @__PURE__ */ jsx(SubIcon_default, {}),
32
+ _internalIcon: /* @__PURE__ */ jsx(SubIcon, {}),
33
33
  _extName: "subscript",
34
34
  _onToggle: () => editor.chain().focus().toggleSubscript().run(),
35
- _interShortcut: "\u2318 + ,",
35
+ _interShortcut: { win: "Ctrl + ,", mac: "\u2318 + ," },
36
36
  _tooltipContent: "Subscript",
37
37
  _buttonClassName: buttonClassName
38
38
  }
@@ -1,8 +1,10 @@
1
+ import { SuperscriptExtensionOptions } from '@tiptap/extension-superscript';
1
2
  import { Mark } from '@tiptap/react';
2
- import { E as ExtButtonOptions } from '../tiptap-ext.type-DrneAC5G.mjs';
3
+ import { E as ExtButtonOptions } from '../tiptap-ext.type-B3TtT7-J.mjs';
3
4
  import 'react';
4
5
  import '@floating-ui/react';
5
6
 
6
- declare const Superscript: Mark<ExtButtonOptions>;
7
+ type ExtSuperScriptOptions = ExtButtonOptions<SuperscriptExtensionOptions>;
8
+ declare const Superscript: Mark<ExtSuperScriptOptions>;
7
9
 
8
10
  export { Superscript };
@@ -1,8 +1,10 @@
1
+ import { SuperscriptExtensionOptions } from '@tiptap/extension-superscript';
1
2
  import { Mark } from '@tiptap/react';
2
- import { E as ExtButtonOptions } from '../tiptap-ext.type-DrneAC5G.js';
3
+ import { E as ExtButtonOptions } from '../tiptap-ext.type-B3TtT7-J.js';
3
4
  import 'react';
4
5
  import '@floating-ui/react';
5
6
 
6
- declare const Superscript: Mark<ExtButtonOptions>;
7
+ type ExtSuperScriptOptions = ExtButtonOptions<SuperscriptExtensionOptions>;
8
+ declare const Superscript: Mark<ExtSuperScriptOptions>;
7
9
 
8
10
  export { Superscript };
@@ -1,12 +1,10 @@
1
1
  "use strict";
2
- var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __defProps = Object.defineProperties;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
5
  var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
7
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
8
7
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
- var __getProtoOf = Object.getPrototypeOf;
10
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
11
9
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
12
10
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
@@ -46,14 +44,6 @@ var __copyProps = (to, from, except, desc) => {
46
44
  }
47
45
  return to;
48
46
  };
49
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
50
- // If the importer is in node compatibility mode or this is not an ESM
51
- // file that has been converted to a CommonJS file using a Babel-
52
- // compatible transform (i.e. "__esModule" has not been set), then set
53
- // "default" to the CommonJS "module.exports" for node compatibility.
54
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
55
- mod
56
- ));
57
47
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
58
48
 
59
49
  // src/extension/Superscript.tsx
@@ -62,9 +52,9 @@ __export(Superscript_exports, {
62
52
  Superscript: () => Superscript
63
53
  });
64
54
  module.exports = __toCommonJS(Superscript_exports);
65
- var import_extension_superscript = __toESM(require("@tiptap/extension-superscript"));
55
+ var import_extension_superscript = require("@tiptap/extension-superscript");
66
56
 
67
- // src/lib/icon/SupIcon.tsx
57
+ // src/lib/icons/index.tsx
68
58
  var import_jsx_runtime = require("react/jsx-runtime");
69
59
  var SupIcon = (_a) => {
70
60
  var _b = _a, { size = 17, className } = _b, props = __objRest(_b, ["size", "className"]);
@@ -90,9 +80,9 @@ var SupIcon = (_a) => {
90
80
  })
91
81
  );
92
82
  };
93
- var SupIcon_default = SupIcon;
94
83
 
95
84
  // src/lib/components/ButtonComponent.tsx
85
+ var import_react5 = require("react");
96
86
  var import_tailwind_merge2 = require("tailwind-merge");
97
87
 
98
88
  // src/lib/components/_com/Tooltip.tsx
@@ -188,53 +178,38 @@ var useEditor = () => {
188
178
  };
189
179
 
190
180
  // src/lib/components/ButtonComponent.tsx
191
- var import_react5 = require("@tiptap/react");
181
+ var import_react6 = require("@tiptap/react");
192
182
  var import_jsx_runtime4 = require("react/jsx-runtime");
193
183
  var ButtonComponent = ({ className, activeClassName, icon, style, tooltip = true, tooltipClassName, tooltipPlacement, _extName, _internalIcon, _tooltipContent, _onToggle, _interShortcut, _buttonClassName }) => {
194
184
  const { editor } = useEditor();
195
- const editorState = (0, import_react5.useEditorState)({
185
+ const editorState = (0, import_react6.useEditorState)({
196
186
  editor,
197
187
  selector: ({ editor: editor2 }) => ({ isActive: (editor2 == null ? void 0 : editor2.isActive(_extName)) || false })
198
188
  });
189
+ const shortcutText = (0, import_react5.useMemo)(() => {
190
+ if (!_interShortcut) return "";
191
+ return (0, import_react6.isMacOS)() ? _interShortcut.mac : _interShortcut.win;
192
+ }, [_interShortcut]);
199
193
  const tooltipContent = /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("p", { children: [
200
194
  typeof tooltip === "string" ? tooltip : _tooltipContent,
201
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("br", {}),
202
- _interShortcut
195
+ shortcutText ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
196
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("br", {}),
197
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "opacity-70", children: shortcutText })
198
+ ] }) : null
203
199
  ] });
204
- const btn = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
205
- "button",
206
- {
207
- onClick: _onToggle,
208
- className: (0, import_tailwind_merge2.twMerge)(
209
- "py-1.5 px-2.5 rounded-md",
210
- _buttonClassName,
211
- (editorState == null ? void 0 : editorState.isActive) ? "bg-gray-200/60" : "hover:bg-gray-100",
212
- className,
213
- (editorState == null ? void 0 : editorState.isActive) ? activeClassName : "hover:bg-gray-100"
214
- ),
215
- style,
216
- children: icon != null ? icon : _internalIcon
217
- }
218
- );
200
+ const btn = /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { onClick: _onToggle, className: (0, import_tailwind_merge2.twMerge)("py-1.5 px-2.5 rounded-md", _buttonClassName, (editorState == null ? void 0 : editorState.isActive) ? "bg-gray-200/60" : "hover:bg-gray-100", className, (editorState == null ? void 0 : editorState.isActive) ? activeClassName : "hover:bg-gray-100"), style, children: icon != null ? icon : _internalIcon });
219
201
  if (tooltip === false) return btn;
220
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
221
- Tooltip_default,
222
- {
223
- content: tooltipContent,
224
- className: tooltipClassName,
225
- placement: tooltipPlacement,
226
- children: btn
227
- }
228
- );
202
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Tooltip_default, { content: tooltipContent, className: tooltipClassName, placement: tooltipPlacement, children: btn });
229
203
  };
230
204
  var ButtonComponent_default = ButtonComponent;
231
205
 
232
206
  // src/extension/Superscript.tsx
233
207
  var import_jsx_runtime5 = require("react/jsx-runtime");
234
- var Superscript = import_extension_superscript.default.extend({
208
+ var Superscript = import_extension_superscript.Superscript.extend({
235
209
  addOptions() {
236
210
  var _a;
237
- return __spreadProps(__spreadValues({}, (_a = this.parent) == null ? void 0 : _a.call(this)), {
211
+ const parent = (_a = this.parent) == null ? void 0 : _a.call(this);
212
+ return __spreadProps(__spreadValues({}, parent != null ? parent : {}), {
238
213
  component: ({ options, editor, buttonClassName }) => {
239
214
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
240
215
  ButtonComponent_default,
@@ -246,10 +221,10 @@ var Superscript = import_extension_superscript.default.extend({
246
221
  tooltip: options.tooltip,
247
222
  tooltipClassName: options.tooltipClassName,
248
223
  tooltipPlacement: options.tooltipPlacement,
249
- _internalIcon: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SupIcon_default, {}),
224
+ _internalIcon: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SupIcon, {}),
250
225
  _extName: "superscript",
251
226
  _onToggle: () => editor.chain().focus().toggleSuperscript().run(),
252
- _interShortcut: "\u2318 + ,",
227
+ _interShortcut: { win: "Ctrl + .", mac: "\u2318 + ." },
253
228
  _tooltipContent: "Superscript",
254
229
  _buttonClassName: buttonClassName
255
230
  }
@@ -1,23 +1,23 @@
1
1
  import {
2
2
  ButtonComponent_default
3
- } from "../chunk-GSHINFPO.mjs";
4
- import {
5
- SupIcon_default
6
- } from "../chunk-LMOTHRGQ.mjs";
7
- import "../chunk-7QOFJIQ3.mjs";
3
+ } from "../chunk-SJFT7WNM.mjs";
8
4
  import "../chunk-VYDH6BZE.mjs";
5
+ import {
6
+ SupIcon
7
+ } from "../chunk-EN4BPI7N.mjs";
9
8
  import {
10
9
  __spreadProps,
11
10
  __spreadValues
12
- } from "../chunk-FWCSY2DS.mjs";
11
+ } from "../chunk-WNQUEZJF.mjs";
13
12
 
14
13
  // src/extension/Superscript.tsx
15
- import TiptapSuperscript from "@tiptap/extension-superscript";
14
+ import { Superscript as TiptapSuperscript } from "@tiptap/extension-superscript";
16
15
  import { jsx } from "react/jsx-runtime";
17
16
  var Superscript = TiptapSuperscript.extend({
18
17
  addOptions() {
19
18
  var _a;
20
- return __spreadProps(__spreadValues({}, (_a = this.parent) == null ? void 0 : _a.call(this)), {
19
+ const parent = (_a = this.parent) == null ? void 0 : _a.call(this);
20
+ return __spreadProps(__spreadValues({}, parent != null ? parent : {}), {
21
21
  component: ({ options, editor, buttonClassName }) => {
22
22
  return /* @__PURE__ */ jsx(
23
23
  ButtonComponent_default,
@@ -29,10 +29,10 @@ var Superscript = TiptapSuperscript.extend({
29
29
  tooltip: options.tooltip,
30
30
  tooltipClassName: options.tooltipClassName,
31
31
  tooltipPlacement: options.tooltipPlacement,
32
- _internalIcon: /* @__PURE__ */ jsx(SupIcon_default, {}),
32
+ _internalIcon: /* @__PURE__ */ jsx(SupIcon, {}),
33
33
  _extName: "superscript",
34
34
  _onToggle: () => editor.chain().focus().toggleSuperscript().run(),
35
- _interShortcut: "\u2318 + ,",
35
+ _interShortcut: { win: "Ctrl + .", mac: "\u2318 + ." },
36
36
  _tooltipContent: "Superscript",
37
37
  _buttonClassName: buttonClassName
38
38
  }
@@ -0,0 +1,12 @@
1
+ import { Extension } from '@tiptap/react';
2
+ import { TableKitOptions } from '@tiptap/extension-table';
3
+ import { a as ExtDropdownOptions } from '../tiptap-ext.type-B3TtT7-J.mjs';
4
+ import 'react';
5
+ import '@floating-ui/react';
6
+
7
+ type ExtTableOptions = ExtDropdownOptions<TableKitOptions, {
8
+ dropdownContainerClassName: string;
9
+ }>;
10
+ declare const Table: Extension<ExtTableOptions>;
11
+
12
+ export { Table };
@@ -0,0 +1,12 @@
1
+ import { Extension } from '@tiptap/react';
2
+ import { TableKitOptions } from '@tiptap/extension-table';
3
+ import { a as ExtDropdownOptions } from '../tiptap-ext.type-B3TtT7-J.js';
4
+ import 'react';
5
+ import '@floating-ui/react';
6
+
7
+ type ExtTableOptions = ExtDropdownOptions<TableKitOptions, {
8
+ dropdownContainerClassName: string;
9
+ }>;
10
+ declare const Table: Extension<ExtTableOptions>;
11
+
12
+ export { Table };