@editorcn/editor 0.5.0 → 0.5.2

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
@@ -533,6 +533,7 @@ RteDropdownIcon.displayName = "RteDropdownIcon";
533
533
  // src/ui/toggle.tsx
534
534
  import { Toggle as TogglePrimitive } from "@base-ui/react/toggle";
535
535
  import { cva as cva2 } from "class-variance-authority";
536
+ import { forwardRef as forwardRef11 } from "react";
536
537
  import { jsx as jsx15 } from "react/jsx-runtime";
537
538
  var toggleVariants = cva2(
538
539
  "group/toggle inline-flex items-center justify-center gap-1 rounded-md text-xs font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted data-[state=on]:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
@@ -554,19 +555,16 @@ var toggleVariants = cva2(
554
555
  }
555
556
  }
556
557
  );
557
- var Toggle = ({
558
- className,
559
- variant = "default",
560
- size = "default",
561
- ...props
562
- }) => /* @__PURE__ */ jsx15(
558
+ var Toggle = forwardRef11(({ className, variant = "default", size = "default", ...props }, ref) => /* @__PURE__ */ jsx15(
563
559
  TogglePrimitive,
564
560
  {
561
+ ref,
565
562
  "data-slot": "toggle",
566
563
  className: cn(toggleVariants({ className, size, variant })),
567
564
  ...props
568
565
  }
569
- );
566
+ ));
567
+ Toggle.displayName = "Toggle";
570
568
 
571
569
  // src/ui/tooltip.tsx
572
570
  import { Tooltip as TooltipPrimitive } from "@base-ui/react/tooltip";
