@lumir-company/editor 0.4.21 → 0.4.23

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
@@ -24,7 +24,11 @@ __export(index_exports, {
24
24
  BACKGROUND_COLORS: () => BACKGROUND_COLORS,
25
25
  ContentUtils: () => ContentUtils,
26
26
  EditorConfig: () => EditorConfig,
27
+ FONT_SIZE_DEFAULT_PX: () => FONT_SIZE_DEFAULT_PX,
28
+ FONT_SIZE_MAX: () => FONT_SIZE_MAX,
29
+ FONT_SIZE_MIN: () => FONT_SIZE_MIN,
27
30
  FONT_SIZE_PRESETS: () => FONT_SIZE_PRESETS,
31
+ FONT_SIZE_STEP: () => FONT_SIZE_STEP,
28
32
  FloatingMenu: () => FloatingMenu,
29
33
  FontSize: () => FontSize,
30
34
  FontSizeButton: () => FontSizeButton2,
@@ -34,21 +38,24 @@ __export(index_exports, {
34
38
  LumirEditor: () => LumirEditor,
35
39
  LumirEditorError: () => LumirEditorError,
36
40
  TEXT_COLORS: () => TEXT_COLORS,
41
+ clampFontSizePx: () => clampFontSizePx,
37
42
  clearMetadataCache: () => clearMetadataCache,
38
43
  cn: () => cn,
39
44
  createS3Uploader: () => createS3Uploader,
40
45
  fetchLinkMetadata: () => fetchLinkMetadata,
41
46
  getHexFromColorValue: () => getHexFromColorValue,
42
47
  liftFontSize: () => liftFontSize,
43
- lowerFontSize: () => lowerFontSize
48
+ lowerFontSize: () => lowerFontSize,
49
+ parseFontSizePx: () => parseFontSizePx,
50
+ toFontSizeValue: () => toFontSizeValue
44
51
  });
45
52
  module.exports = __toCommonJS(index_exports);
46
53
 
47
54
  // src/components/LumirEditor.tsx
48
- var import_react37 = require("react");
49
- var import_react38 = require("@blocknote/react");
55
+ var import_react36 = require("react");
56
+ var import_react37 = require("@blocknote/react");
50
57
  var import_mantine = require("@blocknote/mantine");
51
- var import_core10 = require("@blocknote/core");
58
+ var import_core12 = require("@blocknote/core");
52
59
  var import_locales = require("@blocknote/core/locales");
53
60
 
54
61
  // src/utils/cn.ts
@@ -285,8 +292,8 @@ var createS3Uploader = (config) => {
285
292
  };
286
293
 
287
294
  // src/blocks/HtmlPreview.tsx
288
- var import_react6 = require("@blocknote/react");
289
- var import_core3 = require("@blocknote/core");
295
+ var import_react5 = require("@blocknote/react");
296
+ var import_core4 = require("@blocknote/core");
290
297
 
291
298
  // src/blocks/LinkPreview.tsx
292
299
  var import_react = require("@blocknote/react");
@@ -1561,15 +1568,22 @@ var Column = (0, import_core2.createStronglyTypedTiptapNode)({
1561
1568
  });
1562
1569
 
1563
1570
  // src/styles/FontSizeStyle.tsx
1564
- var import_react5 = require("@blocknote/react");
1565
- var import_jsx_runtime3 = require("react/jsx-runtime");
1566
- var FontSize = (0, import_react5.createReactStyleSpec)(
1571
+ var import_core3 = require("@blocknote/core");
1572
+ var FontSize = (0, import_core3.createStyleSpec)(
1567
1573
  {
1568
1574
  type: "fontSize",
1569
1575
  propSchema: "string"
1570
1576
  },
1571
1577
  {
1572
- render: (props) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { style: { fontSize: props.value }, ref: props.contentRef })
1578
+ // 바닐라(동기) 스타일 스펙: DOM을 직접 반환한다.
1579
+ // createReactStyleSpec는 span 내용이 비동기 렌더되어, 적용 직후 동기 시점에
1580
+ // 선택 영역의 DOM 좌표가 (0,0)으로 잡혀 BlockNote 포매팅 툴바가 좌상단으로
1581
+ // 튀는 문제가 있었다(굵게/기울임 등 네이티브 마크는 동기 렌더라 정상).
1582
+ render: (value) => {
1583
+ const span = document.createElement("span");
1584
+ span.style.fontSize = value;
1585
+ return { dom: span, contentDOM: span };
1586
+ }
1573
1587
  }
1574
1588
  );
1575
1589
  var FONT_SIZE_PRESETS = [
@@ -1582,10 +1596,58 @@ var FONT_SIZE_PRESETS = [
1582
1596
  "24px",
1583
1597
  "28px"
1584
1598
  ];
1599
+ var FONT_SIZE_MIN = 8;
1600
+ var FONT_SIZE_MAX = 96;
1601
+ var FONT_SIZE_DEFAULT_PX = 14;
1602
+ var FONT_SIZE_STEP = 1;
1603
+ function parseFontSizePx(size) {
1604
+ const n = parseInt(size, 10);
1605
+ return Number.isFinite(n) ? n : FONT_SIZE_DEFAULT_PX;
1606
+ }
1607
+ function clampFontSizePx(px) {
1608
+ return Math.min(FONT_SIZE_MAX, Math.max(FONT_SIZE_MIN, Math.round(px)));
1609
+ }
1610
+ function toFontSizeValue(px) {
1611
+ return `${clampFontSizePx(px)}px`;
1612
+ }
1613
+ function readSelectionFontSize(editor) {
1614
+ const ed = editor;
1615
+ const fallback = () => {
1616
+ try {
1617
+ return ed?.getActiveStyles?.().fontSize || "";
1618
+ } catch {
1619
+ return "";
1620
+ }
1621
+ };
1622
+ try {
1623
+ const tt = ed._tiptapEditor;
1624
+ const state = tt?.state;
1625
+ if (!state) return fallback();
1626
+ const sel = state.selection;
1627
+ if (sel.empty) {
1628
+ const marks = state.storedMarks || sel.$to.marks();
1629
+ const m = marks?.find?.((mk) => mk.type?.name === "fontSize");
1630
+ return m?.attrs?.stringValue || "";
1631
+ }
1632
+ let value = null;
1633
+ let mixed = false;
1634
+ state.doc.nodesBetween(sel.from, sel.to, (node) => {
1635
+ if (mixed || !node.isText) return !mixed;
1636
+ const m = node.marks?.find?.((mk) => mk.type?.name === "fontSize");
1637
+ const v = m?.attrs?.stringValue || "";
1638
+ if (value === null) value = v;
1639
+ else if (value !== v) mixed = true;
1640
+ return !mixed;
1641
+ });
1642
+ return mixed ? "" : value || "";
1643
+ } catch {
1644
+ return fallback();
1645
+ }
1646
+ }
1585
1647
 
1586
1648
  // src/blocks/HtmlPreview.tsx
1587
- var import_react7 = require("react");
1588
- var import_jsx_runtime4 = require("react/jsx-runtime");
1649
+ var import_react6 = require("react");
1650
+ var import_jsx_runtime3 = require("react/jsx-runtime");
1589
1651
  var MIN_HEIGHT = 100;
1590
1652
  var MAX_HEIGHT = 1200;
1591
1653
  var ensureCharset = (html) => {
@@ -1623,7 +1685,7 @@ var createSecureBlobUrl = (htmlContent) => {
1623
1685
  });
1624
1686
  return URL.createObjectURL(blob);
1625
1687
  };
1626
- var HtmlPreviewBlock = (0, import_react6.createReactBlockSpec)(
1688
+ var HtmlPreviewBlock = (0, import_react5.createReactBlockSpec)(
1627
1689
  {
1628
1690
  type: "htmlPreview",
1629
1691
  propSchema: {
@@ -1641,15 +1703,15 @@ var HtmlPreviewBlock = (0, import_react6.createReactBlockSpec)(
1641
1703
  },
1642
1704
  {
1643
1705
  render: (props) => {
1644
- const [isExpanded, setIsExpanded] = (0, import_react7.useState)(true);
1645
- const [isResizing, setIsResizing] = (0, import_react7.useState)(false);
1646
- const [blobUrl, setBlobUrl] = (0, import_react7.useState)("");
1647
- const containerRef = (0, import_react7.useRef)(null);
1706
+ const [isExpanded, setIsExpanded] = (0, import_react6.useState)(true);
1707
+ const [isResizing, setIsResizing] = (0, import_react6.useState)(false);
1708
+ const [blobUrl, setBlobUrl] = (0, import_react6.useState)("");
1709
+ const containerRef = (0, import_react6.useRef)(null);
1648
1710
  const htmlContent = props.block.props.htmlContent || "";
1649
1711
  const fileName = props.block.props.fileName || "HTML Document";
1650
1712
  const savedHeight = props.block.props.height || "400px";
1651
1713
  const currentHeight = parseInt(savedHeight, 10) || 400;
1652
- (0, import_react7.useEffect)(() => {
1714
+ (0, import_react6.useEffect)(() => {
1653
1715
  if (htmlContent) {
1654
1716
  const url = createSecureBlobUrl(htmlContent);
1655
1717
  setBlobUrl(url);
@@ -1658,7 +1720,7 @@ var HtmlPreviewBlock = (0, import_react6.createReactBlockSpec)(
1658
1720
  };
1659
1721
  }
1660
1722
  }, [htmlContent]);
1661
- const handleResizeStart = (0, import_react7.useCallback)(
1723
+ const handleResizeStart = (0, import_react6.useCallback)(
1662
1724
  (e) => {
1663
1725
  e.preventDefault();
1664
1726
  e.stopPropagation();
@@ -1685,7 +1747,7 @@ var HtmlPreviewBlock = (0, import_react6.createReactBlockSpec)(
1685
1747
  },
1686
1748
  [currentHeight, props.editor, props.block]
1687
1749
  );
1688
- const handleExport = (0, import_react7.useCallback)(
1750
+ const handleExport = (0, import_react6.useCallback)(
1689
1751
  (e) => {
1690
1752
  e.stopPropagation();
1691
1753
  const safeFileName = sanitizeFileName(fileName);
@@ -1706,7 +1768,7 @@ var HtmlPreviewBlock = (0, import_react6.createReactBlockSpec)(
1706
1768
  },
1707
1769
  [htmlContent, fileName]
1708
1770
  );
1709
- const handleOpenNewWindow = (0, import_react7.useCallback)(
1771
+ const handleOpenNewWindow = (0, import_react6.useCallback)(
1710
1772
  (e) => {
1711
1773
  e.stopPropagation();
1712
1774
  if (typeof window === "undefined") return;
@@ -1720,7 +1782,7 @@ var HtmlPreviewBlock = (0, import_react6.createReactBlockSpec)(
1720
1782
  },
1721
1783
  [htmlContent]
1722
1784
  );
1723
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
1785
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1724
1786
  "div",
1725
1787
  {
1726
1788
  ref: containerRef,
@@ -1736,7 +1798,7 @@ var HtmlPreviewBlock = (0, import_react6.createReactBlockSpec)(
1736
1798
  boxShadow: "none"
1737
1799
  },
1738
1800
  children: [
1739
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
1801
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1740
1802
  "div",
1741
1803
  {
1742
1804
  style: {
@@ -1748,7 +1810,7 @@ var HtmlPreviewBlock = (0, import_react6.createReactBlockSpec)(
1748
1810
  borderBottom: isExpanded ? "1px solid #e0e0e0" : "none"
1749
1811
  },
1750
1812
  children: [
1751
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
1813
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1752
1814
  "div",
1753
1815
  {
1754
1816
  style: {
@@ -1760,7 +1822,7 @@ var HtmlPreviewBlock = (0, import_react6.createReactBlockSpec)(
1760
1822
  },
1761
1823
  onClick: () => setIsExpanded(!isExpanded),
1762
1824
  children: [
1763
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1825
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1764
1826
  "svg",
1765
1827
  {
1766
1828
  width: "16",
@@ -1775,15 +1837,15 @@ var HtmlPreviewBlock = (0, import_react6.createReactBlockSpec)(
1775
1837
  transform: isExpanded ? "rotate(180deg)" : "rotate(0deg)",
1776
1838
  transition: "transform 0.2s"
1777
1839
  },
1778
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("polyline", { points: "6 9 12 15 18 9" })
1840
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("polyline", { points: "6 9 12 15 18 9" })
1779
1841
  }
1780
1842
  ),
1781
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { style: { fontWeight: 500, fontSize: "14px" }, children: fileName })
1843
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { style: { fontWeight: 500, fontSize: "14px" }, children: fileName })
1782
1844
  ]
1783
1845
  }
1784
1846
  ),
1785
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
1786
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1847
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
1848
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1787
1849
  "button",
1788
1850
  {
1789
1851
  onClick: handleOpenNewWindow,
@@ -1806,7 +1868,7 @@ var HtmlPreviewBlock = (0, import_react6.createReactBlockSpec)(
1806
1868
  onMouseLeave: (e) => {
1807
1869
  e.currentTarget.style.backgroundColor = "transparent";
1808
1870
  },
1809
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
1871
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1810
1872
  "svg",
1811
1873
  {
1812
1874
  width: "16",
@@ -1818,15 +1880,15 @@ var HtmlPreviewBlock = (0, import_react6.createReactBlockSpec)(
1818
1880
  strokeLinecap: "round",
1819
1881
  strokeLinejoin: "round",
1820
1882
  children: [
1821
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
1822
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("polyline", { points: "15 3 21 3 21 9" }),
1823
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
1883
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }),
1884
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("polyline", { points: "15 3 21 3 21 9" }),
1885
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("line", { x1: "10", y1: "14", x2: "21", y2: "3" })
1824
1886
  ]
1825
1887
  }
1826
1888
  )
1827
1889
  }
1828
1890
  ),
1829
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1891
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1830
1892
  "button",
1831
1893
  {
1832
1894
  onClick: handleExport,
@@ -1849,7 +1911,7 @@ var HtmlPreviewBlock = (0, import_react6.createReactBlockSpec)(
1849
1911
  onMouseLeave: (e) => {
1850
1912
  e.currentTarget.style.backgroundColor = "transparent";
1851
1913
  },
1852
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
1914
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1853
1915
  "svg",
1854
1916
  {
1855
1917
  width: "16",
@@ -1861,9 +1923,9 @@ var HtmlPreviewBlock = (0, import_react6.createReactBlockSpec)(
1861
1923
  strokeLinecap: "round",
1862
1924
  strokeLinejoin: "round",
1863
1925
  children: [
1864
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
1865
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("polyline", { points: "7 10 12 15 17 10" }),
1866
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("line", { x1: "12", y1: "15", x2: "12", y2: "3" })
1926
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
1927
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("polyline", { points: "7 10 12 15 17 10" }),
1928
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("line", { x1: "12", y1: "15", x2: "12", y2: "3" })
1867
1929
  ]
1868
1930
  }
1869
1931
  )
@@ -1873,7 +1935,7 @@ var HtmlPreviewBlock = (0, import_react6.createReactBlockSpec)(
1873
1935
  ]
1874
1936
  }
1875
1937
  ),
1876
- isExpanded && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
1938
+ isExpanded && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
1877
1939
  "div",
1878
1940
  {
1879
1941
  style: {
@@ -1882,7 +1944,7 @@ var HtmlPreviewBlock = (0, import_react6.createReactBlockSpec)(
1882
1944
  position: "relative"
1883
1945
  },
1884
1946
  children: [
1885
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1947
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1886
1948
  "iframe",
1887
1949
  {
1888
1950
  src: blobUrl || "about:blank",
@@ -1899,7 +1961,7 @@ var HtmlPreviewBlock = (0, import_react6.createReactBlockSpec)(
1899
1961
  loading: "lazy"
1900
1962
  }
1901
1963
  ),
1902
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1964
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1903
1965
  "div",
1904
1966
  {
1905
1967
  onMouseDown: handleResizeStart,
@@ -1924,7 +1986,7 @@ var HtmlPreviewBlock = (0, import_react6.createReactBlockSpec)(
1924
1986
  e.currentTarget.style.backgroundColor = "transparent";
1925
1987
  }
1926
1988
  },
1927
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1989
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1928
1990
  "div",
1929
1991
  {
1930
1992
  style: {
@@ -1946,84 +2008,84 @@ var HtmlPreviewBlock = (0, import_react6.createReactBlockSpec)(
1946
2008
  }
1947
2009
  }
1948
2010
  );
1949
- var ColumnListBlock = (0, import_core3.createBlockSpecFromStronglyTypedTiptapNode)(
2011
+ var ColumnListBlock = (0, import_core4.createBlockSpecFromStronglyTypedTiptapNode)(
1950
2012
  ColumnList,
1951
2013
  // showDivider를 블록 prop으로 등록 → onContentChange JSON 직렬화 + 재로드 라운드트립.
1952
2014
  { showDivider: { default: false } }
1953
2015
  );
1954
- var ColumnBlock = (0, import_core3.createBlockSpecFromStronglyTypedTiptapNode)(Column, {});
1955
- var schema = import_core3.BlockNoteSchema.create({
2016
+ var ColumnBlock = (0, import_core4.createBlockSpecFromStronglyTypedTiptapNode)(Column, {});
2017
+ var schema = import_core4.BlockNoteSchema.create({
1956
2018
  blockSpecs: {
1957
- ...import_core3.defaultBlockSpecs,
2019
+ ...import_core4.defaultBlockSpecs,
1958
2020
  htmlPreview: HtmlPreviewBlock,
1959
2021
  linkPreview: LinkPreviewBlock,
1960
2022
  video: VideoBlock,
1961
2023
  columnList: ColumnListBlock,
1962
2024
  column: ColumnBlock
1963
2025
  },
1964
- inlineContentSpecs: import_core3.defaultInlineContentSpecs,
2026
+ inlineContentSpecs: import_core4.defaultInlineContentSpecs,
1965
2027
  styleSpecs: {
1966
- ...import_core3.defaultStyleSpecs,
2028
+ ...import_core4.defaultStyleSpecs,
1967
2029
  // 인라인 글자 크기. 저장 JSON 직렬화는 형제 키 방식(font-size-serialization.ts) 사용.
1968
2030
  fontSize: FontSize
1969
2031
  }
1970
2032
  });
1971
2033
 
1972
2034
  // src/components/FloatingMenu/index.tsx
1973
- var import_react19 = require("react");
2035
+ var import_react18 = require("react");
1974
2036
 
1975
2037
  // src/components/FloatingMenu/Icons.tsx
1976
- var import_jsx_runtime5 = require("react/jsx-runtime");
2038
+ var import_jsx_runtime4 = require("react/jsx-runtime");
1977
2039
  var Icons = {
1978
- undo: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z" }) }),
1979
- redo: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z" }) }),
1980
- bold: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79 0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79 0-1.52-.86-2.82-2.15-3.42zM10 6.5h3c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-3v-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5z" }) }),
1981
- italic: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z" }) }),
1982
- underline: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M12 17c3.31 0 6-2.69 6-6V3h-2.5v8c0 1.93-1.57 3.5-3.5 3.5S8.5 12.93 8.5 11V3H6v8c0 3.31 2.69 6 6 6zm-7 2v2h14v-2H5z" }) }),
1983
- strikethrough: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M10 19h4v-3h-4v3zM5 4v3h5v3h4V7h5V4H5zM3 14h18v-2H3v2z" }) }),
1984
- alignLeft: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M15 15H3v2h12v-2zm0-8H3v2h12V7zM3 13h18v-2H3v2zm0 8h18v-2H3v2zM3 3v2h18V3H3z" }) }),
1985
- alignCenter: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M7 15v2h10v-2H7zm-4 6h18v-2H3v2zm0-8h18v-2H3v2zm4-6v2h10V7H7zM3 3v2h18V3H3z" }) }),
1986
- alignRight: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M3 21h18v-2H3v2zm6-4h12v-2H9v2zm-6-4h18v-2H3v2zm6-4h12V7H9v2zM3 3v2h18V3H3z" }) }),
1987
- bulletList: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5zm0 12c-.83 0-1.5.68-1.5 1.5s.68 1.5 1.5 1.5 1.5-.68 1.5-1.5-.67-1.5-1.5-1.5zM7 19h14v-2H7v2zm0-6h14v-2H7v2zm0-8v2h14V5H7z" }) }),
1988
- numberedList: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M2 17h2v.5H3v1h1v.5H2v1h3v-4H2v1zm1-9h1V4H2v1h1v3zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2v1zm5-6v2h14V5H7zm0 14h14v-2H7v2zm0-6h14v-2H7v2z" }) }),
1989
- image: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z" }) }),
1990
- expandMore: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "18", height: "18", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z" }) }),
1991
- textColor: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M11 3L5.5 17h2.25l1.12-3h6.25l1.12 3h2.25L13 3h-2zm-1.38 9L12 5.67 14.38 12H9.62z" }) }),
1992
- bgColor: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: [
1993
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M16.56 8.94L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.59-.59 1.54 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.58.59-1.53 0-2.12zM5.21 10L10 5.21 14.79 10H5.21zM19 11.5s-2 2.17-2 3.5c0 1.1.9 2 2 2s2-.9 2-2c0-1.33-2-3.5-2-3.5z" }),
1994
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { fillOpacity: ".36", d: "M0 20h24v4H0z" })
2040
+ undo: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z" }) }),
2041
+ redo: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z" }) }),
2042
+ bold: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M15.6 10.79c.97-.67 1.65-1.77 1.65-2.79 0-2.26-1.75-4-4-4H7v14h7.04c2.09 0 3.71-1.7 3.71-3.79 0-1.52-.86-2.82-2.15-3.42zM10 6.5h3c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5h-3v-3zm3.5 9H10v-3h3.5c.83 0 1.5.67 1.5 1.5s-.67 1.5-1.5 1.5z" }) }),
2043
+ italic: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M10 4v3h2.21l-3.42 8H6v3h8v-3h-2.21l3.42-8H18V4z" }) }),
2044
+ underline: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M12 17c3.31 0 6-2.69 6-6V3h-2.5v8c0 1.93-1.57 3.5-3.5 3.5S8.5 12.93 8.5 11V3H6v8c0 3.31 2.69 6 6 6zm-7 2v2h14v-2H5z" }) }),
2045
+ strikethrough: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M10 19h4v-3h-4v3zM5 4v3h5v3h4V7h5V4H5zM3 14h18v-2H3v2z" }) }),
2046
+ alignLeft: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M15 15H3v2h12v-2zm0-8H3v2h12V7zM3 13h18v-2H3v2zm0 8h18v-2H3v2zM3 3v2h18V3H3z" }) }),
2047
+ alignCenter: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M7 15v2h10v-2H7zm-4 6h18v-2H3v2zm0-8h18v-2H3v2zm4-6v2h10V7H7zM3 3v2h18V3H3z" }) }),
2048
+ alignRight: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M3 21h18v-2H3v2zm6-4h12v-2H9v2zm-6-4h18v-2H3v2zm6-4h12V7H9v2zM3 3v2h18V3H3z" }) }),
2049
+ bulletList: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M4 10.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0-6c-.83 0-1.5.67-1.5 1.5S3.17 7.5 4 7.5 5.5 6.83 5.5 6 4.83 4.5 4 4.5zm0 12c-.83 0-1.5.68-1.5 1.5s.68 1.5 1.5 1.5 1.5-.68 1.5-1.5-.67-1.5-1.5-1.5zM7 19h14v-2H7v2zm0-6h14v-2H7v2zm0-8v2h14V5H7z" }) }),
2050
+ numberedList: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M2 17h2v.5H3v1h1v.5H2v1h3v-4H2v1zm1-9h1V4H2v1h1v3zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2v1zm5-6v2h14V5H7zm0 14h14v-2H7v2zm0-6h14v-2H7v2z" }) }),
2051
+ image: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z" }) }),
2052
+ expandMore: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "18", height: "18", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z" }) }),
2053
+ textColor: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M11 3L5.5 17h2.25l1.12-3h6.25l1.12 3h2.25L13 3h-2zm-1.38 9L12 5.67 14.38 12H9.62z" }) }),
2054
+ bgColor: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: [
2055
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M16.56 8.94L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.59-.59 1.54 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.58.59-1.53 0-2.12zM5.21 10L10 5.21 14.79 10H5.21zM19 11.5s-2 2.17-2 3.5c0 1.1.9 2 2 2s2-.9 2-2c0-1.33-2-3.5-2-3.5z" }),
2056
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { fillOpacity: ".36", d: "M0 20h24v4H0z" })
1995
2057
  ] }),
1996
- link: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z" }) }),
1997
- chevronRight: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }) }),
1998
- chevronLeft: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z" }) }),
1999
- table: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M20 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h15c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM10 17H5v-2h5v2zm0-4H5v-2h5v2zm0-4H5V7h5v2zm9 8h-7v-2h7v2zm0-4h-7v-2h7v2zm0-4h-7V7h7v2z" }) }),
2000
- htmlFile: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zm-1 2v5h5l-5-5zm-4 14H7v-1h2v1zm0-2H7v-1h2v1zm-2-2h2v1H7v-1zm4 4h-2v-1h2v1zm0-2h-2v-1h2v1zm0-2h-2v-1h2v1zm6 4h-4v-1h4v1zm0-2h-4v-1h4v1zm0-2h-4v-1h4v1z" }) })
2058
+ link: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z" }) }),
2059
+ chevronRight: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }) }),
2060
+ chevronLeft: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z" }) }),
2061
+ table: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M20 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h15c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM10 17H5v-2h5v2zm0-4H5v-2h5v2zm0-4H5V7h5v2zm9 8h-7v-2h7v2zm0-4h-7v-2h7v2zm0-4h-7V7h7v2z" }) }),
2062
+ htmlFile: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M14 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V8l-6-6zm-1 2v5h5l-5-5zm-4 14H7v-1h2v1zm0-2H7v-1h2v1zm-2-2h2v1H7v-1zm4 4h-2v-1h2v1zm0-2h-2v-1h2v1zm0-2h-2v-1h2v1zm6 4h-4v-1h4v1zm0-2h-4v-1h4v1zm0-2h-4v-1h4v1z" }) })
2001
2063
  };
2002
2064
  var BlockTypeIcons = {
2003
- paragraph: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M5 5h14v2H5zM5 11h14v2H5zM5 17h10v2H5z" }) }),
2004
- h1: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "lumir-block-icon-text", children: "H1" }),
2005
- h2: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "lumir-block-icon-text", children: "H2" }),
2006
- h3: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "lumir-block-icon-text", children: "H3" }),
2007
- h4: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "lumir-block-icon-text", children: "H4" }),
2008
- h5: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "lumir-block-icon-text", children: "H5" }),
2009
- h6: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "lumir-block-icon-text", children: "H6" }),
2010
- toggleH1: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "lumir-block-icon-toggle", children: [
2011
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "8", height: "8", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M8 5v14l11-7z" }) }),
2012
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { children: "H1" })
2065
+ paragraph: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M5 5h14v2H5zM5 11h14v2H5zM5 17h10v2H5z" }) }),
2066
+ h1: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "lumir-block-icon-text", children: "H1" }),
2067
+ h2: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "lumir-block-icon-text", children: "H2" }),
2068
+ h3: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "lumir-block-icon-text", children: "H3" }),
2069
+ h4: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "lumir-block-icon-text", children: "H4" }),
2070
+ h5: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "lumir-block-icon-text", children: "H5" }),
2071
+ h6: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "lumir-block-icon-text", children: "H6" }),
2072
+ toggleH1: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: "lumir-block-icon-toggle", children: [
2073
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "8", height: "8", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M8 5v14l11-7z" }) }),
2074
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { children: "H1" })
2013
2075
  ] }),
