tetrons 2.3.86 → 2.3.88
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +5 -4
- package/dist/index.mjs +117 -116
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -52,7 +52,7 @@ function MathModal({
|
|
|
52
52
|
return () => window.removeEventListener("keydown", onEsc);
|
|
53
53
|
}, [isOpen, onClose]);
|
|
54
54
|
if (!isOpen) return null;
|
|
55
|
-
return /* @__PURE__ */
|
|
55
|
+
return /* @__PURE__ */ import_react19.default.createElement("div", { className: "ai-modal-backdrop" }, /* @__PURE__ */ import_react19.default.createElement("div", { className: "ai-modal-content" }, /* @__PURE__ */ import_react19.default.createElement("div", { className: "ai-modal-title" }, "Insert LaTeX Equation"), /* @__PURE__ */ import_react19.default.createElement(
|
|
56
56
|
"textarea",
|
|
57
57
|
{
|
|
58
58
|
className: "ai-modal-textarea",
|
|
@@ -60,7 +60,7 @@ function MathModal({
|
|
|
60
60
|
value,
|
|
61
61
|
onChange: (e) => setValue(e.target.value)
|
|
62
62
|
}
|
|
63
|
-
), /* @__PURE__ */
|
|
63
|
+
), /* @__PURE__ */ import_react19.default.createElement("div", { className: "ai-modal-preview" }, /* @__PURE__ */ import_react19.default.createElement("strong", null, "Preview:"), /* @__PURE__ */ import_react19.default.createElement("div", { className: "ai-modal-preview-output" }, /* @__PURE__ */ import_react19.default.createElement("span", { dangerouslySetInnerHTML: { __html: renderLatex(value) } }))), /* @__PURE__ */ import_react19.default.createElement("div", { className: "ai-modal-actions" }, /* @__PURE__ */ import_react19.default.createElement("button", { type: "button", className: "ai-cancel-btn", onClick: onClose }, "Cancel"), /* @__PURE__ */ import_react19.default.createElement(
|
|
64
64
|
"button",
|
|
65
65
|
{
|
|
66
66
|
className: "ai-submit-btn",
|
|
@@ -84,7 +84,7 @@ var import_react19, import_katex2, import_katex_min;
|
|
|
84
84
|
var init_MathModal = __esm({
|
|
85
85
|
"src/components/tetrons/toolbar/MathModal.js"() {
|
|
86
86
|
"use strict";
|
|
87
|
-
import_react19 = require("react");
|
|
87
|
+
import_react19 = __toESM(require("react"));
|
|
88
88
|
import_katex2 = __toESM(require("katex"));
|
|
89
89
|
import_katex_min = require("katex/dist/katex.min.css");
|
|
90
90
|
}
|
|
@@ -17144,6 +17144,7 @@ function TetronsToolbar({
|
|
|
17144
17144
|
editor.off("update", handleUpdate);
|
|
17145
17145
|
};
|
|
17146
17146
|
}, [autoSave, editor]);
|
|
17147
|
+
const effectiveAddOns = version === "platinum" ? [...addOns, "math", "code"] : addOns;
|
|
17147
17148
|
return /* @__PURE__ */ import_react23.default.createElement("div", { className: "tetrons-toolbar" }, version !== "free" && /* @__PURE__ */ import_react23.default.createElement("div", { className: "group" }, /* @__PURE__ */ import_react23.default.createElement(
|
|
17148
17149
|
"input",
|
|
17149
17150
|
{
|
|
@@ -17152,7 +17153,7 @@ function TetronsToolbar({
|
|
|
17152
17153
|
checked: autoSave,
|
|
17153
17154
|
onChange: (e) => setAutoSave(e.target.checked)
|
|
17154
17155
|
}
|
|
17155
|
-
), /* @__PURE__ */ import_react23.default.createElement("label", { htmlFor: "autoSave" }, "Auto Save")), ["pro", "premium", "platinum"].includes(version) && /* @__PURE__ */ import_react23.default.createElement(FileGroup, { editor }), /* @__PURE__ */ import_react23.default.createElement(ClipboardGroup, { editor }), /* @__PURE__ */ import_react23.default.createElement(FontStyleGroup, { editor }), /* @__PURE__ */ import_react23.default.createElement(ListAlignGroup, { editor }), ["premium", "platinum"].includes(version) && /* @__PURE__ */ import_react23.default.createElement(import_react23.default.Fragment, null, /* @__PURE__ */ import_react23.default.createElement(InsertGroup, { editor }), /* @__PURE__ */ import_react23.default.createElement(ActionGroup, { editor })), version === "platinum" && /* @__PURE__ */ import_react23.default.createElement(
|
|
17156
|
+
), /* @__PURE__ */ import_react23.default.createElement("label", { htmlFor: "autoSave" }, "Auto Save")), ["pro", "premium", "platinum"].includes(version) && /* @__PURE__ */ import_react23.default.createElement(FileGroup, { editor }), /* @__PURE__ */ import_react23.default.createElement(ClipboardGroup, { editor }), /* @__PURE__ */ import_react23.default.createElement(FontStyleGroup, { editor }), /* @__PURE__ */ import_react23.default.createElement(ListAlignGroup, { editor }), ["premium", "platinum"].includes(version) && /* @__PURE__ */ import_react23.default.createElement(import_react23.default.Fragment, null, /* @__PURE__ */ import_react23.default.createElement(InsertGroup, { editor }), /* @__PURE__ */ import_react23.default.createElement(ActionGroup, { editor })), (["pro", "premium"].includes(version) && effectiveAddOns.includes("grammar") || version === "platinum") && /* @__PURE__ */ import_react23.default.createElement(MiscGroup, { editor }), (version === "premium" && effectiveAddOns.includes("ai") || version === "platinum") && /* @__PURE__ */ import_react23.default.createElement(AiGroup, { editor }), effectiveAddOns.length > 0 && /* @__PURE__ */ import_react23.default.createElement(AddOnGroup_default, { editor }));
|
|
17156
17157
|
}
|
|
17157
17158
|
|
|
17158
17159
|
// src/components/tetrons/EditorContent.tsx
|
package/dist/index.mjs
CHANGED
|
@@ -13,7 +13,7 @@ var MathModal_exports = {};
|
|
|
13
13
|
__export(MathModal_exports, {
|
|
14
14
|
default: () => MathModal
|
|
15
15
|
});
|
|
16
|
-
import { useEffect as useEffect7 } from "react";
|
|
16
|
+
import React13, { useEffect as useEffect7 } from "react";
|
|
17
17
|
import katex2 from "katex";
|
|
18
18
|
import "katex/dist/katex.min.css";
|
|
19
19
|
function MathModal({
|
|
@@ -33,7 +33,7 @@ function MathModal({
|
|
|
33
33
|
return () => window.removeEventListener("keydown", onEsc);
|
|
34
34
|
}, [isOpen, onClose]);
|
|
35
35
|
if (!isOpen) return null;
|
|
36
|
-
return /* @__PURE__ */
|
|
36
|
+
return /* @__PURE__ */ React13.createElement("div", { className: "ai-modal-backdrop" }, /* @__PURE__ */ React13.createElement("div", { className: "ai-modal-content" }, /* @__PURE__ */ React13.createElement("div", { className: "ai-modal-title" }, "Insert LaTeX Equation"), /* @__PURE__ */ React13.createElement(
|
|
37
37
|
"textarea",
|
|
38
38
|
{
|
|
39
39
|
className: "ai-modal-textarea",
|
|
@@ -41,7 +41,7 @@ function MathModal({
|
|
|
41
41
|
value,
|
|
42
42
|
onChange: (e) => setValue(e.target.value)
|
|
43
43
|
}
|
|
44
|
-
), /* @__PURE__ */
|
|
44
|
+
), /* @__PURE__ */ React13.createElement("div", { className: "ai-modal-preview" }, /* @__PURE__ */ React13.createElement("strong", null, "Preview:"), /* @__PURE__ */ React13.createElement("div", { className: "ai-modal-preview-output" }, /* @__PURE__ */ React13.createElement("span", { dangerouslySetInnerHTML: { __html: renderLatex(value) } }))), /* @__PURE__ */ React13.createElement("div", { className: "ai-modal-actions" }, /* @__PURE__ */ React13.createElement("button", { type: "button", className: "ai-cancel-btn", onClick: onClose }, "Cancel"), /* @__PURE__ */ React13.createElement(
|
|
45
45
|
"button",
|
|
46
46
|
{
|
|
47
47
|
className: "ai-submit-btn",
|
|
@@ -15625,7 +15625,7 @@ import Image from "@tiptap/extension-image";
|
|
|
15625
15625
|
import { ReactNodeViewRenderer } from "@tiptap/react";
|
|
15626
15626
|
|
|
15627
15627
|
// src/components/tetrons/ResizableImageComponent.tsx
|
|
15628
|
-
import
|
|
15628
|
+
import React, { useRef, useEffect as useEffect2, useState as useState2 } from "react";
|
|
15629
15629
|
import { NodeViewWrapper } from "@tiptap/react";
|
|
15630
15630
|
var ResizableImageComponent = ({
|
|
15631
15631
|
node,
|
|
@@ -15663,7 +15663,7 @@ var ResizableImageComponent = ({
|
|
|
15663
15663
|
window.removeEventListener("mouseup", handleMouseUp);
|
|
15664
15664
|
};
|
|
15665
15665
|
}, [isResizing, updateAttributes, aspectRatio]);
|
|
15666
|
-
return /* @__PURE__ */
|
|
15666
|
+
return /* @__PURE__ */ React.createElement(
|
|
15667
15667
|
NodeViewWrapper,
|
|
15668
15668
|
{
|
|
15669
15669
|
ref: wrapperRef,
|
|
@@ -15682,7 +15682,7 @@ var ResizableImageComponent = ({
|
|
|
15682
15682
|
padding: 2
|
|
15683
15683
|
}
|
|
15684
15684
|
},
|
|
15685
|
-
/* @__PURE__ */
|
|
15685
|
+
/* @__PURE__ */ React.createElement(
|
|
15686
15686
|
"img",
|
|
15687
15687
|
{
|
|
15688
15688
|
src,
|
|
@@ -15700,7 +15700,7 @@ var ResizableImageComponent = ({
|
|
|
15700
15700
|
draggable: false
|
|
15701
15701
|
}
|
|
15702
15702
|
),
|
|
15703
|
-
/* @__PURE__ */
|
|
15703
|
+
/* @__PURE__ */ React.createElement(
|
|
15704
15704
|
"div",
|
|
15705
15705
|
{
|
|
15706
15706
|
onMouseDown: (e) => {
|
|
@@ -15757,7 +15757,7 @@ import { Node as Node14 } from "@tiptap/core";
|
|
|
15757
15757
|
import { ReactNodeViewRenderer as ReactNodeViewRenderer2 } from "@tiptap/react";
|
|
15758
15758
|
|
|
15759
15759
|
// src/components/tetrons/ResizableVideoComponent.tsx
|
|
15760
|
-
import
|
|
15760
|
+
import React2, { useRef as useRef2, useEffect as useEffect3 } from "react";
|
|
15761
15761
|
import { NodeViewWrapper as NodeViewWrapper2 } from "@tiptap/react";
|
|
15762
15762
|
var ResizableVideoComponent = ({
|
|
15763
15763
|
node,
|
|
@@ -15778,7 +15778,7 @@ var ResizableVideoComponent = ({
|
|
|
15778
15778
|
observer.observe(video);
|
|
15779
15779
|
return () => observer.disconnect();
|
|
15780
15780
|
}, [updateAttributes]);
|
|
15781
|
-
return /* @__PURE__ */
|
|
15781
|
+
return /* @__PURE__ */ React2.createElement(
|
|
15782
15782
|
NodeViewWrapper2,
|
|
15783
15783
|
{
|
|
15784
15784
|
ref: wrapperRef,
|
|
@@ -15792,7 +15792,7 @@ var ResizableVideoComponent = ({
|
|
|
15792
15792
|
display: "inline-block"
|
|
15793
15793
|
}
|
|
15794
15794
|
},
|
|
15795
|
-
/* @__PURE__ */
|
|
15795
|
+
/* @__PURE__ */ React2.createElement(
|
|
15796
15796
|
"video",
|
|
15797
15797
|
{
|
|
15798
15798
|
ref: videoRef,
|
|
@@ -15856,7 +15856,7 @@ var ResizableVideo = Node14.create({
|
|
|
15856
15856
|
});
|
|
15857
15857
|
|
|
15858
15858
|
// src/components/tetrons/toolbar/TableContextMenu.tsx
|
|
15859
|
-
import
|
|
15859
|
+
import React3, { useEffect as useEffect4, useState as useState3 } from "react";
|
|
15860
15860
|
function TableContextMenu({ editor }) {
|
|
15861
15861
|
const [menuPosition, setMenuPosition] = useState3(null);
|
|
15862
15862
|
useEffect4(() => {
|
|
@@ -15884,13 +15884,13 @@ function TableContextMenu({ editor }) {
|
|
|
15884
15884
|
const deleteRow = () => editor.chain().focus().deleteRow().run();
|
|
15885
15885
|
const deleteCol = () => editor.chain().focus().deleteColumn().run();
|
|
15886
15886
|
if (!menuPosition) return null;
|
|
15887
|
-
return /* @__PURE__ */
|
|
15887
|
+
return /* @__PURE__ */ React3.createElement(
|
|
15888
15888
|
"ul",
|
|
15889
15889
|
{
|
|
15890
15890
|
className: "absolute bg-white shadow border rounded text-sm z-50",
|
|
15891
15891
|
style: { top: menuPosition.y, left: menuPosition.x }
|
|
15892
15892
|
},
|
|
15893
|
-
/* @__PURE__ */
|
|
15893
|
+
/* @__PURE__ */ React3.createElement(
|
|
15894
15894
|
"li",
|
|
15895
15895
|
{
|
|
15896
15896
|
className: "px-3 py-1 hover:bg-gray-100 cursor-pointer",
|
|
@@ -15898,7 +15898,7 @@ function TableContextMenu({ editor }) {
|
|
|
15898
15898
|
},
|
|
15899
15899
|
"Insert Row Above"
|
|
15900
15900
|
),
|
|
15901
|
-
/* @__PURE__ */
|
|
15901
|
+
/* @__PURE__ */ React3.createElement(
|
|
15902
15902
|
"li",
|
|
15903
15903
|
{
|
|
15904
15904
|
className: "px-3 py-1 hover:bg-gray-100 cursor-pointer",
|
|
@@ -15906,7 +15906,7 @@ function TableContextMenu({ editor }) {
|
|
|
15906
15906
|
},
|
|
15907
15907
|
"Insert Row Below"
|
|
15908
15908
|
),
|
|
15909
|
-
/* @__PURE__ */
|
|
15909
|
+
/* @__PURE__ */ React3.createElement(
|
|
15910
15910
|
"li",
|
|
15911
15911
|
{
|
|
15912
15912
|
className: "px-3 py-1 hover:bg-gray-100 cursor-pointer",
|
|
@@ -15914,7 +15914,7 @@ function TableContextMenu({ editor }) {
|
|
|
15914
15914
|
},
|
|
15915
15915
|
"Insert Column Left"
|
|
15916
15916
|
),
|
|
15917
|
-
/* @__PURE__ */
|
|
15917
|
+
/* @__PURE__ */ React3.createElement(
|
|
15918
15918
|
"li",
|
|
15919
15919
|
{
|
|
15920
15920
|
className: "px-3 py-1 hover:bg-gray-100 cursor-pointer",
|
|
@@ -15922,7 +15922,7 @@ function TableContextMenu({ editor }) {
|
|
|
15922
15922
|
},
|
|
15923
15923
|
"Insert Column Right"
|
|
15924
15924
|
),
|
|
15925
|
-
/* @__PURE__ */
|
|
15925
|
+
/* @__PURE__ */ React3.createElement(
|
|
15926
15926
|
"li",
|
|
15927
15927
|
{
|
|
15928
15928
|
className: "px-3 py-1 hover:bg-red-100 cursor-pointer",
|
|
@@ -15930,7 +15930,7 @@ function TableContextMenu({ editor }) {
|
|
|
15930
15930
|
},
|
|
15931
15931
|
"Delete Row"
|
|
15932
15932
|
),
|
|
15933
|
-
/* @__PURE__ */
|
|
15933
|
+
/* @__PURE__ */ React3.createElement(
|
|
15934
15934
|
"li",
|
|
15935
15935
|
{
|
|
15936
15936
|
className: "px-3 py-1 hover:bg-red-100 cursor-pointer",
|
|
@@ -15945,7 +15945,7 @@ function TableContextMenu({ editor }) {
|
|
|
15945
15945
|
import React16, { useEffect as useEffect8, useState as useState10 } from "react";
|
|
15946
15946
|
|
|
15947
15947
|
// src/components/tetrons/toolbar/ActionGroup.tsx
|
|
15948
|
-
import
|
|
15948
|
+
import React5, { useEffect as useEffect5, useRef as useRef3, useState as useState4 } from "react";
|
|
15949
15949
|
import {
|
|
15950
15950
|
MdZoomIn,
|
|
15951
15951
|
MdZoomOut,
|
|
@@ -15955,10 +15955,10 @@ import {
|
|
|
15955
15955
|
} from "react-icons/md";
|
|
15956
15956
|
|
|
15957
15957
|
// src/components/tetrons/toolbar/ToolbarButton.tsx
|
|
15958
|
-
import
|
|
15959
|
-
var ToolbarButton =
|
|
15958
|
+
import React4 from "react";
|
|
15959
|
+
var ToolbarButton = React4.forwardRef(
|
|
15960
15960
|
({ icon: Icon, onClick, disabled = false, title, label, isActive = false }, ref) => {
|
|
15961
|
-
return /* @__PURE__ */
|
|
15961
|
+
return /* @__PURE__ */ React4.createElement(
|
|
15962
15962
|
"button",
|
|
15963
15963
|
{
|
|
15964
15964
|
type: "button",
|
|
@@ -15969,7 +15969,7 @@ var ToolbarButton = React5.forwardRef(
|
|
|
15969
15969
|
"aria-label": title ?? label,
|
|
15970
15970
|
className: `toolbar-button ${isActive ? "active" : ""}`
|
|
15971
15971
|
},
|
|
15972
|
-
/* @__PURE__ */
|
|
15972
|
+
/* @__PURE__ */ React4.createElement(Icon, { size: 20 })
|
|
15973
15973
|
);
|
|
15974
15974
|
}
|
|
15975
15975
|
);
|
|
@@ -16103,7 +16103,7 @@ function ActionGroup({ editor }) {
|
|
|
16103
16103
|
link.click();
|
|
16104
16104
|
document.body.removeChild(link);
|
|
16105
16105
|
};
|
|
16106
|
-
return /* @__PURE__ */
|
|
16106
|
+
return /* @__PURE__ */ React5.createElement("div", { className: "action-group", role: "group", "aria-label": "Editor actions" }, /* @__PURE__ */ React5.createElement(ToolbarButton_default, { icon: MdZoomIn, onClick: zoomIn, title: "Zoom In" }), /* @__PURE__ */ React5.createElement(ToolbarButton_default, { icon: MdZoomOut, onClick: zoomOut, title: "Zoom Out" }), /* @__PURE__ */ React5.createElement(ToolbarButton_default, { icon: MdPrint, onClick: handlePrint, title: "Print" }), /* @__PURE__ */ React5.createElement(ToolbarButton_default, { icon: MdSave, onClick: handleSave, title: "Save" }), /* @__PURE__ */ React5.createElement("div", { className: "relative", ref: dropdownRef }, /* @__PURE__ */ React5.createElement(
|
|
16107
16107
|
"button",
|
|
16108
16108
|
{
|
|
16109
16109
|
type: "button",
|
|
@@ -16113,9 +16113,9 @@ function ActionGroup({ editor }) {
|
|
|
16113
16113
|
className: "export-button",
|
|
16114
16114
|
title: "Export"
|
|
16115
16115
|
},
|
|
16116
|
-
/* @__PURE__ */
|
|
16117
|
-
/* @__PURE__ */
|
|
16118
|
-
), dropdownOpen && /* @__PURE__ */
|
|
16116
|
+
/* @__PURE__ */ React5.createElement(MdDownload, null),
|
|
16117
|
+
/* @__PURE__ */ React5.createElement("span", { className: "text-sm" })
|
|
16118
|
+
), dropdownOpen && /* @__PURE__ */ React5.createElement("div", { className: "export-dropdown" }, /* @__PURE__ */ React5.createElement(
|
|
16119
16119
|
"button",
|
|
16120
16120
|
{
|
|
16121
16121
|
type: "button",
|
|
@@ -16125,7 +16125,7 @@ function ActionGroup({ editor }) {
|
|
|
16125
16125
|
}
|
|
16126
16126
|
},
|
|
16127
16127
|
"Export as PDF"
|
|
16128
|
-
), /* @__PURE__ */
|
|
16128
|
+
), /* @__PURE__ */ React5.createElement(
|
|
16129
16129
|
"button",
|
|
16130
16130
|
{
|
|
16131
16131
|
type: "button",
|
|
@@ -16135,7 +16135,7 @@ function ActionGroup({ editor }) {
|
|
|
16135
16135
|
}
|
|
16136
16136
|
},
|
|
16137
16137
|
"Export as HTML"
|
|
16138
|
-
), /* @__PURE__ */
|
|
16138
|
+
), /* @__PURE__ */ React5.createElement(
|
|
16139
16139
|
"button",
|
|
16140
16140
|
{
|
|
16141
16141
|
type: "button",
|
|
@@ -16155,9 +16155,9 @@ import {
|
|
|
16155
16155
|
MdContentCopy,
|
|
16156
16156
|
MdFormatPaint
|
|
16157
16157
|
} from "react-icons/md";
|
|
16158
|
-
import
|
|
16158
|
+
import React6 from "react";
|
|
16159
16159
|
function ClipboardGroup({ editor }) {
|
|
16160
|
-
return /* @__PURE__ */
|
|
16160
|
+
return /* @__PURE__ */ React6.createElement("div", { className: "clipboard-group" }, /* @__PURE__ */ React6.createElement(
|
|
16161
16161
|
ToolbarButton_default,
|
|
16162
16162
|
{
|
|
16163
16163
|
icon: MdContentPaste,
|
|
@@ -16171,7 +16171,7 @@ function ClipboardGroup({ editor }) {
|
|
|
16171
16171
|
}
|
|
16172
16172
|
}
|
|
16173
16173
|
}
|
|
16174
|
-
), /* @__PURE__ */
|
|
16174
|
+
), /* @__PURE__ */ React6.createElement(
|
|
16175
16175
|
ToolbarButton_default,
|
|
16176
16176
|
{
|
|
16177
16177
|
icon: MdContentCut,
|
|
@@ -16185,7 +16185,7 @@ function ClipboardGroup({ editor }) {
|
|
|
16185
16185
|
});
|
|
16186
16186
|
}
|
|
16187
16187
|
}
|
|
16188
|
-
), /* @__PURE__ */
|
|
16188
|
+
), /* @__PURE__ */ React6.createElement(
|
|
16189
16189
|
ToolbarButton_default,
|
|
16190
16190
|
{
|
|
16191
16191
|
icon: MdContentCopy,
|
|
@@ -16197,7 +16197,7 @@ function ClipboardGroup({ editor }) {
|
|
|
16197
16197
|
navigator.clipboard.writeText(selectedText);
|
|
16198
16198
|
}
|
|
16199
16199
|
}
|
|
16200
|
-
), /* @__PURE__ */
|
|
16200
|
+
), /* @__PURE__ */ React6.createElement(
|
|
16201
16201
|
ToolbarButton_default,
|
|
16202
16202
|
{
|
|
16203
16203
|
icon: MdFormatPaint,
|
|
@@ -16223,7 +16223,7 @@ import {
|
|
|
16223
16223
|
} from "react-icons/md";
|
|
16224
16224
|
import { ImTextColor } from "react-icons/im";
|
|
16225
16225
|
import { BiSolidColorFill } from "react-icons/bi";
|
|
16226
|
-
import
|
|
16226
|
+
import React7, { useEffect as useEffect6, useState as useState5 } from "react";
|
|
16227
16227
|
function FontStyleGroup({ editor }) {
|
|
16228
16228
|
const [textColor, setTextColor] = useState5("#000000");
|
|
16229
16229
|
const [highlightColor, setHighlightColor] = useState5("#ffff00");
|
|
@@ -16249,7 +16249,7 @@ function FontStyleGroup({ editor }) {
|
|
|
16249
16249
|
editor.off("transaction", updateStates);
|
|
16250
16250
|
};
|
|
16251
16251
|
}, [editor]);
|
|
16252
|
-
return /* @__PURE__ */
|
|
16252
|
+
return /* @__PURE__ */ React7.createElement("div", { className: "font-style-group" }, /* @__PURE__ */ React7.createElement(
|
|
16253
16253
|
"select",
|
|
16254
16254
|
{
|
|
16255
16255
|
title: "Font Family",
|
|
@@ -16260,12 +16260,12 @@ function FontStyleGroup({ editor }) {
|
|
|
16260
16260
|
editor.chain().focus().setFontFamily(value).run();
|
|
16261
16261
|
}
|
|
16262
16262
|
},
|
|
16263
|
-
/* @__PURE__ */
|
|
16264
|
-
/* @__PURE__ */
|
|
16265
|
-
/* @__PURE__ */
|
|
16266
|
-
/* @__PURE__ */
|
|
16267
|
-
/* @__PURE__ */
|
|
16268
|
-
), /* @__PURE__ */
|
|
16263
|
+
/* @__PURE__ */ React7.createElement("option", { value: "Arial" }, "Arial"),
|
|
16264
|
+
/* @__PURE__ */ React7.createElement("option", { value: "Georgia" }, "Georgia"),
|
|
16265
|
+
/* @__PURE__ */ React7.createElement("option", { value: "Times New Roman" }, "Times New Roman"),
|
|
16266
|
+
/* @__PURE__ */ React7.createElement("option", { value: "Courier New" }, "Courier New"),
|
|
16267
|
+
/* @__PURE__ */ React7.createElement("option", { value: "Verdana" }, "Verdana")
|
|
16268
|
+
), /* @__PURE__ */ React7.createElement(
|
|
16269
16269
|
"select",
|
|
16270
16270
|
{
|
|
16271
16271
|
title: "Font Size",
|
|
@@ -16276,16 +16276,16 @@ function FontStyleGroup({ editor }) {
|
|
|
16276
16276
|
editor.chain().focus().setFontSize(value).run();
|
|
16277
16277
|
}
|
|
16278
16278
|
},
|
|
16279
|
-
/* @__PURE__ */
|
|
16280
|
-
/* @__PURE__ */
|
|
16281
|
-
/* @__PURE__ */
|
|
16282
|
-
/* @__PURE__ */
|
|
16283
|
-
/* @__PURE__ */
|
|
16284
|
-
/* @__PURE__ */
|
|
16285
|
-
/* @__PURE__ */
|
|
16286
|
-
/* @__PURE__ */
|
|
16287
|
-
/* @__PURE__ */
|
|
16288
|
-
), /* @__PURE__ */
|
|
16279
|
+
/* @__PURE__ */ React7.createElement("option", { value: "12px" }, "12"),
|
|
16280
|
+
/* @__PURE__ */ React7.createElement("option", { value: "14px" }, "14"),
|
|
16281
|
+
/* @__PURE__ */ React7.createElement("option", { value: "16px" }, "16"),
|
|
16282
|
+
/* @__PURE__ */ React7.createElement("option", { value: "18px" }, "18"),
|
|
16283
|
+
/* @__PURE__ */ React7.createElement("option", { value: "24px" }, "24"),
|
|
16284
|
+
/* @__PURE__ */ React7.createElement("option", { value: "36px" }, "36"),
|
|
16285
|
+
/* @__PURE__ */ React7.createElement("option", { value: "48px" }, "48"),
|
|
16286
|
+
/* @__PURE__ */ React7.createElement("option", { value: "64px" }, "64"),
|
|
16287
|
+
/* @__PURE__ */ React7.createElement("option", { value: "72px" }, "72")
|
|
16288
|
+
), /* @__PURE__ */ React7.createElement(
|
|
16289
16289
|
ToolbarButton_default,
|
|
16290
16290
|
{
|
|
16291
16291
|
icon: MdFormatBold,
|
|
@@ -16293,7 +16293,7 @@ function FontStyleGroup({ editor }) {
|
|
|
16293
16293
|
onClick: () => editor.chain().focus().toggleBold().run(),
|
|
16294
16294
|
isActive: editor.isActive("bold")
|
|
16295
16295
|
}
|
|
16296
|
-
), /* @__PURE__ */
|
|
16296
|
+
), /* @__PURE__ */ React7.createElement(
|
|
16297
16297
|
ToolbarButton_default,
|
|
16298
16298
|
{
|
|
16299
16299
|
icon: MdFormatItalic,
|
|
@@ -16301,7 +16301,7 @@ function FontStyleGroup({ editor }) {
|
|
|
16301
16301
|
onClick: () => editor.chain().focus().toggleItalic().run(),
|
|
16302
16302
|
isActive: editor.isActive("italic")
|
|
16303
16303
|
}
|
|
16304
|
-
), /* @__PURE__ */
|
|
16304
|
+
), /* @__PURE__ */ React7.createElement(
|
|
16305
16305
|
ToolbarButton_default,
|
|
16306
16306
|
{
|
|
16307
16307
|
icon: MdFormatUnderlined,
|
|
@@ -16309,7 +16309,7 @@ function FontStyleGroup({ editor }) {
|
|
|
16309
16309
|
onClick: () => editor.chain().focus().toggleUnderline().run(),
|
|
16310
16310
|
isActive: editor.isActive("underline")
|
|
16311
16311
|
}
|
|
16312
|
-
), /* @__PURE__ */
|
|
16312
|
+
), /* @__PURE__ */ React7.createElement(
|
|
16313
16313
|
ToolbarButton_default,
|
|
16314
16314
|
{
|
|
16315
16315
|
icon: MdStrikethroughS,
|
|
@@ -16317,7 +16317,7 @@ function FontStyleGroup({ editor }) {
|
|
|
16317
16317
|
onClick: () => editor.chain().focus().toggleStrike().run(),
|
|
16318
16318
|
isActive: editor.isActive("strike")
|
|
16319
16319
|
}
|
|
16320
|
-
), /* @__PURE__ */
|
|
16320
|
+
), /* @__PURE__ */ React7.createElement(
|
|
16321
16321
|
ToolbarButton_default,
|
|
16322
16322
|
{
|
|
16323
16323
|
icon: MdSubscript,
|
|
@@ -16325,7 +16325,7 @@ function FontStyleGroup({ editor }) {
|
|
|
16325
16325
|
onClick: () => editor.chain().focus().toggleSubscript().run(),
|
|
16326
16326
|
isActive: editor.isActive("subscript")
|
|
16327
16327
|
}
|
|
16328
|
-
), /* @__PURE__ */
|
|
16328
|
+
), /* @__PURE__ */ React7.createElement(
|
|
16329
16329
|
ToolbarButton_default,
|
|
16330
16330
|
{
|
|
16331
16331
|
icon: MdSuperscript,
|
|
@@ -16333,7 +16333,7 @@ function FontStyleGroup({ editor }) {
|
|
|
16333
16333
|
onClick: () => editor.chain().focus().toggleSuperscript().run(),
|
|
16334
16334
|
isActive: editor.isActive("superscript")
|
|
16335
16335
|
}
|
|
16336
|
-
), /* @__PURE__ */
|
|
16336
|
+
), /* @__PURE__ */ React7.createElement(
|
|
16337
16337
|
"label",
|
|
16338
16338
|
{
|
|
16339
16339
|
title: "Font Color",
|
|
@@ -16341,9 +16341,9 @@ function FontStyleGroup({ editor }) {
|
|
|
16341
16341
|
className: "color-label",
|
|
16342
16342
|
style: { "--indicator-color": textColor }
|
|
16343
16343
|
},
|
|
16344
|
-
/* @__PURE__ */
|
|
16345
|
-
/* @__PURE__ */
|
|
16346
|
-
/* @__PURE__ */
|
|
16344
|
+
/* @__PURE__ */ React7.createElement(ImTextColor, { size: 20 }),
|
|
16345
|
+
/* @__PURE__ */ React7.createElement("div", { className: "color-indicator" }),
|
|
16346
|
+
/* @__PURE__ */ React7.createElement(
|
|
16347
16347
|
"input",
|
|
16348
16348
|
{
|
|
16349
16349
|
type: "color",
|
|
@@ -16355,7 +16355,7 @@ function FontStyleGroup({ editor }) {
|
|
|
16355
16355
|
}
|
|
16356
16356
|
}
|
|
16357
16357
|
)
|
|
16358
|
-
), /* @__PURE__ */
|
|
16358
|
+
), /* @__PURE__ */ React7.createElement(
|
|
16359
16359
|
"label",
|
|
16360
16360
|
{
|
|
16361
16361
|
title: "Highlight Color",
|
|
@@ -16363,9 +16363,9 @@ function FontStyleGroup({ editor }) {
|
|
|
16363
16363
|
className: "color-label",
|
|
16364
16364
|
style: { "--indicator-color": highlightColor }
|
|
16365
16365
|
},
|
|
16366
|
-
/* @__PURE__ */
|
|
16367
|
-
/* @__PURE__ */
|
|
16368
|
-
/* @__PURE__ */
|
|
16366
|
+
/* @__PURE__ */ React7.createElement(BiSolidColorFill, { size: 20 }),
|
|
16367
|
+
/* @__PURE__ */ React7.createElement("div", { className: "color-indicator" }),
|
|
16368
|
+
/* @__PURE__ */ React7.createElement(
|
|
16369
16369
|
"input",
|
|
16370
16370
|
{
|
|
16371
16371
|
type: "color",
|
|
@@ -16377,14 +16377,14 @@ function FontStyleGroup({ editor }) {
|
|
|
16377
16377
|
}
|
|
16378
16378
|
}
|
|
16379
16379
|
)
|
|
16380
|
-
), /* @__PURE__ */
|
|
16380
|
+
), /* @__PURE__ */ React7.createElement(
|
|
16381
16381
|
ToolbarButton_default,
|
|
16382
16382
|
{
|
|
16383
16383
|
icon: MdFormatClear,
|
|
16384
16384
|
label: "Clear Formatting",
|
|
16385
16385
|
onClick: () => editor.chain().focus().unsetAllMarks().run()
|
|
16386
16386
|
}
|
|
16387
|
-
), /* @__PURE__ */
|
|
16387
|
+
), /* @__PURE__ */ React7.createElement(
|
|
16388
16388
|
ToolbarButton_default,
|
|
16389
16389
|
{
|
|
16390
16390
|
icon: MdFormatPaint2,
|
|
@@ -16403,7 +16403,7 @@ function FontStyleGroup({ editor }) {
|
|
|
16403
16403
|
}
|
|
16404
16404
|
|
|
16405
16405
|
// src/components/tetrons/toolbar/InsertGroup.tsx
|
|
16406
|
-
import
|
|
16406
|
+
import React8, { useRef as useRef4, useState as useState6 } from "react";
|
|
16407
16407
|
import {
|
|
16408
16408
|
MdTableChart,
|
|
16409
16409
|
MdInsertPhoto,
|
|
@@ -16490,7 +16490,7 @@ function InsertGroup({ editor }) {
|
|
|
16490
16490
|
return url;
|
|
16491
16491
|
}
|
|
16492
16492
|
}
|
|
16493
|
-
return /* @__PURE__ */
|
|
16493
|
+
return /* @__PURE__ */ React8.createElement("div", { className: "insert-group" }, /* @__PURE__ */ React8.createElement(
|
|
16494
16494
|
"input",
|
|
16495
16495
|
{
|
|
16496
16496
|
type: "file",
|
|
@@ -16501,7 +16501,7 @@ function InsertGroup({ editor }) {
|
|
|
16501
16501
|
"aria-label": "Upload Image",
|
|
16502
16502
|
title: "Upload Image"
|
|
16503
16503
|
}
|
|
16504
|
-
), /* @__PURE__ */
|
|
16504
|
+
), /* @__PURE__ */ React8.createElement(
|
|
16505
16505
|
"input",
|
|
16506
16506
|
{
|
|
16507
16507
|
type: "file",
|
|
@@ -16512,23 +16512,23 @@ function InsertGroup({ editor }) {
|
|
|
16512
16512
|
"aria-label": "Upload Video",
|
|
16513
16513
|
title: "Upload Video"
|
|
16514
16514
|
}
|
|
16515
|
-
), /* @__PURE__ */
|
|
16515
|
+
), /* @__PURE__ */ React8.createElement(
|
|
16516
16516
|
ToolbarButton_default,
|
|
16517
16517
|
{
|
|
16518
16518
|
icon: MdTableChart,
|
|
16519
16519
|
label: "Insert Table",
|
|
16520
16520
|
onClick: () => setShowTableGrid(!showTableGrid)
|
|
16521
16521
|
}
|
|
16522
|
-
), showTableGrid && /* @__PURE__ */
|
|
16522
|
+
), showTableGrid && /* @__PURE__ */ React8.createElement(
|
|
16523
16523
|
"div",
|
|
16524
16524
|
{
|
|
16525
16525
|
className: "table-grid-popup",
|
|
16526
16526
|
onMouseLeave: () => setShowTableGrid(false)
|
|
16527
16527
|
},
|
|
16528
|
-
/* @__PURE__ */
|
|
16528
|
+
/* @__PURE__ */ React8.createElement("div", { className: "table-grid" }, [...Array(10)].map(
|
|
16529
16529
|
(_, row) => [...Array(10)].map((_2, col) => {
|
|
16530
16530
|
const isSelected = row < selectedRows && col < selectedCols;
|
|
16531
|
-
return /* @__PURE__ */
|
|
16531
|
+
return /* @__PURE__ */ React8.createElement(
|
|
16532
16532
|
"div",
|
|
16533
16533
|
{
|
|
16534
16534
|
key: `${row}-${col}`,
|
|
@@ -16539,22 +16539,22 @@ function InsertGroup({ editor }) {
|
|
|
16539
16539
|
);
|
|
16540
16540
|
})
|
|
16541
16541
|
)),
|
|
16542
|
-
/* @__PURE__ */
|
|
16543
|
-
), /* @__PURE__ */
|
|
16542
|
+
/* @__PURE__ */ React8.createElement("div", { className: "table-grid-label" }, selectedRows, " x ", selectedCols)
|
|
16543
|
+
), /* @__PURE__ */ React8.createElement(
|
|
16544
16544
|
ToolbarButton_default,
|
|
16545
16545
|
{
|
|
16546
16546
|
icon: MdInsertPhoto,
|
|
16547
16547
|
label: "Insert Image",
|
|
16548
16548
|
onClick: () => imageInputRef.current?.click()
|
|
16549
16549
|
}
|
|
16550
|
-
), /* @__PURE__ */
|
|
16550
|
+
), /* @__PURE__ */ React8.createElement(
|
|
16551
16551
|
ToolbarButton_default,
|
|
16552
16552
|
{
|
|
16553
16553
|
icon: MdVideoLibrary,
|
|
16554
16554
|
label: "Insert Video",
|
|
16555
16555
|
onClick: () => videoInputRef.current?.click()
|
|
16556
16556
|
}
|
|
16557
|
-
), /* @__PURE__ */
|
|
16557
|
+
), /* @__PURE__ */ React8.createElement(
|
|
16558
16558
|
ToolbarButton_default,
|
|
16559
16559
|
{
|
|
16560
16560
|
icon: MdInsertLink,
|
|
@@ -16566,7 +16566,7 @@ function InsertGroup({ editor }) {
|
|
|
16566
16566
|
}
|
|
16567
16567
|
}
|
|
16568
16568
|
}
|
|
16569
|
-
), /* @__PURE__ */
|
|
16569
|
+
), /* @__PURE__ */ React8.createElement(
|
|
16570
16570
|
ToolbarButton_default,
|
|
16571
16571
|
{
|
|
16572
16572
|
icon: MdInsertComment,
|
|
@@ -16580,14 +16580,14 @@ function InsertGroup({ editor }) {
|
|
|
16580
16580
|
}
|
|
16581
16581
|
}
|
|
16582
16582
|
}
|
|
16583
|
-
), /* @__PURE__ */
|
|
16583
|
+
), /* @__PURE__ */ React8.createElement("div", { className: "relative" }, /* @__PURE__ */ React8.createElement(
|
|
16584
16584
|
ToolbarButton_default,
|
|
16585
16585
|
{
|
|
16586
16586
|
icon: MdInsertEmoticon,
|
|
16587
16587
|
label: "Emoji",
|
|
16588
16588
|
onClick: () => setShowPicker(!showPicker)
|
|
16589
16589
|
}
|
|
16590
|
-
), showPicker && /* @__PURE__ */
|
|
16590
|
+
), showPicker && /* @__PURE__ */ React8.createElement("div", { className: "emoji-picker" }, /* @__PURE__ */ React8.createElement(
|
|
16591
16591
|
Picker,
|
|
16592
16592
|
{
|
|
16593
16593
|
onEmojiSelect: addEmoji,
|
|
@@ -16597,14 +16597,14 @@ function InsertGroup({ editor }) {
|
|
|
16597
16597
|
showSkinTones: true,
|
|
16598
16598
|
emojiTooltip: true
|
|
16599
16599
|
}
|
|
16600
|
-
))), /* @__PURE__ */
|
|
16600
|
+
))), /* @__PURE__ */ React8.createElement(
|
|
16601
16601
|
ToolbarButton_default,
|
|
16602
16602
|
{
|
|
16603
16603
|
icon: MdHorizontalRule,
|
|
16604
16604
|
label: "Horizontal Line",
|
|
16605
16605
|
onClick: () => editor.chain().focus().setHorizontalRule().run()
|
|
16606
16606
|
}
|
|
16607
|
-
), /* @__PURE__ */
|
|
16607
|
+
), /* @__PURE__ */ React8.createElement(
|
|
16608
16608
|
ToolbarButton_default,
|
|
16609
16609
|
{
|
|
16610
16610
|
icon: MdOutlineOndemandVideo,
|
|
@@ -16628,7 +16628,7 @@ function InsertGroup({ editor }) {
|
|
|
16628
16628
|
}
|
|
16629
16629
|
|
|
16630
16630
|
// src/components/tetrons/toolbar/ListAlignGroup.tsx
|
|
16631
|
-
import
|
|
16631
|
+
import React9 from "react";
|
|
16632
16632
|
import {
|
|
16633
16633
|
MdFormatListBulleted,
|
|
16634
16634
|
MdFormatListNumbered,
|
|
@@ -16640,7 +16640,7 @@ import {
|
|
|
16640
16640
|
MdFormatAlignJustify
|
|
16641
16641
|
} from "react-icons/md";
|
|
16642
16642
|
function ListAlignGroup({ editor }) {
|
|
16643
|
-
return /* @__PURE__ */
|
|
16643
|
+
return /* @__PURE__ */ React9.createElement("div", { className: "list-align-group" }, /* @__PURE__ */ React9.createElement(
|
|
16644
16644
|
ToolbarButton_default,
|
|
16645
16645
|
{
|
|
16646
16646
|
icon: MdFormatListBulleted,
|
|
@@ -16648,7 +16648,7 @@ function ListAlignGroup({ editor }) {
|
|
|
16648
16648
|
onClick: () => editor.chain().focus().toggleBulletList().run(),
|
|
16649
16649
|
disabled: !editor.can().toggleBulletList()
|
|
16650
16650
|
}
|
|
16651
|
-
), /* @__PURE__ */
|
|
16651
|
+
), /* @__PURE__ */ React9.createElement(
|
|
16652
16652
|
ToolbarButton_default,
|
|
16653
16653
|
{
|
|
16654
16654
|
icon: MdFormatListNumbered,
|
|
@@ -16656,7 +16656,7 @@ function ListAlignGroup({ editor }) {
|
|
|
16656
16656
|
onClick: () => editor.chain().focus().toggleOrderedList().run(),
|
|
16657
16657
|
disabled: !editor.can().toggleOrderedList()
|
|
16658
16658
|
}
|
|
16659
|
-
), /* @__PURE__ */
|
|
16659
|
+
), /* @__PURE__ */ React9.createElement(
|
|
16660
16660
|
ToolbarButton_default,
|
|
16661
16661
|
{
|
|
16662
16662
|
icon: MdFormatIndentIncrease,
|
|
@@ -16664,7 +16664,7 @@ function ListAlignGroup({ editor }) {
|
|
|
16664
16664
|
onClick: () => editor.chain().focus().sinkListItem("listItem").run(),
|
|
16665
16665
|
disabled: !editor.can().sinkListItem("listItem")
|
|
16666
16666
|
}
|
|
16667
|
-
), /* @__PURE__ */
|
|
16667
|
+
), /* @__PURE__ */ React9.createElement(
|
|
16668
16668
|
ToolbarButton_default,
|
|
16669
16669
|
{
|
|
16670
16670
|
icon: MdFormatIndentDecrease,
|
|
@@ -16672,7 +16672,7 @@ function ListAlignGroup({ editor }) {
|
|
|
16672
16672
|
onClick: () => editor.chain().focus().liftListItem("listItem").run(),
|
|
16673
16673
|
disabled: !editor.can().liftListItem("listItem")
|
|
16674
16674
|
}
|
|
16675
|
-
), /* @__PURE__ */
|
|
16675
|
+
), /* @__PURE__ */ React9.createElement(
|
|
16676
16676
|
ToolbarButton_default,
|
|
16677
16677
|
{
|
|
16678
16678
|
icon: MdFormatAlignLeft,
|
|
@@ -16680,7 +16680,7 @@ function ListAlignGroup({ editor }) {
|
|
|
16680
16680
|
onClick: () => editor.chain().focus().setTextAlign("left").run(),
|
|
16681
16681
|
disabled: !editor.can().setTextAlign("left")
|
|
16682
16682
|
}
|
|
16683
|
-
), /* @__PURE__ */
|
|
16683
|
+
), /* @__PURE__ */ React9.createElement(
|
|
16684
16684
|
ToolbarButton_default,
|
|
16685
16685
|
{
|
|
16686
16686
|
icon: MdFormatAlignCenter,
|
|
@@ -16688,7 +16688,7 @@ function ListAlignGroup({ editor }) {
|
|
|
16688
16688
|
onClick: () => editor.chain().focus().setTextAlign("center").run(),
|
|
16689
16689
|
disabled: !editor.can().setTextAlign("center")
|
|
16690
16690
|
}
|
|
16691
|
-
), /* @__PURE__ */
|
|
16691
|
+
), /* @__PURE__ */ React9.createElement(
|
|
16692
16692
|
ToolbarButton_default,
|
|
16693
16693
|
{
|
|
16694
16694
|
icon: MdFormatAlignRight,
|
|
@@ -16696,7 +16696,7 @@ function ListAlignGroup({ editor }) {
|
|
|
16696
16696
|
onClick: () => editor.chain().focus().setTextAlign("right").run(),
|
|
16697
16697
|
disabled: !editor.can().setTextAlign("right")
|
|
16698
16698
|
}
|
|
16699
|
-
), /* @__PURE__ */
|
|
16699
|
+
), /* @__PURE__ */ React9.createElement(
|
|
16700
16700
|
ToolbarButton_default,
|
|
16701
16701
|
{
|
|
16702
16702
|
icon: MdFormatAlignJustify,
|
|
@@ -16708,7 +16708,7 @@ function ListAlignGroup({ editor }) {
|
|
|
16708
16708
|
}
|
|
16709
16709
|
|
|
16710
16710
|
// src/components/tetrons/toolbar/MiscGroup.tsx
|
|
16711
|
-
import
|
|
16711
|
+
import React10 from "react";
|
|
16712
16712
|
import {
|
|
16713
16713
|
MdUndo,
|
|
16714
16714
|
MdRedo,
|
|
@@ -16781,7 +16781,7 @@ Reason: ${issue.message}
|
|
|
16781
16781
|
alert("\u274C Failed to check grammar. Please try again later.");
|
|
16782
16782
|
}
|
|
16783
16783
|
};
|
|
16784
|
-
return /* @__PURE__ */
|
|
16784
|
+
return /* @__PURE__ */ React10.createElement("div", { className: "misc-group" }, /* @__PURE__ */ React10.createElement(
|
|
16785
16785
|
ToolbarButton_default,
|
|
16786
16786
|
{
|
|
16787
16787
|
icon: MdUndo,
|
|
@@ -16789,7 +16789,7 @@ Reason: ${issue.message}
|
|
|
16789
16789
|
onClick: () => editor.chain().focus().undo().run(),
|
|
16790
16790
|
disabled: !editor.can().undo()
|
|
16791
16791
|
}
|
|
16792
|
-
), /* @__PURE__ */
|
|
16792
|
+
), /* @__PURE__ */ React10.createElement(
|
|
16793
16793
|
ToolbarButton_default,
|
|
16794
16794
|
{
|
|
16795
16795
|
icon: MdRedo,
|
|
@@ -16797,14 +16797,14 @@ Reason: ${issue.message}
|
|
|
16797
16797
|
onClick: () => editor.chain().focus().redo().run(),
|
|
16798
16798
|
disabled: !editor.can().redo()
|
|
16799
16799
|
}
|
|
16800
|
-
), /* @__PURE__ */
|
|
16800
|
+
), /* @__PURE__ */ React10.createElement(
|
|
16801
16801
|
ToolbarButton_default,
|
|
16802
16802
|
{
|
|
16803
16803
|
icon: MdRefresh,
|
|
16804
16804
|
label: "Reset Formatting",
|
|
16805
16805
|
onClick: () => editor.chain().focus().unsetAllMarks().clearNodes().run()
|
|
16806
16806
|
}
|
|
16807
|
-
), /* @__PURE__ */
|
|
16807
|
+
), /* @__PURE__ */ React10.createElement(
|
|
16808
16808
|
ToolbarButton_default,
|
|
16809
16809
|
{
|
|
16810
16810
|
icon: MdCode,
|
|
@@ -16812,14 +16812,14 @@ Reason: ${issue.message}
|
|
|
16812
16812
|
onClick: () => editor.chain().focus().toggleCodeBlock().run(),
|
|
16813
16813
|
isActive: editor.isActive("codeBlock")
|
|
16814
16814
|
}
|
|
16815
|
-
), /* @__PURE__ */
|
|
16815
|
+
), /* @__PURE__ */ React10.createElement(
|
|
16816
16816
|
ToolbarButton_default,
|
|
16817
16817
|
{
|
|
16818
16818
|
icon: MdVisibility,
|
|
16819
16819
|
label: "Preview",
|
|
16820
16820
|
onClick: handlePreview
|
|
16821
16821
|
}
|
|
16822
|
-
), /* @__PURE__ */
|
|
16822
|
+
), /* @__PURE__ */ React10.createElement(
|
|
16823
16823
|
ToolbarButton_default,
|
|
16824
16824
|
{
|
|
16825
16825
|
icon: MdSpellcheck,
|
|
@@ -16832,7 +16832,7 @@ Reason: ${issue.message}
|
|
|
16832
16832
|
// src/components/tetrons/toolbar/FileGroup.tsx
|
|
16833
16833
|
import { FaRegFolderOpen } from "react-icons/fa";
|
|
16834
16834
|
import { VscNewFile } from "react-icons/vsc";
|
|
16835
|
-
import
|
|
16835
|
+
import React11, { useRef as useRef5 } from "react";
|
|
16836
16836
|
function FileGroup({ editor }) {
|
|
16837
16837
|
const fileInputRef = useRef5(null);
|
|
16838
16838
|
const handleNew = () => {
|
|
@@ -16861,7 +16861,7 @@ function FileGroup({ editor }) {
|
|
|
16861
16861
|
e.target.value = "";
|
|
16862
16862
|
}
|
|
16863
16863
|
};
|
|
16864
|
-
return /* @__PURE__ */
|
|
16864
|
+
return /* @__PURE__ */ React11.createElement("div", { className: "file-group", role: "group", "aria-label": "File actions" }, /* @__PURE__ */ React11.createElement(
|
|
16865
16865
|
"input",
|
|
16866
16866
|
{
|
|
16867
16867
|
type: "file",
|
|
@@ -16871,7 +16871,7 @@ function FileGroup({ editor }) {
|
|
|
16871
16871
|
className: "hidden",
|
|
16872
16872
|
"aria-label": "Open JSON file"
|
|
16873
16873
|
}
|
|
16874
|
-
), /* @__PURE__ */
|
|
16874
|
+
), /* @__PURE__ */ React11.createElement(ToolbarButton_default, { icon: VscNewFile, onClick: handleNew, title: "New" }), /* @__PURE__ */ React11.createElement(
|
|
16875
16875
|
ToolbarButton_default,
|
|
16876
16876
|
{
|
|
16877
16877
|
icon: FaRegFolderOpen,
|
|
@@ -16882,7 +16882,7 @@ function FileGroup({ editor }) {
|
|
|
16882
16882
|
}
|
|
16883
16883
|
|
|
16884
16884
|
// src/components/tetrons/toolbar/AIGroup.tsx
|
|
16885
|
-
import
|
|
16885
|
+
import React12, { useState as useState7, useRef as useRef6 } from "react";
|
|
16886
16886
|
import { FaMicrophone, FaStop } from "react-icons/fa";
|
|
16887
16887
|
import { Waveform } from "@uiball/loaders";
|
|
16888
16888
|
import { motion, AnimatePresence } from "framer-motion";
|
|
@@ -16969,7 +16969,7 @@ function AiGroup({ editor }) {
|
|
|
16969
16969
|
setIsLoadingAI(false);
|
|
16970
16970
|
}
|
|
16971
16971
|
};
|
|
16972
|
-
return /* @__PURE__ */
|
|
16972
|
+
return /* @__PURE__ */ React12.createElement("div", { className: "group relative space-y-3" }, /* @__PURE__ */ React12.createElement("div", { className: "flex gap-2 items-center" }, !isRecording ? /* @__PURE__ */ React12.createElement(
|
|
16973
16973
|
"button",
|
|
16974
16974
|
{
|
|
16975
16975
|
type: "button",
|
|
@@ -16977,8 +16977,8 @@ function AiGroup({ editor }) {
|
|
|
16977
16977
|
className: "icon-btn",
|
|
16978
16978
|
title: "Start Voice Input"
|
|
16979
16979
|
},
|
|
16980
|
-
/* @__PURE__ */
|
|
16981
|
-
) : /* @__PURE__ */
|
|
16980
|
+
/* @__PURE__ */ React12.createElement(FaMicrophone, { size: 18 })
|
|
16981
|
+
) : /* @__PURE__ */ React12.createElement(
|
|
16982
16982
|
"button",
|
|
16983
16983
|
{
|
|
16984
16984
|
type: "button",
|
|
@@ -16986,8 +16986,8 @@ function AiGroup({ editor }) {
|
|
|
16986
16986
|
className: "icon-btn stop-btn",
|
|
16987
16987
|
title: "Stop Recording"
|
|
16988
16988
|
},
|
|
16989
|
-
/* @__PURE__ */
|
|
16990
|
-
), /* @__PURE__ */
|
|
16989
|
+
/* @__PURE__ */ React12.createElement(FaStop, { size: 18 })
|
|
16990
|
+
), /* @__PURE__ */ React12.createElement(
|
|
16991
16991
|
"button",
|
|
16992
16992
|
{
|
|
16993
16993
|
type: "button",
|
|
@@ -16996,7 +16996,7 @@ function AiGroup({ editor }) {
|
|
|
16996
16996
|
title: "AI Assist"
|
|
16997
16997
|
},
|
|
16998
16998
|
"AI"
|
|
16999
|
-
)), isRecording && /* @__PURE__ */
|
|
16999
|
+
)), isRecording && /* @__PURE__ */ React12.createElement("div", { className: "flex flex-col items-center" }, /* @__PURE__ */ React12.createElement(Waveform, { size: 30, lineWeight: 3.5, speed: 1, color: "#4F46E5" }), /* @__PURE__ */ React12.createElement("p", { className: "text-sm mt-1 text-gray-600" }, "Recording...")), isTranscribing && /* @__PURE__ */ React12.createElement("p", { className: "text-sm text-gray-500" }, "Transcribing..."), transcriptionError && /* @__PURE__ */ React12.createElement("p", { className: "text-sm text-red-600" }, transcriptionError), audioBlob && /* @__PURE__ */ React12.createElement("div", { className: "mt-2" }, /* @__PURE__ */ React12.createElement("audio", { controls: true, src: URL.createObjectURL(audioBlob) })), /* @__PURE__ */ React12.createElement(AnimatePresence, null, showPromptInput && /* @__PURE__ */ React12.createElement(
|
|
17000
17000
|
motion.div,
|
|
17001
17001
|
{
|
|
17002
17002
|
className: "ai-modal-backdrop",
|
|
@@ -17004,7 +17004,7 @@ function AiGroup({ editor }) {
|
|
|
17004
17004
|
animate: { opacity: 1 },
|
|
17005
17005
|
exit: { opacity: 0 }
|
|
17006
17006
|
},
|
|
17007
|
-
/* @__PURE__ */
|
|
17007
|
+
/* @__PURE__ */ React12.createElement(
|
|
17008
17008
|
motion.div,
|
|
17009
17009
|
{
|
|
17010
17010
|
className: "ai-modal-content",
|
|
@@ -17012,8 +17012,8 @@ function AiGroup({ editor }) {
|
|
|
17012
17012
|
animate: { scale: 1, opacity: 1 },
|
|
17013
17013
|
exit: { scale: 0.9, opacity: 0 }
|
|
17014
17014
|
},
|
|
17015
|
-
/* @__PURE__ */
|
|
17016
|
-
/* @__PURE__ */
|
|
17015
|
+
/* @__PURE__ */ React12.createElement("h2", { className: "ai-modal-title" }, "AI Prompt"),
|
|
17016
|
+
/* @__PURE__ */ React12.createElement(
|
|
17017
17017
|
"textarea",
|
|
17018
17018
|
{
|
|
17019
17019
|
className: "ai-modal-textarea",
|
|
@@ -17022,15 +17022,15 @@ function AiGroup({ editor }) {
|
|
|
17022
17022
|
placeholder: "Enter your prompt here..."
|
|
17023
17023
|
}
|
|
17024
17024
|
),
|
|
17025
|
-
aiError && /* @__PURE__ */
|
|
17026
|
-
/* @__PURE__ */
|
|
17025
|
+
aiError && /* @__PURE__ */ React12.createElement("p", { className: "ai-modal-error" }, aiError),
|
|
17026
|
+
/* @__PURE__ */ React12.createElement("div", { className: "ai-modal-actions" }, /* @__PURE__ */ React12.createElement(
|
|
17027
17027
|
"button",
|
|
17028
17028
|
{
|
|
17029
17029
|
onClick: () => setShowPromptInput(false),
|
|
17030
17030
|
className: "ai-cancel-btn"
|
|
17031
17031
|
},
|
|
17032
17032
|
"Cancel"
|
|
17033
|
-
), /* @__PURE__ */
|
|
17033
|
+
), /* @__PURE__ */ React12.createElement(
|
|
17034
17034
|
"button",
|
|
17035
17035
|
{
|
|
17036
17036
|
onClick: handlePromptSubmit,
|
|
@@ -17153,6 +17153,7 @@ function TetronsToolbar({
|
|
|
17153
17153
|
editor.off("update", handleUpdate);
|
|
17154
17154
|
};
|
|
17155
17155
|
}, [autoSave, editor]);
|
|
17156
|
+
const effectiveAddOns = version === "platinum" ? [...addOns, "math", "code"] : addOns;
|
|
17156
17157
|
return /* @__PURE__ */ React16.createElement("div", { className: "tetrons-toolbar" }, version !== "free" && /* @__PURE__ */ React16.createElement("div", { className: "group" }, /* @__PURE__ */ React16.createElement(
|
|
17157
17158
|
"input",
|
|
17158
17159
|
{
|
|
@@ -17161,7 +17162,7 @@ function TetronsToolbar({
|
|
|
17161
17162
|
checked: autoSave,
|
|
17162
17163
|
onChange: (e) => setAutoSave(e.target.checked)
|
|
17163
17164
|
}
|
|
17164
|
-
), /* @__PURE__ */ React16.createElement("label", { htmlFor: "autoSave" }, "Auto Save")), ["pro", "premium", "platinum"].includes(version) && /* @__PURE__ */ React16.createElement(FileGroup, { editor }), /* @__PURE__ */ React16.createElement(ClipboardGroup, { editor }), /* @__PURE__ */ React16.createElement(FontStyleGroup, { editor }), /* @__PURE__ */ React16.createElement(ListAlignGroup, { editor }), ["premium", "platinum"].includes(version) && /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(InsertGroup, { editor }), /* @__PURE__ */ React16.createElement(ActionGroup, { editor })), version === "platinum" && /* @__PURE__ */ React16.createElement(
|
|
17165
|
+
), /* @__PURE__ */ React16.createElement("label", { htmlFor: "autoSave" }, "Auto Save")), ["pro", "premium", "platinum"].includes(version) && /* @__PURE__ */ React16.createElement(FileGroup, { editor }), /* @__PURE__ */ React16.createElement(ClipboardGroup, { editor }), /* @__PURE__ */ React16.createElement(FontStyleGroup, { editor }), /* @__PURE__ */ React16.createElement(ListAlignGroup, { editor }), ["premium", "platinum"].includes(version) && /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(InsertGroup, { editor }), /* @__PURE__ */ React16.createElement(ActionGroup, { editor })), (["pro", "premium"].includes(version) && effectiveAddOns.includes("grammar") || version === "platinum") && /* @__PURE__ */ React16.createElement(MiscGroup, { editor }), (version === "premium" && effectiveAddOns.includes("ai") || version === "platinum") && /* @__PURE__ */ React16.createElement(AiGroup, { editor }), effectiveAddOns.length > 0 && /* @__PURE__ */ React16.createElement(AddOnGroup_default, { editor }));
|
|
17165
17166
|
}
|
|
17166
17167
|
|
|
17167
17168
|
// src/components/tetrons/EditorContent.tsx
|