@@ -1008,6 +1006,7 @@ var BubbleMenu = ({ editor }) => {
1008
1006
  return /* @__PURE__ */ jsx19(
1009
1007
  TiptapBubbleMenu,
1010
1008
  {
1009
+ className: "z-50",
1011
1010
  editor,
1012
1011
  options: { offset: 8, placement: "top" },
1013
1012
  shouldShow,
@@ -1022,7 +1021,7 @@ var BubbleMenu = ({ editor }) => {
1022
1021
 
1023
1022
  // src/controls/rte-control.tsx
1024
1023
  import { useEditorState as useEditorState2 } from "@tiptap/react";
1025
- import { useContext as useContext2 } from "react";
1024
+ import { cloneElement, forwardRef as forwardRef12, useContext as useContext2 } from "react";
1026
1025
 
1027
1026
  // src/rte-context.ts
1028
1027
  import { createContext, useContext } from "react";
@@ -1041,45 +1040,69 @@ var useRichTextEditorContext = () => {
1041
1040
  import { jsx as jsx20 } from "react/jsx-runtime";
1042
1041
  var RichTextEditorTooltip = ({
1043
1042
  children,
1043
+ id,
1044
1044
  label
1045
1045
  }) => {
1046
1046
  const tooltip = useContext2(RichTextEditorContext)?.tooltip;
1047
1047
  if (!tooltip) {
1048
- return children;
1048
+ return id ? cloneElement(children, { id }) : children;
1049
1049
  }
1050
- return /* @__PURE__ */ jsx20(TooltipTrigger, { handle: tooltip, payload: label, render: children });
1051
- };
1052
- var RichTextEditorControl = ({
1053
- active = false,
1054
- interactive: _interactive = true,
1055
- className,
1056
- children,
1057
- onMouseDown,
1058
- onClick,
1059
- disabled,
1060
- ...props
1061
- }) => {
1062
- const toggle = /* @__PURE__ */ jsx20(
1063
- Toggle,
1050
+ return /* @__PURE__ */ jsx20(
1051
+ TooltipTrigger,
1064
1052
  {
1065
- size: "sm",
1066
- pressed: active,
1067
- disabled,
1068
- "aria-label": props["aria-label"],
1069
- className: cn(
1070
- "rte-control-button inline-flex h-8 min-w-8 items-center justify-center rounded-md p-0 transition-[background-color,color,scale] duration-[150ms,150ms,100ms] ease-[ease-out] active:scale-96",
1071
- className
1072
- ),
1073
- onMouseDown: (e) => {
1074
- e.preventDefault();
1075
- onMouseDown?.(e);
1076
- },
1077
- onPressedChange: () => onClick?.({}),
1078
- children
1053
+ handle: tooltip,
1054
+ payload: label,
1055
+ render: children,
1056
+ ...id && { id }
1079
1057
  }
1080
1058
  );
1081
- return props.title ? /* @__PURE__ */ jsx20(RichTextEditorTooltip, { label: props.title, children: toggle }) : toggle;
1082
1059
  };
1060
+ var triggerKeys = [
1061
+ "aria-controls",
1062
+ "aria-expanded",
1063
+ "aria-haspopup"
1064
+ ];
1065
+ var triggerProps = (props) => Object.fromEntries(
1066
+ triggerKeys.flatMap(
1067
+ (key) => props[key] === void 0 ? [] : [[key, props[key]]]
1068
+ )
1069
+ );
1070
+ var RichTextEditorControl = forwardRef12(
1071
+ ({
1072
+ active = false,
1073
+ interactive: _interactive = true,
1074
+ className,
1075
+ children,
1076
+ onMouseDown,
1077
+ onClick,
1078
+ disabled,
1079
+ ...props
1080
+ }, ref) => {
1081
+ const toggle = /* @__PURE__ */ jsx20(
1082
+ Toggle,
1083
+ {
1084
+ ref,
1085
+ ...triggerProps(props),
1086
+ ...!props.title && props.id && { id: props.id },
1087
+ size: "sm",
1088
+ pressed: active,
1089
+ disabled,
1090
+ "aria-label": props["aria-label"],
1091
+ className: cn(
1092
+ "rte-control-button inline-flex h-8 min-w-8 items-center justify-center rounded-md p-0 transition-[background-color,color,scale] duration-[150ms,150ms,100ms] ease-[ease-out] active:scale-96",
1093
+ className
1094
+ ),
1095
+ onMouseDown: (e) => {
1096
+ e.preventDefault();
1097
+ onMouseDown?.(e);
1098
+ },
1099
+ onClick,
1100
+ children
1101
+ }
1102
+ );
1103
+ return props.title ? /* @__PURE__ */ jsx20(RichTextEditorTooltip, { id: props.id, label: props.title, children: toggle }) : toggle;
1104
+ }
1105
+ );
1083
1106
  var resolveIsActive = (editor, config) => {
1084
1107
  if (!editor || !config) {
1085
1108
  return false;
@@ -1407,7 +1430,14 @@ import { NodeViewWrapper } from "@tiptap/react";
1407
1430
  import { useCallback as useCallback5, useEffect as useEffect3, useRef as useRef3, useState as useState4 } from "react";
1408
1431
 
1409
1432
  // src/icons.tsx
1433
+ import "react";
1434
+
1435
+ // src/icon-placeholder.tsx
1410
1436
  import {
1437
+ AlignCenter,
1438
+ AlignJustify,
1439
+ AlignLeft,
1440
+ AlignRight,
1411
1441
  Bold,
1412
1442
  Code,
1413
1443
  Heading1,
@@ -1429,23 +1459,60 @@ import {
1429
1459
  Strikethrough,
1430
1460
  Subscript,
1431
1461
  Superscript,
1432
- TextAlignCenter,
1433
- TextAlignEnd,
1434
- TextAlignJustify,
1435
- TextAlignStart,
1436
1462
  TextQuote,
1437
1463
  Underline,
1438
1464
  Undo2
1439
1465
  } from "lucide-react";
1440
- import "react";
1466
+ import { jsx as jsx22 } from "react/jsx-runtime";
1467
+ var ICONS = {
1468
+ AlignCenter,
1469
+ AlignJustify,
1470
+ AlignLeft,
1471
+ AlignRight,
1472
+ Bold,
1473
+ Code,
1474
+ Heading1,
1475
+ Heading2,
1476
+ Heading3,
1477
+ Heading4,
1478
+ Heading5,
1479
+ Heading6,
1480
+ Highlighter,
1481
+ Italic,
1482
+ Link,
1483
+ Link2Off,
1484
+ List,
1485
+ ListOrdered,
1486
+ Minus,
1487
+ Redo2,
1488
+ RemoveFormatting,
1489
+ SquareCode,
1490
+ Strikethrough,
1491
+ Subscript,
1492
+ Superscript,
1493
+ TextQuote,
1494
+ Underline,
1495
+ Undo2
1496
+ };
1497
+ var IconPlaceholder = ({
1498
+ lucide,
1499
+ tabler: _tabler,
1500
+ hugeicons: _hugeicons,
1501
+ phosphor: _phosphor,
1502
+ remixicon: _remixicon,
1503
+ ...props
1504
+ }) => {
1505
+ const Icon2 = ICONS[lucide];
1506
+ return /* @__PURE__ */ jsx22(Icon2, { ...props });
1507
+ };
1441
1508
 
1442
1509
  // src/language-icons.tsx
1443
1510
  import "react";
1444
- import { jsx as jsx22, jsxs as jsxs9 } from "react/jsx-runtime";
1511
+ import { jsx as jsx23, jsxs as jsxs9 } from "react/jsx-runtime";
1445
1512
  var LangIcon = ({
1446
1513
  children,
1447
1514
  className
1448
- }) => /* @__PURE__ */ jsx22(
1515
+ }) => /* @__PURE__ */ jsx23(
1449
1516
  "svg",
1450
1517
  {
1451
1518
  xmlns: "http://www.w3.org/2000/svg",
@@ -1461,139 +1528,139 @@ var LangIcon = ({
1461
1528
  );
1462
1529
  var DEFAULT_LANGUAGE_ICONS = {
1463
1530
  bash: /* @__PURE__ */ jsxs9(LangIcon, { children: [
1464
- /* @__PURE__ */ jsx22("rect", { x: "2.5", y: "4", width: "19", height: "16", rx: "2" }),
1465
- /* @__PURE__ */ jsx22("path", { d: "M6.5 9.5l3.5 3-3.5 3" }),
1466
- /* @__PURE__ */ jsx22("path", { d: "M12 15.5h5.5" })
1531
+ /* @__PURE__ */ jsx23("rect", { x: "2.5", y: "4", width: "19", height: "16", rx: "2" }),
1532
+ /* @__PURE__ */ jsx23("path", { d: "M6.5 9.5l3.5 3-3.5 3" }),
1533
+ /* @__PURE__ */ jsx23("path", { d: "M12 15.5h5.5" })
1467
1534
  ] }),
1468
1535
  c: /* @__PURE__ */ jsxs9(LangIcon, { children: [
1469
- /* @__PURE__ */ jsx22("circle", { cx: "12", cy: "12", r: "8.5" }),
1470
- /* @__PURE__ */ jsx22("path", { d: "M15.6 9.3a4.5 4.5 0 1 0 0 5.4" })
1536
+ /* @__PURE__ */ jsx23("circle", { cx: "12", cy: "12", r: "8.5" }),
1537
+ /* @__PURE__ */ jsx23("path", { d: "M15.6 9.3a4.5 4.5 0 1 0 0 5.4" })
1471
1538
  ] }),
1472
1539
  cpp: /* @__PURE__ */ jsxs9(LangIcon, { children: [
1473
- /* @__PURE__ */ jsx22("circle", { cx: "9.5", cy: "12", r: "6.5" }),
1474
- /* @__PURE__ */ jsx22("path", { d: "M12.3 9.7a3.3 3.3 0 1 0 0 4.6" }),
1475
- /* @__PURE__ */ jsx22("path", { d: "M15.7 10.5v3M14.2 12h3" }),
1476
- /* @__PURE__ */ jsx22("path", { d: "M19.3 10.5v3M17.8 12h3" })
1540
+ /* @__PURE__ */ jsx23("circle", { cx: "9.5", cy: "12", r: "6.5" }),
1541
+ /* @__PURE__ */ jsx23("path", { d: "M12.3 9.7a3.3 3.3 0 1 0 0 4.6" }),
1542
+ /* @__PURE__ */ jsx23("path", { d: "M15.7 10.5v3M14.2 12h3" }),
1543
+ /* @__PURE__ */ jsx23("path", { d: "M19.3 10.5v3M17.8 12h3" })
1477
1544
  ] }),
1478
1545
  css: /* @__PURE__ */ jsxs9(LangIcon, { children: [
1479
- /* @__PURE__ */ jsx22("rect", { x: "3", y: "3", width: "18", height: "18", rx: "4" }),
1480
- /* @__PURE__ */ jsx22("path", { d: "M9.7 7.5l-1 9" }),
1481
- /* @__PURE__ */ jsx22("path", { d: "M15.3 7.5l-1 9" }),
1482
- /* @__PURE__ */ jsx22("path", { d: "M7 10.3h11" }),
1483
- /* @__PURE__ */ jsx22("path", { d: "M6.5 14.3h11" })
1546
+ /* @__PURE__ */ jsx23("rect", { x: "3", y: "3", width: "18", height: "18", rx: "4" }),
1547
+ /* @__PURE__ */ jsx23("path", { d: "M9.7 7.5l-1 9" }),
1548
+ /* @__PURE__ */ jsx23("path", { d: "M15.3 7.5l-1 9" }),
1549
+ /* @__PURE__ */ jsx23("path", { d: "M7 10.3h11" }),
1550
+ /* @__PURE__ */ jsx23("path", { d: "M6.5 14.3h11" })
1484
1551
  ] }),
1485
1552
  go: /* @__PURE__ */ jsxs9(LangIcon, { children: [
1486
- /* @__PURE__ */ jsx22("rect", { x: "3", y: "3", width: "18", height: "18", rx: "4" }),
1487
- /* @__PURE__ */ jsx22("path", { d: "M12.6 9.7A3.3 3.3 0 1 0 12.6 14.3" }),
1488
- /* @__PURE__ */ jsx22("path", { d: "M12.6 12h-1.9" }),
1489
- /* @__PURE__ */ jsx22("circle", { cx: "17", cy: "12", r: "2.9" })
1553
+ /* @__PURE__ */ jsx23("rect", { x: "3", y: "3", width: "18", height: "18", rx: "4" }),
1554
+ /* @__PURE__ */ jsx23("path", { d: "M12.6 9.7A3.3 3.3 0 1 0 12.6 14.3" }),
1555
+ /* @__PURE__ */ jsx23("path", { d: "M12.6 12h-1.9" }),
1556
+ /* @__PURE__ */ jsx23("circle", { cx: "17", cy: "12", r: "2.9" })
1490
1557
  ] }),
1491
1558
  html: /* @__PURE__ */ jsxs9(LangIcon, { children: [
1492
- /* @__PURE__ */ jsx22("rect", { x: "3", y: "3", width: "18", height: "18", rx: "4" }),
1493
- /* @__PURE__ */ jsx22("path", { d: "M9.5 8.5L6.5 12l3 3.5" }),
1494
- /* @__PURE__ */ jsx22("path", { d: "M14.5 8.5L17.5 12l-3 3.5" }),
1495
- /* @__PURE__ */ jsx22("path", { d: "M13 7.3l-2 9.4" })
1559
+ /* @__PURE__ */ jsx23("rect", { x: "3", y: "3", width: "18", height: "18", rx: "4" }),
1560
+ /* @__PURE__ */ jsx23("path", { d: "M9.5 8.5L6.5 12l3 3.5" }),
1561
+ /* @__PURE__ */ jsx23("path", { d: "M14.5 8.5L17.5 12l-3 3.5" }),
1562
+ /* @__PURE__ */ jsx23("path", { d: "M13 7.3l-2 9.4" })
1496
1563
  ] }),
1497
1564
  java: /* @__PURE__ */ jsxs9(LangIcon, { children: [
1498
- /* @__PURE__ */ jsx22("path", { d: "M6 10h10v5a3 3 0 0 1-3 3H9a3 3 0 0 1-3-3v-5z" }),
1499
- /* @__PURE__ */ jsx22("path", { d: "M16 12h1.3a1.8 1.8 0 0 1 0 3.6H16" }),
1500
- /* @__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" }),
1501
- /* @__PURE__ */ jsx22("path", { d: "M6 19.3h10" })
1565
+ /* @__PURE__ */ jsx23("path", { d: "M6 10h10v5a3 3 0 0 1-3 3H9a3 3 0 0 1-3-3v-5z" }),
1566
+ /* @__PURE__ */ jsx23("path", { d: "M16 12h1.3a1.8 1.8 0 0 1 0 3.6H16" }),
1567
+ /* @__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" }),
1568
+ /* @__PURE__ */ jsx23("path", { d: "M6 19.3h10" })
1502
1569
  ] }),
1503
1570
  javascript: /* @__PURE__ */ jsxs9(LangIcon, { children: [
1504
- /* @__PURE__ */ jsx22("rect", { x: "3", y: "3", width: "18", height: "18", rx: "4" }),
1505
- /* @__PURE__ */ jsx22("path", { d: "M10.5 8v6.5a2 2 0 0 1-3.5 1.3" }),
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" })
1571
+ /* @__PURE__ */ jsx23("rect", { x: "3", y: "3", width: "18", height: "18", rx: "4" }),
1572
+ /* @__PURE__ */ jsx23("path", { d: "M10.5 8v6.5a2 2 0 0 1-3.5 1.3" }),
1573
+ /* @__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" })
1507
1574
  ] }),
1508
1575
  json: /* @__PURE__ */ jsxs9(LangIcon, { children: [
1509
- /* @__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" }),
1510
- /* @__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" })
1576
+ /* @__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" }),
1577
+ /* @__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" })
1511
1578
  ] }),
1512
1579
  kotlin: /* @__PURE__ */ jsxs9(LangIcon, { children: [
1513
- /* @__PURE__ */ jsx22("rect", { x: "3", y: "3", width: "18", height: "18", rx: "4" }),
1514
- /* @__PURE__ */ jsx22("path", { d: "M9 7.5v9" }),
1515
- /* @__PURE__ */ jsx22("path", { d: "M9 12l6-4.5" }),
1516
- /* @__PURE__ */ jsx22("path", { d: "M9 12l6 4.5" })
1580
+ /* @__PURE__ */ jsx23("rect", { x: "3", y: "3", width: "18", height: "18", rx: "4" }),
1581
+ /* @__PURE__ */ jsx23("path", { d: "M9 7.5v9" }),
1582
+ /* @__PURE__ */ jsx23("path", { d: "M9 12l6-4.5" }),
1583
+ /* @__PURE__ */ jsx23("path", { d: "M9 12l6 4.5" })
1517
1584
  ] }),
1518
1585
  markdown: /* @__PURE__ */ jsxs9(LangIcon, { children: [
1519
- /* @__PURE__ */ jsx22("rect", { x: "2", y: "5", width: "20", height: "14", rx: "2" }),
1520
- /* @__PURE__ */ jsx22("path", { d: "M6 15V9l3 4 3-4v6" }),
1521
- /* @__PURE__ */ jsx22("path", { d: "M16.5 9v6" }),
1522
- /* @__PURE__ */ jsx22("path", { d: "M14.5 13l2 2 2-2" })
1586
+ /* @__PURE__ */ jsx23("rect", { x: "2", y: "5", width: "20", height: "14", rx: "2" }),
1587
+ /* @__PURE__ */ jsx23("path", { d: "M6 15V9l3 4 3-4v6" }),
1588
+ /* @__PURE__ */ jsx23("path", { d: "M16.5 9v6" }),
1589
+ /* @__PURE__ */ jsx23("path", { d: "M14.5 13l2 2 2-2" })
1523
1590
  ] }),
1524
1591
  php: /* @__PURE__ */ jsxs9(LangIcon, { children: [
1525
- /* @__PURE__ */ jsx22("rect", { x: "3", y: "3", width: "18", height: "18", rx: "4" }),
1526
- /* @__PURE__ */ jsx22("path", { d: "M11.5 8.5L7.5 12l4 3.5" }),
1527
- /* @__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" }),
1528
- /* @__PURE__ */ jsx22("circle", { cx: "14.3", cy: "16.2", r: ".5", fill: "currentColor", stroke: "none" })
1592
+ /* @__PURE__ */ jsx23("rect", { x: "3", y: "3", width: "18", height: "18", rx: "4" }),
1593
+ /* @__PURE__ */ jsx23("path", { d: "M11.5 8.5L7.5 12l4 3.5" }),
1594
+ /* @__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" }),
1595
+ /* @__PURE__ */ jsx23("circle", { cx: "14.3", cy: "16.2", r: ".5", fill: "currentColor", stroke: "none" })
1529
1596
  ] }),
1530
1597
  plaintext: /* @__PURE__ */ jsxs9(LangIcon, { children: [
1531
- /* @__PURE__ */ jsx22("rect", { x: "4", y: "2.5", width: "16", height: "19", rx: "2" }),
1532
- /* @__PURE__ */ jsx22("line", { x1: "7.5", y1: "7.5", x2: "16.5", y2: "7.5" }),
1533
- /* @__PURE__ */ jsx22("line", { x1: "7.5", y1: "11.5", x2: "16.5", y2: "11.5" }),
1534
- /* @__PURE__ */ jsx22("line", { x1: "7.5", y1: "15.5", x2: "13.5", y2: "15.5" })
1598
+ /* @__PURE__ */ jsx23("rect", { x: "4", y: "2.5", width: "16", height: "19", rx: "2" }),
1599
+ /* @__PURE__ */ jsx23("line", { x1: "7.5", y1: "7.5", x2: "16.5", y2: "7.5" }),
1600
+ /* @__PURE__ */ jsx23("line", { x1: "7.5", y1: "11.5", x2: "16.5", y2: "11.5" }),
1601
+ /* @__PURE__ */ jsx23("line", { x1: "7.5", y1: "15.5", x2: "13.5", y2: "15.5" })
1535
1602
  ] }),
1536
1603
  python: /* @__PURE__ */ jsxs9(LangIcon, { children: [
1537
- /* @__PURE__ */ jsx22("path", { d: "M4.5 15c0-3 2.5-4.7 5.7-4.7h1.6c2.8 0 5-2 5-4.5" }),
1538
- /* @__PURE__ */ jsx22("path", { d: "M9.5 3.3c1.3-.3 2.6 0 3.3 1-.7 1-2 1.3-3.3 1" }),
1539
- /* @__PURE__ */ jsx22("circle", { cx: "15.5", cy: "4.3", r: ".55", fill: "currentColor", stroke: "none" }),
1540
- /* @__PURE__ */ jsx22("path", { d: "M17.8 4.5l1.4-.6M17.8 4.9l1.4.6" })
1604
+ /* @__PURE__ */ jsx23("path", { d: "M4.5 15c0-3 2.5-4.7 5.7-4.7h1.6c2.8 0 5-2 5-4.5" }),
1605
+ /* @__PURE__ */ jsx23("path", { d: "M9.5 3.3c1.3-.3 2.6 0 3.3 1-.7 1-2 1.3-3.3 1" }),
1606
+ /* @__PURE__ */ jsx23("circle", { cx: "15.5", cy: "4.3", r: ".55", fill: "currentColor", stroke: "none" }),
1607
+ /* @__PURE__ */ jsx23("path", { d: "M17.8 4.5l1.4-.6M17.8 4.9l1.4.6" })
1541
1608
  ] }),
1542
1609
  ruby: /* @__PURE__ */ jsxs9(LangIcon, { children: [
1543
- /* @__PURE__ */ jsx22("polygon", { points: "12 2.5 19.5 8 12 21.5 4.5 8" }),
1544
- /* @__PURE__ */ jsx22("path", { d: "M4.5 8h15" }),
1545
- /* @__PURE__ */ jsx22("path", { d: "M12 2.5v19" })
1610
+ /* @__PURE__ */ jsx23("polygon", { points: "12 2.5 19.5 8 12 21.5 4.5 8" }),
1611
+ /* @__PURE__ */ jsx23("path", { d: "M4.5 8h15" }),
1612
+ /* @__PURE__ */ jsx23("path", { d: "M12 2.5v19" })
1546
1613
  ] }),
1547
1614
  rust: /* @__PURE__ */ jsxs9(LangIcon, { children: [
1548
- /* @__PURE__ */ jsx22("circle", { cx: "12", cy: "12", r: "7" }),
1549
- /* @__PURE__ */ jsx22("circle", { cx: "12", cy: "12", r: "2.3" }),
1550
- /* @__PURE__ */ jsx22("path", { d: "M12 2.5v3M12 18.5v3M2.5 12h3M18.5 12h3" }),
1551
- /* @__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" })
1615
+ /* @__PURE__ */ jsx23("circle", { cx: "12", cy: "12", r: "7" }),
1616
+ /* @__PURE__ */ jsx23("circle", { cx: "12", cy: "12", r: "2.3" }),
1617
+ /* @__PURE__ */ jsx23("path", { d: "M12 2.5v3M12 18.5v3M2.5 12h3M18.5 12h3" }),
1618
+ /* @__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" })
1552
1619
  ] }),
1553
1620
  sql: /* @__PURE__ */ jsxs9(LangIcon, { children: [
1554
- /* @__PURE__ */ jsx22("ellipse", { cx: "12", cy: "6", rx: "8", ry: "3" }),
1555
- /* @__PURE__ */ jsx22("path", { d: "M4 6v6c0 1.7 3.6 3 8 3s8-1.3 8-3V6" }),
1556
- /* @__PURE__ */ jsx22("path", { d: "M4 12v6c0 1.7 3.6 3 8 3s8-1.3 8-3v-6" })
1621
+ /* @__PURE__ */ jsx23("ellipse", { cx: "12", cy: "6", rx: "8", ry: "3" }),
1622
+ /* @__PURE__ */ jsx23("path", { d: "M4 6v6c0 1.7 3.6 3 8 3s8-1.3 8-3V6" }),
1623
+ /* @__PURE__ */ jsx23("path", { d: "M4 12v6c0 1.7 3.6 3 8 3s8-1.3 8-3v-6" })
1557
1624
  ] }),
1558
- 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" }) }),
1625
+ 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" }) }),
1559
1626
  typescript: /* @__PURE__ */ jsxs9(LangIcon, { children: [
1560
- /* @__PURE__ */ jsx22("rect", { x: "3", y: "3", width: "18", height: "18", rx: "4" }),
1561
- /* @__PURE__ */ jsx22("path", { d: "M7.3 8.2h5M9.8 8.2v7.6" }),
1562
- /* @__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" })
1627
+ /* @__PURE__ */ jsx23("rect", { x: "3", y: "3", width: "18", height: "18", rx: "4" }),
1628
+ /* @__PURE__ */ jsx23("path", { d: "M7.3 8.2h5M9.8 8.2v7.6" }),
1629
+ /* @__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" })
1563
1630
  ] }),
1564
1631
  xml: /* @__PURE__ */ jsxs9(LangIcon, { children: [
1565
- /* @__PURE__ */ jsx22("path", { d: "M8 7l-4.5 5 4.5 5" }),
1566
- /* @__PURE__ */ jsx22("path", { d: "M16 7l4.5 5-4.5 5" }),
1567
- /* @__PURE__ */ jsx22("path", { d: "M12 8v8" })
1632
+ /* @__PURE__ */ jsx23("path", { d: "M8 7l-4.5 5 4.5 5" }),
1633
+ /* @__PURE__ */ jsx23("path", { d: "M16 7l4.5 5-4.5 5" }),
1634
+ /* @__PURE__ */ jsx23("path", { d: "M12 8v8" })
1568
1635
  ] }),
1569
1636
  yaml: /* @__PURE__ */ jsxs9(LangIcon, { children: [
1570
- /* @__PURE__ */ jsx22("rect", { x: "2.5", y: "3", width: "19", height: "18", rx: "2" }),
1571
- /* @__PURE__ */ jsx22("path", { d: "M6.5 8h2M9.5 8h8" }),
1572
- /* @__PURE__ */ jsx22("path", { d: "M6.5 12h2M9.5 12h6" }),
1573
- /* @__PURE__ */ jsx22("path", { d: "M6.5 16h2M9.5 16h7" })
1637
+ /* @__PURE__ */ jsx23("rect", { x: "2.5", y: "3", width: "19", height: "18", rx: "2" }),
1638
+ /* @__PURE__ */ jsx23("path", { d: "M6.5 8h2M9.5 8h8" }),
1639
+ /* @__PURE__ */ jsx23("path", { d: "M6.5 12h2M9.5 12h6" }),
1640
+ /* @__PURE__ */ jsx23("path", { d: "M6.5 16h2M9.5 16h7" })
1574
1641
  ] })
1575
1642
  };
1576
1643
 
1577
1644
  // src/icons.tsx
1578
- import { Fragment as Fragment3, jsx as jsx23, jsxs as jsxs10 } from "react/jsx-runtime";
1645
+ import { Fragment as Fragment3, jsx as jsx24, jsxs as jsxs10 } from "react/jsx-runtime";
1579
1646
  var ALIGN_PATHS = {
1580
1647
  center: /* @__PURE__ */ jsxs10(Fragment3, { children: [
1581
- /* @__PURE__ */ jsx23("line", { x1: "21", y1: "6", x2: "3", y2: "6" }),
1582
- /* @__PURE__ */ jsx23("line", { x1: "17", y1: "12", x2: "7", y2: "12" }),
1583
- /* @__PURE__ */ jsx23("line", { x1: "19", y1: "18", x2: "5", y2: "18" })
1648
+ /* @__PURE__ */ jsx24("line", { x1: "21", y1: "6", x2: "3", y2: "6" }),
1649
+ /* @__PURE__ */ jsx24("line", { x1: "17", y1: "12", x2: "7", y2: "12" }),
1650
+ /* @__PURE__ */ jsx24("line", { x1: "19", y1: "18", x2: "5", y2: "18" })
1584
1651
  ] }),
1585
1652
  left: /* @__PURE__ */ jsxs10(Fragment3, { children: [
1586
- /* @__PURE__ */ jsx23("line", { x1: "21", y1: "6", x2: "3", y2: "6" }),
1587
- /* @__PURE__ */ jsx23("line", { x1: "15", y1: "12", x2: "3", y2: "12" }),
1588
- /* @__PURE__ */ jsx23("line", { x1: "17", y1: "18", x2: "3", y2: "18" })
1653
+ /* @__PURE__ */ jsx24("line", { x1: "21", y1: "6", x2: "3", y2: "6" }),
1654
+ /* @__PURE__ */ jsx24("line", { x1: "15", y1: "12", x2: "3", y2: "12" }),
1655
+ /* @__PURE__ */ jsx24("line", { x1: "17", y1: "18", x2: "3", y2: "18" })
1589
1656
  ] }),
1590
1657
  right: /* @__PURE__ */ jsxs10(Fragment3, { children: [
1591
- /* @__PURE__ */ jsx23("line", { x1: "21", y1: "6", x2: "3", y2: "6" }),
1592
- /* @__PURE__ */ jsx23("line", { x1: "21", y1: "12", x2: "9", y2: "12" }),
1593
- /* @__PURE__ */ jsx23("line", { x1: "21", y1: "18", x2: "7", y2: "18" })
1658
+ /* @__PURE__ */ jsx24("line", { x1: "21", y1: "6", x2: "3", y2: "6" }),
1659
+ /* @__PURE__ */ jsx24("line", { x1: "21", y1: "12", x2: "9", y2: "12" }),
1660
+ /* @__PURE__ */ jsx24("line", { x1: "21", y1: "18", x2: "7", y2: "18" })
1594
1661
  ] })
1595
1662
  };
1596
- var AlignIcon = ({ dir }) => /* @__PURE__ */ jsx23(
1663
+ var AlignIcon = ({ dir }) => /* @__PURE__ */ jsx24(
1597
1664
  "svg",
1598
1665
  {
1599
1666
  xmlns: "http://www.w3.org/2000/svg",
@@ -1619,8 +1686,8 @@ var EditUrlIcon = () => /* @__PURE__ */ jsxs10(
1619
1686
  strokeLinejoin: "round",
1620
1687
  className: "rte-editor-icon",
1621
1688
  children: [
1622
- /* @__PURE__ */ jsx23("path", { d: "M12 20h9" }),
1623
- /* @__PURE__ */ jsx23("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z" })
1689
+ /* @__PURE__ */ jsx24("path", { d: "M12 20h9" }),
1690
+ /* @__PURE__ */ jsx24("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z" })
1624
1691
  ]
1625
1692
  }
1626
1693
  );
@@ -1636,9 +1703,9 @@ var OpenInYouTubeIcon = () => /* @__PURE__ */ jsxs10(
1636
1703
  strokeLinejoin: "round",
1637
1704
  className: "rte-editor-icon",
1638
1705
  children: [
1639
- /* @__PURE__ */ jsx23("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
1640
- /* @__PURE__ */ jsx23("polyline", { points: "15 3 21 3 21 9" }),
1641
- /* @__PURE__ */ jsx23("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
1706
+ /* @__PURE__ */ jsx24("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
1707
+ /* @__PURE__ */ jsx24("polyline", { points: "15 3 21 3 21 9" }),
1708
+ /* @__PURE__ */ jsx24("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
1642
1709
  ]
1643
1710
  }
1644
1711
  );
@@ -1654,46 +1721,326 @@ var DeleteEmbedIcon = () => /* @__PURE__ */ jsxs10(
1654
1721
  strokeLinejoin: "round",
1655
1722
  className: "rte-editor-icon",
1656
1723
  children: [
1657
- /* @__PURE__ */ jsx23("polyline", { points: "3 6 5 6 21 6" }),
1658
- /* @__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" })
1724
+ /* @__PURE__ */ jsx24("polyline", { points: "3 6 5 6 21 6" }),
1725
+ /* @__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" })
1659
1726
  ]
1660
1727
  }
1661
1728
  );
1662
1729
  var iconProps = { className: "rte-editor-icon" };
1663
1730
  var DEFAULT_ICONS = {
1664
- alignCenterControlIcon: /* @__PURE__ */ jsx23(TextAlignCenter, { ...iconProps }),
1665
- alignJustifyControlIcon: /* @__PURE__ */ jsx23(TextAlignJustify, { ...iconProps }),
1666
- alignLeftControlIcon: /* @__PURE__ */ jsx23(TextAlignStart, { ...iconProps }),
1667
- alignRightControlIcon: /* @__PURE__ */ jsx23(TextAlignEnd, { ...iconProps }),
1668
- blockquoteControlIcon: /* @__PURE__ */ jsx23(TextQuote, { ...iconProps }),
1669
- boldControlIcon: /* @__PURE__ */ jsx23(Bold, { ...iconProps }),
1670
- bulletListControlIcon: /* @__PURE__ */ jsx23(List, { ...iconProps }),
1671
- clearFormattingControlIcon: /* @__PURE__ */ jsx23(RemoveFormatting, { ...iconProps }),
1672
- codeBlockControlIcon: /* @__PURE__ */ jsx23(SquareCode, { ...iconProps }),
1673
- codeControlIcon: /* @__PURE__ */ jsx23(Code, { ...iconProps }),
1674
- h1ControlIcon: /* @__PURE__ */ jsx23(Heading1, { ...iconProps }),
1675
- h2ControlIcon: /* @__PURE__ */ jsx23(Heading2, { ...iconProps }),
1676
- h3ControlIcon: /* @__PURE__ */ jsx23(Heading3, { ...iconProps }),
1677
- h4ControlIcon: /* @__PURE__ */ jsx23(Heading4, { ...iconProps }),
1678
- h5ControlIcon: /* @__PURE__ */ jsx23(Heading5, { ...iconProps }),
1679
- h6ControlIcon: /* @__PURE__ */ jsx23(Heading6, { ...iconProps }),
1680
- highlightControlIcon: /* @__PURE__ */ jsx23(Highlighter, { ...iconProps }),
1681
- hrControlIcon: /* @__PURE__ */ jsx23(Minus, { ...iconProps }),
1682
- italicControlIcon: /* @__PURE__ */ jsx23(Italic, { ...iconProps }),
1731
+ alignCenterControlIcon: /* @__PURE__ */ jsx24(
1732
+ IconPlaceholder,
1733
+ {
1734
+ lucide: "AlignCenter",
1735
+ tabler: "IconAlignCenter",
1736
+ hugeicons: "TextAlignCenterIcon",
1737
+ phosphor: "TextAlignCenterIcon",
1738
+ remixicon: "RiAlignCenter",
1739
+ ...iconProps
1740
+ }
1741
+ ),
1742
+ alignJustifyControlIcon: /* @__PURE__ */ jsx24(
1743
+ IconPlaceholder,
1744
+ {
1745
+ lucide: "AlignJustify",
1746
+ tabler: "IconAlignJustified",
1747
+ hugeicons: "TextAlignJustifyCenterIcon",
1748
+ phosphor: "TextAlignJustifyIcon",
1749
+ remixicon: "RiAlignJustify",
1750
+ ...iconProps
1751
+ }
1752
+ ),
1753
+ alignLeftControlIcon: /* @__PURE__ */ jsx24(
1754
+ IconPlaceholder,
1755
+ {
1756
+ lucide: "AlignLeft",
1757
+ tabler: "IconAlignLeft",
1758
+ hugeicons: "TextAlignLeftIcon",
1759
+ phosphor: "TextAlignLeftIcon",
1760
+ remixicon: "RiAlignLeft",
1761
+ ...iconProps
1762
+ }
1763
+ ),
1764
+ alignRightControlIcon: /* @__PURE__ */ jsx24(
1765
+ IconPlaceholder,
1766
+ {
1767
+ lucide: "AlignRight",
1768
+ tabler: "IconAlignRight",
1769
+ hugeicons: "TextAlignRightIcon",
1770
+ phosphor: "TextAlignRightIcon",
1771
+ remixicon: "RiAlignRight",
1772
+ ...iconProps
1773
+ }
1774
+ ),
1775
+ blockquoteControlIcon: /* @__PURE__ */ jsx24(
1776
+ IconPlaceholder,
1777
+ {
1778
+ lucide: "TextQuote",
1779
+ tabler: "IconQuote",
1780
+ hugeicons: "LeftToRightBlockQuoteIcon",
1781
+ phosphor: "QuotesIcon",
1782
+ remixicon: "RiQuoteText",
1783
+ ...iconProps
1784
+ }
1785
+ ),
1786
+ boldControlIcon: /* @__PURE__ */ jsx24(
1787
+ IconPlaceholder,
1788
+ {
1789
+ lucide: "Bold",
1790
+ tabler: "IconBold",
1791
+ hugeicons: "BoldIcon",
1792
+ phosphor: "TextBIcon",
1793
+ remixicon: "RiBold",
1794
+ ...iconProps
1795
+ }
1796
+ ),
1797
+ bulletListControlIcon: /* @__PURE__ */ jsx24(
1798
+ IconPlaceholder,
1799
+ {
1800
+ lucide: "List",
1801
+ tabler: "IconList",
1802
+ hugeicons: "LeftToRightListBulletIcon",
1803
+ phosphor: "ListBulletsIcon",
1804
+ remixicon: "RiListUnordered",
1805
+ ...iconProps
1806
+ }
1807
+ ),
1808
+ clearFormattingControlIcon: /* @__PURE__ */ jsx24(
1809
+ IconPlaceholder,
1810
+ {
1811
+ lucide: "RemoveFormatting",
1812
+ tabler: "IconEraser",
1813
+ hugeicons: "TextClearIcon",
1814
+ phosphor: "EraserIcon",
1815
+ remixicon: "RiFormatClear",
1816
+ ...iconProps
1817
+ }
1818
+ ),
1819
+ codeBlockControlIcon: /* @__PURE__ */ jsx24(
1820
+ IconPlaceholder,
1821
+ {
1822
+ lucide: "SquareCode",
1823
+ tabler: "IconSourceCode",
1824
+ hugeicons: "SourceCodeSquareIcon",
1825
+ phosphor: "CodeBlockIcon",
1826
+ remixicon: "RiCodeBoxLine",
1827
+ ...iconProps
1828
+ }
1829
+ ),
1830
+ codeControlIcon: /* @__PURE__ */ jsx24(
1831
+ IconPlaceholder,
1832
+ {
1833
+ lucide: "Code",
1834
+ tabler: "IconCode",
1835
+ hugeicons: "SourceCodeIcon",
1836
+ phosphor: "CodeIcon",
1837
+ remixicon: "RiCodeLine",
1838
+ ...iconProps
1839
+ }
1840
+ ),
1841
+ h1ControlIcon: /* @__PURE__ */ jsx24(
1842
+ IconPlaceholder,
1843
+ {
1844
+ lucide: "Heading1",
1845
+ tabler: "IconH1",
1846
+ hugeicons: "Heading01Icon",
1847
+ phosphor: "TextHOneIcon",
1848
+ remixicon: "RiH1",
1849
+ ...iconProps
1850
+ }
1851
+ ),
1852
+ h2ControlIcon: /* @__PURE__ */ jsx24(
1853
+ IconPlaceholder,
1854
+ {
1855
+ lucide: "Heading2",
1856
+ tabler: "IconH2",
1857
+ hugeicons: "Heading02Icon",
1858
+ phosphor: "TextHTwoIcon",
1859
+ remixicon: "RiH2",
1860
+ ...iconProps
1861
+ }
1862
+ ),
1863
+ h3ControlIcon: /* @__PURE__ */ jsx24(
1864
+ IconPlaceholder,
1865
+ {
1866
+ lucide: "Heading3",
1867
+ tabler: "IconH3",
1868
+ hugeicons: "Heading03Icon",
1869
+ phosphor: "TextHThreeIcon",
1870
+ remixicon: "RiH3",
1871
+ ...iconProps
1872
+ }
1873
+ ),
1874
+ h4ControlIcon: /* @__PURE__ */ jsx24(
1875
+ IconPlaceholder,
1876
+ {
1877
+ lucide: "Heading4",
1878
+ tabler: "IconH4",
1879
+ hugeicons: "Heading04Icon",
1880
+ phosphor: "TextHFourIcon",
1881
+ remixicon: "RiH4",
1882
+ ...iconProps
1883
+ }
1884
+ ),
1885
+ h5ControlIcon: /* @__PURE__ */ jsx24(
1886
+ IconPlaceholder,
1887
+ {
1888
+ lucide: "Heading5",
1889
+ tabler: "IconH5",
1890
+ hugeicons: "Heading05Icon",
1891
+ phosphor: "TextHFiveIcon",
1892
+ remixicon: "RiH5",
1893
+ ...iconProps
1894
+ }
1895
+ ),
1896
+ h6ControlIcon: /* @__PURE__ */ jsx24(
1897
+ IconPlaceholder,
1898
+ {
1899
+ lucide: "Heading6",
1900
+ tabler: "IconH6",
1901
+ hugeicons: "Heading06Icon",
1902
+ phosphor: "TextHSixIcon",
1903
+ remixicon: "RiH6",
1904
+ ...iconProps
1905
+ }
1906
+ ),
1907
+ highlightControlIcon: /* @__PURE__ */ jsx24(
1908
+ IconPlaceholder,
1909
+ {
1910
+ lucide: "Highlighter",
1911
+ tabler: "IconHighlight",
1912
+ hugeicons: "HighlighterIcon",
1913
+ phosphor: "HighlighterIcon",
1914
+ remixicon: "RiMarkPenLine",
1915
+ ...iconProps
1916
+ }
1917
+ ),
1918
+ hrControlIcon: /* @__PURE__ */ jsx24(
1919
+ IconPlaceholder,
1920
+ {
1921
+ lucide: "Minus",
1922
+ tabler: "IconMinus",
1923
+ hugeicons: "MinusSignIcon",
1924
+ phosphor: "MinusIcon",
1925
+ remixicon: "RiSeparator",
1926
+ ...iconProps
1927
+ }
1928
+ ),
1929
+ italicControlIcon: /* @__PURE__ */ jsx24(
1930
+ IconPlaceholder,
1931
+ {
1932
+ lucide: "Italic",
1933
+ tabler: "IconItalic",
1934
+ hugeicons: "ItalicIcon",
1935
+ phosphor: "TextItalicIcon",
1936
+ remixicon: "RiItalic",
1937
+ ...iconProps
1938
+ }
1939
+ ),
1683
1940
  languageIcons: DEFAULT_LANGUAGE_ICONS,
1684
- linkControlIcon: /* @__PURE__ */ jsx23(Link, { ...iconProps }),
1685
- orderedListControlIcon: /* @__PURE__ */ jsx23(ListOrdered, { ...iconProps }),
1686
- redoControlIcon: /* @__PURE__ */ jsx23(Redo2, { ...iconProps }),
1687
- strikeControlIcon: /* @__PURE__ */ jsx23(Strikethrough, { ...iconProps }),
1688
- subscriptControlIcon: /* @__PURE__ */ jsx23(Subscript, { ...iconProps }),
1689
- superscriptControlIcon: /* @__PURE__ */ jsx23(Superscript, { ...iconProps }),
1690
- underlineControlIcon: /* @__PURE__ */ jsx23(Underline, { ...iconProps }),
1691
- undoControlIcon: /* @__PURE__ */ jsx23(Undo2, { ...iconProps }),
1692
- unlinkControlIcon: /* @__PURE__ */ jsx23(Link2Off, { ...iconProps })
1941
+ linkControlIcon: /* @__PURE__ */ jsx24(
1942
+ IconPlaceholder,
1943
+ {
1944
+ lucide: "Link",
1945
+ tabler: "IconLink",
1946
+ hugeicons: "Link01Icon",
1947
+ phosphor: "LinkIcon",
1948
+ remixicon: "RiLink",
1949
+ ...iconProps
1950
+ }
1951
+ ),
1952
+ orderedListControlIcon: /* @__PURE__ */ jsx24(
1953
+ IconPlaceholder,
1954
+ {
1955
+ lucide: "ListOrdered",
1956
+ tabler: "IconListNumbers",
1957
+ hugeicons: "LeftToRightListNumberIcon",
1958
+ phosphor: "ListNumbersIcon",
1959
+ remixicon: "RiListOrdered",
1960
+ ...iconProps
1961
+ }
1962
+ ),
1963
+ redoControlIcon: /* @__PURE__ */ jsx24(
1964
+ IconPlaceholder,
1965
+ {
1966
+ lucide: "Redo2",
1967
+ tabler: "IconArrowForwardUp",
1968
+ hugeicons: "RedoIcon",
1969
+ phosphor: "ArrowClockwiseIcon",
1970
+ remixicon: "RiArrowGoForwardLine",
1971
+ ...iconProps
1972
+ }
1973
+ ),
1974
+ strikeControlIcon: /* @__PURE__ */ jsx24(
1975
+ IconPlaceholder,
1976
+ {
1977
+ lucide: "Strikethrough",
1978
+ tabler: "IconStrikethrough",
1979
+ hugeicons: "StrikethroughIcon",
1980
+ phosphor: "TextStrikethroughIcon",
1981
+ remixicon: "RiStrikethrough",
1982
+ ...iconProps
1983
+ }
1984
+ ),
1985
+ subscriptControlIcon: /* @__PURE__ */ jsx24(
1986
+ IconPlaceholder,
1987
+ {
1988
+ lucide: "Subscript",
1989
+ tabler: "IconSubscript",
1990
+ hugeicons: "SubscriptIcon",
1991
+ phosphor: "TextSubscriptIcon",
1992
+ remixicon: "RiSubscript",
1993
+ ...iconProps
1994
+ }
1995
+ ),
1996
+ superscriptControlIcon: /* @__PURE__ */ jsx24(
1997
+ IconPlaceholder,
1998
+ {
1999
+ lucide: "Superscript",
2000
+ tabler: "IconSuperscript",
2001
+ hugeicons: "SuperscriptIcon",
2002
+ phosphor: "TextSuperscriptIcon",
2003
+ remixicon: "RiSuperscript",
2004
+ ...iconProps
2005
+ }
2006
+ ),
2007
+ underlineControlIcon: /* @__PURE__ */ jsx24(
2008
+ IconPlaceholder,
2009
+ {
2010
+ lucide: "Underline",
2011
+ tabler: "IconUnderline",
2012
+ hugeicons: "UnderlineIcon",
2013
+ phosphor: "TextUnderlineIcon",
2014
+ remixicon: "RiUnderline",
2015
+ ...iconProps
2016
+ }
2017
+ ),
2018
+ undoControlIcon: /* @__PURE__ */ jsx24(
2019
+ IconPlaceholder,
2020
+ {
2021
+ lucide: "Undo2",
2022
+ tabler: "IconArrowBackUp",
2023
+ hugeicons: "UndoIcon",
2024
+ phosphor: "ArrowCounterClockwiseIcon",
2025
+ remixicon: "RiArrowGoBackLine",
2026
+ ...iconProps
2027
+ }
2028
+ ),
2029
+ unlinkControlIcon: /* @__PURE__ */ jsx24(
2030
+ IconPlaceholder,
2031
+ {
2032
+ lucide: "Link2Off",
2033
+ tabler: "IconUnlink",
2034
+ hugeicons: "UnlinkIcon",
2035
+ phosphor: "LinkBreakIcon",
2036
+ remixicon: "RiLinkUnlink",
2037
+ ...iconProps
2038
+ }
2039
+ )
1693
2040
  };
1694
2041
 
1695
2042
  // src/extensions/resizable-node-view.tsx
1696
- import { Fragment as Fragment4, jsx as jsx24, jsxs as jsxs11 } from "react/jsx-runtime";
2043
+ import { Fragment as Fragment4, jsx as jsx25, jsxs as jsxs11 } from "react/jsx-runtime";
1697
2044
  var SELECTOR_BUTTON = "rte-embed-selector-btn inline-flex h-8 min-w-8 cursor-pointer items-center justify-center rounded-sm border-none bg-transparent px-2 text-[0.75rem] font-medium text-popover-foreground [transition:background-color_150ms_ease-out,color_150ms_ease-out,scale_100ms_ease-out] hover:bg-muted hover:text-foreground focus-visible:outline-2 focus-visible:outline-solid focus-visible:outline-ring/50 focus-visible:-outline-offset-2 active:scale-96";
1698
2045
  var SELECTOR_GROUP = "rte-embed-selector-group flex items-center gap-0.5";
1699
2046
  var SELECTOR_DIVIDER = "rte-embed-selector-divider mx-0.5 h-4 w-px shrink-0 bg-border";
@@ -1718,7 +2065,7 @@ var EmbedToolbar = ({
1718
2065
  }) => {
1719
2066
  if (isEditingUrl) {
1720
2067
  return /* @__PURE__ */ jsxs11("div", { className: "rte-embed-selector-edit-form flex items-center gap-1.5", children: [
1721
- /* @__PURE__ */ jsx24(
2068
+ /* @__PURE__ */ jsx25(
1722
2069
  "input",
1723
2070
  {
1724
2071
  ref: inputRef,
@@ -1736,7 +2083,7 @@ var EmbedToolbar = ({
1736
2083
  }
1737
2084
  }
1738
2085
  ),
1739
- /* @__PURE__ */ jsx24(
2086
+ /* @__PURE__ */ jsx25(
1740
2087
  "button",
1741
2088
  {
1742
2089
  type: "button",
@@ -1748,7 +2095,7 @@ var EmbedToolbar = ({
1748
2095
  children: "Save"
1749
2096
  }
1750
2097
  ),
1751
- /* @__PURE__ */ jsx24(
2098
+ /* @__PURE__ */ jsx25(
1752
2099
  "button",
1753
2100
  {
1754
2101
  type: "button",
@@ -1760,7 +2107,7 @@ var EmbedToolbar = ({
1760
2107
  ] });
1761
2108
  }
1762
2109
  return /* @__PURE__ */ jsxs11(Fragment4, { children: [
1763
- /* @__PURE__ */ jsx24("div", { className: SELECTOR_GROUP, children: ["left", "center", "right"].map((dir) => /* @__PURE__ */ jsx24(
2110
+ /* @__PURE__ */ jsx25("div", { className: SELECTOR_GROUP, children: ["left", "center", "right"].map((dir) => /* @__PURE__ */ jsx25(
1764
2111
  "button",
1765
2112
  {
1766
2113
  type: "button",
@@ -1771,12 +2118,12 @@ var EmbedToolbar = ({
1771
2118
  align === dir && "rte-embed-selector-btn--active bg-muted text-foreground"
1772
2119
  ),
1773
2120
  onClick: () => updateAttributes({ align: dir }),
1774
- children: /* @__PURE__ */ jsx24(AlignIcon, { dir })
2121
+ children: /* @__PURE__ */ jsx25(AlignIcon, { dir })
1775
2122
  },
1776
2123
  dir
1777
2124
  )) }),
1778
- /* @__PURE__ */ jsx24("div", { className: SELECTOR_DIVIDER }),
1779
- /* @__PURE__ */ jsx24("div", { className: SELECTOR_GROUP, children: [25, 50, 75, 100].map((pct) => /* @__PURE__ */ jsxs11(
2125
+ /* @__PURE__ */ jsx25("div", { className: SELECTOR_DIVIDER }),
2126
+ /* @__PURE__ */ jsx25("div", { className: SELECTOR_GROUP, children: [25, 50, 75, 100].map((pct) => /* @__PURE__ */ jsxs11(
1780
2127
  "button",
1781
2128
  {
1782
2129
  type: "button",
@@ -1793,9 +2140,9 @@ var EmbedToolbar = ({
1793
2140
  },
1794
2141
  pct
1795
2142
  )) }),
1796
- /* @__PURE__ */ jsx24("div", { className: SELECTOR_DIVIDER }),
2143
+ /* @__PURE__ */ jsx25("div", { className: SELECTOR_DIVIDER }),
1797
2144
  /* @__PURE__ */ jsxs11("div", { className: SELECTOR_GROUP, children: [
1798
- (videoSrc || nodeSrc) && /* @__PURE__ */ jsx24(
2145
+ (videoSrc || nodeSrc) && /* @__PURE__ */ jsx25(
1799
2146
  "button",
1800
2147
  {
1801
2148
  type: "button",
@@ -1806,10 +2153,10 @@ var EmbedToolbar = ({
1806
2153
  setUrlInput(videoSrc || nodeSrc || "");
1807
2154
  setIsEditingUrl(true);
1808
2155
  },
1809
- children: /* @__PURE__ */ jsx24(EditUrlIcon, {})
2156
+ children: /* @__PURE__ */ jsx25(EditUrlIcon, {})
1810
2157
  }
1811
2158
  ),
1812
- watchUrl && /* @__PURE__ */ jsx24(
2159
+ watchUrl && /* @__PURE__ */ jsx25(
1813
2160
  "button",
1814
2161
  {
1815
2162
  type: "button",
@@ -1817,10 +2164,10 @@ var EmbedToolbar = ({
1817
2164
  "aria-label": "Open video in YouTube",
1818
2165
  className: SELECTOR_BUTTON,
1819
2166
  onClick: () => window.open(watchUrl, "_blank"),
1820
- children: /* @__PURE__ */ jsx24(OpenInYouTubeIcon, {})
2167
+ children: /* @__PURE__ */ jsx25(OpenInYouTubeIcon, {})
1821
2168
  }
1822
2169
  ),
1823
- deleteNode && /* @__PURE__ */ jsx24(
2170
+ deleteNode && /* @__PURE__ */ jsx25(
1824
2171
  "button",
1825
2172
  {
1826
2173
  type: "button",
@@ -1831,7 +2178,7 @@ var EmbedToolbar = ({
1831
2178
  "rte-embed-selector-btn--danger hover:bg-destructive/15 hover:text-destructive"
1832
2179
  ),
1833
2180
  onClick: () => deleteNode(),
1834
- children: /* @__PURE__ */ jsx24(DeleteEmbedIcon, {})
2181
+ children: /* @__PURE__ */ jsx25(DeleteEmbedIcon, {})
1835
2182
  }
1836
2183
  )
1837
2184
  ] })
@@ -2002,7 +2349,7 @@ var ResizableNodeView = ({
2002
2349
  setIsEditingUrl(false);
2003
2350
  };
2004
2351
  const isEditable = editor ? editor.isEditable : true;
2005
- return /* @__PURE__ */ jsx24(
2352
+ return /* @__PURE__ */ jsx25(
2006
2353
  NodeViewWrapper,
2007
2354
  {
2008
2355
  className: "rte-embed-wrapper group/embed",
@@ -2021,12 +2368,12 @@ var ResizableNodeView = ({
2021
2368
  },
2022
2369
  children: [
2023
2370
  children,
2024
- selected && isEditable && /* @__PURE__ */ jsx24(
2371
+ selected && isEditable && /* @__PURE__ */ jsx25(
2025
2372
  "div",
2026
2373
  {
2027
2374
  className: "rte-embed-selector pointer-events-auto absolute top-[-46px] left-1/2 z-50 flex h-10 animate-rte-bubble-pop-in items-center gap-1 rounded-lg border border-[color-mix(in_srgb,var(--border)_60%,transparent)] bg-popover px-1 whitespace-nowrap shadow-[0_8px_30px_-12px_rgb(0_0_0/0.15)] [transform:translateX(-50%)]",
2028
2375
  contentEditable: false,
2029
- children: /* @__PURE__ */ jsx24(
2376
+ children: /* @__PURE__ */ jsx25(
2030
2377
  EmbedToolbar,
2031
2378
  {
2032
2379
  align,
@@ -2053,7 +2400,7 @@ var ResizableNodeView = ({
2053
2400
  " px"
2054
2401
  ] }),
2055
2402
  selected && isEditable && /* @__PURE__ */ jsxs11(Fragment4, { children: [
2056
- /* @__PURE__ */ jsx24(
2403
+ /* @__PURE__ */ jsx25(
2057
2404
  "div",
2058
2405
  {
2059
2406
  className: `${SIDE_HANDLE} rte-resize-handle--left -left-[3px]`,
@@ -2061,7 +2408,7 @@ var ResizableNodeView = ({
2061
2408
  role: "presentation"
2062
2409
  }
2063
2410
  ),
2064
- /* @__PURE__ */ jsx24(
2411
+ /* @__PURE__ */ jsx25(
2065
2412
  "div",
2066
2413
  {
2067
2414
  className: `${SIDE_HANDLE} rte-resize-handle--right -right-[3px]`,
@@ -2069,7 +2416,7 @@ var ResizableNodeView = ({
2069
2416
  role: "presentation"
2070
2417
  }
2071
2418
  ),
2072
- /* @__PURE__ */ jsx24(
2419
+ /* @__PURE__ */ jsx25(
2073
2420
  "div",
2074
2421
  {
2075
2422
  className: `${EDGE_HANDLE} rte-resize-handle--bottom inset-x-0 -bottom-[3px] h-1.5 cursor-ns-resize after:inset-x-1 after:bottom-px after:h-0.5 after:[transition:height_150ms_ease-out,bottom_150ms_ease-out] hover:after:bottom-0 hover:after:h-1`,
@@ -2077,7 +2424,7 @@ var ResizableNodeView = ({
2077
2424
  role: "presentation"
2078
2425
  }
2079
2426
  ),
2080
- /* @__PURE__ */ jsx24(
2427
+ /* @__PURE__ */ jsx25(
2081
2428
  "div",
2082
2429
  {
2083
2430
  className: `${CORNER_HANDLE} rte-resize-handle--corner-bl -bottom-[5px] -left-[5px] cursor-nesw-resize`,
@@ -2085,7 +2432,7 @@ var ResizableNodeView = ({
2085
2432
  role: "presentation"
2086
2433
  }
2087
2434
  ),
2088
- /* @__PURE__ */ jsx24(
2435
+ /* @__PURE__ */ jsx25(
2089
2436
  "div",
2090
2437
  {
2091
2438
  className: `${CORNER_HANDLE} rte-resize-handle--corner-br -right-[5px] -bottom-[5px] cursor-nwse-resize`,
@@ -2102,7 +2449,7 @@ var ResizableNodeView = ({
2102
2449
  };
2103
2450
 
2104
2451
  // src/controls/rte-twitter-control.tsx
2105
- import { jsx as jsx25, jsxs as jsxs12 } from "react/jsx-runtime";
2452
+ import { jsx as jsx26, jsxs as jsxs12 } from "react/jsx-runtime";
2106
2453
  var WIDGET_SCRIPT_URL = "https://platform.twitter.com/widgets.js";
2107
2454
  var SCRIPT_LOAD_TIMEOUT_MS = 8e3;
2108
2455
  var READY_POLL_INTERVAL_MS = 50;
@@ -2257,12 +2604,12 @@ var TwitterNodeView = (props) => {
2257
2604
  minWidth: 300,
2258
2605
  maxWidth: 1200,
2259
2606
  children: [
2260
- loading && /* @__PURE__ */ jsx25("div", { className: "rte-embed-loading animate-pulse", children: "Loading tweet..." }),
2607
+ loading && /* @__PURE__ */ jsx26("div", { className: "rte-embed-loading animate-pulse", children: "Loading tweet..." }),
2261
2608
  !loading && failed && /* @__PURE__ */ jsxs12("div", { className: "rte-embed-error", children: [
2262
- /* @__PURE__ */ jsx25("p", { children: "Couldn't load this tweet." }),
2263
- /* @__PURE__ */ jsx25("button", { type: "button", onClick: handleRetry, children: "Retry" })
2609
+ /* @__PURE__ */ jsx26("p", { children: "Couldn't load this tweet." }),
2610
+ /* @__PURE__ */ jsx26("button", { type: "button", onClick: handleRetry, children: "Retry" })
2264
2611
  ] }),
2265
- /* @__PURE__ */ jsx25("div", { ref: containerRef })
2612
+ /* @__PURE__ */ jsx26("div", { ref: containerRef })
2266
2613
  ]
2267
2614
  }
2268
2615
  );
@@ -2401,24 +2748,24 @@ var TwitterEmbedControl = ({ className }) => {
2401
2748
  }
2402
2749
  },
2403
2750
  children: [
2404
- /* @__PURE__ */ jsx25(
2751
+ /* @__PURE__ */ jsx26(
2405
2752
  DialogTrigger,
2406
2753
  {
2407
- render: /* @__PURE__ */ jsx25(
2754
+ render: /* @__PURE__ */ jsx26(
2408
2755
  RichTextEditorControl,
2409
2756
  {
2410
2757
  active,
2411
2758
  className,
2412
2759
  title: "Embed Tweet",
2413
2760
  "aria-label": "Embed Tweet",
2414
- children: /* @__PURE__ */ jsx25(
2761
+ children: /* @__PURE__ */ jsx26(
2415
2762
  "svg",
2416
2763
  {
2417
2764
  xmlns: "http://www.w3.org/2000/svg",
2418
2765
  viewBox: "0 0 24 24",
2419
2766
  fill: "currentColor",
2420
2767
  className: "rte-editor-icon",
2421
- 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" })
2768
+ 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" })
2422
2769
  }
2423
2770
  )
2424
2771
  }
@@ -2427,10 +2774,10 @@ var TwitterEmbedControl = ({ className }) => {
2427
2774
  ),
2428
2775
  /* @__PURE__ */ jsxs12(DialogContent, { children: [
2429
2776
  /* @__PURE__ */ jsxs12(DialogHeader, { children: [
2430
- /* @__PURE__ */ jsx25(DialogTitle, { children: "Embed Tweet" }),
2431
- /* @__PURE__ */ jsx25(DialogDescription, { children: "Paste a tweet URL or ID." })
2777
+ /* @__PURE__ */ jsx26(DialogTitle, { children: "Embed Tweet" }),
2778
+ /* @__PURE__ */ jsx26(DialogDescription, { children: "Paste a tweet URL or ID." })
2432
2779
  ] }),
2433
- /* @__PURE__ */ jsx25(
2780
+ /* @__PURE__ */ jsx26(
2434
2781
  Input,
2435
2782
  {
2436
2783
  value: url,
@@ -2450,10 +2797,10 @@ var TwitterEmbedControl = ({ className }) => {
2450
2797
  }
2451
2798
  }
2452
2799
  ),
2453
- showError && /* @__PURE__ */ jsx25("p", { className: "rte-input-error", role: "alert", children: "That doesn't look like a valid tweet URL or ID." }),
2800
+ showError && /* @__PURE__ */ jsx26("p", { className: "rte-input-error", role: "alert", children: "That doesn't look like a valid tweet URL or ID." }),
2454
2801
  /* @__PURE__ */ jsxs12(DialogFooter, { children: [
2455
- /* @__PURE__ */ jsx25(DialogClose, { children: "Cancel" }),
2456
- /* @__PURE__ */ jsx25(
2802
+ /* @__PURE__ */ jsx26(DialogClose, { children: "Cancel" }),
2803
+ /* @__PURE__ */ jsx26(
2457
2804
  "button",
2458
2805
  {
2459
2806
  type: "button",
@@ -2483,7 +2830,7 @@ import {
2483
2830
  } from "@tiptap/core";
2484
2831
  import { ReactNodeViewRenderer as ReactNodeViewRenderer2, useEditorState as useEditorState5 } from "@tiptap/react";
2485
2832
  import { useState as useState6, useCallback as useCallback7 } from "react";
2486
- import { jsx as jsx26, jsxs as jsxs13 } from "react/jsx-runtime";
2833
+ import { jsx as jsx27, jsxs as jsxs13 } from "react/jsx-runtime";
2487
2834
  var getYouTubeId = (url) => {
2488
2835
  const clean = url.trim();
2489
2836
  const patterns = [
@@ -2511,7 +2858,7 @@ var YouTubeNodeView = (props) => {
2511
2858
  if (videoId) {
2512
2859
  watchUrl = videoId.startsWith("http") ? videoId : `https://www.youtube.com/watch?v=${videoId}`;
2513
2860
  }
2514
- return /* @__PURE__ */ jsx26(
2861
+ return /* @__PURE__ */ jsx27(
2515
2862
  ResizableNodeView,
2516
2863
  {
2517
2864
  ...props,
@@ -2522,7 +2869,7 @@ var YouTubeNodeView = (props) => {
2522
2869
  videoSrc: rawSrc,
2523
2870
  watchUrl,
2524
2871
  onSrcChange: (newSrc) => updateAttributes({ src: newSrc }),
2525
- children: /* @__PURE__ */ jsx26(
2872
+ children: /* @__PURE__ */ jsx27(
2526
2873
  "iframe",
2527
2874
  {
2528
2875
  src: `https://www.youtube-nocookie.com/embed/${videoId}`,
@@ -2639,10 +2986,10 @@ var YouTubeEmbedControl = ({ className }) => {
2639
2986
  }
2640
2987
  }, [url, editor]);
2641
2988
  return /* @__PURE__ */ jsxs13(Dialog, { open, onOpenChange: setOpen, children: [
2642
- /* @__PURE__ */ jsx26(
2989
+ /* @__PURE__ */ jsx27(
2643
2990
  DialogTrigger,
2644
2991
  {
2645
- render: /* @__PURE__ */ jsx26(
2992
+ render: /* @__PURE__ */ jsx27(
2646
2993
  RichTextEditorControl,
2647
2994
  {
2648
2995
  active,
@@ -2661,8 +3008,8 @@ var YouTubeEmbedControl = ({ className }) => {
2661
3008
  strokeLinejoin: "round",
2662
3009
  className: "rte-editor-icon",
2663
3010
  children: [
2664
- /* @__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" }),
2665
- /* @__PURE__ */ jsx26("path", { d: "M9.5 15.5V8.5l6.2 3.5z" })
3011
+ /* @__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" }),
3012
+ /* @__PURE__ */ jsx27("path", { d: "M9.5 15.5V8.5l6.2 3.5z" })
2666
3013
  ]
2667
3014
  }
2668
3015
  )
@@ -2672,10 +3019,10 @@ var YouTubeEmbedControl = ({ className }) => {
2672
3019
  ),
2673
3020
  /* @__PURE__ */ jsxs13(DialogContent, { showCloseButton: false, children: [
2674
3021
  /* @__PURE__ */ jsxs13(DialogHeader, { children: [
2675
- /* @__PURE__ */ jsx26(DialogTitle, { children: "Embed YouTube video" }),
2676
- /* @__PURE__ */ jsx26(DialogDescription, { children: "Paste a YouTube video URL or ID." })
3022
+ /* @__PURE__ */ jsx27(DialogTitle, { children: "Embed YouTube video" }),
3023
+ /* @__PURE__ */ jsx27(DialogDescription, { children: "Paste a YouTube video URL or ID." })
2677
3024
  ] }),
2678
- /* @__PURE__ */ jsx26(
3025
+ /* @__PURE__ */ jsx27(
2679
3026
  Input,
2680
3027
  {
2681
3028
  value: url,
@@ -2690,8 +3037,8 @@ var YouTubeEmbedControl = ({ className }) => {
2690
3037
  }
2691
3038
  ),
2692
3039
  /* @__PURE__ */ jsxs13(DialogFooter, { children: [
2693
- /* @__PURE__ */ jsx26(DialogClose, { children: "Cancel" }),
2694
- /* @__PURE__ */ jsx26(
3040
+ /* @__PURE__ */ jsx27(DialogClose, { children: "Cancel" }),
3041
+ /* @__PURE__ */ jsx27(
2695
3042
  DialogClose,
2696
3043
  {
2697
3044
  disabled: !url,
@@ -2748,14 +3095,14 @@ var DEFAULT_LABELS = {
2748
3095
 
2749
3096
  // src/rte-content.tsx
2750
3097
  import { EditorContent } from "@tiptap/react";
2751
- import { jsx as jsx27, jsxs as jsxs14 } from "react/jsx-runtime";
3098
+ import { jsx as jsx28, jsxs as jsxs14 } from "react/jsx-runtime";
2752
3099
  var Content = ({
2753
3100
  children,
2754
3101
  className
2755
3102
  }) => {
2756
3103
  const { editor, preset, variant } = useRichTextEditorContext();
2757
3104
  return /* @__PURE__ */ jsxs14("div", { className: "relative", children: [
2758
- /* @__PURE__ */ jsx27(
3105
+ /* @__PURE__ */ jsx28(
2759
3106
  EditorContent,
2760
3107
  {
2761
3108
  editor,
@@ -2774,7 +3121,7 @@ var Content = ({
2774
3121
 
2775
3122
  // src/rte-controls-group.tsx
2776
3123
  import { useContext as useContext3 } from "react";
2777
- import { jsx as jsx28 } from "react/jsx-runtime";
3124
+ import { jsx as jsx29 } from "react/jsx-runtime";
2778
3125
  var SEPARATOR = "[.rte-controls-group+&]:before:w-px [.rte-controls-group+&]:before:shrink-0 [.rte-controls-group+&]:before:bg-border [.rte-controls-group+&]:before:content-['']";
2779
3126
  var BUTTON = "[&>button]:border-none [&>button]:bg-transparent [&>button]:transition-[background-color,color] [&>button]:duration-150 [&>button]:ease-[ease-out] [&>button:focus-visible]:outline-2 [&>button:focus-visible]:outline-offset-1 [&>button:focus-visible]:outline-ring/50 [&>button:focus-visible]:outline-solid";
2780
3127
  var variantClasses = {
@@ -2787,7 +3134,7 @@ var ControlsGroup = ({
2787
3134
  className
2788
3135
  }) => {
2789
3136
  const variant = useContext3(RichTextEditorContext)?.variant;
2790
- return /* @__PURE__ */ jsx28(
3137
+ return /* @__PURE__ */ jsx29(
2791
3138
  "div",
2792
3139
  {
2793
3140
  className: cn(
@@ -2802,7 +3149,7 @@ var ControlsGroup = ({
2802
3149
 
2803
3150
  // src/rte-footer.tsx
2804
3151
  import { useEffect as useEffect5, useMemo, useRef as useRef5, useState as useState7 } from "react";
2805
- import { Fragment as Fragment5, jsx as jsx29, jsxs as jsxs15 } from "react/jsx-runtime";
3152
+ import { Fragment as Fragment5, jsx as jsx30, jsxs as jsxs15 } from "react/jsx-runtime";
2806
3153
  var Footer = ({
2807
3154
  children,
2808
3155
  className,
@@ -2875,7 +3222,7 @@ var Footer = ({
2875
3222
  "data-sticky": sticky ? "" : void 0,
2876
3223
  style: sticky ? { bottom: stickyOffset } : void 0,
2877
3224
  children: [
2878
- showWordCount && wordCount && /* @__PURE__ */ jsx29(
3225
+ showWordCount && wordCount && /* @__PURE__ */ jsx30(
2879
3226
  "span",
2880
3227
  {
2881
3228
  className: cn(
@@ -2884,10 +3231,10 @@ var Footer = ({
2884
3231
  ),
2885
3232
  children: wordCountFormatter ? wordCountFormatter(wordCount) : /* @__PURE__ */ jsxs15(Fragment5, { children: [
2886
3233
  /* @__PURE__ */ jsxs15("span", { className: "rte-footer-word-count-stat inline-flex items-baseline gap-1", children: [
2887
- /* @__PURE__ */ jsx29("span", { className: "rte-footer-word-count-number font-medium text-foreground tabular-nums", children: wordCount.words }),
2888
- /* @__PURE__ */ jsx29("span", { className: "rte-footer-word-count-unit text-muted-foreground", children: "words" })
3234
+ /* @__PURE__ */ jsx30("span", { className: "rte-footer-word-count-number font-medium text-foreground tabular-nums", children: wordCount.words }),
3235
+ /* @__PURE__ */ jsx30("span", { className: "rte-footer-word-count-unit text-muted-foreground", children: "words" })
2889
3236
  ] }),
2890
- /* @__PURE__ */ jsx29(
3237
+ /* @__PURE__ */ jsx30(
2891
3238
  "span",
2892
3239
  {
2893
3240
  className: "rte-footer-word-count-separator size-[3px] shrink-0 rounded-full bg-[color-mix(in_srgb,var(--muted-foreground)_45%,transparent)]",
@@ -2895,8 +3242,8 @@ var Footer = ({
2895
3242
  }
2896
3243
  ),
2897
3244
  /* @__PURE__ */ jsxs15("span", { className: "rte-footer-word-count-stat inline-flex items-baseline gap-1", children: [
2898
- /* @__PURE__ */ jsx29("span", { className: "rte-footer-word-count-number font-medium text-foreground tabular-nums", children: wordCount.characters }),
2899
- /* @__PURE__ */ jsx29("span", { className: "rte-footer-word-count-unit text-muted-foreground", children: "characters" })
3245
+ /* @__PURE__ */ jsx30("span", { className: "rte-footer-word-count-number font-medium text-foreground tabular-nums", children: wordCount.characters }),
3246
+ /* @__PURE__ */ jsx30("span", { className: "rte-footer-word-count-unit text-muted-foreground", children: "characters" })
2900
3247
  ] })
2901
3248
  ] })
2902
3249
  }
@@ -2908,7 +3255,7 @@ var Footer = ({
2908
3255
  };
2909
3256
 
2910
3257
  // src/rte-toolbar.tsx
2911
- import { jsx as jsx30 } from "react/jsx-runtime";
3258
+ import { jsx as jsx31 } from "react/jsx-runtime";
2912
3259
  var Toolbar = ({
2913
3260
  children,
2914
3261
  className,
@@ -2919,7 +3266,7 @@ var Toolbar = ({
2919
3266
  if (!editable) {
2920
3267
  return null;
2921
3268
  }
2922
- return /* @__PURE__ */ jsx30(
3269
+ return /* @__PURE__ */ jsx31(
2923
3270
  "div",
2924
3271
  {
2925
3272
  className: cn(
@@ -2941,7 +3288,7 @@ var Toolbar = ({
2941
3288
  };
2942
3289
 
2943
3290
  // src/rte-text-editor.tsx
2944
- import { jsx as jsx31 } from "react/jsx-runtime";
3291
+ import { jsx as jsx32 } from "react/jsx-runtime";
2945
3292
  var RichTextEditorRoot = ({
2946
3293
  editor,
2947
3294
  children,
@@ -2963,7 +3310,7 @@ var RichTextEditorRoot = ({
2963
3310
  editor.setEditable(editable);
2964
3311
  }
2965
3312
  }, [editor, editable]);
2966
- return /* @__PURE__ */ jsx31(
3313
+ return /* @__PURE__ */ jsx32(
2967
3314
  RichTextEditorContext.Provider,
2968
3315
  {
2969
3316
  value: {
@@ -2975,7 +3322,7 @@ var RichTextEditorRoot = ({
2975
3322
  tooltip,
2976
3323
  variant
2977
3324
  },
2978
- children: /* @__PURE__ */ jsx31(
3325
+ children: /* @__PURE__ */ jsx32(
2979
3326
  "div",
2980
3327
  {
2981
3328
  className: cn(
@@ -2986,7 +3333,7 @@ var RichTextEditorRoot = ({
2986
3333
  className
2987
3334
  ),
2988
3335
  "data-variant": variant,
2989
- children: /* @__PURE__ */ jsx31(TooltipProvider, { children: /* @__PURE__ */ jsx31(TooltipHost, { handle: tooltip, side: "bottom", children }) })
3336
+ children: /* @__PURE__ */ jsx32(TooltipProvider, { children: /* @__PURE__ */ jsx32(TooltipHost, { handle: tooltip, side: "bottom", children }) })
2990
3337
  }
2991
3338
  )
2992
3339
  }