@editorcn/editor 0.3.3 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +256 -250
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +205 -199
- package/dist/index.js.map +1 -1
- package/dist/style.css +1404 -1362
- package/package.json +6 -4
package/dist/index.js
CHANGED
|
@@ -1454,91 +1454,10 @@ import {
|
|
|
1454
1454
|
Undo2
|
|
1455
1455
|
} from "lucide-react";
|
|
1456
1456
|
import "react";
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
/* @__PURE__ */ jsx22("line", { x1: "17", y1: "12", x2: "7", y2: "12" }),
|
|
1462
|
-
/* @__PURE__ */ jsx22("line", { x1: "19", y1: "18", x2: "5", y2: "18" })
|
|
1463
|
-
] }),
|
|
1464
|
-
left: /* @__PURE__ */ jsxs9(Fragment4, { children: [
|
|
1465
|
-
/* @__PURE__ */ jsx22("line", { x1: "21", y1: "6", x2: "3", y2: "6" }),
|
|
1466
|
-
/* @__PURE__ */ jsx22("line", { x1: "15", y1: "12", x2: "3", y2: "12" }),
|
|
1467
|
-
/* @__PURE__ */ jsx22("line", { x1: "17", y1: "18", x2: "3", y2: "18" })
|
|
1468
|
-
] }),
|
|
1469
|
-
right: /* @__PURE__ */ jsxs9(Fragment4, { children: [
|
|
1470
|
-
/* @__PURE__ */ jsx22("line", { x1: "21", y1: "6", x2: "3", y2: "6" }),
|
|
1471
|
-
/* @__PURE__ */ jsx22("line", { x1: "21", y1: "12", x2: "9", y2: "12" }),
|
|
1472
|
-
/* @__PURE__ */ jsx22("line", { x1: "21", y1: "18", x2: "7", y2: "18" })
|
|
1473
|
-
] })
|
|
1474
|
-
};
|
|
1475
|
-
var AlignIcon = ({ dir }) => /* @__PURE__ */ jsx22(
|
|
1476
|
-
"svg",
|
|
1477
|
-
{
|
|
1478
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1479
|
-
viewBox: "0 0 24 24",
|
|
1480
|
-
fill: "none",
|
|
1481
|
-
stroke: "currentColor",
|
|
1482
|
-
strokeWidth: "2",
|
|
1483
|
-
strokeLinecap: "round",
|
|
1484
|
-
strokeLinejoin: "round",
|
|
1485
|
-
className: "rte-editor-icon",
|
|
1486
|
-
children: ALIGN_PATHS[dir]
|
|
1487
|
-
}
|
|
1488
|
-
);
|
|
1489
|
-
var EditUrlIcon = () => /* @__PURE__ */ jsxs9(
|
|
1490
|
-
"svg",
|
|
1491
|
-
{
|
|
1492
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1493
|
-
viewBox: "0 0 24 24",
|
|
1494
|
-
fill: "none",
|
|
1495
|
-
stroke: "currentColor",
|
|
1496
|
-
strokeWidth: "2",
|
|
1497
|
-
strokeLinecap: "round",
|
|
1498
|
-
strokeLinejoin: "round",
|
|
1499
|
-
className: "rte-editor-icon",
|
|
1500
|
-
children: [
|
|
1501
|
-
/* @__PURE__ */ jsx22("path", { d: "M12 20h9" }),
|
|
1502
|
-
/* @__PURE__ */ jsx22("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z" })
|
|
1503
|
-
]
|
|
1504
|
-
}
|
|
1505
|
-
);
|
|
1506
|
-
var OpenInYouTubeIcon = () => /* @__PURE__ */ jsxs9(
|
|
1507
|
-
"svg",
|
|
1508
|
-
{
|
|
1509
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1510
|
-
viewBox: "0 0 24 24",
|
|
1511
|
-
fill: "none",
|
|
1512
|
-
stroke: "currentColor",
|
|
1513
|
-
strokeWidth: "2",
|
|
1514
|
-
strokeLinecap: "round",
|
|
1515
|
-
strokeLinejoin: "round",
|
|
1516
|
-
className: "rte-editor-icon",
|
|
1517
|
-
children: [
|
|
1518
|
-
/* @__PURE__ */ jsx22("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
|
|
1519
|
-
/* @__PURE__ */ jsx22("polyline", { points: "15 3 21 3 21 9" }),
|
|
1520
|
-
/* @__PURE__ */ jsx22("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
|
|
1521
|
-
]
|
|
1522
|
-
}
|
|
1523
|
-
);
|
|
1524
|
-
var DeleteEmbedIcon = () => /* @__PURE__ */ jsxs9(
|
|
1525
|
-
"svg",
|
|
1526
|
-
{
|
|
1527
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1528
|
-
viewBox: "0 0 24 24",
|
|
1529
|
-
fill: "none",
|
|
1530
|
-
stroke: "currentColor",
|
|
1531
|
-
strokeWidth: "2",
|
|
1532
|
-
strokeLinecap: "round",
|
|
1533
|
-
strokeLinejoin: "round",
|
|
1534
|
-
className: "rte-editor-icon",
|
|
1535
|
-
children: [
|
|
1536
|
-
/* @__PURE__ */ jsx22("polyline", { points: "3 6 5 6 21 6" }),
|
|
1537
|
-
/* @__PURE__ */ jsx22("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" })
|
|
1538
|
-
]
|
|
1539
|
-
}
|
|
1540
|
-
);
|
|
1541
|
-
var iconProps = { className: "rte-editor-icon" };
|
|
1457
|
+
|
|
1458
|
+
// src/language-icons.tsx
|
|
1459
|
+
import "react";
|
|
1460
|
+
import { jsx as jsx22, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1542
1461
|
var LangIcon = ({
|
|
1543
1462
|
children,
|
|
1544
1463
|
className
|
|
@@ -1670,40 +1589,127 @@ var DEFAULT_LANGUAGE_ICONS = {
|
|
|
1670
1589
|
/* @__PURE__ */ jsx22("path", { d: "M6.5 16h2M9.5 16h7" })
|
|
1671
1590
|
] })
|
|
1672
1591
|
};
|
|
1592
|
+
|
|
1593
|
+
// src/icons.tsx
|
|
1594
|
+
import { Fragment as Fragment4, jsx as jsx23, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1595
|
+
var ALIGN_PATHS = {
|
|
1596
|
+
center: /* @__PURE__ */ jsxs10(Fragment4, { children: [
|
|
1597
|
+
/* @__PURE__ */ jsx23("line", { x1: "21", y1: "6", x2: "3", y2: "6" }),
|
|
1598
|
+
/* @__PURE__ */ jsx23("line", { x1: "17", y1: "12", x2: "7", y2: "12" }),
|
|
1599
|
+
/* @__PURE__ */ jsx23("line", { x1: "19", y1: "18", x2: "5", y2: "18" })
|
|
1600
|
+
] }),
|
|
1601
|
+
left: /* @__PURE__ */ jsxs10(Fragment4, { children: [
|
|
1602
|
+
/* @__PURE__ */ jsx23("line", { x1: "21", y1: "6", x2: "3", y2: "6" }),
|
|
1603
|
+
/* @__PURE__ */ jsx23("line", { x1: "15", y1: "12", x2: "3", y2: "12" }),
|
|
1604
|
+
/* @__PURE__ */ jsx23("line", { x1: "17", y1: "18", x2: "3", y2: "18" })
|
|
1605
|
+
] }),
|
|
1606
|
+
right: /* @__PURE__ */ jsxs10(Fragment4, { children: [
|
|
1607
|
+
/* @__PURE__ */ jsx23("line", { x1: "21", y1: "6", x2: "3", y2: "6" }),
|
|
1608
|
+
/* @__PURE__ */ jsx23("line", { x1: "21", y1: "12", x2: "9", y2: "12" }),
|
|
1609
|
+
/* @__PURE__ */ jsx23("line", { x1: "21", y1: "18", x2: "7", y2: "18" })
|
|
1610
|
+
] })
|
|
1611
|
+
};
|
|
1612
|
+
var AlignIcon = ({ dir }) => /* @__PURE__ */ jsx23(
|
|
1613
|
+
"svg",
|
|
1614
|
+
{
|
|
1615
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1616
|
+
viewBox: "0 0 24 24",
|
|
1617
|
+
fill: "none",
|
|
1618
|
+
stroke: "currentColor",
|
|
1619
|
+
strokeWidth: "2",
|
|
1620
|
+
strokeLinecap: "round",
|
|
1621
|
+
strokeLinejoin: "round",
|
|
1622
|
+
className: "rte-editor-icon",
|
|
1623
|
+
children: ALIGN_PATHS[dir]
|
|
1624
|
+
}
|
|
1625
|
+
);
|
|
1626
|
+
var EditUrlIcon = () => /* @__PURE__ */ jsxs10(
|
|
1627
|
+
"svg",
|
|
1628
|
+
{
|
|
1629
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1630
|
+
viewBox: "0 0 24 24",
|
|
1631
|
+
fill: "none",
|
|
1632
|
+
stroke: "currentColor",
|
|
1633
|
+
strokeWidth: "2",
|
|
1634
|
+
strokeLinecap: "round",
|
|
1635
|
+
strokeLinejoin: "round",
|
|
1636
|
+
className: "rte-editor-icon",
|
|
1637
|
+
children: [
|
|
1638
|
+
/* @__PURE__ */ jsx23("path", { d: "M12 20h9" }),
|
|
1639
|
+
/* @__PURE__ */ jsx23("path", { d: "M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z" })
|
|
1640
|
+
]
|
|
1641
|
+
}
|
|
1642
|
+
);
|
|
1643
|
+
var OpenInYouTubeIcon = () => /* @__PURE__ */ jsxs10(
|
|
1644
|
+
"svg",
|
|
1645
|
+
{
|
|
1646
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1647
|
+
viewBox: "0 0 24 24",
|
|
1648
|
+
fill: "none",
|
|
1649
|
+
stroke: "currentColor",
|
|
1650
|
+
strokeWidth: "2",
|
|
1651
|
+
strokeLinecap: "round",
|
|
1652
|
+
strokeLinejoin: "round",
|
|
1653
|
+
className: "rte-editor-icon",
|
|
1654
|
+
children: [
|
|
1655
|
+
/* @__PURE__ */ jsx23("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
|
|
1656
|
+
/* @__PURE__ */ jsx23("polyline", { points: "15 3 21 3 21 9" }),
|
|
1657
|
+
/* @__PURE__ */ jsx23("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
|
|
1658
|
+
]
|
|
1659
|
+
}
|
|
1660
|
+
);
|
|
1661
|
+
var DeleteEmbedIcon = () => /* @__PURE__ */ jsxs10(
|
|
1662
|
+
"svg",
|
|
1663
|
+
{
|
|
1664
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1665
|
+
viewBox: "0 0 24 24",
|
|
1666
|
+
fill: "none",
|
|
1667
|
+
stroke: "currentColor",
|
|
1668
|
+
strokeWidth: "2",
|
|
1669
|
+
strokeLinecap: "round",
|
|
1670
|
+
strokeLinejoin: "round",
|
|
1671
|
+
className: "rte-editor-icon",
|
|
1672
|
+
children: [
|
|
1673
|
+
/* @__PURE__ */ jsx23("polyline", { points: "3 6 5 6 21 6" }),
|
|
1674
|
+
/* @__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" })
|
|
1675
|
+
]
|
|
1676
|
+
}
|
|
1677
|
+
);
|
|
1678
|
+
var iconProps = { className: "rte-editor-icon" };
|
|
1673
1679
|
var DEFAULT_ICONS = {
|
|
1674
|
-
alignCenterControlIcon: /* @__PURE__ */
|
|
1675
|
-
alignJustifyControlIcon: /* @__PURE__ */
|
|
1676
|
-
alignLeftControlIcon: /* @__PURE__ */
|
|
1677
|
-
alignRightControlIcon: /* @__PURE__ */
|
|
1678
|
-
blockquoteControlIcon: /* @__PURE__ */
|
|
1679
|
-
boldControlIcon: /* @__PURE__ */
|
|
1680
|
-
bulletListControlIcon: /* @__PURE__ */
|
|
1681
|
-
clearFormattingControlIcon: /* @__PURE__ */
|
|
1682
|
-
codeBlockControlIcon: /* @__PURE__ */
|
|
1683
|
-
codeControlIcon: /* @__PURE__ */
|
|
1684
|
-
h1ControlIcon: /* @__PURE__ */
|
|
1685
|
-
h2ControlIcon: /* @__PURE__ */
|
|
1686
|
-
h3ControlIcon: /* @__PURE__ */
|
|
1687
|
-
h4ControlIcon: /* @__PURE__ */
|
|
1688
|
-
h5ControlIcon: /* @__PURE__ */
|
|
1689
|
-
h6ControlIcon: /* @__PURE__ */
|
|
1690
|
-
highlightControlIcon: /* @__PURE__ */
|
|
1691
|
-
hrControlIcon: /* @__PURE__ */
|
|
1692
|
-
italicControlIcon: /* @__PURE__ */
|
|
1680
|
+
alignCenterControlIcon: /* @__PURE__ */ jsx23(TextAlignCenter, { ...iconProps }),
|
|
1681
|
+
alignJustifyControlIcon: /* @__PURE__ */ jsx23(TextAlignJustify, { ...iconProps }),
|
|
1682
|
+
alignLeftControlIcon: /* @__PURE__ */ jsx23(TextAlignStart, { ...iconProps }),
|
|
1683
|
+
alignRightControlIcon: /* @__PURE__ */ jsx23(TextAlignEnd, { ...iconProps }),
|
|
1684
|
+
blockquoteControlIcon: /* @__PURE__ */ jsx23(TextQuote, { ...iconProps }),
|
|
1685
|
+
boldControlIcon: /* @__PURE__ */ jsx23(Bold, { ...iconProps }),
|
|
1686
|
+
bulletListControlIcon: /* @__PURE__ */ jsx23(List, { ...iconProps }),
|
|
1687
|
+
clearFormattingControlIcon: /* @__PURE__ */ jsx23(RemoveFormatting, { ...iconProps }),
|
|
1688
|
+
codeBlockControlIcon: /* @__PURE__ */ jsx23(SquareCode, { ...iconProps }),
|
|
1689
|
+
codeControlIcon: /* @__PURE__ */ jsx23(Code, { ...iconProps }),
|
|
1690
|
+
h1ControlIcon: /* @__PURE__ */ jsx23(Heading1, { ...iconProps }),
|
|
1691
|
+
h2ControlIcon: /* @__PURE__ */ jsx23(Heading2, { ...iconProps }),
|
|
1692
|
+
h3ControlIcon: /* @__PURE__ */ jsx23(Heading3, { ...iconProps }),
|
|
1693
|
+
h4ControlIcon: /* @__PURE__ */ jsx23(Heading4, { ...iconProps }),
|
|
1694
|
+
h5ControlIcon: /* @__PURE__ */ jsx23(Heading5, { ...iconProps }),
|
|
1695
|
+
h6ControlIcon: /* @__PURE__ */ jsx23(Heading6, { ...iconProps }),
|
|
1696
|
+
highlightControlIcon: /* @__PURE__ */ jsx23(Highlighter, { ...iconProps }),
|
|
1697
|
+
hrControlIcon: /* @__PURE__ */ jsx23(Minus, { ...iconProps }),
|
|
1698
|
+
italicControlIcon: /* @__PURE__ */ jsx23(Italic, { ...iconProps }),
|
|
1693
1699
|
languageIcons: DEFAULT_LANGUAGE_ICONS,
|
|
1694
|
-
linkControlIcon: /* @__PURE__ */
|
|
1695
|
-
orderedListControlIcon: /* @__PURE__ */
|
|
1696
|
-
redoControlIcon: /* @__PURE__ */
|
|
1697
|
-
strikeControlIcon: /* @__PURE__ */
|
|
1698
|
-
subscriptControlIcon: /* @__PURE__ */
|
|
1699
|
-
superscriptControlIcon: /* @__PURE__ */
|
|
1700
|
-
underlineControlIcon: /* @__PURE__ */
|
|
1701
|
-
undoControlIcon: /* @__PURE__ */
|
|
1702
|
-
unlinkControlIcon: /* @__PURE__ */
|
|
1700
|
+
linkControlIcon: /* @__PURE__ */ jsx23(Link, { ...iconProps }),
|
|
1701
|
+
orderedListControlIcon: /* @__PURE__ */ jsx23(ListOrdered, { ...iconProps }),
|
|
1702
|
+
redoControlIcon: /* @__PURE__ */ jsx23(Redo2, { ...iconProps }),
|
|
1703
|
+
strikeControlIcon: /* @__PURE__ */ jsx23(Strikethrough, { ...iconProps }),
|
|
1704
|
+
subscriptControlIcon: /* @__PURE__ */ jsx23(Subscript, { ...iconProps }),
|
|
1705
|
+
superscriptControlIcon: /* @__PURE__ */ jsx23(Superscript, { ...iconProps }),
|
|
1706
|
+
underlineControlIcon: /* @__PURE__ */ jsx23(Underline, { ...iconProps }),
|
|
1707
|
+
undoControlIcon: /* @__PURE__ */ jsx23(Undo2, { ...iconProps }),
|
|
1708
|
+
unlinkControlIcon: /* @__PURE__ */ jsx23(Link2Off, { ...iconProps })
|
|
1703
1709
|
};
|
|
1704
1710
|
|
|
1705
1711
|
// src/extensions/resizable-node-view.tsx
|
|
1706
|
-
import { Fragment as Fragment5, jsx as
|
|
1712
|
+
import { Fragment as Fragment5, jsx as jsx24, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1707
1713
|
var EmbedToolbar = ({
|
|
1708
1714
|
align,
|
|
1709
1715
|
videoSrc,
|
|
@@ -1720,8 +1726,8 @@ var EmbedToolbar = ({
|
|
|
1720
1726
|
nodeSrc
|
|
1721
1727
|
}) => {
|
|
1722
1728
|
if (isEditingUrl) {
|
|
1723
|
-
return /* @__PURE__ */
|
|
1724
|
-
/* @__PURE__ */
|
|
1729
|
+
return /* @__PURE__ */ jsxs11("div", { className: "rte-embed-selector-edit-form", children: [
|
|
1730
|
+
/* @__PURE__ */ jsx24(
|
|
1725
1731
|
"input",
|
|
1726
1732
|
{
|
|
1727
1733
|
ref: inputRef,
|
|
@@ -1739,7 +1745,7 @@ var EmbedToolbar = ({
|
|
|
1739
1745
|
}
|
|
1740
1746
|
}
|
|
1741
1747
|
),
|
|
1742
|
-
/* @__PURE__ */
|
|
1748
|
+
/* @__PURE__ */ jsx24(
|
|
1743
1749
|
"button",
|
|
1744
1750
|
{
|
|
1745
1751
|
type: "button",
|
|
@@ -1748,7 +1754,7 @@ var EmbedToolbar = ({
|
|
|
1748
1754
|
children: "Save"
|
|
1749
1755
|
}
|
|
1750
1756
|
),
|
|
1751
|
-
/* @__PURE__ */
|
|
1757
|
+
/* @__PURE__ */ jsx24(
|
|
1752
1758
|
"button",
|
|
1753
1759
|
{
|
|
1754
1760
|
type: "button",
|
|
@@ -1759,8 +1765,8 @@ var EmbedToolbar = ({
|
|
|
1759
1765
|
)
|
|
1760
1766
|
] });
|
|
1761
1767
|
}
|
|
1762
|
-
return /* @__PURE__ */
|
|
1763
|
-
/* @__PURE__ */
|
|
1768
|
+
return /* @__PURE__ */ jsxs11(Fragment5, { children: [
|
|
1769
|
+
/* @__PURE__ */ jsx24("div", { className: "rte-embed-selector-group", children: ["left", "center", "right"].map((dir) => /* @__PURE__ */ jsx24(
|
|
1764
1770
|
"button",
|
|
1765
1771
|
{
|
|
1766
1772
|
type: "button",
|
|
@@ -1768,12 +1774,12 @@ var EmbedToolbar = ({
|
|
|
1768
1774
|
"aria-label": `Align ${dir.charAt(0).toUpperCase()}${dir.slice(1)}`,
|
|
1769
1775
|
className: `rte-embed-selector-btn ${align === dir ? "rte-embed-selector-btn--active" : ""}`,
|
|
1770
1776
|
onClick: () => updateAttributes({ align: dir }),
|
|
1771
|
-
children: /* @__PURE__ */
|
|
1777
|
+
children: /* @__PURE__ */ jsx24(AlignIcon, { dir })
|
|
1772
1778
|
},
|
|
1773
1779
|
dir
|
|
1774
1780
|
)) }),
|
|
1775
|
-
/* @__PURE__ */
|
|
1776
|
-
/* @__PURE__ */
|
|
1781
|
+
/* @__PURE__ */ jsx24("div", { className: "rte-embed-selector-divider" }),
|
|
1782
|
+
/* @__PURE__ */ jsx24("div", { className: "rte-embed-selector-group", children: [25, 50, 75, 100].map((pct) => /* @__PURE__ */ jsxs11(
|
|
1777
1783
|
"button",
|
|
1778
1784
|
{
|
|
1779
1785
|
type: "button",
|
|
@@ -1787,9 +1793,9 @@ var EmbedToolbar = ({
|
|
|
1787
1793
|
},
|
|
1788
1794
|
pct
|
|
1789
1795
|
)) }),
|
|
1790
|
-
/* @__PURE__ */
|
|
1791
|
-
/* @__PURE__ */
|
|
1792
|
-
(videoSrc || nodeSrc) && /* @__PURE__ */
|
|
1796
|
+
/* @__PURE__ */ jsx24("div", { className: "rte-embed-selector-divider" }),
|
|
1797
|
+
/* @__PURE__ */ jsxs11("div", { className: "rte-embed-selector-group", children: [
|
|
1798
|
+
(videoSrc || nodeSrc) && /* @__PURE__ */ jsx24(
|
|
1793
1799
|
"button",
|
|
1794
1800
|
{
|
|
1795
1801
|
type: "button",
|
|
@@ -1800,10 +1806,10 @@ var EmbedToolbar = ({
|
|
|
1800
1806
|
setUrlInput(videoSrc || nodeSrc || "");
|
|
1801
1807
|
setIsEditingUrl(true);
|
|
1802
1808
|
},
|
|
1803
|
-
children: /* @__PURE__ */
|
|
1809
|
+
children: /* @__PURE__ */ jsx24(EditUrlIcon, {})
|
|
1804
1810
|
}
|
|
1805
1811
|
),
|
|
1806
|
-
watchUrl && /* @__PURE__ */
|
|
1812
|
+
watchUrl && /* @__PURE__ */ jsx24(
|
|
1807
1813
|
"button",
|
|
1808
1814
|
{
|
|
1809
1815
|
type: "button",
|
|
@@ -1811,10 +1817,10 @@ var EmbedToolbar = ({
|
|
|
1811
1817
|
"aria-label": "Open video in YouTube",
|
|
1812
1818
|
className: "rte-embed-selector-btn",
|
|
1813
1819
|
onClick: () => window.open(watchUrl, "_blank"),
|
|
1814
|
-
children: /* @__PURE__ */
|
|
1820
|
+
children: /* @__PURE__ */ jsx24(OpenInYouTubeIcon, {})
|
|
1815
1821
|
}
|
|
1816
1822
|
),
|
|
1817
|
-
deleteNode && /* @__PURE__ */
|
|
1823
|
+
deleteNode && /* @__PURE__ */ jsx24(
|
|
1818
1824
|
"button",
|
|
1819
1825
|
{
|
|
1820
1826
|
type: "button",
|
|
@@ -1822,7 +1828,7 @@ var EmbedToolbar = ({
|
|
|
1822
1828
|
"aria-label": "Delete Embed",
|
|
1823
1829
|
className: "rte-embed-selector-btn rte-embed-selector-btn--danger",
|
|
1824
1830
|
onClick: () => deleteNode(),
|
|
1825
|
-
children: /* @__PURE__ */
|
|
1831
|
+
children: /* @__PURE__ */ jsx24(DeleteEmbedIcon, {})
|
|
1826
1832
|
}
|
|
1827
1833
|
)
|
|
1828
1834
|
] })
|
|
@@ -1993,13 +1999,13 @@ var ResizableNodeView = ({
|
|
|
1993
1999
|
setIsEditingUrl(false);
|
|
1994
2000
|
};
|
|
1995
2001
|
const isEditable = editor ? editor.isEditable : true;
|
|
1996
|
-
return /* @__PURE__ */
|
|
2002
|
+
return /* @__PURE__ */ jsx24(
|
|
1997
2003
|
NodeViewWrapper,
|
|
1998
2004
|
{
|
|
1999
2005
|
className: "rte-embed-wrapper",
|
|
2000
2006
|
"data-selected": selected || void 0,
|
|
2001
2007
|
"data-align": align,
|
|
2002
|
-
children: /* @__PURE__ */
|
|
2008
|
+
children: /* @__PURE__ */ jsxs11(
|
|
2003
2009
|
"div",
|
|
2004
2010
|
{
|
|
2005
2011
|
ref: containerRef,
|
|
@@ -2012,7 +2018,7 @@ var ResizableNodeView = ({
|
|
|
2012
2018
|
},
|
|
2013
2019
|
children: [
|
|
2014
2020
|
children,
|
|
2015
|
-
selected && isEditable && /* @__PURE__ */
|
|
2021
|
+
selected && isEditable && /* @__PURE__ */ jsx24("div", { className: "rte-embed-selector", contentEditable: false, children: /* @__PURE__ */ jsx24(
|
|
2016
2022
|
EmbedToolbar,
|
|
2017
2023
|
{
|
|
2018
2024
|
align,
|
|
@@ -2030,14 +2036,14 @@ var ResizableNodeView = ({
|
|
|
2030
2036
|
nodeSrc: node.attrs.src
|
|
2031
2037
|
}
|
|
2032
2038
|
) }),
|
|
2033
|
-
isResizing && currentDimensions && /* @__PURE__ */
|
|
2039
|
+
isResizing && currentDimensions && /* @__PURE__ */ jsxs11("div", { className: "rte-embed-resize-badge", children: [
|
|
2034
2040
|
currentDimensions.w,
|
|
2035
2041
|
" \xD7 ",
|
|
2036
2042
|
currentDimensions.h,
|
|
2037
2043
|
" px"
|
|
2038
2044
|
] }),
|
|
2039
|
-
selected && isEditable && /* @__PURE__ */
|
|
2040
|
-
/* @__PURE__ */
|
|
2045
|
+
selected && isEditable && /* @__PURE__ */ jsxs11(Fragment5, { children: [
|
|
2046
|
+
/* @__PURE__ */ jsx24(
|
|
2041
2047
|
"div",
|
|
2042
2048
|
{
|
|
2043
2049
|
className: "rte-resize-handle rte-resize-handle--left",
|
|
@@ -2045,7 +2051,7 @@ var ResizableNodeView = ({
|
|
|
2045
2051
|
role: "presentation"
|
|
2046
2052
|
}
|
|
2047
2053
|
),
|
|
2048
|
-
/* @__PURE__ */
|
|
2054
|
+
/* @__PURE__ */ jsx24(
|
|
2049
2055
|
"div",
|
|
2050
2056
|
{
|
|
2051
2057
|
className: "rte-resize-handle rte-resize-handle--right",
|
|
@@ -2053,7 +2059,7 @@ var ResizableNodeView = ({
|
|
|
2053
2059
|
role: "presentation"
|
|
2054
2060
|
}
|
|
2055
2061
|
),
|
|
2056
|
-
/* @__PURE__ */
|
|
2062
|
+
/* @__PURE__ */ jsx24(
|
|
2057
2063
|
"div",
|
|
2058
2064
|
{
|
|
2059
2065
|
className: "rte-resize-handle rte-resize-handle--bottom",
|
|
@@ -2061,7 +2067,7 @@ var ResizableNodeView = ({
|
|
|
2061
2067
|
role: "presentation"
|
|
2062
2068
|
}
|
|
2063
2069
|
),
|
|
2064
|
-
/* @__PURE__ */
|
|
2070
|
+
/* @__PURE__ */ jsx24(
|
|
2065
2071
|
"div",
|
|
2066
2072
|
{
|
|
2067
2073
|
className: "rte-resize-handle rte-resize-handle--corner rte-resize-handle--corner-bl",
|
|
@@ -2069,7 +2075,7 @@ var ResizableNodeView = ({
|
|
|
2069
2075
|
role: "presentation"
|
|
2070
2076
|
}
|
|
2071
2077
|
),
|
|
2072
|
-
/* @__PURE__ */
|
|
2078
|
+
/* @__PURE__ */ jsx24(
|
|
2073
2079
|
"div",
|
|
2074
2080
|
{
|
|
2075
2081
|
className: "rte-resize-handle rte-resize-handle--corner rte-resize-handle--corner-br",
|
|
@@ -2086,7 +2092,7 @@ var ResizableNodeView = ({
|
|
|
2086
2092
|
};
|
|
2087
2093
|
|
|
2088
2094
|
// src/controls/rte-twitter-control.tsx
|
|
2089
|
-
import { jsx as
|
|
2095
|
+
import { jsx as jsx25, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2090
2096
|
var WIDGET_SCRIPT_URL = "https://platform.twitter.com/widgets.js";
|
|
2091
2097
|
var SCRIPT_LOAD_TIMEOUT_MS = 8e3;
|
|
2092
2098
|
var READY_POLL_INTERVAL_MS = 50;
|
|
@@ -2233,7 +2239,7 @@ var TwitterNodeView = (props) => {
|
|
|
2233
2239
|
retryToken.current += 1;
|
|
2234
2240
|
setRetryCount(retryToken.current);
|
|
2235
2241
|
}, []);
|
|
2236
|
-
return /* @__PURE__ */
|
|
2242
|
+
return /* @__PURE__ */ jsxs12(
|
|
2237
2243
|
ResizableNodeView,
|
|
2238
2244
|
{
|
|
2239
2245
|
...props,
|
|
@@ -2241,12 +2247,12 @@ var TwitterNodeView = (props) => {
|
|
|
2241
2247
|
minWidth: 300,
|
|
2242
2248
|
maxWidth: 1200,
|
|
2243
2249
|
children: [
|
|
2244
|
-
loading && /* @__PURE__ */
|
|
2245
|
-
!loading && failed && /* @__PURE__ */
|
|
2246
|
-
/* @__PURE__ */
|
|
2247
|
-
/* @__PURE__ */
|
|
2250
|
+
loading && /* @__PURE__ */ jsx25("div", { className: "rte-embed-loading", children: "Loading tweet..." }),
|
|
2251
|
+
!loading && failed && /* @__PURE__ */ jsxs12("div", { className: "rte-embed-error", children: [
|
|
2252
|
+
/* @__PURE__ */ jsx25("p", { children: "Couldn't load this tweet." }),
|
|
2253
|
+
/* @__PURE__ */ jsx25("button", { type: "button", onClick: handleRetry, children: "Retry" })
|
|
2248
2254
|
] }),
|
|
2249
|
-
/* @__PURE__ */
|
|
2255
|
+
/* @__PURE__ */ jsx25("div", { ref: containerRef })
|
|
2250
2256
|
]
|
|
2251
2257
|
}
|
|
2252
2258
|
);
|
|
@@ -2360,7 +2366,7 @@ var TwitterEmbedControl = ({ className }) => {
|
|
|
2360
2366
|
resetState();
|
|
2361
2367
|
return true;
|
|
2362
2368
|
}, [tweetId, editor, resetState]);
|
|
2363
|
-
return /* @__PURE__ */
|
|
2369
|
+
return /* @__PURE__ */ jsxs12(
|
|
2364
2370
|
Dialog,
|
|
2365
2371
|
{
|
|
2366
2372
|
open,
|
|
@@ -2371,36 +2377,36 @@ var TwitterEmbedControl = ({ className }) => {
|
|
|
2371
2377
|
}
|
|
2372
2378
|
},
|
|
2373
2379
|
children: [
|
|
2374
|
-
/* @__PURE__ */
|
|
2380
|
+
/* @__PURE__ */ jsx25(
|
|
2375
2381
|
DialogTrigger,
|
|
2376
2382
|
{
|
|
2377
|
-
render: /* @__PURE__ */
|
|
2383
|
+
render: /* @__PURE__ */ jsx25(
|
|
2378
2384
|
RichTextEditorControl,
|
|
2379
2385
|
{
|
|
2380
2386
|
active,
|
|
2381
2387
|
className,
|
|
2382
2388
|
title: "Embed Tweet",
|
|
2383
2389
|
"aria-label": "Embed Tweet",
|
|
2384
|
-
children: /* @__PURE__ */
|
|
2390
|
+
children: /* @__PURE__ */ jsx25(
|
|
2385
2391
|
"svg",
|
|
2386
2392
|
{
|
|
2387
2393
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2388
2394
|
viewBox: "0 0 24 24",
|
|
2389
2395
|
fill: "currentColor",
|
|
2390
2396
|
className: "rte-editor-icon",
|
|
2391
|
-
children: /* @__PURE__ */
|
|
2397
|
+
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" })
|
|
2392
2398
|
}
|
|
2393
2399
|
)
|
|
2394
2400
|
}
|
|
2395
2401
|
)
|
|
2396
2402
|
}
|
|
2397
2403
|
),
|
|
2398
|
-
/* @__PURE__ */
|
|
2399
|
-
/* @__PURE__ */
|
|
2400
|
-
/* @__PURE__ */
|
|
2401
|
-
/* @__PURE__ */
|
|
2404
|
+
/* @__PURE__ */ jsxs12(DialogContent, { children: [
|
|
2405
|
+
/* @__PURE__ */ jsxs12(DialogHeader, { children: [
|
|
2406
|
+
/* @__PURE__ */ jsx25(DialogTitle, { children: "Embed Tweet" }),
|
|
2407
|
+
/* @__PURE__ */ jsx25(DialogDescription, { children: "Paste a tweet URL or ID." })
|
|
2402
2408
|
] }),
|
|
2403
|
-
/* @__PURE__ */
|
|
2409
|
+
/* @__PURE__ */ jsx25(
|
|
2404
2410
|
Input,
|
|
2405
2411
|
{
|
|
2406
2412
|
value: url,
|
|
@@ -2420,10 +2426,10 @@ var TwitterEmbedControl = ({ className }) => {
|
|
|
2420
2426
|
}
|
|
2421
2427
|
}
|
|
2422
2428
|
),
|
|
2423
|
-
showError && /* @__PURE__ */
|
|
2424
|
-
/* @__PURE__ */
|
|
2425
|
-
/* @__PURE__ */
|
|
2426
|
-
/* @__PURE__ */
|
|
2429
|
+
showError && /* @__PURE__ */ jsx25("p", { className: "rte-input-error", role: "alert", children: "That doesn't look like a valid tweet URL or ID." }),
|
|
2430
|
+
/* @__PURE__ */ jsxs12(DialogFooter, { children: [
|
|
2431
|
+
/* @__PURE__ */ jsx25(DialogClose, { children: "Cancel" }),
|
|
2432
|
+
/* @__PURE__ */ jsx25(
|
|
2427
2433
|
"button",
|
|
2428
2434
|
{
|
|
2429
2435
|
type: "button",
|
|
@@ -2448,7 +2454,7 @@ var TwitterEmbedControl = ({ className }) => {
|
|
|
2448
2454
|
import { Node as Node2, nodeInputRule as nodeInputRule2 } from "@tiptap/core";
|
|
2449
2455
|
import { ReactNodeViewRenderer as ReactNodeViewRenderer2, useEditorState as useEditorState5 } from "@tiptap/react";
|
|
2450
2456
|
import { useState as useState7, useCallback as useCallback7 } from "react";
|
|
2451
|
-
import { jsx as
|
|
2457
|
+
import { jsx as jsx26, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2452
2458
|
var getYouTubeId = (url) => {
|
|
2453
2459
|
const clean = url.trim();
|
|
2454
2460
|
const patterns = [
|
|
@@ -2476,7 +2482,7 @@ var YouTubeNodeView = (props) => {
|
|
|
2476
2482
|
if (videoId) {
|
|
2477
2483
|
watchUrl = videoId.startsWith("http") ? videoId : `https://www.youtube.com/watch?v=${videoId}`;
|
|
2478
2484
|
}
|
|
2479
|
-
return /* @__PURE__ */
|
|
2485
|
+
return /* @__PURE__ */ jsx26(
|
|
2480
2486
|
ResizableNodeView,
|
|
2481
2487
|
{
|
|
2482
2488
|
...props,
|
|
@@ -2487,7 +2493,7 @@ var YouTubeNodeView = (props) => {
|
|
|
2487
2493
|
videoSrc: rawSrc,
|
|
2488
2494
|
watchUrl,
|
|
2489
2495
|
onSrcChange: (newSrc) => updateAttributes({ src: newSrc }),
|
|
2490
|
-
children: /* @__PURE__ */
|
|
2496
|
+
children: /* @__PURE__ */ jsx26(
|
|
2491
2497
|
"iframe",
|
|
2492
2498
|
{
|
|
2493
2499
|
src: `https://www.youtube-nocookie.com/embed/${videoId}`,
|
|
@@ -2589,18 +2595,18 @@ var YouTubeEmbedControl = ({ className }) => {
|
|
|
2589
2595
|
setUrl("");
|
|
2590
2596
|
}
|
|
2591
2597
|
}, [url, editor]);
|
|
2592
|
-
return /* @__PURE__ */
|
|
2593
|
-
/* @__PURE__ */
|
|
2598
|
+
return /* @__PURE__ */ jsxs13(Dialog, { open, onOpenChange: setOpen, children: [
|
|
2599
|
+
/* @__PURE__ */ jsx26(
|
|
2594
2600
|
DialogTrigger,
|
|
2595
2601
|
{
|
|
2596
|
-
render: /* @__PURE__ */
|
|
2602
|
+
render: /* @__PURE__ */ jsx26(
|
|
2597
2603
|
RichTextEditorControl,
|
|
2598
2604
|
{
|
|
2599
2605
|
active,
|
|
2600
2606
|
className,
|
|
2601
2607
|
title: "Embed YouTube video",
|
|
2602
2608
|
"aria-label": "Embed YouTube video",
|
|
2603
|
-
children: /* @__PURE__ */
|
|
2609
|
+
children: /* @__PURE__ */ jsxs13(
|
|
2604
2610
|
"svg",
|
|
2605
2611
|
{
|
|
2606
2612
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2612,8 +2618,8 @@ var YouTubeEmbedControl = ({ className }) => {
|
|
|
2612
2618
|
strokeLinejoin: "round",
|
|
2613
2619
|
className: "rte-editor-icon",
|
|
2614
2620
|
children: [
|
|
2615
|
-
/* @__PURE__ */
|
|
2616
|
-
/* @__PURE__ */
|
|
2621
|
+
/* @__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" }),
|
|
2622
|
+
/* @__PURE__ */ jsx26("path", { d: "M9.5 15.5V8.5l6.2 3.5z" })
|
|
2617
2623
|
]
|
|
2618
2624
|
}
|
|
2619
2625
|
)
|
|
@@ -2621,12 +2627,12 @@ var YouTubeEmbedControl = ({ className }) => {
|
|
|
2621
2627
|
)
|
|
2622
2628
|
}
|
|
2623
2629
|
),
|
|
2624
|
-
/* @__PURE__ */
|
|
2625
|
-
/* @__PURE__ */
|
|
2626
|
-
/* @__PURE__ */
|
|
2627
|
-
/* @__PURE__ */
|
|
2630
|
+
/* @__PURE__ */ jsxs13(DialogContent, { showCloseButton: false, children: [
|
|
2631
|
+
/* @__PURE__ */ jsxs13(DialogHeader, { children: [
|
|
2632
|
+
/* @__PURE__ */ jsx26(DialogTitle, { children: "Embed YouTube video" }),
|
|
2633
|
+
/* @__PURE__ */ jsx26(DialogDescription, { children: "Paste a YouTube video URL or ID." })
|
|
2628
2634
|
] }),
|
|
2629
|
-
/* @__PURE__ */
|
|
2635
|
+
/* @__PURE__ */ jsx26(
|
|
2630
2636
|
Input,
|
|
2631
2637
|
{
|
|
2632
2638
|
value: url,
|
|
@@ -2640,9 +2646,9 @@ var YouTubeEmbedControl = ({ className }) => {
|
|
|
2640
2646
|
}
|
|
2641
2647
|
}
|
|
2642
2648
|
),
|
|
2643
|
-
/* @__PURE__ */
|
|
2644
|
-
/* @__PURE__ */
|
|
2645
|
-
/* @__PURE__ */
|
|
2649
|
+
/* @__PURE__ */ jsxs13(DialogFooter, { children: [
|
|
2650
|
+
/* @__PURE__ */ jsx26(DialogClose, { children: "Cancel" }),
|
|
2651
|
+
/* @__PURE__ */ jsx26(
|
|
2646
2652
|
DialogClose,
|
|
2647
2653
|
{
|
|
2648
2654
|
disabled: !url,
|
|
@@ -2699,14 +2705,14 @@ var DEFAULT_LABELS = {
|
|
|
2699
2705
|
|
|
2700
2706
|
// src/rte-content.tsx
|
|
2701
2707
|
import { EditorContent } from "@tiptap/react";
|
|
2702
|
-
import { jsx as
|
|
2708
|
+
import { jsx as jsx27, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2703
2709
|
var Content = ({
|
|
2704
2710
|
children,
|
|
2705
2711
|
className
|
|
2706
2712
|
}) => {
|
|
2707
2713
|
const { editor } = useRichTextEditorContext();
|
|
2708
|
-
return /* @__PURE__ */
|
|
2709
|
-
/* @__PURE__ */
|
|
2714
|
+
return /* @__PURE__ */ jsxs14("div", { className: "relative", children: [
|
|
2715
|
+
/* @__PURE__ */ jsx27(
|
|
2710
2716
|
EditorContent,
|
|
2711
2717
|
{
|
|
2712
2718
|
editor,
|
|
@@ -2718,15 +2724,15 @@ var Content = ({
|
|
|
2718
2724
|
};
|
|
2719
2725
|
|
|
2720
2726
|
// src/rte-controls-group.tsx
|
|
2721
|
-
import { jsx as
|
|
2727
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
2722
2728
|
var ControlsGroup = ({
|
|
2723
2729
|
children,
|
|
2724
2730
|
className
|
|
2725
|
-
}) => /* @__PURE__ */
|
|
2731
|
+
}) => /* @__PURE__ */ jsx28("div", { className: cn("rte-controls-group", className), children });
|
|
2726
2732
|
|
|
2727
2733
|
// src/rte-footer.tsx
|
|
2728
2734
|
import { useEffect as useEffect5, useMemo, useRef as useRef5, useState as useState8 } from "react";
|
|
2729
|
-
import { Fragment as Fragment6, jsx as
|
|
2735
|
+
import { Fragment as Fragment6, jsx as jsx29, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2730
2736
|
var Footer = ({
|
|
2731
2737
|
children,
|
|
2732
2738
|
className,
|
|
@@ -2785,7 +2791,7 @@ var Footer = ({
|
|
|
2785
2791
|
if (!showWordCount && !children) {
|
|
2786
2792
|
return null;
|
|
2787
2793
|
}
|
|
2788
|
-
return /* @__PURE__ */
|
|
2794
|
+
return /* @__PURE__ */ jsxs15(
|
|
2789
2795
|
"div",
|
|
2790
2796
|
{
|
|
2791
2797
|
className: cn(
|
|
@@ -2797,21 +2803,21 @@ var Footer = ({
|
|
|
2797
2803
|
"data-sticky": sticky ? "" : void 0,
|
|
2798
2804
|
style: sticky ? { bottom: stickyOffset } : void 0,
|
|
2799
2805
|
children: [
|
|
2800
|
-
showWordCount && wordCount && /* @__PURE__ */
|
|
2801
|
-
/* @__PURE__ */
|
|
2802
|
-
/* @__PURE__ */
|
|
2803
|
-
/* @__PURE__ */
|
|
2806
|
+
showWordCount && wordCount && /* @__PURE__ */ jsx29("span", { className: cn("rte-footer-word-count", wordCountClassName), children: wordCountFormatter ? wordCountFormatter(wordCount) : /* @__PURE__ */ jsxs15(Fragment6, { children: [
|
|
2807
|
+
/* @__PURE__ */ jsxs15("span", { className: "rte-footer-word-count-stat", children: [
|
|
2808
|
+
/* @__PURE__ */ jsx29("span", { className: "rte-footer-word-count-number", children: wordCount.words }),
|
|
2809
|
+
/* @__PURE__ */ jsx29("span", { className: "rte-footer-word-count-unit", children: "words" })
|
|
2804
2810
|
] }),
|
|
2805
|
-
/* @__PURE__ */
|
|
2811
|
+
/* @__PURE__ */ jsx29(
|
|
2806
2812
|
"span",
|
|
2807
2813
|
{
|
|
2808
2814
|
className: "rte-footer-word-count-separator",
|
|
2809
2815
|
"aria-hidden": "true"
|
|
2810
2816
|
}
|
|
2811
2817
|
),
|
|
2812
|
-
/* @__PURE__ */
|
|
2813
|
-
/* @__PURE__ */
|
|
2814
|
-
/* @__PURE__ */
|
|
2818
|
+
/* @__PURE__ */ jsxs15("span", { className: "rte-footer-word-count-stat", children: [
|
|
2819
|
+
/* @__PURE__ */ jsx29("span", { className: "rte-footer-word-count-number", children: wordCount.characters }),
|
|
2820
|
+
/* @__PURE__ */ jsx29("span", { className: "rte-footer-word-count-unit", children: "characters" })
|
|
2815
2821
|
] })
|
|
2816
2822
|
] }) }),
|
|
2817
2823
|
children
|
|
@@ -2821,7 +2827,7 @@ var Footer = ({
|
|
|
2821
2827
|
};
|
|
2822
2828
|
|
|
2823
2829
|
// src/rte-toolbar.tsx
|
|
2824
|
-
import { jsx as
|
|
2830
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
2825
2831
|
var Toolbar = ({
|
|
2826
2832
|
children,
|
|
2827
2833
|
className,
|
|
@@ -2832,7 +2838,7 @@ var Toolbar = ({
|
|
|
2832
2838
|
if (!editable) {
|
|
2833
2839
|
return null;
|
|
2834
2840
|
}
|
|
2835
|
-
return /* @__PURE__ */
|
|
2841
|
+
return /* @__PURE__ */ jsx30(
|
|
2836
2842
|
"div",
|
|
2837
2843
|
{
|
|
2838
2844
|
className: cn(
|
|
@@ -2849,7 +2855,7 @@ var Toolbar = ({
|
|
|
2849
2855
|
};
|
|
2850
2856
|
|
|
2851
2857
|
// src/rte-text-editor.tsx
|
|
2852
|
-
import { jsx as
|
|
2858
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
2853
2859
|
var RichTextEditorRoot = ({
|
|
2854
2860
|
editor,
|
|
2855
2861
|
children,
|
|
@@ -2869,7 +2875,7 @@ var RichTextEditorRoot = ({
|
|
|
2869
2875
|
editor.setEditable(editable);
|
|
2870
2876
|
}
|
|
2871
2877
|
}, [editor, editable]);
|
|
2872
|
-
return /* @__PURE__ */
|
|
2878
|
+
return /* @__PURE__ */ jsx31(
|
|
2873
2879
|
RichTextEditorContext.Provider,
|
|
2874
2880
|
{
|
|
2875
2881
|
value: {
|
|
@@ -2879,7 +2885,7 @@ var RichTextEditorRoot = ({
|
|
|
2879
2885
|
labels: mergedLabels,
|
|
2880
2886
|
variant
|
|
2881
2887
|
},
|
|
2882
|
-
children: /* @__PURE__ */
|
|
2888
|
+
children: /* @__PURE__ */ jsx31(
|
|
2883
2889
|
"div",
|
|
2884
2890
|
{
|
|
2885
2891
|
className: cn(
|