@editorcn/editor 0.3.9 → 0.4.0
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 +358 -512
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -4
- package/dist/index.d.ts +1 -4
- package/dist/index.js +313 -466
- package/dist/index.js.map +1 -1
- package/dist/style.css +1314 -1415
- package/package.json +62 -67
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/rte-text-editor.tsx
|
|
2
2
|
import { Tooltip as TooltipPrimitive2 } from "@base-ui/react/tooltip";
|
|
3
|
-
import { useEffect as useEffect6, useMemo as useMemo2, useState as
|
|
3
|
+
import { useEffect as useEffect6, useMemo as useMemo2, useState as useState8 } from "react";
|
|
4
4
|
|
|
5
5
|
// src/bubble-menu/index.tsx
|
|
6
6
|
import { isTextSelection } from "@tiptap/core";
|
|
@@ -649,53 +649,6 @@ var useEditorState = (editor, selector, isEqual = defaultEqual) => {
|
|
|
649
649
|
const getSnapshot = useCallback2(() => snapshotRef.current.value, []);
|
|
650
650
|
return useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
|
|
651
651
|
};
|
|
652
|
-
var CODE_BLOCK_LANGUAGES = [
|
|
653
|
-
"javascript",
|
|
654
|
-
"typescript",
|
|
655
|
-
"html",
|
|
656
|
-
"css",
|
|
657
|
-
"json",
|
|
658
|
-
"python",
|
|
659
|
-
"rust",
|
|
660
|
-
"go",
|
|
661
|
-
"java",
|
|
662
|
-
"c",
|
|
663
|
-
"cpp",
|
|
664
|
-
"ruby",
|
|
665
|
-
"php",
|
|
666
|
-
"swift",
|
|
667
|
-
"kotlin",
|
|
668
|
-
"sql",
|
|
669
|
-
"bash",
|
|
670
|
-
"markdown",
|
|
671
|
-
"yaml",
|
|
672
|
-
"xml",
|
|
673
|
-
"plaintext"
|
|
674
|
-
];
|
|
675
|
-
var CODE_BLOCK_LANGUAGE_LABELS = {
|
|
676
|
-
bash: "Bash",
|
|
677
|
-
c: "C",
|
|
678
|
-
cpp: "C++",
|
|
679
|
-
css: "CSS",
|
|
680
|
-
go: "Go",
|
|
681
|
-
html: "HTML",
|
|
682
|
-
java: "Java",
|
|
683
|
-
javascript: "JavaScript",
|
|
684
|
-
json: "JSON",
|
|
685
|
-
kotlin: "Kotlin",
|
|
686
|
-
markdown: "Markdown",
|
|
687
|
-
php: "PHP",
|
|
688
|
-
plaintext: "Plain Text",
|
|
689
|
-
python: "Python",
|
|
690
|
-
ruby: "Ruby",
|
|
691
|
-
rust: "Rust",
|
|
692
|
-
sql: "SQL",
|
|
693
|
-
swift: "Swift",
|
|
694
|
-
typescript: "TypeScript",
|
|
695
|
-
xml: "XML",
|
|
696
|
-
yaml: "YAML"
|
|
697
|
-
};
|
|
698
|
-
var getLanguageLabel = (lang) => CODE_BLOCK_LANGUAGE_LABELS[lang] ?? lang;
|
|
699
652
|
|
|
700
653
|
// src/bubble-menu/color-selector.tsx
|
|
701
654
|
import { Fragment, jsx as jsx17, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
@@ -886,115 +839,12 @@ var ColorSelector = ({ editor }) => {
|
|
|
886
839
|
] });
|
|
887
840
|
};
|
|
888
841
|
|
|
889
|
-
// src/bubble-menu/language-selector.tsx
|
|
890
|
-
import { useState as useState3 } from "react";
|
|
891
|
-
|
|
892
|
-
// src/rte-context.ts
|
|
893
|
-
import { createContext, useContext } from "react";
|
|
894
|
-
var RichTextEditorContext = createContext(null);
|
|
895
|
-
var useRichTextEditorContext = () => {
|
|
896
|
-
const context = useContext(RichTextEditorContext);
|
|
897
|
-
if (!context) {
|
|
898
|
-
throw new Error(
|
|
899
|
-
"useRichTextEditorContext must be used within RichTextEditor"
|
|
900
|
-
);
|
|
901
|
-
}
|
|
902
|
-
return context;
|
|
903
|
-
};
|
|
904
|
-
|
|
905
|
-
// src/bubble-menu/language-selector.tsx
|
|
906
|
-
import { Fragment as Fragment2, jsx as jsx18, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
907
|
-
var FallbackIcon = () => /* @__PURE__ */ jsxs6(
|
|
908
|
-
"svg",
|
|
909
|
-
{
|
|
910
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
911
|
-
viewBox: "0 0 24 24",
|
|
912
|
-
fill: "none",
|
|
913
|
-
stroke: "currentColor",
|
|
914
|
-
strokeWidth: 2,
|
|
915
|
-
strokeLinecap: "round",
|
|
916
|
-
strokeLinejoin: "round",
|
|
917
|
-
className: "rte-editor-icon",
|
|
918
|
-
children: [
|
|
919
|
-
/* @__PURE__ */ jsx18("polyline", { points: "16 18 22 12 16 6" }),
|
|
920
|
-
/* @__PURE__ */ jsx18("polyline", { points: "8 6 2 12 8 18" })
|
|
921
|
-
]
|
|
922
|
-
}
|
|
923
|
-
);
|
|
924
|
-
var LanguageSelector = ({ editor }) => {
|
|
925
|
-
const [open, setOpen] = useState3(false);
|
|
926
|
-
const { icons } = useRichTextEditorContext();
|
|
927
|
-
const { currentLanguage } = useEditorState(
|
|
928
|
-
editor,
|
|
929
|
-
(ed) => ({
|
|
930
|
-
currentLanguage: ed.getAttributes("codeBlock").language || "javascript"
|
|
931
|
-
}),
|
|
932
|
-
shallowEqual
|
|
933
|
-
);
|
|
934
|
-
const langIcon = icons.languageIcons[currentLanguage] ?? /* @__PURE__ */ jsx18(FallbackIcon, {});
|
|
935
|
-
return /* @__PURE__ */ jsxs6("div", { style: { position: "relative" }, children: [
|
|
936
|
-
/* @__PURE__ */ jsxs6(
|
|
937
|
-
RteButton,
|
|
938
|
-
{
|
|
939
|
-
onMouseDown: (e) => e.preventDefault(),
|
|
940
|
-
onClick: () => setOpen(!open),
|
|
941
|
-
children: [
|
|
942
|
-
/* @__PURE__ */ jsx18(RteIcon, { children: langIcon }),
|
|
943
|
-
/* @__PURE__ */ jsx18("span", { className: "rte-bubble-btn-text", children: getLanguageLabel(currentLanguage) }),
|
|
944
|
-
/* @__PURE__ */ jsx18(RteIcon, { style: { height: 12, width: 12 }, children: /* @__PURE__ */ jsx18(
|
|
945
|
-
"svg",
|
|
946
|
-
{
|
|
947
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
948
|
-
viewBox: "0 0 24 24",
|
|
949
|
-
fill: "none",
|
|
950
|
-
stroke: "currentColor",
|
|
951
|
-
strokeWidth: 2,
|
|
952
|
-
strokeLinecap: "round",
|
|
953
|
-
strokeLinejoin: "round",
|
|
954
|
-
children: /* @__PURE__ */ jsx18("path", { d: "m6 9 6 6 6-6" })
|
|
955
|
-
}
|
|
956
|
-
) })
|
|
957
|
-
]
|
|
958
|
-
}
|
|
959
|
-
),
|
|
960
|
-
open && /* @__PURE__ */ jsxs6(Fragment2, { children: [
|
|
961
|
-
/* @__PURE__ */ jsx18(
|
|
962
|
-
RteOverlay,
|
|
963
|
-
{
|
|
964
|
-
onClick: () => setOpen(false),
|
|
965
|
-
onKeyDown: (e) => {
|
|
966
|
-
if (e.key === "Escape") {
|
|
967
|
-
setOpen(false);
|
|
968
|
-
}
|
|
969
|
-
}
|
|
970
|
-
}
|
|
971
|
-
),
|
|
972
|
-
/* @__PURE__ */ jsx18(RteDropdown, { variant: "language", children: CODE_BLOCK_LANGUAGES.map((lang) => /* @__PURE__ */ jsxs6(
|
|
973
|
-
RteDropdownItem,
|
|
974
|
-
{
|
|
975
|
-
active: currentLanguage === lang,
|
|
976
|
-
onMouseDown: (e) => e.preventDefault(),
|
|
977
|
-
onClick: () => {
|
|
978
|
-
editor.chain().focus().updateAttributes("codeBlock", { language: lang }).run();
|
|
979
|
-
setOpen(false);
|
|
980
|
-
},
|
|
981
|
-
children: [
|
|
982
|
-
/* @__PURE__ */ jsx18(RteDropdownIcon, { children: icons.languageIcons[lang] ?? /* @__PURE__ */ jsx18(FallbackIcon, {}) }),
|
|
983
|
-
/* @__PURE__ */ jsx18("span", { children: getLanguageLabel(lang) })
|
|
984
|
-
]
|
|
985
|
-
},
|
|
986
|
-
lang
|
|
987
|
-
)) })
|
|
988
|
-
] })
|
|
989
|
-
] });
|
|
990
|
-
};
|
|
991
|
-
|
|
992
842
|
// src/bubble-menu/text-buttons.tsx
|
|
993
|
-
import { jsx as
|
|
843
|
+
import { jsx as jsx18, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
994
844
|
var Svg = ({
|
|
995
845
|
children,
|
|
996
846
|
strokeWidth = 2
|
|
997
|
-
}) => /* @__PURE__ */
|
|
847
|
+
}) => /* @__PURE__ */ jsx18(
|
|
998
848
|
"svg",
|
|
999
849
|
{
|
|
1000
850
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1008,47 +858,47 @@ var Svg = ({
|
|
|
1008
858
|
children
|
|
1009
859
|
}
|
|
1010
860
|
);
|
|
1011
|
-
var Icon = ({ children }) => /* @__PURE__ */
|
|
861
|
+
var Icon = ({ children }) => /* @__PURE__ */ jsx18(RteIcon, { children });
|
|
1012
862
|
var textItems = [
|
|
1013
863
|
{
|
|
1014
864
|
command: (e) => e.chain().focus().toggleBold().run(),
|
|
1015
|
-
icon: /* @__PURE__ */
|
|
1016
|
-
/* @__PURE__ */
|
|
1017
|
-
/* @__PURE__ */
|
|
865
|
+
icon: /* @__PURE__ */ jsx18(Icon, { children: /* @__PURE__ */ jsxs6(Svg, { children: [
|
|
866
|
+
/* @__PURE__ */ jsx18("path", { d: "M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z" }),
|
|
867
|
+
/* @__PURE__ */ jsx18("path", { d: "M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z" })
|
|
1018
868
|
] }) }),
|
|
1019
869
|
isActive: (s) => s.isBold
|
|
1020
870
|
},
|
|
1021
871
|
{
|
|
1022
872
|
command: (e) => e.chain().focus().toggleItalic().run(),
|
|
1023
|
-
icon: /* @__PURE__ */
|
|
1024
|
-
/* @__PURE__ */
|
|
1025
|
-
/* @__PURE__ */
|
|
1026
|
-
/* @__PURE__ */
|
|
873
|
+
icon: /* @__PURE__ */ jsx18(Icon, { children: /* @__PURE__ */ jsxs6(Svg, { children: [
|
|
874
|
+
/* @__PURE__ */ jsx18("line", { x1: "19", y1: "4", x2: "10", y2: "4" }),
|
|
875
|
+
/* @__PURE__ */ jsx18("line", { x1: "14", y1: "20", x2: "5", y2: "20" }),
|
|
876
|
+
/* @__PURE__ */ jsx18("line", { x1: "15", y1: "4", x2: "9", y2: "20" })
|
|
1027
877
|
] }) }),
|
|
1028
878
|
isActive: (s) => s.isItalic
|
|
1029
879
|
},
|
|
1030
880
|
{
|
|
1031
881
|
command: (e) => e.chain().focus().toggleUnderline().run(),
|
|
1032
|
-
icon: /* @__PURE__ */
|
|
1033
|
-
/* @__PURE__ */
|
|
1034
|
-
/* @__PURE__ */
|
|
882
|
+
icon: /* @__PURE__ */ jsx18(Icon, { children: /* @__PURE__ */ jsxs6(Svg, { children: [
|
|
883
|
+
/* @__PURE__ */ jsx18("path", { d: "M6 4v6a6 6 0 0 0 12 0V4" }),
|
|
884
|
+
/* @__PURE__ */ jsx18("line", { x1: "4", y1: "20", x2: "20", y2: "20" })
|
|
1035
885
|
] }) }),
|
|
1036
886
|
isActive: (s) => s.isUnderline
|
|
1037
887
|
},
|
|
1038
888
|
{
|
|
1039
889
|
command: (e) => e.chain().focus().toggleStrike().run(),
|
|
1040
|
-
icon: /* @__PURE__ */
|
|
1041
|
-
/* @__PURE__ */
|
|
1042
|
-
/* @__PURE__ */
|
|
1043
|
-
/* @__PURE__ */
|
|
890
|
+
icon: /* @__PURE__ */ jsx18(Icon, { children: /* @__PURE__ */ jsxs6(Svg, { children: [
|
|
891
|
+
/* @__PURE__ */ jsx18("path", { d: "M16 4H9.5a3.5 3.5 0 0 0-2.9 5.4" }),
|
|
892
|
+
/* @__PURE__ */ jsx18("path", { d: "M14.5 14.6a3.5 3.5 0 0 1-2.9 5.4H8" }),
|
|
893
|
+
/* @__PURE__ */ jsx18("line", { x1: "4", y1: "12", x2: "20", y2: "12" })
|
|
1044
894
|
] }) }),
|
|
1045
895
|
isActive: (s) => s.isStrike
|
|
1046
896
|
},
|
|
1047
897
|
{
|
|
1048
898
|
command: (e) => e.chain().focus().toggleCode().run(),
|
|
1049
|
-
icon: /* @__PURE__ */
|
|
1050
|
-
/* @__PURE__ */
|
|
1051
|
-
/* @__PURE__ */
|
|
899
|
+
icon: /* @__PURE__ */ jsx18(Icon, { children: /* @__PURE__ */ jsxs6(Svg, { children: [
|
|
900
|
+
/* @__PURE__ */ jsx18("polyline", { points: "16 18 22 12 16 6" }),
|
|
901
|
+
/* @__PURE__ */ jsx18("polyline", { points: "8 6 2 12 8 18" })
|
|
1052
902
|
] }) }),
|
|
1053
903
|
isActive: (s) => s.isCode
|
|
1054
904
|
}
|
|
@@ -1065,7 +915,7 @@ var TextButtons = ({ editor }) => {
|
|
|
1065
915
|
}),
|
|
1066
916
|
shallowEqual
|
|
1067
917
|
);
|
|
1068
|
-
return /* @__PURE__ */
|
|
918
|
+
return /* @__PURE__ */ jsx18(RteButtonGroup, { children: textItems.map((item, i) => /* @__PURE__ */ jsx18(
|
|
1069
919
|
RteButton,
|
|
1070
920
|
{
|
|
1071
921
|
active: item.isActive(editorState),
|
|
@@ -1078,15 +928,8 @@ var TextButtons = ({ editor }) => {
|
|
|
1078
928
|
};
|
|
1079
929
|
|
|
1080
930
|
// src/bubble-menu/index.tsx
|
|
1081
|
-
import {
|
|
931
|
+
import { jsx as jsx19, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1082
932
|
var BubbleMenu = ({ editor }) => {
|
|
1083
|
-
const editorState = useEditorState(
|
|
1084
|
-
editor,
|
|
1085
|
-
(ed) => ({
|
|
1086
|
-
isCodeBlock: ed.isActive("codeBlock")
|
|
1087
|
-
}),
|
|
1088
|
-
shallowEqual
|
|
1089
|
-
);
|
|
1090
933
|
const shouldShow = useCallback3(
|
|
1091
934
|
({
|
|
1092
935
|
editor: ed,
|
|
@@ -1096,7 +939,7 @@ var BubbleMenu = ({ editor }) => {
|
|
|
1096
939
|
if (!ed.isEditable) {
|
|
1097
940
|
return false;
|
|
1098
941
|
}
|
|
1099
|
-
if (selection.empty
|
|
942
|
+
if (selection.empty || ed.isActive("codeBlock")) {
|
|
1100
943
|
return false;
|
|
1101
944
|
}
|
|
1102
945
|
if (!selection.empty && !isTextSelection(selection)) {
|
|
@@ -1109,18 +952,17 @@ var BubbleMenu = ({ editor }) => {
|
|
|
1109
952
|
if (!editor) {
|
|
1110
953
|
return null;
|
|
1111
954
|
}
|
|
1112
|
-
|
|
1113
|
-
return /* @__PURE__ */ jsx20(
|
|
955
|
+
return /* @__PURE__ */ jsx19(
|
|
1114
956
|
TiptapBubbleMenu,
|
|
1115
957
|
{
|
|
1116
958
|
editor,
|
|
1117
959
|
options: { offset: 8, placement: "top" },
|
|
1118
960
|
shouldShow,
|
|
1119
|
-
children: /* @__PURE__ */
|
|
1120
|
-
/* @__PURE__ */
|
|
1121
|
-
/* @__PURE__ */
|
|
1122
|
-
/* @__PURE__ */
|
|
1123
|
-
] })
|
|
961
|
+
children: /* @__PURE__ */ jsxs7("div", { className: "rte-bubble-menu", children: [
|
|
962
|
+
/* @__PURE__ */ jsx19(TextButtons, { editor }),
|
|
963
|
+
/* @__PURE__ */ jsx19(RteSeparator, {}),
|
|
964
|
+
/* @__PURE__ */ jsx19(ColorSelector, { editor })
|
|
965
|
+
] })
|
|
1124
966
|
}
|
|
1125
967
|
);
|
|
1126
968
|
};
|
|
@@ -1128,7 +970,22 @@ var BubbleMenu = ({ editor }) => {
|
|
|
1128
970
|
// src/controls/rte-control.tsx
|
|
1129
971
|
import { useEditorState as useEditorState2 } from "@tiptap/react";
|
|
1130
972
|
import { useContext as useContext2 } from "react";
|
|
1131
|
-
|
|
973
|
+
|
|
974
|
+
// src/rte-context.ts
|
|
975
|
+
import { createContext, useContext } from "react";
|
|
976
|
+
var RichTextEditorContext = createContext(null);
|
|
977
|
+
var useRichTextEditorContext = () => {
|
|
978
|
+
const context = useContext(RichTextEditorContext);
|
|
979
|
+
if (!context) {
|
|
980
|
+
throw new Error(
|
|
981
|
+
"useRichTextEditorContext must be used within RichTextEditor"
|
|
982
|
+
);
|
|
983
|
+
}
|
|
984
|
+
return context;
|
|
985
|
+
};
|
|
986
|
+
|
|
987
|
+
// src/controls/rte-control.tsx
|
|
988
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
1132
989
|
var RichTextEditorTooltip = ({
|
|
1133
990
|
children,
|
|
1134
991
|
label
|
|
@@ -1137,7 +994,7 @@ var RichTextEditorTooltip = ({
|
|
|
1137
994
|
if (!tooltip) {
|
|
1138
995
|
return children;
|
|
1139
996
|
}
|
|
1140
|
-
return /* @__PURE__ */
|
|
997
|
+
return /* @__PURE__ */ jsx20(TooltipTrigger, { handle: tooltip, payload: label, render: children });
|
|
1141
998
|
};
|
|
1142
999
|
var RichTextEditorControl = ({
|
|
1143
1000
|
active = false,
|
|
@@ -1149,7 +1006,7 @@ var RichTextEditorControl = ({
|
|
|
1149
1006
|
disabled,
|
|
1150
1007
|
...props
|
|
1151
1008
|
}) => {
|
|
1152
|
-
const toggle = /* @__PURE__ */
|
|
1009
|
+
const toggle = /* @__PURE__ */ jsx20(
|
|
1153
1010
|
Toggle,
|
|
1154
1011
|
{
|
|
1155
1012
|
size: "sm",
|
|
@@ -1165,7 +1022,7 @@ var RichTextEditorControl = ({
|
|
|
1165
1022
|
children
|
|
1166
1023
|
}
|
|
1167
1024
|
);
|
|
1168
|
-
return props.title ? /* @__PURE__ */
|
|
1025
|
+
return props.title ? /* @__PURE__ */ jsx20(RichTextEditorTooltip, { label: props.title, children: toggle }) : toggle;
|
|
1169
1026
|
};
|
|
1170
1027
|
var resolveIsActive = (editor, config) => {
|
|
1171
1028
|
if (!editor || !config) {
|
|
@@ -1196,7 +1053,7 @@ var createControl = ({
|
|
|
1196
1053
|
const selector = createSelector(isActive, isDisabled);
|
|
1197
1054
|
useEditorState2({ editor: editor ?? null, selector });
|
|
1198
1055
|
const { active, disabled } = selector({ editor: editor ?? null });
|
|
1199
|
-
return /* @__PURE__ */
|
|
1056
|
+
return /* @__PURE__ */ jsx20(
|
|
1200
1057
|
RichTextEditorControl,
|
|
1201
1058
|
{
|
|
1202
1059
|
active,
|
|
@@ -1383,12 +1240,12 @@ var SuperscriptControl = createControl({
|
|
|
1383
1240
|
// src/controls/rte-link-control.tsx
|
|
1384
1241
|
import { useEditorState as useEditorState3 } from "@tiptap/react";
|
|
1385
1242
|
import * as React15 from "react";
|
|
1386
|
-
import { useCallback as useCallback4, useState as
|
|
1387
|
-
import { jsx as
|
|
1243
|
+
import { useCallback as useCallback4, useState as useState3 } from "react";
|
|
1244
|
+
import { jsx as jsx21, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1388
1245
|
var LinkControl = () => {
|
|
1389
1246
|
const { editor, icons, labels, tooltip } = useRichTextEditorContext();
|
|
1390
|
-
const [url, setUrl] =
|
|
1391
|
-
const [open, setOpen] =
|
|
1247
|
+
const [url, setUrl] = useState3("");
|
|
1248
|
+
const [open, setOpen] = useState3(false);
|
|
1392
1249
|
const active = useEditorState3({
|
|
1393
1250
|
editor: editor ?? null,
|
|
1394
1251
|
selector: (ctx) => ctx.editor && !ctx.editor.isDestroyed ? ctx.editor.isActive("link") : false
|
|
@@ -1428,16 +1285,16 @@ var LinkControl = () => {
|
|
|
1428
1285
|
window.addEventListener("edit-link", handler);
|
|
1429
1286
|
return () => window.removeEventListener("edit-link", handler);
|
|
1430
1287
|
}, [handleOpen]);
|
|
1431
|
-
return /* @__PURE__ */
|
|
1432
|
-
/* @__PURE__ */
|
|
1288
|
+
return /* @__PURE__ */ jsxs8(Popover, { open, onOpenChange: handleOpen, children: [
|
|
1289
|
+
/* @__PURE__ */ jsx21(
|
|
1433
1290
|
TooltipTrigger,
|
|
1434
1291
|
{
|
|
1435
1292
|
handle: tooltip,
|
|
1436
1293
|
payload: labels.linkControlLabel,
|
|
1437
|
-
render: /* @__PURE__ */
|
|
1294
|
+
render: /* @__PURE__ */ jsx21(
|
|
1438
1295
|
PopoverTrigger,
|
|
1439
1296
|
{
|
|
1440
|
-
render: /* @__PURE__ */
|
|
1297
|
+
render: /* @__PURE__ */ jsx21(
|
|
1441
1298
|
Toggle,
|
|
1442
1299
|
{
|
|
1443
1300
|
size: "sm",
|
|
@@ -1452,8 +1309,8 @@ var LinkControl = () => {
|
|
|
1452
1309
|
)
|
|
1453
1310
|
}
|
|
1454
1311
|
),
|
|
1455
|
-
/* @__PURE__ */
|
|
1456
|
-
/* @__PURE__ */
|
|
1312
|
+
/* @__PURE__ */ jsx21(PopoverContent, { className: "w-72 p-3", children: /* @__PURE__ */ jsxs8("div", { className: "rte-link-editor", children: [
|
|
1313
|
+
/* @__PURE__ */ jsx21(
|
|
1457
1314
|
Input,
|
|
1458
1315
|
{
|
|
1459
1316
|
type: "url",
|
|
@@ -1465,7 +1322,7 @@ var LinkControl = () => {
|
|
|
1465
1322
|
className: "rte-link-editor-input h-8 text-sm"
|
|
1466
1323
|
}
|
|
1467
1324
|
),
|
|
1468
|
-
/* @__PURE__ */
|
|
1325
|
+
/* @__PURE__ */ jsx21(
|
|
1469
1326
|
Button,
|
|
1470
1327
|
{
|
|
1471
1328
|
size: "sm",
|
|
@@ -1487,11 +1344,11 @@ import {
|
|
|
1487
1344
|
parseAttributes
|
|
1488
1345
|
} from "@tiptap/core";
|
|
1489
1346
|
import { ReactNodeViewRenderer, useEditorState as useEditorState4 } from "@tiptap/react";
|
|
1490
|
-
import { useState as
|
|
1347
|
+
import { useState as useState5, useCallback as useCallback6, useEffect as useEffect4, useRef as useRef4 } from "react";
|
|
1491
1348
|
|
|
1492
1349
|
// src/extensions/resizable-node-view.tsx
|
|
1493
1350
|
import { NodeViewWrapper } from "@tiptap/react";
|
|
1494
|
-
import { useCallback as useCallback5, useEffect as useEffect3, useRef as useRef3, useState as
|
|
1351
|
+
import { useCallback as useCallback5, useEffect as useEffect3, useRef as useRef3, useState as useState4 } from "react";
|
|
1495
1352
|
|
|
1496
1353
|
// src/icons.tsx
|
|
1497
1354
|
import {
|
|
@@ -1528,11 +1385,11 @@ import "react";
|
|
|
1528
1385
|
|
|
1529
1386
|
// src/language-icons.tsx
|
|
1530
1387
|
import "react";
|
|
1531
|
-
import { jsx as
|
|
1388
|
+
import { jsx as jsx22, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1532
1389
|
var LangIcon = ({
|
|
1533
1390
|
children,
|
|
1534
1391
|
className
|
|
1535
|
-
}) => /* @__PURE__ */
|
|
1392
|
+
}) => /* @__PURE__ */ jsx22(
|
|
1536
1393
|
"svg",
|
|
1537
1394
|
{
|
|
1538
1395
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1547,140 +1404,140 @@ var LangIcon = ({
|
|
|
1547
1404
|
}
|
|
1548
1405
|
);
|
|
1549
1406
|
var DEFAULT_LANGUAGE_ICONS = {
|
|
1550
|
-
bash: /* @__PURE__ */
|
|
1551
|
-
/* @__PURE__ */
|
|
1552
|
-
/* @__PURE__ */
|
|
1553
|
-
/* @__PURE__ */
|
|
1407
|
+
bash: /* @__PURE__ */ jsxs9(LangIcon, { children: [
|
|
1408
|
+
/* @__PURE__ */ jsx22("rect", { x: "2.5", y: "4", width: "19", height: "16", rx: "2" }),
|
|
1409
|
+
/* @__PURE__ */ jsx22("path", { d: "M6.5 9.5l3.5 3-3.5 3" }),
|
|
1410
|
+
/* @__PURE__ */ jsx22("path", { d: "M12 15.5h5.5" })
|
|
1554
1411
|
] }),
|
|
1555
|
-
c: /* @__PURE__ */
|
|
1556
|
-
/* @__PURE__ */
|
|
1557
|
-
/* @__PURE__ */
|
|
1412
|
+
c: /* @__PURE__ */ jsxs9(LangIcon, { children: [
|
|
1413
|
+
/* @__PURE__ */ jsx22("circle", { cx: "12", cy: "12", r: "8.5" }),
|
|
1414
|
+
/* @__PURE__ */ jsx22("path", { d: "M15.6 9.3a4.5 4.5 0 1 0 0 5.4" })
|
|
1558
1415
|
] }),
|
|
1559
|
-
cpp: /* @__PURE__ */
|
|
1560
|
-
/* @__PURE__ */
|
|
1561
|
-
/* @__PURE__ */
|
|
1562
|
-
/* @__PURE__ */
|
|
1563
|
-
/* @__PURE__ */
|
|
1416
|
+
cpp: /* @__PURE__ */ jsxs9(LangIcon, { children: [
|
|
1417
|
+
/* @__PURE__ */ jsx22("circle", { cx: "9.5", cy: "12", r: "6.5" }),
|
|
1418
|
+
/* @__PURE__ */ jsx22("path", { d: "M12.3 9.7a3.3 3.3 0 1 0 0 4.6" }),
|
|
1419
|
+
/* @__PURE__ */ jsx22("path", { d: "M15.7 10.5v3M14.2 12h3" }),
|
|
1420
|
+
/* @__PURE__ */ jsx22("path", { d: "M19.3 10.5v3M17.8 12h3" })
|
|
1564
1421
|
] }),
|
|
1565
|
-
css: /* @__PURE__ */
|
|
1566
|
-
/* @__PURE__ */
|
|
1567
|
-
/* @__PURE__ */
|
|
1568
|
-
/* @__PURE__ */
|
|
1569
|
-
/* @__PURE__ */
|
|
1570
|
-
/* @__PURE__ */
|
|
1422
|
+
css: /* @__PURE__ */ jsxs9(LangIcon, { children: [
|
|
1423
|
+
/* @__PURE__ */ jsx22("rect", { x: "3", y: "3", width: "18", height: "18", rx: "4" }),
|
|
1424
|
+
/* @__PURE__ */ jsx22("path", { d: "M9.7 7.5l-1 9" }),
|
|
1425
|
+
/* @__PURE__ */ jsx22("path", { d: "M15.3 7.5l-1 9" }),
|
|
1426
|
+
/* @__PURE__ */ jsx22("path", { d: "M7 10.3h11" }),
|
|
1427
|
+
/* @__PURE__ */ jsx22("path", { d: "M6.5 14.3h11" })
|
|
1571
1428
|
] }),
|
|
1572
|
-
go: /* @__PURE__ */
|
|
1573
|
-
/* @__PURE__ */
|
|
1574
|
-
/* @__PURE__ */
|
|
1575
|
-
/* @__PURE__ */
|
|
1576
|
-
/* @__PURE__ */
|
|
1429
|
+
go: /* @__PURE__ */ jsxs9(LangIcon, { children: [
|
|
1430
|
+
/* @__PURE__ */ jsx22("rect", { x: "3", y: "3", width: "18", height: "18", rx: "4" }),
|
|
1431
|
+
/* @__PURE__ */ jsx22("path", { d: "M12.6 9.7A3.3 3.3 0 1 0 12.6 14.3" }),
|
|
1432
|
+
/* @__PURE__ */ jsx22("path", { d: "M12.6 12h-1.9" }),
|
|
1433
|
+
/* @__PURE__ */ jsx22("circle", { cx: "17", cy: "12", r: "2.9" })
|
|
1577
1434
|
] }),
|
|
1578
|
-
html: /* @__PURE__ */
|
|
1579
|
-
/* @__PURE__ */
|
|
1580
|
-
/* @__PURE__ */
|
|
1581
|
-
/* @__PURE__ */
|
|
1582
|
-
/* @__PURE__ */
|
|
1435
|
+
html: /* @__PURE__ */ jsxs9(LangIcon, { children: [
|
|
1436
|
+
/* @__PURE__ */ jsx22("rect", { x: "3", y: "3", width: "18", height: "18", rx: "4" }),
|
|
1437
|
+
/* @__PURE__ */ jsx22("path", { d: "M9.5 8.5L6.5 12l3 3.5" }),
|
|
1438
|
+
/* @__PURE__ */ jsx22("path", { d: "M14.5 8.5L17.5 12l-3 3.5" }),
|
|
1439
|
+
/* @__PURE__ */ jsx22("path", { d: "M13 7.3l-2 9.4" })
|
|
1583
1440
|
] }),
|
|
1584
|
-
java: /* @__PURE__ */
|
|
1585
|
-
/* @__PURE__ */
|
|
1586
|
-
/* @__PURE__ */
|
|
1587
|
-
/* @__PURE__ */
|
|
1588
|
-
/* @__PURE__ */
|
|
1441
|
+
java: /* @__PURE__ */ jsxs9(LangIcon, { children: [
|
|
1442
|
+
/* @__PURE__ */ jsx22("path", { d: "M6 10h10v5a3 3 0 0 1-3 3H9a3 3 0 0 1-3-3v-5z" }),
|
|
1443
|
+
/* @__PURE__ */ jsx22("path", { d: "M16 12h1.3a1.8 1.8 0 0 1 0 3.6H16" }),
|
|
1444
|
+
/* @__PURE__ */ jsx22("path", { d: "M9.3 3.8c-.9.8-.9 1.6 0 2.4M13.3 3.8c-.9.8-.9 1.6 0 2.4" }),
|
|
1445
|
+
/* @__PURE__ */ jsx22("path", { d: "M6 19.3h10" })
|
|
1589
1446
|
] }),
|
|
1590
|
-
javascript: /* @__PURE__ */
|
|
1591
|
-
/* @__PURE__ */
|
|
1592
|
-
/* @__PURE__ */
|
|
1593
|
-
/* @__PURE__ */
|
|
1447
|
+
javascript: /* @__PURE__ */ jsxs9(LangIcon, { children: [
|
|
1448
|
+
/* @__PURE__ */ jsx22("rect", { x: "3", y: "3", width: "18", height: "18", rx: "4" }),
|
|
1449
|
+
/* @__PURE__ */ jsx22("path", { d: "M10.5 8v6.5a2 2 0 0 1-3.5 1.3" }),
|
|
1450
|
+
/* @__PURE__ */ jsx22("path", { d: "M17 8.8a2 2 0 0 0-2-.8c-1.1 0-2.2.6-2.2 1.7 0 1 .9 1.4 2.2 1.7 1.3.3 2.3.7 2.3 1.9 0 1.1-1 1.8-2.3 1.8a2.4 2.4 0 0 1-2.3-1.4" })
|
|
1594
1451
|
] }),
|
|
1595
|
-
json: /* @__PURE__ */
|
|
1596
|
-
/* @__PURE__ */
|
|
1597
|
-
/* @__PURE__ */
|
|
1452
|
+
json: /* @__PURE__ */ jsxs9(LangIcon, { children: [
|
|
1453
|
+
/* @__PURE__ */ jsx22("path", { d: "M8 3H7a2 2 0 0 0-2 2v4a2 2 0 0 1-2 2 2 2 0 0 1 2 2v4a2 2 0 0 0 2 2" }),
|
|
1454
|
+
/* @__PURE__ */ jsx22("path", { d: "M16 3h1a2 2 0 0 1 2 2v4a2 2 0 0 0 2 2 2 2 0 0 0-2 2v4a2 2 0 0 1-2 2" })
|
|
1598
1455
|
] }),
|
|
1599
|
-
kotlin: /* @__PURE__ */
|
|
1600
|
-
/* @__PURE__ */
|
|
1601
|
-
/* @__PURE__ */
|
|
1602
|
-
/* @__PURE__ */
|
|
1603
|
-
/* @__PURE__ */
|
|
1456
|
+
kotlin: /* @__PURE__ */ jsxs9(LangIcon, { children: [
|
|
1457
|
+
/* @__PURE__ */ jsx22("rect", { x: "3", y: "3", width: "18", height: "18", rx: "4" }),
|
|
1458
|
+
/* @__PURE__ */ jsx22("path", { d: "M9 7.5v9" }),
|
|
1459
|
+
/* @__PURE__ */ jsx22("path", { d: "M9 12l6-4.5" }),
|
|
1460
|
+
/* @__PURE__ */ jsx22("path", { d: "M9 12l6 4.5" })
|
|
1604
1461
|
] }),
|
|
1605
|
-
markdown: /* @__PURE__ */
|
|
1606
|
-
/* @__PURE__ */
|
|
1607
|
-
/* @__PURE__ */
|
|
1608
|
-
/* @__PURE__ */
|
|
1609
|
-
/* @__PURE__ */
|
|
1462
|
+
markdown: /* @__PURE__ */ jsxs9(LangIcon, { children: [
|
|
1463
|
+
/* @__PURE__ */ jsx22("rect", { x: "2", y: "5", width: "20", height: "14", rx: "2" }),
|
|
1464
|
+
/* @__PURE__ */ jsx22("path", { d: "M6 15V9l3 4 3-4v6" }),
|
|
1465
|
+
/* @__PURE__ */ jsx22("path", { d: "M16.5 9v6" }),
|
|
1466
|
+
/* @__PURE__ */ jsx22("path", { d: "M14.5 13l2 2 2-2" })
|
|
1610
1467
|
] }),
|
|
1611
|
-
php: /* @__PURE__ */
|
|
1612
|
-
/* @__PURE__ */
|
|
1613
|
-
/* @__PURE__ */
|
|
1614
|
-
/* @__PURE__ */
|
|
1615
|
-
/* @__PURE__ */
|
|
1468
|
+
php: /* @__PURE__ */ jsxs9(LangIcon, { children: [
|
|
1469
|
+
/* @__PURE__ */ jsx22("rect", { x: "3", y: "3", width: "18", height: "18", rx: "4" }),
|
|
1470
|
+
/* @__PURE__ */ jsx22("path", { d: "M11.5 8.5L7.5 12l4 3.5" }),
|
|
1471
|
+
/* @__PURE__ */ jsx22("path", { d: "M15.2 8.2c1.1 0 1.9.6 1.9 1.6 0 1.1-.9 1.5-1.8 1.8-.6.2-1 .5-1 1.1" }),
|
|
1472
|
+
/* @__PURE__ */ jsx22("circle", { cx: "14.3", cy: "16.2", r: ".5", fill: "currentColor", stroke: "none" })
|
|
1616
1473
|
] }),
|
|
1617
|
-
plaintext: /* @__PURE__ */
|
|
1618
|
-
/* @__PURE__ */
|
|
1619
|
-
/* @__PURE__ */
|
|
1620
|
-
/* @__PURE__ */
|
|
1621
|
-
/* @__PURE__ */
|
|
1474
|
+
plaintext: /* @__PURE__ */ jsxs9(LangIcon, { children: [
|
|
1475
|
+
/* @__PURE__ */ jsx22("rect", { x: "4", y: "2.5", width: "16", height: "19", rx: "2" }),
|
|
1476
|
+
/* @__PURE__ */ jsx22("line", { x1: "7.5", y1: "7.5", x2: "16.5", y2: "7.5" }),
|
|
1477
|
+
/* @__PURE__ */ jsx22("line", { x1: "7.5", y1: "11.5", x2: "16.5", y2: "11.5" }),
|
|
1478
|
+
/* @__PURE__ */ jsx22("line", { x1: "7.5", y1: "15.5", x2: "13.5", y2: "15.5" })
|
|
1622
1479
|
] }),
|
|
1623
|
-
python: /* @__PURE__ */
|
|
1624
|
-
/* @__PURE__ */
|
|
1625
|
-
/* @__PURE__ */
|
|
1626
|
-
/* @__PURE__ */
|
|
1627
|
-
/* @__PURE__ */
|
|
1480
|
+
python: /* @__PURE__ */ jsxs9(LangIcon, { children: [
|
|
1481
|
+
/* @__PURE__ */ jsx22("path", { d: "M4.5 15c0-3 2.5-4.7 5.7-4.7h1.6c2.8 0 5-2 5-4.5" }),
|
|
1482
|
+
/* @__PURE__ */ jsx22("path", { d: "M9.5 3.3c1.3-.3 2.6 0 3.3 1-.7 1-2 1.3-3.3 1" }),
|
|
1483
|
+
/* @__PURE__ */ jsx22("circle", { cx: "15.5", cy: "4.3", r: ".55", fill: "currentColor", stroke: "none" }),
|
|
1484
|
+
/* @__PURE__ */ jsx22("path", { d: "M17.8 4.5l1.4-.6M17.8 4.9l1.4.6" })
|
|
1628
1485
|
] }),
|
|
1629
|
-
ruby: /* @__PURE__ */
|
|
1630
|
-
/* @__PURE__ */
|
|
1631
|
-
/* @__PURE__ */
|
|
1632
|
-
/* @__PURE__ */
|
|
1486
|
+
ruby: /* @__PURE__ */ jsxs9(LangIcon, { children: [
|
|
1487
|
+
/* @__PURE__ */ jsx22("polygon", { points: "12 2.5 19.5 8 12 21.5 4.5 8" }),
|
|
1488
|
+
/* @__PURE__ */ jsx22("path", { d: "M4.5 8h15" }),
|
|
1489
|
+
/* @__PURE__ */ jsx22("path", { d: "M12 2.5v19" })
|
|
1633
1490
|
] }),
|
|
1634
|
-
rust: /* @__PURE__ */
|
|
1635
|
-
/* @__PURE__ */
|
|
1636
|
-
/* @__PURE__ */
|
|
1637
|
-
/* @__PURE__ */
|
|
1638
|
-
/* @__PURE__ */
|
|
1491
|
+
rust: /* @__PURE__ */ jsxs9(LangIcon, { children: [
|
|
1492
|
+
/* @__PURE__ */ jsx22("circle", { cx: "12", cy: "12", r: "7" }),
|
|
1493
|
+
/* @__PURE__ */ jsx22("circle", { cx: "12", cy: "12", r: "2.3" }),
|
|
1494
|
+
/* @__PURE__ */ jsx22("path", { d: "M12 2.5v3M12 18.5v3M2.5 12h3M18.5 12h3" }),
|
|
1495
|
+
/* @__PURE__ */ jsx22("path", { d: "M5.6 5.6l2.1 2.1M16.3 16.3l2.1 2.1M5.6 18.4l2.1-2.1M16.3 7.7l2.1-2.1" })
|
|
1639
1496
|
] }),
|
|
1640
|
-
sql: /* @__PURE__ */
|
|
1641
|
-
/* @__PURE__ */
|
|
1642
|
-
/* @__PURE__ */
|
|
1643
|
-
/* @__PURE__ */
|
|
1497
|
+
sql: /* @__PURE__ */ jsxs9(LangIcon, { children: [
|
|
1498
|
+
/* @__PURE__ */ jsx22("ellipse", { cx: "12", cy: "6", rx: "8", ry: "3" }),
|
|
1499
|
+
/* @__PURE__ */ jsx22("path", { d: "M4 6v6c0 1.7 3.6 3 8 3s8-1.3 8-3V6" }),
|
|
1500
|
+
/* @__PURE__ */ jsx22("path", { d: "M4 12v6c0 1.7 3.6 3 8 3s8-1.3 8-3v-6" })
|
|
1644
1501
|
] }),
|
|
1645
|
-
swift: /* @__PURE__ */
|
|
1646
|
-
typescript: /* @__PURE__ */
|
|
1647
|
-
/* @__PURE__ */
|
|
1648
|
-
/* @__PURE__ */
|
|
1649
|
-
/* @__PURE__ */
|
|
1502
|
+
swift: /* @__PURE__ */ jsx22(LangIcon, { children: /* @__PURE__ */ jsx22("path", { d: "M19 4.5c-2.6 4-5.5 7-8.3 9 2-.2 3.7-1 4.8-2.6-.7 2.8-2.8 5-5.3 6.1 3 .5 5.6-.5 7.2-2.4.4 2-.4 3.9-1.9 4.9 3.7-1.3 6-4.2 6.6-7.6-1 2.6-2.8 4.6-4.6 5.8" }) }),
|
|
1503
|
+
typescript: /* @__PURE__ */ jsxs9(LangIcon, { children: [
|
|
1504
|
+
/* @__PURE__ */ jsx22("rect", { x: "3", y: "3", width: "18", height: "18", rx: "4" }),
|
|
1505
|
+
/* @__PURE__ */ jsx22("path", { d: "M7.3 8.2h5M9.8 8.2v7.6" }),
|
|
1506
|
+
/* @__PURE__ */ jsx22("path", { d: "M17 8.8a2 2 0 0 0-2-.8c-1.1 0-2.2.6-2.2 1.7 0 1 .9 1.4 2.2 1.7 1.3.3 2.3.7 2.3 1.9 0 1.1-1 1.8-2.3 1.8a2.4 2.4 0 0 1-2.3-1.4" })
|
|
1650
1507
|
] }),
|
|
1651
|
-
xml: /* @__PURE__ */
|
|
1652
|
-
/* @__PURE__ */
|
|
1653
|
-
/* @__PURE__ */
|
|
1654
|
-
/* @__PURE__ */
|
|
1508
|
+
xml: /* @__PURE__ */ jsxs9(LangIcon, { children: [
|
|
1509
|
+
/* @__PURE__ */ jsx22("path", { d: "M8 7l-4.5 5 4.5 5" }),
|
|
1510
|
+
/* @__PURE__ */ jsx22("path", { d: "M16 7l4.5 5-4.5 5" }),
|
|
1511
|
+
/* @__PURE__ */ jsx22("path", { d: "M12 8v8" })
|
|
1655
1512
|
] }),
|
|
1656
|
-
yaml: /* @__PURE__ */
|
|
1657
|
-
/* @__PURE__ */
|
|
1658
|
-
/* @__PURE__ */
|
|
1659
|
-
/* @__PURE__ */
|
|
1660
|
-
/* @__PURE__ */
|
|
1513
|
+
yaml: /* @__PURE__ */ jsxs9(LangIcon, { children: [
|
|
1514
|
+
/* @__PURE__ */ jsx22("rect", { x: "2.5", y: "3", width: "19", height: "18", rx: "2" }),
|
|
1515
|
+
/* @__PURE__ */ jsx22("path", { d: "M6.5 8h2M9.5 8h8" }),
|
|
1516
|
+
/* @__PURE__ */ jsx22("path", { d: "M6.5 12h2M9.5 12h6" }),
|
|
1517
|
+
/* @__PURE__ */ jsx22("path", { d: "M6.5 16h2M9.5 16h7" })
|
|
1661
1518
|
] })
|
|
1662
1519
|
};
|
|
1663
1520
|
|
|
1664
1521
|
// src/icons.tsx
|
|
1665
|
-
import { Fragment as
|
|
1522
|
+
import { Fragment as Fragment2, jsx as jsx23, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1666
1523
|
var ALIGN_PATHS = {
|
|
1667
|
-
center: /* @__PURE__ */
|
|
1668
|
-
/* @__PURE__ */
|
|
1669
|
-
/* @__PURE__ */
|
|
1670
|
-
/* @__PURE__ */
|
|
1524
|
+
center: /* @__PURE__ */ jsxs10(Fragment2, { children: [
|
|
1525
|
+
/* @__PURE__ */ jsx23("line", { x1: "21", y1: "6", x2: "3", y2: "6" }),
|
|
1526
|
+
/* @__PURE__ */ jsx23("line", { x1: "17", y1: "12", x2: "7", y2: "12" }),
|
|
1527
|
+
/* @__PURE__ */ jsx23("line", { x1: "19", y1: "18", x2: "5", y2: "18" })
|
|
1671
1528
|
] }),
|
|
1672
|
-
left: /* @__PURE__ */
|
|
1673
|
-
/* @__PURE__ */
|
|
1674
|
-
/* @__PURE__ */
|
|
1675
|
-
/* @__PURE__ */
|
|
1529
|
+
left: /* @__PURE__ */ jsxs10(Fragment2, { children: [
|
|
1530
|
+
/* @__PURE__ */ jsx23("line", { x1: "21", y1: "6", x2: "3", y2: "6" }),
|
|
1531
|
+
/* @__PURE__ */ jsx23("line", { x1: "15", y1: "12", x2: "3", y2: "12" }),
|
|
1532
|
+
/* @__PURE__ */ jsx23("line", { x1: "17", y1: "18", x2: "3", y2: "18" })
|
|
1676
1533
|
] }),
|
|
1677
|
-
right: /* @__PURE__ */
|
|
1678
|
-
/* @__PURE__ */
|
|
1679
|
-
/* @__PURE__ */
|
|
1680
|
-
/* @__PURE__ */
|
|
1534
|
+
right: /* @__PURE__ */ jsxs10(Fragment2, { children: [
|
|
1535
|
+
/* @__PURE__ */ jsx23("line", { x1: "21", y1: "6", x2: "3", y2: "6" }),
|
|
1536
|
+
/* @__PURE__ */ jsx23("line", { x1: "21", y1: "12", x2: "9", y2: "12" }),
|
|
1537
|
+
/* @__PURE__ */ jsx23("line", { x1: "21", y1: "18", x2: "7", y2: "18" })
|
|
1681
1538
|
] })
|
|
1682
1539
|
};
|
|
1683
|
-
var AlignIcon = ({ dir }) => /* @__PURE__ */
|
|
1540
|
+
var AlignIcon = ({ dir }) => /* @__PURE__ */ jsx23(
|
|
1684
1541
|
"svg",
|
|
1685
1542
|
{
|
|
1686
1543
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1694,7 +1551,7 @@ var AlignIcon = ({ dir }) => /* @__PURE__ */ jsx24(
|
|
|
1694
1551
|
children: ALIGN_PATHS[dir]
|
|
1695
1552
|
}
|
|
1696
1553
|
);
|
|
1697
|
-
var EditUrlIcon = () => /* @__PURE__ */
|
|
1554
|
+
var EditUrlIcon = () => /* @__PURE__ */ jsxs10(
|
|
1698
1555
|
"svg",
|
|
1699
1556
|
{
|
|
1700
1557
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1706,12 +1563,12 @@ var EditUrlIcon = () => /* @__PURE__ */ jsxs11(
|
|
|
1706
1563
|
strokeLinejoin: "round",
|
|
1707
1564
|
className: "rte-editor-icon",
|
|
1708
1565
|
children: [
|
|
1709
|
-
/* @__PURE__ */
|
|
1710
|
-
/* @__PURE__ */
|
|
1566
|
+
/* @__PURE__ */ jsx23("path", { d: "M12 20h9" }),
|
|
1567
|
+
/* @__PURE__ */ jsx23("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z" })
|
|
1711
1568
|
]
|
|
1712
1569
|
}
|
|
1713
1570
|
);
|
|
1714
|
-
var OpenInYouTubeIcon = () => /* @__PURE__ */
|
|
1571
|
+
var OpenInYouTubeIcon = () => /* @__PURE__ */ jsxs10(
|
|
1715
1572
|
"svg",
|
|
1716
1573
|
{
|
|
1717
1574
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1723,13 +1580,13 @@ var OpenInYouTubeIcon = () => /* @__PURE__ */ jsxs11(
|
|
|
1723
1580
|
strokeLinejoin: "round",
|
|
1724
1581
|
className: "rte-editor-icon",
|
|
1725
1582
|
children: [
|
|
1726
|
-
/* @__PURE__ */
|
|
1727
|
-
/* @__PURE__ */
|
|
1728
|
-
/* @__PURE__ */
|
|
1583
|
+
/* @__PURE__ */ jsx23("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
|
|
1584
|
+
/* @__PURE__ */ jsx23("polyline", { points: "15 3 21 3 21 9" }),
|
|
1585
|
+
/* @__PURE__ */ jsx23("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
|
|
1729
1586
|
]
|
|
1730
1587
|
}
|
|
1731
1588
|
);
|
|
1732
|
-
var DeleteEmbedIcon = () => /* @__PURE__ */
|
|
1589
|
+
var DeleteEmbedIcon = () => /* @__PURE__ */ jsxs10(
|
|
1733
1590
|
"svg",
|
|
1734
1591
|
{
|
|
1735
1592
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1741,46 +1598,46 @@ var DeleteEmbedIcon = () => /* @__PURE__ */ jsxs11(
|
|
|
1741
1598
|
strokeLinejoin: "round",
|
|
1742
1599
|
className: "rte-editor-icon",
|
|
1743
1600
|
children: [
|
|
1744
|
-
/* @__PURE__ */
|
|
1745
|
-
/* @__PURE__ */
|
|
1601
|
+
/* @__PURE__ */ jsx23("polyline", { points: "3 6 5 6 21 6" }),
|
|
1602
|
+
/* @__PURE__ */ jsx23("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
|
|
1746
1603
|
]
|
|
1747
1604
|
}
|
|
1748
1605
|
);
|
|
1749
1606
|
var iconProps = { className: "rte-editor-icon" };
|
|
1750
1607
|
var DEFAULT_ICONS = {
|
|
1751
|
-
alignCenterControlIcon: /* @__PURE__ */
|
|
1752
|
-
alignJustifyControlIcon: /* @__PURE__ */
|
|
1753
|
-
alignLeftControlIcon: /* @__PURE__ */
|
|
1754
|
-
alignRightControlIcon: /* @__PURE__ */
|
|
1755
|
-
blockquoteControlIcon: /* @__PURE__ */
|
|
1756
|
-
boldControlIcon: /* @__PURE__ */
|
|
1757
|
-
bulletListControlIcon: /* @__PURE__ */
|
|
1758
|
-
clearFormattingControlIcon: /* @__PURE__ */
|
|
1759
|
-
codeBlockControlIcon: /* @__PURE__ */
|
|
1760
|
-
codeControlIcon: /* @__PURE__ */
|
|
1761
|
-
h1ControlIcon: /* @__PURE__ */
|
|
1762
|
-
h2ControlIcon: /* @__PURE__ */
|
|
1763
|
-
h3ControlIcon: /* @__PURE__ */
|
|
1764
|
-
h4ControlIcon: /* @__PURE__ */
|
|
1765
|
-
h5ControlIcon: /* @__PURE__ */
|
|
1766
|
-
h6ControlIcon: /* @__PURE__ */
|
|
1767
|
-
highlightControlIcon: /* @__PURE__ */
|
|
1768
|
-
hrControlIcon: /* @__PURE__ */
|
|
1769
|
-
italicControlIcon: /* @__PURE__ */
|
|
1608
|
+
alignCenterControlIcon: /* @__PURE__ */ jsx23(TextAlignCenter, { ...iconProps }),
|
|
1609
|
+
alignJustifyControlIcon: /* @__PURE__ */ jsx23(TextAlignJustify, { ...iconProps }),
|
|
1610
|
+
alignLeftControlIcon: /* @__PURE__ */ jsx23(TextAlignStart, { ...iconProps }),
|
|
1611
|
+
alignRightControlIcon: /* @__PURE__ */ jsx23(TextAlignEnd, { ...iconProps }),
|
|
1612
|
+
blockquoteControlIcon: /* @__PURE__ */ jsx23(TextQuote, { ...iconProps }),
|
|
1613
|
+
boldControlIcon: /* @__PURE__ */ jsx23(Bold, { ...iconProps }),
|
|
1614
|
+
bulletListControlIcon: /* @__PURE__ */ jsx23(List, { ...iconProps }),
|
|
1615
|
+
clearFormattingControlIcon: /* @__PURE__ */ jsx23(RemoveFormatting, { ...iconProps }),
|
|
1616
|
+
codeBlockControlIcon: /* @__PURE__ */ jsx23(SquareCode, { ...iconProps }),
|
|
1617
|
+
codeControlIcon: /* @__PURE__ */ jsx23(Code, { ...iconProps }),
|
|
1618
|
+
h1ControlIcon: /* @__PURE__ */ jsx23(Heading1, { ...iconProps }),
|
|
1619
|
+
h2ControlIcon: /* @__PURE__ */ jsx23(Heading2, { ...iconProps }),
|
|
1620
|
+
h3ControlIcon: /* @__PURE__ */ jsx23(Heading3, { ...iconProps }),
|
|
1621
|
+
h4ControlIcon: /* @__PURE__ */ jsx23(Heading4, { ...iconProps }),
|
|
1622
|
+
h5ControlIcon: /* @__PURE__ */ jsx23(Heading5, { ...iconProps }),
|
|
1623
|
+
h6ControlIcon: /* @__PURE__ */ jsx23(Heading6, { ...iconProps }),
|
|
1624
|
+
highlightControlIcon: /* @__PURE__ */ jsx23(Highlighter, { ...iconProps }),
|
|
1625
|
+
hrControlIcon: /* @__PURE__ */ jsx23(Minus, { ...iconProps }),
|
|
1626
|
+
italicControlIcon: /* @__PURE__ */ jsx23(Italic, { ...iconProps }),
|
|
1770
1627
|
languageIcons: DEFAULT_LANGUAGE_ICONS,
|
|
1771
|
-
linkControlIcon: /* @__PURE__ */
|
|
1772
|
-
orderedListControlIcon: /* @__PURE__ */
|
|
1773
|
-
redoControlIcon: /* @__PURE__ */
|
|
1774
|
-
strikeControlIcon: /* @__PURE__ */
|
|
1775
|
-
subscriptControlIcon: /* @__PURE__ */
|
|
1776
|
-
superscriptControlIcon: /* @__PURE__ */
|
|
1777
|
-
underlineControlIcon: /* @__PURE__ */
|
|
1778
|
-
undoControlIcon: /* @__PURE__ */
|
|
1779
|
-
unlinkControlIcon: /* @__PURE__ */
|
|
1628
|
+
linkControlIcon: /* @__PURE__ */ jsx23(Link, { ...iconProps }),
|
|
1629
|
+
orderedListControlIcon: /* @__PURE__ */ jsx23(ListOrdered, { ...iconProps }),
|
|
1630
|
+
redoControlIcon: /* @__PURE__ */ jsx23(Redo2, { ...iconProps }),
|
|
1631
|
+
strikeControlIcon: /* @__PURE__ */ jsx23(Strikethrough, { ...iconProps }),
|
|
1632
|
+
subscriptControlIcon: /* @__PURE__ */ jsx23(Subscript, { ...iconProps }),
|
|
1633
|
+
superscriptControlIcon: /* @__PURE__ */ jsx23(Superscript, { ...iconProps }),
|
|
1634
|
+
underlineControlIcon: /* @__PURE__ */ jsx23(Underline, { ...iconProps }),
|
|
1635
|
+
undoControlIcon: /* @__PURE__ */ jsx23(Undo2, { ...iconProps }),
|
|
1636
|
+
unlinkControlIcon: /* @__PURE__ */ jsx23(Link2Off, { ...iconProps })
|
|
1780
1637
|
};
|
|
1781
1638
|
|
|
1782
1639
|
// src/extensions/resizable-node-view.tsx
|
|
1783
|
-
import { Fragment as
|
|
1640
|
+
import { Fragment as Fragment3, jsx as jsx24, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1784
1641
|
var EmbedToolbar = ({
|
|
1785
1642
|
align,
|
|
1786
1643
|
videoSrc,
|
|
@@ -1797,8 +1654,8 @@ var EmbedToolbar = ({
|
|
|
1797
1654
|
nodeSrc
|
|
1798
1655
|
}) => {
|
|
1799
1656
|
if (isEditingUrl) {
|
|
1800
|
-
return /* @__PURE__ */
|
|
1801
|
-
/* @__PURE__ */
|
|
1657
|
+
return /* @__PURE__ */ jsxs11("div", { className: "rte-embed-selector-edit-form", children: [
|
|
1658
|
+
/* @__PURE__ */ jsx24(
|
|
1802
1659
|
"input",
|
|
1803
1660
|
{
|
|
1804
1661
|
ref: inputRef,
|
|
@@ -1816,7 +1673,7 @@ var EmbedToolbar = ({
|
|
|
1816
1673
|
}
|
|
1817
1674
|
}
|
|
1818
1675
|
),
|
|
1819
|
-
/* @__PURE__ */
|
|
1676
|
+
/* @__PURE__ */ jsx24(
|
|
1820
1677
|
"button",
|
|
1821
1678
|
{
|
|
1822
1679
|
type: "button",
|
|
@@ -1825,7 +1682,7 @@ var EmbedToolbar = ({
|
|
|
1825
1682
|
children: "Save"
|
|
1826
1683
|
}
|
|
1827
1684
|
),
|
|
1828
|
-
/* @__PURE__ */
|
|
1685
|
+
/* @__PURE__ */ jsx24(
|
|
1829
1686
|
"button",
|
|
1830
1687
|
{
|
|
1831
1688
|
type: "button",
|
|
@@ -1836,8 +1693,8 @@ var EmbedToolbar = ({
|
|
|
1836
1693
|
)
|
|
1837
1694
|
] });
|
|
1838
1695
|
}
|
|
1839
|
-
return /* @__PURE__ */
|
|
1840
|
-
/* @__PURE__ */
|
|
1696
|
+
return /* @__PURE__ */ jsxs11(Fragment3, { children: [
|
|
1697
|
+
/* @__PURE__ */ jsx24("div", { className: "rte-embed-selector-group", children: ["left", "center", "right"].map((dir) => /* @__PURE__ */ jsx24(
|
|
1841
1698
|
"button",
|
|
1842
1699
|
{
|
|
1843
1700
|
type: "button",
|
|
@@ -1845,12 +1702,12 @@ var EmbedToolbar = ({
|
|
|
1845
1702
|
"aria-label": `Align ${dir.charAt(0).toUpperCase()}${dir.slice(1)}`,
|
|
1846
1703
|
className: `rte-embed-selector-btn ${align === dir ? "rte-embed-selector-btn--active" : ""}`,
|
|
1847
1704
|
onClick: () => updateAttributes({ align: dir }),
|
|
1848
|
-
children: /* @__PURE__ */
|
|
1705
|
+
children: /* @__PURE__ */ jsx24(AlignIcon, { dir })
|
|
1849
1706
|
},
|
|
1850
1707
|
dir
|
|
1851
1708
|
)) }),
|
|
1852
|
-
/* @__PURE__ */
|
|
1853
|
-
/* @__PURE__ */
|
|
1709
|
+
/* @__PURE__ */ jsx24("div", { className: "rte-embed-selector-divider" }),
|
|
1710
|
+
/* @__PURE__ */ jsx24("div", { className: "rte-embed-selector-group", children: [25, 50, 75, 100].map((pct) => /* @__PURE__ */ jsxs11(
|
|
1854
1711
|
"button",
|
|
1855
1712
|
{
|
|
1856
1713
|
type: "button",
|
|
@@ -1864,9 +1721,9 @@ var EmbedToolbar = ({
|
|
|
1864
1721
|
},
|
|
1865
1722
|
pct
|
|
1866
1723
|
)) }),
|
|
1867
|
-
/* @__PURE__ */
|
|
1868
|
-
/* @__PURE__ */
|
|
1869
|
-
(videoSrc || nodeSrc) && /* @__PURE__ */
|
|
1724
|
+
/* @__PURE__ */ jsx24("div", { className: "rte-embed-selector-divider" }),
|
|
1725
|
+
/* @__PURE__ */ jsxs11("div", { className: "rte-embed-selector-group", children: [
|
|
1726
|
+
(videoSrc || nodeSrc) && /* @__PURE__ */ jsx24(
|
|
1870
1727
|
"button",
|
|
1871
1728
|
{
|
|
1872
1729
|
type: "button",
|
|
@@ -1877,10 +1734,10 @@ var EmbedToolbar = ({
|
|
|
1877
1734
|
setUrlInput(videoSrc || nodeSrc || "");
|
|
1878
1735
|
setIsEditingUrl(true);
|
|
1879
1736
|
},
|
|
1880
|
-
children: /* @__PURE__ */
|
|
1737
|
+
children: /* @__PURE__ */ jsx24(EditUrlIcon, {})
|
|
1881
1738
|
}
|
|
1882
1739
|
),
|
|
1883
|
-
watchUrl && /* @__PURE__ */
|
|
1740
|
+
watchUrl && /* @__PURE__ */ jsx24(
|
|
1884
1741
|
"button",
|
|
1885
1742
|
{
|
|
1886
1743
|
type: "button",
|
|
@@ -1888,10 +1745,10 @@ var EmbedToolbar = ({
|
|
|
1888
1745
|
"aria-label": "Open video in YouTube",
|
|
1889
1746
|
className: "rte-embed-selector-btn",
|
|
1890
1747
|
onClick: () => window.open(watchUrl, "_blank"),
|
|
1891
|
-
children: /* @__PURE__ */
|
|
1748
|
+
children: /* @__PURE__ */ jsx24(OpenInYouTubeIcon, {})
|
|
1892
1749
|
}
|
|
1893
1750
|
),
|
|
1894
|
-
deleteNode && /* @__PURE__ */
|
|
1751
|
+
deleteNode && /* @__PURE__ */ jsx24(
|
|
1895
1752
|
"button",
|
|
1896
1753
|
{
|
|
1897
1754
|
type: "button",
|
|
@@ -1899,7 +1756,7 @@ var EmbedToolbar = ({
|
|
|
1899
1756
|
"aria-label": "Delete Embed",
|
|
1900
1757
|
className: "rte-embed-selector-btn rte-embed-selector-btn--danger",
|
|
1901
1758
|
onClick: () => deleteNode(),
|
|
1902
|
-
children: /* @__PURE__ */
|
|
1759
|
+
children: /* @__PURE__ */ jsx24(DeleteEmbedIcon, {})
|
|
1903
1760
|
}
|
|
1904
1761
|
)
|
|
1905
1762
|
] })
|
|
@@ -1922,10 +1779,10 @@ var ResizableNodeView = ({
|
|
|
1922
1779
|
onSrcChange
|
|
1923
1780
|
}) => {
|
|
1924
1781
|
const containerRef = useRef3(null);
|
|
1925
|
-
const [isEditingUrl, setIsEditingUrl] =
|
|
1926
|
-
const [urlInput, setUrlInput] =
|
|
1927
|
-
const [isResizing, setIsResizing] =
|
|
1928
|
-
const [currentDimensions, setCurrentDimensions] =
|
|
1782
|
+
const [isEditingUrl, setIsEditingUrl] = useState4(false);
|
|
1783
|
+
const [urlInput, setUrlInput] = useState4(videoSrc || "");
|
|
1784
|
+
const [isResizing, setIsResizing] = useState4(false);
|
|
1785
|
+
const [currentDimensions, setCurrentDimensions] = useState4(null);
|
|
1929
1786
|
const resizingRef = useRef3(null);
|
|
1930
1787
|
const width = node.attrs.width;
|
|
1931
1788
|
const height = node.attrs.height;
|
|
@@ -2070,13 +1927,13 @@ var ResizableNodeView = ({
|
|
|
2070
1927
|
setIsEditingUrl(false);
|
|
2071
1928
|
};
|
|
2072
1929
|
const isEditable = editor ? editor.isEditable : true;
|
|
2073
|
-
return /* @__PURE__ */
|
|
1930
|
+
return /* @__PURE__ */ jsx24(
|
|
2074
1931
|
NodeViewWrapper,
|
|
2075
1932
|
{
|
|
2076
1933
|
className: "rte-embed-wrapper",
|
|
2077
1934
|
"data-selected": selected || void 0,
|
|
2078
1935
|
"data-align": align,
|
|
2079
|
-
children: /* @__PURE__ */
|
|
1936
|
+
children: /* @__PURE__ */ jsxs11(
|
|
2080
1937
|
"div",
|
|
2081
1938
|
{
|
|
2082
1939
|
ref: containerRef,
|
|
@@ -2089,7 +1946,7 @@ var ResizableNodeView = ({
|
|
|
2089
1946
|
},
|
|
2090
1947
|
children: [
|
|
2091
1948
|
children,
|
|
2092
|
-
selected && isEditable && /* @__PURE__ */
|
|
1949
|
+
selected && isEditable && /* @__PURE__ */ jsx24("div", { className: "rte-embed-selector", contentEditable: false, children: /* @__PURE__ */ jsx24(
|
|
2093
1950
|
EmbedToolbar,
|
|
2094
1951
|
{
|
|
2095
1952
|
align,
|
|
@@ -2107,14 +1964,14 @@ var ResizableNodeView = ({
|
|
|
2107
1964
|
nodeSrc: node.attrs.src
|
|
2108
1965
|
}
|
|
2109
1966
|
) }),
|
|
2110
|
-
isResizing && currentDimensions && /* @__PURE__ */
|
|
1967
|
+
isResizing && currentDimensions && /* @__PURE__ */ jsxs11("div", { className: "rte-embed-resize-badge", children: [
|
|
2111
1968
|
currentDimensions.w,
|
|
2112
1969
|
" \xD7 ",
|
|
2113
1970
|
currentDimensions.h,
|
|
2114
1971
|
" px"
|
|
2115
1972
|
] }),
|
|
2116
|
-
selected && isEditable && /* @__PURE__ */
|
|
2117
|
-
/* @__PURE__ */
|
|
1973
|
+
selected && isEditable && /* @__PURE__ */ jsxs11(Fragment3, { children: [
|
|
1974
|
+
/* @__PURE__ */ jsx24(
|
|
2118
1975
|
"div",
|
|
2119
1976
|
{
|
|
2120
1977
|
className: "rte-resize-handle rte-resize-handle--left",
|
|
@@ -2122,7 +1979,7 @@ var ResizableNodeView = ({
|
|
|
2122
1979
|
role: "presentation"
|
|
2123
1980
|
}
|
|
2124
1981
|
),
|
|
2125
|
-
/* @__PURE__ */
|
|
1982
|
+
/* @__PURE__ */ jsx24(
|
|
2126
1983
|
"div",
|
|
2127
1984
|
{
|
|
2128
1985
|
className: "rte-resize-handle rte-resize-handle--right",
|
|
@@ -2130,7 +1987,7 @@ var ResizableNodeView = ({
|
|
|
2130
1987
|
role: "presentation"
|
|
2131
1988
|
}
|
|
2132
1989
|
),
|
|
2133
|
-
/* @__PURE__ */
|
|
1990
|
+
/* @__PURE__ */ jsx24(
|
|
2134
1991
|
"div",
|
|
2135
1992
|
{
|
|
2136
1993
|
className: "rte-resize-handle rte-resize-handle--bottom",
|
|
@@ -2138,7 +1995,7 @@ var ResizableNodeView = ({
|
|
|
2138
1995
|
role: "presentation"
|
|
2139
1996
|
}
|
|
2140
1997
|
),
|
|
2141
|
-
/* @__PURE__ */
|
|
1998
|
+
/* @__PURE__ */ jsx24(
|
|
2142
1999
|
"div",
|
|
2143
2000
|
{
|
|
2144
2001
|
className: "rte-resize-handle rte-resize-handle--corner rte-resize-handle--corner-bl",
|
|
@@ -2146,7 +2003,7 @@ var ResizableNodeView = ({
|
|
|
2146
2003
|
role: "presentation"
|
|
2147
2004
|
}
|
|
2148
2005
|
),
|
|
2149
|
-
/* @__PURE__ */
|
|
2006
|
+
/* @__PURE__ */ jsx24(
|
|
2150
2007
|
"div",
|
|
2151
2008
|
{
|
|
2152
2009
|
className: "rte-resize-handle rte-resize-handle--corner rte-resize-handle--corner-br",
|
|
@@ -2163,7 +2020,7 @@ var ResizableNodeView = ({
|
|
|
2163
2020
|
};
|
|
2164
2021
|
|
|
2165
2022
|
// src/controls/rte-twitter-control.tsx
|
|
2166
|
-
import { jsx as
|
|
2023
|
+
import { jsx as jsx25, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2167
2024
|
var WIDGET_SCRIPT_URL = "https://platform.twitter.com/widgets.js";
|
|
2168
2025
|
var SCRIPT_LOAD_TIMEOUT_MS = 8e3;
|
|
2169
2026
|
var READY_POLL_INTERVAL_MS = 50;
|
|
@@ -2240,13 +2097,13 @@ var loadTwitterScript = () => {
|
|
|
2240
2097
|
var TwitterNodeView = (props) => {
|
|
2241
2098
|
const { node } = props;
|
|
2242
2099
|
const containerRef = useRef4(null);
|
|
2243
|
-
const [loading, setLoading] =
|
|
2244
|
-
const [failed, setFailed] =
|
|
2100
|
+
const [loading, setLoading] = useState5(true);
|
|
2101
|
+
const [failed, setFailed] = useState5(false);
|
|
2245
2102
|
const { tweetId } = node.attrs;
|
|
2246
2103
|
const renderedTweetIdRef = useRef4(null);
|
|
2247
2104
|
const activeRenderIdRef = useRef4(0);
|
|
2248
2105
|
const retryToken = useRef4(0);
|
|
2249
|
-
const [retryCount, setRetryCount] =
|
|
2106
|
+
const [retryCount, setRetryCount] = useState5(0);
|
|
2250
2107
|
useEffect4(() => {
|
|
2251
2108
|
if (!containerRef.current || !tweetId) {
|
|
2252
2109
|
return;
|
|
@@ -2310,7 +2167,7 @@ var TwitterNodeView = (props) => {
|
|
|
2310
2167
|
retryToken.current += 1;
|
|
2311
2168
|
setRetryCount(retryToken.current);
|
|
2312
2169
|
}, []);
|
|
2313
|
-
return /* @__PURE__ */
|
|
2170
|
+
return /* @__PURE__ */ jsxs12(
|
|
2314
2171
|
ResizableNodeView,
|
|
2315
2172
|
{
|
|
2316
2173
|
...props,
|
|
@@ -2318,12 +2175,12 @@ var TwitterNodeView = (props) => {
|
|
|
2318
2175
|
minWidth: 300,
|
|
2319
2176
|
maxWidth: 1200,
|
|
2320
2177
|
children: [
|
|
2321
|
-
loading && /* @__PURE__ */
|
|
2322
|
-
!loading && failed && /* @__PURE__ */
|
|
2323
|
-
/* @__PURE__ */
|
|
2324
|
-
/* @__PURE__ */
|
|
2178
|
+
loading && /* @__PURE__ */ jsx25("div", { className: "rte-embed-loading", children: "Loading tweet..." }),
|
|
2179
|
+
!loading && failed && /* @__PURE__ */ jsxs12("div", { className: "rte-embed-error", children: [
|
|
2180
|
+
/* @__PURE__ */ jsx25("p", { children: "Couldn't load this tweet." }),
|
|
2181
|
+
/* @__PURE__ */ jsx25("button", { type: "button", onClick: handleRetry, children: "Retry" })
|
|
2325
2182
|
] }),
|
|
2326
|
-
/* @__PURE__ */
|
|
2183
|
+
/* @__PURE__ */ jsx25("div", { ref: containerRef })
|
|
2327
2184
|
]
|
|
2328
2185
|
}
|
|
2329
2186
|
);
|
|
@@ -2427,9 +2284,9 @@ var extractTweetId = (input) => {
|
|
|
2427
2284
|
};
|
|
2428
2285
|
var TwitterEmbedControl = ({ className }) => {
|
|
2429
2286
|
const { editor } = useRichTextEditorContext();
|
|
2430
|
-
const [open, setOpen] =
|
|
2431
|
-
const [url, setUrl] =
|
|
2432
|
-
const [touched, setTouched] =
|
|
2287
|
+
const [open, setOpen] = useState5(false);
|
|
2288
|
+
const [url, setUrl] = useState5("");
|
|
2289
|
+
const [touched, setTouched] = useState5(false);
|
|
2433
2290
|
const { active } = useEditorState4({
|
|
2434
2291
|
editor: editor ?? null,
|
|
2435
2292
|
selector: (ctx) => ({
|
|
@@ -2451,7 +2308,7 @@ var TwitterEmbedControl = ({ className }) => {
|
|
|
2451
2308
|
resetState();
|
|
2452
2309
|
return true;
|
|
2453
2310
|
}, [tweetId, editor, resetState]);
|
|
2454
|
-
return /* @__PURE__ */
|
|
2311
|
+
return /* @__PURE__ */ jsxs12(
|
|
2455
2312
|
Dialog,
|
|
2456
2313
|
{
|
|
2457
2314
|
open,
|
|
@@ -2462,36 +2319,36 @@ var TwitterEmbedControl = ({ className }) => {
|
|
|
2462
2319
|
}
|
|
2463
2320
|
},
|
|
2464
2321
|
children: [
|
|
2465
|
-
/* @__PURE__ */
|
|
2322
|
+
/* @__PURE__ */ jsx25(
|
|
2466
2323
|
DialogTrigger,
|
|
2467
2324
|
{
|
|
2468
|
-
render: /* @__PURE__ */
|
|
2325
|
+
render: /* @__PURE__ */ jsx25(
|
|
2469
2326
|
RichTextEditorControl,
|
|
2470
2327
|
{
|
|
2471
2328
|
active,
|
|
2472
2329
|
className,
|
|
2473
2330
|
title: "Embed Tweet",
|
|
2474
2331
|
"aria-label": "Embed Tweet",
|
|
2475
|
-
children: /* @__PURE__ */
|
|
2332
|
+
children: /* @__PURE__ */ jsx25(
|
|
2476
2333
|
"svg",
|
|
2477
2334
|
{
|
|
2478
2335
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2479
2336
|
viewBox: "0 0 24 24",
|
|
2480
2337
|
fill: "currentColor",
|
|
2481
2338
|
className: "rte-editor-icon",
|
|
2482
|
-
children: /* @__PURE__ */
|
|
2339
|
+
children: /* @__PURE__ */ jsx25("path", { d: "M18.2 3.2h3.3l-7.2 8.2 8.5 11.2h-6.6l-5.2-6.8-6 6.8H2.7l7.7-8.8L2.3 3.2h6.8l4.7 6.2 5.4-6.2zm-1.2 17.3h1.8L7 4.8H5.1l11.9 15.7z" })
|
|
2483
2340
|
}
|
|
2484
2341
|
)
|
|
2485
2342
|
}
|
|
2486
2343
|
)
|
|
2487
2344
|
}
|
|
2488
2345
|
),
|
|
2489
|
-
/* @__PURE__ */
|
|
2490
|
-
/* @__PURE__ */
|
|
2491
|
-
/* @__PURE__ */
|
|
2492
|
-
/* @__PURE__ */
|
|
2346
|
+
/* @__PURE__ */ jsxs12(DialogContent, { children: [
|
|
2347
|
+
/* @__PURE__ */ jsxs12(DialogHeader, { children: [
|
|
2348
|
+
/* @__PURE__ */ jsx25(DialogTitle, { children: "Embed Tweet" }),
|
|
2349
|
+
/* @__PURE__ */ jsx25(DialogDescription, { children: "Paste a tweet URL or ID." })
|
|
2493
2350
|
] }),
|
|
2494
|
-
/* @__PURE__ */
|
|
2351
|
+
/* @__PURE__ */ jsx25(
|
|
2495
2352
|
Input,
|
|
2496
2353
|
{
|
|
2497
2354
|
value: url,
|
|
@@ -2511,10 +2368,10 @@ var TwitterEmbedControl = ({ className }) => {
|
|
|
2511
2368
|
}
|
|
2512
2369
|
}
|
|
2513
2370
|
),
|
|
2514
|
-
showError && /* @__PURE__ */
|
|
2515
|
-
/* @__PURE__ */
|
|
2516
|
-
/* @__PURE__ */
|
|
2517
|
-
/* @__PURE__ */
|
|
2371
|
+
showError && /* @__PURE__ */ jsx25("p", { className: "rte-input-error", role: "alert", children: "That doesn't look like a valid tweet URL or ID." }),
|
|
2372
|
+
/* @__PURE__ */ jsxs12(DialogFooter, { children: [
|
|
2373
|
+
/* @__PURE__ */ jsx25(DialogClose, { children: "Cancel" }),
|
|
2374
|
+
/* @__PURE__ */ jsx25(
|
|
2518
2375
|
"button",
|
|
2519
2376
|
{
|
|
2520
2377
|
type: "button",
|
|
@@ -2543,8 +2400,8 @@ import {
|
|
|
2543
2400
|
parseAttributes as parseAttributes2
|
|
2544
2401
|
} from "@tiptap/core";
|
|
2545
2402
|
import { ReactNodeViewRenderer as ReactNodeViewRenderer2, useEditorState as useEditorState5 } from "@tiptap/react";
|
|
2546
|
-
import { useState as
|
|
2547
|
-
import { jsx as
|
|
2403
|
+
import { useState as useState6, useCallback as useCallback7 } from "react";
|
|
2404
|
+
import { jsx as jsx26, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2548
2405
|
var getYouTubeId = (url) => {
|
|
2549
2406
|
const clean = url.trim();
|
|
2550
2407
|
const patterns = [
|
|
@@ -2572,7 +2429,7 @@ var YouTubeNodeView = (props) => {
|
|
|
2572
2429
|
if (videoId) {
|
|
2573
2430
|
watchUrl = videoId.startsWith("http") ? videoId : `https://www.youtube.com/watch?v=${videoId}`;
|
|
2574
2431
|
}
|
|
2575
|
-
return /* @__PURE__ */
|
|
2432
|
+
return /* @__PURE__ */ jsx26(
|
|
2576
2433
|
ResizableNodeView,
|
|
2577
2434
|
{
|
|
2578
2435
|
...props,
|
|
@@ -2583,7 +2440,7 @@ var YouTubeNodeView = (props) => {
|
|
|
2583
2440
|
videoSrc: rawSrc,
|
|
2584
2441
|
watchUrl,
|
|
2585
2442
|
onSrcChange: (newSrc) => updateAttributes({ src: newSrc }),
|
|
2586
|
-
children: /* @__PURE__ */
|
|
2443
|
+
children: /* @__PURE__ */ jsx26(
|
|
2587
2444
|
"iframe",
|
|
2588
2445
|
{
|
|
2589
2446
|
src: `https://www.youtube-nocookie.com/embed/${videoId}`,
|
|
@@ -2685,8 +2542,8 @@ var YouTubeEmbed = Node2.create({
|
|
|
2685
2542
|
});
|
|
2686
2543
|
var YouTubeEmbedControl = ({ className }) => {
|
|
2687
2544
|
const { editor } = useRichTextEditorContext();
|
|
2688
|
-
const [open, setOpen] =
|
|
2689
|
-
const [url, setUrl] =
|
|
2545
|
+
const [open, setOpen] = useState6(false);
|
|
2546
|
+
const [url, setUrl] = useState6("");
|
|
2690
2547
|
const { active } = useEditorState5({
|
|
2691
2548
|
editor: editor ?? null,
|
|
2692
2549
|
selector: (ctx) => ({
|
|
@@ -2699,18 +2556,18 @@ var YouTubeEmbedControl = ({ className }) => {
|
|
|
2699
2556
|
setUrl("");
|
|
2700
2557
|
}
|
|
2701
2558
|
}, [url, editor]);
|
|
2702
|
-
return /* @__PURE__ */
|
|
2703
|
-
/* @__PURE__ */
|
|
2559
|
+
return /* @__PURE__ */ jsxs13(Dialog, { open, onOpenChange: setOpen, children: [
|
|
2560
|
+
/* @__PURE__ */ jsx26(
|
|
2704
2561
|
DialogTrigger,
|
|
2705
2562
|
{
|
|
2706
|
-
render: /* @__PURE__ */
|
|
2563
|
+
render: /* @__PURE__ */ jsx26(
|
|
2707
2564
|
RichTextEditorControl,
|
|
2708
2565
|
{
|
|
2709
2566
|
active,
|
|
2710
2567
|
className,
|
|
2711
2568
|
title: "Embed YouTube video",
|
|
2712
2569
|
"aria-label": "Embed YouTube video",
|
|
2713
|
-
children: /* @__PURE__ */
|
|
2570
|
+
children: /* @__PURE__ */ jsxs13(
|
|
2714
2571
|
"svg",
|
|
2715
2572
|
{
|
|
2716
2573
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2722,8 +2579,8 @@ var YouTubeEmbedControl = ({ className }) => {
|
|
|
2722
2579
|
strokeLinejoin: "round",
|
|
2723
2580
|
className: "rte-editor-icon",
|
|
2724
2581
|
children: [
|
|
2725
|
-
/* @__PURE__ */
|
|
2726
|
-
/* @__PURE__ */
|
|
2582
|
+
/* @__PURE__ */ jsx26("path", { d: "M23.5 6.2a3 3 0 0 0-2.1-2.1C19.5 3.5 12 3.5 12 3.5s-7.5 0-9.4.6a3 3 0 0 0-2.1 2.1C0 8.1 0 12 0 12s0 3.9.5 5.8a3 3 0 0 0 2.1 2.1c1.9.6 9.4.6 9.4.6s7.5 0 9.4-.6a3 3 0 0 0 2.1-2.1c.5-1.9.5-5.8.5-5.8s0-3.9-.5-5.8z" }),
|
|
2583
|
+
/* @__PURE__ */ jsx26("path", { d: "M9.5 15.5V8.5l6.2 3.5z" })
|
|
2727
2584
|
]
|
|
2728
2585
|
}
|
|
2729
2586
|
)
|
|
@@ -2731,12 +2588,12 @@ var YouTubeEmbedControl = ({ className }) => {
|
|
|
2731
2588
|
)
|
|
2732
2589
|
}
|
|
2733
2590
|
),
|
|
2734
|
-
/* @__PURE__ */
|
|
2735
|
-
/* @__PURE__ */
|
|
2736
|
-
/* @__PURE__ */
|
|
2737
|
-
/* @__PURE__ */
|
|
2591
|
+
/* @__PURE__ */ jsxs13(DialogContent, { showCloseButton: false, children: [
|
|
2592
|
+
/* @__PURE__ */ jsxs13(DialogHeader, { children: [
|
|
2593
|
+
/* @__PURE__ */ jsx26(DialogTitle, { children: "Embed YouTube video" }),
|
|
2594
|
+
/* @__PURE__ */ jsx26(DialogDescription, { children: "Paste a YouTube video URL or ID." })
|
|
2738
2595
|
] }),
|
|
2739
|
-
/* @__PURE__ */
|
|
2596
|
+
/* @__PURE__ */ jsx26(
|
|
2740
2597
|
Input,
|
|
2741
2598
|
{
|
|
2742
2599
|
value: url,
|
|
@@ -2750,9 +2607,9 @@ var YouTubeEmbedControl = ({ className }) => {
|
|
|
2750
2607
|
}
|
|
2751
2608
|
}
|
|
2752
2609
|
),
|
|
2753
|
-
/* @__PURE__ */
|
|
2754
|
-
/* @__PURE__ */
|
|
2755
|
-
/* @__PURE__ */
|
|
2610
|
+
/* @__PURE__ */ jsxs13(DialogFooter, { children: [
|
|
2611
|
+
/* @__PURE__ */ jsx26(DialogClose, { children: "Cancel" }),
|
|
2612
|
+
/* @__PURE__ */ jsx26(
|
|
2756
2613
|
DialogClose,
|
|
2757
2614
|
{
|
|
2758
2615
|
disabled: !url,
|
|
@@ -2809,14 +2666,14 @@ var DEFAULT_LABELS = {
|
|
|
2809
2666
|
|
|
2810
2667
|
// src/rte-content.tsx
|
|
2811
2668
|
import { EditorContent } from "@tiptap/react";
|
|
2812
|
-
import { jsx as
|
|
2669
|
+
import { jsx as jsx27, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2813
2670
|
var Content = ({
|
|
2814
2671
|
children,
|
|
2815
2672
|
className
|
|
2816
2673
|
}) => {
|
|
2817
2674
|
const { editor } = useRichTextEditorContext();
|
|
2818
|
-
return /* @__PURE__ */
|
|
2819
|
-
/* @__PURE__ */
|
|
2675
|
+
return /* @__PURE__ */ jsxs14("div", { className: "relative", children: [
|
|
2676
|
+
/* @__PURE__ */ jsx27(
|
|
2820
2677
|
EditorContent,
|
|
2821
2678
|
{
|
|
2822
2679
|
editor,
|
|
@@ -2829,15 +2686,15 @@ var Content = ({
|
|
|
2829
2686
|
};
|
|
2830
2687
|
|
|
2831
2688
|
// src/rte-controls-group.tsx
|
|
2832
|
-
import { jsx as
|
|
2689
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
2833
2690
|
var ControlsGroup = ({
|
|
2834
2691
|
children,
|
|
2835
2692
|
className
|
|
2836
|
-
}) => /* @__PURE__ */
|
|
2693
|
+
}) => /* @__PURE__ */ jsx28("div", { className: cn("rte-controls-group", className), children });
|
|
2837
2694
|
|
|
2838
2695
|
// src/rte-footer.tsx
|
|
2839
|
-
import { useEffect as useEffect5, useMemo, useRef as useRef5, useState as
|
|
2840
|
-
import { Fragment as
|
|
2696
|
+
import { useEffect as useEffect5, useMemo, useRef as useRef5, useState as useState7 } from "react";
|
|
2697
|
+
import { Fragment as Fragment4, jsx as jsx29, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2841
2698
|
var Footer = ({
|
|
2842
2699
|
children,
|
|
2843
2700
|
className,
|
|
@@ -2848,7 +2705,7 @@ var Footer = ({
|
|
|
2848
2705
|
wordCountFormatter
|
|
2849
2706
|
}) => {
|
|
2850
2707
|
const { editor, variant } = useRichTextEditorContext();
|
|
2851
|
-
const [, forceUpdate] =
|
|
2708
|
+
const [, forceUpdate] = useState7(0);
|
|
2852
2709
|
const rafRef = useRef5(null);
|
|
2853
2710
|
useEffect5(() => {
|
|
2854
2711
|
if (!editor || !showWordCount) {
|
|
@@ -2896,7 +2753,7 @@ var Footer = ({
|
|
|
2896
2753
|
if (!showWordCount && !children) {
|
|
2897
2754
|
return null;
|
|
2898
2755
|
}
|
|
2899
|
-
return /* @__PURE__ */
|
|
2756
|
+
return /* @__PURE__ */ jsxs15(
|
|
2900
2757
|
"div",
|
|
2901
2758
|
{
|
|
2902
2759
|
className: cn(
|
|
@@ -2908,21 +2765,21 @@ var Footer = ({
|
|
|
2908
2765
|
"data-sticky": sticky ? "" : void 0,
|
|
2909
2766
|
style: sticky ? { bottom: stickyOffset } : void 0,
|
|
2910
2767
|
children: [
|
|
2911
|
-
showWordCount && wordCount && /* @__PURE__ */
|
|
2912
|
-
/* @__PURE__ */
|
|
2913
|
-
/* @__PURE__ */
|
|
2914
|
-
/* @__PURE__ */
|
|
2768
|
+
showWordCount && wordCount && /* @__PURE__ */ jsx29("span", { className: cn("rte-footer-word-count", wordCountClassName), children: wordCountFormatter ? wordCountFormatter(wordCount) : /* @__PURE__ */ jsxs15(Fragment4, { children: [
|
|
2769
|
+
/* @__PURE__ */ jsxs15("span", { className: "rte-footer-word-count-stat", children: [
|
|
2770
|
+
/* @__PURE__ */ jsx29("span", { className: "rte-footer-word-count-number", children: wordCount.words }),
|
|
2771
|
+
/* @__PURE__ */ jsx29("span", { className: "rte-footer-word-count-unit", children: "words" })
|
|
2915
2772
|
] }),
|
|
2916
|
-
/* @__PURE__ */
|
|
2773
|
+
/* @__PURE__ */ jsx29(
|
|
2917
2774
|
"span",
|
|
2918
2775
|
{
|
|
2919
2776
|
className: "rte-footer-word-count-separator",
|
|
2920
2777
|
"aria-hidden": "true"
|
|
2921
2778
|
}
|
|
2922
2779
|
),
|
|
2923
|
-
/* @__PURE__ */
|
|
2924
|
-
/* @__PURE__ */
|
|
2925
|
-
/* @__PURE__ */
|
|
2780
|
+
/* @__PURE__ */ jsxs15("span", { className: "rte-footer-word-count-stat", children: [
|
|
2781
|
+
/* @__PURE__ */ jsx29("span", { className: "rte-footer-word-count-number", children: wordCount.characters }),
|
|
2782
|
+
/* @__PURE__ */ jsx29("span", { className: "rte-footer-word-count-unit", children: "characters" })
|
|
2926
2783
|
] })
|
|
2927
2784
|
] }) }),
|
|
2928
2785
|
children
|
|
@@ -2932,7 +2789,7 @@ var Footer = ({
|
|
|
2932
2789
|
};
|
|
2933
2790
|
|
|
2934
2791
|
// src/rte-toolbar.tsx
|
|
2935
|
-
import { jsx as
|
|
2792
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
2936
2793
|
var Toolbar = ({
|
|
2937
2794
|
children,
|
|
2938
2795
|
className,
|
|
@@ -2943,7 +2800,7 @@ var Toolbar = ({
|
|
|
2943
2800
|
if (!editable) {
|
|
2944
2801
|
return null;
|
|
2945
2802
|
}
|
|
2946
|
-
return /* @__PURE__ */
|
|
2803
|
+
return /* @__PURE__ */ jsx30(
|
|
2947
2804
|
"div",
|
|
2948
2805
|
{
|
|
2949
2806
|
className: cn(
|
|
@@ -2960,7 +2817,7 @@ var Toolbar = ({
|
|
|
2960
2817
|
};
|
|
2961
2818
|
|
|
2962
2819
|
// src/rte-text-editor.tsx
|
|
2963
|
-
import { jsx as
|
|
2820
|
+
import { jsx as jsx31, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2964
2821
|
var RichTextEditorRoot = ({
|
|
2965
2822
|
editor,
|
|
2966
2823
|
children,
|
|
@@ -2975,13 +2832,13 @@ var RichTextEditorRoot = ({
|
|
|
2975
2832
|
[labels]
|
|
2976
2833
|
);
|
|
2977
2834
|
const mergedIcons = useMemo2(() => ({ ...DEFAULT_ICONS, ...icons }), [icons]);
|
|
2978
|
-
const [tooltip] =
|
|
2835
|
+
const [tooltip] = useState8(() => TooltipPrimitive2.createHandle());
|
|
2979
2836
|
useEffect6(() => {
|
|
2980
2837
|
if (editor && editor.isEditable !== editable) {
|
|
2981
2838
|
editor.setEditable(editable);
|
|
2982
2839
|
}
|
|
2983
2840
|
}, [editor, editable]);
|
|
2984
|
-
return /* @__PURE__ */
|
|
2841
|
+
return /* @__PURE__ */ jsx31(
|
|
2985
2842
|
RichTextEditorContext.Provider,
|
|
2986
2843
|
{
|
|
2987
2844
|
value: {
|
|
@@ -2992,7 +2849,7 @@ var RichTextEditorRoot = ({
|
|
|
2992
2849
|
tooltip,
|
|
2993
2850
|
variant
|
|
2994
2851
|
},
|
|
2995
|
-
children: /* @__PURE__ */
|
|
2852
|
+
children: /* @__PURE__ */ jsx31(
|
|
2996
2853
|
"div",
|
|
2997
2854
|
{
|
|
2998
2855
|
className: cn(
|
|
@@ -3001,9 +2858,9 @@ var RichTextEditorRoot = ({
|
|
|
3001
2858
|
className
|
|
3002
2859
|
),
|
|
3003
2860
|
"data-variant": variant,
|
|
3004
|
-
children: /* @__PURE__ */
|
|
2861
|
+
children: /* @__PURE__ */ jsxs16(TooltipProvider, { children: [
|
|
3005
2862
|
children,
|
|
3006
|
-
/* @__PURE__ */
|
|
2863
|
+
/* @__PURE__ */ jsx31(Tooltip, { handle: tooltip, children: ({ payload }) => /* @__PURE__ */ jsx31(TooltipContent, { side: "bottom", children: payload }) })
|
|
3007
2864
|
] })
|
|
3008
2865
|
}
|
|
3009
2866
|
)
|
|
@@ -3062,18 +2919,8 @@ var Link2 = TipTapLink.extend({
|
|
|
3062
2919
|
};
|
|
3063
2920
|
}
|
|
3064
2921
|
}).configure({ openOnClick: false });
|
|
3065
|
-
|
|
3066
|
-
// src/extensions/code-block.ts
|
|
3067
|
-
import LowlightCodeBlock from "@tiptap/extension-code-block-lowlight";
|
|
3068
|
-
import { common, createLowlight } from "lowlight";
|
|
3069
|
-
var lowlight = createLowlight(common);
|
|
3070
|
-
var CodeBlock = LowlightCodeBlock.configure({
|
|
3071
|
-
defaultLanguage: "javascript",
|
|
3072
|
-
lowlight
|
|
3073
|
-
});
|
|
3074
2922
|
export {
|
|
3075
2923
|
BubbleMenu,
|
|
3076
|
-
CodeBlock,
|
|
3077
2924
|
DEFAULT_ICONS,
|
|
3078
2925
|
DEFAULT_LABELS,
|
|
3079
2926
|
DEFAULT_LANGUAGE_ICONS,
|