2014
- toggleH2: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "lumir-block-icon-toggle", children: [
2015
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "8", height: "8", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M8 5v14l11-7z" }) }),
2016
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { children: "H2" })
2076
+ toggleH2: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: "lumir-block-icon-toggle", children: [
2077
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "8", height: "8", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M8 5v14l11-7z" }) }),
2078
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { children: "H2" })
2017
2079
  ] }),
2018
- toggleH3: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("span", { className: "lumir-block-icon-toggle", children: [
2019
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "8", height: "8", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M8 5v14l11-7z" }) }),
2020
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { children: "H3" })
2080
+ toggleH3: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("span", { className: "lumir-block-icon-toggle", children: [
2081
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "8", height: "8", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M8 5v14l11-7z" }) }),
2082
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { children: "H3" })
2021
2083
  ] }),
2022
- quote: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z" }) }),
2023
- codeBlock: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z" }) }),
2024
- toggleList: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: [
2025
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M10 6h10v2H10zM10 11h10v2H10zM10 16h10v2H10z" }),
2026
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2084
+ quote: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M6 17h3l2-4V7H5v6h3zm8 0h3l2-4V7h-6v6h3z" }) }),
2085
+ codeBlock: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z" }) }),
2086
+ toggleList: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: [
2087
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M10 6h10v2H10zM10 11h10v2H10zM10 16h10v2H10z" }),
2088
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2027
2089
  "path",
2028
2090
  {
2029
2091
  d: "M4 8l4 4-4 4",
@@ -2035,15 +2097,15 @@ var BlockTypeIcons = {
2035
2097
  }
2036
2098
  )
2037
2099
  ] }),
2038
- bulletList: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: [
2039
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("circle", { cx: "4", cy: "6", r: "1.5" }),
2040
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("circle", { cx: "4", cy: "12", r: "1.5" }),
2041
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("circle", { cx: "4", cy: "18", r: "1.5" }),
2042
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M8 5h12v2H8zM8 11h12v2H8zM8 17h12v2H8z" })
2100
+ bulletList: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: [
2101
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("circle", { cx: "4", cy: "6", r: "1.5" }),
2102
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("circle", { cx: "4", cy: "12", r: "1.5" }),
2103
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("circle", { cx: "4", cy: "18", r: "1.5" }),
2104
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M8 5h12v2H8zM8 11h12v2H8zM8 17h12v2H8z" })
2043
2105
  ] }),
2044
- numberedList: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M2 17h2v.5H3v1h1v.5H2v1h3v-4H2v1zm1-9h1V4H2v1h1v3zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2v1zm5-6v2h14V5H7zm0 14h14v-2H7v2zm0-6h14v-2H7v2z" }) }),
2045
- checkList: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: [
2046
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2106
+ numberedList: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M2 17h2v.5H3v1h1v.5H2v1h3v-4H2v1zm1-9h1V4H2v1h1v3zm-1 3h1.8L2 13.1v.9h3v-1H3.2L5 10.9V10H2v1zm5-6v2h14V5H7zm0 14h14v-2H7v2zm0-6h14v-2H7v2z" }) }),
2107
+ checkList: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: "20", height: "20", children: [
2108
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2047
2109
  "rect",
2048
2110
  {
2049
2111
  x: "3",
@@ -2056,7 +2118,7 @@ var BlockTypeIcons = {
2056
2118
  strokeWidth: "1.5"
2057
2119
  }
2058
2120
  ),
2059
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2121
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2060
2122
  "path",
2061
2123
  {
2062
2124
  d: "M4.5 7l1.5 1.5 3-3",
@@ -2067,8 +2129,8 @@ var BlockTypeIcons = {
2067
2129
  strokeLinejoin: "round"
2068
2130
  }
2069
2131
  ),
2070
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M12 6h8v2h-8z" }),
2071
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
2132
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M12 6h8v2h-8z" }),
2133
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
2072
2134
  "rect",
2073
2135
  {
2074
2136
  x: "3",
@@ -2081,37 +2143,37 @@ var BlockTypeIcons = {
2081
2143
  strokeWidth: "1.5"
2082
2144
  }
2083
2145
  ),
2084
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M12 16h8v2h-8z" })
2146
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M12 16h8v2h-8z" })
2085
2147
  ] })
2086
2148
  };
2087
2149
 
2088
2150
  // src/components/FloatingMenu/components/ToolbarDivider.tsx
2089
- var import_jsx_runtime6 = require("react/jsx-runtime");
2090
- var ToolbarDivider = () => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "lumir-toolbar-divider" });
2151
+ var import_jsx_runtime5 = require("react/jsx-runtime");
2152
+ var ToolbarDivider = () => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "lumir-toolbar-divider" });
2091
2153
 
2092
2154
  // src/components/FloatingMenu/components/UndoRedoButtons.tsx
