@editorcn/editor 0.3.9 → 0.4.1

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.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 useState9 } from "react";
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 jsx19, jsxs as jsxs7 } from "react/jsx-runtime";
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__ */ jsx19(
847
+ }) => /* @__PURE__ */ jsx18(
998
848
  "svg",
999
849
  {
1000
850
  xmlns: "http://www.w3.org/2000/svg",
@@ -1008,51 +858,57 @@ var Svg = ({
1008
858
  children
1009
859
  }
1010
860
  );
1011
- var Icon = ({ children }) => /* @__PURE__ */ jsx19(RteIcon, { children });
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__ */ jsx19(Icon, { children: /* @__PURE__ */ jsxs7(Svg, { children: [
1016
- /* @__PURE__ */ jsx19("path", { d: "M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z" }),
1017
- /* @__PURE__ */ jsx19("path", { d: "M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z" })
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
- isActive: (s) => s.isBold
869
+ isActive: (s) => s.isBold,
870
+ mark: "bold"
1020
871
  },
1021
872
  {
1022
873
  command: (e) => e.chain().focus().toggleItalic().run(),
1023
- icon: /* @__PURE__ */ jsx19(Icon, { children: /* @__PURE__ */ jsxs7(Svg, { children: [
1024
- /* @__PURE__ */ jsx19("line", { x1: "19", y1: "4", x2: "10", y2: "4" }),
1025
- /* @__PURE__ */ jsx19("line", { x1: "14", y1: "20", x2: "5", y2: "20" }),
1026
- /* @__PURE__ */ jsx19("line", { x1: "15", y1: "4", x2: "9", y2: "20" })
874
+ icon: /* @__PURE__ */ jsx18(Icon, { children: /* @__PURE__ */ jsxs6(Svg, { children: [
875
+ /* @__PURE__ */ jsx18("line", { x1: "19", y1: "4", x2: "10", y2: "4" }),
876
+ /* @__PURE__ */ jsx18("line", { x1: "14", y1: "20", x2: "5", y2: "20" }),
877
+ /* @__PURE__ */ jsx18("line", { x1: "15", y1: "4", x2: "9", y2: "20" })
1027
878
  ] }) }),
1028
- isActive: (s) => s.isItalic
879
+ isActive: (s) => s.isItalic,
880
+ mark: "italic"
1029
881
  },
1030
882
  {
1031
883
  command: (e) => e.chain().focus().toggleUnderline().run(),
1032
- icon: /* @__PURE__ */ jsx19(Icon, { children: /* @__PURE__ */ jsxs7(Svg, { children: [
1033
- /* @__PURE__ */ jsx19("path", { d: "M6 4v6a6 6 0 0 0 12 0V4" }),
1034
- /* @__PURE__ */ jsx19("line", { x1: "4", y1: "20", x2: "20", y2: "20" })
884
+ icon: /* @__PURE__ */ jsx18(Icon, { children: /* @__PURE__ */ jsxs6(Svg, { children: [
885
+ /* @__PURE__ */ jsx18("path", { d: "M6 4v6a6 6 0 0 0 12 0V4" }),
886
+ /* @__PURE__ */ jsx18("line", { x1: "4", y1: "20", x2: "20", y2: "20" })
1035
887
  ] }) }),
1036
- isActive: (s) => s.isUnderline
888
+ isActive: (s) => s.isUnderline,
889
+ mark: "underline"
1037
890
  },
1038
891
  {
1039
892
  command: (e) => e.chain().focus().toggleStrike().run(),
1040
- icon: /* @__PURE__ */ jsx19(Icon, { children: /* @__PURE__ */ jsxs7(Svg, { children: [
1041
- /* @__PURE__ */ jsx19("path", { d: "M16 4H9.5a3.5 3.5 0 0 0-2.9 5.4" }),
1042
- /* @__PURE__ */ jsx19("path", { d: "M14.5 14.6a3.5 3.5 0 0 1-2.9 5.4H8" }),
1043
- /* @__PURE__ */ jsx19("line", { x1: "4", y1: "12", x2: "20", y2: "12" })
893
+ icon: /* @__PURE__ */ jsx18(Icon, { children: /* @__PURE__ */ jsxs6(Svg, { children: [
894
+ /* @__PURE__ */ jsx18("path", { d: "M16 4H9.5a3.5 3.5 0 0 0-2.9 5.4" }),
895
+ /* @__PURE__ */ jsx18("path", { d: "M14.5 14.6a3.5 3.5 0 0 1-2.9 5.4H8" }),
896
+ /* @__PURE__ */ jsx18("line", { x1: "4", y1: "12", x2: "20", y2: "12" })
1044
897
  ] }) }),
1045
- isActive: (s) => s.isStrike
898
+ isActive: (s) => s.isStrike,
899
+ mark: "strike"
1046
900
  },
1047
901
  {
1048
902
  command: (e) => e.chain().focus().toggleCode().run(),
1049
- icon: /* @__PURE__ */ jsx19(Icon, { children: /* @__PURE__ */ jsxs7(Svg, { children: [
1050
- /* @__PURE__ */ jsx19("polyline", { points: "16 18 22 12 16 6" }),
1051
- /* @__PURE__ */ jsx19("polyline", { points: "8 6 2 12 8 18" })
903
+ icon: /* @__PURE__ */ jsx18(Icon, { children: /* @__PURE__ */ jsxs6(Svg, { children: [
904
+ /* @__PURE__ */ jsx18("polyline", { points: "16 18 22 12 16 6" }),
905
+ /* @__PURE__ */ jsx18("polyline", { points: "8 6 2 12 8 18" })
1052
906
  ] }) }),
1053
- isActive: (s) => s.isCode
907
+ isActive: (s) => s.isCode,
908
+ mark: "code"
1054
909
  }
1055
910
  ];
911
+ var getTextItems = (editor) => textItems.filter((item) => Boolean(editor.schema.marks[item.mark]));
1056
912
  var TextButtons = ({ editor }) => {
1057
913
  const editorState = useEditorState(
1058
914
  editor,
@@ -1065,7 +921,7 @@ var TextButtons = ({ editor }) => {
1065
921
  }),
1066
922
  shallowEqual
1067
923
  );
1068
- return /* @__PURE__ */ jsx19(RteButtonGroup, { children: textItems.map((item, i) => /* @__PURE__ */ jsx19(
924
+ return /* @__PURE__ */ jsx18(RteButtonGroup, { children: getTextItems(editor).map((item) => /* @__PURE__ */ jsx18(
1069
925
  RteButton,
1070
926
  {
1071
927
  active: item.isActive(editorState),
@@ -1073,20 +929,13 @@ var TextButtons = ({ editor }) => {
1073
929
  onClick: () => item.command(editor),
1074
930
  children: item.icon
1075
931
  },
1076
- i
932
+ item.mark
1077
933
  )) });
1078
934
  };
1079
935
 
1080
936
  // src/bubble-menu/index.tsx
1081
- import { Fragment as Fragment3, jsx as jsx20, jsxs as jsxs8 } from "react/jsx-runtime";
937
+ import { jsx as jsx19, jsxs as jsxs7 } from "react/jsx-runtime";
1082
938
  var BubbleMenu = ({ editor }) => {
1083
- const editorState = useEditorState(
1084
- editor,
1085
- (ed) => ({
1086
- isCodeBlock: ed.isActive("codeBlock")
1087
- }),
1088
- shallowEqual
1089
- );
1090
939
  const shouldShow = useCallback3(
1091
940
  ({
1092
941
  editor: ed,
@@ -1096,7 +945,7 @@ var BubbleMenu = ({ editor }) => {
1096
945
  if (!ed.isEditable) {
1097
946
  return false;
1098
947
  }
1099
- if (selection.empty && !ed.isActive("codeBlock")) {
948
+ if (selection.empty || ed.isActive("codeBlock")) {
1100
949
  return false;
1101
950
  }
1102
951
  if (!selection.empty && !isTextSelection(selection)) {
@@ -1109,18 +958,24 @@ var BubbleMenu = ({ editor }) => {
1109
958
  if (!editor) {
1110
959
  return null;
1111
960
  }
1112
- const isCodeBlockActive = editorState?.isCodeBlock ?? false;
1113
- return /* @__PURE__ */ jsx20(
961
+ const hasText = getTextItems(editor).length > 0;
962
+ const hasColor = editor.extensionManager.extensions.some(
963
+ (ext) => ext.name === "color" || ext.name === "highlight"
964
+ );
965
+ if (!(hasText || hasColor)) {
966
+ return null;
967
+ }
968
+ return /* @__PURE__ */ jsx19(
1114
969
  TiptapBubbleMenu,
1115
970
  {
1116
971
  editor,
1117
972
  options: { offset: 8, placement: "top" },
1118
973
  shouldShow,
1119
- children: /* @__PURE__ */ jsx20("div", { className: "rte-bubble-menu", children: isCodeBlockActive ? /* @__PURE__ */ jsx20(LanguageSelector, { editor }) : /* @__PURE__ */ jsxs8(Fragment3, { children: [
1120
- /* @__PURE__ */ jsx20(TextButtons, { editor }),
1121
- /* @__PURE__ */ jsx20(RteSeparator, {}),
1122
- /* @__PURE__ */ jsx20(ColorSelector, { editor })
1123
- ] }) })
974
+ children: /* @__PURE__ */ jsxs7("div", { className: "rte-bubble-menu", children: [
975
+ hasText && /* @__PURE__ */ jsx19(TextButtons, { editor }),
976
+ hasText && hasColor && /* @__PURE__ */ jsx19(RteSeparator, {}),
977
+ hasColor && /* @__PURE__ */ jsx19(ColorSelector, { editor })
978
+ ] })
1124
979
  }
1125
980
  );
1126
981
  };
@@ -1128,7 +983,22 @@ var BubbleMenu = ({ editor }) => {
1128
983
  // src/controls/rte-control.tsx
1129
984
  import { useEditorState as useEditorState2 } from "@tiptap/react";
1130
985
  import { useContext as useContext2 } from "react";
1131
- import { jsx as jsx21 } from "react/jsx-runtime";
986
+
987
+ // src/rte-context.ts
988
+ import { createContext, useContext } from "react";
989
+ var RichTextEditorContext = createContext(null);
990
+ var useRichTextEditorContext = () => {
991
+ const context = useContext(RichTextEditorContext);
992
+ if (!context) {
993
+ throw new Error(
994
+ "useRichTextEditorContext must be used within RichTextEditor"
995
+ );
996
+ }
997
+ return context;
998
+ };
999
+
1000
+ // src/controls/rte-control.tsx
1001
+ import { jsx as jsx20 } from "react/jsx-runtime";
1132
1002
  var RichTextEditorTooltip = ({
1133
1003
  children,
1134
1004
  label
@@ -1137,7 +1007,7 @@ var RichTextEditorTooltip = ({
1137
1007
  if (!tooltip) {
1138
1008
  return children;
1139
1009
  }
1140
- return /* @__PURE__ */ jsx21(TooltipTrigger, { handle: tooltip, payload: label, render: children });
1010
+ return /* @__PURE__ */ jsx20(TooltipTrigger, { handle: tooltip, payload: label, render: children });
1141
1011
  };
1142
1012
  var RichTextEditorControl = ({
1143
1013
  active = false,
@@ -1149,7 +1019,7 @@ var RichTextEditorControl = ({
1149
1019
  disabled,
1150
1020
  ...props
1151
1021
  }) => {
1152
- const toggle = /* @__PURE__ */ jsx21(
1022
+ const toggle = /* @__PURE__ */ jsx20(
1153
1023
  Toggle,
1154
1024
  {
1155
1025
  size: "sm",
@@ -1165,7 +1035,7 @@ var RichTextEditorControl = ({
1165
1035
  children
1166
1036
  }
1167
1037
  );
1168
- return props.title ? /* @__PURE__ */ jsx21(RichTextEditorTooltip, { label: props.title, children: toggle }) : toggle;
1038
+ return props.title ? /* @__PURE__ */ jsx20(RichTextEditorTooltip, { label: props.title, children: toggle }) : toggle;
1169
1039
  };
1170
1040
  var resolveIsActive = (editor, config) => {
1171
1041
  if (!editor || !config) {
@@ -1196,7 +1066,7 @@ var createControl = ({
1196
1066
  const selector = createSelector(isActive, isDisabled);
1197
1067
  useEditorState2({ editor: editor ?? null, selector });
1198
1068
  const { active, disabled } = selector({ editor: editor ?? null });
1199
- return /* @__PURE__ */ jsx21(
1069
+ return /* @__PURE__ */ jsx20(
1200
1070
  RichTextEditorControl,
1201
1071
  {
1202
1072
  active,
@@ -1383,12 +1253,12 @@ var SuperscriptControl = createControl({
1383
1253
  // src/controls/rte-link-control.tsx
1384
1254
  import { useEditorState as useEditorState3 } from "@tiptap/react";
1385
1255
  import * as React15 from "react";
1386
- import { useCallback as useCallback4, useState as useState4 } from "react";
1387
- import { jsx as jsx22, jsxs as jsxs9 } from "react/jsx-runtime";
1256
+ import { useCallback as useCallback4, useState as useState3 } from "react";
1257
+ import { jsx as jsx21, jsxs as jsxs8 } from "react/jsx-runtime";
1388
1258
  var LinkControl = () => {
1389
1259
  const { editor, icons, labels, tooltip } = useRichTextEditorContext();
1390
- const [url, setUrl] = useState4("");
1391
- const [open, setOpen] = useState4(false);
1260
+ const [url, setUrl] = useState3("");
1261
+ const [open, setOpen] = useState3(false);
1392
1262
  const active = useEditorState3({
1393
1263
  editor: editor ?? null,
1394
1264
  selector: (ctx) => ctx.editor && !ctx.editor.isDestroyed ? ctx.editor.isActive("link") : false
@@ -1428,16 +1298,16 @@ var LinkControl = () => {
1428
1298
  window.addEventListener("edit-link", handler);
1429
1299
  return () => window.removeEventListener("edit-link", handler);
1430
1300
  }, [handleOpen]);
1431
- return /* @__PURE__ */ jsxs9(Popover, { open, onOpenChange: handleOpen, children: [
1432
- /* @__PURE__ */ jsx22(
1301
+ return /* @__PURE__ */ jsxs8(Popover, { open, onOpenChange: handleOpen, children: [
1302
+ /* @__PURE__ */ jsx21(
1433
1303
  TooltipTrigger,
1434
1304
  {
1435
1305
  handle: tooltip,
1436
1306
  payload: labels.linkControlLabel,
1437
- render: /* @__PURE__ */ jsx22(
1307
+ render: /* @__PURE__ */ jsx21(
1438
1308
  PopoverTrigger,
1439
1309
  {
1440
- render: /* @__PURE__ */ jsx22(
1310
+ render: /* @__PURE__ */ jsx21(
1441
1311
  Toggle,
1442
1312
  {
1443
1313
  size: "sm",
@@ -1452,8 +1322,8 @@ var LinkControl = () => {
1452
1322
  )
1453
1323
  }
1454
1324
  ),
1455
- /* @__PURE__ */ jsx22(PopoverContent, { className: "w-72 p-3", children: /* @__PURE__ */ jsxs9("div", { className: "rte-link-editor", children: [
1456
- /* @__PURE__ */ jsx22(
1325
+ /* @__PURE__ */ jsx21(PopoverContent, { className: "w-72 p-3", children: /* @__PURE__ */ jsxs8("div", { className: "rte-link-editor", children: [
1326
+ /* @__PURE__ */ jsx21(
1457
1327
  Input,
1458
1328
  {
1459
1329
  type: "url",
@@ -1465,7 +1335,7 @@ var LinkControl = () => {
1465
1335
  className: "rte-link-editor-input h-8 text-sm"
1466
1336
  }
1467
1337
  ),
1468
- /* @__PURE__ */ jsx22(
1338
+ /* @__PURE__ */ jsx21(
1469
1339
  Button,
1470
1340
  {
1471
1341
  size: "sm",
@@ -1487,11 +1357,11 @@ import {
1487
1357
  parseAttributes
1488
1358
  } from "@tiptap/core";
1489
1359
  import { ReactNodeViewRenderer, useEditorState as useEditorState4 } from "@tiptap/react";
1490
- import { useState as useState6, useCallback as useCallback6, useEffect as useEffect4, useRef as useRef4 } from "react";
1360
+ import { useState as useState5, useCallback as useCallback6, useEffect as useEffect4, useRef as useRef4 } from "react";
1491
1361
 
1492
1362
  // src/extensions/resizable-node-view.tsx
1493
1363
  import { NodeViewWrapper } from "@tiptap/react";
1494
- import { useCallback as useCallback5, useEffect as useEffect3, useRef as useRef3, useState as useState5 } from "react";
1364
+ import { useCallback as useCallback5, useEffect as useEffect3, useRef as useRef3, useState as useState4 } from "react";
1495
1365
 
1496
1366
  // src/icons.tsx
1497
1367
  import {
@@ -1528,11 +1398,11 @@ import "react";
1528
1398
 
1529
1399
  // src/language-icons.tsx
1530
1400
  import "react";
1531
- import { jsx as jsx23, jsxs as jsxs10 } from "react/jsx-runtime";
1401
+ import { jsx as jsx22, jsxs as jsxs9 } from "react/jsx-runtime";
1532
1402
  var LangIcon = ({
1533
1403
  children,
1534
1404
  className
1535
- }) => /* @__PURE__ */ jsx23(
1405
+ }) => /* @__PURE__ */ jsx22(
1536
1406
  "svg",
1537
1407
  {
1538
1408
  xmlns: "http://www.w3.org/2000/svg",
@@ -1547,140 +1417,140 @@ var LangIcon = ({
1547
1417
  }
1548
1418
  );
1549
1419
  var DEFAULT_LANGUAGE_ICONS = {
1550
- bash: /* @__PURE__ */ jsxs10(LangIcon, { children: [
1551
- /* @__PURE__ */ jsx23("rect", { x: "2.5", y: "4", width: "19", height: "16", rx: "2" }),
1552
- /* @__PURE__ */ jsx23("path", { d: "M6.5 9.5l3.5 3-3.5 3" }),
1553
- /* @__PURE__ */ jsx23("path", { d: "M12 15.5h5.5" })
1420
+ bash: /* @__PURE__ */ jsxs9(LangIcon, { children: [
1421
+ /* @__PURE__ */ jsx22("rect", { x: "2.5", y: "4", width: "19", height: "16", rx: "2" }),
1422
+ /* @__PURE__ */ jsx22("path", { d: "M6.5 9.5l3.5 3-3.5 3" }),
1423
+ /* @__PURE__ */ jsx22("path", { d: "M12 15.5h5.5" })
1554
1424
  ] }),
1555
- c: /* @__PURE__ */ jsxs10(LangIcon, { children: [
1556
- /* @__PURE__ */ jsx23("circle", { cx: "12", cy: "12", r: "8.5" }),
1557
- /* @__PURE__ */ jsx23("path", { d: "M15.6 9.3a4.5 4.5 0 1 0 0 5.4" })
1425
+ c: /* @__PURE__ */ jsxs9(LangIcon, { children: [
1426
+ /* @__PURE__ */ jsx22("circle", { cx: "12", cy: "12", r: "8.5" }),
1427
+ /* @__PURE__ */ jsx22("path", { d: "M15.6 9.3a4.5 4.5 0 1 0 0 5.4" })
1558
1428
  ] }),
1559
- cpp: /* @__PURE__ */ jsxs10(LangIcon, { children: [
1560
- /* @__PURE__ */ jsx23("circle", { cx: "9.5", cy: "12", r: "6.5" }),
1561
- /* @__PURE__ */ jsx23("path", { d: "M12.3 9.7a3.3 3.3 0 1 0 0 4.6" }),
1562
- /* @__PURE__ */ jsx23("path", { d: "M15.7 10.5v3M14.2 12h3" }),
1563
- /* @__PURE__ */ jsx23("path", { d: "M19.3 10.5v3M17.8 12h3" })
1429
+ cpp: /* @__PURE__ */ jsxs9(LangIcon, { children: [
1430
+ /* @__PURE__ */ jsx22("circle", { cx: "9.5", cy: "12", r: "6.5" }),
1431
+ /* @__PURE__ */ jsx22("path", { d: "M12.3 9.7a3.3 3.3 0 1 0 0 4.6" }),
1432
+ /* @__PURE__ */ jsx22("path", { d: "M15.7 10.5v3M14.2 12h3" }),
1433
+ /* @__PURE__ */ jsx22("path", { d: "M19.3 10.5v3M17.8 12h3" })
1564
1434
  ] }),
1565
- css: /* @__PURE__ */ jsxs10(LangIcon, { children: [
1566
- /* @__PURE__ */ jsx23("rect", { x: "3", y: "3", width: "18", height: "18", rx: "4" }),
1567
- /* @__PURE__ */ jsx23("path", { d: "M9.7 7.5l-1 9" }),
1568
- /* @__PURE__ */ jsx23("path", { d: "M15.3 7.5l-1 9" }),
1569
- /* @__PURE__ */ jsx23("path", { d: "M7 10.3h11" }),
1570
- /* @__PURE__ */ jsx23("path", { d: "M6.5 14.3h11" })
1435
+ css: /* @__PURE__ */ jsxs9(LangIcon, { children: [
1436
+ /* @__PURE__ */ jsx22("rect", { x: "3", y: "3", width: "18", height: "18", rx: "4" }),
1437
+ /* @__PURE__ */ jsx22("path", { d: "M9.7 7.5l-1 9" }),
1438
+ /* @__PURE__ */ jsx22("path", { d: "M15.3 7.5l-1 9" }),
1439
+ /* @__PURE__ */ jsx22("path", { d: "M7 10.3h11" }),
1440
+ /* @__PURE__ */ jsx22("path", { d: "M6.5 14.3h11" })
1571
1441
  ] }),
1572
- go: /* @__PURE__ */ jsxs10(LangIcon, { children: [
1573
- /* @__PURE__ */ jsx23("rect", { x: "3", y: "3", width: "18", height: "18", rx: "4" }),
1574
- /* @__PURE__ */ jsx23("path", { d: "M12.6 9.7A3.3 3.3 0 1 0 12.6 14.3" }),
1575
- /* @__PURE__ */ jsx23("path", { d: "M12.6 12h-1.9" }),
1576
- /* @__PURE__ */ jsx23("circle", { cx: "17", cy: "12", r: "2.9" })
1442
+ go: /* @__PURE__ */ jsxs9(LangIcon, { children: [
1443
+ /* @__PURE__ */ jsx22("rect", { x: "3", y: "3", width: "18", height: "18", rx: "4" }),
1444
+ /* @__PURE__ */ jsx22("path", { d: "M12.6 9.7A3.3 3.3 0 1 0 12.6 14.3" }),
1445
+ /* @__PURE__ */ jsx22("path", { d: "M12.6 12h-1.9" }),
1446
+ /* @__PURE__ */ jsx22("circle", { cx: "17", cy: "12", r: "2.9" })
1577
1447
  ] }),
1578
- html: /* @__PURE__ */ jsxs10(LangIcon, { children: [
1579
- /* @__PURE__ */ jsx23("rect", { x: "3", y: "3", width: "18", height: "18", rx: "4" }),
1580
- /* @__PURE__ */ jsx23("path", { d: "M9.5 8.5L6.5 12l3 3.5" }),
1581
- /* @__PURE__ */ jsx23("path", { d: "M14.5 8.5L17.5 12l-3 3.5" }),
1582
- /* @__PURE__ */ jsx23("path", { d: "M13 7.3l-2 9.4" })
1448
+ html: /* @__PURE__ */ jsxs9(LangIcon, { children: [
1449
+ /* @__PURE__ */ jsx22("rect", { x: "3", y: "3", width: "18", height: "18", rx: "4" }),
1450
+ /* @__PURE__ */ jsx22("path", { d: "M9.5 8.5L6.5 12l3 3.5" }),
1451
+ /* @__PURE__ */ jsx22("path", { d: "M14.5 8.5L17.5 12l-3 3.5" }),
1452
+ /* @__PURE__ */ jsx22("path", { d: "M13 7.3l-2 9.4" })
1583
1453
  ] }),
1584
- java: /* @__PURE__ */ jsxs10(LangIcon, { children: [
1585
- /* @__PURE__ */ jsx23("path", { d: "M6 10h10v5a3 3 0 0 1-3 3H9a3 3 0 0 1-3-3v-5z" }),
1586
- /* @__PURE__ */ jsx23("path", { d: "M16 12h1.3a1.8 1.8 0 0 1 0 3.6H16" }),
1587
- /* @__PURE__ */ jsx23("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" }),
1588
- /* @__PURE__ */ jsx23("path", { d: "M6 19.3h10" })
1454
+ java: /* @__PURE__ */ jsxs9(LangIcon, { children: [
1455
+ /* @__PURE__ */ jsx22("path", { d: "M6 10h10v5a3 3 0 0 1-3 3H9a3 3 0 0 1-3-3v-5z" }),
1456
+ /* @__PURE__ */ jsx22("path", { d: "M16 12h1.3a1.8 1.8 0 0 1 0 3.6H16" }),
1457
+ /* @__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" }),
1458
+ /* @__PURE__ */ jsx22("path", { d: "M6 19.3h10" })
1589
1459
  ] }),
1590
- javascript: /* @__PURE__ */ jsxs10(LangIcon, { children: [
1591
- /* @__PURE__ */ jsx23("rect", { x: "3", y: "3", width: "18", height: "18", rx: "4" }),
1592
- /* @__PURE__ */ jsx23("path", { d: "M10.5 8v6.5a2 2 0 0 1-3.5 1.3" }),
1593
- /* @__PURE__ */ jsx23("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" })
1460
+ javascript: /* @__PURE__ */ jsxs9(LangIcon, { children: [
1461
+ /* @__PURE__ */ jsx22("rect", { x: "3", y: "3", width: "18", height: "18", rx: "4" }),
1462
+ /* @__PURE__ */ jsx22("path", { d: "M10.5 8v6.5a2 2 0 0 1-3.5 1.3" }),
1463
+ /* @__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
1464
  ] }),
1595
- json: /* @__PURE__ */ jsxs10(LangIcon, { children: [
1596
- /* @__PURE__ */ jsx23("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" }),
1597
- /* @__PURE__ */ jsx23("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" })
1465
+ json: /* @__PURE__ */ jsxs9(LangIcon, { children: [
1466
+ /* @__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" }),
1467
+ /* @__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
1468
  ] }),
1599
- kotlin: /* @__PURE__ */ jsxs10(LangIcon, { children: [
1600
- /* @__PURE__ */ jsx23("rect", { x: "3", y: "3", width: "18", height: "18", rx: "4" }),
1601
- /* @__PURE__ */ jsx23("path", { d: "M9 7.5v9" }),
1602
- /* @__PURE__ */ jsx23("path", { d: "M9 12l6-4.5" }),
1603
- /* @__PURE__ */ jsx23("path", { d: "M9 12l6 4.5" })
1469
+ kotlin: /* @__PURE__ */ jsxs9(LangIcon, { children: [
1470
+ /* @__PURE__ */ jsx22("rect", { x: "3", y: "3", width: "18", height: "18", rx: "4" }),
1471
+ /* @__PURE__ */ jsx22("path", { d: "M9 7.5v9" }),
1472
+ /* @__PURE__ */ jsx22("path", { d: "M9 12l6-4.5" }),
1473
+ /* @__PURE__ */ jsx22("path", { d: "M9 12l6 4.5" })
1604
1474
  ] }),
1605
- markdown: /* @__PURE__ */ jsxs10(LangIcon, { children: [
1606
- /* @__PURE__ */ jsx23("rect", { x: "2", y: "5", width: "20", height: "14", rx: "2" }),
1607
- /* @__PURE__ */ jsx23("path", { d: "M6 15V9l3 4 3-4v6" }),
1608
- /* @__PURE__ */ jsx23("path", { d: "M16.5 9v6" }),
1609
- /* @__PURE__ */ jsx23("path", { d: "M14.5 13l2 2 2-2" })
1475
+ markdown: /* @__PURE__ */ jsxs9(LangIcon, { children: [
1476
+ /* @__PURE__ */ jsx22("rect", { x: "2", y: "5", width: "20", height: "14", rx: "2" }),
1477
+ /* @__PURE__ */ jsx22("path", { d: "M6 15V9l3 4 3-4v6" }),
1478
+ /* @__PURE__ */ jsx22("path", { d: "M16.5 9v6" }),
1479
+ /* @__PURE__ */ jsx22("path", { d: "M14.5 13l2 2 2-2" })
1610
1480
  ] }),
1611
- php: /* @__PURE__ */ jsxs10(LangIcon, { children: [
1612
- /* @__PURE__ */ jsx23("rect", { x: "3", y: "3", width: "18", height: "18", rx: "4" }),
1613
- /* @__PURE__ */ jsx23("path", { d: "M11.5 8.5L7.5 12l4 3.5" }),
1614
- /* @__PURE__ */ jsx23("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" }),
1615
- /* @__PURE__ */ jsx23("circle", { cx: "14.3", cy: "16.2", r: ".5", fill: "currentColor", stroke: "none" })
1481
+ php: /* @__PURE__ */ jsxs9(LangIcon, { children: [
1482
+ /* @__PURE__ */ jsx22("rect", { x: "3", y: "3", width: "18", height: "18", rx: "4" }),
1483
+ /* @__PURE__ */ jsx22("path", { d: "M11.5 8.5L7.5 12l4 3.5" }),
1484
+ /* @__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" }),
1485
+ /* @__PURE__ */ jsx22("circle", { cx: "14.3", cy: "16.2", r: ".5", fill: "currentColor", stroke: "none" })
1616
1486
  ] }),
1617
- plaintext: /* @__PURE__ */ jsxs10(LangIcon, { children: [
1618
- /* @__PURE__ */ jsx23("rect", { x: "4", y: "2.5", width: "16", height: "19", rx: "2" }),
1619
- /* @__PURE__ */ jsx23("line", { x1: "7.5", y1: "7.5", x2: "16.5", y2: "7.5" }),
1620
- /* @__PURE__ */ jsx23("line", { x1: "7.5", y1: "11.5", x2: "16.5", y2: "11.5" }),
1621
- /* @__PURE__ */ jsx23("line", { x1: "7.5", y1: "15.5", x2: "13.5", y2: "15.5" })
1487
+ plaintext: /* @__PURE__ */ jsxs9(LangIcon, { children: [
1488
+ /* @__PURE__ */ jsx22("rect", { x: "4", y: "2.5", width: "16", height: "19", rx: "2" }),
1489
+ /* @__PURE__ */ jsx22("line", { x1: "7.5", y1: "7.5", x2: "16.5", y2: "7.5" }),
1490
+ /* @__PURE__ */ jsx22("line", { x1: "7.5", y1: "11.5", x2: "16.5", y2: "11.5" }),
1491
+ /* @__PURE__ */ jsx22("line", { x1: "7.5", y1: "15.5", x2: "13.5", y2: "15.5" })
1622
1492
  ] }),
1623
- python: /* @__PURE__ */ jsxs10(LangIcon, { children: [
1624
- /* @__PURE__ */ jsx23("path", { d: "M4.5 15c0-3 2.5-4.7 5.7-4.7h1.6c2.8 0 5-2 5-4.5" }),
1625
- /* @__PURE__ */ jsx23("path", { d: "M9.5 3.3c1.3-.3 2.6 0 3.3 1-.7 1-2 1.3-3.3 1" }),
1626
- /* @__PURE__ */ jsx23("circle", { cx: "15.5", cy: "4.3", r: ".55", fill: "currentColor", stroke: "none" }),
1627
- /* @__PURE__ */ jsx23("path", { d: "M17.8 4.5l1.4-.6M17.8 4.9l1.4.6" })
1493
+ python: /* @__PURE__ */ jsxs9(LangIcon, { children: [
1494
+ /* @__PURE__ */ jsx22("path", { d: "M4.5 15c0-3 2.5-4.7 5.7-4.7h1.6c2.8 0 5-2 5-4.5" }),
1495
+ /* @__PURE__ */ jsx22("path", { d: "M9.5 3.3c1.3-.3 2.6 0 3.3 1-.7 1-2 1.3-3.3 1" }),
1496
+ /* @__PURE__ */ jsx22("circle", { cx: "15.5", cy: "4.3", r: ".55", fill: "currentColor", stroke: "none" }),
1497
+ /* @__PURE__ */ jsx22("path", { d: "M17.8 4.5l1.4-.6M17.8 4.9l1.4.6" })
1628
1498
  ] }),
1629
- ruby: /* @__PURE__ */ jsxs10(LangIcon, { children: [
1630
- /* @__PURE__ */ jsx23("polygon", { points: "12 2.5 19.5 8 12 21.5 4.5 8" }),
1631
- /* @__PURE__ */ jsx23("path", { d: "M4.5 8h15" }),
1632
- /* @__PURE__ */ jsx23("path", { d: "M12 2.5v19" })
1499
+ ruby: /* @__PURE__ */ jsxs9(LangIcon, { children: [
1500
+ /* @__PURE__ */ jsx22("polygon", { points: "12 2.5 19.5 8 12 21.5 4.5 8" }),
1501
+ /* @__PURE__ */ jsx22("path", { d: "M4.5 8h15" }),
1502
+ /* @__PURE__ */ jsx22("path", { d: "M12 2.5v19" })
1633
1503
  ] }),
1634
- rust: /* @__PURE__ */ jsxs10(LangIcon, { children: [
1635
- /* @__PURE__ */ jsx23("circle", { cx: "12", cy: "12", r: "7" }),
1636
- /* @__PURE__ */ jsx23("circle", { cx: "12", cy: "12", r: "2.3" }),
1637
- /* @__PURE__ */ jsx23("path", { d: "M12 2.5v3M12 18.5v3M2.5 12h3M18.5 12h3" }),
1638
- /* @__PURE__ */ jsx23("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" })
1504
+ rust: /* @__PURE__ */ jsxs9(LangIcon, { children: [
1505
+ /* @__PURE__ */ jsx22("circle", { cx: "12", cy: "12", r: "7" }),
1506
+ /* @__PURE__ */ jsx22("circle", { cx: "12", cy: "12", r: "2.3" }),
1507
+ /* @__PURE__ */ jsx22("path", { d: "M12 2.5v3M12 18.5v3M2.5 12h3M18.5 12h3" }),
1508
+ /* @__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
1509
  ] }),
1640
- sql: /* @__PURE__ */ jsxs10(LangIcon, { children: [
1641
- /* @__PURE__ */ jsx23("ellipse", { cx: "12", cy: "6", rx: "8", ry: "3" }),
1642
- /* @__PURE__ */ jsx23("path", { d: "M4 6v6c0 1.7 3.6 3 8 3s8-1.3 8-3V6" }),
1643
- /* @__PURE__ */ jsx23("path", { d: "M4 12v6c0 1.7 3.6 3 8 3s8-1.3 8-3v-6" })
1510
+ sql: /* @__PURE__ */ jsxs9(LangIcon, { children: [
1511
+ /* @__PURE__ */ jsx22("ellipse", { cx: "12", cy: "6", rx: "8", ry: "3" }),
1512
+ /* @__PURE__ */ jsx22("path", { d: "M4 6v6c0 1.7 3.6 3 8 3s8-1.3 8-3V6" }),
1513
+ /* @__PURE__ */ jsx22("path", { d: "M4 12v6c0 1.7 3.6 3 8 3s8-1.3 8-3v-6" })
1644
1514
  ] }),
1645
- swift: /* @__PURE__ */ jsx23(LangIcon, { children: /* @__PURE__ */ jsx23("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" }) }),
1646
- typescript: /* @__PURE__ */ jsxs10(LangIcon, { children: [
1647
- /* @__PURE__ */ jsx23("rect", { x: "3", y: "3", width: "18", height: "18", rx: "4" }),
1648
- /* @__PURE__ */ jsx23("path", { d: "M7.3 8.2h5M9.8 8.2v7.6" }),
1649
- /* @__PURE__ */ jsx23("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" })
1515
+ 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" }) }),
1516
+ typescript: /* @__PURE__ */ jsxs9(LangIcon, { children: [
1517
+ /* @__PURE__ */ jsx22("rect", { x: "3", y: "3", width: "18", height: "18", rx: "4" }),
1518
+ /* @__PURE__ */ jsx22("path", { d: "M7.3 8.2h5M9.8 8.2v7.6" }),
1519
+ /* @__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
1520
  ] }),
1651
- xml: /* @__PURE__ */ jsxs10(LangIcon, { children: [
1652
- /* @__PURE__ */ jsx23("path", { d: "M8 7l-4.5 5 4.5 5" }),
1653
- /* @__PURE__ */ jsx23("path", { d: "M16 7l4.5 5-4.5 5" }),
1654
- /* @__PURE__ */ jsx23("path", { d: "M12 8v8" })
1521
+ xml: /* @__PURE__ */ jsxs9(LangIcon, { children: [
1522
+ /* @__PURE__ */ jsx22("path", { d: "M8 7l-4.5 5 4.5 5" }),
1523
+ /* @__PURE__ */ jsx22("path", { d: "M16 7l4.5 5-4.5 5" }),
1524
+ /* @__PURE__ */ jsx22("path", { d: "M12 8v8" })
1655
1525
  ] }),
1656
- yaml: /* @__PURE__ */ jsxs10(LangIcon, { children: [
1657
- /* @__PURE__ */ jsx23("rect", { x: "2.5", y: "3", width: "19", height: "18", rx: "2" }),
1658
- /* @__PURE__ */ jsx23("path", { d: "M6.5 8h2M9.5 8h8" }),
1659
- /* @__PURE__ */ jsx23("path", { d: "M6.5 12h2M9.5 12h6" }),
1660
- /* @__PURE__ */ jsx23("path", { d: "M6.5 16h2M9.5 16h7" })
1526
+ yaml: /* @__PURE__ */ jsxs9(LangIcon, { children: [
1527
+ /* @__PURE__ */ jsx22("rect", { x: "2.5", y: "3", width: "19", height: "18", rx: "2" }),
1528
+ /* @__PURE__ */ jsx22("path", { d: "M6.5 8h2M9.5 8h8" }),
1529
+ /* @__PURE__ */ jsx22("path", { d: "M6.5 12h2M9.5 12h6" }),
1530
+ /* @__PURE__ */ jsx22("path", { d: "M6.5 16h2M9.5 16h7" })
1661
1531
  ] })
1662
1532
  };
1663
1533
 
1664
1534
  // src/icons.tsx
1665
- import { Fragment as Fragment4, jsx as jsx24, jsxs as jsxs11 } from "react/jsx-runtime";
1535
+ import { Fragment as Fragment2, jsx as jsx23, jsxs as jsxs10 } from "react/jsx-runtime";
1666
1536
  var ALIGN_PATHS = {
1667
- center: /* @__PURE__ */ jsxs11(Fragment4, { children: [
1668
- /* @__PURE__ */ jsx24("line", { x1: "21", y1: "6", x2: "3", y2: "6" }),
1669
- /* @__PURE__ */ jsx24("line", { x1: "17", y1: "12", x2: "7", y2: "12" }),
1670
- /* @__PURE__ */ jsx24("line", { x1: "19", y1: "18", x2: "5", y2: "18" })
1537
+ center: /* @__PURE__ */ jsxs10(Fragment2, { children: [
1538
+ /* @__PURE__ */ jsx23("line", { x1: "21", y1: "6", x2: "3", y2: "6" }),
1539
+ /* @__PURE__ */ jsx23("line", { x1: "17", y1: "12", x2: "7", y2: "12" }),
1540
+ /* @__PURE__ */ jsx23("line", { x1: "19", y1: "18", x2: "5", y2: "18" })
1671
1541
  ] }),
1672
- left: /* @__PURE__ */ jsxs11(Fragment4, { children: [
1673
- /* @__PURE__ */ jsx24("line", { x1: "21", y1: "6", x2: "3", y2: "6" }),
1674
- /* @__PURE__ */ jsx24("line", { x1: "15", y1: "12", x2: "3", y2: "12" }),
1675
- /* @__PURE__ */ jsx24("line", { x1: "17", y1: "18", x2: "3", y2: "18" })
1542
+ left: /* @__PURE__ */ jsxs10(Fragment2, { children: [
1543
+ /* @__PURE__ */ jsx23("line", { x1: "21", y1: "6", x2: "3", y2: "6" }),
1544
+ /* @__PURE__ */ jsx23("line", { x1: "15", y1: "12", x2: "3", y2: "12" }),
1545
+ /* @__PURE__ */ jsx23("line", { x1: "17", y1: "18", x2: "3", y2: "18" })
1676
1546
  ] }),
1677
- right: /* @__PURE__ */ jsxs11(Fragment4, { children: [
1678
- /* @__PURE__ */ jsx24("line", { x1: "21", y1: "6", x2: "3", y2: "6" }),
1679
- /* @__PURE__ */ jsx24("line", { x1: "21", y1: "12", x2: "9", y2: "12" }),
1680
- /* @__PURE__ */ jsx24("line", { x1: "21", y1: "18", x2: "7", y2: "18" })
1547
+ right: /* @__PURE__ */ jsxs10(Fragment2, { children: [
1548
+ /* @__PURE__ */ jsx23("line", { x1: "21", y1: "6", x2: "3", y2: "6" }),
1549
+ /* @__PURE__ */ jsx23("line", { x1: "21", y1: "12", x2: "9", y2: "12" }),
1550
+ /* @__PURE__ */ jsx23("line", { x1: "21", y1: "18", x2: "7", y2: "18" })
1681
1551
  ] })
1682
1552
  };
1683
- var AlignIcon = ({ dir }) => /* @__PURE__ */ jsx24(
1553
+ var AlignIcon = ({ dir }) => /* @__PURE__ */ jsx23(
1684
1554
  "svg",
1685
1555
  {
1686
1556
  xmlns: "http://www.w3.org/2000/svg",
@@ -1694,7 +1564,7 @@ var AlignIcon = ({ dir }) => /* @__PURE__ */ jsx24(
1694
1564
  children: ALIGN_PATHS[dir]
1695
1565
  }
1696
1566
  );
1697
- var EditUrlIcon = () => /* @__PURE__ */ jsxs11(
1567
+ var EditUrlIcon = () => /* @__PURE__ */ jsxs10(
1698
1568
  "svg",
1699
1569
  {
1700
1570
  xmlns: "http://www.w3.org/2000/svg",
@@ -1706,12 +1576,12 @@ var EditUrlIcon = () => /* @__PURE__ */ jsxs11(
1706
1576
  strokeLinejoin: "round",
1707
1577
  className: "rte-editor-icon",
1708
1578
  children: [
1709
- /* @__PURE__ */ jsx24("path", { d: "M12 20h9" }),
1710
- /* @__PURE__ */ jsx24("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z" })
1579
+ /* @__PURE__ */ jsx23("path", { d: "M12 20h9" }),
1580
+ /* @__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
1581
  ]
1712
1582
  }
1713
1583
  );
1714
- var OpenInYouTubeIcon = () => /* @__PURE__ */ jsxs11(
1584
+ var OpenInYouTubeIcon = () => /* @__PURE__ */ jsxs10(
1715
1585
  "svg",
1716
1586
  {
1717
1587
  xmlns: "http://www.w3.org/2000/svg",
@@ -1723,13 +1593,13 @@ var OpenInYouTubeIcon = () => /* @__PURE__ */ jsxs11(
1723
1593
  strokeLinejoin: "round",
1724
1594
  className: "rte-editor-icon",
1725
1595
  children: [
1726
- /* @__PURE__ */ jsx24("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
1727
- /* @__PURE__ */ jsx24("polyline", { points: "15 3 21 3 21 9" }),
1728
- /* @__PURE__ */ jsx24("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
1596
+ /* @__PURE__ */ jsx23("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
1597
+ /* @__PURE__ */ jsx23("polyline", { points: "15 3 21 3 21 9" }),
1598
+ /* @__PURE__ */ jsx23("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
1729
1599
  ]
1730
1600
  }
1731
1601
  );
1732
- var DeleteEmbedIcon = () => /* @__PURE__ */ jsxs11(
1602
+ var DeleteEmbedIcon = () => /* @__PURE__ */ jsxs10(
1733
1603
  "svg",
1734
1604
  {
1735
1605
  xmlns: "http://www.w3.org/2000/svg",
@@ -1741,46 +1611,46 @@ var DeleteEmbedIcon = () => /* @__PURE__ */ jsxs11(
1741
1611
  strokeLinejoin: "round",
1742
1612
  className: "rte-editor-icon",
1743
1613
  children: [
1744
- /* @__PURE__ */ jsx24("polyline", { points: "3 6 5 6 21 6" }),
1745
- /* @__PURE__ */ jsx24("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" })
1614
+ /* @__PURE__ */ jsx23("polyline", { points: "3 6 5 6 21 6" }),
1615
+ /* @__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
1616
  ]
1747
1617
  }
1748
1618
  );
1749
1619
  var iconProps = { className: "rte-editor-icon" };
1750
1620
  var DEFAULT_ICONS = {
1751
- alignCenterControlIcon: /* @__PURE__ */ jsx24(TextAlignCenter, { ...iconProps }),
1752
- alignJustifyControlIcon: /* @__PURE__ */ jsx24(TextAlignJustify, { ...iconProps }),
1753
- alignLeftControlIcon: /* @__PURE__ */ jsx24(TextAlignStart, { ...iconProps }),
1754
- alignRightControlIcon: /* @__PURE__ */ jsx24(TextAlignEnd, { ...iconProps }),
1755
- blockquoteControlIcon: /* @__PURE__ */ jsx24(TextQuote, { ...iconProps }),
1756
- boldControlIcon: /* @__PURE__ */ jsx24(Bold, { ...iconProps }),
1757
- bulletListControlIcon: /* @__PURE__ */ jsx24(List, { ...iconProps }),
1758
- clearFormattingControlIcon: /* @__PURE__ */ jsx24(RemoveFormatting, { ...iconProps }),
1759
- codeBlockControlIcon: /* @__PURE__ */ jsx24(SquareCode, { ...iconProps }),
1760
- codeControlIcon: /* @__PURE__ */ jsx24(Code, { ...iconProps }),
1761
- h1ControlIcon: /* @__PURE__ */ jsx24(Heading1, { ...iconProps }),
1762
- h2ControlIcon: /* @__PURE__ */ jsx24(Heading2, { ...iconProps }),
1763
- h3ControlIcon: /* @__PURE__ */ jsx24(Heading3, { ...iconProps }),
1764
- h4ControlIcon: /* @__PURE__ */ jsx24(Heading4, { ...iconProps }),
1765
- h5ControlIcon: /* @__PURE__ */ jsx24(Heading5, { ...iconProps }),
1766
- h6ControlIcon: /* @__PURE__ */ jsx24(Heading6, { ...iconProps }),
1767
- highlightControlIcon: /* @__PURE__ */ jsx24(Highlighter, { ...iconProps }),
1768
- hrControlIcon: /* @__PURE__ */ jsx24(Minus, { ...iconProps }),
1769
- italicControlIcon: /* @__PURE__ */ jsx24(Italic, { ...iconProps }),
1621
+ alignCenterControlIcon: /* @__PURE__ */ jsx23(TextAlignCenter, { ...iconProps }),
1622
+ alignJustifyControlIcon: /* @__PURE__ */ jsx23(TextAlignJustify, { ...iconProps }),
1623
+ alignLeftControlIcon: /* @__PURE__ */ jsx23(TextAlignStart, { ...iconProps }),
1624
+ alignRightControlIcon: /* @__PURE__ */ jsx23(TextAlignEnd, { ...iconProps }),
1625
+ blockquoteControlIcon: /* @__PURE__ */ jsx23(TextQuote, { ...iconProps }),
1626
+ boldControlIcon: /* @__PURE__ */ jsx23(Bold, { ...iconProps }),
1627
+ bulletListControlIcon: /* @__PURE__ */ jsx23(List, { ...iconProps }),
1628
+ clearFormattingControlIcon: /* @__PURE__ */ jsx23(RemoveFormatting, { ...iconProps }),
1629
+ codeBlockControlIcon: /* @__PURE__ */ jsx23(SquareCode, { ...iconProps }),
1630
+ codeControlIcon: /* @__PURE__ */ jsx23(Code, { ...iconProps }),
1631
+ h1ControlIcon: /* @__PURE__ */ jsx23(Heading1, { ...iconProps }),
1632
+ h2ControlIcon: /* @__PURE__ */ jsx23(Heading2, { ...iconProps }),
1633
+ h3ControlIcon: /* @__PURE__ */ jsx23(Heading3, { ...iconProps }),
1634
+ h4ControlIcon: /* @__PURE__ */ jsx23(Heading4, { ...iconProps }),
1635
+ h5ControlIcon: /* @__PURE__ */ jsx23(Heading5, { ...iconProps }),
1636
+ h6ControlIcon: /* @__PURE__ */ jsx23(Heading6, { ...iconProps }),
1637
+ highlightControlIcon: /* @__PURE__ */ jsx23(Highlighter, { ...iconProps }),
1638
+ hrControlIcon: /* @__PURE__ */ jsx23(Minus, { ...iconProps }),
1639
+ italicControlIcon: /* @__PURE__ */ jsx23(Italic, { ...iconProps }),
1770
1640
  languageIcons: DEFAULT_LANGUAGE_ICONS,
1771
- linkControlIcon: /* @__PURE__ */ jsx24(Link, { ...iconProps }),
1772
- orderedListControlIcon: /* @__PURE__ */ jsx24(ListOrdered, { ...iconProps }),
1773
- redoControlIcon: /* @__PURE__ */ jsx24(Redo2, { ...iconProps }),
1774
- strikeControlIcon: /* @__PURE__ */ jsx24(Strikethrough, { ...iconProps }),
1775
- subscriptControlIcon: /* @__PURE__ */ jsx24(Subscript, { ...iconProps }),
1776
- superscriptControlIcon: /* @__PURE__ */ jsx24(Superscript, { ...iconProps }),
1777
- underlineControlIcon: /* @__PURE__ */ jsx24(Underline, { ...iconProps }),
1778
- undoControlIcon: /* @__PURE__ */ jsx24(Undo2, { ...iconProps }),
1779
- unlinkControlIcon: /* @__PURE__ */ jsx24(Link2Off, { ...iconProps })
1641
+ linkControlIcon: /* @__PURE__ */ jsx23(Link, { ...iconProps }),
1642
+ orderedListControlIcon: /* @__PURE__ */ jsx23(ListOrdered, { ...iconProps }),
1643
+ redoControlIcon: /* @__PURE__ */ jsx23(Redo2, { ...iconProps }),
1644
+ strikeControlIcon: /* @__PURE__ */ jsx23(Strikethrough, { ...iconProps }),
1645
+ subscriptControlIcon: /* @__PURE__ */ jsx23(Subscript, { ...iconProps }),
1646
+ superscriptControlIcon: /* @__PURE__ */ jsx23(Superscript, { ...iconProps }),
1647
+ underlineControlIcon: /* @__PURE__ */ jsx23(Underline, { ...iconProps }),
1648
+ undoControlIcon: /* @__PURE__ */ jsx23(Undo2, { ...iconProps }),
1649
+ unlinkControlIcon: /* @__PURE__ */ jsx23(Link2Off, { ...iconProps })
1780
1650
  };
1781
1651
 
1782
1652
  // src/extensions/resizable-node-view.tsx
1783
- import { Fragment as Fragment5, jsx as jsx25, jsxs as jsxs12 } from "react/jsx-runtime";
1653
+ import { Fragment as Fragment3, jsx as jsx24, jsxs as jsxs11 } from "react/jsx-runtime";
1784
1654
  var EmbedToolbar = ({
1785
1655
  align,
1786
1656
  videoSrc,
@@ -1797,8 +1667,8 @@ var EmbedToolbar = ({
1797
1667
  nodeSrc
1798
1668
  }) => {
1799
1669
  if (isEditingUrl) {
1800
- return /* @__PURE__ */ jsxs12("div", { className: "rte-embed-selector-edit-form", children: [
1801
- /* @__PURE__ */ jsx25(
1670
+ return /* @__PURE__ */ jsxs11("div", { className: "rte-embed-selector-edit-form", children: [
1671
+ /* @__PURE__ */ jsx24(
1802
1672
  "input",
1803
1673
  {
1804
1674
  ref: inputRef,
@@ -1816,7 +1686,7 @@ var EmbedToolbar = ({
1816
1686
  }
1817
1687
  }
1818
1688
  ),
1819
- /* @__PURE__ */ jsx25(
1689
+ /* @__PURE__ */ jsx24(
1820
1690
  "button",
1821
1691
  {
1822
1692
  type: "button",
@@ -1825,7 +1695,7 @@ var EmbedToolbar = ({
1825
1695
  children: "Save"
1826
1696
  }
1827
1697
  ),
1828
- /* @__PURE__ */ jsx25(
1698
+ /* @__PURE__ */ jsx24(
1829
1699
  "button",
1830
1700
  {
1831
1701
  type: "button",
@@ -1836,8 +1706,8 @@ var EmbedToolbar = ({
1836
1706
  )
1837
1707
  ] });
1838
1708
  }
1839
- return /* @__PURE__ */ jsxs12(Fragment5, { children: [
1840
- /* @__PURE__ */ jsx25("div", { className: "rte-embed-selector-group", children: ["left", "center", "right"].map((dir) => /* @__PURE__ */ jsx25(
1709
+ return /* @__PURE__ */ jsxs11(Fragment3, { children: [
1710
+ /* @__PURE__ */ jsx24("div", { className: "rte-embed-selector-group", children: ["left", "center", "right"].map((dir) => /* @__PURE__ */ jsx24(
1841
1711
  "button",
1842
1712
  {
1843
1713
  type: "button",
@@ -1845,12 +1715,12 @@ var EmbedToolbar = ({
1845
1715
  "aria-label": `Align ${dir.charAt(0).toUpperCase()}${dir.slice(1)}`,
1846
1716
  className: `rte-embed-selector-btn ${align === dir ? "rte-embed-selector-btn--active" : ""}`,
1847
1717
  onClick: () => updateAttributes({ align: dir }),
1848
- children: /* @__PURE__ */ jsx25(AlignIcon, { dir })
1718
+ children: /* @__PURE__ */ jsx24(AlignIcon, { dir })
1849
1719
  },
1850
1720
  dir
1851
1721
  )) }),
1852
- /* @__PURE__ */ jsx25("div", { className: "rte-embed-selector-divider" }),
1853
- /* @__PURE__ */ jsx25("div", { className: "rte-embed-selector-group", children: [25, 50, 75, 100].map((pct) => /* @__PURE__ */ jsxs12(
1722
+ /* @__PURE__ */ jsx24("div", { className: "rte-embed-selector-divider" }),
1723
+ /* @__PURE__ */ jsx24("div", { className: "rte-embed-selector-group", children: [25, 50, 75, 100].map((pct) => /* @__PURE__ */ jsxs11(
1854
1724
  "button",
1855
1725
  {
1856
1726
  type: "button",
@@ -1864,9 +1734,9 @@ var EmbedToolbar = ({
1864
1734
  },
1865
1735
  pct
1866
1736
  )) }),
1867
- /* @__PURE__ */ jsx25("div", { className: "rte-embed-selector-divider" }),
1868
- /* @__PURE__ */ jsxs12("div", { className: "rte-embed-selector-group", children: [
1869
- (videoSrc || nodeSrc) && /* @__PURE__ */ jsx25(
1737
+ /* @__PURE__ */ jsx24("div", { className: "rte-embed-selector-divider" }),
1738
+ /* @__PURE__ */ jsxs11("div", { className: "rte-embed-selector-group", children: [
1739
+ (videoSrc || nodeSrc) && /* @__PURE__ */ jsx24(
1870
1740
  "button",
1871
1741
  {
1872
1742
  type: "button",
@@ -1877,10 +1747,10 @@ var EmbedToolbar = ({
1877
1747
  setUrlInput(videoSrc || nodeSrc || "");
1878
1748
  setIsEditingUrl(true);
1879
1749
  },
1880
- children: /* @__PURE__ */ jsx25(EditUrlIcon, {})
1750
+ children: /* @__PURE__ */ jsx24(EditUrlIcon, {})
1881
1751
  }
1882
1752
  ),
1883
- watchUrl && /* @__PURE__ */ jsx25(
1753
+ watchUrl && /* @__PURE__ */ jsx24(
1884
1754
  "button",
1885
1755
  {
1886
1756
  type: "button",
@@ -1888,10 +1758,10 @@ var EmbedToolbar = ({
1888
1758
  "aria-label": "Open video in YouTube",
1889
1759
  className: "rte-embed-selector-btn",
1890
1760
  onClick: () => window.open(watchUrl, "_blank"),
1891
- children: /* @__PURE__ */ jsx25(OpenInYouTubeIcon, {})
1761
+ children: /* @__PURE__ */ jsx24(OpenInYouTubeIcon, {})
1892
1762
  }
1893
1763
  ),
1894
- deleteNode && /* @__PURE__ */ jsx25(
1764
+ deleteNode && /* @__PURE__ */ jsx24(
1895
1765
  "button",
1896
1766
  {
1897
1767
  type: "button",
@@ -1899,7 +1769,7 @@ var EmbedToolbar = ({
1899
1769
  "aria-label": "Delete Embed",
1900
1770
  className: "rte-embed-selector-btn rte-embed-selector-btn--danger",
1901
1771
  onClick: () => deleteNode(),
1902
- children: /* @__PURE__ */ jsx25(DeleteEmbedIcon, {})
1772
+ children: /* @__PURE__ */ jsx24(DeleteEmbedIcon, {})
1903
1773
  }
1904
1774
  )
1905
1775
  ] })
@@ -1922,10 +1792,10 @@ var ResizableNodeView = ({
1922
1792
  onSrcChange
1923
1793
  }) => {
1924
1794
  const containerRef = useRef3(null);
1925
- const [isEditingUrl, setIsEditingUrl] = useState5(false);
1926
- const [urlInput, setUrlInput] = useState5(videoSrc || "");
1927
- const [isResizing, setIsResizing] = useState5(false);
1928
- const [currentDimensions, setCurrentDimensions] = useState5(null);
1795
+ const [isEditingUrl, setIsEditingUrl] = useState4(false);
1796
+ const [urlInput, setUrlInput] = useState4(videoSrc || "");
1797
+ const [isResizing, setIsResizing] = useState4(false);
1798
+ const [currentDimensions, setCurrentDimensions] = useState4(null);
1929
1799
  const resizingRef = useRef3(null);
1930
1800
  const width = node.attrs.width;
1931
1801
  const height = node.attrs.height;
@@ -2070,13 +1940,13 @@ var ResizableNodeView = ({
2070
1940
  setIsEditingUrl(false);
2071
1941
  };
2072
1942
  const isEditable = editor ? editor.isEditable : true;
2073
- return /* @__PURE__ */ jsx25(
1943
+ return /* @__PURE__ */ jsx24(
2074
1944
  NodeViewWrapper,
2075
1945
  {
2076
1946
  className: "rte-embed-wrapper",
2077
1947
  "data-selected": selected || void 0,
2078
1948
  "data-align": align,
2079
- children: /* @__PURE__ */ jsxs12(
1949
+ children: /* @__PURE__ */ jsxs11(
2080
1950
  "div",
2081
1951
  {
2082
1952
  ref: containerRef,
@@ -2089,7 +1959,7 @@ var ResizableNodeView = ({
2089
1959
  },
2090
1960
  children: [
2091
1961
  children,
2092
- selected && isEditable && /* @__PURE__ */ jsx25("div", { className: "rte-embed-selector", contentEditable: false, children: /* @__PURE__ */ jsx25(
1962
+ selected && isEditable && /* @__PURE__ */ jsx24("div", { className: "rte-embed-selector", contentEditable: false, children: /* @__PURE__ */ jsx24(
2093
1963
  EmbedToolbar,
2094
1964
  {
2095
1965
  align,
@@ -2107,14 +1977,14 @@ var ResizableNodeView = ({
2107
1977
  nodeSrc: node.attrs.src
2108
1978
  }
2109
1979
  ) }),
2110
- isResizing && currentDimensions && /* @__PURE__ */ jsxs12("div", { className: "rte-embed-resize-badge", children: [
1980
+ isResizing && currentDimensions && /* @__PURE__ */ jsxs11("div", { className: "rte-embed-resize-badge", children: [
2111
1981
  currentDimensions.w,
2112
1982
  " \xD7 ",
2113
1983
  currentDimensions.h,
2114
1984
  " px"
2115
1985
  ] }),
2116
- selected && isEditable && /* @__PURE__ */ jsxs12(Fragment5, { children: [
2117
- /* @__PURE__ */ jsx25(
1986
+ selected && isEditable && /* @__PURE__ */ jsxs11(Fragment3, { children: [
1987
+ /* @__PURE__ */ jsx24(
2118
1988
  "div",
2119
1989
  {
2120
1990
  className: "rte-resize-handle rte-resize-handle--left",
@@ -2122,7 +1992,7 @@ var ResizableNodeView = ({
2122
1992
  role: "presentation"
2123
1993
  }
2124
1994
  ),
2125
- /* @__PURE__ */ jsx25(
1995
+ /* @__PURE__ */ jsx24(
2126
1996
  "div",
2127
1997
  {
2128
1998
  className: "rte-resize-handle rte-resize-handle--right",
@@ -2130,7 +2000,7 @@ var ResizableNodeView = ({
2130
2000
  role: "presentation"
2131
2001
  }
2132
2002
  ),
2133
- /* @__PURE__ */ jsx25(
2003
+ /* @__PURE__ */ jsx24(
2134
2004
  "div",
2135
2005
  {
2136
2006
  className: "rte-resize-handle rte-resize-handle--bottom",
@@ -2138,7 +2008,7 @@ var ResizableNodeView = ({
2138
2008
  role: "presentation"
2139
2009
  }
2140
2010
  ),
2141
- /* @__PURE__ */ jsx25(
2011
+ /* @__PURE__ */ jsx24(
2142
2012
  "div",
2143
2013
  {
2144
2014
  className: "rte-resize-handle rte-resize-handle--corner rte-resize-handle--corner-bl",
@@ -2146,7 +2016,7 @@ var ResizableNodeView = ({
2146
2016
  role: "presentation"
2147
2017
  }
2148
2018
  ),
2149
- /* @__PURE__ */ jsx25(
2019
+ /* @__PURE__ */ jsx24(
2150
2020
  "div",
2151
2021
  {
2152
2022
  className: "rte-resize-handle rte-resize-handle--corner rte-resize-handle--corner-br",
@@ -2163,7 +2033,7 @@ var ResizableNodeView = ({
2163
2033
  };
2164
2034
 
2165
2035
  // src/controls/rte-twitter-control.tsx
2166
- import { jsx as jsx26, jsxs as jsxs13 } from "react/jsx-runtime";
2036
+ import { jsx as jsx25, jsxs as jsxs12 } from "react/jsx-runtime";
2167
2037
  var WIDGET_SCRIPT_URL = "https://platform.twitter.com/widgets.js";
2168
2038
  var SCRIPT_LOAD_TIMEOUT_MS = 8e3;
2169
2039
  var READY_POLL_INTERVAL_MS = 50;
@@ -2240,13 +2110,13 @@ var loadTwitterScript = () => {
2240
2110
  var TwitterNodeView = (props) => {
2241
2111
  const { node } = props;
2242
2112
  const containerRef = useRef4(null);
2243
- const [loading, setLoading] = useState6(true);
2244
- const [failed, setFailed] = useState6(false);
2113
+ const [loading, setLoading] = useState5(true);
2114
+ const [failed, setFailed] = useState5(false);
2245
2115
  const { tweetId } = node.attrs;
2246
2116
  const renderedTweetIdRef = useRef4(null);
2247
2117
  const activeRenderIdRef = useRef4(0);
2248
2118
  const retryToken = useRef4(0);
2249
- const [retryCount, setRetryCount] = useState6(0);
2119
+ const [retryCount, setRetryCount] = useState5(0);
2250
2120
  useEffect4(() => {
2251
2121
  if (!containerRef.current || !tweetId) {
2252
2122
  return;
@@ -2310,7 +2180,7 @@ var TwitterNodeView = (props) => {
2310
2180
  retryToken.current += 1;
2311
2181
  setRetryCount(retryToken.current);
2312
2182
  }, []);
2313
- return /* @__PURE__ */ jsxs13(
2183
+ return /* @__PURE__ */ jsxs12(
2314
2184
  ResizableNodeView,
2315
2185
  {
2316
2186
  ...props,
@@ -2318,12 +2188,12 @@ var TwitterNodeView = (props) => {
2318
2188
  minWidth: 300,
2319
2189
  maxWidth: 1200,
2320
2190
  children: [
2321
- loading && /* @__PURE__ */ jsx26("div", { className: "rte-embed-loading", children: "Loading tweet..." }),
2322
- !loading && failed && /* @__PURE__ */ jsxs13("div", { className: "rte-embed-error", children: [
2323
- /* @__PURE__ */ jsx26("p", { children: "Couldn't load this tweet." }),
2324
- /* @__PURE__ */ jsx26("button", { type: "button", onClick: handleRetry, children: "Retry" })
2191
+ loading && /* @__PURE__ */ jsx25("div", { className: "rte-embed-loading", children: "Loading tweet..." }),
2192
+ !loading && failed && /* @__PURE__ */ jsxs12("div", { className: "rte-embed-error", children: [
2193
+ /* @__PURE__ */ jsx25("p", { children: "Couldn't load this tweet." }),
2194
+ /* @__PURE__ */ jsx25("button", { type: "button", onClick: handleRetry, children: "Retry" })
2325
2195
  ] }),
2326
- /* @__PURE__ */ jsx26("div", { ref: containerRef })
2196
+ /* @__PURE__ */ jsx25("div", { ref: containerRef })
2327
2197
  ]
2328
2198
  }
2329
2199
  );
@@ -2427,9 +2297,9 @@ var extractTweetId = (input) => {
2427
2297
  };
2428
2298
  var TwitterEmbedControl = ({ className }) => {
2429
2299
  const { editor } = useRichTextEditorContext();
2430
- const [open, setOpen] = useState6(false);
2431
- const [url, setUrl] = useState6("");
2432
- const [touched, setTouched] = useState6(false);
2300
+ const [open, setOpen] = useState5(false);
2301
+ const [url, setUrl] = useState5("");
2302
+ const [touched, setTouched] = useState5(false);
2433
2303
  const { active } = useEditorState4({
2434
2304
  editor: editor ?? null,
2435
2305
  selector: (ctx) => ({
@@ -2451,7 +2321,7 @@ var TwitterEmbedControl = ({ className }) => {
2451
2321
  resetState();
2452
2322
  return true;
2453
2323
  }, [tweetId, editor, resetState]);
2454
- return /* @__PURE__ */ jsxs13(
2324
+ return /* @__PURE__ */ jsxs12(
2455
2325
  Dialog,
2456
2326
  {
2457
2327
  open,
@@ -2462,36 +2332,36 @@ var TwitterEmbedControl = ({ className }) => {
2462
2332
  }
2463
2333
  },
2464
2334
  children: [
2465
- /* @__PURE__ */ jsx26(
2335
+ /* @__PURE__ */ jsx25(
2466
2336
  DialogTrigger,
2467
2337
  {
2468
- render: /* @__PURE__ */ jsx26(
2338
+ render: /* @__PURE__ */ jsx25(
2469
2339
  RichTextEditorControl,
2470
2340
  {
2471
2341
  active,
2472
2342
  className,
2473
2343
  title: "Embed Tweet",
2474
2344
  "aria-label": "Embed Tweet",
2475
- children: /* @__PURE__ */ jsx26(
2345
+ children: /* @__PURE__ */ jsx25(
2476
2346
  "svg",
2477
2347
  {
2478
2348
  xmlns: "http://www.w3.org/2000/svg",
2479
2349
  viewBox: "0 0 24 24",
2480
2350
  fill: "currentColor",
2481
2351
  className: "rte-editor-icon",
2482
- children: /* @__PURE__ */ jsx26("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" })
2352
+ 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
2353
  }
2484
2354
  )
2485
2355
  }
2486
2356
  )
2487
2357
  }
2488
2358
  ),
2489
- /* @__PURE__ */ jsxs13(DialogContent, { children: [
2490
- /* @__PURE__ */ jsxs13(DialogHeader, { children: [
2491
- /* @__PURE__ */ jsx26(DialogTitle, { children: "Embed Tweet" }),
2492
- /* @__PURE__ */ jsx26(DialogDescription, { children: "Paste a tweet URL or ID." })
2359
+ /* @__PURE__ */ jsxs12(DialogContent, { children: [
2360
+ /* @__PURE__ */ jsxs12(DialogHeader, { children: [
2361
+ /* @__PURE__ */ jsx25(DialogTitle, { children: "Embed Tweet" }),
2362
+ /* @__PURE__ */ jsx25(DialogDescription, { children: "Paste a tweet URL or ID." })
2493
2363
  ] }),
2494
- /* @__PURE__ */ jsx26(
2364
+ /* @__PURE__ */ jsx25(
2495
2365
  Input,
2496
2366
  {
2497
2367
  value: url,
@@ -2511,10 +2381,10 @@ var TwitterEmbedControl = ({ className }) => {
2511
2381
  }
2512
2382
  }
2513
2383
  ),
2514
- showError && /* @__PURE__ */ jsx26("p", { className: "rte-input-error", role: "alert", children: "That doesn't look like a valid tweet URL or ID." }),
2515
- /* @__PURE__ */ jsxs13(DialogFooter, { children: [
2516
- /* @__PURE__ */ jsx26(DialogClose, { children: "Cancel" }),
2517
- /* @__PURE__ */ jsx26(
2384
+ showError && /* @__PURE__ */ jsx25("p", { className: "rte-input-error", role: "alert", children: "That doesn't look like a valid tweet URL or ID." }),
2385
+ /* @__PURE__ */ jsxs12(DialogFooter, { children: [
2386
+ /* @__PURE__ */ jsx25(DialogClose, { children: "Cancel" }),
2387
+ /* @__PURE__ */ jsx25(
2518
2388
  "button",
2519
2389
  {
2520
2390
  type: "button",
@@ -2543,8 +2413,8 @@ import {
2543
2413
  parseAttributes as parseAttributes2
2544
2414
  } from "@tiptap/core";
2545
2415
  import { ReactNodeViewRenderer as ReactNodeViewRenderer2, useEditorState as useEditorState5 } from "@tiptap/react";
2546
- import { useState as useState7, useCallback as useCallback7 } from "react";
2547
- import { jsx as jsx27, jsxs as jsxs14 } from "react/jsx-runtime";
2416
+ import { useState as useState6, useCallback as useCallback7 } from "react";
2417
+ import { jsx as jsx26, jsxs as jsxs13 } from "react/jsx-runtime";
2548
2418
  var getYouTubeId = (url) => {
2549
2419
  const clean = url.trim();
2550
2420
  const patterns = [
@@ -2572,7 +2442,7 @@ var YouTubeNodeView = (props) => {
2572
2442
  if (videoId) {
2573
2443
  watchUrl = videoId.startsWith("http") ? videoId : `https://www.youtube.com/watch?v=${videoId}`;
2574
2444
  }
2575
- return /* @__PURE__ */ jsx27(
2445
+ return /* @__PURE__ */ jsx26(
2576
2446
  ResizableNodeView,
2577
2447
  {
2578
2448
  ...props,
@@ -2583,7 +2453,7 @@ var YouTubeNodeView = (props) => {
2583
2453
  videoSrc: rawSrc,
2584
2454
  watchUrl,
2585
2455
  onSrcChange: (newSrc) => updateAttributes({ src: newSrc }),
2586
- children: /* @__PURE__ */ jsx27(
2456
+ children: /* @__PURE__ */ jsx26(
2587
2457
  "iframe",
2588
2458
  {
2589
2459
  src: `https://www.youtube-nocookie.com/embed/${videoId}`,
@@ -2685,8 +2555,8 @@ var YouTubeEmbed = Node2.create({
2685
2555
  });
2686
2556
  var YouTubeEmbedControl = ({ className }) => {
2687
2557
  const { editor } = useRichTextEditorContext();
2688
- const [open, setOpen] = useState7(false);
2689
- const [url, setUrl] = useState7("");
2558
+ const [open, setOpen] = useState6(false);
2559
+ const [url, setUrl] = useState6("");
2690
2560
  const { active } = useEditorState5({
2691
2561
  editor: editor ?? null,
2692
2562
  selector: (ctx) => ({
@@ -2699,18 +2569,18 @@ var YouTubeEmbedControl = ({ className }) => {
2699
2569
  setUrl("");
2700
2570
  }
2701
2571
  }, [url, editor]);
2702
- return /* @__PURE__ */ jsxs14(Dialog, { open, onOpenChange: setOpen, children: [
2703
- /* @__PURE__ */ jsx27(
2572
+ return /* @__PURE__ */ jsxs13(Dialog, { open, onOpenChange: setOpen, children: [
2573
+ /* @__PURE__ */ jsx26(
2704
2574
  DialogTrigger,
2705
2575
  {
2706
- render: /* @__PURE__ */ jsx27(
2576
+ render: /* @__PURE__ */ jsx26(
2707
2577
  RichTextEditorControl,
2708
2578
  {
2709
2579
  active,
2710
2580
  className,
2711
2581
  title: "Embed YouTube video",
2712
2582
  "aria-label": "Embed YouTube video",
2713
- children: /* @__PURE__ */ jsxs14(
2583
+ children: /* @__PURE__ */ jsxs13(
2714
2584
  "svg",
2715
2585
  {
2716
2586
  xmlns: "http://www.w3.org/2000/svg",
@@ -2722,8 +2592,8 @@ var YouTubeEmbedControl = ({ className }) => {
2722
2592
  strokeLinejoin: "round",
2723
2593
  className: "rte-editor-icon",
2724
2594
  children: [
2725
- /* @__PURE__ */ jsx27("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" }),
2726
- /* @__PURE__ */ jsx27("path", { d: "M9.5 15.5V8.5l6.2 3.5z" })
2595
+ /* @__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" }),
2596
+ /* @__PURE__ */ jsx26("path", { d: "M9.5 15.5V8.5l6.2 3.5z" })
2727
2597
  ]
2728
2598
  }
2729
2599
  )
@@ -2731,12 +2601,12 @@ var YouTubeEmbedControl = ({ className }) => {
2731
2601
  )
2732
2602
  }
2733
2603
  ),
2734
- /* @__PURE__ */ jsxs14(DialogContent, { showCloseButton: false, children: [
2735
- /* @__PURE__ */ jsxs14(DialogHeader, { children: [
2736
- /* @__PURE__ */ jsx27(DialogTitle, { children: "Embed YouTube video" }),
2737
- /* @__PURE__ */ jsx27(DialogDescription, { children: "Paste a YouTube video URL or ID." })
2604
+ /* @__PURE__ */ jsxs13(DialogContent, { showCloseButton: false, children: [
2605
+ /* @__PURE__ */ jsxs13(DialogHeader, { children: [
2606
+ /* @__PURE__ */ jsx26(DialogTitle, { children: "Embed YouTube video" }),
2607
+ /* @__PURE__ */ jsx26(DialogDescription, { children: "Paste a YouTube video URL or ID." })
2738
2608
  ] }),
2739
- /* @__PURE__ */ jsx27(
2609
+ /* @__PURE__ */ jsx26(
2740
2610
  Input,
2741
2611
  {
2742
2612
  value: url,
@@ -2750,9 +2620,9 @@ var YouTubeEmbedControl = ({ className }) => {
2750
2620
  }
2751
2621
  }
2752
2622
  ),
2753
- /* @__PURE__ */ jsxs14(DialogFooter, { children: [
2754
- /* @__PURE__ */ jsx27(DialogClose, { children: "Cancel" }),
2755
- /* @__PURE__ */ jsx27(
2623
+ /* @__PURE__ */ jsxs13(DialogFooter, { children: [
2624
+ /* @__PURE__ */ jsx26(DialogClose, { children: "Cancel" }),
2625
+ /* @__PURE__ */ jsx26(
2756
2626
  DialogClose,
2757
2627
  {
2758
2628
  disabled: !url,
@@ -2809,14 +2679,14 @@ var DEFAULT_LABELS = {
2809
2679
 
2810
2680
  // src/rte-content.tsx
2811
2681
  import { EditorContent } from "@tiptap/react";
2812
- import { jsx as jsx28, jsxs as jsxs15 } from "react/jsx-runtime";
2682
+ import { jsx as jsx27, jsxs as jsxs14 } from "react/jsx-runtime";
2813
2683
  var Content = ({
2814
2684
  children,
2815
2685
  className
2816
2686
  }) => {
2817
2687
  const { editor } = useRichTextEditorContext();
2818
- return /* @__PURE__ */ jsxs15("div", { className: "relative", children: [
2819
- /* @__PURE__ */ jsx28(
2688
+ return /* @__PURE__ */ jsxs14("div", { className: "relative", children: [
2689
+ /* @__PURE__ */ jsx27(
2820
2690
  EditorContent,
2821
2691
  {
2822
2692
  editor,
@@ -2829,15 +2699,15 @@ var Content = ({
2829
2699
  };
2830
2700
 
2831
2701
  // src/rte-controls-group.tsx
2832
- import { jsx as jsx29 } from "react/jsx-runtime";
2702
+ import { jsx as jsx28 } from "react/jsx-runtime";
2833
2703
  var ControlsGroup = ({
2834
2704
  children,
2835
2705
  className
2836
- }) => /* @__PURE__ */ jsx29("div", { className: cn("rte-controls-group", className), children });
2706
+ }) => /* @__PURE__ */ jsx28("div", { className: cn("rte-controls-group", className), children });
2837
2707
 
2838
2708
  // src/rte-footer.tsx
2839
- import { useEffect as useEffect5, useMemo, useRef as useRef5, useState as useState8 } from "react";
2840
- import { Fragment as Fragment6, jsx as jsx30, jsxs as jsxs16 } from "react/jsx-runtime";
2709
+ import { useEffect as useEffect5, useMemo, useRef as useRef5, useState as useState7 } from "react";
2710
+ import { Fragment as Fragment4, jsx as jsx29, jsxs as jsxs15 } from "react/jsx-runtime";
2841
2711
  var Footer = ({
2842
2712
  children,
2843
2713
  className,
@@ -2848,7 +2718,7 @@ var Footer = ({
2848
2718
  wordCountFormatter
2849
2719
  }) => {
2850
2720
  const { editor, variant } = useRichTextEditorContext();
2851
- const [, forceUpdate] = useState8(0);
2721
+ const [, forceUpdate] = useState7(0);
2852
2722
  const rafRef = useRef5(null);
2853
2723
  useEffect5(() => {
2854
2724
  if (!editor || !showWordCount) {
@@ -2896,7 +2766,7 @@ var Footer = ({
2896
2766
  if (!showWordCount && !children) {
2897
2767
  return null;
2898
2768
  }
2899
- return /* @__PURE__ */ jsxs16(
2769
+ return /* @__PURE__ */ jsxs15(
2900
2770
  "div",
2901
2771
  {
2902
2772
  className: cn(
@@ -2908,21 +2778,21 @@ var Footer = ({
2908
2778
  "data-sticky": sticky ? "" : void 0,
2909
2779
  style: sticky ? { bottom: stickyOffset } : void 0,
2910
2780
  children: [
2911
- showWordCount && wordCount && /* @__PURE__ */ jsx30("span", { className: cn("rte-footer-word-count", wordCountClassName), children: wordCountFormatter ? wordCountFormatter(wordCount) : /* @__PURE__ */ jsxs16(Fragment6, { children: [
2912
- /* @__PURE__ */ jsxs16("span", { className: "rte-footer-word-count-stat", children: [
2913
- /* @__PURE__ */ jsx30("span", { className: "rte-footer-word-count-number", children: wordCount.words }),
2914
- /* @__PURE__ */ jsx30("span", { className: "rte-footer-word-count-unit", children: "words" })
2781
+ showWordCount && wordCount && /* @__PURE__ */ jsx29("span", { className: cn("rte-footer-word-count", wordCountClassName), children: wordCountFormatter ? wordCountFormatter(wordCount) : /* @__PURE__ */ jsxs15(Fragment4, { children: [
2782
+ /* @__PURE__ */ jsxs15("span", { className: "rte-footer-word-count-stat", children: [
2783
+ /* @__PURE__ */ jsx29("span", { className: "rte-footer-word-count-number", children: wordCount.words }),
2784
+ /* @__PURE__ */ jsx29("span", { className: "rte-footer-word-count-unit", children: "words" })
2915
2785
  ] }),
2916
- /* @__PURE__ */ jsx30(
2786
+ /* @__PURE__ */ jsx29(
2917
2787
  "span",
2918
2788
  {
2919
2789
  className: "rte-footer-word-count-separator",
2920
2790
  "aria-hidden": "true"
2921
2791
  }
2922
2792
  ),
2923
- /* @__PURE__ */ jsxs16("span", { className: "rte-footer-word-count-stat", children: [
2924
- /* @__PURE__ */ jsx30("span", { className: "rte-footer-word-count-number", children: wordCount.characters }),
2925
- /* @__PURE__ */ jsx30("span", { className: "rte-footer-word-count-unit", children: "characters" })
2793
+ /* @__PURE__ */ jsxs15("span", { className: "rte-footer-word-count-stat", children: [
2794
+ /* @__PURE__ */ jsx29("span", { className: "rte-footer-word-count-number", children: wordCount.characters }),
2795
+ /* @__PURE__ */ jsx29("span", { className: "rte-footer-word-count-unit", children: "characters" })
2926
2796
  ] })
2927
2797
  ] }) }),
2928
2798
  children
@@ -2932,7 +2802,7 @@ var Footer = ({
2932
2802
  };
2933
2803
 
2934
2804
  // src/rte-toolbar.tsx
2935
- import { jsx as jsx31 } from "react/jsx-runtime";
2805
+ import { jsx as jsx30 } from "react/jsx-runtime";
2936
2806
  var Toolbar = ({
2937
2807
  children,
2938
2808
  className,
@@ -2943,7 +2813,7 @@ var Toolbar = ({
2943
2813
  if (!editable) {
2944
2814
  return null;
2945
2815
  }
2946
- return /* @__PURE__ */ jsx31(
2816
+ return /* @__PURE__ */ jsx30(
2947
2817
  "div",
2948
2818
  {
2949
2819
  className: cn(
@@ -2960,7 +2830,7 @@ var Toolbar = ({
2960
2830
  };
2961
2831
 
2962
2832
  // src/rte-text-editor.tsx
2963
- import { jsx as jsx32, jsxs as jsxs17 } from "react/jsx-runtime";
2833
+ import { jsx as jsx31, jsxs as jsxs16 } from "react/jsx-runtime";
2964
2834
  var RichTextEditorRoot = ({
2965
2835
  editor,
2966
2836
  children,
@@ -2975,13 +2845,13 @@ var RichTextEditorRoot = ({
2975
2845
  [labels]
2976
2846
  );
2977
2847
  const mergedIcons = useMemo2(() => ({ ...DEFAULT_ICONS, ...icons }), [icons]);
2978
- const [tooltip] = useState9(() => TooltipPrimitive2.createHandle());
2848
+ const [tooltip] = useState8(() => TooltipPrimitive2.createHandle());
2979
2849
  useEffect6(() => {
2980
2850
  if (editor && editor.isEditable !== editable) {
2981
2851
  editor.setEditable(editable);
2982
2852
  }
2983
2853
  }, [editor, editable]);
2984
- return /* @__PURE__ */ jsx32(
2854
+ return /* @__PURE__ */ jsx31(
2985
2855
  RichTextEditorContext.Provider,
2986
2856
  {
2987
2857
  value: {
@@ -2992,7 +2862,7 @@ var RichTextEditorRoot = ({
2992
2862
  tooltip,
2993
2863
  variant
2994
2864
  },
2995
- children: /* @__PURE__ */ jsx32(
2865
+ children: /* @__PURE__ */ jsx31(
2996
2866
  "div",
2997
2867
  {
2998
2868
  className: cn(
@@ -3001,9 +2871,9 @@ var RichTextEditorRoot = ({
3001
2871
  className
3002
2872
  ),
3003
2873
  "data-variant": variant,
3004
- children: /* @__PURE__ */ jsxs17(TooltipProvider, { children: [
2874
+ children: /* @__PURE__ */ jsxs16(TooltipProvider, { children: [
3005
2875
  children,
3006
- /* @__PURE__ */ jsx32(Tooltip, { handle: tooltip, children: ({ payload }) => /* @__PURE__ */ jsx32(TooltipContent, { side: "bottom", children: payload }) })
2876
+ /* @__PURE__ */ jsx31(Tooltip, { handle: tooltip, children: ({ payload }) => /* @__PURE__ */ jsx31(TooltipContent, { side: "bottom", children: payload }) })
3007
2877
  ] })
3008
2878
  }
3009
2879
  )
@@ -3062,18 +2932,8 @@ var Link2 = TipTapLink.extend({
3062
2932
  };
3063
2933
  }
3064
2934
  }).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
2935
  export {
3075
2936
  BubbleMenu,
3076
- CodeBlock,
3077
2937
  DEFAULT_ICONS,
3078
2938
  DEFAULT_LABELS,
3079
2939
  DEFAULT_LANGUAGE_ICONS,