2093
- var import_react8 = require("react");
2094
- var import_jsx_runtime7 = require("react/jsx-runtime");
2155
+ var import_react7 = require("react");
2156
+ var import_jsx_runtime6 = require("react/jsx-runtime");
2095
2157
  var UndoRedoButtons = ({ editor }) => {
2096
- const handleUndo = (0, import_react8.useCallback)(() => {
2158
+ const handleUndo = (0, import_react7.useCallback)(() => {
2097
2159
  try {
2098
2160
  editor?.undo?.();
2099
2161
  } catch (err) {
2100
2162
  console.error("Undo failed:", err);
2101
2163
  }
2102
2164
  }, [editor]);
2103
- const handleRedo = (0, import_react8.useCallback)(() => {
2165
+ const handleRedo = (0, import_react7.useCallback)(() => {
2104
2166
  try {
2105
2167
  editor?.redo?.();
2106
2168
  } catch (err) {
2107
2169
  console.error("Redo failed:", err);
2108
2170
  }
2109
2171
  }, [editor]);
2110
- const handleMouseDown2 = (0, import_react8.useCallback)((e) => {
2172
+ const handleMouseDown2 = (0, import_react7.useCallback)((e) => {
2111
2173
  e.preventDefault();
2112
2174
  }, []);
2113
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "lumir-toolbar-group", children: [
2114
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2175
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "lumir-toolbar-group", children: [
2176
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
2115
2177
  "button",
2116
2178
  {
2117
2179
  className: "lumir-toolbar-btn",
@@ -2122,7 +2184,7 @@ var UndoRedoButtons = ({ editor }) => {
2122
2184
  children: Icons.undo
2123
2185
  }
2124
2186
  ),
2125
- /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2187
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
2126
2188
  "button",
2127
2189
  {
2128
2190
  className: "lumir-toolbar-btn",
@@ -2137,8 +2199,8 @@ var UndoRedoButtons = ({ editor }) => {
2137
2199
  };
2138
2200
 
2139
2201
  // src/components/FloatingMenu/components/TextStyleButton.tsx
2140
- var import_react9 = require("react");
2141
- var import_jsx_runtime8 = require("react/jsx-runtime");
2202
+ var import_react8 = require("react");
2203
+ var import_jsx_runtime7 = require("react/jsx-runtime");
2142
2204
  var iconMap = {
2143
2205
  bold: Icons.bold,
2144
2206
  italic: Icons.italic,
@@ -2164,17 +2226,17 @@ var TextStyleButton = ({
2164
2226
  }
2165
2227
  };
2166
2228
  const isActive = getIsActive();
2167
- const handleClick = (0, import_react9.useCallback)(() => {
2229
+ const handleClick = (0, import_react8.useCallback)(() => {
2168
2230
  try {
2169
2231
  editor?.toggleStyles?.({ [style]: true });
2170
2232
  } catch (err) {
2171
2233
  console.error(`Toggle ${style} failed:`, err);
2172
2234
  }
2173
2235
  }, [editor, style]);
2174
- const handleMouseDown2 = (0, import_react9.useCallback)((e) => {
2236
+ const handleMouseDown2 = (0, import_react8.useCallback)((e) => {
2175
2237
  e.preventDefault();
2176
2238
  }, []);
2177
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2239
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2178
2240
  "button",
2179
2241
  {
2180
2242
  className: cn("lumir-toolbar-btn", isActive && "is-active"),
@@ -2188,7 +2250,7 @@ var TextStyleButton = ({
2188
2250
  };
2189
2251
 
2190
2252
  // src/components/FloatingMenu/components/AlignButton.tsx
2191
- var import_react10 = require("react");
2253
+ var import_react9 = require("react");
2192
2254
 
2193
2255
  // src/utils/prosemirror-table-utils.ts
2194
2256
  function getSelectedCellPositions(editor) {
@@ -2284,7 +2346,7 @@ function getTableAlignment(editor, blockId) {
2284
2346
  }
2285
2347
 
2286
2348
  // src/components/FloatingMenu/components/AlignButton.tsx
2287
- var import_jsx_runtime9 = require("react/jsx-runtime");
2349
+ var import_jsx_runtime8 = require("react/jsx-runtime");
2288
2350
  var iconMap2 = {
2289
2351
  left: Icons.alignLeft,
2290
2352
  center: Icons.alignCenter,
@@ -2311,7 +2373,7 @@ var AlignButton = ({
2311
2373
  }
2312
2374
  };
2313
2375
  const isActive = getCurrentAlignment() === alignment;
2314
- const handleClick = (0, import_react10.useCallback)(() => {
2376
+ const handleClick = (0, import_react9.useCallback)(() => {
2315
2377
  try {
2316
2378
  if (setSelectedCellsAttr(editor, "textAlignment", alignment)) {
2317
2379
  return;
@@ -2324,10 +2386,10 @@ var AlignButton = ({
2324
2386
  console.error(`Set alignment ${alignment} failed:`, err);
2325
2387
  }
2326
2388
  }, [editor, alignment]);
2327
- const handleMouseDown2 = (0, import_react10.useCallback)((e) => {
2389
+ const handleMouseDown2 = (0, import_react9.useCallback)((e) => {
2328
2390
  e.preventDefault();
2329
2391
  }, []);
2330
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2392
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2331
2393
  "button",
2332
2394
  {
2333
2395
  className: cn("lumir-toolbar-btn", isActive && "is-active"),
@@ -2341,8 +2403,8 @@ var AlignButton = ({
2341
2403
  };
2342
2404
 
2343
2405
  // src/components/FloatingMenu/components/ListButton.tsx
2344
- var import_react11 = require("react");
2345
- var import_jsx_runtime10 = require("react/jsx-runtime");
2406
+ var import_react10 = require("react");
2407
+ var import_jsx_runtime9 = require("react/jsx-runtime");
2346
2408
  var iconMap3 = {
2347
2409
  bullet: Icons.bulletList,
2348
2410
  numbered: Icons.numberedList
@@ -2362,7 +2424,7 @@ var ListButton = ({ editor, type }) => {
2362
2424
  }
2363
2425
  };
2364
2426
  const isActive = getIsActive();
2365
- const handleClick = (0, import_react11.useCallback)(() => {
2427
+ const handleClick = (0, import_react10.useCallback)(() => {
2366
2428
  try {
2367
2429
  const block = editor?.getTextCursorPosition()?.block;
2368
2430
  if (block && editor?.updateBlock) {
@@ -2374,10 +2436,10 @@ var ListButton = ({ editor, type }) => {
2374
2436
  console.error(`List toggle failed:`, err);
2375
2437
  }
2376
2438
  }, [editor, type]);
2377
- const handleMouseDown2 = (0, import_react11.useCallback)((e) => {
2439
+ const handleMouseDown2 = (0, import_react10.useCallback)((e) => {
2378
2440
  e.preventDefault();
2379
2441
  }, []);
2380
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2442
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
2381
2443
  "button",
2382
2444
  {
2383
2445
  className: cn("lumir-toolbar-btn", isActive && "is-active"),
@@ -2391,13 +2453,13 @@ var ListButton = ({ editor, type }) => {
2391
2453
  };
2392
2454
 
2393
2455
  // src/components/FloatingMenu/components/ImageButton.tsx
2394
- var import_react12 = require("react");
2395
- var import_jsx_runtime11 = require("react/jsx-runtime");
2456
+ var import_react11 = require("react");
2457
+ var import_jsx_runtime10 = require("react/jsx-runtime");
2396
2458
  var ImageButton = ({
2397
2459
  editor,
2398
2460
  onImageUpload
2399
2461
  }) => {
2400
- const handleClick = (0, import_react12.useCallback)(() => {
2462
+ const handleClick = (0, import_react11.useCallback)(() => {
2401
2463
  if (onImageUpload) {
2402
2464
  onImageUpload();
2403
2465
  } else {
@@ -2422,10 +2484,10 @@ var ImageButton = ({
2422
2484
  input.click();
2423
2485
  }
2424
2486
  }, [editor, onImageUpload]);
2425
- const handleMouseDown2 = (0, import_react12.useCallback)((e) => {
2487
+ const handleMouseDown2 = (0, import_react11.useCallback)((e) => {
2426
2488
  e.preventDefault();
2427
2489
  }, []);
2428
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2490
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
2429
2491
  "button",
2430
2492
  {
2431
2493
  className: "lumir-toolbar-btn",
@@ -2439,7 +2501,7 @@ var ImageButton = ({
2439
2501
  };
2440
2502
 
2441
2503
  // src/components/FloatingMenu/components/ColorButton.tsx
2442
- var import_react13 = require("react");
2504
+ var import_react12 = require("react");
2443
2505
 
2444
2506
  // src/constants/colors.ts
2445
2507
  var TEXT_COLORS = [
@@ -2473,13 +2535,13 @@ var getHexFromColorValue = (value, type) => {
2473
2535
  };
2474
2536
 
2475
2537
  // src/components/FloatingMenu/components/ColorButton.tsx
2476
- var import_jsx_runtime12 = require("react/jsx-runtime");
2538
+ var import_jsx_runtime11 = require("react/jsx-runtime");
2477
2539
  var ColorButton = ({ editor, type }) => {
2478
- const [isOpen, setIsOpen] = (0, import_react13.useState)(false);
2479
- const [currentColor, setCurrentColor] = (0, import_react13.useState)("default");
2480
- const dropdownRef = (0, import_react13.useRef)(null);
2540
+ const [isOpen, setIsOpen] = (0, import_react12.useState)(false);
2541
+ const [currentColor, setCurrentColor] = (0, import_react12.useState)("default");
2542
+ const dropdownRef = (0, import_react12.useRef)(null);
2481
2543
  const colors = type === "text" ? TEXT_COLORS : BACKGROUND_COLORS;
2482
- const getCurrentColor = (0, import_react13.useCallback)(() => {
2544
+ const getCurrentColor = (0, import_react12.useCallback)(() => {
2483
2545
  try {
2484
2546
  if (isInTableCell(editor)) {
2485
2547
  const attr = type === "text" ? "textColor" : "backgroundColor";
@@ -2495,13 +2557,13 @@ var ColorButton = ({ editor, type }) => {
2495
2557
  }
2496
2558
  return "default";
2497
2559
  }, [editor, type]);
2498
- (0, import_react13.useEffect)(() => {
2560
+ (0, import_react12.useEffect)(() => {
2499
2561
  if (isOpen) {
2500
2562
  const color = getCurrentColor();
2501
2563
  setCurrentColor(color);
2502
2564
  }
2503
2565
  }, [isOpen, getCurrentColor]);
2504
- (0, import_react13.useEffect)(() => {
2566
+ (0, import_react12.useEffect)(() => {
2505
2567
  const handleClickOutside = (e) => {
2506
2568
  if (dropdownRef.current && !dropdownRef.current.contains(e.target)) {
2507
2569
  setIsOpen(false);
@@ -2510,7 +2572,7 @@ var ColorButton = ({ editor, type }) => {
2510
2572
  document.addEventListener("mousedown", handleClickOutside);
2511
2573
  return () => document.removeEventListener("mousedown", handleClickOutside);
2512
2574
  }, []);
2513
- const handleColorSelect = (0, import_react13.useCallback)(
2575
+ const handleColorSelect = (0, import_react12.useCallback)(
2514
2576
  (color) => {
2515
2577
  try {
2516
2578
  if (!editor) return;
@@ -2529,11 +2591,11 @@ var ColorButton = ({ editor, type }) => {
2529
2591
  },
2530
2592
  [editor, type]
2531
2593
  );
2532
- const handleMouseDown2 = (0, import_react13.useCallback)((e) => {
2594
+ const handleMouseDown2 = (0, import_react12.useCallback)((e) => {
2533
2595
  e.preventDefault();
2534
2596
  }, []);
2535
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "lumir-dropdown-wrapper", ref: dropdownRef, children: [
2536
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
2597
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "lumir-dropdown-wrapper", ref: dropdownRef, children: [
2598
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
2537
2599
  "button",
2538
2600
  {
2539
2601
  className: "lumir-toolbar-btn lumir-color-btn",
@@ -2543,7 +2605,7 @@ var ColorButton = ({ editor, type }) => {
2543
2605
  type: "button",
2544
2606
  children: [
2545
2607
  type === "text" ? Icons.textColor : Icons.bgColor,
2546
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2608
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2547
2609
  "span",
2548
2610
  {
2549
2611
  className: "lumir-color-indicator",
@@ -2555,7 +2617,7 @@ var ColorButton = ({ editor, type }) => {
2555
2617
  ]
2556
2618
  }
2557
2619
  ),
2558
- isOpen && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "lumir-dropdown-menu lumir-color-menu", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "lumir-color-grid", children: colors.map((color) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2620
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "lumir-dropdown-menu lumir-color-menu", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "lumir-color-grid", children: colors.map((color) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
2559
2621
  "button",
2560
2622
  {
2561
2623
  className: cn(
@@ -2574,22 +2636,29 @@ var ColorButton = ({ editor, type }) => {
2574
2636
  };
2575
2637
 
2576
2638
  // src/components/FloatingMenu/components/FontSizeButton.tsx
2577
- var import_react14 = require("react");
2578
- var import_jsx_runtime13 = require("react/jsx-runtime");
2639
+ var import_react13 = require("react");
2640
+ var import_jsx_runtime12 = require("react/jsx-runtime");
2579
2641
  var DEFAULT_LABEL = "\uAE30\uBCF8";
2580
2642
  var toLabel = (size) => size.replace(/px$/, "");
2581
2643
  var FontSizeButton = ({ editor }) => {
2582
- const [isOpen, setIsOpen] = (0, import_react14.useState)(false);
2583
- const dropdownRef = (0, import_react14.useRef)(null);
2584
- const getCurrentSize = () => {
2585
- try {
2586
- return editor?.getActiveStyles?.()?.fontSize || "";
2587
- } catch {
2588
- return "";
2589
- }
2590
- };
2591
- const currentSize = getCurrentSize();
2592
- (0, import_react14.useEffect)(() => {
2644
+ const [isOpen, setIsOpen] = (0, import_react13.useState)(false);
2645
+ const dropdownRef = (0, import_react13.useRef)(null);
2646
+ const live = readSelectionFontSize(editor);
2647
+ const [optimistic, setOptimistic] = (0, import_react13.useState)(null);
2648
+ const lastLiveRef = (0, import_react13.useRef)(live);
2649
+ (0, import_react13.useEffect)(() => {
2650
+ if (live !== lastLiveRef.current) {
2651
+ lastLiveRef.current = live;
2652
+ setOptimistic(null);
2653
+ }
2654
+ }, [live]);
2655
+ const currentSize = optimistic ?? live;
2656
+ const currentPx = parseFontSizePx(currentSize);
2657
+ const [inputValue, setInputValue] = (0, import_react13.useState)(String(currentPx));
2658
+ (0, import_react13.useEffect)(() => {
2659
+ setInputValue(String(currentPx));
2660
+ }, [currentPx]);
2661
+ (0, import_react13.useEffect)(() => {
2593
2662
  const handleClickOutside = (e) => {
2594
2663
  if (dropdownRef.current && !dropdownRef.current.contains(e.target)) {
2595
2664
  setIsOpen(false);
@@ -2598,14 +2667,16 @@ var FontSizeButton = ({ editor }) => {
2598
2667
  document.addEventListener("mousedown", handleClickOutside);
2599
2668
  return () => document.removeEventListener("mousedown", handleClickOutside);
2600
2669
  }, []);
2601
- const handleSizeSelect = (0, import_react14.useCallback)(
2670
+ const handleSizeSelect = (0, import_react13.useCallback)(
2602
2671
  (size) => {
2603
2672
  try {
2604
2673
  if (!editor) return;
2605
2674
  if (size === "") {
2606
2675
  editor.removeStyles?.({ fontSize: "" });
2676
+ setOptimistic(null);
2607
2677
  } else {
2608
2678
  editor.addStyles?.({ fontSize: size });
2679
+ setOptimistic(size);
2609
2680
  }
2610
2681
  setIsOpen(false);
2611
2682
  setTimeout(() => editor.focus?.());
@@ -2615,11 +2686,37 @@ var FontSizeButton = ({ editor }) => {
2615
2686
  },
2616
2687
  [editor]
2617
2688
  );
2618
- const handleMouseDown2 = (0, import_react14.useCallback)((e) => {
2689
+ const stepBy = (0, import_react13.useCallback)(
2690
+ (delta) => {
2691
+ try {
2692
+ const value = toFontSizeValue(currentPx + delta);
2693
+ editor?.addStyles?.({ fontSize: value });
2694
+ setOptimistic(value);
2695
+ } catch (err) {
2696
+ console.error("Font size step failed:", err);
2697
+ }
2698
+ },
2699
+ [editor, currentPx]
2700
+ );
2701
+ const applyInput = (0, import_react13.useCallback)(() => {
2702
+ const n = parseInt(inputValue, 10);
2703
+ if (Number.isFinite(n)) {
2704
+ try {
2705
+ const value = toFontSizeValue(n);
2706
+ editor?.addStyles?.({ fontSize: value });
2707
+ setOptimistic(value);
2708
+ } catch (err) {
2709
+ console.error("Font size apply failed:", err);
2710
+ }
2711
+ } else {
2712
+ setInputValue(String(currentPx));
2713
+ }
2714
+ }, [editor, inputValue, currentPx]);
2715
+ const handleMouseDown2 = (0, import_react13.useCallback)((e) => {
2619
2716
  e.preventDefault();
2620
2717
  }, []);
2621
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "lumir-dropdown-wrapper", ref: dropdownRef, children: [
2622
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
2718
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "lumir-dropdown-wrapper", ref: dropdownRef, children: [
2719
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
2623
2720
  "button",
2624
2721
  {
2625
2722
  className: "lumir-dropdown-btn lumir-font-size-btn",
@@ -2628,13 +2725,64 @@ var FontSizeButton = ({ editor }) => {
2628
2725
  title: "\uAE00\uC790 \uD06C\uAE30",
2629
2726
  type: "button",
2630
2727
  children: [
2631
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "lumir-font-size-label", children: currentSize ? toLabel(currentSize) : DEFAULT_LABEL }),
2728
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "lumir-font-size-label", children: currentSize ? toLabel(currentSize) : DEFAULT_LABEL }),
2632
2729
  Icons.expandMore
2633
2730
  ]
2634
2731
  }
2635
2732
  ),
2636
- isOpen && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "lumir-dropdown-menu lumir-font-size-menu", children: [
2637
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2733
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "lumir-dropdown-menu lumir-font-size-menu", children: [
2734
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "lumir-fs-stepper", children: [
2735
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2736
+ "button",
2737
+ {
2738
+ type: "button",
2739
+ className: "lumir-fs-stepper-btn",
2740
+ "aria-label": "\uAE00\uC790 \uD06C\uAE30 1px \uC904\uC774\uAE30",
2741
+ disabled: currentPx <= FONT_SIZE_MIN,
2742
+ onMouseDown: handleMouseDown2,
2743
+ onClick: () => stepBy(-1),
2744
+ children: "\u2212"
2745
+ }
2746
+ ),
2747
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2748
+ "input",
2749
+ {
2750
+ className: "lumir-fs-stepper-input",
2751
+ type: "text",
2752
+ inputMode: "numeric",
2753
+ "aria-label": "\uAE00\uC790 \uD06C\uAE30 \uC785\uB825",
2754
+ value: inputValue,
2755
+ onChange: (e) => setInputValue(e.target.value.replace(/[^0-9]/g, "")),
2756
+ onKeyDown: (e) => {
2757
+ e.stopPropagation();
2758
+ if (e.key === "Enter") {
2759
+ e.preventDefault();
2760
+ applyInput();
2761
+ } else if (e.key === "ArrowUp") {
2762
+ e.preventDefault();
2763
+ stepBy(1);
2764
+ } else if (e.key === "ArrowDown") {
2765
+ e.preventDefault();
2766
+ stepBy(-1);
2767
+ }
2768
+ },
2769
+ onBlur: applyInput
2770
+ }
2771
+ ),
2772
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2773
+ "button",
2774
+ {
2775
+ type: "button",
2776
+ className: "lumir-fs-stepper-btn",
2777
+ "aria-label": "\uAE00\uC790 \uD06C\uAE30 1px \uB298\uB9AC\uAE30",
2778
+ disabled: currentPx >= FONT_SIZE_MAX,
2779
+ onMouseDown: handleMouseDown2,
2780
+ onClick: () => stepBy(1),
2781
+ children: "+"
2782
+ }
2783
+ )
2784
+ ] }),
2785
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2638
2786
  "button",
2639
2787
  {
2640
2788
  className: cn(
@@ -2647,7 +2795,7 @@ var FontSizeButton = ({ editor }) => {
2647
2795
  children: DEFAULT_LABEL
2648
2796
  }
2649
2797
  ),
2650
- FONT_SIZE_PRESETS.map((size) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2798
+ FONT_SIZE_PRESETS.map((size) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
2651
2799
  "button",
2652
2800
  {
2653
2801
  className: cn(
@@ -2666,8 +2814,8 @@ var FontSizeButton = ({ editor }) => {
2666
2814
  };
2667
2815
 
2668
2816
  // src/components/FloatingMenu/components/LinkButton.tsx
2669
- var import_react15 = require("react");
2670
- var import_jsx_runtime14 = require("react/jsx-runtime");
2817
+ var import_react14 = require("react");
2818
+ var import_jsx_runtime13 = require("react/jsx-runtime");
2671
2819
  var isDangerousProtocol = (url) => {
2672
2820
  const trimmedUrl = url.trim().toLowerCase();
2673
2821
  const dangerousPatterns = [
@@ -2693,13 +2841,13 @@ var normalizeUrl = (url) => {
2693
2841
  return `https://${trimmedUrl}`;
2694
2842
  };
2695
2843
  var LinkButton = ({ editor }) => {
2696
- const [isOpen, setIsOpen] = (0, import_react15.useState)(false);
2697
- const [linkUrl, setLinkUrl] = (0, import_react15.useState)("");
2698
- const [errorMsg, setErrorMsg] = (0, import_react15.useState)(null);
2699
- const dropdownRef = (0, import_react15.useRef)(null);
2700
- const inputRef = (0, import_react15.useRef)(null);
2701
- const hasSelectionRef = (0, import_react15.useRef)(false);
2702
- (0, import_react15.useEffect)(() => {
2844
+ const [isOpen, setIsOpen] = (0, import_react14.useState)(false);
2845
+ const [linkUrl, setLinkUrl] = (0, import_react14.useState)("");
2846
+ const [errorMsg, setErrorMsg] = (0, import_react14.useState)(null);
2847
+ const dropdownRef = (0, import_react14.useRef)(null);
2848
+ const inputRef = (0, import_react14.useRef)(null);
2849
+ const hasSelectionRef = (0, import_react14.useRef)(false);
2850
+ (0, import_react14.useEffect)(() => {
2703
2851
  const handleClickOutside = (e) => {
2704
2852
  if (dropdownRef.current && !dropdownRef.current.contains(e.target)) {
2705
2853
  setIsOpen(false);
@@ -2710,7 +2858,7 @@ var LinkButton = ({ editor }) => {
2710
2858
  document.addEventListener("mousedown", handleClickOutside);
2711
2859
  return () => document.removeEventListener("mousedown", handleClickOutside);
2712
2860
  }, []);
2713
- (0, import_react15.useEffect)(() => {
2861
+ (0, import_react14.useEffect)(() => {
2714
2862
  if (isOpen && inputRef.current) {
2715
2863
  try {
2716
2864
  const selectedText = editor?.getSelectedText?.() || "";
@@ -2721,7 +2869,7 @@ var LinkButton = ({ editor }) => {
2721
2869
  setTimeout(() => inputRef.current?.focus(), 0);
2722
2870
  }
2723
2871
  }, [isOpen, editor]);
2724
- const handleSubmit = (0, import_react15.useCallback)(
2872
+ const handleSubmit = (0, import_react14.useCallback)(
2725
2873
  (e) => {
2726
2874
  e?.preventDefault();
2727
2875
  setErrorMsg(null);
@@ -2748,15 +2896,15 @@ var LinkButton = ({ editor }) => {
2748
2896
  },
2749
2897
  [editor, linkUrl]
2750
2898
  );
2751
- const handleCancel = (0, import_react15.useCallback)(() => {
2899
+ const handleCancel = (0, import_react14.useCallback)(() => {
2752
2900
  setIsOpen(false);
2753
2901
  setLinkUrl("");
2754
2902
  setErrorMsg(null);
2755
2903
  }, []);
2756
- const handleMouseDown2 = (0, import_react15.useCallback)((e) => {
2904
+ const handleMouseDown2 = (0, import_react14.useCallback)((e) => {
2757
2905
  e.preventDefault();
2758
2906
  }, []);
2759
- const handleKeyDown = (0, import_react15.useCallback)(
2907
+ const handleKeyDown = (0, import_react14.useCallback)(
2760
2908
  (e) => {
2761
2909
  if (e.key === "Enter") {
2762
2910
  handleSubmit();
@@ -2766,8 +2914,8 @@ var LinkButton = ({ editor }) => {
2766
2914
  },
2767
2915
  [handleSubmit, handleCancel]
2768
2916
  );
2769
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "lumir-dropdown-wrapper", ref: dropdownRef, children: [
2770
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2917
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "lumir-dropdown-wrapper", ref: dropdownRef, children: [
2918
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2771
2919
  "button",
2772
2920
  {
2773
2921
  className: "lumir-toolbar-btn",
@@ -2778,8 +2926,8 @@ var LinkButton = ({ editor }) => {
2778
2926
  children: Icons.link
2779
2927
  }
2780
2928
  ),
2781
- isOpen && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "lumir-dropdown-menu lumir-link-menu", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("form", { onSubmit: handleSubmit, className: "lumir-link-form", children: [
2782
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2929
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "lumir-dropdown-menu lumir-link-menu", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("form", { onSubmit: handleSubmit, className: "lumir-link-form", children: [
2930
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2783
2931
  "input",
2784
2932
  {
2785
2933
  ref: inputRef,
@@ -2795,7 +2943,7 @@ var LinkButton = ({ editor }) => {
2795
2943
  onMouseDown: handleMouseDown2
2796
2944
  }
2797
2945
  ),
2798
- errorMsg && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2946
+ errorMsg && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2799
2947
  "div",
2800
2948
  {
2801
2949
  style: {
@@ -2807,8 +2955,8 @@ var LinkButton = ({ editor }) => {
2807
2955
  children: errorMsg
2808
2956
  }
2809
2957
  ),
2810
- /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "lumir-link-actions", children: [
2811
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2958
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "lumir-link-actions", children: [
2959
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2812
2960
  "button",
2813
2961
  {
2814
2962
  type: "button",
@@ -2818,7 +2966,7 @@ var LinkButton = ({ editor }) => {
2818
2966
  children: "\uCDE8\uC18C"
2819
2967
  }
2820
2968
  ),
2821
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2969
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
2822
2970
  "button",
2823
2971
  {
2824
2972
  type: "submit",
@@ -2834,10 +2982,10 @@ var LinkButton = ({ editor }) => {
2834
2982
  };
2835
2983
 
2836
2984
  // src/components/FloatingMenu/components/TableButton.tsx
2837
- var import_react16 = require("react");
2838
- var import_jsx_runtime15 = require("react/jsx-runtime");
2985
+ var import_react15 = require("react");
2986
+ var import_jsx_runtime14 = require("react/jsx-runtime");
2839
2987
  var TableButton = ({ editor }) => {
2840
- const handleClick = (0, import_react16.useCallback)(() => {
2988
+ const handleClick = (0, import_react15.useCallback)(() => {
2841
2989
  try {
2842
2990
  const block = editor?.getTextCursorPosition()?.block;
2843
2991
  if (!block || !editor?.insertBlocks) return;
@@ -2859,10 +3007,10 @@ var TableButton = ({ editor }) => {
2859
3007
  console.error("Table insert failed:", err);
2860
3008
  }
2861
3009
  }, [editor]);
2862
- const handleMouseDown2 = (0, import_react16.useCallback)((e) => {
3010
+ const handleMouseDown2 = (0, import_react15.useCallback)((e) => {
2863
3011
  e.preventDefault();
2864
3012
  }, []);
2865
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
3013
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
2866
3014
  "button",
2867
3015
  {
2868
3016
  className: "lumir-toolbar-btn",
@@ -2876,13 +3024,13 @@ var TableButton = ({ editor }) => {
2876
3024
  };
2877
3025
 
2878
3026
  // src/components/FloatingMenu/components/HTMLImportButton.tsx
2879
- var import_react17 = require("react");
2880
- var import_jsx_runtime16 = require("react/jsx-runtime");
3027
+ var import_react16 = require("react");
3028
+ var import_jsx_runtime15 = require("react/jsx-runtime");
2881
3029
  var HTMLImportButton = ({
2882
3030
  editor
2883
3031
  }) => {
2884
- const fileInputRef = (0, import_react17.useRef)(null);
2885
- const handleFileUpload = (0, import_react17.useCallback)(
3032
+ const fileInputRef = (0, import_react16.useRef)(null);
3033
+ const handleFileUpload = (0, import_react16.useCallback)(
2886
3034
  (e) => {
2887
3035
  const file = e.target.files?.[0];
2888
3036
  if (!file) return;
@@ -2918,14 +3066,14 @@ var HTMLImportButton = ({
2918
3066
  },
2919
3067
  [editor]
2920
3068
  );
2921
- const handleClick = (0, import_react17.useCallback)(() => {
3069
+ const handleClick = (0, import_react16.useCallback)(() => {
2922
3070
  fileInputRef.current?.click();
2923
3071
  }, []);
2924
- const handleMouseDown2 = (0, import_react17.useCallback)((e) => {
3072
+ const handleMouseDown2 = (0, import_react16.useCallback)((e) => {
2925
3073
  e.preventDefault();
2926
3074
  }, []);
2927
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
2928
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3075
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
3076
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2929
3077
  "input",
2930
3078
  {
2931
3079
  ref: fileInputRef,
@@ -2935,7 +3083,7 @@ var HTMLImportButton = ({
2935
3083
  style: { display: "none" }
2936
3084
  }
2937
3085
  ),
2938
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3086
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2939
3087
  "button",
2940
3088
  {
2941
3089
  className: "lumir-toolbar-btn",
@@ -2950,8 +3098,8 @@ var HTMLImportButton = ({
2950
3098
  };
2951
3099
 
2952
3100
  // src/components/FloatingMenu/components/BlockTypeSelect.tsx
2953
- var import_react18 = require("react");
2954
- var import_jsx_runtime17 = require("react/jsx-runtime");
3101
+ var import_react17 = require("react");
3102
+ var import_jsx_runtime16 = require("react/jsx-runtime");
2955
3103
  var blockTypeCategories = [
2956
3104
  {
2957
3105
  category: "Headings",
@@ -2981,8 +3129,8 @@ var blockTypes = blockTypeCategories.flatMap(
2981
3129
  (cat) => cat.items
2982
3130
  );
2983
3131
  var BlockTypeSelect = ({ editor }) => {
2984
- const [isOpen, setIsOpen] = (0, import_react18.useState)(false);
2985
- const dropdownRef = (0, import_react18.useRef)(null);
3132
+ const [isOpen, setIsOpen] = (0, import_react17.useState)(false);
3133
+ const dropdownRef = (0, import_react17.useRef)(null);
2986
3134
  const getCurrentBlock = () => {
2987
3135
  try {
2988
3136
  return editor?.getTextCursorPosition()?.block;
@@ -2994,7 +3142,7 @@ var BlockTypeSelect = ({ editor }) => {
2994
3142
  const currentType = currentBlock?.type || "paragraph";
2995
3143
  const currentLevel = currentBlock?.props?.level;
2996
3144
  const isCurrentToggle = currentType === "heading" && currentBlock?.props?.isToggleable === true;
2997
- (0, import_react18.useEffect)(() => {
3145
+ (0, import_react17.useEffect)(() => {
2998
3146
  const handleClickOutside = (e) => {
2999
3147
  if (dropdownRef.current && !dropdownRef.current.contains(e.target)) {
3000
3148
  setIsOpen(false);
@@ -3023,7 +3171,7 @@ var BlockTypeSelect = ({ editor }) => {
3023
3171
  console.error("Block type change failed:", err);
3024
3172
  }
3025
3173
  };
3026
- const handleMouseDown2 = (0, import_react18.useCallback)((e) => {
3174
+ const handleMouseDown2 = (0, import_react17.useCallback)((e) => {
3027
3175
  e.preventDefault();
3028
3176
  }, []);
3029
3177
  const getCurrentLabel = () => {
@@ -3054,8 +3202,8 @@ var BlockTypeSelect = ({ editor }) => {
3054
3202
  }
3055
3203
  return currentType === bt.type;
3056
3204
  };
3057
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "lumir-dropdown-wrapper", ref: dropdownRef, children: [
3058
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
3205
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "lumir-dropdown-wrapper", ref: dropdownRef, children: [
3206
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
3059
3207
  "button",
3060
3208
  {
3061
3209
  className: "lumir-dropdown-btn lumir-block-type-btn",
@@ -3063,15 +3211,15 @@ var BlockTypeSelect = ({ editor }) => {
3063
3211
  onMouseDown: handleMouseDown2,
3064
3212
  type: "button",
3065
3213
  children: [
3066
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "lumir-block-icon", children: BlockTypeIcons[getCurrentIcon()] }),
3067
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "lumir-block-label", children: getCurrentLabel() }),
3214
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "lumir-block-icon", children: BlockTypeIcons[getCurrentIcon()] }),
3215
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "lumir-block-label", children: getCurrentLabel() }),
3068
3216
  Icons.expandMore
3069
3217
  ]
3070
3218
  }
3071
3219
  ),
3072
- isOpen && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "lumir-dropdown-menu lumir-block-menu", children: blockTypeCategories.map((category) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "lumir-block-category", children: [
3073
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "lumir-block-category-title", children: category.category }),
3074
- category.items.map((bt) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
3220
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "lumir-dropdown-menu lumir-block-menu", children: blockTypeCategories.map((category) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "lumir-block-category", children: [
3221
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "lumir-block-category-title", children: category.category }),
3222
+ category.items.map((bt) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
3075
3223
  "button",
3076
3224
  {
3077
3225
  className: cn(
@@ -3081,8 +3229,8 @@ var BlockTypeSelect = ({ editor }) => {
3081
3229
  onClick: () => handleTypeChange(bt.type, bt.level, bt.isToggle),
3082
3230
  onMouseDown: handleMouseDown2,
3083
3231
  children: [
3084
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "lumir-block-icon", children: BlockTypeIcons[bt.icon] }),
3085
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: "lumir-block-item-title", children: bt.label })
3232
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "lumir-block-icon", children: BlockTypeIcons[bt.icon] }),
3233
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: "lumir-block-item-title", children: bt.label })
3086
3234
  ]
3087
3235
  },
3088
3236
  bt.icon
@@ -3092,7 +3240,7 @@ var BlockTypeSelect = ({ editor }) => {
3092
3240
  };
3093
3241
 
3094
3242
  // src/components/FloatingMenu/index.tsx
3095
- var import_jsx_runtime18 = require("react/jsx-runtime");
3243
+ var import_jsx_runtime17 = require("react/jsx-runtime");
3096
3244
  var COMPACT_BREAKPOINT = 700;
3097
3245
  var MINIMIZED_BREAKPOINT = 400;
3098
3246
  var FloatingMenu = ({
@@ -3101,12 +3249,12 @@ var FloatingMenu = ({
3101
3249
  className,
3102
3250
  onImageUpload
3103
3251
  }) => {
3104
- const wrapperRef = (0, import_react19.useRef)(null);
3105
- const [isCompact, setIsCompact] = (0, import_react19.useState)(false);
3106
- const [isMinimizable, setIsMinimizable] = (0, import_react19.useState)(false);
3107
- const [isMinimized, setIsMinimized] = (0, import_react19.useState)(false);
3108
- const [, setSelectionTick] = (0, import_react19.useState)(0);
3109
- (0, import_react19.useEffect)(() => {
3252
+ const wrapperRef = (0, import_react18.useRef)(null);
3253
+ const [isCompact, setIsCompact] = (0, import_react18.useState)(false);
3254
+ const [isMinimizable, setIsMinimizable] = (0, import_react18.useState)(false);
3255
+ const [isMinimized, setIsMinimized] = (0, import_react18.useState)(false);
3256
+ const [, setSelectionTick] = (0, import_react18.useState)(0);
3257
+ (0, import_react18.useEffect)(() => {
3110
3258
  if (!editor) return;
3111
3259
  let debounceTimer = null;
3112
3260
  const DEBOUNCE_DELAY = 150;
@@ -3130,7 +3278,7 @@ var FloatingMenu = ({
3130
3278
  unsubscribeContent?.();
3131
3279
  };
3132
3280
  }, [editor]);
3133
- (0, import_react19.useEffect)(() => {
3281
+ (0, import_react18.useEffect)(() => {
3134
3282
  const checkWidth = () => {
3135
3283
  if (wrapperRef.current) {
3136
3284
  const width = wrapperRef.current.offsetWidth;
@@ -3145,8 +3293,8 @@ var FloatingMenu = ({
3145
3293
  }
3146
3294
  return () => resizeObserver.disconnect();
3147
3295
  }, []);
3148
- const MinimizedLayout = () => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
3149
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3296
+ const MinimizedLayout = () => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
3297
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
3150
3298
  "button",
3151
3299
  {
3152
3300
  className: "lumir-toolbar-button lumir-toggle-button",
@@ -3157,120 +3305,120 @@ var FloatingMenu = ({
3157
3305
  children: isMinimized ? Icons.chevronRight : Icons.chevronLeft
3158
3306
  }
3159
3307
  ),
3160
- !isMinimized && /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
3161
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ToolbarDivider, {}),
3162
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(UndoRedoButtons, { editor }),
3163
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ToolbarDivider, {}),
3164
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "lumir-toolbar-group", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(BlockTypeSelect, { editor }) }),
3165
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ToolbarDivider, {}),
3166
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "lumir-toolbar-group", children: [
3167
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TextStyleButton, { editor, style: "bold" }),
3168
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TextStyleButton, { editor, style: "italic" }),
3169
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TextStyleButton, { editor, style: "underline" }),
3170
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TextStyleButton, { editor, style: "strike" })
3308
+ !isMinimized && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
3309
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ToolbarDivider, {}),
3310
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(UndoRedoButtons, { editor }),
3311
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ToolbarDivider, {}),
3312
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "lumir-toolbar-group", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(BlockTypeSelect, { editor }) }),
3313
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ToolbarDivider, {}),
3314
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "lumir-toolbar-group", children: [
3315
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TextStyleButton, { editor, style: "bold" }),
3316
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TextStyleButton, { editor, style: "italic" }),
3317
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TextStyleButton, { editor, style: "underline" }),
3318
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TextStyleButton, { editor, style: "strike" })
3171
3319
  ] }),
3172
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ToolbarDivider, {}),
3173
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "lumir-toolbar-group", children: [
3174
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(AlignButton, { editor, alignment: "left" }),
3175
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(AlignButton, { editor, alignment: "center" }),
3176
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(AlignButton, { editor, alignment: "right" })
3320
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ToolbarDivider, {}),
3321
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "lumir-toolbar-group", children: [
3322
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(AlignButton, { editor, alignment: "left" }),
3323
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(AlignButton, { editor, alignment: "center" }),
3324
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(AlignButton, { editor, alignment: "right" })
3177
3325
  ] }),
3178
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ToolbarDivider, {}),
3179
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "lumir-toolbar-group", children: [
3180
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ListButton, { editor, type: "bullet" }),
3181
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ListButton, { editor, type: "numbered" })
3326
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ToolbarDivider, {}),
3327
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "lumir-toolbar-group", children: [
3328
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ListButton, { editor, type: "bullet" }),
3329
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ListButton, { editor, type: "numbered" })
3182
3330
  ] }),
3183
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ToolbarDivider, {}),
3184
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "lumir-toolbar-group", children: [
3185
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(FontSizeButton, { editor }),
3186
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ColorButton, { editor, type: "text" }),
3187
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ColorButton, { editor, type: "background" })
3331
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ToolbarDivider, {}),
3332
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "lumir-toolbar-group", children: [
3333
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(FontSizeButton, { editor }),
3334
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ColorButton, { editor, type: "text" }),
3335
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ColorButton, { editor, type: "background" })
3188
3336
  ] }),
3189
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ToolbarDivider, {}),
3190
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "lumir-toolbar-group", children: [
3191
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ImageButton, { editor, onImageUpload }),
3192
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(LinkButton, { editor }),
3193
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TableButton, { editor }),
3194
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(HTMLImportButton, { editor })
3337
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ToolbarDivider, {}),
3338
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "lumir-toolbar-group", children: [
3339
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ImageButton, { editor, onImageUpload }),
3340
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(LinkButton, { editor }),
3341
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TableButton, { editor }),
3342
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(HTMLImportButton, { editor })
3195
3343
  ] })
3196
3344
  ] })
3197
3345
  ] });
3198
- const SingleRowLayout = () => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
3199
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(UndoRedoButtons, { editor }),
3200
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ToolbarDivider, {}),
3201
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "lumir-toolbar-group", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(BlockTypeSelect, { editor }) }),
3202
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ToolbarDivider, {}),
3203
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "lumir-toolbar-group", children: [
3204
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TextStyleButton, { editor, style: "bold" }),
3205
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TextStyleButton, { editor, style: "italic" }),
3206
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TextStyleButton, { editor, style: "underline" }),
3207
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TextStyleButton, { editor, style: "strike" })
3346
+ const SingleRowLayout = () => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
3347
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(UndoRedoButtons, { editor }),
3348
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ToolbarDivider, {}),
3349
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "lumir-toolbar-group", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(BlockTypeSelect, { editor }) }),
3350
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ToolbarDivider, {}),
3351
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "lumir-toolbar-group", children: [
3352
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TextStyleButton, { editor, style: "bold" }),
3353
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TextStyleButton, { editor, style: "italic" }),
3354
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TextStyleButton, { editor, style: "underline" }),
3355
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TextStyleButton, { editor, style: "strike" })
3208
3356
  ] }),
3209
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ToolbarDivider, {}),
3210
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "lumir-toolbar-group", children: [
3211
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(AlignButton, { editor, alignment: "left" }),
3212
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(AlignButton, { editor, alignment: "center" }),
3213
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(AlignButton, { editor, alignment: "right" })
3357
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ToolbarDivider, {}),
3358
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "lumir-toolbar-group", children: [
3359
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(AlignButton, { editor, alignment: "left" }),
3360
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(AlignButton, { editor, alignment: "center" }),
3361
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(AlignButton, { editor, alignment: "right" })
3214
3362
  ] }),
3215
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ToolbarDivider, {}),
3216
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "lumir-toolbar-group", children: [
3217
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ListButton, { editor, type: "bullet" }),
3218
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ListButton, { editor, type: "numbered" })
3363
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ToolbarDivider, {}),
3364
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "lumir-toolbar-group", children: [
3365
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ListButton, { editor, type: "bullet" }),
3366
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ListButton, { editor, type: "numbered" })
3219
3367
  ] }),
3220
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ToolbarDivider, {}),
3221
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "lumir-toolbar-group", children: [
3222
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(FontSizeButton, { editor }),
3223
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ColorButton, { editor, type: "text" }),
3224
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ColorButton, { editor, type: "background" })
3368
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ToolbarDivider, {}),
3369
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "lumir-toolbar-group", children: [
3370
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(FontSizeButton, { editor }),
3371
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ColorButton, { editor, type: "text" }),
3372
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ColorButton, { editor, type: "background" })
3225
3373
  ] }),
3226
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ToolbarDivider, {}),
3227
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "lumir-toolbar-group", children: [
3228
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ImageButton, { editor, onImageUpload }),
3229
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(LinkButton, { editor }),
3230
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TableButton, { editor }),
3231
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(HTMLImportButton, { editor })
3374
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ToolbarDivider, {}),
3375
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "lumir-toolbar-group", children: [
3376
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ImageButton, { editor, onImageUpload }),
3377
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(LinkButton, { editor }),
3378
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TableButton, { editor }),
3379
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(HTMLImportButton, { editor })
3232
3380
  ] })
3233
3381
  ] });
3234
- const TwoRowLayout = () => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
3235
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "lumir-toolbar-row", children: [
3236
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(UndoRedoButtons, { editor }),
3237
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ToolbarDivider, {}),
3238
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "lumir-toolbar-group", children: [
3239
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TextStyleButton, { editor, style: "bold" }),
3240
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TextStyleButton, { editor, style: "italic" }),
3241
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TextStyleButton, { editor, style: "underline" }),
3242
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TextStyleButton, { editor, style: "strike" })
3382
+ const TwoRowLayout = () => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
3383
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "lumir-toolbar-row", children: [
3384
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(UndoRedoButtons, { editor }),
3385
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ToolbarDivider, {}),
3386
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "lumir-toolbar-group", children: [
3387
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TextStyleButton, { editor, style: "bold" }),
3388
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TextStyleButton, { editor, style: "italic" }),
3389
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TextStyleButton, { editor, style: "underline" }),
3390
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TextStyleButton, { editor, style: "strike" })
3243
3391
  ] }),
3244
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ToolbarDivider, {}),
3245
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "lumir-toolbar-group", children: [
3246
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(AlignButton, { editor, alignment: "left" }),
3247
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(AlignButton, { editor, alignment: "center" }),
3248
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(AlignButton, { editor, alignment: "right" })
3392
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ToolbarDivider, {}),
3393
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "lumir-toolbar-group", children: [
3394
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(AlignButton, { editor, alignment: "left" }),
3395
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(AlignButton, { editor, alignment: "center" }),
3396
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(AlignButton, { editor, alignment: "right" })
3249
3397
  ] }),
3250
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ToolbarDivider, {}),
3251
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "lumir-toolbar-group", children: [
3252
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ListButton, { editor, type: "bullet" }),
3253
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ListButton, { editor, type: "numbered" })
3398
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ToolbarDivider, {}),
3399
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "lumir-toolbar-group", children: [
3400
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ListButton, { editor, type: "bullet" }),
3401
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ListButton, { editor, type: "numbered" })
3254
3402
  ] })
3255
3403
  ] }),
3256
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "lumir-toolbar-row", children: [
3257
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "lumir-toolbar-group", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(BlockTypeSelect, { editor }) }),
3258
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ToolbarDivider, {}),
3259
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "lumir-toolbar-group", children: [
3260
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(FontSizeButton, { editor }),
3261
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ColorButton, { editor, type: "text" }),
3262
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ColorButton, { editor, type: "background" })
3404
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "lumir-toolbar-row", children: [
3405
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "lumir-toolbar-group", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(BlockTypeSelect, { editor }) }),
3406
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ToolbarDivider, {}),
3407
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "lumir-toolbar-group", children: [
3408
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(FontSizeButton, { editor }),
3409
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ColorButton, { editor, type: "text" }),
3410
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ColorButton, { editor, type: "background" })
3263
3411
  ] }),
3264
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ToolbarDivider, {}),
3265
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "lumir-toolbar-group", children: [
3266
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ImageButton, { editor, onImageUpload }),
3267
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(LinkButton, { editor }),
3268
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TableButton, { editor }),
3269
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(HTMLImportButton, { editor })
3412
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ToolbarDivider, {}),
3413
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "lumir-toolbar-group", children: [
3414
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(ImageButton, { editor, onImageUpload }),
3415
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(LinkButton, { editor }),
3416
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TableButton, { editor }),
3417
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(HTMLImportButton, { editor })
3270
3418
  ] })
3271
3419
  ] })
3272
3420
  ] });
3273
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3421
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
3274
3422
  "div",
3275
3423
  {
3276
3424
  ref: wrapperRef,
@@ -3280,7 +3428,7 @@ var FloatingMenu = ({
3280
3428
  className
3281
3429
  ),
3282
3430
  "data-position": position,
3283
- children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
3431
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
3284
3432
  "div",
3285
3433
  {
3286
3434
  className: cn(
@@ -3289,7 +3437,7 @@ var FloatingMenu = ({
3289
3437
  isMinimizable && "is-minimizable",
3290
3438
  isMinimized && "is-minimized"
3291
3439
  ),
3292
- children: isMinimizable ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(MinimizedLayout, {}) : isCompact ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(TwoRowLayout, {}) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(SingleRowLayout, {})
3440
+ children: isMinimizable ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(MinimizedLayout, {}) : isCompact ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TwoRowLayout, {}) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(SingleRowLayout, {})
3293
3441
  }
3294
3442
  )
3295
3443
  }
@@ -3389,8 +3537,8 @@ var LumirEditorError = class _LumirEditorError extends Error {
3389
3537
  };
3390
3538
 
3391
3539
  // src/extensions/VerticalAlignmentExtension.ts
3392
- var import_core4 = require("@tiptap/core");
3393
- var VerticalAlignmentExtension = import_core4.Extension.create({
3540
+ var import_core5 = require("@tiptap/core");
3541
+ var VerticalAlignmentExtension = import_core5.Extension.create({
3394
3542
  name: "verticalAlignment",
3395
3543
  addGlobalAttributes() {
3396
3544
  return [
@@ -3421,7 +3569,7 @@ var VerticalAlignmentExtension = import_core4.Extension.create({
3421
3569
  });
3422
3570
 
3423
3571
  // src/extensions/RowHeightExtension.ts
3424
- var import_core5 = require("@tiptap/core");
3572
+ var import_core6 = require("@tiptap/core");
3425
3573
 
3426
3574
  // src/extensions/rowResizing.ts
3427
3575
  var import_prosemirror_state3 = require("prosemirror-state");
@@ -4009,7 +4157,7 @@ function tableCellAttrPreserve() {
4009
4157
  }
4010
4158
 
4011
4159
  // src/extensions/RowHeightExtension.ts
4012
- var RowHeightExtension = import_core5.Extension.create({
4160
+ var RowHeightExtension = import_core6.Extension.create({
4013
4161
  name: "rowHeight",
4014
4162
  addOptions() {
4015
4163
  return { resizable: true };
@@ -4055,7 +4203,7 @@ var RowHeightExtension = import_core5.Extension.create({
4055
4203
  });
4056
4204
 
4057
4205
  // src/extensions/TableAlignmentExtension.ts
4058
- var import_core6 = require("@tiptap/core");
4206
+ var import_core7 = require("@tiptap/core");
4059
4207
  var import_prosemirror_state6 = require("prosemirror-state");
4060
4208
  var import_prosemirror_view4 = require("prosemirror-view");
4061
4209
  var tableAlignmentDecoKey = new import_prosemirror_state6.PluginKey("lumirTableAlignmentDeco");
@@ -4084,7 +4232,7 @@ function tableAlignmentDecorationPlugin() {
4084
4232
  }
4085
4233
  });
4086
4234
  }
4087
- var TableAlignmentExtension = import_core6.Extension.create({
4235
+ var TableAlignmentExtension = import_core7.Extension.create({
4088
4236
  name: "tableAlignment",
4089
4237
  addGlobalAttributes() {
4090
4238
  return [
@@ -4111,9 +4259,9 @@ var TableAlignmentExtension = import_core6.Extension.create({
4111
4259
  });
4112
4260
 
4113
4261
  // src/extensions/TableSelectAllExtension.ts
4114
- var import_core7 = require("@tiptap/core");
4262
+ var import_core8 = require("@tiptap/core");
4115
4263
  var import_prosemirror_tables3 = require("prosemirror-tables");
4116
- var TableSelectAllExtension = import_core7.Extension.create({
4264
+ var TableSelectAllExtension = import_core8.Extension.create({
4117
4265
  name: "lumirTableSelectAll",
4118
4266
  priority: 1e3,
4119
4267
  addKeyboardShortcuts() {
@@ -4157,8 +4305,67 @@ var TableSelectAllExtension = import_core7.Extension.create({
4157
4305
  }
4158
4306
  });
4159
4307
 
4160
- // src/blocks/columns/insertColumns.ts
4308
+ // src/extensions/InactiveSelectionExtension.ts
4309
+ var import_core9 = require("@tiptap/core");
4161
4310
  var import_prosemirror_state7 = require("prosemirror-state");
4311
+ var import_prosemirror_view5 = require("prosemirror-view");
4312
+ var inactiveSelectionKey = new import_prosemirror_state7.PluginKey("lumirInactiveSelection");
4313
+ var InactiveSelectionExtension = import_core9.Extension.create({
4314
+ name: "lumirInactiveSelection",
4315
+ addProseMirrorPlugins() {
4316
+ return [
4317
+ new import_prosemirror_state7.Plugin({
4318
+ key: inactiveSelectionKey,
4319
+ // 플러그인 state = 에디터 포커스 여부
4320
+ state: {
4321
+ init: () => false,
4322
+ apply: (tr, value) => {
4323
+ const meta = tr.getMeta(inactiveSelectionKey);
4324
+ return typeof meta === "boolean" ? meta : value;
4325
+ }
4326
+ },
4327
+ props: {
4328
+ decorations(state) {
4329
+ const hasFocus = inactiveSelectionKey.getState(state);
4330
+ if (hasFocus) {
4331
+ return null;
4332
+ }
4333
+ const { selection } = state;
4334
+ if (selection.empty || !(selection instanceof import_prosemirror_state7.TextSelection)) {
4335
+ return null;
4336
+ }
4337
+ return import_prosemirror_view5.DecorationSet.create(state.doc, [
4338
+ import_prosemirror_view5.Decoration.inline(selection.from, selection.to, {
4339
+ class: "bn-inactive-selection"
4340
+ })
4341
+ ]);
4342
+ }
4343
+ },
4344
+ view(view) {
4345
+ const sync = () => {
4346
+ const has = view.hasFocus();
4347
+ if (inactiveSelectionKey.getState(view.state) !== has) {
4348
+ view.dispatch(view.state.tr.setMeta(inactiveSelectionKey, has));
4349
+ }
4350
+ };
4351
+ view.dom.addEventListener("focus", sync);
4352
+ view.dom.addEventListener("blur", sync);
4353
+ const raf = requestAnimationFrame(sync);
4354
+ return {
4355
+ destroy() {
4356
+ cancelAnimationFrame(raf);
4357
+ view.dom.removeEventListener("focus", sync);
4358
+ view.dom.removeEventListener("blur", sync);
4359
+ }
4360
+ };
4361
+ }
4362
+ })
4363
+ ];
4364
+ }
4365
+ });
4366
+
4367
+ // src/blocks/columns/insertColumns.ts
4368
+ var import_prosemirror_state8 = require("prosemirror-state");
4162
4369
  function insertTwoColumns(editor, showDivider = false) {
4163
4370
  const tiptap = editor?._tiptapEditor;
4164
4371
  if (!tiptap) {
@@ -4190,7 +4397,7 @@ function insertTwoColumns(editor, showDivider = false) {
4190
4397
  try {
4191
4398
  let tr = state.tr.insert(insertPos, list);
4192
4399
  try {
4193
- tr = tr.setSelection(import_prosemirror_state7.TextSelection.create(tr.doc, insertPos + 4));
4400
+ tr = tr.setSelection(import_prosemirror_state8.TextSelection.create(tr.doc, insertPos + 4));
4194
4401
  } catch {
4195
4402
  }
4196
4403
  tiptap.view.dispatch(tr.scrollIntoView());
@@ -4201,18 +4408,18 @@ function insertTwoColumns(editor, showDivider = false) {
4201
4408
  }
4202
4409
 
4203
4410
  // src/components/CustomFormattingToolbar.tsx
4204
- var import_react30 = require("@blocknote/react");
4411
+ var import_react29 = require("@blocknote/react");
4205
4412
 
4206
4413
  // src/components/TextAlignButtonWithVA.tsx
4207
- var import_core8 = require("@blocknote/core");
4208
- var import_react20 = require("react");
4209
- var import_react21 = require("@blocknote/react");
4210
- var import_jsx_runtime19 = require("react/jsx-runtime");
4414
+ var import_core10 = require("@blocknote/core");
4415
+ var import_react19 = require("react");
4416
+ var import_react20 = require("@blocknote/react");
4417
+ var import_jsx_runtime18 = require("react/jsx-runtime");
4211
4418
  var icons = {
4212
- left: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", width: "18", height: "18", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("path", { d: "M15 15H3v2h12v-2zm0-8H3v2h12V7zM3 13h18v-2H3v2zm0 8h18v-2H3v2zM3 3v2h18V3H3z" }) }),
4213
- center: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", width: "18", height: "18", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("path", { d: "M7 15v2h10v-2H7zm-4 6h18v-2H3v2zm0-8h18v-2H3v2zm4-6v2h10V7H7zM3 3v2h18V3H3z" }) }),
4214
- right: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", width: "18", height: "18", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("path", { d: "M3 21h18v-2H3v2zm6-4h12v-2H9v2zm-6-4h18v-2H3v2zm6-4h12V7H9v2zM3 3v2h18V3H3z" }) }),
4215
- justify: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", width: "18", height: "18", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("path", { d: "M3 21h18v-2H3v2zm0-4h18v-2H3v2zm0-4h18v-2H3v2zm0-4h18V7H3v2zM3 3v2h18V3H3z" }) })
4419
+ left: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", width: "18", height: "18", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d: "M15 15H3v2h12v-2zm0-8H3v2h12V7zM3 13h18v-2H3v2zm0 8h18v-2H3v2zM3 3v2h18V3H3z" }) }),
4420
+ center: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", width: "18", height: "18", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d: "M7 15v2h10v-2H7zm-4 6h18v-2H3v2zm0-8h18v-2H3v2zm4-6v2h10V7H7zM3 3v2h18V3H3z" }) }),
4421
+ right: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", width: "18", height: "18", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d: "M3 21h18v-2H3v2zm6-4h12v-2H9v2zm-6-4h18v-2H3v2zm6-4h12V7H9v2zM3 3v2h18V3H3z" }) }),
4422
+ justify: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "currentColor", width: "18", height: "18", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { d: "M3 21h18v-2H3v2zm0-4h18v-2H3v2zm0-4h18v-2H3v2zm0-4h18V7H3v2zM3 3v2h18V3H3z" }) })
4216
4423
  };
4217
4424
  var tooltipMap = {
4218
4425
  left: "\uC67C\uCABD \uC815\uB82C",
@@ -4221,12 +4428,12 @@ var tooltipMap = {
4221
4428
  justify: "\uC591\uCABD \uC815\uB82C"
4222
4429
  };
4223
4430
  var TextAlignButtonWithVA = (props) => {
4224
- const Components = (0, import_react21.useComponentsContext)();
4225
- const editor = (0, import_react21.useBlockNoteEditor)();
4226
- const selectedBlocks = (0, import_react21.useSelectedBlocks)(editor);
4227
- const textAlignment = (0, import_react20.useMemo)(() => {
4431
+ const Components = (0, import_react20.useComponentsContext)();
4432
+ const editor = (0, import_react20.useBlockNoteEditor)();
4433
+ const selectedBlocks = (0, import_react20.useSelectedBlocks)(editor);
4434
+ const textAlignment = (0, import_react19.useMemo)(() => {
4228
4435
  const block = selectedBlocks[0];
4229
- if ((0, import_core8.checkBlockHasDefaultProp)("textAlignment", block, editor)) {
4436
+ if ((0, import_core10.checkBlockHasDefaultProp)("textAlignment", block, editor)) {
4230
4437
  return block.props.textAlignment;
4231
4438
  }
4232
4439
  if (block.type === "table") {
@@ -4235,7 +4442,7 @@ var TextAlignButtonWithVA = (props) => {
4235
4442
  return;
4236
4443
  }
4237
4444
  const allCellsInTable = cellSelection.cells.map(
4238
- ({ row, col }) => (0, import_core8.mapTableCell)(
4445
+ ({ row, col }) => (0, import_core10.mapTableCell)(
4239
4446
  block.content.rows[row].cells[col]
4240
4447
  ).props.textAlignment
4241
4448
  );
@@ -4246,7 +4453,7 @@ var TextAlignButtonWithVA = (props) => {
4246
4453
  }
4247
4454
  return;
4248
4455
  }, [editor, selectedBlocks]);
4249
- const setTextAlignment = (0, import_react20.useCallback)(
4456
+ const setTextAlignment = (0, import_react19.useCallback)(
4250
4457
  (newAlignment) => {
4251
4458
  editor.focus();
4252
4459
  for (const block of selectedBlocks) {
@@ -4267,7 +4474,7 @@ var TextAlignButtonWithVA = (props) => {
4267
4474
  }
4268
4475
  }
4269
4476
  tiptap.view?.dispatch(tr);
4270
- } else if ((0, import_core8.checkBlockTypeHasDefaultProp)("textAlignment", block.type, editor)) {
4477
+ } else if ((0, import_core10.checkBlockTypeHasDefaultProp)("textAlignment", block.type, editor)) {
4271
4478
  editor.updateBlock(block, {
4272
4479
  props: { textAlignment: newAlignment }
4273
4480
  });
@@ -4276,7 +4483,7 @@ var TextAlignButtonWithVA = (props) => {
4276
4483
  },
4277
4484
  [editor, selectedBlocks]
4278
4485
  );
4279
- const show = (0, import_react20.useMemo)(() => {
4486
+ const show = (0, import_react19.useMemo)(() => {
4280
4487
  return !!selectedBlocks.find(
4281
4488
  (block) => "textAlignment" in block.props || block.type === "table" && block.children
4282
4489
  );
@@ -4284,7 +4491,7 @@ var TextAlignButtonWithVA = (props) => {
4284
4491
  if (!show || !editor.isEditable) {
4285
4492
  return null;
4286
4493
  }
4287
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
4494
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
4288
4495
  Components.FormattingToolbar.Button,
4289
4496
  {
4290
4497
  className: "bn-button",
@@ -4299,21 +4506,21 @@ var TextAlignButtonWithVA = (props) => {
4299
4506
  };
4300
4507
 
4301
4508
  // src/components/VerticalAlignButton.tsx
4302
- var import_react22 = require("react");
4303
- var import_react23 = require("@blocknote/react");
4304
- var import_jsx_runtime20 = require("react/jsx-runtime");
4509
+ var import_react21 = require("react");
4510
+ var import_react22 = require("@blocknote/react");
4511
+ var import_jsx_runtime19 = require("react/jsx-runtime");
4305
4512
  var icons2 = {
4306
- top: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
4307
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("rect", { x: "2", y: "2", width: "12", height: "12", rx: "1" }),
4308
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("line", { x1: "5", y1: "5", x2: "11", y2: "5" })
4513
+ top: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
4514
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("rect", { x: "2", y: "2", width: "12", height: "12", rx: "1" }),
4515
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("line", { x1: "5", y1: "5", x2: "11", y2: "5" })
4309
4516
  ] }),
4310
- middle: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
4311
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("rect", { x: "2", y: "2", width: "12", height: "12", rx: "1" }),
4312
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("line", { x1: "5", y1: "8", x2: "11", y2: "8" })
4517
+ middle: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
4518
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("rect", { x: "2", y: "2", width: "12", height: "12", rx: "1" }),
4519
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("line", { x1: "5", y1: "8", x2: "11", y2: "8" })
4313
4520
  ] }),
4314
- bottom: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
4315
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("rect", { x: "2", y: "2", width: "12", height: "12", rx: "1" }),
4316
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("line", { x1: "5", y1: "11", x2: "11", y2: "11" })
4521
+ bottom: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: [
4522
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("rect", { x: "2", y: "2", width: "12", height: "12", rx: "1" }),
4523
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("line", { x1: "5", y1: "11", x2: "11", y2: "11" })
4317
4524
  ] })
4318
4525
  };
4319
4526
  var tooltips = {
@@ -4335,13 +4542,13 @@ function getCurrentVerticalAlignment(editor) {
4335
4542
  return alignments.every((a) => a === first) ? first : void 0;
4336
4543
  }
4337
4544
  var VerticalAlignButton = (props) => {
4338
- const Components = (0, import_react23.useComponentsContext)();
4339
- const editor = (0, import_react23.useBlockNoteEditor)();
4340
- const selectedBlocks = (0, import_react23.useSelectedBlocks)(editor);
4341
- const currentAlignment = (0, import_react22.useMemo)(() => {
4545
+ const Components = (0, import_react22.useComponentsContext)();
4546
+ const editor = (0, import_react22.useBlockNoteEditor)();
4547
+ const selectedBlocks = (0, import_react22.useSelectedBlocks)(editor);
4548
+ const currentAlignment = (0, import_react21.useMemo)(() => {
4342
4549
  return getCurrentVerticalAlignment(editor);
4343
4550
  }, [editor, selectedBlocks]);
4344
- const setVerticalAlignment = (0, import_react22.useCallback)(
4551
+ const setVerticalAlignment = (0, import_react21.useCallback)(
4345
4552
  (alignment) => {
4346
4553
  const tiptap = editor._tiptapEditor;
4347
4554
  if (!tiptap) return;
@@ -4363,13 +4570,13 @@ var VerticalAlignButton = (props) => {
4363
4570
  },
4364
4571
  [editor]
4365
4572
  );
4366
- const isInTable = (0, import_react22.useMemo)(() => {
4573
+ const isInTable = (0, import_react21.useMemo)(() => {
4367
4574
  return selectedBlocks.some((block) => block.type === "table");
4368
4575
  }, [selectedBlocks]);
4369
4576
  if (!isInTable || !editor.isEditable) {
4370
4577
  return null;
4371
4578
  }
4372
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
4579
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
4373
4580
  Components.FormattingToolbar.Button,
4374
4581
  {
4375
4582
  className: "bn-button",
@@ -4384,24 +4591,24 @@ var VerticalAlignButton = (props) => {
4384
4591
  };
4385
4592
 
4386
4593
  // src/components/TableAlignButton.tsx
4387
- var import_react24 = require("react");
4388
- var import_react25 = require("@blocknote/react");
4389
- var import_jsx_runtime21 = require("react/jsx-runtime");
4594
+ var import_react23 = require("react");
4595
+ var import_react24 = require("@blocknote/react");
4596
+ var import_jsx_runtime20 = require("react/jsx-runtime");
4390
4597
  var icons3 = {
4391
- left: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.4", children: [
4392
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("rect", { x: "1.5", y: "4", width: "7", height: "8", rx: "1", fill: "currentColor", stroke: "none" }),
4393
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("line", { x1: "1.5", y1: "1.5", x2: "14.5", y2: "1.5" }),
4394
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("line", { x1: "1.5", y1: "14.5", x2: "14.5", y2: "14.5" })
4598
+ left: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.4", children: [
4599
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("rect", { x: "1.5", y: "4", width: "7", height: "8", rx: "1", fill: "currentColor", stroke: "none" }),
4600
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("line", { x1: "1.5", y1: "1.5", x2: "14.5", y2: "1.5" }),
4601
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("line", { x1: "1.5", y1: "14.5", x2: "14.5", y2: "14.5" })
4395
4602
  ] }),
4396
- center: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.4", children: [
4397
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("rect", { x: "4.5", y: "4", width: "7", height: "8", rx: "1", fill: "currentColor", stroke: "none" }),
4398
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("line", { x1: "1.5", y1: "1.5", x2: "14.5", y2: "1.5" }),
4399
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("line", { x1: "1.5", y1: "14.5", x2: "14.5", y2: "14.5" })
4603
+ center: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.4", children: [
4604
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("rect", { x: "4.5", y: "4", width: "7", height: "8", rx: "1", fill: "currentColor", stroke: "none" }),
4605
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("line", { x1: "1.5", y1: "1.5", x2: "14.5", y2: "1.5" }),
4606
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("line", { x1: "1.5", y1: "14.5", x2: "14.5", y2: "14.5" })
4400
4607
  ] }),
4401
- right: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.4", children: [
4402
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("rect", { x: "7.5", y: "4", width: "7", height: "8", rx: "1", fill: "currentColor", stroke: "none" }),
4403
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("line", { x1: "1.5", y1: "1.5", x2: "14.5", y2: "1.5" }),
4404
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("line", { x1: "1.5", y1: "14.5", x2: "14.5", y2: "14.5" })
4608
+ right: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.4", children: [
4609
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("rect", { x: "7.5", y: "4", width: "7", height: "8", rx: "1", fill: "currentColor", stroke: "none" }),
4610
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("line", { x1: "1.5", y1: "1.5", x2: "14.5", y2: "1.5" }),
4611
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("line", { x1: "1.5", y1: "14.5", x2: "14.5", y2: "14.5" })
4405
4612
  ] })
4406
4613
  };
4407
4614
  var tooltips2 = {
@@ -4410,18 +4617,18 @@ var tooltips2 = {
4410
4617
  right: "\uD45C \uC624\uB978\uCABD \uC815\uB82C"
4411
4618
  };
4412
4619
  var TableAlignButton = (props) => {
4413
- const Components = (0, import_react25.useComponentsContext)();
4414
- const editor = (0, import_react25.useBlockNoteEditor)();
4415
- const selectedBlocks = (0, import_react25.useSelectedBlocks)(editor);
4416
- const tableBlock = (0, import_react24.useMemo)(
4620
+ const Components = (0, import_react24.useComponentsContext)();
4621
+ const editor = (0, import_react24.useBlockNoteEditor)();
4622
+ const selectedBlocks = (0, import_react24.useSelectedBlocks)(editor);
4623
+ const tableBlock = (0, import_react23.useMemo)(
4417
4624
  () => selectedBlocks.find((block) => block.type === "table"),
4418
4625
  [selectedBlocks]
4419
4626
  );
4420
- const current = (0, import_react24.useMemo)(() => {
4627
+ const current = (0, import_react23.useMemo)(() => {
4421
4628
  if (!tableBlock?.id) return "left";
4422
4629
  return getTableAlignment(editor, tableBlock.id);
4423
4630
  }, [editor, tableBlock, selectedBlocks]);
4424
- const apply = (0, import_react24.useCallback)(() => {
4631
+ const apply = (0, import_react23.useCallback)(() => {
4425
4632
  if (!tableBlock?.id) return;
4426
4633
  editor.focus();
4427
4634
  setTableAlignment(editor, tableBlock.id, props.alignment);
@@ -4429,7 +4636,7 @@ var TableAlignButton = (props) => {
4429
4636
  if (!tableBlock || !editor.isEditable) {
4430
4637
  return null;
4431
4638
  }
4432
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
4639
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
4433
4640
  Components.FormattingToolbar.Button,
4434
4641
  {
4435
4642
  className: "bn-button",
@@ -4444,13 +4651,13 @@ var TableAlignButton = (props) => {
4444
4651
  };
4445
4652
 
4446
4653
  // src/components/FontSizeButton.tsx
4447
- var import_react26 = require("@blocknote/react");
4448
- var import_react27 = require("react");
4449
- var import_jsx_runtime22 = require("react/jsx-runtime");
4654
+ var import_react25 = require("@blocknote/react");
4655
+ var import_react26 = require("react");
4656
+ var import_jsx_runtime21 = require("react/jsx-runtime");
4450
4657
  var DEFAULT_LABEL2 = "\uAE30\uBCF8";
4451
4658
  var toLabel2 = (size) => size.replace(/px$/, "");
4452
4659
  function FontSizeIcon({ size }) {
4453
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
4660
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
4454
4661
  "span",
4455
4662
  {
4456
4663
  style: {
@@ -4465,21 +4672,26 @@ function FontSizeIcon({ size }) {
4465
4672
  );
4466
4673
  }
4467
4674
  function FontSizeButton2() {
4468
- const Components = (0, import_react26.useComponentsContext)();
4469
- const editor = (0, import_react26.useBlockNoteEditor)();
4675
+ const Components = (0, import_react25.useComponentsContext)();
4676
+ const editor = (0, import_react25.useBlockNoteEditor)();
4470
4677
  const ed = editor;
4471
4678
  const styleSchema = editor.schema.styleSchema;
4472
4679
  const fontSizeInSchema = styleSchema.fontSize?.type === "fontSize" && styleSchema.fontSize?.propSchema === "string";
4473
- const selectedBlocks = (0, import_react26.useSelectedBlocks)(editor);
4474
- const [currentSize, setCurrentSize] = (0, import_react27.useState)(
4475
- fontSizeInSchema ? ed.getActiveStyles().fontSize || "" : ""
4680
+ const selectedBlocks = (0, import_react25.useSelectedBlocks)(editor);
4681
+ const [currentSize, setCurrentSize] = (0, import_react26.useState)(
4682
+ fontSizeInSchema ? readSelectionFontSize(editor) : ""
4476
4683
  );
4477
- (0, import_react26.useEditorContentOrSelectionChange)(() => {
4684
+ (0, import_react25.useEditorContentOrSelectionChange)(() => {
4478
4685
  if (fontSizeInSchema) {
4479
- setCurrentSize(ed.getActiveStyles().fontSize || "");
4686
+ setCurrentSize(readSelectionFontSize(editor));
4480
4687
  }
4481
4688
  }, editor);
4482
- const setFontSize = (0, import_react27.useCallback)(
4689
+ const currentPx = parseFontSizePx(currentSize);
4690
+ const [inputValue, setInputValue] = (0, import_react26.useState)(String(currentPx));
4691
+ (0, import_react26.useEffect)(() => {
4692
+ setInputValue(String(currentPx));
4693
+ }, [currentPx]);
4694
+ const setFontSize = (0, import_react26.useCallback)(
4483
4695
  (size) => {
4484
4696
  size === "" ? ed.removeStyles({ fontSize: "" }) : ed.addStyles({ fontSize: size });
4485
4697
  setTimeout(() => editor.focus());
@@ -4487,7 +4699,26 @@ function FontSizeButton2() {
4487
4699
  // eslint-disable-next-line react-hooks/exhaustive-deps
4488
4700
  [editor]
4489
4701
  );
4490
- const show = (0, import_react27.useMemo)(() => {
4702
+ const stepBy = (0, import_react26.useCallback)(
4703
+ (delta) => {
4704
+ const value = toFontSizeValue(currentPx + delta);
4705
+ ed.addStyles({ fontSize: value });
4706
+ setCurrentSize(value);
4707
+ },
4708
+ // eslint-disable-next-line react-hooks/exhaustive-deps
4709
+ [currentPx]
4710
+ );
4711
+ const applyInput = (0, import_react26.useCallback)(() => {
4712
+ const n = parseInt(inputValue, 10);
4713
+ if (Number.isFinite(n)) {
4714
+ const value = toFontSizeValue(n);
4715
+ ed.addStyles({ fontSize: value });
4716
+ setCurrentSize(value);
4717
+ } else {
4718
+ setInputValue(String(currentPx));
4719
+ }
4720
+ }, [inputValue, currentPx]);
4721
+ const show = (0, import_react26.useMemo)(() => {
4491
4722
  if (!fontSizeInSchema) {
4492
4723
  return false;
4493
4724
  }
@@ -4502,20 +4733,76 @@ function FontSizeButton2() {
4502
4733
  return null;
4503
4734
  }
4504
4735
  const tooltip = "\uAE00\uC790 \uD06C\uAE30";
4505
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Components.Generic.Menu.Root, { children: [
4506
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Components.Generic.Menu.Trigger, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
4736
+ const preventBlur = (e) => e.preventDefault();
4737
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Components.Generic.Menu.Root, { children: [
4738
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Components.Generic.Menu.Trigger, { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
4507
4739
  Components.FormattingToolbar.Button,
4508
4740
  {
4509
4741
  className: "bn-button",
4510
4742
  "data-test": "font-size",
4511
4743
  label: tooltip,
4512
4744
  mainTooltip: tooltip,
4513
- icon: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(FontSizeIcon, { size: currentSize })
4745
+ icon: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(FontSizeIcon, { size: currentSize })
4514
4746
  }
4515
4747
  ) }),
4516
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Components.Generic.Menu.Dropdown, { className: "bn-menu-dropdown", children: [
4517
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Components.Generic.Menu.Label, { children: "\uAE00\uC790 \uD06C\uAE30" }),
4518
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
4748
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Components.Generic.Menu.Dropdown, { className: "bn-menu-dropdown", children: [
4749
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Components.Generic.Menu.Label, { children: "\uAE00\uC790 \uD06C\uAE30" }),
4750
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "lumir-fs-stepper", children: [
4751
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
4752
+ "button",
4753
+ {
4754
+ type: "button",
4755
+ className: "lumir-fs-stepper-btn",
4756
+ "aria-label": "\uAE00\uC790 \uD06C\uAE30 1px \uC904\uC774\uAE30",
4757
+ "data-test": "font-size-decrease",
4758
+ disabled: currentPx <= FONT_SIZE_MIN,
4759
+ onMouseDown: preventBlur,
4760
+ onClick: () => stepBy(-1),
4761
+ children: "\u2212"
4762
+ }
4763
+ ),
4764
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
4765
+ "input",
4766
+ {
4767
+ className: "lumir-fs-stepper-input",
4768
+ type: "text",
4769
+ inputMode: "numeric",
4770
+ "aria-label": "\uAE00\uC790 \uD06C\uAE30 \uC785\uB825",
4771
+ "data-test": "font-size-input",
4772
+ value: inputValue,
4773
+ onChange: (e) => setInputValue(e.target.value.replace(/[^0-9]/g, "")),
4774
+ onClick: (e) => e.stopPropagation(),
4775
+ onKeyDown: (e) => {
4776
+ e.stopPropagation();
4777
+ if (e.key === "Enter") {
4778
+ e.preventDefault();
4779
+ applyInput();
4780
+ } else if (e.key === "ArrowUp") {
4781
+ e.preventDefault();
4782
+ stepBy(1);
4783
+ } else if (e.key === "ArrowDown") {
4784
+ e.preventDefault();
4785
+ stepBy(-1);
4786
+ }
4787
+ },
4788
+ onBlur: applyInput
4789
+ }
4790
+ ),
4791
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
4792
+ "button",
4793
+ {
4794
+ type: "button",
4795
+ className: "lumir-fs-stepper-btn",
4796
+ "aria-label": "\uAE00\uC790 \uD06C\uAE30 1px \uB298\uB9AC\uAE30",
4797
+ "data-test": "font-size-increase",
4798
+ disabled: currentPx >= FONT_SIZE_MAX,
4799
+ onMouseDown: preventBlur,
4800
+ onClick: () => stepBy(1),
4801
+ children: "+"
4802
+ }
4803
+ )
4804
+ ] }),
4805
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
4519
4806
  Components.Generic.Menu.Item,
4520
4807
  {
4521
4808
  onClick: () => setFontSize(""),
@@ -4525,7 +4812,7 @@ function FontSizeButton2() {
4525
4812
  },
4526
4813
  "font-size-default"
4527
4814
  ),
4528
- FONT_SIZE_PRESETS.map((size) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
4815
+ FONT_SIZE_PRESETS.map((size) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
4529
4816
  Components.Generic.Menu.Item,
4530
4817
  {
4531
4818
  onClick: () => setFontSize(size),
@@ -4540,10 +4827,10 @@ function FontSizeButton2() {
4540
4827
  }
4541
4828
 
4542
4829
  // src/components/color/LumirColorControls.tsx
4543
- var import_core9 = require("@blocknote/core");
4544
- var import_react28 = require("@blocknote/react");
4545
- var import_react29 = require("react");
4546
- var import_jsx_runtime23 = require("react/jsx-runtime");
4830
+ var import_core11 = require("@blocknote/core");
4831
+ var import_react27 = require("@blocknote/react");
4832
+ var import_react28 = require("react");
4833
+ var import_jsx_runtime22 = require("react/jsx-runtime");
4547
4834
  var COLORS = [
4548
4835
  "default",
4549
4836
  "gray",
@@ -4560,7 +4847,7 @@ function ColorIcon(props) {
4560
4847
  const textColor = props.textColor || "default";
4561
4848
  const backgroundColor = props.backgroundColor || "default";
4562
4849
  const size = props.size || 16;
4563
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
4850
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
4564
4851
  "div",
4565
4852
  {
4566
4853
  className: "bn-color-icon",
@@ -4579,7 +4866,7 @@ function ColorIcon(props) {
4579
4866
  );
4580
4867
  }
4581
4868
  function CellFillIcon({ size = 18 }) {
4582
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
4869
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
4583
4870
  "svg",
4584
4871
  {
4585
4872
  width: size,
@@ -4588,17 +4875,17 @@ function CellFillIcon({ size = 18 }) {
4588
4875
  fill: "currentColor",
4589
4876
  style: { pointerEvents: "none" },
4590
4877
  "aria-hidden": "true",
4591
- children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { d: "M16.56 8.94 7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.59-.59 1.54 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.58.59-1.53 0-2.12zM5.21 10 10 5.21 14.79 10H5.21zM19 11.5s-2 2.17-2 3.5c0 1.1.9 2 2 2s2-.9 2-2c0-1.33-2-3.5-2-3.5z" })
4878
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("path", { d: "M16.56 8.94 7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.59-.59 1.54 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.58.59-1.53 0-2.12zM5.21 10 10 5.21 14.79 10H5.21zM19 11.5s-2 2.17-2 3.5c0 1.1.9 2 2 2s2-.9 2-2c0-1.33-2-3.5-2-3.5z" })
4592
4879
  }
4593
4880
  );
4594
4881
  }
4595
4882
  function LumirColorPicker(props) {
4596
- const Components = (0, import_react28.useComponentsContext)();
4597
- const dict = (0, import_react28.useDictionary)();
4598
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
4599
- props.text ? /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
4600
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Components.Generic.Menu.Label, { children: props.textTitle ?? dict.color_picker.text_title }),
4601
- COLORS.map((color) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
4883
+ const Components = (0, import_react27.useComponentsContext)();
4884
+ const dict = (0, import_react27.useDictionary)();
4885
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
4886
+ props.text ? /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
4887
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Components.Generic.Menu.Label, { children: props.textTitle ?? dict.color_picker.text_title }),
4888
+ COLORS.map((color) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
4602
4889
  Components.Generic.Menu.Item,
4603
4890
  {
4604
4891
  onClick: () => {
@@ -4606,16 +4893,16 @@ function LumirColorPicker(props) {
4606
4893
  props.text.setColor(color);
4607
4894
  },
4608
4895
  "data-test": "text-color-" + color,
4609
- icon: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ColorIcon, { textColor: color, size: props.iconSize }),
4896
+ icon: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ColorIcon, { textColor: color, size: props.iconSize }),
4610
4897
  checked: props.text.color === color,
4611
4898
  children: dict.color_picker.colors[color]
4612
4899
  },
4613
4900
  "text-color-" + color
4614
4901
  ))
4615
4902
  ] }) : null,
4616
- props.background ? /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
4617
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Components.Generic.Menu.Label, { children: props.backgroundTitle ?? dict.color_picker.background_title }),
4618
- COLORS.map((color) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
4903
+ props.background ? /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
4904
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Components.Generic.Menu.Label, { children: props.backgroundTitle ?? dict.color_picker.background_title }),
4905
+ COLORS.map((color) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
4619
4906
  Components.Generic.Menu.Item,
4620
4907
  {
4621
4908
  onClick: () => {
@@ -4623,7 +4910,7 @@ function LumirColorPicker(props) {
4623
4910
  props.background.setColor(color);
4624
4911
  },
4625
4912
  "data-test": "background-color-" + color,
4626
- icon: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(ColorIcon, { backgroundColor: color, size: props.iconSize }),
4913
+ icon: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(ColorIcon, { backgroundColor: color, size: props.iconSize }),
4627
4914
  checked: props.background.color === color,
4628
4915
  children: dict.color_picker.colors[color]
4629
4916
  },
@@ -4633,20 +4920,20 @@ function LumirColorPicker(props) {
4633
4920
  ] });
4634
4921
  }
4635
4922
  function LumirColorStyleButton() {
4636
- const Components = (0, import_react28.useComponentsContext)();
4637
- const editor = (0, import_react28.useBlockNoteEditor)();
4923
+ const Components = (0, import_react27.useComponentsContext)();
4924
+ const editor = (0, import_react27.useBlockNoteEditor)();
4638
4925
  const ed = editor;
4639
4926
  const styleSchema = editor.schema.styleSchema;
4640
4927
  const textColorInSchema = styleSchema.textColor?.type === "textColor" && styleSchema.textColor?.propSchema === "string";
4641
4928
  const backgroundColorInSchema = styleSchema.backgroundColor?.type === "backgroundColor" && styleSchema.backgroundColor?.propSchema === "string";
4642
- const selectedBlocks = (0, import_react28.useSelectedBlocks)(editor);
4643
- const [currentTextColor, setCurrentTextColor] = (0, import_react29.useState)(
4929
+ const selectedBlocks = (0, import_react27.useSelectedBlocks)(editor);
4930
+ const [currentTextColor, setCurrentTextColor] = (0, import_react28.useState)(
4644
4931
  textColorInSchema ? ed.getActiveStyles().textColor || "default" : "default"
4645
4932
  );
4646
- const [currentBackgroundColor, setCurrentBackgroundColor] = (0, import_react29.useState)(
4933
+ const [currentBackgroundColor, setCurrentBackgroundColor] = (0, import_react28.useState)(
4647
4934
  backgroundColorInSchema ? ed.getActiveStyles().backgroundColor || "default" : "default"
4648
4935
  );
4649
- (0, import_react28.useEditorContentOrSelectionChange)(() => {
4936
+ (0, import_react27.useEditorContentOrSelectionChange)(() => {
4650
4937
  const active = ed.getActiveStyles();
4651
4938
  if (textColorInSchema) {
4652
4939
  setCurrentTextColor(active.textColor || "default");
@@ -4655,7 +4942,7 @@ function LumirColorStyleButton() {
4655
4942
  setCurrentBackgroundColor(active.backgroundColor || "default");
4656
4943
  }
4657
4944
  }, editor);
4658
- const setTextColor = (0, import_react29.useCallback)(
4945
+ const setTextColor = (0, import_react28.useCallback)(
4659
4946
  (color) => {
4660
4947
  color === "default" ? ed.removeStyles({ textColor: color }) : ed.addStyles({ textColor: color });
4661
4948
  setTimeout(() => editor.focus());
@@ -4663,7 +4950,7 @@ function LumirColorStyleButton() {
4663
4950
  // eslint-disable-next-line react-hooks/exhaustive-deps
4664
4951
  [editor]
4665
4952
  );
4666
- const setBackgroundColor = (0, import_react29.useCallback)(
4953
+ const setBackgroundColor = (0, import_react28.useCallback)(
4667
4954
  (color) => {
4668
4955
  color === "default" ? ed.removeStyles({ backgroundColor: color }) : ed.addStyles({ backgroundColor: color });
4669
4956
  setTimeout(() => editor.focus());
@@ -4671,7 +4958,7 @@ function LumirColorStyleButton() {
4671
4958
  // eslint-disable-next-line react-hooks/exhaustive-deps
4672
4959
  [editor]
4673
4960
  );
4674
- const show = (0, import_react29.useMemo)(() => {
4961
+ const show = (0, import_react28.useMemo)(() => {
4675
4962
  if (!textColorInSchema && !backgroundColorInSchema) {
4676
4963
  return false;
4677
4964
  }
@@ -4686,15 +4973,15 @@ function LumirColorStyleButton() {
4686
4973
  return null;
4687
4974
  }
4688
4975
  const tooltip = "\uD14D\uC2A4\uD2B8 \uC0C9\xB7\uBC30\uACBD";
4689
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Components.Generic.Menu.Root, { children: [
4690
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Components.Generic.Menu.Trigger, { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
4976
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Components.Generic.Menu.Root, { children: [
4977
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Components.Generic.Menu.Trigger, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
4691
4978
  Components.FormattingToolbar.Button,
4692
4979
  {
4693
4980
  className: "bn-button",
4694
4981
  "data-test": "colors",
4695
4982
  label: tooltip,
4696
4983
  mainTooltip: tooltip,
4697
- icon: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
4984
+ icon: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
4698
4985
  ColorIcon,
4699
4986
  {
4700
4987
  textColor: currentTextColor,
@@ -4704,11 +4991,11 @@ function LumirColorStyleButton() {
4704
4991
  )
4705
4992
  }
4706
4993
  ) }),
4707
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
4994
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
4708
4995
  Components.Generic.Menu.Dropdown,
4709
4996
  {
4710
4997
  className: "bn-menu-dropdown bn-color-picker-dropdown",
4711
- children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
4998
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
4712
4999
  LumirColorPicker,
4713
5000
  {
4714
5001
  textTitle: "\uD14D\uC2A4\uD2B8 \uC0C9",
@@ -4722,18 +5009,18 @@ function LumirColorStyleButton() {
4722
5009
  ] });
4723
5010
  }
4724
5011
  function LumirCellColorToolbarButton() {
4725
- const Components = (0, import_react28.useComponentsContext)();
4726
- const editor = (0, import_react28.useBlockNoteEditor)();
4727
- const selectedBlocks = (0, import_react28.useSelectedBlocks)(editor);
4728
- const isMultiCell = (0, import_react29.useMemo)(() => {
5012
+ const Components = (0, import_react27.useComponentsContext)();
5013
+ const editor = (0, import_react27.useBlockNoteEditor)();
5014
+ const selectedBlocks = (0, import_react27.useSelectedBlocks)(editor);
5015
+ const isMultiCell = (0, import_react28.useMemo)(() => {
4729
5016
  if (selectedBlocks.length !== 1 || selectedBlocks[0].type !== "table") {
4730
5017
  return false;
4731
5018
  }
4732
5019
  const cs = editor.tableHandles?.getCellSelection();
4733
5020
  return !!cs && cs.cells.length > 1;
4734
5021
  }, [editor, selectedBlocks]);
4735
- const stashRef = (0, import_react29.useRef)([]);
4736
- const applyBackground = (0, import_react29.useCallback)(
5022
+ const stashRef = (0, import_react28.useRef)([]);
5023
+ const applyBackground = (0, import_react28.useCallback)(
4737
5024
  (color) => {
4738
5025
  const live = getSelectedCellPositions(editor);
4739
5026
  const positions = live.length > 0 ? live : stashRef.current;
@@ -4746,7 +5033,7 @@ function LumirCellColorToolbarButton() {
4746
5033
  return null;
4747
5034
  }
4748
5035
  const tooltip = "\uC140 \uBC30\uACBD\uC0C9";
4749
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
5036
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
4750
5037
  Components.Generic.Menu.Root,
4751
5038
  {
4752
5039
  onOpenChange: (open) => {
@@ -4755,21 +5042,21 @@ function LumirCellColorToolbarButton() {
4755
5042
  }
4756
5043
  },
4757
5044
  children: [
4758
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Components.Generic.Menu.Trigger, { children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
5045
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Components.Generic.Menu.Trigger, { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
4759
5046
  Components.FormattingToolbar.Button,
4760
5047
  {
4761
5048
  className: "bn-button",
4762
5049
  "data-test": "cell-colors",
4763
5050
  label: tooltip,
4764
5051
  mainTooltip: tooltip,
4765
- icon: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(CellFillIcon, { size: 18 })
5052
+ icon: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(CellFillIcon, { size: 18 })
4766
5053
  }
4767
5054
  ) }),
4768
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
5055
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
4769
5056
  Components.Generic.Menu.Dropdown,
4770
5057
  {
4771
5058
  className: "bn-menu-dropdown bn-color-picker-dropdown",
4772
- children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
5059
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
4773
5060
  LumirColorPicker,
4774
5061
  {
4775
5062
  backgroundTitle: "\uC140 \uBC30\uACBD",
@@ -4783,12 +5070,12 @@ function LumirCellColorToolbarButton() {
4783
5070
  );
4784
5071
  }
4785
5072
  function LumirCellColorPickerButton(props) {
4786
- const Components = (0, import_react28.useComponentsContext)();
4787
- const editor = (0, import_react28.useBlockNoteEditor)();
5073
+ const Components = (0, import_react27.useComponentsContext)();
5074
+ const editor = (0, import_react27.useBlockNoteEditor)();
4788
5075
  const updateColor = (color, type) => {
4789
5076
  const newTable = props.block.content.rows.map((row) => ({
4790
5077
  ...row,
4791
- cells: row.cells.map((cell) => (0, import_core9.mapTableCell)(cell))
5078
+ cells: row.cells.map((cell) => (0, import_core11.mapTableCell)(cell))
4792
5079
  }));
4793
5080
  if (type === "text") {
4794
5081
  newTable[props.rowIndex].cells[props.colIndex].props.textColor = color;
@@ -4805,25 +5092,25 @@ function LumirCellColorPickerButton(props) {
4805
5092
  if (!currentCell || editor.settings.tables.cellTextColor === false && editor.settings.tables.cellBackgroundColor === false) {
4806
5093
  return null;
4807
5094
  }
4808
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(Components.Generic.Menu.Root, { position: "right", sub: true, children: [
4809
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Components.Generic.Menu.Trigger, { sub: true, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Components.Generic.Menu.Item, { className: "bn-menu-item", subTrigger: true, children: "\uC140 \uC0C9\xB7\uBC30\uACBD" }) }),
4810
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
5095
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(Components.Generic.Menu.Root, { position: "right", sub: true, children: [
5096
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Components.Generic.Menu.Trigger, { sub: true, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Components.Generic.Menu.Item, { className: "bn-menu-item", subTrigger: true, children: "\uC140 \uC0C9\xB7\uBC30\uACBD" }) }),
5097
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
4811
5098
  Components.Generic.Menu.Dropdown,
4812
5099
  {
4813
5100
  sub: true,
4814
5101
  className: "bn-menu-dropdown bn-color-picker-dropdown",
4815
- children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
5102
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
4816
5103
  LumirColorPicker,
4817
5104
  {
4818
5105
  iconSize: 18,
4819
5106
  textTitle: "\uC140 \uAE00\uC790\uC0C9",
4820
5107
  backgroundTitle: "\uC140 \uBC30\uACBD",
4821
5108
  text: editor.settings.tables.cellTextColor ? {
4822
- color: (0, import_core9.isTableCell)(currentCell) ? currentCell.props.textColor : "default",
5109
+ color: (0, import_core11.isTableCell)(currentCell) ? currentCell.props.textColor : "default",
4823
5110
  setColor: (color) => updateColor(color, "text")
4824
5111
  } : void 0,
4825
5112
  background: editor.settings.tables.cellBackgroundColor ? {
4826
- color: (0, import_core9.isTableCell)(currentCell) ? currentCell.props.backgroundColor : "default",
5113
+ color: (0, import_core11.isTableCell)(currentCell) ? currentCell.props.backgroundColor : "default",
4827
5114
  setColor: (color) => updateColor(color, "background")
4828
5115
  } : void 0
4829
5116
  }
@@ -4833,21 +5120,21 @@ function LumirCellColorPickerButton(props) {
4833
5120
  ] });
4834
5121
  }
4835
5122
  function LumirTableCellMenu(props) {
4836
- const Components = (0, import_react28.useComponentsContext)();
4837
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
5123
+ const Components = (0, import_react27.useComponentsContext)();
5124
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
4838
5125
  Components.Generic.Menu.Dropdown,
4839
5126
  {
4840
5127
  className: "bn-menu-dropdown bn-drag-handle-menu",
4841
- children: props.children || /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
4842
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
4843
- import_react28.SplitButton,
5128
+ children: props.children || /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
5129
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
5130
+ import_react27.SplitButton,
4844
5131
  {
4845
5132
  block: props.block,
4846
5133
  rowIndex: props.rowIndex,
4847
5134
  colIndex: props.colIndex
4848
5135
  }
4849
5136
  ),
4850
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
5137
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
4851
5138
  LumirCellColorPickerButton,
4852
5139
  {
4853
5140
  block: props.block,
@@ -4861,99 +5148,99 @@ function LumirTableCellMenu(props) {
4861
5148
  }
4862
5149
 
4863
5150
  // src/components/CustomFormattingToolbar.tsx
4864
- var import_jsx_runtime24 = require("react/jsx-runtime");
5151
+ var import_jsx_runtime23 = require("react/jsx-runtime");
4865
5152
  var CustomFormattingToolbar = () => {
4866
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react30.FormattingToolbar, { children: [
4867
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.BlockTypeSelect, {}, "blockTypeSelect"),
4868
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.TableCellMergeButton, {}, "tableCellMergeButton"),
4869
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.FileCaptionButton, {}, "fileCaptionButton"),
4870
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.FileReplaceButton, {}, "replaceFileButton"),
4871
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.FileRenameButton, {}, "fileRenameButton"),
4872
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.FileDeleteButton, {}, "fileDeleteButton"),
4873
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.FileDownloadButton, {}, "fileDownloadButton"),
4874
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.FilePreviewButton, {}, "filePreviewButton"),
4875
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.BasicTextStyleButton, { basicTextStyle: "bold" }, "boldStyleButton"),
4876
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
4877
- import_react30.BasicTextStyleButton,
5153
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react29.FormattingToolbar, { children: [
5154
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react29.BlockTypeSelect, {}, "blockTypeSelect"),
5155
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react29.TableCellMergeButton, {}, "tableCellMergeButton"),
5156
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react29.FileCaptionButton, {}, "fileCaptionButton"),
5157
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react29.FileReplaceButton, {}, "replaceFileButton"),
5158
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react29.FileRenameButton, {}, "fileRenameButton"),
5159
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react29.FileDeleteButton, {}, "fileDeleteButton"),
5160
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react29.FileDownloadButton, {}, "fileDownloadButton"),
5161
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react29.FilePreviewButton, {}, "filePreviewButton"),
5162
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react29.BasicTextStyleButton, { basicTextStyle: "bold" }, "boldStyleButton"),
5163
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
5164
+ import_react29.BasicTextStyleButton,
4878
5165
  {
4879
5166
  basicTextStyle: "italic"
4880
5167
  },
4881
5168
  "italicStyleButton"
4882
5169
  ),
4883
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
4884
- import_react30.BasicTextStyleButton,
5170
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
5171
+ import_react29.BasicTextStyleButton,
4885
5172
  {
4886
5173
  basicTextStyle: "underline"
4887
5174
  },
4888
5175
  "underlineStyleButton"
4889
5176
  ),
4890
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
4891
- import_react30.BasicTextStyleButton,
5177
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
5178
+ import_react29.BasicTextStyleButton,
4892
5179
  {
4893
5180
  basicTextStyle: "strike"
4894
5181
  },
4895
5182
  "strikeStyleButton"
4896
5183
  ),
4897
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(TextAlignButtonWithVA, { textAlignment: "left" }, "textAlignLeftButton"),
4898
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
5184
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(TextAlignButtonWithVA, { textAlignment: "left" }, "textAlignLeftButton"),
5185
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
4899
5186
  TextAlignButtonWithVA,
4900
5187
  {
4901
5188
  textAlignment: "center"
4902
5189
  },
4903
5190
  "textAlignCenterButton"
4904
5191
  ),
4905
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(TextAlignButtonWithVA, { textAlignment: "right" }, "textAlignRightButton"),
4906
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
5192
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(TextAlignButtonWithVA, { textAlignment: "right" }, "textAlignRightButton"),
5193
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
4907
5194
  VerticalAlignButton,
4908
5195
  {
4909
5196
  verticalAlignment: "top"
4910
5197
  },
4911
5198
  "verticalAlignTop"
4912
5199
  ),
4913
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
5200
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
4914
5201
  VerticalAlignButton,
4915
5202
  {
4916
5203
  verticalAlignment: "middle"
4917
5204
  },
4918
5205
  "verticalAlignMiddle"
4919
5206
  ),
4920
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
5207
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
4921
5208
  VerticalAlignButton,
4922
5209
  {
4923
5210
  verticalAlignment: "bottom"
4924
5211
  },
4925
5212
  "verticalAlignBottom"
4926
5213
  ),
4927
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(TableAlignButton, { alignment: "left" }, "tableAlignLeft"),
4928
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(TableAlignButton, { alignment: "center" }, "tableAlignCenter"),
4929
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(TableAlignButton, { alignment: "right" }, "tableAlignRight"),
4930
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(FontSizeButton2, {}, "fontSizeButton"),
4931
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(LumirColorStyleButton, {}, "colorStyleButton"),
4932
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(LumirCellColorToolbarButton, {}, "cellColorButton"),
4933
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.NestBlockButton, {}, "nestBlockButton"),
4934
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.UnnestBlockButton, {}, "unnestBlockButton"),
4935
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.CreateLinkButton, {}, "createLinkButton")
5214
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(TableAlignButton, { alignment: "left" }, "tableAlignLeft"),
5215
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(TableAlignButton, { alignment: "center" }, "tableAlignCenter"),
5216
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(TableAlignButton, { alignment: "right" }, "tableAlignRight"),
5217
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(FontSizeButton2, {}, "fontSizeButton"),
5218
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(LumirColorStyleButton, {}, "colorStyleButton"),
5219
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(LumirCellColorToolbarButton, {}, "cellColorButton"),
5220
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react29.NestBlockButton, {}, "nestBlockButton"),
5221
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react29.UnnestBlockButton, {}, "unnestBlockButton"),
5222
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react29.CreateLinkButton, {}, "createLinkButton")
4936
5223
  ] });
4937
5224
  };
4938
5225
 
4939
5226
  // src/components/LumirDragHandleMenu.tsx
4940
- var import_react31 = require("@blocknote/react");
4941
- var import_jsx_runtime25 = require("react/jsx-runtime");
5227
+ var import_react30 = require("@blocknote/react");
5228
+ var import_jsx_runtime24 = require("react/jsx-runtime");
4942
5229
  var TABLE_ALIGN_ICONS = {
4943
- left: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.4", children: [
4944
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("rect", { x: "1.5", y: "4", width: "7", height: "8", rx: "1", fill: "currentColor", stroke: "none" }),
4945
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("line", { x1: "1.5", y1: "1.5", x2: "14.5", y2: "1.5" }),
4946
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("line", { x1: "1.5", y1: "14.5", x2: "14.5", y2: "14.5" })
5230
+ left: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.4", children: [
5231
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("rect", { x: "1.5", y: "4", width: "7", height: "8", rx: "1", fill: "currentColor", stroke: "none" }),
5232
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("line", { x1: "1.5", y1: "1.5", x2: "14.5", y2: "1.5" }),
5233
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("line", { x1: "1.5", y1: "14.5", x2: "14.5", y2: "14.5" })
4947
5234
  ] }),
4948
- center: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.4", children: [
4949
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("rect", { x: "4.5", y: "4", width: "7", height: "8", rx: "1", fill: "currentColor", stroke: "none" }),
4950
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("line", { x1: "1.5", y1: "1.5", x2: "14.5", y2: "1.5" }),
4951
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("line", { x1: "1.5", y1: "14.5", x2: "14.5", y2: "14.5" })
5235
+ center: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.4", children: [
5236
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("rect", { x: "4.5", y: "4", width: "7", height: "8", rx: "1", fill: "currentColor", stroke: "none" }),
5237
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("line", { x1: "1.5", y1: "1.5", x2: "14.5", y2: "1.5" }),
5238
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("line", { x1: "1.5", y1: "14.5", x2: "14.5", y2: "14.5" })
4952
5239
  ] }),
4953
- right: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.4", children: [
4954
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("rect", { x: "7.5", y: "4", width: "7", height: "8", rx: "1", fill: "currentColor", stroke: "none" }),
4955
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("line", { x1: "1.5", y1: "1.5", x2: "14.5", y2: "1.5" }),
4956
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("line", { x1: "1.5", y1: "14.5", x2: "14.5", y2: "14.5" })
5240
+ right: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.4", children: [
5241
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("rect", { x: "7.5", y: "4", width: "7", height: "8", rx: "1", fill: "currentColor", stroke: "none" }),
5242
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("line", { x1: "1.5", y1: "1.5", x2: "14.5", y2: "1.5" }),
5243
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("line", { x1: "1.5", y1: "14.5", x2: "14.5", y2: "14.5" })
4957
5244
  ] })
4958
5245
  };
4959
5246
  var TABLE_ALIGN_LABELS = {
@@ -4962,13 +5249,13 @@ var TABLE_ALIGN_LABELS = {
4962
5249
  right: "\uD45C \uC624\uB978\uCABD \uC815\uB82C"
4963
5250
  };
4964
5251
  function TableAlignmentItems(props) {
4965
- const Components = (0, import_react31.useComponentsContext)();
4966
- const editor = (0, import_react31.useBlockNoteEditor)();
5252
+ const Components = (0, import_react30.useComponentsContext)();
5253
+ const editor = (0, import_react30.useBlockNoteEditor)();
4967
5254
  if (props.block?.type !== "table" || !props.block?.id) {
4968
5255
  return null;
4969
5256
  }
4970
5257
  const current = getTableAlignment(editor, props.block.id);
4971
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_jsx_runtime25.Fragment, { children: ["left", "center", "right"].map((align) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
5258
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_jsx_runtime24.Fragment, { children: ["left", "center", "right"].map((align) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
4972
5259
  Components.Generic.Menu.Item,
4973
5260
  {
4974
5261
  icon: TABLE_ALIGN_ICONS[align],
@@ -4983,39 +5270,39 @@ function TableAlignmentItems(props) {
4983
5270
  )) });
4984
5271
  }
4985
5272
  var LumirDragHandleMenu = (props) => {
4986
- const dict = (0, import_react31.useDictionary)();
4987
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_react31.DragHandleMenu, { ...props, children: [
4988
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react31.RemoveBlockItem, { ...props, children: dict.drag_handle.delete_menuitem }),
4989
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react31.BlockColorsItem, { ...props, children: dict.drag_handle.colors_menuitem }),
4990
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react31.TableRowHeaderItem, { ...props, children: dict.drag_handle.header_row_menuitem }),
4991
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react31.TableColumnHeaderItem, { ...props, children: dict.drag_handle.header_column_menuitem }),
4992
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(TableAlignmentItems, { block: props.block })
5273
+ const dict = (0, import_react30.useDictionary)();
5274
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react30.DragHandleMenu, { ...props, children: [
5275
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.RemoveBlockItem, { ...props, children: dict.drag_handle.delete_menuitem }),
5276
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.BlockColorsItem, { ...props, children: dict.drag_handle.colors_menuitem }),
5277
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.TableRowHeaderItem, { ...props, children: dict.drag_handle.header_row_menuitem }),
5278
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react30.TableColumnHeaderItem, { ...props, children: dict.drag_handle.header_column_menuitem }),
5279
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(TableAlignmentItems, { block: props.block })
4993
5280
  ] });
4994
5281
  };
4995
5282
 
4996
5283
  // src/components/LumirTableHandlesController.tsx
4997
- var import_react34 = require("@blocknote/react");
4998
- var import_react35 = require("@floating-ui/react");
4999
- var import_react36 = require("react");
5284
+ var import_react33 = require("@blocknote/react");
5285
+ var import_react34 = require("@floating-ui/react");
5286
+ var import_react35 = require("react");
5000
5287
 
5001
5288
  // src/components/hooks/useFocusedCellHandlePositioning.ts
5002
- var import_react32 = require("@floating-ui/react");
5003
- var import_react33 = require("react");
5289
+ var import_react31 = require("@floating-ui/react");
5290
+ var import_react32 = require("react");
5004
5291
  function useFocusedCellHandlePositioning(cellEl, tbodyEl, orientation, show) {
5005
- const { refs, floatingStyles, context, update } = (0, import_react32.useFloating)({
5292
+ const { refs, floatingStyles, context, update } = (0, import_react31.useFloating)({
5006
5293
  open: show,
5007
5294
  placement: orientation === "row" ? "left" : orientation === "col" ? "top" : orientation === "corner" ? "bottom-start" : "right",
5008
5295
  // col/row/cell: 가장자리에 14px hit-area 중앙 정렬(-7).
5009
5296
  // corner: 18px hit-zone이 표 우하단 모서리에 걸치도록 위/좌로 살짝 당김(모서리 hover 자연).
5010
5297
  middleware: [
5011
- (0, import_react32.offset)(
5298
+ (0, import_react31.offset)(
5012
5299
  orientation === "corner" ? { mainAxis: -6, crossAxis: -6 } : -7
5013
5300
  )
5014
5301
  ],
5015
- whileElementsMounted: import_react32.autoUpdate
5302
+ whileElementsMounted: import_react31.autoUpdate
5016
5303
  });
5017
- const { isMounted, styles } = (0, import_react32.useTransitionStyles)(context);
5018
- (0, import_react33.useEffect)(() => {
5304
+ const { isMounted, styles } = (0, import_react31.useTransitionStyles)(context);
5305
+ (0, import_react32.useEffect)(() => {
5019
5306
  if (!show || !tbodyEl) {
5020
5307
  return;
5021
5308
  }
@@ -5023,7 +5310,7 @@ function useFocusedCellHandlePositioning(cellEl, tbodyEl, orientation, show) {
5023
5310
  ro.observe(tbodyEl);
5024
5311
  return () => ro.disconnect();
5025
5312
  }, [show, tbodyEl, update]);
5026
- (0, import_react33.useEffect)(() => {
5313
+ (0, import_react32.useEffect)(() => {
5027
5314
  if (!cellEl) {
5028
5315
  refs.setReference(null);
5029
5316
  return;
@@ -5046,7 +5333,7 @@ function useFocusedCellHandlePositioning(cellEl, tbodyEl, orientation, show) {
5046
5333
  }
5047
5334
  });
5048
5335
  }, [cellEl, tbodyEl, orientation, refs]);
5049
- return (0, import_react33.useMemo)(
5336
+ return (0, import_react32.useMemo)(
5050
5337
  () => ({
5051
5338
  isMounted,
5052
5339
  ref: refs.setFloating,
@@ -5060,15 +5347,15 @@ function useFocusedCellHandlePositioning(cellEl, tbodyEl, orientation, show) {
5060
5347
  );
5061
5348
  }
5062
5349
  function useTableCornerPositioning(referencePosTable, show) {
5063
- const { refs, floatingStyles, context } = (0, import_react32.useFloating)({
5350
+ const { refs, floatingStyles, context } = (0, import_react31.useFloating)({
5064
5351
  open: show,
5065
5352
  placement: "bottom-start",
5066
5353
  // 18px hit-zone을 모서리에서 안쪽(위/좌)으로 당겨 표 위에 걸치게 한다.
5067
- middleware: [(0, import_react32.offset)({ mainAxis: -12, crossAxis: -12 })],
5068
- whileElementsMounted: import_react32.autoUpdate
5354
+ middleware: [(0, import_react31.offset)({ mainAxis: -12, crossAxis: -12 })],
5355
+ whileElementsMounted: import_react31.autoUpdate
5069
5356
  });
5070
- const { isMounted, styles } = (0, import_react32.useTransitionStyles)(context);
5071
- (0, import_react33.useEffect)(() => {
5357
+ const { isMounted, styles } = (0, import_react31.useTransitionStyles)(context);
5358
+ (0, import_react32.useEffect)(() => {
5072
5359
  if (!referencePosTable) {
5073
5360
  refs.setReference(null);
5074
5361
  return;
@@ -5077,7 +5364,7 @@ function useTableCornerPositioning(referencePosTable, show) {
5077
5364
  getBoundingClientRect: () => new DOMRect(referencePosTable.right, referencePosTable.bottom, 0, 0)
5078
5365
  });
5079
5366
  }, [referencePosTable, refs]);
5080
- return (0, import_react33.useMemo)(
5367
+ return (0, import_react32.useMemo)(
5081
5368
  () => ({
5082
5369
  isMounted,
5083
5370
  ref: refs.setFloating,
@@ -5088,7 +5375,7 @@ function useTableCornerPositioning(referencePosTable, show) {
5088
5375
  }
5089
5376
 
5090
5377
  // src/components/LumirTableHandlesController.tsx
5091
- var import_jsx_runtime26 = require("react/jsx-runtime");
5378
+ var import_jsx_runtime25 = require("react/jsx-runtime");
5092
5379
  function syncCoreHoverToFocusedCell(cellEl) {
5093
5380
  const r = cellEl.getBoundingClientRect();
5094
5381
  cellEl.dispatchEvent(
@@ -5102,18 +5389,18 @@ function syncCoreHoverToFocusedCell(cellEl) {
5102
5389
  );
5103
5390
  }
5104
5391
  function LumirTableHandlesController() {
5105
- const editor = (0, import_react34.useBlockNoteEditor)();
5106
- const [focused, setFocused] = (0, import_react36.useState)(null);
5107
- const [menuContainerRef, setMenuContainerRef] = (0, import_react36.useState)(null);
5108
- const [overlayEl, setOverlayEl] = (0, import_react36.useState)(null);
5109
- const [openMenu, setOpenMenu] = (0, import_react36.useState)(null);
5110
- const frozenRef = (0, import_react36.useRef)(false);
5111
- const menuOpenRef = (0, import_react36.useRef)(false);
5112
- const draggingRef = (0, import_react36.useRef)(false);
5113
- (0, import_react36.useEffect)(() => {
5392
+ const editor = (0, import_react33.useBlockNoteEditor)();
5393
+ const [focused, setFocused] = (0, import_react35.useState)(null);
5394
+ const [menuContainerRef, setMenuContainerRef] = (0, import_react35.useState)(null);
5395
+ const [overlayEl, setOverlayEl] = (0, import_react35.useState)(null);
5396
+ const [openMenu, setOpenMenu] = (0, import_react35.useState)(null);
5397
+ const frozenRef = (0, import_react35.useRef)(false);
5398
+ const menuOpenRef = (0, import_react35.useRef)(false);
5399
+ const draggingRef = (0, import_react35.useRef)(false);
5400
+ (0, import_react35.useEffect)(() => {
5114
5401
  editor.__lumirActiveTableId = focused?.block?.id ?? null;
5115
5402
  }, [editor, focused]);
5116
- const recompute = (0, import_react36.useCallback)(() => {
5403
+ const recompute = (0, import_react35.useCallback)(() => {
5117
5404
  if (frozenRef.current) {
5118
5405
  return;
5119
5406
  }
@@ -5161,11 +5448,11 @@ function LumirTableHandlesController() {
5161
5448
  widgetContainer
5162
5449
  });
5163
5450
  }, [editor]);
5164
- (0, import_react34.useEditorContentOrSelectionChange)(recompute, editor);
5165
- (0, import_react36.useEffect)(() => {
5451
+ (0, import_react33.useEditorContentOrSelectionChange)(recompute, editor);
5452
+ (0, import_react35.useEffect)(() => {
5166
5453
  recompute();
5167
5454
  }, [recompute]);
5168
- (0, import_react36.useEffect)(() => {
5455
+ (0, import_react35.useEffect)(() => {
5169
5456
  const onUp = () => {
5170
5457
  requestAnimationFrame(() => {
5171
5458
  if (!menuOpenRef.current && !draggingRef.current && frozenRef.current) {
@@ -5177,7 +5464,7 @@ function LumirTableHandlesController() {
5177
5464
  window.addEventListener("pointerup", onUp);
5178
5465
  return () => window.removeEventListener("pointerup", onUp);
5179
5466
  }, [recompute]);
5180
- (0, import_react36.useEffect)(() => {
5467
+ (0, import_react35.useEffect)(() => {
5181
5468
  const f = focused;
5182
5469
  if (!f || !overlayEl) {
5183
5470
  return;
@@ -5202,7 +5489,7 @@ function LumirTableHandlesController() {
5202
5489
  overlayEl.style.height = `${bottom - top}px`;
5203
5490
  };
5204
5491
  update();
5205
- const stopAutoUpdate = (0, import_react35.autoUpdate)(f.cellEl, overlayEl, update);
5492
+ const stopAutoUpdate = (0, import_react34.autoUpdate)(f.cellEl, overlayEl, update);
5206
5493
  const ro = new ResizeObserver(update);
5207
5494
  ro.observe(f.tbodyEl);
5208
5495
  return () => {
@@ -5222,25 +5509,25 @@ function LumirTableHandlesController() {
5222
5509
  show
5223
5510
  );
5224
5511
  const th = editor.tableHandles;
5225
- const coreState = (0, import_react34.useUIPluginState)(
5512
+ const coreState = (0, import_react33.useUIPluginState)(
5226
5513
  editor.tableHandles.onUpdate.bind(editor.tableHandles)
5227
5514
  );
5228
- const { addOrRemoveColumnsButton, addOrRemoveRowsButton } = (0, import_react34.useExtendButtonsPositioning)(
5515
+ const { addOrRemoveColumnsButton, addOrRemoveRowsButton } = (0, import_react33.useExtendButtonsPositioning)(
5229
5516
  coreState?.showAddOrRemoveColumnsButton || false,
5230
5517
  coreState?.showAddOrRemoveRowsButton || false,
5231
5518
  coreState?.referencePosTable || null
5232
5519
  );
5233
- const onStartExtend = (0, import_react36.useCallback)(() => {
5520
+ const onStartExtend = (0, import_react35.useCallback)(() => {
5234
5521
  editor.tableHandles?.freezeHandles();
5235
5522
  }, [editor]);
5236
- const onEndExtend = (0, import_react36.useCallback)(() => {
5523
+ const onEndExtend = (0, import_react35.useCallback)(() => {
5237
5524
  editor.tableHandles?.unfreezeHandles();
5238
5525
  }, [editor]);
5239
5526
  const tableCorner = useTableCornerPositioning(
5240
5527
  coreState?.referencePosTable ?? null,
5241
5528
  !!coreState?.widgetContainer
5242
5529
  );
5243
- const menuHandlers = (0, import_react36.useMemo)(() => {
5530
+ const menuHandlers = (0, import_react35.useMemo)(() => {
5244
5531
  const mk = (kind) => ({
5245
5532
  freeze: () => {
5246
5533
  menuOpenRef.current = true;
@@ -5258,10 +5545,10 @@ function LumirTableHandlesController() {
5258
5545
  });
5259
5546
  return { col: mk("col"), row: mk("row"), cell: mk("cell") };
5260
5547
  }, [editor, recompute]);
5261
- const onGutterPointerDown = (0, import_react36.useCallback)(() => {
5548
+ const onGutterPointerDown = (0, import_react35.useCallback)(() => {
5262
5549
  frozenRef.current = true;
5263
5550
  }, []);
5264
- const onGutterPointerEnter = (0, import_react36.useCallback)(
5551
+ const onGutterPointerEnter = (0, import_react35.useCallback)(
5265
5552
  (e) => {
5266
5553
  if (e.buttons === 0 && focused) {
5267
5554
  syncCoreHoverToFocusedCell(focused.cellEl);
@@ -5269,7 +5556,7 @@ function LumirTableHandlesController() {
5269
5556
  },
5270
5557
  [focused]
5271
5558
  );
5272
- const makeDragStart = (0, import_react36.useCallback)(
5559
+ const makeDragStart = (0, import_react35.useCallback)(
5273
5560
  (dir) => (e) => {
5274
5561
  draggingRef.current = true;
5275
5562
  frozenRef.current = true;
@@ -5281,15 +5568,15 @@ function LumirTableHandlesController() {
5281
5568
  },
5282
5569
  [editor]
5283
5570
  );
5284
- const onDragEnd = (0, import_react36.useCallback)(() => {
5571
+ const onDragEnd = (0, import_react35.useCallback)(() => {
5285
5572
  editor.tableHandles?.dragEnd();
5286
5573
  draggingRef.current = false;
5287
5574
  frozenRef.current = false;
5288
5575
  recompute();
5289
5576
  }, [editor, recompute]);
5290
- const noop = (0, import_react36.useCallback)(() => {
5577
+ const noop = (0, import_react35.useCallback)(() => {
5291
5578
  }, []);
5292
- const onScaleStart = (0, import_react36.useCallback)(
5579
+ const onScaleStart = (0, import_react35.useCallback)(
5293
5580
  (e) => {
5294
5581
  e.preventDefault();
5295
5582
  e.stopPropagation();
@@ -5331,11 +5618,11 @@ function LumirTableHandlesController() {
5331
5618
  },
5332
5619
  [editor, coreState]
5333
5620
  );
5334
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
5335
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { ref: setMenuContainerRef }),
5336
- th && focused && menuContainerRef && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_react35.FloatingPortal, { root: focused.widgetContainer, children: [
5337
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { ref: setOverlayEl, className: "lumir-tbl-cell-focus" }),
5338
- colHandle.isMounted && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
5621
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
5622
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { ref: setMenuContainerRef }),
5623
+ th && focused && menuContainerRef && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_react34.FloatingPortal, { root: focused.widgetContainer, children: [
5624
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { ref: setOverlayEl, className: "lumir-tbl-cell-focus" }),
5625
+ colHandle.isMounted && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
5339
5626
  "div",
5340
5627
  {
5341
5628
  ref: colHandle.ref,
@@ -5344,9 +5631,9 @@ function LumirTableHandlesController() {
5344
5631
  onPointerEnter: onGutterPointerEnter,
5345
5632
  onPointerDown: onGutterPointerDown,
5346
5633
  children: [
5347
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "lumir-tbl-gutter" }),
5348
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "lumir-tbl-grip", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
5349
- import_react34.TableHandle,
5634
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "lumir-tbl-gutter" }),
5635
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "lumir-tbl-grip", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
5636
+ import_react33.TableHandle,
5350
5637
  {
5351
5638
  editor,
5352
5639
  orientation: "column",
@@ -5364,7 +5651,7 @@ function LumirTableHandlesController() {
5364
5651
  ]
5365
5652
  }
5366
5653
  ),
5367
- rowHandle.isMounted && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
5654
+ rowHandle.isMounted && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
5368
5655
  "div",
5369
5656
  {
5370
5657
  ref: rowHandle.ref,
@@ -5373,9 +5660,9 @@ function LumirTableHandlesController() {
5373
5660
  onPointerEnter: onGutterPointerEnter,
5374
5661
  onPointerDown: onGutterPointerDown,
5375
5662
  children: [
5376
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "lumir-tbl-gutter" }),
5377
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "lumir-tbl-grip", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
5378
- import_react34.TableHandle,
5663
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "lumir-tbl-gutter" }),
5664
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "lumir-tbl-grip", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
5665
+ import_react33.TableHandle,
5379
5666
  {
5380
5667
  editor,
5381
5668
  orientation: "row",
@@ -5393,7 +5680,7 @@ function LumirTableHandlesController() {
5393
5680
  ]
5394
5681
  }
5395
5682
  ),
5396
- cellHandle.isMounted && openMenu !== "col" && openMenu !== "row" && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
5683
+ cellHandle.isMounted && openMenu !== "col" && openMenu !== "row" && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
5397
5684
  "div",
5398
5685
  {
5399
5686
  ref: cellHandle.ref,
@@ -5401,9 +5688,9 @@ function LumirTableHandlesController() {
5401
5688
  className: "lumir-tbl-gutter-wrap lumir-tbl-gutter-wrap--cell" + (openMenu === "cell" ? " lumir-tbl-gutter-wrap--active" : ""),
5402
5689
  onPointerDown: onGutterPointerDown,
5403
5690
  children: [
5404
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "lumir-tbl-gutter" }),
5405
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "lumir-tbl-grip", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
5406
- import_react34.TableCellButton,
5691
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "lumir-tbl-gutter" }),
5692
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "lumir-tbl-grip", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
5693
+ import_react33.TableCellButton,
5407
5694
  {
5408
5695
  editor,
5409
5696
  rowIndex: focused.rowIndex,
@@ -5419,9 +5706,9 @@ function LumirTableHandlesController() {
5419
5706
  }
5420
5707
  )
5421
5708
  ] }),
5422
- th && coreState?.widgetContainer && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_react35.FloatingPortal, { root: coreState.widgetContainer, children: [
5423
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { ref: addOrRemoveRowsButton.ref, style: addOrRemoveRowsButton.style, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
5424
- import_react34.ExtendButton,
5709
+ th && coreState?.widgetContainer && /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_react34.FloatingPortal, { root: coreState.widgetContainer, children: [
5710
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { ref: addOrRemoveRowsButton.ref, style: addOrRemoveRowsButton.style, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
5711
+ import_react33.ExtendButton,
5425
5712
  {
5426
5713
  editor,
5427
5714
  orientation: "addOrRemoveRows",
@@ -5430,13 +5717,13 @@ function LumirTableHandlesController() {
5430
5717
  onMouseUp: onEndExtend
5431
5718
  }
5432
5719
  ) }),
5433
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
5720
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
5434
5721
  "div",
5435
5722
  {
5436
5723
  ref: addOrRemoveColumnsButton.ref,
5437
5724
  style: addOrRemoveColumnsButton.style,
5438
- children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
5439
- import_react34.ExtendButton,
5725
+ children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
5726
+ import_react33.ExtendButton,
5440
5727
  {
5441
5728
  editor,
5442
5729
  orientation: "addOrRemoveColumns",
@@ -5447,7 +5734,7 @@ function LumirTableHandlesController() {
5447
5734
  )
5448
5735
  }
5449
5736
  ),
5450
- tableCorner.isMounted && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
5737
+ tableCorner.isMounted && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
5451
5738
  "div",
5452
5739
  {
5453
5740
  ref: tableCorner.ref,
@@ -6200,7 +6487,7 @@ function applyFittedWidthsToNewTables(editor, beforeIds, perTable) {
6200
6487
  }
6201
6488
 
6202
6489
  // src/components/LumirEditor.tsx
6203
- var import_jsx_runtime27 = require("react/jsx-runtime");
6490
+ var import_jsx_runtime26 = require("react/jsx-runtime");
6204
6491
  var DEBUG_LOG = (loc, msg, data) => {
6205
6492
  const p = fetch("http://127.0.0.1:7686/ingest/1f8ee1c5-0cf0-4ae7-91ed-5ea7ed17130a", {
6206
6493
  method: "POST",
@@ -6431,9 +6718,9 @@ var findBlockWithLink = (blocks, targetUrl) => {
6431
6718
  return null;
6432
6719
  };
6433
6720
  var ConvertToPreviewButton = ({ url }) => {
6434
- const editor = (0, import_react38.useBlockNoteEditor)();
6435
- const Components = (0, import_react38.useComponentsContext)();
6436
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
6721
+ const editor = (0, import_react37.useBlockNoteEditor)();
6722
+ const Components = (0, import_react37.useComponentsContext)();
6723
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
6437
6724
  Components.LinkToolbar.Button,
6438
6725
  {
6439
6726
  className: "bn-button",
@@ -6452,29 +6739,29 @@ var ConvertToPreviewButton = ({ url }) => {
6452
6739
  console.error("Convert to link preview failed:", err);
6453
6740
  }
6454
6741
  },
6455
- icon: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
6456
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("rect", { x: "1", y: "3", width: "14", height: "10", rx: "2", stroke: "currentColor", strokeWidth: "1.5", fill: "none" }),
6457
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("line", { x1: "1", y1: "9", x2: "15", y2: "9", stroke: "currentColor", strokeWidth: "1.5" }),
6458
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("circle", { cx: "5", cy: "6.5", r: "1.5", stroke: "currentColor", strokeWidth: "1", fill: "none" })
6742
+ icon: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
6743
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("rect", { x: "1", y: "3", width: "14", height: "10", rx: "2", stroke: "currentColor", strokeWidth: "1.5", fill: "none" }),
6744
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("line", { x1: "1", y1: "9", x2: "15", y2: "9", stroke: "currentColor", strokeWidth: "1.5" }),
6745
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("circle", { cx: "5", cy: "6.5", r: "1.5", stroke: "currentColor", strokeWidth: "1", fill: "none" })
6459
6746
  ] })
6460
6747
  }
6461
6748
  );
6462
6749
  };
6463
6750
  var CustomLinkToolbar = (props) => {
6464
- const editor = (0, import_react38.useBlockNoteEditor)();
6465
- const Components = (0, import_react38.useComponentsContext)();
6751
+ const editor = (0, import_react37.useBlockNoteEditor)();
6752
+ const Components = (0, import_react37.useComponentsContext)();
6466
6753
  const hasLinkPreview = !!editor?._linkPreviewApiEndpoint;
6467
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
6754
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
6468
6755
  Components.LinkToolbar.Root,
6469
6756
  {
6470
6757
  className: "bn-toolbar bn-link-toolbar",
6471
6758
  onMouseEnter: props.stopHideTimer,
6472
6759
  onMouseLeave: props.startHideTimer,
6473
6760
  children: [
6474
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react38.EditLinkButton, { url: props.url, text: props.text, editLink: props.editLink }),
6475
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react38.OpenLinkButton, { url: props.url }),
6476
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react38.DeleteLinkButton, { deleteLink: props.deleteLink }),
6477
- hasLinkPreview && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ConvertToPreviewButton, { url: props.url })
6761
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react37.EditLinkButton, { url: props.url, text: props.text, editLink: props.editLink }),
6762
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react37.OpenLinkButton, { url: props.url }),
6763
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react37.DeleteLinkButton, { deleteLink: props.deleteLink }),
6764
+ hasLinkPreview && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ConvertToPreviewButton, { url: props.url })
6478
6765
  ]
6479
6766
  }
6480
6767
  );
@@ -6519,13 +6806,13 @@ function LumirEditor({
6519
6806
  onError,
6520
6807
  onImageDelete
6521
6808
  }) {
6522
- const [isUploading, setIsUploading] = (0, import_react37.useState)(false);
6523
- const [uploadProgress, setUploadProgress] = (0, import_react37.useState)(null);
6524
- const [errorMessage, setErrorMessage] = (0, import_react37.useState)(null);
6525
- const floatingMenuFileInputRef = (0, import_react37.useRef)(null);
6526
- const floatingMenuBlockRef = (0, import_react37.useRef)(null);
6527
- const floatingMenuUploadStartTimeRef = (0, import_react37.useRef)(0);
6528
- const handleError = (0, import_react37.useCallback)(
6809
+ const [isUploading, setIsUploading] = (0, import_react36.useState)(false);
6810
+ const [uploadProgress, setUploadProgress] = (0, import_react36.useState)(null);
6811
+ const [errorMessage, setErrorMessage] = (0, import_react36.useState)(null);
6812
+ const floatingMenuFileInputRef = (0, import_react36.useRef)(null);
6813
+ const floatingMenuBlockRef = (0, import_react36.useRef)(null);
6814
+ const floatingMenuUploadStartTimeRef = (0, import_react36.useRef)(0);
6815
+ const handleError = (0, import_react36.useCallback)(
6529
6816
  (error) => {
6530
6817
  onError?.(error);
6531
6818
  setErrorMessage(error.getUserMessage());
@@ -6533,12 +6820,12 @@ function LumirEditor({
6533
6820
  },
6534
6821
  [onError]
6535
6822
  );
6536
- const validatedContent = (0, import_react37.useMemo)(() => {
6823
+ const validatedContent = (0, import_react36.useMemo)(() => {
6537
6824
  return liftFontSize(
6538
6825
  ContentUtils.validateContent(initialContent, initialEmptyBlocks)
6539
6826
  );
6540
6827
  }, [initialContent, initialEmptyBlocks]);
6541
- const tableConfig = (0, import_react37.useMemo)(() => {
6828
+ const tableConfig = (0, import_react36.useMemo)(() => {
6542
6829
  return EditorConfig.getDefaultTableConfig(tables);
6543
6830
  }, [
6544
6831
  tables?.splitCells,
@@ -6546,10 +6833,10 @@ function LumirEditor({
6546
6833
  tables?.cellTextColor,
6547
6834
  tables?.headers
6548
6835
  ]);
6549
- const headingConfig = (0, import_react37.useMemo)(() => {
6836
+ const headingConfig = (0, import_react36.useMemo)(() => {
6550
6837
  return EditorConfig.getDefaultHeadingConfig(heading);
6551
6838
  }, [heading?.levels?.join(",") ?? ""]);
6552
- const disabledExtensions = (0, import_react37.useMemo)(() => {
6839
+ const disabledExtensions = (0, import_react36.useMemo)(() => {
6553
6840
  return EditorConfig.getDisabledExtensions(
6554
6841
  disableExtensions,
6555
6842
  allowVideoUpload,
@@ -6557,18 +6844,18 @@ function LumirEditor({
6557
6844
  allowFileUpload
6558
6845
  );
6559
6846
  }, [disableExtensions, allowVideoUpload, allowAudioUpload, allowFileUpload]);
6560
- (0, import_react37.useEffect)(() => {
6847
+ (0, import_react36.useEffect)(() => {
6561
6848
  DEBUG_LOG("LumirEditor:init:disabledExtensions", "snapshot", {
6562
6849
  allowVideoUpload,
6563
6850
  hasVideoInDisabled: disabledExtensions.includes("video"),
6564
6851
  disabledList: disabledExtensions.slice(0, 15)
6565
6852
  });
6566
6853
  }, [allowVideoUpload, disabledExtensions]);
6567
- const fileNameTransformRef = (0, import_react37.useRef)(s3Upload?.fileNameTransform);
6568
- (0, import_react37.useEffect)(() => {
6854
+ const fileNameTransformRef = (0, import_react36.useRef)(s3Upload?.fileNameTransform);
6855
+ (0, import_react36.useEffect)(() => {
6569
6856
  fileNameTransformRef.current = s3Upload?.fileNameTransform;
6570
6857
  }, [s3Upload?.fileNameTransform]);
6571
- const memoizedS3Upload = (0, import_react37.useMemo)(() => {
6858
+ const memoizedS3Upload = (0, import_react36.useMemo)(() => {
6572
6859
  if (!s3Upload) return void 0;
6573
6860
  return {
6574
6861
  apiEndpoint: s3Upload.apiEndpoint,
@@ -6597,7 +6884,7 @@ function LumirEditor({
6597
6884
  s3Upload?.maxRetries,
6598
6885
  s3Upload?.onProgress
6599
6886
  ]);
6600
- const editor = (0, import_react38.useCreateBlockNote)(
6887
+ const editor = (0, import_react37.useCreateBlockNote)(
6601
6888
  {
6602
6889
  // HTML 미리보기 블록이 포함된 커스텀 스키마 사용
6603
6890
  schema,
@@ -6627,7 +6914,9 @@ function LumirEditor({
6627
6914
  // 표 블록 정렬(좌/가운데/우) attr.
6628
6915
  TableAlignmentExtension,
6629
6916
  // 셀 포커스 시 Ctrl/Cmd+A → 표 전체 선택.
6630
- TableSelectAllExtension
6917
+ TableSelectAllExtension,
6918
+ // blur 상태(툴바 드롭다운 조작 등)에서도 텍스트 선택 하이라이트 유지.
6919
+ InactiveSelectionExtension
6631
6920
  ]
6632
6921
  },
6633
6922
  placeholders: placeholder ? { default: placeholder, emptyDocument: placeholder } : void 0,
@@ -6828,12 +7117,12 @@ function LumirEditor({
6828
7117
  } catch {
6829
7118
  }
6830
7119
  }
6831
- (0, import_react37.useEffect)(() => {
7120
+ (0, import_react36.useEffect)(() => {
6832
7121
  if (editor) {
6833
7122
  editor.isEditable = editable;
6834
7123
  }
6835
7124
  }, [editor, editable]);
6836
- (0, import_react37.useEffect)(() => {
7125
+ (0, import_react36.useEffect)(() => {
6837
7126
  if (!editor) return;
6838
7127
  const th = editor.tableHandles;
6839
7128
  if (!th || th.__lumirColDelPatched || typeof th.removeRowOrColumn !== "function")
@@ -6845,7 +7134,7 @@ function LumirEditor({
6845
7134
  };
6846
7135
  th.__lumirColDelPatched = true;
6847
7136
  }, [editor]);
6848
- (0, import_react37.useEffect)(() => {
7137
+ (0, import_react36.useEffect)(() => {
6849
7138
  if (!editor || !floatingMenu) return;
6850
7139
  const ft = editor.formattingToolbar;
6851
7140
  if (!ft?.onUpdate) return;
@@ -6858,7 +7147,7 @@ function LumirEditor({
6858
7147
  });
6859
7148
  return unsubscribe;
6860
7149
  }, [editor, floatingMenu]);
6861
- (0, import_react37.useEffect)(() => {
7150
+ (0, import_react36.useEffect)(() => {
6862
7151
  if (!editor || !onContentChange) return;
6863
7152
  const handleContentChange = () => {
6864
7153
  const blocks = editor.topLevelBlocks;
@@ -6875,13 +7164,13 @@ function LumirEditor({
6875
7164
  };
6876
7165
  return editor.onEditorContentChange(handleContentChange);
6877
7166
  }, [editor, onContentChange]);
6878
- const previousMediaUrlsRef = (0, import_react37.useRef)(/* @__PURE__ */ new Set());
6879
- (0, import_react37.useEffect)(() => {
7167
+ const previousMediaUrlsRef = (0, import_react36.useRef)(/* @__PURE__ */ new Set());
7168
+ (0, import_react36.useEffect)(() => {
6880
7169
  if (!editor) return;
6881
7170
  const initialBlocks = editor.topLevelBlocks;
6882
7171
  previousMediaUrlsRef.current = extractMediaUrls(initialBlocks);
6883
7172
  }, [editor]);
6884
- (0, import_react37.useEffect)(() => {
7173
+ (0, import_react36.useEffect)(() => {
6885
7174
  if (!editor || !onImageDelete) return;
6886
7175
  const handleMediaDeleteCheck = () => {
6887
7176
  const currentBlocks = editor.topLevelBlocks;
@@ -6895,7 +7184,7 @@ function LumirEditor({
6895
7184
  };
6896
7185
  return editor.onEditorContentChange(handleMediaDeleteCheck);
6897
7186
  }, [editor, onImageDelete]);
6898
- (0, import_react37.useEffect)(() => {
7187
+ (0, import_react36.useEffect)(() => {
6899
7188
  const el = editor?.domElement;
6900
7189
  if (!el) return;
6901
7190
  const handleDragOver = (e) => {
@@ -7026,13 +7315,13 @@ function LumirEditor({
7026
7315
  el.removeEventListener("drop", handleDrop, { capture: true });
7027
7316
  };
7028
7317
  }, [editor, allowVideoUpload]);
7029
- const computedSideMenu = (0, import_react37.useMemo)(() => {
7318
+ const computedSideMenu = (0, import_react36.useMemo)(() => {
7030
7319
  return sideMenuAddButton ? sideMenu : false;
7031
7320
  }, [sideMenuAddButton, sideMenu]);
7032
- const DragHandleOnlySideMenu = (0, import_react37.useMemo)(() => {
7033
- return (props) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react38.SideMenu, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react38.DragHandleButton, { ...props, dragHandleMenu: LumirDragHandleMenu }) });
7321
+ const DragHandleOnlySideMenu = (0, import_react36.useMemo)(() => {
7322
+ return (props) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react37.SideMenu, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react37.DragHandleButton, { ...props, dragHandleMenu: LumirDragHandleMenu }) });
7034
7323
  }, []);
7035
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
7324
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
7036
7325
  "div",
7037
7326
  {
7038
7327
  className: cn(
@@ -7042,8 +7331,8 @@ function LumirEditor({
7042
7331
  ),
7043
7332
  style: { position: "relative", display: "flex", flexDirection: "column" },
7044
7333
  children: [
7045
- floatingMenu && editor && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
7046
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
7334
+ floatingMenu && editor && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
7335
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
7047
7336
  "input",
7048
7337
  {
7049
7338
  ref: floatingMenuFileInputRef,
@@ -7114,7 +7403,7 @@ function LumirEditor({
7114
7403
  }
7115
7404
  }
7116
7405
  ),
7117
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
7406
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
7118
7407
  FloatingMenu,
7119
7408
  {
7120
7409
  editor,
@@ -7146,7 +7435,7 @@ function LumirEditor({
7146
7435
  }
7147
7436
  )
7148
7437
  ] }),
7149
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
7438
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
7150
7439
  import_mantine.BlockNoteView,
7151
7440
  {
7152
7441
  editor,
@@ -7161,21 +7450,21 @@ function LumirEditor({
7161
7450
  tableHandles: false,
7162
7451
  onSelectionChange,
7163
7452
  children: [
7164
- tableHandles && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(LumirTableHandlesController, {}),
7165
- formattingToolbar && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
7166
- import_react38.FormattingToolbarController,
7453
+ tableHandles && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(LumirTableHandlesController, {}),
7454
+ formattingToolbar && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
7455
+ import_react37.FormattingToolbarController,
7167
7456
  {
7168
7457
  formattingToolbar: CustomFormattingToolbar
7169
7458
  }
7170
7459
  ),
7171
- linkToolbar && (linkPreview?.apiEndpoint ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react38.LinkToolbarController, { linkToolbar: CustomLinkToolbar }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react38.LinkToolbarController, {})),
7172
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
7173
- import_react38.SuggestionMenuController,
7460
+ linkToolbar && (linkPreview?.apiEndpoint ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react37.LinkToolbarController, { linkToolbar: CustomLinkToolbar }) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react37.LinkToolbarController, {})),
7461
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
7462
+ import_react37.SuggestionMenuController,
7174
7463
  {
7175
7464
  triggerCharacter: "/",
7176
- getItems: (0, import_react37.useCallback)(
7465
+ getItems: (0, import_react36.useCallback)(
7177
7466
  async (query) => {
7178
- const items = (0, import_react38.getDefaultReactSlashMenuItems)(editor);
7467
+ const items = (0, import_react37.getDefaultReactSlashMenuItems)(editor);
7179
7468
  const filtered = items.filter((item) => {
7180
7469
  const key = (item?.key || "").toString().toLowerCase();
7181
7470
  const title = (item?.title || "").toString().toLowerCase();
@@ -7217,7 +7506,7 @@ function LumirEditor({
7217
7506
  },
7218
7507
  aliases: ["html", "preview", "\uC6F9", "\uC6F9\uD398\uC774\uC9C0"],
7219
7508
  group: "Embeds",
7220
- icon: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
7509
+ icon: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
7221
7510
  "svg",
7222
7511
  {
7223
7512
  width: "18",
@@ -7229,14 +7518,14 @@ function LumirEditor({
7229
7518
  strokeLinecap: "round",
7230
7519
  strokeLinejoin: "round",
7231
7520
  children: [
7232
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("polyline", { points: "16 18 22 12 16 6" }),
7233
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("polyline", { points: "8 6 2 12 8 18" })
7521
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("polyline", { points: "16 18 22 12 16 6" }),
7522
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("polyline", { points: "8 6 2 12 8 18" })
7234
7523
  ]
7235
7524
  }
7236
7525
  ),
7237
7526
  subtext: "HTML \uD30C\uC77C\uC744 \uBBF8\uB9AC\uBCF4\uAE30\uB85C \uC0BD\uC785"
7238
7527
  };
7239
- const columnIcon = (withDivider) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
7528
+ const columnIcon = (withDivider) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
7240
7529
  "svg",
7241
7530
  {
7242
7531
  width: "18",
@@ -7248,9 +7537,9 @@ function LumirEditor({
7248
7537
  strokeLinecap: "round",
7249
7538
  strokeLinejoin: "round",
7250
7539
  children: [
7251
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("rect", { x: "3", y: "4", width: "7", height: "16", rx: "1" }),
7252
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("rect", { x: "14", y: "4", width: "7", height: "16", rx: "1" }),
7253
- withDivider && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("line", { x1: "12", y1: "3", x2: "12", y2: "21", strokeDasharray: "2 2" })
7540
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("rect", { x: "3", y: "4", width: "7", height: "16", rx: "1" }),
7541
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("rect", { x: "14", y: "4", width: "7", height: "16", rx: "1" }),
7542
+ withDivider && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("line", { x1: "12", y1: "3", x2: "12", y2: "21", strokeDasharray: "2 2" })
7254
7543
  ]
7255
7544
  }
7256
7545
  );
@@ -7286,7 +7575,7 @@ function LumirEditor({
7286
7575
  allItems.push({
7287
7576
  title: "Link Preview",
7288
7577
  onItemClick: () => {
7289
- (0, import_core10.insertOrUpdateBlock)(editor, {
7578
+ (0, import_core12.insertOrUpdateBlock)(editor, {
7290
7579
  type: "linkPreview",
7291
7580
  props: { url: "" }
7292
7581
  });
@@ -7300,7 +7589,7 @@ function LumirEditor({
7300
7589
  "\uD504\uB9AC\uBDF0"
7301
7590
  ],
7302
7591
  group: "Embeds",
7303
- icon: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
7592
+ icon: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
7304
7593
  "svg",
7305
7594
  {
7306
7595
  width: "18",
@@ -7312,8 +7601,8 @@ function LumirEditor({
7312
7601
  strokeLinecap: "round",
7313
7602
  strokeLinejoin: "round",
7314
7603
  children: [
7315
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" }),
7316
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" })
7604
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" }),
7605
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" })
7317
7606
  ]
7318
7607
  }
7319
7608
  ),
@@ -7349,21 +7638,21 @@ function LumirEditor({
7349
7638
  )
7350
7639
  }
7351
7640
  ),
7352
- !sideMenuAddButton && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react38.SideMenuController, { sideMenu: DragHandleOnlySideMenu })
7641
+ !sideMenuAddButton && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react37.SideMenuController, { sideMenu: DragHandleOnlySideMenu })
7353
7642
  ]
7354
7643
  }
7355
7644
  ),
7356
- isUploading && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "lumirEditor-upload-overlay", children: [
7357
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "lumirEditor-spinner" }),
7358
- uploadProgress !== null && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("span", { className: "lumirEditor-upload-progress", children: [
7645
+ isUploading && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "lumirEditor-upload-overlay", children: [
7646
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "lumirEditor-spinner" }),
7647
+ uploadProgress !== null && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("span", { className: "lumirEditor-upload-progress", children: [
7359
7648
  uploadProgress,
7360
7649
  "%"
7361
7650
  ] })
7362
7651
  ] }),
7363
- errorMessage && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "lumirEditor-error-toast", children: [
7364
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "lumirEditor-error-icon", children: "\u26A0\uFE0F" }),
7365
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "lumirEditor-error-message", children: errorMessage }),
7366
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
7652
+ errorMessage && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "lumirEditor-error-toast", children: [
7653
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "lumirEditor-error-icon", children: "\u26A0\uFE0F" }),
7654
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "lumirEditor-error-message", children: errorMessage }),
7655
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
7367
7656
  "button",
7368
7657
  {
7369
7658
  className: "lumirEditor-error-close",
@@ -7382,7 +7671,11 @@ function LumirEditor({
7382
7671
  BACKGROUND_COLORS,
7383
7672
  ContentUtils,
7384
7673
  EditorConfig,
7674
+ FONT_SIZE_DEFAULT_PX,
7675
+ FONT_SIZE_MAX,
7676
+ FONT_SIZE_MIN,
7385
7677
  FONT_SIZE_PRESETS,
7678
+ FONT_SIZE_STEP,
7386
7679
  FloatingMenu,
7387
7680
  FontSize,
7388
7681
  FontSizeButton,
@@ -7392,12 +7685,15 @@ function LumirEditor({
7392
7685
  LumirEditor,
7393
7686
  LumirEditorError,
7394
7687
  TEXT_COLORS,
7688
+ clampFontSizePx,
7395
7689
  clearMetadataCache,
7396
7690
  cn,
7397
7691
  createS3Uploader,
7398
7692
  fetchLinkMetadata,
7399
7693
  getHexFromColorValue,
7400
7694
  liftFontSize,
7401
- lowerFontSize
7695
+ lowerFontSize,
7696
+ parseFontSizePx,
7697
+ toFontSizeValue
7402
7698
  });
7403
7699
  //# sourceMappingURL=index.js.map